aptechka 0.8.0 → 0.8.1
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.
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { CustomElement } from '../custom-element';
|
|
2
2
|
import { Store } from '../store';
|
|
3
3
|
import { TweakerFieldElement } from './TweakerFieldElement';
|
|
4
4
|
import { StoreBox } from './TweakerElement';
|
|
@@ -7,7 +7,7 @@ export interface TweakerFolderParameters {
|
|
|
7
7
|
key: string;
|
|
8
8
|
storeBox?: StoreBox;
|
|
9
9
|
}
|
|
10
|
-
export declare class TweakerFolderElement extends
|
|
10
|
+
export declare class TweakerFolderElement extends CustomElement {
|
|
11
11
|
#private;
|
|
12
12
|
constructor(parameters: TweakerFolderParameters);
|
|
13
13
|
get key(): string;
|
package/lib/tweaker/index.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";var qe=(t,e,r)=>{if(!e.has(t))throw TypeError("Cannot "+r)};var p=(t,e,r)=>(qe(t,e,"read from private field"),r?r.call(t):e.get(t)),j=(t,e,r)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,r)},C=(t,e,r,i)=>(qe(t,e,"write to private field"),i?i.call(t,r):e.set(t,r),r);const Qe=require("../browser-CpzFX2xg.cjs"),y=require("../custom-element/index.cjs"),g=require("../Store-CIs_NjhF.cjs"),Ue=require("../file-EevnUtRj.cjs"),et=require("../function-MthRj-GJ.cjs"),Ne=require("../gestures-DHLrn6Q8.cjs"),o=require("../tags-yvEoM921.cjs"),E=require("../createStylesheet-BX1RVTfW.cjs"),tt=require("../Viewport-CIBlSU2t.cjs"),c=require("../theme/index.cjs"),rt=require("../accordion/index.cjs"),st=require("../index-DfSyc2GT.cjs"),it=require("../events-BGwqaxVW.cjs");require("../checkbox/index.cjs");const at=require("../math-GDWEqu7y.cjs"),Te=require("../polyfills-CM4SCDTt.cjs"),Ve=require("../element-resizer/index.cjs"),Ke='<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>',Ze='<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>',nt='<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>',ot='<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24"><path fill-rule="evenodd" d="M2 12c0-4.714 0-7.071 1.464-8.536C4.93 2 7.286 2 12 2c4.714 0 7.071 0 8.535 1.464C22 4.93 22 7.286 22 12c0 4.714 0 7.071-1.465 8.535C19.072 22 16.714 22 12 22s-7.071 0-8.536-1.465C2 19.072 2 16.714 2 12Zm10 5.75a.75.75 0 0 0 .75-.75v-5.19l1.72 1.72a.75.75 0 1 0 1.06-1.06l-3-3a.75.75 0 0 0-1.06 0l-3 3a.75.75 0 1 0 1.06 1.06l1.72-1.72V17c0 .414.336.75.75.75Zm-4-10a.75.75 0 0 1 0-1.5h8a.75.75 0 0 1 0 1.5H8Z" clip-rule="evenodd"/></svg>';var I,_,P;class lt{constructor(){j(this,I,void 0);j(this,_,void 0);j(this,P,void 0);this.scrollValue=0,C(this,I,""),C(this,_,[]),C(this,P,{}),C(this,I,g.storeRegistry.projectName+"-studio")}openPanel(e){p(this,_).includes(e)||p(this,_).push(e)}closePanel(e){C(this,_,p(this,_).filter(r=>r!==e))}isPanelOpened(e){return p(this,_).includes(e)}changedSizes(e){return p(this,P)[e]}changeSize(e,r){r?p(this,P)[e]=r:delete p(this,P)[e]}save(){const e={openedPanels:p(this,_),changedSizes:p(this,P),scrollValue:this.scrollValue};localStorage.setItem(p(this,I),JSON.stringify(e)),g.storeRegistry.saveState()}load(){g.storeRegistry.loadState();const e=localStorage.getItem(p(this,I));if(e)try{const r=JSON.parse(e);r.openedPanels&&C(this,_,r.openedPanels),r.changedSizes&&C(this,P,r.changedSizes),r.scrollValue&&(this.scrollValue=r.scrollValue)}catch(r){console.error(r)}}}I=new WeakMap,_=new WeakMap,P=new WeakMap;const w=new lt;var O;class N extends y.CustomElement{constructor(...r){super();j(this,O,void 0);C(this,O,r)}addStore(r){p(this,O).push(r)}get firstStore(){return p(this,O)[0]}get stores(){return p(this,O)}updateStores(r){p(this,O).forEach(i=>{i.current=r})}}O=new WeakMap;var ht=Object.defineProperty,ct=Object.getOwnPropertyDescriptor,dt=(t,e,r,i)=>{for(var s=i>1?void 0:i?ct(e,r):e,n=t.length-1,a;n>=0;n--)(a=t[n])&&(s=(i?a(e,r,s):a(s))||s);return i&&s&&ht(e,r,s),s};const pt=E.createStylesheet({":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:c.aptechkaTheme.borderRadiusSmall.var}});let Ee=class extends N{constructor(...t){super(...t),this.openShadow(pt),o.element(this,{children:[o.element("e-checkbox",{onChange:e=>{this.updateStores(e.currentTarget.checked)},ref:e=>{this.firstStore.subscribe(r=>{e.checked=r.current})}})]})}};Ee=dt([y.define("e-tweaker-boolean-manager")],Ee);var ut=Object.defineProperty,gt=Object.getOwnPropertyDescriptor,vt=(t,e,r,i)=>{for(var s=i>1?void 0:i?gt(e,r):e,n=t.length-1,a;n>=0;n--)(a=t[n])&&(s=(i?a(e,r,s):a(s))||s);return i&&s&&ut(e,r,s),s};const ft=E.createStylesheet({":host":{width:"100%",display:"inline-flex",height:"max-content"},input:{width:"100%",height:"var(--height-input)",padding:"0",background:"none",borderRadius:c.aptechkaTheme.borderRadius.var,border:"none",blockSize:"unset"},"input::-webkit-color-swatch, input::-webkit-color-swatch-wrapper":{boxSizing:"border-box",padding:"0px",border:"none",borderRadius:c.aptechkaTheme.borderRadius.var,height:"calc(var(--height-input) * 0.93)"}});let Me=class extends N{constructor(...t){super(...t),this.openShadow(ft),o.element(this,{children:[o.input({type:"color",value:this.firstStore,onInput:e=>{this.updateStores(e.currentTarget.value)}})]})}};Me=vt([y.define("e-tweaker-color-manager")],Me);var wt=Object.defineProperty,mt=Object.getOwnPropertyDescriptor,bt=(t,e,r,i)=>{for(var s=i>1?void 0:i?mt(e,r):e,n=t.length-1,a;n>=0;n--)(a=t[n])&&(s=(i?a(e,r,s):a(s))||s);return i&&s&&wt(e,r,s),s};const _t=E.createStylesheet({a:{color:"inherit"}});let $e=class extends N{constructor(...t){var e,r;super(...t),this.openShadow(_t),o.element(this,{children:[o.a({href:this.firstStore,target:(r=(e=this.firstStore.passport)==null?void 0:e.manager)!=null&&r.sameWindow?"_self":"_blank",children:this.firstStore})]})}};$e=bt([y.define("e-tweaker-link-manager")],$e);var yt=Object.defineProperty,St=Object.getOwnPropertyDescriptor,kt=(t,e,r,i)=>{for(var s=i>1?void 0:i?St(e,r):e,n=t.length-1,a;n>=0;n--)(a=t[n])&&(s=(i?a(e,r,s):a(s))||s);return i&&s&&yt(e,r,s),s},Ie=(t,e,r)=>{if(!e.has(t))throw TypeError("Cannot "+r)},l=(t,e,r)=>(Ie(t,e,"read from private field"),r?r.call(t):e.get(t)),u=(t,e,r)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,r)},M=(t,e,r,i)=>(Ie(t,e,"write to private field"),e.set(t,r),r),m=(t,e,r)=>(Ie(t,e,"access private method"),r),L,ee,B,z,D,se,ie,T,V,ae,ne,F,q,oe,ze,be,Ae,te,_e,le;const xt=E.createStylesheet({":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:c.aptechkaTheme.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 ${c.aptechkaTheme.colorFont.var}`,transform:"translateY(-50%)",opacity:"0.3"},":host(.infinite) .drag::before":{borderBottom:`1px dashed ${c.aptechkaTheme.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:c.aptechkaTheme.colorFont.var,borderRadius:c.aptechkaTheme.borderRadiusSmall.var,transition:"opacity var(--duration-short)"},":host(.infinite) .grabbing .drag-knob-inner":{opacity:.3}});let Oe=class extends N{constructor(...t){var e,r,i,s,n,a,W,K;super(...t),u(this,F),u(this,oe),u(this,be),u(this,te),u(this,L,[]),u(this,ee,[]),u(this,B,void 0),u(this,z,void 0),u(this,D,void 0),u(this,se,void 0),u(this,ie,void 0),u(this,T,void 0),u(this,V,!1),u(this,ae,Z=>{const b=m(this,F,q).call(this,Z);return b.map((v,H)=>{const Se=typeof v=="string"?parseFloat(v)||l(this,z):v,S=at.clamp(Se,l(this,z),l(this,D)),ke=Te.toStep(S,l(this,B));b[H]=ke}),l(this,ie)==="number"?b[0]:b}),u(this,ne,()=>{m(this,F,q).call(this).map((Z,b)=>{const v=l(this,L)[b];v&&(v.value=(Z||0).toString())}),m(this,oe,ze).call(this)}),u(this,le,()=>{m(this,oe,ze).call(this)}),this.openShadow(xt),M(this,z,Te.nullishCoalescing((r=(e=this.firstStore.passport)==null?void 0:e.manager)==null?void 0:r.min,-1/0)),M(this,D,Te.nullishCoalescing((s=(i=this.firstStore.passport)==null?void 0:i.manager)==null?void 0:s.max,1/0)),M(this,B,((a=(n=this.firstStore.passport)==null?void 0:n.manager)==null?void 0:a.step)||.01),M(this,se,((K=(W=this.firstStore.passport)==null?void 0:W.manager)==null?void 0:K.ease)||1),M(this,ie,Array.isArray(this.firstStore.current)?"array":"number"),M(this,T,isFinite(l(this,D))&&isFinite(l(this,z))),o.element(this,{class:l(this,T)?"":"infinite",children:m(this,F,q).call(this).map((Z,b)=>o.div({class:"inputs-wrapper",children:[o.input({type:"number",step:l(this,B),min:l(this,z),max:l(this,D),ref:v=>l(this,L).push(v),value:Z,onChange:()=>{this.updateStores(l(this,L).map(v=>parseFloat(v.value)))}}),o.div({class:"drag",children:[o.div({class:"drag-knob",ref:v=>l(this,ee).push(v),onPointerdown:v=>{v.preventDefault(),M(this,V,!0);const H=m(this,F,q).call(this),Se=H[b],S=l(this,ee)[b],ke=l(this,L)[b];if(S&&ke){const xe=S.parentElement,Je=m(this,be,Ae).call(this);xe.classList.add("grabbing"),Ne.setupDrag(Ce=>{const Le=Ce.x-v.x,Be=l(this,T)?xe.offsetWidth/(Je||1):1,Xe=Se+Le/Be*l(this,se);if(H[b]=Xe,!l(this,T)){const Ye=m(this,te,_e).call(this,S,0);S.style.transform=`translateX(${Ye+Le}px)`}this.updateStores([...H])},()=>{if(M(this,V,!1),!l(this,T)){const Ce=m(this,te,_e).call(this,S,0);S.style.transition="transform 0.1s",S.style.transform=`translateX(${Ce}px)`,xe.classList.remove("grabbing"),setTimeout(()=>{S.style.transition=""},100)}})}},children:o.div({class:"drag-knob-inner"})})]})]}))})}connectedCallback(){this.firstStore.addMiddleware(l(this,ae)),this.firstStore.subscribe(l(this,ne)),Ve.elementResizer.subscribe(this,l(this,le))}disconnectedCallback(){this.firstStore.removeMiddleware(l(this,ae)),this.firstStore.unsubscribe(l(this,ne)),Ve.elementResizer.unsubscribe(l(this,le))}};L=new WeakMap;ee=new WeakMap;B=new WeakMap;z=new WeakMap;D=new WeakMap;se=new WeakMap;ie=new WeakMap;T=new WeakMap;V=new WeakMap;ae=new WeakMap;ne=new WeakMap;F=new WeakSet;q=function(t=this.firstStore.current){return Array.isArray(t)?t:[t]};oe=new WeakSet;ze=function(){m(this,F,q).call(this).map((t,e)=>{const r=l(this,ee)[e];if(r&&(!l(this,V)||l(this,V)&&l(this,T))){const i=m(this,te,_e).call(this,r,t);r.style.transform=`translateX(${i}px)`}})};be=new WeakSet;Ae=function(){return l(this,T)?l(this,D)-l(this,z):0};te=new WeakSet;_e=function(t,e){const r=t.parentElement,i=m(this,be,Ae).call(this),s=i?e/i:.5;return(r.offsetWidth-t.offsetWidth)*s};le=new WeakMap;Oe=kt([y.define("e-tweaker-number-manager")],Oe);var Ct=Object.defineProperty,Tt=Object.getOwnPropertyDescriptor,Pt=(t,e,r,i)=>{for(var s=i>1?void 0:i?Tt(e,r):e,n=t.length-1,a;n>=0;n--)(a=t[n])&&(s=(i?a(e,r,s):a(s))||s);return i&&s&&Ct(e,r,s),s};const Et=E.createStylesheet({"e-select":{width:"100%","--arrow-color":c.aptechkaTheme.colorFont.var},"e-select-head":{width:"100%",display:"flex",alignItems:"center",justifyContent:"space-between"},"e-select-option":{transitionDuration:"var(--duration-short)",transitionProperty:"color"},"e-select-option:hover":{color:c.aptechkaTheme.colorActive.var},svg:{width:"16px",height:"16px",fill:c.aptechkaTheme.colorFont.var,transitionProperty:"transform",transitionDuration:"var(--duration-short)"},".opened svg":{transform:"scaleY(-1)"}});let We=class extends N{constructor(...t){var r,i;super(...t),this.openShadow(Et);const e=((i=(r=this.firstStore.passport)==null?void 0:r.manager)==null?void 0:i.variants)||[];o.element(this,{children:o.element("e-select",{value:this.firstStore,onChange:s=>{this.updateStores(s.currentTarget.value)},lightChildren:[o.element("e-select-head",{lightChildren:[o.span({"data-value-holder":""})]}),...e.map((s,n)=>o.element("e-select-option",{lightChildren:s,default:n===0?!0:null}))]})})}};We=Pt([y.define("e-tweaker-select-manager")],We);var Mt=Object.defineProperty,$t=Object.getOwnPropertyDescriptor,zt=(t,e,r,i)=>{for(var s=i>1?void 0:i?$t(e,r):e,n=t.length-1,a;n>=0;n--)(a=t[n])&&(s=(i?a(e,r,s):a(s))||s);return i&&s&&Mt(e,r,s),s};const Ot=E.createStylesheet({":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:c.aptechkaTheme.borderRadius.var}});let Re=class extends N{constructor(...t){super(...t),this.openShadow(Ot),o.element(this,{children:[o.input({class:"text-input",type:"string",value:this.firstStore,onChange:e=>{this.updateStores(e.currentTarget.value)}})]})}};Re=zt([y.define("e-tweaker-string-manager")],Re);const Wt={boolean:Ee,color:Me,link:$e,number:Oe,select:We,string:Re};var Rt=Object.defineProperty,Dt=Object.getOwnPropertyDescriptor,Ft=(t,e,r,i)=>{for(var s=i>1?void 0:i?Dt(e,r):e,n=t.length-1,a;n>=0;n--)(a=t[n])&&(s=(i?a(e,r,s):a(s))||s);return i&&s&&Rt(e,r,s),s},He=(t,e,r)=>{if(!e.has(t))throw TypeError("Cannot "+r)},d=(t,e,r)=>(He(t,e,"read from private field"),r?r.call(t):e.get(t)),R=(t,e,r)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,r)},A=(t,e,r,i)=>(He(t,e,"write to private field"),e.set(t,r),r),k,X,Y,Q,U,he,ce;const It=E.createStylesheet({":host":{display:"grid",gridAutoFlow:"column",gridTemplateColumns:"0.5fr 1fr",alignItems:"center",color:c.aptechkaTheme.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:c.aptechkaTheme.colorFont.var,transitionDuration:"var(--duration-short)",transitionProperty:"fill, opacity",opacity:"0"},":host(:hover) .head-button":{opacity:"1"},".head-button:hover":{fill:c.aptechkaTheme.colorActive.var},".head-button svg":{width:"100%",height:"100%"}});let ye=class extends y.CustomElement{constructor(t){var r,i,s,n;super(),R(this,k,[]),R(this,X,void 0),R(this,Y,void 0),R(this,Q,!1),R(this,U,void 0),R(this,he,()=>{g.activeStores.current.find(a=>d(this,k).includes(a))||this.remove()}),R(this,ce,a=>{d(this,Q)&&((a.metaKey||a.ctrlKey)&&a.code==="KeyC"?navigator.clipboard.writeText(d(this,k)[0].current):(a.metaKey||a.ctrlKey)&&a.code==="KeyR"&&(d(this,k).forEach(W=>{W.reset()}),a.preventDefault()))}),A(this,k,[t.store]),A(this,X,t.store.passport.name),A(this,Y,d(this,X).split(".").slice(-1).toString());const e=((i=(r=t.store.passport)==null?void 0:r.manager)==null?void 0:i.type)||"string";A(this,U,new Wt[e](d(this,k)[0])),this.openShadow(It),o.element(this,{class:{disabled:((n=(s=t.store.passport)==null?void 0:s.manager)==null?void 0:n.disabled)||!1},onPointerleave:()=>{A(this,Q,!1)},onPointerenter:()=>{A(this,Q,!0)},children:[o.div({class:"head",children:[o.div({class:"name",children:d(this,Y)+":"}),o.div({class:"head-buttons",children:[o.button({class:"head-button",children:Ze,onClick:()=>{navigator.clipboard.writeText(d(this,k)[0].current)}}),o.button({class:"head-button",children:Ke,onClick:()=>{d(this,k).forEach(a=>{a.reset()})}})]})]}),d(this,U)]})}get key(){return d(this,X)}get name(){return d(this,Y)}get stores(){return d(this,k)}addStore(t){d(this,U).addStore(t)}connectedCallback(){g.activeStores.subscribe(d(this,he)),addEventListener("keydown",d(this,ce)),it.dispatchSizeChangeEvent(this)}disconnectedCallback(){g.activeStores.unsubscribe(d(this,he)),removeEventListener("keydown",d(this,ce))}};k=new WeakMap;X=new WeakMap;Y=new WeakMap;Q=new WeakMap;U=new WeakMap;he=new WeakMap;ce=new WeakMap;ye=Ft([y.define("e-tweaker-field")],ye);var At=Object.defineProperty,Lt=Object.getOwnPropertyDescriptor,qt=(t,e,r,i)=>{for(var s=i>1?void 0:i?Lt(e,r):e,n=t.length-1,a;n>=0;n--)(a=t[n])&&(s=(i?a(e,r,s):a(s))||s);return i&&s&&At(e,r,s),s},je=(t,e,r)=>{if(!e.has(t))throw TypeError("Cannot "+r)},h=(t,e,r)=>(je(t,e,"read from private field"),r?r.call(t):e.get(t)),$=(t,e,r)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,r)},G=(t,e,r,i)=>(je(t,e,"write to private field"),e.set(t,r),r),x,de,f,pe,ue,ge,ve,De;const Vt=E.createStylesheet({".wrapper":{boxSizing:"border-box",backgroundColor:"rgba(255, 255, 255, 0.1)",borderRadius:c.aptechkaTheme.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:c.aptechkaTheme.colorMainAux.var,borderRadius:c.aptechkaTheme.borderRadius.var},".name":{fontSize:"var(--font-size-large)",color:c.aptechkaTheme.colorFont.var},".body":{transitionProperty:"height",transitionDuration:"var(--duration-short)",overflow:"hidden",height:"0px"},".body-content":{boxSizing:"border-box",padding:"var(--gap-large)",display:"grid",gap:"var(--gap-medium)"},".arrow":{width:"20px",height:"20px",fill:c.aptechkaTheme.colorFont.var,transition:"transform var(--duration-short)"},".opened .arrow":{transform:"scaleY(-1)"}});let re=class extends rt.AccordionElement{constructor(t){super(),$(this,x,void 0),$(this,de,new g.Store(null)),$(this,f,new g.Store([])),$(this,pe,void 0),$(this,ue,null),$(this,ge,null),$(this,ve,null),$(this,De,e=>{let r=[],i=[];e.forEach(s=>{r=[...r,...s.removedNodes],i=[...i,...s.addedNodes]}),h(this,f).current=h(this,f).current.filter(s=>!r.includes(s)),h(this,x)&&!h(this,f).current.length&&!i.length&&this.remove()}),this.openShadow(Vt),G(this,x,t.key),G(this,pe,new MutationObserver(h(this,De))),o.element(this,{onAccordionItemToggle:e=>{e.stopPropagation(),e.detail.opened?w.openPanel(h(this,x)):w.closePanel(h(this,x))},children:[o.div({class:"wrapper",children:[o.div({class:"head",children:[h(this,x)?o.div({class:"name",children:[h(this,x).split(".").slice(-1).toString()]}):null,h(this,de),o.element(st.arrowIcon,{class:"arrow"})]}),o.div({class:"body",ref:e=>{G(this,ue,e)},children:o.div({class:"body-content",children:h(this,f),ref:e=>{G(this,ge,e),G(this,ve,e.firstElementChild)}})})]})]}),t!=null&&t.storeBox&&this.handleStore(t.storeBox)}get key(){return h(this,x)}get head(){return h(this,de)}get content(){return h(this,f)}get bodyElement(){return h(this,ue)}get contentElement(){return h(this,ge)}connectedCallback(){super.connectedCallback(),setTimeout(()=>{w.isPanelOpened(h(this,x))&&this.openAll({skipTransition:!0})},50),h(this,pe).observe(h(this,ve),{childList:!0})}handleStore(t){if(t.remainingFolders.length){const r=t.store.passport.name.split("."),i=r.slice(0,r.length-t.remainingFolders.length).join("."),s=h(this,f).current.find(n=>n.key===i);s instanceof re?s.handleStore({store:t.store,remainingFolders:t.remainingFolders.slice(1)}):h(this,f).current=[...h(this,f).current,new re({key:i,storeBox:{store:t.store,remainingFolders:t.remainingFolders.slice(1)}})]}else{const e=h(this,f).current.find(r=>r.key===t.store.passport.name);e instanceof ye?e.addStore(t.store):h(this,f).current=[...h(this,f).current,new ye({store:t.store})]}}};x=new WeakMap;de=new WeakMap;f=new WeakMap;pe=new WeakMap;ue=new WeakMap;ge=new WeakMap;ve=new WeakMap;De=new WeakMap;re=qt([y.define("e-tweaker-folder")],re);var Nt=Object.defineProperty,Kt=Object.getOwnPropertyDescriptor,Zt=(t,e,r,i)=>{for(var s=i>1?void 0:i?Kt(e,r):e,n=t.length-1,a;n>=0;n--)(a=t[n])&&(s=(i?a(e,r,s):a(s))||s);return i&&s&&Nt(e,r,s),s},Ge=(t,e,r)=>{if(!e.has(t))throw TypeError("Cannot "+r)},J=(t,e,r)=>(Ge(t,e,"read from private field"),e.get(t)),Pe=(t,e,r)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,r)},Ht=(t,e,r,i)=>(Ge(t,e,"write to private field"),e.set(t,r),r),fe,we,me;const jt=E.createStylesheet({":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:c.aptechkaTheme.colorMain.var,borderRadius:c.aptechkaTheme.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:c.aptechkaTheme.colorFont.var,transitionProperty:"fill",transitionDuration:"var(--duration-short)"},".tweaker-button:hover":{fill:c.aptechkaTheme.colorActive.var},".tweaker-button svg":{width:"100%",height:"100%"},":host .body-content":{maxHeight:`calc(
|
|
1
|
+
"use strict";var qe=(t,e,r)=>{if(!e.has(t))throw TypeError("Cannot "+r)};var p=(t,e,r)=>(qe(t,e,"read from private field"),r?r.call(t):e.get(t)),j=(t,e,r)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,r)},C=(t,e,r,i)=>(qe(t,e,"write to private field"),i?i.call(t,r):e.set(t,r),r);const Qe=require("../browser-CpzFX2xg.cjs"),b=require("../custom-element/index.cjs"),g=require("../Store-CIs_NjhF.cjs"),Ue=require("../file-EevnUtRj.cjs"),et=require("../function-MthRj-GJ.cjs"),Ne=require("../gestures-DHLrn6Q8.cjs"),o=require("../tags-yvEoM921.cjs"),E=require("../createStylesheet-BX1RVTfW.cjs"),tt=require("../Viewport-CIBlSU2t.cjs"),c=require("../theme/index.cjs"),rt=require("../index-DfSyc2GT.cjs");require("../accordion/index.cjs");const st=require("../events-BGwqaxVW.cjs");require("../checkbox/index.cjs");const it=require("../math-GDWEqu7y.cjs"),Pe=require("../polyfills-CM4SCDTt.cjs"),Ve=require("../element-resizer/index.cjs"),Ke='<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>',Ze='<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>',at='<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>',nt='<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24"><path fill-rule="evenodd" d="M2 12c0-4.714 0-7.071 1.464-8.536C4.93 2 7.286 2 12 2c4.714 0 7.071 0 8.535 1.464C22 4.93 22 7.286 22 12c0 4.714 0 7.071-1.465 8.535C19.072 22 16.714 22 12 22s-7.071 0-8.536-1.465C2 19.072 2 16.714 2 12Zm10 5.75a.75.75 0 0 0 .75-.75v-5.19l1.72 1.72a.75.75 0 1 0 1.06-1.06l-3-3a.75.75 0 0 0-1.06 0l-3 3a.75.75 0 1 0 1.06 1.06l1.72-1.72V17c0 .414.336.75.75.75Zm-4-10a.75.75 0 0 1 0-1.5h8a.75.75 0 0 1 0 1.5H8Z" clip-rule="evenodd"/></svg>';var L,_,T;class ot{constructor(){j(this,L,void 0);j(this,_,void 0);j(this,T,void 0);this.scrollValue=0,C(this,L,""),C(this,_,[]),C(this,T,{}),C(this,L,g.storeRegistry.projectName+"-studio")}openPanel(e){p(this,_).includes(e)||p(this,_).push(e)}closePanel(e){C(this,_,p(this,_).filter(r=>r!==e))}isPanelOpened(e){return p(this,_).includes(e)}changedSizes(e){return p(this,T)[e]}changeSize(e,r){r?p(this,T)[e]=r:delete p(this,T)[e]}save(){const e={openedPanels:p(this,_),changedSizes:p(this,T),scrollValue:this.scrollValue};localStorage.setItem(p(this,L),JSON.stringify(e)),g.storeRegistry.saveState()}load(){g.storeRegistry.loadState();const e=localStorage.getItem(p(this,L));if(e)try{const r=JSON.parse(e);r.openedPanels&&C(this,_,r.openedPanels),r.changedSizes&&C(this,T,r.changedSizes),r.scrollValue&&(this.scrollValue=r.scrollValue)}catch(r){console.error(r)}}}L=new WeakMap,_=new WeakMap,T=new WeakMap;const w=new ot;var O;class N extends b.CustomElement{constructor(...r){super();j(this,O,void 0);C(this,O,r)}addStore(r){p(this,O).push(r)}get firstStore(){return p(this,O)[0]}get stores(){return p(this,O)}updateStores(r){p(this,O).forEach(i=>{i.current=r})}}O=new WeakMap;var lt=Object.defineProperty,ht=Object.getOwnPropertyDescriptor,ct=(t,e,r,i)=>{for(var s=i>1?void 0:i?ht(e,r):e,n=t.length-1,a;n>=0;n--)(a=t[n])&&(s=(i?a(e,r,s):a(s))||s);return i&&s&<(e,r,s),s};const dt=E.createStylesheet({":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:c.aptechkaTheme.borderRadiusSmall.var}});let Ee=class extends N{constructor(...t){super(...t),this.openShadow(dt),o.element(this,{children:[o.element("e-checkbox",{onChange:e=>{this.updateStores(e.currentTarget.checked)},ref:e=>{this.firstStore.subscribe(r=>{e.checked=r.current})}})]})}};Ee=ct([b.define("e-tweaker-boolean-manager")],Ee);var pt=Object.defineProperty,ut=Object.getOwnPropertyDescriptor,gt=(t,e,r,i)=>{for(var s=i>1?void 0:i?ut(e,r):e,n=t.length-1,a;n>=0;n--)(a=t[n])&&(s=(i?a(e,r,s):a(s))||s);return i&&s&&pt(e,r,s),s};const vt=E.createStylesheet({":host":{width:"100%",display:"inline-flex",height:"max-content"},input:{width:"100%",height:"var(--height-input)",padding:"0",background:"none",borderRadius:c.aptechkaTheme.borderRadius.var,border:"none",blockSize:"unset"},"input::-webkit-color-swatch, input::-webkit-color-swatch-wrapper":{boxSizing:"border-box",padding:"0px",border:"none",borderRadius:c.aptechkaTheme.borderRadius.var,height:"calc(var(--height-input) * 0.93)"}});let Me=class extends N{constructor(...t){super(...t),this.openShadow(vt),o.element(this,{children:[o.input({type:"color",value:this.firstStore,onInput:e=>{this.updateStores(e.currentTarget.value)}})]})}};Me=gt([b.define("e-tweaker-color-manager")],Me);var ft=Object.defineProperty,wt=Object.getOwnPropertyDescriptor,mt=(t,e,r,i)=>{for(var s=i>1?void 0:i?wt(e,r):e,n=t.length-1,a;n>=0;n--)(a=t[n])&&(s=(i?a(e,r,s):a(s))||s);return i&&s&&ft(e,r,s),s};const bt=E.createStylesheet({a:{color:"inherit"}});let $e=class extends N{constructor(...t){var e,r;super(...t),this.openShadow(bt),o.element(this,{children:[o.a({href:this.firstStore,target:(r=(e=this.firstStore.passport)==null?void 0:e.manager)!=null&&r.sameWindow?"_self":"_blank",children:this.firstStore})]})}};$e=mt([b.define("e-tweaker-link-manager")],$e);var yt=Object.defineProperty,_t=Object.getOwnPropertyDescriptor,St=(t,e,r,i)=>{for(var s=i>1?void 0:i?_t(e,r):e,n=t.length-1,a;n>=0;n--)(a=t[n])&&(s=(i?a(e,r,s):a(s))||s);return i&&s&&yt(e,r,s),s},Le=(t,e,r)=>{if(!e.has(t))throw TypeError("Cannot "+r)},l=(t,e,r)=>(Le(t,e,"read from private field"),r?r.call(t):e.get(t)),u=(t,e,r)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,r)},M=(t,e,r,i)=>(Le(t,e,"write to private field"),e.set(t,r),r),m=(t,e,r)=>(Le(t,e,"access private method"),r),A,ee,B,z,D,se,ie,P,V,ae,ne,F,q,oe,ze,be,Ie,te,ye,le;const kt=E.createStylesheet({":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:c.aptechkaTheme.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 ${c.aptechkaTheme.colorFont.var}`,transform:"translateY(-50%)",opacity:"0.3"},":host(.infinite) .drag::before":{borderBottom:`1px dashed ${c.aptechkaTheme.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:c.aptechkaTheme.colorFont.var,borderRadius:c.aptechkaTheme.borderRadiusSmall.var,transition:"opacity var(--duration-short)"},":host(.infinite) .grabbing .drag-knob-inner":{opacity:.3}});let Oe=class extends N{constructor(...t){var e,r,i,s,n,a,W,K;super(...t),u(this,F),u(this,oe),u(this,be),u(this,te),u(this,A,[]),u(this,ee,[]),u(this,B,void 0),u(this,z,void 0),u(this,D,void 0),u(this,se,void 0),u(this,ie,void 0),u(this,P,void 0),u(this,V,!1),u(this,ae,Z=>{const y=m(this,F,q).call(this,Z);return y.map((v,H)=>{const Se=typeof v=="string"?parseFloat(v)||l(this,z):v,S=it.clamp(Se,l(this,z),l(this,D)),ke=Pe.toStep(S,l(this,B));y[H]=ke}),l(this,ie)==="number"?y[0]:y}),u(this,ne,()=>{m(this,F,q).call(this).map((Z,y)=>{const v=l(this,A)[y];v&&(v.value=(Z||0).toString())}),m(this,oe,ze).call(this)}),u(this,le,()=>{m(this,oe,ze).call(this)}),this.openShadow(kt),M(this,z,Pe.nullishCoalescing((r=(e=this.firstStore.passport)==null?void 0:e.manager)==null?void 0:r.min,-1/0)),M(this,D,Pe.nullishCoalescing((s=(i=this.firstStore.passport)==null?void 0:i.manager)==null?void 0:s.max,1/0)),M(this,B,((a=(n=this.firstStore.passport)==null?void 0:n.manager)==null?void 0:a.step)||.01),M(this,se,((K=(W=this.firstStore.passport)==null?void 0:W.manager)==null?void 0:K.ease)||1),M(this,ie,Array.isArray(this.firstStore.current)?"array":"number"),M(this,P,isFinite(l(this,D))&&isFinite(l(this,z))),o.element(this,{class:l(this,P)?"":"infinite",children:m(this,F,q).call(this).map((Z,y)=>o.div({class:"inputs-wrapper",children:[o.input({type:"number",step:l(this,B),min:l(this,z),max:l(this,D),ref:v=>l(this,A).push(v),value:Z,onChange:()=>{this.updateStores(l(this,A).map(v=>parseFloat(v.value)))}}),o.div({class:"drag",children:[o.div({class:"drag-knob",ref:v=>l(this,ee).push(v),onPointerdown:v=>{v.preventDefault(),M(this,V,!0);const H=m(this,F,q).call(this),Se=H[y],S=l(this,ee)[y],ke=l(this,A)[y];if(S&&ke){const xe=S.parentElement,Je=m(this,be,Ie).call(this);xe.classList.add("grabbing"),Ne.setupDrag(Ce=>{const Ae=Ce.x-v.x,Be=l(this,P)?xe.offsetWidth/(Je||1):1,Xe=Se+Ae/Be*l(this,se);if(H[y]=Xe,!l(this,P)){const Ye=m(this,te,ye).call(this,S,0);S.style.transform=`translateX(${Ye+Ae}px)`}this.updateStores([...H])},()=>{if(M(this,V,!1),!l(this,P)){const Ce=m(this,te,ye).call(this,S,0);S.style.transition="transform 0.1s",S.style.transform=`translateX(${Ce}px)`,xe.classList.remove("grabbing"),setTimeout(()=>{S.style.transition=""},100)}})}},children:o.div({class:"drag-knob-inner"})})]})]}))})}connectedCallback(){this.firstStore.addMiddleware(l(this,ae)),this.firstStore.subscribe(l(this,ne)),Ve.elementResizer.subscribe(this,l(this,le))}disconnectedCallback(){this.firstStore.removeMiddleware(l(this,ae)),this.firstStore.unsubscribe(l(this,ne)),Ve.elementResizer.unsubscribe(l(this,le))}};A=new WeakMap;ee=new WeakMap;B=new WeakMap;z=new WeakMap;D=new WeakMap;se=new WeakMap;ie=new WeakMap;P=new WeakMap;V=new WeakMap;ae=new WeakMap;ne=new WeakMap;F=new WeakSet;q=function(t=this.firstStore.current){return Array.isArray(t)?t:[t]};oe=new WeakSet;ze=function(){m(this,F,q).call(this).map((t,e)=>{const r=l(this,ee)[e];if(r&&(!l(this,V)||l(this,V)&&l(this,P))){const i=m(this,te,ye).call(this,r,t);r.style.transform=`translateX(${i}px)`}})};be=new WeakSet;Ie=function(){return l(this,P)?l(this,D)-l(this,z):0};te=new WeakSet;ye=function(t,e){const r=t.parentElement,i=m(this,be,Ie).call(this),s=i?e/i:.5;return(r.offsetWidth-t.offsetWidth)*s};le=new WeakMap;Oe=St([b.define("e-tweaker-number-manager")],Oe);var xt=Object.defineProperty,Ct=Object.getOwnPropertyDescriptor,Pt=(t,e,r,i)=>{for(var s=i>1?void 0:i?Ct(e,r):e,n=t.length-1,a;n>=0;n--)(a=t[n])&&(s=(i?a(e,r,s):a(s))||s);return i&&s&&xt(e,r,s),s};const Tt=E.createStylesheet({"e-select":{width:"100%","--arrow-color":c.aptechkaTheme.colorFont.var},"e-select-head":{width:"100%",display:"flex",alignItems:"center",justifyContent:"space-between"},"e-select-option":{transitionDuration:"var(--duration-short)",transitionProperty:"color"},"e-select-option:hover":{color:c.aptechkaTheme.colorActive.var},svg:{width:"16px",height:"16px",fill:c.aptechkaTheme.colorFont.var,transitionProperty:"transform",transitionDuration:"var(--duration-short)"},".opened svg":{transform:"scaleY(-1)"}});let We=class extends N{constructor(...t){var r,i;super(...t),this.openShadow(Tt);const e=((i=(r=this.firstStore.passport)==null?void 0:r.manager)==null?void 0:i.variants)||[];o.element(this,{children:o.element("e-select",{value:this.firstStore,onChange:s=>{this.updateStores(s.currentTarget.value)},lightChildren:[o.element("e-select-head",{lightChildren:[o.span({"data-value-holder":""})]}),...e.map((s,n)=>o.element("e-select-option",{lightChildren:s,default:n===0?!0:null}))]})})}};We=Pt([b.define("e-tweaker-select-manager")],We);var Et=Object.defineProperty,Mt=Object.getOwnPropertyDescriptor,$t=(t,e,r,i)=>{for(var s=i>1?void 0:i?Mt(e,r):e,n=t.length-1,a;n>=0;n--)(a=t[n])&&(s=(i?a(e,r,s):a(s))||s);return i&&s&&Et(e,r,s),s};const zt=E.createStylesheet({":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:c.aptechkaTheme.borderRadius.var}});let Re=class extends N{constructor(...t){super(...t),this.openShadow(zt),o.element(this,{children:[o.input({class:"text-input",type:"string",value:this.firstStore,onChange:e=>{this.updateStores(e.currentTarget.value)}})]})}};Re=$t([b.define("e-tweaker-string-manager")],Re);const Ot={boolean:Ee,color:Me,link:$e,number:Oe,select:We,string:Re};var Wt=Object.defineProperty,Rt=Object.getOwnPropertyDescriptor,Dt=(t,e,r,i)=>{for(var s=i>1?void 0:i?Rt(e,r):e,n=t.length-1,a;n>=0;n--)(a=t[n])&&(s=(i?a(e,r,s):a(s))||s);return i&&s&&Wt(e,r,s),s},He=(t,e,r)=>{if(!e.has(t))throw TypeError("Cannot "+r)},d=(t,e,r)=>(He(t,e,"read from private field"),r?r.call(t):e.get(t)),R=(t,e,r)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,r)},I=(t,e,r,i)=>(He(t,e,"write to private field"),e.set(t,r),r),k,X,Y,Q,U,he,ce;const Ft=E.createStylesheet({":host":{display:"grid",gridAutoFlow:"column",gridTemplateColumns:"0.5fr 1fr",alignItems:"center",color:c.aptechkaTheme.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:c.aptechkaTheme.colorFont.var,transitionDuration:"var(--duration-short)",transitionProperty:"fill, opacity",opacity:"0"},":host(:hover) .head-button":{opacity:"1"},".head-button:hover":{fill:c.aptechkaTheme.colorActive.var},".head-button svg":{width:"100%",height:"100%"}});let _e=class extends b.CustomElement{constructor(t){var r,i,s,n;super(),R(this,k,[]),R(this,X,void 0),R(this,Y,void 0),R(this,Q,!1),R(this,U,void 0),R(this,he,()=>{g.activeStores.current.find(a=>d(this,k).includes(a))||this.remove()}),R(this,ce,a=>{d(this,Q)&&((a.metaKey||a.ctrlKey)&&a.code==="KeyC"?navigator.clipboard.writeText(d(this,k)[0].current):(a.metaKey||a.ctrlKey)&&a.code==="KeyR"&&(d(this,k).forEach(W=>{W.reset()}),a.preventDefault()))}),I(this,k,[t.store]),I(this,X,t.store.passport.name),I(this,Y,d(this,X).split(".").slice(-1).toString());const e=((i=(r=t.store.passport)==null?void 0:r.manager)==null?void 0:i.type)||"string";I(this,U,new Ot[e](d(this,k)[0])),this.openShadow(Ft),o.element(this,{class:{disabled:((n=(s=t.store.passport)==null?void 0:s.manager)==null?void 0:n.disabled)||!1},onPointerleave:()=>{I(this,Q,!1)},onPointerenter:()=>{I(this,Q,!0)},children:[o.div({class:"head",children:[o.div({class:"name",children:d(this,Y)+":"}),o.div({class:"head-buttons",children:[o.button({class:"head-button",children:Ze,onClick:()=>{navigator.clipboard.writeText(d(this,k)[0].current)}}),o.button({class:"head-button",children:Ke,onClick:()=>{d(this,k).forEach(a=>{a.reset()})}})]})]}),d(this,U)]})}get key(){return d(this,X)}get name(){return d(this,Y)}get stores(){return d(this,k)}addStore(t){d(this,U).addStore(t)}connectedCallback(){g.activeStores.subscribe(d(this,he)),addEventListener("keydown",d(this,ce)),st.dispatchSizeChangeEvent(this)}disconnectedCallback(){g.activeStores.unsubscribe(d(this,he)),removeEventListener("keydown",d(this,ce))}};k=new WeakMap;X=new WeakMap;Y=new WeakMap;Q=new WeakMap;U=new WeakMap;he=new WeakMap;ce=new WeakMap;_e=Dt([b.define("e-tweaker-field")],_e);var Lt=Object.defineProperty,It=Object.getOwnPropertyDescriptor,At=(t,e,r,i)=>{for(var s=i>1?void 0:i?It(e,r):e,n=t.length-1,a;n>=0;n--)(a=t[n])&&(s=(i?a(e,r,s):a(s))||s);return i&&s&&Lt(e,r,s),s},je=(t,e,r)=>{if(!e.has(t))throw TypeError("Cannot "+r)},h=(t,e,r)=>(je(t,e,"read from private field"),r?r.call(t):e.get(t)),$=(t,e,r)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,r)},G=(t,e,r,i)=>(je(t,e,"write to private field"),e.set(t,r),r),x,de,f,pe,ue,ge,ve,De;const qt=E.createStylesheet({".wrapper":{boxSizing:"border-box",backgroundColor:"rgba(255, 255, 255, 0.1)",borderRadius:c.aptechkaTheme.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:c.aptechkaTheme.colorMainAux.var,borderRadius:c.aptechkaTheme.borderRadius.var},".name":{fontSize:"var(--font-size-large)",color:c.aptechkaTheme.colorFont.var},".body":{overflow:"hidden",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:c.aptechkaTheme.colorFont.var,transition:"transform var(--duration-short)"},".opened .arrow":{transform:"scaleY(-1)"}});let re=class extends b.CustomElement{constructor(t){super(),$(this,x,void 0),$(this,de,new g.Store(null)),$(this,f,new g.Store([])),$(this,pe,void 0),$(this,ue,null),$(this,ge,null),$(this,ve,null),$(this,De,e=>{let r=[],i=[];e.forEach(s=>{r=[...r,...s.removedNodes],i=[...i,...s.addedNodes]}),h(this,f).current=h(this,f).current.filter(s=>!r.includes(s)),h(this,x)&&!h(this,f).current.length&&!i.length&&this.remove()}),this.openShadow(qt),G(this,x,t.key),G(this,pe,new MutationObserver(h(this,De))),o.element(this,{children:[o.div({class:"wrapper",children:[o.div({class:"head",onClick:e=>{this.classList.toggle("opened"),this.classList.contains("opened")?w.openPanel(h(this,x)):w.closePanel(h(this,x))},children:[h(this,x)?o.div({class:"name",children:[h(this,x).split(".").slice(-1).toString()]}):null,h(this,de),o.element(rt.arrowIcon,{class:"arrow"})]}),o.div({class:"body",ref:e=>{G(this,ue,e)},children:o.div({class:"body-content",children:h(this,f),ref:e=>{G(this,ge,e),G(this,ve,e.firstElementChild)}})})]})]}),t!=null&&t.storeBox&&this.handleStore(t.storeBox)}get key(){return h(this,x)}get head(){return h(this,de)}get content(){return h(this,f)}get bodyElement(){return h(this,ue)}get contentElement(){return h(this,ge)}connectedCallback(){w.isPanelOpened(h(this,x))&&this.classList.add("opened"),setTimeout(()=>{this.classList.add("transition-allowed")}),h(this,pe).observe(h(this,ve),{childList:!0})}handleStore(t){if(t.remainingFolders.length){const r=t.store.passport.name.split("."),i=r.slice(0,r.length-t.remainingFolders.length).join("."),s=h(this,f).current.find(n=>n.key===i);s instanceof re?s.handleStore({store:t.store,remainingFolders:t.remainingFolders.slice(1)}):h(this,f).current=[...h(this,f).current,new re({key:i,storeBox:{store:t.store,remainingFolders:t.remainingFolders.slice(1)}})]}else{const e=h(this,f).current.find(r=>r.key===t.store.passport.name);e instanceof _e?e.addStore(t.store):h(this,f).current=[...h(this,f).current,new _e({store:t.store})]}}};x=new WeakMap;de=new WeakMap;f=new WeakMap;pe=new WeakMap;ue=new WeakMap;ge=new WeakMap;ve=new WeakMap;De=new WeakMap;re=At([b.define("e-tweaker-folder")],re);var Vt=Object.defineProperty,Nt=Object.getOwnPropertyDescriptor,Kt=(t,e,r,i)=>{for(var s=i>1?void 0:i?Nt(e,r):e,n=t.length-1,a;n>=0;n--)(a=t[n])&&(s=(i?a(e,r,s):a(s))||s);return i&&s&&Vt(e,r,s),s},Ge=(t,e,r)=>{if(!e.has(t))throw TypeError("Cannot "+r)},J=(t,e,r)=>(Ge(t,e,"read from private field"),e.get(t)),Te=(t,e,r)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,r)},Zt=(t,e,r,i)=>(Ge(t,e,"write to private field"),e.set(t,r),r),fe,we,me;const Ht=E.createStylesheet({":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:c.aptechkaTheme.colorMain.var,borderRadius:c.aptechkaTheme.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:c.aptechkaTheme.colorFont.var,transitionProperty:"fill",transitionDuration:"var(--duration-short)"},".tweaker-button:hover":{fill:c.aptechkaTheme.colorActive.var},".tweaker-button svg":{width:"100%",height:"100%"},":host .body-content":{maxHeight:`calc(
|
|
2
2
|
100dvh -
|
|
3
3
|
(
|
|
4
4
|
var(--tweaker-offset) * 2 +
|
|
@@ -7,4 +7,4 @@
|
|
|
7
7
|
)`,overflow:"hidden auto","-ms-overflow-style":"none","scrollbar-width":"none"},":host .body-content::-webkit-scrollbar":{display:"none"},[`@media ${tt.ViewportMediaRules["<=mobile"]}`]:{":host":{position:"absolute",top:"0",right:"0",width:"100% !important",borderTopLeftRadius:"0",borderTopRightRadius:"0"},":host .body-content":{maxHeight:`calc(
|
|
8
8
|
100dvh -
|
|
9
9
|
var(--tweaker-folder-height)
|
|
10
|
-
)`}}});let Fe=class extends re{constructor(){super({key:""}),
|
|
10
|
+
)`}}});let Fe=class extends re{constructor(){super({key:""}),Te(this,fe,!1),Te(this,we,()=>{w.save()}),Te(this,me,et.debounce(()=>{g.activeStores.current.forEach(t=>{var e;if(t.passport&&!((e=t.passport.manager)!=null&&e.invisible)){const r=t.passport.name.split(".");this.handleStore({store:t,remainingFolders:r.length>1?r.slice(0,-1):[]})}}),J(this,fe)||(Zt(this,fe,!0),this.contentElement.scroll({top:w.scrollValue}),this.contentElement.addEventListener("scroll",()=>{w.scrollValue=this.contentElement.scrollTop}))},10)),w.load(),this.addStylesheet(Ht),this.head.current=[o.div({class:"tweaker-buttons",onClick:t=>{t.stopPropagation()},children:[o.button({class:"tweaker-button",children:Ke,onClick:()=>{g.storeRegistry.resetState()}}),o.button({class:["tweaker-button"],children:[Ze],onClick:()=>{navigator.clipboard.writeText(JSON.stringify(g.storeRegistry.getState()))}}),o.button({class:"tweaker-button",children:at,onClick:()=>{Ue.createJSONAndSave(g.storeRegistry.projectName,g.storeRegistry.getState())}}),o.label({class:"tweaker-button",children:[nt,o.input({type:"file",style:{display:"none"},onChange:t=>{var i;const r=(i=t.currentTarget.files)==null?void 0:i[0];if(r){const s=new FileReader;s.onload=n=>{var W,K;const a=(K=(W=n.target)==null?void 0:W.result)==null?void 0:K.toString();a&&g.storeRegistry.loadState(a)},s.readAsText(r)}}})]})]})],o.element(this.bodyElement,{children:[o.div({class:"resize",onPointerdown:t=>{t.preventDefault();const e=this.getBoundingClientRect(),r=this.contentElement.scrollTop;Ne.setupDrag(i=>{const s=t.x-i.x,n=Math.max(400,e.width+s);this.style.width=n+"px",w.changeSize("tweaker",n)},()=>{setTimeout(()=>{this.contentElement.scroll({top:r})},10)})},onDblclick:()=>{this.style.width="",w.changeSize("tweaker",null)}})]})}connectedCallback(){super.connectedCallback(),window.addEventListener("beforeunload",J(this,we)),g.activeStores.subscribe(J(this,me)),w.changedSizes("tweaker")&&(this.style.width=w.changedSizes("tweaker")+"px")}disconnectedCallback(){window.removeEventListener("beforeunload",J(this,we)),w.save(),g.activeStores.unsubscribe(J(this,me))}};fe=new WeakMap;we=new WeakMap;me=new WeakMap;Fe=Kt([b.define("e-tweaker")],Fe);Qe.isBrowser&&document.body.appendChild(new Fe);
|
package/lib/tweaker/index.js
CHANGED
|
@@ -1,37 +1,37 @@
|
|
|
1
|
-
var
|
|
1
|
+
var He = (t, e, r) => {
|
|
2
2
|
if (!e.has(t))
|
|
3
3
|
throw TypeError("Cannot " + r);
|
|
4
4
|
};
|
|
5
|
-
var d = (t, e, r) => (
|
|
5
|
+
var d = (t, e, r) => (He(t, e, "read from private field"), r ? r.call(t) : e.get(t)), J = (t, e, r) => {
|
|
6
6
|
if (e.has(t))
|
|
7
7
|
throw TypeError("Cannot add the same private member more than once");
|
|
8
8
|
e instanceof WeakSet ? e.add(t) : e.set(t, r);
|
|
9
|
-
}, x = (t, e, r, i) => (
|
|
9
|
+
}, x = (t, e, r, i) => (He(t, e, "write to private field"), i ? i.call(t, r) : e.set(t, r), r);
|
|
10
10
|
import { i as it } from "../browser-0zX67oeU.js";
|
|
11
|
-
import { CustomElement as
|
|
12
|
-
import { s as W, a as K, S as
|
|
11
|
+
import { CustomElement as Ve, define as M } from "../custom-element/index.js";
|
|
12
|
+
import { s as W, a as K, S as je } from "../Store-Dqcu1DnE.js";
|
|
13
13
|
import { c as at } from "../file-lxi_oXJf.js";
|
|
14
14
|
import { d as nt } from "../function-C10DGppn.js";
|
|
15
15
|
import { s as Je } from "../gestures-D2Fdra_G.js";
|
|
16
|
-
import { e as
|
|
16
|
+
import { e as f, a0 as Ce, a as ot, D as g, aB as lt, p as re, a3 as ht } from "../tags-C-6uXIAT.js";
|
|
17
17
|
import { c as $ } from "../createStylesheet-CgWN4UhW.js";
|
|
18
18
|
import { a as ct } from "../Viewport-4ZTWxLo_.js";
|
|
19
19
|
import { aptechkaTheme as h } from "../theme/index.js";
|
|
20
|
-
import {
|
|
21
|
-
import
|
|
22
|
-
import { d as
|
|
20
|
+
import { a as dt } from "../index-C2xWAQFq.js";
|
|
21
|
+
import "../accordion/index.js";
|
|
22
|
+
import { d as pt } from "../events-C_coq1Mk.js";
|
|
23
23
|
import "../checkbox/index.js";
|
|
24
|
-
import { c as
|
|
25
|
-
import { n as
|
|
26
|
-
import { elementResizer as
|
|
27
|
-
const Xe = '<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>', Ye = '<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>',
|
|
28
|
-
var
|
|
29
|
-
class
|
|
24
|
+
import { c as ut } from "../math-BOBiC4TN.js";
|
|
25
|
+
import { n as Be, t as gt } from "../polyfills-X6KXuHg-.js";
|
|
26
|
+
import { elementResizer as Ge } from "../element-resizer/index.js";
|
|
27
|
+
const Xe = '<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>', Ye = '<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>', ft = '<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>', vt = '<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>';
|
|
28
|
+
var I, _, P;
|
|
29
|
+
class wt {
|
|
30
30
|
constructor() {
|
|
31
|
-
J(this,
|
|
31
|
+
J(this, I, void 0);
|
|
32
32
|
J(this, _, void 0);
|
|
33
33
|
J(this, P, void 0);
|
|
34
|
-
this.scrollValue = 0, x(this,
|
|
34
|
+
this.scrollValue = 0, x(this, I, ""), x(this, _, []), x(this, P, {}), x(this, I, W.projectName + "-studio");
|
|
35
35
|
}
|
|
36
36
|
openPanel(e) {
|
|
37
37
|
d(this, _).includes(e) || d(this, _).push(e);
|
|
@@ -54,11 +54,11 @@ class mt {
|
|
|
54
54
|
changedSizes: d(this, P),
|
|
55
55
|
scrollValue: this.scrollValue
|
|
56
56
|
};
|
|
57
|
-
localStorage.setItem(d(this,
|
|
57
|
+
localStorage.setItem(d(this, I), JSON.stringify(e)), W.saveState();
|
|
58
58
|
}
|
|
59
59
|
load() {
|
|
60
60
|
W.loadState();
|
|
61
|
-
const e = localStorage.getItem(d(this,
|
|
61
|
+
const e = localStorage.getItem(d(this, I));
|
|
62
62
|
if (e)
|
|
63
63
|
try {
|
|
64
64
|
const r = JSON.parse(e);
|
|
@@ -68,10 +68,10 @@ class mt {
|
|
|
68
68
|
}
|
|
69
69
|
}
|
|
70
70
|
}
|
|
71
|
-
|
|
72
|
-
const w = new
|
|
71
|
+
I = new WeakMap(), _ = new WeakMap(), P = new WeakMap();
|
|
72
|
+
const w = new wt();
|
|
73
73
|
var T;
|
|
74
|
-
class H extends
|
|
74
|
+
class H extends Ve {
|
|
75
75
|
constructor(...r) {
|
|
76
76
|
super();
|
|
77
77
|
J(this, T, void 0);
|
|
@@ -93,12 +93,12 @@ class H extends Ge {
|
|
|
93
93
|
}
|
|
94
94
|
}
|
|
95
95
|
T = new WeakMap();
|
|
96
|
-
var
|
|
97
|
-
for (var s = i > 1 ? void 0 : i ?
|
|
96
|
+
var mt = Object.defineProperty, bt = Object.getOwnPropertyDescriptor, _t = (t, e, r, i) => {
|
|
97
|
+
for (var s = i > 1 ? void 0 : i ? bt(e, r) : e, n = t.length - 1, a; n >= 0; n--)
|
|
98
98
|
(a = t[n]) && (s = (i ? a(e, r, s) : a(s)) || s);
|
|
99
|
-
return i && s &&
|
|
99
|
+
return i && s && mt(e, r, s), s;
|
|
100
100
|
};
|
|
101
|
-
const
|
|
101
|
+
const yt = $({
|
|
102
102
|
":host": {
|
|
103
103
|
width: "100%",
|
|
104
104
|
display: "inline-flex",
|
|
@@ -113,9 +113,9 @@ const St = $({
|
|
|
113
113
|
});
|
|
114
114
|
let Oe = class extends H {
|
|
115
115
|
constructor(...t) {
|
|
116
|
-
super(...t), this.openShadow(
|
|
116
|
+
super(...t), this.openShadow(yt), f(this, {
|
|
117
117
|
children: [
|
|
118
|
-
|
|
118
|
+
f("e-checkbox", {
|
|
119
119
|
onChange: (e) => {
|
|
120
120
|
this.updateStores(e.currentTarget.checked);
|
|
121
121
|
},
|
|
@@ -129,15 +129,15 @@ let Oe = class extends H {
|
|
|
129
129
|
});
|
|
130
130
|
}
|
|
131
131
|
};
|
|
132
|
-
Oe =
|
|
132
|
+
Oe = _t([
|
|
133
133
|
M("e-tweaker-boolean-manager")
|
|
134
134
|
], Oe);
|
|
135
|
-
var
|
|
136
|
-
for (var s = i > 1 ? void 0 : i ?
|
|
135
|
+
var St = Object.defineProperty, kt = Object.getOwnPropertyDescriptor, xt = (t, e, r, i) => {
|
|
136
|
+
for (var s = i > 1 ? void 0 : i ? kt(e, r) : e, n = t.length - 1, a; n >= 0; n--)
|
|
137
137
|
(a = t[n]) && (s = (i ? a(e, r, s) : a(s)) || s);
|
|
138
|
-
return i && s &&
|
|
138
|
+
return i && s && St(e, r, s), s;
|
|
139
139
|
};
|
|
140
|
-
const
|
|
140
|
+
const Ct = $({
|
|
141
141
|
":host": {
|
|
142
142
|
width: "100%",
|
|
143
143
|
display: "inline-flex",
|
|
@@ -162,7 +162,7 @@ const Pt = $({
|
|
|
162
162
|
});
|
|
163
163
|
let We = class extends H {
|
|
164
164
|
constructor(...t) {
|
|
165
|
-
super(...t), this.openShadow(
|
|
165
|
+
super(...t), this.openShadow(Ct), f(this, {
|
|
166
166
|
children: [
|
|
167
167
|
Ce({
|
|
168
168
|
type: "color",
|
|
@@ -175,15 +175,15 @@ let We = class extends H {
|
|
|
175
175
|
});
|
|
176
176
|
}
|
|
177
177
|
};
|
|
178
|
-
We =
|
|
178
|
+
We = xt([
|
|
179
179
|
M("e-tweaker-color-manager")
|
|
180
180
|
], We);
|
|
181
|
-
var
|
|
182
|
-
for (var s = i > 1 ? void 0 : i ?
|
|
181
|
+
var Pt = Object.defineProperty, Mt = Object.getOwnPropertyDescriptor, $t = (t, e, r, i) => {
|
|
182
|
+
for (var s = i > 1 ? void 0 : i ? Mt(e, r) : e, n = t.length - 1, a; n >= 0; n--)
|
|
183
183
|
(a = t[n]) && (s = (i ? a(e, r, s) : a(s)) || s);
|
|
184
|
-
return i && s &&
|
|
184
|
+
return i && s && Pt(e, r, s), s;
|
|
185
185
|
};
|
|
186
|
-
const
|
|
186
|
+
const Et = $({
|
|
187
187
|
a: {
|
|
188
188
|
color: "inherit"
|
|
189
189
|
}
|
|
@@ -191,7 +191,7 @@ const zt = $({
|
|
|
191
191
|
let Te = class extends H {
|
|
192
192
|
constructor(...t) {
|
|
193
193
|
var e, r;
|
|
194
|
-
super(...t), this.openShadow(
|
|
194
|
+
super(...t), this.openShadow(Et), f(this, {
|
|
195
195
|
children: [
|
|
196
196
|
ot({
|
|
197
197
|
href: this.firstStore,
|
|
@@ -202,22 +202,22 @@ let Te = class extends H {
|
|
|
202
202
|
});
|
|
203
203
|
}
|
|
204
204
|
};
|
|
205
|
-
Te =
|
|
205
|
+
Te = $t([
|
|
206
206
|
M("e-tweaker-link-manager")
|
|
207
207
|
], Te);
|
|
208
|
-
var
|
|
209
|
-
for (var s = i > 1 ? void 0 : i ?
|
|
208
|
+
var zt = Object.defineProperty, Ot = Object.getOwnPropertyDescriptor, Wt = (t, e, r, i) => {
|
|
209
|
+
for (var s = i > 1 ? void 0 : i ? Ot(e, r) : e, n = t.length - 1, a; n >= 0; n--)
|
|
210
210
|
(a = t[n]) && (s = (i ? a(e, r, s) : a(s)) || s);
|
|
211
|
-
return i && s &&
|
|
212
|
-
},
|
|
211
|
+
return i && s && zt(e, r, s), s;
|
|
212
|
+
}, Ne = (t, e, r) => {
|
|
213
213
|
if (!e.has(t))
|
|
214
214
|
throw TypeError("Cannot " + r);
|
|
215
|
-
}, o = (t, e, r) => (
|
|
215
|
+
}, o = (t, e, r) => (Ne(t, e, "read from private field"), r ? r.call(t) : e.get(t)), p = (t, e, r) => {
|
|
216
216
|
if (e.has(t))
|
|
217
217
|
throw TypeError("Cannot add the same private member more than once");
|
|
218
218
|
e instanceof WeakSet ? e.add(t) : e.set(t, r);
|
|
219
|
-
}, E = (t, e, r, i) => (
|
|
220
|
-
const
|
|
219
|
+
}, E = (t, e, r, i) => (Ne(t, e, "write to private field"), e.set(t, r), r), m = (t, e, r) => (Ne(t, e, "access private method"), r), V, se, q, O, F, ne, oe, C, Z, le, he, L, N, ce, De, Se, Ke, ie, ke, de;
|
|
220
|
+
const Tt = $({
|
|
221
221
|
":host": {
|
|
222
222
|
width: "100%",
|
|
223
223
|
display: "flex",
|
|
@@ -284,28 +284,28 @@ const Dt = $({
|
|
|
284
284
|
let Re = class extends H {
|
|
285
285
|
constructor(...t) {
|
|
286
286
|
var e, r, i, s, n, a, D, j;
|
|
287
|
-
super(...t), p(this,
|
|
288
|
-
const b = m(this,
|
|
287
|
+
super(...t), p(this, L), p(this, ce), p(this, Se), p(this, ie), p(this, V, []), p(this, se, []), p(this, q, void 0), p(this, O, void 0), p(this, F, void 0), p(this, ne, void 0), p(this, oe, void 0), p(this, C, void 0), p(this, Z, !1), p(this, le, (B) => {
|
|
288
|
+
const b = m(this, L, N).call(this, B);
|
|
289
289
|
return b.map((u, G) => {
|
|
290
|
-
const Pe = typeof u == "string" ? parseFloat(u) || o(this, O) : u, y =
|
|
290
|
+
const Pe = typeof u == "string" ? parseFloat(u) || o(this, O) : u, y = ut(Pe, o(this, O), o(this, F)), Me = gt(y, o(this, q));
|
|
291
291
|
b[G] = Me;
|
|
292
292
|
}), o(this, oe) === "number" ? b[0] : b;
|
|
293
293
|
}), p(this, he, () => {
|
|
294
|
-
m(this,
|
|
294
|
+
m(this, L, N).call(this).map((B, b) => {
|
|
295
295
|
const u = o(this, V)[b];
|
|
296
296
|
u && (u.value = (B || 0).toString());
|
|
297
297
|
}), m(this, ce, De).call(this);
|
|
298
298
|
}), p(this, de, () => {
|
|
299
299
|
m(this, ce, De).call(this);
|
|
300
|
-
}), this.openShadow(
|
|
300
|
+
}), this.openShadow(Tt), E(this, O, Be(
|
|
301
301
|
(r = (e = this.firstStore.passport) == null ? void 0 : e.manager) == null ? void 0 : r.min,
|
|
302
302
|
-1 / 0
|
|
303
|
-
)), E(this, F,
|
|
303
|
+
)), E(this, F, Be(
|
|
304
304
|
(s = (i = this.firstStore.passport) == null ? void 0 : i.manager) == null ? void 0 : s.max,
|
|
305
305
|
1 / 0
|
|
306
|
-
)), E(this, q, ((a = (n = this.firstStore.passport) == null ? void 0 : n.manager) == null ? void 0 : a.step) || 0.01), E(this, ne, ((j = (D = this.firstStore.passport) == null ? void 0 : D.manager) == null ? void 0 : j.ease) || 1), E(this, oe, Array.isArray(this.firstStore.current) ? "array" : "number"), E(this, C, isFinite(o(this, F)) && isFinite(o(this, O))),
|
|
306
|
+
)), E(this, q, ((a = (n = this.firstStore.passport) == null ? void 0 : n.manager) == null ? void 0 : a.step) || 0.01), E(this, ne, ((j = (D = this.firstStore.passport) == null ? void 0 : D.manager) == null ? void 0 : j.ease) || 1), E(this, oe, Array.isArray(this.firstStore.current) ? "array" : "number"), E(this, C, isFinite(o(this, F)) && isFinite(o(this, O))), f(this, {
|
|
307
307
|
class: o(this, C) ? "" : "infinite",
|
|
308
|
-
children: m(this,
|
|
308
|
+
children: m(this, L, N).call(this).map((B, b) => g({
|
|
309
309
|
class: "inputs-wrapper",
|
|
310
310
|
children: [
|
|
311
311
|
Ce({
|
|
@@ -321,23 +321,23 @@ let Re = class extends H {
|
|
|
321
321
|
);
|
|
322
322
|
}
|
|
323
323
|
}),
|
|
324
|
-
|
|
324
|
+
g({
|
|
325
325
|
class: "drag",
|
|
326
326
|
children: [
|
|
327
|
-
|
|
327
|
+
g({
|
|
328
328
|
class: "drag-knob",
|
|
329
329
|
ref: (u) => o(this, se).push(u),
|
|
330
330
|
onPointerdown: (u) => {
|
|
331
331
|
u.preventDefault(), E(this, Z, !0);
|
|
332
|
-
const G = m(this,
|
|
332
|
+
const G = m(this, L, N).call(this), Pe = G[b], y = o(this, se)[b], Me = o(this, V)[b];
|
|
333
333
|
if (y && Me) {
|
|
334
|
-
const $e = y.parentElement, et = m(this, Se,
|
|
334
|
+
const $e = y.parentElement, et = m(this, Se, Ke).call(this);
|
|
335
335
|
$e.classList.add("grabbing"), Je(
|
|
336
336
|
(Ee) => {
|
|
337
|
-
const
|
|
337
|
+
const Ze = Ee.x - u.x, tt = o(this, C) ? $e.offsetWidth / (et || 1) : 1, rt = Pe + Ze / tt * o(this, ne);
|
|
338
338
|
if (G[b] = rt, !o(this, C)) {
|
|
339
339
|
const st = m(this, ie, ke).call(this, y, 0);
|
|
340
|
-
y.style.transform = `translateX(${st +
|
|
340
|
+
y.style.transform = `translateX(${st + Ze}px)`;
|
|
341
341
|
}
|
|
342
342
|
this.updateStores([...G]);
|
|
343
343
|
},
|
|
@@ -352,7 +352,7 @@ let Re = class extends H {
|
|
|
352
352
|
);
|
|
353
353
|
}
|
|
354
354
|
},
|
|
355
|
-
children:
|
|
355
|
+
children: g({
|
|
356
356
|
class: "drag-knob-inner"
|
|
357
357
|
})
|
|
358
358
|
})
|
|
@@ -363,10 +363,10 @@ let Re = class extends H {
|
|
|
363
363
|
});
|
|
364
364
|
}
|
|
365
365
|
connectedCallback() {
|
|
366
|
-
this.firstStore.addMiddleware(o(this, le)), this.firstStore.subscribe(o(this, he)),
|
|
366
|
+
this.firstStore.addMiddleware(o(this, le)), this.firstStore.subscribe(o(this, he)), Ge.subscribe(this, o(this, de));
|
|
367
367
|
}
|
|
368
368
|
disconnectedCallback() {
|
|
369
|
-
this.firstStore.removeMiddleware(o(this, le)), this.firstStore.unsubscribe(o(this, he)),
|
|
369
|
+
this.firstStore.removeMiddleware(o(this, le)), this.firstStore.unsubscribe(o(this, he)), Ge.unsubscribe(o(this, de));
|
|
370
370
|
}
|
|
371
371
|
};
|
|
372
372
|
V = /* @__PURE__ */ new WeakMap();
|
|
@@ -380,13 +380,13 @@ C = /* @__PURE__ */ new WeakMap();
|
|
|
380
380
|
Z = /* @__PURE__ */ new WeakMap();
|
|
381
381
|
le = /* @__PURE__ */ new WeakMap();
|
|
382
382
|
he = /* @__PURE__ */ new WeakMap();
|
|
383
|
-
|
|
383
|
+
L = /* @__PURE__ */ new WeakSet();
|
|
384
384
|
N = function(t = this.firstStore.current) {
|
|
385
385
|
return Array.isArray(t) ? t : [t];
|
|
386
386
|
};
|
|
387
387
|
ce = /* @__PURE__ */ new WeakSet();
|
|
388
388
|
De = function() {
|
|
389
|
-
m(this,
|
|
389
|
+
m(this, L, N).call(this).map((t, e) => {
|
|
390
390
|
const r = o(this, se)[e];
|
|
391
391
|
if (r && (!o(this, Z) || o(this, Z) && o(this, C))) {
|
|
392
392
|
const i = m(this, ie, ke).call(this, r, t);
|
|
@@ -395,24 +395,24 @@ De = function() {
|
|
|
395
395
|
});
|
|
396
396
|
};
|
|
397
397
|
Se = /* @__PURE__ */ new WeakSet();
|
|
398
|
-
|
|
398
|
+
Ke = function() {
|
|
399
399
|
return o(this, C) ? o(this, F) - o(this, O) : 0;
|
|
400
400
|
};
|
|
401
401
|
ie = /* @__PURE__ */ new WeakSet();
|
|
402
402
|
ke = function(t, e) {
|
|
403
|
-
const r = t.parentElement, i = m(this, Se,
|
|
403
|
+
const r = t.parentElement, i = m(this, Se, Ke).call(this), s = i ? e / i : 0.5;
|
|
404
404
|
return (r.offsetWidth - t.offsetWidth) * s;
|
|
405
405
|
};
|
|
406
406
|
de = /* @__PURE__ */ new WeakMap();
|
|
407
|
-
Re =
|
|
407
|
+
Re = Wt([
|
|
408
408
|
M("e-tweaker-number-manager")
|
|
409
409
|
], Re);
|
|
410
|
-
var
|
|
411
|
-
for (var s = i > 1 ? void 0 : i ?
|
|
410
|
+
var Dt = Object.defineProperty, Rt = Object.getOwnPropertyDescriptor, Ft = (t, e, r, i) => {
|
|
411
|
+
for (var s = i > 1 ? void 0 : i ? Rt(e, r) : e, n = t.length - 1, a; n >= 0; n--)
|
|
412
412
|
(a = t[n]) && (s = (i ? a(e, r, s) : a(s)) || s);
|
|
413
|
-
return i && s &&
|
|
413
|
+
return i && s && Dt(e, r, s), s;
|
|
414
414
|
};
|
|
415
|
-
const
|
|
415
|
+
const Lt = $({
|
|
416
416
|
"e-select": {
|
|
417
417
|
width: "100%",
|
|
418
418
|
"--arrow-color": h.colorFont.var
|
|
@@ -444,16 +444,16 @@ const At = $({
|
|
|
444
444
|
let Fe = class extends H {
|
|
445
445
|
constructor(...t) {
|
|
446
446
|
var r, i;
|
|
447
|
-
super(...t), this.openShadow(
|
|
447
|
+
super(...t), this.openShadow(Lt);
|
|
448
448
|
const e = ((i = (r = this.firstStore.passport) == null ? void 0 : r.manager) == null ? void 0 : i.variants) || [];
|
|
449
|
-
|
|
450
|
-
children:
|
|
449
|
+
f(this, {
|
|
450
|
+
children: f("e-select", {
|
|
451
451
|
value: this.firstStore,
|
|
452
452
|
onChange: (s) => {
|
|
453
453
|
this.updateStores(s.currentTarget.value);
|
|
454
454
|
},
|
|
455
455
|
lightChildren: [
|
|
456
|
-
|
|
456
|
+
f("e-select-head", {
|
|
457
457
|
lightChildren: [
|
|
458
458
|
lt({
|
|
459
459
|
"data-value-holder": ""
|
|
@@ -461,7 +461,7 @@ let Fe = class extends H {
|
|
|
461
461
|
]
|
|
462
462
|
}),
|
|
463
463
|
...e.map(
|
|
464
|
-
(s, n) =>
|
|
464
|
+
(s, n) => f("e-select-option", {
|
|
465
465
|
lightChildren: s,
|
|
466
466
|
default: n === 0 ? !0 : null
|
|
467
467
|
})
|
|
@@ -471,15 +471,15 @@ let Fe = class extends H {
|
|
|
471
471
|
});
|
|
472
472
|
}
|
|
473
473
|
};
|
|
474
|
-
Fe =
|
|
474
|
+
Fe = Ft([
|
|
475
475
|
M("e-tweaker-select-manager")
|
|
476
476
|
], Fe);
|
|
477
|
-
var
|
|
478
|
-
for (var s = i > 1 ? void 0 : i ?
|
|
477
|
+
var It = Object.defineProperty, At = Object.getOwnPropertyDescriptor, Vt = (t, e, r, i) => {
|
|
478
|
+
for (var s = i > 1 ? void 0 : i ? At(e, r) : e, n = t.length - 1, a; n >= 0; n--)
|
|
479
479
|
(a = t[n]) && (s = (i ? a(e, r, s) : a(s)) || s);
|
|
480
|
-
return i && s &&
|
|
480
|
+
return i && s && It(e, r, s), s;
|
|
481
481
|
};
|
|
482
|
-
const
|
|
482
|
+
const Nt = $({
|
|
483
483
|
":host": {
|
|
484
484
|
width: "100%",
|
|
485
485
|
display: "flex",
|
|
@@ -501,9 +501,9 @@ const Kt = $({
|
|
|
501
501
|
borderRadius: h.borderRadius.var
|
|
502
502
|
}
|
|
503
503
|
});
|
|
504
|
-
let
|
|
504
|
+
let Le = class extends H {
|
|
505
505
|
constructor(...t) {
|
|
506
|
-
super(...t), this.openShadow(
|
|
506
|
+
super(...t), this.openShadow(Nt), f(this, {
|
|
507
507
|
children: [
|
|
508
508
|
Ce({
|
|
509
509
|
class: "text-input",
|
|
@@ -519,21 +519,21 @@ let Ie = class extends H {
|
|
|
519
519
|
});
|
|
520
520
|
}
|
|
521
521
|
};
|
|
522
|
-
|
|
522
|
+
Le = Vt([
|
|
523
523
|
M("e-tweaker-string-manager")
|
|
524
|
-
],
|
|
525
|
-
const
|
|
524
|
+
], Le);
|
|
525
|
+
const Kt = {
|
|
526
526
|
boolean: Oe,
|
|
527
527
|
color: We,
|
|
528
528
|
link: Te,
|
|
529
529
|
number: Re,
|
|
530
530
|
select: Fe,
|
|
531
|
-
string:
|
|
531
|
+
string: Le
|
|
532
532
|
};
|
|
533
|
-
var
|
|
534
|
-
for (var s = i > 1 ? void 0 : i ?
|
|
533
|
+
var Zt = Object.defineProperty, Ht = Object.getOwnPropertyDescriptor, jt = (t, e, r, i) => {
|
|
534
|
+
for (var s = i > 1 ? void 0 : i ? Ht(e, r) : e, n = t.length - 1, a; n >= 0; n--)
|
|
535
535
|
(a = t[n]) && (s = (i ? a(e, r, s) : a(s)) || s);
|
|
536
|
-
return i && s &&
|
|
536
|
+
return i && s && Zt(e, r, s), s;
|
|
537
537
|
}, qe = (t, e, r) => {
|
|
538
538
|
if (!e.has(t))
|
|
539
539
|
throw TypeError("Cannot " + r);
|
|
@@ -541,8 +541,8 @@ var Ht = Object.defineProperty, jt = Object.getOwnPropertyDescriptor, Bt = (t, e
|
|
|
541
541
|
if (e.has(t))
|
|
542
542
|
throw TypeError("Cannot add the same private member more than once");
|
|
543
543
|
e instanceof WeakSet ? e.add(t) : e.set(t, r);
|
|
544
|
-
},
|
|
545
|
-
const
|
|
544
|
+
}, A = (t, e, r, i) => (qe(t, e, "write to private field"), e.set(t, r), r), S, Q, U, ee, te, pe, ue;
|
|
545
|
+
const Bt = $({
|
|
546
546
|
":host": {
|
|
547
547
|
display: "grid",
|
|
548
548
|
gridAutoFlow: "column",
|
|
@@ -587,7 +587,7 @@ const Gt = $({
|
|
|
587
587
|
height: "100%"
|
|
588
588
|
}
|
|
589
589
|
});
|
|
590
|
-
let xe = class extends
|
|
590
|
+
let xe = class extends Ve {
|
|
591
591
|
constructor(t) {
|
|
592
592
|
var r, i, s, n;
|
|
593
593
|
super(), R(this, S, []), R(this, Q, void 0), R(this, U, void 0), R(this, ee, !1), R(this, te, void 0), R(this, pe, () => {
|
|
@@ -596,24 +596,24 @@ let xe = class extends Ge {
|
|
|
596
596
|
c(this, ee) && ((a.metaKey || a.ctrlKey) && a.code === "KeyC" ? navigator.clipboard.writeText(c(this, S)[0].current) : (a.metaKey || a.ctrlKey) && a.code === "KeyR" && (c(this, S).forEach((D) => {
|
|
597
597
|
D.reset();
|
|
598
598
|
}), a.preventDefault()));
|
|
599
|
-
}),
|
|
599
|
+
}), A(this, S, [t.store]), A(this, Q, t.store.passport.name), A(this, U, c(this, Q).split(".").slice(-1).toString());
|
|
600
600
|
const e = ((i = (r = t.store.passport) == null ? void 0 : r.manager) == null ? void 0 : i.type) || "string";
|
|
601
|
-
|
|
601
|
+
A(this, te, new Kt[e](c(this, S)[0])), this.openShadow(Bt), f(this, {
|
|
602
602
|
class: {
|
|
603
603
|
disabled: ((n = (s = t.store.passport) == null ? void 0 : s.manager) == null ? void 0 : n.disabled) || !1
|
|
604
604
|
},
|
|
605
605
|
onPointerleave: () => {
|
|
606
|
-
|
|
606
|
+
A(this, ee, !1);
|
|
607
607
|
},
|
|
608
608
|
onPointerenter: () => {
|
|
609
|
-
|
|
609
|
+
A(this, ee, !0);
|
|
610
610
|
},
|
|
611
611
|
children: [
|
|
612
|
-
|
|
612
|
+
g({
|
|
613
613
|
class: "head",
|
|
614
614
|
children: [
|
|
615
|
-
|
|
616
|
-
|
|
615
|
+
g({ class: "name", children: c(this, U) + ":" }),
|
|
616
|
+
g({
|
|
617
617
|
class: "head-buttons",
|
|
618
618
|
children: [
|
|
619
619
|
re({
|
|
@@ -653,7 +653,7 @@ let xe = class extends Ge {
|
|
|
653
653
|
c(this, te).addStore(t);
|
|
654
654
|
}
|
|
655
655
|
connectedCallback() {
|
|
656
|
-
K.subscribe(c(this, pe)), addEventListener("keydown", c(this, ue)),
|
|
656
|
+
K.subscribe(c(this, pe)), addEventListener("keydown", c(this, ue)), pt(this);
|
|
657
657
|
}
|
|
658
658
|
disconnectedCallback() {
|
|
659
659
|
K.unsubscribe(c(this, pe)), removeEventListener("keydown", c(this, ue));
|
|
@@ -666,13 +666,13 @@ ee = /* @__PURE__ */ new WeakMap();
|
|
|
666
666
|
te = /* @__PURE__ */ new WeakMap();
|
|
667
667
|
pe = /* @__PURE__ */ new WeakMap();
|
|
668
668
|
ue = /* @__PURE__ */ new WeakMap();
|
|
669
|
-
xe =
|
|
669
|
+
xe = jt([
|
|
670
670
|
M("e-tweaker-field")
|
|
671
671
|
], xe);
|
|
672
|
-
var
|
|
673
|
-
for (var s = i > 1 ? void 0 : i ?
|
|
672
|
+
var Gt = Object.defineProperty, Jt = Object.getOwnPropertyDescriptor, Xt = (t, e, r, i) => {
|
|
673
|
+
for (var s = i > 1 ? void 0 : i ? Jt(e, r) : e, n = t.length - 1, a; n >= 0; n--)
|
|
674
674
|
(a = t[n]) && (s = (i ? a(e, r, s) : a(s)) || s);
|
|
675
|
-
return i && s &&
|
|
675
|
+
return i && s && Gt(e, r, s), s;
|
|
676
676
|
}, Qe = (t, e, r) => {
|
|
677
677
|
if (!e.has(t))
|
|
678
678
|
throw TypeError("Cannot " + r);
|
|
@@ -680,8 +680,8 @@ var Jt = Object.defineProperty, Xt = Object.getOwnPropertyDescriptor, Yt = (t, e
|
|
|
680
680
|
if (e.has(t))
|
|
681
681
|
throw TypeError("Cannot add the same private member more than once");
|
|
682
682
|
e instanceof WeakSet ? e.add(t) : e.set(t, r);
|
|
683
|
-
}, X = (t, e, r, i) => (Qe(t, e, "write to private field"), e.set(t, r), r), k,
|
|
684
|
-
const
|
|
683
|
+
}, X = (t, e, r, i) => (Qe(t, e, "write to private field"), e.set(t, r), r), k, ge, v, fe, ve, we, me, Ie;
|
|
684
|
+
const Yt = $({
|
|
685
685
|
".wrapper": {
|
|
686
686
|
boxSizing: "border-box",
|
|
687
687
|
backgroundColor: "rgba(255, 255, 255, 0.1)",
|
|
@@ -704,10 +704,18 @@ const qt = $({
|
|
|
704
704
|
color: h.colorFont.var
|
|
705
705
|
},
|
|
706
706
|
".body": {
|
|
707
|
-
transitionProperty: "height",
|
|
708
|
-
transitionDuration: "var(--duration-short)",
|
|
709
707
|
overflow: "hidden",
|
|
710
|
-
height: "
|
|
708
|
+
height: "0"
|
|
709
|
+
},
|
|
710
|
+
":host(.transition-allowed) .body": {
|
|
711
|
+
transition: "height var(--duration-short), display var(--duration-short) allow-discrete"
|
|
712
|
+
},
|
|
713
|
+
":host(.opened) .body": {
|
|
714
|
+
height: "calc-size(auto)",
|
|
715
|
+
display: "block",
|
|
716
|
+
"@starting-style": {
|
|
717
|
+
height: "0"
|
|
718
|
+
}
|
|
711
719
|
},
|
|
712
720
|
".body-content": {
|
|
713
721
|
boxSizing: "border-box",
|
|
@@ -725,42 +733,42 @@ const qt = $({
|
|
|
725
733
|
transform: "scaleY(-1)"
|
|
726
734
|
}
|
|
727
735
|
});
|
|
728
|
-
let ae = class extends
|
|
736
|
+
let ae = class extends Ve {
|
|
729
737
|
constructor(t) {
|
|
730
|
-
super(), z(this, k, void 0), z(this,
|
|
738
|
+
super(), z(this, k, void 0), z(this, ge, new je(null)), z(this, v, new je([])), z(this, fe, void 0), z(this, ve, null), z(this, we, null), z(this, me, null), z(this, Ie, (e) => {
|
|
731
739
|
let r = [], i = [];
|
|
732
740
|
e.forEach((s) => {
|
|
733
741
|
r = [...r, ...s.removedNodes], i = [...i, ...s.addedNodes];
|
|
734
742
|
}), l(this, v).current = l(this, v).current.filter(
|
|
735
743
|
(s) => !r.includes(s)
|
|
736
744
|
), l(this, k) && !l(this, v).current.length && !i.length && this.remove();
|
|
737
|
-
}), this.openShadow(
|
|
738
|
-
onAccordionItemToggle: (e) => {
|
|
739
|
-
e.stopPropagation(), e.detail.opened ? w.openPanel(l(this, k)) : w.closePanel(l(this, k));
|
|
740
|
-
},
|
|
745
|
+
}), this.openShadow(Yt), X(this, k, t.key), X(this, fe, new MutationObserver(l(this, Ie))), f(this, {
|
|
741
746
|
children: [
|
|
742
|
-
|
|
747
|
+
g({
|
|
743
748
|
class: "wrapper",
|
|
744
749
|
children: [
|
|
745
|
-
|
|
750
|
+
g({
|
|
746
751
|
class: "head",
|
|
752
|
+
onClick: (e) => {
|
|
753
|
+
this.classList.toggle("opened"), this.classList.contains("opened") ? w.openPanel(l(this, k)) : w.closePanel(l(this, k));
|
|
754
|
+
},
|
|
747
755
|
children: [
|
|
748
|
-
l(this, k) ?
|
|
756
|
+
l(this, k) ? g({
|
|
749
757
|
class: "name",
|
|
750
758
|
children: [l(this, k).split(".").slice(-1).toString()]
|
|
751
759
|
}) : null,
|
|
752
|
-
l(this,
|
|
753
|
-
|
|
760
|
+
l(this, ge),
|
|
761
|
+
f(dt, {
|
|
754
762
|
class: "arrow"
|
|
755
763
|
})
|
|
756
764
|
]
|
|
757
765
|
}),
|
|
758
|
-
|
|
766
|
+
g({
|
|
759
767
|
class: "body",
|
|
760
768
|
ref: (e) => {
|
|
761
769
|
X(this, ve, e);
|
|
762
770
|
},
|
|
763
|
-
children:
|
|
771
|
+
children: g({
|
|
764
772
|
class: "body-content",
|
|
765
773
|
children: l(this, v),
|
|
766
774
|
ref: (e) => {
|
|
@@ -777,7 +785,7 @@ let ae = class extends dt {
|
|
|
777
785
|
return l(this, k);
|
|
778
786
|
}
|
|
779
787
|
get head() {
|
|
780
|
-
return l(this,
|
|
788
|
+
return l(this, ge);
|
|
781
789
|
}
|
|
782
790
|
get content() {
|
|
783
791
|
return l(this, v);
|
|
@@ -789,9 +797,9 @@ let ae = class extends dt {
|
|
|
789
797
|
return l(this, we);
|
|
790
798
|
}
|
|
791
799
|
connectedCallback() {
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
}
|
|
800
|
+
w.isPanelOpened(l(this, k)) && this.classList.add("opened"), setTimeout(() => {
|
|
801
|
+
this.classList.add("transition-allowed");
|
|
802
|
+
}), l(this, fe).observe(l(this, me), {
|
|
795
803
|
childList: !0
|
|
796
804
|
});
|
|
797
805
|
}
|
|
@@ -825,20 +833,20 @@ let ae = class extends dt {
|
|
|
825
833
|
}
|
|
826
834
|
};
|
|
827
835
|
k = /* @__PURE__ */ new WeakMap();
|
|
828
|
-
fe = /* @__PURE__ */ new WeakMap();
|
|
829
|
-
v = /* @__PURE__ */ new WeakMap();
|
|
830
836
|
ge = /* @__PURE__ */ new WeakMap();
|
|
837
|
+
v = /* @__PURE__ */ new WeakMap();
|
|
838
|
+
fe = /* @__PURE__ */ new WeakMap();
|
|
831
839
|
ve = /* @__PURE__ */ new WeakMap();
|
|
832
840
|
we = /* @__PURE__ */ new WeakMap();
|
|
833
841
|
me = /* @__PURE__ */ new WeakMap();
|
|
834
|
-
|
|
835
|
-
ae =
|
|
842
|
+
Ie = /* @__PURE__ */ new WeakMap();
|
|
843
|
+
ae = Xt([
|
|
836
844
|
M("e-tweaker-folder")
|
|
837
845
|
], ae);
|
|
838
|
-
var
|
|
839
|
-
for (var s = i > 1 ? void 0 : i ?
|
|
846
|
+
var qt = Object.defineProperty, Qt = Object.getOwnPropertyDescriptor, Ut = (t, e, r, i) => {
|
|
847
|
+
for (var s = i > 1 ? void 0 : i ? Qt(e, r) : e, n = t.length - 1, a; n >= 0; n--)
|
|
840
848
|
(a = t[n]) && (s = (i ? a(e, r, s) : a(s)) || s);
|
|
841
|
-
return i && s &&
|
|
849
|
+
return i && s && qt(e, r, s), s;
|
|
842
850
|
}, Ue = (t, e, r) => {
|
|
843
851
|
if (!e.has(t))
|
|
844
852
|
throw TypeError("Cannot " + r);
|
|
@@ -846,8 +854,8 @@ var Qt = Object.defineProperty, Ut = Object.getOwnPropertyDescriptor, er = (t, e
|
|
|
846
854
|
if (e.has(t))
|
|
847
855
|
throw TypeError("Cannot add the same private member more than once");
|
|
848
856
|
e instanceof WeakSet ? e.add(t) : e.set(t, r);
|
|
849
|
-
},
|
|
850
|
-
const
|
|
857
|
+
}, er = (t, e, r, i) => (Ue(t, e, "write to private field"), e.set(t, r), r), be, _e, ye;
|
|
858
|
+
const tr = $({
|
|
851
859
|
":host": {
|
|
852
860
|
"--tweaker-width": "550px",
|
|
853
861
|
"--tweaker-offset": "20px",
|
|
@@ -939,7 +947,7 @@ const rr = $({
|
|
|
939
947
|
}
|
|
940
948
|
}
|
|
941
949
|
});
|
|
942
|
-
let
|
|
950
|
+
let Ae = class extends ae {
|
|
943
951
|
constructor() {
|
|
944
952
|
super({
|
|
945
953
|
key: ""
|
|
@@ -955,15 +963,13 @@ let Le = class extends ae {
|
|
|
955
963
|
remainingFolders: r.length > 1 ? r.slice(0, -1) : []
|
|
956
964
|
});
|
|
957
965
|
}
|
|
958
|
-
}), Y(this, be) || (
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
}, 10)), w.load(), this.addStylesheet(rr), this.head.current = [
|
|
966
|
-
f({
|
|
966
|
+
}), Y(this, be) || (er(this, be, !0), this.contentElement.scroll({
|
|
967
|
+
top: w.scrollValue
|
|
968
|
+
}), this.contentElement.addEventListener("scroll", () => {
|
|
969
|
+
w.scrollValue = this.contentElement.scrollTop;
|
|
970
|
+
}));
|
|
971
|
+
}, 10)), w.load(), this.addStylesheet(tr), this.head.current = [
|
|
972
|
+
g({
|
|
967
973
|
class: "tweaker-buttons",
|
|
968
974
|
onClick: (t) => {
|
|
969
975
|
t.stopPropagation();
|
|
@@ -987,7 +993,7 @@ let Le = class extends ae {
|
|
|
987
993
|
}),
|
|
988
994
|
re({
|
|
989
995
|
class: "tweaker-button",
|
|
990
|
-
children:
|
|
996
|
+
children: ft,
|
|
991
997
|
onClick: () => {
|
|
992
998
|
at(
|
|
993
999
|
W.projectName,
|
|
@@ -998,7 +1004,7 @@ let Le = class extends ae {
|
|
|
998
1004
|
ht({
|
|
999
1005
|
class: "tweaker-button",
|
|
1000
1006
|
children: [
|
|
1001
|
-
|
|
1007
|
+
vt,
|
|
1002
1008
|
Ce({
|
|
1003
1009
|
type: "file",
|
|
1004
1010
|
style: {
|
|
@@ -1021,9 +1027,9 @@ let Le = class extends ae {
|
|
|
1021
1027
|
})
|
|
1022
1028
|
]
|
|
1023
1029
|
})
|
|
1024
|
-
],
|
|
1030
|
+
], f(this.bodyElement, {
|
|
1025
1031
|
children: [
|
|
1026
|
-
|
|
1032
|
+
g({
|
|
1027
1033
|
class: "resize",
|
|
1028
1034
|
onPointerdown: (t) => {
|
|
1029
1035
|
t.preventDefault();
|
|
@@ -1053,13 +1059,13 @@ let Le = class extends ae {
|
|
|
1053
1059
|
super.connectedCallback(), window.addEventListener("beforeunload", Y(this, _e)), K.subscribe(Y(this, ye)), w.changedSizes("tweaker") && (this.style.width = w.changedSizes("tweaker") + "px");
|
|
1054
1060
|
}
|
|
1055
1061
|
disconnectedCallback() {
|
|
1056
|
-
|
|
1062
|
+
window.removeEventListener("beforeunload", Y(this, _e)), w.save(), K.unsubscribe(Y(this, ye));
|
|
1057
1063
|
}
|
|
1058
1064
|
};
|
|
1059
1065
|
be = /* @__PURE__ */ new WeakMap();
|
|
1060
1066
|
_e = /* @__PURE__ */ new WeakMap();
|
|
1061
1067
|
ye = /* @__PURE__ */ new WeakMap();
|
|
1062
|
-
|
|
1068
|
+
Ae = Ut([
|
|
1063
1069
|
M("e-tweaker")
|
|
1064
|
-
],
|
|
1065
|
-
it && document.body.appendChild(new
|
|
1070
|
+
], Ae);
|
|
1071
|
+
it && document.body.appendChild(new Ae());
|