aptechka 0.47.4 → 0.47.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -7,6 +7,7 @@ export declare class BillboardElement extends HTMLElement {
7
7
  #private;
8
8
  get counter(): number;
9
9
  get itemElements(): HTMLElement[];
10
+ addItem(element: HTMLElement): void;
10
11
  set(value: number): void;
11
12
  shift(value: number): void;
12
13
  protected connectedCallback(): void;
@@ -1 +1 @@
1
- "use strict";var P=s=>{throw TypeError(s)};var w=(s,i,t)=>i.has(s)||P("Cannot "+t);var e=(s,i,t)=>(w(s,i,"read from private field"),t?t.call(s):i.get(s)),n=(s,i,t)=>i.has(s)?P("Cannot add the same private member more than once"):i instanceof WeakSet?i.add(s):i.set(s,t),h=(s,i,t,r)=>(w(s,i,"write to private field"),r?r.call(s,t):i.set(s,t),t),E=(s,i,t)=>(w(s,i,"access private method"),t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const C=require("../index-Cqw2NKev.cjs"),T=require("../dom-JBOkFLTh.cjs"),M=require("../css-property/index.cjs"),_=require("../events-KVanG9sR.cjs"),j=require("../number-0243DApo.cjs");var b,u,f,m,a,c,I,v,y,x,S;class q extends HTMLElement{constructor(){super(...arguments);n(this,c);n(this,b,new M.CSSProperty(this,"--autoplay",!1));n(this,u);n(this,f,!1);n(this,m,[]);n(this,a,0);n(this,v,t=>{h(this,f,t.isIntersecting),e(this,f)?E(this,c,I).call(this):clearInterval(e(this,u))});n(this,y,()=>{clearInterval(e(this,u)),e(this,f)&&h(this,u,setInterval(e(this,S),parseFloat(e(this,b).current||"0")*1e3))});n(this,S,()=>{E(this,c,x).call(this,e(this,a)+1)})}get counter(){return e(this,a)}get itemElements(){return e(this,m)}set(t){E(this,c,x).call(this,t),E(this,c,I).call(this)}shift(t){this.set(e(this,a)+t)}connectedCallback(){var t;h(this,m,[...this.querySelectorAll("[data-billboard-item]")]),(t=e(this,m)[0])==null||t.classList.add("current"),e(this,b).subscribe(r=>{r.current?(C.intersector.subscribe(this,e(this,v)),E(this,c,I).call(this)):(h(this,f,!0),C.intersector.unsubscribe(e(this,v)),clearInterval(e(this,u)),E(this,c,x).call(this,0))}),e(this,b).observe()}disconnectedCallback(){e(this,b).unobserve(),C.intersector.unsubscribe(e(this,v)),clearInterval(e(this,u))}}b=new WeakMap,u=new WeakMap,f=new WeakMap,m=new WeakMap,a=new WeakMap,c=new WeakSet,I=function(){e(this,b).current!==!1&&e(this,y).call(this)},v=new WeakMap,y=new WeakMap,x=function(t){h(this,a,j.loopNumber(t,e(this,m).length)),e(this,m).forEach((r,o)=>{o===e(this,a)?r.classList.add("current"):r.classList.remove("current")}),_.dispatchEvent(this,"billboardChange",{detail:{counter:e(this,a)}})},S=new WeakMap;customElements.get("e-billboard")||customElements.define("e-billboard",q);var l,d,B,p;class A extends HTMLElement{constructor(){super(...arguments);n(this,l,null);n(this,d,[]);n(this,B,t=>{const r=t.currentTarget,o=e(this,d).findIndex(k=>k===r);o>=0&&e(this,l).set(o)});n(this,p,()=>{e(this,d).forEach((t,r)=>{r===e(this,l).counter?t.classList.add("current"):t.classList.remove("current")})})}connectedCallback(){h(this,l,T.findParentElement(this,q)),e(this,l)&&customElements.whenDefined("e-billboard").then(()=>{var t;if(this.isConnected){const r=e(this,l).itemElements.length;for(let o=0;o<r;o++){const k=document.createElement("button");e(this,d).push(k),this.appendChild(k)}e(this,d).forEach(o=>{o.addEventListener("click",e(this,B))}),(t=e(this,l))==null||t.addEventListener("billboardChange",e(this,p)),e(this,p).call(this)}})}disconnectedCallback(){var t;e(this,d).forEach(r=>{r.removeEventListener("click",e(this,B))}),(t=e(this,l))==null||t.removeEventListener("billboardChange",e(this,p)),this.innerHTML="",h(this,d,[])}}l=new WeakMap,d=new WeakMap,B=new WeakMap,p=new WeakMap;C.isBrowser&&!customElements.get("e-billboard-bullets")&&customElements.define("e-billboard-bullets",A);var g,L;class H extends HTMLElement{constructor(){super();n(this,g,new M.CSSProperty(this,"--step",1));n(this,L,null);this.addEventListener("click",()=>{e(this,L)&&e(this,L).shift(e(this,g).current)})}connectedCallback(){this.tabIndex=0,h(this,L,T.findParentElement(this,q)),e(this,g).observe()}disconnectedCallback(){this.removeAttribute("tabindex"),e(this,g).unobserve()}}g=new WeakMap,L=new WeakMap;C.isBrowser&&!customElements.get("e-billboard-step-button")&&customElements.define("e-billboard-step-button",H);exports.BillboardBulletsElement=A;exports.BillboardElement=q;exports.BillboardStepButtonElement=H;
1
+ "use strict";var T=s=>{throw TypeError(s)};var w=(s,i,t)=>i.has(s)||T("Cannot "+t);var e=(s,i,t)=>(w(s,i,"read from private field"),t?t.call(s):i.get(s)),n=(s,i,t)=>i.has(s)?T("Cannot add the same private member more than once"):i instanceof WeakSet?i.add(s):i.set(s,t),o=(s,i,t,l)=>(w(s,i,"write to private field"),l?l.call(s,t):i.set(s,t),t),d=(s,i,t)=>(w(s,i,"access private method"),t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const C=require("../index-Cqw2NKev.cjs"),M=require("../dom-JBOkFLTh.cjs"),A=require("../css-property/index.cjs"),j=require("../events-KVanG9sR.cjs"),D=require("../number-0243DApo.cjs");var m,E,f,h,u,r,P,I,v,y,x,S;class q extends HTMLElement{constructor(){super(...arguments);n(this,r);n(this,m,new A.CSSProperty(this,"--autoplay",!1));n(this,E);n(this,f,!1);n(this,h,[]);n(this,u,0);n(this,v,t=>{o(this,f,t.isIntersecting),e(this,f)?d(this,r,I).call(this):clearInterval(e(this,E))});n(this,y,()=>{clearInterval(e(this,E)),e(this,f)&&o(this,E,setInterval(e(this,S),parseFloat(e(this,m).current||"0")*1e3))});n(this,S,()=>{d(this,r,x).call(this,e(this,u)+1)})}get counter(){return e(this,u)}get itemElements(){return e(this,h)}addItem(t){e(this,h).push(t),d(this,r,P).call(this)}set(t){d(this,r,x).call(this,t),d(this,r,I).call(this)}shift(t){this.set(e(this,u)+t)}connectedCallback(){var t;o(this,h,[...this.querySelectorAll("[data-billboard-item]")]),(t=e(this,h)[0])==null||t.classList.add("current"),d(this,r,P).call(this),e(this,m).subscribe(l=>{l.current?(C.intersector.subscribe(this,e(this,v)),d(this,r,I).call(this)):(o(this,f,!0),C.intersector.unsubscribe(e(this,v)),clearInterval(e(this,E)),d(this,r,x).call(this,0))}),e(this,m).observe()}disconnectedCallback(){e(this,m).unobserve(),C.intersector.unsubscribe(e(this,v)),clearInterval(e(this,E))}}m=new WeakMap,E=new WeakMap,f=new WeakMap,h=new WeakMap,u=new WeakMap,r=new WeakSet,P=function(){e(this,h).length>1?this.classList.add("has-length"):this.classList.remove("has-length")},I=function(){e(this,m).current!==!1&&e(this,y).call(this)},v=new WeakMap,y=new WeakMap,x=function(t){o(this,u,D.loopNumber(t,e(this,h).length)),e(this,h).forEach((l,a)=>{a===e(this,u)?l.classList.add("current"):l.classList.remove("current")}),j.dispatchEvent(this,"billboardChange",{detail:{counter:e(this,u)}})},S=new WeakMap;customElements.get("e-billboard")||customElements.define("e-billboard",q);var c,b,k,p;class H extends HTMLElement{constructor(){super(...arguments);n(this,c,null);n(this,b,[]);n(this,k,t=>{const l=t.currentTarget,a=e(this,b).findIndex(B=>B===l);a>=0&&e(this,c).set(a)});n(this,p,()=>{e(this,b).forEach((t,l)=>{l===e(this,c).counter?t.classList.add("current"):t.classList.remove("current")})})}connectedCallback(){o(this,c,M.findParentElement(this,q)),e(this,c)&&customElements.whenDefined("e-billboard").then(()=>{var t;if(this.isConnected){const l=e(this,c).itemElements.length;for(let a=0;a<l;a++){const B=document.createElement("button");e(this,b).push(B),this.appendChild(B)}e(this,b).forEach(a=>{a.addEventListener("click",e(this,k))}),(t=e(this,c))==null||t.addEventListener("billboardChange",e(this,p)),e(this,p).call(this)}})}disconnectedCallback(){var t;e(this,b).forEach(l=>{l.removeEventListener("click",e(this,k))}),(t=e(this,c))==null||t.removeEventListener("billboardChange",e(this,p)),this.innerHTML="",o(this,b,[])}}c=new WeakMap,b=new WeakMap,k=new WeakMap,p=new WeakMap;C.isBrowser&&!customElements.get("e-billboard-bullets")&&customElements.define("e-billboard-bullets",H);var g,L;class _ extends HTMLElement{constructor(){super();n(this,g,new A.CSSProperty(this,"--step",1));n(this,L,null);this.addEventListener("click",()=>{e(this,L)&&e(this,L).shift(e(this,g).current)})}connectedCallback(){this.tabIndex=0,o(this,L,M.findParentElement(this,q)),e(this,g).observe()}disconnectedCallback(){this.removeAttribute("tabindex"),e(this,g).unobserve()}}g=new WeakMap,L=new WeakMap;C.isBrowser&&!customElements.get("e-billboard-step-button")&&customElements.define("e-billboard-step-button",_);exports.BillboardBulletsElement=H;exports.BillboardElement=q;exports.BillboardStepButtonElement=_;
@@ -1,100 +1,105 @@
1
- var A = (s) => {
1
+ var H = (s) => {
2
2
  throw TypeError(s);
3
3
  };
4
- var w = (s, i, e) => i.has(s) || A("Cannot " + e);
5
- var t = (s, i, e) => (w(s, i, "read from private field"), e ? e.call(s) : i.get(s)), n = (s, i, e) => i.has(s) ? A("Cannot add the same private member more than once") : i instanceof WeakSet ? i.add(s) : i.set(s, e), c = (s, i, e, l) => (w(s, i, "write to private field"), l ? l.call(s, e) : i.set(s, e), e), f = (s, i, e) => (w(s, i, "access private method"), e);
6
- import { a as S, i as H } from "../index-euf5anj6.js";
7
- import { b as M } from "../dom-CVWzyXPH.js";
8
- import { CSSProperty as P } from "../css-property/index.js";
9
- import { d as q } from "../events-CsVF98U6.js";
10
- import { l as D } from "../number-DwCxt_Ck.js";
11
- var b, u, E, m, o, h, I, p, y, x, B;
12
- class T extends HTMLElement {
4
+ var w = (s, i, e) => i.has(s) || H("Cannot " + e);
5
+ var t = (s, i, e) => (w(s, i, "read from private field"), e ? e.call(s) : i.get(s)), n = (s, i, e) => i.has(s) ? H("Cannot add the same private member more than once") : i instanceof WeakSet ? i.add(s) : i.set(s, e), o = (s, i, e, l) => (w(s, i, "write to private field"), l ? l.call(s, e) : i.set(s, e), e), d = (s, i, e) => (w(s, i, "access private method"), e);
6
+ import { a as S, i as M } from "../index-euf5anj6.js";
7
+ import { b as P } from "../dom-CVWzyXPH.js";
8
+ import { CSSProperty as q } from "../css-property/index.js";
9
+ import { d as D } from "../events-CsVF98U6.js";
10
+ import { l as F } from "../number-DwCxt_Ck.js";
11
+ var m, f, E, h, b, r, T, I, p, y, x, B;
12
+ class A extends HTMLElement {
13
13
  constructor() {
14
14
  super(...arguments);
15
- n(this, h);
16
- n(this, b, new P(this, "--autoplay", !1));
17
- n(this, u);
15
+ n(this, r);
16
+ n(this, m, new q(this, "--autoplay", !1));
17
+ n(this, f);
18
18
  n(this, E, !1);
19
- n(this, m, []);
20
- n(this, o, 0);
19
+ n(this, h, []);
20
+ n(this, b, 0);
21
21
  n(this, p, (e) => {
22
- c(this, E, e.isIntersecting), t(this, E) ? f(this, h, I).call(this) : clearInterval(t(this, u));
22
+ o(this, E, e.isIntersecting), t(this, E) ? d(this, r, I).call(this) : clearInterval(t(this, f));
23
23
  });
24
24
  n(this, y, () => {
25
- clearInterval(t(this, u)), t(this, E) && c(this, u, setInterval(
25
+ clearInterval(t(this, f)), t(this, E) && o(this, f, setInterval(
26
26
  t(this, B),
27
- parseFloat(t(this, b).current || "0") * 1e3
27
+ parseFloat(t(this, m).current || "0") * 1e3
28
28
  ));
29
29
  });
30
30
  n(this, B, () => {
31
- f(this, h, x).call(this, t(this, o) + 1);
31
+ d(this, r, x).call(this, t(this, b) + 1);
32
32
  });
33
33
  }
34
34
  get counter() {
35
- return t(this, o);
35
+ return t(this, b);
36
36
  }
37
37
  get itemElements() {
38
- return t(this, m);
38
+ return t(this, h);
39
+ }
40
+ addItem(e) {
41
+ t(this, h).push(e), d(this, r, T).call(this);
39
42
  }
40
43
  set(e) {
41
- f(this, h, x).call(this, e), f(this, h, I).call(this);
44
+ d(this, r, x).call(this, e), d(this, r, I).call(this);
42
45
  }
43
46
  shift(e) {
44
- this.set(t(this, o) + e);
47
+ this.set(t(this, b) + e);
45
48
  }
46
49
  connectedCallback() {
47
50
  var e;
48
- c(this, m, [
51
+ o(this, h, [
49
52
  ...this.querySelectorAll("[data-billboard-item]")
50
- ]), (e = t(this, m)[0]) == null || e.classList.add("current"), t(this, b).subscribe((l) => {
51
- l.current ? (S.subscribe(this, t(this, p)), f(this, h, I).call(this)) : (c(this, E, !0), S.unsubscribe(t(this, p)), clearInterval(t(this, u)), f(this, h, x).call(this, 0));
52
- }), t(this, b).observe();
53
+ ]), (e = t(this, h)[0]) == null || e.classList.add("current"), d(this, r, T).call(this), t(this, m).subscribe((l) => {
54
+ l.current ? (S.subscribe(this, t(this, p)), d(this, r, I).call(this)) : (o(this, E, !0), S.unsubscribe(t(this, p)), clearInterval(t(this, f)), d(this, r, x).call(this, 0));
55
+ }), t(this, m).observe();
53
56
  }
54
57
  disconnectedCallback() {
55
- t(this, b).unobserve(), S.unsubscribe(t(this, p)), clearInterval(t(this, u));
58
+ t(this, m).unobserve(), S.unsubscribe(t(this, p)), clearInterval(t(this, f));
56
59
  }
57
60
  }
58
- b = new WeakMap(), u = new WeakMap(), E = new WeakMap(), m = new WeakMap(), o = new WeakMap(), h = new WeakSet(), I = function() {
59
- t(this, b).current !== !1 && t(this, y).call(this);
61
+ m = new WeakMap(), f = new WeakMap(), E = new WeakMap(), h = new WeakMap(), b = new WeakMap(), r = new WeakSet(), T = function() {
62
+ t(this, h).length > 1 ? this.classList.add("has-length") : this.classList.remove("has-length");
63
+ }, I = function() {
64
+ t(this, m).current !== !1 && t(this, y).call(this);
60
65
  }, p = new WeakMap(), y = new WeakMap(), x = function(e) {
61
- c(this, o, D(e, t(this, m).length)), t(this, m).forEach((l, a) => {
62
- a === t(this, o) ? l.classList.add("current") : l.classList.remove("current");
63
- }), q(this, "billboardChange", {
66
+ o(this, b, F(e, t(this, h).length)), t(this, h).forEach((l, c) => {
67
+ c === t(this, b) ? l.classList.add("current") : l.classList.remove("current");
68
+ }), D(this, "billboardChange", {
64
69
  detail: {
65
- counter: t(this, o)
70
+ counter: t(this, b)
66
71
  }
67
72
  });
68
73
  }, B = new WeakMap();
69
- customElements.get("e-billboard") || customElements.define("e-billboard", T);
70
- var r, d, C, v;
71
- class F extends HTMLElement {
74
+ customElements.get("e-billboard") || customElements.define("e-billboard", A);
75
+ var a, u, C, v;
76
+ class N extends HTMLElement {
72
77
  constructor() {
73
78
  super(...arguments);
74
- n(this, r, null);
75
- n(this, d, []);
79
+ n(this, a, null);
80
+ n(this, u, []);
76
81
  n(this, C, (e) => {
77
- const l = e.currentTarget, a = t(this, d).findIndex((k) => k === l);
78
- a >= 0 && t(this, r).set(a);
82
+ const l = e.currentTarget, c = t(this, u).findIndex((k) => k === l);
83
+ c >= 0 && t(this, a).set(c);
79
84
  });
80
85
  n(this, v, () => {
81
- t(this, d).forEach((e, l) => {
82
- l === t(this, r).counter ? e.classList.add("current") : e.classList.remove("current");
86
+ t(this, u).forEach((e, l) => {
87
+ l === t(this, a).counter ? e.classList.add("current") : e.classList.remove("current");
83
88
  });
84
89
  });
85
90
  }
86
91
  connectedCallback() {
87
- c(this, r, M(this, T)), t(this, r) && customElements.whenDefined("e-billboard").then(() => {
92
+ o(this, a, P(this, A)), t(this, a) && customElements.whenDefined("e-billboard").then(() => {
88
93
  var e;
89
94
  if (this.isConnected) {
90
- const l = t(this, r).itemElements.length;
91
- for (let a = 0; a < l; a++) {
95
+ const l = t(this, a).itemElements.length;
96
+ for (let c = 0; c < l; c++) {
92
97
  const k = document.createElement("button");
93
- t(this, d).push(k), this.appendChild(k);
98
+ t(this, u).push(k), this.appendChild(k);
94
99
  }
95
- t(this, d).forEach((a) => {
96
- a.addEventListener("click", t(this, C));
97
- }), (e = t(this, r)) == null || e.addEventListener(
100
+ t(this, u).forEach((c) => {
101
+ c.addEventListener("click", t(this, C));
102
+ }), (e = t(this, a)) == null || e.addEventListener(
98
103
  "billboardChange",
99
104
  t(this, v)
100
105
  ), t(this, v).call(this);
@@ -103,37 +108,37 @@ class F extends HTMLElement {
103
108
  }
104
109
  disconnectedCallback() {
105
110
  var e;
106
- t(this, d).forEach((l) => {
111
+ t(this, u).forEach((l) => {
107
112
  l.removeEventListener("click", t(this, C));
108
- }), (e = t(this, r)) == null || e.removeEventListener(
113
+ }), (e = t(this, a)) == null || e.removeEventListener(
109
114
  "billboardChange",
110
115
  t(this, v)
111
- ), this.innerHTML = "", c(this, d, []);
116
+ ), this.innerHTML = "", o(this, u, []);
112
117
  }
113
118
  }
114
- r = new WeakMap(), d = new WeakMap(), C = new WeakMap(), v = new WeakMap();
115
- H && !customElements.get("e-billboard-bullets") && customElements.define("e-billboard-bullets", F);
119
+ a = new WeakMap(), u = new WeakMap(), C = new WeakMap(), v = new WeakMap();
120
+ M && !customElements.get("e-billboard-bullets") && customElements.define("e-billboard-bullets", N);
116
121
  var L, g;
117
- class N extends HTMLElement {
122
+ class j extends HTMLElement {
118
123
  constructor() {
119
124
  super();
120
- n(this, L, new P(this, "--step", 1));
125
+ n(this, L, new q(this, "--step", 1));
121
126
  n(this, g, null);
122
127
  this.addEventListener("click", () => {
123
128
  t(this, g) && t(this, g).shift(t(this, L).current);
124
129
  });
125
130
  }
126
131
  connectedCallback() {
127
- this.tabIndex = 0, c(this, g, M(this, T)), t(this, L).observe();
132
+ this.tabIndex = 0, o(this, g, P(this, A)), t(this, L).observe();
128
133
  }
129
134
  disconnectedCallback() {
130
135
  this.removeAttribute("tabindex"), t(this, L).unobserve();
131
136
  }
132
137
  }
133
138
  L = new WeakMap(), g = new WeakMap();
134
- H && !customElements.get("e-billboard-step-button") && customElements.define("e-billboard-step-button", N);
139
+ M && !customElements.get("e-billboard-step-button") && customElements.define("e-billboard-step-button", j);
135
140
  export {
136
- F as BillboardBulletsElement,
137
- T as BillboardElement,
138
- N as BillboardStepButtonElement
141
+ N as BillboardBulletsElement,
142
+ A as BillboardElement,
143
+ j as BillboardStepButtonElement
139
144
  };
@@ -1 +1 @@
1
- "use strict";var G=n=>{throw TypeError(n)};var N=(n,c,t)=>c.has(n)||G("Cannot "+t);var e=(n,c,t)=>(N(n,c,"read from private field"),t?t.call(n):c.get(n)),s=(n,c,t)=>c.has(n)?G("Cannot add the same private member more than once"):c instanceof WeakSet?c.add(n):c.set(n,t),i=(n,c,t,h)=>(N(n,c,"write to private field"),h?h.call(n,t):c.set(n,t),t),v=(n,c,t)=>(N(n,c,"access private method"),t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const E=require("../css-property/index.cjs"),Y=require("../Store-DRp_K37w.cjs"),U=require("../index-Cqw2NKev.cjs"),B=require("../events-KVanG9sR.cjs"),Z=require("../function-MthRj-GJ.cjs"),ee=require("../style-At6aDoqG.cjs"),J=require("../url-CLvdjbII.cjs"),K=require("../window-resizer/index.cjs");var C,d,O,w,u,m,p,g,f,y,b,S,l,Q,T,I,A,W,k,_,R,x,D;const a=class a extends HTMLElement{constructor(){super(...arguments);s(this,l);s(this,C);s(this,d);s(this,O);s(this,w);s(this,u);s(this,m);s(this,p);s(this,g);s(this,f);s(this,y);s(this,b);s(this,S);s(this,T);s(this,A);s(this,k);s(this,_);s(this,R);s(this,x);this.urlValue="",i(this,C,-1),i(this,d,new Y.Store(!1)),i(this,u,new E.CSSProperty(this,"--history",!1)),i(this,m,new E.CSSProperty(this,"--restore",!1)),i(this,p,new E.CSSProperty(this,"--dominance",0)),i(this,g,new E.CSSProperty(this,"--group","")),i(this,f,new E.CSSProperty(this,"--click-outside",!1)),i(this,y,new E.CSSProperty(this,"--escape",!1)),i(this,b,!1),this.open=t=>{if(e(this,d).current)return;i(this,S,t==null?void 0:t.trigger),e(this,p).current&&(a.__opened=a.__opened.filter(o=>o!==this&&v(this,l,D).call(this,this,o)?(o.close(),!1):!0)),a.__opened.push(this),i(this,C,a.__opened.length-1),clearTimeout(e(this,O)),this.classList.remove("closing"),this.classList.add("triggered"),this.style.display="block",B.dispatchEvent(this,"popoverTriggered",{custom:!0,detail:{trigger:e(this,S)}}),e(this,u).current&&e(this,b)&&history.pushState(history.state,"",e(this,l,Q)),e(this,d).current=!0;const h=()=>{addEventListener("click",e(this,T)),addEventListener("keydown",e(this,A)),e(this,x).call(this),this.style.opacity="1",this.classList.add("opened"),B.dispatchEvent(this,"popoverOpened",{custom:!0,detail:{trigger:e(this,S)}}),i(this,w,void 0),this.setAttribute("aria-hidden","false")};t!=null&&t.skipTransition?h():i(this,w,setTimeout(h,10))},this.close=()=>{e(this,d).current&&(removeEventListener("click",e(this,T)),removeEventListener("keydown",e(this,A)),e(this,d).current=!1,a.__opened=a.__opened.filter(t=>t===this?!1:!e(t,w)&&v(this,l,D).call(this,this,t)?(t.close(),!1):!0),v(this,l,I).call(this),this.classList.remove("opened"),this.classList.add("closing"),this.setAttribute("aria-hidden","true"),this.style.opacity="0",B.dispatchEvent(this,"popoverClosing",{custom:!0}),setTimeout(()=>{this.classList.remove("triggered"),this.classList.remove("closing"),this.style.display="none",B.dispatchEvent(this,"popoverClosed",{custom:!0})},ee.getElementTransitionDurationMS(this)+10))},i(this,T,t=>{e(this,f).current&&v(this,l,W).call(this,()=>{var j;const h=t.composedPath();if(h.find(F=>F instanceof HTMLElement&&F.hasAttribute("data-popover-content")))return;const o=h[0],z=o instanceof Node&&(this.contains(o)||((j=this.shadowRoot)==null?void 0:j.contains(o))),P=o instanceof HTMLElement&&o.hasAttribute("data-outside");(!z||P)&&this.close()})}),i(this,A,t=>{e(this,y).current&&v(this,l,W).call(this,()=>{t.code==="Escape"&&this.close()})}),i(this,k,()=>{i(this,b,!1),e(this,d).current&&e(this,u).current&&!location.search.includes(this.id)?this.close():!e(this,d).current&&e(this,u).current&&location.search.includes(this.id)&&this.open({trigger:this.idWithValue}),i(this,b,!0)}),i(this,_,()=>{this.style.setProperty("--content-width","initial"),this.style.setProperty("--content-height","initial"),e(this,R).call(this)}),i(this,R,Z.debounce(()=>{e(this,x).call(this)},10)),i(this,x,()=>{this.style.setProperty("--content-width",this.scrollWidth+"px"),this.style.setProperty("--content-height",this.scrollHeight+"px")})}get history(){return e(this,u)}get restore(){return e(this,m)}get dominance(){return e(this,p)}get group(){return e(this,g)}get clickOutside(){return e(this,f)}get escape(){return e(this,y)}get opened(){return e(this,d)}get lastTrigger(){return e(this,S)}get idWithValue(){return`${this.id}${this.urlValue?"="+this.urlValue:""}`}updateUrlValue(t){this.urlValue=(t==null?void 0:t.toString())||"",e(this,d).current&&J.updateSearchParameter(this.id,t)}connectedCallback(){e(this,u).observe(),e(this,m).observe(),e(this,p).observe(),e(this,g).observe(),e(this,f).observe(),e(this,y).observe(),this.style.opacity="0",this.style.display="none",this.setAttribute("role","dialog"),this.setAttribute("aria-hidden","true"),this.classList.remove("closing"),this.classList.remove("closed"),this.classList.remove("triggered"),this.classList.remove("opened"),addEventListener("popstate",e(this,k)),setTimeout(()=>{e(this,m).current?(this.urlValue=J.parseSearchParameters(location.search)[this.id],e(this,k).call(this)):(v(this,l,I).call(this),i(this,b,!0))},0),K.windowResizer.subscribe(e(this,_))}disconnectedCallback(){K.windowResizer.unsubscribe(e(this,_)),e(this,u).close(),e(this,m).close(),e(this,p).close(),e(this,g).close(),e(this,f).close(),e(this,y).close(),this.style.opacity="",this.style.display="",this.removeAttribute("role"),this.removeAttribute("aria-hidden"),a.__opened=a.__opened.filter(t=>t!==this),clearTimeout(e(this,O)),clearTimeout(e(this,w)),removeEventListener("popstate",e(this,k)),removeEventListener("click",e(this,T)),removeEventListener("keydown",e(this,A)),this.style.removeProperty("--content-width"),this.style.removeProperty("--content-height"),v(this,l,I).call(this)}};C=new WeakMap,d=new WeakMap,O=new WeakMap,w=new WeakMap,u=new WeakMap,m=new WeakMap,p=new WeakMap,g=new WeakMap,f=new WeakMap,y=new WeakMap,b=new WeakMap,S=new WeakMap,l=new WeakSet,Q=function(){return`${location.pathname}${location.search?location.search+"&":"?"}${this.idWithValue}`},T=new WeakMap,I=function(){if(e(this,u).current){const t=new URL(location.href);t.searchParams.delete(this.id),history.replaceState(history.state,"",t.href)}},A=new WeakMap,W=function(t){(a.__opened[e(this,C)-1]||a.__opened.length===1||a.__opened.filter(h=>h!==this).every(h=>e(this,p).current>h.dominance.current))&&t()},k=new WeakMap,_=new WeakMap,R=new WeakMap,x=new WeakMap,D=function(t,h){if(e(t,g).current===e(h,g).current&&t.dominance.current>=h.dominance.current)return!0},a.__opened=[];let q=a;U.isBrowser&&!customElements.get("e-popover")&&customElements.define("e-popover",q);var r,L,V,M,$,H;class X extends HTMLElement{constructor(){super();s(this,r);s(this,L,new E.CSSProperty(this,"--type","open"));s(this,V,()=>{this.classList.add("triggered")});s(this,M,()=>{this.classList.add("opened"),this.setAttribute("aria-expanded","true")});s(this,$,()=>{this.classList.remove("opened")});s(this,H,()=>{this.classList.remove("triggered"),this.setAttribute("aria-expanded","false")});U.isBrowser&&(this.addEventListener("click",()=>{if(e(this,r)){const t=e(this,L).current;t==="open"||t==="toggle"&&!e(this,r).opened.current?e(this,r).open({trigger:this}):(t==="close"||t==="toggle"&&e(this,r).opened.current)&&e(this,r).close()}}),this.addEventListener("keydown",t=>{t.code==="Space"&&t.currentTarget.click()}))}get type(){return e(this,L)}get popoverElement(){return e(this,r)}connectedCallback(){var h;e(this,L).subscribe(o=>{e(this,r)instanceof q&&(o.current!=="close"?(this.setAttribute("aria-haspopup","true"),this.setAttribute("aria-expanded",e(this,r).opened.current?"true":"false"),this.setAttribute("aria-controls",e(this,r).id||"")):(this.removeAttribute("aria-haspopup"),this.removeAttribute("aria-expanded"),this.removeAttribute("aria-controls")))}),this.hasAttribute("tabindex")||(this.tabIndex=0);const t=this.getAttribute("target");if(t){let o=null;if(t==="parent"){const z=this.closest("[popover-target]");if(z)o=z;else{const P=this.getRootNode();P instanceof ShadowRoot?o=P.host.closest("[popover-target]"):P instanceof HTMLElement&&(o=P.closest("[popover-target]"))}}else t==="sibling"?o=(h=this.parentElement)==null?void 0:h.querySelector("[popover-target]"):o=document.querySelector(`#${t}`)||this.getRootNode().querySelector(`#${t}`);o instanceof HTMLElement?(i(this,r,o),e(this,r).addEventListener("popoverTriggered",e(this,V)),e(this,r).addEventListener("popoverOpened",e(this,M)),e(this,r).addEventListener("popoverClosing",e(this,$)),e(this,r).addEventListener("popoverClosed",e(this,H))):console.warn(this,`target ${t} not found`)}this.isConnected&&e(this,L).observe()}disconnectedCallback(){e(this,L).unobserve(),this.removeAttribute("aria-haspopup"),this.removeAttribute("aria-expanded"),this.removeAttribute("aria-controls"),e(this,r)&&(e(this,r).removeEventListener("popoverTriggered",e(this,V)),e(this,r).removeEventListener("popoverOpened",e(this,M)),e(this,r).removeEventListener("popoverClosing",e(this,$)),e(this,r).removeEventListener("popoverClosed",e(this,H)))}}r=new WeakMap,L=new WeakMap,V=new WeakMap,M=new WeakMap,$=new WeakMap,H=new WeakMap;U.isBrowser&&!customElements.get("e-popover-button")&&customElements.define("e-popover-button",X);exports.PopoverButtonElement=X;exports.PopoverElement=q;
1
+ "use strict";var G=n=>{throw TypeError(n)};var N=(n,c,t)=>c.has(n)||G("Cannot "+t);var e=(n,c,t)=>(N(n,c,"read from private field"),t?t.call(n):c.get(n)),s=(n,c,t)=>c.has(n)?G("Cannot add the same private member more than once"):c instanceof WeakSet?c.add(n):c.set(n,t),i=(n,c,t,h)=>(N(n,c,"write to private field"),h?h.call(n,t):c.set(n,t),t),v=(n,c,t)=>(N(n,c,"access private method"),t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const E=require("../css-property/index.cjs"),Y=require("../Store-DRp_K37w.cjs"),U=require("../index-Cqw2NKev.cjs"),B=require("../events-KVanG9sR.cjs"),Z=require("../function-MthRj-GJ.cjs"),ee=require("../style-At6aDoqG.cjs"),J=require("../url-CLvdjbII.cjs"),K=require("../window-resizer/index.cjs");var S,d,O,w,u,m,p,g,f,y,b,T,l,Q,P,I,A,W,k,x,R,_,D;const a=class a extends HTMLElement{constructor(){super(...arguments);s(this,l);s(this,S);s(this,d);s(this,O);s(this,w);s(this,u);s(this,m);s(this,p);s(this,g);s(this,f);s(this,y);s(this,b);s(this,T);s(this,P);s(this,A);s(this,k);s(this,x);s(this,R);s(this,_);this.urlValue="",i(this,S,-1),i(this,d,new Y.Store(!1)),i(this,u,new E.CSSProperty(this,"--history",!1)),i(this,m,new E.CSSProperty(this,"--restore",!1)),i(this,p,new E.CSSProperty(this,"--dominance",0)),i(this,g,new E.CSSProperty(this,"--group","")),i(this,f,new E.CSSProperty(this,"--click-outside",!1)),i(this,y,new E.CSSProperty(this,"--escape",!1)),i(this,b,!1),this.open=t=>{if(e(this,d).current)return;i(this,T,t==null?void 0:t.trigger),e(this,p).current&&(a.__opened=a.__opened.filter(o=>o!==this&&v(this,l,D).call(this,this,o)?(o.close(),!1):!0)),a.__opened.push(this),i(this,S,a.__opened.length-1),this.style.setProperty("--open-index",e(this,S).toString()),clearTimeout(e(this,O)),this.classList.remove("closing"),this.classList.add("triggered"),this.style.display="block",B.dispatchEvent(this,"popoverTriggered",{custom:!0,detail:{trigger:e(this,T)}}),e(this,u).current&&e(this,b)&&history.pushState(history.state,"",e(this,l,Q)),e(this,d).current=!0;const h=()=>{addEventListener("click",e(this,P)),addEventListener("keydown",e(this,A)),e(this,_).call(this),this.style.opacity="1",this.classList.add("opened"),B.dispatchEvent(this,"popoverOpened",{custom:!0,detail:{trigger:e(this,T)}}),i(this,w,void 0),this.setAttribute("aria-hidden","false")};t!=null&&t.skipTransition?h():i(this,w,setTimeout(h,10))},this.close=()=>{e(this,d).current&&(removeEventListener("click",e(this,P)),removeEventListener("keydown",e(this,A)),e(this,d).current=!1,a.__opened=a.__opened.filter(t=>t===this?!1:!e(t,w)&&v(this,l,D).call(this,this,t)?(t.close(),!1):!0),v(this,l,I).call(this),this.classList.remove("opened"),this.classList.add("closing"),this.setAttribute("aria-hidden","true"),this.style.opacity="0",B.dispatchEvent(this,"popoverClosing",{custom:!0}),setTimeout(()=>{this.classList.remove("triggered"),this.classList.remove("closing"),this.style.display="none",this.style.removeProperty("--open-index"),B.dispatchEvent(this,"popoverClosed",{custom:!0})},ee.getElementTransitionDurationMS(this)+10))},i(this,P,t=>{e(this,f).current&&v(this,l,W).call(this,()=>{var j;const h=t.composedPath();if(h.find(F=>F instanceof HTMLElement&&F.hasAttribute("data-popover-content")))return;const o=h[0],z=o instanceof Node&&(this.contains(o)||((j=this.shadowRoot)==null?void 0:j.contains(o))),C=o instanceof HTMLElement&&o.hasAttribute("data-outside");(!z||C)&&this.close()})}),i(this,A,t=>{e(this,y).current&&v(this,l,W).call(this,()=>{t.code==="Escape"&&this.close()})}),i(this,k,()=>{i(this,b,!1),e(this,d).current&&e(this,u).current&&!location.search.includes(this.id)?this.close():!e(this,d).current&&e(this,u).current&&location.search.includes(this.id)&&this.open({trigger:this.idWithValue}),i(this,b,!0)}),i(this,x,()=>{this.style.setProperty("--content-width","initial"),this.style.setProperty("--content-height","initial"),e(this,R).call(this)}),i(this,R,Z.debounce(()=>{e(this,_).call(this)},10)),i(this,_,()=>{this.style.setProperty("--content-width",this.scrollWidth+"px"),this.style.setProperty("--content-height",this.scrollHeight+"px")})}get history(){return e(this,u)}get restore(){return e(this,m)}get dominance(){return e(this,p)}get group(){return e(this,g)}get clickOutside(){return e(this,f)}get escape(){return e(this,y)}get opened(){return e(this,d)}get lastTrigger(){return e(this,T)}get idWithValue(){return`${this.id}${this.urlValue?"="+this.urlValue:""}`}updateUrlValue(t){this.urlValue=(t==null?void 0:t.toString())||"",e(this,d).current&&J.updateSearchParameter(this.id,t)}connectedCallback(){e(this,u).observe(),e(this,m).observe(),e(this,p).observe(),e(this,g).observe(),e(this,f).observe(),e(this,y).observe(),this.style.opacity="0",this.style.display="none",this.setAttribute("role","dialog"),this.setAttribute("aria-hidden","true"),this.classList.remove("closing"),this.classList.remove("closed"),this.classList.remove("triggered"),this.classList.remove("opened"),addEventListener("popstate",e(this,k)),setTimeout(()=>{e(this,m).current?(this.urlValue=J.parseSearchParameters(location.search)[this.id],e(this,k).call(this)):(v(this,l,I).call(this),i(this,b,!0))},0),K.windowResizer.subscribe(e(this,x))}disconnectedCallback(){K.windowResizer.unsubscribe(e(this,x)),e(this,u).close(),e(this,m).close(),e(this,p).close(),e(this,g).close(),e(this,f).close(),e(this,y).close(),this.style.opacity="",this.style.display="",this.removeAttribute("role"),this.removeAttribute("aria-hidden"),a.__opened=a.__opened.filter(t=>t!==this),clearTimeout(e(this,O)),clearTimeout(e(this,w)),removeEventListener("popstate",e(this,k)),removeEventListener("click",e(this,P)),removeEventListener("keydown",e(this,A)),this.style.removeProperty("--content-width"),this.style.removeProperty("--content-height"),v(this,l,I).call(this)}};S=new WeakMap,d=new WeakMap,O=new WeakMap,w=new WeakMap,u=new WeakMap,m=new WeakMap,p=new WeakMap,g=new WeakMap,f=new WeakMap,y=new WeakMap,b=new WeakMap,T=new WeakMap,l=new WeakSet,Q=function(){return`${location.pathname}${location.search?location.search+"&":"?"}${this.idWithValue}`},P=new WeakMap,I=function(){if(e(this,u).current){const t=new URL(location.href);t.searchParams.delete(this.id),history.replaceState(history.state,"",t.href)}},A=new WeakMap,W=function(t){(a.__opened[e(this,S)-1]||a.__opened.length===1||a.__opened.filter(h=>h!==this).every(h=>e(this,p).current>h.dominance.current))&&t()},k=new WeakMap,x=new WeakMap,R=new WeakMap,_=new WeakMap,D=function(t,h){if(e(t,g).current===e(h,g).current&&t.dominance.current>=h.dominance.current)return!0},a.__opened=[];let q=a;U.isBrowser&&!customElements.get("e-popover")&&customElements.define("e-popover",q);var r,L,V,M,$,H;class X extends HTMLElement{constructor(){super();s(this,r);s(this,L,new E.CSSProperty(this,"--type","open"));s(this,V,()=>{this.classList.add("triggered")});s(this,M,()=>{this.classList.add("opened"),this.setAttribute("aria-expanded","true")});s(this,$,()=>{this.classList.remove("opened")});s(this,H,()=>{this.classList.remove("triggered"),this.setAttribute("aria-expanded","false")});U.isBrowser&&(this.addEventListener("click",()=>{if(e(this,r)){const t=e(this,L).current;t==="open"||t==="toggle"&&!e(this,r).opened.current?e(this,r).open({trigger:this}):(t==="close"||t==="toggle"&&e(this,r).opened.current)&&e(this,r).close()}}),this.addEventListener("keydown",t=>{t.code==="Space"&&t.currentTarget.click()}))}get type(){return e(this,L)}get popoverElement(){return e(this,r)}connectedCallback(){var h;e(this,L).subscribe(o=>{e(this,r)instanceof q&&(o.current!=="close"?(this.setAttribute("aria-haspopup","true"),this.setAttribute("aria-expanded",e(this,r).opened.current?"true":"false"),this.setAttribute("aria-controls",e(this,r).id||"")):(this.removeAttribute("aria-haspopup"),this.removeAttribute("aria-expanded"),this.removeAttribute("aria-controls")))}),this.hasAttribute("tabindex")||(this.tabIndex=0);const t=this.getAttribute("target");if(t){let o=null;if(t==="parent"){const z=this.closest("[popover-target]");if(z)o=z;else{const C=this.getRootNode();C instanceof ShadowRoot?o=C.host.closest("[popover-target]"):C instanceof HTMLElement&&(o=C.closest("[popover-target]"))}}else t==="sibling"?o=(h=this.parentElement)==null?void 0:h.querySelector("[popover-target]"):o=document.querySelector(`#${t}`)||this.getRootNode().querySelector(`#${t}`);o instanceof HTMLElement?(i(this,r,o),e(this,r).addEventListener("popoverTriggered",e(this,V)),e(this,r).addEventListener("popoverOpened",e(this,M)),e(this,r).addEventListener("popoverClosing",e(this,$)),e(this,r).addEventListener("popoverClosed",e(this,H))):console.warn(this,`target ${t} not found`)}this.isConnected&&e(this,L).observe()}disconnectedCallback(){e(this,L).unobserve(),this.removeAttribute("aria-haspopup"),this.removeAttribute("aria-expanded"),this.removeAttribute("aria-controls"),e(this,r)&&(e(this,r).removeEventListener("popoverTriggered",e(this,V)),e(this,r).removeEventListener("popoverOpened",e(this,M)),e(this,r).removeEventListener("popoverClosing",e(this,$)),e(this,r).removeEventListener("popoverClosed",e(this,H)))}}r=new WeakMap,L=new WeakMap,V=new WeakMap,M=new WeakMap,$=new WeakMap,H=new WeakMap;U.isBrowser&&!customElements.get("e-popover-button")&&customElements.define("e-popover-button",X);exports.PopoverButtonElement=X;exports.PopoverElement=q;
@@ -11,15 +11,15 @@ import { d as X } from "../function-C10DGppn.js";
11
11
  import { g as Y } from "../style-j2TwriJ_.js";
12
12
  import { u as Z, p as ee } from "../url-CfcHdBT6.js";
13
13
  import { windowResizer as J } from "../window-resizer/index.js";
14
- var x, d, V, T, p, v, u, g, f, y, L, w, l, K, A, N, k, B, S, _, O, P, D;
14
+ var T, d, V, w, p, v, u, g, f, y, L, A, l, K, k, N, S, B, x, P, O, _, D;
15
15
  const c = class c extends HTMLElement {
16
16
  constructor() {
17
17
  super(...arguments);
18
18
  s(this, l);
19
- s(this, x);
19
+ s(this, T);
20
20
  s(this, d);
21
21
  s(this, V);
22
- s(this, T);
22
+ s(this, w);
23
23
  s(this, p);
24
24
  s(this, v);
25
25
  s(this, u);
@@ -27,40 +27,40 @@ const c = class c extends HTMLElement {
27
27
  s(this, f);
28
28
  s(this, y);
29
29
  s(this, L);
30
- s(this, w);
31
30
  s(this, A);
32
31
  s(this, k);
33
32
  s(this, S);
34
- s(this, _);
35
- s(this, O);
33
+ s(this, x);
36
34
  s(this, P);
37
- this.urlValue = "", i(this, x, -1), i(this, d, new Q(!1)), i(this, p, new E(this, "--history", !1)), i(this, v, new E(this, "--restore", !1)), i(this, u, new E(this, "--dominance", 0)), i(this, g, new E(this, "--group", "")), i(this, f, new E(this, "--click-outside", !1)), i(this, y, new E(this, "--escape", !1)), i(this, L, !1), this.open = (t) => {
35
+ s(this, O);
36
+ s(this, _);
37
+ this.urlValue = "", i(this, T, -1), i(this, d, new Q(!1)), i(this, p, new E(this, "--history", !1)), i(this, v, new E(this, "--restore", !1)), i(this, u, new E(this, "--dominance", 0)), i(this, g, new E(this, "--group", "")), i(this, f, new E(this, "--click-outside", !1)), i(this, y, new E(this, "--escape", !1)), i(this, L, !1), this.open = (t) => {
38
38
  if (e(this, d).current)
39
39
  return;
40
- i(this, w, t == null ? void 0 : t.trigger), e(this, u).current && (c.__opened = c.__opened.filter((o) => o !== this && m(this, l, D).call(this, this, o) ? (o.close(), !1) : !0)), c.__opened.push(this), i(this, x, c.__opened.length - 1), clearTimeout(e(this, V)), this.classList.remove("closing"), this.classList.add("triggered"), this.style.display = "block", z(this, "popoverTriggered", {
40
+ i(this, A, t == null ? void 0 : t.trigger), e(this, u).current && (c.__opened = c.__opened.filter((o) => o !== this && m(this, l, D).call(this, this, o) ? (o.close(), !1) : !0)), c.__opened.push(this), i(this, T, c.__opened.length - 1), this.style.setProperty("--open-index", e(this, T).toString()), clearTimeout(e(this, V)), this.classList.remove("closing"), this.classList.add("triggered"), this.style.display = "block", z(this, "popoverTriggered", {
41
41
  custom: !0,
42
42
  detail: {
43
- trigger: e(this, w)
43
+ trigger: e(this, A)
44
44
  }
45
45
  }), e(this, p).current && e(this, L) && history.pushState(history.state, "", e(this, l, K)), e(this, d).current = !0;
46
46
  const h = () => {
47
- addEventListener("click", e(this, A)), addEventListener("keydown", e(this, k)), e(this, P).call(this), this.style.opacity = "1", this.classList.add("opened"), z(this, "popoverOpened", {
47
+ addEventListener("click", e(this, k)), addEventListener("keydown", e(this, S)), e(this, _).call(this), this.style.opacity = "1", this.classList.add("opened"), z(this, "popoverOpened", {
48
48
  custom: !0,
49
49
  detail: {
50
- trigger: e(this, w)
50
+ trigger: e(this, A)
51
51
  }
52
- }), i(this, T, void 0), this.setAttribute("aria-hidden", "false");
52
+ }), i(this, w, void 0), this.setAttribute("aria-hidden", "false");
53
53
  };
54
- t != null && t.skipTransition ? h() : i(this, T, setTimeout(h, 10));
54
+ t != null && t.skipTransition ? h() : i(this, w, setTimeout(h, 10));
55
55
  }, this.close = () => {
56
- e(this, d).current && (removeEventListener("click", e(this, A)), removeEventListener("keydown", e(this, k)), e(this, d).current = !1, c.__opened = c.__opened.filter((t) => t === this ? !1 : !e(t, T) && m(this, l, D).call(this, this, t) ? (t.close(), !1) : !0), m(this, l, N).call(this), this.classList.remove("opened"), this.classList.add("closing"), this.setAttribute("aria-hidden", "true"), this.style.opacity = "0", z(this, "popoverClosing", {
56
+ e(this, d).current && (removeEventListener("click", e(this, k)), removeEventListener("keydown", e(this, S)), e(this, d).current = !1, c.__opened = c.__opened.filter((t) => t === this ? !1 : !e(t, w) && m(this, l, D).call(this, this, t) ? (t.close(), !1) : !0), m(this, l, N).call(this), this.classList.remove("opened"), this.classList.add("closing"), this.setAttribute("aria-hidden", "true"), this.style.opacity = "0", z(this, "popoverClosing", {
57
57
  custom: !0
58
58
  }), setTimeout(() => {
59
- this.classList.remove("triggered"), this.classList.remove("closing"), this.style.display = "none", z(this, "popoverClosed", {
59
+ this.classList.remove("triggered"), this.classList.remove("closing"), this.style.display = "none", this.style.removeProperty("--open-index"), z(this, "popoverClosed", {
60
60
  custom: !0
61
61
  });
62
62
  }, Y(this) + 10));
63
- }, i(this, A, (t) => {
63
+ }, i(this, k, (t) => {
64
64
  e(this, f).current && m(this, l, B).call(this, () => {
65
65
  var j;
66
66
  const h = t.composedPath();
@@ -71,17 +71,17 @@ const c = class c extends HTMLElement {
71
71
  const o = h[0], I = o instanceof Node && (this.contains(o) || ((j = this.shadowRoot) == null ? void 0 : j.contains(o))), C = o instanceof HTMLElement && o.hasAttribute("data-outside");
72
72
  (!I || C) && this.close();
73
73
  });
74
- }), i(this, k, (t) => {
74
+ }), i(this, S, (t) => {
75
75
  e(this, y).current && m(this, l, B).call(this, () => {
76
76
  t.code === "Escape" && this.close();
77
77
  });
78
- }), i(this, S, () => {
78
+ }), i(this, x, () => {
79
79
  i(this, L, !1), e(this, d).current && e(this, p).current && !location.search.includes(this.id) ? this.close() : !e(this, d).current && e(this, p).current && location.search.includes(this.id) && this.open({ trigger: this.idWithValue }), i(this, L, !0);
80
- }), i(this, _, () => {
80
+ }), i(this, P, () => {
81
81
  this.style.setProperty("--content-width", "initial"), this.style.setProperty("--content-height", "initial"), e(this, O).call(this);
82
82
  }), i(this, O, X(() => {
83
- e(this, P).call(this);
84
- }, 10)), i(this, P, () => {
83
+ e(this, _).call(this);
84
+ }, 10)), i(this, _, () => {
85
85
  this.style.setProperty("--content-width", this.scrollWidth + "px"), this.style.setProperty("--content-height", this.scrollHeight + "px");
86
86
  });
87
87
  }
@@ -107,7 +107,7 @@ const c = class c extends HTMLElement {
107
107
  return e(this, d);
108
108
  }
109
109
  get lastTrigger() {
110
- return e(this, w);
110
+ return e(this, A);
111
111
  }
112
112
  get idWithValue() {
113
113
  return `${this.id}${this.urlValue ? "=" + this.urlValue : ""}`;
@@ -116,24 +116,24 @@ const c = class c extends HTMLElement {
116
116
  this.urlValue = (t == null ? void 0 : t.toString()) || "", e(this, d).current && Z(this.id, t);
117
117
  }
118
118
  connectedCallback() {
119
- e(this, p).observe(), e(this, v).observe(), e(this, u).observe(), e(this, g).observe(), e(this, f).observe(), e(this, y).observe(), this.style.opacity = "0", this.style.display = "none", this.setAttribute("role", "dialog"), this.setAttribute("aria-hidden", "true"), this.classList.remove("closing"), this.classList.remove("closed"), this.classList.remove("triggered"), this.classList.remove("opened"), addEventListener("popstate", e(this, S)), setTimeout(() => {
120
- e(this, v).current ? (this.urlValue = ee(location.search)[this.id], e(this, S).call(this)) : (m(this, l, N).call(this), i(this, L, !0));
121
- }, 0), J.subscribe(e(this, _));
119
+ e(this, p).observe(), e(this, v).observe(), e(this, u).observe(), e(this, g).observe(), e(this, f).observe(), e(this, y).observe(), this.style.opacity = "0", this.style.display = "none", this.setAttribute("role", "dialog"), this.setAttribute("aria-hidden", "true"), this.classList.remove("closing"), this.classList.remove("closed"), this.classList.remove("triggered"), this.classList.remove("opened"), addEventListener("popstate", e(this, x)), setTimeout(() => {
120
+ e(this, v).current ? (this.urlValue = ee(location.search)[this.id], e(this, x).call(this)) : (m(this, l, N).call(this), i(this, L, !0));
121
+ }, 0), J.subscribe(e(this, P));
122
122
  }
123
123
  disconnectedCallback() {
124
- J.unsubscribe(e(this, _)), e(this, p).close(), e(this, v).close(), e(this, u).close(), e(this, g).close(), e(this, f).close(), e(this, y).close(), this.style.opacity = "", this.style.display = "", this.removeAttribute("role"), this.removeAttribute("aria-hidden"), c.__opened = c.__opened.filter((t) => t !== this), clearTimeout(e(this, V)), clearTimeout(e(this, T)), removeEventListener("popstate", e(this, S)), removeEventListener("click", e(this, A)), removeEventListener("keydown", e(this, k)), this.style.removeProperty("--content-width"), this.style.removeProperty("--content-height"), m(this, l, N).call(this);
124
+ J.unsubscribe(e(this, P)), e(this, p).close(), e(this, v).close(), e(this, u).close(), e(this, g).close(), e(this, f).close(), e(this, y).close(), this.style.opacity = "", this.style.display = "", this.removeAttribute("role"), this.removeAttribute("aria-hidden"), c.__opened = c.__opened.filter((t) => t !== this), clearTimeout(e(this, V)), clearTimeout(e(this, w)), removeEventListener("popstate", e(this, x)), removeEventListener("click", e(this, k)), removeEventListener("keydown", e(this, S)), this.style.removeProperty("--content-width"), this.style.removeProperty("--content-height"), m(this, l, N).call(this);
125
125
  }
126
126
  };
127
- x = new WeakMap(), d = new WeakMap(), V = new WeakMap(), T = new WeakMap(), p = new WeakMap(), v = new WeakMap(), u = new WeakMap(), g = new WeakMap(), f = new WeakMap(), y = new WeakMap(), L = new WeakMap(), w = new WeakMap(), l = new WeakSet(), K = function() {
127
+ T = new WeakMap(), d = new WeakMap(), V = new WeakMap(), w = new WeakMap(), p = new WeakMap(), v = new WeakMap(), u = new WeakMap(), g = new WeakMap(), f = new WeakMap(), y = new WeakMap(), L = new WeakMap(), A = new WeakMap(), l = new WeakSet(), K = function() {
128
128
  return `${location.pathname}${location.search ? location.search + "&" : "?"}${this.idWithValue}`;
129
- }, A = new WeakMap(), N = function() {
129
+ }, k = new WeakMap(), N = function() {
130
130
  if (e(this, p).current) {
131
131
  const t = new URL(location.href);
132
132
  t.searchParams.delete(this.id), history.replaceState(history.state, "", t.href);
133
133
  }
134
- }, k = new WeakMap(), B = function(t) {
135
- (c.__opened[e(this, x) - 1] || c.__opened.length === 1 || c.__opened.filter((h) => h !== this).every((h) => e(this, u).current > h.dominance.current)) && t();
136
- }, S = new WeakMap(), _ = new WeakMap(), O = new WeakMap(), P = new WeakMap(), D = function(t, h) {
134
+ }, S = new WeakMap(), B = function(t) {
135
+ (c.__opened[e(this, T) - 1] || c.__opened.length === 1 || c.__opened.filter((h) => h !== this).every((h) => e(this, u).current > h.dominance.current)) && t();
136
+ }, x = new WeakMap(), P = new WeakMap(), O = new WeakMap(), _ = new WeakMap(), D = function(t, h) {
137
137
  if (e(t, g).current === e(h, g).current && t.dominance.current >= h.dominance.current)
138
138
  return !0;
139
139
  }, c.__opened = [];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aptechka",
3
- "version": "0.47.4",
3
+ "version": "0.47.6",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/denisavitski/aptechka.git"