@maucwerk/glimmer 1.1.1 → 1.1.2

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,8 +1,8 @@
1
- var Ro = Object.defineProperty;
2
- var Mo = (r, e, t) => e in r ? Ro(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t;
3
- var _ = (r, e, t) => Mo(r, typeof e != "symbol" ? e + "" : e, t);
1
+ var Mo = Object.defineProperty;
2
+ var Lo = (r, e, t) => e in r ? Mo(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t;
3
+ var _ = (r, e, t) => Lo(r, typeof e != "symbol" ? e + "" : e, t);
4
4
  import * as p from "three";
5
- import { Controls as Lo, Vector3 as J, MOUSE as Wt, TOUCH as Bt, Quaternion as ss, Spherical as Yi, Vector2 as Ce, Ray as Co, Plane as Oo, MathUtils as xi, DataTextureLoader as ko, HalfFloatType as ft, FloatType as Ms, DataUtils as dn, LinearSRGBColorSpace as Pe, LinearFilter as Yt, Loader as bi, RGBAFormat as Ki, DataTexture as Do, UVMapping as Io, ClampToEdgeWrapping as Ks, LinearMipMapLinearFilter as No, FileLoader as mn, Mesh as ye, ShaderMaterial as wi, BackSide as zr, UniformsUtils as Ei, BoxGeometry as Ur, Scene as Po, MeshStandardMaterial as is, PointLight as Fr, MeshBasicMaterial as Ht, TrianglesDrawMode as zo, TriangleFanDrawMode as qs, TriangleStripDrawMode as jr, InstancedBufferGeometry as Uo, Float32BufferAttribute as qi, InstancedInterleavedBuffer as Js, InterleavedBufferAttribute as Et, WireframeGeometry as Fo, Box3 as ms, Sphere as Ai, ShaderLib as Jn, UniformsLib as Qn, Vector4 as Dn, Line3 as jo, Matrix4 as pn, LoaderUtils as fn, MeshPhysicalMaterial as qe, Color as lt, SRGBColorSpace as mt, SpotLight as Bo, DirectionalLight as Ho, InstancedMesh as Vo, InstancedBufferAttribute as Go, Object3D as Br, TextureLoader as Zo, ImageBitmapLoader as Wo, BufferAttribute as at, InterleavedBuffer as Xo, LinearMipmapLinearFilter as Hr, NearestMipmapLinearFilter as $o, LinearMipmapNearestFilter as Yo, NearestMipmapNearestFilter as Ko, NearestFilter as Vr, RepeatWrapping as Qs, MirroredRepeatWrapping as qo, PointsMaterial as Jo, Material as Ls, LineBasicMaterial as Qo, DoubleSide as ea, PropertyBinding as ta, BufferGeometry as Ti, SkinnedMesh as na, LineSegments as Gr, Line as sa, LineLoop as ia, Points as ra, Group as Cs, PerspectiveCamera as oa, OrthographicCamera as aa, Skeleton as ca, AnimationClip as la, Bone as da, InterpolateDiscrete as ua, InterpolateLinear as Zr, Texture as Ji, VectorKeyframeTrack as Qi, NumberKeyframeTrack as er, QuaternionKeyframeTrack as tr, ColorManagement as ei, FrontSide as ha, Interpolant as fa } from "three";
5
+ import { Controls as ko, Vector3 as J, MOUSE as Wt, TOUCH as Bt, Quaternion as is, Spherical as Ki, Vector2 as ke, Ray as Co, Plane as Oo, MathUtils as bi, DataTextureLoader as Do, HalfFloatType as ft, FloatType as Ms, DataUtils as dn, LinearSRGBColorSpace as Pe, LinearFilter as Yt, Loader as wi, RGBAFormat as qi, DataTexture as Io, UVMapping as No, ClampToEdgeWrapping as qs, LinearMipMapLinearFilter as Po, FileLoader as mn, Mesh as ye, ShaderMaterial as Ei, BackSide as Ur, UniformsUtils as Ai, BoxGeometry as Fr, Scene as zo, MeshStandardMaterial as rs, PointLight as jr, MeshBasicMaterial as Ht, TrianglesDrawMode as Uo, TriangleFanDrawMode as Js, TriangleStripDrawMode as Br, InstancedBufferGeometry as Fo, Float32BufferAttribute as Ji, InstancedInterleavedBuffer as Qs, InterleavedBufferAttribute as Et, WireframeGeometry as jo, Box3 as ps, Sphere as Ti, ShaderLib as Qn, UniformsLib as es, Vector4 as In, Line3 as Bo, Matrix4 as pn, LoaderUtils as fn, MeshPhysicalMaterial as qe, Color as lt, SRGBColorSpace as mt, SpotLight as Ho, DirectionalLight as Vo, InstancedMesh as Go, InstancedBufferAttribute as Zo, Object3D as Hr, TextureLoader as Wo, ImageBitmapLoader as Xo, BufferAttribute as at, InterleavedBuffer as $o, LinearMipmapLinearFilter as Vr, NearestMipmapLinearFilter as Yo, LinearMipmapNearestFilter as Ko, NearestMipmapNearestFilter as qo, NearestFilter as Gr, RepeatWrapping as ei, MirroredRepeatWrapping as Jo, PointsMaterial as Qo, Material as Ls, LineBasicMaterial as ea, DoubleSide as ta, PropertyBinding as na, BufferGeometry as Si, SkinnedMesh as sa, LineSegments as Zr, Line as ia, LineLoop as ra, Points as oa, Group as ks, PerspectiveCamera as aa, OrthographicCamera as ca, Skeleton as la, AnimationClip as da, Bone as ua, InterpolateDiscrete as ha, InterpolateLinear as Wr, Texture as Qi, VectorKeyframeTrack as er, NumberKeyframeTrack as tr, QuaternionKeyframeTrack as nr, ColorManagement as ti, FrontSide as fa, Interpolant as ma } from "three";
6
6
  var q;
7
7
  (function(r) {
8
8
  r.assertEqual = (s) => s;
@@ -39,15 +39,15 @@ var q;
39
39
  }
40
40
  r.joinValues = n, r.jsonStringifyReplacer = (s, i) => typeof i == "bigint" ? i.toString() : i;
41
41
  })(q || (q = {}));
42
- var ti;
42
+ var ni;
43
43
  (function(r) {
44
44
  r.mergeShapes = (e, t) => ({
45
45
  ...e,
46
46
  ...t
47
47
  // second overwrites first
48
48
  });
49
- })(ti || (ti = {}));
50
- const C = q.arrayToEnum([
49
+ })(ni || (ni = {}));
50
+ const k = q.arrayToEnum([
51
51
  "string",
52
52
  "nan",
53
53
  "number",
@@ -71,23 +71,23 @@ const C = q.arrayToEnum([
71
71
  ]), rt = (r) => {
72
72
  switch (typeof r) {
73
73
  case "undefined":
74
- return C.undefined;
74
+ return k.undefined;
75
75
  case "string":
76
- return C.string;
76
+ return k.string;
77
77
  case "number":
78
- return isNaN(r) ? C.nan : C.number;
78
+ return isNaN(r) ? k.nan : k.number;
79
79
  case "boolean":
80
- return C.boolean;
80
+ return k.boolean;
81
81
  case "function":
82
- return C.function;
82
+ return k.function;
83
83
  case "bigint":
84
- return C.bigint;
84
+ return k.bigint;
85
85
  case "symbol":
86
- return C.symbol;
86
+ return k.symbol;
87
87
  case "object":
88
- return Array.isArray(r) ? C.array : r === null ? C.null : r.then && typeof r.then == "function" && r.catch && typeof r.catch == "function" ? C.promise : typeof Map < "u" && r instanceof Map ? C.map : typeof Set < "u" && r instanceof Set ? C.set : typeof Date < "u" && r instanceof Date ? C.date : C.object;
88
+ return Array.isArray(r) ? k.array : r === null ? k.null : r.then && typeof r.then == "function" && r.catch && typeof r.catch == "function" ? k.promise : typeof Map < "u" && r instanceof Map ? k.map : typeof Set < "u" && r instanceof Set ? k.set : typeof Date < "u" && r instanceof Date ? k.date : k.object;
89
89
  default:
90
- return C.unknown;
90
+ return k.unknown;
91
91
  }
92
92
  }, A = q.arrayToEnum([
93
93
  "invalid_type",
@@ -106,7 +106,7 @@ const C = q.arrayToEnum([
106
106
  "invalid_intersection_types",
107
107
  "not_multiple_of",
108
108
  "not_finite"
109
- ]), ma = (r) => JSON.stringify(r, null, 2).replace(/"([^"]+)":/g, "$1:");
109
+ ]), pa = (r) => JSON.stringify(r, null, 2).replace(/"([^"]+)":/g, "$1:");
110
110
  class De extends Error {
111
111
  get errors() {
112
112
  return this.issues;
@@ -171,7 +171,7 @@ const Kt = (r, e) => {
171
171
  let t;
172
172
  switch (r.code) {
173
173
  case A.invalid_type:
174
- r.received === C.undefined ? t = "Required" : t = `Expected ${r.expected}, received ${r.received}`;
174
+ r.received === k.undefined ? t = "Required" : t = `Expected ${r.expected}, received ${r.received}`;
175
175
  break;
176
176
  case A.invalid_literal:
177
177
  t = `Invalid literal value, expected ${JSON.stringify(r.expected, q.jsonStringifyReplacer)}`;
@@ -223,14 +223,14 @@ const Kt = (r, e) => {
223
223
  }
224
224
  return { message: t };
225
225
  };
226
- let Wr = Kt;
227
- function pa(r) {
228
- Wr = r;
226
+ let Xr = Kt;
227
+ function _a(r) {
228
+ Xr = r;
229
229
  }
230
- function rs() {
231
- return Wr;
230
+ function os() {
231
+ return Xr;
232
232
  }
233
- const os = (r) => {
233
+ const as = (r) => {
234
234
  const { data: e, path: t, errorMaps: n, issueData: s } = r, i = [...t, ...s.path || []], o = {
235
235
  ...s,
236
236
  path: i
@@ -250,9 +250,9 @@ const os = (r) => {
250
250
  path: i,
251
251
  message: a
252
252
  };
253
- }, _a = [];
253
+ }, ga = [];
254
254
  function M(r, e) {
255
- const t = rs(), n = os({
255
+ const t = os(), n = as({
256
256
  issueData: e,
257
257
  data: r.data,
258
258
  path: r.path,
@@ -312,12 +312,12 @@ class xe {
312
312
  }
313
313
  const H = Object.freeze({
314
314
  status: "aborted"
315
- }), Vt = (r) => ({ status: "dirty", value: r }), Ee = (r) => ({ status: "valid", value: r }), ni = (r) => r.status === "aborted", si = (r) => r.status === "dirty", St = (r) => r.status === "valid", _n = (r) => typeof Promise < "u" && r instanceof Promise;
316
- function as(r, e, t, n) {
315
+ }), Vt = (r) => ({ status: "dirty", value: r }), Ee = (r) => ({ status: "valid", value: r }), si = (r) => r.status === "aborted", ii = (r) => r.status === "dirty", St = (r) => r.status === "valid", _n = (r) => typeof Promise < "u" && r instanceof Promise;
316
+ function cs(r, e, t, n) {
317
317
  if (typeof e == "function" ? r !== e || !0 : !e.has(r)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
318
318
  return e.get(r);
319
319
  }
320
- function Xr(r, e, t, n, s) {
320
+ function $r(r, e, t, n, s) {
321
321
  if (typeof e == "function" ? r !== e || !0 : !e.has(r)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
322
322
  return e.set(r, t), t;
323
323
  }
@@ -334,7 +334,7 @@ class Ye {
334
334
  return this._cachedPath.length || (this._key instanceof Array ? this._cachedPath.push(...this._path, ...this._key) : this._cachedPath.push(...this._path, this._key)), this._cachedPath;
335
335
  }
336
336
  }
337
- const nr = (r, e) => {
337
+ const sr = (r, e) => {
338
338
  if (St(e))
339
339
  return { success: !0, data: e.value };
340
340
  if (!r.common.issues.length)
@@ -421,7 +421,7 @@ class X {
421
421
  data: e,
422
422
  parsedType: rt(e)
423
423
  }, i = this._parseSync({ data: e, path: s.path, parent: s });
424
- return nr(s, i);
424
+ return sr(s, i);
425
425
  }
426
426
  "~validate"(e) {
427
427
  var t, n;
@@ -475,7 +475,7 @@ class X {
475
475
  data: e,
476
476
  parsedType: rt(e)
477
477
  }, s = this._parse({ data: e, path: n.path, parent: n }), i = await (_n(s) ? s : Promise.resolve(s));
478
- return nr(n, i);
478
+ return sr(n, i);
479
479
  }
480
480
  refine(e, t) {
481
481
  const n = (s) => typeof t == "string" || typeof t > "u" ? { message: t } : typeof t == "function" ? t(s) : t;
@@ -546,7 +546,7 @@ class X {
546
546
  });
547
547
  }
548
548
  brand() {
549
- return new Si({
549
+ return new Ri({
550
550
  typeName: B.ZodBranded,
551
551
  type: this,
552
552
  ...W(this._def)
@@ -569,7 +569,7 @@ class X {
569
569
  });
570
570
  }
571
571
  pipe(e) {
572
- return In.create(this, e);
572
+ return Nn.create(this, e);
573
573
  }
574
574
  readonly() {
575
575
  return Mn.create(this);
@@ -581,26 +581,26 @@ class X {
581
581
  return this.safeParse(null).success;
582
582
  }
583
583
  }
584
- const ga = /^c[^\s-]{8,}$/i, ya = /^[0-9a-z]+$/, va = /^[0-9A-HJKMNP-TV-Z]{26}$/i, xa = /^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i, ba = /^[a-z0-9_-]{21}$/i, wa = /^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/, Ea = /^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/, Aa = /^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i, Ta = "^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";
585
- let Os;
586
- const Sa = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/, Ra = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/, Ma = /^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/, La = /^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/, Ca = /^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/, Oa = /^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/, $r = "((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))", ka = new RegExp(`^${$r}$`);
587
- function Yr(r) {
584
+ const ya = /^c[^\s-]{8,}$/i, va = /^[0-9a-z]+$/, xa = /^[0-9A-HJKMNP-TV-Z]{26}$/i, ba = /^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i, wa = /^[a-z0-9_-]{21}$/i, Ea = /^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/, Aa = /^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/, Ta = /^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i, Sa = "^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";
585
+ let Cs;
586
+ const Ra = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/, Ma = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/, La = /^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/, ka = /^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/, Ca = /^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/, Oa = /^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/, Yr = "((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))", Da = new RegExp(`^${Yr}$`);
587
+ function Kr(r) {
588
588
  let e = "([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";
589
589
  return r.precision ? e = `${e}\\.\\d{${r.precision}}` : r.precision == null && (e = `${e}(\\.\\d+)?`), e;
590
590
  }
591
- function Da(r) {
592
- return new RegExp(`^${Yr(r)}$`);
591
+ function Ia(r) {
592
+ return new RegExp(`^${Kr(r)}$`);
593
593
  }
594
- function Kr(r) {
595
- let e = `${$r}T${Yr(r)}`;
594
+ function qr(r) {
595
+ let e = `${Yr}T${Kr(r)}`;
596
596
  const t = [];
597
597
  return t.push(r.local ? "Z?" : "Z"), r.offset && t.push("([+-]\\d{2}:?\\d{2})"), e = `${e}(${t.join("|")})`, new RegExp(`^${e}$`);
598
598
  }
599
- function Ia(r, e) {
600
- return !!((e === "v4" || !e) && Sa.test(r) || (e === "v6" || !e) && Ma.test(r));
601
- }
602
599
  function Na(r, e) {
603
- if (!wa.test(r))
600
+ return !!((e === "v4" || !e) && Ra.test(r) || (e === "v6" || !e) && La.test(r));
601
+ }
602
+ function Pa(r, e) {
603
+ if (!Ea.test(r))
604
604
  return !1;
605
605
  try {
606
606
  const [t] = r.split("."), n = t.replace(/-/g, "+").replace(/_/g, "/").padEnd(t.length + (4 - t.length % 4) % 4, "="), s = JSON.parse(atob(n));
@@ -609,16 +609,16 @@ function Na(r, e) {
609
609
  return !1;
610
610
  }
611
611
  }
612
- function Pa(r, e) {
613
- return !!((e === "v4" || !e) && Ra.test(r) || (e === "v6" || !e) && La.test(r));
612
+ function za(r, e) {
613
+ return !!((e === "v4" || !e) && Ma.test(r) || (e === "v6" || !e) && ka.test(r));
614
614
  }
615
615
  class je extends X {
616
616
  _parse(e) {
617
- if (this._def.coerce && (e.data = String(e.data)), this._getType(e) !== C.string) {
617
+ if (this._def.coerce && (e.data = String(e.data)), this._getType(e) !== k.string) {
618
618
  const i = this._getOrReturnCtx(e);
619
619
  return M(i, {
620
620
  code: A.invalid_type,
621
- expected: C.string,
621
+ expected: k.string,
622
622
  received: i.parsedType
623
623
  }), H;
624
624
  }
@@ -661,43 +661,43 @@ class je extends X {
661
661
  message: i.message
662
662
  }), n.dirty());
663
663
  } else if (i.kind === "email")
664
- Aa.test(e.data) || (s = this._getOrReturnCtx(e, s), M(s, {
664
+ Ta.test(e.data) || (s = this._getOrReturnCtx(e, s), M(s, {
665
665
  validation: "email",
666
666
  code: A.invalid_string,
667
667
  message: i.message
668
668
  }), n.dirty());
669
669
  else if (i.kind === "emoji")
670
- Os || (Os = new RegExp(Ta, "u")), Os.test(e.data) || (s = this._getOrReturnCtx(e, s), M(s, {
670
+ Cs || (Cs = new RegExp(Sa, "u")), Cs.test(e.data) || (s = this._getOrReturnCtx(e, s), M(s, {
671
671
  validation: "emoji",
672
672
  code: A.invalid_string,
673
673
  message: i.message
674
674
  }), n.dirty());
675
675
  else if (i.kind === "uuid")
676
- xa.test(e.data) || (s = this._getOrReturnCtx(e, s), M(s, {
676
+ ba.test(e.data) || (s = this._getOrReturnCtx(e, s), M(s, {
677
677
  validation: "uuid",
678
678
  code: A.invalid_string,
679
679
  message: i.message
680
680
  }), n.dirty());
681
681
  else if (i.kind === "nanoid")
682
- ba.test(e.data) || (s = this._getOrReturnCtx(e, s), M(s, {
682
+ wa.test(e.data) || (s = this._getOrReturnCtx(e, s), M(s, {
683
683
  validation: "nanoid",
684
684
  code: A.invalid_string,
685
685
  message: i.message
686
686
  }), n.dirty());
687
687
  else if (i.kind === "cuid")
688
- ga.test(e.data) || (s = this._getOrReturnCtx(e, s), M(s, {
688
+ ya.test(e.data) || (s = this._getOrReturnCtx(e, s), M(s, {
689
689
  validation: "cuid",
690
690
  code: A.invalid_string,
691
691
  message: i.message
692
692
  }), n.dirty());
693
693
  else if (i.kind === "cuid2")
694
- ya.test(e.data) || (s = this._getOrReturnCtx(e, s), M(s, {
694
+ va.test(e.data) || (s = this._getOrReturnCtx(e, s), M(s, {
695
695
  validation: "cuid2",
696
696
  code: A.invalid_string,
697
697
  message: i.message
698
698
  }), n.dirty());
699
699
  else if (i.kind === "ulid")
700
- va.test(e.data) || (s = this._getOrReturnCtx(e, s), M(s, {
700
+ xa.test(e.data) || (s = this._getOrReturnCtx(e, s), M(s, {
701
701
  validation: "ulid",
702
702
  code: A.invalid_string,
703
703
  message: i.message
@@ -728,31 +728,31 @@ class je extends X {
728
728
  code: A.invalid_string,
729
729
  validation: { endsWith: i.value },
730
730
  message: i.message
731
- }), n.dirty()) : i.kind === "datetime" ? Kr(i).test(e.data) || (s = this._getOrReturnCtx(e, s), M(s, {
731
+ }), n.dirty()) : i.kind === "datetime" ? qr(i).test(e.data) || (s = this._getOrReturnCtx(e, s), M(s, {
732
732
  code: A.invalid_string,
733
733
  validation: "datetime",
734
734
  message: i.message
735
- }), n.dirty()) : i.kind === "date" ? ka.test(e.data) || (s = this._getOrReturnCtx(e, s), M(s, {
735
+ }), n.dirty()) : i.kind === "date" ? Da.test(e.data) || (s = this._getOrReturnCtx(e, s), M(s, {
736
736
  code: A.invalid_string,
737
737
  validation: "date",
738
738
  message: i.message
739
- }), n.dirty()) : i.kind === "time" ? Da(i).test(e.data) || (s = this._getOrReturnCtx(e, s), M(s, {
739
+ }), n.dirty()) : i.kind === "time" ? Ia(i).test(e.data) || (s = this._getOrReturnCtx(e, s), M(s, {
740
740
  code: A.invalid_string,
741
741
  validation: "time",
742
742
  message: i.message
743
- }), n.dirty()) : i.kind === "duration" ? Ea.test(e.data) || (s = this._getOrReturnCtx(e, s), M(s, {
743
+ }), n.dirty()) : i.kind === "duration" ? Aa.test(e.data) || (s = this._getOrReturnCtx(e, s), M(s, {
744
744
  validation: "duration",
745
745
  code: A.invalid_string,
746
746
  message: i.message
747
- }), n.dirty()) : i.kind === "ip" ? Ia(e.data, i.version) || (s = this._getOrReturnCtx(e, s), M(s, {
747
+ }), n.dirty()) : i.kind === "ip" ? Na(e.data, i.version) || (s = this._getOrReturnCtx(e, s), M(s, {
748
748
  validation: "ip",
749
749
  code: A.invalid_string,
750
750
  message: i.message
751
- }), n.dirty()) : i.kind === "jwt" ? Na(e.data, i.alg) || (s = this._getOrReturnCtx(e, s), M(s, {
751
+ }), n.dirty()) : i.kind === "jwt" ? Pa(e.data, i.alg) || (s = this._getOrReturnCtx(e, s), M(s, {
752
752
  validation: "jwt",
753
753
  code: A.invalid_string,
754
754
  message: i.message
755
- }), n.dirty()) : i.kind === "cidr" ? Pa(e.data, i.version) || (s = this._getOrReturnCtx(e, s), M(s, {
755
+ }), n.dirty()) : i.kind === "cidr" ? za(e.data, i.version) || (s = this._getOrReturnCtx(e, s), M(s, {
756
756
  validation: "cidr",
757
757
  code: A.invalid_string,
758
758
  message: i.message
@@ -999,7 +999,7 @@ je.create = (r) => {
999
999
  ...W(r)
1000
1000
  });
1001
1001
  };
1002
- function za(r, e) {
1002
+ function Ua(r, e) {
1003
1003
  const t = (r.toString().split(".")[1] || "").length, n = (e.toString().split(".")[1] || "").length, s = t > n ? t : n, i = parseInt(r.toFixed(s).replace(".", "")), o = parseInt(e.toFixed(s).replace(".", ""));
1004
1004
  return i % o / Math.pow(10, s);
1005
1005
  }
@@ -1008,11 +1008,11 @@ class pt extends X {
1008
1008
  super(...arguments), this.min = this.gte, this.max = this.lte, this.step = this.multipleOf;
1009
1009
  }
1010
1010
  _parse(e) {
1011
- if (this._def.coerce && (e.data = Number(e.data)), this._getType(e) !== C.number) {
1011
+ if (this._def.coerce && (e.data = Number(e.data)), this._getType(e) !== k.number) {
1012
1012
  const i = this._getOrReturnCtx(e);
1013
1013
  return M(i, {
1014
1014
  code: A.invalid_type,
1015
- expected: C.number,
1015
+ expected: k.number,
1016
1016
  received: i.parsedType
1017
1017
  }), H;
1018
1018
  }
@@ -1038,7 +1038,7 @@ class pt extends X {
1038
1038
  inclusive: i.inclusive,
1039
1039
  exact: !1,
1040
1040
  message: i.message
1041
- }), s.dirty()) : i.kind === "multipleOf" ? za(e.data, i.value) !== 0 && (n = this._getOrReturnCtx(e, n), M(n, {
1041
+ }), s.dirty()) : i.kind === "multipleOf" ? Ua(e.data, i.value) !== 0 && (n = this._getOrReturnCtx(e, n), M(n, {
1042
1042
  code: A.not_multiple_of,
1043
1043
  multipleOf: i.value,
1044
1044
  message: i.message
@@ -1186,7 +1186,7 @@ class _t extends X {
1186
1186
  } catch {
1187
1187
  return this._getInvalidInput(e);
1188
1188
  }
1189
- if (this._getType(e) !== C.bigint)
1189
+ if (this._getType(e) !== k.bigint)
1190
1190
  return this._getInvalidInput(e);
1191
1191
  let n;
1192
1192
  const s = new xe();
@@ -1214,7 +1214,7 @@ class _t extends X {
1214
1214
  const t = this._getOrReturnCtx(e);
1215
1215
  return M(t, {
1216
1216
  code: A.invalid_type,
1217
- expected: C.bigint,
1217
+ expected: k.bigint,
1218
1218
  received: t.parsedType
1219
1219
  }), H;
1220
1220
  }
@@ -1313,11 +1313,11 @@ _t.create = (r) => {
1313
1313
  };
1314
1314
  class gn extends X {
1315
1315
  _parse(e) {
1316
- if (this._def.coerce && (e.data = !!e.data), this._getType(e) !== C.boolean) {
1316
+ if (this._def.coerce && (e.data = !!e.data), this._getType(e) !== k.boolean) {
1317
1317
  const n = this._getOrReturnCtx(e);
1318
1318
  return M(n, {
1319
1319
  code: A.invalid_type,
1320
- expected: C.boolean,
1320
+ expected: k.boolean,
1321
1321
  received: n.parsedType
1322
1322
  }), H;
1323
1323
  }
@@ -1331,11 +1331,11 @@ gn.create = (r) => new gn({
1331
1331
  });
1332
1332
  class Rt extends X {
1333
1333
  _parse(e) {
1334
- if (this._def.coerce && (e.data = new Date(e.data)), this._getType(e) !== C.date) {
1334
+ if (this._def.coerce && (e.data = new Date(e.data)), this._getType(e) !== k.date) {
1335
1335
  const i = this._getOrReturnCtx(e);
1336
1336
  return M(i, {
1337
1337
  code: A.invalid_type,
1338
- expected: C.date,
1338
+ expected: k.date,
1339
1339
  received: i.parsedType
1340
1340
  }), H;
1341
1341
  }
@@ -1407,30 +1407,30 @@ Rt.create = (r) => new Rt({
1407
1407
  typeName: B.ZodDate,
1408
1408
  ...W(r)
1409
1409
  });
1410
- class cs extends X {
1410
+ class ls extends X {
1411
1411
  _parse(e) {
1412
- if (this._getType(e) !== C.symbol) {
1412
+ if (this._getType(e) !== k.symbol) {
1413
1413
  const n = this._getOrReturnCtx(e);
1414
1414
  return M(n, {
1415
1415
  code: A.invalid_type,
1416
- expected: C.symbol,
1416
+ expected: k.symbol,
1417
1417
  received: n.parsedType
1418
1418
  }), H;
1419
1419
  }
1420
1420
  return Ee(e.data);
1421
1421
  }
1422
1422
  }
1423
- cs.create = (r) => new cs({
1423
+ ls.create = (r) => new ls({
1424
1424
  typeName: B.ZodSymbol,
1425
1425
  ...W(r)
1426
1426
  });
1427
1427
  class yn extends X {
1428
1428
  _parse(e) {
1429
- if (this._getType(e) !== C.undefined) {
1429
+ if (this._getType(e) !== k.undefined) {
1430
1430
  const n = this._getOrReturnCtx(e);
1431
1431
  return M(n, {
1432
1432
  code: A.invalid_type,
1433
- expected: C.undefined,
1433
+ expected: k.undefined,
1434
1434
  received: n.parsedType
1435
1435
  }), H;
1436
1436
  }
@@ -1443,11 +1443,11 @@ yn.create = (r) => new yn({
1443
1443
  });
1444
1444
  class vn extends X {
1445
1445
  _parse(e) {
1446
- if (this._getType(e) !== C.null) {
1446
+ if (this._getType(e) !== k.null) {
1447
1447
  const n = this._getOrReturnCtx(e);
1448
1448
  return M(n, {
1449
1449
  code: A.invalid_type,
1450
- expected: C.null,
1450
+ expected: k.null,
1451
1451
  received: n.parsedType
1452
1452
  }), H;
1453
1453
  }
@@ -1487,7 +1487,7 @@ class dt extends X {
1487
1487
  const t = this._getOrReturnCtx(e);
1488
1488
  return M(t, {
1489
1489
  code: A.invalid_type,
1490
- expected: C.never,
1490
+ expected: k.never,
1491
1491
  received: t.parsedType
1492
1492
  }), H;
1493
1493
  }
@@ -1496,30 +1496,30 @@ dt.create = (r) => new dt({
1496
1496
  typeName: B.ZodNever,
1497
1497
  ...W(r)
1498
1498
  });
1499
- class ls extends X {
1499
+ class ds extends X {
1500
1500
  _parse(e) {
1501
- if (this._getType(e) !== C.undefined) {
1501
+ if (this._getType(e) !== k.undefined) {
1502
1502
  const n = this._getOrReturnCtx(e);
1503
1503
  return M(n, {
1504
1504
  code: A.invalid_type,
1505
- expected: C.void,
1505
+ expected: k.void,
1506
1506
  received: n.parsedType
1507
1507
  }), H;
1508
1508
  }
1509
1509
  return Ee(e.data);
1510
1510
  }
1511
1511
  }
1512
- ls.create = (r) => new ls({
1512
+ ds.create = (r) => new ds({
1513
1513
  typeName: B.ZodVoid,
1514
1514
  ...W(r)
1515
1515
  });
1516
1516
  class Be extends X {
1517
1517
  _parse(e) {
1518
1518
  const { ctx: t, status: n } = this._processInputParams(e), s = this._def;
1519
- if (t.parsedType !== C.array)
1519
+ if (t.parsedType !== k.array)
1520
1520
  return M(t, {
1521
1521
  code: A.invalid_type,
1522
- expected: C.array,
1522
+ expected: k.array,
1523
1523
  received: t.parsedType
1524
1524
  }), H;
1525
1525
  if (s.exactLength !== null) {
@@ -1613,11 +1613,11 @@ class ie extends X {
1613
1613
  return this._cached = { shape: e, keys: t };
1614
1614
  }
1615
1615
  _parse(e) {
1616
- if (this._getType(e) !== C.object) {
1616
+ if (this._getType(e) !== k.object) {
1617
1617
  const l = this._getOrReturnCtx(e);
1618
1618
  return M(l, {
1619
1619
  code: A.invalid_type,
1620
- expected: C.object,
1620
+ expected: k.object,
1621
1621
  received: l.parsedType
1622
1622
  }), H;
1623
1623
  }
@@ -1865,7 +1865,7 @@ class ie extends X {
1865
1865
  });
1866
1866
  }
1867
1867
  keyof() {
1868
- return qr(q.objectKeys(this.shape));
1868
+ return Jr(q.objectKeys(this.shape));
1869
1869
  }
1870
1870
  }
1871
1871
  ie.create = (r, e) => new ie({
@@ -1962,14 +1962,14 @@ xn.create = (r, e) => new xn({
1962
1962
  typeName: B.ZodUnion,
1963
1963
  ...W(e)
1964
1964
  });
1965
- const nt = (r) => r instanceof En ? nt(r.schema) : r instanceof He ? nt(r.innerType()) : r instanceof An ? [r.value] : r instanceof gt ? r.options : r instanceof Tn ? q.objectValues(r.enum) : r instanceof Sn ? nt(r._def.innerType) : r instanceof yn ? [void 0] : r instanceof vn ? [null] : r instanceof $e ? [void 0, ...nt(r.unwrap())] : r instanceof yt ? [null, ...nt(r.unwrap())] : r instanceof Si || r instanceof Mn ? nt(r.unwrap()) : r instanceof Rn ? nt(r._def.innerType) : [];
1966
- class ps extends X {
1965
+ const nt = (r) => r instanceof En ? nt(r.schema) : r instanceof He ? nt(r.innerType()) : r instanceof An ? [r.value] : r instanceof gt ? r.options : r instanceof Tn ? q.objectValues(r.enum) : r instanceof Sn ? nt(r._def.innerType) : r instanceof yn ? [void 0] : r instanceof vn ? [null] : r instanceof $e ? [void 0, ...nt(r.unwrap())] : r instanceof yt ? [null, ...nt(r.unwrap())] : r instanceof Ri || r instanceof Mn ? nt(r.unwrap()) : r instanceof Rn ? nt(r._def.innerType) : [];
1966
+ class _s extends X {
1967
1967
  _parse(e) {
1968
1968
  const { ctx: t } = this._processInputParams(e);
1969
- if (t.parsedType !== C.object)
1969
+ if (t.parsedType !== k.object)
1970
1970
  return M(t, {
1971
1971
  code: A.invalid_type,
1972
- expected: C.object,
1972
+ expected: k.object,
1973
1973
  received: t.parsedType
1974
1974
  }), H;
1975
1975
  const n = this.discriminator, s = t.data[n], i = this.optionsMap.get(s);
@@ -2016,7 +2016,7 @@ class ps extends X {
2016
2016
  s.set(a, i);
2017
2017
  }
2018
2018
  }
2019
- return new ps({
2019
+ return new _s({
2020
2020
  typeName: B.ZodDiscriminatedUnion,
2021
2021
  discriminator: e,
2022
2022
  options: t,
@@ -2025,39 +2025,39 @@ class ps extends X {
2025
2025
  });
2026
2026
  }
2027
2027
  }
2028
- function ii(r, e) {
2028
+ function ri(r, e) {
2029
2029
  const t = rt(r), n = rt(e);
2030
2030
  if (r === e)
2031
2031
  return { valid: !0, data: r };
2032
- if (t === C.object && n === C.object) {
2032
+ if (t === k.object && n === k.object) {
2033
2033
  const s = q.objectKeys(e), i = q.objectKeys(r).filter((a) => s.indexOf(a) !== -1), o = { ...r, ...e };
2034
2034
  for (const a of i) {
2035
- const c = ii(r[a], e[a]);
2035
+ const c = ri(r[a], e[a]);
2036
2036
  if (!c.valid)
2037
2037
  return { valid: !1 };
2038
2038
  o[a] = c.data;
2039
2039
  }
2040
2040
  return { valid: !0, data: o };
2041
- } else if (t === C.array && n === C.array) {
2041
+ } else if (t === k.array && n === k.array) {
2042
2042
  if (r.length !== e.length)
2043
2043
  return { valid: !1 };
2044
2044
  const s = [];
2045
2045
  for (let i = 0; i < r.length; i++) {
2046
- const o = r[i], a = e[i], c = ii(o, a);
2046
+ const o = r[i], a = e[i], c = ri(o, a);
2047
2047
  if (!c.valid)
2048
2048
  return { valid: !1 };
2049
2049
  s.push(c.data);
2050
2050
  }
2051
2051
  return { valid: !0, data: s };
2052
- } else return t === C.date && n === C.date && +r == +e ? { valid: !0, data: r } : { valid: !1 };
2052
+ } else return t === k.date && n === k.date && +r == +e ? { valid: !0, data: r } : { valid: !1 };
2053
2053
  }
2054
2054
  class bn extends X {
2055
2055
  _parse(e) {
2056
2056
  const { status: t, ctx: n } = this._processInputParams(e), s = (i, o) => {
2057
- if (ni(i) || ni(o))
2057
+ if (si(i) || si(o))
2058
2058
  return H;
2059
- const a = ii(i.value, o.value);
2060
- return a.valid ? ((si(i) || si(o)) && t.dirty(), { status: t.value, value: a.data }) : (M(n, {
2059
+ const a = ri(i.value, o.value);
2060
+ return a.valid ? ((ii(i) || ii(o)) && t.dirty(), { status: t.value, value: a.data }) : (M(n, {
2061
2061
  code: A.invalid_intersection_types
2062
2062
  }), H);
2063
2063
  };
@@ -2092,10 +2092,10 @@ bn.create = (r, e, t) => new bn({
2092
2092
  class Ke extends X {
2093
2093
  _parse(e) {
2094
2094
  const { status: t, ctx: n } = this._processInputParams(e);
2095
- if (n.parsedType !== C.array)
2095
+ if (n.parsedType !== k.array)
2096
2096
  return M(n, {
2097
2097
  code: A.invalid_type,
2098
- expected: C.array,
2098
+ expected: k.array,
2099
2099
  received: n.parsedType
2100
2100
  }), H;
2101
2101
  if (n.data.length < this._def.items.length)
@@ -2148,10 +2148,10 @@ class wn extends X {
2148
2148
  }
2149
2149
  _parse(e) {
2150
2150
  const { status: t, ctx: n } = this._processInputParams(e);
2151
- if (n.parsedType !== C.object)
2151
+ if (n.parsedType !== k.object)
2152
2152
  return M(n, {
2153
2153
  code: A.invalid_type,
2154
- expected: C.object,
2154
+ expected: k.object,
2155
2155
  received: n.parsedType
2156
2156
  }), H;
2157
2157
  const s = [], i = this._def.keyType, o = this._def.valueType;
@@ -2180,7 +2180,7 @@ class wn extends X {
2180
2180
  });
2181
2181
  }
2182
2182
  }
2183
- class ds extends X {
2183
+ class us extends X {
2184
2184
  get keySchema() {
2185
2185
  return this._def.keyType;
2186
2186
  }
@@ -2189,10 +2189,10 @@ class ds extends X {
2189
2189
  }
2190
2190
  _parse(e) {
2191
2191
  const { status: t, ctx: n } = this._processInputParams(e);
2192
- if (n.parsedType !== C.map)
2192
+ if (n.parsedType !== k.map)
2193
2193
  return M(n, {
2194
2194
  code: A.invalid_type,
2195
- expected: C.map,
2195
+ expected: k.map,
2196
2196
  received: n.parsedType
2197
2197
  }), H;
2198
2198
  const s = this._def.keyType, i = this._def.valueType, o = [...n.data.entries()].map(([a, c], l) => ({
@@ -2222,7 +2222,7 @@ class ds extends X {
2222
2222
  }
2223
2223
  }
2224
2224
  }
2225
- ds.create = (r, e, t) => new ds({
2225
+ us.create = (r, e, t) => new us({
2226
2226
  valueType: e,
2227
2227
  keyType: r,
2228
2228
  typeName: B.ZodMap,
@@ -2231,10 +2231,10 @@ ds.create = (r, e, t) => new ds({
2231
2231
  class Mt extends X {
2232
2232
  _parse(e) {
2233
2233
  const { status: t, ctx: n } = this._processInputParams(e);
2234
- if (n.parsedType !== C.set)
2234
+ if (n.parsedType !== k.set)
2235
2235
  return M(n, {
2236
2236
  code: A.invalid_type,
2237
- expected: C.set,
2237
+ expected: k.set,
2238
2238
  received: n.parsedType
2239
2239
  }), H;
2240
2240
  const s = this._def;
@@ -2298,20 +2298,20 @@ class Xt extends X {
2298
2298
  }
2299
2299
  _parse(e) {
2300
2300
  const { ctx: t } = this._processInputParams(e);
2301
- if (t.parsedType !== C.function)
2301
+ if (t.parsedType !== k.function)
2302
2302
  return M(t, {
2303
2303
  code: A.invalid_type,
2304
- expected: C.function,
2304
+ expected: k.function,
2305
2305
  received: t.parsedType
2306
2306
  }), H;
2307
2307
  function n(a, c) {
2308
- return os({
2308
+ return as({
2309
2309
  data: a,
2310
2310
  path: t.path,
2311
2311
  errorMaps: [
2312
2312
  t.common.contextualErrorMap,
2313
2313
  t.schemaErrorMap,
2314
- rs(),
2314
+ os(),
2315
2315
  Kt
2316
2316
  ].filter((l) => !!l),
2317
2317
  issueData: {
@@ -2321,13 +2321,13 @@ class Xt extends X {
2321
2321
  });
2322
2322
  }
2323
2323
  function s(a, c) {
2324
- return os({
2324
+ return as({
2325
2325
  data: a,
2326
2326
  path: t.path,
2327
2327
  errorMaps: [
2328
2328
  t.common.contextualErrorMap,
2329
2329
  t.schemaErrorMap,
2330
- rs(),
2330
+ os(),
2331
2331
  Kt
2332
2332
  ].filter((l) => !!l),
2333
2333
  issueData: {
@@ -2428,7 +2428,7 @@ An.create = (r, e) => new An({
2428
2428
  typeName: B.ZodLiteral,
2429
2429
  ...W(e)
2430
2430
  });
2431
- function qr(r, e) {
2431
+ function Jr(r, e) {
2432
2432
  return new gt({
2433
2433
  values: r,
2434
2434
  typeName: B.ZodEnum,
@@ -2448,7 +2448,7 @@ class gt extends X {
2448
2448
  code: A.invalid_type
2449
2449
  }), H;
2450
2450
  }
2451
- if (as(this, un) || Xr(this, un, new Set(this._def.values)), !as(this, un).has(e.data)) {
2451
+ if (cs(this, un) || $r(this, un, new Set(this._def.values)), !cs(this, un).has(e.data)) {
2452
2452
  const t = this._getOrReturnCtx(e), n = this._def.values;
2453
2453
  return M(t, {
2454
2454
  received: t.data,
@@ -2493,14 +2493,14 @@ class gt extends X {
2493
2493
  }
2494
2494
  }
2495
2495
  un = /* @__PURE__ */ new WeakMap();
2496
- gt.create = qr;
2496
+ gt.create = Jr;
2497
2497
  class Tn extends X {
2498
2498
  constructor() {
2499
2499
  super(...arguments), hn.set(this, void 0);
2500
2500
  }
2501
2501
  _parse(e) {
2502
2502
  const t = q.getValidEnumValues(this._def.values), n = this._getOrReturnCtx(e);
2503
- if (n.parsedType !== C.string && n.parsedType !== C.number) {
2503
+ if (n.parsedType !== k.string && n.parsedType !== k.number) {
2504
2504
  const s = q.objectValues(t);
2505
2505
  return M(n, {
2506
2506
  expected: q.joinValues(s),
@@ -2508,7 +2508,7 @@ class Tn extends X {
2508
2508
  code: A.invalid_type
2509
2509
  }), H;
2510
2510
  }
2511
- if (as(this, hn) || Xr(this, hn, new Set(q.getValidEnumValues(this._def.values))), !as(this, hn).has(e.data)) {
2511
+ if (cs(this, hn) || $r(this, hn, new Set(q.getValidEnumValues(this._def.values))), !cs(this, hn).has(e.data)) {
2512
2512
  const s = q.objectValues(t);
2513
2513
  return M(n, {
2514
2514
  received: n.data,
@@ -2534,13 +2534,13 @@ class Jt extends X {
2534
2534
  }
2535
2535
  _parse(e) {
2536
2536
  const { ctx: t } = this._processInputParams(e);
2537
- if (t.parsedType !== C.promise && t.common.async === !1)
2537
+ if (t.parsedType !== k.promise && t.common.async === !1)
2538
2538
  return M(t, {
2539
2539
  code: A.invalid_type,
2540
- expected: C.promise,
2540
+ expected: k.promise,
2541
2541
  received: t.parsedType
2542
2542
  }), H;
2543
- const n = t.parsedType === C.promise ? t.data : Promise.resolve(t.data);
2543
+ const n = t.parsedType === k.promise ? t.data : Promise.resolve(t.data);
2544
2544
  return Ee(n.then((s) => this._def.type.parseAsync(s, {
2545
2545
  path: t.path,
2546
2546
  errorMap: t.common.contextualErrorMap
@@ -2643,7 +2643,7 @@ He.createWithPreprocess = (r, e, t) => new He({
2643
2643
  });
2644
2644
  class $e extends X {
2645
2645
  _parse(e) {
2646
- return this._getType(e) === C.undefined ? Ee(void 0) : this._def.innerType._parse(e);
2646
+ return this._getType(e) === k.undefined ? Ee(void 0) : this._def.innerType._parse(e);
2647
2647
  }
2648
2648
  unwrap() {
2649
2649
  return this._def.innerType;
@@ -2656,7 +2656,7 @@ $e.create = (r, e) => new $e({
2656
2656
  });
2657
2657
  class yt extends X {
2658
2658
  _parse(e) {
2659
- return this._getType(e) === C.null ? Ee(null) : this._def.innerType._parse(e);
2659
+ return this._getType(e) === k.null ? Ee(null) : this._def.innerType._parse(e);
2660
2660
  }
2661
2661
  unwrap() {
2662
2662
  return this._def.innerType;
@@ -2671,7 +2671,7 @@ class Sn extends X {
2671
2671
  _parse(e) {
2672
2672
  const { ctx: t } = this._processInputParams(e);
2673
2673
  let n = t.data;
2674
- return t.parsedType === C.undefined && (n = this._def.defaultValue()), this._def.innerType._parse({
2674
+ return t.parsedType === k.undefined && (n = this._def.defaultValue()), this._def.innerType._parse({
2675
2675
  data: n,
2676
2676
  path: t.path,
2677
2677
  parent: t
@@ -2730,25 +2730,25 @@ Rn.create = (r, e) => new Rn({
2730
2730
  catchValue: typeof e.catch == "function" ? e.catch : () => e.catch,
2731
2731
  ...W(e)
2732
2732
  });
2733
- class us extends X {
2733
+ class hs extends X {
2734
2734
  _parse(e) {
2735
- if (this._getType(e) !== C.nan) {
2735
+ if (this._getType(e) !== k.nan) {
2736
2736
  const n = this._getOrReturnCtx(e);
2737
2737
  return M(n, {
2738
2738
  code: A.invalid_type,
2739
- expected: C.nan,
2739
+ expected: k.nan,
2740
2740
  received: n.parsedType
2741
2741
  }), H;
2742
2742
  }
2743
2743
  return { status: "valid", value: e.data };
2744
2744
  }
2745
2745
  }
2746
- us.create = (r) => new us({
2746
+ hs.create = (r) => new hs({
2747
2747
  typeName: B.ZodNaN,
2748
2748
  ...W(r)
2749
2749
  });
2750
- const Ua = Symbol("zod_brand");
2751
- class Si extends X {
2750
+ const Fa = Symbol("zod_brand");
2751
+ class Ri extends X {
2752
2752
  _parse(e) {
2753
2753
  const { ctx: t } = this._processInputParams(e), n = t.data;
2754
2754
  return this._def.type._parse({
@@ -2761,7 +2761,7 @@ class Si extends X {
2761
2761
  return this._def.type;
2762
2762
  }
2763
2763
  }
2764
- class In extends X {
2764
+ class Nn extends X {
2765
2765
  _parse(e) {
2766
2766
  const { status: t, ctx: n } = this._processInputParams(e);
2767
2767
  if (n.common.async)
@@ -2794,7 +2794,7 @@ class In extends X {
2794
2794
  }
2795
2795
  }
2796
2796
  static create(e, t) {
2797
- return new In({
2797
+ return new Nn({
2798
2798
  in: e,
2799
2799
  out: t,
2800
2800
  typeName: B.ZodPipeline
@@ -2815,11 +2815,11 @@ Mn.create = (r, e) => new Mn({
2815
2815
  typeName: B.ZodReadonly,
2816
2816
  ...W(e)
2817
2817
  });
2818
- function sr(r, e) {
2818
+ function ir(r, e) {
2819
2819
  const t = typeof r == "function" ? r(e) : typeof r == "string" ? { message: r } : r;
2820
2820
  return typeof t == "string" ? { message: t } : t;
2821
2821
  }
2822
- function Jr(r, e = {}, t) {
2822
+ function Qr(r, e = {}, t) {
2823
2823
  return r ? qt.create().superRefine((n, s) => {
2824
2824
  var i, o;
2825
2825
  const a = r(n);
@@ -2827,26 +2827,26 @@ function Jr(r, e = {}, t) {
2827
2827
  return a.then((c) => {
2828
2828
  var l, d;
2829
2829
  if (!c) {
2830
- const u = sr(e, n), h = (d = (l = u.fatal) !== null && l !== void 0 ? l : t) !== null && d !== void 0 ? d : !0;
2830
+ const u = ir(e, n), h = (d = (l = u.fatal) !== null && l !== void 0 ? l : t) !== null && d !== void 0 ? d : !0;
2831
2831
  s.addIssue({ code: "custom", ...u, fatal: h });
2832
2832
  }
2833
2833
  });
2834
2834
  if (!a) {
2835
- const c = sr(e, n), l = (o = (i = c.fatal) !== null && i !== void 0 ? i : t) !== null && o !== void 0 ? o : !0;
2835
+ const c = ir(e, n), l = (o = (i = c.fatal) !== null && i !== void 0 ? i : t) !== null && o !== void 0 ? o : !0;
2836
2836
  s.addIssue({ code: "custom", ...c, fatal: l });
2837
2837
  }
2838
2838
  }) : qt.create();
2839
2839
  }
2840
- const Fa = {
2840
+ const ja = {
2841
2841
  object: ie.lazycreate
2842
2842
  };
2843
2843
  var B;
2844
2844
  (function(r) {
2845
2845
  r.ZodString = "ZodString", r.ZodNumber = "ZodNumber", r.ZodNaN = "ZodNaN", r.ZodBigInt = "ZodBigInt", r.ZodBoolean = "ZodBoolean", r.ZodDate = "ZodDate", r.ZodSymbol = "ZodSymbol", r.ZodUndefined = "ZodUndefined", r.ZodNull = "ZodNull", r.ZodAny = "ZodAny", r.ZodUnknown = "ZodUnknown", r.ZodNever = "ZodNever", r.ZodVoid = "ZodVoid", r.ZodArray = "ZodArray", r.ZodObject = "ZodObject", r.ZodUnion = "ZodUnion", r.ZodDiscriminatedUnion = "ZodDiscriminatedUnion", r.ZodIntersection = "ZodIntersection", r.ZodTuple = "ZodTuple", r.ZodRecord = "ZodRecord", r.ZodMap = "ZodMap", r.ZodSet = "ZodSet", r.ZodFunction = "ZodFunction", r.ZodLazy = "ZodLazy", r.ZodLiteral = "ZodLiteral", r.ZodEnum = "ZodEnum", r.ZodEffects = "ZodEffects", r.ZodNativeEnum = "ZodNativeEnum", r.ZodOptional = "ZodOptional", r.ZodNullable = "ZodNullable", r.ZodDefault = "ZodDefault", r.ZodCatch = "ZodCatch", r.ZodPromise = "ZodPromise", r.ZodBranded = "ZodBranded", r.ZodPipeline = "ZodPipeline", r.ZodReadonly = "ZodReadonly";
2846
2846
  })(B || (B = {}));
2847
- const ja = (r, e = {
2847
+ const Ba = (r, e = {
2848
2848
  message: `Input not instance of ${r.name}`
2849
- }) => Jr((t) => t instanceof r, e), Qr = je.create, eo = pt.create, Ba = us.create, Ha = _t.create, to = gn.create, Va = Rt.create, Ga = cs.create, Za = yn.create, Wa = vn.create, Xa = qt.create, $a = At.create, Ya = dt.create, Ka = ls.create, qa = Be.create, Ja = ie.create, Qa = ie.strictCreate, ec = xn.create, tc = ps.create, nc = bn.create, sc = Ke.create, ic = wn.create, rc = ds.create, oc = Mt.create, ac = Xt.create, cc = En.create, lc = An.create, dc = gt.create, uc = Tn.create, hc = Jt.create, ir = He.create, fc = $e.create, mc = yt.create, pc = He.createWithPreprocess, _c = In.create, gc = () => Qr().optional(), yc = () => eo().optional(), vc = () => to().optional(), xc = {
2849
+ }) => Qr((t) => t instanceof r, e), eo = je.create, to = pt.create, Ha = hs.create, Va = _t.create, no = gn.create, Ga = Rt.create, Za = ls.create, Wa = yn.create, Xa = vn.create, $a = qt.create, Ya = At.create, Ka = dt.create, qa = ds.create, Ja = Be.create, Qa = ie.create, ec = ie.strictCreate, tc = xn.create, nc = _s.create, sc = bn.create, ic = Ke.create, rc = wn.create, oc = us.create, ac = Mt.create, cc = Xt.create, lc = En.create, dc = An.create, uc = gt.create, hc = Tn.create, fc = Jt.create, rr = He.create, mc = $e.create, pc = yt.create, _c = He.createWithPreprocess, gc = Nn.create, yc = () => eo().optional(), vc = () => to().optional(), xc = () => no().optional(), bc = {
2850
2850
  string: (r) => je.create({ ...r, coerce: !0 }),
2851
2851
  number: (r) => pt.create({ ...r, coerce: !0 }),
2852
2852
  boolean: (r) => gn.create({
@@ -2855,53 +2855,53 @@ const ja = (r, e = {
2855
2855
  }),
2856
2856
  bigint: (r) => _t.create({ ...r, coerce: !0 }),
2857
2857
  date: (r) => Rt.create({ ...r, coerce: !0 })
2858
- }, bc = H;
2858
+ }, wc = H;
2859
2859
  var E = /* @__PURE__ */ Object.freeze({
2860
2860
  __proto__: null,
2861
2861
  defaultErrorMap: Kt,
2862
- setErrorMap: pa,
2863
- getErrorMap: rs,
2864
- makeIssue: os,
2865
- EMPTY_PATH: _a,
2862
+ setErrorMap: _a,
2863
+ getErrorMap: os,
2864
+ makeIssue: as,
2865
+ EMPTY_PATH: ga,
2866
2866
  addIssueToContext: M,
2867
2867
  ParseStatus: xe,
2868
2868
  INVALID: H,
2869
2869
  DIRTY: Vt,
2870
2870
  OK: Ee,
2871
- isAborted: ni,
2872
- isDirty: si,
2871
+ isAborted: si,
2872
+ isDirty: ii,
2873
2873
  isValid: St,
2874
2874
  isAsync: _n,
2875
2875
  get util() {
2876
2876
  return q;
2877
2877
  },
2878
2878
  get objectUtil() {
2879
- return ti;
2879
+ return ni;
2880
2880
  },
2881
- ZodParsedType: C,
2881
+ ZodParsedType: k,
2882
2882
  getParsedType: rt,
2883
2883
  ZodType: X,
2884
- datetimeRegex: Kr,
2884
+ datetimeRegex: qr,
2885
2885
  ZodString: je,
2886
2886
  ZodNumber: pt,
2887
2887
  ZodBigInt: _t,
2888
2888
  ZodBoolean: gn,
2889
2889
  ZodDate: Rt,
2890
- ZodSymbol: cs,
2890
+ ZodSymbol: ls,
2891
2891
  ZodUndefined: yn,
2892
2892
  ZodNull: vn,
2893
2893
  ZodAny: qt,
2894
2894
  ZodUnknown: At,
2895
2895
  ZodNever: dt,
2896
- ZodVoid: ls,
2896
+ ZodVoid: ds,
2897
2897
  ZodArray: Be,
2898
2898
  ZodObject: ie,
2899
2899
  ZodUnion: xn,
2900
- ZodDiscriminatedUnion: ps,
2900
+ ZodDiscriminatedUnion: _s,
2901
2901
  ZodIntersection: bn,
2902
2902
  ZodTuple: Ke,
2903
2903
  ZodRecord: wn,
2904
- ZodMap: ds,
2904
+ ZodMap: us,
2905
2905
  ZodSet: Mt,
2906
2906
  ZodFunction: Xt,
2907
2907
  ZodLazy: En,
@@ -2915,69 +2915,69 @@ var E = /* @__PURE__ */ Object.freeze({
2915
2915
  ZodNullable: yt,
2916
2916
  ZodDefault: Sn,
2917
2917
  ZodCatch: Rn,
2918
- ZodNaN: us,
2919
- BRAND: Ua,
2920
- ZodBranded: Si,
2921
- ZodPipeline: In,
2918
+ ZodNaN: hs,
2919
+ BRAND: Fa,
2920
+ ZodBranded: Ri,
2921
+ ZodPipeline: Nn,
2922
2922
  ZodReadonly: Mn,
2923
- custom: Jr,
2923
+ custom: Qr,
2924
2924
  Schema: X,
2925
2925
  ZodSchema: X,
2926
- late: Fa,
2926
+ late: ja,
2927
2927
  get ZodFirstPartyTypeKind() {
2928
2928
  return B;
2929
2929
  },
2930
- coerce: xc,
2931
- any: Xa,
2932
- array: qa,
2933
- bigint: Ha,
2934
- boolean: to,
2935
- date: Va,
2936
- discriminatedUnion: tc,
2937
- effect: ir,
2938
- enum: dc,
2939
- function: ac,
2940
- instanceof: ja,
2941
- intersection: nc,
2942
- lazy: cc,
2943
- literal: lc,
2944
- map: rc,
2945
- nan: Ba,
2946
- nativeEnum: uc,
2947
- never: Ya,
2948
- null: Wa,
2949
- nullable: mc,
2950
- number: eo,
2951
- object: Ja,
2952
- oboolean: vc,
2953
- onumber: yc,
2954
- optional: fc,
2955
- ostring: gc,
2956
- pipeline: _c,
2957
- preprocess: pc,
2958
- promise: hc,
2959
- record: ic,
2960
- set: oc,
2961
- strictObject: Qa,
2962
- string: Qr,
2963
- symbol: Ga,
2964
- transformer: ir,
2965
- tuple: sc,
2966
- undefined: Za,
2967
- union: ec,
2968
- unknown: $a,
2969
- void: Ka,
2970
- NEVER: bc,
2930
+ coerce: bc,
2931
+ any: $a,
2932
+ array: Ja,
2933
+ bigint: Va,
2934
+ boolean: no,
2935
+ date: Ga,
2936
+ discriminatedUnion: nc,
2937
+ effect: rr,
2938
+ enum: uc,
2939
+ function: cc,
2940
+ instanceof: Ba,
2941
+ intersection: sc,
2942
+ lazy: lc,
2943
+ literal: dc,
2944
+ map: oc,
2945
+ nan: Ha,
2946
+ nativeEnum: hc,
2947
+ never: Ka,
2948
+ null: Xa,
2949
+ nullable: pc,
2950
+ number: to,
2951
+ object: Qa,
2952
+ oboolean: xc,
2953
+ onumber: vc,
2954
+ optional: mc,
2955
+ ostring: yc,
2956
+ pipeline: gc,
2957
+ preprocess: _c,
2958
+ promise: fc,
2959
+ record: rc,
2960
+ set: ac,
2961
+ strictObject: ec,
2962
+ string: eo,
2963
+ symbol: Za,
2964
+ transformer: rr,
2965
+ tuple: ic,
2966
+ undefined: Wa,
2967
+ union: tc,
2968
+ unknown: Ya,
2969
+ void: qa,
2970
+ NEVER: wc,
2971
2971
  ZodIssueCode: A,
2972
- quotelessJson: ma,
2972
+ quotelessJson: pa,
2973
2973
  ZodError: De
2974
2974
  });
2975
- const wc = E.object({
2975
+ const Ec = E.object({
2976
2976
  latitude: E.number().min(-90).max(90),
2977
2977
  longitude: E.number().min(-180).max(180),
2978
2978
  /** ISO 8601 instant (interpreted as UTC when no offset is present). */
2979
2979
  datetime: E.string().refine((r) => !Number.isNaN(Date.parse(r)), { message: "Invalid ISO datetime" })
2980
- }), Ec = E.object({
2980
+ }), Ac = E.object({
2981
2981
  color: E.number().default(16711680),
2982
2982
  intensity: E.number().default(1),
2983
2983
  position: E.tuple([E.number(), E.number(), E.number()]).default([10, 10, 10]),
@@ -2987,13 +2987,13 @@ const wc = E.object({
2987
2987
  * true solar position for the given location and moment. Intensity and
2988
2988
  * color are treated as midday references and dim/warm toward the horizon.
2989
2989
  */
2990
- solar: wc.optional()
2991
- }), Ac = E.object({
2990
+ solar: Ec.optional()
2991
+ }), Tc = E.object({
2992
2992
  type: E.enum(["sky", "hdr", "ultra", "room", "none"]).default("none"),
2993
2993
  url: E.string().optional(),
2994
- sun: Ec.optional(),
2994
+ sun: Ac.optional(),
2995
2995
  transparent: E.boolean().default(!1)
2996
- }), Tc = E.object({
2996
+ }), Sc = E.object({
2997
2997
  url: E.string(),
2998
2998
  color: E.number().optional(),
2999
2999
  shadow: E.boolean().default(!1),
@@ -3015,32 +3015,32 @@ const wc = E.object({
3015
3015
  fit_offset: E.number().optional(),
3016
3016
  height_offset: E.number().optional()
3017
3017
  }).optional()
3018
- }), es = E.object({
3019
- environment: Ac.default({ type: "none" }),
3020
- models: E.array(Tc).default([])
3018
+ }), ts = E.object({
3019
+ environment: Tc.default({ type: "none" }),
3020
+ models: E.array(Sc).default([])
3021
3021
  });
3022
- let rr = "info";
3023
- const or = {
3022
+ let or = "info";
3023
+ const ar = {
3024
3024
  silent: 0,
3025
3025
  error: 1,
3026
3026
  warn: 2,
3027
3027
  info: 3,
3028
3028
  debug: 4
3029
3029
  };
3030
- function Hn(r) {
3031
- return or[r] <= or[rr] && rr !== "silent";
3030
+ function Vn(r) {
3031
+ return ar[r] <= ar[or] && or !== "silent";
3032
3032
  }
3033
3033
  const j = {
3034
- error: (...r) => Hn("error") && console.error("[glimmer]", ...r),
3035
- warn: (...r) => Hn("warn") && console.warn("[glimmer]", ...r),
3036
- info: (...r) => Hn("info") && console.log("[glimmer]", ...r),
3037
- debug: (...r) => Hn("debug") && console.log("[glimmer:debug]", ...r)
3034
+ error: (...r) => Vn("error") && console.error("[glimmer]", ...r),
3035
+ warn: (...r) => Vn("warn") && console.warn("[glimmer]", ...r),
3036
+ info: (...r) => Vn("info") && console.log("[glimmer]", ...r),
3037
+ debug: (...r) => Vn("debug") && console.log("[glimmer:debug]", ...r)
3038
3038
  }, We = class We extends EventTarget {
3039
3039
  constructor(t) {
3040
3040
  super();
3041
3041
  _(this, "settings");
3042
3042
  try {
3043
- const n = es.parse({}), s = {
3043
+ const n = ts.parse({}), s = {
3044
3044
  ...n,
3045
3045
  ...t,
3046
3046
  environment: {
@@ -3049,7 +3049,7 @@ const j = {
3049
3049
  },
3050
3050
  models: t.models || n.models
3051
3051
  };
3052
- this.settings = es.parse(s), j.info("Settings initialized:", this.settings);
3052
+ this.settings = ts.parse(s), j.info("Settings initialized:", this.settings);
3053
3053
  } catch (n) {
3054
3054
  throw j.error("Error initializing settings:", n), n;
3055
3055
  }
@@ -3072,7 +3072,7 @@ const j = {
3072
3072
  return this.settings[t];
3073
3073
  }
3074
3074
  update(t) {
3075
- const n = es.parse({
3075
+ const n = ts.parse({
3076
3076
  ...this.settings,
3077
3077
  ...t,
3078
3078
  environment: {
@@ -3109,8 +3109,8 @@ const j = {
3109
3109
  }
3110
3110
  };
3111
3111
  _(We, "instance");
3112
- let ri = We;
3113
- const ar = { type: "change" }, Ri = { type: "start" }, no = { type: "end" }, Vn = new Co(), cr = new Oo(), Sc = Math.cos(70 * xi.DEG2RAD), ce = new J(), Le = 2 * Math.PI, te = {
3112
+ let oi = We;
3113
+ const cr = { type: "change" }, Mi = { type: "start" }, so = { type: "end" }, Gn = new Co(), lr = new Oo(), Rc = Math.cos(70 * bi.DEG2RAD), ce = new J(), Le = 2 * Math.PI, te = {
3114
3114
  NONE: -1,
3115
3115
  ROTATE: 0,
3116
3116
  DOLLY: 1,
@@ -3119,8 +3119,8 @@ const ar = { type: "change" }, Ri = { type: "start" }, no = { type: "end" }, Vn
3119
3119
  TOUCH_PAN: 4,
3120
3120
  TOUCH_DOLLY_PAN: 5,
3121
3121
  TOUCH_DOLLY_ROTATE: 6
3122
- }, ks = 1e-6;
3123
- class Rc extends Lo {
3122
+ }, Os = 1e-6;
3123
+ class Mc extends ko {
3124
3124
  /**
3125
3125
  * Constructs a new controls instance.
3126
3126
  *
@@ -3128,7 +3128,7 @@ class Rc extends Lo {
3128
3128
  * @param {?HTMLDOMElement} domElement - The HTML element used for event listeners.
3129
3129
  */
3130
3130
  constructor(e, t = null) {
3131
- super(e, t), this.state = te.NONE, this.target = new J(), this.cursor = new J(), this.minDistance = 0, this.maxDistance = 1 / 0, this.minZoom = 0, this.maxZoom = 1 / 0, this.minTargetRadius = 0, this.maxTargetRadius = 1 / 0, this.minPolarAngle = 0, this.maxPolarAngle = Math.PI, this.minAzimuthAngle = -1 / 0, this.maxAzimuthAngle = 1 / 0, this.enableDamping = !1, this.dampingFactor = 0.05, this.enableZoom = !0, this.zoomSpeed = 1, this.enableRotate = !0, this.rotateSpeed = 1, this.keyRotateSpeed = 1, this.enablePan = !0, this.panSpeed = 1, this.screenSpacePanning = !0, this.keyPanSpeed = 7, this.zoomToCursor = !1, this.autoRotate = !1, this.autoRotateSpeed = 2, this.keys = { LEFT: "ArrowLeft", UP: "ArrowUp", RIGHT: "ArrowRight", BOTTOM: "ArrowDown" }, this.mouseButtons = { LEFT: Wt.ROTATE, MIDDLE: Wt.DOLLY, RIGHT: Wt.PAN }, this.touches = { ONE: Bt.ROTATE, TWO: Bt.DOLLY_PAN }, this.target0 = this.target.clone(), this.position0 = this.object.position.clone(), this.zoom0 = this.object.zoom, this._domElementKeyEvents = null, this._lastPosition = new J(), this._lastQuaternion = new ss(), this._lastTargetPosition = new J(), this._quat = new ss().setFromUnitVectors(e.up, new J(0, 1, 0)), this._quatInverse = this._quat.clone().invert(), this._spherical = new Yi(), this._sphericalDelta = new Yi(), this._scale = 1, this._panOffset = new J(), this._rotateStart = new Ce(), this._rotateEnd = new Ce(), this._rotateDelta = new Ce(), this._panStart = new Ce(), this._panEnd = new Ce(), this._panDelta = new Ce(), this._dollyStart = new Ce(), this._dollyEnd = new Ce(), this._dollyDelta = new Ce(), this._dollyDirection = new J(), this._mouse = new Ce(), this._performCursorZoom = !1, this._pointers = [], this._pointerPositions = {}, this._controlActive = !1, this._onPointerMove = Lc.bind(this), this._onPointerDown = Mc.bind(this), this._onPointerUp = Cc.bind(this), this._onContextMenu = zc.bind(this), this._onMouseWheel = Dc.bind(this), this._onKeyDown = Ic.bind(this), this._onTouchStart = Nc.bind(this), this._onTouchMove = Pc.bind(this), this._onMouseDown = Oc.bind(this), this._onMouseMove = kc.bind(this), this._interceptControlDown = Uc.bind(this), this._interceptControlUp = Fc.bind(this), this.domElement !== null && this.connect(this.domElement), this.update();
3131
+ super(e, t), this.state = te.NONE, this.target = new J(), this.cursor = new J(), this.minDistance = 0, this.maxDistance = 1 / 0, this.minZoom = 0, this.maxZoom = 1 / 0, this.minTargetRadius = 0, this.maxTargetRadius = 1 / 0, this.minPolarAngle = 0, this.maxPolarAngle = Math.PI, this.minAzimuthAngle = -1 / 0, this.maxAzimuthAngle = 1 / 0, this.enableDamping = !1, this.dampingFactor = 0.05, this.enableZoom = !0, this.zoomSpeed = 1, this.enableRotate = !0, this.rotateSpeed = 1, this.keyRotateSpeed = 1, this.enablePan = !0, this.panSpeed = 1, this.screenSpacePanning = !0, this.keyPanSpeed = 7, this.zoomToCursor = !1, this.autoRotate = !1, this.autoRotateSpeed = 2, this.keys = { LEFT: "ArrowLeft", UP: "ArrowUp", RIGHT: "ArrowRight", BOTTOM: "ArrowDown" }, this.mouseButtons = { LEFT: Wt.ROTATE, MIDDLE: Wt.DOLLY, RIGHT: Wt.PAN }, this.touches = { ONE: Bt.ROTATE, TWO: Bt.DOLLY_PAN }, this.target0 = this.target.clone(), this.position0 = this.object.position.clone(), this.zoom0 = this.object.zoom, this._domElementKeyEvents = null, this._lastPosition = new J(), this._lastQuaternion = new is(), this._lastTargetPosition = new J(), this._quat = new is().setFromUnitVectors(e.up, new J(0, 1, 0)), this._quatInverse = this._quat.clone().invert(), this._spherical = new Ki(), this._sphericalDelta = new Ki(), this._scale = 1, this._panOffset = new J(), this._rotateStart = new ke(), this._rotateEnd = new ke(), this._rotateDelta = new ke(), this._panStart = new ke(), this._panEnd = new ke(), this._panDelta = new ke(), this._dollyStart = new ke(), this._dollyEnd = new ke(), this._dollyDelta = new ke(), this._dollyDirection = new J(), this._mouse = new ke(), this._performCursorZoom = !1, this._pointers = [], this._pointerPositions = {}, this._controlActive = !1, this._onPointerMove = kc.bind(this), this._onPointerDown = Lc.bind(this), this._onPointerUp = Cc.bind(this), this._onContextMenu = Uc.bind(this), this._onMouseWheel = Ic.bind(this), this._onKeyDown = Nc.bind(this), this._onTouchStart = Pc.bind(this), this._onTouchMove = zc.bind(this), this._onMouseDown = Oc.bind(this), this._onMouseMove = Dc.bind(this), this._interceptControlDown = Fc.bind(this), this._interceptControlUp = jc.bind(this), this.domElement !== null && this.connect(this.domElement), this.update();
3132
3132
  }
3133
3133
  connect(e) {
3134
3134
  super.connect(e), this.domElement.addEventListener("pointerdown", this._onPointerDown), this.domElement.addEventListener("pointercancel", this._onPointerUp), this.domElement.addEventListener("contextmenu", this._onContextMenu), this.domElement.addEventListener("wheel", this._onMouseWheel, { passive: !1 }), this.domElement.getRootNode().addEventListener("keydown", this._interceptControlDown, { passive: !0, capture: !0 }), this.domElement.style.touchAction = "none";
@@ -3189,7 +3189,7 @@ class Rc extends Lo {
3189
3189
  * was called, or the initial state.
3190
3190
  */
3191
3191
  reset() {
3192
- this.target.copy(this.target0), this.object.position.copy(this.position0), this.object.zoom = this.zoom0, this.object.updateProjectionMatrix(), this.dispatchEvent(ar), this.update(), this.state = te.NONE;
3192
+ this.target.copy(this.target0), this.object.position.copy(this.position0), this.object.zoom = this.zoom0, this.object.updateProjectionMatrix(), this.dispatchEvent(cr), this.update(), this.state = te.NONE;
3193
3193
  }
3194
3194
  update(e = null) {
3195
3195
  const t = this.object.position;
@@ -3219,12 +3219,12 @@ class Rc extends Lo {
3219
3219
  l.unproject(this.object), this.object.position.sub(l).add(a), this.object.updateMatrixWorld(), o = ce.length();
3220
3220
  } else
3221
3221
  console.warn("WARNING: OrbitControls.js encountered an unknown camera type - zoom to cursor disabled."), this.zoomToCursor = !1;
3222
- o !== null && (this.screenSpacePanning ? this.target.set(0, 0, -1).transformDirection(this.object.matrix).multiplyScalar(o).add(this.object.position) : (Vn.origin.copy(this.object.position), Vn.direction.set(0, 0, -1).transformDirection(this.object.matrix), Math.abs(this.object.up.dot(Vn.direction)) < Sc ? this.object.lookAt(this.target) : (cr.setFromNormalAndCoplanarPoint(this.object.up, this.target), Vn.intersectPlane(cr, this.target))));
3222
+ o !== null && (this.screenSpacePanning ? this.target.set(0, 0, -1).transformDirection(this.object.matrix).multiplyScalar(o).add(this.object.position) : (Gn.origin.copy(this.object.position), Gn.direction.set(0, 0, -1).transformDirection(this.object.matrix), Math.abs(this.object.up.dot(Gn.direction)) < Rc ? this.object.lookAt(this.target) : (lr.setFromNormalAndCoplanarPoint(this.object.up, this.target), Gn.intersectPlane(lr, this.target))));
3223
3223
  } else if (this.object.isOrthographicCamera) {
3224
3224
  const o = this.object.zoom;
3225
3225
  this.object.zoom = Math.max(this.minZoom, Math.min(this.maxZoom, this.object.zoom / this._scale)), o !== this.object.zoom && (this.object.updateProjectionMatrix(), i = !0);
3226
3226
  }
3227
- return this._scale = 1, this._performCursorZoom = !1, i || this._lastPosition.distanceToSquared(this.object.position) > ks || 8 * (1 - this._lastQuaternion.dot(this.object.quaternion)) > ks || this._lastTargetPosition.distanceToSquared(this.target) > ks ? (this.dispatchEvent(ar), this._lastPosition.copy(this.object.position), this._lastQuaternion.copy(this.object.quaternion), this._lastTargetPosition.copy(this.target), !0) : !1;
3227
+ return this._scale = 1, this._performCursorZoom = !1, i || this._lastPosition.distanceToSquared(this.object.position) > Os || 8 * (1 - this._lastQuaternion.dot(this.object.quaternion)) > Os || this._lastTargetPosition.distanceToSquared(this.target) > Os ? (this.dispatchEvent(cr), this._lastPosition.copy(this.object.position), this._lastQuaternion.copy(this.object.quaternion), this._lastTargetPosition.copy(this.target), !0) : !1;
3228
3228
  }
3229
3229
  _getAutoRotationAngle(e) {
3230
3230
  return e !== null ? Le / 60 * this.autoRotateSpeed * e : Le / 60 / 60 * this.autoRotateSpeed;
@@ -3392,7 +3392,7 @@ class Rc extends Lo {
3392
3392
  }
3393
3393
  _trackPointer(e) {
3394
3394
  let t = this._pointerPositions[e.pointerId];
3395
- t === void 0 && (t = new Ce(), this._pointerPositions[e.pointerId] = t), t.set(e.pageX, e.pageY);
3395
+ t === void 0 && (t = new ke(), this._pointerPositions[e.pointerId] = t), t.set(e.pageX, e.pageY);
3396
3396
  }
3397
3397
  _getSecondPointerPosition(e) {
3398
3398
  const t = e.pointerId === this._pointers[0] ? this._pointers[1] : this._pointers[0];
@@ -3416,16 +3416,16 @@ class Rc extends Lo {
3416
3416
  return e.ctrlKey && !this._controlActive && (n.deltaY *= 10), n;
3417
3417
  }
3418
3418
  }
3419
- function Mc(r) {
3419
+ function Lc(r) {
3420
3420
  this.enabled !== !1 && (this._pointers.length === 0 && (this.domElement.setPointerCapture(r.pointerId), this.domElement.addEventListener("pointermove", this._onPointerMove), this.domElement.addEventListener("pointerup", this._onPointerUp)), !this._isTrackingPointer(r) && (this._addPointer(r), r.pointerType === "touch" ? this._onTouchStart(r) : this._onMouseDown(r)));
3421
3421
  }
3422
- function Lc(r) {
3422
+ function kc(r) {
3423
3423
  this.enabled !== !1 && (r.pointerType === "touch" ? this._onTouchMove(r) : this._onMouseMove(r));
3424
3424
  }
3425
3425
  function Cc(r) {
3426
3426
  switch (this._removePointer(r), this._pointers.length) {
3427
3427
  case 0:
3428
- this.domElement.releasePointerCapture(r.pointerId), this.domElement.removeEventListener("pointermove", this._onPointerMove), this.domElement.removeEventListener("pointerup", this._onPointerUp), this.dispatchEvent(no), this.state = te.NONE;
3428
+ this.domElement.releasePointerCapture(r.pointerId), this.domElement.removeEventListener("pointermove", this._onPointerMove), this.domElement.removeEventListener("pointerup", this._onPointerUp), this.dispatchEvent(so), this.state = te.NONE;
3429
3429
  break;
3430
3430
  case 1:
3431
3431
  const e = this._pointers[0], t = this._pointerPositions[e];
@@ -3474,9 +3474,9 @@ function Oc(r) {
3474
3474
  default:
3475
3475
  this.state = te.NONE;
3476
3476
  }
3477
- this.state !== te.NONE && this.dispatchEvent(Ri);
3477
+ this.state !== te.NONE && this.dispatchEvent(Mi);
3478
3478
  }
3479
- function kc(r) {
3479
+ function Dc(r) {
3480
3480
  switch (this.state) {
3481
3481
  case te.ROTATE:
3482
3482
  if (this.enableRotate === !1) return;
@@ -3492,13 +3492,13 @@ function kc(r) {
3492
3492
  break;
3493
3493
  }
3494
3494
  }
3495
- function Dc(r) {
3496
- this.enabled === !1 || this.enableZoom === !1 || this.state !== te.NONE || (r.preventDefault(), this.dispatchEvent(Ri), this._handleMouseWheel(this._customWheelEvent(r)), this.dispatchEvent(no));
3497
- }
3498
3495
  function Ic(r) {
3499
- this.enabled !== !1 && this._handleKeyDown(r);
3496
+ this.enabled === !1 || this.enableZoom === !1 || this.state !== te.NONE || (r.preventDefault(), this.dispatchEvent(Mi), this._handleMouseWheel(this._customWheelEvent(r)), this.dispatchEvent(so));
3500
3497
  }
3501
3498
  function Nc(r) {
3499
+ this.enabled !== !1 && this._handleKeyDown(r);
3500
+ }
3501
+ function Pc(r) {
3502
3502
  switch (this._trackPointer(r), this._pointers.length) {
3503
3503
  case 1:
3504
3504
  switch (this.touches.ONE) {
@@ -3531,9 +3531,9 @@ function Nc(r) {
3531
3531
  default:
3532
3532
  this.state = te.NONE;
3533
3533
  }
3534
- this.state !== te.NONE && this.dispatchEvent(Ri);
3534
+ this.state !== te.NONE && this.dispatchEvent(Mi);
3535
3535
  }
3536
- function Pc(r) {
3536
+ function zc(r) {
3537
3537
  switch (this._trackPointer(r), this.state) {
3538
3538
  case te.TOUCH_ROTATE:
3539
3539
  if (this.enableRotate === !1) return;
@@ -3555,16 +3555,16 @@ function Pc(r) {
3555
3555
  this.state = te.NONE;
3556
3556
  }
3557
3557
  }
3558
- function zc(r) {
3558
+ function Uc(r) {
3559
3559
  this.enabled !== !1 && r.preventDefault();
3560
3560
  }
3561
- function Uc(r) {
3561
+ function Fc(r) {
3562
3562
  r.key === "Control" && (this._controlActive = !0, this.domElement.getRootNode().addEventListener("keyup", this._interceptControlUp, { passive: !0, capture: !0 }));
3563
3563
  }
3564
- function Fc(r) {
3564
+ function jc(r) {
3565
3565
  r.key === "Control" && (this._controlActive = !1, this.domElement.getRootNode().removeEventListener("keyup", this._interceptControlUp, { passive: !0, capture: !0 }));
3566
3566
  }
3567
- class jc {
3567
+ class Bc {
3568
3568
  constructor(e) {
3569
3569
  _(this, "group");
3570
3570
  _(this, "sphere");
@@ -3638,7 +3638,7 @@ class jc {
3638
3638
  this.scene.remove(this.group), this.sphere.geometry.dispose(), this.sphere.material.dispose(), this.arrow.dispose();
3639
3639
  }
3640
3640
  }
3641
- class Bc extends EventTarget {
3641
+ class Hc extends EventTarget {
3642
3642
  constructor(t, n, s, i) {
3643
3643
  super();
3644
3644
  _(this, "camera");
@@ -3713,7 +3713,7 @@ class Bc extends EventTarget {
3713
3713
  this.stop_animation(), this._orbit_restart_timeout_id && (clearTimeout(this._orbit_restart_timeout_id), this._orbit_restart_timeout_id = void 0);
3714
3714
  }
3715
3715
  }
3716
- class Hc {
3716
+ class Vc {
3717
3717
  /**
3718
3718
  * Create a new RaycastHelper.
3719
3719
  * @param camera - The camera to raycast from
@@ -3752,7 +3752,7 @@ class Hc {
3752
3752
  return this.raycaster;
3753
3753
  }
3754
3754
  }
3755
- class Vc extends EventTarget {
3755
+ class Gc extends EventTarget {
3756
3756
  /**
3757
3757
  * Create a new Viewer instance.
3758
3758
  * @param container The HTML element where the viewer will be rendered.
@@ -3801,7 +3801,7 @@ class Vc extends EventTarget {
3801
3801
  });
3802
3802
  this.scene = new p.Scene(), this.settings = n, this.container = t, this.renderer = new p.WebGLRenderer({ antialias: !0 }), this.renderer.setSize(t.clientWidth, t.clientHeight), this.renderer.setPixelRatio(window.devicePixelRatio), this.renderer.setSize(t.clientWidth, t.clientHeight), this.renderer.toneMapping = p.ACESFilmicToneMapping, this.renderer.outputColorSpace = p.SRGBColorSpace, this.container.appendChild(this.renderer.domElement);
3803
3803
  const s = t.clientWidth / t.clientHeight;
3804
- this.camera = new p.PerspectiveCamera(75, s, 0.1, 1e3), this.camera.position.set(0, 2, 5), this.controls = new Rc(this.camera, this.renderer.domElement), this.controls.enableDamping = !1, this.orbit_controller = new Bc(this.camera, this.controls, this.renderer, this.scene), this.raycast_helper = new Hc(this.camera, this.renderer.domElement, this.scene.children), this._setup_orbit_animation_user_override(), window.addEventListener("resize", this._resize_handler), this.animate(), j.info("Viewer: Initializing...");
3804
+ this.camera = new p.PerspectiveCamera(75, s, 0.1, 1e3), this.camera.position.set(0, 2, 5), this.controls = new Mc(this.camera, this.renderer.domElement), this.controls.enableDamping = !1, this.orbit_controller = new Hc(this.camera, this.controls, this.renderer, this.scene), this.raycast_helper = new Vc(this.camera, this.renderer.domElement, this.scene.children), this._setup_orbit_animation_user_override(), window.addEventListener("resize", this._resize_handler), this.animate(), j.info("Viewer: Initializing...");
3805
3805
  }
3806
3806
  /*
3807
3807
  * Animation Mixers
@@ -3925,7 +3925,7 @@ class Vc extends EventTarget {
3925
3925
  * @param objects - Optional array of objects to raycast against
3926
3926
  */
3927
3927
  enable_3d_cursor(t) {
3928
- this.cursor_3d || (this.cursor_3d = new jc(this.scene)), this.cursor_3d.enable(), this._cursor_3d_mouse_handler = (n) => {
3928
+ this.cursor_3d || (this.cursor_3d = new Bc(this.scene)), this.cursor_3d.enable(), this._cursor_3d_mouse_handler = (n) => {
3929
3929
  var i;
3930
3930
  const s = this.raycast_from_event(n, t);
3931
3931
  (i = this.cursor_3d) == null || i.update(s);
@@ -3960,7 +3960,7 @@ class Vc extends EventTarget {
3960
3960
  this.orbit_controller.dispose(), this.disable_3d_cursor(), this.cursor_3d && (this.cursor_3d.dispose(), this.cursor_3d = void 0), window.removeEventListener("resize", this._resize_handler), this.animation_mixers.clear(), this.animation_callbacks.clear(), this.renderer.dispose(), this.renderer.domElement && this.renderer.domElement.parentElement && this.renderer.domElement.parentElement.removeChild(this.renderer.domElement), this._resolution_materials.clear();
3961
3961
  }
3962
3962
  }
3963
- class Gc extends ko {
3963
+ class Zc extends Do {
3964
3964
  /**
3965
3965
  * Constructs a new RGBE loader.
3966
3966
  *
@@ -3989,14 +3989,14 @@ class Gc extends ko {
3989
3989
  throw new Error("THREE.RGBELoader: Memory Error: " + (R || ""));
3990
3990
  }
3991
3991
  }, d = `
3992
- `, u = function(L, R, O) {
3992
+ `, u = function(L, R, C) {
3993
3993
  R = R || 1024;
3994
- let G = L.pos, Z = -1, k = 0, ee = "", $ = String.fromCharCode.apply(null, new Uint16Array(L.subarray(G, G + 128)));
3995
- for (; 0 > (Z = $.indexOf(d)) && k < R && G < L.byteLength; )
3996
- ee += $, k += $.length, G += 128, $ += String.fromCharCode.apply(null, new Uint16Array(L.subarray(G, G + 128)));
3997
- return -1 < Z ? (L.pos += k + Z + 1, ee + $.slice(0, Z)) : !1;
3994
+ let G = L.pos, Z = -1, O = 0, ee = "", $ = String.fromCharCode.apply(null, new Uint16Array(L.subarray(G, G + 128)));
3995
+ for (; 0 > (Z = $.indexOf(d)) && O < R && G < L.byteLength; )
3996
+ ee += $, O += $.length, G += 128, $ += String.fromCharCode.apply(null, new Uint16Array(L.subarray(G, G + 128)));
3997
+ return -1 < Z ? (L.pos += O + Z + 1, ee + $.slice(0, Z)) : !1;
3998
3998
  }, h = function(L) {
3999
- const R = /^#\?(\S+)/, O = /^\s*GAMMA\s*=\s*(\d+(\.\d+)?)\s*$/, N = /^\s*EXPOSURE\s*=\s*(\d+(\.\d+)?)\s*$/, G = /^\s*FORMAT=(\S+)\s*$/, Z = /^\s*\-Y\s+(\d+)\s+\+X\s+(\d+)\s*$/, k = {
3999
+ const R = /^#\?(\S+)/, C = /^\s*GAMMA\s*=\s*(\d+(\.\d+)?)\s*$/, N = /^\s*EXPOSURE\s*=\s*(\d+(\.\d+)?)\s*$/, G = /^\s*FORMAT=(\S+)\s*$/, Z = /^\s*\-Y\s+(\d+)\s+\+X\s+(\d+)\s*$/, O = {
4000
4000
  valid: 0,
4001
4001
  /* indicate which fields are valid */
4002
4002
  string: "",
@@ -4016,18 +4016,18 @@ class Gc extends ko {
4016
4016
  /* image dimensions, width/height */
4017
4017
  };
4018
4018
  let ee, $;
4019
- for ((L.pos >= L.byteLength || !(ee = u(L))) && o(1, "no header found"), ($ = ee.match(R)) || o(3, "bad initial token"), k.valid |= 1, k.programtype = $[1], k.string += ee + `
4019
+ for ((L.pos >= L.byteLength || !(ee = u(L))) && o(1, "no header found"), ($ = ee.match(R)) || o(3, "bad initial token"), O.valid |= 1, O.programtype = $[1], O.string += ee + `
4020
4020
  `; ee = u(L), ee !== !1; ) {
4021
- if (k.string += ee + `
4021
+ if (O.string += ee + `
4022
4022
  `, ee.charAt(0) === "#") {
4023
- k.comments += ee + `
4023
+ O.comments += ee + `
4024
4024
  `;
4025
4025
  continue;
4026
4026
  }
4027
- if (($ = ee.match(O)) && (k.gamma = parseFloat($[1])), ($ = ee.match(N)) && (k.exposure = parseFloat($[1])), ($ = ee.match(G)) && (k.valid |= 2, k.format = $[1]), ($ = ee.match(Z)) && (k.valid |= 4, k.height = parseInt($[1], 10), k.width = parseInt($[2], 10)), k.valid & 2 && k.valid & 4) break;
4027
+ if (($ = ee.match(C)) && (O.gamma = parseFloat($[1])), ($ = ee.match(N)) && (O.exposure = parseFloat($[1])), ($ = ee.match(G)) && (O.valid |= 2, O.format = $[1]), ($ = ee.match(Z)) && (O.valid |= 4, O.height = parseInt($[1], 10), O.width = parseInt($[2], 10)), O.valid & 2 && O.valid & 4) break;
4028
4028
  }
4029
- return k.valid & 2 || o(3, "missing format specifier"), k.valid & 4 || o(3, "missing image size specifier"), k;
4030
- }, f = function(L, R, O) {
4029
+ return O.valid & 2 || o(3, "missing format specifier"), O.valid & 4 || o(3, "missing image size specifier"), O;
4030
+ }, f = function(L, R, C) {
4031
4031
  const N = R;
4032
4032
  if (
4033
4033
  // run length encoding is not allowed so read flat
@@ -4036,23 +4036,23 @@ class Gc extends ko {
4036
4036
  )
4037
4037
  return new Uint8Array(L);
4038
4038
  N !== (L[2] << 8 | L[3]) && o(3, "wrong scanline width");
4039
- const G = new Uint8Array(4 * R * O);
4039
+ const G = new Uint8Array(4 * R * C);
4040
4040
  G.length || o(4, "unable to allocate buffer space");
4041
- let Z = 0, k = 0;
4041
+ let Z = 0, O = 0;
4042
4042
  const ee = 4 * N, $ = new Uint8Array(4), be = new Uint8Array(ee);
4043
- let le = O;
4044
- for (; le > 0 && k < L.byteLength; ) {
4045
- k + 4 > L.byteLength && o(1), $[0] = L[k++], $[1] = L[k++], $[2] = L[k++], $[3] = L[k++], ($[0] != 2 || $[1] != 2 || ($[2] << 8 | $[3]) != N) && o(3, "bad rgbe scanline format");
4043
+ let le = C;
4044
+ for (; le > 0 && O < L.byteLength; ) {
4045
+ O + 4 > L.byteLength && o(1), $[0] = L[O++], $[1] = L[O++], $[2] = L[O++], $[3] = L[O++], ($[0] != 2 || $[1] != 2 || ($[2] << 8 | $[3]) != N) && o(3, "bad rgbe scanline format");
4046
4046
  let Ue = 0, Se;
4047
- for (; Ue < ee && k < L.byteLength; ) {
4048
- Se = L[k++];
4047
+ for (; Ue < ee && O < L.byteLength; ) {
4048
+ Se = L[O++];
4049
4049
  const ue = Se > 128;
4050
4050
  if (ue && (Se -= 128), (Se === 0 || Ue + Se > ee) && o(3, "bad scanline data"), ue) {
4051
- const Q = L[k++];
4051
+ const Q = L[O++];
4052
4052
  for (let ut = 0; ut < Se; ut++)
4053
4053
  be[Ue++] = Q;
4054
4054
  } else
4055
- be.set(L.subarray(k, k + Se), Ue), Ue += Se, k += Se;
4055
+ be.set(L.subarray(O, O + Se), Ue), Ue += Se, O += Se;
4056
4056
  }
4057
4057
  const ne = N;
4058
4058
  for (let ue = 0; ue < ne; ue++) {
@@ -4062,12 +4062,12 @@ class Gc extends ko {
4062
4062
  le--;
4063
4063
  }
4064
4064
  return G;
4065
- }, g = function(L, R, O, N) {
4065
+ }, g = function(L, R, C, N) {
4066
4066
  const G = L[R + 3], Z = Math.pow(2, G - 128) / 255;
4067
- O[N + 0] = L[R + 0] * Z, O[N + 1] = L[R + 1] * Z, O[N + 2] = L[R + 2] * Z, O[N + 3] = 1;
4068
- }, y = function(L, R, O, N) {
4067
+ C[N + 0] = L[R + 0] * Z, C[N + 1] = L[R + 1] * Z, C[N + 2] = L[R + 2] * Z, C[N + 3] = 1;
4068
+ }, y = function(L, R, C, N) {
4069
4069
  const G = L[R + 3], Z = Math.pow(2, G - 128) / 255;
4070
- O[N + 0] = dn.toHalfFloat(Math.min(L[R + 0] * Z, 65504)), O[N + 1] = dn.toHalfFloat(Math.min(L[R + 1] * Z, 65504)), O[N + 2] = dn.toHalfFloat(Math.min(L[R + 2] * Z, 65504)), O[N + 3] = dn.toHalfFloat(1);
4070
+ C[N + 0] = dn.toHalfFloat(Math.min(L[R + 0] * Z, 65504)), C[N + 1] = dn.toHalfFloat(Math.min(L[R + 1] * Z, 65504)), C[N + 2] = dn.toHalfFloat(Math.min(L[R + 2] * Z, 65504)), C[N + 3] = dn.toHalfFloat(1);
4071
4071
  }, x = new Uint8Array(e);
4072
4072
  x.pos = 0;
4073
4073
  const b = h(x), w = b.width, T = b.height, v = f(x.subarray(x.pos), w, T);
@@ -4076,15 +4076,15 @@ class Gc extends ko {
4076
4076
  case Ms:
4077
4077
  F = v.length / 4;
4078
4078
  const L = new Float32Array(F * 4);
4079
- for (let O = 0; O < F; O++)
4080
- g(v, O * 4, L, O * 4);
4079
+ for (let C = 0; C < F; C++)
4080
+ g(v, C * 4, L, C * 4);
4081
4081
  P = L, V = Ms;
4082
4082
  break;
4083
4083
  case ft:
4084
4084
  F = v.length / 4;
4085
4085
  const R = new Uint16Array(F * 4);
4086
- for (let O = 0; O < F; O++)
4087
- y(v, O * 4, R, O * 4);
4086
+ for (let C = 0; C < F; C++)
4087
+ y(v, C * 4, R, C * 4);
4088
4088
  P = R, V = ft;
4089
4089
  break;
4090
4090
  default:
@@ -4122,10 +4122,10 @@ class Gc extends ko {
4122
4122
  return super.load(e, i, n, s);
4123
4123
  }
4124
4124
  }
4125
- const Zc = Array(1024).fill(0).map(
4125
+ const Wc = Array(1024).fill(0).map(
4126
4126
  (r, e) => Math.pow(e / 255 * 0.9478672986 + 0.0521327014, 2.4)
4127
4127
  );
4128
- class Wc extends bi {
4128
+ class Xc extends wi {
4129
4129
  /**
4130
4130
  * Constructs a new Ultra HDR loader.
4131
4131
  *
@@ -4234,7 +4234,7 @@ class Wc extends bi {
4234
4234
  width: u,
4235
4235
  height: h,
4236
4236
  data: d,
4237
- format: Ki,
4237
+ format: qi,
4238
4238
  type: this.type
4239
4239
  });
4240
4240
  },
@@ -4256,17 +4256,17 @@ class Wc extends bi {
4256
4256
  * @return {DataTexture} The Ultra HDR texture.
4257
4257
  */
4258
4258
  load(e, t, n, s) {
4259
- const i = new Do(
4259
+ const i = new Io(
4260
4260
  this.type === ft ? new Uint16Array() : new Float32Array(),
4261
4261
  0,
4262
4262
  0,
4263
- Ki,
4263
+ qi,
4264
4264
  this.type,
4265
- Io,
4266
- Ks,
4267
- Ks,
4268
- Yt,
4269
4265
  No,
4266
+ qs,
4267
+ qs,
4268
+ Yt,
4269
+ Po,
4270
4270
  1,
4271
4271
  Pe
4272
4272
  );
@@ -4319,7 +4319,7 @@ class Wc extends bi {
4319
4319
  }
4320
4320
  }
4321
4321
  _srgbToLinear(e) {
4322
- return e / 255 < 0.04045 ? e / 255 * 0.0773993808 : e < 1024 ? Zc[~~e] : Math.pow(e / 255 * 0.9478672986 + 0.0521327014, 2.4);
4322
+ return e / 255 < 0.04045 ? e / 255 * 0.0773993808 : e < 1024 ? Wc[~~e] : Math.pow(e / 255 * 0.9478672986 + 0.0521327014, 2.4);
4323
4323
  }
4324
4324
  _applyGainmapToSDR(e, t, n, s, i) {
4325
4325
  const o = (a) => new Promise((c, l) => {
@@ -4393,11 +4393,11 @@ class Wc extends bi {
4393
4393
  for (let v = 0; v < g.data.length; v += 4) {
4394
4394
  const P = v / 4 % a.width, V = Math.floor(v / 4 / a.width);
4395
4395
  for (let F = 0; F < 3; F++) {
4396
- const L = g.data[v + F], R = (V * a.width + P) * 4 + F, O = f.data[R] / 255, N = T ? O : Math.pow(O, 1 / e.gamma), G = e.gainMapMin * (1 - N) + e.gainMapMax * N, Z = (L + e.offsetSDR) * (G * w === 0 ? 1 : Math.pow(2, G * w)) - e.offsetHDR, k = Math.min(
4396
+ const L = g.data[v + F], R = (V * a.width + P) * 4 + F, C = f.data[R] / 255, N = T ? C : Math.pow(C, 1 / e.gamma), G = e.gainMapMin * (1 - N) + e.gainMapMax * N, Z = (L + e.offsetSDR) * (G * w === 0 ? 1 : Math.pow(2, G * w)) - e.offsetHDR, O = Math.min(
4397
4397
  Math.max(this._srgbToLinear(Z), 0),
4398
4398
  65504
4399
4399
  );
4400
- y[v + F] = this.type === ft ? dn.toHalfFloat(k) : k;
4400
+ y[v + F] = this.type === ft ? dn.toHalfFloat(O) : O;
4401
4401
  }
4402
4402
  }
4403
4403
  s(y, a.width, a.height);
@@ -4408,23 +4408,23 @@ class Wc extends bi {
4408
4408
  });
4409
4409
  }
4410
4410
  }
4411
- class _s extends ye {
4411
+ class Ln extends ye {
4412
4412
  /**
4413
4413
  * Constructs a new skydome.
4414
4414
  */
4415
4415
  constructor() {
4416
- const e = _s.SkyShader, t = new wi({
4416
+ const e = Ln.SkyShader, t = new Ei({
4417
4417
  name: e.name,
4418
- uniforms: Ei.clone(e.uniforms),
4418
+ uniforms: Ai.clone(e.uniforms),
4419
4419
  vertexShader: e.vertexShader,
4420
4420
  fragmentShader: e.fragmentShader,
4421
- side: zr,
4421
+ side: Ur,
4422
4422
  depthWrite: !1
4423
4423
  });
4424
- super(new Ur(1, 1, 1), t), this.isSky = !0;
4424
+ super(new Fr(1, 1, 1), t), this.isSky = !0;
4425
4425
  }
4426
4426
  }
4427
- _s.SkyShader = {
4427
+ Ln.SkyShader = {
4428
4428
  name: "SkyShader",
4429
4429
  uniforms: {
4430
4430
  turbidity: { value: 2 },
@@ -4596,12 +4596,12 @@ _s.SkyShader = {
4596
4596
  }`
4597
4597
  )
4598
4598
  };
4599
- class Xc extends Po {
4599
+ class $c extends zo {
4600
4600
  constructor() {
4601
4601
  super();
4602
- const e = new Ur();
4602
+ const e = new Fr();
4603
4603
  e.deleteAttribute("uv");
4604
- const t = new is({ side: zr }), n = new is(), s = new Fr(16777215, 900, 28, 2);
4604
+ const t = new rs({ side: Ur }), n = new rs(), s = new jr(16777215, 900, 28, 2);
4605
4605
  s.position.set(0.418, 16.199, 0.3), this.add(s);
4606
4606
  const i = new ye(e, t);
4607
4607
  i.position.set(-0.757, 13.219, 0.717), i.scale.set(31.713, 28.305, 28.591), this.add(i);
@@ -4678,7 +4678,7 @@ class ve extends Error {
4678
4678
  return `${this.name} [${this.component}:${this.code}]: ${this.message}`;
4679
4679
  }
4680
4680
  }
4681
- const Oe = {
4681
+ const Ce = {
4682
4682
  INITIALIZATION_FAILED: "INITIALIZATION_FAILED",
4683
4683
  // Environment errors
4684
4684
  HDR_LOAD_FAILED: "HDR_LOAD_FAILED",
@@ -4690,7 +4690,11 @@ const Oe = {
4690
4690
  INVALID_STORY_JSON: "INVALID_STORY_JSON",
4691
4691
  INVALID_SLIDE_INDEX: "INVALID_SLIDE_INDEX"
4692
4692
  };
4693
- class $c extends EventTarget {
4693
+ function Ds(r) {
4694
+ const e = r;
4695
+ e && typeof e.dispose == "function" && e.dispose();
4696
+ }
4697
+ class Yc extends EventTarget {
4694
4698
  constructor(t, n) {
4695
4699
  super();
4696
4700
  _(this, "settings");
@@ -4704,6 +4708,9 @@ class $c extends EventTarget {
4704
4708
  _(this, "env_map", null);
4705
4709
  _(this, "sky", null);
4706
4710
  _(this, "Sun", null);
4711
+ _(this, "sky_pmrem", null);
4712
+ _(this, "sky_env_rt", null);
4713
+ _(this, "last_sky_dir", null);
4707
4714
  this.viewer = t, this.settings = n, this.renderer = t.renderer, this.scene = t.scene, this.settings.addEventListener("update", (s) => {
4708
4715
  const i = s.detail;
4709
4716
  this.update(i.environment);
@@ -4732,7 +4739,7 @@ class $c extends EventTarget {
4732
4739
  const o = new ve(
4733
4740
  `Failed to update environment: ${i instanceof Error ? i.message : i}`,
4734
4741
  "Environment",
4735
- Oe.ENVIRONMENT_UPDATE_FAILED,
4742
+ Ce.ENVIRONMENT_UPDATE_FAILED,
4736
4743
  { type: n, url: s, error: i }
4737
4744
  );
4738
4745
  throw this.dispatchEvent(
@@ -4743,16 +4750,43 @@ class $c extends EventTarget {
4743
4750
  }
4744
4751
  }
4745
4752
  clear_environment() {
4746
- this.scene.background = null, this.scene.environment = null, this.sky = null, this.texture = null;
4753
+ this.scene.background = null, this.scene.environment = null, this.sky = null, this.texture = null, this.last_sky_dir = null, this.sky_env_rt && (Ds(this.sky_env_rt), this.sky_env_rt = null);
4747
4754
  }
4748
4755
  set_sky_environment() {
4749
- const t = new _s();
4756
+ const t = new Ln();
4750
4757
  t.scale.setScalar(45e4);
4751
4758
  const n = p.MathUtils.degToRad(90), s = p.MathUtils.degToRad(180), i = new p.Vector3().setFromSphericalCoords(1, n, s);
4752
- t.material.uniforms.sunPosition.value = i, this.sky = t, this.scene.add(this.sky);
4759
+ t.material.uniforms.sunPosition.value = i, this.sky = t, this.scene.add(this.sky), this.update_sky_environment(i);
4760
+ }
4761
+ /**
4762
+ * Point the sky dome's sun disc at the given direction and rebuild the
4763
+ * image-based ambient light (scene.environment) from the sky, so both the
4764
+ * visible sky and the ambient light follow the sun. Skips the rebuild when
4765
+ * the direction barely changed (e.g. during slider drags).
4766
+ */
4767
+ update_sky_environment(t) {
4768
+ if (this.sky)
4769
+ try {
4770
+ const n = t, s = Math.hypot((n == null ? void 0 : n.x) ?? 0, (n == null ? void 0 : n.y) ?? 1, (n == null ? void 0 : n.z) ?? 0) || 1, i = new p.Vector3(((n == null ? void 0 : n.x) ?? 0) / s, ((n == null ? void 0 : n.y) ?? 1) / s, ((n == null ? void 0 : n.z) ?? 0) / s);
4771
+ if (this.last_sky_dir && this.last_sky_dir.angleTo(i) < p.MathUtils.degToRad(0.5))
4772
+ return;
4773
+ this.last_sky_dir = i.clone();
4774
+ const o = this.sky.material.uniforms;
4775
+ o.sunPosition.value.copy(i);
4776
+ const a = new Ln();
4777
+ a.scale.setScalar(100);
4778
+ const c = a.material.uniforms;
4779
+ c.sunPosition.value.copy(i), c.turbidity.value = o.turbidity.value, c.rayleigh.value = o.rayleigh.value, a.updateMatrixWorld(!0);
4780
+ const l = new p.Scene();
4781
+ l.add(a), this.sky_pmrem || (this.sky_pmrem = new p.PMREMGenerator(this.renderer));
4782
+ const d = this.sky_pmrem.fromScene(l, 0, 0.1, 500);
4783
+ this.sky_env_rt && this.sky_env_rt.dispose(), this.sky_env_rt = d, this.scene.environment = d.texture, l.remove(a), a.geometry.dispose(), a.material.dispose();
4784
+ } catch (n) {
4785
+ j.warn("Skipping sky environment rebuild:", n);
4786
+ }
4753
4787
  }
4754
4788
  set_room_environment() {
4755
- const t = new Xc(), s = new p.PMREMGenerator(this.renderer).fromScene(t).texture;
4789
+ const t = new $c(), s = new p.PMREMGenerator(this.renderer).fromScene(t).texture;
4756
4790
  this.scene.background = s, this.scene.environment = s;
4757
4791
  }
4758
4792
  set_color_environment(t = 16777215) {
@@ -4761,7 +4795,7 @@ class $c extends EventTarget {
4761
4795
  async set_hdr_environment(t, n = !1) {
4762
4796
  const s = new p.PMREMGenerator(this.renderer);
4763
4797
  s.compileEquirectangularShader();
4764
- const i = n ? new Wc() : new Gc();
4798
+ const i = n ? new Xc() : new Zc();
4765
4799
  await new Promise((o, a) => {
4766
4800
  i.load(
4767
4801
  t,
@@ -4777,7 +4811,7 @@ class $c extends EventTarget {
4777
4811
  void 0,
4778
4812
  (c) => {
4779
4813
  j.error("Error loading HDR texture:", c), a(
4780
- new ve(`Failed to load HDR texture from ${t}`, "Environment", Oe.HDR_LOAD_FAILED, {
4814
+ new ve(`Failed to load HDR texture from ${t}`, "Environment", Ce.HDR_LOAD_FAILED, {
4781
4815
  url: t,
4782
4816
  ultra: n,
4783
4817
  error: c
@@ -4792,74 +4826,74 @@ class $c extends EventTarget {
4792
4826
  }
4793
4827
  dispose() {
4794
4828
  var t, n;
4795
- this.clear_environment(), this.ambient && (this.scene.remove(this.ambient), (n = (t = this.ambient).dispose) == null || n.call(t), this.ambient = null), this.env_map && (this.env_map.dispose(), this.env_map = null), this.texture && (this.texture.dispose(), this.texture = null), this.sky && (this.scene.remove(this.sky), this.sky = null);
4829
+ this.clear_environment(), this.ambient && (this.scene.remove(this.ambient), (n = (t = this.ambient).dispose) == null || n.call(t), this.ambient = null), this.env_map && (this.env_map.dispose(), this.env_map = null), this.sky_env_rt && (Ds(this.sky_env_rt), this.sky_env_rt = null), this.sky_pmrem && (Ds(this.sky_pmrem), this.sky_pmrem = null), this.last_sky_dir = null, this.texture && (this.texture.dispose(), this.texture = null), this.sky && (this.scene.remove(this.sky), this.sky = null);
4796
4830
  }
4797
4831
  }
4798
- function lr(r) {
4832
+ function dr(r) {
4799
4833
  const t = new p.Box3().setFromObject(r).getSize(new p.Vector3());
4800
4834
  return Math.max(10, Math.max(t.x, t.y, t.z));
4801
4835
  }
4802
- const Yc = 512, Kc = 100, qc = 30, Jc = -1e-3, Qc = 3, el = 16, { PI: tl, sin: ot, cos: ct, tan: so, asin: io, atan2: ro } = Math, Ne = tl / 180, nl = 1e3 * 60 * 60 * 24, sl = 2440588, il = 2451545;
4803
- function rl(r) {
4804
- return r.valueOf() / nl - 0.5 + sl - il;
4805
- }
4836
+ const Kc = 512, qc = 100, Jc = 30, Qc = -1e-3, el = 3, tl = 16, { PI: nl, sin: ot, cos: ct, tan: io, asin: ro, atan2: oo } = Math, Ne = nl / 180, sl = 1e3 * 60 * 60 * 24, il = 2440588, rl = 2451545;
4806
4837
  function ol(r) {
4838
+ return r.valueOf() / sl - 0.5 + il - rl;
4839
+ }
4840
+ function al(r) {
4807
4841
  const e = 2e3 + r / 365.2425;
4808
4842
  let t;
4809
4843
  return e < 1920 ? (t = e - 1900, -2.79 + t * (1.494119 + t * (-0.0598939 + t * (61966e-7 - t * 197e-6)))) : e < 1941 ? (t = e - 1920, 21.2 + t * (0.84493 + t * (-0.0761 + t * 20936e-7))) : e < 1961 ? (t = e - 1950, 29.07 + t * (0.407 + t * (-1 / 233 + t / 2547))) : e < 1986 ? (t = e - 1975, 45.45 + t * (1.067 + t * (-1 / 260 - t / 718))) : e < 2005 ? (t = e - 2e3, 63.86 + t * (0.3345 + t * (-0.060374 + t * (17275e-7 + t * (651814e-9 + t * 2373599e-11))))) : e < 2050 ? (t = e - 2e3, 62.92 + t * (0.32217 + t * 5589e-6)) : (t = (e - 1820) / 100, -20 + 32 * t * t - 0.5628 * (2150 - e));
4810
4844
  }
4811
- function al(r) {
4812
- return r + ol(r) / 86400;
4813
- }
4814
- function cl(r, e, t) {
4815
- return (ro(ot(r), ct(r) * ot(e) - so(t) * ct(e)) / Ne + 540) % 360;
4845
+ function cl(r) {
4846
+ return r + al(r) / 86400;
4816
4847
  }
4817
4848
  function ll(r, e, t) {
4818
- return io(ot(e) * ot(t) + ct(e) * ct(t) * ct(r));
4849
+ return (oo(ot(r), ct(r) * ot(e) - io(t) * ct(e)) / Ne + 540) % 360;
4819
4850
  }
4820
- function dl(r, e) {
4821
- return Ne * (280.46061837 + 360.98564736629 * r) - e;
4851
+ function dl(r, e, t) {
4852
+ return ro(ot(e) * ot(t) + ct(e) * ct(t) * ct(r));
4822
4853
  }
4823
- function ul(r) {
4824
- return r < 0 && (r = 0), 2967e-7 / so(r + 312536e-8 / (r + 0.08901179));
4854
+ function ul(r, e) {
4855
+ return Ne * (280.46061837 + 360.98564736629 * r) - e;
4825
4856
  }
4826
4857
  function hl(r) {
4858
+ return r < 0 && (r = 0), 2967e-7 / io(r + 312536e-8 / (r + 0.08901179));
4859
+ }
4860
+ function fl(r) {
4827
4861
  const e = r / 36525, t = Ne * (280.46646 + e * (36000.76983 + e * 3032e-7)), n = Ne * (357.52911 + e * (35999.05029 - e * 1537e-7)), s = ot(n), i = ct(n), o = Ne * ((1.914602 - e * (4817e-6 + e * 14e-6)) * s + // equation of center
4828
4862
  (0.019993 - 101e-6 * e) * 2 * s * i + 289e-6 * s * (3 - 4 * s * s)), a = Ne * (125.04 - 1934.136 * e), c = t + o - Ne * (569e-5 + 478e-5 * ot(a)), l = Ne * (23.439291 - e * (0.0130042 + e * (16e-8 - e * 504e-9))) + Ne * 256e-5 * ct(a);
4829
4863
  return {
4830
- ra: ro(ct(l) * ot(c), ct(c)),
4864
+ ra: oo(ct(l) * ot(c), ct(c)),
4831
4865
  // 25.6
4832
- dec: io(ot(l) * ot(c)),
4866
+ dec: ro(ot(l) * ot(c)),
4833
4867
  // 25.7
4834
4868
  lon: c
4835
4869
  };
4836
4870
  }
4837
- function fl(r, e, t) {
4838
- const n = Ne * -t, s = Ne * e, i = rl(r), o = hl(al(i)), a = dl(i, n) - o.ra, c = ll(a, s, o.dec);
4871
+ function ml(r, e, t) {
4872
+ const n = Ne * -t, s = Ne * e, i = ol(r), o = fl(cl(i)), a = ul(i, n) - o.ra, c = dl(a, s, o.dec);
4839
4873
  return {
4840
- azimuth: cl(a, s, o.dec),
4874
+ azimuth: ll(a, s, o.dec),
4841
4875
  // apparent (refraction-corrected) altitude in degrees
4842
- altitude: (c + ul(c)) / Ne
4876
+ altitude: (c + hl(c)) / Ne
4843
4877
  };
4844
4878
  }
4845
- const oi = Math.PI / 180;
4846
- function ml(r, e, t) {
4847
- const n = fl(t, r, e), s = n.altitude, i = (n.azimuth % 360 + 360) % 360, o = s * oi, a = i * oi, c = new p.Vector3(
4879
+ const ai = Math.PI / 180;
4880
+ function pl(r, e, t) {
4881
+ const n = ml(t, r, e), s = n.altitude, i = (n.azimuth % 360 + 360) % 360, o = s * ai, a = i * ai, c = new p.Vector3(
4848
4882
  Math.cos(o) * Math.sin(a),
4849
4883
  Math.sin(o),
4850
4884
  -Math.cos(o) * Math.cos(a)
4851
4885
  );
4852
4886
  return { altitude_deg: s, azimuth_deg: i, direction: c };
4853
4887
  }
4854
- const pl = -6;
4855
- function _l(r, e, t) {
4888
+ const _l = -6;
4889
+ function gl(r, e, t) {
4856
4890
  const n = new p.Color(t);
4857
- if (r <= pl)
4891
+ if (r <= _l)
4858
4892
  return { intensity: 0, color: new p.Color(0) };
4859
- const s = Math.max(0, r), i = Math.sin(Math.min(s, 90) * oi), o = e * (0.12 + 0.88 * i), a = 1 - Math.min(s / 30, 1), l = new p.Color(16747586).lerp(n, 1 - a * 0.85);
4893
+ const s = Math.max(0, r), i = Math.sin(Math.min(s, 90) * ai), o = e * (0.12 + 0.88 * i), a = 1 - Math.min(s / 30, 1), l = new p.Color(16747586).lerp(n, 1 - a * 0.85);
4860
4894
  return { intensity: o, color: l };
4861
4895
  }
4862
- class gl {
4896
+ class yl {
4863
4897
  constructor(e, t, n, s) {
4864
4898
  _(this, "viewer");
4865
4899
  _(this, "scene");
@@ -4895,20 +4929,14 @@ class gl {
4895
4929
  });
4896
4930
  }
4897
4931
  /**
4898
- * Point the procedural sky dome at the same sun the light uses, so the
4899
- * visible sun disc and the lighting direction stay in agreement.
4932
+ * Point the sky dome (and its image-based ambient light) at the same sun
4933
+ * the directional light uses, so sky and lighting stay in agreement.
4900
4934
  */
4901
4935
  sync_sky(e) {
4902
- if (!e) return;
4903
- const t = this.environment.sky;
4904
- if (!t) return;
4905
- const n = t.material.uniforms;
4906
- n != null && n.sunPosition && n.sunPosition.value.copy(
4907
- new p.Vector3(e[0], e[1], e[2]).normalize()
4908
- );
4936
+ e && this.environment.update_sky_environment(new p.Vector3(e[0], e[1], e[2]));
4909
4937
  }
4910
4938
  sun_fit_object(e = this.scene) {
4911
- const t = lr(e);
4939
+ const t = dr(e);
4912
4940
  let n = new p.Vector3(0, 1, 0).normalize();
4913
4941
  n = n.multiplyScalar(t * 2), this.sun && (n = this.sun.position.clone());
4914
4942
  }
@@ -4921,15 +4949,15 @@ class gl {
4921
4949
  for (const o of this.model_manager.models.values())
4922
4950
  o.settings.shadow && e.add(o.group.clone());
4923
4951
  e.children.length === 0 && j.warn("No models with shadows found to fit shadow map."), j.debug("Models in fit_object:", e);
4924
- const t = lr(e), n = Yc, s = Math.ceil(t / Kc), i = Math.min(
4952
+ const t = dr(e), n = Kc, s = Math.ceil(t / qc), i = Math.min(
4925
4953
  Math.pow(2, Math.ceil(Math.log2(n * s))),
4926
4954
  this.viewer.renderer.capabilities.maxTextureSize
4927
4955
  // Ensure it's within the device limit
4928
4956
  );
4929
4957
  if (j.debug("Shadow map size:", i), this.sun) {
4930
4958
  this.sun.shadow.mapSize.width = i, this.sun.shadow.mapSize.height = i;
4931
- const o = qc;
4932
- this.sun.shadow.camera.left = -(t / 2 + o), this.sun.shadow.camera.right = t / 2 + o, this.sun.shadow.camera.top = t / 2 + o, this.sun.shadow.camera.bottom = -(t / 2 + o), this.sun.shadow.camera.near = 0.1, this.sun.shadow.camera.far = t * 2, this.sun.shadow.bias = Jc, this.sun.shadow.radius = Qc, this.sun.shadow.blurSamples = el, j.info(`Recreated sun with shadow map size: ${i}x${i}`);
4959
+ const o = Jc;
4960
+ this.sun.shadow.camera.left = -(t / 2 + o), this.sun.shadow.camera.right = t / 2 + o, this.sun.shadow.camera.top = t / 2 + o, this.sun.shadow.camera.bottom = -(t / 2 + o), this.sun.shadow.camera.near = 0.1, this.sun.shadow.camera.far = t * 2, this.sun.shadow.bias = Qc, this.sun.shadow.radius = el, this.sun.shadow.blurSamples = tl, j.info(`Recreated sun with shadow map size: ${i}x${i}`);
4933
4961
  }
4934
4962
  }
4935
4963
  /**
@@ -4939,7 +4967,7 @@ class gl {
4939
4967
  * so repeated updates cannot drift.
4940
4968
  */
4941
4969
  resolve_solar() {
4942
- const e = this.sun_settings.solar, t = ml(e.latitude, e.longitude, new Date(e.datetime)), n = _l(t.altitude_deg, this.sun_settings.intensity, this.sun_settings.color), s = t.direction.multiplyScalar(100);
4970
+ const e = this.sun_settings.solar, t = pl(e.latitude, e.longitude, new Date(e.datetime)), n = gl(t.altitude_deg, this.sun_settings.intensity, this.sun_settings.color), s = t.direction.multiplyScalar(100);
4943
4971
  let i = 0;
4944
4972
  return n.intensity > 0 && (i = +`0x${n.color.getHexString()}`), j.debug(
4945
4973
  `Solar sun: lat ${e.latitude}, lon ${e.longitude}, alt ${t.altitude_deg.toFixed(1)}°, az ${t.azimuth_deg.toFixed(1)}°`
@@ -5011,31 +5039,31 @@ class gl {
5011
5039
  const pe = [];
5012
5040
  for (let r = 0; r < 256; ++r)
5013
5041
  pe.push((r + 256).toString(16).slice(1));
5014
- function yl(r, e = 0) {
5042
+ function vl(r, e = 0) {
5015
5043
  return (pe[r[e + 0]] + pe[r[e + 1]] + pe[r[e + 2]] + pe[r[e + 3]] + "-" + pe[r[e + 4]] + pe[r[e + 5]] + "-" + pe[r[e + 6]] + pe[r[e + 7]] + "-" + pe[r[e + 8]] + pe[r[e + 9]] + "-" + pe[r[e + 10]] + pe[r[e + 11]] + pe[r[e + 12]] + pe[r[e + 13]] + pe[r[e + 14]] + pe[r[e + 15]]).toLowerCase();
5016
5044
  }
5017
- let Ds;
5018
- const vl = new Uint8Array(16);
5019
- function xl() {
5020
- if (!Ds) {
5045
+ let Is;
5046
+ const xl = new Uint8Array(16);
5047
+ function bl() {
5048
+ if (!Is) {
5021
5049
  if (typeof crypto > "u" || !crypto.getRandomValues)
5022
5050
  throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
5023
- Ds = crypto.getRandomValues.bind(crypto);
5051
+ Is = crypto.getRandomValues.bind(crypto);
5024
5052
  }
5025
- return Ds(vl);
5053
+ return Is(xl);
5026
5054
  }
5027
- const bl = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), dr = { randomUUID: bl };
5028
- function wl(r, e, t) {
5055
+ const wl = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), ur = { randomUUID: wl };
5056
+ function El(r, e, t) {
5029
5057
  var s;
5030
- if (dr.randomUUID && !r)
5031
- return dr.randomUUID();
5058
+ if (ur.randomUUID && !r)
5059
+ return ur.randomUUID();
5032
5060
  r = r || {};
5033
- const n = r.random ?? ((s = r.rng) == null ? void 0 : s.call(r)) ?? xl();
5061
+ const n = r.random ?? ((s = r.rng) == null ? void 0 : s.call(r)) ?? bl();
5034
5062
  if (n.length < 16)
5035
5063
  throw new Error("Random bytes length must be >= 16");
5036
- return n[6] = n[6] & 15 | 64, n[8] = n[8] & 63 | 128, yl(n);
5064
+ return n[6] = n[6] & 15 | 64, n[8] = n[8] & 63 | 128, vl(n);
5037
5065
  }
5038
- function El(r, e = 1e-4) {
5066
+ function Al(r, e = 1e-4) {
5039
5067
  e = Math.max(e, Number.EPSILON);
5040
5068
  const t = {}, n = r.getIndex(), s = r.getAttribute("position"), i = n ? n.count : s.count;
5041
5069
  let o = 0;
@@ -5059,19 +5087,19 @@ function El(r, e = 1e-4) {
5059
5087
  let v = "";
5060
5088
  for (let P = 0, V = a.length; P < V; P++) {
5061
5089
  const F = a[P], L = r.getAttribute(F), R = L.itemSize;
5062
- for (let O = 0; O < R; O++)
5063
- v += `${~~(L[u[O]](T) * y + x)},`;
5090
+ for (let C = 0; C < R; C++)
5091
+ v += `${~~(L[u[C]](T) * y + x)},`;
5064
5092
  }
5065
5093
  if (v in t)
5066
5094
  d.push(t[v]);
5067
5095
  else {
5068
5096
  for (let P = 0, V = a.length; P < V; P++) {
5069
- const F = a[P], L = r.getAttribute(F), R = r.morphAttributes[F], O = L.itemSize, N = c[F], G = l[F];
5070
- for (let Z = 0; Z < O; Z++) {
5071
- const k = u[Z], ee = h[Z];
5072
- if (N[ee](o, L[k](T)), R)
5097
+ const F = a[P], L = r.getAttribute(F), R = r.morphAttributes[F], C = L.itemSize, N = c[F], G = l[F];
5098
+ for (let Z = 0; Z < C; Z++) {
5099
+ const O = u[Z], ee = h[Z];
5100
+ if (N[ee](o, L[O](T)), R)
5073
5101
  for (let $ = 0, be = R.length; $ < be; $++)
5074
- G[$][ee](o, R[$][k](T));
5102
+ G[$][ee](o, R[$][O](T));
5075
5103
  }
5076
5104
  }
5077
5105
  t[v] = o, d.push(o), o++;
@@ -5096,10 +5124,10 @@ function El(r, e = 1e-4) {
5096
5124
  }
5097
5125
  return b.setIndex(d), b;
5098
5126
  }
5099
- function ur(r, e) {
5100
- if (e === zo)
5127
+ function hr(r, e) {
5128
+ if (e === Uo)
5101
5129
  return console.warn("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Geometry already defined as triangles."), r;
5102
- if (e === qs || e === jr) {
5130
+ if (e === Js || e === Br) {
5103
5131
  let t = r.getIndex();
5104
5132
  if (t === null) {
5105
5133
  const o = [], a = r.getAttribute("position");
@@ -5111,7 +5139,7 @@ function ur(r, e) {
5111
5139
  return console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Undefined position attribute. Processing not possible."), r;
5112
5140
  }
5113
5141
  const n = t.count - 2, s = [];
5114
- if (e === qs)
5142
+ if (e === Js)
5115
5143
  for (let o = 1; o <= n; o++)
5116
5144
  s.push(t.getX(0)), s.push(t.getX(o)), s.push(t.getX(o + 1));
5117
5145
  else
@@ -5123,15 +5151,15 @@ function ur(r, e) {
5123
5151
  } else
5124
5152
  return console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Unknown draw mode:", e), r;
5125
5153
  }
5126
- const hr = new ms(), Gn = new J();
5127
- class Mi extends Uo {
5154
+ const fr = new ps(), Zn = new J();
5155
+ class Li extends Fo {
5128
5156
  /**
5129
5157
  * Constructs a new line segments geometry.
5130
5158
  */
5131
5159
  constructor() {
5132
5160
  super(), this.isLineSegmentsGeometry = !0, this.type = "LineSegmentsGeometry";
5133
5161
  const e = [-1, 2, 0, 1, 2, 0, -1, 1, 0, 1, 1, 0, -1, 0, 0, 1, 0, 0, -1, -1, 0, 1, -1, 0], t = [-1, 2, 1, 2, -1, 1, 1, 1, -1, -1, 1, -1, -1, -2, 1, -2], n = [0, 2, 1, 2, 3, 1, 2, 4, 3, 4, 5, 3, 4, 6, 5, 6, 7, 5];
5134
- this.setIndex(n), this.setAttribute("position", new qi(e, 3)), this.setAttribute("uv", new qi(t, 2));
5162
+ this.setIndex(n), this.setAttribute("position", new Ji(e, 3)), this.setAttribute("uv", new Ji(t, 2));
5135
5163
  }
5136
5164
  /**
5137
5165
  * Applies the given 4x4 transformation matrix to the geometry.
@@ -5153,7 +5181,7 @@ class Mi extends Uo {
5153
5181
  setPositions(e) {
5154
5182
  let t;
5155
5183
  e instanceof Float32Array ? t = e : Array.isArray(e) && (t = new Float32Array(e));
5156
- const n = new Js(t, 6, 1);
5184
+ const n = new Qs(t, 6, 1);
5157
5185
  return this.setAttribute("instanceStart", new Et(n, 3, 0)), this.setAttribute("instanceEnd", new Et(n, 3, 3)), this.instanceCount = this.attributes.instanceStart.count, this.computeBoundingBox(), this.computeBoundingSphere(), this;
5158
5186
  }
5159
5187
  /**
@@ -5166,7 +5194,7 @@ class Mi extends Uo {
5166
5194
  setColors(e) {
5167
5195
  let t;
5168
5196
  e instanceof Float32Array ? t = e : Array.isArray(e) && (t = new Float32Array(e));
5169
- const n = new Js(t, 6, 1);
5197
+ const n = new Qs(t, 6, 1);
5170
5198
  return this.setAttribute("instanceColorStart", new Et(n, 3, 0)), this.setAttribute("instanceColorEnd", new Et(n, 3, 3)), this;
5171
5199
  }
5172
5200
  /**
@@ -5194,7 +5222,7 @@ class Mi extends Uo {
5194
5222
  * @return {LineSegmentsGeometry} A reference to this geometry.
5195
5223
  */
5196
5224
  fromMesh(e) {
5197
- return this.fromWireframeGeometry(new Fo(e.geometry)), this;
5225
+ return this.fromWireframeGeometry(new jo(e.geometry)), this;
5198
5226
  }
5199
5227
  /**
5200
5228
  * Setups this line segments geometry from the given line segments.
@@ -5208,40 +5236,40 @@ class Mi extends Uo {
5208
5236
  return this.setPositions(t.attributes.position.array), this;
5209
5237
  }
5210
5238
  computeBoundingBox() {
5211
- this.boundingBox === null && (this.boundingBox = new ms());
5239
+ this.boundingBox === null && (this.boundingBox = new ps());
5212
5240
  const e = this.attributes.instanceStart, t = this.attributes.instanceEnd;
5213
- e !== void 0 && t !== void 0 && (this.boundingBox.setFromBufferAttribute(e), hr.setFromBufferAttribute(t), this.boundingBox.union(hr));
5241
+ e !== void 0 && t !== void 0 && (this.boundingBox.setFromBufferAttribute(e), fr.setFromBufferAttribute(t), this.boundingBox.union(fr));
5214
5242
  }
5215
5243
  computeBoundingSphere() {
5216
- this.boundingSphere === null && (this.boundingSphere = new Ai()), this.boundingBox === null && this.computeBoundingBox();
5244
+ this.boundingSphere === null && (this.boundingSphere = new Ti()), this.boundingBox === null && this.computeBoundingBox();
5217
5245
  const e = this.attributes.instanceStart, t = this.attributes.instanceEnd;
5218
5246
  if (e !== void 0 && t !== void 0) {
5219
5247
  const n = this.boundingSphere.center;
5220
5248
  this.boundingBox.getCenter(n);
5221
5249
  let s = 0;
5222
5250
  for (let i = 0, o = e.count; i < o; i++)
5223
- Gn.fromBufferAttribute(e, i), s = Math.max(s, n.distanceToSquared(Gn)), Gn.fromBufferAttribute(t, i), s = Math.max(s, n.distanceToSquared(Gn));
5251
+ Zn.fromBufferAttribute(e, i), s = Math.max(s, n.distanceToSquared(Zn)), Zn.fromBufferAttribute(t, i), s = Math.max(s, n.distanceToSquared(Zn));
5224
5252
  this.boundingSphere.radius = Math.sqrt(s), isNaN(this.boundingSphere.radius) && console.error("THREE.LineSegmentsGeometry.computeBoundingSphere(): Computed radius is NaN. The instanced position data is likely to have NaN values.", this);
5225
5253
  }
5226
5254
  }
5227
5255
  toJSON() {
5228
5256
  }
5229
5257
  }
5230
- Qn.line = {
5258
+ es.line = {
5231
5259
  worldUnits: { value: 1 },
5232
5260
  linewidth: { value: 1 },
5233
- resolution: { value: new Ce(1, 1) },
5261
+ resolution: { value: new ke(1, 1) },
5234
5262
  dashOffset: { value: 0 },
5235
5263
  dashScale: { value: 1 },
5236
5264
  dashSize: { value: 1 },
5237
5265
  gapSize: { value: 1 }
5238
5266
  // todo FIX - maybe change to totalSize
5239
5267
  };
5240
- Jn.line = {
5241
- uniforms: Ei.merge([
5242
- Qn.common,
5243
- Qn.fog,
5244
- Qn.line
5268
+ Qn.line = {
5269
+ uniforms: Ai.merge([
5270
+ es.common,
5271
+ es.fog,
5272
+ es.line
5245
5273
  ]),
5246
5274
  vertexShader: (
5247
5275
  /* glsl */
@@ -5622,7 +5650,7 @@ Jn.line = {
5622
5650
  `
5623
5651
  )
5624
5652
  };
5625
- class oo extends wi {
5653
+ class ao extends Ei {
5626
5654
  /**
5627
5655
  * Constructs a new line segments geometry.
5628
5656
  *
@@ -5635,9 +5663,9 @@ class oo extends wi {
5635
5663
  constructor(e) {
5636
5664
  super({
5637
5665
  type: "LineMaterial",
5638
- uniforms: Ei.clone(Jn.line.uniforms),
5639
- vertexShader: Jn.line.vertexShader,
5640
- fragmentShader: Jn.line.fragmentShader,
5666
+ uniforms: Ai.clone(Qn.line.uniforms),
5667
+ vertexShader: Qn.line.vertexShader,
5668
+ fragmentShader: Qn.line.fragmentShader,
5641
5669
  clipping: !0
5642
5670
  // required for clipping support
5643
5671
  }), this.isLineMaterial = !0, this.setValues(e);
@@ -5777,12 +5805,12 @@ class oo extends wi {
5777
5805
  this.defines && (e === !0 !== this.alphaToCoverage && (this.needsUpdate = !0), e === !0 ? this.defines.USE_ALPHA_TO_COVERAGE = "" : delete this.defines.USE_ALPHA_TO_COVERAGE);
5778
5806
  }
5779
5807
  }
5780
- const Is = new Dn(), fr = new J(), mr = new J(), fe = new Dn(), me = new Dn(), Ge = new Dn(), Ns = new J(), Ps = new pn(), _e = new jo(), pr = new J(), Zn = new ms(), Wn = new Ai(), Ze = new Dn();
5808
+ const Ns = new In(), mr = new J(), pr = new J(), fe = new In(), me = new In(), Ge = new In(), Ps = new J(), zs = new pn(), _e = new Bo(), _r = new J(), Wn = new ps(), Xn = new Ti(), Ze = new In();
5781
5809
  let Xe, Tt;
5782
- function _r(r, e, t) {
5810
+ function gr(r, e, t) {
5783
5811
  return Ze.set(0, 0, -e, 1).applyMatrix4(r.projectionMatrix), Ze.multiplyScalar(1 / Ze.w), Ze.x = Tt / t.width, Ze.y = Tt / t.height, Ze.applyMatrix4(r.projectionMatrixInverse), Ze.multiplyScalar(1 / Ze.w), Math.abs(Math.max(Ze.x, Ze.y));
5784
5812
  }
5785
- function Al(r, e) {
5813
+ function Tl(r, e) {
5786
5814
  const t = r.matrixWorld, n = r.geometry, s = n.attributes.instanceStart, i = n.attributes.instanceEnd, o = Math.min(n.instanceCount, s.count);
5787
5815
  for (let a = 0, c = o; a < c; a++) {
5788
5816
  _e.start.fromBufferAttribute(s, a), _e.end.fromBufferAttribute(i, a), _e.applyMatrix4(t);
@@ -5799,11 +5827,11 @@ function Al(r, e) {
5799
5827
  });
5800
5828
  }
5801
5829
  }
5802
- function Tl(r, e, t) {
5830
+ function Sl(r, e, t) {
5803
5831
  const n = e.projectionMatrix, i = r.material.resolution, o = r.matrixWorld, a = r.geometry, c = a.attributes.instanceStart, l = a.attributes.instanceEnd, d = Math.min(a.instanceCount, c.count), u = -e.near;
5804
- Xe.at(1, Ge), Ge.w = 1, Ge.applyMatrix4(e.matrixWorldInverse), Ge.applyMatrix4(n), Ge.multiplyScalar(1 / Ge.w), Ge.x *= i.x / 2, Ge.y *= i.y / 2, Ge.z = 0, Ns.copy(Ge), Ps.multiplyMatrices(e.matrixWorldInverse, o);
5832
+ Xe.at(1, Ge), Ge.w = 1, Ge.applyMatrix4(e.matrixWorldInverse), Ge.applyMatrix4(n), Ge.multiplyScalar(1 / Ge.w), Ge.x *= i.x / 2, Ge.y *= i.y / 2, Ge.z = 0, Ps.copy(Ge), zs.multiplyMatrices(e.matrixWorldInverse, o);
5805
5833
  for (let h = 0, f = d; h < f; h++) {
5806
- if (fe.fromBufferAttribute(c, h), me.fromBufferAttribute(l, h), fe.w = 1, me.w = 1, fe.applyMatrix4(Ps), me.applyMatrix4(Ps), fe.z > u && me.z > u)
5834
+ if (fe.fromBufferAttribute(c, h), me.fromBufferAttribute(l, h), fe.w = 1, me.w = 1, fe.applyMatrix4(zs), me.applyMatrix4(zs), fe.z > u && me.z > u)
5807
5835
  continue;
5808
5836
  if (fe.z > u) {
5809
5837
  const T = fe.z - me.z, v = (fe.z - u) / T;
@@ -5813,9 +5841,9 @@ function Tl(r, e, t) {
5813
5841
  me.lerp(fe, v);
5814
5842
  }
5815
5843
  fe.applyMatrix4(n), me.applyMatrix4(n), fe.multiplyScalar(1 / fe.w), me.multiplyScalar(1 / me.w), fe.x *= i.x / 2, fe.y *= i.y / 2, me.x *= i.x / 2, me.y *= i.y / 2, _e.start.copy(fe), _e.start.z = 0, _e.end.copy(me), _e.end.z = 0;
5816
- const y = _e.closestPointToPointParameter(Ns, !0);
5817
- _e.at(y, pr);
5818
- const x = xi.lerp(fe.z, me.z, y), b = x >= -1 && x <= 1, w = Ns.distanceTo(pr) < Tt * 0.5;
5844
+ const y = _e.closestPointToPointParameter(Ps, !0);
5845
+ _e.at(y, _r);
5846
+ const x = bi.lerp(fe.z, me.z, y), b = x >= -1 && x <= 1, w = Ps.distanceTo(_r) < Tt * 0.5;
5819
5847
  if (b && w) {
5820
5848
  _e.start.fromBufferAttribute(c, h), _e.end.fromBufferAttribute(l, h), _e.start.applyMatrix4(o), _e.end.applyMatrix4(o);
5821
5849
  const T = new J(), v = new J();
@@ -5832,14 +5860,14 @@ function Tl(r, e, t) {
5832
5860
  }
5833
5861
  }
5834
5862
  }
5835
- class gr extends ye {
5863
+ class yr extends ye {
5836
5864
  /**
5837
5865
  * Constructs a new wide line.
5838
5866
  *
5839
5867
  * @param {LineSegmentsGeometry} [geometry] - The line geometry.
5840
5868
  * @param {LineMaterial} [material] - The line material.
5841
5869
  */
5842
- constructor(e = new Mi(), t = new oo({ color: Math.random() * 16777215 })) {
5870
+ constructor(e = new Li(), t = new ao({ color: Math.random() * 16777215 })) {
5843
5871
  super(e, t), this.isLineSegments2 = !0, this.type = "LineSegments2";
5844
5872
  }
5845
5873
  /**
@@ -5852,8 +5880,8 @@ class gr extends ye {
5852
5880
  computeLineDistances() {
5853
5881
  const e = this.geometry, t = e.attributes.instanceStart, n = e.attributes.instanceEnd, s = new Float32Array(2 * t.count);
5854
5882
  for (let o = 0, a = 0, c = t.count; o < c; o++, a += 2)
5855
- fr.fromBufferAttribute(t, o), mr.fromBufferAttribute(n, o), s[a] = a === 0 ? 0 : s[a - 1], s[a + 1] = s[a] + fr.distanceTo(mr);
5856
- const i = new Js(s, 2, 1);
5883
+ mr.fromBufferAttribute(t, o), pr.fromBufferAttribute(n, o), s[a] = a === 0 ? 0 : s[a - 1], s[a + 1] = s[a] + mr.distanceTo(pr);
5884
+ const i = new Qs(s, 2, 1);
5857
5885
  return e.setAttribute("instanceDistanceStart", new Et(i, 1, 0)), e.setAttribute("instanceDistanceEnd", new Et(i, 1, 1)), this;
5858
5886
  }
5859
5887
  /**
@@ -5868,32 +5896,32 @@ class gr extends ye {
5868
5896
  const i = e.params.Line2 !== void 0 && e.params.Line2.threshold || 0;
5869
5897
  Xe = e.ray;
5870
5898
  const o = this.matrixWorld, a = this.geometry, c = this.material;
5871
- Tt = c.linewidth + i, a.boundingSphere === null && a.computeBoundingSphere(), Wn.copy(a.boundingSphere).applyMatrix4(o);
5899
+ Tt = c.linewidth + i, a.boundingSphere === null && a.computeBoundingSphere(), Xn.copy(a.boundingSphere).applyMatrix4(o);
5872
5900
  let l;
5873
5901
  if (n)
5874
5902
  l = Tt * 0.5;
5875
5903
  else {
5876
- const u = Math.max(s.near, Wn.distanceToPoint(Xe.origin));
5877
- l = _r(s, u, c.resolution);
5904
+ const u = Math.max(s.near, Xn.distanceToPoint(Xe.origin));
5905
+ l = gr(s, u, c.resolution);
5878
5906
  }
5879
- if (Wn.radius += l, Xe.intersectsSphere(Wn) === !1)
5907
+ if (Xn.radius += l, Xe.intersectsSphere(Xn) === !1)
5880
5908
  return;
5881
- a.boundingBox === null && a.computeBoundingBox(), Zn.copy(a.boundingBox).applyMatrix4(o);
5909
+ a.boundingBox === null && a.computeBoundingBox(), Wn.copy(a.boundingBox).applyMatrix4(o);
5882
5910
  let d;
5883
5911
  if (n)
5884
5912
  d = Tt * 0.5;
5885
5913
  else {
5886
- const u = Math.max(s.near, Zn.distanceToPoint(Xe.origin));
5887
- d = _r(s, u, c.resolution);
5914
+ const u = Math.max(s.near, Wn.distanceToPoint(Xe.origin));
5915
+ d = gr(s, u, c.resolution);
5888
5916
  }
5889
- Zn.expandByScalar(d), Xe.intersectsBox(Zn) !== !1 && (n ? Al(this, t) : Tl(this, s, t));
5917
+ Wn.expandByScalar(d), Xe.intersectsBox(Wn) !== !1 && (n ? Tl(this, t) : Sl(this, s, t));
5890
5918
  }
5891
5919
  onBeforeRender(e) {
5892
5920
  const t = this.material.uniforms;
5893
- t && t.resolution && (e.getViewport(Is), this.material.uniforms.resolution.value.set(Is.z, Is.w));
5921
+ t && t.resolution && (e.getViewport(Ns), this.material.uniforms.resolution.value.set(Ns.z, Ns.w));
5894
5922
  }
5895
5923
  }
5896
- class yr extends p.BufferGeometry {
5924
+ class vr extends p.BufferGeometry {
5897
5925
  constructor(e, t = 4) {
5898
5926
  super();
5899
5927
  const n = {}, s = e.attributes.position;
@@ -5907,8 +5935,8 @@ class yr extends p.BufferGeometry {
5907
5935
  for (let T = 0, v = i.count; T < v; T += 3) {
5908
5936
  const P = [i.getX(T + 0), i.getX(T + 1), i.getX(T + 2)];
5909
5937
  for (let V = 0; V < 3; V++) {
5910
- const F = P[V], L = P[(V + 1) % 3], R = `${F}_${L}`, O = `${L}_${F}`;
5911
- O in n ? (n[O].controlIndex1 = P[(V + 2) % 3], n[O].tri1 = T / 3) : n[R] = {
5938
+ const F = P[V], L = P[(V + 1) % 3], R = `${F}_${L}`, C = `${L}_${F}`;
5939
+ C in n ? (n[C].controlIndex1 = P[(V + 2) % 3], n[C].tri1 = T / 3) : n[R] = {
5912
5940
  index0: F,
5913
5941
  index1: L,
5914
5942
  controlIndex0: P[(V + 2) % 3],
@@ -5923,13 +5951,13 @@ class yr extends p.BufferGeometry {
5923
5951
  const { index0: v, index1: P, controlIndex0: V, controlIndex1: F, tri0: L, tri1: R } = n[T];
5924
5952
  if (F === null) continue;
5925
5953
  d.a.fromBufferAttribute(s, i.getX(L * 3 + 0)), d.b.fromBufferAttribute(s, i.getX(L * 3 + 1)), d.c.fromBufferAttribute(s, i.getX(L * 3 + 2)), u.a.fromBufferAttribute(s, i.getX(R * 3 + 0)), u.b.fromBufferAttribute(s, i.getX(R * 3 + 1)), u.c.fromBufferAttribute(s, i.getX(R * 3 + 2)), d.getNormal(h).normalize(), u.getNormal(f).normalize();
5926
- const O = Math.cos(p.MathUtils.degToRad(t));
5927
- h.dot(f) > O || (g.fromBufferAttribute(s, v), y.fromBufferAttribute(s, P), x.subVectors(g, y), b.fromBufferAttribute(s, V), w.fromBufferAttribute(s, F), o.push(g.x, g.y, g.z), a.push(x.x, x.y, x.z), c.push(b.x, b.y, b.z), l.push(w.x, w.y, w.z), o.push(y.x, y.y, y.z), a.push(x.x, x.y, x.z), c.push(b.x, b.y, b.z), l.push(w.x, w.y, w.z));
5954
+ const C = Math.cos(p.MathUtils.degToRad(t));
5955
+ h.dot(f) > C || (g.fromBufferAttribute(s, v), y.fromBufferAttribute(s, P), x.subVectors(g, y), b.fromBufferAttribute(s, V), w.fromBufferAttribute(s, F), o.push(g.x, g.y, g.z), a.push(x.x, x.y, x.z), c.push(b.x, b.y, b.z), l.push(w.x, w.y, w.z), o.push(y.x, y.y, y.z), a.push(x.x, x.y, x.z), c.push(b.x, b.y, b.z), l.push(w.x, w.y, w.z));
5928
5956
  }
5929
5957
  this.setAttribute("position", new p.BufferAttribute(new Float32Array(o), 3, !1)), this.setAttribute("direction", new p.BufferAttribute(new Float32Array(a), 3, !1)), this.setAttribute("control0", new p.BufferAttribute(new Float32Array(c), 3, !1)), this.setAttribute("control1", new p.BufferAttribute(new Float32Array(l), 3, !1));
5930
5958
  }
5931
5959
  }
5932
- class Sl extends Mi {
5960
+ class Rl extends Li {
5933
5961
  /**
5934
5962
  * Populates this geometry from a ConditionalEdgesGeometry (or any BufferGeometry
5935
5963
  * whose attributes include `direction`, `control0`, and `control1`).
@@ -5988,7 +6016,7 @@ class Sl extends Mi {
5988
6016
  ), this;
5989
6017
  }
5990
6018
  }
5991
- const Rl = `
6019
+ const Ml = `
5992
6020
  attribute vec3 control0;
5993
6021
  attribute vec3 control1;
5994
6022
  attribute vec3 direction;
@@ -6038,7 +6066,7 @@ const Rl = `
6038
6066
  #include <fog_vertex>
6039
6067
 
6040
6068
  }
6041
- `, Ml = `
6069
+ `, Ll = `
6042
6070
  uniform vec3 diffuse;
6043
6071
  uniform float opacity;
6044
6072
 
@@ -6065,7 +6093,7 @@ const Rl = `
6065
6093
  #include <premultiplied_alpha_fragment>
6066
6094
 
6067
6095
  }
6068
- `, Ll = {
6096
+ `, kl = {
6069
6097
  uniforms: {
6070
6098
  diffuse: {
6071
6099
  value: new p.Color()
@@ -6074,8 +6102,8 @@ const Rl = `
6074
6102
  value: 1
6075
6103
  }
6076
6104
  },
6077
- vertexShader: Rl,
6078
- fragmentShader: Ml
6105
+ vertexShader: Ml,
6106
+ fragmentShader: Ll
6079
6107
  }, Cl = `
6080
6108
  #include <common>
6081
6109
  #include <color_pars_vertex>
@@ -6307,24 +6335,24 @@ const Rl = `
6307
6335
  #include <premultiplied_alpha_fragment>
6308
6336
 
6309
6337
  }
6310
- `, kl = {
6338
+ `, Dl = {
6311
6339
  linewidth: { value: 1 },
6312
6340
  resolution: { value: new p.Vector2(1, 1) },
6313
6341
  dashScale: { value: 1 },
6314
6342
  dashSize: { value: 1 },
6315
6343
  gapSize: { value: 1 },
6316
6344
  opacity: { value: 1 }
6317
- }, zs = {
6318
- uniforms: p.UniformsUtils.merge([p.UniformsLib.common, p.UniformsLib.fog, kl]),
6345
+ }, Us = {
6346
+ uniforms: p.UniformsUtils.merge([p.UniformsLib.common, p.UniformsLib.fog, Dl]),
6319
6347
  vertexShader: Cl,
6320
6348
  fragmentShader: Ol
6321
6349
  };
6322
- class Dl extends p.ShaderMaterial {
6350
+ class Il extends p.ShaderMaterial {
6323
6351
  constructor(t) {
6324
6352
  super({
6325
- uniforms: p.UniformsUtils.clone(zs.uniforms),
6326
- vertexShader: zs.vertexShader,
6327
- fragmentShader: zs.fragmentShader,
6353
+ uniforms: p.UniformsUtils.clone(Us.uniforms),
6354
+ vertexShader: Us.vertexShader,
6355
+ fragmentShader: Us.fragmentShader,
6328
6356
  clipping: !0
6329
6357
  // required for clipping support
6330
6358
  });
@@ -6383,7 +6411,7 @@ class Dl extends p.ShaderMaterial {
6383
6411
  }), this.setValues(t);
6384
6412
  }
6385
6413
  }
6386
- class Il {
6414
+ class Nl {
6387
6415
  constructor(e, t, n, s) {
6388
6416
  _(this, "group");
6389
6417
  // public mixers: THREE.AnimationMixer[] = []
@@ -6391,7 +6419,7 @@ class Il {
6391
6419
  _(this, "viewer");
6392
6420
  _(this, "scene");
6393
6421
  _(this, "settings");
6394
- this.group = new p.Group(), s ? this.group.name = s : this.group.name = wl(), this.viewer = e, this.scene = e.scene, this.loader = t, this.settings = n;
6422
+ this.group = new p.Group(), s ? this.group.name = s : this.group.name = El(), this.viewer = e, this.scene = e.scene, this.loader = t, this.settings = n;
6395
6423
  }
6396
6424
  /**
6397
6425
  * Load the model from the settings URL and add it to the scene.
@@ -6574,7 +6602,7 @@ class Il {
6574
6602
  _bake_mesh(e) {
6575
6603
  const t = e.geometry.clone().toNonIndexed();
6576
6604
  ["normal", "uv", "uv2"].forEach((i) => t.deleteAttribute(i));
6577
- const n = El(t);
6605
+ const n = Al(t);
6578
6606
  return new p.Mesh(n);
6579
6607
  }
6580
6608
  /**
@@ -6601,12 +6629,12 @@ class Il {
6601
6629
  _generate_threshold_edges(e, t, n, s = 1) {
6602
6630
  var i, o;
6603
6631
  if (e.geometry && e.geometry.attributes && e.geometry.attributes.position && e.geometry.attributes.position.count > 0) {
6604
- const a = new p.EdgesGeometry(e.geometry, t), c = new Mi().fromEdgesGeometry(a), l = new oo({
6632
+ const a = new p.EdgesGeometry(e.geometry, t), c = new Li().fromEdgesGeometry(a), l = new ao({
6605
6633
  color: n,
6606
6634
  linewidth: s
6607
6635
  });
6608
6636
  (o = (i = this.viewer).register_resolution_material) == null || o.call(i, l);
6609
- const d = new gr(c, l);
6637
+ const d = new yr(c, l);
6610
6638
  return d.userData.is_threshold_edge = !0, d;
6611
6639
  }
6612
6640
  }
@@ -6625,20 +6653,20 @@ class Il {
6625
6653
  */
6626
6654
  _generate_conditional_thick_edges(e, t, n = 1, s = 2) {
6627
6655
  var d, u;
6628
- const i = new p.Group(), o = new yr(e.geometry, s), a = new Sl().from_conditional_edges_geometry(
6656
+ const i = new p.Group(), o = new vr(e.geometry, s), a = new Rl().from_conditional_edges_geometry(
6629
6657
  o
6630
6658
  // <-- Accepts custom attributes, OK for Three.js usage
6631
- ), c = new Dl({
6659
+ ), c = new Il({
6632
6660
  color: t,
6633
6661
  linewidth: n
6634
6662
  });
6635
6663
  (u = (d = this.viewer).register_resolution_material) == null || u.call(d, c);
6636
- const l = new gr(a, c);
6664
+ const l = new yr(a, c);
6637
6665
  return i.add(l), i.userData.is_conditional_edge = !0, i;
6638
6666
  }
6639
6667
  // fallback
6640
6668
  _generate_conditional_thin_edges(e, t, n = 2) {
6641
- const s = new p.Group(), i = new yr(e.geometry, n), o = new p.ShaderMaterial(Ll);
6669
+ const s = new p.Group(), i = new vr(e.geometry, n), o = new p.ShaderMaterial(kl);
6642
6670
  o.uniforms.diffuse.value.set(t);
6643
6671
  const a = new p.LineSegments(i, o);
6644
6672
  return s.add(a), s;
@@ -6647,7 +6675,7 @@ class Il {
6647
6675
  this.remove();
6648
6676
  }
6649
6677
  }
6650
- class Nl extends bi {
6678
+ class Pl extends wi {
6651
6679
  /**
6652
6680
  * Constructs a new glTF loader.
6653
6681
  *
@@ -6655,39 +6683,39 @@ class Nl extends bi {
6655
6683
  */
6656
6684
  constructor(e) {
6657
6685
  super(e), this.dracoLoader = null, this.ktx2Loader = null, this.meshoptDecoder = null, this.pluginCallbacks = [], this.register(function(t) {
6658
- return new jl(t);
6659
- }), this.register(function(t) {
6660
6686
  return new Bl(t);
6661
6687
  }), this.register(function(t) {
6662
- return new Kl(t);
6688
+ return new Hl(t);
6663
6689
  }), this.register(function(t) {
6664
6690
  return new ql(t);
6665
6691
  }), this.register(function(t) {
6666
6692
  return new Jl(t);
6667
6693
  }), this.register(function(t) {
6668
- return new Vl(t);
6694
+ return new Ql(t);
6669
6695
  }), this.register(function(t) {
6670
6696
  return new Gl(t);
6671
6697
  }), this.register(function(t) {
6672
6698
  return new Zl(t);
6673
6699
  }), this.register(function(t) {
6674
6700
  return new Wl(t);
6675
- }), this.register(function(t) {
6676
- return new Fl(t);
6677
6701
  }), this.register(function(t) {
6678
6702
  return new Xl(t);
6679
6703
  }), this.register(function(t) {
6680
- return new Hl(t);
6681
- }), this.register(function(t) {
6682
- return new Yl(t);
6704
+ return new jl(t);
6683
6705
  }), this.register(function(t) {
6684
6706
  return new $l(t);
6685
6707
  }), this.register(function(t) {
6686
- return new zl(t);
6708
+ return new Vl(t);
6687
6709
  }), this.register(function(t) {
6688
- return new Ql(t);
6710
+ return new Kl(t);
6711
+ }), this.register(function(t) {
6712
+ return new Yl(t);
6713
+ }), this.register(function(t) {
6714
+ return new Ul(t);
6689
6715
  }), this.register(function(t) {
6690
6716
  return new ed(t);
6717
+ }), this.register(function(t) {
6718
+ return new td(t);
6691
6719
  });
6692
6720
  }
6693
6721
  /**
@@ -6787,9 +6815,9 @@ class Nl extends bi {
6787
6815
  if (typeof e == "string")
6788
6816
  i = JSON.parse(e);
6789
6817
  else if (e instanceof ArrayBuffer)
6790
- if (c.decode(new Uint8Array(e, 0, 4)) === ao) {
6818
+ if (c.decode(new Uint8Array(e, 0, 4)) === co) {
6791
6819
  try {
6792
- o[K.KHR_BINARY_GLTF] = new td(e);
6820
+ o[K.KHR_BINARY_GLTF] = new nd(e);
6793
6821
  } catch (u) {
6794
6822
  s && s(u);
6795
6823
  return;
@@ -6803,7 +6831,7 @@ class Nl extends bi {
6803
6831
  s && s(new Error("THREE.GLTFLoader: Unsupported asset. glTF versions >=2.0 are supported."));
6804
6832
  return;
6805
6833
  }
6806
- const l = new md(i, {
6834
+ const l = new pd(i, {
6807
6835
  path: t || this.resourcePath || "",
6808
6836
  crossOrigin: this.crossOrigin,
6809
6837
  requestHeader: this.requestHeader,
@@ -6821,16 +6849,16 @@ class Nl extends bi {
6821
6849
  const u = i.extensionsUsed[d], h = i.extensionsRequired || [];
6822
6850
  switch (u) {
6823
6851
  case K.KHR_MATERIALS_UNLIT:
6824
- o[u] = new Ul();
6852
+ o[u] = new Fl();
6825
6853
  break;
6826
6854
  case K.KHR_DRACO_MESH_COMPRESSION:
6827
- o[u] = new nd(i, this.dracoLoader);
6855
+ o[u] = new sd(i, this.dracoLoader);
6828
6856
  break;
6829
6857
  case K.KHR_TEXTURE_TRANSFORM:
6830
- o[u] = new sd();
6858
+ o[u] = new id();
6831
6859
  break;
6832
6860
  case K.KHR_MESH_QUANTIZATION:
6833
- o[u] = new id();
6861
+ o[u] = new rd();
6834
6862
  break;
6835
6863
  default:
6836
6864
  h.indexOf(u) >= 0 && a[u] === void 0 && console.warn('THREE.GLTFLoader: Unknown extension "' + u + '".');
@@ -6853,7 +6881,7 @@ class Nl extends bi {
6853
6881
  });
6854
6882
  }
6855
6883
  }
6856
- function Pl() {
6884
+ function zl() {
6857
6885
  let r = {};
6858
6886
  return {
6859
6887
  get: function(e) {
@@ -6894,7 +6922,7 @@ const K = {
6894
6922
  EXT_MESHOPT_COMPRESSION: "EXT_meshopt_compression",
6895
6923
  EXT_MESH_GPU_INSTANCING: "EXT_mesh_gpu_instancing"
6896
6924
  };
6897
- class zl {
6925
+ class Ul {
6898
6926
  constructor(e) {
6899
6927
  this.parser = e, this.name = K.KHR_LIGHTS_PUNCTUAL, this.cache = { refs: {}, uses: {} };
6900
6928
  }
@@ -6916,13 +6944,13 @@ class zl {
6916
6944
  const u = c.range !== void 0 ? c.range : 0;
6917
6945
  switch (c.type) {
6918
6946
  case "directional":
6919
- l = new Ho(d), l.target.position.set(0, 0, -1), l.add(l.target);
6947
+ l = new Vo(d), l.target.position.set(0, 0, -1), l.add(l.target);
6920
6948
  break;
6921
6949
  case "point":
6922
- l = new Fr(d), l.distance = u;
6950
+ l = new jr(d), l.distance = u;
6923
6951
  break;
6924
6952
  case "spot":
6925
- l = new Bo(d), l.distance = u, c.spot = c.spot || {}, c.spot.innerConeAngle = c.spot.innerConeAngle !== void 0 ? c.spot.innerConeAngle : 0, c.spot.outerConeAngle = c.spot.outerConeAngle !== void 0 ? c.spot.outerConeAngle : Math.PI / 4, l.angle = c.spot.outerConeAngle, l.penumbra = 1 - c.spot.innerConeAngle / c.spot.outerConeAngle, l.target.position.set(0, 0, -1), l.add(l.target);
6953
+ l = new Ho(d), l.distance = u, c.spot = c.spot || {}, c.spot.innerConeAngle = c.spot.innerConeAngle !== void 0 ? c.spot.innerConeAngle : 0, c.spot.outerConeAngle = c.spot.outerConeAngle !== void 0 ? c.spot.outerConeAngle : Math.PI / 4, l.angle = c.spot.outerConeAngle, l.penumbra = 1 - c.spot.innerConeAngle / c.spot.outerConeAngle, l.target.position.set(0, 0, -1), l.add(l.target);
6926
6954
  break;
6927
6955
  default:
6928
6956
  throw new Error("THREE.GLTFLoader: Unexpected light type: " + c.type);
@@ -6940,7 +6968,7 @@ class zl {
6940
6968
  });
6941
6969
  }
6942
6970
  }
6943
- class Ul {
6971
+ class Fl {
6944
6972
  constructor() {
6945
6973
  this.name = K.KHR_MATERIALS_UNLIT;
6946
6974
  }
@@ -6961,7 +6989,7 @@ class Ul {
6961
6989
  return Promise.all(s);
6962
6990
  }
6963
6991
  }
6964
- class Fl {
6992
+ class jl {
6965
6993
  constructor(e) {
6966
6994
  this.parser = e, this.name = K.KHR_MATERIALS_EMISSIVE_STRENGTH;
6967
6995
  }
@@ -6973,7 +7001,7 @@ class Fl {
6973
7001
  return i !== void 0 && (t.emissiveIntensity = i), Promise.resolve();
6974
7002
  }
6975
7003
  }
6976
- class jl {
7004
+ class Bl {
6977
7005
  constructor(e) {
6978
7006
  this.parser = e, this.name = K.KHR_MATERIALS_CLEARCOAT;
6979
7007
  }
@@ -6988,12 +7016,12 @@ class jl {
6988
7016
  const i = [], o = s.extensions[this.name];
6989
7017
  if (o.clearcoatFactor !== void 0 && (t.clearcoat = o.clearcoatFactor), o.clearcoatTexture !== void 0 && i.push(n.assignTexture(t, "clearcoatMap", o.clearcoatTexture)), o.clearcoatRoughnessFactor !== void 0 && (t.clearcoatRoughness = o.clearcoatRoughnessFactor), o.clearcoatRoughnessTexture !== void 0 && i.push(n.assignTexture(t, "clearcoatRoughnessMap", o.clearcoatRoughnessTexture)), o.clearcoatNormalTexture !== void 0 && (i.push(n.assignTexture(t, "clearcoatNormalMap", o.clearcoatNormalTexture)), o.clearcoatNormalTexture.scale !== void 0)) {
6990
7018
  const a = o.clearcoatNormalTexture.scale;
6991
- t.clearcoatNormalScale = new Ce(a, a);
7019
+ t.clearcoatNormalScale = new ke(a, a);
6992
7020
  }
6993
7021
  return Promise.all(i);
6994
7022
  }
6995
7023
  }
6996
- class Bl {
7024
+ class Hl {
6997
7025
  constructor(e) {
6998
7026
  this.parser = e, this.name = K.KHR_MATERIALS_DISPERSION;
6999
7027
  }
@@ -7009,7 +7037,7 @@ class Bl {
7009
7037
  return t.dispersion = i.dispersion !== void 0 ? i.dispersion : 0, Promise.resolve();
7010
7038
  }
7011
7039
  }
7012
- class Hl {
7040
+ class Vl {
7013
7041
  constructor(e) {
7014
7042
  this.parser = e, this.name = K.KHR_MATERIALS_IRIDESCENCE;
7015
7043
  }
@@ -7025,7 +7053,7 @@ class Hl {
7025
7053
  return o.iridescenceFactor !== void 0 && (t.iridescence = o.iridescenceFactor), o.iridescenceTexture !== void 0 && i.push(n.assignTexture(t, "iridescenceMap", o.iridescenceTexture)), o.iridescenceIor !== void 0 && (t.iridescenceIOR = o.iridescenceIor), t.iridescenceThicknessRange === void 0 && (t.iridescenceThicknessRange = [100, 400]), o.iridescenceThicknessMinimum !== void 0 && (t.iridescenceThicknessRange[0] = o.iridescenceThicknessMinimum), o.iridescenceThicknessMaximum !== void 0 && (t.iridescenceThicknessRange[1] = o.iridescenceThicknessMaximum), o.iridescenceThicknessTexture !== void 0 && i.push(n.assignTexture(t, "iridescenceThicknessMap", o.iridescenceThicknessTexture)), Promise.all(i);
7026
7054
  }
7027
7055
  }
7028
- class Vl {
7056
+ class Gl {
7029
7057
  constructor(e) {
7030
7058
  this.parser = e, this.name = K.KHR_MATERIALS_SHEEN;
7031
7059
  }
@@ -7047,7 +7075,7 @@ class Vl {
7047
7075
  return o.sheenRoughnessFactor !== void 0 && (t.sheenRoughness = o.sheenRoughnessFactor), o.sheenColorTexture !== void 0 && i.push(n.assignTexture(t, "sheenColorMap", o.sheenColorTexture, mt)), o.sheenRoughnessTexture !== void 0 && i.push(n.assignTexture(t, "sheenRoughnessMap", o.sheenRoughnessTexture)), Promise.all(i);
7048
7076
  }
7049
7077
  }
7050
- class Gl {
7078
+ class Zl {
7051
7079
  constructor(e) {
7052
7080
  this.parser = e, this.name = K.KHR_MATERIALS_TRANSMISSION;
7053
7081
  }
@@ -7063,7 +7091,7 @@ class Gl {
7063
7091
  return o.transmissionFactor !== void 0 && (t.transmission = o.transmissionFactor), o.transmissionTexture !== void 0 && i.push(n.assignTexture(t, "transmissionMap", o.transmissionTexture)), Promise.all(i);
7064
7092
  }
7065
7093
  }
7066
- class Zl {
7094
+ class Wl {
7067
7095
  constructor(e) {
7068
7096
  this.parser = e, this.name = K.KHR_MATERIALS_VOLUME;
7069
7097
  }
@@ -7081,7 +7109,7 @@ class Zl {
7081
7109
  return t.attenuationColor = new lt().setRGB(a[0], a[1], a[2], Pe), Promise.all(i);
7082
7110
  }
7083
7111
  }
7084
- class Wl {
7112
+ class Xl {
7085
7113
  constructor(e) {
7086
7114
  this.parser = e, this.name = K.KHR_MATERIALS_IOR;
7087
7115
  }
@@ -7097,7 +7125,7 @@ class Wl {
7097
7125
  return t.ior = i.ior !== void 0 ? i.ior : 1.5, Promise.resolve();
7098
7126
  }
7099
7127
  }
7100
- class Xl {
7128
+ class $l {
7101
7129
  constructor(e) {
7102
7130
  this.parser = e, this.name = K.KHR_MATERIALS_SPECULAR;
7103
7131
  }
@@ -7115,7 +7143,7 @@ class Xl {
7115
7143
  return t.specularColor = new lt().setRGB(a[0], a[1], a[2], Pe), o.specularColorTexture !== void 0 && i.push(n.assignTexture(t, "specularColorMap", o.specularColorTexture, mt)), Promise.all(i);
7116
7144
  }
7117
7145
  }
7118
- class $l {
7146
+ class Yl {
7119
7147
  constructor(e) {
7120
7148
  this.parser = e, this.name = K.EXT_MATERIALS_BUMP;
7121
7149
  }
@@ -7131,7 +7159,7 @@ class $l {
7131
7159
  return t.bumpScale = o.bumpFactor !== void 0 ? o.bumpFactor : 1, o.bumpTexture !== void 0 && i.push(n.assignTexture(t, "bumpMap", o.bumpTexture)), Promise.all(i);
7132
7160
  }
7133
7161
  }
7134
- class Yl {
7162
+ class Kl {
7135
7163
  constructor(e) {
7136
7164
  this.parser = e, this.name = K.KHR_MATERIALS_ANISOTROPY;
7137
7165
  }
@@ -7147,7 +7175,7 @@ class Yl {
7147
7175
  return o.anisotropyStrength !== void 0 && (t.anisotropy = o.anisotropyStrength), o.anisotropyRotation !== void 0 && (t.anisotropyRotation = o.anisotropyRotation), o.anisotropyTexture !== void 0 && i.push(n.assignTexture(t, "anisotropyMap", o.anisotropyTexture)), Promise.all(i);
7148
7176
  }
7149
7177
  }
7150
- class Kl {
7178
+ class ql {
7151
7179
  constructor(e) {
7152
7180
  this.parser = e, this.name = K.KHR_TEXTURE_BASISU;
7153
7181
  }
@@ -7164,7 +7192,7 @@ class Kl {
7164
7192
  return t.loadTextureImage(e, i.source, o);
7165
7193
  }
7166
7194
  }
7167
- class ql {
7195
+ class Jl {
7168
7196
  constructor(e) {
7169
7197
  this.parser = e, this.name = K.EXT_TEXTURE_WEBP, this.isSupported = null;
7170
7198
  }
@@ -7194,7 +7222,7 @@ class ql {
7194
7222
  })), this.isSupported;
7195
7223
  }
7196
7224
  }
7197
- class Jl {
7225
+ class Ql {
7198
7226
  constructor(e) {
7199
7227
  this.parser = e, this.name = K.EXT_TEXTURE_AVIF, this.isSupported = null;
7200
7228
  }
@@ -7224,7 +7252,7 @@ class Jl {
7224
7252
  })), this.isSupported;
7225
7253
  }
7226
7254
  }
7227
- class Ql {
7255
+ class ed {
7228
7256
  constructor(e) {
7229
7257
  this.name = K.EXT_MESHOPT_COMPRESSION, this.parser = e;
7230
7258
  }
@@ -7250,7 +7278,7 @@ class Ql {
7250
7278
  return null;
7251
7279
  }
7252
7280
  }
7253
- class ed {
7281
+ class td {
7254
7282
  constructor(e) {
7255
7283
  this.name = K.EXT_MESH_GPU_INSTANCING, this.parser = e;
7256
7284
  }
@@ -7268,22 +7296,22 @@ class ed {
7268
7296
  return a.length < 1 ? null : (a.push(this.parser.createNodeMesh(e)), Promise.all(a).then((l) => {
7269
7297
  const d = l.pop(), u = d.isGroup ? d.children : [d], h = l[0].count, f = [];
7270
7298
  for (const g of u) {
7271
- const y = new pn(), x = new J(), b = new ss(), w = new J(1, 1, 1), T = new Vo(g.geometry, g.material, h);
7299
+ const y = new pn(), x = new J(), b = new is(), w = new J(1, 1, 1), T = new Go(g.geometry, g.material, h);
7272
7300
  for (let v = 0; v < h; v++)
7273
7301
  c.TRANSLATION && x.fromBufferAttribute(c.TRANSLATION, v), c.ROTATION && b.fromBufferAttribute(c.ROTATION, v), c.SCALE && w.fromBufferAttribute(c.SCALE, v), T.setMatrixAt(v, y.compose(x, b, w));
7274
7302
  for (const v in c)
7275
7303
  if (v === "_COLOR_0") {
7276
7304
  const P = c[v];
7277
- T.instanceColor = new Go(P.array, P.itemSize, P.normalized);
7305
+ T.instanceColor = new Zo(P.array, P.itemSize, P.normalized);
7278
7306
  } else v !== "TRANSLATION" && v !== "ROTATION" && v !== "SCALE" && g.geometry.setAttribute(v, c[v]);
7279
- Br.prototype.copy.call(T, g), this.parser.assignFinalMaterial(T), f.push(T);
7307
+ Hr.prototype.copy.call(T, g), this.parser.assignFinalMaterial(T), f.push(T);
7280
7308
  }
7281
7309
  return d.isGroup ? (d.clear(), d.add(...f), d) : f[0];
7282
7310
  }));
7283
7311
  }
7284
7312
  }
7285
- const ao = "glTF", tn = 12, vr = { JSON: 1313821514, BIN: 5130562 };
7286
- class td {
7313
+ const co = "glTF", tn = 12, xr = { JSON: 1313821514, BIN: 5130562 };
7314
+ class nd {
7287
7315
  constructor(e) {
7288
7316
  this.name = K.KHR_BINARY_GLTF, this.content = null, this.body = null;
7289
7317
  const t = new DataView(e, 0, tn), n = new TextDecoder();
@@ -7291,7 +7319,7 @@ class td {
7291
7319
  magic: n.decode(new Uint8Array(e.slice(0, 4))),
7292
7320
  version: t.getUint32(4, !0),
7293
7321
  length: t.getUint32(8, !0)
7294
- }, this.header.magic !== ao)
7322
+ }, this.header.magic !== co)
7295
7323
  throw new Error("THREE.GLTFLoader: Unsupported glTF-Binary header.");
7296
7324
  if (this.header.version < 2)
7297
7325
  throw new Error("THREE.GLTFLoader: Legacy binary file detected.");
@@ -7301,10 +7329,10 @@ class td {
7301
7329
  const a = i.getUint32(o, !0);
7302
7330
  o += 4;
7303
7331
  const c = i.getUint32(o, !0);
7304
- if (o += 4, c === vr.JSON) {
7332
+ if (o += 4, c === xr.JSON) {
7305
7333
  const l = new Uint8Array(e, tn + o, a);
7306
7334
  this.content = n.decode(l);
7307
- } else if (c === vr.BIN) {
7335
+ } else if (c === xr.BIN) {
7308
7336
  const l = tn + o;
7309
7337
  this.body = e.slice(l, l + a);
7310
7338
  }
@@ -7314,7 +7342,7 @@ class td {
7314
7342
  throw new Error("THREE.GLTFLoader: JSON content not found.");
7315
7343
  }
7316
7344
  }
7317
- class nd {
7345
+ class sd {
7318
7346
  constructor(e, t) {
7319
7347
  if (!t)
7320
7348
  throw new Error("THREE.GLTFLoader: No DRACOLoader instance provided.");
@@ -7323,11 +7351,11 @@ class nd {
7323
7351
  decodePrimitive(e, t) {
7324
7352
  const n = this.json, s = this.dracoLoader, i = e.extensions[this.name].bufferView, o = e.extensions[this.name].attributes, a = {}, c = {}, l = {};
7325
7353
  for (const d in o) {
7326
- const u = ai[d] || d.toLowerCase();
7354
+ const u = ci[d] || d.toLowerCase();
7327
7355
  a[u] = o[d];
7328
7356
  }
7329
7357
  for (const d in e.attributes) {
7330
- const u = ai[d] || d.toLowerCase();
7358
+ const u = ci[d] || d.toLowerCase();
7331
7359
  if (o[d] !== void 0) {
7332
7360
  const h = n.accessors[e.attributes[d]], f = $t[h.componentType];
7333
7361
  l[u] = f.name, c[u] = h.normalized === !0;
@@ -7346,7 +7374,7 @@ class nd {
7346
7374
  });
7347
7375
  }
7348
7376
  }
7349
- class sd {
7377
+ class id {
7350
7378
  constructor() {
7351
7379
  this.name = K.KHR_TEXTURE_TRANSFORM;
7352
7380
  }
@@ -7354,12 +7382,12 @@ class sd {
7354
7382
  return (t.texCoord === void 0 || t.texCoord === e.channel) && t.offset === void 0 && t.rotation === void 0 && t.scale === void 0 || (e = e.clone(), t.texCoord !== void 0 && (e.channel = t.texCoord), t.offset !== void 0 && e.offset.fromArray(t.offset), t.rotation !== void 0 && (e.rotation = t.rotation), t.scale !== void 0 && e.repeat.fromArray(t.scale), e.needsUpdate = !0), e;
7355
7383
  }
7356
7384
  }
7357
- class id {
7385
+ class rd {
7358
7386
  constructor() {
7359
7387
  this.name = K.KHR_MESH_QUANTIZATION;
7360
7388
  }
7361
7389
  }
7362
- class co extends fa {
7390
+ class lo extends ma {
7363
7391
  constructor(e, t, n, s) {
7364
7392
  super(e, t, n, s);
7365
7393
  }
@@ -7378,11 +7406,11 @@ class co extends fa {
7378
7406
  return i;
7379
7407
  }
7380
7408
  }
7381
- const rd = new ss();
7382
- class od extends co {
7409
+ const od = new is();
7410
+ class ad extends lo {
7383
7411
  interpolate_(e, t, n, s) {
7384
7412
  const i = super.interpolate_(e, t, n, s);
7385
- return rd.fromArray(i).normalize().toArray(i), i;
7413
+ return od.fromArray(i).normalize().toArray(i), i;
7386
7414
  }
7387
7415
  }
7388
7416
  const Ie = {
@@ -7400,18 +7428,18 @@ const Ie = {
7400
7428
  5123: Uint16Array,
7401
7429
  5125: Uint32Array,
7402
7430
  5126: Float32Array
7403
- }, xr = {
7404
- 9728: Vr,
7405
- 9729: Yt,
7406
- 9984: Ko,
7407
- 9985: Yo,
7408
- 9986: $o,
7409
- 9987: Hr
7410
7431
  }, br = {
7411
- 33071: Ks,
7412
- 33648: qo,
7413
- 10497: Qs
7414
- }, Us = {
7432
+ 9728: Gr,
7433
+ 9729: Yt,
7434
+ 9984: qo,
7435
+ 9985: Ko,
7436
+ 9986: Yo,
7437
+ 9987: Vr
7438
+ }, wr = {
7439
+ 33071: qs,
7440
+ 33648: Jo,
7441
+ 10497: ei
7442
+ }, Fs = {
7415
7443
  SCALAR: 1,
7416
7444
  VEC2: 2,
7417
7445
  VEC3: 3,
@@ -7419,7 +7447,7 @@ const Ie = {
7419
7447
  MAT2: 4,
7420
7448
  MAT3: 9,
7421
7449
  MAT4: 16
7422
- }, ai = {
7450
+ }, ci = {
7423
7451
  POSITION: "position",
7424
7452
  NORMAL: "normal",
7425
7453
  TANGENT: "tangent",
@@ -7435,26 +7463,26 @@ const Ie = {
7435
7463
  translation: "position",
7436
7464
  rotation: "quaternion",
7437
7465
  weights: "morphTargetInfluences"
7438
- }, ad = {
7466
+ }, cd = {
7439
7467
  CUBICSPLINE: void 0,
7440
7468
  // We use a custom interpolant (GLTFCubicSplineInterpolation) for CUBICSPLINE tracks. Each
7441
7469
  // keyframe track will be initialized with a default interpolation type, then modified.
7442
- LINEAR: Zr,
7443
- STEP: ua
7444
- }, Fs = {
7470
+ LINEAR: Wr,
7471
+ STEP: ha
7472
+ }, js = {
7445
7473
  OPAQUE: "OPAQUE",
7446
7474
  MASK: "MASK",
7447
7475
  BLEND: "BLEND"
7448
7476
  };
7449
- function cd(r) {
7450
- return r.DefaultMaterial === void 0 && (r.DefaultMaterial = new is({
7477
+ function ld(r) {
7478
+ return r.DefaultMaterial === void 0 && (r.DefaultMaterial = new rs({
7451
7479
  color: 16777215,
7452
7480
  emissive: 0,
7453
7481
  metalness: 1,
7454
7482
  roughness: 1,
7455
7483
  transparent: !1,
7456
7484
  depthTest: !0,
7457
- side: ha
7485
+ side: fa
7458
7486
  })), r.DefaultMaterial;
7459
7487
  }
7460
7488
  function bt(r, e, t) {
@@ -7464,7 +7492,7 @@ function bt(r, e, t) {
7464
7492
  function it(r, e) {
7465
7493
  e.extras !== void 0 && (typeof e.extras == "object" ? Object.assign(r.userData, e.extras) : console.warn("THREE.GLTFLoader: Ignoring primitive type .extras, " + e.extras));
7466
7494
  }
7467
- function ld(r, e, t) {
7495
+ function dd(r, e, t) {
7468
7496
  let n = !1, s = !1, i = !1;
7469
7497
  for (let l = 0, d = e.length; l < d; l++) {
7470
7498
  const u = e[l];
@@ -7496,7 +7524,7 @@ function ld(r, e, t) {
7496
7524
  return n && (r.morphAttributes.position = d), s && (r.morphAttributes.normal = u), i && (r.morphAttributes.color = h), r.morphTargetsRelative = !0, r;
7497
7525
  });
7498
7526
  }
7499
- function dd(r, e) {
7527
+ function ud(r, e) {
7500
7528
  if (r.updateMorphTargets(), e.weights !== void 0)
7501
7529
  for (let t = 0, n = e.weights.length; t < n; t++)
7502
7530
  r.morphTargetInfluences[t] = e.weights[t];
@@ -7510,22 +7538,22 @@ function dd(r, e) {
7510
7538
  console.warn("THREE.GLTFLoader: Invalid extras.targetNames length. Ignoring names.");
7511
7539
  }
7512
7540
  }
7513
- function ud(r) {
7541
+ function hd(r) {
7514
7542
  let e;
7515
7543
  const t = r.extensions && r.extensions[K.KHR_DRACO_MESH_COMPRESSION];
7516
- if (t ? e = "draco:" + t.bufferView + ":" + t.indices + ":" + js(t.attributes) : e = r.indices + ":" + js(r.attributes) + ":" + r.mode, r.targets !== void 0)
7544
+ if (t ? e = "draco:" + t.bufferView + ":" + t.indices + ":" + Bs(t.attributes) : e = r.indices + ":" + Bs(r.attributes) + ":" + r.mode, r.targets !== void 0)
7517
7545
  for (let n = 0, s = r.targets.length; n < s; n++)
7518
- e += ":" + js(r.targets[n]);
7546
+ e += ":" + Bs(r.targets[n]);
7519
7547
  return e;
7520
7548
  }
7521
- function js(r) {
7549
+ function Bs(r) {
7522
7550
  let e = "";
7523
7551
  const t = Object.keys(r).sort();
7524
7552
  for (let n = 0, s = t.length; n < s; n++)
7525
7553
  e += t[n] + ":" + r[t[n]] + ";";
7526
7554
  return e;
7527
7555
  }
7528
- function ci(r) {
7556
+ function li(r) {
7529
7557
  switch (r) {
7530
7558
  case Int8Array:
7531
7559
  return 1 / 127;
@@ -7539,13 +7567,13 @@ function ci(r) {
7539
7567
  throw new Error("THREE.GLTFLoader: Unsupported normalized accessor component type.");
7540
7568
  }
7541
7569
  }
7542
- function hd(r) {
7570
+ function fd(r) {
7543
7571
  return r.search(/\.jpe?g($|\?)/i) > 0 || r.search(/^data\:image\/jpeg/) === 0 ? "image/jpeg" : r.search(/\.webp($|\?)/i) > 0 || r.search(/^data\:image\/webp/) === 0 ? "image/webp" : r.search(/\.ktx2($|\?)/i) > 0 || r.search(/^data\:image\/ktx2/) === 0 ? "image/ktx2" : "image/png";
7544
7572
  }
7545
- const fd = new pn();
7546
- class md {
7573
+ const md = new pn();
7574
+ class pd {
7547
7575
  constructor(e = {}, t = {}) {
7548
- this.json = e, this.extensions = {}, this.plugins = {}, this.options = t, this.cache = new Pl(), this.associations = /* @__PURE__ */ new Map(), this.primitiveCache = {}, this.nodeCache = {}, this.meshCache = { refs: {}, uses: {} }, this.cameraCache = { refs: {}, uses: {} }, this.lightCache = { refs: {}, uses: {} }, this.sourceCache = {}, this.textureCache = {}, this.nodeNamesUsed = {};
7576
+ this.json = e, this.extensions = {}, this.plugins = {}, this.options = t, this.cache = new zl(), this.associations = /* @__PURE__ */ new Map(), this.primitiveCache = {}, this.nodeCache = {}, this.meshCache = { refs: {}, uses: {} }, this.cameraCache = { refs: {}, uses: {} }, this.lightCache = { refs: {}, uses: {} }, this.sourceCache = {}, this.textureCache = {}, this.nodeNamesUsed = {};
7549
7577
  let n = !1, s = -1, i = !1, o = -1;
7550
7578
  if (typeof navigator < "u") {
7551
7579
  const a = navigator.userAgent;
@@ -7553,7 +7581,7 @@ class md {
7553
7581
  const c = a.match(/Version\/(\d+)/);
7554
7582
  s = n && c ? parseInt(c[1], 10) : -1, i = a.indexOf("Firefox") > -1, o = i ? a.match(/Firefox\/([0-9]+)\./)[1] : -1;
7555
7583
  }
7556
- typeof createImageBitmap > "u" || n && s < 17 || i && o < 98 ? this.textureLoader = new Zo(this.options.manager) : this.textureLoader = new Wo(this.options.manager), this.textureLoader.setCrossOrigin(this.options.crossOrigin), this.textureLoader.setRequestHeader(this.options.requestHeader), this.fileLoader = new mn(this.options.manager), this.fileLoader.setResponseType("arraybuffer"), this.options.crossOrigin === "use-credentials" && this.fileLoader.setWithCredentials(!0);
7584
+ typeof createImageBitmap > "u" || n && s < 17 || i && o < 98 ? this.textureLoader = new Wo(this.options.manager) : this.textureLoader = new Xo(this.options.manager), this.textureLoader.setCrossOrigin(this.options.crossOrigin), this.textureLoader.setRequestHeader(this.options.requestHeader), this.fileLoader = new mn(this.options.manager), this.fileLoader.setResponseType("arraybuffer"), this.options.crossOrigin === "use-credentials" && this.fileLoader.setWithCredentials(!0);
7557
7585
  }
7558
7586
  setExtensions(e) {
7559
7587
  this.extensions = e;
@@ -7793,21 +7821,21 @@ class md {
7793
7821
  loadAccessor(e) {
7794
7822
  const t = this, n = this.json, s = this.json.accessors[e];
7795
7823
  if (s.bufferView === void 0 && s.sparse === void 0) {
7796
- const o = Us[s.type], a = $t[s.componentType], c = s.normalized === !0, l = new a(s.count * o);
7824
+ const o = Fs[s.type], a = $t[s.componentType], c = s.normalized === !0, l = new a(s.count * o);
7797
7825
  return Promise.resolve(new at(l, o, c));
7798
7826
  }
7799
7827
  const i = [];
7800
7828
  return s.bufferView !== void 0 ? i.push(this.getDependency("bufferView", s.bufferView)) : i.push(null), s.sparse !== void 0 && (i.push(this.getDependency("bufferView", s.sparse.indices.bufferView)), i.push(this.getDependency("bufferView", s.sparse.values.bufferView))), Promise.all(i).then(function(o) {
7801
- const a = o[0], c = Us[s.type], l = $t[s.componentType], d = l.BYTES_PER_ELEMENT, u = d * c, h = s.byteOffset || 0, f = s.bufferView !== void 0 ? n.bufferViews[s.bufferView].byteStride : void 0, g = s.normalized === !0;
7829
+ const a = o[0], c = Fs[s.type], l = $t[s.componentType], d = l.BYTES_PER_ELEMENT, u = d * c, h = s.byteOffset || 0, f = s.bufferView !== void 0 ? n.bufferViews[s.bufferView].byteStride : void 0, g = s.normalized === !0;
7802
7830
  let y, x;
7803
7831
  if (f && f !== u) {
7804
7832
  const b = Math.floor(h / f), w = "InterleavedBuffer:" + s.bufferView + ":" + s.componentType + ":" + b + ":" + s.count;
7805
7833
  let T = t.cache.get(w);
7806
- T || (y = new l(a, b * f, s.count * f / d), T = new Xo(y, f / d), t.cache.add(w, T)), x = new Et(T, c, h % f / d, g);
7834
+ T || (y = new l(a, b * f, s.count * f / d), T = new $o(y, f / d), t.cache.add(w, T)), x = new Et(T, c, h % f / d, g);
7807
7835
  } else
7808
7836
  a === null ? y = new l(s.count * c) : y = new l(a, h, s.count * c), x = new at(y, c, g);
7809
7837
  if (s.sparse !== void 0) {
7810
- const b = Us.SCALAR, w = $t[s.sparse.indices.componentType], T = s.sparse.indices.byteOffset || 0, v = s.sparse.values.byteOffset || 0, P = new w(o[1], T, s.sparse.count * b), V = new l(o[2], v, s.sparse.count * c);
7838
+ const b = Fs.SCALAR, w = $t[s.sparse.indices.componentType], T = s.sparse.indices.byteOffset || 0, v = s.sparse.values.byteOffset || 0, P = new w(o[1], T, s.sparse.count * b), V = new l(o[2], v, s.sparse.count * c);
7811
7839
  a !== null && (x = new at(x.array.slice(), x.itemSize, x.normalized)), x.normalized = !1;
7812
7840
  for (let F = 0, L = P.length; F < L; F++) {
7813
7841
  const R = P[F];
@@ -7841,7 +7869,7 @@ class md {
7841
7869
  const l = this.loadImageSource(t, n).then(function(d) {
7842
7870
  d.flipY = !1, d.name = o.name || a.name || "", d.name === "" && typeof a.uri == "string" && a.uri.startsWith("data:image/") === !1 && (d.name = a.uri);
7843
7871
  const h = (i.samplers || {})[o.sampler] || {};
7844
- return d.magFilter = xr[h.magFilter] || Yt, d.minFilter = xr[h.minFilter] || Hr, d.wrapS = br[h.wrapS] || Qs, d.wrapT = br[h.wrapT] || Qs, d.generateMipmaps = !d.isCompressedTexture && d.minFilter !== Vr && d.minFilter !== Yt, s.associations.set(d, { textures: e }), d;
7872
+ return d.magFilter = br[h.magFilter] || Yt, d.minFilter = br[h.minFilter] || Vr, d.wrapS = wr[h.wrapS] || ei, d.wrapT = wr[h.wrapT] || ei, d.generateMipmaps = !d.isCompressedTexture && d.minFilter !== Gr && d.minFilter !== Yt, s.associations.set(d, { textures: e }), d;
7845
7873
  }).catch(function() {
7846
7874
  return null;
7847
7875
  });
@@ -7865,12 +7893,12 @@ class md {
7865
7893
  return new Promise(function(h, f) {
7866
7894
  let g = h;
7867
7895
  t.isImageBitmapLoader === !0 && (g = function(y) {
7868
- const x = new Ji(y);
7896
+ const x = new Qi(y);
7869
7897
  x.needsUpdate = !0, h(x);
7870
7898
  }), t.load(fn.resolveURL(u, i.path), g, void 0, f);
7871
7899
  });
7872
7900
  }).then(function(u) {
7873
- return l === !0 && a.revokeObjectURL(c), it(u, o), u.userData.mimeType = o.mimeType || hd(o.uri), u;
7901
+ return l === !0 && a.revokeObjectURL(c), it(u, o), u.userData.mimeType = o.mimeType || fd(o.uri), u;
7874
7902
  }).catch(function(u) {
7875
7903
  throw console.error("THREE.GLTFLoader: Couldn't load texture", c), u;
7876
7904
  });
@@ -7917,11 +7945,11 @@ class md {
7917
7945
  if (e.isPoints) {
7918
7946
  const a = "PointsMaterial:" + n.uuid;
7919
7947
  let c = this.cache.get(a);
7920
- c || (c = new Jo(), Ls.prototype.copy.call(c, n), c.color.copy(n.color), c.map = n.map, c.sizeAttenuation = !1, this.cache.add(a, c)), n = c;
7948
+ c || (c = new Qo(), Ls.prototype.copy.call(c, n), c.color.copy(n.color), c.map = n.map, c.sizeAttenuation = !1, this.cache.add(a, c)), n = c;
7921
7949
  } else if (e.isLine) {
7922
7950
  const a = "LineBasicMaterial:" + n.uuid;
7923
7951
  let c = this.cache.get(a);
7924
- c || (c = new Qo(), Ls.prototype.copy.call(c, n), c.color.copy(n.color), c.map = n.map, this.cache.add(a, c)), n = c;
7952
+ c || (c = new ea(), Ls.prototype.copy.call(c, n), c.color.copy(n.color), c.map = n.map, this.cache.add(a, c)), n = c;
7925
7953
  }
7926
7954
  if (s || i || o) {
7927
7955
  let a = "ClonedMaterial:" + n.uuid + ":";
@@ -7932,7 +7960,7 @@ class md {
7932
7960
  e.material = n;
7933
7961
  }
7934
7962
  getMaterialType() {
7935
- return is;
7963
+ return rs;
7936
7964
  }
7937
7965
  /**
7938
7966
  * Specification: https://github.com/KhronosGroup/glTF/blob/master/specification/2.0/README.md#materials
@@ -7960,9 +7988,9 @@ class md {
7960
7988
  return h.extendMaterialParams && h.extendMaterialParams(e, a);
7961
7989
  })));
7962
7990
  }
7963
- i.doubleSided === !0 && (a.side = ea);
7964
- const d = i.alphaMode || Fs.OPAQUE;
7965
- if (d === Fs.BLEND ? (a.transparent = !0, a.depthWrite = !1) : (a.transparent = !1, d === Fs.MASK && (a.alphaTest = i.alphaCutoff !== void 0 ? i.alphaCutoff : 0.5)), i.normalTexture !== void 0 && o !== Ht && (l.push(t.assignTexture(a, "normalMap", i.normalTexture)), a.normalScale = new Ce(1, 1), i.normalTexture.scale !== void 0)) {
7991
+ i.doubleSided === !0 && (a.side = ta);
7992
+ const d = i.alphaMode || js.OPAQUE;
7993
+ if (d === js.BLEND ? (a.transparent = !0, a.depthWrite = !1) : (a.transparent = !1, d === js.MASK && (a.alphaTest = i.alphaCutoff !== void 0 ? i.alphaCutoff : 0.5)), i.normalTexture !== void 0 && o !== Ht && (l.push(t.assignTexture(a, "normalMap", i.normalTexture)), a.normalScale = new ke(1, 1), i.normalTexture.scale !== void 0)) {
7966
7994
  const u = i.normalTexture.scale;
7967
7995
  a.normalScale.set(u, u);
7968
7996
  }
@@ -7983,7 +8011,7 @@ class md {
7983
8011
  * @return {string}
7984
8012
  */
7985
8013
  createUniqueName(e) {
7986
- const t = ta.sanitizeNodeName(e || "");
8014
+ const t = na.sanitizeNodeName(e || "");
7987
8015
  return t in this.nodeNamesUsed ? t + "_" + ++this.nodeNamesUsed[t] : (this.nodeNamesUsed[t] = 0, t);
7988
8016
  }
7989
8017
  /**
@@ -7999,17 +8027,17 @@ class md {
7999
8027
  const t = this, n = this.extensions, s = this.primitiveCache;
8000
8028
  function i(a) {
8001
8029
  return n[K.KHR_DRACO_MESH_COMPRESSION].decodePrimitive(a, t).then(function(c) {
8002
- return wr(c, a, t);
8030
+ return Er(c, a, t);
8003
8031
  });
8004
8032
  }
8005
8033
  const o = [];
8006
8034
  for (let a = 0, c = e.length; a < c; a++) {
8007
- const l = e[a], d = ud(l), u = s[d];
8035
+ const l = e[a], d = hd(l), u = s[d];
8008
8036
  if (u)
8009
8037
  o.push(u.promise);
8010
8038
  else {
8011
8039
  let h;
8012
- l.extensions && l.extensions[K.KHR_DRACO_MESH_COMPRESSION] ? h = i(l) : h = wr(new Ti(), l, t), s[d] = { primitive: l, promise: h }, o.push(h);
8040
+ l.extensions && l.extensions[K.KHR_DRACO_MESH_COMPRESSION] ? h = i(l) : h = Er(new Si(), l, t), s[d] = { primitive: l, promise: h }, o.push(h);
8013
8041
  }
8014
8042
  }
8015
8043
  return Promise.all(o);
@@ -8024,7 +8052,7 @@ class md {
8024
8052
  loadMesh(e) {
8025
8053
  const t = this, n = this.json, s = this.extensions, i = n.meshes[e], o = i.primitives, a = [];
8026
8054
  for (let c = 0, l = o.length; c < l; c++) {
8027
- const d = o[c].material === void 0 ? cd(this.cache) : this.getDependency("material", o[c].material);
8055
+ const d = o[c].material === void 0 ? ld(this.cache) : this.getDependency("material", o[c].material);
8028
8056
  a.push(d);
8029
8057
  }
8030
8058
  return a.push(t.loadGeometries(o)), Promise.all(a).then(function(c) {
@@ -8034,18 +8062,18 @@ class md {
8034
8062
  let b;
8035
8063
  const w = l[f];
8036
8064
  if (x.mode === Ie.TRIANGLES || x.mode === Ie.TRIANGLE_STRIP || x.mode === Ie.TRIANGLE_FAN || x.mode === void 0)
8037
- b = i.isSkinnedMesh === !0 ? new na(y, w) : new ye(y, w), b.isSkinnedMesh === !0 && b.normalizeSkinWeights(), x.mode === Ie.TRIANGLE_STRIP ? b.geometry = ur(b.geometry, jr) : x.mode === Ie.TRIANGLE_FAN && (b.geometry = ur(b.geometry, qs));
8065
+ b = i.isSkinnedMesh === !0 ? new sa(y, w) : new ye(y, w), b.isSkinnedMesh === !0 && b.normalizeSkinWeights(), x.mode === Ie.TRIANGLE_STRIP ? b.geometry = hr(b.geometry, Br) : x.mode === Ie.TRIANGLE_FAN && (b.geometry = hr(b.geometry, Js));
8038
8066
  else if (x.mode === Ie.LINES)
8039
- b = new Gr(y, w);
8067
+ b = new Zr(y, w);
8040
8068
  else if (x.mode === Ie.LINE_STRIP)
8041
- b = new sa(y, w);
8042
- else if (x.mode === Ie.LINE_LOOP)
8043
8069
  b = new ia(y, w);
8044
- else if (x.mode === Ie.POINTS)
8070
+ else if (x.mode === Ie.LINE_LOOP)
8045
8071
  b = new ra(y, w);
8072
+ else if (x.mode === Ie.POINTS)
8073
+ b = new oa(y, w);
8046
8074
  else
8047
8075
  throw new Error("THREE.GLTFLoader: Primitive mode unsupported: " + x.mode);
8048
- Object.keys(b.geometry.morphAttributes).length > 0 && dd(b, i), b.name = t.createUniqueName(i.name || "mesh_" + e), it(b, i), x.extensions && bt(s, b, x), t.assignFinalMaterial(b), u.push(b);
8076
+ Object.keys(b.geometry.morphAttributes).length > 0 && ud(b, i), b.name = t.createUniqueName(i.name || "mesh_" + e), it(b, i), x.extensions && bt(s, b, x), t.assignFinalMaterial(b), u.push(b);
8049
8077
  }
8050
8078
  for (let f = 0, g = u.length; f < g; f++)
8051
8079
  t.associations.set(u[f], {
@@ -8054,7 +8082,7 @@ class md {
8054
8082
  });
8055
8083
  if (u.length === 1)
8056
8084
  return i.extensions && bt(s, u[0], i), u[0];
8057
- const h = new Cs();
8085
+ const h = new ks();
8058
8086
  i.extensions && bt(s, h, i), t.associations.set(h, { meshes: e });
8059
8087
  for (let f = 0, g = u.length; f < g; f++)
8060
8088
  h.add(u[f]);
@@ -8075,7 +8103,7 @@ class md {
8075
8103
  console.warn("THREE.GLTFLoader: Missing camera parameters.");
8076
8104
  return;
8077
8105
  }
8078
- return n.type === "perspective" ? t = new oa(xi.radToDeg(s.yfov), s.aspectRatio || 1, s.znear || 1, s.zfar || 2e6) : n.type === "orthographic" && (t = new aa(-s.xmag, s.xmag, s.ymag, -s.ymag, s.znear, s.zfar)), n.name && (t.name = this.createUniqueName(n.name)), it(t, n), Promise.resolve(t);
8106
+ return n.type === "perspective" ? t = new aa(bi.radToDeg(s.yfov), s.aspectRatio || 1, s.znear || 1, s.zfar || 2e6) : n.type === "orthographic" && (t = new ca(-s.xmag, s.xmag, s.ymag, -s.ymag, s.znear, s.zfar)), n.name && (t.name = this.createUniqueName(n.name)), it(t, n), Promise.resolve(t);
8079
8107
  }
8080
8108
  /**
8081
8109
  * Specification: https://github.com/KhronosGroup/glTF/tree/master/specification/2.0#skins
@@ -8099,7 +8127,7 @@ class md {
8099
8127
  } else
8100
8128
  console.warn('THREE.GLTFLoader: Joint "%s" could not be found.', t.joints[l]);
8101
8129
  }
8102
- return new ca(a, c);
8130
+ return new la(a, c);
8103
8131
  });
8104
8132
  }
8105
8133
  /**
@@ -8129,10 +8157,10 @@ class md {
8129
8157
  v.updateMatrix && v.updateMatrix();
8130
8158
  const R = n._createAnimationTracks(v, P, V, F, L);
8131
8159
  if (R)
8132
- for (let O = 0; O < R.length; O++)
8133
- b.push(R[O]);
8160
+ for (let C = 0; C < R.length; C++)
8161
+ b.push(R[C]);
8134
8162
  }
8135
- return new la(i, void 0, b);
8163
+ return new da(i, void 0, b);
8136
8164
  });
8137
8165
  }
8138
8166
  createNodeMesh(e) {
@@ -8165,7 +8193,7 @@ class md {
8165
8193
  ]).then(function(l) {
8166
8194
  const d = l[0], u = l[1], h = l[2];
8167
8195
  h !== null && d.traverse(function(f) {
8168
- f.isSkinnedMesh && f.bind(h, fd);
8196
+ f.isSkinnedMesh && f.bind(h, md);
8169
8197
  });
8170
8198
  for (let f = 0, g = u.length; f < g; f++)
8171
8199
  d.add(u[f]);
@@ -8189,7 +8217,7 @@ class md {
8189
8217
  a.push(l);
8190
8218
  }), this.nodeCache[e] = Promise.all(a).then(function(l) {
8191
8219
  let d;
8192
- if (i.isBone === !0 ? d = new da() : l.length > 1 ? d = new Cs() : l.length === 1 ? d = l[0] : d = new Br(), d !== l[0])
8220
+ if (i.isBone === !0 ? d = new ua() : l.length > 1 ? d = new ks() : l.length === 1 ? d = l[0] : d = new Hr(), d !== l[0])
8193
8221
  for (let u = 0, h = l.length; u < h; u++)
8194
8222
  d.add(l[u]);
8195
8223
  if (i.name && (d.userData.name = i.name, d.name = o), it(d, i), i.extensions && bt(n, d, i), i.matrix !== void 0) {
@@ -8208,7 +8236,7 @@ class md {
8208
8236
  * @return {Promise<Group>}
8209
8237
  */
8210
8238
  loadScene(e) {
8211
- const t = this.extensions, n = this.json.scenes[e], s = this, i = new Cs();
8239
+ const t = this.extensions, n = this.json.scenes[e], s = this, i = new ks();
8212
8240
  n.name && (i.name = s.createUniqueName(n.name)), it(i, n), n.extensions && bt(t, i, n);
8213
8241
  const o = n.nodes || [], a = [];
8214
8242
  for (let c = 0, l = o.length; c < l; c++)
@@ -8219,7 +8247,7 @@ class md {
8219
8247
  const l = (d) => {
8220
8248
  const u = /* @__PURE__ */ new Map();
8221
8249
  for (const [h, f] of s.associations)
8222
- (h instanceof Ls || h instanceof Ji) && u.set(h, f);
8250
+ (h instanceof Ls || h instanceof Qi) && u.set(h, f);
8223
8251
  return d.traverse((h) => {
8224
8252
  const f = s.associations.get(h);
8225
8253
  f != null && u.set(h, f);
@@ -8236,29 +8264,29 @@ class md {
8236
8264
  let l;
8237
8265
  switch (ht[i.path]) {
8238
8266
  case ht.weights:
8239
- l = er;
8267
+ l = tr;
8240
8268
  break;
8241
8269
  case ht.rotation:
8242
- l = tr;
8270
+ l = nr;
8243
8271
  break;
8244
8272
  case ht.translation:
8245
8273
  case ht.scale:
8246
- l = Qi;
8274
+ l = er;
8247
8275
  break;
8248
8276
  default:
8249
8277
  switch (n.itemSize) {
8250
8278
  case 1:
8251
- l = er;
8279
+ l = tr;
8252
8280
  break;
8253
8281
  case 2:
8254
8282
  case 3:
8255
8283
  default:
8256
- l = Qi;
8284
+ l = er;
8257
8285
  break;
8258
8286
  }
8259
8287
  break;
8260
8288
  }
8261
- const d = s.interpolation !== void 0 ? ad[s.interpolation] : Zr, u = this._getArrayFromAccessor(n);
8289
+ const d = s.interpolation !== void 0 ? cd[s.interpolation] : Wr, u = this._getArrayFromAccessor(n);
8262
8290
  for (let h = 0, f = c.length; h < f; h++) {
8263
8291
  const g = new l(
8264
8292
  c[h] + "." + ht[i.path],
@@ -8273,7 +8301,7 @@ class md {
8273
8301
  _getArrayFromAccessor(e) {
8274
8302
  let t = e.array;
8275
8303
  if (e.normalized) {
8276
- const n = ci(t.constructor), s = new Float32Array(t.length);
8304
+ const n = li(t.constructor), s = new Float32Array(t.length);
8277
8305
  for (let i = 0, o = t.length; i < o; i++)
8278
8306
  s[i] = t[i] * n;
8279
8307
  t = s;
@@ -8282,13 +8310,13 @@ class md {
8282
8310
  }
8283
8311
  _createCubicSplineTrackInterpolant(e) {
8284
8312
  e.createInterpolant = function(n) {
8285
- const s = this instanceof tr ? od : co;
8313
+ const s = this instanceof nr ? ad : lo;
8286
8314
  return new s(this.times, this.values, this.getValueSize() / 3, n);
8287
8315
  }, e.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline = !0;
8288
8316
  }
8289
8317
  }
8290
- function pd(r, e, t) {
8291
- const n = e.attributes, s = new ms();
8318
+ function _d(r, e, t) {
8319
+ const n = e.attributes, s = new ps();
8292
8320
  if (n.POSITION !== void 0) {
8293
8321
  const a = t.json.accessors[n.POSITION], c = a.min, l = a.max;
8294
8322
  if (c !== void 0 && l !== void 0) {
@@ -8296,7 +8324,7 @@ function pd(r, e, t) {
8296
8324
  new J(c[0], c[1], c[2]),
8297
8325
  new J(l[0], l[1], l[2])
8298
8326
  ), a.normalized) {
8299
- const d = ci($t[a.componentType]);
8327
+ const d = li($t[a.componentType]);
8300
8328
  s.min.multiplyScalar(d), s.max.multiplyScalar(d);
8301
8329
  }
8302
8330
  } else {
@@ -8314,7 +8342,7 @@ function pd(r, e, t) {
8314
8342
  const h = t.json.accessors[u.POSITION], f = h.min, g = h.max;
8315
8343
  if (f !== void 0 && g !== void 0) {
8316
8344
  if (c.setX(Math.max(Math.abs(f[0]), Math.abs(g[0]))), c.setY(Math.max(Math.abs(f[1]), Math.abs(g[1]))), c.setZ(Math.max(Math.abs(f[2]), Math.abs(g[2]))), h.normalized) {
8317
- const y = ci($t[h.componentType]);
8345
+ const y = li($t[h.componentType]);
8318
8346
  c.multiplyScalar(y);
8319
8347
  }
8320
8348
  a.max(c);
@@ -8325,10 +8353,10 @@ function pd(r, e, t) {
8325
8353
  s.expandByVector(a);
8326
8354
  }
8327
8355
  r.boundingBox = s;
8328
- const o = new Ai();
8356
+ const o = new Ti();
8329
8357
  s.getCenter(o.center), o.radius = s.min.distanceTo(s.max) / 2, r.boundingSphere = o;
8330
8358
  }
8331
- function wr(r, e, t) {
8359
+ function Er(r, e, t) {
8332
8360
  const n = e.attributes, s = [];
8333
8361
  function i(o, a) {
8334
8362
  return t.getDependency("accessor", o).then(function(c) {
@@ -8336,7 +8364,7 @@ function wr(r, e, t) {
8336
8364
  });
8337
8365
  }
8338
8366
  for (const o in n) {
8339
- const a = ai[o] || o.toLowerCase();
8367
+ const a = ci[o] || o.toLowerCase();
8340
8368
  a in r.attributes || s.push(i(n[o], a));
8341
8369
  }
8342
8370
  if (e.indices !== void 0 && !r.index) {
@@ -8345,12 +8373,12 @@ function wr(r, e, t) {
8345
8373
  });
8346
8374
  s.push(o);
8347
8375
  }
8348
- return ei.workingColorSpace !== Pe && "COLOR_0" in n && console.warn(`THREE.GLTFLoader: Converting vertex colors from "srgb-linear" to "${ei.workingColorSpace}" not supported.`), it(r, e), pd(r, e, t), Promise.all(s).then(function() {
8349
- return e.targets !== void 0 ? ld(r, e.targets, t) : r;
8376
+ return ti.workingColorSpace !== Pe && "COLOR_0" in n && console.warn(`THREE.GLTFLoader: Converting vertex colors from "srgb-linear" to "${ti.workingColorSpace}" not supported.`), it(r, e), _d(r, e, t), Promise.all(s).then(function() {
8377
+ return e.targets !== void 0 ? dd(r, e.targets, t) : r;
8350
8378
  });
8351
8379
  }
8352
- const Bs = /* @__PURE__ */ new WeakMap();
8353
- class _d extends bi {
8380
+ const Hs = /* @__PURE__ */ new WeakMap();
8381
+ class gd extends wi {
8354
8382
  /**
8355
8383
  * Constructs a new Draco loader.
8356
8384
  *
@@ -8436,8 +8464,8 @@ class _d extends bi {
8436
8464
  }
8437
8465
  decodeGeometry(e, t) {
8438
8466
  const n = JSON.stringify(t);
8439
- if (Bs.has(e)) {
8440
- const c = Bs.get(e);
8467
+ if (Hs.has(e)) {
8468
+ const c = Hs.get(e);
8441
8469
  if (c.key === n)
8442
8470
  return c.promise;
8443
8471
  if (e.byteLength === 0)
@@ -8451,13 +8479,13 @@ class _d extends bi {
8451
8479
  }))).then((c) => this._createGeometry(c.geometry));
8452
8480
  return a.catch(() => !0).then(() => {
8453
8481
  s && i && this._releaseTask(s, i);
8454
- }), Bs.set(e, {
8482
+ }), Hs.set(e, {
8455
8483
  key: n,
8456
8484
  promise: a
8457
8485
  }), a;
8458
8486
  }
8459
8487
  _createGeometry(e) {
8460
- const t = new Ti();
8488
+ const t = new Si();
8461
8489
  e.index && t.setIndex(new at(e.index.array, 1));
8462
8490
  for (let n = 0; n < e.attributes.length; n++) {
8463
8491
  const s = e.attributes[n], i = s.name, o = s.array, a = s.itemSize, c = new at(o, a);
@@ -8469,7 +8497,7 @@ class _d extends bi {
8469
8497
  if (t !== mt) return;
8470
8498
  const n = new lt();
8471
8499
  for (let s = 0, i = e.count; s < i; s++)
8472
- n.fromBufferAttribute(e, s), ei.toWorkingColorSpace(n, mt), e.setXYZ(s, n.r, n.g, n.b);
8500
+ n.fromBufferAttribute(e, s), ti.toWorkingColorSpace(n, mt), e.setXYZ(s, n.r, n.g, n.b);
8473
8501
  }
8474
8502
  _loadLibrary(e, t) {
8475
8503
  const n = new mn(this.manager);
@@ -8486,7 +8514,7 @@ class _d extends bi {
8486
8514
  return e ? t.push(this._loadLibrary("draco_decoder.js", "text")) : (t.push(this._loadLibrary("draco_wasm_wrapper.js", "text")), t.push(this._loadLibrary("draco_decoder.wasm", "arraybuffer"))), this.decoderPending = Promise.all(t).then((n) => {
8487
8515
  const s = n[0];
8488
8516
  e || (this.decoderConfig.wasmBinary = n[1]);
8489
- const i = gd.toString(), o = [
8517
+ const i = yd.toString(), o = [
8490
8518
  "/* draco decoder */",
8491
8519
  s,
8492
8520
  "",
@@ -8534,7 +8562,7 @@ class _d extends bi {
8534
8562
  return this.workerPool.length = 0, this.workerSourceURL !== "" && URL.revokeObjectURL(this.workerSourceURL), this;
8535
8563
  }
8536
8564
  }
8537
- function gd() {
8565
+ function yd() {
8538
8566
  let r, e;
8539
8567
  onmessage = function(o) {
8540
8568
  const a = o.data;
@@ -8624,12 +8652,12 @@ function gd() {
8624
8652
  }
8625
8653
  }
8626
8654
  }
8627
- class yd {
8655
+ class vd {
8628
8656
  constructor(e) {
8629
8657
  _(this, "gltf_loader");
8630
8658
  e || (e = "/examples/jsm/libs/draco/gltf/");
8631
- const t = new _d();
8632
- e && t.setDecoderPath(e), this.gltf_loader = new Nl(), this.gltf_loader.setDRACOLoader(t);
8659
+ const t = new gd();
8660
+ e && t.setDecoderPath(e), this.gltf_loader = new Pl(), this.gltf_loader.setDRACOLoader(t);
8633
8661
  }
8634
8662
  /**
8635
8663
  * Loads a GLTF/GLB and returns a THREE.Group
@@ -8644,7 +8672,7 @@ class yd {
8644
8672
  void 0,
8645
8673
  (s) => {
8646
8674
  n(
8647
- new ve(`Failed to load model from ${e}`, "ModelLoader", Oe.MODEL_LOAD_FAILED, {
8675
+ new ve(`Failed to load model from ${e}`, "ModelLoader", Ce.MODEL_LOAD_FAILED, {
8648
8676
  url: e,
8649
8677
  error: s
8650
8678
  })
@@ -8654,7 +8682,7 @@ class yd {
8654
8682
  });
8655
8683
  }
8656
8684
  }
8657
- class vd extends EventTarget {
8685
+ class xd extends EventTarget {
8658
8686
  constructor(t, n) {
8659
8687
  super();
8660
8688
  // private scene: THREE.Scene
@@ -8664,7 +8692,7 @@ class vd extends EventTarget {
8664
8692
  _(this, "loader");
8665
8693
  _(this, "viewer");
8666
8694
  _(this, "settings");
8667
- this.viewer = t, this.loader = new yd(), this.settings = n, this.settings.addEventListener("update", (s) => {
8695
+ this.viewer = t, this.loader = new vd(), this.settings = n, this.settings.addEventListener("update", (s) => {
8668
8696
  const i = s.detail;
8669
8697
  i.models && this.update_models(i.models);
8670
8698
  }), this.ready = this.init();
@@ -8704,7 +8732,7 @@ class vd extends EventTarget {
8704
8732
  detail: { url: t.url }
8705
8733
  })
8706
8734
  );
8707
- const n = new Il(this.viewer, this.loader, t);
8735
+ const n = new Nl(this.viewer, this.loader, t);
8708
8736
  await n.load(), this.models.set(t.url, n), this.dispatchEvent(
8709
8737
  new CustomEvent("loaded", {
8710
8738
  detail: { url: t.url, model: n }
@@ -8774,7 +8802,7 @@ class Cu extends EventTarget {
8774
8802
  _(this, "environment");
8775
8803
  _(this, "sun");
8776
8804
  _(this, "model_manager");
8777
- this.settings = ri.use(n), this.viewer = new Vc(t, this.settings), this.environment = new $c(this.viewer, this.settings), this.model_manager = new vd(this.viewer, this.settings), this.sun = new gl(this.viewer, this.settings, this.environment, this.model_manager), this.settings.addEventListener("update", (s) => {
8805
+ this.settings = oi.use(n), this.viewer = new Gc(t, this.settings), this.environment = new Yc(this.viewer, this.settings), this.model_manager = new xd(this.viewer, this.settings), this.sun = new yl(this.viewer, this.settings, this.environment, this.model_manager), this.settings.addEventListener("update", (s) => {
8778
8806
  const i = s.detail;
8779
8807
  this.environment.update(i.environment);
8780
8808
  });
@@ -8786,7 +8814,7 @@ class Cu extends EventTarget {
8786
8814
  const n = new ve(
8787
8815
  `Failed to initialize Glimmer: ${t instanceof Error ? t.message : t}`,
8788
8816
  "Glimmer",
8789
- Oe.INITIALIZATION_FAILED,
8817
+ Ce.INITIALIZATION_FAILED,
8790
8818
  { error: t }
8791
8819
  );
8792
8820
  throw this.dispatchEvent(
@@ -8801,7 +8829,7 @@ class Cu extends EventTarget {
8801
8829
  (t = this.sun) == null || t.dispose(), (n = this.environment) == null || n.dispose(), (s = this.model_manager) == null || s.dispose(), (i = this.viewer) == null || i.dispose(), this.dispatchEvent(new CustomEvent("dispose", { detail: {} }));
8802
8830
  }
8803
8831
  }
8804
- const xd = E.object({
8832
+ const bd = E.object({
8805
8833
  type: E.enum(["2d", "3d"]),
8806
8834
  position: E.tuple([E.number(), E.number(), E.number()]),
8807
8835
  // [x, y, z] in 3D world coordinates
@@ -8816,7 +8844,7 @@ const xd = E.object({
8816
8844
  // Position in model's local space
8817
8845
  }).optional()
8818
8846
  // Optional anchor for 3D annotations
8819
- }), bd = E.object({
8847
+ }), wd = E.object({
8820
8848
  min: E.object({
8821
8849
  x: E.number(),
8822
8850
  y: E.number(),
@@ -8827,50 +8855,50 @@ const xd = E.object({
8827
8855
  y: E.number(),
8828
8856
  z: E.number()
8829
8857
  })
8830
- }), ts = E.object({
8858
+ }), ns = E.object({
8831
8859
  id: E.string(),
8832
8860
  title: E.string().optional(),
8833
8861
  description: E.string().optional(),
8834
8862
  // Glimmer settings to apply for this slide
8835
- settings: es.partial(),
8863
+ settings: ts.partial(),
8836
8864
  // Camera configuration
8837
8865
  camera: E.object({
8838
8866
  position: E.tuple([E.number(), E.number(), E.number()]),
8839
8867
  target: E.tuple([E.number(), E.number(), E.number()])
8840
8868
  }),
8841
8869
  // Optional annotations
8842
- annotations: E.array(xd).optional(),
8870
+ annotations: E.array(bd).optional(),
8843
8871
  // Optional section box
8844
- section_box: bd.optional(),
8872
+ section_box: wd.optional(),
8845
8873
  section_box_enabled: E.boolean().optional().default(!1)
8846
- }), wd = E.object({
8874
+ }), Ed = E.object({
8847
8875
  duration: E.number().default(1e3),
8848
8876
  // milliseconds
8849
8877
  easing: E.string().default("linear")
8850
8878
  // 'linear' | 'ease-in-out' etc.
8851
- }), Xn = E.object({
8879
+ }), $n = E.object({
8852
8880
  version: E.string().default("1.0.0"),
8853
8881
  title: E.string(),
8854
8882
  description: E.string().optional(),
8855
- slides: E.array(ts).min(1, "Story must have at least one slide"),
8883
+ slides: E.array(ns).min(1, "Story must have at least one slide"),
8856
8884
  // Optional: default transition settings (for future transitions)
8857
- transition: wd.optional()
8885
+ transition: Ed.optional()
8858
8886
  });
8859
8887
  /*! @license DOMPurify 3.3.0 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.3.0/LICENSE */
8860
8888
  const {
8861
- entries: lo,
8862
- setPrototypeOf: Er,
8863
- isFrozen: Ed,
8864
- getPrototypeOf: Ad,
8865
- getOwnPropertyDescriptor: Td
8889
+ entries: uo,
8890
+ setPrototypeOf: Ar,
8891
+ isFrozen: Ad,
8892
+ getPrototypeOf: Td,
8893
+ getOwnPropertyDescriptor: Sd
8866
8894
  } = Object;
8867
8895
  let {
8868
8896
  freeze: Ae,
8869
8897
  seal: ze,
8870
- create: li
8898
+ create: di
8871
8899
  } = Object, {
8872
- apply: di,
8873
- construct: ui
8900
+ apply: ui,
8901
+ construct: hi
8874
8902
  } = typeof Reflect < "u" && Reflect;
8875
8903
  Ae || (Ae = function(e) {
8876
8904
  return e;
@@ -8878,41 +8906,41 @@ Ae || (Ae = function(e) {
8878
8906
  ze || (ze = function(e) {
8879
8907
  return e;
8880
8908
  });
8881
- di || (di = function(e, t) {
8909
+ ui || (ui = function(e, t) {
8882
8910
  for (var n = arguments.length, s = new Array(n > 2 ? n - 2 : 0), i = 2; i < n; i++)
8883
8911
  s[i - 2] = arguments[i];
8884
8912
  return e.apply(t, s);
8885
8913
  });
8886
- ui || (ui = function(e) {
8914
+ hi || (hi = function(e) {
8887
8915
  for (var t = arguments.length, n = new Array(t > 1 ? t - 1 : 0), s = 1; s < t; s++)
8888
8916
  n[s - 1] = arguments[s];
8889
8917
  return new e(...n);
8890
8918
  });
8891
- const $n = Te(Array.prototype.forEach), Sd = Te(Array.prototype.lastIndexOf), Ar = Te(Array.prototype.pop), nn = Te(Array.prototype.push), Rd = Te(Array.prototype.splice), ns = Te(String.prototype.toLowerCase), Hs = Te(String.prototype.toString), Vs = Te(String.prototype.match), sn = Te(String.prototype.replace), Md = Te(String.prototype.indexOf), Ld = Te(String.prototype.trim), Fe = Te(Object.prototype.hasOwnProperty), we = Te(RegExp.prototype.test), rn = Cd(TypeError);
8919
+ const Yn = Te(Array.prototype.forEach), Rd = Te(Array.prototype.lastIndexOf), Tr = Te(Array.prototype.pop), nn = Te(Array.prototype.push), Md = Te(Array.prototype.splice), ss = Te(String.prototype.toLowerCase), Vs = Te(String.prototype.toString), Gs = Te(String.prototype.match), sn = Te(String.prototype.replace), Ld = Te(String.prototype.indexOf), kd = Te(String.prototype.trim), Fe = Te(Object.prototype.hasOwnProperty), we = Te(RegExp.prototype.test), rn = Cd(TypeError);
8892
8920
  function Te(r) {
8893
8921
  return function(e) {
8894
8922
  e instanceof RegExp && (e.lastIndex = 0);
8895
8923
  for (var t = arguments.length, n = new Array(t > 1 ? t - 1 : 0), s = 1; s < t; s++)
8896
8924
  n[s - 1] = arguments[s];
8897
- return di(r, e, n);
8925
+ return ui(r, e, n);
8898
8926
  };
8899
8927
  }
8900
8928
  function Cd(r) {
8901
8929
  return function() {
8902
8930
  for (var e = arguments.length, t = new Array(e), n = 0; n < e; n++)
8903
8931
  t[n] = arguments[n];
8904
- return ui(r, t);
8932
+ return hi(r, t);
8905
8933
  };
8906
8934
  }
8907
8935
  function Y(r, e) {
8908
- let t = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : ns;
8909
- Er && Er(r, null);
8936
+ let t = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : ss;
8937
+ Ar && Ar(r, null);
8910
8938
  let n = e.length;
8911
8939
  for (; n--; ) {
8912
8940
  let s = e[n];
8913
8941
  if (typeof s == "string") {
8914
8942
  const i = t(s);
8915
- i !== s && (Ed(e) || (e[n] = i), s = i);
8943
+ i !== s && (Ad(e) || (e[n] = i), s = i);
8916
8944
  }
8917
8945
  r[s] = !0;
8918
8946
  }
@@ -8924,46 +8952,46 @@ function Od(r) {
8924
8952
  return r;
8925
8953
  }
8926
8954
  function st(r) {
8927
- const e = li(null);
8928
- for (const [t, n] of lo(r))
8955
+ const e = di(null);
8956
+ for (const [t, n] of uo(r))
8929
8957
  Fe(r, t) && (Array.isArray(n) ? e[t] = Od(n) : n && typeof n == "object" && n.constructor === Object ? e[t] = st(n) : e[t] = n);
8930
8958
  return e;
8931
8959
  }
8932
8960
  function on(r, e) {
8933
8961
  for (; r !== null; ) {
8934
- const n = Td(r, e);
8962
+ const n = Sd(r, e);
8935
8963
  if (n) {
8936
8964
  if (n.get)
8937
8965
  return Te(n.get);
8938
8966
  if (typeof n.value == "function")
8939
8967
  return Te(n.value);
8940
8968
  }
8941
- r = Ad(r);
8969
+ r = Td(r);
8942
8970
  }
8943
8971
  function t() {
8944
8972
  return null;
8945
8973
  }
8946
8974
  return t;
8947
8975
  }
8948
- const Tr = Ae(["a", "abbr", "acronym", "address", "area", "article", "aside", "audio", "b", "bdi", "bdo", "big", "blink", "blockquote", "body", "br", "button", "canvas", "caption", "center", "cite", "code", "col", "colgroup", "content", "data", "datalist", "dd", "decorator", "del", "details", "dfn", "dialog", "dir", "div", "dl", "dt", "element", "em", "fieldset", "figcaption", "figure", "font", "footer", "form", "h1", "h2", "h3", "h4", "h5", "h6", "head", "header", "hgroup", "hr", "html", "i", "img", "input", "ins", "kbd", "label", "legend", "li", "main", "map", "mark", "marquee", "menu", "menuitem", "meter", "nav", "nobr", "ol", "optgroup", "option", "output", "p", "picture", "pre", "progress", "q", "rp", "rt", "ruby", "s", "samp", "search", "section", "select", "shadow", "slot", "small", "source", "spacer", "span", "strike", "strong", "style", "sub", "summary", "sup", "table", "tbody", "td", "template", "textarea", "tfoot", "th", "thead", "time", "tr", "track", "tt", "u", "ul", "var", "video", "wbr"]), Gs = Ae(["svg", "a", "altglyph", "altglyphdef", "altglyphitem", "animatecolor", "animatemotion", "animatetransform", "circle", "clippath", "defs", "desc", "ellipse", "enterkeyhint", "exportparts", "filter", "font", "g", "glyph", "glyphref", "hkern", "image", "inputmode", "line", "lineargradient", "marker", "mask", "metadata", "mpath", "part", "path", "pattern", "polygon", "polyline", "radialgradient", "rect", "stop", "style", "switch", "symbol", "text", "textpath", "title", "tref", "tspan", "view", "vkern"]), Zs = Ae(["feBlend", "feColorMatrix", "feComponentTransfer", "feComposite", "feConvolveMatrix", "feDiffuseLighting", "feDisplacementMap", "feDistantLight", "feDropShadow", "feFlood", "feFuncA", "feFuncB", "feFuncG", "feFuncR", "feGaussianBlur", "feImage", "feMerge", "feMergeNode", "feMorphology", "feOffset", "fePointLight", "feSpecularLighting", "feSpotLight", "feTile", "feTurbulence"]), kd = Ae(["animate", "color-profile", "cursor", "discard", "font-face", "font-face-format", "font-face-name", "font-face-src", "font-face-uri", "foreignobject", "hatch", "hatchpath", "mesh", "meshgradient", "meshpatch", "meshrow", "missing-glyph", "script", "set", "solidcolor", "unknown", "use"]), Ws = Ae(["math", "menclose", "merror", "mfenced", "mfrac", "mglyph", "mi", "mlabeledtr", "mmultiscripts", "mn", "mo", "mover", "mpadded", "mphantom", "mroot", "mrow", "ms", "mspace", "msqrt", "mstyle", "msub", "msup", "msubsup", "mtable", "mtd", "mtext", "mtr", "munder", "munderover", "mprescripts"]), Dd = Ae(["maction", "maligngroup", "malignmark", "mlongdiv", "mscarries", "mscarry", "msgroup", "mstack", "msline", "msrow", "semantics", "annotation", "annotation-xml", "mprescripts", "none"]), Sr = Ae(["#text"]), Rr = Ae(["accept", "action", "align", "alt", "autocapitalize", "autocomplete", "autopictureinpicture", "autoplay", "background", "bgcolor", "border", "capture", "cellpadding", "cellspacing", "checked", "cite", "class", "clear", "color", "cols", "colspan", "controls", "controlslist", "coords", "crossorigin", "datetime", "decoding", "default", "dir", "disabled", "disablepictureinpicture", "disableremoteplayback", "download", "draggable", "enctype", "enterkeyhint", "exportparts", "face", "for", "headers", "height", "hidden", "high", "href", "hreflang", "id", "inert", "inputmode", "integrity", "ismap", "kind", "label", "lang", "list", "loading", "loop", "low", "max", "maxlength", "media", "method", "min", "minlength", "multiple", "muted", "name", "nonce", "noshade", "novalidate", "nowrap", "open", "optimum", "part", "pattern", "placeholder", "playsinline", "popover", "popovertarget", "popovertargetaction", "poster", "preload", "pubdate", "radiogroup", "readonly", "rel", "required", "rev", "reversed", "role", "rows", "rowspan", "spellcheck", "scope", "selected", "shape", "size", "sizes", "slot", "span", "srclang", "start", "src", "srcset", "step", "style", "summary", "tabindex", "title", "translate", "type", "usemap", "valign", "value", "width", "wrap", "xmlns", "slot"]), Xs = Ae(["accent-height", "accumulate", "additive", "alignment-baseline", "amplitude", "ascent", "attributename", "attributetype", "azimuth", "basefrequency", "baseline-shift", "begin", "bias", "by", "class", "clip", "clippathunits", "clip-path", "clip-rule", "color", "color-interpolation", "color-interpolation-filters", "color-profile", "color-rendering", "cx", "cy", "d", "dx", "dy", "diffuseconstant", "direction", "display", "divisor", "dur", "edgemode", "elevation", "end", "exponent", "fill", "fill-opacity", "fill-rule", "filter", "filterunits", "flood-color", "flood-opacity", "font-family", "font-size", "font-size-adjust", "font-stretch", "font-style", "font-variant", "font-weight", "fx", "fy", "g1", "g2", "glyph-name", "glyphref", "gradientunits", "gradienttransform", "height", "href", "id", "image-rendering", "in", "in2", "intercept", "k", "k1", "k2", "k3", "k4", "kerning", "keypoints", "keysplines", "keytimes", "lang", "lengthadjust", "letter-spacing", "kernelmatrix", "kernelunitlength", "lighting-color", "local", "marker-end", "marker-mid", "marker-start", "markerheight", "markerunits", "markerwidth", "maskcontentunits", "maskunits", "max", "mask", "mask-type", "media", "method", "mode", "min", "name", "numoctaves", "offset", "operator", "opacity", "order", "orient", "orientation", "origin", "overflow", "paint-order", "path", "pathlength", "patterncontentunits", "patterntransform", "patternunits", "points", "preservealpha", "preserveaspectratio", "primitiveunits", "r", "rx", "ry", "radius", "refx", "refy", "repeatcount", "repeatdur", "restart", "result", "rotate", "scale", "seed", "shape-rendering", "slope", "specularconstant", "specularexponent", "spreadmethod", "startoffset", "stddeviation", "stitchtiles", "stop-color", "stop-opacity", "stroke-dasharray", "stroke-dashoffset", "stroke-linecap", "stroke-linejoin", "stroke-miterlimit", "stroke-opacity", "stroke", "stroke-width", "style", "surfacescale", "systemlanguage", "tabindex", "tablevalues", "targetx", "targety", "transform", "transform-origin", "text-anchor", "text-decoration", "text-rendering", "textlength", "type", "u1", "u2", "unicode", "values", "viewbox", "visibility", "version", "vert-adv-y", "vert-origin-x", "vert-origin-y", "width", "word-spacing", "wrap", "writing-mode", "xchannelselector", "ychannelselector", "x", "x1", "x2", "xmlns", "y", "y1", "y2", "z", "zoomandpan"]), Mr = Ae(["accent", "accentunder", "align", "bevelled", "close", "columnsalign", "columnlines", "columnspan", "denomalign", "depth", "dir", "display", "displaystyle", "encoding", "fence", "frame", "height", "href", "id", "largeop", "length", "linethickness", "lspace", "lquote", "mathbackground", "mathcolor", "mathsize", "mathvariant", "maxsize", "minsize", "movablelimits", "notation", "numalign", "open", "rowalign", "rowlines", "rowspacing", "rowspan", "rspace", "rquote", "scriptlevel", "scriptminsize", "scriptsizemultiplier", "selection", "separator", "separators", "stretchy", "subscriptshift", "supscriptshift", "symmetric", "voffset", "width", "xmlns"]), Yn = Ae(["xlink:href", "xml:id", "xlink:title", "xml:space", "xmlns:xlink"]), Id = ze(/\{\{[\w\W]*|[\w\W]*\}\}/gm), Nd = ze(/<%[\w\W]*|[\w\W]*%>/gm), Pd = ze(/\$\{[\w\W]*/gm), zd = ze(/^data-[\-\w.\u00B7-\uFFFF]+$/), Ud = ze(/^aria-[\-\w]+$/), uo = ze(
8976
+ const Sr = Ae(["a", "abbr", "acronym", "address", "area", "article", "aside", "audio", "b", "bdi", "bdo", "big", "blink", "blockquote", "body", "br", "button", "canvas", "caption", "center", "cite", "code", "col", "colgroup", "content", "data", "datalist", "dd", "decorator", "del", "details", "dfn", "dialog", "dir", "div", "dl", "dt", "element", "em", "fieldset", "figcaption", "figure", "font", "footer", "form", "h1", "h2", "h3", "h4", "h5", "h6", "head", "header", "hgroup", "hr", "html", "i", "img", "input", "ins", "kbd", "label", "legend", "li", "main", "map", "mark", "marquee", "menu", "menuitem", "meter", "nav", "nobr", "ol", "optgroup", "option", "output", "p", "picture", "pre", "progress", "q", "rp", "rt", "ruby", "s", "samp", "search", "section", "select", "shadow", "slot", "small", "source", "spacer", "span", "strike", "strong", "style", "sub", "summary", "sup", "table", "tbody", "td", "template", "textarea", "tfoot", "th", "thead", "time", "tr", "track", "tt", "u", "ul", "var", "video", "wbr"]), Zs = Ae(["svg", "a", "altglyph", "altglyphdef", "altglyphitem", "animatecolor", "animatemotion", "animatetransform", "circle", "clippath", "defs", "desc", "ellipse", "enterkeyhint", "exportparts", "filter", "font", "g", "glyph", "glyphref", "hkern", "image", "inputmode", "line", "lineargradient", "marker", "mask", "metadata", "mpath", "part", "path", "pattern", "polygon", "polyline", "radialgradient", "rect", "stop", "style", "switch", "symbol", "text", "textpath", "title", "tref", "tspan", "view", "vkern"]), Ws = Ae(["feBlend", "feColorMatrix", "feComponentTransfer", "feComposite", "feConvolveMatrix", "feDiffuseLighting", "feDisplacementMap", "feDistantLight", "feDropShadow", "feFlood", "feFuncA", "feFuncB", "feFuncG", "feFuncR", "feGaussianBlur", "feImage", "feMerge", "feMergeNode", "feMorphology", "feOffset", "fePointLight", "feSpecularLighting", "feSpotLight", "feTile", "feTurbulence"]), Dd = Ae(["animate", "color-profile", "cursor", "discard", "font-face", "font-face-format", "font-face-name", "font-face-src", "font-face-uri", "foreignobject", "hatch", "hatchpath", "mesh", "meshgradient", "meshpatch", "meshrow", "missing-glyph", "script", "set", "solidcolor", "unknown", "use"]), Xs = Ae(["math", "menclose", "merror", "mfenced", "mfrac", "mglyph", "mi", "mlabeledtr", "mmultiscripts", "mn", "mo", "mover", "mpadded", "mphantom", "mroot", "mrow", "ms", "mspace", "msqrt", "mstyle", "msub", "msup", "msubsup", "mtable", "mtd", "mtext", "mtr", "munder", "munderover", "mprescripts"]), Id = Ae(["maction", "maligngroup", "malignmark", "mlongdiv", "mscarries", "mscarry", "msgroup", "mstack", "msline", "msrow", "semantics", "annotation", "annotation-xml", "mprescripts", "none"]), Rr = Ae(["#text"]), Mr = Ae(["accept", "action", "align", "alt", "autocapitalize", "autocomplete", "autopictureinpicture", "autoplay", "background", "bgcolor", "border", "capture", "cellpadding", "cellspacing", "checked", "cite", "class", "clear", "color", "cols", "colspan", "controls", "controlslist", "coords", "crossorigin", "datetime", "decoding", "default", "dir", "disabled", "disablepictureinpicture", "disableremoteplayback", "download", "draggable", "enctype", "enterkeyhint", "exportparts", "face", "for", "headers", "height", "hidden", "high", "href", "hreflang", "id", "inert", "inputmode", "integrity", "ismap", "kind", "label", "lang", "list", "loading", "loop", "low", "max", "maxlength", "media", "method", "min", "minlength", "multiple", "muted", "name", "nonce", "noshade", "novalidate", "nowrap", "open", "optimum", "part", "pattern", "placeholder", "playsinline", "popover", "popovertarget", "popovertargetaction", "poster", "preload", "pubdate", "radiogroup", "readonly", "rel", "required", "rev", "reversed", "role", "rows", "rowspan", "spellcheck", "scope", "selected", "shape", "size", "sizes", "slot", "span", "srclang", "start", "src", "srcset", "step", "style", "summary", "tabindex", "title", "translate", "type", "usemap", "valign", "value", "width", "wrap", "xmlns", "slot"]), $s = Ae(["accent-height", "accumulate", "additive", "alignment-baseline", "amplitude", "ascent", "attributename", "attributetype", "azimuth", "basefrequency", "baseline-shift", "begin", "bias", "by", "class", "clip", "clippathunits", "clip-path", "clip-rule", "color", "color-interpolation", "color-interpolation-filters", "color-profile", "color-rendering", "cx", "cy", "d", "dx", "dy", "diffuseconstant", "direction", "display", "divisor", "dur", "edgemode", "elevation", "end", "exponent", "fill", "fill-opacity", "fill-rule", "filter", "filterunits", "flood-color", "flood-opacity", "font-family", "font-size", "font-size-adjust", "font-stretch", "font-style", "font-variant", "font-weight", "fx", "fy", "g1", "g2", "glyph-name", "glyphref", "gradientunits", "gradienttransform", "height", "href", "id", "image-rendering", "in", "in2", "intercept", "k", "k1", "k2", "k3", "k4", "kerning", "keypoints", "keysplines", "keytimes", "lang", "lengthadjust", "letter-spacing", "kernelmatrix", "kernelunitlength", "lighting-color", "local", "marker-end", "marker-mid", "marker-start", "markerheight", "markerunits", "markerwidth", "maskcontentunits", "maskunits", "max", "mask", "mask-type", "media", "method", "mode", "min", "name", "numoctaves", "offset", "operator", "opacity", "order", "orient", "orientation", "origin", "overflow", "paint-order", "path", "pathlength", "patterncontentunits", "patterntransform", "patternunits", "points", "preservealpha", "preserveaspectratio", "primitiveunits", "r", "rx", "ry", "radius", "refx", "refy", "repeatcount", "repeatdur", "restart", "result", "rotate", "scale", "seed", "shape-rendering", "slope", "specularconstant", "specularexponent", "spreadmethod", "startoffset", "stddeviation", "stitchtiles", "stop-color", "stop-opacity", "stroke-dasharray", "stroke-dashoffset", "stroke-linecap", "stroke-linejoin", "stroke-miterlimit", "stroke-opacity", "stroke", "stroke-width", "style", "surfacescale", "systemlanguage", "tabindex", "tablevalues", "targetx", "targety", "transform", "transform-origin", "text-anchor", "text-decoration", "text-rendering", "textlength", "type", "u1", "u2", "unicode", "values", "viewbox", "visibility", "version", "vert-adv-y", "vert-origin-x", "vert-origin-y", "width", "word-spacing", "wrap", "writing-mode", "xchannelselector", "ychannelselector", "x", "x1", "x2", "xmlns", "y", "y1", "y2", "z", "zoomandpan"]), Lr = Ae(["accent", "accentunder", "align", "bevelled", "close", "columnsalign", "columnlines", "columnspan", "denomalign", "depth", "dir", "display", "displaystyle", "encoding", "fence", "frame", "height", "href", "id", "largeop", "length", "linethickness", "lspace", "lquote", "mathbackground", "mathcolor", "mathsize", "mathvariant", "maxsize", "minsize", "movablelimits", "notation", "numalign", "open", "rowalign", "rowlines", "rowspacing", "rowspan", "rspace", "rquote", "scriptlevel", "scriptminsize", "scriptsizemultiplier", "selection", "separator", "separators", "stretchy", "subscriptshift", "supscriptshift", "symmetric", "voffset", "width", "xmlns"]), Kn = Ae(["xlink:href", "xml:id", "xlink:title", "xml:space", "xmlns:xlink"]), Nd = ze(/\{\{[\w\W]*|[\w\W]*\}\}/gm), Pd = ze(/<%[\w\W]*|[\w\W]*%>/gm), zd = ze(/\$\{[\w\W]*/gm), Ud = ze(/^data-[\-\w.\u00B7-\uFFFF]+$/), Fd = ze(/^aria-[\-\w]+$/), ho = ze(
8949
8977
  /^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i
8950
8978
  // eslint-disable-line no-useless-escape
8951
- ), Fd = ze(/^(?:\w+script|data):/i), jd = ze(
8979
+ ), jd = ze(/^(?:\w+script|data):/i), Bd = ze(
8952
8980
  /[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g
8953
8981
  // eslint-disable-line no-control-regex
8954
- ), ho = ze(/^html$/i), Bd = ze(/^[a-z][.\w]*(-[.\w]+)+$/i);
8955
- var Lr = /* @__PURE__ */ Object.freeze({
8982
+ ), fo = ze(/^html$/i), Hd = ze(/^[a-z][.\w]*(-[.\w]+)+$/i);
8983
+ var kr = /* @__PURE__ */ Object.freeze({
8956
8984
  __proto__: null,
8957
- ARIA_ATTR: Ud,
8958
- ATTR_WHITESPACE: jd,
8959
- CUSTOM_ELEMENT: Bd,
8960
- DATA_ATTR: zd,
8961
- DOCTYPE_NAME: ho,
8962
- ERB_EXPR: Nd,
8963
- IS_ALLOWED_URI: uo,
8964
- IS_SCRIPT_OR_DATA: Fd,
8965
- MUSTACHE_EXPR: Id,
8966
- TMPLIT_EXPR: Pd
8985
+ ARIA_ATTR: Fd,
8986
+ ATTR_WHITESPACE: Bd,
8987
+ CUSTOM_ELEMENT: Hd,
8988
+ DATA_ATTR: Ud,
8989
+ DOCTYPE_NAME: fo,
8990
+ ERB_EXPR: Pd,
8991
+ IS_ALLOWED_URI: ho,
8992
+ IS_SCRIPT_OR_DATA: jd,
8993
+ MUSTACHE_EXPR: Nd,
8994
+ TMPLIT_EXPR: zd
8967
8995
  });
8968
8996
  const an = {
8969
8997
  element: 1,
@@ -8972,9 +9000,9 @@ const an = {
8972
9000
  progressingInstruction: 7,
8973
9001
  comment: 8,
8974
9002
  document: 9
8975
- }, Hd = function() {
9003
+ }, Vd = function() {
8976
9004
  return typeof window > "u" ? null : window;
8977
- }, Vd = function(e, t) {
9005
+ }, Gd = function(e, t) {
8978
9006
  if (typeof e != "object" || typeof e.createPolicy != "function")
8979
9007
  return null;
8980
9008
  let n = null;
@@ -9006,9 +9034,9 @@ const an = {
9006
9034
  uponSanitizeShadowNode: []
9007
9035
  };
9008
9036
  };
9009
- function fo() {
9010
- let r = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : Hd();
9011
- const e = (U) => fo(U);
9037
+ function mo() {
9038
+ let r = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : Vd();
9039
+ const e = (U) => mo(U);
9012
9040
  if (e.version = "3.3.0", e.removed = [], !r || !r.document || r.document.nodeType !== an.document || !r.Element)
9013
9041
  return e.isSupported = !1, e;
9014
9042
  let {
@@ -9036,27 +9064,27 @@ function fo() {
9036
9064
  createDocumentFragment: L,
9037
9065
  getElementsByTagName: R
9038
9066
  } = t, {
9039
- importNode: O
9067
+ importNode: C
9040
9068
  } = n;
9041
9069
  let N = Cr();
9042
- e.isSupported = typeof lo == "function" && typeof T == "function" && V && V.createHTMLDocument !== void 0;
9070
+ e.isSupported = typeof uo == "function" && typeof T == "function" && V && V.createHTMLDocument !== void 0;
9043
9071
  const {
9044
9072
  MUSTACHE_EXPR: G,
9045
9073
  ERB_EXPR: Z,
9046
- TMPLIT_EXPR: k,
9074
+ TMPLIT_EXPR: O,
9047
9075
  DATA_ATTR: ee,
9048
9076
  ARIA_ATTR: $,
9049
9077
  IS_SCRIPT_OR_DATA: be,
9050
9078
  ATTR_WHITESPACE: le,
9051
9079
  CUSTOM_ELEMENT: Ue
9052
- } = Lr;
9080
+ } = kr;
9053
9081
  let {
9054
9082
  IS_ALLOWED_URI: Se
9055
- } = Lr, ne = null;
9056
- const ue = Y({}, [...Tr, ...Gs, ...Zs, ...Ws, ...Sr]);
9083
+ } = kr, ne = null;
9084
+ const ue = Y({}, [...Sr, ...Zs, ...Ws, ...Xs, ...Rr]);
9057
9085
  let Q = null;
9058
- const ut = Y({}, [...Rr, ...Xs, ...Mr, ...Yn]);
9059
- let z = Object.seal(li(null, {
9086
+ const ut = Y({}, [...Mr, ...$s, ...Lr, ...Kn]);
9087
+ let z = Object.seal(di(null, {
9060
9088
  tagNameCheck: {
9061
9089
  writable: !0,
9062
9090
  configurable: !1,
@@ -9075,8 +9103,8 @@ function fo() {
9075
9103
  enumerable: !0,
9076
9104
  value: !1
9077
9105
  }
9078
- })), Re = null, Ct = null;
9079
- const Je = Object.seal(li(null, {
9106
+ })), Re = null, kt = null;
9107
+ const Je = Object.seal(di(null, {
9080
9108
  tagCheck: {
9081
9109
  writable: !0,
9082
9110
  configurable: !1,
@@ -9090,45 +9118,45 @@ function fo() {
9090
9118
  value: null
9091
9119
  }
9092
9120
  }));
9093
- let gs = !0, ys = !0, Li = !1, Ci = !0, Ot = !1, Nn = !0, vt = !1, vs = !1, xs = !1, kt = !1, Pn = !1, zn = !1, Oi = !0, ki = !1;
9094
- const vo = "user-content-";
9121
+ let gs = !0, ys = !0, ki = !1, Ci = !0, Ct = !1, Pn = !0, vt = !1, vs = !1, xs = !1, Ot = !1, zn = !1, Un = !1, Oi = !0, Di = !1;
9122
+ const xo = "user-content-";
9095
9123
  let bs = !0, Qt = !1, Dt = {}, It = null;
9096
- const Di = Y({}, ["annotation-xml", "audio", "colgroup", "desc", "foreignobject", "head", "iframe", "math", "mi", "mn", "mo", "ms", "mtext", "noembed", "noframes", "noscript", "plaintext", "script", "style", "svg", "template", "thead", "title", "video", "xmp"]);
9097
- let Ii = null;
9098
- const Ni = Y({}, ["audio", "video", "img", "source", "image", "track"]);
9124
+ const Ii = Y({}, ["annotation-xml", "audio", "colgroup", "desc", "foreignobject", "head", "iframe", "math", "mi", "mn", "mo", "ms", "mtext", "noembed", "noframes", "noscript", "plaintext", "script", "style", "svg", "template", "thead", "title", "video", "xmp"]);
9125
+ let Ni = null;
9126
+ const Pi = Y({}, ["audio", "video", "img", "source", "image", "track"]);
9099
9127
  let ws = null;
9100
- const Pi = Y({}, ["alt", "class", "for", "id", "label", "name", "pattern", "placeholder", "role", "summary", "title", "value", "style", "xmlns"]), Un = "http://www.w3.org/1998/Math/MathML", Fn = "http://www.w3.org/2000/svg", Qe = "http://www.w3.org/1999/xhtml";
9128
+ const zi = Y({}, ["alt", "class", "for", "id", "label", "name", "pattern", "placeholder", "role", "summary", "title", "value", "style", "xmlns"]), Fn = "http://www.w3.org/1998/Math/MathML", jn = "http://www.w3.org/2000/svg", Qe = "http://www.w3.org/1999/xhtml";
9101
9129
  let Nt = Qe, Es = !1, As = null;
9102
- const xo = Y({}, [Un, Fn, Qe], Hs);
9103
- let jn = Y({}, ["mi", "mo", "mn", "ms", "mtext"]), Bn = Y({}, ["annotation-xml"]);
9104
- const bo = Y({}, ["title", "style", "font", "a", "script"]);
9130
+ const bo = Y({}, [Fn, jn, Qe], Vs);
9131
+ let Bn = Y({}, ["mi", "mo", "mn", "ms", "mtext"]), Hn = Y({}, ["annotation-xml"]);
9132
+ const wo = Y({}, ["title", "style", "font", "a", "script"]);
9105
9133
  let en = null;
9106
- const wo = ["application/xhtml+xml", "text/html"], Eo = "text/html";
9134
+ const Eo = ["application/xhtml+xml", "text/html"], Ao = "text/html";
9107
9135
  let de = null, Pt = null;
9108
- const Ao = t.createElement("form"), zi = function(m) {
9136
+ const To = t.createElement("form"), Ui = function(m) {
9109
9137
  return m instanceof RegExp || m instanceof Function;
9110
9138
  }, Ts = function() {
9111
9139
  let m = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
9112
9140
  if (!(Pt && Pt === m)) {
9113
9141
  if ((!m || typeof m != "object") && (m = {}), m = st(m), en = // eslint-disable-next-line unicorn/prefer-includes
9114
- wo.indexOf(m.PARSER_MEDIA_TYPE) === -1 ? Eo : m.PARSER_MEDIA_TYPE, de = en === "application/xhtml+xml" ? Hs : ns, ne = Fe(m, "ALLOWED_TAGS") ? Y({}, m.ALLOWED_TAGS, de) : ue, Q = Fe(m, "ALLOWED_ATTR") ? Y({}, m.ALLOWED_ATTR, de) : ut, As = Fe(m, "ALLOWED_NAMESPACES") ? Y({}, m.ALLOWED_NAMESPACES, Hs) : xo, ws = Fe(m, "ADD_URI_SAFE_ATTR") ? Y(st(Pi), m.ADD_URI_SAFE_ATTR, de) : Pi, Ii = Fe(m, "ADD_DATA_URI_TAGS") ? Y(st(Ni), m.ADD_DATA_URI_TAGS, de) : Ni, It = Fe(m, "FORBID_CONTENTS") ? Y({}, m.FORBID_CONTENTS, de) : Di, Re = Fe(m, "FORBID_TAGS") ? Y({}, m.FORBID_TAGS, de) : st({}), Ct = Fe(m, "FORBID_ATTR") ? Y({}, m.FORBID_ATTR, de) : st({}), Dt = Fe(m, "USE_PROFILES") ? m.USE_PROFILES : !1, gs = m.ALLOW_ARIA_ATTR !== !1, ys = m.ALLOW_DATA_ATTR !== !1, Li = m.ALLOW_UNKNOWN_PROTOCOLS || !1, Ci = m.ALLOW_SELF_CLOSE_IN_ATTR !== !1, Ot = m.SAFE_FOR_TEMPLATES || !1, Nn = m.SAFE_FOR_XML !== !1, vt = m.WHOLE_DOCUMENT || !1, kt = m.RETURN_DOM || !1, Pn = m.RETURN_DOM_FRAGMENT || !1, zn = m.RETURN_TRUSTED_TYPE || !1, xs = m.FORCE_BODY || !1, Oi = m.SANITIZE_DOM !== !1, ki = m.SANITIZE_NAMED_PROPS || !1, bs = m.KEEP_CONTENT !== !1, Qt = m.IN_PLACE || !1, Se = m.ALLOWED_URI_REGEXP || uo, Nt = m.NAMESPACE || Qe, jn = m.MATHML_TEXT_INTEGRATION_POINTS || jn, Bn = m.HTML_INTEGRATION_POINTS || Bn, z = m.CUSTOM_ELEMENT_HANDLING || {}, m.CUSTOM_ELEMENT_HANDLING && zi(m.CUSTOM_ELEMENT_HANDLING.tagNameCheck) && (z.tagNameCheck = m.CUSTOM_ELEMENT_HANDLING.tagNameCheck), m.CUSTOM_ELEMENT_HANDLING && zi(m.CUSTOM_ELEMENT_HANDLING.attributeNameCheck) && (z.attributeNameCheck = m.CUSTOM_ELEMENT_HANDLING.attributeNameCheck), m.CUSTOM_ELEMENT_HANDLING && typeof m.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements == "boolean" && (z.allowCustomizedBuiltInElements = m.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements), Ot && (ys = !1), Pn && (kt = !0), Dt && (ne = Y({}, Sr), Q = [], Dt.html === !0 && (Y(ne, Tr), Y(Q, Rr)), Dt.svg === !0 && (Y(ne, Gs), Y(Q, Xs), Y(Q, Yn)), Dt.svgFilters === !0 && (Y(ne, Zs), Y(Q, Xs), Y(Q, Yn)), Dt.mathMl === !0 && (Y(ne, Ws), Y(Q, Mr), Y(Q, Yn))), m.ADD_TAGS && (typeof m.ADD_TAGS == "function" ? Je.tagCheck = m.ADD_TAGS : (ne === ue && (ne = st(ne)), Y(ne, m.ADD_TAGS, de))), m.ADD_ATTR && (typeof m.ADD_ATTR == "function" ? Je.attributeCheck = m.ADD_ATTR : (Q === ut && (Q = st(Q)), Y(Q, m.ADD_ATTR, de))), m.ADD_URI_SAFE_ATTR && Y(ws, m.ADD_URI_SAFE_ATTR, de), m.FORBID_CONTENTS && (It === Di && (It = st(It)), Y(It, m.FORBID_CONTENTS, de)), bs && (ne["#text"] = !0), vt && Y(ne, ["html", "head", "body"]), ne.table && (Y(ne, ["tbody"]), delete Re.tbody), m.TRUSTED_TYPES_POLICY) {
9142
+ Eo.indexOf(m.PARSER_MEDIA_TYPE) === -1 ? Ao : m.PARSER_MEDIA_TYPE, de = en === "application/xhtml+xml" ? Vs : ss, ne = Fe(m, "ALLOWED_TAGS") ? Y({}, m.ALLOWED_TAGS, de) : ue, Q = Fe(m, "ALLOWED_ATTR") ? Y({}, m.ALLOWED_ATTR, de) : ut, As = Fe(m, "ALLOWED_NAMESPACES") ? Y({}, m.ALLOWED_NAMESPACES, Vs) : bo, ws = Fe(m, "ADD_URI_SAFE_ATTR") ? Y(st(zi), m.ADD_URI_SAFE_ATTR, de) : zi, Ni = Fe(m, "ADD_DATA_URI_TAGS") ? Y(st(Pi), m.ADD_DATA_URI_TAGS, de) : Pi, It = Fe(m, "FORBID_CONTENTS") ? Y({}, m.FORBID_CONTENTS, de) : Ii, Re = Fe(m, "FORBID_TAGS") ? Y({}, m.FORBID_TAGS, de) : st({}), kt = Fe(m, "FORBID_ATTR") ? Y({}, m.FORBID_ATTR, de) : st({}), Dt = Fe(m, "USE_PROFILES") ? m.USE_PROFILES : !1, gs = m.ALLOW_ARIA_ATTR !== !1, ys = m.ALLOW_DATA_ATTR !== !1, ki = m.ALLOW_UNKNOWN_PROTOCOLS || !1, Ci = m.ALLOW_SELF_CLOSE_IN_ATTR !== !1, Ct = m.SAFE_FOR_TEMPLATES || !1, Pn = m.SAFE_FOR_XML !== !1, vt = m.WHOLE_DOCUMENT || !1, Ot = m.RETURN_DOM || !1, zn = m.RETURN_DOM_FRAGMENT || !1, Un = m.RETURN_TRUSTED_TYPE || !1, xs = m.FORCE_BODY || !1, Oi = m.SANITIZE_DOM !== !1, Di = m.SANITIZE_NAMED_PROPS || !1, bs = m.KEEP_CONTENT !== !1, Qt = m.IN_PLACE || !1, Se = m.ALLOWED_URI_REGEXP || ho, Nt = m.NAMESPACE || Qe, Bn = m.MATHML_TEXT_INTEGRATION_POINTS || Bn, Hn = m.HTML_INTEGRATION_POINTS || Hn, z = m.CUSTOM_ELEMENT_HANDLING || {}, m.CUSTOM_ELEMENT_HANDLING && Ui(m.CUSTOM_ELEMENT_HANDLING.tagNameCheck) && (z.tagNameCheck = m.CUSTOM_ELEMENT_HANDLING.tagNameCheck), m.CUSTOM_ELEMENT_HANDLING && Ui(m.CUSTOM_ELEMENT_HANDLING.attributeNameCheck) && (z.attributeNameCheck = m.CUSTOM_ELEMENT_HANDLING.attributeNameCheck), m.CUSTOM_ELEMENT_HANDLING && typeof m.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements == "boolean" && (z.allowCustomizedBuiltInElements = m.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements), Ct && (ys = !1), zn && (Ot = !0), Dt && (ne = Y({}, Rr), Q = [], Dt.html === !0 && (Y(ne, Sr), Y(Q, Mr)), Dt.svg === !0 && (Y(ne, Zs), Y(Q, $s), Y(Q, Kn)), Dt.svgFilters === !0 && (Y(ne, Ws), Y(Q, $s), Y(Q, Kn)), Dt.mathMl === !0 && (Y(ne, Xs), Y(Q, Lr), Y(Q, Kn))), m.ADD_TAGS && (typeof m.ADD_TAGS == "function" ? Je.tagCheck = m.ADD_TAGS : (ne === ue && (ne = st(ne)), Y(ne, m.ADD_TAGS, de))), m.ADD_ATTR && (typeof m.ADD_ATTR == "function" ? Je.attributeCheck = m.ADD_ATTR : (Q === ut && (Q = st(Q)), Y(Q, m.ADD_ATTR, de))), m.ADD_URI_SAFE_ATTR && Y(ws, m.ADD_URI_SAFE_ATTR, de), m.FORBID_CONTENTS && (It === Ii && (It = st(It)), Y(It, m.FORBID_CONTENTS, de)), bs && (ne["#text"] = !0), vt && Y(ne, ["html", "head", "body"]), ne.table && (Y(ne, ["tbody"]), delete Re.tbody), m.TRUSTED_TYPES_POLICY) {
9115
9143
  if (typeof m.TRUSTED_TYPES_POLICY.createHTML != "function")
9116
9144
  throw rn('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');
9117
9145
  if (typeof m.TRUSTED_TYPES_POLICY.createScriptURL != "function")
9118
9146
  throw rn('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');
9119
9147
  v = m.TRUSTED_TYPES_POLICY, P = v.createHTML("");
9120
9148
  } else
9121
- v === void 0 && (v = Vd(f, s)), v !== null && typeof P == "string" && (P = v.createHTML(""));
9149
+ v === void 0 && (v = Gd(f, s)), v !== null && typeof P == "string" && (P = v.createHTML(""));
9122
9150
  Ae && Ae(m), Pt = m;
9123
9151
  }
9124
- }, Ui = Y({}, [...Gs, ...Zs, ...kd]), Fi = Y({}, [...Ws, ...Dd]), To = function(m) {
9152
+ }, Fi = Y({}, [...Zs, ...Ws, ...Dd]), ji = Y({}, [...Xs, ...Id]), So = function(m) {
9125
9153
  let S = T(m);
9126
9154
  (!S || !S.tagName) && (S = {
9127
9155
  namespaceURI: Nt,
9128
9156
  tagName: "template"
9129
9157
  });
9130
- const D = ns(m.tagName), se = ns(S.tagName);
9131
- return As[m.namespaceURI] ? m.namespaceURI === Fn ? S.namespaceURI === Qe ? D === "svg" : S.namespaceURI === Un ? D === "svg" && (se === "annotation-xml" || jn[se]) : !!Ui[D] : m.namespaceURI === Un ? S.namespaceURI === Qe ? D === "math" : S.namespaceURI === Fn ? D === "math" && Bn[se] : !!Fi[D] : m.namespaceURI === Qe ? S.namespaceURI === Fn && !Bn[se] || S.namespaceURI === Un && !jn[se] ? !1 : !Fi[D] && (bo[D] || !Ui[D]) : !!(en === "application/xhtml+xml" && As[m.namespaceURI]) : !1;
9158
+ const D = ss(m.tagName), se = ss(S.tagName);
9159
+ return As[m.namespaceURI] ? m.namespaceURI === jn ? S.namespaceURI === Qe ? D === "svg" : S.namespaceURI === Fn ? D === "svg" && (se === "annotation-xml" || Bn[se]) : !!Fi[D] : m.namespaceURI === Fn ? S.namespaceURI === Qe ? D === "math" : S.namespaceURI === jn ? D === "math" && Hn[se] : !!ji[D] : m.namespaceURI === Qe ? S.namespaceURI === jn && !Hn[se] || S.namespaceURI === Fn && !Bn[se] ? !1 : !ji[D] && (wo[D] || !Fi[D]) : !!(en === "application/xhtml+xml" && As[m.namespaceURI]) : !1;
9132
9160
  }, Ve = function(m) {
9133
9161
  nn(e.removed, {
9134
9162
  element: m
@@ -9151,7 +9179,7 @@ function fo() {
9151
9179
  });
9152
9180
  }
9153
9181
  if (S.removeAttribute(m), m === "is")
9154
- if (kt || Pn)
9182
+ if (Ot || zn)
9155
9183
  try {
9156
9184
  Ve(S);
9157
9185
  } catch {
@@ -9161,12 +9189,12 @@ function fo() {
9161
9189
  S.setAttribute(m, "");
9162
9190
  } catch {
9163
9191
  }
9164
- }, ji = function(m) {
9192
+ }, Bi = function(m) {
9165
9193
  let S = null, D = null;
9166
9194
  if (xs)
9167
9195
  m = "<remove></remove>" + m;
9168
9196
  else {
9169
- const oe = Vs(m, /^[\r\n\t ]+/);
9197
+ const oe = Gs(m, /^[\r\n\t ]+/);
9170
9198
  D = oe && oe[0];
9171
9199
  }
9172
9200
  en === "application/xhtml+xml" && Nt === Qe && (m = '<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>' + m + "</body></html>");
@@ -9185,7 +9213,7 @@ function fo() {
9185
9213
  }
9186
9214
  const ge = S.body || S.documentElement;
9187
9215
  return m && D && ge.insertBefore(t.createTextNode(D), ge.childNodes[0] || null), Nt === Qe ? R.call(S, vt ? "html" : "body")[0] : vt ? S.documentElement : ge;
9188
- }, Bi = function(m) {
9216
+ }, Hi = function(m) {
9189
9217
  return F.call(
9190
9218
  m.ownerDocument || m,
9191
9219
  m,
@@ -9195,15 +9223,15 @@ function fo() {
9195
9223
  );
9196
9224
  }, Ss = function(m) {
9197
9225
  return m instanceof u && (typeof m.nodeName != "string" || typeof m.textContent != "string" || typeof m.removeChild != "function" || !(m.attributes instanceof d) || typeof m.removeAttribute != "function" || typeof m.setAttribute != "function" || typeof m.namespaceURI != "string" || typeof m.insertBefore != "function" || typeof m.hasChildNodes != "function");
9198
- }, Hi = function(m) {
9226
+ }, Vi = function(m) {
9199
9227
  return typeof a == "function" && m instanceof a;
9200
9228
  };
9201
9229
  function et(U, m, S) {
9202
- $n(U, (D) => {
9230
+ Yn(U, (D) => {
9203
9231
  D.call(e, m, S, Pt);
9204
9232
  });
9205
9233
  }
9206
- const Vi = function(m) {
9234
+ const Gi = function(m) {
9207
9235
  let S = null;
9208
9236
  if (et(N.beforeSanitizeElements, m, null), Ss(m))
9209
9237
  return Ve(m), !0;
@@ -9211,10 +9239,10 @@ function fo() {
9211
9239
  if (et(N.uponSanitizeElement, m, {
9212
9240
  tagName: D,
9213
9241
  allowedTags: ne
9214
- }), Nn && m.hasChildNodes() && !Hi(m.firstElementChild) && we(/<[/\w!]/g, m.innerHTML) && we(/<[/\w!]/g, m.textContent) || m.nodeType === an.progressingInstruction || Nn && m.nodeType === an.comment && we(/<[/\w]/g, m.data))
9242
+ }), Pn && m.hasChildNodes() && !Vi(m.firstElementChild) && we(/<[/\w!]/g, m.innerHTML) && we(/<[/\w!]/g, m.textContent) || m.nodeType === an.progressingInstruction || Pn && m.nodeType === an.comment && we(/<[/\w]/g, m.data))
9215
9243
  return Ve(m), !0;
9216
9244
  if (!(Je.tagCheck instanceof Function && Je.tagCheck(D)) && (!ne[D] || Re[D])) {
9217
- if (!Re[D] && Zi(D) && (z.tagNameCheck instanceof RegExp && we(z.tagNameCheck, D) || z.tagNameCheck instanceof Function && z.tagNameCheck(D)))
9245
+ if (!Re[D] && Wi(D) && (z.tagNameCheck instanceof RegExp && we(z.tagNameCheck, D) || z.tagNameCheck instanceof Function && z.tagNameCheck(D)))
9218
9246
  return !1;
9219
9247
  if (bs && !It[D]) {
9220
9248
  const se = T(m) || m.parentNode, ge = w(m) || m.childNodes;
@@ -9228,30 +9256,30 @@ function fo() {
9228
9256
  }
9229
9257
  return Ve(m), !0;
9230
9258
  }
9231
- return m instanceof c && !To(m) || (D === "noscript" || D === "noembed" || D === "noframes") && we(/<\/no(script|embed|frames)/i, m.innerHTML) ? (Ve(m), !0) : (Ot && m.nodeType === an.text && (S = m.textContent, $n([G, Z, k], (se) => {
9259
+ return m instanceof c && !So(m) || (D === "noscript" || D === "noembed" || D === "noframes") && we(/<\/no(script|embed|frames)/i, m.innerHTML) ? (Ve(m), !0) : (Ct && m.nodeType === an.text && (S = m.textContent, Yn([G, Z, O], (se) => {
9232
9260
  S = sn(S, se, " ");
9233
9261
  }), m.textContent !== S && (nn(e.removed, {
9234
9262
  element: m.cloneNode()
9235
9263
  }), m.textContent = S)), et(N.afterSanitizeElements, m, null), !1);
9236
- }, Gi = function(m, S, D) {
9237
- if (Oi && (S === "id" || S === "name") && (D in t || D in Ao))
9264
+ }, Zi = function(m, S, D) {
9265
+ if (Oi && (S === "id" || S === "name") && (D in t || D in To))
9238
9266
  return !1;
9239
- if (!(ys && !Ct[S] && we(ee, S))) {
9267
+ if (!(ys && !kt[S] && we(ee, S))) {
9240
9268
  if (!(gs && we($, S))) {
9241
9269
  if (!(Je.attributeCheck instanceof Function && Je.attributeCheck(S, m))) {
9242
- if (!Q[S] || Ct[S]) {
9270
+ if (!Q[S] || kt[S]) {
9243
9271
  if (
9244
9272
  // First condition does a very basic check if a) it's basically a valid custom element tagname AND
9245
9273
  // b) if the tagName passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
9246
9274
  // and c) if the attribute name passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.attributeNameCheck
9247
- !(Zi(m) && (z.tagNameCheck instanceof RegExp && we(z.tagNameCheck, m) || z.tagNameCheck instanceof Function && z.tagNameCheck(m)) && (z.attributeNameCheck instanceof RegExp && we(z.attributeNameCheck, S) || z.attributeNameCheck instanceof Function && z.attributeNameCheck(S, m)) || // Alternative, second condition checks if it's an `is`-attribute, AND
9275
+ !(Wi(m) && (z.tagNameCheck instanceof RegExp && we(z.tagNameCheck, m) || z.tagNameCheck instanceof Function && z.tagNameCheck(m)) && (z.attributeNameCheck instanceof RegExp && we(z.attributeNameCheck, S) || z.attributeNameCheck instanceof Function && z.attributeNameCheck(S, m)) || // Alternative, second condition checks if it's an `is`-attribute, AND
9248
9276
  // the value passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck
9249
9277
  S === "is" && z.allowCustomizedBuiltInElements && (z.tagNameCheck instanceof RegExp && we(z.tagNameCheck, D) || z.tagNameCheck instanceof Function && z.tagNameCheck(D)))
9250
9278
  ) return !1;
9251
9279
  } else if (!ws[S]) {
9252
9280
  if (!we(Se, sn(D, le, ""))) {
9253
- if (!((S === "src" || S === "xlink:href" || S === "href") && m !== "script" && Md(D, "data:") === 0 && Ii[m])) {
9254
- if (!(Li && !we(be, sn(D, le, "")))) {
9281
+ if (!((S === "src" || S === "xlink:href" || S === "href") && m !== "script" && Ld(D, "data:") === 0 && Ni[m])) {
9282
+ if (!(ki && !we(be, sn(D, le, "")))) {
9255
9283
  if (D)
9256
9284
  return !1;
9257
9285
  }
@@ -9262,9 +9290,9 @@ function fo() {
9262
9290
  }
9263
9291
  }
9264
9292
  return !0;
9265
- }, Zi = function(m) {
9266
- return m !== "annotation-xml" && Vs(m, Ue);
9267
9293
  }, Wi = function(m) {
9294
+ return m !== "annotation-xml" && Gs(m, Ue);
9295
+ }, Xi = function(m) {
9268
9296
  et(N.beforeSanitizeAttributes, m, null);
9269
9297
  const {
9270
9298
  attributes: S
@@ -9285,12 +9313,12 @@ function fo() {
9285
9313
  namespaceURI: Me,
9286
9314
  value: tt
9287
9315
  } = ge, zt = de(oe), Rs = tt;
9288
- let he = oe === "value" ? Rs : Ld(Rs);
9289
- if (D.attrName = zt, D.attrValue = he, D.keepAttr = !0, D.forceKeepAttr = void 0, et(N.uponSanitizeAttribute, m, D), he = D.attrValue, ki && (zt === "id" || zt === "name") && (xt(oe, m), he = vo + he), Nn && we(/((--!?|])>)|<\/(style|title|textarea)/i, he)) {
9316
+ let he = oe === "value" ? Rs : kd(Rs);
9317
+ if (D.attrName = zt, D.attrValue = he, D.keepAttr = !0, D.forceKeepAttr = void 0, et(N.uponSanitizeAttribute, m, D), he = D.attrValue, Di && (zt === "id" || zt === "name") && (xt(oe, m), he = xo + he), Pn && we(/((--!?|])>)|<\/(style|title|textarea)/i, he)) {
9290
9318
  xt(oe, m);
9291
9319
  continue;
9292
9320
  }
9293
- if (zt === "attributename" && Vs(he, "href")) {
9321
+ if (zt === "attributename" && Gs(he, "href")) {
9294
9322
  xt(oe, m);
9295
9323
  continue;
9296
9324
  }
@@ -9304,16 +9332,16 @@ function fo() {
9304
9332
  xt(oe, m);
9305
9333
  continue;
9306
9334
  }
9307
- Ot && $n([G, Z, k], ($i) => {
9308
- he = sn(he, $i, " ");
9335
+ Ct && Yn([G, Z, O], (Yi) => {
9336
+ he = sn(he, Yi, " ");
9309
9337
  });
9310
- const Xi = de(m.nodeName);
9311
- if (!Gi(Xi, zt, he)) {
9338
+ const $i = de(m.nodeName);
9339
+ if (!Zi($i, zt, he)) {
9312
9340
  xt(oe, m);
9313
9341
  continue;
9314
9342
  }
9315
9343
  if (v && typeof f == "object" && typeof f.getAttributeType == "function" && !Me)
9316
- switch (f.getAttributeType(Xi, zt)) {
9344
+ switch (f.getAttributeType($i, zt)) {
9317
9345
  case "TrustedHTML": {
9318
9346
  he = v.createHTML(he);
9319
9347
  break;
@@ -9325,22 +9353,22 @@ function fo() {
9325
9353
  }
9326
9354
  if (he !== Rs)
9327
9355
  try {
9328
- Me ? m.setAttributeNS(Me, oe, he) : m.setAttribute(oe, he), Ss(m) ? Ve(m) : Ar(e.removed);
9356
+ Me ? m.setAttributeNS(Me, oe, he) : m.setAttribute(oe, he), Ss(m) ? Ve(m) : Tr(e.removed);
9329
9357
  } catch {
9330
9358
  xt(oe, m);
9331
9359
  }
9332
9360
  }
9333
9361
  et(N.afterSanitizeAttributes, m, null);
9334
- }, So = function U(m) {
9362
+ }, Ro = function U(m) {
9335
9363
  let S = null;
9336
- const D = Bi(m);
9364
+ const D = Hi(m);
9337
9365
  for (et(N.beforeSanitizeShadowDOM, m, null); S = D.nextNode(); )
9338
- et(N.uponSanitizeShadowNode, S, null), Vi(S), Wi(S), S.content instanceof i && U(S.content);
9366
+ et(N.uponSanitizeShadowNode, S, null), Gi(S), Xi(S), S.content instanceof i && U(S.content);
9339
9367
  et(N.afterSanitizeShadowDOM, m, null);
9340
9368
  };
9341
9369
  return e.sanitize = function(U) {
9342
9370
  let m = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, S = null, D = null, se = null, ge = null;
9343
- if (Es = !U, Es && (U = "<!-->"), typeof U != "string" && !Hi(U))
9371
+ if (Es = !U, Es && (U = "<!-->"), typeof U != "string" && !Vi(U))
9344
9372
  if (typeof U.toString == "function") {
9345
9373
  if (U = U.toString(), typeof U != "string")
9346
9374
  throw rn("dirty is not a string, aborting");
@@ -9355,33 +9383,33 @@ function fo() {
9355
9383
  throw rn("root node is forbidden and cannot be sanitized in-place");
9356
9384
  }
9357
9385
  } else if (U instanceof a)
9358
- S = ji("<!---->"), D = S.ownerDocument.importNode(U, !0), D.nodeType === an.element && D.nodeName === "BODY" || D.nodeName === "HTML" ? S = D : S.appendChild(D);
9386
+ S = Bi("<!---->"), D = S.ownerDocument.importNode(U, !0), D.nodeType === an.element && D.nodeName === "BODY" || D.nodeName === "HTML" ? S = D : S.appendChild(D);
9359
9387
  else {
9360
- if (!kt && !Ot && !vt && // eslint-disable-next-line unicorn/prefer-includes
9388
+ if (!Ot && !Ct && !vt && // eslint-disable-next-line unicorn/prefer-includes
9361
9389
  U.indexOf("<") === -1)
9362
- return v && zn ? v.createHTML(U) : U;
9363
- if (S = ji(U), !S)
9364
- return kt ? null : zn ? P : "";
9390
+ return v && Un ? v.createHTML(U) : U;
9391
+ if (S = Bi(U), !S)
9392
+ return Ot ? null : Un ? P : "";
9365
9393
  }
9366
9394
  S && xs && Ve(S.firstChild);
9367
- const oe = Bi(Qt ? U : S);
9395
+ const oe = Hi(Qt ? U : S);
9368
9396
  for (; se = oe.nextNode(); )
9369
- Vi(se), Wi(se), se.content instanceof i && So(se.content);
9397
+ Gi(se), Xi(se), se.content instanceof i && Ro(se.content);
9370
9398
  if (Qt)
9371
9399
  return U;
9372
- if (kt) {
9373
- if (Pn)
9400
+ if (Ot) {
9401
+ if (zn)
9374
9402
  for (ge = L.call(S.ownerDocument); S.firstChild; )
9375
9403
  ge.appendChild(S.firstChild);
9376
9404
  else
9377
9405
  ge = S;
9378
- return (Q.shadowroot || Q.shadowrootmode) && (ge = O.call(n, ge, !0)), ge;
9406
+ return (Q.shadowroot || Q.shadowrootmode) && (ge = C.call(n, ge, !0)), ge;
9379
9407
  }
9380
9408
  let Me = vt ? S.outerHTML : S.innerHTML;
9381
- return vt && ne["!doctype"] && S.ownerDocument && S.ownerDocument.doctype && S.ownerDocument.doctype.name && we(ho, S.ownerDocument.doctype.name) && (Me = "<!DOCTYPE " + S.ownerDocument.doctype.name + `>
9382
- ` + Me), Ot && $n([G, Z, k], (tt) => {
9409
+ return vt && ne["!doctype"] && S.ownerDocument && S.ownerDocument.doctype && S.ownerDocument.doctype.name && we(fo, S.ownerDocument.doctype.name) && (Me = "<!DOCTYPE " + S.ownerDocument.doctype.name + `>
9410
+ ` + Me), Ct && Yn([G, Z, O], (tt) => {
9383
9411
  Me = sn(Me, tt, " ");
9384
- }), v && zn ? v.createHTML(Me) : Me;
9412
+ }), v && Un ? v.createHTML(Me) : Me;
9385
9413
  }, e.setConfig = function() {
9386
9414
  let U = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
9387
9415
  Ts(U), vs = !0;
@@ -9390,23 +9418,23 @@ function fo() {
9390
9418
  }, e.isValidAttribute = function(U, m, S) {
9391
9419
  Pt || Ts({});
9392
9420
  const D = de(U), se = de(m);
9393
- return Gi(D, se, S);
9421
+ return Zi(D, se, S);
9394
9422
  }, e.addHook = function(U, m) {
9395
9423
  typeof m == "function" && nn(N[U], m);
9396
9424
  }, e.removeHook = function(U, m) {
9397
9425
  if (m !== void 0) {
9398
- const S = Sd(N[U], m);
9399
- return S === -1 ? void 0 : Rd(N[U], S, 1)[0];
9426
+ const S = Rd(N[U], m);
9427
+ return S === -1 ? void 0 : Md(N[U], S, 1)[0];
9400
9428
  }
9401
- return Ar(N[U]);
9429
+ return Tr(N[U]);
9402
9430
  }, e.removeHooks = function(U) {
9403
9431
  N[U] = [];
9404
9432
  }, e.removeAllHooks = function() {
9405
9433
  N = Cr();
9406
9434
  }, e;
9407
9435
  }
9408
- var Gd = fo();
9409
- class Zd {
9436
+ var Zd = mo();
9437
+ class Wd {
9410
9438
  constructor(e) {
9411
9439
  _(this, "container");
9412
9440
  _(this, "elements", []);
@@ -9418,7 +9446,7 @@ class Zd {
9418
9446
  */
9419
9447
  render(e) {
9420
9448
  const t = document.createElement("div");
9421
- t.className = "glimmer-annotation-2d", t.innerHTML = Gd.sanitize(e.content), t.style.position = "absolute", t.style.pointerEvents = "auto", t.style.left = `${e.position[0]}%`, t.style.top = `${e.position[1]}%`, t.style.transform = "translate(-50%, -50%)", e.style && Object.assign(t.style, e.style), this.container.appendChild(t), this.elements.push(t);
9449
+ t.className = "glimmer-annotation-2d", t.innerHTML = Zd.sanitize(e.content), t.style.position = "absolute", t.style.pointerEvents = "auto", t.style.left = `${e.position[0]}%`, t.style.top = `${e.position[1]}%`, t.style.transform = "translate(-50%, -50%)", e.style && Object.assign(t.style, e.style), this.container.appendChild(t), this.elements.push(t);
9422
9450
  }
9423
9451
  /**
9424
9452
  * Clear all rendered 2D annotations
@@ -9433,7 +9461,7 @@ class Zd {
9433
9461
  this.clear();
9434
9462
  }
9435
9463
  }
9436
- class Wd {
9464
+ class Xd {
9437
9465
  constructor(e) {
9438
9466
  _(this, "group");
9439
9467
  _(this, "sprites", []);
@@ -9476,7 +9504,7 @@ class Wd {
9476
9504
  return this.group;
9477
9505
  }
9478
9506
  }
9479
- class Xd {
9507
+ class $d {
9480
9508
  constructor() {
9481
9509
  _(this, "triggers", /* @__PURE__ */ new Map());
9482
9510
  _(this, "handlers", /* @__PURE__ */ new Map());
@@ -9545,7 +9573,7 @@ class Xd {
9545
9573
  typeof e == "string" ? window.removeEventListener(e, t) : e.removeEventListener("click", t);
9546
9574
  }
9547
9575
  }
9548
- class $d extends EventTarget {
9576
+ class Yd extends EventTarget {
9549
9577
  constructor(t, n) {
9550
9578
  super();
9551
9579
  _(this, "camera");
@@ -9576,7 +9604,7 @@ class $d extends EventTarget {
9576
9604
  );
9577
9605
  }
9578
9606
  }
9579
- class Yd {
9607
+ class Kd {
9580
9608
  constructor(e, t) {
9581
9609
  _(this, "mesh");
9582
9610
  _(this, "axis");
@@ -9647,7 +9675,7 @@ class Yd {
9647
9675
  this.mesh.geometry.dispose(), this.mesh.material.dispose();
9648
9676
  }
9649
9677
  }
9650
- class Kd extends EventTarget {
9678
+ class qd extends EventTarget {
9651
9679
  constructor(t) {
9652
9680
  super();
9653
9681
  _(this, "bounds");
@@ -9701,7 +9729,7 @@ class Kd extends EventTarget {
9701
9729
  ["z", "min"],
9702
9730
  ["z", "max"]
9703
9731
  ].forEach(([a, c]) => {
9704
- const l = new Yd(a, c);
9732
+ const l = new Kd(a, c);
9705
9733
  l.update_from_bounds(this.bounds), this.plane_handles.push(l), t.add(l.mesh);
9706
9734
  }), this.setup_interactions(n, s);
9707
9735
  }
@@ -9815,7 +9843,7 @@ class Kd extends EventTarget {
9815
9843
  }), this.event_listeners = []);
9816
9844
  }
9817
9845
  }
9818
- const Or = 8, qd = `
9846
+ const Or = 8, Jd = `
9819
9847
  attribute vec3 aN0;
9820
9848
  attribute vec3 aN1;
9821
9849
  attribute vec4 aOtherVert;
@@ -9869,7 +9897,7 @@ void main() {
9869
9897
 
9870
9898
  gl_Position.z = -2000.;
9871
9899
  }
9872
- `, Jd = `
9900
+ `, Qd = `
9873
9901
  uniform vec3 uColor;
9874
9902
  uniform int uClipPlaneCount;
9875
9903
  uniform vec4 uClipPlanes[8];
@@ -9884,11 +9912,11 @@ void main() {
9884
9912
  gl_FragColor = vec4(uColor, 1.);
9885
9913
  }
9886
9914
  `;
9887
- class hi extends wi {
9915
+ class fi extends Ei {
9888
9916
  constructor(e = 0, t = !0, n = "#000000") {
9889
9917
  super({
9890
- vertexShader: qd,
9891
- fragmentShader: Jd,
9918
+ vertexShader: Jd,
9919
+ fragmentShader: Qd,
9892
9920
  uniforms: {
9893
9921
  uAngleThresh: { value: 0 },
9894
9922
  uOutline: { value: Number(t) },
@@ -9924,10 +9952,10 @@ class hi extends wi {
9924
9952
  }
9925
9953
  }
9926
9954
  }
9927
- const $s = 1e3;
9928
- class Qd extends Gr {
9929
- constructor(e, t = new hi()) {
9930
- super(new Ti(), t), this.extract_geometry(e.geometry);
9955
+ const Ys = 1e3;
9956
+ class eu extends Zr {
9957
+ constructor(e, t = new fi()) {
9958
+ super(new Si(), t), this.extract_geometry(e.geometry);
9931
9959
  }
9932
9960
  extract_geometry(e) {
9933
9961
  const { v_array: t, n0_array: n, n1_array: s, other_vert_array: i } = e.index ? this.extract_indexed(e) : this.extract_soup(), o = this.geometry;
@@ -9951,9 +9979,9 @@ class Qd extends Gr {
9951
9979
  const n = {}, s = {}, i = [], o = [];
9952
9980
  for (let a = 0, c = 0; a < t.count; a++) {
9953
9981
  const l = a * 3, d = [
9954
- Math.round(t.array[l] * $s),
9955
- Math.round(t.array[l + 1] * $s),
9956
- Math.round(t.array[l + 2] * $s)
9982
+ Math.round(t.array[l] * Ys),
9983
+ Math.round(t.array[l + 1] * Ys),
9984
+ Math.round(t.array[l + 2] * Ys)
9957
9985
  ].join(":");
9958
9986
  n[d] === void 0 && (n[d] = c++, i.push(
9959
9987
  t.array[l],
@@ -9995,16 +10023,16 @@ class Qd extends Gr {
9995
10023
  return { v_array: [], n0_array: [], n1_array: [], other_vert_array: [] };
9996
10024
  }
9997
10025
  }
9998
- const Ln = /* @__PURE__ */ new Set();
9999
- let fi = !1;
10000
- function eu(r, e, t = 2) {
10026
+ const kn = /* @__PURE__ */ new Set();
10027
+ let mi = !1;
10028
+ function tu(r, e, t = 2) {
10001
10029
  const n = e && e.length, s = n ? e[0] * t : r.length;
10002
- Ln.size && Ln.clear();
10003
- let i = mo(r, 0, s, t, !0);
10030
+ kn.size && kn.clear();
10031
+ let i = po(r, 0, s, t, !0);
10004
10032
  const o = [];
10005
10033
  if (!i || i.next === i.prev) return o;
10006
10034
  let a = 0, c = 0, l = 0;
10007
- if (n && (i = ru(r, e, i, t)), r.length > 80 * t) {
10035
+ if (n && (i = ou(r, e, i, t)), r.length > 80 * t) {
10008
10036
  a = r[0], c = r[1];
10009
10037
  let d = a, u = c;
10010
10038
  for (let h = t; h < s; h += t) {
@@ -10013,86 +10041,86 @@ function eu(r, e, t = 2) {
10013
10041
  }
10014
10042
  l = Math.max(d - a, u - c), l = l !== 0 ? 32767 / l : 0;
10015
10043
  }
10016
- return mi(i, o, a, c, l), o;
10044
+ return pi(i, o, a, c, l), o;
10017
10045
  }
10018
- function mo(r, e, t, n, s) {
10046
+ function po(r, e, t, n, s) {
10019
10047
  let i = null;
10020
- if (s === yu(r, e, t, n) > 0)
10021
- for (let o = e; o < t; o += n) i = Ir(o / n | 0, r[o], r[o + 1], i);
10048
+ if (s === vu(r, e, t, n) > 0)
10049
+ for (let o = e; o < t; o += n) i = Nr(o / n | 0, r[o], r[o + 1], i);
10022
10050
  else
10023
- for (let o = t - n; o >= e; o -= n) i = Ir(o / n | 0, r[o], r[o + 1], i);
10024
- return i && Cn(i, i.next) && (kn(i), i = i.next), i;
10051
+ for (let o = t - n; o >= e; o -= n) i = Nr(o / n | 0, r[o], r[o + 1], i);
10052
+ return i && Cn(i, i.next) && (Dn(i), i = i.next), i;
10025
10053
  }
10026
10054
  function Lt(r, e = r) {
10027
10055
  const t = e === r;
10028
10056
  let n = r, s;
10029
10057
  do
10030
- s = !1, n !== n.next && (Ln.size === 0 || !Ln.has(n)) && (Cn(n, n.next) || ae(n.prev, n, n.next) === 0) ? ((t || n === e) && (e = n.prev), fi = !0, kn(n), n = n.prev, s = !0) : (t || n !== e) && (n = n.next, s = !t);
10058
+ s = !1, n !== n.next && (kn.size === 0 || !kn.has(n)) && (Cn(n, n.next) || ae(n.prev, n, n.next) === 0) ? ((t || n === e) && (e = n.prev), mi = !0, Dn(n), n = n.prev, s = !0) : (t || n !== e) && (n = n.next, s = !t);
10031
10059
  while (s || n !== e);
10032
10060
  return e;
10033
10061
  }
10034
- function mi(r, e, t, n, s) {
10035
- s && hu(r, t, n, s);
10062
+ function pi(r, e, t, n, s) {
10063
+ s && fu(r, t, n, s);
10036
10064
  let i = r, o = !1;
10037
10065
  for (; r.prev !== r.next; ) {
10038
10066
  const a = r.prev, c = r.next;
10039
- if (ae(a, r, c) < 0 && (s ? nu(r, t, n, s) : tu(r))) {
10040
- e.push(a.i, r.i, c.i), kn(r), r = c, i = c;
10067
+ if (ae(a, r, c) < 0 && (s ? su(r, t, n, s) : nu(r))) {
10068
+ e.push(a.i, r.i, c.i), Dn(r), r = c, i = c;
10041
10069
  continue;
10042
10070
  }
10043
10071
  if (r = c, r === i) {
10044
- if (fi = !1, r = Lt(r), fi) {
10072
+ if (mi = !1, r = Lt(r), mi) {
10045
10073
  i = r;
10046
10074
  continue;
10047
10075
  }
10048
10076
  if (!o) {
10049
- r = su(r, e), i = r, o = !0;
10077
+ r = iu(r, e), i = r, o = !0;
10050
10078
  continue;
10051
10079
  }
10052
- iu(r, e, t, n, s);
10080
+ ru(r, e, t, n, s);
10053
10081
  break;
10054
10082
  }
10055
10083
  }
10056
10084
  }
10057
- function tu(r) {
10085
+ function nu(r) {
10058
10086
  const e = r.prev, t = r, n = r.next, s = e.x, i = t.x, o = n.x, a = e.y, c = t.y, l = n.y, d = Math.min(s, i, o), u = Math.min(a, c, l), h = Math.max(s, i, o), f = Math.max(a, c, l);
10059
10087
  let g = n.next;
10060
10088
  for (; g !== e; ) {
10061
- if (g.x >= d && g.x <= h && g.y >= u && g.y <= f && !(s === g.x && a === g.y) && fs(s, a, i, c, o, l, g.x, g.y) && ae(g.prev, g, g.next) >= 0) return !1;
10089
+ if (g.x >= d && g.x <= h && g.y >= u && g.y <= f && !(s === g.x && a === g.y) && ms(s, a, i, c, o, l, g.x, g.y) && ae(g.prev, g, g.next) >= 0) return !1;
10062
10090
  g = g.next;
10063
10091
  }
10064
10092
  return !0;
10065
10093
  }
10066
- function nu(r, e, t, n) {
10067
- const s = r.prev, i = r, o = r.next, a = s.x, c = i.x, l = o.x, d = s.y, u = i.y, h = o.y, f = Math.min(a, c, l), g = Math.min(d, u, h), y = Math.max(a, c, l), x = Math.max(d, u, h), b = yi(f, g, e, t, n), w = yi(y, x, e, t, n);
10094
+ function su(r, e, t, n) {
10095
+ const s = r.prev, i = r, o = r.next, a = s.x, c = i.x, l = o.x, d = s.y, u = i.y, h = o.y, f = Math.min(a, c, l), g = Math.min(d, u, h), y = Math.max(a, c, l), x = Math.max(d, u, h), b = vi(f, g, e, t, n), w = vi(y, x, e, t, n);
10068
10096
  let T = r.prevZ;
10069
10097
  for (; T && T.z >= b; ) {
10070
- if (T.x >= f && T.x <= y && T.y >= g && T.y <= x && T !== o && !(a === T.x && d === T.y) && fs(a, d, c, u, l, h, T.x, T.y) && ae(T.prev, T, T.next) >= 0) return !1;
10098
+ if (T.x >= f && T.x <= y && T.y >= g && T.y <= x && T !== o && !(a === T.x && d === T.y) && ms(a, d, c, u, l, h, T.x, T.y) && ae(T.prev, T, T.next) >= 0) return !1;
10071
10099
  T = T.prevZ;
10072
10100
  }
10073
10101
  let v = r.nextZ;
10074
10102
  for (; v && v.z <= w; ) {
10075
- if (v.x >= f && v.x <= y && v.y >= g && v.y <= x && v !== o && !(a === v.x && d === v.y) && fs(a, d, c, u, l, h, v.x, v.y) && ae(v.prev, v, v.next) >= 0) return !1;
10103
+ if (v.x >= f && v.x <= y && v.y >= g && v.y <= x && v !== o && !(a === v.x && d === v.y) && ms(a, d, c, u, l, h, v.x, v.y) && ae(v.prev, v, v.next) >= 0) return !1;
10076
10104
  v = v.nextZ;
10077
10105
  }
10078
10106
  return !0;
10079
10107
  }
10080
- function su(r, e) {
10108
+ function iu(r, e) {
10081
10109
  let t = r, n = !1;
10082
10110
  do {
10083
10111
  const s = t.prev, i = t.next.next;
10084
- go(s, t, t.next, i, !1) && On(s, i) && On(i, s) && (e.push(s.i, t.i, i.i), kn(t), kn(t.next), t = r = i, n = !0), t = t.next;
10112
+ yo(s, t, t.next, i, !1) && On(s, i) && On(i, s) && (e.push(s.i, t.i, i.i), Dn(t), Dn(t.next), t = r = i, n = !0), t = t.next;
10085
10113
  } while (t !== r);
10086
10114
  return n ? Lt(t) : t;
10087
10115
  }
10088
- function iu(r, e, t, n, s) {
10116
+ function ru(r, e, t, n, s) {
10089
10117
  let i = r;
10090
10118
  do {
10091
10119
  let o = i.next.next;
10092
10120
  for (; o !== i.prev; ) {
10093
- if (i.i !== o.i && pu(i, o)) {
10094
- let a = yo(i, o);
10095
- i = Lt(i, i.next), a = Lt(a, a.next), mi(i, e, t, n, s), mi(a, e, t, n, s);
10121
+ if (i.i !== o.i && _u(i, o)) {
10122
+ let a = vo(i, o);
10123
+ i = Lt(i, i.next), a = Lt(a, a.next), pi(i, e, t, n, s), pi(a, e, t, n, s);
10096
10124
  return;
10097
10125
  }
10098
10126
  o = o.next;
@@ -10100,76 +10128,76 @@ function iu(r, e, t, n, s) {
10100
10128
  i = i.next;
10101
10129
  } while (i !== r);
10102
10130
  }
10103
- let pi = !1;
10104
- function ru(r, e, t, n) {
10131
+ let _i = !1;
10132
+ function ou(r, e, t, n) {
10105
10133
  const s = [];
10106
10134
  for (let i = 0, o = e.length; i < o; i++) {
10107
10135
  const a = e[i] * n, c = i < o - 1 ? e[i + 1] * n : r.length, l = (
10108
10136
  /** @type {Node} */
10109
- mo(r, a, c, n, !1)
10137
+ po(r, a, c, n, !1)
10110
10138
  );
10111
- l === l.next && Ln.add(l), s.push(mu(l));
10139
+ l === l.next && kn.add(l), s.push(pu(l));
10112
10140
  }
10113
- s.sort(ou), cu(r.length / n, e.length), _o(t, t), pi = !0;
10141
+ s.sort(au), lu(r.length / n, e.length), go(t, t), _i = !0;
10114
10142
  for (let i = 0; i < s.length; i++)
10115
- t = au(s[i], t);
10116
- return pi = !1, Lt(t);
10143
+ t = cu(s[i], t);
10144
+ return _i = !1, Lt(t);
10117
10145
  }
10118
- function ou(r, e) {
10146
+ function au(r, e) {
10119
10147
  return r.x - e.x || r.y - e.y || (r.next.y - r.y) / (r.next.x - r.x) - (e.next.y - e.y) / (e.next.x - e.x);
10120
10148
  }
10121
- function au(r, e) {
10122
- const t = du(r, e);
10149
+ function cu(r, e) {
10150
+ const t = uu(r, e);
10123
10151
  if (!t)
10124
10152
  return e;
10125
- const n = yo(t, r), s = n.next;
10126
- return _o(t, s.next), Lt(n, n.next), Lt(t, t.next);
10153
+ const n = vo(t, r), s = n.next;
10154
+ return go(t, s.next), Lt(n, n.next), Lt(t, t.next);
10127
10155
  }
10128
- const po = 16;
10129
- let re = new Float64Array(0), hs = 0;
10130
- const _i = [], gi = [];
10131
- function cu(r, e) {
10132
- const t = Math.ceil((r + 2 * e) / po) + e + 2;
10133
- re.length < t * 4 && (re = new Float64Array(t * 4)), hs = 0;
10156
+ const _o = 16;
10157
+ let re = new Float64Array(0), fs = 0;
10158
+ const gi = [], yi = [];
10159
+ function lu(r, e) {
10160
+ const t = Math.ceil((r + 2 * e) / _o) + e + 2;
10161
+ re.length < t * 4 && (re = new Float64Array(t * 4)), fs = 0;
10134
10162
  }
10135
- function _o(r, e) {
10163
+ function go(r, e) {
10136
10164
  let t = r;
10137
10165
  do {
10138
- const n = hs++;
10139
- _i[n] = t;
10166
+ const n = fs++;
10167
+ gi[n] = t;
10140
10168
  let s = t.x, i = t.y, o = t.x, a = t.y, c = 0;
10141
10169
  do {
10142
10170
  const d = t.next;
10143
10171
  t.z = n, d.x < s && (s = d.x), d.x > o && (o = d.x), d.y < i && (i = d.y), d.y > a && (a = d.y), t = d;
10144
- } while (++c < po && t !== e);
10145
- gi[n] = t;
10172
+ } while (++c < _o && t !== e);
10173
+ yi[n] = t;
10146
10174
  const l = n * 4;
10147
10175
  re[l] = s, re[l + 1] = i, re[l + 2] = o, re[l + 3] = a;
10148
10176
  } while (t !== e);
10149
10177
  }
10150
- function lu(r, e) {
10178
+ function du(r, e) {
10151
10179
  const t = r.z * 4;
10152
10180
  e.x < re[t] && (re[t] = e.x), e.y < re[t + 1] && (re[t + 1] = e.y), e.x > re[t + 2] && (re[t + 2] = e.x), e.y > re[t + 3] && (re[t + 3] = e.y);
10153
10181
  }
10154
- function kr(r) {
10155
- let e = gi[r];
10182
+ function Dr(r) {
10183
+ let e = yi[r];
10156
10184
  for (; e.prev.next !== e; ) e = e.next;
10157
- return gi[r] = e, e;
10185
+ return yi[r] = e, e;
10158
10186
  }
10159
- function Dr(r) {
10160
- let e = _i[r];
10187
+ function Ir(r) {
10188
+ let e = gi[r];
10161
10189
  for (; e.prev.next !== e; ) e = e.next;
10162
- return _i[r] = e, e;
10190
+ return gi[r] = e, e;
10163
10191
  }
10164
- function du(r, e) {
10192
+ function uu(r, e) {
10165
10193
  let t = e;
10166
10194
  const n = r.x, s = r.y;
10167
10195
  let i = -1 / 0, o;
10168
10196
  if (Cn(r, t)) return t;
10169
- for (let h = 0, f = 0; h < hs; h++, f += 4) {
10197
+ for (let h = 0, f = 0; h < fs; h++, f += 4) {
10170
10198
  if (s < re[f + 1] || s > re[f + 3] || re[f] > n || re[f + 2] <= i) continue;
10171
- const g = kr(h);
10172
- t = Dr(h);
10199
+ const g = Dr(h);
10200
+ t = Ir(h);
10173
10201
  do {
10174
10202
  if (t.prev.next === t) {
10175
10203
  if (Cn(r, t.next)) return t.next;
@@ -10185,39 +10213,39 @@ function du(r, e) {
10185
10213
  if (!o) return null;
10186
10214
  const a = o.x, c = o.y, l = Math.min(s, c), d = Math.max(s, c);
10187
10215
  let u = 1 / 0;
10188
- for (let h = 0, f = 0; h < hs; h++, f += 4) {
10216
+ for (let h = 0, f = 0; h < fs; h++, f += 4) {
10189
10217
  if (re[f + 2] < a || re[f] > n || re[f + 3] < l || re[f + 1] > d) continue;
10190
- const g = kr(h);
10191
- t = Dr(h);
10218
+ const g = Dr(h);
10219
+ t = Ir(h);
10192
10220
  do {
10193
10221
  if (t.prev.next === t && n >= t.x && t.x >= a && n !== t.x && // skip dead nodes
10194
- fs(s < c ? n : i, s, a, c, s < c ? i : n, s, t.x, t.y)) {
10222
+ ms(s < c ? n : i, s, a, c, s < c ? i : n, s, t.x, t.y)) {
10195
10223
  const y = Math.abs(s - t.y) / (n - t.x);
10196
- (On(t, r) || t.y === s && t.next.y === s && t.next.x > n) && (y < u || y === u && (t.x > o.x || t.x === o.x && uu(o, t))) && (o = t, u = y);
10224
+ (On(t, r) || t.y === s && t.next.y === s && t.next.x > n) && (y < u || y === u && (t.x > o.x || t.x === o.x && hu(o, t))) && (o = t, u = y);
10197
10225
  }
10198
10226
  t = t.next;
10199
10227
  } while (t !== g);
10200
10228
  }
10201
10229
  return o;
10202
10230
  }
10203
- function uu(r, e) {
10231
+ function hu(r, e) {
10204
10232
  return ae(r.prev, r, e.prev) < 0 && ae(e.next, r, r.next) < 0;
10205
10233
  }
10206
- const ke = [];
10234
+ const Oe = [];
10207
10235
  let jt = [], wt = new Uint32Array(0), cn = new Uint32Array(0);
10208
10236
  const ln = new Uint32Array(256);
10209
- function hu(r, e, t, n) {
10237
+ function fu(r, e, t, n) {
10210
10238
  let s = r, i = 0;
10211
10239
  do
10212
- s.z = yi(s.x, s.y, e, t, n), ke[i++] = s, s = s.next;
10240
+ s.z = vi(s.x, s.y, e, t, n), Oe[i++] = s, s = s.next;
10213
10241
  while (s !== r);
10214
- fu(i);
10242
+ mu(i);
10215
10243
  let o = null;
10216
10244
  for (let a = 0; a < i; a++) {
10217
- const c = ke[a];
10245
+ const c = Oe[a];
10218
10246
  c.prevZ = o, o && (o.nextZ = c), o = c;
10219
10247
  }
10220
- o.nextZ = null, ke.fill(
10248
+ o.nextZ = null, Oe.fill(
10221
10249
  /** @type {Node} */
10222
10250
  /** @type {unknown} */
10223
10251
  null,
@@ -10231,22 +10259,22 @@ function hu(r, e, t, n) {
10231
10259
  i
10232
10260
  );
10233
10261
  }
10234
- function fu(r) {
10262
+ function mu(r) {
10235
10263
  if (r <= 32) {
10236
10264
  for (let e = 1; e < r; e++) {
10237
- const t = ke[e], n = t.z;
10265
+ const t = Oe[e], n = t.z;
10238
10266
  let s = e - 1;
10239
- for (; s >= 0 && ke[s].z > n; )
10240
- ke[s + 1] = ke[s], s--;
10241
- ke[s + 1] = t;
10267
+ for (; s >= 0 && Oe[s].z > n; )
10268
+ Oe[s + 1] = Oe[s], s--;
10269
+ Oe[s + 1] = t;
10242
10270
  }
10243
10271
  return;
10244
10272
  }
10245
10273
  wt.length < r && (wt = new Uint32Array(r), cn = new Uint32Array(r), jt = new Array(r));
10246
- for (let e = 0; e < r; e++) wt[e] = ke[e].z;
10247
- Kn(r, ke, wt, jt, cn, 0), Kn(r, jt, cn, ke, wt, 8), Kn(r, ke, wt, jt, cn, 16), Kn(r, jt, cn, ke, wt, 24);
10274
+ for (let e = 0; e < r; e++) wt[e] = Oe[e].z;
10275
+ qn(r, Oe, wt, jt, cn, 0), qn(r, jt, cn, Oe, wt, 8), qn(r, Oe, wt, jt, cn, 16), qn(r, jt, cn, Oe, wt, 24);
10248
10276
  }
10249
- function Kn(r, e, t, n, s, i) {
10277
+ function qn(r, e, t, n, s, i) {
10250
10278
  ln.fill(0);
10251
10279
  for (let a = 0; a < r; a++) ln[t[a] >>> i & 255]++;
10252
10280
  let o = 0;
@@ -10259,24 +10287,24 @@ function Kn(r, e, t, n, s, i) {
10259
10287
  n[l] = e[a], s[l] = c;
10260
10288
  }
10261
10289
  }
10262
- function yi(r, e, t, n, s) {
10290
+ function vi(r, e, t, n, s) {
10263
10291
  return r = (r - t) * s | 0, e = (e - n) * s | 0, r = (r | r << 8) & 16711935, r = (r | r << 4) & 252645135, r = (r | r << 2) & 858993459, r = (r | r << 1) & 1431655765, e = (e | e << 8) & 16711935, e = (e | e << 4) & 252645135, e = (e | e << 2) & 858993459, e = (e | e << 1) & 1431655765, r | e << 1;
10264
10292
  }
10265
- function mu(r) {
10293
+ function pu(r) {
10266
10294
  let e = r, t = r;
10267
10295
  do
10268
10296
  (e.x < t.x || e.x === t.x && e.y < t.y) && (t = e), e = e.next;
10269
10297
  while (e !== r);
10270
10298
  return t;
10271
10299
  }
10272
- function fs(r, e, t, n, s, i, o, a) {
10300
+ function ms(r, e, t, n, s, i, o, a) {
10273
10301
  return (s - o) * (e - a) >= (r - o) * (i - a) && (r - o) * (n - a) >= (t - o) * (e - a) && (t - o) * (i - a) >= (s - o) * (n - a);
10274
10302
  }
10275
- function pu(r, e) {
10303
+ function _u(r, e) {
10276
10304
  const t = Cn(r, e) && ae(r.prev, r, r.next) > 0 && ae(e.prev, e, e.next) > 0;
10277
10305
  return r.next.i !== e.i && (t || On(r, e) && On(e, r) && // // locally visible
10278
10306
  (ae(r.prev, r, e.prev) !== 0 || ae(r, e.prev, e) !== 0)) && // no opposite-facing sectors
10279
- !_u(r, e) && (t || gu(r, e));
10307
+ !gu(r, e) && (t || yu(r, e));
10280
10308
  }
10281
10309
  function ae(r, e, t) {
10282
10310
  return (e.y - r.y) * (t.x - e.x) - (e.x - r.x) * (t.y - e.y);
@@ -10284,14 +10312,14 @@ function ae(r, e, t) {
10284
10312
  function Cn(r, e) {
10285
10313
  return r.x === e.x && r.y === e.y;
10286
10314
  }
10287
- function go(r, e, t, n, s = !0) {
10315
+ function yo(r, e, t, n, s = !0) {
10288
10316
  const i = ae(r, e, t), o = ae(r, e, n), a = ae(t, n, r), c = ae(t, n, e);
10289
- return (i > 0 && o < 0 || i < 0 && o > 0) && (a > 0 && c < 0 || a < 0 && c > 0) ? !0 : s ? !!(i === 0 && qn(r, t, e) || o === 0 && qn(r, n, e) || a === 0 && qn(t, r, n) || c === 0 && qn(t, e, n)) : !1;
10317
+ return (i > 0 && o < 0 || i < 0 && o > 0) && (a > 0 && c < 0 || a < 0 && c > 0) ? !0 : s ? !!(i === 0 && Jn(r, t, e) || o === 0 && Jn(r, n, e) || a === 0 && Jn(t, r, n) || c === 0 && Jn(t, e, n)) : !1;
10290
10318
  }
10291
- function qn(r, e, t) {
10319
+ function Jn(r, e, t) {
10292
10320
  return e.x <= Math.max(r.x, t.x) && e.x >= Math.min(r.x, t.x) && e.y <= Math.max(r.y, t.y) && e.y >= Math.min(r.y, t.y);
10293
10321
  }
10294
- function _u(r, e) {
10322
+ function gu(r, e) {
10295
10323
  const t = Math.min(r.x, e.x), n = Math.max(r.x, e.x), s = Math.min(r.y, e.y), i = Math.max(r.y, e.y);
10296
10324
  let o = r;
10297
10325
  do {
@@ -10300,7 +10328,7 @@ function _u(r, e) {
10300
10328
  o = a;
10301
10329
  continue;
10302
10330
  }
10303
- if (o.i !== r.i && a.i !== r.i && o.i !== e.i && a.i !== e.i && go(o, a, r, e)) return !0;
10331
+ if (o.i !== r.i && a.i !== r.i && o.i !== e.i && a.i !== e.i && yo(o, a, r, e)) return !0;
10304
10332
  o = a;
10305
10333
  } while (o !== r);
10306
10334
  return !1;
@@ -10308,7 +10336,7 @@ function _u(r, e) {
10308
10336
  function On(r, e) {
10309
10337
  return ae(r.prev, r, r.next) < 0 ? ae(r, e, r.next) >= 0 && ae(r, r.prev, e) >= 0 : ae(r, e, r.prev) < 0 || ae(r, r.next, e) < 0;
10310
10338
  }
10311
- function gu(r, e) {
10339
+ function yu(r, e) {
10312
10340
  let t = r, n = !1;
10313
10341
  const s = (r.x + e.x) / 2, i = (r.y + e.y) / 2;
10314
10342
  do {
@@ -10317,18 +10345,18 @@ function gu(r, e) {
10317
10345
  } while (t !== r);
10318
10346
  return n;
10319
10347
  }
10320
- function yo(r, e) {
10321
- const t = vi(r.i, r.x, r.y), n = vi(e.i, e.x, e.y), s = r.next, i = e.prev;
10348
+ function vo(r, e) {
10349
+ const t = xi(r.i, r.x, r.y), n = xi(e.i, e.x, e.y), s = r.next, i = e.prev;
10322
10350
  return r.next = e, e.prev = r, t.next = s, s.prev = t, n.next = t, t.prev = n, i.next = n, n.prev = i, n;
10323
10351
  }
10324
- function Ir(r, e, t, n) {
10325
- const s = vi(r, e, t);
10352
+ function Nr(r, e, t, n) {
10353
+ const s = xi(r, e, t);
10326
10354
  return n ? (s.next = n.next, s.prev = n, n.next.prev = s, n.next = s) : (s.prev = s, s.next = s), s;
10327
10355
  }
10328
- function kn(r) {
10329
- r.next.prev = r.prev, r.prev.next = r.next, r.prevZ && (r.prevZ.nextZ = r.nextZ), r.nextZ && (r.nextZ.prevZ = r.prevZ), pi && lu(r.prev, r.next);
10356
+ function Dn(r) {
10357
+ r.next.prev = r.prev, r.prev.next = r.next, r.prevZ && (r.prevZ.nextZ = r.nextZ), r.nextZ && (r.nextZ.prevZ = r.prevZ), _i && du(r.prev, r.next);
10330
10358
  }
10331
- function vi(r, e, t) {
10359
+ function xi(r, e, t) {
10332
10360
  return (
10333
10361
  /** @type {Node} */
10334
10362
  /** @type {unknown} */
@@ -10349,13 +10377,13 @@ function vi(r, e, t) {
10349
10377
  }
10350
10378
  );
10351
10379
  }
10352
- function yu(r, e, t, n) {
10380
+ function vu(r, e, t, n) {
10353
10381
  let s = 0;
10354
10382
  for (let i = e, o = t - n; i < t; i += n)
10355
10383
  s += (r[o] - r[i]) * (r[i + 1] + r[o + 1]), o = i;
10356
10384
  return s;
10357
10385
  }
10358
- function vu(r, e) {
10386
+ function xu(r, e) {
10359
10387
  const t = [], n = (i) => {
10360
10388
  for (let o = 0; o < t.length; o++)
10361
10389
  if (t[o].distanceTo(i) <= e) return o;
@@ -10367,7 +10395,7 @@ function vu(r, e) {
10367
10395
  }
10368
10396
  return { segments: s, points: t };
10369
10397
  }
10370
- function Ys(r) {
10398
+ function Ks(r) {
10371
10399
  let e = 0;
10372
10400
  for (let t = 0; t < r.length; t++) {
10373
10401
  const n = (t + 1) % r.length;
@@ -10375,7 +10403,7 @@ function Ys(r) {
10375
10403
  }
10376
10404
  return e / 2;
10377
10405
  }
10378
- function xu(r, e, t = 1e-9) {
10406
+ function bu(r, e, t = 1e-9) {
10379
10407
  let n = !1;
10380
10408
  const s = r.x, i = r.y;
10381
10409
  for (let o = 0, a = e.length - 1; o < e.length; a = o++) {
@@ -10386,13 +10414,13 @@ function xu(r, e, t = 1e-9) {
10386
10414
  }
10387
10415
  return n;
10388
10416
  }
10389
- function bu(r, e) {
10417
+ function wu(r, e) {
10390
10418
  const t = r.reduce((s, i) => s + i.x, 0) / r.length, n = r.reduce((s, i) => s + i.y, 0) / r.length;
10391
- return xu(new p.Vector2(t, n), e);
10419
+ return bu(new p.Vector2(t, n), e);
10392
10420
  }
10393
- function wu(r, e) {
10421
+ function Eu(r, e) {
10394
10422
  if (r.length < 3) return [];
10395
- const { points: t, segments: n } = vu(r, e);
10423
+ const { points: t, segments: n } = xu(r, e);
10396
10424
  if (n.length < 3) return [];
10397
10425
  const s = Array.from({ length: t.length }, () => []), i = (l, d) => l < d ? `${l},${d}` : `${d},${l}`, o = /* @__PURE__ */ new Set();
10398
10426
  for (const [l, d] of n) {
@@ -10436,7 +10464,7 @@ function wu(r, e) {
10436
10464
  }
10437
10465
  return c.map((l) => l.map((d) => t[d]));
10438
10466
  }
10439
- function Eu(r, e, t, n) {
10467
+ function Au(r, e, t, n) {
10440
10468
  let s = r.distanceToPoint(e), i = r.distanceToPoint(t), o = r.distanceToPoint(n);
10441
10469
  const a = 1e-10;
10442
10470
  if (Math.abs(s) < a && (s = 0), Math.abs(i) < a && (i = 0), Math.abs(o) < a && (o = 0), s >= 0 == i >= 0 && s >= 0 == o >= 0) return null;
@@ -10460,7 +10488,7 @@ function Eu(r, e, t, n) {
10460
10488
  d.every((h) => h.distanceTo(u) >= a) && d.push(u);
10461
10489
  return d.length >= 2 ? [d[0], d[1]] : null;
10462
10490
  }
10463
- function Au(r) {
10491
+ function Tu(r) {
10464
10492
  r.traverse((e) => {
10465
10493
  var t;
10466
10494
  if (e.isMesh || e.isLine) {
@@ -10475,52 +10503,52 @@ function Au(r) {
10475
10503
  }
10476
10504
  });
10477
10505
  }
10478
- function Tu(r, e, t) {
10506
+ function Su(r, e, t) {
10479
10507
  const n = (t == null ? void 0 : t.epsilon) ?? 1e-3, s = (t == null ? void 0 : t.color) ?? 16737792, i = (t == null ? void 0 : t.side) ?? p.DoubleSide, o = (t == null ? void 0 : t.polygon_offset) ?? !0, a = (t == null ? void 0 : t.polygon_offset_factor) ?? -1, c = (t == null ? void 0 : t.polygon_offset_units) ?? -1, l = [];
10480
10508
  r.traverse((R) => {
10481
- const O = R;
10482
- if (!O.isMesh || !O.visible || !O.geometry.index || !O.geometry.attributes.position) return;
10483
- const N = O.geometry.attributes.position, G = O.geometry.index, Z = O.matrixWorld;
10484
- for (let k = 0; k < G.count; k += 3) {
10485
- const ee = new p.Vector3(N.getX(G.getX(k)), N.getY(G.getX(k)), N.getZ(G.getX(k))).applyMatrix4(Z), $ = new p.Vector3(
10486
- N.getX(G.getX(k + 1)),
10487
- N.getY(G.getX(k + 1)),
10488
- N.getZ(G.getX(k + 1))
10509
+ const C = R;
10510
+ if (!C.isMesh || !C.visible || !C.geometry.index || !C.geometry.attributes.position) return;
10511
+ const N = C.geometry.attributes.position, G = C.geometry.index, Z = C.matrixWorld;
10512
+ for (let O = 0; O < G.count; O += 3) {
10513
+ const ee = new p.Vector3(N.getX(G.getX(O)), N.getY(G.getX(O)), N.getZ(G.getX(O))).applyMatrix4(Z), $ = new p.Vector3(
10514
+ N.getX(G.getX(O + 1)),
10515
+ N.getY(G.getX(O + 1)),
10516
+ N.getZ(G.getX(O + 1))
10489
10517
  ).applyMatrix4(Z), be = new p.Vector3(
10490
- N.getX(G.getX(k + 2)),
10491
- N.getY(G.getX(k + 2)),
10492
- N.getZ(G.getX(k + 2))
10493
- ).applyMatrix4(Z), le = Eu(e, ee, $, be);
10518
+ N.getX(G.getX(O + 2)),
10519
+ N.getY(G.getX(O + 2)),
10520
+ N.getZ(G.getX(O + 2))
10521
+ ).applyMatrix4(Z), le = Au(e, ee, $, be);
10494
10522
  le && l.push(le);
10495
10523
  }
10496
10524
  });
10497
- const d = wu(l, n);
10525
+ const d = Eu(l, n);
10498
10526
  if (d.length === 0) return null;
10499
- const u = new p.Vector3(0, 1, 0), h = new p.Vector3(1, 0, 0), f = new p.Vector3().crossVectors(e.normal, Math.abs(e.normal.dot(u)) < 0.9 ? u : h).normalize(), g = new p.Vector3().crossVectors(e.normal, f).normalize(), y = (R) => R.map((O) => new p.Vector2(O.dot(f), O.dot(g))), x = d.map(y), b = x.map((R, O) => ({ i: O, area: Math.abs(Ys(R)) })).sort((R, O) => O.area - R.area).map((R) => R.i), w = b.map((R) => d[R]), T = b.map((R) => x[R]), v = (t == null ? void 0 : t.plane_offset) ?? 1e-4, P = e.normal.clone().multiplyScalar(v), V = [], F = new Array(w.length).fill(!1);
10527
+ const u = new p.Vector3(0, 1, 0), h = new p.Vector3(1, 0, 0), f = new p.Vector3().crossVectors(e.normal, Math.abs(e.normal.dot(u)) < 0.9 ? u : h).normalize(), g = new p.Vector3().crossVectors(e.normal, f).normalize(), y = (R) => R.map((C) => new p.Vector2(C.dot(f), C.dot(g))), x = d.map(y), b = x.map((R, C) => ({ i: C, area: Math.abs(Ks(R)) })).sort((R, C) => C.area - R.area).map((R) => R.i), w = b.map((R) => d[R]), T = b.map((R) => x[R]), v = (t == null ? void 0 : t.plane_offset) ?? 1e-4, P = e.normal.clone().multiplyScalar(v), V = [], F = new Array(w.length).fill(!1);
10500
10528
  for (let R = 0; R < w.length; R++) {
10501
10529
  if (F[R]) continue;
10502
- const O = w[R], N = T[R], G = [], Z = [];
10530
+ const C = w[R], N = T[R], G = [], Z = [];
10503
10531
  for (let z = R + 1; z < w.length; z++)
10504
- !F[z] && bu(T[z], N) && (G.push(w[z]), Z.push(T[z]), F[z] = !0);
10505
- F[R] = !0, Ys(N) < 0 && (N.reverse(), O.reverse());
10532
+ !F[z] && wu(T[z], N) && (G.push(w[z]), Z.push(T[z]), F[z] = !0);
10533
+ F[R] = !0, Ks(N) < 0 && (N.reverse(), C.reverse());
10506
10534
  for (let z = 0; z < Z.length; z++)
10507
- Ys(Z[z]) > 0 && (Z[z].reverse(), G[z].reverse());
10508
- const k = [...N, ...Z.flat()], ee = [];
10509
- for (const z of k)
10535
+ Ks(Z[z]) > 0 && (Z[z].reverse(), G[z].reverse());
10536
+ const O = [...N, ...Z.flat()], ee = [];
10537
+ for (const z of O)
10510
10538
  ee.push(z.x, z.y);
10511
10539
  const $ = [];
10512
10540
  let be = N.length;
10513
10541
  for (const z of Z)
10514
10542
  $.push(be), be += z.length;
10515
- const le = eu(ee, $.length > 0 ? $ : void 0, 2);
10543
+ const le = tu(ee, $.length > 0 ? $ : void 0, 2);
10516
10544
  if (!le || le.length < 3) continue;
10517
10545
  const Ue = [];
10518
10546
  for (let z = 0; z < le.length; z += 3) {
10519
- const Re = k[le[z]], Ct = k[le[z + 1]], Je = k[le[z + 2]];
10520
- Math.abs((Ct.x - Re.x) * (Je.y - Re.y) - (Ct.y - Re.y) * (Je.x - Re.x)) > 1e-10 && Ue.push(le[z], le[z + 1], le[z + 2]);
10547
+ const Re = O[le[z]], kt = O[le[z + 1]], Je = O[le[z + 2]];
10548
+ Math.abs((kt.x - Re.x) * (Je.y - Re.y) - (kt.y - Re.y) * (Je.x - Re.x)) > 1e-10 && Ue.push(le[z], le[z + 1], le[z + 2]);
10521
10549
  }
10522
10550
  if (Ue.length < 3) continue;
10523
- const Se = Ue, ne = [...O, ...G.flat()], ue = new Float32Array(ne.length * 3);
10551
+ const Se = Ue, ne = [...C, ...G.flat()], ue = new Float32Array(ne.length * 3);
10524
10552
  for (let z = 0; z < ne.length; z++) {
10525
10553
  const Re = ne[z].clone().add(P);
10526
10554
  ue[z * 3] = Re.x, ue[z * 3 + 1] = Re.y, ue[z * 3 + 2] = Re.z;
@@ -10542,7 +10570,7 @@ function Tu(r, e, t) {
10542
10570
  for (const R of V) L.add(R);
10543
10571
  return L;
10544
10572
  }
10545
- class Su extends EventTarget {
10573
+ class Ru extends EventTarget {
10546
10574
  constructor(t) {
10547
10575
  super();
10548
10576
  _(this, "bounds");
@@ -10682,7 +10710,7 @@ class Su extends EventTarget {
10682
10710
  this.clear_caps();
10683
10711
  const t = this.model;
10684
10712
  for (const n of this.build_planes()) {
10685
- const s = Tu(t, n, {
10713
+ const s = Su(t, n, {
10686
10714
  color: this.cap_color,
10687
10715
  clipping_planes: this.planes
10688
10716
  });
@@ -10697,7 +10725,7 @@ class Su extends EventTarget {
10697
10725
  if (!n.isMesh) return;
10698
10726
  const s = n;
10699
10727
  if (!s.geometry || !s.geometry.index) return;
10700
- const i = new Qd(s, new hi(20, !0, "#222222"));
10728
+ const i = new eu(s, new fi(20, !0, "#222222"));
10701
10729
  i.visible = this.outline_active, this.outline_meshes.push(i), s.add(i);
10702
10730
  });
10703
10731
  }
@@ -10722,7 +10750,7 @@ class Su extends EventTarget {
10722
10750
  }));
10723
10751
  for (const s of this.outline_meshes) {
10724
10752
  const i = s.material;
10725
- !Array.isArray(i) && i instanceof hi && i.set_clip_planes(n);
10753
+ !Array.isArray(i) && i instanceof fi && i.set_clip_planes(n);
10726
10754
  }
10727
10755
  }
10728
10756
  clear_caps() {
@@ -10732,7 +10760,7 @@ class Su extends EventTarget {
10732
10760
  }
10733
10761
  this.remove_outlines_for_group(this.caps);
10734
10762
  for (const t of this.caps)
10735
- this.scene.remove(t), Au(t);
10763
+ this.scene.remove(t), Tu(t);
10736
10764
  this.caps = [];
10737
10765
  }
10738
10766
  remove_visuals() {
@@ -10787,21 +10815,21 @@ class Su extends EventTarget {
10787
10815
  this.bound_handlers = [];
10788
10816
  }
10789
10817
  }
10790
- class Ru extends EventTarget {
10818
+ class Mu extends EventTarget {
10791
10819
  constructor(t) {
10792
10820
  super();
10793
10821
  _(this, "viewer");
10794
10822
  _(this, "gizmo");
10795
10823
  _(this, "section_box");
10796
10824
  _(this, "sectioned_model");
10797
- this.viewer = t, this.section_box = new Su();
10825
+ this.viewer = t, this.section_box = new Ru();
10798
10826
  }
10799
10827
  /**
10800
10828
  * Create gizmo and enter interactive edit mode
10801
10829
  * @param model - Model to fit the section box to
10802
10830
  */
10803
10831
  create_for_model(t) {
10804
- this.gizmo && this.dispose_gizmo(), this.gizmo = new Kd(), this.gizmo.fit_to_model(t.group), this.gizmo.enter_edit_mode(
10832
+ this.gizmo && this.dispose_gizmo(), this.gizmo = new qd(), this.gizmo.fit_to_model(t.group), this.gizmo.enter_edit_mode(
10805
10833
  this.viewer.scene,
10806
10834
  this.viewer.camera,
10807
10835
  this.viewer.renderer.domElement,
@@ -10905,21 +10933,21 @@ class Ou extends EventTarget {
10905
10933
  if (this.glimmer = t, typeof n == "string")
10906
10934
  try {
10907
10935
  const s = JSON.parse(n);
10908
- this.story = Xn.parse(s);
10936
+ this.story = $n.parse(s);
10909
10937
  } catch (s) {
10910
10938
  throw j.error("Failed to parse story JSON:", s), new ve(
10911
10939
  `Invalid story JSON: ${s instanceof Error ? s.message : s}`,
10912
10940
  "StoryManager",
10913
- Oe.INVALID_STORY_JSON,
10941
+ Ce.INVALID_STORY_JSON,
10914
10942
  { error: s }
10915
10943
  );
10916
10944
  }
10917
10945
  else
10918
- this.story = Xn.parse(n);
10919
- j.info("StoryManager initialized with story:", this.story.title), this.glimmer.viewer.stop_camera_orbit_animation(), this.annotation_container = this._create_annotation_container(), this.annotation_2d_renderer = new Zd({ container: this.annotation_container }), this.annotation_3d_renderer = new Wd({
10946
+ this.story = $n.parse(n);
10947
+ j.info("StoryManager initialized with story:", this.story.title), this.glimmer.viewer.stop_camera_orbit_animation(), this.annotation_container = this._create_annotation_container(), this.annotation_2d_renderer = new Wd({ container: this.annotation_container }), this.annotation_3d_renderer = new Xd({
10920
10948
  scene: this.glimmer.viewer.scene,
10921
10949
  group_name: "story-annotations"
10922
- }), this.trigger_manager = new Xd(), this.transition_manager = new $d(this.glimmer.viewer.camera, this.glimmer.viewer.controls), this.section_box_manager = new Ru(this.glimmer.viewer), this.goto(0);
10950
+ }), this.trigger_manager = new $d(), this.transition_manager = new Yd(this.glimmer.viewer.camera, this.glimmer.viewer.controls), this.section_box_manager = new Mu(this.glimmer.viewer), this.goto(0);
10923
10951
  }
10924
10952
  /**
10925
10953
  * Navigate to the next slide
@@ -11026,7 +11054,7 @@ class Ou extends EventTarget {
11026
11054
  },
11027
11055
  section_box_enabled: !1
11028
11056
  }, a = this.section_box_manager.get_bounds();
11029
- return a && (o.section_box = a, o.section_box_enabled = !0), ts.parse(o);
11057
+ return a && (o.section_box = a, o.section_box_enabled = !0), ns.parse(o);
11030
11058
  }
11031
11059
  /**
11032
11060
  * Export the story as JSON
@@ -11041,7 +11069,7 @@ class Ou extends EventTarget {
11041
11069
  * @returns The index where the slide was added
11042
11070
  */
11043
11071
  add_slide(t, n) {
11044
- const s = ts.parse(t), i = n !== void 0 ? Math.max(0, Math.min(n, this.story.slides.length)) : this.story.slides.length;
11072
+ const s = ns.parse(t), i = n !== void 0 ? Math.max(0, Math.min(n, this.story.slides.length)) : this.story.slides.length;
11045
11073
  return this.story.slides.splice(i, 0, s), j.info(`Added slide "${s.id}" at index ${i}`), this._emit_story_change("add", i), i;
11046
11074
  }
11047
11075
  /**
@@ -11054,9 +11082,9 @@ class Ou extends EventTarget {
11054
11082
  throw new ve(
11055
11083
  `Invalid slide index: ${t}. Valid range: 0-${this.story.slides.length - 1}`,
11056
11084
  "StoryManager",
11057
- Oe.INVALID_STORY_JSON
11085
+ Ce.INVALID_STORY_JSON
11058
11086
  );
11059
- const s = { ...this.story.slides[t], ...n }, i = ts.parse(s);
11087
+ const s = { ...this.story.slides[t], ...n }, i = ns.parse(s);
11060
11088
  this.story.slides[t] = i, j.info(`Updated slide at index ${t}: "${i.id}"`), this._emit_story_change("update", t), t === this.current_index && this.goto(t);
11061
11089
  }
11062
11090
  /**
@@ -11068,13 +11096,13 @@ class Ou extends EventTarget {
11068
11096
  throw new ve(
11069
11097
  "Cannot delete the last slide. Story must have at least one slide.",
11070
11098
  "StoryManager",
11071
- Oe.INVALID_STORY_JSON
11099
+ Ce.INVALID_STORY_JSON
11072
11100
  );
11073
11101
  if (t < 0 || t >= this.story.slides.length)
11074
11102
  throw new ve(
11075
11103
  `Invalid slide index: ${t}. Valid range: 0-${this.story.slides.length - 1}`,
11076
11104
  "StoryManager",
11077
- Oe.INVALID_STORY_JSON
11105
+ Ce.INVALID_STORY_JSON
11078
11106
  );
11079
11107
  const n = this.story.slides[t];
11080
11108
  this.story.slides.splice(t, 1), j.info(`Deleted slide at index ${t}: "${n.id}"`), this.current_index >= this.story.slides.length && (this.current_index = this.story.slides.length - 1), this._emit_story_change("delete", t), this.goto(this.current_index);
@@ -11089,13 +11117,13 @@ class Ou extends EventTarget {
11089
11117
  throw new ve(
11090
11118
  `Invalid from_index: ${t}. Valid range: 0-${this.story.slides.length - 1}`,
11091
11119
  "StoryManager",
11092
- Oe.INVALID_STORY_JSON
11120
+ Ce.INVALID_STORY_JSON
11093
11121
  );
11094
11122
  if (n < 0 || n >= this.story.slides.length)
11095
11123
  throw new ve(
11096
11124
  `Invalid to_index: ${n}. Valid range: 0-${this.story.slides.length - 1}`,
11097
11125
  "StoryManager",
11098
- Oe.INVALID_STORY_JSON
11126
+ Ce.INVALID_STORY_JSON
11099
11127
  );
11100
11128
  if (t === n)
11101
11129
  return;
@@ -11110,17 +11138,17 @@ class Ou extends EventTarget {
11110
11138
  if (typeof t == "string")
11111
11139
  try {
11112
11140
  const n = JSON.parse(t);
11113
- this.story = Xn.parse(n);
11141
+ this.story = $n.parse(n);
11114
11142
  } catch (n) {
11115
11143
  throw new ve(
11116
11144
  `Invalid story JSON: ${n instanceof Error ? n.message : n}`,
11117
11145
  "StoryManager",
11118
- Oe.INVALID_STORY_JSON,
11146
+ Ce.INVALID_STORY_JSON,
11119
11147
  { error: n }
11120
11148
  );
11121
11149
  }
11122
11150
  else
11123
- this.story = Xn.parse(t);
11151
+ this.story = $n.parse(t);
11124
11152
  j.info("Story replaced:", this.story.title), this.current_index = 0, this.goto(0), this._emit_story_change("replace", 0);
11125
11153
  }
11126
11154
  /**
@@ -11135,7 +11163,7 @@ class Ou extends EventTarget {
11135
11163
  throw new ve(
11136
11164
  `Annotation index ${t} out of range`,
11137
11165
  "StoryManager.add_annotation_anchor",
11138
- Oe.INVALID_SLIDE_INDEX
11166
+ Ce.INVALID_SLIDE_INDEX
11139
11167
  );
11140
11168
  i.annotations[t].anchor = {
11141
11169
  model_url: n,
@@ -11152,7 +11180,7 @@ class Ou extends EventTarget {
11152
11180
  throw new ve(
11153
11181
  `Annotation index ${t} out of range`,
11154
11182
  "StoryManager.remove_annotation_anchor",
11155
- Oe.INVALID_SLIDE_INDEX
11183
+ Ce.INVALID_SLIDE_INDEX
11156
11184
  );
11157
11185
  delete n.annotations[t].anchor, this._render_annotations(n.annotations), this._emit_story_change("update", this.current_index);
11158
11186
  }
@@ -11174,7 +11202,7 @@ class Ou extends EventTarget {
11174
11202
  throw new ve(
11175
11203
  "No model loaded. Cannot enter section box edit mode.",
11176
11204
  "StoryManager.enter_section_box_edit_mode",
11177
- Oe.MODEL_NOT_FOUND
11205
+ Ce.MODEL_NOT_FOUND
11178
11206
  );
11179
11207
  this.section_box_manager.create_for_model(n);
11180
11208
  }
@@ -11435,7 +11463,7 @@ _(Gt, "AXIS_COLORS", {
11435
11463
  z: 255
11436
11464
  // Blue
11437
11465
  });
11438
- let Nr = Gt;
11466
+ let Pr = Gt;
11439
11467
  const Zt = class Zt extends EventTarget {
11440
11468
  constructor() {
11441
11469
  super();
@@ -11611,22 +11639,22 @@ _(Zt, "AXIS_COLORS", {
11611
11639
  z: 255
11612
11640
  // Blue
11613
11641
  });
11614
- let Pr = Zt;
11642
+ let zr = Zt;
11615
11643
  export {
11616
- $c as Environment,
11644
+ Yc as Environment,
11617
11645
  Cu as Glimmer,
11618
- Il as Model,
11619
- vd as ModelManager,
11620
- Nr as MoveGizmo,
11621
- hi as OutlineMaterial,
11622
- Qd as OutlineMesh,
11623
- Yd as PlaneHandle,
11624
- Pr as RotateGizmo,
11625
- Su as SectionBox,
11626
- Kd as SectionBoxGizmo,
11627
- Ru as SectionBoxManager,
11628
- ri as Settings,
11646
+ Nl as Model,
11647
+ xd as ModelManager,
11648
+ Pr as MoveGizmo,
11649
+ fi as OutlineMaterial,
11650
+ eu as OutlineMesh,
11651
+ Kd as PlaneHandle,
11652
+ zr as RotateGizmo,
11653
+ Ru as SectionBox,
11654
+ qd as SectionBoxGizmo,
11655
+ Mu as SectionBoxManager,
11656
+ oi as Settings,
11629
11657
  Ou as StoryManager,
11630
- gl as Sun,
11631
- Vc as Viewer
11658
+ yl as Sun,
11659
+ Gc as Viewer
11632
11660
  };