@pan-ya/libgeo3dviewer 1.7.31 → 1.7.33

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.
@@ -1,6 +1,6 @@
1
1
  var Ye = Object.defineProperty;
2
2
  var qe = (e, t, n) => t in e ? Ye(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
3
- var ue = (e, t, n) => (qe(e, typeof t != "symbol" ? t + "" : t, n), n);
3
+ var le = (e, t, n) => (qe(e, typeof t != "symbol" ? t + "" : t, n), n);
4
4
  import { jsx, jsxs, Fragment } from "react/jsx-runtime";
5
5
  import { Vector3, ArcRotateCamera, Material, Color3, RawTexture, ShaderMaterial, NodeMaterial, Vector2, PointerEventTypes, Texture, LoadAssetContainerAsync, Scalar, Engine, DynamicTexture, Tags, Plane, Vector4, VertexData, Color4, MeshBuilder, Mesh as Mesh$1, StandardMaterial, EngineStore, Constants, AxesViewer, BaseCameraPointersInput, Quaternion, Axis, Tools, FreeCameraMouseWheelInput, Effect, PostProcess, TransformNode, InspectableType, FreeCamera, PivotTools, SceneOptimizerOptions, SceneOptimizer, AssetsManager, ParticleSystem as ParticleSystem$2, GPUParticleSystem, VideoTexture, Ray, MorphTargetManager, VertexBuffer, Animation as Animation$2, GradientBlockColorStep, Matrix, HighlightLayer, SubMesh, AnimationEvent } from "@babylonjs/core";
6
6
  import { GPUPicker } from "@babylonjs/core/Collisions/gpuPicker";
@@ -92,8 +92,8 @@ function requireTrees() {
92
92
  hasRequiredTrees = 1;
93
93
  var e = requireCommon(), t = 4, n = 0, i = 1, r = 2;
94
94
  function o(I) {
95
- for (var oe = I.length; --oe >= 0; )
96
- I[oe] = 0;
95
+ for (var re = I.length; --re >= 0; )
96
+ I[re] = 0;
97
97
  }
98
98
  var a = 0, s = 1, l = 2, c = 3, f = 258, u = 29, d = 256, h = d + 1 + u, m = 30, _ = 19, v = 2 * h + 1, x = 15, g = 16, C = 7, S = 256, N = 16, R = 17, y = 18, T = (
99
99
  /* extra bits for each length code */
@@ -108,54 +108,54 @@ function requireTrees() {
108
108
  o(O);
109
109
  var F = new Array(m * 2);
110
110
  o(F);
111
- var L = new Array(E);
112
- o(L);
113
- var w = new Array(f - c + 1);
111
+ var w = new Array(E);
114
112
  o(w);
113
+ var L = new Array(f - c + 1);
114
+ o(L);
115
115
  var B = new Array(u);
116
116
  o(B);
117
117
  var D = new Array(m);
118
118
  o(D);
119
- function W(I, oe, le, me, z) {
120
- this.static_tree = I, this.extra_bits = oe, this.extra_base = le, this.elems = me, this.max_length = z, this.has_stree = I && I.length;
119
+ function W(I, re, se, me, z) {
120
+ this.static_tree = I, this.extra_bits = re, this.extra_base = se, this.elems = me, this.max_length = z, this.has_stree = I && I.length;
121
121
  }
122
- var ie, ne, U;
123
- function re(I, oe) {
124
- this.dyn_tree = I, this.max_code = 0, this.stat_desc = oe;
122
+ var ie, ee, H;
123
+ function oe(I, re) {
124
+ this.dyn_tree = I, this.max_code = 0, this.stat_desc = re;
125
125
  }
126
126
  function te(I) {
127
- return I < 256 ? L[I] : L[256 + (I >>> 7)];
127
+ return I < 256 ? w[I] : w[256 + (I >>> 7)];
128
128
  }
129
- function Q(I, oe) {
130
- I.pending_buf[I.pending++] = oe & 255, I.pending_buf[I.pending++] = oe >>> 8 & 255;
129
+ function Q(I, re) {
130
+ I.pending_buf[I.pending++] = re & 255, I.pending_buf[I.pending++] = re >>> 8 & 255;
131
131
  }
132
- function J(I, oe, le) {
133
- I.bi_valid > g - le ? (I.bi_buf |= oe << I.bi_valid & 65535, Q(I, I.bi_buf), I.bi_buf = oe >> g - I.bi_valid, I.bi_valid += le - g) : (I.bi_buf |= oe << I.bi_valid & 65535, I.bi_valid += le);
132
+ function J(I, re, se) {
133
+ I.bi_valid > g - se ? (I.bi_buf |= re << I.bi_valid & 65535, Q(I, I.bi_buf), I.bi_buf = re >> g - I.bi_valid, I.bi_valid += se - g) : (I.bi_buf |= re << I.bi_valid & 65535, I.bi_valid += se);
134
134
  }
135
- function de(I, oe, le) {
135
+ function ce(I, re, se) {
136
136
  J(
137
137
  I,
138
- le[oe * 2],
139
- le[oe * 2 + 1]
138
+ se[re * 2],
139
+ se[re * 2 + 1]
140
140
  /*.Len*/
141
141
  );
142
142
  }
143
- function ee(I, oe) {
144
- var le = 0;
143
+ function j(I, re) {
144
+ var se = 0;
145
145
  do
146
- le |= I & 1, I >>>= 1, le <<= 1;
147
- while (--oe > 0);
148
- return le >>> 1;
146
+ se |= I & 1, I >>>= 1, se <<= 1;
147
+ while (--re > 0);
148
+ return se >>> 1;
149
149
  }
150
150
  function G(I) {
151
151
  I.bi_valid === 16 ? (Q(I, I.bi_buf), I.bi_buf = 0, I.bi_valid = 0) : I.bi_valid >= 8 && (I.pending_buf[I.pending++] = I.bi_buf & 255, I.bi_buf >>= 8, I.bi_valid -= 8);
152
152
  }
153
- function xe(I, oe) {
154
- var le = oe.dyn_tree, me = oe.max_code, z = oe.stat_desc.static_tree, K = oe.stat_desc.has_stree, b = oe.stat_desc.extra_bits, ae = oe.stat_desc.extra_base, ge = oe.stat_desc.max_length, p, Z, X, k, $, H, ve = 0;
153
+ function xe(I, re) {
154
+ var se = re.dyn_tree, me = re.max_code, z = re.stat_desc.static_tree, K = re.stat_desc.has_stree, b = re.stat_desc.extra_bits, ae = re.stat_desc.extra_base, ge = re.stat_desc.max_length, p, Z, X, k, $, U, ve = 0;
155
155
  for (k = 0; k <= x; k++)
156
156
  I.bl_count[k] = 0;
157
- for (le[I.heap[I.heap_max] * 2 + 1] = 0, p = I.heap_max + 1; p < v; p++)
158
- Z = I.heap[p], k = le[le[Z * 2 + 1] * 2 + 1] + 1, k > ge && (k = ge, ve++), le[Z * 2 + 1] = k, !(Z > me) && (I.bl_count[k]++, $ = 0, Z >= ae && ($ = b[Z - ae]), H = le[Z * 2], I.opt_len += H * (k + $), K && (I.static_len += H * (z[Z * 2 + 1] + $)));
157
+ for (se[I.heap[I.heap_max] * 2 + 1] = 0, p = I.heap_max + 1; p < v; p++)
158
+ Z = I.heap[p], k = se[se[Z * 2 + 1] * 2 + 1] + 1, k > ge && (k = ge, ve++), se[Z * 2 + 1] = k, !(Z > me) && (I.bl_count[k]++, $ = 0, Z >= ae && ($ = b[Z - ae]), U = se[Z * 2], I.opt_len += U * (k + $), K && (I.static_len += U * (z[Z * 2 + 1] + $)));
159
159
  if (ve !== 0) {
160
160
  do {
161
161
  for (k = ge - 1; I.bl_count[k] === 0; )
@@ -164,31 +164,31 @@ function requireTrees() {
164
164
  } while (ve > 0);
165
165
  for (k = ge; k !== 0; k--)
166
166
  for (Z = I.bl_count[k]; Z !== 0; )
167
- X = I.heap[--p], !(X > me) && (le[X * 2 + 1] !== k && (I.opt_len += (k - le[X * 2 + 1]) * le[X * 2], le[X * 2 + 1] = k), Z--);
167
+ X = I.heap[--p], !(X > me) && (se[X * 2 + 1] !== k && (I.opt_len += (k - se[X * 2 + 1]) * se[X * 2], se[X * 2 + 1] = k), Z--);
168
168
  }
169
169
  }
170
- function fe(I, oe, le) {
170
+ function fe(I, re, se) {
171
171
  var me = new Array(x + 1), z = 0, K, b;
172
172
  for (K = 1; K <= x; K++)
173
- me[K] = z = z + le[K - 1] << 1;
174
- for (b = 0; b <= oe; b++) {
173
+ me[K] = z = z + se[K - 1] << 1;
174
+ for (b = 0; b <= re; b++) {
175
175
  var ae = I[b * 2 + 1];
176
- ae !== 0 && (I[b * 2] = ee(me[ae]++, ae));
176
+ ae !== 0 && (I[b * 2] = j(me[ae]++, ae));
177
177
  }
178
178
  }
179
179
  function V() {
180
- var I, oe, le, me, z, K = new Array(x + 1);
181
- for (le = 0, me = 0; me < u - 1; me++)
182
- for (B[me] = le, I = 0; I < 1 << T[me]; I++)
183
- w[le++] = me;
184
- for (w[le - 1] = me, z = 0, me = 0; me < 16; me++)
180
+ var I, re, se, me, z, K = new Array(x + 1);
181
+ for (se = 0, me = 0; me < u - 1; me++)
182
+ for (B[me] = se, I = 0; I < 1 << T[me]; I++)
183
+ L[se++] = me;
184
+ for (L[se - 1] = me, z = 0, me = 0; me < 16; me++)
185
185
  for (D[me] = z, I = 0; I < 1 << M[me]; I++)
186
- L[z++] = me;
186
+ w[z++] = me;
187
187
  for (z >>= 7; me < m; me++)
188
188
  for (D[me] = z << 7, I = 0; I < 1 << M[me] - 7; I++)
189
- L[256 + z++] = me;
190
- for (oe = 0; oe <= x; oe++)
191
- K[oe] = 0;
189
+ w[256 + z++] = me;
190
+ for (re = 0; re <= x; re++)
191
+ K[re] = 0;
192
192
  for (I = 0; I <= 143; )
193
193
  O[I * 2 + 1] = 8, I++, K[8]++;
194
194
  for (; I <= 255; )
@@ -198,50 +198,50 @@ function requireTrees() {
198
198
  for (; I <= 287; )
199
199
  O[I * 2 + 1] = 8, I++, K[8]++;
200
200
  for (fe(O, h + 1, K), I = 0; I < m; I++)
201
- F[I * 2 + 1] = 5, F[I * 2] = ee(I, 5);
202
- ie = new W(O, T, d + 1, h, x), ne = new W(F, M, 0, m, x), U = new W(new Array(0), A, 0, _, C);
201
+ F[I * 2 + 1] = 5, F[I * 2] = j(I, 5);
202
+ ie = new W(O, T, d + 1, h, x), ee = new W(F, M, 0, m, x), H = new W(new Array(0), A, 0, _, C);
203
203
  }
204
204
  function Y(I) {
205
- var oe;
206
- for (oe = 0; oe < h; oe++)
207
- I.dyn_ltree[oe * 2] = 0;
208
- for (oe = 0; oe < m; oe++)
209
- I.dyn_dtree[oe * 2] = 0;
210
- for (oe = 0; oe < _; oe++)
211
- I.bl_tree[oe * 2] = 0;
205
+ var re;
206
+ for (re = 0; re < h; re++)
207
+ I.dyn_ltree[re * 2] = 0;
208
+ for (re = 0; re < m; re++)
209
+ I.dyn_dtree[re * 2] = 0;
210
+ for (re = 0; re < _; re++)
211
+ I.bl_tree[re * 2] = 0;
212
212
  I.dyn_ltree[S * 2] = 1, I.opt_len = I.static_len = 0, I.last_lit = I.matches = 0;
213
213
  }
214
- function ye(I) {
214
+ function _e(I) {
215
215
  I.bi_valid > 8 ? Q(I, I.bi_buf) : I.bi_valid > 0 && (I.pending_buf[I.pending++] = I.bi_buf), I.bi_buf = 0, I.bi_valid = 0;
216
216
  }
217
- function q(I, oe, le, me) {
218
- ye(I), me && (Q(I, le), Q(I, ~le)), e.arraySet(I.pending_buf, I.window, oe, le, I.pending), I.pending += le;
217
+ function ye(I, re, se, me) {
218
+ _e(I), me && (Q(I, se), Q(I, ~se)), e.arraySet(I.pending_buf, I.window, re, se, I.pending), I.pending += se;
219
219
  }
220
- function se(I, oe, le, me) {
221
- var z = oe * 2, K = le * 2;
222
- return I[z] < I[K] || I[z] === I[K] && me[oe] <= me[le];
220
+ function q(I, re, se, me) {
221
+ var z = re * 2, K = se * 2;
222
+ return I[z] < I[K] || I[z] === I[K] && me[re] <= me[se];
223
223
  }
224
- function ce(I, oe, le) {
225
- for (var me = I.heap[le], z = le << 1; z <= I.heap_len && (z < I.heap_len && se(oe, I.heap[z + 1], I.heap[z], I.depth) && z++, !se(oe, me, I.heap[z], I.depth)); )
226
- I.heap[le] = I.heap[z], le = z, z <<= 1;
227
- I.heap[le] = me;
224
+ function ue(I, re, se) {
225
+ for (var me = I.heap[se], z = se << 1; z <= I.heap_len && (z < I.heap_len && q(re, I.heap[z + 1], I.heap[z], I.depth) && z++, !q(re, me, I.heap[z], I.depth)); )
226
+ I.heap[se] = I.heap[z], se = z, z <<= 1;
227
+ I.heap[se] = me;
228
228
  }
229
- function j(I, oe, le) {
229
+ function ne(I, re, se) {
230
230
  var me, z, K = 0, b, ae;
231
231
  if (I.last_lit !== 0)
232
232
  do
233
- me = I.pending_buf[I.d_buf + K * 2] << 8 | I.pending_buf[I.d_buf + K * 2 + 1], z = I.pending_buf[I.l_buf + K], K++, me === 0 ? de(I, z, oe) : (b = w[z], de(I, b + d + 1, oe), ae = T[b], ae !== 0 && (z -= B[b], J(I, z, ae)), me--, b = te(me), de(I, b, le), ae = M[b], ae !== 0 && (me -= D[b], J(I, me, ae)));
233
+ me = I.pending_buf[I.d_buf + K * 2] << 8 | I.pending_buf[I.d_buf + K * 2 + 1], z = I.pending_buf[I.l_buf + K], K++, me === 0 ? ce(I, z, re) : (b = L[z], ce(I, b + d + 1, re), ae = T[b], ae !== 0 && (z -= B[b], J(I, z, ae)), me--, b = te(me), ce(I, b, se), ae = M[b], ae !== 0 && (me -= D[b], J(I, me, ae)));
234
234
  while (K < I.last_lit);
235
- de(I, S, oe);
235
+ ce(I, S, re);
236
236
  }
237
- function Ce(I, oe) {
238
- var le = oe.dyn_tree, me = oe.stat_desc.static_tree, z = oe.stat_desc.has_stree, K = oe.stat_desc.elems, b, ae, ge = -1, p;
237
+ function de(I, re) {
238
+ var se = re.dyn_tree, me = re.stat_desc.static_tree, z = re.stat_desc.has_stree, K = re.stat_desc.elems, b, ae, ge = -1, p;
239
239
  for (I.heap_len = 0, I.heap_max = v, b = 0; b < K; b++)
240
- le[b * 2] !== 0 ? (I.heap[++I.heap_len] = ge = b, I.depth[b] = 0) : le[b * 2 + 1] = 0;
240
+ se[b * 2] !== 0 ? (I.heap[++I.heap_len] = ge = b, I.depth[b] = 0) : se[b * 2 + 1] = 0;
241
241
  for (; I.heap_len < 2; )
242
- p = I.heap[++I.heap_len] = ge < 2 ? ++ge : 0, le[p * 2] = 1, I.depth[p] = 0, I.opt_len--, z && (I.static_len -= me[p * 2 + 1]);
243
- for (oe.max_code = ge, b = I.heap_len >> 1; b >= 1; b--)
244
- ce(I, le, b);
242
+ p = I.heap[++I.heap_len] = ge < 2 ? ++ge : 0, se[p * 2] = 1, I.depth[p] = 0, I.opt_len--, z && (I.static_len -= me[p * 2 + 1]);
243
+ for (re.max_code = ge, b = I.heap_len >> 1; b >= 1; b--)
244
+ ue(I, se, b);
245
245
  p = K;
246
246
  do
247
247
  b = I.heap[
@@ -250,20 +250,20 @@ function requireTrees() {
250
250
  ], I.heap[
251
251
  1
252
252
  /*SMALLEST*/
253
- ] = I.heap[I.heap_len--], ce(
253
+ ] = I.heap[I.heap_len--], ue(
254
254
  I,
255
- le,
255
+ se,
256
256
  1
257
257
  /*SMALLEST*/
258
258
  ), ae = I.heap[
259
259
  1
260
260
  /*SMALLEST*/
261
- ], I.heap[--I.heap_max] = b, I.heap[--I.heap_max] = ae, le[p * 2] = le[b * 2] + le[ae * 2], I.depth[p] = (I.depth[b] >= I.depth[ae] ? I.depth[b] : I.depth[ae]) + 1, le[b * 2 + 1] = le[ae * 2 + 1] = p, I.heap[
261
+ ], I.heap[--I.heap_max] = b, I.heap[--I.heap_max] = ae, se[p * 2] = se[b * 2] + se[ae * 2], I.depth[p] = (I.depth[b] >= I.depth[ae] ? I.depth[b] : I.depth[ae]) + 1, se[b * 2 + 1] = se[ae * 2 + 1] = p, I.heap[
262
262
  1
263
263
  /*SMALLEST*/
264
- ] = p++, ce(
264
+ ] = p++, ue(
265
265
  I,
266
- le,
266
+ se,
267
267
  1
268
268
  /*SMALLEST*/
269
269
  );
@@ -271,68 +271,68 @@ function requireTrees() {
271
271
  I.heap[--I.heap_max] = I.heap[
272
272
  1
273
273
  /*SMALLEST*/
274
- ], xe(I, oe), fe(le, ge, I.bl_count);
274
+ ], xe(I, re), fe(se, ge, I.bl_count);
275
275
  }
276
- function _e(I, oe, le) {
277
- var me, z = -1, K, b = oe[0 * 2 + 1], ae = 0, ge = 7, p = 4;
278
- for (b === 0 && (ge = 138, p = 3), oe[(le + 1) * 2 + 1] = 65535, me = 0; me <= le; me++)
279
- K = b, b = oe[(me + 1) * 2 + 1], !(++ae < ge && K === b) && (ae < p ? I.bl_tree[K * 2] += ae : K !== 0 ? (K !== z && I.bl_tree[K * 2]++, I.bl_tree[N * 2]++) : ae <= 10 ? I.bl_tree[R * 2]++ : I.bl_tree[y * 2]++, ae = 0, z = K, b === 0 ? (ge = 138, p = 3) : K === b ? (ge = 6, p = 3) : (ge = 7, p = 4));
276
+ function Te(I, re, se) {
277
+ var me, z = -1, K, b = re[0 * 2 + 1], ae = 0, ge = 7, p = 4;
278
+ for (b === 0 && (ge = 138, p = 3), re[(se + 1) * 2 + 1] = 65535, me = 0; me <= se; me++)
279
+ K = b, b = re[(me + 1) * 2 + 1], !(++ae < ge && K === b) && (ae < p ? I.bl_tree[K * 2] += ae : K !== 0 ? (K !== z && I.bl_tree[K * 2]++, I.bl_tree[N * 2]++) : ae <= 10 ? I.bl_tree[R * 2]++ : I.bl_tree[y * 2]++, ae = 0, z = K, b === 0 ? (ge = 138, p = 3) : K === b ? (ge = 6, p = 3) : (ge = 7, p = 4));
280
280
  }
281
- function be(I, oe, le) {
282
- var me, z = -1, K, b = oe[0 * 2 + 1], ae = 0, ge = 7, p = 4;
283
- for (b === 0 && (ge = 138, p = 3), me = 0; me <= le; me++)
284
- if (K = b, b = oe[(me + 1) * 2 + 1], !(++ae < ge && K === b)) {
281
+ function Ce(I, re, se) {
282
+ var me, z = -1, K, b = re[0 * 2 + 1], ae = 0, ge = 7, p = 4;
283
+ for (b === 0 && (ge = 138, p = 3), me = 0; me <= se; me++)
284
+ if (K = b, b = re[(me + 1) * 2 + 1], !(++ae < ge && K === b)) {
285
285
  if (ae < p)
286
286
  do
287
- de(I, K, I.bl_tree);
287
+ ce(I, K, I.bl_tree);
288
288
  while (--ae !== 0);
289
289
  else
290
- K !== 0 ? (K !== z && (de(I, K, I.bl_tree), ae--), de(I, N, I.bl_tree), J(I, ae - 3, 2)) : ae <= 10 ? (de(I, R, I.bl_tree), J(I, ae - 3, 3)) : (de(I, y, I.bl_tree), J(I, ae - 11, 7));
290
+ K !== 0 ? (K !== z && (ce(I, K, I.bl_tree), ae--), ce(I, N, I.bl_tree), J(I, ae - 3, 2)) : ae <= 10 ? (ce(I, R, I.bl_tree), J(I, ae - 3, 3)) : (ce(I, y, I.bl_tree), J(I, ae - 11, 7));
291
291
  ae = 0, z = K, b === 0 ? (ge = 138, p = 3) : K === b ? (ge = 6, p = 3) : (ge = 7, p = 4);
292
292
  }
293
293
  }
294
- function Se(I) {
295
- var oe;
296
- for (_e(I, I.dyn_ltree, I.l_desc.max_code), _e(I, I.dyn_dtree, I.d_desc.max_code), Ce(I, I.bl_desc), oe = _ - 1; oe >= 3 && I.bl_tree[P[oe] * 2 + 1] === 0; oe--)
294
+ function be(I) {
295
+ var re;
296
+ for (Te(I, I.dyn_ltree, I.l_desc.max_code), Te(I, I.dyn_dtree, I.d_desc.max_code), de(I, I.bl_desc), re = _ - 1; re >= 3 && I.bl_tree[P[re] * 2 + 1] === 0; re--)
297
297
  ;
298
- return I.opt_len += 3 * (oe + 1) + 5 + 5 + 4, oe;
298
+ return I.opt_len += 3 * (re + 1) + 5 + 5 + 4, re;
299
299
  }
300
- function Te(I, oe, le, me) {
300
+ function Se(I, re, se, me) {
301
301
  var z;
302
- for (J(I, oe - 257, 5), J(I, le - 1, 5), J(I, me - 4, 4), z = 0; z < me; z++)
302
+ for (J(I, re - 257, 5), J(I, se - 1, 5), J(I, me - 4, 4), z = 0; z < me; z++)
303
303
  J(I, I.bl_tree[P[z] * 2 + 1], 3);
304
- be(I, I.dyn_ltree, oe - 1), be(I, I.dyn_dtree, le - 1);
304
+ Ce(I, I.dyn_ltree, re - 1), Ce(I, I.dyn_dtree, se - 1);
305
305
  }
306
306
  function Pe(I) {
307
- var oe = 4093624447, le;
308
- for (le = 0; le <= 31; le++, oe >>>= 1)
309
- if (oe & 1 && I.dyn_ltree[le * 2] !== 0)
307
+ var re = 4093624447, se;
308
+ for (se = 0; se <= 31; se++, re >>>= 1)
309
+ if (re & 1 && I.dyn_ltree[se * 2] !== 0)
310
310
  return n;
311
311
  if (I.dyn_ltree[9 * 2] !== 0 || I.dyn_ltree[10 * 2] !== 0 || I.dyn_ltree[13 * 2] !== 0)
312
312
  return i;
313
- for (le = 32; le < d; le++)
314
- if (I.dyn_ltree[le * 2] !== 0)
313
+ for (se = 32; se < d; se++)
314
+ if (I.dyn_ltree[se * 2] !== 0)
315
315
  return i;
316
316
  return n;
317
317
  }
318
- var Ae = !1;
318
+ var Re = !1;
319
319
  function Me(I) {
320
- Ae || (V(), Ae = !0), I.l_desc = new re(I.dyn_ltree, ie), I.d_desc = new re(I.dyn_dtree, ne), I.bl_desc = new re(I.bl_tree, U), I.bi_buf = 0, I.bi_valid = 0, Y(I);
320
+ Re || (V(), Re = !0), I.l_desc = new oe(I.dyn_ltree, ie), I.d_desc = new oe(I.dyn_dtree, ee), I.bl_desc = new oe(I.bl_tree, H), I.bi_buf = 0, I.bi_valid = 0, Y(I);
321
321
  }
322
- function Ie(I, oe, le, me) {
323
- J(I, (a << 1) + (me ? 1 : 0), 3), q(I, oe, le, !0);
322
+ function Ee(I, re, se, me) {
323
+ J(I, (a << 1) + (me ? 1 : 0), 3), ye(I, re, se, !0);
324
324
  }
325
- function Re(I) {
326
- J(I, s << 1, 3), de(I, S, O), G(I);
325
+ function ke(I) {
326
+ J(I, s << 1, 3), ce(I, S, O), G(I);
327
327
  }
328
- function Ee(I, oe, le, me) {
328
+ function Oe(I, re, se, me) {
329
329
  var z, K, b = 0;
330
- I.level > 0 ? (I.strm.data_type === r && (I.strm.data_type = Pe(I)), Ce(I, I.l_desc), Ce(I, I.d_desc), b = Se(I), z = I.opt_len + 3 + 7 >>> 3, K = I.static_len + 3 + 7 >>> 3, K <= z && (z = K)) : z = K = le + 5, le + 4 <= z && oe !== -1 ? Ie(I, oe, le, me) : I.strategy === t || K === z ? (J(I, (s << 1) + (me ? 1 : 0), 3), j(I, O, F)) : (J(I, (l << 1) + (me ? 1 : 0), 3), Te(I, I.l_desc.max_code + 1, I.d_desc.max_code + 1, b + 1), j(I, I.dyn_ltree, I.dyn_dtree)), Y(I), me && ye(I);
330
+ I.level > 0 ? (I.strm.data_type === r && (I.strm.data_type = Pe(I)), de(I, I.l_desc), de(I, I.d_desc), b = be(I), z = I.opt_len + 3 + 7 >>> 3, K = I.static_len + 3 + 7 >>> 3, K <= z && (z = K)) : z = K = se + 5, se + 4 <= z && re !== -1 ? Ee(I, re, se, me) : I.strategy === t || K === z ? (J(I, (s << 1) + (me ? 1 : 0), 3), ne(I, O, F)) : (J(I, (l << 1) + (me ? 1 : 0), 3), Se(I, I.l_desc.max_code + 1, I.d_desc.max_code + 1, b + 1), ne(I, I.dyn_ltree, I.dyn_dtree)), Y(I), me && _e(I);
331
331
  }
332
- function $e(I, oe, le) {
333
- return I.pending_buf[I.d_buf + I.last_lit * 2] = oe >>> 8 & 255, I.pending_buf[I.d_buf + I.last_lit * 2 + 1] = oe & 255, I.pending_buf[I.l_buf + I.last_lit] = le & 255, I.last_lit++, oe === 0 ? I.dyn_ltree[le * 2]++ : (I.matches++, oe--, I.dyn_ltree[(w[le] + d + 1) * 2]++, I.dyn_dtree[te(oe) * 2]++), I.last_lit === I.lit_bufsize - 1;
332
+ function Fe(I, re, se) {
333
+ return I.pending_buf[I.d_buf + I.last_lit * 2] = re >>> 8 & 255, I.pending_buf[I.d_buf + I.last_lit * 2 + 1] = re & 255, I.pending_buf[I.l_buf + I.last_lit] = se & 255, I.last_lit++, re === 0 ? I.dyn_ltree[se * 2]++ : (I.matches++, re--, I.dyn_ltree[(L[se] + d + 1) * 2]++, I.dyn_dtree[te(re) * 2]++), I.last_lit === I.lit_bufsize - 1;
334
334
  }
335
- return trees._tr_init = Me, trees._tr_stored_block = Ie, trees._tr_flush_block = Ee, trees._tr_tally = $e, trees._tr_align = Re, trees;
335
+ return trees._tr_init = Me, trees._tr_stored_block = Ee, trees._tr_flush_block = Oe, trees._tr_tally = Fe, trees._tr_align = ke, trees;
336
336
  }
337
337
  var adler32_1, hasRequiredAdler32;
338
338
  function requireAdler32() {
@@ -403,56 +403,56 @@ function requireDeflate$1() {
403
403
  if (hasRequiredDeflate$1)
404
404
  return deflate;
405
405
  hasRequiredDeflate$1 = 1;
406
- var e = requireCommon(), t = requireTrees(), n = requireAdler32(), i = requireCrc32(), r = requireMessages(), o = 0, a = 1, s = 3, l = 4, c = 5, f = 0, u = 1, d = -2, h = -3, m = -5, _ = -1, v = 1, x = 2, g = 3, C = 4, S = 0, N = 2, R = 8, y = 9, T = 15, M = 8, A = 29, P = 256, E = P + 1 + A, O = 30, F = 19, L = 2 * E + 1, w = 15, B = 3, D = 258, W = D + B + 1, ie = 32, ne = 42, U = 69, re = 73, te = 91, Q = 103, J = 113, de = 666, ee = 1, G = 2, xe = 3, fe = 4, V = 3;
406
+ var e = requireCommon(), t = requireTrees(), n = requireAdler32(), i = requireCrc32(), r = requireMessages(), o = 0, a = 1, s = 3, l = 4, c = 5, f = 0, u = 1, d = -2, h = -3, m = -5, _ = -1, v = 1, x = 2, g = 3, C = 4, S = 0, N = 2, R = 8, y = 9, T = 15, M = 8, A = 29, P = 256, E = P + 1 + A, O = 30, F = 19, w = 2 * E + 1, L = 15, B = 3, D = 258, W = D + B + 1, ie = 32, ee = 42, H = 69, oe = 73, te = 91, Q = 103, J = 113, ce = 666, j = 1, G = 2, xe = 3, fe = 4, V = 3;
407
407
  function Y(p, Z) {
408
408
  return p.msg = r[Z], Z;
409
409
  }
410
- function ye(p) {
410
+ function _e(p) {
411
411
  return (p << 1) - (p > 4 ? 9 : 0);
412
412
  }
413
- function q(p) {
413
+ function ye(p) {
414
414
  for (var Z = p.length; --Z >= 0; )
415
415
  p[Z] = 0;
416
416
  }
417
- function se(p) {
417
+ function q(p) {
418
418
  var Z = p.state, X = Z.pending;
419
419
  X > p.avail_out && (X = p.avail_out), X !== 0 && (e.arraySet(p.output, Z.pending_buf, Z.pending_out, X, p.next_out), p.next_out += X, Z.pending_out += X, p.total_out += X, p.avail_out -= X, Z.pending -= X, Z.pending === 0 && (Z.pending_out = 0));
420
420
  }
421
- function ce(p, Z) {
422
- t._tr_flush_block(p, p.block_start >= 0 ? p.block_start : -1, p.strstart - p.block_start, Z), p.block_start = p.strstart, se(p.strm);
421
+ function ue(p, Z) {
422
+ t._tr_flush_block(p, p.block_start >= 0 ? p.block_start : -1, p.strstart - p.block_start, Z), p.block_start = p.strstart, q(p.strm);
423
423
  }
424
- function j(p, Z) {
424
+ function ne(p, Z) {
425
425
  p.pending_buf[p.pending++] = Z;
426
426
  }
427
- function Ce(p, Z) {
427
+ function de(p, Z) {
428
428
  p.pending_buf[p.pending++] = Z >>> 8 & 255, p.pending_buf[p.pending++] = Z & 255;
429
429
  }
430
- function _e(p, Z, X, k) {
430
+ function Te(p, Z, X, k) {
431
431
  var $ = p.avail_in;
432
432
  return $ > k && ($ = k), $ === 0 ? 0 : (p.avail_in -= $, e.arraySet(Z, p.input, p.next_in, $, X), p.state.wrap === 1 ? p.adler = n(p.adler, Z, $, X) : p.state.wrap === 2 && (p.adler = i(p.adler, Z, $, X)), p.next_in += $, p.total_in += $, $);
433
433
  }
434
- function be(p, Z) {
435
- var X = p.max_chain_length, k = p.strstart, $, H, ve = p.prev_length, pe = p.nice_match, he = p.strstart > p.w_size - W ? p.strstart - (p.w_size - W) : 0, ke = p.window, Ue = p.w_mask, Oe = p.prev, Ne = p.strstart + D, Le = ke[k + ve - 1], De = ke[k + ve];
434
+ function Ce(p, Z) {
435
+ var X = p.max_chain_length, k = p.strstart, $, U, ve = p.prev_length, pe = p.nice_match, he = p.strstart > p.w_size - W ? p.strstart - (p.w_size - W) : 0, Ne = p.window, Ue = p.w_mask, we = p.prev, Ae = p.strstart + D, Be = Ne[k + ve - 1], $e = Ne[k + ve];
436
436
  p.prev_length >= p.good_match && (X >>= 2), pe > p.lookahead && (pe = p.lookahead);
437
437
  do
438
- if ($ = Z, !(ke[$ + ve] !== De || ke[$ + ve - 1] !== Le || ke[$] !== ke[k] || ke[++$] !== ke[k + 1])) {
438
+ if ($ = Z, !(Ne[$ + ve] !== $e || Ne[$ + ve - 1] !== Be || Ne[$] !== Ne[k] || Ne[++$] !== Ne[k + 1])) {
439
439
  k += 2, $++;
440
440
  do
441
441
  ;
442
- while (ke[++k] === ke[++$] && ke[++k] === ke[++$] && ke[++k] === ke[++$] && ke[++k] === ke[++$] && ke[++k] === ke[++$] && ke[++k] === ke[++$] && ke[++k] === ke[++$] && ke[++k] === ke[++$] && k < Ne);
443
- if (H = D - (Ne - k), k = Ne - D, H > ve) {
444
- if (p.match_start = Z, ve = H, H >= pe)
442
+ while (Ne[++k] === Ne[++$] && Ne[++k] === Ne[++$] && Ne[++k] === Ne[++$] && Ne[++k] === Ne[++$] && Ne[++k] === Ne[++$] && Ne[++k] === Ne[++$] && Ne[++k] === Ne[++$] && Ne[++k] === Ne[++$] && k < Ae);
443
+ if (U = D - (Ae - k), k = Ae - D, U > ve) {
444
+ if (p.match_start = Z, ve = U, U >= pe)
445
445
  break;
446
- Le = ke[k + ve - 1], De = ke[k + ve];
446
+ Be = Ne[k + ve - 1], $e = Ne[k + ve];
447
447
  }
448
448
  }
449
- while ((Z = Oe[Z & Ue]) > he && --X !== 0);
449
+ while ((Z = we[Z & Ue]) > he && --X !== 0);
450
450
  return ve <= p.lookahead ? ve : p.lookahead;
451
451
  }
452
- function Se(p) {
453
- var Z = p.w_size, X, k, $, H, ve;
452
+ function be(p) {
453
+ var Z = p.w_size, X, k, $, U, ve;
454
454
  do {
455
- if (H = p.window_size - p.lookahead - p.strstart, p.strstart >= Z + (Z - W)) {
455
+ if (U = p.window_size - p.lookahead - p.strstart, p.strstart >= Z + (Z - W)) {
456
456
  e.arraySet(p.window, p.window, Z, Z, 0), p.match_start -= Z, p.strstart -= Z, p.block_start -= Z, k = p.hash_size, X = k;
457
457
  do
458
458
  $ = p.head[--X], p.head[X] = $ >= Z ? $ - Z : 0;
@@ -461,40 +461,40 @@ function requireDeflate$1() {
461
461
  do
462
462
  $ = p.prev[--X], p.prev[X] = $ >= Z ? $ - Z : 0;
463
463
  while (--k);
464
- H += Z;
464
+ U += Z;
465
465
  }
466
466
  if (p.strm.avail_in === 0)
467
467
  break;
468
- if (k = _e(p.strm, p.window, p.strstart + p.lookahead, H), p.lookahead += k, p.lookahead + p.insert >= B)
468
+ if (k = Te(p.strm, p.window, p.strstart + p.lookahead, U), p.lookahead += k, p.lookahead + p.insert >= B)
469
469
  for (ve = p.strstart - p.insert, p.ins_h = p.window[ve], p.ins_h = (p.ins_h << p.hash_shift ^ p.window[ve + 1]) & p.hash_mask; p.insert && (p.ins_h = (p.ins_h << p.hash_shift ^ p.window[ve + B - 1]) & p.hash_mask, p.prev[ve & p.w_mask] = p.head[p.ins_h], p.head[p.ins_h] = ve, ve++, p.insert--, !(p.lookahead + p.insert < B)); )
470
470
  ;
471
471
  } while (p.lookahead < W && p.strm.avail_in !== 0);
472
472
  }
473
- function Te(p, Z) {
473
+ function Se(p, Z) {
474
474
  var X = 65535;
475
475
  for (X > p.pending_buf_size - 5 && (X = p.pending_buf_size - 5); ; ) {
476
476
  if (p.lookahead <= 1) {
477
- if (Se(p), p.lookahead === 0 && Z === o)
478
- return ee;
477
+ if (be(p), p.lookahead === 0 && Z === o)
478
+ return j;
479
479
  if (p.lookahead === 0)
480
480
  break;
481
481
  }
482
482
  p.strstart += p.lookahead, p.lookahead = 0;
483
483
  var k = p.block_start + X;
484
- if ((p.strstart === 0 || p.strstart >= k) && (p.lookahead = p.strstart - k, p.strstart = k, ce(p, !1), p.strm.avail_out === 0) || p.strstart - p.block_start >= p.w_size - W && (ce(p, !1), p.strm.avail_out === 0))
485
- return ee;
484
+ if ((p.strstart === 0 || p.strstart >= k) && (p.lookahead = p.strstart - k, p.strstart = k, ue(p, !1), p.strm.avail_out === 0) || p.strstart - p.block_start >= p.w_size - W && (ue(p, !1), p.strm.avail_out === 0))
485
+ return j;
486
486
  }
487
- return p.insert = 0, Z === l ? (ce(p, !0), p.strm.avail_out === 0 ? xe : fe) : (p.strstart > p.block_start && (ce(p, !1), p.strm.avail_out === 0), ee);
487
+ return p.insert = 0, Z === l ? (ue(p, !0), p.strm.avail_out === 0 ? xe : fe) : (p.strstart > p.block_start && (ue(p, !1), p.strm.avail_out === 0), j);
488
488
  }
489
489
  function Pe(p, Z) {
490
490
  for (var X, k; ; ) {
491
491
  if (p.lookahead < W) {
492
- if (Se(p), p.lookahead < W && Z === o)
493
- return ee;
492
+ if (be(p), p.lookahead < W && Z === o)
493
+ return j;
494
494
  if (p.lookahead === 0)
495
495
  break;
496
496
  }
497
- if (X = 0, p.lookahead >= B && (p.ins_h = (p.ins_h << p.hash_shift ^ p.window[p.strstart + B - 1]) & p.hash_mask, X = p.prev[p.strstart & p.w_mask] = p.head[p.ins_h], p.head[p.ins_h] = p.strstart), X !== 0 && p.strstart - X <= p.w_size - W && (p.match_length = be(p, X)), p.match_length >= B)
497
+ if (X = 0, p.lookahead >= B && (p.ins_h = (p.ins_h << p.hash_shift ^ p.window[p.strstart + B - 1]) & p.hash_mask, X = p.prev[p.strstart & p.w_mask] = p.head[p.ins_h], p.head[p.ins_h] = p.strstart), X !== 0 && p.strstart - X <= p.w_size - W && (p.match_length = Ce(p, X)), p.match_length >= B)
498
498
  if (k = t._tr_tally(p, p.strstart - p.match_start, p.match_length - B), p.lookahead -= p.match_length, p.match_length <= p.max_lazy_match && p.lookahead >= B) {
499
499
  p.match_length--;
500
500
  do
@@ -505,206 +505,206 @@ function requireDeflate$1() {
505
505
  p.strstart += p.match_length, p.match_length = 0, p.ins_h = p.window[p.strstart], p.ins_h = (p.ins_h << p.hash_shift ^ p.window[p.strstart + 1]) & p.hash_mask;
506
506
  else
507
507
  k = t._tr_tally(p, 0, p.window[p.strstart]), p.lookahead--, p.strstart++;
508
- if (k && (ce(p, !1), p.strm.avail_out === 0))
509
- return ee;
508
+ if (k && (ue(p, !1), p.strm.avail_out === 0))
509
+ return j;
510
510
  }
511
- return p.insert = p.strstart < B - 1 ? p.strstart : B - 1, Z === l ? (ce(p, !0), p.strm.avail_out === 0 ? xe : fe) : p.last_lit && (ce(p, !1), p.strm.avail_out === 0) ? ee : G;
511
+ return p.insert = p.strstart < B - 1 ? p.strstart : B - 1, Z === l ? (ue(p, !0), p.strm.avail_out === 0 ? xe : fe) : p.last_lit && (ue(p, !1), p.strm.avail_out === 0) ? j : G;
512
512
  }
513
- function Ae(p, Z) {
513
+ function Re(p, Z) {
514
514
  for (var X, k, $; ; ) {
515
515
  if (p.lookahead < W) {
516
- if (Se(p), p.lookahead < W && Z === o)
517
- return ee;
516
+ if (be(p), p.lookahead < W && Z === o)
517
+ return j;
518
518
  if (p.lookahead === 0)
519
519
  break;
520
520
  }
521
- if (X = 0, p.lookahead >= B && (p.ins_h = (p.ins_h << p.hash_shift ^ p.window[p.strstart + B - 1]) & p.hash_mask, X = p.prev[p.strstart & p.w_mask] = p.head[p.ins_h], p.head[p.ins_h] = p.strstart), p.prev_length = p.match_length, p.prev_match = p.match_start, p.match_length = B - 1, X !== 0 && p.prev_length < p.max_lazy_match && p.strstart - X <= p.w_size - W && (p.match_length = be(p, X), p.match_length <= 5 && (p.strategy === v || p.match_length === B && p.strstart - p.match_start > 4096) && (p.match_length = B - 1)), p.prev_length >= B && p.match_length <= p.prev_length) {
521
+ if (X = 0, p.lookahead >= B && (p.ins_h = (p.ins_h << p.hash_shift ^ p.window[p.strstart + B - 1]) & p.hash_mask, X = p.prev[p.strstart & p.w_mask] = p.head[p.ins_h], p.head[p.ins_h] = p.strstart), p.prev_length = p.match_length, p.prev_match = p.match_start, p.match_length = B - 1, X !== 0 && p.prev_length < p.max_lazy_match && p.strstart - X <= p.w_size - W && (p.match_length = Ce(p, X), p.match_length <= 5 && (p.strategy === v || p.match_length === B && p.strstart - p.match_start > 4096) && (p.match_length = B - 1)), p.prev_length >= B && p.match_length <= p.prev_length) {
522
522
  $ = p.strstart + p.lookahead - B, k = t._tr_tally(p, p.strstart - 1 - p.prev_match, p.prev_length - B), p.lookahead -= p.prev_length - 1, p.prev_length -= 2;
523
523
  do
524
524
  ++p.strstart <= $ && (p.ins_h = (p.ins_h << p.hash_shift ^ p.window[p.strstart + B - 1]) & p.hash_mask, X = p.prev[p.strstart & p.w_mask] = p.head[p.ins_h], p.head[p.ins_h] = p.strstart);
525
525
  while (--p.prev_length !== 0);
526
- if (p.match_available = 0, p.match_length = B - 1, p.strstart++, k && (ce(p, !1), p.strm.avail_out === 0))
527
- return ee;
526
+ if (p.match_available = 0, p.match_length = B - 1, p.strstart++, k && (ue(p, !1), p.strm.avail_out === 0))
527
+ return j;
528
528
  } else if (p.match_available) {
529
- if (k = t._tr_tally(p, 0, p.window[p.strstart - 1]), k && ce(p, !1), p.strstart++, p.lookahead--, p.strm.avail_out === 0)
530
- return ee;
529
+ if (k = t._tr_tally(p, 0, p.window[p.strstart - 1]), k && ue(p, !1), p.strstart++, p.lookahead--, p.strm.avail_out === 0)
530
+ return j;
531
531
  } else
532
532
  p.match_available = 1, p.strstart++, p.lookahead--;
533
533
  }
534
- return p.match_available && (k = t._tr_tally(p, 0, p.window[p.strstart - 1]), p.match_available = 0), p.insert = p.strstart < B - 1 ? p.strstart : B - 1, Z === l ? (ce(p, !0), p.strm.avail_out === 0 ? xe : fe) : p.last_lit && (ce(p, !1), p.strm.avail_out === 0) ? ee : G;
534
+ return p.match_available && (k = t._tr_tally(p, 0, p.window[p.strstart - 1]), p.match_available = 0), p.insert = p.strstart < B - 1 ? p.strstart : B - 1, Z === l ? (ue(p, !0), p.strm.avail_out === 0 ? xe : fe) : p.last_lit && (ue(p, !1), p.strm.avail_out === 0) ? j : G;
535
535
  }
536
536
  function Me(p, Z) {
537
- for (var X, k, $, H, ve = p.window; ; ) {
537
+ for (var X, k, $, U, ve = p.window; ; ) {
538
538
  if (p.lookahead <= D) {
539
- if (Se(p), p.lookahead <= D && Z === o)
540
- return ee;
539
+ if (be(p), p.lookahead <= D && Z === o)
540
+ return j;
541
541
  if (p.lookahead === 0)
542
542
  break;
543
543
  }
544
544
  if (p.match_length = 0, p.lookahead >= B && p.strstart > 0 && ($ = p.strstart - 1, k = ve[$], k === ve[++$] && k === ve[++$] && k === ve[++$])) {
545
- H = p.strstart + D;
545
+ U = p.strstart + D;
546
546
  do
547
547
  ;
548
- while (k === ve[++$] && k === ve[++$] && k === ve[++$] && k === ve[++$] && k === ve[++$] && k === ve[++$] && k === ve[++$] && k === ve[++$] && $ < H);
549
- p.match_length = D - (H - $), p.match_length > p.lookahead && (p.match_length = p.lookahead);
548
+ while (k === ve[++$] && k === ve[++$] && k === ve[++$] && k === ve[++$] && k === ve[++$] && k === ve[++$] && k === ve[++$] && k === ve[++$] && $ < U);
549
+ p.match_length = D - (U - $), p.match_length > p.lookahead && (p.match_length = p.lookahead);
550
550
  }
551
- if (p.match_length >= B ? (X = t._tr_tally(p, 1, p.match_length - B), p.lookahead -= p.match_length, p.strstart += p.match_length, p.match_length = 0) : (X = t._tr_tally(p, 0, p.window[p.strstart]), p.lookahead--, p.strstart++), X && (ce(p, !1), p.strm.avail_out === 0))
552
- return ee;
551
+ if (p.match_length >= B ? (X = t._tr_tally(p, 1, p.match_length - B), p.lookahead -= p.match_length, p.strstart += p.match_length, p.match_length = 0) : (X = t._tr_tally(p, 0, p.window[p.strstart]), p.lookahead--, p.strstart++), X && (ue(p, !1), p.strm.avail_out === 0))
552
+ return j;
553
553
  }
554
- return p.insert = 0, Z === l ? (ce(p, !0), p.strm.avail_out === 0 ? xe : fe) : p.last_lit && (ce(p, !1), p.strm.avail_out === 0) ? ee : G;
554
+ return p.insert = 0, Z === l ? (ue(p, !0), p.strm.avail_out === 0 ? xe : fe) : p.last_lit && (ue(p, !1), p.strm.avail_out === 0) ? j : G;
555
555
  }
556
- function Ie(p, Z) {
556
+ function Ee(p, Z) {
557
557
  for (var X; ; ) {
558
- if (p.lookahead === 0 && (Se(p), p.lookahead === 0)) {
558
+ if (p.lookahead === 0 && (be(p), p.lookahead === 0)) {
559
559
  if (Z === o)
560
- return ee;
560
+ return j;
561
561
  break;
562
562
  }
563
- if (p.match_length = 0, X = t._tr_tally(p, 0, p.window[p.strstart]), p.lookahead--, p.strstart++, X && (ce(p, !1), p.strm.avail_out === 0))
564
- return ee;
563
+ if (p.match_length = 0, X = t._tr_tally(p, 0, p.window[p.strstart]), p.lookahead--, p.strstart++, X && (ue(p, !1), p.strm.avail_out === 0))
564
+ return j;
565
565
  }
566
- return p.insert = 0, Z === l ? (ce(p, !0), p.strm.avail_out === 0 ? xe : fe) : p.last_lit && (ce(p, !1), p.strm.avail_out === 0) ? ee : G;
566
+ return p.insert = 0, Z === l ? (ue(p, !0), p.strm.avail_out === 0 ? xe : fe) : p.last_lit && (ue(p, !1), p.strm.avail_out === 0) ? j : G;
567
567
  }
568
- function Re(p, Z, X, k, $) {
568
+ function ke(p, Z, X, k, $) {
569
569
  this.good_length = p, this.max_lazy = Z, this.nice_length = X, this.max_chain = k, this.func = $;
570
570
  }
571
- var Ee;
572
- Ee = [
571
+ var Oe;
572
+ Oe = [
573
573
  /* good lazy nice chain */
574
- new Re(0, 0, 0, 0, Te),
574
+ new ke(0, 0, 0, 0, Se),
575
575
  /* 0 store only */
576
- new Re(4, 4, 8, 4, Pe),
576
+ new ke(4, 4, 8, 4, Pe),
577
577
  /* 1 max speed, no lazy matches */
578
- new Re(4, 5, 16, 8, Pe),
578
+ new ke(4, 5, 16, 8, Pe),
579
579
  /* 2 */
580
- new Re(4, 6, 32, 32, Pe),
580
+ new ke(4, 6, 32, 32, Pe),
581
581
  /* 3 */
582
- new Re(4, 4, 16, 16, Ae),
582
+ new ke(4, 4, 16, 16, Re),
583
583
  /* 4 lazy matches */
584
- new Re(8, 16, 32, 32, Ae),
584
+ new ke(8, 16, 32, 32, Re),
585
585
  /* 5 */
586
- new Re(8, 16, 128, 128, Ae),
586
+ new ke(8, 16, 128, 128, Re),
587
587
  /* 6 */
588
- new Re(8, 32, 128, 256, Ae),
588
+ new ke(8, 32, 128, 256, Re),
589
589
  /* 7 */
590
- new Re(32, 128, 258, 1024, Ae),
590
+ new ke(32, 128, 258, 1024, Re),
591
591
  /* 8 */
592
- new Re(32, 258, 258, 4096, Ae)
592
+ new ke(32, 258, 258, 4096, Re)
593
593
  /* 9 max compression */
594
594
  ];
595
- function $e(p) {
596
- p.window_size = 2 * p.w_size, q(p.head), p.max_lazy_match = Ee[p.level].max_lazy, p.good_match = Ee[p.level].good_length, p.nice_match = Ee[p.level].nice_length, p.max_chain_length = Ee[p.level].max_chain, p.strstart = 0, p.block_start = 0, p.lookahead = 0, p.insert = 0, p.match_length = p.prev_length = B - 1, p.match_available = 0, p.ins_h = 0;
595
+ function Fe(p) {
596
+ p.window_size = 2 * p.w_size, ye(p.head), p.max_lazy_match = Oe[p.level].max_lazy, p.good_match = Oe[p.level].good_length, p.nice_match = Oe[p.level].nice_length, p.max_chain_length = Oe[p.level].max_chain, p.strstart = 0, p.block_start = 0, p.lookahead = 0, p.insert = 0, p.match_length = p.prev_length = B - 1, p.match_available = 0, p.ins_h = 0;
597
597
  }
598
598
  function I() {
599
- this.strm = null, this.status = 0, this.pending_buf = null, this.pending_buf_size = 0, this.pending_out = 0, this.pending = 0, this.wrap = 0, this.gzhead = null, this.gzindex = 0, this.method = R, this.last_flush = -1, this.w_size = 0, this.w_bits = 0, this.w_mask = 0, this.window = null, this.window_size = 0, this.prev = null, this.head = null, this.ins_h = 0, this.hash_size = 0, this.hash_bits = 0, this.hash_mask = 0, this.hash_shift = 0, this.block_start = 0, this.match_length = 0, this.prev_match = 0, this.match_available = 0, this.strstart = 0, this.match_start = 0, this.lookahead = 0, this.prev_length = 0, this.max_chain_length = 0, this.max_lazy_match = 0, this.level = 0, this.strategy = 0, this.good_match = 0, this.nice_match = 0, this.dyn_ltree = new e.Buf16(L * 2), this.dyn_dtree = new e.Buf16((2 * O + 1) * 2), this.bl_tree = new e.Buf16((2 * F + 1) * 2), q(this.dyn_ltree), q(this.dyn_dtree), q(this.bl_tree), this.l_desc = null, this.d_desc = null, this.bl_desc = null, this.bl_count = new e.Buf16(w + 1), this.heap = new e.Buf16(2 * E + 1), q(this.heap), this.heap_len = 0, this.heap_max = 0, this.depth = new e.Buf16(2 * E + 1), q(this.depth), this.l_buf = 0, this.lit_bufsize = 0, this.last_lit = 0, this.d_buf = 0, this.opt_len = 0, this.static_len = 0, this.matches = 0, this.insert = 0, this.bi_buf = 0, this.bi_valid = 0;
599
+ this.strm = null, this.status = 0, this.pending_buf = null, this.pending_buf_size = 0, this.pending_out = 0, this.pending = 0, this.wrap = 0, this.gzhead = null, this.gzindex = 0, this.method = R, this.last_flush = -1, this.w_size = 0, this.w_bits = 0, this.w_mask = 0, this.window = null, this.window_size = 0, this.prev = null, this.head = null, this.ins_h = 0, this.hash_size = 0, this.hash_bits = 0, this.hash_mask = 0, this.hash_shift = 0, this.block_start = 0, this.match_length = 0, this.prev_match = 0, this.match_available = 0, this.strstart = 0, this.match_start = 0, this.lookahead = 0, this.prev_length = 0, this.max_chain_length = 0, this.max_lazy_match = 0, this.level = 0, this.strategy = 0, this.good_match = 0, this.nice_match = 0, this.dyn_ltree = new e.Buf16(w * 2), this.dyn_dtree = new e.Buf16((2 * O + 1) * 2), this.bl_tree = new e.Buf16((2 * F + 1) * 2), ye(this.dyn_ltree), ye(this.dyn_dtree), ye(this.bl_tree), this.l_desc = null, this.d_desc = null, this.bl_desc = null, this.bl_count = new e.Buf16(L + 1), this.heap = new e.Buf16(2 * E + 1), ye(this.heap), this.heap_len = 0, this.heap_max = 0, this.depth = new e.Buf16(2 * E + 1), ye(this.depth), this.l_buf = 0, this.lit_bufsize = 0, this.last_lit = 0, this.d_buf = 0, this.opt_len = 0, this.static_len = 0, this.matches = 0, this.insert = 0, this.bi_buf = 0, this.bi_valid = 0;
600
600
  }
601
- function oe(p) {
601
+ function re(p) {
602
602
  var Z;
603
- return !p || !p.state ? Y(p, d) : (p.total_in = p.total_out = 0, p.data_type = N, Z = p.state, Z.pending = 0, Z.pending_out = 0, Z.wrap < 0 && (Z.wrap = -Z.wrap), Z.status = Z.wrap ? ne : J, p.adler = Z.wrap === 2 ? 0 : 1, Z.last_flush = o, t._tr_init(Z), f);
603
+ return !p || !p.state ? Y(p, d) : (p.total_in = p.total_out = 0, p.data_type = N, Z = p.state, Z.pending = 0, Z.pending_out = 0, Z.wrap < 0 && (Z.wrap = -Z.wrap), Z.status = Z.wrap ? ee : J, p.adler = Z.wrap === 2 ? 0 : 1, Z.last_flush = o, t._tr_init(Z), f);
604
604
  }
605
- function le(p) {
606
- var Z = oe(p);
607
- return Z === f && $e(p.state), Z;
605
+ function se(p) {
606
+ var Z = re(p);
607
+ return Z === f && Fe(p.state), Z;
608
608
  }
609
609
  function me(p, Z) {
610
610
  return !p || !p.state || p.state.wrap !== 2 ? d : (p.state.gzhead = Z, f);
611
611
  }
612
- function z(p, Z, X, k, $, H) {
612
+ function z(p, Z, X, k, $, U) {
613
613
  if (!p)
614
614
  return d;
615
615
  var ve = 1;
616
- if (Z === _ && (Z = 6), k < 0 ? (ve = 0, k = -k) : k > 15 && (ve = 2, k -= 16), $ < 1 || $ > y || X !== R || k < 8 || k > 15 || Z < 0 || Z > 9 || H < 0 || H > C)
616
+ if (Z === _ && (Z = 6), k < 0 ? (ve = 0, k = -k) : k > 15 && (ve = 2, k -= 16), $ < 1 || $ > y || X !== R || k < 8 || k > 15 || Z < 0 || Z > 9 || U < 0 || U > C)
617
617
  return Y(p, d);
618
618
  k === 8 && (k = 9);
619
619
  var pe = new I();
620
- return p.state = pe, pe.strm = p, pe.wrap = ve, pe.gzhead = null, pe.w_bits = k, pe.w_size = 1 << pe.w_bits, pe.w_mask = pe.w_size - 1, pe.hash_bits = $ + 7, pe.hash_size = 1 << pe.hash_bits, pe.hash_mask = pe.hash_size - 1, pe.hash_shift = ~~((pe.hash_bits + B - 1) / B), pe.window = new e.Buf8(pe.w_size * 2), pe.head = new e.Buf16(pe.hash_size), pe.prev = new e.Buf16(pe.w_size), pe.lit_bufsize = 1 << $ + 6, pe.pending_buf_size = pe.lit_bufsize * 4, pe.pending_buf = new e.Buf8(pe.pending_buf_size), pe.d_buf = 1 * pe.lit_bufsize, pe.l_buf = (1 + 2) * pe.lit_bufsize, pe.level = Z, pe.strategy = H, pe.method = X, le(p);
620
+ return p.state = pe, pe.strm = p, pe.wrap = ve, pe.gzhead = null, pe.w_bits = k, pe.w_size = 1 << pe.w_bits, pe.w_mask = pe.w_size - 1, pe.hash_bits = $ + 7, pe.hash_size = 1 << pe.hash_bits, pe.hash_mask = pe.hash_size - 1, pe.hash_shift = ~~((pe.hash_bits + B - 1) / B), pe.window = new e.Buf8(pe.w_size * 2), pe.head = new e.Buf16(pe.hash_size), pe.prev = new e.Buf16(pe.w_size), pe.lit_bufsize = 1 << $ + 6, pe.pending_buf_size = pe.lit_bufsize * 4, pe.pending_buf = new e.Buf8(pe.pending_buf_size), pe.d_buf = 1 * pe.lit_bufsize, pe.l_buf = (1 + 2) * pe.lit_bufsize, pe.level = Z, pe.strategy = U, pe.method = X, se(p);
621
621
  }
622
622
  function K(p, Z) {
623
623
  return z(p, Z, R, T, M, S);
624
624
  }
625
625
  function b(p, Z) {
626
- var X, k, $, H;
626
+ var X, k, $, U;
627
627
  if (!p || !p.state || Z > c || Z < 0)
628
628
  return p ? Y(p, d) : d;
629
- if (k = p.state, !p.output || !p.input && p.avail_in !== 0 || k.status === de && Z !== l)
629
+ if (k = p.state, !p.output || !p.input && p.avail_in !== 0 || k.status === ce && Z !== l)
630
630
  return Y(p, p.avail_out === 0 ? m : d);
631
- if (k.strm = p, X = k.last_flush, k.last_flush = Z, k.status === ne)
631
+ if (k.strm = p, X = k.last_flush, k.last_flush = Z, k.status === ee)
632
632
  if (k.wrap === 2)
633
- p.adler = 0, j(k, 31), j(k, 139), j(k, 8), k.gzhead ? (j(
633
+ p.adler = 0, ne(k, 31), ne(k, 139), ne(k, 8), k.gzhead ? (ne(
634
634
  k,
635
635
  (k.gzhead.text ? 1 : 0) + (k.gzhead.hcrc ? 2 : 0) + (k.gzhead.extra ? 4 : 0) + (k.gzhead.name ? 8 : 0) + (k.gzhead.comment ? 16 : 0)
636
- ), j(k, k.gzhead.time & 255), j(k, k.gzhead.time >> 8 & 255), j(k, k.gzhead.time >> 16 & 255), j(k, k.gzhead.time >> 24 & 255), j(k, k.level === 9 ? 2 : k.strategy >= x || k.level < 2 ? 4 : 0), j(k, k.gzhead.os & 255), k.gzhead.extra && k.gzhead.extra.length && (j(k, k.gzhead.extra.length & 255), j(k, k.gzhead.extra.length >> 8 & 255)), k.gzhead.hcrc && (p.adler = i(p.adler, k.pending_buf, k.pending, 0)), k.gzindex = 0, k.status = U) : (j(k, 0), j(k, 0), j(k, 0), j(k, 0), j(k, 0), j(k, k.level === 9 ? 2 : k.strategy >= x || k.level < 2 ? 4 : 0), j(k, V), k.status = J);
636
+ ), ne(k, k.gzhead.time & 255), ne(k, k.gzhead.time >> 8 & 255), ne(k, k.gzhead.time >> 16 & 255), ne(k, k.gzhead.time >> 24 & 255), ne(k, k.level === 9 ? 2 : k.strategy >= x || k.level < 2 ? 4 : 0), ne(k, k.gzhead.os & 255), k.gzhead.extra && k.gzhead.extra.length && (ne(k, k.gzhead.extra.length & 255), ne(k, k.gzhead.extra.length >> 8 & 255)), k.gzhead.hcrc && (p.adler = i(p.adler, k.pending_buf, k.pending, 0)), k.gzindex = 0, k.status = H) : (ne(k, 0), ne(k, 0), ne(k, 0), ne(k, 0), ne(k, 0), ne(k, k.level === 9 ? 2 : k.strategy >= x || k.level < 2 ? 4 : 0), ne(k, V), k.status = J);
637
637
  else {
638
638
  var ve = R + (k.w_bits - 8 << 4) << 8, pe = -1;
639
- k.strategy >= x || k.level < 2 ? pe = 0 : k.level < 6 ? pe = 1 : k.level === 6 ? pe = 2 : pe = 3, ve |= pe << 6, k.strstart !== 0 && (ve |= ie), ve += 31 - ve % 31, k.status = J, Ce(k, ve), k.strstart !== 0 && (Ce(k, p.adler >>> 16), Ce(k, p.adler & 65535)), p.adler = 1;
639
+ k.strategy >= x || k.level < 2 ? pe = 0 : k.level < 6 ? pe = 1 : k.level === 6 ? pe = 2 : pe = 3, ve |= pe << 6, k.strstart !== 0 && (ve |= ie), ve += 31 - ve % 31, k.status = J, de(k, ve), k.strstart !== 0 && (de(k, p.adler >>> 16), de(k, p.adler & 65535)), p.adler = 1;
640
640
  }
641
- if (k.status === U)
641
+ if (k.status === H)
642
642
  if (k.gzhead.extra) {
643
- for ($ = k.pending; k.gzindex < (k.gzhead.extra.length & 65535) && !(k.pending === k.pending_buf_size && (k.gzhead.hcrc && k.pending > $ && (p.adler = i(p.adler, k.pending_buf, k.pending - $, $)), se(p), $ = k.pending, k.pending === k.pending_buf_size)); )
644
- j(k, k.gzhead.extra[k.gzindex] & 255), k.gzindex++;
645
- k.gzhead.hcrc && k.pending > $ && (p.adler = i(p.adler, k.pending_buf, k.pending - $, $)), k.gzindex === k.gzhead.extra.length && (k.gzindex = 0, k.status = re);
643
+ for ($ = k.pending; k.gzindex < (k.gzhead.extra.length & 65535) && !(k.pending === k.pending_buf_size && (k.gzhead.hcrc && k.pending > $ && (p.adler = i(p.adler, k.pending_buf, k.pending - $, $)), q(p), $ = k.pending, k.pending === k.pending_buf_size)); )
644
+ ne(k, k.gzhead.extra[k.gzindex] & 255), k.gzindex++;
645
+ k.gzhead.hcrc && k.pending > $ && (p.adler = i(p.adler, k.pending_buf, k.pending - $, $)), k.gzindex === k.gzhead.extra.length && (k.gzindex = 0, k.status = oe);
646
646
  } else
647
- k.status = re;
648
- if (k.status === re)
647
+ k.status = oe;
648
+ if (k.status === oe)
649
649
  if (k.gzhead.name) {
650
650
  $ = k.pending;
651
651
  do {
652
- if (k.pending === k.pending_buf_size && (k.gzhead.hcrc && k.pending > $ && (p.adler = i(p.adler, k.pending_buf, k.pending - $, $)), se(p), $ = k.pending, k.pending === k.pending_buf_size)) {
653
- H = 1;
652
+ if (k.pending === k.pending_buf_size && (k.gzhead.hcrc && k.pending > $ && (p.adler = i(p.adler, k.pending_buf, k.pending - $, $)), q(p), $ = k.pending, k.pending === k.pending_buf_size)) {
653
+ U = 1;
654
654
  break;
655
655
  }
656
- k.gzindex < k.gzhead.name.length ? H = k.gzhead.name.charCodeAt(k.gzindex++) & 255 : H = 0, j(k, H);
657
- } while (H !== 0);
658
- k.gzhead.hcrc && k.pending > $ && (p.adler = i(p.adler, k.pending_buf, k.pending - $, $)), H === 0 && (k.gzindex = 0, k.status = te);
656
+ k.gzindex < k.gzhead.name.length ? U = k.gzhead.name.charCodeAt(k.gzindex++) & 255 : U = 0, ne(k, U);
657
+ } while (U !== 0);
658
+ k.gzhead.hcrc && k.pending > $ && (p.adler = i(p.adler, k.pending_buf, k.pending - $, $)), U === 0 && (k.gzindex = 0, k.status = te);
659
659
  } else
660
660
  k.status = te;
661
661
  if (k.status === te)
662
662
  if (k.gzhead.comment) {
663
663
  $ = k.pending;
664
664
  do {
665
- if (k.pending === k.pending_buf_size && (k.gzhead.hcrc && k.pending > $ && (p.adler = i(p.adler, k.pending_buf, k.pending - $, $)), se(p), $ = k.pending, k.pending === k.pending_buf_size)) {
666
- H = 1;
665
+ if (k.pending === k.pending_buf_size && (k.gzhead.hcrc && k.pending > $ && (p.adler = i(p.adler, k.pending_buf, k.pending - $, $)), q(p), $ = k.pending, k.pending === k.pending_buf_size)) {
666
+ U = 1;
667
667
  break;
668
668
  }
669
- k.gzindex < k.gzhead.comment.length ? H = k.gzhead.comment.charCodeAt(k.gzindex++) & 255 : H = 0, j(k, H);
670
- } while (H !== 0);
671
- k.gzhead.hcrc && k.pending > $ && (p.adler = i(p.adler, k.pending_buf, k.pending - $, $)), H === 0 && (k.status = Q);
669
+ k.gzindex < k.gzhead.comment.length ? U = k.gzhead.comment.charCodeAt(k.gzindex++) & 255 : U = 0, ne(k, U);
670
+ } while (U !== 0);
671
+ k.gzhead.hcrc && k.pending > $ && (p.adler = i(p.adler, k.pending_buf, k.pending - $, $)), U === 0 && (k.status = Q);
672
672
  } else
673
673
  k.status = Q;
674
- if (k.status === Q && (k.gzhead.hcrc ? (k.pending + 2 > k.pending_buf_size && se(p), k.pending + 2 <= k.pending_buf_size && (j(k, p.adler & 255), j(k, p.adler >> 8 & 255), p.adler = 0, k.status = J)) : k.status = J), k.pending !== 0) {
675
- if (se(p), p.avail_out === 0)
674
+ if (k.status === Q && (k.gzhead.hcrc ? (k.pending + 2 > k.pending_buf_size && q(p), k.pending + 2 <= k.pending_buf_size && (ne(k, p.adler & 255), ne(k, p.adler >> 8 & 255), p.adler = 0, k.status = J)) : k.status = J), k.pending !== 0) {
675
+ if (q(p), p.avail_out === 0)
676
676
  return k.last_flush = -1, f;
677
- } else if (p.avail_in === 0 && ye(Z) <= ye(X) && Z !== l)
677
+ } else if (p.avail_in === 0 && _e(Z) <= _e(X) && Z !== l)
678
678
  return Y(p, m);
679
- if (k.status === de && p.avail_in !== 0)
679
+ if (k.status === ce && p.avail_in !== 0)
680
680
  return Y(p, m);
681
- if (p.avail_in !== 0 || k.lookahead !== 0 || Z !== o && k.status !== de) {
682
- var he = k.strategy === x ? Ie(k, Z) : k.strategy === g ? Me(k, Z) : Ee[k.level].func(k, Z);
683
- if ((he === xe || he === fe) && (k.status = de), he === ee || he === xe)
681
+ if (p.avail_in !== 0 || k.lookahead !== 0 || Z !== o && k.status !== ce) {
682
+ var he = k.strategy === x ? Ee(k, Z) : k.strategy === g ? Me(k, Z) : Oe[k.level].func(k, Z);
683
+ if ((he === xe || he === fe) && (k.status = ce), he === j || he === xe)
684
684
  return p.avail_out === 0 && (k.last_flush = -1), f;
685
- if (he === G && (Z === a ? t._tr_align(k) : Z !== c && (t._tr_stored_block(k, 0, 0, !1), Z === s && (q(k.head), k.lookahead === 0 && (k.strstart = 0, k.block_start = 0, k.insert = 0))), se(p), p.avail_out === 0))
685
+ if (he === G && (Z === a ? t._tr_align(k) : Z !== c && (t._tr_stored_block(k, 0, 0, !1), Z === s && (ye(k.head), k.lookahead === 0 && (k.strstart = 0, k.block_start = 0, k.insert = 0))), q(p), p.avail_out === 0))
686
686
  return k.last_flush = -1, f;
687
687
  }
688
- return Z !== l ? f : k.wrap <= 0 ? u : (k.wrap === 2 ? (j(k, p.adler & 255), j(k, p.adler >> 8 & 255), j(k, p.adler >> 16 & 255), j(k, p.adler >> 24 & 255), j(k, p.total_in & 255), j(k, p.total_in >> 8 & 255), j(k, p.total_in >> 16 & 255), j(k, p.total_in >> 24 & 255)) : (Ce(k, p.adler >>> 16), Ce(k, p.adler & 65535)), se(p), k.wrap > 0 && (k.wrap = -k.wrap), k.pending !== 0 ? f : u);
688
+ return Z !== l ? f : k.wrap <= 0 ? u : (k.wrap === 2 ? (ne(k, p.adler & 255), ne(k, p.adler >> 8 & 255), ne(k, p.adler >> 16 & 255), ne(k, p.adler >> 24 & 255), ne(k, p.total_in & 255), ne(k, p.total_in >> 8 & 255), ne(k, p.total_in >> 16 & 255), ne(k, p.total_in >> 24 & 255)) : (de(k, p.adler >>> 16), de(k, p.adler & 65535)), q(p), k.wrap > 0 && (k.wrap = -k.wrap), k.pending !== 0 ? f : u);
689
689
  }
690
690
  function ae(p) {
691
691
  var Z;
692
- return !p || !p.state ? d : (Z = p.state.status, Z !== ne && Z !== U && Z !== re && Z !== te && Z !== Q && Z !== J && Z !== de ? Y(p, d) : (p.state = null, Z === J ? Y(p, h) : f));
692
+ return !p || !p.state ? d : (Z = p.state.status, Z !== ee && Z !== H && Z !== oe && Z !== te && Z !== Q && Z !== J && Z !== ce ? Y(p, d) : (p.state = null, Z === J ? Y(p, h) : f));
693
693
  }
694
694
  function ge(p, Z) {
695
- var X = Z.length, k, $, H, ve, pe, he, ke, Ue;
696
- if (!p || !p.state || (k = p.state, ve = k.wrap, ve === 2 || ve === 1 && k.status !== ne || k.lookahead))
695
+ var X = Z.length, k, $, U, ve, pe, he, Ne, Ue;
696
+ if (!p || !p.state || (k = p.state, ve = k.wrap, ve === 2 || ve === 1 && k.status !== ee || k.lookahead))
697
697
  return d;
698
- for (ve === 1 && (p.adler = n(p.adler, Z, X, 0)), k.wrap = 0, X >= k.w_size && (ve === 0 && (q(k.head), k.strstart = 0, k.block_start = 0, k.insert = 0), Ue = new e.Buf8(k.w_size), e.arraySet(Ue, Z, X - k.w_size, k.w_size, 0), Z = Ue, X = k.w_size), pe = p.avail_in, he = p.next_in, ke = p.input, p.avail_in = X, p.next_in = 0, p.input = Z, Se(k); k.lookahead >= B; ) {
699
- $ = k.strstart, H = k.lookahead - (B - 1);
698
+ for (ve === 1 && (p.adler = n(p.adler, Z, X, 0)), k.wrap = 0, X >= k.w_size && (ve === 0 && (ye(k.head), k.strstart = 0, k.block_start = 0, k.insert = 0), Ue = new e.Buf8(k.w_size), e.arraySet(Ue, Z, X - k.w_size, k.w_size, 0), Z = Ue, X = k.w_size), pe = p.avail_in, he = p.next_in, Ne = p.input, p.avail_in = X, p.next_in = 0, p.input = Z, be(k); k.lookahead >= B; ) {
699
+ $ = k.strstart, U = k.lookahead - (B - 1);
700
700
  do
701
701
  k.ins_h = (k.ins_h << k.hash_shift ^ k.window[$ + B - 1]) & k.hash_mask, k.prev[$ & k.w_mask] = k.head[k.ins_h], k.head[k.ins_h] = $, $++;
702
- while (--H);
703
- k.strstart = $, k.lookahead = B - 1, Se(k);
702
+ while (--U);
703
+ k.strstart = $, k.lookahead = B - 1, be(k);
704
704
  }
705
- return k.strstart += k.lookahead, k.block_start = k.strstart, k.insert = k.lookahead, k.lookahead = 0, k.match_length = k.prev_length = B - 1, k.match_available = 0, p.next_in = he, p.input = ke, p.avail_in = pe, k.wrap = ve, f;
705
+ return k.strstart += k.lookahead, k.block_start = k.strstart, k.insert = k.lookahead, k.lookahead = 0, k.match_length = k.prev_length = B - 1, k.match_available = 0, p.next_in = he, p.input = Ne, p.avail_in = pe, k.wrap = ve, f;
706
706
  }
707
- return deflate.deflateInit = K, deflate.deflateInit2 = z, deflate.deflateReset = le, deflate.deflateResetKeep = oe, deflate.deflateSetHeader = me, deflate.deflate = b, deflate.deflateEnd = ae, deflate.deflateSetDictionary = ge, deflate.deflateInfo = "pako deflate (from Nodeca project)", deflate;
707
+ return deflate.deflateInit = K, deflate.deflateInit2 = z, deflate.deflateReset = se, deflate.deflateResetKeep = re, deflate.deflateSetHeader = me, deflate.deflate = b, deflate.deflateEnd = ae, deflate.deflateSetDictionary = ge, deflate.deflateInfo = "pako deflate (from Nodeca project)", deflate;
708
708
  }
709
709
  var strings = {}, hasRequiredStrings;
710
710
  function requireStrings() {
@@ -1086,42 +1086,42 @@ function requireInftrees() {
1086
1086
  64
1087
1087
  ];
1088
1088
  return inftrees = function(d, h, m, _, v, x, g, C) {
1089
- var S = C.bits, N = 0, R = 0, y = 0, T = 0, M = 0, A = 0, P = 0, E = 0, O = 0, F = 0, L, w, B, D, W, ie = null, ne = 0, U, re = new e.Buf16(t + 1), te = new e.Buf16(t + 1), Q = null, J = 0, de, ee, G;
1089
+ var S = C.bits, N = 0, R = 0, y = 0, T = 0, M = 0, A = 0, P = 0, E = 0, O = 0, F = 0, w, L, B, D, W, ie = null, ee = 0, H, oe = new e.Buf16(t + 1), te = new e.Buf16(t + 1), Q = null, J = 0, ce, j, G;
1090
1090
  for (N = 0; N <= t; N++)
1091
- re[N] = 0;
1091
+ oe[N] = 0;
1092
1092
  for (R = 0; R < _; R++)
1093
- re[h[m + R]]++;
1094
- for (M = S, T = t; T >= 1 && re[T] === 0; T--)
1093
+ oe[h[m + R]]++;
1094
+ for (M = S, T = t; T >= 1 && oe[T] === 0; T--)
1095
1095
  ;
1096
1096
  if (M > T && (M = T), T === 0)
1097
1097
  return v[x++] = 1 << 24 | 64 << 16 | 0, v[x++] = 1 << 24 | 64 << 16 | 0, C.bits = 1, 0;
1098
- for (y = 1; y < T && re[y] === 0; y++)
1098
+ for (y = 1; y < T && oe[y] === 0; y++)
1099
1099
  ;
1100
1100
  for (M < y && (M = y), E = 1, N = 1; N <= t; N++)
1101
- if (E <<= 1, E -= re[N], E < 0)
1101
+ if (E <<= 1, E -= oe[N], E < 0)
1102
1102
  return -1;
1103
1103
  if (E > 0 && (d === r || T !== 1))
1104
1104
  return -1;
1105
1105
  for (te[1] = 0, N = 1; N < t; N++)
1106
- te[N + 1] = te[N] + re[N];
1106
+ te[N + 1] = te[N] + oe[N];
1107
1107
  for (R = 0; R < _; R++)
1108
1108
  h[m + R] !== 0 && (g[te[h[m + R]]++] = R);
1109
- if (d === r ? (ie = Q = g, U = 19) : d === o ? (ie = s, ne -= 257, Q = l, J -= 257, U = 256) : (ie = c, Q = f, U = -1), F = 0, R = 0, N = y, W = x, A = M, P = 0, B = -1, O = 1 << M, D = O - 1, d === o && O > n || d === a && O > i)
1109
+ if (d === r ? (ie = Q = g, H = 19) : d === o ? (ie = s, ee -= 257, Q = l, J -= 257, H = 256) : (ie = c, Q = f, H = -1), F = 0, R = 0, N = y, W = x, A = M, P = 0, B = -1, O = 1 << M, D = O - 1, d === o && O > n || d === a && O > i)
1110
1110
  return 1;
1111
1111
  for (; ; ) {
1112
- de = N - P, g[R] < U ? (ee = 0, G = g[R]) : g[R] > U ? (ee = Q[J + g[R]], G = ie[ne + g[R]]) : (ee = 32 + 64, G = 0), L = 1 << N - P, w = 1 << A, y = w;
1112
+ ce = N - P, g[R] < H ? (j = 0, G = g[R]) : g[R] > H ? (j = Q[J + g[R]], G = ie[ee + g[R]]) : (j = 32 + 64, G = 0), w = 1 << N - P, L = 1 << A, y = L;
1113
1113
  do
1114
- w -= L, v[W + (F >> P) + w] = de << 24 | ee << 16 | G | 0;
1115
- while (w !== 0);
1116
- for (L = 1 << N - 1; F & L; )
1117
- L >>= 1;
1118
- if (L !== 0 ? (F &= L - 1, F += L) : F = 0, R++, --re[N] === 0) {
1114
+ L -= w, v[W + (F >> P) + L] = ce << 24 | j << 16 | G | 0;
1115
+ while (L !== 0);
1116
+ for (w = 1 << N - 1; F & w; )
1117
+ w >>= 1;
1118
+ if (w !== 0 ? (F &= w - 1, F += w) : F = 0, R++, --oe[N] === 0) {
1119
1119
  if (N === T)
1120
1120
  break;
1121
1121
  N = h[m + g[R]];
1122
1122
  }
1123
1123
  if (N > M && (F & D) !== B) {
1124
- for (P === 0 && (P = M), W += y, A = N - P, E = 1 << A; A + P < T && (E -= re[A + P], !(E <= 0)); )
1124
+ for (P === 0 && (P = M), W += y, A = N - P, E = 1 << A; A + P < T && (E -= oe[A + P], !(E <= 0)); )
1125
1125
  A++, E <<= 1;
1126
1126
  if (O += 1 << A, d === o && O > n || d === a && O > i)
1127
1127
  return 1;
@@ -1136,37 +1136,37 @@ function requireInflate$1() {
1136
1136
  if (hasRequiredInflate$1)
1137
1137
  return inflate;
1138
1138
  hasRequiredInflate$1 = 1;
1139
- var e = requireCommon(), t = requireAdler32(), n = requireCrc32(), i = requireInffast(), r = requireInftrees(), o = 0, a = 1, s = 2, l = 4, c = 5, f = 6, u = 0, d = 1, h = 2, m = -2, _ = -3, v = -4, x = -5, g = 8, C = 1, S = 2, N = 3, R = 4, y = 5, T = 6, M = 7, A = 8, P = 9, E = 10, O = 11, F = 12, L = 13, w = 14, B = 15, D = 16, W = 17, ie = 18, ne = 19, U = 20, re = 21, te = 22, Q = 23, J = 24, de = 25, ee = 26, G = 27, xe = 28, fe = 29, V = 30, Y = 31, ye = 32, q = 852, se = 592, ce = 15, j = ce;
1140
- function Ce(z) {
1139
+ var e = requireCommon(), t = requireAdler32(), n = requireCrc32(), i = requireInffast(), r = requireInftrees(), o = 0, a = 1, s = 2, l = 4, c = 5, f = 6, u = 0, d = 1, h = 2, m = -2, _ = -3, v = -4, x = -5, g = 8, C = 1, S = 2, N = 3, R = 4, y = 5, T = 6, M = 7, A = 8, P = 9, E = 10, O = 11, F = 12, w = 13, L = 14, B = 15, D = 16, W = 17, ie = 18, ee = 19, H = 20, oe = 21, te = 22, Q = 23, J = 24, ce = 25, j = 26, G = 27, xe = 28, fe = 29, V = 30, Y = 31, _e = 32, ye = 852, q = 592, ue = 15, ne = ue;
1140
+ function de(z) {
1141
1141
  return (z >>> 24 & 255) + (z >>> 8 & 65280) + ((z & 65280) << 8) + ((z & 255) << 24);
1142
1142
  }
1143
- function _e() {
1143
+ function Te() {
1144
1144
  this.mode = 0, this.last = !1, this.wrap = 0, this.havedict = !1, this.flags = 0, this.dmax = 0, this.check = 0, this.total = 0, this.head = null, this.wbits = 0, this.wsize = 0, this.whave = 0, this.wnext = 0, this.window = null, this.hold = 0, this.bits = 0, this.length = 0, this.offset = 0, this.extra = 0, this.lencode = null, this.distcode = null, this.lenbits = 0, this.distbits = 0, this.ncode = 0, this.nlen = 0, this.ndist = 0, this.have = 0, this.next = null, this.lens = new e.Buf16(320), this.work = new e.Buf16(288), this.lendyn = null, this.distdyn = null, this.sane = 0, this.back = 0, this.was = 0;
1145
1145
  }
1146
- function be(z) {
1146
+ function Ce(z) {
1147
1147
  var K;
1148
- return !z || !z.state ? m : (K = z.state, z.total_in = z.total_out = K.total = 0, z.msg = "", K.wrap && (z.adler = K.wrap & 1), K.mode = C, K.last = 0, K.havedict = 0, K.dmax = 32768, K.head = null, K.hold = 0, K.bits = 0, K.lencode = K.lendyn = new e.Buf32(q), K.distcode = K.distdyn = new e.Buf32(se), K.sane = 1, K.back = -1, u);
1148
+ return !z || !z.state ? m : (K = z.state, z.total_in = z.total_out = K.total = 0, z.msg = "", K.wrap && (z.adler = K.wrap & 1), K.mode = C, K.last = 0, K.havedict = 0, K.dmax = 32768, K.head = null, K.hold = 0, K.bits = 0, K.lencode = K.lendyn = new e.Buf32(ye), K.distcode = K.distdyn = new e.Buf32(q), K.sane = 1, K.back = -1, u);
1149
1149
  }
1150
- function Se(z) {
1150
+ function be(z) {
1151
1151
  var K;
1152
- return !z || !z.state ? m : (K = z.state, K.wsize = 0, K.whave = 0, K.wnext = 0, be(z));
1152
+ return !z || !z.state ? m : (K = z.state, K.wsize = 0, K.whave = 0, K.wnext = 0, Ce(z));
1153
1153
  }
1154
- function Te(z, K) {
1154
+ function Se(z, K) {
1155
1155
  var b, ae;
1156
- return !z || !z.state || (ae = z.state, K < 0 ? (b = 0, K = -K) : (b = (K >> 4) + 1, K < 48 && (K &= 15)), K && (K < 8 || K > 15)) ? m : (ae.window !== null && ae.wbits !== K && (ae.window = null), ae.wrap = b, ae.wbits = K, Se(z));
1156
+ return !z || !z.state || (ae = z.state, K < 0 ? (b = 0, K = -K) : (b = (K >> 4) + 1, K < 48 && (K &= 15)), K && (K < 8 || K > 15)) ? m : (ae.window !== null && ae.wbits !== K && (ae.window = null), ae.wrap = b, ae.wbits = K, be(z));
1157
1157
  }
1158
1158
  function Pe(z, K) {
1159
1159
  var b, ae;
1160
- return z ? (ae = new _e(), z.state = ae, ae.window = null, b = Te(z, K), b !== u && (z.state = null), b) : m;
1160
+ return z ? (ae = new Te(), z.state = ae, ae.window = null, b = Se(z, K), b !== u && (z.state = null), b) : m;
1161
1161
  }
1162
- function Ae(z) {
1163
- return Pe(z, j);
1162
+ function Re(z) {
1163
+ return Pe(z, ne);
1164
1164
  }
1165
- var Me = !0, Ie, Re;
1166
- function Ee(z) {
1165
+ var Me = !0, Ee, ke;
1166
+ function Oe(z) {
1167
1167
  if (Me) {
1168
1168
  var K;
1169
- for (Ie = new e.Buf32(512), Re = new e.Buf32(32), K = 0; K < 144; )
1169
+ for (Ee = new e.Buf32(512), ke = new e.Buf32(32), K = 0; K < 144; )
1170
1170
  z.lens[K++] = 8;
1171
1171
  for (; K < 256; )
1172
1172
  z.lens[K++] = 9;
@@ -1174,39 +1174,39 @@ function requireInflate$1() {
1174
1174
  z.lens[K++] = 7;
1175
1175
  for (; K < 288; )
1176
1176
  z.lens[K++] = 8;
1177
- for (r(a, z.lens, 0, 288, Ie, 0, z.work, { bits: 9 }), K = 0; K < 32; )
1177
+ for (r(a, z.lens, 0, 288, Ee, 0, z.work, { bits: 9 }), K = 0; K < 32; )
1178
1178
  z.lens[K++] = 5;
1179
- r(s, z.lens, 0, 32, Re, 0, z.work, { bits: 5 }), Me = !1;
1179
+ r(s, z.lens, 0, 32, ke, 0, z.work, { bits: 5 }), Me = !1;
1180
1180
  }
1181
- z.lencode = Ie, z.lenbits = 9, z.distcode = Re, z.distbits = 5;
1181
+ z.lencode = Ee, z.lenbits = 9, z.distcode = ke, z.distbits = 5;
1182
1182
  }
1183
- function $e(z, K, b, ae) {
1183
+ function Fe(z, K, b, ae) {
1184
1184
  var ge, p = z.state;
1185
1185
  return p.window === null && (p.wsize = 1 << p.wbits, p.wnext = 0, p.whave = 0, p.window = new e.Buf8(p.wsize)), ae >= p.wsize ? (e.arraySet(p.window, K, b - p.wsize, p.wsize, 0), p.wnext = 0, p.whave = p.wsize) : (ge = p.wsize - p.wnext, ge > ae && (ge = ae), e.arraySet(p.window, K, b - ae, ge, p.wnext), ae -= ge, ae ? (e.arraySet(p.window, K, b - ae, ae, 0), p.wnext = ae, p.whave = p.wsize) : (p.wnext += ge, p.wnext === p.wsize && (p.wnext = 0), p.whave < p.wsize && (p.whave += ge))), 0;
1186
1186
  }
1187
1187
  function I(z, K) {
1188
- var b, ae, ge, p, Z, X, k, $, H, ve, pe, he, ke, Ue, Oe = 0, Ne, Le, De, Ve, Ge, Ze, we, ze, Fe = new e.Buf8(4), He, We, Je = (
1188
+ var b, ae, ge, p, Z, X, k, $, U, ve, pe, he, Ne, Ue, we = 0, Ae, Be, $e, Ve, Ge, Ze, Le, ze, De = new e.Buf8(4), He, We, Je = (
1189
1189
  /* permutation of code lengths */
1190
1190
  [16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15]
1191
1191
  );
1192
1192
  if (!z || !z.state || !z.output || !z.input && z.avail_in !== 0)
1193
1193
  return m;
1194
- b = z.state, b.mode === F && (b.mode = L), Z = z.next_out, ge = z.output, k = z.avail_out, p = z.next_in, ae = z.input, X = z.avail_in, $ = b.hold, H = b.bits, ve = X, pe = k, ze = u;
1194
+ b = z.state, b.mode === F && (b.mode = w), Z = z.next_out, ge = z.output, k = z.avail_out, p = z.next_in, ae = z.input, X = z.avail_in, $ = b.hold, U = b.bits, ve = X, pe = k, ze = u;
1195
1195
  e:
1196
1196
  for (; ; )
1197
1197
  switch (b.mode) {
1198
1198
  case C:
1199
1199
  if (b.wrap === 0) {
1200
- b.mode = L;
1200
+ b.mode = w;
1201
1201
  break;
1202
1202
  }
1203
- for (; H < 16; ) {
1203
+ for (; U < 16; ) {
1204
1204
  if (X === 0)
1205
1205
  break e;
1206
- X--, $ += ae[p++] << H, H += 8;
1206
+ X--, $ += ae[p++] << U, U += 8;
1207
1207
  }
1208
1208
  if (b.wrap & 2 && $ === 35615) {
1209
- b.check = 0, Fe[0] = $ & 255, Fe[1] = $ >>> 8 & 255, b.check = n(b.check, Fe, 2, 0), $ = 0, H = 0, b.mode = S;
1209
+ b.check = 0, De[0] = $ & 255, De[1] = $ >>> 8 & 255, b.check = n(b.check, De, 2, 0), $ = 0, U = 0, b.mode = S;
1210
1210
  break;
1211
1211
  }
1212
1212
  if (b.flags = 0, b.head && (b.head.done = !1), !(b.wrap & 1) || /* check if zlib header allowed */
@@ -1218,19 +1218,19 @@ function requireInflate$1() {
1218
1218
  z.msg = "unknown compression method", b.mode = V;
1219
1219
  break;
1220
1220
  }
1221
- if ($ >>>= 4, H -= 4, we = ($ & 15) + 8, b.wbits === 0)
1222
- b.wbits = we;
1223
- else if (we > b.wbits) {
1221
+ if ($ >>>= 4, U -= 4, Le = ($ & 15) + 8, b.wbits === 0)
1222
+ b.wbits = Le;
1223
+ else if (Le > b.wbits) {
1224
1224
  z.msg = "invalid window size", b.mode = V;
1225
1225
  break;
1226
1226
  }
1227
- b.dmax = 1 << we, z.adler = b.check = 1, b.mode = $ & 512 ? E : F, $ = 0, H = 0;
1227
+ b.dmax = 1 << Le, z.adler = b.check = 1, b.mode = $ & 512 ? E : F, $ = 0, U = 0;
1228
1228
  break;
1229
1229
  case S:
1230
- for (; H < 16; ) {
1230
+ for (; U < 16; ) {
1231
1231
  if (X === 0)
1232
1232
  break e;
1233
- X--, $ += ae[p++] << H, H += 8;
1233
+ X--, $ += ae[p++] << U, U += 8;
1234
1234
  }
1235
1235
  if (b.flags = $, (b.flags & 255) !== g) {
1236
1236
  z.msg = "unknown compression method", b.mode = V;
@@ -1240,34 +1240,34 @@ function requireInflate$1() {
1240
1240
  z.msg = "unknown header flags set", b.mode = V;
1241
1241
  break;
1242
1242
  }
1243
- b.head && (b.head.text = $ >> 8 & 1), b.flags & 512 && (Fe[0] = $ & 255, Fe[1] = $ >>> 8 & 255, b.check = n(b.check, Fe, 2, 0)), $ = 0, H = 0, b.mode = N;
1243
+ b.head && (b.head.text = $ >> 8 & 1), b.flags & 512 && (De[0] = $ & 255, De[1] = $ >>> 8 & 255, b.check = n(b.check, De, 2, 0)), $ = 0, U = 0, b.mode = N;
1244
1244
  case N:
1245
- for (; H < 32; ) {
1245
+ for (; U < 32; ) {
1246
1246
  if (X === 0)
1247
1247
  break e;
1248
- X--, $ += ae[p++] << H, H += 8;
1248
+ X--, $ += ae[p++] << U, U += 8;
1249
1249
  }
1250
- b.head && (b.head.time = $), b.flags & 512 && (Fe[0] = $ & 255, Fe[1] = $ >>> 8 & 255, Fe[2] = $ >>> 16 & 255, Fe[3] = $ >>> 24 & 255, b.check = n(b.check, Fe, 4, 0)), $ = 0, H = 0, b.mode = R;
1250
+ b.head && (b.head.time = $), b.flags & 512 && (De[0] = $ & 255, De[1] = $ >>> 8 & 255, De[2] = $ >>> 16 & 255, De[3] = $ >>> 24 & 255, b.check = n(b.check, De, 4, 0)), $ = 0, U = 0, b.mode = R;
1251
1251
  case R:
1252
- for (; H < 16; ) {
1252
+ for (; U < 16; ) {
1253
1253
  if (X === 0)
1254
1254
  break e;
1255
- X--, $ += ae[p++] << H, H += 8;
1255
+ X--, $ += ae[p++] << U, U += 8;
1256
1256
  }
1257
- b.head && (b.head.xflags = $ & 255, b.head.os = $ >> 8), b.flags & 512 && (Fe[0] = $ & 255, Fe[1] = $ >>> 8 & 255, b.check = n(b.check, Fe, 2, 0)), $ = 0, H = 0, b.mode = y;
1257
+ b.head && (b.head.xflags = $ & 255, b.head.os = $ >> 8), b.flags & 512 && (De[0] = $ & 255, De[1] = $ >>> 8 & 255, b.check = n(b.check, De, 2, 0)), $ = 0, U = 0, b.mode = y;
1258
1258
  case y:
1259
1259
  if (b.flags & 1024) {
1260
- for (; H < 16; ) {
1260
+ for (; U < 16; ) {
1261
1261
  if (X === 0)
1262
1262
  break e;
1263
- X--, $ += ae[p++] << H, H += 8;
1263
+ X--, $ += ae[p++] << U, U += 8;
1264
1264
  }
1265
- b.length = $, b.head && (b.head.extra_len = $), b.flags & 512 && (Fe[0] = $ & 255, Fe[1] = $ >>> 8 & 255, b.check = n(b.check, Fe, 2, 0)), $ = 0, H = 0;
1265
+ b.length = $, b.head && (b.head.extra_len = $), b.flags & 512 && (De[0] = $ & 255, De[1] = $ >>> 8 & 255, b.check = n(b.check, De, 2, 0)), $ = 0, U = 0;
1266
1266
  } else
1267
1267
  b.head && (b.head.extra = null);
1268
1268
  b.mode = T;
1269
1269
  case T:
1270
- if (b.flags & 1024 && (he = b.length, he > X && (he = X), he && (b.head && (we = b.head.extra_len - b.length, b.head.extra || (b.head.extra = new Array(b.head.extra_len)), e.arraySet(
1270
+ if (b.flags & 1024 && (he = b.length, he > X && (he = X), he && (b.head && (Le = b.head.extra_len - b.length, b.head.extra || (b.head.extra = new Array(b.head.extra_len)), e.arraySet(
1271
1271
  b.head.extra,
1272
1272
  ae,
1273
1273
  p,
@@ -1275,7 +1275,7 @@ function requireInflate$1() {
1275
1275
  // - no need for additional size check
1276
1276
  he,
1277
1277
  /*len + copy > state.head.extra_max - len ? state.head.extra_max : copy,*/
1278
- we
1278
+ Le
1279
1279
  )), b.flags & 512 && (b.check = n(b.check, ae, he, p)), X -= he, p += he, b.length -= he), b.length))
1280
1280
  break e;
1281
1281
  b.length = 0, b.mode = M;
@@ -1285,9 +1285,9 @@ function requireInflate$1() {
1285
1285
  break e;
1286
1286
  he = 0;
1287
1287
  do
1288
- we = ae[p + he++], b.head && we && b.length < 65536 && (b.head.name += String.fromCharCode(we));
1289
- while (we && he < X);
1290
- if (b.flags & 512 && (b.check = n(b.check, ae, he, p)), X -= he, p += he, we)
1288
+ Le = ae[p + he++], b.head && Le && b.length < 65536 && (b.head.name += String.fromCharCode(Le));
1289
+ while (Le && he < X);
1290
+ if (b.flags & 512 && (b.check = n(b.check, ae, he, p)), X -= he, p += he, Le)
1291
1291
  break e;
1292
1292
  } else
1293
1293
  b.head && (b.head.name = null);
@@ -1298,59 +1298,59 @@ function requireInflate$1() {
1298
1298
  break e;
1299
1299
  he = 0;
1300
1300
  do
1301
- we = ae[p + he++], b.head && we && b.length < 65536 && (b.head.comment += String.fromCharCode(we));
1302
- while (we && he < X);
1303
- if (b.flags & 512 && (b.check = n(b.check, ae, he, p)), X -= he, p += he, we)
1301
+ Le = ae[p + he++], b.head && Le && b.length < 65536 && (b.head.comment += String.fromCharCode(Le));
1302
+ while (Le && he < X);
1303
+ if (b.flags & 512 && (b.check = n(b.check, ae, he, p)), X -= he, p += he, Le)
1304
1304
  break e;
1305
1305
  } else
1306
1306
  b.head && (b.head.comment = null);
1307
1307
  b.mode = P;
1308
1308
  case P:
1309
1309
  if (b.flags & 512) {
1310
- for (; H < 16; ) {
1310
+ for (; U < 16; ) {
1311
1311
  if (X === 0)
1312
1312
  break e;
1313
- X--, $ += ae[p++] << H, H += 8;
1313
+ X--, $ += ae[p++] << U, U += 8;
1314
1314
  }
1315
1315
  if ($ !== (b.check & 65535)) {
1316
1316
  z.msg = "header crc mismatch", b.mode = V;
1317
1317
  break;
1318
1318
  }
1319
- $ = 0, H = 0;
1319
+ $ = 0, U = 0;
1320
1320
  }
1321
1321
  b.head && (b.head.hcrc = b.flags >> 9 & 1, b.head.done = !0), z.adler = b.check = 0, b.mode = F;
1322
1322
  break;
1323
1323
  case E:
1324
- for (; H < 32; ) {
1324
+ for (; U < 32; ) {
1325
1325
  if (X === 0)
1326
1326
  break e;
1327
- X--, $ += ae[p++] << H, H += 8;
1327
+ X--, $ += ae[p++] << U, U += 8;
1328
1328
  }
1329
- z.adler = b.check = Ce($), $ = 0, H = 0, b.mode = O;
1329
+ z.adler = b.check = de($), $ = 0, U = 0, b.mode = O;
1330
1330
  case O:
1331
1331
  if (b.havedict === 0)
1332
- return z.next_out = Z, z.avail_out = k, z.next_in = p, z.avail_in = X, b.hold = $, b.bits = H, h;
1332
+ return z.next_out = Z, z.avail_out = k, z.next_in = p, z.avail_in = X, b.hold = $, b.bits = U, h;
1333
1333
  z.adler = b.check = 1, b.mode = F;
1334
1334
  case F:
1335
1335
  if (K === c || K === f)
1336
1336
  break e;
1337
- case L:
1337
+ case w:
1338
1338
  if (b.last) {
1339
- $ >>>= H & 7, H -= H & 7, b.mode = G;
1339
+ $ >>>= U & 7, U -= U & 7, b.mode = G;
1340
1340
  break;
1341
1341
  }
1342
- for (; H < 3; ) {
1342
+ for (; U < 3; ) {
1343
1343
  if (X === 0)
1344
1344
  break e;
1345
- X--, $ += ae[p++] << H, H += 8;
1345
+ X--, $ += ae[p++] << U, U += 8;
1346
1346
  }
1347
- switch (b.last = $ & 1, $ >>>= 1, H -= 1, $ & 3) {
1347
+ switch (b.last = $ & 1, $ >>>= 1, U -= 1, $ & 3) {
1348
1348
  case 0:
1349
- b.mode = w;
1349
+ b.mode = L;
1350
1350
  break;
1351
1351
  case 1:
1352
- if (Ee(b), b.mode = U, K === f) {
1353
- $ >>>= 2, H -= 2;
1352
+ if (Oe(b), b.mode = H, K === f) {
1353
+ $ >>>= 2, U -= 2;
1354
1354
  break e;
1355
1355
  }
1356
1356
  break;
@@ -1360,19 +1360,19 @@ function requireInflate$1() {
1360
1360
  case 3:
1361
1361
  z.msg = "invalid block type", b.mode = V;
1362
1362
  }
1363
- $ >>>= 2, H -= 2;
1363
+ $ >>>= 2, U -= 2;
1364
1364
  break;
1365
- case w:
1366
- for ($ >>>= H & 7, H -= H & 7; H < 32; ) {
1365
+ case L:
1366
+ for ($ >>>= U & 7, U -= U & 7; U < 32; ) {
1367
1367
  if (X === 0)
1368
1368
  break e;
1369
- X--, $ += ae[p++] << H, H += 8;
1369
+ X--, $ += ae[p++] << U, U += 8;
1370
1370
  }
1371
1371
  if (($ & 65535) !== ($ >>> 16 ^ 65535)) {
1372
1372
  z.msg = "invalid stored block lengths", b.mode = V;
1373
1373
  break;
1374
1374
  }
1375
- if (b.length = $ & 65535, $ = 0, H = 0, b.mode = B, K === f)
1375
+ if (b.length = $ & 65535, $ = 0, U = 0, b.mode = B, K === f)
1376
1376
  break e;
1377
1377
  case B:
1378
1378
  b.mode = D;
@@ -1386,24 +1386,24 @@ function requireInflate$1() {
1386
1386
  b.mode = F;
1387
1387
  break;
1388
1388
  case W:
1389
- for (; H < 14; ) {
1389
+ for (; U < 14; ) {
1390
1390
  if (X === 0)
1391
1391
  break e;
1392
- X--, $ += ae[p++] << H, H += 8;
1392
+ X--, $ += ae[p++] << U, U += 8;
1393
1393
  }
1394
- if (b.nlen = ($ & 31) + 257, $ >>>= 5, H -= 5, b.ndist = ($ & 31) + 1, $ >>>= 5, H -= 5, b.ncode = ($ & 15) + 4, $ >>>= 4, H -= 4, b.nlen > 286 || b.ndist > 30) {
1394
+ if (b.nlen = ($ & 31) + 257, $ >>>= 5, U -= 5, b.ndist = ($ & 31) + 1, $ >>>= 5, U -= 5, b.ncode = ($ & 15) + 4, $ >>>= 4, U -= 4, b.nlen > 286 || b.ndist > 30) {
1395
1395
  z.msg = "too many length or distance symbols", b.mode = V;
1396
1396
  break;
1397
1397
  }
1398
1398
  b.have = 0, b.mode = ie;
1399
1399
  case ie:
1400
1400
  for (; b.have < b.ncode; ) {
1401
- for (; H < 3; ) {
1401
+ for (; U < 3; ) {
1402
1402
  if (X === 0)
1403
1403
  break e;
1404
- X--, $ += ae[p++] << H, H += 8;
1404
+ X--, $ += ae[p++] << U, U += 8;
1405
1405
  }
1406
- b.lens[Je[b.have++]] = $ & 7, $ >>>= 3, H -= 3;
1406
+ b.lens[Je[b.have++]] = $ & 7, $ >>>= 3, U -= 3;
1407
1407
  }
1408
1408
  for (; b.have < 19; )
1409
1409
  b.lens[Je[b.have++]] = 0;
@@ -1411,49 +1411,49 @@ function requireInflate$1() {
1411
1411
  z.msg = "invalid code lengths set", b.mode = V;
1412
1412
  break;
1413
1413
  }
1414
- b.have = 0, b.mode = ne;
1415
- case ne:
1414
+ b.have = 0, b.mode = ee;
1415
+ case ee:
1416
1416
  for (; b.have < b.nlen + b.ndist; ) {
1417
- for (; Oe = b.lencode[$ & (1 << b.lenbits) - 1], Ne = Oe >>> 24, Le = Oe >>> 16 & 255, De = Oe & 65535, !(Ne <= H); ) {
1417
+ for (; we = b.lencode[$ & (1 << b.lenbits) - 1], Ae = we >>> 24, Be = we >>> 16 & 255, $e = we & 65535, !(Ae <= U); ) {
1418
1418
  if (X === 0)
1419
1419
  break e;
1420
- X--, $ += ae[p++] << H, H += 8;
1420
+ X--, $ += ae[p++] << U, U += 8;
1421
1421
  }
1422
- if (De < 16)
1423
- $ >>>= Ne, H -= Ne, b.lens[b.have++] = De;
1422
+ if ($e < 16)
1423
+ $ >>>= Ae, U -= Ae, b.lens[b.have++] = $e;
1424
1424
  else {
1425
- if (De === 16) {
1426
- for (We = Ne + 2; H < We; ) {
1425
+ if ($e === 16) {
1426
+ for (We = Ae + 2; U < We; ) {
1427
1427
  if (X === 0)
1428
1428
  break e;
1429
- X--, $ += ae[p++] << H, H += 8;
1429
+ X--, $ += ae[p++] << U, U += 8;
1430
1430
  }
1431
- if ($ >>>= Ne, H -= Ne, b.have === 0) {
1431
+ if ($ >>>= Ae, U -= Ae, b.have === 0) {
1432
1432
  z.msg = "invalid bit length repeat", b.mode = V;
1433
1433
  break;
1434
1434
  }
1435
- we = b.lens[b.have - 1], he = 3 + ($ & 3), $ >>>= 2, H -= 2;
1436
- } else if (De === 17) {
1437
- for (We = Ne + 3; H < We; ) {
1435
+ Le = b.lens[b.have - 1], he = 3 + ($ & 3), $ >>>= 2, U -= 2;
1436
+ } else if ($e === 17) {
1437
+ for (We = Ae + 3; U < We; ) {
1438
1438
  if (X === 0)
1439
1439
  break e;
1440
- X--, $ += ae[p++] << H, H += 8;
1440
+ X--, $ += ae[p++] << U, U += 8;
1441
1441
  }
1442
- $ >>>= Ne, H -= Ne, we = 0, he = 3 + ($ & 7), $ >>>= 3, H -= 3;
1442
+ $ >>>= Ae, U -= Ae, Le = 0, he = 3 + ($ & 7), $ >>>= 3, U -= 3;
1443
1443
  } else {
1444
- for (We = Ne + 7; H < We; ) {
1444
+ for (We = Ae + 7; U < We; ) {
1445
1445
  if (X === 0)
1446
1446
  break e;
1447
- X--, $ += ae[p++] << H, H += 8;
1447
+ X--, $ += ae[p++] << U, U += 8;
1448
1448
  }
1449
- $ >>>= Ne, H -= Ne, we = 0, he = 11 + ($ & 127), $ >>>= 7, H -= 7;
1449
+ $ >>>= Ae, U -= Ae, Le = 0, he = 11 + ($ & 127), $ >>>= 7, U -= 7;
1450
1450
  }
1451
1451
  if (b.have + he > b.nlen + b.ndist) {
1452
1452
  z.msg = "invalid bit length repeat", b.mode = V;
1453
1453
  break;
1454
1454
  }
1455
1455
  for (; he--; )
1456
- b.lens[b.have++] = we;
1456
+ b.lens[b.have++] = Le;
1457
1457
  }
1458
1458
  }
1459
1459
  if (b.mode === V)
@@ -1470,85 +1470,85 @@ function requireInflate$1() {
1470
1470
  z.msg = "invalid distances set", b.mode = V;
1471
1471
  break;
1472
1472
  }
1473
- if (b.mode = U, K === f)
1473
+ if (b.mode = H, K === f)
1474
1474
  break e;
1475
- case U:
1476
- b.mode = re;
1477
- case re:
1475
+ case H:
1476
+ b.mode = oe;
1477
+ case oe:
1478
1478
  if (X >= 6 && k >= 258) {
1479
- z.next_out = Z, z.avail_out = k, z.next_in = p, z.avail_in = X, b.hold = $, b.bits = H, i(z, pe), Z = z.next_out, ge = z.output, k = z.avail_out, p = z.next_in, ae = z.input, X = z.avail_in, $ = b.hold, H = b.bits, b.mode === F && (b.back = -1);
1479
+ z.next_out = Z, z.avail_out = k, z.next_in = p, z.avail_in = X, b.hold = $, b.bits = U, i(z, pe), Z = z.next_out, ge = z.output, k = z.avail_out, p = z.next_in, ae = z.input, X = z.avail_in, $ = b.hold, U = b.bits, b.mode === F && (b.back = -1);
1480
1480
  break;
1481
1481
  }
1482
- for (b.back = 0; Oe = b.lencode[$ & (1 << b.lenbits) - 1], Ne = Oe >>> 24, Le = Oe >>> 16 & 255, De = Oe & 65535, !(Ne <= H); ) {
1482
+ for (b.back = 0; we = b.lencode[$ & (1 << b.lenbits) - 1], Ae = we >>> 24, Be = we >>> 16 & 255, $e = we & 65535, !(Ae <= U); ) {
1483
1483
  if (X === 0)
1484
1484
  break e;
1485
- X--, $ += ae[p++] << H, H += 8;
1485
+ X--, $ += ae[p++] << U, U += 8;
1486
1486
  }
1487
- if (Le && !(Le & 240)) {
1488
- for (Ve = Ne, Ge = Le, Ze = De; Oe = b.lencode[Ze + (($ & (1 << Ve + Ge) - 1) >> Ve)], Ne = Oe >>> 24, Le = Oe >>> 16 & 255, De = Oe & 65535, !(Ve + Ne <= H); ) {
1487
+ if (Be && !(Be & 240)) {
1488
+ for (Ve = Ae, Ge = Be, Ze = $e; we = b.lencode[Ze + (($ & (1 << Ve + Ge) - 1) >> Ve)], Ae = we >>> 24, Be = we >>> 16 & 255, $e = we & 65535, !(Ve + Ae <= U); ) {
1489
1489
  if (X === 0)
1490
1490
  break e;
1491
- X--, $ += ae[p++] << H, H += 8;
1491
+ X--, $ += ae[p++] << U, U += 8;
1492
1492
  }
1493
- $ >>>= Ve, H -= Ve, b.back += Ve;
1493
+ $ >>>= Ve, U -= Ve, b.back += Ve;
1494
1494
  }
1495
- if ($ >>>= Ne, H -= Ne, b.back += Ne, b.length = De, Le === 0) {
1496
- b.mode = ee;
1495
+ if ($ >>>= Ae, U -= Ae, b.back += Ae, b.length = $e, Be === 0) {
1496
+ b.mode = j;
1497
1497
  break;
1498
1498
  }
1499
- if (Le & 32) {
1499
+ if (Be & 32) {
1500
1500
  b.back = -1, b.mode = F;
1501
1501
  break;
1502
1502
  }
1503
- if (Le & 64) {
1503
+ if (Be & 64) {
1504
1504
  z.msg = "invalid literal/length code", b.mode = V;
1505
1505
  break;
1506
1506
  }
1507
- b.extra = Le & 15, b.mode = te;
1507
+ b.extra = Be & 15, b.mode = te;
1508
1508
  case te:
1509
1509
  if (b.extra) {
1510
- for (We = b.extra; H < We; ) {
1510
+ for (We = b.extra; U < We; ) {
1511
1511
  if (X === 0)
1512
1512
  break e;
1513
- X--, $ += ae[p++] << H, H += 8;
1513
+ X--, $ += ae[p++] << U, U += 8;
1514
1514
  }
1515
- b.length += $ & (1 << b.extra) - 1, $ >>>= b.extra, H -= b.extra, b.back += b.extra;
1515
+ b.length += $ & (1 << b.extra) - 1, $ >>>= b.extra, U -= b.extra, b.back += b.extra;
1516
1516
  }
1517
1517
  b.was = b.length, b.mode = Q;
1518
1518
  case Q:
1519
- for (; Oe = b.distcode[$ & (1 << b.distbits) - 1], Ne = Oe >>> 24, Le = Oe >>> 16 & 255, De = Oe & 65535, !(Ne <= H); ) {
1519
+ for (; we = b.distcode[$ & (1 << b.distbits) - 1], Ae = we >>> 24, Be = we >>> 16 & 255, $e = we & 65535, !(Ae <= U); ) {
1520
1520
  if (X === 0)
1521
1521
  break e;
1522
- X--, $ += ae[p++] << H, H += 8;
1522
+ X--, $ += ae[p++] << U, U += 8;
1523
1523
  }
1524
- if (!(Le & 240)) {
1525
- for (Ve = Ne, Ge = Le, Ze = De; Oe = b.distcode[Ze + (($ & (1 << Ve + Ge) - 1) >> Ve)], Ne = Oe >>> 24, Le = Oe >>> 16 & 255, De = Oe & 65535, !(Ve + Ne <= H); ) {
1524
+ if (!(Be & 240)) {
1525
+ for (Ve = Ae, Ge = Be, Ze = $e; we = b.distcode[Ze + (($ & (1 << Ve + Ge) - 1) >> Ve)], Ae = we >>> 24, Be = we >>> 16 & 255, $e = we & 65535, !(Ve + Ae <= U); ) {
1526
1526
  if (X === 0)
1527
1527
  break e;
1528
- X--, $ += ae[p++] << H, H += 8;
1528
+ X--, $ += ae[p++] << U, U += 8;
1529
1529
  }
1530
- $ >>>= Ve, H -= Ve, b.back += Ve;
1530
+ $ >>>= Ve, U -= Ve, b.back += Ve;
1531
1531
  }
1532
- if ($ >>>= Ne, H -= Ne, b.back += Ne, Le & 64) {
1532
+ if ($ >>>= Ae, U -= Ae, b.back += Ae, Be & 64) {
1533
1533
  z.msg = "invalid distance code", b.mode = V;
1534
1534
  break;
1535
1535
  }
1536
- b.offset = De, b.extra = Le & 15, b.mode = J;
1536
+ b.offset = $e, b.extra = Be & 15, b.mode = J;
1537
1537
  case J:
1538
1538
  if (b.extra) {
1539
- for (We = b.extra; H < We; ) {
1539
+ for (We = b.extra; U < We; ) {
1540
1540
  if (X === 0)
1541
1541
  break e;
1542
- X--, $ += ae[p++] << H, H += 8;
1542
+ X--, $ += ae[p++] << U, U += 8;
1543
1543
  }
1544
- b.offset += $ & (1 << b.extra) - 1, $ >>>= b.extra, H -= b.extra, b.back += b.extra;
1544
+ b.offset += $ & (1 << b.extra) - 1, $ >>>= b.extra, U -= b.extra, b.back += b.extra;
1545
1545
  }
1546
1546
  if (b.offset > b.dmax) {
1547
1547
  z.msg = "invalid distance too far back", b.mode = V;
1548
1548
  break;
1549
1549
  }
1550
- b.mode = de;
1551
- case de:
1550
+ b.mode = ce;
1551
+ case ce:
1552
1552
  if (k === 0)
1553
1553
  break e;
1554
1554
  if (he = pe - k, b.offset > he) {
@@ -1556,47 +1556,47 @@ function requireInflate$1() {
1556
1556
  z.msg = "invalid distance too far back", b.mode = V;
1557
1557
  break;
1558
1558
  }
1559
- he > b.wnext ? (he -= b.wnext, ke = b.wsize - he) : ke = b.wnext - he, he > b.length && (he = b.length), Ue = b.window;
1559
+ he > b.wnext ? (he -= b.wnext, Ne = b.wsize - he) : Ne = b.wnext - he, he > b.length && (he = b.length), Ue = b.window;
1560
1560
  } else
1561
- Ue = ge, ke = Z - b.offset, he = b.length;
1561
+ Ue = ge, Ne = Z - b.offset, he = b.length;
1562
1562
  he > k && (he = k), k -= he, b.length -= he;
1563
1563
  do
1564
- ge[Z++] = Ue[ke++];
1564
+ ge[Z++] = Ue[Ne++];
1565
1565
  while (--he);
1566
- b.length === 0 && (b.mode = re);
1566
+ b.length === 0 && (b.mode = oe);
1567
1567
  break;
1568
- case ee:
1568
+ case j:
1569
1569
  if (k === 0)
1570
1570
  break e;
1571
- ge[Z++] = b.length, k--, b.mode = re;
1571
+ ge[Z++] = b.length, k--, b.mode = oe;
1572
1572
  break;
1573
1573
  case G:
1574
1574
  if (b.wrap) {
1575
- for (; H < 32; ) {
1575
+ for (; U < 32; ) {
1576
1576
  if (X === 0)
1577
1577
  break e;
1578
- X--, $ |= ae[p++] << H, H += 8;
1578
+ X--, $ |= ae[p++] << U, U += 8;
1579
1579
  }
1580
1580
  if (pe -= k, z.total_out += pe, b.total += pe, pe && (z.adler = b.check = /*UPDATE(state.check, put - _out, _out);*/
1581
- b.flags ? n(b.check, ge, pe, Z - pe) : t(b.check, ge, pe, Z - pe)), pe = k, (b.flags ? $ : Ce($)) !== b.check) {
1581
+ b.flags ? n(b.check, ge, pe, Z - pe) : t(b.check, ge, pe, Z - pe)), pe = k, (b.flags ? $ : de($)) !== b.check) {
1582
1582
  z.msg = "incorrect data check", b.mode = V;
1583
1583
  break;
1584
1584
  }
1585
- $ = 0, H = 0;
1585
+ $ = 0, U = 0;
1586
1586
  }
1587
1587
  b.mode = xe;
1588
1588
  case xe:
1589
1589
  if (b.wrap && b.flags) {
1590
- for (; H < 32; ) {
1590
+ for (; U < 32; ) {
1591
1591
  if (X === 0)
1592
1592
  break e;
1593
- X--, $ += ae[p++] << H, H += 8;
1593
+ X--, $ += ae[p++] << U, U += 8;
1594
1594
  }
1595
1595
  if ($ !== (b.total & 4294967295)) {
1596
1596
  z.msg = "incorrect length check", b.mode = V;
1597
1597
  break;
1598
1598
  }
1599
- $ = 0, H = 0;
1599
+ $ = 0, U = 0;
1600
1600
  }
1601
1601
  b.mode = fe;
1602
1602
  case fe:
@@ -1607,28 +1607,28 @@ function requireInflate$1() {
1607
1607
  break e;
1608
1608
  case Y:
1609
1609
  return v;
1610
- case ye:
1610
+ case _e:
1611
1611
  default:
1612
1612
  return m;
1613
1613
  }
1614
- return z.next_out = Z, z.avail_out = k, z.next_in = p, z.avail_in = X, b.hold = $, b.bits = H, (b.wsize || pe !== z.avail_out && b.mode < V && (b.mode < G || K !== l)) && $e(z, z.output, z.next_out, pe - z.avail_out), ve -= z.avail_in, pe -= z.avail_out, z.total_in += ve, z.total_out += pe, b.total += pe, b.wrap && pe && (z.adler = b.check = /*UPDATE(state.check, strm.next_out - _out, _out);*/
1615
- b.flags ? n(b.check, ge, pe, z.next_out - pe) : t(b.check, ge, pe, z.next_out - pe)), z.data_type = b.bits + (b.last ? 64 : 0) + (b.mode === F ? 128 : 0) + (b.mode === U || b.mode === B ? 256 : 0), (ve === 0 && pe === 0 || K === l) && ze === u && (ze = x), ze;
1614
+ return z.next_out = Z, z.avail_out = k, z.next_in = p, z.avail_in = X, b.hold = $, b.bits = U, (b.wsize || pe !== z.avail_out && b.mode < V && (b.mode < G || K !== l)) && Fe(z, z.output, z.next_out, pe - z.avail_out), ve -= z.avail_in, pe -= z.avail_out, z.total_in += ve, z.total_out += pe, b.total += pe, b.wrap && pe && (z.adler = b.check = /*UPDATE(state.check, strm.next_out - _out, _out);*/
1615
+ b.flags ? n(b.check, ge, pe, z.next_out - pe) : t(b.check, ge, pe, z.next_out - pe)), z.data_type = b.bits + (b.last ? 64 : 0) + (b.mode === F ? 128 : 0) + (b.mode === H || b.mode === B ? 256 : 0), (ve === 0 && pe === 0 || K === l) && ze === u && (ze = x), ze;
1616
1616
  }
1617
- function oe(z) {
1617
+ function re(z) {
1618
1618
  if (!z || !z.state)
1619
1619
  return m;
1620
1620
  var K = z.state;
1621
1621
  return K.window && (K.window = null), z.state = null, u;
1622
1622
  }
1623
- function le(z, K) {
1623
+ function se(z, K) {
1624
1624
  var b;
1625
1625
  return !z || !z.state || (b = z.state, !(b.wrap & 2)) ? m : (b.head = K, K.done = !1, u);
1626
1626
  }
1627
1627
  function me(z, K) {
1628
1628
  var b = K.length, ae, ge, p;
1629
- return !z || !z.state || (ae = z.state, ae.wrap !== 0 && ae.mode !== O) ? m : ae.mode === O && (ge = 1, ge = t(ge, K, b, 0), ge !== ae.check) ? _ : (p = $e(z, K, b, b), p ? (ae.mode = Y, v) : (ae.havedict = 1, u));
1629
+ return !z || !z.state || (ae = z.state, ae.wrap !== 0 && ae.mode !== O) ? m : ae.mode === O && (ge = 1, ge = t(ge, K, b, 0), ge !== ae.check) ? _ : (p = Fe(z, K, b, b), p ? (ae.mode = Y, v) : (ae.havedict = 1, u));
1630
1630
  }
1631
- return inflate.inflateReset = Se, inflate.inflateReset2 = Te, inflate.inflateResetKeep = be, inflate.inflateInit = Ae, inflate.inflateInit2 = Pe, inflate.inflate = I, inflate.inflateEnd = oe, inflate.inflateGetHeader = le, inflate.inflateSetDictionary = me, inflate.inflateInfo = "pako inflate (from Nodeca project)", inflate;
1631
+ return inflate.inflateReset = be, inflate.inflateReset2 = Se, inflate.inflateResetKeep = Ce, inflate.inflateInit = Re, inflate.inflateInit2 = Pe, inflate.inflate = I, inflate.inflateEnd = re, inflate.inflateGetHeader = se, inflate.inflateSetDictionary = me, inflate.inflateInfo = "pako inflate (from Nodeca project)", inflate;
1632
1632
  }
1633
1633
  var constants, hasRequiredConstants;
1634
1634
  function requireConstants() {
@@ -1793,25 +1793,25 @@ function requirePako() {
1793
1793
  if (_ == 1)
1794
1794
  for (var E = 0; E < s; E++)
1795
1795
  for (var O = E * u, F = E * a, g = 0; g < a; g++) {
1796
- var y = F + g << 2, L = o[O + (g >> 3)] >> 7 - ((g & 7) << 0) & 1, w = 3 * L;
1797
- d[y] = M[w], d[y + 1] = M[w + 1], d[y + 2] = M[w + 2], d[y + 3] = L < P ? A[L] : 255;
1796
+ var y = F + g << 2, w = o[O + (g >> 3)] >> 7 - ((g & 7) << 0) & 1, L = 3 * w;
1797
+ d[y] = M[L], d[y + 1] = M[L + 1], d[y + 2] = M[L + 2], d[y + 3] = w < P ? A[w] : 255;
1798
1798
  }
1799
1799
  if (_ == 2)
1800
1800
  for (var E = 0; E < s; E++)
1801
1801
  for (var O = E * u, F = E * a, g = 0; g < a; g++) {
1802
- var y = F + g << 2, L = o[O + (g >> 2)] >> 6 - ((g & 3) << 1) & 3, w = 3 * L;
1803
- d[y] = M[w], d[y + 1] = M[w + 1], d[y + 2] = M[w + 2], d[y + 3] = L < P ? A[L] : 255;
1802
+ var y = F + g << 2, w = o[O + (g >> 2)] >> 6 - ((g & 3) << 1) & 3, L = 3 * w;
1803
+ d[y] = M[L], d[y + 1] = M[L + 1], d[y + 2] = M[L + 2], d[y + 3] = w < P ? A[w] : 255;
1804
1804
  }
1805
1805
  if (_ == 4)
1806
1806
  for (var E = 0; E < s; E++)
1807
1807
  for (var O = E * u, F = E * a, g = 0; g < a; g++) {
1808
- var y = F + g << 2, L = o[O + (g >> 1)] >> 4 - ((g & 1) << 2) & 15, w = 3 * L;
1809
- d[y] = M[w], d[y + 1] = M[w + 1], d[y + 2] = M[w + 2], d[y + 3] = L < P ? A[L] : 255;
1808
+ var y = F + g << 2, w = o[O + (g >> 1)] >> 4 - ((g & 1) << 2) & 15, L = 3 * w;
1809
+ d[y] = M[L], d[y + 1] = M[L + 1], d[y + 2] = M[L + 2], d[y + 3] = w < P ? A[w] : 255;
1810
1810
  }
1811
1811
  if (_ == 8)
1812
1812
  for (var g = 0; g < c; g++) {
1813
- var y = g << 2, L = o[g], w = 3 * L;
1814
- d[y] = M[w], d[y + 1] = M[w + 1], d[y + 2] = M[w + 2], d[y + 3] = L < P ? A[L] : 255;
1813
+ var y = g << 2, w = o[g], L = 3 * w;
1814
+ d[y] = M[L], d[y + 1] = M[L + 1], d[y + 2] = M[L + 2], d[y + 3] = w < P ? A[w] : 255;
1815
1815
  }
1816
1816
  } else if (m == 4) {
1817
1817
  if (_ == 8)
@@ -1953,8 +1953,8 @@ function requirePako() {
1953
1953
  F = F >> 4 - (O & 7) & 15, d[P * u + (E >> 1)] |= F << 4 - ((E & 1) << 2);
1954
1954
  }
1955
1955
  if (c >= 8)
1956
- for (var L = P * u + E * f, w = 0; w < f; w++)
1957
- d[L + w] = o[(O >> 3) + w];
1956
+ for (var w = P * u + E * f, L = 0; L < f; L++)
1957
+ d[w + L] = o[(O >> 3) + L];
1958
1958
  O += c, E += S;
1959
1959
  }
1960
1960
  A++, P += C;
@@ -2103,13 +2103,13 @@ function requirePako() {
2103
2103
  for (var E = 0, O = 0; O < S.frames.length; O++) {
2104
2104
  var F = S.frames[O];
2105
2105
  N && (x(u, m, 26), m += 4, C(u, m, "fcTL"), m += 4, x(u, m, E++), m += 4, x(u, m, F.rect.width), m += 4, x(u, m, F.rect.height), m += 4, x(u, m, F.rect.x), m += 4, x(u, m, F.rect.y), m += 4, g(u, m, c[O]), m += 2, g(u, m, 1e3), m += 2, u[m] = F.dispose, m++, u[m] = F.blend, m++, x(u, m, v(u, m - 30, 30)), m += 4);
2106
- var L = F.cimg, R = L.length;
2106
+ var w = F.cimg, R = w.length;
2107
2107
  x(u, m, R + (O == 0 ? 0 : 4)), m += 4;
2108
- var w = m;
2108
+ var L = m;
2109
2109
  C(u, m, O == 0 ? "IDAT" : "fdAT"), m += 4, O != 0 && (x(u, m, E++), m += 4);
2110
2110
  for (var h = 0; h < R; h++)
2111
- u[m + h] = L[h];
2112
- m += R, x(u, m, v(u, w, m - w)), m += 4;
2111
+ u[m + h] = w[h];
2112
+ m += R, x(u, m, v(u, L, m - L)), m += 4;
2113
2113
  }
2114
2114
  return x(u, m, 0), m += 4, C(u, m, "IEND"), m += 4, x(u, m, v(u, m - 4, 4)), m += 4, u.buffer.slice(0, m);
2115
2115
  }, i.encode.compressPNG = function(o, a, s, l, c) {
@@ -2143,49 +2143,49 @@ function requirePako() {
2143
2143
  var M = C ? c : !1, A = N.length;
2144
2144
  A <= 256 && f == !1 && (A <= 2 ? d = 1 : A <= 4 ? d = 2 : A <= 16 ? d = 4 : d = 8, c && (d = 8), C = !0);
2145
2145
  for (var P = [], _ = 0; _ < o.length; _++) {
2146
- var E = new Uint8Array(o[_]), O = new Uint32Array(E.buffer), F = 0, L = 0, w = a, B = s, D = 0;
2146
+ var E = new Uint8Array(o[_]), O = new Uint32Array(E.buffer), F = 0, w = 0, L = a, B = s, D = 0;
2147
2147
  if (_ != 0 && !M) {
2148
- for (var W = c || _ == 1 || P[P.length - 2].dispose == 2 ? 1 : 2, ie = 0, ne = 1e9, U = 0; U < W; U++) {
2149
- for (var fe = new Uint8Array(o[_ - 1 - U]), re = new Uint32Array(o[_ - 1 - U]), te = a, Q = s, J = -1, de = -1, ee = 0; ee < s; ee++)
2148
+ for (var W = c || _ == 1 || P[P.length - 2].dispose == 2 ? 1 : 2, ie = 0, ee = 1e9, H = 0; H < W; H++) {
2149
+ for (var fe = new Uint8Array(o[_ - 1 - H]), oe = new Uint32Array(o[_ - 1 - H]), te = a, Q = s, J = -1, ce = -1, j = 0; j < s; j++)
2150
2150
  for (var G = 0; G < a; G++) {
2151
- var g = ee * a + G;
2152
- O[g] != re[g] && (G < te && (te = G), G > J && (J = G), ee < Q && (Q = ee), ee > de && (de = ee));
2151
+ var g = j * a + G;
2152
+ O[g] != oe[g] && (G < te && (te = G), G > J && (J = G), j < Q && (Q = j), j > ce && (ce = j));
2153
2153
  }
2154
- var xe = J == -1 ? 1 : (J - te + 1) * (de - Q + 1);
2155
- xe < ne && (ne = xe, ie = U, J == -1 ? (F = L = 0, w = B = 1) : (F = te, L = Q, w = J - te + 1, B = de - Q + 1));
2154
+ var xe = J == -1 ? 1 : (J - te + 1) * (ce - Q + 1);
2155
+ xe < ee && (ee = xe, ie = H, J == -1 ? (F = w = 0, L = B = 1) : (F = te, w = Q, L = J - te + 1, B = ce - Q + 1));
2156
2156
  }
2157
2157
  var fe = new Uint8Array(o[_ - 1 - ie]);
2158
2158
  ie == 1 && (P[P.length - 1].dispose = 2);
2159
- var V = new Uint8Array(w * B * 4);
2160
- new Uint32Array(V.buffer), i._copyTile(fe, a, s, V, w, B, -F, -L, 0), i._copyTile(E, a, s, V, w, B, -F, -L, 3) ? (i._copyTile(E, a, s, V, w, B, -F, -L, 2), D = 1) : (i._copyTile(E, a, s, V, w, B, -F, -L, 0), D = 0), E = V, O = new Uint32Array(E.buffer);
2159
+ var V = new Uint8Array(L * B * 4);
2160
+ new Uint32Array(V.buffer), i._copyTile(fe, a, s, V, L, B, -F, -w, 0), i._copyTile(E, a, s, V, L, B, -F, -w, 3) ? (i._copyTile(E, a, s, V, L, B, -F, -w, 2), D = 1) : (i._copyTile(E, a, s, V, L, B, -F, -w, 0), D = 0), E = V, O = new Uint32Array(E.buffer);
2161
2161
  }
2162
- var Y = 4 * w;
2162
+ var Y = 4 * L;
2163
2163
  if (A <= 256 && f == !1) {
2164
- Y = Math.ceil(d * w / 8);
2165
- for (var V = new Uint8Array(Y * B), ee = 0; ee < B; ee++) {
2166
- var g = ee * Y, ye = ee * w;
2164
+ Y = Math.ceil(d * L / 8);
2165
+ for (var V = new Uint8Array(Y * B), j = 0; j < B; j++) {
2166
+ var g = j * Y, _e = j * L;
2167
2167
  if (d == 8)
2168
- for (var G = 0; G < w; G++)
2169
- V[g + G] = S[O[ye + G]];
2168
+ for (var G = 0; G < L; G++)
2169
+ V[g + G] = S[O[_e + G]];
2170
2170
  else if (d == 4)
2171
- for (var G = 0; G < w; G++)
2172
- V[g + (G >> 1)] |= S[O[ye + G]] << 4 - (G & 1) * 4;
2171
+ for (var G = 0; G < L; G++)
2172
+ V[g + (G >> 1)] |= S[O[_e + G]] << 4 - (G & 1) * 4;
2173
2173
  else if (d == 2)
2174
- for (var G = 0; G < w; G++)
2175
- V[g + (G >> 2)] |= S[O[ye + G]] << 6 - (G & 3) * 2;
2174
+ for (var G = 0; G < L; G++)
2175
+ V[g + (G >> 2)] |= S[O[_e + G]] << 6 - (G & 3) * 2;
2176
2176
  else if (d == 1)
2177
- for (var G = 0; G < w; G++)
2178
- V[g + (G >> 3)] |= S[O[ye + G]] << 7 - (G & 7) * 1;
2177
+ for (var G = 0; G < L; G++)
2178
+ V[g + (G >> 3)] |= S[O[_e + G]] << 7 - (G & 7) * 1;
2179
2179
  }
2180
2180
  E = V, u = 3, h = 1;
2181
2181
  } else if (C == !1 && o.length == 1) {
2182
- for (var V = new Uint8Array(w * B * 3), q = w * B, g = 0; g < q; g++) {
2183
- var se = g * 3, ce = g * 4;
2184
- V[se] = E[ce], V[se + 1] = E[ce + 1], V[se + 2] = E[ce + 2];
2182
+ for (var V = new Uint8Array(L * B * 3), ye = L * B, g = 0; g < ye; g++) {
2183
+ var q = g * 3, ue = g * 4;
2184
+ V[q] = E[ue], V[q + 1] = E[ue + 1], V[q + 2] = E[ue + 2];
2185
2185
  }
2186
- E = V, u = 2, h = 3, Y = 3 * w;
2186
+ E = V, u = 2, h = 3, Y = 3 * L;
2187
2187
  }
2188
- P.push({ rect: { x: F, y: L, width: w, height: B }, img: E, bpl: Y, bpp: h, blend: D, dispose: M ? 1 : 0 });
2188
+ P.push({ rect: { x: F, y: w, width: L, height: B }, img: E, bpl: Y, bpp: h, blend: D, dispose: M ? 1 : 0 });
2189
2189
  }
2190
2190
  return { ctype: u, depth: d, plte: N, gotAlpha: C, frames: P };
2191
2191
  }, i.encode._filterZero = function(o, a, s, l, c) {
@@ -2285,8 +2285,8 @@ function requirePako() {
2285
2285
  });
2286
2286
  for (var M = 0; M < l.length; M++) {
2287
2287
  for (var A = i.quantize.planeDst, P = new Uint8Array(l[M].buffer), E = new Uint32Array(l[M].buffer), O = P.length, f = 0; f < O; f += 4) {
2288
- for (var F = P[f] * 0.00392156862745098, L = P[f + 1] * (1 / 255), w = P[f + 2] * (1 / 255), B = P[f + 3] * (1 / 255), D = x; D.left; )
2289
- D = A(D.est, F, L, w, B) <= 0 ? D.left : D.right;
2288
+ for (var F = P[f] * 0.00392156862745098, w = P[f + 1] * (1 / 255), L = P[f + 2] * (1 / 255), B = P[f + 3] * (1 / 255), D = x; D.left; )
2289
+ D = A(D.est, F, w, L, B) <= 0 ? D.left : D.right;
2290
2290
  E[f >> 2] = D.est.rgba;
2291
2291
  }
2292
2292
  l[M] = E.buffer;
@@ -2441,7 +2441,7 @@ const FetchAndCacheContext = createContext({
2441
2441
  useLoadingScreen: 1,
2442
2442
  hideLoadingWhenPostCalculate: !0
2443
2443
  }), GPUPickingContext = createContext(null), Geo3DProvider = (e, t) => {
2444
- var xe, fe, V, Y, ye;
2444
+ var fe, V, Y, _e, ye;
2445
2445
  const {
2446
2446
  children: n,
2447
2447
  workspaceMeta: i = {
@@ -2454,14 +2454,14 @@ const FetchAndCacheContext = createContext({
2454
2454
  },
2455
2455
  colorProvider: r = { colorIDs: {}, colorCodecs: {} },
2456
2456
  cacheProvider: o = {
2457
- onPreFetch: (q) => new Promise((se) => {
2458
- se(q);
2457
+ onPreFetch: (q) => new Promise((ue) => {
2458
+ ue(q);
2459
2459
  }),
2460
2460
  onFinish: () => {
2461
2461
  console.log("Loaded");
2462
2462
  },
2463
- onProgress: (q, se) => {
2464
- console.log(`Loading ${q} of ${se}`);
2463
+ onProgress: (q, ue) => {
2464
+ console.log(`Loading ${q} of ${ue}`);
2465
2465
  },
2466
2466
  useLoadingScreen: 1
2467
2467
  /* NONE */
@@ -2471,52 +2471,58 @@ const FetchAndCacheContext = createContext({
2471
2471
  lastReportedTotal: -1
2472
2472
  }), [, g] = React.useState(0), C = React.useRef(null), S = React.useRef(null), N = React.useRef(!1), R = React.useRef(null), y = React.useRef([]), T = React.useRef(null), M = React.useRef(0), A = React.useRef(/* @__PURE__ */ new WeakMap()), P = React.useRef(1), E = React.useRef(
2473
2473
  /* @__PURE__ */ new Map()
2474
- ), O = React.useRef(0);
2474
+ ), O = React.useRef(0), F = React.useRef({
2475
+ isDown: !1,
2476
+ pointerId: -1,
2477
+ startX: 0,
2478
+ startY: 0,
2479
+ isDragging: !1
2480
+ });
2475
2481
  React.useEffect(() => {
2476
2482
  if (r.colorCodecs) {
2477
2483
  console.log("[Geo3DViewer] 开始色标刷新");
2478
2484
  const q = {};
2479
- if (Object.keys(r.colorCodecs).forEach((ce) => {
2480
- console.log(`[Geo3DViewer] 正在生成色标 ${ce}`);
2481
- const j = r.colorCodecs[ce], Ce = new Uint8Array(j.array.length * 4);
2482
- j.array.forEach((Se, Te) => {
2483
- Ce[Te * 4 + 0] = Math.trunc(Se.r * 255), Ce[Te * 4 + 1] = Math.trunc(Se.g * 255), Ce[Te * 4 + 2] = Math.trunc(Se.b * 255), Ce[Te * 4 + 3] = 255;
2484
- }), console.log(`[Geo3DViewer] 正在创建色标采样贴图 ${ce}`);
2485
- const _e = RawTexture.CreateRGBATexture(
2486
- Ce,
2485
+ if (Object.keys(r.colorCodecs).forEach((ne) => {
2486
+ console.log(`[Geo3DViewer] 正在生成色标 ${ne}`);
2487
+ const de = r.colorCodecs[ne], Te = new Uint8Array(de.array.length * 4);
2488
+ de.array.forEach((Se, Pe) => {
2489
+ Te[Pe * 4 + 0] = Math.trunc(Se.r * 255), Te[Pe * 4 + 1] = Math.trunc(Se.g * 255), Te[Pe * 4 + 2] = Math.trunc(Se.b * 255), Te[Pe * 4 + 3] = 255;
2490
+ }), console.log(`[Geo3DViewer] 正在创建色标采样贴图 ${ne}`);
2491
+ const Ce = RawTexture.CreateRGBATexture(
2492
+ Te,
2487
2493
  1,
2488
- j.array.length,
2494
+ de.array.length,
2489
2495
  a,
2490
2496
  !0,
2491
2497
  !1
2492
2498
  );
2493
- _e.name = `color-codec-${ce}`, console.log(`[Geo3DViewer] 正在创建色标图例 ${ce}`);
2499
+ Ce.name = `color-codec-${ne}`, console.log(`[Geo3DViewer] 正在创建色标图例 ${ne}`);
2494
2500
  const be = URL.createObjectURL(
2495
- new Blob([UPNG.encode([Ce.buffer], 1, j.array.length, 0)])
2501
+ new Blob([UPNG.encode([Te.buffer], 1, de.array.length, 0)])
2496
2502
  );
2497
- console.log(`[Geo3DViewer] 正在构建色标 ${ce}`), q[ce] = {
2503
+ console.log(`[Geo3DViewer] 正在构建色标 ${ne}`), q[ne] = {
2498
2504
  blobUrl: be,
2499
- min: j.min,
2500
- max: j.max,
2501
- texture: _e
2505
+ min: de.min,
2506
+ max: de.max,
2507
+ texture: Ce
2502
2508
  };
2503
2509
  }), a) {
2504
2510
  console.log(
2505
2511
  `[Geo3DViewer] 正在移除原有色标 共 ${Object.keys(f.current).length} 个`
2506
- ), Object.keys(f.current).forEach((j) => {
2507
- console.log(`[Geo3DViewer] 正在移除色标 ${j}`), a.removeTexture(f.current[j].texture), f.current[j].texture.dispose(), URL.revokeObjectURL(f.current[j].blobUrl);
2512
+ ), Object.keys(f.current).forEach((de) => {
2513
+ console.log(`[Geo3DViewer] 正在移除色标 ${de}`), a.removeTexture(f.current[de].texture), f.current[de].texture.dispose(), URL.revokeObjectURL(f.current[de].blobUrl);
2508
2514
  }), f.current = q;
2509
- const ce = a.getMaterialByTags("remap");
2510
- console.log("[Geo3DViewer] 已完成色标刷新,正在更新关联的材质"), ce.forEach((j) => {
2511
- j instanceof ShaderMaterial ? j.setTexture(
2515
+ const ne = a.getMaterialByTags("remap");
2516
+ console.log("[Geo3DViewer] 已完成色标刷新,正在更新关联的材质"), ne.forEach((de) => {
2517
+ de instanceof ShaderMaterial ? de.setTexture(
2512
2518
  "textureSampler",
2513
- q[j.metadata.colorCodec].texture
2514
- ) : (j.getBlockByName("RemappedTexture").texture = q[j.metadata.colorCodec].texture, j.markAsDirty(NodeMaterial.TextureDirtyFlag));
2515
- }), console.log(`[Geo3DViewer] 已有 ${ce.length} 个材质执行了更新`);
2519
+ q[de.metadata.colorCodec].texture
2520
+ ) : (de.getBlockByName("RemappedTexture").texture = q[de.metadata.colorCodec].texture, de.markAsDirty(NodeMaterial.TextureDirtyFlag));
2521
+ }), console.log(`[Geo3DViewer] 已有 ${ne.length} 个材质执行了更新`);
2516
2522
  }
2517
2523
  }
2518
2524
  }, [r.colorCodecs, a]);
2519
- const F = React.useCallback((q) => !q || q.isDisposed() || !q.metadata || !("pickable" in q.metadata) || !q.metadata.pickable ? null : q.metadata.pickable, []), L = React.useCallback((q) => !!(q && (q.onHover || q.onLeftClick || q.onMiddleClick || q.onRightClick)), []), w = React.useCallback(
2525
+ const w = React.useCallback((q) => !q || q.isDisposed() || !q.metadata || !("pickable" in q.metadata) || !q.metadata.pickable ? null : q.metadata.pickable, []), L = React.useCallback((q) => !!(q && (q.onHover || q.onLeftClick || q.onMiddleClick || q.onRightClick)), []), B = React.useCallback(
2520
2526
  (q) => {
2521
2527
  if (s) {
2522
2528
  if (q && (q.onLeftClick || q.onMiddleClick || q.onRightClick)) {
@@ -2527,201 +2533,201 @@ const FetchAndCacheContext = createContext({
2527
2533
  }
2528
2534
  },
2529
2535
  [s]
2530
- ), B = React.useCallback(() => {
2531
- var se;
2532
- const q = (se = S.current) == null ? void 0 : se._pickingTexture;
2533
- C.current !== (q != null ? q : null) && (C.current = q != null ? q : null, g((ce) => ce + 1));
2534
- }, []), D = React.useCallback((q) => {
2535
- const se = A.current.get(q);
2536
- if (se)
2537
- return se;
2538
- const ce = P.current++;
2539
- return A.current.set(q, ce), ce;
2540
- }, []), W = React.useCallback(() => {
2541
- const q = [], se = /* @__PURE__ */ new Set();
2536
+ ), D = React.useCallback(() => {
2537
+ var ue;
2538
+ const q = (ue = S.current) == null ? void 0 : ue._pickingTexture;
2539
+ C.current !== (q != null ? q : null) && (C.current = q != null ? q : null, g((ne) => ne + 1));
2540
+ }, []), W = React.useCallback((q) => {
2541
+ const ue = A.current.get(q);
2542
+ if (ue)
2543
+ return ue;
2544
+ const ne = P.current++;
2545
+ return A.current.set(q, ne), ne;
2546
+ }, []), ie = React.useCallback(() => {
2547
+ const q = [], ue = /* @__PURE__ */ new Set();
2542
2548
  if (!a)
2543
2549
  return q;
2544
- a.meshes.forEach((j) => {
2545
- if (!j || j.isDisposed())
2550
+ a.meshes.forEach((de) => {
2551
+ if (!de || de.isDisposed())
2546
2552
  return;
2547
- const Ce = F(j);
2548
- if (!(!(L(Ce) && j.isEnabled() && j.isVisible && j.isReady(!0) && j.isPickable) || se.has(j)) && (se.add(j), q.push(j), j.isAnInstance)) {
2549
- const be = j.sourceMesh;
2550
- be && !be.isDisposed() && be.isEnabled() && be.isVisible && be.isReady(!0) && !se.has(be) && (se.add(be), q.push(be));
2553
+ const Te = w(de);
2554
+ if (!(!(L(Te) && de.isEnabled() && de.isVisible && de.isReady(!0) && de.isPickable) || ue.has(de)) && (ue.add(de), q.push(de), de.isAnInstance)) {
2555
+ const be = de.sourceMesh;
2556
+ be && !be.isDisposed() && be.isEnabled() && be.isVisible && be.isReady(!0) && !ue.has(be) && (ue.add(be), q.push(be));
2551
2557
  }
2552
2558
  });
2553
- const ce = y.current.length === q.length && y.current.every((j, Ce) => j === q[Ce]);
2554
- return S.current || (S.current = new GPUPicker()), ce || (S.current.setPickingList(q.length > 0 ? q.slice() : null), y.current = q, B()), q;
2555
- }, [F, L, a, B]), ie = React.useCallback(
2556
- async (q, se) => {
2559
+ const ne = y.current.length === q.length && y.current.every((de, Te) => de === q[Te]);
2560
+ return S.current || (S.current = new GPUPicker()), ne || (S.current.setPickingList(q.length > 0 ? q.slice() : null), y.current = q, D()), q;
2561
+ }, [w, L, a, D]), ee = React.useCallback(
2562
+ async (q, ue) => {
2557
2563
  if (!a)
2558
2564
  return null;
2559
- if (!W().length || !S.current)
2560
- return B(), null;
2561
- B();
2562
- const j = await S.current.pickAsync(q, se, !1);
2563
- return B(), j;
2565
+ if (!ie().length || !S.current)
2566
+ return D(), null;
2567
+ D();
2568
+ const de = await S.current.pickAsync(q, ue, !1);
2569
+ return D(), de;
2564
2570
  },
2565
- [a, W, B]
2571
+ [a, ie, D]
2566
2572
  );
2567
2573
  React.useEffect(() => {
2568
2574
  if (!a)
2569
2575
  return;
2570
2576
  const q = a.onBeforeRenderObservable.add(() => {
2571
- W();
2577
+ ie();
2572
2578
  });
2573
2579
  return () => {
2574
2580
  a.onBeforeRenderObservable.remove(q);
2575
2581
  };
2576
- }, [a, W]);
2577
- const ne = React.useCallback(
2578
- (q, se, ce) => a ? a.pick(se, ce, (j) => j === q, !1, void 0) : null,
2582
+ }, [a, ie]);
2583
+ const H = React.useCallback(
2584
+ (q, ue, ne) => a ? a.pick(ue, ne, (de) => de === q, !1, void 0) : null,
2579
2585
  [a]
2580
- ), U = React.useCallback(() => {
2586
+ ), oe = React.useCallback(() => {
2581
2587
  M.current += 1, E.current.clear();
2582
- }, []), re = React.useCallback((q) => new Proxy({}, {
2583
- get: (se, ce) => {
2584
- const j = q();
2585
- if (!j)
2588
+ }, []), te = React.useCallback((q) => new Proxy({}, {
2589
+ get: (ue, ne) => {
2590
+ const de = q();
2591
+ if (!de)
2586
2592
  return;
2587
- const Ce = j[ce];
2588
- return typeof Ce == "function" ? Ce.bind(j) : Ce;
2593
+ const Te = de[ne];
2594
+ return typeof Te == "function" ? Te.bind(de) : Te;
2589
2595
  },
2590
- set: (se, ce, j) => {
2591
- const Ce = q();
2592
- return Ce ? (Ce[ce] = j, !0) : !1;
2596
+ set: (ue, ne, de) => {
2597
+ const Te = q();
2598
+ return Te ? (Te[ne] = de, !0) : !1;
2593
2599
  },
2594
- has: (se, ce) => {
2595
- const j = q();
2596
- return j ? ce in j : !1;
2600
+ has: (ue, ne) => {
2601
+ const de = q();
2602
+ return de ? ne in de : !1;
2597
2603
  },
2598
2604
  ownKeys: () => {
2599
- const se = q();
2600
- return se ? Reflect.ownKeys(se) : [];
2605
+ const ue = q();
2606
+ return ue ? Reflect.ownKeys(ue) : [];
2601
2607
  },
2602
- getOwnPropertyDescriptor: (se, ce) => {
2603
- const j = q();
2604
- if (j)
2605
- return Object.getOwnPropertyDescriptor(j, ce);
2606
- }
2607
- }), []), te = React.useCallback(
2608
- (q, se, ce) => {
2609
- const j = M.current, Ce = D(q), _e = `${j}:${Ce}:${Math.round(se)}:${Math.round(ce)}`, be = () => {
2610
- var Ie, Re, Ee;
2611
- const Se = E.current.get(_e);
2608
+ getOwnPropertyDescriptor: (ue, ne) => {
2609
+ const de = q();
2610
+ if (de)
2611
+ return Object.getOwnPropertyDescriptor(de, ne);
2612
+ }
2613
+ }), []), Q = React.useCallback(
2614
+ (q, ue, ne) => {
2615
+ const de = M.current, Te = W(q), Ce = `${de}:${Te}:${Math.round(ue)}:${Math.round(ne)}`, be = () => {
2616
+ var ke, Oe, Fe;
2617
+ const Se = E.current.get(Ce);
2612
2618
  if (Se)
2613
2619
  return Se;
2614
- const Te = ne(q, se, ce), Pe = (Ie = Te == null ? void 0 : Te.pickedPoint) != null ? Ie : null, Ae = (Ee = Pe == null ? void 0 : Pe.add((Re = i.origin) != null ? Re : Vector3.Zero())) != null ? Ee : null, Me = { raw: Pe, world: Ae };
2615
- return E.current.set(_e, Me), Me;
2620
+ const Pe = H(q, ue, ne), Re = (ke = Pe == null ? void 0 : Pe.pickedPoint) != null ? ke : null, Me = (Fe = Re == null ? void 0 : Re.add((Oe = i.origin) != null ? Oe : Vector3.Zero())) != null ? Fe : null, Ee = { raw: Re, world: Me };
2621
+ return E.current.set(Ce, Ee), Ee;
2616
2622
  };
2617
2623
  return {
2618
- rawWorldPosition: re(() => be().raw),
2619
- worldPosition: re(() => be().world)
2624
+ rawWorldPosition: te(() => be().raw),
2625
+ worldPosition: te(() => be().world)
2620
2626
  };
2621
2627
  },
2622
- [re, D, ne, i.origin]
2623
- ), Q = React.useCallback(
2624
- (q, se, ce, j, Ce) => {
2625
- var Pe, Ae;
2626
- const _e = F(q);
2627
- if (!_e || !_e.onHover)
2628
+ [te, W, H, i.origin]
2629
+ ), J = React.useCallback(
2630
+ (q, ue, ne, de, Te) => {
2631
+ var Re, Me;
2632
+ const Ce = w(q);
2633
+ if (!Ce || !Ce.onHover)
2628
2634
  return;
2629
- const be = new Vector2(ce.clientX, ce.clientY), Se = se !== HoverType.END && _e.needWorldPosition ? te(q, j, Ce) : null, Te = _e.valueCallback ? _e.valueCallback(
2635
+ const be = new Vector2(ne.clientX, ne.clientY), Se = ue !== HoverType.END && Ce.needWorldPosition ? Q(q, de, Te) : null, Pe = Ce.valueCallback ? Ce.valueCallback(
2630
2636
  be,
2631
- (Pe = Se == null ? void 0 : Se.worldPosition) != null ? Pe : null,
2632
- (Ae = Se == null ? void 0 : Se.rawWorldPosition) != null ? Ae : null
2637
+ (Re = Se == null ? void 0 : Se.worldPosition) != null ? Re : null,
2638
+ (Me = Se == null ? void 0 : Se.rawWorldPosition) != null ? Me : null
2633
2639
  ) : null;
2634
- _e.onHover(
2635
- _e.name,
2640
+ Ce.onHover(
2641
+ Ce.name,
2636
2642
  be,
2637
2643
  Se == null ? void 0 : Se.worldPosition,
2638
- se,
2639
- Te,
2640
- _e.extra
2644
+ ue,
2645
+ Pe,
2646
+ Ce.extra
2641
2647
  );
2642
2648
  },
2643
- [te, F]
2644
- ), J = React.useCallback(
2645
- (q, se) => {
2646
- const ce = q && F(q) && L(F(q)) ? q : null, j = R.current;
2647
- j && j !== ce && Q(j, HoverType.END, se.event, se.x, se.y), ce && Q(
2648
- ce,
2649
- j === ce ? HoverType.CONTINUE : HoverType.START,
2650
- se.event,
2651
- se.x,
2652
- se.y
2653
- ), R.current = ce, w(ce ? F(ce) : null);
2649
+ [Q, w]
2650
+ ), ce = React.useCallback(
2651
+ (q, ue) => {
2652
+ const ne = q && w(q) && L(w(q)) ? q : null, de = R.current;
2653
+ de && de !== ne && J(de, HoverType.END, ue.event, ue.x, ue.y), ne && J(
2654
+ ne,
2655
+ de === ne ? HoverType.CONTINUE : HoverType.START,
2656
+ ue.event,
2657
+ ue.x,
2658
+ ue.y
2659
+ ), R.current = ne, B(ne ? w(ne) : null);
2654
2660
  },
2655
- [F, L, Q, w]
2656
- ), de = React.useCallback(async () => {
2661
+ [w, L, J, B]
2662
+ ), j = React.useCallback(async () => {
2657
2663
  var q;
2658
2664
  if (!N.current) {
2659
2665
  for (N.current = !0; T.current; ) {
2660
- const se = T.current;
2666
+ const ue = T.current;
2661
2667
  if (T.current = null, !a || a.skipPointerMovePicking) {
2662
- J(null, se);
2668
+ ce(null, ue);
2663
2669
  continue;
2664
2670
  }
2665
- const ce = await ie(se.x, se.y), j = (q = ce == null ? void 0 : ce.mesh) != null ? q : null;
2666
- if (U(), a.skipPointerMovePicking) {
2667
- J(null, se);
2671
+ const ne = await ee(ue.x, ue.y), de = (q = ne == null ? void 0 : ne.mesh) != null ? q : null;
2672
+ if (oe(), a.skipPointerMovePicking) {
2673
+ ce(null, ue);
2668
2674
  continue;
2669
2675
  }
2670
- J(j, se);
2676
+ ce(de, ue);
2671
2677
  }
2672
2678
  N.current = !1;
2673
2679
  }
2674
- }, [U, ie, a, J]), ee = React.useCallback(
2675
- async (q, se, ce) => {
2676
- var Pe;
2680
+ }, [oe, ee, a, ce]), G = React.useCallback(
2681
+ async (q, ue, ne) => {
2682
+ var Re;
2677
2683
  if (!a)
2678
2684
  return;
2679
2685
  for (; N.current; )
2680
- await new Promise((Ae) => setTimeout(Ae, 8));
2686
+ await new Promise((Me) => setTimeout(Me, 8));
2681
2687
  if (Date.now() - O.current < 100) {
2682
2688
  O.current = Date.now();
2683
2689
  return;
2684
2690
  }
2685
2691
  O.current = Date.now();
2686
- const j = await ie(se, ce);
2687
- U();
2688
- const Ce = (Pe = j == null ? void 0 : j.mesh) != null ? Pe : null, _e = F(Ce);
2689
- if (console.log(`[Geo3DViewer] 指针拾取 ${!!Ce} 于面 ${Ce}`, _e, j), !Ce || !_e)
2692
+ const de = await ee(ue, ne);
2693
+ oe();
2694
+ const Te = (Re = de == null ? void 0 : de.mesh) != null ? Re : null, Ce = w(Te);
2695
+ if (console.log(`[Geo3DViewer] 指针拾取 ${!!Te} 于面 ${Te}`, Ce, de), !Te || !Ce)
2690
2696
  return;
2691
- const be = new Vector2(q.clientX, q.clientY), Se = te(Ce, se, ce), Te = _e.valueCallback ? _e.valueCallback(
2697
+ const be = new Vector2(q.clientX, q.clientY), Se = Q(Te, ue, ne), Pe = Ce.valueCallback ? Ce.valueCallback(
2692
2698
  be,
2693
2699
  Se.worldPosition,
2694
2700
  Se.rawWorldPosition
2695
2701
  ) : null;
2696
- if (q.button === 0 && _e.onLeftClick) {
2697
- _e.onLeftClick(
2698
- _e.name,
2702
+ if (q.button === 0 && Ce.onLeftClick) {
2703
+ Ce.onLeftClick(
2704
+ Ce.name,
2699
2705
  be,
2700
2706
  Se.worldPosition,
2701
- Te,
2702
- _e.extra
2707
+ Pe,
2708
+ Ce.extra
2703
2709
  );
2704
2710
  return;
2705
2711
  }
2706
- if (q.button === 1 && _e.onMiddleClick) {
2707
- _e.onMiddleClick(
2708
- _e.name,
2712
+ if (q.button === 1 && Ce.onMiddleClick) {
2713
+ Ce.onMiddleClick(
2714
+ Ce.name,
2709
2715
  be,
2710
2716
  Se.worldPosition,
2711
- Te,
2712
- _e.extra
2717
+ Pe,
2718
+ Ce.extra
2713
2719
  );
2714
2720
  return;
2715
2721
  }
2716
- q.button === 2 && _e.onRightClick && _e.onRightClick(
2717
- _e.name,
2722
+ q.button === 2 && Ce.onRightClick && Ce.onRightClick(
2723
+ Ce.name,
2718
2724
  be,
2719
2725
  Se.worldPosition,
2720
- Te,
2721
- _e.extra
2726
+ Pe,
2727
+ Ce.extra
2722
2728
  );
2723
2729
  },
2724
- [U, te, F, ie, a]
2730
+ [oe, Q, w, ee, a]
2725
2731
  );
2726
2732
  React.useEffect(() => {
2727
2733
  if (a)
@@ -2731,38 +2737,47 @@ const FetchAndCacheContext = createContext({
2731
2737
  }, [a]), React.useEffect(() => {
2732
2738
  if (!a)
2733
2739
  return;
2734
- const q = a.onPointerObservable.add((se) => {
2735
- const ce = se.event;
2736
- if (se.type === PointerEventTypes.POINTERMOVE) {
2737
- if (a.skipPointerMovePicking) {
2738
- R.current && J(null, {
2739
- event: ce,
2740
+ const q = 4, ue = a.onPointerObservable.add((ne) => {
2741
+ const de = ne.event;
2742
+ if (ne.type === PointerEventTypes.POINTERDOWN) {
2743
+ F.current.isDown = !0, F.current.pointerId = de.pointerId, F.current.startX = a.pointerX, F.current.startY = a.pointerY, F.current.isDragging = !1;
2744
+ return;
2745
+ }
2746
+ if (ne.type === PointerEventTypes.POINTERMOVE) {
2747
+ if (F.current.isDown && F.current.pointerId === de.pointerId && !F.current.isDragging) {
2748
+ const Te = a.pointerX - F.current.startX, Ce = a.pointerY - F.current.startY;
2749
+ Te * Te + Ce * Ce >= q * q && (F.current.isDragging = !0);
2750
+ }
2751
+ if (a.skipPointerMovePicking || F.current.isDragging) {
2752
+ R.current && ce(null, {
2753
+ event: de,
2740
2754
  x: a.pointerX,
2741
2755
  y: a.pointerY
2742
2756
  });
2743
2757
  return;
2744
2758
  }
2745
2759
  T.current = {
2746
- event: ce,
2760
+ event: de,
2747
2761
  x: a.pointerX,
2748
2762
  y: a.pointerY
2749
- }, de();
2763
+ }, j();
2750
2764
  return;
2751
2765
  }
2752
- if (se.type === PointerEventTypes.POINTERUP) {
2753
- if (a.skipPointerMovePicking)
2766
+ if (ne.type === PointerEventTypes.POINTERUP) {
2767
+ const Te = F.current.isDragging;
2768
+ if (F.current.isDown = !1, F.current.pointerId = -1, F.current.isDragging = !1, a.skipPointerMovePicking || Te)
2754
2769
  return;
2755
- ee(ce, a.pointerX, a.pointerY);
2770
+ G(de, a.pointerX, a.pointerY);
2756
2771
  }
2757
2772
  });
2758
2773
  return () => {
2759
- a.onPointerObservable.remove(q), T.current = null, R.current = null, w(null);
2774
+ a.onPointerObservable.remove(ue), T.current = null, R.current = null, F.current.isDown = !1, F.current.pointerId = -1, F.current.isDragging = !1, B(null);
2760
2775
  };
2761
- }, [ee, de, a, w, J]), React.useEffect(() => () => {
2776
+ }, [G, j, a, B, ce]), React.useEffect(() => () => {
2762
2777
  var q;
2763
2778
  T.current = null, y.current = [], R.current = null, E.current.clear(), (q = S.current) == null || q.dispose(), S.current = null, C.current = null;
2764
2779
  }, []);
2765
- const G = React.useRef(void 0);
2780
+ const xe = React.useRef(void 0);
2766
2781
  return useImperativeHandle(
2767
2782
  t,
2768
2783
  () => a,
@@ -2771,17 +2786,17 @@ const FetchAndCacheContext = createContext({
2771
2786
  WorkspaceMetaContext.Provider,
2772
2787
  {
2773
2788
  value: {
2774
- min: (xe = i.min) != null ? xe : new Vector3(Number.MIN_SAFE_INTEGER, Number.MIN_SAFE_INTEGER, Number.MIN_SAFE_INTEGER),
2775
- max: (fe = i.max) != null ? fe : new Vector3(Number.MAX_SAFE_INTEGER, Number.MAX_SAFE_INTEGER, Number.MAX_SAFE_INTEGER),
2776
- scaleDepth: (V = i.scaleDepth) != null ? V : 1,
2777
- scalePlane: (Y = i.scalePlane) != null ? Y : 1,
2789
+ min: (fe = i.min) != null ? fe : new Vector3(Number.MIN_SAFE_INTEGER, Number.MIN_SAFE_INTEGER, Number.MIN_SAFE_INTEGER),
2790
+ max: (V = i.max) != null ? V : new Vector3(Number.MAX_SAFE_INTEGER, Number.MAX_SAFE_INTEGER, Number.MAX_SAFE_INTEGER),
2791
+ scaleDepth: (Y = i.scaleDepth) != null ? Y : 1,
2792
+ scalePlane: (_e = i.scalePlane) != null ? _e : 1,
2778
2793
  _isDefault: (ye = i._isDefault) != null ? ye : !0,
2779
2794
  origin: Vector3.Zero()
2780
2795
  },
2781
2796
  children: /* @__PURE__ */ jsx(
2782
2797
  ViewerCameraPropsContext.Provider,
2783
2798
  {
2784
- value: { viewCamera: l, setViewCamera: c, cameraRefObject: G },
2799
+ value: { viewCamera: l, setViewCamera: c, cameraRefObject: xe },
2785
2800
  children: /* @__PURE__ */ jsx(FetchAndCacheContext.Provider, { value: o, children: /* @__PURE__ */ jsxs(
2786
2801
  CacheProviderContext.Provider,
2787
2802
  {
@@ -2829,7 +2844,7 @@ const useCacheProvider = ({
2829
2844
  timeout: 2e4
2830
2845
  })).data;
2831
2846
  } catch (F) {
2832
- O = F, E -= 1, E >= 0 && await new Promise((L) => setTimeout(L, 300));
2847
+ O = F, E -= 1, E >= 0 && await new Promise((w) => setTimeout(w, 300));
2833
2848
  }
2834
2849
  throw O;
2835
2850
  }, []), C = useCallback(
@@ -2848,70 +2863,70 @@ const useCacheProvider = ({
2848
2863
  async (P, E, O) => {
2849
2864
  const F = x.current.get(P);
2850
2865
  if (F) {
2851
- const w = await F;
2852
- w && u(w);
2866
+ const L = await F;
2867
+ L && u(L);
2853
2868
  return;
2854
2869
  }
2855
- const L = (async () => {
2870
+ const w = (async () => {
2856
2871
  v.current.add(P), _.current = _.current + 1;
2857
2872
  try {
2858
- const w = await r(P), B = [];
2859
- w !== P && B.push(P), E === 0 ? (B.push(w.split("?")[0]), B.push(w)) : E === 1 && B.push(w);
2860
- const D = await g(w), W = {};
2873
+ const L = await r(P), B = [];
2874
+ L !== P && B.push(P), E === 0 ? (B.push(L.split("?")[0]), B.push(L)) : E === 1 && B.push(L);
2875
+ const D = await g(L), W = {};
2861
2876
  let ie;
2862
2877
  if (O === 0)
2863
2878
  ie = { buffer: D };
2864
2879
  else if (O === 1) {
2865
- const ne = URL.createObjectURL(new Blob([D])), U = new Texture(
2866
- ne,
2880
+ const ee = URL.createObjectURL(new Blob([D])), H = new Texture(
2881
+ ee,
2867
2882
  i,
2868
2883
  !0,
2869
2884
  !1,
2870
2885
  void 0,
2871
2886
  () => {
2872
- URL.revokeObjectURL(ne);
2887
+ URL.revokeObjectURL(ee);
2873
2888
  },
2874
2889
  () => {
2875
- URL.revokeObjectURL(ne);
2890
+ URL.revokeObjectURL(ee);
2876
2891
  }
2877
2892
  );
2878
- ie = { buffer: D, texture: U };
2893
+ ie = { buffer: D, texture: H };
2879
2894
  } else if (O === 2) {
2880
2895
  if (!i)
2881
2896
  throw new Error("Scene not ready for model loading");
2882
- const ne = URL.createObjectURL(new Blob([D]));
2897
+ const ee = URL.createObjectURL(new Blob([D]));
2883
2898
  try {
2884
- let U = w.split("?")[0];
2885
- U = (U == null ? void 0 : U.split(".").pop()) || "";
2886
- const re = await LoadAssetContainerAsync(ne, i, {
2887
- pluginExtension: `.${U}`
2899
+ let H = L.split("?")[0];
2900
+ H = (H == null ? void 0 : H.split(".").pop()) || "";
2901
+ const oe = await LoadAssetContainerAsync(ee, i, {
2902
+ pluginExtension: `.${H}`
2888
2903
  });
2889
- ie = { buffer: D, assets: re };
2904
+ ie = { buffer: D, assets: oe };
2890
2905
  } finally {
2891
- URL.revokeObjectURL(ne);
2906
+ URL.revokeObjectURL(ee);
2892
2907
  }
2893
2908
  } else
2894
2909
  ie = {
2895
2910
  buffer: D,
2896
2911
  json: JSON.parse(jsonDecoder.decode(D))
2897
2912
  };
2898
- return B.forEach((ne) => {
2899
- W[ne] = ie;
2900
- }), h((ne) => {
2901
- let U = !1;
2902
- const re = { ...ne };
2913
+ return B.forEach((ee) => {
2914
+ W[ee] = ie;
2915
+ }), h((ee) => {
2916
+ let H = !1;
2917
+ const oe = { ...ee };
2903
2918
  return B.forEach((te) => {
2904
- re[te] || (re[te] = ie, U = !0);
2905
- }), U ? re : ne;
2919
+ oe[te] || (oe[te] = ie, H = !0);
2920
+ }), H ? oe : ee;
2906
2921
  }), m.current = m.current + 1, u(ie), ie;
2907
- } catch (w) {
2908
- console.error(w), m.current = m.current + 1;
2922
+ } catch (L) {
2923
+ console.error(L), m.current = m.current + 1;
2909
2924
  return;
2910
2925
  } finally {
2911
2926
  v.current.delete(P), x.current.delete(P);
2912
2927
  }
2913
2928
  })();
2914
- x.current.set(P, L), await L;
2929
+ x.current.set(P, w), await w;
2915
2930
  },
2916
2931
  [
2917
2932
  g,
@@ -3003,7 +3018,7 @@ const useCacheProvider = ({
3003
3018
  (y) => {
3004
3019
  r === LoadingScreen.ENGINE_DEFAULT && t && (y ? (_.current && (clearTimeout(_.current), _.current = null), console.log("[Geo3DViewer] 显示加载界面"), t.displayLoadingUI()) : _.current = setTimeout(() => {
3005
3020
  console.log("[Geo3DViewer] 隐藏加载界面"), t.hideLoadingUI();
3006
- }, 1e3));
3021
+ }, 100));
3007
3022
  },
3008
3023
  [r, t]
3009
3024
  ), g = useCallback(() => {
@@ -3047,15 +3062,15 @@ const useCacheProvider = ({
3047
3062
  class SimpleAnimationController {
3048
3063
  constructor(t) {
3049
3064
  // 数据帧
3050
- ue(this, "_nodes", []);
3051
- ue(this, "_speed", 1);
3052
- ue(this, "_loop", !1);
3053
- ue(this, "_length", 0);
3054
- ue(this, "_name", "");
3055
- ue(this, "_stop", !1);
3056
- ue(this, "_handler");
3057
- ue(this, "_normalizedTime", 0);
3058
- ue(this, "_currentTime", 0);
3065
+ le(this, "_nodes", []);
3066
+ le(this, "_speed", 1);
3067
+ le(this, "_loop", !1);
3068
+ le(this, "_length", 0);
3069
+ le(this, "_name", "");
3070
+ le(this, "_stop", !1);
3071
+ le(this, "_handler");
3072
+ le(this, "_normalizedTime", 0);
3073
+ le(this, "_currentTime", 0);
3059
3074
  this._name = t;
3060
3075
  }
3061
3076
  set speed(t) {
@@ -5359,9 +5374,9 @@ function isSet$d(e) {
5359
5374
  }
5360
5375
  class AnimationCurve {
5361
5376
  constructor() {
5362
- ue(this, "_keys", []);
5363
- ue(this, "getLastKey", () => this._keys[this._keys.length - 1]);
5364
- ue(this, "getFirstKey", () => this._keys[0]);
5377
+ le(this, "_keys", []);
5378
+ le(this, "getLastKey", () => this._keys[this._keys.length - 1]);
5379
+ le(this, "getFirstKey", () => this._keys[0]);
5365
5380
  }
5366
5381
  get keys() {
5367
5382
  return this._keys;
@@ -5395,14 +5410,14 @@ class AnimationCurve {
5395
5410
  }
5396
5411
  class AnimationKeyFrame {
5397
5412
  constructor(t, n) {
5398
- ue(this, "time");
5399
- ue(this, "value");
5413
+ le(this, "time");
5414
+ le(this, "value");
5400
5415
  this.time = t, this.value = n;
5401
5416
  }
5402
5417
  }
5403
5418
  class AnimationNode {
5404
5419
  constructor(t) {
5405
- ue(this, "_curves", []);
5420
+ le(this, "_curves", []);
5406
5421
  this._curves = t;
5407
5422
  }
5408
5423
  get curves() {
@@ -5417,11 +5432,11 @@ class AnimationNode {
5417
5432
  class AnimationRoadWayNearNode extends AnimationNode {
5418
5433
  constructor() {
5419
5434
  super(...arguments);
5420
- ue(this, "_name", "");
5421
- ue(this, "_url", "");
5422
- ue(this, "_start");
5423
- ue(this, "_end");
5424
- ue(this, "_current");
5435
+ le(this, "_name", "");
5436
+ le(this, "_url", "");
5437
+ le(this, "_start");
5438
+ le(this, "_end");
5439
+ le(this, "_current");
5425
5440
  }
5426
5441
  set name(n) {
5427
5442
  this._name = n;
@@ -5478,14 +5493,14 @@ class AnimationRoadWayNearNode extends AnimationNode {
5478
5493
  class AnimationRoadWayNode extends AnimationNode {
5479
5494
  constructor() {
5480
5495
  super(...arguments);
5481
- ue(this, "_range", []);
5482
- ue(this, "_percent", []);
5483
- ue(this, "_start");
5484
- ue(this, "_end");
5485
- ue(this, "_name", "");
5486
- ue(this, "_meshs");
5487
- ue(this, "_colors", []);
5488
- ue(this, "_type", "run");
5496
+ le(this, "_range", []);
5497
+ le(this, "_percent", []);
5498
+ le(this, "_start");
5499
+ le(this, "_end");
5500
+ le(this, "_name", "");
5501
+ le(this, "_meshs");
5502
+ le(this, "_colors", []);
5503
+ le(this, "_type", "run");
5489
5504
  }
5490
5505
  set percent(n) {
5491
5506
  this._percent = n;
@@ -5558,16 +5573,16 @@ class AnimationRoadWayNode extends AnimationNode {
5558
5573
  class AnimationRoadWayWaterNode extends AnimationNode {
5559
5574
  constructor() {
5560
5575
  super(...arguments);
5561
- ue(this, "_range", []);
5562
- ue(this, "_percent", []);
5563
- ue(this, "_colorPercent", []);
5564
- ue(this, "_start");
5565
- ue(this, "_end");
5566
- ue(this, "_name", "");
5567
- ue(this, "_meshs");
5568
- ue(this, "_colors", []);
5569
- ue(this, "_type", "run");
5570
- ue(this, "_percentLength", 2);
5576
+ le(this, "_range", []);
5577
+ le(this, "_percent", []);
5578
+ le(this, "_colorPercent", []);
5579
+ le(this, "_start");
5580
+ le(this, "_end");
5581
+ le(this, "_name", "");
5582
+ le(this, "_meshs");
5583
+ le(this, "_colors", []);
5584
+ le(this, "_type", "run");
5585
+ le(this, "_percentLength", 2);
5571
5586
  }
5572
5587
  // percent 的长度
5573
5588
  set percent(n) {
@@ -5668,12 +5683,12 @@ function gaussCoef(e) {
5668
5683
  return a0 = r, a1 = r * (t - 1) * n, a2 = r * (t + 1) * n, a3 = -r * i, b1 = 2 * n, b2 = -i, left_corner = (a0 + a1) / (1 - b1 - b2), right_corner = (a2 + a3) / (1 - b1 - b2), new Float32Array([a0, a1, a2, a3, b1, b2, left_corner, right_corner]);
5669
5684
  }
5670
5685
  function convolveRGBA(e, t, n, i, r, o) {
5671
- var a, s, l, c, f, u, d, h, m, _, v, x, g, C, S, N, R, y, T, M, A, P, E, O, F, L, w, B, D, W;
5686
+ var a, s, l, c, f, u, d, h, m, _, v, x, g, C, S, N, R, y, T, M, A, P, E, O, F, w, L, B, D, W;
5672
5687
  for (F = 0; F < o; F++) {
5673
- for (P = F * r, E = F, O = 0, a = e[P], s = a & 255, l = a >> 8 & 255, c = a >> 16 & 255, f = a >> 24 & 255, y = s * i[6], T = l * i[6], M = c * i[6], A = f * i[6], C = y, S = T, N = M, R = A, w = i[0], B = i[1], D = i[4], W = i[5], L = 0; L < r; L++)
5674
- a = e[P], u = a & 255, d = a >> 8 & 255, h = a >> 16 & 255, m = a >> 24 & 255, _ = u * w + s * B + C * D + y * W, v = d * w + l * B + S * D + T * W, x = h * w + c * B + N * D + M * W, g = m * w + f * B + R * D + A * W, y = C, T = S, M = N, A = R, C = _, S = v, N = x, R = g, s = u, l = d, c = h, f = m, n[O] = C, n[O + 1] = S, n[O + 2] = N, n[O + 3] = R, O += 4, P++;
5675
- for (P--, O -= 4, E += o * (r - 1), a = e[P], s = a & 255, l = a >> 8 & 255, c = a >> 16 & 255, f = a >> 24 & 255, y = s * i[7], T = l * i[7], M = c * i[7], A = f * i[7], C = y, S = T, N = M, R = A, u = s, d = l, h = c, m = f, w = i[2], B = i[3], L = r - 1; L >= 0; L--)
5676
- _ = u * w + s * B + C * D + y * W, v = d * w + l * B + S * D + T * W, x = h * w + c * B + N * D + M * W, g = m * w + f * B + R * D + A * W, y = C, T = S, M = N, A = R, C = _, S = v, N = x, R = g, s = u, l = d, c = h, f = m, a = e[P], u = a & 255, d = a >> 8 & 255, h = a >> 16 & 255, m = a >> 24 & 255, a = (n[O] + C << 0) + (n[O + 1] + S << 8) + (n[O + 2] + N << 16) + (n[O + 3] + R << 24), t[E] = a, P--, O -= 4, E -= o;
5688
+ for (P = F * r, E = F, O = 0, a = e[P], s = a & 255, l = a >> 8 & 255, c = a >> 16 & 255, f = a >> 24 & 255, y = s * i[6], T = l * i[6], M = c * i[6], A = f * i[6], C = y, S = T, N = M, R = A, L = i[0], B = i[1], D = i[4], W = i[5], w = 0; w < r; w++)
5689
+ a = e[P], u = a & 255, d = a >> 8 & 255, h = a >> 16 & 255, m = a >> 24 & 255, _ = u * L + s * B + C * D + y * W, v = d * L + l * B + S * D + T * W, x = h * L + c * B + N * D + M * W, g = m * L + f * B + R * D + A * W, y = C, T = S, M = N, A = R, C = _, S = v, N = x, R = g, s = u, l = d, c = h, f = m, n[O] = C, n[O + 1] = S, n[O + 2] = N, n[O + 3] = R, O += 4, P++;
5690
+ for (P--, O -= 4, E += o * (r - 1), a = e[P], s = a & 255, l = a >> 8 & 255, c = a >> 16 & 255, f = a >> 24 & 255, y = s * i[7], T = l * i[7], M = c * i[7], A = f * i[7], C = y, S = T, N = M, R = A, u = s, d = l, h = c, m = f, L = i[2], B = i[3], w = r - 1; w >= 0; w--)
5691
+ _ = u * L + s * B + C * D + y * W, v = d * L + l * B + S * D + T * W, x = h * L + c * B + N * D + M * W, g = m * L + f * B + R * D + A * W, y = C, T = S, M = N, A = R, C = _, S = v, N = x, R = g, s = u, l = d, c = h, f = m, a = e[P], u = a & 255, d = a >> 8 & 255, h = a >> 16 & 255, m = a >> 24 & 255, a = (n[O] + C << 0) + (n[O + 1] + S << 8) + (n[O + 2] + N << 16) + (n[O + 3] + R << 24), t[E] = a, P--, O -= 4, E -= o;
5677
5692
  }
5678
5693
  }
5679
5694
  function blurRGBA(e, t, n, i) {
@@ -5687,25 +5702,25 @@ const glur$1 = /* @__PURE__ */ getDefaultExportFromCjs(glur), FORCE_WATER_PULL_D
5687
5702
  class AnimationWaterEffectNode extends AnimationNode {
5688
5703
  constructor() {
5689
5704
  super(...arguments);
5690
- ue(this, "_range", []);
5691
- ue(this, "_percent", []);
5692
- ue(this, "_colorPercent", []);
5693
- ue(this, "_start");
5694
- ue(this, "_end");
5695
- ue(this, "_name", "");
5696
- ue(this, "_width", 0);
5697
- ue(this, "_height", 0);
5698
- ue(this, "_waterHeight", 0);
5699
- ue(this, "_waterLength", 0);
5700
- ue(this, "_heightMapRaw", new Uint8Array([0, 0, 0, 0]));
5701
- ue(this, "_lastHeightMapRaw", new Uint8Array([0, 0, 0, 0]));
5702
- ue(this, "_bottomShape", []);
5703
- ue(this, "_percentLength", 2);
5705
+ le(this, "_range", []);
5706
+ le(this, "_percent", []);
5707
+ le(this, "_colorPercent", []);
5708
+ le(this, "_start");
5709
+ le(this, "_end");
5710
+ le(this, "_name", "");
5711
+ le(this, "_width", 0);
5712
+ le(this, "_height", 0);
5713
+ le(this, "_waterHeight", 0);
5714
+ le(this, "_waterLength", 0);
5715
+ le(this, "_heightMapRaw", new Uint8Array([0, 0, 0, 0]));
5716
+ le(this, "_lastHeightMapRaw", new Uint8Array([0, 0, 0, 0]));
5717
+ le(this, "_bottomShape", []);
5718
+ le(this, "_percentLength", 2);
5704
5719
  // percent 的长度
5705
- ue(this, "_time", 0);
5706
- ue(this, "_glurMap", new Uint8Array([0, 0, 0, 0]));
5707
- ue(this, "_startOutWidth", 0);
5708
- ue(this, "_endOutWidth", 0);
5720
+ le(this, "_time", 0);
5721
+ le(this, "_glurMap", new Uint8Array([0, 0, 0, 0]));
5722
+ le(this, "_startOutWidth", 0);
5723
+ le(this, "_endOutWidth", 0);
5709
5724
  }
5710
5725
  set start(n) {
5711
5726
  this._start = n;
@@ -6523,15 +6538,15 @@ void main(void) {
6523
6538
  A.beginPath();
6524
6539
  const E = P.offset ? P.offset : new Vector2(0, 0), O = 1 - P.points[0].x + E.x, F = 1 - P.points[0].y + E.y;
6525
6540
  A.moveTo(O * y, F * T);
6526
- for (let L = 1; L < P.points.length; L++) {
6527
- const w = P.offset ? P.offset : new Vector2(0, 0), B = 1 - P.points[L].x + w.x, D = 1 - P.points[L].y + w.y;
6541
+ for (let w = 1; w < P.points.length; w++) {
6542
+ const L = P.offset ? P.offset : new Vector2(0, 0), B = 1 - P.points[w].x + L.x, D = 1 - P.points[w].y + L.y;
6528
6543
  A.lineTo(B * y, D * T);
6529
6544
  }
6530
6545
  A.strokeStyle = `rgb(${P.color.r * 255}, ${P.color.g * 255}, ${P.color.b * 255})`, y * T > 2048 * 2048 ? A.lineWidth = P.width / M : A.lineWidth = P.width, A.stroke();
6531
6546
  }), d.forEach((P) => {
6532
- var L, w;
6547
+ var w, L;
6533
6548
  A.font = `${P.fontSize}px Arial`;
6534
- const E = (L = P.color) != null ? L : Color3.White(), O = P.offset ? P.offset : new Vector2(0, 0), F = (w = P.rotation) != null ? w : 0;
6549
+ const E = (w = P.color) != null ? w : Color3.White(), O = P.offset ? P.offset : new Vector2(0, 0), F = (L = P.rotation) != null ? L : 0;
6535
6550
  if (A.save(), A.translate((1 - P.position.x + O.x) * y, (1 - P.position.y + O.y) * T), A.rotate(F), P.clearArea) {
6536
6551
  const B = A.measureText(P.text);
6537
6552
  A.clearRect(
@@ -12816,8 +12831,8 @@ const RepeatedTextureMaterial = (e) => {
12816
12831
  if (O.points.length < 2)
12817
12832
  return;
12818
12833
  E.beginPath();
12819
- const F = O.offset ? O.offset : new Vector2(0, 0), L = 1 - O.points[0].x + F.x, w = 1 - O.points[0].y + F.y;
12820
- E.moveTo(L * M, w * A);
12834
+ const F = O.offset ? O.offset : new Vector2(0, 0), w = 1 - O.points[0].x + F.x, L = 1 - O.points[0].y + F.y;
12835
+ E.moveTo(w * M, L * A);
12821
12836
  for (let B = 1; B < O.points.length; B++) {
12822
12837
  const D = O.offset ? O.offset : new Vector2(0, 0), W = 1 - O.points[B].x + D.x, ie = 1 - O.points[B].y + D.y;
12823
12838
  E.lineTo(W * M, ie * A);
@@ -12826,8 +12841,8 @@ const RepeatedTextureMaterial = (e) => {
12826
12841
  }), S.forEach((O) => {
12827
12842
  var B, D;
12828
12843
  E.font = `${O.fontSize}px Arial`;
12829
- const F = (B = O.color) != null ? B : Color3.White(), L = O.offset ? O.offset : new Vector2(0, 0), w = (D = O.rotation) != null ? D : 0;
12830
- if (E.save(), E.translate((1 - O.position.x + L.x) * M, (1 - O.position.y + L.y) * A), E.rotate(w), O.clearArea) {
12844
+ const F = (B = O.color) != null ? B : Color3.White(), w = O.offset ? O.offset : new Vector2(0, 0), L = (D = O.rotation) != null ? D : 0;
12845
+ if (E.save(), E.translate((1 - O.position.x + w.x) * M, (1 - O.position.y + w.y) * A), E.rotate(L), O.clearArea) {
12831
12846
  const W = E.measureText(O.text);
12832
12847
  E.clearRect(
12833
12848
  -W.width * 0.15,
@@ -12959,7 +12974,7 @@ const RepeatedTextureMaterial = (e) => {
12959
12974
  }
12960
12975
  }, [v, g, x, C]), React.useEffect(() => {
12961
12976
  t && C && o((y) => {
12962
- var L, w;
12977
+ var w, L;
12963
12978
  y && y.dispose();
12964
12979
  let T = (C.maximum.x - C.minimum.x) / x, M = (C.maximum.z - C.minimum.z) / x, A = 0;
12965
12980
  if (T < M) {
@@ -12975,7 +12990,7 @@ const RepeatedTextureMaterial = (e) => {
12975
12990
  !1
12976
12991
  );
12977
12992
  E.clear(), console.log("[Geo3DViewer] 设置动态划线 ", C, T, M, x);
12978
- const O = (L = n.current) == null ? void 0 : L.getBlockByName("angle"), F = (w = n.current) == null ? void 0 : w.getBlockByName(
12993
+ const O = (w = n.current) == null ? void 0 : w.getBlockByName("angle"), F = (L = n.current) == null ? void 0 : L.getBlockByName(
12979
12994
  "OverlayTexture"
12980
12995
  );
12981
12996
  return O && (O.value = A * (Math.PI / 2)), F && (F.texture = E), E;
@@ -12997,18 +13012,18 @@ const RepeatedTextureMaterial = (e) => {
12997
13012
  if (E.points.length < 2)
12998
13013
  return;
12999
13014
  P.beginPath();
13000
- const O = E.offset ? E.offset : new Vector2(0, 0), F = 1 - E.points[0].x + O.x, L = 1 - E.points[0].y + O.y;
13001
- P.moveTo(F * T, L * M);
13002
- for (let w = 1; w < E.points.length; w++) {
13003
- const B = E.offset ? E.offset : new Vector2(0, 0), D = 1 - E.points[w].x + B.x, W = 1 - E.points[w].y + B.y;
13015
+ const O = E.offset ? E.offset : new Vector2(0, 0), F = 1 - E.points[0].x + O.x, w = 1 - E.points[0].y + O.y;
13016
+ P.moveTo(F * T, w * M);
13017
+ for (let L = 1; L < E.points.length; L++) {
13018
+ const B = E.offset ? E.offset : new Vector2(0, 0), D = 1 - E.points[L].x + B.x, W = 1 - E.points[L].y + B.y;
13004
13019
  P.lineTo(D * T, W * M);
13005
13020
  }
13006
13021
  P.strokeStyle = `rgb(${E.color.r * 255}, ${E.color.g * 255}, ${E.color.b * 255})`, T * M > 2048 * 2048 ? P.lineWidth = E.width / A : P.lineWidth = E.width, P.stroke();
13007
13022
  }), N.forEach((E) => {
13008
- var w, B;
13023
+ var L, B;
13009
13024
  P.font = `${E.fontSize}px Arial`;
13010
- const O = (w = E.color) != null ? w : Color3.White(), F = E.offset ? E.offset : new Vector2(0, 0), L = (B = E.rotation) != null ? B : 0;
13011
- if (P.save(), P.translate((1 - E.position.x + F.x) * T, (1 - E.position.y + F.y) * M), P.rotate(L), E.clearArea) {
13025
+ const O = (L = E.color) != null ? L : Color3.White(), F = E.offset ? E.offset : new Vector2(0, 0), w = (B = E.rotation) != null ? B : 0;
13026
+ if (P.save(), P.translate((1 - E.position.x + F.x) * T, (1 - E.position.y + F.y) * M), P.rotate(w), E.clearArea) {
13012
13027
  const D = P.measureText(E.text);
13013
13028
  P.clearRect(
13014
13029
  -D.width * 0.15,
@@ -13060,19 +13075,19 @@ const RepeatedTextureMaterial = (e) => {
13060
13075
  scaleDepth: E = 1,
13061
13076
  scalePlane: O = 1,
13062
13077
  lines: F = [],
13063
- text: L = [],
13064
- disableDepthWrite: w
13078
+ text: w = [],
13079
+ disableDepthWrite: L
13065
13080
  } = e;
13066
13081
  return React.useEffect(() => {
13067
13082
  const B = (D, W, ie) => {
13068
13083
  if (S) {
13069
- const ne = S.maximumWorld.multiply(W), U = S.minimumWorld.multiply(W), re = S.centerWorld.multiply(W), te = Math.max(ne.x, ne.y, ne.z), Q = Math.max(U.x, U.y, U.z), J = Math.max(re.x, re.y, re.z), de = Math.max(Math.abs(W.x), Math.abs(W.z));
13084
+ const ee = S.maximumWorld.multiply(W), H = S.minimumWorld.multiply(W), oe = S.centerWorld.multiply(W), te = Math.max(ee.x, ee.y, ee.z), Q = Math.max(H.x, H.y, H.z), J = Math.max(oe.x, oe.y, oe.z), ce = Math.max(Math.abs(W.x), Math.abs(W.z));
13070
13085
  D(
13071
13086
  new Plane(
13072
13087
  W.x,
13073
13088
  W.y,
13074
13089
  W.z,
13075
- ((te - Q) * (1 - ie - 0.5) * de + J) * -1
13090
+ ((te - Q) * (1 - ie - 0.5) * ce + J) * -1
13076
13091
  )
13077
13092
  );
13078
13093
  } else
@@ -13092,8 +13107,8 @@ const RepeatedTextureMaterial = (e) => {
13092
13107
  const B = i.current;
13093
13108
  B && (B.clipPlane = r, B.clipPlane2 = a, B.clipPlane3 = l, B.clipPlane4 = f, B.clipPlane5 = d, B.clipPlane6 = m);
13094
13109
  }, [r, a, l, f, d, m]), React.useEffect(() => {
13095
- var B, D, W, ie, ne;
13096
- i.current && t && (i.current.setFloat("alpha1", R.alpha1), i.current.setFloat("alpha2", (B = R.alpha2) != null ? B : 1), i.current.setFloat("alpha3", (D = R.alpha3) != null ? D : 1), i.current.setFloat("alpha4", (W = R.alpha4) != null ? W : 1), i.current.setFloat("alpha5", (ie = R.alpha5) != null ? ie : 1), i.current.setFloat("alpha6", (ne = R.alpha6) != null ? ne : 1));
13110
+ var B, D, W, ie, ee;
13111
+ i.current && t && (i.current.setFloat("alpha1", R.alpha1), i.current.setFloat("alpha2", (B = R.alpha2) != null ? B : 1), i.current.setFloat("alpha3", (D = R.alpha3) != null ? D : 1), i.current.setFloat("alpha4", (W = R.alpha4) != null ? W : 1), i.current.setFloat("alpha5", (ie = R.alpha5) != null ? ie : 1), i.current.setFloat("alpha6", (ee = R.alpha6) != null ? ee : 1));
13097
13112
  }, [t, R]), React.useEffect(() => {
13098
13113
  if (N) {
13099
13114
  const B = i.current;
@@ -13125,22 +13140,22 @@ const RepeatedTextureMaterial = (e) => {
13125
13140
  B.setFloat("contourLineStartHeight", 0), B.setColor3("contourLineColor", new Color3(0, 0, 0)), B.setFloat("contourLineWidth", 0), B.setFloat("contourLineStep", 0), console.log("[Geo3DViewer] 等高线设置 关闭");
13126
13141
  }, [P, E, O, S]), React.useEffect(() => {
13127
13142
  t && S && x((B) => {
13128
- var re, te, Q, J;
13143
+ var oe, te, Q, J;
13129
13144
  B && B.dispose();
13130
13145
  let D = (S.maximum.x - S.minimum.x) / O, W = (S.maximum.z - S.minimum.z) / O, ie = 0;
13131
13146
  if (D < W) {
13132
- const de = D;
13133
- D = W, W = de, ie = 1;
13147
+ const ce = D;
13148
+ D = W, W = ce, ie = 1;
13134
13149
  }
13135
- const ne = D / W;
13136
- D * W > 2048 * 2048 && (D = 2048, W = 2048 / ne);
13137
- const U = new DynamicTexture(
13150
+ const ee = D / W;
13151
+ D * W > 2048 * 2048 && (D = 2048, W = 2048 / ee);
13152
+ const H = new DynamicTexture(
13138
13153
  "dynamic-texture",
13139
13154
  { width: D, height: W },
13140
13155
  t,
13141
13156
  !1
13142
13157
  );
13143
- return U.clear(), console.log("[Geo3DViewer] 设置动态划线 ", S, D, W, O), (re = i.current) == null || re.setVector3("oMin", S.minimum), (te = i.current) == null || te.setVector3("oMax", S.maximum), (Q = i.current) == null || Q.setFloat("textureOverlayRotate", ie), (J = i.current) == null || J.setTexture("textureOverlaySampler", U), U;
13158
+ return H.clear(), console.log("[Geo3DViewer] 设置动态划线 ", S, D, W, O), (oe = i.current) == null || oe.setVector3("oMin", S.minimum), (te = i.current) == null || te.setVector3("oMax", S.maximum), (Q = i.current) == null || Q.setFloat("textureOverlayRotate", ie), (J = i.current) == null || J.setTexture("textureOverlaySampler", H), H;
13144
13159
  });
13145
13160
  }, [S, O, t]), React.useEffect(() => {
13146
13161
  var B;
@@ -13149,51 +13164,51 @@ const RepeatedTextureMaterial = (e) => {
13149
13164
  v.clear();
13150
13165
  let D = (S.maximum.x - S.minimum.x) / O, W = (S.maximum.z - S.minimum.z) / O;
13151
13166
  if (D < W) {
13152
- const U = D;
13153
- D = W, W = U;
13167
+ const H = D;
13168
+ D = W, W = H;
13154
13169
  }
13155
13170
  const ie = D / W;
13156
13171
  D * W > 2048 * 2048 && (D = 2048, W = 2048 / ie);
13157
- const ne = v.getContext();
13158
- F.forEach((U) => {
13159
- if (U.points.length < 2)
13172
+ const ee = v.getContext();
13173
+ F.forEach((H) => {
13174
+ if (H.points.length < 2)
13160
13175
  return;
13161
- ne.beginPath();
13162
- const re = U.offset ? U.offset : new Vector2(0, 0), te = 1 - U.points[0].x + re.x, Q = 1 - U.points[0].y + re.y;
13163
- ne.moveTo(te * D, Q * W);
13164
- for (let J = 1; J < U.points.length; J++) {
13165
- const de = U.offset ? U.offset : new Vector2(0, 0), ee = 1 - U.points[J].x + de.x, G = 1 - U.points[J].y + de.y;
13166
- ne.lineTo(ee * D, G * W);
13176
+ ee.beginPath();
13177
+ const oe = H.offset ? H.offset : new Vector2(0, 0), te = 1 - H.points[0].x + oe.x, Q = 1 - H.points[0].y + oe.y;
13178
+ ee.moveTo(te * D, Q * W);
13179
+ for (let J = 1; J < H.points.length; J++) {
13180
+ const ce = H.offset ? H.offset : new Vector2(0, 0), j = 1 - H.points[J].x + ce.x, G = 1 - H.points[J].y + ce.y;
13181
+ ee.lineTo(j * D, G * W);
13167
13182
  }
13168
- ne.strokeStyle = `rgb(${U.color.r * 255}, ${U.color.g * 255}, ${U.color.b * 255})`, D * W > 2048 * 2048 ? ne.lineWidth = U.width / ie : ne.lineWidth = U.width, ne.stroke();
13169
- }), L.forEach((U) => {
13170
- var J, de;
13171
- ne.font = `${U.fontSize}px Arial`;
13172
- const re = (J = U.color) != null ? J : Color3.White(), te = U.offset ? U.offset : new Vector2(0, 0), Q = (de = U.rotation) != null ? de : 0;
13173
- if (ne.save(), ne.translate((1 - U.position.x + te.x) * D, (1 - U.position.y + te.y) * W), ne.rotate(Q), U.clearArea) {
13174
- const ee = ne.measureText(U.text);
13175
- ne.clearRect(
13176
- -ee.width * 0.15,
13177
- 0.5 * U.fontSize * (1 - 0.3),
13178
- ee.width * 1.3,
13179
- -U.fontSize * 1.3
13183
+ ee.strokeStyle = `rgb(${H.color.r * 255}, ${H.color.g * 255}, ${H.color.b * 255})`, D * W > 2048 * 2048 ? ee.lineWidth = H.width / ie : ee.lineWidth = H.width, ee.stroke();
13184
+ }), w.forEach((H) => {
13185
+ var J, ce;
13186
+ ee.font = `${H.fontSize}px Arial`;
13187
+ const oe = (J = H.color) != null ? J : Color3.White(), te = H.offset ? H.offset : new Vector2(0, 0), Q = (ce = H.rotation) != null ? ce : 0;
13188
+ if (ee.save(), ee.translate((1 - H.position.x + te.x) * D, (1 - H.position.y + te.y) * W), ee.rotate(Q), H.clearArea) {
13189
+ const j = ee.measureText(H.text);
13190
+ ee.clearRect(
13191
+ -j.width * 0.15,
13192
+ 0.5 * H.fontSize * (1 - 0.3),
13193
+ j.width * 1.3,
13194
+ -H.fontSize * 1.3
13180
13195
  );
13181
13196
  }
13182
- if (U.background) {
13183
- ne.fillStyle = `rgba(${U.background.r * 255}, ${U.background.g * 255}, ${U.background.b * 255})`;
13184
- const ee = ne.measureText(U.text);
13185
- ne.fillRect(
13186
- -ee.width * 0.05,
13187
- 0.5 * (U.fontSize * (0.5 - 0.1)),
13188
- ee.width * 1.1,
13189
- -U.fontSize * 1.1
13197
+ if (H.background) {
13198
+ ee.fillStyle = `rgba(${H.background.r * 255}, ${H.background.g * 255}, ${H.background.b * 255})`;
13199
+ const j = ee.measureText(H.text);
13200
+ ee.fillRect(
13201
+ -j.width * 0.05,
13202
+ 0.5 * (H.fontSize * (0.5 - 0.1)),
13203
+ j.width * 1.1,
13204
+ -H.fontSize * 1.1
13190
13205
  );
13191
13206
  }
13192
- ne.fillStyle = `rgb(${re.r * 255}, ${re.g * 255}, ${re.b * 255})`, ne.fillText(U.text, 0, 0), ne.restore();
13207
+ ee.fillStyle = `rgb(${oe.r * 255}, ${oe.g * 255}, ${oe.b * 255})`, ee.fillText(H.text, 0, 0), ee.restore();
13193
13208
  }), v.update();
13194
13209
  } else
13195
13210
  console.log("[Geo3DViewer] 动态纹理未准备好,正准备下一次绘制");
13196
- }, [F, v, S, O, L]), /* @__PURE__ */ jsx(
13211
+ }, [F, v, S, O, w]), /* @__PURE__ */ jsx(
13197
13212
  CustomShader$1,
13198
13213
  {
13199
13214
  ...e,
@@ -13224,7 +13239,7 @@ const RepeatedTextureMaterial = (e) => {
13224
13239
  needAlphaTesting: !0,
13225
13240
  useClipPlane: !0
13226
13241
  },
13227
- disableDepthWrite: w,
13242
+ disableDepthWrite: L,
13228
13243
  zOffset: M,
13229
13244
  zOffsetUnits: A
13230
13245
  }
@@ -13242,30 +13257,30 @@ const RepeatedTextureMaterial = (e) => {
13242
13257
  mode: E = 0,
13243
13258
  zOffset: O,
13244
13259
  zOffsetUnits: F,
13245
- overlay: L = {},
13246
- counterLine: w = void 0,
13260
+ overlay: w = {},
13261
+ counterLine: L = void 0,
13247
13262
  scalePlane: B = 1,
13248
13263
  scaleDepth: D = 1,
13249
13264
  lines: W = [],
13250
13265
  text: ie = [],
13251
- disableDepthWrite: ne,
13252
- textureFlatRotate: U = 0
13266
+ disableDepthWrite: ee,
13267
+ textureFlatRotate: H = 0
13253
13268
  /* NONE */
13254
- } = e, re = (te) => {
13269
+ } = e, oe = (te) => {
13255
13270
  i(te);
13256
13271
  };
13257
13272
  return React.useEffect(() => {
13258
- n && n.setFloat("textureFlatRotate", U);
13259
- }, [n, U]), React.useEffect(() => {
13260
- const te = (Q, J, de) => {
13273
+ n && n.setFloat("textureFlatRotate", H);
13274
+ }, [n, H]), React.useEffect(() => {
13275
+ const te = (Q, J, ce) => {
13261
13276
  if (S) {
13262
- const ee = S.maximumWorld.multiply(J), G = S.minimumWorld.multiply(J), xe = S.centerWorld.multiply(J), fe = Math.max(ee.x, ee.y, ee.z), V = Math.max(G.x, G.y, G.z), Y = Math.max(xe.x, xe.y, xe.z), ye = Math.max(Math.abs(J.x), Math.abs(J.z)), q = new Plane(
13277
+ const j = S.maximumWorld.multiply(J), G = S.minimumWorld.multiply(J), xe = S.centerWorld.multiply(J), fe = Math.max(j.x, j.y, j.z), V = Math.max(G.x, G.y, G.z), Y = Math.max(xe.x, xe.y, xe.z), _e = Math.max(Math.abs(J.x), Math.abs(J.z)), ye = new Plane(
13263
13278
  J.x,
13264
13279
  J.y,
13265
13280
  J.z,
13266
- ((fe - V) * (1 - de - 0.5) * ye + Y) * -1
13281
+ ((fe - V) * (1 - ce - 0.5) * _e + Y) * -1
13267
13282
  );
13268
- Q(q), console.log("[Geo3DViewer] 设置实际 CutPlane 为 ", q, ye);
13283
+ Q(ye), console.log("[Geo3DViewer] 设置实际 CutPlane 为 ", ye, _e);
13269
13284
  } else
13270
13285
  Q(null);
13271
13286
  };
@@ -13282,8 +13297,8 @@ const RepeatedTextureMaterial = (e) => {
13282
13297
  }, [T]), React.useEffect(() => {
13283
13298
  n && (n.clipPlane = r, n.clipPlane2 = a, n.clipPlane3 = l, n.clipPlane4 = f, n.clipPlane5 = d, n.clipPlane6 = m);
13284
13299
  }, [n, r, a, l, f, d, m]), React.useEffect(() => {
13285
- var te, Q, J, de, ee;
13286
- n && t && (n.setFloat("alpha1", y.alpha1), n.setFloat("alpha2", (te = y.alpha2) != null ? te : 1), n.setFloat("alpha3", (Q = y.alpha3) != null ? Q : 1), n.setFloat("alpha4", (J = y.alpha4) != null ? J : 1), n.setFloat("alpha5", (de = y.alpha5) != null ? de : 1), n.setFloat("alpha6", (ee = y.alpha6) != null ? ee : 1));
13300
+ var te, Q, J, ce, j;
13301
+ n && t && (n.setFloat("alpha1", y.alpha1), n.setFloat("alpha2", (te = y.alpha2) != null ? te : 1), n.setFloat("alpha3", (Q = y.alpha3) != null ? Q : 1), n.setFloat("alpha4", (J = y.alpha4) != null ? J : 1), n.setFloat("alpha5", (ce = y.alpha5) != null ? ce : 1), n.setFloat("alpha6", (j = y.alpha6) != null ? j : 1));
13287
13302
  }, [t, y, n]), React.useEffect(() => {
13288
13303
  n && N && n.setTexture("textureSampler", N);
13289
13304
  }, [n, N]), React.useEffect(() => {
@@ -13293,40 +13308,40 @@ const RepeatedTextureMaterial = (e) => {
13293
13308
  }, [n, E]), React.useEffect(() => {
13294
13309
  n && (R ? n.setTexture("textureSideSampler", R) : n.setTexture("textureSideSampler", N));
13295
13310
  }, [n, R, N]), React.useEffect(() => {
13296
- n && (L.texture1 ? n.setTexture("textureSampler1", L.texture1) : n.setTexture("textureSampler1", N), L.sideTexture1 ? n.setTexture("textureSideSampler1", L.sideTexture1) : n.setTexture("textureSideSampler1", N), L.color1 ? n.setColor3("vColor1", L.color1) : n.setColor3("vColor1", new Color3(1, 1, 1)), L.texture2 ? n.setTexture("textureSampler2", L.texture2) : n.setTexture("textureSampler2", N), L.sideTexture2 ? n.setTexture("textureSideSampler2", L.sideTexture2) : n.setTexture("textureSideSampler2", N), L.color2 ? n.setColor3("vColor2", L.color2) : n.setColor3("vColor2", new Color3(1, 1, 1)), L.texture3 ? n.setTexture("textureSampler3", L.texture3) : n.setTexture("textureSampler3", N), L.sideTexture3 ? n.setTexture("textureSideSampler3", L.sideTexture3) : n.setTexture("textureSideSampler2", N), L.color3 ? n.setColor3("vColor3", L.color3) : n.setColor3("vColor3", new Color3(1, 1, 1)), L.texture4 ? n.setTexture("textureSampler4", L.texture4) : n.setTexture("textureSampler4", N), L.sideTexture4 ? n.setTexture("textureSideSampler4", L.sideTexture4) : n.setTexture("textureSideSampler4", N), L.color4 ? n.setColor3("vColor4", L.color4) : n.setColor3("vColor4", new Color3(1, 1, 1)), L.texture5 ? n.setTexture("textureSampler5", L.texture5) : n.setTexture("textureSampler5", N), L.sideTexture5 ? n.setTexture("textureSideSampler5", L.sideTexture5) : n.setTexture("textureSideSampler5", N), L.color5 ? n.setColor3("vColor5", L.color5) : n.setColor3("vColor5", new Color3(1, 1, 1)), L.texture6 ? n.setTexture("textureSampler6", L.texture6) : n.setTexture("textureSampler6", N), L.sideTexture6 ? n.setTexture("textureSideSampler6", L.sideTexture6) : n.setTexture("textureSideSampler6", N), L.color6 ? n.setColor3("vColor6", L.color6) : n.setColor3("vColor6", new Color3(1, 1, 1)));
13297
- }, [n, L, N]), React.useEffect(() => {
13311
+ n && (w.texture1 ? n.setTexture("textureSampler1", w.texture1) : n.setTexture("textureSampler1", N), w.sideTexture1 ? n.setTexture("textureSideSampler1", w.sideTexture1) : n.setTexture("textureSideSampler1", N), w.color1 ? n.setColor3("vColor1", w.color1) : n.setColor3("vColor1", new Color3(1, 1, 1)), w.texture2 ? n.setTexture("textureSampler2", w.texture2) : n.setTexture("textureSampler2", N), w.sideTexture2 ? n.setTexture("textureSideSampler2", w.sideTexture2) : n.setTexture("textureSideSampler2", N), w.color2 ? n.setColor3("vColor2", w.color2) : n.setColor3("vColor2", new Color3(1, 1, 1)), w.texture3 ? n.setTexture("textureSampler3", w.texture3) : n.setTexture("textureSampler3", N), w.sideTexture3 ? n.setTexture("textureSideSampler3", w.sideTexture3) : n.setTexture("textureSideSampler2", N), w.color3 ? n.setColor3("vColor3", w.color3) : n.setColor3("vColor3", new Color3(1, 1, 1)), w.texture4 ? n.setTexture("textureSampler4", w.texture4) : n.setTexture("textureSampler4", N), w.sideTexture4 ? n.setTexture("textureSideSampler4", w.sideTexture4) : n.setTexture("textureSideSampler4", N), w.color4 ? n.setColor3("vColor4", w.color4) : n.setColor3("vColor4", new Color3(1, 1, 1)), w.texture5 ? n.setTexture("textureSampler5", w.texture5) : n.setTexture("textureSampler5", N), w.sideTexture5 ? n.setTexture("textureSideSampler5", w.sideTexture5) : n.setTexture("textureSideSampler5", N), w.color5 ? n.setColor3("vColor5", w.color5) : n.setColor3("vColor5", new Color3(1, 1, 1)), w.texture6 ? n.setTexture("textureSampler6", w.texture6) : n.setTexture("textureSampler6", N), w.sideTexture6 ? n.setTexture("textureSideSampler6", w.sideTexture6) : n.setTexture("textureSideSampler6", N), w.color6 ? n.setColor3("vColor6", w.color6) : n.setColor3("vColor6", new Color3(1, 1, 1)));
13312
+ }, [n, w, N]), React.useEffect(() => {
13298
13313
  var te;
13299
13314
  if (n && S)
13300
- if (w) {
13301
- const Q = (te = w.startHeight) != null ? te : S.minimumWorld.y / D;
13302
- return n.setFloat("contourLineStartHeight", Q * D), n.setColor3("contourLineColor", w.color), n.setFloat("contourLineWidth", w.width), n.setFloat("contourLineStep", w.stepHeight * D), console.log(
13315
+ if (L) {
13316
+ const Q = (te = L.startHeight) != null ? te : S.minimumWorld.y / D;
13317
+ return n.setFloat("contourLineStartHeight", Q * D), n.setColor3("contourLineColor", L.color), n.setFloat("contourLineWidth", L.width), n.setFloat("contourLineStep", L.stepHeight * D), console.log(
13303
13318
  "[Geo3DViewer] 等高线设置 ",
13304
- w,
13319
+ L,
13305
13320
  S.centerWorld.y,
13306
13321
  Q * D,
13307
- Q * D + 16 * w.stepHeight * D
13322
+ Q * D + 16 * L.stepHeight * D
13308
13323
  ), () => {
13309
13324
  n && (n.setFloat("contourLineStartHeight", 0), n.setColor3("contourLineColor", new Color3(0, 0, 0)), n.setFloat("contourLineWidth", 0), n.setFloat("contourLineStep", 0));
13310
13325
  };
13311
13326
  } else
13312
13327
  n.setFloat("contourLineStartHeight", 0), n.setColor3("contourLineColor", new Color3(0, 0, 0)), n.setFloat("contourLineWidth", 0), n.setFloat("contourLineStep", 0), console.log("[Geo3DViewer] 等高线设置 关闭");
13313
- }, [w, D, B, S, n]), React.useEffect(() => {
13328
+ }, [L, D, B, S, n]), React.useEffect(() => {
13314
13329
  t && n && S && x((te) => {
13315
13330
  te && te.dispose();
13316
- let Q = (S.maximum.x - S.minimum.x) / B, J = (S.maximum.z - S.minimum.z) / B, de = 0;
13331
+ let Q = (S.maximum.x - S.minimum.x) / B, J = (S.maximum.z - S.minimum.z) / B, ce = 0;
13317
13332
  if (Q < J) {
13318
13333
  const xe = Q;
13319
- Q = J, J = xe, de = 1;
13334
+ Q = J, J = xe, ce = 1;
13320
13335
  }
13321
- const ee = Q / J;
13322
- Q * J > 2048 * 2048 && (Q = 2048, J = 2048 / ee);
13336
+ const j = Q / J;
13337
+ Q * J > 2048 * 2048 && (Q = 2048, J = 2048 / j);
13323
13338
  const G = new DynamicTexture(
13324
13339
  "dynamic-texture",
13325
13340
  { width: Q, height: J },
13326
13341
  t,
13327
13342
  !1
13328
13343
  );
13329
- return G.clear(), console.log("[Geo3DViewer] 设置动态划线 ", S, Q, J, B), n.setVector3("oMin", S.minimum), n.setVector3("oMax", S.maximum), n.setFloat("textureOverlayRotate", de), n.setTexture("textureOverlaySampler", G), G;
13344
+ return G.clear(), console.log("[Geo3DViewer] 设置动态划线 ", S, Q, J, B), n.setVector3("oMin", S.minimum), n.setVector3("oMax", S.maximum), n.setFloat("textureOverlayRotate", ce), n.setTexture("textureOverlaySampler", G), G;
13330
13345
  });
13331
13346
  }, [S, n, B, t]), React.useEffect(() => {
13332
13347
  var te;
@@ -13338,44 +13353,44 @@ const RepeatedTextureMaterial = (e) => {
13338
13353
  const G = Q;
13339
13354
  Q = J, J = G;
13340
13355
  }
13341
- const de = Q / J;
13342
- Q * J > 2048 * 2048 && (Q = 2048, J = 2048 / de);
13343
- const ee = v.getContext();
13356
+ const ce = Q / J;
13357
+ Q * J > 2048 * 2048 && (Q = 2048, J = 2048 / ce);
13358
+ const j = v.getContext();
13344
13359
  W.forEach((G) => {
13345
13360
  if (G.points.length < 2)
13346
13361
  return;
13347
- ee.beginPath();
13362
+ j.beginPath();
13348
13363
  const xe = G.offset ? G.offset : new Vector2(0, 0), fe = 1 - G.points[0].x + xe.x, V = 1 - G.points[0].y + xe.y;
13349
- ee.moveTo(fe * Q, V * J);
13364
+ j.moveTo(fe * Q, V * J);
13350
13365
  for (let Y = 1; Y < G.points.length; Y++) {
13351
- const ye = G.offset ? G.offset : new Vector2(0, 0), q = 1 - G.points[Y].x + ye.x, se = 1 - G.points[Y].y + ye.y;
13352
- ee.lineTo(q * Q, se * J);
13366
+ const _e = G.offset ? G.offset : new Vector2(0, 0), ye = 1 - G.points[Y].x + _e.x, q = 1 - G.points[Y].y + _e.y;
13367
+ j.lineTo(ye * Q, q * J);
13353
13368
  }
13354
- ee.strokeStyle = `rgb(${G.color.r * 255}, ${G.color.g * 255}, ${G.color.b * 255})`, Q * J > 2048 * 2048 ? ee.lineWidth = G.width / de : ee.lineWidth = G.width, ee.stroke();
13369
+ j.strokeStyle = `rgb(${G.color.r * 255}, ${G.color.g * 255}, ${G.color.b * 255})`, Q * J > 2048 * 2048 ? j.lineWidth = G.width / ce : j.lineWidth = G.width, j.stroke();
13355
13370
  }), ie.forEach((G) => {
13356
- var Y, ye;
13357
- ee.font = `${G.fontSize}px Arial`;
13358
- const xe = (Y = G.color) != null ? Y : Color3.White(), fe = G.offset ? G.offset : new Vector2(0, 0), V = (ye = G.rotation) != null ? ye : 0;
13359
- if (ee.save(), ee.translate((1 - G.position.x + fe.x) * Q, (1 - G.position.y + fe.y) * J), ee.rotate(V), G.clearArea) {
13360
- const q = ee.measureText(G.text);
13361
- ee.clearRect(
13362
- -q.width * 0.15,
13371
+ var Y, _e;
13372
+ j.font = `${G.fontSize}px Arial`;
13373
+ const xe = (Y = G.color) != null ? Y : Color3.White(), fe = G.offset ? G.offset : new Vector2(0, 0), V = (_e = G.rotation) != null ? _e : 0;
13374
+ if (j.save(), j.translate((1 - G.position.x + fe.x) * Q, (1 - G.position.y + fe.y) * J), j.rotate(V), G.clearArea) {
13375
+ const ye = j.measureText(G.text);
13376
+ j.clearRect(
13377
+ -ye.width * 0.15,
13363
13378
  0.5 * G.fontSize * (1 - 0.3),
13364
- q.width * 1.3,
13379
+ ye.width * 1.3,
13365
13380
  -G.fontSize * 1.3
13366
13381
  );
13367
13382
  }
13368
13383
  if (G.background) {
13369
- ee.fillStyle = `rgba(${G.background.r * 255}, ${G.background.g * 255}, ${G.background.b * 255})`;
13370
- const q = ee.measureText(G.text);
13371
- ee.fillRect(
13372
- -q.width * 0.05,
13384
+ j.fillStyle = `rgba(${G.background.r * 255}, ${G.background.g * 255}, ${G.background.b * 255})`;
13385
+ const ye = j.measureText(G.text);
13386
+ j.fillRect(
13387
+ -ye.width * 0.05,
13373
13388
  0.5 * (G.fontSize * (0.5 - 0.1)),
13374
- q.width * 1.1,
13389
+ ye.width * 1.1,
13375
13390
  -G.fontSize * 1.1
13376
13391
  );
13377
13392
  }
13378
- ee.fillStyle = `rgb(${xe.r * 255}, ${xe.g * 255}, ${xe.b * 255})`, ee.fillText(G.text, 0, 0), ee.restore();
13393
+ j.fillStyle = `rgb(${xe.r * 255}, ${xe.g * 255}, ${xe.b * 255})`, j.fillText(G.text, 0, 0), j.restore();
13379
13394
  }), v.update();
13380
13395
  } else
13381
13396
  console.log("[Geo3DViewer] 动态纹理未准备好,正准备下一次绘制");
@@ -13383,7 +13398,7 @@ const RepeatedTextureMaterial = (e) => {
13383
13398
  CustomShader$1,
13384
13399
  {
13385
13400
  ...e,
13386
- ref: re,
13401
+ ref: oe,
13387
13402
  vertex: repeatedTextureProgressedVertexSource,
13388
13403
  fragment: repeatedTextureProgressedFragmentSource,
13389
13404
  options: {
@@ -13438,7 +13453,7 @@ const RepeatedTextureMaterial = (e) => {
13438
13453
  },
13439
13454
  zOffset: O,
13440
13455
  zOffsetUnits: F,
13441
- disableDepthWrite: ne
13456
+ disableDepthWrite: ee
13442
13457
  }
13443
13458
  );
13444
13459
  }, FlatMaterial = (e) => /* @__PURE__ */ jsx(
@@ -14434,49 +14449,65 @@ function signedArea(e, t, n, i) {
14434
14449
  r += (e[a] - e[o]) * (e[o + 1] + e[a + 1]), a = o;
14435
14450
  return r;
14436
14451
  }
14437
- const Be = class Be {
14452
+ const Ie = class Ie {
14438
14453
  constructor(t, n, i = "", r = {}, o = EngineStore.LastCreatedScene) {
14439
- ue(this, "_name");
14440
- ue(this, "_text", "");
14441
- ue(this, "_font");
14442
- ue(this, "_mesh", null);
14443
- ue(this, "_externalMesh");
14444
- ue(this, "_color", new Color4(1, 1, 1, 1));
14445
- ue(this, "_fontSize", 16);
14446
- ue(this, "_resolution", 64);
14447
- ue(this, "_depth", 10);
14448
- ue(this, "_scene");
14449
- ue(this, "_material");
14450
- ue(this, "_lowPriority", !0);
14451
- ue(this, "_disposed", !1);
14452
- ue(this, "_buildVersion", 0);
14454
+ le(this, "_name");
14455
+ le(this, "_text", "");
14456
+ le(this, "_font");
14457
+ le(this, "_mesh", null);
14458
+ le(this, "_externalMesh");
14459
+ le(this, "_color", new Color4(1, 1, 1, 1));
14460
+ le(this, "_fontSize", 16);
14461
+ le(this, "_resolution", 64);
14462
+ le(this, "_depth", 10);
14463
+ le(this, "_scene");
14464
+ le(this, "_material");
14465
+ le(this, "_lowPriority", !0);
14466
+ le(this, "_disposed", !1);
14467
+ le(this, "_buildVersion", 0);
14453
14468
  var a, s;
14454
14469
  this._name = t, this._font = n, this._text = i, this._fontSize = r.fontSize || 16, this._resolution = r.resolution || 64, this._depth = r.depth || 1, this._color = r.color || new Color4(1, 1, 1, 1), this._lowPriority = (a = r.lowPriority) != null ? a : !0, this._scene = o, this._externalMesh = new Mesh$1(`${t}-external-mesh`, o), this._externalMesh.billboardMode = (s = r.billboardMode) != null ? s : Mesh$1.BILLBOARDMODE_ALL, this._material = new StandardMaterial(`${t}-material`, o), this._material.diffuseColor = Color3.FromArray(this._color.asArray()), this._material.specularColor = new Color3(0, 0, 0), this._material.emissiveColor = Color3.FromArray(this._color.asArray()), this._material.disableLighting = !0, this._material.alpha = this._color.a, this._material.transparencyMode = Material.MATERIAL_ALPHABLEND, this.rebuildTextMesh();
14455
14470
  }
14456
14471
  static scheduleFlush() {
14457
- if (Be._flushHandle !== null)
14472
+ if (Ie._interactionPaused || Ie._flushHandle !== null || Ie._flushTimerHandle !== null)
14458
14473
  return;
14459
14474
  const t = globalThis;
14475
+ if (typeof t.requestIdleCallback == "function") {
14476
+ Ie._flushHandle = t.requestIdleCallback(
14477
+ (n) => {
14478
+ if (Ie._flushHandle = null, !n.didTimeout && n.timeRemaining() < 3) {
14479
+ Ie.scheduleFlush();
14480
+ return;
14481
+ }
14482
+ Ie.flushQueue(1);
14483
+ },
14484
+ { timeout: 120 }
14485
+ );
14486
+ return;
14487
+ }
14460
14488
  if (typeof t.requestAnimationFrame == "function") {
14461
- Be._flushHandle = t.requestAnimationFrame(() => {
14462
- Be._flushHandle = null, Be.flushQueue(2);
14489
+ Ie._flushHandle = t.requestAnimationFrame(() => {
14490
+ Ie._flushHandle = null, Ie.flushQueue(1);
14463
14491
  });
14464
14492
  return;
14465
14493
  }
14466
- Be._flushHandle = t.setTimeout(() => {
14467
- Be._flushHandle = null, Be.flushQueue(2);
14468
- }, 16);
14494
+ Ie._flushTimerHandle = t.setTimeout(() => {
14495
+ Ie._flushTimerHandle = null, Ie.flushQueue(1);
14496
+ }, 24);
14469
14497
  }
14470
14498
  static flushQueue(t) {
14471
14499
  let n = 0;
14472
- for (; Be._pendingTasks.length > 0 && n < t; ) {
14473
- const i = Be._pendingTasks.shift();
14500
+ for (; Ie._pendingTasks.length > 0 && n < t; ) {
14501
+ const i = Ie._pendingTasks.shift();
14474
14502
  i == null || i(), n += 1;
14475
14503
  }
14476
- Be._pendingTasks.length > 0 && Be.scheduleFlush();
14504
+ Ie._pendingTasks.length > 0 && Ie.scheduleFlush();
14477
14505
  }
14478
14506
  static enqueueTask(t) {
14479
- Be._pendingTasks.push(t), Be.scheduleFlush();
14507
+ Ie._pendingTasks.push(t), Ie.scheduleFlush();
14508
+ }
14509
+ static setInteractionPaused(t) {
14510
+ Ie._interactionPaused = t, t || Ie.scheduleFlush();
14480
14511
  }
14481
14512
  createTextMeshNow() {
14482
14513
  this._disposed || (this._mesh = MeshBuilder.CreateText(
@@ -14500,7 +14531,7 @@ const Be = class Be {
14500
14531
  this.createTextMeshNow();
14501
14532
  return;
14502
14533
  }
14503
- Be.enqueueTask(() => {
14534
+ Ie.enqueueTask(() => {
14504
14535
  this._disposed || t !== this._buildVersion || this.createTextMeshNow();
14505
14536
  });
14506
14537
  }
@@ -14562,8 +14593,8 @@ const Be = class Be {
14562
14593
  this._disposed = !0, this._buildVersion += 1, this._mesh && this._mesh.dispose(), this._material.dispose(), this._externalMesh.dispose(), this._mesh = null;
14563
14594
  }
14564
14595
  };
14565
- ue(Be, "_pendingTasks", []), ue(Be, "_flushHandle", null);
14566
- let FreeTypeText = Be;
14596
+ le(Ie, "_pendingTasks", []), le(Ie, "_flushHandle", null), le(Ie, "_flushTimerHandle", null), le(Ie, "_interactionPaused", !1);
14597
+ let FreeTypeText = Ie;
14567
14598
  const FreeTypeText$1 = FreeTypeText, GUIText = (e) => {
14568
14599
  const t = useScene(), n = useRef(null), i = useRef(null), r = useCachedJSON({
14569
14600
  url: "/Noto Sans SC_Regular.json"
@@ -14597,7 +14628,20 @@ const FreeTypeText$1 = FreeTypeText, GUIText = (e) => {
14597
14628
  }), i.current.mesh.parent = n.current);
14598
14629
  }, [a, s, l, f]), useEffect(() => {
14599
14630
  i.current && c !== void 0 && (i.current.billboardMode = c);
14600
- }, [c]), /* @__PURE__ */ jsx("transformNode", { name: o != null ? o : "no-name-text", ref: n });
14631
+ }, [c]), useEffect(() => {
14632
+ if (!t || !t.activeCamera)
14633
+ return;
14634
+ let u = null;
14635
+ const d = () => {
14636
+ FreeTypeText$1.setInteractionPaused(!0), u && clearTimeout(u), u = setTimeout(() => {
14637
+ FreeTypeText$1.setInteractionPaused(!1);
14638
+ }, 150);
14639
+ }, h = t.activeCamera.onViewMatrixChangedObservable.add(d);
14640
+ return () => {
14641
+ var m;
14642
+ (m = t.activeCamera) == null || m.onViewMatrixChangedObservable.remove(h), u && clearTimeout(u), FreeTypeText$1.setInteractionPaused(!1);
14643
+ };
14644
+ }, [t]), /* @__PURE__ */ jsx("transformNode", { name: o != null ? o : "no-name-text", ref: n });
14601
14645
  }, GUIText$1 = GUIText, FormationFace = ({
14602
14646
  urlTopLayer: e,
14603
14647
  urlBottomLayer: t,
@@ -14629,67 +14673,67 @@ const FreeTypeText$1 = FreeTypeText, GUIText = (e) => {
14629
14673
  const [y, T] = React.useState(), [M, A] = React.useState(Vector3.Zero()), [P, E] = React.useState(void 0);
14630
14674
  return React.useEffect(() => {
14631
14675
  if (C) {
14632
- const L = c.current;
14633
- L && (Tags.EnableFor(L), Tags.AddTagsTo(L, "loading"));
14634
- let w = [], B = [], D = [];
14676
+ const w = c.current;
14677
+ w && (Tags.EnableFor(w), Tags.AddTagsTo(w, "loading"));
14678
+ let L = [], B = [], D = [];
14635
14679
  const W = Formation.decode(new Uint8Array(C));
14636
14680
  {
14637
- const { name: U, points: re, indices: te, colorId: Q, value: J, center: de } = W;
14638
- w = re, B = te, D = J, m(Q), d(U), de && A(new Vector3(de.x, de.y, de.z));
14681
+ const { name: H, points: oe, indices: te, colorId: Q, value: J, center: ce } = W;
14682
+ L = oe, B = te, D = J, m(Q), d(H), ce && A(new Vector3(ce.x, ce.y, ce.z));
14639
14683
  }
14640
14684
  const ie = new VertexData();
14641
- ie.positions = w, ie.indices = B, ie.colors = D;
14642
- const ne = [];
14643
- if (VertexData.ComputeNormals(w, B, ne), ie.normals = ne, L) {
14644
- ie.applyToMesh(L);
14645
- const U = L.getBoundingInfo();
14646
- T(U.boundingBox.center.add(new Vector3(U.boundingBox.extendSize.x, 0, 0))), a || L.getScene().onAfterRenderObservable.addOnce(() => {
14647
- if (!L.isDisposed()) {
14648
- const te = L.getBoundingInfo();
14685
+ ie.positions = L, ie.indices = B, ie.colors = D;
14686
+ const ee = [];
14687
+ if (VertexData.ComputeNormals(L, B, ee), ie.normals = ee, w) {
14688
+ ie.applyToMesh(w);
14689
+ const H = w.getBoundingInfo();
14690
+ T(H.boundingBox.center.add(new Vector3(H.boundingBox.extendSize.x, 0, 0))), a || w.getScene().onAfterRenderObservable.addOnce(() => {
14691
+ if (!w.isDisposed()) {
14692
+ const te = w.getBoundingInfo();
14649
14693
  E(te.boundingBox);
14650
14694
  }
14651
14695
  });
14652
14696
  }
14653
- return L && Tags.RemoveTagsFrom(L, "loading"), () => {
14654
- L && new VertexData().applyToMesh(L);
14697
+ return w && Tags.RemoveTagsFrom(w, "loading"), () => {
14698
+ w && new VertexData().applyToMesh(w);
14655
14699
  };
14656
14700
  }
14657
14701
  }, [C, a]), React.useEffect(() => {
14658
14702
  if (C && S) {
14659
- const L = f.current;
14660
- L && (Tags.EnableFor(L), Tags.AddTagsTo(L, "loading"));
14661
- let w = [], B = [], D = [], W = [], ie = [], ne = [], U = [], re = [];
14703
+ const w = f.current;
14704
+ w && (Tags.EnableFor(w), Tags.AddTagsTo(w, "loading"));
14705
+ let L = [], B = [], D = [], W = [], ie = [], ee = [], H = [], oe = [];
14662
14706
  {
14663
- const fe = Formation.decode(new Uint8Array(C)), { points: V, indices: Y, border: ye, value: q } = fe;
14664
- w = V, B = Y, W = ye, D = q;
14707
+ const fe = Formation.decode(new Uint8Array(C)), { points: V, indices: Y, border: _e, value: ye } = fe;
14708
+ L = V, B = Y, W = _e, D = ye;
14665
14709
  }
14666
14710
  {
14667
- const fe = Formation.decode(new Uint8Array(S)), { points: V, bottomIndices: Y, border: ye, value: q } = fe;
14668
- ie = V, ne = Y, U = ye, re = q;
14711
+ const fe = Formation.decode(new Uint8Array(S)), { points: V, bottomIndices: Y, border: _e, value: ye } = fe;
14712
+ ie = V, ee = Y, H = _e, oe = ye;
14669
14713
  }
14670
- const te = new VertexData(), Q = new Float32Array(w.length + ie.length);
14671
- let J = B.length + ne.length;
14672
- J = J + (W.length - 1) * 6;
14673
- const de = new Int32Array(J), ee = new Float32Array(D.length + re.length);
14674
- Q.set(w), de.set(B), ee.set(D), Q.set(ie, w.length), de.set(ne, B.length), ee.set(re, D.length);
14714
+ const te = new VertexData(), Q = new Float32Array(L.length + ie.length);
14715
+ let J = B.length + ee.length;
14716
+ J = J + ((W.length < 1 ? 1 : W.length) - 1) * 6;
14717
+ const ce = new Int32Array(J), j = new Float32Array(D.length + oe.length);
14718
+ Q.set(L), ce.set(B), j.set(D), Q.set(ie, L.length), ce.set(ee, B.length), j.set(oe, D.length);
14675
14719
  const G = [];
14676
14720
  for (let fe = 0; fe < W.length - 1; fe++)
14677
- G.push(W[fe + 1]), G.push(W[fe]), G.push(U[fe] + w.length / 3), G.push(U[fe + 1] + w.length / 3), G.push(U[fe] + w.length / 3), G.push(W[fe + 1]);
14678
- de.set(G, B.length + ne.length), te.positions = Q, te.indices = de, te.colors = ee;
14721
+ G.push(W[fe + 1]), G.push(W[fe]), G.push(H[fe] + L.length / 3), G.push(H[fe + 1] + L.length / 3), G.push(H[fe] + L.length / 3), G.push(W[fe + 1]);
14722
+ ce.set(G, B.length + ee.length), te.positions = Q, te.indices = ce, te.colors = j;
14679
14723
  const xe = [];
14680
- return VertexData.ComputeNormals(Q, de, xe), te.normals = xe, L && (te.applyToMesh(L), a && L.getScene().onAfterRenderObservable.addOnce(() => {
14681
- if (!L.isDisposed()) {
14682
- const V = L.getBoundingInfo();
14724
+ return VertexData.ComputeNormals(Q, ce, xe), te.normals = xe, w && (te.applyToMesh(w), a && w.getScene().onAfterRenderObservable.addOnce(() => {
14725
+ if (!w.isDisposed()) {
14726
+ const V = w.getBoundingInfo();
14683
14727
  E(V.boundingBox);
14684
14728
  }
14685
- })), L && Tags.RemoveTagsFrom(L, "loading"), () => {
14686
- L && new VertexData().applyToMesh(L);
14729
+ })), w && Tags.RemoveTagsFrom(w, "loading"), () => {
14730
+ w && new VertexData().applyToMesh(w);
14687
14731
  };
14688
14732
  }
14689
14733
  }, [S, C, a]), React.useEffect(() => {
14690
- var L;
14734
+ var w;
14691
14735
  g(
14692
- l.type === MaterialType.ONE_COLOR ? (L = l == null ? void 0 : l.color) != null ? L : Color3.Random() : h ? v.colorIDs[h] ? new Color3(
14736
+ l.type === MaterialType.ONE_COLOR ? (w = l == null ? void 0 : l.color) != null ? w : Color3.Random() : h ? v.colorIDs[h] ? new Color3(
14693
14737
  v.colorIDs[h].r,
14694
14738
  v.colorIDs[h].g,
14695
14739
  v.colorIDs[h].b
@@ -15013,28 +15057,28 @@ const FreeTypeText$1 = FreeTypeText, GUIText = (e) => {
15013
15057
  if (R) {
15014
15058
  const O = l.current, F = c.current;
15015
15059
  Tags.EnableFor(O), Tags.AddTagsTo(O, "loading"), Tags.EnableFor(c), Tags.AddTagsTo(c, "loading");
15016
- let L = [], w = [], B = [], D = [];
15017
- const W = Formation.decode(new Uint8Array(R)), { name: ie, points: ne, indices: U, colorId: re, side: te, sideIndices: Q, center: J, value: de, sideValue: ee } = W;
15018
- J && C(new Vector3(J.x, J.y, J.z)), L = ne, w = U, B = te, D = Q, h(re), u(ie);
15019
- const G = new VertexData(), xe = new VertexData(), fe = new Float32Array(L.length + B.length), V = new Int32Array(w.length + D.length), Y = new Float32Array(de.length + ee.length);
15020
- G.positions = L, G.indices = w, G.colors = de;
15060
+ let w = [], L = [], B = [], D = [];
15061
+ const W = Formation.decode(new Uint8Array(R)), { name: ie, points: ee, indices: H, colorId: oe, side: te, sideIndices: Q, center: J, value: ce, sideValue: j } = W;
15062
+ J && C(new Vector3(J.x, J.y, J.z)), w = ee, L = H, B = te, D = Q, h(oe), u(ie);
15063
+ const G = new VertexData(), xe = new VertexData(), fe = new Float32Array(w.length + B.length), V = new Int32Array(L.length + D.length), Y = new Float32Array(ce.length + j.length);
15064
+ G.positions = w, G.indices = L, G.colors = ce;
15065
+ const _e = [];
15066
+ VertexData.ComputeNormals(ee, H, _e), G.normals = _e, fe.set(w), V.set(L), Y.set(ce), fe.set(B, w.length), V.set(D, L.length), Y.set(j, ce.length), xe.positions = fe, xe.indices = V, xe.colors = Y;
15021
15067
  const ye = [];
15022
- VertexData.ComputeNormals(ne, U, ye), G.normals = ye, fe.set(L), V.set(w), Y.set(de), fe.set(B, L.length), V.set(D, w.length), Y.set(ee, de.length), xe.positions = fe, xe.indices = V, xe.colors = Y;
15023
- const q = [];
15024
- if (VertexData.ComputeNormals(fe, V, q), xe.normals = q, O) {
15068
+ if (VertexData.ComputeNormals(fe, V, ye), xe.normals = ye, O) {
15025
15069
  G.applyToMesh(O);
15026
- const se = O.getBoundingInfo();
15027
- N(se.boundingBox.center.add(new Vector3(se.boundingBox.extendSize.x, 0, 0))), o || O.getScene().onAfterRenderObservable.addOnce(() => {
15070
+ const q = O.getBoundingInfo();
15071
+ N(q.boundingBox.center.add(new Vector3(q.boundingBox.extendSize.x, 0, 0))), o || O.getScene().onAfterRenderObservable.addOnce(() => {
15028
15072
  if (!O.isDisposed()) {
15029
- const j = O.getBoundingInfo();
15030
- A(j.boundingBox);
15073
+ const ne = O.getBoundingInfo();
15074
+ A(ne.boundingBox);
15031
15075
  }
15032
15076
  });
15033
15077
  }
15034
15078
  return F && (xe.applyToMesh(F), o && F.getScene().onAfterRenderObservable.addOnce(() => {
15035
15079
  if (!F.isDisposed()) {
15036
- const ce = F.getBoundingInfo();
15037
- A(ce.boundingBox);
15080
+ const ue = F.getBoundingInfo();
15081
+ A(ue.boundingBox);
15038
15082
  }
15039
15083
  })), Tags.RemoveTagsFrom(O, "loading"), Tags.RemoveTagsFrom(c, "loading"), () => {
15040
15084
  O && new VertexData().applyToMesh(O), F && new VertexData().applyToMesh(F);
@@ -15487,12 +15531,12 @@ const StructureLayer = ({
15487
15531
  if (C) {
15488
15532
  const T = f.current;
15489
15533
  Tags.EnableFor(T), Tags.AddTagsTo(T, "loading");
15490
- const M = Formation.decode(new Uint8Array(C)), { name: A, points: P, indices: E, value: O, colorId: F, center: L } = M;
15491
- L && N(new Vector3(L.x, L.y, L.z));
15492
- const w = new VertexData();
15493
- w.positions = P, w.indices = E, w.colors = O;
15534
+ const M = Formation.decode(new Uint8Array(C)), { name: A, points: P, indices: E, value: O, colorId: F, center: w } = M;
15535
+ w && N(new Vector3(w.x, w.y, w.z));
15536
+ const L = new VertexData();
15537
+ L.positions = P, L.indices = E, L.colors = O;
15494
15538
  const B = [];
15495
- return VertexData.ComputeNormals(P, E, B), w.normals = B, v(F), d(A), T && (w.applyToMesh(T), T.getScene().onAfterRenderObservable.addOnce(() => {
15539
+ return VertexData.ComputeNormals(P, E, B), L.normals = B, v(F), d(A), T && (L.applyToMesh(T), T.getScene().onAfterRenderObservable.addOnce(() => {
15496
15540
  if (!T.isDisposed()) {
15497
15541
  const W = T.getBoundingInfo();
15498
15542
  y(W.boundingBox);
@@ -15655,28 +15699,28 @@ const StructureLayer = ({
15655
15699
  console.log("[Geo3DViewer] ComplexFormationManager Loading: ", e);
15656
15700
  }, [e]), React.useEffect(() => {
15657
15701
  if (M) {
15658
- const F = FormationGroup.decode(new Uint8Array(M)), L = F.formations;
15702
+ const F = FormationGroup.decode(new Uint8Array(M)), w = F.formations;
15659
15703
  if (F.mode == FormationGroup_FormationMode.FACE) {
15660
15704
  R(!0), T(F.name);
15661
- const w = [];
15662
- L.forEach((B, D) => {
15705
+ const L = [];
15706
+ w.forEach((B, D) => {
15663
15707
  const W = {
15664
15708
  name: B.name,
15665
15709
  topUrl: B.url,
15666
- bottomUrl: L[D + 1] ? L[D + 1].url : void 0
15710
+ bottomUrl: w[D + 1] ? w[D + 1].url : void 0
15667
15711
  };
15668
- w.push(W);
15669
- }), C(w);
15712
+ L.push(W);
15713
+ }), C(L);
15670
15714
  } else {
15671
15715
  R(!1), T(F.name);
15672
- const w = [];
15673
- L.forEach((B) => {
15716
+ const L = [];
15717
+ w.forEach((B) => {
15674
15718
  const D = {
15675
15719
  name: B.name,
15676
15720
  topUrl: B.url
15677
15721
  };
15678
- w.push(D);
15679
- }), C(w);
15722
+ L.push(D);
15723
+ }), C(L);
15680
15724
  }
15681
15725
  return console.log(F), P(F.effectMeshs), () => {
15682
15726
  C([]);
@@ -15699,14 +15743,14 @@ const StructureLayer = ({
15699
15743
  },
15700
15744
  `${y}-${g[0].name}-SL`
15701
15745
  ) : null,
15702
- g ? g.map((F, L) => N ? s && L === 0 ? /* @__PURE__ */ jsx(Fragment, {}) : /* @__PURE__ */ jsx(
15746
+ g ? g.map((F, w) => N ? s && w === 0 ? /* @__PURE__ */ jsx(Fragment, {}) : /* @__PURE__ */ jsx(
15703
15747
  "transformNode",
15704
15748
  {
15705
15749
  name: `${y}-${F.name}-EV`,
15706
15750
  position: a.add(
15707
15751
  new Vector3(
15708
15752
  0,
15709
- L * (-1 * i * (S && S.scaleDepth ? S.scaleDepth : 0)),
15753
+ w * (-1 * i * (S && S.scaleDepth ? S.scaleDepth : 0)),
15710
15754
  0
15711
15755
  )
15712
15756
  ),
@@ -15718,9 +15762,9 @@ const StructureLayer = ({
15718
15762
  urlTopLayer: F.topUrl,
15719
15763
  urlBottomLayer: F.bottomUrl,
15720
15764
  visible: t && (n ? n.includes(F.name) : !0),
15721
- showBottomLayer: g[L + 1] ? n ? n.includes(g[L + 1].name) : !0 : !1,
15765
+ showBottomLayer: g[w + 1] ? n ? n.includes(g[w + 1].name) : !0 : !1,
15722
15766
  actions: f,
15723
- material: L === 0 && l ? {
15767
+ material: w === 0 && l ? {
15724
15768
  ...u == null ? void 0 : u[F.name],
15725
15769
  colorCodec: c,
15726
15770
  type: MaterialType.COLOR_CODEC
@@ -15730,14 +15774,14 @@ const StructureLayer = ({
15730
15774
  )
15731
15775
  },
15732
15776
  `${y}-${F.name}`
15733
- ) : s && L === 0 ? /* @__PURE__ */ jsx(Fragment, {}) : /* @__PURE__ */ jsx(
15777
+ ) : s && w === 0 ? /* @__PURE__ */ jsx(Fragment, {}) : /* @__PURE__ */ jsx(
15734
15778
  "transformNode",
15735
15779
  {
15736
15780
  name: `${y}-${F.name}-EV`,
15737
15781
  position: a.add(
15738
15782
  new Vector3(
15739
15783
  0,
15740
- L * (-1 * i * (S && S.scaleDepth ? S.scaleDepth : 0)),
15784
+ w * (-1 * i * (S && S.scaleDepth ? S.scaleDepth : 0)),
15741
15785
  0
15742
15786
  )
15743
15787
  ),
@@ -15748,7 +15792,7 @@ const StructureLayer = ({
15748
15792
  showLayerLabel: r,
15749
15793
  labelStyle: o,
15750
15794
  visible: t && (n ? n.includes(F.name) : !0),
15751
- showBottomLayer: g[L + 1] ? n ? n.includes(g[L + 1].name) : !0 : !1,
15795
+ showBottomLayer: g[w + 1] ? n ? n.includes(g[w + 1].name) : !0 : !1,
15752
15796
  actions: f,
15753
15797
  material: u == null ? void 0 : u[F.name]
15754
15798
  },
@@ -15757,17 +15801,17 @@ const StructureLayer = ({
15757
15801
  },
15758
15802
  `${y}-${F.name}`
15759
15803
  )) : null,
15760
- A && m && v && i === 0 && A.map((F, L) => /* @__PURE__ */ jsx(
15804
+ A && m && v && i === 0 && A.map((F, w) => /* @__PURE__ */ jsx(
15761
15805
  FormationEdgeEffect$1,
15762
15806
  {
15763
15807
  visible: x,
15764
- id: L,
15808
+ id: w,
15765
15809
  diffuseTextureUrl: m,
15766
- diffuseTextureSufaceUrl: L === 0 ? _ : void 0,
15810
+ diffuseTextureSufaceUrl: w === 0 ? _ : void 0,
15767
15811
  bumpTextureUrl: v,
15768
15812
  mesh: F
15769
15813
  },
15770
- L
15814
+ w
15771
15815
  ))
15772
15816
  ] });
15773
15817
  }, ComplexFormationManager$1 = ComplexFormationManager, Coordinate = ({
@@ -15817,53 +15861,53 @@ const StructureLayer = ({
15817
15861
  let E = A[P] / 1;
15818
15862
  E < 1 && (E = 200);
15819
15863
  const O = [];
15820
- for (let w = 0; w <= d.max.x - d.min.x; w += E)
15864
+ for (let L = 0; L <= d.max.x - d.min.x; L += E)
15821
15865
  O.push({
15822
- text: `${w + d.min.x + R.x}`,
15823
- position: new Vector3(w, 0, 0)
15866
+ text: `${L + d.min.x + R.x}`,
15867
+ position: new Vector3(L, 0, 0)
15824
15868
  }), O.push({
15825
- text: `${w + d.min.x + R.x}`,
15826
- position: new Vector3(w, d.max.y - d.min.y, d.max.z - d.min.z)
15869
+ text: `${L + d.min.x + R.x}`,
15870
+ position: new Vector3(L, d.max.y - d.min.y, d.max.z - d.min.z)
15827
15871
  }), O.push({
15828
- text: `${w + d.min.x + R.x}`,
15829
- position: new Vector3(w, d.max.y - d.min.y, 0)
15872
+ text: `${L + d.min.x + R.x}`,
15873
+ position: new Vector3(L, d.max.y - d.min.y, 0)
15830
15874
  }), O.push({
15831
- text: `${w + d.min.x + R.x}`,
15832
- position: new Vector3(w, 0, d.max.z - d.min.z)
15875
+ text: `${L + d.min.x + R.x}`,
15876
+ position: new Vector3(L, 0, d.max.z - d.min.z)
15833
15877
  });
15834
15878
  y.push(O);
15835
15879
  const F = [];
15836
- for (let w = 0; w <= d.max.y - d.min.y; w += E)
15880
+ for (let L = 0; L <= d.max.y - d.min.y; L += E)
15837
15881
  F.push({
15838
- text: `${w + d.min.y + R.y}`,
15839
- position: new Vector3(0, w, 0)
15882
+ text: `${L + d.min.y + R.y}`,
15883
+ position: new Vector3(0, L, 0)
15840
15884
  }), F.push({
15841
- text: `${w + d.min.y + R.y}`,
15842
- position: new Vector3(d.max.x - d.min.x, w, d.max.z - d.min.z)
15885
+ text: `${L + d.min.y + R.y}`,
15886
+ position: new Vector3(d.max.x - d.min.x, L, d.max.z - d.min.z)
15843
15887
  }), F.push({
15844
- text: `${w + d.min.y + R.y}`,
15845
- position: new Vector3(d.max.x - d.min.x, w, 0)
15888
+ text: `${L + d.min.y + R.y}`,
15889
+ position: new Vector3(d.max.x - d.min.x, L, 0)
15846
15890
  }), F.push({
15847
- text: `${w + d.min.y + R.y}`,
15848
- position: new Vector3(0, w, d.max.z - d.min.z)
15891
+ text: `${L + d.min.y + R.y}`,
15892
+ position: new Vector3(0, L, d.max.z - d.min.z)
15849
15893
  });
15850
15894
  T.push(F);
15851
- const L = [];
15852
- for (let w = 0; w <= d.max.z - d.min.z; w += E)
15853
- L.push({
15854
- text: `${w + d.min.z + R.z}`,
15855
- position: new Vector3(0, 0, w)
15856
- }), L.push({
15857
- text: `${w + d.min.z + R.z}`,
15858
- position: new Vector3(d.max.x - d.min.x, d.max.y - d.min.y, w)
15859
- }), L.push({
15860
- text: `${w + d.min.z + R.z}`,
15861
- position: new Vector3(0, d.max.y - d.min.y, w)
15862
- }), L.push({
15863
- text: `${w + d.min.z + R.z}`,
15864
- position: new Vector3(d.max.x - d.min.x, 0, w)
15895
+ const w = [];
15896
+ for (let L = 0; L <= d.max.z - d.min.z; L += E)
15897
+ w.push({
15898
+ text: `${L + d.min.z + R.z}`,
15899
+ position: new Vector3(0, 0, L)
15900
+ }), w.push({
15901
+ text: `${L + d.min.z + R.z}`,
15902
+ position: new Vector3(d.max.x - d.min.x, d.max.y - d.min.y, L)
15903
+ }), w.push({
15904
+ text: `${L + d.min.z + R.z}`,
15905
+ position: new Vector3(0, d.max.y - d.min.y, L)
15906
+ }), w.push({
15907
+ text: `${L + d.min.z + R.z}`,
15908
+ position: new Vector3(d.max.x - d.min.x, 0, L)
15865
15909
  });
15866
- M.push(L);
15910
+ M.push(w);
15867
15911
  }
15868
15912
  m(y), v(T), g(M);
15869
15913
  }
@@ -16832,7 +16876,7 @@ function isSet$7(e) {
16832
16876
  return e != null;
16833
16877
  }
16834
16878
  const FormationComponent = (e, t) => {
16835
- var O, F, L, w;
16879
+ var O, F, w, L;
16836
16880
  const n = useScene(), i = useRef(null), r = useRef(null), o = useContext(WorkspaceMetaContext), a = React.useContext(ColorProviderContext), [s, l] = React.useState(Color3.White()), {
16837
16881
  id: c,
16838
16882
  visible: f = !0,
@@ -16885,8 +16929,8 @@ const FormationComponent = (e, t) => {
16885
16929
  );
16886
16930
  }, [a.colorIDs, h, v == null ? void 0 : v.color, v.type]);
16887
16931
  const E = (B, D, W) => {
16888
- const ie = D.subtract(B), ne = 1 + 1e3 / Vector3.Distance(B, D) * (W - 1), U = ie.scale(ne);
16889
- return B.add(U);
16932
+ const ie = D.subtract(B), ee = 1 + 1e3 / Vector3.Distance(B, D) * (W - 1), H = ie.scale(ee);
16933
+ return B.add(H);
16890
16934
  };
16891
16935
  return /* @__PURE__ */ jsxs("transformNode", { name: `node-${S}-${c}`, setEnabled: f, children: [
16892
16936
  /* @__PURE__ */ jsxs(
@@ -16991,7 +17035,7 @@ const FormationComponent = (e, t) => {
16991
17035
  position: E(
16992
17036
  convertVertexToVector3(R.basePosition === "left" ? y[4] : y[5]),
16993
17037
  R.position,
16994
- (L = R.offset) != null ? L : 1
17038
+ (w = R.offset) != null ? w : 1
16995
17039
  ),
16996
17040
  scaling: calcGUIScale(o),
16997
17041
  children: R.title && /* @__PURE__ */ jsx(
@@ -17011,7 +17055,7 @@ const FormationComponent = (e, t) => {
17011
17055
  position: E(
17012
17056
  convertVertexToVector3(N.basePosition === "left" ? y[4] : y[5]),
17013
17057
  N.position,
17014
- (w = N.offset) != null ? w : 1
17058
+ (L = N.offset) != null ? L : 1
17015
17059
  ),
17016
17060
  scaling: calcGUIScale(o),
17017
17061
  children: N.title && /* @__PURE__ */ jsx(
@@ -17257,12 +17301,12 @@ const Geo3DCamera = ({
17257
17301
  O.event.clientX,
17258
17302
  O.event.clientY
17259
17303
  )), O.type === PointerEventTypes.POINTERUP && (g.current = null), O.type === PointerEventTypes.POINTERMOVE && g.current) {
17260
- const F = O.event.clientX - g.current.x, L = O.event.clientY - g.current.y;
17304
+ const F = O.event.clientX - g.current.x, w = O.event.clientY - g.current.y;
17261
17305
  if (O.event.buttons === 1) {
17262
- let w = null;
17263
- (P.lockedTarget || C) && (P.lockedTarget && (w = P.lockedTarget.position), C && (w = C)), w && N.current ? (N.current.target = w, N.current.position = P.position.clone(), N.current.wheelDeltaPercentage = a, N.current.panningSensibility = l, N.current.alpha += F / 100 * s, N.current.beta += L / 100 * s, N.current.update(), P.position = N.current.position.clone(), P.rotation = N.current.rotation.clone()) : (P.rotation.y -= F / 100 * s, P.rotation.x -= L / 100 * s);
17306
+ let L = null;
17307
+ (P.lockedTarget || C) && (P.lockedTarget && (L = P.lockedTarget.position), C && (L = C)), L && N.current ? (N.current.target = L, N.current.position = P.position.clone(), N.current.wheelDeltaPercentage = a, N.current.panningSensibility = l, N.current.alpha += F / 100 * s, N.current.beta += w / 100 * s, N.current.update(), P.position = N.current.position.clone(), P.rotation = N.current.rotation.clone()) : (P.rotation.y -= F / 100 * s, P.rotation.x -= w / 100 * s);
17264
17308
  }
17265
- O.event.buttons === 2 && (P.position.x -= F / 100 * l, P.position.y += L / 100 * l), g.current = new Vector2(
17309
+ O.event.buttons === 2 && (P.position.x -= F / 100 * l, P.position.y += w / 100 * l), g.current = new Vector2(
17266
17310
  O.event.clientX,
17267
17311
  O.event.clientY
17268
17312
  );
@@ -17358,20 +17402,20 @@ class FreeCameraPointersInput extends BaseCameraPointersInput {
17358
17402
  /**
17359
17403
  * Defines the camera the input is attached to.
17360
17404
  */
17361
- ue(this, "camera");
17362
- ue(this, "buttons", [0, 1, 2, 4]);
17405
+ le(this, "camera");
17406
+ le(this, "buttons", [0, 1, 2, 4]);
17363
17407
  /**
17364
17408
  * Defines the pointer panning sensibility or how fast is the camera moving.
17365
17409
  */
17366
- ue(this, "panningSensibility", 10);
17410
+ le(this, "panningSensibility", 10);
17367
17411
  /**
17368
17412
  * Defines the pointer angular sensibility along the Y axis or how fast is
17369
17413
  * the camera rotating.
17370
17414
  * A negative number will reverse the axis direction.
17371
17415
  */
17372
- ue(this, "angularSensibility", 1e4);
17373
- ue(this, "_isPanClick", !1);
17374
- ue(this, "_isPinching", !1);
17416
+ le(this, "angularSensibility", 1e4);
17417
+ le(this, "_isPanClick", !1);
17418
+ le(this, "_isPinching", !1);
17375
17419
  }
17376
17420
  /**
17377
17421
  * Gets the class name of the current input.
@@ -17467,8 +17511,8 @@ const Geo3DFreeCamera = (e) => {
17467
17511
  class DepthTextureDebuggerNode extends TransformNode {
17468
17512
  constructor(n, i, r) {
17469
17513
  super(n, i);
17470
- ue(this, "_showDepthTexture", !1);
17471
- ue(this, "_postProcess");
17514
+ le(this, "_showDepthTexture", !1);
17515
+ le(this, "_postProcess");
17472
17516
  this._postProcess = r, this.showDepthTexture = !1, this.inspectableCustomProperties = [
17473
17517
  {
17474
17518
  label: "Show Depth Texture",
@@ -17534,8 +17578,8 @@ void main(void)
17534
17578
  class GPUPickingTextureDebuggerNode extends TransformNode {
17535
17579
  constructor(n, i, r) {
17536
17580
  super(n, i);
17537
- ue(this, "_showGPUPicking", !1);
17538
- ue(this, "_postProcess");
17581
+ le(this, "_showGPUPicking", !1);
17582
+ le(this, "_postProcess");
17539
17583
  this._postProcess = r, this.showGPUPicking = !1, this.inspectableCustomProperties = [
17540
17584
  {
17541
17585
  label: "Show GPU Picking Texture",
@@ -17649,9 +17693,9 @@ void main(void)
17649
17693
  }, EngineFixer$1 = EngineFixer;
17650
17694
  class ResourceManager {
17651
17695
  constructor() {
17652
- ue(this, "urls", []);
17653
- ue(this, "resources", /* @__PURE__ */ new Map());
17654
- ue(this, "listeners", /* @__PURE__ */ new Map());
17696
+ le(this, "urls", []);
17697
+ le(this, "resources", /* @__PURE__ */ new Map());
17698
+ le(this, "listeners", /* @__PURE__ */ new Map());
17655
17699
  this.urls = [];
17656
17700
  }
17657
17701
  // 添加监听器
@@ -17734,7 +17778,7 @@ const ResourceContext = createContext(void 0), useAsset = (e, t = "BIN") => {
17734
17778
  return useEffect(() => {
17735
17779
  console.log(
17736
17780
  `
17737
- %c Geo3DViewer Library %c Version: 1.7.31 %c
17781
+ %c Geo3DViewer Library %c Version: 1.7.33 %c
17738
17782
  `,
17739
17783
  "color:#e0e0e0;background:#873e23;padding:5px 0;border-top-left-radius:5px;border-bottom-left-radius:5px;",
17740
17784
  "color:#455a64;background:#e0e0e0;padding:5px 0;",
@@ -18075,7 +18119,7 @@ const GridDiagram = ({
18075
18119
  pickingBoxScale: u = Vector3.One(),
18076
18120
  labelStyle: d
18077
18121
  }, h) => {
18078
- const m = useScene(), _ = useCachedModel({ url: t }), v = React.useRef(null), x = React.useRef(null), [g, C] = React.useState(null), [S, N] = React.useState(5), [R, y] = React.useState(5), [T, M] = React.useState(5), [A, P] = React.useState(Vector3.Zero()), [E, O] = React.useState(Vector3.One()), [F, L] = React.useState([]), w = React.useContext(WorkspaceMetaContext), { scaleWithParent: B = !0 } = d || {};
18122
+ const m = useScene(), _ = useCachedModel({ url: t }), v = React.useRef(null), x = React.useRef(null), [g, C] = React.useState(null), [S, N] = React.useState(5), [R, y] = React.useState(5), [T, M] = React.useState(5), [A, P] = React.useState(Vector3.Zero()), [E, O] = React.useState(Vector3.One()), [F, w] = React.useState([]), L = React.useContext(WorkspaceMetaContext), { scaleWithParent: B = !0 } = d || {};
18079
18123
  return React.useEffect(() => {
18080
18124
  console.log("[Geo3DViewer] ModelLoader Loading: ", t);
18081
18125
  }, [t]), useImperativeHandle(
@@ -18093,19 +18137,19 @@ const GridDiagram = ({
18093
18137
  if (g) {
18094
18138
  const D = g, W = D.skeletons;
18095
18139
  if (W && W.length > 0) {
18096
- const ne = W[0].bones, U = [];
18097
- ne.filter((re) => re.name === "MorphBoneBase").forEach((re, te) => {
18140
+ const ee = W[0].bones, H = [];
18141
+ ee.filter((oe) => oe.name === "MorphBoneBase").forEach((oe, te) => {
18098
18142
  if (te === 0) {
18099
- const Q = getChildBone(re);
18100
- U.push(...Q.map((J) => {
18101
- var de;
18102
- return (de = J.getTransformNode()) != null ? de : J;
18143
+ const Q = getChildBone(oe);
18144
+ H.push(...Q.map((J) => {
18145
+ var ce;
18146
+ return (ce = J.getTransformNode()) != null ? ce : J;
18103
18147
  }));
18104
18148
  }
18105
- }), L(U), console.log("[Geo3DViewer] ModelLoader 设定 Morph 骨骼: ", U);
18149
+ }), w(H), console.log("[Geo3DViewer] ModelLoader 设定 Morph 骨骼: ", H);
18106
18150
  }
18107
18151
  return () => {
18108
- console.log("[Geo3DViewer] ModelLoader 注销 Model"), D.dispose(), L([]);
18152
+ console.log("[Geo3DViewer] ModelLoader 注销 Model"), D.dispose(), w([]);
18109
18153
  };
18110
18154
  }
18111
18155
  }, [g]), React.useEffect(() => {
@@ -18137,28 +18181,28 @@ const GridDiagram = ({
18137
18181
  D.rotation.y,
18138
18182
  D.rotation.x,
18139
18183
  D.rotation.z
18140
- ), ne = new Vector3(
18184
+ ), ee = new Vector3(
18141
18185
  D.position.x,
18142
18186
  D.position.y,
18143
18187
  D.position.z
18144
18188
  );
18145
18189
  D.rotation.set(0, 0, 0), D.position.set(0, 0, 0);
18146
- const U = D.getHierarchyBoundingVectors(!0), re = U.max.subtract(U.min);
18147
- N(re.y), y(re.z), M(re.x), O(ie.toEulerAngles());
18190
+ const H = D.getHierarchyBoundingVectors(!0), oe = H.max.subtract(H.min);
18191
+ N(oe.y), y(oe.z), M(oe.x), O(ie.toEulerAngles());
18148
18192
  const te = new Vector3(
18149
- (U.max.x + U.min.x) / 2,
18150
- (U.max.y + U.min.y) / 2,
18151
- (U.max.z + U.min.z) / 2
18193
+ (H.max.x + H.min.x) / 2,
18194
+ (H.max.y + H.min.y) / 2,
18195
+ (H.max.z + H.min.z) / 2
18152
18196
  );
18153
- return P(te), D.position = ne, D.rotationQuaternion = ie, D.parent = W, PivotTools._RestorePivotPoint(D), console.log(
18197
+ return P(te), D.position = ee, D.rotationQuaternion = ie, D.parent = W, PivotTools._RestorePivotPoint(D), console.log(
18154
18198
  "[Geo3DViewer] 创建 ModelLoader 鼠标拾取外框 ",
18155
18199
  e,
18156
18200
  " 于 ",
18157
18201
  te,
18158
18202
  " 大小为 ",
18159
- re.x,
18160
- re.y,
18161
- re.z
18203
+ oe.x,
18204
+ oe.y,
18205
+ oe.z
18162
18206
  ), () => {
18163
18207
  console.log("[Geo3DViewer] ModelLoader 注销容器: ", e), D.dispose();
18164
18208
  };
@@ -18183,9 +18227,9 @@ const GridDiagram = ({
18183
18227
  name: `transform-model-global-${e}`,
18184
18228
  ref: x,
18185
18229
  scaling: s ? new Vector3(
18186
- w && w.scalePlane ? w.scalePlane : 1,
18187
- w && w.scaleDepth ? w.scaleDepth : 1,
18188
- w && w.scalePlane ? w.scalePlane : 1
18230
+ L && L.scalePlane ? L.scalePlane : 1,
18231
+ L && L.scaleDepth ? L.scaleDepth : 1,
18232
+ L && L.scalePlane ? L.scalePlane : 1
18189
18233
  ) : new Vector3(1, 1, 1),
18190
18234
  children: [
18191
18235
  d ? /* @__PURE__ */ jsx(
@@ -18194,9 +18238,9 @@ const GridDiagram = ({
18194
18238
  name: `transform-model-label-${e}`,
18195
18239
  position: A.add(
18196
18240
  d != null && d.offset ? d.offset.multiplyByFloats(
18197
- w != null && w.scalePlane ? w == null ? void 0 : w.scalePlane : 1,
18241
+ L != null && L.scalePlane ? L == null ? void 0 : L.scalePlane : 1,
18198
18242
  1,
18199
- w != null && w.scalePlane ? w == null ? void 0 : w.scalePlane : 1
18243
+ L != null && L.scalePlane ? L == null ? void 0 : L.scalePlane : 1
18200
18244
  ) : Vector3.Zero()
18201
18245
  ),
18202
18246
  scalingDeterminant: B ? r * 3 : 3,
@@ -18361,8 +18405,8 @@ const GridDiagram = ({
18361
18405
  const F = y.enableFluidRenderer();
18362
18406
  if (F) {
18363
18407
  F.addParticleSystem(T);
18364
- const L = F.getRenderObjectFromParticleSystem(T);
18365
- A.current = L, L && (L.object.particleSize = (P = R == null ? void 0 : R.particleSize) != null ? P : 0.75, L.object.particleThicknessAlpha = 0.02, L.object.useTrueRenderingForDiffuseTexture = !0, L.targetRenderer.minimumThickness = L.object.particleThicknessAlpha, L.targetRenderer.blurDepthFilterSize = 10, L.targetRenderer.blurDepthDepthScale = 10, L.targetRenderer.thicknessMapSize = 1024, L.targetRenderer.density = (E = R == null ? void 0 : R.density) != null ? E : 8, L.targetRenderer.fresnelClamp = 0.04, L.targetRenderer.fluidColor = (O = R == null ? void 0 : R.fluidColor) != null ? O : new Color3(219 / 255, 228 / 255, 1), L.targetRenderer.generateDiffuseTexture = !1);
18408
+ const w = F.getRenderObjectFromParticleSystem(T);
18409
+ A.current = w, w && (w.object.particleSize = (P = R == null ? void 0 : R.particleSize) != null ? P : 0.75, w.object.particleThicknessAlpha = 0.02, w.object.useTrueRenderingForDiffuseTexture = !0, w.targetRenderer.minimumThickness = w.object.particleThicknessAlpha, w.targetRenderer.blurDepthFilterSize = 10, w.targetRenderer.blurDepthDepthScale = 10, w.targetRenderer.thicknessMapSize = 1024, w.targetRenderer.density = (E = R == null ? void 0 : R.density) != null ? E : 8, w.targetRenderer.fresnelClamp = 0.04, w.targetRenderer.fluidColor = (O = R == null ? void 0 : R.fluidColor) != null ? O : new Color3(219 / 255, 228 / 255, 1), w.targetRenderer.generateDiffuseTexture = !1);
18366
18410
  }
18367
18411
  }
18368
18412
  }));
@@ -18567,7 +18611,7 @@ const PointClickZone = ({
18567
18611
  checkLines: _ = [],
18568
18612
  checkLineWidth: v = 4
18569
18613
  }) => {
18570
- var te, Q, J, de, ee, G, xe, fe, V, Y, ye, q, se, ce, j, Ce, _e, be, Se;
18614
+ var te, Q, J, ce, j, G, xe, fe, V, Y, _e, ye, q, ue, ne, de, Te, Ce, be;
18571
18615
  const x = useScene(), g = React.useRef(null), C = React.useContext(WorkspaceMetaContext), S = useCachedBinary({ url: t, cacheType: CacheType.URL_PREFIX_MATCH }), [N, R] = React.useState(Vector3.Zero()), [y, T] = React.useState(void 0), M = useCachedTexture({
18572
18616
  url: c == null ? void 0 : c.texture,
18573
18617
  cacheType: CacheType.URL_PREFIX_MATCH
@@ -18584,12 +18628,12 @@ const PointClickZone = ({
18584
18628
  url: (J = f.segment2) == null ? void 0 : J.texture,
18585
18629
  cacheType: CacheType.URL_PREFIX_MATCH
18586
18630
  }), F = useCachedTexture({
18587
- url: (de = f.segment2) == null ? void 0 : de.sideTexture,
18588
- cacheType: CacheType.URL_PREFIX_MATCH
18589
- }), L = useCachedTexture({
18590
- url: (ee = f.segment3) == null ? void 0 : ee.texture,
18631
+ url: (ce = f.segment2) == null ? void 0 : ce.sideTexture,
18591
18632
  cacheType: CacheType.URL_PREFIX_MATCH
18592
18633
  }), w = useCachedTexture({
18634
+ url: (j = f.segment3) == null ? void 0 : j.texture,
18635
+ cacheType: CacheType.URL_PREFIX_MATCH
18636
+ }), L = useCachedTexture({
18593
18637
  url: (G = f.segment3) == null ? void 0 : G.sideTexture,
18594
18638
  cacheType: CacheType.URL_PREFIX_MATCH
18595
18639
  }), B = useCachedTexture({
@@ -18604,84 +18648,84 @@ const PointClickZone = ({
18604
18648
  }), ie = useCachedTexture({
18605
18649
  url: (Y = f.segment5) == null ? void 0 : Y.sideTexture,
18606
18650
  cacheType: CacheType.URL_PREFIX_MATCH
18607
- }), ne = useCachedTexture({
18608
- url: (ye = f.segment6) == null ? void 0 : ye.texture,
18651
+ }), ee = useCachedTexture({
18652
+ url: (_e = f.segment6) == null ? void 0 : _e.texture,
18609
18653
  cacheType: CacheType.URL_PREFIX_MATCH
18610
- }), U = useCachedTexture({
18611
- url: (q = f.segment6) == null ? void 0 : q.sideTexture,
18654
+ }), H = useCachedTexture({
18655
+ url: (ye = f.segment6) == null ? void 0 : ye.sideTexture,
18612
18656
  cacheType: CacheType.URL_PREFIX_MATCH
18613
18657
  });
18614
18658
  React.useEffect(() => {
18615
18659
  console.log("[Geo3DViewer] ProgressedAttributeBody Loading: ", t);
18616
18660
  }, [t]), React.useEffect(() => {
18617
18661
  if (x && g.current && t && S) {
18618
- const Te = g.current;
18619
- Tags.EnableFor(Te), Tags.AddTagsTo(Te, "loading");
18620
- const Pe = VirtualVolume.decode(new Uint8Array(S)), { points: Ae, indices: Me, value: Ie, center: Re } = Pe;
18621
- Re && R(new Vector3(Re.x, Re.y, Re.z));
18622
- const Ee = new VertexData();
18623
- Ee.positions = Ae, Ee.indices = Me, Ee.colors = Ie;
18624
- const $e = [];
18625
- VertexData.ComputeNormals(Ae, Me, $e), Ee.normals = $e, Te && (Ee.applyToMesh(Te), Te.getScene().onAfterRenderObservable.addOnce(() => {
18626
- if (!Te.isDisposed()) {
18627
- const oe = Te.getBoundingInfo();
18628
- T(oe.boundingBox);
18662
+ const Se = g.current;
18663
+ Tags.EnableFor(Se), Tags.AddTagsTo(Se, "loading");
18664
+ const Pe = VirtualVolume.decode(new Uint8Array(S)), { points: Re, indices: Me, value: Ee, center: ke } = Pe;
18665
+ ke && R(new Vector3(ke.x, ke.y, ke.z));
18666
+ const Oe = new VertexData();
18667
+ Oe.positions = Re, Oe.indices = Me, Oe.colors = Ee;
18668
+ const Fe = [];
18669
+ VertexData.ComputeNormals(Re, Me, Fe), Oe.normals = Fe, Se && (Oe.applyToMesh(Se), Se.getScene().onAfterRenderObservable.addOnce(() => {
18670
+ if (!Se.isDisposed()) {
18671
+ const re = Se.getBoundingInfo();
18672
+ T(re.boundingBox);
18629
18673
  }
18630
- })), Tags.RemoveTagsFrom(Te, "loading");
18674
+ })), Tags.RemoveTagsFrom(Se, "loading");
18631
18675
  }
18632
18676
  }, [t, x, S]);
18633
- function re(Te, Pe, Ae) {
18634
- const Me = Ae.subtract(Pe), Ie = Te.subtract(Pe), Re = Vector3.Dot(
18677
+ function oe(Se, Pe, Re) {
18678
+ const Me = Re.subtract(Pe), Ee = Se.subtract(Pe), ke = Vector3.Dot(
18635
18679
  Vector3.Normalize(Me),
18636
- Vector3.Normalize(Ie)
18637
- ), Ee = Ie.length() / Re, $e = Pe.add(
18638
- Me.scale(Ee / Vector3.Distance(Pe, Ae))
18680
+ Vector3.Normalize(Ee)
18681
+ ), Oe = Ee.length() / ke, Fe = Pe.add(
18682
+ Me.scale(Oe / Vector3.Distance(Pe, Re))
18639
18683
  );
18640
- return Vector3.Distance(Te, $e);
18684
+ return Vector3.Distance(Se, Fe);
18641
18685
  }
18642
18686
  return React.useEffect(() => {
18643
18687
  g.current && (g.current.metadata = {
18644
18688
  pickable: l ? {
18645
18689
  name: e,
18646
- valueCallback: (Te, Pe, Ae) => {
18647
- if (console.log(e, Te, Pe, Ae), g.current && Pe) {
18690
+ valueCallback: (Se, Pe, Re) => {
18691
+ if (console.log(e, Se, Pe, Re), g.current && Pe) {
18648
18692
  const Me = g.current.getBoundingInfo().boundingBox;
18649
18693
  console.log(Me);
18650
- for (let Ie = 0; Ie < _.length; Ie++) {
18651
- const Re = _[Ie];
18652
- if (re(
18694
+ for (let Ee = 0; Ee < _.length; Ee++) {
18695
+ const ke = _[Ee];
18696
+ if (oe(
18653
18697
  new Vector3(Pe.x, 0, Pe.z),
18654
- Re.start,
18655
- Re.end
18698
+ ke.start,
18699
+ ke.end
18656
18700
  ) < v) {
18657
- const $e = [];
18701
+ const Fe = [];
18658
18702
  for (let I = 0; I < 11; I++) {
18659
- const oe = Re.end.subtract(Re.start), le = Re.start.add(oe.scale(I / 10)), me = new Vector3(
18660
- le.x,
18703
+ const re = ke.end.subtract(ke.start), se = ke.start.add(re.scale(I / 10)), me = new Vector3(
18704
+ se.x,
18661
18705
  Pe.y + Me.extendSize.y * 4,
18662
- le.z
18706
+ se.z
18663
18707
  ), z = new Vector3(
18664
- le.x,
18708
+ se.x,
18665
18709
  Pe.y + Me.extendSize.y * 2,
18666
- le.z
18710
+ se.z
18667
18711
  ), K = Vector3.Normalize(z.subtract(me)), b = Me.extendSize.y * 10, ae = new Ray(me, K, b), ge = x == null ? void 0 : x.pickWithRay(ae, (p) => p === g.current);
18668
- ge != null && ge.hit && ge.pickedPoint && $e.push(ge.pickedPoint);
18712
+ ge != null && ge.hit && ge.pickedPoint && Fe.push(ge.pickedPoint);
18669
18713
  }
18670
18714
  for (let I = 0; I < 11; I++) {
18671
- const oe = Re.end.subtract(Re.start), le = Re.start.add(oe.scale(I / 10)), me = new Vector3(
18672
- le.x,
18715
+ const re = ke.end.subtract(ke.start), se = ke.start.add(re.scale(I / 10)), me = new Vector3(
18716
+ se.x,
18673
18717
  Pe.y - Me.extendSize.y * 4,
18674
- le.z
18718
+ se.z
18675
18719
  ), z = new Vector3(
18676
- le.x,
18720
+ se.x,
18677
18721
  Pe.y - Me.extendSize.y * 2,
18678
- le.z
18722
+ se.z
18679
18723
  ), K = Vector3.Normalize(z.subtract(me)), b = Me.extendSize.y * 10, ae = new Ray(me, K, b), ge = x == null ? void 0 : x.pickWithRay(ae, (p) => p === g.current);
18680
- ge != null && ge.hit && ge.pickedPoint && $e.push(ge.pickedPoint);
18724
+ ge != null && ge.hit && ge.pickedPoint && Fe.push(ge.pickedPoint);
18681
18725
  }
18682
18726
  return {
18683
- value: Ie,
18684
- points: $e
18727
+ value: Ee,
18728
+ points: Fe
18685
18729
  };
18686
18730
  }
18687
18731
  }
@@ -18732,27 +18776,27 @@ const PointClickZone = ({
18732
18776
  boundingBox: y,
18733
18777
  tilingFactor: c == null ? void 0 : c.tilingFactor,
18734
18778
  textureFlatRotate: c == null ? void 0 : c.flatModeRotate,
18735
- sideTilingFactor: (se = c == null ? void 0 : c.sideTilingFactor) != null ? se : c == null ? void 0 : c.tilingFactor,
18779
+ sideTilingFactor: (q = c == null ? void 0 : c.sideTilingFactor) != null ? q : c == null ? void 0 : c.tilingFactor,
18736
18780
  mode: c == null ? void 0 : c.mode,
18737
18781
  overlay: {
18738
18782
  texture1: P,
18739
18783
  sideTexture1: E,
18740
18784
  texture2: O,
18741
18785
  sideTexture2: F,
18742
- texture3: L,
18743
- sideTexture3: w,
18786
+ texture3: w,
18787
+ sideTexture3: L,
18744
18788
  texture4: B,
18745
18789
  sideTexture4: D,
18746
18790
  texture5: W,
18747
18791
  sideTexture5: ie,
18748
- texture6: ne,
18749
- sideTexture6: U,
18750
- color1: (ce = f.segment1) == null ? void 0 : ce.color,
18751
- color2: (j = f.segment2) == null ? void 0 : j.color,
18752
- color3: (Ce = f.segment3) == null ? void 0 : Ce.color,
18753
- color4: (_e = f.segment4) == null ? void 0 : _e.color,
18754
- color5: (be = f.segment5) == null ? void 0 : be.color,
18755
- color6: (Se = f.segment6) == null ? void 0 : Se.color
18792
+ texture6: ee,
18793
+ sideTexture6: H,
18794
+ color1: (ue = f.segment1) == null ? void 0 : ue.color,
18795
+ color2: (ne = f.segment2) == null ? void 0 : ne.color,
18796
+ color3: (de = f.segment3) == null ? void 0 : de.color,
18797
+ color4: (Te = f.segment4) == null ? void 0 : Te.color,
18798
+ color5: (Ce = f.segment5) == null ? void 0 : Ce.color,
18799
+ color6: (be = f.segment6) == null ? void 0 : be.color
18756
18800
  },
18757
18801
  scaleDepth: C ? C.scaleDepth : 1,
18758
18802
  scalePlane: C ? C.scalePlane : 1,
@@ -19215,20 +19259,20 @@ void main(void) {
19215
19259
  a.current = !0;
19216
19260
  const T = RoadWay$2.decode(new Uint8Array(y));
19217
19261
  console.log(T), f(T.name);
19218
- const { boxes: M } = T, A = [], P = [], E = [], O = [], F = [], L = [], w = [], B = [], D = [];
19219
- let W = 0, ie = 0, ne = 0;
19220
- const U = T.position ? new Vector3(T.position.x, T.position.y, T.position.z) : new Vector3(0, 0, 0);
19221
- return M.forEach((re) => {
19222
- var xe, fe, V, Y, ye, q;
19223
- const { topMesh: te, bottomMesh: Q, sideMesh: J } = re;
19224
- let de = 0;
19225
- te && te.vertices && te.indices && te.colors && (A.push(...te.vertices), P.push(...te.indices.map((se) => se + W)), E.push(...te.colors), de = Math.max(...te.indices)), W += de + 1;
19226
- let ee = 0;
19227
- J && J.vertices && J.indices && J.colors && (O.push(...J.vertices), F.push(...J.indices.map((se) => se + ie)), L.push(...J.colors), ee = Math.max(...J.indices)), ie += ee + 1;
19262
+ const { boxes: M } = T, A = [], P = [], E = [], O = [], F = [], w = [], L = [], B = [], D = [];
19263
+ let W = 0, ie = 0, ee = 0;
19264
+ const H = T.position ? new Vector3(T.position.x, T.position.y, T.position.z) : new Vector3(0, 0, 0);
19265
+ return M.forEach((oe) => {
19266
+ var xe, fe, V, Y, _e, ye;
19267
+ const { topMesh: te, bottomMesh: Q, sideMesh: J } = oe;
19268
+ let ce = 0;
19269
+ te && te.vertices && te.indices && te.colors && (A.push(...te.vertices), P.push(...te.indices.map((q) => q + W)), E.push(...te.colors), ce = Math.max(...te.indices)), W += ce + 1;
19270
+ let j = 0;
19271
+ J && J.vertices && J.indices && J.colors && (O.push(...J.vertices), F.push(...J.indices.map((q) => q + ie)), w.push(...J.colors), j = Math.max(...J.indices)), ie += j + 1;
19228
19272
  let G = 0;
19229
- if (Q && Q.vertices && Q.indices && Q.colors && (w.push(...Q.vertices), B.push(...Q.indices.map((se) => se + ne)), D.push(...Q.colors), G = Math.max(...Q.indices)), ne += G + 1, (C == null ? void 0 : C.nameList.length) > 0 && re.name && C.nameList.includes(re.name)) {
19230
- const se = new Vector3((xe = re.startPosition) == null ? void 0 : xe.x, (fe = re.startPosition) == null ? void 0 : fe.y, (V = re.startPosition) == null ? void 0 : V.z), ce = new Vector3((Y = re.endPosition) == null ? void 0 : Y.x, (ye = re.endPosition) == null ? void 0 : ye.y, (q = re.endPosition) == null ? void 0 : q.z), j = se.add(ce).scale(0.5);
19231
- l((Ce) => [...Ce, { name: re.name, position: j }]);
19273
+ if (Q && Q.vertices && Q.indices && Q.colors && (L.push(...Q.vertices), B.push(...Q.indices.map((q) => q + ee)), D.push(...Q.colors), G = Math.max(...Q.indices)), ee += G + 1, (C == null ? void 0 : C.nameList.length) > 0 && oe.name && C.nameList.includes(oe.name)) {
19274
+ const q = new Vector3((xe = oe.startPosition) == null ? void 0 : xe.x, (fe = oe.startPosition) == null ? void 0 : fe.y, (V = oe.startPosition) == null ? void 0 : V.z), ue = new Vector3((Y = oe.endPosition) == null ? void 0 : Y.x, (_e = oe.endPosition) == null ? void 0 : _e.y, (ye = oe.endPosition) == null ? void 0 : ye.z), ne = q.add(ue).scale(0.5);
19275
+ l((de) => [...de, { name: oe.name, position: ne }]);
19232
19276
  }
19233
19277
  }), n({
19234
19278
  top: {
@@ -19239,14 +19283,14 @@ void main(void) {
19239
19283
  side: {
19240
19284
  vertices: O,
19241
19285
  indices: F,
19242
- colors: L
19286
+ colors: w
19243
19287
  },
19244
19288
  bottom: {
19245
- vertices: w,
19289
+ vertices: L,
19246
19290
  indices: B,
19247
19291
  colors: D
19248
19292
  }
19249
- }), o(U), () => {
19293
+ }), o(H), () => {
19250
19294
  a.current = !1, n({
19251
19295
  top: {
19252
19296
  vertices: [],
@@ -19585,11 +19629,11 @@ void main(void) {
19585
19629
  }, RoadWayNearAnimation$1 = RoadWayNearAnimation;
19586
19630
  class AnimationClipPlaneHelper {
19587
19631
  constructor(t, n, i) {
19588
- ue(this, "sourceVertex");
19589
- ue(this, "targetVertex");
19590
- ue(this, "meshCurrent");
19632
+ le(this, "sourceVertex");
19633
+ le(this, "targetVertex");
19634
+ le(this, "meshCurrent");
19591
19635
  // 实际无需使用的 influence 属性,但为了防止 Tree-Shaking 移除该属性,进行了定义
19592
- ue(this, "_influence", 0);
19636
+ le(this, "_influence", 0);
19593
19637
  this.sourceVertex = t, this.targetVertex = n, this.meshCurrent = i;
19594
19638
  }
19595
19639
  set influence(t) {
@@ -19923,11 +19967,11 @@ const SpaceHeat = ({
19923
19967
  A.vRadius * o
19924
19968
  );
19925
19969
  if (Matrix.Compose(F, O, E).copyToArray(T, P * 16), t) {
19926
- const w = f.colorCodecs[t].array, B = w[Math.floor(A.vColor * (w.length - 1))];
19970
+ const L = f.colorCodecs[t].array, B = L[Math.floor(A.vColor * (L.length - 1))];
19927
19971
  M.set([B.r, B.g, B.b, n], P * 4);
19928
19972
  } else {
19929
- const w = f.colorIDs[A.colorId];
19930
- M.set([w.r, w.g, w.b, n], P * 4);
19973
+ const L = f.colorIDs[A.colorId];
19974
+ M.set([L.r, L.g, L.b, n], P * 4);
19931
19975
  }
19932
19976
  }
19933
19977
  }), C && (C.thinInstanceSetBuffer("matrix", T), C.thinInstanceSetBuffer("color", M, 4)), Tags.RemoveTagsFrom(C, "loading"), x == null || x.addMesh(C, Color3.White()), () => {
@@ -20051,7 +20095,7 @@ const TileMap = ({
20051
20095
  let A = 0, P = 0;
20052
20096
  for (let O = 0; O < u.h; O++)
20053
20097
  for (let F = 0; F < u.w; F++) {
20054
- const L = new SubMesh(
20098
+ const w = new SubMesh(
20055
20099
  A++,
20056
20100
  0,
20057
20101
  y,
@@ -20059,18 +20103,18 @@ const TileMap = ({
20059
20103
  T,
20060
20104
  N
20061
20105
  );
20062
- M.push(L), P += T;
20106
+ M.push(w), P += T;
20063
20107
  }
20064
20108
  const E = [];
20065
20109
  return [...Array(u.h).keys()].flatMap((O) => [...Array(u.w).keys()].map((F) => {
20066
- const L = new StandardMaterial(`tileMap-material-${O}-${F}`), w = [
20110
+ const w = new StandardMaterial(`tileMap-material-${O}-${F}`), L = [
20067
20111
  `${t}/${s}/${l + F}/${c - O}.png`,
20068
20112
  `${t}/appmaptile?z=${s}&x=${l + F}&y=${c - O}&style=6`
20069
20113
  ];
20070
- return L.diffuseTexture = new Texture(
20071
- w[w != null && w[e - 1] ? e - 1 : 0],
20114
+ return w.diffuseTexture = new Texture(
20115
+ L[L != null && L[e - 1] ? e - 1 : 0],
20072
20116
  m
20073
- ), L.diffuseTexture.wrapU = Texture.CLAMP_ADDRESSMODE, L.diffuseTexture.wrapV = Texture.CLAMP_ADDRESSMODE, L.specularColor = Color3.Black(), L.backFaceCulling = !1, L;
20117
+ ), w.diffuseTexture.wrapU = Texture.CLAMP_ADDRESSMODE, w.diffuseTexture.wrapV = Texture.CLAMP_ADDRESSMODE, w.specularColor = Color3.Black(), w.backFaceCulling = !1, w;
20074
20118
  })).forEach((O) => {
20075
20119
  E.push(O);
20076
20120
  }), S(M), g(E), N.subMeshes = M, R.subMaterials = E, () => {
@@ -20471,14 +20515,14 @@ const TubeComponent$2 = (e, t) => {
20471
20515
  (R = d[O].start) == null ? void 0 : R.x,
20472
20516
  (y = d[O].start) == null ? void 0 : y.y,
20473
20517
  (T = d[O].start) == null ? void 0 : T.z
20474
- ).add(h).multiply(calcTransformNodeScale(i)), L = new Vector3(
20518
+ ).add(h).multiply(calcTransformNodeScale(i)), w = new Vector3(
20475
20519
  (M = d[O].end) == null ? void 0 : M.x,
20476
20520
  (A = d[O].end) == null ? void 0 : A.y,
20477
20521
  (P = d[O].end) == null ? void 0 : P.z
20478
- ).add(h).multiply(calcTransformNodeScale(i)), w = MeshBuilder.CreateTube(
20522
+ ).add(h).multiply(calcTransformNodeScale(i)), L = MeshBuilder.CreateTube(
20479
20523
  "boundingbox-tmp",
20480
20524
  {
20481
- path: [F, L],
20525
+ path: [F, w],
20482
20526
  radiusFunction: () => {
20483
20527
  const D = d[O].radius;
20484
20528
  return D || 1;
@@ -20488,8 +20532,8 @@ const TubeComponent$2 = (e, t) => {
20488
20532
  sideOrientation: Mesh$1.DOUBLESIDE
20489
20533
  },
20490
20534
  t
20491
- ), B = w.getBoundingInfo().intersectsPoint(E);
20492
- if (w.dispose(), B) {
20535
+ ), B = L.getBoundingInfo().intersectsPoint(E);
20536
+ if (L.dispose(), B) {
20493
20537
  _.onHover(
20494
20538
  x,
20495
20539
  new Vector2(t == null ? void 0 : t.pointerX, t == null ? void 0 : t.pointerY),
@@ -20602,24 +20646,24 @@ const TubeComponent$2 = (e, t) => {
20602
20646
  }
20603
20647
  );
20604
20648
  }, TubeTitle$1 = forwardRef(TubeTitle), Tube = (e) => {
20605
- var ee, G, xe, fe;
20649
+ var j, G, xe, fe;
20606
20650
  const t = useScene(), [n, i] = useState([]), [r, o] = useState([]), [a, s] = useState([]), l = useRef(null), c = useRef(null), f = useRef(null), [u, d] = useState(""), [h, m] = useState(new Vector3(0, 0, 0)), _ = useRef(null), v = useRef(null), x = useRef(null), [g, C] = useState([]), S = useRef(!1), N = useContext(WorkspaceMetaContext), [R, y] = useState([]), [T, M] = useState(!1), [A, P] = useState(!1), {
20607
20651
  id: E,
20608
20652
  url: O,
20609
20653
  color: F,
20610
- visible: L = !0,
20611
- materialType: w = "custom",
20654
+ visible: w = !0,
20655
+ materialType: L = "custom",
20612
20656
  children: B,
20613
20657
  style: D,
20614
20658
  actions: W,
20615
20659
  noLod: ie = !1,
20616
- lodDistance: ne = [200, 1e3],
20617
- loadDistance: U = 0,
20618
- offset: re = new Vector3(0, 0, 0),
20660
+ lodDistance: ee = [200, 1e3],
20661
+ loadDistance: H = 0,
20662
+ offset: oe = new Vector3(0, 0, 0),
20619
20663
  position: te,
20620
20664
  topPosition: Q,
20621
20665
  bottomPosition: J,
20622
- isRegular: de = !0
20666
+ isRegular: ce = !0
20623
20667
  } = e;
20624
20668
  return useEffect(() => {
20625
20669
  te && Q && J ? (l.current = te, c.current = Q, f.current = J) : P(!0);
@@ -20627,51 +20671,51 @@ const TubeComponent$2 = (e, t) => {
20627
20671
  !S.current && A && (S.current = !0, axios.get(O, {
20628
20672
  responseType: "arraybuffer"
20629
20673
  }).then((V) => {
20630
- var ce, j, Ce, _e, be, Se, Te, Pe, Ae;
20674
+ var ue, ne, de, Te, Ce, be, Se, Pe, Re;
20631
20675
  const Y = Tube$2.decode(new Uint8Array(V.data));
20632
20676
  console.log(Y);
20633
- const ye = Y.sliceList[0], q = Y.sliceList[Y.sliceList.length - 1];
20677
+ const _e = Y.sliceList[0], ye = Y.sliceList[Y.sliceList.length - 1];
20634
20678
  d(Y.name);
20635
- const se = e.style.basePosition && e.style.basePosition === "top" ? ye.start : q.end;
20636
- m(new Vector3(se == null ? void 0 : se.x, se == null ? void 0 : se.y, se == null ? void 0 : se.z)), l.current = new Vector3((ce = Y.origin) == null ? void 0 : ce.x, (j = Y.origin) == null ? void 0 : j.y, (Ce = Y.origin) == null ? void 0 : Ce.z).add(
20637
- re
20679
+ const q = e.style.basePosition && e.style.basePosition === "top" ? _e.start : ye.end;
20680
+ m(new Vector3(q == null ? void 0 : q.x, q == null ? void 0 : q.y, q == null ? void 0 : q.z)), l.current = new Vector3((ue = Y.origin) == null ? void 0 : ue.x, (ne = Y.origin) == null ? void 0 : ne.y, (de = Y.origin) == null ? void 0 : de.z).add(
20681
+ oe
20638
20682
  ), C(Y.sliceList.filter((Me) => Me.v)), c.current = new Vector3(
20639
- (_e = ye.start) == null ? void 0 : _e.x,
20640
- (be = ye.start) == null ? void 0 : be.y,
20641
- (Se = ye.start) == null ? void 0 : Se.z
20683
+ (Te = _e.start) == null ? void 0 : Te.x,
20684
+ (Ce = _e.start) == null ? void 0 : Ce.y,
20685
+ (be = _e.start) == null ? void 0 : be.z
20642
20686
  ).add(l.current), f.current = new Vector3(
20643
- (Te = q.end) == null ? void 0 : Te.x,
20644
- (Pe = q.end) == null ? void 0 : Pe.y,
20645
- (Ae = q.end) == null ? void 0 : Ae.z
20687
+ (Se = ye.end) == null ? void 0 : Se.x,
20688
+ (Pe = ye.end) == null ? void 0 : Pe.y,
20689
+ (Re = ye.end) == null ? void 0 : Re.z
20646
20690
  ).add(l.current), y(Y.meshs), i(Y.vertices), o(
20647
- w === "custom" ? correctTubeMainIndices(Y.indices) : Y.indices
20691
+ L === "custom" ? correctTubeMainIndices(Y.indices) : Y.indices
20648
20692
  ), s(Y.colors);
20649
20693
  }));
20650
- }, [O, t, F, w, e.style.basePosition, re, A, N]), useEffect(() => {
20694
+ }, [O, t, F, L, e.style.basePosition, oe, A, N]), useEffect(() => {
20651
20695
  const V = setInterval(() => {
20652
- var Y, ye, q, se, ce, j, Ce, _e, be, Se, Te, Pe, Ae, Me;
20696
+ var Y, _e, ye, q, ue, ne, de, Te, Ce, be, Se, Pe, Re, Me;
20653
20697
  if (t && t.cameras.length > 0 && t.activeCamera && l.current && c.current && f.current) {
20654
- const Ie = calcLodDistance(
20698
+ const Ee = calcLodDistance(
20655
20699
  c.current.multiply(calcTransformNodeScale(N)),
20656
20700
  l.current.multiply(calcTransformNodeScale(N)),
20657
20701
  f.current.multiply(calcTransformNodeScale(N)),
20658
20702
  t.activeCamera.position
20659
20703
  );
20660
- Ie >= U && P(!0), ie ? (R.length === 0 ? ((Y = _.current) == null || Y.setEnabled(!0), (ye = v.current) == null || ye.setEnabled(!1)) : ((q = _.current) == null || q.setEnabled(!1), (se = v.current) == null || se.setEnabled(!0)), (ce = x.current) == null || ce.setEnabled(!0)) : Ie < ne[0] ? (M(!0), (j = _.current) == null || j.setEnabled(!0), (Ce = v.current) == null || Ce.setEnabled(R.length === 0), (_e = x.current) == null || _e.setEnabled(!0)) : ne[1] && Ie < ne[1] ? ((be = _.current) == null || be.setEnabled(!1), (Se = v.current) == null || Se.setEnabled(!0), (Te = x.current) == null || Te.setEnabled(!0)) : ((Pe = _.current) == null || Pe.setEnabled(!1), (Ae = v.current) == null || Ae.setEnabled(!1), (Me = x.current) == null || Me.setEnabled(!1));
20704
+ Ee >= H && P(!0), ie ? (R.length === 0 ? ((Y = _.current) == null || Y.setEnabled(!0), (_e = v.current) == null || _e.setEnabled(!1)) : ((ye = _.current) == null || ye.setEnabled(!1), (q = v.current) == null || q.setEnabled(!0)), (ue = x.current) == null || ue.setEnabled(!0)) : Ee < ee[0] ? (M(!0), (ne = _.current) == null || ne.setEnabled(!0), (de = v.current) == null || de.setEnabled(R.length === 0), (Te = x.current) == null || Te.setEnabled(!0)) : ee[1] && Ee < ee[1] ? ((Ce = _.current) == null || Ce.setEnabled(!1), (be = v.current) == null || be.setEnabled(!0), (Se = x.current) == null || Se.setEnabled(!0)) : ((Pe = _.current) == null || Pe.setEnabled(!1), (Re = v.current) == null || Re.setEnabled(!1), (Me = x.current) == null || Me.setEnabled(!1));
20661
20705
  }
20662
20706
  }, 1e3);
20663
20707
  return () => {
20664
20708
  clearInterval(V);
20665
20709
  };
20666
- }, [U, ne, R.length, N, t]), /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsxs("transformNode", { name: `tube-${E} `, children: [
20710
+ }, [H, ee, R.length, N, t]), /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsxs("transformNode", { name: `tube-${E} `, children: [
20667
20711
  /* @__PURE__ */ jsxs(
20668
20712
  TubeComponent$3,
20669
20713
  {
20670
20714
  id: E,
20671
20715
  name: u,
20672
- visible: L,
20673
- position: (ee = l.current) != null ? ee : new Vector3(0, 0, 0),
20674
- isRegular: de,
20716
+ visible: w,
20717
+ position: (j = l.current) != null ? j : new Vector3(0, 0, 0),
20718
+ isRegular: ce,
20675
20719
  children: [
20676
20720
  A && /* @__PURE__ */ jsx(
20677
20721
  TubeTitle$1,
@@ -20688,14 +20732,14 @@ const TubeComponent$2 = (e, t) => {
20688
20732
  ref: x
20689
20733
  }
20690
20734
  ),
20691
- T && A && ne[0] && R.length > 0 && /* @__PURE__ */ jsx(
20735
+ T && A && ee[0] && R.length > 0 && /* @__PURE__ */ jsx(
20692
20736
  TubeLod$1,
20693
20737
  {
20694
20738
  id: E,
20695
20739
  name: u,
20696
20740
  meshs: R,
20697
20741
  position: (xe = l.current) != null ? xe : new Vector3(0, 0, 0),
20698
- materialType: w,
20742
+ materialType: L,
20699
20743
  slices: g,
20700
20744
  actions: W,
20701
20745
  ref: _
@@ -20713,7 +20757,7 @@ const TubeComponent$2 = (e, t) => {
20713
20757
  color: F ? new Color3(F.r, F.g, F.b) : void 0,
20714
20758
  slices: g,
20715
20759
  actions: W,
20716
- materialType: w,
20760
+ materialType: L,
20717
20761
  ref: v
20718
20762
  }
20719
20763
  )
@@ -21142,7 +21186,7 @@ void main(void) {
21142
21186
  offset: T = new Vector3(0, 0, 0),
21143
21187
  direction: M = "right"
21144
21188
  } = e, A = useCachedBinary({ url: g, cacheType: CacheType.EXACTLY_MATCH }), P = useCallback(
21145
- (L, w, B, D, W = !0) => {
21189
+ (w, L, B, D, W = !0) => {
21146
21190
  if (t) {
21147
21191
  const ie = MeshBuilder.CreateRibbon(
21148
21192
  "ribbon",
@@ -21151,25 +21195,25 @@ void main(void) {
21151
21195
  sideOrientation: W ? Mesh$1.FRONTSIDE : Mesh$1.DOUBLESIDE
21152
21196
  },
21153
21197
  t
21154
- ), ne = ie.getVerticesData(VertexBuffer.PositionKind), U = ie.getIndices();
21155
- if (ne && U) {
21156
- const re = buildTubeChartColors(
21157
- ne,
21198
+ ), ee = ie.getVerticesData(VertexBuffer.PositionKind), H = ie.getIndices();
21199
+ if (ee && H) {
21200
+ const oe = buildTubeChartColors(
21201
+ ee,
21158
21202
  (J) => {
21159
21203
  if (R && v && v[R]) {
21160
- const de = L.max, ee = L.min;
21204
+ const ce = w.max, j = w.min;
21161
21205
  let G = new Color3(1, 1, 1);
21162
- return ee === ee ? G = v[R].array[v[R].array.length - 1] : G = v[R].array[Math.trunc(
21163
- (L.chart[J].value - ee) / (de - ee) * (v[R].array.length - 1)
21206
+ return j === j ? G = v[R].array[v[R].array.length - 1] : G = v[R].array[Math.trunc(
21207
+ (w.chart[J].value - j) / (ce - j) * (v[R].array.length - 1)
21164
21208
  )], new Color4(G.r, G.g, G.b, 1);
21165
21209
  }
21166
- return C ? C(w[J], J, L.max, L.min) : colorMapTubeChart();
21210
+ return C ? C(L[J], J, w.max, w.min) : colorMapTubeChart();
21167
21211
  },
21168
21212
  W
21169
- ), te = [], Q = ne.length / 3;
21213
+ ), te = [], Q = ee.length / 3;
21170
21214
  for (let J = 0; J < Q; J++)
21171
21215
  J >= Q / 2 ? te.push(D[J - Q / 2].x - B[J - Q / 2].x, 1) : te.push(0, 1);
21172
- i(ne.slice()), o(U.slice()), s(re), c(te);
21216
+ i(ee.slice()), o(H.slice()), s(oe), c(te);
21173
21217
  }
21174
21218
  t == null || t.removeMesh(ie);
21175
21219
  }
@@ -21177,9 +21221,9 @@ void main(void) {
21177
21221
  [C, v, R, t]
21178
21222
  );
21179
21223
  useEffect(() => {
21180
- var L, w, B, D, W;
21224
+ var w, L, B, D, W;
21181
21225
  if (A) {
21182
- const ie = TubeChart$2.decode(new Uint8Array(A)), ne = y / (ie.max - ie.min), U = ie.min < 0 ? -ie.min : 0, re = M === "right" ? y / 2 : y;
21226
+ const ie = TubeChart$2.decode(new Uint8Array(A)), ee = y / (ie.max - ie.min), H = ie.min < 0 ? -ie.min : 0, oe = M === "right" ? y / 2 : y;
21183
21227
  console.log(ie);
21184
21228
  const te = [], Q = ie.chart.map((G) => {
21185
21229
  const xe = G.position ? G.position : {
@@ -21187,20 +21231,20 @@ void main(void) {
21187
21231
  y: 0,
21188
21232
  z: 0
21189
21233
  };
21190
- return te.push(G.value), new Vector3(xe.x - re, xe.y + 10, xe.z);
21234
+ return te.push(G.value), new Vector3(xe.x - oe, xe.y + 10, xe.z);
21191
21235
  }), J = ie.chart.map((G) => {
21192
21236
  const xe = G.position ? G.position : {
21193
21237
  x: 0,
21194
21238
  y: 0,
21195
21239
  z: 0
21196
- }, fe = M === "right" ? (G.value + U) * ne : -(G.value + U) * ne;
21197
- return new Vector3(xe.x + fe - re, xe.y + 10, xe.z);
21240
+ }, fe = M === "right" ? (G.value + H) * ee : -(G.value + H) * ee;
21241
+ return new Vector3(xe.x + fe - oe, xe.y + 10, xe.z);
21198
21242
  });
21199
21243
  _(ie.name), u(
21200
- new Vector3((L = ie.origin) == null ? void 0 : L.x, (w = ie.origin) == null ? void 0 : w.y, (B = ie.origin) == null ? void 0 : B.z).add(T)
21244
+ new Vector3((w = ie.origin) == null ? void 0 : w.x, (L = ie.origin) == null ? void 0 : L.y, (B = ie.origin) == null ? void 0 : B.z).add(T)
21201
21245
  );
21202
- const de = y / 2 - ((D = e.style) != null && D.fontSize ? e.style.fontSize / 2 : 0), ee = Q[Q.length - 1].add(new Vector3(M === "right" ? de : -de, 0, 0)).add((W = e.style) != null && W.offset ? e.style.offset : new Vector3(0, 0, 0));
21203
- h(new Vector3(ee.x, ee.y, ee.z)), P(
21246
+ const ce = y / 2 - ((D = e.style) != null && D.fontSize ? e.style.fontSize / 2 : 0), j = Q[Q.length - 1].add(new Vector3(M === "right" ? ce : -ce, 0, 0)).add((W = e.style) != null && W.offset ? e.style.offset : new Vector3(0, 0, 0));
21247
+ h(new Vector3(j.x, j.y, j.z)), P(
21204
21248
  ie,
21205
21249
  te,
21206
21250
  Q.splice(0, Q.length),
@@ -21222,11 +21266,11 @@ void main(void) {
21222
21266
  const E = useCallback(() => {
21223
21267
  }, []);
21224
21268
  return useEffect(() => {
21225
- const L = () => {
21269
+ const w = () => {
21226
21270
  E();
21227
21271
  };
21228
- return t && t.activeCamera && (L(), t == null || t.activeCamera.onViewMatrixChangedObservable.add(L)), () => {
21229
- t && t.activeCamera && (t == null || t.activeCamera.onViewMatrixChangedObservable.removeCallback(L));
21272
+ return t && t.activeCamera && (w(), t == null || t.activeCamera.onViewMatrixChangedObservable.add(w)), () => {
21273
+ t && t.activeCamera && (t == null || t.activeCamera.onViewMatrixChangedObservable.removeCallback(w));
21230
21274
  };
21231
21275
  }, [E, t]), /* @__PURE__ */ jsx(Fragment, { children: S && n.length > 0 && a.length > 0 && /* @__PURE__ */ jsx(
21232
21276
  TubeChartComponent$1,
@@ -21290,19 +21334,19 @@ void main(void) {
21290
21334
  return useEffect(() => {
21291
21335
  var S, N, R, y, T, M, A, P;
21292
21336
  if (v) {
21293
- const E = TubeChart$2.decode(new Uint8Array(v)), O = _ / (E.max - E.min), F = E.min < 0 ? -E.min : 0, L = new Vector3(
21337
+ const E = TubeChart$2.decode(new Uint8Array(v)), O = _ / (E.max - E.min), F = E.min < 0 ? -E.min : 0, w = new Vector3(
21294
21338
  (S = E.origin) == null ? void 0 : S.x,
21295
21339
  (N = E.origin) == null ? void 0 : N.y,
21296
21340
  (R = E.origin) == null ? void 0 : R.z
21297
21341
  ).add(h);
21298
- i(L);
21299
- const w = E.chart, B = [];
21300
- for (let W = 0; W < w.length; W++)
21342
+ i(w);
21343
+ const L = E.chart, B = [];
21344
+ for (let W = 0; W < L.length; W++)
21301
21345
  B.push(
21302
- L.add(new Vector3((y = w[W].position) == null ? void 0 : y.x, (T = w[W].position) == null ? void 0 : T.y, (M = w[W].position) == null ? void 0 : M.z)).add(new Vector3((w[W].value + F) * O, 0, 0)).multiply(calcTransformNodeScale(x))
21346
+ w.add(new Vector3((y = L[W].position) == null ? void 0 : y.x, (T = L[W].position) == null ? void 0 : T.y, (M = L[W].position) == null ? void 0 : M.z)).add(new Vector3((L[W].value + F) * O, 0, 0)).multiply(calcTransformNodeScale(x))
21303
21347
  );
21304
21348
  c([B]);
21305
- const D = w[w.length - 1].position;
21349
+ const D = L[L.length - 1].position;
21306
21350
  if (D) {
21307
21351
  const W = new Vector3(D.x, D.y, D.z).add(
21308
21352
  new Vector3(_ / 2 - ((A = e.style) != null && A.fontSize ? e.style.fontSize / 2 : 0), 0, 0)
@@ -21506,41 +21550,41 @@ const TubeComponent = (e, t) => {
21506
21550
  onHover: (S, N, R, y, T) => {
21507
21551
  var M, A, P, E, O, F;
21508
21552
  if (x.onHover && n && g && R) {
21509
- const L = R;
21510
- for (let w = 0; w < g.length; w++) {
21553
+ const w = R;
21554
+ for (let L = 0; L < g.length; L++) {
21511
21555
  const B = new Vector3(
21512
- (M = g[w].start) == null ? void 0 : M.x,
21513
- (A = g[w].start) == null ? void 0 : A.y,
21514
- (P = g[w].start) == null ? void 0 : P.z
21556
+ (M = g[L].start) == null ? void 0 : M.x,
21557
+ (A = g[L].start) == null ? void 0 : A.y,
21558
+ (P = g[L].start) == null ? void 0 : P.z
21515
21559
  ).add(u).multiply(calcTransformNodeScale(o)), D = new Vector3(
21516
- (E = g[w].end) == null ? void 0 : E.x,
21517
- (O = g[w].end) == null ? void 0 : O.y,
21518
- (F = g[w].end) == null ? void 0 : F.z
21560
+ (E = g[L].end) == null ? void 0 : E.x,
21561
+ (O = g[L].end) == null ? void 0 : O.y,
21562
+ (F = g[L].end) == null ? void 0 : F.z
21519
21563
  ).add(u).multiply(calcTransformNodeScale(o)), W = Math.sqrt(
21520
21564
  Math.pow(B.x - D.x, 2) + Math.pow(B.y - D.y, 2) + Math.pow(B.z - D.z, 2)
21521
21565
  ), ie = new Vector3(
21522
21566
  B.x,
21523
21567
  B.y - W,
21524
21568
  B.z
21525
- ), ne = D.subtract(B), U = ie.subtract(B), re = L.subtract(B), te = Vector3.Cross(
21526
- ne,
21527
- U
21569
+ ), ee = D.subtract(B), H = ie.subtract(B), oe = w.subtract(B), te = Vector3.Cross(
21570
+ ee,
21571
+ H
21528
21572
  ), Q = Math.acos(
21529
21573
  Vector3.Dot(
21530
- ne.normalize(),
21531
- U.normalize()
21574
+ ee.normalize(),
21575
+ H.normalize()
21532
21576
  )
21533
- ), J = Matrix.RotationAxis(te, Q), de = Vector3.TransformCoordinates(
21534
- re,
21577
+ ), J = Matrix.RotationAxis(te, Q), ce = Vector3.TransformCoordinates(
21578
+ oe,
21535
21579
  J
21536
21580
  );
21537
- if (0 >= de.y && -W <= de.y) {
21581
+ if (0 >= ce.y && -W <= ce.y) {
21538
21582
  x.onHover(
21539
21583
  S,
21540
21584
  N,
21541
21585
  R,
21542
21586
  y,
21543
- g[w],
21587
+ g[L],
21544
21588
  T
21545
21589
  );
21546
21590
  break;
@@ -21659,7 +21703,7 @@ const TubeComponent = (e, t) => {
21659
21703
  }
21660
21704
  );
21661
21705
  }, TubeLayerComponent$1 = forwardRef(TubeLayerComponent), TubeLayer$2 = (e) => {
21662
- var P, E, O, F, L;
21706
+ var P, E, O, F, w;
21663
21707
  const t = useScene(), [n, i] = useState([]), [r, o] = useState([]), [a, s] = useState([]), [l, c] = useState(), [f, u] = useState([]), [d, h] = useState(0), [m, _] = useState(), { colorIDs: v } = useContext(ColorProviderContext), {
21664
21708
  id: x,
21665
21709
  url: g,
@@ -21672,22 +21716,22 @@ const TubeComponent = (e, t) => {
21672
21716
  actions: M
21673
21717
  } = e, A = useCachedBinary({ url: g, cacheType: CacheType.EXACTLY_MATCH });
21674
21718
  return useEffect(() => {
21675
- var w, B, D, W, ie, ne;
21719
+ var L, B, D, W, ie, ee;
21676
21720
  if (A) {
21677
- const U = Layer.decode(new Uint8Array(A)), re = [];
21678
- U.layerList.forEach((fe, V) => {
21679
- var Y, ye, q, se, ce, j;
21680
- re.push(fe), V < U.layerList.length && re.push({
21721
+ const H = Layer.decode(new Uint8Array(A)), oe = [];
21722
+ H.layerList.forEach((fe, V) => {
21723
+ var Y, _e, ye, q, ue, ne;
21724
+ oe.push(fe), V < H.layerList.length && oe.push({
21681
21725
  ...fe,
21682
21726
  name: fe.name + "opacity",
21683
21727
  start: {
21684
- x: (ye = (Y = fe == null ? void 0 : fe.end) == null ? void 0 : Y.x) != null ? ye : 0,
21685
- y: (se = (q = fe == null ? void 0 : fe.end) == null ? void 0 : q.y) != null ? se : 0,
21686
- z: (j = (ce = fe == null ? void 0 : fe.end) == null ? void 0 : ce.z) != null ? j : 0
21728
+ x: (_e = (Y = fe == null ? void 0 : fe.end) == null ? void 0 : Y.x) != null ? _e : 0,
21729
+ y: (q = (ye = fe == null ? void 0 : fe.end) == null ? void 0 : ye.y) != null ? q : 0,
21730
+ z: (ne = (ue = fe == null ? void 0 : fe.end) == null ? void 0 : ue.z) != null ? ne : 0
21687
21731
  }
21688
21732
  });
21689
21733
  });
21690
- const te = re.map((fe) => {
21734
+ const te = oe.map((fe) => {
21691
21735
  const V = fe.start ? fe.start : {
21692
21736
  x: 0,
21693
21737
  y: 0,
@@ -21700,7 +21744,7 @@ const TubeComponent = (e, t) => {
21700
21744
  path: te,
21701
21745
  radiusFunction: (fe) => {
21702
21746
  var Y;
21703
- const V = (Y = re[fe]) == null ? void 0 : Y.radius;
21747
+ const V = (Y = oe[fe]) == null ? void 0 : Y.radius;
21704
21748
  return V || 1;
21705
21749
  },
21706
21750
  cap: Mesh$1.NO_CAP,
@@ -21708,26 +21752,26 @@ const TubeComponent = (e, t) => {
21708
21752
  sideOrientation: y ? Mesh$1.FRONTSIDE : Mesh$1.DOUBLESIDE
21709
21753
  },
21710
21754
  t
21711
- ), J = Q.getVerticesData(VertexBuffer.PositionKind), de = T ? correctTubeMainIndices(Q.getIndices()) : Q.getIndices(), ee = C;
21755
+ ), J = Q.getVerticesData(VertexBuffer.PositionKind), ce = T ? correctTubeMainIndices(Q.getIndices()) : Q.getIndices(), j = C;
21712
21756
  let G = [];
21713
21757
  J && (G = buildTubeMainColors(
21714
21758
  J,
21715
- re.map((fe) => {
21716
- const V = ee || (v && v[fe.colorId] ? v[fe.colorId] : randomColorMap()), Y = S.findIndex((ye) => ye === fe.name) !== -1 ? V.a : 0;
21759
+ oe.map((fe) => {
21760
+ const V = j || (v && v[fe.colorId] ? v[fe.colorId] : randomColorMap()), Y = S.findIndex((_e) => _e === fe.name) !== -1 ? V.a : 0;
21717
21761
  return new Color4(V.r, V.g, V.b, Y);
21718
21762
  }),
21719
21763
  R,
21720
21764
  !!y
21721
- )), _(U), i(J ? J.slice() : []), o(de ? de.slice() : []), s(G), c(new Vector3((w = U.origin) == null ? void 0 : w.x, (B = U.origin) == null ? void 0 : B.y, (D = U.origin) == null ? void 0 : D.z)), t == null || t.removeMesh(Q);
21765
+ )), _(H), i(J ? J.slice() : []), o(ce ? ce.slice() : []), s(G), c(new Vector3((L = H.origin) == null ? void 0 : L.x, (B = H.origin) == null ? void 0 : B.y, (D = H.origin) == null ? void 0 : D.z)), t == null || t.removeMesh(Q);
21722
21766
  const xe = [];
21723
- for (let fe = 0; fe < U.layerList.length; fe++) {
21724
- const V = U.layerList[fe];
21767
+ for (let fe = 0; fe < H.layerList.length; fe++) {
21768
+ const V = H.layerList[fe];
21725
21769
  S.findIndex((Y) => Y === V.name) !== -1 && xe.push({
21726
21770
  name: V.name,
21727
- position: new Vector3((W = V.position) == null ? void 0 : W.x, (ie = V.position) == null ? void 0 : ie.y, (ne = V.position) == null ? void 0 : ne.z)
21771
+ position: new Vector3((W = V.position) == null ? void 0 : W.x, (ie = V.position) == null ? void 0 : ie.y, (ee = V.position) == null ? void 0 : ee.z)
21728
21772
  });
21729
21773
  }
21730
- u(xe), h(U.layerList ? U.layerList[0].radius : 0);
21774
+ u(xe), h(H.layerList ? H.layerList[0].radius : 0);
21731
21775
  }
21732
21776
  }, [g, t, y, R, T, S, v, A, C]), /* @__PURE__ */ jsxs("transformNode", { name: `node-layer-${x}`, children: [
21733
21777
  n.length > 0 && r.length > 0 && /* @__PURE__ */ jsx(
@@ -21756,7 +21800,7 @@ const TubeComponent = (e, t) => {
21756
21800
  fontSize: (P = e.style) == null ? void 0 : P.fontSize,
21757
21801
  color: (E = e.style) == null ? void 0 : E.color,
21758
21802
  offset: (F = (O = e.style) == null ? void 0 : O.offset) == null ? void 0 : F.add(new Vector3(d, 0, 0)),
21759
- showLabel: (L = e.style) == null ? void 0 : L.showLabel
21803
+ showLabel: (w = e.style) == null ? void 0 : w.showLabel
21760
21804
  }
21761
21805
  )
21762
21806
  ] });
@@ -21828,23 +21872,23 @@ const TubeComponent = (e, t) => {
21828
21872
  style: A
21829
21873
  } = e, P = useRef(!1), E = useCallback(
21830
21874
  (F) => {
21831
- var ne, U, re;
21832
- const L = F.sliceList.filter((te) => !(te.v.length > 0)).map((te) => {
21875
+ var ee, H, oe;
21876
+ const w = F.sliceList.filter((te) => !(te.v.length > 0)).map((te) => {
21833
21877
  const Q = te.start ? te.start : {
21834
21878
  x: 0,
21835
21879
  y: 0,
21836
21880
  z: 0
21837
21881
  };
21838
21882
  return new Vector3(Q.x, Q.y, Q.z);
21839
- }), w = F.sliceList[F.sliceList.length - 1];
21840
- if (L.length > 0 && L.push(new Vector3((ne = w.end) == null ? void 0 : ne.x, (U = w.end) == null ? void 0 : U.y, (re = w.end) == null ? void 0 : re.z)), L.length < 1)
21883
+ }), L = F.sliceList[F.sliceList.length - 1];
21884
+ if (w.length > 0 && w.push(new Vector3((ee = L.end) == null ? void 0 : ee.x, (H = L.end) == null ? void 0 : H.y, (oe = L.end) == null ? void 0 : oe.z)), w.length < 1)
21841
21885
  return;
21842
21886
  const B = MeshBuilder.ExtrudeShape(
21843
21887
  "tmp",
21844
21888
  {
21845
- path: L,
21889
+ path: w,
21846
21890
  sideOrientation: Mesh$1.DOUBLESIDE,
21847
- shape: buildSemiRing(w.innerRadius, w.radius, M),
21891
+ shape: buildSemiRing(L.innerRadius, L.radius, M),
21848
21892
  cap: Mesh$1.NO_CAP
21849
21893
  },
21850
21894
  t
@@ -21860,12 +21904,12 @@ const TubeComponent = (e, t) => {
21860
21904
  responseType: "arraybuffer"
21861
21905
  }).then((F) => {
21862
21906
  var B, D, W;
21863
- const L = Tube$2.decode(new Uint8Array(F.data));
21864
- if (console.log(L), L.sliceList.length === 0)
21907
+ const w = Tube$2.decode(new Uint8Array(F.data));
21908
+ if (console.log(w), w.sliceList.length === 0)
21865
21909
  return;
21866
- d(L.name);
21867
- const w = A != null && A.basePosition && A.basePosition === "top" ? L.sliceList[0].start : L.sliceList[L.sliceList.length - 1].end;
21868
- m(new Vector3(w == null ? void 0 : w.x, w == null ? void 0 : w.y, w == null ? void 0 : w.z)), r(new Vector3((B = L.origin) == null ? void 0 : B.x, (D = L.origin) == null ? void 0 : D.y, (W = L.origin) == null ? void 0 : W.z)), E(L);
21910
+ d(w.name);
21911
+ const L = A != null && A.basePosition && A.basePosition === "top" ? w.sliceList[0].start : w.sliceList[w.sliceList.length - 1].end;
21912
+ m(new Vector3(L == null ? void 0 : L.x, L == null ? void 0 : L.y, L == null ? void 0 : L.z)), r(new Vector3((B = w.origin) == null ? void 0 : B.x, (D = w.origin) == null ? void 0 : D.y, (W = w.origin) == null ? void 0 : W.z)), E(w);
21869
21913
  }));
21870
21914
  }, [E, A == null ? void 0 : A.basePosition, S]), useEffect(() => {
21871
21915
  if (n && n.current && t) {
@@ -22208,20 +22252,20 @@ const POINT_TYPE_LOOKUP_TABLE = [
22208
22252
  intersectingLines: E,
22209
22253
  tubeInstances: O,
22210
22254
  optimizer: F,
22211
- voxelGrids: L,
22212
- planeImages: w,
22255
+ voxelGrids: w,
22256
+ planeImages: L,
22213
22257
  guiTexts: B,
22214
22258
  skybox: D,
22215
22259
  particleSystems: W,
22216
22260
  waterEffects: ie,
22217
- modelLoaders: ne,
22218
- modelAnimationLoaders: U,
22219
- roadwayAnimations: re,
22261
+ modelLoaders: ee,
22262
+ modelAnimationLoaders: H,
22263
+ roadwayAnimations: oe,
22220
22264
  roadwayNearAnimations: te,
22221
22265
  roadwayWaterAnimations: Q,
22222
22266
  contourlines: J,
22223
- tubeTools: de,
22224
- tubeOils: ee,
22267
+ tubeTools: ce,
22268
+ tubeOils: j,
22225
22269
  tubeLayers: G,
22226
22270
  tubeChartLines: xe,
22227
22271
  tubeCharts: fe
@@ -22258,15 +22302,15 @@ const POINT_TYPE_LOOKUP_TABLE = [
22258
22302
  E ? E.map((V, Y) => /* @__PURE__ */ jsx(IntersectingLine$1, { ...V }, `intersectingLine-${Y}`)) : /* @__PURE__ */ jsx(Fragment, {}),
22259
22303
  O ? O.map((V, Y) => /* @__PURE__ */ jsx(TubeInstance$1, { ...V }, `tubeinstance-${Y}`)) : /* @__PURE__ */ jsx(Fragment, {}),
22260
22304
  F ? /* @__PURE__ */ jsx(Optimizer$1, {}) : /* @__PURE__ */ jsx(Fragment, {}),
22261
- L ? L.map((V, Y) => /* @__PURE__ */ jsx(VoxelGrid$1, { ...V }, `voxelgrid-${Y}`)) : /* @__PURE__ */ jsx(Fragment, {}),
22262
- w ? w.map((V, Y) => /* @__PURE__ */ jsx(PlaneImage$1, { ...V }, `planeimage-${Y}`)) : /* @__PURE__ */ jsx(Fragment, {}),
22305
+ w ? w.map((V, Y) => /* @__PURE__ */ jsx(VoxelGrid$1, { ...V }, `voxelgrid-${Y}`)) : /* @__PURE__ */ jsx(Fragment, {}),
22306
+ L ? L.map((V, Y) => /* @__PURE__ */ jsx(PlaneImage$1, { ...V }, `planeimage-${Y}`)) : /* @__PURE__ */ jsx(Fragment, {}),
22263
22307
  B ? B.map((V, Y) => /* @__PURE__ */ jsx(TransformGUIText$1, { ...V }, `guitext-${Y}`)) : /* @__PURE__ */ jsx(Fragment, {}),
22264
22308
  D && /* @__PURE__ */ jsx(SkyBox$1, { ...D }),
22265
22309
  W ? W.map((V, Y) => /* @__PURE__ */ jsx(ParticleSystem$1, { ...V }, `particlesystem-${Y}`)) : /* @__PURE__ */ jsx(Fragment, {}),
22266
22310
  ie ? ie.map((V, Y) => /* @__PURE__ */ jsx(WaterEffect$1, { ...V }, `waterEffect-${Y}`)) : /* @__PURE__ */ jsx(Fragment, {}),
22267
- ne ? ne.map((V, Y) => /* @__PURE__ */ jsx(ModelLoader$1, { ...V }, `modelLoaders-${Y}`)) : /* @__PURE__ */ jsx(Fragment, {}),
22268
- U ? U.map((V, Y) => /* @__PURE__ */ jsx(ModleAnimationLoader, { ...V }, `modelanimtionloader-${Y}`)) : /* @__PURE__ */ jsx(Fragment, {}),
22269
- re ? re.map((V, Y) => /* @__PURE__ */ jsx(Animation$1, { ...V, children: /* @__PURE__ */ jsx(RoadWayAnimation$1, {}) }, `animation-${Y}`)) : /* @__PURE__ */ jsx(Fragment, {}),
22311
+ ee ? ee.map((V, Y) => /* @__PURE__ */ jsx(ModelLoader$1, { ...V }, `modelLoaders-${Y}`)) : /* @__PURE__ */ jsx(Fragment, {}),
22312
+ H ? H.map((V, Y) => /* @__PURE__ */ jsx(ModleAnimationLoader, { ...V }, `modelanimtionloader-${Y}`)) : /* @__PURE__ */ jsx(Fragment, {}),
22313
+ oe ? oe.map((V, Y) => /* @__PURE__ */ jsx(Animation$1, { ...V, children: /* @__PURE__ */ jsx(RoadWayAnimation$1, {}) }, `animation-${Y}`)) : /* @__PURE__ */ jsx(Fragment, {}),
22270
22314
  te ? te.map((V, Y) => /* @__PURE__ */ jsx(Animation$1, { ...V, children: /* @__PURE__ */ jsx(
22271
22315
  RoadWayNearAnimation$1,
22272
22316
  {
@@ -22290,8 +22334,8 @@ const POINT_TYPE_LOOKUP_TABLE = [
22290
22334
  }
22291
22335
  ) }, `animation-${Y}`)) : /* @__PURE__ */ jsx(Fragment, {}),
22292
22336
  J ? J.map((V, Y) => /* @__PURE__ */ jsx(ContourLine$1, { ...V }, `contourline-${Y}`)) : /* @__PURE__ */ jsx(Fragment, {}),
22293
- de ? de.map((V, Y) => /* @__PURE__ */ jsx(TubeTool$1, { ...V }, `tubeTool-${Y}`)) : /* @__PURE__ */ jsx(Fragment, {}),
22294
- ee ? ee.map((V, Y) => /* @__PURE__ */ jsx(TubeOil$1, { ...V, children: V.main ? V.main.map((ye, q) => /* @__PURE__ */ jsx(TubeMain$1, { ...ye }, `tubeMain-${q}`)) : null }, `tubeOil-${Y}`)) : /* @__PURE__ */ jsx(Fragment, {}),
22337
+ ce ? ce.map((V, Y) => /* @__PURE__ */ jsx(TubeTool$1, { ...V }, `tubeTool-${Y}`)) : /* @__PURE__ */ jsx(Fragment, {}),
22338
+ j ? j.map((V, Y) => /* @__PURE__ */ jsx(TubeOil$1, { ...V, children: V.main ? V.main.map((_e, ye) => /* @__PURE__ */ jsx(TubeMain$1, { ..._e }, `tubeMain-${ye}`)) : null }, `tubeOil-${Y}`)) : /* @__PURE__ */ jsx(Fragment, {}),
22295
22339
  G ? G.map((V, Y) => /* @__PURE__ */ jsx(TubeLayer$3, { ...V }, `tubeLayer-${Y}`)) : /* @__PURE__ */ jsx(Fragment, {}),
22296
22340
  xe ? xe.map((V, Y) => /* @__PURE__ */ jsx(TubeChartLine$1, { ...V }, `tubeChartLine-${Y}`)) : /* @__PURE__ */ jsx(Fragment, {}),
22297
22341
  fe ? fe.map((V, Y) => /* @__PURE__ */ jsx(TubeChart$1, { ...V }, `tubeChart-${Y}`)) : /* @__PURE__ */ jsx(Fragment, {})
@@ -22676,9 +22720,9 @@ const TubeLayer = (e) => {
22676
22720
  }, TubeLayer$1 = TubeLayer;
22677
22721
  class Scene {
22678
22722
  constructor(t) {
22679
- ue(this, "children", []);
22680
- ue(this, "params", {});
22681
- ue(this, "ref", createRef());
22723
+ le(this, "children", []);
22724
+ le(this, "params", {});
22725
+ le(this, "ref", createRef());
22682
22726
  this.params = t;
22683
22727
  }
22684
22728
  add(t) {
@@ -22717,9 +22761,9 @@ const Scene$1 = Scene, UpdateComponent = (e, t) => {
22717
22761
  }, UpdateComponent$1 = forwardRef(UpdateComponent);
22718
22762
  class ObjectComponent {
22719
22763
  constructor(t, n) {
22720
- ue(this, "value");
22721
- ue(this, "type");
22722
- ue(this, "ref", createRef());
22764
+ le(this, "value");
22765
+ le(this, "type");
22766
+ le(this, "ref", createRef());
22723
22767
  this.value = t, this.type = n;
22724
22768
  }
22725
22769
  setProps(t) {