aptechka 0.81.0 → 0.82.0
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/{Animation-C4tLEBGM.js → Animation-DxtCzFP3.js} +2 -2
- package/lib/{Composed-BB1MtFiT.js → Composed-DtS09lSU.js} +2 -2
- package/lib/{Damped-DVG5nrYV.js → Damped-DMnIOXpC.js} +2 -2
- package/lib/{DerivedArray-D3scYQdp.js → DerivedArray-DG9iR0mf.js} +1 -1
- package/lib/{DragControls-Cm_88cLt.js → DragControls-DCC8iEOR.js} +4 -4
- package/lib/LocalLinks-Bua7BGRF.cjs +1 -0
- package/lib/LocalLinks-TQkTpAMx.js +62 -0
- package/lib/PageAnnouncerElement-C4k2kDJ5.cjs +1 -0
- package/lib/PageAnnouncerElement-sfh0_4vl.js +24 -0
- package/lib/PageScroll-C7QBpx0G.cjs +1 -0
- package/lib/PageScroll-cQ3B5-6N.js +62 -0
- package/lib/SourceElement-BQ7g2KWK.js +260 -0
- package/lib/SourceElement-TzgPNQOd.cjs +5 -0
- package/lib/{Store-BtVtCGLk.js → Store-CgQ3ReoB.js} +1 -1
- package/lib/{Tweened-C1lnK6n9.js → Tweened-lT68VACv.js} +2 -2
- package/lib/{Viewport-DbN_JWBM.js → Viewport-DGnJ31b4.js} +2 -2
- package/lib/accordion/index.js +1 -1
- package/lib/animation/index.js +3 -3
- package/lib/attribute/index.js +3 -3
- package/lib/billboard/index.js +2 -2
- package/lib/cache/Cache.d.ts +8 -0
- package/lib/cache/index.cjs +1 -0
- package/lib/cache/index.d.ts +1 -0
- package/lib/cache/index.js +37 -0
- package/lib/canvas/index.js +2 -2
- package/lib/controls/index.js +1 -1
- package/lib/css-property/index.js +3 -3
- package/lib/css-value-parser/index.js +1 -1
- package/lib/dev/index.js +2 -2
- package/lib/device/index.js +1 -1
- package/lib/{dom-fgxIeFxm.js → dom-BIeVMHfK.js} +2 -2
- package/lib/element-linked-store/index.js +2 -2
- package/lib/element-resizer/index.js +2 -2
- package/lib/en3/index.js +2 -2
- package/lib/history/History.d.ts +10 -0
- package/lib/history/index.cjs +1 -0
- package/lib/history/index.d.ts +1 -0
- package/lib/history/index.js +34 -0
- package/lib/iframe/index.cjs +1 -1
- package/lib/iframe/index.js +3 -3
- package/lib/image/index.cjs +1 -1
- package/lib/image/index.js +4 -4
- package/lib/{index-JqYHGoo6.js → index-LReFyN6i.js} +1 -1
- package/lib/intersector/index.js +2 -2
- package/lib/jsx/index.js +6 -6
- package/lib/ladder/index.js +2 -2
- package/lib/layout-box/index.js +2 -2
- package/lib/loading/index.js +1 -1
- package/lib/local-links/LocalLinks.d.ts +17 -0
- package/lib/local-links/index.cjs +1 -0
- package/lib/local-links/index.d.ts +1 -0
- package/lib/local-links/index.js +4 -0
- package/lib/masonry-layout/index.js +2 -2
- package/lib/media/index.js +2 -2
- package/lib/metadata-BcYZ5w3T.cjs +1 -0
- package/lib/metadata-jfowcCyz.js +12 -0
- package/lib/morph/index.cjs +1 -1
- package/lib/morph/index.js +141 -140
- package/lib/morph-B6sGhLCi.cjs +1 -0
- package/lib/morph-BQErz7qP.js +242 -0
- package/lib/need_redo_tweaker/index.cjs +1 -1
- package/lib/need_redo_tweaker/index.js +4 -4
- package/lib/{object-D6MVWB4l.js → object-CcMK4y_r.js} +12 -10
- package/lib/object-baN9pgbU.cjs +1 -0
- package/lib/page-announcer/PageAnnouncerElement.d.ts +10 -0
- package/lib/page-announcer/index.cjs +1 -0
- package/lib/page-announcer/index.d.ts +1 -0
- package/lib/page-announcer/index.js +4 -0
- package/lib/page-scroll/PageScroll.d.ts +23 -0
- package/lib/page-scroll/index.cjs +1 -0
- package/lib/page-scroll/index.d.ts +1 -0
- package/lib/page-scroll/index.js +4 -0
- package/lib/pixel-perfect/index.js +3 -3
- package/lib/pointer/index.js +4 -4
- package/lib/popover/index.cjs +1 -1
- package/lib/popover/index.js +3 -3
- package/lib/radio/index.js +1 -1
- package/lib/{render-CMQbWthg.js → render-CiA0mn5V.js} +3 -3
- package/lib/router/Route.d.ts +1 -2
- package/lib/router/Router.d.ts +18 -23
- package/lib/router/index.cjs +1 -1
- package/lib/router/index.d.ts +1 -1
- package/lib/router/index.js +183 -249
- package/lib/scroll/index.js +8 -8
- package/lib/scroll-entries/index.js +1 -1
- package/lib/{scroll-7JSxRKFK.js → scroll-jcbHDexr.js} +2 -2
- package/lib/scroll-kit/index.js +4 -4
- package/lib/sequence/index.cjs +1 -1
- package/lib/sequence/index.js +3 -3
- package/lib/size-element/index.js +1 -1
- package/lib/slicer/index.js +1 -1
- package/lib/source/SourceElement.d.ts +1 -1
- package/lib/source/index.cjs +1 -1
- package/lib/source/index.js +1 -1
- package/lib/spa/SPA.d.ts +29 -0
- package/lib/spa/index.cjs +1 -0
- package/lib/spa/index.d.ts +1 -0
- package/lib/spa/index.js +130 -0
- package/lib/store/index.js +3 -3
- package/lib/{stylesheet-JlRFfJIc.js → stylesheet-DbHOxtjw.js} +1 -1
- package/lib/ticker/index.js +2 -2
- package/lib/url-CPgw9bd5.cjs +1 -0
- package/lib/url-DAl-mgbC.js +97 -0
- package/lib/utils/index.cjs +1 -1
- package/lib/utils/index.d.ts +2 -0
- package/lib/utils/index.js +141 -120
- package/lib/utils/morph.d.ts +49 -0
- package/lib/utils/object.d.ts +1 -1
- package/lib/utils/url.d.ts +6 -0
- package/lib/video/index.cjs +1 -1
- package/lib/video/index.js +3 -3
- package/lib/window-resizer/index.js +1 -1
- package/lib/youtube/index.cjs +1 -1
- package/lib/youtube/index.js +3 -3
- package/package.json +49 -1
- package/lib/SourceElement-BBfaAgwe.cjs +0 -5
- package/lib/SourceElement-BiNNtaz9.js +0 -265
- package/lib/object-CCiXnER2.cjs +0 -1
- package/lib/router/Link.d.ts +0 -8
- package/lib/url-CoUSEREU.cjs +0 -1
- package/lib/url-IGj2LgDW.js +0 -66
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var _=(e,t,r)=>new Promise((n,E)=>{var s=i=>{try{a(r.next(i))}catch(N){E(N)}},T=i=>{try{a(r.throw(i))}catch(N){E(N)}},a=i=>i.done?n(i.value):Promise.resolve(i.value).then(s,T);a((r=r.apply(e,t)).next())});const A=e=>(t,r)=>t[`node${e}`]===r[`node${e}`],O={name:A("Name"),type:A("Type"),value:A("Value")};function u(e){if(!e)return!1;let t=e;for(;t;){if(t.nodeType===1&&t.hasAttribute("data-preserve"))return!0;t=t.parentNode}return!1}function C(e,t){if(e.attributes.length===0&&t.attributes.length===0)return[];const r=[],n=new Map,E=new Map;for(const s of e.attributes)n.set(s.name,s.value);for(const s of t.attributes){const T=n.get(s.name);s.value===T?n.delete(s.name):(typeof T!="undefined"&&n.delete(s.name),E.set(s.name,s.value))}for(const s of n.keys())r.push({type:5,name:s});for(const[s,T]of E.entries())r.push({type:4,name:s,value:T});return r}function f(e,t=!0){let r=`${e.localName}`;for(const{name:n,value:E}of e.attributes)t&&n.startsWith("data-")||(r+=`[${n}=${E}]`);return r+=e.innerHTML,r}function l(e){switch(e.tagName){case"BASE":case"TITLE":return e.localName;case"META":{if(e.hasAttribute("name"))return`meta[name="${e.getAttribute("name")}"]`;if(e.hasAttribute("property"))return`meta[name="${e.getAttribute("property")}"]`;break}case"LINK":{if(e.hasAttribute("rel")&&e.hasAttribute("href"))return`link[rel="${e.getAttribute("rel")}"][href="${e.getAttribute("href")}"]`;if(e.hasAttribute("href"))return`link[href="${e.getAttribute("href")}"]`;break}}return f(e)}function p(e){const[t,r=""]=e.split("?");return`${t}?t=${Date.now()}&${r.replace(/t=\d+/g,"")}`}function c(e){if(e.nodeType===1&&e.hasAttribute("data-persist"))return e;if(e.nodeType===1&&e.localName==="script"){const t=document.createElement("script");for(let{name:r,value:n}of e.attributes)r==="src"&&(n=p(n)),t.setAttribute(r,n);return t.innerHTML=e.innerHTML,t}return e.cloneNode(!0)}function I(e,t){if(e.children.length===0&&t.children.length===0)return[];const r=[],n=new Map,E=new Map,s=new Map;for(const T of e.children)n.set(l(T),T);for(const T of t.children){const a=l(T),i=n.get(a);i?f(T,!1)!==f(i,!1)&&E.set(a,c(T)):s.set(a,c(T)),n.delete(a)}for(const T of e.childNodes){if(T.nodeType===1){const a=l(T);if(n.has(a)){r.push({type:1});continue}else if(E.has(a)){const i=E.get(a);r.push({type:3,attributes:C(T,i),children:h(T,i)});continue}}r.push(void 0)}for(const T of s.values())r.push({type:0,node:c(T)});return r}function h(e,t){const r=[],n=Math.max(e.childNodes.length,t.childNodes.length);for(let E=0;E<n;E++){const s=e.childNodes.item(E),T=t.childNodes.item(E);u(s)||u(T)?r[E]={type:7}:r[E]=o(s,T)}return r}function o(e,t){if(u(e)||u(t))return{type:7};if(!e)return{type:0,node:c(t)};if(!t)return u(e)?{type:7}:{type:1};if(O.type(e,t)){if(e.nodeType===3){const r=e.nodeValue,n=t.nodeValue;if((r==null?void 0:r.trim().length)===0&&(n==null?void 0:n.trim().length)===0)return{type:6}}if(e.nodeType===1){if(O.name(e,t)){const r=e.tagName==="HEAD"?I:h;return{type:3,attributes:C(e,t),children:r(e,t)}}return{type:2,node:c(t)}}else return e.nodeType===9?o(e.documentElement,t.documentElement):O.value(e,t)?{type:6}:{type:2,value:t.nodeValue}}return{type:2,node:c(t)}}function R(e,t){if(t.length!==0)for(const{type:r,name:n,value:E}of t)r===5?e.removeAttribute(n):r===4&&e.setAttribute(n,E)}function d(e,t,r){return _(this,null,function*(){if(!t)return;let n;switch(e.nodeType===9?(e=e.documentElement,n=e):r?n=r:n=e,t.type){case 7:return;case 0:{const{node:E}=t;e.appendChild(E);return}case 1:{if(!n)return;e.removeChild(n);return}case 2:{if(!n)return;const{node:E,value:s}=t;if(typeof s=="string"){n.nodeValue=s;return}E&&(n instanceof Element&&E instanceof Element?n.replaceWith(E):n.parentNode&&n.parentNode.replaceChild(E,n));return}case 3:{if(!n||n.nodeType!==1)return;const{attributes:E,children:s}=t;R(n,E);const T=Array.from(n.childNodes);yield Promise.all(s.map((a,i)=>d(n,a,T[i])));return}case 6:return}})}function P(e,t){return _(this,null,function*(){const r=o(e,t);return d(document,r)})}exports.ACTION_CREATE=0;exports.ACTION_PRESERVE=7;exports.ACTION_REMOVE=1;exports.ACTION_REMOVE_ATTR=5;exports.ACTION_REPLACE=2;exports.ACTION_SET_ATTR=4;exports.ACTION_SKIP=6;exports.ACTION_UPDATE=3;exports.NODE_TYPE_COMMENT=8;exports.NODE_TYPE_DOCUMENT=9;exports.NODE_TYPE_ELEMENT=1;exports.NODE_TYPE_TEXT=3;exports.diff=o;exports.morph=P;exports.patch=d;
|
|
@@ -0,0 +1,242 @@
|
|
|
1
|
+
var l = (e, t, r) => new Promise((n, s) => {
|
|
2
|
+
var a = (c) => {
|
|
3
|
+
try {
|
|
4
|
+
u(r.next(c));
|
|
5
|
+
} catch (T) {
|
|
6
|
+
s(T);
|
|
7
|
+
}
|
|
8
|
+
}, i = (c) => {
|
|
9
|
+
try {
|
|
10
|
+
u(r.throw(c));
|
|
11
|
+
} catch (T) {
|
|
12
|
+
s(T);
|
|
13
|
+
}
|
|
14
|
+
}, u = (c) => c.done ? n(c.value) : Promise.resolve(c.value).then(a, i);
|
|
15
|
+
u((r = r.apply(e, t)).next());
|
|
16
|
+
});
|
|
17
|
+
const b = 1, R = 3, P = 8, M = 9, g = 0, D = 1, v = 2, L = 3, V = 4, S = 5, Y = 6, $ = 7, f = (e) => (t, r) => t[`node${e}`] === r[`node${e}`], N = {
|
|
18
|
+
name: f("Name"),
|
|
19
|
+
type: f("Type"),
|
|
20
|
+
value: f("Value")
|
|
21
|
+
};
|
|
22
|
+
function o(e) {
|
|
23
|
+
if (!e) return !1;
|
|
24
|
+
let t = e;
|
|
25
|
+
for (; t; ) {
|
|
26
|
+
if (t.nodeType === 1 && t.hasAttribute("data-preserve"))
|
|
27
|
+
return !0;
|
|
28
|
+
t = t.parentNode;
|
|
29
|
+
}
|
|
30
|
+
return !1;
|
|
31
|
+
}
|
|
32
|
+
function h(e, t) {
|
|
33
|
+
if (e.attributes.length === 0 && t.attributes.length === 0)
|
|
34
|
+
return [];
|
|
35
|
+
const r = [], n = /* @__PURE__ */ new Map(), s = /* @__PURE__ */ new Map();
|
|
36
|
+
for (const a of e.attributes)
|
|
37
|
+
n.set(a.name, a.value);
|
|
38
|
+
for (const a of t.attributes) {
|
|
39
|
+
const i = n.get(a.name);
|
|
40
|
+
a.value === i ? n.delete(a.name) : (typeof i != "undefined" && n.delete(a.name), s.set(a.name, a.value));
|
|
41
|
+
}
|
|
42
|
+
for (const a of n.keys())
|
|
43
|
+
r.push({ type: 5, name: a });
|
|
44
|
+
for (const [a, i] of s.entries())
|
|
45
|
+
r.push({ type: 4, name: a, value: i });
|
|
46
|
+
return r;
|
|
47
|
+
}
|
|
48
|
+
function A(e, t = !0) {
|
|
49
|
+
let r = `${e.localName}`;
|
|
50
|
+
for (const { name: n, value: s } of e.attributes)
|
|
51
|
+
t && n.startsWith("data-") || (r += `[${n}=${s}]`);
|
|
52
|
+
return r += e.innerHTML, r;
|
|
53
|
+
}
|
|
54
|
+
function d(e) {
|
|
55
|
+
switch (e.tagName) {
|
|
56
|
+
case "BASE":
|
|
57
|
+
case "TITLE":
|
|
58
|
+
return e.localName;
|
|
59
|
+
case "META": {
|
|
60
|
+
if (e.hasAttribute("name"))
|
|
61
|
+
return `meta[name="${e.getAttribute("name")}"]`;
|
|
62
|
+
if (e.hasAttribute("property"))
|
|
63
|
+
return `meta[name="${e.getAttribute("property")}"]`;
|
|
64
|
+
break;
|
|
65
|
+
}
|
|
66
|
+
case "LINK": {
|
|
67
|
+
if (e.hasAttribute("rel") && e.hasAttribute("href"))
|
|
68
|
+
return `link[rel="${e.getAttribute("rel")}"][href="${e.getAttribute("href")}"]`;
|
|
69
|
+
if (e.hasAttribute("href"))
|
|
70
|
+
return `link[href="${e.getAttribute("href")}"]`;
|
|
71
|
+
break;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
return A(e);
|
|
75
|
+
}
|
|
76
|
+
function C(e) {
|
|
77
|
+
const [t, r = ""] = e.split("?");
|
|
78
|
+
return `${t}?t=${Date.now()}&${r.replace(/t=\d+/g, "")}`;
|
|
79
|
+
}
|
|
80
|
+
function E(e) {
|
|
81
|
+
if (e.nodeType === 1 && e.hasAttribute("data-persist"))
|
|
82
|
+
return e;
|
|
83
|
+
if (e.nodeType === 1 && e.localName === "script") {
|
|
84
|
+
const t = document.createElement("script");
|
|
85
|
+
for (let { name: r, value: n } of e.attributes)
|
|
86
|
+
r === "src" && (n = C(n)), t.setAttribute(r, n);
|
|
87
|
+
return t.innerHTML = e.innerHTML, t;
|
|
88
|
+
}
|
|
89
|
+
return e.cloneNode(!0);
|
|
90
|
+
}
|
|
91
|
+
function y(e, t) {
|
|
92
|
+
if (e.children.length === 0 && t.children.length === 0)
|
|
93
|
+
return [];
|
|
94
|
+
const r = [], n = /* @__PURE__ */ new Map(), s = /* @__PURE__ */ new Map(), a = /* @__PURE__ */ new Map();
|
|
95
|
+
for (const i of e.children)
|
|
96
|
+
n.set(d(i), i);
|
|
97
|
+
for (const i of t.children) {
|
|
98
|
+
const u = d(i), c = n.get(u);
|
|
99
|
+
c ? A(i, !1) !== A(c, !1) && s.set(u, E(i)) : a.set(u, E(i)), n.delete(u);
|
|
100
|
+
}
|
|
101
|
+
for (const i of e.childNodes) {
|
|
102
|
+
if (i.nodeType === 1) {
|
|
103
|
+
const u = d(i);
|
|
104
|
+
if (n.has(u)) {
|
|
105
|
+
r.push({ type: 1 });
|
|
106
|
+
continue;
|
|
107
|
+
} else if (s.has(u)) {
|
|
108
|
+
const c = s.get(u);
|
|
109
|
+
r.push({
|
|
110
|
+
type: 3,
|
|
111
|
+
attributes: h(i, c),
|
|
112
|
+
children: _(i, c)
|
|
113
|
+
});
|
|
114
|
+
continue;
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
r.push(void 0);
|
|
118
|
+
}
|
|
119
|
+
for (const i of a.values())
|
|
120
|
+
r.push({ type: 0, node: E(i) });
|
|
121
|
+
return r;
|
|
122
|
+
}
|
|
123
|
+
function _(e, t) {
|
|
124
|
+
const r = [], n = Math.max(e.childNodes.length, t.childNodes.length);
|
|
125
|
+
for (let s = 0; s < n; s++) {
|
|
126
|
+
const a = e.childNodes.item(s), i = t.childNodes.item(s);
|
|
127
|
+
o(a) || o(i) ? r[s] = { type: 7 } : r[s] = p(a, i);
|
|
128
|
+
}
|
|
129
|
+
return r;
|
|
130
|
+
}
|
|
131
|
+
function p(e, t) {
|
|
132
|
+
if (o(e) || o(t))
|
|
133
|
+
return { type: 7 };
|
|
134
|
+
if (!e)
|
|
135
|
+
return { type: 0, node: E(t) };
|
|
136
|
+
if (!t)
|
|
137
|
+
return o(e) ? { type: 7 } : { type: 1 };
|
|
138
|
+
if (N.type(e, t)) {
|
|
139
|
+
if (e.nodeType === 3) {
|
|
140
|
+
const r = e.nodeValue, n = t.nodeValue;
|
|
141
|
+
if ((r == null ? void 0 : r.trim().length) === 0 && (n == null ? void 0 : n.trim().length) === 0)
|
|
142
|
+
return { type: 6 };
|
|
143
|
+
}
|
|
144
|
+
if (e.nodeType === 1) {
|
|
145
|
+
if (N.name(e, t)) {
|
|
146
|
+
const r = e.tagName === "HEAD" ? y : _;
|
|
147
|
+
return {
|
|
148
|
+
type: 3,
|
|
149
|
+
attributes: h(e, t),
|
|
150
|
+
children: r(e, t)
|
|
151
|
+
};
|
|
152
|
+
}
|
|
153
|
+
return {
|
|
154
|
+
type: 2,
|
|
155
|
+
node: E(t)
|
|
156
|
+
};
|
|
157
|
+
} else return e.nodeType === 9 ? p(
|
|
158
|
+
e.documentElement,
|
|
159
|
+
t.documentElement
|
|
160
|
+
) : N.value(e, t) ? { type: 6 } : {
|
|
161
|
+
type: 2,
|
|
162
|
+
value: t.nodeValue
|
|
163
|
+
};
|
|
164
|
+
}
|
|
165
|
+
return {
|
|
166
|
+
type: 2,
|
|
167
|
+
node: E(t)
|
|
168
|
+
};
|
|
169
|
+
}
|
|
170
|
+
function m(e, t) {
|
|
171
|
+
if (t.length !== 0)
|
|
172
|
+
for (const { type: r, name: n, value: s } of t)
|
|
173
|
+
r === 5 ? e.removeAttribute(n) : r === 4 && e.setAttribute(n, s);
|
|
174
|
+
}
|
|
175
|
+
function O(e, t, r) {
|
|
176
|
+
return l(this, null, function* () {
|
|
177
|
+
if (!t) return;
|
|
178
|
+
let n;
|
|
179
|
+
switch (e.nodeType === 9 ? (e = e.documentElement, n = e) : r ? n = r : n = e, t.type) {
|
|
180
|
+
case 7:
|
|
181
|
+
return;
|
|
182
|
+
case 0: {
|
|
183
|
+
const { node: s } = t;
|
|
184
|
+
e.appendChild(s);
|
|
185
|
+
return;
|
|
186
|
+
}
|
|
187
|
+
case 1: {
|
|
188
|
+
if (!n)
|
|
189
|
+
return;
|
|
190
|
+
e.removeChild(n);
|
|
191
|
+
return;
|
|
192
|
+
}
|
|
193
|
+
case 2: {
|
|
194
|
+
if (!n)
|
|
195
|
+
return;
|
|
196
|
+
const { node: s, value: a } = t;
|
|
197
|
+
if (typeof a == "string") {
|
|
198
|
+
n.nodeValue = a;
|
|
199
|
+
return;
|
|
200
|
+
}
|
|
201
|
+
s && (n instanceof Element && s instanceof Element ? n.replaceWith(s) : n.parentNode && n.parentNode.replaceChild(s, n));
|
|
202
|
+
return;
|
|
203
|
+
}
|
|
204
|
+
case 3: {
|
|
205
|
+
if (!n || n.nodeType !== 1)
|
|
206
|
+
return;
|
|
207
|
+
const { attributes: s, children: a } = t;
|
|
208
|
+
m(n, s);
|
|
209
|
+
const i = Array.from(n.childNodes);
|
|
210
|
+
yield Promise.all(
|
|
211
|
+
a.map((u, c) => O(n, u, i[c]))
|
|
212
|
+
);
|
|
213
|
+
return;
|
|
214
|
+
}
|
|
215
|
+
case 6:
|
|
216
|
+
return;
|
|
217
|
+
}
|
|
218
|
+
});
|
|
219
|
+
}
|
|
220
|
+
function w(e, t) {
|
|
221
|
+
return l(this, null, function* () {
|
|
222
|
+
const r = p(e, t);
|
|
223
|
+
return O(document, r);
|
|
224
|
+
});
|
|
225
|
+
}
|
|
226
|
+
export {
|
|
227
|
+
g as A,
|
|
228
|
+
b as N,
|
|
229
|
+
R as a,
|
|
230
|
+
P as b,
|
|
231
|
+
M as c,
|
|
232
|
+
D as d,
|
|
233
|
+
v as e,
|
|
234
|
+
L as f,
|
|
235
|
+
V as g,
|
|
236
|
+
S as h,
|
|
237
|
+
Y as i,
|
|
238
|
+
$ as j,
|
|
239
|
+
p as k,
|
|
240
|
+
w as m,
|
|
241
|
+
O as p
|
|
242
|
+
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";var wt=r=>{throw TypeError(r)};var Ge=(r,s,e)=>s.has(r)||wt("Cannot "+e);var t=(r,s,e)=>(Ge(r,s,"read from private field"),e?e.call(r):s.get(r)),o=(r,s,e)=>s.has(r)?wt("Cannot add the same private member more than once"):s instanceof WeakSet?s.add(r):s.set(r,e),c=(r,s,e,i)=>(Ge(r,s,"write to private field"),i?i.call(r,e):s.set(r,e),e),l=(r,s,e)=>(Ge(r,s,"access private method"),e);const p=require("../index-CKTweR3M.cjs");require("construct-style-sheets-polyfill");require("../ticker/index.cjs");const m=require("../Store-1JrMCgdX.cjs"),Yt=require("../file-DSpfWdd9.cjs"),Gt=require("../function-MthRj-GJ.cjs"),St=require("../gestures-C7gbKx11.cjs"),Ut=require("../connector/index.cjs"),pe=require("../string-DUXXtU8v.cjs"),bt=require("../object-CCiXnER2.cjs"),Xt=require("../Viewport-Cx50Hufs.cjs"),Qt=require("../math-GDWEqu7y.cjs"),jt=require("../number-ChAm68cm.cjs"),vt=require("../polyfills-Df4r-ETT.cjs"),yt=require("../element-resizer/index.cjs"),es=require("../style-At6aDoqG.cjs"),ts=new Set(["animate","animateMotion","animateTransform","circle","clipPath","defs","desc","ellipse","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","foreignObject","g","image","line","linearGradient","listener","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialGradient","rect","set","solidColor","stop","svg","switch","symbol","text","textPath","title","tspan","view","use"]);var d,B,S,we,I,H,a,kt,Et,xt,Ue,Xe,Ct,Tt,Lt,zt,Qe,je,Rt,et,tt,Mt,st,qe,it,nt,ot,Ke,Oe;const Ze=class Ze{constructor(...s){o(this,a);o(this,d,null);o(this,B,new Set);o(this,S,new Set);o(this,we);o(this,I);o(this,H);o(this,Ke,s=>{t(this,B).forEach(e=>{e(s)}),t(this,B).clear()});o(this,Oe,(s,e)=>{t(this,S).forEach(i=>{i(s,e)}),t(this,S).clear(),l(this,a,tt).call(this)});if(p.isBrowser){const e=s[0],i=s[1];c(this,d,l(this,a,kt).call(this,e,i==null?void 0:i.forceSvg)),l(this,a,xt).call(this,i)}}get node(){return t(this,d)}set node(s){var e;l(this,a,tt).call(this),c(this,d,s),(e=t(this,we))==null||e.call(this),t(this,d)instanceof Element&&c(this,I,[...t(this,d).querySelectorAll("store-root")]),l(this,a,et).call(this),l(this,a,Ue).call(this)}};d=new WeakMap,B=new WeakMap,S=new WeakMap,we=new WeakMap,I=new WeakMap,H=new WeakMap,a=new WeakSet,kt=function(s,e){let i=null;if(s instanceof Node)i=s;else if(typeof s=="string")if(!s.includes("<")&&s.includes("-"))i=new(customElements.get(s));else if(s.includes("<")){const n=document.createElement("div");n.innerHTML=s,i=n.firstElementChild}else ts.has(s)||e?i=document.createElementNS("http://www.w3.org/2000/svg",s):i=document.createElement(s);else i=document.createElement("div");return i},Et=function(s){return s instanceof HTMLElement||s instanceof SVGElement},xt=function(s){if(!s)return;const e=l(this,a,Et).call(this,t(this,d)),i=s.ref;delete s.ref,s!=null&&s.onConnect&&(t(this,B).add(s.onConnect),delete s.onConnect),s!=null&&s.onDisconnect&&(t(this,S).add(s.onDisconnect),delete s.onDisconnect);let n,h;for(const u in s){const g=s[u];u==="class"&&e?l(this,a,Xe).call(this,g):u==="style"&&e?l(this,a,Lt).call(this,g):u==="lightChildren"?l(this,a,qe).call(this,t(this,d),g):u==="children"?l(this,a,qe).call(this,t(this,d)instanceof Element?t(this,d).shadowRoot||t(this,d):t(this,d),g):u==="connectedClass"?t(this,B).add(()=>{requestAnimationFrame(()=>{t(this,d).classList.add(typeof g=="boolean"?"connected":g)})}):u.startsWith("on")?(h||(h={}),h[u]=g):(n||(n={}),n[u]=g)}l(this,a,Mt).call(this,n),l(this,a,Rt).call(this,h),i&&(typeof i=="function"?i(t(this,d)):i.current=t(this,d)),l(this,a,Ue).call(this)},Ue=function(){if(p.isBrowser&&(t(this,S).size||t(this,B).size)){const s=t(this,d)instanceof DocumentFragment?t(this,d).firstChild:t(this,d);c(this,we,Ut.connector.subscribe(s,{connectCallback:t(this,Ke),disconnectCallback:t(this,Oe),unsubscribeAfterDisconnect:!0,maxWaitSec:20}))}},Xe=function(s){if(s){if(typeof s=="string")t(this,d).classList.add(s);else if(Array.isArray(s))s.forEach(e=>{e&&l(this,a,Xe).call(this,e)});else if(typeof s=="object")if(s instanceof m.Store)l(this,a,Ct).call(this,s);else for(const e in s){const i=s[e];i instanceof m.Store?l(this,a,Tt).call(this,e,i):i?t(this,d).classList.add(e):t(this,d).classList.remove(e)}}else return},Ct=function(s){t(this,S).add(s.subscribe(({current:e,previous:i})=>{i&&[i].flat().forEach(n=>{n&&t(this,d).classList.remove(n)}),e&&[e].flat().forEach(n=>{n&&t(this,d).classList.add(n)})}))},Tt=function(s,e){t(this,S).add(e.subscribe(({current:i})=>{i?t(this,d).classList.add(s):t(this,d).classList.remove(s)}))},Lt=function(s){if(!s)return;t(this,d).tagName==="style"||t(this,d).tagName==="STYLE"?l(this,a,Qe).call(this,s):l(this,a,zt).call(this,s)},zt=function(s){for(const e in s){const i=e,n=s[i];n instanceof m.Store?t(this,S).add(n.subscribe(({current:h})=>{l(this,a,je).call(this,i,h)})):l(this,a,je).call(this,i,n)}},Qe=function(s){for(const e in s){const i=s[e];if(typeof i=="object"&&!(i instanceof m.Store))t(this,d).appendChild(document.createTextNode(`${e} {`)),l(this,a,Qe).call(this,i),t(this,d).appendChild(document.createTextNode("}"));else if(i instanceof m.Store){const n=document.createTextNode("");t(this,S).add(i.subscribe(h=>{h.current?n.nodeValue=`${pe.camelToKebab(e)}: ${h.current};`:n.nodeValue=""})),t(this,d).appendChild(n)}else t(this,d).appendChild(document.createTextNode(`${pe.camelToKebab(e)}: ${i};`))}},je=function(s,e){s.includes("--")?e?t(this,d).style.setProperty(s,e.toString()):t(this,d).style.removeProperty(s):e?t(this,d).style[s]=e.toString():t(this,d).style[s]=""},Rt=function(s){if(s){t(this,H)||c(this,H,[]);for(const e in s){const i=e,n=pe.uncapitalize(i.split("on").slice(1).join("on")),h=s[i];typeof h=="object"?t(this,H).push({name:n,callback:h.callback,options:h.options}):typeof h=="function"&&t(this,H).push({name:n,callback:h})}l(this,a,et).call(this)}},et=function(){var s;(s=t(this,H))==null||s.forEach(e=>{t(this,d).addEventListener(e.name,e.callback,e.options)})},tt=function(){var s;(s=t(this,H))==null||s.forEach(e=>{t(this,d).removeEventListener(e.name,e.callback,e.options)})},Mt=function(s){for(const e in s){const i=s[e];i instanceof m.Store?t(this,S).add(i.subscribe(({current:n})=>{l(this,a,st).call(this,e,n)})):l(this,a,st).call(this,e,i)}},st=function(s,e){var n,h;const i=t(this,d);if(s in i&&!((h=(n=i.constructor)==null?void 0:n.observedAttributes)!=null&&h.includes(s)))e!=null&&(i[s]=e.toString());else if(e!=null){const u=e.toString();s.includes("xlink")?i.setAttributeNS("http://www.w3.org/1999/xlink",s,u):i.setAttribute(s,u)}},qe=function(s,e){e&&(e=[e].flat(),e.forEach(i=>{if(i instanceof m.Store){const n=document.createElement("div");n.style.display="contents",s.appendChild(n),t(this,I)||c(this,I,[]);const h=t(this,I).length;n.setAttribute("store-root",""),t(this,I).push(n),t(this,S).add(i.subscribe(({current:u,previous:g})=>{const E=t(this,I)[h];E.dispatchEvent(new CustomEvent("beforeChildrenChange",{bubbles:!0,composed:!0}));const L=Array.from(E.childNodes),y=Array.isArray(u)?u:[u],ge=Array.isArray(g)?g:[g],De=[],C=[];L.length&&ge.forEach((F,P)=>{y.includes(F)?C.push(F):De.push(L[P])}),y.forEach((F,P)=>{if(C[P]!=null){if(F!==C[P]){const V=l(this,a,nt).call(this,F),Z=L[P];V instanceof Node&&!Z.isEqualNode(V)?E.replaceChild(V,Z):E.removeChild(Z)}}else{const V=l(this,a,nt).call(this,F);V instanceof Node&&n.appendChild(V)}}),De.forEach(F=>{E.removeChild(F)}),E.dispatchEvent(new CustomEvent("afterChildrenChange",{bubbles:!0,composed:!0}))}))}else if(i instanceof Ze)l(this,a,it).call(this,s,i.node);else if(i instanceof Function)l(this,a,qe).call(this,s,bt.isESClass(i)?new i:i());else{const n=l(this,a,ot).call(this,i);n instanceof Node&&l(this,a,it).call(this,s,n)}}))},it=function(s,e){!(s instanceof ShadowRoot)&&e instanceof HTMLElement&&e.tagName==="STYLE"?(t(this,B).add(()=>{[...document.head.querySelectorAll("style")].find(n=>n.outerHTML===e.outerHTML)||document.head.appendChild(e)}),t(this,S).add(()=>{e.remove()})):s.appendChild(e)},nt=function(s){return s instanceof Ze?s.node:typeof s=="function"?bt.isESClass(s)?new s:s():l(this,a,ot).call(this,s)},ot=function(s){if(s instanceof Node)return s;if(s!=null){const e=String(s);if(e.trim().startsWith("<")&&e.trim().endsWith(">")){const i=document.createElement("div");return i.innerHTML=e,i.firstElementChild}else return document.createTextNode(e)}else return},Ke=new WeakMap,Oe=new WeakMap;let N=Ze;function w(...r){return new N(...r)}function ss(r){return new N("a",r)}function Q(r){return new N("button",r)}function v(r){return new N("div",r)}function He(r){return new N("input",r)}function At(r){return new N("label",r)}function ue(r){return new N("slot",r)}function rt(r){return new N("span",r)}function Nt(r){return new N("style",{style:r})}function x(r){const s=new CSSStyleSheet;return s.replaceSync(Nt(r).node.innerHTML),s}function is(r,s){const e=s==null?void 0:s.prefix,i={style:{}};for(const n in r)i[n]={var:`var(--${e}${pe.camelToKebab(n)})`,value:r[n]},i.style[`--${e}${pe.camelToKebab(n)}`]=r[n];return i}const f=is({colorMain:"#1c1c1c",colorMainAux:"#282828",colorFont:"#ffffff",colorActive:"#00E5B0",borderRadius:"12px",borderRadiusSmall:"4px"},{prefix:"aptechka-"});if(p.isBrowser){const r=Nt({":root":f.style}).node;r.setAttribute("data-permanent",""),document.head.appendChild(r)}const Ft='<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24"><path fill-rule="evenodd" d="M20.536 3.464C19.07 2 16.714 2 12 2C7.286 2 4.929 2 3.464 3.464C2 4.93 2 7.286 2 12c0 4.714 0 7.071 1.464 8.535C4.93 22 7.286 22 12 22c4.714 0 7.071 0 8.535-1.465C22 19.072 22 16.714 22 12s0-7.071-1.465-8.536M16.75 12a.75.75 0 0 1-.75.75H9.81l1.72 1.72a.75.75 0 1 1-1.06 1.06l-3-3a.75.75 0 0 1 0-1.06l3-3a.75.75 0 1 1 1.06 1.06l-1.72 1.72H16a.75.75 0 0 1 .75.75" clip-rule="evenodd"/></svg>',$t='<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24"><path d="M15.24 2h-3.894c-1.764 0-3.162 0-4.255.148c-1.126.152-2.037.472-2.755 1.193c-.719.721-1.038 1.636-1.189 2.766C3 7.205 3 8.608 3 10.379v5.838c0 1.508.92 2.8 2.227 3.342c-.067-.91-.067-2.185-.067-3.247v-5.01c0-1.281 0-2.386.118-3.27c.127-.948.413-1.856 1.147-2.593c.734-.737 1.639-1.024 2.583-1.152c.88-.118 1.98-.118 3.257-.118h3.07c1.276 0 2.374 0 3.255.118A3.601 3.601 0 0 0 15.24 2Z"/><path d="M6.6 11.397c0-2.726 0-4.089.844-4.936c.843-.847 2.2-.847 4.916-.847h2.88c2.715 0 4.073 0 4.917.847c.843.847.843 2.21.843 4.936v4.82c0 2.726 0 4.089-.843 4.936c-.844.847-2.202.847-4.917.847h-2.88c-2.715 0-4.073 0-4.916-.847c-.844-.847-.844-2.21-.844-4.936v-4.82Z"/></svg>',ns='<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24"><path fill-rule="evenodd" d="M2 12c0-4.714 0-7.071 1.464-8.536C4.93 2 7.286 2 12 2c4.714 0 7.071 0 8.535 1.464C22 4.93 22 7.286 22 12c0 4.714 0 7.071-1.465 8.535C19.072 22 16.714 22 12 22s-7.071 0-8.536-1.465C2 19.072 2 16.714 2 12Zm10-5.75a.75.75 0 0 1 .75.75v5.19l1.72-1.72a.75.75 0 1 1 1.06 1.06l-3 3a.75.75 0 0 1-1.06 0l-3-3a.75.75 0 1 1 1.06-1.06l1.72 1.72V7a.75.75 0 0 1 .75-.75Zm-4 10a.75.75 0 0 0 0 1.5h8a.75.75 0 0 0 0-1.5H8Z" clip-rule="evenodd"/></svg>',os='<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24"><path fill-rule="evenodd" d="M2 12c0-4.714 0-7.071 1.464-8.536C4.93 2 7.286 2 12 2c4.714 0 7.071 0 8.535 1.464C22 4.93 22 7.286 22 12c0 4.714 0 7.071-1.465 8.535C19.072 22 16.714 22 12 22s-7.071 0-8.536-1.465C2 19.072 2 16.714 2 12Zm10 5.75a.75.75 0 0 0 .75-.75v-5.19l1.72 1.72a.75.75 0 1 0 1.06-1.06l-3-3a.75.75 0 0 0-1.06 0l-3 3a.75.75 0 1 0 1.06 1.06l1.72-1.72V17c0 .414.336.75.75.75Zm-4-10a.75.75 0 0 1 0-1.5h8a.75.75 0 0 1 0 1.5H8Z" clip-rule="evenodd"/></svg>',Pt=`<svg
|
|
1
|
+
"use strict";var wt=r=>{throw TypeError(r)};var Ge=(r,s,e)=>s.has(r)||wt("Cannot "+e);var t=(r,s,e)=>(Ge(r,s,"read from private field"),e?e.call(r):s.get(r)),o=(r,s,e)=>s.has(r)?wt("Cannot add the same private member more than once"):s instanceof WeakSet?s.add(r):s.set(r,e),c=(r,s,e,i)=>(Ge(r,s,"write to private field"),i?i.call(r,e):s.set(r,e),e),l=(r,s,e)=>(Ge(r,s,"access private method"),e);const p=require("../index-CKTweR3M.cjs");require("construct-style-sheets-polyfill");require("../ticker/index.cjs");const m=require("../Store-1JrMCgdX.cjs"),Yt=require("../file-DSpfWdd9.cjs"),Gt=require("../function-MthRj-GJ.cjs"),St=require("../gestures-C7gbKx11.cjs"),Ut=require("../connector/index.cjs"),pe=require("../string-DUXXtU8v.cjs"),bt=require("../object-baN9pgbU.cjs"),Xt=require("../Viewport-Cx50Hufs.cjs"),Qt=require("../math-GDWEqu7y.cjs"),jt=require("../number-ChAm68cm.cjs"),vt=require("../polyfills-Df4r-ETT.cjs"),yt=require("../element-resizer/index.cjs"),es=require("../style-At6aDoqG.cjs"),ts=new Set(["animate","animateMotion","animateTransform","circle","clipPath","defs","desc","ellipse","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","foreignObject","g","image","line","linearGradient","listener","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialGradient","rect","set","solidColor","stop","svg","switch","symbol","text","textPath","title","tspan","view","use"]);var d,B,S,we,I,H,a,kt,Et,xt,Ue,Xe,Ct,Tt,Lt,zt,Qe,je,Rt,et,tt,Mt,st,qe,it,nt,ot,Ke,Oe;const Ze=class Ze{constructor(...s){o(this,a);o(this,d,null);o(this,B,new Set);o(this,S,new Set);o(this,we);o(this,I);o(this,H);o(this,Ke,s=>{t(this,B).forEach(e=>{e(s)}),t(this,B).clear()});o(this,Oe,(s,e)=>{t(this,S).forEach(i=>{i(s,e)}),t(this,S).clear(),l(this,a,tt).call(this)});if(p.isBrowser){const e=s[0],i=s[1];c(this,d,l(this,a,kt).call(this,e,i==null?void 0:i.forceSvg)),l(this,a,xt).call(this,i)}}get node(){return t(this,d)}set node(s){var e;l(this,a,tt).call(this),c(this,d,s),(e=t(this,we))==null||e.call(this),t(this,d)instanceof Element&&c(this,I,[...t(this,d).querySelectorAll("store-root")]),l(this,a,et).call(this),l(this,a,Ue).call(this)}};d=new WeakMap,B=new WeakMap,S=new WeakMap,we=new WeakMap,I=new WeakMap,H=new WeakMap,a=new WeakSet,kt=function(s,e){let i=null;if(s instanceof Node)i=s;else if(typeof s=="string")if(!s.includes("<")&&s.includes("-"))i=new(customElements.get(s));else if(s.includes("<")){const n=document.createElement("div");n.innerHTML=s,i=n.firstElementChild}else ts.has(s)||e?i=document.createElementNS("http://www.w3.org/2000/svg",s):i=document.createElement(s);else i=document.createElement("div");return i},Et=function(s){return s instanceof HTMLElement||s instanceof SVGElement},xt=function(s){if(!s)return;const e=l(this,a,Et).call(this,t(this,d)),i=s.ref;delete s.ref,s!=null&&s.onConnect&&(t(this,B).add(s.onConnect),delete s.onConnect),s!=null&&s.onDisconnect&&(t(this,S).add(s.onDisconnect),delete s.onDisconnect);let n,h;for(const u in s){const g=s[u];u==="class"&&e?l(this,a,Xe).call(this,g):u==="style"&&e?l(this,a,Lt).call(this,g):u==="lightChildren"?l(this,a,qe).call(this,t(this,d),g):u==="children"?l(this,a,qe).call(this,t(this,d)instanceof Element?t(this,d).shadowRoot||t(this,d):t(this,d),g):u==="connectedClass"?t(this,B).add(()=>{requestAnimationFrame(()=>{t(this,d).classList.add(typeof g=="boolean"?"connected":g)})}):u.startsWith("on")?(h||(h={}),h[u]=g):(n||(n={}),n[u]=g)}l(this,a,Mt).call(this,n),l(this,a,Rt).call(this,h),i&&(typeof i=="function"?i(t(this,d)):i.current=t(this,d)),l(this,a,Ue).call(this)},Ue=function(){if(p.isBrowser&&(t(this,S).size||t(this,B).size)){const s=t(this,d)instanceof DocumentFragment?t(this,d).firstChild:t(this,d);c(this,we,Ut.connector.subscribe(s,{connectCallback:t(this,Ke),disconnectCallback:t(this,Oe),unsubscribeAfterDisconnect:!0,maxWaitSec:20}))}},Xe=function(s){if(s){if(typeof s=="string")t(this,d).classList.add(s);else if(Array.isArray(s))s.forEach(e=>{e&&l(this,a,Xe).call(this,e)});else if(typeof s=="object")if(s instanceof m.Store)l(this,a,Ct).call(this,s);else for(const e in s){const i=s[e];i instanceof m.Store?l(this,a,Tt).call(this,e,i):i?t(this,d).classList.add(e):t(this,d).classList.remove(e)}}else return},Ct=function(s){t(this,S).add(s.subscribe(({current:e,previous:i})=>{i&&[i].flat().forEach(n=>{n&&t(this,d).classList.remove(n)}),e&&[e].flat().forEach(n=>{n&&t(this,d).classList.add(n)})}))},Tt=function(s,e){t(this,S).add(e.subscribe(({current:i})=>{i?t(this,d).classList.add(s):t(this,d).classList.remove(s)}))},Lt=function(s){if(!s)return;t(this,d).tagName==="style"||t(this,d).tagName==="STYLE"?l(this,a,Qe).call(this,s):l(this,a,zt).call(this,s)},zt=function(s){for(const e in s){const i=e,n=s[i];n instanceof m.Store?t(this,S).add(n.subscribe(({current:h})=>{l(this,a,je).call(this,i,h)})):l(this,a,je).call(this,i,n)}},Qe=function(s){for(const e in s){const i=s[e];if(typeof i=="object"&&!(i instanceof m.Store))t(this,d).appendChild(document.createTextNode(`${e} {`)),l(this,a,Qe).call(this,i),t(this,d).appendChild(document.createTextNode("}"));else if(i instanceof m.Store){const n=document.createTextNode("");t(this,S).add(i.subscribe(h=>{h.current?n.nodeValue=`${pe.camelToKebab(e)}: ${h.current};`:n.nodeValue=""})),t(this,d).appendChild(n)}else t(this,d).appendChild(document.createTextNode(`${pe.camelToKebab(e)}: ${i};`))}},je=function(s,e){s.includes("--")?e?t(this,d).style.setProperty(s,e.toString()):t(this,d).style.removeProperty(s):e?t(this,d).style[s]=e.toString():t(this,d).style[s]=""},Rt=function(s){if(s){t(this,H)||c(this,H,[]);for(const e in s){const i=e,n=pe.uncapitalize(i.split("on").slice(1).join("on")),h=s[i];typeof h=="object"?t(this,H).push({name:n,callback:h.callback,options:h.options}):typeof h=="function"&&t(this,H).push({name:n,callback:h})}l(this,a,et).call(this)}},et=function(){var s;(s=t(this,H))==null||s.forEach(e=>{t(this,d).addEventListener(e.name,e.callback,e.options)})},tt=function(){var s;(s=t(this,H))==null||s.forEach(e=>{t(this,d).removeEventListener(e.name,e.callback,e.options)})},Mt=function(s){for(const e in s){const i=s[e];i instanceof m.Store?t(this,S).add(i.subscribe(({current:n})=>{l(this,a,st).call(this,e,n)})):l(this,a,st).call(this,e,i)}},st=function(s,e){var n,h;const i=t(this,d);if(s in i&&!((h=(n=i.constructor)==null?void 0:n.observedAttributes)!=null&&h.includes(s)))e!=null&&(i[s]=e.toString());else if(e!=null){const u=e.toString();s.includes("xlink")?i.setAttributeNS("http://www.w3.org/1999/xlink",s,u):i.setAttribute(s,u)}},qe=function(s,e){e&&(e=[e].flat(),e.forEach(i=>{if(i instanceof m.Store){const n=document.createElement("div");n.style.display="contents",s.appendChild(n),t(this,I)||c(this,I,[]);const h=t(this,I).length;n.setAttribute("store-root",""),t(this,I).push(n),t(this,S).add(i.subscribe(({current:u,previous:g})=>{const E=t(this,I)[h];E.dispatchEvent(new CustomEvent("beforeChildrenChange",{bubbles:!0,composed:!0}));const L=Array.from(E.childNodes),y=Array.isArray(u)?u:[u],ge=Array.isArray(g)?g:[g],De=[],C=[];L.length&&ge.forEach((F,P)=>{y.includes(F)?C.push(F):De.push(L[P])}),y.forEach((F,P)=>{if(C[P]!=null){if(F!==C[P]){const V=l(this,a,nt).call(this,F),Z=L[P];V instanceof Node&&!Z.isEqualNode(V)?E.replaceChild(V,Z):E.removeChild(Z)}}else{const V=l(this,a,nt).call(this,F);V instanceof Node&&n.appendChild(V)}}),De.forEach(F=>{E.removeChild(F)}),E.dispatchEvent(new CustomEvent("afterChildrenChange",{bubbles:!0,composed:!0}))}))}else if(i instanceof Ze)l(this,a,it).call(this,s,i.node);else if(i instanceof Function)l(this,a,qe).call(this,s,bt.isESClass(i)?new i:i());else{const n=l(this,a,ot).call(this,i);n instanceof Node&&l(this,a,it).call(this,s,n)}}))},it=function(s,e){!(s instanceof ShadowRoot)&&e instanceof HTMLElement&&e.tagName==="STYLE"?(t(this,B).add(()=>{[...document.head.querySelectorAll("style")].find(n=>n.outerHTML===e.outerHTML)||document.head.appendChild(e)}),t(this,S).add(()=>{e.remove()})):s.appendChild(e)},nt=function(s){return s instanceof Ze?s.node:typeof s=="function"?bt.isESClass(s)?new s:s():l(this,a,ot).call(this,s)},ot=function(s){if(s instanceof Node)return s;if(s!=null){const e=String(s);if(e.trim().startsWith("<")&&e.trim().endsWith(">")){const i=document.createElement("div");return i.innerHTML=e,i.firstElementChild}else return document.createTextNode(e)}else return},Ke=new WeakMap,Oe=new WeakMap;let N=Ze;function w(...r){return new N(...r)}function ss(r){return new N("a",r)}function Q(r){return new N("button",r)}function v(r){return new N("div",r)}function He(r){return new N("input",r)}function At(r){return new N("label",r)}function ue(r){return new N("slot",r)}function rt(r){return new N("span",r)}function Nt(r){return new N("style",{style:r})}function x(r){const s=new CSSStyleSheet;return s.replaceSync(Nt(r).node.innerHTML),s}function is(r,s){const e=s==null?void 0:s.prefix,i={style:{}};for(const n in r)i[n]={var:`var(--${e}${pe.camelToKebab(n)})`,value:r[n]},i.style[`--${e}${pe.camelToKebab(n)}`]=r[n];return i}const f=is({colorMain:"#1c1c1c",colorMainAux:"#282828",colorFont:"#ffffff",colorActive:"#00E5B0",borderRadius:"12px",borderRadiusSmall:"4px"},{prefix:"aptechka-"});if(p.isBrowser){const r=Nt({":root":f.style}).node;r.setAttribute("data-permanent",""),document.head.appendChild(r)}const Ft='<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24"><path fill-rule="evenodd" d="M20.536 3.464C19.07 2 16.714 2 12 2C7.286 2 4.929 2 3.464 3.464C2 4.93 2 7.286 2 12c0 4.714 0 7.071 1.464 8.535C4.93 22 7.286 22 12 22c4.714 0 7.071 0 8.535-1.465C22 19.072 22 16.714 22 12s0-7.071-1.465-8.536M16.75 12a.75.75 0 0 1-.75.75H9.81l1.72 1.72a.75.75 0 1 1-1.06 1.06l-3-3a.75.75 0 0 1 0-1.06l3-3a.75.75 0 1 1 1.06 1.06l-1.72 1.72H16a.75.75 0 0 1 .75.75" clip-rule="evenodd"/></svg>',$t='<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24"><path d="M15.24 2h-3.894c-1.764 0-3.162 0-4.255.148c-1.126.152-2.037.472-2.755 1.193c-.719.721-1.038 1.636-1.189 2.766C3 7.205 3 8.608 3 10.379v5.838c0 1.508.92 2.8 2.227 3.342c-.067-.91-.067-2.185-.067-3.247v-5.01c0-1.281 0-2.386.118-3.27c.127-.948.413-1.856 1.147-2.593c.734-.737 1.639-1.024 2.583-1.152c.88-.118 1.98-.118 3.257-.118h3.07c1.276 0 2.374 0 3.255.118A3.601 3.601 0 0 0 15.24 2Z"/><path d="M6.6 11.397c0-2.726 0-4.089.844-4.936c.843-.847 2.2-.847 4.916-.847h2.88c2.715 0 4.073 0 4.917.847c.843.847.843 2.21.843 4.936v4.82c0 2.726 0 4.089-.843 4.936c-.844.847-2.202.847-4.917.847h-2.88c-2.715 0-4.073 0-4.916-.847c-.844-.847-.844-2.21-.844-4.936v-4.82Z"/></svg>',ns='<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24"><path fill-rule="evenodd" d="M2 12c0-4.714 0-7.071 1.464-8.536C4.93 2 7.286 2 12 2c4.714 0 7.071 0 8.535 1.464C22 4.93 22 7.286 22 12c0 4.714 0 7.071-1.465 8.535C19.072 22 16.714 22 12 22s-7.071 0-8.536-1.465C2 19.072 2 16.714 2 12Zm10-5.75a.75.75 0 0 1 .75.75v5.19l1.72-1.72a.75.75 0 1 1 1.06 1.06l-3 3a.75.75 0 0 1-1.06 0l-3-3a.75.75 0 1 1 1.06-1.06l1.72 1.72V7a.75.75 0 0 1 .75-.75Zm-4 10a.75.75 0 0 0 0 1.5h8a.75.75 0 0 0 0-1.5H8Z" clip-rule="evenodd"/></svg>',os='<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24"><path fill-rule="evenodd" d="M2 12c0-4.714 0-7.071 1.464-8.536C4.93 2 7.286 2 12 2c4.714 0 7.071 0 8.535 1.464C22 4.93 22 7.286 22 12c0 4.714 0 7.071-1.465 8.535C19.072 22 16.714 22 12 22s-7.071 0-8.536-1.465C2 19.072 2 16.714 2 12Zm10 5.75a.75.75 0 0 0 .75-.75v-5.19l1.72 1.72a.75.75 0 1 0 1.06-1.06l-3-3a.75.75 0 0 0-1.06 0l-3 3a.75.75 0 1 0 1.06 1.06l1.72-1.72V17c0 .414.336.75.75.75Zm-4-10a.75.75 0 0 1 0-1.5h8a.75.75 0 0 1 0 1.5H8Z" clip-rule="evenodd"/></svg>',Pt=`<svg
|
|
2
2
|
xmlns="http://www.w3.org/2000/svg"
|
|
3
3
|
width="32"
|
|
4
4
|
height="32"
|
|
@@ -3,17 +3,17 @@ var vt = (r) => {
|
|
|
3
3
|
};
|
|
4
4
|
var Xe = (r, s, e) => s.has(r) || vt("Cannot " + e);
|
|
5
5
|
var t = (r, s, e) => (Xe(r, s, "read from private field"), e ? e.call(r) : s.get(r)), o = (r, s, e) => s.has(r) ? vt("Cannot add the same private member more than once") : s instanceof WeakSet ? s.add(r) : s.set(r, e), c = (r, s, e, i) => (Xe(r, s, "write to private field"), i ? i.call(r, e) : s.set(r, e), e), l = (r, s, e) => (Xe(r, s, "access private method"), e);
|
|
6
|
-
import { i as p } from "../index-
|
|
6
|
+
import { i as p } from "../index-LReFyN6i.js";
|
|
7
7
|
import "construct-style-sheets-polyfill";
|
|
8
8
|
import "../ticker/index.js";
|
|
9
|
-
import { S as $, s as K, a as j } from "../Store-
|
|
9
|
+
import { S as $, s as K, a as j } from "../Store-CgQ3ReoB.js";
|
|
10
10
|
import { c as Ut } from "../file-GHShUlue.js";
|
|
11
11
|
import { d as Xt } from "../function-C10DGppn.js";
|
|
12
12
|
import { s as Et } from "../gestures-CcXV6fCp.js";
|
|
13
13
|
import { connector as Qt } from "../connector/index.js";
|
|
14
14
|
import { c as Oe, u as jt } from "../string-BlMQbe8b.js";
|
|
15
|
-
import { i as yt } from "../object-
|
|
16
|
-
import { a as es } from "../Viewport-
|
|
15
|
+
import { i as yt } from "../object-CcMK4y_r.js";
|
|
16
|
+
import { a as es } from "../Viewport-DGnJ31b4.js";
|
|
17
17
|
import { c as ts } from "../math-BOBiC4TN.js";
|
|
18
18
|
import { t as ss } from "../number-CumqY64S.js";
|
|
19
19
|
import { n as St } from "../polyfills-DJrTJQky.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
function c(e) {
|
|
2
2
|
return typeof e == "object" && e !== null && !Array.isArray(e);
|
|
3
3
|
}
|
|
4
|
-
function
|
|
4
|
+
function u(e) {
|
|
5
5
|
if (e === null || typeof e != "object")
|
|
6
6
|
return e;
|
|
7
7
|
if (e instanceof Date)
|
|
@@ -10,26 +10,26 @@ function y(e) {
|
|
|
10
10
|
return e;
|
|
11
11
|
const t = Array.isArray(e) ? [] : {};
|
|
12
12
|
for (const r in e)
|
|
13
|
-
e.hasOwnProperty(r) && (t[r] =
|
|
13
|
+
e.hasOwnProperty(r) && (t[r] = u(e[r]));
|
|
14
14
|
return t;
|
|
15
15
|
}
|
|
16
|
-
function
|
|
16
|
+
function y(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]: {} }), y(e[n], t[n], r)) : Object.assign(e, { [n]: t[n] });
|
|
19
19
|
return e;
|
|
20
20
|
}
|
|
21
|
-
function
|
|
21
|
+
function a(e) {
|
|
22
22
|
return e === null || typeof e == "undefined";
|
|
23
23
|
}
|
|
24
24
|
function i(e, t) {
|
|
25
25
|
if (typeof e != typeof t)
|
|
26
26
|
return !1;
|
|
27
|
-
if ([e, t].some((r) =>
|
|
27
|
+
if ([e, t].some((r) => a(r)))
|
|
28
28
|
return e === t;
|
|
29
29
|
if (Array.isArray(e)) {
|
|
30
30
|
const r = e.length > t.length ? e : t, n = e.length > t.length ? t : e;
|
|
31
31
|
return r.every(
|
|
32
|
-
(
|
|
32
|
+
(f, s) => i(f, n[s])
|
|
33
33
|
);
|
|
34
34
|
}
|
|
35
35
|
if (typeof e != "object" || e instanceof Node || typeof e == "object" && e.constructor.toString().startsWith("class"))
|
|
@@ -53,6 +53,8 @@ function p(e, t) {
|
|
|
53
53
|
}
|
|
54
54
|
function o(e, t) {
|
|
55
55
|
const r = {};
|
|
56
|
+
if (!e)
|
|
57
|
+
return r;
|
|
56
58
|
for (const n in e)
|
|
57
59
|
t.includes(n) || (r[n] = e[n]);
|
|
58
60
|
return r;
|
|
@@ -74,12 +76,12 @@ function O(e, ...t) {
|
|
|
74
76
|
}
|
|
75
77
|
export {
|
|
76
78
|
c as a,
|
|
77
|
-
|
|
78
|
-
|
|
79
|
+
a as b,
|
|
80
|
+
u as c,
|
|
79
81
|
i as d,
|
|
80
82
|
O as e,
|
|
81
83
|
l as i,
|
|
82
|
-
|
|
84
|
+
y as m,
|
|
83
85
|
o,
|
|
84
86
|
p
|
|
85
87
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";function f(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function s(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]=s(e[r]));return t}function c(e,t,r=f){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={};if(!e)return 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=s;exports.compareObjects=i;exports.isESClass=a;exports.isNullish=u;exports.isObject=f;exports.mergeDeep=c;exports.mixin=O;exports.omit=o;exports.pick=l;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export declare class PageAnnouncerElement extends HTMLElement {
|
|
2
|
+
create(document: Document, title: string): void;
|
|
3
|
+
done(): void;
|
|
4
|
+
connectedCallback(): void;
|
|
5
|
+
}
|
|
6
|
+
declare global {
|
|
7
|
+
interface HTMLElementTagNameMap {
|
|
8
|
+
'e-page-announcer': PageAnnouncerElement;
|
|
9
|
+
}
|
|
10
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../PageAnnouncerElement-C4k2kDJ5.cjs");exports.PageAnnouncerElement=e.PageAnnouncerElement;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { PageAnnouncerElement } from './PageAnnouncerElement';
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export interface PageScrollDetail {
|
|
2
|
+
left: number;
|
|
3
|
+
top: number;
|
|
4
|
+
}
|
|
5
|
+
export type PageScrollEvent = CustomEvent<PageScrollDetail>;
|
|
6
|
+
export declare class PageScroll {
|
|
7
|
+
#private;
|
|
8
|
+
constructor(selector?: string);
|
|
9
|
+
get element(): HTMLElement | Window;
|
|
10
|
+
get x(): number;
|
|
11
|
+
get y(): number;
|
|
12
|
+
get value(): {
|
|
13
|
+
top: number;
|
|
14
|
+
left: number;
|
|
15
|
+
};
|
|
16
|
+
destroy(): void;
|
|
17
|
+
update(): void;
|
|
18
|
+
}
|
|
19
|
+
declare global {
|
|
20
|
+
interface DocumentEventMap {
|
|
21
|
+
pageScrollEvent: PageScrollEvent;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../PageScroll-C7QBpx0G.cjs");exports.PageScroll=e.PageScroll;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { PageScroll, type PageScrollDetail, type PageScrollEvent, } from './PageScroll';
|
|
@@ -3,9 +3,9 @@ var f = (e) => {
|
|
|
3
3
|
};
|
|
4
4
|
var y = (e, s, t) => s.has(e) || f("Cannot " + t);
|
|
5
5
|
var i = (e, s, t) => (y(e, s, "read from private field"), t ? t.call(e) : s.get(e)), r = (e, s, t) => s.has(e) ? f("Cannot add the same private member more than once") : s instanceof WeakSet ? s.add(e) : s.set(e, t), c = (e, s, t, l) => (y(e, s, "write to private field"), l ? l.call(e, t) : s.set(e, t), t);
|
|
6
|
-
import { f as x } from "../dom-
|
|
7
|
-
import { c as g } from "../stylesheet-
|
|
8
|
-
import "../index-
|
|
6
|
+
import { f as x } from "../dom-BIeVMHfK.js";
|
|
7
|
+
import { c as g } from "../stylesheet-DbHOxtjw.js";
|
|
8
|
+
import "../index-LReFyN6i.js";
|
|
9
9
|
const v = g(
|
|
10
10
|
/*css*/
|
|
11
11
|
`
|
package/lib/pointer/index.js
CHANGED
|
@@ -14,14 +14,14 @@ var W = (i, s, e) => s in i ? G(i, s, { enumerable: !0, configurable: !0, writab
|
|
|
14
14
|
};
|
|
15
15
|
var q = (i, s, e) => s.has(i) || X("Cannot " + e);
|
|
16
16
|
var t = (i, s, e) => (q(i, s, "read from private field"), e ? e.call(i) : s.get(i)), r = (i, s, e) => s.has(i) ? X("Cannot add the same private member more than once") : s instanceof WeakSet ? s.add(i) : s.set(i, e), h = (i, s, e, m) => (q(i, s, "write to private field"), m ? m.call(i, e) : s.set(i, e), e), B = (i, s, e) => (q(i, s, "access private method"), e);
|
|
17
|
-
import "../Store-
|
|
17
|
+
import "../Store-CgQ3ReoB.js";
|
|
18
18
|
import { g as K, s as N, n as O } from "../coordinates-CgdGoSYs.js";
|
|
19
|
-
import { g as Q } from "../dom-
|
|
19
|
+
import { g as Q } from "../dom-BIeVMHfK.js";
|
|
20
20
|
import { c as j } from "../math-BOBiC4TN.js";
|
|
21
21
|
import "construct-style-sheets-polyfill";
|
|
22
|
-
import { i as U } from "../index-
|
|
22
|
+
import { i as U } from "../index-LReFyN6i.js";
|
|
23
23
|
import "../ticker/index.js";
|
|
24
|
-
import { D } from "../Damped-
|
|
24
|
+
import { D } from "../Damped-DMnIOXpC.js";
|
|
25
25
|
import { elementResizer as A } from "../element-resizer/index.js";
|
|
26
26
|
import { windowResizer as F } from "../window-resizer/index.js";
|
|
27
27
|
import { CSSProperty as E } from "../css-property/index.js";
|
package/lib/popover/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var he=c=>{throw TypeError(c)};var se=(c,n,t)=>n.has(c)||he("Cannot "+t);var e=(c,n,t)=>(se(c,n,"read from private field"),t?t.call(c):n.get(c)),r=(c,n,t)=>n.has(c)?he("Cannot add the same private member more than once"):n instanceof WeakSet?n.add(c):n.set(c,t),o=(c,n,t,s)=>(se(c,n,"write to private field"),s?s.call(c,t):n.set(c,t),t),p=(c,n,t)=>(se(c,n,"access private method"),t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const fe=require("../element-linked-store/index.cjs"),y=require("../css-property/index.cjs"),oe=require("../index-CKTweR3M.cjs"),W=require("../events-KVanG9sR.cjs"),ge=require("../function-MthRj-GJ.cjs"),le=require("../style-At6aDoqG.cjs");require("construct-style-sheets-polyfill");const ce=require("../url-CoUSEREU.cjs"),ae=require("../window-resizer/index.cjs"),Z=require("../Viewport-Cx50Hufs.cjs");var f,w,ee,te;class ve{constructor(){r(this,f,new Map);r(this,w,[]);r(this,ee,n=>{var s;const t=[...e(this,w)].reverse().find(i=>i.clickOutside.current);if(t){const i=n.composedPath();if(i.find(Q=>Q instanceof HTMLElement&&Q.hasAttribute("data-popover-content")))return;const l=i[0],d=l instanceof Node&&(t.contains(l)||((s=t.shadowRoot)==null?void 0:s.contains(l))),L=l instanceof HTMLElement&&l.hasAttribute("data-outside");(!d||L)&&t.close()}});r(this,te,n=>{if(n.code==="Escape"){const t=[...e(this,w)].reverse().find(s=>s.escape.current);t&&t.close()}});document.documentElement.addEventListener("click",e(this,ee)),addEventListener("keydown",e(this,te))}get groups(){return e(this,f)}get stack(){return e(this,w)}add(n,t){if(t.closeRest.current)e(this,f).forEach(i=>{i.forEach(l=>{l.close()})});else if(t.closeRestInGroup.current){let i=e(this,f).get(n);i==null||i.forEach(l=>{l.close()})}let s=e(this,f).get(n);s!=null&&s.length||(s=[],e(this,f).set(n,s)),e(this,w).push(t),s.push(t)}remove(n,t){if(setTimeout(()=>{o(this,w,e(this,w).filter(s=>s!==t))}),t.closeRest.current){let s=[];e(this,f).forEach(i=>{i.forEach(l=>s.push(l))}),e(this,f).clear(),s.forEach(i=>i.close())}else if(t.closeRestInGroup.current){const s=e(this,f).get(n);e(this,f).delete(n),s==null||s.forEach(i=>{i.close()})}else{let s=e(this,f).get(n);s&&(s=s.filter(i=>i!==t),e(this,f).set(n,s))}}}f=new WeakMap,w=new WeakMap,ee=new WeakMap,te=new WeakMap;var v,B,H,R,G,m,T,P,q,$,b,V,O,k,E,z,a,M,D,u,ue,S,_,F,A,I,X,U;const C=class C extends HTMLElement{constructor(){super();r(this,u);r(this,v);r(this,B);r(this,H);r(this,R);r(this,G);r(this,m);r(this,T);r(this,P);r(this,q);r(this,$);r(this,b);r(this,V);r(this,O);r(this,k);r(this,E);r(this,z);r(this,a);r(this,M);r(this,D);r(this,F);r(this,A);r(this,I);r(this,X);r(this,U);this.urlValue="",o(this,v,!1),o(this,m,new y.CSSProperty(this,"--history",!1)),o(this,T,new y.CSSProperty(this,"--restore",!1)),o(this,P,new y.CSSProperty(this,"--dispatch-resize",!1)),o(this,q,new y.CSSProperty(this,"--close-rest",!1)),o(this,$,new y.CSSProperty(this,"--close-rest-in-group",!1)),o(this,b,new y.CSSProperty(this,"--group","")),o(this,V,new y.CSSProperty(this,"--click-outside",!1)),o(this,O,new y.CSSProperty(this,"--escape",!1)),o(this,k,new y.CSSProperty(this,"--check-viewport-bounds",!1)),o(this,E,!0),o(this,a,new fe.ElementLinkedStore(this,{triggered:!1,beforeopen:!1,opened:!1,closing:!1,transitionend:!1})),o(this,M,[]),o(this,D,[]),o(this,F,()=>{o(this,E,!1),e(this,v)&&e(this,m).current&&!location.search.includes(this.id)?this.close():!e(this,v)&&e(this,m).current&&location.search.includes(this.id)&&this.open({trigger:this.idWithValue}),o(this,E,!0)}),o(this,A,()=>{this.style.setProperty("--content-width","initial"),this.style.setProperty("--content-height","initial"),this.style.setProperty("--viewport-offset-x","0px"),this.style.setProperty("--viewport-offset-y","0px"),e(this,I).call(this)}),o(this,I,ge.debounce(()=>{e(this,X).call(this)},10)),o(this,X,()=>{if(this.style.setProperty("--content-width",this.scrollWidth+"px"),this.style.setProperty("--content-height",this.scrollHeight+"px"),e(this,k).current){const t=this.getBoundingClientRect();let s=0,i=0;t.right>Z.viewport.width?s=Z.viewport.width-t.right:t.left<0&&(s=t.left*-1),t.bottom>Z.viewport.height?i=Z.viewport.height-t.bottom:t.top<0&&(i=t.top*-1),this.style.setProperty("--viewport-offset-x",s+"px"),this.style.setProperty("--viewport-offset-y",i+"px")}}),o(this,U,()=>{this.close()}),e(this,b).subscribe(t=>{t.previous&&(C.stack.remove(t.previous,this),t.current||(document.documentElement.classList.remove(`${this.group.previous}-closing`),document.documentElement.classList.remove(`${this.group.previous}-opened`)))}),e(this,a).subscribe(t=>{if(this.group.current){document.documentElement.classList.toggle(`${this.group.current}-closing`,t.current.closing);const s=C.stack.groups.get(this.group.current),i=s==null?void 0:s.find(l=>l.opened);document.documentElement.classList.toggle(`${this.group.current}-opened`,!!i)}})}get openClass(){return this.getAttribute("data-open-global-class")}get closingClass(){return this.getAttribute("data-closing-global-class")}get history(){return e(this,m)}get restore(){return e(this,T)}get dispatchResize(){return e(this,P)}get closeRest(){return e(this,q)}get closeRestInGroup(){return e(this,$)}get group(){return e(this,b)}get clickOutside(){return e(this,V)}get escape(){return e(this,O)}get opened(){return e(this,v)}get lastTrigger(){return e(this,z)}get idWithValue(){return`${this.id}${this.urlValue?"="+this.urlValue:""}`}updateUrlValue(t){this.urlValue=(t==null?void 0:t.toString())||"",e(this,v)&&ce.updateSearchParameter(this.id,t)}open(t){if(e(this,v))return;o(this,z,t==null?void 0:t.trigger),clearTimeout(e(this,B)),clearTimeout(e(this,H)),p(this,u,S).call(this,!1,this.closingClass),e(this,a).set("closing",!1),e(this,a).set("triggered",!0),W.dispatchEvent(this,"popoverTriggered",{custom:!0,detail:{trigger:e(this,z)}}),e(this,m).current&&e(this,E)&&history.pushState(history.state,"",e(this,u,ue)),e(this,a).set("beforeopen",!0),o(this,v,!0);const s=()=>{C.stack.add(e(this,b).current,this),e(this,D).forEach(i=>{i.scroll({top:0,left:0,behavior:"instant"})}),p(this,u,S).call(this,!0,this.openClass),e(this,a).set("opened",!0),e(this,P).current?W.dispatchEvent(window,"resize",{custom:!0}):e(this,A).call(this),W.dispatchEvent(this,"popoverOpened",{custom:!0,detail:{trigger:e(this,z)},bubbles:!0}),o(this,R,void 0),o(this,G,setTimeout(()=>{e(this,a).set("transitionend",!0),W.dispatchEvent(this,"popoverTransitionend")},le.getElementTransitionDurationMS(this)+10))};t!=null&&t.skipTransition?s():o(this,R,requestAnimationFrame(s))}close(){e(this,v)&&(o(this,v,!1),cancelAnimationFrame(e(this,R)),clearTimeout(e(this,G)),C.stack.remove(e(this,b).current,this),p(this,u,_).call(this),o(this,B,setTimeout(()=>{e(this,a).set("transitionend",!1),e(this,a).set("opened",!1),e(this,a).set("closing",!0),p(this,u,S).call(this,!1,this.openClass),p(this,u,S).call(this,!0,this.closingClass),W.dispatchEvent(this,"popoverClosing",{custom:!0,bubbles:!0}),o(this,H,setTimeout(()=>{e(this,a).set("triggered",!1),e(this,a).set("beforeopen",!1),e(this,a).set("closing",!1),p(this,u,S).call(this,!1,this.closingClass),W.dispatchEvent(this,"popoverClosed",{custom:!0,bubbles:!0})},le.getElementTransitionDurationMS(this)+10))},10)))}connectedCallback(){o(this,M,[...this.querySelectorAll(`[data-popover-close${this.id?`="${this.id}"`:""}]`)]),e(this,M).forEach(t=>{t.addEventListener("click",e(this,U))}),o(this,D,[...this.querySelectorAll(`[data-popover-reset-scroll${this.id?`="${this.id}"`:""}]`)]),e(this,m).observe(),e(this,T).observe(),e(this,P).observe(),e(this,q).observe(),e(this,$).observe(),e(this,b).observe(),e(this,V).observe(),e(this,O).observe(),e(this,k).observe(),this.setAttribute("role","dialog"),addEventListener("popstate",e(this,F)),setTimeout(()=>{e(this,T).current?(o(this,E,!1),this.urlValue=ce.parseSearchParameters(location.search)[this.id],location.search.includes(this.id)&&this.open({trigger:this.idWithValue}),o(this,E,!0)):(p(this,u,_).call(this),o(this,E,!0))},0),e(this,k).subscribe(()=>{e(this,A).call(this)}),ae.windowResizer.subscribe(e(this,A))}disconnectedCallback(){e(this,M).forEach(t=>{t.removeEventListener("click",e(this,U))}),C.stack.remove(e(this,b).current,this),ae.windowResizer.unsubscribe(e(this,A)),e(this,m).close(),e(this,T).close(),e(this,P).close(),e(this,q).close(),e(this,$).close(),e(this,b).close(),e(this,V).close(),e(this,O).close(),e(this,k).close(),this.removeAttribute("role"),p(this,u,S).call(this,!1,this.openClass),p(this,u,S).call(this,!1,this.closingClass),clearTimeout(e(this,B)),clearTimeout(e(this,H)),clearTimeout(e(this,R)),clearTimeout(e(this,G)),removeEventListener("popstate",e(this,F)),this.style.removeProperty("--content-width"),this.style.removeProperty("--content-height"),this.style.removeProperty("--viewport-offset-x"),this.style.removeProperty("--viewport-offset-y"),p(this,u,_).call(this)}};v=new WeakMap,B=new WeakMap,H=new WeakMap,R=new WeakMap,G=new WeakMap,m=new WeakMap,T=new WeakMap,P=new WeakMap,q=new WeakMap,$=new WeakMap,b=new WeakMap,V=new WeakMap,O=new WeakMap,k=new WeakMap,E=new WeakMap,z=new WeakMap,a=new WeakMap,M=new WeakMap,D=new WeakMap,u=new WeakSet,ue=function(){return`${location.pathname}${location.search?location.search+"&":"?"}${this.idWithValue}`},S=function(t,s){s&&s.split(" ").map(i=>{document.documentElement.classList.toggle(i.trim(),t)})},_=function(){if(e(this,m).current){const t=new URL(location.href);t.searchParams.delete(this.id),history.replaceState(history.state,"",t.href)}},F=new WeakMap,A=new WeakMap,I=new WeakMap,X=new WeakMap,U=new WeakMap,C.stack=new ve;let j=C;oe.isBrowser&&!customElements.get("e-popover")&&customElements.define("e-popover",j);var h,g,x,ie,Y,J,K,N,re;class pe extends HTMLElement{constructor(){super();r(this,x);r(this,h);r(this,g,new y.CSSProperty(this,"--type","open"));r(this,Y,t=>{t.target===e(this,h)&&e(this,g).current!=="close"&&this.classList.add("triggered")});r(this,J,t=>{t.target===e(this,h)&&e(this,g).current!=="close"&&(this.classList.add("opened"),this.setAttribute("aria-expanded","true"))});r(this,K,t=>{t.target===e(this,h)&&e(this,g).current!=="close"&&this.classList.remove("opened")});r(this,N,t=>{t.target===e(this,h)&&e(this,g).current!=="close"&&(this.classList.remove("triggered"),this.setAttribute("aria-expanded","false"))});oe.isBrowser&&(this.addEventListener("click",()=>{if(e(this,h)){const t=e(this,g).current;t==="open"||t==="toggle"&&!e(this,h).opened?e(this,h).open({trigger:this}):(t==="close"||t==="toggle"&&e(this,h).opened)&&e(this,h).close()}}),this.addEventListener("keydown",t=>{t.code==="Space"&&!this.hasAttribute("keydown-disabled")&&(t.preventDefault(),this.click())}))}get type(){return e(this,g)}get popoverElement(){return e(this,h)}changePopover(t){var s;if(p(this,x,ie).call(this),t){let i=null;if(t==="parent"){const l=this.closest("[data-popover]");if(l)i=l;else{const d=this.getRootNode();d instanceof ShadowRoot?i=d.host.closest("[data-popover]"):d instanceof HTMLElement&&(i=d.closest("[data-popover]"))}}else if(t==="sibling")i=(s=this.parentElement)==null?void 0:s.querySelector("[data-popover]");else if(t==="ancestor-child"){const l=d=>{if(!d)return null;let L=d.querySelector("[data-popover]");return!L&&(d!=null&&d.parentElement)&&(L=l(d.parentElement)),L};i=l(this.parentElement)||null}else{let l=t;if(isNaN(parseInt(l))&&(!t.startsWith(".")&&!t.startsWith("[")&&!t.startsWith("#")&&(l=`#${t}`),i=document.querySelector(l)||this.getRootNode().querySelector(l)),!i){const L=[...document.querySelectorAll("[data-popover-ids]")].find(Q=>{var ne;return(ne=Q.getAttribute("data-popover-ids"))==null?void 0:ne.split(",").find(de=>de.trim()===t)});L&&(i=L)}}i instanceof HTMLElement?(o(this,h,i),e(this,h).addEventListener("popoverTriggered",e(this,Y)),e(this,h).addEventListener("popoverOpened",e(this,J)),e(this,h).addEventListener("popoverClosing",e(this,K)),e(this,h).addEventListener("popoverClosed",e(this,N))):console.warn(this,`target ${t} not found`)}p(this,x,re).call(this,e(this,g).current)}connectedCallback(){e(this,g).subscribe(s=>{p(this,x,re).call(this,s.current)}),this.hasAttribute("tabindex")||(this.tabIndex=0),this.hasAttribute("role")||this.setAttribute("role","button");const t=this.getAttribute("target");t&&this.changePopover(t),this.isConnected&&e(this,g).observe()}disconnectedCallback(){e(this,g).unobserve(),this.removeAttribute("aria-haspopup"),this.removeAttribute("aria-expanded"),this.removeAttribute("aria-controls"),this.removeAttribute("role"),this.removeAttribute("tabindex"),p(this,x,ie).call(this)}}h=new WeakMap,g=new WeakMap,x=new WeakSet,ie=function(){e(this,h)&&(e(this,h).removeEventListener("popoverTriggered",e(this,Y)),e(this,h).removeEventListener("popoverOpened",e(this,J)),e(this,h).removeEventListener("popoverClosing",e(this,K)),e(this,h).removeEventListener("popoverClosed",e(this,N)))},Y=new WeakMap,J=new WeakMap,K=new WeakMap,N=new WeakMap,re=function(t){e(this,h)instanceof j&&(t!=="close"?(this.setAttribute("aria-haspopup","true"),this.setAttribute("aria-expanded",e(this,h).opened?"true":"false"),this.setAttribute("aria-controls",e(this,h).id||"")):(this.removeAttribute("aria-haspopup"),this.removeAttribute("aria-expanded"),this.removeAttribute("aria-controls")))};oe.isBrowser&&!customElements.get("e-popover-button")&&customElements.define("e-popover-button",pe);exports.PopoverButtonElement=pe;exports.PopoverElement=j;
|
|
1
|
+
"use strict";var he=c=>{throw TypeError(c)};var se=(c,n,t)=>n.has(c)||he("Cannot "+t);var e=(c,n,t)=>(se(c,n,"read from private field"),t?t.call(c):n.get(c)),r=(c,n,t)=>n.has(c)?he("Cannot add the same private member more than once"):n instanceof WeakSet?n.add(c):n.set(c,t),o=(c,n,t,s)=>(se(c,n,"write to private field"),s?s.call(c,t):n.set(c,t),t),p=(c,n,t)=>(se(c,n,"access private method"),t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const fe=require("../element-linked-store/index.cjs"),y=require("../css-property/index.cjs"),oe=require("../index-CKTweR3M.cjs"),W=require("../events-KVanG9sR.cjs"),ge=require("../function-MthRj-GJ.cjs"),le=require("../style-At6aDoqG.cjs");require("construct-style-sheets-polyfill");const ce=require("../url-CPgw9bd5.cjs"),ae=require("../window-resizer/index.cjs"),Z=require("../Viewport-Cx50Hufs.cjs");var f,w,ee,te;class ve{constructor(){r(this,f,new Map);r(this,w,[]);r(this,ee,n=>{var s;const t=[...e(this,w)].reverse().find(i=>i.clickOutside.current);if(t){const i=n.composedPath();if(i.find(Q=>Q instanceof HTMLElement&&Q.hasAttribute("data-popover-content")))return;const l=i[0],d=l instanceof Node&&(t.contains(l)||((s=t.shadowRoot)==null?void 0:s.contains(l))),L=l instanceof HTMLElement&&l.hasAttribute("data-outside");(!d||L)&&t.close()}});r(this,te,n=>{if(n.code==="Escape"){const t=[...e(this,w)].reverse().find(s=>s.escape.current);t&&t.close()}});document.documentElement.addEventListener("click",e(this,ee)),addEventListener("keydown",e(this,te))}get groups(){return e(this,f)}get stack(){return e(this,w)}add(n,t){if(t.closeRest.current)e(this,f).forEach(i=>{i.forEach(l=>{l.close()})});else if(t.closeRestInGroup.current){let i=e(this,f).get(n);i==null||i.forEach(l=>{l.close()})}let s=e(this,f).get(n);s!=null&&s.length||(s=[],e(this,f).set(n,s)),e(this,w).push(t),s.push(t)}remove(n,t){if(setTimeout(()=>{o(this,w,e(this,w).filter(s=>s!==t))}),t.closeRest.current){let s=[];e(this,f).forEach(i=>{i.forEach(l=>s.push(l))}),e(this,f).clear(),s.forEach(i=>i.close())}else if(t.closeRestInGroup.current){const s=e(this,f).get(n);e(this,f).delete(n),s==null||s.forEach(i=>{i.close()})}else{let s=e(this,f).get(n);s&&(s=s.filter(i=>i!==t),e(this,f).set(n,s))}}}f=new WeakMap,w=new WeakMap,ee=new WeakMap,te=new WeakMap;var v,B,H,R,G,m,T,P,q,$,b,V,O,k,E,z,a,M,D,u,ue,S,_,F,A,I,X,U;const C=class C extends HTMLElement{constructor(){super();r(this,u);r(this,v);r(this,B);r(this,H);r(this,R);r(this,G);r(this,m);r(this,T);r(this,P);r(this,q);r(this,$);r(this,b);r(this,V);r(this,O);r(this,k);r(this,E);r(this,z);r(this,a);r(this,M);r(this,D);r(this,F);r(this,A);r(this,I);r(this,X);r(this,U);this.urlValue="",o(this,v,!1),o(this,m,new y.CSSProperty(this,"--history",!1)),o(this,T,new y.CSSProperty(this,"--restore",!1)),o(this,P,new y.CSSProperty(this,"--dispatch-resize",!1)),o(this,q,new y.CSSProperty(this,"--close-rest",!1)),o(this,$,new y.CSSProperty(this,"--close-rest-in-group",!1)),o(this,b,new y.CSSProperty(this,"--group","")),o(this,V,new y.CSSProperty(this,"--click-outside",!1)),o(this,O,new y.CSSProperty(this,"--escape",!1)),o(this,k,new y.CSSProperty(this,"--check-viewport-bounds",!1)),o(this,E,!0),o(this,a,new fe.ElementLinkedStore(this,{triggered:!1,beforeopen:!1,opened:!1,closing:!1,transitionend:!1})),o(this,M,[]),o(this,D,[]),o(this,F,()=>{o(this,E,!1),e(this,v)&&e(this,m).current&&!location.search.includes(this.id)?this.close():!e(this,v)&&e(this,m).current&&location.search.includes(this.id)&&this.open({trigger:this.idWithValue}),o(this,E,!0)}),o(this,A,()=>{this.style.setProperty("--content-width","initial"),this.style.setProperty("--content-height","initial"),this.style.setProperty("--viewport-offset-x","0px"),this.style.setProperty("--viewport-offset-y","0px"),e(this,I).call(this)}),o(this,I,ge.debounce(()=>{e(this,X).call(this)},10)),o(this,X,()=>{if(this.style.setProperty("--content-width",this.scrollWidth+"px"),this.style.setProperty("--content-height",this.scrollHeight+"px"),e(this,k).current){const t=this.getBoundingClientRect();let s=0,i=0;t.right>Z.viewport.width?s=Z.viewport.width-t.right:t.left<0&&(s=t.left*-1),t.bottom>Z.viewport.height?i=Z.viewport.height-t.bottom:t.top<0&&(i=t.top*-1),this.style.setProperty("--viewport-offset-x",s+"px"),this.style.setProperty("--viewport-offset-y",i+"px")}}),o(this,U,()=>{this.close()}),e(this,b).subscribe(t=>{t.previous&&(C.stack.remove(t.previous,this),t.current||(document.documentElement.classList.remove(`${this.group.previous}-closing`),document.documentElement.classList.remove(`${this.group.previous}-opened`)))}),e(this,a).subscribe(t=>{if(this.group.current){document.documentElement.classList.toggle(`${this.group.current}-closing`,t.current.closing);const s=C.stack.groups.get(this.group.current),i=s==null?void 0:s.find(l=>l.opened);document.documentElement.classList.toggle(`${this.group.current}-opened`,!!i)}})}get openClass(){return this.getAttribute("data-open-global-class")}get closingClass(){return this.getAttribute("data-closing-global-class")}get history(){return e(this,m)}get restore(){return e(this,T)}get dispatchResize(){return e(this,P)}get closeRest(){return e(this,q)}get closeRestInGroup(){return e(this,$)}get group(){return e(this,b)}get clickOutside(){return e(this,V)}get escape(){return e(this,O)}get opened(){return e(this,v)}get lastTrigger(){return e(this,z)}get idWithValue(){return`${this.id}${this.urlValue?"="+this.urlValue:""}`}updateUrlValue(t){this.urlValue=(t==null?void 0:t.toString())||"",e(this,v)&&ce.updateSearchParameter(this.id,t)}open(t){if(e(this,v))return;o(this,z,t==null?void 0:t.trigger),clearTimeout(e(this,B)),clearTimeout(e(this,H)),p(this,u,S).call(this,!1,this.closingClass),e(this,a).set("closing",!1),e(this,a).set("triggered",!0),W.dispatchEvent(this,"popoverTriggered",{custom:!0,detail:{trigger:e(this,z)}}),e(this,m).current&&e(this,E)&&history.pushState(history.state,"",e(this,u,ue)),e(this,a).set("beforeopen",!0),o(this,v,!0);const s=()=>{C.stack.add(e(this,b).current,this),e(this,D).forEach(i=>{i.scroll({top:0,left:0,behavior:"instant"})}),p(this,u,S).call(this,!0,this.openClass),e(this,a).set("opened",!0),e(this,P).current?W.dispatchEvent(window,"resize",{custom:!0}):e(this,A).call(this),W.dispatchEvent(this,"popoverOpened",{custom:!0,detail:{trigger:e(this,z)},bubbles:!0}),o(this,R,void 0),o(this,G,setTimeout(()=>{e(this,a).set("transitionend",!0),W.dispatchEvent(this,"popoverTransitionend")},le.getElementTransitionDurationMS(this)+10))};t!=null&&t.skipTransition?s():o(this,R,requestAnimationFrame(s))}close(){e(this,v)&&(o(this,v,!1),cancelAnimationFrame(e(this,R)),clearTimeout(e(this,G)),C.stack.remove(e(this,b).current,this),p(this,u,_).call(this),o(this,B,setTimeout(()=>{e(this,a).set("transitionend",!1),e(this,a).set("opened",!1),e(this,a).set("closing",!0),p(this,u,S).call(this,!1,this.openClass),p(this,u,S).call(this,!0,this.closingClass),W.dispatchEvent(this,"popoverClosing",{custom:!0,bubbles:!0}),o(this,H,setTimeout(()=>{e(this,a).set("triggered",!1),e(this,a).set("beforeopen",!1),e(this,a).set("closing",!1),p(this,u,S).call(this,!1,this.closingClass),W.dispatchEvent(this,"popoverClosed",{custom:!0,bubbles:!0})},le.getElementTransitionDurationMS(this)+10))},10)))}connectedCallback(){o(this,M,[...this.querySelectorAll(`[data-popover-close${this.id?`="${this.id}"`:""}]`)]),e(this,M).forEach(t=>{t.addEventListener("click",e(this,U))}),o(this,D,[...this.querySelectorAll(`[data-popover-reset-scroll${this.id?`="${this.id}"`:""}]`)]),e(this,m).observe(),e(this,T).observe(),e(this,P).observe(),e(this,q).observe(),e(this,$).observe(),e(this,b).observe(),e(this,V).observe(),e(this,O).observe(),e(this,k).observe(),this.setAttribute("role","dialog"),addEventListener("popstate",e(this,F)),setTimeout(()=>{e(this,T).current?(o(this,E,!1),this.urlValue=ce.parseSearchParameters(location.search)[this.id],location.search.includes(this.id)&&this.open({trigger:this.idWithValue}),o(this,E,!0)):(p(this,u,_).call(this),o(this,E,!0))},0),e(this,k).subscribe(()=>{e(this,A).call(this)}),ae.windowResizer.subscribe(e(this,A))}disconnectedCallback(){e(this,M).forEach(t=>{t.removeEventListener("click",e(this,U))}),C.stack.remove(e(this,b).current,this),ae.windowResizer.unsubscribe(e(this,A)),e(this,m).close(),e(this,T).close(),e(this,P).close(),e(this,q).close(),e(this,$).close(),e(this,b).close(),e(this,V).close(),e(this,O).close(),e(this,k).close(),this.removeAttribute("role"),p(this,u,S).call(this,!1,this.openClass),p(this,u,S).call(this,!1,this.closingClass),clearTimeout(e(this,B)),clearTimeout(e(this,H)),clearTimeout(e(this,R)),clearTimeout(e(this,G)),removeEventListener("popstate",e(this,F)),this.style.removeProperty("--content-width"),this.style.removeProperty("--content-height"),this.style.removeProperty("--viewport-offset-x"),this.style.removeProperty("--viewport-offset-y"),p(this,u,_).call(this)}};v=new WeakMap,B=new WeakMap,H=new WeakMap,R=new WeakMap,G=new WeakMap,m=new WeakMap,T=new WeakMap,P=new WeakMap,q=new WeakMap,$=new WeakMap,b=new WeakMap,V=new WeakMap,O=new WeakMap,k=new WeakMap,E=new WeakMap,z=new WeakMap,a=new WeakMap,M=new WeakMap,D=new WeakMap,u=new WeakSet,ue=function(){return`${location.pathname}${location.search?location.search+"&":"?"}${this.idWithValue}`},S=function(t,s){s&&s.split(" ").map(i=>{document.documentElement.classList.toggle(i.trim(),t)})},_=function(){if(e(this,m).current){const t=new URL(location.href);t.searchParams.delete(this.id),history.replaceState(history.state,"",t.href)}},F=new WeakMap,A=new WeakMap,I=new WeakMap,X=new WeakMap,U=new WeakMap,C.stack=new ve;let j=C;oe.isBrowser&&!customElements.get("e-popover")&&customElements.define("e-popover",j);var h,g,x,ie,Y,J,K,N,re;class pe extends HTMLElement{constructor(){super();r(this,x);r(this,h);r(this,g,new y.CSSProperty(this,"--type","open"));r(this,Y,t=>{t.target===e(this,h)&&e(this,g).current!=="close"&&this.classList.add("triggered")});r(this,J,t=>{t.target===e(this,h)&&e(this,g).current!=="close"&&(this.classList.add("opened"),this.setAttribute("aria-expanded","true"))});r(this,K,t=>{t.target===e(this,h)&&e(this,g).current!=="close"&&this.classList.remove("opened")});r(this,N,t=>{t.target===e(this,h)&&e(this,g).current!=="close"&&(this.classList.remove("triggered"),this.setAttribute("aria-expanded","false"))});oe.isBrowser&&(this.addEventListener("click",()=>{if(e(this,h)){const t=e(this,g).current;t==="open"||t==="toggle"&&!e(this,h).opened?e(this,h).open({trigger:this}):(t==="close"||t==="toggle"&&e(this,h).opened)&&e(this,h).close()}}),this.addEventListener("keydown",t=>{t.code==="Space"&&!this.hasAttribute("keydown-disabled")&&(t.preventDefault(),this.click())}))}get type(){return e(this,g)}get popoverElement(){return e(this,h)}changePopover(t){var s;if(p(this,x,ie).call(this),t){let i=null;if(t==="parent"){const l=this.closest("[data-popover]");if(l)i=l;else{const d=this.getRootNode();d instanceof ShadowRoot?i=d.host.closest("[data-popover]"):d instanceof HTMLElement&&(i=d.closest("[data-popover]"))}}else if(t==="sibling")i=(s=this.parentElement)==null?void 0:s.querySelector("[data-popover]");else if(t==="ancestor-child"){const l=d=>{if(!d)return null;let L=d.querySelector("[data-popover]");return!L&&(d!=null&&d.parentElement)&&(L=l(d.parentElement)),L};i=l(this.parentElement)||null}else{let l=t;if(isNaN(parseInt(l))&&(!t.startsWith(".")&&!t.startsWith("[")&&!t.startsWith("#")&&(l=`#${t}`),i=document.querySelector(l)||this.getRootNode().querySelector(l)),!i){const L=[...document.querySelectorAll("[data-popover-ids]")].find(Q=>{var ne;return(ne=Q.getAttribute("data-popover-ids"))==null?void 0:ne.split(",").find(de=>de.trim()===t)});L&&(i=L)}}i instanceof HTMLElement?(o(this,h,i),e(this,h).addEventListener("popoverTriggered",e(this,Y)),e(this,h).addEventListener("popoverOpened",e(this,J)),e(this,h).addEventListener("popoverClosing",e(this,K)),e(this,h).addEventListener("popoverClosed",e(this,N))):console.warn(this,`target ${t} not found`)}p(this,x,re).call(this,e(this,g).current)}connectedCallback(){e(this,g).subscribe(s=>{p(this,x,re).call(this,s.current)}),this.hasAttribute("tabindex")||(this.tabIndex=0),this.hasAttribute("role")||this.setAttribute("role","button");const t=this.getAttribute("target");t&&this.changePopover(t),this.isConnected&&e(this,g).observe()}disconnectedCallback(){e(this,g).unobserve(),this.removeAttribute("aria-haspopup"),this.removeAttribute("aria-expanded"),this.removeAttribute("aria-controls"),this.removeAttribute("role"),this.removeAttribute("tabindex"),p(this,x,ie).call(this)}}h=new WeakMap,g=new WeakMap,x=new WeakSet,ie=function(){e(this,h)&&(e(this,h).removeEventListener("popoverTriggered",e(this,Y)),e(this,h).removeEventListener("popoverOpened",e(this,J)),e(this,h).removeEventListener("popoverClosing",e(this,K)),e(this,h).removeEventListener("popoverClosed",e(this,N)))},Y=new WeakMap,J=new WeakMap,K=new WeakMap,N=new WeakMap,re=function(t){e(this,h)instanceof j&&(t!=="close"?(this.setAttribute("aria-haspopup","true"),this.setAttribute("aria-expanded",e(this,h).opened?"true":"false"),this.setAttribute("aria-controls",e(this,h).id||"")):(this.removeAttribute("aria-haspopup"),this.removeAttribute("aria-expanded"),this.removeAttribute("aria-controls")))};oe.isBrowser&&!customElements.get("e-popover-button")&&customElements.define("e-popover-button",pe);exports.PopoverButtonElement=pe;exports.PopoverElement=j;
|
package/lib/popover/index.js
CHANGED
|
@@ -5,14 +5,14 @@ var st = (c, h, e) => h.has(c) || nt("Cannot " + e);
|
|
|
5
5
|
var t = (c, h, e) => (st(c, h, "read from private field"), e ? e.call(c) : h.get(c)), r = (c, h, e) => h.has(c) ? nt("Cannot add the same private member more than once") : h instanceof WeakSet ? h.add(c) : h.set(c, e), o = (c, h, e, s) => (st(c, h, "write to private field"), s ? s.call(c, e) : h.set(c, e), e), p = (c, h, e) => (st(c, h, "access private method"), e);
|
|
6
6
|
import { ElementLinkedStore as pt } from "../element-linked-store/index.js";
|
|
7
7
|
import { CSSProperty as E } from "../css-property/index.js";
|
|
8
|
-
import { i as ot } from "../index-
|
|
8
|
+
import { i as ot } from "../index-LReFyN6i.js";
|
|
9
9
|
import { d as W } from "../events-CsVF98U6.js";
|
|
10
10
|
import { d as dt } from "../function-C10DGppn.js";
|
|
11
11
|
import { g as lt } from "../style-j2TwriJ_.js";
|
|
12
12
|
import "construct-style-sheets-polyfill";
|
|
13
|
-
import { u as ft, p as gt } from "../url-
|
|
13
|
+
import { u as ft, p as gt } from "../url-DAl-mgbC.js";
|
|
14
14
|
import { windowResizer as ct } from "../window-resizer/index.js";
|
|
15
|
-
import { v as Q } from "../Viewport-
|
|
15
|
+
import { v as Q } from "../Viewport-DGnJ31b4.js";
|
|
16
16
|
var f, w, tt, et;
|
|
17
17
|
class mt {
|
|
18
18
|
constructor() {
|
package/lib/radio/index.js
CHANGED
|
@@ -5,7 +5,7 @@ var v = (i, a, t) => a.has(i) || b("Cannot " + t);
|
|
|
5
5
|
var e = (i, a, t) => (v(i, a, "read from private field"), t ? t.call(i) : a.get(i)), r = (i, a, t) => a.has(i) ? b("Cannot add the same private member more than once") : a instanceof WeakSet ? a.add(i) : a.set(i, t), d = (i, a, t, s) => (v(i, a, "write to private field"), s ? s.call(i, t) : a.set(i, t), t);
|
|
6
6
|
import { d as g } from "../events-CsVF98U6.js";
|
|
7
7
|
import "construct-style-sheets-polyfill";
|
|
8
|
-
import "../index-
|
|
8
|
+
import "../index-LReFyN6i.js";
|
|
9
9
|
var E, n, h, o, c, m, l, f;
|
|
10
10
|
class L extends HTMLElement {
|
|
11
11
|
constructor() {
|
|
@@ -15,12 +15,12 @@ var w = (r, s, t) => s in r ? O(r, s, { enumerable: !0, configurable: !0, writab
|
|
|
15
15
|
}, N = (r, s) => q(r, B(s));
|
|
16
16
|
var _ = (r, s, t) => s.has(r) || L("Cannot " + t);
|
|
17
17
|
var p = (r, s, t) => (_(r, s, "read from private field"), t ? t.call(r) : s.get(r)), m = (r, s, t) => s.has(r) ? L("Cannot add the same private member more than once") : s instanceof WeakSet ? s.add(r) : s.set(r, t), C = (r, s, t, o) => (_(r, s, "write to private field"), o ? o.call(r, t) : s.set(r, t), t);
|
|
18
|
-
import { S as l } from "./Store-
|
|
18
|
+
import { S as l } from "./Store-CgQ3ReoB.js";
|
|
19
19
|
import { c as R } from "./string-BlMQbe8b.js";
|
|
20
20
|
import "construct-style-sheets-polyfill";
|
|
21
|
-
import "./index-
|
|
21
|
+
import "./index-LReFyN6i.js";
|
|
22
22
|
import { connector as H } from "./connector/index.js";
|
|
23
|
-
import { a as M } from "./DerivedArray-
|
|
23
|
+
import { a as M } from "./DerivedArray-DG9iR0mf.js";
|
|
24
24
|
const $ = { current: null };
|
|
25
25
|
var b, u;
|
|
26
26
|
class z extends HTMLElement {
|
package/lib/router/Route.d.ts
CHANGED
|
@@ -14,7 +14,6 @@ export declare class Route {
|
|
|
14
14
|
get element(): HTMLElement | null;
|
|
15
15
|
get nest(): Element | ShadowRoot | null;
|
|
16
16
|
testPathname(pathname: string): boolean;
|
|
17
|
-
render(container: Element | ShadowRoot,
|
|
17
|
+
render(container: Element | ShadowRoot, url: URL): Promise<void>;
|
|
18
18
|
close(): void;
|
|
19
|
-
getAnchorElements(): HTMLAnchorElement[];
|
|
20
19
|
}
|