@stfrigerio/sito-template 0.1.37 → 0.1.44

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 (337) hide show
  1. package/dist/components/organisms/Navbar/Navbar.d.ts.map +1 -1
  2. package/dist/index.esm.js +76 -18
  3. package/dist/index.esm.js.map +1 -1
  4. package/dist/index.js +76 -18
  5. package/dist/index.js.map +1 -1
  6. package/dist/styles.css +1 -1
  7. package/dist/styles.css.map +1 -1
  8. package/package.json +6 -3
  9. package/storybook-static/assets/3d/bar.glb +0 -0
  10. package/storybook-static/assets/3d/cube.glb +0 -0
  11. package/storybook-static/assets/3d/lens.glb +0 -0
  12. package/storybook-static/assets/ASCIIText.stories-BSKNvcoU.js +82 -0
  13. package/storybook-static/assets/AllAtoms.stories-BheGtT2x.js +109 -0
  14. package/storybook-static/assets/AnimatedContent.stories-DHs1c0dV.js +18 -0
  15. package/storybook-static/assets/AnimatedList-B3_lNwJZ.css +1 -0
  16. package/storybook-static/assets/AnimatedList.stories-DIfbjb22.js +26 -0
  17. package/storybook-static/assets/Antigravity.stories-BsyCq_d_.js +19 -0
  18. package/storybook-static/assets/ArrayInput.stories-Vhl_2MiN.js +232 -0
  19. package/storybook-static/assets/Aurora-JSo3CGBi.css +1 -0
  20. package/storybook-static/assets/Aurora.stories-C7vxHFyZ.js +97 -0
  21. package/storybook-static/assets/Beams-BaZopjLr.css +1 -0
  22. package/storybook-static/assets/Beams.stories-WmoAQdE2.js +122 -0
  23. package/storybook-static/assets/BlobCursor-sr9FxN5W.css +1 -0
  24. package/storybook-static/assets/BlobCursor.stories-Do76vl4q.js +24 -0
  25. package/storybook-static/assets/BlurText.stories-CIsxOJyQ.js +11 -0
  26. package/storybook-static/assets/{BooleansHeatmap.stories-2u4SThph.js → BooleansHeatmap.stories-DIdVIPVH.js} +8 -8
  27. package/storybook-static/assets/BorderGlow-BkXv9hP6.css +1 -0
  28. package/storybook-static/assets/BorderGlow.stories-B88w6QLt.js +15 -0
  29. package/storybook-static/assets/BubbleMenu-C856-Amm.css +1 -0
  30. package/storybook-static/assets/BubbleMenu.stories-CjsSE6cs.js +57 -0
  31. package/storybook-static/assets/{Button-VfdDKp2T.js → Button-C_YZ5gR4.js} +2 -2
  32. package/storybook-static/assets/Button.stories-Mw6nstnk.js +93 -0
  33. package/storybook-static/assets/Calendar-zTw0ddxb.css +1 -0
  34. package/storybook-static/assets/Calendar.stories-Dxshyi2I.js +470 -0
  35. package/storybook-static/assets/Camera-BM3HOhP6.js +1 -0
  36. package/storybook-static/assets/Card-BxyVZ-1r.css +1 -0
  37. package/storybook-static/assets/Card-C1evZ1rT.js +49 -0
  38. package/storybook-static/assets/Card.stories-Cd8o0lJL.js +127 -0
  39. package/storybook-static/assets/CardNav-DJBuAE3a.css +1 -0
  40. package/storybook-static/assets/CardNav.stories-CVCNllVh.js +55 -0
  41. package/storybook-static/assets/Carousel-DQYq51gd.css +1 -0
  42. package/storybook-static/assets/Carousel.stories-DXvKLxeO.js +58 -0
  43. package/storybook-static/assets/{Checkbox-BHwlDfRP.js → Checkbox-tM16vTif.js} +2 -2
  44. package/storybook-static/assets/{Checkbox.stories-DxTQrFgm.js → Checkbox.stories-dhEm8gbi.js} +2 -2
  45. package/storybook-static/assets/ChromaGrid-DuVAYWII.css +1 -0
  46. package/storybook-static/assets/ChromaGrid.stories-_N6hSynZ.js +59 -0
  47. package/storybook-static/assets/CircularGallery-Dw0kM5fT.css +1 -0
  48. package/storybook-static/assets/CircularGallery.stories-c7BEdmTm.js +95 -0
  49. package/storybook-static/assets/CircularText-DofQkQcn.css +1 -0
  50. package/storybook-static/assets/CircularText.stories-BCoG12vU.js +7 -0
  51. package/storybook-static/assets/ClickSpark.stories-BOypb8hM.js +12 -0
  52. package/storybook-static/assets/Color-AVL7NMMY-iZX0v-MX.js +1 -0
  53. package/storybook-static/assets/Color-YRkaOI4u.js +1 -0
  54. package/storybook-static/assets/ColorBends-BkbPScKk.css +1 -0
  55. package/storybook-static/assets/ColorBends.stories-DJVplB1e.js +103 -0
  56. package/storybook-static/assets/CountUp.stories-CZoxCmOS.js +11 -0
  57. package/storybook-static/assets/Counter-NM41Ofe9.css +1 -0
  58. package/storybook-static/assets/Counter.stories-CD2CN6Rs.js +15 -0
  59. package/storybook-static/assets/Crosshair.stories-pKH0CRjB.js +6 -0
  60. package/storybook-static/assets/Cubes-BbZLRUsz.css +1 -0
  61. package/storybook-static/assets/Cubes.stories-CG6EoDFk.js +1 -0
  62. package/storybook-static/assets/CurvedLoop-DyoDI-mm.css +1 -0
  63. package/storybook-static/assets/CurvedLoop.stories-2_6LGDBt.js +9 -0
  64. package/storybook-static/assets/DarkVeil-CeIthsg1.css +1 -0
  65. package/storybook-static/assets/DarkVeil.stories-NPy-IAdE.js +79 -0
  66. package/storybook-static/assets/DateInput-bEXupMbC.js +38 -0
  67. package/storybook-static/assets/{DateInput.stories-BGB5zJBm.js → DateInput.stories-Di9xlwl-.js} +2 -2
  68. package/storybook-static/assets/DecayCard-2Nc9J_8G.css +1 -0
  69. package/storybook-static/assets/DecayCard.stories-C_nLJJYv.js +8 -0
  70. package/storybook-static/assets/DecryptedText.stories-B3nmn_C5.js +15 -0
  71. package/storybook-static/assets/Dither-CDTFjgCl.css +1 -0
  72. package/storybook-static/assets/Dither.stories-DYFkOPEa.js +134 -0
  73. package/storybook-static/assets/Dock-DwLYexgF.css +1 -0
  74. package/storybook-static/assets/Dock.stories-D5xKRTwB.js +40 -0
  75. package/storybook-static/assets/{DocsRenderer-PQXLIZUC-q9kcQxfH.js → DocsRenderer-PQXLIZUC-qnjLy5zI.js} +8 -8
  76. package/storybook-static/assets/{EditFAB.stories-CmfJxWns.js → EditFAB.stories-D7WePUUN.js} +12 -42
  77. package/storybook-static/assets/EvilEye-QIF3Ik1Y.css +1 -0
  78. package/storybook-static/assets/EvilEye.stories-Cov9VutU.js +103 -0
  79. package/storybook-static/assets/FadeContent.stories-mHhk3715.js +14 -0
  80. package/storybook-static/assets/FaultyTerminal-D6zQXJ-g.css +1 -0
  81. package/storybook-static/assets/FaultyTerminal.stories-DjKOHL4-.js +224 -0
  82. package/storybook-static/assets/Fbo-CDZq1mNj.js +1 -0
  83. package/storybook-static/assets/FloatingLines-BPpNRsJk.css +1 -0
  84. package/storybook-static/assets/FloatingLines.stories-B_dxBmBz.js +187 -0
  85. package/storybook-static/assets/FlowingMenu-Cff-letA.css +1 -0
  86. package/storybook-static/assets/FlowingMenu.stories-DdUqXTFx.js +27 -0
  87. package/storybook-static/assets/FluidGlass.stories-C6FrnI3D.js +490 -0
  88. package/storybook-static/assets/Folder-BFuU52Ao.css +1 -0
  89. package/storybook-static/assets/Folder.stories-Zb5rwe3k.js +13 -0
  90. package/storybook-static/assets/FuzzyText.stories-CoZEjZrD.js +22 -0
  91. package/storybook-static/assets/Galaxy-Cj2Xx-fN.css +1 -0
  92. package/storybook-static/assets/Galaxy.stories-D8hfMx7x.js +184 -0
  93. package/storybook-static/assets/GhostCursor-CLKgvqwd.css +1 -0
  94. package/storybook-static/assets/GhostCursor.stories-DmAEHIj2.js +276 -0
  95. package/storybook-static/assets/GlareHover-D8gfoeb7.css +1 -0
  96. package/storybook-static/assets/GlareHover.stories-C2pGThOS.js +1 -0
  97. package/storybook-static/assets/GlassSurface-D51dj98P.css +1 -0
  98. package/storybook-static/assets/GlassSurface.stories-Dt29DAS0.js +43 -0
  99. package/storybook-static/assets/GlitchText-CsL0nL6_.css +1 -0
  100. package/storybook-static/assets/GlitchText.stories-sqo6Y5iu.js +8 -0
  101. package/storybook-static/assets/GooeyNav-8BBsSYWJ.css +1 -0
  102. package/storybook-static/assets/GooeyNav.stories-DxgFxo-U.js +24 -0
  103. package/storybook-static/assets/GradientBlinds-CBpfmlwu.css +1 -0
  104. package/storybook-static/assets/GradientBlinds.stories-BO3udAca.js +136 -0
  105. package/storybook-static/assets/GradientText-Bsx4jZeS.css +1 -0
  106. package/storybook-static/assets/GradientText.stories-DwqimEmN.js +11 -0
  107. package/storybook-static/assets/Grainient.stories-DrGFYn0A.js +113 -0
  108. package/storybook-static/assets/GridMotion-GSkrJvrd.css +1 -0
  109. package/storybook-static/assets/GridMotion.stories-Rbww9MSf.js +6 -0
  110. package/storybook-static/assets/ImageSlideshow-CrquLxbj.css +1 -0
  111. package/storybook-static/assets/ImageSlideshow.stories-BOxjGf7e.js +385 -0
  112. package/storybook-static/assets/Iridescence-DkXB1G15.css +1 -0
  113. package/storybook-static/assets/Iridescence.stories-CTQo8feH.js +47 -0
  114. package/storybook-static/assets/LaserFlow-YpDTX0s9.css +1 -0
  115. package/storybook-static/assets/LaserFlow.stories-DsHyOCT6.js +253 -0
  116. package/storybook-static/assets/LetterGlitch.stories-DYnbcxa2.js +1 -0
  117. package/storybook-static/assets/LightPillar-B1pSzH3x.css +1 -0
  118. package/storybook-static/assets/LightPillar.stories-C0oLGh9j.js +103 -0
  119. package/storybook-static/assets/LightRays.stories-y4A3LO7i.js +114 -0
  120. package/storybook-static/assets/Lightning-Duov5diw.css +1 -0
  121. package/storybook-static/assets/Lightning.stories-Bjuvt9ng.js +92 -0
  122. package/storybook-static/assets/LineWaves-CGZ5Tp0W.css +1 -0
  123. package/storybook-static/assets/LineWaves.stories-DXHfmcAY.js +132 -0
  124. package/storybook-static/assets/LiquidChrome-C8jkHJD4.css +1 -0
  125. package/storybook-static/assets/LiquidChrome.stories-BIJKsALp.js +60 -0
  126. package/storybook-static/assets/LiquidEther-BTKKmNQk.css +1 -0
  127. package/storybook-static/assets/LiquidEther.stories-Zn4y8_Dj.js +161 -0
  128. package/storybook-static/assets/LoadingSpinner-1jvNgxlI.css +1 -0
  129. package/storybook-static/assets/LoadingSpinner-T2OjcR-z.js +49 -0
  130. package/storybook-static/assets/LoadingSpinner.stories-YZPlVrIL.js +169 -0
  131. package/storybook-static/assets/MagicRings-B15iCWeD.css +1 -0
  132. package/storybook-static/assets/MagicRings.stories-B17cxZu8.js +81 -0
  133. package/storybook-static/assets/Magnet.stories-C6geVwXu.js +12 -0
  134. package/storybook-static/assets/MagnetLines-BMVF8tvL.css +1 -0
  135. package/storybook-static/assets/MagnetLines.stories-uCo-0xpG.js +1 -0
  136. package/storybook-static/assets/Masonry-JijTuZ6o.css +1 -0
  137. package/storybook-static/assets/Masonry.stories-BsaHuUl3.js +53 -0
  138. package/storybook-static/assets/Mesh-CwXV3WjE.js +7 -0
  139. package/storybook-static/assets/MetaBalls-Do7Vo_Ig.css +1 -0
  140. package/storybook-static/assets/MetaBalls.stories-CfS9YAYf.js +63 -0
  141. package/storybook-static/assets/MetallicPaint-rQ3s8Y0v.css +1 -0
  142. package/storybook-static/assets/MetallicPaint.stories-CPnRKq8Y.js +159 -0
  143. package/storybook-static/assets/MoodChart.stories-Bhzx-Mki.js +40 -0
  144. package/storybook-static/assets/MotionConfigContext-4uS6JRtS.js +1 -0
  145. package/storybook-static/assets/Navbar-BPWxCB-U.css +1 -0
  146. package/storybook-static/assets/Navbar.stories-CTJisFgI.js +325 -0
  147. package/storybook-static/assets/Noise-wMLTuki1.css +1 -0
  148. package/storybook-static/assets/Noise.stories-CV2ieqjl.js +9 -0
  149. package/storybook-static/assets/NumberStepper-0N2zZmLM.js +110 -0
  150. package/storybook-static/assets/NumberStepper-C_00aeJp.css +1 -0
  151. package/storybook-static/assets/NumberStepper.stories-DO0SaXet.js +436 -0
  152. package/storybook-static/assets/Orb-CS8T832d.css +1 -0
  153. package/storybook-static/assets/Orb.stories-BO2G-id7.js +177 -0
  154. package/storybook-static/assets/OrbitImages-DqsOGdeH.css +1 -0
  155. package/storybook-static/assets/OrbitImages.stories-Dd0Un1zc.js +26 -0
  156. package/storybook-static/assets/PieChart.stories-YSBHUrlk.js +199 -0
  157. package/storybook-static/assets/PixelBlast-xjKshbH4.css +1 -0
  158. package/storybook-static/assets/PixelBlast.stories-DLOdQdBC.js +211 -0
  159. package/storybook-static/assets/PixelCard-dyv8Jzsb.css +1 -0
  160. package/storybook-static/assets/PixelCard.stories-DL1EW33U.js +6 -0
  161. package/storybook-static/assets/PixelSnow-Mq8jFd6s.css +1 -0
  162. package/storybook-static/assets/PixelSnow.stories-40ms3GpO.js +155 -0
  163. package/storybook-static/assets/PixelTransition-4YlpcBIO.css +1 -0
  164. package/storybook-static/assets/PixelTransition.stories-Ce0j1LoP.js +27 -0
  165. package/storybook-static/assets/Plasma-hc6I4S4K.css +1 -0
  166. package/storybook-static/assets/Plasma.stories-C-qYly6i.js +78 -0
  167. package/storybook-static/assets/Prism-1A7MRUuH.css +1 -0
  168. package/storybook-static/assets/Prism.stories-BzLhe_ek.js +121 -0
  169. package/storybook-static/assets/PrismaticBurst-CJEX1JKp.css +1 -0
  170. package/storybook-static/assets/PrismaticBurst.stories-DODqjw3j.js +170 -0
  171. package/storybook-static/assets/ProfileCard-CO0Gk0e9.css +1 -0
  172. package/storybook-static/assets/ProfileCard.stories-DUyZIJ8A.js +15 -0
  173. package/storybook-static/assets/QuantifiableHabitsChart-Bam6n9X_.css +1 -0
  174. package/storybook-static/assets/QuantifiableHabitsChart.stories-DvgzevZP.js +105 -0
  175. package/storybook-static/assets/Radar-xwRKh0lP.css +1 -0
  176. package/storybook-static/assets/Radar.stories-2RPf1QSy.js +88 -0
  177. package/storybook-static/assets/Ribbons-CjSeVzzZ.css +1 -0
  178. package/storybook-static/assets/Ribbons.stories-RmoPiIi9.js +132 -0
  179. package/storybook-static/assets/RippleGrid-NvomE-YP.css +1 -0
  180. package/storybook-static/assets/RippleGrid.stories-Otw1g2CJ.js +113 -0
  181. package/storybook-static/assets/RotatingText-BGK56OzZ.css +1 -0
  182. package/storybook-static/assets/RotatingText.stories-NgYC0KMN.js +12 -0
  183. package/storybook-static/assets/ScrollFloat-CuaI6iDB.css +1 -0
  184. package/storybook-static/assets/ScrollFloat.stories-BFBCdW8h.js +12 -0
  185. package/storybook-static/assets/ScrollReveal-7GSimuFY.css +1 -0
  186. package/storybook-static/assets/ScrollReveal.stories-JKNxxGAh.js +13 -0
  187. package/storybook-static/assets/ScrollTrigger-D1XJUMov.js +15 -0
  188. package/storybook-static/assets/ScrollVelocity-BQllEnJm.css +1 -0
  189. package/storybook-static/assets/ScrollVelocity.stories-C8kmHqS4.js +9 -0
  190. package/storybook-static/assets/{SearchBar.stories-DmHIaDZB.js → SearchBar.stories-C7Ba5BXp.js} +30 -15
  191. package/storybook-static/assets/SearchableDropdown-C_6nW_fM.js +38 -0
  192. package/storybook-static/assets/{SearchableDropdown.stories-ByZj6lJu.js → SearchableDropdown.stories-Cr7zD259.js} +8 -8
  193. package/storybook-static/assets/SelectInput-Cq1kd98Q.js +31 -0
  194. package/storybook-static/assets/SelectInput.stories-BdpLeHVn.js +129 -0
  195. package/storybook-static/assets/ShapeBlur.stories-lRfZvgfc.js +131 -0
  196. package/storybook-static/assets/ShapeGrid-D5w-KuEm.css +1 -0
  197. package/storybook-static/assets/ShapeGrid.stories-CfjM9fjH.js +11 -0
  198. package/storybook-static/assets/ShinyText-D0_UmCBv.css +1 -0
  199. package/storybook-static/assets/ShinyText.stories-DKdXfhML.js +14 -0
  200. package/storybook-static/assets/Silk.stories-CjTLyn1c.js +62 -0
  201. package/storybook-static/assets/SleepChart-DBRb08s_.css +1 -0
  202. package/storybook-static/assets/SleepChart.stories-DJ12EHQj.js +58 -0
  203. package/storybook-static/assets/Slider-Bq7zObwV.css +1 -0
  204. package/storybook-static/assets/Slider-CjC8kTvA.js +32 -0
  205. package/storybook-static/assets/Slider.stories-8dOh6zEz.js +99 -0
  206. package/storybook-static/assets/SoftAurora-2A7ssVQp.css +1 -0
  207. package/storybook-static/assets/SoftAurora.stories-OVy3Uj5H.js +147 -0
  208. package/storybook-static/assets/SoundDemo.stories-BMnOeJoJ.js +3 -0
  209. package/storybook-static/assets/SplashCursor.stories-D-l4tdFh.js +244 -0
  210. package/storybook-static/assets/SpotlightCard-Bi63T6N0.css +1 -0
  211. package/storybook-static/assets/SpotlightCard.stories-CGzh2DPl.js +6 -0
  212. package/storybook-static/assets/Stack-CBKeDK5i.css +1 -0
  213. package/storybook-static/assets/Stack.stories-CGsiQ3oD.js +32 -0
  214. package/storybook-static/assets/StaggeredMenu-DjV6Ra1C.css +1 -0
  215. package/storybook-static/assets/StaggeredMenu.stories-Bq5nvfqE.js +45 -0
  216. package/storybook-static/assets/StarBorder-isNlSycS.css +1 -0
  217. package/storybook-static/assets/StarBorder.stories-CAGKcU-0.js +9 -0
  218. package/storybook-static/assets/SunburstChart.stories-ceDZ0sGS.js +285 -0
  219. package/storybook-static/assets/Table-DnhtoClE.css +1 -0
  220. package/storybook-static/assets/Table.stories-DNxjy4mw.js +227 -0
  221. package/storybook-static/assets/Tabs.stories-CujhnpzV.js +64 -0
  222. package/storybook-static/assets/TargetCursor-CWS-TuGF.css +1 -0
  223. package/storybook-static/assets/TargetCursor.stories-CjS6RpDB.js +9 -0
  224. package/storybook-static/assets/TextArea-DHBnvidn.js +28 -0
  225. package/storybook-static/assets/{TextArea.stories-CCqRRpwq.js → TextArea.stories-CCC4mZkh.js} +18 -8
  226. package/storybook-static/assets/TextCursor-DDqF-3pV.css +1 -0
  227. package/storybook-static/assets/TextCursor.stories-DbbUKuuf.js +11 -0
  228. package/storybook-static/assets/TextInput-BRLXZRi0.js +28 -0
  229. package/storybook-static/assets/{TextInput.stories-CtvOb60q.js → TextInput.stories-DzmoEdX3.js} +7 -7
  230. package/storybook-static/assets/TextPressure.stories-BjGjNHuq.js +47 -0
  231. package/storybook-static/assets/TextType-BYHLKnc2.css +1 -0
  232. package/storybook-static/assets/TextType.stories-BCEjz-Zi.js +19 -0
  233. package/storybook-static/assets/Texture-BkQWYNP2.js +1 -0
  234. package/storybook-static/assets/ThemeSwitcher.stories-0T7fY3d_.js +62 -0
  235. package/storybook-static/assets/Threads-C5ItmUMV.css +1 -0
  236. package/storybook-static/assets/Threads.stories-DDlSfgD5.js +121 -0
  237. package/storybook-static/assets/TimeInput.stories-CjV4ksEX.js +55 -0
  238. package/storybook-static/assets/Toggle-C26yCxt_.js +41 -0
  239. package/storybook-static/assets/Toggle.stories-D5LQoJpm.js +199 -0
  240. package/storybook-static/assets/ToggleButton-DJU3CV_i.css +1 -0
  241. package/storybook-static/assets/ToggleButton-DKVqKQxZ.js +32 -0
  242. package/storybook-static/assets/ToggleButton.stories-BfAEDMOR.js +163 -0
  243. package/storybook-static/assets/Triangle-64ffRKNB.js +1 -0
  244. package/storybook-static/assets/TrueFocus-C4c7GDsQ.css +1 -0
  245. package/storybook-static/assets/TrueFocus.stories-DA9Ysraz.js +12 -0
  246. package/storybook-static/assets/VariableProximity-E64p6UBv.css +1 -0
  247. package/storybook-static/assets/VariableProximity.stories-CN-Q4WDX.js +14 -0
  248. package/storybook-static/assets/Vec2-Cf1C3GIc.js +1 -0
  249. package/storybook-static/assets/Waves-C7txy_IO.css +1 -0
  250. package/storybook-static/assets/Waves.stories-W2IDhrZm.js +1 -0
  251. package/storybook-static/assets/axis-D3QohQNI.js +1 -0
  252. package/storybook-static/assets/check-Bh0K2zJt.js +6 -0
  253. package/storybook-static/assets/chevron-down-B26xHSrx.js +6 -0
  254. package/storybook-static/assets/chevron-right-4NIYYZ8p.js +6 -0
  255. package/storybook-static/assets/client-CyPtLppF.js +1 -0
  256. package/storybook-static/assets/createLucideIcon-wa-8tr0c.js +21 -0
  257. package/storybook-static/assets/demo/cs1.webp +0 -0
  258. package/storybook-static/assets/demo/cs2.webp +0 -0
  259. package/storybook-static/assets/demo/cs3.webp +0 -0
  260. package/storybook-static/assets/folder-OUDa6Ti7.js +6 -0
  261. package/storybook-static/assets/iconBase-fo9b9WAM.js +1 -0
  262. package/storybook-static/assets/{iframe-BUaP2gIF.js → iframe-2N7rjfXm.js} +192 -192
  263. package/storybook-static/assets/iframe-Df7_64QT.css +1 -0
  264. package/storybook-static/assets/{index-CBmvvqzc.js → index-BXmXrRij.js} +1 -1
  265. package/storybook-static/assets/index-C8pce-KX.js +15 -0
  266. package/storybook-static/assets/index-DaJY9FlE.js +24 -0
  267. package/storybook-static/assets/index-DcRHiSf7.js +128 -0
  268. package/storybook-static/assets/index-IKMS7NhW.js +9 -0
  269. package/storybook-static/assets/layout-grid-DMX9O4XB.js +6 -0
  270. package/storybook-static/assets/linear-dkJHgUri.js +1 -0
  271. package/storybook-static/assets/{monotone-BYG7Mesf.js → monotone-DHdPkfDP.js} +1 -1
  272. package/storybook-static/assets/proxy-qiKixXs8.js +1 -0
  273. package/storybook-static/assets/react-18-DajuY7cH.js +1 -0
  274. package/storybook-static/assets/react-three-fiber.esm-pSSy_32K.js +43 -0
  275. package/storybook-static/assets/search-DBjUUDRM.js +6 -0
  276. package/storybook-static/assets/sun-WV9AmUvz.js +11 -0
  277. package/storybook-static/assets/three.module--_vTUKhS.js +4057 -0
  278. package/storybook-static/assets/{transform-NloTqvdv.js → transform-BKmuZieF.js} +1 -1
  279. package/storybook-static/assets/use-animation-frame-DNrI5vnP.js +1 -0
  280. package/storybook-static/assets/use-in-view-Dn2glBsV.js +1 -0
  281. package/storybook-static/assets/use-motion-value-w2f8nz4L.js +1 -0
  282. package/storybook-static/assets/use-spring-CDOZMwuR.js +1 -0
  283. package/storybook-static/assets/use-transform-DZyAm4Sp.js +1 -0
  284. package/storybook-static/assets/useSound-BBLJ5Rjg.js +1 -0
  285. package/storybook-static/assets/users-0pBe6bxm.js +6 -0
  286. package/storybook-static/assets/x-k5o8Jl5E.js +6 -0
  287. package/storybook-static/iframe.html +7 -40
  288. package/storybook-static/index.json +1 -1
  289. package/storybook-static/project.json +1 -1
  290. package/storybook-static/sb-addons/chromatic-com-storybook-4/manager-bundle.js +1 -1
  291. package/storybook-static/sb-addons/docs-2/manager-bundle.js +2 -2
  292. package/storybook-static/sb-addons/links-3/manager-bundle.js +1 -1
  293. package/storybook-static/sb-addons/storybook-5/manager-bundle.js +1 -1
  294. package/storybook-static/sb-addons/storybook-core-server-presets-0/common-manager-bundle.js +3 -3
  295. package/storybook-static/assets/AllAtoms.stories-DBoQZmq-.js +0 -109
  296. package/storybook-static/assets/AnimationPlayer-UXJjBKtF.css +0 -1
  297. package/storybook-static/assets/AnimationPlayer.stories-yXQ8fqUT.js +0 -379
  298. package/storybook-static/assets/ArrayInput.stories-CRqKExgm.js +0 -221
  299. package/storybook-static/assets/Button.stories-BeeBKHoX.js +0 -117
  300. package/storybook-static/assets/Calendar-BTQfDDfP.css +0 -1
  301. package/storybook-static/assets/Calendar.stories-CKOG4XAn.js +0 -545
  302. package/storybook-static/assets/Card-Bc7TyfBx.css +0 -1
  303. package/storybook-static/assets/Card-D-kcaQHV.js +0 -49
  304. package/storybook-static/assets/Card.stories-CpcboxKs.js +0 -130
  305. package/storybook-static/assets/Color-AVL7NMMY-BzNNgCT5.js +0 -1
  306. package/storybook-static/assets/DateInput-Cu3PZYc0.js +0 -33
  307. package/storybook-static/assets/MoodChart.stories-V-wKOSu-.js +0 -40
  308. package/storybook-static/assets/Navbar-B8vEvGnB.css +0 -1
  309. package/storybook-static/assets/Navbar.stories-Dkf77idX.js +0 -235
  310. package/storybook-static/assets/NumberStepper-BVHPJutJ.css +0 -1
  311. package/storybook-static/assets/NumberStepper-BZGlrWCN.js +0 -30
  312. package/storybook-static/assets/NumberStepper.stories-NZw7r4Oh.js +0 -127
  313. package/storybook-static/assets/PieChart.stories-BkfNODjW.js +0 -199
  314. package/storybook-static/assets/QuantifiableHabitsChart-BEfzqND4.css +0 -1
  315. package/storybook-static/assets/QuantifiableHabitsChart.stories-Df6rcrdD.js +0 -105
  316. package/storybook-static/assets/SearchableDropdown-ByAXm1md.js +0 -38
  317. package/storybook-static/assets/SelectInput-D-AwfWVz.js +0 -31
  318. package/storybook-static/assets/SelectInput.stories-MyE-GqOw.js +0 -112
  319. package/storybook-static/assets/SleepChart-yGsG5RlQ.css +0 -1
  320. package/storybook-static/assets/SleepChart.stories-Dsz1U6F9.js +0 -58
  321. package/storybook-static/assets/SunburstChart.stories-CphfyDsR.js +0 -285
  322. package/storybook-static/assets/Tabs.stories-c24Ffu3K.js +0 -49
  323. package/storybook-static/assets/TextArea-B_sATPlw.js +0 -28
  324. package/storybook-static/assets/TextInput-ZGg8LTL_.js +0 -28
  325. package/storybook-static/assets/ThemeSwitcher.stories-BvkX1SDm.js +0 -62
  326. package/storybook-static/assets/TimeInput.stories-BchhRfKo.js +0 -50
  327. package/storybook-static/assets/Toggle-BQ2KHBDr.js +0 -39
  328. package/storybook-static/assets/Toggle.stories-BUSZc6m3.js +0 -194
  329. package/storybook-static/assets/ToggleButton-Dl6hvkJv.js +0 -32
  330. package/storybook-static/assets/ToggleButton-gfPoPxTQ.css +0 -1
  331. package/storybook-static/assets/ToggleButton.stories-BKN4zU3N.js +0 -143
  332. package/storybook-static/assets/iframe-BOc1hSA-.css +0 -1
  333. package/storybook-static/assets/index-5bdJXrkD.js +0 -1
  334. package/storybook-static/assets/index-CZs7_DA6.js +0 -9
  335. package/storybook-static/assets/linear-4t_RuQok.js +0 -1
  336. package/storybook-static/assets/proxy-9Y4F2rF8.js +0 -1
  337. package/storybook-static/assets/react-18-D4c-_GAk.js +0 -24
@@ -0,0 +1 @@
1
+ ._magic-rings-container_15l2r_1{position:relative;width:100%;min-height:100vh}._magic-rings-container_15l2r_1 canvas{display:block;width:100%;height:100%;position:absolute;top:0;left:0}
@@ -0,0 +1,81 @@
1
+ import{r as o,j as ee}from"./iframe-2N7rjfXm.js";import{W as ae,S as ue,a as te,d as E,n as L,i as oe,M as ne,q as le}from"./three.module--_vTUKhS.js";import"./preload-helper-C1FmrZbK.js";const re={"magic-rings-container":"_magic-rings-container_15l2r_1"},se=`
2
+ void main() {
3
+ gl_Position = projectionMatrix * modelViewMatrix * vec4(position, 1.0);
4
+ }
5
+ `,ie=`
6
+ precision highp float;
7
+
8
+ uniform float uTime, uAttenuation, uLineThickness;
9
+ uniform float uBaseRadius, uRadiusStep, uScaleRate;
10
+ uniform float uOpacity, uNoiseAmount, uRotation, uRingGap;
11
+ uniform float uFadeIn, uFadeOut;
12
+ uniform float uMouseInfluence, uHoverAmount, uHoverScale, uParallax, uBurst;
13
+ uniform vec2 uResolution, uMouse;
14
+ uniform vec3 uColor, uColorTwo;
15
+ uniform int uRingCount;
16
+
17
+ const float HP = 1.5707963;
18
+ const float CYCLE = 3.45;
19
+
20
+ float fade(float t) {
21
+ return t < uFadeIn ? smoothstep(0.0, uFadeIn, t) : 1.0 - smoothstep(uFadeOut, CYCLE - 0.2, t);
22
+ }
23
+
24
+ float ring(vec2 p, float ri, float cut, float t0, float px) {
25
+ float t = mod(uTime + t0, CYCLE);
26
+ float r = ri + t / CYCLE * uScaleRate;
27
+ float d = abs(length(p) - r);
28
+ float a = atan(abs(p.y), abs(p.x)) / HP;
29
+ float th = max(1.0 - a, 0.5) * px * uLineThickness;
30
+ float h = (1.0 - smoothstep(th, th * 1.5, d)) + 1.0;
31
+ d += pow(cut * a, 3.0) * r;
32
+ return h * exp(-uAttenuation * d) * fade(t);
33
+ }
34
+
35
+ void main() {
36
+ float px = 1.0 / min(uResolution.x, uResolution.y);
37
+ vec2 p = (gl_FragCoord.xy - 0.5 * uResolution.xy) * px;
38
+ float cr = cos(uRotation), sr = sin(uRotation);
39
+ p = mat2(cr, -sr, sr, cr) * p;
40
+ p -= uMouse * uMouseInfluence;
41
+ float sc = mix(1.0, uHoverScale, uHoverAmount) + uBurst * 0.3;
42
+ p /= sc;
43
+ vec3 c = vec3(0.0);
44
+ float rcf = max(float(uRingCount) - 1.0, 1.0);
45
+ for (int i = 0; i < 10; i++) {
46
+ if (i >= uRingCount) break;
47
+ float fi = float(i);
48
+ vec2 pr = p - fi * uParallax * uMouse;
49
+ vec3 rc = mix(uColor, uColorTwo, fi / rcf);
50
+ c = mix(c, rc, vec3(ring(pr, uBaseRadius + fi * uRadiusStep, pow(uRingGap, fi), i == 0 ? 0.0 : 2.95 * fi, px)));
51
+ }
52
+ c *= 1.0 + uBurst * 2.0;
53
+ float n = fract(sin(dot(gl_FragCoord.xy + uTime * 100.0, vec2(12.9898, 78.233))) * 43758.5453);
54
+ c += (n - 0.5) * uNoiseAmount;
55
+ gl_FragColor = vec4(c, max(c.r, max(c.g, c.b)) * uOpacity);
56
+ }
57
+ `;function b({color:k="#fc42ff",colorTwo:B="#42fcff",speed:F=1,ringCount:O=6,attenuation:H=10,lineThickness:G=2,baseRadius:P=.35,radiusStep:_=.1,scaleRate:z=.1,opacity:N=1,blur:p=0,noiseAmount:Y=.1,rotation:j=0,ringGap:W=1.5,fadeIn:D=.7,fadeOut:$=.5,followMouse:X=!1,mouseInfluence:J=.2,hoverScale:K=1.2,parallax:Q=.05,clickBurst:U=!1}){const R=o.useRef(null),g=o.useRef(null),l=o.useRef([0,0]),r=o.useRef([0,0]),f=o.useRef(0),d=o.useRef(!1),s=o.useRef(0);return g.current={color:k,colorTwo:B,speed:F,ringCount:O,attenuation:H,lineThickness:G,baseRadius:P,radiusStep:_,scaleRate:z,opacity:N,noiseAmount:Y,rotation:j,ringGap:W,fadeIn:D,fadeOut:$,followMouse:X,mouseInfluence:J,hoverScale:K,parallax:Q,clickBurst:U},o.useEffect(()=>{const u=R.current;if(!u)return;let t;try{t=new ae({alpha:!0})}catch{return}if(!t.capabilities.isWebGL2){t.dispose();return}t.setClearColor(0,0),u.appendChild(t.domElement);const h=new ue,x=new te(-.5,.5,.5,-.5,.1,10);x.position.z=1;const a={uTime:{value:0},uAttenuation:{value:0},uResolution:{value:new E},uColor:{value:new L},uColorTwo:{value:new L},uLineThickness:{value:0},uBaseRadius:{value:0},uRadiusStep:{value:0},uScaleRate:{value:0},uRingCount:{value:0},uOpacity:{value:1},uNoiseAmount:{value:0},uRotation:{value:0},uRingGap:{value:1.6},uFadeIn:{value:.5},uFadeOut:{value:.75},uMouse:{value:new E},uMouseInfluence:{value:0},uHoverAmount:{value:0},uHoverScale:{value:1},uParallax:{value:0},uBurst:{value:0}},C=new oe({vertexShader:se,fragmentShader:ie,uniforms:a,transparent:!0}),Z=new ne(new le(1,1),C);h.add(Z);const i=()=>{const n=u.clientWidth,e=u.clientHeight,v=Math.min(window.devicePixelRatio,2);t.setSize(n,e),t.setPixelRatio(v),a.uResolution.value.set(n*v,e*v)};i(),window.addEventListener("resize",i);const w=new ResizeObserver(i);w.observe(u);const M=n=>{const e=u.getBoundingClientRect();l.current[0]=(n.clientX-e.left)/e.width-.5,l.current[1]=-((n.clientY-e.top)/e.height-.5)},S=()=>{d.current=!0},q=()=>{d.current=!1,l.current[0]=0,l.current[1]=0},V=()=>{s.current=1};u.addEventListener("mousemove",M),u.addEventListener("mouseenter",S),u.addEventListener("mouseleave",q),u.addEventListener("click",V);let m;const A=n=>{m=requestAnimationFrame(A);const e=g.current;r.current[0]+=(l.current[0]-r.current[0])*.08,r.current[1]+=(l.current[1]-r.current[1])*.08,f.current+=((d.current?1:0)-f.current)*.08,s.current*=.95,s.current<.001&&(s.current=0),a.uTime.value=n*.001*e.speed,a.uAttenuation.value=e.attenuation,a.uColor.value.set(e.color),a.uColorTwo.value.set(e.colorTwo),a.uLineThickness.value=e.lineThickness,a.uBaseRadius.value=e.baseRadius,a.uRadiusStep.value=e.radiusStep,a.uScaleRate.value=e.scaleRate,a.uRingCount.value=e.ringCount,a.uOpacity.value=e.opacity,a.uNoiseAmount.value=e.noiseAmount,a.uRotation.value=e.rotation*Math.PI/180,a.uRingGap.value=e.ringGap,a.uFadeIn.value=e.fadeIn,a.uFadeOut.value=e.fadeOut,a.uMouse.value.set(r.current[0],r.current[1]),a.uMouseInfluence.value=e.followMouse?e.mouseInfluence:0,a.uHoverAmount.value=f.current,a.uHoverScale.value=e.hoverScale,a.uParallax.value=e.parallax,a.uBurst.value=e.clickBurst?s.current:0,t.render(h,x)};return m=requestAnimationFrame(A),()=>{cancelAnimationFrame(m),window.removeEventListener("resize",i),w.disconnect(),u.removeEventListener("mousemove",M),u.removeEventListener("mouseenter",S),u.removeEventListener("mouseleave",q),u.removeEventListener("click",V),u.removeChild(t.domElement),t.dispose(),C.dispose()}},[]),ee.jsx("div",{ref:R,className:`${re["magic-rings-container"]}`,style:p>0?{filter:`blur(${p}px)`}:void 0})}b.__docgenInfo={description:"",methods:[],displayName:"MagicRings",props:{color:{defaultValue:{value:"'#fc42ff'",computed:!1},required:!1},colorTwo:{defaultValue:{value:"'#42fcff'",computed:!1},required:!1},speed:{defaultValue:{value:"1",computed:!1},required:!1},ringCount:{defaultValue:{value:"6",computed:!1},required:!1},attenuation:{defaultValue:{value:"10",computed:!1},required:!1},lineThickness:{defaultValue:{value:"2",computed:!1},required:!1},baseRadius:{defaultValue:{value:"0.35",computed:!1},required:!1},radiusStep:{defaultValue:{value:"0.1",computed:!1},required:!1},scaleRate:{defaultValue:{value:"0.1",computed:!1},required:!1},opacity:{defaultValue:{value:"1",computed:!1},required:!1},blur:{defaultValue:{value:"0",computed:!1},required:!1},noiseAmount:{defaultValue:{value:"0.1",computed:!1},required:!1},rotation:{defaultValue:{value:"0",computed:!1},required:!1},ringGap:{defaultValue:{value:"1.5",computed:!1},required:!1},fadeIn:{defaultValue:{value:"0.7",computed:!1},required:!1},fadeOut:{defaultValue:{value:"0.5",computed:!1},required:!1},followMouse:{defaultValue:{value:"false",computed:!1},required:!1},mouseInfluence:{defaultValue:{value:"0.2",computed:!1},required:!1},hoverScale:{defaultValue:{value:"1.2",computed:!1},required:!1},parallax:{defaultValue:{value:"0.05",computed:!1},required:!1},clickBurst:{defaultValue:{value:"false",computed:!1},required:!1}}};const me={title:"ReactBits/Animations/MagicRings",component:b,parameters:{layout:"fullscreen"},tags:["autodocs"]},c={args:{color:"#fc42ff",colorTwo:"#42fcff",speed:1,ringCount:6,attenuation:10,lineThickness:2,baseRadius:.35,radiusStep:.1,scaleRate:.1,opacity:1,blur:0,noiseAmount:.1,rotation:0,ringGap:1.5,fadeIn:.7,fadeOut:.5,followMouse:!1,mouseInfluence:.2,hoverScale:1.2,parallax:.05,clickBurst:!1}};var T,I,y;c.parameters={...c.parameters,docs:{...(T=c.parameters)==null?void 0:T.docs,source:{originalSource:`{
58
+ args: {
59
+ color: '#fc42ff',
60
+ colorTwo: '#42fcff',
61
+ speed: 1,
62
+ ringCount: 6,
63
+ attenuation: 10,
64
+ lineThickness: 2,
65
+ baseRadius: 0.35,
66
+ radiusStep: 0.1,
67
+ scaleRate: 0.1,
68
+ opacity: 1,
69
+ blur: 0,
70
+ noiseAmount: 0.1,
71
+ rotation: 0,
72
+ ringGap: 1.5,
73
+ fadeIn: 0.7,
74
+ fadeOut: 0.5,
75
+ followMouse: false,
76
+ mouseInfluence: 0.2,
77
+ hoverScale: 1.2,
78
+ parallax: 0.05,
79
+ clickBurst: false
80
+ }
81
+ }`,...(y=(I=c.parameters)==null?void 0:I.docs)==null?void 0:y.source}}};const ve=["Default"];export{c as Default,ve as __namedExportsOrder,me as default};
@@ -0,0 +1,12 @@
1
+ import{r as t,j as v}from"./iframe-2N7rjfXm.js";import"./preload-helper-C1FmrZbK.js";const y=({children:w,padding:a=100,disabled:i=!1,magnetStrength:n=2,activeTransition:N="transform 0.3s ease-out",inactiveTransition:C="transform 0.5s ease-in-out",wrapperClassName:q="",innerClassName:M="",...V})=>{const[E,l]=t.useState(!1),[u,r]=t.useState({x:0,y:0}),o=t.useRef(null);t.useEffect(()=>{if(i){r({x:0,y:0});return}const c=e=>{if(!o.current)return;const{left:b,top:R,width:d,height:f}=o.current.getBoundingClientRect(),m=b+d/2,p=R+f/2,S=Math.abs(m-e.clientX),X=Math.abs(p-e.clientY);if(S<d/2+a&&X<f/2+a){l(!0);const Y=(e.clientX-m)/n,j=(e.clientY-p)/n;r({x:Y,y:j})}else l(!1),r({x:0,y:0})};return window.addEventListener("mousemove",c),()=>{window.removeEventListener("mousemove",c)}},[a,i,n]);const T=E?N:C;return v.jsx("div",{ref:o,className:q,style:{position:"relative",display:"inline-block"},...V,children:v.jsx("div",{className:M,style:{transform:`translate3d(${u.x}px, ${u.y}px, 0)`,transition:T,willChange:"transform"},children:w})})};y.__docgenInfo={description:"",methods:[],displayName:"Magnet",props:{padding:{defaultValue:{value:"100",computed:!1},required:!1},disabled:{defaultValue:{value:"false",computed:!1},required:!1},magnetStrength:{defaultValue:{value:"2",computed:!1},required:!1},activeTransition:{defaultValue:{value:"'transform 0.3s ease-out'",computed:!1},required:!1},inactiveTransition:{defaultValue:{value:"'transform 0.5s ease-in-out'",computed:!1},required:!1},wrapperClassName:{defaultValue:{value:"''",computed:!1},required:!1},innerClassName:{defaultValue:{value:"''",computed:!1},required:!1}}};const B={title:"ReactBits/Animations/Magnet",component:y,parameters:{layout:"fullscreen"},tags:["autodocs"]},s={args:{children:"Hello World",padding:100,disabled:!1,magnetStrength:2,activeTransition:"transform 0.3s ease-out",inactiveTransition:"transform 0.5s ease-in-out",wrapperClassName:"",innerClassName:""}};var g,x,h;s.parameters={...s.parameters,docs:{...(g=s.parameters)==null?void 0:g.docs,source:{originalSource:`{
2
+ args: {
3
+ children: 'Hello World',
4
+ padding: 100,
5
+ disabled: false,
6
+ magnetStrength: 2,
7
+ activeTransition: 'transform 0.3s ease-out',
8
+ inactiveTransition: 'transform 0.5s ease-in-out',
9
+ wrapperClassName: '',
10
+ innerClassName: ''
11
+ }
12
+ }`,...(h=(x=s.parameters)==null?void 0:x.docs)==null?void 0:h.source}}};const D=["Default"];export{s as Default,D as __namedExportsOrder,B as default};
@@ -0,0 +1 @@
1
+ ._magnetLines-container_gc84k_1{display:grid;grid-template-columns:repeat(var(--columns),1fr);grid-template-rows:repeat(var(--rows),1fr);justify-items:center;align-items:center;width:80vmin;height:80vmin}._magnetLines-container_gc84k_1 span{display:block;transform-origin:center;will-change:transform;transform:rotate(var(--rotate))}
@@ -0,0 +1 @@
1
+ import{r as p,j as g}from"./iframe-2N7rjfXm.js";import"./preload-helper-C1FmrZbK.js";const A={"magnetLines-container":"_magnetLines-container_gc84k_1"};function x({rows:i=9,columns:u=9,containerSize:c="80vmin",lineColor:q="#efefef",lineWidth:V="1vmin",lineHeight:w="6vmin",baseAngle:L=-10,className:M="",style:_={}}){const d=p.useRef(null);p.useEffect(()=>{const r=d.current;if(!r)return;const e=r.querySelectorAll("span"),o=t=>{e.forEach(a=>{const s=a.getBoundingClientRect(),$=s.x+s.width/2,f=s.y+s.height/2,l=t.x-$,m=t.y-f,C=Math.sqrt(m*m+l*l)||1,j=Math.acos(l/C)*180/Math.PI*(t.y>f?1:-1);a.style.setProperty("--rotate",`${j}deg`)})};if(window.addEventListener("pointermove",o),e.length){const t=Math.floor(e.length/2),a=e[t].getBoundingClientRect();o({x:a.x,y:a.y})}return()=>{window.removeEventListener("pointermove",o)}},[]);const E=i*u,R=Array.from({length:E},(r,e)=>g.jsx("span",{style:{"--rotate":`${L}deg`,backgroundColor:q,width:V,height:w}},e));return g.jsx("div",{ref:d,className:`${A["magnetLines-container"]} ${M}`,style:{display:"grid",gridTemplateColumns:`repeat(${u}, 1fr)`,gridTemplateRows:`repeat(${i}, 1fr)`,width:c,height:c,..._},children:R})}x.__docgenInfo={description:"",methods:[],displayName:"MagnetLines",props:{rows:{defaultValue:{value:"9",computed:!1},required:!1},columns:{defaultValue:{value:"9",computed:!1},required:!1},containerSize:{defaultValue:{value:"'80vmin'",computed:!1},required:!1},lineColor:{defaultValue:{value:"'#efefef'",computed:!1},required:!1},lineWidth:{defaultValue:{value:"'1vmin'",computed:!1},required:!1},lineHeight:{defaultValue:{value:"'6vmin'",computed:!1},required:!1},baseAngle:{defaultValue:{value:"-10",computed:!1},required:!1},className:{defaultValue:{value:"''",computed:!1},required:!1},style:{defaultValue:{value:"{}",computed:!1},required:!1}}};const I={title:"ReactBits/Animations/MagnetLines",component:x,parameters:{layout:"fullscreen"},tags:["autodocs"]},n={};var v,h,y;n.parameters={...n.parameters,docs:{...(v=n.parameters)==null?void 0:v.docs,source:{originalSource:"{}",...(y=(h=n.parameters)==null?void 0:h.docs)==null?void 0:y.source}}};const N=["Default"];export{n as Default,N as __namedExportsOrder,I as default};
@@ -0,0 +1 @@
1
+ ._list_m346a_1{position:relative;width:100%;min-height:100vh}._item-wrapper_m346a_7{position:absolute;will-change:transform,width,height,opacity;padding:6px;cursor:pointer;top:0;left:0}._item-wrapper_m346a_7>._item-img_m346a_16{position:relative;background-size:cover;background-position:center center;width:100%;min-height:100vh;text-transform:uppercase;font-size:10px;line-height:10px;border-radius:10px;box-shadow:0 10px 50px -10px #0003}
@@ -0,0 +1,53 @@
1
+ import{r as i,j as f}from"./iframe-2N7rjfXm.js";import{g as m}from"./index-C8pce-KX.js";import"./preload-helper-C1FmrZbK.js";const H="_list_m346a_1",M={list:H,"item-wrapper":"_item-wrapper_m346a_7","item-img":"_item-img_m346a_16"},N=(o,u,c)=>{const n=()=>u[o.findIndex(l=>matchMedia(l).matches)]??c,[d,p]=i.useState(n);return i.useEffect(()=>{const l=()=>p(n);return o.forEach(h=>matchMedia(h).addEventListener("change",l)),()=>o.forEach(h=>matchMedia(h).removeEventListener("change",l))},[o]),d},P=()=>{const o=i.useRef(null),[u,c]=i.useState({width:0,height:0});return i.useLayoutEffect(()=>{if(!o.current)return;const n=new ResizeObserver(([d])=>{const{width:p,height:l}=d.contentRect;c({width:p,height:l})});return n.observe(o.current),()=>n.disconnect()},[]),[o,u]},C=async o=>{await Promise.all(o.map(u=>new Promise(c=>{const n=new Image;n.src=u,n.onload=n.onerror=()=>c()})))},q=({items:o,ease:u="power3.out",duration:c=.6,stagger:n=.05,animateFrom:d="bottom",scaleOnHover:p=!0,hoverScale:l=.95,blurToFocus:h=!0,colorShiftOnHover:w=!1})=>{const x=N(["(min-width:1500px)","(min-width:1000px)","(min-width:600px)","(min-width:400px)"],[5,4,3,2],1),[E,{width:v}]=P(),[S,I]=i.useState(!1),$=e=>{var s;const t=(s=E.current)==null?void 0:s.getBoundingClientRect();if(!t)return{x:e.x,y:e.y};let a=d;if(d==="random"){const r=["top","bottom","left","right"];a=r[Math.floor(Math.random()*r.length)]}switch(a){case"top":return{x:e.x,y:-200};case"bottom":return{x:e.x,y:window.innerHeight+200};case"left":return{x:-200,y:e.y};case"right":return{x:window.innerWidth+200,y:e.y};case"center":return{x:t.width/2-e.w/2,y:t.height/2-e.h/2};default:return{x:e.x,y:e.y+100}}};i.useEffect(()=>{C(o.map(e=>e.img)).then(()=>I(!0))},[o]);const b=i.useMemo(()=>{if(!v)return[];const e=new Array(x).fill(0),t=v/x;return o.map(a=>{const s=e.indexOf(Math.min(...e)),r=t*s,g=a.height/2,O=e[s];return e[s]+=g,{...a,x:r,y:O,w:t,h:g}})},[x,o,v]),_=i.useRef(!1);i.useLayoutEffect(()=>{S&&(b.forEach((e,t)=>{const a=`[data-key="${e.id}"]`,s={x:e.x,y:e.y,width:e.w,height:e.h};if(_.current)m.to(a,{...s,duration:c,ease:u,overwrite:"auto"});else{const r=$(e),g={opacity:0,x:r.x,y:r.y,width:e.w,height:e.h,...h&&{filter:"blur(10px)"}};m.fromTo(a,g,{opacity:1,...s,...h&&{filter:"blur(0px)"},duration:.8,ease:"power3.out",delay:t*n})}}),_.current=!0)},[b,S,n,d,h,c,u]);const j=(e,t)=>{const a=e.currentTarget,s=`[data-key="${t.id}"]`;if(p&&m.to(s,{scale:l,duration:.3,ease:"power2.out"}),w){const r=a.querySelector(".color-overlay");r&&m.to(r,{opacity:.3,duration:.3})}},L=(e,t)=>{const a=e.currentTarget,s=`[data-key="${t.id}"]`;if(p&&m.to(s,{scale:1,duration:.3,ease:"power2.out"}),w){const r=a.querySelector(".color-overlay");r&&m.to(r,{opacity:0,duration:.3})}};return f.jsx("div",{ref:E,className:`${M.list}`,children:b.map(e=>f.jsx("div",{"data-key":e.id,className:`${M["item-wrapper"]}`,onClick:()=>window.open(e.url,"_blank","noopener"),onMouseEnter:t=>j(t,e),onMouseLeave:t=>L(t,e),children:f.jsx("div",{className:`${M["item-img"]}`,style:{backgroundImage:`url(${e.img})`},children:w&&f.jsx("div",{className:"color-overlay",style:{position:"absolute",top:0,left:0,width:"100%",height:"100%",background:"linear-gradient(45deg, rgba(255,0,150,0.5), rgba(0,150,255,0.5))",opacity:0,pointerEvents:"none",borderRadius:"8px"}})})},e.id))})};q.__docgenInfo={description:"",methods:[],displayName:"Masonry",props:{ease:{defaultValue:{value:"'power3.out'",computed:!1},required:!1},duration:{defaultValue:{value:"0.6",computed:!1},required:!1},stagger:{defaultValue:{value:"0.05",computed:!1},required:!1},animateFrom:{defaultValue:{value:"'bottom'",computed:!1},required:!1},scaleOnHover:{defaultValue:{value:"true",computed:!1},required:!1},hoverScale:{defaultValue:{value:"0.95",computed:!1},required:!1},blurToFocus:{defaultValue:{value:"true",computed:!1},required:!1},colorShiftOnHover:{defaultValue:{value:"false",computed:!1},required:!1}}};const B={title:"ReactBits/Components/Masonry",component:q,parameters:{layout:"fullscreen"},tags:["autodocs"]},y={args:{items:[{id:1,img:"https://picsum.photos/seed/a/400/600",height:600,url:"#"},{id:2,img:"https://picsum.photos/seed/b/400/400",height:400,url:"#"},{id:3,img:"https://picsum.photos/seed/c/400/500",height:500,url:"#"},{id:4,img:"https://picsum.photos/seed/d/400/350",height:350,url:"#"},{id:5,img:"https://picsum.photos/seed/e/400/450",height:450,url:"#"},{id:6,img:"https://picsum.photos/seed/f/400/550",height:550,url:"#"},{id:7,img:"https://picsum.photos/seed/g/400/380",height:380,url:"#"},{id:8,img:"https://picsum.photos/seed/h/400/480",height:480,url:"#"}],ease:"power3.out",duration:.6,stagger:.05,animateFrom:"bottom",scaleOnHover:!0,hoverScale:.95,blurToFocus:!0,colorShiftOnHover:!1}};var R,V,k;y.parameters={...y.parameters,docs:{...(R=y.parameters)==null?void 0:R.docs,source:{originalSource:`{
2
+ args: {
3
+ items: [{
4
+ id: 1,
5
+ img: 'https://picsum.photos/seed/a/400/600',
6
+ height: 600,
7
+ url: '#'
8
+ }, {
9
+ id: 2,
10
+ img: 'https://picsum.photos/seed/b/400/400',
11
+ height: 400,
12
+ url: '#'
13
+ }, {
14
+ id: 3,
15
+ img: 'https://picsum.photos/seed/c/400/500',
16
+ height: 500,
17
+ url: '#'
18
+ }, {
19
+ id: 4,
20
+ img: 'https://picsum.photos/seed/d/400/350',
21
+ height: 350,
22
+ url: '#'
23
+ }, {
24
+ id: 5,
25
+ img: 'https://picsum.photos/seed/e/400/450',
26
+ height: 450,
27
+ url: '#'
28
+ }, {
29
+ id: 6,
30
+ img: 'https://picsum.photos/seed/f/400/550',
31
+ height: 550,
32
+ url: '#'
33
+ }, {
34
+ id: 7,
35
+ img: 'https://picsum.photos/seed/g/400/380',
36
+ height: 380,
37
+ url: '#'
38
+ }, {
39
+ id: 8,
40
+ img: 'https://picsum.photos/seed/h/400/480',
41
+ height: 480,
42
+ url: '#'
43
+ }],
44
+ ease: 'power3.out',
45
+ duration: 0.6,
46
+ stagger: 0.05,
47
+ animateFrom: 'bottom',
48
+ scaleOnHover: true,
49
+ hoverScale: 0.95,
50
+ blurToFocus: true,
51
+ colorShiftOnHover: false
52
+ }
53
+ }`,...(k=(V=y.parameters)==null?void 0:V.docs)==null?void 0:k.source}}};const D=["Default"];export{y as Default,D as __namedExportsOrder,B as default};
@@ -0,0 +1,7 @@
1
+ function I(e){let t=e[0],s=e[1],i=e[2];return Math.sqrt(t*t+s*s+i*i)}function q(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e}function ht(e,t,s,i){return e[0]=t,e[1]=s,e[2]=i,e}function U(e,t,s){return e[0]=t[0]+s[0],e[1]=t[1]+s[1],e[2]=t[2]+s[2],e}function $(e,t,s){return e[0]=t[0]-s[0],e[1]=t[1]-s[1],e[2]=t[2]-s[2],e}function lt(e,t,s){return e[0]=t[0]*s[0],e[1]=t[1]*s[1],e[2]=t[2]*s[2],e}function at(e,t,s){return e[0]=t[0]/s[0],e[1]=t[1]/s[1],e[2]=t[2]/s[2],e}function D(e,t,s){return e[0]=t[0]*s,e[1]=t[1]*s,e[2]=t[2]*s,e}function ft(e,t){let s=t[0]-e[0],i=t[1]-e[1],r=t[2]-e[2];return Math.sqrt(s*s+i*i+r*r)}function ct(e,t){let s=t[0]-e[0],i=t[1]-e[1],r=t[2]-e[2];return s*s+i*i+r*r}function X(e){let t=e[0],s=e[1],i=e[2];return t*t+s*s+i*i}function dt(e,t){return e[0]=-t[0],e[1]=-t[1],e[2]=-t[2],e}function gt(e,t){return e[0]=1/t[0],e[1]=1/t[1],e[2]=1/t[2],e}function V(e,t){let s=t[0],i=t[1],r=t[2],n=s*s+i*i+r*r;return n>0&&(n=1/Math.sqrt(n)),e[0]=t[0]*n,e[1]=t[1]*n,e[2]=t[2]*n,e}function st(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}function k(e,t,s){let i=t[0],r=t[1],n=t[2],h=s[0],l=s[1],a=s[2];return e[0]=r*a-n*l,e[1]=n*h-i*a,e[2]=i*l-r*h,e}function pt(e,t,s,i){let r=t[0],n=t[1],h=t[2];return e[0]=r+i*(s[0]-r),e[1]=n+i*(s[1]-n),e[2]=h+i*(s[2]-h),e}function ut(e,t,s,i,r){const n=Math.exp(-i*r);let h=t[0],l=t[1],a=t[2];return e[0]=s[0]+(h-s[0])*n,e[1]=s[1]+(l-s[1])*n,e[2]=s[2]+(a-s[2])*n,e}function xt(e,t,s){let i=t[0],r=t[1],n=t[2],h=s[3]*i+s[7]*r+s[11]*n+s[15];return h=h||1,e[0]=(s[0]*i+s[4]*r+s[8]*n+s[12])/h,e[1]=(s[1]*i+s[5]*r+s[9]*n+s[13])/h,e[2]=(s[2]*i+s[6]*r+s[10]*n+s[14])/h,e}function ot(e,t,s){let i=t[0],r=t[1],n=t[2],h=s[3]*i+s[7]*r+s[11]*n+s[15];return h=h||1,e[0]=(s[0]*i+s[4]*r+s[8]*n)/h,e[1]=(s[1]*i+s[5]*r+s[9]*n)/h,e[2]=(s[2]*i+s[6]*r+s[10]*n)/h,e}function yt(e,t,s){let i=t[0],r=t[1],n=t[2];return e[0]=i*s[0]+r*s[3]+n*s[6],e[1]=i*s[1]+r*s[4]+n*s[7],e[2]=i*s[2]+r*s[5]+n*s[8],e}function Mt(e,t,s){let i=t[0],r=t[1],n=t[2],h=s[0],l=s[1],a=s[2],f=s[3],c=l*n-a*r,d=a*i-h*n,g=h*r-l*i,p=l*g-a*d,u=a*c-h*g,x=h*d-l*c,o=f*2;return c*=o,d*=o,g*=o,p*=2,u*=2,x*=2,e[0]=i+c+p,e[1]=r+d+u,e[2]=n+g+x,e}const _t=function(){const e=[0,0,0],t=[0,0,0];return function(s,i){q(e,s),q(t,i),V(e,e),V(t,t);let r=st(e,t);return r>1?0:r<-1?Math.PI:Math.acos(r)}}();function mt(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]}class R extends Array{constructor(t=0,s=t,i=t){return super(t,s,i),this}get x(){return this[0]}get y(){return this[1]}get z(){return this[2]}set x(t){this[0]=t}set y(t){this[1]=t}set z(t){this[2]=t}set(t,s=t,i=t){return t.length?this.copy(t):(ht(this,t,s,i),this)}copy(t){return q(this,t),this}add(t,s){return s?U(this,t,s):U(this,this,t),this}sub(t,s){return s?$(this,t,s):$(this,this,t),this}multiply(t){return t.length?lt(this,this,t):D(this,this,t),this}divide(t){return t.length?at(this,this,t):D(this,this,1/t),this}inverse(t=this){return gt(this,t),this}len(){return I(this)}distance(t){return t?ft(this,t):I(this)}squaredLen(){return X(this)}squaredDistance(t){return t?ct(this,t):X(this)}negate(t=this){return dt(this,t),this}cross(t,s){return s?k(this,t,s):k(this,this,t),this}scale(t){return D(this,this,t),this}normalize(){return V(this,this),this}dot(t){return st(this,t)}equals(t){return mt(this,t)}applyMatrix3(t){return yt(this,this,t),this}applyMatrix4(t){return xt(this,this,t),this}scaleRotateMatrix4(t){return ot(this,this,t),this}applyQuaternion(t){return Mt(this,this,t),this}angle(t){return _t(this,t)}lerp(t,s){return pt(this,this,t,s),this}smoothLerp(t,s,i){return ut(this,this,t,s,i),this}clone(){return new R(this[0],this[1],this[2])}fromArray(t,s=0){return this[0]=t[s],this[1]=t[s+1],this[2]=t[s+2],this}toArray(t=[],s=0){return t[s]=this[0],t[s+1]=this[1],t[s+2]=this[2],t}transformDirection(t){const s=this[0],i=this[1],r=this[2];return this[0]=t[0]*s+t[4]*i+t[8]*r,this[1]=t[1]*s+t[5]*i+t[9]*r,this[2]=t[2]*s+t[6]*i+t[10]*r,this.normalize()}}const G=new R;let Et=1,wt=1,W=!1;class Fe{constructor(t,s={}){t.canvas||console.error("gl not passed as first argument to Geometry"),this.gl=t,this.attributes=s,this.id=Et++,this.VAOs={},this.drawRange={start:0,count:0},this.instancedCount=0,this.gl.renderer.bindVertexArray(null),this.gl.renderer.currentGeometry=null,this.glState=this.gl.renderer.state;for(let i in s)this.addAttribute(i,s[i])}addAttribute(t,s){if(this.attributes[t]=s,s.id=wt++,s.size=s.size||1,s.type=s.type||(s.data.constructor===Float32Array?this.gl.FLOAT:s.data.constructor===Uint16Array?this.gl.UNSIGNED_SHORT:this.gl.UNSIGNED_INT),s.target=t==="index"?this.gl.ELEMENT_ARRAY_BUFFER:this.gl.ARRAY_BUFFER,s.normalized=s.normalized||!1,s.stride=s.stride||0,s.offset=s.offset||0,s.count=s.count||(s.stride?s.data.byteLength/s.stride:s.data.length/s.size),s.divisor=s.instanced||0,s.needsUpdate=!1,s.usage=s.usage||this.gl.STATIC_DRAW,s.buffer||this.updateAttribute(s),s.divisor){if(this.isInstanced=!0,this.instancedCount&&this.instancedCount!==s.count*s.divisor)return console.warn("geometry has multiple instanced buffers of different length"),this.instancedCount=Math.min(this.instancedCount,s.count*s.divisor);this.instancedCount=s.count*s.divisor}else t==="index"?this.drawRange.count=s.count:this.attributes.index||(this.drawRange.count=Math.max(this.drawRange.count,s.count))}updateAttribute(t){const s=!t.buffer;s&&(t.buffer=this.gl.createBuffer()),this.glState.boundBuffer!==t.buffer&&(this.gl.bindBuffer(t.target,t.buffer),this.glState.boundBuffer=t.buffer),s?this.gl.bufferData(t.target,t.data,t.usage):this.gl.bufferSubData(t.target,0,t.data),t.needsUpdate=!1}setIndex(t){this.addAttribute("index",t)}setDrawRange(t,s){this.drawRange.start=t,this.drawRange.count=s}setInstancedCount(t){this.instancedCount=t}createVAO(t){this.VAOs[t.attributeOrder]=this.gl.renderer.createVertexArray(),this.gl.renderer.bindVertexArray(this.VAOs[t.attributeOrder]),this.bindAttributes(t)}bindAttributes(t){t.attributeLocations.forEach((s,{name:i,type:r})=>{if(!this.attributes[i]){console.warn(`active attribute ${i} not being supplied`);return}const n=this.attributes[i];this.gl.bindBuffer(n.target,n.buffer),this.glState.boundBuffer=n.buffer;let h=1;r===35674&&(h=2),r===35675&&(h=3),r===35676&&(h=4);const l=n.size/h,a=h===1?0:h*h*4,f=h===1?0:h*4;for(let c=0;c<h;c++)this.gl.vertexAttribPointer(s+c,l,n.type,n.normalized,n.stride+a,n.offset+c*f),this.gl.enableVertexAttribArray(s+c),this.gl.renderer.vertexAttribDivisor(s+c,n.divisor)}),this.attributes.index&&this.gl.bindBuffer(this.gl.ELEMENT_ARRAY_BUFFER,this.attributes.index.buffer)}draw({program:t,mode:s=this.gl.TRIANGLES}){var r;this.gl.renderer.currentGeometry!==`${this.id}_${t.attributeOrder}`&&(this.VAOs[t.attributeOrder]||this.createVAO(t),this.gl.renderer.bindVertexArray(this.VAOs[t.attributeOrder]),this.gl.renderer.currentGeometry=`${this.id}_${t.attributeOrder}`),t.attributeLocations.forEach((n,{name:h})=>{const l=this.attributes[h];l.needsUpdate&&this.updateAttribute(l)});let i=2;((r=this.attributes.index)==null?void 0:r.type)===this.gl.UNSIGNED_INT&&(i=4),this.isInstanced?this.attributes.index?this.gl.renderer.drawElementsInstanced(s,this.drawRange.count,this.attributes.index.type,this.attributes.index.offset+this.drawRange.start*i,this.instancedCount):this.gl.renderer.drawArraysInstanced(s,this.drawRange.start,this.drawRange.count,this.instancedCount):this.attributes.index?this.gl.drawElements(s,this.drawRange.count,this.attributes.index.type,this.attributes.index.offset+this.drawRange.start*i):this.gl.drawArrays(s,this.drawRange.start,this.drawRange.count)}getPosition(){const t=this.attributes.position;if(t.data)return t;if(!W)return console.warn("No position buffer data found to compute bounds"),W=!0}computeBoundingBox(t){t||(t=this.getPosition());const s=t.data,i=t.size;this.bounds||(this.bounds={min:new R,max:new R,center:new R,scale:new R,radius:1/0});const r=this.bounds.min,n=this.bounds.max,h=this.bounds.center,l=this.bounds.scale;r.set(1/0),n.set(-1/0);for(let a=0,f=s.length;a<f;a+=i){const c=s[a],d=s[a+1],g=s[a+2];r.x=Math.min(c,r.x),r.y=Math.min(d,r.y),r.z=Math.min(g,r.z),n.x=Math.max(c,n.x),n.y=Math.max(d,n.y),n.z=Math.max(g,n.z)}l.sub(n,r),h.add(r,n).divide(2)}computeBoundingSphere(t){t||(t=this.getPosition());const s=t.data,i=t.size;this.bounds||this.computeBoundingBox(t);let r=0;for(let n=0,h=s.length;n<h;n+=i)G.fromArray(s,n),r=Math.max(r,this.bounds.center.squaredDistance(G));this.bounds.radius=Math.sqrt(r)}remove(){for(let t in this.VAOs)this.gl.renderer.deleteVertexArray(this.VAOs[t]),delete this.VAOs[t];for(let t in this.attributes)this.gl.deleteBuffer(this.attributes[t].buffer),delete this.attributes[t]}}let bt=1;const Y={};class ze{constructor(t,{vertex:s,fragment:i,uniforms:r={},transparent:n=!1,cullFace:h=t.BACK,frontFace:l=t.CCW,depthTest:a=!0,depthWrite:f=!0,depthFunc:c=t.LEQUAL}={}){t.canvas||console.error("gl not passed as first argument to Program"),this.gl=t,this.uniforms=r,this.id=bt++,s||console.warn("vertex shader not supplied"),i||console.warn("fragment shader not supplied"),this.transparent=n,this.cullFace=h,this.frontFace=l,this.depthTest=a,this.depthWrite=f,this.depthFunc=c,this.blendFunc={},this.blendEquation={},this.stencilFunc={},this.stencilOp={},this.transparent&&!this.blendFunc.src&&(this.gl.renderer.premultipliedAlpha?this.setBlendFunc(this.gl.ONE,this.gl.ONE_MINUS_SRC_ALPHA):this.setBlendFunc(this.gl.SRC_ALPHA,this.gl.ONE_MINUS_SRC_ALPHA)),this.vertexShader=t.createShader(t.VERTEX_SHADER),this.fragmentShader=t.createShader(t.FRAGMENT_SHADER),this.program=t.createProgram(),t.attachShader(this.program,this.vertexShader),t.attachShader(this.program,this.fragmentShader),this.setShaders({vertex:s,fragment:i})}setShaders({vertex:t,fragment:s}){if(t&&(this.gl.shaderSource(this.vertexShader,t),this.gl.compileShader(this.vertexShader),this.gl.getShaderInfoLog(this.vertexShader)!==""&&console.warn(`${this.gl.getShaderInfoLog(this.vertexShader)}
2
+ Vertex Shader
3
+ ${Z(t)}`)),s&&(this.gl.shaderSource(this.fragmentShader,s),this.gl.compileShader(this.fragmentShader),this.gl.getShaderInfoLog(this.fragmentShader)!==""&&console.warn(`${this.gl.getShaderInfoLog(this.fragmentShader)}
4
+ Fragment Shader
5
+ ${Z(s)}`)),this.gl.linkProgram(this.program),!this.gl.getProgramParameter(this.program,this.gl.LINK_STATUS))return console.warn(this.gl.getProgramInfoLog(this.program));this.uniformLocations=new Map;let i=this.gl.getProgramParameter(this.program,this.gl.ACTIVE_UNIFORMS);for(let h=0;h<i;h++){let l=this.gl.getActiveUniform(this.program,h);this.uniformLocations.set(l,this.gl.getUniformLocation(this.program,l.name));const a=l.name.match(/(\w+)/g);l.uniformName=a[0],l.nameComponents=a.slice(1)}this.attributeLocations=new Map;const r=[],n=this.gl.getProgramParameter(this.program,this.gl.ACTIVE_ATTRIBUTES);for(let h=0;h<n;h++){const l=this.gl.getActiveAttrib(this.program,h),a=this.gl.getAttribLocation(this.program,l.name);a!==-1&&(r[a]=l.name,this.attributeLocations.set(l,a))}this.attributeOrder=r.join("")}setBlendFunc(t,s,i,r){this.blendFunc.src=t,this.blendFunc.dst=s,this.blendFunc.srcAlpha=i,this.blendFunc.dstAlpha=r,t&&(this.transparent=!0)}setBlendEquation(t,s){this.blendEquation.modeRGB=t,this.blendEquation.modeAlpha=s}setStencilFunc(t,s,i){this.stencilRef=s,this.stencilFunc.func=t,this.stencilFunc.ref=s,this.stencilFunc.mask=i}setStencilOp(t,s,i){this.stencilOp.stencilFail=t,this.stencilOp.depthFail=s,this.stencilOp.depthPass=i}applyState(){this.depthTest?this.gl.renderer.enable(this.gl.DEPTH_TEST):this.gl.renderer.disable(this.gl.DEPTH_TEST),this.cullFace?this.gl.renderer.enable(this.gl.CULL_FACE):this.gl.renderer.disable(this.gl.CULL_FACE),this.blendFunc.src?this.gl.renderer.enable(this.gl.BLEND):this.gl.renderer.disable(this.gl.BLEND),this.cullFace&&this.gl.renderer.setCullFace(this.cullFace),this.gl.renderer.setFrontFace(this.frontFace),this.gl.renderer.setDepthMask(this.depthWrite),this.gl.renderer.setDepthFunc(this.depthFunc),this.blendFunc.src&&this.gl.renderer.setBlendFunc(this.blendFunc.src,this.blendFunc.dst,this.blendFunc.srcAlpha,this.blendFunc.dstAlpha),this.gl.renderer.setBlendEquation(this.blendEquation.modeRGB,this.blendEquation.modeAlpha),this.stencilFunc.func||this.stencilOp.stencilFail?this.gl.renderer.enable(this.gl.STENCIL_TEST):this.gl.renderer.disable(this.gl.STENCIL_TEST),this.gl.renderer.setStencilFunc(this.stencilFunc.func,this.stencilFunc.ref,this.stencilFunc.mask),this.gl.renderer.setStencilOp(this.stencilOp.stencilFail,this.stencilOp.depthFail,this.stencilOp.depthPass)}use({flipFaces:t=!1}={}){let s=-1;this.gl.renderer.state.currentProgram===this.id||(this.gl.useProgram(this.program),this.gl.renderer.state.currentProgram=this.id),this.uniformLocations.forEach((r,n)=>{let h=this.uniforms[n.uniformName];for(const l of n.nameComponents){if(!h)break;if(l in h)h=h[l];else{if(Array.isArray(h.value))break;h=void 0;break}}if(!h)return j(`Active uniform ${n.name} has not been supplied`);if(h&&h.value===void 0)return j(`${n.name} uniform is missing a value parameter`);if(h.value.texture)return s=s+1,h.value.update(s),N(this.gl,n.type,r,s);if(h.value.length&&h.value[0].texture){const l=[];return h.value.forEach(a=>{s=s+1,a.update(s),l.push(s)}),N(this.gl,n.type,r,l)}N(this.gl,n.type,r,h.value)}),this.applyState(),t&&this.gl.renderer.setFrontFace(this.frontFace===this.gl.CCW?this.gl.CW:this.gl.CCW)}remove(){this.gl.deleteProgram(this.program)}}function N(e,t,s,i){i=i.length?At(i):i;const r=e.renderer.state.uniformLocations.get(s);if(i.length)if(r===void 0||r.length!==i.length)e.renderer.state.uniformLocations.set(s,i.slice(0));else{if(Ft(r,i))return;r.set?r.set(i):zt(r,i),e.renderer.state.uniformLocations.set(s,r)}else{if(r===i)return;e.renderer.state.uniformLocations.set(s,i)}switch(t){case 5126:return i.length?e.uniform1fv(s,i):e.uniform1f(s,i);case 35664:return e.uniform2fv(s,i);case 35665:return e.uniform3fv(s,i);case 35666:return e.uniform4fv(s,i);case 35670:case 5124:case 35678:case 36306:case 35680:case 36289:return i.length?e.uniform1iv(s,i):e.uniform1i(s,i);case 35671:case 35667:return e.uniform2iv(s,i);case 35672:case 35668:return e.uniform3iv(s,i);case 35673:case 35669:return e.uniform4iv(s,i);case 35674:return e.uniformMatrix2fv(s,!1,i);case 35675:return e.uniformMatrix3fv(s,!1,i);case 35676:return e.uniformMatrix4fv(s,!1,i)}}function Z(e){let t=e.split(`
6
+ `);for(let s=0;s<t.length;s++)t[s]=s+1+": "+t[s];return t.join(`
7
+ `)}function At(e){const t=e.length,s=e[0].length;if(s===void 0)return e;const i=t*s;let r=Y[i];r||(Y[i]=r=new Float32Array(i));for(let n=0;n<t;n++)r.set(e[n],n*s);return r}function Ft(e,t){if(e.length!==t.length)return!1;for(let s=0,i=e.length;s<i;s++)if(e[s]!==t[s])return!1;return!0}function zt(e,t){for(let s=0,i=e.length;s<i;s++)e[s]=t[s]}let P=0;function j(e){P>100||(console.warn(e),P++,P>100&&console.warn("More than 100 program warnings - stopping logs."))}const v=new R;let St=1;class Se{constructor({canvas:t=document.createElement("canvas"),width:s=300,height:i=150,dpr:r=1,alpha:n=!1,depth:h=!0,stencil:l=!1,antialias:a=!1,premultipliedAlpha:f=!1,preserveDrawingBuffer:c=!1,powerPreference:d="default",autoClear:g=!0,webgl:p=2}={}){const u={alpha:n,depth:h,stencil:l,antialias:a,premultipliedAlpha:f,preserveDrawingBuffer:c,powerPreference:d};this.dpr=r,this.alpha=n,this.color=!0,this.depth=h,this.stencil=l,this.premultipliedAlpha=f,this.autoClear=g,this.id=St++,p===2&&(this.gl=t.getContext("webgl2",u)),this.isWebgl2=!!this.gl,this.gl||(this.gl=t.getContext("webgl",u)),this.gl||console.error("unable to create webgl context"),this.gl.renderer=this,this.setSize(s,i),this.state={},this.state.blendFunc={src:this.gl.ONE,dst:this.gl.ZERO},this.state.blendEquation={modeRGB:this.gl.FUNC_ADD},this.state.cullFace=!1,this.state.frontFace=this.gl.CCW,this.state.depthMask=!0,this.state.depthFunc=this.gl.LEQUAL,this.state.premultiplyAlpha=!1,this.state.flipY=!1,this.state.unpackAlignment=4,this.state.framebuffer=null,this.state.viewport={x:0,y:0,width:null,height:null},this.state.textureUnits=[],this.state.activeTextureUnit=0,this.state.boundBuffer=null,this.state.uniformLocations=new Map,this.state.currentProgram=null,this.extensions={},this.isWebgl2?(this.getExtension("EXT_color_buffer_float"),this.getExtension("OES_texture_float_linear")):(this.getExtension("OES_texture_float"),this.getExtension("OES_texture_float_linear"),this.getExtension("OES_texture_half_float"),this.getExtension("OES_texture_half_float_linear"),this.getExtension("OES_element_index_uint"),this.getExtension("OES_standard_derivatives"),this.getExtension("EXT_sRGB"),this.getExtension("WEBGL_depth_texture"),this.getExtension("WEBGL_draw_buffers")),this.getExtension("WEBGL_compressed_texture_astc"),this.getExtension("EXT_texture_compression_bptc"),this.getExtension("WEBGL_compressed_texture_s3tc"),this.getExtension("WEBGL_compressed_texture_etc1"),this.getExtension("WEBGL_compressed_texture_pvrtc"),this.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc"),this.vertexAttribDivisor=this.getExtension("ANGLE_instanced_arrays","vertexAttribDivisor","vertexAttribDivisorANGLE"),this.drawArraysInstanced=this.getExtension("ANGLE_instanced_arrays","drawArraysInstanced","drawArraysInstancedANGLE"),this.drawElementsInstanced=this.getExtension("ANGLE_instanced_arrays","drawElementsInstanced","drawElementsInstancedANGLE"),this.createVertexArray=this.getExtension("OES_vertex_array_object","createVertexArray","createVertexArrayOES"),this.bindVertexArray=this.getExtension("OES_vertex_array_object","bindVertexArray","bindVertexArrayOES"),this.deleteVertexArray=this.getExtension("OES_vertex_array_object","deleteVertexArray","deleteVertexArrayOES"),this.drawBuffers=this.getExtension("WEBGL_draw_buffers","drawBuffers","drawBuffersWEBGL"),this.parameters={},this.parameters.maxTextureUnits=this.gl.getParameter(this.gl.MAX_COMBINED_TEXTURE_IMAGE_UNITS),this.parameters.maxAnisotropy=this.getExtension("EXT_texture_filter_anisotropic")?this.gl.getParameter(this.getExtension("EXT_texture_filter_anisotropic").MAX_TEXTURE_MAX_ANISOTROPY_EXT):0}setSize(t,s){this.width=t,this.height=s,this.gl.canvas.width=t*this.dpr,this.gl.canvas.height=s*this.dpr,this.gl.canvas.style&&Object.assign(this.gl.canvas.style,{width:t+"px",height:s+"px"})}setViewport(t,s,i=0,r=0){this.state.viewport.width===t&&this.state.viewport.height===s||(this.state.viewport.width=t,this.state.viewport.height=s,this.state.viewport.x=i,this.state.viewport.y=r,this.gl.viewport(i,r,t,s))}setScissor(t,s,i=0,r=0){this.gl.scissor(i,r,t,s)}enable(t){this.state[t]!==!0&&(this.gl.enable(t),this.state[t]=!0)}disable(t){this.state[t]!==!1&&(this.gl.disable(t),this.state[t]=!1)}setBlendFunc(t,s,i,r){this.state.blendFunc.src===t&&this.state.blendFunc.dst===s&&this.state.blendFunc.srcAlpha===i&&this.state.blendFunc.dstAlpha===r||(this.state.blendFunc.src=t,this.state.blendFunc.dst=s,this.state.blendFunc.srcAlpha=i,this.state.blendFunc.dstAlpha=r,i!==void 0?this.gl.blendFuncSeparate(t,s,i,r):this.gl.blendFunc(t,s))}setBlendEquation(t,s){t=t||this.gl.FUNC_ADD,!(this.state.blendEquation.modeRGB===t&&this.state.blendEquation.modeAlpha===s)&&(this.state.blendEquation.modeRGB=t,this.state.blendEquation.modeAlpha=s,s!==void 0?this.gl.blendEquationSeparate(t,s):this.gl.blendEquation(t))}setCullFace(t){this.state.cullFace!==t&&(this.state.cullFace=t,this.gl.cullFace(t))}setFrontFace(t){this.state.frontFace!==t&&(this.state.frontFace=t,this.gl.frontFace(t))}setDepthMask(t){this.state.depthMask!==t&&(this.state.depthMask=t,this.gl.depthMask(t))}setDepthFunc(t){this.state.depthFunc!==t&&(this.state.depthFunc=t,this.gl.depthFunc(t))}setStencilMask(t){this.state.stencilMask!==t&&(this.state.stencilMask=t,this.gl.stencilMask(t))}setStencilFunc(t,s,i){this.state.stencilFunc===t&&this.state.stencilRef===s&&this.state.stencilFuncMask===i||(this.state.stencilFunc=t||this.gl.ALWAYS,this.state.stencilRef=s||0,this.state.stencilFuncMask=i||0,this.gl.stencilFunc(t||this.gl.ALWAYS,s||0,i||0))}setStencilOp(t,s,i){this.state.stencilFail===t&&this.state.stencilDepthFail===s&&this.state.stencilDepthPass===i||(this.state.stencilFail=t,this.state.stencilDepthFail=s,this.state.stencilDepthPass=i,this.gl.stencilOp(t,s,i))}activeTexture(t){this.state.activeTextureUnit!==t&&(this.state.activeTextureUnit=t,this.gl.activeTexture(this.gl.TEXTURE0+t))}bindFramebuffer({target:t=this.gl.FRAMEBUFFER,buffer:s=null}={}){this.state.framebuffer!==s&&(this.state.framebuffer=s,this.gl.bindFramebuffer(t,s))}getExtension(t,s,i){return s&&this.gl[s]?this.gl[s].bind(this.gl):(this.extensions[t]||(this.extensions[t]=this.gl.getExtension(t)),s?this.extensions[t]?this.extensions[t][i].bind(this.extensions[t]):null:this.extensions[t])}sortOpaque(t,s){return t.renderOrder!==s.renderOrder?t.renderOrder-s.renderOrder:t.program.id!==s.program.id?t.program.id-s.program.id:t.zDepth!==s.zDepth?t.zDepth-s.zDepth:s.id-t.id}sortTransparent(t,s){return t.renderOrder!==s.renderOrder?t.renderOrder-s.renderOrder:t.zDepth!==s.zDepth?s.zDepth-t.zDepth:s.id-t.id}sortUI(t,s){return t.renderOrder!==s.renderOrder?t.renderOrder-s.renderOrder:t.program.id!==s.program.id?t.program.id-s.program.id:s.id-t.id}getRenderList({scene:t,camera:s,frustumCull:i,sort:r}){let n=[];if(s&&i&&s.updateFrustum(),t.traverse(h=>{if(!h.visible)return!0;h.draw&&(i&&h.frustumCulled&&s&&!s.frustumIntersectsMesh(h)||n.push(h))}),r){const h=[],l=[],a=[];n.forEach(f=>{f.program.transparent?f.program.depthTest?l.push(f):a.push(f):h.push(f),f.zDepth=0,!(f.renderOrder!==0||!f.program.depthTest||!s)&&(f.worldMatrix.getTranslation(v),v.applyMatrix4(s.projectionViewMatrix),f.zDepth=v.z)}),h.sort(this.sortOpaque),l.sort(this.sortTransparent),a.sort(this.sortUI),n=h.concat(l,a)}return n}render({scene:t,camera:s,target:i=null,update:r=!0,sort:n=!0,frustumCull:h=!0,clear:l}){i===null?(this.bindFramebuffer(),this.setViewport(this.width*this.dpr,this.height*this.dpr)):(this.bindFramebuffer(i),this.setViewport(i.width,i.height)),(l||this.autoClear&&l!==!1)&&(this.depth&&(!i||i.depth)&&(this.enable(this.gl.DEPTH_TEST),this.setDepthMask(!0)),(this.stencil||!i||i.stencil)&&(this.enable(this.gl.STENCIL_TEST),this.setStencilMask(255)),this.gl.clear((this.color?this.gl.COLOR_BUFFER_BIT:0)|(this.depth?this.gl.DEPTH_BUFFER_BIT:0)|(this.stencil?this.gl.STENCIL_BUFFER_BIT:0))),r&&t.updateMatrixWorld(),s&&s.updateMatrixWorld(),this.getRenderList({scene:t,camera:s,frustumCull:h,sort:n}).forEach(f=>{f.draw({camera:s})})}}function Ct(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}function Ot(e,t,s,i,r){return e[0]=t,e[1]=s,e[2]=i,e[3]=r,e}function Lt(e,t){let s=t[0],i=t[1],r=t[2],n=t[3],h=s*s+i*i+r*r+n*n;return h>0&&(h=1/Math.sqrt(h)),e[0]=s*h,e[1]=i*h,e[2]=r*h,e[3]=n*h,e}function Rt(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]+e[3]*t[3]}function Tt(e){return e[0]=0,e[1]=0,e[2]=0,e[3]=1,e}function It(e,t,s){s=s*.5;let i=Math.sin(s);return e[0]=i*t[0],e[1]=i*t[1],e[2]=i*t[2],e[3]=Math.cos(s),e}function Q(e,t,s){let i=t[0],r=t[1],n=t[2],h=t[3],l=s[0],a=s[1],f=s[2],c=s[3];return e[0]=i*c+h*l+r*f-n*a,e[1]=r*c+h*a+n*l-i*f,e[2]=n*c+h*f+i*a-r*l,e[3]=h*c-i*l-r*a-n*f,e}function Bt(e,t,s){s*=.5;let i=t[0],r=t[1],n=t[2],h=t[3],l=Math.sin(s),a=Math.cos(s);return e[0]=i*a+h*l,e[1]=r*a+n*l,e[2]=n*a-r*l,e[3]=h*a-i*l,e}function Dt(e,t,s){s*=.5;let i=t[0],r=t[1],n=t[2],h=t[3],l=Math.sin(s),a=Math.cos(s);return e[0]=i*a-n*l,e[1]=r*a+h*l,e[2]=n*a+i*l,e[3]=h*a-r*l,e}function Nt(e,t,s){s*=.5;let i=t[0],r=t[1],n=t[2],h=t[3],l=Math.sin(s),a=Math.cos(s);return e[0]=i*a+r*l,e[1]=r*a-i*l,e[2]=n*a+h*l,e[3]=h*a-n*l,e}function Pt(e,t,s,i){let r=t[0],n=t[1],h=t[2],l=t[3],a=s[0],f=s[1],c=s[2],d=s[3],g,p,u,x,o;return p=r*a+n*f+h*c+l*d,p<0&&(p=-p,a=-a,f=-f,c=-c,d=-d),1-p>1e-6?(g=Math.acos(p),u=Math.sin(g),x=Math.sin((1-i)*g)/u,o=Math.sin(i*g)/u):(x=1-i,o=i),e[0]=x*r+o*a,e[1]=x*n+o*f,e[2]=x*h+o*c,e[3]=x*l+o*d,e}function vt(e,t){let s=t[0],i=t[1],r=t[2],n=t[3],h=s*s+i*i+r*r+n*n,l=h?1/h:0;return e[0]=-s*l,e[1]=-i*l,e[2]=-r*l,e[3]=n*l,e}function qt(e,t){return e[0]=-t[0],e[1]=-t[1],e[2]=-t[2],e[3]=t[3],e}function Vt(e,t){let s=t[0]+t[4]+t[8],i;if(s>0)i=Math.sqrt(s+1),e[3]=.5*i,i=.5/i,e[0]=(t[5]-t[7])*i,e[1]=(t[6]-t[2])*i,e[2]=(t[1]-t[3])*i;else{let r=0;t[4]>t[0]&&(r=1),t[8]>t[r*3+r]&&(r=2);let n=(r+1)%3,h=(r+2)%3;i=Math.sqrt(t[r*3+r]-t[n*3+n]-t[h*3+h]+1),e[r]=.5*i,i=.5/i,e[3]=(t[n*3+h]-t[h*3+n])*i,e[n]=(t[n*3+r]+t[r*3+n])*i,e[h]=(t[h*3+r]+t[r*3+h])*i}return e}function Ut(e,t,s="YXZ"){let i=Math.sin(t[0]*.5),r=Math.cos(t[0]*.5),n=Math.sin(t[1]*.5),h=Math.cos(t[1]*.5),l=Math.sin(t[2]*.5),a=Math.cos(t[2]*.5);return s==="XYZ"?(e[0]=i*h*a+r*n*l,e[1]=r*n*a-i*h*l,e[2]=r*h*l+i*n*a,e[3]=r*h*a-i*n*l):s==="YXZ"?(e[0]=i*h*a+r*n*l,e[1]=r*n*a-i*h*l,e[2]=r*h*l-i*n*a,e[3]=r*h*a+i*n*l):s==="ZXY"?(e[0]=i*h*a-r*n*l,e[1]=r*n*a+i*h*l,e[2]=r*h*l+i*n*a,e[3]=r*h*a-i*n*l):s==="ZYX"?(e[0]=i*h*a-r*n*l,e[1]=r*n*a+i*h*l,e[2]=r*h*l-i*n*a,e[3]=r*h*a+i*n*l):s==="YZX"?(e[0]=i*h*a+r*n*l,e[1]=r*n*a+i*h*l,e[2]=r*h*l-i*n*a,e[3]=r*h*a-i*n*l):s==="XZY"&&(e[0]=i*h*a-r*n*l,e[1]=r*n*a-i*h*l,e[2]=r*h*l+i*n*a,e[3]=r*h*a+i*n*l),e}const $t=Ct,Xt=Ot,kt=Rt,Gt=Lt;class Wt extends Array{constructor(t=0,s=0,i=0,r=1){super(t,s,i,r),this.onChange=()=>{},this._target=this;const n=["0","1","2","3"];return new Proxy(this,{set(h,l){const a=Reflect.set(...arguments);return a&&n.includes(l)&&h.onChange(),a}})}get x(){return this[0]}get y(){return this[1]}get z(){return this[2]}get w(){return this[3]}set x(t){this._target[0]=t,this.onChange()}set y(t){this._target[1]=t,this.onChange()}set z(t){this._target[2]=t,this.onChange()}set w(t){this._target[3]=t,this.onChange()}identity(){return Tt(this._target),this.onChange(),this}set(t,s,i,r){return t.length?this.copy(t):(Xt(this._target,t,s,i,r),this.onChange(),this)}rotateX(t){return Bt(this._target,this._target,t),this.onChange(),this}rotateY(t){return Dt(this._target,this._target,t),this.onChange(),this}rotateZ(t){return Nt(this._target,this._target,t),this.onChange(),this}inverse(t=this._target){return vt(this._target,t),this.onChange(),this}conjugate(t=this._target){return qt(this._target,t),this.onChange(),this}copy(t){return $t(this._target,t),this.onChange(),this}normalize(t=this._target){return Gt(this._target,t),this.onChange(),this}multiply(t,s){return s?Q(this._target,t,s):Q(this._target,this._target,t),this.onChange(),this}dot(t){return kt(this._target,t)}fromMatrix3(t){return Vt(this._target,t),this.onChange(),this}fromEuler(t,s){return Ut(this._target,t,t.order),s||this.onChange(),this}fromAxisAngle(t,s){return It(this._target,t,s),this.onChange(),this}slerp(t,s){return Pt(this._target,this._target,t,s),this.onChange(),this}fromArray(t,s=0){return this._target[0]=t[s],this._target[1]=t[s+1],this._target[2]=t[s+2],this._target[3]=t[s+3],this.onChange(),this}toArray(t=[],s=0){return t[s]=this[0],t[s+1]=this[1],t[s+2]=this[2],t[s+3]=this[3],t}}const Yt=1e-6;function Zt(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e}function jt(e,t,s,i,r,n,h,l,a,f,c,d,g,p,u,x,o){return e[0]=t,e[1]=s,e[2]=i,e[3]=r,e[4]=n,e[5]=h,e[6]=l,e[7]=a,e[8]=f,e[9]=c,e[10]=d,e[11]=g,e[12]=p,e[13]=u,e[14]=x,e[15]=o,e}function Qt(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}function Ht(e,t){let s=t[0],i=t[1],r=t[2],n=t[3],h=t[4],l=t[5],a=t[6],f=t[7],c=t[8],d=t[9],g=t[10],p=t[11],u=t[12],x=t[13],o=t[14],y=t[15],b=s*l-i*h,_=s*a-r*h,M=s*f-n*h,E=i*a-r*l,m=i*f-n*l,A=r*f-n*a,S=c*x-d*u,C=c*o-g*u,F=c*y-p*u,O=d*o-g*x,z=d*y-p*x,L=g*y-p*o,w=b*L-_*z+M*O+E*F-m*C+A*S;return w?(w=1/w,e[0]=(l*L-a*z+f*O)*w,e[1]=(r*z-i*L-n*O)*w,e[2]=(x*A-o*m+y*E)*w,e[3]=(g*m-d*A-p*E)*w,e[4]=(a*F-h*L-f*C)*w,e[5]=(s*L-r*F+n*C)*w,e[6]=(o*M-u*A-y*_)*w,e[7]=(c*A-g*M+p*_)*w,e[8]=(h*z-l*F+f*S)*w,e[9]=(i*F-s*z-n*S)*w,e[10]=(u*m-x*M+y*b)*w,e[11]=(d*M-c*m-p*b)*w,e[12]=(l*C-h*O-a*S)*w,e[13]=(s*O-i*C+r*S)*w,e[14]=(x*_-u*E-o*b)*w,e[15]=(c*E-d*_+g*b)*w,e):null}function it(e){let t=e[0],s=e[1],i=e[2],r=e[3],n=e[4],h=e[5],l=e[6],a=e[7],f=e[8],c=e[9],d=e[10],g=e[11],p=e[12],u=e[13],x=e[14],o=e[15],y=t*h-s*n,b=t*l-i*n,_=t*a-r*n,M=s*l-i*h,E=s*a-r*h,m=i*a-r*l,A=f*u-c*p,S=f*x-d*p,C=f*o-g*p,F=c*x-d*u,O=c*o-g*u,z=d*o-g*x;return y*z-b*O+_*F+M*C-E*S+m*A}function H(e,t,s){let i=t[0],r=t[1],n=t[2],h=t[3],l=t[4],a=t[5],f=t[6],c=t[7],d=t[8],g=t[9],p=t[10],u=t[11],x=t[12],o=t[13],y=t[14],b=t[15],_=s[0],M=s[1],E=s[2],m=s[3];return e[0]=_*i+M*l+E*d+m*x,e[1]=_*r+M*a+E*g+m*o,e[2]=_*n+M*f+E*p+m*y,e[3]=_*h+M*c+E*u+m*b,_=s[4],M=s[5],E=s[6],m=s[7],e[4]=_*i+M*l+E*d+m*x,e[5]=_*r+M*a+E*g+m*o,e[6]=_*n+M*f+E*p+m*y,e[7]=_*h+M*c+E*u+m*b,_=s[8],M=s[9],E=s[10],m=s[11],e[8]=_*i+M*l+E*d+m*x,e[9]=_*r+M*a+E*g+m*o,e[10]=_*n+M*f+E*p+m*y,e[11]=_*h+M*c+E*u+m*b,_=s[12],M=s[13],E=s[14],m=s[15],e[12]=_*i+M*l+E*d+m*x,e[13]=_*r+M*a+E*g+m*o,e[14]=_*n+M*f+E*p+m*y,e[15]=_*h+M*c+E*u+m*b,e}function Kt(e,t,s){let i=s[0],r=s[1],n=s[2],h,l,a,f,c,d,g,p,u,x,o,y;return t===e?(e[12]=t[0]*i+t[4]*r+t[8]*n+t[12],e[13]=t[1]*i+t[5]*r+t[9]*n+t[13],e[14]=t[2]*i+t[6]*r+t[10]*n+t[14],e[15]=t[3]*i+t[7]*r+t[11]*n+t[15]):(h=t[0],l=t[1],a=t[2],f=t[3],c=t[4],d=t[5],g=t[6],p=t[7],u=t[8],x=t[9],o=t[10],y=t[11],e[0]=h,e[1]=l,e[2]=a,e[3]=f,e[4]=c,e[5]=d,e[6]=g,e[7]=p,e[8]=u,e[9]=x,e[10]=o,e[11]=y,e[12]=h*i+c*r+u*n+t[12],e[13]=l*i+d*r+x*n+t[13],e[14]=a*i+g*r+o*n+t[14],e[15]=f*i+p*r+y*n+t[15]),e}function Jt(e,t,s){let i=s[0],r=s[1],n=s[2];return e[0]=t[0]*i,e[1]=t[1]*i,e[2]=t[2]*i,e[3]=t[3]*i,e[4]=t[4]*r,e[5]=t[5]*r,e[6]=t[6]*r,e[7]=t[7]*r,e[8]=t[8]*n,e[9]=t[9]*n,e[10]=t[10]*n,e[11]=t[11]*n,e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e}function te(e,t,s,i){let r=i[0],n=i[1],h=i[2],l=Math.hypot(r,n,h),a,f,c,d,g,p,u,x,o,y,b,_,M,E,m,A,S,C,F,O,z,L,w,T;return Math.abs(l)<Yt?null:(l=1/l,r*=l,n*=l,h*=l,a=Math.sin(s),f=Math.cos(s),c=1-f,d=t[0],g=t[1],p=t[2],u=t[3],x=t[4],o=t[5],y=t[6],b=t[7],_=t[8],M=t[9],E=t[10],m=t[11],A=r*r*c+f,S=n*r*c+h*a,C=h*r*c-n*a,F=r*n*c-h*a,O=n*n*c+f,z=h*n*c+r*a,L=r*h*c+n*a,w=n*h*c-r*a,T=h*h*c+f,e[0]=d*A+x*S+_*C,e[1]=g*A+o*S+M*C,e[2]=p*A+y*S+E*C,e[3]=u*A+b*S+m*C,e[4]=d*F+x*O+_*z,e[5]=g*F+o*O+M*z,e[6]=p*F+y*O+E*z,e[7]=u*F+b*O+m*z,e[8]=d*L+x*w+_*T,e[9]=g*L+o*w+M*T,e[10]=p*L+y*w+E*T,e[11]=u*L+b*w+m*T,t!==e&&(e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e)}function ee(e,t){return e[0]=t[12],e[1]=t[13],e[2]=t[14],e}function rt(e,t){let s=t[0],i=t[1],r=t[2],n=t[4],h=t[5],l=t[6],a=t[8],f=t[9],c=t[10];return e[0]=Math.hypot(s,i,r),e[1]=Math.hypot(n,h,l),e[2]=Math.hypot(a,f,c),e}function se(e){let t=e[0],s=e[1],i=e[2],r=e[4],n=e[5],h=e[6],l=e[8],a=e[9],f=e[10];const c=t*t+s*s+i*i,d=r*r+n*n+h*h,g=l*l+a*a+f*f;return Math.sqrt(Math.max(c,d,g))}const nt=function(){const e=[1,1,1];return function(t,s){let i=e;rt(i,s);let r=1/i[0],n=1/i[1],h=1/i[2],l=s[0]*r,a=s[1]*n,f=s[2]*h,c=s[4]*r,d=s[5]*n,g=s[6]*h,p=s[8]*r,u=s[9]*n,x=s[10]*h,o=l+d+x,y=0;return o>0?(y=Math.sqrt(o+1)*2,t[3]=.25*y,t[0]=(g-u)/y,t[1]=(p-f)/y,t[2]=(a-c)/y):l>d&&l>x?(y=Math.sqrt(1+l-d-x)*2,t[3]=(g-u)/y,t[0]=.25*y,t[1]=(a+c)/y,t[2]=(p+f)/y):d>x?(y=Math.sqrt(1+d-l-x)*2,t[3]=(p-f)/y,t[0]=(a+c)/y,t[1]=.25*y,t[2]=(g+u)/y):(y=Math.sqrt(1+x-l-d)*2,t[3]=(a-c)/y,t[0]=(p+f)/y,t[1]=(g+u)/y,t[2]=.25*y),t}}();function ie(e,t,s,i){let r=I([e[0],e[1],e[2]]);const n=I([e[4],e[5],e[6]]),h=I([e[8],e[9],e[10]]);it(e)<0&&(r=-r),s[0]=e[12],s[1]=e[13],s[2]=e[14];const a=e.slice(),f=1/r,c=1/n,d=1/h;a[0]*=f,a[1]*=f,a[2]*=f,a[4]*=c,a[5]*=c,a[6]*=c,a[8]*=d,a[9]*=d,a[10]*=d,nt(t,a),i[0]=r,i[1]=n,i[2]=h}function re(e,t,s,i){const r=e,n=t[0],h=t[1],l=t[2],a=t[3],f=n+n,c=h+h,d=l+l,g=n*f,p=n*c,u=n*d,x=h*c,o=h*d,y=l*d,b=a*f,_=a*c,M=a*d,E=i[0],m=i[1],A=i[2];return r[0]=(1-(x+y))*E,r[1]=(p+M)*E,r[2]=(u-_)*E,r[3]=0,r[4]=(p-M)*m,r[5]=(1-(g+y))*m,r[6]=(o+b)*m,r[7]=0,r[8]=(u+_)*A,r[9]=(o-b)*A,r[10]=(1-(g+x))*A,r[11]=0,r[12]=s[0],r[13]=s[1],r[14]=s[2],r[15]=1,r}function ne(e,t){let s=t[0],i=t[1],r=t[2],n=t[3],h=s+s,l=i+i,a=r+r,f=s*h,c=i*h,d=i*l,g=r*h,p=r*l,u=r*a,x=n*h,o=n*l,y=n*a;return e[0]=1-d-u,e[1]=c+y,e[2]=g-o,e[3]=0,e[4]=c-y,e[5]=1-f-u,e[6]=p+x,e[7]=0,e[8]=g+o,e[9]=p-x,e[10]=1-f-d,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}function he(e,t,s,i,r){let n=1/Math.tan(t/2),h=1/(i-r);return e[0]=n/s,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=n,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=(r+i)*h,e[11]=-1,e[12]=0,e[13]=0,e[14]=2*r*i*h,e[15]=0,e}function le(e,t,s,i,r,n,h){let l=1/(t-s),a=1/(i-r),f=1/(n-h);return e[0]=-2*l,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=-2*a,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=2*f,e[11]=0,e[12]=(t+s)*l,e[13]=(r+i)*a,e[14]=(h+n)*f,e[15]=1,e}function ae(e,t,s,i){let r=t[0],n=t[1],h=t[2],l=i[0],a=i[1],f=i[2],c=r-s[0],d=n-s[1],g=h-s[2],p=c*c+d*d+g*g;p===0?g=1:(p=1/Math.sqrt(p),c*=p,d*=p,g*=p);let u=a*g-f*d,x=f*c-l*g,o=l*d-a*c;return p=u*u+x*x+o*o,p===0&&(f?l+=1e-6:a?f+=1e-6:a+=1e-6,u=a*g-f*d,x=f*c-l*g,o=l*d-a*c,p=u*u+x*x+o*o),p=1/Math.sqrt(p),u*=p,x*=p,o*=p,e[0]=u,e[1]=x,e[2]=o,e[3]=0,e[4]=d*o-g*x,e[5]=g*u-c*o,e[6]=c*x-d*u,e[7]=0,e[8]=c,e[9]=d,e[10]=g,e[11]=0,e[12]=r,e[13]=n,e[14]=h,e[15]=1,e}function K(e,t,s){return e[0]=t[0]+s[0],e[1]=t[1]+s[1],e[2]=t[2]+s[2],e[3]=t[3]+s[3],e[4]=t[4]+s[4],e[5]=t[5]+s[5],e[6]=t[6]+s[6],e[7]=t[7]+s[7],e[8]=t[8]+s[8],e[9]=t[9]+s[9],e[10]=t[10]+s[10],e[11]=t[11]+s[11],e[12]=t[12]+s[12],e[13]=t[13]+s[13],e[14]=t[14]+s[14],e[15]=t[15]+s[15],e}function J(e,t,s){return e[0]=t[0]-s[0],e[1]=t[1]-s[1],e[2]=t[2]-s[2],e[3]=t[3]-s[3],e[4]=t[4]-s[4],e[5]=t[5]-s[5],e[6]=t[6]-s[6],e[7]=t[7]-s[7],e[8]=t[8]-s[8],e[9]=t[9]-s[9],e[10]=t[10]-s[10],e[11]=t[11]-s[11],e[12]=t[12]-s[12],e[13]=t[13]-s[13],e[14]=t[14]-s[14],e[15]=t[15]-s[15],e}function fe(e,t,s){return e[0]=t[0]*s,e[1]=t[1]*s,e[2]=t[2]*s,e[3]=t[3]*s,e[4]=t[4]*s,e[5]=t[5]*s,e[6]=t[6]*s,e[7]=t[7]*s,e[8]=t[8]*s,e[9]=t[9]*s,e[10]=t[10]*s,e[11]=t[11]*s,e[12]=t[12]*s,e[13]=t[13]*s,e[14]=t[14]*s,e[15]=t[15]*s,e}class B extends Array{constructor(t=1,s=0,i=0,r=0,n=0,h=1,l=0,a=0,f=0,c=0,d=1,g=0,p=0,u=0,x=0,o=1){return super(t,s,i,r,n,h,l,a,f,c,d,g,p,u,x,o),this}get x(){return this[12]}get y(){return this[13]}get z(){return this[14]}get w(){return this[15]}set x(t){this[12]=t}set y(t){this[13]=t}set z(t){this[14]=t}set w(t){this[15]=t}set(t,s,i,r,n,h,l,a,f,c,d,g,p,u,x,o){return t.length?this.copy(t):(jt(this,t,s,i,r,n,h,l,a,f,c,d,g,p,u,x,o),this)}translate(t,s=this){return Kt(this,s,t),this}rotate(t,s,i=this){return te(this,i,t,s),this}scale(t,s=this){return Jt(this,s,typeof t=="number"?[t,t,t]:t),this}add(t,s){return s?K(this,t,s):K(this,this,t),this}sub(t,s){return s?J(this,t,s):J(this,this,t),this}multiply(t,s){return t.length?s?H(this,t,s):H(this,this,t):fe(this,this,t),this}identity(){return Qt(this),this}copy(t){return Zt(this,t),this}fromPerspective({fov:t,aspect:s,near:i,far:r}={}){return he(this,t,s,i,r),this}fromOrthogonal({left:t,right:s,bottom:i,top:r,near:n,far:h}){return le(this,t,s,i,r,n,h),this}fromQuaternion(t){return ne(this,t),this}setPosition(t){return this.x=t[0],this.y=t[1],this.z=t[2],this}inverse(t=this){return Ht(this,t),this}compose(t,s,i){return re(this,t,s,i),this}decompose(t,s,i){return ie(this,t,s,i),this}getRotation(t){return nt(t,this),this}getTranslation(t){return ee(t,this),this}getScaling(t){return rt(t,this),this}getMaxScaleOnAxis(){return se(this)}lookAt(t,s,i){return ae(this,t,s,i),this}determinant(){return it(this)}fromArray(t,s=0){return this[0]=t[s],this[1]=t[s+1],this[2]=t[s+2],this[3]=t[s+3],this[4]=t[s+4],this[5]=t[s+5],this[6]=t[s+6],this[7]=t[s+7],this[8]=t[s+8],this[9]=t[s+9],this[10]=t[s+10],this[11]=t[s+11],this[12]=t[s+12],this[13]=t[s+13],this[14]=t[s+14],this[15]=t[s+15],this}toArray(t=[],s=0){return t[s]=this[0],t[s+1]=this[1],t[s+2]=this[2],t[s+3]=this[3],t[s+4]=this[4],t[s+5]=this[5],t[s+6]=this[6],t[s+7]=this[7],t[s+8]=this[8],t[s+9]=this[9],t[s+10]=this[10],t[s+11]=this[11],t[s+12]=this[12],t[s+13]=this[13],t[s+14]=this[14],t[s+15]=this[15],t}}function ce(e,t,s="YXZ"){return s==="XYZ"?(e[1]=Math.asin(Math.min(Math.max(t[8],-1),1)),Math.abs(t[8])<.99999?(e[0]=Math.atan2(-t[9],t[10]),e[2]=Math.atan2(-t[4],t[0])):(e[0]=Math.atan2(t[6],t[5]),e[2]=0)):s==="YXZ"?(e[0]=Math.asin(-Math.min(Math.max(t[9],-1),1)),Math.abs(t[9])<.99999?(e[1]=Math.atan2(t[8],t[10]),e[2]=Math.atan2(t[1],t[5])):(e[1]=Math.atan2(-t[2],t[0]),e[2]=0)):s==="ZXY"?(e[0]=Math.asin(Math.min(Math.max(t[6],-1),1)),Math.abs(t[6])<.99999?(e[1]=Math.atan2(-t[2],t[10]),e[2]=Math.atan2(-t[4],t[5])):(e[1]=0,e[2]=Math.atan2(t[1],t[0]))):s==="ZYX"?(e[1]=Math.asin(-Math.min(Math.max(t[2],-1),1)),Math.abs(t[2])<.99999?(e[0]=Math.atan2(t[6],t[10]),e[2]=Math.atan2(t[1],t[0])):(e[0]=0,e[2]=Math.atan2(-t[4],t[5]))):s==="YZX"?(e[2]=Math.asin(Math.min(Math.max(t[1],-1),1)),Math.abs(t[1])<.99999?(e[0]=Math.atan2(-t[9],t[5]),e[1]=Math.atan2(-t[2],t[0])):(e[0]=0,e[1]=Math.atan2(t[8],t[10]))):s==="XZY"&&(e[2]=Math.asin(-Math.min(Math.max(t[4],-1),1)),Math.abs(t[4])<.99999?(e[0]=Math.atan2(t[6],t[5]),e[1]=Math.atan2(t[8],t[0])):(e[0]=Math.atan2(-t[9],t[10]),e[1]=0)),e}const tt=new B;class de extends Array{constructor(t=0,s=t,i=t,r="YXZ"){super(t,s,i),this.order=r,this.onChange=()=>{},this._target=this;const n=["0","1","2"];return new Proxy(this,{set(h,l){const a=Reflect.set(...arguments);return a&&n.includes(l)&&h.onChange(),a}})}get x(){return this[0]}get y(){return this[1]}get z(){return this[2]}set x(t){this._target[0]=t,this.onChange()}set y(t){this._target[1]=t,this.onChange()}set z(t){this._target[2]=t,this.onChange()}set(t,s=t,i=t){return t.length?this.copy(t):(this._target[0]=t,this._target[1]=s,this._target[2]=i,this.onChange(),this)}copy(t){return this._target[0]=t[0],this._target[1]=t[1],this._target[2]=t[2],this.onChange(),this}reorder(t){return this._target.order=t,this.onChange(),this}fromRotationMatrix(t,s=this.order){return ce(this._target,t,s),this.onChange(),this}fromQuaternion(t,s=this.order,i){return tt.fromQuaternion(t),this._target.fromRotationMatrix(tt,s),i||this.onChange(),this}fromArray(t,s=0){return this._target[0]=t[s],this._target[1]=t[s+1],this._target[2]=t[s+2],this}toArray(t=[],s=0){return t[s]=this[0],t[s+1]=this[1],t[s+2]=this[2],t}}class ge{constructor(){this.parent=null,this.children=[],this.visible=!0,this.matrix=new B,this.worldMatrix=new B,this.matrixAutoUpdate=!0,this.worldMatrixNeedsUpdate=!1,this.position=new R,this.quaternion=new Wt,this.scale=new R(1),this.rotation=new de,this.up=new R(0,1,0),this.rotation._target.onChange=()=>this.quaternion.fromEuler(this.rotation,!0),this.quaternion._target.onChange=()=>this.rotation.fromQuaternion(this.quaternion,void 0,!0)}setParent(t,s=!0){this.parent&&t!==this.parent&&this.parent.removeChild(this,!1),this.parent=t,s&&t&&t.addChild(this,!1)}addChild(t,s=!0){~this.children.indexOf(t)||this.children.push(t),s&&t.setParent(this,!1)}removeChild(t,s=!0){~this.children.indexOf(t)&&this.children.splice(this.children.indexOf(t),1),s&&t.setParent(null,!1)}updateMatrixWorld(t){this.matrixAutoUpdate&&this.updateMatrix(),(this.worldMatrixNeedsUpdate||t)&&(this.parent===null?this.worldMatrix.copy(this.matrix):this.worldMatrix.multiply(this.parent.worldMatrix,this.matrix),this.worldMatrixNeedsUpdate=!1,t=!0);for(let s=0,i=this.children.length;s<i;s++)this.children[s].updateMatrixWorld(t)}updateMatrix(){this.matrix.compose(this.quaternion,this.position,this.scale),this.worldMatrixNeedsUpdate=!0}traverse(t){if(!t(this))for(let s=0,i=this.children.length;s<i;s++)this.children[s].traverse(t)}decompose(){this.matrix.decompose(this.quaternion._target,this.position,this.scale),this.rotation.fromQuaternion(this.quaternion)}lookAt(t,s=!1){s?this.matrix.lookAt(this.position,t,this.up):this.matrix.lookAt(t,this.position,this.up),this.matrix.getRotation(this.quaternion._target),this.rotation.fromQuaternion(this.quaternion)}}function pe(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[4],e[4]=t[5],e[5]=t[6],e[6]=t[8],e[7]=t[9],e[8]=t[10],e}function ue(e,t){let s=t[0],i=t[1],r=t[2],n=t[3],h=s+s,l=i+i,a=r+r,f=s*h,c=i*h,d=i*l,g=r*h,p=r*l,u=r*a,x=n*h,o=n*l,y=n*a;return e[0]=1-d-u,e[3]=c-y,e[6]=g+o,e[1]=c+y,e[4]=1-f-u,e[7]=p-x,e[2]=g-o,e[5]=p+x,e[8]=1-f-d,e}function xe(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e}function oe(e,t,s,i,r,n,h,l,a,f){return e[0]=t,e[1]=s,e[2]=i,e[3]=r,e[4]=n,e[5]=h,e[6]=l,e[7]=a,e[8]=f,e}function ye(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=1,e[5]=0,e[6]=0,e[7]=0,e[8]=1,e}function Me(e,t){let s=t[0],i=t[1],r=t[2],n=t[3],h=t[4],l=t[5],a=t[6],f=t[7],c=t[8],d=c*h-l*f,g=-c*n+l*a,p=f*n-h*a,u=s*d+i*g+r*p;return u?(u=1/u,e[0]=d*u,e[1]=(-c*i+r*f)*u,e[2]=(l*i-r*h)*u,e[3]=g*u,e[4]=(c*s-r*a)*u,e[5]=(-l*s+r*n)*u,e[6]=p*u,e[7]=(-f*s+i*a)*u,e[8]=(h*s-i*n)*u,e):null}function et(e,t,s){let i=t[0],r=t[1],n=t[2],h=t[3],l=t[4],a=t[5],f=t[6],c=t[7],d=t[8],g=s[0],p=s[1],u=s[2],x=s[3],o=s[4],y=s[5],b=s[6],_=s[7],M=s[8];return e[0]=g*i+p*h+u*f,e[1]=g*r+p*l+u*c,e[2]=g*n+p*a+u*d,e[3]=x*i+o*h+y*f,e[4]=x*r+o*l+y*c,e[5]=x*n+o*a+y*d,e[6]=b*i+_*h+M*f,e[7]=b*r+_*l+M*c,e[8]=b*n+_*a+M*d,e}function _e(e,t,s){let i=t[0],r=t[1],n=t[2],h=t[3],l=t[4],a=t[5],f=t[6],c=t[7],d=t[8],g=s[0],p=s[1];return e[0]=i,e[1]=r,e[2]=n,e[3]=h,e[4]=l,e[5]=a,e[6]=g*i+p*h+f,e[7]=g*r+p*l+c,e[8]=g*n+p*a+d,e}function me(e,t,s){let i=t[0],r=t[1],n=t[2],h=t[3],l=t[4],a=t[5],f=t[6],c=t[7],d=t[8],g=Math.sin(s),p=Math.cos(s);return e[0]=p*i+g*h,e[1]=p*r+g*l,e[2]=p*n+g*a,e[3]=p*h-g*i,e[4]=p*l-g*r,e[5]=p*a-g*n,e[6]=f,e[7]=c,e[8]=d,e}function Ee(e,t,s){let i=s[0],r=s[1];return e[0]=i*t[0],e[1]=i*t[1],e[2]=i*t[2],e[3]=r*t[3],e[4]=r*t[4],e[5]=r*t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e}function we(e,t){let s=t[0],i=t[1],r=t[2],n=t[3],h=t[4],l=t[5],a=t[6],f=t[7],c=t[8],d=t[9],g=t[10],p=t[11],u=t[12],x=t[13],o=t[14],y=t[15],b=s*l-i*h,_=s*a-r*h,M=s*f-n*h,E=i*a-r*l,m=i*f-n*l,A=r*f-n*a,S=c*x-d*u,C=c*o-g*u,F=c*y-p*u,O=d*o-g*x,z=d*y-p*x,L=g*y-p*o,w=b*L-_*z+M*O+E*F-m*C+A*S;return w?(w=1/w,e[0]=(l*L-a*z+f*O)*w,e[1]=(a*F-h*L-f*C)*w,e[2]=(h*z-l*F+f*S)*w,e[3]=(r*z-i*L-n*O)*w,e[4]=(s*L-r*F+n*C)*w,e[5]=(i*F-s*z-n*S)*w,e[6]=(x*A-o*m+y*E)*w,e[7]=(o*M-u*A-y*_)*w,e[8]=(u*m-x*M+y*b)*w,e):null}class be extends Array{constructor(t=1,s=0,i=0,r=0,n=1,h=0,l=0,a=0,f=1){return super(t,s,i,r,n,h,l,a,f),this}set(t,s,i,r,n,h,l,a,f){return t.length?this.copy(t):(oe(this,t,s,i,r,n,h,l,a,f),this)}translate(t,s=this){return _e(this,s,t),this}rotate(t,s=this){return me(this,s,t),this}scale(t,s=this){return Ee(this,s,t),this}multiply(t,s){return s?et(this,t,s):et(this,this,t),this}identity(){return ye(this),this}copy(t){return xe(this,t),this}fromMatrix4(t){return pe(this,t),this}fromQuaternion(t){return ue(this,t),this}fromBasis(t,s,i){return this.set(t[0],t[1],t[2],s[0],s[1],s[2],i[0],i[1],i[2]),this}inverse(t=this){return Me(this,t),this}getNormalMatrix(t){return we(this,t),this}}let Ae=0;class Ce extends ge{constructor(t,{geometry:s,program:i,mode:r=t.TRIANGLES,frustumCulled:n=!0,renderOrder:h=0}={}){super(),t.canvas||console.error("gl not passed as first argument to Mesh"),this.gl=t,this.id=Ae++,this.geometry=s,this.program=i,this.mode=r,this.frustumCulled=n,this.renderOrder=h,this.modelViewMatrix=new B,this.normalMatrix=new be,this.beforeRenderCallbacks=[],this.afterRenderCallbacks=[]}onBeforeRender(t){return this.beforeRenderCallbacks.push(t),this}onAfterRender(t){return this.afterRenderCallbacks.push(t),this}draw({camera:t}={}){t&&(this.program.uniforms.modelMatrix||Object.assign(this.program.uniforms,{modelMatrix:{value:null},viewMatrix:{value:null},modelViewMatrix:{value:null},normalMatrix:{value:null},projectionMatrix:{value:null},cameraPosition:{value:null}}),this.program.uniforms.projectionMatrix.value=t.projectionMatrix,this.program.uniforms.cameraPosition.value=t.worldPosition,this.program.uniforms.viewMatrix.value=t.viewMatrix,this.modelViewMatrix.multiply(t.viewMatrix,this.worldMatrix),this.normalMatrix.getNormalMatrix(this.modelViewMatrix),this.program.uniforms.modelMatrix.value=this.worldMatrix,this.program.uniforms.modelViewMatrix.value=this.modelViewMatrix,this.program.uniforms.normalMatrix.value=this.normalMatrix),this.beforeRenderCallbacks.forEach(i=>i&&i({mesh:this,camera:t}));let s=this.program.cullFace&&this.worldMatrix.determinant()<0;this.program.use({flipFaces:s}),this.geometry.draw({mode:this.mode,program:this.program}),this.afterRenderCallbacks.forEach(i=>i&&i({mesh:this,camera:t}))}}export{Fe as G,Ce as M,ze as P,Se as R,ge as T,R as V,B as a};
@@ -0,0 +1 @@
1
+ ._metaballs-container_ari47_1{position:relative;width:100%;min-height:100vh}._metaballs-container_ari47_1 canvas{display:block;width:100%;height:100%;position:absolute;top:0;left:0}
@@ -0,0 +1,63 @@
1
+ import{r as H,j as ie}from"./iframe-2N7rjfXm.js";import{R as ce,V as C,P as ue,M as fe,T as me}from"./Mesh-CwXV3WjE.js";import{C as de}from"./Camera-BM3HOhP6.js";import{T as pe}from"./Triangle-64ffRKNB.js";import"./preload-helper-C1FmrZbK.js";const ve={"metaballs-container":"_metaballs-container_ari47_1"};function $(o){const e=o.replace("#",""),n=parseInt(e.substring(0,2),16)/255,c=parseInt(e.substring(2,4),16)/255,i=parseInt(e.substring(4,6),16)/255;return[n,c,i]}function y(o){return o-Math.floor(o)}function he(o){let e=[o*.1031,o*.103,o*.0973].map(y);const n=[e[1],e[2],e[0]],c=e[0]*(n[0]+33.33)+e[1]*(n[1]+33.33)+e[2]*(n[2]+33.33);for(let i=0;i<3;i++)e[i]=y(e[i]+c);return e}function ge(o){let e=[o[0]*.1031,o[1]*.103,o[2]*.0973].map(y);const n=[e[1],e[0],e[2]],c=e[0]*(n[0]+33.33)+e[1]*(n[1]+33.33)+e[2]*(n[2]+33.33);for(let r=0;r<3;r++)e[r]=y(e[r]+c);const i=[e[0],e[0],e[1]],B=[e[1],e[0],e[0]],x=[e[2],e[1],e[0]],d=[];for(let r=0;r<3;r++)d[r]=y((i[r]+B[r])*x[r]);return d}const xe=`#version 300 es
2
+ precision highp float;
3
+ layout(location = 0) in vec2 position;
4
+ void main() {
5
+ gl_Position = vec4(position, 0.0, 1.0);
6
+ }
7
+ `,Ce=`#version 300 es
8
+ precision highp float;
9
+ uniform vec3 iResolution;
10
+ uniform float iTime;
11
+ uniform vec3 iMouse;
12
+ uniform vec3 iColor;
13
+ uniform vec3 iCursorColor;
14
+ uniform float iAnimationSize;
15
+ uniform int iBallCount;
16
+ uniform float iCursorBallSize;
17
+ uniform vec3 iMetaBalls[50];
18
+ uniform float iClumpFactor;
19
+ uniform bool enableTransparency;
20
+ out vec4 outColor;
21
+ const float PI = 3.14159265359;
22
+
23
+ float getMetaBallValue(vec2 c, float r, vec2 p) {
24
+ vec2 d = p - c;
25
+ float dist2 = dot(d, d);
26
+ return (r * r) / dist2;
27
+ }
28
+
29
+ void main() {
30
+ vec2 fc = gl_FragCoord.xy;
31
+ float scale = iAnimationSize / iResolution.y;
32
+ vec2 coord = (fc - iResolution.xy * 0.5) * scale;
33
+ vec2 mouseW = (iMouse.xy - iResolution.xy * 0.5) * scale;
34
+ float m1 = 0.0;
35
+ for (int i = 0; i < 50; i++) {
36
+ if (i >= iBallCount) break;
37
+ m1 += getMetaBallValue(iMetaBalls[i].xy, iMetaBalls[i].z, coord);
38
+ }
39
+ float m2 = getMetaBallValue(mouseW, iCursorBallSize, coord);
40
+ float total = m1 + m2;
41
+ float f = smoothstep(-1.0, 1.0, (total - 1.3) / min(1.0, fwidth(total)));
42
+ vec3 cFinal = vec3(0.0);
43
+ if (total > 0.0) {
44
+ float alpha1 = m1 / total;
45
+ float alpha2 = m2 / total;
46
+ cFinal = iColor * alpha1 + iCursorColor * alpha2;
47
+ }
48
+ outColor = vec4(cFinal * f, enableTransparency ? f : 1.0);
49
+ }
50
+ `,U=({className:o="",color:e="#ffffff",speed:n=.3,enableMouseInteraction:c=!0,hoverSmoothness:i=.05,animationSize:B=30,ballCount:x=15,clumpFactor:d=1,cursorBallSize:r=3,cursorBallColor:R="#ffffff",enableTransparency:b=!0})=>{const F=H.useRef(null);return H.useEffect(()=>{const l=F.current;if(!l)return;const z=1,V=new ce({dpr:z,alpha:!0,premultipliedAlpha:!1}),t=V.gl;t.clearColor(0,0,0,b?0:1),l.appendChild(t.canvas);const T=new de(t,{left:-1,right:1,top:1,bottom:-1,near:.1,far:10});T.position.z=1;const J=new pe(t),[K,Q,Z]=$(e),[ee,te,ae]=$(R),S=[];for(let a=0;a<50;a++)S.push(new C(0,0,0));const M=new ue(t,{vertex:xe,fragment:Ce,uniforms:{iTime:{value:0},iResolution:{value:new C(0,0,0)},iMouse:{value:new C(0,0,0)},iColor:{value:new C(K,Q,Z)},iCursorColor:{value:new C(ee,te,ae)},iAnimationSize:{value:B},iBallCount:{value:x},iCursorBallSize:{value:r},iMetaBalls:{value:S},iClumpFactor:{value:d},enableTransparency:{value:b}}}),oe=new fe(t,{geometry:J,program:M}),I=new me;oe.setParent(I);const L=Math.min(x,50),A=[];for(let a=0;a<L;a++){const s=a+1,u=he(s),p=u[0]*(2*Math.PI),m=.1*Math.PI+u[1]*(.4*Math.PI-.1*Math.PI),f=5+u[1]*5,v=ge(u),g=Math.floor(v[0]*2),q=.5+v[2]*(2-.5);A.push({st:p,dtFactor:m,baseScale:f,toggle:g,radius:q})}const h={x:0,y:0};let _=!1,W=0,X=0;function E(){if(!l)return;const a=l.clientWidth,s=l.clientHeight;V.setSize(a*z,s*z),t.canvas.style.width=a+"px",t.canvas.style.height=s+"px",M.uniforms.iResolution.value.set(t.canvas.width,t.canvas.height,0)}window.addEventListener("resize",E),E();function Y(a){if(!c)return;const s=l.getBoundingClientRect(),u=a.clientX-s.left,p=a.clientY-s.top;W=u/s.width*t.canvas.width,X=(1-p/s.height)*t.canvas.height}function j(){c&&(_=!0)}function N(){c&&(_=!1)}l.addEventListener("pointermove",Y),l.addEventListener("pointerenter",j),l.addEventListener("pointerleave",N);const ne=performance.now();let P;function D(a){P=requestAnimationFrame(D);const s=(a-ne)*.001;M.uniforms.iTime.value=s;for(let m=0;m<L;m++){const f=A[m],v=s*n*f.dtFactor,g=f.st+v,q=Math.cos(g),re=Math.sin(g+v*f.toggle),se=q*f.baseScale*d,le=re*f.baseScale*d;S[m].set(se,le,f.radius)}let u,p;if(_)u=W,p=X;else{const m=t.canvas.width*.5,f=t.canvas.height*.5,v=t.canvas.width*.15,g=t.canvas.height*.15;u=m+Math.cos(s*n)*v,p=f+Math.sin(s*n)*g}h.x+=(u-h.x)*i,h.y+=(p-h.y)*i,M.uniforms.iMouse.value.set(h.x,h.y,0),V.render({scene:I,camera:T})}return P=requestAnimationFrame(D),()=>{var a;cancelAnimationFrame(P),window.removeEventListener("resize",E),l.removeEventListener("pointermove",Y),l.removeEventListener("pointerenter",j),l.removeEventListener("pointerleave",N),l.removeChild(t.canvas),(a=t.getExtension("WEBGL_lose_context"))==null||a.loseContext()}},[e,R,n,c,i,B,x,d,r,b]),ie.jsx("div",{ref:F,className:`${ve["metaballs-container"]} ${o}`})};U.__docgenInfo={description:"",methods:[],displayName:"MetaBalls",props:{className:{defaultValue:{value:"''",computed:!1},required:!1},color:{defaultValue:{value:"'#ffffff'",computed:!1},required:!1},speed:{defaultValue:{value:"0.3",computed:!1},required:!1},enableMouseInteraction:{defaultValue:{value:"true",computed:!1},required:!1},hoverSmoothness:{defaultValue:{value:"0.05",computed:!1},required:!1},animationSize:{defaultValue:{value:"30",computed:!1},required:!1},ballCount:{defaultValue:{value:"15",computed:!1},required:!1},clumpFactor:{defaultValue:{value:"1",computed:!1},required:!1},cursorBallSize:{defaultValue:{value:"3",computed:!1},required:!1},cursorBallColor:{defaultValue:{value:"'#ffffff'",computed:!1},required:!1},enableTransparency:{defaultValue:{value:"true",computed:!1},required:!1}}};const Ve={title:"ReactBits/Animations/MetaBalls",component:U,parameters:{layout:"fullscreen"},tags:["autodocs"]},w={args:{color:"#ffffff",speed:.3,enableMouseInteraction:!0,hoverSmoothness:.05,animationSize:30,ballCount:15,clumpFactor:1,cursorBallSize:3,cursorBallColor:"#ffffff",enableTransparency:!0}};var k,G,O;w.parameters={...w.parameters,docs:{...(k=w.parameters)==null?void 0:k.docs,source:{originalSource:`{
51
+ args: {
52
+ color: '#ffffff',
53
+ speed: 0.3,
54
+ enableMouseInteraction: true,
55
+ hoverSmoothness: 0.05,
56
+ animationSize: 30,
57
+ ballCount: 15,
58
+ clumpFactor: 1,
59
+ cursorBallSize: 3,
60
+ cursorBallColor: '#ffffff',
61
+ enableTransparency: true
62
+ }
63
+ }`,...(O=(G=w.parameters)==null?void 0:G.docs)==null?void 0:O.source}}};const Se=["Default"];export{w as Default,Se as __namedExportsOrder,Ve as default};
@@ -0,0 +1 @@
1
+ ._paint-container_91c8o_1{display:block;min-height:100vh;width:100%;object-fit:contain}
@@ -0,0 +1,159 @@
1
+ import{r as c,j as ce}from"./iframe-2N7rjfXm.js";import"./preload-helper-C1FmrZbK.js";const ne={"paint-container":"_paint-container_91c8o_1"},ue=`#version 300 es
2
+ precision highp float;
3
+ in vec2 a_position;
4
+ out vec2 vP;
5
+ void main(){vP=a_position*.5+.5;gl_Position=vec4(a_position,0.,1.);}`,le=`#version 300 es
6
+ precision highp float;
7
+ in vec2 vP;
8
+ out vec4 oC;
9
+ uniform sampler2D u_tex;
10
+ uniform float u_time,u_ratio,u_imgRatio,u_seed,u_scale,u_refract,u_blur,u_liquid;
11
+ uniform float u_bright,u_contrast,u_angle,u_fresnel,u_sharp,u_wave,u_noise,u_chroma;
12
+ uniform float u_distort,u_contour;
13
+ uniform vec3 u_lightColor,u_darkColor,u_tint;
14
+
15
+ vec3 sC,sM;
16
+
17
+ vec3 pW(vec3 v){
18
+ vec3 i=floor(v),f=fract(v),s=sign(fract(v*.5)-.5),h=fract(sM*i+i.yzx),c=f*(f-1.);
19
+ return s*c*((h*16.-4.)*c-1.);
20
+ }
21
+
22
+ vec3 aF(vec3 b,vec3 c){return pW(b+c.zxy-pW(b.zxy+c.yzx)+pW(b.yzx+c.xyz));}
23
+ vec3 lM(vec3 s,vec3 p){return(p+aF(s,p))*.5;}
24
+
25
+ vec2 fA(){
26
+ vec2 c=vP-.5;
27
+ c.x*=u_ratio>u_imgRatio?u_ratio/u_imgRatio:1.;
28
+ c.y*=u_ratio>u_imgRatio?1.:u_imgRatio/u_ratio;
29
+ return vec2(c.x+.5,.5-c.y);
30
+ }
31
+
32
+ vec2 rot(vec2 p,float r){float c=cos(r),s=sin(r);return vec2(p.x*c+p.y*s,p.y*c-p.x*s);}
33
+
34
+ float bM(vec2 c,float t){
35
+ vec2 l=smoothstep(vec2(0.),vec2(t),c),u=smoothstep(vec2(0.),vec2(t),1.-c);
36
+ return l.x*l.y*u.x*u.y;
37
+ }
38
+
39
+ float mG(float hi,float lo,float t,float sh,float cv){
40
+ sh*=(2.-u_sharp);
41
+ float ci=smoothstep(.15,.85,cv),r=lo;
42
+ float e1=.08/u_scale;
43
+ r=mix(r,hi,smoothstep(0.,sh*1.5,t));
44
+ r=mix(r,lo,smoothstep(e1-sh,e1+sh,t));
45
+ float e2=e1+.05/u_scale*(1.-ci*.35);
46
+ r=mix(r,hi,smoothstep(e2-sh,e2+sh,t));
47
+ float e3=e2+.025/u_scale*(1.-ci*.45);
48
+ r=mix(r,lo,smoothstep(e3-sh,e3+sh,t));
49
+ float e4=e1+.1/u_scale;
50
+ r=mix(r,hi,smoothstep(e4-sh,e4+sh,t));
51
+ float rm=1.-e4,gT=clamp((t-e4)/rm,0.,1.);
52
+ r=mix(r,mix(hi,lo,smoothstep(0.,1.,gT)),smoothstep(e4-sh*.5,e4+sh*.5,t));
53
+ return r;
54
+ }
55
+
56
+ void main(){
57
+ sC=fract(vec3(.7548,.5698,.4154)*(u_seed+17.31))+.5;
58
+ sM=fract(sC.zxy-sC.yzx*1.618);
59
+ vec2 sc=vec2(vP.x*u_ratio,1.-vP.y);
60
+ float angleRad=u_angle*3.14159/180.;
61
+ sc=rot(sc-.5,angleRad)+.5;
62
+ sc=clamp(sc,0.,1.);
63
+ float sl=sc.x-sc.y,an=u_time*.001;
64
+ vec2 iC=fA();
65
+ vec4 texSample=texture(u_tex,iC);
66
+ float dp=texSample.r;
67
+ float shapeMask=texSample.a;
68
+ vec3 hi=u_lightColor*u_bright;
69
+ vec3 lo=u_darkColor*(2.-u_bright);
70
+ lo.b+=smoothstep(.6,1.4,sc.x+sc.y)*.08;
71
+ vec2 fC=sc-.5;
72
+ float rd=length(fC+vec2(0.,sl*.15));
73
+ vec2 ag=rot(fC,(.22-sl*.18)*3.14159);
74
+ float cv=1.-pow(rd*1.65,1.15);
75
+ cv*=pow(sc.y,.35);
76
+ float vs=shapeMask;
77
+ vs*=bM(iC,.01);
78
+ float fr=pow(1.-cv,u_fresnel)*.3;
79
+ vs=min(vs+fr*vs,1.);
80
+ float mT=an*.0625;
81
+ vec3 wO=vec3(-1.05,1.35,1.55);
82
+ vec3 wA=aF(vec3(31.,73.,56.),mT+wO)*.22*u_wave;
83
+ vec3 wB=aF(vec3(24.,64.,42.),mT-wO.yzx)*.22*u_wave;
84
+ vec2 nC=sc*45.*u_noise;
85
+ nC+=aF(sC.zxy,an*.17*sC.yzx-sc.yxy*.35).xy*18.*u_wave;
86
+ vec3 tC=vec3(.00041,.00053,.00076)*mT+wB*nC.x+wA*nC.y;
87
+ tC=lM(sC,tC);
88
+ tC=lM(sC+1.618,tC);
89
+ float tb=sin(tC.x*3.14159)*.5+.5;
90
+ tb=tb*2.-1.;
91
+ float noiseVal=pW(vec3(sc*8.+an,an*.5)).x;
92
+ float edgeFactor=smoothstep(0.,.5,dp)*smoothstep(1.,.5,dp);
93
+ float lD=dp+(1.-dp)*u_liquid*tb;
94
+ lD+=noiseVal*u_distort*.15*edgeFactor;
95
+ float rB=clamp(1.-cv,0.,1.);
96
+ float fl=ag.x+sl;
97
+ fl+=noiseVal*sl*u_distort*edgeFactor;
98
+ fl*=mix(1.,1.-dp*.5,u_contour);
99
+ fl-=dp*u_contour*.8;
100
+ float eI=smoothstep(0.,1.,lD)*smoothstep(1.,0.,lD);
101
+ fl-=tb*sl*1.8*eI;
102
+ float cA=cv*clamp(pow(sc.y,.12),.25,1.);
103
+ fl*=.12+(1.05-lD)*cA;
104
+ fl*=smoothstep(1.,.65,lD);
105
+ float vA1=smoothstep(.08,.18,sc.y)*smoothstep(.38,.18,sc.y);
106
+ float vA2=smoothstep(.08,.18,1.-sc.y)*smoothstep(.38,.18,1.-sc.y);
107
+ fl+=vA1*.16+vA2*.025;
108
+ fl*=.45+pow(sc.y,2.)*.55;
109
+ fl*=u_scale;
110
+ fl-=an;
111
+ float rO=rB+cv*tb*.025;
112
+ float vM1=smoothstep(-.12,.18,sc.y)*smoothstep(.48,.08,sc.y);
113
+ float cM1=smoothstep(.35,.55,cv)*smoothstep(.95,.35,cv);
114
+ rO+=vM1*cM1*4.5;
115
+ rO-=sl;
116
+ float bO=rB*1.25;
117
+ float vM2=smoothstep(-.02,.35,sc.y)*smoothstep(.75,.08,sc.y);
118
+ float cM2=smoothstep(.35,.55,cv)*smoothstep(.75,.35,cv);
119
+ bO+=vM2*cM2*.9;
120
+ bO-=lD*.18;
121
+ rO*=u_refract*u_chroma;
122
+ bO*=u_refract*u_chroma;
123
+ float sf=u_blur;
124
+ float rP=fract(fl+rO);
125
+ float rC=mG(hi.r,lo.r,rP,sf+.018+u_refract*cv*.025,cv);
126
+ float gP=fract(fl);
127
+ float gC=mG(hi.g,lo.g,gP,sf+.008/max(.01,1.-sl),cv);
128
+ float bP=fract(fl-bO);
129
+ float bC=mG(hi.b,lo.b,bP,sf+.008,cv);
130
+ vec3 col=vec3(rC,gC,bC);
131
+ col=(col-.5)*u_contrast+.5;
132
+ col=clamp(col,0.,1.);
133
+ col=mix(col,1.-min(vec3(1.),(1.-col)/max(u_tint,vec3(.001))),length(u_tint-1.)*.5);
134
+ col=clamp(col,0.,1.);
135
+ oC=vec4(col*vs,vs);
136
+ }`;function fe(v){let a=v.naturalWidth||v.width,n=v.naturalHeight||v.height;if(a>1e3||n>1e3||a<500||n<500){const r=a>n?a>1e3?1e3/a:a<500?500/a:1:n>1e3?1e3/n:n<500?500/n:1;a=Math.round(a*r),n=Math.round(n*r)}const b=document.createElement("canvas");b.width=a,b.height=n;const y=b.getContext("2d");y.drawImage(v,0,0,a,n);const T=y.getImageData(0,0,a,n).data,_=a*n,I=new Float32Array(_),i=new Uint8Array(_),w=new Uint8Array(_);for(let r=0;r<_;r++){const s=r*4,u=T[s],o=T[s+1],V=T[s+2],h=T[s+3],C=u>250&&o>250&&V>250&&h===255||h<5;I[r]=C?0:h/255,i[r]=I[r]>.1?1:0}for(let r=0;r<n;r++)for(let s=0;s<a;s++){const u=r*a+s;i[u]&&(s===0||s===a-1||r===0||r===n-1||!i[u-1]||!i[u+1]||!i[u-a]||!i[u+a])&&(w[u]=1)}const d=new Float32Array(_),X=200,O=.01,P=1.85;for(let r=0;r<X;r++)for(let s=1;s<n-1;s++)for(let u=1;u<a-1;u++){const o=s*a+u;if(!i[o]||w[o])continue;const V=(i[o+1]?d[o+1]:0)+(i[o-1]?d[o-1]:0)+(i[o+a]?d[o+a]:0)+(i[o-a]?d[o-a]:0),h=(O+V)/4;d[o]=P*h+(1-P)*d[o]}let g=0;for(let r=0;r<_;r++)d[r]>g&&(g=d[r]);g===0&&(g=1);const R=y.createImageData(a,n);for(let r=0;r<_;r++){const s=r*4,u=d[r]/g,o=Math.round(255*(1-u*u));R.data[s]=R.data[s+1]=R.data[s+2]=o,R.data[s+3]=Math.round(I[r]*255)}return R}function Z(v){const x=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(v);return x?[parseInt(x[1],16)/255,parseInt(x[2],16)/255,parseInt(x[3],16)/255]:[1,1,1]}function ee({imageSrc:v,seed:x=42,scale:N=4,refraction:a=.01,blur:n=.015,liquid:b=.75,speed:y=.3,brightness:L=2,contrast:T=.5,angle:_=0,fresnel:I=1,lightColor:i="#ffffff",darkColor:w="#000000",patternSharpness:d=1,waveAmplitude:X=1,noiseScale:O=.5,chromaticSpread:P=2,mouseAnimation:g=!1,distortion:R=1,contour:r=.2,tintColor:s="#feb3ff"}){const u=c.useRef(null),o=c.useRef(null),V=c.useRef(null),h=c.useRef({}),C=c.useRef(null),B=c.useRef(0),k=c.useRef(0),M=c.useRef(null),te=c.useRef(null),G=c.useRef(y),re=c.useRef({x:.5,y:.5,targetX:.5,targetY:.5}),z=c.useRef(g),[S,ae]=c.useState(!1),[W,Y]=c.useState(!1);c.useEffect(()=>{G.current=y},[y]),c.useEffect(()=>{z.current=g},[g]);const j=c.useCallback(()=>{const t=u.current;if(!t)return!1;const e=t.getContext("webgl2",{antialias:!0,alpha:!0});if(!e)return!1;const f=(q,D)=>{const F=e.createShader(D);return e.shaderSource(F,q),e.compileShader(F),e.getShaderParameter(F,e.COMPILE_STATUS)?F:(console.error(e.getShaderInfoLog(F)),null)},l=f(ue,e.VERTEX_SHADER),p=f(le,e.FRAGMENT_SHADER);if(!l||!p)return!1;const m=e.createProgram();if(e.attachShader(m,l),e.attachShader(m,p),e.linkProgram(m),!e.getProgramParameter(m,e.LINK_STATUS))return console.error(e.getProgramInfoLog(m)),!1;const E={},A=e.getProgramParameter(m,e.ACTIVE_UNIFORMS);for(let q=0;q<A;q++){const D=e.getActiveUniform(m,q);D&&(E[D.name]=e.getUniformLocation(m,D.name))}const oe=new Float32Array([-1,-1,1,-1,-1,1,1,1]),se=e.createBuffer();e.bindBuffer(e.ARRAY_BUFFER,se),e.bufferData(e.ARRAY_BUFFER,oe,e.STATIC_DRAW),e.useProgram(m);const $=e.getAttribLocation(m,"a_position");return e.enableVertexAttribArray($),e.vertexAttribPointer($,2,e.FLOAT,!1,0,0),o.current=e,V.current=m,h.current=E,!0},[]),H=c.useCallback(t=>{const e=o.current,f=h.current;if(!e||!t)return;C.current&&e.deleteTexture(C.current);const l=e.createTexture();e.activeTexture(e.TEXTURE0),e.bindTexture(e.TEXTURE_2D,l),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.LINEAR),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.LINEAR),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),e.texImage2D(e.TEXTURE_2D,0,e.RGBA,t.width,t.height,0,e.RGBA,e.UNSIGNED_BYTE,t.data),e.uniform1i(f.u_tex,0);const p=t.width/t.height;e.uniform1f(f.u_imgRatio,p),e.uniform1f(f.u_ratio,1),C.current=l,te.current=t},[]);return c.useEffect(()=>{if(!j())return;const t=u.current,e=o.current,f=1e3*devicePixelRatio;return t.width=f,t.height=f,e.viewport(0,0,f,f),ae(!0),()=>{M.current&&cancelAnimationFrame(M.current),C.current&&o.current&&o.current.deleteTexture(C.current)}},[j]),c.useEffect(()=>{if(!S||!v)return;Y(!1);const t=new Image;t.crossOrigin="anonymous",t.onload=()=>{const e=fe(t);H(e),Y(!0)},t.src=v},[S,v,H]),c.useEffect(()=>{const t=o.current,e=h.current;if(!t||!S)return;t.uniform1f(e.u_seed,x),t.uniform1f(e.u_scale,N),t.uniform1f(e.u_refract,a),t.uniform1f(e.u_blur,n),t.uniform1f(e.u_liquid,b),t.uniform1f(e.u_bright,L),t.uniform1f(e.u_contrast,T),t.uniform1f(e.u_angle,_),t.uniform1f(e.u_fresnel,I);const f=Z(i),l=Z(w),p=Z(s);t.uniform3f(e.u_lightColor,f[0],f[1],f[2]),t.uniform3f(e.u_darkColor,l[0],l[1],l[2]),t.uniform1f(e.u_sharp,d),t.uniform1f(e.u_wave,X),t.uniform1f(e.u_noise,O),t.uniform1f(e.u_chroma,P),t.uniform1f(e.u_distort,R),t.uniform1f(e.u_contour,r),t.uniform3f(e.u_tint,p[0],p[1],p[2])},[S,x,N,a,n,b,L,T,_,I,i,w,d,X,O,P,R,r,s]),c.useEffect(()=>{if(!S||!W)return;const t=o.current,e=h.current,f=u.current,l=re.current,p=E=>{const A=f.getBoundingClientRect();l.targetX=(E.clientX-A.left)/A.width,l.targetY=(E.clientY-A.top)/A.height};f.addEventListener("mousemove",p);const m=E=>{const A=E-k.current;k.current=E,z.current?(l.x+=(l.targetX-l.x)*.08,l.y+=(l.targetY-l.y)*.08,B.current=l.x*3e3+l.y*1500):B.current+=A*G.current,t.uniform1f(e.u_time,B.current),t.drawArrays(t.TRIANGLE_STRIP,0,4),M.current=requestAnimationFrame(m)};return k.current=performance.now(),M.current=requestAnimationFrame(m),()=>{M.current&&cancelAnimationFrame(M.current),f.removeEventListener("mousemove",p)}},[S,W]),ce.jsx("canvas",{ref:u,className:`${ne["paint-container"]}`})}ee.__docgenInfo={description:"",methods:[],displayName:"MetallicPaint",props:{seed:{defaultValue:{value:"42",computed:!1},required:!1},scale:{defaultValue:{value:"4",computed:!1},required:!1},refraction:{defaultValue:{value:"0.01",computed:!1},required:!1},blur:{defaultValue:{value:"0.015",computed:!1},required:!1},liquid:{defaultValue:{value:"0.75",computed:!1},required:!1},speed:{defaultValue:{value:"0.3",computed:!1},required:!1},brightness:{defaultValue:{value:"2",computed:!1},required:!1},contrast:{defaultValue:{value:"0.5",computed:!1},required:!1},angle:{defaultValue:{value:"0",computed:!1},required:!1},fresnel:{defaultValue:{value:"1",computed:!1},required:!1},lightColor:{defaultValue:{value:"'#ffffff'",computed:!1},required:!1},darkColor:{defaultValue:{value:"'#000000'",computed:!1},required:!1},patternSharpness:{defaultValue:{value:"1",computed:!1},required:!1},waveAmplitude:{defaultValue:{value:"1",computed:!1},required:!1},noiseScale:{defaultValue:{value:"0.5",computed:!1},required:!1},chromaticSpread:{defaultValue:{value:"2",computed:!1},required:!1},mouseAnimation:{defaultValue:{value:"false",computed:!1},required:!1},distortion:{defaultValue:{value:"1",computed:!1},required:!1},contour:{defaultValue:{value:"0.2",computed:!1},required:!1},tintColor:{defaultValue:{value:"'#feb3ff'",computed:!1},required:!1}}};const de={title:"ReactBits/Animations/MetallicPaint",component:ee,parameters:{layout:"fullscreen"},tags:["autodocs"]},U={args:{seed:42,scale:4,refraction:.01,blur:.015,liquid:.75,speed:.3,brightness:2,contrast:.5,angle:0,fresnel:1,lightColor:"#ffffff",darkColor:"#000000",patternSharpness:1,waveAmplitude:1,noiseScale:.5,chromaticSpread:2,mouseAnimation:!1,distortion:1,contour:.2,tintColor:"#feb3ff"}};var K,J,Q;U.parameters={...U.parameters,docs:{...(K=U.parameters)==null?void 0:K.docs,source:{originalSource:`{
137
+ args: {
138
+ seed: 42,
139
+ scale: 4,
140
+ refraction: 0.01,
141
+ blur: 0.015,
142
+ liquid: 0.75,
143
+ speed: 0.3,
144
+ brightness: 2,
145
+ contrast: 0.5,
146
+ angle: 0,
147
+ fresnel: 1,
148
+ lightColor: '#ffffff',
149
+ darkColor: '#000000',
150
+ patternSharpness: 1,
151
+ waveAmplitude: 1,
152
+ noiseScale: 0.5,
153
+ chromaticSpread: 2,
154
+ mouseAnimation: false,
155
+ distortion: 1,
156
+ contour: 0.2,
157
+ tintColor: '#feb3ff'
158
+ }
159
+ }`,...(Q=(J=U.parameters)==null?void 0:J.docs)==null?void 0:Q.source}}};const ve=["Default"];export{U as Default,ve as __namedExportsOrder,de as default};
@@ -0,0 +1,40 @@
1
+ import{r as n,j as r}from"./iframe-2N7rjfXm.js";import{s as S}from"./transform-BKmuZieF.js";import{l as F}from"./linear-dkJHgUri.js";import{e as et,t as at,l as ot,m as nt}from"./monotone-DHdPkfDP.js";import{a as rt,b as st}from"./axis-D3QohQNI.js";import{t as it}from"./defaultLocale-DJ2q5QjE.js";import"./preload-helper-C1FmrZbK.js";import"./array-BKyUJesY.js";import"./path-CbwjOpE9.js";const ct="_container_1cfkm_1",lt="_chart_1cfkm_11",mt="_gridLine_1cfkm_16",dt="_line_1cfkm_22",pt="_xAxis_1cfkm_30",gt="_yAxis_1cfkm_31",ut="_dataPoint_1cfkm_50",ht="_tooltip_1cfkm_63",ft="_tooltipHeader_1cfkm_88",_t="_tooltipDate_1cfkm_97",xt="_tooltipRating_1cfkm_103",yt="_ratingValue_1cfkm_113",Mt="_ratingMax_1cfkm_118",Dt="_tooltipTags_1cfkm_123",vt="_tag_1cfkm_130",kt="_tooltipComment_1cfkm_148",e={container:ct,chart:lt,gridLine:mt,line:dt,xAxis:pt,yAxis:gt,dataPoint:ut,tooltip:ht,tooltipHeader:ft,tooltipDate:_t,tooltipRating:xt,ratingValue:yt,ratingMax:Mt,tooltipTags:Dt,tag:vt,tooltipComment:kt},G=({moodData:o,width:g=800,height:f=400})=>{const i=n.useRef(null),d=n.useRef(null),J=n.useRef(null),[l,_]=n.useState(null),[w,K]=n.useState({x:0,y:0}),[A,C]=n.useState(!1),c=n.useMemo(()=>({top:20,right:20,bottom:50,left:40}),[]),x=g-c.left-c.right,N=f-c.top-c.bottom,u=n.useMemo(()=>o.map(a=>{const s=a.tag?a.tag.split(",").map(m=>m.trim()).filter(m=>m):[];return{date:new Date(a.date),rating:a.rating,tags:s,comment:a.comment}}).filter(a=>!isNaN(a.date.getTime())&&isFinite(a.rating)),[o]),E=n.useMemo(()=>F().domain([1,5,10]).range(["#FF6B6B","#FFD93D","#6BCB77"]).clamp(!0),[]);return n.useEffect(()=>{if(!i.current||u.length===0)return;const a=S(i.current);a.selectAll("*").remove();const s=a.append("g").attr("transform",`translate(${c.left},${c.top})`),m=et(u,t=>t.date);if(!m[0]||!m[1])return;const R=at().domain(m).range([0,x]),p=F().domain([1,10]).range([N,0]),U=ot().x(t=>R(t.date)).y(t=>p(t.rating)).curve(nt);s.selectAll(".grid-line-y").data(p.ticks(5)).enter().append("line").attr("class",e.gridLine).attr("x1",0).attr("y1",t=>p(t)).attr("x2",x).attr("y2",t=>p(t)),s.append("path").datum(u).attr("class",e.line).attr("d",U),s.append("g").attr("class",e.xAxis).attr("transform",`translate(0,${N})`).call(rt(R).tickFormat(t=>it("%m/%d")(t))),s.append("g").attr("class",e.yAxis).call(st(p)),s.selectAll(".mood-circle").data(u).enter().append("circle").attr("class",e.dataPoint).attr("cx",t=>R(t.date)).attr("cy",t=>p(t.rating)).attr("r",5).attr("fill",t=>E(t.rating)).style("cursor","pointer").on("mouseenter",(t,Z)=>{var b,$;const y=(b=i.current)==null?void 0:b.getBoundingClientRect(),tt=($=d.current)==null?void 0:$.getBoundingClientRect();if(y&&tt){let h=t.clientX-y.left+10,T=t.clientY-y.top-10;const B=250;h+B>x+c.left-20&&(h=t.clientX-y.left-B-10,h<0&&(h=10)),T<0&&(T=10),K({x:h,y:T})}_(Z),S(t.currentTarget).transition().duration(200).attr("r",8)}).on("mouseleave",t=>{setTimeout(()=>{A||_(null)},250),S(t.currentTarget).transition().duration(200).attr("r",5)})},[u,x,N,E,c,A]),n.useEffect(()=>()=>{_(null)},[]),r.jsxs("div",{className:e.container,ref:d,children:[r.jsx("svg",{ref:i,width:g,height:f,className:e.chart}),l&&r.jsxs("div",{ref:J,className:e.tooltip,style:{position:"absolute",pointerEvents:"auto",left:w.x,top:w.y,zIndex:1e3},onMouseEnter:()=>C(!0),onMouseLeave:()=>{C(!1),_(null)},children:[r.jsxs("div",{className:e.tooltipHeader,children:[r.jsx("div",{className:e.tooltipDate,children:l.date.toLocaleDateString()}),r.jsxs("div",{className:e.tooltipRating,children:[r.jsx("span",{className:e.ratingValue,children:l.rating}),r.jsx("span",{className:e.ratingMax,children:"/10"})]})]}),l.tags.length>0&&r.jsx("div",{className:e.tooltipTags,children:l.tags.map((a,s)=>r.jsx("span",{className:e.tag,children:a},s))}),l.comment&&r.jsx("div",{className:e.tooltipComment,children:l.comment})]})]})};G.__docgenInfo={description:"",methods:[],displayName:"MoodChart",props:{moodData:{required:!0,tsType:{name:"Array",elements:[{name:"MoodNoteData"}],raw:"MoodNoteData[]"},description:""},width:{required:!1,tsType:{name:"number"},description:"",defaultValue:{value:"800",computed:!1}},height:{required:!1,tsType:{name:"number"},description:"",defaultValue:{value:"400",computed:!1}}}};const $t={title:"Organisms/Charts/MoodChart",component:G,parameters:{layout:"centered"},argTypes:{width:{control:{type:"number",min:300,max:1200,step:50}},height:{control:{type:"number",min:200,max:800,step:50}}}},j=o=>{const g=[],f=new Date;for(let i=o-1;i>=0;i--){const d=new Date(f);d.setDate(d.getDate()-i),g.push(d.toISOString().split("T")[0])}return g},M={args:{moodData:j(30).map(o=>({date:o,rating:Math.floor(Math.random()*10)+1,tag:["happy","excited","calm","focused"][Math.floor(Math.random()*4)],comment:`Feeling ${Math.random()>.5?"good":"okay"} today`})),width:800,height:400}},D={args:{moodData:j(7).map(o=>({date:o,rating:Math.floor(Math.random()*10)+1,tag:["happy","calm","energetic","focused"][Math.floor(Math.random()*4)],comment:`Day ${o.split("-")[2]} mood note`})),width:600,height:300}},v={args:{moodData:j(90).map(o=>({date:o,rating:Math.floor(Math.random()*10)+1,tag:["productive","creative","stressed","relaxed","motivated"][Math.floor(Math.random()*5)],comment:Math.random()>.7?`Notable day - ${o}`:void 0})),width:1e3,height:400}},k={args:{moodData:[],width:800,height:400}};var H,L,P;M.parameters={...M.parameters,docs:{...(H=M.parameters)==null?void 0:H.docs,source:{originalSource:`{
2
+ args: {
3
+ moodData: generateDateRange(30).map(date => ({
4
+ date,
5
+ rating: Math.floor(Math.random() * 10) + 1,
6
+ tag: ['happy', 'excited', 'calm', 'focused'][Math.floor(Math.random() * 4)],
7
+ comment: \`Feeling \${Math.random() > 0.5 ? 'good' : 'okay'} today\`
8
+ })),
9
+ width: 800,
10
+ height: 400
11
+ }
12
+ }`,...(P=(L=M.parameters)==null?void 0:L.docs)==null?void 0:P.source}}};var V,I,W;D.parameters={...D.parameters,docs:{...(V=D.parameters)==null?void 0:V.docs,source:{originalSource:`{
13
+ args: {
14
+ moodData: generateDateRange(7).map(date => ({
15
+ date,
16
+ rating: Math.floor(Math.random() * 10) + 1,
17
+ tag: ['happy', 'calm', 'energetic', 'focused'][Math.floor(Math.random() * 4)],
18
+ comment: \`Day \${date.split('-')[2]} mood note\`
19
+ })),
20
+ width: 600,
21
+ height: 300
22
+ }
23
+ }`,...(W=(I=D.parameters)==null?void 0:I.docs)==null?void 0:W.source}}};var q,O,X;v.parameters={...v.parameters,docs:{...(q=v.parameters)==null?void 0:q.docs,source:{originalSource:`{
24
+ args: {
25
+ moodData: generateDateRange(90).map(date => ({
26
+ date,
27
+ rating: Math.floor(Math.random() * 10) + 1,
28
+ tag: ['productive', 'creative', 'stressed', 'relaxed', 'motivated'][Math.floor(Math.random() * 5)],
29
+ comment: Math.random() > 0.7 ? \`Notable day - \${date}\` : undefined
30
+ })),
31
+ width: 1000,
32
+ height: 400
33
+ }
34
+ }`,...(X=(O=v.parameters)==null?void 0:O.docs)==null?void 0:X.source}}};var Q,z,Y;k.parameters={...k.parameters,docs:{...(Q=k.parameters)==null?void 0:Q.docs,source:{originalSource:`{
35
+ args: {
36
+ moodData: [],
37
+ width: 800,
38
+ height: 400
39
+ }
40
+ }`,...(Y=(z=k.parameters)==null?void 0:z.docs)==null?void 0:Y.source}}};const Bt=["Default","Weekly","Quarterly","EmptyState"];export{M as Default,k as EmptyState,v as Quarterly,D as Weekly,Bt as __namedExportsOrder,$t as default};