aptechka 0.4.11 → 0.4.12

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.
@@ -55,19 +55,19 @@ class q extends T {
55
55
  }
56
56
  }
57
57
  m = new WeakMap(), l = new WeakMap(), c = new WeakMap(), L = new WeakMap();
58
- var E, b, g, M;
58
+ var x, b, E, M;
59
59
  class F extends T {
60
60
  constructor(e) {
61
61
  super();
62
- a(this, E, null);
62
+ a(this, x, null);
63
63
  a(this, b, void 0);
64
- a(this, g, void 0);
64
+ a(this, E, void 0);
65
65
  a(this, M, (e) => {
66
66
  let n = 0;
67
67
  if (!(this.axis === "x" && Math.abs(e.deltaY) > Math.abs(e.deltaX) || this.axis === "y" && Math.abs(e.deltaX) > Math.abs(e.deltaY)))
68
68
  if (n = (this.axis === "max" ? Math.abs(e.deltaX) > Math.abs(e.deltaY) ? e.deltaX : e.deltaY : this.axis === "x" ? e.deltaX : e.deltaY) * this.speed, e.stopPropagation(), e.preventDefault(), this.debounce) {
69
69
  const s = Date.now();
70
- if (s - t(this, g) > 40 && (n = 100 * Math.sign(n)), i(this, g, s), Math.abs(n) < 100 || t(this, b))
70
+ if (s - t(this, E) > 40 && (n = 100 * Math.sign(n)), i(this, E, s), Math.abs(n) < 100 || t(this, b))
71
71
  return;
72
72
  this.changeEvent.notify("wheel", n), i(this, b, setTimeout(() => {
73
73
  i(this, b, void 0);
@@ -75,10 +75,10 @@ class F extends T {
75
75
  } else
76
76
  this.changeEvent.notify("wheel", n);
77
77
  });
78
- this.axis = (e == null ? void 0 : e.axis) || "y", this.speed = (e == null ? void 0 : e.speed) || 1, this.debounce = (e == null ? void 0 : e.debounce) || !1, i(this, g, Date.now()), f && i(this, E, e != null && e.element && P(e.element) || window);
78
+ this.axis = (e == null ? void 0 : e.axis) || "y", this.speed = (e == null ? void 0 : e.speed) || 1, this.debounce = (e == null ? void 0 : e.debounce) || !1, i(this, E, Date.now()), f && i(this, x, e != null && e.element && P(e.element) || window);
79
79
  }
80
80
  connect() {
81
- f && t(this, E).addEventListener(
81
+ f && t(this, x).addEventListener(
82
82
  "wheel",
83
83
  t(this, M),
84
84
  {
@@ -87,14 +87,14 @@ class F extends T {
87
87
  );
88
88
  }
89
89
  disconnect() {
90
- f && (t(this, E).removeEventListener(
90
+ f && (t(this, x).removeEventListener(
91
91
  "wheel",
92
92
  t(this, M)
93
93
  ), clearTimeout(t(this, b)));
94
94
  }
95
95
  }
96
- E = new WeakMap(), b = new WeakMap(), g = new WeakMap(), M = new WeakMap();
97
- var x, u, y, d, v, o;
96
+ x = new WeakMap(), b = new WeakMap(), E = new WeakMap(), M = new WeakMap();
97
+ var o, u, y, d, v, g;
98
98
  const w = class w extends T {
99
99
  constructor(e) {
100
100
  super();
@@ -106,23 +106,23 @@ const w = class w extends T {
106
106
  (s) => s instanceof HTMLElement && s.hasAttribute("drag-dead-zone")
107
107
  ))
108
108
  return;
109
- this.swipe || D.unsubscribe(t(this, o));
109
+ this.swipe || D.unsubscribe(t(this, g));
110
110
  let n = e;
111
- i(this, d, 0), Y(
111
+ i(this, d, 0), document.documentElement.classList.add("grabbing"), Y(
112
112
  (s) => {
113
- if (t(this, y) || t(w, x) && t(w, x) !== t(this, u))
113
+ if (t(this, y) || t(w, o) && t(w, o) !== t(this, u))
114
114
  return;
115
115
  this.swipe && i(this, y, !0);
116
116
  const H = n.x - s.x, A = n.y - s.y;
117
- this.axis === "x" ? i(this, d, H) : i(this, d, A), n = s, this.changeEvent.notify("drag", t(this, d)), (this.axis === "x" && Math.abs(H) > Math.abs(A) || this.axis === "y" && Math.abs(H) < Math.abs(A)) && i(w, x, t(this, u));
117
+ this.axis === "x" ? i(this, d, H) : i(this, d, A), n = s, this.changeEvent.notify("drag", t(this, d)), (this.axis === "x" && Math.abs(H) > Math.abs(A) || this.axis === "y" && Math.abs(H) < Math.abs(A)) && i(w, o, t(this, u));
118
118
  },
119
119
  () => {
120
- i(w, x, null), this.swipe || (i(this, d, t(this, d) * 3), D.subscribe(t(this, o), { order: R.SCROLL - 1 })), i(this, y, !1);
120
+ i(w, o, null), this.swipe || (i(this, d, t(this, d) * 3), D.subscribe(t(this, g), { order: R.SCROLL - 1 })), document.documentElement.classList.remove("grabbing"), i(this, y, !1);
121
121
  }
122
122
  );
123
123
  });
124
- a(this, o, () => {
125
- t(this, d) || D.unsubscribe(t(this, o)), i(this, d, t(this, d) * 0.95), i(this, d, C(t(this, d), 3)), this.changeEvent.notify("drag", t(this, d));
124
+ a(this, g, () => {
125
+ t(this, d) || D.unsubscribe(t(this, g)), i(this, d, t(this, d) * 0.95), i(this, d, C(t(this, d), 3)), this.changeEvent.notify("drag", t(this, d));
126
126
  });
127
127
  this.axis = (e == null ? void 0 : e.axis) || "y", this.swipe = (e == null ? void 0 : e.swipe) || !1, f && i(this, u, e != null && e.element && P(e.element) || document.documentElement);
128
128
  }
@@ -133,10 +133,10 @@ const w = class w extends T {
133
133
  f && (t(this, u).removeEventListener(
134
134
  "pointerdown",
135
135
  t(this, v)
136
- ), D.unsubscribe(t(this, o)));
136
+ ), D.unsubscribe(t(this, g)));
137
137
  }
138
138
  };
139
- x = new WeakMap(), u = new WeakMap(), y = new WeakMap(), d = new WeakMap(), v = new WeakMap(), o = new WeakMap(), a(w, x, null);
139
+ o = new WeakMap(), u = new WeakMap(), y = new WeakMap(), d = new WeakMap(), v = new WeakMap(), g = new WeakMap(), a(w, o, null);
140
140
  let X = w;
141
141
  export {
142
142
  T as C,
@@ -0,0 +1 @@
1
+ "use strict";var P=(r,n,e)=>{if(!n.has(r))throw TypeError("Cannot "+e)};var t=(r,n,e)=>(P(r,n,"read from private field"),e?e.call(r):n.get(r)),h=(r,n,e)=>{if(n.has(r))throw TypeError("Cannot add the same private member more than once");n instanceof WeakSet?n.add(r):n.set(r,e)},i=(r,n,e,a)=>(P(r,n,"write to private field"),a?a.call(r,e):n.set(r,e),e);const f=require("./browser-CpzFX2xg.cjs"),A=require("./dom-JBOkFLTh.cjs"),T=require("./gestures-DHLrn6Q8.cjs"),W=require("./number-yVpzMdbQ.cjs"),X=require("./notifier/index.cjs"),B=require("./ticker/index.cjs"),Y=require("./order/index.cjs");var v;class q{constructor(){h(this,v,new X.Notifier)}get changeEvent(){return t(this,v)}}v=new WeakMap;var u,l,c,L;class K extends q{constructor(e){super();h(this,u,null);h(this,l,null);h(this,c,"offsetHeight");h(this,L,e=>{const a=e.shiftKey?-1:1;let s;e.code==="Space"?s=a*t(this,l)[t(this,c)]*.4:e.code==="ArrowLeft"?s=-1*t(this,l)[t(this,c)]*.2:e.code==="ArrowRight"?s=1*t(this,l)[t(this,c)]*.2:e.code==="ArrowUp"?s=-1*t(this,l)[t(this,c)]*.2:e.code==="ArrowDown"?s=1*t(this,l)[t(this,c)]*.2:e.code==="PageUp"?s=-1*t(this,l)[t(this,c)]:e.code==="PageDown"?s=1*t(this,l)[t(this,c)]:e.code==="Home"?s=0:e.code==="End"&&(s=t(this,c)==="offsetWidth"?t(this,l).scrollWidth:t(this,l).scrollHeight),s&&(e.stopPropagation(),this.changeEvent.notify("keyboard",s))});f.isBrowser&&(i(this,u,e!=null&&e.element&&A.getElement(e.element)||window),i(this,l,t(this,u)instanceof HTMLElement?t(this,u):document.documentElement),this.dimension=e==null?void 0:e.dimension)}set dimension(e){i(this,c,e==="width"?"offsetWidth":"offsetHeight")}connect(){f.isBrowser&&t(this,u).addEventListener("keydown",t(this,L))}disconnect(){f.isBrowser&&t(this,u).removeEventListener("keydown",t(this,L))}}u=new WeakMap,l=new WeakMap,c=new WeakMap,L=new WeakMap;var x,o,E,M;class R extends q{constructor(e){super();h(this,x,null);h(this,o,void 0);h(this,E,void 0);h(this,M,e=>{let a=0;if(!(this.axis==="x"&&Math.abs(e.deltaY)>Math.abs(e.deltaX)||this.axis==="y"&&Math.abs(e.deltaX)>Math.abs(e.deltaY)))if(a=(this.axis==="max"?Math.abs(e.deltaX)>Math.abs(e.deltaY)?e.deltaX:e.deltaY:this.axis==="x"?e.deltaX:e.deltaY)*this.speed,e.stopPropagation(),e.preventDefault(),this.debounce){const s=Date.now();if(s-t(this,E)>40&&(a=100*Math.sign(a)),i(this,E,s),Math.abs(a)<100||t(this,o))return;this.changeEvent.notify("wheel",a),i(this,o,setTimeout(()=>{i(this,o,void 0)},80))}else this.changeEvent.notify("wheel",a)});this.axis=(e==null?void 0:e.axis)||"y",this.speed=(e==null?void 0:e.speed)||1,this.debounce=(e==null?void 0:e.debounce)||!1,i(this,E,Date.now()),f.isBrowser&&i(this,x,e!=null&&e.element&&A.getElement(e.element)||window)}connect(){f.isBrowser&&t(this,x).addEventListener("wheel",t(this,M),{passive:!1})}disconnect(){f.isBrowser&&(t(this,x).removeEventListener("wheel",t(this,M)),clearTimeout(t(this,o)))}}x=new WeakMap,o=new WeakMap,E=new WeakMap,M=new WeakMap;var b,m,y,d,k,g;const w=class w extends q{constructor(e){super();h(this,m,null);h(this,y,!1);h(this,d,0);h(this,k,e=>{if(e.composedPath().find(s=>s instanceof HTMLElement&&s.hasAttribute("drag-dead-zone")))return;this.swipe||B.ticker.unsubscribe(t(this,g));let a=e;i(this,d,0),document.documentElement.classList.add("grabbing"),T.setupDrag(s=>{if(t(this,y)||t(w,b)&&t(w,b)!==t(this,m))return;this.swipe&&i(this,y,!0);const C=a.x-s.x,D=a.y-s.y;this.axis==="x"?i(this,d,C):i(this,d,D),a=s,this.changeEvent.notify("drag",t(this,d)),(this.axis==="x"&&Math.abs(C)>Math.abs(D)||this.axis==="y"&&Math.abs(C)<Math.abs(D))&&i(w,b,t(this,m))},()=>{i(w,b,null),this.swipe||(i(this,d,t(this,d)*3),B.ticker.subscribe(t(this,g),{order:Y.TICK_ORDER.SCROLL-1})),document.documentElement.classList.remove("grabbing"),i(this,y,!1)})});h(this,g,()=>{t(this,d)||B.ticker.unsubscribe(t(this,g)),i(this,d,t(this,d)*.95),i(this,d,W.preciseNumber(t(this,d),3)),this.changeEvent.notify("drag",t(this,d))});this.axis=(e==null?void 0:e.axis)||"y",this.swipe=(e==null?void 0:e.swipe)||!1,f.isBrowser&&i(this,m,e!=null&&e.element&&A.getElement(e.element)||document.documentElement)}connect(){f.isBrowser&&t(this,m).addEventListener("pointerdown",t(this,k))}disconnect(){f.isBrowser&&(t(this,m).removeEventListener("pointerdown",t(this,k)),B.ticker.unsubscribe(t(this,g)))}};b=new WeakMap,m=new WeakMap,y=new WeakMap,d=new WeakMap,k=new WeakMap,g=new WeakMap,h(w,b,null);let H=w;exports.Controls=q;exports.DragControls=H;exports.KeyboardControls=K;exports.WheelControls=R;
@@ -1 +1 @@
1
- "use strict";var a=(r,t,e)=>{if(!t.has(r))throw TypeError("Cannot "+e)};var n=(r,t,e)=>(a(r,t,"read from private field"),e?e.call(r):t.get(r)),l=(r,t,e)=>{if(t.has(r))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(r):t.set(r,e)};Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("../DragControls-C7P6P5HO.cjs"),i=require("../ticker/index.cjs");var s;class c extends o.Controls{constructor(e){super();l(this,s,e=>{this.changeEvent.notify("linear",e.elapsed*this.speed)});this.speed=(e==null?void 0:e.speed)||1}connect(){i.ticker.subscribe(n(this,s))}disconnect(){i.ticker.unsubscribe(n(this,s))}}s=new WeakMap;exports.Controls=o.Controls;exports.DragControls=o.DragControls;exports.KeyboardControls=o.KeyboardControls;exports.WheelControls=o.WheelControls;exports.LinearControls=c;
1
+ "use strict";var a=(r,t,e)=>{if(!t.has(r))throw TypeError("Cannot "+e)};var n=(r,t,e)=>(a(r,t,"read from private field"),e?e.call(r):t.get(r)),l=(r,t,e)=>{if(t.has(r))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(r):t.set(r,e)};Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("../DragControls-CdRWoO3y.cjs"),i=require("../ticker/index.cjs");var s;class c extends o.Controls{constructor(e){super();l(this,s,e=>{this.changeEvent.notify("linear",e.elapsed*this.speed)});this.speed=(e==null?void 0:e.speed)||1}connect(){i.ticker.subscribe(n(this,s))}disconnect(){i.ticker.unsubscribe(n(this,s))}}s=new WeakMap;exports.Controls=o.Controls;exports.DragControls=o.DragControls;exports.KeyboardControls=o.KeyboardControls;exports.WheelControls=o.WheelControls;exports.LinearControls=c;
@@ -7,8 +7,8 @@ var a = (s, r, e) => (c(s, r, "read from private field"), e ? e.call(s) : r.get(
7
7
  throw TypeError("Cannot add the same private member more than once");
8
8
  r instanceof WeakSet ? r.add(s) : r.set(s, e);
9
9
  };
10
- import { C as i } from "../DragControls-CZhJHO0_.js";
11
- import { D as p, K as u, W as f } from "../DragControls-CZhJHO0_.js";
10
+ import { C as i } from "../DragControls-BbznoEAb.js";
11
+ import { D as p, K as u, W as f } from "../DragControls-BbznoEAb.js";
12
12
  import { ticker as n } from "../ticker/index.js";
13
13
  var t;
14
14
  class m extends i {
@@ -1 +1 @@
1
- "use strict";var I=(i,e,s)=>{if(!e.has(i))throw TypeError("Cannot "+s)};var t=(i,e,s)=>(I(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)},n=(i,e,s,o)=>(I(i,e,"write to private field"),o?o.call(i,s):e.set(i,s),s);var R=(i,e,s)=>(I(i,e,"access private method"),s);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const ot=require("../css-unit-parser/index.cjs"),K=require("../ladder/index.cjs"),F=require("../order/index.cjs"),at=require("../scroll-entries/index.cjs"),G=require("../ticker/index.cjs"),J=require("../browser-CpzFX2xg.cjs"),N=require("../dom-JBOkFLTh.cjs"),L=require("../layout-8ryRAMGJ.cjs"),Q=require("../element-resizer/index.cjs"),j=require("../window-resizer/index.cjs");function tt(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),o=Math.sqrt(i.m31*i.m31+i.m32*i.m32+i.m33*i.m33),X=Math.atan2(i.m32,i.m33),Y=Math.atan2(-i.m31,Math.sqrt(i.m32*i.m32+i.m33*i.m33)),V=Math.atan2(i.m21,i.m11),u=i.m41,C=i.m42*-1,O=i.m43;return{scaleX:e,scaleY:s,scaleZ:o,rotationX:X,rotationY:Y,rotationZ:V,translationX:u,translationY:C,translationZ:O}}var a,f,p,M,H,q,x,v,Z,y,_,E,d,S,b,P,T,B,z,g,m,c,r,l,A,$,k,et,D,st,U,it,w,W;class ct{constructor(e,s){h(this,A);h(this,k);h(this,D);h(this,U);h(this,a,null);h(this,f,null);h(this,p,[]);h(this,M,"auto");h(this,H,"top");h(this,q,!1);h(this,x,!0);h(this,v,!0);h(this,Z,!0);h(this,y,0);h(this,_,0);h(this,E,0);h(this,d,0);h(this,S,0);h(this,b,0);h(this,P,0);h(this,T,0);h(this,B,0);h(this,z,{x:0,y:0,z:0});h(this,g,{x:0,y:0,z:0});h(this,m,{x:1,y:1,z:1});h(this,c,new K.Ladder({x:0,y:0,z:0}));h(this,r,new K.Ladder({x:0,y:0,z:0}));h(this,l,new K.Ladder({x:0,y:0,z:0}));h(this,w,()=>{J.isBrowser&&R(this,D,st).call(this)});h(this,W,()=>{R(this,U,it).call(this),R(this,A,$).call(this)});J.isBrowser&&(n(this,a,N.getElement(e)||document.body),n(this,f,N.getElement(s==null?void 0:s.containerElement)||document.body),n(this,M,(s==null?void 0:s.scrollAxis)||"auto"),n(this,H,(s==null?void 0:s.frontSide)||"top"),n(this,q,(s==null?void 0:s.cartesian)||!1),n(this,x,(s==null?void 0:s.sizeStep)!==void 0?s.sizeStep:!0),n(this,v,(s==null?void 0:s.positionStep)!==void 0?s.positionStep:!0),n(this,Z,(s==null?void 0:s.transformStep)!==void 0?s.transformStep:!0),t(this,l).setStep("_size","+",{x:1,y:1,z:1}),t(this,r).setStep("_position","+",{x:0,y:0,z:0}),t(this,l).setStep("_scale","*",{x:1,y:1,z:1}),t(this,r).setStep("_translation","+",{x:0,y:0,z:0}),t(this,c).setStep("_rotation","+",{x:0,y:0,z:0}),addEventListener("DOMContentLoaded",()=>{at.scrollEntries.getAll(this.element).forEach(o=>{this.setScrollStep(()=>o)})}),G.ticker.subscribe(t(this,W),{order:F.TICK_ORDER.LAYOUT_BOX,culling:s!=null&&s.culling?this.element:void 0}),Q.elementResizer.subscribe(this.element,t(this,w)),j.windowResizer.subscribe(t(this,w),F.RESIZE_ORDER.LAYOUT_BOX))}get element(){return t(this,a)}get containerElement(){return t(this,f)}get position(){return t(this,r).current}get rotation(){return t(this,c).current}get scale(){return t(this,l).current}get left(){return t(this,S)}get top(){return t(this,d)}get front(){return t(this,b)}get width(){return t(this,y)}get height(){return t(this,_)}get depth(){return t(this,E)}bindObject(e){e.position&&t(this,r).bind(e.position),e.rotation&&t(this,c).bind(e.rotation),e.scale&&t(this,l).bind(e.scale)}unbindObject(e){e.position&&t(this,r).unbind(e.position),e.rotation&&t(this,c).unbind(e.rotation),e.scale&&t(this,l).unbind(e.scale)}setScrollStep(e){return t(this,p).includes(e)||t(this,p).push(e),()=>this.deleteScrollStep(e)}deleteScrollStep(e){n(this,p,t(this,p).filter(s=>s!==e))}destroy(){G.ticker.unsubscribe(t(this,W)),Q.elementResizer.unsubscribe(t(this,w)),j.windowResizer.unsubscribe(t(this,w)),t(this,r).close(),t(this,c).close(),t(this,l).close()}setPositionStep(...e){t(this,r).setStep(...e)}getPositionStep(...e){return t(this,r).getStepValue(...e)}setRotationStep(...e){t(this,c).setStep(...e)}getRotationStep(...e){return t(this,c).getStepValue(...e)}setScaleStep(...e){t(this,l).setStep(...e)}getScaleStep(...e){return t(this,l).getStepValue(...e)}deletePositionStep(...e){t(this,r).deleteStep(...e)}deleteRotationStep(...e){t(this,c).deleteStep(...e)}deleteScaleStep(...e){t(this,l).deleteStep(...e)}}a=new WeakMap,f=new WeakMap,p=new WeakMap,M=new WeakMap,H=new WeakMap,q=new WeakMap,x=new WeakMap,v=new WeakMap,Z=new WeakMap,y=new WeakMap,_=new WeakMap,E=new WeakMap,d=new WeakMap,S=new WeakMap,b=new WeakMap,P=new WeakMap,T=new WeakMap,B=new WeakMap,z=new WeakMap,g=new WeakMap,m=new WeakMap,c=new WeakMap,r=new WeakMap,l=new WeakMap,A=new WeakSet,$=function(){t(this,l).calculate(),t(this,r).calculate(),t(this,c).calculate()},k=new WeakSet,et=function(){t(this,l).setStep("_size","+",{x:t(this,x)?t(this,y):1,y:t(this,x)?t(this,_):1,z:t(this,x)?t(this,E):1});const e=t(this,v)?t(this,P):0,s=t(this,v)?t(this,T):0,o=t(this,v)?t(this,B):0;t(this,r).setStep("_position","+",{x:e,y:s,z:o}),t(this,Z)?(t(this,l).setStep("_scale","*",{x:t(this,m).x,y:t(this,m).y,z:t(this,m).z}),t(this,r).setStep("_translation","+",{x:t(this,z).x,y:t(this,z).y,z:t(this,z).z}),t(this,c).setStep("_rotation","+",{x:t(this,g).x,y:t(this,g).y,z:t(this,g).z})):(t(this,l).setStep("_scale","*",{x:1,y:1,z:1}),t(this,r).setStep("_translation","+",{x:0,y:0,z:0}),t(this,c).setStep("_rotation","+",{x:0,y:0,z:0}))},D=new WeakSet,st=function(){const e=getComputedStyle(t(this,a));n(this,y,Math.max(t(this,a).clientWidth,1)),n(this,_,Math.max(t(this,a).clientHeight,1)),n(this,E,Math.max(ot.cssUnitParser.parse(e.getPropertyValue("--depth")||"0px"),1));const s=L.getCumulativeOffsetLeft(t(this,f)),o=L.getCumulativeOffsetTop(t(this,f)),X=t(this,f).clientWidth,Y=t(this,f).clientHeight;if(n(this,S,L.getCumulativeOffsetLeft(t(this,a))-s),n(this,d,L.getCumulativeOffsetTop(t(this,a))-o),t(this,M)==="z"){const C=t(this,S)/X,O=t(this,d)/Y;n(this,S,(C-Math.floor(C))*X),n(this,d,(O-Math.floor(O))*Y),t(this,H)==="left"?n(this,b,L.getCumulativeOffsetLeft(t(this,a))-s-t(this,S)):n(this,b,L.getCumulativeOffsetTop(t(this,a))-o-t(this,d))}if(n(this,S,t(this,S)+t(this,a).clientLeft),n(this,d,t(this,d)+t(this,a).clientTop),t(this,q)){const C=Math.round(X/2),O=Math.round(Y/2),ht=t(this,y)?Math.round(t(this,y)/2):0,nt=t(this,_)?Math.round(t(this,_)/2):0,rt=t(this,S)-C+ht,lt=(t(this,d)-O+nt)*-1;n(this,P,rt),n(this,T,lt)}else n(this,P,t(this,S)),n(this,T,t(this,d));n(this,B,t(this,b)*-1);const V=new WebKitCSSMatrix(e.transform),u=tt(V);t(this,z).x=u.translationX,t(this,z).y=u.translationY,t(this,z).z=u.translationZ,t(this,m).x=u.scaleX,t(this,m).y=u.scaleY,t(this,m).z=u.scaleZ,t(this,g).x=u.rotationX,t(this,g).y=u.rotationY,t(this,g).z=u.rotationZ,R(this,k,et).call(this),R(this,A,$).call(this)},U=new WeakSet,it=function(){for(let e=0;e<t(this,p).length;e++){const s=t(this,p)[e]();let o=s.axis;t(this,M)!=="auto"&&(o=t(this,M)),t(this,r).setStep(`_scroll_${e}`,"+",{[o]:s.value*(o==="x"?-1:t(this,q)?1:-1)})}},w=new WeakMap,W=new WeakMap;exports.LayoutBox=ct;exports.decomposeCSSMatrix=tt;
1
+ "use strict";var $=(i,e,s)=>{if(!e.has(i))throw TypeError("Cannot "+s)};var t=(i,e,s)=>($(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)},n=(i,e,s,r)=>($(i,e,"write to private field"),r?r.call(i,s):e.set(i,s),s);var O=(i,e,s)=>($(i,e,"access private method"),s);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const ut=require("../css-unit-parser/index.cjs"),F=require("../ladder/index.cjs"),N=require("../order/index.cjs"),G=require("../scroll-entries/index.cjs"),Q=require("../ticker/index.cjs"),j=require("../browser-CpzFX2xg.cjs"),tt=require("../dom-JBOkFLTh.cjs"),q=require("../layout-8ryRAMGJ.cjs"),et=require("../element-resizer/index.cjs"),st=require("../window-resizer/index.cjs");function it(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),r=Math.sqrt(i.m31*i.m31+i.m32*i.m32+i.m33*i.m33),Y=Math.atan2(i.m32,i.m33),H=Math.atan2(-i.m31,Math.sqrt(i.m32*i.m32+i.m33*i.m33)),K=Math.atan2(i.m21,i.m11),u=i.m41,C=i.m42*-1,R=i.m43;return{scaleX:e,scaleY:s,scaleZ:r,rotationX:Y,rotationY:H,rotationZ:K,translationX:u,translationY:C,translationZ:R}}var c,f,p,M,Z,L,x,w,B,y,_,P,S,d,v,T,X,A,z,g,m,a,l,o,b,W,J,V,ht,D,nt,I,rt,E,k,U;class St{constructor(e,s){h(this,W);h(this,V);h(this,D);h(this,I);h(this,c,null);h(this,f,null);h(this,p,[]);h(this,M,"auto");h(this,Z,"top");h(this,L,!1);h(this,x,!0);h(this,w,!0);h(this,B,!0);h(this,y,0);h(this,_,0);h(this,P,0);h(this,S,0);h(this,d,0);h(this,v,0);h(this,T,0);h(this,X,0);h(this,A,0);h(this,z,{x:0,y:0,z:0});h(this,g,{x:0,y:0,z:0});h(this,m,{x:1,y:1,z:1});h(this,a,new F.Ladder({x:0,y:0,z:0}));h(this,l,new F.Ladder({x:0,y:0,z:0}));h(this,o,new F.Ladder({x:0,y:0,z:0}));h(this,b,new Map);h(this,E,()=>{j.isBrowser&&O(this,D,nt).call(this)});h(this,k,()=>{O(this,I,rt).call(this),O(this,W,J).call(this)});h(this,U,()=>{const e=G.scrollEntries.getAll(this.element);t(this,b).forEach((s,r)=>{e.includes(r)||(this.deleteScrollStep(s),t(this,b).delete(r))}),e.forEach(s=>{if(!t(this,b).has(s)){const r=()=>s;t(this,b).set(s,r),this.setScrollStep(r)}})});j.isBrowser&&(n(this,c,tt.getElement(e)||document.body),n(this,f,tt.getElement(s==null?void 0:s.containerElement)||document.body),n(this,M,(s==null?void 0:s.scrollAxis)||"auto"),n(this,Z,(s==null?void 0:s.frontSide)||"top"),n(this,L,(s==null?void 0:s.cartesian)||!1),n(this,x,(s==null?void 0:s.sizeStep)!==void 0?s.sizeStep:!0),n(this,w,(s==null?void 0:s.positionStep)!==void 0?s.positionStep:!0),n(this,B,(s==null?void 0:s.transformStep)!==void 0?s.transformStep:!0),t(this,o).setStep("_size","+",{x:1,y:1,z:1}),t(this,l).setStep("_position","+",{x:0,y:0,z:0}),t(this,o).setStep("_scale","*",{x:1,y:1,z:1}),t(this,l).setStep("_translation","+",{x:0,y:0,z:0}),t(this,a).setStep("_rotation","+",{x:0,y:0,z:0}),G.scrollEntries.notifier.subscribe(t(this,U)),Q.ticker.subscribe(t(this,k),{order:N.TICK_ORDER.LAYOUT_BOX,culling:s!=null&&s.culling?this.element:void 0}),et.elementResizer.subscribe(this.element,t(this,E)),st.windowResizer.subscribe(t(this,E),N.RESIZE_ORDER.LAYOUT_BOX))}get element(){return t(this,c)}get containerElement(){return t(this,f)}get position(){return t(this,l).current}get rotation(){return t(this,a).current}get scale(){return t(this,o).current}get left(){return t(this,d)}get top(){return t(this,S)}get front(){return t(this,v)}get width(){return t(this,y)}get height(){return t(this,_)}get depth(){return t(this,P)}bindObject(e){e.position&&t(this,l).bind(e.position),e.rotation&&t(this,a).bind(e.rotation),e.scale&&t(this,o).bind(e.scale)}unbindObject(e){e.position&&t(this,l).unbind(e.position),e.rotation&&t(this,a).unbind(e.rotation),e.scale&&t(this,o).unbind(e.scale)}setScrollStep(e){return t(this,p).includes(e)||t(this,p).push(e),()=>this.deleteScrollStep(e)}deleteScrollStep(e){n(this,p,t(this,p).filter(s=>s!==e))}destroy(){Q.ticker.unsubscribe(t(this,k)),et.elementResizer.unsubscribe(t(this,E)),st.windowResizer.unsubscribe(t(this,E)),G.scrollEntries.notifier.unsubscribe(t(this,U)),t(this,b).clear(),t(this,l).close(),t(this,a).close(),t(this,o).close()}setPositionStep(...e){t(this,l).setStep(...e)}getPositionStep(...e){return t(this,l).getStepValue(...e)}setRotationStep(...e){t(this,a).setStep(...e)}getRotationStep(...e){return t(this,a).getStepValue(...e)}setScaleStep(...e){t(this,o).setStep(...e)}getScaleStep(...e){return t(this,o).getStepValue(...e)}deletePositionStep(...e){t(this,l).deleteStep(...e)}deleteRotationStep(...e){t(this,a).deleteStep(...e)}deleteScaleStep(...e){t(this,o).deleteStep(...e)}}c=new WeakMap,f=new WeakMap,p=new WeakMap,M=new WeakMap,Z=new WeakMap,L=new WeakMap,x=new WeakMap,w=new WeakMap,B=new WeakMap,y=new WeakMap,_=new WeakMap,P=new WeakMap,S=new WeakMap,d=new WeakMap,v=new WeakMap,T=new WeakMap,X=new WeakMap,A=new WeakMap,z=new WeakMap,g=new WeakMap,m=new WeakMap,a=new WeakMap,l=new WeakMap,o=new WeakMap,b=new WeakMap,W=new WeakSet,J=function(){t(this,o).calculate(),t(this,l).calculate(),t(this,a).calculate()},V=new WeakSet,ht=function(){t(this,o).setStep("_size","+",{x:t(this,x)?t(this,y):1,y:t(this,x)?t(this,_):1,z:t(this,x)?t(this,P):1});const e=t(this,w)?t(this,T):0,s=t(this,w)?t(this,X):0,r=t(this,w)?t(this,A):0;t(this,l).setStep("_position","+",{x:e,y:s,z:r}),t(this,B)?(t(this,o).setStep("_scale","*",{x:t(this,m).x,y:t(this,m).y,z:t(this,m).z}),t(this,l).setStep("_translation","+",{x:t(this,z).x,y:t(this,z).y,z:t(this,z).z}),t(this,a).setStep("_rotation","+",{x:t(this,g).x,y:t(this,g).y,z:t(this,g).z})):(t(this,o).setStep("_scale","*",{x:1,y:1,z:1}),t(this,l).setStep("_translation","+",{x:0,y:0,z:0}),t(this,a).setStep("_rotation","+",{x:0,y:0,z:0}))},D=new WeakSet,nt=function(){const e=getComputedStyle(t(this,c));n(this,y,Math.max(t(this,c).clientWidth,1)),n(this,_,Math.max(t(this,c).clientHeight,1)),n(this,P,Math.max(ut.cssUnitParser.parse(e.getPropertyValue("--depth")||"0px"),1));const s=q.getCumulativeOffsetLeft(t(this,f)),r=q.getCumulativeOffsetTop(t(this,f)),Y=t(this,f).clientWidth,H=t(this,f).clientHeight;if(n(this,d,q.getCumulativeOffsetLeft(t(this,c))-s),n(this,S,q.getCumulativeOffsetTop(t(this,c))-r),t(this,M)==="z"){const C=t(this,d)/Y,R=t(this,S)/H;n(this,d,(C-Math.floor(C))*Y),n(this,S,(R-Math.floor(R))*H),t(this,Z)==="left"?n(this,v,q.getCumulativeOffsetLeft(t(this,c))-s-t(this,d)):n(this,v,q.getCumulativeOffsetTop(t(this,c))-r-t(this,S))}if(n(this,d,t(this,d)+t(this,c).clientLeft),n(this,S,t(this,S)+t(this,c).clientTop),t(this,L)){const C=Math.round(Y/2),R=Math.round(H/2),lt=t(this,y)?Math.round(t(this,y)/2):0,ot=t(this,_)?Math.round(t(this,_)/2):0,ct=t(this,d)-C+lt,at=(t(this,S)-R+ot)*-1;n(this,T,ct),n(this,X,at)}else n(this,T,t(this,d)),n(this,X,t(this,S));n(this,A,t(this,v)*-1);const K=new WebKitCSSMatrix(e.transform),u=it(K);t(this,z).x=u.translationX,t(this,z).y=u.translationY,t(this,z).z=u.translationZ,t(this,m).x=u.scaleX,t(this,m).y=u.scaleY,t(this,m).z=u.scaleZ,t(this,g).x=u.rotationX,t(this,g).y=u.rotationY,t(this,g).z=u.rotationZ,O(this,V,ht).call(this),O(this,W,J).call(this)},I=new WeakSet,rt=function(){for(let e=0;e<t(this,p).length;e++){const s=t(this,p)[e]();let r=s.axis;t(this,M)!=="auto"&&(r=t(this,M)),t(this,l).setStep(`_scroll_${e}`,"+",{[r]:s.value*(r==="x"?-1:t(this,L)?1:-1)})}},E=new WeakMap,k=new WeakMap,U=new WeakMap;exports.LayoutBox=St;exports.decomposeCSSMatrix=it;
@@ -1,96 +1,108 @@
1
- var k = (i, e, s) => {
2
- if (!e.has(i))
3
- throw TypeError("Cannot " + s);
1
+ var K = (i, s, e) => {
2
+ if (!s.has(i))
3
+ throw TypeError("Cannot " + e);
4
4
  };
5
- var t = (i, e, s) => (k(i, e, "read from private field"), s ? s.call(i) : e.get(i)), h = (i, e, s) => {
6
- if (e.has(i))
5
+ var t = (i, s, e) => (K(i, s, "read from private field"), e ? e.call(i) : s.get(i)), h = (i, s, e) => {
6
+ if (s.has(i))
7
7
  throw TypeError("Cannot add the same private member more than once");
8
- e instanceof WeakSet ? e.add(i) : e.set(i, s);
9
- }, n = (i, e, s, o) => (k(i, e, "write to private field"), o ? o.call(i, s) : e.set(i, s), s);
10
- var E = (i, e, s) => (k(i, e, "access private method"), s);
11
- import { cssUnitParser as lt } from "../css-unit-parser/index.js";
12
- import { Ladder as I } from "../ladder/index.js";
13
- import { TICK_ORDER as ot, RESIZE_ORDER as at } from "../order/index.js";
14
- import { scrollEntries as ct } from "../scroll-entries/index.js";
15
- import { ticker as G } from "../ticker/index.js";
16
- import { i as J } from "../browser-0zX67oeU.js";
17
- import { g as N } from "../dom-0S_WDL4g.js";
18
- import { g as K, a as $ } from "../layout-HoBT_Da2.js";
19
- import { elementResizer as Q } from "../element-resizer/index.js";
20
- import { windowResizer as j } from "../window-resizer/index.js";
21
- function ut(i) {
22
- const e = Math.sqrt(
8
+ s instanceof WeakSet ? s.add(i) : s.set(i, e);
9
+ }, n = (i, s, e, r) => (K(i, s, "write to private field"), r ? r.call(i, e) : s.set(i, e), e);
10
+ var O = (i, s, e) => (K(i, s, "access private method"), e);
11
+ import { cssUnitParser as ct } from "../css-unit-parser/index.js";
12
+ import { Ladder as $ } from "../ladder/index.js";
13
+ import { TICK_ORDER as ut, RESIZE_ORDER as St } from "../order/index.js";
14
+ import { scrollEntries as F } from "../scroll-entries/index.js";
15
+ import { ticker as Q } from "../ticker/index.js";
16
+ import { i as j } from "../browser-0zX67oeU.js";
17
+ import { g as tt } from "../dom-0S_WDL4g.js";
18
+ import { g as G, a as J } from "../layout-HoBT_Da2.js";
19
+ import { elementResizer as st } from "../element-resizer/index.js";
20
+ import { windowResizer as et } from "../window-resizer/index.js";
21
+ function dt(i) {
22
+ const s = Math.sqrt(
23
23
  i.m11 * i.m11 + i.m12 * i.m12 + i.m13 * i.m13
24
- ), s = Math.sqrt(
24
+ ), e = Math.sqrt(
25
25
  i.m21 * i.m21 + i.m22 * i.m22 + i.m23 * i.m23
26
- ), o = Math.sqrt(
26
+ ), r = Math.sqrt(
27
27
  i.m31 * i.m31 + i.m32 * i.m32 + i.m33 * i.m33
28
- ), Y = Math.atan2(i.m32, i.m33), H = Math.atan2(
28
+ ), H = Math.atan2(i.m32, i.m33), T = Math.atan2(
29
29
  -i.m31,
30
30
  Math.sqrt(i.m32 * i.m32 + i.m33 * i.m33)
31
- ), U = Math.atan2(i.m21, i.m11), u = i.m41, C = i.m42 * -1, R = i.m43;
31
+ ), I = Math.atan2(i.m21, i.m11), u = i.m41, R = i.m42 * -1, C = i.m43;
32
32
  return {
33
- scaleX: e,
34
- scaleY: s,
35
- scaleZ: o,
36
- rotationX: Y,
37
- rotationY: H,
38
- rotationZ: U,
33
+ scaleX: s,
34
+ scaleY: e,
35
+ scaleZ: r,
36
+ rotationX: H,
37
+ rotationY: T,
38
+ rotationZ: I,
39
39
  translationX: u,
40
- translationY: C,
41
- translationZ: R
40
+ translationY: R,
41
+ translationZ: C
42
42
  };
43
43
  }
44
- var a, m, p, _, T, O, b, v, Z, y, M, L, S, d, x, P, X, A, f, z, g, c, r, l, W, F, B, tt, D, et, V, st, w, q;
44
+ var a, f, p, _, Z, P, x, E, A, y, M, L, S, d, v, X, Y, W, m, z, g, c, l, o, b, q, N, D, it, U, ht, k, nt, w, B, V;
45
45
  class vt {
46
- constructor(e, s) {
47
- h(this, W);
48
- h(this, B);
46
+ constructor(s, e) {
47
+ h(this, q);
49
48
  h(this, D);
50
- h(this, V);
49
+ h(this, U);
50
+ h(this, k);
51
51
  h(this, a, null);
52
- h(this, m, null);
52
+ h(this, f, null);
53
53
  h(this, p, []);
54
54
  h(this, _, "auto");
55
- h(this, T, "top");
56
- h(this, O, !1);
57
- h(this, b, !0);
58
- h(this, v, !0);
59
- h(this, Z, !0);
55
+ h(this, Z, "top");
56
+ h(this, P, !1);
57
+ h(this, x, !0);
58
+ h(this, E, !0);
59
+ h(this, A, !0);
60
60
  h(this, y, 0);
61
61
  h(this, M, 0);
62
62
  h(this, L, 0);
63
63
  h(this, S, 0);
64
64
  h(this, d, 0);
65
- h(this, x, 0);
66
- h(this, P, 0);
65
+ h(this, v, 0);
67
66
  h(this, X, 0);
68
- h(this, A, 0);
69
- h(this, f, { x: 0, y: 0, z: 0 });
67
+ h(this, Y, 0);
68
+ h(this, W, 0);
69
+ h(this, m, { x: 0, y: 0, z: 0 });
70
70
  h(this, z, { x: 0, y: 0, z: 0 });
71
71
  h(this, g, { x: 1, y: 1, z: 1 });
72
- h(this, c, new I({ x: 0, y: 0, z: 0 }));
73
- h(this, r, new I({ x: 0, y: 0, z: 0 }));
74
- h(this, l, new I({ x: 0, y: 0, z: 0 }));
72
+ h(this, c, new $({ x: 0, y: 0, z: 0 }));
73
+ h(this, l, new $({ x: 0, y: 0, z: 0 }));
74
+ h(this, o, new $({ x: 0, y: 0, z: 0 }));
75
+ h(this, b, /* @__PURE__ */ new Map());
75
76
  h(this, w, () => {
76
- J && E(this, D, et).call(this);
77
+ j && O(this, U, ht).call(this);
77
78
  });
78
- h(this, q, () => {
79
- E(this, V, st).call(this), E(this, W, F).call(this);
79
+ h(this, B, () => {
80
+ O(this, k, nt).call(this), O(this, q, N).call(this);
80
81
  });
81
- J && (n(this, a, N(e) || document.body), n(this, m, N(s == null ? void 0 : s.containerElement) || document.body), n(this, _, (s == null ? void 0 : s.scrollAxis) || "auto"), n(this, T, (s == null ? void 0 : s.frontSide) || "top"), n(this, O, (s == null ? void 0 : s.cartesian) || !1), n(this, b, (s == null ? void 0 : s.sizeStep) !== void 0 ? s.sizeStep : !0), n(this, v, (s == null ? void 0 : s.positionStep) !== void 0 ? s.positionStep : !0), n(this, Z, (s == null ? void 0 : s.transformStep) !== void 0 ? s.transformStep : !0), t(this, l).setStep("_size", "+", {
82
+ h(this, V, () => {
83
+ const s = F.getAll(this.element);
84
+ t(this, b).forEach((e, r) => {
85
+ s.includes(r) || (this.deleteScrollStep(e), t(this, b).delete(r));
86
+ }), s.forEach((e) => {
87
+ if (!t(this, b).has(e)) {
88
+ const r = () => e;
89
+ t(this, b).set(e, r), this.setScrollStep(r);
90
+ }
91
+ });
92
+ });
93
+ j && (n(this, a, tt(s) || document.body), n(this, f, tt(e == null ? void 0 : e.containerElement) || document.body), n(this, _, (e == null ? void 0 : e.scrollAxis) || "auto"), n(this, Z, (e == null ? void 0 : e.frontSide) || "top"), n(this, P, (e == null ? void 0 : e.cartesian) || !1), n(this, x, (e == null ? void 0 : e.sizeStep) !== void 0 ? e.sizeStep : !0), n(this, E, (e == null ? void 0 : e.positionStep) !== void 0 ? e.positionStep : !0), n(this, A, (e == null ? void 0 : e.transformStep) !== void 0 ? e.transformStep : !0), t(this, o).setStep("_size", "+", {
82
94
  x: 1,
83
95
  y: 1,
84
96
  z: 1
85
- }), t(this, r).setStep("_position", "+", {
97
+ }), t(this, l).setStep("_position", "+", {
86
98
  x: 0,
87
99
  y: 0,
88
100
  z: 0
89
- }), t(this, l).setStep("_scale", "*", {
101
+ }), t(this, o).setStep("_scale", "*", {
90
102
  x: 1,
91
103
  y: 1,
92
104
  z: 1
93
- }), t(this, r).setStep("_translation", "+", {
105
+ }), t(this, l).setStep("_translation", "+", {
94
106
  x: 0,
95
107
  y: 0,
96
108
  z: 0
@@ -98,29 +110,25 @@ class vt {
98
110
  x: 0,
99
111
  y: 0,
100
112
  z: 0
101
- }), addEventListener("DOMContentLoaded", () => {
102
- ct.getAll(this.element).forEach((o) => {
103
- this.setScrollStep(() => o);
104
- });
105
- }), G.subscribe(t(this, q), {
106
- order: ot.LAYOUT_BOX,
107
- culling: s != null && s.culling ? this.element : void 0
108
- }), Q.subscribe(this.element, t(this, w)), j.subscribe(t(this, w), at.LAYOUT_BOX));
113
+ }), F.notifier.subscribe(t(this, V)), Q.subscribe(t(this, B), {
114
+ order: ut.LAYOUT_BOX,
115
+ culling: e != null && e.culling ? this.element : void 0
116
+ }), st.subscribe(this.element, t(this, w)), et.subscribe(t(this, w), St.LAYOUT_BOX));
109
117
  }
110
118
  get element() {
111
119
  return t(this, a);
112
120
  }
113
121
  get containerElement() {
114
- return t(this, m);
122
+ return t(this, f);
115
123
  }
116
124
  get position() {
117
- return t(this, r).current;
125
+ return t(this, l).current;
118
126
  }
119
127
  get rotation() {
120
128
  return t(this, c).current;
121
129
  }
122
130
  get scale() {
123
- return t(this, l).current;
131
+ return t(this, o).current;
124
132
  }
125
133
  get left() {
126
134
  return t(this, d);
@@ -129,7 +137,7 @@ class vt {
129
137
  return t(this, S);
130
138
  }
131
139
  get front() {
132
- return t(this, x);
140
+ return t(this, v);
133
141
  }
134
142
  get width() {
135
143
  return t(this, y);
@@ -140,81 +148,81 @@ class vt {
140
148
  get depth() {
141
149
  return t(this, L);
142
150
  }
143
- bindObject(e) {
144
- e.position && t(this, r).bind(e.position), e.rotation && t(this, c).bind(e.rotation), e.scale && t(this, l).bind(e.scale);
151
+ bindObject(s) {
152
+ s.position && t(this, l).bind(s.position), s.rotation && t(this, c).bind(s.rotation), s.scale && t(this, o).bind(s.scale);
145
153
  }
146
- unbindObject(e) {
147
- e.position && t(this, r).unbind(e.position), e.rotation && t(this, c).unbind(e.rotation), e.scale && t(this, l).unbind(e.scale);
154
+ unbindObject(s) {
155
+ s.position && t(this, l).unbind(s.position), s.rotation && t(this, c).unbind(s.rotation), s.scale && t(this, o).unbind(s.scale);
148
156
  }
149
- setScrollStep(e) {
150
- return t(this, p).includes(e) || t(this, p).push(e), () => this.deleteScrollStep(e);
157
+ setScrollStep(s) {
158
+ return t(this, p).includes(s) || t(this, p).push(s), () => this.deleteScrollStep(s);
151
159
  }
152
- deleteScrollStep(e) {
160
+ deleteScrollStep(s) {
153
161
  n(this, p, t(this, p).filter(
154
- (s) => s !== e
162
+ (e) => e !== s
155
163
  ));
156
164
  }
157
165
  destroy() {
158
- G.unsubscribe(t(this, q)), Q.unsubscribe(t(this, w)), j.unsubscribe(t(this, w)), t(this, r).close(), t(this, c).close(), t(this, l).close();
166
+ Q.unsubscribe(t(this, B)), st.unsubscribe(t(this, w)), et.unsubscribe(t(this, w)), F.notifier.unsubscribe(t(this, V)), t(this, b).clear(), t(this, l).close(), t(this, c).close(), t(this, o).close();
159
167
  }
160
- setPositionStep(...e) {
161
- t(this, r).setStep(...e);
168
+ setPositionStep(...s) {
169
+ t(this, l).setStep(...s);
162
170
  }
163
- getPositionStep(...e) {
164
- return t(this, r).getStepValue(...e);
171
+ getPositionStep(...s) {
172
+ return t(this, l).getStepValue(...s);
165
173
  }
166
- setRotationStep(...e) {
167
- t(this, c).setStep(...e);
174
+ setRotationStep(...s) {
175
+ t(this, c).setStep(...s);
168
176
  }
169
- getRotationStep(...e) {
170
- return t(this, c).getStepValue(...e);
177
+ getRotationStep(...s) {
178
+ return t(this, c).getStepValue(...s);
171
179
  }
172
- setScaleStep(...e) {
173
- t(this, l).setStep(...e);
180
+ setScaleStep(...s) {
181
+ t(this, o).setStep(...s);
174
182
  }
175
- getScaleStep(...e) {
176
- return t(this, l).getStepValue(...e);
183
+ getScaleStep(...s) {
184
+ return t(this, o).getStepValue(...s);
177
185
  }
178
- deletePositionStep(...e) {
179
- t(this, r).deleteStep(...e);
186
+ deletePositionStep(...s) {
187
+ t(this, l).deleteStep(...s);
180
188
  }
181
- deleteRotationStep(...e) {
182
- t(this, c).deleteStep(...e);
189
+ deleteRotationStep(...s) {
190
+ t(this, c).deleteStep(...s);
183
191
  }
184
- deleteScaleStep(...e) {
185
- t(this, l).deleteStep(...e);
192
+ deleteScaleStep(...s) {
193
+ t(this, o).deleteStep(...s);
186
194
  }
187
195
  }
188
- a = new WeakMap(), m = new WeakMap(), p = new WeakMap(), _ = new WeakMap(), T = new WeakMap(), O = new WeakMap(), b = new WeakMap(), v = new WeakMap(), Z = new WeakMap(), y = new WeakMap(), M = new WeakMap(), L = new WeakMap(), S = new WeakMap(), d = new WeakMap(), x = new WeakMap(), P = new WeakMap(), X = new WeakMap(), A = new WeakMap(), f = new WeakMap(), z = new WeakMap(), g = new WeakMap(), c = new WeakMap(), r = new WeakMap(), l = new WeakMap(), W = new WeakSet(), F = function() {
189
- t(this, l).calculate(), t(this, r).calculate(), t(this, c).calculate();
190
- }, B = new WeakSet(), tt = function() {
191
- t(this, l).setStep("_size", "+", {
192
- x: t(this, b) ? t(this, y) : 1,
193
- y: t(this, b) ? t(this, M) : 1,
194
- z: t(this, b) ? t(this, L) : 1
196
+ a = new WeakMap(), f = new WeakMap(), p = new WeakMap(), _ = new WeakMap(), Z = new WeakMap(), P = new WeakMap(), x = new WeakMap(), E = new WeakMap(), A = new WeakMap(), y = new WeakMap(), M = new WeakMap(), L = new WeakMap(), S = new WeakMap(), d = new WeakMap(), v = new WeakMap(), X = new WeakMap(), Y = new WeakMap(), W = new WeakMap(), m = new WeakMap(), z = new WeakMap(), g = new WeakMap(), c = new WeakMap(), l = new WeakMap(), o = new WeakMap(), b = new WeakMap(), q = new WeakSet(), N = function() {
197
+ t(this, o).calculate(), t(this, l).calculate(), t(this, c).calculate();
198
+ }, D = new WeakSet(), it = function() {
199
+ t(this, o).setStep("_size", "+", {
200
+ x: t(this, x) ? t(this, y) : 1,
201
+ y: t(this, x) ? t(this, M) : 1,
202
+ z: t(this, x) ? t(this, L) : 1
195
203
  });
196
- const e = t(this, v) ? t(this, P) : 0, s = t(this, v) ? t(this, X) : 0, o = t(this, v) ? t(this, A) : 0;
197
- t(this, r).setStep("_position", "+", {
198
- x: e,
199
- y: s,
200
- z: o
201
- }), t(this, Z) ? (t(this, l).setStep("_scale", "*", {
204
+ const s = t(this, E) ? t(this, X) : 0, e = t(this, E) ? t(this, Y) : 0, r = t(this, E) ? t(this, W) : 0;
205
+ t(this, l).setStep("_position", "+", {
206
+ x: s,
207
+ y: e,
208
+ z: r
209
+ }), t(this, A) ? (t(this, o).setStep("_scale", "*", {
202
210
  x: t(this, g).x,
203
211
  y: t(this, g).y,
204
212
  z: t(this, g).z
205
- }), t(this, r).setStep("_translation", "+", {
206
- x: t(this, f).x,
207
- y: t(this, f).y,
208
- z: t(this, f).z
213
+ }), t(this, l).setStep("_translation", "+", {
214
+ x: t(this, m).x,
215
+ y: t(this, m).y,
216
+ z: t(this, m).z
209
217
  }), t(this, c).setStep("_rotation", "+", {
210
218
  x: t(this, z).x,
211
219
  y: t(this, z).y,
212
220
  z: t(this, z).z
213
- })) : (t(this, l).setStep("_scale", "*", {
221
+ })) : (t(this, o).setStep("_scale", "*", {
214
222
  x: 1,
215
223
  y: 1,
216
224
  z: 1
217
- }), t(this, r).setStep("_translation", "+", {
225
+ }), t(this, l).setStep("_translation", "+", {
218
226
  x: 0,
219
227
  y: 0,
220
228
  z: 0
@@ -223,35 +231,35 @@ a = new WeakMap(), m = new WeakMap(), p = new WeakMap(), _ = new WeakMap(), T =
223
231
  y: 0,
224
232
  z: 0
225
233
  }));
226
- }, D = new WeakSet(), et = function() {
227
- const e = getComputedStyle(t(this, a));
234
+ }, U = new WeakSet(), ht = function() {
235
+ const s = getComputedStyle(t(this, a));
228
236
  n(this, y, Math.max(t(this, a).clientWidth, 1)), n(this, M, Math.max(t(this, a).clientHeight, 1)), n(this, L, Math.max(
229
- lt.parse(e.getPropertyValue("--depth") || "0px"),
237
+ ct.parse(s.getPropertyValue("--depth") || "0px"),
230
238
  1
231
239
  ));
232
- const s = K(t(this, m)), o = $(t(this, m)), Y = t(this, m).clientWidth, H = t(this, m).clientHeight;
233
- if (n(this, d, K(t(this, a)) - s), n(this, S, $(t(this, a)) - o), t(this, _) === "z") {
234
- const C = t(this, d) / Y, R = t(this, S) / H;
235
- n(this, d, (C - Math.floor(C)) * Y), n(this, S, (R - Math.floor(R)) * H), t(this, T) === "left" ? n(this, x, K(t(this, a)) - s - t(this, d)) : n(this, x, $(t(this, a)) - o - t(this, S));
240
+ const e = G(t(this, f)), r = J(t(this, f)), H = t(this, f).clientWidth, T = t(this, f).clientHeight;
241
+ if (n(this, d, G(t(this, a)) - e), n(this, S, J(t(this, a)) - r), t(this, _) === "z") {
242
+ const R = t(this, d) / H, C = t(this, S) / T;
243
+ n(this, d, (R - Math.floor(R)) * H), n(this, S, (C - Math.floor(C)) * T), t(this, Z) === "left" ? n(this, v, G(t(this, a)) - e - t(this, d)) : n(this, v, J(t(this, a)) - r - t(this, S));
236
244
  }
237
- if (n(this, d, t(this, d) + t(this, a).clientLeft), n(this, S, t(this, S) + t(this, a).clientTop), t(this, O)) {
238
- const C = Math.round(Y / 2), R = Math.round(H / 2), it = t(this, y) ? Math.round(t(this, y) / 2) : 0, ht = t(this, M) ? Math.round(t(this, M) / 2) : 0, nt = t(this, d) - C + it, rt = (t(this, S) - R + ht) * -1;
239
- n(this, P, nt), n(this, X, rt);
245
+ if (n(this, d, t(this, d) + t(this, a).clientLeft), n(this, S, t(this, S) + t(this, a).clientTop), t(this, P)) {
246
+ const R = Math.round(H / 2), C = Math.round(T / 2), rt = t(this, y) ? Math.round(t(this, y) / 2) : 0, lt = t(this, M) ? Math.round(t(this, M) / 2) : 0, ot = t(this, d) - R + rt, at = (t(this, S) - C + lt) * -1;
247
+ n(this, X, ot), n(this, Y, at);
240
248
  } else
241
- n(this, P, t(this, d)), n(this, X, t(this, S));
242
- n(this, A, t(this, x) * -1);
243
- const U = new WebKitCSSMatrix(e.transform), u = ut(U);
244
- t(this, f).x = u.translationX, t(this, f).y = u.translationY, t(this, f).z = u.translationZ, t(this, g).x = u.scaleX, t(this, g).y = u.scaleY, t(this, g).z = u.scaleZ, t(this, z).x = u.rotationX, t(this, z).y = u.rotationY, t(this, z).z = u.rotationZ, E(this, B, tt).call(this), E(this, W, F).call(this);
245
- }, V = new WeakSet(), st = function() {
246
- for (let e = 0; e < t(this, p).length; e++) {
247
- const s = t(this, p)[e]();
248
- let o = s.axis;
249
- t(this, _) !== "auto" && (o = t(this, _)), t(this, r).setStep(`_scroll_${e}`, "+", {
250
- [o]: s.value * (o === "x" ? -1 : t(this, O) ? 1 : -1)
249
+ n(this, X, t(this, d)), n(this, Y, t(this, S));
250
+ n(this, W, t(this, v) * -1);
251
+ const I = new WebKitCSSMatrix(s.transform), u = dt(I);
252
+ t(this, m).x = u.translationX, t(this, m).y = u.translationY, t(this, m).z = u.translationZ, t(this, g).x = u.scaleX, t(this, g).y = u.scaleY, t(this, g).z = u.scaleZ, t(this, z).x = u.rotationX, t(this, z).y = u.rotationY, t(this, z).z = u.rotationZ, O(this, D, it).call(this), O(this, q, N).call(this);
253
+ }, k = new WeakSet(), nt = function() {
254
+ for (let s = 0; s < t(this, p).length; s++) {
255
+ const e = t(this, p)[s]();
256
+ let r = e.axis;
257
+ t(this, _) !== "auto" && (r = t(this, _)), t(this, l).setStep(`_scroll_${s}`, "+", {
258
+ [r]: e.value * (r === "x" ? -1 : t(this, P) ? 1 : -1)
251
259
  });
252
260
  }
253
- }, w = new WeakMap(), q = new WeakMap();
261
+ }, w = new WeakMap(), B = new WeakMap(), V = new WeakMap();
254
262
  export {
255
263
  vt as LayoutBox,
256
- ut as decomposeCSSMatrix
264
+ dt as decomposeCSSMatrix
257
265
  };