@stfrigerio/sito-template 0.1.99 → 0.1.101
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/organisms/charts/BooleansHeatmap/BooleansHeatmap.d.ts.map +1 -1
- package/dist/components/organisms/charts/ChordDiagram/ChordDiagram.d.ts +20 -0
- package/dist/components/organisms/charts/ChordDiagram/ChordDiagram.d.ts.map +1 -0
- package/dist/components/organisms/charts/ChordDiagram/ChordDiagram.stories.d.ts +9 -0
- package/dist/components/organisms/charts/ChordDiagram/ChordDiagram.stories.d.ts.map +1 -0
- package/dist/components/organisms/charts/HabitTimeOfDayChart/HabitTimeOfDayChart.d.ts.map +1 -1
- package/dist/components/organisms/charts/PieChart/PieChart.d.ts.map +1 -1
- package/dist/components/organisms/charts/PolarHeatmap/PolarHeatmap.d.ts +30 -0
- package/dist/components/organisms/charts/PolarHeatmap/PolarHeatmap.d.ts.map +1 -0
- package/dist/components/organisms/charts/PolarHeatmap/PolarHeatmap.stories.d.ts +9 -0
- package/dist/components/organisms/charts/PolarHeatmap/PolarHeatmap.stories.d.ts.map +1 -0
- package/dist/components/organisms/charts/ProgressRings/ProgressRings.d.ts +20 -0
- package/dist/components/organisms/charts/ProgressRings/ProgressRings.d.ts.map +1 -0
- package/dist/components/organisms/charts/ProgressRings/ProgressRings.stories.d.ts +9 -0
- package/dist/components/organisms/charts/ProgressRings/ProgressRings.stories.d.ts.map +1 -0
- package/dist/components/organisms/charts/QuantifiableHabitsChart/QuantifiableHabitsChart.d.ts.map +1 -1
- package/dist/components/organisms/charts/RadialDayChart/RadialDayChart.d.ts +30 -0
- package/dist/components/organisms/charts/RadialDayChart/RadialDayChart.d.ts.map +1 -0
- package/dist/components/organisms/charts/RadialDayChart/RadialDayChart.stories.d.ts +9 -0
- package/dist/components/organisms/charts/RadialDayChart/RadialDayChart.stories.d.ts.map +1 -0
- package/dist/components/organisms/charts/SleepChart/SleepChart.d.ts.map +1 -1
- package/dist/components/organisms/charts/SunburstChart/SunburstChart.d.ts.map +1 -1
- package/dist/components/organisms/charts/index.d.ts +7 -0
- package/dist/components/organisms/charts/index.d.ts.map +1 -1
- package/dist/components/organisms/index.d.ts +7 -0
- package/dist/components/organisms/index.d.ts.map +1 -1
- package/dist/index.esm.js +969 -305
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +975 -307
- package/dist/index.js.map +1 -1
- package/dist/styles.css +1 -1
- package/dist/styles.css.map +1 -1
- package/package.json +1 -1
- package/storybook-static/assets/{ASCIIText.stories-DSI7g-mB.js → ASCIIText.stories-tIaR8-30.js} +1 -1
- package/storybook-static/assets/{AllAtoms.stories-JflUIS5e.js → AllAtoms.stories-wjImSAbw.js} +1 -1
- package/storybook-static/assets/{AnimatedContent.stories-YR7SgIxb.js → AnimatedContent.stories-2qC-fkJI.js} +1 -1
- package/storybook-static/assets/{AnimatedList.stories-GR75O93H.js → AnimatedList.stories-CylIt0ba.js} +1 -1
- package/storybook-static/assets/{Antigravity.stories-B2MVCdRl.js → Antigravity.stories-ium_rPSJ.js} +1 -1
- package/storybook-static/assets/{ArrayInput.stories-BI_3D81-.js → ArrayInput.stories-CnVg06MK.js} +1 -1
- package/storybook-static/assets/{Aurora.stories-C_w705rr.js → Aurora.stories-DuFv0_k8.js} +1 -1
- package/storybook-static/assets/{Beams.stories-D1L26zBi.js → Beams.stories-DIEOjIBe.js} +1 -1
- package/storybook-static/assets/{BlobCursor.stories-BjywoQ5q.js → BlobCursor.stories-DvG-koWY.js} +1 -1
- package/storybook-static/assets/{BlurText.stories-CSpGTebR.js → BlurText.stories-sWy214Q2.js} +1 -1
- package/storybook-static/assets/BooleansHeatmap.stories-mxTxY_p5.js +63 -0
- package/storybook-static/assets/{BorderGlow.stories-BadihHiQ.js → BorderGlow.stories-E4gpGeWQ.js} +1 -1
- package/storybook-static/assets/{BubbleMenu.stories-Up_UUIWc.js → BubbleMenu.stories-W43-ioFH.js} +1 -1
- package/storybook-static/assets/{Button-DtiJJxMy.js → Button-CTnNAnoF.js} +1 -1
- package/storybook-static/assets/{Button.stories-BG9uxBwH.js → Button.stories-ACvBbIR1.js} +1 -1
- package/storybook-static/assets/{Calendar.stories-CUZikQRy.js → Calendar.stories-iQkvrvgz.js} +1 -1
- package/storybook-static/assets/{Card-BrvmNtM2.js → Card-6j0993HS.js} +1 -1
- package/storybook-static/assets/{Card.stories-Bf_EtMxA.js → Card.stories-DZzRMcRM.js} +1 -1
- package/storybook-static/assets/{CardNav.stories-OiwfVEn3.js → CardNav.stories-BqXRGPFR.js} +1 -1
- package/storybook-static/assets/{Carousel.stories-Gw1aPaNl.js → Carousel.stories-Z9HYvNS6.js} +1 -1
- package/storybook-static/assets/{Checkbox-CJhut6rk.js → Checkbox-6Z_EEcoe.js} +1 -1
- package/storybook-static/assets/{Checkbox.stories-tIqU6B-y.js → Checkbox.stories-CkXxAAOM.js} +1 -1
- package/storybook-static/assets/ChordDiagram-Bk6idINH.css +1 -0
- package/storybook-static/assets/ChordDiagram.stories-BoGS9mXW.js +25 -0
- package/storybook-static/assets/{ChromaGrid.stories-DbsrxAuC.js → ChromaGrid.stories-DZWtESDP.js} +1 -1
- package/storybook-static/assets/{CircularGallery.stories-0ffqgfyn.js → CircularGallery.stories-DQHz7F4g.js} +1 -1
- package/storybook-static/assets/{CircularText.stories-o46bAR53.js → CircularText.stories-hAb1lSel.js} +1 -1
- package/storybook-static/assets/{ClickSpark.stories-Ci-BtpH_.js → ClickSpark.stories-BjzCHr3X.js} +1 -1
- package/storybook-static/assets/{ColorBends.stories-CAiI7Gmw.js → ColorBends.stories-VFe9q7SG.js} +1 -1
- package/storybook-static/assets/{CountUp.stories-CFiYranp.js → CountUp.stories-DMfEJ2_X.js} +1 -1
- package/storybook-static/assets/{Counter.stories-BfaVu_y6.js → Counter.stories-Ddufg4zF.js} +1 -1
- package/storybook-static/assets/{Crosshair.stories-_Hh1nKQp.js → Crosshair.stories-C6quKu3e.js} +1 -1
- package/storybook-static/assets/{Cubes.stories-DXBS_f8J.js → Cubes.stories-B7vxZouX.js} +1 -1
- package/storybook-static/assets/{CurvedLoop.stories-jcgMeMsw.js → CurvedLoop.stories-BGet8MMP.js} +1 -1
- package/storybook-static/assets/{DarkVeil.stories-BwtU9vKO.js → DarkVeil.stories-Bu0Tnu-6.js} +1 -1
- package/storybook-static/assets/{DateInput-6Jn_FyvO.js → DateInput-BuyblN2J.js} +1 -1
- package/storybook-static/assets/{DateInput.stories-C_XBRwB3.js → DateInput.stories-CyRv7sjg.js} +1 -1
- package/storybook-static/assets/{DecayCard.stories-D6kTH79t.js → DecayCard.stories-BD2h63Yc.js} +1 -1
- package/storybook-static/assets/{DecryptedText.stories-B4xWEvyF.js → DecryptedText.stories-BR5w3WHS.js} +1 -1
- package/storybook-static/assets/{Dither.stories-DmAOxBWe.js → Dither.stories-aUCUDBCz.js} +1 -1
- package/storybook-static/assets/{Dock.stories-AHZywNVf.js → Dock.stories-B9c2txIi.js} +1 -1
- package/storybook-static/assets/{EditFAB.stories-BJ5P85ZN.js → EditFAB.stories-DMOijRLx.js} +1 -1
- package/storybook-static/assets/{EvilEye.stories-D0CBPfm1.js → EvilEye.stories-CsOG_d0o.js} +1 -1
- package/storybook-static/assets/{FadeContent.stories-D1capsBJ.js → FadeContent.stories-BR6tybqY.js} +1 -1
- package/storybook-static/assets/{FaultyTerminal.stories-BxqqRf0S.js → FaultyTerminal.stories-DS5Tyv6l.js} +1 -1
- package/storybook-static/assets/{Fbo-DvyLCJ1Y.js → Fbo-CW8HnzJ0.js} +1 -1
- package/storybook-static/assets/{FloatingLines.stories-7ze9ddpl.js → FloatingLines.stories-DpsTsF-M.js} +1 -1
- package/storybook-static/assets/{FlowingMenu.stories-BX9PD8x2.js → FlowingMenu.stories-C7Yw24v8.js} +1 -1
- package/storybook-static/assets/{FluidGlass.stories-DynD7GVO.js → FluidGlass.stories-DL7gsIvR.js} +1 -1
- package/storybook-static/assets/{Folder.stories-DDktLoEO.js → Folder.stories-oUQTik2D.js} +1 -1
- package/storybook-static/assets/{FuzzyText.stories-D9tRARUX.js → FuzzyText.stories-3sz8Ql2j.js} +1 -1
- package/storybook-static/assets/{Galaxy.stories-aSApGekp.js → Galaxy.stories-DNKl8sLe.js} +1 -1
- package/storybook-static/assets/{GhostCursor.stories-5l0di532.js → GhostCursor.stories-BwKhRvGF.js} +1 -1
- package/storybook-static/assets/{GlareHover.stories-Dc69-LbU.js → GlareHover.stories-HqLH7vCz.js} +1 -1
- package/storybook-static/assets/{GlassSurface.stories-DETLyc0H.js → GlassSurface.stories-BI3VNUMA.js} +1 -1
- package/storybook-static/assets/{GlitchText.stories-Bzb3ZMSY.js → GlitchText.stories-DAJVj_2t.js} +1 -1
- package/storybook-static/assets/{GooeyNav.stories-rxdxJjAy.js → GooeyNav.stories-DC9dqubb.js} +1 -1
- package/storybook-static/assets/{GradientBlinds.stories-03LkBbo8.js → GradientBlinds.stories-FtL2FczL.js} +1 -1
- package/storybook-static/assets/{GradientText.stories-CGo9FyNH.js → GradientText.stories-sKX4wnrF.js} +1 -1
- package/storybook-static/assets/{Grainient.stories-CzGAEJr-.js → Grainient.stories-LOYPnd1b.js} +1 -1
- package/storybook-static/assets/{GridMotion.stories-BzeBDaK8.js → GridMotion.stories-D56B4vk1.js} +1 -1
- package/storybook-static/assets/HabitTimeOfDayChart.stories-CSb9GUPx.js +49 -0
- package/storybook-static/assets/{ImageSlideshow.stories-hoGOc1Gf.js → ImageSlideshow.stories-B74RIe-i.js} +1 -1
- package/storybook-static/assets/{Iridescence.stories-CQTjQ1lh.js → Iridescence.stories-CTwtY8eT.js} +1 -1
- package/storybook-static/assets/{LaserFlow.stories-DzkVWskc.js → LaserFlow.stories-BLmaf3AB.js} +1 -1
- package/storybook-static/assets/{LetterGlitch.stories-0wcxCpnJ.js → LetterGlitch.stories-DH37XF0t.js} +1 -1
- package/storybook-static/assets/{LightPillar.stories-C3jRtdg9.js → LightPillar.stories-Ck3qeiN0.js} +1 -1
- package/storybook-static/assets/{LightRays.stories-C52kBsnd.js → LightRays.stories-ua2gmYoU.js} +1 -1
- package/storybook-static/assets/{Lightning.stories-BFVGqmMh.js → Lightning.stories-aH3grKDv.js} +1 -1
- package/storybook-static/assets/{LineWaves.stories-DNdwRrSd.js → LineWaves.stories-Dny9m17l.js} +1 -1
- package/storybook-static/assets/{LiquidChrome.stories-DFTBXxI6.js → LiquidChrome.stories-DhhNq7hu.js} +1 -1
- package/storybook-static/assets/{LiquidEther.stories-BGYmyfDI.js → LiquidEther.stories-QrTDJF0k.js} +1 -1
- package/storybook-static/assets/{LoadingSpinner-D3Kx-V7J.js → LoadingSpinner-1TPKggI4.js} +1 -1
- package/storybook-static/assets/{LoadingSpinner.stories-CP70BGAb.js → LoadingSpinner.stories-hbHHmRIN.js} +1 -1
- package/storybook-static/assets/{MagicRings.stories-BA9xv5mB.js → MagicRings.stories-DVVFiIUt.js} +1 -1
- package/storybook-static/assets/{Magnet.stories-cqBYCb-D.js → Magnet.stories-BbdHeWMA.js} +1 -1
- package/storybook-static/assets/{MagnetLines.stories-QkoPnGKj.js → MagnetLines.stories-DuFdunF1.js} +1 -1
- package/storybook-static/assets/{Masonry.stories-CiGXRf3O.js → Masonry.stories-eCIUqf99.js} +1 -1
- package/storybook-static/assets/{MetaBalls.stories-3l0pQiKn.js → MetaBalls.stories-Dv6jUd7Z.js} +1 -1
- package/storybook-static/assets/{MetallicPaint.stories-DgZJfMr5.js → MetallicPaint.stories-DAVRhJNS.js} +1 -1
- package/storybook-static/assets/MoodChart.stories-Cu2L9ctb.js +40 -0
- package/storybook-static/assets/{MotionConfigContext-BWFxZgdN.js → MotionConfigContext-BOce3hkw.js} +1 -1
- package/storybook-static/assets/{Navbar.stories-C_Zyfhqr.js → Navbar.stories-CA4HG5LC.js} +1 -1
- package/storybook-static/assets/{Noise.stories-Cg7CucgT.js → Noise.stories-CzRiztMU.js} +1 -1
- package/storybook-static/assets/{NumberStepper-DpOu7xmF.js → NumberStepper-CA99F71z.js} +1 -1
- package/storybook-static/assets/{NumberStepper.stories-CvG9oY5Q.js → NumberStepper.stories-BaedWrxw.js} +1 -1
- package/storybook-static/assets/{Orb.stories-BR92tgyW.js → Orb.stories-C3AvU6Ck.js} +1 -1
- package/storybook-static/assets/{OrbitImages.stories-D_-2HcAd.js → OrbitImages.stories-CUQtYBoA.js} +1 -1
- package/storybook-static/assets/PieChart.stories-CuDdoiKR.js +91 -0
- package/storybook-static/assets/{PixelBlast.stories-B6FXuNf4.js → PixelBlast.stories-BZMMgPnx.js} +1 -1
- package/storybook-static/assets/{PixelCard.stories-Dq4CP2Qj.js → PixelCard.stories-BGHIfRb9.js} +1 -1
- package/storybook-static/assets/{PixelSnow.stories-BoQSOear.js → PixelSnow.stories-BxIpxPJS.js} +1 -1
- package/storybook-static/assets/{PixelTransition.stories-CtQQ070z.js → PixelTransition.stories-Do2T23Se.js} +1 -1
- package/storybook-static/assets/{Plasma.stories-D-421jzZ.js → Plasma.stories-SQXqI75y.js} +1 -1
- package/storybook-static/assets/PolarHeatmap.stories-CDFci1PA.js +26 -0
- package/storybook-static/assets/{Prism.stories-BuibpwdU.js → Prism.stories-Ba_UAm8c.js} +1 -1
- package/storybook-static/assets/{PrismaticBurst.stories-CwYzdBlM.js → PrismaticBurst.stories-NskKboMg.js} +1 -1
- package/storybook-static/assets/{ProfileCard.stories-Dj4oJCxw.js → ProfileCard.stories-nhGFawW1.js} +1 -1
- package/storybook-static/assets/ProgressRings-CR8t1see.css +1 -0
- package/storybook-static/assets/ProgressRings.stories-Dq2WYOU1.js +67 -0
- package/storybook-static/assets/QuantifiableHabitsChart.stories-treJexAd.js +125 -0
- package/storybook-static/assets/{Radar.stories-DxNmoYV3.js → Radar.stories-DN8oMfe1.js} +1 -1
- package/storybook-static/assets/RadialDayChart-CjNQ36HL.css +1 -0
- package/storybook-static/assets/RadialDayChart.stories-C_GY1oKa.js +26 -0
- package/storybook-static/assets/{RecurrencePicker.stories-BAicSNhQ.js → RecurrencePicker.stories-yUASJJzk.js} +1 -1
- package/storybook-static/assets/{Ribbons.stories-usN1kCyI.js → Ribbons.stories-2PD9Q7CT.js} +1 -1
- package/storybook-static/assets/{RippleGrid.stories-nTLGHPV6.js → RippleGrid.stories-Bmz86N8L.js} +1 -1
- package/storybook-static/assets/{RotatingText.stories-8CShs_WJ.js → RotatingText.stories-Db0Kj4fU.js} +1 -1
- package/storybook-static/assets/{ScrollFloat.stories-Dp9YyvHK.js → ScrollFloat.stories-BvS3cLTO.js} +1 -1
- package/storybook-static/assets/{ScrollReveal.stories-Dy4JUrqi.js → ScrollReveal.stories-BRz9n7Qk.js} +1 -1
- package/storybook-static/assets/{ScrollVelocity.stories-CUf-OHNp.js → ScrollVelocity.stories-TeCcq0Yc.js} +1 -1
- package/storybook-static/assets/{SearchBar.stories-BKfuRnlK.js → SearchBar.stories-Bu7toOZA.js} +1 -1
- package/storybook-static/assets/{SearchableDropdown-Ctnh_PVq.js → SearchableDropdown-BKDA92Db.js} +1 -1
- package/storybook-static/assets/{SearchableDropdown.stories-1d-goy0G.js → SearchableDropdown.stories-oT9buOsg.js} +1 -1
- package/storybook-static/assets/{SelectInput-C94OHQIl.js → SelectInput-Cej6AIrC.js} +1 -1
- package/storybook-static/assets/{SelectInput.stories-DPV5iKcs.js → SelectInput.stories--hmbh-1I.js} +1 -1
- package/storybook-static/assets/{ShapeBlur.stories-CdASN24B.js → ShapeBlur.stories-BrPB9Dgq.js} +1 -1
- package/storybook-static/assets/{ShapeGrid.stories-Duzq6qpW.js → ShapeGrid.stories-A41-DtIq.js} +1 -1
- package/storybook-static/assets/{ShinyText.stories-Dgqps29_.js → ShinyText.stories-BFTU8GJP.js} +1 -1
- package/storybook-static/assets/{Silk.stories-DWnaBFZp.js → Silk.stories-BxpLiRNx.js} +1 -1
- package/storybook-static/assets/SleepChart.stories-ywhx7_91.js +58 -0
- package/storybook-static/assets/{Slider-C69QbwVa.js → Slider-CuNmEDiZ.js} +1 -1
- package/storybook-static/assets/{Slider.stories-DDhTLU2g.js → Slider.stories-CsQAkQAf.js} +1 -1
- package/storybook-static/assets/{SoftAurora.stories-C5OSOqjj.js → SoftAurora.stories-taxcnhT9.js} +1 -1
- package/storybook-static/assets/{SoundDemo.stories-sb4V9P8H.js → SoundDemo.stories-zh_F_pgW.js} +1 -1
- package/storybook-static/assets/{SplashCursor.stories-PeC0-y78.js → SplashCursor.stories-CmqWbAt-.js} +1 -1
- package/storybook-static/assets/{SpotlightCard.stories-BCCdQhIJ.js → SpotlightCard.stories-CuO7WGGH.js} +1 -1
- package/storybook-static/assets/{Stack.stories-DJekNsdu.js → Stack.stories-7-b3bhlI.js} +1 -1
- package/storybook-static/assets/{StaggeredMenu.stories-BU-AxZRv.js → StaggeredMenu.stories-DBTBz-bp.js} +1 -1
- package/storybook-static/assets/{StarBorder.stories-Dw9LDvMk.js → StarBorder.stories-eXdZPyrG.js} +1 -1
- package/storybook-static/assets/SunburstChart.stories-CMSDNzoY.js +285 -0
- package/storybook-static/assets/{Table.stories-IhtnLV5J.js → Table.stories-SylwgEpv.js} +1 -1
- package/storybook-static/assets/{Tabs.stories-F_Q4-xiR.js → Tabs.stories-DbAMtL9i.js} +1 -1
- package/storybook-static/assets/{TargetCursor.stories-B-Tl1DdA.js → TargetCursor.stories-BRd8eVe6.js} +1 -1
- package/storybook-static/assets/{TextArea-Bb148SaD.js → TextArea-DBXLzMeZ.js} +1 -1
- package/storybook-static/assets/{TextArea.stories-5-dHoUPL.js → TextArea.stories-udebbAVJ.js} +1 -1
- package/storybook-static/assets/{TextCursor.stories-O-EIx7Nu.js → TextCursor.stories-BUDlvRvw.js} +1 -1
- package/storybook-static/assets/{TextInput-BQ78htqq.js → TextInput-Df0ECj-K.js} +1 -1
- package/storybook-static/assets/{TextInput.stories-Bjjfu_5O.js → TextInput.stories-FtH8T5-_.js} +1 -1
- package/storybook-static/assets/{TextPressure.stories-BvXWcayn.js → TextPressure.stories-Dooijbiu.js} +1 -1
- package/storybook-static/assets/{TextType.stories-DL92625c.js → TextType.stories-ClLVvVVk.js} +1 -1
- package/storybook-static/assets/{ThemeSwitcher.stories-BUUyb12v.js → ThemeSwitcher.stories-CwegSINw.js} +1 -1
- package/storybook-static/assets/{Threads.stories-C_LDNe0R.js → Threads.stories-BuN-AxUr.js} +1 -1
- package/storybook-static/assets/{TimeInput.stories-Tj2LrCtN.js → TimeInput.stories-B5IUTUV2.js} +1 -1
- package/storybook-static/assets/{Toggle-BgFXbOVy.js → Toggle-B5sCmBg4.js} +1 -1
- package/storybook-static/assets/{Toggle.stories-voNeGmVh.js → Toggle.stories-BmSHf5DP.js} +1 -1
- package/storybook-static/assets/{ToggleButton-CQLM9369.js → ToggleButton-CP739hB6.js} +1 -1
- package/storybook-static/assets/{ToggleButton.stories-CLdG94qe.js → ToggleButton.stories-m2eCrn7I.js} +1 -1
- package/storybook-static/assets/{TrueFocus.stories-CEC_mKz7.js → TrueFocus.stories-ATT_gCYY.js} +1 -1
- package/storybook-static/assets/{VariableProximity.stories-CoB68xuF.js → VariableProximity.stories-CjhZaqvP.js} +1 -1
- package/storybook-static/assets/{Waves.stories-Cpn9tv6C.js → Waves.stories-l6P0auFd.js} +1 -1
- package/storybook-static/assets/{arc-DgcIQOLP.js → arc--Q2xWRUA.js} +1 -1
- package/storybook-static/assets/back-BxPoHLz2.js +1 -0
- package/storybook-static/assets/{band-Cq25-Mh7.js → band-D-svgzWl.js} +1 -1
- package/storybook-static/assets/{calendar-B90N4a5g.js → calendar-DtZXr8CJ.js} +1 -1
- package/storybook-static/assets/{chart-column-Qn3KVlVm.js → chart-column-Bc8_bGZY.js} +1 -1
- package/storybook-static/assets/{check-BdgefYk0.js → check-pQLEHzEB.js} +1 -1
- package/storybook-static/assets/{chevron-down-rAxqUK0f.js → chevron-down-BwWfy_sP.js} +1 -1
- package/storybook-static/assets/{chevron-right-BQYLOSGD.js → chevron-right-D2pOUpcG.js} +1 -1
- package/storybook-static/assets/client-DyHGB6m6.js +1 -0
- package/storybook-static/assets/{createLucideIcon-CanksmPJ.js → createLucideIcon-B-jPBnP1.js} +1 -1
- package/storybook-static/assets/descending-BO6OmMcj.js +1 -0
- package/storybook-static/assets/{download-BoPCl2gy.js → download-DnhuO1Ek.js} +1 -1
- package/storybook-static/assets/{folder-B0zTnOfo.js → folder-B0kHgyRN.js} +1 -1
- package/storybook-static/assets/{iconBase-jWAd7fUM.js → iconBase-Do-FwLpb.js} +1 -1
- package/storybook-static/assets/{iframe-BTbLpgFM.js → iframe-ClorXKAj.js} +3 -3
- package/storybook-static/assets/{index-D9A3yXPP.js → index-Bs1dRoHq.js} +1 -1
- package/storybook-static/assets/{index-8orVvKs3.js → index-CBJggPN9.js} +1 -1
- package/storybook-static/assets/{index-Dnnp7mc9.js → index-CezVs6bU.js} +1 -1
- package/storybook-static/assets/linear-BTA54h8k.js +1 -0
- package/storybook-static/assets/monotone-Ca9yXB0X.js +1 -0
- package/storybook-static/assets/path-CSVzDSO0.js +1 -0
- package/storybook-static/assets/{proxy-DHiOkbBq.js → proxy-3BlM6Jc4.js} +1 -1
- package/storybook-static/assets/{react-18-RyhzFaVZ.js → react-18-wzICuHUq.js} +1 -1
- package/storybook-static/assets/{react-three-fiber.esm-DyDueq1t.js → react-three-fiber.esm-BmUFa1-S.js} +1 -1
- package/storybook-static/assets/{search-C2F8ucQI.js → search-BKi-6XDz.js} +1 -1
- package/storybook-static/assets/{settings-B4F4kfld.js → settings-BzEV0s0L.js} +1 -1
- package/storybook-static/assets/{sun-CbGl2Vwt.js → sun-C9Sm1WQX.js} +1 -1
- package/storybook-static/assets/{transform-v7fcW145.js → transform-DaumkFRH.js} +1 -1
- package/storybook-static/assets/{trash-2-CNCXZ0wH.js → trash-2-Bb1H8yHr.js} +1 -1
- package/storybook-static/assets/{use-animation-frame-DY1VsI4g.js → use-animation-frame-D9hLiIrP.js} +1 -1
- package/storybook-static/assets/{use-in-view-Cawxv_UZ.js → use-in-view-DKEXTXQI.js} +1 -1
- package/storybook-static/assets/{use-motion-value-BKT0PPfP.js → use-motion-value-BABvebXq.js} +1 -1
- package/storybook-static/assets/{use-spring-CDH8BIpQ.js → use-spring-C8_4zIh_.js} +1 -1
- package/storybook-static/assets/{use-transform-Bj0aHFrd.js → use-transform-CcGdha8D.js} +1 -1
- package/storybook-static/assets/{useSound-OlKqgJtL.js → useSound-BS8g02XJ.js} +1 -1
- package/storybook-static/assets/{users-Oy8C2tFC.js → users-CL9_RODb.js} +1 -1
- package/storybook-static/assets/value-CMZJhU-O.js +1 -0
- package/storybook-static/assets/{x-CR0CkM0G.js → x-BgxSkyBO.js} +1 -1
- package/storybook-static/iframe.html +1 -1
- package/storybook-static/index.json +1 -1
- package/storybook-static/project.json +1 -1
- package/storybook-static/assets/BooleansHeatmap.stories-CKYZW8W5.js +0 -63
- package/storybook-static/assets/HabitTimeOfDayChart.stories-CbMqUfq0.js +0 -49
- package/storybook-static/assets/MoodChart.stories-UXaQU4EG.js +0 -40
- package/storybook-static/assets/PieChart.stories-CjtEiSJY.js +0 -91
- package/storybook-static/assets/QuantifiableHabitsChart.stories-ZY1-WQ1g.js +0 -125
- package/storybook-static/assets/SleepChart.stories-C1n9aK7B.js +0 -58
- package/storybook-static/assets/SunburstChart.stories-CE4d4r8-.js +0 -285
- package/storybook-static/assets/client-Chg03P_H.js +0 -1
- package/storybook-static/assets/linear-9syG7RFK.js +0 -1
- package/storybook-static/assets/monotone-B6BFTqpP.js +0 -1
- package/storybook-static/assets/path-CbwjOpE9.js +0 -1
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
import{r as d,j as r}from"./iframe-ClorXKAj.js";import{s as y,c as Mt,f as ae}from"./transform-DaumkFRH.js";import{t as ne,e as re,l as oe,m as se,p as wt}from"./monotone-Ca9yXB0X.js";import{l as ie}from"./linear-BTA54h8k.js";import{C as le}from"./chart-column-Bc8_bGZY.js";import{c as at}from"./createLucideIcon-B-jPBnP1.js";import{C as ce}from"./calendar-DtZXr8CJ.js";import{t as gt}from"./defaultLocale-DJ2q5QjE.js";import{a as de,b as ue}from"./axis-D3QohQNI.js";import{b as kt}from"./back-BxPoHLz2.js";import"./preload-helper-C1FmrZbK.js";import"./array-BKyUJesY.js";import"./path-CSVzDSO0.js";import"./value-CMZJhU-O.js";import"./descending-BO6OmMcj.js";/**
|
|
2
|
+
* @license lucide-react v0.539.0 - ISC
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the ISC license.
|
|
5
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/const pe=[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}],["path",{d:"M8 14h.01",key:"6423bh"}],["path",{d:"M12 14h.01",key:"1etili"}],["path",{d:"M16 14h.01",key:"1gbofw"}],["path",{d:"M8 18h.01",key:"lrp35t"}],["path",{d:"M12 18h.01",key:"mhygvu"}],["path",{d:"M16 18h.01",key:"kzsmim"}]],he=at("calendar-days",pe);/**
|
|
7
|
+
* @license lucide-react v0.539.0 - ISC
|
|
8
|
+
*
|
|
9
|
+
* This source code is licensed under the ISC license.
|
|
10
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
11
|
+
*/const me=[["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M16 2v4",key:"4m81vk"}],["path",{d:"M3 10h18",key:"8toen8"}],["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M17 14h-6",key:"bkmgh3"}],["path",{d:"M13 18H7",key:"bb0bb7"}],["path",{d:"M7 14h.01",key:"1qa3f1"}],["path",{d:"M17 18h.01",key:"1bdyru"}]],ge=at("calendar-range",me);/**
|
|
12
|
+
* @license lucide-react v0.539.0 - ISC
|
|
13
|
+
*
|
|
14
|
+
* This source code is licensed under the ISC license.
|
|
15
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
16
|
+
*/const ye=[["circle",{cx:"12",cy:"6",r:"1",key:"1bh7o1"}],["line",{x1:"5",x2:"19",y1:"12",y2:"12",key:"13b5wn"}],["circle",{cx:"12",cy:"18",r:"1",key:"lqb9t5"}]],fe=at("divide",ye);/**
|
|
17
|
+
* @license lucide-react v0.539.0 - ISC
|
|
18
|
+
*
|
|
19
|
+
* This source code is licensed under the ISC license.
|
|
20
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
21
|
+
*/const ve=[["path",{d:"M18 7V5a1 1 0 0 0-1-1H6.5a.5.5 0 0 0-.4.8l4.5 6a2 2 0 0 1 0 2.4l-4.5 6a.5.5 0 0 0 .4.8H17a1 1 0 0 0 1-1v-2",key:"wuwx1p"}]],be=at("sigma",ve),xe="_container_frpma_1",_e="_controls_frpma_19",Me="_viewToggle_frpma_27",we="_viewButton_frpma_36",ke="_active_frpma_57",Se="_viewIcon_frpma_63",Te="_viewLabel_frpma_68",qe="_aggregationToggle_frpma_78",je="_aggregationButton_frpma_87",Ee="_aggregationIcon_frpma_114",Le="_aggregationLabel_frpma_119",Ce="_legend_frpma_129",De="_compactLegend_frpma_140",Ae="_legendItem_frpma_145",$e="_legendEmoji_frpma_150",Ne="_legendLabel_frpma_154",Ie="_inactive_frpma_178",Ve="_legendColor_frpma_188",Re="_chart_frpma_227",He="_gridLine_frpma_235",We="_line_frpma_241",Fe="_crosshair_frpma_248",Be="_halo_frpma_255",Oe="_overlay_frpma_260",ze="_xAxis_frpma_265",Ge="_yAxis_frpma_266",Pe="_dataPoint_frpma_285",Ye="_tooltip_frpma_289",Qe="_visible_frpma_310",Ue="_tooltipHeader_frpma_315",Xe="_tooltipEmoji_frpma_326",Ke="_tooltipDot_frpma_331",Je="_tooltipInfo_frpma_338",Ze="_tooltipDate_frpma_344",ta="_tooltipValue_frpma_350",e={container:xe,controls:_e,viewToggle:Me,viewButton:we,active:ke,viewIcon:Se,viewLabel:Te,aggregationToggle:qe,aggregationButton:je,aggregationIcon:Ee,aggregationLabel:Le,legend:Ce,compactLegend:De,legendItem:Ae,legendEmoji:$e,legendLabel:Ne,inactive:Ie,legendColor:Ve,chart:Re,gridLine:He,line:We,crosshair:Fe,halo:Be,overlay:Oe,xAxis:ze,yAxis:Ge,dataPoint:Pe,tooltip:Ye,visible:Qe,tooltipHeader:Ue,tooltipEmoji:Xe,tooltipDot:Ke,tooltipInfo:Je,tooltipDate:Ze,tooltipValue:ta},ea={Exercise:"#6BCB77",Meditation:"#4D96FF",Reading:"#FFB319",Water:"#00D9FF",Steps:"#FF6B6B",Sleep:"#9B59B6",Calories:"#FF9F1C",Study:"#C774E8"},St="http://www.w3.org/2000/svg",aa=(n,v,f=80)=>{const L=n&&n.length>0?n:"M0,0",M=v&&v.length>0?v:"M0,0",C=document.createElementNS(St,"path"),D=document.createElementNS(St,"path");C.setAttribute("d",L),D.setAttribute("d",M);const H=typeof C.getTotalLength=="function"?C.getTotalLength():0,Q=typeof D.getTotalLength=="function"?D.getTotalLength():0;if(H===0||Q===0)return()=>M;const A=[],w=[];for(let q=0;q<f;q++){const k=f===1?0:q/(f-1),h=C.getPointAtLength(k*H),i=D.getPointAtLength(k*Q);A.push([h.x,h.y]),w.push([i.x,i.y])}return q=>{let k="";for(let h=0;h<f;h++){const i=A[h][0]+(w[h][0]-A[h][0])*q,rt=A[h][1]+(w[h][1]-A[h][1])*q;k+=(h===0?"M":"L")+i+","+rt}return k}},Rt=({data:n,width:v=800,height:f=400,defaultViewType:L="daily",periodType:M="month",habitColors:C={},habitEmojis:D={},onDataPointClick:H,hideControls:Q=!1,compactLegend:A=!1})=>{const w=d.useRef(null),q=d.useRef(null),k=d.useRef(H),h=d.useRef(!1),[i,rt]=d.useState(L),[ot,yt]=d.useState([]),[z,ft]=d.useState(null),[S,st]=d.useState(null),[U,vt]=d.useState("average");d.useEffect(()=>{k.current=H},[H]);const $=d.useMemo(()=>({top:20,right:20,bottom:50,left:50}),[]),X=v-$.left-$.right,W=f-$.top-$.bottom,G=d.useMemo(()=>Object.keys(n).filter(a=>a!=="dates"),[n]);d.useEffect(()=>{yt(G)},[G]),d.useEffect(()=>{const a=()=>{st(null)};return window.addEventListener("scroll",a,!0),()=>{window.removeEventListener("scroll",a,!0)}},[]);const Ht=d.useMemo(()=>{switch(M){case"week":return["daily"];case"month":return["daily","weekly"];case"quarter":return["weekly","monthly"];case"year":return["daily","weekly","monthly","quarterly"];case"allTime":return["monthly","quarterly"];default:return["daily"]}},[M]),F=d.useCallback(a=>C[a]||ea[a]||`hsl(${Math.abs(a.split("").reduce((l,s)=>l+s.charCodeAt(0),0))%360}, 70%, 50%)`,[C]),b=d.useMemo(()=>{if(i==="daily"||!n.dates.length)return n;const a={dates:[]},l=new Map;return n.dates.forEach((s,_)=>{const j=new Date(s);let m;switch(i){case"weekly":{const c=new Date(j),g=c.getDay(),E=c.getDate()-g+(g===0?-6:1);c.setDate(E),m=c.toISOString().split("T")[0];break}case"monthly":m=`${j.getFullYear()}-${String(j.getMonth()+1).padStart(2,"0")}-01`;break;case"quarterly":{const g=(Math.floor(j.getMonth()/3)+1-1)*3;m=new Date(j.getFullYear(),g,1).toISOString().split("T")[0];break}default:m=s}l.has(m)||l.set(m,[]),l.get(m).push(_)}),a.dates=Array.from(l.keys()).sort(),G.forEach(s=>{a[s]=a.dates.map(_=>{const m=l.get(_).map(c=>n[s][c]).filter(c=>typeof c=="number"&&!isNaN(c));return m.length===0?0:Math.round(U==="sum"?m.reduce((c,g)=>c+g,0):m.reduce((c,g)=>c+g,0)/m.length)})}),a},[n,i,G,U]),Wt=a=>{yt(l=>l.includes(a)?l.filter(s=>s!==a):[...l,a])};d.useEffect(()=>{if(!w.current||b.dates.length===0)return;const a=y(w.current),l=!h.current;h.current=!0;let s=a.select("g.qhc-root");s.empty()&&(s=a.append("g").attr("class","qhc-root")),s.attr("transform",`translate(${$.left},${$.top})`);const _=t=>{let o=s.select(`g.${t}`);return o.empty()&&(o=s.append("g").attr("class",t)),o},j=_("qhc-grid"),m=_("qhc-lines"),c=_("qhc-points"),g=_("qhc-axes"),E=_("qhc-ui"),N=b.dates.map(t=>new Date(t)),it=ot.filter(t=>Array.isArray(b[t])),I=ne().domain(re(N)).range([0,X]),zt=Math.max(1,...it.flatMap(t=>b[t].filter(o=>typeof o=="number"))),V=ie().domain([0,zt*1.1]).range([W,0]),lt=oe().x(t=>I(t[0])).y(t=>V(t[1])).curve(se),ct=j.selectAll("line.qhc-grid-line").data(V.ticks(5),t=>String(t));ct.exit().remove(),ct.enter().append("line").attr("class",`${e.gridLine} qhc-grid-line`).style("opacity",0).merge(ct).attr("x1",0).attr("x2",X).attr("y1",t=>V(t)).attr("y2",t=>V(t)).transition().duration(400).style("opacity",1);const Gt=t=>{const o=new Date(t);o.setHours(0,0,0,0),o.setDate(o.getDate()+3-(o.getDay()+6)%7);const u=new Date(o.getFullYear(),0,4);return 1+Math.round(((o.getTime()-u.getTime())/864e5-3+(u.getDay()+6)%7)/7)},Pt=(()=>{switch(i){case"daily":return gt("%m-%d");case"weekly":return t=>`W${Gt(t).toString().padStart(2,"0")}`;case"monthly":return gt("%b");case"quarterly":return t=>`Q${Math.floor(t.getMonth()/3)+1}`;default:return gt("%m-%d")}})(),bt=(()=>{switch(i){case"daily":return Math.min(10,b.dates.length);case"weekly":return Math.min(12,b.dates.length);case"monthly":return Math.min(12,b.dates.length);case"quarterly":return b.dates.length;default:return}})(),dt=de(I).tickFormat(t=>Pt(t));i==="quarterly"?dt.tickValues(N):bt&&dt.ticks(bt);let P=g.select("g.qhc-x-axis");P.empty()&&(P=g.append("g").attr("class",`${e.xAxis} qhc-x-axis`)),P.attr("transform",`translate(0,${W})`).call(dt),P.selectAll("text").style("text-anchor",i==="daily"||i==="weekly"?"end":"middle").attr("dx",i==="daily"||i==="weekly"?"-.8em":"0").attr("dy",i==="daily"||i==="weekly"?".15em":".71em").attr("transform",i==="daily"||i==="weekly"?"rotate(-45)":null);let K=g.select("g.qhc-y-axis");K.empty()&&(K=g.append("g").attr("class",`${e.yAxis} qhc-y-axis`)),K.call(ue(V)),l&&(P.style("opacity",0).transition().duration(500).delay(80).style("opacity",1),K.style("opacity",0).transition().duration(500).delay(80).style("opacity",1));const Yt=it.map(t=>{const o=N.map((u,p)=>[u,b[t][p]]).filter(u=>typeof u[1]=="number");return{habit:t,color:F(t),points:o}}),ut=m.selectAll("path.qhc-line").data(Yt,t=>t.habit);ut.exit().transition("line-exit").duration(300).style("opacity",0).remove(),ut.enter().append("path").attr("class",`${e.line} qhc-line`).attr("data-habit",t=>t.habit).attr("fill","none").attr("stroke",t=>t.color).attr("opacity",0).attr("d",t=>lt(t.points)||"").each(function(){const t=this,o=typeof t.getTotalLength=="function"?t.getTotalLength():0;o>0&&y(t).attr("stroke-dasharray",`${o} ${o}`).attr("stroke-dashoffset",o)}).transition("line-enter").duration(900).ease(Mt).attr("opacity",1).attr("stroke-dashoffset",0).on("end",function(){y(this).attr("stroke-dasharray",null)}),ut.transition("line-update").duration(700).ease(ae).attr("stroke",t=>t.color).attrTween("d",function(t){const o=y(this).attr("d")||"",u=lt(t.points)||"";return aa(o,u,90)}).on("end",function(t){y(this).attr("d",lt(t.points)||"")}),c.selectAll("*").remove();const pt=[];it.forEach(t=>{const o=F(t);N.forEach((u,p)=>{const x=b[t][p];typeof x=="number"&&!isNaN(x)&&pt.push({habit:t,color:o,date:u,value:x})})});const xt=I(N[0]),Qt=I(N[N.length-1]),Ut=Math.max(1,Qt-xt),Xt=l?100:350,Kt=l?1100:600;c.selectAll("circle.qhc-point").data(pt).enter().append("circle").attr("class",`${e.dataPoint} qhc-point`).attr("data-habit",t=>t.habit).attr("cx",t=>I(t.date)).attr("cy",W).attr("r",0).attr("fill",t=>t.color).style("opacity",0).transition("point-enter").delay(t=>Xt+Kt*((I(t.date)-xt)/Ut)).duration(420).ease(kt.overshoot(2)).attr("cy",t=>V(t.value)).attr("r",4).style("opacity",1),E.selectAll("*").remove();const _t=E.append("line").attr("class",e.crosshair).attr("y1",0).attr("y2",W).style("opacity",0).style("pointer-events","none"),ht=E.append("circle").attr("class",e.halo).attr("r",0).style("opacity",0).style("pointer-events","none");let mt=null;const Jt=(t,o,u)=>{ht.interrupt("halo-pulse").interrupt("halo-out").attr("cx",t).attr("cy",o).attr("fill",u);const p=()=>{ht.attr("r",4).style("opacity",.55).transition("halo-pulse").duration(900).ease(Mt).attr("r",18).style("opacity",0).on("end",p)};p()},Zt=()=>{ht.interrupt("halo-pulse").transition("halo-out").duration(180).style("opacity",0).attr("r",0)},B=pt.map(t=>({habit:t.habit,date:t.date,value:t.value,x:I(t.date),y:V(t.value)})),te=(t,o,u)=>{const p=`${t.habit}|${t.date.toISOString()}`,x=F(t.habit);_t.attr("x1",t.x).attr("x2",t.x).interrupt("crosshair-fade").transition("crosshair-fade").duration(120).style("opacity",1),mt!==p&&(c.selectAll("circle.qhc-point").filter(function(){return y(this).attr("data-active")==="true"}).attr("data-active",null).transition("point-scale").duration(150).attr("r",4),c.selectAll("circle.qhc-point").filter(function(){const T=+y(this).attr("cx"),R=+y(this).attr("cy");return y(this).attr("data-habit")===t.habit&&Math.abs(T-t.x)<.5&&Math.abs(R-t.y)<.5}).attr("data-active","true").transition("point-scale").duration(180).ease(kt.overshoot(2)).attr("r",7),Jt(t.x,t.y,x),mt=p),st({habit:t.habit,date:t.date.toISOString().split("T")[0],value:t.value,x:o,y:u})},ee=()=>{_t.interrupt("crosshair-fade").transition("crosshair-fade").duration(180).style("opacity",0),c.selectAll("circle.qhc-point").filter(function(){return y(this).attr("data-active")==="true"}).attr("data-active",null).transition("point-scale").duration(180).attr("r",4),Zt(),mt=null,st(null)};E.append("rect").attr("class",e.overlay).attr("width",X).attr("height",W).on("mousemove",function(t){if(B.length===0)return;const[o,u]=wt(t,this);let p=B[0],x=1/0;for(const T of B){const R=T.x-o,O=T.y-u,Y=R*R+O*O;Y<x&&(x=Y,p=T)}te(p,t.clientX,t.clientY)}).on("mouseleave",()=>{ee()}).on("click",function(t){if(B.length===0||!k.current)return;const[o,u]=wt(t,this);let p=B[0],x=1/0;for(const T of B){const R=T.x-o,O=T.y-u,Y=R*R+O*O;Y<x&&(x=Y,p=T)}k.current(p.habit,p.date.toISOString().split("T")[0],p.value)}),E.raise()},[b,ot,X,W,$,F,i,v,f]),d.useEffect(()=>{if(!w.current)return;const a=y(w.current);a.selectAll("path.qhc-line").each(function(){const l=this.getAttribute("data-habit"),s=z&&z!==l;y(this).transition("hover-dim").duration(180).attr("opacity",s?.25:1)}),a.selectAll("circle.qhc-point").each(function(){const l=this.getAttribute("data-habit"),s=z&&z!==l;y(this).transition("hover-dim").duration(180).attr("opacity",s?.25:1)})},[z]);const Ft=(a,l)=>{const s=new Date(a);switch(l){case"daily":return s.toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"});case"weekly":return`Week of ${s.toLocaleDateString("en-US",{month:"short",day:"numeric"})}`;case"monthly":return s.toLocaleDateString("en-US",{month:"long",year:"numeric"});case"quarterly":return`Q${Math.floor(s.getMonth()/3)+1} ${s.getFullYear()}`;default:return a}},Bt={daily:{Icon:ce,label:"Daily"},weekly:{Icon:he,label:"Weekly"},monthly:{Icon:ge,label:"Monthly"},quarterly:{Icon:le,label:"Quarterly"}},Ot=i!=="daily";return r.jsxs("div",{className:e.container,children:[!Q&&r.jsxs("div",{className:e.controls,children:[r.jsx("div",{className:e.viewToggle,children:Ht.map(a=>{const{Icon:l,label:s}=Bt[a];return r.jsxs("button",{className:`${e.viewButton} ${i===a?e.active:""}`,onClick:()=>rt(a),title:s,children:[r.jsx("span",{className:e.viewIcon,children:r.jsx(l,{size:16})}),r.jsx("span",{className:e.viewLabel,children:s})]},a)})}),Ot&&r.jsxs("div",{className:e.aggregationToggle,children:[r.jsxs("button",{className:`${e.aggregationButton} ${U==="average"?e.active:""}`,onClick:()=>vt("average"),title:"Show average values for each period",children:[r.jsx("span",{className:e.aggregationIcon,children:r.jsx(fe,{size:16})}),r.jsx("span",{className:e.aggregationLabel,children:"Average"})]}),r.jsxs("button",{className:`${e.aggregationButton} ${U==="sum"?e.active:""}`,onClick:()=>vt("sum"),title:"Show total values for each period",children:[r.jsx("span",{className:e.aggregationIcon,children:r.jsx(be,{size:16})}),r.jsx("span",{className:e.aggregationLabel,children:"Sum"})]})]})]}),r.jsx("div",{className:`${e.legend}${A?` ${e.compactLegend}`:""}`,children:G.map(a=>r.jsxs("button",{className:`${e.legendItem} ${ot.includes(a)?"":e.inactive}`,onClick:()=>Wt(a),onMouseEnter:()=>ft(a),onMouseLeave:()=>ft(null),children:[r.jsx("span",{className:e.legendEmoji,children:D[a]||"📊"}),r.jsx("span",{className:e.legendColor,style:{backgroundColor:F(a)}}),r.jsx("span",{className:e.legendLabel,children:a})]},a))}),r.jsx("svg",{ref:w,viewBox:`0 0 ${v} ${f}`,preserveAspectRatio:"xMidYMid meet",className:e.chart}),S&&r.jsxs("div",{ref:q,className:`${e.tooltip} ${S?e.visible:""}`,style:{left:`${S.x}px`,top:`${S.y-80}px`},children:[r.jsxs("div",{className:e.tooltipHeader,children:[r.jsx("span",{className:e.tooltipEmoji,children:D[S.habit]||"📊"}),r.jsx("span",{className:e.tooltipDot,style:{backgroundColor:F(S.habit)}}),r.jsx("span",{children:S.habit})]}),r.jsxs("div",{className:e.tooltipInfo,children:[r.jsx("div",{className:e.tooltipDate,children:Ft(S.date,i)}),r.jsxs("div",{className:e.tooltipValue,children:[r.jsx("strong",{children:Math.round(S.value*10)/10}),r.jsx("span",{style:{fontSize:"12px",fontWeight:"normal",opacity:.6},children:"units"})]})]})]})]})};Rt.__docgenInfo={description:"",methods:[],displayName:"QuantifiableHabitsChart",props:{data:{required:!0,tsType:{name:"ChartData"},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}},defaultViewType:{required:!1,tsType:{name:"union",raw:"'daily' | 'weekly' | 'monthly' | 'quarterly'",elements:[{name:"literal",value:"'daily'"},{name:"literal",value:"'weekly'"},{name:"literal",value:"'monthly'"},{name:"literal",value:"'quarterly'"}]},description:"",defaultValue:{value:"'daily'",computed:!1}},periodType:{required:!1,tsType:{name:"union",raw:"'week' | 'month' | 'quarter' | 'year' | 'allTime'",elements:[{name:"literal",value:"'week'"},{name:"literal",value:"'month'"},{name:"literal",value:"'quarter'"},{name:"literal",value:"'year'"},{name:"literal",value:"'allTime'"}]},description:"",defaultValue:{value:"'month'",computed:!1}},habitColors:{required:!1,tsType:{name:"signature",type:"object",raw:"{ [key: string]: string }",signature:{properties:[{key:{name:"string"},value:{name:"string",required:!0}}]}},description:"",defaultValue:{value:"{}",computed:!1}},habitEmojis:{required:!1,tsType:{name:"signature",type:"object",raw:"{ [key: string]: string }",signature:{properties:[{key:{name:"string"},value:{name:"string",required:!0}}]}},description:"",defaultValue:{value:"{}",computed:!1}},onDataPointClick:{required:!1,tsType:{name:"signature",type:"function",raw:"(habit: string, date: string, value: number) => void",signature:{arguments:[{type:{name:"string"},name:"habit"},{type:{name:"string"},name:"date"},{type:{name:"number"},name:"value"}],return:{name:"void"}}},description:""},hideControls:{required:!1,tsType:{name:"boolean"},description:"",defaultValue:{value:"false",computed:!1}},compactLegend:{required:!1,tsType:{name:"boolean"},description:"",defaultValue:{value:"false",computed:!1}}}};const xa={title:"Organisms/Charts/QuantifiableHabitsChart",component:Rt,parameters:{layout:"centered"},argTypes:{width:{control:{type:"number",min:400,max:1200,step:50}},height:{control:{type:"number",min:200,max:600,step:50}},defaultViewType:{control:{type:"select"},options:["daily","weekly","monthly","quarterly"]},periodType:{control:{type:"select"},options:["week","month","quarter","year","allTime"]}}},nt=n=>{const v=[],f=new Date;for(let L=n-1;L>=0;L--){const M=new Date(f);M.setDate(M.getDate()-L),v.push(M.toISOString().split("T")[0])}return v},J={args:{data:(()=>{const n=nt(30);return{dates:n,Exercise:n.map(()=>Math.floor(Math.random()*60)+20),Reading:n.map(()=>Math.floor(Math.random()*120)+30),Water:n.map(()=>Math.floor(Math.random()*8)+2),Steps:n.map(()=>Math.floor(Math.random()*15e3)+5e3)}})(),width:900,height:400,defaultViewType:"daily",periodType:"month",habitColors:{Exercise:"#10b981",Reading:"#8b5cf6",Water:"#3b82f6",Steps:"#f59e0b"},habitEmojis:{Exercise:"🏃",Reading:"📚",Water:"💧",Steps:"👟"}}},Z={args:{data:(()=>{const n=nt(90);return{dates:n,Meditation:n.map(()=>Math.floor(Math.random()*30)+10),Study:n.map(()=>Math.floor(Math.random()*180)+60),Sleep:n.map(()=>Math.floor(Math.random()*3)+6)}})(),width:900,height:400,defaultViewType:"weekly",periodType:"quarter",habitColors:{Meditation:"#a78bfa",Study:"#34d399",Sleep:"#60a5fa"},habitEmojis:{Meditation:"🧘",Study:"📖",Sleep:"😴"}}},tt={args:{data:(()=>{const n=nt(365);return{dates:n,Coding:n.map(()=>Math.floor(Math.random()*240)+120),Exercise:n.map(()=>Math.floor(Math.random()*90)+30),Learning:n.map(()=>Math.floor(Math.random()*120)+60),Socializing:n.map(()=>Math.floor(Math.random()*180)+60)}})(),width:1e3,height:450,defaultViewType:"monthly",periodType:"year",habitColors:{Coding:"#7c3aed",Exercise:"#10b981",Learning:"#f59e0b",Socializing:"#ec4899"},habitEmojis:{Coding:"💻",Exercise:"💪",Learning:"🎓",Socializing:"👥"}}},et={args:{data:(()=>{const n=nt(30);return{dates:n,Weight:n.map((v,f)=>70+Math.sin(f/5)*2+Math.random())}})(),width:800,height:300,defaultViewType:"daily",periodType:"month",habitColors:{Weight:"#3b82f6"},habitEmojis:{Weight:"⚖️"}}};var Tt,qt,jt;J.parameters={...J.parameters,docs:{...(Tt=J.parameters)==null?void 0:Tt.docs,source:{originalSource:`{
|
|
22
|
+
args: {
|
|
23
|
+
data: (() => {
|
|
24
|
+
const dates = generateDateRange(30);
|
|
25
|
+
return {
|
|
26
|
+
dates,
|
|
27
|
+
Exercise: dates.map(() => Math.floor(Math.random() * 60) + 20),
|
|
28
|
+
Reading: dates.map(() => Math.floor(Math.random() * 120) + 30),
|
|
29
|
+
Water: dates.map(() => Math.floor(Math.random() * 8) + 2),
|
|
30
|
+
Steps: dates.map(() => Math.floor(Math.random() * 15000) + 5000)
|
|
31
|
+
};
|
|
32
|
+
})(),
|
|
33
|
+
width: 900,
|
|
34
|
+
height: 400,
|
|
35
|
+
defaultViewType: 'daily',
|
|
36
|
+
periodType: 'month',
|
|
37
|
+
habitColors: {
|
|
38
|
+
Exercise: '#10b981',
|
|
39
|
+
Reading: '#8b5cf6',
|
|
40
|
+
Water: '#3b82f6',
|
|
41
|
+
Steps: '#f59e0b'
|
|
42
|
+
},
|
|
43
|
+
habitEmojis: {
|
|
44
|
+
Exercise: '🏃',
|
|
45
|
+
Reading: '📚',
|
|
46
|
+
Water: '💧',
|
|
47
|
+
Steps: '👟'
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}`,...(jt=(qt=J.parameters)==null?void 0:qt.docs)==null?void 0:jt.source}}};var Et,Lt,Ct;Z.parameters={...Z.parameters,docs:{...(Et=Z.parameters)==null?void 0:Et.docs,source:{originalSource:`{
|
|
51
|
+
args: {
|
|
52
|
+
data: (() => {
|
|
53
|
+
const dates = generateDateRange(90);
|
|
54
|
+
return {
|
|
55
|
+
dates,
|
|
56
|
+
Meditation: dates.map(() => Math.floor(Math.random() * 30) + 10),
|
|
57
|
+
Study: dates.map(() => Math.floor(Math.random() * 180) + 60),
|
|
58
|
+
Sleep: dates.map(() => Math.floor(Math.random() * 3) + 6)
|
|
59
|
+
};
|
|
60
|
+
})(),
|
|
61
|
+
width: 900,
|
|
62
|
+
height: 400,
|
|
63
|
+
defaultViewType: 'weekly',
|
|
64
|
+
periodType: 'quarter',
|
|
65
|
+
habitColors: {
|
|
66
|
+
Meditation: '#a78bfa',
|
|
67
|
+
Study: '#34d399',
|
|
68
|
+
Sleep: '#60a5fa'
|
|
69
|
+
},
|
|
70
|
+
habitEmojis: {
|
|
71
|
+
Meditation: '🧘',
|
|
72
|
+
Study: '📖',
|
|
73
|
+
Sleep: '😴'
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
}`,...(Ct=(Lt=Z.parameters)==null?void 0:Lt.docs)==null?void 0:Ct.source}}};var Dt,At,$t;tt.parameters={...tt.parameters,docs:{...(Dt=tt.parameters)==null?void 0:Dt.docs,source:{originalSource:`{
|
|
77
|
+
args: {
|
|
78
|
+
data: (() => {
|
|
79
|
+
const dates = generateDateRange(365);
|
|
80
|
+
return {
|
|
81
|
+
dates,
|
|
82
|
+
Coding: dates.map(() => Math.floor(Math.random() * 240) + 120),
|
|
83
|
+
Exercise: dates.map(() => Math.floor(Math.random() * 90) + 30),
|
|
84
|
+
Learning: dates.map(() => Math.floor(Math.random() * 120) + 60),
|
|
85
|
+
Socializing: dates.map(() => Math.floor(Math.random() * 180) + 60)
|
|
86
|
+
};
|
|
87
|
+
})(),
|
|
88
|
+
width: 1000,
|
|
89
|
+
height: 450,
|
|
90
|
+
defaultViewType: 'monthly',
|
|
91
|
+
periodType: 'year',
|
|
92
|
+
habitColors: {
|
|
93
|
+
Coding: '#7c3aed',
|
|
94
|
+
Exercise: '#10b981',
|
|
95
|
+
Learning: '#f59e0b',
|
|
96
|
+
Socializing: '#ec4899'
|
|
97
|
+
},
|
|
98
|
+
habitEmojis: {
|
|
99
|
+
Coding: '💻',
|
|
100
|
+
Exercise: '💪',
|
|
101
|
+
Learning: '🎓',
|
|
102
|
+
Socializing: '👥'
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
}`,...($t=(At=tt.parameters)==null?void 0:At.docs)==null?void 0:$t.source}}};var Nt,It,Vt;et.parameters={...et.parameters,docs:{...(Nt=et.parameters)==null?void 0:Nt.docs,source:{originalSource:`{
|
|
106
|
+
args: {
|
|
107
|
+
data: (() => {
|
|
108
|
+
const dates = generateDateRange(30);
|
|
109
|
+
return {
|
|
110
|
+
dates,
|
|
111
|
+
Weight: dates.map((_, i) => 70 + Math.sin(i / 5) * 2 + Math.random())
|
|
112
|
+
};
|
|
113
|
+
})(),
|
|
114
|
+
width: 800,
|
|
115
|
+
height: 300,
|
|
116
|
+
defaultViewType: 'daily',
|
|
117
|
+
periodType: 'month',
|
|
118
|
+
habitColors: {
|
|
119
|
+
Weight: '#3b82f6'
|
|
120
|
+
},
|
|
121
|
+
habitEmojis: {
|
|
122
|
+
Weight: '⚖️'
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
}`,...(Vt=(It=et.parameters)==null?void 0:It.docs)==null?void 0:Vt.source}}};const _a=["DailyHabits","WeeklyAverages","YearlyOverview","SingleHabit"];export{J as DailyHabits,et as SingleHabit,Z as WeeklyAverages,tt as YearlyOverview,_a as __namedExportsOrder,xa as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as y,j as W}from"./iframe-
|
|
1
|
+
import{r as y,j as W}from"./iframe-ClorXKAj.js";import{R as D,P as G,M as U}from"./Mesh-CwXV3WjE.js";import{T as z}from"./Triangle-64ffRKNB.js";import"./preload-helper-C1FmrZbK.js";const j={"radar-container":"_radar-container_51ksp_1"};function L(n){const o=n.replace("#","");return[parseInt(o.slice(0,2),16)/255,parseInt(o.slice(2,4),16)/255,parseInt(o.slice(4,6),16)/255]}const N=`
|
|
2
2
|
attribute vec2 uv;
|
|
3
3
|
attribute vec2 position;
|
|
4
4
|
varying vec2 vUv;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
._container_7142v_1{display:flex;flex-direction:column;align-items:center;gap:var(--spacing-sm);width:100%;position:relative}._clockWrap_7142v_10{width:100%;display:flex;justify-content:center}._tooltip_7142v_16{position:absolute;pointer-events:none;background:var(--color-background);border:1px solid var(--color-border);border-radius:var(--radius-sm);padding:var(--spacing-xs) var(--spacing-sm);box-shadow:var(--shadow-md);font-size:var(--font-size-xs);color:var(--color-text);white-space:nowrap;z-index:10;opacity:0;transition:opacity .15s ease}._tooltip_7142v_16._visible_7142v_32{opacity:1}._tooltipLabel_7142v_36{font-weight:600;margin-bottom:2px}._tooltipRow_7142v_41{color:var(--color-text-secondary);font-size:var(--font-size-xs)}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import{r as u,j as k}from"./iframe-ClorXKAj.js";import{s as it,c as ct}from"./transform-DaumkFRH.js";import{a as lt}from"./arc--Q2xWRUA.js";import{i as dt}from"./value-CMZJhU-O.js";import"./preload-helper-C1FmrZbK.js";import"./path-CSVzDSO0.js";const ut="_container_7142v_1",pt="_clockWrap_7142v_10",mt="_tooltip_7142v_16",yt="_visible_7142v_32",ft="_tooltipLabel_7142v_36",ht="_tooltipRow_7142v_41",p={container:ut,clockWrap:pt,tooltip:mt,visible:yt,tooltipLabel:ft,tooltipRow:ht},G=t=>{const a=Math.floor(t),b=Math.floor((t-a)*60);return`${String(a).padStart(2,"0")}:${String(b).padStart(2,"0")}`},gt=t=>{const a=Math.round(t*60);return a<60?`${a}m`:`${Math.floor(a/60)}h ${a%60}m`},et=({rings:t,showNowHand:a=!0,centerTopLabel:b,centerMainLabel:w,size:_,minSize:N=280,maxSize:O=560})=>{const S=u.useRef(null),j=u.useRef(null),z=u.useRef(null),[ot,at]=u.useState(380),x=_??ot;u.useEffect(()=>{if(_)return;const n=S.current;if(!n)return;const f=new ResizeObserver(c=>{for(const H of c){const{width:h}=H.contentRect;h>0&&at(Math.max(N,Math.min(O,h)))}});return f.observe(n),()=>f.disconnect()},[_,N,O]);const q=u.useCallback((n,f)=>{const c=z.current,H=S.current;if(!c||!H)return;const h=H.getBoundingClientRect();c.style.left=`${n.clientX-h.left+12}px`,c.style.top=`${n.clientY-h.top-10}px`,c.innerHTML=f,c.classList.add(p.visible)},[]),W=u.useCallback(()=>{var n;(n=z.current)==null||n.classList.remove(p.visible)},[]);return u.useEffect(()=>{if(!j.current||t.length===0)return;const n=it(j.current);n.selectAll("*").remove();const f=x,c=x,H=f/2,h=c/2,g=x/2-28,l=n.attr("width",f).attr("height",c).append("g").attr("transform",`translate(${H},${h})`),A=getComputedStyle(document.documentElement),st=A.getPropertyValue("--color-text-secondary").trim()||"#888",P=A.getPropertyValue("--color-text-muted").trim()||"#aaa",D=A.getPropertyValue("--color-border").trim()||"rgba(128,128,128,0.2)",R=r=>r/24*Math.PI*2;l.append("circle").attr("r",g+8).attr("fill","none").attr("stroke",D).attr("stroke-width",1);const V=46,Y=2,C=t.length,B=(g-V-Y*(C-1))/C;t.forEach((r,o)=>{const s=g-o*(B+Y),d=s-B,M=r.opacity!==void 0?r.opacity:o===0?1:Math.max(.1,.85-o/C*.85),v=lt().innerRadius(d).outerRadius(s).startAngle(e=>R(e.startHour)).endAngle(e=>R(e.endHour)).cornerRadius(2);l.selectAll(`.ring-${o}`).data(r.arcs).join("path").attr("class",`ring-${o}`).attr("fill",e=>e.color).attr("opacity",0).attr("stroke","var(--color-background)").attr("stroke-width",.6).style("cursor","pointer").on("mousemove",function(e,i){const E=gt(i.endHour-i.startHour),nt=`${i.emoji??""} ${i.label??""}${i.description?` — ${i.description}`:""}`.trim();q(e,`<div class="${p.tooltipLabel}">${nt||"·"}</div><div class="${p.tooltipRow}">${r.dayLabel} · ${G(i.startHour)} → ${G(i.endHour)}</div><div class="${p.tooltipRow}">${E}${i.isActive?" · running":""}</div>`)}).on("mouseleave",W).attr("d",e=>v({...e,endHour:e.startHour})).transition().delay(e=>e.startHour/24*600+o*80).duration(550).ease(ct).attr("opacity",M).attrTween("d",function(e){const i=dt(e.startHour,e.endHour);return E=>v({...e,endHour:i(E)})||""})});for(let r=0;r<24;r++){const o=R(r)-Math.PI/2,s=r%3===0,d=g+2,M=g+(s?9:5);if(l.append("line").attr("x1",Math.cos(o)*d).attr("y1",Math.sin(o)*d).attr("x2",Math.cos(o)*M).attr("y2",Math.sin(o)*M).attr("stroke",s?st:D).attr("stroke-width",s?2:1),s){const v=g+22;l.append("text").attr("x",Math.cos(o)*v).attr("y",Math.sin(o)*v).attr("text-anchor","middle").attr("dominant-baseline","middle").attr("fill",P).attr("font-size","11px").attr("font-weight",600).text(String(r).padStart(2,"0"))}}if(l.append("circle").attr("r",V-2).attr("fill","var(--color-background-secondary)").attr("stroke",D).attr("stroke-width",1),b&&l.append("text").attr("text-anchor","middle").attr("y",w?-6:4).attr("fill",P).attr("font-size","10px").attr("letter-spacing","1.5px").text(b),w&&l.append("text").attr("text-anchor","middle").attr("y",b?14:4).attr("fill","var(--color-text)").attr("font-size","18px").attr("font-weight",700).text(w),a){const r=new Date,o=r.getHours()+r.getMinutes()/60,s=R(o)-Math.PI/2,d=g+6;l.append("line").attr("x1",0).attr("y1",0).attr("x2",Math.cos(s)*d).attr("y2",Math.sin(s)*d).attr("stroke","var(--color-error)").attr("stroke-width",2.5).attr("stroke-linecap","round").style("opacity",0).transition().delay(800).duration(300).style("opacity",1),l.append("circle").attr("cx",Math.cos(s)*d).attr("cy",Math.sin(s)*d).attr("r",4).attr("fill","var(--color-error)").style("opacity",0).transition().delay(800).duration(300).style("opacity",1),l.append("circle").attr("r",5).attr("fill","var(--color-error)").attr("stroke","var(--color-background)").attr("stroke-width",1.5).style("opacity",0).transition().delay(800).duration(300).style("opacity",1)}},[x,t,b,w,a,q,W]),k.jsxs("div",{className:p.container,ref:S,children:[k.jsx("div",{className:p.clockWrap,children:k.jsx("svg",{ref:j})}),k.jsx("div",{ref:z,className:p.tooltip})]})};et.__docgenInfo={description:"",methods:[],displayName:"RadialDayChart",props:{rings:{required:!0,tsType:{name:"Array",elements:[{name:"RadialRing"}],raw:"RadialRing[]"},description:'Index 0 is the outermost ring (typically "today")'},showNowHand:{required:!1,tsType:{name:"boolean"},description:"",defaultValue:{value:"true",computed:!1}},centerTopLabel:{required:!1,tsType:{name:"string"},description:""},centerMainLabel:{required:!1,tsType:{name:"string"},description:""},size:{required:!1,tsType:{name:"number"},description:"Override the size; otherwise the chart fills its container up to maxSize"},minSize:{required:!1,tsType:{name:"number"},description:"",defaultValue:{value:"280",computed:!1}},maxSize:{required:!1,tsType:{name:"number"},description:"",defaultValue:{value:"560",computed:!1}}}};const kt={title:"Organisms/Charts/RadialDayChart",component:et,parameters:{layout:"centered"}},m={work:"#6366f1",sleep:"#1e293b",eat:"#f59e0b",sport:"#10b981",read:"#8b5cf6"},y=[{startHour:0,endHour:7.5,color:m.sleep,label:"Sleep",emoji:"😴"},{startHour:7.5,endHour:8,color:m.eat,label:"Breakfast",emoji:"🥐"},{startHour:9,endHour:12.5,color:m.work,label:"Deep work",emoji:"💼"},{startHour:13,endHour:13.75,color:m.eat,label:"Lunch",emoji:"🍝"},{startHour:14,endHour:17,color:m.work,label:"Meetings",emoji:"💼"},{startHour:18,endHour:19,color:m.sport,label:"Run",emoji:"🏃"},{startHour:19.5,endHour:20.5,color:m.eat,label:"Dinner",emoji:"🍣"},{startHour:21,endHour:23,color:m.read,label:"Reading",emoji:"📚"}],rt=[{dayLabel:"Today",arcs:y},{dayLabel:"Yesterday",arcs:y.map(t=>({...t,startHour:t.startHour-.4,endHour:t.endHour-.2}))},{dayLabel:"2 days ago",arcs:y.map(t=>({...t,startHour:t.startHour+.5,endHour:t.endHour+.3}))},{dayLabel:"3 days ago",arcs:y.slice(0,4)},{dayLabel:"4 days ago",arcs:y.slice(2)},{dayLabel:"5 days ago",arcs:y.filter((t,a)=>a%2===0)},{dayLabel:"6 days ago",arcs:y.slice(0,6)}],L={args:{rings:rt,centerTopLabel:"TODAY",centerMainLabel:"11h 30m",size:460}},T={args:{rings:[{dayLabel:"Today",arcs:y}],centerTopLabel:"TODAY",centerMainLabel:"11h 30m",size:380}},$={args:{rings:rt,showNowHand:!1,centerTopLabel:"WEEK",centerMainLabel:"78h",size:460}};var K,I,X;L.parameters={...L.parameters,docs:{...(K=L.parameters)==null?void 0:K.docs,source:{originalSource:`{
|
|
2
|
+
args: {
|
|
3
|
+
rings,
|
|
4
|
+
centerTopLabel: 'TODAY',
|
|
5
|
+
centerMainLabel: '11h 30m',
|
|
6
|
+
size: 460
|
|
7
|
+
}
|
|
8
|
+
}`,...(X=(I=L.parameters)==null?void 0:I.docs)==null?void 0:X.source}}};var F,J,Q;T.parameters={...T.parameters,docs:{...(F=T.parameters)==null?void 0:F.docs,source:{originalSource:`{
|
|
9
|
+
args: {
|
|
10
|
+
rings: [{
|
|
11
|
+
dayLabel: 'Today',
|
|
12
|
+
arcs: todayArcs
|
|
13
|
+
}],
|
|
14
|
+
centerTopLabel: 'TODAY',
|
|
15
|
+
centerMainLabel: '11h 30m',
|
|
16
|
+
size: 380
|
|
17
|
+
}
|
|
18
|
+
}`,...(Q=(J=T.parameters)==null?void 0:J.docs)==null?void 0:Q.source}}};var U,Z,tt;$.parameters={...$.parameters,docs:{...(U=$.parameters)==null?void 0:U.docs,source:{originalSource:`{
|
|
19
|
+
args: {
|
|
20
|
+
rings,
|
|
21
|
+
showNowHand: false,
|
|
22
|
+
centerTopLabel: 'WEEK',
|
|
23
|
+
centerMainLabel: '78h',
|
|
24
|
+
size: 460
|
|
25
|
+
}
|
|
26
|
+
}`,...(tt=(Z=$.parameters)==null?void 0:Z.docs)==null?void 0:tt.source}}};const Lt=["Default","SingleDay","NoNowHand"];export{L as Default,$ as NoNowHand,T as SingleDay,Lt as __namedExportsOrder,kt as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as B,j as b}from"./iframe-BTbLpgFM.js";import{C as Tt}from"./Checkbox-CJhut6rk.js";import{N as fe}from"./NumberStepper-DpOu7xmF.js";import{S as Le}from"./SelectInput-C94OHQIl.js";import"./preload-helper-C1FmrZbK.js";import"./useSound-OlKqgJtL.js";import"./proxy-DHiOkbBq.js";import"./MotionConfigContext-BWFxZgdN.js";import"./index-Dnnp7mc9.js";import"./chevron-down-rAxqUK0f.js";import"./createLucideIcon-CanksmPJ.js";var pe=["MO","TU","WE","TH","FR","SA","SU"],O=function(){function t(e,r){if(r===0)throw new Error("Can't create weekday with n == 0");this.weekday=e,this.n=r}return t.fromStr=function(e){return new t(pe.indexOf(e))},t.prototype.nth=function(e){return this.n===e?this:new t(this.weekday,e)},t.prototype.equals=function(e){return this.weekday===e.weekday&&this.n===e.n},t.prototype.toString=function(){var e=pe[this.weekday];return this.n&&(e=(this.n>0?"+":"")+String(this.n)+e),e},t.prototype.getJsWeekday=function(){return this.weekday===6?0:this.weekday+1},t}(),Y=function(t){return t!=null},_=function(t){return typeof t=="number"},Oe=function(t){return typeof t=="string"&&pe.includes(t)},S=Array.isArray,W=function(t,e){e===void 0&&(e=t),arguments.length===1&&(e=t,t=0);for(var r=[],n=t;n<e;n++)r.push(n);return r},w=function(t,e){var r=0,n=[];if(S(t))for(;r<e;r++)n[r]=[].concat(t);else for(;r<e;r++)n[r]=t;return n},Yt=function(t){return S(t)?t:[t]};function z(t,e,r){r===void 0&&(r=" ");var n=String(t);return e=e>>0,n.length>e?String(n):(e=e-n.length,e>r.length&&(r+=w(r,e/r.length)),r.slice(0,e)+String(n))}var xt=function(t,e,r){var n=t.split(e);return r?n.slice(0,r).concat([n.slice(r).join(e)]):n},N=function(t,e){var r=t%e;return r*e<0?r+e:r},de=function(t,e){return{div:Math.floor(t/e),mod:N(t,e)}},I=function(t){return!Y(t)||t.length===0},D=function(t){return!I(t)},g=function(t,e){return D(t)&&t.indexOf(e)!==-1},K=function(t,e,r,n,a,i){return n===void 0&&(n=0),a===void 0&&(a=0),i===void 0&&(i=0),new Date(Date.UTC(t,e-1,r,n,a,i))},Dt=[31,28,31,30,31,30,31,31,30,31,30,31],ft=1e3*60*60*24,dt=9999,yt=K(1970,1,1),Mt=[6,0,1,2,3,4,5],V=function(t){return t%4===0&&t%100!==0||t%400===0},pt=function(t){return t instanceof Date},X=function(t){return pt(t)&&!isNaN(t.getTime())},Lt=function(t,e){var r=t.getTime(),n=e.getTime(),a=r-n;return Math.round(a/ft)},me=function(t){return Lt(t,yt)},mt=function(t){return new Date(yt.getTime()+t*ft)},Ot=function(t){var e=t.getUTCMonth();return e===1&&V(t.getUTCFullYear())?29:Dt[e]},Q=function(t){return Mt[t.getUTCDay()]},Se=function(t,e){var r=K(t,e+1,1);return[Q(r),Ot(r)]},bt=function(t,e){return e=e||t,new Date(Date.UTC(t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()))},be=function(t){var e=new Date(t.getTime());return e},Ae=function(t){for(var e=[],r=0;r<t.length;r++)e.push(be(t[r]));return e},ee=function(t){t.sort(function(e,r){return e.getTime()-r.getTime()})},ke=function(t,e){e===void 0&&(e=!0);var r=new Date(t);return[z(r.getUTCFullYear().toString(),4,"0"),z(r.getUTCMonth()+1,2,"0"),z(r.getUTCDate(),2,"0"),"T",z(r.getUTCHours(),2,"0"),z(r.getUTCMinutes(),2,"0"),z(r.getUTCSeconds(),2,"0"),e?"Z":""].join("")},ge=function(t){var e=/^(\d{4})(\d{2})(\d{2})(T(\d{2})(\d{2})(\d{2})Z?)?$/,r=e.exec(t);if(!r)throw new Error("Invalid UNTIL value: ".concat(t));return new Date(Date.UTC(parseInt(r[1],10),parseInt(r[2],10)-1,parseInt(r[3],10),parseInt(r[5],10)||0,parseInt(r[6],10)||0,parseInt(r[7],10)||0))},Ne=function(t,e){var r=t.toLocaleString("sv-SE",{timeZone:e});return r.replace(" ","T")+"Z"},St=function(t,e){var r=Intl.DateTimeFormat().resolvedOptions().timeZone,n=new Date(Ne(t,r)),a=new Date(Ne(t,e??"UTC")),i=a.getTime()-n.getTime();return new Date(t.getTime()-i)},Z=function(){function t(e,r){this.minDate=null,this.maxDate=null,this._result=[],this.total=0,this.method=e,this.args=r,e==="between"?(this.maxDate=r.inc?r.before:new Date(r.before.getTime()-1),this.minDate=r.inc?r.after:new Date(r.after.getTime()+1)):e==="before"?this.maxDate=r.inc?r.dt:new Date(r.dt.getTime()-1):e==="after"&&(this.minDate=r.inc?r.dt:new Date(r.dt.getTime()+1))}return t.prototype.accept=function(e){++this.total;var r=this.minDate&&e<this.minDate,n=this.maxDate&&e>this.maxDate;if(this.method==="between"){if(r)return!0;if(n)return!1}else if(this.method==="before"){if(n)return!1}else if(this.method==="after")return r?!0:(this.add(e),!1);return this.add(e)},t.prototype.add=function(e){return this._result.push(e),!0},t.prototype.getValue=function(){var e=this._result;switch(this.method){case"all":case"between":return e;case"before":case"after":default:return e.length?e[e.length-1]:null}},t.prototype.clone=function(){return new t(this.method,this.args)},t}(),ve=function(t,e){return ve=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(r[a]=n[a])},ve(t,e)};function Te(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");ve(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}var A=function(){return A=Object.assign||function(e){for(var r,n=1,a=arguments.length;n<a;n++){r=arguments[n];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(e[i]=r[i])}return e},A.apply(this,arguments)};function h(t,e,r){if(r||arguments.length===2)for(var n=0,a=e.length,i;n<a;n++)(i||!(n in e))&&(i||(i=Array.prototype.slice.call(e,0,n)),i[n]=e[n]);return t.concat(i||Array.prototype.slice.call(e))}var Re=function(t){Te(e,t);function e(r,n,a){var i=t.call(this,r,n)||this;return i.iterator=a,i}return e.prototype.add=function(r){return this.iterator(r,this._result.length)?(this._result.push(r),!0):!1},e}(Z),oe={dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],tokens:{SKIP:/^[ \r\n\t]+|^\.$/,number:/^[1-9][0-9]*/,numberAsText:/^(one|two|three)/i,every:/^every/i,"day(s)":/^days?/i,"weekday(s)":/^weekdays?/i,"week(s)":/^weeks?/i,"hour(s)":/^hours?/i,"minute(s)":/^minutes?/i,"month(s)":/^months?/i,"year(s)":/^years?/i,on:/^(on|in)/i,at:/^(at)/i,the:/^the/i,first:/^first/i,second:/^second/i,third:/^third/i,nth:/^([1-9][0-9]*)(\.|th|nd|rd|st)/i,last:/^last/i,for:/^for/i,"time(s)":/^times?/i,until:/^(un)?til/i,monday:/^mo(n(day)?)?/i,tuesday:/^tu(e(s(day)?)?)?/i,wednesday:/^we(d(n(esday)?)?)?/i,thursday:/^th(u(r(sday)?)?)?/i,friday:/^fr(i(day)?)?/i,saturday:/^sa(t(urday)?)?/i,sunday:/^su(n(day)?)?/i,january:/^jan(uary)?/i,february:/^feb(ruary)?/i,march:/^mar(ch)?/i,april:/^apr(il)?/i,may:/^may/i,june:/^june?/i,july:/^july?/i,august:/^aug(ust)?/i,september:/^sep(t(ember)?)?/i,october:/^oct(ober)?/i,november:/^nov(ember)?/i,december:/^dec(ember)?/i,comma:/^(,\s*|(and|or)\s*)+/i}},Ue=function(t,e){return t.indexOf(e)!==-1},At=function(t){return t.toString()},Nt=function(t,e,r){return"".concat(e," ").concat(r,", ").concat(t)},H=function(){function t(e,r,n,a){if(r===void 0&&(r=At),n===void 0&&(n=oe),a===void 0&&(a=Nt),this.text=[],this.language=n||oe,this.gettext=r,this.dateFormatter=a,this.rrule=e,this.options=e.options,this.origOptions=e.origOptions,this.origOptions.bymonthday){var i=[].concat(this.options.bymonthday),s=[].concat(this.options.bynmonthday);i.sort(function(l,d){return l-d}),s.sort(function(l,d){return d-l}),this.bymonthday=i.concat(s),this.bymonthday.length||(this.bymonthday=null)}if(Y(this.origOptions.byweekday)){var o=S(this.origOptions.byweekday)?this.origOptions.byweekday:[this.origOptions.byweekday],u=String(o);this.byweekday={allWeeks:o.filter(function(l){return!l.n}),someWeeks:o.filter(function(l){return!!l.n}),isWeekdays:u.indexOf("MO")!==-1&&u.indexOf("TU")!==-1&&u.indexOf("WE")!==-1&&u.indexOf("TH")!==-1&&u.indexOf("FR")!==-1&&u.indexOf("SA")===-1&&u.indexOf("SU")===-1,isEveryDay:u.indexOf("MO")!==-1&&u.indexOf("TU")!==-1&&u.indexOf("WE")!==-1&&u.indexOf("TH")!==-1&&u.indexOf("FR")!==-1&&u.indexOf("SA")!==-1&&u.indexOf("SU")!==-1};var f=function(l,d){return l.weekday-d.weekday};this.byweekday.allWeeks.sort(f),this.byweekday.someWeeks.sort(f),this.byweekday.allWeeks.length||(this.byweekday.allWeeks=null),this.byweekday.someWeeks.length||(this.byweekday.someWeeks=null)}else this.byweekday=null}return t.isFullyConvertible=function(e){var r=!0;if(!(e.options.freq in t.IMPLEMENTED)||e.origOptions.until&&e.origOptions.count)return!1;for(var n in e.origOptions){if(Ue(["dtstart","tzid","wkst","freq"],n))return!0;if(!Ue(t.IMPLEMENTED[e.options.freq],n))return!1}return r},t.prototype.isFullyConvertible=function(){return t.isFullyConvertible(this.rrule)},t.prototype.toString=function(){var e=this.gettext;if(!(this.options.freq in t.IMPLEMENTED))return e("RRule error: Unable to fully convert this rrule to text");if(this.text=[e("every")],this[y.FREQUENCIES[this.options.freq]](),this.options.until){this.add(e("until"));var r=this.options.until;this.add(this.dateFormatter(r.getUTCFullYear(),this.language.monthNames[r.getUTCMonth()],r.getUTCDate()))}else this.options.count&&this.add(e("for")).add(this.options.count.toString()).add(this.plural(this.options.count)?e("times"):e("time"));return this.isFullyConvertible()||this.add(e("(~ approximate)")),this.text.join("")},t.prototype.HOURLY=function(){var e=this.gettext;this.options.interval!==1&&this.add(this.options.interval.toString()),this.add(this.plural(this.options.interval)?e("hours"):e("hour"))},t.prototype.MINUTELY=function(){var e=this.gettext;this.options.interval!==1&&this.add(this.options.interval.toString()),this.add(this.plural(this.options.interval)?e("minutes"):e("minute"))},t.prototype.DAILY=function(){var e=this.gettext;this.options.interval!==1&&this.add(this.options.interval.toString()),this.byweekday&&this.byweekday.isWeekdays?this.add(this.plural(this.options.interval)?e("weekdays"):e("weekday")):this.add(this.plural(this.options.interval)?e("days"):e("day")),this.origOptions.bymonth&&(this.add(e("in")),this._bymonth()),this.bymonthday?this._bymonthday():this.byweekday?this._byweekday():this.origOptions.byhour&&this._byhour()},t.prototype.WEEKLY=function(){var e=this.gettext;this.options.interval!==1&&this.add(this.options.interval.toString()).add(this.plural(this.options.interval)?e("weeks"):e("week")),this.byweekday&&this.byweekday.isWeekdays?this.options.interval===1?this.add(this.plural(this.options.interval)?e("weekdays"):e("weekday")):this.add(e("on")).add(e("weekdays")):this.byweekday&&this.byweekday.isEveryDay?this.add(this.plural(this.options.interval)?e("days"):e("day")):(this.options.interval===1&&this.add(e("week")),this.origOptions.bymonth&&(this.add(e("in")),this._bymonth()),this.bymonthday?this._bymonthday():this.byweekday&&this._byweekday(),this.origOptions.byhour&&this._byhour())},t.prototype.MONTHLY=function(){var e=this.gettext;this.origOptions.bymonth?(this.options.interval!==1&&(this.add(this.options.interval.toString()).add(e("months")),this.plural(this.options.interval)&&this.add(e("in"))),this._bymonth()):(this.options.interval!==1&&this.add(this.options.interval.toString()),this.add(this.plural(this.options.interval)?e("months"):e("month"))),this.bymonthday?this._bymonthday():this.byweekday&&this.byweekday.isWeekdays?this.add(e("on")).add(e("weekdays")):this.byweekday&&this._byweekday()},t.prototype.YEARLY=function(){var e=this.gettext;this.origOptions.bymonth?(this.options.interval!==1&&(this.add(this.options.interval.toString()),this.add(e("years"))),this._bymonth()):(this.options.interval!==1&&this.add(this.options.interval.toString()),this.add(this.plural(this.options.interval)?e("years"):e("year"))),this.bymonthday?this._bymonthday():this.byweekday&&this._byweekday(),this.options.byyearday&&this.add(e("on the")).add(this.list(this.options.byyearday,this.nth,e("and"))).add(e("day")),this.options.byweekno&&this.add(e("in")).add(this.plural(this.options.byweekno.length)?e("weeks"):e("week")).add(this.list(this.options.byweekno,void 0,e("and")))},t.prototype._bymonthday=function(){var e=this.gettext;this.byweekday&&this.byweekday.allWeeks?this.add(e("on")).add(this.list(this.byweekday.allWeeks,this.weekdaytext,e("or"))).add(e("the")).add(this.list(this.bymonthday,this.nth,e("or"))):this.add(e("on the")).add(this.list(this.bymonthday,this.nth,e("and")))},t.prototype._byweekday=function(){var e=this.gettext;this.byweekday.allWeeks&&!this.byweekday.isWeekdays&&this.add(e("on")).add(this.list(this.byweekday.allWeeks,this.weekdaytext)),this.byweekday.someWeeks&&(this.byweekday.allWeeks&&this.add(e("and")),this.add(e("on the")).add(this.list(this.byweekday.someWeeks,this.weekdaytext,e("and"))))},t.prototype._byhour=function(){var e=this.gettext;this.add(e("at")).add(this.list(this.origOptions.byhour,void 0,e("and")))},t.prototype._bymonth=function(){this.add(this.list(this.options.bymonth,this.monthtext,this.gettext("and")))},t.prototype.nth=function(e){e=parseInt(e.toString(),10);var r,n=this.gettext;if(e===-1)return n("last");var a=Math.abs(e);switch(a){case 1:case 21:case 31:r=a+n("st");break;case 2:case 22:r=a+n("nd");break;case 3:case 23:r=a+n("rd");break;default:r=a+n("th")}return e<0?r+" "+n("last"):r},t.prototype.monthtext=function(e){return this.language.monthNames[e-1]},t.prototype.weekdaytext=function(e){var r=_(e)?(e+1)%7:e.getJsWeekday();return(e.n?this.nth(e.n)+" ":"")+this.language.dayNames[r]},t.prototype.plural=function(e){return e%100!==1},t.prototype.add=function(e){return this.text.push(" "),this.text.push(e),this},t.prototype.list=function(e,r,n,a){var i=this;a===void 0&&(a=","),S(e)||(e=[e]);var s=function(u,f,l){for(var d="",c=0;c<u.length;c++)c!==0&&(c===u.length-1?d+=" "+l+" ":d+=f+" "),d+=u[c];return d};r=r||function(u){return u.toString()};var o=function(u){return r&&r.call(i,u)};return n?s(e.map(o),a,n):e.map(o).join(a+" ")},t}(),Rt=function(){function t(e){this.done=!0,this.rules=e}return t.prototype.start=function(e){return this.text=e,this.done=!1,this.nextSymbol()},t.prototype.isDone=function(){return this.done&&this.symbol===null},t.prototype.nextSymbol=function(){var e,r;this.symbol=null,this.value=null;do{if(this.done)return!1;var n=void 0;e=null;for(var a in this.rules){n=this.rules[a];var i=n.exec(this.text);i&&(e===null||i[0].length>e[0].length)&&(e=i,r=a)}if(e!=null&&(this.text=this.text.substr(e[0].length),this.text===""&&(this.done=!0)),e==null){this.done=!0,this.symbol=null,this.value=null;return}}while(r==="SKIP");return this.symbol=r,this.value=e,!0},t.prototype.accept=function(e){if(this.symbol===e){if(this.value){var r=this.value;return this.nextSymbol(),r}return this.nextSymbol(),!0}return!1},t.prototype.acceptNumber=function(){return this.accept("number")},t.prototype.expect=function(e){if(this.accept(e))return!0;throw new Error("expected "+e+" but found "+this.symbol)},t}();function vt(t,e){e===void 0&&(e=oe);var r={},n=new Rt(e.tokens);if(!n.start(t))return null;return a(),r;function a(){n.expect("every");var c=n.acceptNumber();if(c&&(r.interval=parseInt(c[0],10)),n.isDone())throw new Error("Unexpected end");switch(n.symbol){case"day(s)":r.freq=y.DAILY,n.nextSymbol()&&(s(),d());break;case"weekday(s)":r.freq=y.WEEKLY,r.byweekday=[y.MO,y.TU,y.WE,y.TH,y.FR],n.nextSymbol(),s(),d();break;case"week(s)":r.freq=y.WEEKLY,n.nextSymbol()&&(i(),s(),d());break;case"hour(s)":r.freq=y.HOURLY,n.nextSymbol()&&(i(),d());break;case"minute(s)":r.freq=y.MINUTELY,n.nextSymbol()&&(i(),d());break;case"month(s)":r.freq=y.MONTHLY,n.nextSymbol()&&(i(),d());break;case"year(s)":r.freq=y.YEARLY,n.nextSymbol()&&(i(),d());break;case"monday":case"tuesday":case"wednesday":case"thursday":case"friday":case"saturday":case"sunday":r.freq=y.WEEKLY;var p=n.symbol.substr(0,2).toUpperCase();if(r.byweekday=[y[p]],!n.nextSymbol())return;for(;n.accept("comma");){if(n.isDone())throw new Error("Unexpected end");var m=u();if(!m)throw new Error("Unexpected symbol "+n.symbol+", expected weekday");r.byweekday.push(y[m]),n.nextSymbol()}s(),l(),d();break;case"january":case"february":case"march":case"april":case"may":case"june":case"july":case"august":case"september":case"october":case"november":case"december":if(r.freq=y.YEARLY,r.bymonth=[o()],!n.nextSymbol())return;for(;n.accept("comma");){if(n.isDone())throw new Error("Unexpected end");var k=o();if(!k)throw new Error("Unexpected symbol "+n.symbol+", expected month");r.bymonth.push(k),n.nextSymbol()}i(),d();break;default:throw new Error("Unknown symbol")}}function i(){var c=n.accept("on"),p=n.accept("the");if(c||p)do{var m=f(),k=u(),v=o();if(m)k?(n.nextSymbol(),r.byweekday||(r.byweekday=[]),r.byweekday.push(y[k].nth(m))):(r.bymonthday||(r.bymonthday=[]),r.bymonthday.push(m),n.accept("day(s)"));else if(k)n.nextSymbol(),r.byweekday||(r.byweekday=[]),r.byweekday.push(y[k]);else if(n.symbol==="weekday(s)")n.nextSymbol(),r.byweekday||(r.byweekday=[y.MO,y.TU,y.WE,y.TH,y.FR]);else if(n.symbol==="week(s)"){n.nextSymbol();var T=n.acceptNumber();if(!T)throw new Error("Unexpected symbol "+n.symbol+", expected week number");for(r.byweekno=[parseInt(T[0],10)];n.accept("comma");){if(T=n.acceptNumber(),!T)throw new Error("Unexpected symbol "+n.symbol+"; expected monthday");r.byweekno.push(parseInt(T[0],10))}}else if(v)n.nextSymbol(),r.bymonth||(r.bymonth=[]),r.bymonth.push(v);else return}while(n.accept("comma")||n.accept("the")||n.accept("on"))}function s(){var c=n.accept("at");if(c)do{var p=n.acceptNumber();if(!p)throw new Error("Unexpected symbol "+n.symbol+", expected hour");for(r.byhour=[parseInt(p[0],10)];n.accept("comma");){if(p=n.acceptNumber(),!p)throw new Error("Unexpected symbol "+n.symbol+"; expected hour");r.byhour.push(parseInt(p[0],10))}}while(n.accept("comma")||n.accept("at"))}function o(){switch(n.symbol){case"january":return 1;case"february":return 2;case"march":return 3;case"april":return 4;case"may":return 5;case"june":return 6;case"july":return 7;case"august":return 8;case"september":return 9;case"october":return 10;case"november":return 11;case"december":return 12;default:return!1}}function u(){switch(n.symbol){case"monday":case"tuesday":case"wednesday":case"thursday":case"friday":case"saturday":case"sunday":return n.symbol.substr(0,2).toUpperCase();default:return!1}}function f(){switch(n.symbol){case"last":return n.nextSymbol(),-1;case"first":return n.nextSymbol(),1;case"second":return n.nextSymbol(),n.accept("last")?-2:2;case"third":return n.nextSymbol(),n.accept("last")?-3:3;case"nth":var c=parseInt(n.value[1],10);if(c<-366||c>366)throw new Error("Nth out of range: "+c);return n.nextSymbol(),n.accept("last")?-c:c;default:return!1}}function l(){n.accept("on"),n.accept("the");var c=f();if(c)for(r.bymonthday=[c],n.nextSymbol();n.accept("comma");){if(c=f(),!c)throw new Error("Unexpected symbol "+n.symbol+"; expected monthday");r.bymonthday.push(c),n.nextSymbol()}}function d(){if(n.symbol==="until"){var c=Date.parse(n.text);if(!c)throw new Error("Cannot parse until date:"+n.text);r.until=new Date(c)}else n.accept("for")&&(r.count=parseInt(n.value[0],10),n.expect("number"))}}var E;(function(t){t[t.YEARLY=0]="YEARLY",t[t.MONTHLY=1]="MONTHLY",t[t.WEEKLY=2]="WEEKLY",t[t.DAILY=3]="DAILY",t[t.HOURLY=4]="HOURLY",t[t.MINUTELY=5]="MINUTELY",t[t.SECONDLY=6]="SECONDLY"})(E||(E={}));function Ye(t){return t<E.HOURLY}var Ut=function(t,e){return e===void 0&&(e=oe),new y(vt(t,e)||void 0)},$=["count","until","interval","byweekday","bymonthday","bymonth"];H.IMPLEMENTED=[];H.IMPLEMENTED[E.HOURLY]=$;H.IMPLEMENTED[E.MINUTELY]=$;H.IMPLEMENTED[E.DAILY]=["byhour"].concat($);H.IMPLEMENTED[E.WEEKLY]=$;H.IMPLEMENTED[E.MONTHLY]=$;H.IMPLEMENTED[E.YEARLY]=["byweekno","byyearday"].concat($);var _t=function(t,e,r,n){return new H(t,e,r,n).toString()},It=H.isFullyConvertible,ue=function(){function t(e,r,n,a){this.hour=e,this.minute=r,this.second=n,this.millisecond=a||0}return t.prototype.getHours=function(){return this.hour},t.prototype.getMinutes=function(){return this.minute},t.prototype.getSeconds=function(){return this.second},t.prototype.getMilliseconds=function(){return this.millisecond},t.prototype.getTime=function(){return(this.hour*60*60+this.minute*60+this.second)*1e3+this.millisecond},t}(),Wt=function(t){Te(e,t);function e(r,n,a,i,s,o,u){var f=t.call(this,i,s,o,u)||this;return f.year=r,f.month=n,f.day=a,f}return e.fromDate=function(r){return new this(r.getUTCFullYear(),r.getUTCMonth()+1,r.getUTCDate(),r.getUTCHours(),r.getUTCMinutes(),r.getUTCSeconds(),r.valueOf()%1e3)},e.prototype.getWeekday=function(){return Q(new Date(this.getTime()))},e.prototype.getTime=function(){return new Date(Date.UTC(this.year,this.month-1,this.day,this.hour,this.minute,this.second,this.millisecond)).getTime()},e.prototype.getDay=function(){return this.day},e.prototype.getMonth=function(){return this.month},e.prototype.getYear=function(){return this.year},e.prototype.addYears=function(r){this.year+=r},e.prototype.addMonths=function(r){if(this.month+=r,this.month>12){var n=Math.floor(this.month/12),a=N(this.month,12);this.month=a,this.year+=n,this.month===0&&(this.month=12,--this.year)}},e.prototype.addWeekly=function(r,n){n>this.getWeekday()?this.day+=-(this.getWeekday()+1+(6-n))+r*7:this.day+=-(this.getWeekday()-n)+r*7,this.fixDay()},e.prototype.addDaily=function(r){this.day+=r,this.fixDay()},e.prototype.addHours=function(r,n,a){for(n&&(this.hour+=Math.floor((23-this.hour)/r)*r);;){this.hour+=r;var i=de(this.hour,24),s=i.div,o=i.mod;if(s&&(this.hour=o,this.addDaily(s)),I(a)||g(a,this.hour))break}},e.prototype.addMinutes=function(r,n,a,i){for(n&&(this.minute+=Math.floor((1439-(this.hour*60+this.minute))/r)*r);;){this.minute+=r;var s=de(this.minute,60),o=s.div,u=s.mod;if(o&&(this.minute=u,this.addHours(o,!1,a)),(I(a)||g(a,this.hour))&&(I(i)||g(i,this.minute)))break}},e.prototype.addSeconds=function(r,n,a,i,s){for(n&&(this.second+=Math.floor((86399-(this.hour*3600+this.minute*60+this.second))/r)*r);;){this.second+=r;var o=de(this.second,60),u=o.div,f=o.mod;if(u&&(this.second=f,this.addMinutes(u,!1,a,i)),(I(a)||g(a,this.hour))&&(I(i)||g(i,this.minute))&&(I(s)||g(s,this.second)))break}},e.prototype.fixDay=function(){if(!(this.day<=28)){var r=Se(this.year,this.month-1)[1];if(!(this.day<=r))for(;this.day>r;){if(this.day-=r,++this.month,this.month===13&&(this.month=1,++this.year,this.year>dt))return;r=Se(this.year,this.month-1)[1]}}},e.prototype.add=function(r,n){var a=r.freq,i=r.interval,s=r.wkst,o=r.byhour,u=r.byminute,f=r.bysecond;switch(a){case E.YEARLY:return this.addYears(i);case E.MONTHLY:return this.addMonths(i);case E.WEEKLY:return this.addWeekly(i,s);case E.DAILY:return this.addDaily(i);case E.HOURLY:return this.addHours(i,n,o);case E.MINUTELY:return this.addMinutes(i,n,o,u);case E.SECONDLY:return this.addSeconds(i,n,o,u,f)}},e}(ue);function wt(t){for(var e=[],r=Object.keys(t),n=0,a=r;n<a.length;n++){var i=a[n];g(dr,i)||e.push(i),pt(t[i])&&!X(t[i])&&e.push(i)}if(e.length)throw new Error("Invalid options: "+e.join(", "));return A({},t)}function Ct(t){var e=A(A({},xe),wt(t));if(Y(e.byeaster)&&(e.freq=y.YEARLY),!(Y(e.freq)&&y.FREQUENCIES[e.freq]))throw new Error("Invalid frequency: ".concat(e.freq," ").concat(t.freq));if(e.dtstart||(e.dtstart=new Date(new Date().setMilliseconds(0))),Y(e.wkst)?_(e.wkst)||(e.wkst=e.wkst.weekday):e.wkst=y.MO.weekday,Y(e.bysetpos)){_(e.bysetpos)&&(e.bysetpos=[e.bysetpos]);for(var r=0;r<e.bysetpos.length;r++){var n=e.bysetpos[r];if(n===0||!(n>=-366&&n<=366))throw new Error("bysetpos must be between 1 and 366, or between -366 and -1")}}if(!(e.byweekno||D(e.byweekno)||D(e.byyearday)||e.bymonthday||D(e.bymonthday)||Y(e.byweekday)||Y(e.byeaster)))switch(e.freq){case y.YEARLY:e.bymonth||(e.bymonth=e.dtstart.getUTCMonth()+1),e.bymonthday=e.dtstart.getUTCDate();break;case y.MONTHLY:e.bymonthday=e.dtstart.getUTCDate();break;case y.WEEKLY:e.byweekday=[Q(e.dtstart)];break}if(Y(e.bymonth)&&!S(e.bymonth)&&(e.bymonth=[e.bymonth]),Y(e.byyearday)&&!S(e.byyearday)&&_(e.byyearday)&&(e.byyearday=[e.byyearday]),!Y(e.bymonthday))e.bymonthday=[],e.bynmonthday=[];else if(S(e.bymonthday)){for(var a=[],i=[],r=0;r<e.bymonthday.length;r++){var n=e.bymonthday[r];n>0?a.push(n):n<0&&i.push(n)}e.bymonthday=a,e.bynmonthday=i}else e.bymonthday<0?(e.bynmonthday=[e.bymonthday],e.bymonthday=[]):(e.bynmonthday=[],e.bymonthday=[e.bymonthday]);if(Y(e.byweekno)&&!S(e.byweekno)&&(e.byweekno=[e.byweekno]),!Y(e.byweekday))e.bynweekday=null;else if(_(e.byweekday))e.byweekday=[e.byweekday],e.bynweekday=null;else if(Oe(e.byweekday))e.byweekday=[O.fromStr(e.byweekday).weekday],e.bynweekday=null;else if(e.byweekday instanceof O)!e.byweekday.n||e.freq>y.MONTHLY?(e.byweekday=[e.byweekday.weekday],e.bynweekday=null):(e.bynweekday=[[e.byweekday.weekday,e.byweekday.n]],e.byweekday=null);else{for(var s=[],o=[],r=0;r<e.byweekday.length;r++){var u=e.byweekday[r];if(_(u)){s.push(u);continue}else if(Oe(u)){s.push(O.fromStr(u).weekday);continue}!u.n||e.freq>y.MONTHLY?s.push(u.weekday):o.push([u.weekday,u.n])}e.byweekday=D(s)?s:null,e.bynweekday=D(o)?o:null}return Y(e.byhour)?_(e.byhour)&&(e.byhour=[e.byhour]):e.byhour=e.freq<y.HOURLY?[e.dtstart.getUTCHours()]:null,Y(e.byminute)?_(e.byminute)&&(e.byminute=[e.byminute]):e.byminute=e.freq<y.MINUTELY?[e.dtstart.getUTCMinutes()]:null,Y(e.bysecond)?_(e.bysecond)&&(e.bysecond=[e.bysecond]):e.bysecond=e.freq<y.SECONDLY?[e.dtstart.getUTCSeconds()]:null,{parsedOptions:e}}function Ht(t){var e=t.dtstart.getTime()%1e3;if(!Ye(t.freq))return[];var r=[];return t.byhour.forEach(function(n){t.byminute.forEach(function(a){t.bysecond.forEach(function(i){r.push(new ue(n,a,i,e))})})}),r}function we(t){var e=t.split(`
|
|
1
|
+
import{r as B,j as b}from"./iframe-ClorXKAj.js";import{C as Tt}from"./Checkbox-6Z_EEcoe.js";import{N as fe}from"./NumberStepper-CA99F71z.js";import{S as Le}from"./SelectInput-Cej6AIrC.js";import"./preload-helper-C1FmrZbK.js";import"./useSound-BS8g02XJ.js";import"./proxy-3BlM6Jc4.js";import"./MotionConfigContext-BOce3hkw.js";import"./index-CezVs6bU.js";import"./chevron-down-BwWfy_sP.js";import"./createLucideIcon-B-jPBnP1.js";var pe=["MO","TU","WE","TH","FR","SA","SU"],O=function(){function t(e,r){if(r===0)throw new Error("Can't create weekday with n == 0");this.weekday=e,this.n=r}return t.fromStr=function(e){return new t(pe.indexOf(e))},t.prototype.nth=function(e){return this.n===e?this:new t(this.weekday,e)},t.prototype.equals=function(e){return this.weekday===e.weekday&&this.n===e.n},t.prototype.toString=function(){var e=pe[this.weekday];return this.n&&(e=(this.n>0?"+":"")+String(this.n)+e),e},t.prototype.getJsWeekday=function(){return this.weekday===6?0:this.weekday+1},t}(),Y=function(t){return t!=null},_=function(t){return typeof t=="number"},Oe=function(t){return typeof t=="string"&&pe.includes(t)},S=Array.isArray,W=function(t,e){e===void 0&&(e=t),arguments.length===1&&(e=t,t=0);for(var r=[],n=t;n<e;n++)r.push(n);return r},w=function(t,e){var r=0,n=[];if(S(t))for(;r<e;r++)n[r]=[].concat(t);else for(;r<e;r++)n[r]=t;return n},Yt=function(t){return S(t)?t:[t]};function z(t,e,r){r===void 0&&(r=" ");var n=String(t);return e=e>>0,n.length>e?String(n):(e=e-n.length,e>r.length&&(r+=w(r,e/r.length)),r.slice(0,e)+String(n))}var xt=function(t,e,r){var n=t.split(e);return r?n.slice(0,r).concat([n.slice(r).join(e)]):n},N=function(t,e){var r=t%e;return r*e<0?r+e:r},de=function(t,e){return{div:Math.floor(t/e),mod:N(t,e)}},I=function(t){return!Y(t)||t.length===0},D=function(t){return!I(t)},g=function(t,e){return D(t)&&t.indexOf(e)!==-1},K=function(t,e,r,n,a,i){return n===void 0&&(n=0),a===void 0&&(a=0),i===void 0&&(i=0),new Date(Date.UTC(t,e-1,r,n,a,i))},Dt=[31,28,31,30,31,30,31,31,30,31,30,31],ft=1e3*60*60*24,dt=9999,yt=K(1970,1,1),Mt=[6,0,1,2,3,4,5],V=function(t){return t%4===0&&t%100!==0||t%400===0},pt=function(t){return t instanceof Date},X=function(t){return pt(t)&&!isNaN(t.getTime())},Lt=function(t,e){var r=t.getTime(),n=e.getTime(),a=r-n;return Math.round(a/ft)},me=function(t){return Lt(t,yt)},mt=function(t){return new Date(yt.getTime()+t*ft)},Ot=function(t){var e=t.getUTCMonth();return e===1&&V(t.getUTCFullYear())?29:Dt[e]},Q=function(t){return Mt[t.getUTCDay()]},Se=function(t,e){var r=K(t,e+1,1);return[Q(r),Ot(r)]},bt=function(t,e){return e=e||t,new Date(Date.UTC(t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()))},be=function(t){var e=new Date(t.getTime());return e},Ae=function(t){for(var e=[],r=0;r<t.length;r++)e.push(be(t[r]));return e},ee=function(t){t.sort(function(e,r){return e.getTime()-r.getTime()})},ke=function(t,e){e===void 0&&(e=!0);var r=new Date(t);return[z(r.getUTCFullYear().toString(),4,"0"),z(r.getUTCMonth()+1,2,"0"),z(r.getUTCDate(),2,"0"),"T",z(r.getUTCHours(),2,"0"),z(r.getUTCMinutes(),2,"0"),z(r.getUTCSeconds(),2,"0"),e?"Z":""].join("")},ge=function(t){var e=/^(\d{4})(\d{2})(\d{2})(T(\d{2})(\d{2})(\d{2})Z?)?$/,r=e.exec(t);if(!r)throw new Error("Invalid UNTIL value: ".concat(t));return new Date(Date.UTC(parseInt(r[1],10),parseInt(r[2],10)-1,parseInt(r[3],10),parseInt(r[5],10)||0,parseInt(r[6],10)||0,parseInt(r[7],10)||0))},Ne=function(t,e){var r=t.toLocaleString("sv-SE",{timeZone:e});return r.replace(" ","T")+"Z"},St=function(t,e){var r=Intl.DateTimeFormat().resolvedOptions().timeZone,n=new Date(Ne(t,r)),a=new Date(Ne(t,e??"UTC")),i=a.getTime()-n.getTime();return new Date(t.getTime()-i)},Z=function(){function t(e,r){this.minDate=null,this.maxDate=null,this._result=[],this.total=0,this.method=e,this.args=r,e==="between"?(this.maxDate=r.inc?r.before:new Date(r.before.getTime()-1),this.minDate=r.inc?r.after:new Date(r.after.getTime()+1)):e==="before"?this.maxDate=r.inc?r.dt:new Date(r.dt.getTime()-1):e==="after"&&(this.minDate=r.inc?r.dt:new Date(r.dt.getTime()+1))}return t.prototype.accept=function(e){++this.total;var r=this.minDate&&e<this.minDate,n=this.maxDate&&e>this.maxDate;if(this.method==="between"){if(r)return!0;if(n)return!1}else if(this.method==="before"){if(n)return!1}else if(this.method==="after")return r?!0:(this.add(e),!1);return this.add(e)},t.prototype.add=function(e){return this._result.push(e),!0},t.prototype.getValue=function(){var e=this._result;switch(this.method){case"all":case"between":return e;case"before":case"after":default:return e.length?e[e.length-1]:null}},t.prototype.clone=function(){return new t(this.method,this.args)},t}(),ve=function(t,e){return ve=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(r[a]=n[a])},ve(t,e)};function Te(t,e){if(typeof e!="function"&&e!==null)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");ve(t,e);function r(){this.constructor=t}t.prototype=e===null?Object.create(e):(r.prototype=e.prototype,new r)}var A=function(){return A=Object.assign||function(e){for(var r,n=1,a=arguments.length;n<a;n++){r=arguments[n];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(e[i]=r[i])}return e},A.apply(this,arguments)};function h(t,e,r){if(r||arguments.length===2)for(var n=0,a=e.length,i;n<a;n++)(i||!(n in e))&&(i||(i=Array.prototype.slice.call(e,0,n)),i[n]=e[n]);return t.concat(i||Array.prototype.slice.call(e))}var Re=function(t){Te(e,t);function e(r,n,a){var i=t.call(this,r,n)||this;return i.iterator=a,i}return e.prototype.add=function(r){return this.iterator(r,this._result.length)?(this._result.push(r),!0):!1},e}(Z),oe={dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],tokens:{SKIP:/^[ \r\n\t]+|^\.$/,number:/^[1-9][0-9]*/,numberAsText:/^(one|two|three)/i,every:/^every/i,"day(s)":/^days?/i,"weekday(s)":/^weekdays?/i,"week(s)":/^weeks?/i,"hour(s)":/^hours?/i,"minute(s)":/^minutes?/i,"month(s)":/^months?/i,"year(s)":/^years?/i,on:/^(on|in)/i,at:/^(at)/i,the:/^the/i,first:/^first/i,second:/^second/i,third:/^third/i,nth:/^([1-9][0-9]*)(\.|th|nd|rd|st)/i,last:/^last/i,for:/^for/i,"time(s)":/^times?/i,until:/^(un)?til/i,monday:/^mo(n(day)?)?/i,tuesday:/^tu(e(s(day)?)?)?/i,wednesday:/^we(d(n(esday)?)?)?/i,thursday:/^th(u(r(sday)?)?)?/i,friday:/^fr(i(day)?)?/i,saturday:/^sa(t(urday)?)?/i,sunday:/^su(n(day)?)?/i,january:/^jan(uary)?/i,february:/^feb(ruary)?/i,march:/^mar(ch)?/i,april:/^apr(il)?/i,may:/^may/i,june:/^june?/i,july:/^july?/i,august:/^aug(ust)?/i,september:/^sep(t(ember)?)?/i,october:/^oct(ober)?/i,november:/^nov(ember)?/i,december:/^dec(ember)?/i,comma:/^(,\s*|(and|or)\s*)+/i}},Ue=function(t,e){return t.indexOf(e)!==-1},At=function(t){return t.toString()},Nt=function(t,e,r){return"".concat(e," ").concat(r,", ").concat(t)},H=function(){function t(e,r,n,a){if(r===void 0&&(r=At),n===void 0&&(n=oe),a===void 0&&(a=Nt),this.text=[],this.language=n||oe,this.gettext=r,this.dateFormatter=a,this.rrule=e,this.options=e.options,this.origOptions=e.origOptions,this.origOptions.bymonthday){var i=[].concat(this.options.bymonthday),s=[].concat(this.options.bynmonthday);i.sort(function(l,d){return l-d}),s.sort(function(l,d){return d-l}),this.bymonthday=i.concat(s),this.bymonthday.length||(this.bymonthday=null)}if(Y(this.origOptions.byweekday)){var o=S(this.origOptions.byweekday)?this.origOptions.byweekday:[this.origOptions.byweekday],u=String(o);this.byweekday={allWeeks:o.filter(function(l){return!l.n}),someWeeks:o.filter(function(l){return!!l.n}),isWeekdays:u.indexOf("MO")!==-1&&u.indexOf("TU")!==-1&&u.indexOf("WE")!==-1&&u.indexOf("TH")!==-1&&u.indexOf("FR")!==-1&&u.indexOf("SA")===-1&&u.indexOf("SU")===-1,isEveryDay:u.indexOf("MO")!==-1&&u.indexOf("TU")!==-1&&u.indexOf("WE")!==-1&&u.indexOf("TH")!==-1&&u.indexOf("FR")!==-1&&u.indexOf("SA")!==-1&&u.indexOf("SU")!==-1};var f=function(l,d){return l.weekday-d.weekday};this.byweekday.allWeeks.sort(f),this.byweekday.someWeeks.sort(f),this.byweekday.allWeeks.length||(this.byweekday.allWeeks=null),this.byweekday.someWeeks.length||(this.byweekday.someWeeks=null)}else this.byweekday=null}return t.isFullyConvertible=function(e){var r=!0;if(!(e.options.freq in t.IMPLEMENTED)||e.origOptions.until&&e.origOptions.count)return!1;for(var n in e.origOptions){if(Ue(["dtstart","tzid","wkst","freq"],n))return!0;if(!Ue(t.IMPLEMENTED[e.options.freq],n))return!1}return r},t.prototype.isFullyConvertible=function(){return t.isFullyConvertible(this.rrule)},t.prototype.toString=function(){var e=this.gettext;if(!(this.options.freq in t.IMPLEMENTED))return e("RRule error: Unable to fully convert this rrule to text");if(this.text=[e("every")],this[y.FREQUENCIES[this.options.freq]](),this.options.until){this.add(e("until"));var r=this.options.until;this.add(this.dateFormatter(r.getUTCFullYear(),this.language.monthNames[r.getUTCMonth()],r.getUTCDate()))}else this.options.count&&this.add(e("for")).add(this.options.count.toString()).add(this.plural(this.options.count)?e("times"):e("time"));return this.isFullyConvertible()||this.add(e("(~ approximate)")),this.text.join("")},t.prototype.HOURLY=function(){var e=this.gettext;this.options.interval!==1&&this.add(this.options.interval.toString()),this.add(this.plural(this.options.interval)?e("hours"):e("hour"))},t.prototype.MINUTELY=function(){var e=this.gettext;this.options.interval!==1&&this.add(this.options.interval.toString()),this.add(this.plural(this.options.interval)?e("minutes"):e("minute"))},t.prototype.DAILY=function(){var e=this.gettext;this.options.interval!==1&&this.add(this.options.interval.toString()),this.byweekday&&this.byweekday.isWeekdays?this.add(this.plural(this.options.interval)?e("weekdays"):e("weekday")):this.add(this.plural(this.options.interval)?e("days"):e("day")),this.origOptions.bymonth&&(this.add(e("in")),this._bymonth()),this.bymonthday?this._bymonthday():this.byweekday?this._byweekday():this.origOptions.byhour&&this._byhour()},t.prototype.WEEKLY=function(){var e=this.gettext;this.options.interval!==1&&this.add(this.options.interval.toString()).add(this.plural(this.options.interval)?e("weeks"):e("week")),this.byweekday&&this.byweekday.isWeekdays?this.options.interval===1?this.add(this.plural(this.options.interval)?e("weekdays"):e("weekday")):this.add(e("on")).add(e("weekdays")):this.byweekday&&this.byweekday.isEveryDay?this.add(this.plural(this.options.interval)?e("days"):e("day")):(this.options.interval===1&&this.add(e("week")),this.origOptions.bymonth&&(this.add(e("in")),this._bymonth()),this.bymonthday?this._bymonthday():this.byweekday&&this._byweekday(),this.origOptions.byhour&&this._byhour())},t.prototype.MONTHLY=function(){var e=this.gettext;this.origOptions.bymonth?(this.options.interval!==1&&(this.add(this.options.interval.toString()).add(e("months")),this.plural(this.options.interval)&&this.add(e("in"))),this._bymonth()):(this.options.interval!==1&&this.add(this.options.interval.toString()),this.add(this.plural(this.options.interval)?e("months"):e("month"))),this.bymonthday?this._bymonthday():this.byweekday&&this.byweekday.isWeekdays?this.add(e("on")).add(e("weekdays")):this.byweekday&&this._byweekday()},t.prototype.YEARLY=function(){var e=this.gettext;this.origOptions.bymonth?(this.options.interval!==1&&(this.add(this.options.interval.toString()),this.add(e("years"))),this._bymonth()):(this.options.interval!==1&&this.add(this.options.interval.toString()),this.add(this.plural(this.options.interval)?e("years"):e("year"))),this.bymonthday?this._bymonthday():this.byweekday&&this._byweekday(),this.options.byyearday&&this.add(e("on the")).add(this.list(this.options.byyearday,this.nth,e("and"))).add(e("day")),this.options.byweekno&&this.add(e("in")).add(this.plural(this.options.byweekno.length)?e("weeks"):e("week")).add(this.list(this.options.byweekno,void 0,e("and")))},t.prototype._bymonthday=function(){var e=this.gettext;this.byweekday&&this.byweekday.allWeeks?this.add(e("on")).add(this.list(this.byweekday.allWeeks,this.weekdaytext,e("or"))).add(e("the")).add(this.list(this.bymonthday,this.nth,e("or"))):this.add(e("on the")).add(this.list(this.bymonthday,this.nth,e("and")))},t.prototype._byweekday=function(){var e=this.gettext;this.byweekday.allWeeks&&!this.byweekday.isWeekdays&&this.add(e("on")).add(this.list(this.byweekday.allWeeks,this.weekdaytext)),this.byweekday.someWeeks&&(this.byweekday.allWeeks&&this.add(e("and")),this.add(e("on the")).add(this.list(this.byweekday.someWeeks,this.weekdaytext,e("and"))))},t.prototype._byhour=function(){var e=this.gettext;this.add(e("at")).add(this.list(this.origOptions.byhour,void 0,e("and")))},t.prototype._bymonth=function(){this.add(this.list(this.options.bymonth,this.monthtext,this.gettext("and")))},t.prototype.nth=function(e){e=parseInt(e.toString(),10);var r,n=this.gettext;if(e===-1)return n("last");var a=Math.abs(e);switch(a){case 1:case 21:case 31:r=a+n("st");break;case 2:case 22:r=a+n("nd");break;case 3:case 23:r=a+n("rd");break;default:r=a+n("th")}return e<0?r+" "+n("last"):r},t.prototype.monthtext=function(e){return this.language.monthNames[e-1]},t.prototype.weekdaytext=function(e){var r=_(e)?(e+1)%7:e.getJsWeekday();return(e.n?this.nth(e.n)+" ":"")+this.language.dayNames[r]},t.prototype.plural=function(e){return e%100!==1},t.prototype.add=function(e){return this.text.push(" "),this.text.push(e),this},t.prototype.list=function(e,r,n,a){var i=this;a===void 0&&(a=","),S(e)||(e=[e]);var s=function(u,f,l){for(var d="",c=0;c<u.length;c++)c!==0&&(c===u.length-1?d+=" "+l+" ":d+=f+" "),d+=u[c];return d};r=r||function(u){return u.toString()};var o=function(u){return r&&r.call(i,u)};return n?s(e.map(o),a,n):e.map(o).join(a+" ")},t}(),Rt=function(){function t(e){this.done=!0,this.rules=e}return t.prototype.start=function(e){return this.text=e,this.done=!1,this.nextSymbol()},t.prototype.isDone=function(){return this.done&&this.symbol===null},t.prototype.nextSymbol=function(){var e,r;this.symbol=null,this.value=null;do{if(this.done)return!1;var n=void 0;e=null;for(var a in this.rules){n=this.rules[a];var i=n.exec(this.text);i&&(e===null||i[0].length>e[0].length)&&(e=i,r=a)}if(e!=null&&(this.text=this.text.substr(e[0].length),this.text===""&&(this.done=!0)),e==null){this.done=!0,this.symbol=null,this.value=null;return}}while(r==="SKIP");return this.symbol=r,this.value=e,!0},t.prototype.accept=function(e){if(this.symbol===e){if(this.value){var r=this.value;return this.nextSymbol(),r}return this.nextSymbol(),!0}return!1},t.prototype.acceptNumber=function(){return this.accept("number")},t.prototype.expect=function(e){if(this.accept(e))return!0;throw new Error("expected "+e+" but found "+this.symbol)},t}();function vt(t,e){e===void 0&&(e=oe);var r={},n=new Rt(e.tokens);if(!n.start(t))return null;return a(),r;function a(){n.expect("every");var c=n.acceptNumber();if(c&&(r.interval=parseInt(c[0],10)),n.isDone())throw new Error("Unexpected end");switch(n.symbol){case"day(s)":r.freq=y.DAILY,n.nextSymbol()&&(s(),d());break;case"weekday(s)":r.freq=y.WEEKLY,r.byweekday=[y.MO,y.TU,y.WE,y.TH,y.FR],n.nextSymbol(),s(),d();break;case"week(s)":r.freq=y.WEEKLY,n.nextSymbol()&&(i(),s(),d());break;case"hour(s)":r.freq=y.HOURLY,n.nextSymbol()&&(i(),d());break;case"minute(s)":r.freq=y.MINUTELY,n.nextSymbol()&&(i(),d());break;case"month(s)":r.freq=y.MONTHLY,n.nextSymbol()&&(i(),d());break;case"year(s)":r.freq=y.YEARLY,n.nextSymbol()&&(i(),d());break;case"monday":case"tuesday":case"wednesday":case"thursday":case"friday":case"saturday":case"sunday":r.freq=y.WEEKLY;var p=n.symbol.substr(0,2).toUpperCase();if(r.byweekday=[y[p]],!n.nextSymbol())return;for(;n.accept("comma");){if(n.isDone())throw new Error("Unexpected end");var m=u();if(!m)throw new Error("Unexpected symbol "+n.symbol+", expected weekday");r.byweekday.push(y[m]),n.nextSymbol()}s(),l(),d();break;case"january":case"february":case"march":case"april":case"may":case"june":case"july":case"august":case"september":case"october":case"november":case"december":if(r.freq=y.YEARLY,r.bymonth=[o()],!n.nextSymbol())return;for(;n.accept("comma");){if(n.isDone())throw new Error("Unexpected end");var k=o();if(!k)throw new Error("Unexpected symbol "+n.symbol+", expected month");r.bymonth.push(k),n.nextSymbol()}i(),d();break;default:throw new Error("Unknown symbol")}}function i(){var c=n.accept("on"),p=n.accept("the");if(c||p)do{var m=f(),k=u(),v=o();if(m)k?(n.nextSymbol(),r.byweekday||(r.byweekday=[]),r.byweekday.push(y[k].nth(m))):(r.bymonthday||(r.bymonthday=[]),r.bymonthday.push(m),n.accept("day(s)"));else if(k)n.nextSymbol(),r.byweekday||(r.byweekday=[]),r.byweekday.push(y[k]);else if(n.symbol==="weekday(s)")n.nextSymbol(),r.byweekday||(r.byweekday=[y.MO,y.TU,y.WE,y.TH,y.FR]);else if(n.symbol==="week(s)"){n.nextSymbol();var T=n.acceptNumber();if(!T)throw new Error("Unexpected symbol "+n.symbol+", expected week number");for(r.byweekno=[parseInt(T[0],10)];n.accept("comma");){if(T=n.acceptNumber(),!T)throw new Error("Unexpected symbol "+n.symbol+"; expected monthday");r.byweekno.push(parseInt(T[0],10))}}else if(v)n.nextSymbol(),r.bymonth||(r.bymonth=[]),r.bymonth.push(v);else return}while(n.accept("comma")||n.accept("the")||n.accept("on"))}function s(){var c=n.accept("at");if(c)do{var p=n.acceptNumber();if(!p)throw new Error("Unexpected symbol "+n.symbol+", expected hour");for(r.byhour=[parseInt(p[0],10)];n.accept("comma");){if(p=n.acceptNumber(),!p)throw new Error("Unexpected symbol "+n.symbol+"; expected hour");r.byhour.push(parseInt(p[0],10))}}while(n.accept("comma")||n.accept("at"))}function o(){switch(n.symbol){case"january":return 1;case"february":return 2;case"march":return 3;case"april":return 4;case"may":return 5;case"june":return 6;case"july":return 7;case"august":return 8;case"september":return 9;case"october":return 10;case"november":return 11;case"december":return 12;default:return!1}}function u(){switch(n.symbol){case"monday":case"tuesday":case"wednesday":case"thursday":case"friday":case"saturday":case"sunday":return n.symbol.substr(0,2).toUpperCase();default:return!1}}function f(){switch(n.symbol){case"last":return n.nextSymbol(),-1;case"first":return n.nextSymbol(),1;case"second":return n.nextSymbol(),n.accept("last")?-2:2;case"third":return n.nextSymbol(),n.accept("last")?-3:3;case"nth":var c=parseInt(n.value[1],10);if(c<-366||c>366)throw new Error("Nth out of range: "+c);return n.nextSymbol(),n.accept("last")?-c:c;default:return!1}}function l(){n.accept("on"),n.accept("the");var c=f();if(c)for(r.bymonthday=[c],n.nextSymbol();n.accept("comma");){if(c=f(),!c)throw new Error("Unexpected symbol "+n.symbol+"; expected monthday");r.bymonthday.push(c),n.nextSymbol()}}function d(){if(n.symbol==="until"){var c=Date.parse(n.text);if(!c)throw new Error("Cannot parse until date:"+n.text);r.until=new Date(c)}else n.accept("for")&&(r.count=parseInt(n.value[0],10),n.expect("number"))}}var E;(function(t){t[t.YEARLY=0]="YEARLY",t[t.MONTHLY=1]="MONTHLY",t[t.WEEKLY=2]="WEEKLY",t[t.DAILY=3]="DAILY",t[t.HOURLY=4]="HOURLY",t[t.MINUTELY=5]="MINUTELY",t[t.SECONDLY=6]="SECONDLY"})(E||(E={}));function Ye(t){return t<E.HOURLY}var Ut=function(t,e){return e===void 0&&(e=oe),new y(vt(t,e)||void 0)},$=["count","until","interval","byweekday","bymonthday","bymonth"];H.IMPLEMENTED=[];H.IMPLEMENTED[E.HOURLY]=$;H.IMPLEMENTED[E.MINUTELY]=$;H.IMPLEMENTED[E.DAILY]=["byhour"].concat($);H.IMPLEMENTED[E.WEEKLY]=$;H.IMPLEMENTED[E.MONTHLY]=$;H.IMPLEMENTED[E.YEARLY]=["byweekno","byyearday"].concat($);var _t=function(t,e,r,n){return new H(t,e,r,n).toString()},It=H.isFullyConvertible,ue=function(){function t(e,r,n,a){this.hour=e,this.minute=r,this.second=n,this.millisecond=a||0}return t.prototype.getHours=function(){return this.hour},t.prototype.getMinutes=function(){return this.minute},t.prototype.getSeconds=function(){return this.second},t.prototype.getMilliseconds=function(){return this.millisecond},t.prototype.getTime=function(){return(this.hour*60*60+this.minute*60+this.second)*1e3+this.millisecond},t}(),Wt=function(t){Te(e,t);function e(r,n,a,i,s,o,u){var f=t.call(this,i,s,o,u)||this;return f.year=r,f.month=n,f.day=a,f}return e.fromDate=function(r){return new this(r.getUTCFullYear(),r.getUTCMonth()+1,r.getUTCDate(),r.getUTCHours(),r.getUTCMinutes(),r.getUTCSeconds(),r.valueOf()%1e3)},e.prototype.getWeekday=function(){return Q(new Date(this.getTime()))},e.prototype.getTime=function(){return new Date(Date.UTC(this.year,this.month-1,this.day,this.hour,this.minute,this.second,this.millisecond)).getTime()},e.prototype.getDay=function(){return this.day},e.prototype.getMonth=function(){return this.month},e.prototype.getYear=function(){return this.year},e.prototype.addYears=function(r){this.year+=r},e.prototype.addMonths=function(r){if(this.month+=r,this.month>12){var n=Math.floor(this.month/12),a=N(this.month,12);this.month=a,this.year+=n,this.month===0&&(this.month=12,--this.year)}},e.prototype.addWeekly=function(r,n){n>this.getWeekday()?this.day+=-(this.getWeekday()+1+(6-n))+r*7:this.day+=-(this.getWeekday()-n)+r*7,this.fixDay()},e.prototype.addDaily=function(r){this.day+=r,this.fixDay()},e.prototype.addHours=function(r,n,a){for(n&&(this.hour+=Math.floor((23-this.hour)/r)*r);;){this.hour+=r;var i=de(this.hour,24),s=i.div,o=i.mod;if(s&&(this.hour=o,this.addDaily(s)),I(a)||g(a,this.hour))break}},e.prototype.addMinutes=function(r,n,a,i){for(n&&(this.minute+=Math.floor((1439-(this.hour*60+this.minute))/r)*r);;){this.minute+=r;var s=de(this.minute,60),o=s.div,u=s.mod;if(o&&(this.minute=u,this.addHours(o,!1,a)),(I(a)||g(a,this.hour))&&(I(i)||g(i,this.minute)))break}},e.prototype.addSeconds=function(r,n,a,i,s){for(n&&(this.second+=Math.floor((86399-(this.hour*3600+this.minute*60+this.second))/r)*r);;){this.second+=r;var o=de(this.second,60),u=o.div,f=o.mod;if(u&&(this.second=f,this.addMinutes(u,!1,a,i)),(I(a)||g(a,this.hour))&&(I(i)||g(i,this.minute))&&(I(s)||g(s,this.second)))break}},e.prototype.fixDay=function(){if(!(this.day<=28)){var r=Se(this.year,this.month-1)[1];if(!(this.day<=r))for(;this.day>r;){if(this.day-=r,++this.month,this.month===13&&(this.month=1,++this.year,this.year>dt))return;r=Se(this.year,this.month-1)[1]}}},e.prototype.add=function(r,n){var a=r.freq,i=r.interval,s=r.wkst,o=r.byhour,u=r.byminute,f=r.bysecond;switch(a){case E.YEARLY:return this.addYears(i);case E.MONTHLY:return this.addMonths(i);case E.WEEKLY:return this.addWeekly(i,s);case E.DAILY:return this.addDaily(i);case E.HOURLY:return this.addHours(i,n,o);case E.MINUTELY:return this.addMinutes(i,n,o,u);case E.SECONDLY:return this.addSeconds(i,n,o,u,f)}},e}(ue);function wt(t){for(var e=[],r=Object.keys(t),n=0,a=r;n<a.length;n++){var i=a[n];g(dr,i)||e.push(i),pt(t[i])&&!X(t[i])&&e.push(i)}if(e.length)throw new Error("Invalid options: "+e.join(", "));return A({},t)}function Ct(t){var e=A(A({},xe),wt(t));if(Y(e.byeaster)&&(e.freq=y.YEARLY),!(Y(e.freq)&&y.FREQUENCIES[e.freq]))throw new Error("Invalid frequency: ".concat(e.freq," ").concat(t.freq));if(e.dtstart||(e.dtstart=new Date(new Date().setMilliseconds(0))),Y(e.wkst)?_(e.wkst)||(e.wkst=e.wkst.weekday):e.wkst=y.MO.weekday,Y(e.bysetpos)){_(e.bysetpos)&&(e.bysetpos=[e.bysetpos]);for(var r=0;r<e.bysetpos.length;r++){var n=e.bysetpos[r];if(n===0||!(n>=-366&&n<=366))throw new Error("bysetpos must be between 1 and 366, or between -366 and -1")}}if(!(e.byweekno||D(e.byweekno)||D(e.byyearday)||e.bymonthday||D(e.bymonthday)||Y(e.byweekday)||Y(e.byeaster)))switch(e.freq){case y.YEARLY:e.bymonth||(e.bymonth=e.dtstart.getUTCMonth()+1),e.bymonthday=e.dtstart.getUTCDate();break;case y.MONTHLY:e.bymonthday=e.dtstart.getUTCDate();break;case y.WEEKLY:e.byweekday=[Q(e.dtstart)];break}if(Y(e.bymonth)&&!S(e.bymonth)&&(e.bymonth=[e.bymonth]),Y(e.byyearday)&&!S(e.byyearday)&&_(e.byyearday)&&(e.byyearday=[e.byyearday]),!Y(e.bymonthday))e.bymonthday=[],e.bynmonthday=[];else if(S(e.bymonthday)){for(var a=[],i=[],r=0;r<e.bymonthday.length;r++){var n=e.bymonthday[r];n>0?a.push(n):n<0&&i.push(n)}e.bymonthday=a,e.bynmonthday=i}else e.bymonthday<0?(e.bynmonthday=[e.bymonthday],e.bymonthday=[]):(e.bynmonthday=[],e.bymonthday=[e.bymonthday]);if(Y(e.byweekno)&&!S(e.byweekno)&&(e.byweekno=[e.byweekno]),!Y(e.byweekday))e.bynweekday=null;else if(_(e.byweekday))e.byweekday=[e.byweekday],e.bynweekday=null;else if(Oe(e.byweekday))e.byweekday=[O.fromStr(e.byweekday).weekday],e.bynweekday=null;else if(e.byweekday instanceof O)!e.byweekday.n||e.freq>y.MONTHLY?(e.byweekday=[e.byweekday.weekday],e.bynweekday=null):(e.bynweekday=[[e.byweekday.weekday,e.byweekday.n]],e.byweekday=null);else{for(var s=[],o=[],r=0;r<e.byweekday.length;r++){var u=e.byweekday[r];if(_(u)){s.push(u);continue}else if(Oe(u)){s.push(O.fromStr(u).weekday);continue}!u.n||e.freq>y.MONTHLY?s.push(u.weekday):o.push([u.weekday,u.n])}e.byweekday=D(s)?s:null,e.bynweekday=D(o)?o:null}return Y(e.byhour)?_(e.byhour)&&(e.byhour=[e.byhour]):e.byhour=e.freq<y.HOURLY?[e.dtstart.getUTCHours()]:null,Y(e.byminute)?_(e.byminute)&&(e.byminute=[e.byminute]):e.byminute=e.freq<y.MINUTELY?[e.dtstart.getUTCMinutes()]:null,Y(e.bysecond)?_(e.bysecond)&&(e.bysecond=[e.bysecond]):e.bysecond=e.freq<y.SECONDLY?[e.dtstart.getUTCSeconds()]:null,{parsedOptions:e}}function Ht(t){var e=t.dtstart.getTime()%1e3;if(!Ye(t.freq))return[];var r=[];return t.byhour.forEach(function(n){t.byminute.forEach(function(a){t.bysecond.forEach(function(i){r.push(new ue(n,a,i,e))})})}),r}function we(t){var e=t.split(`
|
|
2
2
|
`).map(jt).filter(function(r){return r!==null});return A(A({},e[0]),e[1])}function le(t){var e={},r=/DTSTART(?:;TZID=([^:=]+?))?(?::|=)([^;\s]+)/i.exec(t);if(!r)return e;var n=r[1],a=r[2];return n&&(e.tzid=n),e.dtstart=ge(a),e}function jt(t){if(t=t.replace(/^\s+|\s+$/,""),!t.length)return null;var e=/^([A-Z]+?)[:;]/.exec(t.toUpperCase());if(!e)return _e(t);var r=e[1];switch(r.toUpperCase()){case"RRULE":case"EXRULE":return _e(t);case"DTSTART":return le(t);default:throw new Error("Unsupported RFC prop ".concat(r," in ").concat(t))}}function _e(t){var e=t.replace(/^RRULE:/i,""),r=le(e),n=t.replace(/^(?:RRULE|EXRULE):/i,"").split(";");return n.forEach(function(a){var i=a.split("="),s=i[0],o=i[1];switch(s.toUpperCase()){case"FREQ":r.freq=E[o.toUpperCase()];break;case"WKST":r.wkst=U[o.toUpperCase()];break;case"COUNT":case"INTERVAL":case"BYSETPOS":case"BYMONTH":case"BYMONTHDAY":case"BYYEARDAY":case"BYWEEKNO":case"BYHOUR":case"BYMINUTE":case"BYSECOND":var u=qt(o),f=s.toLowerCase();r[f]=u;break;case"BYWEEKDAY":case"BYDAY":r.byweekday=Ft(o);break;case"DTSTART":case"TZID":var l=le(t);r.tzid=l.tzid,r.dtstart=l.dtstart;break;case"UNTIL":r.until=ge(o);break;case"BYEASTER":r.byeaster=Number(o);break;default:throw new Error("Unknown RRULE property '"+s+"'")}}),r}function qt(t){if(t.indexOf(",")!==-1){var e=t.split(",");return e.map(Ie)}return Ie(t)}function Ie(t){return/^[+-]?\d+$/.test(t)?Number(t):t}function Ft(t){var e=t.split(",");return e.map(function(r){if(r.length===2)return U[r];var n=r.match(/^([+-]?\d{1,2})([A-Z]{2})$/);if(!n||n.length<3)throw new SyntaxError("Invalid weekday string: ".concat(r));var a=Number(n[1]),i=n[2],s=U[i].weekday;return new O(s,a)})}var ce=function(){function t(e,r){if(isNaN(e.getTime()))throw new RangeError("Invalid date passed to DateWithZone");this.date=e,this.tzid=r}return Object.defineProperty(t.prototype,"isUTC",{get:function(){return!this.tzid||this.tzid.toUpperCase()==="UTC"},enumerable:!1,configurable:!0}),t.prototype.toString=function(){var e=ke(this.date.getTime(),this.isUTC);return this.isUTC?":".concat(e):";TZID=".concat(this.tzid,":").concat(e)},t.prototype.getTime=function(){return this.date.getTime()},t.prototype.rezonedDate=function(){return this.isUTC?this.date:St(this.date,this.tzid)},t}();function Ee(t){for(var e=[],r="",n=Object.keys(t),a=Object.keys(xe),i=0;i<n.length;i++)if(n[i]!=="tzid"&&g(a,n[i])){var s=n[i].toUpperCase(),o=t[n[i]],u="";if(!(!Y(o)||S(o)&&!o.length)){switch(s){case"FREQ":u=y.FREQUENCIES[t.freq];break;case"WKST":_(o)?u=new O(o).toString():u=o.toString();break;case"BYWEEKDAY":s="BYDAY",u=Yt(o).map(function(p){return p instanceof O?p:S(p)?new O(p[0],p[1]):new O(p)}).toString();break;case"DTSTART":r=Kt(o,t.tzid);break;case"UNTIL":u=ke(o,!t.tzid);break;default:if(S(o)){for(var f=[],l=0;l<o.length;l++)f[l]=String(o[l]);u=f.toString()}else u=String(o)}u&&e.push([s,u])}}var d=e.map(function(p){var m=p[0],k=p[1];return"".concat(m,"=").concat(k.toString())}).join(";"),c="";return d!==""&&(c="RRULE:".concat(d)),[r,c].filter(function(p){return!!p}).join(`
|
|
3
3
|
`)}function Kt(t,e){return t?"DTSTART"+new ce(new Date(t),e).toString():""}function Pt(t,e){return Array.isArray(t)?!Array.isArray(e)||t.length!==e.length?!1:t.every(function(r,n){return r.getTime()===e[n].getTime()}):t instanceof Date?e instanceof Date&&t.getTime()===e.getTime():t===e}var zt=function(){function t(){this.all=!1,this.before=[],this.after=[],this.between=[]}return t.prototype._cacheAdd=function(e,r,n){r&&(r=r instanceof Date?be(r):Ae(r)),e==="all"?this.all=r:(n._value=r,this[e].push(n))},t.prototype._cacheGet=function(e,r){var n=!1,a=r?Object.keys(r):[],i=function(l){for(var d=0;d<a.length;d++){var c=a[d];if(!Pt(r[c],l[c]))return!0}return!1},s=this[e];if(e==="all")n=this.all;else if(S(s))for(var o=0;o<s.length;o++){var u=s[o];if(!(a.length&&i(u))){n=u._value;break}}if(!n&&this.all){for(var f=new Z(e,r),o=0;o<this.all.length&&f.accept(this.all[o]);o++);n=f.getValue(),this._cacheAdd(e,n,r)}return S(n)?Ae(n):n instanceof Date?be(n):n},t}(),Bt=h(h(h(h(h(h(h(h(h(h(h(h(h([],w(1,31),!0),w(2,28),!0),w(3,31),!0),w(4,30),!0),w(5,31),!0),w(6,30),!0),w(7,31),!0),w(8,31),!0),w(9,30),!0),w(10,31),!0),w(11,30),!0),w(12,31),!0),w(1,7),!0),Zt=h(h(h(h(h(h(h(h(h(h(h(h(h([],w(1,31),!0),w(2,29),!0),w(3,31),!0),w(4,30),!0),w(5,31),!0),w(6,30),!0),w(7,31),!0),w(8,31),!0),w(9,30),!0),w(10,31),!0),w(11,30),!0),w(12,31),!0),w(1,7),!0),Qt=W(1,29),$t=W(1,30),j=W(1,31),M=W(1,32),Gt=h(h(h(h(h(h(h(h(h(h(h(h(h([],M,!0),$t,!0),M,!0),j,!0),M,!0),j,!0),M,!0),M,!0),j,!0),M,!0),j,!0),M,!0),M.slice(0,7),!0),Jt=h(h(h(h(h(h(h(h(h(h(h(h(h([],M,!0),Qt,!0),M,!0),j,!0),M,!0),j,!0),M,!0),M,!0),j,!0),M,!0),j,!0),M,!0),M.slice(0,7),!0),Xt=W(-28,0),Vt=W(-29,0),q=W(-30,0),L=W(-31,0),er=h(h(h(h(h(h(h(h(h(h(h(h(h([],L,!0),Vt,!0),L,!0),q,!0),L,!0),q,!0),L,!0),L,!0),q,!0),L,!0),q,!0),L,!0),L.slice(0,7),!0),tr=h(h(h(h(h(h(h(h(h(h(h(h(h([],L,!0),Xt,!0),L,!0),q,!0),L,!0),q,!0),L,!0),L,!0),q,!0),L,!0),q,!0),L,!0),L.slice(0,7),!0),rr=[0,31,60,91,121,152,182,213,244,274,305,335,366],nr=[0,31,59,90,120,151,181,212,243,273,304,334,365],We=function(){for(var t=[],e=0;e<55;e++)t=t.concat(W(7));return t}();function ar(t,e){var r=K(t,1,1),n=V(t)?366:365,a=V(t+1)?366:365,i=me(r),s=Q(r),o=A(A({yearlen:n,nextyearlen:a,yearordinal:i,yearweekday:s},ir(t)),{wnomask:null});if(I(e.byweekno))return o;o.wnomask=w(0,n+7);var u,f,l=u=N(7-s+e.wkst,7);l>=4?(l=0,f=o.yearlen+N(s-e.wkst,7)):f=n-l;for(var d=Math.floor(f/7),c=N(f,7),p=Math.floor(d+c/4),m=0;m<e.byweekno.length;m++){var k=e.byweekno[m];if(k<0&&(k+=p+1),k>0&&k<=p){var v=void 0;k>1?(v=l+(k-1)*7,l!==u&&(v-=7-u)):v=l;for(var T=0;T<7&&(o.wnomask[v]=1,v++,o.wdaymask[v]!==e.wkst);T++);}}if(g(e.byweekno,1)){var v=l+p*7;if(l!==u&&(v-=7-u),v<n)for(var m=0;m<7&&(o.wnomask[v]=1,v+=1,o.wdaymask[v]!==e.wkst);m++);}if(l){var R=void 0;if(g(e.byweekno,-1))R=-1;else{var P=Q(K(t-1,1,1)),J=N(7-P.valueOf()+e.wkst,7),he=V(t-1)?366:365,F=void 0;J>=4?(J=0,F=he+N(P-e.wkst,7)):F=n-l,R=Math.floor(52+N(F,7)/4)}if(g(e.byweekno,R))for(var v=0;v<l;v++)o.wnomask[v]=1}return o}function ir(t){var e=V(t)?366:365,r=K(t,1,1),n=Q(r);return e===365?{mmask:Bt,mdaymask:Jt,nmdaymask:tr,wdaymask:We.slice(n),mrange:nr}:{mmask:Zt,mdaymask:Gt,nmdaymask:er,wdaymask:We.slice(n),mrange:rr}}function sr(t,e,r,n,a,i){var s={lastyear:t,lastmonth:e,nwdaymask:[]},o=[];if(i.freq===y.YEARLY)if(I(i.bymonth))o=[[0,r]];else for(var u=0;u<i.bymonth.length;u++)e=i.bymonth[u],o.push(n.slice(e-1,e+1));else i.freq===y.MONTHLY&&(o=[n.slice(e-1,e+1)]);if(I(o))return s;s.nwdaymask=w(0,r);for(var u=0;u<o.length;u++)for(var f=o[u],l=f[0],d=f[1]-1,c=0;c<i.bynweekday.length;c++){var p=void 0,m=i.bynweekday[c],k=m[0],v=m[1];v<0?(p=d+(v+1)*7,p-=N(a[p]-k,7)):(p=l+(v-1)*7,p+=N(7-a[p]+k,7)),l<=p&&p<=d&&(s.nwdaymask[p]=1)}return s}function or(t,e){e===void 0&&(e=0);var r=t%19,n=Math.floor(t/100),a=t%100,i=Math.floor(n/4),s=n%4,o=Math.floor((n+8)/25),u=Math.floor((n-o+1)/3),f=Math.floor(19*r+n-i-u+15)%30,l=Math.floor(a/4),d=a%4,c=Math.floor(32+2*s+2*l-f-d)%7,p=Math.floor((r+11*f+22*c)/451),m=Math.floor((f+c-7*p+114)/31),k=(f+c-7*p+114)%31+1,v=Date.UTC(t,m-1,k+e),T=Date.UTC(t,0,1);return[Math.ceil((v-T)/(1e3*60*60*24))]}var ur=function(){function t(e){this.options=e}return t.prototype.rebuild=function(e,r){var n=this.options;if(e!==this.lastyear&&(this.yearinfo=ar(e,n)),D(n.bynweekday)&&(r!==this.lastmonth||e!==this.lastyear)){var a=this.yearinfo,i=a.yearlen,s=a.mrange,o=a.wdaymask;this.monthinfo=sr(e,r,i,s,o,n)}Y(n.byeaster)&&(this.eastermask=or(e,n.byeaster))},Object.defineProperty(t.prototype,"lastyear",{get:function(){return this.monthinfo?this.monthinfo.lastyear:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"lastmonth",{get:function(){return this.monthinfo?this.monthinfo.lastmonth:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"yearlen",{get:function(){return this.yearinfo.yearlen},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"yearordinal",{get:function(){return this.yearinfo.yearordinal},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"mrange",{get:function(){return this.yearinfo.mrange},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"wdaymask",{get:function(){return this.yearinfo.wdaymask},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"mmask",{get:function(){return this.yearinfo.mmask},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"wnomask",{get:function(){return this.yearinfo.wnomask},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"nwdaymask",{get:function(){return this.monthinfo?this.monthinfo.nwdaymask:[]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"nextyearlen",{get:function(){return this.yearinfo.nextyearlen},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"mdaymask",{get:function(){return this.yearinfo.mdaymask},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"nmdaymask",{get:function(){return this.yearinfo.nmdaymask},enumerable:!1,configurable:!0}),t.prototype.ydayset=function(){return[W(this.yearlen),0,this.yearlen]},t.prototype.mdayset=function(e,r){for(var n=this.mrange[r-1],a=this.mrange[r],i=w(null,this.yearlen),s=n;s<a;s++)i[s]=s;return[i,n,a]},t.prototype.wdayset=function(e,r,n){for(var a=w(null,this.yearlen+7),i=me(K(e,r,n))-this.yearordinal,s=i,o=0;o<7&&(a[i]=i,++i,this.wdaymask[i]!==this.options.wkst);o++);return[a,s,i]},t.prototype.ddayset=function(e,r,n){var a=w(null,this.yearlen),i=me(K(e,r,n))-this.yearordinal;return a[i]=i,[a,i,i+1]},t.prototype.htimeset=function(e,r,n,a){var i=this,s=[];return this.options.byminute.forEach(function(o){s=s.concat(i.mtimeset(e,o,n,a))}),ee(s),s},t.prototype.mtimeset=function(e,r,n,a){var i=this.options.bysecond.map(function(s){return new ue(e,r,s,a)});return ee(i),i},t.prototype.stimeset=function(e,r,n,a){return[new ue(e,r,n,a)]},t.prototype.getdayset=function(e){switch(e){case E.YEARLY:return this.ydayset.bind(this);case E.MONTHLY:return this.mdayset.bind(this);case E.WEEKLY:return this.wdayset.bind(this);case E.DAILY:return this.ddayset.bind(this);default:return this.ddayset.bind(this)}},t.prototype.gettimeset=function(e){switch(e){case E.HOURLY:return this.htimeset.bind(this);case E.MINUTELY:return this.mtimeset.bind(this);case E.SECONDLY:return this.stimeset.bind(this)}},t}();function lr(t,e,r,n,a,i){for(var s=[],o=0;o<t.length;o++){var u=void 0,f=void 0,l=t[o];l<0?(u=Math.floor(l/e.length),f=N(l,e.length)):(u=Math.floor((l-1)/e.length),f=N(l-1,e.length));for(var d=[],c=r;c<n;c++){var p=i[c];Y(p)&&d.push(p)}var m=void 0;u<0?m=d.slice(u)[0]:m=d[u];var k=e[f],v=mt(a.yearordinal+m),T=bt(v,k);g(s,T)||s.push(T)}return ee(s),s}function Et(t,e){var r=e.dtstart,n=e.freq,a=e.interval,i=e.until,s=e.bysetpos,o=e.count;if(o===0||a===0)return C(t);var u=Wt.fromDate(r),f=new ur(e);f.rebuild(u.year,u.month);for(var l=fr(f,u,e);;){var d=f.getdayset(n)(u.year,u.month,u.day),c=d[0],p=d[1],m=d[2],k=hr(c,p,m,f,e);if(D(s))for(var v=lr(s,l,p,m,f,c),T=0;T<v.length;T++){var R=v[T];if(i&&R>i)return C(t);if(R>=r){var P=Ce(R,e);if(!t.accept(P)||o&&(--o,!o))return C(t)}}else for(var T=p;T<m;T++){var J=c[T];if(Y(J))for(var he=mt(f.yearordinal+J),F=0;F<l.length;F++){var gt=l[F],R=bt(he,gt);if(i&&R>i)return C(t);if(R>=r){var P=Ce(R,e);if(!t.accept(P)||o&&(--o,!o))return C(t)}}}if(e.interval===0||(u.add(e,k),u.year>dt))return C(t);Ye(n)||(l=f.gettimeset(n)(u.hour,u.minute,u.second,0)),f.rebuild(u.year,u.month)}}function cr(t,e,r){var n=r.bymonth,a=r.byweekno,i=r.byweekday,s=r.byeaster,o=r.bymonthday,u=r.bynmonthday,f=r.byyearday;return D(n)&&!g(n,t.mmask[e])||D(a)&&!t.wnomask[e]||D(i)&&!g(i,t.wdaymask[e])||D(t.nwdaymask)&&!t.nwdaymask[e]||s!==null&&!g(t.eastermask,e)||(D(o)||D(u))&&!g(o,t.mdaymask[e])&&!g(u,t.nmdaymask[e])||D(f)&&(e<t.yearlen&&!g(f,e+1)&&!g(f,-t.yearlen+e)||e>=t.yearlen&&!g(f,e+1-t.yearlen)&&!g(f,-t.nextyearlen+e-t.yearlen))}function Ce(t,e){return new ce(t,e.tzid).rezonedDate()}function C(t){return t.getValue()}function hr(t,e,r,n,a){for(var i=!1,s=e;s<r;s++){var o=t[s];i=cr(n,o,a),i&&(t[o]=null)}return i}function fr(t,e,r){var n=r.freq,a=r.byhour,i=r.byminute,s=r.bysecond;return Ye(n)?Ht(r):n>=y.HOURLY&&D(a)&&!g(a,e.hour)||n>=y.MINUTELY&&D(i)&&!g(i,e.minute)||n>=y.SECONDLY&&D(s)&&!g(s,e.second)?[]:t.gettimeset(n)(e.hour,e.minute,e.second,e.millisecond)}var U={MO:new O(0),TU:new O(1),WE:new O(2),TH:new O(3),FR:new O(4),SA:new O(5),SU:new O(6)},xe={freq:E.YEARLY,dtstart:null,interval:1,wkst:U.MO,count:null,until:null,tzid:null,bysetpos:null,bymonth:null,bymonthday:null,bynmonthday:null,byyearday:null,byweekno:null,byweekday:null,bynweekday:null,byhour:null,byminute:null,bysecond:null,byeaster:null},dr=Object.keys(xe),y=function(){function t(e,r){e===void 0&&(e={}),r===void 0&&(r=!1),this._cache=r?null:new zt,this.origOptions=wt(e);var n=Ct(e).parsedOptions;this.options=n}return t.parseText=function(e,r){return vt(e,r)},t.fromText=function(e,r){return Ut(e,r)},t.fromString=function(e){return new t(t.parseString(e)||void 0)},t.prototype._iter=function(e){return Et(e,this.options)},t.prototype._cacheGet=function(e,r){return this._cache?this._cache._cacheGet(e,r):!1},t.prototype._cacheAdd=function(e,r,n){if(this._cache)return this._cache._cacheAdd(e,r,n)},t.prototype.all=function(e){if(e)return this._iter(new Re("all",{},e));var r=this._cacheGet("all");return r===!1&&(r=this._iter(new Z("all",{})),this._cacheAdd("all",r)),r},t.prototype.between=function(e,r,n,a){if(n===void 0&&(n=!1),!X(e)||!X(r))throw new Error("Invalid date passed in to RRule.between");var i={before:r,after:e,inc:n};if(a)return this._iter(new Re("between",i,a));var s=this._cacheGet("between",i);return s===!1&&(s=this._iter(new Z("between",i)),this._cacheAdd("between",s,i)),s},t.prototype.before=function(e,r){if(r===void 0&&(r=!1),!X(e))throw new Error("Invalid date passed in to RRule.before");var n={dt:e,inc:r},a=this._cacheGet("before",n);return a===!1&&(a=this._iter(new Z("before",n)),this._cacheAdd("before",a,n)),a},t.prototype.after=function(e,r){if(r===void 0&&(r=!1),!X(e))throw new Error("Invalid date passed in to RRule.after");var n={dt:e,inc:r},a=this._cacheGet("after",n);return a===!1&&(a=this._iter(new Z("after",n)),this._cacheAdd("after",a,n)),a},t.prototype.count=function(){return this.all().length},t.prototype.toString=function(){return Ee(this.origOptions)},t.prototype.toText=function(e,r,n){return _t(this,e,r,n)},t.prototype.isFullyConvertibleToText=function(){return It(this)},t.prototype.clone=function(){return new t(this.origOptions)},t.FREQUENCIES=["YEARLY","MONTHLY","WEEKLY","DAILY","HOURLY","MINUTELY","SECONDLY"],t.YEARLY=E.YEARLY,t.MONTHLY=E.MONTHLY,t.WEEKLY=E.WEEKLY,t.DAILY=E.DAILY,t.HOURLY=E.HOURLY,t.MINUTELY=E.MINUTELY,t.SECONDLY=E.SECONDLY,t.MO=U.MO,t.TU=U.TU,t.WE=U.WE,t.TH=U.TH,t.FR=U.FR,t.SA=U.SA,t.SU=U.SU,t.parseString=we,t.optionsToString=Ee,t}();function yr(t,e,r,n,a,i){var s={},o=t.accept;function u(c,p){r.forEach(function(m){m.between(c,p,!0).forEach(function(k){s[Number(k)]=!0})})}a.forEach(function(c){var p=new ce(c,i).rezonedDate();s[Number(p)]=!0}),t.accept=function(c){var p=Number(c);return isNaN(p)?o.call(this,c):!s[p]&&(u(new Date(p-1),new Date(p+1)),!s[p])?(s[p]=!0,o.call(this,c)):!0},t.method==="between"&&(u(t.args.after,t.args.before),t.accept=function(c){var p=Number(c);return s[p]?!0:(s[p]=!0,o.call(this,c))});for(var f=0;f<n.length;f++){var l=new ce(n[f],i).rezonedDate();if(!t.accept(new Date(l.getTime())))break}e.forEach(function(c){Et(t,c.options)});var d=t._result;switch(ee(d),t.method){case"all":case"between":return d;case"before":return d.length&&d[d.length-1]||null;case"after":default:return d.length&&d[0]||null}}var He={dtstart:null,cache:!1,unfold:!1,forceset:!1,compatible:!1,tzid:null};function pr(t,e){var r=[],n=[],a=[],i=[],s=le(t),o=s.dtstart,u=s.tzid,f=Er(t,e.unfold);return f.forEach(function(l){var d;if(l){var c=wr(l),p=c.name,m=c.parms,k=c.value;switch(p.toUpperCase()){case"RRULE":if(m.length)throw new Error("unsupported RRULE parm: ".concat(m.join(",")));r.push(we(l));break;case"RDATE":var v=(d=/RDATE(?:;TZID=([^:=]+))?/i.exec(l))!==null&&d!==void 0?d:[],T=v[1];T&&!u&&(u=T),n=n.concat(qe(k,m));break;case"EXRULE":if(m.length)throw new Error("unsupported EXRULE parm: ".concat(m.join(",")));a.push(we(k));break;case"EXDATE":i=i.concat(qe(k,m));break;case"DTSTART":break;default:throw new Error("unsupported property: "+p)}}}),{dtstart:o,tzid:u,rrulevals:r,rdatevals:n,exrulevals:a,exdatevals:i}}function mr(t,e){var r=pr(t,e),n=r.rrulevals,a=r.rdatevals,i=r.exrulevals,s=r.exdatevals,o=r.dtstart,u=r.tzid,f=e.cache===!1;if(e.compatible&&(e.forceset=!0,e.unfold=!0),e.forceset||n.length>1||a.length||i.length||s.length){var l=new gr(f);return l.dtstart(o),l.tzid(u||void 0),n.forEach(function(c){l.rrule(new y(ye(c,o,u),f))}),a.forEach(function(c){l.rdate(c)}),i.forEach(function(c){l.exrule(new y(ye(c,o,u),f))}),s.forEach(function(c){l.exdate(c)}),e.compatible&&e.dtstart&&l.rdate(o),l}var d=n[0]||{};return new y(ye(d,d.dtstart||e.dtstart||o,d.tzid||e.tzid||u),f)}function je(t,e){return e===void 0&&(e={}),mr(t,br(e))}function ye(t,e,r){return A(A({},t),{dtstart:e,tzid:r})}function br(t){var e=[],r=Object.keys(t),n=Object.keys(He);if(r.forEach(function(a){g(n,a)||e.push(a)}),e.length)throw new Error("Invalid options: "+e.join(", "));return A(A({},He),t)}function vr(t){if(t.indexOf(":")===-1)return{name:"RRULE",value:t};var e=xt(t,":",1),r=e[0],n=e[1];return{name:r,value:n}}function wr(t){var e=vr(t),r=e.name,n=e.value,a=r.split(";");if(!a)throw new Error("empty property name");return{name:a[0].toUpperCase(),parms:a.slice(1),value:n}}function Er(t,e){if(e===void 0&&(e=!1),t=t&&t.trim(),!t)throw new Error("Invalid empty string");if(!e)return t.split(/\s/);for(var r=t.split(`
|
|
4
4
|
`),n=0;n<r.length;){var a=r[n]=r[n].replace(/\s+$/g,"");a?n>0&&a[0]===" "?(r[n-1]+=a.slice(1),r.splice(n,1)):n+=1:r.splice(n,1)}return r}function kr(t){t.forEach(function(e){if(!/(VALUE=DATE(-TIME)?)|(TZID=)/.test(e))throw new Error("unsupported RDATE/EXDATE parm: "+e)})}function qe(t,e){return kr(e),t.split(",").map(function(r){return ge(r)})}function Fe(t){var e=this;return function(r){if(r!==void 0&&(e["_".concat(t)]=r),e["_".concat(t)]!==void 0)return e["_".concat(t)];for(var n=0;n<e._rrule.length;n++){var a=e._rrule[n].origOptions[t];if(a)return a}}}var gr=function(t){Te(e,t);function e(r){r===void 0&&(r=!1);var n=t.call(this,{},r)||this;return n.dtstart=Fe.apply(n,["dtstart"]),n.tzid=Fe.apply(n,["tzid"]),n._rrule=[],n._rdate=[],n._exrule=[],n._exdate=[],n}return e.prototype._iter=function(r){return yr(r,this._rrule,this._exrule,this._rdate,this._exdate,this.tzid())},e.prototype.rrule=function(r){Ke(r,this._rrule)},e.prototype.exrule=function(r){Ke(r,this._exrule)},e.prototype.rdate=function(r){Pe(r,this._rdate)},e.prototype.exdate=function(r){Pe(r,this._exdate)},e.prototype.rrules=function(){return this._rrule.map(function(r){return je(r.toString())})},e.prototype.exrules=function(){return this._exrule.map(function(r){return je(r.toString())})},e.prototype.rdates=function(){return this._rdate.map(function(r){return new Date(r.getTime())})},e.prototype.exdates=function(){return this._exdate.map(function(r){return new Date(r.getTime())})},e.prototype.valueOf=function(){var r=[];return!this._rrule.length&&this._dtstart&&(r=r.concat(Ee({dtstart:this._dtstart}))),this._rrule.forEach(function(n){r=r.concat(n.toString().split(`
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as D,j as X}from"./iframe-
|
|
1
|
+
import{r as D,j as X}from"./iframe-ClorXKAj.js";import{G as Y,P as $,M as J,V as m,R as K,T as Q}from"./Mesh-CwXV3WjE.js";import{V as Z}from"./Vec2-Cf1C3GIc.js";import{C as j}from"./Color-YRkaOI4u.js";import"./preload-helper-C1FmrZbK.js";const v=new m;class ee{constructor(o,{points:t,vertex:w=te,fragment:E=oe,uniforms:r={},attributes:R={}}){this.gl=o,this.points=t,this.count=t.length,this.position=new Float32Array(this.count*3*2),this.prev=new Float32Array(this.count*3*2),this.next=new Float32Array(this.count*3*2);const h=new Float32Array(this.count*1*2),y=new Float32Array(this.count*2*2),p=new Uint16Array((this.count-1)*3*2);for(let l=0;l<this.count;l++){h.set([-1,1],l*2);const n=l/(this.count-1);if(y.set([0,n,1,n],l*4),l===this.count-1)continue;const s=l*2;p.set([s+0,s+1,s+2],(s+0)*3),p.set([s+2,s+1,s+3],(s+1)*3)}const A=this.geometry=new Y(o,Object.assign(R,{position:{size:3,data:this.position},prev:{size:3,data:this.prev},next:{size:3,data:this.next},side:{size:1,data:h},uv:{size:2,data:y},index:{size:1,data:p}}));this.updateGeometry(),r.uResolution||(this.resolution=r.uResolution={value:new Z}),r.uDPR||(this.dpr=r.uDPR={value:1}),r.uThickness||(this.thickness=r.uThickness={value:1}),r.uColor||(this.color=r.uColor={value:new j("#000")}),r.uMiter||(this.miter=r.uMiter={value:1}),this.resize();const u=this.program=new $(o,{vertex:w,fragment:E,uniforms:r});this.mesh=new J(o,{geometry:A,program:u})}updateGeometry(){this.points.forEach((o,t)=>{o.toArray(this.position,t*3*2),o.toArray(this.position,t*3*2+3),t?(o.toArray(this.next,(t-1)*3*2),o.toArray(this.next,(t-1)*3*2+3)):(v.copy(o).sub(this.points[t+1]).add(o),v.toArray(this.prev,t*3*2),v.toArray(this.prev,t*3*2+3)),t===this.points.length-1?(v.copy(o).sub(this.points[t-1]).add(o),v.toArray(this.next,t*3*2),v.toArray(this.next,t*3*2+3)):(o.toArray(this.prev,(t+1)*3*2),o.toArray(this.prev,(t+1)*3*2+3))}),this.geometry.attributes.position.needsUpdate=!0,this.geometry.attributes.prev.needsUpdate=!0,this.geometry.attributes.next.needsUpdate=!0}resize(){this.resolution&&this.resolution.value.set(this.gl.canvas.width,this.gl.canvas.height),this.dpr&&(this.dpr.value=this.gl.renderer.dpr)}}const te=`
|
|
2
2
|
precision highp float;
|
|
3
3
|
|
|
4
4
|
attribute vec3 position;
|
package/storybook-static/assets/{RippleGrid.stories-nTLGHPV6.js → RippleGrid.stories-Bmz86N8L.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as u,j as N}from"./iframe-
|
|
1
|
+
import{r as u,j as N}from"./iframe-ClorXKAj.js";import{R as G,P as j,M as H}from"./Mesh-CwXV3WjE.js";import{T as $}from"./Triangle-64ffRKNB.js";import"./preload-helper-C1FmrZbK.js";const O={"ripple-grid-container":"_ripple-grid-container_1783h_1"},P=({enableRainbow:d=!1,gridColor:v="#ffffff",rippleIntensity:m=.05,gridSize:p=10,gridThickness:g=15,fadeDistance:h=1.5,vignetteStrength:R=2,glowIntensity:y=.1,opacity:x=1,gridRotation:I=0,mouseInteraction:i=!0,mouseInteractionRadius:w=1})=>{const r=u.useRef(null),l=u.useRef({x:.5,y:.5}),T=u.useRef({x:.5,y:.5}),b=u.useRef(0),n=u.useRef(null);return u.useEffect(()=>{if(!r.current)return;const E=o=>{const t=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(o);return t?[parseInt(t[1],16)/255,parseInt(t[2],16)/255,parseInt(t[3],16)/255]:[1,1,1]},c=new G({dpr:Math.min(window.devicePixelRatio,2),alpha:!0}),e=c.gl;e.enable(e.BLEND),e.blendFunc(e.SRC_ALPHA,e.ONE_MINUS_SRC_ALPHA),e.canvas.style.width="100%",e.canvas.style.height="100%",r.current.appendChild(e.canvas);const z=`
|
|
2
2
|
attribute vec2 position;
|
|
3
3
|
varying vec2 vUv;
|
|
4
4
|
void main() {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as s,j as c}from"./iframe-
|
|
1
|
+
import{r as s,j as c}from"./iframe-ClorXKAj.js";import{m as C}from"./proxy-3BlM6Jc4.js";import{A as Q}from"./index-CezVs6bU.js";import"./preload-helper-C1FmrZbK.js";import"./MotionConfigContext-BOce3hkw.js";const i={"text-rotate":"_text-rotate_1n8cd_1","text-rotate-sr-only":"_text-rotate-sr-only_1n8cd_8","text-rotate-word":"_text-rotate-word_1n8cd_20","text-rotate-lines":"_text-rotate-lines_1n8cd_24","text-rotate-element":"_text-rotate-element_1n8cd_30","text-rotate-space":"_text-rotate-space_1n8cd_34"};function h(...y){return y.filter(Boolean).join(" ")}const v=s.forwardRef((y,D)=>{const{texts:o,transition:N={type:"spring",damping:25,stiffness:300},initial:w={y:"100%",opacity:0},animate:A={y:0,opacity:1},exit:E={y:"-120%",opacity:0},animatePresenceMode:F="wait",animatePresenceInitial:H=!1,rotationInterval:j=2e3,staggerDuration:m=0,staggerFrom:u="first",loop:d=!0,auto:M=!0,splitBy:p="characters",onNext:_,mainClassName:P,splitLevelClassName:L,elementLevelClassName:W,...$}=y,[e,q]=s.useState(0),z=t=>{if(typeof Intl<"u"&&Intl.Segmenter){const a=new Intl.Segmenter("en",{granularity:"grapheme"});return Array.from(a.segment(t),r=>r.segment)}return Array.from(t)},G=s.useMemo(()=>{const t=o[e];if(p==="characters"){const a=t.split(" ");return a.map((r,n)=>({characters:z(r),needsSpace:n!==a.length-1}))}return p==="words"?t.split(" ").map((a,r,n)=>({characters:[a],needsSpace:r!==n.length-1})):p==="lines"?t.split(`
|
|
2
2
|
`).map((a,r,n)=>({characters:[a],needsSpace:r!==n.length-1})):t.split(p).map((a,r,n)=>({characters:[a],needsSpace:r!==n.length-1}))},[o,e,p]),J=s.useCallback((t,a)=>{const r=a;if(u==="first")return t*m;if(u==="last")return(r-1-t)*m;if(u==="center"){const n=Math.floor(r/2);return Math.abs(n-t)*m}if(u==="random"){const n=Math.floor(Math.random()*r);return Math.abs(n-t)*m}return Math.abs(u-t)*m},[u,m]),l=s.useCallback(t=>{q(t),_&&_(t)},[_]),x=s.useCallback(()=>{const t=e===o.length-1?d?0:e:e+1;t!==e&&l(t)},[e,o.length,d,l]),S=s.useCallback(()=>{const t=e===0?d?o.length-1:e:e-1;t!==e&&l(t)},[e,o.length,d,l]),R=s.useCallback(t=>{const a=Math.max(0,Math.min(t,o.length-1));a!==e&&l(a)},[o.length,e,l]),T=s.useCallback(()=>{e!==0&&l(0)},[e,l]);return s.useImperativeHandle(D,()=>({next:x,previous:S,jumpTo:R,reset:T}),[x,S,R,T]),s.useEffect(()=>{if(!M)return;const t=setInterval(x,j);return()=>clearInterval(t)},[x,j,M]),c.jsxs(C.span,{className:h(i["text-rotate"],P),...$,layout:!0,transition:N,children:[c.jsx("span",{className:`${i["text-rotate-sr-only"]}`,children:o[e]}),c.jsx(Q,{mode:F,initial:H,children:c.jsx(C.span,{className:h(p==="lines"?i["text-rotate-lines"]:i["text-rotate"]),layout:!0,"aria-hidden":"true",children:G.map((t,a,r)=>{const n=r.slice(0,a).reduce((I,g)=>I+g.characters.length,0);return c.jsxs("span",{className:h(i["text-rotate-word"],L),children:[t.characters.map((I,g)=>c.jsx(C.span,{initial:w,animate:A,exit:E,transition:{...N,delay:J(n+g,r.reduce((K,O)=>K+O.characters.length,0))},className:h(i["text-rotate-element"],W),children:I},g)),t.needsSpace&&c.jsx("span",{className:`${i["text-rotate-space"]}`,children:" "})]},a)})},e)})]})});v.displayName="RotatingText";v.__docgenInfo={description:"",methods:[],displayName:"RotatingText"};const tt={title:"ReactBits/TextAnimations/RotatingText",component:v,parameters:{layout:"fullscreen"}},f={args:{texts:["Hello","World","React","Bits"],rotationInterval:2e3,loop:!0,auto:!0,splitBy:"characters",staggerDuration:0,staggerFrom:"first"}};var b,B,k;f.parameters={...f.parameters,docs:{...(b=f.parameters)==null?void 0:b.docs,source:{originalSource:`{
|
|
3
3
|
args: {
|
|
4
4
|
texts: ['Hello', 'World', 'React', 'Bits'],
|
package/storybook-static/assets/{ScrollFloat.stories-Dp9YyvHK.js → ScrollFloat.stories-BvS3cLTO.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as s,j as c}from"./iframe-
|
|
1
|
+
import{r as s,j as c}from"./iframe-ClorXKAj.js";import{g as _}from"./index-C8pce-KX.js";import{S as q}from"./ScrollTrigger-D1XJUMov.js";import"./preload-helper-C1FmrZbK.js";const v="_char_46mmt_13",n={"scroll-float":"_scroll-float_46mmt_1","scroll-float-text":"_scroll-float-text_46mmt_5",char:v};_.registerPlugin(q);const h=({children:l,scrollContainerRef:e,containerClassName:S="",textClassName:y="",animationDuration:u=1,ease:m="back.inOut(2)",scrollStart:i="center bottom+=50%",scrollEnd:f="bottom bottom-=40%",stagger:d=.03})=>{const p=s.useRef(null),N=s.useMemo(()=>(typeof l=="string"?l:"").split("").map((a,o)=>c.jsx("span",{className:`${n.char}`,children:a===" "?" ":a},o)),[l]);return s.useEffect(()=>{const t=p.current;if(!t)return;const a=e&&e.current?e.current:window,o=t.querySelectorAll(".char");_.fromTo(o,{willChange:"opacity, transform",opacity:0,yPercent:120,scaleY:2.3,scaleX:.7,transformOrigin:"50% 0%"},{duration:u,ease:m,opacity:1,yPercent:0,scaleY:1,scaleX:1,stagger:d,scrollTrigger:{trigger:t,scroller:a,start:i,end:f,scrub:!0}})},[e,u,m,i,f,d]),c.jsx("h2",{ref:p,className:`${n["scroll-float"]} ${S}`,children:c.jsx("span",{className:`${n["scroll-float-text"]} ${y}`,children:N})})};h.__docgenInfo={description:"",methods:[],displayName:"ScrollFloat",props:{containerClassName:{defaultValue:{value:"''",computed:!1},required:!1},textClassName:{defaultValue:{value:"''",computed:!1},required:!1},animationDuration:{defaultValue:{value:"1",computed:!1},required:!1},ease:{defaultValue:{value:"'back.inOut(2)'",computed:!1},required:!1},scrollStart:{defaultValue:{value:"'center bottom+=50%'",computed:!1},required:!1},scrollEnd:{defaultValue:{value:"'bottom bottom-=40%'",computed:!1},required:!1},stagger:{defaultValue:{value:"0.03",computed:!1},required:!1}}};const C={title:"ReactBits/TextAnimations/ScrollFloat",component:h,parameters:{layout:"fullscreen"}},r={args:{children:"Hello World",containerClassName:"",textClassName:"",animationDuration:1,ease:"back.inOut(2)",scrollStart:"center bottom+=50%",scrollEnd:"bottom bottom-=40%",stagger:.03}};var g,x,b;r.parameters={...r.parameters,docs:{...(g=r.parameters)==null?void 0:g.docs,source:{originalSource:`{
|
|
2
2
|
args: {
|
|
3
3
|
children: 'Hello World',
|
|
4
4
|
containerClassName: '',
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as u,j as c}from"./iframe-
|
|
1
|
+
import{r as u,j as c}from"./iframe-ClorXKAj.js";import{g as l}from"./index-C8pce-KX.js";import{S as _}from"./ScrollTrigger-D1XJUMov.js";import"./preload-helper-C1FmrZbK.js";const T="_word_1yrz7_11",m={"scroll-reveal":"_scroll-reveal_1yrz7_1","scroll-reveal-text":"_scroll-reveal-text_1yrz7_5",word:T};l.registerPlugin(_);const h=({children:s,scrollContainerRef:r,enableBlur:i=!0,baseOpacity:d=.1,baseRotation:f=3,blurStrength:p=4,containerClassName:S="",textClassName:N="",rotationEnd:b="bottom bottom",wordAnimationEnd:n="bottom bottom"})=>{const g=u.useRef(null),q=u.useMemo(()=>(typeof s=="string"?s:"").split(/(\s+)/).map((t,o)=>t.match(/^\s+$/)?t:c.jsx("span",{className:`${m.word}`,children:t},o)),[s]);return u.useEffect(()=>{const e=g.current;if(!e)return;const t=r&&r.current?r.current:window;l.fromTo(e,{transformOrigin:"0% 50%",rotate:f},{ease:"none",rotate:0,scrollTrigger:{trigger:e,scroller:t,start:"top bottom",end:b,scrub:!0}});const o=e.querySelectorAll(".word");return l.fromTo(o,{opacity:d,willChange:"opacity"},{ease:"none",opacity:1,stagger:.05,scrollTrigger:{trigger:e,scroller:t,start:"top bottom-=20%",end:n,scrub:!0}}),i&&l.fromTo(o,{filter:`blur(${p}px)`},{ease:"none",filter:"blur(0px)",stagger:.05,scrollTrigger:{trigger:e,scroller:t,start:"top bottom-=20%",end:n,scrub:!0}}),()=>{_.getAll().forEach(E=>E.kill())}},[r,i,f,d,b,n,p]),c.jsx("h2",{ref:g,className:`${m["scroll-reveal"]} ${S}`,children:c.jsx("p",{className:`${m["scroll-reveal-text"]} ${N}`,children:q})})};h.__docgenInfo={description:"",methods:[],displayName:"ScrollReveal",props:{enableBlur:{defaultValue:{value:"true",computed:!1},required:!1},baseOpacity:{defaultValue:{value:"0.1",computed:!1},required:!1},baseRotation:{defaultValue:{value:"3",computed:!1},required:!1},blurStrength:{defaultValue:{value:"4",computed:!1},required:!1},containerClassName:{defaultValue:{value:"''",computed:!1},required:!1},textClassName:{defaultValue:{value:"''",computed:!1},required:!1},rotationEnd:{defaultValue:{value:"'bottom bottom'",computed:!1},required:!1},wordAnimationEnd:{defaultValue:{value:"'bottom bottom'",computed:!1},required:!1}}};const j={title:"ReactBits/TextAnimations/ScrollReveal",component:h,parameters:{layout:"fullscreen"}},a={args:{children:"Hello World",enableBlur:!0,baseOpacity:.1,baseRotation:3,blurStrength:4,containerClassName:"",textClassName:"",rotationEnd:"bottom bottom",wordAnimationEnd:"bottom bottom"}};var x,v,y;a.parameters={...a.parameters,docs:{...(x=a.parameters)==null?void 0:x.docs,source:{originalSource:`{
|
|
2
2
|
args: {
|
|
3
3
|
children: 'Hello World',
|
|
4
4
|
enableBlur: true,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as g,j as v}from"./iframe-BTbLpgFM.js";import{u as re}from"./use-motion-value-BKT0PPfP.js";import{h as ne,j as le,i as Te,r as Ce,m as Oe}from"./proxy-DHiOkbBq.js";import{f as h,I as k,N as Ne,a3 as Pe,Y as He,$ as Be,j as Ae,c as oe,R as ke,U as Re,o as W,u as be,a as q}from"./MotionConfigContext-BWFxZgdN.js";import{u as ze}from"./use-spring-CDH8BIpQ.js";import{u as D}from"./use-transform-Bj0aHFrd.js";import{u as je}from"./use-animation-frame-DY1VsI4g.js";import"./preload-helper-C1FmrZbK.js";function ce(e,t){let s;const r=()=>{const{currentTime:n}=t,o=(n===null?0:n.value)/100;s!==o&&e(o),s=o};return h.preUpdate(r,!0),()=>k(r)}function Ie(e,t,s){g.useInsertionEffect(()=>e.on(t,s),[e,t,s])}function O(e){return typeof window>"u"?!1:e?ne():le()}const _e=50,F=()=>({current:0,offset:[],progress:0,scrollLength:0,targetOffset:0,targetLength:0,containerLength:0,velocity:0}),qe=()=>({time:0,x:F(),y:F()}),De={x:{length:"Width",position:"Left"},y:{length:"Height",position:"Top"}};function $(e,t,s,r){const n=s[t],{length:l,position:o}=De[t],c=n.current,a=s.time;n.current=Math.abs(e[`scroll${o}`]),n.scrollLength=e[`scroll${l}`]-e[`client${l}`],n.offset.length=0,n.offset[0]=0,n.offset[1]=n.scrollLength,n.progress=Ne(0,n.scrollLength,n.current);const i=r-a;n.velocity=i>_e?0:Pe(n.current-c,i)}function Fe(e,t,s){$(e,"x",t,s),$(e,"y",t,s),t.time=s}function $e(e,t){const s={x:0,y:0};let r=e;for(;r&&r!==t;)if(Te(r))s.x+=r.offsetLeft,s.y+=r.offsetTop,r=r.offsetParent;else if(r.tagName==="svg"){const n=r.getBoundingClientRect();r=r.parentElement;const l=r.getBoundingClientRect();s.x+=n.left-l.left,s.y+=n.top-l.top}else if(r instanceof SVGGraphicsElement){const{x:n,y:l}=r.getBBox();s.x+=n,s.y+=l;let o=null,c=r.parentNode;for(;!o;)c.tagName==="svg"&&(o=c),c=r.parentNode;r=o}else break;return s}const R={start:0,center:.5,end:1};function Y(e,t,s=0){let r=0;if(e in R&&(e=R[e]),typeof e=="string"){const n=parseFloat(e);e.endsWith("px")?r=n:e.endsWith("%")?e=n/100:e.endsWith("vw")?r=n/100*document.documentElement.clientWidth:e.endsWith("vh")?r=n/100*document.documentElement.clientHeight:e=n}return typeof e=="number"&&(r=t*e),s+r}const Ye=[0,0];function Xe(e,t,s,r){let n=Array.isArray(e)?e:Ye,l=0,o=0;return typeof e=="number"?n=[e,e]:typeof e=="string"&&(e=e.trim(),e.includes(" ")?n=e.split(" "):n=[e,R[e]?e:"0"]),l=Y(n[0],s,r),o=Y(n[1],t),l-o}const E={Enter:[[0,1],[1,1]],Exit:[[0,0],[1,0]],Any:[[1,0],[0,1]],All:[[0,0],[1,1]]},Me={x:0,y:0};function Ue(e){return"getBBox"in e&&e.tagName!=="svg"?e.getBBox():{width:e.clientWidth,height:e.clientHeight}}function Ge(e,t,s){const{offset:r=E.All}=s,{target:n=e,axis:l="y"}=s,o=l==="y"?"height":"width",c=n!==e?$e(n,e):Me,a=n===e?{width:e.scrollWidth,height:e.scrollHeight}:Ue(n),i={width:e.clientWidth,height:e.clientHeight};t[l].offset.length=0;let u=!t[l].interpolate;const m=r.length;for(let f=0;f<m;f++){const p=Xe(r[f],i[o],a[o],c[l]);!u&&p!==t[l].interpolatorOffsets[f]&&(u=!0),t[l].offset[f]=p}u&&(t[l].interpolate=He(t[l].offset,Be(r),{clamp:!1}),t[l].interpolatorOffsets=[...t[l].offset]),t[l].progress=Ae(0,1,t[l].interpolate(t[l].current))}function Ke(e,t=e,s){if(s.x.targetOffset=0,s.y.targetOffset=0,t!==e){let r=t;for(;r&&r!==e;)s.x.targetOffset+=r.offsetLeft,s.y.targetOffset+=r.offsetTop,r=r.offsetParent}s.x.targetLength=t===e?t.scrollWidth:t.clientWidth,s.y.targetLength=t===e?t.scrollHeight:t.clientHeight,s.x.containerLength=e.clientWidth,s.y.containerLength=e.clientHeight}function Je(e,t,s,r={}){return{measure:n=>{Ke(e,r.target,s),Fe(e,s,n),(r.offset||r.target)&&Ge(e,s,r)},notify:()=>t(s)}}const x=new WeakMap,X=new WeakMap,A=new WeakMap,M=new WeakMap,L=new WeakMap,U=e=>e===document.scrollingElement?window:e;function ie(e,{container:t=document.scrollingElement,trackContentSize:s=!1,...r}={}){if(!t)return oe;let n=A.get(t);n||(n=new Set,A.set(t,n));const l=qe(),o=Je(t,e,l,r);if(n.add(o),!x.has(t)){const a=()=>{for(const f of n)f.measure(ke.timestamp);h.preUpdate(i)},i=()=>{for(const f of n)f.notify()},u=()=>h.read(a);x.set(t,u);const m=U(t);window.addEventListener("resize",u),t!==document.documentElement&&X.set(t,Ce(t,u)),m.addEventListener("scroll",u),u()}if(s&&!L.has(t)){const a=x.get(t),i={width:t.scrollWidth,height:t.scrollHeight};M.set(t,i);const u=()=>{const f=t.scrollWidth,p=t.scrollHeight;(i.width!==f||i.height!==p)&&(a(),i.width=f,i.height=p)},m=h.read(u,!0);L.set(t,m)}const c=x.get(t);return h.read(c,!1,!0),()=>{var m;k(c);const a=A.get(t);if(!a||(a.delete(o),a.size))return;const i=x.get(t);x.delete(t),i&&(U(t).removeEventListener("scroll",i),(m=X.get(t))==null||m(),window.removeEventListener("resize",i));const u=L.get(t);u&&(k(u),L.delete(t)),M.delete(t)}}const Qe=[[E.Enter,"entry"],[E.Exit,"exit"],[E.Any,"cover"],[E.All,"contain"]],G={start:0,end:1};function Ze(e){const t=e.trim().split(/\s+/);if(t.length!==2)return;const s=G[t[0]],r=G[t[1]];if(!(s===void 0||r===void 0))return[s,r]}function et(e){if(e.length!==2)return;const t=[];for(const s of e)if(Array.isArray(s))t.push(s);else if(typeof s=="string"){const r=Ze(s);if(!r)return;t.push(r)}else return;return t}function tt(e,t){const s=et(e);if(!s)return!1;for(let r=0;r<2;r++){const n=s[r],l=t[r];if(n[0]!==l[0]||n[1]!==l[1])return!1}return!0}function b(e){if(!e)return{rangeStart:"contain 0%",rangeEnd:"contain 100%"};for(const[t,s]of Qe)if(tt(e,t))return{rangeStart:`${s} 0%`,rangeEnd:`${s} 100%`}}const K=new Map;function J(e){const t={value:0},s=ie(r=>{t.value=r[e.axis].progress*100},e);return{currentTime:t,cancel:s}}function ae({source:e,container:t,...s}){const{axis:r}=s;e&&(t=e);let n=K.get(t);n||(n=new Map,K.set(t,n));const l=s.target??"self";let o=n.get(l);o||(o={},n.set(l,o));const c=r+(s.offset??[]).join(",");return o[c]||(s.target&&O(s.target)?b(s.offset)?o[c]=new ViewTimeline({subject:s.target,axis:r}):o[c]=J({container:t,...s}):O()?o[c]=new ScrollTimeline({source:t,axis:r}):o[c]=J({container:t,...s})),o[c]}function st(e,t){const s=ae(t),r=t.target?b(t.offset):void 0,n=t.target?O(t.target)&&!!r:O();return e.attachTimeline({timeline:n?s:void 0,...r&&n&&{rangeStart:r.rangeStart,rangeEnd:r.rangeEnd},observe:l=>(l.pause(),ce(o=>{l.time=l.iterationDuration*o},s))})}function rt(e){return e.length===2}function nt(e,t){return rt(e)?ie(s=>{e(s[t.axis].progress,s)},t):ce(e,ae(t))}function ue(e,{axis:t="y",container:s=document.scrollingElement,...r}={}){if(!s)return oe;const n={axis:t,container:s,...r};return typeof e=="function"?nt(e,n):st(e,n)}const lt=()=>({scrollX:W(0),scrollY:W(0),scrollXProgress:W(0),scrollYProgress:W(0)}),T=e=>e?!e.current:!1;function Q(e,t,s,r){return{factory:n=>ue(n,{...t,axis:e,container:(s==null?void 0:s.current)||void 0,target:(r==null?void 0:r.current)||void 0}),times:[0,1],keyframes:[0,1],ease:n=>n,duration:1}}function ot(e,t){return typeof window>"u"?!1:e?ne()&&!!b(t):le()}function ct({container:e,target:t,...s}={}){const r=Re(lt);ot(t,s.offset)&&(r.scrollXProgress.accelerate=Q("x",s,e,t),r.scrollYProgress.accelerate=Q("y",s,e,t));const n=g.useRef(null),l=g.useRef(!1),o=g.useCallback(()=>(n.current=ue((c,{x:a,y:i})=>{r.scrollX.set(a.current),r.scrollXProgress.set(a.progress),r.scrollY.set(i.current),r.scrollYProgress.set(i.progress)},{...s,container:(e==null?void 0:e.current)||void 0,target:(t==null?void 0:t.current)||void 0}),()=>{var c;(c=n.current)==null||c.call(n)}),[e,t,JSON.stringify(s.offset)]);return be(()=>{if(l.current=!1,T(e)||T(t)){l.current=!0;return}else return o()},[o]),g.useEffect(()=>{if(l.current)return q(!T(e)),q(!T(t)),o()},[o]),r}function it(e){const t=re(e.getVelocity()),s=()=>{const r=e.getVelocity();t.set(r),r&&h.update(s)};return Ie(e,"change",()=>{h.update(s,!1,!0)}),t}const at="_parallax_1s8d6_1",ut="_scroller_1s8d6_6",Z={parallax:at,scroller:ut};function ft(e){const[t,s]=g.useState(0);return g.useLayoutEffect(()=>{function r(){e.current&&s(e.current.offsetWidth)}return r(),window.addEventListener("resize",r),()=>window.removeEventListener("resize",r)},[e]),t}const fe=({scrollContainerRef:e,texts:t=[],velocity:s=100,className:r="",damping:n=50,stiffness:l=400,numCopies:o=6,velocityMapping:c={input:[0,1e3],output:[0,5]},parallaxClassName:a=Z.parallax,scrollerClassName:i=Z.scroller,parallaxStyle:u,scrollerStyle:m})=>{function f({children:p,baseVelocity:S=s,scrollContainerRef:z,className:de="",damping:me,stiffness:pe,numCopies:ge,velocityMapping:y,parallaxClassName:he,scrollerClassName:ye,parallaxStyle:xe,scrollerStyle:we}){const N=re(0),ve=z?{container:z}:{},{scrollY:Ee}=ct(ve),Se=it(Ee),Ve=ze(Se,{damping:me??50,stiffness:pe??400}),P=D(Ve,(y==null?void 0:y.input)||[0,1e3],(y==null?void 0:y.output)||[0,5],{clamp:!1}),j=g.useRef(null),I=ft(j);function We(d,H,w){const B=H-d;return((w-d)%B+B)%B+d}const Le=D(N,d=>I===0?"0px":`${We(-I,0,d)}px`),V=g.useRef(1);je((d,H)=>{let w=V.current*S*(H/1e3);P.get()<0?V.current=-1:P.get()>0&&(V.current=1),w+=V.current*w*P.get(),N.set(N.get()+w)});const _=[];for(let d=0;d<ge;d++)_.push(v.jsxs("span",{className:de,ref:d===0?j:null,children:[p," "]},d));return v.jsx("div",{className:he,style:xe,children:v.jsx(Oe.div,{className:ye,style:{x:Le,...we},children:_})})}return v.jsx("section",{children:t.map((p,S)=>v.jsx(f,{className:r,baseVelocity:S%2!==0?-s:s,scrollContainerRef:e,damping:n,stiffness:l,numCopies:o,velocityMapping:c,parallaxClassName:a,scrollerClassName:i,parallaxStyle:u,scrollerStyle:m,children:p},S))})};fe.__docgenInfo={description:"",methods:[],displayName:"ScrollVelocity",props:{texts:{defaultValue:{value:"[]",computed:!1},required:!1},velocity:{defaultValue:{value:"100",computed:!1},required:!1},className:{defaultValue:{value:"''",computed:!1},required:!1},damping:{defaultValue:{value:"50",computed:!1},required:!1},stiffness:{defaultValue:{value:"400",computed:!1},required:!1},numCopies:{defaultValue:{value:"6",computed:!1},required:!1},velocityMapping:{defaultValue:{value:"{ input: [0, 1000], output: [0, 5] }",computed:!1},required:!1},parallaxClassName:{defaultValue:{value:"styles['parallax']",computed:!0},required:!1},scrollerClassName:{defaultValue:{value:"styles['scroller']",computed:!0},required:!1}}};const Et={title:"ReactBits/TextAnimations/ScrollVelocity",component:fe,parameters:{layout:"fullscreen"}},C={args:{texts:["React Bits","Scroll Velocity"],velocity:100,damping:50,stiffness:400,numCopies:6}};var ee,te,se;C.parameters={...C.parameters,docs:{...(ee=C.parameters)==null?void 0:ee.docs,source:{originalSource:`{
|
|
1
|
+
import{r as g,j as v}from"./iframe-ClorXKAj.js";import{u as re}from"./use-motion-value-BABvebXq.js";import{h as ne,j as le,i as Te,r as Ce,m as Oe}from"./proxy-3BlM6Jc4.js";import{f as h,I as k,N as Ne,a3 as Pe,Y as He,$ as Be,j as Ae,c as oe,R as ke,U as Re,o as W,u as be,a as q}from"./MotionConfigContext-BOce3hkw.js";import{u as ze}from"./use-spring-C8_4zIh_.js";import{u as D}from"./use-transform-CcGdha8D.js";import{u as je}from"./use-animation-frame-D9hLiIrP.js";import"./preload-helper-C1FmrZbK.js";function ce(e,t){let s;const r=()=>{const{currentTime:n}=t,o=(n===null?0:n.value)/100;s!==o&&e(o),s=o};return h.preUpdate(r,!0),()=>k(r)}function Ie(e,t,s){g.useInsertionEffect(()=>e.on(t,s),[e,t,s])}function O(e){return typeof window>"u"?!1:e?ne():le()}const _e=50,F=()=>({current:0,offset:[],progress:0,scrollLength:0,targetOffset:0,targetLength:0,containerLength:0,velocity:0}),qe=()=>({time:0,x:F(),y:F()}),De={x:{length:"Width",position:"Left"},y:{length:"Height",position:"Top"}};function $(e,t,s,r){const n=s[t],{length:l,position:o}=De[t],c=n.current,a=s.time;n.current=Math.abs(e[`scroll${o}`]),n.scrollLength=e[`scroll${l}`]-e[`client${l}`],n.offset.length=0,n.offset[0]=0,n.offset[1]=n.scrollLength,n.progress=Ne(0,n.scrollLength,n.current);const i=r-a;n.velocity=i>_e?0:Pe(n.current-c,i)}function Fe(e,t,s){$(e,"x",t,s),$(e,"y",t,s),t.time=s}function $e(e,t){const s={x:0,y:0};let r=e;for(;r&&r!==t;)if(Te(r))s.x+=r.offsetLeft,s.y+=r.offsetTop,r=r.offsetParent;else if(r.tagName==="svg"){const n=r.getBoundingClientRect();r=r.parentElement;const l=r.getBoundingClientRect();s.x+=n.left-l.left,s.y+=n.top-l.top}else if(r instanceof SVGGraphicsElement){const{x:n,y:l}=r.getBBox();s.x+=n,s.y+=l;let o=null,c=r.parentNode;for(;!o;)c.tagName==="svg"&&(o=c),c=r.parentNode;r=o}else break;return s}const R={start:0,center:.5,end:1};function Y(e,t,s=0){let r=0;if(e in R&&(e=R[e]),typeof e=="string"){const n=parseFloat(e);e.endsWith("px")?r=n:e.endsWith("%")?e=n/100:e.endsWith("vw")?r=n/100*document.documentElement.clientWidth:e.endsWith("vh")?r=n/100*document.documentElement.clientHeight:e=n}return typeof e=="number"&&(r=t*e),s+r}const Ye=[0,0];function Xe(e,t,s,r){let n=Array.isArray(e)?e:Ye,l=0,o=0;return typeof e=="number"?n=[e,e]:typeof e=="string"&&(e=e.trim(),e.includes(" ")?n=e.split(" "):n=[e,R[e]?e:"0"]),l=Y(n[0],s,r),o=Y(n[1],t),l-o}const E={Enter:[[0,1],[1,1]],Exit:[[0,0],[1,0]],Any:[[1,0],[0,1]],All:[[0,0],[1,1]]},Me={x:0,y:0};function Ue(e){return"getBBox"in e&&e.tagName!=="svg"?e.getBBox():{width:e.clientWidth,height:e.clientHeight}}function Ge(e,t,s){const{offset:r=E.All}=s,{target:n=e,axis:l="y"}=s,o=l==="y"?"height":"width",c=n!==e?$e(n,e):Me,a=n===e?{width:e.scrollWidth,height:e.scrollHeight}:Ue(n),i={width:e.clientWidth,height:e.clientHeight};t[l].offset.length=0;let u=!t[l].interpolate;const m=r.length;for(let f=0;f<m;f++){const p=Xe(r[f],i[o],a[o],c[l]);!u&&p!==t[l].interpolatorOffsets[f]&&(u=!0),t[l].offset[f]=p}u&&(t[l].interpolate=He(t[l].offset,Be(r),{clamp:!1}),t[l].interpolatorOffsets=[...t[l].offset]),t[l].progress=Ae(0,1,t[l].interpolate(t[l].current))}function Ke(e,t=e,s){if(s.x.targetOffset=0,s.y.targetOffset=0,t!==e){let r=t;for(;r&&r!==e;)s.x.targetOffset+=r.offsetLeft,s.y.targetOffset+=r.offsetTop,r=r.offsetParent}s.x.targetLength=t===e?t.scrollWidth:t.clientWidth,s.y.targetLength=t===e?t.scrollHeight:t.clientHeight,s.x.containerLength=e.clientWidth,s.y.containerLength=e.clientHeight}function Je(e,t,s,r={}){return{measure:n=>{Ke(e,r.target,s),Fe(e,s,n),(r.offset||r.target)&&Ge(e,s,r)},notify:()=>t(s)}}const x=new WeakMap,X=new WeakMap,A=new WeakMap,M=new WeakMap,L=new WeakMap,U=e=>e===document.scrollingElement?window:e;function ie(e,{container:t=document.scrollingElement,trackContentSize:s=!1,...r}={}){if(!t)return oe;let n=A.get(t);n||(n=new Set,A.set(t,n));const l=qe(),o=Je(t,e,l,r);if(n.add(o),!x.has(t)){const a=()=>{for(const f of n)f.measure(ke.timestamp);h.preUpdate(i)},i=()=>{for(const f of n)f.notify()},u=()=>h.read(a);x.set(t,u);const m=U(t);window.addEventListener("resize",u),t!==document.documentElement&&X.set(t,Ce(t,u)),m.addEventListener("scroll",u),u()}if(s&&!L.has(t)){const a=x.get(t),i={width:t.scrollWidth,height:t.scrollHeight};M.set(t,i);const u=()=>{const f=t.scrollWidth,p=t.scrollHeight;(i.width!==f||i.height!==p)&&(a(),i.width=f,i.height=p)},m=h.read(u,!0);L.set(t,m)}const c=x.get(t);return h.read(c,!1,!0),()=>{var m;k(c);const a=A.get(t);if(!a||(a.delete(o),a.size))return;const i=x.get(t);x.delete(t),i&&(U(t).removeEventListener("scroll",i),(m=X.get(t))==null||m(),window.removeEventListener("resize",i));const u=L.get(t);u&&(k(u),L.delete(t)),M.delete(t)}}const Qe=[[E.Enter,"entry"],[E.Exit,"exit"],[E.Any,"cover"],[E.All,"contain"]],G={start:0,end:1};function Ze(e){const t=e.trim().split(/\s+/);if(t.length!==2)return;const s=G[t[0]],r=G[t[1]];if(!(s===void 0||r===void 0))return[s,r]}function et(e){if(e.length!==2)return;const t=[];for(const s of e)if(Array.isArray(s))t.push(s);else if(typeof s=="string"){const r=Ze(s);if(!r)return;t.push(r)}else return;return t}function tt(e,t){const s=et(e);if(!s)return!1;for(let r=0;r<2;r++){const n=s[r],l=t[r];if(n[0]!==l[0]||n[1]!==l[1])return!1}return!0}function b(e){if(!e)return{rangeStart:"contain 0%",rangeEnd:"contain 100%"};for(const[t,s]of Qe)if(tt(e,t))return{rangeStart:`${s} 0%`,rangeEnd:`${s} 100%`}}const K=new Map;function J(e){const t={value:0},s=ie(r=>{t.value=r[e.axis].progress*100},e);return{currentTime:t,cancel:s}}function ae({source:e,container:t,...s}){const{axis:r}=s;e&&(t=e);let n=K.get(t);n||(n=new Map,K.set(t,n));const l=s.target??"self";let o=n.get(l);o||(o={},n.set(l,o));const c=r+(s.offset??[]).join(",");return o[c]||(s.target&&O(s.target)?b(s.offset)?o[c]=new ViewTimeline({subject:s.target,axis:r}):o[c]=J({container:t,...s}):O()?o[c]=new ScrollTimeline({source:t,axis:r}):o[c]=J({container:t,...s})),o[c]}function st(e,t){const s=ae(t),r=t.target?b(t.offset):void 0,n=t.target?O(t.target)&&!!r:O();return e.attachTimeline({timeline:n?s:void 0,...r&&n&&{rangeStart:r.rangeStart,rangeEnd:r.rangeEnd},observe:l=>(l.pause(),ce(o=>{l.time=l.iterationDuration*o},s))})}function rt(e){return e.length===2}function nt(e,t){return rt(e)?ie(s=>{e(s[t.axis].progress,s)},t):ce(e,ae(t))}function ue(e,{axis:t="y",container:s=document.scrollingElement,...r}={}){if(!s)return oe;const n={axis:t,container:s,...r};return typeof e=="function"?nt(e,n):st(e,n)}const lt=()=>({scrollX:W(0),scrollY:W(0),scrollXProgress:W(0),scrollYProgress:W(0)}),T=e=>e?!e.current:!1;function Q(e,t,s,r){return{factory:n=>ue(n,{...t,axis:e,container:(s==null?void 0:s.current)||void 0,target:(r==null?void 0:r.current)||void 0}),times:[0,1],keyframes:[0,1],ease:n=>n,duration:1}}function ot(e,t){return typeof window>"u"?!1:e?ne()&&!!b(t):le()}function ct({container:e,target:t,...s}={}){const r=Re(lt);ot(t,s.offset)&&(r.scrollXProgress.accelerate=Q("x",s,e,t),r.scrollYProgress.accelerate=Q("y",s,e,t));const n=g.useRef(null),l=g.useRef(!1),o=g.useCallback(()=>(n.current=ue((c,{x:a,y:i})=>{r.scrollX.set(a.current),r.scrollXProgress.set(a.progress),r.scrollY.set(i.current),r.scrollYProgress.set(i.progress)},{...s,container:(e==null?void 0:e.current)||void 0,target:(t==null?void 0:t.current)||void 0}),()=>{var c;(c=n.current)==null||c.call(n)}),[e,t,JSON.stringify(s.offset)]);return be(()=>{if(l.current=!1,T(e)||T(t)){l.current=!0;return}else return o()},[o]),g.useEffect(()=>{if(l.current)return q(!T(e)),q(!T(t)),o()},[o]),r}function it(e){const t=re(e.getVelocity()),s=()=>{const r=e.getVelocity();t.set(r),r&&h.update(s)};return Ie(e,"change",()=>{h.update(s,!1,!0)}),t}const at="_parallax_1s8d6_1",ut="_scroller_1s8d6_6",Z={parallax:at,scroller:ut};function ft(e){const[t,s]=g.useState(0);return g.useLayoutEffect(()=>{function r(){e.current&&s(e.current.offsetWidth)}return r(),window.addEventListener("resize",r),()=>window.removeEventListener("resize",r)},[e]),t}const fe=({scrollContainerRef:e,texts:t=[],velocity:s=100,className:r="",damping:n=50,stiffness:l=400,numCopies:o=6,velocityMapping:c={input:[0,1e3],output:[0,5]},parallaxClassName:a=Z.parallax,scrollerClassName:i=Z.scroller,parallaxStyle:u,scrollerStyle:m})=>{function f({children:p,baseVelocity:S=s,scrollContainerRef:z,className:de="",damping:me,stiffness:pe,numCopies:ge,velocityMapping:y,parallaxClassName:he,scrollerClassName:ye,parallaxStyle:xe,scrollerStyle:we}){const N=re(0),ve=z?{container:z}:{},{scrollY:Ee}=ct(ve),Se=it(Ee),Ve=ze(Se,{damping:me??50,stiffness:pe??400}),P=D(Ve,(y==null?void 0:y.input)||[0,1e3],(y==null?void 0:y.output)||[0,5],{clamp:!1}),j=g.useRef(null),I=ft(j);function We(d,H,w){const B=H-d;return((w-d)%B+B)%B+d}const Le=D(N,d=>I===0?"0px":`${We(-I,0,d)}px`),V=g.useRef(1);je((d,H)=>{let w=V.current*S*(H/1e3);P.get()<0?V.current=-1:P.get()>0&&(V.current=1),w+=V.current*w*P.get(),N.set(N.get()+w)});const _=[];for(let d=0;d<ge;d++)_.push(v.jsxs("span",{className:de,ref:d===0?j:null,children:[p," "]},d));return v.jsx("div",{className:he,style:xe,children:v.jsx(Oe.div,{className:ye,style:{x:Le,...we},children:_})})}return v.jsx("section",{children:t.map((p,S)=>v.jsx(f,{className:r,baseVelocity:S%2!==0?-s:s,scrollContainerRef:e,damping:n,stiffness:l,numCopies:o,velocityMapping:c,parallaxClassName:a,scrollerClassName:i,parallaxStyle:u,scrollerStyle:m,children:p},S))})};fe.__docgenInfo={description:"",methods:[],displayName:"ScrollVelocity",props:{texts:{defaultValue:{value:"[]",computed:!1},required:!1},velocity:{defaultValue:{value:"100",computed:!1},required:!1},className:{defaultValue:{value:"''",computed:!1},required:!1},damping:{defaultValue:{value:"50",computed:!1},required:!1},stiffness:{defaultValue:{value:"400",computed:!1},required:!1},numCopies:{defaultValue:{value:"6",computed:!1},required:!1},velocityMapping:{defaultValue:{value:"{ input: [0, 1000], output: [0, 5] }",computed:!1},required:!1},parallaxClassName:{defaultValue:{value:"styles['parallax']",computed:!0},required:!1},scrollerClassName:{defaultValue:{value:"styles['scroller']",computed:!0},required:!1}}};const Et={title:"ReactBits/TextAnimations/ScrollVelocity",component:fe,parameters:{layout:"fullscreen"}},C={args:{texts:["React Bits","Scroll Velocity"],velocity:100,damping:50,stiffness:400,numCopies:6}};var ee,te,se;C.parameters={...C.parameters,docs:{...(ee=C.parameters)==null?void 0:ee.docs,source:{originalSource:`{
|
|
2
2
|
args: {
|
|
3
3
|
texts: ['React Bits', 'Scroll Velocity'],
|
|
4
4
|
velocity: 100,
|
package/storybook-static/assets/{SearchBar.stories-BKfuRnlK.js → SearchBar.stories-Bu7toOZA.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{r as o,j as t}from"./iframe-
|
|
1
|
+
import{r as o,j as t}from"./iframe-ClorXKAj.js";import{S as ee}from"./search-BKi-6XDz.js";import{F as te}from"./folder-B0kHgyRN.js";import{U as se}from"./users-CL9_RODb.js";import{c as P}from"./createLucideIcon-B-jPBnP1.js";import{m as $}from"./proxy-3BlM6Jc4.js";import{X as ye}from"./x-BgxSkyBO.js";import{A as fe}from"./index-CezVs6bU.js";import"./preload-helper-C1FmrZbK.js";import"./MotionConfigContext-BOce3hkw.js";/**
|
|
2
2
|
* @license lucide-react v0.539.0 - ISC
|
|
3
3
|
*
|
|
4
4
|
* This source code is licensed under the ISC license.
|