aptechka 0.23.0 → 0.25.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/device/Device.d.ts +0 -2
- package/lib/device/index.cjs +1 -1
- package/lib/device/index.js +114 -5
- package/lib/need_redo_tweaker/index.cjs +3 -3
- package/lib/need_redo_tweaker/index.js +14 -15
- package/lib/{object-DOa0yKM9.js → style-3MQV6Cnl.js} +22 -14
- package/lib/style-BoXabX_p.cjs +1 -0
- package/lib/utils/index.cjs +1 -1
- package/lib/utils/index.js +50 -51
- package/package.json +1 -15
- package/lib/Viewport-BDPsnAF4.cjs +0 -1
- package/lib/Viewport-taEXS8Uv.js +0 -123
- package/lib/object-HBC5QlzO.cjs +0 -1
- package/lib/popover/PopoverButtonElement.d.ts +0 -14
- package/lib/popover/PopoverElement.d.ts +0 -25
- package/lib/popover/index.cjs +0 -1
- package/lib/popover/index.d.ts +0 -2
- package/lib/popover/index.js +0 -160
- package/lib/style-At6aDoqG.cjs +0 -1
- package/lib/style-j2TwriJ_.js +0 -10
package/lib/device/Device.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { TierResult } from 'detect-gpu';
|
|
2
1
|
export type DeviceOS = 'macOS' | 'iOS' | 'Windows' | 'Android' | 'Linux' | 'unknown';
|
|
3
2
|
declare class Device {
|
|
4
3
|
#private;
|
|
@@ -6,7 +5,6 @@ declare class Device {
|
|
|
6
5
|
get OS(): string;
|
|
7
6
|
get gpu(): string;
|
|
8
7
|
get gpuTier(): number;
|
|
9
|
-
get gpuDetection(): Promise<TierResult>;
|
|
10
8
|
get isMobile(): boolean;
|
|
11
9
|
get isTouch(): boolean;
|
|
12
10
|
get isWebgl(): boolean;
|
package/lib/device/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";var P=t=>{throw TypeError(t)};var S=(t,s,n)=>s.has(t)||P("Cannot "+n);var i=(t,s,n)=>(S(t,s,"read from private field"),n?n.call(t):s.get(t)),o=(t,s,n)=>s.has(t)?P("Cannot add the same private member more than once"):s instanceof WeakSet?s.add(t):s.set(t,n),e=(t,s,n,f)=>(S(t,s,"write to private field"),f?f.call(t,n):s.set(t,n),n);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const W=require("../order/index.cjs"),k=require("../window-resizer/index.cjs"),z=require("../browser-CpzFX2xg.cjs"),D=require("../Store-CDb6RMce.cjs");var r,p,b,d,a,u,l,c;class M{constructor(){o(this,r);o(this,p);o(this,b);o(this,d);o(this,a);o(this,u);o(this,l);o(this,c);var s,n;if(e(this,r,"unknown"),e(this,p,"unknown"),e(this,b,0),e(this,d,!1),e(this,a,!1),e(this,u,!1),e(this,l,!1),e(this,c,!1),this.resize=()=>{e(this,d,/Mobi|Android/i.test(navigator.userAgent)),e(this,a,"ontouchstart"in window||navigator.maxTouchPoints>0),setTimeout(()=>{e(this,a,"ontouchstart"in window||navigator.maxTouchPoints>0)},0)},z.isBrowser){this.resize(),k.windowResizer.subscribe(this.resize,W.RESIZE_ORDER.DEVICE);{const x=document.createElement("canvas"),E=x.getContext("webgl")||x.getContext("experimental-webgl");e(this,u,E&&E instanceof WebGLRenderingContext||!1)}{const x=document.createElement("canvas");x.getContext("2d")&&e(this,l,x.toDataURL("image/webp").indexOf("data:image/webp")==0)}const f=window.navigator.userAgent,v=((n=(s=window.navigator)==null?void 0:s.userAgentData)==null?void 0:n.platform)||window.navigator.platform,C=["Macintosh","MacIntel","MacPPC","Mac68K","macOS"],R=["Win32","Win64","Windows","WinCE"],T=["iPhone","iPad","iPod"];C.includes(v)?(e(this,r,"macOS"),e(this,c,!0)):T.includes(v)?(e(this,r,"iOS"),e(this,c,!0)):R.includes(v)?e(this,r,"Windows"):/Android/.test(f)?e(this,r,"Android"):/Linux/.test(v)?e(this,r,"Linux"):e(this,r,"unknown")}}get OS(){return i(this,r)}get gpu(){return i(this,p)}get gpuTier(){return i(this,b)}get isMobile(){return i(this,d)}get isTouch(){return i(this,a)}get isWebgl(){return i(this,u)}get isWebp(){return i(this,l)}get isApple(){return i(this,c)}}r=new WeakMap,p=new WeakMap,b=new WeakMap,d=new WeakMap,a=new WeakMap,u=new WeakMap,l=new WeakMap,c=new WeakMap;const I=new M;var A=(t=>(t.mobile="600px",t.tablet="1024px",t.notebook="1280px",t.desktop="1281px",t))(A||{}),O=(t=>(t["<=mobile"]="(max-width: 600px)",t[">=mobile"]="(min-width: 601px)",t["<=tablet"]="(max-width: 1024px)",t[">=tablet"]="(min-width: 1025px)",t["<=notebook"]="(max-width: 1280px)",t[">=notebook"]="(min-width: 1281px)",t["<=desktop"]="(max-width: 1280px)",t[">=desktop"]="(min-width: 1281px)",t))(O||{}),m,g,w,h;class q{constructor(){o(this,m);o(this,g);o(this,w);o(this,h);e(this,m,0),e(this,g,0),e(this,w,0),e(this,h,new D.Store(void 0)),this.resize=()=>{e(this,m,document.documentElement.clientWidth),e(this,g,innerHeight),e(this,w,devicePixelRatio),matchMedia("(max-width: 600px)").matches?i(this,h).current="mobile":matchMedia("(max-width: 1024px)").matches?i(this,h).current="tablet":matchMedia("(max-width: 1280px)").matches?i(this,h).current="notebook":matchMedia("(min-width: 1281px)").matches&&(i(this,h).current="desktop")},z.isBrowser&&(this.resize(),k.windowResizer.subscribe(this.resize,W.RESIZE_ORDER.DEVICE))}get width(){return i(this,m)}get height(){return i(this,g)}get type(){return i(this,h)}get pixelRatio(){return i(this,w)}}m=new WeakMap,g=new WeakMap,w=new WeakMap,h=new WeakMap;const y=new q;exports.ViewportBreakpoints=A;exports.ViewportMediaRules=O;exports.device=I;exports.viewport=y;
|
package/lib/device/index.js
CHANGED
|
@@ -1,7 +1,116 @@
|
|
|
1
|
-
|
|
1
|
+
var P = (t) => {
|
|
2
|
+
throw TypeError(t);
|
|
3
|
+
};
|
|
4
|
+
var W = (t, s, n) => s.has(t) || P("Cannot " + n);
|
|
5
|
+
var e = (t, s, n) => (W(t, s, "read from private field"), n ? n.call(t) : s.get(t)), o = (t, s, n) => s.has(t) ? P("Cannot add the same private member more than once") : s instanceof WeakSet ? s.add(t) : s.set(t, n), i = (t, s, n, b) => (W(t, s, "write to private field"), b ? b.call(t, n) : s.set(t, n), n);
|
|
6
|
+
import { RESIZE_ORDER as A } from "../order/index.js";
|
|
7
|
+
import { windowResizer as k } from "../window-resizer/index.js";
|
|
8
|
+
import { i as C } from "../browser-0zX67oeU.js";
|
|
9
|
+
import { S as T } from "../Store-OTdcl6SX.js";
|
|
10
|
+
var h, w, f, m, a, d, l, c;
|
|
11
|
+
class D {
|
|
12
|
+
constructor() {
|
|
13
|
+
o(this, h);
|
|
14
|
+
o(this, w);
|
|
15
|
+
o(this, f);
|
|
16
|
+
o(this, m);
|
|
17
|
+
o(this, a);
|
|
18
|
+
o(this, d);
|
|
19
|
+
o(this, l);
|
|
20
|
+
o(this, c);
|
|
21
|
+
var s, n;
|
|
22
|
+
if (i(this, h, "unknown"), i(this, w, "unknown"), i(this, f, 0), i(this, m, !1), i(this, a, !1), i(this, d, !1), i(this, l, !1), i(this, c, !1), this.resize = () => {
|
|
23
|
+
i(this, m, /Mobi|Android/i.test(navigator.userAgent)), i(this, a, "ontouchstart" in window || navigator.maxTouchPoints > 0), setTimeout(() => {
|
|
24
|
+
i(this, a, "ontouchstart" in window || navigator.maxTouchPoints > 0);
|
|
25
|
+
}, 0);
|
|
26
|
+
}, C) {
|
|
27
|
+
this.resize(), k.subscribe(this.resize, A.DEVICE);
|
|
28
|
+
{
|
|
29
|
+
const p = document.createElement("canvas"), E = p.getContext("webgl") || p.getContext("experimental-webgl");
|
|
30
|
+
i(this, d, E && E instanceof WebGLRenderingContext || !1);
|
|
31
|
+
}
|
|
32
|
+
{
|
|
33
|
+
const p = document.createElement("canvas");
|
|
34
|
+
p.getContext("2d") && i(this, l, p.toDataURL("image/webp").indexOf("data:image/webp") == 0);
|
|
35
|
+
}
|
|
36
|
+
const b = window.navigator.userAgent, v = ((n = (s = window.navigator) == null ? void 0 : s.userAgentData) == null ? void 0 : n.platform) || window.navigator.platform, S = [
|
|
37
|
+
"Macintosh",
|
|
38
|
+
"MacIntel",
|
|
39
|
+
"MacPPC",
|
|
40
|
+
"Mac68K",
|
|
41
|
+
"macOS"
|
|
42
|
+
], z = ["Win32", "Win64", "Windows", "WinCE"], O = ["iPhone", "iPad", "iPod"];
|
|
43
|
+
S.includes(v) ? (i(this, h, "macOS"), i(this, c, !0)) : O.includes(v) ? (i(this, h, "iOS"), i(this, c, !0)) : z.includes(v) ? i(this, h, "Windows") : /Android/.test(b) ? i(this, h, "Android") : /Linux/.test(v) ? i(this, h, "Linux") : i(this, h, "unknown");
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
get OS() {
|
|
47
|
+
return e(this, h);
|
|
48
|
+
}
|
|
49
|
+
get gpu() {
|
|
50
|
+
return e(this, w);
|
|
51
|
+
}
|
|
52
|
+
get gpuTier() {
|
|
53
|
+
return e(this, f);
|
|
54
|
+
}
|
|
55
|
+
get isMobile() {
|
|
56
|
+
return e(this, m);
|
|
57
|
+
}
|
|
58
|
+
get isTouch() {
|
|
59
|
+
return e(this, a);
|
|
60
|
+
}
|
|
61
|
+
get isWebgl() {
|
|
62
|
+
return e(this, d);
|
|
63
|
+
}
|
|
64
|
+
get isWebp() {
|
|
65
|
+
return e(this, l);
|
|
66
|
+
}
|
|
67
|
+
get isApple() {
|
|
68
|
+
return e(this, c);
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
h = new WeakMap(), w = new WeakMap(), f = new WeakMap(), m = new WeakMap(), a = new WeakMap(), d = new WeakMap(), l = new WeakMap(), c = new WeakMap();
|
|
72
|
+
const U = new D();
|
|
73
|
+
var I = /* @__PURE__ */ ((t) => (t.mobile = "600px", t.tablet = "1024px", t.notebook = "1280px", t.desktop = "1281px", t))(I || {}), L = /* @__PURE__ */ ((t) => (t["<=mobile"] = "(max-width: 600px)", t[">=mobile"] = "(min-width: 601px)", t["<=tablet"] = "(max-width: 1024px)", t[">=tablet"] = "(min-width: 1025px)", t["<=notebook"] = "(max-width: 1280px)", t[">=notebook"] = "(min-width: 1281px)", t["<=desktop"] = "(max-width: 1280px)", t[">=desktop"] = "(min-width: 1281px)", t))(L || {}), u, g, x, r;
|
|
74
|
+
class M {
|
|
75
|
+
constructor() {
|
|
76
|
+
o(this, u);
|
|
77
|
+
o(this, g);
|
|
78
|
+
o(this, x);
|
|
79
|
+
o(this, r);
|
|
80
|
+
i(this, u, 0), i(this, g, 0), i(this, x, 0), i(this, r, new T(void 0)), this.resize = () => {
|
|
81
|
+
i(this, u, document.documentElement.clientWidth), i(this, g, innerHeight), i(this, x, devicePixelRatio), matchMedia(
|
|
82
|
+
"(max-width: 600px)"
|
|
83
|
+
/* <=mobile */
|
|
84
|
+
).matches ? e(this, r).current = "mobile" : matchMedia(
|
|
85
|
+
"(max-width: 1024px)"
|
|
86
|
+
/* <=tablet */
|
|
87
|
+
).matches ? e(this, r).current = "tablet" : matchMedia(
|
|
88
|
+
"(max-width: 1280px)"
|
|
89
|
+
/* <=notebook */
|
|
90
|
+
).matches ? e(this, r).current = "notebook" : matchMedia(
|
|
91
|
+
"(min-width: 1281px)"
|
|
92
|
+
/* >=desktop */
|
|
93
|
+
).matches && (e(this, r).current = "desktop");
|
|
94
|
+
}, C && (this.resize(), k.subscribe(this.resize, A.DEVICE));
|
|
95
|
+
}
|
|
96
|
+
get width() {
|
|
97
|
+
return e(this, u);
|
|
98
|
+
}
|
|
99
|
+
get height() {
|
|
100
|
+
return e(this, g);
|
|
101
|
+
}
|
|
102
|
+
get type() {
|
|
103
|
+
return e(this, r);
|
|
104
|
+
}
|
|
105
|
+
get pixelRatio() {
|
|
106
|
+
return e(this, x);
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
u = new WeakMap(), g = new WeakMap(), x = new WeakMap(), r = new WeakMap();
|
|
110
|
+
const Z = new M();
|
|
2
111
|
export {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
112
|
+
I as ViewportBreakpoints,
|
|
113
|
+
L as ViewportMediaRules,
|
|
114
|
+
U as device,
|
|
115
|
+
Z as viewport
|
|
7
116
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";var vt=r=>{throw TypeError(r)};var Xe=(r,s,t)=>s.has(r)||vt("Cannot "+t);var e=(r,s,t)=>(Xe(r,s,"read from private field"),t?t.call(r):s.get(r)),o=(r,s,t)=>s.has(r)?vt("Cannot add the same private member more than once"):s instanceof WeakSet?s.add(r):s.set(r,t),c=(r,s,t,i)=>(Xe(r,s,"write to private field"),i?i.call(r,t):s.set(r,t),t),l=(r,s,t)=>(Xe(r,s,"access private method"),t);const U=require("../browser-CpzFX2xg.cjs"),p=require("../Store-CDb6RMce.cjs"),ue=require("../object-HBC5QlzO.cjs"),Jt=require("../function-MthRj-GJ.cjs"),St=require("../gestures-DHLrn6Q8.cjs");require("../ticker/index.cjs");const we=require("../string-DhgS_iFl.cjs"),Yt=require("../connector/index.cjs"),Gt=require("../Viewport-BDPsnAF4.cjs"),Be=require("../polyfills-Caa6z-Ay.cjs"),yt=require("../element-resizer/index.cjs"),Ut=require("../style-At6aDoqG.cjs"),Xt=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,$,y,be,I,H,a,kt,Et,xt,Qe,je,Ct,Tt,Lt,zt,et,tt,Rt,st,it,Mt,nt,_e,ot,rt,at,Ze,We;const Je=class Je{constructor(...s){o(this,a);o(this,d,null);o(this,$,new Set);o(this,y,new Set);o(this,be);o(this,I);o(this,H);o(this,Ze,s=>{e(this,$).forEach(t=>{t(s)}),e(this,$).clear()});o(this,We,(s,t)=>{e(this,y).forEach(i=>{i(s,t)}),e(this,y).clear(),l(this,a,it).call(this)});if(U.isBrowser){const t=s[0],i=s[1];c(this,d,l(this,a,kt).call(this,t,i==null?void 0:i.forceSvg)),l(this,a,xt).call(this,i)}}get node(){return e(this,d)}set node(s){var t;l(this,a,it).call(this),c(this,d,s),(t=e(this,be))==null||t.call(this),e(this,d)instanceof Element&&c(this,I,[...e(this,d).querySelectorAll("store-root")]),l(this,a,st).call(this),l(this,a,Qe).call(this)}};d=new WeakMap,$=new WeakMap,y=new WeakMap,be=new WeakMap,I=new WeakMap,H=new WeakMap,a=new WeakSet,kt=function(s,t){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 Xt.has(s)||t?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 t=l(this,a,Et).call(this,e(this,d)),i=s.ref;delete s.ref,s!=null&&s.onConnect&&(e(this,$).add(s.onConnect),delete s.onConnect),s!=null&&s.onDisconnect&&(e(this,y).add(s.onDisconnect),delete s.onDisconnect);let n,h;for(const u in s){const g=s[u];u==="class"&&t?l(this,a,je).call(this,g):u==="style"&&t?l(this,a,Lt).call(this,g):u==="lightChildren"?l(this,a,_e).call(this,e(this,d),g):u==="children"?l(this,a,_e).call(this,e(this,d)instanceof Element?e(this,d).shadowRoot||e(this,d):e(this,d),g):u==="connectedClass"?e(this,$).add(()=>{requestAnimationFrame(()=>{e(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(e(this,d)):i.current=e(this,d)),l(this,a,Qe).call(this)},Qe=function(){if(U.isBrowser&&(e(this,y).size||e(this,$).size)){const s=e(this,d)instanceof DocumentFragment?e(this,d).firstChild:e(this,d);c(this,be,Yt.connector.subscribe(s,{connectCallback:e(this,Ze),disconnectCallback:e(this,We),unsubscribeAfterDisconnect:!0,maxWaitSec:20}))}},je=function(s){if(s){if(typeof s=="string")e(this,d).classList.add(s);else if(Array.isArray(s))s.forEach(t=>{t&&l(this,a,je).call(this,t)});else if(typeof s=="object")if(s instanceof p.Store)l(this,a,Ct).call(this,s);else for(const t in s){const i=s[t];i instanceof p.Store?l(this,a,Tt).call(this,t,i):i?e(this,d).classList.add(t):e(this,d).classList.remove(t)}}else return},Ct=function(s){e(this,y).add(s.subscribe(({current:t,previous:i})=>{i&&[i].flat().forEach(n=>{n&&e(this,d).classList.remove(n)}),t&&[t].flat().forEach(n=>{n&&e(this,d).classList.add(n)})}))},Tt=function(s,t){e(this,y).add(t.subscribe(({current:i})=>{i?e(this,d).classList.add(s):e(this,d).classList.remove(s)}))},Lt=function(s){if(!s)return;e(this,d).tagName==="style"||e(this,d).tagName==="STYLE"?l(this,a,et).call(this,s):l(this,a,zt).call(this,s)},zt=function(s){for(const t in s){const i=t,n=s[i];n instanceof p.Store?e(this,y).add(n.subscribe(({current:h})=>{l(this,a,tt).call(this,i,h)})):l(this,a,tt).call(this,i,n)}},et=function(s){for(const t in s){const i=s[t];if(typeof i=="object"&&!(i instanceof p.Store))e(this,d).appendChild(document.createTextNode(`${t} {`)),l(this,a,et).call(this,i),e(this,d).appendChild(document.createTextNode("}"));else if(i instanceof p.Store){const n=document.createTextNode("");e(this,y).add(i.subscribe(h=>{h.current?n.nodeValue=`${we.camelToKebab(t)}: ${h.current};`:n.nodeValue=""})),e(this,d).appendChild(n)}else e(this,d).appendChild(document.createTextNode(`${we.camelToKebab(t)}: ${i};`))}},tt=function(s,t){s.includes("--")?t?e(this,d).style.setProperty(s,t.toString()):e(this,d).style.removeProperty(s):t?e(this,d).style[s]=t.toString():e(this,d).style[s]=""},Rt=function(s){if(s){e(this,H)||c(this,H,[]);for(const t in s){const i=t,n=we.uncapitalize(i.split("on").slice(1).join("on")),h=s[i];typeof h=="object"?e(this,H).push({name:n,callback:h.callback,options:h.options}):typeof h=="function"&&e(this,H).push({name:n,callback:h})}l(this,a,st).call(this)}},st=function(){var s;(s=e(this,H))==null||s.forEach(t=>{e(this,d).addEventListener(t.name,t.callback,t.options)})},it=function(){var s;(s=e(this,H))==null||s.forEach(t=>{e(this,d).removeEventListener(t.name,t.callback,t.options)})},Mt=function(s){for(const t in s){const i=s[t];i instanceof p.Store?e(this,y).add(i.subscribe(({current:n})=>{l(this,a,nt).call(this,t,n)})):l(this,a,nt).call(this,t,i)}},nt=function(s,t){var n,h;const i=e(this,d);if(s in i&&!((h=(n=i.constructor)==null?void 0:n.observedAttributes)!=null&&h.includes(s)))t!=null&&(i[s]=t.toString());else if(t!=null){const u=t.toString();s.includes("xlink")?i.setAttributeNS("http://www.w3.org/1999/xlink",s,u):i.setAttribute(s,u)}},_e=function(s,t){t&&(t=[t].flat(),t.forEach(i=>{if(i instanceof p.Store){const n=document.createElement("div");n.style.display="contents",s.appendChild(n),e(this,I)||c(this,I,[]);const h=e(this,I).length;n.setAttribute("store-root",""),e(this,I).push(n),e(this,y).add(i.subscribe(({current:u,previous:g})=>{const k=e(this,I)[h];k.dispatchEvent(new CustomEvent("beforeChildrenChange",{bubbles:!0,composed:!0}));const T=Array.from(k.childNodes),v=Array.isArray(u)?u:[u],pe=Array.isArray(g)?g:[g],qe=[],x=[];T.length&&pe.forEach((N,P)=>{v.includes(N)?x.push(N):qe.push(T[P])}),v.forEach((N,P)=>{if(x[P]!=null){if(N!==x[P]){const q=l(this,a,rt).call(this,N),O=T[P];q instanceof Node&&!O.isEqualNode(q)?k.replaceChild(q,O):k.removeChild(O)}}else{const q=l(this,a,rt).call(this,N);q instanceof Node&&n.appendChild(q)}}),qe.forEach(N=>{k.removeChild(N)}),k.dispatchEvent(new CustomEvent("afterChildrenChange",{bubbles:!0,composed:!0}))}))}else if(i instanceof Je)l(this,a,ot).call(this,s,i.node);else if(i instanceof Function)l(this,a,_e).call(this,s,ue.isESClass(i)?new i:i());else{const n=l(this,a,at).call(this,i);n instanceof Node&&l(this,a,ot).call(this,s,n)}}))},ot=function(s,t){!(s instanceof ShadowRoot)&&t instanceof HTMLElement&&t.tagName==="STYLE"?(e(this,$).add(()=>{[...document.head.querySelectorAll("style")].find(n=>n.outerHTML===t.outerHTML)||document.head.appendChild(t)}),e(this,y).add(()=>{t.remove()})):s.appendChild(t)},rt=function(s){return s instanceof Je?s.node:typeof s=="function"?ue.isESClass(s)?new s:s():l(this,a,at).call(this,s)},at=function(s){if(s instanceof Node)return s;if(s!=null){const t=String(s);if(t.trim().startsWith("<")&&t.trim().endsWith(">")){const i=document.createElement("div");return i.innerHTML=t,i.firstElementChild}else return document.createTextNode(t)}else return},Ze=new WeakMap,We=new WeakMap;let A=Je;function m(...r){return new A(...r)}function Qt(r){return new A("a",r)}function Q(r){return new A("button",r)}function b(r){return new A("div",r)}function Ve(r){return new A("input",r)}function At(r){return new A("label",r)}function fe(r){return new A("slot",r)}function lt(r){return new A("span",r)}function Nt(r){return new A("style",{style:r})}function E(r){const s=new CSSStyleSheet;return s.replaceSync(Nt(r).node.innerHTML),s}function jt(r,s){const t=s==null?void 0:s.prefix,i={style:{}};for(const n in r)i[n]={var:`var(--${t}${we.camelToKebab(n)})`,value:r[n]},i.style[`--${t}${we.camelToKebab(n)}`]=r[n];return i}const f=jt({colorMain:"#1c1c1c",colorMainAux:"#282828",colorFont:"#ffffff",colorActive:"#00E5B0",borderRadius:"12px",borderRadiusSmall:"4px"},{prefix:"aptechka-"});if(U.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>',Pt='<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>',es='<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>',ts='<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>',$t=`<svg
|
|
1
|
+
"use strict";var vt=r=>{throw TypeError(r)};var Xe=(r,s,t)=>s.has(r)||vt("Cannot "+t);var e=(r,s,t)=>(Xe(r,s,"read from private field"),t?t.call(r):s.get(r)),o=(r,s,t)=>s.has(r)?vt("Cannot add the same private member more than once"):s instanceof WeakSet?s.add(r):s.set(r,t),c=(r,s,t,i)=>(Xe(r,s,"write to private field"),i?i.call(r,t):s.set(r,t),t),l=(r,s,t)=>(Xe(r,s,"access private method"),t);const X=require("../browser-CpzFX2xg.cjs"),m=require("../Store-CDb6RMce.cjs"),U=require("../style-BoXabX_p.cjs"),Jt=require("../function-MthRj-GJ.cjs"),St=require("../gestures-DHLrn6Q8.cjs");require("../ticker/index.cjs");const we=require("../string-DhgS_iFl.cjs"),Yt=require("../connector/index.cjs"),Gt=require("../device/index.cjs"),Be=require("../polyfills-Caa6z-Ay.cjs"),yt=require("../element-resizer/index.cjs"),Ut=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,$,y,be,I,H,a,kt,Et,xt,Qe,je,Ct,Tt,Lt,zt,et,tt,Rt,st,it,Mt,nt,_e,ot,rt,at,Ze,We;const Je=class Je{constructor(...s){o(this,a);o(this,d,null);o(this,$,new Set);o(this,y,new Set);o(this,be);o(this,I);o(this,H);o(this,Ze,s=>{e(this,$).forEach(t=>{t(s)}),e(this,$).clear()});o(this,We,(s,t)=>{e(this,y).forEach(i=>{i(s,t)}),e(this,y).clear(),l(this,a,it).call(this)});if(X.isBrowser){const t=s[0],i=s[1];c(this,d,l(this,a,kt).call(this,t,i==null?void 0:i.forceSvg)),l(this,a,xt).call(this,i)}}get node(){return e(this,d)}set node(s){var t;l(this,a,it).call(this),c(this,d,s),(t=e(this,be))==null||t.call(this),e(this,d)instanceof Element&&c(this,I,[...e(this,d).querySelectorAll("store-root")]),l(this,a,st).call(this),l(this,a,Qe).call(this)}};d=new WeakMap,$=new WeakMap,y=new WeakMap,be=new WeakMap,I=new WeakMap,H=new WeakMap,a=new WeakSet,kt=function(s,t){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 Ut.has(s)||t?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 t=l(this,a,Et).call(this,e(this,d)),i=s.ref;delete s.ref,s!=null&&s.onConnect&&(e(this,$).add(s.onConnect),delete s.onConnect),s!=null&&s.onDisconnect&&(e(this,y).add(s.onDisconnect),delete s.onDisconnect);let n,h;for(const u in s){const g=s[u];u==="class"&&t?l(this,a,je).call(this,g):u==="style"&&t?l(this,a,Lt).call(this,g):u==="lightChildren"?l(this,a,_e).call(this,e(this,d),g):u==="children"?l(this,a,_e).call(this,e(this,d)instanceof Element?e(this,d).shadowRoot||e(this,d):e(this,d),g):u==="connectedClass"?e(this,$).add(()=>{requestAnimationFrame(()=>{e(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(e(this,d)):i.current=e(this,d)),l(this,a,Qe).call(this)},Qe=function(){if(X.isBrowser&&(e(this,y).size||e(this,$).size)){const s=e(this,d)instanceof DocumentFragment?e(this,d).firstChild:e(this,d);c(this,be,Yt.connector.subscribe(s,{connectCallback:e(this,Ze),disconnectCallback:e(this,We),unsubscribeAfterDisconnect:!0,maxWaitSec:20}))}},je=function(s){if(s){if(typeof s=="string")e(this,d).classList.add(s);else if(Array.isArray(s))s.forEach(t=>{t&&l(this,a,je).call(this,t)});else if(typeof s=="object")if(s instanceof m.Store)l(this,a,Ct).call(this,s);else for(const t in s){const i=s[t];i instanceof m.Store?l(this,a,Tt).call(this,t,i):i?e(this,d).classList.add(t):e(this,d).classList.remove(t)}}else return},Ct=function(s){e(this,y).add(s.subscribe(({current:t,previous:i})=>{i&&[i].flat().forEach(n=>{n&&e(this,d).classList.remove(n)}),t&&[t].flat().forEach(n=>{n&&e(this,d).classList.add(n)})}))},Tt=function(s,t){e(this,y).add(t.subscribe(({current:i})=>{i?e(this,d).classList.add(s):e(this,d).classList.remove(s)}))},Lt=function(s){if(!s)return;e(this,d).tagName==="style"||e(this,d).tagName==="STYLE"?l(this,a,et).call(this,s):l(this,a,zt).call(this,s)},zt=function(s){for(const t in s){const i=t,n=s[i];n instanceof m.Store?e(this,y).add(n.subscribe(({current:h})=>{l(this,a,tt).call(this,i,h)})):l(this,a,tt).call(this,i,n)}},et=function(s){for(const t in s){const i=s[t];if(typeof i=="object"&&!(i instanceof m.Store))e(this,d).appendChild(document.createTextNode(`${t} {`)),l(this,a,et).call(this,i),e(this,d).appendChild(document.createTextNode("}"));else if(i instanceof m.Store){const n=document.createTextNode("");e(this,y).add(i.subscribe(h=>{h.current?n.nodeValue=`${we.camelToKebab(t)}: ${h.current};`:n.nodeValue=""})),e(this,d).appendChild(n)}else e(this,d).appendChild(document.createTextNode(`${we.camelToKebab(t)}: ${i};`))}},tt=function(s,t){s.includes("--")?t?e(this,d).style.setProperty(s,t.toString()):e(this,d).style.removeProperty(s):t?e(this,d).style[s]=t.toString():e(this,d).style[s]=""},Rt=function(s){if(s){e(this,H)||c(this,H,[]);for(const t in s){const i=t,n=we.uncapitalize(i.split("on").slice(1).join("on")),h=s[i];typeof h=="object"?e(this,H).push({name:n,callback:h.callback,options:h.options}):typeof h=="function"&&e(this,H).push({name:n,callback:h})}l(this,a,st).call(this)}},st=function(){var s;(s=e(this,H))==null||s.forEach(t=>{e(this,d).addEventListener(t.name,t.callback,t.options)})},it=function(){var s;(s=e(this,H))==null||s.forEach(t=>{e(this,d).removeEventListener(t.name,t.callback,t.options)})},Mt=function(s){for(const t in s){const i=s[t];i instanceof m.Store?e(this,y).add(i.subscribe(({current:n})=>{l(this,a,nt).call(this,t,n)})):l(this,a,nt).call(this,t,i)}},nt=function(s,t){var n,h;const i=e(this,d);if(s in i&&!((h=(n=i.constructor)==null?void 0:n.observedAttributes)!=null&&h.includes(s)))t!=null&&(i[s]=t.toString());else if(t!=null){const u=t.toString();s.includes("xlink")?i.setAttributeNS("http://www.w3.org/1999/xlink",s,u):i.setAttribute(s,u)}},_e=function(s,t){t&&(t=[t].flat(),t.forEach(i=>{if(i instanceof m.Store){const n=document.createElement("div");n.style.display="contents",s.appendChild(n),e(this,I)||c(this,I,[]);const h=e(this,I).length;n.setAttribute("store-root",""),e(this,I).push(n),e(this,y).add(i.subscribe(({current:u,previous:g})=>{const k=e(this,I)[h];k.dispatchEvent(new CustomEvent("beforeChildrenChange",{bubbles:!0,composed:!0}));const T=Array.from(k.childNodes),v=Array.isArray(u)?u:[u],me=Array.isArray(g)?g:[g],qe=[],x=[];T.length&&me.forEach((N,P)=>{v.includes(N)?x.push(N):qe.push(T[P])}),v.forEach((N,P)=>{if(x[P]!=null){if(N!==x[P]){const q=l(this,a,rt).call(this,N),O=T[P];q instanceof Node&&!O.isEqualNode(q)?k.replaceChild(q,O):k.removeChild(O)}}else{const q=l(this,a,rt).call(this,N);q instanceof Node&&n.appendChild(q)}}),qe.forEach(N=>{k.removeChild(N)}),k.dispatchEvent(new CustomEvent("afterChildrenChange",{bubbles:!0,composed:!0}))}))}else if(i instanceof Je)l(this,a,ot).call(this,s,i.node);else if(i instanceof Function)l(this,a,_e).call(this,s,U.isESClass(i)?new i:i());else{const n=l(this,a,at).call(this,i);n instanceof Node&&l(this,a,ot).call(this,s,n)}}))},ot=function(s,t){!(s instanceof ShadowRoot)&&t instanceof HTMLElement&&t.tagName==="STYLE"?(e(this,$).add(()=>{[...document.head.querySelectorAll("style")].find(n=>n.outerHTML===t.outerHTML)||document.head.appendChild(t)}),e(this,y).add(()=>{t.remove()})):s.appendChild(t)},rt=function(s){return s instanceof Je?s.node:typeof s=="function"?U.isESClass(s)?new s:s():l(this,a,at).call(this,s)},at=function(s){if(s instanceof Node)return s;if(s!=null){const t=String(s);if(t.trim().startsWith("<")&&t.trim().endsWith(">")){const i=document.createElement("div");return i.innerHTML=t,i.firstElementChild}else return document.createTextNode(t)}else return},Ze=new WeakMap,We=new WeakMap;let A=Je;function p(...r){return new A(...r)}function Xt(r){return new A("a",r)}function j(r){return new A("button",r)}function b(r){return new A("div",r)}function Ve(r){return new A("input",r)}function At(r){return new A("label",r)}function fe(r){return new A("slot",r)}function lt(r){return new A("span",r)}function Nt(r){return new A("style",{style:r})}function E(r){const s=new CSSStyleSheet;return s.replaceSync(Nt(r).node.innerHTML),s}function Qt(r,s){const t=s==null?void 0:s.prefix,i={style:{}};for(const n in r)i[n]={var:`var(--${t}${we.camelToKebab(n)})`,value:r[n]},i.style[`--${t}${we.camelToKebab(n)}`]=r[n];return i}const f=Qt({colorMain:"#1c1c1c",colorMainAux:"#282828",colorFont:"#ffffff",colorActive:"#00E5B0",borderRadius:"12px",borderRadiusSmall:"4px"},{prefix:"aptechka-"});if(X.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>',Pt='<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>',jt='<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>',es='<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>',$t=`<svg
|
|
2
2
|
xmlns="http://www.w3.org/2000/svg"
|
|
3
3
|
width="32"
|
|
4
4
|
height="32"
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
>
|
|
7
7
|
<path d="m12.37 15.835l6.43-6.63C19.201 8.79 18.958 8 18.43 8H5.57c-.528 0-.771.79-.37 1.205l6.43 6.63c.213.22.527.22.74 0Z" />
|
|
8
8
|
</svg>
|
|
9
|
-
`;var Z,L,D;class ss{constructor(){o(this,Z);o(this,L);o(this,D);this.scrollValue=0,c(this,Z,""),c(this,L,[]),c(this,D,{}),c(this,Z,p.storeRegistry.name+"-tweaker")}openPanel(s){e(this,L).includes(s)||e(this,L).push(s)}closePanel(s){c(this,L,e(this,L).filter(t=>t!==s))}isPanelOpened(s){return e(this,L).includes(s)}changedSizes(s){return e(this,D)[s]}changeSize(s,t){t?e(this,D)[s]=t:delete e(this,D)[s]}save(){const s={openedPanels:e(this,L),changedSizes:e(this,D),scrollValue:this.scrollValue};localStorage.setItem(e(this,Z),JSON.stringify(s)),p.storeRegistry.saveState()}load(){p.storeRegistry.loadState();const s=localStorage.getItem(e(this,Z));if(s)try{const t=JSON.parse(s);t.openedPanels&&c(this,L,t.openedPanels),t.changedSizes&&c(this,D,t.changedSizes),t.scrollValue&&(this.scrollValue=t.scrollValue)}catch(t){console.error(t)}}}Z=new WeakMap,L=new WeakMap,D=new WeakMap;const C=new ss,is='<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 256 256"><path d="m243.33 90.91l-128.41 128.4a16 16 0 0 1-22.63 0l-71.62-72a16 16 0 0 1 0-22.61l24-24a16 16 0 0 1 22.57-.06l36.64 35.27l.11.11l92.73-91.37a16 16 0 0 1 22.58 0l24 23.56a16 16 0 0 1 .03 22.7Z"/></svg>',ns=E({":host":{position:"relative",display:"inline-block",width:"30px",height:"30px",borderRadius:f.borderRadiusSmall.var,overflow:"hidden"},"label, .fake":{display:"block"},"label, .fake, .default":{width:"100%",height:"100%"},".real":{position:"absolute",top:"0",left:"0",width:"0px",height:"0px",visibility:"hidden",margin:"0"},".default":{display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:f.colorMainAux.var},".default svg":{width:"60%",height:"60%",fill:f.colorFont.var,opacity:0,transition:"var(--duration-short)"},":host(.checked) .default svg":{opacity:1}});var B,j,W,me;const mt=class mt extends HTMLElement{constructor(){super();o(this,W);o(this,B,null);o(this,j);this.attachShadow({mode:"open"}).adoptedStyleSheets.push(ns),c(this,j,this.attachInternals()),m(this,{children:At({children:[lt({class:"fake",children:fe({children:[lt({class:"default",children:[is]})]})}),Ve({ref:i=>{c(this,B,i),i.required=this.hasAttribute("required"),i.value=this.getAttribute("value")||"",i.checked=this.hasAttribute("checked"),i.name=this.getAttribute("name")||"",l(this,W,me).call(this)},class:"real",type:"checkbox",onChange:()=>{l(this,W,me).call(this),this.dispatchEvent(new Event("change",{composed:!0}))}})]})})}get checked(){return e(this,B).checked}set checked(t){e(this,B).checked=t,l(this,W,me).call(this)}get value(){return e(this,B).value}set value(t){e(this,B).value=t,l(this,W,me).call(this)}};B=new WeakMap,j=new WeakMap,W=new WeakSet,me=function(){this.checked?e(this,j).setFormValue(this.value):e(this,j).setFormValue(null),this.classList.toggle("checked",this.checked)},mt.formAssociated=!0;let ht=mt;customElements.get("e-checkbox")||customElements.define("e-checkbox",ht);var _;class ge extends HTMLElement{constructor(...t){super();o(this,_);c(this,_,t)}addStore(t){e(this,_).push(t)}get firstStore(){return e(this,_)[0]}get stores(){return e(this,_)}updateStores(t){e(this,_).forEach(i=>{i.current=t})}}_=new WeakMap;const os=E({":host":{width:"100%",display:"inline-flex",height:"max-content"},"e-checkbox":{"--size":"calc(var(--height-input) * 0.8)",width:"var(--size)",height:"var(--size)",borderRadius:f.borderRadiusSmall.var}});class It extends ge{constructor(...s){super(...s),this.attachShadow({mode:"open"}).adoptedStyleSheets.push(os),m(this,{children:[m("e-checkbox",{onChange:i=>{this.updateStores(i.currentTarget.checked)},ref:i=>{this.firstStore.subscribe(n=>{i.checked=n.current})}})]})}}customElements.get("e-tweaker-boolean-manager")||customElements.define("e-tweaker-boolean-manager",It);const rs=E({":host":{width:"100%",display:"inline-flex",height:"max-content"},input:{width:"100%",height:"var(--height-input)",padding:"0",background:"none",borderRadius:f.borderRadius.var,border:"none",blockSize:"unset"},"input::-webkit-color-swatch, input::-webkit-color-swatch-wrapper":{boxSizing:"border-box",padding:"0px",border:"none",borderRadius:f.borderRadius.var,height:"calc(var(--height-input) * 0.93)"}});class Ht extends ge{constructor(...s){super(...s),this.attachShadow({mode:"open"}).adoptedStyleSheets.push(rs),m(this,{children:[Ve({type:"color",value:this.firstStore,onInput:i=>{this.updateStores(i.currentTarget.value)}})]})}}customElements.get("e-tweaker-color-manager")||customElements.define("e-tweaker-color-manager",Ht);const as=E({a:{color:"inherit",fontSize:"var(--font-size-small)"}});class Dt extends ge{constructor(...s){var i;super(...s),this.attachShadow({mode:"open"}).adoptedStyleSheets.push(as),m(this,{children:[Qt({href:this.firstStore,target:(i=this.firstStore.__manager)!=null&&i.sameWindow?"_self":"_blank",children:this.firstStore})]})}}customElements.get("e-tweaker-link-manager")||customElements.define("e-tweaker-link-manager",Dt);const ls=E({":host":{width:"100%",display:"flex",alignItems:"center",gap:"var(--gap-small)"},".inputs-wrapper":{display:"grid",gap:"var(--gap-small)",width:"100%"},input:{boxSizing:"border-box",outline:"none",fontVariantNumeric:"tabular-nums",fontFamily:"inherit",color:"inherit",border:"none",fontSize:"var(--font-size-small)",width:"100%",height:"var(--height-input)",margin:"0",padding:"0 var(--gap-small)",backgroundColor:"rgba(255, 255, 255, 0.1)",borderRadius:f.borderRadius.var},".drag":{position:"relative",width:"100%",height:"calc(var(--height-input) * 0.2)",display:"flex",alignItems:"center"},".drag::before":{content:'""',position:"absolute",left:"0",width:"100%",zIndex:"-1",height:"1px",borderBottom:`1px solid ${f.colorFont.var}`,transform:"translateY(-50%)",opacity:"0.3"},":host(.infinite) .drag::before":{borderBottom:`1px dashed ${f.colorFont.var}`},".drag-knob":{"--size":"calc(var(--height-input) * 0.4)",width:"var(--size)",height:"var(--size)"},".drag-knob-inner":{width:"100%",height:"100%",backgroundColor:f.colorFont.var,borderRadius:f.borderRadiusSmall.var,transition:"opacity var(--duration-short)"},":host(.infinite) .grabbing .drag-knob-inner":{opacity:.3}});var J,ee,te,V,K,ve,ye,F,Y,Se,ke,w,X,ct,dt,Ke,Ee;class Vt extends ge{constructor(...t){var n,h,u,g;super(...t);o(this,w);o(this,J,[]);o(this,ee,[]);o(this,te);o(this,V);o(this,K);o(this,ve);o(this,ye);o(this,F);o(this,Y,!1);o(this,Se,t=>{const i=l(this,w,X).call(this,t);return i.map((n,h)=>{const u=typeof n=="string"?parseFloat(n)||e(this,V):n,g=Be.clamp(u,e(this,V),e(this,K)),k=Be.toStep(g,e(this,te));i[h]=k}),e(this,ye)==="number"?i[0]:i});o(this,ke,()=>{l(this,w,X).call(this).map((t,i)=>{const n=e(this,J)[i];n&&(n.value=(t||0).toString())}),l(this,w,ct).call(this)});o(this,Ee,()=>{l(this,w,ct).call(this)});this.attachShadow({mode:"open"}).adoptedStyleSheets.push(ls),c(this,V,Be.nullishCoalescing((n=this.firstStore.__manager)==null?void 0:n.min,-1/0)),c(this,K,Be.nullishCoalescing((h=this.firstStore.__manager)==null?void 0:h.max,1/0)),c(this,te,((u=this.firstStore.__manager)==null?void 0:u.step)||.01),c(this,ve,((g=this.firstStore.__manager)==null?void 0:g.ease)||1),c(this,ye,Array.isArray(this.firstStore.current)?"array":"number"),c(this,F,isFinite(e(this,K))&&isFinite(e(this,V))),m(this,{class:e(this,F)?"":"infinite",children:l(this,w,X).call(this).map((k,T)=>b({class:"inputs-wrapper",children:[Ve({type:"number",step:e(this,te),min:e(this,V),max:e(this,K),ref:v=>e(this,J).push(v),value:k,onChange:()=>{this.updateStores(e(this,J).map(v=>parseFloat(v.value)))}}),b({class:"drag",children:[b({class:"drag-knob",ref:v=>e(this,ee).push(v),onPointerdown:v=>{v.preventDefault(),c(this,Y,!0);const pe=l(this,w,X).call(this),qe=pe[T],x=e(this,ee)[T],N=e(this,J)[T];if(x&&N){const P=x.parentElement,q=l(this,w,dt).call(this);P.classList.add("grabbing"),St.setupDrag(O=>{const bt=O.x-v.x,Ot=e(this,F)?P.offsetWidth/(q||1):1,Zt=qe+bt/Ot*e(this,ve);if(pe[T]=Zt,!e(this,F)){const Wt=l(this,w,Ke).call(this,x,0);x.style.transform=`translateX(${Wt+bt}px)`}this.updateStores([...pe])},()=>{if(c(this,Y,!1),!e(this,F)){const O=l(this,w,Ke).call(this,x,0);x.style.transition="transform 0.1s",x.style.transform=`translateX(${O}px)`,P.classList.remove("grabbing"),setTimeout(()=>{x.style.transition=""},100)}})}},children:b({class:"drag-knob-inner"})})]})]}))})}connectedCallback(){this.firstStore.addMiddleware(e(this,Se)),this.firstStore.subscribe(e(this,ke)),yt.elementResizer.subscribe(this,e(this,Ee))}disconnectedCallback(){this.firstStore.removeMiddleware(e(this,Se)),this.firstStore.unsubscribe(e(this,ke)),yt.elementResizer.unsubscribe(e(this,Ee))}}J=new WeakMap,ee=new WeakMap,te=new WeakMap,V=new WeakMap,K=new WeakMap,ve=new WeakMap,ye=new WeakMap,F=new WeakMap,Y=new WeakMap,Se=new WeakMap,ke=new WeakMap,w=new WeakSet,X=function(t=this.firstStore.current){return Array.isArray(t)?t:[t]},ct=function(){l(this,w,X).call(this).map((t,i)=>{const n=e(this,ee)[i];if(n&&(!e(this,Y)||e(this,Y)&&e(this,F))){const h=l(this,w,Ke).call(this,n,t);n.style.transform=`translateX(${h}px)`}})},dt=function(){return e(this,F)?e(this,K)-e(this,V):0},Ke=function(t,i){const n=t.parentElement,h=l(this,w,dt).call(this),u=h?i/h:.5;return(n.offsetWidth-t.offsetWidth)*u},Ee=new WeakMap;customElements.get("e-tweaker-number-manager")||customElements.define("e-tweaker-number-manager",Vt);const hs=E({":host":{position:"relative"},".head":{width:"100%",cursor:"default",background:"none",border:"none",color:"inherit",fontFamily:"inherit",fontSize:"inherit",fontWeight:"inherit",textAlign:"start",padding:"0",margin:"0"},".body":{boxSizing:"border-box",position:"var(--position, unset)",top:"100%",left:"0",width:"100%",overflow:"hidden",transitionDuration:"var(--duration, var(--duration-short))",transitionProperty:"height",cursor:"default"},".body-inner":{display:"grid",gap:"var(--gap, 0px)",width:"100%",paddingTop:"var(--gap, 0px)"}});var se,ie,z,G,ne,oe,Ye,xe,ft;const wt=class wt extends HTMLElement{constructor(){super();o(this,xe);o(this,se,null);o(this,ie,"");o(this,z,null);o(this,G,!1);o(this,ne);o(this,oe,null);o(this,Ye,()=>{ue.dispatchSizeChangeEvent(this)});U.isBrowser&&(this.attachShadow({mode:"open"}).adoptedStyleSheets.push(hs),c(this,se,this.attachInternals()),c(this,oe,new ResizeObserver(e(this,Ye))),m(this,{children:[Q({class:"head",children:fe({name:"head"}),onClick:()=>{this.opened?this.close():this.open()}}),b({class:"body",style:{height:"0px"},children:b({class:"body-inner",children:fe()}),ref:i=>{c(this,z,i)}})]}))}get value(){return e(this,ie)}set value(t){c(this,ie,t),this.dispatchEvent(new Event("change",{bubbles:!0,composed:!0})),e(this,se).setFormValue(e(this,ie))}get internals(){return e(this,se)}get opened(){return e(this,G)}open(){clearTimeout(e(this,ne)),c(this,G,!0),e(this,z).style.display="grid",this.classList.add("triggered"),setTimeout(()=>{this.classList.add("opened"),e(this,z).style.height=e(this,z).scrollHeight+"px",l(this,xe,ft).call(this)},0)}close(){c(this,G,!1),e(this,z).style.height="0px",this.classList.remove("opened"),l(this,xe,ft).call(this),c(this,ne,setTimeout(()=>{this.classList.remove("triggered"),e(this,z).style.display="none"},Ut.getElementTransitionDurationMS(e(this,z))))}connectedCallback(){e(this,oe).observe(e(this,z))}disconnectedCallback(){clearTimeout(e(this,ne)),e(this,oe).disconnect()}};se=new WeakMap,ie=new WeakMap,z=new WeakMap,G=new WeakMap,ne=new WeakMap,oe=new WeakMap,Ye=new WeakMap,xe=new WeakSet,ft=function(){ue.dispatchBeforeSizeChangeEvent(this),this.dispatchEvent(new CustomEvent("selectToggle",{bubbles:!0,composed:!0,detail:{opened:e(this,G)}}))},wt.formAssociated=!0;let ut=wt;customElements.get("e-select")||customElements.define("e-select",ut);var Ce;class qt extends HTMLElement{constructor(){super(...arguments);o(this,Ce,null)}get selectElement(){return e(this,Ce)}connectedCallback(){var i,n;const t=(n=(i=this.assignedSlot)==null?void 0:i.getRootNode())==null?void 0:n.host;t?c(this,Ce,t):console.log(this,"e-select not found")}}Ce=new WeakMap;const cs=E({":host":{width:"100%",height:"40px",display:"inline-flex",alignItems:"center"}});var re,Te,gt;class ds extends qt{constructor(){super();o(this,Te);o(this,re,()=>{this.selectElement.value===this.value?this.style.display="none":this.style.display=""});U.isBrowser&&(this.attachShadow({mode:"open"}).adoptedStyleSheets.push(cs),m(this,{tabindex:0,onClick:()=>{l(this,Te,gt).call(this)},onKeydown:i=>{i.code==="Space"&&l(this,Te,gt).call(this)},children:fe()}))}get value(){return(this.hasAttribute("value")?this.getAttribute("value"):this.innerText)||""}connectedCallback(){super.connectedCallback(),this.hasAttribute("default")&&(this.selectElement.value||(this.selectElement.value=this.value)),this.selectElement.addEventListener("change",e(this,re)),setTimeout(()=>{e(this,re).call(this)})}disconnectedCallback(){this.selectElement.removeEventListener("change",e(this,re))}}re=new WeakMap,Te=new WeakSet,gt=function(){this.selectElement.value=this.value,this.selectElement.close()};customElements.get("e-select-option")||customElements.define("e-select-option",ds);const us=E({":host":{width:"100%",height:"40px",display:"inline-flex",alignItems:"center",justifyContent:"space-between"},".default-arrow":{flexShrink:"0",width:"var(--arrow-size, 1em)",height:"var(--arrow-size, 1em)",fill:`var(--arrow-color, ${f.colorMain.var})`,transitionProperty:"transform",transitionDuration:"var(--duration, var(--duration-short))"},":host(.opened) .default-arrow":{transform:"scaleY(-1)"}});var Le,ae,ze;class fs extends qt{constructor(){super();o(this,Le,null);o(this,ae,()=>{const i=this.selectElement.shadowRoot.querySelector(".body slot").assignedElements().find(n=>n.value===this.selectElement.value);i&&(e(this,Le).innerHTML=i.innerHTML)});o(this,ze,()=>{this.classList.toggle("opened",this.selectElement.opened)});U.isBrowser&&(this.attachShadow({mode:"open"}).adoptedStyleSheets.push(us),m(this,{children:[fe(),fe({name:"arrow",children:m($t,{class:"default-arrow"})})]}),this.slot="head")}connectedCallback(){super.connectedCallback(),c(this,Le,this.querySelector("[data-value-holder]")||this),this.selectElement.addEventListener("change",e(this,ae)),e(this,ae).call(this),this.selectElement.addEventListener("selectToggle",e(this,ze))}disconnectedCallback(){this.selectElement.removeEventListener("change",e(this,ae)),this.selectElement.removeEventListener("selectToggle",e(this,ze))}}Le=new WeakMap,ae=new WeakMap,ze=new WeakMap;customElements.get("e-select-head")||customElements.define("e-select-head",fs);const gs=E({"e-select":{display:"block",width:"100%","--arrow-color":f.colorFont.var},"e-select-head":{width:"100%",height:"var(--height-input)",display:"flex",alignItems:"center",justifyContent:"space-between",fontSize:"var(--font-size-small)"},"e-select-option":{height:"var(--height-input)",transitionDuration:"var(--duration-short)",transitionProperty:"color",fontSize:"var(--font-size-small)"},"e-select-option:hover":{color:f.colorActive.var},svg:{width:"16px",height:"16px",fill:f.colorFont.var,transitionProperty:"transform",transitionDuration:"var(--duration-short)"},".opened svg":{transform:"scaleY(-1)"}});class Bt extends ge{constructor(...s){var n;super(...s),this.attachShadow({mode:"open"}).adoptedStyleSheets.push(gs);const i=((n=this.firstStore.__manager)==null?void 0:n.variants)||[];m(this,{children:m("e-select",{value:this.firstStore,onChange:h=>{this.updateStores(h.currentTarget.value)},lightChildren:[m("e-select-head",{lightChildren:[lt({"data-value-holder":""})]}),...i.map((h,u)=>m("e-select-option",{lightChildren:h,default:u===0?!0:null}))]})})}}customElements.get("e-tweaker-select-manager")||customElements.define("e-tweaker-select-manager",Bt);const ps=E({":host":{width:"100%",display:"flex",alignItems:"center"},input:{boxSizing:"border-box",outline:"none",fontVariantNumeric:"tabular-nums",fontFamily:"inherit",color:"inherit",border:"none",fontSize:"var(--font-size-small)",height:"var(--height-input)",width:"100%",margin:"0",padding:"0 var(--gap-small)",backgroundColor:"rgba(255, 255, 255, 0.1)",borderRadius:f.borderRadius.var}});class _t extends ge{constructor(...s){super(...s),this.attachShadow({mode:"open"}).adoptedStyleSheets.push(ps),m(this,{children:[Ve({class:"text-input",type:"string",value:this.firstStore,onChange:i=>{this.updateStores(i.currentTarget.value)}})]})}}customElements.get("e-tweaker-string-manager")||customElements.define("e-tweaker-string-manager",_t);const ms={boolean:It,color:Ht,link:Dt,number:Vt,select:Bt,string:_t},ws=E({":host":{display:"grid",gridAutoFlow:"column",gridTemplateColumns:"0.5fr 1fr",alignItems:"center",color:f.colorFont.var,gap:"var(--gap-medium)"},":host(.disabled)":{pointerEvents:"none",opacity:.5},".head":{fontSize:"var(--font-size-medium)",display:"flex",alignItems:"center",gap:"var(--gap-extra-small)"},".head-buttons":{display:"flex"},".head-button":{width:"14px",height:"14px",padding:"0",margin:"0",border:"none",background:"none",fill:f.colorFont.var,transitionDuration:"var(--duration-short)",transitionProperty:"fill, opacity",opacity:"0"},":host(:hover) .head-button":{opacity:"1"},".head-button:hover":{fill:f.colorActive.var},".head-button svg":{width:"100%",height:"100%"}});var R,le,he,ce,de,Re,Me;class pt extends HTMLElement{constructor(t){var h,u;super();o(this,R,[]);o(this,le);o(this,he);o(this,ce,!1);o(this,de);o(this,Re,()=>{p.activeStores.current.find(t=>e(this,R).includes(t))||this.remove()});o(this,Me,t=>{e(this,ce)&&((t.metaKey||t.ctrlKey)&&t.code==="KeyC"?navigator.clipboard.writeText(e(this,R)[0].current):(t.metaKey||t.ctrlKey)&&t.code==="KeyR"&&(e(this,R).forEach(i=>{i.reset()}),t.preventDefault()))});c(this,R,[t.store]),c(this,le,t.store.name),c(this,he,e(this,le).split(".").slice(-1).toString());const i=((h=t.store.__manager)==null?void 0:h.type)||"string";c(this,de,new ms[i](e(this,R)[0])),this.attachShadow({mode:"open"}).adoptedStyleSheets.push(ws),m(this,{class:{disabled:((u=t.store.__manager)==null?void 0:u.disabled)||!1},onPointerleave:()=>{c(this,ce,!1)},onPointerenter:()=>{c(this,ce,!0)},children:[b({class:"head",children:[b({class:"name",children:e(this,he)+":"}),b({class:"head-buttons",children:[Q({class:"head-button",children:Pt,onClick:()=>{navigator.clipboard.writeText(e(this,R)[0].current)}}),Q({class:"head-button",children:Ft,onClick:()=>{e(this,R).forEach(g=>{g.reset()})}})]})]}),e(this,de)]})}get key(){return e(this,le)}get name(){return e(this,he)}get stores(){return e(this,R)}addStore(t){e(this,de).addStore(t)}connectedCallback(){p.activeStores.subscribe(e(this,Re)),addEventListener("keydown",e(this,Me)),ue.dispatchSizeChangeEvent(this)}disconnectedCallback(){p.activeStores.unsubscribe(e(this,Re)),removeEventListener("keydown",e(this,Me))}}R=new WeakMap,le=new WeakMap,he=new WeakMap,ce=new WeakMap,de=new WeakMap,Re=new WeakMap,Me=new WeakMap;customElements.get("e-tweaker-field")||customElements.define("e-tweaker-field",pt);const bs=E({".wrapper":{boxSizing:"border-box",backgroundColor:"rgba(255, 255, 255, 0.1)",borderRadius:f.borderRadius.var},".head":{boxSizing:"border-box",width:"100%",height:"var(--tweaker-folder-height)",paddingLeft:"var(--gap-medium)",paddingRight:"var(--gap-medium)",display:"flex",alignItems:"center",justifyContent:"space-between",backgroundColor:f.colorMainAux.var,borderRadius:f.borderRadius.var},".name":{fontSize:"var(--font-size-large)",color:f.colorFont.var},".body":{display:"none",overflow:"hidden","@supports (height: calc-size(auto))":{height:"0"}},":host(.transition-allowed) .body":{transition:"height var(--duration-short), display var(--duration-short) allow-discrete"},":host(.opened) .body":{height:"calc-size(auto)",display:"block","@starting-style":{height:"0"}},".body-content":{boxSizing:"border-box",padding:"var(--gap-large)",display:"grid",gap:"var(--gap-medium)"},".arrow":{width:"20px",height:"20px",fill:f.colorFont.var,transition:"transform var(--duration-short)"},".opened .arrow":{transform:"scaleY(-1)"}});var M,Ae,S,Ne,Fe,Pe,$e,Ge;const Ue=class Ue extends HTMLElement{constructor(t){super();o(this,M);o(this,Ae,new p.Store(null));o(this,S,new p.Store([]));o(this,Ne);o(this,Fe,null);o(this,Pe,null);o(this,$e,null);o(this,Ge,t=>{let i=[],n=[];t.forEach(h=>{i=[...i,...h.removedNodes],n=[...n,...h.addedNodes]}),e(this,S).current=e(this,S).current.filter(h=>!i.includes(h)),e(this,M)&&!e(this,S).current.length&&!n.length&&this.remove()});this.attachShadow({mode:"open"}).adoptedStyleSheets.push(bs),c(this,M,t.key),c(this,Ne,new MutationObserver(e(this,Ge))),m(this,{children:[b({class:"wrapper",children:[b({class:"head",onClick:n=>{this.classList.toggle("opened"),this.classList.contains("opened")?C.openPanel(e(this,M)):C.closePanel(e(this,M))},children:[e(this,M)?b({class:"name",children:[e(this,M).split(".").slice(-1).toString()]}):null,e(this,Ae),m($t,{class:"arrow"})]}),b({class:"body",ref:n=>{c(this,Fe,n)},children:b({class:"body-content",children:e(this,S),ref:n=>{c(this,Pe,n),c(this,$e,n.firstElementChild)}})})]})]}),t!=null&&t.storeBox&&this.handleStore(t.storeBox)}get key(){return e(this,M)}get head(){return e(this,Ae)}get content(){return e(this,S)}get bodyElement(){return e(this,Fe)}get contentElement(){return e(this,Pe)}connectedCallback(){C.isPanelOpened(e(this,M))&&this.classList.add("opened"),setTimeout(()=>{this.classList.add("transition-allowed")}),e(this,Ne).observe(e(this,$e),{childList:!0})}handleStore(t){if(t.remainingFolders.length){const n=t.store.name.split("."),h=n.slice(0,n.length-t.remainingFolders.length).join("."),u=e(this,S).current.find(g=>g.key===h);u instanceof Ue?u.handleStore({store:t.store,remainingFolders:t.remainingFolders.slice(1)}):e(this,S).current=[...e(this,S).current,new Ue({key:h,storeBox:{store:t.store,remainingFolders:t.remainingFolders.slice(1)}})]}else{const i=e(this,S).current.find(n=>n.key===t.store.name);i instanceof pt?i.addStore(t.store):e(this,S).current=[...e(this,S).current,new pt({store:t.store})]}}};M=new WeakMap,Ae=new WeakMap,S=new WeakMap,Ne=new WeakMap,Fe=new WeakMap,Pe=new WeakMap,$e=new WeakMap,Ge=new WeakMap;let Oe=Ue;customElements.get("e-tweaker-folder")||customElements.define("e-tweaker-folder",Oe);const vs=E({":host":{"--tweaker-width":"550px","--tweaker-offset":"20px","--tweaker-folder-height":"35px","--height-input":"25px","--gap-large":"12px","--gap-medium":"10px","--gap-small":"8px","--gap-extra-small":"4px","--font-size-large":"16px","--font-size-medium":"14px","--font-size-small":"12px","--duration-short":"0.2s",fontFamily:"sans-serif",position:"absolute",top:"var(--tweaker-offset)",right:"var(--tweaker-offset)",width:"var(--tweaker-width)",backgroundColor:f.colorMain.var,borderRadius:f.borderRadius.var,transition:"opacity 0.1s",zIndex:"100",opacity:"0.1"},":host(:hover)":{opacity:"1 !important"},".resize":{position:"absolute",left:"0",top:"0",width:"calc(var(--tweaker-width) * 0.025)",height:"100%",zIndex:"1",cursor:"ew-resize"},".tweaker-buttons":{display:"flex",alignItems:"center",gap:"var(--gap-extra-small)"},".tweaker-button":{width:"18px",height:"18px",padding:"0",margin:"0",background:"none",border:"none",fill:f.colorFont.var,transitionProperty:"fill",transitionDuration:"var(--duration-short)"},".tweaker-button:hover":{fill:f.colorActive.var},".tweaker-button svg":{width:"100%",height:"100%"},":host .body-content":{maxHeight:`calc(
|
|
9
|
+
`;var Z,L,D;class ts{constructor(){o(this,Z);o(this,L);o(this,D);this.scrollValue=0,c(this,Z,""),c(this,L,[]),c(this,D,{}),c(this,Z,m.storeRegistry.name+"-tweaker")}openPanel(s){e(this,L).includes(s)||e(this,L).push(s)}closePanel(s){c(this,L,e(this,L).filter(t=>t!==s))}isPanelOpened(s){return e(this,L).includes(s)}changedSizes(s){return e(this,D)[s]}changeSize(s,t){t?e(this,D)[s]=t:delete e(this,D)[s]}save(){const s={openedPanels:e(this,L),changedSizes:e(this,D),scrollValue:this.scrollValue};localStorage.setItem(e(this,Z),JSON.stringify(s)),m.storeRegistry.saveState()}load(){m.storeRegistry.loadState();const s=localStorage.getItem(e(this,Z));if(s)try{const t=JSON.parse(s);t.openedPanels&&c(this,L,t.openedPanels),t.changedSizes&&c(this,D,t.changedSizes),t.scrollValue&&(this.scrollValue=t.scrollValue)}catch(t){console.error(t)}}}Z=new WeakMap,L=new WeakMap,D=new WeakMap;const C=new ts,ss='<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 256 256"><path d="m243.33 90.91l-128.41 128.4a16 16 0 0 1-22.63 0l-71.62-72a16 16 0 0 1 0-22.61l24-24a16 16 0 0 1 22.57-.06l36.64 35.27l.11.11l92.73-91.37a16 16 0 0 1 22.58 0l24 23.56a16 16 0 0 1 .03 22.7Z"/></svg>',is=E({":host":{position:"relative",display:"inline-block",width:"30px",height:"30px",borderRadius:f.borderRadiusSmall.var,overflow:"hidden"},"label, .fake":{display:"block"},"label, .fake, .default":{width:"100%",height:"100%"},".real":{position:"absolute",top:"0",left:"0",width:"0px",height:"0px",visibility:"hidden",margin:"0"},".default":{display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:f.colorMainAux.var},".default svg":{width:"60%",height:"60%",fill:f.colorFont.var,opacity:0,transition:"var(--duration-short)"},":host(.checked) .default svg":{opacity:1}});var B,ee,W,pe;const pt=class pt extends HTMLElement{constructor(){super();o(this,W);o(this,B,null);o(this,ee);this.attachShadow({mode:"open"}).adoptedStyleSheets.push(is),c(this,ee,this.attachInternals()),p(this,{children:At({children:[lt({class:"fake",children:fe({children:[lt({class:"default",children:[ss]})]})}),Ve({ref:i=>{c(this,B,i),i.required=this.hasAttribute("required"),i.value=this.getAttribute("value")||"",i.checked=this.hasAttribute("checked"),i.name=this.getAttribute("name")||"",l(this,W,pe).call(this)},class:"real",type:"checkbox",onChange:()=>{l(this,W,pe).call(this),this.dispatchEvent(new Event("change",{composed:!0}))}})]})})}get checked(){return e(this,B).checked}set checked(t){e(this,B).checked=t,l(this,W,pe).call(this)}get value(){return e(this,B).value}set value(t){e(this,B).value=t,l(this,W,pe).call(this)}};B=new WeakMap,ee=new WeakMap,W=new WeakSet,pe=function(){this.checked?e(this,ee).setFormValue(this.value):e(this,ee).setFormValue(null),this.classList.toggle("checked",this.checked)},pt.formAssociated=!0;let ht=pt;customElements.get("e-checkbox")||customElements.define("e-checkbox",ht);var _;class ge extends HTMLElement{constructor(...t){super();o(this,_);c(this,_,t)}addStore(t){e(this,_).push(t)}get firstStore(){return e(this,_)[0]}get stores(){return e(this,_)}updateStores(t){e(this,_).forEach(i=>{i.current=t})}}_=new WeakMap;const ns=E({":host":{width:"100%",display:"inline-flex",height:"max-content"},"e-checkbox":{"--size":"calc(var(--height-input) * 0.8)",width:"var(--size)",height:"var(--size)",borderRadius:f.borderRadiusSmall.var}});class It extends ge{constructor(...s){super(...s),this.attachShadow({mode:"open"}).adoptedStyleSheets.push(ns),p(this,{children:[p("e-checkbox",{onChange:i=>{this.updateStores(i.currentTarget.checked)},ref:i=>{this.firstStore.subscribe(n=>{i.checked=n.current})}})]})}}customElements.get("e-tweaker-boolean-manager")||customElements.define("e-tweaker-boolean-manager",It);const os=E({":host":{width:"100%",display:"inline-flex",height:"max-content"},input:{width:"100%",height:"var(--height-input)",padding:"0",background:"none",borderRadius:f.borderRadius.var,border:"none",blockSize:"unset"},"input::-webkit-color-swatch, input::-webkit-color-swatch-wrapper":{boxSizing:"border-box",padding:"0px",border:"none",borderRadius:f.borderRadius.var,height:"calc(var(--height-input) * 0.93)"}});class Ht extends ge{constructor(...s){super(...s),this.attachShadow({mode:"open"}).adoptedStyleSheets.push(os),p(this,{children:[Ve({type:"color",value:this.firstStore,onInput:i=>{this.updateStores(i.currentTarget.value)}})]})}}customElements.get("e-tweaker-color-manager")||customElements.define("e-tweaker-color-manager",Ht);const rs=E({a:{color:"inherit",fontSize:"var(--font-size-small)"}});class Dt extends ge{constructor(...s){var i;super(...s),this.attachShadow({mode:"open"}).adoptedStyleSheets.push(rs),p(this,{children:[Xt({href:this.firstStore,target:(i=this.firstStore.__manager)!=null&&i.sameWindow?"_self":"_blank",children:this.firstStore})]})}}customElements.get("e-tweaker-link-manager")||customElements.define("e-tweaker-link-manager",Dt);const as=E({":host":{width:"100%",display:"flex",alignItems:"center",gap:"var(--gap-small)"},".inputs-wrapper":{display:"grid",gap:"var(--gap-small)",width:"100%"},input:{boxSizing:"border-box",outline:"none",fontVariantNumeric:"tabular-nums",fontFamily:"inherit",color:"inherit",border:"none",fontSize:"var(--font-size-small)",width:"100%",height:"var(--height-input)",margin:"0",padding:"0 var(--gap-small)",backgroundColor:"rgba(255, 255, 255, 0.1)",borderRadius:f.borderRadius.var},".drag":{position:"relative",width:"100%",height:"calc(var(--height-input) * 0.2)",display:"flex",alignItems:"center"},".drag::before":{content:'""',position:"absolute",left:"0",width:"100%",zIndex:"-1",height:"1px",borderBottom:`1px solid ${f.colorFont.var}`,transform:"translateY(-50%)",opacity:"0.3"},":host(.infinite) .drag::before":{borderBottom:`1px dashed ${f.colorFont.var}`},".drag-knob":{"--size":"calc(var(--height-input) * 0.4)",width:"var(--size)",height:"var(--size)"},".drag-knob-inner":{width:"100%",height:"100%",backgroundColor:f.colorFont.var,borderRadius:f.borderRadiusSmall.var,transition:"opacity var(--duration-short)"},":host(.infinite) .grabbing .drag-knob-inner":{opacity:.3}});var J,te,se,V,K,ve,ye,F,Y,Se,ke,w,Q,ct,dt,Ke,Ee;class Vt extends ge{constructor(...t){var n,h,u,g;super(...t);o(this,w);o(this,J,[]);o(this,te,[]);o(this,se);o(this,V);o(this,K);o(this,ve);o(this,ye);o(this,F);o(this,Y,!1);o(this,Se,t=>{const i=l(this,w,Q).call(this,t);return i.map((n,h)=>{const u=typeof n=="string"?parseFloat(n)||e(this,V):n,g=Be.clamp(u,e(this,V),e(this,K)),k=Be.toStep(g,e(this,se));i[h]=k}),e(this,ye)==="number"?i[0]:i});o(this,ke,()=>{l(this,w,Q).call(this).map((t,i)=>{const n=e(this,J)[i];n&&(n.value=(t||0).toString())}),l(this,w,ct).call(this)});o(this,Ee,()=>{l(this,w,ct).call(this)});this.attachShadow({mode:"open"}).adoptedStyleSheets.push(as),c(this,V,Be.nullishCoalescing((n=this.firstStore.__manager)==null?void 0:n.min,-1/0)),c(this,K,Be.nullishCoalescing((h=this.firstStore.__manager)==null?void 0:h.max,1/0)),c(this,se,((u=this.firstStore.__manager)==null?void 0:u.step)||.01),c(this,ve,((g=this.firstStore.__manager)==null?void 0:g.ease)||1),c(this,ye,Array.isArray(this.firstStore.current)?"array":"number"),c(this,F,isFinite(e(this,K))&&isFinite(e(this,V))),p(this,{class:e(this,F)?"":"infinite",children:l(this,w,Q).call(this).map((k,T)=>b({class:"inputs-wrapper",children:[Ve({type:"number",step:e(this,se),min:e(this,V),max:e(this,K),ref:v=>e(this,J).push(v),value:k,onChange:()=>{this.updateStores(e(this,J).map(v=>parseFloat(v.value)))}}),b({class:"drag",children:[b({class:"drag-knob",ref:v=>e(this,te).push(v),onPointerdown:v=>{v.preventDefault(),c(this,Y,!0);const me=l(this,w,Q).call(this),qe=me[T],x=e(this,te)[T],N=e(this,J)[T];if(x&&N){const P=x.parentElement,q=l(this,w,dt).call(this);P.classList.add("grabbing"),St.setupDrag(O=>{const bt=O.x-v.x,Ot=e(this,F)?P.offsetWidth/(q||1):1,Zt=qe+bt/Ot*e(this,ve);if(me[T]=Zt,!e(this,F)){const Wt=l(this,w,Ke).call(this,x,0);x.style.transform=`translateX(${Wt+bt}px)`}this.updateStores([...me])},()=>{if(c(this,Y,!1),!e(this,F)){const O=l(this,w,Ke).call(this,x,0);x.style.transition="transform 0.1s",x.style.transform=`translateX(${O}px)`,P.classList.remove("grabbing"),setTimeout(()=>{x.style.transition=""},100)}})}},children:b({class:"drag-knob-inner"})})]})]}))})}connectedCallback(){this.firstStore.addMiddleware(e(this,Se)),this.firstStore.subscribe(e(this,ke)),yt.elementResizer.subscribe(this,e(this,Ee))}disconnectedCallback(){this.firstStore.removeMiddleware(e(this,Se)),this.firstStore.unsubscribe(e(this,ke)),yt.elementResizer.unsubscribe(e(this,Ee))}}J=new WeakMap,te=new WeakMap,se=new WeakMap,V=new WeakMap,K=new WeakMap,ve=new WeakMap,ye=new WeakMap,F=new WeakMap,Y=new WeakMap,Se=new WeakMap,ke=new WeakMap,w=new WeakSet,Q=function(t=this.firstStore.current){return Array.isArray(t)?t:[t]},ct=function(){l(this,w,Q).call(this).map((t,i)=>{const n=e(this,te)[i];if(n&&(!e(this,Y)||e(this,Y)&&e(this,F))){const h=l(this,w,Ke).call(this,n,t);n.style.transform=`translateX(${h}px)`}})},dt=function(){return e(this,F)?e(this,K)-e(this,V):0},Ke=function(t,i){const n=t.parentElement,h=l(this,w,dt).call(this),u=h?i/h:.5;return(n.offsetWidth-t.offsetWidth)*u},Ee=new WeakMap;customElements.get("e-tweaker-number-manager")||customElements.define("e-tweaker-number-manager",Vt);const ls=E({":host":{position:"relative"},".head":{width:"100%",cursor:"default",background:"none",border:"none",color:"inherit",fontFamily:"inherit",fontSize:"inherit",fontWeight:"inherit",textAlign:"start",padding:"0",margin:"0"},".body":{boxSizing:"border-box",position:"var(--position, unset)",top:"100%",left:"0",width:"100%",overflow:"hidden",transitionDuration:"var(--duration, var(--duration-short))",transitionProperty:"height",cursor:"default"},".body-inner":{display:"grid",gap:"var(--gap, 0px)",width:"100%",paddingTop:"var(--gap, 0px)"}});var ie,ne,z,G,oe,re,Ye,xe,ft;const wt=class wt extends HTMLElement{constructor(){super();o(this,xe);o(this,ie,null);o(this,ne,"");o(this,z,null);o(this,G,!1);o(this,oe);o(this,re,null);o(this,Ye,()=>{U.dispatchSizeChangeEvent(this)});X.isBrowser&&(this.attachShadow({mode:"open"}).adoptedStyleSheets.push(ls),c(this,ie,this.attachInternals()),c(this,re,new ResizeObserver(e(this,Ye))),p(this,{children:[j({class:"head",children:fe({name:"head"}),onClick:()=>{this.opened?this.close():this.open()}}),b({class:"body",style:{height:"0px"},children:b({class:"body-inner",children:fe()}),ref:i=>{c(this,z,i)}})]}))}get value(){return e(this,ne)}set value(t){c(this,ne,t),this.dispatchEvent(new Event("change",{bubbles:!0,composed:!0})),e(this,ie).setFormValue(e(this,ne))}get internals(){return e(this,ie)}get opened(){return e(this,G)}open(){clearTimeout(e(this,oe)),c(this,G,!0),e(this,z).style.display="grid",this.classList.add("triggered"),setTimeout(()=>{this.classList.add("opened"),e(this,z).style.height=e(this,z).scrollHeight+"px",l(this,xe,ft).call(this)},0)}close(){c(this,G,!1),e(this,z).style.height="0px",this.classList.remove("opened"),l(this,xe,ft).call(this),c(this,oe,setTimeout(()=>{this.classList.remove("triggered"),e(this,z).style.display="none"},U.getElementTransitionDurationMS(e(this,z))))}connectedCallback(){e(this,re).observe(e(this,z))}disconnectedCallback(){clearTimeout(e(this,oe)),e(this,re).disconnect()}};ie=new WeakMap,ne=new WeakMap,z=new WeakMap,G=new WeakMap,oe=new WeakMap,re=new WeakMap,Ye=new WeakMap,xe=new WeakSet,ft=function(){U.dispatchBeforeSizeChangeEvent(this),this.dispatchEvent(new CustomEvent("selectToggle",{bubbles:!0,composed:!0,detail:{opened:e(this,G)}}))},wt.formAssociated=!0;let ut=wt;customElements.get("e-select")||customElements.define("e-select",ut);var Ce;class qt extends HTMLElement{constructor(){super(...arguments);o(this,Ce,null)}get selectElement(){return e(this,Ce)}connectedCallback(){var i,n;const t=(n=(i=this.assignedSlot)==null?void 0:i.getRootNode())==null?void 0:n.host;t?c(this,Ce,t):console.log(this,"e-select not found")}}Ce=new WeakMap;const hs=E({":host":{width:"100%",height:"40px",display:"inline-flex",alignItems:"center"}});var ae,Te,gt;class cs extends qt{constructor(){super();o(this,Te);o(this,ae,()=>{this.selectElement.value===this.value?this.style.display="none":this.style.display=""});X.isBrowser&&(this.attachShadow({mode:"open"}).adoptedStyleSheets.push(hs),p(this,{tabindex:0,onClick:()=>{l(this,Te,gt).call(this)},onKeydown:i=>{i.code==="Space"&&l(this,Te,gt).call(this)},children:fe()}))}get value(){return(this.hasAttribute("value")?this.getAttribute("value"):this.innerText)||""}connectedCallback(){super.connectedCallback(),this.hasAttribute("default")&&(this.selectElement.value||(this.selectElement.value=this.value)),this.selectElement.addEventListener("change",e(this,ae)),setTimeout(()=>{e(this,ae).call(this)})}disconnectedCallback(){this.selectElement.removeEventListener("change",e(this,ae))}}ae=new WeakMap,Te=new WeakSet,gt=function(){this.selectElement.value=this.value,this.selectElement.close()};customElements.get("e-select-option")||customElements.define("e-select-option",cs);const ds=E({":host":{width:"100%",height:"40px",display:"inline-flex",alignItems:"center",justifyContent:"space-between"},".default-arrow":{flexShrink:"0",width:"var(--arrow-size, 1em)",height:"var(--arrow-size, 1em)",fill:`var(--arrow-color, ${f.colorMain.var})`,transitionProperty:"transform",transitionDuration:"var(--duration, var(--duration-short))"},":host(.opened) .default-arrow":{transform:"scaleY(-1)"}});var Le,le,ze;class us extends qt{constructor(){super();o(this,Le,null);o(this,le,()=>{const i=this.selectElement.shadowRoot.querySelector(".body slot").assignedElements().find(n=>n.value===this.selectElement.value);i&&(e(this,Le).innerHTML=i.innerHTML)});o(this,ze,()=>{this.classList.toggle("opened",this.selectElement.opened)});X.isBrowser&&(this.attachShadow({mode:"open"}).adoptedStyleSheets.push(ds),p(this,{children:[fe(),fe({name:"arrow",children:p($t,{class:"default-arrow"})})]}),this.slot="head")}connectedCallback(){super.connectedCallback(),c(this,Le,this.querySelector("[data-value-holder]")||this),this.selectElement.addEventListener("change",e(this,le)),e(this,le).call(this),this.selectElement.addEventListener("selectToggle",e(this,ze))}disconnectedCallback(){this.selectElement.removeEventListener("change",e(this,le)),this.selectElement.removeEventListener("selectToggle",e(this,ze))}}Le=new WeakMap,le=new WeakMap,ze=new WeakMap;customElements.get("e-select-head")||customElements.define("e-select-head",us);const fs=E({"e-select":{display:"block",width:"100%","--arrow-color":f.colorFont.var},"e-select-head":{width:"100%",height:"var(--height-input)",display:"flex",alignItems:"center",justifyContent:"space-between",fontSize:"var(--font-size-small)"},"e-select-option":{height:"var(--height-input)",transitionDuration:"var(--duration-short)",transitionProperty:"color",fontSize:"var(--font-size-small)"},"e-select-option:hover":{color:f.colorActive.var},svg:{width:"16px",height:"16px",fill:f.colorFont.var,transitionProperty:"transform",transitionDuration:"var(--duration-short)"},".opened svg":{transform:"scaleY(-1)"}});class Bt extends ge{constructor(...s){var n;super(...s),this.attachShadow({mode:"open"}).adoptedStyleSheets.push(fs);const i=((n=this.firstStore.__manager)==null?void 0:n.variants)||[];p(this,{children:p("e-select",{value:this.firstStore,onChange:h=>{this.updateStores(h.currentTarget.value)},lightChildren:[p("e-select-head",{lightChildren:[lt({"data-value-holder":""})]}),...i.map((h,u)=>p("e-select-option",{lightChildren:h,default:u===0?!0:null}))]})})}}customElements.get("e-tweaker-select-manager")||customElements.define("e-tweaker-select-manager",Bt);const gs=E({":host":{width:"100%",display:"flex",alignItems:"center"},input:{boxSizing:"border-box",outline:"none",fontVariantNumeric:"tabular-nums",fontFamily:"inherit",color:"inherit",border:"none",fontSize:"var(--font-size-small)",height:"var(--height-input)",width:"100%",margin:"0",padding:"0 var(--gap-small)",backgroundColor:"rgba(255, 255, 255, 0.1)",borderRadius:f.borderRadius.var}});class _t extends ge{constructor(...s){super(...s),this.attachShadow({mode:"open"}).adoptedStyleSheets.push(gs),p(this,{children:[Ve({class:"text-input",type:"string",value:this.firstStore,onChange:i=>{this.updateStores(i.currentTarget.value)}})]})}}customElements.get("e-tweaker-string-manager")||customElements.define("e-tweaker-string-manager",_t);const ms={boolean:It,color:Ht,link:Dt,number:Vt,select:Bt,string:_t},ps=E({":host":{display:"grid",gridAutoFlow:"column",gridTemplateColumns:"0.5fr 1fr",alignItems:"center",color:f.colorFont.var,gap:"var(--gap-medium)"},":host(.disabled)":{pointerEvents:"none",opacity:.5},".head":{fontSize:"var(--font-size-medium)",display:"flex",alignItems:"center",gap:"var(--gap-extra-small)"},".head-buttons":{display:"flex"},".head-button":{width:"14px",height:"14px",padding:"0",margin:"0",border:"none",background:"none",fill:f.colorFont.var,transitionDuration:"var(--duration-short)",transitionProperty:"fill, opacity",opacity:"0"},":host(:hover) .head-button":{opacity:"1"},".head-button:hover":{fill:f.colorActive.var},".head-button svg":{width:"100%",height:"100%"}});var R,he,ce,de,ue,Re,Me;class mt extends HTMLElement{constructor(t){var h,u;super();o(this,R,[]);o(this,he);o(this,ce);o(this,de,!1);o(this,ue);o(this,Re,()=>{m.activeStores.current.find(t=>e(this,R).includes(t))||this.remove()});o(this,Me,t=>{e(this,de)&&((t.metaKey||t.ctrlKey)&&t.code==="KeyC"?navigator.clipboard.writeText(e(this,R)[0].current):(t.metaKey||t.ctrlKey)&&t.code==="KeyR"&&(e(this,R).forEach(i=>{i.reset()}),t.preventDefault()))});c(this,R,[t.store]),c(this,he,t.store.name),c(this,ce,e(this,he).split(".").slice(-1).toString());const i=((h=t.store.__manager)==null?void 0:h.type)||"string";c(this,ue,new ms[i](e(this,R)[0])),this.attachShadow({mode:"open"}).adoptedStyleSheets.push(ps),p(this,{class:{disabled:((u=t.store.__manager)==null?void 0:u.disabled)||!1},onPointerleave:()=>{c(this,de,!1)},onPointerenter:()=>{c(this,de,!0)},children:[b({class:"head",children:[b({class:"name",children:e(this,ce)+":"}),b({class:"head-buttons",children:[j({class:"head-button",children:Pt,onClick:()=>{navigator.clipboard.writeText(e(this,R)[0].current)}}),j({class:"head-button",children:Ft,onClick:()=>{e(this,R).forEach(g=>{g.reset()})}})]})]}),e(this,ue)]})}get key(){return e(this,he)}get name(){return e(this,ce)}get stores(){return e(this,R)}addStore(t){e(this,ue).addStore(t)}connectedCallback(){m.activeStores.subscribe(e(this,Re)),addEventListener("keydown",e(this,Me)),U.dispatchSizeChangeEvent(this)}disconnectedCallback(){m.activeStores.unsubscribe(e(this,Re)),removeEventListener("keydown",e(this,Me))}}R=new WeakMap,he=new WeakMap,ce=new WeakMap,de=new WeakMap,ue=new WeakMap,Re=new WeakMap,Me=new WeakMap;customElements.get("e-tweaker-field")||customElements.define("e-tweaker-field",mt);const ws=E({".wrapper":{boxSizing:"border-box",backgroundColor:"rgba(255, 255, 255, 0.1)",borderRadius:f.borderRadius.var},".head":{boxSizing:"border-box",width:"100%",height:"var(--tweaker-folder-height)",paddingLeft:"var(--gap-medium)",paddingRight:"var(--gap-medium)",display:"flex",alignItems:"center",justifyContent:"space-between",backgroundColor:f.colorMainAux.var,borderRadius:f.borderRadius.var},".name":{fontSize:"var(--font-size-large)",color:f.colorFont.var},".body":{display:"none",overflow:"hidden","@supports (height: calc-size(auto))":{height:"0"}},":host(.transition-allowed) .body":{transition:"height var(--duration-short), display var(--duration-short) allow-discrete"},":host(.opened) .body":{height:"calc-size(auto)",display:"block","@starting-style":{height:"0"}},".body-content":{boxSizing:"border-box",padding:"var(--gap-large)",display:"grid",gap:"var(--gap-medium)"},".arrow":{width:"20px",height:"20px",fill:f.colorFont.var,transition:"transform var(--duration-short)"},".opened .arrow":{transform:"scaleY(-1)"}});var M,Ae,S,Ne,Fe,Pe,$e,Ge;const Ue=class Ue extends HTMLElement{constructor(t){super();o(this,M);o(this,Ae,new m.Store(null));o(this,S,new m.Store([]));o(this,Ne);o(this,Fe,null);o(this,Pe,null);o(this,$e,null);o(this,Ge,t=>{let i=[],n=[];t.forEach(h=>{i=[...i,...h.removedNodes],n=[...n,...h.addedNodes]}),e(this,S).current=e(this,S).current.filter(h=>!i.includes(h)),e(this,M)&&!e(this,S).current.length&&!n.length&&this.remove()});this.attachShadow({mode:"open"}).adoptedStyleSheets.push(ws),c(this,M,t.key),c(this,Ne,new MutationObserver(e(this,Ge))),p(this,{children:[b({class:"wrapper",children:[b({class:"head",onClick:n=>{this.classList.toggle("opened"),this.classList.contains("opened")?C.openPanel(e(this,M)):C.closePanel(e(this,M))},children:[e(this,M)?b({class:"name",children:[e(this,M).split(".").slice(-1).toString()]}):null,e(this,Ae),p($t,{class:"arrow"})]}),b({class:"body",ref:n=>{c(this,Fe,n)},children:b({class:"body-content",children:e(this,S),ref:n=>{c(this,Pe,n),c(this,$e,n.firstElementChild)}})})]})]}),t!=null&&t.storeBox&&this.handleStore(t.storeBox)}get key(){return e(this,M)}get head(){return e(this,Ae)}get content(){return e(this,S)}get bodyElement(){return e(this,Fe)}get contentElement(){return e(this,Pe)}connectedCallback(){C.isPanelOpened(e(this,M))&&this.classList.add("opened"),setTimeout(()=>{this.classList.add("transition-allowed")}),e(this,Ne).observe(e(this,$e),{childList:!0})}handleStore(t){if(t.remainingFolders.length){const n=t.store.name.split("."),h=n.slice(0,n.length-t.remainingFolders.length).join("."),u=e(this,S).current.find(g=>g.key===h);u instanceof Ue?u.handleStore({store:t.store,remainingFolders:t.remainingFolders.slice(1)}):e(this,S).current=[...e(this,S).current,new Ue({key:h,storeBox:{store:t.store,remainingFolders:t.remainingFolders.slice(1)}})]}else{const i=e(this,S).current.find(n=>n.key===t.store.name);i instanceof mt?i.addStore(t.store):e(this,S).current=[...e(this,S).current,new mt({store:t.store})]}}};M=new WeakMap,Ae=new WeakMap,S=new WeakMap,Ne=new WeakMap,Fe=new WeakMap,Pe=new WeakMap,$e=new WeakMap,Ge=new WeakMap;let Oe=Ue;customElements.get("e-tweaker-folder")||customElements.define("e-tweaker-folder",Oe);const bs=E({":host":{"--tweaker-width":"550px","--tweaker-offset":"20px","--tweaker-folder-height":"35px","--height-input":"25px","--gap-large":"12px","--gap-medium":"10px","--gap-small":"8px","--gap-extra-small":"4px","--font-size-large":"16px","--font-size-medium":"14px","--font-size-small":"12px","--duration-short":"0.2s",fontFamily:"sans-serif",position:"absolute",top:"var(--tweaker-offset)",right:"var(--tweaker-offset)",width:"var(--tweaker-width)",backgroundColor:f.colorMain.var,borderRadius:f.borderRadius.var,transition:"opacity 0.1s",zIndex:"100",opacity:"0.1"},":host(:hover)":{opacity:"1 !important"},".resize":{position:"absolute",left:"0",top:"0",width:"calc(var(--tweaker-width) * 0.025)",height:"100%",zIndex:"1",cursor:"ew-resize"},".tweaker-buttons":{display:"flex",alignItems:"center",gap:"var(--gap-extra-small)"},".tweaker-button":{width:"18px",height:"18px",padding:"0",margin:"0",background:"none",border:"none",fill:f.colorFont.var,transitionProperty:"fill",transitionDuration:"var(--duration-short)"},".tweaker-button:hover":{fill:f.colorActive.var},".tweaker-button svg":{width:"100%",height:"100%"},":host .body-content":{maxHeight:`calc(
|
|
10
10
|
100dvh -
|
|
11
11
|
(
|
|
12
12
|
var(--tweaker-offset) * 2 +
|
|
@@ -15,4 +15,4 @@
|
|
|
15
15
|
)`,overflow:"hidden auto","-ms-overflow-style":"none","scrollbar-width":"none"},":host .body-content::-webkit-scrollbar":{display:"none"},[`@media ${Gt.ViewportMediaRules["<=mobile"]}`]:{":host":{position:"absolute",top:"0",right:"0",width:"100% !important",borderTopLeftRadius:"0",borderTopRightRadius:"0"},":host .body-content":{maxHeight:`calc(
|
|
16
16
|
100dvh -
|
|
17
17
|
var(--tweaker-folder-height)
|
|
18
|
-
)`}}});var Ie,He,De;class Kt extends Oe{constructor(){super({key:""});o(this,Ie,!1);o(this,He,()=>{C.save()});o(this,De,Jt.debounce(()=>{
|
|
18
|
+
)`}}});var Ie,He,De;class Kt extends Oe{constructor(){super({key:""});o(this,Ie,!1);o(this,He,()=>{C.save()});o(this,De,Jt.debounce(()=>{m.activeStores.current.forEach(t=>{if(t.name){const i=t.name.split(".");this.handleStore({store:t,remainingFolders:i.length>1?i.slice(0,-1):[]})}}),e(this,Ie)||(c(this,Ie,!0),this.contentElement.scroll({top:C.scrollValue}),this.contentElement.addEventListener("scroll",()=>{C.scrollValue=this.contentElement.scrollTop}))},10));C.load(),this.shadowRoot.adoptedStyleSheets.push(bs),this.head.current=[b({class:"tweaker-buttons",onClick:t=>{t.stopPropagation()},children:[j({class:"tweaker-button",children:Ft,onClick:()=>{m.storeRegistry.resetState()}}),j({class:["tweaker-button"],children:[Pt],onClick:()=>{navigator.clipboard.writeText(JSON.stringify(m.storeRegistry.getState()))}}),j({class:"tweaker-button",children:jt,onClick:()=>{U.createJSONAndSave(m.storeRegistry.name,m.storeRegistry.getState())}}),At({class:"tweaker-button",children:[es,Ve({type:"file",style:{display:"none"},onChange:t=>{var h;const n=(h=t.currentTarget.files)==null?void 0:h[0];if(n){const u=new FileReader;u.onload=g=>{var T,v;const k=(v=(T=g.target)==null?void 0:T.result)==null?void 0:v.toString();k&&m.storeRegistry.loadState(k)},u.readAsText(n)}}})]})]})],p(this.bodyElement,{children:[b({class:"resize",onPointerdown:t=>{t.preventDefault();const i=this.getBoundingClientRect(),n=this.contentElement.scrollTop;St.setupDrag(h=>{const u=t.x-h.x,g=Math.max(400,i.width+u);this.style.width=g+"px",C.changeSize("tweaker",g)},()=>{setTimeout(()=>{this.contentElement.scroll({top:n})},10)})},onDblclick:()=>{this.style.width="",C.changeSize("tweaker",null)}})]})}connectedCallback(){super.connectedCallback(),window.addEventListener("beforeunload",e(this,He)),m.activeStores.subscribe(e(this,De)),C.changedSizes("tweaker")&&(this.style.width=C.changedSizes("tweaker")+"px")}disconnectedCallback(){window.removeEventListener("beforeunload",e(this,He)),C.save(),m.activeStores.unsubscribe(e(this,De))}}Ie=new WeakMap,He=new WeakMap,De=new WeakMap;customElements.get("e-tweaker")||customElements.define("e-tweaker",Kt);X.isBrowser&&document.body.appendChild(new Kt);
|
|
@@ -5,16 +5,15 @@ var Xe = (r, s, t) => s.has(r) || vt("Cannot " + t);
|
|
|
5
5
|
var e = (r, s, t) => (Xe(r, s, "read from private field"), t ? t.call(r) : s.get(r)), o = (r, s, t) => s.has(r) ? vt("Cannot add the same private member more than once") : s instanceof WeakSet ? s.add(r) : s.set(r, t), c = (r, s, t, i) => (Xe(r, s, "write to private field"), i ? i.call(r, t) : s.set(r, t), t), l = (r, s, t) => (Xe(r, s, "access private method"), t);
|
|
6
6
|
import { i as X } from "../browser-0zX67oeU.js";
|
|
7
7
|
import { S as P, s as B, a as j } from "../Store-OTdcl6SX.js";
|
|
8
|
-
import { g as yt, d as Et, a as
|
|
9
|
-
import { d as
|
|
8
|
+
import { g as yt, k as Ut, d as Et, a as Xt, c as Qt } from "../style-3MQV6Cnl.js";
|
|
9
|
+
import { d as jt } from "../function-C10DGppn.js";
|
|
10
10
|
import { s as xt } from "../gestures-D2Fdra_G.js";
|
|
11
11
|
import "../ticker/index.js";
|
|
12
|
-
import { c as Oe, u as
|
|
13
|
-
import { connector as
|
|
14
|
-
import {
|
|
15
|
-
import { n as St, c as
|
|
12
|
+
import { c as Oe, u as es } from "../string-f0Dnk0L1.js";
|
|
13
|
+
import { connector as ts } from "../connector/index.js";
|
|
14
|
+
import { ViewportMediaRules as ss } from "../device/index.js";
|
|
15
|
+
import { n as St, c as is, t as ns } from "../polyfills-AItxku8u.js";
|
|
16
16
|
import { elementResizer as kt } from "../element-resizer/index.js";
|
|
17
|
-
import { g as ns } from "../style-j2TwriJ_.js";
|
|
18
17
|
const os = /* @__PURE__ */ new Set([
|
|
19
18
|
// 'a', 'style', 'title', 'script',
|
|
20
19
|
"animate",
|
|
@@ -153,7 +152,7 @@ d = new WeakMap(), $ = new WeakMap(), v = new WeakMap(), be = new WeakMap(), I =
|
|
|
153
152
|
}, Qe = function() {
|
|
154
153
|
if (X && (e(this, v).size || e(this, $).size)) {
|
|
155
154
|
const s = e(this, d) instanceof DocumentFragment ? e(this, d).firstChild : e(this, d);
|
|
156
|
-
c(this, be,
|
|
155
|
+
c(this, be, ts.subscribe(
|
|
157
156
|
s,
|
|
158
157
|
{
|
|
159
158
|
connectCallback: e(this, We),
|
|
@@ -234,7 +233,7 @@ d = new WeakMap(), $ = new WeakMap(), v = new WeakMap(), be = new WeakMap(), I =
|
|
|
234
233
|
if (s) {
|
|
235
234
|
e(this, H) || c(this, H, []);
|
|
236
235
|
for (const t in s) {
|
|
237
|
-
const i = t, n =
|
|
236
|
+
const i = t, n = es(
|
|
238
237
|
i.split("on").slice(1).join("on")
|
|
239
238
|
), h = s[i];
|
|
240
239
|
typeof h == "object" ? e(this, H).push({
|
|
@@ -766,7 +765,7 @@ class Kt extends ge {
|
|
|
766
765
|
o(this, Se, (t) => {
|
|
767
766
|
const i = l(this, p, Q).call(this, t);
|
|
768
767
|
return i.map((n, h) => {
|
|
769
|
-
const u = typeof n == "string" ? parseFloat(n) || e(this, V) : n, m =
|
|
768
|
+
const u = typeof n == "string" ? parseFloat(n) || e(this, V) : n, m = is(u, e(this, V), e(this, Z)), S = ns(m, e(this, ie));
|
|
770
769
|
i[h] = S;
|
|
771
770
|
}), e(this, ye) === "number" ? i[0] : i;
|
|
772
771
|
});
|
|
@@ -961,7 +960,7 @@ const wt = class wt extends HTMLElement {
|
|
|
961
960
|
close() {
|
|
962
961
|
c(this, U, !1), e(this, T).style.height = "0px", this.classList.remove("opened"), l(this, xe, ft).call(this), c(this, re, setTimeout(() => {
|
|
963
962
|
this.classList.remove("triggered"), e(this, T).style.display = "none";
|
|
964
|
-
},
|
|
963
|
+
}, Ut(e(this, T))));
|
|
965
964
|
}
|
|
966
965
|
connectedCallback() {
|
|
967
966
|
e(this, ae).observe(e(this, T));
|
|
@@ -971,7 +970,7 @@ const wt = class wt extends HTMLElement {
|
|
|
971
970
|
}
|
|
972
971
|
};
|
|
973
972
|
ne = new WeakMap(), oe = new WeakMap(), T = new WeakMap(), U = new WeakMap(), re = new WeakMap(), ae = new WeakMap(), Ye = new WeakMap(), xe = new WeakSet(), ft = function() {
|
|
974
|
-
|
|
973
|
+
Xt(this), this.dispatchEvent(
|
|
975
974
|
new CustomEvent("selectToggle", {
|
|
976
975
|
bubbles: !0,
|
|
977
976
|
composed: !0,
|
|
@@ -1581,7 +1580,7 @@ const Ts = k({
|
|
|
1581
1580
|
":host .body-content::-webkit-scrollbar": {
|
|
1582
1581
|
display: "none"
|
|
1583
1582
|
},
|
|
1584
|
-
[`@media ${
|
|
1583
|
+
[`@media ${ss["<=mobile"]}`]: {
|
|
1585
1584
|
":host": {
|
|
1586
1585
|
position: "absolute",
|
|
1587
1586
|
top: "0",
|
|
@@ -1608,7 +1607,7 @@ class qt extends Ze {
|
|
|
1608
1607
|
o(this, He, () => {
|
|
1609
1608
|
x.save();
|
|
1610
1609
|
});
|
|
1611
|
-
o(this, De,
|
|
1610
|
+
o(this, De, jt(() => {
|
|
1612
1611
|
j.current.forEach((t) => {
|
|
1613
1612
|
if (t.name) {
|
|
1614
1613
|
const i = t.name.split(".");
|
|
@@ -1650,7 +1649,7 @@ class qt extends Ze {
|
|
|
1650
1649
|
class: "tweaker-button",
|
|
1651
1650
|
children: ls,
|
|
1652
1651
|
onClick: () => {
|
|
1653
|
-
|
|
1652
|
+
Qt(B.name, B.getState());
|
|
1654
1653
|
}
|
|
1655
1654
|
}),
|
|
1656
1655
|
Pt({
|
|
@@ -6,7 +6,7 @@ function p(e) {
|
|
|
6
6
|
})
|
|
7
7
|
);
|
|
8
8
|
}
|
|
9
|
-
function
|
|
9
|
+
function y(e) {
|
|
10
10
|
e.dispatchEvent(
|
|
11
11
|
new CustomEvent("beforeSizeChange", {
|
|
12
12
|
bubbles: !0,
|
|
@@ -14,7 +14,7 @@ function l(e) {
|
|
|
14
14
|
})
|
|
15
15
|
);
|
|
16
16
|
}
|
|
17
|
-
function
|
|
17
|
+
function d(e, t) {
|
|
18
18
|
const n = new Blob([JSON.stringify(t)], { type: "application/json" }), r = document.createElement("a");
|
|
19
19
|
r.download = e + ".json", r.href = window.URL.createObjectURL(n), r.dataset.downloadurl = ["application/json", r.download, r.href].join(":");
|
|
20
20
|
const i = new MouseEvent("click", {
|
|
@@ -24,7 +24,7 @@ function y(e, t) {
|
|
|
24
24
|
});
|
|
25
25
|
r.dispatchEvent(i), r.remove();
|
|
26
26
|
}
|
|
27
|
-
function
|
|
27
|
+
function c(e) {
|
|
28
28
|
return typeof e == "object" && e !== null && !Array.isArray(e);
|
|
29
29
|
}
|
|
30
30
|
function a(e) {
|
|
@@ -39,7 +39,7 @@ function a(e) {
|
|
|
39
39
|
e.hasOwnProperty(n) && (t[n] = a(e[n]));
|
|
40
40
|
return t;
|
|
41
41
|
}
|
|
42
|
-
function f(e, t, n =
|
|
42
|
+
function f(e, t, n = c) {
|
|
43
43
|
for (const r in t)
|
|
44
44
|
n(t[r]) ? (e[r] || Object.assign(e, { [r]: {} }), f(e[r], t[r], n)) : Object.assign(e, { [r]: t[r] });
|
|
45
45
|
return e;
|
|
@@ -55,7 +55,7 @@ function s(e, t) {
|
|
|
55
55
|
if (Array.isArray(e)) {
|
|
56
56
|
const n = e.length > t.length ? e : t, r = e.length > t.length ? t : e;
|
|
57
57
|
return n.every(
|
|
58
|
-
(i,
|
|
58
|
+
(i, o) => s(i, r[o])
|
|
59
59
|
);
|
|
60
60
|
}
|
|
61
61
|
if (typeof e != "object" || e instanceof Node || typeof e == "object" && e.constructor.toString().startsWith("class"))
|
|
@@ -71,13 +71,13 @@ function s(e, t) {
|
|
|
71
71
|
}
|
|
72
72
|
return !0;
|
|
73
73
|
}
|
|
74
|
-
function
|
|
74
|
+
function h(e, t) {
|
|
75
75
|
const n = {};
|
|
76
76
|
for (const r in e)
|
|
77
77
|
t.includes(r) && (n[r] = e[r]);
|
|
78
78
|
return n;
|
|
79
79
|
}
|
|
80
|
-
function
|
|
80
|
+
function m(e, t) {
|
|
81
81
|
const n = {};
|
|
82
82
|
for (const r in e)
|
|
83
83
|
t.includes(r) || (n[r] = e[r]);
|
|
@@ -87,7 +87,7 @@ function w(e) {
|
|
|
87
87
|
var t;
|
|
88
88
|
return typeof e == "function" && ((t = Object.getOwnPropertyDescriptor(e, "prototype")) == null ? void 0 : t.writable) === !1;
|
|
89
89
|
}
|
|
90
|
-
function
|
|
90
|
+
function g(e, ...t) {
|
|
91
91
|
t.forEach((n) => {
|
|
92
92
|
Object.getOwnPropertyNames(n.prototype).forEach((r) => {
|
|
93
93
|
Object.defineProperty(
|
|
@@ -98,17 +98,25 @@ function O(e, ...t) {
|
|
|
98
98
|
});
|
|
99
99
|
});
|
|
100
100
|
}
|
|
101
|
+
function l(e) {
|
|
102
|
+
return parseFloat(getComputedStyle(e).transitionDuration || "");
|
|
103
|
+
}
|
|
104
|
+
function O(e) {
|
|
105
|
+
return l(e) * 1e3;
|
|
106
|
+
}
|
|
101
107
|
export {
|
|
102
|
-
|
|
108
|
+
y as a,
|
|
103
109
|
a as b,
|
|
104
|
-
|
|
110
|
+
d as c,
|
|
105
111
|
p as d,
|
|
106
112
|
u as e,
|
|
107
113
|
s as f,
|
|
108
114
|
w as g,
|
|
109
|
-
|
|
110
|
-
|
|
115
|
+
g as h,
|
|
116
|
+
c as i,
|
|
117
|
+
l as j,
|
|
118
|
+
O as k,
|
|
111
119
|
f as m,
|
|
112
|
-
|
|
113
|
-
|
|
120
|
+
m as o,
|
|
121
|
+
h as p
|
|
114
122
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";function p(e){e.dispatchEvent(new CustomEvent("sizeChange",{bubbles:!0,composed:!0}))}function y(e){e.dispatchEvent(new CustomEvent("beforeSizeChange",{bubbles:!0,composed:!0}))}function d(e,t){const n=new Blob([JSON.stringify(t)],{type:"application/json"}),r=document.createElement("a");r.download=e+".json",r.href=window.URL.createObjectURL(n),r.dataset.downloadurl=["application/json",r.download,r.href].join(":");const i=new MouseEvent("click",{view:window,bubbles:!0,cancelable:!0});r.dispatchEvent(i),r.remove()}function c(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function o(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 n in e)e.hasOwnProperty(n)&&(t[n]=o(e[n]));return t}function a(e,t,n=c){for(const r in t)n(t[r])?(e[r]||Object.assign(e,{[r]:{}}),a(e[r],t[r],n)):Object.assign(e,{[r]:t[r]});return e}function f(e){return e===null||typeof e=="undefined"}function s(e,t){if(typeof e!=typeof t)return!1;if([e,t].some(n=>f(n)))return e===t;if(Array.isArray(e)){const n=e.length>t.length?e:t,r=e.length>t.length?t:e;return n.every((i,l)=>s(i,r[l]))}if(typeof e!="object"||e instanceof Node||typeof e=="object"&&e.constructor.toString().startsWith("class"))return e===t;for(const n in e){if(!t.hasOwnProperty(n))return!1;if(typeof e[n]=="object"&&typeof t[n]=="object"){if(!s(e[n],t[n]))return!1}else if(e[n]!==t[n])return!1}return!0}function h(e,t){const n={};for(const r in e)t.includes(r)&&(n[r]=e[r]);return n}function m(e,t){const n={};for(const r in e)t.includes(r)||(n[r]=e[r]);return n}function g(e){var t;return typeof e=="function"&&((t=Object.getOwnPropertyDescriptor(e,"prototype"))==null?void 0:t.writable)===!1}function O(e,...t){t.forEach(n=>{Object.getOwnPropertyNames(n.prototype).forEach(r=>{Object.defineProperty(e.prototype,r,Object.getOwnPropertyDescriptor(n.prototype,r)||Object.create(null))})})}function u(e){return parseFloat(getComputedStyle(e).transitionDuration||"")}function w(e){return u(e)*1e3}exports.cloneDeep=o;exports.compareObjects=s;exports.createJSONAndSave=d;exports.dispatchBeforeSizeChangeEvent=y;exports.dispatchSizeChangeEvent=p;exports.getElementTransitionDurationMS=w;exports.getElementTransitionDurationS=u;exports.isESClass=g;exports.isNullish=f;exports.isObject=c;exports.mergeDeep=a;exports.mixin=O;exports.omit=m;exports.pick=h;
|
package/lib/utils/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const y=require("../attributes-Bf2svn4j.cjs"),S=require("../browser-CpzFX2xg.cjs"),m=require("../dom-JBOkFLTh.cjs"),a=require("../easings-DsS5-Kqc.cjs"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const y=require("../attributes-Bf2svn4j.cjs"),S=require("../browser-CpzFX2xg.cjs"),m=require("../dom-JBOkFLTh.cjs"),a=require("../easings-DsS5-Kqc.cjs"),r=require("../style-BoXabX_p.cjs"),C=require("../function-MthRj-GJ.cjs"),O=require("../gestures-DHLrn6Q8.cjs"),h=require("../string-DhgS_iFl.cjs"),f=require("../layout-8ryRAMGJ.cjs"),u=require("../polyfills-Caa6z-Ay.cjs");function b(t,e,...n){return[...t.slice(0,e),...n,...t.slice(e)]}function E(t,e){const n=t.length;e=e%n;const i=new Array(n);for(let s=0;s<n;s++){const o=(s+e)%n;i[o]=t[s]}return i}function w(t,e=2){if(!+t)return"0 Bytes";const n=1024,i=e<0?0:e,s=["Bytes","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],o=Math.floor(Math.log(t)/Math.log(n));return`${parseFloat((t/Math.pow(n,o)).toFixed(i))} ${s[o]}`}function I(t,e){const n=t.measureText(e),i=n.actualBoundingBoxAscent+n.actualBoundingBoxDescent,s=n.width;return{height:i,width:s}}function B(t){return Math.floor(t)+.5}function P(t,e,n,i,s,o){let l=t/e,p=n/i,c=0,d=0;return s=typeof s=="undefined"?.5:s,o=typeof o=="undefined"?.5:o,l>p?(c=i,d=i*l):(d=n,c=n/l),[(n-d)*s,(i-c)*o,d,c]}function T(t,e,n,i,s,o){let l=t/e,p=n/i,c=0,d=0;return s=typeof s=="undefined"?.5:s,o=typeof o=="undefined"?.5:o,l>p?(d=n,c=n/l):(c=i,d=i*l),[(n-d)*s,(i-c)*o,d,c]}function Q(t,e){return t.x<e.x+e.width&&t.x>e.x&&t.y<e.y+e.height&&t.y>e.y}function D(t,e){return Math.sqrt((t.x-e.x)**2+(t.y-e.y)**2)<e.radius}function R(t,e,n=!1){let i=t.x-e.width/2,s=e.height/2-t.y;return n&&(i=i/(e.width/2),s=s/(e.height/2)),{x:i,y:s}}function A(t,e){const n=t.x/e.width,i=t.y/e.height;return{x:n,y:i}}function v(t,e){return e=e||{x:0,y:0,width:document.documentElement.offsetWidth,height:innerHeight},{x:(t.x-e.x)/e.width*e.width,y:(t.y-e.y)/e.height*e.height}}function x(t,e){const n=t.styleMap.get(e);if(n){const i=n.toString();return i.startsWith("var")?x(t,i.slice(4,-1)):i}}function z(...t){const e={};return Array.from(document.styleSheets).forEach(n=>{Array.from(n.cssRules).forEach(i=>{i instanceof CSSStyleRule&&i.selectorText===":root"&&t.forEach(s=>{const o=x(i,s);o&&(e[s]=o)})})}),t.forEach(n=>{e[n]||console.warn(`variable named ${n} not found`)}),e}function q(t){const e=window.atob(t);return decodeURIComponent(window.escape(e))}function M(t){const e=window.unescape(encodeURIComponent(t));return window.btoa(e)}function g(t){let e="";for(const n in t){const i=t[n];typeof i=="object"?(e+=`${n} {`,e+=g(i),e+="}"):e+=`${h.camelToKebab(n)}: ${i};`}return e}function $(t){if(S.isBrowser){const e=new CSSStyleSheet;return e.replaceSync(g(t)),e}return null}function k(t){return new Promise(e=>{setTimeout(()=>{e()},t)})}function N(t,e=""){e=e.endsWith("/")?e.slice(0,-1):e,t=t.replace(e,""),t.startsWith("/")&&(t=t.slice(1));const n=t.split("#"),i=n[0].split("?"),s=i[0].startsWith("/")?i[0]:"/"+i[0],o=e+s,l=i==null?void 0:i[1],p=n==null?void 0:n[1];return{leaf:s,pathname:o,parameters:l,hash:p}}function W(t="/"){return t.endsWith("/")||(t+="/"),t.startsWith("/")||(t+="/"),t}function j(t,e,n,i){const s=n||location.search,o=i?i.startsWith("#")?i:"#"+i:"",l=s?s.startsWith("?")?s:"?"+s:"",p=`${e}${o}${l}`;t==="push"?history.pushState(null,"",p):t==="replace"&&history.replaceState(null,"",p)}exports.parseAttribute=y.parseAttribute;exports.parseAttributeValue=y.parseAttributeValue;exports.isBrowser=S.isBrowser;exports.findParentElement=m.findParentElement;exports.findScrollParentElement=m.findScrollParentElement;exports.getAllParentElements=m.getAllParentElements;exports.getElement=m.getElement;exports.easeInCubic=a.easeInCubic;exports.easeInExpo=a.easeInExpo;exports.easeInOutCubic=a.easeInOutCubic;exports.easeInOutExpo=a.easeInOutExpo;exports.easeInOutQuad=a.easeInOutQuad;exports.easeInOutQuart=a.easeInOutQuart;exports.easeInOutQuint=a.easeInOutQuint;exports.easeInQuad=a.easeInQuad;exports.easeInQuart=a.easeInQuart;exports.easeInQuint=a.easeInQuint;exports.easeOutCubic=a.easeOutCubic;exports.easeOutExpo=a.easeOutExpo;exports.easeOutQuad=a.easeOutQuad;exports.easeOutQuart=a.easeOutQuart;exports.easeOutQuint=a.easeOutQuint;exports.linear=a.linear;exports.cloneDeep=r.cloneDeep;exports.compareObjects=r.compareObjects;exports.createJSONAndSave=r.createJSONAndSave;exports.dispatchBeforeSizeChangeEvent=r.dispatchBeforeSizeChangeEvent;exports.dispatchSizeChangeEvent=r.dispatchSizeChangeEvent;exports.getElementTransitionDurationMS=r.getElementTransitionDurationMS;exports.getElementTransitionDurationS=r.getElementTransitionDurationS;exports.isESClass=r.isESClass;exports.isNullish=r.isNullish;exports.isObject=r.isObject;exports.mergeDeep=r.mergeDeep;exports.mixin=r.mixin;exports.omit=r.omit;exports.pick=r.pick;exports.debounce=C.debounce;exports.throttle=C.throttle;exports.setupDrag=O.setupDrag;exports.camelToKebab=h.camelToKebab;exports.capitalize=h.capitalize;exports.generateId=h.generateId;exports.isUppercase=h.isUppercase;exports.kebabToCamel=h.kebabToCamel;exports.snakeToDotted=h.snakeToDotted;exports.toPascalCase=h.toPascalCase;exports.uncapitalize=h.uncapitalize;exports.getCumulativeOffsetLeft=f.getCumulativeOffsetLeft;exports.getCumulativeOffsetTop=f.getCumulativeOffsetTop;exports.getCumulativePosition=f.getCumulativePosition;exports.calculateDistance=u.calculateDistance;exports.calculateDistanceWithRadius=u.calculateDistanceWithRadius;exports.clamp=u.clamp;exports.damp=u.damp;exports.lerp=u.lerp;exports.mapRange=u.mapRange;exports.nullishCoalescing=u.nullishCoalescing;exports.preciseNumber=u.preciseNumber;exports.round=u.round;exports.roundNumberTo=u.roundNumberTo;exports.smootherstep=u.smootherstep;exports.smoothstep=u.smoothstep;exports.step=u.step;exports.toStep=u.toStep;exports.changeHistory=j;exports.contain=T;exports.cover=P;exports.createStylesheet=$;exports.decode=M;exports.dotCircleCollision=D;exports.dotRectCollision=Q;exports.encode=q;exports.fixPosition=B;exports.formatBytes=w;exports.getPointerPosition=v;exports.getRootVariables=z;exports.insert=b;exports.measureText=I;exports.normalize=A;exports.normalizeBase=W;exports.screenToCartesian=R;exports.shiftArray=E;exports.splitPath=N;exports.styleToString=g;exports.wait=k;
|
package/lib/utils/index.js
CHANGED
|
@@ -2,18 +2,17 @@ import { a as W, p as j } from "../attributes-69we3byR.js";
|
|
|
2
2
|
import { i as f } from "../browser-0zX67oeU.js";
|
|
3
3
|
import { f as V, b as U, a as F, g as K } from "../dom-0S_WDL4g.js";
|
|
4
4
|
import { c as G, n as J, f as Y, p as Z, b as X, i as _, m as H, e as L, g as tt, j as et, d as st, o as nt, a as at, h as ot, k as it, l as rt } from "../easings-BKi40vHz.js";
|
|
5
|
-
import { b as lt, f as ct, c as ht, a as ft, d as pt,
|
|
6
|
-
import { d as
|
|
7
|
-
import { s as
|
|
5
|
+
import { b as lt, f as ct, c as ht, a as ft, d as pt, k as dt, j as mt, g as gt, e as yt, i as xt, m as St, h as wt, o as Ct, p as Bt } from "../style-3MQV6Cnl.js";
|
|
6
|
+
import { d as Ot, t as bt } from "../function-C10DGppn.js";
|
|
7
|
+
import { s as Pt } from "../gestures-D2Fdra_G.js";
|
|
8
8
|
import { c as p } from "../string-f0Dnk0L1.js";
|
|
9
|
-
import { a as
|
|
10
|
-
import { g as
|
|
11
|
-
import { e as
|
|
12
|
-
import { g as te, a as ee } from "../style-j2TwriJ_.js";
|
|
9
|
+
import { a as At, g as Dt, i as Mt, k as Qt, s as $t, t as kt, u as Tt } from "../string-f0Dnk0L1.js";
|
|
10
|
+
import { g as zt, a as Wt, b as jt } from "../layout-HoBT_Da2.js";
|
|
11
|
+
import { e as Vt, f as Ut, c as Ft, d as Kt, l as qt, m as Gt, n as Jt, p as Yt, r as Zt, g as Xt, b as _t, a as Ht, s as Lt, t as te } from "../polyfills-AItxku8u.js";
|
|
13
12
|
function g(e, t, ...s) {
|
|
14
13
|
return [...e.slice(0, t), ...s, ...e.slice(t)];
|
|
15
14
|
}
|
|
16
|
-
function
|
|
15
|
+
function y(e, t) {
|
|
17
16
|
const s = e.length;
|
|
18
17
|
t = t % s;
|
|
19
18
|
const n = new Array(s);
|
|
@@ -23,7 +22,7 @@ function x(e, t) {
|
|
|
23
22
|
}
|
|
24
23
|
return n;
|
|
25
24
|
}
|
|
26
|
-
function
|
|
25
|
+
function x(e, t = 2) {
|
|
27
26
|
if (!+e) return "0 Bytes";
|
|
28
27
|
const s = 1024, n = t < 0 ? 0 : t, a = [
|
|
29
28
|
"Bytes",
|
|
@@ -151,28 +150,28 @@ function $(e, t = "") {
|
|
|
151
150
|
hash: l
|
|
152
151
|
};
|
|
153
152
|
}
|
|
154
|
-
function
|
|
153
|
+
function k(e = "/") {
|
|
155
154
|
return e.endsWith("/") || (e += "/"), e.startsWith("/") || (e += "/"), e;
|
|
156
155
|
}
|
|
157
|
-
function
|
|
156
|
+
function T(e, t, s, n) {
|
|
158
157
|
const a = s || location.search, o = n ? n.startsWith("#") ? n : "#" + n : "", i = a ? a.startsWith("?") ? a : "?" + a : "", l = `${t}${o}${i}`;
|
|
159
158
|
e === "push" ? history.pushState(null, "", l) : e === "replace" && history.replaceState(null, "", l);
|
|
160
159
|
}
|
|
161
160
|
export {
|
|
162
|
-
|
|
163
|
-
|
|
161
|
+
Vt as calculateDistance,
|
|
162
|
+
Ut as calculateDistanceWithRadius,
|
|
164
163
|
p as camelToKebab,
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
164
|
+
At as capitalize,
|
|
165
|
+
T as changeHistory,
|
|
166
|
+
Ft as clamp,
|
|
168
167
|
lt as cloneDeep,
|
|
169
168
|
ct as compareObjects,
|
|
170
169
|
B as contain,
|
|
171
170
|
C as cover,
|
|
172
171
|
ht as createJSONAndSave,
|
|
173
172
|
M as createStylesheet,
|
|
174
|
-
|
|
175
|
-
|
|
173
|
+
Kt as damp,
|
|
174
|
+
Ot as debounce,
|
|
176
175
|
D as decode,
|
|
177
176
|
ft as dispatchBeforeSizeChangeEvent,
|
|
178
177
|
pt as dispatchSizeChangeEvent,
|
|
@@ -197,52 +196,52 @@ export {
|
|
|
197
196
|
V as findParentElement,
|
|
198
197
|
U as findScrollParentElement,
|
|
199
198
|
w as fixPosition,
|
|
200
|
-
|
|
201
|
-
|
|
199
|
+
x as formatBytes,
|
|
200
|
+
Dt as generateId,
|
|
202
201
|
F as getAllParentElements,
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
202
|
+
zt as getCumulativeOffsetLeft,
|
|
203
|
+
Wt as getCumulativeOffsetTop,
|
|
204
|
+
jt as getCumulativePosition,
|
|
206
205
|
K as getElement,
|
|
207
|
-
|
|
208
|
-
|
|
206
|
+
dt as getElementTransitionDurationMS,
|
|
207
|
+
mt as getElementTransitionDurationS,
|
|
209
208
|
P as getPointerPosition,
|
|
210
209
|
R as getRootVariables,
|
|
211
210
|
g as insert,
|
|
212
211
|
f as isBrowser,
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
212
|
+
gt as isESClass,
|
|
213
|
+
yt as isNullish,
|
|
214
|
+
xt as isObject,
|
|
215
|
+
Mt as isUppercase,
|
|
216
|
+
Qt as kebabToCamel,
|
|
217
|
+
qt as lerp,
|
|
219
218
|
rt as linear,
|
|
220
|
-
|
|
219
|
+
Gt as mapRange,
|
|
221
220
|
S as measureText,
|
|
222
|
-
|
|
223
|
-
|
|
221
|
+
St as mergeDeep,
|
|
222
|
+
wt as mixin,
|
|
224
223
|
I as normalize,
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
224
|
+
k as normalizeBase,
|
|
225
|
+
Jt as nullishCoalescing,
|
|
226
|
+
Ct as omit,
|
|
228
227
|
W as parseAttribute,
|
|
229
228
|
j as parseAttributeValue,
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
229
|
+
Bt as pick,
|
|
230
|
+
Yt as preciseNumber,
|
|
231
|
+
Zt as round,
|
|
232
|
+
Xt as roundNumberTo,
|
|
234
233
|
b as screenToCartesian,
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
234
|
+
Pt as setupDrag,
|
|
235
|
+
y as shiftArray,
|
|
236
|
+
_t as smootherstep,
|
|
237
|
+
Ht as smoothstep,
|
|
238
|
+
$t as snakeToDotted,
|
|
240
239
|
$ as splitPath,
|
|
241
|
-
|
|
240
|
+
Lt as step,
|
|
242
241
|
h as styleToString,
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
242
|
+
bt as throttle,
|
|
243
|
+
kt as toPascalCase,
|
|
244
|
+
te as toStep,
|
|
245
|
+
Tt as uncapitalize,
|
|
247
246
|
Q as wait
|
|
248
247
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "aptechka",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.25.0",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+https://github.com/denisavitski/aptechka.git"
|
|
@@ -108,11 +108,6 @@
|
|
|
108
108
|
"default": "./lib/order/index.js",
|
|
109
109
|
"types": "./lib/order/index.d.ts"
|
|
110
110
|
},
|
|
111
|
-
"./popover": {
|
|
112
|
-
"require": "./lib/popover/index.cjs",
|
|
113
|
-
"default": "./lib/popover/index.js",
|
|
114
|
-
"types": "./lib/popover/index.d.ts"
|
|
115
|
-
},
|
|
116
111
|
"./scroll-entries": {
|
|
117
112
|
"require": "./lib/scroll-entries/index.cjs",
|
|
118
113
|
"default": "./lib/scroll-entries/index.js",
|
|
@@ -208,9 +203,6 @@
|
|
|
208
203
|
"order": [
|
|
209
204
|
"lib/order/index.d.ts"
|
|
210
205
|
],
|
|
211
|
-
"popover": [
|
|
212
|
-
"lib/popover/index.d.ts"
|
|
213
|
-
],
|
|
214
206
|
"scroll-entries": [
|
|
215
207
|
"lib/scroll-entries/index.d.ts"
|
|
216
208
|
],
|
|
@@ -246,11 +238,5 @@
|
|
|
246
238
|
"vite": "5.4.0",
|
|
247
239
|
"vite-plugin-dts": "^4.0.2",
|
|
248
240
|
"vite-plugin-htmc": "^0.1.14"
|
|
249
|
-
},
|
|
250
|
-
"dependencies": {
|
|
251
|
-
"detect-gpu": "^5.0.42"
|
|
252
|
-
},
|
|
253
|
-
"peerDependencies": {
|
|
254
|
-
"detect-gpu": "^5.0.42"
|
|
255
241
|
}
|
|
256
242
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var W=t=>{throw TypeError(t)};var k=(t,s,o)=>s.has(t)||W("Cannot "+o);var i=(t,s,o)=>(k(t,s,"read from private field"),o?o.call(t):s.get(t)),n=(t,s,o)=>s.has(t)?W("Cannot add the same private member more than once"):s instanceof WeakSet?s.add(t):s.set(t,o),e=(t,s,o,v)=>(k(t,s,"write to private field"),v?v.call(t,o):s.set(t,o),o);const z=require("./order/index.cjs"),A=require("./window-resizer/index.cjs"),D=require("./browser-CpzFX2xg.cjs"),q=require("detect-gpu"),I=require("./Store-CDb6RMce.cjs");var r,l,m,c,g,u,w,x,d;class M{constructor(){n(this,r);n(this,l);n(this,m);n(this,c);n(this,g);n(this,u);n(this,w);n(this,x);n(this,d);var s,o;if(e(this,r,"unknown"),e(this,l,"unknown"),e(this,m,0),e(this,c,null),e(this,g,!1),e(this,u,!1),e(this,w,!1),e(this,x,!1),e(this,d,!1),this.resize=()=>{e(this,g,/Mobi|Android/i.test(navigator.userAgent)),e(this,u,"ontouchstart"in window||navigator.maxTouchPoints>0),setTimeout(()=>{e(this,u,"ontouchstart"in window||navigator.maxTouchPoints>0)},0)},D.isBrowser){e(this,c,q.getGPUTier()),i(this,c).then(a=>{e(this,l,a.gpu||"unknown"),e(this,m,a.tier)}),this.resize(),A.windowResizer.subscribe(this.resize,z.RESIZE_ORDER.DEVICE);{const a=document.createElement("canvas"),P=a.getContext("webgl")||a.getContext("experimental-webgl");e(this,w,P&&P instanceof WebGLRenderingContext||!1)}{const a=document.createElement("canvas");a.getContext("2d")&&e(this,x,a.toDataURL("image/webp").indexOf("data:image/webp")==0)}const v=window.navigator.userAgent,E=((o=(s=window.navigator)==null?void 0:s.userAgentData)==null?void 0:o.platform)||window.navigator.platform,O=["Macintosh","MacIntel","MacPPC","Mac68K","macOS"],R=["Win32","Win64","Windows","WinCE"],T=["iPhone","iPad","iPod"];O.includes(E)?(e(this,r,"macOS"),e(this,d,!0)):T.includes(E)?(e(this,r,"iOS"),e(this,d,!0)):R.includes(E)?e(this,r,"Windows"):/Android/.test(v)?e(this,r,"Android"):/Linux/.test(E)?e(this,r,"Linux"):e(this,r,"unknown")}}get OS(){return i(this,r)}get gpu(){return i(this,l)}get gpuTier(){return i(this,m)}get gpuDetection(){return i(this,c)}get isMobile(){return i(this,g)}get isTouch(){return i(this,u)}get isWebgl(){return i(this,w)}get isWebp(){return i(this,x)}get isApple(){return i(this,d)}}r=new WeakMap,l=new WeakMap,m=new WeakMap,c=new WeakMap,g=new WeakMap,u=new WeakMap,w=new WeakMap,x=new WeakMap,d=new WeakMap;const L=new M;var S=(t=>(t.mobile="600px",t.tablet="1024px",t.notebook="1280px",t.desktop="1281px",t))(S||{}),C=(t=>(t["<=mobile"]="(max-width: 600px)",t[">=mobile"]="(min-width: 601px)",t["<=tablet"]="(max-width: 1024px)",t[">=tablet"]="(min-width: 1025px)",t["<=notebook"]="(max-width: 1280px)",t[">=notebook"]="(min-width: 1281px)",t["<=desktop"]="(max-width: 1280px)",t[">=desktop"]="(min-width: 1281px)",t))(C||{}),p,b,f,h;class _{constructor(){n(this,p);n(this,b);n(this,f);n(this,h);e(this,p,0),e(this,b,0),e(this,f,0),e(this,h,new I.Store(void 0)),this.resize=()=>{e(this,p,document.documentElement.clientWidth),e(this,b,innerHeight),e(this,f,devicePixelRatio),matchMedia("(max-width: 600px)").matches?i(this,h).current="mobile":matchMedia("(max-width: 1024px)").matches?i(this,h).current="tablet":matchMedia("(max-width: 1280px)").matches?i(this,h).current="notebook":matchMedia("(min-width: 1281px)").matches&&(i(this,h).current="desktop")},D.isBrowser&&(this.resize(),A.windowResizer.subscribe(this.resize,z.RESIZE_ORDER.DEVICE))}get width(){return i(this,p)}get height(){return i(this,b)}get type(){return i(this,h)}get pixelRatio(){return i(this,f)}}p=new WeakMap,b=new WeakMap,f=new WeakMap,h=new WeakMap;const G=new _;exports.ViewportBreakpoints=S;exports.ViewportMediaRules=C;exports.device=L;exports.viewport=G;
|
package/lib/Viewport-taEXS8Uv.js
DELETED
|
@@ -1,123 +0,0 @@
|
|
|
1
|
-
var W = (t) => {
|
|
2
|
-
throw TypeError(t);
|
|
3
|
-
};
|
|
4
|
-
var k = (t, s, o) => s.has(t) || W("Cannot " + o);
|
|
5
|
-
var e = (t, s, o) => (k(t, s, "read from private field"), o ? o.call(t) : s.get(t)), n = (t, s, o) => s.has(t) ? W("Cannot add the same private member more than once") : s instanceof WeakSet ? s.add(t) : s.set(t, o), i = (t, s, o, v) => (k(t, s, "write to private field"), v ? v.call(t, o) : s.set(t, o), o);
|
|
6
|
-
import { RESIZE_ORDER as A } from "./order/index.js";
|
|
7
|
-
import { windowResizer as C } from "./window-resizer/index.js";
|
|
8
|
-
import { i as D } from "./browser-0zX67oeU.js";
|
|
9
|
-
import { getGPUTier as O } from "detect-gpu";
|
|
10
|
-
import { S as I } from "./Store-OTdcl6SX.js";
|
|
11
|
-
var h, d, l, c, g, m, p, x, u;
|
|
12
|
-
class L {
|
|
13
|
-
constructor() {
|
|
14
|
-
n(this, h);
|
|
15
|
-
n(this, d);
|
|
16
|
-
n(this, l);
|
|
17
|
-
n(this, c);
|
|
18
|
-
n(this, g);
|
|
19
|
-
n(this, m);
|
|
20
|
-
n(this, p);
|
|
21
|
-
n(this, x);
|
|
22
|
-
n(this, u);
|
|
23
|
-
var s, o;
|
|
24
|
-
if (i(this, h, "unknown"), i(this, d, "unknown"), i(this, l, 0), i(this, c, null), i(this, g, !1), i(this, m, !1), i(this, p, !1), i(this, x, !1), i(this, u, !1), this.resize = () => {
|
|
25
|
-
i(this, g, /Mobi|Android/i.test(navigator.userAgent)), i(this, m, "ontouchstart" in window || navigator.maxTouchPoints > 0), setTimeout(() => {
|
|
26
|
-
i(this, m, "ontouchstart" in window || navigator.maxTouchPoints > 0);
|
|
27
|
-
}, 0);
|
|
28
|
-
}, D) {
|
|
29
|
-
i(this, c, O()), e(this, c).then((a) => {
|
|
30
|
-
i(this, d, a.gpu || "unknown"), i(this, l, a.tier);
|
|
31
|
-
}), this.resize(), C.subscribe(this.resize, A.DEVICE);
|
|
32
|
-
{
|
|
33
|
-
const a = document.createElement("canvas"), E = a.getContext("webgl") || a.getContext("experimental-webgl");
|
|
34
|
-
i(this, p, E && E instanceof WebGLRenderingContext || !1);
|
|
35
|
-
}
|
|
36
|
-
{
|
|
37
|
-
const a = document.createElement("canvas");
|
|
38
|
-
a.getContext("2d") && i(this, x, a.toDataURL("image/webp").indexOf("data:image/webp") == 0);
|
|
39
|
-
}
|
|
40
|
-
const v = window.navigator.userAgent, P = ((o = (s = window.navigator) == null ? void 0 : s.userAgentData) == null ? void 0 : o.platform) || window.navigator.platform, S = [
|
|
41
|
-
"Macintosh",
|
|
42
|
-
"MacIntel",
|
|
43
|
-
"MacPPC",
|
|
44
|
-
"Mac68K",
|
|
45
|
-
"macOS"
|
|
46
|
-
], T = ["Win32", "Win64", "Windows", "WinCE"], z = ["iPhone", "iPad", "iPod"];
|
|
47
|
-
S.includes(P) ? (i(this, h, "macOS"), i(this, u, !0)) : z.includes(P) ? (i(this, h, "iOS"), i(this, u, !0)) : T.includes(P) ? i(this, h, "Windows") : /Android/.test(v) ? i(this, h, "Android") : /Linux/.test(P) ? i(this, h, "Linux") : i(this, h, "unknown");
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
get OS() {
|
|
51
|
-
return e(this, h);
|
|
52
|
-
}
|
|
53
|
-
get gpu() {
|
|
54
|
-
return e(this, d);
|
|
55
|
-
}
|
|
56
|
-
get gpuTier() {
|
|
57
|
-
return e(this, l);
|
|
58
|
-
}
|
|
59
|
-
get gpuDetection() {
|
|
60
|
-
return e(this, c);
|
|
61
|
-
}
|
|
62
|
-
get isMobile() {
|
|
63
|
-
return e(this, g);
|
|
64
|
-
}
|
|
65
|
-
get isTouch() {
|
|
66
|
-
return e(this, m);
|
|
67
|
-
}
|
|
68
|
-
get isWebgl() {
|
|
69
|
-
return e(this, p);
|
|
70
|
-
}
|
|
71
|
-
get isWebp() {
|
|
72
|
-
return e(this, x);
|
|
73
|
-
}
|
|
74
|
-
get isApple() {
|
|
75
|
-
return e(this, u);
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
h = new WeakMap(), d = new WeakMap(), l = new WeakMap(), c = new WeakMap(), g = new WeakMap(), m = new WeakMap(), p = new WeakMap(), x = new WeakMap(), u = new WeakMap();
|
|
79
|
-
const j = new L();
|
|
80
|
-
var M = /* @__PURE__ */ ((t) => (t.mobile = "600px", t.tablet = "1024px", t.notebook = "1280px", t.desktop = "1281px", t))(M || {}), y = /* @__PURE__ */ ((t) => (t["<=mobile"] = "(max-width: 600px)", t[">=mobile"] = "(min-width: 601px)", t["<=tablet"] = "(max-width: 1024px)", t[">=tablet"] = "(min-width: 1025px)", t["<=notebook"] = "(max-width: 1280px)", t[">=notebook"] = "(min-width: 1281px)", t["<=desktop"] = "(max-width: 1280px)", t[">=desktop"] = "(min-width: 1281px)", t))(y || {}), w, f, b, r;
|
|
81
|
-
class G {
|
|
82
|
-
constructor() {
|
|
83
|
-
n(this, w);
|
|
84
|
-
n(this, f);
|
|
85
|
-
n(this, b);
|
|
86
|
-
n(this, r);
|
|
87
|
-
i(this, w, 0), i(this, f, 0), i(this, b, 0), i(this, r, new I(void 0)), this.resize = () => {
|
|
88
|
-
i(this, w, document.documentElement.clientWidth), i(this, f, innerHeight), i(this, b, devicePixelRatio), matchMedia(
|
|
89
|
-
"(max-width: 600px)"
|
|
90
|
-
/* <=mobile */
|
|
91
|
-
).matches ? e(this, r).current = "mobile" : matchMedia(
|
|
92
|
-
"(max-width: 1024px)"
|
|
93
|
-
/* <=tablet */
|
|
94
|
-
).matches ? e(this, r).current = "tablet" : matchMedia(
|
|
95
|
-
"(max-width: 1280px)"
|
|
96
|
-
/* <=notebook */
|
|
97
|
-
).matches ? e(this, r).current = "notebook" : matchMedia(
|
|
98
|
-
"(min-width: 1281px)"
|
|
99
|
-
/* >=desktop */
|
|
100
|
-
).matches && (e(this, r).current = "desktop");
|
|
101
|
-
}, D && (this.resize(), C.subscribe(this.resize, A.DEVICE));
|
|
102
|
-
}
|
|
103
|
-
get width() {
|
|
104
|
-
return e(this, w);
|
|
105
|
-
}
|
|
106
|
-
get height() {
|
|
107
|
-
return e(this, f);
|
|
108
|
-
}
|
|
109
|
-
get type() {
|
|
110
|
-
return e(this, r);
|
|
111
|
-
}
|
|
112
|
-
get pixelRatio() {
|
|
113
|
-
return e(this, b);
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
w = new WeakMap(), f = new WeakMap(), b = new WeakMap(), r = new WeakMap();
|
|
117
|
-
const q = new G();
|
|
118
|
-
export {
|
|
119
|
-
M as V,
|
|
120
|
-
y as a,
|
|
121
|
-
j as d,
|
|
122
|
-
q as v
|
|
123
|
-
};
|
package/lib/object-HBC5QlzO.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";function p(e){e.dispatchEvent(new CustomEvent("sizeChange",{bubbles:!0,composed:!0}))}function l(e){e.dispatchEvent(new CustomEvent("beforeSizeChange",{bubbles:!0,composed:!0}))}function y(e,t){const n=new Blob([JSON.stringify(t)],{type:"application/json"}),r=document.createElement("a");r.download=e+".json",r.href=window.URL.createObjectURL(n),r.dataset.downloadurl=["application/json",r.download,r.href].join(":");const i=new MouseEvent("click",{view:window,bubbles:!0,cancelable:!0});r.dispatchEvent(i),r.remove()}function s(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function o(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 n in e)e.hasOwnProperty(n)&&(t[n]=o(e[n]));return t}function f(e,t,n=s){for(const r in t)n(t[r])?(e[r]||Object.assign(e,{[r]:{}}),f(e[r],t[r],n)):Object.assign(e,{[r]:t[r]});return e}function a(e){return e===null||typeof e=="undefined"}function c(e,t){if(typeof e!=typeof t)return!1;if([e,t].some(n=>a(n)))return e===t;if(Array.isArray(e)){const n=e.length>t.length?e:t,r=e.length>t.length?t:e;return n.every((i,u)=>c(i,r[u]))}if(typeof e!="object"||e instanceof Node||typeof e=="object"&&e.constructor.toString().startsWith("class"))return e===t;for(const n in e){if(!t.hasOwnProperty(n))return!1;if(typeof e[n]=="object"&&typeof t[n]=="object"){if(!c(e[n],t[n]))return!1}else if(e[n]!==t[n])return!1}return!0}function d(e,t){const n={};for(const r in e)t.includes(r)&&(n[r]=e[r]);return n}function h(e,t){const n={};for(const r in e)t.includes(r)||(n[r]=e[r]);return n}function O(e){var t;return typeof e=="function"&&((t=Object.getOwnPropertyDescriptor(e,"prototype"))==null?void 0:t.writable)===!1}function m(e,...t){t.forEach(n=>{Object.getOwnPropertyNames(n.prototype).forEach(r=>{Object.defineProperty(e.prototype,r,Object.getOwnPropertyDescriptor(n.prototype,r)||Object.create(null))})})}exports.cloneDeep=o;exports.compareObjects=c;exports.createJSONAndSave=y;exports.dispatchBeforeSizeChangeEvent=l;exports.dispatchSizeChangeEvent=p;exports.isESClass=O;exports.isNullish=a;exports.isObject=s;exports.mergeDeep=f;exports.mixin=m;exports.omit=h;exports.pick=d;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { PopoverElement } from './PopoverElement';
|
|
2
|
-
export type PopoverButtonType = 'open' | 'close' | 'toggle';
|
|
3
|
-
export declare class PopoverButtonElement extends HTMLElement {
|
|
4
|
-
#private;
|
|
5
|
-
constructor();
|
|
6
|
-
get popoverElement(): PopoverElement | undefined;
|
|
7
|
-
protected connectedCallback(): void;
|
|
8
|
-
protected disconnectedCallback(): void;
|
|
9
|
-
}
|
|
10
|
-
declare global {
|
|
11
|
-
interface HTMLElementTagNameMap {
|
|
12
|
-
'e-popover-button': PopoverButtonElement;
|
|
13
|
-
}
|
|
14
|
-
}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { Attribute } from '../attribute';
|
|
2
|
-
import { Store } from '../store';
|
|
3
|
-
export declare class PopoverElement extends HTMLElement {
|
|
4
|
-
#private;
|
|
5
|
-
private static __opened;
|
|
6
|
-
constructor();
|
|
7
|
-
get history(): Attribute<false>;
|
|
8
|
-
get single(): Attribute<false>;
|
|
9
|
-
get opened(): Store<boolean>;
|
|
10
|
-
open: (useTransition?: boolean) => void;
|
|
11
|
-
close: () => void;
|
|
12
|
-
protected connectedCallback(): void;
|
|
13
|
-
protected disconnectedCallback(): void;
|
|
14
|
-
}
|
|
15
|
-
declare global {
|
|
16
|
-
interface HTMLElementTagNameMap {
|
|
17
|
-
'e-popover': PopoverElement;
|
|
18
|
-
}
|
|
19
|
-
interface HTMLElementEventMap {
|
|
20
|
-
popoverTriggered: CustomEvent;
|
|
21
|
-
popoverOpened: CustomEvent;
|
|
22
|
-
popoverClosing: CustomEvent;
|
|
23
|
-
popoverClosed: CustomEvent;
|
|
24
|
-
}
|
|
25
|
-
}
|
package/lib/popover/index.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var O=i=>{throw TypeError(i)};var _=(i,o,t)=>o.has(i)||O("Cannot "+t);var e=(i,o,t)=>(_(i,o,"read from private field"),t?t.call(i):o.get(i)),n=(i,o,t)=>o.has(i)?O("Cannot add the same private member more than once"):o instanceof WeakSet?o.add(i):o.set(i,t),h=(i,o,t,d)=>(_(i,o,"write to private field"),d?d.call(i,t):o.set(i,t),t),A=(i,o,t)=>(_(i,o,"access private method"),t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const x=require("../attribute/index.cjs"),I=require("../Store-CDb6RMce.cjs"),R=require("../style-At6aDoqG.cjs"),P=require("../browser-CpzFX2xg.cjs");var m,l,y,p,a,u,g,H,E,L,M,v;const c=class c extends HTMLElement{constructor(){super();n(this,g);n(this,m);n(this,l);n(this,y);n(this,p);n(this,a);n(this,u);n(this,E);n(this,L);n(this,v);h(this,m,-1),h(this,l,new I.Store(!1)),h(this,p,new x.Attribute(this,"history",!1)),h(this,a,new x.Attribute(this,"single",!1)),h(this,u,!1),this.open=(t=!0)=>{if(e(this,l).current)return;e(this,l).current=!0,e(this,a).current&&(c.__opened.forEach(r=>r.close()),c.__opened=[]),c.__opened.push(this),h(this,m,c.__opened.length-1),e(this,p).current&&e(this,u)&&history.pushState("","",e(this,g,H)),clearTimeout(e(this,y)),this.classList.add("triggered"),this.style.display="block",this.dispatchEvent(new CustomEvent("popoverTriggered"));const d=()=>{addEventListener("click",e(this,E)),addEventListener("keydown",e(this,L)),this.style.opacity="1",this.classList.add("opened"),this.dispatchEvent(new CustomEvent("popoverOpened"))};t?setTimeout(d):d()},this.close=()=>{if(e(this,l).current){if(e(this,l).current=!1,c.__opened=c.__opened.filter(t=>t!==this),e(this,p).current){const t=new URL(location.href);t.searchParams.delete(this.id),history.replaceState(null,"",t.href)}this.classList.remove("opened"),this.style.opacity="0",this.dispatchEvent(new CustomEvent("popoverClosing")),removeEventListener("click",e(this,E)),removeEventListener("keydown",e(this,L)),setTimeout(()=>{this.classList.remove("triggered"),this.style.display="none",this.dispatchEvent(new CustomEvent("popoverClosed"))},R.getElementTransitionDurationMS(this)+10)}},h(this,E,t=>{A(this,g,M).call(this,()=>{var q;const r=t.composedPath()[0],k=r instanceof HTMLElement&&(this.contains(r)||((q=this.shadowRoot)==null?void 0:q.contains(r))),f=r instanceof HTMLElement&&r.hasAttribute("outside");(!k||f)&&this.close()})}),h(this,L,t=>{A(this,g,M).call(this,()=>{t.code==="Escape"&&this.close()})}),h(this,v,()=>{h(this,u,!1),e(this,l).current&&e(this,p).current&&!location.search.includes(this.id)?this.close():!e(this,l).current&&e(this,p).current&&location.search.includes(this.id)&&this.open(),h(this,u,!0)}),this.setAttribute("popover-target","")}get history(){return e(this,p)}get single(){return e(this,a)}get opened(){return e(this,l)}connectedCallback(){e(this,p).observe(),e(this,a).observe(),this.style.opacity="0",this.style.display="none",addEventListener("popstate",e(this,v)),setTimeout(()=>{e(this,v).call(this)},0)}disconnectedCallback(){e(this,p).unobserve(),e(this,a).unobserve(),c.__opened=c.__opened.filter(t=>t!==this),clearTimeout(e(this,y)),removeEventListener("popstate",e(this,v))}};m=new WeakMap,l=new WeakMap,y=new WeakMap,p=new WeakMap,a=new WeakMap,u=new WeakMap,g=new WeakSet,H=function(){return`${location.pathname}${location.search?location.search+"&":"?"}${this.id}`},E=new WeakMap,L=new WeakMap,M=function(t){(c.__opened[e(this,m)-1]||c.__opened.length===1)&&t()},v=new WeakMap,c.__opened=[];let S=c;customElements.get("e-popover")||customElements.define("e-popover",S);var s,b,T,w,C;class $ extends HTMLElement{constructor(){super();n(this,s);n(this,b,()=>{this.classList.add("triggered")});n(this,T,()=>{this.classList.add("opened")});n(this,w,()=>{this.classList.remove("opened")});n(this,C,()=>{this.classList.remove("triggered")});P.isBrowser&&(this.tabIndex=parseInt(this.getAttribute("tabindex")||"0"),this.addEventListener("click",()=>{if(e(this,s)){const t=this.getAttribute("type")||"open";t==="open"||t==="toggle"&&!e(this,s).opened.current?e(this,s).open():(t==="close"||t==="toggle"&&e(this,s).opened.current)&&e(this,s).close()}}),this.addEventListener("keydown",t=>{t.code==="Space"&&t.currentTarget.click()}))}get popoverElement(){return e(this,s)}connectedCallback(){var d;const t=this.getAttribute("target");if(t){let r=null;if(t==="parent"){const k=this.closest("[popover-target]");if(k)r=k;else{const f=this.getRootNode();f instanceof ShadowRoot?r=f.host.closest("[popover-target]"):f instanceof HTMLElement&&(r=f.closest("[popover-target]"))}}else t==="sibling"?r=(d=this.parentElement)==null?void 0:d.querySelector("[popover-target]"):r=document.querySelector(`#${t}`)||this.getRootNode().querySelector(`#${t}`);r instanceof HTMLElement?(h(this,s,r),e(this,s).addEventListener("popoverTriggered",e(this,b)),e(this,s).addEventListener("popoverOpened",e(this,T)),e(this,s).addEventListener("popoverClosing",e(this,w)),e(this,s).addEventListener("popoverClosed",e(this,C))):console.warn(this,`target ${t} not found`)}}disconnectedCallback(){e(this,s)&&(e(this,s).removeEventListener("popoverTriggered",e(this,b)),e(this,s).removeEventListener("popoverOpened",e(this,T)),e(this,s).removeEventListener("popoverClosing",e(this,w)),e(this,s).removeEventListener("popoverClosed",e(this,C)))}}s=new WeakMap,b=new WeakMap,T=new WeakMap,w=new WeakMap,C=new WeakMap;customElements.get("e-popover-button")||customElements.define("e-popover-button",$);exports.PopoverButtonElement=$;exports.PopoverElement=S;
|
package/lib/popover/index.d.ts
DELETED
package/lib/popover/index.js
DELETED
|
@@ -1,160 +0,0 @@
|
|
|
1
|
-
var H = (i) => {
|
|
2
|
-
throw TypeError(i);
|
|
3
|
-
};
|
|
4
|
-
var S = (i, o, t) => o.has(i) || H("Cannot " + t);
|
|
5
|
-
var e = (i, o, t) => (S(i, o, "read from private field"), t ? t.call(i) : o.get(i)), n = (i, o, t) => o.has(i) ? H("Cannot add the same private member more than once") : o instanceof WeakSet ? o.add(i) : o.set(i, t), h = (i, o, t, a) => (S(i, o, "write to private field"), a ? a.call(i, t) : o.set(i, t), t), _ = (i, o, t) => (S(i, o, "access private method"), t);
|
|
6
|
-
import { Attribute as O } from "../attribute/index.js";
|
|
7
|
-
import { S as I } from "../Store-OTdcl6SX.js";
|
|
8
|
-
import { g as R } from "../style-j2TwriJ_.js";
|
|
9
|
-
import { i as q } from "../browser-0zX67oeU.js";
|
|
10
|
-
var f, c, y, l, d, u, g, $, E, L, M, v;
|
|
11
|
-
const p = class p extends HTMLElement {
|
|
12
|
-
constructor() {
|
|
13
|
-
super();
|
|
14
|
-
n(this, g);
|
|
15
|
-
n(this, f);
|
|
16
|
-
n(this, c);
|
|
17
|
-
n(this, y);
|
|
18
|
-
n(this, l);
|
|
19
|
-
n(this, d);
|
|
20
|
-
n(this, u);
|
|
21
|
-
n(this, E);
|
|
22
|
-
n(this, L);
|
|
23
|
-
n(this, v);
|
|
24
|
-
h(this, f, -1), h(this, c, new I(!1)), h(this, l, new O(this, "history", !1)), h(this, d, new O(this, "single", !1)), h(this, u, !1), this.open = (t = !0) => {
|
|
25
|
-
if (e(this, c).current)
|
|
26
|
-
return;
|
|
27
|
-
e(this, c).current = !0, e(this, d).current && (p.__opened.forEach((r) => r.close()), p.__opened = []), p.__opened.push(this), h(this, f, p.__opened.length - 1), e(this, l).current && e(this, u) && history.pushState("", "", e(this, g, $)), clearTimeout(e(this, y)), this.classList.add("triggered"), this.style.display = "block", this.dispatchEvent(new CustomEvent("popoverTriggered"));
|
|
28
|
-
const a = () => {
|
|
29
|
-
addEventListener("click", e(this, E)), addEventListener("keydown", e(this, L)), this.style.opacity = "1", this.classList.add("opened"), this.dispatchEvent(new CustomEvent("popoverOpened"));
|
|
30
|
-
};
|
|
31
|
-
t ? setTimeout(a) : a();
|
|
32
|
-
}, this.close = () => {
|
|
33
|
-
if (e(this, c).current) {
|
|
34
|
-
if (e(this, c).current = !1, p.__opened = p.__opened.filter((t) => t !== this), e(this, l).current) {
|
|
35
|
-
const t = new URL(location.href);
|
|
36
|
-
t.searchParams.delete(this.id), history.replaceState(null, "", t.href);
|
|
37
|
-
}
|
|
38
|
-
this.classList.remove("opened"), this.style.opacity = "0", this.dispatchEvent(new CustomEvent("popoverClosing")), removeEventListener("click", e(this, E)), removeEventListener("keydown", e(this, L)), setTimeout(() => {
|
|
39
|
-
this.classList.remove("triggered"), this.style.display = "none", this.dispatchEvent(new CustomEvent("popoverClosed"));
|
|
40
|
-
}, R(this) + 10);
|
|
41
|
-
}
|
|
42
|
-
}, h(this, E, (t) => {
|
|
43
|
-
_(this, g, M).call(this, () => {
|
|
44
|
-
var x;
|
|
45
|
-
const r = t.composedPath()[0], k = r instanceof HTMLElement && (this.contains(r) || ((x = this.shadowRoot) == null ? void 0 : x.contains(r))), m = r instanceof HTMLElement && r.hasAttribute("outside");
|
|
46
|
-
(!k || m) && this.close();
|
|
47
|
-
});
|
|
48
|
-
}), h(this, L, (t) => {
|
|
49
|
-
_(this, g, M).call(this, () => {
|
|
50
|
-
t.code === "Escape" && this.close();
|
|
51
|
-
});
|
|
52
|
-
}), h(this, v, () => {
|
|
53
|
-
h(this, u, !1), e(this, c).current && e(this, l).current && !location.search.includes(this.id) ? this.close() : !e(this, c).current && e(this, l).current && location.search.includes(this.id) && this.open(), h(this, u, !0);
|
|
54
|
-
}), this.setAttribute("popover-target", "");
|
|
55
|
-
}
|
|
56
|
-
get history() {
|
|
57
|
-
return e(this, l);
|
|
58
|
-
}
|
|
59
|
-
get single() {
|
|
60
|
-
return e(this, d);
|
|
61
|
-
}
|
|
62
|
-
get opened() {
|
|
63
|
-
return e(this, c);
|
|
64
|
-
}
|
|
65
|
-
connectedCallback() {
|
|
66
|
-
e(this, l).observe(), e(this, d).observe(), this.style.opacity = "0", this.style.display = "none", addEventListener("popstate", e(this, v)), setTimeout(() => {
|
|
67
|
-
e(this, v).call(this);
|
|
68
|
-
}, 0);
|
|
69
|
-
}
|
|
70
|
-
disconnectedCallback() {
|
|
71
|
-
e(this, l).unobserve(), e(this, d).unobserve(), p.__opened = p.__opened.filter((t) => t !== this), clearTimeout(e(this, y)), removeEventListener("popstate", e(this, v));
|
|
72
|
-
}
|
|
73
|
-
};
|
|
74
|
-
f = new WeakMap(), c = new WeakMap(), y = new WeakMap(), l = new WeakMap(), d = new WeakMap(), u = new WeakMap(), g = new WeakSet(), $ = function() {
|
|
75
|
-
return `${location.pathname}${location.search ? location.search + "&" : "?"}${this.id}`;
|
|
76
|
-
}, E = new WeakMap(), L = new WeakMap(), M = function(t) {
|
|
77
|
-
(p.__opened[e(this, f) - 1] || p.__opened.length === 1) && t();
|
|
78
|
-
}, v = new WeakMap(), p.__opened = [];
|
|
79
|
-
let A = p;
|
|
80
|
-
customElements.get("e-popover") || customElements.define("e-popover", A);
|
|
81
|
-
var s, T, b, w, C;
|
|
82
|
-
class N extends HTMLElement {
|
|
83
|
-
constructor() {
|
|
84
|
-
super();
|
|
85
|
-
n(this, s);
|
|
86
|
-
n(this, T, () => {
|
|
87
|
-
this.classList.add("triggered");
|
|
88
|
-
});
|
|
89
|
-
n(this, b, () => {
|
|
90
|
-
this.classList.add("opened");
|
|
91
|
-
});
|
|
92
|
-
n(this, w, () => {
|
|
93
|
-
this.classList.remove("opened");
|
|
94
|
-
});
|
|
95
|
-
n(this, C, () => {
|
|
96
|
-
this.classList.remove("triggered");
|
|
97
|
-
});
|
|
98
|
-
q && (this.tabIndex = parseInt(this.getAttribute("tabindex") || "0"), this.addEventListener("click", () => {
|
|
99
|
-
if (e(this, s)) {
|
|
100
|
-
const t = this.getAttribute("type") || "open";
|
|
101
|
-
t === "open" || t === "toggle" && !e(this, s).opened.current ? e(this, s).open() : (t === "close" || t === "toggle" && e(this, s).opened.current) && e(this, s).close();
|
|
102
|
-
}
|
|
103
|
-
}), this.addEventListener("keydown", (t) => {
|
|
104
|
-
t.code === "Space" && t.currentTarget.click();
|
|
105
|
-
}));
|
|
106
|
-
}
|
|
107
|
-
get popoverElement() {
|
|
108
|
-
return e(this, s);
|
|
109
|
-
}
|
|
110
|
-
connectedCallback() {
|
|
111
|
-
var a;
|
|
112
|
-
const t = this.getAttribute("target");
|
|
113
|
-
if (t) {
|
|
114
|
-
let r = null;
|
|
115
|
-
if (t === "parent") {
|
|
116
|
-
const k = this.closest("[popover-target]");
|
|
117
|
-
if (k)
|
|
118
|
-
r = k;
|
|
119
|
-
else {
|
|
120
|
-
const m = this.getRootNode();
|
|
121
|
-
m instanceof ShadowRoot ? r = m.host.closest("[popover-target]") : m instanceof HTMLElement && (r = m.closest("[popover-target]"));
|
|
122
|
-
}
|
|
123
|
-
} else t === "sibling" ? r = (a = this.parentElement) == null ? void 0 : a.querySelector("[popover-target]") : r = document.querySelector(`#${t}`) || this.getRootNode().querySelector(`#${t}`);
|
|
124
|
-
r instanceof HTMLElement ? (h(this, s, r), e(this, s).addEventListener(
|
|
125
|
-
"popoverTriggered",
|
|
126
|
-
e(this, T)
|
|
127
|
-
), e(this, s).addEventListener(
|
|
128
|
-
"popoverOpened",
|
|
129
|
-
e(this, b)
|
|
130
|
-
), e(this, s).addEventListener(
|
|
131
|
-
"popoverClosing",
|
|
132
|
-
e(this, w)
|
|
133
|
-
), e(this, s).addEventListener(
|
|
134
|
-
"popoverClosed",
|
|
135
|
-
e(this, C)
|
|
136
|
-
)) : console.warn(this, `target ${t} not found`);
|
|
137
|
-
}
|
|
138
|
-
}
|
|
139
|
-
disconnectedCallback() {
|
|
140
|
-
e(this, s) && (e(this, s).removeEventListener(
|
|
141
|
-
"popoverTriggered",
|
|
142
|
-
e(this, T)
|
|
143
|
-
), e(this, s).removeEventListener(
|
|
144
|
-
"popoverOpened",
|
|
145
|
-
e(this, b)
|
|
146
|
-
), e(this, s).removeEventListener(
|
|
147
|
-
"popoverClosing",
|
|
148
|
-
e(this, w)
|
|
149
|
-
), e(this, s).removeEventListener(
|
|
150
|
-
"popoverClosed",
|
|
151
|
-
e(this, C)
|
|
152
|
-
));
|
|
153
|
-
}
|
|
154
|
-
}
|
|
155
|
-
s = new WeakMap(), T = new WeakMap(), b = new WeakMap(), w = new WeakMap(), C = new WeakMap();
|
|
156
|
-
customElements.get("e-popover-button") || customElements.define("e-popover-button", N);
|
|
157
|
-
export {
|
|
158
|
-
N as PopoverButtonElement,
|
|
159
|
-
A as PopoverElement
|
|
160
|
-
};
|
package/lib/style-At6aDoqG.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";function n(t){return parseFloat(getComputedStyle(t).transitionDuration||"")}function e(t){return n(t)*1e3}exports.getElementTransitionDurationMS=e;exports.getElementTransitionDurationS=n;
|