@thatopen/components 2.3.6 → 2.3.8
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/core/Components/index.d.ts +1 -1
- package/dist/core/Raycasters/src/mouse.d.ts +1 -0
- package/dist/fragments/IfcGeometryTiler/index.d.ts +5 -5
- package/dist/index.cjs +23 -23
- package/dist/index.mjs +792 -757
- package/dist/namespace.d.ts +3281 -3280
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -2,15 +2,15 @@ var Ao = Object.defineProperty;
|
|
|
2
2
|
var Fo = (c, i, t) => i in c ? Ao(c, i, { enumerable: !0, configurable: !0, writable: !0, value: t }) : c[i] = t;
|
|
3
3
|
var C = (c, i, t) => (Fo(c, typeof i != "symbol" ? i + "" : i, t), t);
|
|
4
4
|
import * as D from "three";
|
|
5
|
-
import { BufferAttribute as Zr, Vector3 as Q, Vector2 as
|
|
5
|
+
import { BufferAttribute as Zr, Vector3 as Q, Vector2 as ai, Plane as Dn, Line3 as Ee, Triangle as ii, Sphere as So, Matrix4 as pe, Box3 as ae, BackSide as Oo, DoubleSide as jr, FrontSide as Xn, Mesh as rt, Ray as No, Raycaster as yo, Quaternion as de, Object3D as In, Euler as Lo, MeshBasicMaterial as qr, LineBasicMaterial as _o, CylinderGeometry as Vt, BoxGeometry as Ut, BufferGeometry as $n, Float32BufferAttribute as Zn, OctahedronGeometry as Gi, Line as Ae, SphereGeometry as Po, TorusGeometry as Ii, PlaneGeometry as wo } from "three";
|
|
6
6
|
import * as Qt from "@thatopen/fragments";
|
|
7
7
|
import { FragmentsGroup as Mo, Serializer as Do } from "@thatopen/fragments";
|
|
8
8
|
import * as z from "web-ifc";
|
|
9
|
-
const Qr = 0, bo = 1, vo = 2, jn = 2, Ws = 1.25, qn = 1,
|
|
9
|
+
const Qr = 0, bo = 1, vo = 2, jn = 2, Ws = 1.25, qn = 1, Is = 6 * 4 + 4 + 4, Ys = 65535, Uo = Math.pow(2, -24), Xs = Symbol("SKIP_GENERATION");
|
|
10
10
|
function xo(c) {
|
|
11
11
|
return c.index ? c.index.count : c.attributes.position.count;
|
|
12
12
|
}
|
|
13
|
-
function
|
|
13
|
+
function li(c) {
|
|
14
14
|
return xo(c) / 3;
|
|
15
15
|
}
|
|
16
16
|
function Bo(c, i = ArrayBuffer) {
|
|
@@ -25,7 +25,7 @@ function Vo(c, i) {
|
|
|
25
25
|
}
|
|
26
26
|
}
|
|
27
27
|
function Kr(c) {
|
|
28
|
-
const i =
|
|
28
|
+
const i = li(c), t = c.drawRange, e = t.start / 3, s = (t.start + t.count) / 3, n = Math.max(0, e), r = Math.min(i, s) - n;
|
|
29
29
|
return [{
|
|
30
30
|
offset: Math.floor(n),
|
|
31
31
|
count: Math.floor(r)
|
|
@@ -52,7 +52,7 @@ function Jr(c) {
|
|
|
52
52
|
function Yo(c) {
|
|
53
53
|
if (c.groups.length === 0)
|
|
54
54
|
return !1;
|
|
55
|
-
const i =
|
|
55
|
+
const i = li(c), t = Jr(c).sort((n, r) => n.offset - r.offset), e = t[t.length - 1];
|
|
56
56
|
e.count = Math.min(i - e.offset, e.count);
|
|
57
57
|
let s = 0;
|
|
58
58
|
return t.forEach(({ count: n }) => s += n), i !== s;
|
|
@@ -81,13 +81,13 @@ function Jn(c, i, t) {
|
|
|
81
81
|
e = c[n], s = i[n], t[n] = e < s ? e : s, e = c[r], s = i[r], t[r] = e > s ? e : s;
|
|
82
82
|
}
|
|
83
83
|
}
|
|
84
|
-
function
|
|
84
|
+
function zi(c, i, t) {
|
|
85
85
|
for (let e = 0; e < 3; e++) {
|
|
86
86
|
const s = i[c + 2 * e], n = i[c + 2 * e + 1], r = s - n, o = s + n;
|
|
87
87
|
r < t[e] && (t[e] = r), o > t[e + 3] && (t[e + 3] = o);
|
|
88
88
|
}
|
|
89
89
|
}
|
|
90
|
-
function
|
|
90
|
+
function di(c) {
|
|
91
91
|
const i = c[3] - c[0], t = c[4] - c[1], e = c[5] - c[2];
|
|
92
92
|
return 2 * (i * t + t * e + e * i);
|
|
93
93
|
}
|
|
@@ -97,8 +97,8 @@ function $s(c, i, t, e, s = null) {
|
|
|
97
97
|
for (let m = i * 6, F = (i + t) * 6; m < F; m += 6) {
|
|
98
98
|
const R = c[m + 0], S = c[m + 1], N = R - S, y = R + S;
|
|
99
99
|
N < n && (n = N), y > a && (a = y), p && R < f && (f = R), p && R > d && (d = R);
|
|
100
|
-
const M = c[m + 2], L = c[m + 3], b = M - L,
|
|
101
|
-
b < r && (r = b),
|
|
100
|
+
const M = c[m + 2], L = c[m + 3], b = M - L, Y = M + L;
|
|
101
|
+
b < r && (r = b), Y > l && (l = Y), p && M < I && (I = M), p && M > E && (E = M);
|
|
102
102
|
const O = c[m + 4], w = c[m + 5], g = O - w, v = O + w;
|
|
103
103
|
g < o && (o = g), v > h && (h = v), p && O < u && (u = O), p && O > T && (T = O);
|
|
104
104
|
}
|
|
@@ -118,7 +118,7 @@ function zo(c, i, t, e) {
|
|
|
118
118
|
}
|
|
119
119
|
function ko(c, i) {
|
|
120
120
|
Go(i);
|
|
121
|
-
const t = c.attributes.position, e = c.index ? c.index.array : null, s =
|
|
121
|
+
const t = c.attributes.position, e = c.index ? c.index.array : null, s = li(c), n = new Float32Array(s * 6), r = t.normalized, o = t.array, a = t.offset || 0;
|
|
122
122
|
let l = 3;
|
|
123
123
|
t.isInterleavedBufferAttribute && (l = t.data.stride);
|
|
124
124
|
const h = ["getX", "getY", "getZ"];
|
|
@@ -145,7 +145,7 @@ const Te = 32, Ho = (c, i) => c.candidate - i.candidate, Fe = new Array(Te).fill
|
|
|
145
145
|
rightCacheBounds: new Float32Array(6),
|
|
146
146
|
leftCacheBounds: new Float32Array(6),
|
|
147
147
|
candidate: 0
|
|
148
|
-
})),
|
|
148
|
+
})), ki = new Float32Array(6);
|
|
149
149
|
function Wo(c, i, t, e, s, n) {
|
|
150
150
|
let r = -1, o = 0;
|
|
151
151
|
if (n === Qr)
|
|
@@ -153,7 +153,7 @@ function Wo(c, i, t, e, s, n) {
|
|
|
153
153
|
else if (n === bo)
|
|
154
154
|
r = Qn(c), r !== -1 && (o = Xo(t, e, s, r));
|
|
155
155
|
else if (n === vo) {
|
|
156
|
-
const a =
|
|
156
|
+
const a = di(c);
|
|
157
157
|
let l = Ws * s;
|
|
158
158
|
const h = e * 6, f = (e + s) * 6;
|
|
159
159
|
for (let I = 0; I < 3; I++) {
|
|
@@ -172,7 +172,7 @@ function Wo(c, i, t, e, s, n) {
|
|
|
172
172
|
} = S;
|
|
173
173
|
for (let L = 0; L < 3; L++)
|
|
174
174
|
M[L] = 1 / 0, M[L + 3] = -1 / 0, y[L] = 1 / 0, y[L + 3] = -1 / 0, N[L] = 1 / 0, N[L + 3] = -1 / 0;
|
|
175
|
-
|
|
175
|
+
zi(R, t, N);
|
|
176
176
|
}
|
|
177
177
|
p.sort(Ho);
|
|
178
178
|
let F = s;
|
|
@@ -185,16 +185,16 @@ function Wo(c, i, t, e, s, n) {
|
|
|
185
185
|
const S = t[R + 2 * I];
|
|
186
186
|
for (let N = 0; N < F; N++) {
|
|
187
187
|
const y = p[N];
|
|
188
|
-
S >= y.candidate ?
|
|
188
|
+
S >= y.candidate ? zi(R, t, y.rightCacheBounds) : (zi(R, t, y.leftCacheBounds), y.count++);
|
|
189
189
|
}
|
|
190
190
|
}
|
|
191
191
|
for (let R = 0; R < F; R++) {
|
|
192
192
|
const S = p[R], N = S.count, y = s - S.count, M = S.leftCacheBounds, L = S.rightCacheBounds;
|
|
193
193
|
let b = 0;
|
|
194
|
-
N !== 0 && (b =
|
|
195
|
-
let
|
|
196
|
-
y !== 0 && (
|
|
197
|
-
const O = qn + Ws * (b * N +
|
|
194
|
+
N !== 0 && (b = di(M) / a);
|
|
195
|
+
let Y = 0;
|
|
196
|
+
y !== 0 && (Y = di(L) / a);
|
|
197
|
+
const O = qn + Ws * (b * N + Y * y);
|
|
198
198
|
O < l && (r = I, l = O, o = S.candidate);
|
|
199
199
|
}
|
|
200
200
|
} else {
|
|
@@ -209,7 +209,7 @@ function Wo(c, i, t, e, s, n) {
|
|
|
209
209
|
let N = ~~((t[F + 2 * I] - u) / T);
|
|
210
210
|
N >= Te && (N = Te - 1);
|
|
211
211
|
const y = Fe[N];
|
|
212
|
-
y.count++,
|
|
212
|
+
y.count++, zi(F, t, y.bounds);
|
|
213
213
|
}
|
|
214
214
|
const p = Fe[Te - 1];
|
|
215
215
|
Kn(p.bounds, p.rightCacheBounds);
|
|
@@ -220,12 +220,12 @@ function Wo(c, i, t, e, s, n) {
|
|
|
220
220
|
let m = 0;
|
|
221
221
|
for (let F = 0; F < Te - 1; F++) {
|
|
222
222
|
const R = Fe[F], S = R.count, N = R.bounds, M = Fe[F + 1].rightCacheBounds;
|
|
223
|
-
S !== 0 && (m === 0 ? Kn(N,
|
|
223
|
+
S !== 0 && (m === 0 ? Kn(N, ki) : Jn(N, ki, ki)), m += S;
|
|
224
224
|
let L = 0, b = 0;
|
|
225
|
-
m !== 0 && (L =
|
|
226
|
-
const
|
|
227
|
-
|
|
228
|
-
const O = qn + Ws * (L * m + b *
|
|
225
|
+
m !== 0 && (L = di(ki) / a);
|
|
226
|
+
const Y = s - m;
|
|
227
|
+
Y !== 0 && (b = di(M) / a);
|
|
228
|
+
const O = qn + Ws * (L * m + b * Y);
|
|
229
229
|
O < l && (r = I, l = O, o = R.candidate);
|
|
230
230
|
}
|
|
231
231
|
}
|
|
@@ -240,7 +240,7 @@ function Xo(c, i, t, e) {
|
|
|
240
240
|
s += c[n * 6 + e * 2];
|
|
241
241
|
return s / t;
|
|
242
242
|
}
|
|
243
|
-
class
|
|
243
|
+
class Hi {
|
|
244
244
|
constructor() {
|
|
245
245
|
}
|
|
246
246
|
}
|
|
@@ -293,15 +293,15 @@ function jo(c, i) {
|
|
|
293
293
|
return r;
|
|
294
294
|
}
|
|
295
295
|
function qo(c, i) {
|
|
296
|
-
const t = c.geometry, e = t.index ? t.index.array : null, s = i.maxDepth, n = i.verbose, r = i.maxLeafTris, o = i.strategy, a = i.onProgress, l =
|
|
296
|
+
const t = c.geometry, e = t.index ? t.index.array : null, s = i.maxDepth, n = i.verbose, r = i.maxLeafTris, o = i.strategy, a = i.onProgress, l = li(t), h = c._indirectBuffer;
|
|
297
297
|
let f = !1;
|
|
298
298
|
const I = new Float32Array(6), u = new Float32Array(6), d = ko(t, I), E = i.indirect ? Zo : $o, T = [], p = i.indirect ? Kr(t) : Jr(t);
|
|
299
299
|
if (p.length === 1) {
|
|
300
|
-
const R = p[0], S = new
|
|
300
|
+
const R = p[0], S = new Hi();
|
|
301
301
|
S.boundingData = I, zo(d, R.offset, R.count, u), F(S, R.offset, R.count, u), T.push(S);
|
|
302
302
|
} else
|
|
303
303
|
for (let R of p) {
|
|
304
|
-
const S = new
|
|
304
|
+
const S = new Hi();
|
|
305
305
|
S.boundingData = new Float32Array(6), $s(d, R.offset, R.count, S.boundingData, u), F(S, R.offset, R.count, u), T.push(S);
|
|
306
306
|
}
|
|
307
307
|
return T;
|
|
@@ -319,10 +319,10 @@ function qo(c, i) {
|
|
|
319
319
|
m(S + N), R.offset = S, R.count = N;
|
|
320
320
|
else {
|
|
321
321
|
R.splitAxis = L.axis;
|
|
322
|
-
const
|
|
323
|
-
R.left =
|
|
324
|
-
const g = new
|
|
325
|
-
R.right = g, g.boundingData = new Float32Array(6), $s(d, v,
|
|
322
|
+
const Y = new Hi(), O = S, w = b - S;
|
|
323
|
+
R.left = Y, Y.boundingData = new Float32Array(6), $s(d, O, w, Y.boundingData, u), F(Y, O, w, u, M + 1);
|
|
324
|
+
const g = new Hi(), v = b, q = N - w;
|
|
325
|
+
R.right = g, g.boundingData = new Float32Array(6), $s(d, v, q, g.boundingData, u), F(g, v, q, u, M + 1);
|
|
326
326
|
}
|
|
327
327
|
return R;
|
|
328
328
|
}
|
|
@@ -338,7 +338,7 @@ function Qo(c, i) {
|
|
|
338
338
|
for (let f = 0; f < e.length; f++) {
|
|
339
339
|
const I = e[f];
|
|
340
340
|
let u = l(I);
|
|
341
|
-
const d = new a(
|
|
341
|
+
const d = new a(Is * u);
|
|
342
342
|
s = new Float32Array(d), n = new Uint32Array(d), r = new Uint16Array(d), h(0, I), o.push(d);
|
|
343
343
|
}
|
|
344
344
|
c._roots = o;
|
|
@@ -352,11 +352,11 @@ function Qo(c, i) {
|
|
|
352
352
|
s[u + p] = T[p];
|
|
353
353
|
if (E) {
|
|
354
354
|
const p = I.offset, m = I.count;
|
|
355
|
-
return n[u + 6] = p, r[d + 14] = m, r[d + 15] = Ys, f +
|
|
355
|
+
return n[u + 6] = p, r[d + 14] = m, r[d + 15] = Ys, f + Is;
|
|
356
356
|
} else {
|
|
357
357
|
const p = I.left, m = I.right, F = I.splitAxis;
|
|
358
358
|
let R;
|
|
359
|
-
if (R = h(f +
|
|
359
|
+
if (R = h(f + Is, p), R / 4 > Math.pow(2, 32))
|
|
360
360
|
throw new Error("MeshBVH: Cannot store child pointer greater than 32 bits.");
|
|
361
361
|
return n[u + 6] = R / 4, R = h(R, m), n[u + 7] = F, R;
|
|
362
362
|
}
|
|
@@ -411,7 +411,7 @@ const Ko = function() {
|
|
|
411
411
|
T !== 0 ? p = (f * I - d * u) / T : p = 0, m = (f + p * I) / u, r.x = p, r.y = m;
|
|
412
412
|
};
|
|
413
413
|
}(), bn = function() {
|
|
414
|
-
const c = new
|
|
414
|
+
const c = new ai(), i = new Q(), t = new Q();
|
|
415
415
|
return function(s, n, r, o) {
|
|
416
416
|
Ko(s, n, c);
|
|
417
417
|
let a = c.x, l = c.y;
|
|
@@ -457,7 +457,7 @@ const Ko = function() {
|
|
|
457
457
|
function Zs(c) {
|
|
458
458
|
return Math.abs(c) < ta;
|
|
459
459
|
}
|
|
460
|
-
class ne extends
|
|
460
|
+
class ne extends ii {
|
|
461
461
|
constructor(...i) {
|
|
462
462
|
super(...i), this.isExtendedTriangle = !0, this.satAxes = new Array(4).fill().map(() => new Q()), this.satBounds = new Array(4).fill().map(() => new ge()), this.points = [this.a, this.b, this.c], this.sphere = new So(), this.plane = new Dn(), this.needsUpdate = !0;
|
|
463
463
|
}
|
|
@@ -521,21 +521,21 @@ ne.prototype.intersectsTriangle = function() {
|
|
|
521
521
|
const S = this.satBounds, N = this.satAxes;
|
|
522
522
|
t[0] = T.a, t[1] = T.b, t[2] = T.c;
|
|
523
523
|
for (let L = 0; L < 4; L++) {
|
|
524
|
-
const b = S[L],
|
|
525
|
-
if (e.setFromPoints(
|
|
524
|
+
const b = S[L], Y = N[L];
|
|
525
|
+
if (e.setFromPoints(Y, t), b.isSeparated(e))
|
|
526
526
|
return !1;
|
|
527
527
|
}
|
|
528
528
|
const y = T.satBounds, M = T.satAxes;
|
|
529
529
|
i[0] = this.a, i[1] = this.b, i[2] = this.c;
|
|
530
530
|
for (let L = 0; L < 4; L++) {
|
|
531
|
-
const b = y[L],
|
|
532
|
-
if (e.setFromPoints(
|
|
531
|
+
const b = y[L], Y = M[L];
|
|
532
|
+
if (e.setFromPoints(Y, i), b.isSeparated(e))
|
|
533
533
|
return !1;
|
|
534
534
|
}
|
|
535
535
|
for (let L = 0; L < 4; L++) {
|
|
536
536
|
const b = N[L];
|
|
537
|
-
for (let
|
|
538
|
-
const O = M[
|
|
537
|
+
for (let Y = 0; Y < 4; Y++) {
|
|
538
|
+
const O = M[Y];
|
|
539
539
|
if (n.crossVectors(b, O), e.setFromPoints(n, i), s.setFromPoints(n, t), e.isSeparated(s))
|
|
540
540
|
return !1;
|
|
541
541
|
}
|
|
@@ -556,8 +556,8 @@ ne.prototype.intersectsTriangle = function() {
|
|
|
556
556
|
let w = I.start;
|
|
557
557
|
I.start = I.end, I.end = w;
|
|
558
558
|
}
|
|
559
|
-
const y = f.start.dot(o), M = f.end.dot(o), L = I.start.dot(o), b = I.end.dot(o),
|
|
560
|
-
return y !== b && L !== M &&
|
|
559
|
+
const y = f.start.dot(o), M = f.end.dot(o), L = I.start.dot(o), b = I.end.dot(o), Y = M < L, O = y < b;
|
|
560
|
+
return y !== b && L !== M && Y === O ? !1 : (p && (l.subVectors(f.start, I.start), l.dot(o) > 0 ? p.start.copy(f.start) : p.start.copy(I.start), l.subVectors(f.end, I.end), l.dot(o) < 0 ? p.end.copy(f.end) : p.end.copy(I.end)), !0);
|
|
561
561
|
}
|
|
562
562
|
};
|
|
563
563
|
}();
|
|
@@ -697,8 +697,8 @@ Bt.prototype.distanceToBox = function() {
|
|
|
697
697
|
for (let m = 0; m <= 1; m++) {
|
|
698
698
|
const F = (T + 1) % 3, R = (T + 2) % 3, S = p << F | m << R, N = 1 << T | p << F | m << R, y = u[S], M = u[N];
|
|
699
699
|
i[E].set(y, M);
|
|
700
|
-
const b = c[T],
|
|
701
|
-
g[b] = f[b], g[
|
|
700
|
+
const b = c[T], Y = c[F], O = c[R], w = t[E], g = w.start, v = w.end;
|
|
701
|
+
g[b] = f[b], g[Y] = p ? f[Y] : I[Y], g[O] = m ? f[O] : I[Y], v[b] = I[b], v[Y] = p ? f[Y] : I[Y], v[O] = m ? f[O] : I[Y], E++;
|
|
702
702
|
}
|
|
703
703
|
for (let T = 0; T <= 1; T++)
|
|
704
704
|
for (let p = 0; p <= 1; p++)
|
|
@@ -770,14 +770,14 @@ class ia {
|
|
|
770
770
|
}
|
|
771
771
|
}
|
|
772
772
|
const Ft = new ia();
|
|
773
|
-
let _e,
|
|
774
|
-
const
|
|
773
|
+
let _e, si;
|
|
774
|
+
const ze = [], Wi = /* @__PURE__ */ new vn(() => new ae());
|
|
775
775
|
function sa(c, i, t, e, s, n) {
|
|
776
|
-
_e =
|
|
776
|
+
_e = Wi.getPrimitive(), si = Wi.getPrimitive(), ze.push(_e, si), Ft.setBuffer(c._roots[i]);
|
|
777
777
|
const r = dn(0, c.geometry, t, e, s, n);
|
|
778
|
-
Ft.clearBuffer(),
|
|
779
|
-
const o =
|
|
780
|
-
return o > 0 && (
|
|
778
|
+
Ft.clearBuffer(), Wi.releasePrimitive(_e), Wi.releasePrimitive(si), ze.pop(), ze.pop();
|
|
779
|
+
const o = ze.length;
|
|
780
|
+
return o > 0 && (si = ze[o - 1], _e = ze[o - 2]), r;
|
|
781
781
|
}
|
|
782
782
|
function dn(c, i, t, e, s = null, n = 0, r = 0) {
|
|
783
783
|
const { float32Array: o, uint16Array: a, uint32Array: l } = Ft;
|
|
@@ -792,7 +792,7 @@ function dn(c, i, t, e, s = null, n = 0, r = 0) {
|
|
|
792
792
|
for (; !Gt(v, w); )
|
|
793
793
|
O = jt(O), v = O * 2;
|
|
794
794
|
return zt(O, g);
|
|
795
|
-
},
|
|
795
|
+
}, Y = function(O) {
|
|
796
796
|
const { uint16Array: w, uint32Array: g } = Ft;
|
|
797
797
|
let v = O * 2;
|
|
798
798
|
for (; !Gt(v, w); )
|
|
@@ -801,7 +801,7 @@ function dn(c, i, t, e, s = null, n = 0, r = 0) {
|
|
|
801
801
|
};
|
|
802
802
|
const I = jt(c), u = qt(c, l);
|
|
803
803
|
let d = I, E = u, T, p, m, F;
|
|
804
|
-
if (s && (m = _e, F =
|
|
804
|
+
if (s && (m = _e, F = si, Nt(d, o, m), Nt(E, o, F), T = s(m), p = s(F), p < T)) {
|
|
805
805
|
d = u, E = I;
|
|
806
806
|
const O = T;
|
|
807
807
|
T = p, p = O, m = F;
|
|
@@ -810,7 +810,7 @@ function dn(c, i, t, e, s = null, n = 0, r = 0) {
|
|
|
810
810
|
const R = Gt(d * 2, a), S = t(m, R, T, r + 1, n + d);
|
|
811
811
|
let N;
|
|
812
812
|
if (S === jn) {
|
|
813
|
-
const O = b(d), g =
|
|
813
|
+
const O = b(d), g = Y(d) - O;
|
|
814
814
|
N = e(O, g, !0, r + 1, n + d, m);
|
|
815
815
|
} else
|
|
816
816
|
N = S && dn(
|
|
@@ -824,11 +824,11 @@ function dn(c, i, t, e, s = null, n = 0, r = 0) {
|
|
|
824
824
|
);
|
|
825
825
|
if (N)
|
|
826
826
|
return !0;
|
|
827
|
-
F =
|
|
827
|
+
F = si, Nt(E, o, F);
|
|
828
828
|
const y = Gt(E * 2, a), M = t(F, y, p, r + 1, n + E);
|
|
829
829
|
let L;
|
|
830
830
|
if (M === jn) {
|
|
831
|
-
const O = b(E), g =
|
|
831
|
+
const O = b(E), g = Y(E) - O;
|
|
832
832
|
L = e(O, g, !0, r + 1, n + E, F);
|
|
833
833
|
} else
|
|
834
834
|
L = M && dn(
|
|
@@ -843,18 +843,18 @@ function dn(c, i, t, e, s = null, n = 0, r = 0) {
|
|
|
843
843
|
return !!L;
|
|
844
844
|
}
|
|
845
845
|
}
|
|
846
|
-
const
|
|
846
|
+
const Ei = /* @__PURE__ */ new Q(), js = /* @__PURE__ */ new Q();
|
|
847
847
|
function na(c, i, t = {}, e = 0, s = 1 / 0) {
|
|
848
848
|
const n = e * e, r = s * s;
|
|
849
849
|
let o = 1 / 0, a = null;
|
|
850
850
|
if (c.shapecast(
|
|
851
851
|
{
|
|
852
|
-
boundsTraverseOrder: (h) => (
|
|
852
|
+
boundsTraverseOrder: (h) => (Ei.copy(i).clamp(h.min, h.max), Ei.distanceToSquared(i)),
|
|
853
853
|
intersectsBounds: (h, f, I) => I < o && I < r,
|
|
854
854
|
intersectsTriangle: (h, f) => {
|
|
855
|
-
h.closestPointToPoint(i,
|
|
856
|
-
const I = i.distanceToSquared(
|
|
857
|
-
return I < o && (js.copy(
|
|
855
|
+
h.closestPointToPoint(i, Ei);
|
|
856
|
+
const I = i.distanceToSquared(Ei);
|
|
857
|
+
return I < o && (js.copy(Ei), o = I, a = f), I < n;
|
|
858
858
|
}
|
|
859
859
|
}
|
|
860
860
|
), o === 1 / 0)
|
|
@@ -862,7 +862,7 @@ function na(c, i, t = {}, e = 0, s = 1 / 0) {
|
|
|
862
862
|
const l = Math.sqrt(o);
|
|
863
863
|
return t.point ? t.point.copy(js) : t.point = js.clone(), t.distance = l, t.faceIndex = a, t;
|
|
864
864
|
}
|
|
865
|
-
const
|
|
865
|
+
const ke = /* @__PURE__ */ new Q(), He = /* @__PURE__ */ new Q(), We = /* @__PURE__ */ new Q(), Xi = /* @__PURE__ */ new ai(), $i = /* @__PURE__ */ new ai(), Zi = /* @__PURE__ */ new ai(), tr = /* @__PURE__ */ new Q(), er = /* @__PURE__ */ new Q(), ir = /* @__PURE__ */ new Q(), ji = /* @__PURE__ */ new Q();
|
|
866
866
|
function ra(c, i, t, e, s, n) {
|
|
867
867
|
let r;
|
|
868
868
|
return n === Oo ? r = c.intersectTriangle(e, t, i, !0, s) : r = c.intersectTriangle(i, t, e, n !== jr, s), r === null ? null : {
|
|
@@ -871,10 +871,10 @@ function ra(c, i, t, e, s, n) {
|
|
|
871
871
|
};
|
|
872
872
|
}
|
|
873
873
|
function oa(c, i, t, e, s, n, r, o, a) {
|
|
874
|
-
|
|
875
|
-
const l = ra(c,
|
|
874
|
+
ke.fromBufferAttribute(i, n), He.fromBufferAttribute(i, r), We.fromBufferAttribute(i, o);
|
|
875
|
+
const l = ra(c, ke, He, We, ji, a);
|
|
876
876
|
if (l) {
|
|
877
|
-
e && (
|
|
877
|
+
e && (Xi.fromBufferAttribute(e, n), $i.fromBufferAttribute(e, r), Zi.fromBufferAttribute(e, o), l.uv = ii.getInterpolation(ji, ke, He, We, Xi, $i, Zi, new ai())), s && (Xi.fromBufferAttribute(s, n), $i.fromBufferAttribute(s, r), Zi.fromBufferAttribute(s, o), l.uv1 = ii.getInterpolation(ji, ke, He, We, Xi, $i, Zi, new ai())), t && (tr.fromBufferAttribute(t, n), er.fromBufferAttribute(t, r), ir.fromBufferAttribute(t, o), l.normal = ii.getInterpolation(ji, ke, He, We, tr, er, ir, new Q()), l.normal.dot(c.direction) > 0 && l.normal.multiplyScalar(-1));
|
|
878
878
|
const h = {
|
|
879
879
|
a: n,
|
|
880
880
|
b: r,
|
|
@@ -882,7 +882,7 @@ function oa(c, i, t, e, s, n, r, o, a) {
|
|
|
882
882
|
normal: new Q(),
|
|
883
883
|
materialIndex: 0
|
|
884
884
|
};
|
|
885
|
-
|
|
885
|
+
ii.getNormal(ke, He, We, h.normal), l.face = h, l.faceIndex = n;
|
|
886
886
|
}
|
|
887
887
|
return l;
|
|
888
888
|
}
|
|
@@ -935,8 +935,8 @@ function ha(c, i = null) {
|
|
|
935
935
|
const p = r[I + 6], m = o[E + 14];
|
|
936
936
|
let F = 1 / 0, R = 1 / 0, S = 1 / 0, N = -1 / 0, y = -1 / 0, M = -1 / 0;
|
|
937
937
|
for (let L = 3 * p, b = 3 * (p + m); L < b; L++) {
|
|
938
|
-
let
|
|
939
|
-
const O = s.getX(
|
|
938
|
+
let Y = e[L];
|
|
939
|
+
const O = s.getX(Y), w = s.getY(Y), g = s.getZ(Y);
|
|
940
940
|
O < F && (F = O), O > N && (N = O), w < R && (R = w), w > y && (y = w), g < S && (S = g), g > M && (M = g);
|
|
941
941
|
}
|
|
942
942
|
return a[I + 0] !== F || a[I + 1] !== R || a[I + 2] !== S || a[I + 3] !== N || a[I + 4] !== y || a[I + 5] !== M ? (a[I + 0] = F, a[I + 1] = R, a[I + 2] = S, a[I + 3] = N, a[I + 4] = y, a[I + 5] = M, !0) : !1;
|
|
@@ -947,20 +947,20 @@ function ha(c, i = null) {
|
|
|
947
947
|
const M = S || N, L = S || y;
|
|
948
948
|
let b = !1;
|
|
949
949
|
M && (b = f(p, u, S));
|
|
950
|
-
let
|
|
951
|
-
L && (
|
|
952
|
-
const O = b ||
|
|
950
|
+
let Y = !1;
|
|
951
|
+
L && (Y = f(m, u, S));
|
|
952
|
+
const O = b || Y;
|
|
953
953
|
if (O)
|
|
954
954
|
for (let w = 0; w < 3; w++) {
|
|
955
|
-
const g = p + w, v = m + w,
|
|
956
|
-
a[I + w] =
|
|
955
|
+
const g = p + w, v = m + w, q = a[g], G = a[g + 3], et = a[v], W = a[v + 3];
|
|
956
|
+
a[I + w] = q < et ? q : et, a[I + w + 3] = G > W ? G : W;
|
|
957
957
|
}
|
|
958
958
|
return O;
|
|
959
959
|
}
|
|
960
960
|
}
|
|
961
961
|
}
|
|
962
962
|
const sr = /* @__PURE__ */ new ae();
|
|
963
|
-
function
|
|
963
|
+
function Me(c, i, t, e) {
|
|
964
964
|
return Nt(c, i, sr), t.intersectBox(sr, e);
|
|
965
965
|
}
|
|
966
966
|
function ua(c, i, t, e, s, n) {
|
|
@@ -999,9 +999,9 @@ function En(c, i, t, e, s) {
|
|
|
999
999
|
aa(i, t, e, h, f, s);
|
|
1000
1000
|
} else {
|
|
1001
1001
|
const h = jt(c);
|
|
1002
|
-
|
|
1002
|
+
Me(h, n, e, nr) && En(h, i, t, e, s);
|
|
1003
1003
|
const f = qt(c, o);
|
|
1004
|
-
|
|
1004
|
+
Me(f, n, e, nr) && En(f, i, t, e, s);
|
|
1005
1005
|
}
|
|
1006
1006
|
}
|
|
1007
1007
|
const rr = /* @__PURE__ */ new Q(), Ea = ["x", "y", "z"];
|
|
@@ -1020,7 +1020,7 @@ function pn(c, i, t, e) {
|
|
|
1020
1020
|
const l = to(c, r), h = Ea[l], I = e.direction[h] >= 0;
|
|
1021
1021
|
let u, d;
|
|
1022
1022
|
I ? (u = jt(c), d = qt(c, r)) : (u = qt(c, r), d = jt(c));
|
|
1023
|
-
const T =
|
|
1023
|
+
const T = Me(u, s, e, rr) ? pn(u, i, t, e) : null;
|
|
1024
1024
|
if (T) {
|
|
1025
1025
|
const F = T.point[h];
|
|
1026
1026
|
if (I ? F <= s[d + l] : (
|
|
@@ -1029,11 +1029,11 @@ function pn(c, i, t, e) {
|
|
|
1029
1029
|
))
|
|
1030
1030
|
return T;
|
|
1031
1031
|
}
|
|
1032
|
-
const m =
|
|
1032
|
+
const m = Me(d, s, e, rr) ? pn(d, i, t, e) : null;
|
|
1033
1033
|
return T && m ? T.distance <= m.distance ? T : m : T || m || null;
|
|
1034
1034
|
}
|
|
1035
1035
|
}
|
|
1036
|
-
const
|
|
1036
|
+
const qi = /* @__PURE__ */ new ae(), Xe = /* @__PURE__ */ new ne(), $e = /* @__PURE__ */ new ne(), pi = /* @__PURE__ */ new pe(), or = /* @__PURE__ */ new Bt(), Qi = /* @__PURE__ */ new Bt();
|
|
1037
1037
|
function Ca(c, i, t, e) {
|
|
1038
1038
|
Ft.setBuffer(c._roots[i]);
|
|
1039
1039
|
const s = Cn(0, c, t, e);
|
|
@@ -1044,46 +1044,46 @@ function Cn(c, i, t, e, s = null) {
|
|
|
1044
1044
|
let a = c * 2;
|
|
1045
1045
|
if (s === null && (t.boundingBox || t.computeBoundingBox(), or.set(t.boundingBox.min, t.boundingBox.max, e), s = or), Gt(a, r)) {
|
|
1046
1046
|
const h = i.geometry, f = h.index, I = h.attributes.position, u = t.index, d = t.attributes.position, E = zt(c, o), T = Zt(a, r);
|
|
1047
|
-
if (
|
|
1048
|
-
return Nt(c, n,
|
|
1049
|
-
intersectsBounds: (m) =>
|
|
1047
|
+
if (pi.copy(e).invert(), t.boundsTree)
|
|
1048
|
+
return Nt(c, n, Qi), Qi.matrix.copy(pi), Qi.needsUpdate = !0, t.boundsTree.shapecast({
|
|
1049
|
+
intersectsBounds: (m) => Qi.intersectsBox(m),
|
|
1050
1050
|
intersectsTriangle: (m) => {
|
|
1051
1051
|
m.a.applyMatrix4(e), m.b.applyMatrix4(e), m.c.applyMatrix4(e), m.needsUpdate = !0;
|
|
1052
1052
|
for (let F = E * 3, R = (T + E) * 3; F < R; F += 3)
|
|
1053
|
-
if (wt(
|
|
1053
|
+
if (wt($e, F, f, I), $e.needsUpdate = !0, m.intersectsTriangle($e))
|
|
1054
1054
|
return !0;
|
|
1055
1055
|
return !1;
|
|
1056
1056
|
}
|
|
1057
1057
|
});
|
|
1058
1058
|
for (let p = E * 3, m = (T + E) * 3; p < m; p += 3) {
|
|
1059
|
-
wt(
|
|
1059
|
+
wt(Xe, p, f, I), Xe.a.applyMatrix4(pi), Xe.b.applyMatrix4(pi), Xe.c.applyMatrix4(pi), Xe.needsUpdate = !0;
|
|
1060
1060
|
for (let F = 0, R = u.count; F < R; F += 3)
|
|
1061
|
-
if (wt(
|
|
1061
|
+
if (wt($e, F, u, d), $e.needsUpdate = !0, Xe.intersectsTriangle($e))
|
|
1062
1062
|
return !0;
|
|
1063
1063
|
}
|
|
1064
1064
|
} else {
|
|
1065
1065
|
const h = c + 8, f = o[c + 6];
|
|
1066
|
-
return Nt(h, n,
|
|
1066
|
+
return Nt(h, n, qi), !!(s.intersectsBox(qi) && Cn(h, i, t, e, s) || (Nt(f, n, qi), s.intersectsBox(qi) && Cn(f, i, t, e, s)));
|
|
1067
1067
|
}
|
|
1068
1068
|
}
|
|
1069
|
-
const
|
|
1069
|
+
const Ki = /* @__PURE__ */ new pe(), qs = /* @__PURE__ */ new Bt(), Ci = /* @__PURE__ */ new Bt(), Ta = /* @__PURE__ */ new Q(), ma = /* @__PURE__ */ new Q(), Ra = /* @__PURE__ */ new Q(), ga = /* @__PURE__ */ new Q();
|
|
1070
1070
|
function Aa(c, i, t, e = {}, s = {}, n = 0, r = 1 / 0) {
|
|
1071
1071
|
i.boundingBox || i.computeBoundingBox(), qs.set(i.boundingBox.min, i.boundingBox.max, t), qs.needsUpdate = !0;
|
|
1072
1072
|
const o = c.geometry, a = o.attributes.position, l = o.index, h = i.attributes.position, f = i.index, I = $t.getPrimitive(), u = $t.getPrimitive();
|
|
1073
1073
|
let d = Ta, E = ma, T = null, p = null;
|
|
1074
1074
|
s && (T = Ra, p = ga);
|
|
1075
1075
|
let m = 1 / 0, F = null, R = null;
|
|
1076
|
-
return
|
|
1076
|
+
return Ki.copy(t).invert(), Ci.matrix.copy(Ki), c.shapecast(
|
|
1077
1077
|
{
|
|
1078
1078
|
boundsTraverseOrder: (S) => qs.distanceToBox(S),
|
|
1079
|
-
intersectsBounds: (S, N, y) => y < m && y < r ? (N && (
|
|
1079
|
+
intersectsBounds: (S, N, y) => y < m && y < r ? (N && (Ci.min.copy(S.min), Ci.max.copy(S.max), Ci.needsUpdate = !0), !0) : !1,
|
|
1080
1080
|
intersectsRange: (S, N) => {
|
|
1081
1081
|
if (i.boundsTree)
|
|
1082
1082
|
return i.boundsTree.shapecast({
|
|
1083
|
-
boundsTraverseOrder: (M) =>
|
|
1083
|
+
boundsTraverseOrder: (M) => Ci.distanceToBox(M),
|
|
1084
1084
|
intersectsBounds: (M, L, b) => b < m && b < r,
|
|
1085
1085
|
intersectsRange: (M, L) => {
|
|
1086
|
-
for (let b = M,
|
|
1086
|
+
for (let b = M, Y = M + L; b < Y; b++) {
|
|
1087
1087
|
wt(u, 3 * b, f, h), u.a.applyMatrix4(t), u.b.applyMatrix4(t), u.c.applyMatrix4(t), u.needsUpdate = !0;
|
|
1088
1088
|
for (let O = S, w = S + N; O < w; O++) {
|
|
1089
1089
|
wt(I, 3 * O, l, a), I.needsUpdate = !0;
|
|
@@ -1095,10 +1095,10 @@ function Aa(c, i, t, e = {}, s = {}, n = 0, r = 1 / 0) {
|
|
|
1095
1095
|
}
|
|
1096
1096
|
});
|
|
1097
1097
|
{
|
|
1098
|
-
const y =
|
|
1098
|
+
const y = li(i);
|
|
1099
1099
|
for (let M = 0, L = y; M < L; M++) {
|
|
1100
1100
|
wt(u, 3 * M, f, h), u.a.applyMatrix4(t), u.b.applyMatrix4(t), u.c.applyMatrix4(t), u.needsUpdate = !0;
|
|
1101
|
-
for (let b = S,
|
|
1101
|
+
for (let b = S, Y = S + N; b < Y; b++) {
|
|
1102
1102
|
wt(I, 3 * b, l, a), I.needsUpdate = !0;
|
|
1103
1103
|
const O = I.distanceToTriangle(u, d, T);
|
|
1104
1104
|
if (O < m && (E.copy(d), p && p.copy(T), m = O, F = b, R = M), O < n)
|
|
@@ -1108,7 +1108,7 @@ function Aa(c, i, t, e = {}, s = {}, n = 0, r = 1 / 0) {
|
|
|
1108
1108
|
}
|
|
1109
1109
|
}
|
|
1110
1110
|
}
|
|
1111
|
-
), $t.releasePrimitive(I), $t.releasePrimitive(u), m === 1 / 0 ? null : (e.point ? e.point.copy(E) : e.point = E.clone(), e.distance = m, e.faceIndex = F, s && (s.point ? s.point.copy(p) : s.point = p.clone(), s.point.applyMatrix4(
|
|
1111
|
+
), $t.releasePrimitive(I), $t.releasePrimitive(u), m === 1 / 0 ? null : (e.point ? e.point.copy(E) : e.point = E.clone(), e.distance = m, e.faceIndex = F, s && (s.point ? s.point.copy(p) : s.point = p.clone(), s.point.applyMatrix4(Ki), E.applyMatrix4(Ki), s.distance = E.sub(s.point).length(), s.faceIndex = R), e);
|
|
1112
1112
|
}
|
|
1113
1113
|
function Fa(c, i = null) {
|
|
1114
1114
|
i && Array.isArray(i) && (i = new Set(i));
|
|
@@ -1123,12 +1123,12 @@ function Fa(c, i = null) {
|
|
|
1123
1123
|
const p = r[I + 6], m = o[E + 14];
|
|
1124
1124
|
let F = 1 / 0, R = 1 / 0, S = 1 / 0, N = -1 / 0, y = -1 / 0, M = -1 / 0;
|
|
1125
1125
|
for (let L = p, b = p + m; L < b; L++) {
|
|
1126
|
-
const
|
|
1126
|
+
const Y = 3 * c.resolveTriangleIndex(L);
|
|
1127
1127
|
for (let O = 0; O < 3; O++) {
|
|
1128
|
-
let w =
|
|
1128
|
+
let w = Y + O;
|
|
1129
1129
|
w = e ? e[w] : w;
|
|
1130
|
-
const g = s.getX(w), v = s.getY(w),
|
|
1131
|
-
g < F && (F = g), g > N && (N = g), v < R && (R = v), v > y && (y = v),
|
|
1130
|
+
const g = s.getX(w), v = s.getY(w), q = s.getZ(w);
|
|
1131
|
+
g < F && (F = g), g > N && (N = g), v < R && (R = v), v > y && (y = v), q < S && (S = q), q > M && (M = q);
|
|
1132
1132
|
}
|
|
1133
1133
|
}
|
|
1134
1134
|
return a[I + 0] !== F || a[I + 1] !== R || a[I + 2] !== S || a[I + 3] !== N || a[I + 4] !== y || a[I + 5] !== M ? (a[I + 0] = F, a[I + 1] = R, a[I + 2] = S, a[I + 3] = N, a[I + 4] = y, a[I + 5] = M, !0) : !1;
|
|
@@ -1139,13 +1139,13 @@ function Fa(c, i = null) {
|
|
|
1139
1139
|
const M = S || N, L = S || y;
|
|
1140
1140
|
let b = !1;
|
|
1141
1141
|
M && (b = f(p, u, S));
|
|
1142
|
-
let
|
|
1143
|
-
L && (
|
|
1144
|
-
const O = b ||
|
|
1142
|
+
let Y = !1;
|
|
1143
|
+
L && (Y = f(m, u, S));
|
|
1144
|
+
const O = b || Y;
|
|
1145
1145
|
if (O)
|
|
1146
1146
|
for (let w = 0; w < 3; w++) {
|
|
1147
|
-
const g = p + w, v = m + w,
|
|
1148
|
-
a[I + w] =
|
|
1147
|
+
const g = p + w, v = m + w, q = a[g], G = a[g + 3], et = a[v], W = a[v + 3];
|
|
1148
|
+
a[I + w] = q < et ? q : et, a[I + w + 3] = G > W ? G : W;
|
|
1149
1149
|
}
|
|
1150
1150
|
return O;
|
|
1151
1151
|
}
|
|
@@ -1162,9 +1162,9 @@ function Tn(c, i, t, e, s) {
|
|
|
1162
1162
|
ua(i, t, e, h, f, s);
|
|
1163
1163
|
} else {
|
|
1164
1164
|
const h = jt(c);
|
|
1165
|
-
|
|
1165
|
+
Me(h, n, e, ar) && Tn(h, i, t, e, s);
|
|
1166
1166
|
const f = qt(c, o);
|
|
1167
|
-
|
|
1167
|
+
Me(f, n, e, ar) && Tn(f, i, t, e, s);
|
|
1168
1168
|
}
|
|
1169
1169
|
}
|
|
1170
1170
|
const cr = /* @__PURE__ */ new Q(), Oa = ["x", "y", "z"];
|
|
@@ -1183,7 +1183,7 @@ function mn(c, i, t, e) {
|
|
|
1183
1183
|
const l = to(c, r), h = Oa[l], I = e.direction[h] >= 0;
|
|
1184
1184
|
let u, d;
|
|
1185
1185
|
I ? (u = jt(c), d = qt(c, r)) : (u = qt(c, r), d = jt(c));
|
|
1186
|
-
const T =
|
|
1186
|
+
const T = Me(u, s, e, cr) ? mn(u, i, t, e) : null;
|
|
1187
1187
|
if (T) {
|
|
1188
1188
|
const F = T.point[h];
|
|
1189
1189
|
if (I ? F <= s[d + l] : (
|
|
@@ -1192,11 +1192,11 @@ function mn(c, i, t, e) {
|
|
|
1192
1192
|
))
|
|
1193
1193
|
return T;
|
|
1194
1194
|
}
|
|
1195
|
-
const m =
|
|
1195
|
+
const m = Me(d, s, e, cr) ? mn(d, i, t, e) : null;
|
|
1196
1196
|
return T && m ? T.distance <= m.distance ? T : m : T || m || null;
|
|
1197
1197
|
}
|
|
1198
1198
|
}
|
|
1199
|
-
const
|
|
1199
|
+
const Ji = /* @__PURE__ */ new ae(), Ze = /* @__PURE__ */ new ne(), je = /* @__PURE__ */ new ne(), Ti = /* @__PURE__ */ new pe(), lr = /* @__PURE__ */ new Bt(), ts = /* @__PURE__ */ new Bt();
|
|
1200
1200
|
function ya(c, i, t, e) {
|
|
1201
1201
|
Ft.setBuffer(c._roots[i]);
|
|
1202
1202
|
const s = Rn(0, c, t, e);
|
|
@@ -1207,65 +1207,65 @@ function Rn(c, i, t, e, s = null) {
|
|
|
1207
1207
|
let a = c * 2;
|
|
1208
1208
|
if (s === null && (t.boundingBox || t.computeBoundingBox(), lr.set(t.boundingBox.min, t.boundingBox.max, e), s = lr), Gt(a, r)) {
|
|
1209
1209
|
const h = i.geometry, f = h.index, I = h.attributes.position, u = t.index, d = t.attributes.position, E = zt(c, o), T = Zt(a, r);
|
|
1210
|
-
if (
|
|
1211
|
-
return Nt(c, n,
|
|
1212
|
-
intersectsBounds: (m) =>
|
|
1210
|
+
if (Ti.copy(e).invert(), t.boundsTree)
|
|
1211
|
+
return Nt(c, n, ts), ts.matrix.copy(Ti), ts.needsUpdate = !0, t.boundsTree.shapecast({
|
|
1212
|
+
intersectsBounds: (m) => ts.intersectsBox(m),
|
|
1213
1213
|
intersectsTriangle: (m) => {
|
|
1214
1214
|
m.a.applyMatrix4(e), m.b.applyMatrix4(e), m.c.applyMatrix4(e), m.needsUpdate = !0;
|
|
1215
1215
|
for (let F = E, R = T + E; F < R; F++)
|
|
1216
|
-
if (wt(
|
|
1216
|
+
if (wt(je, 3 * i.resolveTriangleIndex(F), f, I), je.needsUpdate = !0, m.intersectsTriangle(je))
|
|
1217
1217
|
return !0;
|
|
1218
1218
|
return !1;
|
|
1219
1219
|
}
|
|
1220
1220
|
});
|
|
1221
1221
|
for (let p = E, m = T + E; p < m; p++) {
|
|
1222
1222
|
const F = i.resolveTriangleIndex(p);
|
|
1223
|
-
wt(
|
|
1223
|
+
wt(Ze, 3 * F, f, I), Ze.a.applyMatrix4(Ti), Ze.b.applyMatrix4(Ti), Ze.c.applyMatrix4(Ti), Ze.needsUpdate = !0;
|
|
1224
1224
|
for (let R = 0, S = u.count; R < S; R += 3)
|
|
1225
|
-
if (wt(
|
|
1225
|
+
if (wt(je, R, u, d), je.needsUpdate = !0, Ze.intersectsTriangle(je))
|
|
1226
1226
|
return !0;
|
|
1227
1227
|
}
|
|
1228
1228
|
} else {
|
|
1229
1229
|
const h = c + 8, f = o[c + 6];
|
|
1230
|
-
return Nt(h, n,
|
|
1230
|
+
return Nt(h, n, Ji), !!(s.intersectsBox(Ji) && Rn(h, i, t, e, s) || (Nt(f, n, Ji), s.intersectsBox(Ji) && Rn(f, i, t, e, s)));
|
|
1231
1231
|
}
|
|
1232
1232
|
}
|
|
1233
|
-
const
|
|
1233
|
+
const es = /* @__PURE__ */ new pe(), Qs = /* @__PURE__ */ new Bt(), mi = /* @__PURE__ */ new Bt(), La = /* @__PURE__ */ new Q(), _a = /* @__PURE__ */ new Q(), Pa = /* @__PURE__ */ new Q(), wa = /* @__PURE__ */ new Q();
|
|
1234
1234
|
function Ma(c, i, t, e = {}, s = {}, n = 0, r = 1 / 0) {
|
|
1235
1235
|
i.boundingBox || i.computeBoundingBox(), Qs.set(i.boundingBox.min, i.boundingBox.max, t), Qs.needsUpdate = !0;
|
|
1236
1236
|
const o = c.geometry, a = o.attributes.position, l = o.index, h = i.attributes.position, f = i.index, I = $t.getPrimitive(), u = $t.getPrimitive();
|
|
1237
1237
|
let d = La, E = _a, T = null, p = null;
|
|
1238
1238
|
s && (T = Pa, p = wa);
|
|
1239
1239
|
let m = 1 / 0, F = null, R = null;
|
|
1240
|
-
return
|
|
1240
|
+
return es.copy(t).invert(), mi.matrix.copy(es), c.shapecast(
|
|
1241
1241
|
{
|
|
1242
1242
|
boundsTraverseOrder: (S) => Qs.distanceToBox(S),
|
|
1243
|
-
intersectsBounds: (S, N, y) => y < m && y < r ? (N && (
|
|
1243
|
+
intersectsBounds: (S, N, y) => y < m && y < r ? (N && (mi.min.copy(S.min), mi.max.copy(S.max), mi.needsUpdate = !0), !0) : !1,
|
|
1244
1244
|
intersectsRange: (S, N) => {
|
|
1245
1245
|
if (i.boundsTree) {
|
|
1246
1246
|
const y = i.boundsTree;
|
|
1247
1247
|
return y.shapecast({
|
|
1248
|
-
boundsTraverseOrder: (M) =>
|
|
1248
|
+
boundsTraverseOrder: (M) => mi.distanceToBox(M),
|
|
1249
1249
|
intersectsBounds: (M, L, b) => b < m && b < r,
|
|
1250
1250
|
intersectsRange: (M, L) => {
|
|
1251
|
-
for (let b = M,
|
|
1251
|
+
for (let b = M, Y = M + L; b < Y; b++) {
|
|
1252
1252
|
const O = y.resolveTriangleIndex(b);
|
|
1253
1253
|
wt(u, 3 * O, f, h), u.a.applyMatrix4(t), u.b.applyMatrix4(t), u.c.applyMatrix4(t), u.needsUpdate = !0;
|
|
1254
1254
|
for (let w = S, g = S + N; w < g; w++) {
|
|
1255
1255
|
const v = c.resolveTriangleIndex(w);
|
|
1256
1256
|
wt(I, 3 * v, l, a), I.needsUpdate = !0;
|
|
1257
|
-
const
|
|
1258
|
-
if (
|
|
1257
|
+
const q = I.distanceToTriangle(u, d, T);
|
|
1258
|
+
if (q < m && (E.copy(d), p && p.copy(T), m = q, F = w, R = b), q < n)
|
|
1259
1259
|
return !0;
|
|
1260
1260
|
}
|
|
1261
1261
|
}
|
|
1262
1262
|
}
|
|
1263
1263
|
});
|
|
1264
1264
|
} else {
|
|
1265
|
-
const y =
|
|
1265
|
+
const y = li(i);
|
|
1266
1266
|
for (let M = 0, L = y; M < L; M++) {
|
|
1267
1267
|
wt(u, 3 * M, f, h), u.a.applyMatrix4(t), u.b.applyMatrix4(t), u.c.applyMatrix4(t), u.needsUpdate = !0;
|
|
1268
|
-
for (let b = S,
|
|
1268
|
+
for (let b = S, Y = S + N; b < Y; b++) {
|
|
1269
1269
|
const O = c.resolveTriangleIndex(b);
|
|
1270
1270
|
wt(I, 3 * O, l, a), I.needsUpdate = !0;
|
|
1271
1271
|
const w = I.distanceToTriangle(u, d, T);
|
|
@@ -1276,12 +1276,12 @@ function Ma(c, i, t, e = {}, s = {}, n = 0, r = 1 / 0) {
|
|
|
1276
1276
|
}
|
|
1277
1277
|
}
|
|
1278
1278
|
}
|
|
1279
|
-
), $t.releasePrimitive(I), $t.releasePrimitive(u), m === 1 / 0 ? null : (e.point ? e.point.copy(E) : e.point = E.clone(), e.distance = m, e.faceIndex = F, s && (s.point ? s.point.copy(p) : s.point = p.clone(), s.point.applyMatrix4(
|
|
1279
|
+
), $t.releasePrimitive(I), $t.releasePrimitive(u), m === 1 / 0 ? null : (e.point ? e.point.copy(E) : e.point = E.clone(), e.distance = m, e.faceIndex = F, s && (s.point ? s.point.copy(p) : s.point = p.clone(), s.point.applyMatrix4(es), E.applyMatrix4(es), s.distance = E.sub(s.point).length(), s.faceIndex = R), e);
|
|
1280
1280
|
}
|
|
1281
1281
|
function Da() {
|
|
1282
1282
|
return typeof SharedArrayBuffer < "u";
|
|
1283
1283
|
}
|
|
1284
|
-
const
|
|
1284
|
+
const wi = new Ft.constructor(), ps = new Ft.constructor(), Ne = new vn(() => new ae()), qe = new ae(), Qe = new ae(), Ks = new ae(), Js = new ae();
|
|
1285
1285
|
let tn = !1;
|
|
1286
1286
|
function ba(c, i, t, e) {
|
|
1287
1287
|
if (tn)
|
|
@@ -1291,9 +1291,9 @@ function ba(c, i, t, e) {
|
|
|
1291
1291
|
let r, o = 0, a = 0;
|
|
1292
1292
|
const l = new pe().copy(t).invert();
|
|
1293
1293
|
for (let h = 0, f = s.length; h < f; h++) {
|
|
1294
|
-
|
|
1294
|
+
wi.setBuffer(s[h]), a = 0;
|
|
1295
1295
|
const I = Ne.getPrimitive();
|
|
1296
|
-
Nt(0,
|
|
1296
|
+
Nt(0, wi.float32Array, I), I.applyMatrix4(l);
|
|
1297
1297
|
for (let u = 0, d = n.length; u < d && (ps.setBuffer(n[h]), r = Kt(
|
|
1298
1298
|
0,
|
|
1299
1299
|
0,
|
|
@@ -1307,14 +1307,14 @@ function ba(c, i, t, e) {
|
|
|
1307
1307
|
I
|
|
1308
1308
|
), ps.clearBuffer(), a += n[u].length, !r); u++)
|
|
1309
1309
|
;
|
|
1310
|
-
if (Ne.releasePrimitive(I),
|
|
1310
|
+
if (Ne.releasePrimitive(I), wi.clearBuffer(), o += s[h].length, r)
|
|
1311
1311
|
break;
|
|
1312
1312
|
}
|
|
1313
1313
|
return tn = !1, r;
|
|
1314
1314
|
}
|
|
1315
1315
|
function Kt(c, i, t, e, s, n = 0, r = 0, o = 0, a = 0, l = null, h = !1) {
|
|
1316
1316
|
let f, I;
|
|
1317
|
-
h ? (f = ps, I =
|
|
1317
|
+
h ? (f = ps, I = wi) : (f = wi, I = ps);
|
|
1318
1318
|
const u = f.float32Array, d = f.uint32Array, E = f.uint16Array, T = I.float32Array, p = I.uint32Array, m = I.uint16Array, F = c * 2, R = i * 2, S = Gt(F, E), N = Gt(R, m);
|
|
1319
1319
|
let y = !1;
|
|
1320
1320
|
if (N && S)
|
|
@@ -1341,9 +1341,9 @@ function Kt(c, i, t, e, s, n = 0, r = 0, o = 0, a = 0, l = null, h = !1) {
|
|
|
1341
1341
|
const M = Ne.getPrimitive();
|
|
1342
1342
|
Nt(i, T, M), M.applyMatrix4(t);
|
|
1343
1343
|
const L = jt(c), b = qt(c, d);
|
|
1344
|
-
Nt(L, u,
|
|
1345
|
-
const
|
|
1346
|
-
y =
|
|
1344
|
+
Nt(L, u, qe), Nt(b, u, Qe);
|
|
1345
|
+
const Y = M.intersectsBox(qe), O = M.intersectsBox(Qe);
|
|
1346
|
+
y = Y && Kt(
|
|
1347
1347
|
i,
|
|
1348
1348
|
L,
|
|
1349
1349
|
e,
|
|
@@ -1371,8 +1371,8 @@ function Kt(c, i, t, e, s, n = 0, r = 0, o = 0, a = 0, l = null, h = !1) {
|
|
|
1371
1371
|
} else {
|
|
1372
1372
|
const M = jt(i), L = qt(i, p);
|
|
1373
1373
|
Nt(M, T, Ks), Nt(L, T, Js);
|
|
1374
|
-
const b = l.intersectsBox(Ks),
|
|
1375
|
-
if (b &&
|
|
1374
|
+
const b = l.intersectsBox(Ks), Y = l.intersectsBox(Js);
|
|
1375
|
+
if (b && Y)
|
|
1376
1376
|
y = Kt(
|
|
1377
1377
|
c,
|
|
1378
1378
|
M,
|
|
@@ -1417,8 +1417,8 @@ function Kt(c, i, t, e, s, n = 0, r = 0, o = 0, a = 0, l = null, h = !1) {
|
|
|
1417
1417
|
const O = Ne.getPrimitive();
|
|
1418
1418
|
O.copy(Ks).applyMatrix4(t);
|
|
1419
1419
|
const w = jt(c), g = qt(c, d);
|
|
1420
|
-
Nt(w, u,
|
|
1421
|
-
const v = O.intersectsBox(
|
|
1420
|
+
Nt(w, u, qe), Nt(g, u, Qe);
|
|
1421
|
+
const v = O.intersectsBox(qe), q = O.intersectsBox(Qe);
|
|
1422
1422
|
y = v && Kt(
|
|
1423
1423
|
M,
|
|
1424
1424
|
w,
|
|
@@ -1431,7 +1431,7 @@ function Kt(c, i, t, e, s, n = 0, r = 0, o = 0, a = 0, l = null, h = !1) {
|
|
|
1431
1431
|
o + 1,
|
|
1432
1432
|
O,
|
|
1433
1433
|
!h
|
|
1434
|
-
) ||
|
|
1434
|
+
) || q && Kt(
|
|
1435
1435
|
M,
|
|
1436
1436
|
g,
|
|
1437
1437
|
e,
|
|
@@ -1445,7 +1445,7 @@ function Kt(c, i, t, e, s, n = 0, r = 0, o = 0, a = 0, l = null, h = !1) {
|
|
|
1445
1445
|
!h
|
|
1446
1446
|
), Ne.releasePrimitive(O);
|
|
1447
1447
|
}
|
|
1448
|
-
else if (
|
|
1448
|
+
else if (Y)
|
|
1449
1449
|
if (S)
|
|
1450
1450
|
y = Kt(
|
|
1451
1451
|
c,
|
|
@@ -1464,8 +1464,8 @@ function Kt(c, i, t, e, s, n = 0, r = 0, o = 0, a = 0, l = null, h = !1) {
|
|
|
1464
1464
|
const O = Ne.getPrimitive();
|
|
1465
1465
|
O.copy(Js).applyMatrix4(t);
|
|
1466
1466
|
const w = jt(c), g = qt(c, d);
|
|
1467
|
-
Nt(w, u,
|
|
1468
|
-
const v = O.intersectsBox(
|
|
1467
|
+
Nt(w, u, qe), Nt(g, u, Qe);
|
|
1468
|
+
const v = O.intersectsBox(qe), q = O.intersectsBox(Qe);
|
|
1469
1469
|
y = v && Kt(
|
|
1470
1470
|
L,
|
|
1471
1471
|
w,
|
|
@@ -1478,7 +1478,7 @@ function Kt(c, i, t, e, s, n = 0, r = 0, o = 0, a = 0, l = null, h = !1) {
|
|
|
1478
1478
|
o + 1,
|
|
1479
1479
|
O,
|
|
1480
1480
|
!h
|
|
1481
|
-
) ||
|
|
1481
|
+
) || q && Kt(
|
|
1482
1482
|
L,
|
|
1483
1483
|
g,
|
|
1484
1484
|
e,
|
|
@@ -1495,7 +1495,7 @@ function Kt(c, i, t, e, s, n = 0, r = 0, o = 0, a = 0, l = null, h = !1) {
|
|
|
1495
1495
|
}
|
|
1496
1496
|
return y;
|
|
1497
1497
|
}
|
|
1498
|
-
const
|
|
1498
|
+
const is = /* @__PURE__ */ new Bt(), hr = /* @__PURE__ */ new ae();
|
|
1499
1499
|
class Un {
|
|
1500
1500
|
static serialize(i, t = {}) {
|
|
1501
1501
|
t = {
|
|
@@ -1570,7 +1570,7 @@ class Un {
|
|
|
1570
1570
|
const f = s[o + 6], I = n[l + 14];
|
|
1571
1571
|
i(a, h, new Float32Array(e, o * 4, 6), f, I);
|
|
1572
1572
|
} else {
|
|
1573
|
-
const f = o +
|
|
1573
|
+
const f = o + Is / 4, I = s[o + 6], u = s[o + 7];
|
|
1574
1574
|
i(a, h, new Float32Array(e, o * 4, 6), u) || (r(f, a + 1), r(I, a + 1));
|
|
1575
1575
|
}
|
|
1576
1576
|
}
|
|
@@ -1666,10 +1666,10 @@ class Un {
|
|
|
1666
1666
|
}
|
|
1667
1667
|
/* Derived Cast Functions */
|
|
1668
1668
|
intersectsBox(i, t) {
|
|
1669
|
-
return
|
|
1669
|
+
return is.set(i.min, i.max, t), is.needsUpdate = !0, this.shapecast(
|
|
1670
1670
|
{
|
|
1671
|
-
intersectsBounds: (e) =>
|
|
1672
|
-
intersectsTriangle: (e) =>
|
|
1671
|
+
intersectsBounds: (e) => is.intersectsBox(e),
|
|
1672
|
+
intersectsTriangle: (e) => is.intersectsTriangle(e)
|
|
1673
1673
|
}
|
|
1674
1674
|
);
|
|
1675
1675
|
}
|
|
@@ -1736,7 +1736,7 @@ function xa(c) {
|
|
|
1736
1736
|
function Ba() {
|
|
1737
1737
|
this.boundsTree = null;
|
|
1738
1738
|
}
|
|
1739
|
-
class
|
|
1739
|
+
class j {
|
|
1740
1740
|
constructor() {
|
|
1741
1741
|
/** Triggers all the callbacks assigned to this event. */
|
|
1742
1742
|
C(this, "trigger", (i) => {
|
|
@@ -1765,7 +1765,7 @@ class Z {
|
|
|
1765
1765
|
this.handlers.length = 0;
|
|
1766
1766
|
}
|
|
1767
1767
|
}
|
|
1768
|
-
class
|
|
1768
|
+
class Pe {
|
|
1769
1769
|
constructor() {
|
|
1770
1770
|
/** Triggers all the callbacks assigned to this event. */
|
|
1771
1771
|
C(this, "trigger", async (i) => {
|
|
@@ -1819,7 +1819,7 @@ class Bn extends xn {
|
|
|
1819
1819
|
* Event that is triggered when a world is added or removed from the `worlds` map.
|
|
1820
1820
|
* The event payload contains the world instance and the action ("added" or "removed").
|
|
1821
1821
|
*/
|
|
1822
|
-
C(this, "onWorldChanged", new
|
|
1822
|
+
C(this, "onWorldChanged", new j());
|
|
1823
1823
|
/**
|
|
1824
1824
|
* The current world this item is associated with. It can be null if no world is currently active.
|
|
1825
1825
|
*/
|
|
@@ -1844,18 +1844,18 @@ class Ya extends Bn {
|
|
|
1844
1844
|
constructor() {
|
|
1845
1845
|
super(...arguments);
|
|
1846
1846
|
/** {@link Updateable.onBeforeUpdate} */
|
|
1847
|
-
C(this, "onAfterUpdate", new
|
|
1847
|
+
C(this, "onAfterUpdate", new j());
|
|
1848
1848
|
/** {@link Updateable.onAfterUpdate} */
|
|
1849
|
-
C(this, "onBeforeUpdate", new
|
|
1849
|
+
C(this, "onBeforeUpdate", new j());
|
|
1850
1850
|
/** {@link Disposable.onDisposed} */
|
|
1851
|
-
C(this, "onDisposed", new
|
|
1851
|
+
C(this, "onDisposed", new j());
|
|
1852
1852
|
/** {@link Resizeable.onResize} */
|
|
1853
|
-
C(this, "onResize", new
|
|
1853
|
+
C(this, "onResize", new j());
|
|
1854
1854
|
/**
|
|
1855
1855
|
* Event that fires when there has been a change to the list of clipping
|
|
1856
1856
|
* planes used by the active renderer.
|
|
1857
1857
|
*/
|
|
1858
|
-
C(this, "onClippingPlanesUpdated", new
|
|
1858
|
+
C(this, "onClippingPlanesUpdated", new j());
|
|
1859
1859
|
/**
|
|
1860
1860
|
* The list of [clipping planes](https://threejs.org/docs/#api/en/renderers/WebGLRenderer.clippingPlanes) used by this instance of the renderer.
|
|
1861
1861
|
*/
|
|
@@ -1893,13 +1893,13 @@ class Ya extends Bn {
|
|
|
1893
1893
|
);
|
|
1894
1894
|
}
|
|
1895
1895
|
}
|
|
1896
|
-
const
|
|
1896
|
+
const Mi = class Mi extends At {
|
|
1897
1897
|
constructor(t) {
|
|
1898
1898
|
super(t);
|
|
1899
1899
|
C(this, "_disposedComponents", /* @__PURE__ */ new Set());
|
|
1900
1900
|
/** {@link Component.enabled} */
|
|
1901
1901
|
C(this, "enabled", !0);
|
|
1902
|
-
t.add(
|
|
1902
|
+
t.add(Mi.uuid, this);
|
|
1903
1903
|
}
|
|
1904
1904
|
// TODO: Remove this?
|
|
1905
1905
|
/**
|
|
@@ -1937,7 +1937,7 @@ const wi = class wi extends At {
|
|
|
1937
1937
|
}
|
|
1938
1938
|
disposeGeometryAndMaterials(t, e) {
|
|
1939
1939
|
const s = t;
|
|
1940
|
-
s.geometry && this.disposeGeometry(s.geometry), e && s.material &&
|
|
1940
|
+
s.geometry && this.disposeGeometry(s.geometry), e && s.material && Mi.disposeMaterial(s), s.material = [], s.geometry = null;
|
|
1941
1941
|
}
|
|
1942
1942
|
disposeChildren(t) {
|
|
1943
1943
|
for (const e of t.children)
|
|
@@ -1956,13 +1956,13 @@ const wi = class wi extends At {
|
|
|
1956
1956
|
* A unique identifier for the component.
|
|
1957
1957
|
* This UUID is used to register the component within the Components system.
|
|
1958
1958
|
*/
|
|
1959
|
-
C(
|
|
1960
|
-
let
|
|
1959
|
+
C(Mi, "uuid", "76e9cd8e-ad8f-4753-9ef6-cbc60f7247fe");
|
|
1960
|
+
let De = Mi;
|
|
1961
1961
|
class Ga extends Bn {
|
|
1962
1962
|
constructor(t) {
|
|
1963
1963
|
super(t);
|
|
1964
1964
|
/** {@link Disposable.onDisposed} */
|
|
1965
|
-
C(this, "onDisposed", new
|
|
1965
|
+
C(this, "onDisposed", new j());
|
|
1966
1966
|
/** The set of directional lights managed by this scene component. */
|
|
1967
1967
|
C(this, "directionalLights", /* @__PURE__ */ new Map());
|
|
1968
1968
|
/** The set of ambient lights managed by this scene component. */
|
|
@@ -1970,7 +1970,7 @@ class Ga extends Bn {
|
|
|
1970
1970
|
}
|
|
1971
1971
|
/** {@link Disposable.dispose} */
|
|
1972
1972
|
dispose() {
|
|
1973
|
-
const t = this.components.get(
|
|
1973
|
+
const t = this.components.get(De);
|
|
1974
1974
|
for (const e of this.three.children) {
|
|
1975
1975
|
const s = e;
|
|
1976
1976
|
s.geometry && t.destroy(s);
|
|
@@ -1986,7 +1986,7 @@ class Ga extends Bn {
|
|
|
1986
1986
|
this.ambientLights.clear();
|
|
1987
1987
|
}
|
|
1988
1988
|
}
|
|
1989
|
-
class
|
|
1989
|
+
class we extends Set {
|
|
1990
1990
|
/**
|
|
1991
1991
|
* Constructs a new instance of the DataSet class.
|
|
1992
1992
|
*
|
|
@@ -1997,15 +1997,15 @@ class Pe extends Set {
|
|
|
1997
1997
|
/**
|
|
1998
1998
|
* An event that is triggered when a new item is added to the set.
|
|
1999
1999
|
*/
|
|
2000
|
-
C(this, "onItemAdded", new
|
|
2000
|
+
C(this, "onItemAdded", new j());
|
|
2001
2001
|
/**
|
|
2002
2002
|
* An event that is triggered when an item is deleted from the set.
|
|
2003
2003
|
*/
|
|
2004
|
-
C(this, "onItemDeleted", new
|
|
2004
|
+
C(this, "onItemDeleted", new j());
|
|
2005
2005
|
/**
|
|
2006
2006
|
* An event that is triggered when the set is cleared.
|
|
2007
2007
|
*/
|
|
2008
|
-
C(this, "onCleared", new
|
|
2008
|
+
C(this, "onCleared", new j());
|
|
2009
2009
|
/**
|
|
2010
2010
|
* A function that acts as a guard for adding items to the set.
|
|
2011
2011
|
* It determines whether a given value should be allowed to be added to the set.
|
|
@@ -2031,7 +2031,7 @@ class Pe extends Set {
|
|
|
2031
2031
|
*/
|
|
2032
2032
|
add(...t) {
|
|
2033
2033
|
for (const e of t)
|
|
2034
|
-
this.has(e) || !this.guard(e) || (super.add(e), this.onItemAdded || (this.onItemAdded = new
|
|
2034
|
+
this.has(e) || !this.guard(e) || (super.add(e), this.onItemAdded || (this.onItemAdded = new j()), this.onItemAdded.trigger(e));
|
|
2035
2035
|
return this;
|
|
2036
2036
|
}
|
|
2037
2037
|
/**
|
|
@@ -2062,19 +2062,19 @@ class re extends Map {
|
|
|
2062
2062
|
/**
|
|
2063
2063
|
* An event triggered when a new item is set in the map.
|
|
2064
2064
|
*/
|
|
2065
|
-
C(this, "onItemSet", new
|
|
2065
|
+
C(this, "onItemSet", new j());
|
|
2066
2066
|
/**
|
|
2067
2067
|
* An event triggered when an existing item in the map is updated.
|
|
2068
2068
|
*/
|
|
2069
|
-
C(this, "onItemUpdated", new
|
|
2069
|
+
C(this, "onItemUpdated", new j());
|
|
2070
2070
|
/**
|
|
2071
2071
|
* An event triggered when an item is deleted from the map.
|
|
2072
2072
|
*/
|
|
2073
|
-
C(this, "onItemDeleted", new
|
|
2073
|
+
C(this, "onItemDeleted", new j());
|
|
2074
2074
|
/**
|
|
2075
2075
|
* An event triggered when the map is cleared.
|
|
2076
2076
|
*/
|
|
2077
|
-
C(this, "onCleared", new
|
|
2077
|
+
C(this, "onCleared", new j());
|
|
2078
2078
|
/**
|
|
2079
2079
|
* A function that acts as a guard for adding items to the set.
|
|
2080
2080
|
* It determines whether a given value should be allowed to be added to the set.
|
|
@@ -2105,7 +2105,7 @@ class re extends Map {
|
|
|
2105
2105
|
if (!(this.guard ?? (() => !0))(t, e))
|
|
2106
2106
|
return this;
|
|
2107
2107
|
const o = super.set(t, e);
|
|
2108
|
-
return s ? (this.onItemUpdated || (this.onItemUpdated = new
|
|
2108
|
+
return s ? (this.onItemUpdated || (this.onItemUpdated = new j()), this.onItemUpdated.trigger({ key: t, value: e })) : (this.onItemSet || (this.onItemSet = new j()), this.onItemSet.trigger({ key: t, value: e })), o;
|
|
2109
2109
|
}
|
|
2110
2110
|
/**
|
|
2111
2111
|
* Deletes the specified key from the map and triggers the onItemDeleted event if the key was found.
|
|
@@ -2126,7 +2126,7 @@ class re extends Map {
|
|
|
2126
2126
|
}
|
|
2127
2127
|
class ph extends At {
|
|
2128
2128
|
}
|
|
2129
|
-
const ds = 0, za = 1, ka = new Q(), Ir = new Ee(), sn = new Dn(), dr = new Q(),
|
|
2129
|
+
const ds = 0, za = 1, ka = new Q(), Ir = new Ee(), sn = new Dn(), dr = new Q(), ss = new ii();
|
|
2130
2130
|
class Ha {
|
|
2131
2131
|
constructor() {
|
|
2132
2132
|
this.tolerance = -1, this.faces = [], this.newFaces = [], this.assigned = new Er(), this.unassigned = new Er(), this.vertices = [];
|
|
@@ -2400,7 +2400,7 @@ class te {
|
|
|
2400
2400
|
}
|
|
2401
2401
|
compute() {
|
|
2402
2402
|
const i = this.edge.tail(), t = this.edge.head(), e = this.edge.next.head();
|
|
2403
|
-
return
|
|
2403
|
+
return ss.set(i.point, t.point, e.point), ss.getNormal(this.normal), ss.getMidpoint(this.midpoint), this.area = ss.getArea(), this.constant = this.normal.dot(this.midpoint), this;
|
|
2404
2404
|
}
|
|
2405
2405
|
distanceToPoint(i) {
|
|
2406
2406
|
return this.normal.dot(i) - this.constant;
|
|
@@ -2558,24 +2558,24 @@ function qa(c) {
|
|
|
2558
2558
|
N.elements[0] = T, N.elements[1] = p, N.elements[2] = m, N.elements[3] = p, N.elements[4] = F, N.elements[5] = R, N.elements[6] = m, N.elements[7] = R, N.elements[8] = S, ja(N, e);
|
|
2559
2559
|
const y = e.unitary, M = new D.Vector3(), L = new D.Vector3(), b = new D.Vector3();
|
|
2560
2560
|
y.extractBasis(M, L, b);
|
|
2561
|
-
let
|
|
2561
|
+
let Y = -1 / 0, O = -1 / 0, w = -1 / 0, g = 1 / 0, v = 1 / 0, q = 1 / 0;
|
|
2562
2562
|
for (let at = 0, It = i.length; at < It; at++) {
|
|
2563
2563
|
const ft = i[at];
|
|
2564
|
-
|
|
2564
|
+
Y = Math.max(M.dot(ft), Y), O = Math.max(L.dot(ft), O), w = Math.max(b.dot(ft), w), g = Math.min(M.dot(ft), g), v = Math.min(L.dot(ft), v), q = Math.min(b.dot(ft), q);
|
|
2565
2565
|
}
|
|
2566
|
-
M.multiplyScalar(0.5 * (g +
|
|
2567
|
-
const
|
|
2568
|
-
|
|
2569
|
-
const { x: nt, y:
|
|
2570
|
-
ot.makeScale(nt * 2,
|
|
2566
|
+
M.multiplyScalar(0.5 * (g + Y)), L.multiplyScalar(0.5 * (v + O)), b.multiplyScalar(0.5 * (q + w));
|
|
2567
|
+
const G = new D.Vector3(), et = new D.Vector3(), W = new D.Matrix3();
|
|
2568
|
+
G.add(M).add(L).add(b), et.x = Y - g, et.y = O - v, et.z = w - q, et.multiplyScalar(0.5), W.copy(y);
|
|
2569
|
+
const { x: nt, y: V, z: x } = et, ot = new D.Matrix4();
|
|
2570
|
+
ot.makeScale(nt * 2, V * 2, x * 2);
|
|
2571
2571
|
const it = new D.Matrix4();
|
|
2572
|
-
it.makeTranslation(-nt, -
|
|
2572
|
+
it.makeTranslation(-nt, -V, -x);
|
|
2573
2573
|
const tt = new D.Matrix4();
|
|
2574
|
-
tt.makeTranslation(
|
|
2574
|
+
tt.makeTranslation(G.x, G.y, G.z);
|
|
2575
2575
|
const St = new D.Matrix4();
|
|
2576
2576
|
St.setFromMatrix3(W);
|
|
2577
2577
|
const yt = new D.Matrix4();
|
|
2578
|
-
return yt.multiply(tt), yt.multiply(St), yt.multiply(it), yt.multiply(ot), { center:
|
|
2578
|
+
return yt.multiply(tt), yt.multiply(St), yt.multiply(it), yt.multiply(ot), { center: G, halfSizes: et, rotation: W, transformation: yt };
|
|
2579
2579
|
}
|
|
2580
2580
|
function Ch(c, i, t) {
|
|
2581
2581
|
const e = [
|
|
@@ -2872,21 +2872,21 @@ class Th extends At {
|
|
|
2872
2872
|
constructor(t, e) {
|
|
2873
2873
|
super(t);
|
|
2874
2874
|
/** {@link Disposable.onDisposed} */
|
|
2875
|
-
C(this, "onDisposed", new
|
|
2875
|
+
C(this, "onDisposed", new j());
|
|
2876
2876
|
/**
|
|
2877
2877
|
* An event that is triggered when a vertex is found.
|
|
2878
2878
|
* The event passes a THREE.Vector3 representing the position of the found vertex.
|
|
2879
2879
|
*/
|
|
2880
|
-
C(this, "onVertexFound", new
|
|
2880
|
+
C(this, "onVertexFound", new j());
|
|
2881
2881
|
/**
|
|
2882
2882
|
* An event that is triggered when a vertex is lost.
|
|
2883
2883
|
* The event passes a THREE.Vector3 representing the position of the lost vertex.
|
|
2884
2884
|
*/
|
|
2885
|
-
C(this, "onVertexLost", new
|
|
2885
|
+
C(this, "onVertexLost", new j());
|
|
2886
2886
|
/**
|
|
2887
2887
|
* An event that is triggered when the picker is enabled or disabled
|
|
2888
2888
|
*/
|
|
2889
|
-
C(this, "onEnabled", new
|
|
2889
|
+
C(this, "onEnabled", new j());
|
|
2890
2890
|
/**
|
|
2891
2891
|
* A reference to the Components instance associated with this VertexPicker.
|
|
2892
2892
|
*/
|
|
@@ -2977,7 +2977,7 @@ class Th extends At {
|
|
|
2977
2977
|
get(t) {
|
|
2978
2978
|
if (!this.enabled)
|
|
2979
2979
|
return this._pickedPoint;
|
|
2980
|
-
const n = this.components.get(
|
|
2980
|
+
const n = this.components.get(ci).get(t).castRay();
|
|
2981
2981
|
if (!n)
|
|
2982
2982
|
return this._pickedPoint !== null && (this.onVertexLost.trigger(), this._pickedPoint = null), this._pickedPoint;
|
|
2983
2983
|
const r = this.getClosestVertex(n);
|
|
@@ -3021,7 +3021,7 @@ class Th extends At {
|
|
|
3021
3021
|
const Fs = class Fs {
|
|
3022
3022
|
constructor() {
|
|
3023
3023
|
/** {@link Disposable.onDisposed} */
|
|
3024
|
-
C(this, "onDisposed", new
|
|
3024
|
+
C(this, "onDisposed", new j());
|
|
3025
3025
|
/**
|
|
3026
3026
|
* The list of components created in this app.
|
|
3027
3027
|
* The keys are UUIDs and the values are instances of the components.
|
|
@@ -3051,7 +3051,7 @@ const Fs = class Fs {
|
|
|
3051
3051
|
* components.init();
|
|
3052
3052
|
* ```
|
|
3053
3053
|
*/
|
|
3054
|
-
C(this, "onInit", new
|
|
3054
|
+
C(this, "onInit", new j());
|
|
3055
3055
|
C(this, "update", () => {
|
|
3056
3056
|
if (!this.enabled)
|
|
3057
3057
|
return;
|
|
@@ -3137,7 +3137,7 @@ const Fs = class Fs {
|
|
|
3137
3137
|
/**
|
|
3138
3138
|
* The version of the @thatopen/components library.
|
|
3139
3139
|
*/
|
|
3140
|
-
C(Fs, "release", "2.3.
|
|
3140
|
+
C(Fs, "release", "2.3.8");
|
|
3141
3141
|
let Cs = Fs;
|
|
3142
3142
|
class Qa extends xn {
|
|
3143
3143
|
constructor() {
|
|
@@ -3147,11 +3147,11 @@ class Qa extends xn {
|
|
|
3147
3147
|
*/
|
|
3148
3148
|
C(this, "meshes", /* @__PURE__ */ new Set());
|
|
3149
3149
|
/** {@link Updateable.onAfterUpdate} */
|
|
3150
|
-
C(this, "onAfterUpdate", new
|
|
3150
|
+
C(this, "onAfterUpdate", new j());
|
|
3151
3151
|
/** {@link Updateable.onBeforeUpdate} */
|
|
3152
|
-
C(this, "onBeforeUpdate", new
|
|
3152
|
+
C(this, "onBeforeUpdate", new j());
|
|
3153
3153
|
/** {@link Disposable.onDisposed} */
|
|
3154
|
-
C(this, "onDisposed", new
|
|
3154
|
+
C(this, "onDisposed", new j());
|
|
3155
3155
|
/**
|
|
3156
3156
|
* Indicates whether the world is currently being disposed. This is useful to prevent trying to access world's elements when it's being disposed, which could cause errors when you dispose a world.
|
|
3157
3157
|
*/
|
|
@@ -3230,7 +3230,7 @@ class Qa extends xn {
|
|
|
3230
3230
|
/** {@link Disposable.dispose} */
|
|
3231
3231
|
dispose(t = !0) {
|
|
3232
3232
|
if (this.enabled = !1, this.isDisposing = !0, this.scene.onWorldChanged.trigger({ world: this, action: "removed" }), this.camera.onWorldChanged.trigger({ world: this, action: "removed" }), this.renderer && this.renderer.onWorldChanged.trigger({ world: this, action: "removed" }), t) {
|
|
3233
|
-
const s = this.components.get(
|
|
3233
|
+
const s = this.components.get(De);
|
|
3234
3234
|
this.scene.dispose(), this.camera.isDisposeable() && this.camera.dispose(), this.renderer && this.renderer.dispose();
|
|
3235
3235
|
for (const n of this.meshes)
|
|
3236
3236
|
s.destroy(n);
|
|
@@ -3239,12 +3239,12 @@ class Qa extends xn {
|
|
|
3239
3239
|
this._scene = null, this._camera = null, this._renderer = null, this.components.get(Ts).list.delete(this.uuid), this.onDisposed.trigger(), this.onDisposed.reset();
|
|
3240
3240
|
}
|
|
3241
3241
|
}
|
|
3242
|
-
class
|
|
3242
|
+
class Ge {
|
|
3243
3243
|
constructor(i, t, e, s) {
|
|
3244
3244
|
C(this, "_component");
|
|
3245
3245
|
C(this, "name");
|
|
3246
3246
|
C(this, "uuid");
|
|
3247
|
-
this._component = i, this.name = e, this.uuid = s ?? oe.create(), t.get(
|
|
3247
|
+
this._component = i, this.name = e, this.uuid = s ?? oe.create(), t.get(Ye).list.set(this.uuid, this);
|
|
3248
3248
|
}
|
|
3249
3249
|
get controls() {
|
|
3250
3250
|
const i = {};
|
|
@@ -3336,7 +3336,7 @@ const Ss = class Ss extends At {
|
|
|
3336
3336
|
* This UUID is used to register the component within the Components system.
|
|
3337
3337
|
*/
|
|
3338
3338
|
C(Ss, "uuid", "b8c764e0-6b24-4e77-9a32-35fa728ee5b4");
|
|
3339
|
-
let
|
|
3339
|
+
let Ye = Ss;
|
|
3340
3340
|
class Ka {
|
|
3341
3341
|
constructor(i, t) {
|
|
3342
3342
|
C(this, "_list");
|
|
@@ -3391,7 +3391,7 @@ class Ja {
|
|
|
3391
3391
|
t.intensity = i;
|
|
3392
3392
|
}
|
|
3393
3393
|
}
|
|
3394
|
-
class tc extends
|
|
3394
|
+
class tc extends Ge {
|
|
3395
3395
|
constructor() {
|
|
3396
3396
|
super(...arguments);
|
|
3397
3397
|
C(this, "_config", {
|
|
@@ -3444,7 +3444,7 @@ class ec extends Ga {
|
|
|
3444
3444
|
constructor(t) {
|
|
3445
3445
|
super(t);
|
|
3446
3446
|
/** {@link Configurable.onSetup} */
|
|
3447
|
-
C(this, "onSetup", new
|
|
3447
|
+
C(this, "onSetup", new j());
|
|
3448
3448
|
/** {@link Configurable.isSetup} */
|
|
3449
3449
|
C(this, "isSetup", !1);
|
|
3450
3450
|
/**
|
|
@@ -3482,7 +3482,7 @@ class ec extends Ga {
|
|
|
3482
3482
|
this.three.add(a, f), this.directionalLights.set(a.uuid, a), this.ambientLights.set(f.uuid, f), this.isSetup = !0, this.onSetup.trigger();
|
|
3483
3483
|
}
|
|
3484
3484
|
dispose() {
|
|
3485
|
-
super.dispose(), this.components.get(
|
|
3485
|
+
super.dispose(), this.components.get(Ye).list.delete(this.config.uuid);
|
|
3486
3486
|
}
|
|
3487
3487
|
}
|
|
3488
3488
|
class mh extends Ya {
|
|
@@ -3511,7 +3511,7 @@ class mh extends Ya {
|
|
|
3511
3511
|
C(this, "_canvas");
|
|
3512
3512
|
C(this, "_parameters");
|
|
3513
3513
|
C(this, "_resizeObserver", null);
|
|
3514
|
-
C(this, "onContainerUpdated", new
|
|
3514
|
+
C(this, "onContainerUpdated", new j());
|
|
3515
3515
|
C(this, "_resizing", !1);
|
|
3516
3516
|
/** {@link Resizeable.resize} */
|
|
3517
3517
|
C(this, "resize", (t) => {
|
|
@@ -3607,18 +3607,18 @@ const ht = {
|
|
|
3607
3607
|
TOUCH_ZOOM_TRUCK: 8192,
|
|
3608
3608
|
TOUCH_ZOOM_OFFSET: 16384,
|
|
3609
3609
|
TOUCH_ZOOM_ROTATE: 32768
|
|
3610
|
-
}),
|
|
3610
|
+
}), Ke = {
|
|
3611
3611
|
NONE: 0,
|
|
3612
3612
|
IN: 1,
|
|
3613
3613
|
OUT: -1
|
|
3614
3614
|
};
|
|
3615
|
-
function
|
|
3615
|
+
function ve(c) {
|
|
3616
3616
|
return c.isPerspectiveCamera;
|
|
3617
3617
|
}
|
|
3618
3618
|
function Oe(c) {
|
|
3619
3619
|
return c.isOrthographicCamera;
|
|
3620
3620
|
}
|
|
3621
|
-
const
|
|
3621
|
+
const Je = Math.PI * 2, Cr = Math.PI / 2, eo = 1e-5, Ri = Math.PI / 180;
|
|
3622
3622
|
function Jt(c, i, t) {
|
|
3623
3623
|
return Math.max(i, Math.min(t, c));
|
|
3624
3624
|
}
|
|
@@ -3631,13 +3631,13 @@ function pt(c, i, t = eo) {
|
|
|
3631
3631
|
function Tr(c, i) {
|
|
3632
3632
|
return Math.round(c / i) * i;
|
|
3633
3633
|
}
|
|
3634
|
-
function
|
|
3634
|
+
function gi(c) {
|
|
3635
3635
|
return isFinite(c) ? c : c < 0 ? -Number.MAX_VALUE : Number.MAX_VALUE;
|
|
3636
3636
|
}
|
|
3637
|
-
function
|
|
3637
|
+
function Ai(c) {
|
|
3638
3638
|
return Math.abs(c) < Number.MAX_VALUE ? c : c * (1 / 0);
|
|
3639
3639
|
}
|
|
3640
|
-
function
|
|
3640
|
+
function ns(c, i, t, e, s = 1 / 0, n) {
|
|
3641
3641
|
e = Math.max(1e-4, e);
|
|
3642
3642
|
const r = 2 / e, o = r * n, a = 1 / (1 + o + 0.48 * o * o + 0.235 * o * o * o);
|
|
3643
3643
|
let l = c - i;
|
|
@@ -3660,8 +3660,8 @@ function mr(c, i, t, e, s = 1 / 0, n, r) {
|
|
|
3660
3660
|
h = c.x - u, f = c.y - d, I = c.z - E;
|
|
3661
3661
|
const N = (t.x + o * u) * n, y = (t.y + o * d) * n, M = (t.z + o * E) * n;
|
|
3662
3662
|
t.x = (t.x - o * N) * l, t.y = (t.y - o * y) * l, t.z = (t.z - o * M) * l, r.x = h + (u + N) * l, r.y = f + (d + y) * l, r.z = I + (E + M) * l;
|
|
3663
|
-
const L = T - c.x, b = p - c.y,
|
|
3664
|
-
return L * O + b * w +
|
|
3663
|
+
const L = T - c.x, b = p - c.y, Y = m - c.z, O = r.x - T, w = r.y - p, g = r.z - m;
|
|
3664
|
+
return L * O + b * w + Y * g > 0 && (r.x = T, r.y = p, r.z = m, t.x = (r.x - T) / n, t.y = (r.y - p) / n, t.z = (r.z - m) / n), r;
|
|
3665
3665
|
}
|
|
3666
3666
|
function rn(c, i) {
|
|
3667
3667
|
i.set(0, 0), c.forEach((t) => {
|
|
@@ -3735,8 +3735,8 @@ class ic {
|
|
|
3735
3735
|
}
|
|
3736
3736
|
}
|
|
3737
3737
|
}
|
|
3738
|
-
const sc = "2.7.3",
|
|
3739
|
-
let lt, Rr,
|
|
3738
|
+
const sc = "2.7.3", rs = 1 / 8, io = typeof window < "u", nc = io && /Mac/.test(navigator.platform), rc = !(io && "PointerEvent" in window);
|
|
3739
|
+
let lt, Rr, os, an, Yt, ut, Et, ti, Fi, le, he, Ue, gr, Ar, Xt, Si, ei, Fr, cn, Sr, ln, hn, as;
|
|
3740
3740
|
class vt extends ic {
|
|
3741
3741
|
/**
|
|
3742
3742
|
* Injects THREE as the dependency. You can then proceed to use CameraControls.
|
|
@@ -3779,7 +3779,7 @@ class vt extends ic {
|
|
|
3779
3779
|
* @category Statics
|
|
3780
3780
|
*/
|
|
3781
3781
|
static install(i) {
|
|
3782
|
-
lt = i.THREE, Rr = Object.freeze(new lt.Vector3(0, 0, 0)),
|
|
3782
|
+
lt = i.THREE, Rr = Object.freeze(new lt.Vector3(0, 0, 0)), os = Object.freeze(new lt.Vector3(0, 1, 0)), an = Object.freeze(new lt.Vector3(0, 0, 1)), Yt = new lt.Vector2(), ut = new lt.Vector3(), Et = new lt.Vector3(), ti = new lt.Vector3(), Fi = new lt.Vector3(), le = new lt.Vector3(), he = new lt.Vector3(), Ue = new lt.Vector3(), gr = new lt.Vector3(), Ar = new lt.Vector3(), Xt = new lt.Spherical(), Si = new lt.Spherical(), ei = new lt.Box3(), Fr = new lt.Box3(), cn = new lt.Sphere(), Sr = new lt.Quaternion(), ln = new lt.Quaternion(), hn = new lt.Matrix4(), as = new lt.Raycaster();
|
|
3783
3783
|
}
|
|
3784
3784
|
/**
|
|
3785
3785
|
* list all ACTIONs
|
|
@@ -3807,11 +3807,11 @@ class vt extends ic {
|
|
|
3807
3807
|
*/
|
|
3808
3808
|
constructor(i, t) {
|
|
3809
3809
|
super(), this.minPolarAngle = 0, this.maxPolarAngle = Math.PI, this.minAzimuthAngle = -1 / 0, this.maxAzimuthAngle = 1 / 0, this.minDistance = Number.EPSILON, this.maxDistance = 1 / 0, this.infinityDolly = !1, this.minZoom = 0.01, this.maxZoom = 1 / 0, this.smoothTime = 0.25, this.draggingSmoothTime = 0.125, this.maxSpeed = 1 / 0, this.azimuthRotateSpeed = 1, this.polarRotateSpeed = 1, this.dollySpeed = 1, this.dollyDragInverted = !1, this.truckSpeed = 2, this.dollyToCursor = !1, this.dragToOffset = !1, this.verticalDragToForward = !1, this.boundaryFriction = 0, this.restThreshold = 0.01, this.colliderMeshes = [], this.cancel = () => {
|
|
3810
|
-
}, this._enabled = !0, this._state = H.NONE, this._viewport = null, this._changedDolly = 0, this._changedZoom = 0, this._hasRested = !0, this._boundaryEnclosesCamera = !1, this._needsUpdate = !0, this._updatedLastTime = !1, this._elementRect = new DOMRect(), this._isDragging = !1, this._dragNeedsUpdate = !0, this._activePointers = [], this._lockedPointer = null, this._interactiveArea = new DOMRect(0, 0, 1, 1), this._isUserControllingRotate = !1, this._isUserControllingDolly = !1, this._isUserControllingTruck = !1, this._isUserControllingOffset = !1, this._isUserControllingZoom = !1, this._lastDollyDirection =
|
|
3810
|
+
}, this._enabled = !0, this._state = H.NONE, this._viewport = null, this._changedDolly = 0, this._changedZoom = 0, this._hasRested = !0, this._boundaryEnclosesCamera = !1, this._needsUpdate = !0, this._updatedLastTime = !1, this._elementRect = new DOMRect(), this._isDragging = !1, this._dragNeedsUpdate = !0, this._activePointers = [], this._lockedPointer = null, this._interactiveArea = new DOMRect(0, 0, 1, 1), this._isUserControllingRotate = !1, this._isUserControllingDolly = !1, this._isUserControllingTruck = !1, this._isUserControllingOffset = !1, this._isUserControllingZoom = !1, this._lastDollyDirection = Ke.NONE, this._thetaVelocity = { value: 0 }, this._phiVelocity = { value: 0 }, this._radiusVelocity = { value: 0 }, this._targetVelocity = new lt.Vector3(), this._focalOffsetVelocity = new lt.Vector3(), this._zoomVelocity = { value: 0 }, this._truckInternal = (R, S, N) => {
|
|
3811
3811
|
let y, M;
|
|
3812
|
-
if (
|
|
3813
|
-
const L = ut.copy(this._camera.position).sub(this._target), b = this._camera.getEffectiveFOV() *
|
|
3814
|
-
y = this.truckSpeed * R *
|
|
3812
|
+
if (ve(this._camera)) {
|
|
3813
|
+
const L = ut.copy(this._camera.position).sub(this._target), b = this._camera.getEffectiveFOV() * Ri, Y = L.length() * Math.tan(b * 0.5);
|
|
3814
|
+
y = this.truckSpeed * R * Y / this._elementRect.height, M = this.truckSpeed * S * Y / this._elementRect.height;
|
|
3815
3815
|
} else if (Oe(this._camera)) {
|
|
3816
3816
|
const L = this._camera;
|
|
3817
3817
|
y = R * (L.right - L.left) / L.zoom / this._elementRect.width, M = S * (L.top - L.bottom) / L.zoom / this._elementRect.height;
|
|
@@ -3819,15 +3819,15 @@ class vt extends ic {
|
|
|
3819
3819
|
return;
|
|
3820
3820
|
this.verticalDragToForward ? (N ? this.setFocalOffset(this._focalOffsetEnd.x + y, this._focalOffsetEnd.y, this._focalOffsetEnd.z, !0) : this.truck(y, 0, !0), this.forward(-M, !0)) : N ? this.setFocalOffset(this._focalOffsetEnd.x + y, this._focalOffsetEnd.y + M, this._focalOffsetEnd.z, !0) : this.truck(y, M, !0);
|
|
3821
3821
|
}, this._rotateInternal = (R, S) => {
|
|
3822
|
-
const N =
|
|
3822
|
+
const N = Je * this.azimuthRotateSpeed * R / this._elementRect.height, y = Je * this.polarRotateSpeed * S / this._elementRect.height;
|
|
3823
3823
|
this.rotate(N, y, !0);
|
|
3824
3824
|
}, this._dollyInternal = (R, S, N) => {
|
|
3825
|
-
const y = Math.pow(0.95, -R * this.dollySpeed), M = this._sphericalEnd.radius, L = this._sphericalEnd.radius * y, b = Jt(L, this.minDistance, this.maxDistance),
|
|
3826
|
-
this.infinityDolly && this.dollyToCursor ? this._dollyToNoClamp(L, !0) : this.infinityDolly && !this.dollyToCursor ? (this.dollyInFixed(
|
|
3825
|
+
const y = Math.pow(0.95, -R * this.dollySpeed), M = this._sphericalEnd.radius, L = this._sphericalEnd.radius * y, b = Jt(L, this.minDistance, this.maxDistance), Y = b - L;
|
|
3826
|
+
this.infinityDolly && this.dollyToCursor ? this._dollyToNoClamp(L, !0) : this.infinityDolly && !this.dollyToCursor ? (this.dollyInFixed(Y, !0), this._dollyToNoClamp(b, !0)) : this._dollyToNoClamp(b, !0), this.dollyToCursor && (this._changedDolly += (this.infinityDolly ? L : b) - M, this._dollyControlCoord.set(S, N)), this._lastDollyDirection = Math.sign(-R);
|
|
3827
3827
|
}, this._zoomInternal = (R, S, N) => {
|
|
3828
3828
|
const y = Math.pow(0.95, R * this.dollySpeed), M = this._zoom, L = this._zoom * y;
|
|
3829
3829
|
this.zoomTo(L, !0), this.dollyToCursor && (this._changedZoom += L - M, this._dollyControlCoord.set(S, N));
|
|
3830
|
-
}, typeof lt > "u" && console.error("camera-controls: `THREE` is undefined. You must first run `CameraControls.install( { THREE: THREE } )`. Check the docs for further information."), this._camera = i, this._yAxisUpSpace = new lt.Quaternion().setFromUnitVectors(this._camera.up,
|
|
3830
|
+
}, typeof lt > "u" && console.error("camera-controls: `THREE` is undefined. You must first run `CameraControls.install( { THREE: THREE } )`. Check the docs for further information."), this._camera = i, this._yAxisUpSpace = new lt.Quaternion().setFromUnitVectors(this._camera.up, os), this._yAxisUpSpaceInverse = this._yAxisUpSpace.clone().invert(), this._state = H.NONE, this._target = new lt.Vector3(), this._targetEnd = this._target.clone(), this._focalOffset = new lt.Vector3(), this._focalOffsetEnd = this._focalOffset.clone(), this._spherical = new lt.Spherical().setFromVector3(ut.copy(this._camera.position).applyQuaternion(this._yAxisUpSpace)), this._sphericalEnd = this._spherical.clone(), this._lastDistance = this._spherical.radius, this._zoom = this._camera.zoom, this._zoomEnd = this._zoom, this._lastZoom = this._zoom, this._nearPlaneCorners = [
|
|
3831
3831
|
new lt.Vector3(),
|
|
3832
3832
|
new lt.Vector3(),
|
|
3833
3833
|
new lt.Vector3(),
|
|
@@ -3836,10 +3836,10 @@ class vt extends ic {
|
|
|
3836
3836
|
left: H.ROTATE,
|
|
3837
3837
|
middle: H.DOLLY,
|
|
3838
3838
|
right: H.TRUCK,
|
|
3839
|
-
wheel:
|
|
3839
|
+
wheel: ve(this._camera) ? H.DOLLY : Oe(this._camera) ? H.ZOOM : H.NONE
|
|
3840
3840
|
}, this.touches = {
|
|
3841
3841
|
one: H.TOUCH_ROTATE,
|
|
3842
|
-
two:
|
|
3842
|
+
two: ve(this._camera) ? H.TOUCH_DOLLY_TRUCK : Oe(this._camera) ? H.TOUCH_ZOOM_TRUCK : H.NONE,
|
|
3843
3843
|
three: H.TOUCH_TRUCK
|
|
3844
3844
|
};
|
|
3845
3845
|
const e = new lt.Vector2(), s = new lt.Vector2(), n = new lt.Vector2(), r = (R) => {
|
|
@@ -3942,8 +3942,8 @@ class vt extends ic {
|
|
|
3942
3942
|
if (!this._domElement || !this._enabled || this.mouseButtons.wheel === H.NONE)
|
|
3943
3943
|
return;
|
|
3944
3944
|
if (this._interactiveArea.left !== 0 || this._interactiveArea.top !== 0 || this._interactiveArea.width !== 1 || this._interactiveArea.height !== 1) {
|
|
3945
|
-
const L = this._domElement.getBoundingClientRect(), b = R.clientX / L.width,
|
|
3946
|
-
if (b < this._interactiveArea.left || b > this._interactiveArea.right ||
|
|
3945
|
+
const L = this._domElement.getBoundingClientRect(), b = R.clientX / L.width, Y = R.clientY / L.height;
|
|
3946
|
+
if (b < this._interactiveArea.left || b > this._interactiveArea.right || Y < this._interactiveArea.top || Y > this._interactiveArea.bottom)
|
|
3947
3947
|
return;
|
|
3948
3948
|
}
|
|
3949
3949
|
if (R.preventDefault(), this.dollyToCursor || this.mouseButtons.wheel === H.ROTATE || this.mouseButtons.wheel === H.TRUCK) {
|
|
@@ -4016,13 +4016,13 @@ class vt extends ic {
|
|
|
4016
4016
|
const S = this._domElement && document.pointerLockElement === this._domElement ? this._lockedPointer || this._activePointers[0] : null, N = S ? -S.deltaX : s.x - Yt.x, y = S ? -S.deltaY : s.y - Yt.y;
|
|
4017
4017
|
if (s.copy(Yt), ((this._state & H.ROTATE) === H.ROTATE || (this._state & H.TOUCH_ROTATE) === H.TOUCH_ROTATE || (this._state & H.TOUCH_DOLLY_ROTATE) === H.TOUCH_DOLLY_ROTATE || (this._state & H.TOUCH_ZOOM_ROTATE) === H.TOUCH_ZOOM_ROTATE) && (this._rotateInternal(N, y), this._isUserControllingRotate = !0), (this._state & H.DOLLY) === H.DOLLY || (this._state & H.ZOOM) === H.ZOOM) {
|
|
4018
4018
|
const M = this.dollyToCursor ? (e.x - this._elementRect.x) / this._elementRect.width * 2 - 1 : 0, L = this.dollyToCursor ? (e.y - this._elementRect.y) / this._elementRect.height * -2 + 1 : 0, b = this.dollyDragInverted ? -1 : 1;
|
|
4019
|
-
(this._state & H.DOLLY) === H.DOLLY ? (this._dollyInternal(b * y *
|
|
4019
|
+
(this._state & H.DOLLY) === H.DOLLY ? (this._dollyInternal(b * y * rs, M, L), this._isUserControllingDolly = !0) : (this._zoomInternal(b * y * rs, M, L), this._isUserControllingZoom = !0);
|
|
4020
4020
|
}
|
|
4021
4021
|
if ((this._state & H.TOUCH_DOLLY) === H.TOUCH_DOLLY || (this._state & H.TOUCH_ZOOM) === H.TOUCH_ZOOM || (this._state & H.TOUCH_DOLLY_TRUCK) === H.TOUCH_DOLLY_TRUCK || (this._state & H.TOUCH_ZOOM_TRUCK) === H.TOUCH_ZOOM_TRUCK || (this._state & H.TOUCH_DOLLY_OFFSET) === H.TOUCH_DOLLY_OFFSET || (this._state & H.TOUCH_ZOOM_OFFSET) === H.TOUCH_ZOOM_OFFSET || (this._state & H.TOUCH_DOLLY_ROTATE) === H.TOUCH_DOLLY_ROTATE || (this._state & H.TOUCH_ZOOM_ROTATE) === H.TOUCH_ZOOM_ROTATE) {
|
|
4022
|
-
const M = Yt.x - this._activePointers[1].clientX, L = Yt.y - this._activePointers[1].clientY, b = Math.sqrt(M * M + L * L),
|
|
4022
|
+
const M = Yt.x - this._activePointers[1].clientX, L = Yt.y - this._activePointers[1].clientY, b = Math.sqrt(M * M + L * L), Y = n.y - b;
|
|
4023
4023
|
n.set(0, b);
|
|
4024
4024
|
const O = this.dollyToCursor ? (s.x - this._elementRect.x) / this._elementRect.width * 2 - 1 : 0, w = this.dollyToCursor ? (s.y - this._elementRect.y) / this._elementRect.height * -2 + 1 : 0;
|
|
4025
|
-
(this._state & H.TOUCH_DOLLY) === H.TOUCH_DOLLY || (this._state & H.TOUCH_DOLLY_ROTATE) === H.TOUCH_DOLLY_ROTATE || (this._state & H.TOUCH_DOLLY_TRUCK) === H.TOUCH_DOLLY_TRUCK || (this._state & H.TOUCH_DOLLY_OFFSET) === H.TOUCH_DOLLY_OFFSET ? (this._dollyInternal(
|
|
4025
|
+
(this._state & H.TOUCH_DOLLY) === H.TOUCH_DOLLY || (this._state & H.TOUCH_DOLLY_ROTATE) === H.TOUCH_DOLLY_ROTATE || (this._state & H.TOUCH_DOLLY_TRUCK) === H.TOUCH_DOLLY_TRUCK || (this._state & H.TOUCH_DOLLY_OFFSET) === H.TOUCH_DOLLY_OFFSET ? (this._dollyInternal(Y * rs, O, w), this._isUserControllingDolly = !0) : (this._zoomInternal(Y * rs, O, w), this._isUserControllingZoom = !0);
|
|
4026
4026
|
}
|
|
4027
4027
|
((this._state & H.TRUCK) === H.TRUCK || (this._state & H.TOUCH_TRUCK) === H.TOUCH_TRUCK || (this._state & H.TOUCH_DOLLY_TRUCK) === H.TOUCH_DOLLY_TRUCK || (this._state & H.TOUCH_ZOOM_TRUCK) === H.TOUCH_ZOOM_TRUCK) && (this._truckInternal(N, y, !1), this._isUserControllingTruck = !0), ((this._state & H.OFFSET) === H.OFFSET || (this._state & H.TOUCH_OFFSET) === H.TOUCH_OFFSET || (this._state & H.TOUCH_DOLLY_OFFSET) === H.TOUCH_DOLLY_OFFSET || (this._state & H.TOUCH_ZOOM_OFFSET) === H.TOUCH_ZOOM_OFFSET) && (this._truckInternal(N, y, !0), this._isUserControllingOffset = !0), this.dispatchEvent({ type: "control" });
|
|
4028
4028
|
}, p = () => {
|
|
@@ -4283,7 +4283,7 @@ class vt extends ic {
|
|
|
4283
4283
|
* @category Methods
|
|
4284
4284
|
*/
|
|
4285
4285
|
dollyTo(i, t = !1) {
|
|
4286
|
-
return this._isUserControllingDolly = !1, this._lastDollyDirection =
|
|
4286
|
+
return this._isUserControllingDolly = !1, this._lastDollyDirection = Ke.NONE, this._changedDolly = 0, this._dollyToNoClamp(Jt(i, this.minDistance, this.maxDistance), t);
|
|
4287
4287
|
}
|
|
4288
4288
|
_dollyToNoClamp(i, t = !1) {
|
|
4289
4289
|
const e = this._sphericalEnd.radius;
|
|
@@ -4306,7 +4306,7 @@ class vt extends ic {
|
|
|
4306
4306
|
* @category Methods
|
|
4307
4307
|
*/
|
|
4308
4308
|
dollyInFixed(i, t = !1) {
|
|
4309
|
-
this._targetEnd.add(this._getCameraDirection(
|
|
4309
|
+
this._targetEnd.add(this._getCameraDirection(Fi).multiplyScalar(i)), t || this._target.copy(this._targetEnd);
|
|
4310
4310
|
const e = !t || pt(this._target.x, this._targetEnd.x, this.restThreshold) && pt(this._target.y, this._targetEnd.y, this.restThreshold) && pt(this._target.z, this._targetEnd.z, this.restThreshold);
|
|
4311
4311
|
return this._createOnRestPromise(e);
|
|
4312
4312
|
}
|
|
@@ -4413,16 +4413,16 @@ class vt extends ic {
|
|
|
4413
4413
|
* @category Methods
|
|
4414
4414
|
*/
|
|
4415
4415
|
fitToBox(i, t, { cover: e = !1, paddingLeft: s = 0, paddingRight: n = 0, paddingBottom: r = 0, paddingTop: o = 0 } = {}) {
|
|
4416
|
-
const a = [], l = i.isBox3 ?
|
|
4416
|
+
const a = [], l = i.isBox3 ? ei.copy(i) : ei.setFromObject(i);
|
|
4417
4417
|
l.isEmpty() && (console.warn("camera-controls: fitTo() cannot be used with an empty box. Aborting"), Promise.resolve());
|
|
4418
4418
|
const h = Tr(this._sphericalEnd.theta, Cr), f = Tr(this._sphericalEnd.phi, Cr);
|
|
4419
4419
|
a.push(this.rotateTo(h, f, t));
|
|
4420
4420
|
const I = ut.setFromSpherical(this._sphericalEnd).normalize(), u = Sr.setFromUnitVectors(I, an), d = pt(Math.abs(I.y), 1);
|
|
4421
|
-
d && u.multiply(ln.setFromAxisAngle(
|
|
4421
|
+
d && u.multiply(ln.setFromAxisAngle(os, h)), u.multiply(this._yAxisUpSpaceInverse);
|
|
4422
4422
|
const E = Fr.makeEmpty();
|
|
4423
4423
|
Et.copy(l.min).applyQuaternion(u), E.expandByPoint(Et), Et.copy(l.min).setX(l.max.x).applyQuaternion(u), E.expandByPoint(Et), Et.copy(l.min).setY(l.max.y).applyQuaternion(u), E.expandByPoint(Et), Et.copy(l.max).setZ(l.min.z).applyQuaternion(u), E.expandByPoint(Et), Et.copy(l.min).setZ(l.max.z).applyQuaternion(u), E.expandByPoint(Et), Et.copy(l.max).setY(l.min.y).applyQuaternion(u), E.expandByPoint(Et), Et.copy(l.max).setX(l.min.x).applyQuaternion(u), E.expandByPoint(Et), Et.copy(l.max).applyQuaternion(u), E.expandByPoint(Et), E.min.x -= s, E.min.y -= r, E.max.x += n, E.max.y += o, u.setFromUnitVectors(an, I), d && u.premultiply(ln.invert()), u.premultiply(this._yAxisUpSpace);
|
|
4424
4424
|
const T = E.getSize(ut), p = E.getCenter(Et).applyQuaternion(u);
|
|
4425
|
-
if (
|
|
4425
|
+
if (ve(this._camera)) {
|
|
4426
4426
|
const m = this.getDistanceToFitBox(T.x, T.y, T.z, e);
|
|
4427
4427
|
a.push(this.moveTo(p.x, p.y, p.z, t)), a.push(this.dollyTo(m, t)), a.push(this.setFocalOffset(0, 0, 0, t));
|
|
4428
4428
|
} else if (Oe(this._camera)) {
|
|
@@ -4439,7 +4439,7 @@ class vt extends ic {
|
|
|
4439
4439
|
*/
|
|
4440
4440
|
fitToSphere(i, t) {
|
|
4441
4441
|
const e = [], n = i instanceof lt.Sphere ? cn.copy(i) : vt.createBoundingSphere(i, cn);
|
|
4442
|
-
if (e.push(this.moveTo(n.center.x, n.center.y, n.center.z, t)),
|
|
4442
|
+
if (e.push(this.moveTo(n.center.x, n.center.y, n.center.z, t)), ve(this._camera)) {
|
|
4443
4443
|
const r = this.getDistanceToFitSphere(n.radius);
|
|
4444
4444
|
e.push(this.dollyTo(r, t));
|
|
4445
4445
|
} else if (Oe(this._camera)) {
|
|
@@ -4460,7 +4460,7 @@ class vt extends ic {
|
|
|
4460
4460
|
* @category Methods
|
|
4461
4461
|
*/
|
|
4462
4462
|
setLookAt(i, t, e, s, n, r, o = !1) {
|
|
4463
|
-
this._isUserControllingRotate = !1, this._isUserControllingDolly = !1, this._isUserControllingTruck = !1, this._lastDollyDirection =
|
|
4463
|
+
this._isUserControllingRotate = !1, this._isUserControllingDolly = !1, this._isUserControllingTruck = !1, this._lastDollyDirection = Ke.NONE, this._changedDolly = 0;
|
|
4464
4464
|
const a = Et.set(s, n, r), l = ut.set(i, t, e);
|
|
4465
4465
|
this._targetEnd.copy(a), this._sphericalEnd.setFromVector3(l.sub(a).applyQuaternion(this._yAxisUpSpace)), this.normalizeRotations(), this._needsUpdate = !0, o || (this._target.copy(this._targetEnd), this._spherical.copy(this._sphericalEnd));
|
|
4466
4466
|
const h = !o || pt(this._target.x, this._targetEnd.x, this.restThreshold) && pt(this._target.y, this._targetEnd.y, this.restThreshold) && pt(this._target.z, this._targetEnd.z, this.restThreshold) && pt(this._spherical.theta, this._sphericalEnd.theta, this.restThreshold) && pt(this._spherical.phi, this._sphericalEnd.phi, this.restThreshold) && pt(this._spherical.radius, this._sphericalEnd.radius, this.restThreshold);
|
|
@@ -4485,12 +4485,12 @@ class vt extends ic {
|
|
|
4485
4485
|
* @category Methods
|
|
4486
4486
|
*/
|
|
4487
4487
|
lerpLookAt(i, t, e, s, n, r, o, a, l, h, f, I, u, d = !1) {
|
|
4488
|
-
this._isUserControllingRotate = !1, this._isUserControllingDolly = !1, this._isUserControllingTruck = !1, this._lastDollyDirection =
|
|
4488
|
+
this._isUserControllingRotate = !1, this._isUserControllingDolly = !1, this._isUserControllingTruck = !1, this._lastDollyDirection = Ke.NONE, this._changedDolly = 0;
|
|
4489
4489
|
const E = ut.set(s, n, r), T = Et.set(i, t, e);
|
|
4490
4490
|
Xt.setFromVector3(T.sub(E).applyQuaternion(this._yAxisUpSpace));
|
|
4491
|
-
const p =
|
|
4492
|
-
|
|
4493
|
-
const F =
|
|
4491
|
+
const p = ti.set(h, f, I), m = Et.set(o, a, l);
|
|
4492
|
+
Si.setFromVector3(m.sub(p).applyQuaternion(this._yAxisUpSpace)), this._targetEnd.copy(E.lerp(p, u));
|
|
4493
|
+
const F = Si.theta - Xt.theta, R = Si.phi - Xt.phi, S = Si.radius - Xt.radius;
|
|
4494
4494
|
this._sphericalEnd.set(Xt.radius + S * u, Xt.phi + R * u, Xt.theta + F * u), this.normalizeRotations(), this._needsUpdate = !0, d || (this._target.copy(this._targetEnd), this._spherical.copy(this._sphericalEnd));
|
|
4495
4495
|
const N = !d || pt(this._target.x, this._targetEnd.x, this.restThreshold) && pt(this._target.y, this._targetEnd.y, this.restThreshold) && pt(this._target.z, this._targetEnd.z, this.restThreshold) && pt(this._spherical.theta, this._sphericalEnd.theta, this.restThreshold) && pt(this._spherical.phi, this._sphericalEnd.phi, this.restThreshold) && pt(this._spherical.radius, this._sphericalEnd.radius, this.restThreshold);
|
|
4496
4496
|
return this._createOnRestPromise(N);
|
|
@@ -4542,9 +4542,9 @@ class vt extends ic {
|
|
|
4542
4542
|
* @category Methods
|
|
4543
4543
|
*/
|
|
4544
4544
|
setOrbitPoint(i, t, e) {
|
|
4545
|
-
this._camera.updateMatrixWorld(), le.setFromMatrixColumn(this._camera.matrixWorldInverse, 0), he.setFromMatrixColumn(this._camera.matrixWorldInverse, 1),
|
|
4545
|
+
this._camera.updateMatrixWorld(), le.setFromMatrixColumn(this._camera.matrixWorldInverse, 0), he.setFromMatrixColumn(this._camera.matrixWorldInverse, 1), Ue.setFromMatrixColumn(this._camera.matrixWorldInverse, 2);
|
|
4546
4546
|
const s = ut.set(i, t, e), n = s.distanceTo(this._camera.position), r = s.sub(this._camera.position);
|
|
4547
|
-
le.multiplyScalar(r.x), he.multiplyScalar(r.y),
|
|
4547
|
+
le.multiplyScalar(r.x), he.multiplyScalar(r.y), Ue.multiplyScalar(r.z), ut.copy(le).add(he).add(Ue), ut.z = ut.z + n, this.dollyTo(n, !1), this.setFocalOffset(-ut.x, ut.y, -ut.z, !1), this.moveTo(i, t, e, !1);
|
|
4548
4548
|
}
|
|
4549
4549
|
/**
|
|
4550
4550
|
* Set the boundary box that encloses the target of the camera. box3 is in THREE.Box3
|
|
@@ -4585,7 +4585,7 @@ class vt extends ic {
|
|
|
4585
4585
|
getDistanceToFitBox(i, t, e, s = !1) {
|
|
4586
4586
|
if (on(this._camera, "getDistanceToFitBox"))
|
|
4587
4587
|
return this._spherical.radius;
|
|
4588
|
-
const n = i / t, r = this._camera.getEffectiveFOV() *
|
|
4588
|
+
const n = i / t, r = this._camera.getEffectiveFOV() * Ri, o = this._camera.aspect;
|
|
4589
4589
|
return ((s ? n > o : n < o) ? t : i / o) * 0.5 / Math.tan(r * 0.5) + e * 0.5;
|
|
4590
4590
|
}
|
|
4591
4591
|
/**
|
|
@@ -4597,7 +4597,7 @@ class vt extends ic {
|
|
|
4597
4597
|
getDistanceToFitSphere(i) {
|
|
4598
4598
|
if (on(this._camera, "getDistanceToFitSphere"))
|
|
4599
4599
|
return this._spherical.radius;
|
|
4600
|
-
const t = this._camera.getEffectiveFOV() *
|
|
4600
|
+
const t = this._camera.getEffectiveFOV() * Ri, e = Math.atan(Math.tan(t * 0.5) * this._camera.aspect) * 2, s = 1 < this._camera.aspect ? t : e;
|
|
4601
4601
|
return i / Math.sin(s * 0.5);
|
|
4602
4602
|
}
|
|
4603
4603
|
/**
|
|
@@ -4641,7 +4641,7 @@ class vt extends ic {
|
|
|
4641
4641
|
* @category Methods
|
|
4642
4642
|
*/
|
|
4643
4643
|
normalizeRotations() {
|
|
4644
|
-
this._sphericalEnd.theta = this._sphericalEnd.theta %
|
|
4644
|
+
this._sphericalEnd.theta = this._sphericalEnd.theta % Je, this._sphericalEnd.theta < 0 && (this._sphericalEnd.theta += Je), this._spherical.theta += Je * Math.round((this._sphericalEnd.theta - this._spherical.theta) / Je);
|
|
4645
4645
|
}
|
|
4646
4646
|
/**
|
|
4647
4647
|
* Reset all rotation and position to defaults.
|
|
@@ -4674,7 +4674,7 @@ class vt extends ic {
|
|
|
4674
4674
|
* @category Methods
|
|
4675
4675
|
*/
|
|
4676
4676
|
updateCameraUp() {
|
|
4677
|
-
this._yAxisUpSpace.setFromUnitVectors(this._camera.up,
|
|
4677
|
+
this._yAxisUpSpace.setFromUnitVectors(this._camera.up, os), this._yAxisUpSpaceInverse.copy(this._yAxisUpSpace).invert();
|
|
4678
4678
|
}
|
|
4679
4679
|
/**
|
|
4680
4680
|
* Apply current camera-up direction to the camera.
|
|
@@ -4700,19 +4700,19 @@ class vt extends ic {
|
|
|
4700
4700
|
this._thetaVelocity.value = 0, this._spherical.theta = this._sphericalEnd.theta;
|
|
4701
4701
|
else {
|
|
4702
4702
|
const f = this._isUserControllingRotate ? this.draggingSmoothTime : this.smoothTime;
|
|
4703
|
-
this._spherical.theta =
|
|
4703
|
+
this._spherical.theta = ns(this._spherical.theta, this._sphericalEnd.theta, this._thetaVelocity, f, 1 / 0, i), this._needsUpdate = !0;
|
|
4704
4704
|
}
|
|
4705
4705
|
if (gt(e))
|
|
4706
4706
|
this._phiVelocity.value = 0, this._spherical.phi = this._sphericalEnd.phi;
|
|
4707
4707
|
else {
|
|
4708
4708
|
const f = this._isUserControllingRotate ? this.draggingSmoothTime : this.smoothTime;
|
|
4709
|
-
this._spherical.phi =
|
|
4709
|
+
this._spherical.phi = ns(this._spherical.phi, this._sphericalEnd.phi, this._phiVelocity, f, 1 / 0, i), this._needsUpdate = !0;
|
|
4710
4710
|
}
|
|
4711
4711
|
if (gt(s))
|
|
4712
4712
|
this._radiusVelocity.value = 0, this._spherical.radius = this._sphericalEnd.radius;
|
|
4713
4713
|
else {
|
|
4714
4714
|
const f = this._isUserControllingDolly ? this.draggingSmoothTime : this.smoothTime;
|
|
4715
|
-
this._spherical.radius =
|
|
4715
|
+
this._spherical.radius = ns(this._spherical.radius, this._sphericalEnd.radius, this._radiusVelocity, f, this.maxSpeed, i), this._needsUpdate = !0;
|
|
4716
4716
|
}
|
|
4717
4717
|
if (gt(n.x) && gt(n.y) && gt(n.z))
|
|
4718
4718
|
this._targetVelocity.set(0, 0, 0), this._target.copy(this._targetEnd);
|
|
@@ -4730,13 +4730,13 @@ class vt extends ic {
|
|
|
4730
4730
|
this._zoomVelocity.value = 0, this._zoom = this._zoomEnd;
|
|
4731
4731
|
else {
|
|
4732
4732
|
const f = this._isUserControllingZoom ? this.draggingSmoothTime : this.smoothTime;
|
|
4733
|
-
this._zoom =
|
|
4733
|
+
this._zoom = ns(this._zoom, this._zoomEnd, this._zoomVelocity, f, 1 / 0, i);
|
|
4734
4734
|
}
|
|
4735
4735
|
if (this.dollyToCursor) {
|
|
4736
|
-
if (
|
|
4737
|
-
const f = this._spherical.radius - this._lastDistance, I = this._camera, u = this._getCameraDirection(
|
|
4736
|
+
if (ve(this._camera) && this._changedDolly !== 0) {
|
|
4737
|
+
const f = this._spherical.radius - this._lastDistance, I = this._camera, u = this._getCameraDirection(Fi), d = ut.copy(u).cross(I.up).normalize();
|
|
4738
4738
|
d.lengthSq() === 0 && (d.x = 1);
|
|
4739
|
-
const E = Et.crossVectors(d, u), T = this._sphericalEnd.radius * Math.tan(I.getEffectiveFOV() *
|
|
4739
|
+
const E = Et.crossVectors(d, u), T = this._sphericalEnd.radius * Math.tan(I.getEffectiveFOV() * Ri * 0.5), m = (this._sphericalEnd.radius - f - this._sphericalEnd.radius) / this._sphericalEnd.radius, F = ti.copy(this._targetEnd).add(d.multiplyScalar(this._dollyControlCoord.x * T * I.aspect)).add(E.multiplyScalar(this._dollyControlCoord.y * T)), R = ut.copy(this._targetEnd).lerp(F, m), S = this._lastDollyDirection === Ke.IN && this._spherical.radius <= this.minDistance, N = this._lastDollyDirection === Ke.OUT && this.maxDistance <= this._spherical.radius;
|
|
4740
4740
|
if (this.infinityDolly && (S || N)) {
|
|
4741
4741
|
this._sphericalEnd.radius -= f, this._spherical.radius -= f;
|
|
4742
4742
|
const M = Et.copy(u).multiplyScalar(-f);
|
|
@@ -4746,7 +4746,7 @@ class vt extends ic {
|
|
|
4746
4746
|
const y = Et.subVectors(R, this._targetEnd);
|
|
4747
4747
|
this._targetEnd.copy(R), this._target.add(y), this._changedDolly -= f, gt(this._changedDolly) && (this._changedDolly = 0);
|
|
4748
4748
|
} else if (Oe(this._camera) && this._changedZoom !== 0) {
|
|
4749
|
-
const f = this._zoom - this._lastZoom, I = this._camera, u = ut.set(this._dollyControlCoord.x, this._dollyControlCoord.y, (I.near + I.far) / (I.near - I.far)).unproject(I), d = Et.set(0, 0, -1).applyQuaternion(I.quaternion), E =
|
|
4749
|
+
const f = this._zoom - this._lastZoom, I = this._camera, u = ut.set(this._dollyControlCoord.x, this._dollyControlCoord.y, (I.near + I.far) / (I.near - I.far)).unproject(I), d = Et.set(0, 0, -1).applyQuaternion(I.quaternion), E = ti.copy(u).add(d.multiplyScalar(-u.dot(I.up))), p = -(this._zoom - f - this._zoom) / this._zoom, m = this._getCameraDirection(Fi), F = this._targetEnd.dot(m), R = ut.copy(this._targetEnd).lerp(E, p), S = R.dot(m), N = m.multiplyScalar(S - F);
|
|
4750
4750
|
R.sub(N), this._boundary.clampPoint(R, R);
|
|
4751
4751
|
const y = Et.subVectors(R, this._targetEnd);
|
|
4752
4752
|
this._targetEnd.copy(R), this._target.add(y), this._changedZoom -= f, gt(this._changedZoom) && (this._changedZoom = 0);
|
|
@@ -4754,7 +4754,7 @@ class vt extends ic {
|
|
|
4754
4754
|
}
|
|
4755
4755
|
this._camera.zoom !== this._zoom && (this._camera.zoom = this._zoom, this._camera.updateProjectionMatrix(), this._updateNearPlaneCorners(), this._needsUpdate = !0), this._dragNeedsUpdate = !0;
|
|
4756
4756
|
const a = this._collisionTest();
|
|
4757
|
-
this._spherical.radius = Math.min(this._spherical.radius, a), this._spherical.makeSafe(), this._camera.position.setFromSpherical(this._spherical).applyQuaternion(this._yAxisUpSpaceInverse).add(this._target), this._camera.lookAt(this._target), (!gt(this._focalOffset.x) || !gt(this._focalOffset.y) || !gt(this._focalOffset.z)) && (this._camera.updateMatrixWorld(), le.setFromMatrixColumn(this._camera.matrix, 0), he.setFromMatrixColumn(this._camera.matrix, 1),
|
|
4757
|
+
this._spherical.radius = Math.min(this._spherical.radius, a), this._spherical.makeSafe(), this._camera.position.setFromSpherical(this._spherical).applyQuaternion(this._yAxisUpSpaceInverse).add(this._target), this._camera.lookAt(this._target), (!gt(this._focalOffset.x) || !gt(this._focalOffset.y) || !gt(this._focalOffset.z)) && (this._camera.updateMatrixWorld(), le.setFromMatrixColumn(this._camera.matrix, 0), he.setFromMatrixColumn(this._camera.matrix, 1), Ue.setFromMatrixColumn(this._camera.matrix, 2), le.multiplyScalar(this._focalOffset.x), he.multiplyScalar(-this._focalOffset.y), Ue.multiplyScalar(this._focalOffset.z), ut.copy(le).add(he).add(Ue), this._camera.position.add(ut)), this._boundaryEnclosesCamera && this._encloseToBoundary(this._camera.position.copy(this._target), ut.setFromSpherical(this._spherical).applyQuaternion(this._yAxisUpSpaceInverse), 1);
|
|
4758
4758
|
const h = this._needsUpdate;
|
|
4759
4759
|
return h && !this._updatedLastTime ? (this._hasRested = !1, this.dispatchEvent({ type: "wake" }), this.dispatchEvent({ type: "update" })) : h ? (this.dispatchEvent({ type: "update" }), gt(t, this.restThreshold) && gt(e, this.restThreshold) && gt(s, this.restThreshold) && gt(n.x, this.restThreshold) && gt(n.y, this.restThreshold) && gt(n.z, this.restThreshold) && gt(r.x, this.restThreshold) && gt(r.y, this.restThreshold) && gt(r.z, this.restThreshold) && gt(o, this.restThreshold) && !this._hasRested && (this._hasRested = !0, this.dispatchEvent({ type: "rest" }))) : !h && this._updatedLastTime && this.dispatchEvent({ type: "sleep" }), this._lastDistance = this._spherical.radius, this._lastZoom = this._zoom, this._updatedLastTime = h, this._needsUpdate = !1, h;
|
|
4760
4760
|
}
|
|
@@ -4766,13 +4766,13 @@ class vt extends ic {
|
|
|
4766
4766
|
return JSON.stringify({
|
|
4767
4767
|
enabled: this._enabled,
|
|
4768
4768
|
minDistance: this.minDistance,
|
|
4769
|
-
maxDistance:
|
|
4769
|
+
maxDistance: gi(this.maxDistance),
|
|
4770
4770
|
minZoom: this.minZoom,
|
|
4771
|
-
maxZoom:
|
|
4771
|
+
maxZoom: gi(this.maxZoom),
|
|
4772
4772
|
minPolarAngle: this.minPolarAngle,
|
|
4773
|
-
maxPolarAngle:
|
|
4774
|
-
minAzimuthAngle:
|
|
4775
|
-
maxAzimuthAngle:
|
|
4773
|
+
maxPolarAngle: gi(this.maxPolarAngle),
|
|
4774
|
+
minAzimuthAngle: gi(this.minAzimuthAngle),
|
|
4775
|
+
maxAzimuthAngle: gi(this.maxAzimuthAngle),
|
|
4776
4776
|
smoothTime: this.smoothTime,
|
|
4777
4777
|
draggingSmoothTime: this.draggingSmoothTime,
|
|
4778
4778
|
dollySpeed: this.dollySpeed,
|
|
@@ -4797,7 +4797,7 @@ class vt extends ic {
|
|
|
4797
4797
|
*/
|
|
4798
4798
|
fromJSON(i, t = !1) {
|
|
4799
4799
|
const e = JSON.parse(i);
|
|
4800
|
-
this.enabled = e.enabled, this.minDistance = e.minDistance, this.maxDistance =
|
|
4800
|
+
this.enabled = e.enabled, this.minDistance = e.minDistance, this.maxDistance = Ai(e.maxDistance), this.minZoom = e.minZoom, this.maxZoom = Ai(e.maxZoom), this.minPolarAngle = e.minPolarAngle, this.maxPolarAngle = Ai(e.maxPolarAngle), this.minAzimuthAngle = Ai(e.minAzimuthAngle), this.maxAzimuthAngle = Ai(e.maxAzimuthAngle), this.smoothTime = e.smoothTime, this.draggingSmoothTime = e.draggingSmoothTime, this.dollySpeed = e.dollySpeed, this.truckSpeed = e.truckSpeed, this.dollyToCursor = e.dollyToCursor, this.verticalDragToForward = e.verticalDragToForward, this._target0.fromArray(e.target0), this._position0.fromArray(e.position0), this._zoom0 = e.zoom0, this._focalOffset0.fromArray(e.focalOffset0), this.moveTo(e.target[0], e.target[1], e.target[2], t), Xt.setFromVector3(ut.fromArray(e.position).sub(this._targetEnd).applyQuaternion(this._yAxisUpSpace)), this.rotateTo(Xt.theta, Xt.phi, t), this.dollyTo(Xt.radius, t), this.zoomTo(e.zoom, t), this.setFocalOffset(e.focalOffset[0], e.focalOffset[1], e.focalOffset[2], t), this._needsUpdate = !0;
|
|
4801
4801
|
}
|
|
4802
4802
|
/**
|
|
4803
4803
|
* Attach all internal event handlers to enable drag control.
|
|
@@ -4844,7 +4844,7 @@ class vt extends ic {
|
|
|
4844
4844
|
const s = t.lengthSq();
|
|
4845
4845
|
if (s === 0)
|
|
4846
4846
|
return i;
|
|
4847
|
-
const n = Et.copy(t).add(i), o = this._boundary.clampPoint(n,
|
|
4847
|
+
const n = Et.copy(t).add(i), o = this._boundary.clampPoint(n, ti).sub(n), a = o.lengthSq();
|
|
4848
4848
|
if (a === 0)
|
|
4849
4849
|
return i.add(t);
|
|
4850
4850
|
if (a === s)
|
|
@@ -4857,8 +4857,8 @@ class vt extends ic {
|
|
|
4857
4857
|
}
|
|
4858
4858
|
}
|
|
4859
4859
|
_updateNearPlaneCorners() {
|
|
4860
|
-
if (
|
|
4861
|
-
const i = this._camera, t = i.near, e = i.getEffectiveFOV() *
|
|
4860
|
+
if (ve(this._camera)) {
|
|
4861
|
+
const i = this._camera, t = i.near, e = i.getEffectiveFOV() * Ri, s = Math.tan(e * 0.5) * t, n = s * i.aspect;
|
|
4862
4862
|
this._nearPlaneCorners[0].set(-n, -s, 0), this._nearPlaneCorners[1].set(n, -s, 0), this._nearPlaneCorners[2].set(n, s, 0), this._nearPlaneCorners[3].set(-n, s, 0);
|
|
4863
4863
|
} else if (Oe(this._camera)) {
|
|
4864
4864
|
const i = this._camera, t = 1 / i.zoom, e = i.left * t, s = i.right * t, n = i.top * t, r = i.bottom * t;
|
|
@@ -4870,14 +4870,14 @@ class vt extends ic {
|
|
|
4870
4870
|
let i = 1 / 0;
|
|
4871
4871
|
if (!(this.colliderMeshes.length >= 1) || on(this._camera, "_collisionTest"))
|
|
4872
4872
|
return i;
|
|
4873
|
-
const e = this._getTargetDirection(
|
|
4873
|
+
const e = this._getTargetDirection(Fi);
|
|
4874
4874
|
hn.lookAt(Rr, e, this._camera.up);
|
|
4875
4875
|
for (let s = 0; s < 4; s++) {
|
|
4876
4876
|
const n = Et.copy(this._nearPlaneCorners[s]);
|
|
4877
4877
|
n.applyMatrix4(hn);
|
|
4878
|
-
const r =
|
|
4879
|
-
|
|
4880
|
-
const o =
|
|
4878
|
+
const r = ti.addVectors(this._target, n);
|
|
4879
|
+
as.set(r, e), as.far = this._spherical.radius + 1;
|
|
4880
|
+
const o = as.intersectObjects(this.colliderMeshes);
|
|
4881
4881
|
o.length !== 0 && o[0].distance < i && (i = o[0].distance);
|
|
4882
4882
|
}
|
|
4883
4883
|
return i;
|
|
@@ -4938,9 +4938,9 @@ class vt extends ic {
|
|
|
4938
4938
|
}
|
|
4939
4939
|
static createBoundingSphere(i, t = new lt.Sphere()) {
|
|
4940
4940
|
const e = t, s = e.center;
|
|
4941
|
-
|
|
4942
|
-
r.isMesh &&
|
|
4943
|
-
}),
|
|
4941
|
+
ei.makeEmpty(), i.traverseVisible((r) => {
|
|
4942
|
+
r.isMesh && ei.expandByObject(r);
|
|
4943
|
+
}), ei.getCenter(s);
|
|
4944
4944
|
let n = 0;
|
|
4945
4945
|
return i.traverseVisible((r) => {
|
|
4946
4946
|
if (!r.isMesh)
|
|
@@ -4953,20 +4953,20 @@ class vt extends ic {
|
|
|
4953
4953
|
}), e.radius = Math.sqrt(n), e;
|
|
4954
4954
|
}
|
|
4955
4955
|
}
|
|
4956
|
-
class
|
|
4956
|
+
class xi extends Va {
|
|
4957
4957
|
constructor(t) {
|
|
4958
4958
|
super(t);
|
|
4959
4959
|
/** {@link Updateable.onBeforeUpdate} */
|
|
4960
|
-
C(this, "onBeforeUpdate", new
|
|
4960
|
+
C(this, "onBeforeUpdate", new j());
|
|
4961
4961
|
/** {@link Updateable.onAfterUpdate} */
|
|
4962
|
-
C(this, "onAfterUpdate", new
|
|
4962
|
+
C(this, "onAfterUpdate", new j());
|
|
4963
4963
|
/**
|
|
4964
4964
|
* Event that is triggered when the aspect of the camera has been updated.
|
|
4965
4965
|
* This event is useful when you need to perform actions after the aspect of the camera has been changed.
|
|
4966
4966
|
*/
|
|
4967
|
-
C(this, "onAspectUpdated", new
|
|
4967
|
+
C(this, "onAspectUpdated", new j());
|
|
4968
4968
|
/** {@link Disposable.onDisposed} */
|
|
4969
|
-
C(this, "onDisposed", new
|
|
4969
|
+
C(this, "onDisposed", new j());
|
|
4970
4970
|
/**
|
|
4971
4971
|
* A three.js PerspectiveCamera or OrthographicCamera instance.
|
|
4972
4972
|
* This camera is used for rendering the scene.
|
|
@@ -5053,7 +5053,7 @@ class Ui extends Va {
|
|
|
5053
5053
|
throw new Error("This camera needs a world to work!");
|
|
5054
5054
|
if (!this.currentWorld.renderer)
|
|
5055
5055
|
throw new Error("This camera needs a renderer to work!");
|
|
5056
|
-
vt.install({ THREE:
|
|
5056
|
+
vt.install({ THREE: xi.getSubsetOfThree() });
|
|
5057
5057
|
const { domElement: t } = this.currentWorld.renderer.three, e = new vt(this.three, t);
|
|
5058
5058
|
return e.smoothTime = 0.2, e.dollyToCursor = !0, e.infinityDolly = !0, e.minDistance = 6, e;
|
|
5059
5059
|
}
|
|
@@ -5080,11 +5080,11 @@ const Os = class Os extends At {
|
|
|
5080
5080
|
constructor(t) {
|
|
5081
5081
|
super(t);
|
|
5082
5082
|
/** {@link Updateable.onAfterUpdate} */
|
|
5083
|
-
C(this, "onAfterUpdate", new
|
|
5083
|
+
C(this, "onAfterUpdate", new j());
|
|
5084
5084
|
/** {@link Updateable.onBeforeUpdate} */
|
|
5085
|
-
C(this, "onBeforeUpdate", new
|
|
5085
|
+
C(this, "onBeforeUpdate", new j());
|
|
5086
5086
|
/** {@link Disposable.onDisposed} */
|
|
5087
|
-
C(this, "onDisposed", new
|
|
5087
|
+
C(this, "onDisposed", new j());
|
|
5088
5088
|
/**
|
|
5089
5089
|
* A collection of worlds managed by this component.
|
|
5090
5090
|
* The key is the unique identifier (UUID) of the world, and the value is the World instance.
|
|
@@ -5170,7 +5170,7 @@ async function so(c, i, t, e, s, n, r, o) {
|
|
|
5170
5170
|
const a = c.createBuffer();
|
|
5171
5171
|
return c.bindBuffer(c.PIXEL_PACK_BUFFER, a), c.bufferData(c.PIXEL_PACK_BUFFER, o.byteLength, c.STREAM_READ), c.readPixels(i, t, e, s, n, r, 0), c.bindBuffer(c.PIXEL_PACK_BUFFER, null), await ac(c, c.PIXEL_PACK_BUFFER, a, 0, o), c.deleteBuffer(a), o;
|
|
5172
5172
|
}
|
|
5173
|
-
class cc extends
|
|
5173
|
+
class cc extends Ge {
|
|
5174
5174
|
constructor() {
|
|
5175
5175
|
super(...arguments);
|
|
5176
5176
|
C(this, "_config", {
|
|
@@ -5288,15 +5288,15 @@ class cc extends Ye {
|
|
|
5288
5288
|
class lc {
|
|
5289
5289
|
constructor(i, t) {
|
|
5290
5290
|
/** {@link Configurable.onSetup} */
|
|
5291
|
-
C(this, "onSetup", new
|
|
5291
|
+
C(this, "onSetup", new j());
|
|
5292
5292
|
/** {@link Disposable.onDisposed} */
|
|
5293
|
-
C(this, "onDisposed", new
|
|
5293
|
+
C(this, "onDisposed", new j());
|
|
5294
5294
|
/**
|
|
5295
5295
|
* Fires after making the visibility check to the meshes. It lists the
|
|
5296
5296
|
* meshes that are currently visible, and the ones that were visible
|
|
5297
5297
|
* just before but not anymore.
|
|
5298
5298
|
*/
|
|
5299
|
-
C(this, "onViewUpdated", new
|
|
5299
|
+
C(this, "onViewUpdated", new Pe());
|
|
5300
5300
|
/**
|
|
5301
5301
|
* Whether this renderer is active or not. If not, it won't render anything.
|
|
5302
5302
|
*/
|
|
@@ -5401,7 +5401,7 @@ class lc {
|
|
|
5401
5401
|
}
|
|
5402
5402
|
/** {@link Disposable.dispose} */
|
|
5403
5403
|
dispose() {
|
|
5404
|
-
this.enabled = !1, this.config.autoUpdate = !1, this.components.get(
|
|
5404
|
+
this.enabled = !1, this.config.autoUpdate = !1, this.components.get(Ye).list.delete(this.config.uuid);
|
|
5405
5405
|
for (const t of this.scene.children)
|
|
5406
5406
|
t.removeFromParent();
|
|
5407
5407
|
this.onViewUpdated.reset(), this.worker.terminate(), this.renderer.forceContextLoss(), this.renderer.dispose(), this.renderTarget.dispose(), this.buffer = null, this.onDisposed.reset();
|
|
@@ -5445,7 +5445,7 @@ class hc extends lc {
|
|
|
5445
5445
|
* Event triggered when the visibility of meshes is updated.
|
|
5446
5446
|
* Contains two sets: seen and unseen.
|
|
5447
5447
|
*/
|
|
5448
|
-
C(this, "onViewUpdated", new
|
|
5448
|
+
C(this, "onViewUpdated", new j());
|
|
5449
5449
|
/**
|
|
5450
5450
|
* Map of color code to THREE.InstancedMesh.
|
|
5451
5451
|
* Used to keep track of color-coded meshes.
|
|
@@ -5497,7 +5497,7 @@ class hc extends lc {
|
|
|
5497
5497
|
/** {@link Disposable.dispose} */
|
|
5498
5498
|
dispose() {
|
|
5499
5499
|
super.dispose(), this._currentVisibleMeshes.clear(), this._recentlyHiddenMeshes.clear(), this._meshIDColorCodeMap.clear(), this._transparentMat.dispose(), this._colorCodeMeshMap.clear();
|
|
5500
|
-
const t = this.components.get(
|
|
5500
|
+
const t = this.components.get(De);
|
|
5501
5501
|
for (const e in this.colorMeshes) {
|
|
5502
5502
|
const s = this.colorMeshes.get(e);
|
|
5503
5503
|
s && t.destroy(s, !0);
|
|
@@ -5548,7 +5548,7 @@ class hc extends lc {
|
|
|
5548
5548
|
return;
|
|
5549
5549
|
}
|
|
5550
5550
|
this.preventUpdate = !0;
|
|
5551
|
-
const e = this.components.get(
|
|
5551
|
+
const e = this.components.get(De);
|
|
5552
5552
|
this._currentVisibleMeshes.delete(t), this._recentlyHiddenMeshes.delete(t);
|
|
5553
5553
|
const s = this.colorMeshes.get(t.uuid), n = this._meshIDColorCodeMap.get(t.uuid);
|
|
5554
5554
|
if (!s || !n) {
|
|
@@ -5584,19 +5584,19 @@ class hc extends lc {
|
|
|
5584
5584
|
return D.ColorManagement.enabled = r, { colorMaterial: l, code: n };
|
|
5585
5585
|
}
|
|
5586
5586
|
}
|
|
5587
|
-
const
|
|
5587
|
+
const Di = class Di extends At {
|
|
5588
5588
|
constructor(t) {
|
|
5589
5589
|
super(t);
|
|
5590
5590
|
/**
|
|
5591
5591
|
* An event that is triggered when the Cullers component is disposed.
|
|
5592
5592
|
*/
|
|
5593
|
-
C(this, "onDisposed", new
|
|
5593
|
+
C(this, "onDisposed", new j());
|
|
5594
5594
|
C(this, "_enabled", !0);
|
|
5595
5595
|
/**
|
|
5596
5596
|
* A map of MeshCullerRenderer instances, keyed by their world UUIDs.
|
|
5597
5597
|
*/
|
|
5598
5598
|
C(this, "list", /* @__PURE__ */ new Map());
|
|
5599
|
-
t.add(
|
|
5599
|
+
t.add(Di.uuid, this);
|
|
5600
5600
|
}
|
|
5601
5601
|
/** {@link Component.enabled} */
|
|
5602
5602
|
get enabled() {
|
|
@@ -5636,7 +5636,7 @@ const Mi = class Mi extends At {
|
|
|
5636
5636
|
}
|
|
5637
5637
|
/** {@link Disposable.dispose} */
|
|
5638
5638
|
dispose() {
|
|
5639
|
-
this.enabled = !1, this.onDisposed.trigger(
|
|
5639
|
+
this.enabled = !1, this.onDisposed.trigger(Di.uuid), this.onDisposed.reset();
|
|
5640
5640
|
for (const [t, e] of this.list)
|
|
5641
5641
|
e.dispose();
|
|
5642
5642
|
this.list.clear();
|
|
@@ -5656,18 +5656,18 @@ const Mi = class Mi extends At {
|
|
|
5656
5656
|
* A unique identifier for the component.
|
|
5657
5657
|
* This UUID is used to register the component within the Components system.
|
|
5658
5658
|
*/
|
|
5659
|
-
C(
|
|
5660
|
-
let Fn =
|
|
5659
|
+
C(Di, "uuid", "69f2a50d-c266-44fc-b1bd-fa4d34be89e6");
|
|
5660
|
+
let Fn = Di;
|
|
5661
5661
|
class uc {
|
|
5662
5662
|
constructor(i, t) {
|
|
5663
5663
|
/** {@link Disposable.onDisposed} */
|
|
5664
|
-
C(this, "onDisposed", new
|
|
5664
|
+
C(this, "onDisposed", new j());
|
|
5665
5665
|
/**
|
|
5666
5666
|
* Fires after making the visibility check to the meshes. It lists the
|
|
5667
5667
|
* meshes that are currently visible, and the ones that were visible
|
|
5668
5668
|
* just before but not anymore.
|
|
5669
5669
|
*/
|
|
5670
|
-
C(this, "onDistanceComputed", new
|
|
5670
|
+
C(this, "onDistanceComputed", new j());
|
|
5671
5671
|
/**
|
|
5672
5672
|
* Objects that won't be taken into account in the distance check.
|
|
5673
5673
|
*/
|
|
@@ -5958,7 +5958,7 @@ class fc {
|
|
|
5958
5958
|
C(this, "_event");
|
|
5959
5959
|
C(this, "_position", new D.Vector2());
|
|
5960
5960
|
/** {@link Disposable.onDisposed} */
|
|
5961
|
-
C(this, "onDisposed", new
|
|
5961
|
+
C(this, "onDisposed", new j());
|
|
5962
5962
|
C(this, "updateMouseInfo", (i) => {
|
|
5963
5963
|
this._event = i;
|
|
5964
5964
|
});
|
|
@@ -5979,13 +5979,16 @@ class fc {
|
|
|
5979
5979
|
this.setupEvents(!1), this.onDisposed.trigger(), this.onDisposed.reset();
|
|
5980
5980
|
}
|
|
5981
5981
|
getPositionY(i, t) {
|
|
5982
|
-
return -((t.clientY - i.top) / (i.bottom - i.top)) * 2 + 1;
|
|
5982
|
+
return -((this.getDataObject(t).clientY - i.top) / (i.bottom - i.top)) * 2 + 1;
|
|
5983
5983
|
}
|
|
5984
5984
|
getPositionX(i, t) {
|
|
5985
|
-
return (t.clientX - i.left) / (i.right - i.left) * 2 - 1;
|
|
5985
|
+
return (this.getDataObject(t).clientX - i.left) / (i.right - i.left) * 2 - 1;
|
|
5986
|
+
}
|
|
5987
|
+
getDataObject(i) {
|
|
5988
|
+
return i instanceof MouseEvent ? i : i.touches[0];
|
|
5986
5989
|
}
|
|
5987
5990
|
setupEvents(i) {
|
|
5988
|
-
i ? this.dom.addEventListener("pointermove", this.updateMouseInfo) : this.dom.removeEventListener("pointermove", this.updateMouseInfo);
|
|
5991
|
+
i ? (this.dom.addEventListener("pointermove", this.updateMouseInfo), this.dom.addEventListener("touchstart", this.updateMouseInfo)) : (this.dom.removeEventListener("pointermove", this.updateMouseInfo), this.dom.removeEventListener("touchstart", this.updateMouseInfo));
|
|
5989
5992
|
}
|
|
5990
5993
|
}
|
|
5991
5994
|
class Ic {
|
|
@@ -5995,7 +5998,7 @@ class Ic {
|
|
|
5995
5998
|
/** The components instance to which this Raycaster belongs. */
|
|
5996
5999
|
C(this, "components");
|
|
5997
6000
|
/** {@link Disposable.onDisposed} */
|
|
5998
|
-
C(this, "onDisposed", new
|
|
6001
|
+
C(this, "onDisposed", new j());
|
|
5999
6002
|
/** The position of the mouse in the screen. */
|
|
6000
6003
|
C(this, "mouse");
|
|
6001
6004
|
/**
|
|
@@ -6071,7 +6074,7 @@ const Ns = class Ns extends At {
|
|
|
6071
6074
|
*/
|
|
6072
6075
|
C(this, "list", /* @__PURE__ */ new Map());
|
|
6073
6076
|
/** {@link Disposable.onDisposed} */
|
|
6074
|
-
C(this, "onDisposed", new
|
|
6077
|
+
C(this, "onDisposed", new j());
|
|
6075
6078
|
t.add(Ns.uuid, this);
|
|
6076
6079
|
}
|
|
6077
6080
|
/**
|
|
@@ -6113,8 +6116,8 @@ const Ns = class Ns extends At {
|
|
|
6113
6116
|
* This UUID is used to register the component within the Components system.
|
|
6114
6117
|
*/
|
|
6115
6118
|
C(Ns, "uuid", "d5d8bdf0-db25-4952-b951-b643af207ace");
|
|
6116
|
-
let
|
|
6117
|
-
class dc extends
|
|
6119
|
+
let ci = Ns;
|
|
6120
|
+
class dc extends Ge {
|
|
6118
6121
|
constructor() {
|
|
6119
6122
|
super(...arguments);
|
|
6120
6123
|
C(this, "_config", {
|
|
@@ -6213,9 +6216,9 @@ class dc extends Ye {
|
|
|
6213
6216
|
class Ec {
|
|
6214
6217
|
constructor(i, t) {
|
|
6215
6218
|
/** {@link Disposable.onDisposed} */
|
|
6216
|
-
C(this, "onDisposed", new
|
|
6219
|
+
C(this, "onDisposed", new j());
|
|
6217
6220
|
/** {@link Configurable.onSetup} */
|
|
6218
|
-
C(this, "onSetup", new
|
|
6221
|
+
C(this, "onSetup", new j());
|
|
6219
6222
|
/** {@link Configurable.isSetup} */
|
|
6220
6223
|
C(this, "isSetup", !1);
|
|
6221
6224
|
/** The world instance to which this Raycaster belongs. */
|
|
@@ -6235,7 +6238,7 @@ class Ec {
|
|
|
6235
6238
|
C(this, "three");
|
|
6236
6239
|
C(this, "_fade", 3);
|
|
6237
6240
|
C(this, "updateZoom", () => {
|
|
6238
|
-
this.world.camera instanceof
|
|
6241
|
+
this.world.camera instanceof xi && (this.material.uniforms.uZoom.value = this.world.camera.three.zoom);
|
|
6239
6242
|
});
|
|
6240
6243
|
this.world = t;
|
|
6241
6244
|
const { color: e, primarySize: s, secondarySize: n, distance: r } = this._defaultConfig;
|
|
@@ -6365,10 +6368,10 @@ class Ec {
|
|
|
6365
6368
|
}
|
|
6366
6369
|
/** {@link Disposable.dispose} */
|
|
6367
6370
|
dispose() {
|
|
6368
|
-
this.setupEvents(!1), this.components.get(
|
|
6371
|
+
this.setupEvents(!1), this.components.get(Ye).list.delete(this.config.uuid), this.components.get(De).destroy(this.three), this.onDisposed.trigger(), this.onDisposed.reset(), this.world = null, this.components = null;
|
|
6369
6372
|
}
|
|
6370
6373
|
setupEvents(i) {
|
|
6371
|
-
if (this.world.isDisposing || !(this.world.camera instanceof
|
|
6374
|
+
if (this.world.isDisposing || !(this.world.camera instanceof xi))
|
|
6372
6375
|
return;
|
|
6373
6376
|
const t = this.world.camera.controls;
|
|
6374
6377
|
i ? t.addEventListener("update", this.updateZoom) : t.removeEventListener("update", this.updateZoom);
|
|
@@ -6382,7 +6385,7 @@ const ys = class ys extends At {
|
|
|
6382
6385
|
*/
|
|
6383
6386
|
C(this, "list", /* @__PURE__ */ new Map());
|
|
6384
6387
|
/** {@link Disposable.onDisposed} */
|
|
6385
|
-
C(this, "onDisposed", new
|
|
6388
|
+
C(this, "onDisposed", new j());
|
|
6386
6389
|
/** {@link Component.enabled} */
|
|
6387
6390
|
C(this, "enabled", !0);
|
|
6388
6391
|
t.add(ys.uuid, this);
|
|
@@ -6431,7 +6434,7 @@ const ys = class ys extends At {
|
|
|
6431
6434
|
*/
|
|
6432
6435
|
C(ys, "uuid", "d1e814d5-b81c-4452-87a2-f039375e0489");
|
|
6433
6436
|
let Or = ys;
|
|
6434
|
-
const
|
|
6437
|
+
const xe = new yo(), bt = new Q(), Se = new Q(), Ot = new de(), Nr = {
|
|
6435
6438
|
X: new Q(1, 0, 0),
|
|
6436
6439
|
Y: new Q(0, 1, 0),
|
|
6437
6440
|
Z: new Q(0, 0, 1)
|
|
@@ -6466,14 +6469,14 @@ class pc extends In {
|
|
|
6466
6469
|
pointerHover(i) {
|
|
6467
6470
|
if (this.object === void 0 || this.dragging === !0)
|
|
6468
6471
|
return;
|
|
6469
|
-
|
|
6470
|
-
const t = fn(this._gizmo.picker[this.mode],
|
|
6472
|
+
xe.setFromCamera(i, this.camera);
|
|
6473
|
+
const t = fn(this._gizmo.picker[this.mode], xe);
|
|
6471
6474
|
t ? this.axis = t.object.name : this.axis = null;
|
|
6472
6475
|
}
|
|
6473
6476
|
pointerDown(i) {
|
|
6474
6477
|
if (!(this.object === void 0 || this.dragging === !0 || i.button !== 0) && this.axis !== null) {
|
|
6475
|
-
|
|
6476
|
-
const t = fn(this._plane,
|
|
6478
|
+
xe.setFromCamera(i, this.camera);
|
|
6479
|
+
const t = fn(this._plane, xe, !0);
|
|
6477
6480
|
t && (this.object.updateMatrixWorld(), this.object.parent.updateMatrixWorld(), this._positionStart.copy(this.object.position), this._quaternionStart.copy(this.object.quaternion), this._scaleStart.copy(this.object.scale), this.object.matrixWorld.decompose(this.worldPositionStart, this.worldQuaternionStart, this._worldScaleStart), this.pointStart.copy(t.point).sub(this.worldPositionStart)), this.dragging = !0, yr.mode = this.mode, this.dispatchEvent(yr);
|
|
6478
6481
|
}
|
|
6479
6482
|
}
|
|
@@ -6482,8 +6485,8 @@ class pc extends In {
|
|
|
6482
6485
|
let n = this.space;
|
|
6483
6486
|
if (e === "scale" ? n = "local" : (t === "E" || t === "XYZE" || t === "XYZ") && (n = "world"), s === void 0 || t === null || this.dragging === !1 || i.button !== -1)
|
|
6484
6487
|
return;
|
|
6485
|
-
|
|
6486
|
-
const r = fn(this._plane,
|
|
6488
|
+
xe.setFromCamera(i, this.camera);
|
|
6489
|
+
const r = fn(this._plane, xe, !0);
|
|
6487
6490
|
if (r) {
|
|
6488
6491
|
if (this.pointEnd.copy(r.point).sub(this.worldPositionStart), e === "translate")
|
|
6489
6492
|
this._offset.copy(this.pointEnd).sub(this.pointStart), n === "local" && t !== "XYZ" && this._offset.applyQuaternion(this._worldQuaternionInv), t.indexOf("X") === -1 && (this._offset.x = 0), t.indexOf("Y") === -1 && (this._offset.y = 0), t.indexOf("Z") === -1 && (this._offset.z = 0), n === "local" && t !== "XYZ" ? this._offset.applyQuaternion(this._quaternionStart).divide(this._parentScale) : this._offset.applyQuaternion(this._parentQuaternionInv).divide(this._parentScale), s.position.copy(this._offset).add(this._positionStart), this.translationSnap && (n === "local" && (s.position.applyQuaternion(Ot.copy(this._quaternionStart).invert()), t.search("X") !== -1 && (s.position.x = Math.round(s.position.x / this.translationSnap) * this.translationSnap), t.search("Y") !== -1 && (s.position.y = Math.round(s.position.y / this.translationSnap) * this.translationSnap), t.search("Z") !== -1 && (s.position.z = Math.round(s.position.z / this.translationSnap) * this.translationSnap), s.position.applyQuaternion(this._quaternionStart)), n === "world" && (s.parent && s.position.add(bt.setFromMatrixPosition(s.parent.matrixWorld)), t.search("X") !== -1 && (s.position.x = Math.round(s.position.x / this.translationSnap) * this.translationSnap), t.search("Y") !== -1 && (s.position.y = Math.round(s.position.y / this.translationSnap) * this.translationSnap), t.search("Z") !== -1 && (s.position.z = Math.round(s.position.z / this.translationSnap) * this.translationSnap), s.parent && s.position.sub(bt.setFromMatrixPosition(s.parent.matrixWorld))));
|
|
@@ -6523,7 +6526,7 @@ class pc extends In {
|
|
|
6523
6526
|
this.enabled && this.dragging && (this.object.position.copy(this._positionStart), this.object.quaternion.copy(this._quaternionStart), this.object.scale.copy(this._scaleStart), this.dispatchEvent(un), this.dispatchEvent(_r), this.pointStart.copy(this.pointEnd));
|
|
6524
6527
|
}
|
|
6525
6528
|
getRaycaster() {
|
|
6526
|
-
return
|
|
6529
|
+
return xe;
|
|
6527
6530
|
}
|
|
6528
6531
|
// TODO: deprecate
|
|
6529
6532
|
getMode() {
|
|
@@ -6589,7 +6592,7 @@ function fn(c, i, t) {
|
|
|
6589
6592
|
return e[s];
|
|
6590
6593
|
return !1;
|
|
6591
6594
|
}
|
|
6592
|
-
const
|
|
6595
|
+
const cs = new Lo(), mt = new Q(0, 1, 0), Pr = new Q(0, 0, 0), wr = new pe(), ls = new de(), Es = new de(), ue = new Q(), Mr = new pe(), _i = new Q(1, 0, 0), Be = new Q(0, 1, 0), Pi = new Q(0, 0, 1), hs = new Q(), Oi = new Q(), Ni = new Q();
|
|
6593
6596
|
class Ac extends In {
|
|
6594
6597
|
constructor() {
|
|
6595
6598
|
super(), this.isTransformControlsGizmo = !0, this.type = "TransformControlsGizmo";
|
|
@@ -6635,9 +6638,9 @@ class Ac extends In {
|
|
|
6635
6638
|
p.setAttribute("position", new Zn([0, 0, 0, 1, 0, 0], 3));
|
|
6636
6639
|
const m = new Vt(75e-4, 75e-4, 0.5, 3);
|
|
6637
6640
|
m.translate(0, 0.25, 0);
|
|
6638
|
-
function F(v,
|
|
6639
|
-
const
|
|
6640
|
-
return
|
|
6641
|
+
function F(v, q) {
|
|
6642
|
+
const G = new Ii(v, 75e-4, 3, 64, q * Math.PI * 2);
|
|
6643
|
+
return G.rotateY(Math.PI / 2), G.rotateX(Math.PI / 2), G;
|
|
6641
6644
|
}
|
|
6642
6645
|
function R() {
|
|
6643
6646
|
const v = new $n();
|
|
@@ -6660,7 +6663,7 @@ class Ac extends In {
|
|
|
6660
6663
|
[new rt(m, o), null, [Math.PI / 2, 0, 0]]
|
|
6661
6664
|
],
|
|
6662
6665
|
XYZ: [
|
|
6663
|
-
[new rt(new
|
|
6666
|
+
[new rt(new Gi(0.1, 0), f.clone()), [0, 0, 0]]
|
|
6664
6667
|
],
|
|
6665
6668
|
XY: [
|
|
6666
6669
|
[new rt(new Ut(0.15, 0.15, 0.01), h.clone()), [0.15, 0.15, 0]]
|
|
@@ -6685,7 +6688,7 @@ class Ac extends In {
|
|
|
6685
6688
|
[new rt(new Vt(0.2, 0, 0.6, 4), e), [0, 0, -0.3], [-Math.PI / 2, 0, 0]]
|
|
6686
6689
|
],
|
|
6687
6690
|
XYZ: [
|
|
6688
|
-
[new rt(new
|
|
6691
|
+
[new rt(new Gi(0.2, 0), e)]
|
|
6689
6692
|
],
|
|
6690
6693
|
XY: [
|
|
6691
6694
|
[new rt(new Ut(0.2, 0.2, 0.01), e), [0.15, 0.15, 0]]
|
|
@@ -6698,10 +6701,10 @@ class Ac extends In {
|
|
|
6698
6701
|
]
|
|
6699
6702
|
}, y = {
|
|
6700
6703
|
START: [
|
|
6701
|
-
[new rt(new
|
|
6704
|
+
[new rt(new Gi(0.01, 2), s), null, null, null, "helper"]
|
|
6702
6705
|
],
|
|
6703
6706
|
END: [
|
|
6704
|
-
[new rt(new
|
|
6707
|
+
[new rt(new Gi(0.01, 2), s), null, null, null, "helper"]
|
|
6705
6708
|
],
|
|
6706
6709
|
DELTA: [
|
|
6707
6710
|
[new Ae(R(), s), null, null, null, "helper"]
|
|
@@ -6740,18 +6743,18 @@ class Ac extends In {
|
|
|
6740
6743
|
[new rt(new Po(0.25, 10, 8), e)]
|
|
6741
6744
|
],
|
|
6742
6745
|
X: [
|
|
6743
|
-
[new rt(new
|
|
6746
|
+
[new rt(new Ii(0.5, 0.1, 4, 24), e), [0, 0, 0], [0, -Math.PI / 2, -Math.PI / 2]]
|
|
6744
6747
|
],
|
|
6745
6748
|
Y: [
|
|
6746
|
-
[new rt(new
|
|
6749
|
+
[new rt(new Ii(0.5, 0.1, 4, 24), e), [0, 0, 0], [Math.PI / 2, 0, 0]]
|
|
6747
6750
|
],
|
|
6748
6751
|
Z: [
|
|
6749
|
-
[new rt(new
|
|
6752
|
+
[new rt(new Ii(0.5, 0.1, 4, 24), e), [0, 0, 0], [0, 0, -Math.PI / 2]]
|
|
6750
6753
|
],
|
|
6751
6754
|
E: [
|
|
6752
|
-
[new rt(new
|
|
6755
|
+
[new rt(new Ii(0.75, 0.1, 2, 24), e)]
|
|
6753
6756
|
]
|
|
6754
|
-
},
|
|
6757
|
+
}, Y = {
|
|
6755
6758
|
X: [
|
|
6756
6759
|
[new rt(T, n), [0.5, 0, 0], [0, 0, -Math.PI / 2]],
|
|
6757
6760
|
[new rt(m, n), [0, 0, 0], [0, 0, -Math.PI / 2]],
|
|
@@ -6816,17 +6819,17 @@ class Ac extends In {
|
|
|
6816
6819
|
]
|
|
6817
6820
|
};
|
|
6818
6821
|
function g(v) {
|
|
6819
|
-
const
|
|
6820
|
-
for (const
|
|
6821
|
-
for (let et = v[
|
|
6822
|
-
const W = v[
|
|
6823
|
-
W.name =
|
|
6822
|
+
const q = new In();
|
|
6823
|
+
for (const G in v)
|
|
6824
|
+
for (let et = v[G].length; et--; ) {
|
|
6825
|
+
const W = v[G][et][0].clone(), nt = v[G][et][1], V = v[G][et][2], x = v[G][et][3], ot = v[G][et][4];
|
|
6826
|
+
W.name = G, W.tag = ot, nt && W.position.set(nt[0], nt[1], nt[2]), V && W.rotation.set(V[0], V[1], V[2]), x && W.scale.set(x[0], x[1], x[2]), W.updateMatrix();
|
|
6824
6827
|
const it = W.geometry.clone();
|
|
6825
|
-
it.applyMatrix4(W.matrix), W.geometry = it, W.renderOrder = 1 / 0, W.position.set(0, 0, 0), W.rotation.set(0, 0, 0), W.scale.set(1, 1, 1),
|
|
6828
|
+
it.applyMatrix4(W.matrix), W.geometry = it, W.renderOrder = 1 / 0, W.position.set(0, 0, 0), W.rotation.set(0, 0, 0), W.scale.set(1, 1, 1), q.add(W);
|
|
6826
6829
|
}
|
|
6827
|
-
return
|
|
6830
|
+
return q;
|
|
6828
6831
|
}
|
|
6829
|
-
this.gizmo = {}, this.picker = {}, this.helper = {}, this.add(this.gizmo.translate = g(S)), this.add(this.gizmo.rotate = g(M)), this.add(this.gizmo.scale = g(
|
|
6832
|
+
this.gizmo = {}, this.picker = {}, this.helper = {}, this.add(this.gizmo.translate = g(S)), this.add(this.gizmo.rotate = g(M)), this.add(this.gizmo.scale = g(Y)), this.add(this.picker.translate = g(N)), this.add(this.picker.rotate = g(b)), this.add(this.picker.scale = g(O)), this.add(this.helper.translate = g(y)), this.add(this.helper.rotate = g(L)), this.add(this.helper.scale = g(w)), this.picker.translate.visible = !1, this.picker.rotate.visible = !1, this.picker.scale.visible = !1;
|
|
6830
6833
|
}
|
|
6831
6834
|
// updateMatrixWorld will update transformations and appearance of individual handles
|
|
6832
6835
|
updateMatrixWorld(i) {
|
|
@@ -6839,10 +6842,10 @@ class Ac extends In {
|
|
|
6839
6842
|
r.visible = !0, r.rotation.set(0, 0, 0), r.position.copy(this.worldPosition);
|
|
6840
6843
|
let o;
|
|
6841
6844
|
if (this.camera.isOrthographicCamera ? o = (this.camera.top - this.camera.bottom) / this.camera.zoom : o = this.worldPosition.distanceTo(this.cameraPosition) * Math.min(1.9 * Math.tan(Math.PI * this.camera.fov / 360) / this.camera.zoom, 7), r.scale.set(1, 1, 1).multiplyScalar(o * this.size / 4), r.tag === "helper") {
|
|
6842
|
-
r.visible = !1, r.name === "AXIS" ? (r.visible = !!this.axis, this.axis === "X" && (Ot.setFromEuler(
|
|
6845
|
+
r.visible = !1, r.name === "AXIS" ? (r.visible = !!this.axis, this.axis === "X" && (Ot.setFromEuler(cs.set(0, 0, 0)), r.quaternion.copy(e).multiply(Ot), Math.abs(mt.copy(_i).applyQuaternion(e).dot(this.eye)) > 0.9 && (r.visible = !1)), this.axis === "Y" && (Ot.setFromEuler(cs.set(0, 0, Math.PI / 2)), r.quaternion.copy(e).multiply(Ot), Math.abs(mt.copy(Be).applyQuaternion(e).dot(this.eye)) > 0.9 && (r.visible = !1)), this.axis === "Z" && (Ot.setFromEuler(cs.set(0, Math.PI / 2, 0)), r.quaternion.copy(e).multiply(Ot), Math.abs(mt.copy(Pi).applyQuaternion(e).dot(this.eye)) > 0.9 && (r.visible = !1)), this.axis === "XYZE" && (Ot.setFromEuler(cs.set(0, Math.PI / 2, 0)), mt.copy(this.rotationAxis), r.quaternion.setFromRotationMatrix(wr.lookAt(Pr, mt, Be)), r.quaternion.multiply(Ot), r.visible = this.dragging), this.axis === "E" && (r.visible = !1)) : r.name === "START" ? (r.position.copy(this.worldPositionStart), r.visible = this.dragging) : r.name === "END" ? (r.position.copy(this.worldPosition), r.visible = this.dragging) : r.name === "DELTA" ? (r.position.copy(this.worldPositionStart), r.quaternion.copy(this.worldQuaternionStart), bt.set(1e-10, 1e-10, 1e-10).add(this.worldPositionStart).sub(this.worldPosition).multiplyScalar(-1), bt.applyQuaternion(this.worldQuaternionStart.clone().invert()), r.scale.copy(bt), r.visible = this.dragging) : (r.quaternion.copy(e), this.dragging ? r.position.copy(this.worldPositionStart) : r.position.copy(this.worldPosition), this.axis && (r.visible = this.axis.search(r.name) !== -1));
|
|
6843
6846
|
continue;
|
|
6844
6847
|
}
|
|
6845
|
-
r.quaternion.copy(e), this.mode === "translate" || this.mode === "scale" ? (r.name === "X" && Math.abs(mt.copy(
|
|
6848
|
+
r.quaternion.copy(e), this.mode === "translate" || this.mode === "scale" ? (r.name === "X" && Math.abs(mt.copy(_i).applyQuaternion(e).dot(this.eye)) > 0.99 && (r.scale.set(1e-10, 1e-10, 1e-10), r.visible = !1), r.name === "Y" && Math.abs(mt.copy(Be).applyQuaternion(e).dot(this.eye)) > 0.99 && (r.scale.set(1e-10, 1e-10, 1e-10), r.visible = !1), r.name === "Z" && Math.abs(mt.copy(Pi).applyQuaternion(e).dot(this.eye)) > 0.99 && (r.scale.set(1e-10, 1e-10, 1e-10), r.visible = !1), r.name === "XY" && Math.abs(mt.copy(Pi).applyQuaternion(e).dot(this.eye)) < 0.2 && (r.scale.set(1e-10, 1e-10, 1e-10), r.visible = !1), r.name === "YZ" && Math.abs(mt.copy(_i).applyQuaternion(e).dot(this.eye)) < 0.2 && (r.scale.set(1e-10, 1e-10, 1e-10), r.visible = !1), r.name === "XZ" && Math.abs(mt.copy(Be).applyQuaternion(e).dot(this.eye)) < 0.2 && (r.scale.set(1e-10, 1e-10, 1e-10), r.visible = !1)) : this.mode === "rotate" && (ls.copy(e), mt.copy(this.eye).applyQuaternion(Ot.copy(e).invert()), r.name.search("E") !== -1 && r.quaternion.setFromRotationMatrix(wr.lookAt(this.eye, Pr, Be)), r.name === "X" && (Ot.setFromAxisAngle(_i, Math.atan2(-mt.y, mt.z)), Ot.multiplyQuaternions(ls, Ot), r.quaternion.copy(Ot)), r.name === "Y" && (Ot.setFromAxisAngle(Be, Math.atan2(mt.x, mt.z)), Ot.multiplyQuaternions(ls, Ot), r.quaternion.copy(Ot)), r.name === "Z" && (Ot.setFromAxisAngle(Pi, Math.atan2(mt.y, mt.x)), Ot.multiplyQuaternions(ls, Ot), r.quaternion.copy(Ot))), r.visible = r.visible && (r.name.indexOf("X") === -1 || this.showX), r.visible = r.visible && (r.name.indexOf("Y") === -1 || this.showY), r.visible = r.visible && (r.name.indexOf("Z") === -1 || this.showZ), r.visible = r.visible && (r.name.indexOf("E") === -1 || this.showX && this.showY && this.showZ), r.material._color = r.material._color || r.material.color.clone(), r.material._opacity = r.material._opacity || r.material.opacity, r.material.color.copy(r.material._color), r.material.opacity = r.material._opacity, this.enabled && this.axis && (r.name === this.axis || this.axis.split("").some(function(a) {
|
|
6846
6849
|
return r.name === a;
|
|
6847
6850
|
})) && (r.material.color.setHex(16776960), r.material.opacity = 1);
|
|
6848
6851
|
}
|
|
@@ -6858,27 +6861,27 @@ class Fc extends rt {
|
|
|
6858
6861
|
}
|
|
6859
6862
|
updateMatrixWorld(i) {
|
|
6860
6863
|
let t = this.space;
|
|
6861
|
-
switch (this.position.copy(this.worldPosition), this.mode === "scale" && (t = "local"),
|
|
6864
|
+
switch (this.position.copy(this.worldPosition), this.mode === "scale" && (t = "local"), hs.copy(_i).applyQuaternion(t === "local" ? this.worldQuaternion : Es), Oi.copy(Be).applyQuaternion(t === "local" ? this.worldQuaternion : Es), Ni.copy(Pi).applyQuaternion(t === "local" ? this.worldQuaternion : Es), mt.copy(Oi), this.mode) {
|
|
6862
6865
|
case "translate":
|
|
6863
6866
|
case "scale":
|
|
6864
6867
|
switch (this.axis) {
|
|
6865
6868
|
case "X":
|
|
6866
|
-
mt.copy(this.eye).cross(
|
|
6869
|
+
mt.copy(this.eye).cross(hs), ue.copy(hs).cross(mt);
|
|
6867
6870
|
break;
|
|
6868
6871
|
case "Y":
|
|
6869
|
-
mt.copy(this.eye).cross(
|
|
6872
|
+
mt.copy(this.eye).cross(Oi), ue.copy(Oi).cross(mt);
|
|
6870
6873
|
break;
|
|
6871
6874
|
case "Z":
|
|
6872
|
-
mt.copy(this.eye).cross(
|
|
6875
|
+
mt.copy(this.eye).cross(Ni), ue.copy(Ni).cross(mt);
|
|
6873
6876
|
break;
|
|
6874
6877
|
case "XY":
|
|
6875
|
-
ue.copy(
|
|
6878
|
+
ue.copy(Ni);
|
|
6876
6879
|
break;
|
|
6877
6880
|
case "YZ":
|
|
6878
|
-
ue.copy(
|
|
6881
|
+
ue.copy(hs);
|
|
6879
6882
|
break;
|
|
6880
6883
|
case "XZ":
|
|
6881
|
-
mt.copy(
|
|
6884
|
+
mt.copy(Ni), ue.copy(Oi);
|
|
6882
6885
|
break;
|
|
6883
6886
|
case "XYZ":
|
|
6884
6887
|
case "E":
|
|
@@ -6896,11 +6899,11 @@ class Fc extends rt {
|
|
|
6896
6899
|
class Vn {
|
|
6897
6900
|
constructor(i, t, e, s, n, r = 5, o = !0) {
|
|
6898
6901
|
/** Event that fires when the user starts dragging a clipping plane. */
|
|
6899
|
-
C(this, "onDraggingStarted", new
|
|
6902
|
+
C(this, "onDraggingStarted", new j());
|
|
6900
6903
|
/** Event that fires when the user stops dragging a clipping plane. */
|
|
6901
|
-
C(this, "onDraggingEnded", new
|
|
6904
|
+
C(this, "onDraggingEnded", new j());
|
|
6902
6905
|
/** {@link Disposable.onDisposed} */
|
|
6903
|
-
C(this, "onDisposed", new
|
|
6906
|
+
C(this, "onDisposed", new j());
|
|
6904
6907
|
/**
|
|
6905
6908
|
* The normal vector of the clipping plane.
|
|
6906
6909
|
*/
|
|
@@ -7055,7 +7058,7 @@ class Vn {
|
|
|
7055
7058
|
return s.scale.set(i, i, i), s;
|
|
7056
7059
|
}
|
|
7057
7060
|
}
|
|
7058
|
-
class Sc extends
|
|
7061
|
+
class Sc extends Ge {
|
|
7059
7062
|
constructor() {
|
|
7060
7063
|
super(...arguments);
|
|
7061
7064
|
C(this, "_config", {
|
|
@@ -7118,43 +7121,43 @@ class Sc extends Ye {
|
|
|
7118
7121
|
this._config.size.value = t, this._component.size = t;
|
|
7119
7122
|
}
|
|
7120
7123
|
}
|
|
7121
|
-
const
|
|
7124
|
+
const ni = class ni extends At {
|
|
7122
7125
|
constructor(t) {
|
|
7123
7126
|
super(t);
|
|
7124
7127
|
/** {@link Configurable.onSetup} */
|
|
7125
|
-
C(this, "onSetup", new
|
|
7128
|
+
C(this, "onSetup", new j());
|
|
7126
7129
|
/** Event that fires when the user starts dragging a clipping plane. */
|
|
7127
|
-
C(this, "onBeforeDrag", new
|
|
7130
|
+
C(this, "onBeforeDrag", new j());
|
|
7128
7131
|
/** Event that fires when the user stops dragging a clipping plane. */
|
|
7129
|
-
C(this, "onAfterDrag", new
|
|
7132
|
+
C(this, "onAfterDrag", new j());
|
|
7130
7133
|
/**
|
|
7131
7134
|
* Event that fires when the user starts creating a clipping plane.
|
|
7132
7135
|
*/
|
|
7133
|
-
C(this, "onBeforeCreate", new
|
|
7136
|
+
C(this, "onBeforeCreate", new j());
|
|
7134
7137
|
/**
|
|
7135
7138
|
* Event that fires when the user cancels the creation of a clipping plane.
|
|
7136
7139
|
*/
|
|
7137
|
-
C(this, "onBeforeCancel", new
|
|
7140
|
+
C(this, "onBeforeCancel", new j());
|
|
7138
7141
|
/**
|
|
7139
7142
|
* Event that fires after the user cancels the creation of a clipping plane.
|
|
7140
7143
|
*/
|
|
7141
|
-
C(this, "onAfterCancel", new
|
|
7144
|
+
C(this, "onAfterCancel", new j());
|
|
7142
7145
|
/**
|
|
7143
7146
|
* Event that fires when the user starts deleting a clipping plane.
|
|
7144
7147
|
*/
|
|
7145
|
-
C(this, "onBeforeDelete", new
|
|
7148
|
+
C(this, "onBeforeDelete", new j());
|
|
7146
7149
|
/**
|
|
7147
7150
|
* Event that fires after a clipping plane has been created.
|
|
7148
7151
|
* @param plane - The newly created clipping plane.
|
|
7149
7152
|
*/
|
|
7150
|
-
C(this, "onAfterCreate", new
|
|
7153
|
+
C(this, "onAfterCreate", new j());
|
|
7151
7154
|
/**
|
|
7152
7155
|
* Event that fires after a clipping plane has been deleted.
|
|
7153
7156
|
* @param plane - The deleted clipping plane.
|
|
7154
7157
|
*/
|
|
7155
|
-
C(this, "onAfterDelete", new
|
|
7158
|
+
C(this, "onAfterDelete", new j());
|
|
7156
7159
|
/** {@link Disposable.onDisposed} */
|
|
7157
|
-
C(this, "onDisposed", new
|
|
7160
|
+
C(this, "onDisposed", new j());
|
|
7158
7161
|
/** {@link Configurable.isSetup} */
|
|
7159
7162
|
C(this, "isSetup", !1);
|
|
7160
7163
|
/**
|
|
@@ -7184,7 +7187,7 @@ const si = class si extends At {
|
|
|
7184
7187
|
this,
|
|
7185
7188
|
this.components,
|
|
7186
7189
|
"Clipper",
|
|
7187
|
-
|
|
7190
|
+
ni.uuid
|
|
7188
7191
|
));
|
|
7189
7192
|
C(this, "_defaultConfig", {
|
|
7190
7193
|
color: new D.Color(12255487),
|
|
@@ -7207,7 +7210,7 @@ const si = class si extends At {
|
|
|
7207
7210
|
C(this, "_onEndDragging", () => {
|
|
7208
7211
|
this.onAfterDrag.trigger();
|
|
7209
7212
|
});
|
|
7210
|
-
this.components.add(
|
|
7213
|
+
this.components.add(ni.uuid, this);
|
|
7211
7214
|
}
|
|
7212
7215
|
/** {@link Component.enabled} */
|
|
7213
7216
|
get enabled() {
|
|
@@ -7252,14 +7255,14 @@ const si = class si extends At {
|
|
|
7252
7255
|
}
|
|
7253
7256
|
/** {@link Disposable.dispose} */
|
|
7254
7257
|
dispose() {
|
|
7255
|
-
this._enabled = !1, this.components.get(
|
|
7258
|
+
this._enabled = !1, this.components.get(Ye).list.delete(this.config.uuid);
|
|
7256
7259
|
for (const e of this.list)
|
|
7257
7260
|
e.dispose();
|
|
7258
|
-
this.list.length = 0, this._material.dispose(), this.onBeforeCreate.reset(), this.onBeforeCancel.reset(), this.onBeforeDelete.reset(), this.onBeforeDrag.reset(), this.onAfterCreate.reset(), this.onAfterCancel.reset(), this.onAfterDelete.reset(), this.onAfterDrag.reset(), this.onDisposed.trigger(
|
|
7261
|
+
this.list.length = 0, this._material.dispose(), this.onBeforeCreate.reset(), this.onBeforeCancel.reset(), this.onBeforeDelete.reset(), this.onBeforeDrag.reset(), this.onAfterCreate.reset(), this.onAfterCancel.reset(), this.onAfterDelete.reset(), this.onAfterDrag.reset(), this.onDisposed.trigger(ni.uuid), this.onDisposed.reset();
|
|
7259
7262
|
}
|
|
7260
7263
|
/** {@link Createable.create} */
|
|
7261
7264
|
create(t) {
|
|
7262
|
-
const n = this.components.get(
|
|
7265
|
+
const n = this.components.get(ci).get(t).castRay();
|
|
7263
7266
|
return n ? this.createPlaneFromIntersection(t, n) : null;
|
|
7264
7267
|
}
|
|
7265
7268
|
/**
|
|
@@ -7313,7 +7316,7 @@ const si = class si extends At {
|
|
|
7313
7316
|
}
|
|
7314
7317
|
}
|
|
7315
7318
|
pickPlane(t) {
|
|
7316
|
-
const s = this.components.get(
|
|
7319
|
+
const s = this.components.get(ci).get(t), n = this.getAllPlaneMeshes(), r = s.castRay(n);
|
|
7317
7320
|
if (r) {
|
|
7318
7321
|
const o = r.object;
|
|
7319
7322
|
return this.list.find((a) => a.meshes.includes(o));
|
|
@@ -7379,8 +7382,8 @@ const si = class si extends At {
|
|
|
7379
7382
|
* A unique identifier for the component.
|
|
7380
7383
|
* This UUID is used to register the component within the Components system.
|
|
7381
7384
|
*/
|
|
7382
|
-
C(
|
|
7383
|
-
let Sn =
|
|
7385
|
+
C(ni, "uuid", "66290bc5-18c4-4cd1-9379-2e17a0617611");
|
|
7386
|
+
let Sn = ni;
|
|
7384
7387
|
class Oc {
|
|
7385
7388
|
constructor(i) {
|
|
7386
7389
|
/** {@link NavigationMode.enabled} */
|
|
@@ -7456,7 +7459,7 @@ class Lc {
|
|
|
7456
7459
|
/**
|
|
7457
7460
|
* Event that fires when the {@link CameraProjection} changes.
|
|
7458
7461
|
*/
|
|
7459
|
-
C(this, "onChanged", new
|
|
7462
|
+
C(this, "onChanged", new j());
|
|
7460
7463
|
/**
|
|
7461
7464
|
* Current projection mode of the camera.
|
|
7462
7465
|
* Default is "Perspective".
|
|
@@ -7526,7 +7529,7 @@ class Lc {
|
|
|
7526
7529
|
i.position.copy(t.position), i.quaternion.copy(t.quaternion), this._component.controls.mouseButtons.wheel = vt.ACTION.DOLLY, this.matchOrthoDistanceEnabled ? this._component.controls.distance = this.getDistance() : this._component.controls.distance = this._previousDistance, await this._component.controls.zoomTo(1), i.updateProjectionMatrix(), this._component.controls.camera = i, this.camera = i, this.current = "Perspective";
|
|
7527
7530
|
}
|
|
7528
7531
|
}
|
|
7529
|
-
class _c extends
|
|
7532
|
+
class _c extends xi {
|
|
7530
7533
|
constructor(t) {
|
|
7531
7534
|
super(t);
|
|
7532
7535
|
/**
|
|
@@ -9039,7 +9042,7 @@ const ms = {
|
|
|
9039
9042
|
1390159747: "FILE_NAME",
|
|
9040
9043
|
1109904537: "FILE_SCHEMA"
|
|
9041
9044
|
};
|
|
9042
|
-
class
|
|
9045
|
+
class oi {
|
|
9043
9046
|
static async getUnits(i) {
|
|
9044
9047
|
var r, o, a;
|
|
9045
9048
|
const { IFCUNITASSIGNMENT: t } = z, e = await i.getAllPropertiesOfType(t);
|
|
@@ -9116,7 +9119,7 @@ class ri {
|
|
|
9116
9119
|
return r;
|
|
9117
9120
|
}
|
|
9118
9121
|
static async getQsetRel(i, t) {
|
|
9119
|
-
return
|
|
9122
|
+
return oi.getPsetRel(i, t);
|
|
9120
9123
|
}
|
|
9121
9124
|
static async getEntityName(i, t) {
|
|
9122
9125
|
var r;
|
|
@@ -10774,19 +10777,19 @@ const co = /* @__PURE__ */ new Set([
|
|
|
10774
10777
|
*/
|
|
10775
10778
|
C(Ls, "uuid", "b32c4332-cd67-436e-ba7f-196646c7a635");
|
|
10776
10779
|
let On = Ls;
|
|
10777
|
-
const
|
|
10780
|
+
const bi = class bi extends At {
|
|
10778
10781
|
constructor(t) {
|
|
10779
10782
|
super(t);
|
|
10780
10783
|
/** {@link Disposable.onDisposed} */
|
|
10781
|
-
C(this, "onDisposed", new
|
|
10784
|
+
C(this, "onDisposed", new j());
|
|
10782
10785
|
/**
|
|
10783
10786
|
* An event triggered when the IFC file starts loading.
|
|
10784
10787
|
*/
|
|
10785
|
-
C(this, "onIfcStartedLoading", new
|
|
10788
|
+
C(this, "onIfcStartedLoading", new j());
|
|
10786
10789
|
/**
|
|
10787
10790
|
* An event triggered when the setup process is completed.
|
|
10788
10791
|
*/
|
|
10789
|
-
C(this, "onSetup", new
|
|
10792
|
+
C(this, "onSetup", new j());
|
|
10790
10793
|
/**
|
|
10791
10794
|
* The settings for the IfcLoader.
|
|
10792
10795
|
* It includes options for excluding categories, setting WASM paths, and more.
|
|
@@ -10808,11 +10811,11 @@ const Di = class Di extends At {
|
|
|
10808
10811
|
transparent: !0,
|
|
10809
10812
|
opacity: 0.5
|
|
10810
10813
|
}));
|
|
10811
|
-
this.components.add(
|
|
10814
|
+
this.components.add(bi.uuid, this), this.settings.excludedCategories.add(z.IFCOPENINGELEMENT);
|
|
10812
10815
|
}
|
|
10813
10816
|
/** {@link Disposable.dispose} */
|
|
10814
10817
|
dispose() {
|
|
10815
|
-
this.webIfc = null, this.onDisposed.trigger(
|
|
10818
|
+
this.webIfc = null, this.onDisposed.trigger(bi.uuid), this.onDisposed.reset();
|
|
10816
10819
|
}
|
|
10817
10820
|
/**
|
|
10818
10821
|
* Sets up the IfcLoader component with the provided configuration.
|
|
@@ -11030,8 +11033,8 @@ const Di = class Di extends At {
|
|
|
11030
11033
|
* A unique identifier for the component.
|
|
11031
11034
|
* This UUID is used to register the component within the Components system.
|
|
11032
11035
|
*/
|
|
11033
|
-
C(
|
|
11034
|
-
let Nn =
|
|
11036
|
+
C(bi, "uuid", "a659add7-1418-4771-a0d6-7d4d438e4624");
|
|
11037
|
+
let Nn = bi;
|
|
11035
11038
|
const Dc = {
|
|
11036
11039
|
// IfcRelAssigns
|
|
11037
11040
|
IfcRelAssignsToControl: { related: 5, relating: 7 },
|
|
@@ -11080,11 +11083,11 @@ const Dc = {
|
|
|
11080
11083
|
constructor(t) {
|
|
11081
11084
|
super(t);
|
|
11082
11085
|
/** {@link Disposable.onDisposed} */
|
|
11083
|
-
C(this, "onDisposed", new
|
|
11086
|
+
C(this, "onDisposed", new j());
|
|
11084
11087
|
/**
|
|
11085
11088
|
* Event triggered when a file is requested for export.
|
|
11086
11089
|
*/
|
|
11087
|
-
C(this, "onRequestFile", new
|
|
11090
|
+
C(this, "onRequestFile", new j());
|
|
11088
11091
|
/**
|
|
11089
11092
|
* ArrayBuffer containing the IFC data to be exported.
|
|
11090
11093
|
*/
|
|
@@ -11092,19 +11095,19 @@ const Dc = {
|
|
|
11092
11095
|
/**
|
|
11093
11096
|
* Event triggered when an element is added to a Pset.
|
|
11094
11097
|
*/
|
|
11095
|
-
C(this, "onElementToPset", new
|
|
11098
|
+
C(this, "onElementToPset", new j());
|
|
11096
11099
|
/**
|
|
11097
11100
|
* Event triggered when a property is added to a Pset.
|
|
11098
11101
|
*/
|
|
11099
|
-
C(this, "onPropToPset", new
|
|
11102
|
+
C(this, "onPropToPset", new j());
|
|
11100
11103
|
/**
|
|
11101
11104
|
* Event triggered when a Pset is removed.
|
|
11102
11105
|
*/
|
|
11103
|
-
C(this, "onPsetRemoved", new
|
|
11106
|
+
C(this, "onPsetRemoved", new j());
|
|
11104
11107
|
/**
|
|
11105
11108
|
* Event triggered when data in the model changes.
|
|
11106
11109
|
*/
|
|
11107
|
-
C(this, "onDataChanged", new
|
|
11110
|
+
C(this, "onDataChanged", new j());
|
|
11108
11111
|
/**
|
|
11109
11112
|
* Configuration for the WebAssembly module.
|
|
11110
11113
|
*/
|
|
@@ -11211,7 +11214,7 @@ const Dc = {
|
|
|
11211
11214
|
const n = await t.getProperties(s);
|
|
11212
11215
|
if ((n == null ? void 0 : n.type) !== z.IFCPROPERTYSET)
|
|
11213
11216
|
continue;
|
|
11214
|
-
const r = await
|
|
11217
|
+
const r = await oi.getPsetRel(t, s);
|
|
11215
11218
|
if (r && (await t.setProperties(r, null), this.registerChange(t, r)), n) {
|
|
11216
11219
|
for (const o of n.HasProperties)
|
|
11217
11220
|
await t.setProperties(o.value, null);
|
|
@@ -11420,7 +11423,7 @@ const Dc = {
|
|
|
11420
11423
|
const a = o.value;
|
|
11421
11424
|
if (a === void 0 || a == null)
|
|
11422
11425
|
throw new Error(`Attribute ${s} has a badly defined handle.`);
|
|
11423
|
-
const l = new
|
|
11426
|
+
const l = new j();
|
|
11424
11427
|
return Object.defineProperty(r[s], "value", {
|
|
11425
11428
|
get() {
|
|
11426
11429
|
return this._value;
|
|
@@ -11467,11 +11470,11 @@ const Dc = {
|
|
|
11467
11470
|
*/
|
|
11468
11471
|
C(ye, "uuid", "58c2d9f0-183c-48d6-a402-dfcf5b9a34df");
|
|
11469
11472
|
let yn = ye;
|
|
11470
|
-
const
|
|
11473
|
+
const vi = class vi extends At {
|
|
11471
11474
|
constructor(t) {
|
|
11472
11475
|
super(t);
|
|
11473
11476
|
/** {@link Disposable.onDisposed} */
|
|
11474
|
-
C(this, "onDisposed", new
|
|
11477
|
+
C(this, "onDisposed", new j());
|
|
11475
11478
|
/**
|
|
11476
11479
|
* Event triggered when relations for a model have been indexed.
|
|
11477
11480
|
* This event provides the model's UUID and the relations map generated for that model.
|
|
@@ -11480,7 +11483,7 @@ const bi = class bi extends At {
|
|
|
11480
11483
|
* @property {RelationsMap} relationsMap - The relations map generated for the specified model.
|
|
11481
11484
|
* The map keys are expressIDs of entities, and the values are maps where each key is a relation type ID and its value is an array of expressIDs of entities related through that relation type.
|
|
11482
11485
|
*/
|
|
11483
|
-
C(this, "onRelationsIndexed", new
|
|
11486
|
+
C(this, "onRelationsIndexed", new j());
|
|
11484
11487
|
/**
|
|
11485
11488
|
* Holds the relationship mappings for each model processed by the indexer.
|
|
11486
11489
|
* The structure is a map where each key is a model's UUID, and the value is another map.
|
|
@@ -11547,8 +11550,8 @@ const bi = class bi extends At {
|
|
|
11547
11550
|
* The event provides information about the type of relation, the inverse attribute,
|
|
11548
11551
|
* the IDs of the entities related, and the IDs of the entities that are being related.
|
|
11549
11552
|
*/
|
|
11550
|
-
C(this, "onEntitiesRelated", new
|
|
11551
|
-
this.components.add(
|
|
11553
|
+
C(this, "onEntitiesRelated", new j());
|
|
11554
|
+
this.components.add(vi.uuid, this), t.get(Tt).onFragmentsDisposed.add(this.onFragmentsDisposed);
|
|
11552
11555
|
}
|
|
11553
11556
|
indexRelations(t, e, s, n) {
|
|
11554
11557
|
const r = Object.keys(e).find(
|
|
@@ -11563,7 +11566,9 @@ const bi = class bi extends At {
|
|
|
11563
11566
|
let f = t.get(a);
|
|
11564
11567
|
f || (f = /* @__PURE__ */ new Map(), t.set(a, f));
|
|
11565
11568
|
let I = f.get(h);
|
|
11566
|
-
I || (I = [], f.set(h, I))
|
|
11569
|
+
I || (I = [], f.set(h, I));
|
|
11570
|
+
for (const u of l)
|
|
11571
|
+
I.push(u);
|
|
11567
11572
|
}
|
|
11568
11573
|
for (const f of l) {
|
|
11569
11574
|
const I = this.getAttributeIndex(s);
|
|
@@ -11762,7 +11767,7 @@ const bi = class bi extends At {
|
|
|
11762
11767
|
}
|
|
11763
11768
|
/** {@link Disposable.dispose} */
|
|
11764
11769
|
dispose() {
|
|
11765
|
-
this.relationMaps = {}, this.components.get(Tt).onFragmentsDisposed.remove(this.onFragmentsDisposed), this.onDisposed.trigger(
|
|
11770
|
+
this.relationMaps = {}, this.components.get(Tt).onFragmentsDisposed.remove(this.onFragmentsDisposed), this.onDisposed.trigger(vi.uuid), this.onDisposed.reset();
|
|
11766
11771
|
}
|
|
11767
11772
|
/**
|
|
11768
11773
|
* Retrieves the entities within a model that have a specific relation with a given entity.
|
|
@@ -11897,7 +11902,7 @@ const bi = class bi extends At {
|
|
|
11897
11902
|
), I.set(r, E));
|
|
11898
11903
|
for (const T of u) {
|
|
11899
11904
|
let p = E.get(T);
|
|
11900
|
-
p || (p = { related: new
|
|
11905
|
+
p || (p = { related: new we() }, E.set(T, p)), p.related.add(...d);
|
|
11901
11906
|
}
|
|
11902
11907
|
for (const T of u) {
|
|
11903
11908
|
let p = a.get(T);
|
|
@@ -11951,21 +11956,21 @@ const bi = class bi extends At {
|
|
|
11951
11956
|
* A unique identifier for the component.
|
|
11952
11957
|
* This UUID is used to register the component within the Components system.
|
|
11953
11958
|
*/
|
|
11954
|
-
C(
|
|
11955
|
-
let kt =
|
|
11959
|
+
C(vi, "uuid", "23a889ab-83b3-44a4-8bee-ead83438370b");
|
|
11960
|
+
let kt = vi;
|
|
11956
11961
|
const _s = class _s extends At {
|
|
11957
11962
|
constructor(t) {
|
|
11958
11963
|
super(t);
|
|
11959
11964
|
/** {@link Disposable.onDisposed} */
|
|
11960
|
-
C(this, "onDisposed", new
|
|
11965
|
+
C(this, "onDisposed", new j());
|
|
11961
11966
|
/**
|
|
11962
11967
|
* Event triggered when fragments are loaded.
|
|
11963
11968
|
*/
|
|
11964
|
-
C(this, "onFragmentsLoaded", new
|
|
11969
|
+
C(this, "onFragmentsLoaded", new j());
|
|
11965
11970
|
/**
|
|
11966
11971
|
* Event triggered when fragments are disposed.
|
|
11967
11972
|
*/
|
|
11968
|
-
C(this, "onFragmentsDisposed", new
|
|
11973
|
+
C(this, "onFragmentsDisposed", new j());
|
|
11969
11974
|
/**
|
|
11970
11975
|
* DataMap containing all loaded fragments.
|
|
11971
11976
|
* The key is the fragment's unique identifier, and the value is the fragment itself.
|
|
@@ -12179,11 +12184,11 @@ const _s = class _s extends At {
|
|
|
12179
12184
|
*/
|
|
12180
12185
|
C(_s, "uuid", "fef46874-46a3-461b-8c44-2922ab77c806");
|
|
12181
12186
|
let Tt = _s;
|
|
12182
|
-
var
|
|
12187
|
+
var us = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
12183
12188
|
function vc(c) {
|
|
12184
12189
|
return c && c.__esModule && Object.prototype.hasOwnProperty.call(c, "default") ? c.default : c;
|
|
12185
12190
|
}
|
|
12186
|
-
function
|
|
12191
|
+
function fs(c) {
|
|
12187
12192
|
throw new Error('Could not dynamically require "' + c + '". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.');
|
|
12188
12193
|
}
|
|
12189
12194
|
var lo = { exports: {} };
|
|
@@ -12206,7 +12211,7 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
12206
12211
|
function r(l, h) {
|
|
12207
12212
|
if (!s[l]) {
|
|
12208
12213
|
if (!e[l]) {
|
|
12209
|
-
var f = typeof
|
|
12214
|
+
var f = typeof fs == "function" && fs;
|
|
12210
12215
|
if (!h && f)
|
|
12211
12216
|
return f(l, !0);
|
|
12212
12217
|
if (o)
|
|
@@ -12222,7 +12227,7 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
12222
12227
|
}
|
|
12223
12228
|
return s[l].exports;
|
|
12224
12229
|
}
|
|
12225
|
-
for (var o = typeof
|
|
12230
|
+
for (var o = typeof fs == "function" && fs, a = 0; a < n.length; a++)
|
|
12226
12231
|
r(n[a]);
|
|
12227
12232
|
return r;
|
|
12228
12233
|
}({ 1: [function(t, e, s) {
|
|
@@ -12325,20 +12330,20 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
12325
12330
|
return T;
|
|
12326
12331
|
}
|
|
12327
12332
|
function r(u, d, E, T, p, m) {
|
|
12328
|
-
var F, R, S = u.file, N = u.compression, y = m !== l.utf8encode, M = o.transformTo("string", m(S.name)), L = o.transformTo("string", l.utf8encode(S.name)), b = S.comment,
|
|
12333
|
+
var F, R, S = u.file, N = u.compression, y = m !== l.utf8encode, M = o.transformTo("string", m(S.name)), L = o.transformTo("string", l.utf8encode(S.name)), b = S.comment, Y = o.transformTo("string", m(b)), O = o.transformTo("string", l.utf8encode(b)), w = L.length !== S.name.length, g = O.length !== b.length, v = "", q = "", G = "", et = S.dir, W = S.date, nt = { crc32: 0, compressedSize: 0, uncompressedSize: 0 };
|
|
12329
12334
|
d && !E || (nt.crc32 = u.crc32, nt.compressedSize = u.compressedSize, nt.uncompressedSize = u.uncompressedSize);
|
|
12330
|
-
var
|
|
12331
|
-
d && (
|
|
12335
|
+
var V = 0;
|
|
12336
|
+
d && (V |= 8), y || !w && !g || (V |= 2048);
|
|
12332
12337
|
var x = 0, ot = 0;
|
|
12333
12338
|
et && (x |= 16), p === "UNIX" ? (ot = 798, x |= function(tt, St) {
|
|
12334
12339
|
var yt = tt;
|
|
12335
12340
|
return tt || (yt = St ? 16893 : 33204), (65535 & yt) << 16;
|
|
12336
12341
|
}(S.unixPermissions, et)) : (ot = 20, x |= function(tt) {
|
|
12337
12342
|
return 63 & (tt || 0);
|
|
12338
|
-
}(S.dosPermissions)), F = W.getUTCHours(), F <<= 6, F |= W.getUTCMinutes(), F <<= 5, F |= W.getUTCSeconds() / 2, R = W.getUTCFullYear() - 1980, R <<= 4, R |= W.getUTCMonth() + 1, R <<= 5, R |= W.getUTCDate(), w && (
|
|
12343
|
+
}(S.dosPermissions)), F = W.getUTCHours(), F <<= 6, F |= W.getUTCMinutes(), F <<= 5, F |= W.getUTCSeconds() / 2, R = W.getUTCFullYear() - 1980, R <<= 4, R |= W.getUTCMonth() + 1, R <<= 5, R |= W.getUTCDate(), w && (q = n(1, 1) + n(h(M), 4) + L, v += "up" + n(q.length, 2) + q), g && (G = n(1, 1) + n(h(Y), 4) + O, v += "uc" + n(G.length, 2) + G);
|
|
12339
12344
|
var it = "";
|
|
12340
12345
|
return it += `
|
|
12341
|
-
\0`, it += n(
|
|
12346
|
+
\0`, it += n(V, 2), it += N.magic, it += n(F, 2), it += n(R, 2), it += n(nt.crc32, 4), it += n(nt.compressedSize, 4), it += n(nt.uncompressedSize, 4), it += n(M.length, 2), it += n(v.length, 2), { fileRecord: f.LOCAL_FILE_HEADER + it + M + v, dirRecord: f.CENTRAL_FILE_HEADER + n(ot, 2) + it + n(Y.length, 2) + "\0\0\0\0" + n(x, 4) + n(T, 4) + M + v + Y };
|
|
12342
12347
|
}
|
|
12343
12348
|
var o = t("../utils"), a = t("../stream/GenericWorker"), l = t("../utf8"), h = t("../crc32"), f = t("../signature");
|
|
12344
12349
|
function I(u, d, E, T) {
|
|
@@ -12526,8 +12531,8 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
12526
12531
|
function n(S, N, y) {
|
|
12527
12532
|
var M, L = o.getTypeOf(N), b = o.extend(y || {}, h);
|
|
12528
12533
|
b.date = b.date || /* @__PURE__ */ new Date(), b.compression !== null && (b.compression = b.compression.toUpperCase()), typeof b.unixPermissions == "string" && (b.unixPermissions = parseInt(b.unixPermissions, 8)), b.unixPermissions && 16384 & b.unixPermissions && (b.dir = !0), b.dosPermissions && 16 & b.dosPermissions && (b.dir = !0), b.dir && (S = p(S)), b.createFolders && (M = T(S)) && m.call(this, M, !0);
|
|
12529
|
-
var
|
|
12530
|
-
y && y.binary !== void 0 || (b.binary = !
|
|
12534
|
+
var Y = L === "string" && b.binary === !1 && b.base64 === !1;
|
|
12535
|
+
y && y.binary !== void 0 || (b.binary = !Y), (N instanceof f && N.uncompressedSize === 0 || b.dir || !N || N.length === 0) && (b.base64 = !1, b.binary = !0, N = "", b.compression = "STORE", L = "string");
|
|
12531
12536
|
var O = null;
|
|
12532
12537
|
O = N instanceof f || N instanceof a ? N : d.isNode && d.isStream(N) ? new E(S, N) : o.prepareContent(S, N, b.binary, b.optimizedBinaryString, b.base64);
|
|
12533
12538
|
var w = new I(S, O, b);
|
|
@@ -12561,8 +12566,8 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
12561
12566
|
return S = this.root + S, n.call(this, S, N, y), this;
|
|
12562
12567
|
if (F(S)) {
|
|
12563
12568
|
var M = S;
|
|
12564
|
-
return this.filter(function(b,
|
|
12565
|
-
return !
|
|
12569
|
+
return this.filter(function(b, Y) {
|
|
12570
|
+
return !Y.dir && M.test(b);
|
|
12566
12571
|
});
|
|
12567
12572
|
}
|
|
12568
12573
|
var L = this.files[this.root + S];
|
|
@@ -12859,7 +12864,7 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
12859
12864
|
return n.transformTo(y, M);
|
|
12860
12865
|
}
|
|
12861
12866
|
}(R, function(y, M) {
|
|
12862
|
-
var L, b = 0,
|
|
12867
|
+
var L, b = 0, Y = null, O = 0;
|
|
12863
12868
|
for (L = 0; L < M.length; L++)
|
|
12864
12869
|
O += M[L].length;
|
|
12865
12870
|
switch (y) {
|
|
@@ -12868,9 +12873,9 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
12868
12873
|
case "array":
|
|
12869
12874
|
return Array.prototype.concat.apply([], M);
|
|
12870
12875
|
case "uint8array":
|
|
12871
|
-
for (
|
|
12872
|
-
|
|
12873
|
-
return
|
|
12876
|
+
for (Y = new Uint8Array(O), L = 0; L < M.length; L++)
|
|
12877
|
+
Y.set(M[L], b), b += M[L].length;
|
|
12878
|
+
return Y;
|
|
12874
12879
|
case "nodebuffer":
|
|
12875
12880
|
return Buffer.concat(M);
|
|
12876
12881
|
default:
|
|
@@ -13358,7 +13363,7 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
13358
13363
|
e.exports = function(E) {
|
|
13359
13364
|
u.push(E) !== 1 || o || r();
|
|
13360
13365
|
};
|
|
13361
|
-
}).call(this, typeof
|
|
13366
|
+
}).call(this, typeof us < "u" ? us : typeof self < "u" ? self : typeof window < "u" ? window : {});
|
|
13362
13367
|
}, {}], 37: [function(t, e, s) {
|
|
13363
13368
|
var n = t("immediate");
|
|
13364
13369
|
function r() {
|
|
@@ -13473,9 +13478,9 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
13473
13478
|
for (var S = new Array(F), N = 0, y = -1, M = new this(r); ++y < F; )
|
|
13474
13479
|
L(p[y], y);
|
|
13475
13480
|
return M;
|
|
13476
|
-
function L(b,
|
|
13481
|
+
function L(b, Y) {
|
|
13477
13482
|
m.resolve(b).then(function(O) {
|
|
13478
|
-
S[
|
|
13483
|
+
S[Y] = O, ++N !== F || R || (R = !0, o.resolve(M, S));
|
|
13479
13484
|
}, function(O) {
|
|
13480
13485
|
R || (R = !0, o.reject(M, O));
|
|
13481
13486
|
});
|
|
@@ -13700,7 +13705,7 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
13700
13705
|
return -1 ^ r;
|
|
13701
13706
|
};
|
|
13702
13707
|
}, {}], 46: [function(t, e, s) {
|
|
13703
|
-
var n, r = t("../utils/common"), o = t("./trees"), a = t("./adler32"), l = t("./crc32"), h = t("./messages"), f = 0, I = 4, u = 0, d = -2, E = -1, T = 4, p = 2, m = 8, F = 9, R = 286, S = 30, N = 19, y = 2 * R + 1, M = 15, L = 3, b = 258,
|
|
13708
|
+
var n, r = t("../utils/common"), o = t("./trees"), a = t("./adler32"), l = t("./crc32"), h = t("./messages"), f = 0, I = 4, u = 0, d = -2, E = -1, T = 4, p = 2, m = 8, F = 9, R = 286, S = 30, N = 19, y = 2 * R + 1, M = 15, L = 3, b = 258, Y = b + L + 1, O = 42, w = 113, g = 1, v = 2, q = 3, G = 4;
|
|
13704
13709
|
function et(A, X) {
|
|
13705
13710
|
return A.msg = h[X], X;
|
|
13706
13711
|
}
|
|
@@ -13711,12 +13716,12 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
13711
13716
|
for (var X = A.length; 0 <= --X; )
|
|
13712
13717
|
A[X] = 0;
|
|
13713
13718
|
}
|
|
13714
|
-
function
|
|
13719
|
+
function V(A) {
|
|
13715
13720
|
var X = A.state, k = X.pending;
|
|
13716
13721
|
k > A.avail_out && (k = A.avail_out), k !== 0 && (r.arraySet(A.output, X.pending_buf, X.pending_out, k, A.next_out), A.next_out += k, X.pending_out += k, A.total_out += k, A.avail_out -= k, X.pending -= k, X.pending === 0 && (X.pending_out = 0));
|
|
13717
13722
|
}
|
|
13718
13723
|
function x(A, X) {
|
|
13719
|
-
o._tr_flush_block(A, 0 <= A.block_start ? A.block_start : -1, A.strstart - A.block_start, X), A.block_start = A.strstart,
|
|
13724
|
+
o._tr_flush_block(A, 0 <= A.block_start ? A.block_start : -1, A.strstart - A.block_start, X), A.block_start = A.strstart, V(A.strm);
|
|
13720
13725
|
}
|
|
13721
13726
|
function ot(A, X) {
|
|
13722
13727
|
A.pending_buf[A.pending++] = X;
|
|
@@ -13725,8 +13730,8 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
13725
13730
|
A.pending_buf[A.pending++] = X >>> 8 & 255, A.pending_buf[A.pending++] = 255 & X;
|
|
13726
13731
|
}
|
|
13727
13732
|
function tt(A, X) {
|
|
13728
|
-
var k, P, _ = A.max_chain_length, U = A.strstart, $ = A.prev_length,
|
|
13729
|
-
A.prev_length >= A.good_match && (_ >>= 2),
|
|
13733
|
+
var k, P, _ = A.max_chain_length, U = A.strstart, $ = A.prev_length, Z = A.nice_match, B = A.strstart > A.w_size - Y ? A.strstart - (A.w_size - Y) : 0, K = A.window, st = A.w_mask, J = A.prev, ct = A.strstart + b, Rt = K[U + $ - 1], dt = K[U + $];
|
|
13734
|
+
A.prev_length >= A.good_match && (_ >>= 2), Z > A.lookahead && (Z = A.lookahead);
|
|
13730
13735
|
do
|
|
13731
13736
|
if (K[(k = X) + $] === dt && K[k + $ - 1] === Rt && K[k] === K[U] && K[++k] === K[U + 1]) {
|
|
13732
13737
|
U += 2, k++;
|
|
@@ -13734,7 +13739,7 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
13734
13739
|
;
|
|
13735
13740
|
while (K[++U] === K[++k] && K[++U] === K[++k] && K[++U] === K[++k] && K[++U] === K[++k] && K[++U] === K[++k] && K[++U] === K[++k] && K[++U] === K[++k] && K[++U] === K[++k] && U < ct);
|
|
13736
13741
|
if (P = b - (ct - U), U = ct - b, $ < P) {
|
|
13737
|
-
if (A.match_start = X,
|
|
13742
|
+
if (A.match_start = X, Z <= ($ = P))
|
|
13738
13743
|
break;
|
|
13739
13744
|
Rt = K[U + $ - 1], dt = K[U + $];
|
|
13740
13745
|
}
|
|
@@ -13743,9 +13748,9 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
13743
13748
|
return $ <= A.lookahead ? $ : A.lookahead;
|
|
13744
13749
|
}
|
|
13745
13750
|
function St(A) {
|
|
13746
|
-
var X, k, P, _, U, $,
|
|
13751
|
+
var X, k, P, _, U, $, Z, B, K, st, J = A.w_size;
|
|
13747
13752
|
do {
|
|
13748
|
-
if (_ = A.window_size - A.lookahead - A.strstart, A.strstart >= J + (J -
|
|
13753
|
+
if (_ = A.window_size - A.lookahead - A.strstart, A.strstart >= J + (J - Y)) {
|
|
13749
13754
|
for (r.arraySet(A.window, A.window, J, J, 0), A.match_start -= J, A.strstart -= J, A.block_start -= J, X = k = A.hash_size; P = A.head[--X], A.head[X] = J <= P ? P - J : 0, --k; )
|
|
13750
13755
|
;
|
|
13751
13756
|
for (X = k = J; P = A.prev[--X], A.prev[X] = J <= P ? P - J : 0, --k; )
|
|
@@ -13754,20 +13759,20 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
13754
13759
|
}
|
|
13755
13760
|
if (A.strm.avail_in === 0)
|
|
13756
13761
|
break;
|
|
13757
|
-
if ($ = A.strm,
|
|
13762
|
+
if ($ = A.strm, Z = A.window, B = A.strstart + A.lookahead, K = _, st = void 0, st = $.avail_in, K < st && (st = K), k = st === 0 ? 0 : ($.avail_in -= st, r.arraySet(Z, $.input, $.next_in, st, B), $.state.wrap === 1 ? $.adler = a($.adler, Z, st, B) : $.state.wrap === 2 && ($.adler = l($.adler, Z, st, B)), $.next_in += st, $.total_in += st, st), A.lookahead += k, A.lookahead + A.insert >= L)
|
|
13758
13763
|
for (U = A.strstart - A.insert, A.ins_h = A.window[U], A.ins_h = (A.ins_h << A.hash_shift ^ A.window[U + 1]) & A.hash_mask; A.insert && (A.ins_h = (A.ins_h << A.hash_shift ^ A.window[U + L - 1]) & A.hash_mask, A.prev[U & A.w_mask] = A.head[A.ins_h], A.head[A.ins_h] = U, U++, A.insert--, !(A.lookahead + A.insert < L)); )
|
|
13759
13764
|
;
|
|
13760
|
-
} while (A.lookahead <
|
|
13765
|
+
} while (A.lookahead < Y && A.strm.avail_in !== 0);
|
|
13761
13766
|
}
|
|
13762
13767
|
function yt(A, X) {
|
|
13763
13768
|
for (var k, P; ; ) {
|
|
13764
|
-
if (A.lookahead <
|
|
13765
|
-
if (St(A), A.lookahead <
|
|
13769
|
+
if (A.lookahead < Y) {
|
|
13770
|
+
if (St(A), A.lookahead < Y && X === f)
|
|
13766
13771
|
return g;
|
|
13767
13772
|
if (A.lookahead === 0)
|
|
13768
13773
|
break;
|
|
13769
13774
|
}
|
|
13770
|
-
if (k = 0, A.lookahead >= L && (A.ins_h = (A.ins_h << A.hash_shift ^ A.window[A.strstart + L - 1]) & A.hash_mask, k = A.prev[A.strstart & A.w_mask] = A.head[A.ins_h], A.head[A.ins_h] = A.strstart), k !== 0 && A.strstart - k <= A.w_size -
|
|
13775
|
+
if (k = 0, A.lookahead >= L && (A.ins_h = (A.ins_h << A.hash_shift ^ A.window[A.strstart + L - 1]) & A.hash_mask, k = A.prev[A.strstart & A.w_mask] = A.head[A.ins_h], A.head[A.ins_h] = A.strstart), k !== 0 && A.strstart - k <= A.w_size - Y && (A.match_length = tt(A, k)), A.match_length >= L)
|
|
13771
13776
|
if (P = o._tr_tally(A, A.strstart - A.match_start, A.match_length - L), A.lookahead -= A.match_length, A.match_length <= A.max_lazy_match && A.lookahead >= L) {
|
|
13772
13777
|
for (A.match_length--; A.strstart++, A.ins_h = (A.ins_h << A.hash_shift ^ A.window[A.strstart + L - 1]) & A.hash_mask, k = A.prev[A.strstart & A.w_mask] = A.head[A.ins_h], A.head[A.ins_h] = A.strstart, --A.match_length != 0; )
|
|
13773
13778
|
;
|
|
@@ -13779,17 +13784,17 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
13779
13784
|
if (P && (x(A, !1), A.strm.avail_out === 0))
|
|
13780
13785
|
return g;
|
|
13781
13786
|
}
|
|
13782
|
-
return A.insert = A.strstart < L - 1 ? A.strstart : L - 1, X === I ? (x(A, !0), A.strm.avail_out === 0 ?
|
|
13787
|
+
return A.insert = A.strstart < L - 1 ? A.strstart : L - 1, X === I ? (x(A, !0), A.strm.avail_out === 0 ? q : G) : A.last_lit && (x(A, !1), A.strm.avail_out === 0) ? g : v;
|
|
13783
13788
|
}
|
|
13784
13789
|
function at(A, X) {
|
|
13785
13790
|
for (var k, P, _; ; ) {
|
|
13786
|
-
if (A.lookahead <
|
|
13787
|
-
if (St(A), A.lookahead <
|
|
13791
|
+
if (A.lookahead < Y) {
|
|
13792
|
+
if (St(A), A.lookahead < Y && X === f)
|
|
13788
13793
|
return g;
|
|
13789
13794
|
if (A.lookahead === 0)
|
|
13790
13795
|
break;
|
|
13791
13796
|
}
|
|
13792
|
-
if (k = 0, A.lookahead >= L && (A.ins_h = (A.ins_h << A.hash_shift ^ A.window[A.strstart + L - 1]) & A.hash_mask, k = A.prev[A.strstart & A.w_mask] = A.head[A.ins_h], A.head[A.ins_h] = A.strstart), A.prev_length = A.match_length, A.prev_match = A.match_start, A.match_length = L - 1, k !== 0 && A.prev_length < A.max_lazy_match && A.strstart - k <= A.w_size -
|
|
13797
|
+
if (k = 0, A.lookahead >= L && (A.ins_h = (A.ins_h << A.hash_shift ^ A.window[A.strstart + L - 1]) & A.hash_mask, k = A.prev[A.strstart & A.w_mask] = A.head[A.ins_h], A.head[A.ins_h] = A.strstart), A.prev_length = A.match_length, A.prev_match = A.match_start, A.match_length = L - 1, k !== 0 && A.prev_length < A.max_lazy_match && A.strstart - k <= A.w_size - Y && (A.match_length = tt(A, k), A.match_length <= 5 && (A.strategy === 1 || A.match_length === L && 4096 < A.strstart - A.match_start) && (A.match_length = L - 1)), A.prev_length >= L && A.match_length <= A.prev_length) {
|
|
13793
13798
|
for (_ = A.strstart + A.lookahead - L, P = o._tr_tally(A, A.strstart - 1 - A.prev_match, A.prev_length - L), A.lookahead -= A.prev_length - 1, A.prev_length -= 2; ++A.strstart <= _ && (A.ins_h = (A.ins_h << A.hash_shift ^ A.window[A.strstart + L - 1]) & A.hash_mask, k = A.prev[A.strstart & A.w_mask] = A.head[A.ins_h], A.head[A.ins_h] = A.strstart), --A.prev_length != 0; )
|
|
13794
13799
|
;
|
|
13795
13800
|
if (A.match_available = 0, A.match_length = L - 1, A.strstart++, P && (x(A, !1), A.strm.avail_out === 0))
|
|
@@ -13800,7 +13805,7 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
13800
13805
|
} else
|
|
13801
13806
|
A.match_available = 1, A.strstart++, A.lookahead--;
|
|
13802
13807
|
}
|
|
13803
|
-
return A.match_available && (P = o._tr_tally(A, 0, A.window[A.strstart - 1]), A.match_available = 0), A.insert = A.strstart < L - 1 ? A.strstart : L - 1, X === I ? (x(A, !0), A.strm.avail_out === 0 ?
|
|
13808
|
+
return A.match_available && (P = o._tr_tally(A, 0, A.window[A.strstart - 1]), A.match_available = 0), A.insert = A.strstart < L - 1 ? A.strstart : L - 1, X === I ? (x(A, !0), A.strm.avail_out === 0 ? q : G) : A.last_lit && (x(A, !1), A.strm.avail_out === 0) ? g : v;
|
|
13804
13809
|
}
|
|
13805
13810
|
function It(A, X, k, P, _) {
|
|
13806
13811
|
this.good_length = A, this.max_lazy = X, this.nice_length = k, this.max_chain = P, this.func = _;
|
|
@@ -13825,8 +13830,8 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
13825
13830
|
if (X === E && (X = 6), P < 0 ? ($ = 0, P = -P) : 15 < P && ($ = 2, P -= 16), _ < 1 || F < _ || k !== m || P < 8 || 15 < P || X < 0 || 9 < X || U < 0 || T < U)
|
|
13826
13831
|
return et(A, d);
|
|
13827
13832
|
P === 8 && (P = 9);
|
|
13828
|
-
var
|
|
13829
|
-
return (A.state =
|
|
13833
|
+
var Z = new ft();
|
|
13834
|
+
return (A.state = Z).strm = A, Z.wrap = $, Z.gzhead = null, Z.w_bits = P, Z.w_size = 1 << Z.w_bits, Z.w_mask = Z.w_size - 1, Z.hash_bits = _ + 7, Z.hash_size = 1 << Z.hash_bits, Z.hash_mask = Z.hash_size - 1, Z.hash_shift = ~~((Z.hash_bits + L - 1) / L), Z.window = new r.Buf8(2 * Z.w_size), Z.head = new r.Buf16(Z.hash_size), Z.prev = new r.Buf16(Z.w_size), Z.lit_bufsize = 1 << _ + 6, Z.pending_buf_size = 4 * Z.lit_bufsize, Z.pending_buf = new r.Buf8(Z.pending_buf_size), Z.d_buf = 1 * Z.lit_bufsize, Z.l_buf = 3 * Z.lit_bufsize, Z.level = X, Z.strategy = U, Z.method = k, Ht(A);
|
|
13830
13835
|
}
|
|
13831
13836
|
n = [new It(0, 0, 0, 0, function(A, X) {
|
|
13832
13837
|
var k = 65535;
|
|
@@ -13839,10 +13844,10 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
13839
13844
|
}
|
|
13840
13845
|
A.strstart += A.lookahead, A.lookahead = 0;
|
|
13841
13846
|
var P = A.block_start + k;
|
|
13842
|
-
if ((A.strstart === 0 || A.strstart >= P) && (A.lookahead = A.strstart - P, A.strstart = P, x(A, !1), A.strm.avail_out === 0) || A.strstart - A.block_start >= A.w_size -
|
|
13847
|
+
if ((A.strstart === 0 || A.strstart >= P) && (A.lookahead = A.strstart - P, A.strstart = P, x(A, !1), A.strm.avail_out === 0) || A.strstart - A.block_start >= A.w_size - Y && (x(A, !1), A.strm.avail_out === 0))
|
|
13843
13848
|
return g;
|
|
13844
13849
|
}
|
|
13845
|
-
return A.insert = 0, X === I ? (x(A, !0), A.strm.avail_out === 0 ?
|
|
13850
|
+
return A.insert = 0, X === I ? (x(A, !0), A.strm.avail_out === 0 ? q : G) : (A.strstart > A.block_start && (x(A, !1), A.strm.avail_out), g);
|
|
13846
13851
|
}), new It(4, 4, 8, 4, yt), new It(4, 5, 16, 8, yt), new It(4, 6, 32, 32, yt), new It(4, 4, 16, 16, at), new It(8, 16, 32, 32, at), new It(8, 16, 128, 128, at), new It(8, 32, 128, 256, at), new It(32, 128, 258, 1024, at), new It(32, 258, 258, 4096, at)], s.deflateInit = function(A, X) {
|
|
13847
13852
|
return Dt(A, X, m, 15, 8, 0);
|
|
13848
13853
|
}, s.deflateInit2 = Dt, s.deflateReset = Ht, s.deflateResetKeep = Ct, s.deflateSetHeader = function(A, X) {
|
|
@@ -13862,7 +13867,7 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
13862
13867
|
}
|
|
13863
13868
|
if (P.status === 69)
|
|
13864
13869
|
if (P.gzhead.extra) {
|
|
13865
|
-
for (_ = P.pending; P.gzindex < (65535 & P.gzhead.extra.length) && (P.pending !== P.pending_buf_size || (P.gzhead.hcrc && P.pending > _ && (A.adler = l(A.adler, P.pending_buf, P.pending - _, _)),
|
|
13870
|
+
for (_ = P.pending; P.gzindex < (65535 & P.gzhead.extra.length) && (P.pending !== P.pending_buf_size || (P.gzhead.hcrc && P.pending > _ && (A.adler = l(A.adler, P.pending_buf, P.pending - _, _)), V(A), _ = P.pending, P.pending !== P.pending_buf_size)); )
|
|
13866
13871
|
ot(P, 255 & P.gzhead.extra[P.gzindex]), P.gzindex++;
|
|
13867
13872
|
P.gzhead.hcrc && P.pending > _ && (A.adler = l(A.adler, P.pending_buf, P.pending - _, _)), P.gzindex === P.gzhead.extra.length && (P.gzindex = 0, P.status = 73);
|
|
13868
13873
|
} else
|
|
@@ -13871,7 +13876,7 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
13871
13876
|
if (P.gzhead.name) {
|
|
13872
13877
|
_ = P.pending;
|
|
13873
13878
|
do {
|
|
13874
|
-
if (P.pending === P.pending_buf_size && (P.gzhead.hcrc && P.pending > _ && (A.adler = l(A.adler, P.pending_buf, P.pending - _, _)),
|
|
13879
|
+
if (P.pending === P.pending_buf_size && (P.gzhead.hcrc && P.pending > _ && (A.adler = l(A.adler, P.pending_buf, P.pending - _, _)), V(A), _ = P.pending, P.pending === P.pending_buf_size)) {
|
|
13875
13880
|
U = 1;
|
|
13876
13881
|
break;
|
|
13877
13882
|
}
|
|
@@ -13884,7 +13889,7 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
13884
13889
|
if (P.gzhead.comment) {
|
|
13885
13890
|
_ = P.pending;
|
|
13886
13891
|
do {
|
|
13887
|
-
if (P.pending === P.pending_buf_size && (P.gzhead.hcrc && P.pending > _ && (A.adler = l(A.adler, P.pending_buf, P.pending - _, _)),
|
|
13892
|
+
if (P.pending === P.pending_buf_size && (P.gzhead.hcrc && P.pending > _ && (A.adler = l(A.adler, P.pending_buf, P.pending - _, _)), V(A), _ = P.pending, P.pending === P.pending_buf_size)) {
|
|
13888
13893
|
U = 1;
|
|
13889
13894
|
break;
|
|
13890
13895
|
}
|
|
@@ -13893,15 +13898,15 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
13893
13898
|
P.gzhead.hcrc && P.pending > _ && (A.adler = l(A.adler, P.pending_buf, P.pending - _, _)), U === 0 && (P.status = 103);
|
|
13894
13899
|
} else
|
|
13895
13900
|
P.status = 103;
|
|
13896
|
-
if (P.status === 103 && (P.gzhead.hcrc ? (P.pending + 2 > P.pending_buf_size &&
|
|
13897
|
-
if (
|
|
13901
|
+
if (P.status === 103 && (P.gzhead.hcrc ? (P.pending + 2 > P.pending_buf_size && V(A), P.pending + 2 <= P.pending_buf_size && (ot(P, 255 & A.adler), ot(P, A.adler >> 8 & 255), A.adler = 0, P.status = w)) : P.status = w), P.pending !== 0) {
|
|
13902
|
+
if (V(A), A.avail_out === 0)
|
|
13898
13903
|
return P.last_flush = -1, u;
|
|
13899
13904
|
} else if (A.avail_in === 0 && W(X) <= W(k) && X !== I)
|
|
13900
13905
|
return et(A, -5);
|
|
13901
13906
|
if (P.status === 666 && A.avail_in !== 0)
|
|
13902
13907
|
return et(A, -5);
|
|
13903
13908
|
if (A.avail_in !== 0 || P.lookahead !== 0 || X !== f && P.status !== 666) {
|
|
13904
|
-
var
|
|
13909
|
+
var Z = P.strategy === 2 ? function(B, K) {
|
|
13905
13910
|
for (var st; ; ) {
|
|
13906
13911
|
if (B.lookahead === 0 && (St(B), B.lookahead === 0)) {
|
|
13907
13912
|
if (K === f)
|
|
@@ -13911,7 +13916,7 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
13911
13916
|
if (B.match_length = 0, st = o._tr_tally(B, 0, B.window[B.strstart]), B.lookahead--, B.strstart++, st && (x(B, !1), B.strm.avail_out === 0))
|
|
13912
13917
|
return g;
|
|
13913
13918
|
}
|
|
13914
|
-
return B.insert = 0, K === I ? (x(B, !0), B.strm.avail_out === 0 ?
|
|
13919
|
+
return B.insert = 0, K === I ? (x(B, !0), B.strm.avail_out === 0 ? q : G) : B.last_lit && (x(B, !1), B.strm.avail_out === 0) ? g : v;
|
|
13915
13920
|
}(P, X) : P.strategy === 3 ? function(B, K) {
|
|
13916
13921
|
for (var st, J, ct, Rt, dt = B.window; ; ) {
|
|
13917
13922
|
if (B.lookahead <= b) {
|
|
@@ -13930,27 +13935,27 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
13930
13935
|
if (B.match_length >= L ? (st = o._tr_tally(B, 1, B.match_length - L), B.lookahead -= B.match_length, B.strstart += B.match_length, B.match_length = 0) : (st = o._tr_tally(B, 0, B.window[B.strstart]), B.lookahead--, B.strstart++), st && (x(B, !1), B.strm.avail_out === 0))
|
|
13931
13936
|
return g;
|
|
13932
13937
|
}
|
|
13933
|
-
return B.insert = 0, K === I ? (x(B, !0), B.strm.avail_out === 0 ?
|
|
13938
|
+
return B.insert = 0, K === I ? (x(B, !0), B.strm.avail_out === 0 ? q : G) : B.last_lit && (x(B, !1), B.strm.avail_out === 0) ? g : v;
|
|
13934
13939
|
}(P, X) : n[P.level].func(P, X);
|
|
13935
|
-
if (
|
|
13940
|
+
if (Z !== q && Z !== G || (P.status = 666), Z === g || Z === q)
|
|
13936
13941
|
return A.avail_out === 0 && (P.last_flush = -1), u;
|
|
13937
|
-
if (
|
|
13942
|
+
if (Z === v && (X === 1 ? o._tr_align(P) : X !== 5 && (o._tr_stored_block(P, 0, 0, !1), X === 3 && (nt(P.head), P.lookahead === 0 && (P.strstart = 0, P.block_start = 0, P.insert = 0))), V(A), A.avail_out === 0))
|
|
13938
13943
|
return P.last_flush = -1, u;
|
|
13939
13944
|
}
|
|
13940
|
-
return X !== I ? u : P.wrap <= 0 ? 1 : (P.wrap === 2 ? (ot(P, 255 & A.adler), ot(P, A.adler >> 8 & 255), ot(P, A.adler >> 16 & 255), ot(P, A.adler >> 24 & 255), ot(P, 255 & A.total_in), ot(P, A.total_in >> 8 & 255), ot(P, A.total_in >> 16 & 255), ot(P, A.total_in >> 24 & 255)) : (it(P, A.adler >>> 16), it(P, 65535 & A.adler)),
|
|
13945
|
+
return X !== I ? u : P.wrap <= 0 ? 1 : (P.wrap === 2 ? (ot(P, 255 & A.adler), ot(P, A.adler >> 8 & 255), ot(P, A.adler >> 16 & 255), ot(P, A.adler >> 24 & 255), ot(P, 255 & A.total_in), ot(P, A.total_in >> 8 & 255), ot(P, A.total_in >> 16 & 255), ot(P, A.total_in >> 24 & 255)) : (it(P, A.adler >>> 16), it(P, 65535 & A.adler)), V(A), 0 < P.wrap && (P.wrap = -P.wrap), P.pending !== 0 ? u : 1);
|
|
13941
13946
|
}, s.deflateEnd = function(A) {
|
|
13942
13947
|
var X;
|
|
13943
13948
|
return A && A.state ? (X = A.state.status) !== O && X !== 69 && X !== 73 && X !== 91 && X !== 103 && X !== w && X !== 666 ? et(A, d) : (A.state = null, X === w ? et(A, -3) : u) : d;
|
|
13944
13949
|
}, s.deflateSetDictionary = function(A, X) {
|
|
13945
|
-
var k, P, _, U, $,
|
|
13950
|
+
var k, P, _, U, $, Z, B, K, st = X.length;
|
|
13946
13951
|
if (!A || !A.state || (U = (k = A.state).wrap) === 2 || U === 1 && k.status !== O || k.lookahead)
|
|
13947
13952
|
return d;
|
|
13948
|
-
for (U === 1 && (A.adler = a(A.adler, X, st, 0)), k.wrap = 0, st >= k.w_size && (U === 0 && (nt(k.head), k.strstart = 0, k.block_start = 0, k.insert = 0), K = new r.Buf8(k.w_size), r.arraySet(K, X, st - k.w_size, k.w_size, 0), X = K, st = k.w_size), $ = A.avail_in,
|
|
13953
|
+
for (U === 1 && (A.adler = a(A.adler, X, st, 0)), k.wrap = 0, st >= k.w_size && (U === 0 && (nt(k.head), k.strstart = 0, k.block_start = 0, k.insert = 0), K = new r.Buf8(k.w_size), r.arraySet(K, X, st - k.w_size, k.w_size, 0), X = K, st = k.w_size), $ = A.avail_in, Z = A.next_in, B = A.input, A.avail_in = st, A.next_in = 0, A.input = X, St(k); k.lookahead >= L; ) {
|
|
13949
13954
|
for (P = k.strstart, _ = k.lookahead - (L - 1); k.ins_h = (k.ins_h << k.hash_shift ^ k.window[P + L - 1]) & k.hash_mask, k.prev[P & k.w_mask] = k.head[k.ins_h], k.head[k.ins_h] = P, P++, --_; )
|
|
13950
13955
|
;
|
|
13951
13956
|
k.strstart = P, k.lookahead = L - 1, St(k);
|
|
13952
13957
|
}
|
|
13953
|
-
return k.strstart += k.lookahead, k.block_start = k.strstart, k.insert = k.lookahead, k.lookahead = 0, k.match_length = k.prev_length = L - 1, k.match_available = 0, A.next_in =
|
|
13958
|
+
return k.strstart += k.lookahead, k.block_start = k.strstart, k.insert = k.lookahead, k.lookahead = 0, k.match_length = k.prev_length = L - 1, k.match_available = 0, A.next_in = Z, A.input = B, A.avail_in = $, k.wrap = U, u;
|
|
13954
13959
|
}, s.deflateInfo = "pako deflate (from Nodeca project)";
|
|
13955
13960
|
}, { "../utils/common": 41, "./adler32": 43, "./crc32": 45, "./messages": 51, "./trees": 52 }], 47: [function(t, e, s) {
|
|
13956
13961
|
e.exports = function() {
|
|
@@ -13958,7 +13963,7 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
13958
13963
|
};
|
|
13959
13964
|
}, {}], 48: [function(t, e, s) {
|
|
13960
13965
|
e.exports = function(n, r) {
|
|
13961
|
-
var o, a, l, h, f, I, u, d, E, T, p, m, F, R, S, N, y, M, L, b,
|
|
13966
|
+
var o, a, l, h, f, I, u, d, E, T, p, m, F, R, S, N, y, M, L, b, Y, O, w, g, v;
|
|
13962
13967
|
o = n.state, a = n.next_in, g = n.input, l = a + (n.avail_in - 5), h = n.next_out, v = n.output, f = h - (r - n.avail_out), I = h + (n.avail_out - 257), u = o.dmax, d = o.wsize, E = o.whave, T = o.wnext, p = o.window, m = o.hold, F = o.bits, R = o.lencode, S = o.distcode, N = (1 << o.lenbits) - 1, y = (1 << o.distbits) - 1;
|
|
13963
13968
|
t:
|
|
13964
13969
|
do {
|
|
@@ -13991,12 +13996,12 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
13991
13996
|
n.msg = "invalid distance code", o.mode = 30;
|
|
13992
13997
|
break t;
|
|
13993
13998
|
}
|
|
13994
|
-
if (
|
|
13999
|
+
if (Y = 65535 & M, F < (L &= 15) && (m += g[a++] << F, (F += 8) < L && (m += g[a++] << F, F += 8)), u < (Y += m & (1 << L) - 1)) {
|
|
13995
14000
|
n.msg = "invalid distance too far back", o.mode = 30;
|
|
13996
14001
|
break t;
|
|
13997
14002
|
}
|
|
13998
|
-
if (m >>>= L, F -= L, (L = h - f) <
|
|
13999
|
-
if (E < (L =
|
|
14003
|
+
if (m >>>= L, F -= L, (L = h - f) < Y) {
|
|
14004
|
+
if (E < (L = Y - L) && o.sane) {
|
|
14000
14005
|
n.msg = "invalid distance too far back", o.mode = 30;
|
|
14001
14006
|
break t;
|
|
14002
14007
|
}
|
|
@@ -14004,7 +14009,7 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
14004
14009
|
if (O += d - L, L < b) {
|
|
14005
14010
|
for (b -= L; v[h++] = p[O++], --L; )
|
|
14006
14011
|
;
|
|
14007
|
-
O = h -
|
|
14012
|
+
O = h - Y, w = v;
|
|
14008
14013
|
}
|
|
14009
14014
|
} else if (T < L) {
|
|
14010
14015
|
if (O += d + T - L, (L -= T) < b) {
|
|
@@ -14013,19 +14018,19 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
14013
14018
|
if (O = 0, T < b) {
|
|
14014
14019
|
for (b -= L = T; v[h++] = p[O++], --L; )
|
|
14015
14020
|
;
|
|
14016
|
-
O = h -
|
|
14021
|
+
O = h - Y, w = v;
|
|
14017
14022
|
}
|
|
14018
14023
|
}
|
|
14019
14024
|
} else if (O += T - L, L < b) {
|
|
14020
14025
|
for (b -= L; v[h++] = p[O++], --L; )
|
|
14021
14026
|
;
|
|
14022
|
-
O = h -
|
|
14027
|
+
O = h - Y, w = v;
|
|
14023
14028
|
}
|
|
14024
14029
|
for (; 2 < b; )
|
|
14025
14030
|
v[h++] = w[O++], v[h++] = w[O++], v[h++] = w[O++], b -= 3;
|
|
14026
14031
|
b && (v[h++] = w[O++], 1 < b && (v[h++] = w[O++]));
|
|
14027
14032
|
} else {
|
|
14028
|
-
for (O = h -
|
|
14033
|
+
for (O = h - Y; v[h++] = v[O++], v[h++] = v[O++], v[h++] = v[O++], 2 < (b -= 3); )
|
|
14029
14034
|
;
|
|
14030
14035
|
b && (v[h++] = v[O++], 1 < b && (v[h++] = v[O++]));
|
|
14031
14036
|
}
|
|
@@ -14079,17 +14084,17 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
14079
14084
|
}
|
|
14080
14085
|
O.lencode = y, O.lenbits = 9, O.distcode = M, O.distbits = 5;
|
|
14081
14086
|
}
|
|
14082
|
-
function
|
|
14083
|
-
var
|
|
14084
|
-
return
|
|
14087
|
+
function Y(O, w, g, v) {
|
|
14088
|
+
var q, G = O.state;
|
|
14089
|
+
return G.window === null && (G.wsize = 1 << G.wbits, G.wnext = 0, G.whave = 0, G.window = new n.Buf8(G.wsize)), v >= G.wsize ? (n.arraySet(G.window, w, g - G.wsize, G.wsize, 0), G.wnext = 0, G.whave = G.wsize) : (v < (q = G.wsize - G.wnext) && (q = v), n.arraySet(G.window, w, g - v, q, G.wnext), (v -= q) ? (n.arraySet(G.window, w, g - v, v, 0), G.wnext = v, G.whave = G.wsize) : (G.wnext += q, G.wnext === G.wsize && (G.wnext = 0), G.whave < G.wsize && (G.whave += q))), 0;
|
|
14085
14090
|
}
|
|
14086
14091
|
s.inflateReset = R, s.inflateReset2 = S, s.inflateResetKeep = F, s.inflateInit = function(O) {
|
|
14087
14092
|
return N(O, 15);
|
|
14088
14093
|
}, s.inflateInit2 = N, s.inflate = function(O, w) {
|
|
14089
|
-
var g, v,
|
|
14094
|
+
var g, v, q, G, et, W, nt, V, x, ot, it, tt, St, yt, at, It, ft, Ct, Ht, Dt, A, X, k, P, _ = 0, U = new n.Buf8(4), $ = [16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15];
|
|
14090
14095
|
if (!O || !O.state || !O.output || !O.input && O.avail_in !== 0)
|
|
14091
14096
|
return u;
|
|
14092
|
-
(g = O.state).mode === 12 && (g.mode = 13), et = O.next_out,
|
|
14097
|
+
(g = O.state).mode === 12 && (g.mode = 13), et = O.next_out, q = O.output, nt = O.avail_out, G = O.next_in, v = O.input, W = O.avail_in, V = g.hold, x = g.bits, ot = W, it = nt, X = I;
|
|
14093
14098
|
t:
|
|
14094
14099
|
for (; ; )
|
|
14095
14100
|
switch (g.mode) {
|
|
@@ -14101,35 +14106,35 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
14101
14106
|
for (; x < 16; ) {
|
|
14102
14107
|
if (W === 0)
|
|
14103
14108
|
break t;
|
|
14104
|
-
W--,
|
|
14109
|
+
W--, V += v[G++] << x, x += 8;
|
|
14105
14110
|
}
|
|
14106
|
-
if (2 & g.wrap &&
|
|
14107
|
-
U[g.check = 0] = 255 &
|
|
14111
|
+
if (2 & g.wrap && V === 35615) {
|
|
14112
|
+
U[g.check = 0] = 255 & V, U[1] = V >>> 8 & 255, g.check = o(g.check, U, 2, 0), x = V = 0, g.mode = 2;
|
|
14108
14113
|
break;
|
|
14109
14114
|
}
|
|
14110
|
-
if (g.flags = 0, g.head && (g.head.done = !1), !(1 & g.wrap) || (((255 &
|
|
14115
|
+
if (g.flags = 0, g.head && (g.head.done = !1), !(1 & g.wrap) || (((255 & V) << 8) + (V >> 8)) % 31) {
|
|
14111
14116
|
O.msg = "incorrect header check", g.mode = 30;
|
|
14112
14117
|
break;
|
|
14113
14118
|
}
|
|
14114
|
-
if ((15 &
|
|
14119
|
+
if ((15 & V) != 8) {
|
|
14115
14120
|
O.msg = "unknown compression method", g.mode = 30;
|
|
14116
14121
|
break;
|
|
14117
14122
|
}
|
|
14118
|
-
if (x -= 4, A = 8 + (15 & (
|
|
14123
|
+
if (x -= 4, A = 8 + (15 & (V >>>= 4)), g.wbits === 0)
|
|
14119
14124
|
g.wbits = A;
|
|
14120
14125
|
else if (A > g.wbits) {
|
|
14121
14126
|
O.msg = "invalid window size", g.mode = 30;
|
|
14122
14127
|
break;
|
|
14123
14128
|
}
|
|
14124
|
-
g.dmax = 1 << A, O.adler = g.check = 1, g.mode = 512 &
|
|
14129
|
+
g.dmax = 1 << A, O.adler = g.check = 1, g.mode = 512 & V ? 10 : 12, x = V = 0;
|
|
14125
14130
|
break;
|
|
14126
14131
|
case 2:
|
|
14127
14132
|
for (; x < 16; ) {
|
|
14128
14133
|
if (W === 0)
|
|
14129
14134
|
break t;
|
|
14130
|
-
W--,
|
|
14135
|
+
W--, V += v[G++] << x, x += 8;
|
|
14131
14136
|
}
|
|
14132
|
-
if (g.flags =
|
|
14137
|
+
if (g.flags = V, (255 & g.flags) != 8) {
|
|
14133
14138
|
O.msg = "unknown compression method", g.mode = 30;
|
|
14134
14139
|
break;
|
|
14135
14140
|
}
|
|
@@ -14137,43 +14142,43 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
14137
14142
|
O.msg = "unknown header flags set", g.mode = 30;
|
|
14138
14143
|
break;
|
|
14139
14144
|
}
|
|
14140
|
-
g.head && (g.head.text =
|
|
14145
|
+
g.head && (g.head.text = V >> 8 & 1), 512 & g.flags && (U[0] = 255 & V, U[1] = V >>> 8 & 255, g.check = o(g.check, U, 2, 0)), x = V = 0, g.mode = 3;
|
|
14141
14146
|
case 3:
|
|
14142
14147
|
for (; x < 32; ) {
|
|
14143
14148
|
if (W === 0)
|
|
14144
14149
|
break t;
|
|
14145
|
-
W--,
|
|
14150
|
+
W--, V += v[G++] << x, x += 8;
|
|
14146
14151
|
}
|
|
14147
|
-
g.head && (g.head.time =
|
|
14152
|
+
g.head && (g.head.time = V), 512 & g.flags && (U[0] = 255 & V, U[1] = V >>> 8 & 255, U[2] = V >>> 16 & 255, U[3] = V >>> 24 & 255, g.check = o(g.check, U, 4, 0)), x = V = 0, g.mode = 4;
|
|
14148
14153
|
case 4:
|
|
14149
14154
|
for (; x < 16; ) {
|
|
14150
14155
|
if (W === 0)
|
|
14151
14156
|
break t;
|
|
14152
|
-
W--,
|
|
14157
|
+
W--, V += v[G++] << x, x += 8;
|
|
14153
14158
|
}
|
|
14154
|
-
g.head && (g.head.xflags = 255 &
|
|
14159
|
+
g.head && (g.head.xflags = 255 & V, g.head.os = V >> 8), 512 & g.flags && (U[0] = 255 & V, U[1] = V >>> 8 & 255, g.check = o(g.check, U, 2, 0)), x = V = 0, g.mode = 5;
|
|
14155
14160
|
case 5:
|
|
14156
14161
|
if (1024 & g.flags) {
|
|
14157
14162
|
for (; x < 16; ) {
|
|
14158
14163
|
if (W === 0)
|
|
14159
14164
|
break t;
|
|
14160
|
-
W--,
|
|
14165
|
+
W--, V += v[G++] << x, x += 8;
|
|
14161
14166
|
}
|
|
14162
|
-
g.length =
|
|
14167
|
+
g.length = V, g.head && (g.head.extra_len = V), 512 & g.flags && (U[0] = 255 & V, U[1] = V >>> 8 & 255, g.check = o(g.check, U, 2, 0)), x = V = 0;
|
|
14163
14168
|
} else
|
|
14164
14169
|
g.head && (g.head.extra = null);
|
|
14165
14170
|
g.mode = 6;
|
|
14166
14171
|
case 6:
|
|
14167
|
-
if (1024 & g.flags && (W < (tt = g.length) && (tt = W), tt && (g.head && (A = g.head.extra_len - g.length, g.head.extra || (g.head.extra = new Array(g.head.extra_len)), n.arraySet(g.head.extra, v,
|
|
14172
|
+
if (1024 & g.flags && (W < (tt = g.length) && (tt = W), tt && (g.head && (A = g.head.extra_len - g.length, g.head.extra || (g.head.extra = new Array(g.head.extra_len)), n.arraySet(g.head.extra, v, G, tt, A)), 512 & g.flags && (g.check = o(g.check, v, tt, G)), W -= tt, G += tt, g.length -= tt), g.length))
|
|
14168
14173
|
break t;
|
|
14169
14174
|
g.length = 0, g.mode = 7;
|
|
14170
14175
|
case 7:
|
|
14171
14176
|
if (2048 & g.flags) {
|
|
14172
14177
|
if (W === 0)
|
|
14173
14178
|
break t;
|
|
14174
|
-
for (tt = 0; A = v[
|
|
14179
|
+
for (tt = 0; A = v[G + tt++], g.head && A && g.length < 65536 && (g.head.name += String.fromCharCode(A)), A && tt < W; )
|
|
14175
14180
|
;
|
|
14176
|
-
if (512 & g.flags && (g.check = o(g.check, v, tt,
|
|
14181
|
+
if (512 & g.flags && (g.check = o(g.check, v, tt, G)), W -= tt, G += tt, A)
|
|
14177
14182
|
break t;
|
|
14178
14183
|
} else
|
|
14179
14184
|
g.head && (g.head.name = null);
|
|
@@ -14182,9 +14187,9 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
14182
14187
|
if (4096 & g.flags) {
|
|
14183
14188
|
if (W === 0)
|
|
14184
14189
|
break t;
|
|
14185
|
-
for (tt = 0; A = v[
|
|
14190
|
+
for (tt = 0; A = v[G + tt++], g.head && A && g.length < 65536 && (g.head.comment += String.fromCharCode(A)), A && tt < W; )
|
|
14186
14191
|
;
|
|
14187
|
-
if (512 & g.flags && (g.check = o(g.check, v, tt,
|
|
14192
|
+
if (512 & g.flags && (g.check = o(g.check, v, tt, G)), W -= tt, G += tt, A)
|
|
14188
14193
|
break t;
|
|
14189
14194
|
} else
|
|
14190
14195
|
g.head && (g.head.comment = null);
|
|
@@ -14194,13 +14199,13 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
14194
14199
|
for (; x < 16; ) {
|
|
14195
14200
|
if (W === 0)
|
|
14196
14201
|
break t;
|
|
14197
|
-
W--,
|
|
14202
|
+
W--, V += v[G++] << x, x += 8;
|
|
14198
14203
|
}
|
|
14199
|
-
if (
|
|
14204
|
+
if (V !== (65535 & g.check)) {
|
|
14200
14205
|
O.msg = "header crc mismatch", g.mode = 30;
|
|
14201
14206
|
break;
|
|
14202
14207
|
}
|
|
14203
|
-
x =
|
|
14208
|
+
x = V = 0;
|
|
14204
14209
|
}
|
|
14205
14210
|
g.head && (g.head.hcrc = g.flags >> 9 & 1, g.head.done = !0), O.adler = g.check = 0, g.mode = 12;
|
|
14206
14211
|
break;
|
|
@@ -14208,34 +14213,34 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
14208
14213
|
for (; x < 32; ) {
|
|
14209
14214
|
if (W === 0)
|
|
14210
14215
|
break t;
|
|
14211
|
-
W--,
|
|
14216
|
+
W--, V += v[G++] << x, x += 8;
|
|
14212
14217
|
}
|
|
14213
|
-
O.adler = g.check = p(
|
|
14218
|
+
O.adler = g.check = p(V), x = V = 0, g.mode = 11;
|
|
14214
14219
|
case 11:
|
|
14215
14220
|
if (g.havedict === 0)
|
|
14216
|
-
return O.next_out = et, O.avail_out = nt, O.next_in =
|
|
14221
|
+
return O.next_out = et, O.avail_out = nt, O.next_in = G, O.avail_in = W, g.hold = V, g.bits = x, 2;
|
|
14217
14222
|
O.adler = g.check = 1, g.mode = 12;
|
|
14218
14223
|
case 12:
|
|
14219
14224
|
if (w === 5 || w === 6)
|
|
14220
14225
|
break t;
|
|
14221
14226
|
case 13:
|
|
14222
14227
|
if (g.last) {
|
|
14223
|
-
|
|
14228
|
+
V >>>= 7 & x, x -= 7 & x, g.mode = 27;
|
|
14224
14229
|
break;
|
|
14225
14230
|
}
|
|
14226
14231
|
for (; x < 3; ) {
|
|
14227
14232
|
if (W === 0)
|
|
14228
14233
|
break t;
|
|
14229
|
-
W--,
|
|
14234
|
+
W--, V += v[G++] << x, x += 8;
|
|
14230
14235
|
}
|
|
14231
|
-
switch (g.last = 1 &
|
|
14236
|
+
switch (g.last = 1 & V, x -= 1, 3 & (V >>>= 1)) {
|
|
14232
14237
|
case 0:
|
|
14233
14238
|
g.mode = 14;
|
|
14234
14239
|
break;
|
|
14235
14240
|
case 1:
|
|
14236
14241
|
if (b(g), g.mode = 20, w !== 6)
|
|
14237
14242
|
break;
|
|
14238
|
-
|
|
14243
|
+
V >>>= 2, x -= 2;
|
|
14239
14244
|
break t;
|
|
14240
14245
|
case 2:
|
|
14241
14246
|
g.mode = 17;
|
|
@@ -14243,19 +14248,19 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
14243
14248
|
case 3:
|
|
14244
14249
|
O.msg = "invalid block type", g.mode = 30;
|
|
14245
14250
|
}
|
|
14246
|
-
|
|
14251
|
+
V >>>= 2, x -= 2;
|
|
14247
14252
|
break;
|
|
14248
14253
|
case 14:
|
|
14249
|
-
for (
|
|
14254
|
+
for (V >>>= 7 & x, x -= 7 & x; x < 32; ) {
|
|
14250
14255
|
if (W === 0)
|
|
14251
14256
|
break t;
|
|
14252
|
-
W--,
|
|
14257
|
+
W--, V += v[G++] << x, x += 8;
|
|
14253
14258
|
}
|
|
14254
|
-
if ((65535 &
|
|
14259
|
+
if ((65535 & V) != (V >>> 16 ^ 65535)) {
|
|
14255
14260
|
O.msg = "invalid stored block lengths", g.mode = 30;
|
|
14256
14261
|
break;
|
|
14257
14262
|
}
|
|
14258
|
-
if (g.length = 65535 &
|
|
14263
|
+
if (g.length = 65535 & V, x = V = 0, g.mode = 15, w === 6)
|
|
14259
14264
|
break t;
|
|
14260
14265
|
case 15:
|
|
14261
14266
|
g.mode = 16;
|
|
@@ -14263,7 +14268,7 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
14263
14268
|
if (tt = g.length) {
|
|
14264
14269
|
if (W < tt && (tt = W), nt < tt && (tt = nt), tt === 0)
|
|
14265
14270
|
break t;
|
|
14266
|
-
n.arraySet(
|
|
14271
|
+
n.arraySet(q, v, G, tt, et), W -= tt, G += tt, nt -= tt, et += tt, g.length -= tt;
|
|
14267
14272
|
break;
|
|
14268
14273
|
}
|
|
14269
14274
|
g.mode = 12;
|
|
@@ -14272,9 +14277,9 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
14272
14277
|
for (; x < 14; ) {
|
|
14273
14278
|
if (W === 0)
|
|
14274
14279
|
break t;
|
|
14275
|
-
W--,
|
|
14280
|
+
W--, V += v[G++] << x, x += 8;
|
|
14276
14281
|
}
|
|
14277
|
-
if (g.nlen = 257 + (31 &
|
|
14282
|
+
if (g.nlen = 257 + (31 & V), V >>>= 5, x -= 5, g.ndist = 1 + (31 & V), V >>>= 5, x -= 5, g.ncode = 4 + (15 & V), V >>>= 4, x -= 4, 286 < g.nlen || 30 < g.ndist) {
|
|
14278
14283
|
O.msg = "too many length or distance symbols", g.mode = 30;
|
|
14279
14284
|
break;
|
|
14280
14285
|
}
|
|
@@ -14284,9 +14289,9 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
14284
14289
|
for (; x < 3; ) {
|
|
14285
14290
|
if (W === 0)
|
|
14286
14291
|
break t;
|
|
14287
|
-
W--,
|
|
14292
|
+
W--, V += v[G++] << x, x += 8;
|
|
14288
14293
|
}
|
|
14289
|
-
g.lens[$[g.have++]] = 7 &
|
|
14294
|
+
g.lens[$[g.have++]] = 7 & V, V >>>= 3, x -= 3;
|
|
14290
14295
|
}
|
|
14291
14296
|
for (; g.have < 19; )
|
|
14292
14297
|
g.lens[$[g.have++]] = 0;
|
|
@@ -14297,39 +14302,39 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
14297
14302
|
g.have = 0, g.mode = 19;
|
|
14298
14303
|
case 19:
|
|
14299
14304
|
for (; g.have < g.nlen + g.ndist; ) {
|
|
14300
|
-
for (; It = (_ = g.lencode[
|
|
14305
|
+
for (; It = (_ = g.lencode[V & (1 << g.lenbits) - 1]) >>> 16 & 255, ft = 65535 & _, !((at = _ >>> 24) <= x); ) {
|
|
14301
14306
|
if (W === 0)
|
|
14302
14307
|
break t;
|
|
14303
|
-
W--,
|
|
14308
|
+
W--, V += v[G++] << x, x += 8;
|
|
14304
14309
|
}
|
|
14305
14310
|
if (ft < 16)
|
|
14306
|
-
|
|
14311
|
+
V >>>= at, x -= at, g.lens[g.have++] = ft;
|
|
14307
14312
|
else {
|
|
14308
14313
|
if (ft === 16) {
|
|
14309
14314
|
for (P = at + 2; x < P; ) {
|
|
14310
14315
|
if (W === 0)
|
|
14311
14316
|
break t;
|
|
14312
|
-
W--,
|
|
14317
|
+
W--, V += v[G++] << x, x += 8;
|
|
14313
14318
|
}
|
|
14314
|
-
if (
|
|
14319
|
+
if (V >>>= at, x -= at, g.have === 0) {
|
|
14315
14320
|
O.msg = "invalid bit length repeat", g.mode = 30;
|
|
14316
14321
|
break;
|
|
14317
14322
|
}
|
|
14318
|
-
A = g.lens[g.have - 1], tt = 3 + (3 &
|
|
14323
|
+
A = g.lens[g.have - 1], tt = 3 + (3 & V), V >>>= 2, x -= 2;
|
|
14319
14324
|
} else if (ft === 17) {
|
|
14320
14325
|
for (P = at + 3; x < P; ) {
|
|
14321
14326
|
if (W === 0)
|
|
14322
14327
|
break t;
|
|
14323
|
-
W--,
|
|
14328
|
+
W--, V += v[G++] << x, x += 8;
|
|
14324
14329
|
}
|
|
14325
|
-
x -= at, A = 0, tt = 3 + (7 & (
|
|
14330
|
+
x -= at, A = 0, tt = 3 + (7 & (V >>>= at)), V >>>= 3, x -= 3;
|
|
14326
14331
|
} else {
|
|
14327
14332
|
for (P = at + 7; x < P; ) {
|
|
14328
14333
|
if (W === 0)
|
|
14329
14334
|
break t;
|
|
14330
|
-
W--,
|
|
14335
|
+
W--, V += v[G++] << x, x += 8;
|
|
14331
14336
|
}
|
|
14332
|
-
x -= at, A = 0, tt = 11 + (127 & (
|
|
14337
|
+
x -= at, A = 0, tt = 11 + (127 & (V >>>= at)), V >>>= 7, x -= 7;
|
|
14333
14338
|
}
|
|
14334
14339
|
if (g.have + tt > g.nlen + g.ndist) {
|
|
14335
14340
|
O.msg = "invalid bit length repeat", g.mode = 30;
|
|
@@ -14359,23 +14364,23 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
14359
14364
|
g.mode = 21;
|
|
14360
14365
|
case 21:
|
|
14361
14366
|
if (6 <= W && 258 <= nt) {
|
|
14362
|
-
O.next_out = et, O.avail_out = nt, O.next_in =
|
|
14367
|
+
O.next_out = et, O.avail_out = nt, O.next_in = G, O.avail_in = W, g.hold = V, g.bits = x, a(O, it), et = O.next_out, q = O.output, nt = O.avail_out, G = O.next_in, v = O.input, W = O.avail_in, V = g.hold, x = g.bits, g.mode === 12 && (g.back = -1);
|
|
14363
14368
|
break;
|
|
14364
14369
|
}
|
|
14365
|
-
for (g.back = 0; It = (_ = g.lencode[
|
|
14370
|
+
for (g.back = 0; It = (_ = g.lencode[V & (1 << g.lenbits) - 1]) >>> 16 & 255, ft = 65535 & _, !((at = _ >>> 24) <= x); ) {
|
|
14366
14371
|
if (W === 0)
|
|
14367
14372
|
break t;
|
|
14368
|
-
W--,
|
|
14373
|
+
W--, V += v[G++] << x, x += 8;
|
|
14369
14374
|
}
|
|
14370
14375
|
if (It && !(240 & It)) {
|
|
14371
|
-
for (Ct = at, Ht = It, Dt = ft; It = (_ = g.lencode[Dt + ((
|
|
14376
|
+
for (Ct = at, Ht = It, Dt = ft; It = (_ = g.lencode[Dt + ((V & (1 << Ct + Ht) - 1) >> Ct)]) >>> 16 & 255, ft = 65535 & _, !(Ct + (at = _ >>> 24) <= x); ) {
|
|
14372
14377
|
if (W === 0)
|
|
14373
14378
|
break t;
|
|
14374
|
-
W--,
|
|
14379
|
+
W--, V += v[G++] << x, x += 8;
|
|
14375
14380
|
}
|
|
14376
|
-
|
|
14381
|
+
V >>>= Ct, x -= Ct, g.back += Ct;
|
|
14377
14382
|
}
|
|
14378
|
-
if (
|
|
14383
|
+
if (V >>>= at, x -= at, g.back += at, g.length = ft, It === 0) {
|
|
14379
14384
|
g.mode = 26;
|
|
14380
14385
|
break;
|
|
14381
14386
|
}
|
|
@@ -14393,26 +14398,26 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
14393
14398
|
for (P = g.extra; x < P; ) {
|
|
14394
14399
|
if (W === 0)
|
|
14395
14400
|
break t;
|
|
14396
|
-
W--,
|
|
14401
|
+
W--, V += v[G++] << x, x += 8;
|
|
14397
14402
|
}
|
|
14398
|
-
g.length +=
|
|
14403
|
+
g.length += V & (1 << g.extra) - 1, V >>>= g.extra, x -= g.extra, g.back += g.extra;
|
|
14399
14404
|
}
|
|
14400
14405
|
g.was = g.length, g.mode = 23;
|
|
14401
14406
|
case 23:
|
|
14402
|
-
for (; It = (_ = g.distcode[
|
|
14407
|
+
for (; It = (_ = g.distcode[V & (1 << g.distbits) - 1]) >>> 16 & 255, ft = 65535 & _, !((at = _ >>> 24) <= x); ) {
|
|
14403
14408
|
if (W === 0)
|
|
14404
14409
|
break t;
|
|
14405
|
-
W--,
|
|
14410
|
+
W--, V += v[G++] << x, x += 8;
|
|
14406
14411
|
}
|
|
14407
14412
|
if (!(240 & It)) {
|
|
14408
|
-
for (Ct = at, Ht = It, Dt = ft; It = (_ = g.distcode[Dt + ((
|
|
14413
|
+
for (Ct = at, Ht = It, Dt = ft; It = (_ = g.distcode[Dt + ((V & (1 << Ct + Ht) - 1) >> Ct)]) >>> 16 & 255, ft = 65535 & _, !(Ct + (at = _ >>> 24) <= x); ) {
|
|
14409
14414
|
if (W === 0)
|
|
14410
14415
|
break t;
|
|
14411
|
-
W--,
|
|
14416
|
+
W--, V += v[G++] << x, x += 8;
|
|
14412
14417
|
}
|
|
14413
|
-
|
|
14418
|
+
V >>>= Ct, x -= Ct, g.back += Ct;
|
|
14414
14419
|
}
|
|
14415
|
-
if (
|
|
14420
|
+
if (V >>>= at, x -= at, g.back += at, 64 & It) {
|
|
14416
14421
|
O.msg = "invalid distance code", g.mode = 30;
|
|
14417
14422
|
break;
|
|
14418
14423
|
}
|
|
@@ -14422,9 +14427,9 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
14422
14427
|
for (P = g.extra; x < P; ) {
|
|
14423
14428
|
if (W === 0)
|
|
14424
14429
|
break t;
|
|
14425
|
-
W--,
|
|
14430
|
+
W--, V += v[G++] << x, x += 8;
|
|
14426
14431
|
}
|
|
14427
|
-
g.offset +=
|
|
14432
|
+
g.offset += V & (1 << g.extra) - 1, V >>>= g.extra, x -= g.extra, g.back += g.extra;
|
|
14428
14433
|
}
|
|
14429
14434
|
if (g.offset > g.dmax) {
|
|
14430
14435
|
O.msg = "invalid distance too far back", g.mode = 30;
|
|
@@ -14441,28 +14446,28 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
14441
14446
|
}
|
|
14442
14447
|
St = tt > g.wnext ? (tt -= g.wnext, g.wsize - tt) : g.wnext - tt, tt > g.length && (tt = g.length), yt = g.window;
|
|
14443
14448
|
} else
|
|
14444
|
-
yt =
|
|
14445
|
-
for (nt < tt && (tt = nt), nt -= tt, g.length -= tt;
|
|
14449
|
+
yt = q, St = et - g.offset, tt = g.length;
|
|
14450
|
+
for (nt < tt && (tt = nt), nt -= tt, g.length -= tt; q[et++] = yt[St++], --tt; )
|
|
14446
14451
|
;
|
|
14447
14452
|
g.length === 0 && (g.mode = 21);
|
|
14448
14453
|
break;
|
|
14449
14454
|
case 26:
|
|
14450
14455
|
if (nt === 0)
|
|
14451
14456
|
break t;
|
|
14452
|
-
|
|
14457
|
+
q[et++] = g.length, nt--, g.mode = 21;
|
|
14453
14458
|
break;
|
|
14454
14459
|
case 27:
|
|
14455
14460
|
if (g.wrap) {
|
|
14456
14461
|
for (; x < 32; ) {
|
|
14457
14462
|
if (W === 0)
|
|
14458
14463
|
break t;
|
|
14459
|
-
W--,
|
|
14464
|
+
W--, V |= v[G++] << x, x += 8;
|
|
14460
14465
|
}
|
|
14461
|
-
if (it -= nt, O.total_out += it, g.total += it, it && (O.adler = g.check = g.flags ? o(g.check,
|
|
14466
|
+
if (it -= nt, O.total_out += it, g.total += it, it && (O.adler = g.check = g.flags ? o(g.check, q, it, et - it) : r(g.check, q, it, et - it)), it = nt, (g.flags ? V : p(V)) !== g.check) {
|
|
14462
14467
|
O.msg = "incorrect data check", g.mode = 30;
|
|
14463
14468
|
break;
|
|
14464
14469
|
}
|
|
14465
|
-
x =
|
|
14470
|
+
x = V = 0;
|
|
14466
14471
|
}
|
|
14467
14472
|
g.mode = 28;
|
|
14468
14473
|
case 28:
|
|
@@ -14470,13 +14475,13 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
14470
14475
|
for (; x < 32; ) {
|
|
14471
14476
|
if (W === 0)
|
|
14472
14477
|
break t;
|
|
14473
|
-
W--,
|
|
14478
|
+
W--, V += v[G++] << x, x += 8;
|
|
14474
14479
|
}
|
|
14475
|
-
if (
|
|
14480
|
+
if (V !== (4294967295 & g.total)) {
|
|
14476
14481
|
O.msg = "incorrect length check", g.mode = 30;
|
|
14477
14482
|
break;
|
|
14478
14483
|
}
|
|
14479
|
-
x =
|
|
14484
|
+
x = V = 0;
|
|
14480
14485
|
}
|
|
14481
14486
|
g.mode = 29;
|
|
14482
14487
|
case 29:
|
|
@@ -14491,7 +14496,7 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
14491
14496
|
default:
|
|
14492
14497
|
return u;
|
|
14493
14498
|
}
|
|
14494
|
-
return O.next_out = et, O.avail_out = nt, O.next_in =
|
|
14499
|
+
return O.next_out = et, O.avail_out = nt, O.next_in = G, O.avail_in = W, g.hold = V, g.bits = x, (g.wsize || it !== O.avail_out && g.mode < 30 && (g.mode < 27 || w !== 4)) && Y(O, O.output, O.next_out, it - O.avail_out) ? (g.mode = 31, -4) : (ot -= O.avail_in, it -= O.avail_out, O.total_in += ot, O.total_out += it, g.total += it, g.wrap && it && (O.adler = g.check = g.flags ? o(g.check, q, it, O.next_out - it) : r(g.check, q, it, O.next_out - it)), O.data_type = g.bits + (g.last ? 64 : 0) + (g.mode === 12 ? 128 : 0) + (g.mode === 20 || g.mode === 15 ? 256 : 0), (ot == 0 && it === 0 || w === 4) && X === I && (X = -5), X);
|
|
14495
14500
|
}, s.inflateEnd = function(O) {
|
|
14496
14501
|
if (!O || !O.state)
|
|
14497
14502
|
return u;
|
|
@@ -14502,23 +14507,23 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
14502
14507
|
return O && O.state && 2 & (g = O.state).wrap ? ((g.head = w).done = !1, I) : u;
|
|
14503
14508
|
}, s.inflateSetDictionary = function(O, w) {
|
|
14504
14509
|
var g, v = w.length;
|
|
14505
|
-
return O && O.state ? (g = O.state).wrap !== 0 && g.mode !== 11 ? u : g.mode === 11 && r(1, w, v, 0) !== g.check ? -3 :
|
|
14510
|
+
return O && O.state ? (g = O.state).wrap !== 0 && g.mode !== 11 ? u : g.mode === 11 && r(1, w, v, 0) !== g.check ? -3 : Y(O, w, v, v) ? (g.mode = 31, -4) : (g.havedict = 1, I) : u;
|
|
14506
14511
|
}, s.inflateInfo = "pako inflate (from Nodeca project)";
|
|
14507
14512
|
}, { "../utils/common": 41, "./adler32": 43, "./crc32": 45, "./inffast": 48, "./inftrees": 50 }], 50: [function(t, e, s) {
|
|
14508
14513
|
var n = t("../utils/common"), r = [3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31, 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0], o = [16, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 18, 18, 18, 18, 19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 72, 78], a = [1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193, 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145, 8193, 12289, 16385, 24577, 0, 0], l = [16, 16, 16, 16, 17, 17, 18, 18, 19, 19, 20, 20, 21, 21, 22, 22, 23, 23, 24, 24, 25, 25, 26, 26, 27, 27, 28, 28, 29, 29, 64, 64];
|
|
14509
14514
|
e.exports = function(h, f, I, u, d, E, T, p) {
|
|
14510
|
-
var m, F, R, S, N, y, M, L, b,
|
|
14515
|
+
var m, F, R, S, N, y, M, L, b, Y = p.bits, O = 0, w = 0, g = 0, v = 0, q = 0, G = 0, et = 0, W = 0, nt = 0, V = 0, x = null, ot = 0, it = new n.Buf16(16), tt = new n.Buf16(16), St = null, yt = 0;
|
|
14511
14516
|
for (O = 0; O <= 15; O++)
|
|
14512
14517
|
it[O] = 0;
|
|
14513
14518
|
for (w = 0; w < u; w++)
|
|
14514
14519
|
it[f[I + w]]++;
|
|
14515
|
-
for (
|
|
14520
|
+
for (q = Y, v = 15; 1 <= v && it[v] === 0; v--)
|
|
14516
14521
|
;
|
|
14517
|
-
if (v <
|
|
14522
|
+
if (v < q && (q = v), v === 0)
|
|
14518
14523
|
return d[E++] = 20971520, d[E++] = 20971520, p.bits = 1, 0;
|
|
14519
14524
|
for (g = 1; g < v && it[g] === 0; g++)
|
|
14520
14525
|
;
|
|
14521
|
-
for (
|
|
14526
|
+
for (q < g && (q = g), O = W = 1; O <= 15; O++)
|
|
14522
14527
|
if (W <<= 1, (W -= it[O]) < 0)
|
|
14523
14528
|
return -1;
|
|
14524
14529
|
if (0 < W && (h === 0 || v !== 1))
|
|
@@ -14527,27 +14532,27 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
14527
14532
|
tt[O + 1] = tt[O] + it[O];
|
|
14528
14533
|
for (w = 0; w < u; w++)
|
|
14529
14534
|
f[I + w] !== 0 && (T[tt[f[I + w]]++] = w);
|
|
14530
|
-
if (y = h === 0 ? (x = St = T, 19) : h === 1 ? (x = r, ot -= 257, St = o, yt -= 257, 256) : (x = a, St = l, -1), O = g, N = E, et = w =
|
|
14535
|
+
if (y = h === 0 ? (x = St = T, 19) : h === 1 ? (x = r, ot -= 257, St = o, yt -= 257, 256) : (x = a, St = l, -1), O = g, N = E, et = w = V = 0, R = -1, S = (nt = 1 << (G = q)) - 1, h === 1 && 852 < nt || h === 2 && 592 < nt)
|
|
14531
14536
|
return 1;
|
|
14532
14537
|
for (; ; ) {
|
|
14533
|
-
for (M = O - et, b = T[w] < y ? (L = 0, T[w]) : T[w] > y ? (L = St[yt + T[w]], x[ot + T[w]]) : (L = 96, 0), m = 1 << O - et, g = F = 1 <<
|
|
14538
|
+
for (M = O - et, b = T[w] < y ? (L = 0, T[w]) : T[w] > y ? (L = St[yt + T[w]], x[ot + T[w]]) : (L = 96, 0), m = 1 << O - et, g = F = 1 << G; d[N + (V >> et) + (F -= m)] = M << 24 | L << 16 | b | 0, F !== 0; )
|
|
14534
14539
|
;
|
|
14535
|
-
for (m = 1 << O - 1;
|
|
14540
|
+
for (m = 1 << O - 1; V & m; )
|
|
14536
14541
|
m >>= 1;
|
|
14537
|
-
if (m !== 0 ? (
|
|
14542
|
+
if (m !== 0 ? (V &= m - 1, V += m) : V = 0, w++, --it[O] == 0) {
|
|
14538
14543
|
if (O === v)
|
|
14539
14544
|
break;
|
|
14540
14545
|
O = f[I + T[w]];
|
|
14541
14546
|
}
|
|
14542
|
-
if (
|
|
14543
|
-
for (et === 0 && (et =
|
|
14544
|
-
|
|
14545
|
-
if (nt += 1 <<
|
|
14547
|
+
if (q < O && (V & S) !== R) {
|
|
14548
|
+
for (et === 0 && (et = q), N += g, W = 1 << (G = O - et); G + et < v && !((W -= it[G + et]) <= 0); )
|
|
14549
|
+
G++, W <<= 1;
|
|
14550
|
+
if (nt += 1 << G, h === 1 && 852 < nt || h === 2 && 592 < nt)
|
|
14546
14551
|
return 1;
|
|
14547
|
-
d[R =
|
|
14552
|
+
d[R = V & S] = q << 24 | G << 16 | N - E | 0;
|
|
14548
14553
|
}
|
|
14549
14554
|
}
|
|
14550
|
-
return
|
|
14555
|
+
return V !== 0 && (d[N + V] = O - et << 24 | 64 << 16 | 0), p.bits = q, 0;
|
|
14551
14556
|
};
|
|
14552
14557
|
}, { "../utils/common": 41 }], 51: [function(t, e, s) {
|
|
14553
14558
|
e.exports = { 2: "need dictionary", 1: "stream end", 0: "", "-1": "file error", "-2": "stream error", "-3": "data error", "-4": "insufficient memory", "-5": "buffer error", "-6": "incompatible version" };
|
|
@@ -14557,8 +14562,8 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
14557
14562
|
for (var U = _.length; 0 <= --U; )
|
|
14558
14563
|
_[U] = 0;
|
|
14559
14564
|
}
|
|
14560
|
-
var l = 0, h = 29, f = 256, I = f + 1 + h, u = 30, d = 19, E = 2 * I + 1, T = 15, p = 16, m = 7, F = 256, R = 16, S = 17, N = 18, y = [0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0], M = [0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13], L = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 3, 7], b = [16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15],
|
|
14561
|
-
a(
|
|
14565
|
+
var l = 0, h = 29, f = 256, I = f + 1 + h, u = 30, d = 19, E = 2 * I + 1, T = 15, p = 16, m = 7, F = 256, R = 16, S = 17, N = 18, y = [0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0], M = [0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13], L = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 3, 7], b = [16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15], Y = new Array(2 * (I + 2));
|
|
14566
|
+
a(Y);
|
|
14562
14567
|
var O = new Array(2 * u);
|
|
14563
14568
|
a(O);
|
|
14564
14569
|
var w = new Array(512);
|
|
@@ -14567,11 +14572,11 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
14567
14572
|
a(g);
|
|
14568
14573
|
var v = new Array(h);
|
|
14569
14574
|
a(v);
|
|
14570
|
-
var
|
|
14571
|
-
function nt(_, U, $,
|
|
14572
|
-
this.static_tree = _, this.extra_bits = U, this.extra_base = $, this.elems =
|
|
14575
|
+
var q, G, et, W = new Array(u);
|
|
14576
|
+
function nt(_, U, $, Z, B) {
|
|
14577
|
+
this.static_tree = _, this.extra_bits = U, this.extra_base = $, this.elems = Z, this.max_length = B, this.has_stree = _ && _.length;
|
|
14573
14578
|
}
|
|
14574
|
-
function
|
|
14579
|
+
function V(_, U) {
|
|
14575
14580
|
this.dyn_tree = _, this.max_code = 0, this.stat_desc = U;
|
|
14576
14581
|
}
|
|
14577
14582
|
function x(_) {
|
|
@@ -14592,9 +14597,9 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
14592
14597
|
return $ >>> 1;
|
|
14593
14598
|
}
|
|
14594
14599
|
function yt(_, U, $) {
|
|
14595
|
-
var
|
|
14596
|
-
for (
|
|
14597
|
-
K[
|
|
14600
|
+
var Z, B, K = new Array(T + 1), st = 0;
|
|
14601
|
+
for (Z = 1; Z <= T; Z++)
|
|
14602
|
+
K[Z] = st = st + $[Z - 1] << 1;
|
|
14598
14603
|
for (B = 0; B <= U; B++) {
|
|
14599
14604
|
var J = _[2 * B + 1];
|
|
14600
14605
|
J !== 0 && (_[2 * B] = St(K[J]++, J));
|
|
@@ -14613,59 +14618,59 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
14613
14618
|
function It(_) {
|
|
14614
14619
|
8 < _.bi_valid ? ot(_, _.bi_buf) : 0 < _.bi_valid && (_.pending_buf[_.pending++] = _.bi_buf), _.bi_buf = 0, _.bi_valid = 0;
|
|
14615
14620
|
}
|
|
14616
|
-
function ft(_, U, $,
|
|
14621
|
+
function ft(_, U, $, Z) {
|
|
14617
14622
|
var B = 2 * U, K = 2 * $;
|
|
14618
|
-
return _[B] < _[K] || _[B] === _[K] &&
|
|
14623
|
+
return _[B] < _[K] || _[B] === _[K] && Z[U] <= Z[$];
|
|
14619
14624
|
}
|
|
14620
14625
|
function Ct(_, U, $) {
|
|
14621
|
-
for (var
|
|
14626
|
+
for (var Z = _.heap[$], B = $ << 1; B <= _.heap_len && (B < _.heap_len && ft(U, _.heap[B + 1], _.heap[B], _.depth) && B++, !ft(U, Z, _.heap[B], _.depth)); )
|
|
14622
14627
|
_.heap[$] = _.heap[B], $ = B, B <<= 1;
|
|
14623
|
-
_.heap[$] =
|
|
14628
|
+
_.heap[$] = Z;
|
|
14624
14629
|
}
|
|
14625
14630
|
function Ht(_, U, $) {
|
|
14626
|
-
var
|
|
14631
|
+
var Z, B, K, st, J = 0;
|
|
14627
14632
|
if (_.last_lit !== 0)
|
|
14628
|
-
for (;
|
|
14633
|
+
for (; Z = _.pending_buf[_.d_buf + 2 * J] << 8 | _.pending_buf[_.d_buf + 2 * J + 1], B = _.pending_buf[_.l_buf + J], J++, Z === 0 ? tt(_, B, U) : (tt(_, (K = g[B]) + f + 1, U), (st = y[K]) !== 0 && it(_, B -= v[K], st), tt(_, K = x(--Z), $), (st = M[K]) !== 0 && it(_, Z -= W[K], st)), J < _.last_lit; )
|
|
14629
14634
|
;
|
|
14630
14635
|
tt(_, F, U);
|
|
14631
14636
|
}
|
|
14632
14637
|
function Dt(_, U) {
|
|
14633
|
-
var $,
|
|
14638
|
+
var $, Z, B, K = U.dyn_tree, st = U.stat_desc.static_tree, J = U.stat_desc.has_stree, ct = U.stat_desc.elems, Rt = -1;
|
|
14634
14639
|
for (_.heap_len = 0, _.heap_max = E, $ = 0; $ < ct; $++)
|
|
14635
14640
|
K[2 * $] !== 0 ? (_.heap[++_.heap_len] = Rt = $, _.depth[$] = 0) : K[2 * $ + 1] = 0;
|
|
14636
14641
|
for (; _.heap_len < 2; )
|
|
14637
14642
|
K[2 * (B = _.heap[++_.heap_len] = Rt < 2 ? ++Rt : 0)] = 1, _.depth[B] = 0, _.opt_len--, J && (_.static_len -= st[2 * B + 1]);
|
|
14638
14643
|
for (U.max_code = Rt, $ = _.heap_len >> 1; 1 <= $; $--)
|
|
14639
14644
|
Ct(_, K, $);
|
|
14640
|
-
for (B = ct; $ = _.heap[1], _.heap[1] = _.heap[_.heap_len--], Ct(_, K, 1),
|
|
14645
|
+
for (B = ct; $ = _.heap[1], _.heap[1] = _.heap[_.heap_len--], Ct(_, K, 1), Z = _.heap[1], _.heap[--_.heap_max] = $, _.heap[--_.heap_max] = Z, K[2 * B] = K[2 * $] + K[2 * Z], _.depth[B] = (_.depth[$] >= _.depth[Z] ? _.depth[$] : _.depth[Z]) + 1, K[2 * $ + 1] = K[2 * Z + 1] = B, _.heap[1] = B++, Ct(_, K, 1), 2 <= _.heap_len; )
|
|
14641
14646
|
;
|
|
14642
14647
|
_.heap[--_.heap_max] = _.heap[1], function(dt, Wt) {
|
|
14643
|
-
var
|
|
14648
|
+
var hi, ce, ui, Lt, Vi, Hs, Ce = Wt.dyn_tree, Hn = Wt.max_code, mo = Wt.stat_desc.static_tree, Ro = Wt.stat_desc.has_stree, go = Wt.stat_desc.extra_bits, Wn = Wt.stat_desc.extra_base, fi = Wt.stat_desc.max_length, Yi = 0;
|
|
14644
14649
|
for (Lt = 0; Lt <= T; Lt++)
|
|
14645
14650
|
dt.bl_count[Lt] = 0;
|
|
14646
|
-
for (Ce[2 * dt.heap[dt.heap_max] + 1] = 0,
|
|
14647
|
-
|
|
14648
|
-
if (
|
|
14651
|
+
for (Ce[2 * dt.heap[dt.heap_max] + 1] = 0, hi = dt.heap_max + 1; hi < E; hi++)
|
|
14652
|
+
fi < (Lt = Ce[2 * Ce[2 * (ce = dt.heap[hi]) + 1] + 1] + 1) && (Lt = fi, Yi++), Ce[2 * ce + 1] = Lt, Hn < ce || (dt.bl_count[Lt]++, Vi = 0, Wn <= ce && (Vi = go[ce - Wn]), Hs = Ce[2 * ce], dt.opt_len += Hs * (Lt + Vi), Ro && (dt.static_len += Hs * (mo[2 * ce + 1] + Vi)));
|
|
14653
|
+
if (Yi !== 0) {
|
|
14649
14654
|
do {
|
|
14650
|
-
for (Lt =
|
|
14655
|
+
for (Lt = fi - 1; dt.bl_count[Lt] === 0; )
|
|
14651
14656
|
Lt--;
|
|
14652
|
-
dt.bl_count[Lt]--, dt.bl_count[Lt + 1] += 2, dt.bl_count[
|
|
14653
|
-
} while (0 <
|
|
14654
|
-
for (Lt =
|
|
14657
|
+
dt.bl_count[Lt]--, dt.bl_count[Lt + 1] += 2, dt.bl_count[fi]--, Yi -= 2;
|
|
14658
|
+
} while (0 < Yi);
|
|
14659
|
+
for (Lt = fi; Lt !== 0; Lt--)
|
|
14655
14660
|
for (ce = dt.bl_count[Lt]; ce !== 0; )
|
|
14656
|
-
Hn < (
|
|
14661
|
+
Hn < (ui = dt.heap[--hi]) || (Ce[2 * ui + 1] !== Lt && (dt.opt_len += (Lt - Ce[2 * ui + 1]) * Ce[2 * ui], Ce[2 * ui + 1] = Lt), ce--);
|
|
14657
14662
|
}
|
|
14658
14663
|
}(_, U), yt(K, Rt, _.bl_count);
|
|
14659
14664
|
}
|
|
14660
14665
|
function A(_, U, $) {
|
|
14661
|
-
var
|
|
14662
|
-
for (st === 0 && (ct = 138, Rt = 3), U[2 * ($ + 1) + 1] = 65535,
|
|
14663
|
-
B = st, st = U[2 * (
|
|
14666
|
+
var Z, B, K = -1, st = U[1], J = 0, ct = 7, Rt = 4;
|
|
14667
|
+
for (st === 0 && (ct = 138, Rt = 3), U[2 * ($ + 1) + 1] = 65535, Z = 0; Z <= $; Z++)
|
|
14668
|
+
B = st, st = U[2 * (Z + 1) + 1], ++J < ct && B === st || (J < Rt ? _.bl_tree[2 * B] += J : B !== 0 ? (B !== K && _.bl_tree[2 * B]++, _.bl_tree[2 * R]++) : J <= 10 ? _.bl_tree[2 * S]++ : _.bl_tree[2 * N]++, K = B, Rt = (J = 0) === st ? (ct = 138, 3) : B === st ? (ct = 6, 3) : (ct = 7, 4));
|
|
14664
14669
|
}
|
|
14665
14670
|
function X(_, U, $) {
|
|
14666
|
-
var
|
|
14667
|
-
for (st === 0 && (ct = 138, Rt = 3),
|
|
14668
|
-
if (B = st, st = U[2 * (
|
|
14671
|
+
var Z, B, K = -1, st = U[1], J = 0, ct = 7, Rt = 4;
|
|
14672
|
+
for (st === 0 && (ct = 138, Rt = 3), Z = 0; Z <= $; Z++)
|
|
14673
|
+
if (B = st, st = U[2 * (Z + 1) + 1], !(++J < ct && B === st)) {
|
|
14669
14674
|
if (J < Rt)
|
|
14670
14675
|
for (; tt(_, B, _.bl_tree), --J != 0; )
|
|
14671
14676
|
;
|
|
@@ -14676,18 +14681,18 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
14676
14681
|
}
|
|
14677
14682
|
a(W);
|
|
14678
14683
|
var k = !1;
|
|
14679
|
-
function P(_, U, $,
|
|
14680
|
-
it(_, (l << 1) + (
|
|
14684
|
+
function P(_, U, $, Z) {
|
|
14685
|
+
it(_, (l << 1) + (Z ? 1 : 0), 3), function(B, K, st, J) {
|
|
14681
14686
|
It(B), ot(B, st), ot(B, ~st), n.arraySet(B.pending_buf, B.window, K, st, B.pending), B.pending += st;
|
|
14682
14687
|
}(_, U, $);
|
|
14683
14688
|
}
|
|
14684
14689
|
s._tr_init = function(_) {
|
|
14685
14690
|
k || (function() {
|
|
14686
|
-
var U, $,
|
|
14687
|
-
for (B =
|
|
14688
|
-
for (v[B] =
|
|
14689
|
-
g[
|
|
14690
|
-
for (g[
|
|
14691
|
+
var U, $, Z, B, K, st = new Array(T + 1);
|
|
14692
|
+
for (B = Z = 0; B < h - 1; B++)
|
|
14693
|
+
for (v[B] = Z, U = 0; U < 1 << y[B]; U++)
|
|
14694
|
+
g[Z++] = B;
|
|
14695
|
+
for (g[Z - 1] = B, B = K = 0; B < 16; B++)
|
|
14691
14696
|
for (W[B] = K, U = 0; U < 1 << M[B]; U++)
|
|
14692
14697
|
w[K++] = B;
|
|
14693
14698
|
for (K >>= 7; B < u; B++)
|
|
@@ -14696,18 +14701,18 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
14696
14701
|
for ($ = 0; $ <= T; $++)
|
|
14697
14702
|
st[$] = 0;
|
|
14698
14703
|
for (U = 0; U <= 143; )
|
|
14699
|
-
|
|
14704
|
+
Y[2 * U + 1] = 8, U++, st[8]++;
|
|
14700
14705
|
for (; U <= 255; )
|
|
14701
|
-
|
|
14706
|
+
Y[2 * U + 1] = 9, U++, st[9]++;
|
|
14702
14707
|
for (; U <= 279; )
|
|
14703
|
-
|
|
14708
|
+
Y[2 * U + 1] = 7, U++, st[7]++;
|
|
14704
14709
|
for (; U <= 287; )
|
|
14705
|
-
|
|
14706
|
-
for (yt(
|
|
14710
|
+
Y[2 * U + 1] = 8, U++, st[8]++;
|
|
14711
|
+
for (yt(Y, I + 1, st), U = 0; U < u; U++)
|
|
14707
14712
|
O[2 * U + 1] = 5, O[2 * U] = St(U, 5);
|
|
14708
|
-
|
|
14709
|
-
}(), k = !0), _.l_desc = new
|
|
14710
|
-
}, s._tr_stored_block = P, s._tr_flush_block = function(_, U, $,
|
|
14713
|
+
q = new nt(Y, y, f + 1, I, T), G = new nt(O, M, 0, u, T), et = new nt(new Array(0), L, 0, d, m);
|
|
14714
|
+
}(), k = !0), _.l_desc = new V(_.dyn_ltree, q), _.d_desc = new V(_.dyn_dtree, G), _.bl_desc = new V(_.bl_tree, et), _.bi_buf = 0, _.bi_valid = 0, at(_);
|
|
14715
|
+
}, s._tr_stored_block = P, s._tr_flush_block = function(_, U, $, Z) {
|
|
14711
14716
|
var B, K, st = 0;
|
|
14712
14717
|
0 < _.level ? (_.strm.data_type === 2 && (_.strm.data_type = function(J) {
|
|
14713
14718
|
var ct, Rt = 4093624447;
|
|
@@ -14725,16 +14730,16 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
14725
14730
|
for (A(J, J.dyn_ltree, J.l_desc.max_code), A(J, J.dyn_dtree, J.d_desc.max_code), Dt(J, J.bl_desc), ct = d - 1; 3 <= ct && J.bl_tree[2 * b[ct] + 1] === 0; ct--)
|
|
14726
14731
|
;
|
|
14727
14732
|
return J.opt_len += 3 * (ct + 1) + 5 + 5 + 4, ct;
|
|
14728
|
-
}(_), B = _.opt_len + 3 + 7 >>> 3, (K = _.static_len + 3 + 7 >>> 3) <= B && (B = K)) : B = K = $ + 5, $ + 4 <= B && U !== -1 ? P(_, U, $,
|
|
14733
|
+
}(_), B = _.opt_len + 3 + 7 >>> 3, (K = _.static_len + 3 + 7 >>> 3) <= B && (B = K)) : B = K = $ + 5, $ + 4 <= B && U !== -1 ? P(_, U, $, Z) : _.strategy === 4 || K === B ? (it(_, 2 + (Z ? 1 : 0), 3), Ht(_, Y, O)) : (it(_, 4 + (Z ? 1 : 0), 3), function(J, ct, Rt, dt) {
|
|
14729
14734
|
var Wt;
|
|
14730
14735
|
for (it(J, ct - 257, 5), it(J, Rt - 1, 5), it(J, dt - 4, 4), Wt = 0; Wt < dt; Wt++)
|
|
14731
14736
|
it(J, J.bl_tree[2 * b[Wt] + 1], 3);
|
|
14732
14737
|
X(J, J.dyn_ltree, ct - 1), X(J, J.dyn_dtree, Rt - 1);
|
|
14733
|
-
}(_, _.l_desc.max_code + 1, _.d_desc.max_code + 1, st + 1), Ht(_, _.dyn_ltree, _.dyn_dtree)), at(_),
|
|
14738
|
+
}(_, _.l_desc.max_code + 1, _.d_desc.max_code + 1, st + 1), Ht(_, _.dyn_ltree, _.dyn_dtree)), at(_), Z && It(_);
|
|
14734
14739
|
}, s._tr_tally = function(_, U, $) {
|
|
14735
14740
|
return _.pending_buf[_.d_buf + 2 * _.last_lit] = U >>> 8 & 255, _.pending_buf[_.d_buf + 2 * _.last_lit + 1] = 255 & U, _.pending_buf[_.l_buf + _.last_lit] = 255 & $, _.last_lit++, U === 0 ? _.dyn_ltree[2 * $]++ : (_.matches++, U--, _.dyn_ltree[2 * (g[$] + f + 1)]++, _.dyn_dtree[2 * x(U)]++), _.last_lit === _.lit_bufsize - 1;
|
|
14736
14741
|
}, s._tr_align = function(_) {
|
|
14737
|
-
it(_, 2, 3), tt(_, F,
|
|
14742
|
+
it(_, 2, 3), tt(_, F, Y), function(U) {
|
|
14738
14743
|
U.bi_valid === 16 ? (ot(U, U.bi_buf), U.bi_buf = 0, U.bi_valid = 0) : 8 <= U.bi_valid && (U.pending_buf[U.pending++] = 255 & U.bi_buf, U.bi_buf >>= 8, U.bi_valid -= 8);
|
|
14739
14744
|
}(_);
|
|
14740
14745
|
};
|
|
@@ -14819,7 +14824,7 @@ https://github.com/nodeca/pako/blob/main/LICENSE
|
|
|
14819
14824
|
R.source === r && typeof R.data == "string" && R.data.indexOf(f) === 0 && m(+R.data.slice(f.length));
|
|
14820
14825
|
}
|
|
14821
14826
|
})(typeof self > "u" ? n === void 0 ? this : n : self);
|
|
14822
|
-
}).call(this, typeof
|
|
14827
|
+
}).call(this, typeof us < "u" ? us : typeof self < "u" ? self : typeof window < "u" ? window : {});
|
|
14823
14828
|
}, {}] }, {}, [10])(10);
|
|
14824
14829
|
});
|
|
14825
14830
|
})(lo);
|
|
@@ -15025,18 +15030,18 @@ function Br(c, i) {
|
|
|
15025
15030
|
const t = zn.getAllMatches(c, Gc), e = {};
|
|
15026
15031
|
for (let s = 0; s < t.length; s++) {
|
|
15027
15032
|
if (t[s][1].length === 0)
|
|
15028
|
-
return Pt("InvalidAttr", "Attribute '" + t[s][2] + "' has no space in starting.",
|
|
15033
|
+
return Pt("InvalidAttr", "Attribute '" + t[s][2] + "' has no space in starting.", yi(t[s]));
|
|
15029
15034
|
if (t[s][3] !== void 0 && t[s][4] === void 0)
|
|
15030
|
-
return Pt("InvalidAttr", "Attribute '" + t[s][2] + "' is without value.",
|
|
15035
|
+
return Pt("InvalidAttr", "Attribute '" + t[s][2] + "' is without value.", yi(t[s]));
|
|
15031
15036
|
if (t[s][3] === void 0 && !i.allowBooleanAttributes)
|
|
15032
|
-
return Pt("InvalidAttr", "boolean attribute '" + t[s][2] + "' is not allowed.",
|
|
15037
|
+
return Pt("InvalidAttr", "boolean attribute '" + t[s][2] + "' is not allowed.", yi(t[s]));
|
|
15033
15038
|
const n = t[s][2];
|
|
15034
15039
|
if (!Hc(n))
|
|
15035
|
-
return Pt("InvalidAttr", "Attribute '" + n + "' is an invalid name.",
|
|
15040
|
+
return Pt("InvalidAttr", "Attribute '" + n + "' is an invalid name.", yi(t[s]));
|
|
15036
15041
|
if (!e.hasOwnProperty(n))
|
|
15037
15042
|
e[n] = 1;
|
|
15038
15043
|
else
|
|
15039
|
-
return Pt("InvalidAttr", "Attribute '" + n + "' is repeated.",
|
|
15044
|
+
return Pt("InvalidAttr", "Attribute '" + n + "' is repeated.", yi(t[s]));
|
|
15040
15045
|
}
|
|
15041
15046
|
return !0;
|
|
15042
15047
|
}
|
|
@@ -15088,7 +15093,7 @@ function xt(c, i) {
|
|
|
15088
15093
|
col: t[t.length - 1].length + 1
|
|
15089
15094
|
};
|
|
15090
15095
|
}
|
|
15091
|
-
function
|
|
15096
|
+
function yi(c) {
|
|
15092
15097
|
return c.startIndex + c[1].length;
|
|
15093
15098
|
}
|
|
15094
15099
|
var kn = {};
|
|
@@ -15260,7 +15265,7 @@ function ll(c) {
|
|
|
15260
15265
|
return c && c.indexOf(".") !== -1 && (c = c.replace(/0+$/, ""), c === "." ? c = "0" : c[0] === "." ? c = "0" + c : c[c.length - 1] === "." && (c = c.substr(0, c.length - 1))), c;
|
|
15261
15266
|
}
|
|
15262
15267
|
var hl = cl;
|
|
15263
|
-
const uo = zs,
|
|
15268
|
+
const uo = zs, Li = Zc, ul = nl, fl = hl;
|
|
15264
15269
|
let Il = class {
|
|
15265
15270
|
constructor(i) {
|
|
15266
15271
|
this.options = i, this.currentNode = null, this.tagsNodeStack = [], this.docTypeEntities = {}, this.lastEntities = {
|
|
@@ -15344,12 +15349,12 @@ function Tl(c, i, t) {
|
|
|
15344
15349
|
const ml = function(c) {
|
|
15345
15350
|
c = c.replace(/\r\n?/g, `
|
|
15346
15351
|
`);
|
|
15347
|
-
const i = new
|
|
15352
|
+
const i = new Li("!xml");
|
|
15348
15353
|
let t = i, e = "", s = "";
|
|
15349
15354
|
for (let n = 0; n < c.length; n++)
|
|
15350
15355
|
if (c[n] === "<")
|
|
15351
15356
|
if (c[n + 1] === "/") {
|
|
15352
|
-
const o =
|
|
15357
|
+
const o = Ve(c, ">", n, "Closing Tag is not closed.");
|
|
15353
15358
|
let a = c.substring(n + 2, o).trim();
|
|
15354
15359
|
if (this.options.removeNSPrefix) {
|
|
15355
15360
|
const f = a.indexOf(":");
|
|
@@ -15366,12 +15371,12 @@ const ml = function(c) {
|
|
|
15366
15371
|
if (!o)
|
|
15367
15372
|
throw new Error("Pi Tag is not closed.");
|
|
15368
15373
|
if (e = this.saveTextToParentTag(e, t, s), !(this.options.ignoreDeclaration && o.tagName === "?xml" || this.options.ignorePiTags)) {
|
|
15369
|
-
const a = new
|
|
15374
|
+
const a = new Li(o.tagName);
|
|
15370
15375
|
a.add(this.options.textNodeName, ""), o.tagName !== o.tagExp && o.attrExpPresent && (a[":@"] = this.buildAttributesMap(o.tagExp, s, o.tagName)), this.addChild(t, a, s);
|
|
15371
15376
|
}
|
|
15372
15377
|
n = o.closeIndex + 1;
|
|
15373
15378
|
} else if (c.substr(n + 1, 3) === "!--") {
|
|
15374
|
-
const o =
|
|
15379
|
+
const o = Ve(c, "-->", n + 4, "Comment is not closed.");
|
|
15375
15380
|
if (this.options.commentPropName) {
|
|
15376
15381
|
const a = c.substring(n + 4, o - 2);
|
|
15377
15382
|
e = this.saveTextToParentTag(e, t, s), t.add(this.options.commentPropName, [{ [this.options.textNodeName]: a }]);
|
|
@@ -15381,7 +15386,7 @@ const ml = function(c) {
|
|
|
15381
15386
|
const o = ul(c, n);
|
|
15382
15387
|
this.docTypeEntities = o.entities, n = o.i;
|
|
15383
15388
|
} else if (c.substr(n + 1, 2) === "![") {
|
|
15384
|
-
const o =
|
|
15389
|
+
const o = Ve(c, "]]>", n, "CDATA is not closed.") - 2, a = c.substring(n + 9, o);
|
|
15385
15390
|
e = this.saveTextToParentTag(e, t, s);
|
|
15386
15391
|
let l = this.parseTextData(a, t.tagname, s, !0, !1, !0, !0);
|
|
15387
15392
|
l == null && (l = ""), this.options.cdataPropName ? t.add(this.options.cdataPropName, [{ [this.options.textNodeName]: a }]) : t.add(this.options.textNodeName, l), n = o + 2;
|
|
@@ -15403,15 +15408,15 @@ const ml = function(c) {
|
|
|
15403
15408
|
throw new Error(`Unexpected end of ${l}`);
|
|
15404
15409
|
n = T.i, d = T.tagContent;
|
|
15405
15410
|
}
|
|
15406
|
-
const E = new
|
|
15411
|
+
const E = new Li(a);
|
|
15407
15412
|
a !== h && f && (E[":@"] = this.buildAttributesMap(h, s, a)), d && (d = this.parseTextData(d, a, s, !0, f, !0, !0)), s = s.substr(0, s.lastIndexOf(".")), E.add(this.options.textNodeName, d), this.addChild(t, E, s);
|
|
15408
15413
|
} else {
|
|
15409
15414
|
if (h.length > 0 && h.lastIndexOf("/") === h.length - 1) {
|
|
15410
15415
|
a[a.length - 1] === "/" ? (a = a.substr(0, a.length - 1), s = s.substr(0, s.length - 1), h = a) : h = h.substr(0, h.length - 1), this.options.transformTagName && (a = this.options.transformTagName(a));
|
|
15411
|
-
const d = new
|
|
15416
|
+
const d = new Li(a);
|
|
15412
15417
|
a !== h && f && (d[":@"] = this.buildAttributesMap(h, s, a)), this.addChild(t, d, s), s = s.substr(0, s.lastIndexOf("."));
|
|
15413
15418
|
} else {
|
|
15414
|
-
const d = new
|
|
15419
|
+
const d = new Li(a);
|
|
15415
15420
|
this.tagsNodeStack.push(t), a !== h && f && (d[":@"] = this.buildAttributesMap(h, s, a)), this.addChild(t, d, s), t = d;
|
|
15416
15421
|
}
|
|
15417
15422
|
e = "", n = I;
|
|
@@ -15488,7 +15493,7 @@ function Sl(c, i, t = ">") {
|
|
|
15488
15493
|
s += r;
|
|
15489
15494
|
}
|
|
15490
15495
|
}
|
|
15491
|
-
function
|
|
15496
|
+
function Ve(c, i, t, e) {
|
|
15492
15497
|
const s = c.indexOf(i, t);
|
|
15493
15498
|
if (s === -1)
|
|
15494
15499
|
throw new Error(e);
|
|
@@ -15521,7 +15526,7 @@ function Ol(c, i, t) {
|
|
|
15521
15526
|
for (; t < c.length; t++)
|
|
15522
15527
|
if (c[t] === "<")
|
|
15523
15528
|
if (c[t + 1] === "/") {
|
|
15524
|
-
const n =
|
|
15529
|
+
const n = Ve(c, ">", t, `${i} is not closed`);
|
|
15525
15530
|
if (c.substring(t + 2, n).trim() === i && (s--, s === 0))
|
|
15526
15531
|
return {
|
|
15527
15532
|
tagContent: c.substring(e, t),
|
|
@@ -15529,11 +15534,11 @@ function Ol(c, i, t) {
|
|
|
15529
15534
|
};
|
|
15530
15535
|
t = n;
|
|
15531
15536
|
} else if (c[t + 1] === "?")
|
|
15532
|
-
t =
|
|
15537
|
+
t = Ve(c, "?>", t + 1, "StopNode is not closed.");
|
|
15533
15538
|
else if (c.substr(t + 1, 3) === "!--")
|
|
15534
|
-
t =
|
|
15539
|
+
t = Ve(c, "-->", t + 3, "StopNode is not closed.");
|
|
15535
15540
|
else if (c.substr(t + 1, 2) === "![")
|
|
15536
|
-
t =
|
|
15541
|
+
t = Ve(c, "]]>", t, "StopNode is not closed.") - 2;
|
|
15537
15542
|
else {
|
|
15538
15543
|
const n = Ln(c, t, ">");
|
|
15539
15544
|
n && ((n && n.tagName) === i && n.tagExp[n.tagExp.length - 1] !== "/" && s++, t = n.closeIndex);
|
|
@@ -15741,7 +15746,7 @@ const zl = Gl, kl = {
|
|
|
15741
15746
|
// transformAttributeName: false,
|
|
15742
15747
|
oneListGroup: !1
|
|
15743
15748
|
};
|
|
15744
|
-
function
|
|
15749
|
+
function be(c) {
|
|
15745
15750
|
this.options = Object.assign({}, kl, c), this.options.ignoreAttributes || this.options.attributesGroupName ? this.isAttribute = function() {
|
|
15746
15751
|
return !1;
|
|
15747
15752
|
} : (this.attrPrefixLen = this.options.attributeNamePrefix.length, this.isAttribute = Xl), this.processTextOrObjNode = Hl, this.options.format ? (this.indentate = Wl, this.tagEndChar = `>
|
|
@@ -15750,12 +15755,12 @@ function De(c) {
|
|
|
15750
15755
|
return "";
|
|
15751
15756
|
}, this.tagEndChar = ">", this.newLine = "");
|
|
15752
15757
|
}
|
|
15753
|
-
|
|
15758
|
+
be.prototype.build = function(c) {
|
|
15754
15759
|
return this.options.preserveOrder ? zl(c, this.options) : (Array.isArray(c) && this.options.arrayNodeName && this.options.arrayNodeName.length > 1 && (c = {
|
|
15755
15760
|
[this.options.arrayNodeName]: c
|
|
15756
15761
|
}), this.j2x(c, 0).val);
|
|
15757
15762
|
};
|
|
15758
|
-
|
|
15763
|
+
be.prototype.j2x = function(c, i) {
|
|
15759
15764
|
let t = "", e = "";
|
|
15760
15765
|
for (let s in c)
|
|
15761
15766
|
if (Object.prototype.hasOwnProperty.call(c, s))
|
|
@@ -15803,14 +15808,14 @@ De.prototype.j2x = function(c, i) {
|
|
|
15803
15808
|
e += this.processTextOrObjNode(c[s], s, i);
|
|
15804
15809
|
return { attrStr: t, val: e };
|
|
15805
15810
|
};
|
|
15806
|
-
|
|
15811
|
+
be.prototype.buildAttrPairStr = function(c, i) {
|
|
15807
15812
|
return i = this.options.attributeValueProcessor(c, "" + i), i = this.replaceEntitiesValue(i), this.options.suppressBooleanAttributes && i === "true" ? " " + c : " " + c + '="' + i + '"';
|
|
15808
15813
|
};
|
|
15809
15814
|
function Hl(c, i, t) {
|
|
15810
15815
|
const e = this.j2x(c, t + 1);
|
|
15811
15816
|
return c[this.options.textNodeName] !== void 0 && Object.keys(c).length === 1 ? this.buildTextValNode(c[this.options.textNodeName], i, e.attrStr, t) : this.buildObjectNode(e.val, i, e.attrStr, t);
|
|
15812
15817
|
}
|
|
15813
|
-
|
|
15818
|
+
be.prototype.buildObjectNode = function(c, i, t, e) {
|
|
15814
15819
|
if (c === "")
|
|
15815
15820
|
return i[0] === "?" ? this.indentate(e) + "<" + i + t + "?" + this.tagEndChar : this.indentate(e) + "<" + i + t + this.closeTag(i) + this.tagEndChar;
|
|
15816
15821
|
{
|
|
@@ -15818,11 +15823,11 @@ De.prototype.buildObjectNode = function(c, i, t, e) {
|
|
|
15818
15823
|
return i[0] === "?" && (n = "?", s = ""), (t || t === "") && c.indexOf("<") === -1 ? this.indentate(e) + "<" + i + t + n + ">" + c + s : this.options.commentPropName !== !1 && i === this.options.commentPropName && n.length === 0 ? this.indentate(e) + `<!--${c}-->` + this.newLine : this.indentate(e) + "<" + i + t + n + this.tagEndChar + c + this.indentate(e) + s;
|
|
15819
15824
|
}
|
|
15820
15825
|
};
|
|
15821
|
-
|
|
15826
|
+
be.prototype.closeTag = function(c) {
|
|
15822
15827
|
let i = "";
|
|
15823
15828
|
return this.options.unpairedTags.indexOf(c) !== -1 ? this.options.suppressUnpairedNode || (i = "/") : this.options.suppressEmptyNode ? i = "/" : i = `></${c}`, i;
|
|
15824
15829
|
};
|
|
15825
|
-
|
|
15830
|
+
be.prototype.buildTextValNode = function(c, i, t, e) {
|
|
15826
15831
|
if (this.options.cdataPropName !== !1 && i === this.options.cdataPropName)
|
|
15827
15832
|
return this.indentate(e) + `<![CDATA[${c}]]>` + this.newLine;
|
|
15828
15833
|
if (this.options.commentPropName !== !1 && i === this.options.commentPropName)
|
|
@@ -15834,7 +15839,7 @@ De.prototype.buildTextValNode = function(c, i, t, e) {
|
|
|
15834
15839
|
return s = this.replaceEntitiesValue(s), s === "" ? this.indentate(e) + "<" + i + t + this.closeTag(i) + this.tagEndChar : this.indentate(e) + "<" + i + t + ">" + s + "</" + i + this.tagEndChar;
|
|
15835
15840
|
}
|
|
15836
15841
|
};
|
|
15837
|
-
|
|
15842
|
+
be.prototype.replaceEntitiesValue = function(c) {
|
|
15838
15843
|
if (c && c.length > 0 && this.options.processEntities)
|
|
15839
15844
|
for (let i = 0; i < this.options.entities.length; i++) {
|
|
15840
15845
|
const t = this.options.entities[i];
|
|
@@ -15848,7 +15853,7 @@ function Wl(c) {
|
|
|
15848
15853
|
function Xl(c) {
|
|
15849
15854
|
return c.startsWith(this.options.attributeNamePrefix) && c !== this.options.textNodeName ? c.substr(this.attrPrefixLen) : !1;
|
|
15850
15855
|
}
|
|
15851
|
-
var $l =
|
|
15856
|
+
var $l = be;
|
|
15852
15857
|
const Zl = Gn, jl = Ul, ql = $l;
|
|
15853
15858
|
var Co = {
|
|
15854
15859
|
XMLParser: jl,
|
|
@@ -15938,9 +15943,9 @@ const Ie = class Ie {
|
|
|
15938
15943
|
C(this, "creationDate", /* @__PURE__ */ new Date());
|
|
15939
15944
|
C(this, "creationAuthor", "");
|
|
15940
15945
|
// Store viewpoint guids instead of the actual Viewpoint to prevent a possible memory leak
|
|
15941
|
-
C(this, "viewpoints", new
|
|
15946
|
+
C(this, "viewpoints", new we());
|
|
15942
15947
|
// Store topic guids instead of the actual Topic to prevent a possible memory leak
|
|
15943
|
-
C(this, "relatedTopics", new
|
|
15948
|
+
C(this, "relatedTopics", new we());
|
|
15944
15949
|
// There is no problem to store the comment it-self as it is not referenced anywhere else
|
|
15945
15950
|
C(this, "comments", new re());
|
|
15946
15951
|
C(this, "customData", {});
|
|
@@ -16227,7 +16232,7 @@ const Ql = (c, i) => {
|
|
|
16227
16232
|
c.config.users.add(a);
|
|
16228
16233
|
}
|
|
16229
16234
|
};
|
|
16230
|
-
class Kl extends
|
|
16235
|
+
class Kl extends Ge {
|
|
16231
16236
|
constructor() {
|
|
16232
16237
|
super(...arguments);
|
|
16233
16238
|
C(this, "_config", {
|
|
@@ -16413,10 +16418,10 @@ const Le = class Le extends At {
|
|
|
16413
16418
|
Le.uuid
|
|
16414
16419
|
));
|
|
16415
16420
|
C(this, "list", new re());
|
|
16416
|
-
C(this, "onSetup", new
|
|
16421
|
+
C(this, "onSetup", new j());
|
|
16417
16422
|
C(this, "isSetup", !1);
|
|
16418
|
-
C(this, "onBCFImported", new
|
|
16419
|
-
C(this, "onDisposed", new
|
|
16423
|
+
C(this, "onBCFImported", new j());
|
|
16424
|
+
C(this, "onDisposed", new j());
|
|
16420
16425
|
}
|
|
16421
16426
|
setup(t) {
|
|
16422
16427
|
if (this.isSetup)
|
|
@@ -16678,33 +16683,33 @@ ${o}
|
|
|
16678
16683
|
ClippingPlanes: M,
|
|
16679
16684
|
Components: L,
|
|
16680
16685
|
OrthogonalCamera: b,
|
|
16681
|
-
PerspectiveCamera:
|
|
16686
|
+
PerspectiveCamera: Y
|
|
16682
16687
|
} = S;
|
|
16683
16688
|
if (y && (N.guid = y), L) {
|
|
16684
16689
|
const { Selection: w, Visibility: g } = L;
|
|
16685
16690
|
if (w && w.Component) {
|
|
16686
|
-
const
|
|
16687
|
-
N.selectionComponents =
|
|
16691
|
+
const q = Array.isArray(w.Component) ? w.Component : [w.Component];
|
|
16692
|
+
N.selectionComponents = q.map((G) => G.IfcGuid).filter((G) => G);
|
|
16688
16693
|
}
|
|
16689
16694
|
if (g && "DefaultVisibility" in g && (N.defaultVisibility = g.DefaultVisibility), g && g.Exceptions && "Component" in g.Exceptions) {
|
|
16690
|
-
const { Component:
|
|
16691
|
-
N.exceptionComponents =
|
|
16695
|
+
const { Component: q } = g.Exceptions, G = Array.isArray(q) ? q : [q];
|
|
16696
|
+
N.exceptionComponents = G.map((et) => et.IfcGuid).filter((et) => et);
|
|
16692
16697
|
}
|
|
16693
16698
|
let v;
|
|
16694
16699
|
l === "2.1" && (v = L.ViewSetupHints), l === "3" && (v = (m = L.Visibility) == null ? void 0 : m.ViewSetupHints), v && ("OpeningsVisible" in v && (N.openingsVisible = v.OpeningsVisible), "SpacesVisible" in v && (N.spacesVisible = v.SpacesVisible), "SpaceBoundariesVisible" in v && (N.spaceBoundariesVisible = v.SpaceBoundariesVisible));
|
|
16695
16700
|
}
|
|
16696
|
-
if (b ||
|
|
16697
|
-
const w = S.PerspectiveCamera ?? S.OrthogonalCamera, { CameraViewPoint: g, CameraDirection: v } = w,
|
|
16701
|
+
if (b || Y) {
|
|
16702
|
+
const w = S.PerspectiveCamera ?? S.OrthogonalCamera, { CameraViewPoint: g, CameraDirection: v } = w, q = new D.Vector3(
|
|
16698
16703
|
Number(g.X),
|
|
16699
16704
|
Number(g.Z),
|
|
16700
16705
|
Number(-g.Y)
|
|
16701
|
-
),
|
|
16706
|
+
), G = new D.Vector3(
|
|
16702
16707
|
Number(v.X),
|
|
16703
16708
|
Number(v.Z),
|
|
16704
16709
|
Number(-v.Y)
|
|
16705
16710
|
), et = {
|
|
16706
|
-
position: { x:
|
|
16707
|
-
direction: { x:
|
|
16711
|
+
position: { x: q.x, y: q.y, z: q.z },
|
|
16712
|
+
direction: { x: G.x, y: G.y, z: G.z },
|
|
16708
16713
|
aspectRatio: "AspectRatio" in w ? w.AspectRatio : 1
|
|
16709
16714
|
// Temporal simplification
|
|
16710
16715
|
};
|
|
@@ -16725,25 +16730,25 @@ ${o}
|
|
|
16725
16730
|
if (w && w.Color) {
|
|
16726
16731
|
const g = Array.isArray(w.Color) ? w.Color : [w.Color];
|
|
16727
16732
|
for (const v of g) {
|
|
16728
|
-
const { Color:
|
|
16729
|
-
O.componentColors.set(
|
|
16733
|
+
const { Color: q, Component: G } = v, W = (Array.isArray(G) ? G : [G]).map((nt) => nt.IfcGuid);
|
|
16734
|
+
O.componentColors.set(q, W);
|
|
16730
16735
|
}
|
|
16731
16736
|
}
|
|
16732
16737
|
}
|
|
16733
16738
|
if (I.push(O), M) {
|
|
16734
16739
|
const w = this.components.get(Sn), g = Array.isArray(M.ClippingPlane) ? M.ClippingPlane : [M.ClippingPlane];
|
|
16735
16740
|
for (const v of g) {
|
|
16736
|
-
const { Location:
|
|
16737
|
-
if (!(
|
|
16741
|
+
const { Location: q, Direction: G } = v;
|
|
16742
|
+
if (!(q && G))
|
|
16738
16743
|
continue;
|
|
16739
16744
|
const et = new D.Vector3(
|
|
16740
|
-
|
|
16741
|
-
|
|
16742
|
-
-
|
|
16745
|
+
q.X,
|
|
16746
|
+
q.Z,
|
|
16747
|
+
-q.Y
|
|
16743
16748
|
), W = new D.Vector3(
|
|
16744
|
-
|
|
16745
|
-
-
|
|
16746
|
-
|
|
16749
|
+
G.X,
|
|
16750
|
+
-G.Z,
|
|
16751
|
+
G.Y
|
|
16747
16752
|
), nt = w.createFromNormalAndCoplanarPoint(
|
|
16748
16753
|
e,
|
|
16749
16754
|
W,
|
|
@@ -16760,23 +16765,23 @@ ${o}
|
|
|
16760
16765
|
TopicType: M,
|
|
16761
16766
|
TopicStatus: L,
|
|
16762
16767
|
Title: b,
|
|
16763
|
-
CreationDate:
|
|
16768
|
+
CreationDate: Y,
|
|
16764
16769
|
CreationAuthor: O
|
|
16765
16770
|
} = N;
|
|
16766
|
-
if (n && !(y && M && L && b &&
|
|
16771
|
+
if (n && !(y && M && L && b && Y && O))
|
|
16767
16772
|
continue;
|
|
16768
16773
|
const w = new Rs(this.components);
|
|
16769
16774
|
w.guid = y ?? w.guid;
|
|
16770
16775
|
const g = this.getMarkupRelatedTopics(S, l);
|
|
16771
|
-
E[w.guid] = new Set(g), w.type = M ?? w.type, w.status = L ?? w.status, w.title = b ?? w.title, w.creationDate =
|
|
16776
|
+
E[w.guid] = new Set(g), w.type = M ?? w.type, w.status = L ?? w.status, w.title = b ?? w.title, w.creationDate = Y ? new Date(Y) : w.creationDate, w.creationAuthor = O ?? w.creationAuthor, w.serverAssignedId = N.ServerAssignedId, w.priority = N.Priority, w.index = N.Index, w.modifiedDate = N.ModifiedDate ? new Date(N.ModifiedDate) : void 0, w.modifiedAuthor = N.ModifiedAuthor, w.dueDate = N.DueDate ? new Date(N.DueDate) : void 0, w.assignedTo = N.AssignedTo, w.description = N.Description, w.stage = N.Stage;
|
|
16772
16777
|
const v = this.getMarkupLabels(S, l);
|
|
16773
16778
|
for (const et of v)
|
|
16774
16779
|
w.labels.add(et);
|
|
16775
|
-
const
|
|
16776
|
-
for (const et of
|
|
16780
|
+
const q = this.getMarkupComments(S, l);
|
|
16781
|
+
for (const et of q)
|
|
16777
16782
|
w.comments.set(et.guid, et);
|
|
16778
|
-
const
|
|
16779
|
-
for (const et of
|
|
16783
|
+
const G = this.getMarkupViewpoints(S, l);
|
|
16784
|
+
for (const et of G) {
|
|
16780
16785
|
if (!(et && et.Guid))
|
|
16781
16786
|
continue;
|
|
16782
16787
|
const W = u.list.get(et.Guid);
|
|
@@ -16815,7 +16820,7 @@ const ee = class ee extends At {
|
|
|
16815
16820
|
/** {@link Component.enabled} */
|
|
16816
16821
|
C(this, "enabled", !0);
|
|
16817
16822
|
/** {@link Disposable.onDisposed} */
|
|
16818
|
-
C(this, "onDisposed", new
|
|
16823
|
+
C(this, "onDisposed", new j());
|
|
16819
16824
|
C(this, "_absoluteMin");
|
|
16820
16825
|
C(this, "_absoluteMax");
|
|
16821
16826
|
C(this, "_meshes", []);
|
|
@@ -16891,7 +16896,7 @@ const ee = class ee extends At {
|
|
|
16891
16896
|
}
|
|
16892
16897
|
/** {@link Disposable.dispose} */
|
|
16893
16898
|
dispose() {
|
|
16894
|
-
const t = this.components.get(
|
|
16899
|
+
const t = this.components.get(De);
|
|
16895
16900
|
for (const e of this._meshes)
|
|
16896
16901
|
t.destroy(e);
|
|
16897
16902
|
this._meshes = [], this.onDisposed.trigger(ee.uuid), this.onDisposed.reset();
|
|
@@ -17091,7 +17096,7 @@ const Ps = class Ps {
|
|
|
17091
17096
|
/**
|
|
17092
17097
|
* Event used to notify the progress when performing a query on an IFC file.
|
|
17093
17098
|
*/
|
|
17094
|
-
C(this, "onProgress", new
|
|
17099
|
+
C(this, "onProgress", new j());
|
|
17095
17100
|
/**
|
|
17096
17101
|
* If false, ALL rules of the query must comply to make a match. If true, ANY rule will be enough to make a match.
|
|
17097
17102
|
*/
|
|
@@ -17651,7 +17656,7 @@ const bs = class bs extends At {
|
|
|
17651
17656
|
*/
|
|
17652
17657
|
C(this, "list", {});
|
|
17653
17658
|
/** {@link Disposable.onDisposed} */
|
|
17654
|
-
C(this, "onDisposed", new
|
|
17659
|
+
C(this, "onDisposed", new j());
|
|
17655
17660
|
C(this, "onFragmentsDisposed", (t) => {
|
|
17656
17661
|
const { groupID: e, fragmentIDs: s } = t;
|
|
17657
17662
|
for (const n in this.list) {
|
|
@@ -17840,11 +17845,11 @@ const bs = class bs extends At {
|
|
|
17840
17845
|
* @throws Will throw an error if the fragment ID is not found or if the IFC relationship is not valid.
|
|
17841
17846
|
*/
|
|
17842
17847
|
async byIfcRel(t, e, s) {
|
|
17843
|
-
|
|
17848
|
+
oi.isRel(e) && await oi.getRelationMap(
|
|
17844
17849
|
t,
|
|
17845
17850
|
e,
|
|
17846
17851
|
async (n, r) => {
|
|
17847
|
-
const { name: o } = await
|
|
17852
|
+
const { name: o } = await oi.getEntityName(
|
|
17848
17853
|
t,
|
|
17849
17854
|
n
|
|
17850
17855
|
);
|
|
@@ -17996,12 +18001,12 @@ const bs = class bs extends At {
|
|
|
17996
18001
|
* This UUID is used to register the component within the Components system.
|
|
17997
18002
|
*/
|
|
17998
18003
|
C(bs, "uuid", "e25a7f3c-46c4-4a14-9d3d-5115f24ebeb7");
|
|
17999
|
-
let
|
|
18004
|
+
let Bi = bs;
|
|
18000
18005
|
const vs = class vs extends At {
|
|
18001
18006
|
constructor(t) {
|
|
18002
18007
|
super(t);
|
|
18003
18008
|
/** {@link Disposable.onDisposed} */
|
|
18004
|
-
C(this, "onDisposed", new
|
|
18009
|
+
C(this, "onDisposed", new j());
|
|
18005
18010
|
/** {@link Component.enabled} */
|
|
18006
18011
|
C(this, "enabled", !0);
|
|
18007
18012
|
/**
|
|
@@ -18044,7 +18049,7 @@ const vs = class vs extends At {
|
|
|
18044
18049
|
set(t) {
|
|
18045
18050
|
if (!this.enabled)
|
|
18046
18051
|
return;
|
|
18047
|
-
const e = this.components.get(
|
|
18052
|
+
const e = this.components.get(Bi), s = this.components.get(Tt), n = t ? 1 : -1;
|
|
18048
18053
|
let r = 0;
|
|
18049
18054
|
const o = e.list[this.groupName], a = new D.Matrix4();
|
|
18050
18055
|
for (const l in o) {
|
|
@@ -18149,24 +18154,24 @@ const xs = class xs extends At {
|
|
|
18149
18154
|
* Event triggered when geometry is streamed.
|
|
18150
18155
|
* Contains the streamed geometry data and its buffer.
|
|
18151
18156
|
*/
|
|
18152
|
-
C(this, "onGeometryStreamed", new
|
|
18157
|
+
C(this, "onGeometryStreamed", new Pe());
|
|
18153
18158
|
/**
|
|
18154
18159
|
* Event triggered when assets are streamed.
|
|
18155
18160
|
* Contains the streamed assets.
|
|
18156
18161
|
*/
|
|
18157
|
-
C(this, "onAssetStreamed", new
|
|
18162
|
+
C(this, "onAssetStreamed", new Pe());
|
|
18158
18163
|
/**
|
|
18159
18164
|
* Event triggered to indicate the progress of the streaming process.
|
|
18160
18165
|
* Contains the progress percentage.
|
|
18161
18166
|
*/
|
|
18162
|
-
C(this, "onProgress", new
|
|
18167
|
+
C(this, "onProgress", new Pe());
|
|
18163
18168
|
/**
|
|
18164
18169
|
* Event triggered when the IFC file is loaded.
|
|
18165
18170
|
* Contains the loaded IFC file data.
|
|
18166
18171
|
*/
|
|
18167
|
-
C(this, "onIfcLoaded", new
|
|
18172
|
+
C(this, "onIfcLoaded", new Pe());
|
|
18168
18173
|
/** {@link Disposable.onDisposed} */
|
|
18169
|
-
C(this, "onDisposed", new
|
|
18174
|
+
C(this, "onDisposed", new j());
|
|
18170
18175
|
/**
|
|
18171
18176
|
* Settings for the IfcGeometryTiler.
|
|
18172
18177
|
*/
|
|
@@ -18271,9 +18276,9 @@ const xs = class xs extends At {
|
|
|
18271
18276
|
for (const E of n) {
|
|
18272
18277
|
h++, this.webIfc.StreamMeshes(0, E, (p) => {
|
|
18273
18278
|
this.getMesh(this.webIfc, p, r);
|
|
18274
|
-
}), this._assets.length > e && await this.streamAssets();
|
|
18279
|
+
}), this._geometryCount > this.settings.minGeometrySize && await this.streamGeometries(), this._assets.length > e && await this.streamAssets();
|
|
18275
18280
|
const T = h / n.length;
|
|
18276
|
-
T > l && (l += 0.01, l = Math.max(l, T), this.onProgress.trigger(Math.round(l * 100) / 100));
|
|
18281
|
+
T > l && (l += 0.01, l = Math.max(l, T), await this.onProgress.trigger(Math.round(l * 100) / 100));
|
|
18277
18282
|
}
|
|
18278
18283
|
this._geometryCount && await this.streamGeometries(), this._assets.length && await this.streamAssets();
|
|
18279
18284
|
const { opaque: f, transparent: I } = r.geometryIDs;
|
|
@@ -18283,7 +18288,7 @@ const xs = class xs extends At {
|
|
|
18283
18288
|
const u = this.webIfc.GetCoordinationMatrix(0);
|
|
18284
18289
|
r.coordinationMatrix.fromArray(u), r.civilData = this._civil.read(this.webIfc);
|
|
18285
18290
|
const d = this._groupSerializer.export(r);
|
|
18286
|
-
this.onIfcLoaded.trigger(d), r.dispose(!0);
|
|
18291
|
+
await this.onIfcLoaded.trigger(d), r.dispose(!0);
|
|
18287
18292
|
}
|
|
18288
18293
|
cleanUp() {
|
|
18289
18294
|
try {
|
|
@@ -18295,8 +18300,8 @@ const xs = class xs extends At {
|
|
|
18295
18300
|
getMesh(t, e, s) {
|
|
18296
18301
|
const n = e.geometries.size(), r = e.expressID, o = { id: r, geometries: [] };
|
|
18297
18302
|
for (let a = 0; a < n; a++) {
|
|
18298
|
-
const l = e.geometries.get(a), h = l.geometryExpressID,
|
|
18299
|
-
this._visitedGeometries.has(u) || this.getGeometry(t, h,
|
|
18303
|
+
const l = e.geometries.get(a), h = l.geometryExpressID, I = l.color.w === 1 ? 1 : -1, u = h * I;
|
|
18304
|
+
this._visitedGeometries.has(u) || this.getGeometry(t, h, u), this.registerGeometryData(
|
|
18300
18305
|
s,
|
|
18301
18306
|
r,
|
|
18302
18307
|
l,
|
|
@@ -18321,37 +18326,67 @@ const xs = class xs extends At {
|
|
|
18321
18326
|
), a = new Float32Array(o.length / 2), l = new Float32Array(o.length / 2);
|
|
18322
18327
|
for (let u = 0; u < o.length; u += 6)
|
|
18323
18328
|
a[u / 2] = o[u], a[u / 2 + 1] = o[u + 1], a[u / 2 + 2] = o[u + 2], l[u / 2] = o[u + 3], l[u / 2 + 1] = o[u + 4], l[u / 2 + 2] = o[u + 5];
|
|
18329
|
+
if (r.length === 0) {
|
|
18330
|
+
const u = new Float32Array([
|
|
18331
|
+
0,
|
|
18332
|
+
0,
|
|
18333
|
+
0,
|
|
18334
|
+
0,
|
|
18335
|
+
0,
|
|
18336
|
+
0,
|
|
18337
|
+
0,
|
|
18338
|
+
0,
|
|
18339
|
+
0,
|
|
18340
|
+
0,
|
|
18341
|
+
0,
|
|
18342
|
+
0,
|
|
18343
|
+
0,
|
|
18344
|
+
0,
|
|
18345
|
+
0,
|
|
18346
|
+
1
|
|
18347
|
+
]);
|
|
18348
|
+
this._geometries.set(e, {
|
|
18349
|
+
position: a,
|
|
18350
|
+
normal: l,
|
|
18351
|
+
index: r,
|
|
18352
|
+
boundingBox: u,
|
|
18353
|
+
hasHoles: !1
|
|
18354
|
+
});
|
|
18355
|
+
const d = this._visitedGeometries.size, E = D.MathUtils.generateUUID();
|
|
18356
|
+
this._visitedGeometries.set(s, { uuid: E, index: d }), this._geometryCount++, n.delete();
|
|
18357
|
+
return;
|
|
18358
|
+
}
|
|
18324
18359
|
const f = (this.settings.maxTriangles || r.length / 3) * 3;
|
|
18325
18360
|
let I = !0;
|
|
18326
18361
|
for (let u = 0; u < r.length; u += f) {
|
|
18327
18362
|
const d = r.length - u, E = Math.min(d, f), T = u + E, p = [], m = [], F = [];
|
|
18328
18363
|
let R = 0;
|
|
18329
|
-
for (let
|
|
18364
|
+
for (let g = u; g < T; g++) {
|
|
18330
18365
|
p.push(R++);
|
|
18331
|
-
const
|
|
18332
|
-
m.push(a[
|
|
18366
|
+
const v = r[g];
|
|
18367
|
+
m.push(a[v * 3]), m.push(a[v * 3 + 1]), m.push(a[v * 3 + 2]), F.push(l[v * 3]), F.push(l[v * 3 + 1]), F.push(l[v * 3 + 2]);
|
|
18333
18368
|
}
|
|
18334
|
-
const S = new Uint32Array(p), N = new Float32Array(m), y = new Float32Array(F), M = qa(N), L = new Float32Array(M.transformation.elements), b = !1,
|
|
18335
|
-
this._geometries.set(
|
|
18369
|
+
const S = new Uint32Array(p), N = new Float32Array(m), y = new Float32Array(F), M = qa(N), L = new Float32Array(M.transformation.elements), b = !1, Y = I ? e : this._nextAvailableID++;
|
|
18370
|
+
this._geometries.set(Y, {
|
|
18336
18371
|
position: N,
|
|
18337
18372
|
normal: y,
|
|
18338
18373
|
index: S,
|
|
18339
18374
|
boundingBox: L,
|
|
18340
18375
|
hasHoles: b
|
|
18341
|
-
}), I || (this._splittedGeometries.has(e) || this._splittedGeometries.set(e, /* @__PURE__ */ new Set()), this._splittedGeometries.get(e).add(
|
|
18342
|
-
const
|
|
18343
|
-
this._visitedGeometries.set(
|
|
18376
|
+
}), I || (this._splittedGeometries.has(e) || this._splittedGeometries.set(e, /* @__PURE__ */ new Set()), this._splittedGeometries.get(e).add(Y));
|
|
18377
|
+
const O = this._visitedGeometries.size, w = D.MathUtils.generateUUID();
|
|
18378
|
+
this._visitedGeometries.set(s, { uuid: w, index: O }), this._geometryCount++, I = !1;
|
|
18344
18379
|
}
|
|
18345
18380
|
n.delete();
|
|
18346
18381
|
}
|
|
18347
18382
|
async streamAssets() {
|
|
18348
18383
|
await this.onAssetStreamed.trigger(this._assets), this._assets = null, this._assets = [];
|
|
18349
18384
|
}
|
|
18350
|
-
streamGeometries() {
|
|
18385
|
+
async streamGeometries() {
|
|
18351
18386
|
let t = this._streamSerializer.export(this._geometries), e = {};
|
|
18352
18387
|
for (const [s, { boundingBox: n, hasHoles: r }] of this._geometries)
|
|
18353
18388
|
e[s] = { boundingBox: n, hasHoles: r };
|
|
18354
|
-
this.onGeometryStreamed.trigger({ data: e, buffer: t }), e = null, t = null, this._geometries.clear(), this._geometryCount = 0;
|
|
18389
|
+
await this.onGeometryStreamed.trigger({ data: e, buffer: t }), e = null, t = null, this._geometries.clear(), this._geometryCount = 0;
|
|
18355
18390
|
}
|
|
18356
18391
|
registerGeometryData(t, e, s, n, r, o) {
|
|
18357
18392
|
const a = this._visitedGeometries.get(o);
|
|
@@ -18388,19 +18423,19 @@ class eh extends At {
|
|
|
18388
18423
|
* An event that is triggered when properties are streamed from the IFC file.
|
|
18389
18424
|
* The event provides the type of the IFC entity and the corresponding data.
|
|
18390
18425
|
*/
|
|
18391
|
-
C(this, "onPropertiesStreamed", new
|
|
18426
|
+
C(this, "onPropertiesStreamed", new Pe());
|
|
18392
18427
|
/**
|
|
18393
18428
|
* An event that is triggered to indicate the progress of the streaming process.
|
|
18394
18429
|
* The event provides a number between 0 and 1 representing the progress percentage.
|
|
18395
18430
|
*/
|
|
18396
|
-
C(this, "onProgress", new
|
|
18431
|
+
C(this, "onProgress", new Pe());
|
|
18397
18432
|
/**
|
|
18398
18433
|
* An event that is triggered when indices are streamed from the IFC file.
|
|
18399
18434
|
* The event provides a map of indices, where the key is the entity type and the value is another map of indices.
|
|
18400
18435
|
*/
|
|
18401
|
-
C(this, "onIndicesStreamed", new
|
|
18436
|
+
C(this, "onIndicesStreamed", new Pe());
|
|
18402
18437
|
/** {@link Disposable.onDisposed} */
|
|
18403
|
-
C(this, "onDisposed", new
|
|
18438
|
+
C(this, "onDisposed", new j());
|
|
18404
18439
|
/** {@link Component.enabled} */
|
|
18405
18440
|
C(this, "enabled", !0);
|
|
18406
18441
|
/**
|
|
@@ -18510,7 +18545,7 @@ class To {
|
|
|
18510
18545
|
* The Direction vector points in the invisible direction meaning the half-space that is clipped.
|
|
18511
18546
|
* @experimental
|
|
18512
18547
|
*/
|
|
18513
|
-
C(this, "clippingPlanes", new
|
|
18548
|
+
C(this, "clippingPlanes", new we());
|
|
18514
18549
|
C(this, "camera", {
|
|
18515
18550
|
aspectRatio: 0,
|
|
18516
18551
|
fov: 0,
|
|
@@ -18520,11 +18555,11 @@ class To {
|
|
|
18520
18555
|
/**
|
|
18521
18556
|
* A list of components GUIDs to hide when defaultVisibility = true or to show when defaultVisibility = false
|
|
18522
18557
|
*/
|
|
18523
|
-
C(this, "exceptionComponents", new
|
|
18558
|
+
C(this, "exceptionComponents", new we());
|
|
18524
18559
|
/**
|
|
18525
18560
|
* A list of components GUIDs that should be selected (highlighted) when displaying a viewpoint.
|
|
18526
18561
|
*/
|
|
18527
|
-
C(this, "selectionComponents", new
|
|
18562
|
+
C(this, "selectionComponents", new we());
|
|
18528
18563
|
/**
|
|
18529
18564
|
* A map of colors and components GUIDs that should be colorized when displaying a viewpoint.
|
|
18530
18565
|
* For this to work, call viewpoint.colorize()
|
|
@@ -18720,7 +18755,7 @@ class To {
|
|
|
18720
18755
|
};
|
|
18721
18756
|
const r = this.selection;
|
|
18722
18757
|
if (Object.keys(r).length === 0) {
|
|
18723
|
-
const h = this._components.get(
|
|
18758
|
+
const h = this._components.get(ci).get(this.world).castRayFromVector(e, this.direction);
|
|
18724
18759
|
h && (n = h.point);
|
|
18725
18760
|
} else {
|
|
18726
18761
|
const a = this._components.get(wn);
|
|
@@ -18787,7 +18822,7 @@ class To {
|
|
|
18787
18822
|
* The color is provided as a hexadecimal string, prefixed with a '#'.
|
|
18788
18823
|
*/
|
|
18789
18824
|
colorize() {
|
|
18790
|
-
const i = this._components.get(ie), t = this._components.get(Tt), e = this._components.get(
|
|
18825
|
+
const i = this._components.get(ie), t = this._components.get(Tt), e = this._components.get(Bi);
|
|
18791
18826
|
for (const [s, n] of this.componentColors) {
|
|
18792
18827
|
const r = t.guidToFragmentIdMap(n), o = new D.Color(`#${s}`);
|
|
18793
18828
|
e.setColor(
|
|
@@ -18803,7 +18838,7 @@ class To {
|
|
|
18803
18838
|
* corresponding to each color, and then uses the `Classifier` to reset the color of those fragments.
|
|
18804
18839
|
*/
|
|
18805
18840
|
resetColors() {
|
|
18806
|
-
const i = this._components.get(Tt), t = this._components.get(
|
|
18841
|
+
const i = this._components.get(Tt), t = this._components.get(Bi);
|
|
18807
18842
|
for (const [e, s] of this.componentColors) {
|
|
18808
18843
|
const n = i.guidToFragmentIdMap(s);
|
|
18809
18844
|
t.resetColor(n);
|
|
@@ -18899,7 +18934,7 @@ class To {
|
|
|
18899
18934
|
</VisualizationInfo>`;
|
|
18900
18935
|
}
|
|
18901
18936
|
}
|
|
18902
|
-
class ih extends
|
|
18937
|
+
class ih extends Ge {
|
|
18903
18938
|
constructor() {
|
|
18904
18939
|
super(...arguments);
|
|
18905
18940
|
C(this, "_config", {
|
|
@@ -18916,7 +18951,7 @@ class ih extends Ye {
|
|
|
18916
18951
|
this._config.overwriteColors.value = t;
|
|
18917
18952
|
}
|
|
18918
18953
|
}
|
|
18919
|
-
const
|
|
18954
|
+
const Ui = class Ui extends At {
|
|
18920
18955
|
constructor(t) {
|
|
18921
18956
|
super(t);
|
|
18922
18957
|
C(this, "enabled", !0);
|
|
@@ -18926,16 +18961,16 @@ const vi = class vi extends At {
|
|
|
18926
18961
|
*/
|
|
18927
18962
|
C(this, "list", new re());
|
|
18928
18963
|
C(this, "isSetup", !1);
|
|
18929
|
-
C(this, "onSetup", new
|
|
18964
|
+
C(this, "onSetup", new j());
|
|
18930
18965
|
C(this, "config", new ih(
|
|
18931
18966
|
this,
|
|
18932
18967
|
this.components,
|
|
18933
18968
|
"Viewpoints",
|
|
18934
|
-
|
|
18969
|
+
Ui.uuid
|
|
18935
18970
|
));
|
|
18936
18971
|
/** {@link Disposable.onDisposed} */
|
|
18937
|
-
C(this, "onDisposed", new
|
|
18938
|
-
t.add(
|
|
18972
|
+
C(this, "onDisposed", new j());
|
|
18973
|
+
t.add(Ui.uuid, this);
|
|
18939
18974
|
}
|
|
18940
18975
|
/**
|
|
18941
18976
|
* Creates a new Viewpoint instance and adds it to the list.
|
|
@@ -18962,9 +18997,9 @@ const vi = class vi extends At {
|
|
|
18962
18997
|
this.list.dispose(), this.onDisposed.trigger(), this.onDisposed.reset();
|
|
18963
18998
|
}
|
|
18964
18999
|
};
|
|
18965
|
-
C(
|
|
18966
|
-
let ie =
|
|
18967
|
-
class sh extends
|
|
19000
|
+
C(Ui, "uuid", "ee867824-a796-408d-8aa0-4e5962a83c66");
|
|
19001
|
+
let ie = Ui;
|
|
19002
|
+
class sh extends Ge {
|
|
18968
19003
|
constructor() {
|
|
18969
19004
|
super(...arguments);
|
|
18970
19005
|
C(this, "_config", {
|
|
@@ -19108,15 +19143,15 @@ class sh extends Ye {
|
|
|
19108
19143
|
class nh {
|
|
19109
19144
|
constructor(i, t) {
|
|
19110
19145
|
/** {@link Disposable.onDisposed} */
|
|
19111
|
-
C(this, "onDisposed", new
|
|
19146
|
+
C(this, "onDisposed", new j());
|
|
19112
19147
|
/** {@link Updateable.onAfterUpdate} */
|
|
19113
|
-
C(this, "onAfterUpdate", new
|
|
19148
|
+
C(this, "onAfterUpdate", new j());
|
|
19114
19149
|
/** {@link Updateable.onBeforeUpdate} */
|
|
19115
|
-
C(this, "onBeforeUpdate", new
|
|
19150
|
+
C(this, "onBeforeUpdate", new j());
|
|
19116
19151
|
/** {@link Resizeable.onResize} */
|
|
19117
|
-
C(this, "onResize", new
|
|
19152
|
+
C(this, "onResize", new j());
|
|
19118
19153
|
/** {@link Configurable.onSetup} */
|
|
19119
|
-
C(this, "onSetup", new
|
|
19154
|
+
C(this, "onSetup", new j());
|
|
19120
19155
|
/**
|
|
19121
19156
|
* The front offset of the minimap.
|
|
19122
19157
|
* It determines how much the minimap's view is offset from the camera's view.
|
|
@@ -19270,13 +19305,13 @@ const Bs = class Bs extends At {
|
|
|
19270
19305
|
constructor(t) {
|
|
19271
19306
|
super(t);
|
|
19272
19307
|
/** {@link Updateable.onAfterUpdate} */
|
|
19273
|
-
C(this, "onAfterUpdate", new
|
|
19308
|
+
C(this, "onAfterUpdate", new j());
|
|
19274
19309
|
/** {@link Updateable.onBeforeUpdate} */
|
|
19275
|
-
C(this, "onBeforeUpdate", new
|
|
19310
|
+
C(this, "onBeforeUpdate", new j());
|
|
19276
19311
|
/** {@link Disposable.onDisposed} */
|
|
19277
|
-
C(this, "onDisposed", new
|
|
19312
|
+
C(this, "onDisposed", new j());
|
|
19278
19313
|
/** {@link Configurable.onSetup} */
|
|
19279
|
-
C(this, "onSetup", new
|
|
19314
|
+
C(this, "onSetup", new j());
|
|
19280
19315
|
/** {@link Component.enabled} */
|
|
19281
19316
|
C(this, "enabled", !0);
|
|
19282
19317
|
/**
|
|
@@ -19410,11 +19445,11 @@ const Vs = class Vs extends At {
|
|
|
19410
19445
|
N.add(S);
|
|
19411
19446
|
}
|
|
19412
19447
|
for (const S of p) {
|
|
19413
|
-
const N = f.get(S), { edges: y, indices: M } = N, L = f.get(T), { edges: b, indices:
|
|
19448
|
+
const N = f.get(S), { edges: y, indices: M } = N, L = f.get(T), { edges: b, indices: Y } = L;
|
|
19414
19449
|
for (const O of y)
|
|
19415
19450
|
b.add(O), h.set(O, T);
|
|
19416
19451
|
for (const O of M)
|
|
19417
|
-
|
|
19452
|
+
Y.add(O);
|
|
19418
19453
|
f.delete(S);
|
|
19419
19454
|
}
|
|
19420
19455
|
}
|
|
@@ -20311,8 +20346,8 @@ class lh {
|
|
|
20311
20346
|
C(this, "description");
|
|
20312
20347
|
C(this, "instructions");
|
|
20313
20348
|
C(this, "requirementsDescription");
|
|
20314
|
-
C(this, "applicability", new
|
|
20315
|
-
C(this, "requirements", new
|
|
20349
|
+
C(this, "applicability", new we());
|
|
20350
|
+
C(this, "requirements", new we());
|
|
20316
20351
|
C(this, "components");
|
|
20317
20352
|
this.components = i, this.name = t;
|
|
20318
20353
|
for (const s of e)
|
|
@@ -20413,12 +20448,12 @@ const Re = (c) => {
|
|
|
20413
20448
|
(l == null ? void 0 : l.type) === "enumeration" && Array.isArray(l.parameter) && (l.parameter = l.parameter.map(String)), a.value = l, a.dataType = e.dataType, a.uri = e.uri, t.push(a);
|
|
20414
20449
|
}
|
|
20415
20450
|
return t;
|
|
20416
|
-
},
|
|
20451
|
+
}, ri = class ri extends At {
|
|
20417
20452
|
constructor(t) {
|
|
20418
20453
|
super(t);
|
|
20419
20454
|
C(this, "enabled", !0);
|
|
20420
20455
|
C(this, "list", new re());
|
|
20421
|
-
t.add(
|
|
20456
|
+
t.add(ri.uuid, this);
|
|
20422
20457
|
}
|
|
20423
20458
|
/**
|
|
20424
20459
|
* Retrieves a FragmentIdMap based on the given IDSCheckResult array.
|
|
@@ -20461,7 +20496,7 @@ const Re = (c) => {
|
|
|
20461
20496
|
* @returns An array of IDSSpecification instances created from the parsed data.
|
|
20462
20497
|
*/
|
|
20463
20498
|
load(t) {
|
|
20464
|
-
const e = [], s =
|
|
20499
|
+
const e = [], s = ri.xmlParser.parse(t).ids, { specifications: n } = s;
|
|
20465
20500
|
if (n && n.specification) {
|
|
20466
20501
|
const r = Array.isArray(n.specification) ? n.specification : [n.specification];
|
|
20467
20502
|
for (const o of r) {
|
|
@@ -20544,7 +20579,7 @@ const Re = (c) => {
|
|
|
20544
20579
|
</ids:ids>`;
|
|
20545
20580
|
}
|
|
20546
20581
|
};
|
|
20547
|
-
C(
|
|
20582
|
+
C(ri, "uuid", "9f0b9f78-9b2e-481a-b766-2fbfd01f342c"), C(ri, "xmlParser", new Co.XMLParser({
|
|
20548
20583
|
allowBooleanAttributes: !0,
|
|
20549
20584
|
attributeNamePrefix: "",
|
|
20550
20585
|
ignoreAttributes: !1,
|
|
@@ -20557,9 +20592,9 @@ C(ni, "uuid", "9f0b9f78-9b2e-481a-b766-2fbfd01f342c"), C(ni, "xmlParser", new Co
|
|
|
20557
20592
|
removeNSPrefix: !0,
|
|
20558
20593
|
trimValues: !0
|
|
20559
20594
|
}));
|
|
20560
|
-
let $r =
|
|
20595
|
+
let $r = ri;
|
|
20561
20596
|
export {
|
|
20562
|
-
|
|
20597
|
+
Pe as AsyncEvent,
|
|
20563
20598
|
Mt as BCFTopics,
|
|
20564
20599
|
Kl as BCFTopicsConfigManager,
|
|
20565
20600
|
xn as Base,
|
|
@@ -20568,20 +20603,20 @@ export {
|
|
|
20568
20603
|
Ga as BaseScene,
|
|
20569
20604
|
Bn as BaseWorldItem,
|
|
20570
20605
|
wn as BoundingBoxer,
|
|
20571
|
-
|
|
20606
|
+
Bi as Classifier,
|
|
20572
20607
|
Sn as Clipper,
|
|
20573
20608
|
Pn as Comment,
|
|
20574
20609
|
At as Component,
|
|
20575
20610
|
ph as ComponentWithUI,
|
|
20576
20611
|
Cs as Components,
|
|
20577
|
-
|
|
20578
|
-
|
|
20612
|
+
Ye as ConfigManager,
|
|
20613
|
+
Ge as Configurator,
|
|
20579
20614
|
lc as CullerRenderer,
|
|
20580
20615
|
Fn as Cullers,
|
|
20581
20616
|
re as DataMap,
|
|
20582
|
-
|
|
20583
|
-
|
|
20584
|
-
|
|
20617
|
+
we as DataSet,
|
|
20618
|
+
De as Disposer,
|
|
20619
|
+
j as Event,
|
|
20585
20620
|
zr as Exploder,
|
|
20586
20621
|
Oc as FirstPersonMode,
|
|
20587
20622
|
Tt as FragmentsManager,
|
|
@@ -20607,7 +20642,7 @@ export {
|
|
|
20607
20642
|
Nn as IfcLoader,
|
|
20608
20643
|
yn as IfcPropertiesManager,
|
|
20609
20644
|
eh as IfcPropertiesTiler,
|
|
20610
|
-
|
|
20645
|
+
oi as IfcPropertiesUtils,
|
|
20611
20646
|
As as IfcPropertyQuery,
|
|
20612
20647
|
kt as IfcRelationsIndexer,
|
|
20613
20648
|
Jl as IfcStreamingSettings,
|
|
@@ -20623,9 +20658,9 @@ export {
|
|
|
20623
20658
|
yc as PlanMode,
|
|
20624
20659
|
Lc as ProjectionManager,
|
|
20625
20660
|
th as PropertiesStreamingSettings,
|
|
20626
|
-
|
|
20661
|
+
ci as Raycasters,
|
|
20627
20662
|
Rh as ShadowedScene,
|
|
20628
|
-
|
|
20663
|
+
xi as SimpleCamera,
|
|
20629
20664
|
Ec as SimpleGrid,
|
|
20630
20665
|
dc as SimpleGridConfigManager,
|
|
20631
20666
|
Vn as SimplePlane,
|