aptechka 0.5.42 → 0.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (273) hide show
  1. package/lib/Animation-6Na1MCtM.cjs +1 -0
  2. package/lib/Animation-CELiTw3n.js +132 -0
  3. package/lib/Composed-DmLYTh1b.js +35 -0
  4. package/lib/Composed-Dx2hs-va.cjs +1 -0
  5. package/lib/{Damped-P4MkCGoY.js → Damped-Mx_FNNVz.js} +2 -5
  6. package/lib/Damped-loFiBsBy.cjs +1 -0
  7. package/lib/{Derived-kPJs5JC5.js → Derived-DlCvc0xQ.js} +1 -1
  8. package/lib/{Derived-B-g8dYgh.cjs → Derived-a6MDQEPY.cjs} +1 -1
  9. package/lib/ElementConstructor-CAZ2ra8m.cjs +1 -0
  10. package/lib/ElementConstructor-OYlPJf2L.js +366 -0
  11. package/lib/Resource-D3TQormz.cjs +1 -0
  12. package/lib/Resource-DIcoALGo.js +64 -0
  13. package/lib/{SourceManager-Q-PB-Rkh.js → SourceManager-Bz329f90.js} +1 -1
  14. package/lib/{SourceManager-vSlsMKUE.cjs → SourceManager-kxr5eUyL.cjs} +1 -1
  15. package/lib/Store-6s0YXK4o.cjs +1 -0
  16. package/lib/{Store-BQXXikps.js → Store-BI2xxXOA.js} +42 -42
  17. package/lib/Tweened-B_mclQ61.cjs +1 -0
  18. package/lib/Tweened-NE8M9onF.js +48 -0
  19. package/lib/{Viewport-DMB0dO-s.cjs → Viewport-CJeKnL5V.cjs} +1 -1
  20. package/lib/{Viewport-CFFhFKqX.js → Viewport-D9IL7kUQ.js} +1 -1
  21. package/lib/_createStore-Cf1MyeHa.cjs +1 -0
  22. package/lib/_createStore-Ck9bHolX.js +12 -0
  23. package/lib/accordion/AccordionElement.d.ts +5 -2
  24. package/lib/accordion/index.cjs +1 -1
  25. package/lib/accordion/index.js +141 -105
  26. package/lib/animation/Animation.d.ts +11 -19
  27. package/lib/animation/Damped.d.ts +4 -6
  28. package/lib/animation/Tweened.d.ts +2 -4
  29. package/lib/animation/index.cjs +1 -1
  30. package/lib/animation/index.js +3 -3
  31. package/lib/attribute/index.cjs +1 -1
  32. package/lib/attribute/index.d.ts +1 -1
  33. package/lib/attribute/index.js +31 -31
  34. package/lib/canvas/index.cjs +1 -1
  35. package/lib/canvas/index.d.ts +1 -1
  36. package/lib/canvas/index.js +29 -29
  37. package/lib/checkbox/index.cjs +1 -1
  38. package/lib/checkbox/index.js +20 -20
  39. package/lib/class-linked-status/index.cjs +1 -1
  40. package/lib/class-linked-status/index.js +1 -1
  41. package/lib/controls/AutoplayControls.d.ts +1 -1
  42. package/lib/controls/DragControls.d.ts +1 -1
  43. package/lib/controls/WheelControls.d.ts +1 -1
  44. package/lib/controls/index.cjs +1 -1
  45. package/lib/controls/index.js +3 -3
  46. package/lib/counter/index.d.ts +8 -0
  47. package/lib/{createStylesheet-DBCEbDjI.js → createStylesheet-CR_yi5tp.js} +1 -1
  48. package/lib/{createStylesheet-CqHU9_qv.cjs → createStylesheet-p23sZ7Ey.cjs} +1 -1
  49. package/lib/css-property/index.cjs +1 -1
  50. package/lib/css-property/index.d.ts +2 -1
  51. package/lib/css-property/index.js +36 -32
  52. package/lib/custom-element/index.d.ts +1 -4
  53. package/lib/dev/index.cjs +1 -1
  54. package/lib/dev/index.js +1 -1
  55. package/lib/device/index.cjs +1 -1
  56. package/lib/device/index.js +1 -1
  57. package/lib/element-constructor/ElementConstructor.d.ts +2 -2
  58. package/lib/element-constructor/index.cjs +1 -1
  59. package/lib/element-constructor/index.js +114 -113
  60. package/lib/en3/core/En3Raycaster.d.ts +20 -0
  61. package/lib/en3/core/En3View.d.ts +1 -1
  62. package/lib/en3/core/en3.d.ts +7 -3
  63. package/lib/en3/helpers/En3Controls.d.ts +5 -0
  64. package/lib/en3/helpers/En3GridHelper.d.ts +8 -0
  65. package/lib/en3/helpers/En3Object3dManager.d.ts +12 -0
  66. package/lib/en3/helpers/En3OrbitControls.d.ts +8 -0
  67. package/lib/en3/helpers/En3TransformControls.d.ts +8 -0
  68. package/lib/en3/helpers/index.cjs +1 -0
  69. package/lib/en3/helpers/index.d.ts +2 -0
  70. package/lib/en3/helpers/index.js +1165 -0
  71. package/lib/en3/index.cjs +1 -215
  72. package/lib/en3/index.d.ts +1 -19
  73. package/lib/en3/index.js +4 -4227
  74. package/lib/en3/libs/index.cjs +1 -0
  75. package/lib/en3/libs/index.d.ts +1 -0
  76. package/lib/en3/libs/index.js +201 -0
  77. package/lib/en3/loaders/_En3GLTFLoader.d.ts +12 -0
  78. package/lib/en3/loaders/_En3TextureLoader.d.ts +8 -0
  79. package/lib/en3/loaders/index.cjs +1 -0
  80. package/lib/en3/loaders/index.d.ts +3 -0
  81. package/lib/en3/loaders/index.js +1757 -0
  82. package/lib/en3/loaders/loaders.d.ts +13 -0
  83. package/lib/en3/misc/index.cjs +10 -0
  84. package/lib/en3/misc/index.d.ts +2 -0
  85. package/lib/en3/misc/index.js +115 -0
  86. package/lib/en3/objects/En3Clip.d.ts +1 -1
  87. package/lib/en3/objects/En3ClipHelpers.d.ts +1 -1
  88. package/lib/en3/objects/En3GLTF.d.ts +4 -3
  89. package/lib/en3/objects/En3Image.d.ts +1 -1
  90. package/lib/en3/objects/En3ImageLike.d.ts +3 -2
  91. package/lib/en3/objects/En3SourceConsumer.d.ts +1 -1
  92. package/lib/en3/objects/En3Video.d.ts +1 -1
  93. package/lib/en3/objects/fluid/Advection.d.ts +1 -1
  94. package/lib/en3/objects/fluid/Divergence.d.ts +1 -1
  95. package/lib/en3/objects/fluid/En3Fluid.d.ts +1 -1
  96. package/lib/en3/objects/fluid/En3FluidElement.d.ts +1 -1
  97. package/lib/en3/objects/fluid/ExternalForce.d.ts +1 -1
  98. package/lib/en3/objects/fluid/Poisson.d.ts +1 -1
  99. package/lib/en3/objects/fluid/Pressure.d.ts +1 -1
  100. package/lib/en3/objects/fluid/Simulation.d.ts +1 -1
  101. package/lib/en3/objects/fluid/Viscous.d.ts +1 -1
  102. package/lib/en3/objects/fluid/index.d.ts +0 -3
  103. package/lib/en3/objects/index.d.ts +7 -0
  104. package/lib/en3/utils/coverTexture.d.ts +1 -1
  105. package/lib/en3/utils/index.cjs +1 -0
  106. package/lib/en3/utils/index.d.ts +5 -0
  107. package/lib/en3/utils/index.js +43 -0
  108. package/lib/en3-C4mzaF6q.cjs +8 -0
  109. package/lib/en3-hbkN1OPu.js +343 -0
  110. package/lib/globals-DMjysUXI.js +8 -0
  111. package/lib/globals-bYKki-b9.cjs +1 -0
  112. package/lib/image/index.cjs +1 -1
  113. package/lib/image/index.js +1 -1
  114. package/lib/{index-BtsOv9u0.js → index-BAH_fO2N.js} +66 -66
  115. package/lib/index-D1LQUR-R.cjs +9 -0
  116. package/lib/instantiate-D19Uvc31.js +125 -0
  117. package/lib/instantiate-Db5gGSYG.cjs +1 -0
  118. package/lib/jsx/ComponentElement.d.ts +18 -0
  119. package/lib/jsx/globals.d.ts +13 -0
  120. package/lib/jsx/h.d.ts +7 -0
  121. package/lib/jsx/hooks/basic/_createStore.d.ts +4 -0
  122. package/lib/jsx/hooks/basic/attachInternals.d.ts +1 -0
  123. package/lib/jsx/hooks/basic/attachShadow.d.ts +1 -0
  124. package/lib/jsx/hooks/basic/attachStylesheet.d.ts +3 -0
  125. package/lib/jsx/hooks/basic/createContext.d.ts +2 -0
  126. package/lib/jsx/hooks/basic/onConnect.d.ts +3 -0
  127. package/lib/jsx/hooks/basic/onDisconnect.d.ts +3 -0
  128. package/lib/jsx/hooks/onAnimationFrame.cjs +1 -0
  129. package/lib/jsx/hooks/onAnimationFrame.d.ts +6 -0
  130. package/lib/jsx/hooks/onAnimationFrame.js +22 -0
  131. package/lib/jsx/hooks/onElementResize.cjs +1 -0
  132. package/lib/jsx/hooks/onElementResize.d.ts +5 -0
  133. package/lib/jsx/hooks/onElementResize.js +11 -0
  134. package/lib/jsx/hooks/onIntersection.cjs +1 -0
  135. package/lib/jsx/hooks/onIntersection.d.ts +5 -0
  136. package/lib/jsx/hooks/onIntersection.js +11 -0
  137. package/lib/jsx/hooks/onWindowResize.cjs +1 -0
  138. package/lib/jsx/hooks/onWindowResize.d.ts +3 -0
  139. package/lib/jsx/hooks/onWindowResize.js +8 -0
  140. package/lib/jsx/hooks/store/createArrayStore.d.ts +3 -0
  141. package/lib/jsx/hooks/store/createComposed.d.ts +3 -0
  142. package/lib/jsx/hooks/store/createDerived.d.ts +3 -0
  143. package/lib/jsx/hooks/store/createDerivedArray.d.ts +3 -0
  144. package/lib/jsx/hooks/store/createDerivedComponent.d.ts +3 -0
  145. package/lib/jsx/hooks/store/createDerivedComponents.d.ts +3 -0
  146. package/lib/jsx/hooks/store/createResource.d.ts +3 -0
  147. package/lib/jsx/hooks/store/createStore.d.ts +3 -0
  148. package/lib/jsx/hooks/store/index.cjs +1 -0
  149. package/lib/jsx/hooks/store/index.d.ts +7 -0
  150. package/lib/jsx/hooks/store/index.js +49 -0
  151. package/lib/jsx/hooks/watchAttribute.cjs +1 -0
  152. package/lib/jsx/hooks/watchAttribute.d.ts +6 -0
  153. package/lib/jsx/hooks/watchAttribute.js +17 -0
  154. package/lib/jsx/hooks/watchCSSProperty.cjs +1 -0
  155. package/lib/jsx/hooks/watchCSSProperty.d.ts +7 -0
  156. package/lib/jsx/hooks/watchCSSProperty.js +17 -0
  157. package/lib/jsx/index.cjs +1 -0
  158. package/lib/jsx/index.d.ts +13 -0
  159. package/lib/jsx/index.js +91 -0
  160. package/lib/jsx/instantiate.d.ts +5 -0
  161. package/lib/jsx/register.d.ts +1 -0
  162. package/lib/jsx/render.d.ts +6 -0
  163. package/lib/jsx/type.d.ts +188 -0
  164. package/lib/ladder/index.cjs +1 -1
  165. package/lib/ladder/index.d.ts +2 -0
  166. package/lib/ladder/index.js +84 -66
  167. package/lib/layout-box/index.cjs +1 -1
  168. package/lib/layout-box/index.d.ts +11 -2
  169. package/lib/layout-box/index.js +190 -164
  170. package/lib/media/index.cjs +1 -1
  171. package/lib/media/index.js +1 -1
  172. package/lib/modal/index.cjs +1 -1
  173. package/lib/modal/index.js +16 -16
  174. package/lib/morph/Morph.d.ts +2 -2
  175. package/lib/morph/index.cjs +1 -1
  176. package/lib/morph/index.d.ts +1 -1
  177. package/lib/morph/index.js +135 -143
  178. package/lib/notifier/index.d.ts +2 -2
  179. package/lib/notifier/index.js +3 -1
  180. package/lib/onConnect-DGP866cj.cjs +1 -0
  181. package/lib/onConnect-y5DrxJ9P.js +7 -0
  182. package/lib/pointer/Pointer.d.ts +1 -1
  183. package/lib/pointer/PointerElement.d.ts +1 -1
  184. package/lib/pointer/index.cjs +1 -1
  185. package/lib/pointer/index.js +3 -3
  186. package/lib/polyfills-CM4SCDTt.cjs +1 -0
  187. package/lib/polyfills-X6KXuHg-.js +33 -0
  188. package/lib/popover/PopoverButtonElement.d.ts +1 -1
  189. package/lib/popover/PopoverElement.d.ts +2 -2
  190. package/lib/popover/index.cjs +1 -1
  191. package/lib/popover/index.js +49 -49
  192. package/lib/router/Router.d.ts +11 -3
  193. package/lib/router/index.cjs +1 -1
  194. package/lib/router/index.d.ts +1 -1
  195. package/lib/router/index.js +185 -165
  196. package/lib/scroll/ScrollElement.d.ts +8 -25
  197. package/lib/scroll/ScrollSection.d.ts +23 -0
  198. package/lib/scroll/ScrollSegmentElement.d.ts +3 -3
  199. package/lib/scroll/ScrollUserElement.d.ts +1 -1
  200. package/lib/scroll/index.cjs +1 -1
  201. package/lib/scroll/index.js +87 -83
  202. package/lib/scroll-entries/index.d.ts +1 -1
  203. package/lib/select/SelectUserElement.d.ts +1 -1
  204. package/lib/select/index.cjs +1 -1
  205. package/lib/select/index.js +1 -1
  206. package/lib/sequence/index.cjs +1 -1
  207. package/lib/sequence/index.d.ts +1 -1
  208. package/lib/sequence/index.js +8 -8
  209. package/lib/slicer/SlicerElement.d.ts +2 -2
  210. package/lib/slicer/index.cjs +4 -4
  211. package/lib/slicer/index.js +31 -31
  212. package/lib/source/SourceElement.d.ts +2 -2
  213. package/lib/source/SourceManager.d.ts +1 -1
  214. package/lib/source/index.cjs +1 -1
  215. package/lib/source/index.js +2 -2
  216. package/lib/store/ArrayStore.d.ts +21 -0
  217. package/lib/store/Store.d.ts +1 -7
  218. package/lib/store/index.cjs +1 -1
  219. package/lib/store/index.d.ts +2 -2
  220. package/lib/store/index.js +65 -139
  221. package/lib/tags-BqJKcIve.js +485 -0
  222. package/lib/tags-ld5jemJw.cjs +1 -0
  223. package/lib/theme/index.cjs +1 -1
  224. package/lib/theme/index.js +2 -2
  225. package/lib/tweaker/TweakerBooleanManagerElement.d.ts +2 -2
  226. package/lib/tweaker/TweakerColorManagerElement.d.ts +2 -2
  227. package/lib/tweaker/TweakerElement.d.ts +1 -1
  228. package/lib/tweaker/TweakerFieldElement.d.ts +2 -2
  229. package/lib/tweaker/TweakerFolderElement.d.ts +5 -3
  230. package/lib/tweaker/TweakerLinkManagerElement.d.ts +2 -2
  231. package/lib/tweaker/TweakerNumberManagerElement.d.ts +4 -8
  232. package/lib/tweaker/TweakerSelectManagerElement.d.ts +2 -2
  233. package/lib/tweaker/TweakerStoreManagerElement.d.ts +7 -7
  234. package/lib/tweaker/TweakerStringManagerElement.d.ts +3 -5
  235. package/lib/tweaker/index.cjs +3 -3
  236. package/lib/tweaker/index.js +535 -412
  237. package/lib/tweaker/tweakerManagerConstructors.d.ts +2 -2
  238. package/lib/tweaker/tweakerStorage.d.ts +8 -1
  239. package/lib/url-C3dWnJQg.cjs +1 -0
  240. package/lib/url-DMNfW7uN.js +22 -0
  241. package/lib/utils/function.d.ts +2 -2
  242. package/lib/utils/index.cjs +1 -1
  243. package/lib/utils/index.d.ts +1 -0
  244. package/lib/utils/index.js +39 -34
  245. package/lib/utils/layout.d.ts +1 -1
  246. package/lib/utils/number.d.ts +1 -0
  247. package/lib/utils/url.d.ts +9 -0
  248. package/lib/video/index.cjs +1 -1
  249. package/lib/video/index.js +14 -14
  250. package/package.json +108 -12
  251. package/lib/Animation-DDHjrbtL.cjs +0 -1
  252. package/lib/Animation-Dq_05jlR.js +0 -217
  253. package/lib/Damped-l0mnlhar.cjs +0 -1
  254. package/lib/Store-C-1ruEIm.cjs +0 -1
  255. package/lib/Tweened-CwDC2zl8.js +0 -51
  256. package/lib/Tweened-DIt9j9B-.cjs +0 -1
  257. package/lib/animation/AnimationLink.d.ts +0 -13
  258. package/lib/en3/loaders/en3GLTFLoader.d.ts +0 -14
  259. package/lib/en3/loaders/en3TextureLoader.d.ts +0 -3
  260. package/lib/en3/test/En3HTML.d.ts +0 -10
  261. package/lib/index-Buf76Qoq.cjs +0 -9
  262. package/lib/polyfills-BA-CL_HF.js +0 -27
  263. package/lib/polyfills-DHs2SNbz.cjs +0 -1
  264. package/lib/resized/index.cjs +0 -1
  265. package/lib/resized/index.d.ts +0 -12
  266. package/lib/resized/index.js +0 -30
  267. package/lib/store/CumulativeResource.d.ts +0 -13
  268. package/lib/tags-CMPg9ETZ.js +0 -848
  269. package/lib/tags-Djb6mb1o.cjs +0 -1
  270. package/lib/tweaker/TweakerRangeManagerElement.d.ts +0 -11
  271. package/lib/en3/{loaders → core}/en3Cache.d.ts +0 -0
  272. package/lib/en3/{test → misc}/En3ModifiedMaterial.d.ts +0 -0
  273. package/lib/en3/{attachments → misc}/En3SourceManager.d.ts +2 -2
@@ -1 +1 @@
1
- "use strict";var at=(r,t)=>(t=Symbol[r])?t:Symbol.for("Symbol."+r);var Q=(r,t,s)=>{if(!t.has(r))throw TypeError("Cannot "+s)};var e=(r,t,s)=>(Q(r,t,"read from private field"),s?s.call(r):t.get(r)),a=(r,t,s)=>{if(t.has(r))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(r):t.set(r,s)},l=(r,t,s,n)=>(Q(r,t,"write to private field"),n?n.call(r,s):t.set(r,s),s);var p=(r,t,s)=>(Q(r,t,"access private method"),s);var H=(r,t,s)=>new Promise((n,i)=>{var c=d=>{try{u(s.next(d))}catch(m){i(m)}},f=d=>{try{u(s.throw(d))}catch(m){i(m)}},u=d=>d.done?n(d.value):Promise.resolve(d.value).then(c,f);u((s=s.apply(r,t)).next())});var ht=(r,t,s)=>(t=r[at("asyncIterator")])?t.call(r):(r=r[at("iterator")](),t={},s=(n,i)=>(i=r[n])&&(t[n]=c=>new Promise((f,u,d)=>(c=i.call(r,c),d=c.done,Promise.resolve(c.value).then(m=>f({value:m,done:d}),u)))),s("next"),s("return"),t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const ot=require("../notifier/index.cjs"),pt=require("../browser-CpzFX2xg.cjs");var y,o,g,S,A,k,M;class gt{constructor(t,s){a(this,y,void 0);a(this,o,void 0);a(this,g,void 0);a(this,S,void 0);a(this,A,void 0);a(this,k,t=>{t.preventDefault(),e(this,y).links.forEach(s=>{var n;e(this,g)===e(s,g)||(n=e(s,A))!=null&&n.includes(e(this,g))?e(s,o).classList.add("clicked"):e(s,o).classList.remove("clicked")}),e(this,y).navigate(e(this,g),e(this,S))});a(this,M,()=>{e(this,y).prefetch(e(this,g)),e(this,o).removeEventListener("pointerenter",e(this,M))});var c,f;l(this,y,s),l(this,o,t),l(this,g,e(this,o).getAttribute("href")||"/"),l(this,S,e(this,o).getAttribute("data-history-action")||"push"),e(this,o).addEventListener("click",e(this,k));const n=s.normalizePath(e(this,g)),i=s.normalizePath(location.pathname);l(this,A,(c=e(this,o).getAttribute("data-match-paths"))==null?void 0:c.split(",").map(u=>s.normalizePath(u.trim()).pathname)),e(this,o).hasAttribute("data-include")?i.pathname.includes(n.pathname)&&e(this,o).classList.add("current"):n.pathname===i.pathname||(f=e(this,A))!=null&&f.includes(i.pathname)?(e(this,o).classList.add("current"),e(this,o).classList.add("clicked")):e(this,o).classList.remove("clicked"),e(this,o).hasAttribute("data-prefetch")&&e(this,o).addEventListener("pointerenter",e(this,M))}destroy(){e(this,o).removeEventListener("click",e(this,k)),e(this,o).removeEventListener("pointerenter",e(this,M)),e(this,o).classList.remove("current")}}y=new WeakMap,o=new WeakMap,g=new WeakMap,S=new WeakMap,A=new WeakMap,k=new WeakMap,M=new WeakMap;var E,C,z,W,N,B,P,L,w,x,D,R,U,q,V,F,X,K,ct,I,Z,Y;class Et{constructor(t){a(this,R);a(this,q);a(this,F);a(this,K);a(this,I);a(this,E,null);a(this,C,null);a(this,z,null);a(this,W,null);a(this,N,[]);a(this,B,new DOMParser);a(this,P,new Map);a(this,L,void 0);a(this,w,null);a(this,x,new ot.Notifier);a(this,D,new ot.Notifier);a(this,Y,t=>{t.state&&this.navigate(t.state,"none")});pt.isBrowser&&(l(this,E,(t==null?void 0:t.base)||"/"),t!=null&&t.base?(l(this,E,t.base),t.base.endsWith("/")||l(this,E,e(this,E)+"/")):l(this,E,"/"),l(this,C,(t==null?void 0:t.waitForHeadToLoad)!==!1),l(this,z,(t==null?void 0:t.cachePages)!==!1),l(this,W,p(this,F,X).call(this,document.body)),l(this,w,this.normalizePath(location.pathname).pathname),document.documentElement.setAttribute("data-current-pathname",e(this,w)),p(this,q,V).call(this),addEventListener("popstate",e(this,Y)))}get currentPathname(){return e(this,w)}get links(){return e(this,N)}normalizePath(t){t=t.replace(e(this,E),""),t.startsWith("/")&&(t=t.slice(1));const s=t.split("#"),n=s[0].split("?"),i=n[0].endsWith("/")?n[0].slice(0,-1):n[0],c=e(this,E)+i,f=n==null?void 0:n[1],u=s==null?void 0:s[1];return{leaf:i,pathname:c,parameters:f,hash:u}}beforeNavigationEvent(t){return e(this,x).subscribe(t)}afterNavigationEvent(t){return e(this,D).subscribe(t)}prefetch(t){return H(this,null,function*(){const s=this.normalizePath(t);return p(this,R,U).call(this,s.pathname)})}navigate(t,s="push"){return H(this,null,function*(){var d;const n=this.normalizePath(t);let{pathname:i,hash:c,parameters:f}=n;if(e(this,L)===i||e(this,w)===i)return;l(this,L,i);const u=e(this,P).has(i);try{let m=!0;if(e(this,x).notify({pathname:i,isCached:u}),this.preprocessor)try{yield new Promise((h,b)=>{var v;(v=this.preprocessor)==null||v.call(this,{pathname:i,resolve:h,reject:b,isCached:u})})}catch(h){h?console.error(h):console.log("Route change canceled"),m=!1}if(!m||e(this,L)!==i)return;const tt=e(this,P).get(i)||(yield p(this,R,U).call(this,i));if(e(this,L)!==i)return;const et=Array.from(document.head.children),st=Array.from(tt.head.cloneNode(!0).children),it=p(this,K,ct).call(this,et,st),lt=p(this,I,Z).call(this,et,it),O=p(this,I,Z).call(this,st,it);O.forEach((h,b)=>{if(h.tagName==="SCRIPT"&&h.getAttribute("src")){const v=document.createElement("script");v.type="module",v.src=h.getAttribute("src"),O[b]=v}}),O.forEach(h=>{document.head.appendChild(h)});const _=O.filter(h=>h.tagName==="STYLE"||h.tagName==="SCRIPT"||h.tagName==="LINK");e(this,C)&&_.length&&(yield new Promise(h=>H(this,null,function*(){let b=0;try{for(var v=ht(_),mt,G,j;mt=!(G=yield v.next()).done;mt=!1){const T=G.value;T.onload=()=>{b++,b===_.length&&h()}}}catch(G){j=[G]}finally{try{mt&&(G=v.return)&&(yield G.call(v))}finally{if(j)throw j[0]}}}))),lt.forEach(h=>{h.hasAttribute("data-permanent")||h.remove()}),l(this,w,i);const $=f||location.search,ut=c?c.startsWith("#")?c:"#"+c:"",dt=$?$.startsWith("?")?$:"?"+$:"",nt=`${i}${ut}${dt}`;s==="push"?history.pushState(i,"",nt):s==="replace"&&history.replaceState(i,"",nt);const ft=p(this,F,X).call(this,tt.body.cloneNode(!0));e(this,W).forEach((h,b)=>{const v=ft[b];let mt=[...h.childNodes],G=[...v.childNodes];mt.forEach(j=>{if(j instanceof HTMLElement){const T=j.getAttribute("data-remain");let rt;G=G.filter(J=>J instanceof HTMLElement&&T&&J.getAttribute("data-remain")===T?(rt=J,!1):!0),T&&rt||j.remove()}else j.remove()}),h.append(...G)}),p(this,q,V).call(this),document.documentElement.setAttribute("data-current-pathname",i),(d=this.postprocessor)==null||d.call(this,{pathname:i,isCached:u}),e(this,D).notify({pathname:i,isCached:u})}catch(m){console.error(m)}l(this,L,void 0)})}}E=new WeakMap,C=new WeakMap,z=new WeakMap,W=new WeakMap,N=new WeakMap,B=new WeakMap,P=new WeakMap,L=new WeakMap,w=new WeakMap,x=new WeakMap,D=new WeakMap,R=new WeakSet,U=function(t){return H(this,null,function*(){const s=e(this,P).get(t);if(s)return s;const i=yield(yield fetch(t)).text(),c=e(this,B).parseFromString(i,"text/html");return e(this,z)&&e(this,P).set(t,c),c})},q=new WeakSet,V=function(){const t=[...document.documentElement.querySelectorAll("a")].filter(s=>{var n;return(n=s.getAttribute("href"))==null?void 0:n.startsWith("/")});e(this,N).forEach(s=>s.destroy()),l(this,N,t.map(s=>new gt(s,this)))},F=new WeakSet,X=function(t){return[...t.querySelectorAll("[data-morph]")]},K=new WeakSet,ct=function(t,s){return t.filter(n=>s.find(i=>i.outerHTML===n.outerHTML))},I=new WeakSet,Z=function(t,s){return t.filter(n=>!s.find(i=>i.outerHTML===n.outerHTML))},Y=new WeakMap;exports.Morph=Et;
1
+ "use strict";var rt=(n,t)=>(t=Symbol[n])?t:Symbol.for("Symbol."+n);var Q=(n,t,i)=>{if(!t.has(n))throw TypeError("Cannot "+i)};var e=(n,t,i)=>(Q(n,t,"read from private field"),i?i.call(n):t.get(n)),r=(n,t,i)=>{if(t.has(n))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(n):t.set(n,i)},c=(n,t,i,a)=>(Q(n,t,"write to private field"),a?a.call(n,i):t.set(n,i),i);var f=(n,t,i)=>(Q(n,t,"access private method"),i);var T=(n,t,i)=>new Promise((a,s)=>{var l=u=>{try{d(i.next(u))}catch(m){s(m)}},g=u=>{try{d(i.throw(u))}catch(m){s(m)}},d=u=>u.done?a(u.value):Promise.resolve(u.value).then(l,g);d((i=i.apply(n,t)).next())});var at=(n,t,i)=>(t=n[rt("asyncIterator")])?t.call(n):(n=n[rt("iterator")](),t={},i=(a,s)=>(s=n[a])&&(t[a]=l=>new Promise((g,d,u)=>(l=s.call(n,l),u=l.done,Promise.resolve(l.value).then(m=>g({value:m,done:u}),d)))),i("next"),i("return"),t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const ht=require("../notifier/index.cjs"),dt=require("../browser-CpzFX2xg.cjs"),U=require("../url-C3dWnJQg.cjs");var w,o,p,k,P,C,A;class mt{constructor(t,i){r(this,w,void 0);r(this,o,void 0);r(this,p,void 0);r(this,k,void 0);r(this,P,void 0);r(this,C,t=>{t.preventDefault(),e(this,w).links.forEach(i=>{var a;e(this,p)===e(i,p)||(a=e(i,P))!=null&&a.includes(e(this,p))?e(i,o).classList.add("clicked"):e(i,o).classList.remove("clicked")}),e(this,w).navigate(e(this,p),e(this,k))});r(this,A,()=>{e(this,w).prefetch(e(this,p)),e(this,o).removeEventListener("pointerenter",e(this,A))});var l,g;c(this,w,i),c(this,o,t),c(this,p,e(this,o).getAttribute("href")||"/"),c(this,k,e(this,o).getAttribute("data-history-action")||"push"),e(this,o).addEventListener("click",e(this,C));const a=i.normalizePath(e(this,p)),s=i.normalizePath(location.pathname);c(this,P,(l=e(this,o).getAttribute("data-match-paths"))==null?void 0:l.split(",").map(d=>i.normalizePath(d.trim()).pathname)),e(this,o).hasAttribute("data-include")?s.pathname.includes(a.pathname)&&e(this,o).classList.add("current"):a.pathname===s.pathname||(g=e(this,P))!=null&&g.includes(s.pathname)?(e(this,o).classList.add("current"),e(this,o).classList.add("clicked")):e(this,o).classList.remove("clicked"),e(this,o).hasAttribute("data-prefetch")&&e(this,o).addEventListener("pointerenter",e(this,A))}destroy(){e(this,o).removeEventListener("click",e(this,C)),e(this,o).removeEventListener("pointerenter",e(this,A)),e(this,o).classList.remove("current")}}w=new WeakMap,o=new WeakMap,p=new WeakMap,k=new WeakMap,P=new WeakMap,C=new WeakMap,A=new WeakMap;var M,S,z,q,H,j,y,L,b,x,D,R,V,F,X,I,Z,K,ot,O,$,Y;class ft{constructor(t){r(this,R);r(this,F);r(this,I);r(this,K);r(this,O);r(this,M,null);r(this,S,null);r(this,z,null);r(this,q,null);r(this,H,[]);r(this,j,new DOMParser);r(this,y,new Map);r(this,L,void 0);r(this,b,null);r(this,x,new ht.Notifier);r(this,D,new ht.Notifier);r(this,Y,t=>{t.state&&this.navigate(t.state,"none")});dt.isBrowser&&(t!=null&&t.base?c(this,M,U.normalizeBase(t.base)):c(this,M,"/"),c(this,S,(t==null?void 0:t.waitForHeadToLoad)!==!1),c(this,z,(t==null?void 0:t.cachePages)!==!1),c(this,q,f(this,I,Z).call(this,document.body)),c(this,b,this.normalizePath(location.pathname).pathname),document.documentElement.setAttribute("data-current-pathname",e(this,b)),f(this,F,X).call(this),addEventListener("popstate",e(this,Y)))}get currentPathname(){return e(this,b)}get links(){return e(this,H)}normalizePath(t){return U.splitPath(t,e(this,M))}beforeNavigationEvent(t){return e(this,x).subscribe(t)}afterNavigationEvent(t){return e(this,D).subscribe(t)}prefetch(t){return T(this,null,function*(){const i=this.normalizePath(t);return f(this,R,V).call(this,i.pathname)})}navigate(t,i="push"){return T(this,null,function*(){var u;const a=this.normalizePath(t);let{pathname:s,hash:l,parameters:g}=a;if(e(this,L)===s||e(this,b)===s)return;c(this,L,s);const d=e(this,y).has(s);try{let m=!0;if(e(this,x).notify({pathname:s,isCached:d}),this.preprocessor)try{yield new Promise((h,E)=>{var v;(v=this.preprocessor)==null||v.call(this,{pathname:s,resolve:h,reject:E,isCached:d})})}catch(h){h?console.error(h):console.log("Route change canceled"),m=!1}if(!m||e(this,L)!==s)return;const tt=e(this,y).get(s)||(yield f(this,R,V).call(this,s));if(e(this,L)!==s)return;const et=Array.from(document.head.children),it=Array.from(tt.head.cloneNode(!0).children),st=f(this,K,ot).call(this,et,it),ct=f(this,O,$).call(this,et,st),B=f(this,O,$).call(this,it,st);B.forEach((h,E)=>{if(h.tagName==="SCRIPT"&&h.getAttribute("src")){const v=document.createElement("script");v.type="module",v.src=h.getAttribute("src"),B[E]=v}}),B.forEach(h=>{document.head.appendChild(h)});const _=B.filter(h=>h.tagName==="STYLE"||h.tagName==="SCRIPT"||h.tagName==="LINK");e(this,S)&&_.length&&(yield new Promise(h=>T(this,null,function*(){let E=0;try{for(var v=at(_),ut,G,W;ut=!(G=yield v.next()).done;ut=!1){const N=G.value;N.onload=()=>{E++,E===_.length&&h()}}}catch(G){W=[G]}finally{try{ut&&(G=v.return)&&(yield G.call(v))}finally{if(W)throw W[0]}}}))),ct.forEach(h=>{h.hasAttribute("data-permanent")||h.remove()}),c(this,b,s),U.changeHistory(i,s,g,l);const lt=f(this,I,Z).call(this,tt.body.cloneNode(!0));e(this,q).forEach((h,E)=>{const v=lt[E];let ut=[...h.childNodes],G=[...v.childNodes];ut.forEach(W=>{if(W instanceof HTMLElement){const N=W.getAttribute("data-remain");let nt;G=G.filter(J=>J instanceof HTMLElement&&N&&J.getAttribute("data-remain")===N?(nt=J,!1):!0),N&&nt||W.remove()}else W.remove()}),h.append(...G)}),f(this,F,X).call(this),document.documentElement.setAttribute("data-current-pathname",s),(u=this.postprocessor)==null||u.call(this,{pathname:s,isCached:d}),e(this,D).notify({pathname:s,isCached:d})}catch(m){console.error(m)}c(this,L,void 0)})}}M=new WeakMap,S=new WeakMap,z=new WeakMap,q=new WeakMap,H=new WeakMap,j=new WeakMap,y=new WeakMap,L=new WeakMap,b=new WeakMap,x=new WeakMap,D=new WeakMap,R=new WeakSet,V=function(t){return T(this,null,function*(){const i=e(this,y).get(t);if(i)return i;const s=yield(yield fetch(t)).text(),l=e(this,j).parseFromString(s,"text/html");return e(this,z)&&e(this,y).set(t,l),l})},F=new WeakSet,X=function(){const t=[...document.documentElement.querySelectorAll("a")].filter(i=>{var a;return(a=i.getAttribute("href"))==null?void 0:a.startsWith("/")});e(this,H).forEach(i=>i.destroy()),c(this,H,t.map(i=>new mt(i,this)))},I=new WeakSet,Z=function(t){return[...t.querySelectorAll("[data-morph]")]},K=new WeakSet,ot=function(t,i){return t.filter(a=>i.find(s=>s.outerHTML===a.outerHTML))},O=new WeakSet,$=function(t,i){return t.filter(a=>!i.find(s=>s.outerHTML===a.outerHTML))},Y=new WeakMap;exports.Morph=ft;
@@ -1 +1 @@
1
- export { Morph, type MorphPostprocessor, type MorphNavigationCallback, type MorphPreprocessor, type MorphPreprocessorEntry, type MorphNavigationEntry, type MorphParameters, type MorphHistoryAction, } from './Morph';
1
+ export { Morph, type MorphPostprocessor, type MorphNavigationCallback, type MorphPreprocessor, type MorphPreprocessorEntry, type MorphNavigationEntry, type MorphParameters, } from './Morph';
@@ -1,233 +1,225 @@
1
- var at = (r, t) => (t = Symbol[r]) ? t : Symbol.for("Symbol." + r);
2
- var U = (r, t, s) => {
3
- if (!t.has(r))
4
- throw TypeError("Cannot " + s);
1
+ var nt = (n, t) => (t = Symbol[n]) ? t : Symbol.for("Symbol." + n);
2
+ var U = (n, t, i) => {
3
+ if (!t.has(n))
4
+ throw TypeError("Cannot " + i);
5
5
  };
6
- var e = (r, t, s) => (U(r, t, "read from private field"), s ? s.call(r) : t.get(r)), a = (r, t, s) => {
7
- if (t.has(r))
6
+ var e = (n, t, i) => (U(n, t, "read from private field"), i ? i.call(n) : t.get(n)), r = (n, t, i) => {
7
+ if (t.has(n))
8
8
  throw TypeError("Cannot add the same private member more than once");
9
- t instanceof WeakSet ? t.add(r) : t.set(r, s);
10
- }, l = (r, t, s, n) => (U(r, t, "write to private field"), n ? n.call(r, s) : t.set(r, s), s);
11
- var p = (r, t, s) => (U(r, t, "access private method"), s);
12
- var T = (r, t, s) => new Promise((n, i) => {
13
- var c = (d) => {
9
+ t instanceof WeakSet ? t.add(n) : t.set(n, i);
10
+ }, c = (n, t, i, a) => (U(n, t, "write to private field"), a ? a.call(n, i) : t.set(n, i), i);
11
+ var f = (n, t, i) => (U(n, t, "access private method"), i);
12
+ var T = (n, t, i) => new Promise((a, s) => {
13
+ var l = (u) => {
14
14
  try {
15
- u(s.next(d));
15
+ d(i.next(u));
16
16
  } catch (m) {
17
- i(m);
17
+ s(m);
18
18
  }
19
- }, f = (d) => {
19
+ }, g = (u) => {
20
20
  try {
21
- u(s.throw(d));
21
+ d(i.throw(u));
22
22
  } catch (m) {
23
- i(m);
23
+ s(m);
24
24
  }
25
- }, u = (d) => d.done ? n(d.value) : Promise.resolve(d.value).then(c, f);
26
- u((s = s.apply(r, t)).next());
25
+ }, d = (u) => u.done ? a(u.value) : Promise.resolve(u.value).then(l, g);
26
+ d((i = i.apply(n, t)).next());
27
27
  });
28
- var ht = (r, t, s) => (t = r[at("asyncIterator")]) ? t.call(r) : (r = r[at("iterator")](), t = {}, s = (n, i) => (i = r[n]) && (t[n] = (c) => new Promise((f, u, d) => (c = i.call(r, c), d = c.done, Promise.resolve(c.value).then((m) => f({ value: m, done: d }), u)))), s("next"), s("return"), t);
29
- import { Notifier as ot } from "../notifier/index.js";
30
- import { i as pt } from "../browser-0zX67oeU.js";
31
- var y, o, g, k, A, C, M;
32
- class gt {
33
- constructor(t, s) {
34
- a(this, y, void 0);
35
- a(this, o, void 0);
36
- a(this, g, void 0);
37
- a(this, k, void 0);
38
- a(this, A, void 0);
39
- a(this, C, (t) => {
40
- t.preventDefault(), e(this, y).links.forEach((s) => {
41
- var n;
42
- e(this, g) === e(s, g) || (n = e(s, A)) != null && n.includes(e(this, g)) ? e(s, o).classList.add("clicked") : e(s, o).classList.remove("clicked");
43
- }), e(this, y).navigate(e(this, g), e(this, k));
28
+ var rt = (n, t, i) => (t = n[nt("asyncIterator")]) ? t.call(n) : (n = n[nt("iterator")](), t = {}, i = (a, s) => (s = n[a]) && (t[a] = (l) => new Promise((g, d, u) => (l = s.call(n, l), u = l.done, Promise.resolve(l.value).then((m) => g({ value: m, done: u }), d)))), i("next"), i("return"), t);
29
+ import { Notifier as at } from "../notifier/index.js";
30
+ import { i as ut } from "../browser-0zX67oeU.js";
31
+ import { n as dt, s as mt, c as ft } from "../url-DMNfW7uN.js";
32
+ var w, o, p, k, P, C, A;
33
+ class pt {
34
+ constructor(t, i) {
35
+ r(this, w, void 0);
36
+ r(this, o, void 0);
37
+ r(this, p, void 0);
38
+ r(this, k, void 0);
39
+ r(this, P, void 0);
40
+ r(this, C, (t) => {
41
+ t.preventDefault(), e(this, w).links.forEach((i) => {
42
+ var a;
43
+ e(this, p) === e(i, p) || (a = e(i, P)) != null && a.includes(e(this, p)) ? e(i, o).classList.add("clicked") : e(i, o).classList.remove("clicked");
44
+ }), e(this, w).navigate(e(this, p), e(this, k));
44
45
  });
45
- a(this, M, () => {
46
- e(this, y).prefetch(e(this, g)), e(this, o).removeEventListener("pointerenter", e(this, M));
46
+ r(this, A, () => {
47
+ e(this, w).prefetch(e(this, p)), e(this, o).removeEventListener("pointerenter", e(this, A));
47
48
  });
48
- var c, f;
49
- l(this, y, s), l(this, o, t), l(this, g, e(this, o).getAttribute("href") || "/"), l(this, k, e(this, o).getAttribute(
49
+ var l, g;
50
+ c(this, w, i), c(this, o, t), c(this, p, e(this, o).getAttribute("href") || "/"), c(this, k, e(this, o).getAttribute(
50
51
  "data-history-action"
51
52
  ) || "push"), e(this, o).addEventListener("click", e(this, C));
52
- const n = s.normalizePath(e(this, g)), i = s.normalizePath(location.pathname);
53
- l(this, A, (c = e(this, o).getAttribute("data-match-paths")) == null ? void 0 : c.split(",").map((u) => s.normalizePath(u.trim()).pathname)), e(this, o).hasAttribute("data-include") ? i.pathname.includes(n.pathname) && e(this, o).classList.add("current") : n.pathname === i.pathname || (f = e(this, A)) != null && f.includes(i.pathname) ? (e(this, o).classList.add("current"), e(this, o).classList.add("clicked")) : e(this, o).classList.remove("clicked"), e(this, o).hasAttribute("data-prefetch") && e(this, o).addEventListener("pointerenter", e(this, M));
53
+ const a = i.normalizePath(e(this, p)), s = i.normalizePath(location.pathname);
54
+ c(this, P, (l = e(this, o).getAttribute("data-match-paths")) == null ? void 0 : l.split(",").map((d) => i.normalizePath(d.trim()).pathname)), e(this, o).hasAttribute("data-include") ? s.pathname.includes(a.pathname) && e(this, o).classList.add("current") : a.pathname === s.pathname || (g = e(this, P)) != null && g.includes(s.pathname) ? (e(this, o).classList.add("current"), e(this, o).classList.add("clicked")) : e(this, o).classList.remove("clicked"), e(this, o).hasAttribute("data-prefetch") && e(this, o).addEventListener("pointerenter", e(this, A));
54
55
  }
55
56
  destroy() {
56
- e(this, o).removeEventListener("click", e(this, C)), e(this, o).removeEventListener("pointerenter", e(this, M)), e(this, o).classList.remove("current");
57
+ e(this, o).removeEventListener("click", e(this, C)), e(this, o).removeEventListener("pointerenter", e(this, A)), e(this, o).classList.remove("current");
57
58
  }
58
59
  }
59
- y = new WeakMap(), o = new WeakMap(), g = new WeakMap(), k = new WeakMap(), A = new WeakMap(), C = new WeakMap(), M = new WeakMap();
60
- var E, S, z, W, H, K, P, b, w, x, D, R, V, F, X, I, Z, Y, ct, $, _, j;
60
+ w = new WeakMap(), o = new WeakMap(), p = new WeakMap(), k = new WeakMap(), P = new WeakMap(), C = new WeakMap(), A = new WeakMap();
61
+ var H, S, z, x, M, K, y, v, b, D, R, F, V, I, X, q, Z, Y, ht, B, _, j;
61
62
  class bt {
62
63
  constructor(t) {
63
- a(this, R);
64
- a(this, F);
65
- a(this, I);
66
- a(this, Y);
67
- a(this, $);
68
- a(this, E, null);
69
- a(this, S, null);
70
- a(this, z, null);
71
- a(this, W, null);
72
- a(this, H, []);
73
- a(this, K, new DOMParser());
74
- a(this, P, /* @__PURE__ */ new Map());
75
- a(this, b, void 0);
76
- a(this, w, null);
77
- a(this, x, new ot());
78
- a(this, D, new ot());
79
- a(this, j, (t) => {
64
+ r(this, F);
65
+ r(this, I);
66
+ r(this, q);
67
+ r(this, Y);
68
+ r(this, B);
69
+ r(this, H, null);
70
+ r(this, S, null);
71
+ r(this, z, null);
72
+ r(this, x, null);
73
+ r(this, M, []);
74
+ r(this, K, new DOMParser());
75
+ r(this, y, /* @__PURE__ */ new Map());
76
+ r(this, v, void 0);
77
+ r(this, b, null);
78
+ r(this, D, new at());
79
+ r(this, R, new at());
80
+ r(this, j, (t) => {
80
81
  t.state && this.navigate(t.state, "none");
81
82
  });
82
- pt && (l(this, E, (t == null ? void 0 : t.base) || "/"), t != null && t.base ? (l(this, E, t.base), t.base.endsWith("/") || l(this, E, e(this, E) + "/")) : l(this, E, "/"), l(this, S, (t == null ? void 0 : t.waitForHeadToLoad) !== !1), l(this, z, (t == null ? void 0 : t.cachePages) !== !1), l(this, W, p(this, I, Z).call(this, document.body)), l(this, w, this.normalizePath(location.pathname).pathname), document.documentElement.setAttribute(
83
+ ut && (t != null && t.base ? c(this, H, dt(t.base)) : c(this, H, "/"), c(this, S, (t == null ? void 0 : t.waitForHeadToLoad) !== !1), c(this, z, (t == null ? void 0 : t.cachePages) !== !1), c(this, x, f(this, q, Z).call(this, document.body)), c(this, b, this.normalizePath(location.pathname).pathname), document.documentElement.setAttribute(
83
84
  "data-current-pathname",
84
- e(this, w)
85
- ), p(this, F, X).call(this), addEventListener("popstate", e(this, j)));
85
+ e(this, b)
86
+ ), f(this, I, X).call(this), addEventListener("popstate", e(this, j)));
86
87
  }
87
88
  get currentPathname() {
88
- return e(this, w);
89
+ return e(this, b);
89
90
  }
90
91
  get links() {
91
- return e(this, H);
92
+ return e(this, M);
92
93
  }
93
94
  normalizePath(t) {
94
- t = t.replace(e(this, E), ""), t.startsWith("/") && (t = t.slice(1));
95
- const s = t.split("#"), n = s[0].split("?"), i = n[0].endsWith("/") ? n[0].slice(0, -1) : n[0], c = e(this, E) + i, f = n == null ? void 0 : n[1], u = s == null ? void 0 : s[1];
96
- return {
97
- leaf: i,
98
- pathname: c,
99
- parameters: f,
100
- hash: u
101
- };
95
+ return mt(t, e(this, H));
102
96
  }
103
97
  beforeNavigationEvent(t) {
104
- return e(this, x).subscribe(t);
98
+ return e(this, D).subscribe(t);
105
99
  }
106
100
  afterNavigationEvent(t) {
107
- return e(this, D).subscribe(t);
101
+ return e(this, R).subscribe(t);
108
102
  }
109
103
  prefetch(t) {
110
104
  return T(this, null, function* () {
111
- const s = this.normalizePath(t);
112
- return p(this, R, V).call(this, s.pathname);
105
+ const i = this.normalizePath(t);
106
+ return f(this, F, V).call(this, i.pathname);
113
107
  });
114
108
  }
115
- navigate(t, s = "push") {
109
+ navigate(t, i = "push") {
116
110
  return T(this, null, function* () {
117
- var d;
118
- const n = this.normalizePath(t);
119
- let { pathname: i, hash: c, parameters: f } = n;
120
- if (e(this, b) === i || e(this, w) === i)
111
+ var u;
112
+ const a = this.normalizePath(t);
113
+ let { pathname: s, hash: l, parameters: g } = a;
114
+ if (e(this, v) === s || e(this, b) === s)
121
115
  return;
122
- l(this, b, i);
123
- const u = e(this, P).has(i);
116
+ c(this, v, s);
117
+ const d = e(this, y).has(s);
124
118
  try {
125
119
  let m = !0;
126
- if (e(this, x).notify({
127
- pathname: i,
128
- isCached: u
120
+ if (e(this, D).notify({
121
+ pathname: s,
122
+ isCached: d
129
123
  }), this.preprocessor)
130
124
  try {
131
- yield new Promise((h, L) => {
132
- var v;
133
- (v = this.preprocessor) == null || v.call(this, { pathname: i, resolve: h, reject: L, isCached: u });
125
+ yield new Promise((h, E) => {
126
+ var L;
127
+ (L = this.preprocessor) == null || L.call(this, { pathname: s, resolve: h, reject: E, isCached: d });
134
128
  });
135
129
  } catch (h) {
136
130
  h ? console.error(h) : console.log("Route change canceled"), m = !1;
137
131
  }
138
- if (!m || e(this, b) !== i)
132
+ if (!m || e(this, v) !== s)
139
133
  return;
140
- const tt = e(this, P).get(i) || (yield p(this, R, V).call(this, i));
141
- if (e(this, b) !== i)
134
+ const $ = e(this, y).get(s) || (yield f(this, F, V).call(this, s));
135
+ if (e(this, v) !== s)
142
136
  return;
143
- const et = Array.from(document.head.children), st = Array.from(
144
- tt.head.cloneNode(!0).children
145
- ), it = p(this, Y, ct).call(this, et, st), lt = p(this, $, _).call(this, et, it), q = p(this, $, _).call(this, st, it);
146
- q.forEach((h, L) => {
137
+ const tt = Array.from(document.head.children), et = Array.from(
138
+ $.head.cloneNode(!0).children
139
+ ), it = f(this, Y, ht).call(this, tt, et), ot = f(this, B, _).call(this, tt, it), O = f(this, B, _).call(this, et, it);
140
+ O.forEach((h, E) => {
147
141
  if (h.tagName === "SCRIPT" && h.getAttribute("src")) {
148
- const v = document.createElement("script");
149
- v.type = "module", v.src = h.getAttribute("src"), q[L] = v;
142
+ const L = document.createElement("script");
143
+ L.type = "module", L.src = h.getAttribute("src"), O[E] = L;
150
144
  }
151
- }), q.forEach((h) => {
145
+ }), O.forEach((h) => {
152
146
  document.head.appendChild(h);
153
147
  });
154
- const G = q.filter(
148
+ const G = O.filter(
155
149
  (h) => h.tagName === "STYLE" || h.tagName === "SCRIPT" || h.tagName === "LINK"
156
150
  );
157
151
  e(this, S) && G.length && (yield new Promise((h) => T(this, null, function* () {
158
- let L = 0;
152
+ let E = 0;
159
153
  try {
160
- for (var v = ht(G), mt, J, B; mt = !(J = yield v.next()).done; mt = !1) {
154
+ for (var L = rt(G), lt, J, W; lt = !(J = yield L.next()).done; lt = !1) {
161
155
  const N = J.value;
162
156
  N.onload = () => {
163
- L++, L === G.length && h();
157
+ E++, E === G.length && h();
164
158
  };
165
159
  }
166
160
  } catch (J) {
167
- B = [J];
161
+ W = [J];
168
162
  } finally {
169
163
  try {
170
- mt && (J = v.return) && (yield J.call(v));
164
+ lt && (J = L.return) && (yield J.call(L));
171
165
  } finally {
172
- if (B)
173
- throw B[0];
166
+ if (W)
167
+ throw W[0];
174
168
  }
175
169
  }
176
- }))), lt.forEach((h) => {
170
+ }))), ot.forEach((h) => {
177
171
  h.hasAttribute("data-permanent") || h.remove();
178
- }), l(this, w, i);
179
- const O = f || location.search, ut = c ? c.startsWith("#") ? c : "#" + c : "", dt = O ? O.startsWith("?") ? O : "?" + O : "", nt = `${i}${ut}${dt}`;
180
- s === "push" ? history.pushState(i, "", nt) : s === "replace" && history.replaceState(i, "", nt);
181
- const ft = p(this, I, Z).call(this, tt.body.cloneNode(!0));
182
- e(this, W).forEach((h, L) => {
183
- const v = ft[L];
184
- let mt = [...h.childNodes], J = [...v.childNodes];
185
- mt.forEach((B) => {
186
- if (B instanceof HTMLElement) {
187
- const N = B.getAttribute("data-remain");
188
- let rt;
172
+ }), c(this, b, s), ft(i, s, g, l);
173
+ const ct = f(this, q, Z).call(this, $.body.cloneNode(!0));
174
+ e(this, x).forEach((h, E) => {
175
+ const L = ct[E];
176
+ let lt = [...h.childNodes], J = [...L.childNodes];
177
+ lt.forEach((W) => {
178
+ if (W instanceof HTMLElement) {
179
+ const N = W.getAttribute("data-remain");
180
+ let st;
189
181
  J = J.filter(
190
- (Q) => Q instanceof HTMLElement && N && Q.getAttribute("data-remain") === N ? (rt = Q, !1) : !0
191
- ), N && rt || B.remove();
182
+ (Q) => Q instanceof HTMLElement && N && Q.getAttribute("data-remain") === N ? (st = Q, !1) : !0
183
+ ), N && st || W.remove();
192
184
  } else
193
- B.remove();
185
+ W.remove();
194
186
  }), h.append(...J);
195
- }), p(this, F, X).call(this), document.documentElement.setAttribute("data-current-pathname", i), (d = this.postprocessor) == null || d.call(this, { pathname: i, isCached: u }), e(this, D).notify({ pathname: i, isCached: u });
187
+ }), f(this, I, X).call(this), document.documentElement.setAttribute("data-current-pathname", s), (u = this.postprocessor) == null || u.call(this, { pathname: s, isCached: d }), e(this, R).notify({ pathname: s, isCached: d });
196
188
  } catch (m) {
197
189
  console.error(m);
198
190
  }
199
- l(this, b, void 0);
191
+ c(this, v, void 0);
200
192
  });
201
193
  }
202
194
  }
203
- E = new WeakMap(), S = new WeakMap(), z = new WeakMap(), W = new WeakMap(), H = new WeakMap(), K = new WeakMap(), P = new WeakMap(), b = new WeakMap(), w = new WeakMap(), x = new WeakMap(), D = new WeakMap(), R = new WeakSet(), V = function(t) {
195
+ H = new WeakMap(), S = new WeakMap(), z = new WeakMap(), x = new WeakMap(), M = new WeakMap(), K = new WeakMap(), y = new WeakMap(), v = new WeakMap(), b = new WeakMap(), D = new WeakMap(), R = new WeakMap(), F = new WeakSet(), V = function(t) {
204
196
  return T(this, null, function* () {
205
- const s = e(this, P).get(t);
206
- if (s)
207
- return s;
208
- const i = yield (yield fetch(t)).text(), c = e(this, K).parseFromString(i, "text/html");
209
- return e(this, z) && e(this, P).set(t, c), c;
197
+ const i = e(this, y).get(t);
198
+ if (i)
199
+ return i;
200
+ const s = yield (yield fetch(t)).text(), l = e(this, K).parseFromString(s, "text/html");
201
+ return e(this, z) && e(this, y).set(t, l), l;
210
202
  });
211
- }, F = new WeakSet(), X = function() {
203
+ }, I = new WeakSet(), X = function() {
212
204
  const t = [
213
205
  ...document.documentElement.querySelectorAll("a")
214
- ].filter((s) => {
215
- var n;
216
- return (n = s.getAttribute("href")) == null ? void 0 : n.startsWith("/");
206
+ ].filter((i) => {
207
+ var a;
208
+ return (a = i.getAttribute("href")) == null ? void 0 : a.startsWith("/");
217
209
  });
218
- e(this, H).forEach((s) => s.destroy()), l(this, H, t.map((s) => new gt(s, this)));
219
- }, I = new WeakSet(), Z = function(t) {
210
+ e(this, M).forEach((i) => i.destroy()), c(this, M, t.map((i) => new pt(i, this)));
211
+ }, q = new WeakSet(), Z = function(t) {
220
212
  return [...t.querySelectorAll("[data-morph]")];
221
- }, Y = new WeakSet(), ct = function(t, s) {
213
+ }, Y = new WeakSet(), ht = function(t, i) {
222
214
  return t.filter(
223
- (n) => s.find(
224
- (i) => i.outerHTML === n.outerHTML
215
+ (a) => i.find(
216
+ (s) => s.outerHTML === a.outerHTML
225
217
  )
226
218
  );
227
- }, $ = new WeakSet(), _ = function(t, s) {
219
+ }, B = new WeakSet(), _ = function(t, i) {
228
220
  return t.filter(
229
- (n) => !s.find(
230
- (i) => i.outerHTML === n.outerHTML
221
+ (a) => !i.find(
222
+ (s) => s.outerHTML === a.outerHTML
231
223
  )
232
224
  );
233
225
  }, j = new WeakMap();
@@ -1,5 +1,5 @@
1
- export type ProviderCallback = (...args: any[]) => void;
2
- export declare class Notifier<Callback extends ProviderCallback = ProviderCallback> {
1
+ export type NotifierCallback = (...args: any[]) => void;
2
+ export declare class Notifier<Callback extends NotifierCallback = NotifierCallback> {
3
3
  #private;
4
4
  close(): void;
5
5
  subscribe(callback: Callback, order?: number): () => void;
@@ -25,7 +25,9 @@ class n {
25
25
  });
26
26
  }
27
27
  unsubscribe(s) {
28
- c(this, t, b(this, t).filter((i) => i.callback !== s));
28
+ c(this, t, b(this, t).filter(
29
+ (i) => i.callback !== s
30
+ ));
29
31
  }
30
32
  notify(...s) {
31
33
  for (const i of b(this, t))
@@ -0,0 +1 @@
1
+ "use strict";const e=require("./globals-bYKki-b9.cjs");function o(n){e.currentComponentElement.value.addConnectCallback(n)}exports.onConnect=o;
@@ -0,0 +1,7 @@
1
+ import { c as o } from "./globals-DMjysUXI.js";
2
+ function t(n) {
3
+ o.value.addConnectCallback(n);
4
+ }
5
+ export {
6
+ t as o
7
+ };
@@ -1,5 +1,5 @@
1
- import { ElementOrSelector } from '../utils';
2
1
  import { Damped, DampedOptions } from '../animation';
2
+ import { ElementOrSelector } from '../utils';
3
3
 
4
4
  export interface PointerParameters {
5
5
  element: ElementOrSelector<HTMLElement>;
@@ -1,5 +1,5 @@
1
- import { Pointer } from './Pointer';
2
1
  import { CustomElement } from '../custom-element';
2
+ import { Pointer } from './Pointer';
3
3
 
4
4
  export declare class PointerElement extends CustomElement {
5
5
  #private;
@@ -1 +1 @@
1
- "use strict";var J=Object.defineProperty;var D=Object.getOwnPropertySymbols;var K=Object.prototype.hasOwnProperty,N=Object.prototype.propertyIsEnumerable;var k=(i,e,s)=>e in i?J(i,e,{enumerable:!0,configurable:!0,writable:!0,value:s}):i[e]=s,O=(i,e)=>{for(var s in e||(e={}))K.call(e,s)&&k(i,s,e[s]);if(D)for(var s of D(e))N.call(e,s)&&k(i,s,e[s]);return i};var T=(i,e,s)=>{if(!e.has(i))throw TypeError("Cannot "+s)};var t=(i,e,s)=>(T(i,e,"read from private field"),s?s.call(i):e.get(i)),a=(i,e,s)=>{if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,s)},l=(i,e,s,o)=>(T(i,e,"write to private field"),o?o.call(i,s):e.set(i,s),s);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("../Store-C-1ruEIm.cjs");const q=require("../coordinates-D8Np3cPD.cjs"),Q=require("../dom-JBOkFLTh.cjs"),A=require("../math-GDWEqu7y.cjs");require("../ticker/index.cjs");const M=require("../Damped-l0mnlhar.cjs"),B=require("../element-resizer/index.cjs"),G=require("../window-resizer/index.cjs"),H=require("../custom-element/index.cjs"),S=require("../css-property/index.cjs");var c,u,m,v,f,d,P,w,_,C,E,y;class F{constructor(e){a(this,c,void 0);a(this,u,void 0);a(this,m,void 0);a(this,v,void 0);a(this,f,void 0);a(this,d,void 0);a(this,P,0);a(this,w,0);a(this,_,e=>{t(this,v).set(1)});a(this,C,e=>{t(this,v).set(0)});a(this,E,e=>{const s=q.getPointerPosition(e,t(this,c).getBoundingClientRect()),o={width:t(this,P),height:t(this,w)},n={x:s.x,y:s.y};if(t(this,f)){const p=q.screenToCartesian(n,o);n.x=p.x,n.y=p.y}if(t(this,d)){const p=q.normalize(n,o);n.x=A.clamp(p.x*2,-1,1),n.y=A.clamp(p.y*2,-1,1)}t(this,u).set(n.x),t(this,m).set(n.y)});a(this,y,()=>{l(this,P,this.element.clientWidth),l(this,w,this.element.clientHeight);let e=0,s=0,o=0,n=0;t(this,f)?t(this,d)?(e=-1,s=1,o=-1,n=1):(e=t(this,P)/2*-1,s=t(this,P)/2*1,o=t(this,w)/2*-1,n=t(this,w)/2*1):t(this,d)?(e=0,s=1,o=0,n=1):(e=0,s=t(this,P),o=0,n=t(this,w)),t(this,u).min=e,t(this,u).max=s,t(this,m).min=o,t(this,m).max=n});l(this,c,Q.getElement(e.element)),l(this,u,new M.Damped(0,e.damped)),l(this,m,new M.Damped(0,e.damped)),l(this,v,new M.Damped(0,O({min:0,max:1},e.damped))),l(this,f,e.cartesian||!1),l(this,d,e.normalize||!1)}get element(){return t(this,c)}get x(){return t(this,u)}get y(){return t(this,m)}get z(){return t(this,v)}get cartesian(){return t(this,f)}set cartesian(e){l(this,f,e),t(this,y).call(this)}get normalize(){return t(this,d)}set normalize(e){l(this,d,e),t(this,y).call(this)}connect(){t(this,c).addEventListener("pointerenter",t(this,_)),t(this,c).addEventListener("pointerleave",t(this,C)),t(this,c).addEventListener("pointermove",t(this,E)),B.elementResizer.subscribe(t(this,c),t(this,y)),G.windowResizer.subscribe(t(this,y))}disconnect(){t(this,c).removeEventListener("pointerenter",t(this,_)),t(this,c).removeEventListener("pointerleave",t(this,C)),t(this,c).removeEventListener("pointermove",t(this,E)),B.elementResizer.unsubscribe(t(this,y)),G.windowResizer.unsubscribe(t(this,y)),t(this,u).reset(),t(this,m).reset(),t(this,v).reset()}}c=new WeakMap,u=new WeakMap,m=new WeakMap,v=new WeakMap,f=new WeakMap,d=new WeakMap,P=new WeakMap,w=new WeakMap,_=new WeakMap,C=new WeakMap,E=new WeakMap,y=new WeakMap;var U=Object.defineProperty,V=Object.getOwnPropertyDescriptor,X=(i,e,s,o)=>{for(var n=o>1?void 0:o?V(e,s):e,p=i.length-1,L;p>=0;p--)(L=i[p])&&(n=(o?L(e,s,n):L(n))||n);return o&&n&&U(e,s,n),n},I=(i,e,s)=>{if(!e.has(i))throw TypeError("Cannot "+s)},r=(i,e,s)=>(I(i,e,"read from private field"),s?s.call(i):e.get(i)),x=(i,e,s)=>{if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,s)},Y=(i,e,s,o)=>(I(i,e,"write to private field"),o?o.call(i,s):e.set(i,s),s),h,b,g,z,W,R;exports.PointerElement=class extends H.CustomElement{constructor(){super(),x(this,h,void 0),x(this,b,new S.CSSProperty(this,"--damping",20)),x(this,g,new S.CSSProperty(this,"--mass",0)),x(this,z,new S.CSSProperty(this,"--stiffness",0)),x(this,W,new S.CSSProperty(this,"--cartesian",!1)),x(this,R,new S.CSSProperty(this,"--normalize",!1)),Y(this,h,new F({element:this})),r(this,b).subscribe(e=>{r(this,h).x.damping=e.current,r(this,h).y.damping=e.current,r(this,h).z.damping=e.current}),r(this,W).subscribe(e=>{r(this,h).cartesian=e.current}),r(this,R).subscribe(e=>{r(this,h).normalize=e.current}),r(this,g).subscribe(e=>{r(this,h).x.mass=e.current,r(this,h).y.mass=e.current,r(this,h).z.mass=e.current}),r(this,z).subscribe(e=>{r(this,h).x.stiffness=e.current,r(this,h).y.stiffness=e.current,r(this,h).z.stiffness=e.current}),r(this,h).x.subscribe(e=>{this.style.setProperty("--x",e.current.toString())}),r(this,h).y.subscribe(e=>{this.style.setProperty("--y",e.current.toString())}),r(this,h).z.subscribe(e=>{this.style.setProperty("--z",e.current.toString())})}get pointer(){return r(this,h)}connectedCallback(){r(this,h).connect(),r(this,b).observe(),r(this,g).observe(),r(this,z).observe()}disconnectedCallback(){r(this,h).disconnect(),r(this,b).unobserve(),r(this,g).unobserve(),r(this,z).unobserve(),this.style.removeProperty("--x"),this.style.removeProperty("--y"),this.style.removeProperty("--z")}};h=new WeakMap;b=new WeakMap;g=new WeakMap;z=new WeakMap;W=new WeakMap;R=new WeakMap;exports.PointerElement=X([H.define("e-pointer")],exports.PointerElement);exports.Pointer=F;
1
+ "use strict";var J=Object.defineProperty;var D=Object.getOwnPropertySymbols;var K=Object.prototype.hasOwnProperty,N=Object.prototype.propertyIsEnumerable;var k=(i,e,s)=>e in i?J(i,e,{enumerable:!0,configurable:!0,writable:!0,value:s}):i[e]=s,O=(i,e)=>{for(var s in e||(e={}))K.call(e,s)&&k(i,s,e[s]);if(D)for(var s of D(e))N.call(e,s)&&k(i,s,e[s]);return i};var T=(i,e,s)=>{if(!e.has(i))throw TypeError("Cannot "+s)};var t=(i,e,s)=>(T(i,e,"read from private field"),s?s.call(i):e.get(i)),a=(i,e,s)=>{if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,s)},l=(i,e,s,o)=>(T(i,e,"write to private field"),o?o.call(i,s):e.set(i,s),s);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("../Store-6s0YXK4o.cjs");const q=require("../coordinates-D8Np3cPD.cjs"),Q=require("../dom-JBOkFLTh.cjs"),A=require("../math-GDWEqu7y.cjs");require("../ticker/index.cjs");const M=require("../Damped-loFiBsBy.cjs"),B=require("../element-resizer/index.cjs"),G=require("../window-resizer/index.cjs"),H=require("../custom-element/index.cjs"),x=require("../css-property/index.cjs");var c,u,m,v,f,d,P,w,_,C,E,y;class F{constructor(e){a(this,c,void 0);a(this,u,void 0);a(this,m,void 0);a(this,v,void 0);a(this,f,void 0);a(this,d,void 0);a(this,P,0);a(this,w,0);a(this,_,e=>{t(this,v).set(1)});a(this,C,e=>{t(this,v).set(0)});a(this,E,e=>{const s=q.getPointerPosition(e,t(this,c).getBoundingClientRect()),o={width:t(this,P),height:t(this,w)},n={x:s.x,y:s.y};if(t(this,f)){const p=q.screenToCartesian(n,o);n.x=p.x,n.y=p.y}if(t(this,d)){const p=q.normalize(n,o);n.x=A.clamp(p.x*2,-1,1),n.y=A.clamp(p.y*2,-1,1)}t(this,u).set(n.x),t(this,m).set(n.y)});a(this,y,()=>{l(this,P,this.element.clientWidth),l(this,w,this.element.clientHeight);let e=0,s=0,o=0,n=0;t(this,f)?t(this,d)?(e=-1,s=1,o=-1,n=1):(e=t(this,P)/2*-1,s=t(this,P)/2*1,o=t(this,w)/2*-1,n=t(this,w)/2*1):t(this,d)?(e=0,s=1,o=0,n=1):(e=0,s=t(this,P),o=0,n=t(this,w)),t(this,u).min=e,t(this,u).max=s,t(this,m).min=o,t(this,m).max=n});l(this,c,Q.getElement(e.element)),l(this,u,new M.Damped(0,e.damped)),l(this,m,new M.Damped(0,e.damped)),l(this,v,new M.Damped(0,O({min:0,max:1},e.damped))),l(this,f,e.cartesian||!1),l(this,d,e.normalize||!1)}get element(){return t(this,c)}get x(){return t(this,u)}get y(){return t(this,m)}get z(){return t(this,v)}get cartesian(){return t(this,f)}set cartesian(e){l(this,f,e),t(this,y).call(this)}get normalize(){return t(this,d)}set normalize(e){l(this,d,e),t(this,y).call(this)}connect(){t(this,c).addEventListener("pointerenter",t(this,_)),t(this,c).addEventListener("pointerleave",t(this,C)),t(this,c).addEventListener("pointermove",t(this,E)),B.elementResizer.subscribe(t(this,c),t(this,y)),G.windowResizer.subscribe(t(this,y))}disconnect(){t(this,c).removeEventListener("pointerenter",t(this,_)),t(this,c).removeEventListener("pointerleave",t(this,C)),t(this,c).removeEventListener("pointermove",t(this,E)),B.elementResizer.unsubscribe(t(this,y)),G.windowResizer.unsubscribe(t(this,y)),t(this,u).reset(),t(this,m).reset(),t(this,v).reset()}}c=new WeakMap,u=new WeakMap,m=new WeakMap,v=new WeakMap,f=new WeakMap,d=new WeakMap,P=new WeakMap,w=new WeakMap,_=new WeakMap,C=new WeakMap,E=new WeakMap,y=new WeakMap;var U=Object.defineProperty,V=Object.getOwnPropertyDescriptor,X=(i,e,s,o)=>{for(var n=o>1?void 0:o?V(e,s):e,p=i.length-1,L;p>=0;p--)(L=i[p])&&(n=(o?L(e,s,n):L(n))||n);return o&&n&&U(e,s,n),n},I=(i,e,s)=>{if(!e.has(i))throw TypeError("Cannot "+s)},r=(i,e,s)=>(I(i,e,"read from private field"),s?s.call(i):e.get(i)),b=(i,e,s)=>{if(e.has(i))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(i):e.set(i,s)},Y=(i,e,s,o)=>(I(i,e,"write to private field"),e.set(i,s),s),h,S,g,z,W,R;exports.PointerElement=class extends H.CustomElement{constructor(){super(),b(this,h,void 0),b(this,S,new x.CSSProperty(this,"--damping",20)),b(this,g,new x.CSSProperty(this,"--mass",0)),b(this,z,new x.CSSProperty(this,"--stiffness",0)),b(this,W,new x.CSSProperty(this,"--cartesian",!1)),b(this,R,new x.CSSProperty(this,"--normalize",!1)),Y(this,h,new F({element:this})),r(this,S).subscribe(e=>{r(this,h).x.damping=e.current,r(this,h).y.damping=e.current,r(this,h).z.damping=e.current}),r(this,W).subscribe(e=>{r(this,h).cartesian=e.current}),r(this,R).subscribe(e=>{r(this,h).normalize=e.current}),r(this,g).subscribe(e=>{r(this,h).x.mass=e.current,r(this,h).y.mass=e.current,r(this,h).z.mass=e.current}),r(this,z).subscribe(e=>{r(this,h).x.stiffness=e.current,r(this,h).y.stiffness=e.current,r(this,h).z.stiffness=e.current}),r(this,h).x.subscribe(e=>{this.style.setProperty("--x",e.current.toString())}),r(this,h).y.subscribe(e=>{this.style.setProperty("--y",e.current.toString())}),r(this,h).z.subscribe(e=>{this.style.setProperty("--z",e.current.toString())})}get pointer(){return r(this,h)}connectedCallback(){r(this,h).connect(),r(this,S).observe(),r(this,g).observe(),r(this,z).observe()}disconnectedCallback(){r(this,h).disconnect(),r(this,S).unobserve(),r(this,g).unobserve(),r(this,z).unobserve(),this.style.removeProperty("--x"),this.style.removeProperty("--y"),this.style.removeProperty("--z")}};h=new WeakMap;S=new WeakMap;g=new WeakMap;z=new WeakMap;W=new WeakMap;R=new WeakMap;exports.PointerElement=X([H.define("e-pointer")],exports.PointerElement);exports.Pointer=F;
@@ -18,12 +18,12 @@ var s = (e, t, i) => (T(e, t, "read from private field"), i ? i.call(e) : t.get(
18
18
  throw TypeError("Cannot add the same private member more than once");
19
19
  t instanceof WeakSet ? t.add(e) : t.set(e, i);
20
20
  }, p = (e, t, i, o) => (T(e, t, "write to private field"), o ? o.call(e, i) : t.set(e, i), i);
21
- import "../Store-BQXXikps.js";
21
+ import "../Store-BI2xxXOA.js";
22
22
  import { g as K, s as N, n as Q } from "../coordinates-CgdGoSYs.js";
23
23
  import { g as U } from "../dom-0S_WDL4g.js";
24
24
  import { c as A } from "../math-BOBiC4TN.js";
25
25
  import "../ticker/index.js";
26
- import { D as W } from "../Damped-P4MkCGoY.js";
26
+ import { D as W } from "../Damped-Mx_FNNVz.js";
27
27
  import { elementResizer as B } from "../element-resizer/index.js";
28
28
  import { windowResizer as G } from "../window-resizer/index.js";
29
29
  import { CustomElement as V, define as X } from "../custom-element/index.js";
@@ -119,7 +119,7 @@ var Z = Object.defineProperty, $ = Object.getOwnPropertyDescriptor, j = (e, t, i
119
119
  if (t.has(e))
120
120
  throw TypeError("Cannot add the same private member more than once");
121
121
  t instanceof WeakSet ? t.add(e) : t.set(e, i);
122
- }, tt = (e, t, i, o) => (q(e, t, "write to private field"), o ? o.call(e, i) : t.set(e, i), i), h, z, P, _, M, k;
122
+ }, tt = (e, t, i, o) => (q(e, t, "write to private field"), t.set(e, i), i), h, z, P, _, M, k;
123
123
  let H = class extends V {
124
124
  constructor() {
125
125
  super(), w(this, h, void 0), w(this, z, new x(this, "--damping", 20)), w(this, P, new x(this, "--mass", 0)), w(this, _, new x(this, "--stiffness", 0)), w(this, M, new x(this, "--cartesian", !1)), w(this, k, new x(this, "--normalize", !1)), tt(this, h, new Y({
@@ -0,0 +1 @@
1
+ "use strict";const i=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10];function o(e,n=5){return Math.round(e*i[n])/i[n]}function u(e,n){return Math.round(e/n)*n}function c(e,n){var r;const t=((r=n.toString().split(".")[1])==null?void 0:r.length)||0;return t?+e.toFixed(t):Math.ceil(e)}function s(e,n){return typeof e=="undefined"?n:e}exports.nullishCoalescing=s;exports.preciseNumber=o;exports.roundNumberTo=u;exports.toStep=c;
@@ -0,0 +1,33 @@
1
+ const i = [
2
+ 1,
3
+ 10,
4
+ 100,
5
+ 1e3,
6
+ 1e4,
7
+ 1e5,
8
+ 1e6,
9
+ 1e7,
10
+ 1e8,
11
+ 1e9,
12
+ 1e10
13
+ ];
14
+ function o(e, n = 5) {
15
+ return Math.round(e * i[n]) / i[n];
16
+ }
17
+ function u(e, n) {
18
+ return Math.round(e / n) * n;
19
+ }
20
+ function s(e, n) {
21
+ var r;
22
+ const t = ((r = n.toString().split(".")[1]) == null ? void 0 : r.length) || 0;
23
+ return t ? +e.toFixed(t) : Math.ceil(e);
24
+ }
25
+ function c(e, n) {
26
+ return typeof e == "undefined" ? n : e;
27
+ }
28
+ export {
29
+ c as n,
30
+ o as p,
31
+ u as r,
32
+ s as t
33
+ };
@@ -1,5 +1,5 @@
1
- import { PopoverElement } from './PopoverElement';
2
1
  import { CustomElement } from '../custom-element';
2
+ import { PopoverElement } from './PopoverElement';
3
3
 
4
4
  export type PopoverButtonType = 'open' | 'close' | 'toggle';
5
5
  export declare class PopoverButtonElement extends CustomElement {
@@ -1,6 +1,6 @@
1
- import { Store } from '../store';
2
- import { CustomElement } from '../custom-element';
3
1
  import { Attribute } from '../attribute';
2
+ import { CustomElement } from '../custom-element';
3
+ import { Store } from '../store';
4
4
 
5
5
  export declare class PopoverElement extends CustomElement {
6
6
  #private;