aptechka 0.38.2 → 0.38.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/file-DSpfWdd9.cjs +1 -0
- package/lib/file-GHShUlue.js +24 -0
- package/lib/media-elements/index.cjs +2 -2
- package/lib/media-elements/index.js +125 -124
- package/lib/need_redo_tweaker/index.cjs +1 -1
- package/lib/need_redo_tweaker/index.js +1 -1
- package/lib/utils/file.d.ts +1 -0
- package/lib/utils/index.cjs +1 -1
- package/lib/utils/index.js +63 -62
- package/package.json +1 -1
- package/lib/file-EevnUtRj.cjs +0 -1
- package/lib/file-lxi_oXJf.js +0 -13
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";function a(t,o){const e=new Blob([JSON.stringify(o)],{type:"application/json"}),n=document.createElement("a");n.download=t+".json",n.href=window.URL.createObjectURL(e),n.dataset.downloadurl=["application/json",n.download,n.href].join(":");const c=new MouseEvent("click",{view:window,bubbles:!0,cancelable:!0});n.dispatchEvent(c),n.remove()}function d(t,o){const e=document.createElement("a");o&&e.setAttribute("download",o),e.href=t,document.body.appendChild(e),e.click(),e.remove()}exports.createJSONAndSave=a;exports.downloadURI=d;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
function a(t, o) {
|
|
2
|
+
const e = new Blob([JSON.stringify(o)], {
|
|
3
|
+
type: "application/json"
|
|
4
|
+
}), n = document.createElement("a");
|
|
5
|
+
n.download = t + ".json", n.href = window.URL.createObjectURL(e), n.dataset.downloadurl = [
|
|
6
|
+
"application/json",
|
|
7
|
+
n.download,
|
|
8
|
+
n.href
|
|
9
|
+
].join(":");
|
|
10
|
+
const c = new MouseEvent("click", {
|
|
11
|
+
view: window,
|
|
12
|
+
bubbles: !0,
|
|
13
|
+
cancelable: !0
|
|
14
|
+
});
|
|
15
|
+
n.dispatchEvent(c), n.remove();
|
|
16
|
+
}
|
|
17
|
+
function d(t, o) {
|
|
18
|
+
const e = document.createElement("a");
|
|
19
|
+
o && e.setAttribute("download", o), e.href = t, document.body.appendChild(e), e.click(), e.remove();
|
|
20
|
+
}
|
|
21
|
+
export {
|
|
22
|
+
a as c,
|
|
23
|
+
d
|
|
24
|
+
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
"use strict";var
|
|
1
|
+
"use strict";var he=a=>{throw TypeError(a)};var ie=(a,n,t)=>n.has(a)||he("Cannot "+t);var e=(a,n,t)=>(ie(a,n,"read from private field"),t?t.call(a):n.get(a)),s=(a,n,t)=>n.has(a)?he("Cannot add the same private member more than once"):n instanceof WeakSet?n.add(a):n.set(a,t),r=(a,n,t,i)=>(ie(a,n,"write to private field"),i?i.call(a,t):n.set(a,t),t),x=(a,n,t)=>(ie(a,n,"access private method"),t);var ce=(a,n,t)=>new Promise((i,c)=>{var y=m=>{try{g(t.next(m))}catch(l){c(l)}},j=m=>{try{g(t.throw(m))}catch(l){c(l)}},g=m=>m.done?i(m.value):Promise.resolve(m.value).then(y,j);g((t=t.apply(a,n)).next())});Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const ge=require("../device/index.cjs"),Ee=require("../source/index.cjs"),ve=require("../class-linked-status/index.cjs"),de=require("../browser-CpzFX2xg.cjs"),G=require("../events-KVanG9sR.cjs"),me=require("../string-DhgS_iFl.cjs"),re=require("../loading/index.cjs"),K=require("../css-property/index.cjs"),ue=require("../element-resizer/vanilla/index.cjs"),le=require("../canvas-CU5Xjahf.cjs"),Se=require("../canvas/index.cjs"),ne=require("../ticker/vanilla/index.cjs");let we=0;var d,o,E,_,f,$,R,h,q,V,v,z,X,Q,H,Z;class N extends HTMLElement{constructor(){super();s(this,z);s(this,d,null);s(this,o,null);s(this,E,!1);s(this,_,!1);s(this,f,!1);s(this,$,"");s(this,R,"");s(this,h,new ve.ClassLinkedStatus(this,{loading:!1,loaded:!1,error:!1,clear:!1}));s(this,q,null);s(this,V);s(this,v,null);s(this,Q,t=>{const i=t[0];e(this,f)&&(!e(this,_)||this.hasAttribute("reload-source"))&&i.isIntersecting&&this.triggerLazyLoad(),i.isIntersecting?G.dispatchEvent(this,"sourceCapture",{custom:!0}):(this.hasAttribute("reload-source")&&x(this,z,X).call(this,void 0),G.dispatchEvent(this,"sourceRelease",{custom:!0}))});s(this,H,()=>{e(this,h).set("loaded",!0),e(this,h).set("error",!1),e(this,h).set("loading",!1),!e(this,f)&&!e(this,E)&&re.loading.complete(e(this,R));const t=getComputedStyle(this).getPropertyValue("--clear-duration");t?r(this,V,setTimeout(()=>{e(this,h).set("clear",!0)},parseFloat(t)*1e3)):e(this,h).set("clear",!0),r(this,E,!0)});s(this,Z,t=>{e(this,h).set("loaded",!1),e(this,h).set("error",!0),e(this,h).set("loading",!1),!e(this,f)&&!e(this,E)&&re.loading.error(e(this,R)),r(this,E,!0)});de.isBrowser&&window.IntersectionObserver&&(r(this,$,`source-consumer-${++we}`),r(this,q,new IntersectionObserver(e(this,Q))))}get consumerElement(){return e(this,o)}get sourceManager(){return e(this,d)}get status(){return e(this,h)}get isLazy(){return e(this,f)}get currentURL(){return e(this,v)}triggerLazyLoad(){e(this,d).current&&e(this,d).current!==e(this,d).previous&&x(this,z,X).call(this,e(this,d).current),r(this,_,!0)}connectedCallback(){const t=this.getAttribute("srcset");t&&(r(this,o,this.createConsumer()),e(this,o).style.cssText=`
|
|
2
2
|
display: block;
|
|
3
3
|
width: 100%;
|
|
4
4
|
height: 100%;
|
|
5
|
-
`,e(this,o).classList.add("source-consumer"),Array.from(this.attributes).forEach(i=>{if(i.name!=="srcset"){const
|
|
5
|
+
`,e(this,o).classList.add("source-consumer"),Array.from(this.attributes).forEach(i=>{if(i.name!=="srcset"){const c=i.nodeValue||"",y=me.kebabToCamel(i.name);y in e(this,o)&&(e(this,o)[y]=c||!0)}}),this.appendChild(e(this,o)),r(this,d,new Ee.SourceManager({srcset:t})),r(this,f,this.hasAttribute("lazy")),e(this,d).subscribe(i=>{(!e(this,f)||e(this,f)&&e(this,_))&&x(this,z,X).call(this,i.current)}),e(this,q).observe(this),e(this,d).connect())}disconnectedCallback(){e(this,q).disconnect(),e(this,d).close(),e(this,o).onloadeddata=null,e(this,o).onload=null,e(this,o).onerror=null,e(this,o).remove(),e(this,h).reset(),clearTimeout(e(this,V))}}d=new WeakMap,o=new WeakMap,E=new WeakMap,_=new WeakMap,f=new WeakMap,$=new WeakMap,R=new WeakMap,h=new WeakMap,q=new WeakMap,V=new WeakMap,v=new WeakMap,z=new WeakSet,X=function(t){if(clearTimeout(e(this,V)),e(this,o).onloadeddata=null,e(this,o).onload=null,e(this,o).onerror=null,e(this,h).set("loaded",!1),e(this,h).set("error",!1),e(this,h).set("loading",!1),e(this,h).set("clear",!1),t){r(this,R,`${e(this,$)}-${t.url}`);const i=this.hasAttribute("keep-source-parameters");e(this,h).set("loading",!0),r(this,v,i?t.url:t.name+t.extension),this.consumeSource(e(this,v)),!e(this,f)&&!e(this,E)&&re.loading.add(e(this,R)),e(this,o).onloadeddata=()=>{e(this,H).call(this)},e(this,o).onload=()=>{e(this,H).call(this)},e(this,o).onerror=()=>{e(this,Z).call(this,e(this,v))}}else r(this,v,null),this.consumeSource(null)},Q=new WeakMap,H=new WeakMap,Z=new WeakMap;class fe extends N{createConsumer(){return document.createElement("img")}consumeSource(n){if(n&&this.hasAttribute("webp")&&ge.device.isWebp){const t=n.split(".").slice(0,-1).join(".")+".webp";this.consumerElement.src=t}else this.consumerElement.src=n||""}}customElements.get("e-image")||customElements.define("e-image",fe);function Le(a){const n=a.match(/\{([\d-]+)\}/);if(n){const t=n[1].split("-");if(t.length===2){const i=parseInt(t[0],10),c=parseInt(t[1],10);return{start:i,end:c}}}return null}var p,I,U,S,w,A,P,O,b,L;class pe extends N{constructor(t){super();s(this,p,[]);s(this,I,new K.CSSProperty(this,"--fit","contain"));s(this,U,new K.CSSProperty(this,"--autoplay",!1));s(this,S,new K.CSSProperty(this,"--offset-x",.5));s(this,w,new K.CSSProperty(this,"--offset-y",.5));s(this,A,null);s(this,P,0);s(this,O,1);s(this,b,()=>{if(e(this,p).length){const t=e(this,p)[0];e(this,I).current==="cover"?r(this,A,le.cover(t.naturalWidth,t.naturalHeight,this.consumerElement.width,this.consumerElement.height,e(this,S).current,e(this,w).current)):r(this,A,le.contain(t.naturalWidth,t.naturalHeight,this.consumerElement.width,this.consumerElement.height,e(this,S).current,e(this,w).current))}});s(this,L,t=>{if(this.status.isFalse("loaded")||!e(this,A))return;t.detail.context.clearRect(0,0,t.detail.width,t.detail.height);const i=e(this,p)[e(this,P)];i&&t.detail.context.drawImage(i,...e(this,A)),e(this,U).current&&r(this,P,(e(this,P)+1)%e(this,p).length)});de.isBrowser&&(r(this,O,parseInt(((t==null?void 0:t.pad)||this.getAttribute("pad")||"1").toString())),e(this,I).subscribe(e(this,b)),e(this,S).subscribe(e(this,b)),e(this,w).subscribe(e(this,b)),this.addEventListener("sourceCapture",i=>{this.consumerElement.addEventListener("canvasRender",e(this,L))}),this.addEventListener("sourceRelease",i=>{this.consumerElement.removeEventListener("canvasRender",e(this,L))}))}setProgress(t){e(this,p).length&&r(this,P,Math.floor((e(this,p).length-1)*t))}connectedCallback(){super.connectedCallback(),e(this,U).observe(),e(this,I).observe(),e(this,S).observe(),e(this,w).observe(),ue.elementResizer.subscribe(this,e(this,b))}disconnectedCallback(){super.disconnectedCallback(),e(this,U).unobserve(),e(this,I).unobserve(),e(this,S).unobserve(),e(this,w).unobserve(),r(this,p,[]),ue.elementResizer.unsubscribe(e(this,b)),this.consumerElement.removeEventListener("canvasRender",e(this,L))}createConsumer(){return new Se.CanvasElement}consumeSource(t){return ce(this,null,function*(){var i,c,y,j;if(t){this.consumerElement.removeEventListener("canvasRender",e(this,L));const g=[],m=Le(t);if(m)for(let l=m.start;l<=m.end;l++){const oe=t.replace(/\{([^}]+)\}/,l.toString().padStart(e(this,O),"0")),D=new Image;D.src=oe,g.push(D)}else{const l=new Image;l.src=t,g.push(l)}try{yield Promise.all(g.map((l,oe)=>new Promise((D,be)=>{l.onload=()=>{D()},l.onerror=Ce=>{be(`${l.src} Image not found`)}}))),r(this,p,g),e(this,b).call(this),(c=(i=this.consumerElement).onload)==null||c.call(i,new Event("load")),this.isLazy||this.consumerElement.addEventListener("canvasRender",e(this,L))}catch(l){console.error(l),(j=(y=this.consumerElement).onerror)==null||j.call(y,new Event("error"))}}})}}p=new WeakMap,I=new WeakMap,U=new WeakMap,S=new WeakMap,w=new WeakMap,A=new WeakMap,P=new WeakMap,O=new WeakMap,b=new WeakMap,L=new WeakMap;customElements.get("e-sequence")||customElements.define("e-sequence",pe);var k,B;class ye extends N{constructor(){super(...arguments);s(this,k,0);s(this,B,()=>{this.classList.add(`state-${this.consumerElement.readyState}`);const t=this.consumerElement.readyState/4;t>e(this,k)&&r(this,k,t),G.dispatchEvent(this,"videoReadyStateChange",{detail:{readyState:this.consumerElement.readyState,progress:e(this,k)}}),this.consumerElement.readyState===4&&ne.ticker.unsubscribe(e(this,B))})}connectedCallback(){super.connectedCallback(),this.addEventListener("sourceCapture",()=>{ne.ticker.subscribe(e(this,B)),this.hasAttribute("capture-autoplay")&&this.consumerElement.play()}),this.addEventListener("sourceRelease",()=>{this.hasAttribute("capture-autoplay")&&(this.consumerElement.pause(),this.hasAttribute("replay")&&(this.consumerElement.currentTime=0)),this.hasAttribute("reload-source")&&this.classList.remove("state-0","state-1","state-2","state-3","state-4")})}disconnectedCallback(){super.disconnectedCallback(),ne.ticker.unsubscribe(e(this,B)),r(this,k,0)}createConsumer(){return document.createElement("video")}consumeSource(t){this.consumerElement.src=t||"",this.consumerElement.autoplay=!0}}k=new WeakMap,B=new WeakMap;customElements.get("e-video")||customElements.define("e-video",ye);var u,M,C,Y,W,ee,te,se,F,ae;const T=class T extends N{constructor(){super();s(this,F);s(this,u);s(this,M);s(this,C,!1);s(this,Y,!1);s(this,W,()=>{r(this,C,e(this,C)||this.hasAttribute("autoplay")&&!this.hasAttribute("capture-autoplay")),r(this,u,new window.YT.Player(e(this,M),{playerVars:{mute:this.hasAttribute("muted")?1:0,controls:this.hasAttribute("controls")?1:0},events:{onReady:e(this,ee),onError:e(this,te),onStateChange:e(this,se)}}))});s(this,ee,()=>{r(this,Y,!0),x(this,F,ae).call(this)});s(this,te,t=>{var i,c;console.error("YouTube: Ошибка при загрузке видео:",this.currentURL,t),(c=(i=this.consumerElement).onerror)==null||c.call(i,new Event("error"))});s(this,se,()=>{});r(this,M,"yt-"+me.generateId(10)),T.__apiReady||(window.onYouTubeIframeAPIReady=()=>{T.__apiReady=!0,G.dispatchEvent(window,"youTubeIframeAPIReady")}),this.addEventListener("sourceCapture",()=>{this.hasAttribute("capture-autoplay")&&(e(this,Y)?e(this,u).playVideo():r(this,C,!0))}),this.addEventListener("sourceRelease",()=>{e(this,u)&&this.hasAttribute("capture-autoplay")&&(e(this,u).pauseVideo(),this.hasAttribute("replay")&&e(this,u).seekTo(0))})}static __onYouTubeIframeAPIReady(){this.__apiReady=!0}createConsumer(){const t=document.createElement("div");return t.id=e(this,M),t}consumeSource(t){var i;if(t){if(!document.getElementById("youtube-script")){const c=document.createElement("script");c.id,c.src="https://www.youtube.com/iframe_api";const y=document.getElementsByTagName("script")[0];(i=y.parentNode)==null||i.insertBefore(c,y)}e(this,u)?x(this,F,ae).call(this):T.__apiReady?e(this,W).call(this):addEventListener("youTubeIframeAPIReady",e(this,W))}else e(this,u)&&e(this,u).stopVideo()}disconnectedCallback(){super.disconnectedCallback(),e(this,u)&&e(this,u).destroy(),removeEventListener("youTubeIframeAPIReady",e(this,W))}};u=new WeakMap,M=new WeakMap,C=new WeakMap,Y=new WeakMap,W=new WeakMap,ee=new WeakMap,te=new WeakMap,se=new WeakMap,F=new WeakSet,ae=function(){var t,i;this.currentURL&&(this.currentURL.startsWith("http")?e(this,u).loadVideoByUrl(this.currentURL):e(this,u).loadVideoById(this.currentURL)),e(this,C)?e(this,u).playVideo():e(this,u).stopVideo(),r(this,C,!1),(i=(t=this.consumerElement).onload)==null||i.call(t,new Event("load"))},T.__apiReady=!1;let J=T;customElements.get("e-youtube")||customElements.define("e-youtube",J);exports.ImageElement=fe;exports.SequenceElement=pe;exports.SourceElement=N;exports.VideoElement=ye;exports.YouTubeElement=J;
|
|
@@ -1,39 +1,39 @@
|
|
|
1
|
-
var
|
|
1
|
+
var he = (a) => {
|
|
2
2
|
throw TypeError(a);
|
|
3
3
|
};
|
|
4
|
-
var
|
|
5
|
-
var e = (a,
|
|
6
|
-
var
|
|
4
|
+
var se = (a, n, t) => n.has(a) || he("Cannot " + t);
|
|
5
|
+
var e = (a, n, t) => (se(a, n, "read from private field"), t ? t.call(a) : n.get(a)), s = (a, n, t) => n.has(a) ? he("Cannot add the same private member more than once") : n instanceof WeakSet ? n.add(a) : n.set(a, t), r = (a, n, t, i) => (se(a, n, "write to private field"), i ? i.call(a, t) : n.set(a, t), t), T = (a, n, t) => (se(a, n, "access private method"), t);
|
|
6
|
+
var ce = (a, n, t) => new Promise((i, c) => {
|
|
7
7
|
var b = (m) => {
|
|
8
8
|
try {
|
|
9
9
|
g(t.next(m));
|
|
10
10
|
} catch (l) {
|
|
11
|
-
|
|
11
|
+
c(l);
|
|
12
12
|
}
|
|
13
|
-
},
|
|
13
|
+
}, Y = (m) => {
|
|
14
14
|
try {
|
|
15
15
|
g(t.throw(m));
|
|
16
16
|
} catch (l) {
|
|
17
|
-
|
|
17
|
+
c(l);
|
|
18
18
|
}
|
|
19
|
-
}, g = (m) => m.done ? i(m.value) : Promise.resolve(m.value).then(b,
|
|
20
|
-
g((t = t.apply(a,
|
|
19
|
+
}, g = (m) => m.done ? i(m.value) : Promise.resolve(m.value).then(b, Y);
|
|
20
|
+
g((t = t.apply(a, n)).next());
|
|
21
21
|
});
|
|
22
|
-
import { device as
|
|
23
|
-
import { SourceManager as
|
|
24
|
-
import { ClassLinkedStatus as
|
|
25
|
-
import { i as
|
|
26
|
-
import { d as
|
|
27
|
-
import { k as
|
|
28
|
-
import { loading as
|
|
29
|
-
import { CSSProperty as
|
|
30
|
-
import { elementResizer as
|
|
31
|
-
import { c as
|
|
32
|
-
import { CanvasElement as
|
|
33
|
-
import { ticker as
|
|
34
|
-
let
|
|
35
|
-
var d, o, E, V, f, H, R, h, U, z, v, _,
|
|
36
|
-
class
|
|
22
|
+
import { device as me } from "../device/index.js";
|
|
23
|
+
import { SourceManager as fe } from "../source/index.js";
|
|
24
|
+
import { ClassLinkedStatus as pe } from "../class-linked-status/index.js";
|
|
25
|
+
import { i as le } from "../browser-0zX67oeU.js";
|
|
26
|
+
import { d as X } from "../events-CsVF98U6.js";
|
|
27
|
+
import { k as be, g as ye } from "../string-f0Dnk0L1.js";
|
|
28
|
+
import { loading as ie } from "../loading/index.js";
|
|
29
|
+
import { CSSProperty as j } from "../css-property/index.js";
|
|
30
|
+
import { elementResizer as ue } from "../element-resizer/vanilla/index.js";
|
|
31
|
+
import { c as ge, a as Ee } from "../canvas-DeZ0SLUJ.js";
|
|
32
|
+
import { CanvasElement as ve } from "../canvas/index.js";
|
|
33
|
+
import { ticker as re } from "../ticker/vanilla/index.js";
|
|
34
|
+
let we = 0;
|
|
35
|
+
var d, o, E, V, f, H, R, h, U, z, v, _, K, G, q, J;
|
|
36
|
+
class te extends HTMLElement {
|
|
37
37
|
constructor() {
|
|
38
38
|
super();
|
|
39
39
|
s(this, _);
|
|
@@ -44,7 +44,7 @@ class ee extends HTMLElement {
|
|
|
44
44
|
s(this, f, !1);
|
|
45
45
|
s(this, H, "");
|
|
46
46
|
s(this, R, "");
|
|
47
|
-
s(this, h, new
|
|
47
|
+
s(this, h, new pe(this, {
|
|
48
48
|
loading: !1,
|
|
49
49
|
loaded: !1,
|
|
50
50
|
error: !1,
|
|
@@ -53,22 +53,22 @@ class ee extends HTMLElement {
|
|
|
53
53
|
s(this, U, null);
|
|
54
54
|
s(this, z);
|
|
55
55
|
s(this, v, null);
|
|
56
|
-
s(this,
|
|
56
|
+
s(this, G, (t) => {
|
|
57
57
|
const i = t[0];
|
|
58
|
-
e(this, f) && (!e(this, V) || this.hasAttribute("reload-source")) && i.isIntersecting && this.triggerLazyLoad(), i.isIntersecting ?
|
|
58
|
+
e(this, f) && (!e(this, V) || this.hasAttribute("reload-source")) && i.isIntersecting && this.triggerLazyLoad(), i.isIntersecting ? X(this, "sourceCapture", { custom: !0 }) : (this.hasAttribute("reload-source") && T(this, _, K).call(this, void 0), X(this, "sourceRelease", { custom: !0 }));
|
|
59
59
|
});
|
|
60
60
|
s(this, q, () => {
|
|
61
|
-
e(this, h).set("loaded", !0), e(this, h).set("error", !1), e(this, h).set("loading", !1), !e(this, f) && !e(this, E) &&
|
|
61
|
+
e(this, h).set("loaded", !0), e(this, h).set("error", !1), e(this, h).set("loading", !1), !e(this, f) && !e(this, E) && ie.complete(e(this, R));
|
|
62
62
|
const t = getComputedStyle(this).getPropertyValue("--clear-duration");
|
|
63
|
-
t ?
|
|
63
|
+
t ? r(this, z, setTimeout(() => {
|
|
64
64
|
e(this, h).set("clear", !0);
|
|
65
|
-
}, parseFloat(t) * 1e3)) : e(this, h).set("clear", !0),
|
|
65
|
+
}, parseFloat(t) * 1e3)) : e(this, h).set("clear", !0), r(this, E, !0);
|
|
66
66
|
});
|
|
67
|
-
s(this,
|
|
68
|
-
e(this, h).set("loaded", !1), e(this, h).set("error", !0), e(this, h).set("loading", !1), !e(this, f) && !e(this, E) &&
|
|
67
|
+
s(this, J, (t) => {
|
|
68
|
+
e(this, h).set("loaded", !1), e(this, h).set("error", !0), e(this, h).set("loading", !1), !e(this, f) && !e(this, E) && ie.error(e(this, R)), r(this, E, !0);
|
|
69
69
|
});
|
|
70
|
-
|
|
71
|
-
e(this,
|
|
70
|
+
le && window.IntersectionObserver && (r(this, H, `source-consumer-${++we}`), r(this, U, new IntersectionObserver(
|
|
71
|
+
e(this, G)
|
|
72
72
|
)));
|
|
73
73
|
}
|
|
74
74
|
get consumerElement() {
|
|
@@ -87,94 +87,94 @@ class ee extends HTMLElement {
|
|
|
87
87
|
return e(this, v);
|
|
88
88
|
}
|
|
89
89
|
triggerLazyLoad() {
|
|
90
|
-
e(this, d).current && e(this, d).current !== e(this, d).previous && T(this, _,
|
|
90
|
+
e(this, d).current && e(this, d).current !== e(this, d).previous && T(this, _, K).call(this, e(this, d).current), r(this, V, !0);
|
|
91
91
|
}
|
|
92
92
|
connectedCallback() {
|
|
93
93
|
const t = this.getAttribute("srcset");
|
|
94
|
-
t && (
|
|
94
|
+
t && (r(this, o, this.createConsumer()), e(this, o).style.cssText = `
|
|
95
95
|
display: block;
|
|
96
96
|
width: 100%;
|
|
97
97
|
height: 100%;
|
|
98
98
|
`, e(this, o).classList.add("source-consumer"), Array.from(this.attributes).forEach((i) => {
|
|
99
99
|
if (i.name !== "srcset") {
|
|
100
|
-
const
|
|
101
|
-
b in e(this, o) && (e(this, o)[b] =
|
|
100
|
+
const c = i.nodeValue || "", b = be(i.name);
|
|
101
|
+
b in e(this, o) && (e(this, o)[b] = c || !0);
|
|
102
102
|
}
|
|
103
|
-
}), this.appendChild(e(this, o)),
|
|
103
|
+
}), this.appendChild(e(this, o)), r(this, d, new fe({
|
|
104
104
|
srcset: t
|
|
105
|
-
})),
|
|
106
|
-
(!e(this, f) || e(this, f) && e(this, V)) && T(this, _,
|
|
105
|
+
})), r(this, f, this.hasAttribute("lazy")), e(this, d).subscribe((i) => {
|
|
106
|
+
(!e(this, f) || e(this, f) && e(this, V)) && T(this, _, K).call(this, i.current);
|
|
107
107
|
}), e(this, U).observe(this), e(this, d).connect());
|
|
108
108
|
}
|
|
109
109
|
disconnectedCallback() {
|
|
110
110
|
e(this, U).disconnect(), e(this, d).close(), e(this, o).onloadeddata = null, e(this, o).onload = null, e(this, o).onerror = null, e(this, o).remove(), e(this, h).reset(), clearTimeout(e(this, z));
|
|
111
111
|
}
|
|
112
112
|
}
|
|
113
|
-
d = new WeakMap(), o = new WeakMap(), E = new WeakMap(), V = new WeakMap(), f = new WeakMap(), H = new WeakMap(), R = new WeakMap(), h = new WeakMap(), U = new WeakMap(), z = new WeakMap(), v = new WeakMap(), _ = new WeakSet(),
|
|
113
|
+
d = new WeakMap(), o = new WeakMap(), E = new WeakMap(), V = new WeakMap(), f = new WeakMap(), H = new WeakMap(), R = new WeakMap(), h = new WeakMap(), U = new WeakMap(), z = new WeakMap(), v = new WeakMap(), _ = new WeakSet(), K = function(t) {
|
|
114
114
|
if (clearTimeout(e(this, z)), e(this, o).onloadeddata = null, e(this, o).onload = null, e(this, o).onerror = null, e(this, h).set("loaded", !1), e(this, h).set("error", !1), e(this, h).set("loading", !1), e(this, h).set("clear", !1), t) {
|
|
115
|
-
|
|
115
|
+
r(this, R, `${e(this, H)}-${t.url}`);
|
|
116
116
|
const i = this.hasAttribute("keep-source-parameters");
|
|
117
|
-
e(this, h).set("loading", !0),
|
|
117
|
+
e(this, h).set("loading", !0), r(this, v, i ? t.url : t.name + t.extension), this.consumeSource(e(this, v)), !e(this, f) && !e(this, E) && ie.add(e(this, R)), e(this, o).onloadeddata = () => {
|
|
118
118
|
e(this, q).call(this);
|
|
119
119
|
}, e(this, o).onload = () => {
|
|
120
120
|
e(this, q).call(this);
|
|
121
121
|
}, e(this, o).onerror = () => {
|
|
122
|
-
e(this,
|
|
122
|
+
e(this, J).call(this, e(this, v));
|
|
123
123
|
};
|
|
124
124
|
} else
|
|
125
|
-
|
|
126
|
-
},
|
|
127
|
-
class
|
|
125
|
+
r(this, v, null), this.consumeSource(null);
|
|
126
|
+
}, G = new WeakMap(), q = new WeakMap(), J = new WeakMap();
|
|
127
|
+
class Le extends te {
|
|
128
128
|
createConsumer() {
|
|
129
129
|
return document.createElement("img");
|
|
130
130
|
}
|
|
131
|
-
consumeSource(
|
|
132
|
-
if (
|
|
133
|
-
const t =
|
|
131
|
+
consumeSource(n) {
|
|
132
|
+
if (n && this.hasAttribute("webp") && me.isWebp) {
|
|
133
|
+
const t = n.split(".").slice(0, -1).join(".") + ".webp";
|
|
134
134
|
this.consumerElement.src = t;
|
|
135
135
|
} else
|
|
136
|
-
this.consumerElement.src =
|
|
136
|
+
this.consumerElement.src = n || "";
|
|
137
137
|
}
|
|
138
138
|
}
|
|
139
|
-
customElements.get("e-image") || customElements.define("e-image",
|
|
140
|
-
function
|
|
141
|
-
const
|
|
142
|
-
if (
|
|
143
|
-
const t =
|
|
139
|
+
customElements.get("e-image") || customElements.define("e-image", Le);
|
|
140
|
+
function Ce(a) {
|
|
141
|
+
const n = a.match(/\{([\d-]+)\}/);
|
|
142
|
+
if (n) {
|
|
143
|
+
const t = n[1].split("-");
|
|
144
144
|
if (t.length === 2) {
|
|
145
|
-
const i = parseInt(t[0], 10),
|
|
146
|
-
return { start: i, end:
|
|
145
|
+
const i = parseInt(t[0], 10), c = parseInt(t[1], 10);
|
|
146
|
+
return { start: i, end: c };
|
|
147
147
|
}
|
|
148
148
|
}
|
|
149
149
|
return null;
|
|
150
150
|
}
|
|
151
151
|
var p, I, B, w, L, A, k, F, y, C;
|
|
152
|
-
class
|
|
152
|
+
class Se extends te {
|
|
153
153
|
constructor(t) {
|
|
154
154
|
super();
|
|
155
155
|
s(this, p, []);
|
|
156
|
-
s(this, I, new
|
|
156
|
+
s(this, I, new j(
|
|
157
157
|
this,
|
|
158
158
|
"--fit",
|
|
159
159
|
"contain"
|
|
160
160
|
));
|
|
161
|
-
s(this, B, new
|
|
162
|
-
s(this, w, new
|
|
163
|
-
s(this, L, new
|
|
161
|
+
s(this, B, new j(this, "--autoplay", !1));
|
|
162
|
+
s(this, w, new j(this, "--offset-x", 0.5));
|
|
163
|
+
s(this, L, new j(this, "--offset-y", 0.5));
|
|
164
164
|
s(this, A, null);
|
|
165
165
|
s(this, k, 0);
|
|
166
166
|
s(this, F, 1);
|
|
167
167
|
s(this, y, () => {
|
|
168
168
|
if (e(this, p).length) {
|
|
169
169
|
const t = e(this, p)[0];
|
|
170
|
-
e(this, I).current === "cover" ?
|
|
170
|
+
e(this, I).current === "cover" ? r(this, A, ge(
|
|
171
171
|
t.naturalWidth,
|
|
172
172
|
t.naturalHeight,
|
|
173
173
|
this.consumerElement.width,
|
|
174
174
|
this.consumerElement.height,
|
|
175
175
|
e(this, w).current,
|
|
176
176
|
e(this, L).current
|
|
177
|
-
)) :
|
|
177
|
+
)) : r(this, A, Ee(
|
|
178
178
|
t.naturalWidth,
|
|
179
179
|
t.naturalHeight,
|
|
180
180
|
this.consumerElement.width,
|
|
@@ -189,9 +189,9 @@ class Ce extends ee {
|
|
|
189
189
|
return;
|
|
190
190
|
t.detail.context.clearRect(0, 0, t.detail.width, t.detail.height);
|
|
191
191
|
const i = e(this, p)[e(this, k)];
|
|
192
|
-
i && t.detail.context.drawImage(i, ...e(this, A)), e(this, B).current &&
|
|
192
|
+
i && t.detail.context.drawImage(i, ...e(this, A)), e(this, B).current && r(this, k, (e(this, k) + 1) % e(this, p).length);
|
|
193
193
|
});
|
|
194
|
-
|
|
194
|
+
le && (r(this, F, parseInt(
|
|
195
195
|
((t == null ? void 0 : t.pad) || this.getAttribute("pad") || "1").toString()
|
|
196
196
|
)), e(this, I).subscribe(e(this, y)), e(this, w).subscribe(e(this, y)), e(this, L).subscribe(e(this, y)), this.addEventListener("sourceCapture", (i) => {
|
|
197
197
|
this.consumerElement.addEventListener(
|
|
@@ -206,36 +206,36 @@ class Ce extends ee {
|
|
|
206
206
|
}));
|
|
207
207
|
}
|
|
208
208
|
setProgress(t) {
|
|
209
|
-
e(this, p).length &&
|
|
209
|
+
e(this, p).length && r(this, k, Math.floor((e(this, p).length - 1) * t));
|
|
210
210
|
}
|
|
211
211
|
connectedCallback() {
|
|
212
|
-
super.connectedCallback(), e(this, B).observe(), e(this, I).observe(), e(this, w).observe(), e(this, L).observe(),
|
|
212
|
+
super.connectedCallback(), e(this, B).observe(), e(this, I).observe(), e(this, w).observe(), e(this, L).observe(), ue.subscribe(this, e(this, y));
|
|
213
213
|
}
|
|
214
214
|
disconnectedCallback() {
|
|
215
|
-
super.disconnectedCallback(), e(this, B).unobserve(), e(this, I).unobserve(), e(this, w).unobserve(), e(this, L).unobserve(),
|
|
215
|
+
super.disconnectedCallback(), e(this, B).unobserve(), e(this, I).unobserve(), e(this, w).unobserve(), e(this, L).unobserve(), r(this, p, []), ue.unsubscribe(e(this, y)), this.consumerElement.removeEventListener(
|
|
216
216
|
"canvasRender",
|
|
217
217
|
e(this, C)
|
|
218
218
|
);
|
|
219
219
|
}
|
|
220
220
|
createConsumer() {
|
|
221
|
-
return new
|
|
221
|
+
return new ve();
|
|
222
222
|
}
|
|
223
223
|
consumeSource(t) {
|
|
224
|
-
return
|
|
225
|
-
var i,
|
|
224
|
+
return ce(this, null, function* () {
|
|
225
|
+
var i, c, b, Y;
|
|
226
226
|
if (t) {
|
|
227
227
|
this.consumerElement.removeEventListener(
|
|
228
228
|
"canvasRender",
|
|
229
229
|
e(this, C)
|
|
230
230
|
);
|
|
231
|
-
const g = [], m =
|
|
231
|
+
const g = [], m = Ce(t);
|
|
232
232
|
if (m)
|
|
233
233
|
for (let l = m.start; l <= m.end; l++) {
|
|
234
|
-
const
|
|
234
|
+
const oe = t.replace(
|
|
235
235
|
/\{([^}]+)\}/,
|
|
236
236
|
l.toString().padStart(e(this, F), "0")
|
|
237
|
-
),
|
|
238
|
-
|
|
237
|
+
), D = new Image();
|
|
238
|
+
D.src = oe, g.push(D);
|
|
239
239
|
}
|
|
240
240
|
else {
|
|
241
241
|
const l = new Image();
|
|
@@ -243,45 +243,45 @@ class Ce extends ee {
|
|
|
243
243
|
}
|
|
244
244
|
try {
|
|
245
245
|
yield Promise.all(
|
|
246
|
-
g.map((l,
|
|
246
|
+
g.map((l, oe) => new Promise((D, de) => {
|
|
247
247
|
l.onload = () => {
|
|
248
|
-
|
|
249
|
-
}, l.onerror = (
|
|
250
|
-
|
|
248
|
+
D();
|
|
249
|
+
}, l.onerror = (Ie) => {
|
|
250
|
+
de(`${l.src} Image not found`);
|
|
251
251
|
};
|
|
252
252
|
}))
|
|
253
|
-
),
|
|
253
|
+
), r(this, p, g), e(this, y).call(this), (c = (i = this.consumerElement).onload) == null || c.call(i, new Event("load")), this.isLazy || this.consumerElement.addEventListener(
|
|
254
254
|
"canvasRender",
|
|
255
255
|
e(this, C)
|
|
256
256
|
);
|
|
257
257
|
} catch (l) {
|
|
258
|
-
console.error(l), (
|
|
258
|
+
console.error(l), (Y = (b = this.consumerElement).onerror) == null || Y.call(b, new Event("error"));
|
|
259
259
|
}
|
|
260
260
|
}
|
|
261
261
|
});
|
|
262
262
|
}
|
|
263
263
|
}
|
|
264
264
|
p = new WeakMap(), I = new WeakMap(), B = new WeakMap(), w = new WeakMap(), L = new WeakMap(), A = new WeakMap(), k = new WeakMap(), F = new WeakMap(), y = new WeakMap(), C = new WeakMap();
|
|
265
|
-
customElements.get("e-sequence") || customElements.define("e-sequence",
|
|
265
|
+
customElements.get("e-sequence") || customElements.define("e-sequence", Se);
|
|
266
266
|
var P, M;
|
|
267
|
-
class
|
|
267
|
+
class Re extends te {
|
|
268
268
|
constructor() {
|
|
269
269
|
super(...arguments);
|
|
270
270
|
s(this, P, 0);
|
|
271
271
|
s(this, M, () => {
|
|
272
272
|
this.classList.add(`state-${this.consumerElement.readyState}`);
|
|
273
273
|
const t = this.consumerElement.readyState / 4;
|
|
274
|
-
t > e(this, P) &&
|
|
274
|
+
t > e(this, P) && r(this, P, t), X(this, "videoReadyStateChange", {
|
|
275
275
|
detail: {
|
|
276
276
|
readyState: this.consumerElement.readyState,
|
|
277
277
|
progress: e(this, P)
|
|
278
278
|
}
|
|
279
|
-
}), this.consumerElement.readyState === 4 &&
|
|
279
|
+
}), this.consumerElement.readyState === 4 && re.unsubscribe(e(this, M));
|
|
280
280
|
});
|
|
281
281
|
}
|
|
282
282
|
connectedCallback() {
|
|
283
283
|
super.connectedCallback(), this.addEventListener("sourceCapture", () => {
|
|
284
|
-
|
|
284
|
+
re.subscribe(e(this, M)), this.hasAttribute("capture-autoplay") && this.consumerElement.play();
|
|
285
285
|
}), this.addEventListener("sourceRelease", () => {
|
|
286
286
|
this.hasAttribute("capture-autoplay") && (this.consumerElement.pause(), this.hasAttribute("replay") && (this.consumerElement.currentTime = 0)), this.hasAttribute("reload-source") && this.classList.remove(
|
|
287
287
|
"state-0",
|
|
@@ -293,7 +293,7 @@ class Se extends ee {
|
|
|
293
293
|
});
|
|
294
294
|
}
|
|
295
295
|
disconnectedCallback() {
|
|
296
|
-
super.disconnectedCallback(),
|
|
296
|
+
super.disconnectedCallback(), re.unsubscribe(e(this, M)), r(this, P, 0);
|
|
297
297
|
}
|
|
298
298
|
createConsumer() {
|
|
299
299
|
return document.createElement("video");
|
|
@@ -303,43 +303,44 @@ class Se extends ee {
|
|
|
303
303
|
}
|
|
304
304
|
}
|
|
305
305
|
P = new WeakMap(), M = new WeakMap();
|
|
306
|
-
customElements.get("e-video") || customElements.define("e-video",
|
|
307
|
-
var
|
|
308
|
-
const x = class x extends
|
|
306
|
+
customElements.get("e-video") || customElements.define("e-video", Re);
|
|
307
|
+
var u, W, S, N, $, Q, Z, ee, O, ae;
|
|
308
|
+
const x = class x extends te {
|
|
309
309
|
constructor() {
|
|
310
310
|
super();
|
|
311
|
-
s(this,
|
|
312
|
-
s(this,
|
|
311
|
+
s(this, O);
|
|
312
|
+
s(this, u);
|
|
313
313
|
s(this, W);
|
|
314
314
|
s(this, S, !1);
|
|
315
|
+
s(this, N, !1);
|
|
315
316
|
s(this, $, () => {
|
|
316
|
-
|
|
317
|
+
r(this, S, e(this, S) || this.hasAttribute("autoplay") && !this.hasAttribute("capture-autoplay")), r(this, u, new window.YT.Player(e(this, W), {
|
|
317
318
|
playerVars: {
|
|
318
319
|
mute: this.hasAttribute("muted") ? 1 : 0,
|
|
319
320
|
controls: this.hasAttribute("controls") ? 1 : 0
|
|
320
321
|
},
|
|
321
322
|
events: {
|
|
322
|
-
onReady: e(this,
|
|
323
|
-
onError: e(this,
|
|
324
|
-
onStateChange: e(this,
|
|
323
|
+
onReady: e(this, Q),
|
|
324
|
+
onError: e(this, Z),
|
|
325
|
+
onStateChange: e(this, ee)
|
|
325
326
|
}
|
|
326
327
|
}));
|
|
327
328
|
});
|
|
328
|
-
s(this,
|
|
329
|
-
|
|
329
|
+
s(this, Q, () => {
|
|
330
|
+
r(this, N, !0), T(this, O, ae).call(this);
|
|
330
331
|
});
|
|
331
|
-
s(this,
|
|
332
|
-
var i,
|
|
333
|
-
console.error("YouTube: Ошибка при загрузке видео:", this.currentURL, t), (
|
|
332
|
+
s(this, Z, (t) => {
|
|
333
|
+
var i, c;
|
|
334
|
+
console.error("YouTube: Ошибка при загрузке видео:", this.currentURL, t), (c = (i = this.consumerElement).onerror) == null || c.call(i, new Event("error"));
|
|
334
335
|
});
|
|
335
|
-
s(this,
|
|
336
|
+
s(this, ee, () => {
|
|
336
337
|
});
|
|
337
|
-
|
|
338
|
-
x.__apiReady = !0,
|
|
338
|
+
r(this, W, "yt-" + ye(10)), x.__apiReady || (window.onYouTubeIframeAPIReady = () => {
|
|
339
|
+
x.__apiReady = !0, X(window, "youTubeIframeAPIReady");
|
|
339
340
|
}), this.addEventListener("sourceCapture", () => {
|
|
340
|
-
this.hasAttribute("capture-autoplay") && (e(this,
|
|
341
|
+
this.hasAttribute("capture-autoplay") && (e(this, N) ? e(this, u).playVideo() : r(this, S, !0));
|
|
341
342
|
}), this.addEventListener("sourceRelease", () => {
|
|
342
|
-
e(this,
|
|
343
|
+
e(this, u) && this.hasAttribute("capture-autoplay") && (e(this, u).pauseVideo(), this.hasAttribute("replay") && e(this, u).seekTo(0));
|
|
343
344
|
});
|
|
344
345
|
}
|
|
345
346
|
static __onYouTubeIframeAPIReady() {
|
|
@@ -353,28 +354,28 @@ const x = class x extends ee {
|
|
|
353
354
|
var i;
|
|
354
355
|
if (t) {
|
|
355
356
|
if (!document.getElementById("youtube-script")) {
|
|
356
|
-
const
|
|
357
|
-
|
|
357
|
+
const c = document.createElement("script");
|
|
358
|
+
c.id, c.src = "https://www.youtube.com/iframe_api";
|
|
358
359
|
const b = document.getElementsByTagName("script")[0];
|
|
359
|
-
(i = b.parentNode) == null || i.insertBefore(
|
|
360
|
+
(i = b.parentNode) == null || i.insertBefore(c, b);
|
|
360
361
|
}
|
|
361
|
-
e(this,
|
|
362
|
-
} else e(this,
|
|
362
|
+
e(this, u) ? T(this, O, ae).call(this) : x.__apiReady ? e(this, $).call(this) : addEventListener("youTubeIframeAPIReady", e(this, $));
|
|
363
|
+
} else e(this, u) && e(this, u).stopVideo();
|
|
363
364
|
}
|
|
364
365
|
disconnectedCallback() {
|
|
365
|
-
super.disconnectedCallback(), e(this,
|
|
366
|
+
super.disconnectedCallback(), e(this, u) && e(this, u).destroy(), removeEventListener("youTubeIframeAPIReady", e(this, $));
|
|
366
367
|
}
|
|
367
368
|
};
|
|
368
|
-
|
|
369
|
+
u = new WeakMap(), W = new WeakMap(), S = new WeakMap(), N = new WeakMap(), $ = new WeakMap(), Q = new WeakMap(), Z = new WeakMap(), ee = new WeakMap(), O = new WeakSet(), ae = function() {
|
|
369
370
|
var t, i;
|
|
370
|
-
this.currentURL && (this.currentURL.startsWith("http") ? e(this,
|
|
371
|
+
this.currentURL && (this.currentURL.startsWith("http") ? e(this, u).loadVideoByUrl(this.currentURL) : e(this, u).loadVideoById(this.currentURL)), e(this, S) ? e(this, u).playVideo() : e(this, u).stopVideo(), r(this, S, !1), (i = (t = this.consumerElement).onload) == null || i.call(t, new Event("load"));
|
|
371
372
|
}, x.__apiReady = !1;
|
|
372
|
-
let
|
|
373
|
-
customElements.get("e-youtube") || customElements.define("e-youtube",
|
|
373
|
+
let ne = x;
|
|
374
|
+
customElements.get("e-youtube") || customElements.define("e-youtube", ne);
|
|
374
375
|
export {
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
376
|
+
Le as ImageElement,
|
|
377
|
+
Se as SequenceElement,
|
|
378
|
+
te as SourceElement,
|
|
379
|
+
Re as VideoElement,
|
|
380
|
+
ne as YouTubeElement
|
|
380
381
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";var bt=r=>{throw TypeError(r)};var Ge=(r,s,t)=>s.has(r)||bt("Cannot "+t);var e=(r,s,t)=>(Ge(r,s,"read from private field"),t?t.call(r):s.get(r)),o=(r,s,t)=>s.has(r)?bt("Cannot add the same private member more than once"):s instanceof WeakSet?s.add(r):s.set(r,t),c=(r,s,t,i)=>(Ge(r,s,"write to private field"),i?i.call(r,t):s.set(r,t),t),l=(r,s,t)=>(Ge(r,s,"access private method"),t);const U=require("../browser-CpzFX2xg.cjs"),m=require("../Store-CDb6RMce.cjs"),Yt=require("../file-EevnUtRj.cjs"),Gt=require("../function-MthRj-GJ.cjs"),St=require("../gestures-DHLrn6Q8.cjs");require("../ticker/vanilla/index.cjs");const pe=require("../string-DhgS_iFl.cjs"),vt=require("../object-CCiXnER2.cjs"),Ut=require("../connector/index.cjs"),Xt=require("../device/index.cjs"),Qt=require("../math-GDWEqu7y.cjs"),Ue=require("../polyfills-BANSrI_m.cjs"),yt=require("../element-resizer/vanilla/index.cjs"),jt=require("../style-At6aDoqG.cjs"),es=new Set(["animate","animateMotion","animateTransform","circle","clipPath","defs","desc","ellipse","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","foreignObject","g","image","line","linearGradient","listener","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialGradient","rect","set","solidColor","stop","svg","switch","symbol","text","textPath","title","tspan","view","use"]);var d,$,y,we,I,H,a,kt,Et,xt,Xe,Qe,Ct,Tt,Lt,zt,je,et,Rt,tt,st,Mt,it,qe,nt,ot,rt,Ke,Oe;const Ze=class Ze{constructor(...s){o(this,a);o(this,d,null);o(this,$,new Set);o(this,y,new Set);o(this,we);o(this,I);o(this,H);o(this,Ke,s=>{e(this,$).forEach(t=>{t(s)}),e(this,$).clear()});o(this,Oe,(s,t)=>{e(this,y).forEach(i=>{i(s,t)}),e(this,y).clear(),l(this,a,st).call(this)});if(U.isBrowser){const t=s[0],i=s[1];c(this,d,l(this,a,kt).call(this,t,i==null?void 0:i.forceSvg)),l(this,a,xt).call(this,i)}}get node(){return e(this,d)}set node(s){var t;l(this,a,st).call(this),c(this,d,s),(t=e(this,we))==null||t.call(this),e(this,d)instanceof Element&&c(this,I,[...e(this,d).querySelectorAll("store-root")]),l(this,a,tt).call(this),l(this,a,Xe).call(this)}};d=new WeakMap,$=new WeakMap,y=new WeakMap,we=new WeakMap,I=new WeakMap,H=new WeakMap,a=new WeakSet,kt=function(s,t){let i=null;if(s instanceof Node)i=s;else if(typeof s=="string")if(!s.includes("<")&&s.includes("-"))i=new(customElements.get(s));else if(s.includes("<")){const n=document.createElement("div");n.innerHTML=s,i=n.firstElementChild}else es.has(s)||t?i=document.createElementNS("http://www.w3.org/2000/svg",s):i=document.createElement(s);else i=document.createElement("div");return i},Et=function(s){return s instanceof HTMLElement||s instanceof SVGElement},xt=function(s){if(!s)return;const t=l(this,a,Et).call(this,e(this,d)),i=s.ref;delete s.ref,s!=null&&s.onConnect&&(e(this,$).add(s.onConnect),delete s.onConnect),s!=null&&s.onDisconnect&&(e(this,y).add(s.onDisconnect),delete s.onDisconnect);let n,h;for(const u in s){const g=s[u];u==="class"&&t?l(this,a,Qe).call(this,g):u==="style"&&t?l(this,a,Lt).call(this,g):u==="lightChildren"?l(this,a,qe).call(this,e(this,d),g):u==="children"?l(this,a,qe).call(this,e(this,d)instanceof Element?e(this,d).shadowRoot||e(this,d):e(this,d),g):u==="connectedClass"?e(this,$).add(()=>{requestAnimationFrame(()=>{e(this,d).classList.add(typeof g=="boolean"?"connected":g)})}):u.startsWith("on")?(h||(h={}),h[u]=g):(n||(n={}),n[u]=g)}l(this,a,Mt).call(this,n),l(this,a,Rt).call(this,h),i&&(typeof i=="function"?i(e(this,d)):i.current=e(this,d)),l(this,a,Xe).call(this)},Xe=function(){if(U.isBrowser&&(e(this,y).size||e(this,$).size)){const s=e(this,d)instanceof DocumentFragment?e(this,d).firstChild:e(this,d);c(this,we,Ut.connector.subscribe(s,{connectCallback:e(this,Ke),disconnectCallback:e(this,Oe),unsubscribeAfterDisconnect:!0,maxWaitSec:20}))}},Qe=function(s){if(s){if(typeof s=="string")e(this,d).classList.add(s);else if(Array.isArray(s))s.forEach(t=>{t&&l(this,a,Qe).call(this,t)});else if(typeof s=="object")if(s instanceof m.Store)l(this,a,Ct).call(this,s);else for(const t in s){const i=s[t];i instanceof m.Store?l(this,a,Tt).call(this,t,i):i?e(this,d).classList.add(t):e(this,d).classList.remove(t)}}else return},Ct=function(s){e(this,y).add(s.subscribe(({current:t,previous:i})=>{i&&[i].flat().forEach(n=>{n&&e(this,d).classList.remove(n)}),t&&[t].flat().forEach(n=>{n&&e(this,d).classList.add(n)})}))},Tt=function(s,t){e(this,y).add(t.subscribe(({current:i})=>{i?e(this,d).classList.add(s):e(this,d).classList.remove(s)}))},Lt=function(s){if(!s)return;e(this,d).tagName==="style"||e(this,d).tagName==="STYLE"?l(this,a,je).call(this,s):l(this,a,zt).call(this,s)},zt=function(s){for(const t in s){const i=t,n=s[i];n instanceof m.Store?e(this,y).add(n.subscribe(({current:h})=>{l(this,a,et).call(this,i,h)})):l(this,a,et).call(this,i,n)}},je=function(s){for(const t in s){const i=s[t];if(typeof i=="object"&&!(i instanceof m.Store))e(this,d).appendChild(document.createTextNode(`${t} {`)),l(this,a,je).call(this,i),e(this,d).appendChild(document.createTextNode("}"));else if(i instanceof m.Store){const n=document.createTextNode("");e(this,y).add(i.subscribe(h=>{h.current?n.nodeValue=`${pe.camelToKebab(t)}: ${h.current};`:n.nodeValue=""})),e(this,d).appendChild(n)}else e(this,d).appendChild(document.createTextNode(`${pe.camelToKebab(t)}: ${i};`))}},et=function(s,t){s.includes("--")?t?e(this,d).style.setProperty(s,t.toString()):e(this,d).style.removeProperty(s):t?e(this,d).style[s]=t.toString():e(this,d).style[s]=""},Rt=function(s){if(s){e(this,H)||c(this,H,[]);for(const t in s){const i=t,n=pe.uncapitalize(i.split("on").slice(1).join("on")),h=s[i];typeof h=="object"?e(this,H).push({name:n,callback:h.callback,options:h.options}):typeof h=="function"&&e(this,H).push({name:n,callback:h})}l(this,a,tt).call(this)}},tt=function(){var s;(s=e(this,H))==null||s.forEach(t=>{e(this,d).addEventListener(t.name,t.callback,t.options)})},st=function(){var s;(s=e(this,H))==null||s.forEach(t=>{e(this,d).removeEventListener(t.name,t.callback,t.options)})},Mt=function(s){for(const t in s){const i=s[t];i instanceof m.Store?e(this,y).add(i.subscribe(({current:n})=>{l(this,a,it).call(this,t,n)})):l(this,a,it).call(this,t,i)}},it=function(s,t){var n,h;const i=e(this,d);if(s in i&&!((h=(n=i.constructor)==null?void 0:n.observedAttributes)!=null&&h.includes(s)))t!=null&&(i[s]=t.toString());else if(t!=null){const u=t.toString();s.includes("xlink")?i.setAttributeNS("http://www.w3.org/1999/xlink",s,u):i.setAttribute(s,u)}},qe=function(s,t){t&&(t=[t].flat(),t.forEach(i=>{if(i instanceof m.Store){const n=document.createElement("div");n.style.display="contents",s.appendChild(n),e(this,I)||c(this,I,[]);const h=e(this,I).length;n.setAttribute("store-root",""),e(this,I).push(n),e(this,y).add(i.subscribe(({current:u,previous:g})=>{const k=e(this,I)[h];k.dispatchEvent(new CustomEvent("beforeChildrenChange",{bubbles:!0,composed:!0}));const T=Array.from(k.childNodes),v=Array.isArray(u)?u:[u],ge=Array.isArray(g)?g:[g],Ve=[],x=[];T.length&&ge.forEach((N,P)=>{v.includes(N)?x.push(N):Ve.push(T[P])}),v.forEach((N,P)=>{if(x[P]!=null){if(N!==x[P]){const q=l(this,a,ot).call(this,N),O=T[P];q instanceof Node&&!O.isEqualNode(q)?k.replaceChild(q,O):k.removeChild(O)}}else{const q=l(this,a,ot).call(this,N);q instanceof Node&&n.appendChild(q)}}),Ve.forEach(N=>{k.removeChild(N)}),k.dispatchEvent(new CustomEvent("afterChildrenChange",{bubbles:!0,composed:!0}))}))}else if(i instanceof Ze)l(this,a,nt).call(this,s,i.node);else if(i instanceof Function)l(this,a,qe).call(this,s,vt.isESClass(i)?new i:i());else{const n=l(this,a,rt).call(this,i);n instanceof Node&&l(this,a,nt).call(this,s,n)}}))},nt=function(s,t){!(s instanceof ShadowRoot)&&t instanceof HTMLElement&&t.tagName==="STYLE"?(e(this,$).add(()=>{[...document.head.querySelectorAll("style")].find(n=>n.outerHTML===t.outerHTML)||document.head.appendChild(t)}),e(this,y).add(()=>{t.remove()})):s.appendChild(t)},ot=function(s){return s instanceof Ze?s.node:typeof s=="function"?vt.isESClass(s)?new s:s():l(this,a,rt).call(this,s)},rt=function(s){if(s instanceof Node)return s;if(s!=null){const t=String(s);if(t.trim().startsWith("<")&&t.trim().endsWith(">")){const i=document.createElement("div");return i.innerHTML=t,i.firstElementChild}else return document.createTextNode(t)}else return},Ke=new WeakMap,Oe=new WeakMap;let A=Ze;function p(...r){return new A(...r)}function ts(r){return new A("a",r)}function Q(r){return new A("button",r)}function b(r){return new A("div",r)}function De(r){return new A("input",r)}function At(r){return new A("label",r)}function ue(r){return new A("slot",r)}function at(r){return new A("span",r)}function Nt(r){return new A("style",{style:r})}function E(r){const s=new CSSStyleSheet;return s.replaceSync(Nt(r).node.innerHTML),s}function ss(r,s){const t=s==null?void 0:s.prefix,i={style:{}};for(const n in r)i[n]={var:`var(--${t}${pe.camelToKebab(n)})`,value:r[n]},i.style[`--${t}${pe.camelToKebab(n)}`]=r[n];return i}const f=ss({colorMain:"#1c1c1c",colorMainAux:"#282828",colorFont:"#ffffff",colorActive:"#00E5B0",borderRadius:"12px",borderRadiusSmall:"4px"},{prefix:"aptechka-"});if(U.isBrowser){const r=Nt({":root":f.style}).node;r.setAttribute("data-permanent",""),document.head.appendChild(r)}const Ft='<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24"><path fill-rule="evenodd" d="M20.536 3.464C19.07 2 16.714 2 12 2C7.286 2 4.929 2 3.464 3.464C2 4.93 2 7.286 2 12c0 4.714 0 7.071 1.464 8.535C4.93 22 7.286 22 12 22c4.714 0 7.071 0 8.535-1.465C22 19.072 22 16.714 22 12s0-7.071-1.465-8.536M16.75 12a.75.75 0 0 1-.75.75H9.81l1.72 1.72a.75.75 0 1 1-1.06 1.06l-3-3a.75.75 0 0 1 0-1.06l3-3a.75.75 0 1 1 1.06 1.06l-1.72 1.72H16a.75.75 0 0 1 .75.75" clip-rule="evenodd"/></svg>',Pt='<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24"><path d="M15.24 2h-3.894c-1.764 0-3.162 0-4.255.148c-1.126.152-2.037.472-2.755 1.193c-.719.721-1.038 1.636-1.189 2.766C3 7.205 3 8.608 3 10.379v5.838c0 1.508.92 2.8 2.227 3.342c-.067-.91-.067-2.185-.067-3.247v-5.01c0-1.281 0-2.386.118-3.27c.127-.948.413-1.856 1.147-2.593c.734-.737 1.639-1.024 2.583-1.152c.88-.118 1.98-.118 3.257-.118h3.07c1.276 0 2.374 0 3.255.118A3.601 3.601 0 0 0 15.24 2Z"/><path d="M6.6 11.397c0-2.726 0-4.089.844-4.936c.843-.847 2.2-.847 4.916-.847h2.88c2.715 0 4.073 0 4.917.847c.843.847.843 2.21.843 4.936v4.82c0 2.726 0 4.089-.843 4.936c-.844.847-2.202.847-4.917.847h-2.88c-2.715 0-4.073 0-4.916-.847c-.844-.847-.844-2.21-.844-4.936v-4.82Z"/></svg>',is='<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24"><path fill-rule="evenodd" d="M2 12c0-4.714 0-7.071 1.464-8.536C4.93 2 7.286 2 12 2c4.714 0 7.071 0 8.535 1.464C22 4.93 22 7.286 22 12c0 4.714 0 7.071-1.465 8.535C19.072 22 16.714 22 12 22s-7.071 0-8.536-1.465C2 19.072 2 16.714 2 12Zm10-5.75a.75.75 0 0 1 .75.75v5.19l1.72-1.72a.75.75 0 1 1 1.06 1.06l-3 3a.75.75 0 0 1-1.06 0l-3-3a.75.75 0 1 1 1.06-1.06l1.72 1.72V7a.75.75 0 0 1 .75-.75Zm-4 10a.75.75 0 0 0 0 1.5h8a.75.75 0 0 0 0-1.5H8Z" clip-rule="evenodd"/></svg>',ns='<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24"><path fill-rule="evenodd" d="M2 12c0-4.714 0-7.071 1.464-8.536C4.93 2 7.286 2 12 2c4.714 0 7.071 0 8.535 1.464C22 4.93 22 7.286 22 12c0 4.714 0 7.071-1.465 8.535C19.072 22 16.714 22 12 22s-7.071 0-8.536-1.465C2 19.072 2 16.714 2 12Zm10 5.75a.75.75 0 0 0 .75-.75v-5.19l1.72 1.72a.75.75 0 1 0 1.06-1.06l-3-3a.75.75 0 0 0-1.06 0l-3 3a.75.75 0 1 0 1.06 1.06l1.72-1.72V17c0 .414.336.75.75.75Zm-4-10a.75.75 0 0 1 0-1.5h8a.75.75 0 0 1 0 1.5H8Z" clip-rule="evenodd"/></svg>',$t=`<svg
|
|
1
|
+
"use strict";var bt=r=>{throw TypeError(r)};var Ge=(r,s,t)=>s.has(r)||bt("Cannot "+t);var e=(r,s,t)=>(Ge(r,s,"read from private field"),t?t.call(r):s.get(r)),o=(r,s,t)=>s.has(r)?bt("Cannot add the same private member more than once"):s instanceof WeakSet?s.add(r):s.set(r,t),c=(r,s,t,i)=>(Ge(r,s,"write to private field"),i?i.call(r,t):s.set(r,t),t),l=(r,s,t)=>(Ge(r,s,"access private method"),t);const U=require("../browser-CpzFX2xg.cjs"),m=require("../Store-CDb6RMce.cjs"),Yt=require("../file-DSpfWdd9.cjs"),Gt=require("../function-MthRj-GJ.cjs"),St=require("../gestures-DHLrn6Q8.cjs");require("../ticker/vanilla/index.cjs");const pe=require("../string-DhgS_iFl.cjs"),vt=require("../object-CCiXnER2.cjs"),Ut=require("../connector/index.cjs"),Xt=require("../device/index.cjs"),Qt=require("../math-GDWEqu7y.cjs"),Ue=require("../polyfills-BANSrI_m.cjs"),yt=require("../element-resizer/vanilla/index.cjs"),jt=require("../style-At6aDoqG.cjs"),es=new Set(["animate","animateMotion","animateTransform","circle","clipPath","defs","desc","ellipse","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","foreignObject","g","image","line","linearGradient","listener","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialGradient","rect","set","solidColor","stop","svg","switch","symbol","text","textPath","title","tspan","view","use"]);var d,$,y,we,I,H,a,kt,Et,xt,Xe,Qe,Ct,Tt,Lt,zt,je,et,Rt,tt,st,Mt,it,qe,nt,ot,rt,Ke,Oe;const Ze=class Ze{constructor(...s){o(this,a);o(this,d,null);o(this,$,new Set);o(this,y,new Set);o(this,we);o(this,I);o(this,H);o(this,Ke,s=>{e(this,$).forEach(t=>{t(s)}),e(this,$).clear()});o(this,Oe,(s,t)=>{e(this,y).forEach(i=>{i(s,t)}),e(this,y).clear(),l(this,a,st).call(this)});if(U.isBrowser){const t=s[0],i=s[1];c(this,d,l(this,a,kt).call(this,t,i==null?void 0:i.forceSvg)),l(this,a,xt).call(this,i)}}get node(){return e(this,d)}set node(s){var t;l(this,a,st).call(this),c(this,d,s),(t=e(this,we))==null||t.call(this),e(this,d)instanceof Element&&c(this,I,[...e(this,d).querySelectorAll("store-root")]),l(this,a,tt).call(this),l(this,a,Xe).call(this)}};d=new WeakMap,$=new WeakMap,y=new WeakMap,we=new WeakMap,I=new WeakMap,H=new WeakMap,a=new WeakSet,kt=function(s,t){let i=null;if(s instanceof Node)i=s;else if(typeof s=="string")if(!s.includes("<")&&s.includes("-"))i=new(customElements.get(s));else if(s.includes("<")){const n=document.createElement("div");n.innerHTML=s,i=n.firstElementChild}else es.has(s)||t?i=document.createElementNS("http://www.w3.org/2000/svg",s):i=document.createElement(s);else i=document.createElement("div");return i},Et=function(s){return s instanceof HTMLElement||s instanceof SVGElement},xt=function(s){if(!s)return;const t=l(this,a,Et).call(this,e(this,d)),i=s.ref;delete s.ref,s!=null&&s.onConnect&&(e(this,$).add(s.onConnect),delete s.onConnect),s!=null&&s.onDisconnect&&(e(this,y).add(s.onDisconnect),delete s.onDisconnect);let n,h;for(const u in s){const g=s[u];u==="class"&&t?l(this,a,Qe).call(this,g):u==="style"&&t?l(this,a,Lt).call(this,g):u==="lightChildren"?l(this,a,qe).call(this,e(this,d),g):u==="children"?l(this,a,qe).call(this,e(this,d)instanceof Element?e(this,d).shadowRoot||e(this,d):e(this,d),g):u==="connectedClass"?e(this,$).add(()=>{requestAnimationFrame(()=>{e(this,d).classList.add(typeof g=="boolean"?"connected":g)})}):u.startsWith("on")?(h||(h={}),h[u]=g):(n||(n={}),n[u]=g)}l(this,a,Mt).call(this,n),l(this,a,Rt).call(this,h),i&&(typeof i=="function"?i(e(this,d)):i.current=e(this,d)),l(this,a,Xe).call(this)},Xe=function(){if(U.isBrowser&&(e(this,y).size||e(this,$).size)){const s=e(this,d)instanceof DocumentFragment?e(this,d).firstChild:e(this,d);c(this,we,Ut.connector.subscribe(s,{connectCallback:e(this,Ke),disconnectCallback:e(this,Oe),unsubscribeAfterDisconnect:!0,maxWaitSec:20}))}},Qe=function(s){if(s){if(typeof s=="string")e(this,d).classList.add(s);else if(Array.isArray(s))s.forEach(t=>{t&&l(this,a,Qe).call(this,t)});else if(typeof s=="object")if(s instanceof m.Store)l(this,a,Ct).call(this,s);else for(const t in s){const i=s[t];i instanceof m.Store?l(this,a,Tt).call(this,t,i):i?e(this,d).classList.add(t):e(this,d).classList.remove(t)}}else return},Ct=function(s){e(this,y).add(s.subscribe(({current:t,previous:i})=>{i&&[i].flat().forEach(n=>{n&&e(this,d).classList.remove(n)}),t&&[t].flat().forEach(n=>{n&&e(this,d).classList.add(n)})}))},Tt=function(s,t){e(this,y).add(t.subscribe(({current:i})=>{i?e(this,d).classList.add(s):e(this,d).classList.remove(s)}))},Lt=function(s){if(!s)return;e(this,d).tagName==="style"||e(this,d).tagName==="STYLE"?l(this,a,je).call(this,s):l(this,a,zt).call(this,s)},zt=function(s){for(const t in s){const i=t,n=s[i];n instanceof m.Store?e(this,y).add(n.subscribe(({current:h})=>{l(this,a,et).call(this,i,h)})):l(this,a,et).call(this,i,n)}},je=function(s){for(const t in s){const i=s[t];if(typeof i=="object"&&!(i instanceof m.Store))e(this,d).appendChild(document.createTextNode(`${t} {`)),l(this,a,je).call(this,i),e(this,d).appendChild(document.createTextNode("}"));else if(i instanceof m.Store){const n=document.createTextNode("");e(this,y).add(i.subscribe(h=>{h.current?n.nodeValue=`${pe.camelToKebab(t)}: ${h.current};`:n.nodeValue=""})),e(this,d).appendChild(n)}else e(this,d).appendChild(document.createTextNode(`${pe.camelToKebab(t)}: ${i};`))}},et=function(s,t){s.includes("--")?t?e(this,d).style.setProperty(s,t.toString()):e(this,d).style.removeProperty(s):t?e(this,d).style[s]=t.toString():e(this,d).style[s]=""},Rt=function(s){if(s){e(this,H)||c(this,H,[]);for(const t in s){const i=t,n=pe.uncapitalize(i.split("on").slice(1).join("on")),h=s[i];typeof h=="object"?e(this,H).push({name:n,callback:h.callback,options:h.options}):typeof h=="function"&&e(this,H).push({name:n,callback:h})}l(this,a,tt).call(this)}},tt=function(){var s;(s=e(this,H))==null||s.forEach(t=>{e(this,d).addEventListener(t.name,t.callback,t.options)})},st=function(){var s;(s=e(this,H))==null||s.forEach(t=>{e(this,d).removeEventListener(t.name,t.callback,t.options)})},Mt=function(s){for(const t in s){const i=s[t];i instanceof m.Store?e(this,y).add(i.subscribe(({current:n})=>{l(this,a,it).call(this,t,n)})):l(this,a,it).call(this,t,i)}},it=function(s,t){var n,h;const i=e(this,d);if(s in i&&!((h=(n=i.constructor)==null?void 0:n.observedAttributes)!=null&&h.includes(s)))t!=null&&(i[s]=t.toString());else if(t!=null){const u=t.toString();s.includes("xlink")?i.setAttributeNS("http://www.w3.org/1999/xlink",s,u):i.setAttribute(s,u)}},qe=function(s,t){t&&(t=[t].flat(),t.forEach(i=>{if(i instanceof m.Store){const n=document.createElement("div");n.style.display="contents",s.appendChild(n),e(this,I)||c(this,I,[]);const h=e(this,I).length;n.setAttribute("store-root",""),e(this,I).push(n),e(this,y).add(i.subscribe(({current:u,previous:g})=>{const k=e(this,I)[h];k.dispatchEvent(new CustomEvent("beforeChildrenChange",{bubbles:!0,composed:!0}));const T=Array.from(k.childNodes),v=Array.isArray(u)?u:[u],ge=Array.isArray(g)?g:[g],Ve=[],x=[];T.length&&ge.forEach((N,P)=>{v.includes(N)?x.push(N):Ve.push(T[P])}),v.forEach((N,P)=>{if(x[P]!=null){if(N!==x[P]){const q=l(this,a,ot).call(this,N),O=T[P];q instanceof Node&&!O.isEqualNode(q)?k.replaceChild(q,O):k.removeChild(O)}}else{const q=l(this,a,ot).call(this,N);q instanceof Node&&n.appendChild(q)}}),Ve.forEach(N=>{k.removeChild(N)}),k.dispatchEvent(new CustomEvent("afterChildrenChange",{bubbles:!0,composed:!0}))}))}else if(i instanceof Ze)l(this,a,nt).call(this,s,i.node);else if(i instanceof Function)l(this,a,qe).call(this,s,vt.isESClass(i)?new i:i());else{const n=l(this,a,rt).call(this,i);n instanceof Node&&l(this,a,nt).call(this,s,n)}}))},nt=function(s,t){!(s instanceof ShadowRoot)&&t instanceof HTMLElement&&t.tagName==="STYLE"?(e(this,$).add(()=>{[...document.head.querySelectorAll("style")].find(n=>n.outerHTML===t.outerHTML)||document.head.appendChild(t)}),e(this,y).add(()=>{t.remove()})):s.appendChild(t)},ot=function(s){return s instanceof Ze?s.node:typeof s=="function"?vt.isESClass(s)?new s:s():l(this,a,rt).call(this,s)},rt=function(s){if(s instanceof Node)return s;if(s!=null){const t=String(s);if(t.trim().startsWith("<")&&t.trim().endsWith(">")){const i=document.createElement("div");return i.innerHTML=t,i.firstElementChild}else return document.createTextNode(t)}else return},Ke=new WeakMap,Oe=new WeakMap;let A=Ze;function p(...r){return new A(...r)}function ts(r){return new A("a",r)}function Q(r){return new A("button",r)}function b(r){return new A("div",r)}function De(r){return new A("input",r)}function At(r){return new A("label",r)}function ue(r){return new A("slot",r)}function at(r){return new A("span",r)}function Nt(r){return new A("style",{style:r})}function E(r){const s=new CSSStyleSheet;return s.replaceSync(Nt(r).node.innerHTML),s}function ss(r,s){const t=s==null?void 0:s.prefix,i={style:{}};for(const n in r)i[n]={var:`var(--${t}${pe.camelToKebab(n)})`,value:r[n]},i.style[`--${t}${pe.camelToKebab(n)}`]=r[n];return i}const f=ss({colorMain:"#1c1c1c",colorMainAux:"#282828",colorFont:"#ffffff",colorActive:"#00E5B0",borderRadius:"12px",borderRadiusSmall:"4px"},{prefix:"aptechka-"});if(U.isBrowser){const r=Nt({":root":f.style}).node;r.setAttribute("data-permanent",""),document.head.appendChild(r)}const Ft='<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24"><path fill-rule="evenodd" d="M20.536 3.464C19.07 2 16.714 2 12 2C7.286 2 4.929 2 3.464 3.464C2 4.93 2 7.286 2 12c0 4.714 0 7.071 1.464 8.535C4.93 22 7.286 22 12 22c4.714 0 7.071 0 8.535-1.465C22 19.072 22 16.714 22 12s0-7.071-1.465-8.536M16.75 12a.75.75 0 0 1-.75.75H9.81l1.72 1.72a.75.75 0 1 1-1.06 1.06l-3-3a.75.75 0 0 1 0-1.06l3-3a.75.75 0 1 1 1.06 1.06l-1.72 1.72H16a.75.75 0 0 1 .75.75" clip-rule="evenodd"/></svg>',Pt='<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24"><path d="M15.24 2h-3.894c-1.764 0-3.162 0-4.255.148c-1.126.152-2.037.472-2.755 1.193c-.719.721-1.038 1.636-1.189 2.766C3 7.205 3 8.608 3 10.379v5.838c0 1.508.92 2.8 2.227 3.342c-.067-.91-.067-2.185-.067-3.247v-5.01c0-1.281 0-2.386.118-3.27c.127-.948.413-1.856 1.147-2.593c.734-.737 1.639-1.024 2.583-1.152c.88-.118 1.98-.118 3.257-.118h3.07c1.276 0 2.374 0 3.255.118A3.601 3.601 0 0 0 15.24 2Z"/><path d="M6.6 11.397c0-2.726 0-4.089.844-4.936c.843-.847 2.2-.847 4.916-.847h2.88c2.715 0 4.073 0 4.917.847c.843.847.843 2.21.843 4.936v4.82c0 2.726 0 4.089-.843 4.936c-.844.847-2.202.847-4.917.847h-2.88c-2.715 0-4.073 0-4.916-.847c-.844-.847-.844-2.21-.844-4.936v-4.82Z"/></svg>',is='<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24"><path fill-rule="evenodd" d="M2 12c0-4.714 0-7.071 1.464-8.536C4.93 2 7.286 2 12 2c4.714 0 7.071 0 8.535 1.464C22 4.93 22 7.286 22 12c0 4.714 0 7.071-1.465 8.535C19.072 22 16.714 22 12 22s-7.071 0-8.536-1.465C2 19.072 2 16.714 2 12Zm10-5.75a.75.75 0 0 1 .75.75v5.19l1.72-1.72a.75.75 0 1 1 1.06 1.06l-3 3a.75.75 0 0 1-1.06 0l-3-3a.75.75 0 1 1 1.06-1.06l1.72 1.72V7a.75.75 0 0 1 .75-.75Zm-4 10a.75.75 0 0 0 0 1.5h8a.75.75 0 0 0 0-1.5H8Z" clip-rule="evenodd"/></svg>',ns='<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24"><path fill-rule="evenodd" d="M2 12c0-4.714 0-7.071 1.464-8.536C4.93 2 7.286 2 12 2c4.714 0 7.071 0 8.535 1.464C22 4.93 22 7.286 22 12c0 4.714 0 7.071-1.465 8.535C19.072 22 16.714 22 12 22s-7.071 0-8.536-1.465C2 19.072 2 16.714 2 12Zm10 5.75a.75.75 0 0 0 .75-.75v-5.19l1.72 1.72a.75.75 0 1 0 1.06-1.06l-3-3a.75.75 0 0 0-1.06 0l-3 3a.75.75 0 1 0 1.06 1.06l1.72-1.72V17c0 .414.336.75.75.75Zm-4-10a.75.75 0 0 1 0-1.5h8a.75.75 0 0 1 0 1.5H8Z" clip-rule="evenodd"/></svg>',$t=`<svg
|
|
2
2
|
xmlns="http://www.w3.org/2000/svg"
|
|
3
3
|
width="32"
|
|
4
4
|
height="32"
|
|
@@ -5,7 +5,7 @@ var Xe = (r, s, t) => s.has(r) || vt("Cannot " + t);
|
|
|
5
5
|
var e = (r, s, t) => (Xe(r, s, "read from private field"), t ? t.call(r) : s.get(r)), o = (r, s, t) => s.has(r) ? vt("Cannot add the same private member more than once") : s instanceof WeakSet ? s.add(r) : s.set(r, t), c = (r, s, t, i) => (Xe(r, s, "write to private field"), i ? i.call(r, t) : s.set(r, t), t), l = (r, s, t) => (Xe(r, s, "access private method"), t);
|
|
6
6
|
import { i as X } from "../browser-0zX67oeU.js";
|
|
7
7
|
import { S as P, s as B, a as j } from "../Store-OTdcl6SX.js";
|
|
8
|
-
import { c as Ut } from "../file-
|
|
8
|
+
import { c as Ut } from "../file-GHShUlue.js";
|
|
9
9
|
import { d as Xt } from "../function-C10DGppn.js";
|
|
10
10
|
import { s as Et } from "../gestures-D2Fdra_G.js";
|
|
11
11
|
import "../ticker/vanilla/index.js";
|
package/lib/utils/file.d.ts
CHANGED
package/lib/utils/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const b=require("../attributes-Bf2svn4j.cjs"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const b=require("../attributes-Bf2svn4j.cjs"),S=require("../browser-CpzFX2xg.cjs"),m=require("../canvas-CU5Xjahf.cjs"),p=require("../coordinates-D8Np3cPD.cjs"),d=require("../dom-JBOkFLTh.cjs"),o=require("../easings-GegIwET5.cjs"),I=require("../events-KVanG9sR.cjs"),h=require("../file-DSpfWdd9.cjs"),C=require("../function-MthRj-GJ.cjs"),T=require("../gestures-DHLrn6Q8.cjs"),O=require("../jss-GJLvaNfT.cjs"),f=require("../layout-8ryRAMGJ.cjs"),s=require("../math-GDWEqu7y.cjs"),l=require("../polyfills-BANSrI_m.cjs"),r=require("../object-CCiXnER2.cjs"),u=require("../string-DhgS_iFl.cjs"),y=require("../style-At6aDoqG.cjs"),g=require("../url-qZNgg7IM.cjs");function P(t,e,...n){return[...t.slice(0,e),...n,...t.slice(e)]}function w(t,e){const n=t.length;e=e%n;const a=new Array(n);for(let i=0;i<n;i++){const c=(i+e)%n;a[c]=t[i]}return a}function q(t,e=2){if(!+t)return"0 Bytes";const n=1024,a=e<0?0:e,i=["Bytes","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"],c=Math.floor(Math.log(t)/Math.log(n));return`${parseFloat((t/Math.pow(n,c)).toFixed(a))} ${i[c]}`}function v(t,e){return t.x<e.x+e.width&&t.x>e.x&&t.y<e.y+e.height&&t.y>e.y}function x(t,e){return Math.sqrt((t.x-e.x)**2+(t.y-e.y)**2)<e.radius}function E(t,e){const n=t.style.getPropertyValue(e);if(n){const a=n.toString();return a.startsWith("var")?E(t,a.slice(4,-1)):a}}function Q(...t){const e={};return Array.from(document.styleSheets).forEach(n=>{Array.from(n.cssRules).forEach(a=>{a instanceof CSSStyleRule&&a.selectorText===":root"&&t.forEach(i=>{const c=E(a,i);c&&(e[i]=c)})})}),t.forEach(n=>{e[n]||console.warn(`variable named ${n} not found`)}),e}function B(t){const e=window.atob(t);return decodeURIComponent(window.escape(e))}function D(t){const e=window.unescape(encodeURIComponent(t));return window.btoa(e)}function A(t){return new Promise(e=>{setTimeout(()=>{e()},t)})}exports.parseAttribute=b.parseAttribute;exports.parseAttributeValue=b.parseAttributeValue;exports.isBrowser=S.isBrowser;exports.contain=m.contain;exports.cover=m.cover;exports.fixPosition=m.fixPosition;exports.measureText=m.measureText;exports.getPointerPosition=p.getPointerPosition;exports.normalize=p.normalize;exports.screenToCartesian=p.screenToCartesian;exports.findParentElement=d.findParentElement;exports.findScrollParentElement=d.findScrollParentElement;exports.getAllParentElements=d.getAllParentElements;exports.getElement=d.getElement;exports.easeInCubic=o.easeInCubic;exports.easeInExpo=o.easeInExpo;exports.easeInOutCubic=o.easeInOutCubic;exports.easeInOutExpo=o.easeInOutExpo;exports.easeInOutQuad=o.easeInOutQuad;exports.easeInOutQuart=o.easeInOutQuart;exports.easeInOutQuint=o.easeInOutQuint;exports.easeInQuad=o.easeInQuad;exports.easeInQuart=o.easeInQuart;exports.easeInQuint=o.easeInQuint;exports.easeOutCubic=o.easeOutCubic;exports.easeOutExpo=o.easeOutExpo;exports.easeOutQuad=o.easeOutQuad;exports.easeOutQuart=o.easeOutQuart;exports.easeOutQuint=o.easeOutQuint;exports.linear=o.linear;exports.dispatchEvent=I.dispatchEvent;exports.createJSONAndSave=h.createJSONAndSave;exports.downloadURI=h.downloadURI;exports.debounce=C.debounce;exports.throttle=C.throttle;exports.setupDrag=T.setupDrag;exports.createStylesheet=O.createStylesheet;exports.styleToString=O.styleToString;exports.getCumulativeOffsetLeft=f.getCumulativeOffsetLeft;exports.getCumulativeOffsetTop=f.getCumulativeOffsetTop;exports.getCumulativePosition=f.getCumulativePosition;exports.calculateDistance=s.calculateDistance;exports.calculateDistanceWithRadius=s.calculateDistanceWithRadius;exports.clamp=s.clamp;exports.damp=s.damp;exports.lerp=s.lerp;exports.mapRange=s.mapRange;exports.round=s.round;exports.smootherstep=s.smootherstep;exports.smoothstep=s.smoothstep;exports.step=s.step;exports.loopNumber=l.loopNumber;exports.nullishCoalescing=l.nullishCoalescing;exports.preciseNumber=l.preciseNumber;exports.roundNumberTo=l.roundNumberTo;exports.toStep=l.toStep;exports.cloneDeep=r.cloneDeep;exports.compareObjects=r.compareObjects;exports.isESClass=r.isESClass;exports.isNullish=r.isNullish;exports.isObject=r.isObject;exports.mergeDeep=r.mergeDeep;exports.mixin=r.mixin;exports.omit=r.omit;exports.pick=r.pick;exports.camelToKebab=u.camelToKebab;exports.capitalize=u.capitalize;exports.generateId=u.generateId;exports.isUppercase=u.isUppercase;exports.kebabToCamel=u.kebabToCamel;exports.snakeToDotted=u.snakeToDotted;exports.toPascalCase=u.toPascalCase;exports.uncapitalize=u.uncapitalize;exports.getElementTransitionDurationMS=y.getElementTransitionDurationMS;exports.getElementTransitionDurationS=y.getElementTransitionDurationS;exports.changeHistory=g.changeHistory;exports.normalizeBase=g.normalizeBase;exports.splitPath=g.splitPath;exports.decode=D;exports.dotCircleCollision=x;exports.dotRectCollision=v;exports.encode=B;exports.formatBytes=q;exports.getRootVariables=Q;exports.insert=P;exports.shiftArray=w;exports.wait=A;
|
package/lib/utils/index.js
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import { a as b, p as y } from "../attributes-69we3byR.js";
|
|
2
|
-
import { i as
|
|
3
|
-
import { a as S, c as O, f as
|
|
2
|
+
import { i as C } from "../browser-0zX67oeU.js";
|
|
3
|
+
import { a as S, c as O, f as I, m as B } from "../canvas-DeZ0SLUJ.js";
|
|
4
4
|
import { g as T, n as v, s as A } from "../coordinates-CgdGoSYs.js";
|
|
5
|
-
import { f as
|
|
5
|
+
import { f as R, b as D, a as M, g as k } from "../dom-0S_WDL4g.js";
|
|
6
6
|
import { d as N, o as V, g as j, q as U, c as $, j as q, n as F, a as K, h as W, k as G, f as H, p as J, b as L, i as Y, m as Z, l as X } from "../easings-BEmRlrDd.js";
|
|
7
7
|
import { d as ee } from "../events-CsVF98U6.js";
|
|
8
|
-
import { c as te } from "../file-
|
|
9
|
-
import { d as
|
|
10
|
-
import { s as
|
|
11
|
-
import { c as
|
|
12
|
-
import { g as
|
|
13
|
-
import { e as
|
|
14
|
-
import { l as
|
|
15
|
-
import { c as
|
|
16
|
-
import { c as
|
|
17
|
-
import { g as
|
|
18
|
-
import { c as
|
|
8
|
+
import { c as te, d as se } from "../file-GHShUlue.js";
|
|
9
|
+
import { d as ne, t as re } from "../function-C10DGppn.js";
|
|
10
|
+
import { s as ue } from "../gestures-D2Fdra_G.js";
|
|
11
|
+
import { c as le, s as fe } from "../jss-CjccJC-K.js";
|
|
12
|
+
import { g as me, a as de, b as xe } from "../layout-HoBT_Da2.js";
|
|
13
|
+
import { e as he, f as be, c as ye, d as we, l as Ce, m as Ee, r as Se, b as Oe, a as Ie, s as Be } from "../math-BOBiC4TN.js";
|
|
14
|
+
import { l as Te, n as ve, p as Ae, r as Qe, t as Re } from "../polyfills-CxfUK5OU.js";
|
|
15
|
+
import { c as Me, d as ke, i as ze, b as Ne, a as Ve, m as je, e as Ue, o as $e, p as qe } from "../object-D6MVWB4l.js";
|
|
16
|
+
import { c as Ke, a as We, g as Ge, i as He, k as Je, s as Le, t as Ye, u as Ze } from "../string-f0Dnk0L1.js";
|
|
17
|
+
import { g as _e, a as ea } from "../style-j2TwriJ_.js";
|
|
18
|
+
import { c as ta, n as sa, s as oa } from "../url-BuZrUXAO.js";
|
|
19
19
|
function i(a, e, ...t) {
|
|
20
20
|
return [...a.slice(0, e), ...t, ...a.slice(e)];
|
|
21
21
|
}
|
|
@@ -86,24 +86,25 @@ function x(a) {
|
|
|
86
86
|
});
|
|
87
87
|
}
|
|
88
88
|
export {
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
89
|
+
he as calculateDistance,
|
|
90
|
+
be as calculateDistanceWithRadius,
|
|
91
|
+
Ke as camelToKebab,
|
|
92
|
+
We as capitalize,
|
|
93
|
+
ta as changeHistory,
|
|
94
|
+
ye as clamp,
|
|
95
|
+
Me as cloneDeep,
|
|
96
|
+
ke as compareObjects,
|
|
97
97
|
S as contain,
|
|
98
98
|
O as cover,
|
|
99
99
|
te as createJSONAndSave,
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
100
|
+
le as createStylesheet,
|
|
101
|
+
we as damp,
|
|
102
|
+
ne as debounce,
|
|
103
103
|
d as decode,
|
|
104
104
|
ee as dispatchEvent,
|
|
105
105
|
f as dotCircleCollision,
|
|
106
106
|
l as dotRectCollision,
|
|
107
|
+
se as downloadURI,
|
|
107
108
|
N as easeInCubic,
|
|
108
109
|
V as easeInExpo,
|
|
109
110
|
j as easeInOutCubic,
|
|
@@ -120,56 +121,56 @@ export {
|
|
|
120
121
|
Y as easeOutQuart,
|
|
121
122
|
Z as easeOutQuint,
|
|
122
123
|
m as encode,
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
124
|
+
R as findParentElement,
|
|
125
|
+
D as findScrollParentElement,
|
|
126
|
+
I as fixPosition,
|
|
126
127
|
c as formatBytes,
|
|
127
|
-
|
|
128
|
+
Ge as generateId,
|
|
128
129
|
M as getAllParentElements,
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
130
|
+
me as getCumulativeOffsetLeft,
|
|
131
|
+
de as getCumulativeOffsetTop,
|
|
132
|
+
xe as getCumulativePosition,
|
|
132
133
|
k as getElement,
|
|
133
|
-
|
|
134
|
-
|
|
134
|
+
_e as getElementTransitionDurationMS,
|
|
135
|
+
ea as getElementTransitionDurationS,
|
|
135
136
|
T as getPointerPosition,
|
|
136
137
|
p as getRootVariables,
|
|
137
138
|
i as insert,
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
139
|
+
C as isBrowser,
|
|
140
|
+
ze as isESClass,
|
|
141
|
+
Ne as isNullish,
|
|
142
|
+
Ve as isObject,
|
|
143
|
+
He as isUppercase,
|
|
144
|
+
Je as kebabToCamel,
|
|
144
145
|
Ce as lerp,
|
|
145
146
|
X as linear,
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
147
|
+
Te as loopNumber,
|
|
148
|
+
Ee as mapRange,
|
|
149
|
+
B as measureText,
|
|
150
|
+
je as mergeDeep,
|
|
151
|
+
Ue as mixin,
|
|
151
152
|
v as normalize,
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
153
|
+
sa as normalizeBase,
|
|
154
|
+
ve as nullishCoalescing,
|
|
155
|
+
$e as omit,
|
|
155
156
|
b as parseAttribute,
|
|
156
157
|
y as parseAttributeValue,
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
158
|
+
qe as pick,
|
|
159
|
+
Ae as preciseNumber,
|
|
160
|
+
Se as round,
|
|
161
|
+
Qe as roundNumberTo,
|
|
161
162
|
A as screenToCartesian,
|
|
162
|
-
|
|
163
|
+
ue as setupDrag,
|
|
163
164
|
u as shiftArray,
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
165
|
+
Oe as smootherstep,
|
|
166
|
+
Ie as smoothstep,
|
|
167
|
+
Le as snakeToDotted,
|
|
168
|
+
oa as splitPath,
|
|
168
169
|
Be as step,
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
170
|
+
fe as styleToString,
|
|
171
|
+
re as throttle,
|
|
172
|
+
Ye as toPascalCase,
|
|
173
|
+
Re as toStep,
|
|
174
|
+
Ze as uncapitalize,
|
|
174
175
|
x as wait
|
|
175
176
|
};
|
package/package.json
CHANGED
package/lib/file-EevnUtRj.cjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";function c(n,t){const o=new Blob([JSON.stringify(t)],{type:"application/json"}),e=document.createElement("a");e.download=n+".json",e.href=window.URL.createObjectURL(o),e.dataset.downloadurl=["application/json",e.download,e.href].join(":");const a=new MouseEvent("click",{view:window,bubbles:!0,cancelable:!0});e.dispatchEvent(a),e.remove()}exports.createJSONAndSave=c;
|
package/lib/file-lxi_oXJf.js
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
function c(n, o) {
|
|
2
|
-
const t = new Blob([JSON.stringify(o)], { type: "application/json" }), e = document.createElement("a");
|
|
3
|
-
e.download = n + ".json", e.href = window.URL.createObjectURL(t), e.dataset.downloadurl = ["application/json", e.download, e.href].join(":");
|
|
4
|
-
const a = new MouseEvent("click", {
|
|
5
|
-
view: window,
|
|
6
|
-
bubbles: !0,
|
|
7
|
-
cancelable: !0
|
|
8
|
-
});
|
|
9
|
-
e.dispatchEvent(a), e.remove();
|
|
10
|
-
}
|
|
11
|
-
export {
|
|
12
|
-
c
|
|
13
|
-
};
|