aptechka 0.4.7 → 0.4.9
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/DragControls-CuGSxr1d.js +137 -0
- package/lib/DragControls-Dfbbq8Wb.cjs +1 -0
- package/lib/canvas/index.cjs +1 -1
- package/lib/canvas/index.js +2 -2
- package/lib/checkbox/index.cjs +1 -1
- package/lib/checkbox/index.js +2 -2
- package/lib/controls/Controls.d.ts +1 -1
- package/lib/controls/DragControls.d.ts +16 -0
- package/lib/controls/index.cjs +1 -1
- package/lib/controls/index.d.ts +1 -0
- package/lib/controls/index.js +10 -9
- package/lib/{createStylesheet-DrkbCUJk.js → createStylesheet-D6C3BPkl.js} +1 -1
- package/lib/{createStylesheet-u1ZQ2BI5.cjs → createStylesheet-W0b965g0.cjs} +1 -1
- package/lib/{createTheme-D0IoYkYN.js → createTheme-CHnsCgAr.js} +1 -1
- package/lib/{createTheme-B_W5dUY9.cjs → createTheme-Cfaw9UmV.cjs} +1 -1
- package/lib/element-constructor/index.cjs +1 -1
- package/lib/element-constructor/index.js +3 -3
- package/lib/en3/index.cjs +2 -2
- package/lib/en3/index.js +3 -1
- package/lib/index-C_qv6rk4.cjs +9 -0
- package/lib/{index-BigQay-N.js → index-ilQWX_BM.js} +68 -68
- package/lib/modal/index.cjs +1 -1
- package/lib/modal/index.js +2 -2
- package/lib/order/index.cjs +1 -1
- package/lib/order/index.d.ts +2 -1
- package/lib/order/index.js +2 -2
- package/lib/popover/index.cjs +1 -1
- package/lib/popover/index.js +2 -2
- package/lib/scroll/ScrollElement.d.ts +4 -2
- package/lib/scroll/ScrollSegmentElement.d.ts +68 -0
- package/lib/scroll/index.cjs +1 -1
- package/lib/scroll/index.d.ts +2 -1
- package/lib/scroll/index.js +715 -340
- package/lib/scroll-entries/index.cjs +1 -1
- package/lib/scroll-entries/index.d.ts +2 -2
- package/lib/scroll-entries/index.js +27 -36
- package/lib/select/index.cjs +1 -1
- package/lib/select/index.js +1 -1
- package/lib/slicer/index.cjs +1 -1
- package/lib/slicer/index.js +1 -1
- package/lib/string-DhgS_iFl.cjs +1 -0
- package/lib/{string-3lAkpJJP.js → string-f0Dnk0L1.js} +9 -5
- package/lib/tags-CK7mk_EP.cjs +1 -0
- package/lib/{tags-CAxO5Rs3.js → tags-D0zt3vue.js} +38 -36
- package/lib/theme/index.cjs +1 -1
- package/lib/theme/index.js +2 -2
- package/lib/tweaker/index.cjs +1 -1
- package/lib/tweaker/index.js +3 -3
- package/lib/utils/index.cjs +1 -1
- package/lib/utils/index.d.ts +1 -1
- package/lib/utils/index.js +43 -42
- package/lib/utils/string.d.ts +1 -0
- package/package.json +9 -11
- package/lib/WheelControls-0zNcnAB3.cjs +0 -1
- package/lib/WheelControls-BAyRKpRZ.js +0 -97
- package/lib/index-DTrWxWOM.cjs +0 -9
- package/lib/string-vBu90jhV.cjs +0 -1
- package/lib/tags-Dz_Yisj_.cjs +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var o=(
|
|
1
|
+
"use strict";var o=(s,t,r)=>{if(!t.has(s))throw TypeError("Cannot "+r)};var e=(s,t,r)=>(o(s,t,"read from private field"),r?r.call(s):t.get(s)),h=(s,t,r)=>{if(t.has(s))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(s):t.set(s,r)};Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("../dom-JBOkFLTh.cjs");var l,i;class c{constructor(){h(this,l,new Set);h(this,i,new WeakMap)}register(t){e(this,i).set(t,{axis:"y",value:0,element:t}),e(this,l).add(t)}unregister(t){e(this,i).delete(t),e(this,l).delete(t)}update(t,r,a){const n=e(this,i).get(t);n.axis=r,n.value=a}hasEntry(t){return e(this,i).has(t)}getEntry(t){return e(this,i).get(t)}getAll(t){const r=u.getAllParentElements(t).filter(n=>e(this,l).has(n)),a=[];return r.forEach(n=>{e(this,i).has(n)&&a.push(e(this,i).get(n))}),a}}l=new WeakMap,i=new WeakMap;const g=new c;exports.scrollEntries=g;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { Axes2D } from '../utils';
|
|
2
2
|
|
|
3
|
-
interface ScrollEntry {
|
|
3
|
+
export interface ScrollEntry {
|
|
4
4
|
axis: Axes2D;
|
|
5
5
|
value: number;
|
|
6
|
+
element: HTMLElement;
|
|
6
7
|
}
|
|
7
8
|
declare class ScrollEntries {
|
|
8
9
|
#private;
|
|
@@ -11,7 +12,6 @@ declare class ScrollEntries {
|
|
|
11
12
|
update(element: HTMLElement, axis: Axes2D, value: number): void;
|
|
12
13
|
hasEntry(element: HTMLElement): boolean;
|
|
13
14
|
getEntry(element: HTMLElement): ScrollEntry;
|
|
14
|
-
getClosest(element: HTMLElement): ScrollEntry | null;
|
|
15
15
|
getAll(element: HTMLElement): ScrollEntry[];
|
|
16
16
|
}
|
|
17
17
|
export declare const scrollEntries: ScrollEntries;
|
|
@@ -1,57 +1,48 @@
|
|
|
1
|
-
var o = (
|
|
2
|
-
if (!t.has(
|
|
3
|
-
throw TypeError("Cannot " +
|
|
1
|
+
var o = (s, t, r) => {
|
|
2
|
+
if (!t.has(s))
|
|
3
|
+
throw TypeError("Cannot " + r);
|
|
4
4
|
};
|
|
5
|
-
var
|
|
6
|
-
if (t.has(
|
|
5
|
+
var e = (s, t, r) => (o(s, t, "read from private field"), r ? r.call(s) : t.get(s)), l = (s, t, r) => {
|
|
6
|
+
if (t.has(s))
|
|
7
7
|
throw TypeError("Cannot add the same private member more than once");
|
|
8
|
-
t instanceof WeakSet ? t.add(
|
|
8
|
+
t instanceof WeakSet ? t.add(s) : t.set(s, r);
|
|
9
9
|
};
|
|
10
10
|
import { a as u } from "../dom-0S_WDL4g.js";
|
|
11
|
-
var a,
|
|
12
|
-
class
|
|
11
|
+
var a, i;
|
|
12
|
+
class c {
|
|
13
13
|
constructor() {
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
l(this, a, /* @__PURE__ */ new Set());
|
|
15
|
+
l(this, i, /* @__PURE__ */ new WeakMap());
|
|
16
16
|
}
|
|
17
17
|
register(t) {
|
|
18
|
-
|
|
18
|
+
e(this, i).set(t, {
|
|
19
19
|
axis: "y",
|
|
20
|
-
value: 0
|
|
21
|
-
|
|
20
|
+
value: 0,
|
|
21
|
+
element: t
|
|
22
|
+
}), e(this, a).add(t);
|
|
22
23
|
}
|
|
23
24
|
unregister(t) {
|
|
24
|
-
|
|
25
|
+
e(this, i).delete(t), e(this, a).delete(t);
|
|
25
26
|
}
|
|
26
|
-
update(t,
|
|
27
|
-
const
|
|
28
|
-
|
|
27
|
+
update(t, r, h) {
|
|
28
|
+
const n = e(this, i).get(t);
|
|
29
|
+
n.axis = r, n.value = h;
|
|
29
30
|
}
|
|
30
31
|
hasEntry(t) {
|
|
31
|
-
return
|
|
32
|
+
return e(this, i).has(t);
|
|
32
33
|
}
|
|
33
34
|
getEntry(t) {
|
|
34
|
-
return
|
|
35
|
-
}
|
|
36
|
-
getClosest(t) {
|
|
37
|
-
let e = t.parentElement;
|
|
38
|
-
for (; e && !this.hasEntry(e); )
|
|
39
|
-
e = e.parentElement;
|
|
40
|
-
if (e && e !== t) {
|
|
41
|
-
const i = this.getEntry(e);
|
|
42
|
-
return i || this.getClosest(e);
|
|
43
|
-
}
|
|
44
|
-
return null;
|
|
35
|
+
return e(this, i).get(t);
|
|
45
36
|
}
|
|
46
37
|
getAll(t) {
|
|
47
|
-
const
|
|
48
|
-
return
|
|
49
|
-
|
|
50
|
-
}),
|
|
38
|
+
const r = u(t).filter((n) => e(this, a).has(n)), h = [];
|
|
39
|
+
return r.forEach((n) => {
|
|
40
|
+
e(this, i).has(n) && h.push(e(this, i).get(n));
|
|
41
|
+
}), h;
|
|
51
42
|
}
|
|
52
43
|
}
|
|
53
|
-
a = new WeakMap(),
|
|
54
|
-
const
|
|
44
|
+
a = new WeakMap(), i = new WeakMap();
|
|
45
|
+
const d = new c();
|
|
55
46
|
export {
|
|
56
|
-
|
|
47
|
+
d as scrollEntries
|
|
57
48
|
};
|
package/lib/select/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../index-C_qv6rk4.cjs");Object.defineProperty(exports,"SelectElement",{enumerable:!0,get:()=>e.SelectElement});Object.defineProperty(exports,"SelectHeadElement",{enumerable:!0,get:()=>e.SelectHeadElement});Object.defineProperty(exports,"SelectOptionElement",{enumerable:!0,get:()=>e.SelectOptionElement});exports.SelectUserElement=e.SelectUserElement;
|
package/lib/select/index.js
CHANGED
package/lib/slicer/index.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";var L=(n,t,e)=>{if(!t.has(n))throw TypeError("Cannot "+e)};var i=(n,t,e)=>(L(n,t,"read from private field"),e?e.call(n):t.get(n)),p=(n,t,e)=>{if(t.has(n))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(n):t.set(n,e)},d=(n,t,e,s)=>(L(n,t,"write to private field"),s?s.call(n,e):t.set(n,e),e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const P=require("../custom-element/index.cjs"),$=require("../string-
|
|
1
|
+
"use strict";var L=(n,t,e)=>{if(!t.has(n))throw TypeError("Cannot "+e)};var i=(n,t,e)=>(L(n,t,"read from private field"),e?e.call(n):t.get(n)),p=(n,t,e)=>{if(t.has(n))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(n):t.set(n,e)},d=(n,t,e,s)=>(L(n,t,"write to private field"),s?s.call(n,e):t.set(n,e),e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const P=require("../custom-element/index.cjs"),$=require("../string-DhgS_iFl.cjs");var w,h,f;class T{constructor(t){p(this,w,void 0);p(this,h,void 0);p(this,f,void 0);d(this,w,t.index),d(this,h,document.createElement("span")),d(this,f,[]),t.letters&&t.letterConstructor&&t.lettersAcc!==void 0?(d(this,f,t.text.split("").map((e,s)=>new t.letterConstructor({index:t.lettersAcc+s,text:e,clone:t.clone}))),i(this,h).append(...i(this,f).map(e=>e.element))):t.clone?i(this,h).innerHTML=`
|
|
2
2
|
<span class="original">${t.text}</span>
|
|
3
3
|
<span class="clone" aria-hidden>${t.text}</span>
|
|
4
4
|
`:i(this,h).innerHTML=`
|
package/lib/slicer/index.js
CHANGED
|
@@ -8,7 +8,7 @@ var i = (e, t, s) => (A(e, t, "read from private field"), s ? s.call(e) : t.get(
|
|
|
8
8
|
t instanceof WeakSet ? t.add(e) : t.set(e, s);
|
|
9
9
|
}, c = (e, t, s, n) => (A(e, t, "write to private field"), n ? n.call(e, s) : t.set(e, s), s);
|
|
10
10
|
import { CustomElement as S, define as T } from "../custom-element/index.js";
|
|
11
|
-
import { g as W } from "../string-
|
|
11
|
+
import { g as W } from "../string-f0Dnk0L1.js";
|
|
12
12
|
var y, h, f;
|
|
13
13
|
class D {
|
|
14
14
|
constructor(t) {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";function u(e,t=!1){let a="";return e.split("-").forEach((n,i)=>{if(i===0&&!t)a+=n;else{const r=n[0],s=n.slice(1),l=r.toUpperCase()+s;a+=l}}),a}function p(e){return e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function f(e){return e.split("_").join(".")}function d(e){return/^[a-z\d]+$/i.test(e)?e.charAt(0).toUpperCase()+e.slice(1):e.replace(/([a-z\d])([a-z\d]*)/gi,(t,a,n)=>a.toUpperCase()+n.toLowerCase()).replace(/[^a-z\d]/gi,"")}function o(e,t){return e.slice(0,1)[t]()+e.slice(1)}function c(e,t=!1,a){return t?e.split(" ").map(n=>o(n,a)).join(" "):o(e,a)}function z(e,t=!1){return c(e,t,"toUpperCase")}function C(e,t=!1){return c(e,t,"toLowerCase")}function b(e,t="abcdefghijklmnopqrstuvwxyz0123456789"){const a=t.length,n=crypto.getRandomValues(new Uint8Array(e));let i="";for(let r=0;r<e;r++)i+=t.charAt(n[r]%a);return i}function g(e){return new RegExp("^\\p{Lu}","u").test(e)}exports.camelToKebab=p;exports.capitalize=z;exports.generateId=b;exports.isUppercase=g;exports.kebabToCamel=u;exports.snakeToDotted=f;exports.toPascalCase=d;exports.uncapitalize=C;
|
|
@@ -21,17 +21,17 @@ function d(e) {
|
|
|
21
21
|
(t, a, n) => a.toUpperCase() + n.toLowerCase()
|
|
22
22
|
).replace(/[^a-z\d]/gi, "");
|
|
23
23
|
}
|
|
24
|
-
function
|
|
24
|
+
function i(e, t) {
|
|
25
25
|
return e.slice(0, 1)[t]() + e.slice(1);
|
|
26
26
|
}
|
|
27
|
-
function
|
|
28
|
-
return t ? e.split(" ").map((n) =>
|
|
27
|
+
function o(e, t = !1, a) {
|
|
28
|
+
return t ? e.split(" ").map((n) => i(n, a)).join(" ") : i(e, a);
|
|
29
29
|
}
|
|
30
30
|
function z(e, t = !1) {
|
|
31
|
-
return
|
|
31
|
+
return o(e, t, "toUpperCase");
|
|
32
32
|
}
|
|
33
33
|
function C(e, t = !1) {
|
|
34
|
-
return
|
|
34
|
+
return o(e, t, "toLowerCase");
|
|
35
35
|
}
|
|
36
36
|
function g(e, t = "abcdefghijklmnopqrstuvwxyz0123456789") {
|
|
37
37
|
const a = t.length, n = crypto.getRandomValues(new Uint8Array(e));
|
|
@@ -40,10 +40,14 @@ function g(e, t = "abcdefghijklmnopqrstuvwxyz0123456789") {
|
|
|
40
40
|
s += t.charAt(n[r] % a);
|
|
41
41
|
return s;
|
|
42
42
|
}
|
|
43
|
+
function y(e) {
|
|
44
|
+
return new RegExp("^\\p{Lu}", "u").test(e);
|
|
45
|
+
}
|
|
43
46
|
export {
|
|
44
47
|
z as a,
|
|
45
48
|
f as c,
|
|
46
49
|
g,
|
|
50
|
+
y as i,
|
|
47
51
|
u as k,
|
|
48
52
|
p as s,
|
|
49
53
|
d as t,
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var Le=Object.defineProperty,qe=Object.defineProperties;var xe=Object.getOwnPropertyDescriptors;var de=Object.getOwnPropertySymbols;var Ae=Object.prototype.hasOwnProperty,Me=Object.prototype.propertyIsEnumerable;var he=(e,t,r)=>t in e?Le(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,_=(e,t)=>{for(var r in t||(t={}))Ae.call(t,r)&&he(e,r,t[r]);if(de)for(var r of de(t))Me.call(t,r)&&he(e,r,t[r]);return e},me=(e,t)=>qe(e,xe(t));var O=(e,t,r)=>{if(!t.has(e))throw TypeError("Cannot "+r)};var o=(e,t,r)=>(O(e,t,"read from private field"),r?r.call(e):t.get(e)),a=(e,t,r)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,r)},g=(e,t,r,i)=>(O(e,t,"write to private field"),i?i.call(e,r):t.set(e,r),r);var c=(e,t,r)=>(O(e,t,"access private method"),r);const y=require("./Store-C-1ruEIm.cjs"),we=require("./browser-CpzFX2xg.cjs"),pe=require("./object-BZELAoVj.cjs"),j=require("./string-DhgS_iFl.cjs"),De=require("./connector/index.cjs"),Fe=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 u,b,l,N,h,m,B,be,R,ge,$,ye,k,ee,T,te,G,Ee,V,Se,W,Ce,z,ve,L,ne,q,re,I,Ne,x,ie,A,oe,J,ke,M,se,v,P,D,ue,F,ce,H,ae,K,U;const Y=class Y{constructor(...t){a(this,B);a(this,R);a(this,$);a(this,k);a(this,T);a(this,G);a(this,V);a(this,W);a(this,z);a(this,L);a(this,q);a(this,I);a(this,x);a(this,A);a(this,J);a(this,M);a(this,v);a(this,D);a(this,F);a(this,H);a(this,u,null);a(this,b,new Set);a(this,l,new Set);a(this,N,void 0);a(this,h,void 0);a(this,m,void 0);a(this,K,()=>{o(this,b).forEach(t=>{t()}),o(this,b).clear()});a(this,U,t=>{o(this,l).forEach(r=>{r(t)}),o(this,l).clear(),c(this,A,oe).call(this)});if(we.isBrowser){const r=t[0],i=t[1];g(this,u,c(this,B,be).call(this,r,i==null?void 0:i.forceSvg)),c(this,$,ye).call(this,i)}}get node(){return o(this,u)}set node(t){var r;c(this,A,oe).call(this),g(this,u,t),(r=o(this,N))==null||r.call(this),o(this,u)instanceof Element&&g(this,h,[...o(this,u).querySelectorAll("store-root")]),c(this,x,ie).call(this),c(this,k,ee).call(this)}};u=new WeakMap,b=new WeakMap,l=new WeakMap,N=new WeakMap,h=new WeakMap,m=new WeakMap,B=new WeakSet,be=function(t,r){let i=null;if(t instanceof Node)i=t;else if(typeof t=="string")if(!t.includes("<")&&t.includes("-"))i=new(customElements.get(t));else if(t.includes("<")){const s=document.createElement("div");s.innerHTML=t,i=s.firstElementChild}else Fe.has(t)||r?i=document.createElementNS("http://www.w3.org/2000/svg",t):i=document.createElement(t);else i=document.createElement("div");return i},R=new WeakSet,ge=function(t){return t instanceof HTMLElement||t instanceof SVGElement},$=new WeakSet,ye=function(t){if(!t)return;const r=c(this,R,ge).call(this,o(this,u)),i=t.ref;delete t.ref,t!=null&&t.onConnect&&(o(this,b).add(t.onConnect),delete t.onConnect),t!=null&&t.onDisconnect&&(o(this,l).add(t.onDisconnect),delete t.onDisconnect);let s,f;for(const d in t){const w=t[d];d==="class"&&r?c(this,T,te).call(this,w):d==="style"&&r?c(this,W,Ce).call(this,w):d==="lightChildren"?c(this,v,P).call(this,o(this,u),w):d==="children"?c(this,v,P).call(this,o(this,u)instanceof Element?o(this,u).shadowRoot||o(this,u):o(this,u),w):d.startsWith("on")?(f||(f={}),f[d]=w):(s||(s={}),s[d]=w)}c(this,J,ke).call(this,s),c(this,I,Ne).call(this,f),i&&(typeof i=="function"?i(o(this,u)):i.current=o(this,u)),c(this,k,ee).call(this)},k=new WeakSet,ee=function(){if(we.isBrowser&&(o(this,l).size||o(this,b).size)){const t=o(this,u)instanceof DocumentFragment?o(this,u).firstChild:o(this,u);g(this,N,De.connector.subscribe(t,{connectCallback:o(this,K),disconnectCallback:o(this,U),unsubscribeAfterDisconnect:!0,maxWaitSec:20}))}},T=new WeakSet,te=function(t){if(t){if(typeof t=="string")o(this,u).classList.add(t);else if(Array.isArray(t))t.forEach(r=>{c(this,T,te).call(this,r)});else if(typeof t=="object")if(t instanceof y.Store)c(this,G,Ee).call(this,t);else for(const r in t){const i=t[r];i instanceof y.Store?c(this,V,Se).call(this,r,i):i?o(this,u).classList.add(r):o(this,u).classList.remove(r)}}else return},G=new WeakSet,Ee=function(t){o(this,l).add(t.subscribe(({current:r,previous:i})=>{i&&[i].flat().forEach(s=>{s&&o(this,u).classList.remove(s)}),r&&[r].flat().forEach(s=>{s&&o(this,u).classList.add(s)})}))},V=new WeakSet,Se=function(t,r){o(this,l).add(r.subscribe(({current:i})=>{i?o(this,u).classList.add(t):o(this,u).classList.remove(t)}))},W=new WeakSet,Ce=function(t){if(!t)return;o(this,u).tagName==="style"||o(this,u).tagName==="STYLE"?c(this,L,ne).call(this,t):c(this,z,ve).call(this,t)},z=new WeakSet,ve=function(t){for(const r in t){const i=r,s=t[i];s instanceof y.Store?o(this,l).add(s.subscribe(({current:f})=>{c(this,q,re).call(this,i,f)})):c(this,q,re).call(this,i,s)}},L=new WeakSet,ne=function(t){for(const r in t){const i=t[r];if(typeof i=="object"&&!(i instanceof y.Store))o(this,u).appendChild(document.createTextNode(`${r} {`)),c(this,L,ne).call(this,i),o(this,u).appendChild(document.createTextNode("}"));else if(i instanceof y.Store){const s=document.createTextNode("");o(this,l).add(i.subscribe(f=>{f.current?s.nodeValue=`${j.camelToKebab(r)}: ${f.current};`:s.nodeValue=""})),o(this,u).appendChild(s)}else o(this,u).appendChild(document.createTextNode(`${j.camelToKebab(r)}: ${i};`))}},q=new WeakSet,re=function(t,r){t.includes("--")?r?o(this,u).style.setProperty(t,r):o(this,u).style.removeProperty(t):r?o(this,u).style[t]=r:o(this,u).style[t]=""},I=new WeakSet,Ne=function(t){if(t){o(this,m)||g(this,m,[]);for(const r in t){const i=r,s=j.uncapitalize(i.split("on").slice(1).join("on")),f=t[i];typeof f=="object"?o(this,m).push({name:s,callback:f.callback,options:f.options}):typeof f=="function"&&o(this,m).push({name:s,callback:f})}c(this,x,ie).call(this)}},x=new WeakSet,ie=function(){var t;(t=o(this,m))==null||t.forEach(r=>{o(this,u).addEventListener(r.name,r.callback,r.options)})},A=new WeakSet,oe=function(){var t;(t=o(this,m))==null||t.forEach(r=>{o(this,u).removeEventListener(r.name,r.callback,r.options)})},J=new WeakSet,ke=function(t){for(const r in t){const i=t[r];i instanceof y.Store?o(this,l).add(i.subscribe(({current:s})=>{c(this,M,se).call(this,r,s)})):c(this,M,se).call(this,r,i)}},M=new WeakSet,se=function(t,r){var s,f;const i=o(this,u);t in i&&!((f=(s=i.constructor)==null?void 0:s.observedAttributes)!=null&&f.includes(t))?r!=null&&(i[t]=r.toString()):r!=null&&i.setAttribute(t,r.toString())},v=new WeakSet,P=function(t,r){r&&(r=[r].flat(),r.forEach(i=>{if(i instanceof y.Store){const s=document.createElement("div");s.style.display="contents",t.appendChild(s),o(this,h)||g(this,h,[]);const f=o(this,h).length;s.setAttribute("store-root",""),o(this,h).push(s),o(this,l).add(i.subscribe(({current:d,previous:w})=>{const E=o(this,h)[f];E.dispatchEvent(new CustomEvent("beforeChildrenChange",{bubbles:!0,composed:!0}));const Q=Array.from(E.childNodes),fe=[d].flat(),Te=[w].flat(),le=[],X=[];Te.forEach((p,S)=>{!fe.includes(p)&&Q[S]?le.push(Q[S]):X.push(p)}),fe.forEach((p,S)=>{if(X[S]){if(p!==X[S]){const C=c(this,F,ce).call(this,p),Z=Q[S];C instanceof Node?Z.isEqualNode(C)||E.replaceChild(C,Z):E.removeChild(Z)}}else{const C=c(this,F,ce).call(this,p);C instanceof Node&&s.appendChild(C)}}),le.forEach(p=>{E.removeChild(p)}),E.dispatchEvent(new CustomEvent("afterChildrenChange",{bubbles:!0,composed:!0}))}))}else if(i instanceof Y)c(this,D,ue).call(this,t,i.node);else if(i instanceof Function)c(this,v,P).call(this,t,pe.isESClass(i)?new i:i());else{const s=c(this,H,ae).call(this,i);s instanceof Node&&c(this,D,ue).call(this,t,s)}}))},D=new WeakSet,ue=function(t,r){!(t instanceof ShadowRoot)&&r instanceof HTMLElement&&r.tagName==="STYLE"?(o(this,b).add(()=>{[...document.head.querySelectorAll("style")].find(s=>s.outerHTML===r.outerHTML)||document.head.appendChild(r)}),o(this,l).add(()=>{r.remove()})):t.appendChild(r)},F=new WeakSet,ce=function(t){return t instanceof Y?t.node:typeof t=="function"?pe.isESClass(t)?new t:t():c(this,H,ae).call(this,t)},H=new WeakSet,ae=function(t){if(t instanceof Node)return t;if(t!=null){const r=String(t);if(r.trim().startsWith("<")&&r.trim().endsWith(">")){const i=document.createElement("div");return i.innerHTML=r,i.firstElementChild}else return document.createTextNode(r)}else return},K=new WeakMap,U=new WeakMap;let n=Y;function He(...e){return new n(...e)}function Pe(e){return new n("a",e)}function Be(e){return new n("abbr",e)}function Re(e){return new n("address",e)}function $e(e){return new n("area",e)}function Ge(e){return new n("article",e)}function Ve(e){return new n("aside",e)}function We(e){return new n("audio",e)}function ze(e){return new n("b",e)}function Ie(e){return new n("base",e)}function Je(e){return new n("bdi",e)}function Ke(e){return new n("bdo",e)}function Ue(e){return new n("blockquote",e)}function Ye(e){return new n("body",e)}function Qe(e){return new n("br",e)}function Xe(e){return new n("button",e)}function Ze(e){return new n("canvas",e)}function _e(e){return new n("caption",e)}function Oe(e){return new n("cite",e)}function je(e){return new n("code",e)}function et(e){return new n("col",e)}function tt(e){return new n("colgroup",e)}function nt(e){return new n("data",e)}function rt(e){return new n("datalist",e)}function it(e){return new n("dd",e)}function ot(e){return new n("del",e)}function st(e){return new n("details",e)}function ut(e){return new n("dfn",e)}function ct(e){return new n("dialog",e)}function at(e){return new n("div",e)}function ft(e){return new n("dl",e)}function lt(e){return new n("dt",e)}function dt(e){return new n("em",e)}function ht(e){return new n("embed",e)}function mt(e){return new n("fieldset",e)}function wt(e){return new n("figcaption",e)}function pt(e){return new n("figure",e)}function bt(e){return new n("footer",e)}function gt(e){return new n("form",e)}function yt(e){return new n("h1",e)}function Et(e){return new n("h2",e)}function St(e){return new n("h3",e)}function Ct(e){return new n("h4",e)}function vt(e){return new n("h5",e)}function Nt(e){return new n("h6",e)}function kt(e){return new n("head",e)}function Tt(e){return new n("header",e)}function Lt(e){return new n("hgroup",e)}function qt(e){return new n("hr",e)}function xt(e){return new n("html",e)}function At(e){return new n("i",e)}function Mt(e){return new n("iframe",e)}function Dt(e){return new n("img",e)}function Ft(e){return new n("input",e)}function Ht(e){return new n("ins",e)}function Pt(e){return new n("kbd",e)}function Bt(e){return new n("label",e)}function Rt(e){return new n("legend",e)}function $t(e){return new n("li",e)}function Gt(e){return new n("link",e)}function Vt(e){return new n("main",e)}function Wt(e){return new n("map",e)}function zt(e){return new n("mark",e)}function It(e){return new n("menu",e)}function Jt(e){return new n("meta",e)}function Kt(e){return new n("meter",e)}function Ut(e){return new n("nav",e)}function Yt(e){return new n("noscript",e)}function Qt(e){return new n("object",e)}function Xt(e){return new n("ol",e)}function Zt(e){return new n("optgroup",e)}function _t(e){return new n("option",e)}function Ot(e){return new n("output",e)}function jt(e){return new n("p",e)}function en(e){return new n("picture",e)}function tn(e){return new n("pre",e)}function nn(e){return new n("progress",e)}function rn(e){return new n("q",e)}function on(e){return new n("rp",e)}function sn(e){return new n("rt",e)}function un(e){return new n("ruby",e)}function cn(e){return new n("s",e)}function an(e){return new n("samp",e)}function fn(e){return new n("script",e)}function ln(e){return new n("search",e)}function dn(e){return new n("section",e)}function hn(e){return new n("select",e)}function mn(e){return new n("slot",e)}function wn(e){return new n("small",e)}function pn(e){return new n("source",e)}function bn(e){return new n("span",e)}function gn(e){return new n("strong",e)}function yn(e){return new n("style",{style:e})}function En(e){return new n("sub",e)}function Sn(e){return new n("summary",e)}function Cn(e){return new n("sup",e)}function vn(e){return new n("table",e)}function Nn(e){return new n("tbody",e)}function kn(e){return new n("td",e)}function Tn(e){return new n("template",e)}function Ln(e){return new n("textarea",e)}function qn(e){return new n("tfoot",e)}function xn(e){return new n("th",e)}function An(e){return new n("thead",e)}function Mn(e){return new n("time",e)}function Dn(e){return new n("title",e)}function Fn(e){return new n("tr",e)}function Hn(e){return new n("track",e)}function Pn(e){return new n("u",e)}function Bn(e){return new n("ul",e)}function Rn(e){return new n("var",e)}function $n(e){return new n("video",e)}function Gn(e){return new n("wbr",e)}function Vn(e){return new n(document.createDocumentFragment(),e)}function Wn(e){return new n(document.createTextNode(""),e)}function zn(e){return new n("div",me(_({},e),{style:_({display:"contents"},e==null?void 0:e.style)}))}exports.ElementConstructor=n;exports.a=Pe;exports.abbr=Be;exports.address=Re;exports.area=$e;exports.article=Ge;exports.aside=Ve;exports.audio=We;exports.b=ze;exports.base=Ie;exports.bdi=Je;exports.bdo=Ke;exports.blockquote=Ue;exports.body=Ye;exports.br=Qe;exports.button=Xe;exports.canvas=Ze;exports.caption=_e;exports.cite=Oe;exports.code=je;exports.col=et;exports.colgroup=tt;exports.contents=zn;exports.data=nt;exports.datalist=rt;exports.dd=it;exports.del=ot;exports.details=st;exports.dfn=ut;exports.dialog=ct;exports.div=at;exports.dl=ft;exports.dt=lt;exports.element=He;exports.em=dt;exports.embed=ht;exports.empty=Wn;exports.fieldset=mt;exports.figcaption=wt;exports.figure=pt;exports.footer=bt;exports.form=gt;exports.fragment=Vn;exports.h1=yt;exports.h2=Et;exports.h3=St;exports.h4=Ct;exports.h5=vt;exports.h6=Nt;exports.head=kt;exports.header=Tt;exports.hgroup=Lt;exports.hr=qt;exports.html=xt;exports.htmlVar=Rn;exports.i=At;exports.iframe=Mt;exports.img=Dt;exports.input=Ft;exports.ins=Ht;exports.kbd=Pt;exports.label=Bt;exports.legend=Rt;exports.li=$t;exports.link=Gt;exports.main=Vt;exports.map=Wt;exports.mark=zt;exports.menu=It;exports.meta=Jt;exports.meter=Kt;exports.nav=Ut;exports.noscript=Yt;exports.object=Qt;exports.ol=Xt;exports.optgroup=Zt;exports.option=_t;exports.output=Ot;exports.p=jt;exports.picture=en;exports.pre=tn;exports.progress=nn;exports.q=rn;exports.rp=on;exports.rt=sn;exports.ruby=un;exports.s=cn;exports.samp=an;exports.script=fn;exports.search=ln;exports.section=dn;exports.select=hn;exports.slot=mn;exports.small=wn;exports.source=pn;exports.span=bn;exports.strong=gn;exports.style=yn;exports.sub=En;exports.summary=Sn;exports.sup=Cn;exports.table=vn;exports.tbody=Nn;exports.td=kn;exports.template=Tn;exports.textarea=Ln;exports.tfoot=qn;exports.th=xn;exports.thead=An;exports.time=Mn;exports.title=Dn;exports.tr=Fn;exports.track=Hn;exports.u=Pn;exports.ul=Bn;exports.video=$n;exports.wbr=Gn;
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
1
|
+
var Te = Object.defineProperty, Ae = Object.defineProperties;
|
|
2
|
+
var xe = Object.getOwnPropertyDescriptors;
|
|
3
3
|
var le = Object.getOwnPropertySymbols;
|
|
4
|
-
var
|
|
5
|
-
var de = (e, n, s) => n in e ?
|
|
4
|
+
var Me = Object.prototype.hasOwnProperty, De = Object.prototype.propertyIsEnumerable;
|
|
5
|
+
var de = (e, n, s) => n in e ? Te(e, n, { enumerable: !0, configurable: !0, writable: !0, value: s }) : e[n] = s, _ = (e, n) => {
|
|
6
6
|
for (var s in n || (n = {}))
|
|
7
|
-
|
|
7
|
+
Me.call(n, s) && de(e, s, n[s]);
|
|
8
8
|
if (le)
|
|
9
9
|
for (var s of le(n))
|
|
10
|
-
|
|
10
|
+
De.call(n, s) && de(e, s, n[s]);
|
|
11
11
|
return e;
|
|
12
|
-
}, he = (e, n) =>
|
|
12
|
+
}, he = (e, n) => Ae(e, xe(n));
|
|
13
13
|
var O = (e, n, s) => {
|
|
14
14
|
if (!n.has(e))
|
|
15
15
|
throw TypeError("Cannot " + s);
|
|
@@ -21,9 +21,9 @@ var r = (e, n, s) => (O(e, n, "read from private field"), s ? s.call(e) : n.get(
|
|
|
21
21
|
}, g = (e, n, s, i) => (O(e, n, "write to private field"), i ? i.call(e, s) : n.set(e, s), s);
|
|
22
22
|
var u = (e, n, s) => (O(e, n, "access private method"), s);
|
|
23
23
|
import { S as y } from "./Store-BQXXikps.js";
|
|
24
|
-
import { i as
|
|
25
|
-
import { i as
|
|
26
|
-
import { c as
|
|
24
|
+
import { i as we } from "./browser-0zX67oeU.js";
|
|
25
|
+
import { i as me } from "./object-R34VLqhp.js";
|
|
26
|
+
import { c as pe, u as Fe } from "./string-f0Dnk0L1.js";
|
|
27
27
|
import { connector as He } from "./connector/index.js";
|
|
28
28
|
const qe = /* @__PURE__ */ new Set([
|
|
29
29
|
// 'a', 'style', 'title', 'script',
|
|
@@ -89,7 +89,7 @@ const qe = /* @__PURE__ */ new Set([
|
|
|
89
89
|
"tspan",
|
|
90
90
|
"view"
|
|
91
91
|
]);
|
|
92
|
-
var o, b, l, v, h, w, R,
|
|
92
|
+
var o, b, l, v, h, w, R, be, B, ge, G, ye, k, j, L, ee, W, Ee, V, Ce, $, Se, z, Ne, T, ne, A, te, I, ve, x, se, M, ie, J, ke, D, re, N, P, F, ae, H, oe, q, ue, U, Y;
|
|
93
93
|
const K = class K {
|
|
94
94
|
constructor(...n) {
|
|
95
95
|
c(this, R);
|
|
@@ -112,7 +112,7 @@ const K = class K {
|
|
|
112
112
|
c(this, F);
|
|
113
113
|
c(this, H);
|
|
114
114
|
c(this, q);
|
|
115
|
-
c(this, o,
|
|
115
|
+
c(this, o, null);
|
|
116
116
|
c(this, b, /* @__PURE__ */ new Set());
|
|
117
117
|
c(this, l, /* @__PURE__ */ new Set());
|
|
118
118
|
c(this, v, void 0);
|
|
@@ -128,8 +128,10 @@ const K = class K {
|
|
|
128
128
|
s(n);
|
|
129
129
|
}), r(this, l).clear(), u(this, M, ie).call(this);
|
|
130
130
|
});
|
|
131
|
-
|
|
132
|
-
|
|
131
|
+
if (we) {
|
|
132
|
+
const s = n[0], i = n[1];
|
|
133
|
+
g(this, o, u(this, R, be).call(this, s, i == null ? void 0 : i.forceSvg)), u(this, G, ye).call(this, i);
|
|
134
|
+
}
|
|
133
135
|
}
|
|
134
136
|
get node() {
|
|
135
137
|
return r(this, o);
|
|
@@ -141,7 +143,7 @@ const K = class K {
|
|
|
141
143
|
]), u(this, x, se).call(this), u(this, k, j).call(this);
|
|
142
144
|
}
|
|
143
145
|
};
|
|
144
|
-
o = new WeakMap(), b = new WeakMap(), l = new WeakMap(), v = new WeakMap(), h = new WeakMap(), w = new WeakMap(), R = new WeakSet(),
|
|
146
|
+
o = new WeakMap(), b = new WeakMap(), l = new WeakMap(), v = new WeakMap(), h = new WeakMap(), w = new WeakMap(), R = new WeakSet(), be = function(n, s) {
|
|
145
147
|
let i = null;
|
|
146
148
|
if (n instanceof Node)
|
|
147
149
|
i = n;
|
|
@@ -159,21 +161,21 @@ o = new WeakMap(), b = new WeakMap(), l = new WeakMap(), v = new WeakMap(), h =
|
|
|
159
161
|
else
|
|
160
162
|
i = document.createElement("div");
|
|
161
163
|
return i;
|
|
162
|
-
}, B = new WeakSet(),
|
|
164
|
+
}, B = new WeakSet(), ge = function(n) {
|
|
163
165
|
return n instanceof HTMLElement || n instanceof SVGElement;
|
|
164
|
-
}, G = new WeakSet(),
|
|
166
|
+
}, G = new WeakSet(), ye = function(n) {
|
|
165
167
|
if (!n)
|
|
166
168
|
return;
|
|
167
|
-
const s = u(this, B,
|
|
169
|
+
const s = u(this, B, ge).call(this, r(this, o)), i = n.ref;
|
|
168
170
|
delete n.ref, n != null && n.onConnect && (r(this, b).add(n.onConnect), delete n.onConnect), n != null && n.onDisconnect && (r(this, l).add(n.onDisconnect), delete n.onDisconnect);
|
|
169
171
|
let a, f;
|
|
170
172
|
for (const d in n) {
|
|
171
173
|
const m = n[d];
|
|
172
|
-
d === "class" && s ? u(this, L, ee).call(this, m) : d === "style" && s ? u(this, $,
|
|
174
|
+
d === "class" && s ? u(this, L, ee).call(this, m) : d === "style" && s ? u(this, $, Se).call(this, m) : d === "lightChildren" ? u(this, N, P).call(this, r(this, o), m) : d === "children" ? u(this, N, P).call(this, r(this, o) instanceof Element ? r(this, o).shadowRoot || r(this, o) : r(this, o), m) : d.startsWith("on") ? (f || (f = {}), f[d] = m) : (a || (a = {}), a[d] = m);
|
|
173
175
|
}
|
|
174
|
-
u(this, J,
|
|
176
|
+
u(this, J, ke).call(this, a), u(this, I, ve).call(this, f), i && (typeof i == "function" ? i(r(this, o)) : i.current = r(this, o)), u(this, k, j).call(this);
|
|
175
177
|
}, k = new WeakSet(), j = function() {
|
|
176
|
-
if (
|
|
178
|
+
if (we && (r(this, l).size || r(this, b).size)) {
|
|
177
179
|
const n = r(this, o) instanceof DocumentFragment ? r(this, o).firstChild : r(this, o);
|
|
178
180
|
g(this, v, He.subscribe(
|
|
179
181
|
n,
|
|
@@ -195,15 +197,15 @@ o = new WeakMap(), b = new WeakMap(), l = new WeakMap(), v = new WeakMap(), h =
|
|
|
195
197
|
});
|
|
196
198
|
else if (typeof n == "object")
|
|
197
199
|
if (n instanceof y)
|
|
198
|
-
u(this, W,
|
|
200
|
+
u(this, W, Ee).call(this, n);
|
|
199
201
|
else
|
|
200
202
|
for (const s in n) {
|
|
201
203
|
const i = n[s];
|
|
202
|
-
i instanceof y ? u(this, V,
|
|
204
|
+
i instanceof y ? u(this, V, Ce).call(this, s, i) : i ? r(this, o).classList.add(s) : r(this, o).classList.remove(s);
|
|
203
205
|
}
|
|
204
206
|
} else
|
|
205
207
|
return;
|
|
206
|
-
}, W = new WeakSet(),
|
|
208
|
+
}, W = new WeakSet(), Ee = function(n) {
|
|
207
209
|
r(this, l).add(
|
|
208
210
|
n.subscribe(({ current: s, previous: i }) => {
|
|
209
211
|
i && [i].flat().forEach((a) => {
|
|
@@ -213,17 +215,17 @@ o = new WeakMap(), b = new WeakMap(), l = new WeakMap(), v = new WeakMap(), h =
|
|
|
213
215
|
});
|
|
214
216
|
})
|
|
215
217
|
);
|
|
216
|
-
}, V = new WeakSet(),
|
|
218
|
+
}, V = new WeakSet(), Ce = function(n, s) {
|
|
217
219
|
r(this, l).add(
|
|
218
220
|
s.subscribe(({ current: i }) => {
|
|
219
221
|
i ? r(this, o).classList.add(n) : r(this, o).classList.remove(n);
|
|
220
222
|
})
|
|
221
223
|
);
|
|
222
|
-
}, $ = new WeakSet(),
|
|
224
|
+
}, $ = new WeakSet(), Se = function(n) {
|
|
223
225
|
if (!n)
|
|
224
226
|
return;
|
|
225
|
-
r(this, o).tagName === "style" || r(this, o).tagName === "STYLE" ? u(this, T, ne).call(this, n) : u(this, z,
|
|
226
|
-
}, z = new WeakSet(),
|
|
227
|
+
r(this, o).tagName === "style" || r(this, o).tagName === "STYLE" ? u(this, T, ne).call(this, n) : u(this, z, Ne).call(this, n);
|
|
228
|
+
}, z = new WeakSet(), Ne = function(n) {
|
|
227
229
|
for (const s in n) {
|
|
228
230
|
const i = s, a = n[i];
|
|
229
231
|
a instanceof y ? r(this, l).add(
|
|
@@ -243,17 +245,17 @@ o = new WeakMap(), b = new WeakMap(), l = new WeakMap(), v = new WeakMap(), h =
|
|
|
243
245
|
const a = document.createTextNode("");
|
|
244
246
|
r(this, l).add(
|
|
245
247
|
i.subscribe((f) => {
|
|
246
|
-
f.current ? a.nodeValue = `${
|
|
248
|
+
f.current ? a.nodeValue = `${pe(s)}: ${f.current};` : a.nodeValue = "";
|
|
247
249
|
})
|
|
248
250
|
), r(this, o).appendChild(a);
|
|
249
251
|
} else
|
|
250
252
|
r(this, o).appendChild(
|
|
251
|
-
document.createTextNode(`${
|
|
253
|
+
document.createTextNode(`${pe(s)}: ${i};`)
|
|
252
254
|
);
|
|
253
255
|
}
|
|
254
256
|
}, A = new WeakSet(), te = function(n, s) {
|
|
255
257
|
n.includes("--") ? s ? r(this, o).style.setProperty(n, s) : r(this, o).style.removeProperty(n) : s ? r(this, o).style[n] = s : r(this, o).style[n] = "";
|
|
256
|
-
}, I = new WeakSet(),
|
|
258
|
+
}, I = new WeakSet(), ve = function(n) {
|
|
257
259
|
if (n) {
|
|
258
260
|
r(this, w) || g(this, w, []);
|
|
259
261
|
for (const s in n) {
|
|
@@ -289,7 +291,7 @@ o = new WeakMap(), b = new WeakMap(), l = new WeakMap(), v = new WeakMap(), h =
|
|
|
289
291
|
s.options
|
|
290
292
|
);
|
|
291
293
|
});
|
|
292
|
-
}, J = new WeakSet(),
|
|
294
|
+
}, J = new WeakSet(), ke = function(n) {
|
|
293
295
|
for (const s in n) {
|
|
294
296
|
const i = n[s];
|
|
295
297
|
i instanceof y ? r(this, l).add(
|
|
@@ -317,8 +319,8 @@ o = new WeakMap(), b = new WeakMap(), l = new WeakMap(), v = new WeakMap(), h =
|
|
|
317
319
|
composed: !0
|
|
318
320
|
})
|
|
319
321
|
);
|
|
320
|
-
const Q = Array.from(E.childNodes), ce = [d].flat(),
|
|
321
|
-
|
|
322
|
+
const Q = Array.from(E.childNodes), ce = [d].flat(), Le = [m].flat(), fe = [], X = [];
|
|
323
|
+
Le.forEach((p, C) => {
|
|
322
324
|
!ce.includes(p) && Q[C] ? fe.push(Q[C]) : X.push(p);
|
|
323
325
|
}), ce.forEach((p, C) => {
|
|
324
326
|
if (X[C]) {
|
|
@@ -343,7 +345,7 @@ o = new WeakMap(), b = new WeakMap(), l = new WeakMap(), v = new WeakMap(), h =
|
|
|
343
345
|
} else if (i instanceof K)
|
|
344
346
|
u(this, F, ae).call(this, n, i.node);
|
|
345
347
|
else if (i instanceof Function)
|
|
346
|
-
u(this, N, P).call(this, n,
|
|
348
|
+
u(this, N, P).call(this, n, me(i) ? new i() : i());
|
|
347
349
|
else {
|
|
348
350
|
const a = u(this, q, ue).call(this, i);
|
|
349
351
|
a instanceof Node && u(this, F, ae).call(this, n, a);
|
|
@@ -356,7 +358,7 @@ o = new WeakMap(), b = new WeakMap(), l = new WeakMap(), v = new WeakMap(), h =
|
|
|
356
358
|
s.remove();
|
|
357
359
|
})) : n.appendChild(s);
|
|
358
360
|
}, H = new WeakSet(), oe = function(n) {
|
|
359
|
-
return n instanceof K ? n.node : typeof n == "function" ?
|
|
361
|
+
return n instanceof K ? n.node : typeof n == "function" ? me(n) ? new n() : n() : u(this, q, ue).call(this, n);
|
|
360
362
|
}, q = new WeakSet(), ue = function(n) {
|
|
361
363
|
if (n instanceof Node)
|
|
362
364
|
return n;
|
package/lib/theme/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("../Store-C-1ruEIm.cjs");const r=require("../browser-CpzFX2xg.cjs"),t=require("../tags-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("../Store-C-1ruEIm.cjs");const r=require("../browser-CpzFX2xg.cjs"),t=require("../tags-CK7mk_EP.cjs"),a=require("../createTheme-Cfaw9UmV.cjs"),e=a.createTheme({colorDark:"#1c1c1c",colorDarkAux:"#282828",colorLight:"#ffffff",colorActive:"#00E5B0",tweakerWidth:"500px",tweakerOffset:"20px",tweakerFolderHeight:"40px",heightInput:"30px",borderRadius:"12px",borderRadiusSmall:"4px",gapLarge:"16px",gapMedium:"12px",gapSmall:"8px",gapExtraSmall:"4px",fontSizeLarge:"20px",fontSizeMedium:"16px",fontSizeSmall:"14px",durationShort:"0.2s"},{prefix:"aptechka-"});r.isBrowser&&document.head.appendChild(t.style({":root":e.style}).node);exports.aptechkaTheme=e;
|
package/lib/theme/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import "../Store-BQXXikps.js";
|
|
2
2
|
import { i as e } from "../browser-0zX67oeU.js";
|
|
3
|
-
import { aD as r } from "../tags-
|
|
4
|
-
import { c as a } from "../createTheme-
|
|
3
|
+
import { aD as r } from "../tags-D0zt3vue.js";
|
|
4
|
+
import { c as a } from "../createTheme-CHnsCgAr.js";
|
|
5
5
|
const o = a(
|
|
6
6
|
{
|
|
7
7
|
colorDark: "#1c1c1c",
|
package/lib/tweaker/index.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";var ce=(t,e,r)=>{if(!e.has(t))throw TypeError("Cannot "+r)};var u=(t,e,r)=>(ce(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)=>(ce(t,e,"write to private field"),n?n.call(t,r):e.set(t,r),r);const we=require("../browser-CpzFX2xg.cjs"),v=require("../custom-element/index.cjs"),d=require("../Store-C-1ruEIm.cjs"),me=require("../file-EevnUtRj.cjs"),ke=require("../function-MthRj-GJ.cjs"),h=require("../tags-Dz_Yisj_.cjs"),m=require("../createStylesheet-u1ZQ2BI5.cjs"),be=require("../Viewport-DAjFJF5V.cjs"),s=require("../theme/index.cjs"),_e=require("../accordion/index.cjs"),Se=require("../index-DTrWxWOM.cjs"),ye=require("../events-Crwi8fz6.cjs");require("../checkbox/index.cjs");const Te=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>',Ce='<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>',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 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 $e{constructor(){z(this,x,"");z(this,w,[]);$(this,x,d.storeRegistry.projectName+"-studio")}openPanel(e){u(this,w).includes(e)||u(this,w).push(e)}closePanel(e){$(this,w,u(this,w).filter(r=>r!==e))}isPanelOpened(e){return u(this,w).includes(e)}save(){const e={openedPanels:u(this,w)};localStorage.setItem(u(this,x),JSON.stringify(e)),d.storeRegistry.saveState()}load(){d.storeRegistry.loadState();const e=localStorage.getItem(u(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 $e;var _;class F extends v.CustomElement{constructor(...r){super();z(this,_,void 0);$(this,_,r)}addStore(r){u(this,_).push(r)}get firstStore(){return u(this,_)[0]}get stores(){return u(this,_)}updateStores(r){u(this,_).forEach(n=>{n.current=r})}}_=new WeakMap;var Pe=Object.defineProperty,Oe=Object.getOwnPropertyDescriptor,Me=(t,e,r,n)=>{for(var a=n>1?void 0:n?Oe(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&&Pe(e,r,a),a};const Ee=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 re=class extends F{constructor(...t){super(...t),this.openShadow(Ee),h.element(this,{children:[h.element("e-checkbox",{onChange:e=>{this.updateStores(e.currentTarget.checked)},ref:e=>{this.firstStore.subscribe(r=>{e.checked=r.current})}})]})}};re=Me([v.define("e-tweaker-boolean-manager")],re);var Re=Object.defineProperty,De=Object.getOwnPropertyDescriptor,We=(t,e,r,n)=>{for(var a=n>1?void 0:n?De(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&&Re(e,r,a),a};const Le=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 ae=class extends F{constructor(...t){super(...t),this.openShadow(Le),h.element(this,{children:[h.input({type:"color",value:this.firstStore,onInput:e=>{this.updateStores(e.currentTarget.value)}})]})}};ae=We([v.define("e-tweaker-color-manager")],ae);var Ie=Object.defineProperty,Fe=Object.getOwnPropertyDescriptor,Ae=(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&&Ie(e,r,a),a};const ze=m.createStylesheet({a:{color:"inherit"}});let ne=class extends F{constructor(...t){var e,r;super(...t),this.openShadow(ze),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})]})}};ne=Ae([v.define("e-tweaker-link-manager")],ne);var qe=Object.defineProperty,Ne=Object.getOwnPropertyDescriptor,He=(t,e,r,n)=>{for(var a=n>1?void 0:n?Ne(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},Ze=(t,e,r)=>{if(!e.has(t))throw TypeError("Cannot "+r)},j=(t,e,r)=>(Ze(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 Ge=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 Q=class extends F{constructor(...t){super(...t),Ke(this,P,new d.Store([])),this.openShadow(Ge),h.element(this,{children:[h.input({class:"text-input",type:"string",value:this.firstStore,onChange:e=>{this.updateStores(e.currentTarget.value)}}),j(this,P)]})}appendContent(t){j(this,P).current=[...j(this,P).current,t]}};P=new WeakMap;Q=He([v.define("e-tweaker-string-manager")],Q);var Ve=Object.defineProperty,Je=Object.getOwnPropertyDescriptor,Ye=(t,e,r,n)=>{for(var a=n>1?void 0:n?Je(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&&Ve(e,r,a),a},ue=(t,e,r)=>{if(!e.has(t))throw TypeError("Cannot "+r)},b=(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)},ee=(t,e,r,n)=>(ue(t,e,"write to private field"),n?n.call(t,r):e.set(t,r),r),O,M,E,H;let U=class extends Q{constructor(...t){var e,r,n,a,o,i;super(...t),q(this,O,void 0),q(this,M,void 0),q(this,E,void 0),q(this,H,k=>{const A=typeof k=="string"?parseFloat(k)||this.min:k,fe=Te.clamp(A,b(this,M),b(this,E));return this.toFixed(fe)}),ee(this,M,((r=(e=this.firstStore.passport)==null?void 0:e.manager)==null?void 0:r.min)||0),ee(this,E,((a=(n=this.firstStore.passport)==null?void 0:n.manager)==null?void 0:a.max)||1),ee(this,O,((i=(o=this.firstStore.passport)==null?void 0:o.manager)==null?void 0:i.step)||.01)}get min(){return b(this,M)}get max(){return b(this,E)}get step(){return b(this,O)}toFixed(t){var r;const e=((r=b(this,O).toString().split(".")[1])==null?void 0:r.length)||0;return e?+t.toFixed(e):Math.ceil(t)}connectedCallback(){this.firstStore.addMiddleware(b(this,H))}disconnectedCallback(){this.firstStore.removeMiddleware(b(this,H))}};O=new WeakMap;M=new WeakMap;E=new WeakMap;H=new WeakMap;U=Ye([v.define("e-tweaker-number-manager")],U);var Be=Object.defineProperty,Qe=Object.getOwnPropertyDescriptor,Ue=(t,e,r,n)=>{for(var a=n>1?void 0:n?Qe(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&&Be(e,r,a),a};const Xe=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 ie=class extends U{constructor(...t){super(...t),this.addStylesheet(Xe),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))}}))}};ie=Ue([v.define("e-tweaker-range-manager")],ie);var je=Object.defineProperty,et=Object.getOwnPropertyDescriptor,tt=(t,e,r,n)=>{for(var a=n>1?void 0:n?et(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};const rt=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 se=class extends F{constructor(...t){var r,n;super(...t),this.openShadow(rt);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}))]})})}};se=tt([v.define("e-tweaker-select-manager")],se);const at={boolean:re,color:ae,link:ne,number:U,range:ie,select:se,string:Q};var nt=Object.defineProperty,it=Object.getOwnPropertyDescriptor,st=(t,e,r,n)=>{for(var a=n>1?void 0:n?it(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&&nt(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,Z,K;const ot=m.createStylesheet({":host":{display:"grid",gridAutoFlow:"column",gridTemplateColumns:"0.4fr 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 X=class extends v.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,Z,()=>{d.activeStores.current.find(i=>l(this,g).includes(i))||this.remove()}),S(this,K,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 at[e](l(this,g)[0])),this.openShadow(ot),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,Z)),addEventListener("keydown",l(this,K)),ye.dispatchSizeChangeEvent(this)}disconnectedCallback(){d.activeStores.unsubscribe(l(this,Z)),removeEventListener("keydown",l(this,K))}};g=new WeakMap;R=new WeakMap;D=new WeakMap;W=new WeakMap;L=new WeakMap;Z=new WeakMap;K=new WeakMap;X=st([v.define("e-tweaker-field")],X);var ht=Object.defineProperty,ct=Object.getOwnPropertyDescriptor,lt=(t,e,r,n)=>{for(var a=n>1?void 0:n?ct(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&&ht(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)},te=(t,e,r,n)=>(ge(t,e,"write to private field"),n?n.call(t,r):e.set(t,r),r),f,G,p,V,J,oe;const dt=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 _e.AccordionElement{constructor(t){super(),T(this,f,void 0),T(this,G,new d.Store(null)),T(this,p,new d.Store([])),T(this,V,void 0),T(this,J,null),T(this,oe,e=>{let r=[],n=[];e.forEach(a=>{r=[...r,...a.removedNodes],n=[...n,...a.addedNodes]}),c(this,p).current=c(this,p).current.filter(a=>!r.includes(a)),c(this,f)&&!c(this,p).current.length&&!n.length&&this.remove()}),this.openShadow(dt),te(this,f,t.key),te(this,V,new MutationObserver(c(this,oe))),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(Se.arrowIcon,{class:"arrow"})]}),h.div({class:"body",children:h.div({class:"body-content",children:c(this,p),ref:e=>te(this,J,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,p)}connectedCallback(){super.connectedCallback(),setTimeout(()=>{C.isPanelOpened(c(this,f))&&this.openAll({skipTransition:!0})},50),c(this,V).observe(c(this,J),{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,p).current.find(o=>o.key===n);a instanceof I?a.handleStore({store:t.store,remainingFolders:t.remainingFolders.slice(1)}):c(this,p).current=[...c(this,p).current,new I({key:n,storeBox:{store:t.store,remainingFolders:t.remainingFolders.slice(1)}})]}else{const e=c(this,p).current.find(r=>r.key===t.store.passport.name);e instanceof X?e.addStore(t.store):c(this,p).current=[...c(this,p).current,new X({store:t.store})]}}};f=new WeakMap;G=new WeakMap;p=new WeakMap;V=new WeakMap;J=new WeakMap;oe=new WeakMap;I=lt([v.define("e-tweaker-folder")],I);var pt=Object.defineProperty,ut=Object.getOwnPropertyDescriptor,vt=(t,e,r,n)=>{for(var a=n>1?void 0:n?ut(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&&pt(e,r,a),a},gt=(t,e,r)=>{if(!e.has(t))throw TypeError("Cannot "+r)},N=(t,e,r)=>(gt(t,e,"read from private field"),r?r.call(t):e.get(t)),le=(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,B;const ft=m.createStylesheet({":host":{fontFamily:"sans-serif",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",opacity:"0.1"},":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 ce=(t,e,r)=>{if(!e.has(t))throw TypeError("Cannot "+r)};var u=(t,e,r)=>(ce(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)=>(ce(t,e,"write to private field"),n?n.call(t,r):e.set(t,r),r);const we=require("../browser-CpzFX2xg.cjs"),v=require("../custom-element/index.cjs"),d=require("../Store-C-1ruEIm.cjs"),me=require("../file-EevnUtRj.cjs"),ke=require("../function-MthRj-GJ.cjs"),h=require("../tags-CK7mk_EP.cjs"),m=require("../createStylesheet-W0b965g0.cjs"),be=require("../Viewport-DAjFJF5V.cjs"),s=require("../theme/index.cjs"),_e=require("../accordion/index.cjs"),Se=require("../index-C_qv6rk4.cjs"),ye=require("../events-Crwi8fz6.cjs");require("../checkbox/index.cjs");const Te=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>',Ce='<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>',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 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 $e{constructor(){z(this,x,"");z(this,w,[]);$(this,x,d.storeRegistry.projectName+"-studio")}openPanel(e){u(this,w).includes(e)||u(this,w).push(e)}closePanel(e){$(this,w,u(this,w).filter(r=>r!==e))}isPanelOpened(e){return u(this,w).includes(e)}save(){const e={openedPanels:u(this,w)};localStorage.setItem(u(this,x),JSON.stringify(e)),d.storeRegistry.saveState()}load(){d.storeRegistry.loadState();const e=localStorage.getItem(u(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 $e;var _;class F extends v.CustomElement{constructor(...r){super();z(this,_,void 0);$(this,_,r)}addStore(r){u(this,_).push(r)}get firstStore(){return u(this,_)[0]}get stores(){return u(this,_)}updateStores(r){u(this,_).forEach(n=>{n.current=r})}}_=new WeakMap;var Pe=Object.defineProperty,Oe=Object.getOwnPropertyDescriptor,Me=(t,e,r,n)=>{for(var a=n>1?void 0:n?Oe(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&&Pe(e,r,a),a};const Ee=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 re=class extends F{constructor(...t){super(...t),this.openShadow(Ee),h.element(this,{children:[h.element("e-checkbox",{onChange:e=>{this.updateStores(e.currentTarget.checked)},ref:e=>{this.firstStore.subscribe(r=>{e.checked=r.current})}})]})}};re=Me([v.define("e-tweaker-boolean-manager")],re);var Re=Object.defineProperty,De=Object.getOwnPropertyDescriptor,We=(t,e,r,n)=>{for(var a=n>1?void 0:n?De(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&&Re(e,r,a),a};const Le=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 ae=class extends F{constructor(...t){super(...t),this.openShadow(Le),h.element(this,{children:[h.input({type:"color",value:this.firstStore,onInput:e=>{this.updateStores(e.currentTarget.value)}})]})}};ae=We([v.define("e-tweaker-color-manager")],ae);var Ie=Object.defineProperty,Fe=Object.getOwnPropertyDescriptor,Ae=(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&&Ie(e,r,a),a};const ze=m.createStylesheet({a:{color:"inherit"}});let ne=class extends F{constructor(...t){var e,r;super(...t),this.openShadow(ze),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})]})}};ne=Ae([v.define("e-tweaker-link-manager")],ne);var qe=Object.defineProperty,Ne=Object.getOwnPropertyDescriptor,He=(t,e,r,n)=>{for(var a=n>1?void 0:n?Ne(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},Ze=(t,e,r)=>{if(!e.has(t))throw TypeError("Cannot "+r)},j=(t,e,r)=>(Ze(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 Ge=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 Q=class extends F{constructor(...t){super(...t),Ke(this,P,new d.Store([])),this.openShadow(Ge),h.element(this,{children:[h.input({class:"text-input",type:"string",value:this.firstStore,onChange:e=>{this.updateStores(e.currentTarget.value)}}),j(this,P)]})}appendContent(t){j(this,P).current=[...j(this,P).current,t]}};P=new WeakMap;Q=He([v.define("e-tweaker-string-manager")],Q);var Ve=Object.defineProperty,Je=Object.getOwnPropertyDescriptor,Ye=(t,e,r,n)=>{for(var a=n>1?void 0:n?Je(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&&Ve(e,r,a),a},ue=(t,e,r)=>{if(!e.has(t))throw TypeError("Cannot "+r)},b=(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)},ee=(t,e,r,n)=>(ue(t,e,"write to private field"),n?n.call(t,r):e.set(t,r),r),O,M,E,H;let U=class extends Q{constructor(...t){var e,r,n,a,o,i;super(...t),q(this,O,void 0),q(this,M,void 0),q(this,E,void 0),q(this,H,k=>{const A=typeof k=="string"?parseFloat(k)||this.min:k,fe=Te.clamp(A,b(this,M),b(this,E));return this.toFixed(fe)}),ee(this,M,((r=(e=this.firstStore.passport)==null?void 0:e.manager)==null?void 0:r.min)||0),ee(this,E,((a=(n=this.firstStore.passport)==null?void 0:n.manager)==null?void 0:a.max)||1),ee(this,O,((i=(o=this.firstStore.passport)==null?void 0:o.manager)==null?void 0:i.step)||.01)}get min(){return b(this,M)}get max(){return b(this,E)}get step(){return b(this,O)}toFixed(t){var r;const e=((r=b(this,O).toString().split(".")[1])==null?void 0:r.length)||0;return e?+t.toFixed(e):Math.ceil(t)}connectedCallback(){this.firstStore.addMiddleware(b(this,H))}disconnectedCallback(){this.firstStore.removeMiddleware(b(this,H))}};O=new WeakMap;M=new WeakMap;E=new WeakMap;H=new WeakMap;U=Ye([v.define("e-tweaker-number-manager")],U);var Be=Object.defineProperty,Qe=Object.getOwnPropertyDescriptor,Ue=(t,e,r,n)=>{for(var a=n>1?void 0:n?Qe(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&&Be(e,r,a),a};const Xe=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 ie=class extends U{constructor(...t){super(...t),this.addStylesheet(Xe),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))}}))}};ie=Ue([v.define("e-tweaker-range-manager")],ie);var je=Object.defineProperty,et=Object.getOwnPropertyDescriptor,tt=(t,e,r,n)=>{for(var a=n>1?void 0:n?et(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};const rt=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 se=class extends F{constructor(...t){var r,n;super(...t),this.openShadow(rt);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}))]})})}};se=tt([v.define("e-tweaker-select-manager")],se);const at={boolean:re,color:ae,link:ne,number:U,range:ie,select:se,string:Q};var nt=Object.defineProperty,it=Object.getOwnPropertyDescriptor,st=(t,e,r,n)=>{for(var a=n>1?void 0:n?it(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&&nt(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,Z,K;const ot=m.createStylesheet({":host":{display:"grid",gridAutoFlow:"column",gridTemplateColumns:"0.4fr 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 X=class extends v.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,Z,()=>{d.activeStores.current.find(i=>l(this,g).includes(i))||this.remove()}),S(this,K,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 at[e](l(this,g)[0])),this.openShadow(ot),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,Z)),addEventListener("keydown",l(this,K)),ye.dispatchSizeChangeEvent(this)}disconnectedCallback(){d.activeStores.unsubscribe(l(this,Z)),removeEventListener("keydown",l(this,K))}};g=new WeakMap;R=new WeakMap;D=new WeakMap;W=new WeakMap;L=new WeakMap;Z=new WeakMap;K=new WeakMap;X=st([v.define("e-tweaker-field")],X);var ht=Object.defineProperty,ct=Object.getOwnPropertyDescriptor,lt=(t,e,r,n)=>{for(var a=n>1?void 0:n?ct(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&&ht(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)},te=(t,e,r,n)=>(ge(t,e,"write to private field"),n?n.call(t,r):e.set(t,r),r),f,G,p,V,J,oe;const dt=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 _e.AccordionElement{constructor(t){super(),T(this,f,void 0),T(this,G,new d.Store(null)),T(this,p,new d.Store([])),T(this,V,void 0),T(this,J,null),T(this,oe,e=>{let r=[],n=[];e.forEach(a=>{r=[...r,...a.removedNodes],n=[...n,...a.addedNodes]}),c(this,p).current=c(this,p).current.filter(a=>!r.includes(a)),c(this,f)&&!c(this,p).current.length&&!n.length&&this.remove()}),this.openShadow(dt),te(this,f,t.key),te(this,V,new MutationObserver(c(this,oe))),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(Se.arrowIcon,{class:"arrow"})]}),h.div({class:"body",children:h.div({class:"body-content",children:c(this,p),ref:e=>te(this,J,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,p)}connectedCallback(){super.connectedCallback(),setTimeout(()=>{C.isPanelOpened(c(this,f))&&this.openAll({skipTransition:!0})},50),c(this,V).observe(c(this,J),{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,p).current.find(o=>o.key===n);a instanceof I?a.handleStore({store:t.store,remainingFolders:t.remainingFolders.slice(1)}):c(this,p).current=[...c(this,p).current,new I({key:n,storeBox:{store:t.store,remainingFolders:t.remainingFolders.slice(1)}})]}else{const e=c(this,p).current.find(r=>r.key===t.store.passport.name);e instanceof X?e.addStore(t.store):c(this,p).current=[...c(this,p).current,new X({store:t.store})]}}};f=new WeakMap;G=new WeakMap;p=new WeakMap;V=new WeakMap;J=new WeakMap;oe=new WeakMap;I=lt([v.define("e-tweaker-folder")],I);var pt=Object.defineProperty,ut=Object.getOwnPropertyDescriptor,vt=(t,e,r,n)=>{for(var a=n>1?void 0:n?ut(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&&pt(e,r,a),a},gt=(t,e,r)=>{if(!e.has(t))throw TypeError("Cannot "+r)},N=(t,e,r)=>(gt(t,e,"read from private field"),r?r.call(t):e.get(t)),le=(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,B;const ft=m.createStylesheet({":host":{fontFamily:"sans-serif",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",opacity:"0.1"},":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/tweaker/index.js
CHANGED
|
@@ -12,12 +12,12 @@ import { CustomElement as fe, define as f } from "../custom-element/index.js";
|
|
|
12
12
|
import { s as S, S as se, a as $ } from "../Store-BQXXikps.js";
|
|
13
13
|
import { c as ke } from "../file-lxi_oXJf.js";
|
|
14
14
|
import { d as xe } from "../function-C10DGppn.js";
|
|
15
|
-
import { e as p, a0 as re, a as $e, aB as Pe, D as w, p as A, a3 as Oe } from "../tags-
|
|
16
|
-
import { c as m } from "../createStylesheet-
|
|
15
|
+
import { e as p, a0 as re, a as $e, aB as Pe, D as w, p as A, a3 as Oe } from "../tags-D0zt3vue.js";
|
|
16
|
+
import { c as m } from "../createStylesheet-D6C3BPkl.js";
|
|
17
17
|
import { a as Me } from "../Viewport-wlgZaIn7.js";
|
|
18
18
|
import { aptechkaTheme as s } from "../theme/index.js";
|
|
19
19
|
import { AccordionElement as Ee } from "../accordion/index.js";
|
|
20
|
-
import { a as Te } from "../index-
|
|
20
|
+
import { a as Te } from "../index-ilQWX_BM.js";
|
|
21
21
|
import { d as De } from "../events-_C2CztxR.js";
|
|
22
22
|
import "../checkbox/index.js";
|
|
23
23
|
import { c as Re } from "../math-BOBiC4TN.js";
|
package/lib/utils/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const h=require("../attributes-Bf2svn4j.cjs"),x=require("../browser-CpzFX2xg.cjs"),m=require("../dom-JBOkFLTh.cjs"),s=require("../easings-DsS5-Kqc.cjs"),y=require("../events-Crwi8fz6.cjs"),E=require("../file-EevnUtRj.cjs"),b=require("../function-MthRj-GJ.cjs"),I=require("../gestures-DHLrn6Q8.cjs"),g=require("../layout-8ryRAMGJ.cjs"),o=require("../math-GDWEqu7y.cjs"),f=require("../number-yVpzMdbQ.cjs"),u=require("../object-BZELAoVj.cjs"),S=require("../polyfills-CrcS4RcO.cjs"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const h=require("../attributes-Bf2svn4j.cjs"),x=require("../browser-CpzFX2xg.cjs"),m=require("../dom-JBOkFLTh.cjs"),s=require("../easings-DsS5-Kqc.cjs"),y=require("../events-Crwi8fz6.cjs"),E=require("../file-EevnUtRj.cjs"),b=require("../function-MthRj-GJ.cjs"),I=require("../gestures-DHLrn6Q8.cjs"),g=require("../layout-8ryRAMGJ.cjs"),o=require("../math-GDWEqu7y.cjs"),f=require("../number-yVpzMdbQ.cjs"),u=require("../object-BZELAoVj.cjs"),S=require("../polyfills-CrcS4RcO.cjs"),r=require("../string-DhgS_iFl.cjs"),C=require("../style-At6aDoqG.cjs");function w(t,e,...n){return[...t.slice(0,e),...n,...t.slice(e)]}function Q(t,e){const n=t.measureText(e),i=n.actualBoundingBoxAscent+n.actualBoundingBoxDescent,a=n.width;return{height:i,width:a}}function T(t){return Math.floor(t)+.5}function D(t,e,n,i,a,l){let p=t/e,O=n/i,c=0,d=0;return a=typeof a=="undefined"?.5:a,l=typeof l=="undefined"?.5:l,p>O?(c=i,d=i*p):(d=n,c=n/p),[(n-d)*a,(i-c)*l,d,c]}function P(t,e){return t.x<e.x+e.width&&t.x>e.x&&t.y<e.y+e.height&&t.y>e.y}function q(t,e){return Math.sqrt((t.x-e.x)**2+(t.y-e.y)**2)<e.radius}function v(t,e,n=!1){let i=t.x-e.width/2,a=e.height/2-t.y;return n&&(i=i/(e.width/2),a=a/(e.height/2)),{x:i,y:a}}function R(t,e){const n=t.x/e.x,i=t.y/e.y;return{x:n,y:i}}function A(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 N(...t){const e={};return Array.from(document.styleSheets).forEach(n=>{Array.from(n.cssRules).forEach(i=>{i instanceof CSSStyleRule&&i.selectorText===":root"&&t.forEach(a=>{const l=i.styleMap.get(a);l?e[a]=l.toString():console.warn(`variable named ${a} not found`)})})}),e}function z(t){const e=window.atob(t);return decodeURIComponent(window.escape(e))}function j(t){const e=window.unescape(encodeURIComponent(t));return window.btoa(e)}exports.parseAttribute=h.parseAttribute;exports.parseAttributeValue=h.parseAttributeValue;exports.isBrowser=x.isBrowser;exports.findParentElement=m.findParentElement;exports.findScrollParentElement=m.findScrollParentElement;exports.getAllParentElements=m.getAllParentElements;exports.getElement=m.getElement;exports.easeInCubic=s.easeInCubic;exports.easeInExpo=s.easeInExpo;exports.easeInOutCubic=s.easeInOutCubic;exports.easeInOutExpo=s.easeInOutExpo;exports.easeInOutQuad=s.easeInOutQuad;exports.easeInOutQuart=s.easeInOutQuart;exports.easeInOutQuint=s.easeInOutQuint;exports.easeInQuad=s.easeInQuad;exports.easeInQuart=s.easeInQuart;exports.easeInQuint=s.easeInQuint;exports.easeOutCubic=s.easeOutCubic;exports.easeOutExpo=s.easeOutExpo;exports.easeOutQuad=s.easeOutQuad;exports.easeOutQuart=s.easeOutQuart;exports.easeOutQuint=s.easeOutQuint;exports.linear=s.linear;exports.dispatchSizeChangeEvent=y.dispatchSizeChangeEvent;exports.createJSONAndSave=E.createJSONAndSave;exports.debounce=b.debounce;exports.throttle=b.throttle;exports.setupDrag=I.setupDrag;exports.getCumulativeOffsetLeft=g.getCumulativeOffsetLeft;exports.getCumulativeOffsetTop=g.getCumulativeOffsetTop;exports.getCumulativePosition=g.getCumulativePosition;exports.calculateDistance=o.calculateDistance;exports.calculateDistanceWithRadius=o.calculateDistanceWithRadius;exports.clamp=o.clamp;exports.damp=o.damp;exports.lerp=o.lerp;exports.mapRange=o.mapRange;exports.round=o.round;exports.smootherstep=o.smootherstep;exports.smoothstep=o.smoothstep;exports.step=o.step;exports.preciseNumber=f.preciseNumber;exports.roundNumberTo=f.roundNumberTo;exports.cloneDeep=u.cloneDeep;exports.compareObjects=u.compareObjects;exports.isESClass=u.isESClass;exports.isNullish=u.isNullish;exports.isObject=u.isObject;exports.mergeDeep=u.mergeDeep;exports.mixin=u.mixin;exports.omit=u.omit;exports.pick=u.pick;exports.nullishCoalescing=S.nullishCoalescing;exports.camelToKebab=r.camelToKebab;exports.capitalize=r.capitalize;exports.generateId=r.generateId;exports.isUppercase=r.isUppercase;exports.kebabToCamel=r.kebabToCamel;exports.snakeToDotted=r.snakeToDotted;exports.toPascalCase=r.toPascalCase;exports.uncapitalize=r.uncapitalize;exports.getElementTransitionDurationMS=C.getElementTransitionDurationMS;exports.getElementTransitionDurationS=C.getElementTransitionDurationS;exports.cover=D;exports.decode=j;exports.dotCircleCollision=q;exports.dotRectCollision=P;exports.encode=z;exports.fixPosition=T;exports.getPointerPosition=A;exports.getRootVariables=N;exports.insert=w;exports.measureText=Q;exports.normalize=R;exports.screenToCartesian=v;
|
package/lib/utils/index.d.ts
CHANGED
|
@@ -17,7 +17,7 @@ export { lerp, damp, step, round, clamp, mapRange, smoothstep, smootherstep, cal
|
|
|
17
17
|
export { preciseNumber, roundNumberTo } from './number';
|
|
18
18
|
export { isObject, cloneDeep, mergeDeep, isNullish, compareObjects, pick, omit, isESClass, mixin, } from './object';
|
|
19
19
|
export { nullishCoalescing } from './polyfills';
|
|
20
|
-
export { kebabToCamel, camelToKebab, snakeToDotted, toPascalCase, capitalize, uncapitalize, generateId, } from './string';
|
|
20
|
+
export { kebabToCamel, camelToKebab, snakeToDotted, toPascalCase, capitalize, uncapitalize, generateId, isUppercase, } from './string';
|
|
21
21
|
export { getElementTransitionDurationMS, getElementTransitionDurationS, } from './style';
|
|
22
22
|
export type { Axes2D, Axes3D, Dot2D, Rect2D, Circle, Dot3D, Rect3D, } from './ts-shape';
|
|
23
23
|
export type { NestedKeys, NestedValueOf, DeepOmit, DeepPartial, Requiredish, WithRequired, Split, SplitFirst, Tail, KebabToCamel, CamelToKebab, } from './ts-utility';
|