aptechka 0.7.0 → 0.7.2

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.
@@ -1,3 +1,3 @@
1
- export { En3GLTFLoader } from './_En3GLTFLoader';
2
- export { En3TextureLoader } from './_En3TextureLoader';
1
+ export { En3GLTFLoader } from './En3GLTFLoader';
2
+ export { En3TextureLoader } from './En3TextureLoader';
3
3
  export { loaders } from './loaders';
@@ -1,8 +1,8 @@
1
1
  import { DRACOLoader } from 'three/examples/jsm/loaders/DRACOLoader.js';
2
2
  import { KTX2Loader } from 'three/examples/jsm/loaders/KTX2Loader.js';
3
3
  import { MeshoptDecoder } from '../libs/MeshoptDecoder';
4
- import { En3GLTFLoader } from './_En3GLTFLoader';
5
- import { En3TextureLoader } from './_En3TextureLoader';
4
+ import { En3GLTFLoader } from './En3GLTFLoader';
5
+ import { En3TextureLoader } from './En3TextureLoader';
6
6
 
7
7
  export declare const loaders: {
8
8
  gltfLoader: En3GLTFLoader;
@@ -0,0 +1 @@
1
+ "use strict";var L=Object.defineProperty,S=Object.defineProperties;var q=Object.getOwnPropertyDescriptors;var k=Object.getOwnPropertySymbols;var T=Object.prototype.hasOwnProperty,_=Object.prototype.propertyIsEnumerable;var w=(t,e,n)=>e in t?L(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,i=(t,e)=>{for(var n in e||(e={}))T.call(e,n)&&w(t,n,e[n]);if(k)for(var n of k(e))_.call(e,n)&&w(t,n,e[n]);return t},g=(t,e)=>S(t,q(e));var F=(t,e,n)=>{if(!e.has(t))throw TypeError("Cannot "+n)};var c=(t,e,n)=>(F(t,e,"read from private field"),n?n.call(t):e.get(t)),h=(t,e,n)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,n)};const p=require("./ElementConstructor-CAZ2ra8m.cjs"),M=require("./string-DhgS_iFl.cjs"),r=require("./globals-bYKki-b9.cjs");require("./Store-6s0YXK4o.cjs");var E,u,d,m,C;class R extends HTMLElement{constructor(n){var l;super();h(this,E,new Set);h(this,u,new Set);h(this,d,new Map);h(this,m,()=>{r.contextStack.value.push(c(this,d))});h(this,C,()=>{r.contextStack.value=r.contextStack.value.filter(n=>n!==c(this,d))});const o=r.currentComponentElement.value;r.currentComponentElement.value=this,c(this,m).call(this);const a=n==null?void 0:n.tag(i({},n.attributes)),s=(l=r.nextComponentAttributes.value)!=null&&l.lightChildren?"lightChildren":"children";new p.ElementConstructor(this,g(i({},r.nextComponentAttributes.value),{[s]:a})),r.currentComponentElement.value=o,r.nextComponentAttributes.value=null,c(this,C).call(this)}addConnectCallback(n){c(this,E).add(n)}addDisconnectCallback(n){c(this,u).add(n)}createContext(n,o){c(this,d).set(n,o)}connectedCallback(){r.currentComponentElement.value=this,c(this,E).forEach(n=>{const o=n(this);o&&c(this,u).add(o)}),r.currentComponentElement.value=null,this.addEventListener("beforeChildrenChange",c(this,m)),this.addEventListener("afterChildrenChange",c(this,C))}disconnectedCallback(){c(this,u).forEach(n=>{n(this)}),this.removeEventListener("beforeChildrenChange",c(this,m)),this.removeEventListener("afterChildrenChange",c(this,C))}}E=new WeakMap,u=new WeakMap,d=new WeakMap,m=new WeakMap,C=new WeakMap;function y(t,e,...n){var s;n=n.flat().filter(l=>l!=null);const o=[],a=[];if(e=e||{},o.push(...n.reverse()),typeof t=="function"){if(t===v)return v(n);e.children=o.reverse();const l={noCustomElement:t.noCustomElement,onlyRegister:e.__register};if(e==null||delete e.__register,l.noCustomElement)return t(i({},e));const x=`e-${M.camelToKebab(t.name)}`;let f=customElements.get(x);return f||(f=(s=class extends R{constructor(A){super(l.onlyRegister?{tag:t,attributes:e}:A)}},s.formAssociated=t.formAssociated,s),customElements.define(x,f)),l.onlyRegister?f:new f({tag:t,attributes:e})}for(;o.length;){const l=o.pop();Array.isArray(l)?o.push(...l):l!=null&&a.push(l)}if(t==="component"){const l=v(a);return r.nextComponentAttributes.value=e,l.node}else{const l=e!=null&&e.lightChildren?"lightChildren":"children";return e==null||delete e.children,t?new p.ElementConstructor(t,g(i({},e),{[l]:a})):null}}function v(t){return new p.ElementConstructor(document.createDocumentFragment(),{children:t})}function D(t,e){const n=e==null?void 0:e.children,o=e==null?void 0:e.attributes;return y(t,i({},o),n)}exports.Fragment=v;exports.h=y;exports.instantiate=D;
@@ -70,7 +70,7 @@ class H extends HTMLElement {
70
70
  v = new WeakMap(), i = new WeakMap(), d = new WeakMap(), a = new WeakMap(), m = new WeakMap();
71
71
  function K(l, e, ...n) {
72
72
  var o;
73
- n = n.flat();
73
+ n = n.flat().filter((c) => c != null);
74
74
  const s = [], C = [];
75
75
  if (e = e || {}, s.push(...n.reverse()), typeof l == "function") {
76
76
  if (l === x)
package/lib/jsx/index.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";var g=Object.defineProperty,p=Object.defineProperties;var E=Object.getOwnPropertyDescriptors;var d=Object.getOwnPropertySymbols;var R=Object.prototype.hasOwnProperty,x=Object.prototype.propertyIsEnumerable;var h=(t,e,n)=>e in t?g(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,i=(t,e)=>{for(var n in e||(e={}))R.call(e,n)&&h(t,n,e[n]);if(d)for(var n of d(e))x.call(e,n)&&h(t,n,e[n]);return t},m=(t,e)=>p(t,E(e));Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("../instantiate-Db5gGSYG.cjs"),r=require("../globals-bYKki-b9.cjs");require("../Store-6s0YXK4o.cjs");const C=require("../_createStore-Cf1MyeHa.cjs"),S=require("../onConnect-DGP866cj.cjs"),w=require("../tags-ld5jemJw.cjs"),f=require("../createStylesheet-p23sZ7Ey.cjs");function q(t,e){((e==null?void 0:e.containerElement)||document.body).appendChild(c.instantiate(t,e))}function v(t,e=null,...n){return c.h(t,m(i({},e),{__register:!0}),...n)}function T(t){const e=r.contextStack.value.find(n=>n.has(t));if(e)return e.get(t)}function _(t,e){r.currentComponentElement.value.createContext(t,e)}function M(){return r.currentComponentElement.value.attachInternals()}function b(t){return r.currentComponentElement.value.attachShadow(i({mode:"open"},t))}function A(t){r.currentComponentElement.value.shadowRoot&&r.currentComponentElement.value.shadowRoot.adoptedStyleSheets.push(f.createStylesheet(t)),S.onConnect(e=>{if(e.shadowRoot)return;const n=e.getRootNode();if(n===document){const a=w.style(t).node;if(![...document.head.querySelectorAll("style")].find(o=>o.outerHTML===a.outerHTML))return document.head.appendChild(a),()=>{a.remove()}}else if(n instanceof ShadowRoot){const a=f.createStylesheet(t),s=[];return n.adoptedStyleSheets.filter(o=>{const y=Array.from(o.cssRules);Array.from(a.cssRules).filter(l=>!y.find(u=>u.cssText===l.cssText)).forEach(l=>{const u=o.insertRule(l.cssText);s.push(()=>{o.deleteRule(u)})})}),()=>{s.forEach(o=>o())}}})}exports.Fragment=c.Fragment;exports.h=c.h;exports.instantiate=c.instantiate;exports.currentComponentElement=r.currentComponentElement;exports._createStore=C._createStore;exports.onDisconnect=C.onDisconnect;exports.onConnect=S.onConnect;exports.attachInternals=M;exports.attachShadow=b;exports.attachStylesheet=A;exports.createContext=_;exports.getContext=T;exports.register=v;exports.render=q;
1
+ "use strict";var g=Object.defineProperty,p=Object.defineProperties;var E=Object.getOwnPropertyDescriptors;var d=Object.getOwnPropertySymbols;var R=Object.prototype.hasOwnProperty,x=Object.prototype.propertyIsEnumerable;var h=(t,e,n)=>e in t?g(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,i=(t,e)=>{for(var n in e||(e={}))R.call(e,n)&&h(t,n,e[n]);if(d)for(var n of d(e))x.call(e,n)&&h(t,n,e[n]);return t},m=(t,e)=>p(t,E(e));Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("../instantiate-Cx-JmH6m.cjs"),r=require("../globals-bYKki-b9.cjs");require("../Store-6s0YXK4o.cjs");const C=require("../_createStore-Cf1MyeHa.cjs"),S=require("../onConnect-DGP866cj.cjs"),w=require("../tags-ld5jemJw.cjs"),f=require("../createStylesheet-p23sZ7Ey.cjs");function q(t,e){((e==null?void 0:e.containerElement)||document.body).appendChild(c.instantiate(t,e))}function v(t,e=null,...n){return c.h(t,m(i({},e),{__register:!0}),...n)}function T(t){const e=r.contextStack.value.find(n=>n.has(t));if(e)return e.get(t)}function _(t,e){r.currentComponentElement.value.createContext(t,e)}function M(){return r.currentComponentElement.value.attachInternals()}function b(t){return r.currentComponentElement.value.attachShadow(i({mode:"open"},t))}function A(t){r.currentComponentElement.value.shadowRoot&&r.currentComponentElement.value.shadowRoot.adoptedStyleSheets.push(f.createStylesheet(t)),S.onConnect(e=>{if(e.shadowRoot)return;const n=e.getRootNode();if(n===document){const a=w.style(t).node;if(![...document.head.querySelectorAll("style")].find(o=>o.outerHTML===a.outerHTML))return document.head.appendChild(a),()=>{a.remove()}}else if(n instanceof ShadowRoot){const a=f.createStylesheet(t),s=[];return n.adoptedStyleSheets.filter(o=>{const y=Array.from(o.cssRules);Array.from(a.cssRules).filter(l=>!y.find(u=>u.cssText===l.cssText)).forEach(l=>{const u=o.insertRule(l.cssText);s.push(()=>{o.deleteRule(u)})})}),()=>{s.forEach(o=>o())}}})}exports.Fragment=c.Fragment;exports.h=c.h;exports.instantiate=c.instantiate;exports.currentComponentElement=r.currentComponentElement;exports._createStore=C._createStore;exports.onDisconnect=C.onDisconnect;exports.onConnect=S.onConnect;exports.attachInternals=M;exports.attachShadow=b;exports.attachStylesheet=A;exports.createContext=_;exports.getContext=T;exports.register=v;exports.render=q;
package/lib/jsx/index.js CHANGED
@@ -10,8 +10,8 @@ var d = (t, e, o) => e in t ? p(t, e, { enumerable: !0, configurable: !0, writab
10
10
  S.call(e, o) && d(t, o, e[o]);
11
11
  return t;
12
12
  }, f = (t, e) => y(t, x(e));
13
- import { i as w, h as C } from "../instantiate-D19Uvc31.js";
14
- import { F as K } from "../instantiate-D19Uvc31.js";
13
+ import { i as w, h as C } from "../instantiate-D87JFF1W.js";
14
+ import { F as K } from "../instantiate-D87JFF1W.js";
15
15
  import { a as g, c as a } from "../globals-DMjysUXI.js";
16
16
  import "../Store-BI2xxXOA.js";
17
17
  import { _ as P, o as Q } from "../_createStore-Ck9bHolX.js";
@@ -22,7 +22,6 @@ export interface RouterParameters {
22
22
  }
23
23
  export declare class Router {
24
24
  #private;
25
- static active: Router;
26
25
  preprocessor?: RouterPreprocessor;
27
26
  postprocessor?: RouterPostprocessor;
28
27
  constructor(parameters?: RouterParameters);
@@ -1 +1 @@
1
- "use strict";var tt=(a,e)=>(e=Symbol[a])?e:Symbol.for("Symbol."+a);var Y=(a,e,s)=>{if(!e.has(a))throw TypeError("Cannot "+s)};var t=(a,e,s)=>(Y(a,e,"read from private field"),s?s.call(a):e.get(a)),h=(a,e,s)=>{if(e.has(a))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(a):e.set(a,s)},n=(a,e,s,i)=>(Y(a,e,"write to private field"),i?i.call(a,s):e.set(a,s),s);var F=(a,e,s)=>(Y(a,e,"access private method"),s);var M=(a,e,s)=>new Promise((i,r)=>{var o=u=>{try{f(s.next(u))}catch(v){r(v)}},c=u=>{try{f(s.throw(u))}catch(v){r(v)}},f=u=>u.done?i(u.value):Promise.resolve(u.value).then(o,c);f((s=s.apply(a,e)).next())});var G=(a,e,s)=>(e=a[tt("asyncIterator")])?e.call(a):(a=a[tt("iterator")](),e={},s=(i,r)=>(r=a[i])&&(e[i]=o=>new Promise((c,f,u)=>(o=r.call(a,o),u=o.done,Promise.resolve(o.value).then(v=>c({value:v,done:u}),f)))),s("next"),s("return"),e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const rt=require("urlpattern-polyfill"),ot=require("../notifier/index.cjs"),st=require("../browser-CpzFX2xg.cjs"),ct=require("../function-MthRj-GJ.cjs"),J=require("../url-C3dWnJQg.cjs"),lt=require("../instantiate-Db5gGSYG.cjs"),et=require("../object-CCiXnER2.cjs");var R,O,A,p,d,w,S,L,b,E,x,it;class ut{constructor(e,s){h(this,x);h(this,R,void 0);h(this,O,void 0);h(this,A,void 0);h(this,p,void 0);h(this,d,void 0);h(this,w,void 0);h(this,S,void 0);h(this,L,null);h(this,b,[]);h(this,E,[]);n(this,R,e),n(this,O,s),n(this,A,new URLPattern({pathname:t(this,R)})),n(this,p,null),n(this,d,null),n(this,w,!1),n(this,S,null),st.isBrowser&&n(this,L,new MutationObserver(i=>{i[0].addedNodes.forEach(o=>{t(this,p)?t(this,E).push(o):t(this,b).push(o)})}))}get pattern(){return t(this,R)}get urlPattern(){return t(this,A)}get isActive(){return t(this,w)}get element(){return t(this,d)}get nest(){return t(this,S)}testPathname(e){return this.urlPattern.test({pathname:e})}render(e,s){return M(this,null,function*(){var i,r;if(t(this,L).observe(document.head,{childList:!0,subtree:!0}),t(this,p))t(this,b).forEach(o=>{document.head.appendChild(o)});else{const o=yield t(this,O).call(this);if(n(this,E,[...t(this,b)]),typeof o.default=="function"&&(n(this,p,o.default),et.isESClass(o.default))){const c="e-"+((i=t(this,p))==null?void 0:i.name.toLowerCase());customElements.get(c)||customElements.define(c,o.default)}}if(yield F(this,x,it).call(this),t(this,p)){const o=t(this,A).exec({pathname:s}),c=(o==null?void 0:o.pathname.groups)||{},f=Object.fromEntries(new URLSearchParams(location.search)),u={pathnameParams:c,searchParams:f};et.isESClass(t(this,p))?n(this,d,new(t(this,p))(u)):n(this,d,lt.instantiate(t(this,p),{attributes:u})),e.appendChild(t(this,d)),n(this,S,t(this,d).querySelector("[data-nest]")||((r=t(this,d).shadowRoot)==null?void 0:r.querySelector("[data-nest]"))||t(this,d).shadowRoot||t(this,d)),n(this,w,!0)}t(this,L).disconnect()})}close(){var e;t(this,L).disconnect(),(e=t(this,d))==null||e.remove(),n(this,w,!1),t(this,E).forEach(s=>document.head.removeChild(s)),n(this,E,[])}getAnchorElements(){var s;let e=[];return t(this,d)&&(e=[...t(this,d).querySelectorAll("a")]),(s=t(this,d))!=null&&s.shadowRoot&&(e=[...e,...t(this,d).shadowRoot.querySelectorAll("a")]),e}}R=new WeakMap,O=new WeakMap,A=new WeakMap,p=new WeakMap,d=new WeakMap,w=new WeakMap,S=new WeakMap,L=new WeakMap,b=new WeakMap,E=new WeakMap,x=new WeakSet,it=function(){return M(this,null,function*(){const e=t(this,b).filter(c=>c instanceof HTMLElement?c.tagName==="STYLE"||c.tagName==="SCRIPT"||c.tagName==="LINK":!1);try{for(var s=G(e),i,r,o;i=!(r=yield s.next()).done;i=!1){const c=r.value;yield new Promise(f=>{c.onload=()=>{f()}})}}catch(r){o=[r]}finally{try{i&&(r=s.return)&&(yield r.call(s))}finally{if(o)throw o[0]}}})};var k,m,P,U,q,j;class dt{constructor(e,s){h(this,k,void 0);h(this,m,void 0);h(this,P,void 0);h(this,U,void 0);h(this,q,void 0);h(this,j,e=>{e.preventDefault(),t(this,k).links.forEach(s=>{var i;t(this,P)===t(s,P)||(i=t(s,q))!=null&&i.includes(t(this,P))?t(s,m).classList.add("clicked"):t(s,m).classList.remove("clicked")}),t(this,k).navigate(t(this,P),t(this,U))});var o,c;n(this,k,e),n(this,m,s),n(this,P,t(this,m).getAttribute("href")||"/"),n(this,U,t(this,m).getAttribute("data-history-action")||"push"),t(this,m).addEventListener("click",t(this,j));const i=e.normalizePath(t(this,P)),r=e.normalizePath(location.pathname);n(this,q,(o=t(this,m).getAttribute("data-match-paths"))==null?void 0:o.split(",").map(f=>e.normalizePath(f.trim()).pathname)),t(this,m).hasAttribute("data-include")?r.pathname.includes(i.pathname)&&t(this,m).classList.add("current"):i.pathname===r.pathname||(c=t(this,q))!=null&&c.includes(r.pathname)?(t(this,m).classList.add("current"),t(this,m).classList.add("clicked")):t(this,m).classList.remove("clicked")}destroy(){t(this,m).removeEventListener("click",t(this,j)),t(this,m).classList.remove("current")}}k=new WeakMap,m=new WeakMap,P=new WeakMap,U=new WeakMap,q=new WeakMap,j=new WeakMap;globalThis.URLPattern=rt.URLPattern;var C,N,g,z,T,y,H,B,I,D,nt,K;const W=class W{constructor(e){h(this,D);h(this,C,null);h(this,N,null);h(this,g,[]);h(this,z,null);h(this,T,[]);h(this,y,void 0);h(this,H,null);h(this,B,new ot.Notifier);h(this,I,ct.debounce(()=>{const e=s=>s.split("/").length;n(this,g,t(this,g).sort((s,i)=>e(s.pattern)-e(i.pattern))),this.navigate(location.pathname)},0));h(this,K,e=>{e.state&&this.navigate(e.state,"none")});st.isBrowser&&(e!=null&&e.base?n(this,N,J.normalizeBase(e.base)):n(this,N,"/"),W.active=this,n(this,C,(e==null?void 0:e.rootElement)||document.body),addEventListener("popstate",t(this,K)))}get currentPathname(){return t(this,H)}get candidatePathname(){return t(this,y)}get routes(){return t(this,g)}get links(){return t(this,T)}navigationEvent(e){return t(this,B).subscribe(e)}defineRoute(e,s){const i=new ut(e,s);t(this,g).push(i),t(this,I).call(this)}navigate(e,s="push"){return M(this,null,function*(){var Z,_;const i=this.normalizePath(e);let{pathname:r,hash:o,parameters:c,leaf:f}=i;if(t(this,y)===r||t(this,H)===r)return;W.active=this,n(this,y,r);const u=t(this,g).filter(l=>l.isActive),v=t(this,g).filter(l=>!u.includes(l)&&l.testPathname(f)),at=u.filter(l=>!l.testPathname(f)),V=u.filter(l=>l.testPathname(f));let X=!0;if(this.preprocessor)try{yield new Promise((l,ht)=>{var $;($=this.preprocessor)==null||$.call(this,{path:i,resolve:l,reject:ht})})}catch(l){l?console.error(l):console.log("Route change canceled"),X=!1}if(X&&t(this,y)===r){n(this,z,V[V.length-1]),at.forEach(l=>{l.close()}),n(this,H,r);try{for(var pt=G(v),gt,Pt,vt;gt=!(Pt=yield pt.next()).done;gt=!1){const l=Pt.value;yield l.render(((Z=t(this,z))==null?void 0:Z.nest)||t(this,C),r),n(this,z,l)}}catch(Pt){vt=[Pt]}finally{try{gt&&(Pt=pt.return)&&(yield Pt.call(pt))}finally{if(vt)throw vt[0]}}J.changeHistory(s,r,c,o),F(this,D,nt).call(this),(_=this.postprocessor)==null||_.call(this,{pathname:r}),t(this,B).notify({pathname:r})}})}normalizePath(e){return J.splitPath(e,t(this,N))}};C=new WeakMap,N=new WeakMap,g=new WeakMap,z=new WeakMap,T=new WeakMap,y=new WeakMap,H=new WeakMap,B=new WeakMap,I=new WeakMap,D=new WeakSet,nt=function(){const e=t(this,g).filter(i=>i.isActive),s=Array.from(new Set([...t(this,C).querySelectorAll("a"),...e.map(i=>i.getAnchorElements()).flat()].filter(i=>{var r;return(r=i.getAttribute("href"))==null?void 0:r.startsWith("/")})));t(this,T).forEach(i=>{i.destroy()}),n(this,T,s.map(i=>new dt(this,i)))},K=new WeakMap;let Q=W;exports.Router=Q;
1
+ "use strict";var Z=(a,e)=>(e=Symbol[a])?e:Symbol.for("Symbol."+a);var K=(a,e,s)=>{if(!e.has(a))throw TypeError("Cannot "+s)};var t=(a,e,s)=>(K(a,e,"read from private field"),s?s.call(a):e.get(a)),r=(a,e,s)=>{if(e.has(a))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(a):e.set(a,s)},n=(a,e,s,i)=>(K(a,e,"write to private field"),i?i.call(a,s):e.set(a,s),s);var W=(a,e,s)=>(K(a,e,"access private method"),s);var M=(a,e,s)=>new Promise((i,h)=>{var o=u=>{try{f(s.next(u))}catch(w){h(w)}},c=u=>{try{f(s.throw(u))}catch(w){h(w)}},f=u=>u.done?i(u.value):Promise.resolve(u.value).then(o,c);f((s=s.apply(a,e)).next())});var Y=(a,e,s)=>(e=a[Z("asyncIterator")])?e.call(a):(a=a[Z("iterator")](),e={},s=(i,h)=>(h=a[i])&&(e[i]=o=>new Promise((c,f,u)=>(o=h.call(a,o),u=o.done,Promise.resolve(o.value).then(w=>c({value:w,done:u}),f)))),s("next"),s("return"),e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const at=require("urlpattern-polyfill"),rt=require("../notifier/index.cjs"),tt=require("../browser-CpzFX2xg.cjs"),ht=require("../function-MthRj-GJ.cjs"),F=require("../url-C3dWnJQg.cjs"),ot=require("../instantiate-Cx-JmH6m.cjs"),$=require("../object-CCiXnER2.cjs");var R,O,A,p,d,v,S,L,b,E,x,et;class ct{constructor(e,s){r(this,x);r(this,R,void 0);r(this,O,void 0);r(this,A,void 0);r(this,p,void 0);r(this,d,void 0);r(this,v,void 0);r(this,S,void 0);r(this,L,null);r(this,b,[]);r(this,E,[]);n(this,R,e),n(this,O,s),n(this,A,new URLPattern({pathname:t(this,R)})),n(this,p,null),n(this,d,null),n(this,v,!1),n(this,S,null),tt.isBrowser&&n(this,L,new MutationObserver(i=>{i[0].addedNodes.forEach(o=>{t(this,p)?t(this,E).push(o):t(this,b).push(o)})}))}get pattern(){return t(this,R)}get urlPattern(){return t(this,A)}get isActive(){return t(this,v)}get element(){return t(this,d)}get nest(){return t(this,S)}testPathname(e){return this.urlPattern.test({pathname:e})}render(e,s){return M(this,null,function*(){var i,h;if(t(this,L).observe(document.head,{childList:!0,subtree:!0}),t(this,p))t(this,b).forEach(o=>{document.head.appendChild(o)});else{const o=yield t(this,O).call(this);if(n(this,E,[...t(this,b)]),typeof o.default=="function"&&(n(this,p,o.default),$.isESClass(o.default))){const c="e-"+((i=t(this,p))==null?void 0:i.name.toLowerCase());customElements.get(c)||customElements.define(c,o.default)}}if(yield W(this,x,et).call(this),t(this,p)){const o=t(this,A).exec({pathname:s}),c=(o==null?void 0:o.pathname.groups)||{},f=Object.fromEntries(new URLSearchParams(location.search)),u={pathnameParams:c,searchParams:f};$.isESClass(t(this,p))?n(this,d,new(t(this,p))(u)):n(this,d,ot.instantiate(t(this,p),{attributes:u})),e.appendChild(t(this,d)),n(this,S,t(this,d).querySelector("[data-nest]")||((h=t(this,d).shadowRoot)==null?void 0:h.querySelector("[data-nest]"))||t(this,d).shadowRoot||t(this,d)),n(this,v,!0)}t(this,L).disconnect()})}close(){var e;t(this,L).disconnect(),(e=t(this,d))==null||e.remove(),n(this,v,!1),t(this,E).forEach(s=>document.head.removeChild(s)),n(this,E,[])}getAnchorElements(){var s;let e=[];return t(this,d)&&(e=[...t(this,d).querySelectorAll("a")]),(s=t(this,d))!=null&&s.shadowRoot&&(e=[...e,...t(this,d).shadowRoot.querySelectorAll("a")]),e}}R=new WeakMap,O=new WeakMap,A=new WeakMap,p=new WeakMap,d=new WeakMap,v=new WeakMap,S=new WeakMap,L=new WeakMap,b=new WeakMap,E=new WeakMap,x=new WeakSet,et=function(){return M(this,null,function*(){const e=t(this,b).filter(c=>c instanceof HTMLElement?c.tagName==="STYLE"||c.tagName==="SCRIPT"||c.tagName==="LINK":!1);try{for(var s=Y(e),i,h,o;i=!(h=yield s.next()).done;i=!1){const c=h.value;yield new Promise(f=>{c.onload=()=>{f()}})}}catch(h){o=[h]}finally{try{i&&(h=s.return)&&(yield h.call(s))}finally{if(o)throw o[0]}}})};var k,m,P,U,q,j;class lt{constructor(e,s){r(this,k,void 0);r(this,m,void 0);r(this,P,void 0);r(this,U,void 0);r(this,q,void 0);r(this,j,e=>{e.preventDefault(),t(this,k).links.forEach(s=>{var i;t(this,P)===t(s,P)||(i=t(s,q))!=null&&i.includes(t(this,P))?t(s,m).classList.add("clicked"):t(s,m).classList.remove("clicked")}),t(this,k).navigate(t(this,P),t(this,U))});var o,c;n(this,k,e),n(this,m,s),n(this,P,t(this,m).getAttribute("href")||"/"),n(this,U,t(this,m).getAttribute("data-history-action")||"push"),t(this,m).addEventListener("click",t(this,j));const i=e.normalizePath(t(this,P)),h=e.normalizePath(location.pathname);n(this,q,(o=t(this,m).getAttribute("data-match-paths"))==null?void 0:o.split(",").map(f=>e.normalizePath(f.trim()).pathname)),t(this,m).hasAttribute("data-include")?h.pathname.includes(i.pathname)&&t(this,m).classList.add("current"):i.pathname===h.pathname||(c=t(this,q))!=null&&c.includes(h.pathname)?(t(this,m).classList.add("current"),t(this,m).classList.add("clicked")):t(this,m).classList.remove("clicked")}destroy(){t(this,m).removeEventListener("click",t(this,j)),t(this,m).classList.remove("current")}}k=new WeakMap,m=new WeakMap,P=new WeakMap,U=new WeakMap,q=new WeakMap,j=new WeakMap;globalThis.URLPattern=at.URLPattern;var C,N,g,z,T,y,H,B,I,_,st,D;class ut{constructor(e){r(this,_);r(this,C,null);r(this,N,null);r(this,g,[]);r(this,z,null);r(this,T,[]);r(this,y,void 0);r(this,H,null);r(this,B,new rt.Notifier);r(this,I,ht.debounce(()=>{const e=s=>s.split("/").length;n(this,g,t(this,g).sort((s,i)=>e(s.pattern)-e(i.pattern))),this.navigate(location.pathname)},0));r(this,D,e=>{e.state&&this.navigate(e.state,"none")});tt.isBrowser&&(e!=null&&e.base?n(this,N,F.normalizeBase(e.base)):n(this,N,"/"),n(this,C,(e==null?void 0:e.rootElement)||document.body),addEventListener("popstate",t(this,D)))}get currentPathname(){return t(this,H)}get candidatePathname(){return t(this,y)}get routes(){return t(this,g)}get links(){return t(this,T)}navigationEvent(e){return t(this,B).subscribe(e)}defineRoute(e,s){const i=new ct(e,s);t(this,g).push(i),t(this,I).call(this)}navigate(e,s="push"){return M(this,null,function*(){var Q,V;const i=this.normalizePath(e);let{pathname:h,hash:o,parameters:c,leaf:f}=i;if(t(this,y)===h||t(this,H)===h)return;n(this,y,h);const u=t(this,g).filter(l=>l.isActive),w=t(this,g).filter(l=>!u.includes(l)&&l.testPathname(f)),it=u.filter(l=>!l.testPathname(f)),G=u.filter(l=>l.testPathname(f));let J=!0;if(this.preprocessor)try{yield new Promise((l,nt)=>{var X;(X=this.preprocessor)==null||X.call(this,{path:i,resolve:l,reject:nt})})}catch(l){l?console.error(l):console.log("Route change canceled"),J=!1}if(J&&t(this,y)===h){n(this,z,G[G.length-1]),it.forEach(l=>{l.close()}),n(this,H,h),F.changeHistory(s,h,c,o);try{for(var ft=Y(w),pt,gt,Pt;pt=!(gt=yield ft.next()).done;pt=!1){const l=gt.value;yield l.render(((Q=t(this,z))==null?void 0:Q.nest)||t(this,C),h),n(this,z,l)}}catch(gt){Pt=[gt]}finally{try{pt&&(gt=ft.return)&&(yield gt.call(ft))}finally{if(Pt)throw Pt[0]}}W(this,_,st).call(this),(V=this.postprocessor)==null||V.call(this,{pathname:h}),t(this,B).notify({pathname:h})}})}normalizePath(e){return F.splitPath(e,t(this,N))}}C=new WeakMap,N=new WeakMap,g=new WeakMap,z=new WeakMap,T=new WeakMap,y=new WeakMap,H=new WeakMap,B=new WeakMap,I=new WeakMap,_=new WeakSet,st=function(){const e=t(this,g).filter(i=>i.isActive),s=Array.from(new Set([...t(this,C).querySelectorAll("a"),...e.map(i=>i.getAnchorElements()).flat()].filter(i=>{var h;return(h=i.getAttribute("href"))==null?void 0:h.startsWith("/")})));t(this,T).forEach(i=>{i.destroy()}),n(this,T,s.map(i=>new lt(this,i)))},D=new WeakMap;exports.Router=ut;
@@ -1,66 +1,66 @@
1
- var Z = (n, e) => (e = Symbol[n]) ? e : Symbol.for("Symbol." + n);
2
- var Y = (n, e, s) => {
1
+ var X = (n, e) => (e = Symbol[n]) ? e : Symbol.for("Symbol." + n);
2
+ var W = (n, e, s) => {
3
3
  if (!e.has(n))
4
4
  throw TypeError("Cannot " + s);
5
5
  };
6
- var t = (n, e, s) => (Y(n, e, "read from private field"), s ? s.call(n) : e.get(n)), h = (n, e, s) => {
6
+ var t = (n, e, s) => (W(n, e, "read from private field"), s ? s.call(n) : e.get(n)), h = (n, e, s) => {
7
7
  if (e.has(n))
8
8
  throw TypeError("Cannot add the same private member more than once");
9
9
  e instanceof WeakSet ? e.add(n) : e.set(n, s);
10
- }, a = (n, e, s, i) => (Y(n, e, "write to private field"), i ? i.call(n, s) : e.set(n, s), s);
11
- var $ = (n, e, s) => (Y(n, e, "access private method"), s);
10
+ }, a = (n, e, s, i) => (W(n, e, "write to private field"), i ? i.call(n, s) : e.set(n, s), s);
11
+ var Y = (n, e, s) => (W(n, e, "access private method"), s);
12
12
  var I = (n, e, s) => new Promise((i, r) => {
13
13
  var o = (u) => {
14
14
  try {
15
15
  f(s.next(u));
16
- } catch (v) {
17
- r(v);
16
+ } catch (w) {
17
+ r(w);
18
18
  }
19
19
  }, c = (u) => {
20
20
  try {
21
21
  f(s.throw(u));
22
- } catch (v) {
23
- r(v);
22
+ } catch (w) {
23
+ r(w);
24
24
  }
25
25
  }, f = (u) => u.done ? i(u.value) : Promise.resolve(u.value).then(o, c);
26
26
  f((s = s.apply(n, e)).next());
27
27
  });
28
- var F = (n, e, s) => (e = n[Z("asyncIterator")]) ? e.call(n) : (n = n[Z("iterator")](), e = {}, s = (i, r) => (r = n[i]) && (e[i] = (o) => new Promise((c, f, u) => (o = r.call(n, o), u = o.done, Promise.resolve(o.value).then((v) => c({ value: v, done: u }), f)))), s("next"), s("return"), e);
29
- import { URLPattern as ht } from "urlpattern-polyfill";
30
- import { Notifier as rt } from "../notifier/index.js";
31
- import { i as et } from "../browser-0zX67oeU.js";
32
- import { d as ot } from "../function-C10DGppn.js";
33
- import { n as ct, c as lt, s as ut } from "../url-DMNfW7uN.js";
34
- import { i as mt } from "../instantiate-D19Uvc31.js";
35
- import { i as _ } from "../object-D6MVWB4l.js";
36
- var R, U, A, p, m, w, k, L, E, b, M, st;
37
- class dt {
28
+ var $ = (n, e, s) => (e = n[X("asyncIterator")]) ? e.call(n) : (n = n[X("iterator")](), e = {}, s = (i, r) => (r = n[i]) && (e[i] = (o) => new Promise((c, f, u) => (o = r.call(n, o), u = o.done, Promise.resolve(o.value).then((w) => c({ value: w, done: u }), f)))), s("next"), s("return"), e);
29
+ import { URLPattern as at } from "urlpattern-polyfill";
30
+ import { Notifier as nt } from "../notifier/index.js";
31
+ import { i as _ } from "../browser-0zX67oeU.js";
32
+ import { d as ht } from "../function-C10DGppn.js";
33
+ import { n as rt, c as ot, s as ct } from "../url-DMNfW7uN.js";
34
+ import { i as lt } from "../instantiate-D87JFF1W.js";
35
+ import { i as Z } from "../object-D6MVWB4l.js";
36
+ var y, U, A, p, m, L, k, v, E, R, M, tt;
37
+ class ut {
38
38
  constructor(e, s) {
39
39
  h(this, M);
40
- h(this, R, void 0);
40
+ h(this, y, void 0);
41
41
  h(this, U, void 0);
42
42
  h(this, A, void 0);
43
43
  h(this, p, void 0);
44
44
  h(this, m, void 0);
45
- h(this, w, void 0);
45
+ h(this, L, void 0);
46
46
  h(this, k, void 0);
47
- h(this, L, null);
47
+ h(this, v, null);
48
48
  h(this, E, []);
49
- h(this, b, []);
50
- a(this, R, e), a(this, U, s), a(this, A, new URLPattern({ pathname: t(this, R) })), a(this, p, null), a(this, m, null), a(this, w, !1), a(this, k, null), et && a(this, L, new MutationObserver((i) => {
49
+ h(this, R, []);
50
+ a(this, y, e), a(this, U, s), a(this, A, new URLPattern({ pathname: t(this, y) })), a(this, p, null), a(this, m, null), a(this, L, !1), a(this, k, null), _ && a(this, v, new MutationObserver((i) => {
51
51
  i[0].addedNodes.forEach((o) => {
52
- t(this, p) ? t(this, b).push(o) : t(this, E).push(o);
52
+ t(this, p) ? t(this, R).push(o) : t(this, E).push(o);
53
53
  });
54
54
  }));
55
55
  }
56
56
  get pattern() {
57
- return t(this, R);
57
+ return t(this, y);
58
58
  }
59
59
  get urlPattern() {
60
60
  return t(this, A);
61
61
  }
62
62
  get isActive() {
63
- return t(this, w);
63
+ return t(this, L);
64
64
  }
65
65
  get element() {
66
66
  return t(this, m);
@@ -74,7 +74,7 @@ class dt {
74
74
  render(e, s) {
75
75
  return I(this, null, function* () {
76
76
  var i, r;
77
- if (t(this, L).observe(document.head, {
77
+ if (t(this, v).observe(document.head, {
78
78
  childList: !0,
79
79
  subtree: !0
80
80
  }), t(this, p))
@@ -83,28 +83,28 @@ class dt {
83
83
  });
84
84
  else {
85
85
  const o = yield t(this, U).call(this);
86
- if (a(this, b, [...t(this, E)]), typeof o.default == "function" && (a(this, p, o.default), _(o.default))) {
86
+ if (a(this, R, [...t(this, E)]), typeof o.default == "function" && (a(this, p, o.default), Z(o.default))) {
87
87
  const c = "e-" + ((i = t(this, p)) == null ? void 0 : i.name.toLowerCase());
88
88
  customElements.get(c) || customElements.define(c, o.default);
89
89
  }
90
90
  }
91
- if (yield $(this, M, st).call(this), t(this, p)) {
91
+ if (yield Y(this, M, tt).call(this), t(this, p)) {
92
92
  const o = t(this, A).exec({ pathname: s }), c = (o == null ? void 0 : o.pathname.groups) || {}, f = Object.fromEntries(
93
93
  new URLSearchParams(location.search)
94
94
  ), u = {
95
95
  pathnameParams: c,
96
96
  searchParams: f
97
97
  };
98
- _(t(this, p)) ? a(this, m, new (t(this, p))(u)) : a(this, m, mt(t(this, p), {
98
+ Z(t(this, p)) ? a(this, m, new (t(this, p))(u)) : a(this, m, lt(t(this, p), {
99
99
  attributes: u
100
- })), e.appendChild(t(this, m)), a(this, k, t(this, m).querySelector("[data-nest]") || ((r = t(this, m).shadowRoot) == null ? void 0 : r.querySelector("[data-nest]")) || t(this, m).shadowRoot || t(this, m)), a(this, w, !0);
100
+ })), e.appendChild(t(this, m)), a(this, k, t(this, m).querySelector("[data-nest]") || ((r = t(this, m).shadowRoot) == null ? void 0 : r.querySelector("[data-nest]")) || t(this, m).shadowRoot || t(this, m)), a(this, L, !0);
101
101
  }
102
- t(this, L).disconnect();
102
+ t(this, v).disconnect();
103
103
  });
104
104
  }
105
105
  close() {
106
106
  var e;
107
- t(this, L).disconnect(), (e = t(this, m)) == null || e.remove(), a(this, w, !1), t(this, b).forEach((s) => document.head.removeChild(s)), a(this, b, []);
107
+ t(this, v).disconnect(), (e = t(this, m)) == null || e.remove(), a(this, L, !1), t(this, R).forEach((s) => document.head.removeChild(s)), a(this, R, []);
108
108
  }
109
109
  getAnchorElements() {
110
110
  var s;
@@ -115,11 +115,11 @@ class dt {
115
115
  ]), e;
116
116
  }
117
117
  }
118
- R = new WeakMap(), U = new WeakMap(), A = new WeakMap(), p = new WeakMap(), m = new WeakMap(), w = new WeakMap(), k = new WeakMap(), L = new WeakMap(), E = new WeakMap(), b = new WeakMap(), M = new WeakSet(), st = function() {
118
+ y = new WeakMap(), U = new WeakMap(), A = new WeakMap(), p = new WeakMap(), m = new WeakMap(), L = new WeakMap(), k = new WeakMap(), v = new WeakMap(), E = new WeakMap(), R = new WeakMap(), M = new WeakSet(), tt = function() {
119
119
  return I(this, null, function* () {
120
120
  const e = t(this, E).filter((c) => c instanceof HTMLElement ? c.tagName === "STYLE" || c.tagName === "SCRIPT" || c.tagName === "LINK" : !1);
121
121
  try {
122
- for (var s = F(e), i, r, o; i = !(r = yield s.next()).done; i = !1) {
122
+ for (var s = $(e), i, r, o; i = !(r = yield s.next()).done; i = !1) {
123
123
  const c = r.value;
124
124
  yield new Promise((f) => {
125
125
  c.onload = () => {
@@ -140,7 +140,7 @@ R = new WeakMap(), U = new WeakMap(), A = new WeakMap(), p = new WeakMap(), m =
140
140
  });
141
141
  };
142
142
  var S, d, P, O, N, x;
143
- class ft {
143
+ class mt {
144
144
  constructor(e, s) {
145
145
  h(this, S, void 0);
146
146
  h(this, d, void 0);
@@ -165,9 +165,9 @@ class ft {
165
165
  }
166
166
  }
167
167
  S = new WeakMap(), d = new WeakMap(), P = new WeakMap(), O = new WeakMap(), N = new WeakMap(), x = new WeakMap();
168
- globalThis.URLPattern = ht;
169
- var C, z, g, q, H, y, T, B, j, D, it, K;
170
- const W = class W {
168
+ globalThis.URLPattern = at;
169
+ var C, z, g, q, H, b, T, B, j, D, et, K;
170
+ class Et {
171
171
  constructor(e) {
172
172
  h(this, D);
173
173
  h(this, C, null);
@@ -175,23 +175,23 @@ const W = class W {
175
175
  h(this, g, []);
176
176
  h(this, q, null);
177
177
  h(this, H, []);
178
- h(this, y, void 0);
178
+ h(this, b, void 0);
179
179
  h(this, T, null);
180
- h(this, B, new rt());
181
- h(this, j, ot(() => {
180
+ h(this, B, new nt());
181
+ h(this, j, ht(() => {
182
182
  const e = (s) => s.split("/").length;
183
183
  a(this, g, t(this, g).sort((s, i) => e(s.pattern) - e(i.pattern))), this.navigate(location.pathname);
184
184
  }, 0));
185
185
  h(this, K, (e) => {
186
186
  e.state && this.navigate(e.state, "none");
187
187
  });
188
- et && (e != null && e.base ? a(this, z, ct(e.base)) : a(this, z, "/"), W.active = this, a(this, C, (e == null ? void 0 : e.rootElement) || document.body), addEventListener("popstate", t(this, K)));
188
+ _ && (e != null && e.base ? a(this, z, rt(e.base)) : a(this, z, "/"), a(this, C, (e == null ? void 0 : e.rootElement) || document.body), addEventListener("popstate", t(this, K)));
189
189
  }
190
190
  get currentPathname() {
191
191
  return t(this, T);
192
192
  }
193
193
  get candidatePathname() {
194
- return t(this, y);
194
+ return t(this, b);
195
195
  }
196
196
  get routes() {
197
197
  return t(this, g);
@@ -203,58 +203,58 @@ const W = class W {
203
203
  return t(this, B).subscribe(e);
204
204
  }
205
205
  defineRoute(e, s) {
206
- const i = new dt(e, s);
206
+ const i = new ut(e, s);
207
207
  t(this, g).push(i), t(this, j).call(this);
208
208
  }
209
209
  navigate(e, s = "push") {
210
210
  return I(this, null, function* () {
211
- var Q, V;
211
+ var J, Q;
212
212
  const i = this.normalizePath(e);
213
213
  let { pathname: r, hash: o, parameters: c, leaf: f } = i;
214
- if (t(this, y) === r || t(this, T) === r)
214
+ if (t(this, b) === r || t(this, T) === r)
215
215
  return;
216
- W.active = this, a(this, y, r);
217
- const u = t(this, g).filter((l) => l.isActive), v = t(this, g).filter(
216
+ a(this, b, r);
217
+ const u = t(this, g).filter((l) => l.isActive), w = t(this, g).filter(
218
218
  (l) => !u.includes(l) && l.testPathname(f)
219
- ), at = u.filter((l) => !l.testPathname(f)), G = u.filter((l) => l.testPathname(f));
220
- let J = !0;
219
+ ), st = u.filter((l) => !l.testPathname(f)), F = u.filter((l) => l.testPathname(f));
220
+ let G = !0;
221
221
  if (this.preprocessor)
222
222
  try {
223
- yield new Promise((l, nt) => {
224
- var X;
225
- (X = this.preprocessor) == null || X.call(this, { path: i, resolve: l, reject: nt });
223
+ yield new Promise((l, it) => {
224
+ var V;
225
+ (V = this.preprocessor) == null || V.call(this, { path: i, resolve: l, reject: it });
226
226
  });
227
227
  } catch (l) {
228
- l ? console.error(l) : console.log("Route change canceled"), J = !1;
228
+ l ? console.error(l) : console.log("Route change canceled"), G = !1;
229
229
  }
230
- if (J && t(this, y) === r) {
231
- a(this, q, G[G.length - 1]), at.forEach((l) => {
230
+ if (G && t(this, b) === r) {
231
+ a(this, q, F[F.length - 1]), st.forEach((l) => {
232
232
  l.close();
233
- }), a(this, T, r);
233
+ }), a(this, T, r), ot(s, r, c, o);
234
234
  try {
235
- for (var At = F(v), kt, St, Nt; kt = !(St = yield At.next()).done; kt = !1) {
236
- const l = St.value;
237
- yield l.render(((Q = t(this, q)) == null ? void 0 : Q.nest) || t(this, C), r), a(this, q, l);
235
+ for (var yt = $(w), At, kt, St; At = !(kt = yield yt.next()).done; At = !1) {
236
+ const l = kt.value;
237
+ yield l.render(((J = t(this, q)) == null ? void 0 : J.nest) || t(this, C), r), a(this, q, l);
238
238
  }
239
- } catch (St) {
240
- Nt = [St];
239
+ } catch (kt) {
240
+ St = [kt];
241
241
  } finally {
242
242
  try {
243
- kt && (St = At.return) && (yield St.call(At));
243
+ At && (kt = yt.return) && (yield kt.call(yt));
244
244
  } finally {
245
- if (Nt)
246
- throw Nt[0];
245
+ if (St)
246
+ throw St[0];
247
247
  }
248
248
  }
249
- lt(s, r, c, o), $(this, D, it).call(this), (V = this.postprocessor) == null || V.call(this, { pathname: r }), t(this, B).notify({ pathname: r });
249
+ Y(this, D, et).call(this), (Q = this.postprocessor) == null || Q.call(this, { pathname: r }), t(this, B).notify({ pathname: r });
250
250
  }
251
251
  });
252
252
  }
253
253
  normalizePath(e) {
254
- return ut(e, t(this, z));
254
+ return ct(e, t(this, z));
255
255
  }
256
- };
257
- C = new WeakMap(), z = new WeakMap(), g = new WeakMap(), q = new WeakMap(), H = new WeakMap(), y = new WeakMap(), T = new WeakMap(), B = new WeakMap(), j = new WeakMap(), D = new WeakSet(), it = function() {
256
+ }
257
+ C = new WeakMap(), z = new WeakMap(), g = new WeakMap(), q = new WeakMap(), H = new WeakMap(), b = new WeakMap(), T = new WeakMap(), B = new WeakMap(), j = new WeakMap(), D = new WeakSet(), et = function() {
258
258
  const e = t(this, g).filter((i) => i.isActive), s = Array.from(
259
259
  new Set(
260
260
  [
@@ -268,9 +268,8 @@ C = new WeakMap(), z = new WeakMap(), g = new WeakMap(), q = new WeakMap(), H =
268
268
  );
269
269
  t(this, H).forEach((i) => {
270
270
  i.destroy();
271
- }), a(this, H, s.map((i) => new ft(this, i)));
271
+ }), a(this, H, s.map((i) => new mt(this, i)));
272
272
  }, K = new WeakMap();
273
- let tt = W;
274
273
  export {
275
- tt as Router
274
+ Et as Router
276
275
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aptechka",
3
- "version": "0.7.0",
3
+ "version": "0.7.2",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/denisavitski/aptechka.git"
@@ -1 +0,0 @@
1
- "use strict";var L=Object.defineProperty,S=Object.defineProperties;var q=Object.getOwnPropertyDescriptors;var k=Object.getOwnPropertySymbols;var T=Object.prototype.hasOwnProperty,_=Object.prototype.propertyIsEnumerable;var w=(t,e,n)=>e in t?L(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,i=(t,e)=>{for(var n in e||(e={}))T.call(e,n)&&w(t,n,e[n]);if(k)for(var n of k(e))_.call(e,n)&&w(t,n,e[n]);return t},g=(t,e)=>S(t,q(e));var F=(t,e,n)=>{if(!e.has(t))throw TypeError("Cannot "+n)};var l=(t,e,n)=>(F(t,e,"read from private field"),n?n.call(t):e.get(t)),h=(t,e,n)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,n)};const p=require("./ElementConstructor-CAZ2ra8m.cjs"),M=require("./string-DhgS_iFl.cjs"),r=require("./globals-bYKki-b9.cjs");require("./Store-6s0YXK4o.cjs");var E,d,u,m,C;class R extends HTMLElement{constructor(n){var c;super();h(this,E,new Set);h(this,d,new Set);h(this,u,new Map);h(this,m,()=>{r.contextStack.value.push(l(this,u))});h(this,C,()=>{r.contextStack.value=r.contextStack.value.filter(n=>n!==l(this,u))});const o=r.currentComponentElement.value;r.currentComponentElement.value=this,l(this,m).call(this);const a=n==null?void 0:n.tag(i({},n.attributes)),s=(c=r.nextComponentAttributes.value)!=null&&c.lightChildren?"lightChildren":"children";new p.ElementConstructor(this,g(i({},r.nextComponentAttributes.value),{[s]:a})),r.currentComponentElement.value=o,r.nextComponentAttributes.value=null,l(this,C).call(this)}addConnectCallback(n){l(this,E).add(n)}addDisconnectCallback(n){l(this,d).add(n)}createContext(n,o){l(this,u).set(n,o)}connectedCallback(){r.currentComponentElement.value=this,l(this,E).forEach(n=>{const o=n(this);o&&l(this,d).add(o)}),r.currentComponentElement.value=null,this.addEventListener("beforeChildrenChange",l(this,m)),this.addEventListener("afterChildrenChange",l(this,C))}disconnectedCallback(){l(this,d).forEach(n=>{n(this)}),this.removeEventListener("beforeChildrenChange",l(this,m)),this.removeEventListener("afterChildrenChange",l(this,C))}}E=new WeakMap,d=new WeakMap,u=new WeakMap,m=new WeakMap,C=new WeakMap;function y(t,e,...n){var s;n=n.flat();const o=[],a=[];if(e=e||{},o.push(...n.reverse()),typeof t=="function"){if(t===v)return v(n);e.children=o.reverse();const c={noCustomElement:t.noCustomElement,onlyRegister:e.__register};if(e==null||delete e.__register,c.noCustomElement)return t(i({},e));const x=`e-${M.camelToKebab(t.name)}`;let f=customElements.get(x);return f||(f=(s=class extends R{constructor(A){super(c.onlyRegister?{tag:t,attributes:e}:A)}},s.formAssociated=t.formAssociated,s),customElements.define(x,f)),c.onlyRegister?f:new f({tag:t,attributes:e})}for(;o.length;){const c=o.pop();Array.isArray(c)?o.push(...c):c!=null&&a.push(c)}if(t==="component"){const c=v(a);return r.nextComponentAttributes.value=e,c.node}else{const c=e!=null&&e.lightChildren?"lightChildren":"children";return e==null||delete e.children,t?new p.ElementConstructor(t,g(i({},e),{[c]:a})):null}}function v(t){return new p.ElementConstructor(document.createDocumentFragment(),{children:t})}function D(t,e){const n=e==null?void 0:e.children,o=e==null?void 0:e.attributes;return y(t,i({},o),n)}exports.Fragment=v;exports.h=y;exports.instantiate=D;