sibujs 1.0.2 → 1.0.3
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/browser.cjs +18 -0
- package/dist/browser.d.cts +19 -1
- package/dist/browser.d.ts +19 -1
- package/dist/browser.js +5 -1
- package/dist/build.cjs +17 -8
- package/dist/build.js +3 -3
- package/dist/cdn.global.js +4 -4
- package/dist/{chunk-ONCYDOK6.js → chunk-4EI4AG32.js} +17 -1
- package/dist/{chunk-MJ4LVHGX.js → chunk-7V26P53V.js} +1 -1
- package/dist/{chunk-6JGMNCD6.js → chunk-EWFVA3TJ.js} +1 -1
- package/dist/{chunk-HS6OOE3Q.js → chunk-G3BOQPVO.js} +1 -1
- package/dist/{chunk-QVKGGB2S.js → chunk-MDVXJWFN.js} +7 -3
- package/dist/{chunk-24WSRM54.js → chunk-MEZVEBPN.js} +13 -7
- package/dist/{chunk-OHQQWZ7P.js → chunk-QBMDLBU2.js} +10 -4
- package/dist/data.cjs +10 -4
- package/dist/data.d.cts +2 -0
- package/dist/data.d.ts +2 -0
- package/dist/data.js +1 -1
- package/dist/ecosystem.cjs +7 -3
- package/dist/ecosystem.d.cts +1 -1
- package/dist/ecosystem.d.ts +1 -1
- package/dist/ecosystem.js +2 -2
- package/dist/extras.cjs +35 -7
- package/dist/extras.d.cts +2 -2
- package/dist/extras.d.ts +2 -2
- package/dist/extras.js +10 -6
- package/dist/index.cjs +18 -8
- package/dist/index.d.cts +22 -3
- package/dist/index.d.ts +22 -3
- package/dist/index.js +5 -3
- package/dist/plugins.cjs +7 -3
- package/dist/plugins.js +2 -2
- package/dist/ssr.cjs +7 -3
- package/dist/ssr.js +3 -3
- package/dist/{tagFactory-D9e0QGIE.d.cts → tagFactory-Dl8QCLga.d.cts} +2 -2
- package/dist/{tagFactory-D9e0QGIE.d.ts → tagFactory-Dl8QCLga.d.ts} +2 -2
- package/package.json +1 -1
- package/dist/chunk-27QC4FPL.js +0 -67
- package/dist/chunk-2ABBWCGC.js +0 -65
- package/dist/chunk-2GLUWW3D.js +0 -567
- package/dist/chunk-2HYHL6VW.js +0 -269
- package/dist/chunk-2MUNQYZ7.js +0 -26
- package/dist/chunk-2PFRWZIE.js +0 -65
- package/dist/chunk-2PSPKNUI.js +0 -1711
- package/dist/chunk-2X5NDXNG.js +0 -877
- package/dist/chunk-34TOFKL7.js +0 -1803
- package/dist/chunk-353KB3DI.js +0 -271
- package/dist/chunk-35CDLDX5.js +0 -1758
- package/dist/chunk-36MU4CFV.js +0 -41
- package/dist/chunk-37NSPDPQ.js +0 -284
- package/dist/chunk-3CSF4TOG.js +0 -282
- package/dist/chunk-3FIQOFI6.js +0 -182
- package/dist/chunk-3GHNC2BN.js +0 -28
- package/dist/chunk-3GZTRYSY.js +0 -33
- package/dist/chunk-3HLWWEPU.js +0 -909
- package/dist/chunk-3IVI3J54.js +0 -252
- package/dist/chunk-3KZ72WNW.js +0 -944
- package/dist/chunk-4AU64SQV.js +0 -182
- package/dist/chunk-4MOK7HAR.js +0 -84
- package/dist/chunk-4QK6FBDH.js +0 -1429
- package/dist/chunk-526ENZ77.js +0 -58
- package/dist/chunk-566Z7HXB.js +0 -737
- package/dist/chunk-5CRBB7XP.js +0 -358
- package/dist/chunk-5G67D3IZ.js +0 -168
- package/dist/chunk-5KBEED6D.js +0 -361
- package/dist/chunk-5LJMSKBB.js +0 -26
- package/dist/chunk-5M7LJFWV.js +0 -271
- package/dist/chunk-5NCPAWBE.js +0 -99
- package/dist/chunk-5O2RKXR3.js +0 -1444
- package/dist/chunk-5OCBERWW.js +0 -1094
- package/dist/chunk-5XUAA53E.js +0 -99
- package/dist/chunk-5ZFVYPDG.js +0 -97
- package/dist/chunk-6BCDNGIH.js +0 -1839
- package/dist/chunk-6BDUQJ7K.js +0 -949
- package/dist/chunk-6BTBDO6A.js +0 -633
- package/dist/chunk-6DJQF4Z7.js +0 -33
- package/dist/chunk-6EYXAMBN.js +0 -1857
- package/dist/chunk-6IWEHW57.js +0 -43
- package/dist/chunk-6J6S4NI7.js +0 -398
- package/dist/chunk-6NBHAKHS.js +0 -1997
- package/dist/chunk-6QRLJNXR.js +0 -1425
- package/dist/chunk-6SNF5MZK.js +0 -282
- package/dist/chunk-7FYJUE77.js +0 -282
- package/dist/chunk-7HM5UE5T.js +0 -270
- package/dist/chunk-7JOLTGUH.js +0 -58
- package/dist/chunk-7LS3ITZB.js +0 -567
- package/dist/chunk-7MCWJCQK.js +0 -909
- package/dist/chunk-7RIIFP3E.js +0 -1758
- package/dist/chunk-7UASYN3G.js +0 -254
- package/dist/chunk-7W2WYHDI.js +0 -741
- package/dist/chunk-7XFBKLFB.js +0 -90
- package/dist/chunk-7Y35RDSJ.js +0 -872
- package/dist/chunk-A65GFJBL.js +0 -65
- package/dist/chunk-AD6ZIEDK.js +0 -67
- package/dist/chunk-AIPXZK5O.js +0 -295
- package/dist/chunk-AK5Y72F3.js +0 -1426
- package/dist/chunk-ANRSGGFC.js +0 -725
- package/dist/chunk-APOMMWH4.js +0 -282
- package/dist/chunk-ARZVTWIQ.js +0 -1750
- package/dist/chunk-AWWBM2BI.js +0 -664
- package/dist/chunk-AX5VEQTY.js +0 -58
- package/dist/chunk-AYTXVOW3.js +0 -1708
- package/dist/chunk-B4ASD5VC.js +0 -295
- package/dist/chunk-BG3HMX4C.js +0 -271
- package/dist/chunk-BG4A246G.js +0 -1746
- package/dist/chunk-BNFJJA2L.js +0 -1425
- package/dist/chunk-BPKPBVU5.js +0 -59
- package/dist/chunk-BPKPPSXC.js +0 -282
- package/dist/chunk-BPWKKK7F.js +0 -1711
- package/dist/chunk-BS5EYKCJ.js +0 -26
- package/dist/chunk-BS6ETCJ7.js +0 -949
- package/dist/chunk-BTTBAGD3.js +0 -365
- package/dist/chunk-BWBWJYBK.js +0 -271
- package/dist/chunk-CCKX6YTC.js +0 -1735
- package/dist/chunk-CIF5Z3MP.js +0 -58
- package/dist/chunk-CQNVF2FD.js +0 -282
- package/dist/chunk-CRTHZHU7.js +0 -26
- package/dist/chunk-CSXYU7IO.js +0 -457
- package/dist/chunk-D6JD4FDC.js +0 -26
- package/dist/chunk-DAUTHAYH.js +0 -20
- package/dist/chunk-DB243LB7.js +0 -877
- package/dist/chunk-DEQLPROY.js +0 -1094
- package/dist/chunk-DGUYCZJH.js +0 -654
- package/dist/chunk-DI3Z32TV.js +0 -1780
- package/dist/chunk-DKGHW6MX.js +0 -90
- package/dist/chunk-DKXVN442.js +0 -90
- package/dist/chunk-DLWLJZB3.js +0 -712
- package/dist/chunk-DNTTC4V5.js +0 -1803
- package/dist/chunk-DWQQ2GZK.js +0 -1787
- package/dist/chunk-DZZMIMGL.js +0 -725
- package/dist/chunk-E5SMAKQQ.js +0 -336
- package/dist/chunk-E6BNBVMK.js +0 -457
- package/dist/chunk-E7NGA7X2.js +0 -59
- package/dist/chunk-EEPPJKAE.js +0 -443
- package/dist/chunk-EGZGFIXV.js +0 -90
- package/dist/chunk-EJMSUPXQ.js +0 -346
- package/dist/chunk-EJMYGAGQ.js +0 -717
- package/dist/chunk-EL6Z5MDY.js +0 -55
- package/dist/chunk-EP7VRLEB.js +0 -41
- package/dist/chunk-EQACK65C.js +0 -63
- package/dist/chunk-ESPA7SCH.js +0 -567
- package/dist/chunk-ETMEC6FH.js +0 -99
- package/dist/chunk-EUFENPGJ.js +0 -290
- package/dist/chunk-EZ2WHYVL.js +0 -65
- package/dist/chunk-EZRVMSZK.js +0 -67
- package/dist/chunk-F25CZRUH.js +0 -282
- package/dist/chunk-F2TRGINX.js +0 -254
- package/dist/chunk-F4IYF3YU.js +0 -266
- package/dist/chunk-F5JCIH3Q.js +0 -642
- package/dist/chunk-FBNDOAHU.js +0 -54
- package/dist/chunk-FDRU7W6W.js +0 -365
- package/dist/chunk-FDW3E54J.js +0 -1767
- package/dist/chunk-FEPU4KL6.js +0 -63
- package/dist/chunk-FGK3JKMN.js +0 -909
- package/dist/chunk-FQWPKSTD.js +0 -1437
- package/dist/chunk-FWHVLMCI.js +0 -26
- package/dist/chunk-FYIGTFXO.js +0 -712
- package/dist/chunk-G4AX3DQ4.js +0 -54
- package/dist/chunk-GBEYQRO2.js +0 -303
- package/dist/chunk-GBLES3NK.js +0 -248
- package/dist/chunk-GQVGUQW6.js +0 -1436
- package/dist/chunk-GVDEIJ3G.js +0 -291
- package/dist/chunk-GXIM4TC3.js +0 -346
- package/dist/chunk-GY5AAP4H.js +0 -316
- package/dist/chunk-HCV2T76T.js +0 -457
- package/dist/chunk-HCWPQCZP.js +0 -279
- package/dist/chunk-HFHOFG6W.js +0 -282
- package/dist/chunk-HGKEBAW3.js +0 -63
- package/dist/chunk-HJNW3HLI.js +0 -255
- package/dist/chunk-HKUNBYN6.js +0 -949
- package/dist/chunk-HRIIH4JX.js +0 -712
- package/dist/chunk-HS7ZKVPR.js +0 -182
- package/dist/chunk-HXDVV7HZ.js +0 -909
- package/dist/chunk-HZWNWUPJ.js +0 -466
- package/dist/chunk-I6EZTMPB.js +0 -949
- package/dist/chunk-IB23VMO3.js +0 -1746
- package/dist/chunk-IC4K4EOD.js +0 -26
- package/dist/chunk-IEMZ7RTT.js +0 -99
- package/dist/chunk-IJU6TOZ6.js +0 -65
- package/dist/chunk-IK3NFZOA.js +0 -466
- package/dist/chunk-IPGRSN42.js +0 -1750
- package/dist/chunk-IVMOK2QN.js +0 -1750
- package/dist/chunk-J7PD6L4B.js +0 -1767
- package/dist/chunk-JCLGQO7T.js +0 -443
- package/dist/chunk-JDXL7KDB.js +0 -1436
- package/dist/chunk-JIIFW636.js +0 -270
- package/dist/chunk-JLOASJXU.js +0 -654
- package/dist/chunk-JRWAHOMS.js +0 -41
- package/dist/chunk-JWGEEH7H.js +0 -944
- package/dist/chunk-K2BESAG7.js +0 -1688
- package/dist/chunk-K2U5YGF4.js +0 -877
- package/dist/chunk-K45FQ4Y4.js +0 -175
- package/dist/chunk-K7BPE427.js +0 -1432
- package/dist/chunk-K7JUDY3C.js +0 -364
- package/dist/chunk-KALKXPC3.js +0 -297
- package/dist/chunk-KKUV25KB.js +0 -361
- package/dist/chunk-KKV3DOAW.js +0 -466
- package/dist/chunk-KL3266RS.js +0 -26
- package/dist/chunk-KNN4P7DZ.js +0 -84
- package/dist/chunk-KP2DZH5Q.js +0 -254
- package/dist/chunk-KZHAJSQR.js +0 -1636
- package/dist/chunk-L36YN45V.js +0 -949
- package/dist/chunk-L5IBT37O.js +0 -263
- package/dist/chunk-LAX5H35R.js +0 -90
- package/dist/chunk-LBKGHMQV.js +0 -1750
- package/dist/chunk-LBTEPL7A.js +0 -1731
- package/dist/chunk-LEBBPTDB.js +0 -1444
- package/dist/chunk-LHI25KS2.js +0 -654
- package/dist/chunk-LHNJSLC6.js +0 -297
- package/dist/chunk-LLH63WVQ.js +0 -98
- package/dist/chunk-LWNJN3IW.js +0 -295
- package/dist/chunk-LWVR2C4G.js +0 -1711
- package/dist/chunk-M3MDTVV2.js +0 -896
- package/dist/chunk-M3QSBCXC.js +0 -52
- package/dist/chunk-M3ZKZQNY.js +0 -282
- package/dist/chunk-M5GNLDEO.js +0 -303
- package/dist/chunk-MBINISSE.js +0 -35
- package/dist/chunk-MFHVGKET.js +0 -267
- package/dist/chunk-MGWSG3PM.js +0 -358
- package/dist/chunk-MGYRVG2A.js +0 -282
- package/dist/chunk-MJNB47HB.js +0 -19
- package/dist/chunk-MLN3JZ2E.js +0 -398
- package/dist/chunk-MM46JVR2.js +0 -359
- package/dist/chunk-MQWTY3JY.js +0 -944
- package/dist/chunk-MWE3PK5S.js +0 -551
- package/dist/chunk-MXR7LXGC.js +0 -1084
- package/dist/chunk-MZZOQHNI.js +0 -642
- package/dist/chunk-N6BRVUAP.js +0 -1805
- package/dist/chunk-N7UVR6SG.js +0 -877
- package/dist/chunk-NIHWGZS4.js +0 -1426
- package/dist/chunk-NMTRH4Q3.js +0 -97
- package/dist/chunk-NSVVHQK5.js +0 -41
- package/dist/chunk-NVI2WE7D.js +0 -443
- package/dist/chunk-NZNNXPEE.js +0 -56
- package/dist/chunk-O7QBO3PH.js +0 -58
- package/dist/chunk-OAUPQBO2.js +0 -270
- package/dist/chunk-OB2LMD7C.js +0 -297
- package/dist/chunk-OEGAHDEU.js +0 -1094
- package/dist/chunk-OHEYBWQU.js +0 -58
- package/dist/chunk-OI5B74HF.js +0 -26
- package/dist/chunk-OI6OXUHJ.js +0 -443
- package/dist/chunk-ONOO74UN.js +0 -361
- package/dist/chunk-OWLQ4HZI.js +0 -282
- package/dist/chunk-OX2VMRMV.js +0 -633
- package/dist/chunk-OXYMB6VB.js +0 -466
- package/dist/chunk-OZS4YOOP.js +0 -59
- package/dist/chunk-P4FYE5TX.js +0 -866
- package/dist/chunk-P5KFWM4H.js +0 -98
- package/dist/chunk-PLFQZ7SS.js +0 -90
- package/dist/chunk-PMVU6BI4.js +0 -1847
- package/dist/chunk-PPNH4Y6U.js +0 -282
- package/dist/chunk-PUMLE7RJ.js +0 -1711
- package/dist/chunk-Q4MFANBF.js +0 -282
- package/dist/chunk-Q54YZ4X3.js +0 -26
- package/dist/chunk-Q6XACQW3.js +0 -1847
- package/dist/chunk-QI6ZDDUR.js +0 -35
- package/dist/chunk-QJ5KLY2S.js +0 -1821
- package/dist/chunk-QLEKZMMU.js +0 -282
- package/dist/chunk-QLNWSBWK.js +0 -567
- package/dist/chunk-QQS7BSPA.js +0 -26
- package/dist/chunk-QUGIYF3F.js +0 -712
- package/dist/chunk-QYSW3K7A.js +0 -282
- package/dist/chunk-QZWTKX5K.js +0 -321
- package/dist/chunk-RGGNGVO3.js +0 -98
- package/dist/chunk-RKJDRVV6.js +0 -443
- package/dist/chunk-RUAJTILD.js +0 -26
- package/dist/chunk-S5BHU353.js +0 -43
- package/dist/chunk-S6YEHFC7.js +0 -654
- package/dist/chunk-SHQUSFH7.js +0 -1426
- package/dist/chunk-SMB4DBMD.js +0 -182
- package/dist/chunk-SNYHQP3D.js +0 -743
- package/dist/chunk-SR2DPCTT.js +0 -1803
- package/dist/chunk-SU63HSUU.js +0 -58
- package/dist/chunk-SXXKZJI2.js +0 -303
- package/dist/chunk-T24L3TBF.js +0 -1717
- package/dist/chunk-T2SPHHYU.js +0 -365
- package/dist/chunk-TAQNSOKT.js +0 -692
- package/dist/chunk-TBA46SVX.js +0 -1805
- package/dist/chunk-TCWKKKPP.js +0 -90
- package/dist/chunk-TDNY4SUA.js +0 -41
- package/dist/chunk-TK4P3V5G.js +0 -56
- package/dist/chunk-TNNF56IQ.js +0 -1750
- package/dist/chunk-TR7E6LYX.js +0 -457
- package/dist/chunk-TVV4JK5G.js +0 -282
- package/dist/chunk-UATXXETW.js +0 -278
- package/dist/chunk-UHFUQWST.js +0 -65
- package/dist/chunk-UKDBQVM3.js +0 -346
- package/dist/chunk-URWUFH45.js +0 -98
- package/dist/chunk-USPT25TC.js +0 -365
- package/dist/chunk-UUSIH3XH.js +0 -1429
- package/dist/chunk-UXDIPRCG.js +0 -26
- package/dist/chunk-UYFNXLKR.js +0 -1436
- package/dist/chunk-UZZFP2EE.js +0 -35
- package/dist/chunk-V4G5Y6YM.js +0 -1094
- package/dist/chunk-V6F7KUWD.js +0 -270
- package/dist/chunk-V6P4LDAV.js +0 -65
- package/dist/chunk-VAA4FG3Z.js +0 -365
- package/dist/chunk-VCZLXRMR.js +0 -254
- package/dist/chunk-VDHXSSBT.js +0 -1426
- package/dist/chunk-VI4KRBSU.js +0 -291
- package/dist/chunk-VM4QMKVK.js +0 -254
- package/dist/chunk-VUXB655T.js +0 -1999
- package/dist/chunk-VWGYKYL2.js +0 -737
- package/dist/chunk-VX2OFBJN.js +0 -1426
- package/dist/chunk-VXVIE6DG.js +0 -84
- package/dist/chunk-W3QH7BF5.js +0 -282
- package/dist/chunk-W4OH7HG4.js +0 -40
- package/dist/chunk-WBVJX4GZ.js +0 -98
- package/dist/chunk-WDU2ZV4I.js +0 -1426
- package/dist/chunk-WGCQNOEQ.js +0 -712
- package/dist/chunk-WZQNHS4J.js +0 -52
- package/dist/chunk-X6VUCICU.js +0 -457
- package/dist/chunk-XAY7FM7Y.js +0 -618
- package/dist/chunk-XFW7B23S.js +0 -282
- package/dist/chunk-XJ3MNGY5.js +0 -58
- package/dist/chunk-XJZ5Z2CM.js +0 -642
- package/dist/chunk-XKVFQTJJ.js +0 -254
- package/dist/chunk-XRLFASCY.js +0 -22
- package/dist/chunk-XZGY5ZJ4.js +0 -35
- package/dist/chunk-Y745CBVB.js +0 -944
- package/dist/chunk-YLBJSXYY.js +0 -944
- package/dist/chunk-YQJIKVPZ.js +0 -1429
- package/dist/chunk-YRM2VCZF.js +0 -457
- package/dist/chunk-YS33KBVJ.js +0 -944
- package/dist/chunk-Z27DZPDG.js +0 -41
- package/dist/chunk-Z6GZHJW5.js +0 -877
- package/dist/chunk-ZXQ5NAEN.js +0 -32
- package/dist/contracts-B552GopR.d.cts +0 -245
- package/dist/contracts-B552GopR.d.ts +0 -245
- package/dist/contracts-Bg1ECISC.d.cts +0 -245
- package/dist/contracts-Bg1ECISC.d.ts +0 -245
- package/dist/contracts-CMriKJ6P.d.cts +0 -245
- package/dist/contracts-CMriKJ6P.d.ts +0 -245
- package/dist/src/components/ErrorBoundary.d.ts +0 -15
- package/dist/src/components/ErrorBoundary.js +0 -119
- package/dist/src/core/catch.d.ts +0 -11
- package/dist/src/core/catch.js +0 -28
- package/dist/src/core/each.d.ts +0 -13
- package/dist/src/core/each.js +0 -68
- package/dist/src/core/for.d.ts +0 -12
- package/dist/src/core/for.js +0 -67
- package/dist/src/core/html.d.ts +0 -137
- package/dist/src/core/html.js +0 -155
- package/dist/src/core/htmlIf.d.ts +0 -11
- package/dist/src/core/htmlIf.js +0 -18
- package/dist/src/core/lazy.d.ts +0 -7
- package/dist/src/core/lazy.js +0 -16
- package/dist/src/core/mount.d.ts +0 -7
- package/dist/src/core/mount.js +0 -12
- package/dist/src/core/slots.d.ts +0 -3
- package/dist/src/core/slots.js +0 -3
- package/dist/src/core/suspense.d.ts +0 -10
- package/dist/src/core/suspense.js +0 -33
- package/dist/src/core/tagFactory.d.ts +0 -13
- package/dist/src/core/tagFactory.js +0 -86
- package/dist/src/core/test.d.ts +0 -11
- package/dist/src/core/test.js +0 -28
- package/dist/src/core/types.d.ts +0 -2
- package/dist/src/core/types.js +0 -1
- package/dist/src/core/useComputed.d.ts +0 -6
- package/dist/src/core/useComputed.js +0 -30
- package/dist/src/core/useEffect.d.ts +0 -6
- package/dist/src/core/useEffect.js +0 -23
- package/dist/src/core/useState.d.ts +0 -10
- package/dist/src/core/useState.js +0 -34
- package/dist/src/core/useStore.d.ts +0 -19
- package/dist/src/core/useStore.js +0 -53
- package/dist/src/core/useWatch.d.ts +0 -8
- package/dist/src/core/useWatch.js +0 -23
- package/dist/src/plugins/i18n.d.ts +0 -6
- package/dist/src/plugins/i18n.js +0 -16
- package/dist/src/plugins/router.d.ts +0 -188
- package/dist/src/plugins/router.js +0 -1178
- package/dist/src/reactivity/bindAttribute.d.ts +0 -5
- package/dist/src/reactivity/bindAttribute.js +0 -31
- package/dist/src/reactivity/bindChildNode.d.ts +0 -10
- package/dist/src/reactivity/bindChildNode.js +0 -46
- package/dist/src/reactivity/bindTextNode.d.ts +0 -10
- package/dist/src/reactivity/bindTextNode.js +0 -27
- package/dist/src/reactivity/signal.d.ts +0 -3
- package/dist/src/reactivity/signal.js +0 -1
- package/dist/src/reactivity/track.d.ts +0 -18
- package/dist/src/reactivity/track.js +0 -73
- package/dist/src/reactivity/useComputed.d.ts +0 -6
- package/dist/src/reactivity/useComputed.js +0 -30
- package/dist/src/reactivity/useEffect.d.ts +0 -6
- package/dist/src/reactivity/useEffect.js +0 -23
- package/dist/src/reactivity/useState.d.ts +0 -10
- package/dist/src/reactivity/useState.js +0 -34
- package/dist/src/reactivity/useStore.d.ts +0 -19
- package/dist/src/reactivity/useStore.js +0 -53
- package/dist/src/reactivity/useWatch.d.ts +0 -8
- package/dist/src/reactivity/useWatch.js +0 -23
- package/dist/src/utils/sanitize.d.ts +0 -1
- package/dist/src/utils/sanitize.js +0 -8
- package/dist/ssr-27FOM46T.js +0 -35
- package/dist/ssr-GEOEYQV7.js +0 -35
- package/dist/ssr-GFUTTSJD.js +0 -22
- package/dist/ssr-K7DCR6BZ.js +0 -35
- package/dist/ssr-NFAIHWJJ.js +0 -35
- package/dist/ssr-O6LFMRFP.js +0 -35
- package/dist/ssr-QZEVGMMK.js +0 -35
- package/dist/ssr-SGVBCAGC.js +0 -35
- package/dist/ssr-UB2IXCYX.js +0 -35
- package/dist/ssr-XBZQNV4O.js +0 -22
- package/dist/ssr-Y76FSXDU.js +0 -35
- package/dist/ssr-YQJ4AYBD.js +0 -35
- package/dist/tagFactory-BDN7gDEp.d.cts +0 -21
- package/dist/tagFactory-BDN7gDEp.d.ts +0 -21
- package/dist/tagFactory-CZPO4RXF.d.cts +0 -34
- package/dist/tagFactory-CZPO4RXF.d.ts +0 -34
- package/dist/tagFactory-CgImPVMY.d.cts +0 -22
- package/dist/tagFactory-CgImPVMY.d.ts +0 -22
- package/dist/tagFactory-Cw1iv5if.d.cts +0 -22
- package/dist/tagFactory-Cw1iv5if.d.ts +0 -22
- package/dist/tagFactory-DeAXq9ef.d.cts +0 -30
- package/dist/tagFactory-DeAXq9ef.d.ts +0 -30
- package/dist/tagFactory-SkY0a7L1.d.cts +0 -22
- package/dist/tagFactory-SkY0a7L1.d.ts +0 -22
package/dist/browser.cjs
CHANGED
|
@@ -25,6 +25,8 @@ __export(browser_exports, {
|
|
|
25
25
|
colorScheme: () => colorScheme,
|
|
26
26
|
draggable: () => draggable,
|
|
27
27
|
dropZone: () => dropZone,
|
|
28
|
+
formatCurrency: () => formatCurrency,
|
|
29
|
+
formatNumber: () => formatNumber,
|
|
28
30
|
geo: () => geo,
|
|
29
31
|
idle: () => idle,
|
|
30
32
|
media: () => media,
|
|
@@ -827,6 +829,20 @@ function colorScheme() {
|
|
|
827
829
|
}
|
|
828
830
|
return { scheme, dispose };
|
|
829
831
|
}
|
|
832
|
+
|
|
833
|
+
// src/browser/format.ts
|
|
834
|
+
function formatNumber(value, options) {
|
|
835
|
+
const { locale, ...formatOptions } = options ?? {};
|
|
836
|
+
return new Intl.NumberFormat(locale, formatOptions).format(value);
|
|
837
|
+
}
|
|
838
|
+
function formatCurrency(value, currency, options) {
|
|
839
|
+
const { locale, ...formatOptions } = options ?? {};
|
|
840
|
+
return new Intl.NumberFormat(locale, {
|
|
841
|
+
style: "currency",
|
|
842
|
+
currency,
|
|
843
|
+
...formatOptions
|
|
844
|
+
}).format(value);
|
|
845
|
+
}
|
|
830
846
|
// Annotate the CommonJS export names for ESM import in node:
|
|
831
847
|
0 && (module.exports = {
|
|
832
848
|
battery,
|
|
@@ -834,6 +850,8 @@ function colorScheme() {
|
|
|
834
850
|
colorScheme,
|
|
835
851
|
draggable,
|
|
836
852
|
dropZone,
|
|
853
|
+
formatCurrency,
|
|
854
|
+
formatNumber,
|
|
837
855
|
geo,
|
|
838
856
|
idle,
|
|
839
857
|
media,
|
package/dist/browser.d.cts
CHANGED
|
@@ -177,4 +177,22 @@ declare function colorScheme(): {
|
|
|
177
177
|
dispose: () => void;
|
|
178
178
|
};
|
|
179
179
|
|
|
180
|
-
|
|
180
|
+
/**
|
|
181
|
+
* Locale-aware number and currency formatting using Intl.NumberFormat.
|
|
182
|
+
*
|
|
183
|
+
* @example
|
|
184
|
+
* ```ts
|
|
185
|
+
* formatNumber(1234567.89); // "1,234,567.89" (locale-dependent)
|
|
186
|
+
* formatNumber(0.85, { style: "percent" }); // "85%"
|
|
187
|
+
* formatCurrency(9.99, "USD"); // "$9.99"
|
|
188
|
+
* formatCurrency(1234, "EUR", { locale: "de-DE" }); // "1.234,00 €"
|
|
189
|
+
* ```
|
|
190
|
+
*/
|
|
191
|
+
declare function formatNumber(value: number, options?: Intl.NumberFormatOptions & {
|
|
192
|
+
locale?: string;
|
|
193
|
+
}): string;
|
|
194
|
+
declare function formatCurrency(value: number, currency: string, options?: Intl.NumberFormatOptions & {
|
|
195
|
+
locale?: string;
|
|
196
|
+
}): string;
|
|
197
|
+
|
|
198
|
+
export { battery, clipboard, colorScheme, draggable, dropZone, formatCurrency, formatNumber, geo, idle, media, online, permissions, resize, scroll, title };
|
package/dist/browser.d.ts
CHANGED
|
@@ -177,4 +177,22 @@ declare function colorScheme(): {
|
|
|
177
177
|
dispose: () => void;
|
|
178
178
|
};
|
|
179
179
|
|
|
180
|
-
|
|
180
|
+
/**
|
|
181
|
+
* Locale-aware number and currency formatting using Intl.NumberFormat.
|
|
182
|
+
*
|
|
183
|
+
* @example
|
|
184
|
+
* ```ts
|
|
185
|
+
* formatNumber(1234567.89); // "1,234,567.89" (locale-dependent)
|
|
186
|
+
* formatNumber(0.85, { style: "percent" }); // "85%"
|
|
187
|
+
* formatCurrency(9.99, "USD"); // "$9.99"
|
|
188
|
+
* formatCurrency(1234, "EUR", { locale: "de-DE" }); // "1.234,00 €"
|
|
189
|
+
* ```
|
|
190
|
+
*/
|
|
191
|
+
declare function formatNumber(value: number, options?: Intl.NumberFormatOptions & {
|
|
192
|
+
locale?: string;
|
|
193
|
+
}): string;
|
|
194
|
+
declare function formatCurrency(value: number, currency: string, options?: Intl.NumberFormatOptions & {
|
|
195
|
+
locale?: string;
|
|
196
|
+
}): string;
|
|
197
|
+
|
|
198
|
+
export { battery, clipboard, colorScheme, draggable, dropZone, formatCurrency, formatNumber, geo, idle, media, online, permissions, resize, scroll, title };
|
package/dist/browser.js
CHANGED
|
@@ -4,6 +4,8 @@ import {
|
|
|
4
4
|
colorScheme,
|
|
5
5
|
draggable,
|
|
6
6
|
dropZone,
|
|
7
|
+
formatCurrency,
|
|
8
|
+
formatNumber,
|
|
7
9
|
geo,
|
|
8
10
|
idle,
|
|
9
11
|
media,
|
|
@@ -12,7 +14,7 @@ import {
|
|
|
12
14
|
resize,
|
|
13
15
|
scroll,
|
|
14
16
|
title
|
|
15
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-4EI4AG32.js";
|
|
16
18
|
import "./chunk-PZEGYCF5.js";
|
|
17
19
|
import "./chunk-CHJ27IGK.js";
|
|
18
20
|
import "./chunk-YECR7UIA.js";
|
|
@@ -24,6 +26,8 @@ export {
|
|
|
24
26
|
colorScheme,
|
|
25
27
|
draggable,
|
|
26
28
|
dropZone,
|
|
29
|
+
formatCurrency,
|
|
30
|
+
formatNumber,
|
|
27
31
|
geo,
|
|
28
32
|
idle,
|
|
29
33
|
media,
|
package/dist/build.cjs
CHANGED
|
@@ -1175,6 +1175,7 @@ __export(index_exports, {
|
|
|
1175
1175
|
object: () => object,
|
|
1176
1176
|
ol: () => ol,
|
|
1177
1177
|
on: () => on,
|
|
1178
|
+
onCleanup: () => onCleanup,
|
|
1178
1179
|
onMount: () => onMount,
|
|
1179
1180
|
onUnmount: () => onUnmount,
|
|
1180
1181
|
optgroup: () => optgroup,
|
|
@@ -1638,7 +1639,7 @@ function bindChildNode(placeholder, getter) {
|
|
|
1638
1639
|
const node = lastNodes[i2];
|
|
1639
1640
|
if (node.parentNode) node.parentNode.removeChild(node);
|
|
1640
1641
|
}
|
|
1641
|
-
if (result == null) {
|
|
1642
|
+
if (result == null || typeof result === "boolean") {
|
|
1642
1643
|
lastNodes.length = 0;
|
|
1643
1644
|
return;
|
|
1644
1645
|
}
|
|
@@ -1653,6 +1654,7 @@ function bindChildNode(placeholder, getter) {
|
|
|
1653
1654
|
if (lastNodes.length < result.length) lastNodes = new Array(result.length);
|
|
1654
1655
|
for (let i2 = 0; i2 < result.length; i2++) {
|
|
1655
1656
|
const item = result[i2];
|
|
1657
|
+
if (item == null || typeof item === "boolean") continue;
|
|
1656
1658
|
const node = item instanceof Node ? item : document.createTextNode(String(item));
|
|
1657
1659
|
parent.insertBefore(node, anchor);
|
|
1658
1660
|
lastNodes[count++] = node;
|
|
@@ -1797,6 +1799,9 @@ function appendChildren(el, nodes) {
|
|
|
1797
1799
|
el.textContent = String(nodes);
|
|
1798
1800
|
return;
|
|
1799
1801
|
}
|
|
1802
|
+
if (typeof nodes === "boolean" || nodes == null) {
|
|
1803
|
+
return;
|
|
1804
|
+
}
|
|
1800
1805
|
if (typeof nodes === "function") {
|
|
1801
1806
|
const ph = document.createComment("");
|
|
1802
1807
|
el.appendChild(ph);
|
|
@@ -1825,11 +1830,11 @@ function appendChildren(el, nodes) {
|
|
|
1825
1830
|
registerDisposer(el, bindChildNode(ph, inner));
|
|
1826
1831
|
} else if (inner instanceof Node) {
|
|
1827
1832
|
el.appendChild(inner);
|
|
1828
|
-
} else if (inner != null) {
|
|
1833
|
+
} else if (inner != null && typeof inner !== "boolean") {
|
|
1829
1834
|
el.appendChild(document.createTextNode(String(inner)));
|
|
1830
1835
|
}
|
|
1831
1836
|
}
|
|
1832
|
-
} else if (c != null) {
|
|
1837
|
+
} else if (c != null && typeof c !== "boolean") {
|
|
1833
1838
|
el.appendChild(document.createTextNode(String(c)));
|
|
1834
1839
|
}
|
|
1835
1840
|
}
|
|
@@ -2298,11 +2303,11 @@ function executeElement(tmpl, values) {
|
|
|
2298
2303
|
const item = val[j];
|
|
2299
2304
|
if (item instanceof Node) {
|
|
2300
2305
|
el.appendChild(item);
|
|
2301
|
-
} else if (item != null) {
|
|
2306
|
+
} else if (item != null && typeof item !== "boolean") {
|
|
2302
2307
|
el.appendChild(document.createTextNode(String(item)));
|
|
2303
2308
|
}
|
|
2304
2309
|
}
|
|
2305
|
-
} else if (val != null) {
|
|
2310
|
+
} else if (val != null && typeof val !== "boolean") {
|
|
2306
2311
|
el.appendChild(document.createTextNode(String(val)));
|
|
2307
2312
|
}
|
|
2308
2313
|
break;
|
|
@@ -2343,11 +2348,11 @@ function html2(strings, ...values) {
|
|
|
2343
2348
|
const item = val[j];
|
|
2344
2349
|
if (item instanceof Node) {
|
|
2345
2350
|
wrapper.appendChild(item);
|
|
2346
|
-
} else if (item != null) {
|
|
2351
|
+
} else if (item != null && typeof item !== "boolean") {
|
|
2347
2352
|
wrapper.appendChild(document.createTextNode(String(item)));
|
|
2348
2353
|
}
|
|
2349
2354
|
}
|
|
2350
|
-
} else if (val != null) {
|
|
2355
|
+
} else if (val != null && typeof val !== "boolean") {
|
|
2351
2356
|
wrapper.appendChild(document.createTextNode(String(val)));
|
|
2352
2357
|
}
|
|
2353
2358
|
break;
|
|
@@ -2573,9 +2578,10 @@ function each(getArray, render, options) {
|
|
|
2573
2578
|
function Fragment(nodes) {
|
|
2574
2579
|
const frag = document.createDocumentFragment();
|
|
2575
2580
|
for (const child of nodes) {
|
|
2576
|
-
if (child == null) continue;
|
|
2581
|
+
if (child == null || typeof child === "boolean") continue;
|
|
2577
2582
|
if (Array.isArray(child)) {
|
|
2578
2583
|
for (const nested of child) {
|
|
2584
|
+
if (nested == null || typeof nested === "boolean") continue;
|
|
2579
2585
|
frag.appendChild(resolveChild(nested));
|
|
2580
2586
|
}
|
|
2581
2587
|
} else {
|
|
@@ -3496,6 +3502,9 @@ function onUnmount(callback, element) {
|
|
|
3496
3502
|
}, element);
|
|
3497
3503
|
}
|
|
3498
3504
|
}
|
|
3505
|
+
function onCleanup(callback, element) {
|
|
3506
|
+
registerDisposer(element, callback);
|
|
3507
|
+
}
|
|
3499
3508
|
|
|
3500
3509
|
// src/core/rendering/context.ts
|
|
3501
3510
|
function context(defaultValue) {
|
package/dist/build.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
index_exports
|
|
3
|
-
} from "./chunk-
|
|
4
|
-
import "./chunk-
|
|
3
|
+
} from "./chunk-MEZVEBPN.js";
|
|
4
|
+
import "./chunk-EWFVA3TJ.js";
|
|
5
5
|
import "./chunk-CZUGLNJS.js";
|
|
6
6
|
import "./chunk-Z65KYU7I.js";
|
|
7
|
-
import "./chunk-
|
|
7
|
+
import "./chunk-MDVXJWFN.js";
|
|
8
8
|
import "./chunk-SDLZDHKP.js";
|
|
9
9
|
import "./chunk-FGOEVHY3.js";
|
|
10
10
|
import "./chunk-PZEGYCF5.js";
|
package/dist/cdn.global.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
"use strict";var Sibu=(()=>{var ke=Object.defineProperty;var po=Object.getOwnPropertyDescriptor;var fo=Object.getOwnPropertyNames;var mo=Object.prototype.hasOwnProperty;var Ie=(r,e)=>{for(var t in e)ke(r,t,{get:e[t],enumerable:!0})},go=(r,e,t,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of fo(e))!mo.call(r,o)&&o!==t&&ke(r,o,{get:()=>e[o],enumerable:!(n=po(e,o))||n.enumerable});return r};var ho=r=>go(ke({},"__esModule",{value:!0}),r);var Ko={};Ie(Ko,{DynamicComponent:()=>Mr,ErrorBoundary:()=>ao,Fragment:()=>_r,KeepAlive:()=>Br,Loading:()=>lo,Portal:()=>Nr,SVG_NS:()=>y,Suspense:()=>je,a:()=>wt,abbr:()=>Ct,action:()=>Kr,address:()=>ct,area:()=>Jt,array:()=>eo,article:()=>nt,aside:()=>at,audio:()=>Xt,b:()=>_t,base:()=>Gn,batch:()=>ve,bdi:()=>Nt,bdo:()=>At,bindDynamic:()=>Ce,blockquote:()=>mt,body:()=>Xe,br:()=>Lt,button:()=>ye,canvas:()=>mn,caption:()=>yn,catchError:()=>qr,catchErrorAsync:()=>Ur,center:()=>br,checkLeaks:()=>Ye,circle:()=>Zn,cite:()=>Mt,clickOutside:()=>zr,clipPath:()=>cr,code:()=>Ot,col:()=>vn,colgroup:()=>Tn,context:()=>io,customElement:()=>vr,data:()=>Rt,datalist:()=>An,dd:()=>gt,deepEqual:()=>ie,deepSignal:()=>no,defs:()=>ar,del:()=>bn,derived:()=>z,details:()=>Un,dfn:()=>Ht,dialog:()=>Wn,disableSSR:()=>Ke,dispose:()=>O,div:()=>E,dl:()=>ht,dt:()=>bt,each:()=>wr,effect:()=>oe,ellipse:()=>Jn,em:()=>Dt,embed:()=>on,enableSSR:()=>Be,enqueueBatchedSignal:()=>Z,fieldset:()=>Ln,figcaption:()=>xt,figure:()=>yt,font:()=>xr,footer:()=>ot,form:()=>Mn,g:()=>Xn,getSlot:()=>Or,h1:()=>lt,h2:()=>dt,h3:()=>xe,h4:()=>ut,h5:()=>pt,h6:()=>ft,head:()=>Je,header:()=>rt,hr:()=>vt,html:()=>Le,i:()=>Bt,iframe:()=>sn,img:()=>en,input:()=>On,ins:()=>xn,isBatching:()=>Fr,isSSR:()=>J,kbd:()=>Kt,label:()=>Rn,lazy:()=>Pe,legend:()=>Hn,li:()=>Tt,line:()=>er,linearGradient:()=>ur,link:()=>Qn,longPress:()=>Pr,main:()=>st,map:()=>tn,mark:()=>zt,marker:()=>hr,marquee:()=>yr,mask:()=>lr,match:()=>Dr,math:()=>fn,memo:()=>Jr,memoFn:()=>Xr,menu:()=>Fn,meta:()=>Yn,meter:()=>Dn,mount:()=>kr,nav:()=>it,noscript:()=>gn,object:()=>an,ol:()=>St,on:()=>Gr,onMount:()=>ze,onUnmount:()=>oo,optgroup:()=>Bn,option:()=>Kn,output:()=>zn,p:()=>be,param:()=>cn,path:()=>tr,pattern:()=>dr,picture:()=>ln,polygon:()=>nr,polyline:()=>rr,portal:()=>dn,pre:()=>Et,progress:()=>Pn,q:()=>Pt,radialGradient:()=>pr,reactiveArray:()=>to,rect:()=>or,ref:()=>Zr,registerComponent:()=>Ar,registerDisposer:()=>w,resolveComponent:()=>Oe,rp:()=>jt,rt:()=>qt,ruby:()=>Ut,s:()=>Wt,samp:()=>Ft,script:()=>hn,section:()=>tt,select:()=>jn,setGlobalErrorHandler:()=>Wr,show:()=>Rr,signal:()=>C,slot:()=>Vn,small:()=>It,source:()=>un,span:()=>H,stop:()=>fr,store:()=>Yr,strong:()=>Vt,style:()=>Y,sub:()=>$t,summary:()=>In,sup:()=>Gt,svg:()=>pn,symbol:()=>gr,table:()=>Sn,tagFactory:()=>s,tbody:()=>kn,td:()=>En,template:()=>$n,text:()=>ir,textarea:()=>qn,tfoot:()=>wn,th:()=>Cn,thead:()=>_n,time:()=>Qt,title:()=>et,tr:()=>Nn,track:()=>nn,trapFocus:()=>jr,tspan:()=>sr,u:()=>Yt,ul:()=>kt,unregisterComponent:()=>Lr,untracked:()=>G,use:()=>mr,var_:()=>Zt,video:()=>rn,watch:()=>Qr,when:()=>Hr,withSSR:()=>Vr,writable:()=>ro});var Ue={};Ie(Ue,{DynamicComponent:()=>Mr,ErrorBoundary:()=>ao,Fragment:()=>_r,KeepAlive:()=>Br,Loading:()=>lo,Portal:()=>Nr,SVG_NS:()=>y,Suspense:()=>je,a:()=>wt,abbr:()=>Ct,action:()=>Kr,address:()=>ct,area:()=>Jt,array:()=>eo,article:()=>nt,aside:()=>at,audio:()=>Xt,b:()=>_t,base:()=>Gn,batch:()=>ve,bdi:()=>Nt,bdo:()=>At,bindDynamic:()=>Ce,blockquote:()=>mt,body:()=>Xe,br:()=>Lt,button:()=>ye,canvas:()=>mn,caption:()=>yn,catchError:()=>qr,catchErrorAsync:()=>Ur,center:()=>br,checkLeaks:()=>Ye,circle:()=>Zn,cite:()=>Mt,clickOutside:()=>zr,clipPath:()=>cr,code:()=>Ot,col:()=>vn,colgroup:()=>Tn,context:()=>io,customElement:()=>vr,data:()=>Rt,datalist:()=>An,dd:()=>gt,deepEqual:()=>ie,deepSignal:()=>no,defs:()=>ar,del:()=>bn,derived:()=>z,details:()=>Un,dfn:()=>Ht,dialog:()=>Wn,disableSSR:()=>Ke,dispose:()=>O,div:()=>E,dl:()=>ht,dt:()=>bt,each:()=>wr,effect:()=>oe,ellipse:()=>Jn,em:()=>Dt,embed:()=>on,enableSSR:()=>Be,enqueueBatchedSignal:()=>Z,fieldset:()=>Ln,figcaption:()=>xt,figure:()=>yt,font:()=>xr,footer:()=>ot,form:()=>Mn,g:()=>Xn,getSlot:()=>Or,h1:()=>lt,h2:()=>dt,h3:()=>xe,h4:()=>ut,h5:()=>pt,h6:()=>ft,head:()=>Je,header:()=>rt,hr:()=>vt,html:()=>Le,i:()=>Bt,iframe:()=>sn,img:()=>en,input:()=>On,ins:()=>xn,isBatching:()=>Fr,isSSR:()=>J,kbd:()=>Kt,label:()=>Rn,lazy:()=>Pe,legend:()=>Hn,li:()=>Tt,line:()=>er,linearGradient:()=>ur,link:()=>Qn,longPress:()=>Pr,main:()=>st,map:()=>tn,mark:()=>zt,marker:()=>hr,marquee:()=>yr,mask:()=>lr,match:()=>Dr,math:()=>fn,memo:()=>Jr,memoFn:()=>Xr,menu:()=>Fn,meta:()=>Yn,meter:()=>Dn,mount:()=>kr,nav:()=>it,noscript:()=>gn,object:()=>an,ol:()=>St,on:()=>Gr,onMount:()=>ze,onUnmount:()=>oo,optgroup:()=>Bn,option:()=>Kn,output:()=>zn,p:()=>be,param:()=>cn,path:()=>tr,pattern:()=>dr,picture:()=>ln,polygon:()=>nr,polyline:()=>rr,portal:()=>dn,pre:()=>Et,progress:()=>Pn,q:()=>Pt,radialGradient:()=>pr,reactiveArray:()=>to,rect:()=>or,ref:()=>Zr,registerComponent:()=>Ar,registerDisposer:()=>w,resolveComponent:()=>Oe,rp:()=>jt,rt:()=>qt,ruby:()=>Ut,s:()=>Wt,samp:()=>Ft,script:()=>hn,section:()=>tt,select:()=>jn,setGlobalErrorHandler:()=>Wr,show:()=>Rr,signal:()=>C,slot:()=>Vn,small:()=>It,source:()=>un,span:()=>H,stop:()=>fr,store:()=>Yr,strong:()=>Vt,style:()=>Y,sub:()=>$t,summary:()=>In,sup:()=>Gt,svg:()=>pn,symbol:()=>gr,table:()=>Sn,tagFactory:()=>s,tbody:()=>kn,td:()=>En,template:()=>$n,text:()=>ir,textarea:()=>qn,tfoot:()=>wn,th:()=>Cn,thead:()=>_n,time:()=>Qt,title:()=>et,tr:()=>Nn,track:()=>nn,trapFocus:()=>jr,tspan:()=>sr,u:()=>Yt,ul:()=>kt,unregisterComponent:()=>Lr,untracked:()=>G,use:()=>mr,var_:()=>Zt,video:()=>rn,watch:()=>Qr,when:()=>Hr,withSSR:()=>Vr,writable:()=>ro});function _(){return typeof globalThis.__SIBU_DEV__<"u"?!!globalThis.__SIBU_DEV__:typeof __SIBU_DEV__<"u"?__SIBU_DEV__:!0}var Ve=_();function N(r,e){if(Ve&&!r)throw new Error(`[Sibu] ${e}`)}function L(r){Ve&&console.warn(`[Sibu] ${r}`)}function P(r){let e=r.replace(/[\x00-\x20\x7f-\x9f]+/g,"").trim();if(!e)return"";let t=e.toLowerCase();return t.startsWith("javascript:")||t.startsWith("data:")||t.startsWith("vbscript:")||t.startsWith("blob:")?"":e}function Ee(r){let e=r.toLowerCase().replace(/\s+/g,"");return e.includes("url(")||e.includes("expression(")||e.includes("javascript:")||e.includes("-moz-binding")?"":r}var bo=new Set(["href","src","action","formaction","cite","poster","background","srcset"]);function j(r){return bo.has(r)}var xo=_(),V=new Array(32),$=32,R=-1,K=null,yo=new WeakMap,q="__s",D=0,S=[],M=new Set;function te(r){try{r()}catch(e){xo&&L(`Subscriber threw during notification: ${e instanceof Error?e.message:String(e)}`)}}var pe=0,fe=!1;function x(r,e){e||(e=r),$e(e),++R,R>=$&&($*=2,V.length=$),V[R]=e,K=e;try{r()}finally{R--,K=R>=0?V[R]:null}return()=>$e(e)}function vo(){pe===0&&(++R,R>=$&&($*=2,V.length=$),V[R]=null,K=null,fe=!0),pe++}function To(){pe--,pe===0&&(R--,K=R>=0?V[R]:null,fe=!1)}function G(r){vo();try{return r()}finally{To()}}function Q(r){if(!K)return;let e=K;if(e._dep===r)return;let t=e._deps;if(t){if(t.has(r))return;t.add(r)}else if(e._dep!==void 0){let o=new Set;o.add(e._dep),o.add(r),e._deps=o,e._dep=void 0}else e._dep=r;let n=r[q];n||(n=new Set,yo.set(r,n),r[q]=n),n.add(K),n.size===1?r.__f=K:r.__f!==void 0&&(r.__f=void 0)}function Ge(r){let e=r[q];if(e)for(let t of e)t._c?I(t):M.has(t)||(M.add(t),S.push(t))}function Qe(){if(!(D>0)){D++;try{let r=0;for(;r<S.length;)te(S[r]),r++}finally{S.length=0,M.clear(),D--}}}function I(r){r();let e=r._sig;for(;e;){let t=e.__f;if(t){if(t._c){let i=t._sig;i._d=!0,e=i;continue}M.has(t)||(M.add(t),S.push(t));break}let n=e[q];if(!n)break;let o;for(let i of n)if(i._c){i();let a=i._sig;a&&!o?o=a:a&&I(i)}else M.has(i)||(M.add(i),S.push(i));e=o}}function me(r){let e=r.__f;if(e){if(D>0){e._c?I(e):M.has(e)||(M.add(e),S.push(e));return}D++;try{e._c?I(e):te(e);let n=0;for(;n<S.length;)te(S[n]),n++}finally{S.length=0,M.clear(),D--}return}let t=r[q];if(!(!t||t.size===0)){if(D>0){for(let n of t)n._c?I(n):M.has(n)||(M.add(n),S.push(n));return}D++;try{let n=0;for(let i of t)S[n++]=i;for(let i=0;i<n;i++)S[i]._c&&I(S[i]);for(let i=0;i<n;i++)S[i]._c||M.has(S[i])||te(S[i]);let o=n;for(;o<S.length;)te(S[o]),o++}finally{S.length=0,M.clear(),D--}}}function $e(r){let e=r,t=e._dep;if(t!==void 0){let o=t[q];o&&(o.delete(r),t.__f===r&&(t.__f=void 0)),e._dep=void 0;return}let n=e._deps;if(!(!n||n.size===0)){for(let o of n){let i=o[q];i&&(i.delete(r),o.__f===r&&(o.__f=void 0))}n.clear()}}var we=_();function ge(r,e,t){function n(){let i;try{i=t()}catch(c){we&&L(`bindAttribute: getter for "${e}" threw: ${c instanceof Error?c.message:String(c)}`);return}if(typeof i=="boolean"){e in r&&(e==="checked"||e==="disabled"||e==="selected")?r[e]=i:i?r.setAttribute(e,""):r.removeAttribute(e);return}let a=String(i);(e==="value"||e==="checked")&&e in r?r[e]=e==="checked"?!!i:a:r.setAttribute(e,j(e)?P(a):a)}return x(n)}function Ce(r,e,t){let n=null;function o(){let a;try{a=typeof e=="function"?e():e}catch(d){we&&L(`bindDynamic: name getter threw: ${d instanceof Error?d.message:String(d)}`);return}let c;try{c=typeof t=="function"?t():t}catch(d){we&&L(`bindDynamic: value getter threw: ${d instanceof Error?d.message:String(d)}`);return}if((a[0]==="o"||a[0]==="O")&&(a[1]==="n"||a[1]==="N"))return;n!==null&&n!==a&&r.removeAttribute(n);let l=String(c);(a==="value"||a==="checked")&&a in r?r[a]=a==="checked"?!!c:l:r.setAttribute(a,j(a)?P(l):l),n=a}let i=x(o);return()=>{i(),n!==null&&r.removeAttribute(n)}}var So=_();function U(r,e){let t=[];function n(){let o;try{o=e()}catch(l){So&&L(`bindChildNode: getter threw: ${l instanceof Error?l.message:String(l)}`);return}for(let l=0;l<t.length;l++){let d=t[l];d.parentNode&&d.parentNode.removeChild(d)}if(o==null){t.length=0;return}let i=r.parentNode;if(!i){t.length=0;return}let a=r.nextSibling,c=0;if(Array.isArray(o)){t.length<o.length&&(t=new Array(o.length));for(let l=0;l<o.length;l++){let d=o[l],u=d instanceof Node?d:document.createTextNode(String(d));i.insertBefore(u,a),t[c++]=u}}else{t.length<1&&(t=[null]);let l=o instanceof Node?o:document.createTextNode(String(o));i.insertBefore(l,a),t[c++]=l}t.length=c}return x(n)}var he=new WeakMap,_e=_(),ne=0;function w(r,e){let t=he.get(r);t||(t=[],he.set(r,t)),t.push(e),_e&&ne++}function O(r){let e=[r],t=[];for(;e.length>0;){let n=e.pop();t.push(n);let o=n.childNodes;for(let i=0;i<o.length;i++)e.push(o[i])}for(let n=t.length-1;n>=0;n--){let o=t[n],i=he.get(o);if(i){_e&&(ne-=i.length);for(let a of i)a();he.delete(o)}}}function Ye(r=0){return _e?(r>0&&ne>r&&L(`checkLeaks: ${ne} active DOM bindings detected. Expected \u2264${r}. This may indicate a component was removed from the DOM without calling dispose().`),ne):0}var y="http://www.w3.org/2000/svg",Ze=new Map;function ko(r){let e=Ze.get(r);return e!==void 0||(e=r.replace(/[A-Z]/g,t=>`-${t.toLowerCase()}`),Ze.set(r,e)),e}function Eo(r,e){if(typeof e=="function"){let n=x(()=>{r.setAttribute("style",e())});w(r,n);return}if(typeof e=="string"){r.setAttribute("style",e);return}let t=r;for(let n in e){let o=e[n],i=ko(n);if(typeof o=="function"){let a=o,c=x(()=>{t.style.setProperty(i,Ee(String(a())))});w(r,c)}else t.style.setProperty(i,Ee(String(o)))}}function wo(r,e){if(typeof e=="string"){r.setAttribute("class",e);return}if(typeof e=="function"){let i=x(()=>{r.setAttribute("class",e())});w(r,i);return}let t=e,n=!1,o="";for(let i in t){let a=t[i];if(typeof a=="function"){n=!0;break}a&&(o=o?`${o} ${i}`:i)}if(n){let a=x(()=>{let c="";for(let l in t){let d=t[l];(typeof d=="function"?d():d)&&(c=c?`${c} ${l}`:l)}r.setAttribute("class",c)});w(r,a)}else r.setAttribute("class",o)}function Ne(r,e){if(typeof e=="string"){r.textContent=e;return}if(typeof e=="number"){r.textContent=String(e);return}if(typeof e=="function"){let t=document.createComment("");r.appendChild(t),w(r,U(t,e));return}if(e instanceof Node){r.appendChild(e);return}if(Array.isArray(e))for(let t=0;t<e.length;t++){let n=e[t];if(typeof n=="function"){let o=document.createComment("");r.appendChild(o),w(r,U(o,n))}else if(n instanceof Node)r.appendChild(n);else if(Array.isArray(n))for(let o=0;o<n.length;o++){let i=n[o];if(typeof i=="function"){let a=document.createComment("");r.appendChild(a),w(r,U(a,i))}else i instanceof Node?r.appendChild(i):i!=null&&r.appendChild(document.createTextNode(String(i)))}else n!=null&&r.appendChild(document.createTextNode(String(n)))}}var s=(r,e)=>(t,n)=>{let o=e?document.createElementNS(e,r):document.createElement(r);if(t===void 0)return o;if(n===void 0&&typeof t=="string")return o.textContent=t,o;if(n!==void 0)return o.setAttribute("class",t),Ne(o,n),o;if(Array.isArray(t)||t instanceof Node)return Ne(o,t),o;let i=t,a=i.class;a!=null&&wo(o,a);let c=i.id;c!=null&&(o.id=c);let l=i.nodes;l!=null&&Ne(o,l);let d=i.on;if(d)for(let m in d)o.addEventListener(m,d[m]);let u=i.style;u!=null&&Eo(o,u);let f=i.ref;f&&(f.current=o);for(let m in i)switch(m){case"class":case"id":case"nodes":case"on":case"style":case"ref":case"onElement":continue;default:{let p=i[m];if(p==null||p===!1||m[0]==="o"&&m[1]==="n")continue;if(typeof p=="function")w(o,ge(o,m,p));else if(p===!0)o.setAttribute(m,"");else{let g=String(p);o.setAttribute(m,j(m)?P(g):g)}}}return i.onElement&&typeof i.onElement=="function"&&i.onElement(o),o};var ii=s("html"),Je=s("head"),Xe=s("body"),et=s("title"),E=s("div"),H=s("span"),tt=s("section"),nt=s("article"),rt=s("header"),ot=s("footer"),it=s("nav"),st=s("main"),at=s("aside"),ct=s("address"),be=s("p"),lt=s("h1"),dt=s("h2"),xe=s("h3"),ut=s("h4"),pt=s("h5"),ft=s("h6"),mt=s("blockquote"),gt=s("dd"),ht=s("dl"),bt=s("dt"),xt=s("figcaption"),yt=s("figure"),vt=s("hr"),Tt=s("li"),St=s("ol"),kt=s("ul"),Et=s("pre"),wt=s("a"),Ct=s("abbr"),_t=s("b"),Nt=s("bdi"),At=s("bdo"),Lt=s("br"),Mt=s("cite"),Ot=s("code"),Rt=s("data"),Ht=s("dfn"),Dt=s("em"),Bt=s("i"),Kt=s("kbd"),zt=s("mark"),Pt=s("q"),jt=s("rp"),qt=s("rt"),Ut=s("ruby"),Wt=s("s"),Ft=s("samp"),It=s("small"),Vt=s("strong"),$t=s("sub"),Gt=s("sup"),Qt=s("time"),Yt=s("u"),Zt=s("var"),Jt=s("area"),Xt=s("audio"),en=s("img"),tn=s("map"),nn=s("track"),rn=s("video"),on=s("embed"),sn=s("iframe"),an=s("object"),cn=s("param"),ln=s("picture"),dn=s("portal"),un=s("source"),pn=s("svg",y),fn=s("math"),mn=s("canvas"),gn=s("noscript"),hn=s("script"),bn=s("del"),xn=s("ins"),yn=s("caption"),vn=s("col"),Tn=s("colgroup"),Sn=s("table"),kn=s("tbody"),En=s("td"),wn=s("tfoot"),Cn=s("th"),_n=s("thead"),Nn=s("tr"),ye=s("button"),An=s("datalist"),Ln=s("fieldset"),Mn=s("form"),On=s("input"),Rn=s("label"),Hn=s("legend"),Dn=s("meter"),Bn=s("optgroup"),Kn=s("option"),zn=s("output"),Pn=s("progress"),jn=s("select"),qn=s("textarea"),Un=s("details"),Wn=s("dialog"),Fn=s("menu"),In=s("summary"),Vn=s("slot"),$n=s("template"),Gn=s("base"),Qn=s("link"),Yn=s("meta"),Y=s("style"),Zn=s("circle",y),Jn=s("ellipse",y),Xn=s("g",y),er=s("line",y),tr=s("path",y),nr=s("polygon",y),rr=s("polyline",y),or=s("rect",y),ir=s("text",y),sr=s("tspan",y),ar=s("defs",y),cr=s("clipPath",y),lr=s("mask",y),dr=s("pattern",y),ur=s("linearGradient",y),pr=s("radialGradient",y),fr=s("stop",y),mr=s("use",y),gr=s("symbol",y),hr=s("marker",y),br=s("center"),xr=s("font"),yr=s("marquee"),vr=r=>s(r);var Co=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]),Tr=new Set(["svg","circle","ellipse","g","line","path","polygon","polyline","rect","text","tspan","defs","clipPath","mask","pattern","linearGradient","radialGradient","stop","use","symbol","marker"]),Sr=new WeakMap;function _o(r){let e=r.length-1,t=r[0];for(let p=0;p<e;p++)t+=`\0${p}\0${r[p+1]}`;let n=0,o=t.length;function i(){for(;n<o&&(t[n]===" "||t[n]===" "||t[n]===`
|
|
2
|
-
`||t[n]==="\r");)n++}function a(){if(t.charCodeAt(n)!==0)return-1;let p=n;n++;let g=0;for(;n<o&&t.charCodeAt(n)!==0;)g=g*10+(t.charCodeAt(n)-48),n++;return n<o&&n++,g<0||g>=e?(n=p,-1):g}function c(){let p=n;for(;n<o;){let g=t.charCodeAt(n);if(g>=97&&g<=122||g>=65&&g<=90||g>=48&&g<=57||g===45)n++;else break}return t.slice(p,n)}function l(){if(i(),t[n]!=="=")return{kind:"bool"};n++,i();let p=a();if(p>=0)return{kind:"expr",idx:p};let g=t[n];if(g==='"'||g==="'"){n++;let b=[],B=[],F="";for(;n<o&&t[n]!==g;){let X=a();X>=0?(b.push(F),F="",B.push(X)):F+=t[n++]}return n<o&&n++,b.push(F),B.length===0?{kind:"static",value:b[0]}:{kind:"mixed",statics:b,exprs:B}}let T=n;for(;n<o;){let b=t.charCodeAt(n);if(b===32||b===9||b===10||b===13||b===62||b===47)break;n++}return{kind:"static",value:t.slice(T,n)}}function d(){let p=[];for(;n<o&&(i(),!(t[n]===">"||t[n]==="/"));){let g=n;for(;n<o;){let b=t.charCodeAt(n);if(b>=97&&b<=122||b>=65&&b<=90||b>=48&&b<=57||b===45||b===58||b===95||b===46)n++;else break}let T=t.slice(g,n);if(!T)break;let v=l();T.startsWith("on:")?v.kind==="expr"&&p.push({t:3,name:T.slice(3),idx:v.idx}):v.kind==="bool"?p.push({t:4,name:T}):v.kind==="static"?p.push({t:0,name:T,value:v.value}):v.kind==="expr"?p.push({t:1,name:T,idx:v.idx}):v.kind==="mixed"&&p.push({t:2,name:T,statics:v.statics,exprs:v.exprs})}return p}function u(p){return p.replace(/\s+/g," ")}function f(p){let g="";for(;n<o&&t[n]!=="<";){let v=a();if(v>=0){let b=u(g);b&&p.push({t:1,value:b}),g="",p.push({t:2,idx:v})}else g+=t[n++]}let T=u(g);T&&p.push({t:1,value:T})}function m(){let p=[];for(;n<o&&!(t[n]==="<"&&n+1<o&&t[n+1]==="/");)if(t[n]==="<"){n++;let g=c(),T=d();i();let v=Co.has(g),b=t[n]==="/";if(b&&n++,n<o&&n++,v||b)p.push({t:0,el:{tag:g,svg:Tr.has(g),attrs:T,children:[]}});else{let B=m();t[n]==="<"&&n+1<o&&t[n+1]==="/"&&(n+=2,c(),i(),n<o&&t[n]===">"&&n++),p.push({t:0,el:{tag:g,svg:Tr.has(g),attrs:T,children:B}})}}else f(p);return p}return m()}function Ae(r,e){let t=r.svg?document.createElementNS(y,r.tag):document.createElement(r.tag);for(let n=0;n<r.attrs.length;n++){let o=r.attrs[n];switch(o.t){case 0:t.setAttribute(o.name,o.value);break;case 1:{let i=o.name;if(i[0]==="o"&&i[1]==="n")break;let a=e[o.idx];if(typeof a=="function")w(t,ge(t,i,a));else if(a!=null){let c=String(a);t.setAttribute(i,j(i)?P(c):c)}break}case 2:{let i=o.statics[0];for(let a=0;a<o.exprs.length;a++)i+=String(e[o.exprs[a]])+o.statics[a+1];t.setAttribute(o.name,i);break}case 3:t.addEventListener(o.name,e[o.idx]);break;case 4:t.setAttribute(o.name,"");break}}for(let n=0;n<r.children.length;n++){let o=r.children[n];switch(o.t){case 0:t.appendChild(Ae(o.el,e));break;case 1:t.appendChild(document.createTextNode(o.value));break;case 2:{let i=e[o.idx];if(typeof i=="function"){let a=document.createComment("");t.appendChild(a),w(t,U(a,i))}else if(i instanceof Node)t.appendChild(i);else if(Array.isArray(i))for(let a=0;a<i.length;a++){let c=i[a];c instanceof Node?t.appendChild(c):c!=null&&t.appendChild(document.createTextNode(String(c)))}else i!=null&&t.appendChild(document.createTextNode(String(i)));break}}}return t}function Le(r,...e){let t=Sr.get(r);if(t||(t=_o(r),Sr.set(r,t)),t.length===1&&t[0].t===0)return Ae(t[0].el,e);let n=document.createElement("div");for(let o=0;o<t.length;o++){let i=t[o];switch(i.t){case 0:n.appendChild(Ae(i.el,e));break;case 1:n.appendChild(document.createTextNode(i.value));break;case 2:{let a=e[i.idx];if(a instanceof Node)n.appendChild(a);else if(typeof a=="function"){let c=document.createComment("bind:htm");n.appendChild(c),w(n,U(c,a))}else if(Array.isArray(a))for(let c=0;c<a.length;c++){let l=a[c];l instanceof Node?n.appendChild(l):l!=null&&n.appendChild(document.createTextNode(String(l)))}else a!=null&&n.appendChild(document.createTextNode(String(a)));break}}}return n.childNodes.length===1&&n.firstChild instanceof Element?n.firstChild:n}function kr(r,e){if(!e)throw new Error("[Sibu] mount: container element not found. Make sure the DOM element exists before calling mount().");N(typeof r=="function"||r instanceof Node,"mount: first argument must be a component function or a DOM Node.");let t=typeof performance<"u"?performance.now():0,n=typeof r=="function"?r():r,o=typeof performance<"u"?performance.now()-t:0;e.appendChild(n);let i=globalThis.__SIBU_DEVTOOLS_GLOBAL_HOOK__;return i&&i.emit("app:init",{rootElement:n,container:e,duration:o}),{node:n,unmount(){i&&i.emit("app:unmount",{rootElement:n}),O(n),n.parentNode&&n.parentNode.removeChild(n)}}}var No=_();function Er(r){return typeof r=="function"?Er(r()):r instanceof Node?r:document.createTextNode(String(r))}function Ao(r,e){if(e===0)return[];let t=[],n=new Array(e);for(let c=0;c<e;c++){let l=r[c],d=0,u=t.length;for(;d<u;){let f=d+u>>1;r[t[f]]<l?d=f+1:u=f}t[d]=c,n[c]=d>0?t[d-1]:-1}let o=t.length,i=new Array(o),a=t[o-1];for(let c=o-1;c>=0;c--)i[c]=a,a=n[a];return i}function wr(r,e,t){N(typeof r=="function","each: first argument must be a function that returns an array."),N(typeof e=="function","each: second argument must be a render function."),N(t&&typeof t.key=="function","each: options.key must be a function that returns a unique key per item.");let n=document.createComment("each:anchor"),o=document.createComment("each:end"),i=[],a=[],c=i,l=0,d=new Map,u=new Map,f=[],m=[],p=new Uint8Array(0),g=new Map,T=[],v=[],b=!1,B=!1,F=t.key,X=()=>{let Te=r(),k=Te.length,ae=n.parentNode;if(!ae)return;B||(ae.insertBefore(o,n.nextSibling),B=!0),m.length<k&&(m=new Array(k));for(let h=0;h<k;h++)m[h]=F(Te[h]);let ce=m;f.length<k&&(f=new Array(k)),u.clear();for(let h=0;h<k;h++){let A=ce[h],Fe=d.get(A),ee;if(Fe!==void 0)ee=Fe;else try{ee=Er(e(Te[h],h))}catch(Se){No&&L(`each: render threw for item at index ${h} (key="${ce[h]}"): ${Se instanceof Error?Se.message:String(Se)}`),ee=document.createComment(`each:error:${h}`)}u.set(A,ee),f[h]=ee}for(let[h,A]of d)u.has(h)||(O(A),A.parentNode&&ae.removeChild(A));if(k===0){l=0;let h=d;d=u,u=h;return}g.clear();for(let h=0;h<l;h++)g.set(c[h],h);T.length<k&&(T=new Array(k),v=new Array(k));let le=0;for(let h=0;h<k;h++){let A=g.get(ce[h]);A!==void 0&&(T[le]=h,v[le]=A,le++)}let We=Ao(v,le);p.length<k?p=new Uint8Array(k):p.fill(0,0,k);for(let h=0;h<We.length;h++)p[T[We[h]]]=1;let de=o;for(let h=k-1;h>=0;h--){let A=f[h];p[h]||A.nextSibling!==de&&ae.insertBefore(A,de),de=A}let ue=c===i?a:i;ue.length<k&&(ue.length=k);for(let h=0;h<k;h++)ue[h]=ce[h];c=ue,l=k;let uo=d;d=u,u=uo,b=!0};return x(X),b||queueMicrotask(()=>{!b&&n.parentNode&&X()}),n}function _r(r){let e=document.createDocumentFragment();for(let t of r)if(t!=null)if(Array.isArray(t))for(let n of t)e.appendChild(Cr(n));else e.appendChild(Cr(t));return e}function Cr(r){if(r==null)return document.createTextNode("");if(r instanceof Node)return r;if(typeof r=="function"){let e=r();return e instanceof Node?e:document.createTextNode(String(e??""))}return document.createTextNode(String(r))}function Nr(r,e){let t=document.createComment("portal"),n=e||document.body,o=null;queueMicrotask(()=>{try{o=r(),n.appendChild(o)}catch(a){console.error("[Portal] Render error:",a)}});let i=new MutationObserver(()=>{!t.isConnected&&o&&(o.remove(),o=null,i.disconnect())});return queueMicrotask(()=>{t.parentNode&&i.observe(t.parentNode,{childList:!0})}),t}var Me=new Map;function Ar(r,e){Me.set(r,e)}function Lr(r){Me.delete(r)}function Oe(r){let e=Me.get(r);return e?e():E({nodes:`[Component "${r}" not found]`})}function Mr(r){let e=E({class:"sibu-dynamic"});function t(){let n=r(),o;typeof n=="function"?o=n():o=Oe(n);for(let i of Array.from(e.childNodes))O(i);e.replaceChildren(o)}return x(t),e}function Or(r,e="default"){return r?.[e]}function Rr(r,e){return x(()=>{e.style.display=r()?"":"none"}),e}function Hr(r,e,t){let n=document.createComment("when"),o=null,i,a=!1,c=()=>{let l=r(),d=n.parentNode;if(!d||a&&l===i)return;i=l,o?.parentNode&&(O(o),o.parentNode.removeChild(o),o=null);let u=l?e():t?t():null;if(u!=null){let f=u instanceof Node?u:document.createTextNode(String(u));d.insertBefore(f,n.nextSibling),o=f}a=!0};return x(c),a||queueMicrotask(()=>{!a&&n.parentNode&&c()}),n}function Dr(r,e,t){let n=document.createComment("match"),o=null,i,a=!1,c=()=>{let l=String(r()),d=n.parentNode;if(!d||a&&l===i)return;i=l,o?.parentNode&&(O(o),o.parentNode.removeChild(o),o=null);let u=e[l]||t;if(u){let f=u();if(f!=null){let m=f instanceof Node?f:document.createTextNode(String(f));d.insertBefore(m,n.nextSibling),o=m}}a=!0};return x(c),a||queueMicrotask(()=>{!a&&n.parentNode&&c()}),n}function Br(r,e,t){let n=document.createComment("keep-alive"),o=new Map,i=[],a=t?.max??0,c,l=null,d=!1,u=()=>{let f=r(),m=n.parentNode;if(!m||d&&f===c)return;l?.parentNode&&m.removeChild(l),c=f;let p=o.get(f);if(p){let g=i.indexOf(f);g!==-1&&(i.splice(g,1),i.push(f))}else{let g=e[f];if(!g){l=null,d=!0;return}if(p=g(),o.set(f,p),i.push(f),a>0&&i.length>a){let T=i.shift(),v=o.get(T);v&&(O(v),v.parentNode&&v.parentNode.removeChild(v),o.delete(T))}}m.insertBefore(p,n.nextSibling),l=p,d=!0};return x(u),d||queueMicrotask(()=>{!d&&n.parentNode&&u()}),n}function Kr(r,e,t){let n=e(r,t);typeof n=="function"&&w(r,n)}var zr=(r,e)=>{let t=n=>{r.contains(n.target)||e()};return document.addEventListener("pointerdown",t,!0),()=>document.removeEventListener("pointerdown",t,!0)},Pr=(r,e)=>{let t=e.duration??500,n=null,o=()=>{n=setTimeout(()=>{e.callback(),n=null},t)},i=()=>{n!==null&&(clearTimeout(n),n=null)};return r.addEventListener("pointerdown",o),r.addEventListener("pointerup",i),r.addEventListener("pointerleave",i),()=>{i(),r.removeEventListener("pointerdown",o),r.removeEventListener("pointerup",i),r.removeEventListener("pointerleave",i)}},jr=r=>{let e='a[href],button:not([disabled]),input:not([disabled]),select:not([disabled]),textarea:not([disabled]),[tabindex]:not([tabindex="-1"])',t=n=>{if(n.key!=="Tab")return;let o=Array.from(r.querySelectorAll(e));if(o.length===0)return;let i=o[0],a=o[o.length-1];n.shiftKey&&document.activeElement===i?(n.preventDefault(),a.focus()):!n.shiftKey&&document.activeElement===a&&(n.preventDefault(),i.focus())};return r.addEventListener("keydown",t),()=>r.removeEventListener("keydown",t)};var W=null;function qr(r,e){try{let t=r();return t&&typeof t.then=="function"&&t.catch(n=>{e?e(n,"async"):W?W(n,"async"):console.error("Unhandled async error in Sibu.catchError:",n)}),t}catch(t){return e?e(t,"sync"):W?W(t,"sync"):console.error("Unhandled error in Sibu.catchError:",t),null}}async function Ur(r,e){try{return await r()}catch(t){return e?e(t,"async"):W?W(t,"async"):console.error("Unhandled async error in Sibu.catchErrorAsync:",t),null}}function Wr(r){W=r}var re=0,Re=new Set;function ve(r){re++;try{return r()}finally{re--,re===0&&Lo()}}function Z(r){return re===0?!1:(Re.add(r),!0)}function Fr(){return re>0}function Lo(){for(let r of Re)Ge(r);Re.clear(),Qe()}var Ir=globalThis,He=_();function C(r,e){let t={value:r},n=He?e?.name:void 0,o=e?.equals;n&&(t.__name=n);function i(){return Q(t),t.value}i.__signal=t,n&&(i.__name=n);function a(c){let l=typeof c=="function"?c(t.value):c;if(!(o?o(t.value,l):Object.is(l,t.value))){if(He){let d=t.value;t.value=l;let u=Ir.__SIBU_DEVTOOLS_GLOBAL_HOOK__;u&&u.emit("signal:update",{signal:t,name:n,oldValue:d,newValue:l})}else t.value=l;Z(t)||me(t)}}if(He){let c=Ir.__SIBU_DEVTOOLS_GLOBAL_HOOK__;c&&c.emit("signal:create",{signal:t,name:n,getter:i,initial:r})}return[i,a]}var De=!1;function J(){return De}function Be(){De=!0}function Ke(){De=!1}function Vr(r){Be();try{return r()}finally{Ke()}}var $r=globalThis;function Gr(r,e){let t,n=!0;return()=>{let o=r();if(n)n=!1,t=o,G(()=>e(o,void 0));else{let i=t;t=o,G(()=>e(o,i))}}}function oe(r,e){if(N(typeof r=="function","effect: argument must be a function."),J())return()=>{};let t=e?.onError,n=t?()=>{try{r()}catch(c){t(c)}}:r,o=()=>{},i=()=>{o(),o=x(n,i)};o=x(n,i);let a=$r.__SIBU_DEVTOOLS_GLOBAL_HOOK__;return a&&a.emit("effect:create",{effectFn:r}),()=>{let c=$r.__SIBU_DEVTOOLS_GLOBAL_HOOK__;c&&c.emit("effect:destroy",{effectFn:r}),o()}}function z(r,e){N(typeof r=="function","derived: argument must be a getter function.");let t=e?.name,n={};n._d=!1,n._g=r;let o=()=>{n._d||(n._d=!0)};o._c=1,o._sig=n,x(()=>{n._d=!1,n._v=r()},o);let i=globalThis.__SIBU_DEVTOOLS_GLOBAL_HOOK__;function a(){if(fe)return n._d&&(n._d=!1,n._v=r()),n._v;if(Q(n),n._d){let c=n._v;x(()=>{n._d=!1,n._v=r()},o),i&&c!==n._v&&i.emit("computed:update",{signal:n,oldValue:c,newValue:n._v})}return n._v}return t&&(a.__name=t,n.__name=t),a.__signal=n,i&&i.emit("computed:create",{signal:n,name:t,getter:a}),a}function Qr(r,e){if(N(typeof r=="function","watch: first argument must be a getter function."),N(typeof e=="function","watch: second argument must be a callback function."),J())return()=>{};let t,n=!0;return x(()=>{let a=r();if(n){t=a,n=!1;return}Object.is(a,t)||(e(a,t),t=a)})}function Yr(r){N(r!==null&&typeof r=="object"&&!Array.isArray(r),"store: argument must be a plain object. For arrays, use array() instead.");let e={};Object.keys(r).forEach(l=>{let[d,u]=C(r[l]);e[l]=[d,u]});let t=new Proxy({},{get(l,d){if(d in e){let u=e[d][0];return u()}},set(){throw new Error("[Sibu] store: Direct mutation is not allowed. Use actions.setState() to update store properties.")}}),n=()=>{let l={};return Object.keys(e).forEach(d=>{l[d]=e[d][0]()}),l};return[t,{setState:l=>{let d=n(),u=typeof l=="function"?l(d):l;Object.entries(u).forEach(([f,m])=>{f in e&&e[f][1](m)})},reset:()=>{Object.keys(r).forEach(l=>{let d=e[l][1];d(r[l])})},subscribe:l=>{let d=!0;return oe(()=>{let u=n();if(d){d=!1;return}l(u)})},subscribeKey:(l,d)=>{let u,f=!0;return oe(()=>{let m=e[l][0]();if(f){u=m,f=!1;return}if(!Object.is(m,u)){let p=u;u=m,d(m,p)}})},getSnapshot:n}]}function Zr(r){let[e,t]=C(r);return{get current(){return e()},set current(n){t(n)}}}function Jr(r){return z(r)}function Xr(r){return z(r)}function eo(r=[]){let[e,t]=C([...r]);return[e,{push(...o){t(i=>[...i,...o])},pop(){let o;return t(i=>{let a=[...i];return o=a.pop(),a}),o},shift(){let o;return t(i=>{let a=[...i];return o=a.shift(),a}),o},unshift(...o){t(i=>[...o,...i])},splice(o,i=0,...a){let c=[];return t(l=>{let d=[...l];return c=d.splice(o,i,...a),d}),c},remove(o){t(i=>i.filter((a,c)=>c!==o))},removeWhere(o){t(i=>{let a=i.findIndex(o);return a===-1?i:i.filter((c,l)=>l!==a)})},set(o){t([...o])},update(o,i){t(a=>a.map((c,l)=>l===o?i:c))},updateWhere(o,i){t(a=>a.map(c=>o(c)?i(c):c))},sort(o){t(i=>[...i].sort(o))},reverse(){t(o=>[...o].reverse())},filter(o){t(i=>i.filter(o))},map(o){t(i=>i.map(o))},clear(){t([])}}]}function to(r=[]){let e=[...r],t=null,n={};function o(){t=null,Z(n)||me(n)}function i(){return Q(n),t===null&&(t=Object.freeze([...e])),t}return[i,{push(...c){c.length!==0&&(e.push(...c),o())},pop(){if(e.length===0)return;let c=e.pop();return o(),c},shift(){if(e.length===0)return;let c=e.shift();return o(),c},unshift(...c){c.length!==0&&(e.unshift(...c),o())},splice(c,l=0,...d){let u=e.splice(c,l,...d);return(u.length>0||d.length>0)&&o(),u},remove(c){c<0||c>=e.length||(e.splice(c,1),o())},removeWhere(c){let l=e.findIndex(c);l!==-1&&(e.splice(l,1),o())},set(c){e=[...c],o()},update(c,l){c<0||c>=e.length||Object.is(e[c],l)||(e[c]=l,o())},updateWhere(c,l){let d=!1;for(let u=0;u<e.length;u++)if(c(e[u])){let f=l(e[u]);Object.is(e[u],f)||(e[u]=f,d=!0)}d&&o()},sort(c){e.length<=1||(e.sort(c),o())},reverse(){e.length<=1||(e.reverse(),o())},filter(c){let l=e.filter(c);l.length!==e.length&&(e=l,o())},map(c){let l=!1;for(let d=0;d<e.length;d++){let u=c(e[d],d);Object.is(e[d],u)||(e[d]=u,l=!0)}l&&o()},clear(){e.length!==0&&(e=[],o())}}]}function ie(r,e,t){if(Object.is(r,e))return!0;if(r==null||e==null||typeof r!=typeof e||typeof r!="object")return!1;if(r instanceof Date&&e instanceof Date)return r.getTime()===e.getTime();if(r instanceof RegExp&&e instanceof RegExp)return r.toString()===e.toString();if(t||(t=new Set),t.has(r))return!0;if(t.add(r),Array.isArray(r))return!Array.isArray(e)||r.length!==e.length?!1:r.every((i,a)=>ie(i,e[a],t));let n=Object.keys(r),o=Object.keys(e);return n.length!==o.length?!1:n.every(i=>ie(r[i],e[i],t))}function no(r){return C(r,{equals:(e,t)=>ie(e,t)})}function ro(r,e,t){return[z(r,t),i=>{ve(()=>e(i))}]}function se(r,e){try{r()}catch(t){L(`${e}: callback threw: ${t instanceof Error?t.message:String(t)}`)}}function ze(r,e){if(!(typeof document>"u"))if(e){if(e.isConnected){queueMicrotask(()=>{se(r,"onMount")});return}let t=new MutationObserver(()=>{e.isConnected&&(t.disconnect(),se(r,"onMount"))});queueMicrotask(()=>{e.isConnected?se(r,"onMount"):t.observe(document.body,{childList:!0,subtree:!0})})}else queueMicrotask(()=>{se(r,"onMount")})}function oo(r,e){let t=()=>{let n=new MutationObserver(()=>{e.isConnected||(n.disconnect(),se(r,"onUnmount"))});n.observe(document.body,{childList:!0,subtree:!0})};e.isConnected?t():ze(()=>{t()},e)}function io(r){let[e,t]=C(r);return{provide(n){t(n)},use(){return e},get(){return e()},set(n){t(n)}}}function Pe(r){let e=null;return function(){if(e)return e();let[n,o]=C("loading"),[i,a]=C(null),c=E({class:"sibu-lazy"});return r().then(l=>{e=l.default;let d=e();c.replaceChildren(d),o("loaded")}).catch(l=>{let d=l instanceof Error?l:new Error(String(l));a(d),o("error"),c.replaceChildren(E({class:"sibu-lazy-error",nodes:`Failed to load component: ${d.message}`}))}),c.appendChild(H({class:"sibu-lazy-loading",nodes:"Loading..."})),c}}function je({nodes:r,fallback:e}){let t=E({class:"sibu-suspense"}),n=e();return t.appendChild(n),queueMicrotask(()=>{try{let o=r();if(o.classList.contains("sibu-lazy")){let i=new MutationObserver(()=>{o.querySelector(".sibu-lazy-loading")||(i.disconnect(),t.replaceChildren(o))});i.observe(o,{childList:!0,subtree:!0}),o.querySelector(".sibu-lazy-loading")||t.replaceChildren(o)}else t.replaceChildren(o)}catch{}}),t}var Mo=_(),Oo=`
|
|
1
|
+
"use strict";var Sibu=(()=>{var ke=Object.defineProperty;var fo=Object.getOwnPropertyDescriptor;var mo=Object.getOwnPropertyNames;var go=Object.prototype.hasOwnProperty;var Ie=(r,e)=>{for(var n in e)ke(r,n,{get:e[n],enumerable:!0})},ho=(r,e,n,t)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of mo(e))!go.call(r,o)&&o!==n&&ke(r,o,{get:()=>e[o],enumerable:!(t=fo(e,o))||t.enumerable});return r};var bo=r=>ho(ke({},"__esModule",{value:!0}),r);var zo={};Ie(zo,{DynamicComponent:()=>Mr,ErrorBoundary:()=>co,Fragment:()=>_r,KeepAlive:()=>Br,Loading:()=>uo,Portal:()=>Nr,SVG_NS:()=>y,Suspense:()=>je,a:()=>wt,abbr:()=>Ct,action:()=>Kr,address:()=>ct,area:()=>Jt,array:()=>eo,article:()=>nt,aside:()=>at,audio:()=>Xt,b:()=>_t,base:()=>Gn,batch:()=>ve,bdi:()=>Nt,bdo:()=>At,bindDynamic:()=>Ce,blockquote:()=>mt,body:()=>Xe,br:()=>Lt,button:()=>ye,canvas:()=>mn,caption:()=>yn,catchError:()=>qr,catchErrorAsync:()=>Ur,center:()=>br,checkLeaks:()=>Ye,circle:()=>Zn,cite:()=>Mt,clickOutside:()=>zr,clipPath:()=>cr,code:()=>Ot,col:()=>vn,colgroup:()=>Tn,context:()=>so,customElement:()=>vr,data:()=>Rt,datalist:()=>An,dd:()=>gt,deepEqual:()=>ie,deepSignal:()=>no,defs:()=>ar,del:()=>bn,derived:()=>z,details:()=>Un,dfn:()=>Dt,dialog:()=>Wn,disableSSR:()=>Ke,dispose:()=>O,div:()=>w,dl:()=>ht,dt:()=>bt,each:()=>wr,effect:()=>oe,ellipse:()=>Jn,em:()=>Ht,embed:()=>on,enableSSR:()=>Be,enqueueBatchedSignal:()=>Z,fieldset:()=>Ln,figcaption:()=>xt,figure:()=>yt,font:()=>xr,footer:()=>ot,form:()=>Mn,g:()=>Xn,getSlot:()=>Or,h1:()=>lt,h2:()=>dt,h3:()=>xe,h4:()=>ut,h5:()=>pt,h6:()=>ft,head:()=>Je,header:()=>rt,hr:()=>vt,html:()=>Le,i:()=>Bt,iframe:()=>sn,img:()=>en,input:()=>On,ins:()=>xn,isBatching:()=>Fr,isSSR:()=>J,kbd:()=>Kt,label:()=>Rn,lazy:()=>Pe,legend:()=>Dn,li:()=>Tt,line:()=>er,linearGradient:()=>ur,link:()=>Qn,longPress:()=>Pr,main:()=>st,map:()=>tn,mark:()=>zt,marker:()=>hr,marquee:()=>yr,mask:()=>lr,match:()=>Hr,math:()=>fn,memo:()=>Jr,memoFn:()=>Xr,menu:()=>Fn,meta:()=>Yn,meter:()=>Hn,mount:()=>kr,nav:()=>it,noscript:()=>gn,object:()=>an,ol:()=>St,on:()=>Gr,onCleanup:()=>io,onMount:()=>ze,onUnmount:()=>oo,optgroup:()=>Bn,option:()=>Kn,output:()=>zn,p:()=>be,param:()=>cn,path:()=>tr,pattern:()=>dr,picture:()=>ln,polygon:()=>nr,polyline:()=>rr,portal:()=>dn,pre:()=>Et,progress:()=>Pn,q:()=>Pt,radialGradient:()=>pr,reactiveArray:()=>to,rect:()=>or,ref:()=>Zr,registerComponent:()=>Ar,registerDisposer:()=>E,resolveComponent:()=>Oe,rp:()=>jt,rt:()=>qt,ruby:()=>Ut,s:()=>Wt,samp:()=>Ft,script:()=>hn,section:()=>tt,select:()=>jn,setGlobalErrorHandler:()=>Wr,show:()=>Rr,signal:()=>C,slot:()=>Vn,small:()=>It,source:()=>un,span:()=>D,stop:()=>fr,store:()=>Yr,strong:()=>Vt,style:()=>Y,sub:()=>$t,summary:()=>In,sup:()=>Gt,svg:()=>pn,symbol:()=>gr,table:()=>Sn,tagFactory:()=>s,tbody:()=>kn,td:()=>En,template:()=>$n,text:()=>ir,textarea:()=>qn,tfoot:()=>wn,th:()=>Cn,thead:()=>_n,time:()=>Qt,title:()=>et,tr:()=>Nn,track:()=>nn,trapFocus:()=>jr,tspan:()=>sr,u:()=>Yt,ul:()=>kt,unregisterComponent:()=>Lr,untracked:()=>G,use:()=>mr,var_:()=>Zt,video:()=>rn,watch:()=>Qr,when:()=>Dr,withSSR:()=>Vr,writable:()=>ro});var Ue={};Ie(Ue,{DynamicComponent:()=>Mr,ErrorBoundary:()=>co,Fragment:()=>_r,KeepAlive:()=>Br,Loading:()=>uo,Portal:()=>Nr,SVG_NS:()=>y,Suspense:()=>je,a:()=>wt,abbr:()=>Ct,action:()=>Kr,address:()=>ct,area:()=>Jt,array:()=>eo,article:()=>nt,aside:()=>at,audio:()=>Xt,b:()=>_t,base:()=>Gn,batch:()=>ve,bdi:()=>Nt,bdo:()=>At,bindDynamic:()=>Ce,blockquote:()=>mt,body:()=>Xe,br:()=>Lt,button:()=>ye,canvas:()=>mn,caption:()=>yn,catchError:()=>qr,catchErrorAsync:()=>Ur,center:()=>br,checkLeaks:()=>Ye,circle:()=>Zn,cite:()=>Mt,clickOutside:()=>zr,clipPath:()=>cr,code:()=>Ot,col:()=>vn,colgroup:()=>Tn,context:()=>so,customElement:()=>vr,data:()=>Rt,datalist:()=>An,dd:()=>gt,deepEqual:()=>ie,deepSignal:()=>no,defs:()=>ar,del:()=>bn,derived:()=>z,details:()=>Un,dfn:()=>Dt,dialog:()=>Wn,disableSSR:()=>Ke,dispose:()=>O,div:()=>w,dl:()=>ht,dt:()=>bt,each:()=>wr,effect:()=>oe,ellipse:()=>Jn,em:()=>Ht,embed:()=>on,enableSSR:()=>Be,enqueueBatchedSignal:()=>Z,fieldset:()=>Ln,figcaption:()=>xt,figure:()=>yt,font:()=>xr,footer:()=>ot,form:()=>Mn,g:()=>Xn,getSlot:()=>Or,h1:()=>lt,h2:()=>dt,h3:()=>xe,h4:()=>ut,h5:()=>pt,h6:()=>ft,head:()=>Je,header:()=>rt,hr:()=>vt,html:()=>Le,i:()=>Bt,iframe:()=>sn,img:()=>en,input:()=>On,ins:()=>xn,isBatching:()=>Fr,isSSR:()=>J,kbd:()=>Kt,label:()=>Rn,lazy:()=>Pe,legend:()=>Dn,li:()=>Tt,line:()=>er,linearGradient:()=>ur,link:()=>Qn,longPress:()=>Pr,main:()=>st,map:()=>tn,mark:()=>zt,marker:()=>hr,marquee:()=>yr,mask:()=>lr,match:()=>Hr,math:()=>fn,memo:()=>Jr,memoFn:()=>Xr,menu:()=>Fn,meta:()=>Yn,meter:()=>Hn,mount:()=>kr,nav:()=>it,noscript:()=>gn,object:()=>an,ol:()=>St,on:()=>Gr,onCleanup:()=>io,onMount:()=>ze,onUnmount:()=>oo,optgroup:()=>Bn,option:()=>Kn,output:()=>zn,p:()=>be,param:()=>cn,path:()=>tr,pattern:()=>dr,picture:()=>ln,polygon:()=>nr,polyline:()=>rr,portal:()=>dn,pre:()=>Et,progress:()=>Pn,q:()=>Pt,radialGradient:()=>pr,reactiveArray:()=>to,rect:()=>or,ref:()=>Zr,registerComponent:()=>Ar,registerDisposer:()=>E,resolveComponent:()=>Oe,rp:()=>jt,rt:()=>qt,ruby:()=>Ut,s:()=>Wt,samp:()=>Ft,script:()=>hn,section:()=>tt,select:()=>jn,setGlobalErrorHandler:()=>Wr,show:()=>Rr,signal:()=>C,slot:()=>Vn,small:()=>It,source:()=>un,span:()=>D,stop:()=>fr,store:()=>Yr,strong:()=>Vt,style:()=>Y,sub:()=>$t,summary:()=>In,sup:()=>Gt,svg:()=>pn,symbol:()=>gr,table:()=>Sn,tagFactory:()=>s,tbody:()=>kn,td:()=>En,template:()=>$n,text:()=>ir,textarea:()=>qn,tfoot:()=>wn,th:()=>Cn,thead:()=>_n,time:()=>Qt,title:()=>et,tr:()=>Nn,track:()=>nn,trapFocus:()=>jr,tspan:()=>sr,u:()=>Yt,ul:()=>kt,unregisterComponent:()=>Lr,untracked:()=>G,use:()=>mr,var_:()=>Zt,video:()=>rn,watch:()=>Qr,when:()=>Dr,withSSR:()=>Vr,writable:()=>ro});function _(){return typeof globalThis.__SIBU_DEV__<"u"?!!globalThis.__SIBU_DEV__:typeof __SIBU_DEV__<"u"?__SIBU_DEV__:!0}var Ve=_();function N(r,e){if(Ve&&!r)throw new Error(`[Sibu] ${e}`)}function L(r){Ve&&console.warn(`[Sibu] ${r}`)}function P(r){let e=r.replace(/[\x00-\x20\x7f-\x9f]+/g,"").trim();if(!e)return"";let n=e.toLowerCase();return n.startsWith("javascript:")||n.startsWith("data:")||n.startsWith("vbscript:")||n.startsWith("blob:")?"":e}function Ee(r){let e=r.toLowerCase().replace(/\s+/g,"");return e.includes("url(")||e.includes("expression(")||e.includes("javascript:")||e.includes("-moz-binding")?"":r}var xo=new Set(["href","src","action","formaction","cite","poster","background","srcset"]);function j(r){return xo.has(r)}var yo=_(),V=new Array(32),$=32,R=-1,K=null,vo=new WeakMap,q="__s",H=0,S=[],M=new Set;function te(r){try{r()}catch(e){yo&&L(`Subscriber threw during notification: ${e instanceof Error?e.message:String(e)}`)}}var pe=0,fe=!1;function x(r,e){e||(e=r),$e(e),++R,R>=$&&($*=2,V.length=$),V[R]=e,K=e;try{r()}finally{R--,K=R>=0?V[R]:null}return()=>$e(e)}function To(){pe===0&&(++R,R>=$&&($*=2,V.length=$),V[R]=null,K=null,fe=!0),pe++}function So(){pe--,pe===0&&(R--,K=R>=0?V[R]:null,fe=!1)}function G(r){To();try{return r()}finally{So()}}function Q(r){if(!K)return;let e=K;if(e._dep===r)return;let n=e._deps;if(n){if(n.has(r))return;n.add(r)}else if(e._dep!==void 0){let o=new Set;o.add(e._dep),o.add(r),e._deps=o,e._dep=void 0}else e._dep=r;let t=r[q];t||(t=new Set,vo.set(r,t),r[q]=t),t.add(K),t.size===1?r.__f=K:r.__f!==void 0&&(r.__f=void 0)}function Ge(r){let e=r[q];if(e)for(let n of e)n._c?I(n):M.has(n)||(M.add(n),S.push(n))}function Qe(){if(!(H>0)){H++;try{let r=0;for(;r<S.length;)te(S[r]),r++}finally{S.length=0,M.clear(),H--}}}function I(r){r();let e=r._sig;for(;e;){let n=e.__f;if(n){if(n._c){let i=n._sig;i._d=!0,e=i;continue}M.has(n)||(M.add(n),S.push(n));break}let t=e[q];if(!t)break;let o;for(let i of t)if(i._c){i();let a=i._sig;a&&!o?o=a:a&&I(i)}else M.has(i)||(M.add(i),S.push(i));e=o}}function me(r){let e=r.__f;if(e){if(H>0){e._c?I(e):M.has(e)||(M.add(e),S.push(e));return}H++;try{e._c?I(e):te(e);let t=0;for(;t<S.length;)te(S[t]),t++}finally{S.length=0,M.clear(),H--}return}let n=r[q];if(!(!n||n.size===0)){if(H>0){for(let t of n)t._c?I(t):M.has(t)||(M.add(t),S.push(t));return}H++;try{let t=0;for(let i of n)S[t++]=i;for(let i=0;i<t;i++)S[i]._c&&I(S[i]);for(let i=0;i<t;i++)S[i]._c||M.has(S[i])||te(S[i]);let o=t;for(;o<S.length;)te(S[o]),o++}finally{S.length=0,M.clear(),H--}}}function $e(r){let e=r,n=e._dep;if(n!==void 0){let o=n[q];o&&(o.delete(r),n.__f===r&&(n.__f=void 0)),e._dep=void 0;return}let t=e._deps;if(!(!t||t.size===0)){for(let o of t){let i=o[q];i&&(i.delete(r),o.__f===r&&(o.__f=void 0))}t.clear()}}var we=_();function ge(r,e,n){function t(){let i;try{i=n()}catch(c){we&&L(`bindAttribute: getter for "${e}" threw: ${c instanceof Error?c.message:String(c)}`);return}if(typeof i=="boolean"){e in r&&(e==="checked"||e==="disabled"||e==="selected")?r[e]=i:i?r.setAttribute(e,""):r.removeAttribute(e);return}let a=String(i);(e==="value"||e==="checked")&&e in r?r[e]=e==="checked"?!!i:a:r.setAttribute(e,j(e)?P(a):a)}return x(t)}function Ce(r,e,n){let t=null;function o(){let a;try{a=typeof e=="function"?e():e}catch(d){we&&L(`bindDynamic: name getter threw: ${d instanceof Error?d.message:String(d)}`);return}let c;try{c=typeof n=="function"?n():n}catch(d){we&&L(`bindDynamic: value getter threw: ${d instanceof Error?d.message:String(d)}`);return}if((a[0]==="o"||a[0]==="O")&&(a[1]==="n"||a[1]==="N"))return;t!==null&&t!==a&&r.removeAttribute(t);let l=String(c);(a==="value"||a==="checked")&&a in r?r[a]=a==="checked"?!!c:l:r.setAttribute(a,j(a)?P(l):l),t=a}let i=x(o);return()=>{i(),t!==null&&r.removeAttribute(t)}}var ko=_();function U(r,e){let n=[];function t(){let o;try{o=e()}catch(l){ko&&L(`bindChildNode: getter threw: ${l instanceof Error?l.message:String(l)}`);return}for(let l=0;l<n.length;l++){let d=n[l];d.parentNode&&d.parentNode.removeChild(d)}if(o==null||typeof o=="boolean"){n.length=0;return}let i=r.parentNode;if(!i){n.length=0;return}let a=r.nextSibling,c=0;if(Array.isArray(o)){n.length<o.length&&(n=new Array(o.length));for(let l=0;l<o.length;l++){let d=o[l];if(d==null||typeof d=="boolean")continue;let u=d instanceof Node?d:document.createTextNode(String(d));i.insertBefore(u,a),n[c++]=u}}else{n.length<1&&(n=[null]);let l=o instanceof Node?o:document.createTextNode(String(o));i.insertBefore(l,a),n[c++]=l}n.length=c}return x(t)}var he=new WeakMap,_e=_(),ne=0;function E(r,e){let n=he.get(r);n||(n=[],he.set(r,n)),n.push(e),_e&&ne++}function O(r){let e=[r],n=[];for(;e.length>0;){let t=e.pop();n.push(t);let o=t.childNodes;for(let i=0;i<o.length;i++)e.push(o[i])}for(let t=n.length-1;t>=0;t--){let o=n[t],i=he.get(o);if(i){_e&&(ne-=i.length);for(let a of i)a();he.delete(o)}}}function Ye(r=0){return _e?(r>0&&ne>r&&L(`checkLeaks: ${ne} active DOM bindings detected. Expected \u2264${r}. This may indicate a component was removed from the DOM without calling dispose().`),ne):0}var y="http://www.w3.org/2000/svg",Ze=new Map;function Eo(r){let e=Ze.get(r);return e!==void 0||(e=r.replace(/[A-Z]/g,n=>`-${n.toLowerCase()}`),Ze.set(r,e)),e}function wo(r,e){if(typeof e=="function"){let t=x(()=>{r.setAttribute("style",e())});E(r,t);return}if(typeof e=="string"){r.setAttribute("style",e);return}let n=r;for(let t in e){let o=e[t],i=Eo(t);if(typeof o=="function"){let a=o,c=x(()=>{n.style.setProperty(i,Ee(String(a())))});E(r,c)}else n.style.setProperty(i,Ee(String(o)))}}function Co(r,e){if(typeof e=="string"){r.setAttribute("class",e);return}if(typeof e=="function"){let i=x(()=>{r.setAttribute("class",e())});E(r,i);return}let n=e,t=!1,o="";for(let i in n){let a=n[i];if(typeof a=="function"){t=!0;break}a&&(o=o?`${o} ${i}`:i)}if(t){let a=x(()=>{let c="";for(let l in n){let d=n[l];(typeof d=="function"?d():d)&&(c=c?`${c} ${l}`:l)}r.setAttribute("class",c)});E(r,a)}else r.setAttribute("class",o)}function Ne(r,e){if(typeof e=="string"){r.textContent=e;return}if(typeof e=="number"){r.textContent=String(e);return}if(!(typeof e=="boolean"||e==null)){if(typeof e=="function"){let n=document.createComment("");r.appendChild(n),E(r,U(n,e));return}if(e instanceof Node){r.appendChild(e);return}if(Array.isArray(e))for(let n=0;n<e.length;n++){let t=e[n];if(typeof t=="function"){let o=document.createComment("");r.appendChild(o),E(r,U(o,t))}else if(t instanceof Node)r.appendChild(t);else if(Array.isArray(t))for(let o=0;o<t.length;o++){let i=t[o];if(typeof i=="function"){let a=document.createComment("");r.appendChild(a),E(r,U(a,i))}else i instanceof Node?r.appendChild(i):i!=null&&typeof i!="boolean"&&r.appendChild(document.createTextNode(String(i)))}else t!=null&&typeof t!="boolean"&&r.appendChild(document.createTextNode(String(t)))}}}var s=(r,e)=>(n,t)=>{let o=e?document.createElementNS(e,r):document.createElement(r);if(n===void 0)return o;if(t===void 0&&typeof n=="string")return o.textContent=n,o;if(t!==void 0)return o.setAttribute("class",n),Ne(o,t),o;if(Array.isArray(n)||n instanceof Node)return Ne(o,n),o;let i=n,a=i.class;a!=null&&Co(o,a);let c=i.id;c!=null&&(o.id=c);let l=i.nodes;l!=null&&Ne(o,l);let d=i.on;if(d)for(let m in d)o.addEventListener(m,d[m]);let u=i.style;u!=null&&wo(o,u);let f=i.ref;f&&(f.current=o);for(let m in i)switch(m){case"class":case"id":case"nodes":case"on":case"style":case"ref":case"onElement":continue;default:{let p=i[m];if(p==null||p===!1||m[0]==="o"&&m[1]==="n")continue;if(typeof p=="function")E(o,ge(o,m,p));else if(p===!0)o.setAttribute(m,"");else{let g=String(p);o.setAttribute(m,j(m)?P(g):g)}}}return i.onElement&&typeof i.onElement=="function"&&i.onElement(o),o};var si=s("html"),Je=s("head"),Xe=s("body"),et=s("title"),w=s("div"),D=s("span"),tt=s("section"),nt=s("article"),rt=s("header"),ot=s("footer"),it=s("nav"),st=s("main"),at=s("aside"),ct=s("address"),be=s("p"),lt=s("h1"),dt=s("h2"),xe=s("h3"),ut=s("h4"),pt=s("h5"),ft=s("h6"),mt=s("blockquote"),gt=s("dd"),ht=s("dl"),bt=s("dt"),xt=s("figcaption"),yt=s("figure"),vt=s("hr"),Tt=s("li"),St=s("ol"),kt=s("ul"),Et=s("pre"),wt=s("a"),Ct=s("abbr"),_t=s("b"),Nt=s("bdi"),At=s("bdo"),Lt=s("br"),Mt=s("cite"),Ot=s("code"),Rt=s("data"),Dt=s("dfn"),Ht=s("em"),Bt=s("i"),Kt=s("kbd"),zt=s("mark"),Pt=s("q"),jt=s("rp"),qt=s("rt"),Ut=s("ruby"),Wt=s("s"),Ft=s("samp"),It=s("small"),Vt=s("strong"),$t=s("sub"),Gt=s("sup"),Qt=s("time"),Yt=s("u"),Zt=s("var"),Jt=s("area"),Xt=s("audio"),en=s("img"),tn=s("map"),nn=s("track"),rn=s("video"),on=s("embed"),sn=s("iframe"),an=s("object"),cn=s("param"),ln=s("picture"),dn=s("portal"),un=s("source"),pn=s("svg",y),fn=s("math"),mn=s("canvas"),gn=s("noscript"),hn=s("script"),bn=s("del"),xn=s("ins"),yn=s("caption"),vn=s("col"),Tn=s("colgroup"),Sn=s("table"),kn=s("tbody"),En=s("td"),wn=s("tfoot"),Cn=s("th"),_n=s("thead"),Nn=s("tr"),ye=s("button"),An=s("datalist"),Ln=s("fieldset"),Mn=s("form"),On=s("input"),Rn=s("label"),Dn=s("legend"),Hn=s("meter"),Bn=s("optgroup"),Kn=s("option"),zn=s("output"),Pn=s("progress"),jn=s("select"),qn=s("textarea"),Un=s("details"),Wn=s("dialog"),Fn=s("menu"),In=s("summary"),Vn=s("slot"),$n=s("template"),Gn=s("base"),Qn=s("link"),Yn=s("meta"),Y=s("style"),Zn=s("circle",y),Jn=s("ellipse",y),Xn=s("g",y),er=s("line",y),tr=s("path",y),nr=s("polygon",y),rr=s("polyline",y),or=s("rect",y),ir=s("text",y),sr=s("tspan",y),ar=s("defs",y),cr=s("clipPath",y),lr=s("mask",y),dr=s("pattern",y),ur=s("linearGradient",y),pr=s("radialGradient",y),fr=s("stop",y),mr=s("use",y),gr=s("symbol",y),hr=s("marker",y),br=s("center"),xr=s("font"),yr=s("marquee"),vr=r=>s(r);var _o=new Set(["area","base","br","col","embed","hr","img","input","link","meta","param","source","track","wbr"]),Tr=new Set(["svg","circle","ellipse","g","line","path","polygon","polyline","rect","text","tspan","defs","clipPath","mask","pattern","linearGradient","radialGradient","stop","use","symbol","marker"]),Sr=new WeakMap;function No(r){let e=r.length-1,n=r[0];for(let p=0;p<e;p++)n+=`\0${p}\0${r[p+1]}`;let t=0,o=n.length;function i(){for(;t<o&&(n[t]===" "||n[t]===" "||n[t]===`
|
|
2
|
+
`||n[t]==="\r");)t++}function a(){if(n.charCodeAt(t)!==0)return-1;let p=t;t++;let g=0;for(;t<o&&n.charCodeAt(t)!==0;)g=g*10+(n.charCodeAt(t)-48),t++;return t<o&&t++,g<0||g>=e?(t=p,-1):g}function c(){let p=t;for(;t<o;){let g=n.charCodeAt(t);if(g>=97&&g<=122||g>=65&&g<=90||g>=48&&g<=57||g===45)t++;else break}return n.slice(p,t)}function l(){if(i(),n[t]!=="=")return{kind:"bool"};t++,i();let p=a();if(p>=0)return{kind:"expr",idx:p};let g=n[t];if(g==='"'||g==="'"){t++;let b=[],B=[],F="";for(;t<o&&n[t]!==g;){let X=a();X>=0?(b.push(F),F="",B.push(X)):F+=n[t++]}return t<o&&t++,b.push(F),B.length===0?{kind:"static",value:b[0]}:{kind:"mixed",statics:b,exprs:B}}let T=t;for(;t<o;){let b=n.charCodeAt(t);if(b===32||b===9||b===10||b===13||b===62||b===47)break;t++}return{kind:"static",value:n.slice(T,t)}}function d(){let p=[];for(;t<o&&(i(),!(n[t]===">"||n[t]==="/"));){let g=t;for(;t<o;){let b=n.charCodeAt(t);if(b>=97&&b<=122||b>=65&&b<=90||b>=48&&b<=57||b===45||b===58||b===95||b===46)t++;else break}let T=n.slice(g,t);if(!T)break;let v=l();T.startsWith("on:")?v.kind==="expr"&&p.push({t:3,name:T.slice(3),idx:v.idx}):v.kind==="bool"?p.push({t:4,name:T}):v.kind==="static"?p.push({t:0,name:T,value:v.value}):v.kind==="expr"?p.push({t:1,name:T,idx:v.idx}):v.kind==="mixed"&&p.push({t:2,name:T,statics:v.statics,exprs:v.exprs})}return p}function u(p){return p.replace(/\s+/g," ")}function f(p){let g="";for(;t<o&&n[t]!=="<";){let v=a();if(v>=0){let b=u(g);b&&p.push({t:1,value:b}),g="",p.push({t:2,idx:v})}else g+=n[t++]}let T=u(g);T&&p.push({t:1,value:T})}function m(){let p=[];for(;t<o&&!(n[t]==="<"&&t+1<o&&n[t+1]==="/");)if(n[t]==="<"){t++;let g=c(),T=d();i();let v=_o.has(g),b=n[t]==="/";if(b&&t++,t<o&&t++,v||b)p.push({t:0,el:{tag:g,svg:Tr.has(g),attrs:T,children:[]}});else{let B=m();n[t]==="<"&&t+1<o&&n[t+1]==="/"&&(t+=2,c(),i(),t<o&&n[t]===">"&&t++),p.push({t:0,el:{tag:g,svg:Tr.has(g),attrs:T,children:B}})}}else f(p);return p}return m()}function Ae(r,e){let n=r.svg?document.createElementNS(y,r.tag):document.createElement(r.tag);for(let t=0;t<r.attrs.length;t++){let o=r.attrs[t];switch(o.t){case 0:n.setAttribute(o.name,o.value);break;case 1:{let i=o.name;if(i[0]==="o"&&i[1]==="n")break;let a=e[o.idx];if(typeof a=="function")E(n,ge(n,i,a));else if(a!=null){let c=String(a);n.setAttribute(i,j(i)?P(c):c)}break}case 2:{let i=o.statics[0];for(let a=0;a<o.exprs.length;a++)i+=String(e[o.exprs[a]])+o.statics[a+1];n.setAttribute(o.name,i);break}case 3:n.addEventListener(o.name,e[o.idx]);break;case 4:n.setAttribute(o.name,"");break}}for(let t=0;t<r.children.length;t++){let o=r.children[t];switch(o.t){case 0:n.appendChild(Ae(o.el,e));break;case 1:n.appendChild(document.createTextNode(o.value));break;case 2:{let i=e[o.idx];if(typeof i=="function"){let a=document.createComment("");n.appendChild(a),E(n,U(a,i))}else if(i instanceof Node)n.appendChild(i);else if(Array.isArray(i))for(let a=0;a<i.length;a++){let c=i[a];c instanceof Node?n.appendChild(c):c!=null&&typeof c!="boolean"&&n.appendChild(document.createTextNode(String(c)))}else i!=null&&typeof i!="boolean"&&n.appendChild(document.createTextNode(String(i)));break}}}return n}function Le(r,...e){let n=Sr.get(r);if(n||(n=No(r),Sr.set(r,n)),n.length===1&&n[0].t===0)return Ae(n[0].el,e);let t=document.createElement("div");for(let o=0;o<n.length;o++){let i=n[o];switch(i.t){case 0:t.appendChild(Ae(i.el,e));break;case 1:t.appendChild(document.createTextNode(i.value));break;case 2:{let a=e[i.idx];if(a instanceof Node)t.appendChild(a);else if(typeof a=="function"){let c=document.createComment("bind:htm");t.appendChild(c),E(t,U(c,a))}else if(Array.isArray(a))for(let c=0;c<a.length;c++){let l=a[c];l instanceof Node?t.appendChild(l):l!=null&&typeof l!="boolean"&&t.appendChild(document.createTextNode(String(l)))}else a!=null&&typeof a!="boolean"&&t.appendChild(document.createTextNode(String(a)));break}}}return t.childNodes.length===1&&t.firstChild instanceof Element?t.firstChild:t}function kr(r,e){if(!e)throw new Error("[Sibu] mount: container element not found. Make sure the DOM element exists before calling mount().");N(typeof r=="function"||r instanceof Node,"mount: first argument must be a component function or a DOM Node.");let n=typeof performance<"u"?performance.now():0,t=typeof r=="function"?r():r,o=typeof performance<"u"?performance.now()-n:0;e.appendChild(t);let i=globalThis.__SIBU_DEVTOOLS_GLOBAL_HOOK__;return i&&i.emit("app:init",{rootElement:t,container:e,duration:o}),{node:t,unmount(){i&&i.emit("app:unmount",{rootElement:t}),O(t),t.parentNode&&t.parentNode.removeChild(t)}}}var Ao=_();function Er(r){return typeof r=="function"?Er(r()):r instanceof Node?r:document.createTextNode(String(r))}function Lo(r,e){if(e===0)return[];let n=[],t=new Array(e);for(let c=0;c<e;c++){let l=r[c],d=0,u=n.length;for(;d<u;){let f=d+u>>1;r[n[f]]<l?d=f+1:u=f}n[d]=c,t[c]=d>0?n[d-1]:-1}let o=n.length,i=new Array(o),a=n[o-1];for(let c=o-1;c>=0;c--)i[c]=a,a=t[a];return i}function wr(r,e,n){N(typeof r=="function","each: first argument must be a function that returns an array."),N(typeof e=="function","each: second argument must be a render function."),N(n&&typeof n.key=="function","each: options.key must be a function that returns a unique key per item.");let t=document.createComment("each:anchor"),o=document.createComment("each:end"),i=[],a=[],c=i,l=0,d=new Map,u=new Map,f=[],m=[],p=new Uint8Array(0),g=new Map,T=[],v=[],b=!1,B=!1,F=n.key,X=()=>{let Te=r(),k=Te.length,ae=t.parentNode;if(!ae)return;B||(ae.insertBefore(o,t.nextSibling),B=!0),m.length<k&&(m=new Array(k));for(let h=0;h<k;h++)m[h]=F(Te[h]);let ce=m;f.length<k&&(f=new Array(k)),u.clear();for(let h=0;h<k;h++){let A=ce[h],Fe=d.get(A),ee;if(Fe!==void 0)ee=Fe;else try{ee=Er(e(Te[h],h))}catch(Se){Ao&&L(`each: render threw for item at index ${h} (key="${ce[h]}"): ${Se instanceof Error?Se.message:String(Se)}`),ee=document.createComment(`each:error:${h}`)}u.set(A,ee),f[h]=ee}for(let[h,A]of d)u.has(h)||(O(A),A.parentNode&&ae.removeChild(A));if(k===0){l=0;let h=d;d=u,u=h;return}g.clear();for(let h=0;h<l;h++)g.set(c[h],h);T.length<k&&(T=new Array(k),v=new Array(k));let le=0;for(let h=0;h<k;h++){let A=g.get(ce[h]);A!==void 0&&(T[le]=h,v[le]=A,le++)}let We=Lo(v,le);p.length<k?p=new Uint8Array(k):p.fill(0,0,k);for(let h=0;h<We.length;h++)p[T[We[h]]]=1;let de=o;for(let h=k-1;h>=0;h--){let A=f[h];p[h]||A.nextSibling!==de&&ae.insertBefore(A,de),de=A}let ue=c===i?a:i;ue.length<k&&(ue.length=k);for(let h=0;h<k;h++)ue[h]=ce[h];c=ue,l=k;let po=d;d=u,u=po,b=!0};return x(X),b||queueMicrotask(()=>{!b&&t.parentNode&&X()}),t}function _r(r){let e=document.createDocumentFragment();for(let n of r)if(!(n==null||typeof n=="boolean"))if(Array.isArray(n))for(let t of n)t==null||typeof t=="boolean"||e.appendChild(Cr(t));else e.appendChild(Cr(n));return e}function Cr(r){if(r==null)return document.createTextNode("");if(r instanceof Node)return r;if(typeof r=="function"){let e=r();return e instanceof Node?e:document.createTextNode(String(e??""))}return document.createTextNode(String(r))}function Nr(r,e){let n=document.createComment("portal"),t=e||document.body,o=null;queueMicrotask(()=>{try{o=r(),t.appendChild(o)}catch(a){console.error("[Portal] Render error:",a)}});let i=new MutationObserver(()=>{!n.isConnected&&o&&(o.remove(),o=null,i.disconnect())});return queueMicrotask(()=>{n.parentNode&&i.observe(n.parentNode,{childList:!0})}),n}var Me=new Map;function Ar(r,e){Me.set(r,e)}function Lr(r){Me.delete(r)}function Oe(r){let e=Me.get(r);return e?e():w({nodes:`[Component "${r}" not found]`})}function Mr(r){let e=w({class:"sibu-dynamic"});function n(){let t=r(),o;typeof t=="function"?o=t():o=Oe(t);for(let i of Array.from(e.childNodes))O(i);e.replaceChildren(o)}return x(n),e}function Or(r,e="default"){return r?.[e]}function Rr(r,e){return x(()=>{e.style.display=r()?"":"none"}),e}function Dr(r,e,n){let t=document.createComment("when"),o=null,i,a=!1,c=()=>{let l=r(),d=t.parentNode;if(!d||a&&l===i)return;i=l,o?.parentNode&&(O(o),o.parentNode.removeChild(o),o=null);let u=l?e():n?n():null;if(u!=null){let f=u instanceof Node?u:document.createTextNode(String(u));d.insertBefore(f,t.nextSibling),o=f}a=!0};return x(c),a||queueMicrotask(()=>{!a&&t.parentNode&&c()}),t}function Hr(r,e,n){let t=document.createComment("match"),o=null,i,a=!1,c=()=>{let l=String(r()),d=t.parentNode;if(!d||a&&l===i)return;i=l,o?.parentNode&&(O(o),o.parentNode.removeChild(o),o=null);let u=e[l]||n;if(u){let f=u();if(f!=null){let m=f instanceof Node?f:document.createTextNode(String(f));d.insertBefore(m,t.nextSibling),o=m}}a=!0};return x(c),a||queueMicrotask(()=>{!a&&t.parentNode&&c()}),t}function Br(r,e,n){let t=document.createComment("keep-alive"),o=new Map,i=[],a=n?.max??0,c,l=null,d=!1,u=()=>{let f=r(),m=t.parentNode;if(!m||d&&f===c)return;l?.parentNode&&m.removeChild(l),c=f;let p=o.get(f);if(p){let g=i.indexOf(f);g!==-1&&(i.splice(g,1),i.push(f))}else{let g=e[f];if(!g){l=null,d=!0;return}if(p=g(),o.set(f,p),i.push(f),a>0&&i.length>a){let T=i.shift(),v=o.get(T);v&&(O(v),v.parentNode&&v.parentNode.removeChild(v),o.delete(T))}}m.insertBefore(p,t.nextSibling),l=p,d=!0};return x(u),d||queueMicrotask(()=>{!d&&t.parentNode&&u()}),t}function Kr(r,e,n){let t=e(r,n);typeof t=="function"&&E(r,t)}var zr=(r,e)=>{let n=t=>{r.contains(t.target)||e()};return document.addEventListener("pointerdown",n,!0),()=>document.removeEventListener("pointerdown",n,!0)},Pr=(r,e)=>{let n=e.duration??500,t=null,o=()=>{t=setTimeout(()=>{e.callback(),t=null},n)},i=()=>{t!==null&&(clearTimeout(t),t=null)};return r.addEventListener("pointerdown",o),r.addEventListener("pointerup",i),r.addEventListener("pointerleave",i),()=>{i(),r.removeEventListener("pointerdown",o),r.removeEventListener("pointerup",i),r.removeEventListener("pointerleave",i)}},jr=r=>{let e='a[href],button:not([disabled]),input:not([disabled]),select:not([disabled]),textarea:not([disabled]),[tabindex]:not([tabindex="-1"])',n=t=>{if(t.key!=="Tab")return;let o=Array.from(r.querySelectorAll(e));if(o.length===0)return;let i=o[0],a=o[o.length-1];t.shiftKey&&document.activeElement===i?(t.preventDefault(),a.focus()):!t.shiftKey&&document.activeElement===a&&(t.preventDefault(),i.focus())};return r.addEventListener("keydown",n),()=>r.removeEventListener("keydown",n)};var W=null;function qr(r,e){try{let n=r();return n&&typeof n.then=="function"&&n.catch(t=>{e?e(t,"async"):W?W(t,"async"):console.error("Unhandled async error in Sibu.catchError:",t)}),n}catch(n){return e?e(n,"sync"):W?W(n,"sync"):console.error("Unhandled error in Sibu.catchError:",n),null}}async function Ur(r,e){try{return await r()}catch(n){return e?e(n,"async"):W?W(n,"async"):console.error("Unhandled async error in Sibu.catchErrorAsync:",n),null}}function Wr(r){W=r}var re=0,Re=new Set;function ve(r){re++;try{return r()}finally{re--,re===0&&Mo()}}function Z(r){return re===0?!1:(Re.add(r),!0)}function Fr(){return re>0}function Mo(){for(let r of Re)Ge(r);Re.clear(),Qe()}var Ir=globalThis,De=_();function C(r,e){let n={value:r},t=De?e?.name:void 0,o=e?.equals;t&&(n.__name=t);function i(){return Q(n),n.value}i.__signal=n,t&&(i.__name=t);function a(c){let l=typeof c=="function"?c(n.value):c;if(!(o?o(n.value,l):Object.is(l,n.value))){if(De){let d=n.value;n.value=l;let u=Ir.__SIBU_DEVTOOLS_GLOBAL_HOOK__;u&&u.emit("signal:update",{signal:n,name:t,oldValue:d,newValue:l})}else n.value=l;Z(n)||me(n)}}if(De){let c=Ir.__SIBU_DEVTOOLS_GLOBAL_HOOK__;c&&c.emit("signal:create",{signal:n,name:t,getter:i,initial:r})}return[i,a]}var He=!1;function J(){return He}function Be(){He=!0}function Ke(){He=!1}function Vr(r){Be();try{return r()}finally{Ke()}}var $r=globalThis;function Gr(r,e){let n,t=!0;return()=>{let o=r();if(t)t=!1,n=o,G(()=>e(o,void 0));else{let i=n;n=o,G(()=>e(o,i))}}}function oe(r,e){if(N(typeof r=="function","effect: argument must be a function."),J())return()=>{};let n=e?.onError,t=n?()=>{try{r()}catch(c){n(c)}}:r,o=()=>{},i=()=>{o(),o=x(t,i)};o=x(t,i);let a=$r.__SIBU_DEVTOOLS_GLOBAL_HOOK__;return a&&a.emit("effect:create",{effectFn:r}),()=>{let c=$r.__SIBU_DEVTOOLS_GLOBAL_HOOK__;c&&c.emit("effect:destroy",{effectFn:r}),o()}}function z(r,e){N(typeof r=="function","derived: argument must be a getter function.");let n=e?.name,t={};t._d=!1,t._g=r;let o=()=>{t._d||(t._d=!0)};o._c=1,o._sig=t,x(()=>{t._d=!1,t._v=r()},o);let i=globalThis.__SIBU_DEVTOOLS_GLOBAL_HOOK__;function a(){if(fe)return t._d&&(t._d=!1,t._v=r()),t._v;if(Q(t),t._d){let c=t._v;x(()=>{t._d=!1,t._v=r()},o),i&&c!==t._v&&i.emit("computed:update",{signal:t,oldValue:c,newValue:t._v})}return t._v}return n&&(a.__name=n,t.__name=n),a.__signal=t,i&&i.emit("computed:create",{signal:t,name:n,getter:a}),a}function Qr(r,e){if(N(typeof r=="function","watch: first argument must be a getter function."),N(typeof e=="function","watch: second argument must be a callback function."),J())return()=>{};let n,t=!0;return x(()=>{let a=r();if(t){n=a,t=!1;return}Object.is(a,n)||(e(a,n),n=a)})}function Yr(r){N(r!==null&&typeof r=="object"&&!Array.isArray(r),"store: argument must be a plain object. For arrays, use array() instead.");let e={};Object.keys(r).forEach(l=>{let[d,u]=C(r[l]);e[l]=[d,u]});let n=new Proxy({},{get(l,d){if(d in e){let u=e[d][0];return u()}},set(){throw new Error("[Sibu] store: Direct mutation is not allowed. Use actions.setState() to update store properties.")}}),t=()=>{let l={};return Object.keys(e).forEach(d=>{l[d]=e[d][0]()}),l};return[n,{setState:l=>{let d=t(),u=typeof l=="function"?l(d):l;Object.entries(u).forEach(([f,m])=>{f in e&&e[f][1](m)})},reset:()=>{Object.keys(r).forEach(l=>{let d=e[l][1];d(r[l])})},subscribe:l=>{let d=!0;return oe(()=>{let u=t();if(d){d=!1;return}l(u)})},subscribeKey:(l,d)=>{let u,f=!0;return oe(()=>{let m=e[l][0]();if(f){u=m,f=!1;return}if(!Object.is(m,u)){let p=u;u=m,d(m,p)}})},getSnapshot:t}]}function Zr(r){let[e,n]=C(r);return{get current(){return e()},set current(t){n(t)}}}function Jr(r){return z(r)}function Xr(r){return z(r)}function eo(r=[]){let[e,n]=C([...r]);return[e,{push(...o){n(i=>[...i,...o])},pop(){let o;return n(i=>{let a=[...i];return o=a.pop(),a}),o},shift(){let o;return n(i=>{let a=[...i];return o=a.shift(),a}),o},unshift(...o){n(i=>[...o,...i])},splice(o,i=0,...a){let c=[];return n(l=>{let d=[...l];return c=d.splice(o,i,...a),d}),c},remove(o){n(i=>i.filter((a,c)=>c!==o))},removeWhere(o){n(i=>{let a=i.findIndex(o);return a===-1?i:i.filter((c,l)=>l!==a)})},set(o){n([...o])},update(o,i){n(a=>a.map((c,l)=>l===o?i:c))},updateWhere(o,i){n(a=>a.map(c=>o(c)?i(c):c))},sort(o){n(i=>[...i].sort(o))},reverse(){n(o=>[...o].reverse())},filter(o){n(i=>i.filter(o))},map(o){n(i=>i.map(o))},clear(){n([])}}]}function to(r=[]){let e=[...r],n=null,t={};function o(){n=null,Z(t)||me(t)}function i(){return Q(t),n===null&&(n=Object.freeze([...e])),n}return[i,{push(...c){c.length!==0&&(e.push(...c),o())},pop(){if(e.length===0)return;let c=e.pop();return o(),c},shift(){if(e.length===0)return;let c=e.shift();return o(),c},unshift(...c){c.length!==0&&(e.unshift(...c),o())},splice(c,l=0,...d){let u=e.splice(c,l,...d);return(u.length>0||d.length>0)&&o(),u},remove(c){c<0||c>=e.length||(e.splice(c,1),o())},removeWhere(c){let l=e.findIndex(c);l!==-1&&(e.splice(l,1),o())},set(c){e=[...c],o()},update(c,l){c<0||c>=e.length||Object.is(e[c],l)||(e[c]=l,o())},updateWhere(c,l){let d=!1;for(let u=0;u<e.length;u++)if(c(e[u])){let f=l(e[u]);Object.is(e[u],f)||(e[u]=f,d=!0)}d&&o()},sort(c){e.length<=1||(e.sort(c),o())},reverse(){e.length<=1||(e.reverse(),o())},filter(c){let l=e.filter(c);l.length!==e.length&&(e=l,o())},map(c){let l=!1;for(let d=0;d<e.length;d++){let u=c(e[d],d);Object.is(e[d],u)||(e[d]=u,l=!0)}l&&o()},clear(){e.length!==0&&(e=[],o())}}]}function ie(r,e,n){if(Object.is(r,e))return!0;if(r==null||e==null||typeof r!=typeof e||typeof r!="object")return!1;if(r instanceof Date&&e instanceof Date)return r.getTime()===e.getTime();if(r instanceof RegExp&&e instanceof RegExp)return r.toString()===e.toString();if(n||(n=new Set),n.has(r))return!0;if(n.add(r),Array.isArray(r))return!Array.isArray(e)||r.length!==e.length?!1:r.every((i,a)=>ie(i,e[a],n));let t=Object.keys(r),o=Object.keys(e);return t.length!==o.length?!1:t.every(i=>ie(r[i],e[i],n))}function no(r){return C(r,{equals:(e,n)=>ie(e,n)})}function ro(r,e,n){return[z(r,n),i=>{ve(()=>e(i))}]}function se(r,e){try{r()}catch(n){L(`${e}: callback threw: ${n instanceof Error?n.message:String(n)}`)}}function ze(r,e){if(!(typeof document>"u"))if(e){if(e.isConnected){queueMicrotask(()=>{se(r,"onMount")});return}let n=new MutationObserver(()=>{e.isConnected&&(n.disconnect(),se(r,"onMount"))});queueMicrotask(()=>{e.isConnected?se(r,"onMount"):n.observe(document.body,{childList:!0,subtree:!0})})}else queueMicrotask(()=>{se(r,"onMount")})}function oo(r,e){let n=()=>{let t=new MutationObserver(()=>{e.isConnected||(t.disconnect(),se(r,"onUnmount"))});t.observe(document.body,{childList:!0,subtree:!0})};e.isConnected?n():ze(()=>{n()},e)}function io(r,e){E(e,r)}function so(r){let[e,n]=C(r);return{provide(t){n(t)},use(){return e},get(){return e()},set(t){n(t)}}}function Pe(r){let e=null;return function(){if(e)return e();let[t,o]=C("loading"),[i,a]=C(null),c=w({class:"sibu-lazy"});return r().then(l=>{e=l.default;let d=e();c.replaceChildren(d),o("loaded")}).catch(l=>{let d=l instanceof Error?l:new Error(String(l));a(d),o("error"),c.replaceChildren(w({class:"sibu-lazy-error",nodes:`Failed to load component: ${d.message}`}))}),c.appendChild(D({class:"sibu-lazy-loading",nodes:"Loading..."})),c}}function je({nodes:r,fallback:e}){let n=w({class:"sibu-suspense"}),t=e();return n.appendChild(t),queueMicrotask(()=>{try{let o=r();if(o.classList.contains("sibu-lazy")){let i=new MutationObserver(()=>{o.querySelector(".sibu-lazy-loading")||(i.disconnect(),n.replaceChildren(o))});i.observe(o,{childList:!0,subtree:!0}),o.querySelector(".sibu-lazy-loading")||n.replaceChildren(o)}else n.replaceChildren(o)}catch{}}),n}var Oo=_(),Ro=`
|
|
3
3
|
.sibu-error-boundary {
|
|
4
4
|
position: relative;
|
|
5
5
|
}
|
|
@@ -59,7 +59,7 @@
|
|
|
59
59
|
.sibu-error-fallback .sibu-error-btn:active {
|
|
60
60
|
transform: translateY(0);
|
|
61
61
|
}
|
|
62
|
-
`,
|
|
62
|
+
`,ao=!1;function Do(){if(!ao&&typeof document<"u"){let r=Y({nodes:Ro});document.head.appendChild(r),ao=!0}}var qe=new WeakMap;function Ho(r,e,n){let t=qe.get(r);t||(t=new Map,qe.set(r,t));let o=e.message;return t.has(o)||t.set(o,r(e,n)),t.get(o)}function co({nodes:r,fallback:e,onError:n}){Do();let[t,o]=C(null),i=()=>{e&&qe.delete(e),o(null)},a=u=>{let f=u instanceof Error?u:new Error(String(u));return o(f),n?.(f),f},c=(u,f)=>w({class:"sibu-error-fallback",nodes:[xe({nodes:"Something went wrong",class:"sibu-error-title"}),be({nodes:Oo?u.message:"An unexpected error occurred. Please try again.",class:"sibu-error-message"}),ye({nodes:"Retry",class:"sibu-error-btn",on:{click:f}})]}),l=u=>{let f=e||c;try{return Ho(f,u,i)}catch(m){let p=m instanceof Error?m:new Error(String(m));return queueMicrotask(()=>{d.parentNode&&d.dispatchEvent(new CustomEvent("sibu:error-propagate",{bubbles:!0,detail:{error:p}}))}),document.createComment("error-boundary-failed")}},d=w({class:"sibu-error-boundary",nodes:()=>{let u=t();if(u)return l(u);try{let f=r();if(f&&typeof f.then=="function"){let m=w({class:"sibu-error-async"});return m.appendChild(D({class:"sibu-lazy-loading",nodes:"Loading..."})),f.then(p=>{m.replaceChildren(p)}).catch(p=>{let g=a(p);m.replaceChildren(l(g))}),m}return f}catch(f){let m=a(f);return l(m)}}});return d.addEventListener("sibu:error-propagate",u=>{if(t())return;u.stopPropagation();let m=u.detail?.error;m&&a(m)}),d}var Bo=`
|
|
63
63
|
@keyframes sibu-spin {
|
|
64
64
|
to { transform: rotate(360deg); }
|
|
65
65
|
}
|
|
@@ -112,4 +112,4 @@
|
|
|
112
112
|
.sibu-loading-lg .sibu-loading-spinner { width: 40px; height: 40px; border-width: 4px; }
|
|
113
113
|
.sibu-loading-lg .sibu-loading-dot { width: 12px; height: 12px; }
|
|
114
114
|
.sibu-loading-lg .sibu-loading-dots { gap: 6px; }
|
|
115
|
-
`,
|
|
115
|
+
`,lo=!1;function Ko(){!lo&&typeof document<"u"&&(document.head.appendChild(Y({nodes:Bo})),lo=!0)}function uo(r={}){Ko();let{text:e,variant:n="spinner",size:t="md"}=r,o=t!=="md"?` sibu-loading-${t}`:"";return n==="dots"?w({class:`sibu-loading${o}`,nodes:[w({class:"sibu-loading-dots",nodes:[D({class:"sibu-loading-dot"}),D({class:"sibu-loading-dot"}),D({class:"sibu-loading-dot"})]}),e?D({class:"sibu-loading-text",nodes:e}):null].filter(Boolean)}):w({class:`sibu-loading${o}`,nodes:[w({class:"sibu-loading-spinner"}),e?D({class:"sibu-loading-text",nodes:e}):null].filter(Boolean)})}typeof window<"u"&&(window.Sibu=Ue);return bo(zo);})();
|
|
@@ -449,6 +449,20 @@ function colorScheme() {
|
|
|
449
449
|
return { scheme, dispose };
|
|
450
450
|
}
|
|
451
451
|
|
|
452
|
+
// src/browser/format.ts
|
|
453
|
+
function formatNumber(value, options) {
|
|
454
|
+
const { locale, ...formatOptions } = options ?? {};
|
|
455
|
+
return new Intl.NumberFormat(locale, formatOptions).format(value);
|
|
456
|
+
}
|
|
457
|
+
function formatCurrency(value, currency, options) {
|
|
458
|
+
const { locale, ...formatOptions } = options ?? {};
|
|
459
|
+
return new Intl.NumberFormat(locale, {
|
|
460
|
+
style: "currency",
|
|
461
|
+
currency,
|
|
462
|
+
...formatOptions
|
|
463
|
+
}).format(value);
|
|
464
|
+
}
|
|
465
|
+
|
|
452
466
|
export {
|
|
453
467
|
media,
|
|
454
468
|
resize,
|
|
@@ -462,5 +476,7 @@ export {
|
|
|
462
476
|
draggable,
|
|
463
477
|
dropZone,
|
|
464
478
|
title,
|
|
465
|
-
colorScheme
|
|
479
|
+
colorScheme,
|
|
480
|
+
formatNumber,
|
|
481
|
+
formatCurrency
|
|
466
482
|
};
|
|
@@ -72,7 +72,7 @@ function bindChildNode(placeholder, getter) {
|
|
|
72
72
|
const node = lastNodes[i];
|
|
73
73
|
if (node.parentNode) node.parentNode.removeChild(node);
|
|
74
74
|
}
|
|
75
|
-
if (result == null) {
|
|
75
|
+
if (result == null || typeof result === "boolean") {
|
|
76
76
|
lastNodes.length = 0;
|
|
77
77
|
return;
|
|
78
78
|
}
|
|
@@ -87,6 +87,7 @@ function bindChildNode(placeholder, getter) {
|
|
|
87
87
|
if (lastNodes.length < result.length) lastNodes = new Array(result.length);
|
|
88
88
|
for (let i = 0; i < result.length; i++) {
|
|
89
89
|
const item = result[i];
|
|
90
|
+
if (item == null || typeof item === "boolean") continue;
|
|
90
91
|
const node = item instanceof Node ? item : document.createTextNode(String(item));
|
|
91
92
|
parent.insertBefore(node, anchor);
|
|
92
93
|
lastNodes[count++] = node;
|
|
@@ -187,6 +188,9 @@ function appendChildren(el, nodes) {
|
|
|
187
188
|
el.textContent = String(nodes);
|
|
188
189
|
return;
|
|
189
190
|
}
|
|
191
|
+
if (typeof nodes === "boolean" || nodes == null) {
|
|
192
|
+
return;
|
|
193
|
+
}
|
|
190
194
|
if (typeof nodes === "function") {
|
|
191
195
|
const ph = document.createComment("");
|
|
192
196
|
el.appendChild(ph);
|
|
@@ -215,11 +219,11 @@ function appendChildren(el, nodes) {
|
|
|
215
219
|
registerDisposer(el, bindChildNode(ph, inner));
|
|
216
220
|
} else if (inner instanceof Node) {
|
|
217
221
|
el.appendChild(inner);
|
|
218
|
-
} else if (inner != null) {
|
|
222
|
+
} else if (inner != null && typeof inner !== "boolean") {
|
|
219
223
|
el.appendChild(document.createTextNode(String(inner)));
|
|
220
224
|
}
|
|
221
225
|
}
|
|
222
|
-
} else if (c != null) {
|
|
226
|
+
} else if (c != null && typeof c !== "boolean") {
|
|
223
227
|
el.appendChild(document.createTextNode(String(c)));
|
|
224
228
|
}
|
|
225
229
|
}
|
|
@@ -135,7 +135,7 @@ import {
|
|
|
135
135
|
use,
|
|
136
136
|
var_,
|
|
137
137
|
video
|
|
138
|
-
} from "./chunk-
|
|
138
|
+
} from "./chunk-EWFVA3TJ.js";
|
|
139
139
|
import {
|
|
140
140
|
watch
|
|
141
141
|
} from "./chunk-CZUGLNJS.js";
|
|
@@ -149,7 +149,7 @@ import {
|
|
|
149
149
|
dispose,
|
|
150
150
|
registerDisposer,
|
|
151
151
|
tagFactory
|
|
152
|
-
} from "./chunk-
|
|
152
|
+
} from "./chunk-MDVXJWFN.js";
|
|
153
153
|
import {
|
|
154
154
|
bindAttribute,
|
|
155
155
|
bindDynamic,
|
|
@@ -309,6 +309,7 @@ __export(index_exports, {
|
|
|
309
309
|
object: () => object,
|
|
310
310
|
ol: () => ol,
|
|
311
311
|
on: () => on,
|
|
312
|
+
onCleanup: () => onCleanup,
|
|
312
313
|
onMount: () => onMount,
|
|
313
314
|
onUnmount: () => onUnmount,
|
|
314
315
|
optgroup: () => optgroup,
|
|
@@ -644,11 +645,11 @@ function executeElement(tmpl, values) {
|
|
|
644
645
|
const item = val[j];
|
|
645
646
|
if (item instanceof Node) {
|
|
646
647
|
el.appendChild(item);
|
|
647
|
-
} else if (item != null) {
|
|
648
|
+
} else if (item != null && typeof item !== "boolean") {
|
|
648
649
|
el.appendChild(document.createTextNode(String(item)));
|
|
649
650
|
}
|
|
650
651
|
}
|
|
651
|
-
} else if (val != null) {
|
|
652
|
+
} else if (val != null && typeof val !== "boolean") {
|
|
652
653
|
el.appendChild(document.createTextNode(String(val)));
|
|
653
654
|
}
|
|
654
655
|
break;
|
|
@@ -689,11 +690,11 @@ function html(strings, ...values) {
|
|
|
689
690
|
const item = val[j];
|
|
690
691
|
if (item instanceof Node) {
|
|
691
692
|
wrapper.appendChild(item);
|
|
692
|
-
} else if (item != null) {
|
|
693
|
+
} else if (item != null && typeof item !== "boolean") {
|
|
693
694
|
wrapper.appendChild(document.createTextNode(String(item)));
|
|
694
695
|
}
|
|
695
696
|
}
|
|
696
|
-
} else if (val != null) {
|
|
697
|
+
} else if (val != null && typeof val !== "boolean") {
|
|
697
698
|
wrapper.appendChild(document.createTextNode(String(val)));
|
|
698
699
|
}
|
|
699
700
|
break;
|
|
@@ -919,9 +920,10 @@ function each(getArray, render, options) {
|
|
|
919
920
|
function Fragment(nodes) {
|
|
920
921
|
const frag = document.createDocumentFragment();
|
|
921
922
|
for (const child of nodes) {
|
|
922
|
-
if (child == null) continue;
|
|
923
|
+
if (child == null || typeof child === "boolean") continue;
|
|
923
924
|
if (Array.isArray(child)) {
|
|
924
925
|
for (const nested of child) {
|
|
926
|
+
if (nested == null || typeof nested === "boolean") continue;
|
|
925
927
|
frag.appendChild(resolveChild(nested));
|
|
926
928
|
}
|
|
927
929
|
} else {
|
|
@@ -1636,6 +1638,9 @@ function onUnmount(callback, element) {
|
|
|
1636
1638
|
}, element);
|
|
1637
1639
|
}
|
|
1638
1640
|
}
|
|
1641
|
+
function onCleanup(callback, element) {
|
|
1642
|
+
registerDisposer(element, callback);
|
|
1643
|
+
}
|
|
1639
1644
|
|
|
1640
1645
|
// src/core/rendering/lazy.ts
|
|
1641
1646
|
function lazy(importFn) {
|
|
@@ -1994,6 +1999,7 @@ export {
|
|
|
1994
1999
|
writable,
|
|
1995
2000
|
onMount,
|
|
1996
2001
|
onUnmount,
|
|
2002
|
+
onCleanup,
|
|
1997
2003
|
lazy,
|
|
1998
2004
|
Suspense,
|
|
1999
2005
|
ErrorBoundary,
|