aptechka 0.1.8 → 0.1.10
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/Composed-C2Vv1xxR.cjs +1 -0
- package/lib/Composed-DhtYBEmo.js +79 -0
- package/lib/abstract-elements/index.cjs +1 -1
- package/lib/abstract-elements/index.js +1 -1
- package/lib/canvas/index.cjs +1 -1
- package/lib/canvas/index.js +2 -2
- package/lib/component/Component.d.ts +29 -0
- package/lib/component/hooks/animation.d.ts +9 -0
- package/lib/component/hooks/context.d.ts +2 -0
- package/lib/component/hooks/intersection.d.ts +4 -0
- package/lib/component/hooks/resize.d.ts +6 -0
- package/lib/component/hooks/shadow.d.ts +1 -0
- package/lib/component/hooks/stores.d.ts +6 -0
- package/lib/component/hooks/style.d.ts +2 -0
- package/lib/component/index.cjs +1 -0
- package/lib/component/index.d.ts +7 -0
- package/lib/component/index.js +187 -0
- package/lib/connector/index.cjs +1 -1
- package/lib/connector/index.d.ts +4 -3
- package/lib/connector/index.js +24 -22
- package/lib/{createStylesheet-BsVHqHhr.cjs → createStylesheet-BoJwXvjE.cjs} +1 -1
- package/lib/{createStylesheet-ITfBHk7A.js → createStylesheet-DSgkNlUZ.js} +1 -1
- package/lib/element-constructor/ElementConstructor.d.ts +4 -3
- package/lib/element-constructor/index.cjs +1 -1
- package/lib/element-constructor/index.js +2 -2
- package/lib/element-constructor/tags.d.ts +2 -3
- package/lib/element-resizer/index.cjs +1 -1
- package/lib/element-resizer/index.d.ts +1 -1
- package/lib/element-resizer/index.js +2 -1
- package/lib/en3/core/en3.d.ts +2 -2
- package/lib/en3/objects/En3Clip.d.ts +1 -1
- package/lib/{index-COirQu7j.js → index-228VqUsZ.js} +2 -2
- package/lib/{index-Bt91QUTY.cjs → index-Cv4y7_7y.cjs} +1 -1
- package/lib/intersector/index.cjs +1 -1
- package/lib/intersector/index.d.ts +1 -1
- package/lib/intersector/index.js +2 -1
- package/lib/layout-box/index.cjs +1 -1
- package/lib/layout-box/index.d.ts +2 -2
- package/lib/layout-box/index.js +70 -72
- package/lib/modal/index.cjs +1 -1
- package/lib/modal/index.js +2 -2
- package/lib/object-C1ph624j.cjs +1 -0
- package/lib/object-DIPjdukP.js +73 -0
- package/lib/popover/index.cjs +1 -1
- package/lib/popover/index.js +79 -71
- package/lib/router/Route.d.ts +8 -2
- package/lib/router/index.cjs +1 -1
- package/lib/router/index.d.ts +1 -2
- package/lib/router/index.js +139 -140
- package/lib/scroll/index.cjs +1 -1
- package/lib/scroll/index.js +2 -2
- package/lib/select/index.cjs +1 -1
- package/lib/select/index.js +1 -1
- package/lib/store/index.cjs +1 -1
- package/lib/store/index.js +48 -111
- package/lib/studio/index.cjs +1 -1
- package/lib/studio/index.js +3 -3
- package/lib/tags-920hsh9U.cjs +1 -0
- package/lib/tags-kZqsS_nJ.js +793 -0
- package/lib/theme/index.cjs +1 -1
- package/lib/theme/index.js +1 -1
- package/lib/ticker/index.cjs +1 -1
- package/lib/ticker/index.d.ts +1 -1
- package/lib/ticker/index.js +42 -36
- package/lib/utils/dom.d.ts +2 -2
- package/lib/utils/index.cjs +1 -1
- package/lib/utils/index.d.ts +1 -1
- package/lib/utils/index.js +113 -168
- package/lib/utils/object.d.ts +1 -0
- package/package.json +10 -2
- package/lib/router/RouteElement.d.ts +0 -14
- package/lib/tags-8Y7LSTwg.js +0 -779
- package/lib/tags-pcim-Cws.cjs +0 -1
package/lib/store/index.js
CHANGED
|
@@ -1,138 +1,75 @@
|
|
|
1
|
-
var
|
|
2
|
-
if (!
|
|
3
|
-
throw TypeError("Cannot " +
|
|
1
|
+
var v = (t, s, e) => {
|
|
2
|
+
if (!s.has(t))
|
|
3
|
+
throw TypeError("Cannot " + e);
|
|
4
4
|
};
|
|
5
|
-
var
|
|
6
|
-
if (
|
|
5
|
+
var i = (t, s, e) => (v(t, s, "read from private field"), e ? e.call(t) : s.get(t)), n = (t, s, e) => {
|
|
6
|
+
if (s.has(t))
|
|
7
7
|
throw TypeError("Cannot add the same private member more than once");
|
|
8
|
-
|
|
9
|
-
},
|
|
10
|
-
var
|
|
11
|
-
set _(
|
|
12
|
-
|
|
8
|
+
s instanceof WeakSet ? s.add(t) : s.set(t, e);
|
|
9
|
+
}, p = (t, s, e, r) => (v(t, s, "write to private field"), r ? r.call(t, e) : s.set(t, e), e);
|
|
10
|
+
var f = (t, s, e, r) => ({
|
|
11
|
+
set _(a) {
|
|
12
|
+
p(t, s, a, e);
|
|
13
13
|
},
|
|
14
14
|
get _() {
|
|
15
|
-
return
|
|
15
|
+
return i(t, s, r);
|
|
16
16
|
}
|
|
17
17
|
});
|
|
18
|
-
var
|
|
19
|
-
var
|
|
18
|
+
var d = (t, s, e) => new Promise((r, a) => {
|
|
19
|
+
var g = (o) => {
|
|
20
20
|
try {
|
|
21
|
-
|
|
22
|
-
} catch (
|
|
23
|
-
|
|
21
|
+
m(e.next(o));
|
|
22
|
+
} catch (h) {
|
|
23
|
+
a(h);
|
|
24
24
|
}
|
|
25
|
-
},
|
|
25
|
+
}, x = (o) => {
|
|
26
26
|
try {
|
|
27
|
-
|
|
28
|
-
} catch (
|
|
29
|
-
|
|
27
|
+
m(e.throw(o));
|
|
28
|
+
} catch (h) {
|
|
29
|
+
a(h);
|
|
30
30
|
}
|
|
31
|
-
},
|
|
32
|
-
|
|
31
|
+
}, m = (o) => o.done ? r(o.value) : Promise.resolve(o.value).then(g, x);
|
|
32
|
+
m((e = e.apply(t, s)).next());
|
|
33
33
|
});
|
|
34
|
-
import { S as
|
|
35
|
-
import {
|
|
36
|
-
import {
|
|
37
|
-
import {
|
|
38
|
-
var
|
|
39
|
-
class
|
|
40
|
-
constructor(
|
|
41
|
-
super(
|
|
42
|
-
n(this, m, void 0);
|
|
43
|
-
h(this, m, s.subscribe((o) => {
|
|
44
|
-
const a = [];
|
|
45
|
-
o.current.forEach((d, i) => {
|
|
46
|
-
var f;
|
|
47
|
-
o.current[i] === ((f = o.previous) == null ? void 0 : f[i]) && this.current[i] ? a.push(this.current[i]) : a.push(r(d));
|
|
48
|
-
}), this.current = a;
|
|
49
|
-
}));
|
|
50
|
-
}
|
|
51
|
-
close() {
|
|
52
|
-
super.close(), u(this, m).call(this);
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
m = new WeakMap();
|
|
56
|
-
var b, l, p;
|
|
57
|
-
class E extends A {
|
|
58
|
-
constructor(s, r, c) {
|
|
59
|
-
super(s, c);
|
|
60
|
-
n(this, b, void 0);
|
|
61
|
-
n(this, l, void 0);
|
|
62
|
-
n(this, p, 0);
|
|
63
|
-
h(this, l, new A(!1)), h(this, b, r), c != null && c.manualControl || this.refetch();
|
|
64
|
-
}
|
|
65
|
-
get isPending() {
|
|
66
|
-
return u(this, l);
|
|
67
|
-
}
|
|
68
|
-
/**
|
|
69
|
-
* Calls fetcher again and sets isPending to true.
|
|
70
|
-
*/
|
|
71
|
-
refetch() {
|
|
72
|
-
u(this, l).current = !0, h(this, p, u(this, p) + 1);
|
|
73
|
-
const s = u(this, p);
|
|
74
|
-
u(this, b).call(this).then((r) => {
|
|
75
|
-
s === u(this, p) && (u(this, l).current = !1, this.current = r);
|
|
76
|
-
});
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
b = new WeakMap(), l = new WeakMap(), p = new WeakMap();
|
|
80
|
-
var v, x, g;
|
|
81
|
-
class N extends E {
|
|
82
|
-
constructor(s, r, c = 100) {
|
|
83
|
-
super(s, r, {
|
|
34
|
+
import { S as I, a as b, s as k } from "../Store-JOKrNVEr.js";
|
|
35
|
+
import { D as j } from "../Derived-Bc88XJ8J.js";
|
|
36
|
+
import { R as A } from "../Composed-DhtYBEmo.js";
|
|
37
|
+
import { C as w, D as z } from "../Composed-DhtYBEmo.js";
|
|
38
|
+
var c, u, l;
|
|
39
|
+
class R extends A {
|
|
40
|
+
constructor(e, r, a = 100) {
|
|
41
|
+
super(e, r, {
|
|
84
42
|
manualControl: !0,
|
|
85
43
|
skipSubscribeNotification: !0
|
|
86
44
|
});
|
|
87
|
-
n(this,
|
|
88
|
-
n(this,
|
|
89
|
-
n(this,
|
|
90
|
-
|
|
45
|
+
n(this, c, void 0);
|
|
46
|
+
n(this, u, void 0);
|
|
47
|
+
n(this, l, 0);
|
|
48
|
+
p(this, u, a);
|
|
91
49
|
}
|
|
92
50
|
get step() {
|
|
93
|
-
return
|
|
51
|
+
return i(this, l);
|
|
94
52
|
}
|
|
95
53
|
startAccumulating() {
|
|
96
|
-
|
|
97
|
-
++
|
|
98
|
-
}),
|
|
54
|
+
p(this, c, setInterval(() => d(this, null, function* () {
|
|
55
|
+
++f(this, l)._, this.refetch();
|
|
56
|
+
}), i(this, u)));
|
|
99
57
|
}
|
|
100
58
|
stopAccumulating() {
|
|
101
|
-
clearInterval(
|
|
59
|
+
clearInterval(i(this, c));
|
|
102
60
|
}
|
|
103
61
|
close() {
|
|
104
62
|
super.close(), this.stopAccumulating();
|
|
105
63
|
}
|
|
106
64
|
}
|
|
107
|
-
|
|
108
|
-
var I;
|
|
109
|
-
class j extends A {
|
|
110
|
-
constructor(s, r, c) {
|
|
111
|
-
super(null, c);
|
|
112
|
-
n(this, I, []);
|
|
113
|
-
const o = D(() => {
|
|
114
|
-
this.current = r();
|
|
115
|
-
}, 0);
|
|
116
|
-
s.forEach((a) => {
|
|
117
|
-
u(this, I).push(
|
|
118
|
-
a.subscribe(() => {
|
|
119
|
-
o();
|
|
120
|
-
})
|
|
121
|
-
);
|
|
122
|
-
});
|
|
123
|
-
}
|
|
124
|
-
close() {
|
|
125
|
-
super.close(), u(this, I).forEach((s) => s());
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
I = new WeakMap();
|
|
65
|
+
c = new WeakMap(), u = new WeakMap(), l = new WeakMap();
|
|
129
66
|
export {
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
67
|
+
w as Composed,
|
|
68
|
+
R as CumulativeResource,
|
|
69
|
+
j as Derived,
|
|
70
|
+
z as DerivedArray,
|
|
71
|
+
A as Resource,
|
|
72
|
+
I as Store,
|
|
73
|
+
b as activeStores,
|
|
74
|
+
k as storeRegistry
|
|
138
75
|
};
|
package/lib/studio/index.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";var he=(t,e,r)=>{if(!e.has(t))throw TypeError("Cannot "+r)};var v=(t,e,r)=>(he(t,e,"read from private field"),r?r.call(t):e.get(t)),z=(t,e,r)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,r)},$=(t,e,r,n)=>(he(t,e,"write to private field"),n?n.call(t,r):e.set(t,r),r);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const we=require("../browser-CpzFX2xg.cjs"),p=require("../custom-element/index.cjs"),d=require("../Store-D0_rDIsE.cjs"),h=require("../tags-pcim-Cws.cjs"),m=require("../createStylesheet-BsVHqHhr.cjs"),me=require("../file-EevnUtRj.cjs"),ke=require("../function-MthRj-GJ.cjs"),_e=require("../Animated-Bf-gPIQM.cjs"),be=require("../Viewport-COsaberc.cjs"),Se=require("../accordion/index.cjs"),ye=require("../index-Bt91QUTY.cjs"),Te=require("../events-Crwi8fz6.cjs"),s=require("../theme/index.cjs"),Ce=require("../math-GDWEqu7y.cjs"),de='<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>',pe='<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>',xe='<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>',$e='<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>';var x,w;class Pe{constructor(){z(this,x,"");z(this,w,[]);$(this,x,d.storeRegistry.projectName+"-studio")}openPanel(e){v(this,w).includes(e)||v(this,w).push(e)}closePanel(e){$(this,w,v(this,w).filter(r=>r!==e))}isPanelOpened(e){return v(this,w).includes(e)}save(){const e={openedPanels:v(this,w)};localStorage.setItem(v(this,x),JSON.stringify(e)),d.storeRegistry.saveState()}load(){d.storeRegistry.loadState();const e=localStorage.getItem(v(this,x));if(e)try{const r=JSON.parse(e);r.openedPanels&&$(this,w,r.openedPanels)}catch(r){console.error(r)}}}x=new WeakMap,w=new WeakMap;const C=new Pe;var b;class A extends p.CustomElement{constructor(...r){super();z(this,b,void 0);$(this,b,r)}addStore(r){v(this,b).push(r)}get firstStore(){return v(this,b)[0]}get stores(){return v(this,b)}updateStores(r){v(this,b).forEach(n=>{n.current=r})}}b=new WeakMap;var Oe=Object.defineProperty,Ee=Object.getOwnPropertyDescriptor,Me=(t,e,r,n)=>{for(var a=n>1?void 0:n?Ee(e,r):e,o=t.length-1,i;o>=0;o--)(i=t[o])&&(a=(n?i(e,r,a):i(a))||a);return n&&a&&Oe(e,r,a),a};const Re=m.createStylesheet({":host":{width:"100%",display:"inline-flex",height:"max-content"},input:{padding:"0",margin:"0",width:`calc(${s.aptechkaTheme.heightInput.var} * 0.5)`,height:`calc(${s.aptechkaTheme.heightInput.var} * 0.5)`,borderRadius:s.aptechkaTheme.borderRadius.var,overflow:"hidden",accentColor:s.aptechkaTheme.colorLight.var}});let te=class extends A{constructor(...t){super(...t),this.openShadow(Re),h.element(this,{children:[h.input({type:"checkbox",onChange:e=>{this.updateStores(e.currentTarget.checked)},ref:e=>{this.firstStore.subscribe(r=>{e.checked=r.current})}})]})}};te=Me([p.define("e-tweaker-boolean-manager")],te);var De=Object.defineProperty,We=Object.getOwnPropertyDescriptor,Le=(t,e,r,n)=>{for(var a=n>1?void 0:n?We(e,r):e,o=t.length-1,i;o>=0;o--)(i=t[o])&&(a=(n?i(e,r,a):i(a))||a);return n&&a&&De(e,r,a),a};const Ie=m.createStylesheet({":host":{width:"100%",display:"inline-flex",height:"max-content"},input:{width:"100%",height:s.aptechkaTheme.heightInput.var,padding:"0",background:"none",borderRadius:s.aptechkaTheme.borderRadius.var,border:"none",blockSize:"unset"},"input::-webkit-color-swatch, input::-webkit-color-swatch-wrapper":{boxSizing:"border-box",padding:"0px",border:"none",borderRadius:s.aptechkaTheme.borderRadius.var,height:`calc(${s.aptechkaTheme.heightInput.var} * 0.93)`}});let re=class extends A{constructor(...t){super(...t),this.openShadow(Ie),h.element(this,{children:[h.input({type:"color",value:this.firstStore,onInput:e=>{this.updateStores(e.currentTarget.value)}})]})}};re=Le([p.define("e-tweaker-color-manager")],re);var Ae=Object.defineProperty,Fe=Object.getOwnPropertyDescriptor,ze=(t,e,r,n)=>{for(var a=n>1?void 0:n?Fe(e,r):e,o=t.length-1,i;o>=0;o--)(i=t[o])&&(a=(n?i(e,r,a):i(a))||a);return n&&a&&Ae(e,r,a),a};const qe=m.createStylesheet({a:{color:"inherit"}});let ae=class extends A{constructor(...t){var e,r;super(...t),this.openShadow(qe),h.element(this,{children:[h.a({href:this.firstStore,target:(r=(e=this.firstStore.passport)==null?void 0:e.manager)!=null&&r.sameWindow?"_self":"_blank",children:this.firstStore})]})}};ae=ze([p.define("e-tweaker-link-manager")],ae);var Ne=Object.defineProperty,He=Object.getOwnPropertyDescriptor,Ze=(t,e,r,n)=>{for(var a=n>1?void 0:n?He(e,r):e,o=t.length-1,i;o>=0;o--)(i=t[o])&&(a=(n?i(e,r,a):i(a))||a);return n&&a&&Ne(e,r,a),a},Ge=(t,e,r)=>{if(!e.has(t))throw TypeError("Cannot "+r)},X=(t,e,r)=>(Ge(t,e,"read from private field"),r?r.call(t):e.get(t)),Ke=(t,e,r)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,r)},P;const Ve=m.createStylesheet({":host":{width:"100%",display:"flex",alignItems:"center"},input:{boxSizing:"border-box",outline:"none",fontVariantNumeric:"tabular-nums",fontFamily:"inherit",color:"inherit",border:"none",fontSize:s.aptechkaTheme.fontSizeSmall.var},".text-input":{height:s.aptechkaTheme.heightInput.var,width:"100%",margin:"0",padding:`0 ${s.aptechkaTheme.gapSmall.var}`,backgroundColor:"rgba(255, 255, 255, 0.1)",borderRadius:s.aptechkaTheme.borderRadius.var}});let B=class extends A{constructor(...t){super(...t),Ke(this,P,new d.Store([])),this.openShadow(Ve),h.element(this,{children:[h.input({class:"text-input",type:"string",value:this.firstStore,onChange:e=>{this.updateStores(e.currentTarget.value)}}),X(this,P)]})}appendContent(t){X(this,P).current=[...X(this,P).current,t]}};P=new WeakMap;B=Ze([p.define("e-tweaker-string-manager")],B);var Je=Object.defineProperty,Ye=Object.getOwnPropertyDescriptor,Be=(t,e,r,n)=>{for(var a=n>1?void 0:n?Ye(e,r):e,o=t.length-1,i;o>=0;o--)(i=t[o])&&(a=(n?i(e,r,a):i(a))||a);return n&&a&&Je(e,r,a),a},ue=(t,e,r)=>{if(!e.has(t))throw TypeError("Cannot "+r)},_=(t,e,r)=>(ue(t,e,"read from private field"),r?r.call(t):e.get(t)),q=(t,e,r)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,r)},j=(t,e,r,n)=>(ue(t,e,"write to private field"),n?n.call(t,r):e.set(t,r),r),O,E,M,N;let Q=class extends B{constructor(...t){var e,r,n,a,o,i;super(...t),q(this,O,void 0),q(this,E,void 0),q(this,M,void 0),q(this,N,k=>{const F=typeof k=="string"?parseFloat(k)||this.min:k,fe=Ce.clamp(F,_(this,E),_(this,M));return this.toFixed(fe)}),j(this,E,((r=(e=this.firstStore.passport)==null?void 0:e.manager)==null?void 0:r.min)||0),j(this,M,((a=(n=this.firstStore.passport)==null?void 0:n.manager)==null?void 0:a.max)||1),j(this,O,((i=(o=this.firstStore.passport)==null?void 0:o.manager)==null?void 0:i.step)||.01)}get min(){return _(this,E)}get max(){return _(this,M)}get step(){return _(this,O)}toFixed(t){var r;const e=((r=_(this,O).toString().split(".")[1])==null?void 0:r.length)||0;return e?+t.toFixed(e):Math.ceil(t)}connectedCallback(){this.firstStore.addMiddleware(_(this,N))}disconnectedCallback(){this.firstStore.removeMiddleware(_(this,N))}};O=new WeakMap;E=new WeakMap;M=new WeakMap;N=new WeakMap;Q=Be([p.define("e-tweaker-number-manager")],Q);var Qe=Object.defineProperty,Ue=Object.getOwnPropertyDescriptor,Xe=(t,e,r,n)=>{for(var a=n>1?void 0:n?Ue(e,r):e,o=t.length-1,i;o>=0;o--)(i=t[o])&&(a=(n?i(e,r,a):i(a))||a);return n&&a&&Qe(e,r,a),a};const je=m.createStylesheet({":host":{width:"100%"},".text-input":{width:"60px",marginRight:s.aptechkaTheme.gapLarge.var,textAlign:"center"},".range-input":{boxSizing:"border-box","-webkit-appearance":"none",height:"8px",width:"100%",margin:"0",padding:"0",backgroundColor:"rgba(255, 255, 255, 0.1)",borderRadius:s.aptechkaTheme.borderRadius.var},".range-input::-webkit-slider-thumb":{"-webkit-appearance":"none",height:`calc(${s.aptechkaTheme.heightInput.var} * 0.7)`,width:s.aptechkaTheme.borderRadius.var,borderRadius:s.aptechkaTheme.borderRadius.var,backgroundColor:s.aptechkaTheme.colorLight.var,transitionProperty:"background-color",transitionDuration:s.aptechkaTheme.durationShort.var},".range-input:focus::-webkit-slider-thumb":{backgroundColor:s.aptechkaTheme.colorActive.var},".range-input::-webkit-slider-runnable-track":{"-webkit-appearance":"none","box-shadow":"none",border:"none",background:"transparent"}});let ne=class extends Q{constructor(...t){super(...t),this.addStylesheet(je),this.appendContent(h.input({class:"range-input",type:"range",min:this.min,max:this.max,step:this.step,value:this.firstStore,onInput:e=>{this.updateStores(parseFloat(e.currentTarget.value))}}))}};ne=Xe([p.define("e-tweaker-range-manager")],ne);var et=Object.defineProperty,tt=Object.getOwnPropertyDescriptor,rt=(t,e,r,n)=>{for(var a=n>1?void 0:n?tt(e,r):e,o=t.length-1,i;o>=0;o--)(i=t[o])&&(a=(n?i(e,r,a):i(a))||a);return n&&a&&et(e,r,a),a};const at=m.createStylesheet({"e-select":{width:"100%","--arrow-color":s.aptechkaTheme.colorLight.var},"e-select-head":{width:"100%",display:"flex",alignItems:"center",justifyContent:"space-between"},"e-select-option":{transitionDuration:s.aptechkaTheme.durationShort.var,transitionProperty:"color"},"e-select-option:hover":{color:s.aptechkaTheme.colorActive.var},svg:{width:"16px",height:"16px",fill:s.aptechkaTheme.colorLight.var,transitionProperty:"transform",transitionDuration:s.aptechkaTheme.durationShort.var},".opened svg":{transform:"scaleY(-1)"}});let ie=class extends A{constructor(...t){var r,n;super(...t),this.openShadow(at);const e=((n=(r=this.firstStore.passport)==null?void 0:r.manager)==null?void 0:n.variants)||[];h.element(this,{children:h.element("e-select",{value:this.firstStore,onChange:a=>{this.updateStores(a.currentTarget.value)},lightChildren:[h.element("e-select-head",{lightChildren:[h.span({"data-value-holder":""})]}),...e.map((a,o)=>h.element("e-select-option",{lightChildren:a,default:o===0?!0:null}))]})})}};ie=rt([p.define("e-tweaker-select-manager")],ie);const nt={boolean:te,color:re,link:ae,number:Q,range:ne,select:ie,string:B};var it=Object.defineProperty,st=Object.getOwnPropertyDescriptor,ot=(t,e,r,n)=>{for(var a=n>1?void 0:n?st(e,r):e,o=t.length-1,i;o>=0;o--)(i=t[o])&&(a=(n?i(e,r,a):i(a))||a);return n&&a&&it(e,r,a),a},ve=(t,e,r)=>{if(!e.has(t))throw TypeError("Cannot "+r)},l=(t,e,r)=>(ve(t,e,"read from private field"),r?r.call(t):e.get(t)),S=(t,e,r)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,r)},y=(t,e,r,n)=>(ve(t,e,"write to private field"),n?n.call(t,r):e.set(t,r),r),g,R,D,W,L,H,Z;const ht=m.createStylesheet({":host":{display:"grid",gridAutoFlow:"column",gridTemplateColumns:"0.3fr 1fr",alignItems:"center",color:s.aptechkaTheme.colorLight.var,gap:s.aptechkaTheme.gapMedium.var},":host(.disabled)":{pointerEvents:"none",opacity:.5},".head":{fontSize:s.aptechkaTheme.fontSizeMedium.var,display:"flex",alignItems:"center",gap:s.aptechkaTheme.gapExtraSmall.var},".head-buttons":{display:"flex"},".head-button":{width:"14px",height:"14px",padding:"0",margin:"0",border:"none",background:"none",fill:s.aptechkaTheme.colorLight.var,transitionDuration:s.aptechkaTheme.durationShort.var,transitionProperty:"fill, opacity",opacity:"0"},":host(:hover) .head-button":{opacity:"1"},".head-button:hover":{fill:s.aptechkaTheme.colorActive.var},".head-button svg":{width:"100%",height:"100%"}});let U=class extends p.CustomElement{constructor(t){var r,n,a,o;super(),S(this,g,[]),S(this,R,void 0),S(this,D,void 0),S(this,W,!1),S(this,L,void 0),S(this,H,()=>{d.activeStores.current.find(i=>l(this,g).includes(i))||this.remove()}),S(this,Z,i=>{l(this,W)&&((i.metaKey||i.ctrlKey)&&i.code==="KeyC"?navigator.clipboard.writeText(l(this,g)[0].current):(i.metaKey||i.ctrlKey)&&i.code==="KeyR"&&(l(this,g).forEach(k=>{k.reset()}),i.preventDefault()))}),y(this,g,[t.store]),y(this,R,t.store.passport.name),y(this,D,l(this,R).split(".").slice(-1).toString());const e=((n=(r=t.store.passport)==null?void 0:r.manager)==null?void 0:n.type)||"string";y(this,L,new nt[e](l(this,g)[0])),this.openShadow(ht),h.element(this,{class:{disabled:((o=(a=t.store.passport)==null?void 0:a.manager)==null?void 0:o.disabled)||!1},onPointerleave:()=>{y(this,W,!1)},onPointerenter:()=>{y(this,W,!0)},children:[h.div({class:"head",children:[h.div({class:"name",children:l(this,D)+":"}),h.div({class:"head-buttons",children:[h.button({class:"head-button",children:pe,onClick:()=>{navigator.clipboard.writeText(l(this,g)[0].current)}}),h.button({class:"head-button",children:de,onClick:()=>{l(this,g).forEach(i=>{i.reset()})}})]})]}),l(this,L)]})}get key(){return l(this,R)}get name(){return l(this,D)}get stores(){return l(this,g)}addStore(t){l(this,L).addStore(t)}connectedCallback(){d.activeStores.subscribe(l(this,H)),addEventListener("keydown",l(this,Z)),Te.dispatchSizeChangeEvent(this)}disconnectedCallback(){d.activeStores.unsubscribe(l(this,H)),removeEventListener("keydown",l(this,Z))}};g=new WeakMap;R=new WeakMap;D=new WeakMap;W=new WeakMap;L=new WeakMap;H=new WeakMap;Z=new WeakMap;U=ot([p.define("e-tweaker-field")],U);var ct=Object.defineProperty,lt=Object.getOwnPropertyDescriptor,dt=(t,e,r,n)=>{for(var a=n>1?void 0:n?lt(e,r):e,o=t.length-1,i;o>=0;o--)(i=t[o])&&(a=(n?i(e,r,a):i(a))||a);return n&&a&&ct(e,r,a),a},ge=(t,e,r)=>{if(!e.has(t))throw TypeError("Cannot "+r)},c=(t,e,r)=>(ge(t,e,"read from private field"),r?r.call(t):e.get(t)),T=(t,e,r)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,r)},ee=(t,e,r,n)=>(ge(t,e,"write to private field"),n?n.call(t,r):e.set(t,r),r),f,G,u,K,V,se;const pt=m.createStylesheet({".wrapper":{boxSizing:"border-box",backgroundColor:"rgba(255, 255, 255, 0.1)",borderRadius:s.aptechkaTheme.borderRadius.var},".head":{boxSizing:"border-box",width:"100%",height:s.aptechkaTheme.tweakerFolderHeight.var,paddingLeft:s.aptechkaTheme.gapMedium.var,paddingRight:s.aptechkaTheme.gapMedium.var,display:"flex",alignItems:"center",justifyContent:"space-between",backgroundColor:s.aptechkaTheme.colorDarkAux.var,borderRadius:s.aptechkaTheme.borderRadius.var},".name":{fontSize:s.aptechkaTheme.fontSizeLarge.var,color:s.aptechkaTheme.colorLight.var},".body":{transitionProperty:"height",transitionDuration:s.aptechkaTheme.durationShort.var,overflow:"hidden",height:"0px"},".body-content":{boxSizing:"border-box",padding:s.aptechkaTheme.gapLarge.var,display:"grid",gap:s.aptechkaTheme.gapMedium.var},".arrow":{width:"20px",height:"20px",fill:s.aptechkaTheme.colorLight.var,transition:`transform ${s.aptechkaTheme.durationShort.var}`},".opened .arrow":{transform:"scaleY(-1)"}});let I=class extends Se.AccordionElement{constructor(t){super(),T(this,f,void 0),T(this,G,new d.Store(null)),T(this,u,new d.Store([])),T(this,K,void 0),T(this,V,null),T(this,se,e=>{let r=[],n=[];e.forEach(a=>{r=[...r,...a.removedNodes],n=[...n,...a.addedNodes]}),c(this,u).current=c(this,u).current.filter(a=>!r.includes(a)),c(this,f)&&!c(this,u).current.length&&!n.length&&this.remove()}),this.openShadow(pt),ee(this,f,t.key),ee(this,K,new MutationObserver(c(this,se))),h.element(this,{onAccordionItemToggle:e=>{e.stopPropagation(),e.detail.opened?C.openPanel(c(this,f)):C.closePanel(c(this,f))},children:[h.div({class:"wrapper",children:[h.div({class:"head",children:[c(this,f)?h.div({class:"name",children:[c(this,f).split(".").slice(-1).toString()]}):null,c(this,G),h.element(ye.arrowIcon,{class:"arrow"})]}),h.div({class:"body",children:h.div({class:"body-content",children:c(this,u),ref:e=>ee(this,V,e.firstElementChild)})})]})]}),t!=null&&t.storeBox&&this.handleStore(t.storeBox)}get key(){return c(this,f)}get head(){return c(this,G)}get content(){return c(this,u)}connectedCallback(){super.connectedCallback(),setTimeout(()=>{C.isPanelOpened(c(this,f))&&this.openAll({skipTransition:!0})},50),c(this,K).observe(c(this,V),{childList:!0})}handleStore(t){if(t.remainingFolders.length){const r=t.store.passport.name.split("."),n=r.slice(0,r.length-t.remainingFolders.length).join("."),a=c(this,u).current.find(o=>o.key===n);a instanceof I?a.handleStore({store:t.store,remainingFolders:t.remainingFolders.slice(1)}):c(this,u).current=[...c(this,u).current,new I({key:n,storeBox:{store:t.store,remainingFolders:t.remainingFolders.slice(1)}})]}else{const e=c(this,u).current.find(r=>r.key===t.store.passport.name);e instanceof U?e.addStore(t.store):c(this,u).current=[...c(this,u).current,new U({store:t.store})]}}};f=new WeakMap;G=new WeakMap;u=new WeakMap;K=new WeakMap;V=new WeakMap;se=new WeakMap;I=dt([p.define("e-tweaker-folder")],I);var ut=Object.defineProperty,vt=Object.getOwnPropertyDescriptor,gt=(t,e,r,n)=>{for(var a=n>1?void 0:n?vt(e,r):e,o=t.length-1,i;o>=0;o--)(i=t[o])&&(a=(n?i(e,r,a):i(a))||a);return n&&a&&ut(e,r,a),a},ft=(t,e,r)=>{if(!e.has(t))throw TypeError("Cannot "+r)},ce=(t,e,r)=>(ft(t,e,"read from private field"),r?r.call(t):e.get(t)),wt=(t,e,r)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,r)},J;const mt=m.createStylesheet({":host":{position:"absolute",top:s.aptechkaTheme.tweakerOffset.var,right:s.aptechkaTheme.tweakerOffset.var,width:s.aptechkaTheme.tweakerWidth.var,backgroundColor:s.aptechkaTheme.colorDark.var,borderRadius:s.aptechkaTheme.borderRadius.var,transition:"opacity 0.2s",zIndex:"100"},":host(:hover)":{opacity:"1 !important"},".tweaker-buttons":{display:"flex",alignItems:"center",gap:s.aptechkaTheme.gapExtraSmall.var},".tweaker-button":{width:"18px",height:"18px",padding:"0",margin:"0",background:"none",border:"none",fill:s.aptechkaTheme.colorLight.var,transitionProperty:"fill",transitionDuration:s.aptechkaTheme.durationShort.var},".tweaker-button:hover":{fill:s.aptechkaTheme.colorActive.var},".tweaker-button svg":{width:"100%",height:"100%"},":host .body-content":{maxHeight:`calc(
|
|
1
|
+
"use strict";var he=(t,e,r)=>{if(!e.has(t))throw TypeError("Cannot "+r)};var v=(t,e,r)=>(he(t,e,"read from private field"),r?r.call(t):e.get(t)),z=(t,e,r)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,r)},$=(t,e,r,n)=>(he(t,e,"write to private field"),n?n.call(t,r):e.set(t,r),r);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const we=require("../browser-CpzFX2xg.cjs"),p=require("../custom-element/index.cjs"),d=require("../Store-D0_rDIsE.cjs"),h=require("../tags-920hsh9U.cjs"),m=require("../createStylesheet-BoJwXvjE.cjs"),me=require("../file-EevnUtRj.cjs"),ke=require("../function-MthRj-GJ.cjs"),_e=require("../Animated-Bf-gPIQM.cjs"),be=require("../Viewport-COsaberc.cjs"),Se=require("../accordion/index.cjs"),ye=require("../index-Cv4y7_7y.cjs"),Te=require("../events-Crwi8fz6.cjs"),s=require("../theme/index.cjs"),Ce=require("../math-GDWEqu7y.cjs"),de='<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>',pe='<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>',xe='<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>',$e='<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>';var x,w;class Pe{constructor(){z(this,x,"");z(this,w,[]);$(this,x,d.storeRegistry.projectName+"-studio")}openPanel(e){v(this,w).includes(e)||v(this,w).push(e)}closePanel(e){$(this,w,v(this,w).filter(r=>r!==e))}isPanelOpened(e){return v(this,w).includes(e)}save(){const e={openedPanels:v(this,w)};localStorage.setItem(v(this,x),JSON.stringify(e)),d.storeRegistry.saveState()}load(){d.storeRegistry.loadState();const e=localStorage.getItem(v(this,x));if(e)try{const r=JSON.parse(e);r.openedPanels&&$(this,w,r.openedPanels)}catch(r){console.error(r)}}}x=new WeakMap,w=new WeakMap;const C=new Pe;var b;class A extends p.CustomElement{constructor(...r){super();z(this,b,void 0);$(this,b,r)}addStore(r){v(this,b).push(r)}get firstStore(){return v(this,b)[0]}get stores(){return v(this,b)}updateStores(r){v(this,b).forEach(n=>{n.current=r})}}b=new WeakMap;var Oe=Object.defineProperty,Ee=Object.getOwnPropertyDescriptor,Me=(t,e,r,n)=>{for(var a=n>1?void 0:n?Ee(e,r):e,o=t.length-1,i;o>=0;o--)(i=t[o])&&(a=(n?i(e,r,a):i(a))||a);return n&&a&&Oe(e,r,a),a};const Re=m.createStylesheet({":host":{width:"100%",display:"inline-flex",height:"max-content"},input:{padding:"0",margin:"0",width:`calc(${s.aptechkaTheme.heightInput.var} * 0.5)`,height:`calc(${s.aptechkaTheme.heightInput.var} * 0.5)`,borderRadius:s.aptechkaTheme.borderRadius.var,overflow:"hidden",accentColor:s.aptechkaTheme.colorLight.var}});let te=class extends A{constructor(...t){super(...t),this.openShadow(Re),h.element(this,{children:[h.input({type:"checkbox",onChange:e=>{this.updateStores(e.currentTarget.checked)},ref:e=>{this.firstStore.subscribe(r=>{e.checked=r.current})}})]})}};te=Me([p.define("e-tweaker-boolean-manager")],te);var De=Object.defineProperty,We=Object.getOwnPropertyDescriptor,Le=(t,e,r,n)=>{for(var a=n>1?void 0:n?We(e,r):e,o=t.length-1,i;o>=0;o--)(i=t[o])&&(a=(n?i(e,r,a):i(a))||a);return n&&a&&De(e,r,a),a};const Ie=m.createStylesheet({":host":{width:"100%",display:"inline-flex",height:"max-content"},input:{width:"100%",height:s.aptechkaTheme.heightInput.var,padding:"0",background:"none",borderRadius:s.aptechkaTheme.borderRadius.var,border:"none",blockSize:"unset"},"input::-webkit-color-swatch, input::-webkit-color-swatch-wrapper":{boxSizing:"border-box",padding:"0px",border:"none",borderRadius:s.aptechkaTheme.borderRadius.var,height:`calc(${s.aptechkaTheme.heightInput.var} * 0.93)`}});let re=class extends A{constructor(...t){super(...t),this.openShadow(Ie),h.element(this,{children:[h.input({type:"color",value:this.firstStore,onInput:e=>{this.updateStores(e.currentTarget.value)}})]})}};re=Le([p.define("e-tweaker-color-manager")],re);var Ae=Object.defineProperty,Fe=Object.getOwnPropertyDescriptor,ze=(t,e,r,n)=>{for(var a=n>1?void 0:n?Fe(e,r):e,o=t.length-1,i;o>=0;o--)(i=t[o])&&(a=(n?i(e,r,a):i(a))||a);return n&&a&&Ae(e,r,a),a};const qe=m.createStylesheet({a:{color:"inherit"}});let ae=class extends A{constructor(...t){var e,r;super(...t),this.openShadow(qe),h.element(this,{children:[h.a({href:this.firstStore,target:(r=(e=this.firstStore.passport)==null?void 0:e.manager)!=null&&r.sameWindow?"_self":"_blank",children:this.firstStore})]})}};ae=ze([p.define("e-tweaker-link-manager")],ae);var Ne=Object.defineProperty,He=Object.getOwnPropertyDescriptor,Ze=(t,e,r,n)=>{for(var a=n>1?void 0:n?He(e,r):e,o=t.length-1,i;o>=0;o--)(i=t[o])&&(a=(n?i(e,r,a):i(a))||a);return n&&a&&Ne(e,r,a),a},Ge=(t,e,r)=>{if(!e.has(t))throw TypeError("Cannot "+r)},X=(t,e,r)=>(Ge(t,e,"read from private field"),r?r.call(t):e.get(t)),Ke=(t,e,r)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,r)},P;const Ve=m.createStylesheet({":host":{width:"100%",display:"flex",alignItems:"center"},input:{boxSizing:"border-box",outline:"none",fontVariantNumeric:"tabular-nums",fontFamily:"inherit",color:"inherit",border:"none",fontSize:s.aptechkaTheme.fontSizeSmall.var},".text-input":{height:s.aptechkaTheme.heightInput.var,width:"100%",margin:"0",padding:`0 ${s.aptechkaTheme.gapSmall.var}`,backgroundColor:"rgba(255, 255, 255, 0.1)",borderRadius:s.aptechkaTheme.borderRadius.var}});let B=class extends A{constructor(...t){super(...t),Ke(this,P,new d.Store([])),this.openShadow(Ve),h.element(this,{children:[h.input({class:"text-input",type:"string",value:this.firstStore,onChange:e=>{this.updateStores(e.currentTarget.value)}}),X(this,P)]})}appendContent(t){X(this,P).current=[...X(this,P).current,t]}};P=new WeakMap;B=Ze([p.define("e-tweaker-string-manager")],B);var Je=Object.defineProperty,Ye=Object.getOwnPropertyDescriptor,Be=(t,e,r,n)=>{for(var a=n>1?void 0:n?Ye(e,r):e,o=t.length-1,i;o>=0;o--)(i=t[o])&&(a=(n?i(e,r,a):i(a))||a);return n&&a&&Je(e,r,a),a},ue=(t,e,r)=>{if(!e.has(t))throw TypeError("Cannot "+r)},_=(t,e,r)=>(ue(t,e,"read from private field"),r?r.call(t):e.get(t)),q=(t,e,r)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,r)},j=(t,e,r,n)=>(ue(t,e,"write to private field"),n?n.call(t,r):e.set(t,r),r),O,E,M,N;let Q=class extends B{constructor(...t){var e,r,n,a,o,i;super(...t),q(this,O,void 0),q(this,E,void 0),q(this,M,void 0),q(this,N,k=>{const F=typeof k=="string"?parseFloat(k)||this.min:k,fe=Ce.clamp(F,_(this,E),_(this,M));return this.toFixed(fe)}),j(this,E,((r=(e=this.firstStore.passport)==null?void 0:e.manager)==null?void 0:r.min)||0),j(this,M,((a=(n=this.firstStore.passport)==null?void 0:n.manager)==null?void 0:a.max)||1),j(this,O,((i=(o=this.firstStore.passport)==null?void 0:o.manager)==null?void 0:i.step)||.01)}get min(){return _(this,E)}get max(){return _(this,M)}get step(){return _(this,O)}toFixed(t){var r;const e=((r=_(this,O).toString().split(".")[1])==null?void 0:r.length)||0;return e?+t.toFixed(e):Math.ceil(t)}connectedCallback(){this.firstStore.addMiddleware(_(this,N))}disconnectedCallback(){this.firstStore.removeMiddleware(_(this,N))}};O=new WeakMap;E=new WeakMap;M=new WeakMap;N=new WeakMap;Q=Be([p.define("e-tweaker-number-manager")],Q);var Qe=Object.defineProperty,Ue=Object.getOwnPropertyDescriptor,Xe=(t,e,r,n)=>{for(var a=n>1?void 0:n?Ue(e,r):e,o=t.length-1,i;o>=0;o--)(i=t[o])&&(a=(n?i(e,r,a):i(a))||a);return n&&a&&Qe(e,r,a),a};const je=m.createStylesheet({":host":{width:"100%"},".text-input":{width:"60px",marginRight:s.aptechkaTheme.gapLarge.var,textAlign:"center"},".range-input":{boxSizing:"border-box","-webkit-appearance":"none",height:"8px",width:"100%",margin:"0",padding:"0",backgroundColor:"rgba(255, 255, 255, 0.1)",borderRadius:s.aptechkaTheme.borderRadius.var},".range-input::-webkit-slider-thumb":{"-webkit-appearance":"none",height:`calc(${s.aptechkaTheme.heightInput.var} * 0.7)`,width:s.aptechkaTheme.borderRadius.var,borderRadius:s.aptechkaTheme.borderRadius.var,backgroundColor:s.aptechkaTheme.colorLight.var,transitionProperty:"background-color",transitionDuration:s.aptechkaTheme.durationShort.var},".range-input:focus::-webkit-slider-thumb":{backgroundColor:s.aptechkaTheme.colorActive.var},".range-input::-webkit-slider-runnable-track":{"-webkit-appearance":"none","box-shadow":"none",border:"none",background:"transparent"}});let ne=class extends Q{constructor(...t){super(...t),this.addStylesheet(je),this.appendContent(h.input({class:"range-input",type:"range",min:this.min,max:this.max,step:this.step,value:this.firstStore,onInput:e=>{this.updateStores(parseFloat(e.currentTarget.value))}}))}};ne=Xe([p.define("e-tweaker-range-manager")],ne);var et=Object.defineProperty,tt=Object.getOwnPropertyDescriptor,rt=(t,e,r,n)=>{for(var a=n>1?void 0:n?tt(e,r):e,o=t.length-1,i;o>=0;o--)(i=t[o])&&(a=(n?i(e,r,a):i(a))||a);return n&&a&&et(e,r,a),a};const at=m.createStylesheet({"e-select":{width:"100%","--arrow-color":s.aptechkaTheme.colorLight.var},"e-select-head":{width:"100%",display:"flex",alignItems:"center",justifyContent:"space-between"},"e-select-option":{transitionDuration:s.aptechkaTheme.durationShort.var,transitionProperty:"color"},"e-select-option:hover":{color:s.aptechkaTheme.colorActive.var},svg:{width:"16px",height:"16px",fill:s.aptechkaTheme.colorLight.var,transitionProperty:"transform",transitionDuration:s.aptechkaTheme.durationShort.var},".opened svg":{transform:"scaleY(-1)"}});let ie=class extends A{constructor(...t){var r,n;super(...t),this.openShadow(at);const e=((n=(r=this.firstStore.passport)==null?void 0:r.manager)==null?void 0:n.variants)||[];h.element(this,{children:h.element("e-select",{value:this.firstStore,onChange:a=>{this.updateStores(a.currentTarget.value)},lightChildren:[h.element("e-select-head",{lightChildren:[h.span({"data-value-holder":""})]}),...e.map((a,o)=>h.element("e-select-option",{lightChildren:a,default:o===0?!0:null}))]})})}};ie=rt([p.define("e-tweaker-select-manager")],ie);const nt={boolean:te,color:re,link:ae,number:Q,range:ne,select:ie,string:B};var it=Object.defineProperty,st=Object.getOwnPropertyDescriptor,ot=(t,e,r,n)=>{for(var a=n>1?void 0:n?st(e,r):e,o=t.length-1,i;o>=0;o--)(i=t[o])&&(a=(n?i(e,r,a):i(a))||a);return n&&a&&it(e,r,a),a},ve=(t,e,r)=>{if(!e.has(t))throw TypeError("Cannot "+r)},l=(t,e,r)=>(ve(t,e,"read from private field"),r?r.call(t):e.get(t)),S=(t,e,r)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,r)},y=(t,e,r,n)=>(ve(t,e,"write to private field"),n?n.call(t,r):e.set(t,r),r),g,R,D,W,L,H,Z;const ht=m.createStylesheet({":host":{display:"grid",gridAutoFlow:"column",gridTemplateColumns:"0.3fr 1fr",alignItems:"center",color:s.aptechkaTheme.colorLight.var,gap:s.aptechkaTheme.gapMedium.var},":host(.disabled)":{pointerEvents:"none",opacity:.5},".head":{fontSize:s.aptechkaTheme.fontSizeMedium.var,display:"flex",alignItems:"center",gap:s.aptechkaTheme.gapExtraSmall.var},".head-buttons":{display:"flex"},".head-button":{width:"14px",height:"14px",padding:"0",margin:"0",border:"none",background:"none",fill:s.aptechkaTheme.colorLight.var,transitionDuration:s.aptechkaTheme.durationShort.var,transitionProperty:"fill, opacity",opacity:"0"},":host(:hover) .head-button":{opacity:"1"},".head-button:hover":{fill:s.aptechkaTheme.colorActive.var},".head-button svg":{width:"100%",height:"100%"}});let U=class extends p.CustomElement{constructor(t){var r,n,a,o;super(),S(this,g,[]),S(this,R,void 0),S(this,D,void 0),S(this,W,!1),S(this,L,void 0),S(this,H,()=>{d.activeStores.current.find(i=>l(this,g).includes(i))||this.remove()}),S(this,Z,i=>{l(this,W)&&((i.metaKey||i.ctrlKey)&&i.code==="KeyC"?navigator.clipboard.writeText(l(this,g)[0].current):(i.metaKey||i.ctrlKey)&&i.code==="KeyR"&&(l(this,g).forEach(k=>{k.reset()}),i.preventDefault()))}),y(this,g,[t.store]),y(this,R,t.store.passport.name),y(this,D,l(this,R).split(".").slice(-1).toString());const e=((n=(r=t.store.passport)==null?void 0:r.manager)==null?void 0:n.type)||"string";y(this,L,new nt[e](l(this,g)[0])),this.openShadow(ht),h.element(this,{class:{disabled:((o=(a=t.store.passport)==null?void 0:a.manager)==null?void 0:o.disabled)||!1},onPointerleave:()=>{y(this,W,!1)},onPointerenter:()=>{y(this,W,!0)},children:[h.div({class:"head",children:[h.div({class:"name",children:l(this,D)+":"}),h.div({class:"head-buttons",children:[h.button({class:"head-button",children:pe,onClick:()=>{navigator.clipboard.writeText(l(this,g)[0].current)}}),h.button({class:"head-button",children:de,onClick:()=>{l(this,g).forEach(i=>{i.reset()})}})]})]}),l(this,L)]})}get key(){return l(this,R)}get name(){return l(this,D)}get stores(){return l(this,g)}addStore(t){l(this,L).addStore(t)}connectedCallback(){d.activeStores.subscribe(l(this,H)),addEventListener("keydown",l(this,Z)),Te.dispatchSizeChangeEvent(this)}disconnectedCallback(){d.activeStores.unsubscribe(l(this,H)),removeEventListener("keydown",l(this,Z))}};g=new WeakMap;R=new WeakMap;D=new WeakMap;W=new WeakMap;L=new WeakMap;H=new WeakMap;Z=new WeakMap;U=ot([p.define("e-tweaker-field")],U);var ct=Object.defineProperty,lt=Object.getOwnPropertyDescriptor,dt=(t,e,r,n)=>{for(var a=n>1?void 0:n?lt(e,r):e,o=t.length-1,i;o>=0;o--)(i=t[o])&&(a=(n?i(e,r,a):i(a))||a);return n&&a&&ct(e,r,a),a},ge=(t,e,r)=>{if(!e.has(t))throw TypeError("Cannot "+r)},c=(t,e,r)=>(ge(t,e,"read from private field"),r?r.call(t):e.get(t)),T=(t,e,r)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,r)},ee=(t,e,r,n)=>(ge(t,e,"write to private field"),n?n.call(t,r):e.set(t,r),r),f,G,u,K,V,se;const pt=m.createStylesheet({".wrapper":{boxSizing:"border-box",backgroundColor:"rgba(255, 255, 255, 0.1)",borderRadius:s.aptechkaTheme.borderRadius.var},".head":{boxSizing:"border-box",width:"100%",height:s.aptechkaTheme.tweakerFolderHeight.var,paddingLeft:s.aptechkaTheme.gapMedium.var,paddingRight:s.aptechkaTheme.gapMedium.var,display:"flex",alignItems:"center",justifyContent:"space-between",backgroundColor:s.aptechkaTheme.colorDarkAux.var,borderRadius:s.aptechkaTheme.borderRadius.var},".name":{fontSize:s.aptechkaTheme.fontSizeLarge.var,color:s.aptechkaTheme.colorLight.var},".body":{transitionProperty:"height",transitionDuration:s.aptechkaTheme.durationShort.var,overflow:"hidden",height:"0px"},".body-content":{boxSizing:"border-box",padding:s.aptechkaTheme.gapLarge.var,display:"grid",gap:s.aptechkaTheme.gapMedium.var},".arrow":{width:"20px",height:"20px",fill:s.aptechkaTheme.colorLight.var,transition:`transform ${s.aptechkaTheme.durationShort.var}`},".opened .arrow":{transform:"scaleY(-1)"}});let I=class extends Se.AccordionElement{constructor(t){super(),T(this,f,void 0),T(this,G,new d.Store(null)),T(this,u,new d.Store([])),T(this,K,void 0),T(this,V,null),T(this,se,e=>{let r=[],n=[];e.forEach(a=>{r=[...r,...a.removedNodes],n=[...n,...a.addedNodes]}),c(this,u).current=c(this,u).current.filter(a=>!r.includes(a)),c(this,f)&&!c(this,u).current.length&&!n.length&&this.remove()}),this.openShadow(pt),ee(this,f,t.key),ee(this,K,new MutationObserver(c(this,se))),h.element(this,{onAccordionItemToggle:e=>{e.stopPropagation(),e.detail.opened?C.openPanel(c(this,f)):C.closePanel(c(this,f))},children:[h.div({class:"wrapper",children:[h.div({class:"head",children:[c(this,f)?h.div({class:"name",children:[c(this,f).split(".").slice(-1).toString()]}):null,c(this,G),h.element(ye.arrowIcon,{class:"arrow"})]}),h.div({class:"body",children:h.div({class:"body-content",children:c(this,u),ref:e=>ee(this,V,e.firstElementChild)})})]})]}),t!=null&&t.storeBox&&this.handleStore(t.storeBox)}get key(){return c(this,f)}get head(){return c(this,G)}get content(){return c(this,u)}connectedCallback(){super.connectedCallback(),setTimeout(()=>{C.isPanelOpened(c(this,f))&&this.openAll({skipTransition:!0})},50),c(this,K).observe(c(this,V),{childList:!0})}handleStore(t){if(t.remainingFolders.length){const r=t.store.passport.name.split("."),n=r.slice(0,r.length-t.remainingFolders.length).join("."),a=c(this,u).current.find(o=>o.key===n);a instanceof I?a.handleStore({store:t.store,remainingFolders:t.remainingFolders.slice(1)}):c(this,u).current=[...c(this,u).current,new I({key:n,storeBox:{store:t.store,remainingFolders:t.remainingFolders.slice(1)}})]}else{const e=c(this,u).current.find(r=>r.key===t.store.passport.name);e instanceof U?e.addStore(t.store):c(this,u).current=[...c(this,u).current,new U({store:t.store})]}}};f=new WeakMap;G=new WeakMap;u=new WeakMap;K=new WeakMap;V=new WeakMap;se=new WeakMap;I=dt([p.define("e-tweaker-folder")],I);var ut=Object.defineProperty,vt=Object.getOwnPropertyDescriptor,gt=(t,e,r,n)=>{for(var a=n>1?void 0:n?vt(e,r):e,o=t.length-1,i;o>=0;o--)(i=t[o])&&(a=(n?i(e,r,a):i(a))||a);return n&&a&&ut(e,r,a),a},ft=(t,e,r)=>{if(!e.has(t))throw TypeError("Cannot "+r)},ce=(t,e,r)=>(ft(t,e,"read from private field"),r?r.call(t):e.get(t)),wt=(t,e,r)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,r)},J;const mt=m.createStylesheet({":host":{position:"absolute",top:s.aptechkaTheme.tweakerOffset.var,right:s.aptechkaTheme.tweakerOffset.var,width:s.aptechkaTheme.tweakerWidth.var,backgroundColor:s.aptechkaTheme.colorDark.var,borderRadius:s.aptechkaTheme.borderRadius.var,transition:"opacity 0.2s",zIndex:"100"},":host(:hover)":{opacity:"1 !important"},".tweaker-buttons":{display:"flex",alignItems:"center",gap:s.aptechkaTheme.gapExtraSmall.var},".tweaker-button":{width:"18px",height:"18px",padding:"0",margin:"0",background:"none",border:"none",fill:s.aptechkaTheme.colorLight.var,transitionProperty:"fill",transitionDuration:s.aptechkaTheme.durationShort.var},".tweaker-button:hover":{fill:s.aptechkaTheme.colorActive.var},".tweaker-button svg":{width:"100%",height:"100%"},":host .body-content":{maxHeight:`calc(
|
|
2
2
|
100dvh -
|
|
3
3
|
(
|
|
4
4
|
${s.aptechkaTheme.tweakerOffset.var} * 2 +
|
package/lib/studio/index.js
CHANGED
|
@@ -10,14 +10,14 @@ var d = (t, e, r) => (ge(t, e, "read from private field"), r ? r.call(t) : e.get
|
|
|
10
10
|
import { i as ke } from "../browser-0zX67oeU.js";
|
|
11
11
|
import { CustomElement as ve, define as u } from "../custom-element/index.js";
|
|
12
12
|
import { s as S, S as se, a as $ } from "../Store-JOKrNVEr.js";
|
|
13
|
-
import { e as p, a0 as N, a as xe, aB as $e, D as m, p as F, a3 as Pe } from "../tags-
|
|
14
|
-
import { c as w } from "../createStylesheet-
|
|
13
|
+
import { e as p, a0 as N, a as xe, aB as $e, D as m, p as F, a3 as Pe } from "../tags-kZqsS_nJ.js";
|
|
14
|
+
import { c as w } from "../createStylesheet-DSgkNlUZ.js";
|
|
15
15
|
import { c as Oe } from "../file-lxi_oXJf.js";
|
|
16
16
|
import { d as Me } from "../function-C10DGppn.js";
|
|
17
17
|
import { A as Ee } from "../Animated-Br_4OSth.js";
|
|
18
18
|
import { a as Te } from "../Viewport-CXY5xcGJ.js";
|
|
19
19
|
import { AccordionElement as De } from "../accordion/index.js";
|
|
20
|
-
import { a as Re } from "../index-
|
|
20
|
+
import { a as Re } from "../index-228VqUsZ.js";
|
|
21
21
|
import { d as We } from "../events-_C2CztxR.js";
|
|
22
22
|
import { aptechkaTheme as i } from "../theme/index.js";
|
|
23
23
|
import { c as Le } from "../math-BOBiC4TN.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var le=Object.defineProperty,de=Object.defineProperties;var he=Object.getOwnPropertyDescriptors;var Q=Object.getOwnPropertySymbols;var we=Object.prototype.hasOwnProperty,me=Object.prototype.propertyIsEnumerable;var X=(e,n,r)=>n in e?le(e,n,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[n]=r,$=(e,n)=>{for(var r in n||(n={}))we.call(n,r)&&X(e,r,n[r]);if(Q)for(var r of Q(n))me.call(n,r)&&X(e,r,n[r]);return e},Z=(e,n)=>de(e,he(n));var R=(e,n,r)=>{if(!n.has(e))throw TypeError("Cannot "+r)};var s=(e,n,r)=>(R(e,n,"read from private field"),r?r.call(e):n.get(e)),f=(e,n,r)=>{if(n.has(e))throw TypeError("Cannot add the same private member more than once");n instanceof WeakSet?n.add(e):n.set(e,r)},_=(e,n,r,i)=>(R(e,n,"write to private field"),i?i.call(e,r):n.set(e,r),r);var c=(e,n,r)=>(R(e,n,"access private method"),r);const m=require("./Store-D0_rDIsE.cjs"),pe=require("./browser-CpzFX2xg.cjs"),O=require("./string-DzUwFYSS.cjs"),ge=require("./connector/index.cjs"),be=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"]);var a,w,d,T,j,C,ee,N,ne,g,W,x,te,q,re,A,ie,M,oe,b,J,y,z,D,se,F,ue,S,K,p,k,E,Y,H,ce,P,fe,v,I,L,U,B,G;const V=class V{constructor(...n){f(this,T);f(this,C);f(this,N);f(this,g);f(this,x);f(this,q);f(this,A);f(this,M);f(this,b);f(this,y);f(this,D);f(this,F);f(this,S);f(this,p);f(this,E);f(this,H);f(this,P);f(this,v);f(this,L);f(this,a,void 0);f(this,w,new Set);f(this,d,new Set);f(this,B,()=>{s(this,w).forEach(n=>{n()}),s(this,w).clear()});f(this,G,n=>{s(this,d).forEach(r=>{r(n)}),s(this,d).clear()});const r=n[0],i=n[1];_(this,a,c(this,T,j).call(this,r,i==null?void 0:i.forceSvg)),c(this,N,ne).call(this,i)}get node(){return s(this,a)}};a=new WeakMap,w=new WeakMap,d=new WeakMap,T=new WeakSet,j=function(n,r){let i=null;if(n instanceof Node)i=n;else if(typeof n=="string")if(!n.includes("<")&&n.includes("-"))i=new(customElements.get(n));else if(n.includes("<")){const o=document.createElement("div");o.innerHTML=n,i=o.firstElementChild}else be.has(n)||r?i=document.createElementNS("http://www.w3.org/2000/svg",n):i=document.createElement(n);else i=document.createElement("div");return i},C=new WeakSet,ee=function(n){return n instanceof HTMLElement||n instanceof SVGElement},N=new WeakSet,ne=function(n){if(!n)return;const r=c(this,C,ee).call(this,s(this,a)),i=n.ref;delete n.ref,n!=null&&n.onConnect&&(s(this,w).add(n.onConnect),delete n.onConnect),n!=null&&n.onDisconnect&&(s(this,d).add(n.onDisconnect),delete n.onDisconnect);let o,u;for(const l in n){const h=n[l];l==="class"&&r?c(this,g,W).call(this,h):l==="style"&&r?c(this,A,ie).call(this,h):l==="lightChildren"?c(this,p,k).call(this,s(this,a),h):l==="children"?c(this,p,k).call(this,s(this,a)instanceof Element?s(this,a).shadowRoot||s(this,a):s(this,a),h):l.startsWith("on")?(u||(u={}),u[l]=h):(o||(o={}),o[l]=h)}if(c(this,F,ue).call(this,o),c(this,D,se).call(this,u),i&&(typeof i=="function"?i(s(this,a)):i.current=s(this,a)),pe.isBrowser&&(s(this,d).size||s(this,w).size)){const l=s(this,a)instanceof DocumentFragment?s(this,a).firstChild:s(this,a);ge.connector.subscribe(l,{connectCallback:s(this,B),disconnectCallback:s(this,G),unsubscribeAfterDisconnect:!0,maxWaitSec:20})}},g=new WeakSet,W=function(n){const r=s(this,a);if(n){if(typeof n=="string")r.classList.add(n);else if(Array.isArray(n))n.forEach(i=>{c(this,g,W).call(this,i)});else if(typeof n=="object")if(n instanceof m.Store)c(this,x,te).call(this,n);else for(const i in n){const o=n[i];o instanceof m.Store?c(this,q,re).call(this,i,o):o?r.classList.add(i):r.classList.remove(i)}}else return},x=new WeakSet,te=function(n){const r=s(this,a);s(this,d).add(n.subscribe(({current:i,previous:o})=>{o&&[o].flat().forEach(u=>{u&&r.classList.remove(u)}),i&&[i].flat().forEach(u=>{u&&r.classList.add(u)})}))},q=new WeakSet,re=function(n,r){const i=s(this,a);s(this,d).add(r.subscribe(({current:o})=>{o?i.classList.add(n):i.classList.remove(n)}))},A=new WeakSet,ie=function(n){if(!n)return;const r=s(this,a);r.tagName==="style"||r.tagName==="STYLE"?c(this,b,J).call(this,n):c(this,M,oe).call(this,n)},M=new WeakSet,oe=function(n){for(const r in n){const i=r,o=n[i];o instanceof m.Store?s(this,d).add(o.subscribe(({current:u})=>{c(this,y,z).call(this,i,u)})):c(this,y,z).call(this,i,o)}},b=new WeakSet,J=function(n){const r=s(this,a);for(const i in n){const o=n[i];if(typeof o=="object"&&!(o instanceof m.Store))r.appendChild(new Text(`${i} {`)),c(this,b,J).call(this,o),r.appendChild(new Text("}"));else if(o instanceof m.Store){const u=new Text;s(this,d).add(o.subscribe(l=>{l.current?u.nodeValue=`${O.camelToKebab(i)}: ${l.current};`:u.nodeValue=""})),r.appendChild(u)}else r.appendChild(new Text(`${O.camelToKebab(i)}: ${o};`))}},y=new WeakSet,z=function(n,r){const i=s(this,a);n.includes("--")?r?i.style.setProperty(n,r):i.style.removeProperty(n):r?i.style[n]=r:i.style[n]=""},D=new WeakSet,se=function(n){if(!n)return;const r=s(this,a);for(const i in n){const o=i,u=o.split("on").slice(1).map((h,ae)=>ae===0?h.toLocaleLowerCase():h).join("on"),l=n[o];typeof l=="object"?r.addEventListener(u,l.callback,l.options):typeof l=="function"&&r.addEventListener(u,l)}},F=new WeakSet,ue=function(n){for(const r in n){const i=n[r];i instanceof m.Store?s(this,d).add(i.subscribe(({current:o})=>{c(this,S,K).call(this,r,o)})):c(this,S,K).call(this,r,i)}},S=new WeakSet,K=function(n,r){var o,u;const i=s(this,a);n in i&&!((u=(o=i.constructor)==null?void 0:o.observedAttributes)!=null&&u.includes(n))?r!=null&&(i[n]=r.toString()):r!=null&&i.setAttribute(n,r.toString())},p=new WeakSet,k=function(n,r){r&&(r=[r].flat(),r.forEach(i=>{if(i instanceof m.Store){const o=document.createElement("div");o.style.display="contents",n.appendChild(o),s(this,d).add(i.subscribe(({current:u})=>{c(this,P,fe).call(this,o,c(this,H,ce).call(this,u),Array.from(o.childNodes))}))}else if(i instanceof V)c(this,E,Y).call(this,n,i.node);else if(i instanceof Function)c(this,p,k).call(this,n,i());else{const o=c(this,L,U).call(this,i);o instanceof Node&&c(this,E,Y).call(this,n,o)}}))},E=new WeakSet,Y=function(n,r){!(n instanceof ShadowRoot)&&r instanceof HTMLElement&&r.tagName==="STYLE"?(s(this,w).add(()=>{[...document.head.querySelectorAll("style")].find(o=>o.outerHTML===r.outerHTML)||document.head.appendChild(r)}),s(this,d).add(()=>{r.remove()})):n.appendChild(r)},H=new WeakSet,ce=function(n){return[n].flat().map(i=>i instanceof V?i.node:c(this,L,U).call(this,i)).flat().filter(Boolean)},P=new WeakSet,fe=function(n,r,i){i.length>r.length&&i.forEach(o=>{r.find(u=>c(this,v,I).call(this,o,u))||(n.removeChild(o),i=i.filter(u=>u!==o))}),i.forEach((o,u)=>{if(u<r.length){const l=r[u];c(this,v,I).call(this,o,l)||n.replaceChild(l,o)}else n.removeChild(o)});for(let o=i.length;o<r.length;o++)n.appendChild(r[o])},v=new WeakSet,I=function(n,r){return r?r instanceof Node?n.isEqualNode(r):n.textContent===r.toString():!1},L=new WeakSet,U=function(n){if(n instanceof Node)return n;if(n!=null){const r=String(n);if(r.trim().startsWith("<")&&r.trim().endsWith(">")){const i=document.createElement("div");return i.innerHTML=r,i.firstElementChild}else return new Text(r)}else return},B=new WeakMap,G=new WeakMap;let t=V;function ye(...e){return new t(...e)}function Se(e){return new t("a",e)}function Ee(e){return new t("abbr",e)}function ve(e){return new t("address",e)}function Le(e){return new t("area",e)}function ke(e){return new t("article",e)}function Te(e){return new t("aside",e)}function Ce(e){return new t("audio",e)}function Ne(e){return new t("b",e)}function xe(e){return new t("base",e)}function qe(e){return new t("bdi",e)}function Ae(e){return new t("bdo",e)}function Me(e){return new t("blockquote",e)}function De(e){return new t("body",e)}function Fe(e){return new t("br",e)}function He(e){return new t("button",e)}function Pe(e){return new t("canvas",e)}function Be(e){return new t("caption",e)}function Ge(e){return new t("cite",e)}function Ve(e){return new t("code",e)}function $e(e){return new t("col",e)}function Re(e){return new t("colgroup",e)}function We(e){return new t("data",e)}function Je(e){return new t("datalist",e)}function ze(e){return new t("dd",e)}function Ke(e){return new t("del",e)}function Ye(e){return new t("details",e)}function Ie(e){return new t("dfn",e)}function Ue(e){return new t("dialog",e)}function Qe(e){return new t("div",e)}function Xe(e){return new t("dl",e)}function Ze(e){return new t("dt",e)}function _e(e){return new t("em",e)}function Oe(e){return new t("embed",e)}function je(e){return new t("fieldset",e)}function en(e){return new t("figcaption",e)}function nn(e){return new t("figure",e)}function tn(e){return new t("footer",e)}function rn(e){return new t("form",e)}function on(e){return new t("h1",e)}function sn(e){return new t("h2",e)}function un(e){return new t("h3",e)}function cn(e){return new t("h4",e)}function fn(e){return new t("h5",e)}function an(e){return new t("h6",e)}function ln(e){return new t("head",e)}function dn(e){return new t("header",e)}function hn(e){return new t("hgroup",e)}function wn(e){return new t("hr",e)}function mn(e){return new t("html",e)}function pn(e){return new t("i",e)}function gn(e){return new t("iframe",e)}function bn(e){return new t("img",e)}function yn(e){return new t("input",e)}function Sn(e){return new t("ins",e)}function En(e){return new t("kbd",e)}function vn(e){return new t("label",e)}function Ln(e){return new t("legend",e)}function kn(e){return new t("li",e)}function Tn(e){return new t("link",e)}function Cn(e){return new t("main",e)}function Nn(e){return new t("map",e)}function xn(e){return new t("mark",e)}function qn(e){return new t("menu",e)}function An(e){return new t("meta",e)}function Mn(e){return new t("meter",e)}function Dn(e){return new t("nav",e)}function Fn(e){return new t("noscript",e)}function Hn(e){return new t("object",e)}function Pn(e){return new t("ol",e)}function Bn(e){return new t("optgroup",e)}function Gn(e){return new t("option",e)}function Vn(e){return new t("output",e)}function $n(e){return new t("p",e)}function Rn(e){return new t("picture",e)}function Wn(e){return new t("pre",e)}function Jn(e){return new t("progress",e)}function zn(e){return new t("q",e)}function Kn(e){return new t("rp",e)}function Yn(e){return new t("rt",e)}function In(e){return new t("ruby",e)}function Un(e){return new t("s",e)}function Qn(e){return new t("samp",e)}function Xn(e){return new t("script",e)}function Zn(e){return new t("search",e)}function _n(e){return new t("section",e)}function On(e){return new t("select",e)}function jn(e){return new t("slot",e)}function et(e){return new t("small",e)}function nt(e){return new t("source",e)}function tt(e){return new t("span",e)}function rt(e){return new t("strong",e)}function it(e){return new t("style",{style:e})}function ot(e){return new t("sub",e)}function st(e){return new t("summary",e)}function ut(e){return new t("sup",e)}function ct(e){return new t("table",e)}function ft(e){return new t("tbody",e)}function at(e){return new t("td",e)}function lt(e){return new t("template",e)}function dt(e){return new t("textarea",e)}function ht(e){return new t("tfoot",e)}function wt(e){return new t("th",e)}function mt(e){return new t("thead",e)}function pt(e){return new t("time",e)}function gt(e){return new t("title",e)}function bt(e){return new t("tr",e)}function yt(e){return new t("track",e)}function St(e){return new t("u",e)}function Et(e){return new t("ul",e)}function vt(e){return new t("var",e)}function Lt(e){return new t("video",e)}function kt(e){return new t("wbr",e)}function Tt(e){return new t(document.createDocumentFragment(),e)}function Ct(e){return new t(document.createTextNode(""),e)}function Nt(e){return new t("div",Z($({},e),{style:$({display:"contents"},e==null?void 0:e.style)}))}exports.ElementConstructor=t;exports.a=Se;exports.abbr=Ee;exports.address=ve;exports.area=Le;exports.article=ke;exports.aside=Te;exports.audio=Ce;exports.b=Ne;exports.base=xe;exports.bdi=qe;exports.bdo=Ae;exports.blockquote=Me;exports.body=De;exports.br=Fe;exports.button=He;exports.canvas=Pe;exports.caption=Be;exports.cite=Ge;exports.code=Ve;exports.col=$e;exports.colgroup=Re;exports.contents=Nt;exports.data=We;exports.datalist=Je;exports.dd=ze;exports.del=Ke;exports.details=Ye;exports.dfn=Ie;exports.dialog=Ue;exports.div=Qe;exports.dl=Xe;exports.dt=Ze;exports.element=ye;exports.em=_e;exports.embed=Oe;exports.empty=Ct;exports.fieldset=je;exports.figcaption=en;exports.figure=nn;exports.footer=tn;exports.form=rn;exports.fragment=Tt;exports.h1=on;exports.h2=sn;exports.h3=un;exports.h4=cn;exports.h5=fn;exports.h6=an;exports.head=ln;exports.header=dn;exports.hgroup=hn;exports.hr=wn;exports.html=mn;exports.htmlVar=vt;exports.i=pn;exports.iframe=gn;exports.img=bn;exports.input=yn;exports.ins=Sn;exports.kbd=En;exports.label=vn;exports.legend=Ln;exports.li=kn;exports.link=Tn;exports.main=Cn;exports.map=Nn;exports.mark=xn;exports.menu=qn;exports.meta=An;exports.meter=Mn;exports.nav=Dn;exports.noscript=Fn;exports.object=Hn;exports.ol=Pn;exports.optgroup=Bn;exports.option=Gn;exports.output=Vn;exports.p=$n;exports.picture=Rn;exports.pre=Wn;exports.progress=Jn;exports.q=zn;exports.rp=Kn;exports.rt=Yn;exports.ruby=In;exports.s=Un;exports.samp=Qn;exports.script=Xn;exports.search=Zn;exports.section=_n;exports.select=On;exports.slot=jn;exports.small=et;exports.source=nt;exports.span=tt;exports.strong=rt;exports.style=it;exports.sub=ot;exports.summary=st;exports.sup=ut;exports.table=ct;exports.tbody=ft;exports.td=at;exports.template=lt;exports.textarea=dt;exports.tfoot=ht;exports.th=wt;exports.thead=mt;exports.time=pt;exports.title=gt;exports.tr=bt;exports.track=yt;exports.u=St;exports.ul=Et;exports.video=Lt;exports.wbr=kt;
|