aptechka 0.4.2 → 0.4.4
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/{Damped-B0eRyTcV.cjs → Damped-9h4qaGcS.cjs} +1 -1
- package/lib/{Damped-Do9H-LKf.js → Damped-HhitpTP_.js} +1 -1
- package/lib/{Derived-vGokdC4b.cjs → Derived-B-g8dYgh.cjs} +1 -1
- package/lib/{Derived-Dbjm-dob.js → Derived-kPJs5JC5.js} +1 -1
- package/lib/{SourceManager-noBYGNeX.js → SourceManager-4OHacQoQ.js} +1 -1
- package/lib/{SourceManager-CzcqsC3z.cjs → SourceManager-Bc68GDrb.cjs} +1 -1
- package/lib/Store-BQXXikps.js +156 -0
- package/lib/Store-C-1ruEIm.cjs +1 -0
- package/lib/{Viewport-CRLSlcoi.cjs → Viewport-DAjFJF5V.cjs} +1 -1
- package/lib/{Viewport-VSV_isot.js → Viewport-wlgZaIn7.js} +19 -21
- package/lib/WheelControls-0zNcnAB3.cjs +1 -0
- package/lib/WheelControls-BAyRKpRZ.js +97 -0
- package/lib/abstract-elements/index.cjs +1 -1
- package/lib/abstract-elements/index.js +3 -3
- package/lib/animation/index.cjs +1 -1
- package/lib/animation/index.js +2 -2
- package/lib/attribute/index.cjs +1 -1
- package/lib/attribute/index.js +1 -1
- package/lib/canvas/index.cjs +1 -1
- package/lib/canvas/index.js +3 -3
- package/lib/controls/Controls.d.ts +1 -2
- package/lib/controls/KeyboardControls.d.ts +3 -0
- package/lib/controls/index.cjs +1 -1
- package/lib/controls/index.d.ts +1 -1
- package/lib/controls/index.js +2 -2
- package/lib/{createStylesheet-CR-XQRVT.js → createStylesheet-DrkbCUJk.js} +1 -1
- package/lib/{createStylesheet-B4vLzvah.cjs → createStylesheet-u1ZQ2BI5.cjs} +1 -1
- package/lib/css-property/index.cjs +1 -0
- package/lib/css-property/index.d.ts +12 -0
- package/lib/css-property/index.js +54 -0
- package/lib/css-value-parser/index.cjs +1 -0
- package/lib/css-value-parser/index.d.ts +6 -0
- package/lib/css-value-parser/index.js +40 -0
- package/lib/dev/index.cjs +1 -0
- package/lib/dev/index.d.ts +1 -0
- package/lib/dev/index.js +14 -0
- package/lib/device/Viewport.d.ts +1 -1
- package/lib/device/index.cjs +1 -1
- package/lib/device/index.js +1 -1
- package/lib/element-constructor/index.cjs +1 -1
- package/lib/element-constructor/index.js +2 -2
- package/lib/en3/index.cjs +1 -1
- package/lib/en3/index.js +2 -2
- package/lib/image/index.cjs +1 -1
- package/lib/image/index.js +1 -1
- package/lib/{index-MKoD8NCT.cjs → index-CUE4tEUr.cjs} +1 -1
- package/lib/{index-D-FPaxdJ.js → index-DGji4duy.js} +3 -3
- package/lib/ladder/index.cjs +1 -1
- package/lib/ladder/index.js +1 -1
- package/lib/media/index.cjs +1 -1
- package/lib/media/index.js +1 -1
- package/lib/modal/index.cjs +1 -1
- package/lib/modal/index.js +8 -8
- package/lib/order/index.cjs +1 -1
- package/lib/order/index.d.ts +5 -4
- package/lib/order/index.js +2 -2
- package/lib/popover/index.cjs +1 -1
- package/lib/popover/index.js +1 -1
- package/lib/resized/index.cjs +1 -1
- package/lib/resized/index.js +1 -1
- package/lib/scroll/ScrollElement.d.ts +12 -10
- package/lib/scroll/index.cjs +1 -1
- package/lib/scroll/index.js +178 -174
- package/lib/select/index.cjs +1 -1
- package/lib/select/index.js +1 -1
- package/lib/source/index.cjs +1 -1
- package/lib/source/index.js +2 -2
- package/lib/store/Store.d.ts +1 -0
- package/lib/store/index.cjs +1 -1
- package/lib/store/index.js +3 -3
- package/lib/studio/index.cjs +1 -1
- package/lib/studio/index.js +5 -5
- package/lib/{tags-D9nd9mMM.js → tags-CAxO5Rs3.js} +1 -1
- package/lib/{tags-D3-tO-m6.cjs → tags-Dz_Yisj_.cjs} +1 -1
- package/lib/theme/index.cjs +1 -1
- package/lib/theme/index.js +2 -2
- package/lib/video/index.cjs +1 -1
- package/lib/video/index.js +1 -1
- package/package.json +25 -1
- package/lib/Store-DdDuj5hz.js +0 -153
- package/lib/Store-Dis8QUAR.cjs +0 -1
- package/lib/WheelControls-BqO_fTyY.js +0 -92
- package/lib/WheelControls-fiz52vcl.cjs +0 -1
package/lib/select/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../index-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../index-CUE4tEUr.cjs");Object.defineProperty(exports,"SelectElement",{enumerable:!0,get:()=>e.SelectElement});Object.defineProperty(exports,"SelectHeadElement",{enumerable:!0,get:()=>e.SelectHeadElement});Object.defineProperty(exports,"SelectOptionElement",{enumerable:!0,get:()=>e.SelectOptionElement});exports.SelectUserElement=e.SelectUserElement;
|
package/lib/select/index.js
CHANGED
package/lib/source/index.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";var v=(i,r,t)=>{if(!r.has(i))throw TypeError("Cannot "+t)};var e=(i,r,t)=>(v(i,r,"read from private field"),t?t.call(i):r.get(i)),n=(i,r,t)=>{if(r.has(i))throw TypeError("Cannot add the same private member more than once");r instanceof WeakSet?r.add(i):r.set(i,t)},l=(i,r,t,a)=>(v(i,r,"write to private field"),a?a.call(i,t):r.set(i,t),t);var E=(i,r,t)=>(v(i,r,"access private method"),t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const L=require("../SourceManager-
|
|
1
|
+
"use strict";var v=(i,r,t)=>{if(!r.has(i))throw TypeError("Cannot "+t)};var e=(i,r,t)=>(v(i,r,"read from private field"),t?t.call(i):r.get(i)),n=(i,r,t)=>{if(r.has(i))throw TypeError("Cannot add the same private member more than once");r instanceof WeakSet?r.add(i):r.set(i,t)},l=(i,r,t,a)=>(v(i,r,"write to private field"),a?a.call(i,t):r.set(i,t),t);var E=(i,r,t)=>(v(i,r,"access private method"),t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const L=require("../SourceManager-Bc68GDrb.cjs"),C=require("../custom-element/index.cjs"),A=require("../intersector/index.cjs"),y=require("../loading/index.cjs"),M=require("../notifier/index.cjs");let N=0;var o,s,h,m,c,u,f,g,b,x,p;class k extends C.CustomElement{constructor(){super();n(this,b);n(this,o,null);n(this,s,null);n(this,h,!1);n(this,m,!1);n(this,c,!1);n(this,u,void 0);n(this,f,new M.Notifier);n(this,g,new M.Notifier);n(this,p,t=>{e(this,c)&&!e(this,m)&&t.isIntersecting&&(e(this,o).current&&e(this,o).current!==e(this,o).previous&&E(this,b,x).call(this,e(this,o).current),l(this,m,!0)),t.isIntersecting?e(this,f).notify():e(this,g).notify()});l(this,u,`source-consumer-${++N}`)}get consumerElement(){return e(this,s)}get captureEvent(){return e(this,f)}get releaseEvent(){return e(this,g)}connectedCallback(){const t=this.getAttribute("srcset");t&&(l(this,s,this.createConsumer()),e(this,s).style.cssText=`
|
|
2
2
|
display: block;
|
|
3
3
|
width: 100%;
|
|
4
4
|
height: 100%;
|
package/lib/source/index.js
CHANGED
|
@@ -8,8 +8,8 @@ var t = (i, r, s) => (v(i, r, "read from private field"), s ? s.call(i) : r.get(
|
|
|
8
8
|
r instanceof WeakSet ? r.add(i) : r.set(i, s);
|
|
9
9
|
}, l = (i, r, s, h) => (v(i, r, "write to private field"), h ? h.call(i, s) : r.set(i, s), s);
|
|
10
10
|
var E = (i, r, s) => (v(i, r, "access private method"), s);
|
|
11
|
-
import { S as k } from "../SourceManager-
|
|
12
|
-
import { a as W, b as $ } from "../SourceManager-
|
|
11
|
+
import { S as k } from "../SourceManager-4OHacQoQ.js";
|
|
12
|
+
import { a as W, b as $ } from "../SourceManager-4OHacQoQ.js";
|
|
13
13
|
import { CustomElement as w } from "../custom-element/index.js";
|
|
14
14
|
import { intersector as A } from "../intersector/index.js";
|
|
15
15
|
import { loading as S } from "../loading/index.js";
|
package/lib/store/Store.d.ts
CHANGED
|
@@ -59,6 +59,7 @@ export interface StoreOptions<StoreType, StoreManager extends StoreManagerType =
|
|
|
59
59
|
validate?: StoreMiddleware<StoreType>;
|
|
60
60
|
skipSubscribeNotification?: boolean;
|
|
61
61
|
notifyAndClose?: boolean;
|
|
62
|
+
invisible?: boolean;
|
|
62
63
|
}
|
|
63
64
|
export declare class Store<StoreType = unknown, StoreManager extends StoreManagerType = StoreManagerType, Entry extends StoreEntry<StoreType> = StoreEntry<StoreType>> {
|
|
64
65
|
#private;
|
package/lib/store/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var A=(t,s,e)=>{if(!s.has(t))throw TypeError("Cannot "+e)};var r=(t,s,e)=>(A(t,s,"read from private field"),e?e.call(t):s.get(t)),o=(t,s,e)=>{if(s.has(t))throw TypeError("Cannot add the same private member more than once");s instanceof WeakSet?s.add(t):s.set(t,e)},h=(t,s,e,c)=>(A(t,s,"write to private field"),c?c.call(t,e):s.set(t,e),e);var D=(t,s,e,c)=>({set _(i){h(t,s,i,e)},get _(){return r(t,s,c)}});var I=(t,s,e)=>new Promise((c,i)=>{var l=u=>{try{n(e.next(u))}catch(b){i(b)}},d=u=>{try{n(e.throw(u))}catch(b){i(b)}},n=u=>u.done?c(u.value):Promise.resolve(u.value).then(l,d);n((e=e.apply(t,s)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p=require("../Store-
|
|
1
|
+
"use strict";var A=(t,s,e)=>{if(!s.has(t))throw TypeError("Cannot "+e)};var r=(t,s,e)=>(A(t,s,"read from private field"),e?e.call(t):s.get(t)),o=(t,s,e)=>{if(s.has(t))throw TypeError("Cannot add the same private member more than once");s instanceof WeakSet?s.add(t):s.set(t,e)},h=(t,s,e,c)=>(A(t,s,"write to private field"),c?c.call(t,e):s.set(t,e),e);var D=(t,s,e,c)=>({set _(i){h(t,s,i,e)},get _(){return r(t,s,c)}});var I=(t,s,e)=>new Promise((c,i)=>{var l=u=>{try{n(e.next(u))}catch(b){i(b)}},d=u=>{try{n(e.throw(u))}catch(b){i(b)}},n=u=>u.done?c(u.value):Promise.resolve(u.value).then(l,d);n((e=e.apply(t,s)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p=require("../Store-C-1ruEIm.cjs"),q=require("../Derived-B-g8dYgh.cjs"),M=require("../function-MthRj-GJ.cjs");var v,a;class P extends p.Store{constructor(e,c,i){super(null,i);o(this,v,void 0);o(this,a,new Map);h(this,v,e.subscribe(l=>{const d=[];l.current.forEach((n,u)=>{var b;if((b=l.previous)!=null&&b.includes(n)&&r(this,a).has(n))d.push(r(this,a).get(n));else{const C=c(n,u);r(this,a).set(n,C),d.push(C)}}),r(this,a).forEach((n,u)=>{l.current.includes(u)||r(this,a).delete(u)}),this.current=d}))}close(){super.close(),r(this,v).call(this)}}v=new WeakMap,a=new WeakMap;var S,f,g;class E extends p.Store{constructor(e,c,i){super(e,i);o(this,S,void 0);o(this,f,void 0);o(this,g,0);h(this,f,new p.Store(!1)),h(this,S,c),i!=null&&i.manualControl||this.refetch()}get isPending(){return r(this,f)}refetch(){r(this,f).current=!0,h(this,g,r(this,g)+1);const e=r(this,g);r(this,S).call(this).then(c=>{e===r(this,g)&&(r(this,f).current=!1,this.current=c)})}}S=new WeakMap,f=new WeakMap,g=new WeakMap;var m,y,R;class k extends E{constructor(e,c,i=100){super(e,c,{manualControl:!0,skipSubscribeNotification:!0});o(this,m,void 0);o(this,y,void 0);o(this,R,0);h(this,y,i)}get step(){return r(this,R)}startAccumulating(){h(this,m,setInterval(()=>I(this,null,function*(){++D(this,R)._,this.refetch()}),r(this,y)))}stopAccumulating(){clearInterval(r(this,m))}close(){super.close(),this.stopAccumulating()}}m=new WeakMap,y=new WeakMap,R=new WeakMap;var x;class w extends p.Store{constructor(e,c,i){super(null,i);o(this,x,[]);const l=M.debounce(()=>{this.current=c()},0);e.forEach(d=>{r(this,x).push(d.subscribe(()=>{l()}))})}close(){super.close(),r(this,x).forEach(e=>e())}}x=new WeakMap;exports.Store=p.Store;exports.activeStores=p.activeStores;exports.storeRegistry=p.storeRegistry;exports.Derived=q.Derived;exports.Composed=w;exports.CumulativeResource=k;exports.DerivedArray=P;exports.Resource=E;
|
package/lib/store/index.js
CHANGED
|
@@ -31,9 +31,9 @@ var S = (e, t, s) => new Promise((c, i) => {
|
|
|
31
31
|
}, n = (u) => u.done ? c(u.value) : Promise.resolve(u.value).then(l, f);
|
|
32
32
|
n((s = s.apply(e, t)).next());
|
|
33
33
|
});
|
|
34
|
-
import { S as A } from "../Store-
|
|
35
|
-
import { a as F, s as G } from "../Store-
|
|
36
|
-
import { D as J } from "../Derived-
|
|
34
|
+
import { S as A } from "../Store-BQXXikps.js";
|
|
35
|
+
import { a as F, s as G } from "../Store-BQXXikps.js";
|
|
36
|
+
import { D as J } from "../Derived-kPJs5JC5.js";
|
|
37
37
|
import { d as D } from "../function-C10DGppn.js";
|
|
38
38
|
var b, o;
|
|
39
39
|
class N extends A {
|
package/lib/studio/index.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";var he=(t,e,r)=>{if(!e.has(t))throw TypeError("Cannot "+r)};var v=(t,e,r)=>(he(t,e,"read from private field"),r?r.call(t):e.get(t)),z=(t,e,r)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,r)},$=(t,e,r,n)=>(he(t,e,"write to private field"),n?n.call(t,r):e.set(t,r),r);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const we=require("../browser-CpzFX2xg.cjs"),p=require("../custom-element/index.cjs"),d=require("../Store-Dis8QUAR.cjs"),h=require("../tags-D3-tO-m6.cjs"),m=require("../createStylesheet-B4vLzvah.cjs"),me=require("../file-EevnUtRj.cjs"),ke=require("../function-MthRj-GJ.cjs"),_e=require("../Viewport-CRLSlcoi.cjs"),be=require("../accordion/index.cjs"),Se=require("../index-MKoD8NCT.cjs"),ye=require("../events-Crwi8fz6.cjs"),s=require("../theme/index.cjs"),Te=require("../math-GDWEqu7y.cjs"),de='<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24"><path fill-rule="evenodd" d="M20.536 3.464C19.07 2 16.714 2 12 2C7.286 2 4.929 2 3.464 3.464C2 4.93 2 7.286 2 12c0 4.714 0 7.071 1.464 8.535C4.93 22 7.286 22 12 22c4.714 0 7.071 0 8.535-1.465C22 19.072 22 16.714 22 12s0-7.071-1.465-8.536M16.75 12a.75.75 0 0 1-.75.75H9.81l1.72 1.72a.75.75 0 1 1-1.06 1.06l-3-3a.75.75 0 0 1 0-1.06l3-3a.75.75 0 1 1 1.06 1.06l-1.72 1.72H16a.75.75 0 0 1 .75.75" clip-rule="evenodd"/></svg>',pe='<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24"><path d="M15.24 2h-3.894c-1.764 0-3.162 0-4.255.148c-1.126.152-2.037.472-2.755 1.193c-.719.721-1.038 1.636-1.189 2.766C3 7.205 3 8.608 3 10.379v5.838c0 1.508.92 2.8 2.227 3.342c-.067-.91-.067-2.185-.067-3.247v-5.01c0-1.281 0-2.386.118-3.27c.127-.948.413-1.856 1.147-2.593c.734-.737 1.639-1.024 2.583-1.152c.88-.118 1.98-.118 3.257-.118h3.07c1.276 0 2.374 0 3.255.118A3.601 3.601 0 0 0 15.24 2Z"/><path d="M6.6 11.397c0-2.726 0-4.089.844-4.936c.843-.847 2.2-.847 4.916-.847h2.88c2.715 0 4.073 0 4.917.847c.843.847.843 2.21.843 4.936v4.82c0 2.726 0 4.089-.843 4.936c-.844.847-2.202.847-4.917.847h-2.88c-2.715 0-4.073 0-4.916-.847c-.844-.847-.844-2.21-.844-4.936v-4.82Z"/></svg>',Ce='<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24"><path fill-rule="evenodd" d="M2 12c0-4.714 0-7.071 1.464-8.536C4.93 2 7.286 2 12 2c4.714 0 7.071 0 8.535 1.464C22 4.93 22 7.286 22 12c0 4.714 0 7.071-1.465 8.535C19.072 22 16.714 22 12 22s-7.071 0-8.536-1.465C2 19.072 2 16.714 2 12Zm10-5.75a.75.75 0 0 1 .75.75v5.19l1.72-1.72a.75.75 0 1 1 1.06 1.06l-3 3a.75.75 0 0 1-1.06 0l-3-3a.75.75 0 1 1 1.06-1.06l1.72 1.72V7a.75.75 0 0 1 .75-.75Zm-4 10a.75.75 0 0 0 0 1.5h8a.75.75 0 0 0 0-1.5H8Z" clip-rule="evenodd"/></svg>',xe='<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24"><path fill-rule="evenodd" d="M2 12c0-4.714 0-7.071 1.464-8.536C4.93 2 7.286 2 12 2c4.714 0 7.071 0 8.535 1.464C22 4.93 22 7.286 22 12c0 4.714 0 7.071-1.465 8.535C19.072 22 16.714 22 12 22s-7.071 0-8.536-1.465C2 19.072 2 16.714 2 12Zm10 5.75a.75.75 0 0 0 .75-.75v-5.19l1.72 1.72a.75.75 0 1 0 1.06-1.06l-3-3a.75.75 0 0 0-1.06 0l-3 3a.75.75 0 1 0 1.06 1.06l1.72-1.72V17c0 .414.336.75.75.75Zm-4-10a.75.75 0 0 1 0-1.5h8a.75.75 0 0 1 0 1.5H8Z" clip-rule="evenodd"/></svg>';var x,w;class $e{constructor(){z(this,x,"");z(this,w,[]);$(this,x,d.storeRegistry.projectName+"-studio")}openPanel(e){v(this,w).includes(e)||v(this,w).push(e)}closePanel(e){$(this,w,v(this,w).filter(r=>r!==e))}isPanelOpened(e){return v(this,w).includes(e)}save(){const e={openedPanels:v(this,w)};localStorage.setItem(v(this,x),JSON.stringify(e)),d.storeRegistry.saveState()}load(){d.storeRegistry.loadState();const e=localStorage.getItem(v(this,x));if(e)try{const r=JSON.parse(e);r.openedPanels&&$(this,w,r.openedPanels)}catch(r){console.error(r)}}}x=new WeakMap,w=new WeakMap;const C=new $e;var b;class F extends p.CustomElement{constructor(...r){super();z(this,b,void 0);$(this,b,r)}addStore(r){v(this,b).push(r)}get firstStore(){return v(this,b)[0]}get stores(){return v(this,b)}updateStores(r){v(this,b).forEach(n=>{n.current=r})}}b=new WeakMap;var Pe=Object.defineProperty,Oe=Object.getOwnPropertyDescriptor,Ee=(t,e,r,n)=>{for(var a=n>1?void 0:n?Oe(e,r):e,o=t.length-1,i;o>=0;o--)(i=t[o])&&(a=(n?i(e,r,a):i(a))||a);return n&&a&&Pe(e,r,a),a};const Me=m.createStylesheet({":host":{width:"100%",display:"inline-flex",height:"max-content"},input:{padding:"0",margin:"0",width:`calc(${s.aptechkaTheme.heightInput.var} * 0.5)`,height:`calc(${s.aptechkaTheme.heightInput.var} * 0.5)`,borderRadius:s.aptechkaTheme.borderRadius.var,overflow:"hidden",accentColor:s.aptechkaTheme.colorLight.var}});let te=class extends F{constructor(...t){super(...t),this.openShadow(Me),h.element(this,{children:[h.input({type:"checkbox",onChange:e=>{this.updateStores(e.currentTarget.checked)},ref:e=>{this.firstStore.subscribe(r=>{e.checked=r.current})}})]})}};te=Ee([p.define("e-tweaker-boolean-manager")],te);var Re=Object.defineProperty,De=Object.getOwnPropertyDescriptor,We=(t,e,r,n)=>{for(var a=n>1?void 0:n?De(e,r):e,o=t.length-1,i;o>=0;o--)(i=t[o])&&(a=(n?i(e,r,a):i(a))||a);return n&&a&&Re(e,r,a),a};const Le=m.createStylesheet({":host":{width:"100%",display:"inline-flex",height:"max-content"},input:{width:"100%",height:s.aptechkaTheme.heightInput.var,padding:"0",background:"none",borderRadius:s.aptechkaTheme.borderRadius.var,border:"none",blockSize:"unset"},"input::-webkit-color-swatch, input::-webkit-color-swatch-wrapper":{boxSizing:"border-box",padding:"0px",border:"none",borderRadius:s.aptechkaTheme.borderRadius.var,height:`calc(${s.aptechkaTheme.heightInput.var} * 0.93)`}});let re=class extends F{constructor(...t){super(...t),this.openShadow(Le),h.element(this,{children:[h.input({type:"color",value:this.firstStore,onInput:e=>{this.updateStores(e.currentTarget.value)}})]})}};re=We([p.define("e-tweaker-color-manager")],re);var Ie=Object.defineProperty,Fe=Object.getOwnPropertyDescriptor,Ae=(t,e,r,n)=>{for(var a=n>1?void 0:n?Fe(e,r):e,o=t.length-1,i;o>=0;o--)(i=t[o])&&(a=(n?i(e,r,a):i(a))||a);return n&&a&&Ie(e,r,a),a};const ze=m.createStylesheet({a:{color:"inherit"}});let ae=class extends F{constructor(...t){var e,r;super(...t),this.openShadow(ze),h.element(this,{children:[h.a({href:this.firstStore,target:(r=(e=this.firstStore.passport)==null?void 0:e.manager)!=null&&r.sameWindow?"_self":"_blank",children:this.firstStore})]})}};ae=Ae([p.define("e-tweaker-link-manager")],ae);var Ne=Object.defineProperty,qe=Object.getOwnPropertyDescriptor,He=(t,e,r,n)=>{for(var a=n>1?void 0:n?qe(e,r):e,o=t.length-1,i;o>=0;o--)(i=t[o])&&(a=(n?i(e,r,a):i(a))||a);return n&&a&&Ne(e,r,a),a},Ze=(t,e,r)=>{if(!e.has(t))throw TypeError("Cannot "+r)},X=(t,e,r)=>(Ze(t,e,"read from private field"),r?r.call(t):e.get(t)),Ge=(t,e,r)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,r)},P;const Ke=m.createStylesheet({":host":{width:"100%",display:"flex",alignItems:"center"},input:{boxSizing:"border-box",outline:"none",fontVariantNumeric:"tabular-nums",fontFamily:"inherit",color:"inherit",border:"none",fontSize:s.aptechkaTheme.fontSizeSmall.var},".text-input":{height:s.aptechkaTheme.heightInput.var,width:"100%",margin:"0",padding:`0 ${s.aptechkaTheme.gapSmall.var}`,backgroundColor:"rgba(255, 255, 255, 0.1)",borderRadius:s.aptechkaTheme.borderRadius.var}});let B=class extends F{constructor(...t){super(...t),Ge(this,P,new d.Store([])),this.openShadow(Ke),h.element(this,{children:[h.input({class:"text-input",type:"string",value:this.firstStore,onChange:e=>{this.updateStores(e.currentTarget.value)}}),X(this,P)]})}appendContent(t){X(this,P).current=[...X(this,P).current,t]}};P=new WeakMap;B=He([p.define("e-tweaker-string-manager")],B);var Ve=Object.defineProperty,Je=Object.getOwnPropertyDescriptor,Ye=(t,e,r,n)=>{for(var a=n>1?void 0:n?Je(e,r):e,o=t.length-1,i;o>=0;o--)(i=t[o])&&(a=(n?i(e,r,a):i(a))||a);return n&&a&&Ve(e,r,a),a},ue=(t,e,r)=>{if(!e.has(t))throw TypeError("Cannot "+r)},_=(t,e,r)=>(ue(t,e,"read from private field"),r?r.call(t):e.get(t)),N=(t,e,r)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,r)},j=(t,e,r,n)=>(ue(t,e,"write to private field"),n?n.call(t,r):e.set(t,r),r),O,E,M,q;let Q=class extends B{constructor(...t){var e,r,n,a,o,i;super(...t),N(this,O,void 0),N(this,E,void 0),N(this,M,void 0),N(this,q,k=>{const A=typeof k=="string"?parseFloat(k)||this.min:k,fe=Te.clamp(A,_(this,E),_(this,M));return this.toFixed(fe)}),j(this,E,((r=(e=this.firstStore.passport)==null?void 0:e.manager)==null?void 0:r.min)||0),j(this,M,((a=(n=this.firstStore.passport)==null?void 0:n.manager)==null?void 0:a.max)||1),j(this,O,((i=(o=this.firstStore.passport)==null?void 0:o.manager)==null?void 0:i.step)||.01)}get min(){return _(this,E)}get max(){return _(this,M)}get step(){return _(this,O)}toFixed(t){var r;const e=((r=_(this,O).toString().split(".")[1])==null?void 0:r.length)||0;return e?+t.toFixed(e):Math.ceil(t)}connectedCallback(){this.firstStore.addMiddleware(_(this,q))}disconnectedCallback(){this.firstStore.removeMiddleware(_(this,q))}};O=new WeakMap;E=new WeakMap;M=new WeakMap;q=new WeakMap;Q=Ye([p.define("e-tweaker-number-manager")],Q);var Be=Object.defineProperty,Qe=Object.getOwnPropertyDescriptor,Ue=(t,e,r,n)=>{for(var a=n>1?void 0:n?Qe(e,r):e,o=t.length-1,i;o>=0;o--)(i=t[o])&&(a=(n?i(e,r,a):i(a))||a);return n&&a&&Be(e,r,a),a};const Xe=m.createStylesheet({":host":{width:"100%"},".text-input":{width:"60px",marginRight:s.aptechkaTheme.gapLarge.var,textAlign:"center"},".range-input":{boxSizing:"border-box","-webkit-appearance":"none",height:"8px",width:"100%",margin:"0",padding:"0",backgroundColor:"rgba(255, 255, 255, 0.1)",borderRadius:s.aptechkaTheme.borderRadius.var},".range-input::-webkit-slider-thumb":{"-webkit-appearance":"none",height:`calc(${s.aptechkaTheme.heightInput.var} * 0.7)`,width:s.aptechkaTheme.borderRadius.var,borderRadius:s.aptechkaTheme.borderRadius.var,backgroundColor:s.aptechkaTheme.colorLight.var,transitionProperty:"background-color",transitionDuration:s.aptechkaTheme.durationShort.var},".range-input:focus::-webkit-slider-thumb":{backgroundColor:s.aptechkaTheme.colorActive.var},".range-input::-webkit-slider-runnable-track":{"-webkit-appearance":"none","box-shadow":"none",border:"none",background:"transparent"}});let ne=class extends Q{constructor(...t){super(...t),this.addStylesheet(Xe),this.appendContent(h.input({class:"range-input",type:"range",min:this.min,max:this.max,step:this.step,value:this.firstStore,onInput:e=>{this.updateStores(parseFloat(e.currentTarget.value))}}))}};ne=Ue([p.define("e-tweaker-range-manager")],ne);var je=Object.defineProperty,et=Object.getOwnPropertyDescriptor,tt=(t,e,r,n)=>{for(var a=n>1?void 0:n?et(e,r):e,o=t.length-1,i;o>=0;o--)(i=t[o])&&(a=(n?i(e,r,a):i(a))||a);return n&&a&&je(e,r,a),a};const rt=m.createStylesheet({"e-select":{width:"100%","--arrow-color":s.aptechkaTheme.colorLight.var},"e-select-head":{width:"100%",display:"flex",alignItems:"center",justifyContent:"space-between"},"e-select-option":{transitionDuration:s.aptechkaTheme.durationShort.var,transitionProperty:"color"},"e-select-option:hover":{color:s.aptechkaTheme.colorActive.var},svg:{width:"16px",height:"16px",fill:s.aptechkaTheme.colorLight.var,transitionProperty:"transform",transitionDuration:s.aptechkaTheme.durationShort.var},".opened svg":{transform:"scaleY(-1)"}});let ie=class extends F{constructor(...t){var r,n;super(...t),this.openShadow(rt);const e=((n=(r=this.firstStore.passport)==null?void 0:r.manager)==null?void 0:n.variants)||[];h.element(this,{children:h.element("e-select",{value:this.firstStore,onChange:a=>{this.updateStores(a.currentTarget.value)},lightChildren:[h.element("e-select-head",{lightChildren:[h.span({"data-value-holder":""})]}),...e.map((a,o)=>h.element("e-select-option",{lightChildren:a,default:o===0?!0:null}))]})})}};ie=tt([p.define("e-tweaker-select-manager")],ie);const at={boolean:te,color:re,link:ae,number:Q,range:ne,select:ie,string:B};var nt=Object.defineProperty,it=Object.getOwnPropertyDescriptor,st=(t,e,r,n)=>{for(var a=n>1?void 0:n?it(e,r):e,o=t.length-1,i;o>=0;o--)(i=t[o])&&(a=(n?i(e,r,a):i(a))||a);return n&&a&&nt(e,r,a),a},ve=(t,e,r)=>{if(!e.has(t))throw TypeError("Cannot "+r)},l=(t,e,r)=>(ve(t,e,"read from private field"),r?r.call(t):e.get(t)),S=(t,e,r)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,r)},y=(t,e,r,n)=>(ve(t,e,"write to private field"),n?n.call(t,r):e.set(t,r),r),g,R,D,W,L,H,Z;const ot=m.createStylesheet({":host":{display:"grid",gridAutoFlow:"column",gridTemplateColumns:"0.4fr 1fr",alignItems:"center",color:s.aptechkaTheme.colorLight.var,gap:s.aptechkaTheme.gapMedium.var},":host(.disabled)":{pointerEvents:"none",opacity:.5},".head":{fontSize:s.aptechkaTheme.fontSizeMedium.var,display:"flex",alignItems:"center",gap:s.aptechkaTheme.gapExtraSmall.var},".head-buttons":{display:"flex"},".head-button":{width:"14px",height:"14px",padding:"0",margin:"0",border:"none",background:"none",fill:s.aptechkaTheme.colorLight.var,transitionDuration:s.aptechkaTheme.durationShort.var,transitionProperty:"fill, opacity",opacity:"0"},":host(:hover) .head-button":{opacity:"1"},".head-button:hover":{fill:s.aptechkaTheme.colorActive.var},".head-button svg":{width:"100%",height:"100%"}});let U=class extends p.CustomElement{constructor(t){var r,n,a,o;super(),S(this,g,[]),S(this,R,void 0),S(this,D,void 0),S(this,W,!1),S(this,L,void 0),S(this,H,()=>{d.activeStores.current.find(i=>l(this,g).includes(i))||this.remove()}),S(this,Z,i=>{l(this,W)&&((i.metaKey||i.ctrlKey)&&i.code==="KeyC"?navigator.clipboard.writeText(l(this,g)[0].current):(i.metaKey||i.ctrlKey)&&i.code==="KeyR"&&(l(this,g).forEach(k=>{k.reset()}),i.preventDefault()))}),y(this,g,[t.store]),y(this,R,t.store.passport.name),y(this,D,l(this,R).split(".").slice(-1).toString());const e=((n=(r=t.store.passport)==null?void 0:r.manager)==null?void 0:n.type)||"string";y(this,L,new at[e](l(this,g)[0])),this.openShadow(ot),h.element(this,{class:{disabled:((o=(a=t.store.passport)==null?void 0:a.manager)==null?void 0:o.disabled)||!1},onPointerleave:()=>{y(this,W,!1)},onPointerenter:()=>{y(this,W,!0)},children:[h.div({class:"head",children:[h.div({class:"name",children:l(this,D)+":"}),h.div({class:"head-buttons",children:[h.button({class:"head-button",children:pe,onClick:()=>{navigator.clipboard.writeText(l(this,g)[0].current)}}),h.button({class:"head-button",children:de,onClick:()=>{l(this,g).forEach(i=>{i.reset()})}})]})]}),l(this,L)]})}get key(){return l(this,R)}get name(){return l(this,D)}get stores(){return l(this,g)}addStore(t){l(this,L).addStore(t)}connectedCallback(){d.activeStores.subscribe(l(this,H)),addEventListener("keydown",l(this,Z)),ye.dispatchSizeChangeEvent(this)}disconnectedCallback(){d.activeStores.unsubscribe(l(this,H)),removeEventListener("keydown",l(this,Z))}};g=new WeakMap;R=new WeakMap;D=new WeakMap;W=new WeakMap;L=new WeakMap;H=new WeakMap;Z=new WeakMap;U=st([p.define("e-tweaker-field")],U);var ht=Object.defineProperty,ct=Object.getOwnPropertyDescriptor,lt=(t,e,r,n)=>{for(var a=n>1?void 0:n?ct(e,r):e,o=t.length-1,i;o>=0;o--)(i=t[o])&&(a=(n?i(e,r,a):i(a))||a);return n&&a&&ht(e,r,a),a},ge=(t,e,r)=>{if(!e.has(t))throw TypeError("Cannot "+r)},c=(t,e,r)=>(ge(t,e,"read from private field"),r?r.call(t):e.get(t)),T=(t,e,r)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,r)},ee=(t,e,r,n)=>(ge(t,e,"write to private field"),n?n.call(t,r):e.set(t,r),r),f,G,u,K,V,se;const dt=m.createStylesheet({".wrapper":{boxSizing:"border-box",backgroundColor:"rgba(255, 255, 255, 0.1)",borderRadius:s.aptechkaTheme.borderRadius.var},".head":{boxSizing:"border-box",width:"100%",height:s.aptechkaTheme.tweakerFolderHeight.var,paddingLeft:s.aptechkaTheme.gapMedium.var,paddingRight:s.aptechkaTheme.gapMedium.var,display:"flex",alignItems:"center",justifyContent:"space-between",backgroundColor:s.aptechkaTheme.colorDarkAux.var,borderRadius:s.aptechkaTheme.borderRadius.var},".name":{fontSize:s.aptechkaTheme.fontSizeLarge.var,color:s.aptechkaTheme.colorLight.var},".body":{transitionProperty:"height",transitionDuration:s.aptechkaTheme.durationShort.var,overflow:"hidden",height:"0px"},".body-content":{boxSizing:"border-box",padding:s.aptechkaTheme.gapLarge.var,display:"grid",gap:s.aptechkaTheme.gapMedium.var},".arrow":{width:"20px",height:"20px",fill:s.aptechkaTheme.colorLight.var,transition:`transform ${s.aptechkaTheme.durationShort.var}`},".opened .arrow":{transform:"scaleY(-1)"}});let I=class extends be.AccordionElement{constructor(t){super(),T(this,f,void 0),T(this,G,new d.Store(null)),T(this,u,new d.Store([])),T(this,K,void 0),T(this,V,null),T(this,se,e=>{let r=[],n=[];e.forEach(a=>{r=[...r,...a.removedNodes],n=[...n,...a.addedNodes]}),c(this,u).current=c(this,u).current.filter(a=>!r.includes(a)),c(this,f)&&!c(this,u).current.length&&!n.length&&this.remove()}),this.openShadow(dt),ee(this,f,t.key),ee(this,K,new MutationObserver(c(this,se))),h.element(this,{onAccordionItemToggle:e=>{e.stopPropagation(),e.detail.opened?C.openPanel(c(this,f)):C.closePanel(c(this,f))},children:[h.div({class:"wrapper",children:[h.div({class:"head",children:[c(this,f)?h.div({class:"name",children:[c(this,f).split(".").slice(-1).toString()]}):null,c(this,G),h.element(Se.arrowIcon,{class:"arrow"})]}),h.div({class:"body",children:h.div({class:"body-content",children:c(this,u),ref:e=>ee(this,V,e.firstElementChild)})})]})]}),t!=null&&t.storeBox&&this.handleStore(t.storeBox)}get key(){return c(this,f)}get head(){return c(this,G)}get content(){return c(this,u)}connectedCallback(){super.connectedCallback(),setTimeout(()=>{C.isPanelOpened(c(this,f))&&this.openAll({skipTransition:!0})},50),c(this,K).observe(c(this,V),{childList:!0})}handleStore(t){if(t.remainingFolders.length){const r=t.store.passport.name.split("."),n=r.slice(0,r.length-t.remainingFolders.length).join("."),a=c(this,u).current.find(o=>o.key===n);a instanceof I?a.handleStore({store:t.store,remainingFolders:t.remainingFolders.slice(1)}):c(this,u).current=[...c(this,u).current,new I({key:n,storeBox:{store:t.store,remainingFolders:t.remainingFolders.slice(1)}})]}else{const e=c(this,u).current.find(r=>r.key===t.store.passport.name);e instanceof U?e.addStore(t.store):c(this,u).current=[...c(this,u).current,new U({store:t.store})]}}};f=new WeakMap;G=new WeakMap;u=new WeakMap;K=new WeakMap;V=new WeakMap;se=new WeakMap;I=lt([p.define("e-tweaker-folder")],I);var pt=Object.defineProperty,ut=Object.getOwnPropertyDescriptor,vt=(t,e,r,n)=>{for(var a=n>1?void 0:n?ut(e,r):e,o=t.length-1,i;o>=0;o--)(i=t[o])&&(a=(n?i(e,r,a):i(a))||a);return n&&a&&pt(e,r,a),a},gt=(t,e,r)=>{if(!e.has(t))throw TypeError("Cannot "+r)},ce=(t,e,r)=>(gt(t,e,"read from private field"),r?r.call(t):e.get(t)),ft=(t,e,r)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,r)},J;const wt=m.createStylesheet({":host":{position:"absolute",top:s.aptechkaTheme.tweakerOffset.var,right:s.aptechkaTheme.tweakerOffset.var,width:s.aptechkaTheme.tweakerWidth.var,backgroundColor:s.aptechkaTheme.colorDark.var,borderRadius:s.aptechkaTheme.borderRadius.var,transition:"opacity 0.2s",zIndex:"100",opacity:"0.1"},":host(:hover)":{opacity:"1 !important"},".tweaker-buttons":{display:"flex",alignItems:"center",gap:s.aptechkaTheme.gapExtraSmall.var},".tweaker-button":{width:"18px",height:"18px",padding:"0",margin:"0",background:"none",border:"none",fill:s.aptechkaTheme.colorLight.var,transitionProperty:"fill",transitionDuration:s.aptechkaTheme.durationShort.var},".tweaker-button:hover":{fill:s.aptechkaTheme.colorActive.var},".tweaker-button svg":{width:"100%",height:"100%"},":host .body-content":{maxHeight:`calc(
|
|
1
|
+
"use strict";var he=(t,e,r)=>{if(!e.has(t))throw TypeError("Cannot "+r)};var v=(t,e,r)=>(he(t,e,"read from private field"),r?r.call(t):e.get(t)),z=(t,e,r)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,r)},$=(t,e,r,n)=>(he(t,e,"write to private field"),n?n.call(t,r):e.set(t,r),r);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const we=require("../browser-CpzFX2xg.cjs"),p=require("../custom-element/index.cjs"),d=require("../Store-C-1ruEIm.cjs"),h=require("../tags-Dz_Yisj_.cjs"),m=require("../createStylesheet-u1ZQ2BI5.cjs"),me=require("../file-EevnUtRj.cjs"),ke=require("../function-MthRj-GJ.cjs"),_e=require("../Viewport-DAjFJF5V.cjs"),be=require("../accordion/index.cjs"),Se=require("../index-CUE4tEUr.cjs"),ye=require("../events-Crwi8fz6.cjs"),s=require("../theme/index.cjs"),Te=require("../math-GDWEqu7y.cjs"),de='<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24"><path fill-rule="evenodd" d="M20.536 3.464C19.07 2 16.714 2 12 2C7.286 2 4.929 2 3.464 3.464C2 4.93 2 7.286 2 12c0 4.714 0 7.071 1.464 8.535C4.93 22 7.286 22 12 22c4.714 0 7.071 0 8.535-1.465C22 19.072 22 16.714 22 12s0-7.071-1.465-8.536M16.75 12a.75.75 0 0 1-.75.75H9.81l1.72 1.72a.75.75 0 1 1-1.06 1.06l-3-3a.75.75 0 0 1 0-1.06l3-3a.75.75 0 1 1 1.06 1.06l-1.72 1.72H16a.75.75 0 0 1 .75.75" clip-rule="evenodd"/></svg>',pe='<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24"><path d="M15.24 2h-3.894c-1.764 0-3.162 0-4.255.148c-1.126.152-2.037.472-2.755 1.193c-.719.721-1.038 1.636-1.189 2.766C3 7.205 3 8.608 3 10.379v5.838c0 1.508.92 2.8 2.227 3.342c-.067-.91-.067-2.185-.067-3.247v-5.01c0-1.281 0-2.386.118-3.27c.127-.948.413-1.856 1.147-2.593c.734-.737 1.639-1.024 2.583-1.152c.88-.118 1.98-.118 3.257-.118h3.07c1.276 0 2.374 0 3.255.118A3.601 3.601 0 0 0 15.24 2Z"/><path d="M6.6 11.397c0-2.726 0-4.089.844-4.936c.843-.847 2.2-.847 4.916-.847h2.88c2.715 0 4.073 0 4.917.847c.843.847.843 2.21.843 4.936v4.82c0 2.726 0 4.089-.843 4.936c-.844.847-2.202.847-4.917.847h-2.88c-2.715 0-4.073 0-4.916-.847c-.844-.847-.844-2.21-.844-4.936v-4.82Z"/></svg>',Ce='<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24"><path fill-rule="evenodd" d="M2 12c0-4.714 0-7.071 1.464-8.536C4.93 2 7.286 2 12 2c4.714 0 7.071 0 8.535 1.464C22 4.93 22 7.286 22 12c0 4.714 0 7.071-1.465 8.535C19.072 22 16.714 22 12 22s-7.071 0-8.536-1.465C2 19.072 2 16.714 2 12Zm10-5.75a.75.75 0 0 1 .75.75v5.19l1.72-1.72a.75.75 0 1 1 1.06 1.06l-3 3a.75.75 0 0 1-1.06 0l-3-3a.75.75 0 1 1 1.06-1.06l1.72 1.72V7a.75.75 0 0 1 .75-.75Zm-4 10a.75.75 0 0 0 0 1.5h8a.75.75 0 0 0 0-1.5H8Z" clip-rule="evenodd"/></svg>',xe='<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24"><path fill-rule="evenodd" d="M2 12c0-4.714 0-7.071 1.464-8.536C4.93 2 7.286 2 12 2c4.714 0 7.071 0 8.535 1.464C22 4.93 22 7.286 22 12c0 4.714 0 7.071-1.465 8.535C19.072 22 16.714 22 12 22s-7.071 0-8.536-1.465C2 19.072 2 16.714 2 12Zm10 5.75a.75.75 0 0 0 .75-.75v-5.19l1.72 1.72a.75.75 0 1 0 1.06-1.06l-3-3a.75.75 0 0 0-1.06 0l-3 3a.75.75 0 1 0 1.06 1.06l1.72-1.72V17c0 .414.336.75.75.75Zm-4-10a.75.75 0 0 1 0-1.5h8a.75.75 0 0 1 0 1.5H8Z" clip-rule="evenodd"/></svg>';var x,w;class $e{constructor(){z(this,x,"");z(this,w,[]);$(this,x,d.storeRegistry.projectName+"-studio")}openPanel(e){v(this,w).includes(e)||v(this,w).push(e)}closePanel(e){$(this,w,v(this,w).filter(r=>r!==e))}isPanelOpened(e){return v(this,w).includes(e)}save(){const e={openedPanels:v(this,w)};localStorage.setItem(v(this,x),JSON.stringify(e)),d.storeRegistry.saveState()}load(){d.storeRegistry.loadState();const e=localStorage.getItem(v(this,x));if(e)try{const r=JSON.parse(e);r.openedPanels&&$(this,w,r.openedPanels)}catch(r){console.error(r)}}}x=new WeakMap,w=new WeakMap;const C=new $e;var b;class F extends p.CustomElement{constructor(...r){super();z(this,b,void 0);$(this,b,r)}addStore(r){v(this,b).push(r)}get firstStore(){return v(this,b)[0]}get stores(){return v(this,b)}updateStores(r){v(this,b).forEach(n=>{n.current=r})}}b=new WeakMap;var Pe=Object.defineProperty,Oe=Object.getOwnPropertyDescriptor,Ee=(t,e,r,n)=>{for(var a=n>1?void 0:n?Oe(e,r):e,o=t.length-1,i;o>=0;o--)(i=t[o])&&(a=(n?i(e,r,a):i(a))||a);return n&&a&&Pe(e,r,a),a};const Me=m.createStylesheet({":host":{width:"100%",display:"inline-flex",height:"max-content"},input:{padding:"0",margin:"0",width:`calc(${s.aptechkaTheme.heightInput.var} * 0.5)`,height:`calc(${s.aptechkaTheme.heightInput.var} * 0.5)`,borderRadius:s.aptechkaTheme.borderRadius.var,overflow:"hidden",accentColor:s.aptechkaTheme.colorLight.var}});let te=class extends F{constructor(...t){super(...t),this.openShadow(Me),h.element(this,{children:[h.input({type:"checkbox",onChange:e=>{this.updateStores(e.currentTarget.checked)},ref:e=>{this.firstStore.subscribe(r=>{e.checked=r.current})}})]})}};te=Ee([p.define("e-tweaker-boolean-manager")],te);var Re=Object.defineProperty,De=Object.getOwnPropertyDescriptor,We=(t,e,r,n)=>{for(var a=n>1?void 0:n?De(e,r):e,o=t.length-1,i;o>=0;o--)(i=t[o])&&(a=(n?i(e,r,a):i(a))||a);return n&&a&&Re(e,r,a),a};const Le=m.createStylesheet({":host":{width:"100%",display:"inline-flex",height:"max-content"},input:{width:"100%",height:s.aptechkaTheme.heightInput.var,padding:"0",background:"none",borderRadius:s.aptechkaTheme.borderRadius.var,border:"none",blockSize:"unset"},"input::-webkit-color-swatch, input::-webkit-color-swatch-wrapper":{boxSizing:"border-box",padding:"0px",border:"none",borderRadius:s.aptechkaTheme.borderRadius.var,height:`calc(${s.aptechkaTheme.heightInput.var} * 0.93)`}});let re=class extends F{constructor(...t){super(...t),this.openShadow(Le),h.element(this,{children:[h.input({type:"color",value:this.firstStore,onInput:e=>{this.updateStores(e.currentTarget.value)}})]})}};re=We([p.define("e-tweaker-color-manager")],re);var Ie=Object.defineProperty,Fe=Object.getOwnPropertyDescriptor,Ae=(t,e,r,n)=>{for(var a=n>1?void 0:n?Fe(e,r):e,o=t.length-1,i;o>=0;o--)(i=t[o])&&(a=(n?i(e,r,a):i(a))||a);return n&&a&&Ie(e,r,a),a};const ze=m.createStylesheet({a:{color:"inherit"}});let ae=class extends F{constructor(...t){var e,r;super(...t),this.openShadow(ze),h.element(this,{children:[h.a({href:this.firstStore,target:(r=(e=this.firstStore.passport)==null?void 0:e.manager)!=null&&r.sameWindow?"_self":"_blank",children:this.firstStore})]})}};ae=Ae([p.define("e-tweaker-link-manager")],ae);var Ne=Object.defineProperty,qe=Object.getOwnPropertyDescriptor,He=(t,e,r,n)=>{for(var a=n>1?void 0:n?qe(e,r):e,o=t.length-1,i;o>=0;o--)(i=t[o])&&(a=(n?i(e,r,a):i(a))||a);return n&&a&&Ne(e,r,a),a},Ze=(t,e,r)=>{if(!e.has(t))throw TypeError("Cannot "+r)},X=(t,e,r)=>(Ze(t,e,"read from private field"),r?r.call(t):e.get(t)),Ge=(t,e,r)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,r)},P;const Ke=m.createStylesheet({":host":{width:"100%",display:"flex",alignItems:"center"},input:{boxSizing:"border-box",outline:"none",fontVariantNumeric:"tabular-nums",fontFamily:"inherit",color:"inherit",border:"none",fontSize:s.aptechkaTheme.fontSizeSmall.var},".text-input":{height:s.aptechkaTheme.heightInput.var,width:"100%",margin:"0",padding:`0 ${s.aptechkaTheme.gapSmall.var}`,backgroundColor:"rgba(255, 255, 255, 0.1)",borderRadius:s.aptechkaTheme.borderRadius.var}});let B=class extends F{constructor(...t){super(...t),Ge(this,P,new d.Store([])),this.openShadow(Ke),h.element(this,{children:[h.input({class:"text-input",type:"string",value:this.firstStore,onChange:e=>{this.updateStores(e.currentTarget.value)}}),X(this,P)]})}appendContent(t){X(this,P).current=[...X(this,P).current,t]}};P=new WeakMap;B=He([p.define("e-tweaker-string-manager")],B);var Ve=Object.defineProperty,Je=Object.getOwnPropertyDescriptor,Ye=(t,e,r,n)=>{for(var a=n>1?void 0:n?Je(e,r):e,o=t.length-1,i;o>=0;o--)(i=t[o])&&(a=(n?i(e,r,a):i(a))||a);return n&&a&&Ve(e,r,a),a},ue=(t,e,r)=>{if(!e.has(t))throw TypeError("Cannot "+r)},_=(t,e,r)=>(ue(t,e,"read from private field"),r?r.call(t):e.get(t)),N=(t,e,r)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,r)},j=(t,e,r,n)=>(ue(t,e,"write to private field"),n?n.call(t,r):e.set(t,r),r),O,E,M,q;let Q=class extends B{constructor(...t){var e,r,n,a,o,i;super(...t),N(this,O,void 0),N(this,E,void 0),N(this,M,void 0),N(this,q,k=>{const A=typeof k=="string"?parseFloat(k)||this.min:k,fe=Te.clamp(A,_(this,E),_(this,M));return this.toFixed(fe)}),j(this,E,((r=(e=this.firstStore.passport)==null?void 0:e.manager)==null?void 0:r.min)||0),j(this,M,((a=(n=this.firstStore.passport)==null?void 0:n.manager)==null?void 0:a.max)||1),j(this,O,((i=(o=this.firstStore.passport)==null?void 0:o.manager)==null?void 0:i.step)||.01)}get min(){return _(this,E)}get max(){return _(this,M)}get step(){return _(this,O)}toFixed(t){var r;const e=((r=_(this,O).toString().split(".")[1])==null?void 0:r.length)||0;return e?+t.toFixed(e):Math.ceil(t)}connectedCallback(){this.firstStore.addMiddleware(_(this,q))}disconnectedCallback(){this.firstStore.removeMiddleware(_(this,q))}};O=new WeakMap;E=new WeakMap;M=new WeakMap;q=new WeakMap;Q=Ye([p.define("e-tweaker-number-manager")],Q);var Be=Object.defineProperty,Qe=Object.getOwnPropertyDescriptor,Ue=(t,e,r,n)=>{for(var a=n>1?void 0:n?Qe(e,r):e,o=t.length-1,i;o>=0;o--)(i=t[o])&&(a=(n?i(e,r,a):i(a))||a);return n&&a&&Be(e,r,a),a};const Xe=m.createStylesheet({":host":{width:"100%"},".text-input":{width:"60px",marginRight:s.aptechkaTheme.gapLarge.var,textAlign:"center"},".range-input":{boxSizing:"border-box","-webkit-appearance":"none",height:"8px",width:"100%",margin:"0",padding:"0",backgroundColor:"rgba(255, 255, 255, 0.1)",borderRadius:s.aptechkaTheme.borderRadius.var},".range-input::-webkit-slider-thumb":{"-webkit-appearance":"none",height:`calc(${s.aptechkaTheme.heightInput.var} * 0.7)`,width:s.aptechkaTheme.borderRadius.var,borderRadius:s.aptechkaTheme.borderRadius.var,backgroundColor:s.aptechkaTheme.colorLight.var,transitionProperty:"background-color",transitionDuration:s.aptechkaTheme.durationShort.var},".range-input:focus::-webkit-slider-thumb":{backgroundColor:s.aptechkaTheme.colorActive.var},".range-input::-webkit-slider-runnable-track":{"-webkit-appearance":"none","box-shadow":"none",border:"none",background:"transparent"}});let ne=class extends Q{constructor(...t){super(...t),this.addStylesheet(Xe),this.appendContent(h.input({class:"range-input",type:"range",min:this.min,max:this.max,step:this.step,value:this.firstStore,onInput:e=>{this.updateStores(parseFloat(e.currentTarget.value))}}))}};ne=Ue([p.define("e-tweaker-range-manager")],ne);var je=Object.defineProperty,et=Object.getOwnPropertyDescriptor,tt=(t,e,r,n)=>{for(var a=n>1?void 0:n?et(e,r):e,o=t.length-1,i;o>=0;o--)(i=t[o])&&(a=(n?i(e,r,a):i(a))||a);return n&&a&&je(e,r,a),a};const rt=m.createStylesheet({"e-select":{width:"100%","--arrow-color":s.aptechkaTheme.colorLight.var},"e-select-head":{width:"100%",display:"flex",alignItems:"center",justifyContent:"space-between"},"e-select-option":{transitionDuration:s.aptechkaTheme.durationShort.var,transitionProperty:"color"},"e-select-option:hover":{color:s.aptechkaTheme.colorActive.var},svg:{width:"16px",height:"16px",fill:s.aptechkaTheme.colorLight.var,transitionProperty:"transform",transitionDuration:s.aptechkaTheme.durationShort.var},".opened svg":{transform:"scaleY(-1)"}});let ie=class extends F{constructor(...t){var r,n;super(...t),this.openShadow(rt);const e=((n=(r=this.firstStore.passport)==null?void 0:r.manager)==null?void 0:n.variants)||[];h.element(this,{children:h.element("e-select",{value:this.firstStore,onChange:a=>{this.updateStores(a.currentTarget.value)},lightChildren:[h.element("e-select-head",{lightChildren:[h.span({"data-value-holder":""})]}),...e.map((a,o)=>h.element("e-select-option",{lightChildren:a,default:o===0?!0:null}))]})})}};ie=tt([p.define("e-tweaker-select-manager")],ie);const at={boolean:te,color:re,link:ae,number:Q,range:ne,select:ie,string:B};var nt=Object.defineProperty,it=Object.getOwnPropertyDescriptor,st=(t,e,r,n)=>{for(var a=n>1?void 0:n?it(e,r):e,o=t.length-1,i;o>=0;o--)(i=t[o])&&(a=(n?i(e,r,a):i(a))||a);return n&&a&&nt(e,r,a),a},ve=(t,e,r)=>{if(!e.has(t))throw TypeError("Cannot "+r)},l=(t,e,r)=>(ve(t,e,"read from private field"),r?r.call(t):e.get(t)),S=(t,e,r)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,r)},y=(t,e,r,n)=>(ve(t,e,"write to private field"),n?n.call(t,r):e.set(t,r),r),g,R,D,W,L,H,Z;const ot=m.createStylesheet({":host":{display:"grid",gridAutoFlow:"column",gridTemplateColumns:"0.4fr 1fr",alignItems:"center",color:s.aptechkaTheme.colorLight.var,gap:s.aptechkaTheme.gapMedium.var},":host(.disabled)":{pointerEvents:"none",opacity:.5},".head":{fontSize:s.aptechkaTheme.fontSizeMedium.var,display:"flex",alignItems:"center",gap:s.aptechkaTheme.gapExtraSmall.var},".head-buttons":{display:"flex"},".head-button":{width:"14px",height:"14px",padding:"0",margin:"0",border:"none",background:"none",fill:s.aptechkaTheme.colorLight.var,transitionDuration:s.aptechkaTheme.durationShort.var,transitionProperty:"fill, opacity",opacity:"0"},":host(:hover) .head-button":{opacity:"1"},".head-button:hover":{fill:s.aptechkaTheme.colorActive.var},".head-button svg":{width:"100%",height:"100%"}});let U=class extends p.CustomElement{constructor(t){var r,n,a,o;super(),S(this,g,[]),S(this,R,void 0),S(this,D,void 0),S(this,W,!1),S(this,L,void 0),S(this,H,()=>{d.activeStores.current.find(i=>l(this,g).includes(i))||this.remove()}),S(this,Z,i=>{l(this,W)&&((i.metaKey||i.ctrlKey)&&i.code==="KeyC"?navigator.clipboard.writeText(l(this,g)[0].current):(i.metaKey||i.ctrlKey)&&i.code==="KeyR"&&(l(this,g).forEach(k=>{k.reset()}),i.preventDefault()))}),y(this,g,[t.store]),y(this,R,t.store.passport.name),y(this,D,l(this,R).split(".").slice(-1).toString());const e=((n=(r=t.store.passport)==null?void 0:r.manager)==null?void 0:n.type)||"string";y(this,L,new at[e](l(this,g)[0])),this.openShadow(ot),h.element(this,{class:{disabled:((o=(a=t.store.passport)==null?void 0:a.manager)==null?void 0:o.disabled)||!1},onPointerleave:()=>{y(this,W,!1)},onPointerenter:()=>{y(this,W,!0)},children:[h.div({class:"head",children:[h.div({class:"name",children:l(this,D)+":"}),h.div({class:"head-buttons",children:[h.button({class:"head-button",children:pe,onClick:()=>{navigator.clipboard.writeText(l(this,g)[0].current)}}),h.button({class:"head-button",children:de,onClick:()=>{l(this,g).forEach(i=>{i.reset()})}})]})]}),l(this,L)]})}get key(){return l(this,R)}get name(){return l(this,D)}get stores(){return l(this,g)}addStore(t){l(this,L).addStore(t)}connectedCallback(){d.activeStores.subscribe(l(this,H)),addEventListener("keydown",l(this,Z)),ye.dispatchSizeChangeEvent(this)}disconnectedCallback(){d.activeStores.unsubscribe(l(this,H)),removeEventListener("keydown",l(this,Z))}};g=new WeakMap;R=new WeakMap;D=new WeakMap;W=new WeakMap;L=new WeakMap;H=new WeakMap;Z=new WeakMap;U=st([p.define("e-tweaker-field")],U);var ht=Object.defineProperty,ct=Object.getOwnPropertyDescriptor,lt=(t,e,r,n)=>{for(var a=n>1?void 0:n?ct(e,r):e,o=t.length-1,i;o>=0;o--)(i=t[o])&&(a=(n?i(e,r,a):i(a))||a);return n&&a&&ht(e,r,a),a},ge=(t,e,r)=>{if(!e.has(t))throw TypeError("Cannot "+r)},c=(t,e,r)=>(ge(t,e,"read from private field"),r?r.call(t):e.get(t)),T=(t,e,r)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,r)},ee=(t,e,r,n)=>(ge(t,e,"write to private field"),n?n.call(t,r):e.set(t,r),r),f,G,u,K,V,se;const dt=m.createStylesheet({".wrapper":{boxSizing:"border-box",backgroundColor:"rgba(255, 255, 255, 0.1)",borderRadius:s.aptechkaTheme.borderRadius.var},".head":{boxSizing:"border-box",width:"100%",height:s.aptechkaTheme.tweakerFolderHeight.var,paddingLeft:s.aptechkaTheme.gapMedium.var,paddingRight:s.aptechkaTheme.gapMedium.var,display:"flex",alignItems:"center",justifyContent:"space-between",backgroundColor:s.aptechkaTheme.colorDarkAux.var,borderRadius:s.aptechkaTheme.borderRadius.var},".name":{fontSize:s.aptechkaTheme.fontSizeLarge.var,color:s.aptechkaTheme.colorLight.var},".body":{transitionProperty:"height",transitionDuration:s.aptechkaTheme.durationShort.var,overflow:"hidden",height:"0px"},".body-content":{boxSizing:"border-box",padding:s.aptechkaTheme.gapLarge.var,display:"grid",gap:s.aptechkaTheme.gapMedium.var},".arrow":{width:"20px",height:"20px",fill:s.aptechkaTheme.colorLight.var,transition:`transform ${s.aptechkaTheme.durationShort.var}`},".opened .arrow":{transform:"scaleY(-1)"}});let I=class extends be.AccordionElement{constructor(t){super(),T(this,f,void 0),T(this,G,new d.Store(null)),T(this,u,new d.Store([])),T(this,K,void 0),T(this,V,null),T(this,se,e=>{let r=[],n=[];e.forEach(a=>{r=[...r,...a.removedNodes],n=[...n,...a.addedNodes]}),c(this,u).current=c(this,u).current.filter(a=>!r.includes(a)),c(this,f)&&!c(this,u).current.length&&!n.length&&this.remove()}),this.openShadow(dt),ee(this,f,t.key),ee(this,K,new MutationObserver(c(this,se))),h.element(this,{onAccordionItemToggle:e=>{e.stopPropagation(),e.detail.opened?C.openPanel(c(this,f)):C.closePanel(c(this,f))},children:[h.div({class:"wrapper",children:[h.div({class:"head",children:[c(this,f)?h.div({class:"name",children:[c(this,f).split(".").slice(-1).toString()]}):null,c(this,G),h.element(Se.arrowIcon,{class:"arrow"})]}),h.div({class:"body",children:h.div({class:"body-content",children:c(this,u),ref:e=>ee(this,V,e.firstElementChild)})})]})]}),t!=null&&t.storeBox&&this.handleStore(t.storeBox)}get key(){return c(this,f)}get head(){return c(this,G)}get content(){return c(this,u)}connectedCallback(){super.connectedCallback(),setTimeout(()=>{C.isPanelOpened(c(this,f))&&this.openAll({skipTransition:!0})},50),c(this,K).observe(c(this,V),{childList:!0})}handleStore(t){if(t.remainingFolders.length){const r=t.store.passport.name.split("."),n=r.slice(0,r.length-t.remainingFolders.length).join("."),a=c(this,u).current.find(o=>o.key===n);a instanceof I?a.handleStore({store:t.store,remainingFolders:t.remainingFolders.slice(1)}):c(this,u).current=[...c(this,u).current,new I({key:n,storeBox:{store:t.store,remainingFolders:t.remainingFolders.slice(1)}})]}else{const e=c(this,u).current.find(r=>r.key===t.store.passport.name);e instanceof U?e.addStore(t.store):c(this,u).current=[...c(this,u).current,new U({store:t.store})]}}};f=new WeakMap;G=new WeakMap;u=new WeakMap;K=new WeakMap;V=new WeakMap;se=new WeakMap;I=lt([p.define("e-tweaker-folder")],I);var pt=Object.defineProperty,ut=Object.getOwnPropertyDescriptor,vt=(t,e,r,n)=>{for(var a=n>1?void 0:n?ut(e,r):e,o=t.length-1,i;o>=0;o--)(i=t[o])&&(a=(n?i(e,r,a):i(a))||a);return n&&a&&pt(e,r,a),a},gt=(t,e,r)=>{if(!e.has(t))throw TypeError("Cannot "+r)},ce=(t,e,r)=>(gt(t,e,"read from private field"),r?r.call(t):e.get(t)),ft=(t,e,r)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,r)},J;const wt=m.createStylesheet({":host":{position:"absolute",top:s.aptechkaTheme.tweakerOffset.var,right:s.aptechkaTheme.tweakerOffset.var,width:s.aptechkaTheme.tweakerWidth.var,backgroundColor:s.aptechkaTheme.colorDark.var,borderRadius:s.aptechkaTheme.borderRadius.var,transition:"opacity 0.2s",zIndex:"100",opacity:"0.1"},":host(:hover)":{opacity:"1 !important"},".tweaker-buttons":{display:"flex",alignItems:"center",gap:s.aptechkaTheme.gapExtraSmall.var},".tweaker-button":{width:"18px",height:"18px",padding:"0",margin:"0",background:"none",border:"none",fill:s.aptechkaTheme.colorLight.var,transitionProperty:"fill",transitionDuration:s.aptechkaTheme.durationShort.var},".tweaker-button:hover":{fill:s.aptechkaTheme.colorActive.var},".tweaker-button svg":{width:"100%",height:"100%"},":host .body-content":{maxHeight:`calc(
|
|
2
2
|
100dvh -
|
|
3
3
|
(
|
|
4
4
|
${s.aptechkaTheme.tweakerOffset.var} * 2 +
|
package/lib/studio/index.js
CHANGED
|
@@ -9,14 +9,14 @@ var d = (t, e, r) => (ge(t, e, "read from private field"), r ? r.call(t) : e.get
|
|
|
9
9
|
}, M = (t, e, r, n) => (ge(t, e, "write to private field"), n ? n.call(t, r) : e.set(t, r), r);
|
|
10
10
|
import { i as ke } from "../browser-0zX67oeU.js";
|
|
11
11
|
import { CustomElement as ve, define as u } from "../custom-element/index.js";
|
|
12
|
-
import { s as S, S as se, a as $ } from "../Store-
|
|
13
|
-
import { e as p, a0 as N, a as xe, aB as $e, D as m, p as A, a3 as Pe } from "../tags-
|
|
14
|
-
import { c as w } from "../createStylesheet-
|
|
12
|
+
import { s as S, S as se, a as $ } from "../Store-BQXXikps.js";
|
|
13
|
+
import { e as p, a0 as N, a as xe, aB as $e, D as m, p as A, a3 as Pe } from "../tags-CAxO5Rs3.js";
|
|
14
|
+
import { c as w } from "../createStylesheet-DrkbCUJk.js";
|
|
15
15
|
import { c as Oe } from "../file-lxi_oXJf.js";
|
|
16
16
|
import { d as Me } from "../function-C10DGppn.js";
|
|
17
|
-
import { a as Ee } from "../Viewport-
|
|
17
|
+
import { a as Ee } from "../Viewport-wlgZaIn7.js";
|
|
18
18
|
import { AccordionElement as Te } from "../accordion/index.js";
|
|
19
|
-
import { a as De } from "../index-
|
|
19
|
+
import { a as De } from "../index-DGji4duy.js";
|
|
20
20
|
import { d as Re } from "../events-_C2CztxR.js";
|
|
21
21
|
import { aptechkaTheme as i } from "../theme/index.js";
|
|
22
22
|
import { c as We } from "../math-BOBiC4TN.js";
|
|
@@ -20,7 +20,7 @@ var r = (e, n, s) => (O(e, n, "read from private field"), s ? s.call(e) : n.get(
|
|
|
20
20
|
n instanceof WeakSet ? n.add(e) : n.set(e, s);
|
|
21
21
|
}, g = (e, n, s, i) => (O(e, n, "write to private field"), i ? i.call(e, s) : n.set(e, s), s);
|
|
22
22
|
var u = (e, n, s) => (O(e, n, "access private method"), s);
|
|
23
|
-
import { S as y } from "./Store-
|
|
23
|
+
import { S as y } from "./Store-BQXXikps.js";
|
|
24
24
|
import { i as De } from "./browser-0zX67oeU.js";
|
|
25
25
|
import { i as we } from "./object-R34VLqhp.js";
|
|
26
26
|
import { c as me, u as Fe } from "./string-3lAkpJJP.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var Te=Object.defineProperty,Le=Object.defineProperties;var qe=Object.getOwnPropertyDescriptors;var de=Object.getOwnPropertySymbols;var xe=Object.prototype.hasOwnProperty,Ae=Object.prototype.propertyIsEnumerable;var he=(e,t,r)=>t in e?Te(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,_=(e,t)=>{for(var r in t||(t={}))xe.call(t,r)&&he(e,r,t[r]);if(de)for(var r of de(t))Ae.call(t,r)&&he(e,r,t[r]);return e},me=(e,t)=>Le(e,qe(t));var O=(e,t,r)=>{if(!t.has(e))throw TypeError("Cannot "+r)};var o=(e,t,r)=>(O(e,t,"read from private field"),r?r.call(e):t.get(e)),a=(e,t,r)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,r)},g=(e,t,r,i)=>(O(e,t,"write to private field"),i?i.call(e,r):t.set(e,r),r);var c=(e,t,r)=>(O(e,t,"access private method"),r);const y=require("./Store-Dis8QUAR.cjs"),Me=require("./browser-CpzFX2xg.cjs"),we=require("./object-BZELAoVj.cjs"),j=require("./string-vBu90jhV.cjs"),De=require("./connector/index.cjs"),Fe=new Set(["animate","animateMotion","animateTransform","circle","clipPath","defs","desc","ellipse","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","foreignObject","g","image","line","linearGradient","listener","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialGradient","rect","set","solidColor","stop","svg","switch","symbol","text","textPath","title","tspan","view"]);var u,b,l,N,h,m,R,pe,$,be,B,ge,k,ee,T,te,G,ye,V,Ee,W,Se,z,Ce,L,ne,q,re,I,ve,x,ie,A,oe,J,Ne,M,se,v,P,D,ue,F,ce,H,ae,K,U;const Y=class Y{constructor(...t){a(this,R);a(this,$);a(this,B);a(this,k);a(this,T);a(this,G);a(this,V);a(this,W);a(this,z);a(this,L);a(this,q);a(this,I);a(this,x);a(this,A);a(this,J);a(this,M);a(this,v);a(this,D);a(this,F);a(this,H);a(this,u,void 0);a(this,b,new Set);a(this,l,new Set);a(this,N,void 0);a(this,h,void 0);a(this,m,void 0);a(this,K,()=>{o(this,b).forEach(t=>{t()}),o(this,b).clear()});a(this,U,t=>{o(this,l).forEach(r=>{r(t)}),o(this,l).clear(),c(this,A,oe).call(this)});const r=t[0],i=t[1];g(this,u,c(this,R,pe).call(this,r,i==null?void 0:i.forceSvg)),c(this,B,ge).call(this,i)}get node(){return o(this,u)}set node(t){var r;c(this,A,oe).call(this),g(this,u,t),(r=o(this,N))==null||r.call(this),o(this,u)instanceof Element&&g(this,h,[...o(this,u).querySelectorAll("store-root")]),c(this,x,ie).call(this),c(this,k,ee).call(this)}};u=new WeakMap,b=new WeakMap,l=new WeakMap,N=new WeakMap,h=new WeakMap,m=new WeakMap,R=new WeakSet,pe=function(t,r){let i=null;if(t instanceof Node)i=t;else if(typeof t=="string")if(!t.includes("<")&&t.includes("-"))i=new(customElements.get(t));else if(t.includes("<")){const s=document.createElement("div");s.innerHTML=t,i=s.firstElementChild}else Fe.has(t)||r?i=document.createElementNS("http://www.w3.org/2000/svg",t):i=document.createElement(t);else i=document.createElement("div");return i},$=new WeakSet,be=function(t){return t instanceof HTMLElement||t instanceof SVGElement},B=new WeakSet,ge=function(t){if(!t)return;const r=c(this,$,be).call(this,o(this,u)),i=t.ref;delete t.ref,t!=null&&t.onConnect&&(o(this,b).add(t.onConnect),delete t.onConnect),t!=null&&t.onDisconnect&&(o(this,l).add(t.onDisconnect),delete t.onDisconnect);let s,f;for(const d in t){const w=t[d];d==="class"&&r?c(this,T,te).call(this,w):d==="style"&&r?c(this,W,Se).call(this,w):d==="lightChildren"?c(this,v,P).call(this,o(this,u),w):d==="children"?c(this,v,P).call(this,o(this,u)instanceof Element?o(this,u).shadowRoot||o(this,u):o(this,u),w):d.startsWith("on")?(f||(f={}),f[d]=w):(s||(s={}),s[d]=w)}c(this,J,Ne).call(this,s),c(this,I,ve).call(this,f),i&&(typeof i=="function"?i(o(this,u)):i.current=o(this,u)),c(this,k,ee).call(this)},k=new WeakSet,ee=function(){if(Me.isBrowser&&(o(this,l).size||o(this,b).size)){const t=o(this,u)instanceof DocumentFragment?o(this,u).firstChild:o(this,u);g(this,N,De.connector.subscribe(t,{connectCallback:o(this,K),disconnectCallback:o(this,U),unsubscribeAfterDisconnect:!0,maxWaitSec:20}))}},T=new WeakSet,te=function(t){if(t){if(typeof t=="string")o(this,u).classList.add(t);else if(Array.isArray(t))t.forEach(r=>{c(this,T,te).call(this,r)});else if(typeof t=="object")if(t instanceof y.Store)c(this,G,ye).call(this,t);else for(const r in t){const i=t[r];i instanceof y.Store?c(this,V,Ee).call(this,r,i):i?o(this,u).classList.add(r):o(this,u).classList.remove(r)}}else return},G=new WeakSet,ye=function(t){o(this,l).add(t.subscribe(({current:r,previous:i})=>{i&&[i].flat().forEach(s=>{s&&o(this,u).classList.remove(s)}),r&&[r].flat().forEach(s=>{s&&o(this,u).classList.add(s)})}))},V=new WeakSet,Ee=function(t,r){o(this,l).add(r.subscribe(({current:i})=>{i?o(this,u).classList.add(t):o(this,u).classList.remove(t)}))},W=new WeakSet,Se=function(t){if(!t)return;o(this,u).tagName==="style"||o(this,u).tagName==="STYLE"?c(this,L,ne).call(this,t):c(this,z,Ce).call(this,t)},z=new WeakSet,Ce=function(t){for(const r in t){const i=r,s=t[i];s instanceof y.Store?o(this,l).add(s.subscribe(({current:f})=>{c(this,q,re).call(this,i,f)})):c(this,q,re).call(this,i,s)}},L=new WeakSet,ne=function(t){for(const r in t){const i=t[r];if(typeof i=="object"&&!(i instanceof y.Store))o(this,u).appendChild(document.createTextNode(`${r} {`)),c(this,L,ne).call(this,i),o(this,u).appendChild(document.createTextNode("}"));else if(i instanceof y.Store){const s=document.createTextNode("");o(this,l).add(i.subscribe(f=>{f.current?s.nodeValue=`${j.camelToKebab(r)}: ${f.current};`:s.nodeValue=""})),o(this,u).appendChild(s)}else o(this,u).appendChild(document.createTextNode(`${j.camelToKebab(r)}: ${i};`))}},q=new WeakSet,re=function(t,r){t.includes("--")?r?o(this,u).style.setProperty(t,r):o(this,u).style.removeProperty(t):r?o(this,u).style[t]=r:o(this,u).style[t]=""},I=new WeakSet,ve=function(t){if(t){o(this,m)||g(this,m,[]);for(const r in t){const i=r,s=j.uncapitalize(i.split("on").slice(1).join("on")),f=t[i];typeof f=="object"?o(this,m).push({name:s,callback:f.callback,options:f.options}):typeof f=="function"&&o(this,m).push({name:s,callback:f})}c(this,x,ie).call(this)}},x=new WeakSet,ie=function(){var t;(t=o(this,m))==null||t.forEach(r=>{o(this,u).addEventListener(r.name,r.callback,r.options)})},A=new WeakSet,oe=function(){var t;(t=o(this,m))==null||t.forEach(r=>{o(this,u).removeEventListener(r.name,r.callback,r.options)})},J=new WeakSet,Ne=function(t){for(const r in t){const i=t[r];i instanceof y.Store?o(this,l).add(i.subscribe(({current:s})=>{c(this,M,se).call(this,r,s)})):c(this,M,se).call(this,r,i)}},M=new WeakSet,se=function(t,r){var s,f;const i=o(this,u);t in i&&!((f=(s=i.constructor)==null?void 0:s.observedAttributes)!=null&&f.includes(t))?r!=null&&(i[t]=r.toString()):r!=null&&i.setAttribute(t,r.toString())},v=new WeakSet,P=function(t,r){r&&(r=[r].flat(),r.forEach(i=>{if(i instanceof y.Store){const s=document.createElement("div");s.style.display="contents",t.appendChild(s),o(this,h)||g(this,h,[]);const f=o(this,h).length;s.setAttribute("store-root",""),o(this,h).push(s),o(this,l).add(i.subscribe(({current:d,previous:w})=>{const E=o(this,h)[f];E.dispatchEvent(new CustomEvent("beforeChildrenChange",{bubbles:!0,composed:!0}));const Q=Array.from(E.childNodes),fe=[d].flat(),ke=[w].flat(),le=[],X=[];ke.forEach((p,S)=>{!fe.includes(p)&&Q[S]?le.push(Q[S]):X.push(p)}),fe.forEach((p,S)=>{if(X[S]){if(p!==X[S]){const C=c(this,F,ce).call(this,p),Z=Q[S];C instanceof Node?Z.isEqualNode(C)||E.replaceChild(C,Z):E.removeChild(Z)}}else{const C=c(this,F,ce).call(this,p);C instanceof Node&&s.appendChild(C)}}),le.forEach(p=>{E.removeChild(p)}),E.dispatchEvent(new CustomEvent("afterChildrenChange",{bubbles:!0,composed:!0}))}))}else if(i instanceof Y)c(this,D,ue).call(this,t,i.node);else if(i instanceof Function)c(this,v,P).call(this,t,we.isESClass(i)?new i:i());else{const s=c(this,H,ae).call(this,i);s instanceof Node&&c(this,D,ue).call(this,t,s)}}))},D=new WeakSet,ue=function(t,r){!(t instanceof ShadowRoot)&&r instanceof HTMLElement&&r.tagName==="STYLE"?(o(this,b).add(()=>{[...document.head.querySelectorAll("style")].find(s=>s.outerHTML===r.outerHTML)||document.head.appendChild(r)}),o(this,l).add(()=>{r.remove()})):t.appendChild(r)},F=new WeakSet,ce=function(t){return t instanceof Y?t.node:typeof t=="function"?we.isESClass(t)?new t:t():c(this,H,ae).call(this,t)},H=new WeakSet,ae=function(t){if(t instanceof Node)return t;if(t!=null){const r=String(t);if(r.trim().startsWith("<")&&r.trim().endsWith(">")){const i=document.createElement("div");return i.innerHTML=r,i.firstElementChild}else return document.createTextNode(r)}else return},K=new WeakMap,U=new WeakMap;let n=Y;function He(...e){return new n(...e)}function Pe(e){return new n("a",e)}function Re(e){return new n("abbr",e)}function $e(e){return new n("address",e)}function Be(e){return new n("area",e)}function Ge(e){return new n("article",e)}function Ve(e){return new n("aside",e)}function We(e){return new n("audio",e)}function ze(e){return new n("b",e)}function Ie(e){return new n("base",e)}function Je(e){return new n("bdi",e)}function Ke(e){return new n("bdo",e)}function Ue(e){return new n("blockquote",e)}function Ye(e){return new n("body",e)}function Qe(e){return new n("br",e)}function Xe(e){return new n("button",e)}function Ze(e){return new n("canvas",e)}function _e(e){return new n("caption",e)}function Oe(e){return new n("cite",e)}function je(e){return new n("code",e)}function et(e){return new n("col",e)}function tt(e){return new n("colgroup",e)}function nt(e){return new n("data",e)}function rt(e){return new n("datalist",e)}function it(e){return new n("dd",e)}function ot(e){return new n("del",e)}function st(e){return new n("details",e)}function ut(e){return new n("dfn",e)}function ct(e){return new n("dialog",e)}function at(e){return new n("div",e)}function ft(e){return new n("dl",e)}function lt(e){return new n("dt",e)}function dt(e){return new n("em",e)}function ht(e){return new n("embed",e)}function mt(e){return new n("fieldset",e)}function wt(e){return new n("figcaption",e)}function pt(e){return new n("figure",e)}function bt(e){return new n("footer",e)}function gt(e){return new n("form",e)}function yt(e){return new n("h1",e)}function Et(e){return new n("h2",e)}function St(e){return new n("h3",e)}function Ct(e){return new n("h4",e)}function vt(e){return new n("h5",e)}function Nt(e){return new n("h6",e)}function kt(e){return new n("head",e)}function Tt(e){return new n("header",e)}function Lt(e){return new n("hgroup",e)}function qt(e){return new n("hr",e)}function xt(e){return new n("html",e)}function At(e){return new n("i",e)}function Mt(e){return new n("iframe",e)}function Dt(e){return new n("img",e)}function Ft(e){return new n("input",e)}function Ht(e){return new n("ins",e)}function Pt(e){return new n("kbd",e)}function Rt(e){return new n("label",e)}function $t(e){return new n("legend",e)}function Bt(e){return new n("li",e)}function Gt(e){return new n("link",e)}function Vt(e){return new n("main",e)}function Wt(e){return new n("map",e)}function zt(e){return new n("mark",e)}function It(e){return new n("menu",e)}function Jt(e){return new n("meta",e)}function Kt(e){return new n("meter",e)}function Ut(e){return new n("nav",e)}function Yt(e){return new n("noscript",e)}function Qt(e){return new n("object",e)}function Xt(e){return new n("ol",e)}function Zt(e){return new n("optgroup",e)}function _t(e){return new n("option",e)}function Ot(e){return new n("output",e)}function jt(e){return new n("p",e)}function en(e){return new n("picture",e)}function tn(e){return new n("pre",e)}function nn(e){return new n("progress",e)}function rn(e){return new n("q",e)}function on(e){return new n("rp",e)}function sn(e){return new n("rt",e)}function un(e){return new n("ruby",e)}function cn(e){return new n("s",e)}function an(e){return new n("samp",e)}function fn(e){return new n("script",e)}function ln(e){return new n("search",e)}function dn(e){return new n("section",e)}function hn(e){return new n("select",e)}function mn(e){return new n("slot",e)}function wn(e){return new n("small",e)}function pn(e){return new n("source",e)}function bn(e){return new n("span",e)}function gn(e){return new n("strong",e)}function yn(e){return new n("style",{style:e})}function En(e){return new n("sub",e)}function Sn(e){return new n("summary",e)}function Cn(e){return new n("sup",e)}function vn(e){return new n("table",e)}function Nn(e){return new n("tbody",e)}function kn(e){return new n("td",e)}function Tn(e){return new n("template",e)}function Ln(e){return new n("textarea",e)}function qn(e){return new n("tfoot",e)}function xn(e){return new n("th",e)}function An(e){return new n("thead",e)}function Mn(e){return new n("time",e)}function Dn(e){return new n("title",e)}function Fn(e){return new n("tr",e)}function Hn(e){return new n("track",e)}function Pn(e){return new n("u",e)}function Rn(e){return new n("ul",e)}function $n(e){return new n("var",e)}function Bn(e){return new n("video",e)}function Gn(e){return new n("wbr",e)}function Vn(e){return new n(document.createDocumentFragment(),e)}function Wn(e){return new n(document.createTextNode(""),e)}function zn(e){return new n("div",me(_({},e),{style:_({display:"contents"},e==null?void 0:e.style)}))}exports.ElementConstructor=n;exports.a=Pe;exports.abbr=Re;exports.address=$e;exports.area=Be;exports.article=Ge;exports.aside=Ve;exports.audio=We;exports.b=ze;exports.base=Ie;exports.bdi=Je;exports.bdo=Ke;exports.blockquote=Ue;exports.body=Ye;exports.br=Qe;exports.button=Xe;exports.canvas=Ze;exports.caption=_e;exports.cite=Oe;exports.code=je;exports.col=et;exports.colgroup=tt;exports.contents=zn;exports.data=nt;exports.datalist=rt;exports.dd=it;exports.del=ot;exports.details=st;exports.dfn=ut;exports.dialog=ct;exports.div=at;exports.dl=ft;exports.dt=lt;exports.element=He;exports.em=dt;exports.embed=ht;exports.empty=Wn;exports.fieldset=mt;exports.figcaption=wt;exports.figure=pt;exports.footer=bt;exports.form=gt;exports.fragment=Vn;exports.h1=yt;exports.h2=Et;exports.h3=St;exports.h4=Ct;exports.h5=vt;exports.h6=Nt;exports.head=kt;exports.header=Tt;exports.hgroup=Lt;exports.hr=qt;exports.html=xt;exports.htmlVar=$n;exports.i=At;exports.iframe=Mt;exports.img=Dt;exports.input=Ft;exports.ins=Ht;exports.kbd=Pt;exports.label=Rt;exports.legend=$t;exports.li=Bt;exports.link=Gt;exports.main=Vt;exports.map=Wt;exports.mark=zt;exports.menu=It;exports.meta=Jt;exports.meter=Kt;exports.nav=Ut;exports.noscript=Yt;exports.object=Qt;exports.ol=Xt;exports.optgroup=Zt;exports.option=_t;exports.output=Ot;exports.p=jt;exports.picture=en;exports.pre=tn;exports.progress=nn;exports.q=rn;exports.rp=on;exports.rt=sn;exports.ruby=un;exports.s=cn;exports.samp=an;exports.script=fn;exports.search=ln;exports.section=dn;exports.select=hn;exports.slot=mn;exports.small=wn;exports.source=pn;exports.span=bn;exports.strong=gn;exports.style=yn;exports.sub=En;exports.summary=Sn;exports.sup=Cn;exports.table=vn;exports.tbody=Nn;exports.td=kn;exports.template=Tn;exports.textarea=Ln;exports.tfoot=qn;exports.th=xn;exports.thead=An;exports.time=Mn;exports.title=Dn;exports.tr=Fn;exports.track=Hn;exports.u=Pn;exports.ul=Rn;exports.video=Bn;exports.wbr=Gn;
|
|
1
|
+
"use strict";var Te=Object.defineProperty,Le=Object.defineProperties;var qe=Object.getOwnPropertyDescriptors;var de=Object.getOwnPropertySymbols;var xe=Object.prototype.hasOwnProperty,Ae=Object.prototype.propertyIsEnumerable;var he=(e,t,r)=>t in e?Te(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,_=(e,t)=>{for(var r in t||(t={}))xe.call(t,r)&&he(e,r,t[r]);if(de)for(var r of de(t))Ae.call(t,r)&&he(e,r,t[r]);return e},me=(e,t)=>Le(e,qe(t));var O=(e,t,r)=>{if(!t.has(e))throw TypeError("Cannot "+r)};var o=(e,t,r)=>(O(e,t,"read from private field"),r?r.call(e):t.get(e)),a=(e,t,r)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,r)},g=(e,t,r,i)=>(O(e,t,"write to private field"),i?i.call(e,r):t.set(e,r),r);var c=(e,t,r)=>(O(e,t,"access private method"),r);const y=require("./Store-C-1ruEIm.cjs"),Me=require("./browser-CpzFX2xg.cjs"),we=require("./object-BZELAoVj.cjs"),j=require("./string-vBu90jhV.cjs"),De=require("./connector/index.cjs"),Fe=new Set(["animate","animateMotion","animateTransform","circle","clipPath","defs","desc","ellipse","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","foreignObject","g","image","line","linearGradient","listener","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialGradient","rect","set","solidColor","stop","svg","switch","symbol","text","textPath","title","tspan","view"]);var u,b,l,N,h,m,R,pe,$,be,B,ge,k,ee,T,te,G,ye,V,Ee,W,Se,z,Ce,L,ne,q,re,I,ve,x,ie,A,oe,J,Ne,M,se,v,P,D,ue,F,ce,H,ae,K,U;const Y=class Y{constructor(...t){a(this,R);a(this,$);a(this,B);a(this,k);a(this,T);a(this,G);a(this,V);a(this,W);a(this,z);a(this,L);a(this,q);a(this,I);a(this,x);a(this,A);a(this,J);a(this,M);a(this,v);a(this,D);a(this,F);a(this,H);a(this,u,void 0);a(this,b,new Set);a(this,l,new Set);a(this,N,void 0);a(this,h,void 0);a(this,m,void 0);a(this,K,()=>{o(this,b).forEach(t=>{t()}),o(this,b).clear()});a(this,U,t=>{o(this,l).forEach(r=>{r(t)}),o(this,l).clear(),c(this,A,oe).call(this)});const r=t[0],i=t[1];g(this,u,c(this,R,pe).call(this,r,i==null?void 0:i.forceSvg)),c(this,B,ge).call(this,i)}get node(){return o(this,u)}set node(t){var r;c(this,A,oe).call(this),g(this,u,t),(r=o(this,N))==null||r.call(this),o(this,u)instanceof Element&&g(this,h,[...o(this,u).querySelectorAll("store-root")]),c(this,x,ie).call(this),c(this,k,ee).call(this)}};u=new WeakMap,b=new WeakMap,l=new WeakMap,N=new WeakMap,h=new WeakMap,m=new WeakMap,R=new WeakSet,pe=function(t,r){let i=null;if(t instanceof Node)i=t;else if(typeof t=="string")if(!t.includes("<")&&t.includes("-"))i=new(customElements.get(t));else if(t.includes("<")){const s=document.createElement("div");s.innerHTML=t,i=s.firstElementChild}else Fe.has(t)||r?i=document.createElementNS("http://www.w3.org/2000/svg",t):i=document.createElement(t);else i=document.createElement("div");return i},$=new WeakSet,be=function(t){return t instanceof HTMLElement||t instanceof SVGElement},B=new WeakSet,ge=function(t){if(!t)return;const r=c(this,$,be).call(this,o(this,u)),i=t.ref;delete t.ref,t!=null&&t.onConnect&&(o(this,b).add(t.onConnect),delete t.onConnect),t!=null&&t.onDisconnect&&(o(this,l).add(t.onDisconnect),delete t.onDisconnect);let s,f;for(const d in t){const w=t[d];d==="class"&&r?c(this,T,te).call(this,w):d==="style"&&r?c(this,W,Se).call(this,w):d==="lightChildren"?c(this,v,P).call(this,o(this,u),w):d==="children"?c(this,v,P).call(this,o(this,u)instanceof Element?o(this,u).shadowRoot||o(this,u):o(this,u),w):d.startsWith("on")?(f||(f={}),f[d]=w):(s||(s={}),s[d]=w)}c(this,J,Ne).call(this,s),c(this,I,ve).call(this,f),i&&(typeof i=="function"?i(o(this,u)):i.current=o(this,u)),c(this,k,ee).call(this)},k=new WeakSet,ee=function(){if(Me.isBrowser&&(o(this,l).size||o(this,b).size)){const t=o(this,u)instanceof DocumentFragment?o(this,u).firstChild:o(this,u);g(this,N,De.connector.subscribe(t,{connectCallback:o(this,K),disconnectCallback:o(this,U),unsubscribeAfterDisconnect:!0,maxWaitSec:20}))}},T=new WeakSet,te=function(t){if(t){if(typeof t=="string")o(this,u).classList.add(t);else if(Array.isArray(t))t.forEach(r=>{c(this,T,te).call(this,r)});else if(typeof t=="object")if(t instanceof y.Store)c(this,G,ye).call(this,t);else for(const r in t){const i=t[r];i instanceof y.Store?c(this,V,Ee).call(this,r,i):i?o(this,u).classList.add(r):o(this,u).classList.remove(r)}}else return},G=new WeakSet,ye=function(t){o(this,l).add(t.subscribe(({current:r,previous:i})=>{i&&[i].flat().forEach(s=>{s&&o(this,u).classList.remove(s)}),r&&[r].flat().forEach(s=>{s&&o(this,u).classList.add(s)})}))},V=new WeakSet,Ee=function(t,r){o(this,l).add(r.subscribe(({current:i})=>{i?o(this,u).classList.add(t):o(this,u).classList.remove(t)}))},W=new WeakSet,Se=function(t){if(!t)return;o(this,u).tagName==="style"||o(this,u).tagName==="STYLE"?c(this,L,ne).call(this,t):c(this,z,Ce).call(this,t)},z=new WeakSet,Ce=function(t){for(const r in t){const i=r,s=t[i];s instanceof y.Store?o(this,l).add(s.subscribe(({current:f})=>{c(this,q,re).call(this,i,f)})):c(this,q,re).call(this,i,s)}},L=new WeakSet,ne=function(t){for(const r in t){const i=t[r];if(typeof i=="object"&&!(i instanceof y.Store))o(this,u).appendChild(document.createTextNode(`${r} {`)),c(this,L,ne).call(this,i),o(this,u).appendChild(document.createTextNode("}"));else if(i instanceof y.Store){const s=document.createTextNode("");o(this,l).add(i.subscribe(f=>{f.current?s.nodeValue=`${j.camelToKebab(r)}: ${f.current};`:s.nodeValue=""})),o(this,u).appendChild(s)}else o(this,u).appendChild(document.createTextNode(`${j.camelToKebab(r)}: ${i};`))}},q=new WeakSet,re=function(t,r){t.includes("--")?r?o(this,u).style.setProperty(t,r):o(this,u).style.removeProperty(t):r?o(this,u).style[t]=r:o(this,u).style[t]=""},I=new WeakSet,ve=function(t){if(t){o(this,m)||g(this,m,[]);for(const r in t){const i=r,s=j.uncapitalize(i.split("on").slice(1).join("on")),f=t[i];typeof f=="object"?o(this,m).push({name:s,callback:f.callback,options:f.options}):typeof f=="function"&&o(this,m).push({name:s,callback:f})}c(this,x,ie).call(this)}},x=new WeakSet,ie=function(){var t;(t=o(this,m))==null||t.forEach(r=>{o(this,u).addEventListener(r.name,r.callback,r.options)})},A=new WeakSet,oe=function(){var t;(t=o(this,m))==null||t.forEach(r=>{o(this,u).removeEventListener(r.name,r.callback,r.options)})},J=new WeakSet,Ne=function(t){for(const r in t){const i=t[r];i instanceof y.Store?o(this,l).add(i.subscribe(({current:s})=>{c(this,M,se).call(this,r,s)})):c(this,M,se).call(this,r,i)}},M=new WeakSet,se=function(t,r){var s,f;const i=o(this,u);t in i&&!((f=(s=i.constructor)==null?void 0:s.observedAttributes)!=null&&f.includes(t))?r!=null&&(i[t]=r.toString()):r!=null&&i.setAttribute(t,r.toString())},v=new WeakSet,P=function(t,r){r&&(r=[r].flat(),r.forEach(i=>{if(i instanceof y.Store){const s=document.createElement("div");s.style.display="contents",t.appendChild(s),o(this,h)||g(this,h,[]);const f=o(this,h).length;s.setAttribute("store-root",""),o(this,h).push(s),o(this,l).add(i.subscribe(({current:d,previous:w})=>{const E=o(this,h)[f];E.dispatchEvent(new CustomEvent("beforeChildrenChange",{bubbles:!0,composed:!0}));const Q=Array.from(E.childNodes),fe=[d].flat(),ke=[w].flat(),le=[],X=[];ke.forEach((p,S)=>{!fe.includes(p)&&Q[S]?le.push(Q[S]):X.push(p)}),fe.forEach((p,S)=>{if(X[S]){if(p!==X[S]){const C=c(this,F,ce).call(this,p),Z=Q[S];C instanceof Node?Z.isEqualNode(C)||E.replaceChild(C,Z):E.removeChild(Z)}}else{const C=c(this,F,ce).call(this,p);C instanceof Node&&s.appendChild(C)}}),le.forEach(p=>{E.removeChild(p)}),E.dispatchEvent(new CustomEvent("afterChildrenChange",{bubbles:!0,composed:!0}))}))}else if(i instanceof Y)c(this,D,ue).call(this,t,i.node);else if(i instanceof Function)c(this,v,P).call(this,t,we.isESClass(i)?new i:i());else{const s=c(this,H,ae).call(this,i);s instanceof Node&&c(this,D,ue).call(this,t,s)}}))},D=new WeakSet,ue=function(t,r){!(t instanceof ShadowRoot)&&r instanceof HTMLElement&&r.tagName==="STYLE"?(o(this,b).add(()=>{[...document.head.querySelectorAll("style")].find(s=>s.outerHTML===r.outerHTML)||document.head.appendChild(r)}),o(this,l).add(()=>{r.remove()})):t.appendChild(r)},F=new WeakSet,ce=function(t){return t instanceof Y?t.node:typeof t=="function"?we.isESClass(t)?new t:t():c(this,H,ae).call(this,t)},H=new WeakSet,ae=function(t){if(t instanceof Node)return t;if(t!=null){const r=String(t);if(r.trim().startsWith("<")&&r.trim().endsWith(">")){const i=document.createElement("div");return i.innerHTML=r,i.firstElementChild}else return document.createTextNode(r)}else return},K=new WeakMap,U=new WeakMap;let n=Y;function He(...e){return new n(...e)}function Pe(e){return new n("a",e)}function Re(e){return new n("abbr",e)}function $e(e){return new n("address",e)}function Be(e){return new n("area",e)}function Ge(e){return new n("article",e)}function Ve(e){return new n("aside",e)}function We(e){return new n("audio",e)}function ze(e){return new n("b",e)}function Ie(e){return new n("base",e)}function Je(e){return new n("bdi",e)}function Ke(e){return new n("bdo",e)}function Ue(e){return new n("blockquote",e)}function Ye(e){return new n("body",e)}function Qe(e){return new n("br",e)}function Xe(e){return new n("button",e)}function Ze(e){return new n("canvas",e)}function _e(e){return new n("caption",e)}function Oe(e){return new n("cite",e)}function je(e){return new n("code",e)}function et(e){return new n("col",e)}function tt(e){return new n("colgroup",e)}function nt(e){return new n("data",e)}function rt(e){return new n("datalist",e)}function it(e){return new n("dd",e)}function ot(e){return new n("del",e)}function st(e){return new n("details",e)}function ut(e){return new n("dfn",e)}function ct(e){return new n("dialog",e)}function at(e){return new n("div",e)}function ft(e){return new n("dl",e)}function lt(e){return new n("dt",e)}function dt(e){return new n("em",e)}function ht(e){return new n("embed",e)}function mt(e){return new n("fieldset",e)}function wt(e){return new n("figcaption",e)}function pt(e){return new n("figure",e)}function bt(e){return new n("footer",e)}function gt(e){return new n("form",e)}function yt(e){return new n("h1",e)}function Et(e){return new n("h2",e)}function St(e){return new n("h3",e)}function Ct(e){return new n("h4",e)}function vt(e){return new n("h5",e)}function Nt(e){return new n("h6",e)}function kt(e){return new n("head",e)}function Tt(e){return new n("header",e)}function Lt(e){return new n("hgroup",e)}function qt(e){return new n("hr",e)}function xt(e){return new n("html",e)}function At(e){return new n("i",e)}function Mt(e){return new n("iframe",e)}function Dt(e){return new n("img",e)}function Ft(e){return new n("input",e)}function Ht(e){return new n("ins",e)}function Pt(e){return new n("kbd",e)}function Rt(e){return new n("label",e)}function $t(e){return new n("legend",e)}function Bt(e){return new n("li",e)}function Gt(e){return new n("link",e)}function Vt(e){return new n("main",e)}function Wt(e){return new n("map",e)}function zt(e){return new n("mark",e)}function It(e){return new n("menu",e)}function Jt(e){return new n("meta",e)}function Kt(e){return new n("meter",e)}function Ut(e){return new n("nav",e)}function Yt(e){return new n("noscript",e)}function Qt(e){return new n("object",e)}function Xt(e){return new n("ol",e)}function Zt(e){return new n("optgroup",e)}function _t(e){return new n("option",e)}function Ot(e){return new n("output",e)}function jt(e){return new n("p",e)}function en(e){return new n("picture",e)}function tn(e){return new n("pre",e)}function nn(e){return new n("progress",e)}function rn(e){return new n("q",e)}function on(e){return new n("rp",e)}function sn(e){return new n("rt",e)}function un(e){return new n("ruby",e)}function cn(e){return new n("s",e)}function an(e){return new n("samp",e)}function fn(e){return new n("script",e)}function ln(e){return new n("search",e)}function dn(e){return new n("section",e)}function hn(e){return new n("select",e)}function mn(e){return new n("slot",e)}function wn(e){return new n("small",e)}function pn(e){return new n("source",e)}function bn(e){return new n("span",e)}function gn(e){return new n("strong",e)}function yn(e){return new n("style",{style:e})}function En(e){return new n("sub",e)}function Sn(e){return new n("summary",e)}function Cn(e){return new n("sup",e)}function vn(e){return new n("table",e)}function Nn(e){return new n("tbody",e)}function kn(e){return new n("td",e)}function Tn(e){return new n("template",e)}function Ln(e){return new n("textarea",e)}function qn(e){return new n("tfoot",e)}function xn(e){return new n("th",e)}function An(e){return new n("thead",e)}function Mn(e){return new n("time",e)}function Dn(e){return new n("title",e)}function Fn(e){return new n("tr",e)}function Hn(e){return new n("track",e)}function Pn(e){return new n("u",e)}function Rn(e){return new n("ul",e)}function $n(e){return new n("var",e)}function Bn(e){return new n("video",e)}function Gn(e){return new n("wbr",e)}function Vn(e){return new n(document.createDocumentFragment(),e)}function Wn(e){return new n(document.createTextNode(""),e)}function zn(e){return new n("div",me(_({},e),{style:_({display:"contents"},e==null?void 0:e.style)}))}exports.ElementConstructor=n;exports.a=Pe;exports.abbr=Re;exports.address=$e;exports.area=Be;exports.article=Ge;exports.aside=Ve;exports.audio=We;exports.b=ze;exports.base=Ie;exports.bdi=Je;exports.bdo=Ke;exports.blockquote=Ue;exports.body=Ye;exports.br=Qe;exports.button=Xe;exports.canvas=Ze;exports.caption=_e;exports.cite=Oe;exports.code=je;exports.col=et;exports.colgroup=tt;exports.contents=zn;exports.data=nt;exports.datalist=rt;exports.dd=it;exports.del=ot;exports.details=st;exports.dfn=ut;exports.dialog=ct;exports.div=at;exports.dl=ft;exports.dt=lt;exports.element=He;exports.em=dt;exports.embed=ht;exports.empty=Wn;exports.fieldset=mt;exports.figcaption=wt;exports.figure=pt;exports.footer=bt;exports.form=gt;exports.fragment=Vn;exports.h1=yt;exports.h2=Et;exports.h3=St;exports.h4=Ct;exports.h5=vt;exports.h6=Nt;exports.head=kt;exports.header=Tt;exports.hgroup=Lt;exports.hr=qt;exports.html=xt;exports.htmlVar=$n;exports.i=At;exports.iframe=Mt;exports.img=Dt;exports.input=Ft;exports.ins=Ht;exports.kbd=Pt;exports.label=Rt;exports.legend=$t;exports.li=Bt;exports.link=Gt;exports.main=Vt;exports.map=Wt;exports.mark=zt;exports.menu=It;exports.meta=Jt;exports.meter=Kt;exports.nav=Ut;exports.noscript=Yt;exports.object=Qt;exports.ol=Xt;exports.optgroup=Zt;exports.option=_t;exports.output=Ot;exports.p=jt;exports.picture=en;exports.pre=tn;exports.progress=nn;exports.q=rn;exports.rp=on;exports.rt=sn;exports.ruby=un;exports.s=cn;exports.samp=an;exports.script=fn;exports.search=ln;exports.section=dn;exports.select=hn;exports.slot=mn;exports.small=wn;exports.source=pn;exports.span=bn;exports.strong=gn;exports.style=yn;exports.sub=En;exports.summary=Sn;exports.sup=Cn;exports.table=vn;exports.tbody=Nn;exports.td=kn;exports.template=Tn;exports.textarea=Ln;exports.tfoot=qn;exports.th=xn;exports.thead=An;exports.time=Mn;exports.title=Dn;exports.tr=Fn;exports.track=Hn;exports.u=Pn;exports.ul=Rn;exports.video=Bn;exports.wbr=Gn;
|
package/lib/theme/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("../Store-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("../Store-C-1ruEIm.cjs");const r=require("../browser-CpzFX2xg.cjs"),t=require("../tags-Dz_Yisj_.cjs"),a=require("../createTheme-B_W5dUY9.cjs"),e=a.createTheme({colorDark:"#1c1c1c",colorDarkAux:"#282828",colorLight:"#ffffff",colorActive:"#00E5B0",tweakerWidth:"500px",tweakerOffset:"20px",tweakerFolderHeight:"40px",heightInput:"30px",borderRadius:"12px",gapLarge:"16px",gapMedium:"12px",gapSmall:"8px",gapExtraSmall:"4px",fontSizeLarge:"20px",fontSizeMedium:"16px",fontSizeSmall:"14px",durationShort:"0.2s"},{prefix:"aptechka-"});r.isBrowser&&document.head.appendChild(t.style({":root":e.style}).node);exports.aptechkaTheme=e;
|
package/lib/theme/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import "../Store-
|
|
1
|
+
import "../Store-BQXXikps.js";
|
|
2
2
|
import { i as e } from "../browser-0zX67oeU.js";
|
|
3
|
-
import { aD as r } from "../tags-
|
|
3
|
+
import { aD as r } from "../tags-CAxO5Rs3.js";
|
|
4
4
|
import { c as o } from "../createTheme-D0IoYkYN.js";
|
|
5
5
|
const t = o(
|
|
6
6
|
{
|
package/lib/video/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("../custom-element/index.cjs");require("../window-resizer/index.cjs");require("../Store-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("../custom-element/index.cjs");require("../window-resizer/index.cjs");require("../Store-C-1ruEIm.cjs");const o=require("../source/index.cjs");var l=Object.defineProperty,a=Object.getOwnPropertyDescriptor,m=(s,t,n,r)=>{for(var e=r>1?void 0:r?a(t,n):t,i=s.length-1,u;i>=0;i--)(u=s[i])&&(e=(r?u(t,n,e):u(e))||e);return r&&e&&l(t,n,e),e};exports.VideoElement=class extends o.SourceElement{connectedCallback(){super.connectedCallback(),this.captureEvent.subscribe(()=>{this.hasAttribute("e-autoplay")&&this.consumerElement.play()}),this.releaseEvent.subscribe(()=>{this.hasAttribute("e-autoplay")&&(this.consumerElement.pause(),this.hasAttribute("replay")&&(this.consumerElement.currentTime=0))})}createConsumer(){return document.createElement("video")}consumeSource(t){this.consumerElement.src=t||""}};exports.VideoElement=m([c.define("e-video")],exports.VideoElement);
|
package/lib/video/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { define as u } from "../custom-element/index.js";
|
|
2
2
|
import "../window-resizer/index.js";
|
|
3
|
-
import "../Store-
|
|
3
|
+
import "../Store-BQXXikps.js";
|
|
4
4
|
import { SourceElement as l } from "../source/index.js";
|
|
5
5
|
var m = Object.defineProperty, a = Object.getOwnPropertyDescriptor, p = (t, r, i, s) => {
|
|
6
6
|
for (var e = s > 1 ? void 0 : s ? a(r, i) : r, n = t.length - 1, o; n >= 0; n--)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "aptechka",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.4",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+https://github.com/denisavitski/aptechka.git"
|
|
@@ -53,16 +53,31 @@
|
|
|
53
53
|
"default": "./lib/controls/index.js",
|
|
54
54
|
"types": "./lib/controls/index.d.ts"
|
|
55
55
|
},
|
|
56
|
+
"./css-property": {
|
|
57
|
+
"require": "./lib/css-property/index.cjs",
|
|
58
|
+
"default": "./lib/css-property/index.js",
|
|
59
|
+
"types": "./lib/css-property/index.d.ts"
|
|
60
|
+
},
|
|
56
61
|
"./css-unit-parser": {
|
|
57
62
|
"require": "./lib/css-unit-parser/index.cjs",
|
|
58
63
|
"default": "./lib/css-unit-parser/index.js",
|
|
59
64
|
"types": "./lib/css-unit-parser/index.d.ts"
|
|
60
65
|
},
|
|
66
|
+
"./css-value-parser": {
|
|
67
|
+
"require": "./lib/css-value-parser/index.cjs",
|
|
68
|
+
"default": "./lib/css-value-parser/index.js",
|
|
69
|
+
"types": "./lib/css-value-parser/index.d.ts"
|
|
70
|
+
},
|
|
61
71
|
"./custom-element": {
|
|
62
72
|
"require": "./lib/custom-element/index.cjs",
|
|
63
73
|
"default": "./lib/custom-element/index.js",
|
|
64
74
|
"types": "./lib/custom-element/index.d.ts"
|
|
65
75
|
},
|
|
76
|
+
"./dev": {
|
|
77
|
+
"require": "./lib/dev/index.cjs",
|
|
78
|
+
"default": "./lib/dev/index.js",
|
|
79
|
+
"types": "./lib/dev/index.d.ts"
|
|
80
|
+
},
|
|
66
81
|
"./device": {
|
|
67
82
|
"require": "./lib/device/index.cjs",
|
|
68
83
|
"default": "./lib/device/index.js",
|
|
@@ -232,12 +247,21 @@
|
|
|
232
247
|
"controls": [
|
|
233
248
|
"lib/controls/index.d.ts"
|
|
234
249
|
],
|
|
250
|
+
"css-property-parser": [
|
|
251
|
+
"lib/css-property-parser/index.d.ts"
|
|
252
|
+
],
|
|
235
253
|
"css-unit-parser": [
|
|
236
254
|
"lib/css-unit-parser/index.d.ts"
|
|
237
255
|
],
|
|
256
|
+
"css-value-parser": [
|
|
257
|
+
"lib/css-value-parser/index.d.ts"
|
|
258
|
+
],
|
|
238
259
|
"custom-element": [
|
|
239
260
|
"lib/custom-element/index.d.ts"
|
|
240
261
|
],
|
|
262
|
+
"dev": [
|
|
263
|
+
"lib/dev/index.d.ts"
|
|
264
|
+
],
|
|
241
265
|
"device": [
|
|
242
266
|
"lib/device/index.d.ts"
|
|
243
267
|
],
|
package/lib/Store-DdDuj5hz.js
DELETED
|
@@ -1,153 +0,0 @@
|
|
|
1
|
-
var p = (s, t, e) => {
|
|
2
|
-
if (!t.has(s))
|
|
3
|
-
throw TypeError("Cannot " + e);
|
|
4
|
-
};
|
|
5
|
-
var r = (s, t, e) => (p(s, t, "read from private field"), e ? e.call(s) : t.get(s)), a = (s, t, e) => {
|
|
6
|
-
if (t.has(s))
|
|
7
|
-
throw TypeError("Cannot add the same private member more than once");
|
|
8
|
-
t instanceof WeakSet ? t.add(s) : t.set(s, e);
|
|
9
|
-
}, i = (s, t, e, h) => (p(s, t, "write to private field"), h ? h.call(s, e) : t.set(s, e), e);
|
|
10
|
-
var k = (s, t, e) => (p(s, t, "access private method"), e);
|
|
11
|
-
import { i as j } from "./browser-0zX67oeU.js";
|
|
12
|
-
var l, S, o;
|
|
13
|
-
class z {
|
|
14
|
-
constructor() {
|
|
15
|
-
a(this, l, null);
|
|
16
|
-
a(this, S, "");
|
|
17
|
-
a(this, o, "");
|
|
18
|
-
j && (i(this, S, document.documentElement.getAttribute("data-project") || "unnamed"), i(this, o, r(this, S) ? r(this, S) + "-store-registry" : "store-registry"));
|
|
19
|
-
}
|
|
20
|
-
get projectName() {
|
|
21
|
-
return r(this, S);
|
|
22
|
-
}
|
|
23
|
-
get localStoreRegistryName() {
|
|
24
|
-
return r(this, o);
|
|
25
|
-
}
|
|
26
|
-
get loadedState() {
|
|
27
|
-
return r(this, l);
|
|
28
|
-
}
|
|
29
|
-
saveState() {
|
|
30
|
-
const t = this.getState(), e = JSON.stringify(t);
|
|
31
|
-
localStorage.setItem(r(this, o), e);
|
|
32
|
-
}
|
|
33
|
-
loadState(t = localStorage.getItem(
|
|
34
|
-
r(this, o)
|
|
35
|
-
)) {
|
|
36
|
-
t && (typeof t == "string" ? i(this, l, JSON.parse(t)) : i(this, l, t), d.current.forEach((e) => {
|
|
37
|
-
this.updateStore(e);
|
|
38
|
-
}));
|
|
39
|
-
}
|
|
40
|
-
resetState() {
|
|
41
|
-
d.current.forEach((t) => {
|
|
42
|
-
t.reset();
|
|
43
|
-
}), this.saveState();
|
|
44
|
-
}
|
|
45
|
-
updateStore(t) {
|
|
46
|
-
var h, v;
|
|
47
|
-
if (!Array.isArray((h = r(this, l)) == null ? void 0 : h.stores))
|
|
48
|
-
return t;
|
|
49
|
-
const e = t.passport;
|
|
50
|
-
if (e) {
|
|
51
|
-
const A = (v = r(this, l)) == null ? void 0 : v.stores.find(
|
|
52
|
-
(R) => R.name === e.name
|
|
53
|
-
);
|
|
54
|
-
A && (t.current = A.value);
|
|
55
|
-
}
|
|
56
|
-
return t;
|
|
57
|
-
}
|
|
58
|
-
getState() {
|
|
59
|
-
const t = {
|
|
60
|
-
stores: []
|
|
61
|
-
};
|
|
62
|
-
return d.current.forEach((e) => {
|
|
63
|
-
e.passport && (t.stores.find((h) => h.name === e.passport.name) || t.stores.push({
|
|
64
|
-
value: e.current,
|
|
65
|
-
name: e.passport.name
|
|
66
|
-
}));
|
|
67
|
-
}), t;
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
l = new WeakMap(), S = new WeakMap(), o = new WeakMap();
|
|
71
|
-
const M = new z();
|
|
72
|
-
var u, m, g, f, y, n, b, c, w, N, E;
|
|
73
|
-
class q {
|
|
74
|
-
constructor(t, e) {
|
|
75
|
-
a(this, N);
|
|
76
|
-
a(this, u, void 0);
|
|
77
|
-
a(this, m, void 0);
|
|
78
|
-
a(this, g, void 0);
|
|
79
|
-
a(this, f, void 0);
|
|
80
|
-
a(this, y, void 0);
|
|
81
|
-
a(this, n, /* @__PURE__ */ new Set());
|
|
82
|
-
a(this, b, void 0);
|
|
83
|
-
a(this, c, void 0);
|
|
84
|
-
a(this, w, void 0);
|
|
85
|
-
i(this, u, e == null ? void 0 : e.passport), i(this, m, t), i(this, g, void 0), i(this, f, t), i(this, y, (e == null ? void 0 : e.equalityCheck) || ((h, v) => h === v)), e != null && e.validate && this.addMiddleware(e.validate), i(this, w, (e == null ? void 0 : e.notifyAndClose) || !1), i(this, b, (e == null ? void 0 : e.skipSubscribeNotification) || !1), r(this, u) && M.updateStore(this);
|
|
86
|
-
}
|
|
87
|
-
get passport() {
|
|
88
|
-
return r(this, u);
|
|
89
|
-
}
|
|
90
|
-
get initial() {
|
|
91
|
-
return r(this, m);
|
|
92
|
-
}
|
|
93
|
-
get previous() {
|
|
94
|
-
return r(this, g);
|
|
95
|
-
}
|
|
96
|
-
get current() {
|
|
97
|
-
return r(this, f);
|
|
98
|
-
}
|
|
99
|
-
set current(t) {
|
|
100
|
-
if (!r(this, y).call(this, r(this, f), t)) {
|
|
101
|
-
if (i(this, g, r(this, f)), r(this, c))
|
|
102
|
-
for (const e of r(this, c))
|
|
103
|
-
t = e(t);
|
|
104
|
-
i(this, f, t), k(this, N, E).call(this), r(this, w) && this.close();
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
get subscribers() {
|
|
108
|
-
return r(this, n);
|
|
109
|
-
}
|
|
110
|
-
get entry() {
|
|
111
|
-
return {
|
|
112
|
-
current: r(this, f),
|
|
113
|
-
previous: r(this, g)
|
|
114
|
-
};
|
|
115
|
-
}
|
|
116
|
-
addMiddleware(t) {
|
|
117
|
-
r(this, c) || i(this, c, /* @__PURE__ */ new Set()), r(this, c).add(t);
|
|
118
|
-
}
|
|
119
|
-
removeMiddleware(t) {
|
|
120
|
-
var e, h;
|
|
121
|
-
(e = r(this, c)) == null || e.delete(t), (h = r(this, c)) != null && h.size || i(this, c, void 0);
|
|
122
|
-
}
|
|
123
|
-
subscribe(t) {
|
|
124
|
-
return r(this, u) && !r(this, n).size && I(this), r(this, n).add(t), r(this, b) || t(this.entry), () => {
|
|
125
|
-
this.unsubscribe(t);
|
|
126
|
-
};
|
|
127
|
-
}
|
|
128
|
-
unsubscribe(t) {
|
|
129
|
-
r(this, n).delete(t), r(this, u) && !r(this, n).size && C(this);
|
|
130
|
-
}
|
|
131
|
-
reset() {
|
|
132
|
-
this.current = this.initial;
|
|
133
|
-
}
|
|
134
|
-
close() {
|
|
135
|
-
r(this, n).clear(), r(this, u) && C(this);
|
|
136
|
-
}
|
|
137
|
-
}
|
|
138
|
-
u = new WeakMap(), m = new WeakMap(), g = new WeakMap(), f = new WeakMap(), y = new WeakMap(), n = new WeakMap(), b = new WeakMap(), c = new WeakMap(), w = new WeakMap(), N = new WeakSet(), E = function() {
|
|
139
|
-
for (const t of r(this, n))
|
|
140
|
-
t(this.entry);
|
|
141
|
-
};
|
|
142
|
-
const d = new q([]);
|
|
143
|
-
function I(s) {
|
|
144
|
-
d.current.includes(s) || (d.current = [...d.current, s]);
|
|
145
|
-
}
|
|
146
|
-
function C(s) {
|
|
147
|
-
d.current.includes(s) && (d.current = d.current.filter((t) => t !== s));
|
|
148
|
-
}
|
|
149
|
-
export {
|
|
150
|
-
q as S,
|
|
151
|
-
d as a,
|
|
152
|
-
M as s
|
|
153
|
-
};
|
package/lib/Store-Dis8QUAR.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var p=(s,t,e)=>{if(!t.has(s))throw TypeError("Cannot "+e)};var r=(s,t,e)=>(p(s,t,"read from private field"),e?e.call(s):t.get(s)),a=(s,t,e)=>{if(t.has(s))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(s):t.set(s,e)},i=(s,t,e,h)=>(p(s,t,"write to private field"),h?h.call(s,e):t.set(s,e),e);var R=(s,t,e)=>(p(s,t,"access private method"),e);const z=require("./browser-CpzFX2xg.cjs");var l,S,o;class M{constructor(){a(this,l,null);a(this,S,"");a(this,o,"");z.isBrowser&&(i(this,S,document.documentElement.getAttribute("data-project")||"unnamed"),i(this,o,r(this,S)?r(this,S)+"-store-registry":"store-registry"))}get projectName(){return r(this,S)}get localStoreRegistryName(){return r(this,o)}get loadedState(){return r(this,l)}saveState(){const t=this.getState(),e=JSON.stringify(t);localStorage.setItem(r(this,o),e)}loadState(t=localStorage.getItem(r(this,o))){t&&(typeof t=="string"?i(this,l,JSON.parse(t)):i(this,l,t),u.current.forEach(e=>{this.updateStore(e)}))}resetState(){u.current.forEach(t=>{t.reset()}),this.saveState()}updateStore(t){var h,v;if(!Array.isArray((h=r(this,l))==null?void 0:h.stores))return t;const e=t.passport;if(e){const A=(v=r(this,l))==null?void 0:v.stores.find(q=>q.name===e.name);A&&(t.current=A.value)}return t}getState(){const t={stores:[]};return u.current.forEach(e=>{e.passport&&(t.stores.find(h=>h.name===e.passport.name)||t.stores.push({value:e.current,name:e.passport.name}))}),t}}l=new WeakMap,S=new WeakMap,o=new WeakMap;const C=new M;var f,m,g,d,y,n,b,c,w,N,j;class E{constructor(t,e){a(this,N);a(this,f,void 0);a(this,m,void 0);a(this,g,void 0);a(this,d,void 0);a(this,y,void 0);a(this,n,new Set);a(this,b,void 0);a(this,c,void 0);a(this,w,void 0);i(this,f,e==null?void 0:e.passport),i(this,m,t),i(this,g,void 0),i(this,d,t),i(this,y,(e==null?void 0:e.equalityCheck)||((h,v)=>h===v)),e!=null&&e.validate&&this.addMiddleware(e.validate),i(this,w,(e==null?void 0:e.notifyAndClose)||!1),i(this,b,(e==null?void 0:e.skipSubscribeNotification)||!1),r(this,f)&&C.updateStore(this)}get passport(){return r(this,f)}get initial(){return r(this,m)}get previous(){return r(this,g)}get current(){return r(this,d)}set current(t){if(!r(this,y).call(this,r(this,d),t)){if(i(this,g,r(this,d)),r(this,c))for(const e of r(this,c))t=e(t);i(this,d,t),R(this,N,j).call(this),r(this,w)&&this.close()}}get subscribers(){return r(this,n)}get entry(){return{current:r(this,d),previous:r(this,g)}}addMiddleware(t){r(this,c)||i(this,c,new Set),r(this,c).add(t)}removeMiddleware(t){var e,h;(e=r(this,c))==null||e.delete(t),(h=r(this,c))!=null&&h.size||i(this,c,void 0)}subscribe(t){return r(this,f)&&!r(this,n).size&&I(this),r(this,n).add(t),r(this,b)||t(this.entry),()=>{this.unsubscribe(t)}}unsubscribe(t){r(this,n).delete(t),r(this,f)&&!r(this,n).size&&k(this)}reset(){this.current=this.initial}close(){r(this,n).clear(),r(this,f)&&k(this)}}f=new WeakMap,m=new WeakMap,g=new WeakMap,d=new WeakMap,y=new WeakMap,n=new WeakMap,b=new WeakMap,c=new WeakMap,w=new WeakMap,N=new WeakSet,j=function(){for(const t of r(this,n))t(this.entry)};const u=new E([]);function I(s){u.current.includes(s)||(u.current=[...u.current,s])}function k(s){u.current.includes(s)&&(u.current=u.current.filter(t=>t!==s))}exports.Store=E;exports.activeStores=u;exports.storeRegistry=C;
|