aptechka 0.5.5 → 0.5.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/en3/index.js CHANGED
@@ -2,7 +2,7 @@ var ts = Object.defineProperty, ss = Object.defineProperties;
2
2
  var ns = Object.getOwnPropertyDescriptors;
3
3
  var tt = Object.getOwnPropertySymbols;
4
4
  var is = Object.prototype.hasOwnProperty, os = Object.prototype.propertyIsEnumerable;
5
- var st = (a, A, e) => A in a ? ts(a, A, { enumerable: !0, configurable: !0, writable: !0, value: e }) : a[A] = e, EA = (a, A) => {
5
+ var st = (a, A, e) => A in a ? ts(a, A, { enumerable: !0, configurable: !0, writable: !0, value: e }) : a[A] = e, cA = (a, A) => {
6
6
  for (var e in A || (A = {}))
7
7
  is.call(A, e) && st(a, e, A[e]);
8
8
  if (tt)
@@ -41,7 +41,7 @@ import { windowResizer as TA } from "../window-resizer/index.js";
41
41
  import { ticker as UA } from "../ticker/index.js";
42
42
  import { g as mt } from "../dom-0S_WDL4g.js";
43
43
  import "../path-data-polyfill-DgeDWYeI.js";
44
- import { Mesh as ge, OrthographicCamera as Ge, PerspectiveCamera as _e, Scene as Bs, REVISION as rs, WebGLRenderer as Cs, TextureLoader as Mt, TrianglesDrawMode as as, TriangleFanDrawMode as Pe, TriangleStripDrawMode as wt, Loader as Ze, LoaderUtils as XA, FileLoader as fA, Color as IA, LinearSRGBColorSpace as _, SpotLight as Is, PointLight as gs, DirectionalLight as Es, MeshBasicMaterial as PA, SRGBColorSpace as $, MeshPhysicalMaterial as AA, Vector2 as St, Matrix4 as xA, Vector3 as w, Quaternion as ze, InstancedMesh as cs, InstancedBufferAttribute as Qs, Object3D as $e, ImageBitmapLoader as hs, BufferAttribute as vA, InterleavedBuffer as ls, InterleavedBufferAttribute as ds, LinearFilter as Re, LinearMipmapLinearFilter as At, RepeatWrapping as Ye, PointsMaterial as us, Material as we, LineBasicMaterial as fs, MeshStandardMaterial as yt, DoubleSide as Ds, PropertyBinding as Fs, BufferGeometry as Lt, SkinnedMesh as Gs, LineSegments as Rs, Line as ps, LineLoop as ms, Points as Ms, Group as WA, MathUtils as ws, Skeleton as Ss, AnimationClip as ys, Bone as Ls, InterpolateLinear as Jt, ColorManagement as nt, NearestFilter as Js, NearestMipmapNearestFilter as Hs, LinearMipmapNearestFilter as Ts, NearestMipmapLinearFilter as Us, ClampToEdgeWrapping as xs, MirroredRepeatWrapping as Ns, InterpolateDiscrete as ks, FrontSide as bs, Texture as it, VectorKeyframeTrack as ot, NumberKeyframeTrack as Bt, QuaternionKeyframeTrack as rt, Box3 as Ks, Sphere as Os, Interpolant as _s, CompressedCubeTexture as Ps, UnsignedByteType as O, CompressedArrayTexture as Ys, CompressedTexture as Ht, RGBAFormat as FA, RGBA_ASTC_4x4_Format as qs, RGBA_BPTC_Format as Xs, RGBA_ETC2_EAC_Format as vs, RGBA_PVRTC_4BPPV1_Format as Ws, RGBA_S3TC_DXT5_Format as Vs, RGB_ETC1_Format as js, RGB_ETC2_Format as Zs, RGB_PVRTC_4BPPV1_Format as zs, RGB_S3TC_DXT1_Format as $s, FloatType as De, HalfFloatType as Fe, DataTexture as An, Data3DTexture as en, DisplayP3ColorSpace as tn, LinearDisplayP3ColorSpace as sn, NoColorSpace as Ct, RGFormat as YA, RedFormat as qA, RGBA_ASTC_6x6_Format as at, Plane as de, PlaneHelper as ue, BoxGeometry as nn, VideoTexture as on } from "three";
44
+ import { Mesh as ge, OrthographicCamera as Ge, PerspectiveCamera as _e, Scene as Bs, REVISION as rs, WebGLRenderer as Cs, TextureLoader as Mt, TrianglesDrawMode as as, TriangleFanDrawMode as Pe, TriangleStripDrawMode as wt, Loader as Ze, LoaderUtils as XA, FileLoader as fA, Color as gA, LinearSRGBColorSpace as _, SpotLight as Is, PointLight as gs, DirectionalLight as Es, MeshBasicMaterial as PA, SRGBColorSpace as $, MeshPhysicalMaterial as AA, Vector2 as St, Matrix4 as xA, Vector3 as w, Quaternion as ze, InstancedMesh as cs, InstancedBufferAttribute as Qs, Object3D as $e, ImageBitmapLoader as hs, BufferAttribute as vA, InterleavedBuffer as ls, InterleavedBufferAttribute as ds, LinearFilter as Re, LinearMipmapLinearFilter as At, RepeatWrapping as Ye, PointsMaterial as us, Material as we, LineBasicMaterial as fs, MeshStandardMaterial as yt, DoubleSide as Ds, PropertyBinding as Fs, BufferGeometry as Lt, SkinnedMesh as Gs, LineSegments as Rs, Line as ps, LineLoop as ms, Points as Ms, Group as WA, MathUtils as ws, Skeleton as Ss, AnimationClip as ys, Bone as Ls, InterpolateLinear as Jt, ColorManagement as nt, NearestFilter as Js, NearestMipmapNearestFilter as Hs, LinearMipmapNearestFilter as Ts, NearestMipmapLinearFilter as Us, ClampToEdgeWrapping as xs, MirroredRepeatWrapping as Ns, InterpolateDiscrete as ks, FrontSide as bs, Texture as it, VectorKeyframeTrack as ot, NumberKeyframeTrack as Bt, QuaternionKeyframeTrack as rt, Box3 as Ks, Sphere as Os, Interpolant as _s, CompressedCubeTexture as Ps, UnsignedByteType as O, CompressedArrayTexture as Ys, CompressedTexture as Ht, RGBAFormat as FA, RGBA_ASTC_4x4_Format as qs, RGBA_BPTC_Format as Xs, RGBA_ETC2_EAC_Format as vs, RGBA_PVRTC_4BPPV1_Format as Ws, RGBA_S3TC_DXT5_Format as Vs, RGB_ETC1_Format as js, RGB_ETC2_Format as Zs, RGB_PVRTC_4BPPV1_Format as zs, RGB_S3TC_DXT1_Format as $s, FloatType as De, HalfFloatType as Fe, DataTexture as An, Data3DTexture as en, DisplayP3ColorSpace as tn, LinearDisplayP3ColorSpace as sn, NoColorSpace as Ct, RGFormat as YA, RedFormat as qA, RGBA_ASTC_6x6_Format as at, Plane as de, PlaneHelper as ue, BoxGeometry as nn, VideoTexture as on } from "three";
45
45
  import { LayoutBox as qe } from "../layout-box/index.js";
46
46
  import { loading as Se } from "../loading/index.js";
47
47
  import { S as Bn } from "../SourceManager-D_8MZ3bR.js";
@@ -64,18 +64,20 @@ function Tt(a) {
64
64
  }
65
65
  });
66
66
  }
67
- var VA, L, QA, nA, iA, RA, oA, hA;
67
+ var VA, L, hA, nA, iA, RA, oA, BA;
68
68
  class gt {
69
69
  constructor(A, e) {
70
70
  F(this, VA, void 0);
71
71
  F(this, L, void 0);
72
- F(this, QA, void 0);
72
+ F(this, hA, void 0);
73
73
  F(this, nA, void 0);
74
74
  F(this, iA, void 0);
75
75
  F(this, RA, void 0);
76
76
  F(this, oA, void 0);
77
- F(this, hA, void 0);
78
- G(this, VA, A), G(this, L, (e == null ? void 0 : e.cameraType) === "orthographic" ? new Ge() : new _e()), G(this, QA, new Bs()), G(this, nA, []), G(this, iA, (e == null ? void 0 : e.cameraDistance) || 1e3), g(this, L).near = (e == null ? void 0 : e.cameraNear) || 1, g(this, L).far = (e == null ? void 0 : e.cameraFar) || 11e3, G(this, RA, (e == null ? void 0 : e.cameraFov) || "auto"), G(this, oA, mt(e == null ? void 0 : e.sizeElement) || document.documentElement), this.beforeRenderCallback = e == null ? void 0 : e.beforeRender, G(this, hA, new qe(g(this, oA)));
77
+ F(this, BA, void 0);
78
+ G(this, VA, A), G(this, L, (e == null ? void 0 : e.cameraType) === "orthographic" ? new Ge() : new _e()), G(this, hA, new Bs()), G(this, nA, []), G(this, iA, (e == null ? void 0 : e.cameraDistance) || 1e3), g(this, L).near = (e == null ? void 0 : e.cameraNear) || 1, g(this, L).far = (e == null ? void 0 : e.cameraFar) || 11e3, G(this, RA, (e == null ? void 0 : e.cameraFov) || "auto"), G(this, oA, mt(e == null ? void 0 : e.sizeElement) || document.documentElement), this.beforeRenderCallback = e == null ? void 0 : e.beforeRender, G(this, BA, new qe(g(this, oA))), g(this, BA).onScale(() => {
79
+ this.resize();
80
+ });
79
81
  }
80
82
  get name() {
81
83
  return g(this, VA);
@@ -84,10 +86,10 @@ class gt {
84
86
  return g(this, L);
85
87
  }
86
88
  get scene() {
87
- return g(this, QA);
89
+ return g(this, hA);
88
90
  }
89
91
  get box() {
90
- return g(this, hA);
92
+ return g(this, BA);
91
93
  }
92
94
  get cameraDistance() {
93
95
  return g(this, iA);
@@ -102,16 +104,16 @@ class gt {
102
104
  return g(this, oA) !== x.containerElement;
103
105
  }
104
106
  resize() {
105
- const { width: A, height: e } = g(this, hA);
107
+ const { width: A, height: e } = g(this, BA);
106
108
  g(this, L).position.z = g(this, iA), g(this, L) instanceof _e ? (g(this, L).aspect = A / e, g(this, L).fov = g(this, RA) === "auto" ? 2 * Math.atan(e / 2 / g(this, iA)) * (180 / Math.PI) : g(this, RA)) : g(this, L) instanceof Ge && (g(this, L).left = A / -2, g(this, L).right = A / 2, g(this, L).top = e / 2, g(this, L).bottom = e / -2), g(this, L).updateProjectionMatrix();
107
109
  }
108
110
  destroy() {
109
111
  g(this, nA).forEach((A) => {
110
112
  A.userData.box.destroy();
111
- }), g(this, QA).clear(), Tt(g(this, QA)), x.destroyView(this.name), g(this, hA).destroy();
113
+ }), g(this, hA).clear(), Tt(g(this, hA)), x.destroyView(this.name), g(this, BA).destroy();
112
114
  }
113
115
  attachToHTMLElement(A, e, s) {
114
- const t = new qe(A, he(EA({}, s), {
116
+ const t = new qe(A, he(cA({}, s), {
115
117
  containerElement: g(this, oA),
116
118
  cartesian: !0,
117
119
  scrollStep: !this.isClipped
@@ -129,14 +131,14 @@ class gt {
129
131
  this.scene.remove(A), e && this.detachFromHTMLElement(A);
130
132
  }
131
133
  }
132
- VA = new WeakMap(), L = new WeakMap(), QA = new WeakMap(), nA = new WeakMap(), iA = new WeakMap(), RA = new WeakMap(), oA = new WeakMap(), hA = new WeakMap();
133
- var pe, j, S, T, pA, mA, MA, jA, lA, ZA, zA;
134
+ VA = new WeakMap(), L = new WeakMap(), hA = new WeakMap(), nA = new WeakMap(), iA = new WeakMap(), RA = new WeakMap(), oA = new WeakMap(), BA = new WeakMap();
135
+ var pe, j, S, U, pA, mA, MA, jA, lA, ZA, zA;
134
136
  class rn {
135
137
  constructor() {
136
138
  F(this, pe, `https://unpkg.com/three@0.${rs}.x`);
137
139
  F(this, j, null);
138
140
  F(this, S, null);
139
- F(this, T, /* @__PURE__ */ new Map());
141
+ F(this, U, /* @__PURE__ */ new Map());
140
142
  F(this, pA, 0);
141
143
  F(this, mA, 0);
142
144
  F(this, MA, 0);
@@ -144,12 +146,10 @@ class rn {
144
146
  F(this, lA, !1);
145
147
  F(this, ZA, () => {
146
148
  var A;
147
- G(this, pA, g(this, j).clientWidth), G(this, mA, g(this, j).clientHeight), G(this, MA, Math.min(g(this, jA), devicePixelRatio || 1)), g(this, S).setPixelRatio(g(this, MA)), g(this, S).setSize(g(this, pA), g(this, mA)), g(this, T).forEach((e) => {
148
- e.resize();
149
- }), (A = this.onResize) == null || A.call(this);
149
+ G(this, pA, g(this, j).clientWidth), G(this, mA, g(this, j).clientHeight), G(this, MA, Math.min(g(this, jA), devicePixelRatio || 1)), g(this, S).setPixelRatio(g(this, MA)), g(this, S).setSize(g(this, pA), g(this, mA)), (A = this.onResize) == null || A.call(this);
150
150
  });
151
151
  F(this, zA, () => {
152
- g(this, S).setRenderTarget(null), g(this, T).forEach((A) => {
152
+ g(this, S).setRenderTarget(null), g(this, U).forEach((A) => {
153
153
  this.render(A);
154
154
  });
155
155
  });
@@ -164,7 +164,7 @@ class rn {
164
164
  return g(this, S);
165
165
  }
166
166
  get views() {
167
- return g(this, T);
167
+ return g(this, U);
168
168
  }
169
169
  get view() {
170
170
  return this.getView("default");
@@ -190,9 +190,9 @@ class rn {
190
190
  width: 100%;
191
191
  height: 100%;
192
192
  z-index: -1;
193
- `, g(this, j).append(g(this, S).domElement), g(this, T).set(
193
+ `, g(this, j).append(g(this, S).domElement), g(this, U).set(
194
194
  "default",
195
- new gt("default", EA({
195
+ new gt("default", cA({
196
196
  sizeElement: g(this, j)
197
197
  }, A == null ? void 0 : A.view))
198
198
  ), G(this, lA, !0), TA.subscribe(g(this, ZA), pt.EN3), UA.subscribe(g(this, zA), { order: je.EN3 });
@@ -204,24 +204,24 @@ class rn {
204
204
  );
205
205
  return;
206
206
  }
207
- TA.unsubscribe(g(this, ZA)), UA.unsubscribe(g(this, zA)), g(this, T).forEach((A) => {
207
+ TA.unsubscribe(g(this, ZA)), UA.unsubscribe(g(this, zA)), g(this, U).forEach((A) => {
208
208
  A.destroy();
209
209
  }), g(this, S).dispose(), g(this, S).domElement.remove(), G(this, S, null), G(this, lA, !1);
210
210
  }
211
211
  createView(A, e) {
212
- const s = g(this, T).size, t = new gt(A, e);
213
- return g(this, T).set(A, t), t.resize(), s === 1 && g(this, S).setScissorTest(!0), t;
212
+ const s = g(this, U).size, t = new gt(A, e);
213
+ return g(this, U).set(A, t), s === 1 && g(this, S).setScissorTest(!0), t;
214
214
  }
215
215
  getView(A) {
216
- return g(this, T).get(A);
216
+ return g(this, U).get(A);
217
217
  }
218
218
  destroyView(A) {
219
- const e = g(this, T).get(A);
220
- e && (g(this, T).delete(A), e.destroy(), g(this, T).size <= 1 && g(this, S).setScissorTest(!1));
219
+ const e = g(this, U).get(A);
220
+ e && (g(this, U).delete(A), e.destroy(), g(this, U).size <= 1 && g(this, S).setScissorTest(!1));
221
221
  }
222
222
  render(A) {
223
223
  var e;
224
- if (g(this, T).size > 1 || this.view.isClipped) {
224
+ if (g(this, U).size > 1 || this.view.isClipped) {
225
225
  const s = A.box.left + A.box.CSSTranslation.x + A.box.scrollValue.x, t = x.height - A.box.height - A.box.top + A.box.CSSTranslation.y + A.box.scrollValue.y * -1;
226
226
  g(this, S).setScissor(s, t, A.box.width, A.box.height), g(this, S).setViewport(
227
227
  s,
@@ -233,7 +233,7 @@ class rn {
233
233
  (e = A.beforeRenderCallback) == null || e.call(A), g(this, S).render(A.scene, A.camera);
234
234
  }
235
235
  }
236
- pe = new WeakMap(), j = new WeakMap(), S = new WeakMap(), T = new WeakMap(), pA = new WeakMap(), mA = new WeakMap(), MA = new WeakMap(), jA = new WeakMap(), lA = new WeakMap(), ZA = new WeakMap(), zA = new WeakMap();
236
+ pe = new WeakMap(), j = new WeakMap(), S = new WeakMap(), U = new WeakMap(), pA = new WeakMap(), mA = new WeakMap(), MA = new WeakMap(), jA = new WeakMap(), lA = new WeakMap(), ZA = new WeakMap(), zA = new WeakMap();
237
237
  const x = new rn(), Cn = new Mt();
238
238
  function Et(a, A) {
239
239
  if (A === as)
@@ -464,7 +464,7 @@ class gn {
464
464
  return t;
465
465
  const n = e.json, o = ((n.extensions && n.extensions[this.name] || {}).lights || [])[A];
466
466
  let r;
467
- const I = new IA(16777215);
467
+ const I = new gA(16777215);
468
468
  o.color !== void 0 && I.setRGB(o.color[0], o.color[1], o.color[2], _);
469
469
  const C = o.range !== void 0 ? o.range : 0;
470
470
  switch (o.type) {
@@ -502,7 +502,7 @@ class En {
502
502
  }
503
503
  extendParams(A, e, s) {
504
504
  const t = [];
505
- A.color = new IA(1, 1, 1), A.opacity = 1;
505
+ A.color = new gA(1, 1, 1), A.opacity = 1;
506
506
  const n = e.pbrMetallicRoughness;
507
507
  if (n) {
508
508
  if (Array.isArray(n.baseColorFactor)) {
@@ -575,7 +575,7 @@ class ln {
575
575
  if (!t.extensions || !t.extensions[this.name])
576
576
  return Promise.resolve();
577
577
  const n = [];
578
- e.sheenColor = new IA(0, 0, 0), e.sheenRoughness = 0, e.sheen = 1;
578
+ e.sheenColor = new gA(0, 0, 0), e.sheenRoughness = 0, e.sheen = 1;
579
579
  const i = t.extensions[this.name];
580
580
  if (i.sheenColorFactor !== void 0) {
581
581
  const B = i.sheenColorFactor;
@@ -615,7 +615,7 @@ class un {
615
615
  const n = [], i = t.extensions[this.name];
616
616
  e.thickness = i.thicknessFactor !== void 0 ? i.thicknessFactor : 0, i.thicknessTexture !== void 0 && n.push(s.assignTexture(e, "thicknessMap", i.thicknessTexture)), e.attenuationDistance = i.attenuationDistance || 1 / 0;
617
617
  const B = i.attenuationColor || [1, 1, 1];
618
- return e.attenuationColor = new IA().setRGB(B[0], B[1], B[2], _), Promise.all(n);
618
+ return e.attenuationColor = new gA().setRGB(B[0], B[1], B[2], _), Promise.all(n);
619
619
  }
620
620
  }
621
621
  class fn {
@@ -649,7 +649,7 @@ class Dn {
649
649
  const n = [], i = t.extensions[this.name];
650
650
  e.specularIntensity = i.specularFactor !== void 0 ? i.specularFactor : 1, i.specularTexture !== void 0 && n.push(s.assignTexture(e, "specularIntensityMap", i.specularTexture));
651
651
  const B = i.specularColorFactor || [1, 1, 1];
652
- return e.specularColor = new IA().setRGB(B[0], B[1], B[2], _), i.specularColorTexture !== void 0 && n.push(s.assignTexture(e, "specularColorMap", i.specularColorTexture, $)), Promise.all(n);
652
+ return e.specularColor = new gA().setRGB(B[0], B[1], B[2], _), i.specularColorTexture !== void 0 && n.push(s.assignTexture(e, "specularColorMap", i.specularColorTexture, $)), Promise.all(n);
653
653
  }
654
654
  }
655
655
  class Fn {
@@ -1009,7 +1009,7 @@ function xn(a) {
1009
1009
  side: bs
1010
1010
  })), a.DefaultMaterial;
1011
1011
  }
1012
- function cA(a, A, e) {
1012
+ function QA(a, A, e) {
1013
1013
  for (const s in e.extensions)
1014
1014
  a[s] === void 0 && (A.userData.gltfExtensions = A.userData.gltfExtensions || {}, A.userData.gltfExtensions[s] = e.extensions[s]);
1015
1015
  }
@@ -1131,7 +1131,7 @@ class _n {
1131
1131
  parser: s,
1132
1132
  userData: {}
1133
1133
  };
1134
- return cA(n, B, t), sA(B, t), Promise.all(s._invokeAll(function(o) {
1134
+ return QA(n, B, t), sA(B, t), Promise.all(s._invokeAll(function(o) {
1135
1135
  return o.afterRoot && o.afterRoot(B);
1136
1136
  })).then(function() {
1137
1137
  for (const o of B.scenes)
@@ -1336,8 +1336,8 @@ class _n {
1336
1336
  const d = ye.SCALAR, u = GA[t.sparse.indices.componentType], f = t.sparse.indices.byteOffset || 0, D = t.sparse.values.byteOffset || 0, p = new u(i[1], f, t.sparse.count * d), m = new r(i[2], D, t.sparse.count * o);
1337
1337
  B !== null && (E = new vA(E.array.slice(), E.itemSize, E.normalized));
1338
1338
  for (let M = 0, P = p.length; M < P; M++) {
1339
- const U = p[M];
1340
- if (E.setX(U, m[M * o]), o >= 2 && E.setY(U, m[M * o + 1]), o >= 3 && E.setZ(U, m[M * o + 2]), o >= 4 && E.setW(U, m[M * o + 3]), o >= 5)
1339
+ const T = p[M];
1340
+ if (E.setX(T, m[M * o]), o >= 2 && E.setY(T, m[M * o + 1]), o >= 3 && E.setZ(T, m[M * o + 2]), o >= 4 && E.setW(T, m[M * o + 3]), o >= 5)
1341
1341
  throw new Error("THREE.GLTFLoader: Unsupported itemSize in sparse BufferAttribute.");
1342
1342
  }
1343
1343
  }
@@ -1468,7 +1468,7 @@ class _n {
1468
1468
  i = C.getMaterialType(), r.push(C.extendParams(B, n, e));
1469
1469
  } else {
1470
1470
  const C = n.pbrMetallicRoughness || {};
1471
- if (B.color = new IA(1, 1, 1), B.opacity = 1, Array.isArray(C.baseColorFactor)) {
1471
+ if (B.color = new gA(1, 1, 1), B.opacity = 1, Array.isArray(C.baseColorFactor)) {
1472
1472
  const c = C.baseColorFactor;
1473
1473
  B.color.setRGB(c[0], c[1], c[2], _), B.opacity = c[3];
1474
1474
  }
@@ -1486,11 +1486,11 @@ class _n {
1486
1486
  }
1487
1487
  if (n.occlusionTexture !== void 0 && i !== PA && (r.push(e.assignTexture(B, "aoMap", n.occlusionTexture)), n.occlusionTexture.strength !== void 0 && (B.aoMapIntensity = n.occlusionTexture.strength)), n.emissiveFactor !== void 0 && i !== PA) {
1488
1488
  const C = n.emissiveFactor;
1489
- B.emissive = new IA().setRGB(C[0], C[1], C[2], _);
1489
+ B.emissive = new gA().setRGB(C[0], C[1], C[2], _);
1490
1490
  }
1491
1491
  return n.emissiveTexture !== void 0 && i !== PA && r.push(e.assignTexture(B, "emissiveMap", n.emissiveTexture, $)), Promise.all(r).then(function() {
1492
1492
  const C = new i(B);
1493
- return n.name && (C.name = n.name), sA(C, n), e.associations.set(C, { materials: A }), n.extensions && cA(t, C, n), C;
1493
+ return n.name && (C.name = n.name), sA(C, n), e.associations.set(C, { materials: A }), n.extensions && QA(t, C, n), C;
1494
1494
  });
1495
1495
  }
1496
1496
  /** When Object3D instances are targeted by animation, they need unique names. */
@@ -1554,7 +1554,7 @@ class _n {
1554
1554
  d = new Ms(h, u);
1555
1555
  else
1556
1556
  throw new Error("THREE.GLTFLoader: Primitive mode unsupported: " + E.mode);
1557
- Object.keys(d.geometry.morphAttributes).length > 0 && kn(d, n), d.name = e.createUniqueName(n.name || "mesh_" + A), sA(d, n), E.extensions && cA(t, d, E), e.assignFinalMaterial(d), C.push(d);
1557
+ Object.keys(d.geometry.morphAttributes).length > 0 && kn(d, n), d.name = e.createUniqueName(n.name || "mesh_" + A), sA(d, n), E.extensions && QA(t, d, E), e.assignFinalMaterial(d), C.push(d);
1558
1558
  }
1559
1559
  for (let Q = 0, l = C.length; Q < l; Q++)
1560
1560
  e.associations.set(C[Q], {
@@ -1562,9 +1562,9 @@ class _n {
1562
1562
  primitives: Q
1563
1563
  });
1564
1564
  if (C.length === 1)
1565
- return n.extensions && cA(t, C[0], n), C[0];
1565
+ return n.extensions && QA(t, C[0], n), C[0];
1566
1566
  const c = new WA();
1567
- n.extensions && cA(t, c, n), e.associations.set(c, { meshes: A });
1567
+ n.extensions && QA(t, c, n), e.associations.set(c, { meshes: A });
1568
1568
  for (let Q = 0, l = C.length; Q < l; Q++)
1569
1569
  c.add(C[Q]);
1570
1570
  return c;
@@ -1631,10 +1631,10 @@ class _n {
1631
1631
  if (D === void 0)
1632
1632
  continue;
1633
1633
  D.updateMatrix && D.updateMatrix();
1634
- const U = s._createAnimationTracks(D, p, m, M, P);
1635
- if (U)
1636
- for (let v = 0; v < U.length; v++)
1637
- d.push(U[v]);
1634
+ const T = s._createAnimationTracks(D, p, m, M, P);
1635
+ if (T)
1636
+ for (let v = 0; v < T.length; v++)
1637
+ d.push(T[v]);
1638
1638
  }
1639
1639
  return new ys(n, void 0, d);
1640
1640
  });
@@ -1694,7 +1694,7 @@ class _n {
1694
1694
  if (n.isBone === !0 ? I = new Ls() : r.length > 1 ? I = new WA() : r.length === 1 ? I = r[0] : I = new $e(), I !== r[0])
1695
1695
  for (let C = 0, c = r.length; C < c; C++)
1696
1696
  I.add(r[C]);
1697
- if (n.name && (I.userData.name = n.name, I.name = i), sA(I, n), n.extensions && cA(s, I, n), n.matrix !== void 0) {
1697
+ if (n.name && (I.userData.name = n.name, I.name = i), sA(I, n), n.extensions && QA(s, I, n), n.matrix !== void 0) {
1698
1698
  const C = new xA();
1699
1699
  C.fromArray(n.matrix), I.applyMatrix4(C);
1700
1700
  } else
@@ -1709,7 +1709,7 @@ class _n {
1709
1709
  */
1710
1710
  loadScene(A) {
1711
1711
  const e = this.extensions, s = this.json.scenes[A], t = this, n = new WA();
1712
- s.name && (n.name = t.createUniqueName(s.name)), sA(n, s), s.extensions && cA(e, n, s);
1712
+ s.name && (n.name = t.createUniqueName(s.name)), sA(n, s), s.extensions && QA(e, n, s);
1713
1713
  const i = s.nodes || [], B = [];
1714
1714
  for (let o = 0, r = i.length; o < r; o++)
1715
1715
  B.push(t.getDependency("node", i[o]));
@@ -1927,7 +1927,7 @@ class Yn extends Ze {
1927
1927
  _assignVertexColorSpace(A, e) {
1928
1928
  if (e !== $)
1929
1929
  return;
1930
- const s = new IA();
1930
+ const s = new gA();
1931
1931
  for (let t = 0, n = A.count; t < n; t++)
1932
1932
  s.fromBufferAttribute(A, t).convertSRGBToLinear(), A.setXYZ(t, s.r, s.g, s.b);
1933
1933
  }
@@ -2198,8 +2198,8 @@ function Ai(a) {
2198
2198
  const d = new OA(a, I, C, !0), u = d._nextUint16(), f = d._nextUint16(), D = d._nextUint32(), p = d._nextUint32(), m = d._nextUint32(), M = d._nextUint32(), P = [];
2199
2199
  for (let J = 0; J < n; J++)
2200
2200
  P.push({ imageFlags: d._nextUint32(), rgbSliceByteOffset: d._nextUint32(), rgbSliceByteLength: d._nextUint32(), alphaSliceByteOffset: d._nextUint32(), alphaSliceByteLength: d._nextUint32() });
2201
- const U = I + d._offset, v = U + D, NA = v + p, Ee = NA + m, gA = new Uint8Array(a.buffer, a.byteOffset + U, D), ce = new Uint8Array(a.buffer, a.byteOffset + v, p), eA = new Uint8Array(a.buffer, a.byteOffset + NA, m), Qe = new Uint8Array(a.buffer, a.byteOffset + Ee, M);
2202
- return e.globalData = { endpointCount: u, selectorCount: f, imageDescs: P, endpointsData: gA, selectorsData: ce, tablesData: eA, extendedData: Qe }, e;
2201
+ const T = I + d._offset, v = T + D, NA = v + p, Ee = NA + m, EA = new Uint8Array(a.buffer, a.byteOffset + T, D), ce = new Uint8Array(a.buffer, a.byteOffset + v, p), eA = new Uint8Array(a.buffer, a.byteOffset + NA, m), Qe = new Uint8Array(a.buffer, a.byteOffset + Ee, M);
2202
+ return e.globalData = { endpointCount: u, selectorCount: f, imageDescs: P, endpointsData: EA, selectorsData: ce, tablesData: eA, extendedData: Qe }, e;
2203
2203
  }
2204
2204
  let Te, V, We;
2205
2205
  const Ue = { env: { emscripten_notify_memory_growth: function(a) {
@@ -2404,22 +2404,22 @@ X.BasisWorker = function() {
2404
2404
  }
2405
2405
  if (!h.isValid())
2406
2406
  throw E(), new Error("THREE.KTX2Loader: Invalid or unsupported .ktx2 file");
2407
- const d = h.isUASTC() ? n.UASTC_4x4 : n.ETC1S, u = h.getWidth(), f = h.getHeight(), D = h.getLayers() || 1, p = h.getLevels(), m = h.getFaces(), M = h.getHasAlpha(), P = h.getDFDFlags(), { transcoderFormat: U, engineFormat: v } = C(d, u, f, M);
2407
+ const d = h.isUASTC() ? n.UASTC_4x4 : n.ETC1S, u = h.getWidth(), f = h.getHeight(), D = h.getLayers() || 1, p = h.getLevels(), m = h.getFaces(), M = h.getHasAlpha(), P = h.getDFDFlags(), { transcoderFormat: T, engineFormat: v } = C(d, u, f, M);
2408
2408
  if (!u || !f || !p)
2409
2409
  throw E(), new Error("THREE.KTX2Loader: Invalid texture");
2410
2410
  if (!h.startTranscoding())
2411
2411
  throw E(), new Error("THREE.KTX2Loader: .startTranscoding failed");
2412
2412
  const NA = [], Ee = [];
2413
- for (let gA = 0; gA < m; gA++) {
2413
+ for (let EA = 0; EA < m; EA++) {
2414
2414
  const ce = [];
2415
2415
  for (let eA = 0; eA < p; eA++) {
2416
2416
  const Qe = [];
2417
2417
  let J, N;
2418
2418
  for (let W = 0; W < D; W++) {
2419
- const DA = h.getImageLevelInfo(eA, W, gA);
2420
- gA === 0 && eA === 0 && W === 0 && (DA.origWidth % 4 !== 0 || DA.origHeight % 4 !== 0) && console.warn("THREE.KTX2Loader: ETC1S and UASTC textures should use multiple-of-four dimensions."), p > 1 ? (J = DA.origWidth, N = DA.origHeight) : (J = DA.width, N = DA.height);
2421
- const et = new Uint8Array(h.getImageTranscodedSizeInBytes(eA, W, 0, U));
2422
- if (!h.transcodeImage(et, eA, W, gA, U, 0, -1, -1))
2419
+ const DA = h.getImageLevelInfo(eA, W, EA);
2420
+ EA === 0 && eA === 0 && W === 0 && (DA.origWidth % 4 !== 0 || DA.origHeight % 4 !== 0) && console.warn("THREE.KTX2Loader: ETC1S and UASTC textures should use multiple-of-four dimensions."), p > 1 ? (J = DA.origWidth, N = DA.origHeight) : (J = DA.width, N = DA.height);
2421
+ const et = new Uint8Array(h.getImageTranscodedSizeInBytes(eA, W, 0, T));
2422
+ if (!h.transcodeImage(et, eA, W, EA, T, 0, -1, -1))
2423
2423
  throw E(), new Error("THREE.KTX2Loader: .transcodeImage failed.");
2424
2424
  Qe.push(et);
2425
2425
  }
@@ -2866,7 +2866,7 @@ class Mi extends WA {
2866
2866
  super(), this.add(new ue(A.planes[0], e, 16711680)), this.add(new ue(A.planes[1], e, 16711680)), this.add(new ue(A.planes[2], e, 16711680)), this.add(new ue(A.planes[3], e, 16711680));
2867
2867
  }
2868
2868
  }
2869
- var SA, dA, yA, se, ne, BA, LA, ie;
2869
+ var SA, dA, yA, se, ne, rA, LA, ie;
2870
2870
  class zt extends Bn {
2871
2871
  constructor(e) {
2872
2872
  super(e);
@@ -2875,24 +2875,24 @@ class zt extends Bn {
2875
2875
  F(this, yA, void 0);
2876
2876
  F(this, se, void 0);
2877
2877
  F(this, ne, void 0);
2878
- F(this, BA, void 0);
2878
+ F(this, rA, void 0);
2879
2879
  F(this, LA, !1);
2880
2880
  F(this, ie, () => {
2881
- if (!(g(this, BA) && !g(this, LA)) && (this.current !== this.previous && (g(this, SA).current = null), this.current)) {
2881
+ if (!(g(this, rA) && !g(this, LA)) && (this.current !== this.previous && (g(this, SA).current = null), this.current)) {
2882
2882
  const e = g(this, ne) ? this.current.url : this.current.name + this.current.extension;
2883
- g(this, BA) || Se.setTotal(e, 1), g(this, dA).current = "start", g(this, se).load(
2883
+ g(this, rA) || Se.setTotal(e, 1), g(this, dA).current = "start", g(this, se).load(
2884
2884
  e,
2885
2885
  (s) => {
2886
- g(this, SA).current = s, g(this, dA).current = "complete", g(this, BA) || Se.setLoaded(e, 1);
2886
+ g(this, SA).current = s, g(this, dA).current = "complete", g(this, rA) || Se.setLoaded(e, 1);
2887
2887
  },
2888
2888
  void 0,
2889
2889
  () => {
2890
- g(this, BA) || (g(this, dA).current = "error", Se.setError(e, e));
2890
+ g(this, rA) || (g(this, dA).current = "error", Se.setError(e, e));
2891
2891
  }
2892
2892
  );
2893
2893
  }
2894
2894
  });
2895
- G(this, yA, e.consumer), G(this, se, e.loader), G(this, ne, e.keepSourceParameters || !1), G(this, BA, e.lazy || !1), this.subscribe(g(this, ie)), g(this, yA).addEventListener("added", () => {
2895
+ G(this, yA, e.consumer), G(this, se, e.loader), G(this, ne, e.keepSourceParameters || !1), G(this, rA, e.lazy || !1), this.subscribe(g(this, ie)), g(this, yA).addEventListener("added", () => {
2896
2896
  this.connect();
2897
2897
  }), g(this, yA).addEventListener("removed", () => {
2898
2898
  this.disconnect();
@@ -2917,13 +2917,13 @@ class zt extends Bn {
2917
2917
  g(this, LA) || (G(this, LA, !0), g(this, ie).call(this));
2918
2918
  }
2919
2919
  }
2920
- SA = new WeakMap(), dA = new WeakMap(), yA = new WeakMap(), se = new WeakMap(), ne = new WeakMap(), BA = new WeakMap(), LA = new WeakMap(), ie = new WeakMap();
2920
+ SA = new WeakMap(), dA = new WeakMap(), yA = new WeakMap(), se = new WeakMap(), ne = new WeakMap(), rA = new WeakMap(), LA = new WeakMap(), ie = new WeakMap();
2921
2921
  var JA;
2922
2922
  class wi extends WA {
2923
2923
  constructor(e) {
2924
2924
  super();
2925
2925
  F(this, JA, void 0);
2926
- G(this, JA, new zt(EA({
2926
+ G(this, JA, new zt(cA({
2927
2927
  loader: oi,
2928
2928
  consumer: this
2929
2929
  }, e))), g(this, JA).data.subscribe((s) => {
@@ -3052,7 +3052,7 @@ class Ii {
3052
3052
  }
3053
3053
  }
3054
3054
  }
3055
- var rA, HA, uA;
3055
+ var CA, HA, uA;
3056
3056
  class As extends ge {
3057
3057
  constructor(e) {
3058
3058
  super(
@@ -3065,23 +3065,23 @@ class As extends ge {
3065
3065
  ),
3066
3066
  e.material
3067
3067
  );
3068
- F(this, rA, void 0);
3068
+ F(this, CA, void 0);
3069
3069
  F(this, HA, void 0);
3070
3070
  F(this, uA, () => {
3071
- g(this, rA).data.current && g(this, HA) && this.onCoverResize(g(this, rA).data.current);
3071
+ g(this, CA).data.current && g(this, HA) && this.onCoverResize(g(this, CA).data.current);
3072
3072
  });
3073
- G(this, rA, new zt(EA({
3073
+ G(this, CA, new zt(cA({
3074
3074
  consumer: this
3075
3075
  }, e))), G(this, HA, e.cover || !1), this.addEventListener("added", () => {
3076
3076
  TA.subscribe(g(this, uA));
3077
3077
  }), this.addEventListener("removed", () => {
3078
3078
  TA.unsubscribe(g(this, uA));
3079
- }), g(this, rA).data.subscribe((s) => {
3079
+ }), g(this, CA).data.subscribe((s) => {
3080
3080
  !s.current && s.previous ? s.previous.dispose() : s.current && this.material && (g(this, HA) && (s.current.matrixAutoUpdate = !1), s.current.colorSpace = $, s.current.center.set(0.5, 0.5), this.material.map = s.current, this.material.needsUpdate = !0, g(this, uA).call(this));
3081
3081
  });
3082
3082
  }
3083
3083
  get sourceManager() {
3084
- return g(this, rA);
3084
+ return g(this, CA);
3085
3085
  }
3086
3086
  updateTexture() {
3087
3087
  g(this, uA).call(this);
@@ -3093,10 +3093,10 @@ class As extends ge {
3093
3093
  });
3094
3094
  }
3095
3095
  }
3096
- rA = new WeakMap(), HA = new WeakMap(), uA = new WeakMap();
3096
+ CA = new WeakMap(), HA = new WeakMap(), uA = new WeakMap();
3097
3097
  class Si extends As {
3098
3098
  constructor(A) {
3099
- super(he(EA({}, A), {
3099
+ super(he(cA({}, A), {
3100
3100
  loader: Cn
3101
3101
  }));
3102
3102
  }
@@ -3114,7 +3114,7 @@ class gi {
3114
3114
  var oe, Be, re;
3115
3115
  class yi extends As {
3116
3116
  constructor(e) {
3117
- super(he(EA({}, e), {
3117
+ super(he(cA({}, e), {
3118
3118
  loader: new gi()
3119
3119
  }));
3120
3120
  F(this, oe, void 0);
@@ -3195,22 +3195,22 @@ q = new WeakMap(), me = new WeakSet(), es = function() {
3195
3195
  g(k, q).setSize(x.width, x.height);
3196
3196
  });
3197
3197
  let Rt = k;
3198
- var CA, aA, Ie, Ve;
3198
+ var aA, IA, Ie, Ve;
3199
3199
  class Ti {
3200
3200
  constructor(A) {
3201
3201
  F(this, Ie);
3202
- F(this, CA, void 0);
3203
3202
  F(this, aA, void 0);
3204
- G(this, CA, A.material), G(this, aA, A.uniforms || {}), g(this, CA).userData.uniforms = g(this, aA);
3203
+ F(this, IA, void 0);
3204
+ G(this, aA, A.material), G(this, IA, A.uniforms || {}), g(this, aA).userData.uniforms = g(this, IA);
3205
3205
  let e;
3206
3206
  const s = () => {
3207
3207
  e == null || e();
3208
3208
  };
3209
- g(this, CA).addEventListener("dispose", s), g(this, CA).onBeforeCompile = (t) => {
3209
+ g(this, aA).addEventListener("dispose", s), g(this, aA).onBeforeCompile = (t) => {
3210
3210
  var n;
3211
3211
  e == null || e();
3212
- for (const i in g(this, aA))
3213
- t.uniforms[i] = g(this, aA)[i];
3212
+ for (const i in g(this, IA))
3213
+ t.uniforms[i] = g(this, IA)[i];
3214
3214
  A.vertextDeclarations && (t.vertexShader = `
3215
3215
  ${A.vertextDeclarations}
3216
3216
  ${t.vertexShader}
@@ -3221,13 +3221,13 @@ class Ti {
3221
3221
  };
3222
3222
  }
3223
3223
  get material() {
3224
- return g(this, CA);
3224
+ return g(this, aA);
3225
3225
  }
3226
3226
  get uniforms() {
3227
- return g(this, aA);
3227
+ return g(this, IA);
3228
3228
  }
3229
3229
  }
3230
- CA = new WeakMap(), aA = new WeakMap(), Ie = new WeakSet(), Ve = function(A, e, s) {
3230
+ aA = new WeakMap(), IA = new WeakMap(), Ie = new WeakSet(), Ve = function(A, e, s) {
3231
3231
  const t = e === "vertex" ? "vertexChunk" : "fragmentChunk", n = e === "vertex" ? "vertexShader" : "fragmentShader";
3232
3232
  s[t] && (s[t].replace ? A[n] = A[n].replace(
3233
3233
  `#include <${s[t].replace}>`,
@@ -1 +1 @@
1
- "use strict";var G=(i,e,s)=>{if(!e.has(i))throw TypeError("Cannot "+s)};var t=(i,e,s)=>(G(i,e,"read from private field"),s?s.call(i):e.get(i)),h=(i,e,s)=>{if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,s)},r=(i,e,s,n)=>(G(i,e,"write to private field"),n?n.call(i,s):e.set(i,s),s);var L=(i,e,s)=>(G(i,e,"access private method"),s);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const dt=require("../css-unit-parser/index.cjs"),J=require("../ladder/index.cjs"),j=require("../order/index.cjs"),N=require("../scroll-entries/index.cjs"),tt=require("../ticker/index.cjs"),et=require("../browser-CpzFX2xg.cjs"),st=require("../dom-JBOkFLTh.cjs"),P=require("../layout-8ryRAMGJ.cjs");require("../path-data-polyfill-CXsOR7Oc.cjs");const it=require("../element-resizer/index.cjs"),ht=require("../window-resizer/index.cjs");function rt(i){const e=Math.sqrt(i.m11*i.m11+i.m12*i.m12+i.m13*i.m13),s=Math.sqrt(i.m21*i.m21+i.m22*i.m22+i.m23*i.m23),n=Math.sqrt(i.m31*i.m31+i.m32*i.m32+i.m33*i.m33),y=Math.atan2(i.m32,i.m33),B=Math.atan2(-i.m31,Math.sqrt(i.m32*i.m32+i.m33*i.m33)),F=Math.atan2(i.m21,i.m11),u=i.m41,q=i.m42*-1,O=i.m43;return{scaleX:e,scaleY:s,scaleZ:n,rotationX:y,rotationY:B,rotationZ:F,translationX:u,translationY:q,translationZ:O}}var a,p,m,v,V,T,w,C,A,W,b,_,X,S,d,R,Y,H,k,f,g,z,o,l,c,x,M,U,Q,I,nt,K,lt,$,ct,E,D,Z;class ft{constructor(e,s){h(this,U);h(this,I);h(this,K);h(this,$);h(this,a,null);h(this,p,null);h(this,m,[]);h(this,v,"auto");h(this,V,"top");h(this,T,!1);h(this,w,!0);h(this,C,!0);h(this,A,!0);h(this,W,!0);h(this,b,0);h(this,_,0);h(this,X,0);h(this,S,0);h(this,d,0);h(this,R,0);h(this,Y,0);h(this,H,0);h(this,k,0);h(this,f,{x:0,y:0,z:0});h(this,g,{x:0,y:0,z:0});h(this,z,{x:1,y:1,z:1});h(this,o,new J.Ladder({x:0,y:0,z:0}));h(this,l,new J.Ladder({x:0,y:0,z:0}));h(this,c,new J.Ladder({x:0,y:0,z:0}));h(this,x,{x:0,y:0,z:0});h(this,M,new Map);h(this,E,()=>{et.isBrowser&&L(this,K,lt).call(this)});h(this,D,()=>{L(this,$,ct).call(this),L(this,U,Q).call(this)});h(this,Z,()=>{const e=N.scrollEntries.getAll(this.element);t(this,M).forEach((s,n)=>{e.includes(n)||(this.deleteScrollStep(s),t(this,M).delete(n))}),e.forEach(s=>{if(!t(this,M).has(s)){const n=()=>s;t(this,M).set(s,n),this.setScrollStep(n)}})});et.isBrowser&&(r(this,a,st.getElement(e)||document.body),r(this,p,st.getElement(s==null?void 0:s.containerElement)||document.body),r(this,v,(s==null?void 0:s.scrollAxis)||"auto"),r(this,V,(s==null?void 0:s.frontSide)||"top"),r(this,T,(s==null?void 0:s.cartesian)||!1),r(this,w,(s==null?void 0:s.sizeStep)!==void 0?s.sizeStep:!0),r(this,C,(s==null?void 0:s.positionStep)!==void 0?s.positionStep:!0),r(this,A,(s==null?void 0:s.transformStep)!==void 0?s.transformStep:!0),r(this,W,(s==null?void 0:s.scrollStep)!==void 0?s.scrollStep:!0),t(this,c).setStep("_size","+",{x:1,y:1,z:1}),t(this,l).setStep("_position","+",{x:0,y:0,z:0}),t(this,c).setStep("_scale","*",{x:1,y:1,z:1}),t(this,l).setStep("_translation","+",{x:0,y:0,z:0}),t(this,o).setStep("_rotation","+",{x:0,y:0,z:0}),t(this,W)&&(N.scrollEntries.notifier.subscribe(t(this,Z)),t(this,Z).call(this)),tt.ticker.subscribe(t(this,D),{order:j.TICK_ORDER.LAYOUT_BOX,culling:s!=null&&s.culling?this.element:void 0}),it.elementResizer.subscribe(this.element,t(this,E)),ht.windowResizer.subscribe(t(this,E),j.RESIZE_ORDER.LAYOUT_BOX))}get element(){return t(this,a)}get containerElement(){return t(this,p)}get position(){return t(this,l).current}get rotation(){return t(this,o).current}get scale(){return t(this,c).current}get scrollValue(){return t(this,x)}get left(){return t(this,d)}get top(){return t(this,S)}get CSSTranslation(){return t(this,f)}get CSSRotation(){return t(this,g)}get CSSScale(){return t(this,z)}get front(){return t(this,R)}get width(){return t(this,b)}get height(){return t(this,_)}get depth(){return t(this,X)}destroy(){tt.ticker.unsubscribe(t(this,D)),it.elementResizer.unsubscribe(t(this,E)),ht.windowResizer.unsubscribe(t(this,E)),N.scrollEntries.notifier.unsubscribe(t(this,Z)),t(this,M).clear(),t(this,l).close(),t(this,o).close(),t(this,c).close()}bindObject(e){e.position&&t(this,l).bind(e.position),e.rotation&&t(this,o).bind(e.rotation),e.scale&&t(this,c).bind(e.scale)}unbindObject(e){e.position&&t(this,l).unbind(e.position),e.rotation&&t(this,o).unbind(e.rotation),e.scale&&t(this,c).unbind(e.scale)}setScrollStep(e){return t(this,m).includes(e)||t(this,m).push(e),()=>this.deleteScrollStep(e)}deleteScrollStep(e){r(this,m,t(this,m).filter(s=>s!==e))}setPositionStep(...e){t(this,l).setStep(...e)}getPositionStep(...e){return t(this,l).getStepValue(...e)}setRotationStep(...e){t(this,o).setStep(...e)}getRotationStep(...e){return t(this,o).getStepValue(...e)}setScaleStep(...e){t(this,c).setStep(...e)}getScaleStep(...e){return t(this,c).getStepValue(...e)}deletePositionStep(...e){t(this,l).deleteStep(...e)}deleteRotationStep(...e){t(this,o).deleteStep(...e)}deleteScaleStep(...e){t(this,c).deleteStep(...e)}onPosition(...e){return t(this,l).subscribe(...e)}offPosition(...e){t(this,l).unsubscribe(...e)}onScale(...e){return t(this,c).subscribe(...e)}offScale(...e){t(this,c).unsubscribe(...e)}onRotation(...e){return t(this,o).subscribe(...e)}offRotation(...e){t(this,o).unsubscribe(...e)}}a=new WeakMap,p=new WeakMap,m=new WeakMap,v=new WeakMap,V=new WeakMap,T=new WeakMap,w=new WeakMap,C=new WeakMap,A=new WeakMap,W=new WeakMap,b=new WeakMap,_=new WeakMap,X=new WeakMap,S=new WeakMap,d=new WeakMap,R=new WeakMap,Y=new WeakMap,H=new WeakMap,k=new WeakMap,f=new WeakMap,g=new WeakMap,z=new WeakMap,o=new WeakMap,l=new WeakMap,c=new WeakMap,x=new WeakMap,M=new WeakMap,U=new WeakSet,Q=function(){t(this,c).calculate(),t(this,l).calculate(),t(this,o).calculate()},I=new WeakSet,nt=function(){t(this,c).setStep("_size","+",{x:t(this,w)?t(this,b):1,y:t(this,w)?t(this,_):1,z:t(this,w)?t(this,X):1});const e=t(this,C)?t(this,Y):0,s=t(this,C)?t(this,H):0,n=t(this,C)?t(this,k):0;t(this,l).setStep("_position","+",{x:e,y:s,z:n}),t(this,A)?(t(this,c).setStep("_scale","*",{x:t(this,z).x,y:t(this,z).y,z:t(this,z).z}),t(this,l).setStep("_translation","+",{x:t(this,f).x,y:t(this,f).y,z:t(this,f).z}),t(this,o).setStep("_rotation","+",{x:t(this,g).x,y:t(this,g).y,z:t(this,g).z})):(t(this,c).setStep("_scale","*",{x:1,y:1,z:1}),t(this,l).setStep("_translation","+",{x:0,y:0,z:0}),t(this,o).setStep("_rotation","+",{x:0,y:0,z:0}))},K=new WeakSet,lt=function(){const e=getComputedStyle(t(this,a));r(this,b,Math.max(t(this,a).clientWidth,1)),r(this,_,Math.max(t(this,a).clientHeight,1)),r(this,X,Math.max(dt.cssUnitParser.parse(e.getPropertyValue("--depth")||"0px"),1));const s=P.getCumulativeOffsetLeft(t(this,p)),n=P.getCumulativeOffsetTop(t(this,p)),y=t(this,p).clientWidth,B=t(this,p).clientHeight;if(r(this,d,P.getCumulativeOffsetLeft(t(this,a))-s),r(this,S,P.getCumulativeOffsetTop(t(this,a))-n),t(this,v)==="z"){const q=t(this,d)/y,O=t(this,S)/B;r(this,d,(q-Math.floor(q))*y),r(this,S,(O-Math.floor(O))*B),t(this,V)==="left"?r(this,R,P.getCumulativeOffsetLeft(t(this,a))-s-t(this,d)):r(this,R,P.getCumulativeOffsetTop(t(this,a))-n-t(this,S))}if(r(this,d,t(this,d)+t(this,a).clientLeft),r(this,S,t(this,S)+t(this,a).clientTop),t(this,T)){const q=Math.round(y/2),O=Math.round(B/2),ot=t(this,b)?Math.round(t(this,b)/2):0,at=t(this,_)?Math.round(t(this,_)/2):0,ut=t(this,d)-q+ot,St=(t(this,S)-O+at)*-1;r(this,Y,ut),r(this,H,St)}else r(this,Y,t(this,d)),r(this,H,t(this,S));r(this,k,t(this,R)*-1);const F=new WebKitCSSMatrix(e.transform),u=rt(F);t(this,f).x=u.translationX,t(this,f).y=u.translationY,t(this,f).z=u.translationZ,t(this,z).x=u.scaleX,t(this,z).y=u.scaleY,t(this,z).z=u.scaleZ,t(this,g).x=u.rotationX,t(this,g).y=u.rotationY,t(this,g).z=u.rotationZ,L(this,I,nt).call(this),L(this,U,Q).call(this)},$=new WeakSet,ct=function(){t(this,x).x=0,t(this,x).y=0,t(this,x).z=0;for(let e=0;e<t(this,m).length;e++){const s=t(this,m)[e]();let n=s.axis;t(this,v)!=="auto"&&(n=t(this,v));const y=s.value*(n==="x"?-1:t(this,T)?1:-1);t(this,x)[n]+=y,t(this,l).setStep(`_scroll_${e}`,"+",{[n]:y})}},E=new WeakMap,D=new WeakMap,Z=new WeakMap;exports.LayoutBox=ft;exports.decomposeCSSMatrix=rt;
1
+ "use strict";var G=(i,e,s)=>{if(!e.has(i))throw TypeError("Cannot "+s)};var t=(i,e,s)=>(G(i,e,"read from private field"),s?s.call(i):e.get(i)),h=(i,e,s)=>{if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,s)},r=(i,e,s,n)=>(G(i,e,"write to private field"),n?n.call(i,s):e.set(i,s),s);var L=(i,e,s)=>(G(i,e,"access private method"),s);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const dt=require("../css-unit-parser/index.cjs"),J=require("../ladder/index.cjs"),j=require("../order/index.cjs"),N=require("../scroll-entries/index.cjs"),tt=require("../ticker/index.cjs"),et=require("../browser-CpzFX2xg.cjs"),st=require("../dom-JBOkFLTh.cjs"),P=require("../layout-8ryRAMGJ.cjs");require("../path-data-polyfill-CXsOR7Oc.cjs");const it=require("../element-resizer/index.cjs"),ht=require("../window-resizer/index.cjs");function rt(i){const e=Math.sqrt(i.m11*i.m11+i.m12*i.m12+i.m13*i.m13),s=Math.sqrt(i.m21*i.m21+i.m22*i.m22+i.m23*i.m23),n=Math.sqrt(i.m31*i.m31+i.m32*i.m32+i.m33*i.m33),y=Math.atan2(i.m32,i.m33),B=Math.atan2(-i.m31,Math.sqrt(i.m32*i.m32+i.m33*i.m33)),F=Math.atan2(i.m21,i.m11),u=i.m41,q=i.m42*-1,O=i.m43;return{scaleX:e,scaleY:s,scaleZ:n,rotationX:y,rotationY:B,rotationZ:F,translationX:u,translationY:q,translationZ:O}}var a,p,m,v,V,T,w,C,A,W,b,_,X,S,d,R,Y,H,k,f,g,z,o,l,c,x,M,U,Q,I,nt,K,lt,$,ct,E,D,Z;class ft{constructor(e,s){h(this,U);h(this,I);h(this,K);h(this,$);h(this,a,null);h(this,p,null);h(this,m,[]);h(this,v,"auto");h(this,V,"top");h(this,T,!1);h(this,w,!0);h(this,C,!0);h(this,A,!0);h(this,W,!0);h(this,b,0);h(this,_,0);h(this,X,0);h(this,S,0);h(this,d,0);h(this,R,0);h(this,Y,0);h(this,H,0);h(this,k,0);h(this,f,{x:0,y:0,z:0});h(this,g,{x:0,y:0,z:0});h(this,z,{x:1,y:1,z:1});h(this,o,new J.Ladder({x:0,y:0,z:0}));h(this,l,new J.Ladder({x:0,y:0,z:0}));h(this,c,new J.Ladder({x:0,y:0,z:0}));h(this,x,{x:0,y:0,z:0});h(this,M,new Map);h(this,E,()=>{et.isBrowser&&L(this,K,lt).call(this)});h(this,D,()=>{L(this,$,ct).call(this),L(this,U,Q).call(this)});h(this,Z,()=>{const e=N.scrollEntries.getAll(this.element);t(this,M).forEach((s,n)=>{e.includes(n)||(this.deleteScrollStep(s),t(this,M).delete(n))}),e.forEach(s=>{if(!t(this,M).has(s)){const n=()=>s;t(this,M).set(s,n),this.setScrollStep(n)}})});et.isBrowser&&(r(this,a,st.getElement(e)||document.body),r(this,p,st.getElement(s==null?void 0:s.containerElement)||document.body),r(this,v,(s==null?void 0:s.scrollAxis)||"auto"),r(this,V,(s==null?void 0:s.frontSide)||"top"),r(this,T,(s==null?void 0:s.cartesian)||!1),r(this,w,(s==null?void 0:s.sizeStep)!==void 0?s.sizeStep:!0),r(this,C,(s==null?void 0:s.positionStep)!==void 0?s.positionStep:!0),r(this,A,(s==null?void 0:s.transformStep)!==void 0?s.transformStep:!0),r(this,W,(s==null?void 0:s.scrollStep)!==void 0?s.scrollStep:!0),t(this,c).setStep("_size","+",{x:1,y:1,z:1}),t(this,l).setStep("_position","+",{x:0,y:0,z:0}),t(this,c).setStep("_scale","*",{x:1,y:1,z:1}),t(this,l).setStep("_translation","+",{x:0,y:0,z:0}),t(this,o).setStep("_rotation","+",{x:0,y:0,z:0}),t(this,W)&&(N.scrollEntries.notifier.subscribe(t(this,Z)),t(this,Z).call(this)),it.elementResizer.subscribe(this.element,t(this,E)),ht.windowResizer.subscribe(t(this,E),j.RESIZE_ORDER.LAYOUT_BOX),tt.ticker.subscribe(t(this,D),{order:j.TICK_ORDER.LAYOUT_BOX,culling:s!=null&&s.culling?this.element:void 0}))}get element(){return t(this,a)}get containerElement(){return t(this,p)}get position(){return t(this,l).current}get rotation(){return t(this,o).current}get scale(){return t(this,c).current}get scrollValue(){return t(this,x)}get left(){return t(this,d)}get top(){return t(this,S)}get CSSTranslation(){return t(this,f)}get CSSRotation(){return t(this,g)}get CSSScale(){return t(this,z)}get front(){return t(this,R)}get width(){return t(this,b)}get height(){return t(this,_)}get depth(){return t(this,X)}destroy(){tt.ticker.unsubscribe(t(this,D)),it.elementResizer.unsubscribe(t(this,E)),ht.windowResizer.unsubscribe(t(this,E)),N.scrollEntries.notifier.unsubscribe(t(this,Z)),t(this,M).clear(),t(this,l).close(),t(this,o).close(),t(this,c).close()}bindObject(e){e.position&&t(this,l).bind(e.position),e.rotation&&t(this,o).bind(e.rotation),e.scale&&t(this,c).bind(e.scale)}unbindObject(e){e.position&&t(this,l).unbind(e.position),e.rotation&&t(this,o).unbind(e.rotation),e.scale&&t(this,c).unbind(e.scale)}setScrollStep(e){return t(this,m).includes(e)||t(this,m).push(e),()=>this.deleteScrollStep(e)}deleteScrollStep(e){r(this,m,t(this,m).filter(s=>s!==e))}setPositionStep(...e){t(this,l).setStep(...e)}getPositionStep(...e){return t(this,l).getStepValue(...e)}setRotationStep(...e){t(this,o).setStep(...e)}getRotationStep(...e){return t(this,o).getStepValue(...e)}setScaleStep(...e){t(this,c).setStep(...e)}getScaleStep(...e){return t(this,c).getStepValue(...e)}deletePositionStep(...e){t(this,l).deleteStep(...e)}deleteRotationStep(...e){t(this,o).deleteStep(...e)}deleteScaleStep(...e){t(this,c).deleteStep(...e)}onPosition(...e){return t(this,l).subscribe(...e)}offPosition(...e){t(this,l).unsubscribe(...e)}onScale(...e){return t(this,c).subscribe(...e)}offScale(...e){t(this,c).unsubscribe(...e)}onRotation(...e){return t(this,o).subscribe(...e)}offRotation(...e){t(this,o).unsubscribe(...e)}}a=new WeakMap,p=new WeakMap,m=new WeakMap,v=new WeakMap,V=new WeakMap,T=new WeakMap,w=new WeakMap,C=new WeakMap,A=new WeakMap,W=new WeakMap,b=new WeakMap,_=new WeakMap,X=new WeakMap,S=new WeakMap,d=new WeakMap,R=new WeakMap,Y=new WeakMap,H=new WeakMap,k=new WeakMap,f=new WeakMap,g=new WeakMap,z=new WeakMap,o=new WeakMap,l=new WeakMap,c=new WeakMap,x=new WeakMap,M=new WeakMap,U=new WeakSet,Q=function(){t(this,c).calculate(),t(this,l).calculate(),t(this,o).calculate()},I=new WeakSet,nt=function(){t(this,c).setStep("_size","+",{x:t(this,w)?t(this,b):1,y:t(this,w)?t(this,_):1,z:t(this,w)?t(this,X):1});const e=t(this,C)?t(this,Y):0,s=t(this,C)?t(this,H):0,n=t(this,C)?t(this,k):0;t(this,l).setStep("_position","+",{x:e,y:s,z:n}),t(this,A)?(t(this,c).setStep("_scale","*",{x:t(this,z).x,y:t(this,z).y,z:t(this,z).z}),t(this,l).setStep("_translation","+",{x:t(this,f).x,y:t(this,f).y,z:t(this,f).z}),t(this,o).setStep("_rotation","+",{x:t(this,g).x,y:t(this,g).y,z:t(this,g).z})):(t(this,c).setStep("_scale","*",{x:1,y:1,z:1}),t(this,l).setStep("_translation","+",{x:0,y:0,z:0}),t(this,o).setStep("_rotation","+",{x:0,y:0,z:0}))},K=new WeakSet,lt=function(){const e=getComputedStyle(t(this,a));r(this,b,Math.max(t(this,a).clientWidth,1)),r(this,_,Math.max(t(this,a).clientHeight,1)),r(this,X,Math.max(dt.cssUnitParser.parse(e.getPropertyValue("--depth")||"0px"),1));const s=P.getCumulativeOffsetLeft(t(this,p)),n=P.getCumulativeOffsetTop(t(this,p)),y=t(this,p).clientWidth,B=t(this,p).clientHeight;if(r(this,d,P.getCumulativeOffsetLeft(t(this,a))-s),r(this,S,P.getCumulativeOffsetTop(t(this,a))-n),t(this,v)==="z"){const q=t(this,d)/y,O=t(this,S)/B;r(this,d,(q-Math.floor(q))*y),r(this,S,(O-Math.floor(O))*B),t(this,V)==="left"?r(this,R,P.getCumulativeOffsetLeft(t(this,a))-s-t(this,d)):r(this,R,P.getCumulativeOffsetTop(t(this,a))-n-t(this,S))}if(r(this,d,t(this,d)+t(this,a).clientLeft),r(this,S,t(this,S)+t(this,a).clientTop),t(this,T)){const q=Math.round(y/2),O=Math.round(B/2),ot=t(this,b)?Math.round(t(this,b)/2):0,at=t(this,_)?Math.round(t(this,_)/2):0,ut=t(this,d)-q+ot,St=(t(this,S)-O+at)*-1;r(this,Y,ut),r(this,H,St)}else r(this,Y,t(this,d)),r(this,H,t(this,S));r(this,k,t(this,R)*-1);const F=new WebKitCSSMatrix(e.transform),u=rt(F);t(this,f).x=u.translationX,t(this,f).y=u.translationY,t(this,f).z=u.translationZ,t(this,z).x=u.scaleX,t(this,z).y=u.scaleY,t(this,z).z=u.scaleZ,t(this,g).x=u.rotationX,t(this,g).y=u.rotationY,t(this,g).z=u.rotationZ,L(this,I,nt).call(this),L(this,U,Q).call(this)},$=new WeakSet,ct=function(){t(this,x).x=0,t(this,x).y=0,t(this,x).z=0;for(let e=0;e<t(this,m).length;e++){const s=t(this,m)[e]();let n=s.axis;t(this,v)!=="auto"&&(n=t(this,v));const y=s.value*(n==="x"?-1:t(this,T)?1:-1);t(this,x)[n]+=y,t(this,l).setStep(`_scroll_${e}`,"+",{[n]:y})}},E=new WeakMap,D=new WeakMap,Z=new WeakMap;exports.LayoutBox=ft;exports.decomposeCSSMatrix=rt;
@@ -10,7 +10,7 @@ var t = (i, s, e) => (F(i, s, "read from private field"), e ? e.call(i) : s.get(
10
10
  var L = (i, s, e) => (F(i, s, "access private method"), e);
11
11
  import { cssUnitParser as St } from "../css-unit-parser/index.js";
12
12
  import { Ladder as G } from "../ladder/index.js";
13
- import { TICK_ORDER as ft, RESIZE_ORDER as dt } from "../order/index.js";
13
+ import { RESIZE_ORDER as ft, TICK_ORDER as dt } from "../order/index.js";
14
14
  import { scrollEntries as J } from "../scroll-entries/index.js";
15
15
  import { ticker as tt } from "../ticker/index.js";
16
16
  import { i as st } from "../browser-0zX67oeU.js";
@@ -113,10 +113,10 @@ class wt {
113
113
  x: 0,
114
114
  y: 0,
115
115
  z: 0
116
- }), t(this, q) && (J.notifier.subscribe(t(this, Z)), t(this, Z).call(this)), tt.subscribe(t(this, U), {
117
- order: ft.LAYOUT_BOX,
116
+ }), t(this, q) && (J.notifier.subscribe(t(this, Z)), t(this, Z).call(this)), it.subscribe(this.element, t(this, w)), ht.subscribe(t(this, w), ft.LAYOUT_BOX), tt.subscribe(t(this, U), {
117
+ order: dt.LAYOUT_BOX,
118
118
  culling: e != null && e.culling ? this.element : void 0
119
- }), it.subscribe(this.element, t(this, w)), ht.subscribe(t(this, w), dt.LAYOUT_BOX));
119
+ }));
120
120
  }
121
121
  get element() {
122
122
  return t(this, c);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aptechka",
3
- "version": "0.5.5",
3
+ "version": "0.5.6",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/denisavitski/aptechka.git"