aptechka 0.27.1 → 0.28.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/file-EevnUtRj.cjs +1 -0
- package/lib/file-lxi_oXJf.js +13 -0
- package/lib/need_redo_tweaker/index.cjs +3 -3
- package/lib/need_redo_tweaker/index.js +15 -14
- package/lib/popover/PopoverButtonElement.d.ts +15 -0
- package/lib/popover/PopoverElement.d.ts +27 -0
- package/lib/popover/index.cjs +1 -0
- package/lib/popover/index.d.ts +2 -0
- package/lib/popover/index.js +170 -0
- package/lib/style-At6aDoqG.cjs +1 -0
- package/lib/style-j2TwriJ_.js +10 -0
- package/lib/utils/index.cjs +1 -1
- package/lib/utils/index.js +55 -54
- package/package.json +9 -1
- package/lib/style-BqzUd8Fy.cjs +0 -1
- package/lib/style-M-RBTQxT.js +0 -21
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";function c(n,t){const o=new Blob([JSON.stringify(t)],{type:"application/json"}),e=document.createElement("a");e.download=n+".json",e.href=window.URL.createObjectURL(o),e.dataset.downloadurl=["application/json",e.download,e.href].join(":");const a=new MouseEvent("click",{view:window,bubbles:!0,cancelable:!0});e.dispatchEvent(a),e.remove()}exports.createJSONAndSave=c;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
function c(n, o) {
|
|
2
|
+
const t = new Blob([JSON.stringify(o)], { type: "application/json" }), e = document.createElement("a");
|
|
3
|
+
e.download = n + ".json", e.href = window.URL.createObjectURL(t), e.dataset.downloadurl = ["application/json", e.download, e.href].join(":");
|
|
4
|
+
const a = new MouseEvent("click", {
|
|
5
|
+
view: window,
|
|
6
|
+
bubbles: !0,
|
|
7
|
+
cancelable: !0
|
|
8
|
+
});
|
|
9
|
+
e.dispatchEvent(a), e.remove();
|
|
10
|
+
}
|
|
11
|
+
export {
|
|
12
|
+
c
|
|
13
|
+
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";var bt=r=>{throw TypeError(r)};var Ge=(r,s,t)=>s.has(r)||bt("Cannot "+t);var e=(r,s,t)=>(Ge(r,s,"read from private field"),t?t.call(r):s.get(r)),o=(r,s,t)=>s.has(r)?bt("Cannot add the same private member more than once"):s instanceof WeakSet?s.add(r):s.set(r,t),c=(r,s,t,i)=>(Ge(r,s,"write to private field"),i?i.call(r,t):s.set(r,t),t),l=(r,s,t)=>(Ge(r,s,"access private method"),t);const U=require("../browser-CpzFX2xg.cjs"),m=require("../Store-CDb6RMce.cjs"),St=require("../style-BqzUd8Fy.cjs"),Gt=require("../function-MthRj-GJ.cjs"),kt=require("../gestures-DHLrn6Q8.cjs");require("../ticker/vanilla/index.cjs");const pe=require("../string-DhgS_iFl.cjs"),vt=require("../object-CCiXnER2.cjs"),Ut=require("../connector/index.cjs"),Xt=require("../device/index.cjs"),Qt=require("../math-GDWEqu7y.cjs"),Ue=require("../polyfills-CM4SCDTt.cjs"),yt=require("../element-resizer/vanilla/index.cjs"),jt=new Set(["animate","animateMotion","animateTransform","circle","clipPath","defs","desc","ellipse","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","foreignObject","g","image","line","linearGradient","listener","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialGradient","rect","set","solidColor","stop","svg","switch","symbol","text","textPath","title","tspan","view","use"]);var d,$,y,we,I,H,a,Et,xt,Ct,Xe,Qe,Tt,Lt,zt,Rt,je,et,Mt,tt,st,At,it,qe,nt,ot,rt,Ke,Oe;const Ze=class Ze{constructor(...s){o(this,a);o(this,d,null);o(this,$,new Set);o(this,y,new Set);o(this,we);o(this,I);o(this,H);o(this,Ke,s=>{e(this,$).forEach(t=>{t(s)}),e(this,$).clear()});o(this,Oe,(s,t)=>{e(this,y).forEach(i=>{i(s,t)}),e(this,y).clear(),l(this,a,st).call(this)});if(U.isBrowser){const t=s[0],i=s[1];c(this,d,l(this,a,Et).call(this,t,i==null?void 0:i.forceSvg)),l(this,a,Ct).call(this,i)}}get node(){return e(this,d)}set node(s){var t;l(this,a,st).call(this),c(this,d,s),(t=e(this,we))==null||t.call(this),e(this,d)instanceof Element&&c(this,I,[...e(this,d).querySelectorAll("store-root")]),l(this,a,tt).call(this),l(this,a,Xe).call(this)}};d=new WeakMap,$=new WeakMap,y=new WeakMap,we=new WeakMap,I=new WeakMap,H=new WeakMap,a=new WeakSet,Et=function(s,t){let i=null;if(s instanceof Node)i=s;else if(typeof s=="string")if(!s.includes("<")&&s.includes("-"))i=new(customElements.get(s));else if(s.includes("<")){const n=document.createElement("div");n.innerHTML=s,i=n.firstElementChild}else jt.has(s)||t?i=document.createElementNS("http://www.w3.org/2000/svg",s):i=document.createElement(s);else i=document.createElement("div");return i},xt=function(s){return s instanceof HTMLElement||s instanceof SVGElement},Ct=function(s){if(!s)return;const t=l(this,a,xt).call(this,e(this,d)),i=s.ref;delete s.ref,s!=null&&s.onConnect&&(e(this,$).add(s.onConnect),delete s.onConnect),s!=null&&s.onDisconnect&&(e(this,y).add(s.onDisconnect),delete s.onDisconnect);let n,h;for(const u in s){const g=s[u];u==="class"&&t?l(this,a,Qe).call(this,g):u==="style"&&t?l(this,a,zt).call(this,g):u==="lightChildren"?l(this,a,qe).call(this,e(this,d),g):u==="children"?l(this,a,qe).call(this,e(this,d)instanceof Element?e(this,d).shadowRoot||e(this,d):e(this,d),g):u==="connectedClass"?e(this,$).add(()=>{requestAnimationFrame(()=>{e(this,d).classList.add(typeof g=="boolean"?"connected":g)})}):u.startsWith("on")?(h||(h={}),h[u]=g):(n||(n={}),n[u]=g)}l(this,a,At).call(this,n),l(this,a,Mt).call(this,h),i&&(typeof i=="function"?i(e(this,d)):i.current=e(this,d)),l(this,a,Xe).call(this)},Xe=function(){if(U.isBrowser&&(e(this,y).size||e(this,$).size)){const s=e(this,d)instanceof DocumentFragment?e(this,d).firstChild:e(this,d);c(this,we,Ut.connector.subscribe(s,{connectCallback:e(this,Ke),disconnectCallback:e(this,Oe),unsubscribeAfterDisconnect:!0,maxWaitSec:20}))}},Qe=function(s){if(s){if(typeof s=="string")e(this,d).classList.add(s);else if(Array.isArray(s))s.forEach(t=>{t&&l(this,a,Qe).call(this,t)});else if(typeof s=="object")if(s instanceof m.Store)l(this,a,Tt).call(this,s);else for(const t in s){const i=s[t];i instanceof m.Store?l(this,a,Lt).call(this,t,i):i?e(this,d).classList.add(t):e(this,d).classList.remove(t)}}else return},Tt=function(s){e(this,y).add(s.subscribe(({current:t,previous:i})=>{i&&[i].flat().forEach(n=>{n&&e(this,d).classList.remove(n)}),t&&[t].flat().forEach(n=>{n&&e(this,d).classList.add(n)})}))},Lt=function(s,t){e(this,y).add(t.subscribe(({current:i})=>{i?e(this,d).classList.add(s):e(this,d).classList.remove(s)}))},zt=function(s){if(!s)return;e(this,d).tagName==="style"||e(this,d).tagName==="STYLE"?l(this,a,je).call(this,s):l(this,a,Rt).call(this,s)},Rt=function(s){for(const t in s){const i=t,n=s[i];n instanceof m.Store?e(this,y).add(n.subscribe(({current:h})=>{l(this,a,et).call(this,i,h)})):l(this,a,et).call(this,i,n)}},je=function(s){for(const t in s){const i=s[t];if(typeof i=="object"&&!(i instanceof m.Store))e(this,d).appendChild(document.createTextNode(`${t} {`)),l(this,a,je).call(this,i),e(this,d).appendChild(document.createTextNode("}"));else if(i instanceof m.Store){const n=document.createTextNode("");e(this,y).add(i.subscribe(h=>{h.current?n.nodeValue=`${pe.camelToKebab(t)}: ${h.current};`:n.nodeValue=""})),e(this,d).appendChild(n)}else e(this,d).appendChild(document.createTextNode(`${pe.camelToKebab(t)}: ${i};`))}},et=function(s,t){s.includes("--")?t?e(this,d).style.setProperty(s,t.toString()):e(this,d).style.removeProperty(s):t?e(this,d).style[s]=t.toString():e(this,d).style[s]=""},Mt=function(s){if(s){e(this,H)||c(this,H,[]);for(const t in s){const i=t,n=pe.uncapitalize(i.split("on").slice(1).join("on")),h=s[i];typeof h=="object"?e(this,H).push({name:n,callback:h.callback,options:h.options}):typeof h=="function"&&e(this,H).push({name:n,callback:h})}l(this,a,tt).call(this)}},tt=function(){var s;(s=e(this,H))==null||s.forEach(t=>{e(this,d).addEventListener(t.name,t.callback,t.options)})},st=function(){var s;(s=e(this,H))==null||s.forEach(t=>{e(this,d).removeEventListener(t.name,t.callback,t.options)})},At=function(s){for(const t in s){const i=s[t];i instanceof m.Store?e(this,y).add(i.subscribe(({current:n})=>{l(this,a,it).call(this,t,n)})):l(this,a,it).call(this,t,i)}},it=function(s,t){var n,h;const i=e(this,d);if(s in i&&!((h=(n=i.constructor)==null?void 0:n.observedAttributes)!=null&&h.includes(s)))t!=null&&(i[s]=t.toString());else if(t!=null){const u=t.toString();s.includes("xlink")?i.setAttributeNS("http://www.w3.org/1999/xlink",s,u):i.setAttribute(s,u)}},qe=function(s,t){t&&(t=[t].flat(),t.forEach(i=>{if(i instanceof m.Store){const n=document.createElement("div");n.style.display="contents",s.appendChild(n),e(this,I)||c(this,I,[]);const h=e(this,I).length;n.setAttribute("store-root",""),e(this,I).push(n),e(this,y).add(i.subscribe(({current:u,previous:g})=>{const k=e(this,I)[h];k.dispatchEvent(new CustomEvent("beforeChildrenChange",{bubbles:!0,composed:!0}));const T=Array.from(k.childNodes),v=Array.isArray(u)?u:[u],ge=Array.isArray(g)?g:[g],Ve=[],x=[];T.length&&ge.forEach((N,P)=>{v.includes(N)?x.push(N):Ve.push(T[P])}),v.forEach((N,P)=>{if(x[P]!=null){if(N!==x[P]){const q=l(this,a,ot).call(this,N),O=T[P];q instanceof Node&&!O.isEqualNode(q)?k.replaceChild(q,O):k.removeChild(O)}}else{const q=l(this,a,ot).call(this,N);q instanceof Node&&n.appendChild(q)}}),Ve.forEach(N=>{k.removeChild(N)}),k.dispatchEvent(new CustomEvent("afterChildrenChange",{bubbles:!0,composed:!0}))}))}else if(i instanceof Ze)l(this,a,nt).call(this,s,i.node);else if(i instanceof Function)l(this,a,qe).call(this,s,vt.isESClass(i)?new i:i());else{const n=l(this,a,rt).call(this,i);n instanceof Node&&l(this,a,nt).call(this,s,n)}}))},nt=function(s,t){!(s instanceof ShadowRoot)&&t instanceof HTMLElement&&t.tagName==="STYLE"?(e(this,$).add(()=>{[...document.head.querySelectorAll("style")].find(n=>n.outerHTML===t.outerHTML)||document.head.appendChild(t)}),e(this,y).add(()=>{t.remove()})):s.appendChild(t)},ot=function(s){return s instanceof Ze?s.node:typeof s=="function"?vt.isESClass(s)?new s:s():l(this,a,rt).call(this,s)},rt=function(s){if(s instanceof Node)return s;if(s!=null){const t=String(s);if(t.trim().startsWith("<")&&t.trim().endsWith(">")){const i=document.createElement("div");return i.innerHTML=t,i.firstElementChild}else return document.createTextNode(t)}else return},Ke=new WeakMap,Oe=new WeakMap;let A=Ze;function p(...r){return new A(...r)}function es(r){return new A("a",r)}function Q(r){return new A("button",r)}function b(r){return new A("div",r)}function De(r){return new A("input",r)}function Nt(r){return new A("label",r)}function ue(r){return new A("slot",r)}function at(r){return new A("span",r)}function Ft(r){return new A("style",{style:r})}function E(r){const s=new CSSStyleSheet;return s.replaceSync(Ft(r).node.innerHTML),s}function ts(r,s){const t=s==null?void 0:s.prefix,i={style:{}};for(const n in r)i[n]={var:`var(--${t}${pe.camelToKebab(n)})`,value:r[n]},i.style[`--${t}${pe.camelToKebab(n)}`]=r[n];return i}const f=ts({colorMain:"#1c1c1c",colorMainAux:"#282828",colorFont:"#ffffff",colorActive:"#00E5B0",borderRadius:"12px",borderRadiusSmall:"4px"},{prefix:"aptechka-"});if(U.isBrowser){const r=Ft({":root":f.style}).node;r.setAttribute("data-permanent",""),document.head.appendChild(r)}const Pt='<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24"><path fill-rule="evenodd" d="M20.536 3.464C19.07 2 16.714 2 12 2C7.286 2 4.929 2 3.464 3.464C2 4.93 2 7.286 2 12c0 4.714 0 7.071 1.464 8.535C4.93 22 7.286 22 12 22c4.714 0 7.071 0 8.535-1.465C22 19.072 22 16.714 22 12s0-7.071-1.465-8.536M16.75 12a.75.75 0 0 1-.75.75H9.81l1.72 1.72a.75.75 0 1 1-1.06 1.06l-3-3a.75.75 0 0 1 0-1.06l3-3a.75.75 0 1 1 1.06 1.06l-1.72 1.72H16a.75.75 0 0 1 .75.75" clip-rule="evenodd"/></svg>',$t='<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24"><path d="M15.24 2h-3.894c-1.764 0-3.162 0-4.255.148c-1.126.152-2.037.472-2.755 1.193c-.719.721-1.038 1.636-1.189 2.766C3 7.205 3 8.608 3 10.379v5.838c0 1.508.92 2.8 2.227 3.342c-.067-.91-.067-2.185-.067-3.247v-5.01c0-1.281 0-2.386.118-3.27c.127-.948.413-1.856 1.147-2.593c.734-.737 1.639-1.024 2.583-1.152c.88-.118 1.98-.118 3.257-.118h3.07c1.276 0 2.374 0 3.255.118A3.601 3.601 0 0 0 15.24 2Z"/><path d="M6.6 11.397c0-2.726 0-4.089.844-4.936c.843-.847 2.2-.847 4.916-.847h2.88c2.715 0 4.073 0 4.917.847c.843.847.843 2.21.843 4.936v4.82c0 2.726 0 4.089-.843 4.936c-.844.847-2.202.847-4.917.847h-2.88c-2.715 0-4.073 0-4.916-.847c-.844-.847-.844-2.21-.844-4.936v-4.82Z"/></svg>',ss='<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>',is='<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>',It=`<svg
|
|
1
|
+
"use strict";var bt=r=>{throw TypeError(r)};var Ge=(r,s,t)=>s.has(r)||bt("Cannot "+t);var e=(r,s,t)=>(Ge(r,s,"read from private field"),t?t.call(r):s.get(r)),o=(r,s,t)=>s.has(r)?bt("Cannot add the same private member more than once"):s instanceof WeakSet?s.add(r):s.set(r,t),c=(r,s,t,i)=>(Ge(r,s,"write to private field"),i?i.call(r,t):s.set(r,t),t),l=(r,s,t)=>(Ge(r,s,"access private method"),t);const U=require("../browser-CpzFX2xg.cjs"),m=require("../Store-CDb6RMce.cjs"),Yt=require("../file-EevnUtRj.cjs"),Gt=require("../function-MthRj-GJ.cjs"),St=require("../gestures-DHLrn6Q8.cjs");require("../ticker/vanilla/index.cjs");const pe=require("../string-DhgS_iFl.cjs"),vt=require("../object-CCiXnER2.cjs"),Ut=require("../connector/index.cjs"),Xt=require("../device/index.cjs"),Qt=require("../math-GDWEqu7y.cjs"),Ue=require("../polyfills-CM4SCDTt.cjs"),yt=require("../element-resizer/vanilla/index.cjs"),jt=require("../style-At6aDoqG.cjs"),es=new Set(["animate","animateMotion","animateTransform","circle","clipPath","defs","desc","ellipse","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","foreignObject","g","image","line","linearGradient","listener","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialGradient","rect","set","solidColor","stop","svg","switch","symbol","text","textPath","title","tspan","view","use"]);var d,$,y,we,I,H,a,kt,Et,xt,Xe,Qe,Ct,Tt,Lt,zt,je,et,Rt,tt,st,Mt,it,qe,nt,ot,rt,Ke,Oe;const Ze=class Ze{constructor(...s){o(this,a);o(this,d,null);o(this,$,new Set);o(this,y,new Set);o(this,we);o(this,I);o(this,H);o(this,Ke,s=>{e(this,$).forEach(t=>{t(s)}),e(this,$).clear()});o(this,Oe,(s,t)=>{e(this,y).forEach(i=>{i(s,t)}),e(this,y).clear(),l(this,a,st).call(this)});if(U.isBrowser){const t=s[0],i=s[1];c(this,d,l(this,a,kt).call(this,t,i==null?void 0:i.forceSvg)),l(this,a,xt).call(this,i)}}get node(){return e(this,d)}set node(s){var t;l(this,a,st).call(this),c(this,d,s),(t=e(this,we))==null||t.call(this),e(this,d)instanceof Element&&c(this,I,[...e(this,d).querySelectorAll("store-root")]),l(this,a,tt).call(this),l(this,a,Xe).call(this)}};d=new WeakMap,$=new WeakMap,y=new WeakMap,we=new WeakMap,I=new WeakMap,H=new WeakMap,a=new WeakSet,kt=function(s,t){let i=null;if(s instanceof Node)i=s;else if(typeof s=="string")if(!s.includes("<")&&s.includes("-"))i=new(customElements.get(s));else if(s.includes("<")){const n=document.createElement("div");n.innerHTML=s,i=n.firstElementChild}else es.has(s)||t?i=document.createElementNS("http://www.w3.org/2000/svg",s):i=document.createElement(s);else i=document.createElement("div");return i},Et=function(s){return s instanceof HTMLElement||s instanceof SVGElement},xt=function(s){if(!s)return;const t=l(this,a,Et).call(this,e(this,d)),i=s.ref;delete s.ref,s!=null&&s.onConnect&&(e(this,$).add(s.onConnect),delete s.onConnect),s!=null&&s.onDisconnect&&(e(this,y).add(s.onDisconnect),delete s.onDisconnect);let n,h;for(const u in s){const g=s[u];u==="class"&&t?l(this,a,Qe).call(this,g):u==="style"&&t?l(this,a,Lt).call(this,g):u==="lightChildren"?l(this,a,qe).call(this,e(this,d),g):u==="children"?l(this,a,qe).call(this,e(this,d)instanceof Element?e(this,d).shadowRoot||e(this,d):e(this,d),g):u==="connectedClass"?e(this,$).add(()=>{requestAnimationFrame(()=>{e(this,d).classList.add(typeof g=="boolean"?"connected":g)})}):u.startsWith("on")?(h||(h={}),h[u]=g):(n||(n={}),n[u]=g)}l(this,a,Mt).call(this,n),l(this,a,Rt).call(this,h),i&&(typeof i=="function"?i(e(this,d)):i.current=e(this,d)),l(this,a,Xe).call(this)},Xe=function(){if(U.isBrowser&&(e(this,y).size||e(this,$).size)){const s=e(this,d)instanceof DocumentFragment?e(this,d).firstChild:e(this,d);c(this,we,Ut.connector.subscribe(s,{connectCallback:e(this,Ke),disconnectCallback:e(this,Oe),unsubscribeAfterDisconnect:!0,maxWaitSec:20}))}},Qe=function(s){if(s){if(typeof s=="string")e(this,d).classList.add(s);else if(Array.isArray(s))s.forEach(t=>{t&&l(this,a,Qe).call(this,t)});else if(typeof s=="object")if(s instanceof m.Store)l(this,a,Ct).call(this,s);else for(const t in s){const i=s[t];i instanceof m.Store?l(this,a,Tt).call(this,t,i):i?e(this,d).classList.add(t):e(this,d).classList.remove(t)}}else return},Ct=function(s){e(this,y).add(s.subscribe(({current:t,previous:i})=>{i&&[i].flat().forEach(n=>{n&&e(this,d).classList.remove(n)}),t&&[t].flat().forEach(n=>{n&&e(this,d).classList.add(n)})}))},Tt=function(s,t){e(this,y).add(t.subscribe(({current:i})=>{i?e(this,d).classList.add(s):e(this,d).classList.remove(s)}))},Lt=function(s){if(!s)return;e(this,d).tagName==="style"||e(this,d).tagName==="STYLE"?l(this,a,je).call(this,s):l(this,a,zt).call(this,s)},zt=function(s){for(const t in s){const i=t,n=s[i];n instanceof m.Store?e(this,y).add(n.subscribe(({current:h})=>{l(this,a,et).call(this,i,h)})):l(this,a,et).call(this,i,n)}},je=function(s){for(const t in s){const i=s[t];if(typeof i=="object"&&!(i instanceof m.Store))e(this,d).appendChild(document.createTextNode(`${t} {`)),l(this,a,je).call(this,i),e(this,d).appendChild(document.createTextNode("}"));else if(i instanceof m.Store){const n=document.createTextNode("");e(this,y).add(i.subscribe(h=>{h.current?n.nodeValue=`${pe.camelToKebab(t)}: ${h.current};`:n.nodeValue=""})),e(this,d).appendChild(n)}else e(this,d).appendChild(document.createTextNode(`${pe.camelToKebab(t)}: ${i};`))}},et=function(s,t){s.includes("--")?t?e(this,d).style.setProperty(s,t.toString()):e(this,d).style.removeProperty(s):t?e(this,d).style[s]=t.toString():e(this,d).style[s]=""},Rt=function(s){if(s){e(this,H)||c(this,H,[]);for(const t in s){const i=t,n=pe.uncapitalize(i.split("on").slice(1).join("on")),h=s[i];typeof h=="object"?e(this,H).push({name:n,callback:h.callback,options:h.options}):typeof h=="function"&&e(this,H).push({name:n,callback:h})}l(this,a,tt).call(this)}},tt=function(){var s;(s=e(this,H))==null||s.forEach(t=>{e(this,d).addEventListener(t.name,t.callback,t.options)})},st=function(){var s;(s=e(this,H))==null||s.forEach(t=>{e(this,d).removeEventListener(t.name,t.callback,t.options)})},Mt=function(s){for(const t in s){const i=s[t];i instanceof m.Store?e(this,y).add(i.subscribe(({current:n})=>{l(this,a,it).call(this,t,n)})):l(this,a,it).call(this,t,i)}},it=function(s,t){var n,h;const i=e(this,d);if(s in i&&!((h=(n=i.constructor)==null?void 0:n.observedAttributes)!=null&&h.includes(s)))t!=null&&(i[s]=t.toString());else if(t!=null){const u=t.toString();s.includes("xlink")?i.setAttributeNS("http://www.w3.org/1999/xlink",s,u):i.setAttribute(s,u)}},qe=function(s,t){t&&(t=[t].flat(),t.forEach(i=>{if(i instanceof m.Store){const n=document.createElement("div");n.style.display="contents",s.appendChild(n),e(this,I)||c(this,I,[]);const h=e(this,I).length;n.setAttribute("store-root",""),e(this,I).push(n),e(this,y).add(i.subscribe(({current:u,previous:g})=>{const k=e(this,I)[h];k.dispatchEvent(new CustomEvent("beforeChildrenChange",{bubbles:!0,composed:!0}));const T=Array.from(k.childNodes),v=Array.isArray(u)?u:[u],ge=Array.isArray(g)?g:[g],Ve=[],x=[];T.length&&ge.forEach((N,P)=>{v.includes(N)?x.push(N):Ve.push(T[P])}),v.forEach((N,P)=>{if(x[P]!=null){if(N!==x[P]){const q=l(this,a,ot).call(this,N),O=T[P];q instanceof Node&&!O.isEqualNode(q)?k.replaceChild(q,O):k.removeChild(O)}}else{const q=l(this,a,ot).call(this,N);q instanceof Node&&n.appendChild(q)}}),Ve.forEach(N=>{k.removeChild(N)}),k.dispatchEvent(new CustomEvent("afterChildrenChange",{bubbles:!0,composed:!0}))}))}else if(i instanceof Ze)l(this,a,nt).call(this,s,i.node);else if(i instanceof Function)l(this,a,qe).call(this,s,vt.isESClass(i)?new i:i());else{const n=l(this,a,rt).call(this,i);n instanceof Node&&l(this,a,nt).call(this,s,n)}}))},nt=function(s,t){!(s instanceof ShadowRoot)&&t instanceof HTMLElement&&t.tagName==="STYLE"?(e(this,$).add(()=>{[...document.head.querySelectorAll("style")].find(n=>n.outerHTML===t.outerHTML)||document.head.appendChild(t)}),e(this,y).add(()=>{t.remove()})):s.appendChild(t)},ot=function(s){return s instanceof Ze?s.node:typeof s=="function"?vt.isESClass(s)?new s:s():l(this,a,rt).call(this,s)},rt=function(s){if(s instanceof Node)return s;if(s!=null){const t=String(s);if(t.trim().startsWith("<")&&t.trim().endsWith(">")){const i=document.createElement("div");return i.innerHTML=t,i.firstElementChild}else return document.createTextNode(t)}else return},Ke=new WeakMap,Oe=new WeakMap;let A=Ze;function p(...r){return new A(...r)}function ts(r){return new A("a",r)}function Q(r){return new A("button",r)}function b(r){return new A("div",r)}function De(r){return new A("input",r)}function At(r){return new A("label",r)}function ue(r){return new A("slot",r)}function at(r){return new A("span",r)}function Nt(r){return new A("style",{style:r})}function E(r){const s=new CSSStyleSheet;return s.replaceSync(Nt(r).node.innerHTML),s}function ss(r,s){const t=s==null?void 0:s.prefix,i={style:{}};for(const n in r)i[n]={var:`var(--${t}${pe.camelToKebab(n)})`,value:r[n]},i.style[`--${t}${pe.camelToKebab(n)}`]=r[n];return i}const f=ss({colorMain:"#1c1c1c",colorMainAux:"#282828",colorFont:"#ffffff",colorActive:"#00E5B0",borderRadius:"12px",borderRadiusSmall:"4px"},{prefix:"aptechka-"});if(U.isBrowser){const r=Nt({":root":f.style}).node;r.setAttribute("data-permanent",""),document.head.appendChild(r)}const Ft='<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24"><path fill-rule="evenodd" d="M20.536 3.464C19.07 2 16.714 2 12 2C7.286 2 4.929 2 3.464 3.464C2 4.93 2 7.286 2 12c0 4.714 0 7.071 1.464 8.535C4.93 22 7.286 22 12 22c4.714 0 7.071 0 8.535-1.465C22 19.072 22 16.714 22 12s0-7.071-1.465-8.536M16.75 12a.75.75 0 0 1-.75.75H9.81l1.72 1.72a.75.75 0 1 1-1.06 1.06l-3-3a.75.75 0 0 1 0-1.06l3-3a.75.75 0 1 1 1.06 1.06l-1.72 1.72H16a.75.75 0 0 1 .75.75" clip-rule="evenodd"/></svg>',Pt='<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24"><path d="M15.24 2h-3.894c-1.764 0-3.162 0-4.255.148c-1.126.152-2.037.472-2.755 1.193c-.719.721-1.038 1.636-1.189 2.766C3 7.205 3 8.608 3 10.379v5.838c0 1.508.92 2.8 2.227 3.342c-.067-.91-.067-2.185-.067-3.247v-5.01c0-1.281 0-2.386.118-3.27c.127-.948.413-1.856 1.147-2.593c.734-.737 1.639-1.024 2.583-1.152c.88-.118 1.98-.118 3.257-.118h3.07c1.276 0 2.374 0 3.255.118A3.601 3.601 0 0 0 15.24 2Z"/><path d="M6.6 11.397c0-2.726 0-4.089.844-4.936c.843-.847 2.2-.847 4.916-.847h2.88c2.715 0 4.073 0 4.917.847c.843.847.843 2.21.843 4.936v4.82c0 2.726 0 4.089-.843 4.936c-.844.847-2.202.847-4.917.847h-2.88c-2.715 0-4.073 0-4.916-.847c-.844-.847-.844-2.21-.844-4.936v-4.82Z"/></svg>',is='<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>',ns='<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24"><path fill-rule="evenodd" d="M2 12c0-4.714 0-7.071 1.464-8.536C4.93 2 7.286 2 12 2c4.714 0 7.071 0 8.535 1.464C22 4.93 22 7.286 22 12c0 4.714 0 7.071-1.465 8.535C19.072 22 16.714 22 12 22s-7.071 0-8.536-1.465C2 19.072 2 16.714 2 12Zm10 5.75a.75.75 0 0 0 .75-.75v-5.19l1.72 1.72a.75.75 0 1 0 1.06-1.06l-3-3a.75.75 0 0 0-1.06 0l-3 3a.75.75 0 1 0 1.06 1.06l1.72-1.72V17c0 .414.336.75.75.75Zm-4-10a.75.75 0 0 1 0-1.5h8a.75.75 0 0 1 0 1.5H8Z" clip-rule="evenodd"/></svg>',$t=`<svg
|
|
2
2
|
xmlns="http://www.w3.org/2000/svg"
|
|
3
3
|
width="32"
|
|
4
4
|
height="32"
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
>
|
|
7
7
|
<path d="m12.37 15.835l6.43-6.63C19.201 8.79 18.958 8 18.43 8H5.57c-.528 0-.771.79-.37 1.205l6.43 6.63c.213.22.527.22.74 0Z" />
|
|
8
8
|
</svg>
|
|
9
|
-
`;var Z,L,D;class ns{constructor(){o(this,Z);o(this,L);o(this,D);this.scrollValue=0,c(this,Z,""),c(this,L,[]),c(this,D,{}),c(this,Z,m.storeRegistry.name+"-tweaker")}openPanel(s){e(this,L).includes(s)||e(this,L).push(s)}closePanel(s){c(this,L,e(this,L).filter(t=>t!==s))}isPanelOpened(s){return e(this,L).includes(s)}changedSizes(s){return e(this,D)[s]}changeSize(s,t){t?e(this,D)[s]=t:delete e(this,D)[s]}save(){const s={openedPanels:e(this,L),changedSizes:e(this,D),scrollValue:this.scrollValue};localStorage.setItem(e(this,Z),JSON.stringify(s)),m.storeRegistry.saveState()}load(){m.storeRegistry.loadState();const s=localStorage.getItem(e(this,Z));if(s)try{const t=JSON.parse(s);t.openedPanels&&c(this,L,t.openedPanels),t.changedSizes&&c(this,D,t.changedSizes),t.scrollValue&&(this.scrollValue=t.scrollValue)}catch(t){console.error(t)}}}Z=new WeakMap,L=new WeakMap,D=new WeakMap;const C=new ns,os='<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 256 256"><path d="m243.33 90.91l-128.41 128.4a16 16 0 0 1-22.63 0l-71.62-72a16 16 0 0 1 0-22.61l24-24a16 16 0 0 1 22.57-.06l36.64 35.27l.11.11l92.73-91.37a16 16 0 0 1 22.58 0l24 23.56a16 16 0 0 1 .03 22.7Z"/></svg>',rs=E({":host":{position:"relative",display:"inline-block",width:"30px",height:"30px",borderRadius:f.borderRadiusSmall.var,overflow:"hidden"},"label, .fake":{display:"block"},"label, .fake, .default":{width:"100%",height:"100%"},".real":{position:"absolute",top:"0",left:"0",width:"0px",height:"0px",visibility:"hidden",margin:"0"},".default":{display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:f.colorMainAux.var},".default svg":{width:"60%",height:"60%",fill:f.colorFont.var,opacity:0,transition:"var(--duration-short)"},":host(.checked) .default svg":{opacity:1}});var B,j,W,me;const mt=class mt extends HTMLElement{constructor(){super();o(this,W);o(this,B,null);o(this,j);this.attachShadow({mode:"open"}).adoptedStyleSheets.push(rs),c(this,j,this.attachInternals()),p(this,{children:Nt({children:[at({class:"fake",children:ue({children:[at({class:"default",children:[os]})]})}),De({ref:i=>{c(this,B,i),i.required=this.hasAttribute("required"),i.value=this.getAttribute("value")||"",i.checked=this.hasAttribute("checked"),i.name=this.getAttribute("name")||"",l(this,W,me).call(this)},class:"real",type:"checkbox",onChange:()=>{l(this,W,me).call(this),this.dispatchEvent(new Event("change",{composed:!0}))}})]})})}get checked(){return e(this,B).checked}set checked(t){e(this,B).checked=t,l(this,W,me).call(this)}get value(){return e(this,B).value}set value(t){e(this,B).value=t,l(this,W,me).call(this)}};B=new WeakMap,j=new WeakMap,W=new WeakSet,me=function(){this.checked?e(this,j).setFormValue(this.value):e(this,j).setFormValue(null),this.classList.toggle("checked",this.checked)},mt.formAssociated=!0;let lt=mt;customElements.get("e-checkbox")||customElements.define("e-checkbox",lt);var _;class fe extends HTMLElement{constructor(...t){super();o(this,_);c(this,_,t)}addStore(t){e(this,_).push(t)}get firstStore(){return e(this,_)[0]}get stores(){return e(this,_)}updateStores(t){e(this,_).forEach(i=>{i.current=t})}}_=new WeakMap;const as=E({":host":{width:"100%",display:"inline-flex",height:"max-content"},"e-checkbox":{"--size":"calc(var(--height-input) * 0.8)",width:"var(--size)",height:"var(--size)",borderRadius:f.borderRadiusSmall.var}});class Ht extends fe{constructor(...s){super(...s),this.attachShadow({mode:"open"}).adoptedStyleSheets.push(as),p(this,{children:[p("e-checkbox",{onChange:i=>{this.updateStores(i.currentTarget.checked)},ref:i=>{this.firstStore.subscribe(n=>{i.checked=n.current})}})]})}}customElements.get("e-tweaker-boolean-manager")||customElements.define("e-tweaker-boolean-manager",Ht);const ls=E({":host":{width:"100%",display:"inline-flex",height:"max-content"},input:{width:"100%",height:"var(--height-input)",padding:"0",background:"none",borderRadius:f.borderRadius.var,border:"none",blockSize:"unset"},"input::-webkit-color-swatch, input::-webkit-color-swatch-wrapper":{boxSizing:"border-box",padding:"0px",border:"none",borderRadius:f.borderRadius.var,height:"calc(var(--height-input) * 0.93)"}});class Dt extends fe{constructor(...s){super(...s),this.attachShadow({mode:"open"}).adoptedStyleSheets.push(ls),p(this,{children:[De({type:"color",value:this.firstStore,onInput:i=>{this.updateStores(i.currentTarget.value)}})]})}}customElements.get("e-tweaker-color-manager")||customElements.define("e-tweaker-color-manager",Dt);const hs=E({a:{color:"inherit",fontSize:"var(--font-size-small)"}});class Vt extends fe{constructor(...s){var i;super(...s),this.attachShadow({mode:"open"}).adoptedStyleSheets.push(hs),p(this,{children:[es({href:this.firstStore,target:(i=this.firstStore.__manager)!=null&&i.sameWindow?"_self":"_blank",children:this.firstStore})]})}}customElements.get("e-tweaker-link-manager")||customElements.define("e-tweaker-link-manager",Vt);const cs=E({":host":{width:"100%",display:"flex",alignItems:"center",gap:"var(--gap-small)"},".inputs-wrapper":{display:"grid",gap:"var(--gap-small)",width:"100%"},input:{boxSizing:"border-box",outline:"none",fontVariantNumeric:"tabular-nums",fontFamily:"inherit",color:"inherit",border:"none",fontSize:"var(--font-size-small)",width:"100%",height:"var(--height-input)",margin:"0",padding:"0 var(--gap-small)",backgroundColor:"rgba(255, 255, 255, 0.1)",borderRadius:f.borderRadius.var},".drag":{position:"relative",width:"100%",height:"calc(var(--height-input) * 0.2)",display:"flex",alignItems:"center"},".drag::before":{content:'""',position:"absolute",left:"0",width:"100%",zIndex:"-1",height:"1px",borderBottom:`1px solid ${f.colorFont.var}`,transform:"translateY(-50%)",opacity:"0.3"},":host(.infinite) .drag::before":{borderBottom:`1px dashed ${f.colorFont.var}`},".drag-knob":{"--size":"calc(var(--height-input) * 0.4)",width:"var(--size)",height:"var(--size)"},".drag-knob-inner":{width:"100%",height:"100%",backgroundColor:f.colorFont.var,borderRadius:f.borderRadiusSmall.var,transition:"opacity var(--duration-short)"},":host(.infinite) .grabbing .drag-knob-inner":{opacity:.3}});var J,ee,te,V,K,be,ve,F,Y,ye,Se,w,X,ht,ct,Be,ke;class qt extends fe{constructor(...t){var n,h,u,g;super(...t);o(this,w);o(this,J,[]);o(this,ee,[]);o(this,te);o(this,V);o(this,K);o(this,be);o(this,ve);o(this,F);o(this,Y,!1);o(this,ye,t=>{const i=l(this,w,X).call(this,t);return i.map((n,h)=>{const u=typeof n=="string"?parseFloat(n)||e(this,V):n,g=Qt.clamp(u,e(this,V),e(this,K)),k=Ue.toStep(g,e(this,te));i[h]=k}),e(this,ve)==="number"?i[0]:i});o(this,Se,()=>{l(this,w,X).call(this).map((t,i)=>{const n=e(this,J)[i];n&&(n.value=(t||0).toString())}),l(this,w,ht).call(this)});o(this,ke,()=>{l(this,w,ht).call(this)});this.attachShadow({mode:"open"}).adoptedStyleSheets.push(cs),c(this,V,Ue.nullishCoalescing((n=this.firstStore.__manager)==null?void 0:n.min,-1/0)),c(this,K,Ue.nullishCoalescing((h=this.firstStore.__manager)==null?void 0:h.max,1/0)),c(this,te,((u=this.firstStore.__manager)==null?void 0:u.step)||.01),c(this,be,((g=this.firstStore.__manager)==null?void 0:g.ease)||1),c(this,ve,Array.isArray(this.firstStore.current)?"array":"number"),c(this,F,isFinite(e(this,K))&&isFinite(e(this,V))),p(this,{class:e(this,F)?"":"infinite",children:l(this,w,X).call(this).map((k,T)=>b({class:"inputs-wrapper",children:[De({type:"number",step:e(this,te),min:e(this,V),max:e(this,K),ref:v=>e(this,J).push(v),value:k,onChange:()=>{this.updateStores(e(this,J).map(v=>parseFloat(v.value)))}}),b({class:"drag",children:[b({class:"drag-knob",ref:v=>e(this,ee).push(v),onPointerdown:v=>{v.preventDefault(),c(this,Y,!0);const ge=l(this,w,X).call(this),Ve=ge[T],x=e(this,ee)[T],N=e(this,J)[T];if(x&&N){const P=x.parentElement,q=l(this,w,ct).call(this);P.classList.add("grabbing"),kt.setupDrag(O=>{const wt=O.x-v.x,Wt=e(this,F)?P.offsetWidth/(q||1):1,Jt=Ve+wt/Wt*e(this,be);if(ge[T]=Jt,!e(this,F)){const Yt=l(this,w,Be).call(this,x,0);x.style.transform=`translateX(${Yt+wt}px)`}this.updateStores([...ge])},()=>{if(c(this,Y,!1),!e(this,F)){const O=l(this,w,Be).call(this,x,0);x.style.transition="transform 0.1s",x.style.transform=`translateX(${O}px)`,P.classList.remove("grabbing"),setTimeout(()=>{x.style.transition=""},100)}})}},children:b({class:"drag-knob-inner"})})]})]}))})}connectedCallback(){this.firstStore.addMiddleware(e(this,ye)),this.firstStore.subscribe(e(this,Se)),yt.elementResizer.subscribe(this,e(this,ke))}disconnectedCallback(){this.firstStore.removeMiddleware(e(this,ye)),this.firstStore.unsubscribe(e(this,Se)),yt.elementResizer.unsubscribe(e(this,ke))}}J=new WeakMap,ee=new WeakMap,te=new WeakMap,V=new WeakMap,K=new WeakMap,be=new WeakMap,ve=new WeakMap,F=new WeakMap,Y=new WeakMap,ye=new WeakMap,Se=new WeakMap,w=new WeakSet,X=function(t=this.firstStore.current){return Array.isArray(t)?t:[t]},ht=function(){l(this,w,X).call(this).map((t,i)=>{const n=e(this,ee)[i];if(n&&(!e(this,Y)||e(this,Y)&&e(this,F))){const h=l(this,w,Be).call(this,n,t);n.style.transform=`translateX(${h}px)`}})},ct=function(){return e(this,F)?e(this,K)-e(this,V):0},Be=function(t,i){const n=t.parentElement,h=l(this,w,ct).call(this),u=h?i/h:.5;return(n.offsetWidth-t.offsetWidth)*u},ke=new WeakMap;customElements.get("e-tweaker-number-manager")||customElements.define("e-tweaker-number-manager",qt);function Bt(r){r.dispatchEvent(new CustomEvent("sizeChange",{bubbles:!0,composed:!0}))}function ds(r){r.dispatchEvent(new CustomEvent("beforeSizeChange",{bubbles:!0,composed:!0}))}const us=E({":host":{position:"relative"},".head":{width:"100%",cursor:"default",background:"none",border:"none",color:"inherit",fontFamily:"inherit",fontSize:"inherit",fontWeight:"inherit",textAlign:"start",padding:"0",margin:"0"},".body":{boxSizing:"border-box",position:"var(--position, unset)",top:"100%",left:"0",width:"100%",overflow:"hidden",transitionDuration:"var(--duration, var(--duration-short))",transitionProperty:"height",cursor:"default"},".body-inner":{display:"grid",gap:"var(--gap, 0px)",width:"100%",paddingTop:"var(--gap, 0px)"}});var se,ie,z,G,ne,oe,We,Ee,ut;const pt=class pt extends HTMLElement{constructor(){super();o(this,Ee);o(this,se,null);o(this,ie,"");o(this,z,null);o(this,G,!1);o(this,ne);o(this,oe,null);o(this,We,()=>{Bt(this)});U.isBrowser&&(this.attachShadow({mode:"open"}).adoptedStyleSheets.push(us),c(this,se,this.attachInternals()),c(this,oe,new ResizeObserver(e(this,We))),p(this,{children:[Q({class:"head",children:ue({name:"head"}),onClick:()=>{this.opened?this.close():this.open()}}),b({class:"body",style:{height:"0px"},children:b({class:"body-inner",children:ue()}),ref:i=>{c(this,z,i)}})]}))}get value(){return e(this,ie)}set value(t){c(this,ie,t),this.dispatchEvent(new Event("change",{bubbles:!0,composed:!0})),e(this,se).setFormValue(e(this,ie))}get internals(){return e(this,se)}get opened(){return e(this,G)}open(){clearTimeout(e(this,ne)),c(this,G,!0),e(this,z).style.display="grid",this.classList.add("triggered"),setTimeout(()=>{this.classList.add("opened"),e(this,z).style.height=e(this,z).scrollHeight+"px",l(this,Ee,ut).call(this)},0)}close(){c(this,G,!1),e(this,z).style.height="0px",this.classList.remove("opened"),l(this,Ee,ut).call(this),c(this,ne,setTimeout(()=>{this.classList.remove("triggered"),e(this,z).style.display="none"},St.getElementTransitionDurationMS(e(this,z))))}connectedCallback(){e(this,oe).observe(e(this,z))}disconnectedCallback(){clearTimeout(e(this,ne)),e(this,oe).disconnect()}};se=new WeakMap,ie=new WeakMap,z=new WeakMap,G=new WeakMap,ne=new WeakMap,oe=new WeakMap,We=new WeakMap,Ee=new WeakSet,ut=function(){ds(this),this.dispatchEvent(new CustomEvent("selectToggle",{bubbles:!0,composed:!0,detail:{opened:e(this,G)}}))},pt.formAssociated=!0;let dt=pt;customElements.get("e-select")||customElements.define("e-select",dt);var xe;class _t extends HTMLElement{constructor(){super(...arguments);o(this,xe,null)}get selectElement(){return e(this,xe)}connectedCallback(){var i,n;const t=(n=(i=this.assignedSlot)==null?void 0:i.getRootNode())==null?void 0:n.host;t?c(this,xe,t):console.log(this,"e-select not found")}}xe=new WeakMap;const fs=E({":host":{width:"100%",height:"40px",display:"inline-flex",alignItems:"center"}});var re,Ce,ft;class gs extends _t{constructor(){super();o(this,Ce);o(this,re,()=>{this.selectElement.value===this.value?this.style.display="none":this.style.display=""});U.isBrowser&&(this.attachShadow({mode:"open"}).adoptedStyleSheets.push(fs),p(this,{tabindex:0,onClick:()=>{l(this,Ce,ft).call(this)},onKeydown:i=>{i.code==="Space"&&l(this,Ce,ft).call(this)},children:ue()}))}get value(){return(this.hasAttribute("value")?this.getAttribute("value"):this.innerText)||""}connectedCallback(){super.connectedCallback(),this.hasAttribute("default")&&(this.selectElement.value||(this.selectElement.value=this.value)),this.selectElement.addEventListener("change",e(this,re)),setTimeout(()=>{e(this,re).call(this)})}disconnectedCallback(){this.selectElement.removeEventListener("change",e(this,re))}}re=new WeakMap,Ce=new WeakSet,ft=function(){this.selectElement.value=this.value,this.selectElement.close()};customElements.get("e-select-option")||customElements.define("e-select-option",gs);const ms=E({":host":{width:"100%",height:"40px",display:"inline-flex",alignItems:"center",justifyContent:"space-between"},".default-arrow":{flexShrink:"0",width:"var(--arrow-size, 1em)",height:"var(--arrow-size, 1em)",fill:`var(--arrow-color, ${f.colorMain.var})`,transitionProperty:"transform",transitionDuration:"var(--duration, var(--duration-short))"},":host(.opened) .default-arrow":{transform:"scaleY(-1)"}});var Te,ae,Le;class ps extends _t{constructor(){super();o(this,Te,null);o(this,ae,()=>{const i=this.selectElement.shadowRoot.querySelector(".body slot").assignedElements().find(n=>n.value===this.selectElement.value);i&&(e(this,Te).innerHTML=i.innerHTML)});o(this,Le,()=>{this.classList.toggle("opened",this.selectElement.opened)});U.isBrowser&&(this.attachShadow({mode:"open"}).adoptedStyleSheets.push(ms),p(this,{children:[ue(),ue({name:"arrow",children:p(It,{class:"default-arrow"})})]}),this.slot="head")}connectedCallback(){super.connectedCallback(),c(this,Te,this.querySelector("[data-value-holder]")||this),this.selectElement.addEventListener("change",e(this,ae)),e(this,ae).call(this),this.selectElement.addEventListener("selectToggle",e(this,Le))}disconnectedCallback(){this.selectElement.removeEventListener("change",e(this,ae)),this.selectElement.removeEventListener("selectToggle",e(this,Le))}}Te=new WeakMap,ae=new WeakMap,Le=new WeakMap;customElements.get("e-select-head")||customElements.define("e-select-head",ps);const ws=E({"e-select":{display:"block",width:"100%","--arrow-color":f.colorFont.var},"e-select-head":{width:"100%",height:"var(--height-input)",display:"flex",alignItems:"center",justifyContent:"space-between",fontSize:"var(--font-size-small)"},"e-select-option":{height:"var(--height-input)",transitionDuration:"var(--duration-short)",transitionProperty:"color",fontSize:"var(--font-size-small)"},"e-select-option:hover":{color:f.colorActive.var},svg:{width:"16px",height:"16px",fill:f.colorFont.var,transitionProperty:"transform",transitionDuration:"var(--duration-short)"},".opened svg":{transform:"scaleY(-1)"}});class Kt extends fe{constructor(...s){var n;super(...s),this.attachShadow({mode:"open"}).adoptedStyleSheets.push(ws);const i=((n=this.firstStore.__manager)==null?void 0:n.variants)||[];p(this,{children:p("e-select",{value:this.firstStore,onChange:h=>{this.updateStores(h.currentTarget.value)},lightChildren:[p("e-select-head",{lightChildren:[at({"data-value-holder":""})]}),...i.map((h,u)=>p("e-select-option",{lightChildren:h,default:u===0?!0:null}))]})})}}customElements.get("e-tweaker-select-manager")||customElements.define("e-tweaker-select-manager",Kt);const bs=E({":host":{width:"100%",display:"flex",alignItems:"center"},input:{boxSizing:"border-box",outline:"none",fontVariantNumeric:"tabular-nums",fontFamily:"inherit",color:"inherit",border:"none",fontSize:"var(--font-size-small)",height:"var(--height-input)",width:"100%",margin:"0",padding:"0 var(--gap-small)",backgroundColor:"rgba(255, 255, 255, 0.1)",borderRadius:f.borderRadius.var}});class Ot extends fe{constructor(...s){super(...s),this.attachShadow({mode:"open"}).adoptedStyleSheets.push(bs),p(this,{children:[De({class:"text-input",type:"string",value:this.firstStore,onChange:i=>{this.updateStores(i.currentTarget.value)}})]})}}customElements.get("e-tweaker-string-manager")||customElements.define("e-tweaker-string-manager",Ot);const vs={boolean:Ht,color:Dt,link:Vt,number:qt,select:Kt,string:Ot},ys=E({":host":{display:"grid",gridAutoFlow:"column",gridTemplateColumns:"0.5fr 1fr",alignItems:"center",color:f.colorFont.var,gap:"var(--gap-medium)"},":host(.disabled)":{pointerEvents:"none",opacity:.5},".head":{fontSize:"var(--font-size-medium)",display:"flex",alignItems:"center",gap:"var(--gap-extra-small)"},".head-buttons":{display:"flex"},".head-button":{width:"14px",height:"14px",padding:"0",margin:"0",border:"none",background:"none",fill:f.colorFont.var,transitionDuration:"var(--duration-short)",transitionProperty:"fill, opacity",opacity:"0"},":host(:hover) .head-button":{opacity:"1"},".head-button:hover":{fill:f.colorActive.var},".head-button svg":{width:"100%",height:"100%"}});var R,le,he,ce,de,ze,Re;class gt extends HTMLElement{constructor(t){var h,u;super();o(this,R,[]);o(this,le);o(this,he);o(this,ce,!1);o(this,de);o(this,ze,()=>{m.activeStores.current.find(t=>e(this,R).includes(t))||this.remove()});o(this,Re,t=>{e(this,ce)&&((t.metaKey||t.ctrlKey)&&t.code==="KeyC"?navigator.clipboard.writeText(e(this,R)[0].current):(t.metaKey||t.ctrlKey)&&t.code==="KeyR"&&(e(this,R).forEach(i=>{i.reset()}),t.preventDefault()))});c(this,R,[t.store]),c(this,le,t.store.name),c(this,he,e(this,le).split(".").slice(-1).toString());const i=((h=t.store.__manager)==null?void 0:h.type)||"string";c(this,de,new vs[i](e(this,R)[0])),this.attachShadow({mode:"open"}).adoptedStyleSheets.push(ys),p(this,{class:{disabled:((u=t.store.__manager)==null?void 0:u.disabled)||!1},onPointerleave:()=>{c(this,ce,!1)},onPointerenter:()=>{c(this,ce,!0)},children:[b({class:"head",children:[b({class:"name",children:e(this,he)+":"}),b({class:"head-buttons",children:[Q({class:"head-button",children:$t,onClick:()=>{navigator.clipboard.writeText(e(this,R)[0].current)}}),Q({class:"head-button",children:Pt,onClick:()=>{e(this,R).forEach(g=>{g.reset()})}})]})]}),e(this,de)]})}get key(){return e(this,le)}get name(){return e(this,he)}get stores(){return e(this,R)}addStore(t){e(this,de).addStore(t)}connectedCallback(){m.activeStores.subscribe(e(this,ze)),addEventListener("keydown",e(this,Re)),Bt(this)}disconnectedCallback(){m.activeStores.unsubscribe(e(this,ze)),removeEventListener("keydown",e(this,Re))}}R=new WeakMap,le=new WeakMap,he=new WeakMap,ce=new WeakMap,de=new WeakMap,ze=new WeakMap,Re=new WeakMap;customElements.get("e-tweaker-field")||customElements.define("e-tweaker-field",gt);const Ss=E({".wrapper":{boxSizing:"border-box",backgroundColor:"rgba(255, 255, 255, 0.1)",borderRadius:f.borderRadius.var},".head":{boxSizing:"border-box",width:"100%",height:"var(--tweaker-folder-height)",paddingLeft:"var(--gap-medium)",paddingRight:"var(--gap-medium)",display:"flex",alignItems:"center",justifyContent:"space-between",backgroundColor:f.colorMainAux.var,borderRadius:f.borderRadius.var},".name":{fontSize:"var(--font-size-large)",color:f.colorFont.var},".body":{display:"none",overflow:"hidden","@supports (height: calc-size(auto))":{height:"0"}},":host(.transition-allowed) .body":{transition:"height var(--duration-short), display var(--duration-short) allow-discrete"},":host(.opened) .body":{height:"calc-size(auto)",display:"block","@starting-style":{height:"0"}},".body-content":{boxSizing:"border-box",padding:"var(--gap-large)",display:"grid",gap:"var(--gap-medium)"},".arrow":{width:"20px",height:"20px",fill:f.colorFont.var,transition:"transform var(--duration-short)"},".opened .arrow":{transform:"scaleY(-1)"}});var M,Me,S,Ae,Ne,Fe,Pe,Je;const Ye=class Ye extends HTMLElement{constructor(t){super();o(this,M);o(this,Me,new m.Store(null));o(this,S,new m.Store([]));o(this,Ae);o(this,Ne,null);o(this,Fe,null);o(this,Pe,null);o(this,Je,t=>{let i=[],n=[];t.forEach(h=>{i=[...i,...h.removedNodes],n=[...n,...h.addedNodes]}),e(this,S).current=e(this,S).current.filter(h=>!i.includes(h)),e(this,M)&&!e(this,S).current.length&&!n.length&&this.remove()});this.attachShadow({mode:"open"}).adoptedStyleSheets.push(Ss),c(this,M,t.key),c(this,Ae,new MutationObserver(e(this,Je))),p(this,{children:[b({class:"wrapper",children:[b({class:"head",onClick:n=>{this.classList.toggle("opened"),this.classList.contains("opened")?C.openPanel(e(this,M)):C.closePanel(e(this,M))},children:[e(this,M)?b({class:"name",children:[e(this,M).split(".").slice(-1).toString()]}):null,e(this,Me),p(It,{class:"arrow"})]}),b({class:"body",ref:n=>{c(this,Ne,n)},children:b({class:"body-content",children:e(this,S),ref:n=>{c(this,Fe,n),c(this,Pe,n.firstElementChild)}})})]})]}),t!=null&&t.storeBox&&this.handleStore(t.storeBox)}get key(){return e(this,M)}get head(){return e(this,Me)}get content(){return e(this,S)}get bodyElement(){return e(this,Ne)}get contentElement(){return e(this,Fe)}connectedCallback(){C.isPanelOpened(e(this,M))&&this.classList.add("opened"),setTimeout(()=>{this.classList.add("transition-allowed")}),e(this,Ae).observe(e(this,Pe),{childList:!0})}handleStore(t){if(t.remainingFolders.length){const n=t.store.name.split("."),h=n.slice(0,n.length-t.remainingFolders.length).join("."),u=e(this,S).current.find(g=>g.key===h);u instanceof Ye?u.handleStore({store:t.store,remainingFolders:t.remainingFolders.slice(1)}):e(this,S).current=[...e(this,S).current,new Ye({key:h,storeBox:{store:t.store,remainingFolders:t.remainingFolders.slice(1)}})]}else{const i=e(this,S).current.find(n=>n.key===t.store.name);i instanceof gt?i.addStore(t.store):e(this,S).current=[...e(this,S).current,new gt({store:t.store})]}}};M=new WeakMap,Me=new WeakMap,S=new WeakMap,Ae=new WeakMap,Ne=new WeakMap,Fe=new WeakMap,Pe=new WeakMap,Je=new WeakMap;let _e=Ye;customElements.get("e-tweaker-folder")||customElements.define("e-tweaker-folder",_e);const ks=E({":host":{"--tweaker-width":"550px","--tweaker-offset":"20px","--tweaker-folder-height":"35px","--height-input":"25px","--gap-large":"12px","--gap-medium":"10px","--gap-small":"8px","--gap-extra-small":"4px","--font-size-large":"16px","--font-size-medium":"14px","--font-size-small":"12px","--duration-short":"0.2s",fontFamily:"sans-serif",position:"absolute",top:"var(--tweaker-offset)",right:"var(--tweaker-offset)",width:"var(--tweaker-width)",backgroundColor:f.colorMain.var,borderRadius:f.borderRadius.var,transition:"opacity 0.1s",zIndex:"100",opacity:"0.1"},":host(:hover)":{opacity:"1 !important"},".resize":{position:"absolute",left:"0",top:"0",width:"calc(var(--tweaker-width) * 0.025)",height:"100%",zIndex:"1",cursor:"ew-resize"},".tweaker-buttons":{display:"flex",alignItems:"center",gap:"var(--gap-extra-small)"},".tweaker-button":{width:"18px",height:"18px",padding:"0",margin:"0",background:"none",border:"none",fill:f.colorFont.var,transitionProperty:"fill",transitionDuration:"var(--duration-short)"},".tweaker-button:hover":{fill:f.colorActive.var},".tweaker-button svg":{width:"100%",height:"100%"},":host .body-content":{maxHeight:`calc(
|
|
9
|
+
`;var Z,L,D;class os{constructor(){o(this,Z);o(this,L);o(this,D);this.scrollValue=0,c(this,Z,""),c(this,L,[]),c(this,D,{}),c(this,Z,m.storeRegistry.name+"-tweaker")}openPanel(s){e(this,L).includes(s)||e(this,L).push(s)}closePanel(s){c(this,L,e(this,L).filter(t=>t!==s))}isPanelOpened(s){return e(this,L).includes(s)}changedSizes(s){return e(this,D)[s]}changeSize(s,t){t?e(this,D)[s]=t:delete e(this,D)[s]}save(){const s={openedPanels:e(this,L),changedSizes:e(this,D),scrollValue:this.scrollValue};localStorage.setItem(e(this,Z),JSON.stringify(s)),m.storeRegistry.saveState()}load(){m.storeRegistry.loadState();const s=localStorage.getItem(e(this,Z));if(s)try{const t=JSON.parse(s);t.openedPanels&&c(this,L,t.openedPanels),t.changedSizes&&c(this,D,t.changedSizes),t.scrollValue&&(this.scrollValue=t.scrollValue)}catch(t){console.error(t)}}}Z=new WeakMap,L=new WeakMap,D=new WeakMap;const C=new os,rs='<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 256 256"><path d="m243.33 90.91l-128.41 128.4a16 16 0 0 1-22.63 0l-71.62-72a16 16 0 0 1 0-22.61l24-24a16 16 0 0 1 22.57-.06l36.64 35.27l.11.11l92.73-91.37a16 16 0 0 1 22.58 0l24 23.56a16 16 0 0 1 .03 22.7Z"/></svg>',as=E({":host":{position:"relative",display:"inline-block",width:"30px",height:"30px",borderRadius:f.borderRadiusSmall.var,overflow:"hidden"},"label, .fake":{display:"block"},"label, .fake, .default":{width:"100%",height:"100%"},".real":{position:"absolute",top:"0",left:"0",width:"0px",height:"0px",visibility:"hidden",margin:"0"},".default":{display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:f.colorMainAux.var},".default svg":{width:"60%",height:"60%",fill:f.colorFont.var,opacity:0,transition:"var(--duration-short)"},":host(.checked) .default svg":{opacity:1}});var B,j,W,me;const mt=class mt extends HTMLElement{constructor(){super();o(this,W);o(this,B,null);o(this,j);this.attachShadow({mode:"open"}).adoptedStyleSheets.push(as),c(this,j,this.attachInternals()),p(this,{children:At({children:[at({class:"fake",children:ue({children:[at({class:"default",children:[rs]})]})}),De({ref:i=>{c(this,B,i),i.required=this.hasAttribute("required"),i.value=this.getAttribute("value")||"",i.checked=this.hasAttribute("checked"),i.name=this.getAttribute("name")||"",l(this,W,me).call(this)},class:"real",type:"checkbox",onChange:()=>{l(this,W,me).call(this),this.dispatchEvent(new Event("change",{composed:!0}))}})]})})}get checked(){return e(this,B).checked}set checked(t){e(this,B).checked=t,l(this,W,me).call(this)}get value(){return e(this,B).value}set value(t){e(this,B).value=t,l(this,W,me).call(this)}};B=new WeakMap,j=new WeakMap,W=new WeakSet,me=function(){this.checked?e(this,j).setFormValue(this.value):e(this,j).setFormValue(null),this.classList.toggle("checked",this.checked)},mt.formAssociated=!0;let lt=mt;customElements.get("e-checkbox")||customElements.define("e-checkbox",lt);var _;class fe extends HTMLElement{constructor(...t){super();o(this,_);c(this,_,t)}addStore(t){e(this,_).push(t)}get firstStore(){return e(this,_)[0]}get stores(){return e(this,_)}updateStores(t){e(this,_).forEach(i=>{i.current=t})}}_=new WeakMap;const ls=E({":host":{width:"100%",display:"inline-flex",height:"max-content"},"e-checkbox":{"--size":"calc(var(--height-input) * 0.8)",width:"var(--size)",height:"var(--size)",borderRadius:f.borderRadiusSmall.var}});class It extends fe{constructor(...s){super(...s),this.attachShadow({mode:"open"}).adoptedStyleSheets.push(ls),p(this,{children:[p("e-checkbox",{onChange:i=>{this.updateStores(i.currentTarget.checked)},ref:i=>{this.firstStore.subscribe(n=>{i.checked=n.current})}})]})}}customElements.get("e-tweaker-boolean-manager")||customElements.define("e-tweaker-boolean-manager",It);const hs=E({":host":{width:"100%",display:"inline-flex",height:"max-content"},input:{width:"100%",height:"var(--height-input)",padding:"0",background:"none",borderRadius:f.borderRadius.var,border:"none",blockSize:"unset"},"input::-webkit-color-swatch, input::-webkit-color-swatch-wrapper":{boxSizing:"border-box",padding:"0px",border:"none",borderRadius:f.borderRadius.var,height:"calc(var(--height-input) * 0.93)"}});class Ht extends fe{constructor(...s){super(...s),this.attachShadow({mode:"open"}).adoptedStyleSheets.push(hs),p(this,{children:[De({type:"color",value:this.firstStore,onInput:i=>{this.updateStores(i.currentTarget.value)}})]})}}customElements.get("e-tweaker-color-manager")||customElements.define("e-tweaker-color-manager",Ht);const cs=E({a:{color:"inherit",fontSize:"var(--font-size-small)"}});class Dt extends fe{constructor(...s){var i;super(...s),this.attachShadow({mode:"open"}).adoptedStyleSheets.push(cs),p(this,{children:[ts({href:this.firstStore,target:(i=this.firstStore.__manager)!=null&&i.sameWindow?"_self":"_blank",children:this.firstStore})]})}}customElements.get("e-tweaker-link-manager")||customElements.define("e-tweaker-link-manager",Dt);const ds=E({":host":{width:"100%",display:"flex",alignItems:"center",gap:"var(--gap-small)"},".inputs-wrapper":{display:"grid",gap:"var(--gap-small)",width:"100%"},input:{boxSizing:"border-box",outline:"none",fontVariantNumeric:"tabular-nums",fontFamily:"inherit",color:"inherit",border:"none",fontSize:"var(--font-size-small)",width:"100%",height:"var(--height-input)",margin:"0",padding:"0 var(--gap-small)",backgroundColor:"rgba(255, 255, 255, 0.1)",borderRadius:f.borderRadius.var},".drag":{position:"relative",width:"100%",height:"calc(var(--height-input) * 0.2)",display:"flex",alignItems:"center"},".drag::before":{content:'""',position:"absolute",left:"0",width:"100%",zIndex:"-1",height:"1px",borderBottom:`1px solid ${f.colorFont.var}`,transform:"translateY(-50%)",opacity:"0.3"},":host(.infinite) .drag::before":{borderBottom:`1px dashed ${f.colorFont.var}`},".drag-knob":{"--size":"calc(var(--height-input) * 0.4)",width:"var(--size)",height:"var(--size)"},".drag-knob-inner":{width:"100%",height:"100%",backgroundColor:f.colorFont.var,borderRadius:f.borderRadiusSmall.var,transition:"opacity var(--duration-short)"},":host(.infinite) .grabbing .drag-knob-inner":{opacity:.3}});var J,ee,te,V,K,be,ve,F,Y,ye,Se,w,X,ht,ct,Be,ke;class Vt extends fe{constructor(...t){var n,h,u,g;super(...t);o(this,w);o(this,J,[]);o(this,ee,[]);o(this,te);o(this,V);o(this,K);o(this,be);o(this,ve);o(this,F);o(this,Y,!1);o(this,ye,t=>{const i=l(this,w,X).call(this,t);return i.map((n,h)=>{const u=typeof n=="string"?parseFloat(n)||e(this,V):n,g=Qt.clamp(u,e(this,V),e(this,K)),k=Ue.toStep(g,e(this,te));i[h]=k}),e(this,ve)==="number"?i[0]:i});o(this,Se,()=>{l(this,w,X).call(this).map((t,i)=>{const n=e(this,J)[i];n&&(n.value=(t||0).toString())}),l(this,w,ht).call(this)});o(this,ke,()=>{l(this,w,ht).call(this)});this.attachShadow({mode:"open"}).adoptedStyleSheets.push(ds),c(this,V,Ue.nullishCoalescing((n=this.firstStore.__manager)==null?void 0:n.min,-1/0)),c(this,K,Ue.nullishCoalescing((h=this.firstStore.__manager)==null?void 0:h.max,1/0)),c(this,te,((u=this.firstStore.__manager)==null?void 0:u.step)||.01),c(this,be,((g=this.firstStore.__manager)==null?void 0:g.ease)||1),c(this,ve,Array.isArray(this.firstStore.current)?"array":"number"),c(this,F,isFinite(e(this,K))&&isFinite(e(this,V))),p(this,{class:e(this,F)?"":"infinite",children:l(this,w,X).call(this).map((k,T)=>b({class:"inputs-wrapper",children:[De({type:"number",step:e(this,te),min:e(this,V),max:e(this,K),ref:v=>e(this,J).push(v),value:k,onChange:()=>{this.updateStores(e(this,J).map(v=>parseFloat(v.value)))}}),b({class:"drag",children:[b({class:"drag-knob",ref:v=>e(this,ee).push(v),onPointerdown:v=>{v.preventDefault(),c(this,Y,!0);const ge=l(this,w,X).call(this),Ve=ge[T],x=e(this,ee)[T],N=e(this,J)[T];if(x&&N){const P=x.parentElement,q=l(this,w,ct).call(this);P.classList.add("grabbing"),St.setupDrag(O=>{const wt=O.x-v.x,Zt=e(this,F)?P.offsetWidth/(q||1):1,Wt=Ve+wt/Zt*e(this,be);if(ge[T]=Wt,!e(this,F)){const Jt=l(this,w,Be).call(this,x,0);x.style.transform=`translateX(${Jt+wt}px)`}this.updateStores([...ge])},()=>{if(c(this,Y,!1),!e(this,F)){const O=l(this,w,Be).call(this,x,0);x.style.transition="transform 0.1s",x.style.transform=`translateX(${O}px)`,P.classList.remove("grabbing"),setTimeout(()=>{x.style.transition=""},100)}})}},children:b({class:"drag-knob-inner"})})]})]}))})}connectedCallback(){this.firstStore.addMiddleware(e(this,ye)),this.firstStore.subscribe(e(this,Se)),yt.elementResizer.subscribe(this,e(this,ke))}disconnectedCallback(){this.firstStore.removeMiddleware(e(this,ye)),this.firstStore.unsubscribe(e(this,Se)),yt.elementResizer.unsubscribe(e(this,ke))}}J=new WeakMap,ee=new WeakMap,te=new WeakMap,V=new WeakMap,K=new WeakMap,be=new WeakMap,ve=new WeakMap,F=new WeakMap,Y=new WeakMap,ye=new WeakMap,Se=new WeakMap,w=new WeakSet,X=function(t=this.firstStore.current){return Array.isArray(t)?t:[t]},ht=function(){l(this,w,X).call(this).map((t,i)=>{const n=e(this,ee)[i];if(n&&(!e(this,Y)||e(this,Y)&&e(this,F))){const h=l(this,w,Be).call(this,n,t);n.style.transform=`translateX(${h}px)`}})},ct=function(){return e(this,F)?e(this,K)-e(this,V):0},Be=function(t,i){const n=t.parentElement,h=l(this,w,ct).call(this),u=h?i/h:.5;return(n.offsetWidth-t.offsetWidth)*u},ke=new WeakMap;customElements.get("e-tweaker-number-manager")||customElements.define("e-tweaker-number-manager",Vt);function qt(r){r.dispatchEvent(new CustomEvent("sizeChange",{bubbles:!0,composed:!0}))}function us(r){r.dispatchEvent(new CustomEvent("beforeSizeChange",{bubbles:!0,composed:!0}))}const fs=E({":host":{position:"relative"},".head":{width:"100%",cursor:"default",background:"none",border:"none",color:"inherit",fontFamily:"inherit",fontSize:"inherit",fontWeight:"inherit",textAlign:"start",padding:"0",margin:"0"},".body":{boxSizing:"border-box",position:"var(--position, unset)",top:"100%",left:"0",width:"100%",overflow:"hidden",transitionDuration:"var(--duration, var(--duration-short))",transitionProperty:"height",cursor:"default"},".body-inner":{display:"grid",gap:"var(--gap, 0px)",width:"100%",paddingTop:"var(--gap, 0px)"}});var se,ie,z,G,ne,oe,We,Ee,ut;const pt=class pt extends HTMLElement{constructor(){super();o(this,Ee);o(this,se,null);o(this,ie,"");o(this,z,null);o(this,G,!1);o(this,ne);o(this,oe,null);o(this,We,()=>{qt(this)});U.isBrowser&&(this.attachShadow({mode:"open"}).adoptedStyleSheets.push(fs),c(this,se,this.attachInternals()),c(this,oe,new ResizeObserver(e(this,We))),p(this,{children:[Q({class:"head",children:ue({name:"head"}),onClick:()=>{this.opened?this.close():this.open()}}),b({class:"body",style:{height:"0px"},children:b({class:"body-inner",children:ue()}),ref:i=>{c(this,z,i)}})]}))}get value(){return e(this,ie)}set value(t){c(this,ie,t),this.dispatchEvent(new Event("change",{bubbles:!0,composed:!0})),e(this,se).setFormValue(e(this,ie))}get internals(){return e(this,se)}get opened(){return e(this,G)}open(){clearTimeout(e(this,ne)),c(this,G,!0),e(this,z).style.display="grid",this.classList.add("triggered"),setTimeout(()=>{this.classList.add("opened"),e(this,z).style.height=e(this,z).scrollHeight+"px",l(this,Ee,ut).call(this)},0)}close(){c(this,G,!1),e(this,z).style.height="0px",this.classList.remove("opened"),l(this,Ee,ut).call(this),c(this,ne,setTimeout(()=>{this.classList.remove("triggered"),e(this,z).style.display="none"},jt.getElementTransitionDurationMS(e(this,z))))}connectedCallback(){e(this,oe).observe(e(this,z))}disconnectedCallback(){clearTimeout(e(this,ne)),e(this,oe).disconnect()}};se=new WeakMap,ie=new WeakMap,z=new WeakMap,G=new WeakMap,ne=new WeakMap,oe=new WeakMap,We=new WeakMap,Ee=new WeakSet,ut=function(){us(this),this.dispatchEvent(new CustomEvent("selectToggle",{bubbles:!0,composed:!0,detail:{opened:e(this,G)}}))},pt.formAssociated=!0;let dt=pt;customElements.get("e-select")||customElements.define("e-select",dt);var xe;class Bt extends HTMLElement{constructor(){super(...arguments);o(this,xe,null)}get selectElement(){return e(this,xe)}connectedCallback(){var i,n;const t=(n=(i=this.assignedSlot)==null?void 0:i.getRootNode())==null?void 0:n.host;t?c(this,xe,t):console.log(this,"e-select not found")}}xe=new WeakMap;const gs=E({":host":{width:"100%",height:"40px",display:"inline-flex",alignItems:"center"}});var re,Ce,ft;class ms extends Bt{constructor(){super();o(this,Ce);o(this,re,()=>{this.selectElement.value===this.value?this.style.display="none":this.style.display=""});U.isBrowser&&(this.attachShadow({mode:"open"}).adoptedStyleSheets.push(gs),p(this,{tabindex:0,onClick:()=>{l(this,Ce,ft).call(this)},onKeydown:i=>{i.code==="Space"&&l(this,Ce,ft).call(this)},children:ue()}))}get value(){return(this.hasAttribute("value")?this.getAttribute("value"):this.innerText)||""}connectedCallback(){super.connectedCallback(),this.hasAttribute("default")&&(this.selectElement.value||(this.selectElement.value=this.value)),this.selectElement.addEventListener("change",e(this,re)),setTimeout(()=>{e(this,re).call(this)})}disconnectedCallback(){this.selectElement.removeEventListener("change",e(this,re))}}re=new WeakMap,Ce=new WeakSet,ft=function(){this.selectElement.value=this.value,this.selectElement.close()};customElements.get("e-select-option")||customElements.define("e-select-option",ms);const ps=E({":host":{width:"100%",height:"40px",display:"inline-flex",alignItems:"center",justifyContent:"space-between"},".default-arrow":{flexShrink:"0",width:"var(--arrow-size, 1em)",height:"var(--arrow-size, 1em)",fill:`var(--arrow-color, ${f.colorMain.var})`,transitionProperty:"transform",transitionDuration:"var(--duration, var(--duration-short))"},":host(.opened) .default-arrow":{transform:"scaleY(-1)"}});var Te,ae,Le;class ws extends Bt{constructor(){super();o(this,Te,null);o(this,ae,()=>{const i=this.selectElement.shadowRoot.querySelector(".body slot").assignedElements().find(n=>n.value===this.selectElement.value);i&&(e(this,Te).innerHTML=i.innerHTML)});o(this,Le,()=>{this.classList.toggle("opened",this.selectElement.opened)});U.isBrowser&&(this.attachShadow({mode:"open"}).adoptedStyleSheets.push(ps),p(this,{children:[ue(),ue({name:"arrow",children:p($t,{class:"default-arrow"})})]}),this.slot="head")}connectedCallback(){super.connectedCallback(),c(this,Te,this.querySelector("[data-value-holder]")||this),this.selectElement.addEventListener("change",e(this,ae)),e(this,ae).call(this),this.selectElement.addEventListener("selectToggle",e(this,Le))}disconnectedCallback(){this.selectElement.removeEventListener("change",e(this,ae)),this.selectElement.removeEventListener("selectToggle",e(this,Le))}}Te=new WeakMap,ae=new WeakMap,Le=new WeakMap;customElements.get("e-select-head")||customElements.define("e-select-head",ws);const bs=E({"e-select":{display:"block",width:"100%","--arrow-color":f.colorFont.var},"e-select-head":{width:"100%",height:"var(--height-input)",display:"flex",alignItems:"center",justifyContent:"space-between",fontSize:"var(--font-size-small)"},"e-select-option":{height:"var(--height-input)",transitionDuration:"var(--duration-short)",transitionProperty:"color",fontSize:"var(--font-size-small)"},"e-select-option:hover":{color:f.colorActive.var},svg:{width:"16px",height:"16px",fill:f.colorFont.var,transitionProperty:"transform",transitionDuration:"var(--duration-short)"},".opened svg":{transform:"scaleY(-1)"}});class _t extends fe{constructor(...s){var n;super(...s),this.attachShadow({mode:"open"}).adoptedStyleSheets.push(bs);const i=((n=this.firstStore.__manager)==null?void 0:n.variants)||[];p(this,{children:p("e-select",{value:this.firstStore,onChange:h=>{this.updateStores(h.currentTarget.value)},lightChildren:[p("e-select-head",{lightChildren:[at({"data-value-holder":""})]}),...i.map((h,u)=>p("e-select-option",{lightChildren:h,default:u===0?!0:null}))]})})}}customElements.get("e-tweaker-select-manager")||customElements.define("e-tweaker-select-manager",_t);const vs=E({":host":{width:"100%",display:"flex",alignItems:"center"},input:{boxSizing:"border-box",outline:"none",fontVariantNumeric:"tabular-nums",fontFamily:"inherit",color:"inherit",border:"none",fontSize:"var(--font-size-small)",height:"var(--height-input)",width:"100%",margin:"0",padding:"0 var(--gap-small)",backgroundColor:"rgba(255, 255, 255, 0.1)",borderRadius:f.borderRadius.var}});class Kt extends fe{constructor(...s){super(...s),this.attachShadow({mode:"open"}).adoptedStyleSheets.push(vs),p(this,{children:[De({class:"text-input",type:"string",value:this.firstStore,onChange:i=>{this.updateStores(i.currentTarget.value)}})]})}}customElements.get("e-tweaker-string-manager")||customElements.define("e-tweaker-string-manager",Kt);const ys={boolean:It,color:Ht,link:Dt,number:Vt,select:_t,string:Kt},Ss=E({":host":{display:"grid",gridAutoFlow:"column",gridTemplateColumns:"0.5fr 1fr",alignItems:"center",color:f.colorFont.var,gap:"var(--gap-medium)"},":host(.disabled)":{pointerEvents:"none",opacity:.5},".head":{fontSize:"var(--font-size-medium)",display:"flex",alignItems:"center",gap:"var(--gap-extra-small)"},".head-buttons":{display:"flex"},".head-button":{width:"14px",height:"14px",padding:"0",margin:"0",border:"none",background:"none",fill:f.colorFont.var,transitionDuration:"var(--duration-short)",transitionProperty:"fill, opacity",opacity:"0"},":host(:hover) .head-button":{opacity:"1"},".head-button:hover":{fill:f.colorActive.var},".head-button svg":{width:"100%",height:"100%"}});var R,le,he,ce,de,ze,Re;class gt extends HTMLElement{constructor(t){var h,u;super();o(this,R,[]);o(this,le);o(this,he);o(this,ce,!1);o(this,de);o(this,ze,()=>{m.activeStores.current.find(t=>e(this,R).includes(t))||this.remove()});o(this,Re,t=>{e(this,ce)&&((t.metaKey||t.ctrlKey)&&t.code==="KeyC"?navigator.clipboard.writeText(e(this,R)[0].current):(t.metaKey||t.ctrlKey)&&t.code==="KeyR"&&(e(this,R).forEach(i=>{i.reset()}),t.preventDefault()))});c(this,R,[t.store]),c(this,le,t.store.name),c(this,he,e(this,le).split(".").slice(-1).toString());const i=((h=t.store.__manager)==null?void 0:h.type)||"string";c(this,de,new ys[i](e(this,R)[0])),this.attachShadow({mode:"open"}).adoptedStyleSheets.push(Ss),p(this,{class:{disabled:((u=t.store.__manager)==null?void 0:u.disabled)||!1},onPointerleave:()=>{c(this,ce,!1)},onPointerenter:()=>{c(this,ce,!0)},children:[b({class:"head",children:[b({class:"name",children:e(this,he)+":"}),b({class:"head-buttons",children:[Q({class:"head-button",children:Pt,onClick:()=>{navigator.clipboard.writeText(e(this,R)[0].current)}}),Q({class:"head-button",children:Ft,onClick:()=>{e(this,R).forEach(g=>{g.reset()})}})]})]}),e(this,de)]})}get key(){return e(this,le)}get name(){return e(this,he)}get stores(){return e(this,R)}addStore(t){e(this,de).addStore(t)}connectedCallback(){m.activeStores.subscribe(e(this,ze)),addEventListener("keydown",e(this,Re)),qt(this)}disconnectedCallback(){m.activeStores.unsubscribe(e(this,ze)),removeEventListener("keydown",e(this,Re))}}R=new WeakMap,le=new WeakMap,he=new WeakMap,ce=new WeakMap,de=new WeakMap,ze=new WeakMap,Re=new WeakMap;customElements.get("e-tweaker-field")||customElements.define("e-tweaker-field",gt);const ks=E({".wrapper":{boxSizing:"border-box",backgroundColor:"rgba(255, 255, 255, 0.1)",borderRadius:f.borderRadius.var},".head":{boxSizing:"border-box",width:"100%",height:"var(--tweaker-folder-height)",paddingLeft:"var(--gap-medium)",paddingRight:"var(--gap-medium)",display:"flex",alignItems:"center",justifyContent:"space-between",backgroundColor:f.colorMainAux.var,borderRadius:f.borderRadius.var},".name":{fontSize:"var(--font-size-large)",color:f.colorFont.var},".body":{display:"none",overflow:"hidden","@supports (height: calc-size(auto))":{height:"0"}},":host(.transition-allowed) .body":{transition:"height var(--duration-short), display var(--duration-short) allow-discrete"},":host(.opened) .body":{height:"calc-size(auto)",display:"block","@starting-style":{height:"0"}},".body-content":{boxSizing:"border-box",padding:"var(--gap-large)",display:"grid",gap:"var(--gap-medium)"},".arrow":{width:"20px",height:"20px",fill:f.colorFont.var,transition:"transform var(--duration-short)"},".opened .arrow":{transform:"scaleY(-1)"}});var M,Me,S,Ae,Ne,Fe,Pe,Je;const Ye=class Ye extends HTMLElement{constructor(t){super();o(this,M);o(this,Me,new m.Store(null));o(this,S,new m.Store([]));o(this,Ae);o(this,Ne,null);o(this,Fe,null);o(this,Pe,null);o(this,Je,t=>{let i=[],n=[];t.forEach(h=>{i=[...i,...h.removedNodes],n=[...n,...h.addedNodes]}),e(this,S).current=e(this,S).current.filter(h=>!i.includes(h)),e(this,M)&&!e(this,S).current.length&&!n.length&&this.remove()});this.attachShadow({mode:"open"}).adoptedStyleSheets.push(ks),c(this,M,t.key),c(this,Ae,new MutationObserver(e(this,Je))),p(this,{children:[b({class:"wrapper",children:[b({class:"head",onClick:n=>{this.classList.toggle("opened"),this.classList.contains("opened")?C.openPanel(e(this,M)):C.closePanel(e(this,M))},children:[e(this,M)?b({class:"name",children:[e(this,M).split(".").slice(-1).toString()]}):null,e(this,Me),p($t,{class:"arrow"})]}),b({class:"body",ref:n=>{c(this,Ne,n)},children:b({class:"body-content",children:e(this,S),ref:n=>{c(this,Fe,n),c(this,Pe,n.firstElementChild)}})})]})]}),t!=null&&t.storeBox&&this.handleStore(t.storeBox)}get key(){return e(this,M)}get head(){return e(this,Me)}get content(){return e(this,S)}get bodyElement(){return e(this,Ne)}get contentElement(){return e(this,Fe)}connectedCallback(){C.isPanelOpened(e(this,M))&&this.classList.add("opened"),setTimeout(()=>{this.classList.add("transition-allowed")}),e(this,Ae).observe(e(this,Pe),{childList:!0})}handleStore(t){if(t.remainingFolders.length){const n=t.store.name.split("."),h=n.slice(0,n.length-t.remainingFolders.length).join("."),u=e(this,S).current.find(g=>g.key===h);u instanceof Ye?u.handleStore({store:t.store,remainingFolders:t.remainingFolders.slice(1)}):e(this,S).current=[...e(this,S).current,new Ye({key:h,storeBox:{store:t.store,remainingFolders:t.remainingFolders.slice(1)}})]}else{const i=e(this,S).current.find(n=>n.key===t.store.name);i instanceof gt?i.addStore(t.store):e(this,S).current=[...e(this,S).current,new gt({store:t.store})]}}};M=new WeakMap,Me=new WeakMap,S=new WeakMap,Ae=new WeakMap,Ne=new WeakMap,Fe=new WeakMap,Pe=new WeakMap,Je=new WeakMap;let _e=Ye;customElements.get("e-tweaker-folder")||customElements.define("e-tweaker-folder",_e);const Es=E({":host":{"--tweaker-width":"550px","--tweaker-offset":"20px","--tweaker-folder-height":"35px","--height-input":"25px","--gap-large":"12px","--gap-medium":"10px","--gap-small":"8px","--gap-extra-small":"4px","--font-size-large":"16px","--font-size-medium":"14px","--font-size-small":"12px","--duration-short":"0.2s",fontFamily:"sans-serif",position:"absolute",top:"var(--tweaker-offset)",right:"var(--tweaker-offset)",width:"var(--tweaker-width)",backgroundColor:f.colorMain.var,borderRadius:f.borderRadius.var,transition:"opacity 0.1s",zIndex:"100",opacity:"0.1"},":host(:hover)":{opacity:"1 !important"},".resize":{position:"absolute",left:"0",top:"0",width:"calc(var(--tweaker-width) * 0.025)",height:"100%",zIndex:"1",cursor:"ew-resize"},".tweaker-buttons":{display:"flex",alignItems:"center",gap:"var(--gap-extra-small)"},".tweaker-button":{width:"18px",height:"18px",padding:"0",margin:"0",background:"none",border:"none",fill:f.colorFont.var,transitionProperty:"fill",transitionDuration:"var(--duration-short)"},".tweaker-button:hover":{fill:f.colorActive.var},".tweaker-button svg":{width:"100%",height:"100%"},":host .body-content":{maxHeight:`calc(
|
|
10
10
|
100dvh -
|
|
11
11
|
(
|
|
12
12
|
var(--tweaker-offset) * 2 +
|
|
@@ -15,4 +15,4 @@
|
|
|
15
15
|
)`,overflow:"hidden auto","-ms-overflow-style":"none","scrollbar-width":"none"},":host .body-content::-webkit-scrollbar":{display:"none"},[`@media ${Xt.ViewportMediaRules["<=mobile"]}`]:{":host":{position:"absolute",top:"0",right:"0",width:"100% !important",borderTopLeftRadius:"0",borderTopRightRadius:"0"},":host .body-content":{maxHeight:`calc(
|
|
16
16
|
100dvh -
|
|
17
17
|
var(--tweaker-folder-height)
|
|
18
|
-
)`}}});var $e,Ie,He;class
|
|
18
|
+
)`}}});var $e,Ie,He;class Ot extends _e{constructor(){super({key:""});o(this,$e,!1);o(this,Ie,()=>{C.save()});o(this,He,Gt.debounce(()=>{m.activeStores.current.forEach(t=>{if(t.name){const i=t.name.split(".");this.handleStore({store:t,remainingFolders:i.length>1?i.slice(0,-1):[]})}}),e(this,$e)||(c(this,$e,!0),this.contentElement.scroll({top:C.scrollValue}),this.contentElement.addEventListener("scroll",()=>{C.scrollValue=this.contentElement.scrollTop}))},10));C.load(),this.shadowRoot.adoptedStyleSheets.push(Es),this.head.current=[b({class:"tweaker-buttons",onClick:t=>{t.stopPropagation()},children:[Q({class:"tweaker-button",children:Ft,onClick:()=>{m.storeRegistry.resetState()}}),Q({class:["tweaker-button"],children:[Pt],onClick:()=>{navigator.clipboard.writeText(JSON.stringify(m.storeRegistry.getState()))}}),Q({class:"tweaker-button",children:is,onClick:()=>{Yt.createJSONAndSave(m.storeRegistry.name,m.storeRegistry.getState())}}),At({class:"tweaker-button",children:[ns,De({type:"file",style:{display:"none"},onChange:t=>{var h;const n=(h=t.currentTarget.files)==null?void 0:h[0];if(n){const u=new FileReader;u.onload=g=>{var T,v;const k=(v=(T=g.target)==null?void 0:T.result)==null?void 0:v.toString();k&&m.storeRegistry.loadState(k)},u.readAsText(n)}}})]})]})],p(this.bodyElement,{children:[b({class:"resize",onPointerdown:t=>{t.preventDefault();const i=this.getBoundingClientRect(),n=this.contentElement.scrollTop;St.setupDrag(h=>{const u=t.x-h.x,g=Math.max(400,i.width+u);this.style.width=g+"px",C.changeSize("tweaker",g)},()=>{setTimeout(()=>{this.contentElement.scroll({top:n})},10)})},onDblclick:()=>{this.style.width="",C.changeSize("tweaker",null)}})]})}connectedCallback(){super.connectedCallback(),window.addEventListener("beforeunload",e(this,Ie)),m.activeStores.subscribe(e(this,He)),C.changedSizes("tweaker")&&(this.style.width=C.changedSizes("tweaker")+"px")}disconnectedCallback(){window.removeEventListener("beforeunload",e(this,Ie)),C.save(),m.activeStores.unsubscribe(e(this,He))}}$e=new WeakMap,Ie=new WeakMap,He=new WeakMap;customElements.get("e-tweaker")||customElements.define("e-tweaker",Ot);U.isBrowser&&document.body.appendChild(new Ot);
|
|
@@ -5,17 +5,18 @@ var Xe = (r, s, t) => s.has(r) || vt("Cannot " + t);
|
|
|
5
5
|
var e = (r, s, t) => (Xe(r, s, "read from private field"), t ? t.call(r) : s.get(r)), o = (r, s, t) => s.has(r) ? vt("Cannot add the same private member more than once") : s instanceof WeakSet ? s.add(r) : s.set(r, t), c = (r, s, t, i) => (Xe(r, s, "write to private field"), i ? i.call(r, t) : s.set(r, t), t), l = (r, s, t) => (Xe(r, s, "access private method"), t);
|
|
6
6
|
import { i as X } from "../browser-0zX67oeU.js";
|
|
7
7
|
import { S as P, s as B, a as j } from "../Store-OTdcl6SX.js";
|
|
8
|
-
import {
|
|
9
|
-
import { d as
|
|
8
|
+
import { c as Ut } from "../file-lxi_oXJf.js";
|
|
9
|
+
import { d as Xt } from "../function-C10DGppn.js";
|
|
10
10
|
import { s as Et } from "../gestures-D2Fdra_G.js";
|
|
11
11
|
import "../ticker/vanilla/index.js";
|
|
12
|
-
import { c as Oe, u as
|
|
12
|
+
import { c as Oe, u as Qt } from "../string-f0Dnk0L1.js";
|
|
13
13
|
import { i as yt } from "../object-D6MVWB4l.js";
|
|
14
|
-
import { connector as
|
|
15
|
-
import { ViewportMediaRules as
|
|
16
|
-
import { c as
|
|
17
|
-
import { n as St, t as
|
|
14
|
+
import { connector as jt } from "../connector/index.js";
|
|
15
|
+
import { ViewportMediaRules as es } from "../device/index.js";
|
|
16
|
+
import { c as ts } from "../math-BOBiC4TN.js";
|
|
17
|
+
import { n as St, t as ss } from "../polyfills-X6KXuHg-.js";
|
|
18
18
|
import { elementResizer as kt } from "../element-resizer/vanilla/index.js";
|
|
19
|
+
import { g as is } from "../style-j2TwriJ_.js";
|
|
19
20
|
const ns = /* @__PURE__ */ new Set([
|
|
20
21
|
// 'a', 'style', 'title', 'script',
|
|
21
22
|
"animate",
|
|
@@ -154,7 +155,7 @@ d = new WeakMap(), $ = new WeakMap(), v = new WeakMap(), be = new WeakMap(), I =
|
|
|
154
155
|
}, Qe = function() {
|
|
155
156
|
if (X && (e(this, v).size || e(this, $).size)) {
|
|
156
157
|
const s = e(this, d) instanceof DocumentFragment ? e(this, d).firstChild : e(this, d);
|
|
157
|
-
c(this, be,
|
|
158
|
+
c(this, be, jt.subscribe(
|
|
158
159
|
s,
|
|
159
160
|
{
|
|
160
161
|
connectCallback: e(this, We),
|
|
@@ -235,7 +236,7 @@ d = new WeakMap(), $ = new WeakMap(), v = new WeakMap(), be = new WeakMap(), I =
|
|
|
235
236
|
if (s) {
|
|
236
237
|
e(this, H) || c(this, H, []);
|
|
237
238
|
for (const t in s) {
|
|
238
|
-
const i = t, n =
|
|
239
|
+
const i = t, n = Qt(
|
|
239
240
|
i.split("on").slice(1).join("on")
|
|
240
241
|
), h = s[i];
|
|
241
242
|
typeof h == "object" ? e(this, H).push({
|
|
@@ -767,7 +768,7 @@ class Bt extends ge {
|
|
|
767
768
|
o(this, Se, (t) => {
|
|
768
769
|
const i = l(this, p, Q).call(this, t);
|
|
769
770
|
return i.map((n, h) => {
|
|
770
|
-
const u = typeof n == "string" ? parseFloat(n) || e(this, V) : n, m =
|
|
771
|
+
const u = typeof n == "string" ? parseFloat(n) || e(this, V) : n, m = ts(u, e(this, V), e(this, Z)), S = ss(m, e(this, ie));
|
|
771
772
|
i[h] = S;
|
|
772
773
|
}), e(this, ye) === "number" ? i[0] : i;
|
|
773
774
|
});
|
|
@@ -978,7 +979,7 @@ const wt = class wt extends HTMLElement {
|
|
|
978
979
|
close() {
|
|
979
980
|
c(this, U, !1), e(this, T).style.height = "0px", this.classList.remove("opened"), l(this, xe, ft).call(this), c(this, re, setTimeout(() => {
|
|
980
981
|
this.classList.remove("triggered"), e(this, T).style.display = "none";
|
|
981
|
-
},
|
|
982
|
+
}, is(e(this, T))));
|
|
982
983
|
}
|
|
983
984
|
connectedCallback() {
|
|
984
985
|
e(this, ae).observe(e(this, T));
|
|
@@ -1598,7 +1599,7 @@ const Ts = k({
|
|
|
1598
1599
|
":host .body-content::-webkit-scrollbar": {
|
|
1599
1600
|
display: "none"
|
|
1600
1601
|
},
|
|
1601
|
-
[`@media ${
|
|
1602
|
+
[`@media ${es["<=mobile"]}`]: {
|
|
1602
1603
|
":host": {
|
|
1603
1604
|
position: "absolute",
|
|
1604
1605
|
top: "0",
|
|
@@ -1625,7 +1626,7 @@ class qt extends Ze {
|
|
|
1625
1626
|
o(this, He, () => {
|
|
1626
1627
|
x.save();
|
|
1627
1628
|
});
|
|
1628
|
-
o(this, De,
|
|
1629
|
+
o(this, De, Xt(() => {
|
|
1629
1630
|
j.current.forEach((t) => {
|
|
1630
1631
|
if (t.name) {
|
|
1631
1632
|
const i = t.name.split(".");
|
|
@@ -1667,7 +1668,7 @@ class qt extends Ze {
|
|
|
1667
1668
|
class: "tweaker-button",
|
|
1668
1669
|
children: as,
|
|
1669
1670
|
onClick: () => {
|
|
1670
|
-
|
|
1671
|
+
Ut(B.name, B.getState());
|
|
1671
1672
|
}
|
|
1672
1673
|
}),
|
|
1673
1674
|
Ft({
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { PopoverElement } from './PopoverElement';
|
|
2
|
+
|
|
3
|
+
export type PopoverButtonType = 'open' | 'close' | 'toggle';
|
|
4
|
+
export declare class PopoverButtonElement extends HTMLElement {
|
|
5
|
+
#private;
|
|
6
|
+
constructor();
|
|
7
|
+
get popoverElement(): PopoverElement | undefined;
|
|
8
|
+
protected connectedCallback(): void;
|
|
9
|
+
protected disconnectedCallback(): void;
|
|
10
|
+
}
|
|
11
|
+
declare global {
|
|
12
|
+
interface HTMLElementTagNameMap {
|
|
13
|
+
'e-popover-button': PopoverButtonElement;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { Attribute } from '../attribute';
|
|
2
|
+
import { Store } from '../store/vanilla';
|
|
3
|
+
|
|
4
|
+
export interface PopoverEvents {
|
|
5
|
+
popoverTriggered: CustomEvent;
|
|
6
|
+
popoverOpened: CustomEvent;
|
|
7
|
+
popoverClosing: CustomEvent;
|
|
8
|
+
popoverClosed: CustomEvent;
|
|
9
|
+
}
|
|
10
|
+
export declare class PopoverElement extends HTMLElement {
|
|
11
|
+
#private;
|
|
12
|
+
private static __opened;
|
|
13
|
+
get history(): Attribute<false>;
|
|
14
|
+
get single(): Attribute<false>;
|
|
15
|
+
get opened(): Store<boolean>;
|
|
16
|
+
open: (useTransition?: boolean) => void;
|
|
17
|
+
close: () => void;
|
|
18
|
+
protected connectedCallback(): void;
|
|
19
|
+
protected disconnectedCallback(): void;
|
|
20
|
+
}
|
|
21
|
+
declare global {
|
|
22
|
+
interface HTMLElementTagNameMap {
|
|
23
|
+
'e-popover': PopoverElement;
|
|
24
|
+
}
|
|
25
|
+
interface HTMLElementEventMap extends PopoverEvents {
|
|
26
|
+
}
|
|
27
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var x=i=>{throw TypeError(i)};var A=(i,o,t)=>o.has(i)||x("Cannot "+t);var e=(i,o,t)=>(A(i,o,"read from private field"),t?t.call(i):o.get(i)),r=(i,o,t)=>o.has(i)?x("Cannot add the same private member more than once"):o instanceof WeakSet?o.add(i):o.set(i,t),h=(i,o,t,a)=>(A(i,o,"write to private field"),a?a.call(i,t):o.set(i,t),t),q=(i,o,t)=>(A(i,o,"access private method"),t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const H=require("../attribute/index.cjs"),I=require("../Store-CDb6RMce.cjs"),C=require("../events-KVanG9sR.cjs"),P=require("../style-At6aDoqG.cjs"),B=require("../browser-CpzFX2xg.cjs");var f,l,y,p,d,u,g,$,E,L,M,v;const c=class c extends HTMLElement{constructor(){super(...arguments);r(this,g);r(this,f);r(this,l);r(this,y);r(this,p);r(this,d);r(this,u);r(this,E);r(this,L);r(this,v);h(this,f,-1),h(this,l,new I.Store(!1)),h(this,p,new H.Attribute(this,"history",!1)),h(this,d,new H.Attribute(this,"single",!1)),h(this,u,!1),this.open=(t=!0)=>{if(e(this,l).current)return;e(this,l).current=!0,e(this,d).current&&(c.__opened.forEach(n=>n.close()),c.__opened=[]),c.__opened.push(this),h(this,f,c.__opened.length-1),e(this,p).current&&e(this,u)&&history.pushState("","",e(this,g,$)),clearTimeout(e(this,y)),this.classList.add("triggered"),this.style.display="block",C.dispatchEvent(this,"popoverTriggered",{custom:!0});const a=()=>{addEventListener("click",e(this,E)),addEventListener("keydown",e(this,L)),this.style.opacity="1",this.classList.add("opened"),C.dispatchEvent(this,"popoverOpened",{custom:!0})};t?setTimeout(a):a()},this.close=()=>{if(e(this,l).current){if(e(this,l).current=!1,c.__opened=c.__opened.filter(t=>t!==this),e(this,p).current){const t=new URL(location.href);t.searchParams.delete(this.id),history.replaceState(null,"",t.href)}this.classList.remove("opened"),this.style.opacity="0",C.dispatchEvent(this,"popoverClosing",{custom:!0}),removeEventListener("click",e(this,E)),removeEventListener("keydown",e(this,L)),setTimeout(()=>{this.classList.remove("triggered"),this.style.display="none",C.dispatchEvent(this,"popoverClosed",{custom:!0})},P.getElementTransitionDurationMS(this)+10)}},h(this,E,t=>{q(this,g,M).call(this,()=>{var O;const n=t.composedPath()[0],S=n instanceof HTMLElement&&(this.contains(n)||((O=this.shadowRoot)==null?void 0:O.contains(n))),m=n instanceof HTMLElement&&n.hasAttribute("outside");(!S||m)&&this.close()})}),h(this,L,t=>{q(this,g,M).call(this,()=>{t.code==="Escape"&&this.close()})}),h(this,v,()=>{h(this,u,!1),e(this,l).current&&e(this,p).current&&!location.search.includes(this.id)?this.close():!e(this,l).current&&e(this,p).current&&location.search.includes(this.id)&&this.open(),h(this,u,!0)})}get history(){return e(this,p)}get single(){return e(this,d)}get opened(){return e(this,l)}connectedCallback(){e(this,p).observe(),e(this,d).observe(),this.style.opacity="0",this.style.display="none",this.setAttribute("popover-target",""),addEventListener("popstate",e(this,v)),setTimeout(()=>{e(this,v).call(this)},0)}disconnectedCallback(){e(this,p).unobserve(),e(this,d).unobserve(),this.style.opacity="",this.style.display="",this.removeAttribute("popover-target"),c.__opened=c.__opened.filter(t=>t!==this),clearTimeout(e(this,y)),removeEventListener("popstate",e(this,v))}};f=new WeakMap,l=new WeakMap,y=new WeakMap,p=new WeakMap,d=new WeakMap,u=new WeakMap,g=new WeakSet,$=function(){return`${location.pathname}${location.search?location.search+"&":"?"}${this.id}`},E=new WeakMap,L=new WeakMap,M=function(t){(c.__opened[e(this,f)-1]||c.__opened.length===1)&&t()},v=new WeakMap,c.__opened=[];let _=c;customElements.get("e-popover")||customElements.define("e-popover",_);var s,b,T,w,k;class R extends HTMLElement{constructor(){super();r(this,s);r(this,b,()=>{this.classList.add("triggered")});r(this,T,()=>{this.classList.add("opened")});r(this,w,()=>{this.classList.remove("opened")});r(this,k,()=>{this.classList.remove("triggered")});B.isBrowser&&(this.addEventListener("click",()=>{if(e(this,s)){const t=this.getAttribute("type")||"open";t==="open"||t==="toggle"&&!e(this,s).opened.current?e(this,s).open():(t==="close"||t==="toggle"&&e(this,s).opened.current)&&e(this,s).close()}}),this.addEventListener("keydown",t=>{t.code==="Space"&&t.currentTarget.click()}))}get popoverElement(){return e(this,s)}connectedCallback(){var a;this.hasAttribute("tabindex")||(this.tabIndex=0);const t=this.getAttribute("target");if(t){let n=null;if(t==="parent"){const S=this.closest("[popover-target]");if(S)n=S;else{const m=this.getRootNode();m instanceof ShadowRoot?n=m.host.closest("[popover-target]"):m instanceof HTMLElement&&(n=m.closest("[popover-target]"))}}else t==="sibling"?n=(a=this.parentElement)==null?void 0:a.querySelector("[popover-target]"):n=document.querySelector(`#${t}`)||this.getRootNode().querySelector(`#${t}`);n instanceof HTMLElement?(h(this,s,n),e(this,s).addEventListener("popoverTriggered",e(this,b)),e(this,s).addEventListener("popoverOpened",e(this,T)),e(this,s).addEventListener("popoverClosing",e(this,w)),e(this,s).addEventListener("popoverClosed",e(this,k))):console.warn(this,`target ${t} not found`)}}disconnectedCallback(){e(this,s)&&(e(this,s).removeEventListener("popoverTriggered",e(this,b)),e(this,s).removeEventListener("popoverOpened",e(this,T)),e(this,s).removeEventListener("popoverClosing",e(this,w)),e(this,s).removeEventListener("popoverClosed",e(this,k)))}}s=new WeakMap,b=new WeakMap,T=new WeakMap,w=new WeakMap,k=new WeakMap;customElements.get("e-popover-button")||customElements.define("e-popover-button",R);exports.PopoverButtonElement=R;exports.PopoverElement=_;
|
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
var O = (i) => {
|
|
2
|
+
throw TypeError(i);
|
|
3
|
+
};
|
|
4
|
+
var _ = (i, o, t) => o.has(i) || O("Cannot " + t);
|
|
5
|
+
var e = (i, o, t) => (_(i, o, "read from private field"), t ? t.call(i) : o.get(i)), r = (i, o, t) => o.has(i) ? O("Cannot add the same private member more than once") : o instanceof WeakSet ? o.add(i) : o.set(i, t), h = (i, o, t, a) => (_(i, o, "write to private field"), a ? a.call(i, t) : o.set(i, t), t), A = (i, o, t) => (_(i, o, "access private method"), t);
|
|
6
|
+
import { Attribute as $ } from "../attribute/index.js";
|
|
7
|
+
import { S as I } from "../Store-OTdcl6SX.js";
|
|
8
|
+
import { d as S } from "../events-CsVF98U6.js";
|
|
9
|
+
import { g as q } from "../style-j2TwriJ_.js";
|
|
10
|
+
import { i as N } from "../browser-0zX67oeU.js";
|
|
11
|
+
var f, c, y, l, d, u, g, R, L, E, x, v;
|
|
12
|
+
const p = class p extends HTMLElement {
|
|
13
|
+
constructor() {
|
|
14
|
+
super(...arguments);
|
|
15
|
+
r(this, g);
|
|
16
|
+
r(this, f);
|
|
17
|
+
r(this, c);
|
|
18
|
+
r(this, y);
|
|
19
|
+
r(this, l);
|
|
20
|
+
r(this, d);
|
|
21
|
+
r(this, u);
|
|
22
|
+
r(this, L);
|
|
23
|
+
r(this, E);
|
|
24
|
+
r(this, v);
|
|
25
|
+
h(this, f, -1), h(this, c, new I(!1)), h(this, l, new $(this, "history", !1)), h(this, d, new $(this, "single", !1)), h(this, u, !1), this.open = (t = !0) => {
|
|
26
|
+
if (e(this, c).current)
|
|
27
|
+
return;
|
|
28
|
+
e(this, c).current = !0, e(this, d).current && (p.__opened.forEach((n) => n.close()), p.__opened = []), p.__opened.push(this), h(this, f, p.__opened.length - 1), e(this, l).current && e(this, u) && history.pushState("", "", e(this, g, R)), clearTimeout(e(this, y)), this.classList.add("triggered"), this.style.display = "block", S(this, "popoverTriggered", {
|
|
29
|
+
custom: !0
|
|
30
|
+
});
|
|
31
|
+
const a = () => {
|
|
32
|
+
addEventListener("click", e(this, L)), addEventListener("keydown", e(this, E)), this.style.opacity = "1", this.classList.add("opened"), S(this, "popoverOpened", {
|
|
33
|
+
custom: !0
|
|
34
|
+
});
|
|
35
|
+
};
|
|
36
|
+
t ? setTimeout(a) : a();
|
|
37
|
+
}, this.close = () => {
|
|
38
|
+
if (e(this, c).current) {
|
|
39
|
+
if (e(this, c).current = !1, p.__opened = p.__opened.filter((t) => t !== this), e(this, l).current) {
|
|
40
|
+
const t = new URL(location.href);
|
|
41
|
+
t.searchParams.delete(this.id), history.replaceState(null, "", t.href);
|
|
42
|
+
}
|
|
43
|
+
this.classList.remove("opened"), this.style.opacity = "0", S(this, "popoverClosing", {
|
|
44
|
+
custom: !0
|
|
45
|
+
}), removeEventListener("click", e(this, L)), removeEventListener("keydown", e(this, E)), setTimeout(() => {
|
|
46
|
+
this.classList.remove("triggered"), this.style.display = "none", S(this, "popoverClosed", {
|
|
47
|
+
custom: !0
|
|
48
|
+
});
|
|
49
|
+
}, q(this) + 10);
|
|
50
|
+
}
|
|
51
|
+
}, h(this, L, (t) => {
|
|
52
|
+
A(this, g, x).call(this, () => {
|
|
53
|
+
var H;
|
|
54
|
+
const n = t.composedPath()[0], C = n instanceof HTMLElement && (this.contains(n) || ((H = this.shadowRoot) == null ? void 0 : H.contains(n))), m = n instanceof HTMLElement && n.hasAttribute("outside");
|
|
55
|
+
(!C || m) && this.close();
|
|
56
|
+
});
|
|
57
|
+
}), h(this, E, (t) => {
|
|
58
|
+
A(this, g, x).call(this, () => {
|
|
59
|
+
t.code === "Escape" && this.close();
|
|
60
|
+
});
|
|
61
|
+
}), h(this, v, () => {
|
|
62
|
+
h(this, u, !1), e(this, c).current && e(this, l).current && !location.search.includes(this.id) ? this.close() : !e(this, c).current && e(this, l).current && location.search.includes(this.id) && this.open(), h(this, u, !0);
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
get history() {
|
|
66
|
+
return e(this, l);
|
|
67
|
+
}
|
|
68
|
+
get single() {
|
|
69
|
+
return e(this, d);
|
|
70
|
+
}
|
|
71
|
+
get opened() {
|
|
72
|
+
return e(this, c);
|
|
73
|
+
}
|
|
74
|
+
connectedCallback() {
|
|
75
|
+
e(this, l).observe(), e(this, d).observe(), this.style.opacity = "0", this.style.display = "none", this.setAttribute("popover-target", ""), addEventListener("popstate", e(this, v)), setTimeout(() => {
|
|
76
|
+
e(this, v).call(this);
|
|
77
|
+
}, 0);
|
|
78
|
+
}
|
|
79
|
+
disconnectedCallback() {
|
|
80
|
+
e(this, l).unobserve(), e(this, d).unobserve(), this.style.opacity = "", this.style.display = "", this.removeAttribute("popover-target"), p.__opened = p.__opened.filter((t) => t !== this), clearTimeout(e(this, y)), removeEventListener("popstate", e(this, v));
|
|
81
|
+
}
|
|
82
|
+
};
|
|
83
|
+
f = new WeakMap(), c = new WeakMap(), y = new WeakMap(), l = new WeakMap(), d = new WeakMap(), u = new WeakMap(), g = new WeakSet(), R = function() {
|
|
84
|
+
return `${location.pathname}${location.search ? location.search + "&" : "?"}${this.id}`;
|
|
85
|
+
}, L = new WeakMap(), E = new WeakMap(), x = function(t) {
|
|
86
|
+
(p.__opened[e(this, f) - 1] || p.__opened.length === 1) && t();
|
|
87
|
+
}, v = new WeakMap(), p.__opened = [];
|
|
88
|
+
let M = p;
|
|
89
|
+
customElements.get("e-popover") || customElements.define("e-popover", M);
|
|
90
|
+
var s, b, T, k, w;
|
|
91
|
+
class B extends HTMLElement {
|
|
92
|
+
constructor() {
|
|
93
|
+
super();
|
|
94
|
+
r(this, s);
|
|
95
|
+
r(this, b, () => {
|
|
96
|
+
this.classList.add("triggered");
|
|
97
|
+
});
|
|
98
|
+
r(this, T, () => {
|
|
99
|
+
this.classList.add("opened");
|
|
100
|
+
});
|
|
101
|
+
r(this, k, () => {
|
|
102
|
+
this.classList.remove("opened");
|
|
103
|
+
});
|
|
104
|
+
r(this, w, () => {
|
|
105
|
+
this.classList.remove("triggered");
|
|
106
|
+
});
|
|
107
|
+
N && (this.addEventListener("click", () => {
|
|
108
|
+
if (e(this, s)) {
|
|
109
|
+
const t = this.getAttribute("type") || "open";
|
|
110
|
+
t === "open" || t === "toggle" && !e(this, s).opened.current ? e(this, s).open() : (t === "close" || t === "toggle" && e(this, s).opened.current) && e(this, s).close();
|
|
111
|
+
}
|
|
112
|
+
}), this.addEventListener("keydown", (t) => {
|
|
113
|
+
t.code === "Space" && t.currentTarget.click();
|
|
114
|
+
}));
|
|
115
|
+
}
|
|
116
|
+
get popoverElement() {
|
|
117
|
+
return e(this, s);
|
|
118
|
+
}
|
|
119
|
+
connectedCallback() {
|
|
120
|
+
var a;
|
|
121
|
+
this.hasAttribute("tabindex") || (this.tabIndex = 0);
|
|
122
|
+
const t = this.getAttribute("target");
|
|
123
|
+
if (t) {
|
|
124
|
+
let n = null;
|
|
125
|
+
if (t === "parent") {
|
|
126
|
+
const C = this.closest("[popover-target]");
|
|
127
|
+
if (C)
|
|
128
|
+
n = C;
|
|
129
|
+
else {
|
|
130
|
+
const m = this.getRootNode();
|
|
131
|
+
m instanceof ShadowRoot ? n = m.host.closest("[popover-target]") : m instanceof HTMLElement && (n = m.closest("[popover-target]"));
|
|
132
|
+
}
|
|
133
|
+
} else t === "sibling" ? n = (a = this.parentElement) == null ? void 0 : a.querySelector("[popover-target]") : n = document.querySelector(`#${t}`) || this.getRootNode().querySelector(`#${t}`);
|
|
134
|
+
n instanceof HTMLElement ? (h(this, s, n), e(this, s).addEventListener(
|
|
135
|
+
"popoverTriggered",
|
|
136
|
+
e(this, b)
|
|
137
|
+
), e(this, s).addEventListener(
|
|
138
|
+
"popoverOpened",
|
|
139
|
+
e(this, T)
|
|
140
|
+
), e(this, s).addEventListener(
|
|
141
|
+
"popoverClosing",
|
|
142
|
+
e(this, k)
|
|
143
|
+
), e(this, s).addEventListener(
|
|
144
|
+
"popoverClosed",
|
|
145
|
+
e(this, w)
|
|
146
|
+
)) : console.warn(this, `target ${t} not found`);
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
disconnectedCallback() {
|
|
150
|
+
e(this, s) && (e(this, s).removeEventListener(
|
|
151
|
+
"popoverTriggered",
|
|
152
|
+
e(this, b)
|
|
153
|
+
), e(this, s).removeEventListener(
|
|
154
|
+
"popoverOpened",
|
|
155
|
+
e(this, T)
|
|
156
|
+
), e(this, s).removeEventListener(
|
|
157
|
+
"popoverClosing",
|
|
158
|
+
e(this, k)
|
|
159
|
+
), e(this, s).removeEventListener(
|
|
160
|
+
"popoverClosed",
|
|
161
|
+
e(this, w)
|
|
162
|
+
));
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
s = new WeakMap(), b = new WeakMap(), T = new WeakMap(), k = new WeakMap(), w = new WeakMap();
|
|
166
|
+
customElements.get("e-popover-button") || customElements.define("e-popover-button", B);
|
|
167
|
+
export {
|
|
168
|
+
B as PopoverButtonElement,
|
|
169
|
+
M as PopoverElement
|
|
170
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";function n(t){return parseFloat(getComputedStyle(t).transitionDuration||"")}function e(t){return n(t)*1e3}exports.getElementTransitionDurationMS=e;exports.getElementTransitionDurationS=n;
|
package/lib/utils/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const b=require("../attributes-Bf2svn4j.cjs"),E=require("../browser-CpzFX2xg.cjs"),l=require("../canvas-CU5Xjahf.cjs"),d=require("../coordinates-D8Np3cPD.cjs"),m=require("../dom-JBOkFLTh.cjs"),s=require("../easings-DsS5-Kqc.cjs"),S=require("../events-KVanG9sR.cjs"),I=require("../file-EevnUtRj.cjs"),h=require("../function-MthRj-GJ.cjs"),T=require("../gestures-DHLrn6Q8.cjs"),C=require("../jss-GJLvaNfT.cjs"),f=require("../layout-8ryRAMGJ.cjs"),i=require("../math-GDWEqu7y.cjs"),p=require("../polyfills-CM4SCDTt.cjs"),r=require("../object-CCiXnER2.cjs"),u=require("../string-DhgS_iFl.cjs"),O=require("../style-At6aDoqG.cjs"),g=require("../url-qZNgg7IM.cjs");function P(t,e,...n){return[...t.slice(0,e),...n,...t.slice(e)]}function q(t,e){const n=t.length;e=e%n;const a=new Array(n);for(let o=0;o<n;o++){const c=(o+e)%n;a[c]=t[o]}return a}function v(t,e=2){if(!+t)return"0 Bytes";const n=1024,a=e<0?0:e,o=["Bytes","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],c=Math.floor(Math.log(t)/Math.log(n));return`${parseFloat((t/Math.pow(n,c)).toFixed(a))} ${o[c]}`}function w(t,e){return t.x<e.x+e.width&&t.x>e.x&&t.y<e.y+e.height&&t.y>e.y}function x(t,e){return Math.sqrt((t.x-e.x)**2+(t.y-e.y)**2)<e.radius}function y(t,e){const n=t.style.getPropertyValue(e);if(n){const a=n.toString();return a.startsWith("var")?y(t,a.slice(4,-1)):a}}function Q(...t){const e={};return Array.from(document.styleSheets).forEach(n=>{Array.from(n.cssRules).forEach(a=>{a instanceof CSSStyleRule&&a.selectorText===":root"&&t.forEach(o=>{const c=y(a,o);c&&(e[o]=c)})})}),t.forEach(n=>{e[n]||console.warn(`variable named ${n} not found`)}),e}function B(t){const e=window.atob(t);return decodeURIComponent(window.escape(e))}function D(t){const e=window.unescape(encodeURIComponent(t));return window.btoa(e)}function A(t){return new Promise(e=>{setTimeout(()=>{e()},t)})}exports.parseAttribute=b.parseAttribute;exports.parseAttributeValue=b.parseAttributeValue;exports.isBrowser=E.isBrowser;exports.contain=l.contain;exports.cover=l.cover;exports.fixPosition=l.fixPosition;exports.measureText=l.measureText;exports.getPointerPosition=d.getPointerPosition;exports.normalize=d.normalize;exports.screenToCartesian=d.screenToCartesian;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.dispatchEvent=S.dispatchEvent;exports.createJSONAndSave=I.createJSONAndSave;exports.debounce=h.debounce;exports.throttle=h.throttle;exports.setupDrag=T.setupDrag;exports.createStylesheet=C.createStylesheet;exports.styleToString=C.styleToString;exports.getCumulativeOffsetLeft=f.getCumulativeOffsetLeft;exports.getCumulativeOffsetTop=f.getCumulativeOffsetTop;exports.getCumulativePosition=f.getCumulativePosition;exports.calculateDistance=i.calculateDistance;exports.calculateDistanceWithRadius=i.calculateDistanceWithRadius;exports.clamp=i.clamp;exports.damp=i.damp;exports.lerp=i.lerp;exports.mapRange=i.mapRange;exports.round=i.round;exports.smootherstep=i.smootherstep;exports.smoothstep=i.smoothstep;exports.step=i.step;exports.nullishCoalescing=p.nullishCoalescing;exports.preciseNumber=p.preciseNumber;exports.roundNumberTo=p.roundNumberTo;exports.toStep=p.toStep;exports.cloneDeep=r.cloneDeep;exports.compareObjects=r.compareObjects;exports.isESClass=r.isESClass;exports.isNullish=r.isNullish;exports.isObject=r.isObject;exports.mergeDeep=r.mergeDeep;exports.mixin=r.mixin;exports.omit=r.omit;exports.pick=r.pick;exports.camelToKebab=u.camelToKebab;exports.capitalize=u.capitalize;exports.generateId=u.generateId;exports.isUppercase=u.isUppercase;exports.kebabToCamel=u.kebabToCamel;exports.snakeToDotted=u.snakeToDotted;exports.toPascalCase=u.toPascalCase;exports.uncapitalize=u.uncapitalize;exports.getElementTransitionDurationMS=O.getElementTransitionDurationMS;exports.getElementTransitionDurationS=O.getElementTransitionDurationS;exports.changeHistory=g.changeHistory;exports.normalizeBase=g.normalizeBase;exports.splitPath=g.splitPath;exports.decode=D;exports.dotCircleCollision=x;exports.dotRectCollision=w;exports.encode=B;exports.formatBytes=v;exports.getRootVariables=Q;exports.insert=P;exports.shiftArray=q;exports.wait=A;
|
package/lib/utils/index.js
CHANGED
|
@@ -5,16 +5,17 @@ import { g as T, n as v, s as A } from "../coordinates-CgdGoSYs.js";
|
|
|
5
5
|
import { f as D, b as R, a as M, g as k } from "../dom-0S_WDL4g.js";
|
|
6
6
|
import { c as V, n as j, f as N, p as U, b as $, i as F, m as K, e as W, g as q, j as G, d as H, o as J, a as L, h as Y, k as Z, l as X } from "../easings-BKi40vHz.js";
|
|
7
7
|
import { d as ee } from "../events-CsVF98U6.js";
|
|
8
|
-
import { c as te
|
|
9
|
-
import { d as
|
|
10
|
-
import { s as
|
|
11
|
-
import { c as
|
|
12
|
-
import { g as
|
|
13
|
-
import { e as
|
|
14
|
-
import { n as
|
|
15
|
-
import { c as
|
|
16
|
-
import { c as
|
|
17
|
-
import {
|
|
8
|
+
import { c as te } from "../file-lxi_oXJf.js";
|
|
9
|
+
import { d as oe, t as ne } from "../function-C10DGppn.js";
|
|
10
|
+
import { s as ie } from "../gestures-D2Fdra_G.js";
|
|
11
|
+
import { c as ce, s as le } from "../jss-CjccJC-K.js";
|
|
12
|
+
import { g as pe, a as me, b as de } from "../layout-HoBT_Da2.js";
|
|
13
|
+
import { e as ge, f as he, c as be, d as ye, l as Ce, m as we, r as Ee, b as Se, a as Oe, s as Be } from "../math-BOBiC4TN.js";
|
|
14
|
+
import { n as Pe, p as Te, r as ve, t as Ae } from "../polyfills-X6KXuHg-.js";
|
|
15
|
+
import { c as De, d as Re, i as Me, b as ke, a as ze, m as Ve, e as je, o as Ne, p as Ue } from "../object-D6MVWB4l.js";
|
|
16
|
+
import { c as Fe, a as Ke, g as We, i as qe, k as Ge, s as He, t as Je, u as Le } from "../string-f0Dnk0L1.js";
|
|
17
|
+
import { g as Ze, a as Xe } from "../style-j2TwriJ_.js";
|
|
18
|
+
import { c as ea, n as aa, s as ta } from "../url-BuZrUXAO.js";
|
|
18
19
|
function i(a, e, ...t) {
|
|
19
20
|
return [...a.slice(0, e), ...t, ...a.slice(e)];
|
|
20
21
|
}
|
|
@@ -85,20 +86,20 @@ function x(a) {
|
|
|
85
86
|
});
|
|
86
87
|
}
|
|
87
88
|
export {
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
89
|
+
ge as calculateDistance,
|
|
90
|
+
he as calculateDistanceWithRadius,
|
|
91
|
+
Fe as camelToKebab,
|
|
92
|
+
Ke as capitalize,
|
|
93
|
+
ea as changeHistory,
|
|
94
|
+
be as clamp,
|
|
95
|
+
De as cloneDeep,
|
|
96
|
+
Re as compareObjects,
|
|
96
97
|
S as contain,
|
|
97
98
|
O as cover,
|
|
98
99
|
te as createJSONAndSave,
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
100
|
+
ce as createStylesheet,
|
|
101
|
+
ye as damp,
|
|
102
|
+
oe as debounce,
|
|
102
103
|
d as decode,
|
|
103
104
|
ee as dispatchEvent,
|
|
104
105
|
f as dotCircleCollision,
|
|
@@ -123,51 +124,51 @@ export {
|
|
|
123
124
|
R as findScrollParentElement,
|
|
124
125
|
B as fixPosition,
|
|
125
126
|
c as formatBytes,
|
|
126
|
-
|
|
127
|
+
We as generateId,
|
|
127
128
|
M as getAllParentElements,
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
129
|
+
pe as getCumulativeOffsetLeft,
|
|
130
|
+
me as getCumulativeOffsetTop,
|
|
131
|
+
de as getCumulativePosition,
|
|
131
132
|
k as getElement,
|
|
132
|
-
|
|
133
|
-
|
|
133
|
+
Ze as getElementTransitionDurationMS,
|
|
134
|
+
Xe as getElementTransitionDurationS,
|
|
134
135
|
T as getPointerPosition,
|
|
135
136
|
p as getRootVariables,
|
|
136
137
|
i as insert,
|
|
137
138
|
w as isBrowser,
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
139
|
+
Me as isESClass,
|
|
140
|
+
ke as isNullish,
|
|
141
|
+
ze as isObject,
|
|
142
|
+
qe as isUppercase,
|
|
143
|
+
Ge as kebabToCamel,
|
|
144
|
+
Ce as lerp,
|
|
144
145
|
X as linear,
|
|
145
|
-
|
|
146
|
+
we as mapRange,
|
|
146
147
|
I as measureText,
|
|
147
|
-
|
|
148
|
-
|
|
148
|
+
Ve as mergeDeep,
|
|
149
|
+
je as mixin,
|
|
149
150
|
v as normalize,
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
151
|
+
aa as normalizeBase,
|
|
152
|
+
Pe as nullishCoalescing,
|
|
153
|
+
Ne as omit,
|
|
153
154
|
b as parseAttribute,
|
|
154
155
|
y as parseAttributeValue,
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
156
|
+
Ue as pick,
|
|
157
|
+
Te as preciseNumber,
|
|
158
|
+
Ee as round,
|
|
159
|
+
ve as roundNumberTo,
|
|
159
160
|
A as screenToCartesian,
|
|
160
|
-
|
|
161
|
+
ie as setupDrag,
|
|
161
162
|
u as shiftArray,
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
163
|
+
Se as smootherstep,
|
|
164
|
+
Oe as smoothstep,
|
|
165
|
+
He as snakeToDotted,
|
|
166
|
+
ta as splitPath,
|
|
167
|
+
Be as step,
|
|
168
|
+
le as styleToString,
|
|
169
|
+
ne as throttle,
|
|
170
|
+
Je as toPascalCase,
|
|
171
|
+
Ae as toStep,
|
|
172
|
+
Le as uncapitalize,
|
|
172
173
|
x as wait
|
|
173
174
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "aptechka",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.28.0",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+https://github.com/denisavitski/aptechka.git"
|
|
@@ -143,6 +143,11 @@
|
|
|
143
143
|
"default": "./lib/pointer/index.js",
|
|
144
144
|
"types": "./lib/pointer/index.d.ts"
|
|
145
145
|
},
|
|
146
|
+
"./popover": {
|
|
147
|
+
"require": "./lib/popover/index.cjs",
|
|
148
|
+
"default": "./lib/popover/index.js",
|
|
149
|
+
"types": "./lib/popover/index.d.ts"
|
|
150
|
+
},
|
|
146
151
|
"./router": {
|
|
147
152
|
"require": "./lib/router/index.cjs",
|
|
148
153
|
"default": "./lib/router/index.js",
|
|
@@ -299,6 +304,9 @@
|
|
|
299
304
|
"pointer": [
|
|
300
305
|
"lib/pointer/index.d.ts"
|
|
301
306
|
],
|
|
307
|
+
"popover": [
|
|
308
|
+
"lib/popover/index.d.ts"
|
|
309
|
+
],
|
|
302
310
|
"router": [
|
|
303
311
|
"lib/router/index.d.ts"
|
|
304
312
|
],
|
package/lib/style-BqzUd8Fy.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";function r(n,o){const i=new Blob([JSON.stringify(o)],{type:"application/json"}),e=document.createElement("a");e.download=n+".json",e.href=window.URL.createObjectURL(i),e.dataset.downloadurl=["application/json",e.download,e.href].join(":");const a=new MouseEvent("click",{view:window,bubbles:!0,cancelable:!0});e.dispatchEvent(a),e.remove()}function t(n){return parseFloat(getComputedStyle(n).transitionDuration||"")}function c(n){return t(n)*1e3}exports.createJSONAndSave=r;exports.getElementTransitionDurationMS=c;exports.getElementTransitionDurationS=t;
|
package/lib/style-M-RBTQxT.js
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
function r(n, t) {
|
|
2
|
-
const o = new Blob([JSON.stringify(t)], { type: "application/json" }), e = document.createElement("a");
|
|
3
|
-
e.download = n + ".json", e.href = window.URL.createObjectURL(o), e.dataset.downloadurl = ["application/json", e.download, e.href].join(":");
|
|
4
|
-
const a = new MouseEvent("click", {
|
|
5
|
-
view: window,
|
|
6
|
-
bubbles: !0,
|
|
7
|
-
cancelable: !0
|
|
8
|
-
});
|
|
9
|
-
e.dispatchEvent(a), e.remove();
|
|
10
|
-
}
|
|
11
|
-
function i(n) {
|
|
12
|
-
return parseFloat(getComputedStyle(n).transitionDuration || "");
|
|
13
|
-
}
|
|
14
|
-
function c(n) {
|
|
15
|
-
return i(n) * 1e3;
|
|
16
|
-
}
|
|
17
|
-
export {
|
|
18
|
-
c as a,
|
|
19
|
-
r as c,
|
|
20
|
-
i as g
|
|
21
|
-
};
|