aptechka 0.4.9 → 0.4.11
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/Damped-BdnkNOcb.cjs +1 -0
- package/lib/Damped-Ceg1a3X8.js +150 -0
- package/lib/DragControls-C7P6P5HO.cjs +1 -0
- package/lib/DragControls-CZhJHO0_.js +146 -0
- package/lib/animation/Animation.d.ts +23 -0
- package/lib/animation/Damped.d.ts +15 -12
- package/lib/animation/Tweened.d.ts +9 -11
- package/lib/animation/index.cjs +1 -1
- package/lib/animation/index.d.ts +1 -1
- package/lib/animation/index.js +49 -75
- package/lib/canvas/index.cjs +1 -1
- package/lib/canvas/index.js +2 -2
- package/lib/checkbox/index.cjs +1 -1
- package/lib/checkbox/index.js +2 -2
- package/lib/controls/index.cjs +1 -1
- package/lib/controls/index.js +2 -2
- package/lib/{createStylesheet-W0b965g0.cjs → createStylesheet-CqHU9_qv.cjs} +1 -1
- package/lib/{createStylesheet-D6C3BPkl.js → createStylesheet-DBCEbDjI.js} +1 -1
- package/lib/element-constructor/index.cjs +1 -1
- package/lib/element-constructor/index.js +2 -2
- package/lib/{index-ilQWX_BM.js → index-BUOBDenR.js} +2 -2
- package/lib/{index-C_qv6rk4.cjs → index-Bv5vIuF-.cjs} +1 -1
- package/lib/modal/index.cjs +1 -1
- package/lib/modal/index.js +2 -2
- package/lib/{object-BZELAoVj.cjs → object-CCiXnER2.cjs} +1 -1
- package/lib/{object-R34VLqhp.js → object-D6MVWB4l.js} +8 -8
- package/lib/popover/index.cjs +1 -1
- package/lib/popover/index.js +2 -2
- package/lib/router/index.cjs +1 -1
- package/lib/router/index.js +1 -1
- package/lib/scroll/ScrollElement.d.ts +2 -0
- package/lib/scroll/index.cjs +1 -1
- package/lib/scroll/index.js +424 -411
- package/lib/select/index.cjs +1 -1
- package/lib/select/index.js +1 -1
- package/lib/{tags-D0zt3vue.js → tags-CMPg9ETZ.js} +1 -1
- package/lib/{tags-CK7mk_EP.cjs → tags-Djb6mb1o.cjs} +1 -1
- package/lib/theme/index.cjs +1 -1
- package/lib/theme/index.js +1 -1
- package/lib/tweaker/index.cjs +1 -1
- package/lib/tweaker/index.js +3 -3
- package/lib/utils/index.cjs +1 -1
- package/lib/utils/index.js +1 -1
- package/package.json +1 -1
- package/lib/Damped-9h4qaGcS.cjs +0 -1
- package/lib/Damped-HhitpTP_.js +0 -132
- package/lib/DragControls-CuGSxr1d.js +0 -137
- package/lib/DragControls-Dfbbq8Wb.cjs +0 -1
package/lib/checkbox/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const m=require("../custom-element/index.cjs");require("../Store-C-1ruEIm.cjs");const r=require("../tags-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const m=require("../custom-element/index.cjs");require("../Store-C-1ruEIm.cjs");const r=require("../tags-Djb6mb1o.cjs"),_=require("../createStylesheet-CqHU9_qv.cjs"),l=require("../theme/index.cjs"),w='<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 256 256"><path d="m243.33 90.91l-128.41 128.4a16 16 0 0 1-22.63 0l-71.62-72a16 16 0 0 1 0-22.61l24-24a16 16 0 0 1 22.57-.06l36.64 35.27l.11.11l92.73-91.37a16 16 0 0 1 22.58 0l24 23.56a16 16 0 0 1 .03 22.7Z"/></svg>';var x=Object.defineProperty,b=Object.getOwnPropertyDescriptor,y=(t,e,a,i)=>{for(var h=i>1?void 0:i?b(e,a):e,p=t.length-1,v;p>=0;p--)(v=t[p])&&(h=(i?v(e,a,h):v(h))||h);return i&&h&&x(e,a,h),h},k=(t,e,a)=>{if(!e.has(t))throw TypeError("Cannot "+a)},n=(t,e,a)=>(k(t,e,"read from private field"),a?a.call(t):e.get(t)),f=(t,e,a)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,a)},g=(t,e,a,i)=>(k(t,e,"write to private field"),i?i.call(t,a):e.set(t,a),a),u=(t,e,a)=>(k(t,e,"access private method"),a),s,d,c,o;const C=_.createStylesheet({":host":{position:"relative",display:"inline-block",width:l.aptechkaTheme.heightInput.var,height:l.aptechkaTheme.heightInput.var,borderRadius:l.aptechkaTheme.borderRadiusSmall.var,overflow:"hidden"},"label, .fake":{display:"block"},"label, .fake, .default":{width:"100%",height:"100%"},".real":{position:"absolute",top:"0",left:"0",width:"0px",height:"0px",visibility:"hidden",margin:"0"},".default":{display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:l.aptechkaTheme.colorDarkAux.var},".default svg":{width:"60%",height:"60%",fill:l.aptechkaTheme.colorLight.var,opacity:0,transition:l.aptechkaTheme.durationShort.var},":host(.checked) .default svg":{opacity:1}});exports.CheckboxElement=class extends m.CustomElement{constructor(){super(),f(this,c),f(this,s,null),f(this,d,void 0),this.openShadow(C),g(this,d,this.attachInternals()),r.element(this,{children:r.label({children:[r.span({class:"fake",children:r.slot({children:[r.span({class:"default",children:[w]})]})}),r.input({ref:e=>{g(this,s,e),e.required=this.hasAttribute("required"),e.value=this.getAttribute("value")||"",e.checked=this.hasAttribute("checked"),e.name=this.getAttribute("name")||"",u(this,c,o).call(this)},class:"real",type:"checkbox",onChange:()=>{u(this,c,o).call(this),this.dispatchEvent(new Event("change",{composed:!0}))}})]})})}get checked(){return n(this,s).checked}set checked(e){n(this,s).checked=e,u(this,c,o).call(this)}get value(){return n(this,s).value}set value(e){n(this,s).value=e,u(this,c,o).call(this)}};s=new WeakMap;d=new WeakMap;c=new WeakSet;o=function(){this.checked?n(this,d).setFormValue(this.value):n(this,d).setFormValue(null),this.classList.toggle("checked",this.checked)};exports.CheckboxElement.formAssociated=!0;exports.CheckboxElement=y([m.define("e-checkbox")],exports.CheckboxElement);
|
package/lib/checkbox/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { CustomElement as w, define as _ } from "../custom-element/index.js";
|
|
2
2
|
import "../Store-BQXXikps.js";
|
|
3
|
-
import { e as y, a3 as x, aB as m, ay as b, a0 as C } from "../tags-
|
|
4
|
-
import { c as A } from "../createStylesheet-
|
|
3
|
+
import { e as y, a3 as x, aB as m, ay as b, a0 as C } from "../tags-CMPg9ETZ.js";
|
|
4
|
+
import { c as A } from "../createStylesheet-DBCEbDjI.js";
|
|
5
5
|
import { aptechkaTheme as h } from "../theme/index.js";
|
|
6
6
|
const E = '<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 256 256"><path d="m243.33 90.91l-128.41 128.4a16 16 0 0 1-22.63 0l-71.62-72a16 16 0 0 1 0-22.61l24-24a16 16 0 0 1 22.57-.06l36.64 35.27l.11.11l92.73-91.37a16 16 0 0 1 22.58 0l24 23.56a16 16 0 0 1 .03 22.7Z"/></svg>';
|
|
7
7
|
var S = Object.defineProperty, I = Object.getOwnPropertyDescriptor, F = (e, t, a, i) => {
|
package/lib/controls/index.cjs
CHANGED
|
@@ -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-
|
|
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;
|
package/lib/controls/index.js
CHANGED
|
@@ -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-
|
|
11
|
-
import { D as p, K as u, W as f } from "../DragControls-
|
|
10
|
+
import { C as i } from "../DragControls-CZhJHO0_.js";
|
|
11
|
+
import { D as p, K as u, W as f } from "../DragControls-CZhJHO0_.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";const n=require("./tags-
|
|
1
|
+
"use strict";const n=require("./tags-Djb6mb1o.cjs");function r(t){const e=new CSSStyleSheet;return e.replaceSync(n.style(t).node.innerHTML),e}exports.createStylesheet=r;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../tags-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../tags-Djb6mb1o.cjs"),t=require("../createStylesheet-CqHU9_qv.cjs"),a=require("../createTheme-Cfaw9UmV.cjs");exports.ElementConstructor=e.ElementConstructor;exports.a=e.a;exports.abbr=e.abbr;exports.address=e.address;exports.area=e.area;exports.article=e.article;exports.aside=e.aside;exports.audio=e.audio;exports.b=e.b;exports.base=e.base;exports.bdi=e.bdi;exports.bdo=e.bdo;exports.blockquote=e.blockquote;exports.body=e.body;exports.br=e.br;exports.button=e.button;exports.canvas=e.canvas;exports.caption=e.caption;exports.cite=e.cite;exports.code=e.code;exports.col=e.col;exports.colgroup=e.colgroup;exports.contents=e.contents;exports.data=e.data;exports.datalist=e.datalist;exports.dd=e.dd;exports.del=e.del;exports.details=e.details;exports.dfn=e.dfn;exports.dialog=e.dialog;exports.div=e.div;exports.dl=e.dl;exports.dt=e.dt;exports.element=e.element;exports.em=e.em;exports.embed=e.embed;exports.empty=e.empty;exports.fieldset=e.fieldset;exports.figcaption=e.figcaption;exports.figure=e.figure;exports.footer=e.footer;exports.form=e.form;exports.fragment=e.fragment;exports.h1=e.h1;exports.h2=e.h2;exports.h3=e.h3;exports.h4=e.h4;exports.h5=e.h5;exports.h6=e.h6;exports.head=e.head;exports.header=e.header;exports.hgroup=e.hgroup;exports.hr=e.hr;exports.html=e.html;exports.htmlVar=e.htmlVar;exports.i=e.i;exports.iframe=e.iframe;exports.img=e.img;exports.input=e.input;exports.ins=e.ins;exports.kbd=e.kbd;exports.label=e.label;exports.legend=e.legend;exports.li=e.li;exports.link=e.link;exports.main=e.main;exports.map=e.map;exports.mark=e.mark;exports.menu=e.menu;exports.meta=e.meta;exports.meter=e.meter;exports.nav=e.nav;exports.noscript=e.noscript;exports.object=e.object;exports.ol=e.ol;exports.optgroup=e.optgroup;exports.option=e.option;exports.output=e.output;exports.p=e.p;exports.picture=e.picture;exports.pre=e.pre;exports.progress=e.progress;exports.q=e.q;exports.rp=e.rp;exports.rt=e.rt;exports.ruby=e.ruby;exports.s=e.s;exports.samp=e.samp;exports.script=e.script;exports.search=e.search;exports.section=e.section;exports.select=e.select;exports.slot=e.slot;exports.small=e.small;exports.source=e.source;exports.span=e.span;exports.strong=e.strong;exports.style=e.style;exports.sub=e.sub;exports.summary=e.summary;exports.sup=e.sup;exports.table=e.table;exports.tbody=e.tbody;exports.td=e.td;exports.template=e.template;exports.textarea=e.textarea;exports.tfoot=e.tfoot;exports.th=e.th;exports.thead=e.thead;exports.time=e.time;exports.title=e.title;exports.tr=e.tr;exports.track=e.track;exports.u=e.u;exports.ul=e.ul;exports.video=e.video;exports.wbr=e.wbr;exports.createStylesheet=t.createStylesheet;exports.createTheme=a.createTheme;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { E as e, a as t, b as r, c as o, d as i, f as l, g as d, h as m, i as p, j as c, k as n, l as u, m as b, n as h, o as f, p as g, q as y, r as k, s as v, t as x, u as q, v as j, a_ as w, w as C, x as E, y as S, z as T, A as V, B as z, C as A, D as B, F as D, G as F, e as G, H, I, aZ as J, J as K, K as L, L as M, M as N, N as O, aY as P, O as Q, P as R, Q as U, R as W, S as X, T as Y, U as Z, V as _, W as $, X as aa, Y as sa, aV as ea, Z as ta, _ as ra, $ as oa, a0 as ia, a1 as la, a2 as da, a3 as ma, a4 as pa, a5 as ca, a6 as na, a7 as ua, a8 as ba, a9 as ha, aa as fa, ab as ga, ac as ya, ad as ka, ae as va, af as xa, ag as qa, ah as ja, ai as wa, aj as Ca, ak as Ea, al as Sa, am as Ta, an as Va, ao as za, ap as Aa, aq as Ba, ar as Da, as as Fa, at as Ga, au as Ha, av as Ia, aw as Ja, ax as Ka, ay as La, az as Ma, aA as Na, aB as Oa, aC as Pa, aD as Qa, aE as Ra, aF as Ua, aG as Wa, aH as Xa, aI as Ya, aJ as Za, aK as _a, aL as $a, aM as as, aN as ss, aO as es, aP as ts, aQ as rs, aR as os, aS as is, aT as ls, aU as ds, aW as ms, aX as ps } from "../tags-
|
|
2
|
-
import { c as ns } from "../createStylesheet-
|
|
1
|
+
import { E as e, a as t, b as r, c as o, d as i, f as l, g as d, h as m, i as p, j as c, k as n, l as u, m as b, n as h, o as f, p as g, q as y, r as k, s as v, t as x, u as q, v as j, a_ as w, w as C, x as E, y as S, z as T, A as V, B as z, C as A, D as B, F as D, G as F, e as G, H, I, aZ as J, J as K, K as L, L as M, M as N, N as O, aY as P, O as Q, P as R, Q as U, R as W, S as X, T as Y, U as Z, V as _, W as $, X as aa, Y as sa, aV as ea, Z as ta, _ as ra, $ as oa, a0 as ia, a1 as la, a2 as da, a3 as ma, a4 as pa, a5 as ca, a6 as na, a7 as ua, a8 as ba, a9 as ha, aa as fa, ab as ga, ac as ya, ad as ka, ae as va, af as xa, ag as qa, ah as ja, ai as wa, aj as Ca, ak as Ea, al as Sa, am as Ta, an as Va, ao as za, ap as Aa, aq as Ba, ar as Da, as as Fa, at as Ga, au as Ha, av as Ia, aw as Ja, ax as Ka, ay as La, az as Ma, aA as Na, aB as Oa, aC as Pa, aD as Qa, aE as Ra, aF as Ua, aG as Wa, aH as Xa, aI as Ya, aJ as Za, aK as _a, aL as $a, aM as as, aN as ss, aO as es, aP as ts, aQ as rs, aR as os, aS as is, aT as ls, aU as ds, aW as ms, aX as ps } from "../tags-CMPg9ETZ.js";
|
|
2
|
+
import { c as ns } from "../createStylesheet-DBCEbDjI.js";
|
|
3
3
|
import { c as bs } from "../createTheme-CHnsCgAr.js";
|
|
4
4
|
export {
|
|
5
5
|
e as ElementConstructor,
|
|
@@ -12,8 +12,8 @@ import "./Store-BQXXikps.js";
|
|
|
12
12
|
import { i as P } from "./browser-0zX67oeU.js";
|
|
13
13
|
import { d as Q } from "./events-_C2CztxR.js";
|
|
14
14
|
import { g as X } from "./style-j2TwriJ_.js";
|
|
15
|
-
import { e as k, p as V, ay as E, D as R } from "./tags-
|
|
16
|
-
import { c as D } from "./createStylesheet-
|
|
15
|
+
import { e as k, p as V, ay as E, D as R } from "./tags-CMPg9ETZ.js";
|
|
16
|
+
import { c as D } from "./createStylesheet-DBCEbDjI.js";
|
|
17
17
|
import { aptechkaTheme as w } from "./theme/index.js";
|
|
18
18
|
var j = Object.defineProperty, ee = Object.getOwnPropertyDescriptor, te = (t, e, s, i) => {
|
|
19
19
|
for (var n = i > 1 ? void 0 : i ? ee(e, s) : e, r = t.length - 1, l; r >= 0; r--)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";var D=(t,e,s)=>{if(!e.has(t))throw TypeError("Cannot "+s)};var z=(t,e,s)=>(D(t,e,"read from private field"),s?s.call(t):e.get(t)),A=(t,e,s)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,s)},H=(t,e,s,i)=>(D(t,e,"write to private field"),i?i.call(t,s):e.set(t,s),s);const S=require("./custom-element/index.cjs");require("./Store-C-1ruEIm.cjs");const W=require("./browser-CpzFX2xg.cjs"),N=require("./events-Crwi8fz6.cjs"),V=require("./style-At6aDoqG.cjs"),a=require("./tags-
|
|
1
|
+
"use strict";var D=(t,e,s)=>{if(!e.has(t))throw TypeError("Cannot "+s)};var z=(t,e,s)=>(D(t,e,"read from private field"),s?s.call(t):e.get(t)),A=(t,e,s)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,s)},H=(t,e,s,i)=>(D(t,e,"write to private field"),i?i.call(t,s):e.set(t,s),s);const S=require("./custom-element/index.cjs");require("./Store-C-1ruEIm.cjs");const W=require("./browser-CpzFX2xg.cjs"),N=require("./events-Crwi8fz6.cjs"),V=require("./style-At6aDoqG.cjs"),a=require("./tags-Djb6mb1o.cjs"),M=require("./createStylesheet-CqHU9_qv.cjs"),E=require("./theme/index.cjs");var Y=Object.defineProperty,Z=Object.getOwnPropertyDescriptor,J=(t,e,s,i)=>{for(var n=i>1?void 0:i?Z(e,s):e,l=t.length-1,h;l>=0;l--)(h=t[l])&&(n=(i?h(e,s,n):h(n))||n);return i&&n&&Y(e,s,n),n},P=(t,e,s)=>{if(!e.has(t))throw TypeError("Cannot "+s)},r=(t,e,s)=>(P(t,e,"read from private field"),s?s.call(t):e.get(t)),c=(t,e,s)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,s)},d=(t,e,s,i)=>(P(t,e,"write to private field"),i?i.call(t,s):e.set(t,s),s),I=(t,e,s)=>(P(t,e,"access private method"),s),u,f,o,v,m,g,$,C,b;const K=M.createStylesheet({":host":{position:"relative"},".head":{width:"100%",cursor:"default",background:"none",border:"none",color:"inherit",fontFamily:"inherit",fontSize:"inherit",fontWeight:"inherit",textAlign:"start",padding:"0",margin:"0"},".body":{boxSizing:"border-box",position:"var(--position, unset)",top:"100%",left:"0",width:"100%",overflow:"hidden",transitionDuration:`var(--duration, ${E.aptechkaTheme.durationShort.var})`,transitionProperty:"height",cursor:"default"},".body-inner":{display:"grid",gap:"var(--gap, 0px)",width:"100%",paddingTop:"var(--gap, 0px)"}});exports.SelectElement=class extends S.CustomElement{constructor(){super(),c(this,C),c(this,u,null),c(this,f,""),c(this,o,null),c(this,v,!1),c(this,m,void 0),c(this,g,null),c(this,$,()=>{N.dispatchSizeChangeEvent(this)}),W.isBrowser&&(this.openShadow(K),d(this,u,this.attachInternals()),d(this,g,new ResizeObserver(r(this,$))),a.element(this,{children:[a.button({class:"head",children:a.slot({name:"head"}),onClick:()=>{this.opened?this.close():this.open()}}),a.div({class:"body",style:{height:"0px"},children:a.div({class:"body-inner",children:a.slot()}),ref:e=>{d(this,o,e)}})]}))}get value(){return r(this,f)}set value(e){d(this,f,e),this.dispatchEvent(new Event("change",{bubbles:!0,composed:!0})),r(this,u).setFormValue(r(this,f))}get internals(){return r(this,u)}get opened(){return r(this,v)}open(){clearTimeout(r(this,m)),d(this,v,!0),r(this,o).style.display="grid",this.classList.add("triggered"),setTimeout(()=>{this.classList.add("opened"),r(this,o).style.height=r(this,o).scrollHeight+"px",I(this,C,b).call(this)},0)}close(){d(this,v,!1),r(this,o).style.height="0px",this.classList.remove("opened"),I(this,C,b).call(this),d(this,m,setTimeout(()=>{this.classList.remove("triggered"),r(this,o).style.display="none"},V.getElementTransitionDurationMS(r(this,o))))}connectedCallback(){r(this,g).observe(r(this,o))}disconnectedCallback(){clearTimeout(r(this,m)),r(this,g).disconnect()}};u=new WeakMap;f=new WeakMap;o=new WeakMap;v=new WeakMap;m=new WeakMap;g=new WeakMap;$=new WeakMap;C=new WeakSet;b=function(){this.dispatchEvent(new CustomEvent("selectToggle",{bubbles:!0,composed:!0,detail:{opened:r(this,v)}}))};exports.SelectElement.formAssociated=!0;exports.SelectElement=J([S.define("e-select")],exports.SelectElement);var y;class q extends S.CustomElement{constructor(){super(...arguments);A(this,y,null)}get selectElement(){return z(this,y)}connectedCallback(){var i,n;const s=(n=(i=this.assignedSlot)==null?void 0:i.getRootNode())==null?void 0:n.host;s?H(this,y,s):console.log(this,"e-select not found")}}y=new WeakMap;var Q=Object.defineProperty,X=Object.getOwnPropertyDescriptor,j=(t,e,s,i)=>{for(var n=i>1?void 0:i?X(e,s):e,l=t.length-1,h;l>=0;l--)(h=t[l])&&(n=(i?h(e,s,n):h(n))||n);return i&&n&&Q(e,s,n),n},G=(t,e,s)=>{if(!e.has(t))throw TypeError("Cannot "+s)},x=(t,e,s)=>(G(t,e,"read from private field"),s?s.call(t):e.get(t)),B=(t,e,s)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,s)},ee=(t,e,s)=>(G(t,e,"access private method"),s),w,L,R;const te=M.createStylesheet({":host":{width:"100%",height:E.aptechkaTheme.heightInput.var,display:"inline-flex",alignItems:"center"},button:{all:"inherit"}});exports.SelectOptionElement=class extends q{constructor(){super(),B(this,L),B(this,w,()=>{this.selectElement.value===this.value?this.style.display="none":this.style.display=""}),W.isBrowser&&(this.openShadow(te),a.element(this,{children:[a.button({onClick:()=>{ee(this,L,R).call(this)},children:a.slot()})]}))}get value(){return(this.hasAttribute("value")?this.getAttribute("value"):this.innerText)||""}connectedCallback(){super.connectedCallback(),this.hasAttribute("default")&&(this.selectElement.value||(this.selectElement.value=this.value)),this.selectElement.addEventListener("change",x(this,w)),setTimeout(()=>{x(this,w).call(this)})}disconnectedCallback(){this.selectElement.removeEventListener("change",x(this,w))}};w=new WeakMap;L=new WeakSet;R=function(){this.selectElement.value=this.value,this.selectElement.close()};exports.SelectOptionElement=j([S.define("e-select-option")],exports.SelectOptionElement);const F=`<svg
|
|
2
2
|
xmlns="http://www.w3.org/2000/svg"
|
|
3
3
|
width="32"
|
|
4
4
|
height="32"
|
package/lib/modal/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const v=require("../custom-element/index.cjs");require("../Store-C-1ruEIm.cjs");const b=require("../browser-CpzFX2xg.cjs"),s=require("../tags-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const v=require("../custom-element/index.cjs");require("../Store-C-1ruEIm.cjs");const b=require("../browser-CpzFX2xg.cjs"),s=require("../tags-Djb6mb1o.cjs"),m=require("../createStylesheet-CqHU9_qv.cjs"),g=require("../popover/index.cjs"),d=require("../theme/index.cjs");var w=Object.defineProperty,_=Object.getOwnPropertyDescriptor,y=(t,e,o,r)=>{for(var n=r>1?void 0:r?_(e,o):e,c=t.length-1,h;c>=0;c--)(h=t[c])&&(n=(r?h(e,o,n):h(n))||n);return r&&n&&w(e,o,n),n},p=(t,e,o)=>{if(!e.has(t))throw TypeError("Cannot "+o)},l=(t,e,o)=>(p(t,e,"read from private field"),o?o.call(t):e.get(t)),u=(t,e,o)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,o)},f=(t,e,o,r)=>(p(t,e,"write to private field"),r?r.call(t,o):e.set(t,o),o),i,a;const C=m.createStylesheet({":host":{position:"fixed",top:"0",left:"0",zIndex:"1",width:"100%",height:"100%",transitionProperty:"opacity",transitionDuration:d.aptechkaTheme.durationShort.var},":host::before":{content:'""',position:"fixed",top:"0",left:"0",zIndex:"-1",width:"100%",height:"100%",backgroundColor:"var(--backdrop, rgba(0, 0, 0, 0.8))"},".inner":{width:"100%",height:"100%",display:"flex",alignItems:"center",justifyContent:"center",overflow:"hidden auto"},".overflow .inner":{alignItems:"flex-start"},".content":{position:"relative"},".close-button":{position:"absolute",zIndex:"1",top:"var(--close-button-top, 0.5em)",right:"var(--close-button-right, 0.5em)",background:"none",border:"none",fontFamily:"inherit",fontSize:"inherit",fontWeight:"inherit"},".close-button-default":{width:"var(--close-button-size, 1.5em)",height:"var(--close-button-size, 1.5em)",display:"flex",alignItems:"center",justifyContent:"center",transitionProperty:"transform",transitionDuration:d.aptechkaTheme.durationShort.var,willChange:"transform"},".close-button:hover .close-button-default":{transform:"scale(0.9)"},".close-button:active .close-button-default":{transform:"scale(0.7)"},".close-button-default::before, .close-button-default::after":{content:'""',position:"absolute",width:"var(--close-button-thickness, 0.1em)",height:"100%",backgroundColor:`var(--close-button-color, ${d.aptechkaTheme.colorDark.var})`},".close-button-default::before":{transform:"rotate(-45deg)"},".close-button-default::after":{transform:"rotate(45deg)"}});exports.ModalElement=class extends g.PopoverElement{constructor(){super(),u(this,i,null),u(this,a,null),b.isBrowser&&(this.openShadow(C),s.element(this,{children:s.div({class:"inner",outside:!0,children:s.div({class:"content",children:[s.element("e-popover-button",{type:"close",target:this.id,class:"close-button",lightChildren:[s.slot({name:"close-button",children:s.span({class:"close-button-default"})})]}),s.slot()]}),ref:e=>f(this,a,e)})}),f(this,i,new ResizeObserver(()=>{l(this,a).scrollHeight>l(this,a).clientHeight?this.classList.add("overflow"):this.classList.remove("overflow")})))}connectedCallback(){super.connectedCallback(),l(this,i).observe(this)}disconnectedCallback(){super.disconnectedCallback(),l(this,i).disconnect()}};i=new WeakMap;a=new WeakMap;exports.ModalElement=y([v.define("e-modal")],exports.ModalElement);
|
package/lib/modal/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { define as g } from "../custom-element/index.js";
|
|
2
2
|
import "../Store-BQXXikps.js";
|
|
3
3
|
import { i as w } from "../browser-0zX67oeU.js";
|
|
4
|
-
import { e as d, D as f, ay as u, aB as _ } from "../tags-
|
|
5
|
-
import { c as y } from "../createStylesheet-
|
|
4
|
+
import { e as d, D as f, ay as u, aB as _ } from "../tags-CMPg9ETZ.js";
|
|
5
|
+
import { c as y } from "../createStylesheet-DBCEbDjI.js";
|
|
6
6
|
import { PopoverElement as C } from "../popover/index.js";
|
|
7
7
|
import { aptechkaTheme as h } from "../theme/index.js";
|
|
8
8
|
var k = Object.defineProperty, x = Object.getOwnPropertyDescriptor, z = (t, e, o, r) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";function s(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function
|
|
1
|
+
"use strict";function s(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function f(e){if(e===null||typeof e!="object")return e;if(e instanceof Date)return new Date(e.getTime());if(e instanceof Node)return e;const t=Array.isArray(e)?[]:{};for(const r in e)e.hasOwnProperty(r)&&(t[r]=f(e[r]));return t}function c(e,t,r=s){for(const n in t)r(t[n])?(e[n]||Object.assign(e,{[n]:{}}),c(e[n],t[n],r)):Object.assign(e,{[n]:t[n]});return e}function u(e){return e===null||typeof e=="undefined"}function i(e,t){if(typeof e!=typeof t)return!1;if([e,t].some(r=>u(r)))return e===t;if(Array.isArray(e)){const r=e.length>t.length?e:t,n=e.length>t.length?t:e;return r.every((p,y)=>i(p,n[y]))}if(typeof e!="object"||e instanceof Node||typeof e=="object"&&e.constructor.toString().startsWith("class"))return e===t;for(const r in e){if(!t.hasOwnProperty(r))return!1;if(typeof e[r]=="object"&&typeof t[r]=="object"){if(!i(e[r],t[r]))return!1}else if(e[r]!==t[r])return!1}return!0}function l(e,t){const r={};for(const n in e)t.includes(n)&&(r[n]=e[n]);return r}function o(e,t){const r={};for(const n in e)t.includes(n)||(r[n]=e[n]);return r}function a(e){var t;return typeof e=="function"&&((t=Object.getOwnPropertyDescriptor(e,"prototype"))==null?void 0:t.writable)===!1}function O(e,...t){t.forEach(r=>{Object.getOwnPropertyNames(r.prototype).forEach(n=>{Object.defineProperty(e.prototype,n,Object.getOwnPropertyDescriptor(r.prototype,n)||Object.create(null))})})}exports.cloneDeep=f;exports.compareObjects=i;exports.isESClass=a;exports.isNullish=u;exports.isObject=s;exports.mergeDeep=c;exports.mixin=O;exports.omit=o;exports.pick=l;
|
|
@@ -13,9 +13,9 @@ function y(e) {
|
|
|
13
13
|
e.hasOwnProperty(r) && (t[r] = y(e[r]));
|
|
14
14
|
return t;
|
|
15
15
|
}
|
|
16
|
-
function
|
|
16
|
+
function a(e, t, r = c) {
|
|
17
17
|
for (const n in t)
|
|
18
|
-
r(t[n]) ? (e[n] || Object.assign(e, { [n]: {} }),
|
|
18
|
+
r(t[n]) ? (e[n] || Object.assign(e, { [n]: {} }), a(e[n], t[n], r)) : Object.assign(e, { [n]: t[n] });
|
|
19
19
|
return e;
|
|
20
20
|
}
|
|
21
21
|
function u(e) {
|
|
@@ -45,13 +45,13 @@ function i(e, t) {
|
|
|
45
45
|
}
|
|
46
46
|
return !0;
|
|
47
47
|
}
|
|
48
|
-
function
|
|
48
|
+
function p(e, t) {
|
|
49
49
|
const r = {};
|
|
50
50
|
for (const n in e)
|
|
51
51
|
t.includes(n) && (r[n] = e[n]);
|
|
52
52
|
return r;
|
|
53
53
|
}
|
|
54
|
-
function
|
|
54
|
+
function o(e, t) {
|
|
55
55
|
const r = {};
|
|
56
56
|
for (const n in e)
|
|
57
57
|
t.includes(n) || (r[n] = e[n]);
|
|
@@ -64,7 +64,7 @@ function l(e) {
|
|
|
64
64
|
function O(e, ...t) {
|
|
65
65
|
t.forEach((r) => {
|
|
66
66
|
Object.getOwnPropertyNames(r.prototype).forEach((n) => {
|
|
67
|
-
|
|
67
|
+
Object.defineProperty(
|
|
68
68
|
e.prototype,
|
|
69
69
|
n,
|
|
70
70
|
Object.getOwnPropertyDescriptor(r.prototype, n) || /* @__PURE__ */ Object.create(null)
|
|
@@ -79,7 +79,7 @@ export {
|
|
|
79
79
|
i as d,
|
|
80
80
|
O as e,
|
|
81
81
|
l as i,
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
82
|
+
a as m,
|
|
83
|
+
o,
|
|
84
|
+
p
|
|
85
85
|
};
|
package/lib/popover/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const T=require("../attribute/index.cjs"),S=require("../custom-element/index.cjs"),A=require("../Store-C-1ruEIm.cjs"),b=require("../style-At6aDoqG.cjs"),x=require("../browser-CpzFX2xg.cjs"),k=require("../tags-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const T=require("../attribute/index.cjs"),S=require("../custom-element/index.cjs"),A=require("../Store-C-1ruEIm.cjs"),b=require("../style-At6aDoqG.cjs"),x=require("../browser-CpzFX2xg.cjs"),k=require("../tags-Djb6mb1o.cjs"),B=require("../createStylesheet-CqHU9_qv.cjs");var D=Object.defineProperty,I=Object.getOwnPropertyDescriptor,N=(t,e,s,i)=>{for(var n=i>1?void 0:i?I(e,s):e,c=t.length-1,p;c>=0;c--)(p=t[c])&&(n=(i?p(e,s,n):p(n))||n);return i&&n&&D(e,s,n),n},C=(t,e,s)=>{if(!e.has(t))throw TypeError("Cannot "+s)},r=(t,e,s)=>(C(t,e,"read from private field"),s?s.call(t):e.get(t)),o=(t,e,s)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,s)},L=(t,e,s,i)=>(C(t,e,"write to private field"),i?i.call(t,s):e.set(t,s),s),$=(t,e,s)=>(C(t,e,"access private method"),s),P,a,E,h,u,_,M,O,v,m,w,y,g,W,f;exports.PopoverElement=class extends S.CustomElement{constructor(){super(...arguments),o(this,M),o(this,v),o(this,g),o(this,P,-1),o(this,a,new A.Store(!1)),o(this,E,void 0),o(this,h,new T.Attribute(this,"history",!1)),o(this,u,new T.Attribute(this,"single",!1)),o(this,_,!1),this.open=()=>{r(this,a).current||(r(this,a).current=!0,r(this,u).current&&(exports.PopoverElement.__opened.forEach(e=>e.close()),exports.PopoverElement.__opened=[]),exports.PopoverElement.__opened.push(this),L(this,P,exports.PopoverElement.__opened.length-1),r(this,h).current&&r(this,_)&&history.pushState("","",r(this,M,O)),clearTimeout(r(this,E)),this.classList.add("triggered"),this.style.display="block",setTimeout(()=>{addEventListener("click",r(this,w)),addEventListener("keydown",r(this,y)),this.style.opacity="1",this.classList.add("opened")}))},this.close=()=>{if(r(this,a).current){if(r(this,a).current=!1,exports.PopoverElement.__opened=exports.PopoverElement.__opened.filter(e=>e!==this),r(this,h).current){const e=new URL(location.href);e.searchParams.delete(r(this,v,m)),history.replaceState(null,"",e.href)}this.classList.remove("opened"),this.style.opacity="0",removeEventListener("click",r(this,w)),removeEventListener("keydown",r(this,y)),setTimeout(()=>{this.classList.remove("triggered"),this.style.display="none"},b.getElementTransitionDurationMS(this))}},o(this,w,e=>{$(this,g,W).call(this,()=>{const s=e.composedPath();(!s.find(i=>i===this)&&!s.find(i=>i instanceof HTMLElement&&i.closest("e-popover-button"))||s[0]instanceof HTMLElement&&s[0].hasAttribute("outside"))&&this.close()})}),o(this,y,e=>{$(this,g,W).call(this,()=>{e.code==="Escape"&&this.close()})}),o(this,f,()=>{L(this,_,!1),r(this,a).current&&r(this,h).current&&!location.search.includes(r(this,v,m))?this.close():!r(this,a).current&&r(this,h).current&&location.search.includes(r(this,v,m))&&this.open(),L(this,_,!0)})}get history(){return r(this,h)}get single(){return r(this,u)}get opened(){return r(this,a)}connectedCallback(){r(this,h).observe(),r(this,u).observe(),this.style.opacity="0",this.style.display="none",addEventListener("popstate",r(this,f)),setTimeout(()=>{r(this,f).call(this)},0)}disconnectedCallback(){r(this,h).unobserve(),r(this,u).unobserve(),clearTimeout(r(this,E)),removeEventListener("popstate",r(this,f))}};P=new WeakMap;a=new WeakMap;E=new WeakMap;h=new WeakMap;u=new WeakMap;_=new WeakMap;M=new WeakSet;O=function(){return`${location.pathname}${location.search?location.search+"&":"?"}${r(this,v,m)}`};v=new WeakSet;m=function(){return`modal-${this.id}`};w=new WeakMap;y=new WeakMap;g=new WeakSet;W=function(t){(exports.PopoverElement.__opened[r(this,P)-1]||exports.PopoverElement.__opened.length===1)&&t()};f=new WeakMap;exports.PopoverElement.__opened=[];exports.PopoverElement=N([S.define("e-popover")],exports.PopoverElement);var G=Object.defineProperty,H=Object.getOwnPropertyDescriptor,R=(t,e,s,i)=>{for(var n=i>1?void 0:i?H(e,s):e,c=t.length-1,p;c>=0;c--)(p=t[c])&&(n=(i?p(e,s,n):p(n))||n);return i&&n&&G(e,s,n),n},q=(t,e,s)=>{if(!e.has(t))throw TypeError("Cannot "+s)},d=(t,e,s)=>(q(t,e,"read from private field"),s?s.call(t):e.get(t)),U=(t,e,s)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,s)},z=(t,e,s,i)=>(q(t,e,"write to private field"),i?i.call(t,s):e.set(t,s),s),l;const F=B.createStylesheet({button:{all:"inherit"}});exports.PopoverButtonElement=class extends S.CustomElement{constructor(){super(),U(this,l,void 0),this.openShadow(F),x.isBrowser&&k.element(this,{children:[k.button({onClick:()=>{if(d(this,l)){const e=this.getAttribute("type")||"open";e==="open"||e==="toggle"&&!d(this,l).opened.current?d(this,l).open():(e==="close"||e==="toggle"&&d(this,l).opened.current)&&d(this,l).close()}},children:[k.slot()]})]})}get popoverElement(){return d(this,l)}connectedCallback(){const e=this.getAttribute("target");if(e){const s=document.querySelector(`#${e}`)||this.getRootNode().querySelector(`#${e}`);s?z(this,l,s):console.warn(this,`target ${e} not found`)}}};l=new WeakMap;exports.PopoverButtonElement=R([S.define("e-popover-button")],exports.PopoverButtonElement);
|
package/lib/popover/index.js
CHANGED
|
@@ -3,8 +3,8 @@ import { CustomElement as O, define as A } from "../custom-element/index.js";
|
|
|
3
3
|
import { S as I } from "../Store-BQXXikps.js";
|
|
4
4
|
import { g as N } from "../style-j2TwriJ_.js";
|
|
5
5
|
import { i as q } from "../browser-0zX67oeU.js";
|
|
6
|
-
import { e as B, p as G, ay as H } from "../tags-
|
|
7
|
-
import { c as R } from "../createStylesheet-
|
|
6
|
+
import { e as B, p as G, ay as H } from "../tags-CMPg9ETZ.js";
|
|
7
|
+
import { c as R } from "../createStylesheet-DBCEbDjI.js";
|
|
8
8
|
var U = Object.defineProperty, b = Object.getOwnPropertyDescriptor, z = (e, t, s, r) => {
|
|
9
9
|
for (var n = r > 1 ? void 0 : r ? b(t, s) : t, p = e.length - 1, d; p >= 0; p--)
|
|
10
10
|
(d = e[p]) && (n = (r ? d(t, s, n) : d(n)) || n);
|
package/lib/router/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var X=(n,t)=>(t=Symbol[n])?t:Symbol.for("Symbol."+n);var z=(n,t,s)=>{if(!t.has(n))throw TypeError("Cannot "+s)};var e=(n,t,s)=>(z(n,t,"read from private field"),s?s.call(n):t.get(n)),r=(n,t,s)=>{if(t.has(n))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(n):t.set(n,s)},o=(n,t,s,i)=>(z(n,t,"write to private field"),i?i.call(n,s):t.set(n,s),s);var F=(n,t,s)=>(z(n,t,"access private method"),s);var B=(n,t,s)=>new Promise((i,u)=>{var h=f=>{try{d(s.next(f))}catch(T){u(T)}},a=f=>{try{d(s.throw(f))}catch(T){u(T)}},d=f=>f.done?i(f.value):Promise.resolve(f.value).then(h,a);d((s=s.apply(n,t)).next())});var G=(n,t,s)=>(t=n[X("asyncIterator")])?t.call(n):(n=n[X("iterator")](),t={},s=(i,u)=>(u=n[i])&&(t[i]=h=>new Promise((a,d,f)=>(h=u.call(n,h),f=h.done,Promise.resolve(h.value).then(T=>a({value:T,done:f}),d)))),s("next"),s("return"),t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const tt=require("urlpattern-polyfill"),et=require("../notifier/index.cjs"),Z=require("../browser-CpzFX2xg.cjs"),st=require("../function-MthRj-GJ.cjs"),it=require("../object-
|
|
1
|
+
"use strict";var X=(n,t)=>(t=Symbol[n])?t:Symbol.for("Symbol."+n);var z=(n,t,s)=>{if(!t.has(n))throw TypeError("Cannot "+s)};var e=(n,t,s)=>(z(n,t,"read from private field"),s?s.call(n):t.get(n)),r=(n,t,s)=>{if(t.has(n))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(n):t.set(n,s)},o=(n,t,s,i)=>(z(n,t,"write to private field"),i?i.call(n,s):t.set(n,s),s);var F=(n,t,s)=>(z(n,t,"access private method"),s);var B=(n,t,s)=>new Promise((i,u)=>{var h=f=>{try{d(s.next(f))}catch(T){u(T)}},a=f=>{try{d(s.throw(f))}catch(T){u(T)}},d=f=>f.done?i(f.value):Promise.resolve(f.value).then(h,a);d((s=s.apply(n,t)).next())});var G=(n,t,s)=>(t=n[X("asyncIterator")])?t.call(n):(n=n[X("iterator")](),t={},s=(i,u)=>(u=n[i])&&(t[i]=h=>new Promise((a,d,f)=>(h=u.call(n,h),f=h.done,Promise.resolve(h.value).then(T=>a({value:T,done:f}),d)))),s("next"),s("return"),t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const tt=require("urlpattern-polyfill"),et=require("../notifier/index.cjs"),Z=require("../browser-CpzFX2xg.cjs"),st=require("../function-MthRj-GJ.cjs"),it=require("../object-CCiXnER2.cjs");var b,O,R,m,l,v,S,p,P,y,I,_;class nt{constructor(t,s){r(this,I);r(this,b,void 0);r(this,O,void 0);r(this,R,void 0);r(this,m,void 0);r(this,l,void 0);r(this,v,void 0);r(this,S,void 0);r(this,p,null);r(this,P,[]);r(this,y,[]);o(this,b,t),o(this,O,s),o(this,R,new URLPattern({pathname:e(this,b)})),o(this,m,null),o(this,l,null),o(this,v,!1),o(this,S,null),Z.isBrowser&&o(this,p,new MutationObserver(i=>{i[0].addedNodes.forEach(h=>{e(this,m)?e(this,y).push(h):e(this,P).push(h)})}))}get pattern(){return e(this,b)}get urlPattern(){return e(this,R)}get isActive(){return e(this,v)}get element(){return e(this,l)}get nest(){return e(this,S)}testPathname(t){return this.urlPattern.test({pathname:t})}render(t,s){return B(this,null,function*(){var i,u;if(e(this,p).observe(document.head,{childList:!0,subtree:!0}),e(this,m))e(this,P).forEach(h=>{document.head.appendChild(h)});else{const h=yield e(this,O).call(this);if(o(this,y,[...e(this,P)]),typeof h.default=="function"&&(o(this,m,h.default),it.isESClass(h.default))){const a="e-"+((i=e(this,m))==null?void 0:i.name.toLowerCase());customElements.get(a)||customElements.define(a,h.default)}}if(yield F(this,I,_).call(this),e(this,m)){const h=e(this,R).exec({pathname:s}),a=(h==null?void 0:h.pathname.groups)||{},d=Object.fromEntries(new URLSearchParams(location.search)),f={pathnameParams:a,searchParams:d};o(this,l,new(e(this,m))(f)),t.appendChild(e(this,l)),o(this,S,e(this,l).querySelector("[data-nest]")||((u=e(this,l).shadowRoot)==null?void 0:u.querySelector("[data-nest]"))||e(this,l).shadowRoot||e(this,l)),o(this,v,!0)}e(this,p).disconnect()})}close(){var t;e(this,p).disconnect(),(t=e(this,l))==null||t.remove(),o(this,v,!1),e(this,y).forEach(s=>document.head.removeChild(s)),o(this,y,[])}getAnchorElements(){var s;let t=[];return e(this,l)&&(t=[...e(this,l).querySelectorAll("a")]),(s=e(this,l))!=null&&s.shadowRoot&&(t=[...t,...e(this,l).shadowRoot.querySelectorAll("a")]),t}}b=new WeakMap,O=new WeakMap,R=new WeakMap,m=new WeakMap,l=new WeakMap,v=new WeakMap,S=new WeakMap,p=new WeakMap,P=new WeakMap,y=new WeakMap,I=new WeakSet,_=function(){return B(this,null,function*(){const t=e(this,P).filter(a=>a instanceof HTMLElement?a.tagName==="STYLE"||a.tagName==="SCRIPT"||a.tagName==="LINK":!1);try{for(var s=G(t),i,u,h;i=!(u=yield s.next()).done;i=!1){const a=u.value;yield new Promise(d=>{a.onload=()=>{d()}})}}catch(u){h=[u]}finally{try{i&&(u=s.return)&&(yield u.call(s))}finally{if(h)throw h[0]}}})};var H,g,A,U,j;class rt{constructor(t,s){r(this,H,void 0);r(this,g,void 0);r(this,A,void 0);r(this,U,void 0);r(this,j,t=>{t.preventDefault(),e(this,H).navigate(e(this,A),e(this,U))});o(this,H,t),o(this,g,s),o(this,A,e(this,g).getAttribute("href")||"/"),o(this,U,e(this,g).getAttribute("data-history-action")||"push"),e(this,g).addEventListener("click",e(this,j)),location.pathname===e(this,A)&&e(this,g).classList.add("current")}destroy(){e(this,g).removeEventListener("click",e(this,j)),e(this,g).classList.remove("current")}}H=new WeakMap,g=new WeakMap,A=new WeakMap,U=new WeakMap,j=new WeakMap;globalThis.URLPattern=tt.URLPattern;var k,q,w,N,M,E,C,x,D,K,$,W;const Y=class Y{constructor(t){r(this,K);r(this,k,null);r(this,q,void 0);r(this,w,[]);r(this,N,null);r(this,M,[]);r(this,E,void 0);r(this,C,null);r(this,x,new et.Notifier);r(this,D,st.debounce(()=>{const t=s=>s.split("/").length;o(this,w,e(this,w).sort((s,i)=>t(s.pattern)-t(i.pattern))),this.navigate(location.pathname.replace(e(this,q),""))},0));r(this,W,t=>{t.state&&this.navigate(t.state,"none")});o(this,q,(t==null?void 0:t.base)||""),Y.active=this,Z.isBrowser&&(o(this,k,(t==null?void 0:t.rootElement)||document.body),addEventListener("popstate",e(this,W)))}get currentPathname(){return e(this,C)}get candidatePathname(){return e(this,E)}get routes(){return e(this,w)}navigationEvent(t){return e(this,x).subscribe(t)}defineRoute(t,s){const i=new nt(t,s);e(this,w).push(i),e(this,D).call(this)}navigate(t,s="push"){return B(this,null,function*(){var f,Q;if(e(this,E)===t||e(this,C)===t)return;Y.active=this,o(this,E,t);const i=e(this,w).filter(c=>c.isActive),u=e(this,w).filter(c=>!i.includes(c)&&c.testPathname(t)),h=i.filter(c=>!c.testPathname(t)),a=i.filter(c=>c.testPathname(t));let d=!0;if(this.preprocessor)try{yield new Promise((c,L)=>{var V;(V=this.preprocessor)==null||V.call(this,{pathname:t,resolve:c,reject:L})})}catch(c){c?console.error(c):console.log("Route change canceled"),d=!1}if(d&&e(this,E)===t){o(this,N,a[a.length-1]),h.forEach(L=>{L.close()}),o(this,C,t);try{for(var T=G(u),at,ct,lt;at=!(ct=yield T.next()).done;at=!1){const L=ct.value;yield L.render(((f=e(this,N))==null?void 0:f.nest)||e(this,k),t),o(this,N,L)}}catch(ct){lt=[ct]}finally{try{at&&(ct=T.return)&&(yield ct.call(T))}finally{if(lt)throw lt[0]}}const c=e(this,q)+t+location.search;s==="push"?history.pushState(c,"",c):s==="replace"&&history.replaceState(c,"",c),F(this,K,$).call(this),(Q=this.postprocessor)==null||Q.call(this,{pathname:t}),e(this,x).notify({pathname:t})}})}};k=new WeakMap,q=new WeakMap,w=new WeakMap,N=new WeakMap,M=new WeakMap,E=new WeakMap,C=new WeakMap,x=new WeakMap,D=new WeakMap,K=new WeakSet,$=function(){const t=e(this,w).filter(i=>i.isActive),s=Array.from(new Set([...e(this,k).querySelectorAll("a"),...t.map(i=>i.getAnchorElements()).flat()].filter(i=>{var u;return(u=i.getAttribute("href"))==null?void 0:u.startsWith("/")})));e(this,M).forEach(i=>{i.destroy()}),o(this,M,s.map(i=>new rt(this,i)))},W=new WeakMap;let J=Y;exports.Router=J;
|
package/lib/router/index.js
CHANGED
|
@@ -30,7 +30,7 @@ import { URLPattern as tt } from "urlpattern-polyfill";
|
|
|
30
30
|
import { Notifier as et } from "../notifier/index.js";
|
|
31
31
|
import { i as X } from "../browser-0zX67oeU.js";
|
|
32
32
|
import { d as st } from "../function-C10DGppn.js";
|
|
33
|
-
import { i as it } from "../object-
|
|
33
|
+
import { i as it } from "../object-D6MVWB4l.js";
|
|
34
34
|
var R, U, b, m, l, w, A, v, P, E, B, Z;
|
|
35
35
|
class nt {
|
|
36
36
|
constructor(t, s) {
|
|
@@ -18,6 +18,8 @@ export declare class ScrollElement extends CustomElement {
|
|
|
18
18
|
#private;
|
|
19
19
|
constructor();
|
|
20
20
|
get dampingCSSProperty(): CSSProperty<number, keyof import('../store').StoreManagers>;
|
|
21
|
+
get maxxCSSProperty(): CSSProperty<number, keyof import('../store').StoreManagers>;
|
|
22
|
+
get stiffnessCSSProperty(): CSSProperty<number, keyof import('../store').StoreManagers>;
|
|
21
23
|
get mouseDragCSSProperty(): CSSProperty<boolean, keyof import('../store').StoreManagers>;
|
|
22
24
|
get axisAttibute(): CSSProperty<Axes2D, keyof import('../store').StoreManagers>;
|
|
23
25
|
get pagesAttibute(): CSSProperty<number, keyof import('../store').StoreManagers>;
|
package/lib/scroll/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var je=(r,e,i)=>{if(!e.has(r))throw TypeError("Cannot "+i)};var l=(r,e,i)=>(je(r,e,"read from private field"),i?i.call(r):e.get(r)),$=(r,e,i)=>{if(e.has(r))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(r):e.set(r,i)},R=(r,e,i,n)=>(je(r,e,"write to private field"),n?n.call(r,i):e.set(r,i),i);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const gs=require("../Damped-9h4qaGcS.cjs"),gt=require("../Store-C-1ruEIm.cjs"),ws=require("../Derived-B-g8dYgh.cjs"),Ge=require("../browser-CpzFX2xg.cjs"),St=require("../layout-8ryRAMGJ.cjs"),qt=require("../math-GDWEqu7y.cjs");require("../ticker/index.cjs");const Ve=require("../DragControls-Dfbbq8Wb.cjs"),vt=require("../custom-element/index.cjs"),Me=require("../order/index.cjs"),Ut=require("../window-resizer/index.cjs"),Lt=require("../scroll-entries/index.cjs"),B=require("../tags-CK7mk_EP.cjs"),Ue=require("../createStylesheet-W0b965g0.cjs"),ts=require("../css-unit-parser/index.cjs"),S=require("../css-property/index.cjs"),_s=require("../Viewport-DAjFJF5V.cjs"),bs=require("../gestures-DHLrn6Q8.cjs"),Cs=require("../dom-JBOkFLTh.cjs"),es=require("../theme/index.cjs"),rs=require("../function-MthRj-GJ.cjs");var ys=Object.defineProperty,Es=Object.getOwnPropertyDescriptor,Ps=(r,e,i,n)=>{for(var h=n>1?void 0:n?Es(e,i):e,c=r.length-1,u;c>=0;c--)(u=r[c])&&(h=(n?u(e,i,h):u(h))||h);return n&&h&&ys(e,i,h),h},Ze=(r,e,i)=>{if(!e.has(r))throw TypeError("Cannot "+i)},s=(r,e,i)=>(Ze(r,e,"read from private field"),i?i.call(r):e.get(r)),a=(r,e,i)=>{if(e.has(r))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(r):e.set(r,i)},g=(r,e,i,n)=>(Ze(r,e,"write to private field"),n?n.call(r,i):e.set(r,i),i),C=(r,e,i)=>(Ze(r,e,"access private method"),i),d,z,tt,N,et,$t,D,wt,zt,Ft,Dt,w,Ee,v,ae,ce,L,_,U,J,Mt,lt,P,Nt,_t,Zt,Kt,ie,Pe,It,re,ke,Ke,We,Ne,ue,Oe,pe,$e,Vt,xe,ze,ns,Jt,fe,Fe,V,E,ft,Y;class ks{constructor(e,i){$(this,V,void 0);$(this,E,void 0);$(this,ft,0);$(this,Y,0);R(this,V,e),R(this,E,i),Lt.scrollEntries.register(l(this,V))}get size(){return l(this,ft)}get position(){return l(this,Y)}destroy(){Lt.scrollEntries.unregister(l(this,V)),l(this,V).style.transform=""}resize(){R(this,ft,l(this,E).vertical?l(this,V).offsetHeight:l(this,V).offsetWidth),R(this,Y,l(this,E).vertical?St.getCumulativeOffsetTop(l(this,V)):St.getCumulativeOffsetLeft(l(this,V))),R(this,Y,l(this,Y)-l(this,E).contentPosition)}transform(){let e=0;const i=l(this,E).viewportSize-l(this,ft);l(this,E).infiniteCSSProperty.current&&l(this,E).overscroll&&l(this,Y)+l(this,ft)<l(this,E).currentScrollValue&&(e=l(this,E).distance*-1-l(this,E).gap),Lt.scrollEntries.update(l(this,V),l(this,E).axisAttibute.current,e);const n=l(this,E).currentScrollValue+e,h=l(this,Y)-l(this,E).viewportSize-i,c=l(this,Y)+l(this,ft)+i,u=qt.clamp(n,h,c);l(this,E).vertical?l(this,V).style.transform=`translate3d(0px, ${u*-1}px, 0px)`:l(this,V).style.transform=`translate3d(${u*-1}px, 0px, 0px)`}}V=new WeakMap,E=new WeakMap,ft=new WeakMap,Y=new WeakMap;const Ws=Ue.createStylesheet({":host":{position:"relative",width:"100%",height:"100%",display:"block",outline:"none"},':host([hibernated="true"])':{display:"contents"},".static":{position:"absolute",top:"0",left:"0",width:"100%",height:"100%"},".content":{position:"relative",display:"flex",width:"100%",height:"100%",gap:"var(--gap, 0px)"},':host([hibernated="true"]) .content':{display:"contents"},"::slotted(*)":{flexShrink:"0"}});exports.ScrollElement=class extends vt.CustomElement{constructor(){super(),a(this,ie),a(this,It),a(this,ke),a(this,We),a(this,ue),a(this,pe),a(this,ze),a(this,fe),a(this,d,null),a(this,z,new S.CSSProperty(this,"--axis","y")),a(this,tt,new S.CSSProperty(this,"--pages",0,{validate:e=>Math.max(0,e-1)})),a(this,N,new S.CSSProperty(this,"--split",!1)),a(this,et,new S.CSSProperty(this,"--sectional",!1)),a(this,$t,new S.CSSProperty(this,"--wheel-max-delta",!1)),a(this,D,new S.CSSProperty(this,"--infinite",!1)),a(this,wt,new S.CSSProperty(this,"--damping",.03)),a(this,zt,new S.CSSProperty(this,"--mouse-drag",!1)),a(this,Ft,new S.CSSProperty(this,"--disabled",!1)),a(this,Dt,new S.CSSProperty(this,"--hibernated",!1)),a(this,w,null),a(this,Ee,null),a(this,v,[]),a(this,ae,0),a(this,ce,0),a(this,L,0),a(this,_,0),a(this,U,0),a(this,J,null),a(this,Mt,null),a(this,lt,null),a(this,P,new gt.Store(0)),a(this,Nt,0),a(this,_t,0),a(this,Zt,!0),a(this,Kt,!0),a(this,Vt,()=>{const e=this.currentScrollValue/s(this,_)||0;if(g(this,ae,this.vertical?St.getCumulativeOffsetTop(this):St.getCumulativeOffsetLeft(this)),g(this,ce,this.vertical?St.getCumulativeOffsetTop(s(this,w)):St.getCumulativeOffsetLeft(s(this,w))),g(this,L,this.vertical?this.offsetHeight:this.offsetWidth),s(this,tt).current){g(this,_,s(this,L)*s(this,tt).current);const i=s(this,_)+s(this,L);this.vertical?(s(this,w).style.width=i+"px",s(this,w).style.height="100%"):(s(this,w).style.height=i+"px",s(this,w).style.width="100%")}else this.vertical?(s(this,w).style.width="100%",s(this,w).style.height="max-content",g(this,_,s(this,w).offsetHeight-s(this,L))):(s(this,w).style.width="max-content",s(this,w).style.height="100%",g(this,_,s(this,w).offsetWidth-s(this,L)));if(this.vertical?g(this,U,ts.cssUnitParser.parse(getComputedStyle(s(this,w)).rowGap)):g(this,U,ts.cssUnitParser.parse(getComputedStyle(s(this,w)).columnGap)),!s(this,D).current){const i=getComputedStyle(this);g(this,_,s(this,_)+(this.vertical?parseFloat(i.paddingBlockStart)+parseFloat(i.paddingBlockEnd):parseFloat(i.paddingInlineStart)+parseFloat(i.paddingInlineEnd))),s(this,d).max=s(this,_)}if(s(this,v).forEach(i=>{i.resize(),i.transform()}),s(this,D).current&&s(this,v).length){const i=s(this,v)[s(this,v).length-1],n=i.position+i.size-s(this,L),h=s(this,_)-n;g(this,_t,i.position+i.size+h)}else g(this,_t,s(this,_));if(s(this,et).current&&s(this,v).length){const i=s(this,v)[s(this,P).current];s(this,d).set(i.position,!0)}else s(this,d).set(e*s(this,_),!0)}),a(this,xe,()=>{const e=this.currentScrollValue;if(g(this,Nt,Math.max(0,e-s(this,_))),s(this,v).length){let i=0;for(let n=0;n<s(this,v).length;n++){const h=s(this,v)[n];h.transform(),this.targetScrollValue+this.viewportSize/2>=h.position&&(i=n)}s(this,P).current=i}else this.vertical?s(this,w).style.transform=`translate3d(0px, ${e*-1}px, 0px)`:s(this,w).style.transform=`translate3d(${e*-1}px, 0px, 0px)`;Lt.scrollEntries.update(this,s(this,z).current,e)}),a(this,Jt,(e,i)=>{if(!(e==="drag"&&!_s.device.isMobile&&!s(this,zt).current))if(s(this,et).current){const n=Math.sign(i);s(this,v).length?this.shiftSections(n):s(this,d).shift(n*s(this,L))}else s(this,d).shift(i)}),Ge.isBrowser&&(g(this,d,new gs.Damped(0,{damping:.01,min:0,order:Me.TICK_ORDER.SCROLL})),this.openShadow(Ws),B.element(this,{tabIndex:0,children:[B.div({class:"static",children:[B.slot({name:"static"})]}),B.div({class:"content",children:[B.slot({ref:e=>g(this,Ee,e)})],style:{flexDirection:new ws.Derived(s(this,z),e=>e==="x"?"row":"column")},ref:e=>g(this,w,e)})]}),g(this,J,new Ve.WheelControls({element:this})),s(this,J).changeEvent.subscribe(s(this,Jt)),g(this,Mt,new Ve.KeyboardControls({element:this})),s(this,Mt).changeEvent.subscribe(s(this,Jt)),g(this,lt,new Ve.DragControls({element:this})),s(this,lt).changeEvent.subscribe(s(this,Jt)),s(this,z).subscribe(({current:e})=>{s(this,w).style.flexDirection=e==="x"?"row":"column",s(this,J).axis=s(this,$t).current?"max":e,s(this,Mt).dimension=e==="x"?"width":"height",s(this,lt).axis=e,e==="x"?this.style.touchAction="pan-y":e==="y"&&(this.style.touchAction="pan-x"),this.isConnected&&s(this,Vt).call(this)}),s(this,$t).subscribe(e=>{s(this,J).axis=e.current?"max":s(this,z).current}),s(this,tt).subscribe(()=>{this.isConnected&&s(this,Vt).call(this)}),s(this,N).subscribe(({current:e})=>{this.isConnected&&(e?C(this,ie,Pe).call(this):C(this,It,re).call(this))}),s(this,et).subscribe(e=>{s(this,P).current=0,s(this,J).debounce=e.current,s(this,lt).swipe=e.current,s(this,d).reset(),this.isConnected&&(e.current&&!e.previous?C(this,ie,Pe).call(this):!e.current&&e.previous&&C(this,It,re).call(this))}),s(this,D).subscribe(e=>{e.current?(this.isConnected&&(s(this,v).length||(s(this,N).current=!0)),s(this,v).length&&(s(this,d).max=1/0,s(this,d).min=-1/0)):(g(this,Nt,0),s(this,d).max=s(this,_),s(this,d).min=0)}),s(this,wt).subscribe(e=>{s(this,d).damping=e.current}),s(this,Ft).subscribe(e=>{e.current&&!e.previous?C(this,ke,Ke).call(this):!e.current&&e.previous&&C(this,We,Ne).call(this)}),s(this,Dt).subscribe(e=>{e.current&&!e.previous?C(this,ue,Oe).call(this):!e.current&&e.previous&&C(this,pe,$e).call(this)}))}get dampingCSSProperty(){return s(this,wt)}get mouseDragCSSProperty(){return s(this,zt)}get axisAttibute(){return s(this,z)}get pagesAttibute(){return s(this,tt)}get splitAttibute(){return s(this,N)}get sectionalAttibute(){return s(this,et)}get infiniteCSSProperty(){return s(this,D)}get dampingAttibute(){return s(this,wt)}get disabledAttibute(){return s(this,Ft)}get hibernatedAttibute(){return s(this,Dt)}get currentScrollValue(){return C(this,fe,Fe).call(this,"current")}get targetScrollValue(){return C(this,fe,Fe).call(this,"target")}get contentElement(){return s(this,w)}get sections(){return s(this,v)}get position(){return s(this,ae)}get contentPosition(){return s(this,ce)}get viewportSize(){return s(this,L)}get scrollSize(){return s(this,_)}get gap(){return s(this,U)}get counter(){return s(this,P)}get distance(){return s(this,_t)}get infiniteDistance(){return s(this,D).current?s(this,_t)+s(this,U):s(this,_t)}get overscroll(){return s(this,Nt)}get vertical(){return s(this,z).current==="y"}get currentProgress(){return this.currentScrollValue/this.infiniteDistance||0}get targetProgress(){return this.targetScrollValue/this.infiniteDistance||0}get speed(){return s(this,d).speed}get direction(){return s(this,d).direction}get isRunning(){return s(this,d).isRunning}get scrollWidth(){return s(this,z).current==="y"?0:s(this,d).length}get scrollHeight(){return s(this,z).current==="x"?0:s(this,d).length}onScroll(...e){return s(this,d).subscribe(...e)}offScroll(...e){s(this,d).unsubscribe(...e)}range(e,i,n=0){const h=e-n,c=h+i+n*2;return this.currentProgress<h?0:this.currentProgress>c?1:(this.currentProgress-h)/(c-h)}curve(e,i,n=0){return Math.sin(this.range(e,i,n)*Math.PI)}visible(e,i,n=0){const h=e-n,c=h+i+n*2;return this.currentProgress>=h&&this.currentProgress<=c}scrollToSection(e,i="smooth"){if(!s(this,v).length)return;const n=s(this,P).current;C(this,ze,ns).call(this,e);const h=s(this,v)[n],c=s(this,v)[s(this,P).current];if(h&&c){let u=0;const le=s(this,v).length-1;s(this,D).current?s(this,P).current===0&&n===le?u=s(this,_)+s(this,L)-h.position+s(this,U):s(this,P).current===le&&n===0?u=c.position-(s(this,_)+s(this,L)+s(this,U)):u=c.position-h.position:u=c.position-h.position,s(this,d).shift(u,i==="instant")}}shiftSections(e,i="smooth"){s(this,v).length&&this.scrollToSection(s(this,P).current+e,i)}setPosition(e,i="smooth"){s(this,d).set(e,i==="instant")}connectedCallback(){s(this,z).observe(),s(this,tt).observe(),s(this,N).observe(),s(this,et).observe(),s(this,$t).observe(),s(this,D).observe(),s(this,wt).observe(),s(this,zt).observe(),s(this,Ft).observe(),s(this,Dt).observe(),C(this,pe,$e).call(this)}disconnectedCallback(){s(this,z).unobserve(),s(this,tt).unobserve(),s(this,N).unobserve(),s(this,et).unobserve(),s(this,$t).unobserve(),s(this,D).unobserve(),s(this,wt).unobserve(),s(this,zt).unobserve(),s(this,Ft).unobserve(),s(this,Dt).unobserve(),C(this,ue,Oe).call(this)}};d=new WeakMap;z=new WeakMap;tt=new WeakMap;N=new WeakMap;et=new WeakMap;$t=new WeakMap;D=new WeakMap;wt=new WeakMap;zt=new WeakMap;Ft=new WeakMap;Dt=new WeakMap;w=new WeakMap;Ee=new WeakMap;v=new WeakMap;ae=new WeakMap;ce=new WeakMap;L=new WeakMap;_=new WeakMap;U=new WeakMap;J=new WeakMap;Mt=new WeakMap;lt=new WeakMap;P=new WeakMap;Nt=new WeakMap;_t=new WeakMap;Zt=new WeakMap;Kt=new WeakMap;ie=new WeakSet;Pe=function(){C(this,It,re).call(this),s(this,Ee).assignedElements().forEach(r=>{r instanceof HTMLElement&&s(this,v).push(new ks(r,this))}),s(this,w).style.transform="",this.dispatchEvent(new CustomEvent("sectionsChange",{composed:!0})),s(this,Vt).call(this)};It=new WeakSet;re=function(){s(this,v).forEach(r=>{r.destroy()}),g(this,v,[]),this.dispatchEvent(new CustomEvent("sectionsChange",{composed:!0}))};ke=new WeakSet;Ke=function(){s(this,Zt)||(g(this,Zt,!0),s(this,d).unsubscribe(s(this,xe)),s(this,d).stopAnimation(),s(this,J).disconnect(),s(this,Mt).disconnect(),s(this,lt).disconnect())};We=new WeakSet;Ne=function(){s(this,Zt)&&(g(this,Zt,!1),s(this,d).subscribe(s(this,xe)),s(this,J).connect(),s(this,Mt).connect(),s(this,lt).connect())};ue=new WeakSet;Oe=function(){s(this,Kt)||(g(this,Kt,!0),Ut.windowResizer.unsubscribe(s(this,Vt)),s(this,d).reset(),C(this,ke,Ke).call(this),s(this,w).style.transform="",s(this,N).current&&C(this,It,re).call(this),Lt.scrollEntries.unregister(this))};pe=new WeakSet;$e=function(){s(this,Kt)&&(g(this,Kt,!1),s(this,N).current&&C(this,ie,Pe).call(this),Lt.scrollEntries.register(this),Ut.windowResizer.subscribe(s(this,Vt),Me.RESIZE_ORDER.SCROLL),C(this,We,Ne).call(this))};Vt=new WeakMap;xe=new WeakMap;ze=new WeakSet;ns=function(r){s(this,D).current?(s(this,P).current=r%s(this,v).length,s(this,P).current=s(this,P).current<0?s(this,v).length+s(this,P).current:s(this,P).current):s(this,P).current=qt.clamp(r,0,s(this,v).length-1)};Jt=new WeakMap;fe=new WeakSet;Fe=function(r="current"){if(s(this,D).current&&s(this,v).length){const e=s(this,d)[r]%(s(this,_)+s(this,L)+s(this,U));return e<0?s(this,_)+e+s(this,L)+s(this,U):e}else return s(this,d)[r]};exports.ScrollElement=Ps([vt.define("e-scroll")],exports.ScrollElement);var ne;class Le extends vt.CustomElement{constructor(){super(...arguments);$(this,ne,null)}get scrollElement(){return l(this,ne)}connectedCallback(){const i=Cs.findParentElement(this,exports.ScrollElement);i instanceof exports.ScrollElement?R(this,ne,i):console.error(this,"e-scroll not found")}}ne=new WeakMap;var Ms=Object.defineProperty,xs=Object.getOwnPropertyDescriptor,Ls=(r,e,i,n)=>{for(var h=n>1?void 0:n?xs(e,i):e,c=r.length-1,u;c>=0;c--)(u=r[c])&&(h=(n?u(e,i,h):u(h))||h);return n&&h&&Ms(e,i,h),h},hs=(r,e,i)=>{if(!e.has(r))throw TypeError("Cannot "+i)},p=(r,e,i)=>(hs(r,e,"read from private field"),i?i.call(r):e.get(r)),G=(r,e,i)=>{if(e.has(r))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(r):e.set(r,i)},mt=(r,e,i,n)=>(hs(r,e,"write to private field"),n?n.call(r,i):e.set(r,i),i),Qt,F,st,it,Xt,Yt,de,Se,ve,me;const Vs=Ue.createStylesheet({":host":{display:"inline-block",zIndex:"1",backgroundColor:es.aptechkaTheme.colorLight.var},':host([axis="y"])':{position:"absolute",right:"0",top:"0",width:"1vmin",height:"100%"},':host([axis="x"])':{position:"absolute",left:"0",bottom:"0",width:"100%",height:"1vmin"},".default-thumb":{backgroundColor:es.aptechkaTheme.colorDark.var,borderRadius:"1vmin",touchAction:"none"},"::slotted(*)":{touchAction:"none"}});exports.ScrollbarElement=class extends Le{constructor(){super(),G(this,Qt,null),G(this,F,null),G(this,st,!1),G(this,it,0),G(this,Xt,0),G(this,Yt,0),G(this,de,()=>{mt(this,st,this.offsetWidth>this.offsetHeight);const e=p(this,st)?this.offsetWidth:this.offsetHeight;mt(this,it,e/((this.scrollElement.scrollSize+this.scrollElement.viewportSize)/e)),mt(this,it,Math.max(p(this,it),30)),p(this,st)?(p(this,F).style.width=p(this,it)+"px",p(this,F).style.height="100%"):(p(this,F).style.width="100%",p(this,F).style.height=p(this,it)+"px"),mt(this,Xt,e-p(this,it)),this.scrollElement.scrollSize||(this.style.display="none")}),G(this,Se,()=>{mt(this,Yt,this.scrollElement.currentProgress*p(this,Xt)),p(this,st)?p(this,F).style.transform=`translate3d(${p(this,Yt)}px, 0px, 0px)`:p(this,F).style.transform=`translate3d(0px, ${p(this,Yt)}px, 0px)`}),G(this,ve,()=>{this.setAttribute("axis",this.scrollElement.axisAttibute.current)}),G(this,me,e=>{bs.setupDrag(h=>{const c=p(this,st)?h.x:h.y,u=this.scrollElement.distance/p(this,Xt),le=(c-n)*u;this.scrollElement.setPosition(i+le)});const i=this.scrollElement.targetScrollValue,n=p(this,st)?e.x:e.y}),Ge.isBrowser&&(this.openShadow(Vs),B.element(this,{slot:"static",children:[B.slot({ref:e=>mt(this,Qt,e),children:B.div({class:"default-thumb"})})]}))}get thumbElement(){return p(this,F)}connectedCallback(){super.connectedCallback();const e=p(this,Qt).assignedElements()[0]||p(this,Qt).firstElementChild;mt(this,F,e),p(this,F).addEventListener("pointerdown",p(this,me)),Ut.windowResizer.subscribe(p(this,de),Me.RESIZE_ORDER.SCROLL+1),this.scrollElement.onScroll(p(this,Se)),this.scrollElement.axisAttibute.subscribe(p(this,ve))}disconnectedCallback(){p(this,F).removeEventListener("pointerdown",p(this,me)),Ut.windowResizer.unsubscribe(p(this,de)),this.scrollElement.offScroll(p(this,Se)),this.scrollElement.axisAttibute.unsubscribe(p(this,ve))}};Qt=new WeakMap;F=new WeakMap;st=new WeakMap;it=new WeakMap;Xt=new WeakMap;Yt=new WeakMap;de=new WeakMap;Se=new WeakMap;ve=new WeakMap;me=new WeakMap;exports.ScrollbarElement=Ls([vt.define("e-scrollbar")],exports.ScrollbarElement);const Os=Ue.createStylesheet({button:{all:"inherit"}});class os extends Le{constructor(){super(),this.openShadow(Os),Ge.isBrowser&&B.element(this,{children:[B.button({onClick:()=>{this.handleClick()},children:[B.slot()]})]})}}var $s=Object.defineProperty,zs=Object.getOwnPropertyDescriptor,Fs=(r,e,i,n)=>{for(var h=n>1?void 0:n?zs(e,i):e,c=r.length-1,u;c>=0;c--)(u=r[c])&&(h=(n?u(e,i,h):u(h))||h);return n&&h&&$s(e,i,h),h};exports.ScrollSetButtonElement=class extends os{handleClick(){const e=this.getAttribute("index"),i=this.getAttribute("behaviour");this.scrollElement.scrollToSection(parseInt(e||"0"),i)}};exports.ScrollSetButtonElement=Fs([vt.define("e-scroll-set-button")],exports.ScrollSetButtonElement);var Ds=Object.defineProperty,Rs=Object.getOwnPropertyDescriptor,As=(r,e,i,n)=>{for(var h=n>1?void 0:n?Rs(e,i):e,c=r.length-1,u;c>=0;c--)(u=r[c])&&(h=(n?u(e,i,h):u(h))||h);return n&&h&&Ds(e,i,h),h};exports.ScrollStepButtonElement=class extends os{handleClick(){const e=this.getAttribute("step"),i=this.getAttribute("behaviour");this.scrollElement.shiftSections(parseInt(e||"1"),i)}};exports.ScrollStepButtonElement=As([vt.define("e-scroll-step-button")],exports.ScrollStepButtonElement);var Ts=Object.defineProperty,Bs=Object.getOwnPropertyDescriptor,qs=(r,e,i,n)=>{for(var h=n>1?void 0:n?Bs(e,i):e,c=r.length-1,u;c>=0;c--)(u=r[c])&&(h=(n?u(e,i,h):u(h))||h);return n&&h&&Ts(e,i,h),h},ls=(r,e,i)=>{if(!e.has(r))throw TypeError("Cannot "+i)},Ot=(r,e,i)=>(ls(r,e,"read from private field"),i?i.call(r):e.get(r)),ss=(r,e,i)=>{if(e.has(r))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(r):e.set(r,i)},is=(r,e,i,n)=>(ls(r,e,"write to private field"),n?n.call(r,i):e.set(r,i),i),bt,jt,j,dt,Ht,he,oe,Gt;class Is{constructor(e,i,n){$(this,j,void 0);$(this,dt,void 0);$(this,Ht,void 0);$(this,he,void 0);$(this,oe,()=>{l(this,dt).scrollToSection(l(this,Ht),l(this,he))});$(this,Gt,()=>{l(this,j).classList.toggle("current",l(this,dt).counter.current===l(this,Ht))});R(this,j,document.createElement("button")),R(this,dt,e),R(this,he,n),R(this,Ht,i),l(this,j).addEventListener("click",l(this,oe)),l(this,dt).counter.subscribe(l(this,Gt)),l(this,Gt).call(this)}get element(){return l(this,j)}destroy(){l(this,j).removeEventListener("click",l(this,oe)),l(this,dt).counter.unsubscribe(l(this,Gt)),l(this,j).remove()}}j=new WeakMap,dt=new WeakMap,Ht=new WeakMap,he=new WeakMap,oe=new WeakMap,Gt=new WeakMap;exports.ScrollBulletButtonsElement=class extends Le{constructor(){super(...arguments),ss(this,bt,[]),ss(this,jt,rs.debounce(()=>{Ot(this,bt).forEach(e=>e.destroy()),is(this,bt,[]);for(let e=0;e<this.scrollElement.sections.length;e++){const i=new Is(this.scrollElement,e,this.getAttribute("behaviour")||"smooth");this.appendChild(i.element),Ot(this,bt).push(i)}},0))}connectedCallback(){super.connectedCallback(),this.scrollElement.addEventListener("sectionsChange",Ot(this,jt)),Ot(this,jt).call(this)}disconnectedCallback(){this.scrollElement.removeEventListener("sectionsChange",Ot(this,jt)),Ot(this,bt).forEach(e=>e.destroy()),is(this,bt,[])}};bt=new WeakMap;jt=new WeakMap;exports.ScrollBulletButtonsElement=qs([vt.define("e-scroll-bullet-buttons")],exports.ScrollBulletButtonsElement);var Hs=Object.defineProperty,Gs=Object.getOwnPropertyDescriptor,Us=(r,e,i,n)=>{for(var h=n>1?void 0:n?Gs(e,i):e,c=r.length-1,u;c>=0;c--)(u=r[c])&&(h=(n?u(e,i,h):u(h))||h);return n&&h&&Hs(e,i,h),h},Je=(r,e,i)=>{if(!e.has(r))throw TypeError("Cannot "+i)},t=(r,e,i)=>(Je(r,e,"read from private field"),i?i.call(r):e.get(r)),o=(r,e,i)=>{if(e.has(r))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(r):e.set(r,i)},f=(r,e,i,n)=>(Je(r,e,"write to private field"),n?n.call(r,i):e.set(r,i),i),b=(r,e,i)=>(Je(r,e,"access private method"),i),Rt,Ct,yt,Et,Pt,O,q,I,H,Wt,M,at,ct,nt,ht,ot,At,te,W,K,Z,ut,pt,Q,ge,m,Tt,Bt,we,T,X,x,k,A,ee,xt,y,_e,De,Qe,as,Re,cs,Ae,us,Te,ps,Be,fs,qe,ds,Ie,Ss,be,se,rt,kt,Xe,vs,Ye,ms,Ce,He,ye;exports.ScrollSegmentElement=class extends Le{constructor(){super(...arguments),o(this,_e),o(this,Qe),o(this,Re),o(this,Ae),o(this,Te),o(this,Be),o(this,qe),o(this,Ie),o(this,rt),o(this,Xe),o(this,Ye),o(this,Ce),o(this,Rt,new S.CSSProperty(this,"--target","")),o(this,Ct,new S.CSSProperty(this,"--disabled",!1)),o(this,yt,new S.CSSProperty(this,"--distance-offset",0)),o(this,Et,new S.CSSProperty(this,"--start-offset",0)),o(this,Pt,new S.CSSProperty(this,"--capture-once",!1)),o(this,O,new S.CSSProperty(this,"--captured","")),o(this,q,new S.CSSProperty(this,"--released","")),o(this,I,new S.CSSProperty(this,"--captured-from-start","")),o(this,H,new S.CSSProperty(this,"--captured-from-finish","")),o(this,Wt,new S.CSSProperty(this,"--released-from-start","")),o(this,M,new S.CSSProperty(this,"--released-from-finish","")),o(this,at,new S.CSSProperty(this,"--passed-var","")),o(this,ct,new S.CSSProperty(this,"--progress-var","")),o(this,nt,new S.CSSProperty(this,"--distance-var","")),o(this,ht,new S.CSSProperty(this,"--start-var","")),o(this,ot,new S.CSSProperty(this,"--finish-var","")),o(this,At,new S.CSSProperty(this,"--smoothstep",!1)),o(this,te,new S.CSSProperty(this,"--smootherstep",!1)),o(this,W,new gt.Store(!1)),o(this,K,new gt.Store(!1)),o(this,Z,new gt.Store(!1)),o(this,ut,new gt.Store(!1)),o(this,pt,new gt.Store(!1)),o(this,Q,new gt.Store(!1)),o(this,ge,[]),o(this,m,this),o(this,Tt,0),o(this,Bt,0),o(this,we,0),o(this,T,0),o(this,X,0),o(this,x,0),o(this,k,0),o(this,A,0),o(this,ee,!1),o(this,xt,!1),o(this,y,!0),o(this,be,()=>{t(this,y)||(this.resize(),t(this,se).call(this))}),o(this,se,()=>{!t(this,y)&&t(this,ee)&&this.tick()}),o(this,ye,rs.debounce(()=>{const e=Lt.scrollEntries.getAll(this).reverse();let i=0;e.forEach((n,h)=>{n.element===this.scrollElement&&(i=h)}),f(this,ge,e.slice(i+1))},0))}get distanceOffsetCSSProperty(){return t(this,yt)}get startOffsetCSSProperty(){return t(this,Et)}get captureOnceCSSProperty(){return t(this,Pt)}get capturedCSSProperty(){return t(this,O)}get releasedCSSProperty(){return t(this,q)}get capturedFromStartCSSProperty(){return t(this,I)}get capturedFromFinishCSSProperty(){return t(this,H)}get releasedFromStartCSSProperty(){return t(this,Wt)}get releasedFromFinishCSSProperty(){return t(this,M)}get passedVarCSSProperty(){return t(this,at)}get progressVarCSSProperty(){return t(this,ct)}get distanceVarCSSProperty(){return t(this,nt)}get startVarCSSProperty(){return t(this,ht)}get finishVarCSSProperty(){return t(this,ot)}get smoothstepCSSProperty(){return t(this,At)}get smootherstepCSSProperty(){return t(this,te)}get disabledCSSProperty(){return t(this,Ct)}get targetCSSProperty(){return t(this,Rt)}get isCaptured(){return t(this,W)}get isReleased(){return t(this,K)}get isCapturedFromStart(){return t(this,Z)}get isReleasedFromStart(){return t(this,ut)}get isCapturedFromFinish(){return t(this,pt)}get isReleasedFromFinish(){return t(this,Q)}get directionPosition(){return t(this,Tt)}get directionSize(){return t(this,Bt)}get passed(){return t(this,T)}get progress(){return t(this,X)}get start(){return t(this,x)}get finish(){return t(this,A)}get distance(){return t(this,k)}get isCapturedOnce(){return t(this,xt)}get isDisabled(){return t(this,y)}resize(){f(this,Bt,this.scrollElement.vertical?this.offsetHeight:this.offsetWidth),f(this,Tt,this.scrollElement.vertical?St.getCumulativeOffsetTop(this,this.scrollElement):St.getCumulativeOffsetLeft(this,this.scrollElement)),f(this,x,this.getStart()),f(this,k,this.getDistance()),f(this,x,t(this,x)+t(this,Et).current),f(this,k,t(this,k)+t(this,yt).current),f(this,A,t(this,x)+t(this,k)),this.scrollElement.currentScrollValue>t(this,A)&&!t(this,W).current&&!t(this,K).current&&(t(this,W).current=!0),this.setVar(t(this,ht).current,t(this,x)),this.setVar(t(this,ot).current,t(this,A)),this.setVar(t(this,nt).current,t(this,k)),f(this,ee,!0)}tick(){let e=this.scrollElement.currentScrollValue;t(this,ge).forEach(n=>{e+=n.value}),f(this,T,this.updateValue(e-t(this,x),0,t(this,k))||0),f(this,X,t(this,T)/t(this,k)||0);const i=Math.round(e);t(this,W).current&&(i>t(this,x)?t(this,Z).current||b(this,Te,ps).call(this):t(this,Z).current&&!t(this,ut).current&&b(this,qe,ds).call(this),i<t(this,A)?t(this,Q).current&&!t(this,pt).current&&b(this,Be,fs).call(this):t(this,Z).current&&!t(this,Q).current&&b(this,Ie,Ss).call(this)),i>t(this,x)&&i<t(this,A)?(b(this,_e,De).call(this),t(this,W).current||b(this,Re,cs).call(this)):t(this,W).current&&(f(this,T,qt.step(t(this,k)/2,t(this,T),0,t(this,k))),f(this,X,t(this,T)/t(this,k)),b(this,_e,De).call(this),b(this,Ae,us).call(this)),t(this,xt)&&t(this,Pt).current&&(t(this,O).current&&t(this,m).classList.add(t(this,O).current),f(this,y,!0))}disable(){this.style.cssText="",f(this,Tt,0),f(this,Bt,0),f(this,T,0),f(this,X,0),f(this,x,0),f(this,k,0),f(this,A,0),f(this,ee,!1),t(this,W).current=!1,t(this,K).current=!1,t(this,Z).current=!1,t(this,ut).current=!1,t(this,pt).current=!1,t(this,Q).current=!1,f(this,xt,!1),f(this,y,!0),b(this,Ce,He).call(this)}enable(){f(this,y,!1)}connectedCallback(){super.connectedCallback(),t(this,Rt).observe(),t(this,Ct).observe(),t(this,yt).observe(),t(this,Et).observe(),t(this,Pt).observe(),t(this,O).observe(),t(this,q).observe(),t(this,I).observe(),t(this,H).observe(),t(this,Wt).observe(),t(this,M).observe(),t(this,at).observe(),t(this,ct).observe(),t(this,nt).observe(),t(this,ht).observe(),t(this,ot).observe(),t(this,At).observe(),t(this,te).observe();let e=!1;this.scrollElement.addEventListener("sectionsChange",t(this,ye)),t(this,ye).call(this),t(this,Ct).current||this.enable(),t(this,Rt).subscribe(i=>{i.previous&&b(this,Ce,He).call(this),i.current?i.current==="parent"?f(this,m,this.parentElement||this):f(this,m,document.querySelector(i.current)||this):f(this,m,this)}),t(this,Ct).subscribe(i=>{i.current&&!i.previous?this.disable():!i.current&&i.previous&&(this.resize(),this.enable())}),t(this,Et).subscribe(()=>{e&&!t(this,y)&&this.resize()}),t(this,yt).subscribe(()=>{e&&!t(this,y)&&this.resize()}),t(this,O).subscribe(i=>{b(this,rt,kt).call(this,i)}),t(this,I).subscribe(i=>{b(this,rt,kt).call(this,i)}),t(this,H).subscribe(i=>{b(this,rt,kt).call(this,i)}),t(this,q).subscribe(i=>{b(this,rt,kt).call(this,i)}),t(this,Wt).subscribe(i=>{b(this,rt,kt).call(this,i)}),t(this,M).subscribe(i=>{b(this,rt,kt).call(this,i)}),t(this,Pt).subscribe(i=>{t(this,y)||!i.current&&i.previous&&(this.resize(),this.enable())}),t(this,at).subscribe(i=>{t(this,y)||(this.removeVar(i.previous),this.setVar(i.current,this.passed))}),t(this,ct).subscribe(i=>{t(this,y)||(this.removeVar(i.previous),this.setVar(i.current,t(this,X)))}),t(this,ht).subscribe(i=>{t(this,y)||(this.removeVar(i.previous),this.setVar(i.current,t(this,x)))}),t(this,ot).subscribe(i=>{t(this,y)||(this.removeVar(i.previous),this.setVar(i.current,t(this,A)))}),t(this,nt).subscribe(i=>{t(this,y)||(this.removeVar(i.previous),this.setVar(i.current,t(this,k)))}),Ut.windowResizer.subscribe(t(this,be),Me.RESIZE_ORDER.SEGMENT),this.scrollElement.onScroll(t(this,se)),e=!0}disconnectedCallback(){Ut.windowResizer.unsubscribe(t(this,be)),this.scrollElement.offScroll(t(this,se)),t(this,Rt).close(),t(this,Ct).close(),t(this,yt).close(),t(this,Et).close(),t(this,Pt).close(),t(this,O).close(),t(this,q).close(),t(this,I).close(),t(this,H).close(),t(this,Wt).close(),t(this,M).close(),t(this,at).close(),t(this,ct).close(),t(this,nt).close(),t(this,ht).close(),t(this,ot).close(),t(this,At).close(),t(this,te).close(),t(this,W).close(),t(this,K).close(),t(this,Z).close(),t(this,ut).close(),t(this,pt).close(),t(this,Q).close(),this.disable()}removeVar(e){e&&t(this,m).style.removeProperty(`--${e}`)}setVar(e,i){e&&t(this,m).style.setProperty(`--${e}`,i.toString())}updateValue(e,i=0,n=1){return this.smootherstepCSSProperty.current?qt.smootherstep(e,i,n)*n:t(this,At).current?qt.smoothstep(e,i,n)*n:qt.clamp(e,i,n)}getDistance(){return t(this,Bt)+t(this,we)}getStart(){return t(this,Tt)-t(this,we)}};Rt=new WeakMap;Ct=new WeakMap;yt=new WeakMap;Et=new WeakMap;Pt=new WeakMap;O=new WeakMap;q=new WeakMap;I=new WeakMap;H=new WeakMap;Wt=new WeakMap;M=new WeakMap;at=new WeakMap;ct=new WeakMap;nt=new WeakMap;ht=new WeakMap;ot=new WeakMap;At=new WeakMap;te=new WeakMap;W=new WeakMap;K=new WeakMap;Z=new WeakMap;ut=new WeakMap;pt=new WeakMap;Q=new WeakMap;ge=new WeakMap;m=new WeakMap;Tt=new WeakMap;Bt=new WeakMap;we=new WeakMap;T=new WeakMap;X=new WeakMap;x=new WeakMap;k=new WeakMap;A=new WeakMap;ee=new WeakMap;xt=new WeakMap;y=new WeakMap;_e=new WeakSet;De=function(){b(this,Qe,as).call(this),this.setVar(t(this,at).current,t(this,T)),this.setVar(t(this,ct).current,t(this,X))};Qe=new WeakSet;as=function(){this.dispatchEvent(new CustomEvent("segmentPass",{detail:{distance:t(this,k),start:t(this,x),finish:t(this,A),passed:t(this,T),progress:t(this,X)}}))};Re=new WeakSet;cs=function(){t(this,W).current=!0,t(this,K).current=!1,f(this,xt,!0),t(this,q).current&&t(this,m).classList.remove(t(this,q).current),t(this,M).current&&t(this,m).classList.remove(t(this,M).current),t(this,M).current&&t(this,m).classList.remove(t(this,M).current),t(this,O).current&&t(this,m).classList.add(t(this,O).current)};Ae=new WeakSet;us=function(){t(this,K).current=!0,t(this,W).current=!1,f(this,xt,!0),t(this,O).current&&t(this,m).classList.remove(t(this,O).current),t(this,I).current&&t(this,m).classList.remove(t(this,I).current),t(this,H).current&&t(this,m).classList.remove(t(this,H).current),t(this,q).current&&t(this,m).classList.add(t(this,q).current)};Te=new WeakSet;ps=function(){t(this,W).current=!0,t(this,Z).current=!0,t(this,ut).current=!1,t(this,I).current&&t(this,m).classList.add(t(this,I).current)};Be=new WeakSet;fs=function(){t(this,W).current=!0,t(this,pt).current=!0,t(this,Q).current=!1,t(this,H).current&&t(this,m).classList.add(t(this,H).current)};qe=new WeakSet;ds=function(){t(this,K).current=!0,t(this,ut).current=!0,t(this,Z).current=!1,t(this,M).current&&t(this,m).classList.add(t(this,M).current)};Ie=new WeakSet;Ss=function(){t(this,K).current=!0,t(this,Q).current=!0,t(this,pt).current=!1,t(this,M).current&&t(this,m).classList.add(t(this,M).current)};be=new WeakMap;se=new WeakMap;rt=new WeakSet;kt=function(r){if(t(this,y)){r.previous&&t(this,m).classList.remove(r.previous),r.current&&t(this,m).classList.remove(r.current);return}r.current&&t(this,W).current?(r.previous&&t(this,m).classList.remove(r.previous),t(this,m).classList.add(r.current)):!r.current&&r.previous&&t(this,m).classList.remove(r.previous)};Xe=new WeakSet;vs=function(...r){r.forEach(e=>{e&&t(this,m).classList.remove(e)})};Ye=new WeakSet;ms=function(...r){r.forEach(e=>{e&&t(this,m).style.removeProperty(`--${e}`)})};Ce=new WeakSet;He=function(){b(this,Xe,vs).call(this,t(this,O).current,t(this,I).current,t(this,H).current,t(this,q).current,t(this,Wt).current,t(this,M).current),b(this,Ye,ms).call(this,t(this,at).current,t(this,ct).current,t(this,nt).current,t(this,ht).current,t(this,ot).current)};ye=new WeakMap;exports.ScrollSegmentElement=Us([vt.define("e-scroll-segment")],exports.ScrollSegmentElement);
|
|
1
|
+
"use strict";var es=(r,e,i)=>{if(!e.has(r))throw TypeError("Cannot "+i)};var a=(r,e,i)=>(es(r,e,"read from private field"),i?i.call(r):e.get(r)),$=(r,e,i)=>{if(e.has(r))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(r):e.set(r,i)},R=(r,e,i,n)=>(es(r,e,"write to private field"),n?n.call(r,i):e.set(r,i),i);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const _s=require("../Damped-BdnkNOcb.cjs"),Ze=require("../browser-CpzFX2xg.cjs"),dt=require("../layout-8ryRAMGJ.cjs"),qt=require("../math-GDWEqu7y.cjs"),gt=require("../Store-C-1ruEIm.cjs"),bs=require("../Derived-B-g8dYgh.cjs");require("../ticker/index.cjs");const $e=require("../DragControls-C7P6P5HO.cjs"),vt=require("../custom-element/index.cjs"),Le=require("../order/index.cjs"),Ut=require("../window-resizer/index.cjs"),Lt=require("../scroll-entries/index.cjs"),B=require("../tags-Djb6mb1o.cjs"),Ke=require("../createStylesheet-CqHU9_qv.cjs"),ss=require("../css-unit-parser/index.cjs"),d=require("../css-property/index.cjs"),Cs=require("../Viewport-DAjFJF5V.cjs"),ys=require("../gestures-DHLrn6Q8.cjs"),Ps=require("../dom-JBOkFLTh.cjs"),is=require("../theme/index.cjs"),hs=require("../function-MthRj-GJ.cjs");var Es=Object.defineProperty,ks=Object.getOwnPropertyDescriptor,Ws=(r,e,i,n)=>{for(var h=n>1?void 0:n?ks(e,i):e,c=r.length-1,u;c>=0;c--)(u=r[c])&&(h=(n?u(e,i,h):u(h))||h);return n&&h&&Es(e,i,h),h},Ne=(r,e,i)=>{if(!e.has(r))throw TypeError("Cannot "+i)},s=(r,e,i)=>(Ne(r,e,"read from private field"),i?i.call(r):e.get(r)),l=(r,e,i)=>{if(e.has(r))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(r):e.set(r,i)},g=(r,e,i,n)=>(Ne(r,e,"write to private field"),n?n.call(r,i):e.set(r,i),i),C=(r,e,i)=>(Ne(r,e,"access private method"),i),f,z,tt,N,et,$t,D,wt,le,ce,zt,Ft,Dt,w,ke,v,ue,pe,L,_,U,J,Mt,at,E,Nt,_t,Zt,Kt,ie,We,It,re,Me,Je,xe,Qe,fe,ze,Se,Fe,Vt,Ve,De,os,Jt,de,Re,V,P,ft,Y;class Ms{constructor(e,i){$(this,V,void 0);$(this,P,void 0);$(this,ft,0);$(this,Y,0);R(this,V,e),R(this,P,i),Lt.scrollEntries.register(a(this,V))}get size(){return a(this,ft)}get position(){return a(this,Y)}destroy(){Lt.scrollEntries.unregister(a(this,V)),a(this,V).style.transform=""}resize(){R(this,ft,a(this,P).vertical?a(this,V).offsetHeight:a(this,V).offsetWidth),R(this,Y,a(this,P).vertical?dt.getCumulativeOffsetTop(a(this,V)):dt.getCumulativeOffsetLeft(a(this,V))),R(this,Y,a(this,Y)-a(this,P).contentPosition)}transform(){let e=0;const i=a(this,P).viewportSize-a(this,ft);a(this,P).infiniteCSSProperty.current&&a(this,P).overscroll&&a(this,Y)+a(this,ft)<a(this,P).currentScrollValue&&(e=a(this,P).distance*-1-a(this,P).gap),Lt.scrollEntries.update(a(this,V),a(this,P).axisAttibute.current,e);const n=a(this,P).currentScrollValue+e,h=a(this,Y)-a(this,P).viewportSize-i,c=a(this,Y)+a(this,ft)+i,u=qt.clamp(n,h,c);a(this,P).vertical?a(this,V).style.transform=`translate3d(0px, ${u*-1}px, 0px)`:a(this,V).style.transform=`translate3d(${u*-1}px, 0px, 0px)`}}V=new WeakMap,P=new WeakMap,ft=new WeakMap,Y=new WeakMap;const xs=Ke.createStylesheet({":host":{position:"relative",width:"100%",height:"100%",display:"block",outline:"none"},':host([hibernated="true"])':{display:"contents"},".static":{position:"absolute",top:"0",left:"0",width:"100%",height:"100%"},".content":{position:"relative",display:"flex",width:"100%",height:"100%",gap:"var(--gap, 0px)"},':host([hibernated="true"]) .content':{display:"contents"},"::slotted(*)":{flexShrink:"0"}});exports.ScrollElement=class extends vt.CustomElement{constructor(){super(),l(this,ie),l(this,It),l(this,Me),l(this,xe),l(this,fe),l(this,Se),l(this,De),l(this,de),l(this,f,null),l(this,z,new d.CSSProperty(this,"--axis","y")),l(this,tt,new d.CSSProperty(this,"--pages",0,{validate:e=>Math.max(0,e-1)})),l(this,N,new d.CSSProperty(this,"--split",!1)),l(this,et,new d.CSSProperty(this,"--sectional",!1)),l(this,$t,new d.CSSProperty(this,"--wheel-max-delta",!1)),l(this,D,new d.CSSProperty(this,"--infinite",!1)),l(this,wt,new d.CSSProperty(this,"--damping",.03)),l(this,le,new d.CSSProperty(this,"--mass",0)),l(this,ce,new d.CSSProperty(this,"--stiffness",0)),l(this,zt,new d.CSSProperty(this,"--mouse-drag",!1)),l(this,Ft,new d.CSSProperty(this,"--disabled",!1)),l(this,Dt,new d.CSSProperty(this,"--hibernated",!1)),l(this,w,null),l(this,ke,null),l(this,v,[]),l(this,ue,0),l(this,pe,0),l(this,L,0),l(this,_,0),l(this,U,0),l(this,J,null),l(this,Mt,null),l(this,at,null),l(this,E,new gt.Store(0)),l(this,Nt,0),l(this,_t,0),l(this,Zt,!0),l(this,Kt,!0),l(this,Vt,()=>{const e=this.currentScrollValue/s(this,_)||0;if(g(this,ue,this.vertical?dt.getCumulativeOffsetTop(this):dt.getCumulativeOffsetLeft(this)),g(this,pe,this.vertical?dt.getCumulativeOffsetTop(s(this,w)):dt.getCumulativeOffsetLeft(s(this,w))),g(this,L,this.vertical?this.offsetHeight:this.offsetWidth),s(this,tt).current){g(this,_,s(this,L)*s(this,tt).current);const i=s(this,_)+s(this,L);this.vertical?(s(this,w).style.width=i+"px",s(this,w).style.height="100%"):(s(this,w).style.height=i+"px",s(this,w).style.width="100%")}else this.vertical?(s(this,w).style.width="100%",s(this,w).style.height="max-content",g(this,_,s(this,w).offsetHeight-s(this,L))):(s(this,w).style.width="max-content",s(this,w).style.height="100%",g(this,_,s(this,w).offsetWidth-s(this,L)));if(this.vertical?g(this,U,ss.cssUnitParser.parse(getComputedStyle(s(this,w)).rowGap)):g(this,U,ss.cssUnitParser.parse(getComputedStyle(s(this,w)).columnGap)),!s(this,D).current){const i=getComputedStyle(this);g(this,_,s(this,_)+(this.vertical?parseFloat(i.paddingBlockStart)+parseFloat(i.paddingBlockEnd):parseFloat(i.paddingInlineStart)+parseFloat(i.paddingInlineEnd))),s(this,f).max=s(this,_)}if(s(this,v).forEach(i=>{i.resize(),i.transform()}),s(this,D).current&&s(this,v).length){const i=s(this,v)[s(this,v).length-1],n=i.position+i.size-s(this,L),h=s(this,_)-n;g(this,_t,i.position+i.size+h)}else g(this,_t,s(this,_));if(s(this,et).current&&s(this,v).length){const i=s(this,v)[s(this,E).current];s(this,f).set(i.position,!0)}else s(this,f).set(e*s(this,_),!0)}),l(this,Ve,()=>{const e=this.currentScrollValue;if(g(this,Nt,Math.max(0,e-s(this,_))),s(this,v).length){let i=0;for(let n=0;n<s(this,v).length;n++){const h=s(this,v)[n];h.transform(),this.targetScrollValue+this.viewportSize/2>=h.position&&(i=n)}s(this,E).current=i}else this.vertical?s(this,w).style.transform=`translate3d(0px, ${e*-1}px, 0px)`:s(this,w).style.transform=`translate3d(${e*-1}px, 0px, 0px)`;Lt.scrollEntries.update(this,s(this,z).current,e)}),l(this,Jt,(e,i)=>{if(!(e==="drag"&&!Cs.device.isMobile&&!s(this,zt).current))if(s(this,et).current){const n=Math.sign(i);s(this,v).length?this.shiftSections(n):s(this,f).shift(n*s(this,L))}else s(this,f).shift(i)}),Ze.isBrowser&&(g(this,f,new _s.Damped(0,{damping:.01,min:0,order:Le.TICK_ORDER.SCROLL})),this.openShadow(xs),B.element(this,{tabIndex:0,children:[B.div({class:"static",children:[B.slot({name:"static"})]}),B.div({class:"content",children:[B.slot({ref:e=>g(this,ke,e)})],style:{flexDirection:new bs.Derived(s(this,z),e=>e==="x"?"row":"column")},ref:e=>g(this,w,e)})]}),g(this,J,new $e.WheelControls({element:this})),s(this,J).changeEvent.subscribe(s(this,Jt)),g(this,Mt,new $e.KeyboardControls({element:this})),s(this,Mt).changeEvent.subscribe(s(this,Jt)),g(this,at,new $e.DragControls({element:this})),s(this,at).changeEvent.subscribe(s(this,Jt)),s(this,z).subscribe(({current:e})=>{s(this,w).style.flexDirection=e==="x"?"row":"column",s(this,J).axis=s(this,$t).current?"max":e,s(this,Mt).dimension=e==="x"?"width":"height",s(this,at).axis=e,e==="x"?this.style.touchAction="pan-y":e==="y"&&(this.style.touchAction="pan-x"),this.isConnected&&s(this,Vt).call(this)}),s(this,$t).subscribe(e=>{s(this,J).axis=e.current?"max":s(this,z).current}),s(this,tt).subscribe(()=>{this.isConnected&&s(this,Vt).call(this)}),s(this,N).subscribe(({current:e})=>{this.isConnected&&(e?C(this,ie,We).call(this):C(this,It,re).call(this))}),s(this,et).subscribe(e=>{s(this,E).current=0,s(this,J).debounce=e.current,s(this,at).swipe=e.current,s(this,f).reset(),this.isConnected&&(e.current&&!e.previous?C(this,ie,We).call(this):!e.current&&e.previous&&C(this,It,re).call(this))}),s(this,D).subscribe(e=>{e.current?(this.isConnected&&(s(this,v).length||(s(this,N).current=!0)),s(this,v).length&&(s(this,f).max=1/0,s(this,f).min=-1/0)):(g(this,Nt,0),s(this,f).max=s(this,_),s(this,f).min=0)}),s(this,wt).subscribe(e=>{s(this,f).damping=e.current}),s(this,le).subscribe(e=>{s(this,f).mass=e.current}),s(this,ce).subscribe(e=>{s(this,f).stiffness=e.current}),s(this,Ft).subscribe(e=>{e.current&&!e.previous?C(this,Me,Je).call(this):!e.current&&e.previous&&C(this,xe,Qe).call(this)}),s(this,Dt).subscribe(e=>{e.current&&!e.previous?C(this,fe,ze).call(this):!e.current&&e.previous&&C(this,Se,Fe).call(this)}))}get dampingCSSProperty(){return s(this,wt)}get maxxCSSProperty(){return s(this,le)}get stiffnessCSSProperty(){return s(this,ce)}get mouseDragCSSProperty(){return s(this,zt)}get axisAttibute(){return s(this,z)}get pagesAttibute(){return s(this,tt)}get splitAttibute(){return s(this,N)}get sectionalAttibute(){return s(this,et)}get infiniteCSSProperty(){return s(this,D)}get dampingAttibute(){return s(this,wt)}get disabledAttibute(){return s(this,Ft)}get hibernatedAttibute(){return s(this,Dt)}get currentScrollValue(){return C(this,de,Re).call(this,"current")}get targetScrollValue(){return C(this,de,Re).call(this,"target")}get contentElement(){return s(this,w)}get sections(){return s(this,v)}get position(){return s(this,ue)}get contentPosition(){return s(this,pe)}get viewportSize(){return s(this,L)}get scrollSize(){return s(this,_)}get gap(){return s(this,U)}get counter(){return s(this,E)}get distance(){return s(this,_t)}get infiniteDistance(){return s(this,D).current?s(this,_t)+s(this,U):s(this,_t)}get overscroll(){return s(this,Nt)}get vertical(){return s(this,z).current==="y"}get currentProgress(){return this.currentScrollValue/this.infiniteDistance||0}get targetProgress(){return this.targetScrollValue/this.infiniteDistance||0}get speed(){return s(this,f).speed}get direction(){return s(this,f).direction}get isRunning(){return s(this,f).isRunning}get scrollWidth(){return s(this,z).current==="y"?0:s(this,f).length}get scrollHeight(){return s(this,z).current==="x"?0:s(this,f).length}onScroll(...e){return s(this,f).subscribe(...e)}offScroll(...e){s(this,f).unsubscribe(...e)}range(e,i,n=0){const h=e-n,c=h+i+n*2;return this.currentProgress<h?0:this.currentProgress>c?1:(this.currentProgress-h)/(c-h)}curve(e,i,n=0){return Math.sin(this.range(e,i,n)*Math.PI)}visible(e,i,n=0){const h=e-n,c=h+i+n*2;return this.currentProgress>=h&&this.currentProgress<=c}scrollToSection(e,i="smooth"){if(!s(this,v).length)return;const n=s(this,E).current;C(this,De,os).call(this,e);const h=s(this,v)[n],c=s(this,v)[s(this,E).current];if(h&&c){let u=0;const ae=s(this,v).length-1;s(this,D).current?s(this,E).current===0&&n===ae?u=s(this,_)+s(this,L)-h.position+s(this,U):s(this,E).current===ae&&n===0?u=c.position-(s(this,_)+s(this,L)+s(this,U)):u=c.position-h.position:u=c.position-h.position,s(this,f).shift(u,i==="instant")}}shiftSections(e,i="smooth"){s(this,v).length&&this.scrollToSection(s(this,E).current+e,i)}setPosition(e,i="smooth"){s(this,f).set(e,i==="instant")}connectedCallback(){s(this,z).observe(),s(this,tt).observe(),s(this,N).observe(),s(this,et).observe(),s(this,$t).observe(),s(this,D).observe(),s(this,wt).observe(),s(this,zt).observe(),s(this,Ft).observe(),s(this,Dt).observe(),C(this,Se,Fe).call(this)}disconnectedCallback(){s(this,z).unobserve(),s(this,tt).unobserve(),s(this,N).unobserve(),s(this,et).unobserve(),s(this,$t).unobserve(),s(this,D).unobserve(),s(this,wt).unobserve(),s(this,zt).unobserve(),s(this,Ft).unobserve(),s(this,Dt).unobserve(),C(this,fe,ze).call(this)}};f=new WeakMap;z=new WeakMap;tt=new WeakMap;N=new WeakMap;et=new WeakMap;$t=new WeakMap;D=new WeakMap;wt=new WeakMap;le=new WeakMap;ce=new WeakMap;zt=new WeakMap;Ft=new WeakMap;Dt=new WeakMap;w=new WeakMap;ke=new WeakMap;v=new WeakMap;ue=new WeakMap;pe=new WeakMap;L=new WeakMap;_=new WeakMap;U=new WeakMap;J=new WeakMap;Mt=new WeakMap;at=new WeakMap;E=new WeakMap;Nt=new WeakMap;_t=new WeakMap;Zt=new WeakMap;Kt=new WeakMap;ie=new WeakSet;We=function(){C(this,It,re).call(this),s(this,ke).assignedElements().forEach(r=>{r instanceof HTMLElement&&s(this,v).push(new Ms(r,this))}),s(this,w).style.transform="",this.dispatchEvent(new CustomEvent("sectionsChange",{composed:!0})),s(this,Vt).call(this)};It=new WeakSet;re=function(){s(this,v).forEach(r=>{r.destroy()}),g(this,v,[]),this.dispatchEvent(new CustomEvent("sectionsChange",{composed:!0}))};Me=new WeakSet;Je=function(){s(this,Zt)||(g(this,Zt,!0),s(this,f).unsubscribe(s(this,Ve)),s(this,f).unlistenAnimationFrame(),s(this,J).disconnect(),s(this,Mt).disconnect(),s(this,at).disconnect())};xe=new WeakSet;Qe=function(){s(this,Zt)&&(g(this,Zt,!1),s(this,f).subscribe(s(this,Ve)),s(this,J).connect(),s(this,Mt).connect(),s(this,at).connect())};fe=new WeakSet;ze=function(){s(this,Kt)||(g(this,Kt,!0),Ut.windowResizer.unsubscribe(s(this,Vt)),s(this,f).reset(),C(this,Me,Je).call(this),s(this,w).style.transform="",s(this,N).current&&C(this,It,re).call(this),Lt.scrollEntries.unregister(this))};Se=new WeakSet;Fe=function(){s(this,Kt)&&(g(this,Kt,!1),s(this,N).current&&C(this,ie,We).call(this),Lt.scrollEntries.register(this),Ut.windowResizer.subscribe(s(this,Vt),Le.RESIZE_ORDER.SCROLL),C(this,xe,Qe).call(this))};Vt=new WeakMap;Ve=new WeakMap;De=new WeakSet;os=function(r){s(this,D).current?(s(this,E).current=r%s(this,v).length,s(this,E).current=s(this,E).current<0?s(this,v).length+s(this,E).current:s(this,E).current):s(this,E).current=qt.clamp(r,0,s(this,v).length-1)};Jt=new WeakMap;de=new WeakSet;Re=function(r="current"){if(s(this,D).current&&s(this,v).length){const e=s(this,f)[r]%(s(this,_)+s(this,L)+s(this,U));return e<0?s(this,_)+e+s(this,L)+s(this,U):e}else return s(this,f)[r]};exports.ScrollElement=Ws([vt.define("e-scroll")],exports.ScrollElement);var ne;class Oe extends vt.CustomElement{constructor(){super(...arguments);$(this,ne,null)}get scrollElement(){return a(this,ne)}connectedCallback(){const i=Ps.findParentElement(this,exports.ScrollElement);i instanceof exports.ScrollElement?R(this,ne,i):console.error(this,"e-scroll not found")}}ne=new WeakMap;var Ls=Object.defineProperty,Vs=Object.getOwnPropertyDescriptor,Os=(r,e,i,n)=>{for(var h=n>1?void 0:n?Vs(e,i):e,c=r.length-1,u;c>=0;c--)(u=r[c])&&(h=(n?u(e,i,h):u(h))||h);return n&&h&&Ls(e,i,h),h},as=(r,e,i)=>{if(!e.has(r))throw TypeError("Cannot "+i)},p=(r,e,i)=>(as(r,e,"read from private field"),i?i.call(r):e.get(r)),G=(r,e,i)=>{if(e.has(r))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(r):e.set(r,i)},mt=(r,e,i,n)=>(as(r,e,"write to private field"),n?n.call(r,i):e.set(r,i),i),Qt,F,st,it,Xt,Yt,ve,me,ge,we;const $s=Ke.createStylesheet({":host":{display:"inline-block",zIndex:"1",backgroundColor:is.aptechkaTheme.colorLight.var},':host([axis="y"])':{position:"absolute",right:"0",top:"0",width:"1vmin",height:"100%"},':host([axis="x"])':{position:"absolute",left:"0",bottom:"0",width:"100%",height:"1vmin"},".default-thumb":{backgroundColor:is.aptechkaTheme.colorDark.var,borderRadius:"1vmin",touchAction:"none"},"::slotted(*)":{touchAction:"none"}});exports.ScrollbarElement=class extends Oe{constructor(){super(),G(this,Qt,null),G(this,F,null),G(this,st,!1),G(this,it,0),G(this,Xt,0),G(this,Yt,0),G(this,ve,()=>{mt(this,st,this.offsetWidth>this.offsetHeight);const e=p(this,st)?this.offsetWidth:this.offsetHeight;mt(this,it,e/((this.scrollElement.scrollSize+this.scrollElement.viewportSize)/e)),mt(this,it,Math.max(p(this,it),30)),p(this,st)?(p(this,F).style.width=p(this,it)+"px",p(this,F).style.height="100%"):(p(this,F).style.width="100%",p(this,F).style.height=p(this,it)+"px"),mt(this,Xt,e-p(this,it)),this.scrollElement.scrollSize||(this.style.display="none")}),G(this,me,()=>{mt(this,Yt,this.scrollElement.currentProgress*p(this,Xt)),p(this,st)?p(this,F).style.transform=`translate3d(${p(this,Yt)}px, 0px, 0px)`:p(this,F).style.transform=`translate3d(0px, ${p(this,Yt)}px, 0px)`}),G(this,ge,()=>{this.setAttribute("axis",this.scrollElement.axisAttibute.current)}),G(this,we,e=>{ys.setupDrag(h=>{const c=p(this,st)?h.x:h.y,u=this.scrollElement.distance/p(this,Xt),ae=(c-n)*u;this.scrollElement.setPosition(i+ae)});const i=this.scrollElement.targetScrollValue,n=p(this,st)?e.x:e.y}),Ze.isBrowser&&(this.openShadow($s),B.element(this,{slot:"static","drag-dead-zone":"",children:[B.slot({ref:e=>mt(this,Qt,e),children:B.div({class:"default-thumb"})})]}))}get thumbElement(){return p(this,F)}connectedCallback(){super.connectedCallback();const e=p(this,Qt).assignedElements()[0]||p(this,Qt).firstElementChild;mt(this,F,e),p(this,F).addEventListener("pointerdown",p(this,we)),Ut.windowResizer.subscribe(p(this,ve),Le.RESIZE_ORDER.SCROLL+1),this.scrollElement.onScroll(p(this,me)),this.scrollElement.axisAttibute.subscribe(p(this,ge))}disconnectedCallback(){p(this,F).removeEventListener("pointerdown",p(this,we)),Ut.windowResizer.unsubscribe(p(this,ve)),this.scrollElement.offScroll(p(this,me)),this.scrollElement.axisAttibute.unsubscribe(p(this,ge))}};Qt=new WeakMap;F=new WeakMap;st=new WeakMap;it=new WeakMap;Xt=new WeakMap;Yt=new WeakMap;ve=new WeakMap;me=new WeakMap;ge=new WeakMap;we=new WeakMap;exports.ScrollbarElement=Os([vt.define("e-scrollbar")],exports.ScrollbarElement);const zs=Ke.createStylesheet({button:{all:"inherit"}});class ls extends Oe{constructor(){super(),this.openShadow(zs),Ze.isBrowser&&B.element(this,{children:[B.button({onClick:()=>{this.handleClick()},children:[B.slot()]})]})}}var Fs=Object.defineProperty,Ds=Object.getOwnPropertyDescriptor,Rs=(r,e,i,n)=>{for(var h=n>1?void 0:n?Ds(e,i):e,c=r.length-1,u;c>=0;c--)(u=r[c])&&(h=(n?u(e,i,h):u(h))||h);return n&&h&&Fs(e,i,h),h};exports.ScrollSetButtonElement=class extends ls{handleClick(){const e=this.getAttribute("index"),i=this.getAttribute("behaviour");this.scrollElement.scrollToSection(parseInt(e||"0"),i)}};exports.ScrollSetButtonElement=Rs([vt.define("e-scroll-set-button")],exports.ScrollSetButtonElement);var As=Object.defineProperty,Ts=Object.getOwnPropertyDescriptor,Bs=(r,e,i,n)=>{for(var h=n>1?void 0:n?Ts(e,i):e,c=r.length-1,u;c>=0;c--)(u=r[c])&&(h=(n?u(e,i,h):u(h))||h);return n&&h&&As(e,i,h),h};exports.ScrollStepButtonElement=class extends ls{handleClick(){const e=this.getAttribute("step"),i=this.getAttribute("behaviour");this.scrollElement.shiftSections(parseInt(e||"1"),i)}};exports.ScrollStepButtonElement=Bs([vt.define("e-scroll-step-button")],exports.ScrollStepButtonElement);var qs=Object.defineProperty,Is=Object.getOwnPropertyDescriptor,Hs=(r,e,i,n)=>{for(var h=n>1?void 0:n?Is(e,i):e,c=r.length-1,u;c>=0;c--)(u=r[c])&&(h=(n?u(e,i,h):u(h))||h);return n&&h&&qs(e,i,h),h},cs=(r,e,i)=>{if(!e.has(r))throw TypeError("Cannot "+i)},Ot=(r,e,i)=>(cs(r,e,"read from private field"),i?i.call(r):e.get(r)),rs=(r,e,i)=>{if(e.has(r))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(r):e.set(r,i)},ns=(r,e,i,n)=>(cs(r,e,"write to private field"),n?n.call(r,i):e.set(r,i),i),bt,jt,j,St,Ht,he,oe,Gt;class Gs{constructor(e,i,n){$(this,j,void 0);$(this,St,void 0);$(this,Ht,void 0);$(this,he,void 0);$(this,oe,()=>{a(this,St).scrollToSection(a(this,Ht),a(this,he))});$(this,Gt,()=>{a(this,j).classList.toggle("current",a(this,St).counter.current===a(this,Ht))});R(this,j,document.createElement("button")),R(this,St,e),R(this,he,n),R(this,Ht,i),a(this,j).addEventListener("click",a(this,oe)),a(this,St).counter.subscribe(a(this,Gt)),a(this,Gt).call(this)}get element(){return a(this,j)}destroy(){a(this,j).removeEventListener("click",a(this,oe)),a(this,St).counter.unsubscribe(a(this,Gt)),a(this,j).remove()}}j=new WeakMap,St=new WeakMap,Ht=new WeakMap,he=new WeakMap,oe=new WeakMap,Gt=new WeakMap;exports.ScrollBulletButtonsElement=class extends Oe{constructor(){super(...arguments),rs(this,bt,[]),rs(this,jt,hs.debounce(()=>{Ot(this,bt).forEach(e=>e.destroy()),ns(this,bt,[]);for(let e=0;e<this.scrollElement.sections.length;e++){const i=new Gs(this.scrollElement,e,this.getAttribute("behaviour")||"smooth");this.appendChild(i.element),Ot(this,bt).push(i)}},0))}connectedCallback(){super.connectedCallback(),this.scrollElement.addEventListener("sectionsChange",Ot(this,jt)),Ot(this,jt).call(this)}disconnectedCallback(){this.scrollElement.removeEventListener("sectionsChange",Ot(this,jt)),Ot(this,bt).forEach(e=>e.destroy()),ns(this,bt,[])}};bt=new WeakMap;jt=new WeakMap;exports.ScrollBulletButtonsElement=Hs([vt.define("e-scroll-bullet-buttons")],exports.ScrollBulletButtonsElement);var Us=Object.defineProperty,Zs=Object.getOwnPropertyDescriptor,Ks=(r,e,i,n)=>{for(var h=n>1?void 0:n?Zs(e,i):e,c=r.length-1,u;c>=0;c--)(u=r[c])&&(h=(n?u(e,i,h):u(h))||h);return n&&h&&Us(e,i,h),h},Xe=(r,e,i)=>{if(!e.has(r))throw TypeError("Cannot "+i)},t=(r,e,i)=>(Xe(r,e,"read from private field"),i?i.call(r):e.get(r)),o=(r,e,i)=>{if(e.has(r))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(r):e.set(r,i)},S=(r,e,i,n)=>(Xe(r,e,"write to private field"),n?n.call(r,i):e.set(r,i),i),b=(r,e,i)=>(Xe(r,e,"access private method"),i),Rt,Ct,yt,Pt,Et,O,q,I,H,Wt,M,lt,ct,nt,ht,ot,At,te,W,K,Z,ut,pt,Q,_e,m,Tt,Bt,be,T,X,x,k,A,ee,xt,y,Ce,Ae,Ye,us,Te,ps,Be,fs,qe,Ss,Ie,ds,He,vs,Ge,ms,ye,se,rt,kt,je,gs,ts,ws,Pe,Ue,Ee;exports.ScrollSegmentElement=class extends Oe{constructor(){super(...arguments),o(this,Ce),o(this,Ye),o(this,Te),o(this,Be),o(this,qe),o(this,Ie),o(this,He),o(this,Ge),o(this,rt),o(this,je),o(this,ts),o(this,Pe),o(this,Rt,new d.CSSProperty(this,"--target","")),o(this,Ct,new d.CSSProperty(this,"--disabled",!1)),o(this,yt,new d.CSSProperty(this,"--distance-offset",0)),o(this,Pt,new d.CSSProperty(this,"--start-offset",0)),o(this,Et,new d.CSSProperty(this,"--capture-once",!1)),o(this,O,new d.CSSProperty(this,"--captured","")),o(this,q,new d.CSSProperty(this,"--released","")),o(this,I,new d.CSSProperty(this,"--captured-from-start","")),o(this,H,new d.CSSProperty(this,"--captured-from-finish","")),o(this,Wt,new d.CSSProperty(this,"--released-from-start","")),o(this,M,new d.CSSProperty(this,"--released-from-finish","")),o(this,lt,new d.CSSProperty(this,"--passed-var","")),o(this,ct,new d.CSSProperty(this,"--progress-var","")),o(this,nt,new d.CSSProperty(this,"--distance-var","")),o(this,ht,new d.CSSProperty(this,"--start-var","")),o(this,ot,new d.CSSProperty(this,"--finish-var","")),o(this,At,new d.CSSProperty(this,"--smoothstep",!1)),o(this,te,new d.CSSProperty(this,"--smootherstep",!1)),o(this,W,new gt.Store(!1)),o(this,K,new gt.Store(!1)),o(this,Z,new gt.Store(!1)),o(this,ut,new gt.Store(!1)),o(this,pt,new gt.Store(!1)),o(this,Q,new gt.Store(!1)),o(this,_e,[]),o(this,m,this),o(this,Tt,0),o(this,Bt,0),o(this,be,0),o(this,T,0),o(this,X,0),o(this,x,0),o(this,k,0),o(this,A,0),o(this,ee,!1),o(this,xt,!1),o(this,y,!0),o(this,ye,()=>{t(this,y)||(this.resize(),t(this,se).call(this))}),o(this,se,()=>{!t(this,y)&&t(this,ee)&&this.tick()}),o(this,Ee,hs.debounce(()=>{const e=Lt.scrollEntries.getAll(this).reverse();let i=0;e.forEach((n,h)=>{n.element===this.scrollElement&&(i=h)}),S(this,_e,e.slice(i+1))},0))}get distanceOffsetCSSProperty(){return t(this,yt)}get startOffsetCSSProperty(){return t(this,Pt)}get captureOnceCSSProperty(){return t(this,Et)}get capturedCSSProperty(){return t(this,O)}get releasedCSSProperty(){return t(this,q)}get capturedFromStartCSSProperty(){return t(this,I)}get capturedFromFinishCSSProperty(){return t(this,H)}get releasedFromStartCSSProperty(){return t(this,Wt)}get releasedFromFinishCSSProperty(){return t(this,M)}get passedVarCSSProperty(){return t(this,lt)}get progressVarCSSProperty(){return t(this,ct)}get distanceVarCSSProperty(){return t(this,nt)}get startVarCSSProperty(){return t(this,ht)}get finishVarCSSProperty(){return t(this,ot)}get smoothstepCSSProperty(){return t(this,At)}get smootherstepCSSProperty(){return t(this,te)}get disabledCSSProperty(){return t(this,Ct)}get targetCSSProperty(){return t(this,Rt)}get isCaptured(){return t(this,W)}get isReleased(){return t(this,K)}get isCapturedFromStart(){return t(this,Z)}get isReleasedFromStart(){return t(this,ut)}get isCapturedFromFinish(){return t(this,pt)}get isReleasedFromFinish(){return t(this,Q)}get directionPosition(){return t(this,Tt)}get directionSize(){return t(this,Bt)}get passed(){return t(this,T)}get progress(){return t(this,X)}get start(){return t(this,x)}get finish(){return t(this,A)}get distance(){return t(this,k)}get isCapturedOnce(){return t(this,xt)}get isDisabled(){return t(this,y)}resize(){S(this,Bt,this.scrollElement.vertical?this.offsetHeight:this.offsetWidth),S(this,Tt,this.scrollElement.vertical?dt.getCumulativeOffsetTop(this,this.scrollElement):dt.getCumulativeOffsetLeft(this,this.scrollElement)),S(this,x,this.getStart()),S(this,k,this.getDistance()),S(this,x,t(this,x)+t(this,Pt).current),S(this,k,t(this,k)+t(this,yt).current),S(this,A,t(this,x)+t(this,k)),this.scrollElement.currentScrollValue>t(this,A)&&!t(this,W).current&&!t(this,K).current&&(t(this,W).current=!0),this.setVar(t(this,ht).current,t(this,x)),this.setVar(t(this,ot).current,t(this,A)),this.setVar(t(this,nt).current,t(this,k)),S(this,ee,!0)}tick(){let e=this.scrollElement.currentScrollValue;t(this,_e).forEach(n=>{e+=n.value}),S(this,T,this.updateValue(e-t(this,x),0,t(this,k))||0),S(this,X,t(this,T)/t(this,k)||0);const i=Math.round(e);t(this,W).current&&(i>t(this,x)?t(this,Z).current||b(this,qe,Ss).call(this):t(this,Z).current&&!t(this,ut).current&&b(this,He,vs).call(this),i<t(this,A)?t(this,Q).current&&!t(this,pt).current&&b(this,Ie,ds).call(this):t(this,Z).current&&!t(this,Q).current&&b(this,Ge,ms).call(this)),i>t(this,x)&&i<t(this,A)?(b(this,Ce,Ae).call(this),t(this,W).current||b(this,Te,ps).call(this)):t(this,W).current&&(S(this,T,qt.step(t(this,k)/2,t(this,T),0,t(this,k))),S(this,X,t(this,T)/t(this,k)),b(this,Ce,Ae).call(this),b(this,Be,fs).call(this)),t(this,xt)&&t(this,Et).current&&(t(this,O).current&&t(this,m).classList.add(t(this,O).current),S(this,y,!0))}disable(){this.style.cssText="",S(this,Tt,0),S(this,Bt,0),S(this,T,0),S(this,X,0),S(this,x,0),S(this,k,0),S(this,A,0),S(this,ee,!1),t(this,W).current=!1,t(this,K).current=!1,t(this,Z).current=!1,t(this,ut).current=!1,t(this,pt).current=!1,t(this,Q).current=!1,S(this,xt,!1),S(this,y,!0),b(this,Pe,Ue).call(this)}enable(){S(this,y,!1)}connectedCallback(){super.connectedCallback(),t(this,Rt).observe(),t(this,Ct).observe(),t(this,yt).observe(),t(this,Pt).observe(),t(this,Et).observe(),t(this,O).observe(),t(this,q).observe(),t(this,I).observe(),t(this,H).observe(),t(this,Wt).observe(),t(this,M).observe(),t(this,lt).observe(),t(this,ct).observe(),t(this,nt).observe(),t(this,ht).observe(),t(this,ot).observe(),t(this,At).observe(),t(this,te).observe();let e=!1;this.scrollElement.addEventListener("sectionsChange",t(this,Ee)),t(this,Ee).call(this),t(this,Ct).current||this.enable(),t(this,Rt).subscribe(i=>{i.previous&&b(this,Pe,Ue).call(this),i.current?i.current==="parent"?S(this,m,this.parentElement||this):S(this,m,document.querySelector(i.current)||this):S(this,m,this)}),t(this,Ct).subscribe(i=>{i.current&&!i.previous?this.disable():!i.current&&i.previous&&(this.resize(),this.enable())}),t(this,Pt).subscribe(()=>{e&&!t(this,y)&&this.resize()}),t(this,yt).subscribe(()=>{e&&!t(this,y)&&this.resize()}),t(this,O).subscribe(i=>{b(this,rt,kt).call(this,i)}),t(this,I).subscribe(i=>{b(this,rt,kt).call(this,i)}),t(this,H).subscribe(i=>{b(this,rt,kt).call(this,i)}),t(this,q).subscribe(i=>{b(this,rt,kt).call(this,i)}),t(this,Wt).subscribe(i=>{b(this,rt,kt).call(this,i)}),t(this,M).subscribe(i=>{b(this,rt,kt).call(this,i)}),t(this,Et).subscribe(i=>{t(this,y)||!i.current&&i.previous&&(this.resize(),this.enable())}),t(this,lt).subscribe(i=>{t(this,y)||(this.removeVar(i.previous),this.setVar(i.current,this.passed))}),t(this,ct).subscribe(i=>{t(this,y)||(this.removeVar(i.previous),this.setVar(i.current,t(this,X)))}),t(this,ht).subscribe(i=>{t(this,y)||(this.removeVar(i.previous),this.setVar(i.current,t(this,x)))}),t(this,ot).subscribe(i=>{t(this,y)||(this.removeVar(i.previous),this.setVar(i.current,t(this,A)))}),t(this,nt).subscribe(i=>{t(this,y)||(this.removeVar(i.previous),this.setVar(i.current,t(this,k)))}),Ut.windowResizer.subscribe(t(this,ye),Le.RESIZE_ORDER.SEGMENT),this.scrollElement.onScroll(t(this,se)),e=!0}disconnectedCallback(){Ut.windowResizer.unsubscribe(t(this,ye)),this.scrollElement.offScroll(t(this,se)),t(this,Rt).close(),t(this,Ct).close(),t(this,yt).close(),t(this,Pt).close(),t(this,Et).close(),t(this,O).close(),t(this,q).close(),t(this,I).close(),t(this,H).close(),t(this,Wt).close(),t(this,M).close(),t(this,lt).close(),t(this,ct).close(),t(this,nt).close(),t(this,ht).close(),t(this,ot).close(),t(this,At).close(),t(this,te).close(),t(this,W).close(),t(this,K).close(),t(this,Z).close(),t(this,ut).close(),t(this,pt).close(),t(this,Q).close(),this.disable()}removeVar(e){e&&t(this,m).style.removeProperty(`--${e}`)}setVar(e,i){e&&t(this,m).style.setProperty(`--${e}`,i.toString())}updateValue(e,i=0,n=1){return this.smootherstepCSSProperty.current?qt.smootherstep(e,i,n)*n:t(this,At).current?qt.smoothstep(e,i,n)*n:qt.clamp(e,i,n)}getDistance(){return t(this,Bt)+t(this,be)}getStart(){return t(this,Tt)-t(this,be)}};Rt=new WeakMap;Ct=new WeakMap;yt=new WeakMap;Pt=new WeakMap;Et=new WeakMap;O=new WeakMap;q=new WeakMap;I=new WeakMap;H=new WeakMap;Wt=new WeakMap;M=new WeakMap;lt=new WeakMap;ct=new WeakMap;nt=new WeakMap;ht=new WeakMap;ot=new WeakMap;At=new WeakMap;te=new WeakMap;W=new WeakMap;K=new WeakMap;Z=new WeakMap;ut=new WeakMap;pt=new WeakMap;Q=new WeakMap;_e=new WeakMap;m=new WeakMap;Tt=new WeakMap;Bt=new WeakMap;be=new WeakMap;T=new WeakMap;X=new WeakMap;x=new WeakMap;k=new WeakMap;A=new WeakMap;ee=new WeakMap;xt=new WeakMap;y=new WeakMap;Ce=new WeakSet;Ae=function(){b(this,Ye,us).call(this),this.setVar(t(this,lt).current,t(this,T)),this.setVar(t(this,ct).current,t(this,X))};Ye=new WeakSet;us=function(){this.dispatchEvent(new CustomEvent("segmentPass",{detail:{distance:t(this,k),start:t(this,x),finish:t(this,A),passed:t(this,T),progress:t(this,X)}}))};Te=new WeakSet;ps=function(){t(this,W).current=!0,t(this,K).current=!1,S(this,xt,!0),t(this,q).current&&t(this,m).classList.remove(t(this,q).current),t(this,M).current&&t(this,m).classList.remove(t(this,M).current),t(this,M).current&&t(this,m).classList.remove(t(this,M).current),t(this,O).current&&t(this,m).classList.add(t(this,O).current)};Be=new WeakSet;fs=function(){t(this,K).current=!0,t(this,W).current=!1,S(this,xt,!0),t(this,O).current&&t(this,m).classList.remove(t(this,O).current),t(this,I).current&&t(this,m).classList.remove(t(this,I).current),t(this,H).current&&t(this,m).classList.remove(t(this,H).current),t(this,q).current&&t(this,m).classList.add(t(this,q).current)};qe=new WeakSet;Ss=function(){t(this,W).current=!0,t(this,Z).current=!0,t(this,ut).current=!1,t(this,I).current&&t(this,m).classList.add(t(this,I).current)};Ie=new WeakSet;ds=function(){t(this,W).current=!0,t(this,pt).current=!0,t(this,Q).current=!1,t(this,H).current&&t(this,m).classList.add(t(this,H).current)};He=new WeakSet;vs=function(){t(this,K).current=!0,t(this,ut).current=!0,t(this,Z).current=!1,t(this,M).current&&t(this,m).classList.add(t(this,M).current)};Ge=new WeakSet;ms=function(){t(this,K).current=!0,t(this,Q).current=!0,t(this,pt).current=!1,t(this,M).current&&t(this,m).classList.add(t(this,M).current)};ye=new WeakMap;se=new WeakMap;rt=new WeakSet;kt=function(r){if(t(this,y)){r.previous&&t(this,m).classList.remove(r.previous),r.current&&t(this,m).classList.remove(r.current);return}r.current&&t(this,W).current?(r.previous&&t(this,m).classList.remove(r.previous),t(this,m).classList.add(r.current)):!r.current&&r.previous&&t(this,m).classList.remove(r.previous)};je=new WeakSet;gs=function(...r){r.forEach(e=>{e&&t(this,m).classList.remove(e)})};ts=new WeakSet;ws=function(...r){r.forEach(e=>{e&&t(this,m).style.removeProperty(`--${e}`)})};Pe=new WeakSet;Ue=function(){b(this,je,gs).call(this,t(this,O).current,t(this,I).current,t(this,H).current,t(this,q).current,t(this,Wt).current,t(this,M).current),b(this,ts,ws).call(this,t(this,lt).current,t(this,ct).current,t(this,nt).current,t(this,ht).current,t(this,ot).current)};Ee=new WeakMap;exports.ScrollSegmentElement=Ks([vt.define("e-scroll-segment")],exports.ScrollSegmentElement);
|