aptechka 0.13.1 → 0.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/attribute/index.js +12 -12
- package/lib/canvas/index.cjs +7 -1
- package/lib/canvas/index.js +54 -58
- package/lib/controls/index.js +1 -1
- package/lib/{createStylesheet-COAZH1Mw.js → createStylesheet-C68ja-RS.js} +3 -3
- package/lib/css-property/index.js +4 -4
- package/lib/{dom-P5QbAASX.js → dom-0S_WDL4g.js} +2 -2
- package/lib/element-constructor/index.cjs +1 -1
- package/lib/element-constructor/index.js +133 -122
- package/lib/element-resizer/index.js +8 -8
- package/lib/en3/helpers/index.js +2 -2
- package/lib/en3/index.js +1 -1
- package/lib/en3/loaders/index.js +1 -1
- package/lib/en3/utils/index.js +2 -2
- package/lib/{en3-x-Ki30MY.js → en3-sK9Z-fp2.js} +1 -1
- package/lib/file-BEr-o55N.js +31 -0
- package/lib/file-C9BbxzVU.cjs +1 -0
- package/lib/intersector/index.js +7 -7
- package/lib/layout-box/index.js +14 -14
- package/lib/need_redo_tweaker/index.cjs +18 -0
- package/lib/need_redo_tweaker/index.js +1343 -0
- package/lib/pointer/index.js +1 -1
- package/lib/popover/index.cjs +1 -1
- package/lib/popover/index.js +60 -62
- package/lib/scroll/index.cjs +1 -1
- package/lib/scroll/index.js +104 -105
- package/lib/scroll-entries/index.js +15 -15
- package/lib/slicer/index.cjs +5 -5
- package/lib/slicer/index.js +55 -86
- package/lib/{tags-BL3kQp9o.js → tags-zft1DGBz.js} +92 -92
- package/lib/ticker/index.js +1 -1
- package/lib/{traverseMaterials-mGC2_FkG.js → traverseMaterials-BlZbRhgW.js} +1 -1
- package/lib/utils/index.cjs +1 -1
- package/lib/utils/index.js +56 -57
- package/package.json +7 -47
- package/lib/accordion/index.cjs +0 -1
- package/lib/accordion/index.js +0 -167
- package/lib/checkbox/index.cjs +0 -1
- package/lib/checkbox/index.js +0 -112
- package/lib/createTheme-CHnsCgAr.js +0 -15
- package/lib/createTheme-Cfaw9UmV.cjs +0 -1
- package/lib/events-BGwqaxVW.cjs +0 -1
- package/lib/events-CJTUMSLU.js +0 -20
- package/lib/file-EevnUtRj.cjs +0 -1
- package/lib/file-lxi_oXJf.js +0 -13
- package/lib/index-BuAuBz2_.cjs +0 -9
- package/lib/index-CenF0JbH.js +0 -261
- package/lib/modal/index.cjs +0 -1
- package/lib/modal/index.js +0 -133
- package/lib/select/index.cjs +0 -1
- package/lib/select/index.js +0 -7
- package/lib/theme/index.cjs +0 -1
- package/lib/theme/index.js +0 -25
- package/lib/tweaker/index.cjs +0 -10
- package/lib/tweaker/index.js +0 -989
package/lib/en3/index.js
CHANGED
package/lib/en3/loaders/index.js
CHANGED
|
@@ -20,7 +20,7 @@ var le = (d, t, e) => new Promise((r, n) => {
|
|
|
20
20
|
a((e = e.apply(d, t)).next());
|
|
21
21
|
});
|
|
22
22
|
import { TrianglesDrawMode as Fe, TriangleFanDrawMode as re, TriangleStripDrawMode as Le, Loader as Pe, LoaderUtils as X, FileLoader as _e, Color as G, LinearSRGBColorSpace as I, SpotLight as ke, PointLight as He, DirectionalLight as Ge, MeshBasicMaterial as V, SRGBColorSpace as z, MeshPhysicalMaterial as y, Vector2 as Se, Matrix4 as Y, Vector3 as B, Quaternion as Me, InstancedMesh as Be, InstancedBufferAttribute as Ue, Object3D as ye, TextureLoader as we, ImageBitmapLoader as ve, BufferAttribute as J, InterleavedBuffer as je, InterleavedBufferAttribute as Ke, LinearFilter as be, LinearMipmapLinearFilter as Ne, RepeatWrapping as ie, PointsMaterial as Ve, Material as $, LineBasicMaterial as Xe, MeshStandardMaterial as Ie, DoubleSide as ze, PropertyBinding as qe, BufferGeometry as We, SkinnedMesh as Ye, Mesh as Qe, LineSegments as Ze, Line as Je, LineLoop as $e, Points as et, Group as ee, PerspectiveCamera as tt, MathUtils as nt, OrthographicCamera as st, Skeleton as rt, AnimationClip as it, Bone as ot, InterpolateLinear as Oe, ColorManagement as de, NearestFilter as at, NearestMipmapNearestFilter as ct, LinearMipmapNearestFilter as ut, NearestMipmapLinearFilter as lt, ClampToEdgeWrapping as dt, MirroredRepeatWrapping as ft, InterpolateDiscrete as ht, FrontSide as pt, Texture as fe, VectorKeyframeTrack as he, NumberKeyframeTrack as pe, QuaternionKeyframeTrack as me, Box3 as mt, Sphere as At, Interpolant as gt } from "three";
|
|
23
|
-
import { e as N, a as b, d as Ae } from "../../en3-
|
|
23
|
+
import { e as N, a as b, d as Ae } from "../../en3-sK9Z-fp2.js";
|
|
24
24
|
function ge(d, t) {
|
|
25
25
|
if (t === Fe)
|
|
26
26
|
return console.warn("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Geometry already defined as triangles."), d;
|
package/lib/en3/utils/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { d as w } from "../../en3-
|
|
2
|
-
import { g as T, t as C } from "../../traverseMaterials-
|
|
1
|
+
import { d as w } from "../../en3-sK9Z-fp2.js";
|
|
2
|
+
import { g as T, t as C } from "../../traverseMaterials-BlZbRhgW.js";
|
|
3
3
|
import { Mesh as g } from "three";
|
|
4
4
|
function y(t, e, s) {
|
|
5
5
|
const o = e.x, r = e.y, i = s || t.image.width / t.image.height;
|
|
@@ -18,7 +18,7 @@ var e = (h, t, i) => (J(h, t, "read from private field"), i ? i.call(h) : t.get(
|
|
|
18
18
|
import { RESIZE_ORDER as ue, TICK_ORDER as me } from "./order/index.js";
|
|
19
19
|
import { windowResizer as Q } from "./window-resizer/index.js";
|
|
20
20
|
import { ticker as ee } from "./ticker/index.js";
|
|
21
|
-
import {
|
|
21
|
+
import { g as ae } from "./dom-0S_WDL4g.js";
|
|
22
22
|
import { Mesh as fe, OrthographicCamera as te, PerspectiveCamera as ie, Scene as ge, Vector2 as Ee, Raycaster as be, REVISION as xe, WebGLRenderer as ye } from "three";
|
|
23
23
|
import { LayoutBox as se } from "./layout-box/index.js";
|
|
24
24
|
function we(h) {
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
function c(n) {
|
|
2
|
+
n.dispatchEvent(
|
|
3
|
+
new CustomEvent("sizeChange", {
|
|
4
|
+
bubbles: !0,
|
|
5
|
+
composed: !0
|
|
6
|
+
})
|
|
7
|
+
);
|
|
8
|
+
}
|
|
9
|
+
function s(n) {
|
|
10
|
+
n.dispatchEvent(
|
|
11
|
+
new CustomEvent("beforeSizeChange", {
|
|
12
|
+
bubbles: !0,
|
|
13
|
+
composed: !0
|
|
14
|
+
})
|
|
15
|
+
);
|
|
16
|
+
}
|
|
17
|
+
function i(n, t) {
|
|
18
|
+
const o = new Blob([JSON.stringify(t)], { type: "application/json" }), e = document.createElement("a");
|
|
19
|
+
e.download = n + ".json", e.href = window.URL.createObjectURL(o), e.dataset.downloadurl = ["application/json", e.download, e.href].join(":");
|
|
20
|
+
const a = new MouseEvent("click", {
|
|
21
|
+
view: window,
|
|
22
|
+
bubbles: !0,
|
|
23
|
+
cancelable: !0
|
|
24
|
+
});
|
|
25
|
+
e.dispatchEvent(a), e.remove();
|
|
26
|
+
}
|
|
27
|
+
export {
|
|
28
|
+
s as a,
|
|
29
|
+
i as c,
|
|
30
|
+
c as d
|
|
31
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";function i(n){n.dispatchEvent(new CustomEvent("sizeChange",{bubbles:!0,composed:!0}))}function c(n){n.dispatchEvent(new CustomEvent("beforeSizeChange",{bubbles:!0,composed:!0}))}function s(n,t){const o=new Blob([JSON.stringify(t)],{type:"application/json"}),e=document.createElement("a");e.download=n+".json",e.href=window.URL.createObjectURL(o),e.dataset.downloadurl=["application/json",e.download,e.href].join(":");const a=new MouseEvent("click",{view:window,bubbles:!0,cancelable:!0});e.dispatchEvent(a),e.remove()}exports.createJSONAndSave=s;exports.dispatchBeforeSizeChangeEvent=c;exports.dispatchSizeChangeEvent=i;
|
package/lib/intersector/index.js
CHANGED
|
@@ -3,10 +3,10 @@ var m = (n) => {
|
|
|
3
3
|
};
|
|
4
4
|
var y = (n, t, s) => t.has(n) || m("Cannot " + s);
|
|
5
5
|
var r = (n, t, s) => (y(n, t, "read from private field"), s ? s.call(n) : t.get(n)), f = (n, t, s) => t.has(n) ? m("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(n) : t.set(n, s), l = (n, t, s, e) => (y(n, t, "write to private field"), e ? e.call(n, s) : t.set(n, s), s);
|
|
6
|
-
import { i as
|
|
7
|
-
import {
|
|
6
|
+
import { i as g } from "../browser-0zX67oeU.js";
|
|
7
|
+
import { g as p } from "../dom-0S_WDL4g.js";
|
|
8
8
|
var i, b, u;
|
|
9
|
-
class
|
|
9
|
+
class w {
|
|
10
10
|
constructor() {
|
|
11
11
|
f(this, i, []);
|
|
12
12
|
f(this, b, null);
|
|
@@ -18,12 +18,12 @@ class g {
|
|
|
18
18
|
e.entry && (e.subscriber.entry = e.entry, e.subscriber.callback(e.entry));
|
|
19
19
|
});
|
|
20
20
|
});
|
|
21
|
-
|
|
21
|
+
g && window.IntersectionObserver && l(this, b, new IntersectionObserver(
|
|
22
22
|
r(this, u)
|
|
23
23
|
));
|
|
24
24
|
}
|
|
25
25
|
subscribe(t, s) {
|
|
26
|
-
const e =
|
|
26
|
+
const e = p(t);
|
|
27
27
|
if (!e)
|
|
28
28
|
return () => {
|
|
29
29
|
};
|
|
@@ -56,8 +56,8 @@ class g {
|
|
|
56
56
|
}
|
|
57
57
|
}
|
|
58
58
|
i = new WeakMap(), b = new WeakMap(), u = new WeakMap();
|
|
59
|
-
const E = new
|
|
59
|
+
const E = new w();
|
|
60
60
|
export {
|
|
61
|
-
|
|
61
|
+
w as Intersector,
|
|
62
62
|
E as intersector
|
|
63
63
|
};
|
package/lib/layout-box/index.js
CHANGED
|
@@ -9,7 +9,7 @@ import { RESIZE_ORDER as St, TICK_ORDER as dt } from "../order/index.js";
|
|
|
9
9
|
import { scrollEntries as $ } from "../scroll-entries/index.js";
|
|
10
10
|
import { ticker as j } from "../ticker/index.js";
|
|
11
11
|
import { i as tt } from "../browser-0zX67oeU.js";
|
|
12
|
-
import {
|
|
12
|
+
import { g as et } from "../dom-0S_WDL4g.js";
|
|
13
13
|
import { g as F, a as G } from "../layout-HoBT_Da2.js";
|
|
14
14
|
import { elementResizer as st } from "../element-resizer/index.js";
|
|
15
15
|
import { windowResizer as it } from "../window-resizer/index.js";
|
|
@@ -37,7 +37,7 @@ function pt(i) {
|
|
|
37
37
|
translationZ: O
|
|
38
38
|
};
|
|
39
39
|
}
|
|
40
|
-
var a, z, b, _, W, X, v, w, q, B, x, M, Y, S, d, C, H, I, D, p,
|
|
40
|
+
var a, z, b, _, W, X, v, w, q, B, x, M, Y, S, d, C, H, I, D, p, g, m, c, n, o, E, R, T, f, J, ht, rt, nt, P, U, Z;
|
|
41
41
|
class Ct {
|
|
42
42
|
constructor(e, s) {
|
|
43
43
|
h(this, f);
|
|
@@ -61,8 +61,8 @@ class Ct {
|
|
|
61
61
|
h(this, I, 0);
|
|
62
62
|
h(this, D, 0);
|
|
63
63
|
h(this, p, { x: 0, y: 0, z: 0 });
|
|
64
|
-
h(this,
|
|
65
|
-
h(this,
|
|
64
|
+
h(this, g, { x: 0, y: 0, z: 0 });
|
|
65
|
+
h(this, m, { x: 1, y: 1, z: 1 });
|
|
66
66
|
h(this, c, new N({ x: 0, y: 0, z: 0 }));
|
|
67
67
|
h(this, n, new N({ x: 0, y: 0, z: 0 }));
|
|
68
68
|
h(this, o, new N({ x: 0, y: 0, z: 0 }));
|
|
@@ -139,10 +139,10 @@ class Ct {
|
|
|
139
139
|
return t(this, p);
|
|
140
140
|
}
|
|
141
141
|
get CSSRotation() {
|
|
142
|
-
return t(this,
|
|
142
|
+
return t(this, g);
|
|
143
143
|
}
|
|
144
144
|
get CSSScale() {
|
|
145
|
-
return t(this,
|
|
145
|
+
return t(this, m);
|
|
146
146
|
}
|
|
147
147
|
get front() {
|
|
148
148
|
return t(this, C);
|
|
@@ -243,7 +243,7 @@ class Ct {
|
|
|
243
243
|
return t(this, T).unsubscribe(...e);
|
|
244
244
|
}
|
|
245
245
|
}
|
|
246
|
-
a = new WeakMap(), z = new WeakMap(), b = new WeakMap(), _ = new WeakMap(), W = new WeakMap(), X = new WeakMap(), v = new WeakMap(), w = new WeakMap(), q = new WeakMap(), B = new WeakMap(), x = new WeakMap(), M = new WeakMap(), Y = new WeakMap(), S = new WeakMap(), d = new WeakMap(), C = new WeakMap(), H = new WeakMap(), I = new WeakMap(), D = new WeakMap(), p = new WeakMap(),
|
|
246
|
+
a = new WeakMap(), z = new WeakMap(), b = new WeakMap(), _ = new WeakMap(), W = new WeakMap(), X = new WeakMap(), v = new WeakMap(), w = new WeakMap(), q = new WeakMap(), B = new WeakMap(), x = new WeakMap(), M = new WeakMap(), Y = new WeakMap(), S = new WeakMap(), d = new WeakMap(), C = new WeakMap(), H = new WeakMap(), I = new WeakMap(), D = new WeakMap(), p = new WeakMap(), g = new WeakMap(), m = new WeakMap(), c = new WeakMap(), n = new WeakMap(), o = new WeakMap(), E = new WeakMap(), R = new WeakMap(), T = new WeakMap(), f = new WeakSet(), J = function() {
|
|
247
247
|
t(this, o).calculate(), t(this, n).calculate(), t(this, c).calculate();
|
|
248
248
|
}, ht = function() {
|
|
249
249
|
t(this, o).setStep("_size", "+", {
|
|
@@ -257,17 +257,17 @@ a = new WeakMap(), z = new WeakMap(), b = new WeakMap(), _ = new WeakMap(), W =
|
|
|
257
257
|
y: s,
|
|
258
258
|
z: l
|
|
259
259
|
}), t(this, q) ? (t(this, o).setStep("_scale", "*", {
|
|
260
|
-
x: t(this,
|
|
261
|
-
y: t(this,
|
|
262
|
-
z: t(this,
|
|
260
|
+
x: t(this, m).x,
|
|
261
|
+
y: t(this, m).y,
|
|
262
|
+
z: t(this, m).z
|
|
263
263
|
}), t(this, n).setStep("_translation", "+", {
|
|
264
264
|
x: t(this, p).x,
|
|
265
265
|
y: t(this, p).y,
|
|
266
266
|
z: t(this, p).z
|
|
267
267
|
}), t(this, c).setStep("_rotation", "+", {
|
|
268
|
-
x: t(this,
|
|
269
|
-
y: t(this,
|
|
270
|
-
z: t(this,
|
|
268
|
+
x: t(this, g).x,
|
|
269
|
+
y: t(this, g).y,
|
|
270
|
+
z: t(this, g).z
|
|
271
271
|
})) : (t(this, o).setStep("_scale", "*", {
|
|
272
272
|
x: 1,
|
|
273
273
|
y: 1,
|
|
@@ -299,7 +299,7 @@ a = new WeakMap(), z = new WeakMap(), b = new WeakMap(), _ = new WeakMap(), W =
|
|
|
299
299
|
r(this, H, t(this, d)), r(this, I, t(this, S));
|
|
300
300
|
r(this, D, t(this, C) * -1);
|
|
301
301
|
const k = new WebKitCSSMatrix(e.transform), u = pt(k);
|
|
302
|
-
t(this, p).x = u.translationX, t(this, p).y = u.translationY, t(this, p).z = u.translationZ, t(this,
|
|
302
|
+
t(this, p).x = u.translationX, t(this, p).y = u.translationY, t(this, p).z = u.translationZ, t(this, m).x = u.scaleX, t(this, m).y = u.scaleY, t(this, m).z = u.scaleZ, t(this, g).x = u.rotationX, t(this, g).y = u.rotationY, t(this, g).z = u.rotationZ, L(this, f, ht).call(this), L(this, f, J).call(this), t(this, T).notify();
|
|
303
303
|
}, nt = function() {
|
|
304
304
|
t(this, E).x = 0, t(this, E).y = 0, t(this, E).z = 0;
|
|
305
305
|
for (let e = 0; e < t(this, b).length; e++) {
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";var je=l=>{throw TypeError(l)};var Ie=(l,o,t)=>o.has(l)||je("Cannot "+t);var e=(l,o,t)=>(Ie(l,o,"read from private field"),t?t.call(l):o.get(l)),n=(l,o,t)=>o.has(l)?je("Cannot add the same private member more than once"):o instanceof WeakSet?o.add(l):o.set(l,t),a=(l,o,t,s)=>(Ie(l,o,"write to private field"),s?s.call(l,t):o.set(l,t),t),u=(l,o,t)=>(Ie(l,o,"access private method"),t);const Se=require("../browser-CpzFX2xg.cjs"),m=require("../Store-npaZHvX4.cjs"),Ee=require("../file-C9BbxzVU.cjs"),ut=require("../function-MthRj-GJ.cjs"),Je=require("../gestures-DHLrn6Q8.cjs");require("../ticker/index.cjs");const i=require("../tags-6_ETuR75.cjs"),v=require("../createStylesheet-Csfmh-MH.cjs"),pt=require("../Viewport-Cv4TRGiv.cjs"),gt=require("../element-constructor/index.cjs"),mt=require("../math-GDWEqu7y.cjs"),Ae=require("../polyfills-CM4SCDTt.cjs"),We=require("../element-resizer/index.cjs"),ft=require("../style-At6aDoqG.cjs"),h=gt.createTheme({colorMain:"#1c1c1c",colorMainAux:"#282828",colorFont:"#ffffff",colorActive:"#00E5B0",borderRadius:"12px",borderRadiusSmall:"4px"},{prefix:"aptechka-"});if(Se.isBrowser){const l=i.style({":root":h.style}).node;l.setAttribute("data-permanent",""),document.head.appendChild(l)}const Ye='<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>',Xe='<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>',vt='<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24"><path fill-rule="evenodd" d="M2 12c0-4.714 0-7.071 1.464-8.536C4.93 2 7.286 2 12 2c4.714 0 7.071 0 8.535 1.464C22 4.93 22 7.286 22 12c0 4.714 0 7.071-1.465 8.535C19.072 22 16.714 22 12 22s-7.071 0-8.536-1.465C2 19.072 2 16.714 2 12Zm10-5.75a.75.75 0 0 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>',wt='<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>',Ue=`<svg
|
|
2
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
3
|
+
width="32"
|
|
4
|
+
height="32"
|
|
5
|
+
viewBox="0 0 24 24"
|
|
6
|
+
>
|
|
7
|
+
<path d="m12.37 15.835l6.43-6.63C19.201 8.79 18.958 8 18.43 8H5.57c-.528 0-.771.79-.37 1.205l6.43 6.63c.213.22.527.22.74 0Z" />
|
|
8
|
+
</svg>
|
|
9
|
+
`;var A,b,C;class bt{constructor(){n(this,A);n(this,b);n(this,C);this.scrollValue=0,a(this,A,""),a(this,b,[]),a(this,C,{}),a(this,A,m.storeRegistry.name+"-tweaker")}openPanel(o){e(this,b).includes(o)||e(this,b).push(o)}closePanel(o){a(this,b,e(this,b).filter(t=>t!==o))}isPanelOpened(o){return e(this,b).includes(o)}changedSizes(o){return e(this,C)[o]}changeSize(o,t){t?e(this,C)[o]=t:delete e(this,C)[o]}save(){const o={openedPanels:e(this,b),changedSizes:e(this,C),scrollValue:this.scrollValue};localStorage.setItem(e(this,A),JSON.stringify(o)),m.storeRegistry.saveState()}load(){m.storeRegistry.loadState();const o=localStorage.getItem(e(this,A));if(o)try{const t=JSON.parse(o);t.openedPanels&&a(this,b,t.openedPanels),t.changedSizes&&a(this,C,t.changedSizes),t.scrollValue&&(this.scrollValue=t.scrollValue)}catch(t){console.error(t)}}}A=new WeakMap,b=new WeakMap,C=new WeakMap;const w=new bt,yt='<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 256 256"><path d="m243.33 90.91l-128.41 128.4a16 16 0 0 1-22.63 0l-71.62-72a16 16 0 0 1 0-22.61l24-24a16 16 0 0 1 22.57-.06l36.64 35.27l.11.11l92.73-91.37a16 16 0 0 1 22.58 0l24 23.56a16 16 0 0 1 .03 22.7Z"/></svg>',St=v.createStylesheet({":host":{position:"relative",display:"inline-block",width:"30px",height:"30px",borderRadius:h.borderRadiusSmall.var,overflow:"hidden"},"label, .fake":{display:"block"},"label, .fake, .default":{width:"100%",height:"100%"},".real":{position:"absolute",top:"0",left:"0",width:"0px",height:"0px",visibility:"hidden",margin:"0"},".default":{display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:h.colorMainAux.var},".default svg":{width:"60%",height:"60%",fill:h.colorFont.var,opacity:0,transition:"var(--duration-short)"},":host(.checked) .default svg":{opacity:1}});var L,D,P,ee;const Oe=class Oe extends HTMLElement{constructor(){super();n(this,P);n(this,L,null);n(this,D);this.attachShadow({mode:"open"}).adoptedStyleSheets.push(St),a(this,D,this.attachInternals()),i.element(this,{children:i.label({children:[i.span({class:"fake",children:i.slot({children:[i.span({class:"default",children:[yt]})]})}),i.input({ref:s=>{a(this,L,s),s.required=this.hasAttribute("required"),s.value=this.getAttribute("value")||"",s.checked=this.hasAttribute("checked"),s.name=this.getAttribute("name")||"",u(this,P,ee).call(this)},class:"real",type:"checkbox",onChange:()=>{u(this,P,ee).call(this),this.dispatchEvent(new Event("change",{composed:!0}))}})]})})}get checked(){return e(this,L).checked}set checked(t){e(this,L).checked=t,u(this,P,ee).call(this)}get value(){return e(this,L).value}set value(t){e(this,L).value=t,u(this,P,ee).call(this)}};L=new WeakMap,D=new WeakMap,P=new WeakSet,ee=function(){this.checked?e(this,D).setFormValue(this.value):e(this,D).setFormValue(null),this.classList.toggle("checked",this.checked)},Oe.formAssociated=!0;let Pe=Oe;customElements.get("e-checkbox")||customElements.define("e-checkbox",Pe);var M;class G extends HTMLElement{constructor(...t){super();n(this,M);a(this,M,t)}addStore(t){e(this,M).push(t)}get firstStore(){return e(this,M)[0]}get stores(){return e(this,M)}updateStores(t){e(this,M).forEach(s=>{s.current=t})}}M=new WeakMap;const kt=v.createStylesheet({":host":{width:"100%",display:"inline-flex",height:"max-content"},"e-checkbox":{"--size":"calc(var(--height-input) * 0.8)",width:"var(--size)",height:"var(--size)",borderRadius:h.borderRadiusSmall.var}});class _e extends G{constructor(...o){super(...o),this.attachShadow({mode:"open"}).adoptedStyleSheets.push(kt),i.element(this,{children:[i.element("e-checkbox",{onChange:s=>{this.updateStores(s.currentTarget.checked)},ref:s=>{this.firstStore.subscribe(r=>{s.checked=r.current})}})]})}}customElements.get("e-tweaker-boolean-manager")||customElements.define("e-tweaker-boolean-manager",_e);const xt=v.createStylesheet({":host":{width:"100%",display:"inline-flex",height:"max-content"},input:{width:"100%",height:"var(--height-input)",padding:"0",background:"none",borderRadius:h.borderRadius.var,border:"none",blockSize:"unset"},"input::-webkit-color-swatch, input::-webkit-color-swatch-wrapper":{boxSizing:"border-box",padding:"0px",border:"none",borderRadius:h.borderRadius.var,height:"calc(var(--height-input) * 0.93)"}});class Ge extends G{constructor(...o){super(...o),this.attachShadow({mode:"open"}).adoptedStyleSheets.push(xt),i.element(this,{children:[i.input({type:"color",value:this.firstStore,onInput:s=>{this.updateStores(s.currentTarget.value)}})]})}}customElements.get("e-tweaker-color-manager")||customElements.define("e-tweaker-color-manager",Ge);const Et=v.createStylesheet({a:{color:"inherit",fontSize:"var(--font-size-small)"}});class Qe extends G{constructor(...o){var s,r;super(...o),this.attachShadow({mode:"open"}).adoptedStyleSheets.push(Et),i.element(this,{children:[i.a({href:this.firstStore,target:(r=(s=this.firstStore.passport)==null?void 0:s.manager)!=null&&r.sameWindow?"_self":"_blank",children:this.firstStore})]})}}customElements.get("e-tweaker-link-manager")||customElements.define("e-tweaker-link-manager",Qe);const Ct=v.createStylesheet({":host":{width:"100%",display:"flex",alignItems:"center",gap:"var(--gap-small)"},".inputs-wrapper":{display:"grid",gap:"var(--gap-small)",width:"100%"},input:{boxSizing:"border-box",outline:"none",fontVariantNumeric:"tabular-nums",fontFamily:"inherit",color:"inherit",border:"none",fontSize:"var(--font-size-small)",width:"100%",height:"var(--height-input)",margin:"0",padding:"0 var(--gap-small)",backgroundColor:"rgba(255, 255, 255, 0.1)",borderRadius:h.borderRadius.var},".drag":{position:"relative",width:"100%",height:"calc(var(--height-input) * 0.2)",display:"flex",alignItems:"center"},".drag::before":{content:'""',position:"absolute",left:"0",width:"100%",zIndex:"-1",height:"1px",borderBottom:`1px solid ${h.colorFont.var}`,transform:"translateY(-50%)",opacity:"0.3"},":host(.infinite) .drag::before":{borderBottom:`1px dashed ${h.colorFont.var}`},".drag-knob":{"--size":"calc(var(--height-input) * 0.4)",width:"var(--size)",height:"var(--size)"},".drag-knob-inner":{width:"100%",height:"100%",backgroundColor:h.colorFont.var,borderRadius:h.borderRadiusSmall.var,transition:"opacity var(--duration-short)"},":host(.infinite) .grabbing .drag-knob-inner":{opacity:.3}});var $,N,O,z,F,te,se,E,V,ie,ne,p,H,$e,Ve,xe,re;class et extends G{constructor(...t){var r,c,d,g,x,I,Q,Ze;super(...t);n(this,p);n(this,$,[]);n(this,N,[]);n(this,O);n(this,z);n(this,F);n(this,te);n(this,se);n(this,E);n(this,V,!1);n(this,ie,t=>{const s=u(this,p,H).call(this,t);return s.map((r,c)=>{const d=typeof r=="string"?parseFloat(r)||e(this,z):r,g=mt.clamp(d,e(this,z),e(this,F)),x=Ae.toStep(g,e(this,O));s[c]=x}),e(this,se)==="number"?s[0]:s});n(this,ne,()=>{u(this,p,H).call(this).map((t,s)=>{const r=e(this,$)[s];r&&(r.value=(t||0).toString())}),u(this,p,$e).call(this)});n(this,re,()=>{u(this,p,$e).call(this)});this.attachShadow({mode:"open"}).adoptedStyleSheets.push(Ct),a(this,z,Ae.nullishCoalescing((c=(r=this.firstStore.passport)==null?void 0:r.manager)==null?void 0:c.min,-1/0)),a(this,F,Ae.nullishCoalescing((g=(d=this.firstStore.passport)==null?void 0:d.manager)==null?void 0:g.max,1/0)),a(this,O,((I=(x=this.firstStore.passport)==null?void 0:x.manager)==null?void 0:I.step)||.01),a(this,te,((Ze=(Q=this.firstStore.passport)==null?void 0:Q.manager)==null?void 0:Ze.ease)||1),a(this,se,Array.isArray(this.firstStore.current)?"array":"number"),a(this,E,isFinite(e(this,F))&&isFinite(e(this,z))),i.element(this,{class:e(this,E)?"":"infinite",children:u(this,p,H).call(this).map((rt,ke)=>i.div({class:"inputs-wrapper",children:[i.input({type:"number",step:e(this,O),min:e(this,z),max:e(this,F),ref:T=>e(this,$).push(T),value:rt,onChange:()=>{this.updateStores(e(this,$).map(T=>parseFloat(T.value)))}}),i.div({class:"drag",children:[i.div({class:"drag-knob",ref:T=>e(this,N).push(T),onPointerdown:T=>{T.preventDefault(),a(this,V,!0);const Le=u(this,p,H).call(this),ot=Le[ke],R=e(this,N)[ke],at=e(this,$)[ke];if(R&&at){const Me=R.parentElement,lt=u(this,p,Ve).call(this);Me.classList.add("grabbing"),Je.setupDrag(Fe=>{const Ke=Fe.x-T.x,ht=e(this,E)?Me.offsetWidth/(lt||1):1,ct=ot+Ke/ht*e(this,te);if(Le[ke]=ct,!e(this,E)){const dt=u(this,p,xe).call(this,R,0);R.style.transform=`translateX(${dt+Ke}px)`}this.updateStores([...Le])},()=>{if(a(this,V,!1),!e(this,E)){const Fe=u(this,p,xe).call(this,R,0);R.style.transition="transform 0.1s",R.style.transform=`translateX(${Fe}px)`,Me.classList.remove("grabbing"),setTimeout(()=>{R.style.transition=""},100)}})}},children:i.div({class:"drag-knob-inner"})})]})]}))})}connectedCallback(){this.firstStore.addMiddleware(e(this,ie)),this.firstStore.subscribe(e(this,ne)),We.elementResizer.subscribe(this,e(this,re))}disconnectedCallback(){this.firstStore.removeMiddleware(e(this,ie)),this.firstStore.unsubscribe(e(this,ne)),We.elementResizer.unsubscribe(e(this,re))}}$=new WeakMap,N=new WeakMap,O=new WeakMap,z=new WeakMap,F=new WeakMap,te=new WeakMap,se=new WeakMap,E=new WeakMap,V=new WeakMap,ie=new WeakMap,ne=new WeakMap,p=new WeakSet,H=function(t=this.firstStore.current){return Array.isArray(t)?t:[t]},$e=function(){u(this,p,H).call(this).map((t,s)=>{const r=e(this,N)[s];if(r&&(!e(this,V)||e(this,V)&&e(this,E))){const c=u(this,p,xe).call(this,r,t);r.style.transform=`translateX(${c}px)`}})},Ve=function(){return e(this,E)?e(this,F)-e(this,z):0},xe=function(t,s){const r=t.parentElement,c=u(this,p,Ve).call(this),d=c?s/c:.5;return(r.offsetWidth-t.offsetWidth)*d},re=new WeakMap;customElements.get("e-tweaker-number-manager")||customElements.define("e-tweaker-number-manager",et);const zt=v.createStylesheet({":host":{position:"relative"},".head":{width:"100%",cursor:"default",background:"none",border:"none",color:"inherit",fontFamily:"inherit",fontSize:"inherit",fontWeight:"inherit",textAlign:"start",padding:"0",margin:"0"},".body":{boxSizing:"border-box",position:"var(--position, unset)",top:"100%",left:"0",width:"100%",overflow:"hidden",transitionDuration:"var(--duration, var(--duration-short))",transitionProperty:"height",cursor:"default"},".body-inner":{display:"grid",gap:"var(--gap, 0px)",width:"100%",paddingTop:"var(--gap, 0px)"}});var B,Z,y,q,K,j,ze,oe,He;const Be=class Be extends HTMLElement{constructor(){super();n(this,oe);n(this,B,null);n(this,Z,"");n(this,y,null);n(this,q,!1);n(this,K);n(this,j,null);n(this,ze,()=>{Ee.dispatchSizeChangeEvent(this)});Se.isBrowser&&(this.attachShadow({mode:"open"}).adoptedStyleSheets.push(zt),a(this,B,this.attachInternals()),a(this,j,new ResizeObserver(e(this,ze))),i.element(this,{children:[i.button({class:"head",children:i.slot({name:"head"}),onClick:()=>{this.opened?this.close():this.open()}}),i.div({class:"body",style:{height:"0px"},children:i.div({class:"body-inner",children:i.slot()}),ref:s=>{a(this,y,s)}})]}))}get value(){return e(this,Z)}set value(t){a(this,Z,t),this.dispatchEvent(new Event("change",{bubbles:!0,composed:!0})),e(this,B).setFormValue(e(this,Z))}get internals(){return e(this,B)}get opened(){return e(this,q)}open(){clearTimeout(e(this,K)),a(this,q,!0),e(this,y).style.display="grid",this.classList.add("triggered"),setTimeout(()=>{this.classList.add("opened"),e(this,y).style.height=e(this,y).scrollHeight+"px",u(this,oe,He).call(this)},0)}close(){a(this,q,!1),e(this,y).style.height="0px",this.classList.remove("opened"),u(this,oe,He).call(this),a(this,K,setTimeout(()=>{this.classList.remove("triggered"),e(this,y).style.display="none"},ft.getElementTransitionDurationMS(e(this,y))))}connectedCallback(){e(this,j).observe(e(this,y))}disconnectedCallback(){clearTimeout(e(this,K)),e(this,j).disconnect()}};B=new WeakMap,Z=new WeakMap,y=new WeakMap,q=new WeakMap,K=new WeakMap,j=new WeakMap,ze=new WeakMap,oe=new WeakSet,He=function(){Ee.dispatchBeforeSizeChangeEvent(this),this.dispatchEvent(new CustomEvent("selectToggle",{bubbles:!0,composed:!0,detail:{opened:e(this,q)}}))},Be.formAssociated=!0;let qe=Be;customElements.get("e-select")||customElements.define("e-select",qe);var ae;class tt extends HTMLElement{constructor(){super(...arguments);n(this,ae,null)}get selectElement(){return e(this,ae)}connectedCallback(){var s,r;const t=(r=(s=this.assignedSlot)==null?void 0:s.getRootNode())==null?void 0:r.host;t?a(this,ae,t):console.log(this,"e-select not found")}}ae=new WeakMap;const Tt=v.createStylesheet({":host":{width:"100%",height:"40px",display:"inline-flex",alignItems:"center"}});var W,le,De;class Rt extends tt{constructor(){super();n(this,le);n(this,W,()=>{this.selectElement.value===this.value?this.style.display="none":this.style.display=""});Se.isBrowser&&(this.attachShadow({mode:"open"}).adoptedStyleSheets.push(Tt),i.element(this,{tabindex:0,onClick:()=>{u(this,le,De).call(this)},onKeydown:s=>{s.code==="Space"&&u(this,le,De).call(this)},children:i.slot()}))}get value(){return(this.hasAttribute("value")?this.getAttribute("value"):this.innerText)||""}connectedCallback(){super.connectedCallback(),this.hasAttribute("default")&&(this.selectElement.value||(this.selectElement.value=this.value)),this.selectElement.addEventListener("change",e(this,W)),setTimeout(()=>{e(this,W).call(this)})}disconnectedCallback(){this.selectElement.removeEventListener("change",e(this,W))}}W=new WeakMap,le=new WeakSet,De=function(){this.selectElement.value=this.value,this.selectElement.close()};customElements.get("e-select-option")||customElements.define("e-select-option",Rt);const Lt=v.createStylesheet({":host":{width:"100%",height:"40px",display:"inline-flex",alignItems:"center",justifyContent:"space-between"},".default-arrow":{flexShrink:"0",width:"var(--arrow-size, 1em)",height:"var(--arrow-size, 1em)",fill:`var(--arrow-color, ${h.colorMain.var})`,transitionProperty:"transform",transitionDuration:"var(--duration, var(--duration-short))"},":host(.opened) .default-arrow":{transform:"scaleY(-1)"}});var he,J,ce;class Mt extends tt{constructor(){super();n(this,he,null);n(this,J,()=>{const s=this.selectElement.shadowRoot.querySelector(".body slot").assignedElements().find(r=>r.value===this.selectElement.value);s&&(e(this,he).innerHTML=s.innerHTML)});n(this,ce,()=>{this.classList.toggle("opened",this.selectElement.opened)});Se.isBrowser&&(this.attachShadow({mode:"open"}).adoptedStyleSheets.push(Lt),i.element(this,{children:[i.slot(),i.slot({name:"arrow",children:i.element(Ue,{class:"default-arrow"})})]}),this.slot="head")}connectedCallback(){super.connectedCallback(),a(this,he,this.querySelector("[data-value-holder]")||this),this.selectElement.addEventListener("change",e(this,J)),e(this,J).call(this),this.selectElement.addEventListener("selectToggle",e(this,ce))}disconnectedCallback(){this.selectElement.removeEventListener("change",e(this,J)),this.selectElement.removeEventListener("selectToggle",e(this,ce))}}he=new WeakMap,J=new WeakMap,ce=new WeakMap;customElements.get("e-select-head")||customElements.define("e-select-head",Mt);const Ft=v.createStylesheet({"e-select":{display:"block",width:"100%","--arrow-color":h.colorFont.var},"e-select-head":{width:"100%",height:"var(--height-input)",display:"flex",alignItems:"center",justifyContent:"space-between",fontSize:"var(--font-size-small)"},"e-select-option":{height:"var(--height-input)",transitionDuration:"var(--duration-short)",transitionProperty:"color",fontSize:"var(--font-size-small)"},"e-select-option:hover":{color:h.colorActive.var},svg:{width:"16px",height:"16px",fill:h.colorFont.var,transitionProperty:"transform",transitionDuration:"var(--duration-short)"},".opened svg":{transform:"scaleY(-1)"}});class st extends G{constructor(...o){var r,c;super(...o),this.attachShadow({mode:"open"}).adoptedStyleSheets.push(Ft);const s=((c=(r=this.firstStore.passport)==null?void 0:r.manager)==null?void 0:c.variants)||[];i.element(this,{children:i.element("e-select",{value:this.firstStore,onChange:d=>{this.updateStores(d.currentTarget.value)},lightChildren:[i.element("e-select-head",{lightChildren:[i.span({"data-value-holder":""})]}),...s.map((d,g)=>i.element("e-select-option",{lightChildren:d,default:g===0?!0:null}))]})})}}customElements.get("e-tweaker-select-manager")||customElements.define("e-tweaker-select-manager",st);const It=v.createStylesheet({":host":{width:"100%",display:"flex",alignItems:"center"},input:{boxSizing:"border-box",outline:"none",fontVariantNumeric:"tabular-nums",fontFamily:"inherit",color:"inherit",border:"none",fontSize:"var(--font-size-small)",height:"var(--height-input)",width:"100%",margin:"0",padding:"0 var(--gap-small)",backgroundColor:"rgba(255, 255, 255, 0.1)",borderRadius:h.borderRadius.var}});class it extends G{constructor(...o){super(...o),this.attachShadow({mode:"open"}).adoptedStyleSheets.push(It),i.element(this,{children:[i.input({class:"text-input",type:"string",value:this.firstStore,onChange:s=>{this.updateStores(s.currentTarget.value)}})]})}}customElements.get("e-tweaker-string-manager")||customElements.define("e-tweaker-string-manager",it);const At={boolean:_e,color:Ge,link:Qe,number:et,select:st,string:it},Pt=v.createStylesheet({":host":{display:"grid",gridAutoFlow:"column",gridTemplateColumns:"0.5fr 1fr",alignItems:"center",color:h.colorFont.var,gap:"var(--gap-medium)"},":host(.disabled)":{pointerEvents:"none",opacity:.5},".head":{fontSize:"var(--font-size-medium)",display:"flex",alignItems:"center",gap:"var(--gap-extra-small)"},".head-buttons":{display:"flex"},".head-button":{width:"14px",height:"14px",padding:"0",margin:"0",border:"none",background:"none",fill:h.colorFont.var,transitionDuration:"var(--duration-short)",transitionProperty:"fill, opacity",opacity:"0"},":host(:hover) .head-button":{opacity:"1"},".head-button:hover":{fill:h.colorActive.var},".head-button svg":{width:"100%",height:"100%"}});var S,Y,X,U,_,de,ue;class Ne extends HTMLElement{constructor(t){var c,d,g,x;super();n(this,S,[]);n(this,Y);n(this,X);n(this,U,!1);n(this,_);n(this,de,()=>{m.activeStores.current.find(t=>e(this,S).includes(t))||this.remove()});n(this,ue,t=>{e(this,U)&&((t.metaKey||t.ctrlKey)&&t.code==="KeyC"?navigator.clipboard.writeText(e(this,S)[0].current):(t.metaKey||t.ctrlKey)&&t.code==="KeyR"&&(e(this,S).forEach(s=>{s.reset()}),t.preventDefault()))});a(this,S,[t.store]),a(this,Y,t.store.passport.name),a(this,X,e(this,Y).split(".").slice(-1).toString());const s=((d=(c=t.store.passport)==null?void 0:c.manager)==null?void 0:d.type)||"string";a(this,_,new At[s](e(this,S)[0])),this.attachShadow({mode:"open"}).adoptedStyleSheets.push(Pt),i.element(this,{class:{disabled:((x=(g=t.store.passport)==null?void 0:g.manager)==null?void 0:x.disabled)||!1},onPointerleave:()=>{a(this,U,!1)},onPointerenter:()=>{a(this,U,!0)},children:[i.div({class:"head",children:[i.div({class:"name",children:e(this,X)+":"}),i.div({class:"head-buttons",children:[i.button({class:"head-button",children:Xe,onClick:()=>{navigator.clipboard.writeText(e(this,S)[0].current)}}),i.button({class:"head-button",children:Ye,onClick:()=>{e(this,S).forEach(I=>{I.reset()})}})]})]}),e(this,_)]})}get key(){return e(this,Y)}get name(){return e(this,X)}get stores(){return e(this,S)}addStore(t){e(this,_).addStore(t)}connectedCallback(){m.activeStores.subscribe(e(this,de)),addEventListener("keydown",e(this,ue)),Ee.dispatchSizeChangeEvent(this)}disconnectedCallback(){m.activeStores.unsubscribe(e(this,de)),removeEventListener("keydown",e(this,ue))}}S=new WeakMap,Y=new WeakMap,X=new WeakMap,U=new WeakMap,_=new WeakMap,de=new WeakMap,ue=new WeakMap;customElements.get("e-tweaker-field")||customElements.define("e-tweaker-field",Ne);const $t=v.createStylesheet({".wrapper":{boxSizing:"border-box",backgroundColor:"rgba(255, 255, 255, 0.1)",borderRadius:h.borderRadius.var},".head":{boxSizing:"border-box",width:"100%",height:"var(--tweaker-folder-height)",paddingLeft:"var(--gap-medium)",paddingRight:"var(--gap-medium)",display:"flex",alignItems:"center",justifyContent:"space-between",backgroundColor:h.colorMainAux.var,borderRadius:h.borderRadius.var},".name":{fontSize:"var(--font-size-large)",color:h.colorFont.var},".body":{display:"none",overflow:"hidden","@supports (height: calc-size(auto))":{height:"0"}},":host(.transition-allowed) .body":{transition:"height var(--duration-short), display var(--duration-short) allow-discrete"},":host(.opened) .body":{height:"calc-size(auto)",display:"block","@starting-style":{height:"0"}},".body-content":{boxSizing:"border-box",padding:"var(--gap-large)",display:"grid",gap:"var(--gap-medium)"},".arrow":{width:"20px",height:"20px",fill:h.colorFont.var,transition:"transform var(--duration-short)"},".opened .arrow":{transform:"scaleY(-1)"}});var k,pe,f,ge,me,fe,ve,Te;const Re=class Re extends HTMLElement{constructor(t){super();n(this,k);n(this,pe,new m.Store(null));n(this,f,new m.Store([]));n(this,ge);n(this,me,null);n(this,fe,null);n(this,ve,null);n(this,Te,t=>{let s=[],r=[];t.forEach(c=>{s=[...s,...c.removedNodes],r=[...r,...c.addedNodes]}),e(this,f).current=e(this,f).current.filter(c=>!s.includes(c)),e(this,k)&&!e(this,f).current.length&&!r.length&&this.remove()});this.attachShadow({mode:"open"}).adoptedStyleSheets.push($t),a(this,k,t.key),a(this,ge,new MutationObserver(e(this,Te))),i.element(this,{children:[i.div({class:"wrapper",children:[i.div({class:"head",onClick:r=>{this.classList.toggle("opened"),this.classList.contains("opened")?w.openPanel(e(this,k)):w.closePanel(e(this,k))},children:[e(this,k)?i.div({class:"name",children:[e(this,k).split(".").slice(-1).toString()]}):null,e(this,pe),i.element(Ue,{class:"arrow"})]}),i.div({class:"body",ref:r=>{a(this,me,r)},children:i.div({class:"body-content",children:e(this,f),ref:r=>{a(this,fe,r),a(this,ve,r.firstElementChild)}})})]})]}),t!=null&&t.storeBox&&this.handleStore(t.storeBox)}get key(){return e(this,k)}get head(){return e(this,pe)}get content(){return e(this,f)}get bodyElement(){return e(this,me)}get contentElement(){return e(this,fe)}connectedCallback(){w.isPanelOpened(e(this,k))&&this.classList.add("opened"),setTimeout(()=>{this.classList.add("transition-allowed")}),e(this,ge).observe(e(this,ve),{childList:!0})}handleStore(t){if(t.remainingFolders.length){const r=t.store.passport.name.split("."),c=r.slice(0,r.length-t.remainingFolders.length).join("."),d=e(this,f).current.find(g=>g.key===c);d instanceof Re?d.handleStore({store:t.store,remainingFolders:t.remainingFolders.slice(1)}):e(this,f).current=[...e(this,f).current,new Re({key:c,storeBox:{store:t.store,remainingFolders:t.remainingFolders.slice(1)}})]}else{const s=e(this,f).current.find(r=>r.key===t.store.passport.name);s instanceof Ne?s.addStore(t.store):e(this,f).current=[...e(this,f).current,new Ne({store:t.store})]}}};k=new WeakMap,pe=new WeakMap,f=new WeakMap,ge=new WeakMap,me=new WeakMap,fe=new WeakMap,ve=new WeakMap,Te=new WeakMap;let Ce=Re;customElements.get("e-tweaker-folder")||customElements.define("e-tweaker-folder",Ce);const Vt=v.createStylesheet({":host":{"--tweaker-width":"550px","--tweaker-offset":"20px","--tweaker-folder-height":"35px","--height-input":"25px","--gap-large":"12px","--gap-medium":"10px","--gap-small":"8px","--gap-extra-small":"4px","--font-size-large":"16px","--font-size-medium":"14px","--font-size-small":"12px","--duration-short":"0.2s",fontFamily:"sans-serif",position:"absolute",top:"var(--tweaker-offset)",right:"var(--tweaker-offset)",width:"var(--tweaker-width)",backgroundColor:h.colorMain.var,borderRadius:h.borderRadius.var,transition:"opacity 0.1s",zIndex:"100",opacity:"0.1"},":host(:hover)":{opacity:"1 !important"},".resize":{position:"absolute",left:"0",top:"0",width:"calc(var(--tweaker-width) * 0.025)",height:"100%",zIndex:"1",cursor:"ew-resize"},".tweaker-buttons":{display:"flex",alignItems:"center",gap:"var(--gap-extra-small)"},".tweaker-button":{width:"18px",height:"18px",padding:"0",margin:"0",background:"none",border:"none",fill:h.colorFont.var,transitionProperty:"fill",transitionDuration:"var(--duration-short)"},".tweaker-button:hover":{fill:h.colorActive.var},".tweaker-button svg":{width:"100%",height:"100%"},":host .body-content":{maxHeight:`calc(
|
|
10
|
+
100dvh -
|
|
11
|
+
(
|
|
12
|
+
var(--tweaker-offset) * 2 +
|
|
13
|
+
var(--tweaker-folder-height)
|
|
14
|
+
)
|
|
15
|
+
)`,overflow:"hidden auto","-ms-overflow-style":"none","scrollbar-width":"none"},":host .body-content::-webkit-scrollbar":{display:"none"},[`@media ${pt.ViewportMediaRules["<=mobile"]}`]:{":host":{position:"absolute",top:"0",right:"0",width:"100% !important",borderTopLeftRadius:"0",borderTopRightRadius:"0"},":host .body-content":{maxHeight:`calc(
|
|
16
|
+
100dvh -
|
|
17
|
+
var(--tweaker-folder-height)
|
|
18
|
+
)`}}});var we,be,ye;class nt extends Ce{constructor(){super({key:""});n(this,we,!1);n(this,be,()=>{w.save()});n(this,ye,ut.debounce(()=>{m.activeStores.current.forEach(t=>{var s;if(t.passport&&!((s=t.passport.manager)!=null&&s.invisible)){const r=t.passport.name.split(".");this.handleStore({store:t,remainingFolders:r.length>1?r.slice(0,-1):[]})}}),e(this,we)||(a(this,we,!0),this.contentElement.scroll({top:w.scrollValue}),this.contentElement.addEventListener("scroll",()=>{w.scrollValue=this.contentElement.scrollTop}))},10));w.load(),this.shadowRoot.adoptedStyleSheets.push(Vt),this.head.current=[i.div({class:"tweaker-buttons",onClick:t=>{t.stopPropagation()},children:[i.button({class:"tweaker-button",children:Ye,onClick:()=>{m.storeRegistry.resetState()}}),i.button({class:["tweaker-button"],children:[Xe],onClick:()=>{navigator.clipboard.writeText(JSON.stringify(m.storeRegistry.getState()))}}),i.button({class:"tweaker-button",children:vt,onClick:()=>{Ee.createJSONAndSave(m.storeRegistry.name,m.storeRegistry.getState())}}),i.label({class:"tweaker-button",children:[wt,i.input({type:"file",style:{display:"none"},onChange:t=>{var c;const r=(c=t.currentTarget.files)==null?void 0:c[0];if(r){const d=new FileReader;d.onload=g=>{var I,Q;const x=(Q=(I=g.target)==null?void 0:I.result)==null?void 0:Q.toString();x&&m.storeRegistry.loadState(x)},d.readAsText(r)}}})]})]})],i.element(this.bodyElement,{children:[i.div({class:"resize",onPointerdown:t=>{t.preventDefault();const s=this.getBoundingClientRect(),r=this.contentElement.scrollTop;Je.setupDrag(c=>{const d=t.x-c.x,g=Math.max(400,s.width+d);this.style.width=g+"px",w.changeSize("tweaker",g)},()=>{setTimeout(()=>{this.contentElement.scroll({top:r})},10)})},onDblclick:()=>{this.style.width="",w.changeSize("tweaker",null)}})]})}connectedCallback(){super.connectedCallback(),window.addEventListener("beforeunload",e(this,be)),m.activeStores.subscribe(e(this,ye)),w.changedSizes("tweaker")&&(this.style.width=w.changedSizes("tweaker")+"px")}disconnectedCallback(){window.removeEventListener("beforeunload",e(this,be)),w.save(),m.activeStores.unsubscribe(e(this,ye))}}we=new WeakMap,be=new WeakMap,ye=new WeakMap;customElements.get("e-tweaker")||customElements.define("e-tweaker",nt);Se.isBrowser&&document.body.appendChild(new nt);
|