@banzamel/mineralui 1.3.0 → 1.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/MAvatar-DMNwEhrd.cjs +2 -0
- package/dist/{MAvatar-D4ZC9wml.cjs.map → MAvatar-DMNwEhrd.cjs.map} +1 -1
- package/dist/{MAvatar-B4Y9P5ua.js → MAvatar-lCDowKeG.js} +5 -5
- package/dist/{MAvatar-B4Y9P5ua.js.map → MAvatar-lCDowKeG.js.map} +1 -1
- package/dist/{MBadge-BaeeIRhu.js → MBadge-CuVY4TXo.js} +3 -3
- package/dist/{MBadge-BaeeIRhu.js.map → MBadge-CuVY4TXo.js.map} +1 -1
- package/dist/MBadge-DmIO-oEJ.cjs +2 -0
- package/dist/{MBadge-DJuqtMP7.cjs.map → MBadge-DmIO-oEJ.cjs.map} +1 -1
- package/dist/MButton-DTblkF4v.cjs +2 -0
- package/dist/{MButton-Rg85cgO1.cjs.map → MButton-DTblkF4v.cjs.map} +1 -1
- package/dist/{MButton-pSNx-6UK.js → MButton-JumA31vM.js} +4 -4
- package/dist/{MButton-pSNx-6UK.js.map → MButton-JumA31vM.js.map} +1 -1
- package/dist/{MCheckbox-B7SpcD4H.js → MCheckbox-DYrfb_bW.js} +3 -3
- package/dist/{MCheckbox-B7SpcD4H.js.map → MCheckbox-DYrfb_bW.js.map} +1 -1
- package/dist/MCheckbox-DbHXmu1a.cjs +2 -0
- package/dist/{MCheckbox-Bea3orrs.cjs.map → MCheckbox-DbHXmu1a.cjs.map} +1 -1
- package/dist/{MCookieBootstrap-DSOT4FQo.cjs → MCookieBootstrap-ByObqs4o.cjs} +1 -1
- package/dist/{MCookieBootstrap-DSOT4FQo.cjs.map → MCookieBootstrap-ByObqs4o.cjs.map} +1 -1
- package/dist/{MCookieBootstrap-CNYLvKjW.js → MCookieBootstrap-D1OGFCC7.js} +1 -1
- package/dist/{MCookieBootstrap-CNYLvKjW.js.map → MCookieBootstrap-D1OGFCC7.js.map} +1 -1
- package/dist/MDataTable-BSuwd0gb.cjs +2 -0
- package/dist/{MDataTable-_afEvx2S.cjs.map → MDataTable-BSuwd0gb.cjs.map} +1 -1
- package/dist/{MDataTable-D5SnGm3D.js → MDataTable-CEGkEf5L.js} +6 -6
- package/dist/{MDataTable-D5SnGm3D.js.map → MDataTable-CEGkEf5L.js.map} +1 -1
- package/dist/{MDrawer-CHvOVWPw.js → MDrawer-BCjiepJO.js} +5 -5
- package/dist/{MDrawer-CHvOVWPw.js.map → MDrawer-BCjiepJO.js.map} +1 -1
- package/dist/MDrawer-YhA79aS4.cjs +2 -0
- package/dist/{MDrawer-2NDNRU77.cjs.map → MDrawer-YhA79aS4.cjs.map} +1 -1
- package/dist/MDropdownMenu-BRL0Vcq_.cjs +2 -0
- package/dist/{MDropdownMenu-X7ywPqth.cjs.map → MDropdownMenu-BRL0Vcq_.cjs.map} +1 -1
- package/dist/{MDropdownMenu-CxBhYxQb.js → MDropdownMenu-CVp1LFgZ.js} +4 -4
- package/dist/{MDropdownMenu-CxBhYxQb.js.map → MDropdownMenu-CVp1LFgZ.js.map} +1 -1
- package/dist/MGalleryIllustration-BHtRFizZ.cjs +2 -0
- package/dist/{MGalleryIllustration-CeOMHzpt.cjs.map → MGalleryIllustration-BHtRFizZ.cjs.map} +1 -1
- package/dist/{MGalleryIllustration-D7CVMSwO.js → MGalleryIllustration-DhOtXwhC.js} +2 -2
- package/dist/{MGalleryIllustration-D7CVMSwO.js.map → MGalleryIllustration-DhOtXwhC.js.map} +1 -1
- package/dist/MHeading-4vfYPN_i.cjs +2 -0
- package/dist/{MHeading-CvAYmqMN.cjs.map → MHeading-4vfYPN_i.cjs.map} +1 -1
- package/dist/{MHeading-C5s-kb2D.js → MHeading-qOPIM4dL.js} +4 -4
- package/dist/{MHeading-C5s-kb2D.js.map → MHeading-qOPIM4dL.js.map} +1 -1
- package/dist/{MI18nProvider-VH14CI8u.js → MI18nProvider-BRZxEMqL.js} +1 -1
- package/dist/{MI18nProvider-VH14CI8u.js.map → MI18nProvider-BRZxEMqL.js.map} +1 -1
- package/dist/MI18nProvider-Bml7Vs2-.cjs +2 -0
- package/dist/{MI18nProvider-4ji0oN3U.cjs.map → MI18nProvider-Bml7Vs2-.cjs.map} +1 -1
- package/dist/MImage-DXy-dHas.cjs +2 -0
- package/dist/{MImage-DqAx0_B0.cjs.map → MImage-DXy-dHas.cjs.map} +1 -1
- package/dist/{MImage-F34N1nhB.js → MImage-Dp81HSZr.js} +5 -5
- package/dist/{MImage-F34N1nhB.js.map → MImage-Dp81HSZr.js.map} +1 -1
- package/dist/{MInline-BKY7arDg.js → MInline-CnxH6VZx.js} +5 -5
- package/dist/{MInline-BKY7arDg.js.map → MInline-CnxH6VZx.js.map} +1 -1
- package/dist/MInline-DYy3IhF-.cjs +2 -0
- package/dist/{MInline-FgdIt6kv.cjs.map → MInline-DYy3IhF-.cjs.map} +1 -1
- package/dist/{MInput-DI066RK9.js → MInput-3ynY4aGD.js} +6 -6
- package/dist/{MInput-DI066RK9.js.map → MInput-3ynY4aGD.js.map} +1 -1
- package/dist/MInput-DkbdeGQW.cjs +2 -0
- package/dist/{MInput-C_Prnehc.cjs.map → MInput-DkbdeGQW.cjs.map} +1 -1
- package/dist/{MInputCVC-BlBZjRft.js → MInputCVC-BO251yU6.js} +5 -5
- package/dist/{MInputCVC-BlBZjRft.js.map → MInputCVC-BO251yU6.js.map} +1 -1
- package/dist/MInputCVC-NSy1SkiZ.cjs +2 -0
- package/dist/{MInputCVC-B75iBIRt.cjs.map → MInputCVC-NSy1SkiZ.cjs.map} +1 -1
- package/dist/{MInputSearch-CBsBsuqu.js → MInputSearch-BT0OqlE_.js} +4 -4
- package/dist/{MInputSearch-CBsBsuqu.js.map → MInputSearch-BT0OqlE_.js.map} +1 -1
- package/dist/MInputSearch-CQQIKYMt.cjs +2 -0
- package/dist/{MInputSearch-BKQnKS-9.cjs.map → MInputSearch-CQQIKYMt.cjs.map} +1 -1
- package/dist/MLink-B6Az9m2B.cjs +2 -0
- package/dist/{MLink-DmB3rcWB.cjs.map → MLink-B6Az9m2B.cjs.map} +1 -1
- package/dist/{MLink-BgYBHhce.js → MLink-Cytb3UVc.js} +3 -3
- package/dist/{MLink-BgYBHhce.js.map → MLink-Cytb3UVc.js.map} +1 -1
- package/dist/{MModal-DXZ2SrJt.js → MModal-BTOS_Xrs.js} +4 -4
- package/dist/{MModal-DXZ2SrJt.js.map → MModal-BTOS_Xrs.js.map} +1 -1
- package/dist/MModal-BhYBOKUh.cjs +2 -0
- package/dist/{MModal-BaA098nr.cjs.map → MModal-BhYBOKUh.cjs.map} +1 -1
- package/dist/MPagination-4X0we8Ab.cjs +2 -0
- package/dist/{MPagination-C6hnhbTp.cjs.map → MPagination-4X0we8Ab.cjs.map} +1 -1
- package/dist/{MPagination-BFI_z3y6.js → MPagination-Bz35UIbt.js} +4 -4
- package/dist/{MPagination-BFI_z3y6.js.map → MPagination-Bz35UIbt.js.map} +1 -1
- package/dist/MPopover-C03jl1zd.cjs +2 -0
- package/dist/{MPopover-C3-fGAke.cjs.map → MPopover-C03jl1zd.cjs.map} +1 -1
- package/dist/{MPopover-BC9C5967.js → MPopover-DHc3otwX.js} +3 -3
- package/dist/{MPopover-BC9C5967.js.map → MPopover-DHc3otwX.js.map} +1 -1
- package/dist/{MPortal-Dqlkh3hw.js → MPortal-CHoRxTlE.js} +1 -1
- package/dist/{MPortal-Dqlkh3hw.js.map → MPortal-CHoRxTlE.js.map} +1 -1
- package/dist/MPortal-xGHZKLX5.cjs +2 -0
- package/dist/{MPortal-PyRKsZxc.cjs.map → MPortal-xGHZKLX5.cjs.map} +1 -1
- package/dist/{MQrCode-DfZwkhZV.js → MQrCode-Dmgh8fzs.js} +4 -4
- package/dist/{MQrCode-DfZwkhZV.js.map → MQrCode-Dmgh8fzs.js.map} +1 -1
- package/dist/MQrCode-blzcp1yz.cjs +2 -0
- package/dist/{MQrCode-L0trT6n3.cjs.map → MQrCode-blzcp1yz.cjs.map} +1 -1
- package/dist/{MSkeleton-DX9gJ311.js → MSkeleton-CJIlxsCx.js} +4 -4
- package/dist/{MSkeleton-DX9gJ311.js.map → MSkeleton-CJIlxsCx.js.map} +1 -1
- package/dist/MSkeleton-CQEnuIos.cjs +2 -0
- package/dist/{MSkeleton-BEdflu0F.cjs.map → MSkeleton-CQEnuIos.cjs.map} +1 -1
- package/dist/MSlider-B4K6bkIs.cjs +2 -0
- package/dist/{MSlider-BCMJkvcA.cjs.map → MSlider-B4K6bkIs.cjs.map} +1 -1
- package/dist/{MSlider-CqrusKJQ.js → MSlider-DuTnRaK_.js} +2 -2
- package/dist/{MSlider-CqrusKJQ.js.map → MSlider-DuTnRaK_.js.map} +1 -1
- package/dist/MSparkline-7ycEh2eZ.cjs +2 -0
- package/dist/{MSparkline-BOaNmbeB.cjs.map → MSparkline-7ycEh2eZ.cjs.map} +1 -1
- package/dist/{MSparkline-Cb_EwR-E.js → MSparkline-Dz4K9Vx9.js} +2 -2
- package/dist/{MSparkline-Cb_EwR-E.js.map → MSparkline-Dz4K9Vx9.js.map} +1 -1
- package/dist/{MStack-Dk0GNVBT.js → MStack-8qZI36jT.js} +5 -5
- package/dist/{MStack-Dk0GNVBT.js.map → MStack-8qZI36jT.js.map} +1 -1
- package/dist/MStack-BcEwA2sk.cjs +2 -0
- package/dist/{MStack-BgwBqm-V.cjs.map → MStack-BcEwA2sk.cjs.map} +1 -1
- package/dist/{MSubText-DwNeDGYg.js → MSubText-D-wde4hz.js} +4 -4
- package/dist/{MSubText-DwNeDGYg.js.map → MSubText-D-wde4hz.js.map} +1 -1
- package/dist/MSubText-DjtJHCSy.cjs +2 -0
- package/dist/{MSubText-D8VxE877.cjs.map → MSubText-DjtJHCSy.cjs.map} +1 -1
- package/dist/MSurface-DWl0groZ.cjs +2 -0
- package/dist/{MSurface-CFbX5C63.cjs.map → MSurface-DWl0groZ.cjs.map} +1 -1
- package/dist/{MSurface-COlEjDyo.js → MSurface-DnwfNn3F.js} +5 -5
- package/dist/{MSurface-COlEjDyo.js.map → MSurface-DnwfNn3F.js.map} +1 -1
- package/dist/{MTag-wsCYRndK.js → MTag-CGns3Rk2.js} +5 -5
- package/dist/{MTag-wsCYRndK.js.map → MTag-CGns3Rk2.js.map} +1 -1
- package/dist/MTag-D_mw488_.cjs +2 -0
- package/dist/{MTag-DZjcHYn0.cjs.map → MTag-D_mw488_.cjs.map} +1 -1
- package/dist/{MText-CexZuJgV.js → MText-C0VxNQCE.js} +4 -4
- package/dist/{MText-CexZuJgV.js.map → MText-C0VxNQCE.js.map} +1 -1
- package/dist/MText-rSgurLeq.cjs +2 -0
- package/dist/{MText-YIBipYLh.cjs.map → MText-rSgurLeq.cjs.map} +1 -1
- package/dist/MTimeAgo-BesEN_u2.cjs +2 -0
- package/dist/{MTimeAgo-91_ndjxU.cjs.map → MTimeAgo-BesEN_u2.cjs.map} +1 -1
- package/dist/{MTimeAgo-xxl53mct.js → MTimeAgo-ecmmkLeM.js} +4 -4
- package/dist/{MTimeAgo-xxl53mct.js.map → MTimeAgo-ecmmkLeM.js.map} +1 -1
- package/dist/MToggle-DV0lHLSE.cjs +2 -0
- package/dist/{MToggle-CsGS_W3X.cjs.map → MToggle-DV0lHLSE.cjs.map} +1 -1
- package/dist/{MToggle-B6emKoKq.js → MToggle-DXw8qz0m.js} +3 -3
- package/dist/{MToggle-B6emKoKq.js.map → MToggle-DXw8qz0m.js.map} +1 -1
- package/dist/{MTooltip-UYOjDBOu.js → MTooltip-BW4hHnEf.js} +3 -3
- package/dist/{MTooltip-UYOjDBOu.js.map → MTooltip-BW4hHnEf.js.map} +1 -1
- package/dist/MTooltip-Ce1cs9e3.cjs +2 -0
- package/dist/{MTooltip-CNXoyQEN.cjs.map → MTooltip-Ce1cs9e3.cjs.map} +1 -1
- package/dist/{cards-BguCbFp7.js → cards-D45hG2rJ.js} +17 -17
- package/dist/{cards-BguCbFp7.js.map → cards-D45hG2rJ.js.map} +1 -1
- package/dist/cards-DFUONqA1.cjs +2 -0
- package/dist/{cards-DgOG2sWk.cjs.map → cards-DFUONqA1.cjs.map} +1 -1
- package/dist/cards.cjs +1 -1
- package/dist/cards.js +2 -2
- package/dist/chunk-350yNsax.cjs +1 -0
- package/dist/chunk-efA98nb6.js +13 -0
- package/dist/{cn-YER3QsV1.js → cn-CUSXNnjF.js} +1 -1
- package/dist/{cn-YER3QsV1.js.map → cn-CUSXNnjF.js.map} +1 -1
- package/dist/{cn-CU5TNITO.cjs → cn-DYFxgzi2.cjs} +1 -1
- package/dist/{cn-CU5TNITO.cjs.map → cn-DYFxgzi2.cjs.map} +1 -1
- package/dist/components/display/MCodeBlock/MCodeBlock.d.ts +2 -0
- package/dist/components/display/MCodeBlock/MCodeBlock.types.d.ts +15 -0
- package/dist/components/display/MCodeBlock/index.d.ts +2 -0
- package/dist/components/display/index.d.ts +2 -0
- package/dist/components/layout/MGrid/MGrid.d.ts +7 -3
- package/dist/components/layout/MGrid/MGrid.types.d.ts +1 -2
- package/dist/components/layout/MNavbar/MNavbar.d.ts +1 -1
- package/dist/components/layout/MNavbar/MNavbar.types.d.ts +1 -0
- package/dist/components/layout/MSidebar/MSidebar.d.ts +1 -1
- package/dist/components/layout/MSidebar/MSidebar.types.d.ts +1 -0
- package/dist/components/layout/MTopbar/MTopbar.d.ts +1 -1
- package/dist/components/layout/MTopbar/MTopbar.types.d.ts +1 -0
- package/dist/controls-CkndCsX9.cjs +2 -0
- package/dist/{controls-CN5d1q6e.cjs.map → controls-CkndCsX9.cjs.map} +1 -1
- package/dist/{controls-CVdInuMI.js → controls-DY0O5P1b.js} +6 -6
- package/dist/{controls-CVdInuMI.js.map → controls-DY0O5P1b.js.map} +1 -1
- package/dist/controls.cjs +1 -1
- package/dist/controls.js +5 -5
- package/dist/cookie-consent-bootstrap.cjs +1 -1
- package/dist/cookie-consent-bootstrap.js +1 -1
- package/dist/{creditCards-ljs044xt.cjs → creditCards-198KJN0s.cjs} +1 -1
- package/dist/{creditCards-ljs044xt.cjs.map → creditCards-198KJN0s.cjs.map} +1 -1
- package/dist/{creditCards-CCysEwry.js → creditCards-BB11bW7D.js} +1 -1
- package/dist/{creditCards-CCysEwry.js.map → creditCards-BB11bW7D.js.map} +1 -1
- package/dist/data-BKhx0T2n.cjs +2 -0
- package/dist/{data-BZ3Uio4Z.cjs.map → data-BKhx0T2n.cjs.map} +1 -1
- package/dist/{data-BpGAUxCL.js → data-Coc1KFVp.js} +24 -24
- package/dist/{data-BpGAUxCL.js.map → data-Coc1KFVp.js.map} +1 -1
- package/dist/data.cjs +1 -1
- package/dist/data.js +3 -3
- package/dist/{dateUtils-CUY6CRCf.js → dateUtils-Ben8lfvV.js} +1 -1
- package/dist/{dateUtils-CUY6CRCf.js.map → dateUtils-Ben8lfvV.js.map} +1 -1
- package/dist/{dateUtils-Dq1vaA-D.cjs → dateUtils-vT9rOf1J.cjs} +1 -1
- package/dist/{dateUtils-Dq1vaA-D.cjs.map → dateUtils-vT9rOf1J.cjs.map} +1 -1
- package/dist/display-Bt0G6RPk.cjs +3 -0
- package/dist/display-Bt0G6RPk.cjs.map +1 -0
- package/dist/display-CZO1cOXZ.js +614 -0
- package/dist/display-CZO1cOXZ.js.map +1 -0
- package/dist/display.cjs +1 -1
- package/dist/display.js +4 -4
- package/dist/dropdowns-CI4qUI4Q.cjs +2 -0
- package/dist/{dropdowns-HY56LZkp.cjs.map → dropdowns-CI4qUI4Q.cjs.map} +1 -1
- package/dist/{dropdowns-CNKEy6vf.js → dropdowns-y3B9jSZf.js} +15 -15
- package/dist/{dropdowns-CNKEy6vf.js.map → dropdowns-y3B9jSZf.js.map} +1 -1
- package/dist/dropdowns.cjs +1 -1
- package/dist/dropdowns.js +1 -1
- package/dist/{feedback-BfSdnvUS.js → feedback-5T-NKzak.js} +18 -18
- package/dist/{feedback-BfSdnvUS.js.map → feedback-5T-NKzak.js.map} +1 -1
- package/dist/feedback-Cfi3ON4a.cjs +2 -0
- package/dist/{feedback-DkQNQVdK.cjs.map → feedback-Cfi3ON4a.cjs.map} +1 -1
- package/dist/feedback.cjs +1 -1
- package/dist/feedback.js +6 -6
- package/dist/{form-CFWADsyf.js → form-ClvMlxiX.js} +2 -2
- package/dist/{form-CFWADsyf.js.map → form-ClvMlxiX.js.map} +1 -1
- package/dist/form-g7ns3G0R.cjs +2 -0
- package/dist/{form-6JwrowsS.cjs.map → form-g7ns3G0R.cjs.map} +1 -1
- package/dist/form.cjs +1 -1
- package/dist/form.js +1 -1
- package/dist/{formatters-CNjg_h7-.cjs → formatters-CauWlsnM.cjs} +1 -1
- package/dist/{formatters-CNjg_h7-.cjs.map → formatters-CauWlsnM.cjs.map} +1 -1
- package/dist/{formatters-T0vvjMtB.js → formatters-Doqdu_w1.js} +1 -1
- package/dist/{formatters-T0vvjMtB.js.map → formatters-Doqdu_w1.js.map} +1 -1
- package/dist/{frameworkTexts-B6oE8pMk.js → frameworkTexts-Brl68Lwf.js} +2 -2
- package/dist/{frameworkTexts-B6oE8pMk.js.map → frameworkTexts-Brl68Lwf.js.map} +1 -1
- package/dist/frameworkTexts-khAIsKS9.cjs +2 -0
- package/dist/{frameworkTexts-C_9KZK_A.cjs.map → frameworkTexts-khAIsKS9.cjs.map} +1 -1
- package/dist/i18n.cjs +1 -1
- package/dist/i18n.js +1 -1
- package/dist/icons-BhZaama4.cjs +2 -0
- package/dist/{icons-Dv1T-cF4.cjs.map → icons-BhZaama4.cjs.map} +1 -1
- package/dist/{icons-D5DK-J2C.js → icons-DZr7JKf6.js} +1 -1
- package/dist/{icons-D5DK-J2C.js.map → icons-DZr7JKf6.js.map} +1 -1
- package/dist/icons.cjs +1 -1
- package/dist/icons.js +1 -1
- package/dist/illustrations.cjs +1 -1
- package/dist/illustrations.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +59 -59
- package/dist/inputs-BIqwv3qy.cjs +2 -0
- package/dist/{inputs-vov7Kj6q.cjs.map → inputs-BIqwv3qy.cjs.map} +1 -1
- package/dist/{inputs-BO7bjvyf.js → inputs-Cj6ITRad.js} +12 -12
- package/dist/{inputs-BO7bjvyf.js.map → inputs-Cj6ITRad.js.map} +1 -1
- package/dist/inputs.cjs +1 -1
- package/dist/inputs.js +4 -4
- package/dist/layout-Cu2u9xLW.js +939 -0
- package/dist/layout-Cu2u9xLW.js.map +1 -0
- package/dist/layout-DZXYG0TB.cjs +2 -0
- package/dist/layout-DZXYG0TB.cjs.map +1 -0
- package/dist/layout.cjs +1 -1
- package/dist/layout.js +5 -5
- package/dist/{layoutProps-Cl6d1KmH.js → layoutProps-Cwq4EXTV.js} +1 -1
- package/dist/{layoutProps-Cl6d1KmH.js.map → layoutProps-Cwq4EXTV.js.map} +1 -1
- package/dist/{layoutProps-Ck4VtGm9.cjs → layoutProps-DbnX4zRp.cjs} +1 -1
- package/dist/{layoutProps-Ck4VtGm9.cjs.map → layoutProps-DbnX4zRp.cjs.map} +1 -1
- package/dist/{licensing-CwzqhHH9.js → licensing-Cbpi1toF.js} +1 -1
- package/dist/{licensing-CwzqhHH9.js.map → licensing-Cbpi1toF.js.map} +1 -1
- package/dist/licensing-JchPJhVY.cjs +2 -0
- package/dist/{licensing-BXFauUj_.cjs.map → licensing-JchPJhVY.cjs.map} +1 -1
- package/dist/{locale-BNyzqXAU.js → locale-CS1-IY_I.js} +1 -1
- package/dist/{locale-BNyzqXAU.js.map → locale-CS1-IY_I.js.map} +1 -1
- package/dist/locale-DAkrtKuT.cjs +2 -0
- package/dist/{locale-BltrWJtd.cjs.map → locale-DAkrtKuT.cjs.map} +1 -1
- package/dist/media-CWx--sZw.cjs +2 -0
- package/dist/{media-BhRjHzpA.cjs.map → media-CWx--sZw.cjs.map} +1 -1
- package/dist/{media-BuIEAgV-.js → media-fmOnjugH.js} +9 -9
- package/dist/{media-BuIEAgV-.js.map → media-fmOnjugH.js.map} +1 -1
- package/dist/media.cjs +1 -1
- package/dist/media.js +3 -3
- package/dist/{overlays-D1SAF1F_.js → overlays-DlQem0xt.js} +7 -7
- package/dist/{overlays-D1SAF1F_.js.map → overlays-DlQem0xt.js.map} +1 -1
- package/dist/overlays-pT3iozjm.cjs +2 -0
- package/dist/{overlays-CjEh_HWn.cjs.map → overlays-pT3iozjm.cjs.map} +1 -1
- package/dist/overlays.cjs +1 -1
- package/dist/overlays.js +5 -5
- package/dist/primitives.cjs +1 -1
- package/dist/primitives.js +2 -2
- package/dist/prism-bash-Xs-n623m.js +177 -0
- package/dist/prism-bash-Xs-n623m.js.map +1 -0
- package/dist/prism-bash-oC8SHnvZ.cjs +2 -0
- package/dist/prism-bash-oC8SHnvZ.cjs.map +1 -0
- package/dist/prism-clike-BHy7LBAZ.cjs +2 -0
- package/dist/prism-clike-BHy7LBAZ.cjs.map +1 -0
- package/dist/prism-clike-CrtZga9r.js +30 -0
- package/dist/prism-clike-CrtZga9r.js.map +1 -0
- package/dist/prism-core-DsZQ3wSm.js +299 -0
- package/dist/prism-core-DsZQ3wSm.js.map +1 -0
- package/dist/prism-core-Z2NDHfPM.cjs +2 -0
- package/dist/prism-core-Z2NDHfPM.cjs.map +1 -0
- package/dist/prism-css-CtHScmdk.cjs +2 -0
- package/dist/prism-css-CtHScmdk.cjs.map +1 -0
- package/dist/prism-css-DNZzCmaG.js +57 -0
- package/dist/prism-css-DNZzCmaG.js.map +1 -0
- package/dist/prism-javascript-DVQ8iSSP.cjs +2 -0
- package/dist/prism-javascript-DVQ8iSSP.cjs.map +1 -0
- package/dist/prism-javascript-tgrsDJvl.js +103 -0
- package/dist/prism-javascript-tgrsDJvl.js.map +1 -0
- package/dist/prism-json-D3AIyrc5.cjs +2 -0
- package/dist/prism-json-D3AIyrc5.cjs.map +1 -0
- package/dist/prism-json-DdyAX9Pp.js +27 -0
- package/dist/prism-json-DdyAX9Pp.js.map +1 -0
- package/dist/prism-jsx-CnFRZYK4.cjs +2 -0
- package/dist/prism-jsx-CnFRZYK4.cjs.map +1 -0
- package/dist/prism-jsx-WafGh0eg.js +48 -0
- package/dist/prism-jsx-WafGh0eg.js.map +1 -0
- package/dist/prism-markup-3wgbeWT0.js +118 -0
- package/dist/prism-markup-3wgbeWT0.js.map +1 -0
- package/dist/prism-markup-BsZlEnsE.cjs +2 -0
- package/dist/prism-markup-BsZlEnsE.cjs.map +1 -0
- package/dist/prism-markup-templating-DwntZfmY.js +41 -0
- package/dist/prism-markup-templating-DwntZfmY.js.map +1 -0
- package/dist/prism-markup-templating-Vn_U79T9.cjs +2 -0
- package/dist/prism-markup-templating-Vn_U79T9.cjs.map +1 -0
- package/dist/prism-php-CizDps-m.js +279 -0
- package/dist/prism-php-CizDps-m.js.map +1 -0
- package/dist/prism-php-DDMsSDeI.cjs +2 -0
- package/dist/prism-php-DDMsSDeI.cjs.map +1 -0
- package/dist/prism-tsx-BFlaUgcE.js +10 -0
- package/dist/prism-tsx-BFlaUgcE.js.map +1 -0
- package/dist/prism-tsx-DDg7MuNh.cjs +2 -0
- package/dist/prism-tsx-DDg7MuNh.cjs.map +1 -0
- package/dist/prism-typescript-Br2XvXsL.js +40 -0
- package/dist/prism-typescript-Br2XvXsL.js.map +1 -0
- package/dist/prism-typescript-DYi8QiPX.cjs +2 -0
- package/dist/prism-typescript-DYi8QiPX.cjs.map +1 -0
- package/dist/{relativeTime-Cr-NVzij.js → relativeTime-BqCuaBqb.js} +1 -1
- package/dist/{relativeTime-Cr-NVzij.js.map → relativeTime-BqCuaBqb.js.map} +1 -1
- package/dist/{relativeTime-DgYBUaVm.cjs → relativeTime-DUbW4O44.cjs} +1 -1
- package/dist/{relativeTime-DgYBUaVm.cjs.map → relativeTime-DUbW4O44.cjs.map} +1 -1
- package/dist/style-runtime.cjs +1 -1
- package/dist/style-runtime.js +1 -1
- package/dist/styles.css +1 -1
- package/dist/theme/MTheme.types.d.ts +1 -0
- package/dist/theme/index.d.ts +2 -2
- package/dist/theme/responsive.d.ts +5 -0
- package/dist/theme-Bnwe-wvr.cjs +2 -0
- package/dist/{theme-CyIOdO9W.cjs.map → theme-Bnwe-wvr.cjs.map} +1 -1
- package/dist/{theme-Dl4EpdnW.js → theme-KYwqDZxJ.js} +14 -3
- package/dist/{theme-Dl4EpdnW.js.map → theme-KYwqDZxJ.js.map} +1 -1
- package/dist/theme.cjs +1 -1
- package/dist/theme.js +2 -2
- package/dist/typography-B_xK5Q_j.cjs +2 -0
- package/dist/{typography-DHjL4YTH.cjs.map → typography-B_xK5Q_j.cjs.map} +1 -1
- package/dist/{typography-BrIbvz08.js → typography-C3BBQ_9r.js} +3 -3
- package/dist/{typography-BrIbvz08.js.map → typography-C3BBQ_9r.js.map} +1 -1
- package/dist/typography.cjs +1 -1
- package/dist/typography.js +5 -5
- package/dist/{useGhostText-DG0bzcao.js → useGhostText-BJZKdZpw.js} +1 -1
- package/dist/{useGhostText-DG0bzcao.js.map → useGhostText-BJZKdZpw.js.map} +1 -1
- package/dist/useGhostText-D1DbIs-n.cjs +2 -0
- package/dist/{useGhostText-QMdO_HK6.cjs.map → useGhostText-D1DbIs-n.cjs.map} +1 -1
- package/dist/useInteractionEffect-CYHGHV1e.cjs +2 -0
- package/dist/{useInteractionEffect-DnEfbCrX.cjs.map → useInteractionEffect-CYHGHV1e.cjs.map} +1 -1
- package/dist/{useInteractionEffect-DtpbVd77.js → useInteractionEffect-ClkU3aH5.js} +1 -1
- package/dist/{useInteractionEffect-DtpbVd77.js.map → useInteractionEffect-ClkU3aH5.js.map} +1 -1
- package/dist/useKeyboardNav-BoibrRUF.cjs +2 -0
- package/dist/{useKeyboardNav-BrODLJaL.cjs.map → useKeyboardNav-BoibrRUF.cjs.map} +1 -1
- package/dist/{useKeyboardNav-iEXOdEMB.js → useKeyboardNav-CBOdeTFM.js} +1 -1
- package/dist/{useKeyboardNav-iEXOdEMB.js.map → useKeyboardNav-CBOdeTFM.js.map} +1 -1
- package/dist/useReveal-DVwtH8Dl.cjs +2 -0
- package/dist/{useReveal-B_17PI89.cjs.map → useReveal-DVwtH8Dl.cjs.map} +1 -1
- package/dist/{useReveal-BJ59usiL.js → useReveal-JAiIFTia.js} +1 -1
- package/dist/{useReveal-BJ59usiL.js.map → useReveal-JAiIFTia.js.map} +1 -1
- package/dist/utils.cjs +1 -1
- package/dist/utils.js +11 -11
- package/dist/{validators-BeNTD8mf.cjs → validators-D4aTeaH0.cjs} +1 -1
- package/dist/{validators-BeNTD8mf.cjs.map → validators-D4aTeaH0.cjs.map} +1 -1
- package/dist/{validators-H8tNxb8O.js → validators-YZyyyLvE.js} +1 -1
- package/dist/{validators-H8tNxb8O.js.map → validators-YZyyyLvE.js.map} +1 -1
- package/package.json +4 -1
- package/dist/MAvatar-D4ZC9wml.cjs +0 -2
- package/dist/MBadge-DJuqtMP7.cjs +0 -2
- package/dist/MButton-Rg85cgO1.cjs +0 -2
- package/dist/MCheckbox-Bea3orrs.cjs +0 -2
- package/dist/MDataTable-_afEvx2S.cjs +0 -2
- package/dist/MDrawer-2NDNRU77.cjs +0 -2
- package/dist/MDropdownMenu-X7ywPqth.cjs +0 -2
- package/dist/MGalleryIllustration-CeOMHzpt.cjs +0 -2
- package/dist/MHeading-CvAYmqMN.cjs +0 -2
- package/dist/MI18nProvider-4ji0oN3U.cjs +0 -2
- package/dist/MImage-DqAx0_B0.cjs +0 -2
- package/dist/MInline-FgdIt6kv.cjs +0 -2
- package/dist/MInput-C_Prnehc.cjs +0 -2
- package/dist/MInputCVC-B75iBIRt.cjs +0 -2
- package/dist/MInputSearch-BKQnKS-9.cjs +0 -2
- package/dist/MLink-DmB3rcWB.cjs +0 -2
- package/dist/MModal-BaA098nr.cjs +0 -2
- package/dist/MPagination-C6hnhbTp.cjs +0 -2
- package/dist/MPopover-C3-fGAke.cjs +0 -2
- package/dist/MPortal-PyRKsZxc.cjs +0 -2
- package/dist/MQrCode-L0trT6n3.cjs +0 -2
- package/dist/MSkeleton-BEdflu0F.cjs +0 -2
- package/dist/MSlider-BCMJkvcA.cjs +0 -2
- package/dist/MSparkline-BOaNmbeB.cjs +0 -2
- package/dist/MStack-BgwBqm-V.cjs +0 -2
- package/dist/MSubText-D8VxE877.cjs +0 -2
- package/dist/MSurface-CFbX5C63.cjs +0 -2
- package/dist/MTag-DZjcHYn0.cjs +0 -2
- package/dist/MText-YIBipYLh.cjs +0 -2
- package/dist/MTimeAgo-91_ndjxU.cjs +0 -2
- package/dist/MToggle-CsGS_W3X.cjs +0 -2
- package/dist/MTooltip-CNXoyQEN.cjs +0 -2
- package/dist/cards-DgOG2sWk.cjs +0 -2
- package/dist/controls-CN5d1q6e.cjs +0 -2
- package/dist/data-BZ3Uio4Z.cjs +0 -2
- package/dist/display-CCG1eb0m.cjs +0 -2
- package/dist/display-CCG1eb0m.cjs.map +0 -1
- package/dist/display-gwrOWH2c.js +0 -467
- package/dist/display-gwrOWH2c.js.map +0 -1
- package/dist/dropdowns-HY56LZkp.cjs +0 -2
- package/dist/feedback-DkQNQVdK.cjs +0 -2
- package/dist/form-6JwrowsS.cjs +0 -2
- package/dist/frameworkTexts-C_9KZK_A.cjs +0 -2
- package/dist/icons-Dv1T-cF4.cjs +0 -2
- package/dist/inputs-vov7Kj6q.cjs +0 -2
- package/dist/layout-BvKpFxol.js +0 -905
- package/dist/layout-BvKpFxol.js.map +0 -1
- package/dist/layout-TFV-1uoQ.cjs +0 -2
- package/dist/layout-TFV-1uoQ.cjs.map +0 -1
- package/dist/licensing-BXFauUj_.cjs +0 -2
- package/dist/locale-BltrWJtd.cjs +0 -2
- package/dist/media-BhRjHzpA.cjs +0 -2
- package/dist/overlays-CjEh_HWn.cjs +0 -2
- package/dist/theme-CyIOdO9W.cjs +0 -2
- package/dist/typography-DHjL4YTH.cjs +0 -2
- package/dist/useGhostText-QMdO_HK6.cjs +0 -2
- package/dist/useInteractionEffect-DnEfbCrX.cjs +0 -2
- package/dist/useKeyboardNav-BrODLJaL.cjs +0 -2
- package/dist/useReveal-B_17PI89.cjs +0 -2
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
var e={valid:!0};function t(e){return e.toUpperCase().replace(/[^A-Z0-9]/g,``)}function n(e){let t=e.replace(/\D/g,``).slice(0,5);return t.length<=2?t:`${t.slice(0,2)}-${t.slice(2)}`}function r(e){let t=e.replace(/\D/g,``).slice(0,9);return t.length<=5?t:`${t.slice(0,5)}-${t.slice(5)}`}function i(e,t){return e.replace(/\D/g,``).slice(0,t)}function a(e){return t(e).slice(0,6).split(``).map((e,t)=>t===3?` ${e}`:e).join(``)}function o(e){let n=t(e).slice(0,7);return n.length<=3?n:`${n.slice(0,n.length-3)} ${n.slice(-3)}`}function s(e){let n=t(e).slice(0,6);return n.length<=4?n:`${n.slice(0,4)} ${n.slice(4)}`}var c={PL:{countryCode:`PL`,label:`Poland`,placeholder:`12-345`,example:`00-001`,inputMode:`numeric`,maxLength:6,regex:/^\d{2}-\d{3}$/,sanitize:e=>e.replace(/\D/g,``).slice(0,5),format:n,message:`Use the Polish format XX-XXX`},DE:{countryCode:`DE`,label:`Germany`,placeholder:`12345`,example:`10115`,inputMode:`numeric`,maxLength:5,regex:/^\d{5}$/,sanitize:e=>e.replace(/\D/g,``).slice(0,5),format:e=>i(e,5),message:`Use a 5-digit German postal code`},FR:{countryCode:`FR`,label:`France`,placeholder:`75001`,example:`75001`,inputMode:`numeric`,maxLength:5,regex:/^\d{5}$/,sanitize:e=>e.replace(/\D/g,``).slice(0,5),format:e=>i(e,5),message:`Use a 5-digit French postal code`},ES:{countryCode:`ES`,label:`Spain`,placeholder:`28013`,example:`28013`,inputMode:`numeric`,maxLength:5,regex:/^\d{5}$/,sanitize:e=>e.replace(/\D/g,``).slice(0,5),format:e=>i(e,5),message:`Use a 5-digit Spanish postal code`},IT:{countryCode:`IT`,label:`Italy`,placeholder:`00184`,example:`00184`,inputMode:`numeric`,maxLength:5,regex:/^\d{5}$/,sanitize:e=>e.replace(/\D/g,``).slice(0,5),format:e=>i(e,5),message:`Use a 5-digit Italian postal code`},US:{countryCode:`US`,label:`United States`,placeholder:`12345 or 12345-6789`,example:`10001`,inputMode:`numeric`,maxLength:10,regex:/^\d{5}(?:-\d{4})?$/,sanitize:e=>e.replace(/\D/g,``).slice(0,9),format:r,message:`Use ZIP or ZIP+4 format`},CA:{countryCode:`CA`,label:`Canada`,placeholder:`A1A 1A1`,example:`M5V 3L9`,inputMode:`text`,maxLength:7,regex:/^[A-Z]\d[A-Z] \d[A-Z]\d$/,sanitize:e=>t(e).slice(0,6),format:a,message:`Use the Canadian format A1A 1A1`},GB:{countryCode:`GB`,label:`United Kingdom`,placeholder:`SW1A 1AA`,example:`SW1A 1AA`,inputMode:`text`,maxLength:8,regex:/^[A-Z]{1,2}\d[A-Z\d]? \d[A-Z]{2}$/,sanitize:e=>t(e).slice(0,7),format:o,message:`Use a valid UK postcode`},NL:{countryCode:`NL`,label:`Netherlands`,placeholder:`1234 AB`,example:`1012 AB`,inputMode:`text`,maxLength:7,regex:/^\d{4} [A-Z]{2}$/,sanitize:e=>t(e).slice(0,6),format:s,message:`Use the Dutch format 1234 AB`}},l=Object.values(c).map(({countryCode:e,label:t})=>({value:e,label:t}));function u(e=`PL`){return c[e.toUpperCase()]??c.PL}function d(e,t=`PL`){let n=u(t);return n.format(n.sanitize(e))}function f(t,n=`PL`){if(!t)return e;let r=u(n),i=r.format(r.sanitize(t));return r.regex.test(i)?e:{valid:!1,error:r.message}}var p={valid:!0},m=e=>({valid:!1,error:e});function h(e){return e.trim().length>0?p:m(`This field is required`)}function g(e){return t=>t.length>=e?p:m(`Minimum ${e} characters`)}function _(e){return t=>t.length<=e?p:m(`Maximum ${e} characters`)}function v(e,t){return n=>e.test(n)?p:m(t??`Invalid format`)}function y(e,t){return n=>{let r=parseFloat(n);return isNaN(r)?m(`Must be a number`):e!==void 0&&r<e?m(`Minimum value is ${e}`):t!==void 0&&r>t?m(`Maximum value is ${t}`):p}}var b=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/;function x(e){return e?b.test(e)?p:m(`Invalid email address`):p}var S={PL:9,DE:10,US:10,GB:10,FR:9,CZ:9,SK:9};function C(e,t){if(!e)return p;let n=e.replace(/\D/g,``);if(n.length<7)return m(`Phone number too short`);if(n.length>15)return m(`Phone number too long`);if(t){let e=S[t.toUpperCase()];if(e&&n.length!==e)return m(`Phone number should have ${e} digits`)}return p}var w={AL:28,AD:24,AT:20,AZ:28,BH:22,BY:28,BE:16,BA:20,BR:29,BG:22,CR:22,HR:21,CY:28,CZ:24,DK:18,DO:28,EG:29,SV:28,EE:20,FO:18,FI:18,FR:27,GE:22,DE:22,GI:23,GR:27,GL:18,GT:28,HU:28,IS:26,IQ:23,IE:22,IL:23,IT:27,JO:30,KZ:20,XK:20,KW:30,LV:21,LB:28,LI:21,LT:20,LU:20,MT:31,MR:27,MU:30,MD:24,MC:27,ME:22,NL:18,MK:19,NO:15,PK:24,PS:29,PL:28,PT:25,QA:29,RO:24,LC:32,SM:27,SA:24,RS:22,SC:31,SK:24,SI:19,ES:24,SE:24,CH:21,TL:23,TN:24,TR:26,UA:29,AE:23,GB:22,VA:22,VG:24};function T(e){let t=0;for(let n=0;n<e.length;n++)t=(t*10+parseInt(e[n],10))%97;return t}function E(e){if(!e)return p;let t=e.replace(/\s/g,``).toUpperCase();if(t.length<2)return m(`IBAN too short`);let n=t.slice(0,2),r=w[n];return r?t.length===r?T((t.slice(4)+t.slice(0,4)).replace(/[A-Z]/g,e=>String(e.charCodeAt(0)-55)))===1?p:m(`Invalid IBAN checksum`):m(`IBAN for ${n} should have ${r} characters`):m(`Unknown IBAN country code`)}var D=[6,5,7,2,3,4,5,6,7];function O(e){if(!e)return p;let t=e.replace(/\D/g,``);if(t.length!==10)return m(`NIP must have 10 digits`);let n=0;for(let e=0;e<9;e++)n+=parseInt(t[e],10)*D[e];let r=n%11;return r===10?m(`Invalid NIP`):r===parseInt(t[9],10)?p:m(`Invalid NIP checksum`)}var k=[1,3,7,9,1,3,7,9,1,3];function A(e){if(!e)return p;let t=e.replace(/\D/g,``);if(t.length!==11)return m(`PESEL must have 11 digits`);let n=0;for(let e=0;e<10;e++)n+=parseInt(t[e],10)*k[e];return(10-n%10)%10===parseInt(t[10],10)?p:m(`Invalid PESEL checksum`)}var j=[8,9,2,3,4,5,6,7],M=[2,4,8,5,0,9,7,3,6,1,2,4,8];function N(e){if(!e)return p;let t=e.replace(/\D/g,``);if(t.length!==9&&t.length!==14)return m(`REGON must have 9 or 14 digits`);let n=t.length===9?j:M,r=0;for(let e=0;e<n.length;e++)r+=parseInt(t[e],10)*n[e];return(r%11==10?0:r%11)===parseInt(t[t.length-1],10)?p:m(`Invalid REGON checksum`)}function P(...e){return t=>{for(let n of e){let e=n(t);if(!e.valid)return e}return p}}function F(e,t=`DD/MM/YYYY`){let n=e.replace(/\D/g,``);if(n.length!==8)return null;let r,i,a;if(t===`DD/MM/YYYY`?(r=parseInt(n.slice(0,2),10),i=parseInt(n.slice(2,4),10),a=parseInt(n.slice(4,8),10)):t===`MM/DD/YYYY`?(i=parseInt(n.slice(0,2),10),r=parseInt(n.slice(2,4),10),a=parseInt(n.slice(4,8),10)):(a=parseInt(n.slice(0,4),10),i=parseInt(n.slice(4,6),10),r=parseInt(n.slice(6,8),10)),i<1||i>12||r<1||r>31||a<1)return null;let o=new Date(a,i-1,r);return o.getFullYear()!==a||o.getMonth()!==i-1||o.getDate()!==r?null:o}function I(e,t={}){if(!e)return p;let{format:n=`DD/MM/YYYY`,minDate:r,maxDate:i}=t;if(e.replace(/\D/g,``).length!==8)return m(`Incomplete date`);let a=F(e,n);return a?r&&a<new Date(r.getFullYear(),r.getMonth(),r.getDate())?m(`Date is too early`):i&&a>new Date(i.getFullYear(),i.getMonth(),i.getDate())?m(`Date is too far in the future`):p:m(`Invalid date`)}Object.defineProperty(exports,`_`,{enumerable:!0,get:function(){return l}}),Object.defineProperty(exports,`a`,{enumerable:!0,get:function(){return E}}),Object.defineProperty(exports,`c`,{enumerable:!0,get:function(){return O}}),Object.defineProperty(exports,`d`,{enumerable:!0,get:function(){return C}}),Object.defineProperty(exports,`f`,{enumerable:!0,get:function(){return N}}),Object.defineProperty(exports,`g`,{enumerable:!0,get:function(){return u}}),Object.defineProperty(exports,`h`,{enumerable:!0,get:function(){return d}}),Object.defineProperty(exports,`i`,{enumerable:!0,get:function(){return x}}),Object.defineProperty(exports,`l`,{enumerable:!0,get:function(){return A}}),Object.defineProperty(exports,`m`,{enumerable:!0,get:function(){return h}}),Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return F}}),Object.defineProperty(exports,`o`,{enumerable:!0,get:function(){return _}}),Object.defineProperty(exports,`p`,{enumerable:!0,get:function(){return y}}),Object.defineProperty(exports,`r`,{enumerable:!0,get:function(){return I}}),Object.defineProperty(exports,`s`,{enumerable:!0,get:function(){return g}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return P}}),Object.defineProperty(exports,`u`,{enumerable:!0,get:function(){return v}}),Object.defineProperty(exports,`v`,{enumerable:!0,get:function(){return c}}),Object.defineProperty(exports,`y`,{enumerable:!0,get:function(){return f}});
|
|
2
|
-
//# sourceMappingURL=validators-
|
|
2
|
+
//# sourceMappingURL=validators-D4aTeaH0.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validators-BeNTD8mf.cjs","names":[],"sources":["../src/utils/postalCodes.ts","../src/utils/validators.ts"],"sourcesContent":["import type {ValidationResult} from './validators'\n\nexport interface PostCodeRule {\n countryCode: string\n label: string\n placeholder: string\n example: string\n inputMode: 'text' | 'numeric'\n maxLength: number\n regex: RegExp\n sanitize: (value: string) => string\n format: (value: string) => string\n message: string\n}\n\nconst OK_RESULT: ValidationResult = {valid: true}\n\n// Reuse one sanitizer for countries that mix letters and digits.\nfunction keepLettersAndDigits(value: string): string {\n return value.toUpperCase().replace(/[^A-Z0-9]/g, '')\n}\n\n// Apply the common Polish XX-XXX postcode shape.\nfunction formatPlPostCode(value: string): string {\n const digits = value.replace(/\\D/g, '').slice(0, 5)\n\n if (digits.length <= 2) {\n return digits\n }\n\n return `${digits.slice(0, 2)}-${digits.slice(2)}`\n}\n\n// Support ZIP and ZIP+4 with the same formatter.\nfunction formatUsPostCode(value: string): string {\n const digits = value.replace(/\\D/g, '').slice(0, 9)\n\n if (digits.length <= 5) {\n return digits\n }\n\n return `${digits.slice(0, 5)}-${digits.slice(5)}`\n}\n\n// Clamp countries that only need a fixed number of digits.\nfunction formatFixedDigits(value: string, maxLength: number): string {\n return value.replace(/\\D/g, '').slice(0, maxLength)\n}\n\n// Insert the standard center space used by Canadian post codes.\nfunction formatCaPostCode(value: string): string {\n const clean = keepLettersAndDigits(value).slice(0, 6)\n const chars = clean.split('')\n\n return chars\n .map((char, index) => {\n if (index === 3) {\n return ` ${char}`\n }\n\n return char\n })\n .join('')\n}\n\n// Split the outward and inward parts of a UK postcode.\nfunction formatGbPostCode(value: string): string {\n const clean = keepLettersAndDigits(value).slice(0, 7)\n\n if (clean.length <= 3) {\n return clean\n }\n\n return `${clean.slice(0, clean.length - 3)} ${clean.slice(-3)}`\n}\n\n// Split Dutch codes into four digits and two letters.\nfunction formatNlPostCode(value: string): string {\n const clean = keepLettersAndDigits(value).slice(0, 6)\n\n if (clean.length <= 4) {\n return clean\n }\n\n return `${clean.slice(0, 4)} ${clean.slice(4)}`\n}\n\nexport const postCodeRules: Record<string, PostCodeRule> = {\n PL: {\n countryCode: 'PL',\n label: 'Poland',\n placeholder: '12-345',\n example: '00-001',\n inputMode: 'numeric',\n maxLength: 6,\n regex: /^\\d{2}-\\d{3}$/,\n sanitize: (value) => value.replace(/\\D/g, '').slice(0, 5),\n format: formatPlPostCode,\n message: 'Use the Polish format XX-XXX',\n },\n DE: {\n countryCode: 'DE',\n label: 'Germany',\n placeholder: '12345',\n example: '10115',\n inputMode: 'numeric',\n maxLength: 5,\n regex: /^\\d{5}$/,\n sanitize: (value) => value.replace(/\\D/g, '').slice(0, 5),\n format: (value) => formatFixedDigits(value, 5),\n message: 'Use a 5-digit German postal code',\n },\n FR: {\n countryCode: 'FR',\n label: 'France',\n placeholder: '75001',\n example: '75001',\n inputMode: 'numeric',\n maxLength: 5,\n regex: /^\\d{5}$/,\n sanitize: (value) => value.replace(/\\D/g, '').slice(0, 5),\n format: (value) => formatFixedDigits(value, 5),\n message: 'Use a 5-digit French postal code',\n },\n ES: {\n countryCode: 'ES',\n label: 'Spain',\n placeholder: '28013',\n example: '28013',\n inputMode: 'numeric',\n maxLength: 5,\n regex: /^\\d{5}$/,\n sanitize: (value) => value.replace(/\\D/g, '').slice(0, 5),\n format: (value) => formatFixedDigits(value, 5),\n message: 'Use a 5-digit Spanish postal code',\n },\n IT: {\n countryCode: 'IT',\n label: 'Italy',\n placeholder: '00184',\n example: '00184',\n inputMode: 'numeric',\n maxLength: 5,\n regex: /^\\d{5}$/,\n sanitize: (value) => value.replace(/\\D/g, '').slice(0, 5),\n format: (value) => formatFixedDigits(value, 5),\n message: 'Use a 5-digit Italian postal code',\n },\n US: {\n countryCode: 'US',\n label: 'United States',\n placeholder: '12345 or 12345-6789',\n example: '10001',\n inputMode: 'numeric',\n maxLength: 10,\n regex: /^\\d{5}(?:-\\d{4})?$/,\n sanitize: (value) => value.replace(/\\D/g, '').slice(0, 9),\n format: formatUsPostCode,\n message: 'Use ZIP or ZIP+4 format',\n },\n CA: {\n countryCode: 'CA',\n label: 'Canada',\n placeholder: 'A1A 1A1',\n example: 'M5V 3L9',\n inputMode: 'text',\n maxLength: 7,\n regex: /^[A-Z]\\d[A-Z] \\d[A-Z]\\d$/,\n sanitize: (value) => keepLettersAndDigits(value).slice(0, 6),\n format: formatCaPostCode,\n message: 'Use the Canadian format A1A 1A1',\n },\n GB: {\n countryCode: 'GB',\n label: 'United Kingdom',\n placeholder: 'SW1A 1AA',\n example: 'SW1A 1AA',\n inputMode: 'text',\n maxLength: 8,\n regex: /^[A-Z]{1,2}\\d[A-Z\\d]? \\d[A-Z]{2}$/,\n sanitize: (value) => keepLettersAndDigits(value).slice(0, 7),\n format: formatGbPostCode,\n message: 'Use a valid UK postcode',\n },\n NL: {\n countryCode: 'NL',\n label: 'Netherlands',\n placeholder: '1234 AB',\n example: '1012 AB',\n inputMode: 'text',\n maxLength: 7,\n regex: /^\\d{4} [A-Z]{2}$/,\n sanitize: (value) => keepLettersAndDigits(value).slice(0, 6),\n format: formatNlPostCode,\n message: 'Use the Dutch format 1234 AB',\n },\n}\n\nexport const postCodeCountries = Object.values(postCodeRules).map(({countryCode, label}) => ({\n value: countryCode,\n label,\n}))\n\n// Return the active postal rule or fall back to Poland for deterministic behavior.\nexport function getPostCodeRule(countryCode: string = 'PL'): PostCodeRule {\n return postCodeRules[countryCode.toUpperCase()] ?? postCodeRules.PL\n}\n\n// Keep postal input values aligned with the selected country format.\nexport function formatPostCode(value: string, countryCode: string = 'PL'): string {\n const rule = getPostCodeRule(countryCode)\n return rule.format(rule.sanitize(value))\n}\n\n// Validate the user-visible postal code against the selected country rule.\nexport function validatePostCode(value: string, countryCode: string = 'PL'): ValidationResult {\n if (!value) {\n return OK_RESULT\n }\n\n const rule = getPostCodeRule(countryCode)\n const formatted = rule.format(rule.sanitize(value))\n\n if (!rule.regex.test(formatted)) {\n return {valid: false, error: rule.message}\n }\n\n return OK_RESULT\n}\n","export interface ValidationResult {\n valid: boolean\n error?: string\n}\n\nexport type ValidatorFn = (value: string) => ValidationResult\n\nconst ok: ValidationResult = {valid: true}\nconst fail = (error: string): ValidationResult => ({valid: false, error})\n\n// Ensure the field is not empty after trimming user input.\nexport function validateRequired(value: string): ValidationResult {\n return value.trim().length > 0 ? ok : fail('This field is required')\n}\n\n// Build a validator that enforces a minimum string length.\nexport function validateMinLength(min: number): ValidatorFn {\n return (value: string) => (value.length >= min ? ok : fail(`Minimum ${min} characters`))\n}\n\n// Build a validator that enforces a maximum string length.\nexport function validateMaxLength(max: number): ValidatorFn {\n return (value: string) => (value.length <= max ? ok : fail(`Maximum ${max} characters`))\n}\n\n// Build a validator around a custom regular expression.\nexport function validatePattern(pattern: RegExp, message?: string): ValidatorFn {\n return (value: string) => (pattern.test(value) ? ok : fail(message ?? 'Invalid format'))\n}\n\n// Validate numeric input against optional min and max bounds.\nexport function validateRange(min?: number, max?: number): ValidatorFn {\n return (value: string) => {\n const num = parseFloat(value)\n if (isNaN(num)) return fail('Must be a number')\n if (min !== undefined && num < min) return fail(`Minimum value is ${min}`)\n if (max !== undefined && num > max) return fail(`Maximum value is ${max}`)\n return ok\n }\n}\n\n// === Email ===\n\nconst EMAIL_RE =\n /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/\n\n// Validate email format while allowing empty optional fields.\nexport function validateEmail(value: string): ValidationResult {\n if (!value) return ok\n return EMAIL_RE.test(value) ? ok : fail('Invalid email address')\n}\n\n// === Phone ===\n\nconst PHONE_LENGTH: Record<string, number> = {\n PL: 9,\n DE: 10,\n US: 10,\n GB: 10,\n FR: 9,\n CZ: 9,\n SK: 9,\n}\n\n// Validate a phone number with optional country-specific digit counts.\nexport function validatePhone(value: string, countryCode?: string): ValidationResult {\n if (!value) return ok\n const digits = value.replace(/\\D/g, '')\n if (digits.length < 7) return fail('Phone number too short')\n if (digits.length > 15) return fail('Phone number too long')\n if (countryCode) {\n const expected = PHONE_LENGTH[countryCode.toUpperCase()]\n if (expected && digits.length !== expected) {\n return fail(`Phone number should have ${expected} digits`)\n }\n }\n return ok\n}\n\n// === IBAN (MOD-97, ISO 13616) ===\n\nconst IBAN_LENGTHS: Record<string, number> = {\n AL: 28,\n AD: 24,\n AT: 20,\n AZ: 28,\n BH: 22,\n BY: 28,\n BE: 16,\n BA: 20,\n BR: 29,\n BG: 22,\n CR: 22,\n HR: 21,\n CY: 28,\n CZ: 24,\n DK: 18,\n DO: 28,\n EG: 29,\n SV: 28,\n EE: 20,\n FO: 18,\n FI: 18,\n FR: 27,\n GE: 22,\n DE: 22,\n GI: 23,\n GR: 27,\n GL: 18,\n GT: 28,\n HU: 28,\n IS: 26,\n IQ: 23,\n IE: 22,\n IL: 23,\n IT: 27,\n JO: 30,\n KZ: 20,\n XK: 20,\n KW: 30,\n LV: 21,\n LB: 28,\n LI: 21,\n LT: 20,\n LU: 20,\n MT: 31,\n MR: 27,\n MU: 30,\n MD: 24,\n MC: 27,\n ME: 22,\n NL: 18,\n MK: 19,\n NO: 15,\n PK: 24,\n PS: 29,\n PL: 28,\n PT: 25,\n QA: 29,\n RO: 24,\n LC: 32,\n SM: 27,\n SA: 24,\n RS: 22,\n SC: 31,\n SK: 24,\n SI: 19,\n ES: 24,\n SE: 24,\n CH: 21,\n TL: 23,\n TN: 24,\n TR: 26,\n UA: 29,\n AE: 23,\n GB: 22,\n VA: 22,\n VG: 24,\n}\n\n// Run the MOD-97 remainder calculation on a numeric IBAN representation.\nfunction mod97(numStr: string): number {\n let remainder = 0\n for (let i = 0; i < numStr.length; i++) {\n remainder = (remainder * 10 + parseInt(numStr[i], 10)) % 97\n }\n return remainder\n}\n\n// Validate a full IBAN using country length rules and the MOD-97 checksum.\nexport function validateIBAN(value: string): ValidationResult {\n if (!value) return ok\n const iban = value.replace(/\\s/g, '').toUpperCase()\n\n if (iban.length < 2) return fail('IBAN too short')\n\n const countryCode = iban.slice(0, 2)\n const expectedLength = IBAN_LENGTHS[countryCode]\n\n if (!expectedLength) return fail('Unknown IBAN country code')\n if (iban.length !== expectedLength) {\n return fail(`IBAN for ${countryCode} should have ${expectedLength} characters`)\n }\n\n // MOD-97 check: move first 4 chars to end, convert letters to numbers\n const rearranged = iban.slice(4) + iban.slice(0, 4)\n const numStr = rearranged.replace(/[A-Z]/g, (ch) => String(ch.charCodeAt(0) - 55))\n\n return mod97(numStr) === 1 ? ok : fail('Invalid IBAN checksum')\n}\n\n// === NIP (Polish Tax ID) ===\n\nconst NIP_WEIGHTS = [6, 5, 7, 2, 3, 4, 5, 6, 7]\n\n// Validate a Polish NIP number with its weighted checksum.\nexport function validateNIP(value: string): ValidationResult {\n if (!value) return ok\n const digits = value.replace(/\\D/g, '')\n if (digits.length !== 10) return fail('NIP must have 10 digits')\n\n let sum = 0\n for (let i = 0; i < 9; i++) {\n sum += parseInt(digits[i], 10) * NIP_WEIGHTS[i]\n }\n const checkDigit = sum % 11\n if (checkDigit === 10) return fail('Invalid NIP')\n return checkDigit === parseInt(digits[9], 10) ? ok : fail('Invalid NIP checksum')\n}\n\n// === PESEL ===\n\nconst PESEL_WEIGHTS = [1, 3, 7, 9, 1, 3, 7, 9, 1, 3]\n\n// Validate a Polish PESEL number with its checksum algorithm.\nexport function validatePESEL(value: string): ValidationResult {\n if (!value) return ok\n const digits = value.replace(/\\D/g, '')\n if (digits.length !== 11) return fail('PESEL must have 11 digits')\n\n let sum = 0\n for (let i = 0; i < 10; i++) {\n sum += parseInt(digits[i], 10) * PESEL_WEIGHTS[i]\n }\n const checkDigit = (10 - (sum % 10)) % 10\n return checkDigit === parseInt(digits[10], 10) ? ok : fail('Invalid PESEL checksum')\n}\n\n// === REGON ===\n\nconst REGON9_WEIGHTS = [8, 9, 2, 3, 4, 5, 6, 7]\nconst REGON14_WEIGHTS = [2, 4, 8, 5, 0, 9, 7, 3, 6, 1, 2, 4, 8]\n\n// Validate REGON numbers in both the 9-digit and 14-digit variants.\nexport function validateREGON(value: string): ValidationResult {\n if (!value) return ok\n const digits = value.replace(/\\D/g, '')\n\n if (digits.length !== 9 && digits.length !== 14) {\n return fail('REGON must have 9 or 14 digits')\n }\n\n const weights = digits.length === 9 ? REGON9_WEIGHTS : REGON14_WEIGHTS\n let sum = 0\n for (let i = 0; i < weights.length; i++) {\n sum += parseInt(digits[i], 10) * weights[i]\n }\n const checkDigit = sum % 11 === 10 ? 0 : sum % 11\n const lastDigit = parseInt(digits[digits.length - 1], 10)\n return checkDigit === lastDigit ? ok : fail('Invalid REGON checksum')\n}\n\n// === Compose validators ===\n\n// Run validators in order and stop at the first failure.\nexport function composeValidators(...validators: ValidatorFn[]): ValidatorFn {\n return (value: string) => {\n for (const validator of validators) {\n const result = validator(value)\n if (!result.valid) return result\n }\n return ok\n }\n}\n\n// === Date (DD/MM/YYYY, MM/DD/YYYY, YYYY/MM/DD) ===\n\nexport type DateFormat = 'DD/MM/YYYY' | 'MM/DD/YYYY' | 'YYYY/MM/DD'\n\ninterface DateValidationOptions {\n format?: DateFormat\n minDate?: Date\n maxDate?: Date\n}\n\n// Parse a date string in the given format into a Date or null.\nexport function parseDateString(value: string, format: DateFormat = 'DD/MM/YYYY'): Date | null {\n const digits = value.replace(/\\D/g, '')\n if (digits.length !== 8) return null\n\n let day: number, month: number, year: number\n if (format === 'DD/MM/YYYY') {\n day = parseInt(digits.slice(0, 2), 10)\n month = parseInt(digits.slice(2, 4), 10)\n year = parseInt(digits.slice(4, 8), 10)\n } else if (format === 'MM/DD/YYYY') {\n month = parseInt(digits.slice(0, 2), 10)\n day = parseInt(digits.slice(2, 4), 10)\n year = parseInt(digits.slice(4, 8), 10)\n } else {\n year = parseInt(digits.slice(0, 4), 10)\n month = parseInt(digits.slice(4, 6), 10)\n day = parseInt(digits.slice(6, 8), 10)\n }\n\n if (month < 1 || month > 12) return null\n if (day < 1 || day > 31) return null\n if (year < 1) return null\n\n const date = new Date(year, month - 1, day)\n // Verify the date didn't overflow (e.g. Feb 30 → Mar 2)\n if (date.getFullYear() !== year || date.getMonth() !== month - 1 || date.getDate() !== day) {\n return null\n }\n return date\n}\n\n// Validate a date string with optional range constraints.\nexport function validateDate(value: string, options: DateValidationOptions = {}): ValidationResult {\n if (!value) return ok\n const {format = 'DD/MM/YYYY', minDate, maxDate} = options\n\n const digits = value.replace(/\\D/g, '')\n if (digits.length !== 8) return fail('Incomplete date')\n\n const date = parseDateString(value, format)\n if (!date) return fail('Invalid date')\n\n if (minDate) {\n const min = new Date(minDate.getFullYear(), minDate.getMonth(), minDate.getDate())\n if (date < min) return fail('Date is too early')\n }\n if (maxDate) {\n const max = new Date(maxDate.getFullYear(), maxDate.getMonth(), maxDate.getDate())\n if (date > max) return fail('Date is too far in the future')\n }\n\n return ok\n}\n\nexport {validatePostCode} from './postalCodes'\nexport {validateCardNumber} from './creditCards'\n"],"mappings":"AAeA,IAAM,EAA8B,CAAC,MAAO,GAAK,CAGjD,SAAS,EAAqB,EAAuB,CACjD,OAAO,EAAM,aAAa,CAAC,QAAQ,aAAc,GAAG,CAIxD,SAAS,EAAiB,EAAuB,CAC7C,IAAM,EAAS,EAAM,QAAQ,MAAO,GAAG,CAAC,MAAM,EAAG,EAAE,CAMnD,OAJI,EAAO,QAAU,EACV,EAGJ,GAAG,EAAO,MAAM,EAAG,EAAE,CAAC,GAAG,EAAO,MAAM,EAAE,GAInD,SAAS,EAAiB,EAAuB,CAC7C,IAAM,EAAS,EAAM,QAAQ,MAAO,GAAG,CAAC,MAAM,EAAG,EAAE,CAMnD,OAJI,EAAO,QAAU,EACV,EAGJ,GAAG,EAAO,MAAM,EAAG,EAAE,CAAC,GAAG,EAAO,MAAM,EAAE,GAInD,SAAS,EAAkB,EAAe,EAA2B,CACjE,OAAO,EAAM,QAAQ,MAAO,GAAG,CAAC,MAAM,EAAG,EAAU,CAIvD,SAAS,EAAiB,EAAuB,CAI7C,OAHc,EAAqB,EAAM,CAAC,MAAM,EAAG,EAAE,CACjC,MAAM,GAAG,CAGxB,KAAK,EAAM,IACJ,IAAU,EACH,IAAI,IAGR,EACT,CACD,KAAK,GAAG,CAIjB,SAAS,EAAiB,EAAuB,CAC7C,IAAM,EAAQ,EAAqB,EAAM,CAAC,MAAM,EAAG,EAAE,CAMrD,OAJI,EAAM,QAAU,EACT,EAGJ,GAAG,EAAM,MAAM,EAAG,EAAM,OAAS,EAAE,CAAC,GAAG,EAAM,MAAM,GAAG,GAIjE,SAAS,EAAiB,EAAuB,CAC7C,IAAM,EAAQ,EAAqB,EAAM,CAAC,MAAM,EAAG,EAAE,CAMrD,OAJI,EAAM,QAAU,EACT,EAGJ,GAAG,EAAM,MAAM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,EAAE,CAAE,GAAG,GAEvC,EAAO,SAAS,EAAO,MAAM,EAAG,EAAE,CAAE,GAAG,CACvC,EAAQ,SAAS,EAAO,MAAM,EAAG,EAAE,CAAE,GAAG,CACxC,EAAM,SAAS,EAAO,MAAM,EAAG,EAAE,CAAE,GAAG,EAGtC,EAAQ,GAAK,EAAQ,IACrB,EAAM,GAAK,EAAM,IACjB,EAAO,EAAG,OAAO,KAErB,IAAM,EAAO,IAAI,KAAK,EAAM,EAAQ,EAAG,EAAI,CAK3C,OAHI,EAAK,aAAa,GAAK,GAAQ,EAAK,UAAU,GAAK,EAAQ,GAAK,EAAK,SAAS,GAAK,EAC5E,KAEJ,EAIX,SAAgB,EAAa,EAAe,EAAiC,EAAE,CAAoB,CAC/F,GAAI,CAAC,EAAO,OAAO,EACnB,GAAM,CAAC,SAAS,aAAc,UAAS,WAAW,EAGlD,GADe,EAAM,QAAQ,MAAO,GAAG,CAC5B,SAAW,EAAG,OAAO,EAAK,kBAAkB,CAEvD,IAAM,EAAO,EAAgB,EAAO,EAAO,CAY3C,OAXK,EAED,GAEI,EADQ,IAAI,KAAK,EAAQ,aAAa,CAAE,EAAQ,UAAU,CAAE,EAAQ,SAAS,CAAC,CAC3D,EAAK,oBAAoB,CAEhD,GAEI,EADQ,IAAI,KAAK,EAAQ,aAAa,CAAE,EAAQ,UAAU,CAAE,EAAQ,SAAS,CAAC,CAC3D,EAAK,gCAAgC,CAGzD,EAXW,EAAK,eAAe"}
|
|
1
|
+
{"version":3,"file":"validators-D4aTeaH0.cjs","names":[],"sources":["../src/utils/postalCodes.ts","../src/utils/validators.ts"],"sourcesContent":["import type {ValidationResult} from './validators'\n\nexport interface PostCodeRule {\n countryCode: string\n label: string\n placeholder: string\n example: string\n inputMode: 'text' | 'numeric'\n maxLength: number\n regex: RegExp\n sanitize: (value: string) => string\n format: (value: string) => string\n message: string\n}\n\nconst OK_RESULT: ValidationResult = {valid: true}\n\n// Reuse one sanitizer for countries that mix letters and digits.\nfunction keepLettersAndDigits(value: string): string {\n return value.toUpperCase().replace(/[^A-Z0-9]/g, '')\n}\n\n// Apply the common Polish XX-XXX postcode shape.\nfunction formatPlPostCode(value: string): string {\n const digits = value.replace(/\\D/g, '').slice(0, 5)\n\n if (digits.length <= 2) {\n return digits\n }\n\n return `${digits.slice(0, 2)}-${digits.slice(2)}`\n}\n\n// Support ZIP and ZIP+4 with the same formatter.\nfunction formatUsPostCode(value: string): string {\n const digits = value.replace(/\\D/g, '').slice(0, 9)\n\n if (digits.length <= 5) {\n return digits\n }\n\n return `${digits.slice(0, 5)}-${digits.slice(5)}`\n}\n\n// Clamp countries that only need a fixed number of digits.\nfunction formatFixedDigits(value: string, maxLength: number): string {\n return value.replace(/\\D/g, '').slice(0, maxLength)\n}\n\n// Insert the standard center space used by Canadian post codes.\nfunction formatCaPostCode(value: string): string {\n const clean = keepLettersAndDigits(value).slice(0, 6)\n const chars = clean.split('')\n\n return chars\n .map((char, index) => {\n if (index === 3) {\n return ` ${char}`\n }\n\n return char\n })\n .join('')\n}\n\n// Split the outward and inward parts of a UK postcode.\nfunction formatGbPostCode(value: string): string {\n const clean = keepLettersAndDigits(value).slice(0, 7)\n\n if (clean.length <= 3) {\n return clean\n }\n\n return `${clean.slice(0, clean.length - 3)} ${clean.slice(-3)}`\n}\n\n// Split Dutch codes into four digits and two letters.\nfunction formatNlPostCode(value: string): string {\n const clean = keepLettersAndDigits(value).slice(0, 6)\n\n if (clean.length <= 4) {\n return clean\n }\n\n return `${clean.slice(0, 4)} ${clean.slice(4)}`\n}\n\nexport const postCodeRules: Record<string, PostCodeRule> = {\n PL: {\n countryCode: 'PL',\n label: 'Poland',\n placeholder: '12-345',\n example: '00-001',\n inputMode: 'numeric',\n maxLength: 6,\n regex: /^\\d{2}-\\d{3}$/,\n sanitize: (value) => value.replace(/\\D/g, '').slice(0, 5),\n format: formatPlPostCode,\n message: 'Use the Polish format XX-XXX',\n },\n DE: {\n countryCode: 'DE',\n label: 'Germany',\n placeholder: '12345',\n example: '10115',\n inputMode: 'numeric',\n maxLength: 5,\n regex: /^\\d{5}$/,\n sanitize: (value) => value.replace(/\\D/g, '').slice(0, 5),\n format: (value) => formatFixedDigits(value, 5),\n message: 'Use a 5-digit German postal code',\n },\n FR: {\n countryCode: 'FR',\n label: 'France',\n placeholder: '75001',\n example: '75001',\n inputMode: 'numeric',\n maxLength: 5,\n regex: /^\\d{5}$/,\n sanitize: (value) => value.replace(/\\D/g, '').slice(0, 5),\n format: (value) => formatFixedDigits(value, 5),\n message: 'Use a 5-digit French postal code',\n },\n ES: {\n countryCode: 'ES',\n label: 'Spain',\n placeholder: '28013',\n example: '28013',\n inputMode: 'numeric',\n maxLength: 5,\n regex: /^\\d{5}$/,\n sanitize: (value) => value.replace(/\\D/g, '').slice(0, 5),\n format: (value) => formatFixedDigits(value, 5),\n message: 'Use a 5-digit Spanish postal code',\n },\n IT: {\n countryCode: 'IT',\n label: 'Italy',\n placeholder: '00184',\n example: '00184',\n inputMode: 'numeric',\n maxLength: 5,\n regex: /^\\d{5}$/,\n sanitize: (value) => value.replace(/\\D/g, '').slice(0, 5),\n format: (value) => formatFixedDigits(value, 5),\n message: 'Use a 5-digit Italian postal code',\n },\n US: {\n countryCode: 'US',\n label: 'United States',\n placeholder: '12345 or 12345-6789',\n example: '10001',\n inputMode: 'numeric',\n maxLength: 10,\n regex: /^\\d{5}(?:-\\d{4})?$/,\n sanitize: (value) => value.replace(/\\D/g, '').slice(0, 9),\n format: formatUsPostCode,\n message: 'Use ZIP or ZIP+4 format',\n },\n CA: {\n countryCode: 'CA',\n label: 'Canada',\n placeholder: 'A1A 1A1',\n example: 'M5V 3L9',\n inputMode: 'text',\n maxLength: 7,\n regex: /^[A-Z]\\d[A-Z] \\d[A-Z]\\d$/,\n sanitize: (value) => keepLettersAndDigits(value).slice(0, 6),\n format: formatCaPostCode,\n message: 'Use the Canadian format A1A 1A1',\n },\n GB: {\n countryCode: 'GB',\n label: 'United Kingdom',\n placeholder: 'SW1A 1AA',\n example: 'SW1A 1AA',\n inputMode: 'text',\n maxLength: 8,\n regex: /^[A-Z]{1,2}\\d[A-Z\\d]? \\d[A-Z]{2}$/,\n sanitize: (value) => keepLettersAndDigits(value).slice(0, 7),\n format: formatGbPostCode,\n message: 'Use a valid UK postcode',\n },\n NL: {\n countryCode: 'NL',\n label: 'Netherlands',\n placeholder: '1234 AB',\n example: '1012 AB',\n inputMode: 'text',\n maxLength: 7,\n regex: /^\\d{4} [A-Z]{2}$/,\n sanitize: (value) => keepLettersAndDigits(value).slice(0, 6),\n format: formatNlPostCode,\n message: 'Use the Dutch format 1234 AB',\n },\n}\n\nexport const postCodeCountries = Object.values(postCodeRules).map(({countryCode, label}) => ({\n value: countryCode,\n label,\n}))\n\n// Return the active postal rule or fall back to Poland for deterministic behavior.\nexport function getPostCodeRule(countryCode: string = 'PL'): PostCodeRule {\n return postCodeRules[countryCode.toUpperCase()] ?? postCodeRules.PL\n}\n\n// Keep postal input values aligned with the selected country format.\nexport function formatPostCode(value: string, countryCode: string = 'PL'): string {\n const rule = getPostCodeRule(countryCode)\n return rule.format(rule.sanitize(value))\n}\n\n// Validate the user-visible postal code against the selected country rule.\nexport function validatePostCode(value: string, countryCode: string = 'PL'): ValidationResult {\n if (!value) {\n return OK_RESULT\n }\n\n const rule = getPostCodeRule(countryCode)\n const formatted = rule.format(rule.sanitize(value))\n\n if (!rule.regex.test(formatted)) {\n return {valid: false, error: rule.message}\n }\n\n return OK_RESULT\n}\n","export interface ValidationResult {\n valid: boolean\n error?: string\n}\n\nexport type ValidatorFn = (value: string) => ValidationResult\n\nconst ok: ValidationResult = {valid: true}\nconst fail = (error: string): ValidationResult => ({valid: false, error})\n\n// Ensure the field is not empty after trimming user input.\nexport function validateRequired(value: string): ValidationResult {\n return value.trim().length > 0 ? ok : fail('This field is required')\n}\n\n// Build a validator that enforces a minimum string length.\nexport function validateMinLength(min: number): ValidatorFn {\n return (value: string) => (value.length >= min ? ok : fail(`Minimum ${min} characters`))\n}\n\n// Build a validator that enforces a maximum string length.\nexport function validateMaxLength(max: number): ValidatorFn {\n return (value: string) => (value.length <= max ? ok : fail(`Maximum ${max} characters`))\n}\n\n// Build a validator around a custom regular expression.\nexport function validatePattern(pattern: RegExp, message?: string): ValidatorFn {\n return (value: string) => (pattern.test(value) ? ok : fail(message ?? 'Invalid format'))\n}\n\n// Validate numeric input against optional min and max bounds.\nexport function validateRange(min?: number, max?: number): ValidatorFn {\n return (value: string) => {\n const num = parseFloat(value)\n if (isNaN(num)) return fail('Must be a number')\n if (min !== undefined && num < min) return fail(`Minimum value is ${min}`)\n if (max !== undefined && num > max) return fail(`Maximum value is ${max}`)\n return ok\n }\n}\n\n// === Email ===\n\nconst EMAIL_RE =\n /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/\n\n// Validate email format while allowing empty optional fields.\nexport function validateEmail(value: string): ValidationResult {\n if (!value) return ok\n return EMAIL_RE.test(value) ? ok : fail('Invalid email address')\n}\n\n// === Phone ===\n\nconst PHONE_LENGTH: Record<string, number> = {\n PL: 9,\n DE: 10,\n US: 10,\n GB: 10,\n FR: 9,\n CZ: 9,\n SK: 9,\n}\n\n// Validate a phone number with optional country-specific digit counts.\nexport function validatePhone(value: string, countryCode?: string): ValidationResult {\n if (!value) return ok\n const digits = value.replace(/\\D/g, '')\n if (digits.length < 7) return fail('Phone number too short')\n if (digits.length > 15) return fail('Phone number too long')\n if (countryCode) {\n const expected = PHONE_LENGTH[countryCode.toUpperCase()]\n if (expected && digits.length !== expected) {\n return fail(`Phone number should have ${expected} digits`)\n }\n }\n return ok\n}\n\n// === IBAN (MOD-97, ISO 13616) ===\n\nconst IBAN_LENGTHS: Record<string, number> = {\n AL: 28,\n AD: 24,\n AT: 20,\n AZ: 28,\n BH: 22,\n BY: 28,\n BE: 16,\n BA: 20,\n BR: 29,\n BG: 22,\n CR: 22,\n HR: 21,\n CY: 28,\n CZ: 24,\n DK: 18,\n DO: 28,\n EG: 29,\n SV: 28,\n EE: 20,\n FO: 18,\n FI: 18,\n FR: 27,\n GE: 22,\n DE: 22,\n GI: 23,\n GR: 27,\n GL: 18,\n GT: 28,\n HU: 28,\n IS: 26,\n IQ: 23,\n IE: 22,\n IL: 23,\n IT: 27,\n JO: 30,\n KZ: 20,\n XK: 20,\n KW: 30,\n LV: 21,\n LB: 28,\n LI: 21,\n LT: 20,\n LU: 20,\n MT: 31,\n MR: 27,\n MU: 30,\n MD: 24,\n MC: 27,\n ME: 22,\n NL: 18,\n MK: 19,\n NO: 15,\n PK: 24,\n PS: 29,\n PL: 28,\n PT: 25,\n QA: 29,\n RO: 24,\n LC: 32,\n SM: 27,\n SA: 24,\n RS: 22,\n SC: 31,\n SK: 24,\n SI: 19,\n ES: 24,\n SE: 24,\n CH: 21,\n TL: 23,\n TN: 24,\n TR: 26,\n UA: 29,\n AE: 23,\n GB: 22,\n VA: 22,\n VG: 24,\n}\n\n// Run the MOD-97 remainder calculation on a numeric IBAN representation.\nfunction mod97(numStr: string): number {\n let remainder = 0\n for (let i = 0; i < numStr.length; i++) {\n remainder = (remainder * 10 + parseInt(numStr[i], 10)) % 97\n }\n return remainder\n}\n\n// Validate a full IBAN using country length rules and the MOD-97 checksum.\nexport function validateIBAN(value: string): ValidationResult {\n if (!value) return ok\n const iban = value.replace(/\\s/g, '').toUpperCase()\n\n if (iban.length < 2) return fail('IBAN too short')\n\n const countryCode = iban.slice(0, 2)\n const expectedLength = IBAN_LENGTHS[countryCode]\n\n if (!expectedLength) return fail('Unknown IBAN country code')\n if (iban.length !== expectedLength) {\n return fail(`IBAN for ${countryCode} should have ${expectedLength} characters`)\n }\n\n // MOD-97 check: move first 4 chars to end, convert letters to numbers\n const rearranged = iban.slice(4) + iban.slice(0, 4)\n const numStr = rearranged.replace(/[A-Z]/g, (ch) => String(ch.charCodeAt(0) - 55))\n\n return mod97(numStr) === 1 ? ok : fail('Invalid IBAN checksum')\n}\n\n// === NIP (Polish Tax ID) ===\n\nconst NIP_WEIGHTS = [6, 5, 7, 2, 3, 4, 5, 6, 7]\n\n// Validate a Polish NIP number with its weighted checksum.\nexport function validateNIP(value: string): ValidationResult {\n if (!value) return ok\n const digits = value.replace(/\\D/g, '')\n if (digits.length !== 10) return fail('NIP must have 10 digits')\n\n let sum = 0\n for (let i = 0; i < 9; i++) {\n sum += parseInt(digits[i], 10) * NIP_WEIGHTS[i]\n }\n const checkDigit = sum % 11\n if (checkDigit === 10) return fail('Invalid NIP')\n return checkDigit === parseInt(digits[9], 10) ? ok : fail('Invalid NIP checksum')\n}\n\n// === PESEL ===\n\nconst PESEL_WEIGHTS = [1, 3, 7, 9, 1, 3, 7, 9, 1, 3]\n\n// Validate a Polish PESEL number with its checksum algorithm.\nexport function validatePESEL(value: string): ValidationResult {\n if (!value) return ok\n const digits = value.replace(/\\D/g, '')\n if (digits.length !== 11) return fail('PESEL must have 11 digits')\n\n let sum = 0\n for (let i = 0; i < 10; i++) {\n sum += parseInt(digits[i], 10) * PESEL_WEIGHTS[i]\n }\n const checkDigit = (10 - (sum % 10)) % 10\n return checkDigit === parseInt(digits[10], 10) ? ok : fail('Invalid PESEL checksum')\n}\n\n// === REGON ===\n\nconst REGON9_WEIGHTS = [8, 9, 2, 3, 4, 5, 6, 7]\nconst REGON14_WEIGHTS = [2, 4, 8, 5, 0, 9, 7, 3, 6, 1, 2, 4, 8]\n\n// Validate REGON numbers in both the 9-digit and 14-digit variants.\nexport function validateREGON(value: string): ValidationResult {\n if (!value) return ok\n const digits = value.replace(/\\D/g, '')\n\n if (digits.length !== 9 && digits.length !== 14) {\n return fail('REGON must have 9 or 14 digits')\n }\n\n const weights = digits.length === 9 ? REGON9_WEIGHTS : REGON14_WEIGHTS\n let sum = 0\n for (let i = 0; i < weights.length; i++) {\n sum += parseInt(digits[i], 10) * weights[i]\n }\n const checkDigit = sum % 11 === 10 ? 0 : sum % 11\n const lastDigit = parseInt(digits[digits.length - 1], 10)\n return checkDigit === lastDigit ? ok : fail('Invalid REGON checksum')\n}\n\n// === Compose validators ===\n\n// Run validators in order and stop at the first failure.\nexport function composeValidators(...validators: ValidatorFn[]): ValidatorFn {\n return (value: string) => {\n for (const validator of validators) {\n const result = validator(value)\n if (!result.valid) return result\n }\n return ok\n }\n}\n\n// === Date (DD/MM/YYYY, MM/DD/YYYY, YYYY/MM/DD) ===\n\nexport type DateFormat = 'DD/MM/YYYY' | 'MM/DD/YYYY' | 'YYYY/MM/DD'\n\ninterface DateValidationOptions {\n format?: DateFormat\n minDate?: Date\n maxDate?: Date\n}\n\n// Parse a date string in the given format into a Date or null.\nexport function parseDateString(value: string, format: DateFormat = 'DD/MM/YYYY'): Date | null {\n const digits = value.replace(/\\D/g, '')\n if (digits.length !== 8) return null\n\n let day: number, month: number, year: number\n if (format === 'DD/MM/YYYY') {\n day = parseInt(digits.slice(0, 2), 10)\n month = parseInt(digits.slice(2, 4), 10)\n year = parseInt(digits.slice(4, 8), 10)\n } else if (format === 'MM/DD/YYYY') {\n month = parseInt(digits.slice(0, 2), 10)\n day = parseInt(digits.slice(2, 4), 10)\n year = parseInt(digits.slice(4, 8), 10)\n } else {\n year = parseInt(digits.slice(0, 4), 10)\n month = parseInt(digits.slice(4, 6), 10)\n day = parseInt(digits.slice(6, 8), 10)\n }\n\n if (month < 1 || month > 12) return null\n if (day < 1 || day > 31) return null\n if (year < 1) return null\n\n const date = new Date(year, month - 1, day)\n // Verify the date didn't overflow (e.g. Feb 30 → Mar 2)\n if (date.getFullYear() !== year || date.getMonth() !== month - 1 || date.getDate() !== day) {\n return null\n }\n return date\n}\n\n// Validate a date string with optional range constraints.\nexport function validateDate(value: string, options: DateValidationOptions = {}): ValidationResult {\n if (!value) return ok\n const {format = 'DD/MM/YYYY', minDate, maxDate} = options\n\n const digits = value.replace(/\\D/g, '')\n if (digits.length !== 8) return fail('Incomplete date')\n\n const date = parseDateString(value, format)\n if (!date) return fail('Invalid date')\n\n if (minDate) {\n const min = new Date(minDate.getFullYear(), minDate.getMonth(), minDate.getDate())\n if (date < min) return fail('Date is too early')\n }\n if (maxDate) {\n const max = new Date(maxDate.getFullYear(), maxDate.getMonth(), maxDate.getDate())\n if (date > max) return fail('Date is too far in the future')\n }\n\n return ok\n}\n\nexport {validatePostCode} from './postalCodes'\nexport {validateCardNumber} from './creditCards'\n"],"mappings":"AAeA,IAAM,EAA8B,CAAC,MAAO,GAAK,CAGjD,SAAS,EAAqB,EAAuB,CACjD,OAAO,EAAM,aAAa,CAAC,QAAQ,aAAc,GAAG,CAIxD,SAAS,EAAiB,EAAuB,CAC7C,IAAM,EAAS,EAAM,QAAQ,MAAO,GAAG,CAAC,MAAM,EAAG,EAAE,CAMnD,OAJI,EAAO,QAAU,EACV,EAGJ,GAAG,EAAO,MAAM,EAAG,EAAE,CAAC,GAAG,EAAO,MAAM,EAAE,GAInD,SAAS,EAAiB,EAAuB,CAC7C,IAAM,EAAS,EAAM,QAAQ,MAAO,GAAG,CAAC,MAAM,EAAG,EAAE,CAMnD,OAJI,EAAO,QAAU,EACV,EAGJ,GAAG,EAAO,MAAM,EAAG,EAAE,CAAC,GAAG,EAAO,MAAM,EAAE,GAInD,SAAS,EAAkB,EAAe,EAA2B,CACjE,OAAO,EAAM,QAAQ,MAAO,GAAG,CAAC,MAAM,EAAG,EAAU,CAIvD,SAAS,EAAiB,EAAuB,CAI7C,OAHc,EAAqB,EAAM,CAAC,MAAM,EAAG,EAAE,CACjC,MAAM,GAAG,CAGxB,KAAK,EAAM,IACJ,IAAU,EACH,IAAI,IAGR,EACT,CACD,KAAK,GAAG,CAIjB,SAAS,EAAiB,EAAuB,CAC7C,IAAM,EAAQ,EAAqB,EAAM,CAAC,MAAM,EAAG,EAAE,CAMrD,OAJI,EAAM,QAAU,EACT,EAGJ,GAAG,EAAM,MAAM,EAAG,EAAM,OAAS,EAAE,CAAC,GAAG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G,EAChC,IAAW,cAClB,EAAQ,SAAS,EAAO,MAAM,EAAG,EAAE,CAAE,GAAG,CACxC,EAAM,SAAS,EAAO,MAAM,EAAG,EAAE,CAAE,GAAG,CACtC,EAAO,SAAS,EAAO,MAAM,EAAG,EAAE,CAAE,GAAG,GAEvC,EAAO,SAAS,EAAO,MAAM,EAAG,EAAE,CAAE,GAAG,CACvC,EAAQ,SAAS,EAAO,MAAM,EAAG,EAAE,CAAE,GAAG,CACxC,EAAM,SAAS,EAAO,MAAM,EAAG,EAAE,CAAE,GAAG,EAGtC,EAAQ,GAAK,EAAQ,IACrB,EAAM,GAAK,EAAM,IACjB,EAAO,EAAG,OAAO,KAErB,IAAM,EAAO,IAAI,KAAK,EAAM,EAAQ,EAAG,EAAI,CAK3C,OAHI,EAAK,aAAa,GAAK,GAAQ,EAAK,UAAU,GAAK,EAAQ,GAAK,EAAK,SAAS,GAAK,EAC5E,KAEJ,EAIX,SAAgB,EAAa,EAAe,EAAiC,EAAE,CAAoB,CAC/F,GAAI,CAAC,EAAO,OAAO,EACnB,GAAM,CAAC,SAAS,aAAc,UAAS,WAAW,EAGlD,GADe,EAAM,QAAQ,MAAO,GAAG,CAC5B,SAAW,EAAG,OAAO,EAAK,kBAAkB,CAEvD,IAAM,EAAO,EAAgB,EAAO,EAAO,CAY3C,OAXK,EAED,GAEI,EADQ,IAAI,KAAK,EAAQ,aAAa,CAAE,EAAQ,UAAU,CAAE,EAAQ,SAAS,CAAC,CAC3D,EAAK,oBAAoB,CAEhD,GAEI,EADQ,IAAI,KAAK,EAAQ,aAAa,CAAE,EAAQ,UAAU,CAAE,EAAQ,SAAS,CAAC,CAC3D,EAAK,gCAAgC,CAGzD,EAXW,EAAK,eAAe"}
|
|
@@ -390,4 +390,4 @@ function I(e, t = {}) {
|
|
|
390
390
|
//#endregion
|
|
391
391
|
export { l as _, E as a, O as c, C as d, N as f, u as g, d as h, x as i, A as l, h as m, F as n, _ as o, y as p, I as r, g as s, P as t, v as u, c as v, f as y };
|
|
392
392
|
|
|
393
|
-
//# sourceMappingURL=validators-
|
|
393
|
+
//# sourceMappingURL=validators-YZyyyLvE.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validators-H8tNxb8O.js","names":[],"sources":["../src/utils/postalCodes.ts","../src/utils/validators.ts"],"sourcesContent":["import type {ValidationResult} from './validators'\n\nexport interface PostCodeRule {\n countryCode: string\n label: string\n placeholder: string\n example: string\n inputMode: 'text' | 'numeric'\n maxLength: number\n regex: RegExp\n sanitize: (value: string) => string\n format: (value: string) => string\n message: string\n}\n\nconst OK_RESULT: ValidationResult = {valid: true}\n\n// Reuse one sanitizer for countries that mix letters and digits.\nfunction keepLettersAndDigits(value: string): string {\n return value.toUpperCase().replace(/[^A-Z0-9]/g, '')\n}\n\n// Apply the common Polish XX-XXX postcode shape.\nfunction formatPlPostCode(value: string): string {\n const digits = value.replace(/\\D/g, '').slice(0, 5)\n\n if (digits.length <= 2) {\n return digits\n }\n\n return `${digits.slice(0, 2)}-${digits.slice(2)}`\n}\n\n// Support ZIP and ZIP+4 with the same formatter.\nfunction formatUsPostCode(value: string): string {\n const digits = value.replace(/\\D/g, '').slice(0, 9)\n\n if (digits.length <= 5) {\n return digits\n }\n\n return `${digits.slice(0, 5)}-${digits.slice(5)}`\n}\n\n// Clamp countries that only need a fixed number of digits.\nfunction formatFixedDigits(value: string, maxLength: number): string {\n return value.replace(/\\D/g, '').slice(0, maxLength)\n}\n\n// Insert the standard center space used by Canadian post codes.\nfunction formatCaPostCode(value: string): string {\n const clean = keepLettersAndDigits(value).slice(0, 6)\n const chars = clean.split('')\n\n return chars\n .map((char, index) => {\n if (index === 3) {\n return ` ${char}`\n }\n\n return char\n })\n .join('')\n}\n\n// Split the outward and inward parts of a UK postcode.\nfunction formatGbPostCode(value: string): string {\n const clean = keepLettersAndDigits(value).slice(0, 7)\n\n if (clean.length <= 3) {\n return clean\n }\n\n return `${clean.slice(0, clean.length - 3)} ${clean.slice(-3)}`\n}\n\n// Split Dutch codes into four digits and two letters.\nfunction formatNlPostCode(value: string): string {\n const clean = keepLettersAndDigits(value).slice(0, 6)\n\n if (clean.length <= 4) {\n return clean\n }\n\n return `${clean.slice(0, 4)} ${clean.slice(4)}`\n}\n\nexport const postCodeRules: Record<string, PostCodeRule> = {\n PL: {\n countryCode: 'PL',\n label: 'Poland',\n placeholder: '12-345',\n example: '00-001',\n inputMode: 'numeric',\n maxLength: 6,\n regex: /^\\d{2}-\\d{3}$/,\n sanitize: (value) => value.replace(/\\D/g, '').slice(0, 5),\n format: formatPlPostCode,\n message: 'Use the Polish format XX-XXX',\n },\n DE: {\n countryCode: 'DE',\n label: 'Germany',\n placeholder: '12345',\n example: '10115',\n inputMode: 'numeric',\n maxLength: 5,\n regex: /^\\d{5}$/,\n sanitize: (value) => value.replace(/\\D/g, '').slice(0, 5),\n format: (value) => formatFixedDigits(value, 5),\n message: 'Use a 5-digit German postal code',\n },\n FR: {\n countryCode: 'FR',\n label: 'France',\n placeholder: '75001',\n example: '75001',\n inputMode: 'numeric',\n maxLength: 5,\n regex: /^\\d{5}$/,\n sanitize: (value) => value.replace(/\\D/g, '').slice(0, 5),\n format: (value) => formatFixedDigits(value, 5),\n message: 'Use a 5-digit French postal code',\n },\n ES: {\n countryCode: 'ES',\n label: 'Spain',\n placeholder: '28013',\n example: '28013',\n inputMode: 'numeric',\n maxLength: 5,\n regex: /^\\d{5}$/,\n sanitize: (value) => value.replace(/\\D/g, '').slice(0, 5),\n format: (value) => formatFixedDigits(value, 5),\n message: 'Use a 5-digit Spanish postal code',\n },\n IT: {\n countryCode: 'IT',\n label: 'Italy',\n placeholder: '00184',\n example: '00184',\n inputMode: 'numeric',\n maxLength: 5,\n regex: /^\\d{5}$/,\n sanitize: (value) => value.replace(/\\D/g, '').slice(0, 5),\n format: (value) => formatFixedDigits(value, 5),\n message: 'Use a 5-digit Italian postal code',\n },\n US: {\n countryCode: 'US',\n label: 'United States',\n placeholder: '12345 or 12345-6789',\n example: '10001',\n inputMode: 'numeric',\n maxLength: 10,\n regex: /^\\d{5}(?:-\\d{4})?$/,\n sanitize: (value) => value.replace(/\\D/g, '').slice(0, 9),\n format: formatUsPostCode,\n message: 'Use ZIP or ZIP+4 format',\n },\n CA: {\n countryCode: 'CA',\n label: 'Canada',\n placeholder: 'A1A 1A1',\n example: 'M5V 3L9',\n inputMode: 'text',\n maxLength: 7,\n regex: /^[A-Z]\\d[A-Z] \\d[A-Z]\\d$/,\n sanitize: (value) => keepLettersAndDigits(value).slice(0, 6),\n format: formatCaPostCode,\n message: 'Use the Canadian format A1A 1A1',\n },\n GB: {\n countryCode: 'GB',\n label: 'United Kingdom',\n placeholder: 'SW1A 1AA',\n example: 'SW1A 1AA',\n inputMode: 'text',\n maxLength: 8,\n regex: /^[A-Z]{1,2}\\d[A-Z\\d]? \\d[A-Z]{2}$/,\n sanitize: (value) => keepLettersAndDigits(value).slice(0, 7),\n format: formatGbPostCode,\n message: 'Use a valid UK postcode',\n },\n NL: {\n countryCode: 'NL',\n label: 'Netherlands',\n placeholder: '1234 AB',\n example: '1012 AB',\n inputMode: 'text',\n maxLength: 7,\n regex: /^\\d{4} [A-Z]{2}$/,\n sanitize: (value) => keepLettersAndDigits(value).slice(0, 6),\n format: formatNlPostCode,\n message: 'Use the Dutch format 1234 AB',\n },\n}\n\nexport const postCodeCountries = Object.values(postCodeRules).map(({countryCode, label}) => ({\n value: countryCode,\n label,\n}))\n\n// Return the active postal rule or fall back to Poland for deterministic behavior.\nexport function getPostCodeRule(countryCode: string = 'PL'): PostCodeRule {\n return postCodeRules[countryCode.toUpperCase()] ?? postCodeRules.PL\n}\n\n// Keep postal input values aligned with the selected country format.\nexport function formatPostCode(value: string, countryCode: string = 'PL'): string {\n const rule = getPostCodeRule(countryCode)\n return rule.format(rule.sanitize(value))\n}\n\n// Validate the user-visible postal code against the selected country rule.\nexport function validatePostCode(value: string, countryCode: string = 'PL'): ValidationResult {\n if (!value) {\n return OK_RESULT\n }\n\n const rule = getPostCodeRule(countryCode)\n const formatted = rule.format(rule.sanitize(value))\n\n if (!rule.regex.test(formatted)) {\n return {valid: false, error: rule.message}\n }\n\n return OK_RESULT\n}\n","export interface ValidationResult {\n valid: boolean\n error?: string\n}\n\nexport type ValidatorFn = (value: string) => ValidationResult\n\nconst ok: ValidationResult = {valid: true}\nconst fail = (error: string): ValidationResult => ({valid: false, error})\n\n// Ensure the field is not empty after trimming user input.\nexport function validateRequired(value: string): ValidationResult {\n return value.trim().length > 0 ? ok : fail('This field is required')\n}\n\n// Build a validator that enforces a minimum string length.\nexport function validateMinLength(min: number): ValidatorFn {\n return (value: string) => (value.length >= min ? ok : fail(`Minimum ${min} characters`))\n}\n\n// Build a validator that enforces a maximum string length.\nexport function validateMaxLength(max: number): ValidatorFn {\n return (value: string) => (value.length <= max ? ok : fail(`Maximum ${max} characters`))\n}\n\n// Build a validator around a custom regular expression.\nexport function validatePattern(pattern: RegExp, message?: string): ValidatorFn {\n return (value: string) => (pattern.test(value) ? ok : fail(message ?? 'Invalid format'))\n}\n\n// Validate numeric input against optional min and max bounds.\nexport function validateRange(min?: number, max?: number): ValidatorFn {\n return (value: string) => {\n const num = parseFloat(value)\n if (isNaN(num)) return fail('Must be a number')\n if (min !== undefined && num < min) return fail(`Minimum value is ${min}`)\n if (max !== undefined && num > max) return fail(`Maximum value is ${max}`)\n return ok\n }\n}\n\n// === Email ===\n\nconst EMAIL_RE =\n /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/\n\n// Validate email format while allowing empty optional fields.\nexport function validateEmail(value: string): ValidationResult {\n if (!value) return ok\n return EMAIL_RE.test(value) ? ok : fail('Invalid email address')\n}\n\n// === Phone ===\n\nconst PHONE_LENGTH: Record<string, number> = {\n PL: 9,\n DE: 10,\n US: 10,\n GB: 10,\n FR: 9,\n CZ: 9,\n SK: 9,\n}\n\n// Validate a phone number with optional country-specific digit counts.\nexport function validatePhone(value: string, countryCode?: string): ValidationResult {\n if (!value) return ok\n const digits = value.replace(/\\D/g, '')\n if (digits.length < 7) return fail('Phone number too short')\n if (digits.length > 15) return fail('Phone number too long')\n if (countryCode) {\n const expected = PHONE_LENGTH[countryCode.toUpperCase()]\n if (expected && digits.length !== expected) {\n return fail(`Phone number should have ${expected} digits`)\n }\n }\n return ok\n}\n\n// === IBAN (MOD-97, ISO 13616) ===\n\nconst IBAN_LENGTHS: Record<string, number> = {\n AL: 28,\n AD: 24,\n AT: 20,\n AZ: 28,\n BH: 22,\n BY: 28,\n BE: 16,\n BA: 20,\n BR: 29,\n BG: 22,\n CR: 22,\n HR: 21,\n CY: 28,\n CZ: 24,\n DK: 18,\n DO: 28,\n EG: 29,\n SV: 28,\n EE: 20,\n FO: 18,\n FI: 18,\n FR: 27,\n GE: 22,\n DE: 22,\n GI: 23,\n GR: 27,\n GL: 18,\n GT: 28,\n HU: 28,\n IS: 26,\n IQ: 23,\n IE: 22,\n IL: 23,\n IT: 27,\n JO: 30,\n KZ: 20,\n XK: 20,\n KW: 30,\n LV: 21,\n LB: 28,\n LI: 21,\n LT: 20,\n LU: 20,\n MT: 31,\n MR: 27,\n MU: 30,\n MD: 24,\n MC: 27,\n ME: 22,\n NL: 18,\n MK: 19,\n NO: 15,\n PK: 24,\n PS: 29,\n PL: 28,\n PT: 25,\n QA: 29,\n RO: 24,\n LC: 32,\n SM: 27,\n SA: 24,\n RS: 22,\n SC: 31,\n SK: 24,\n SI: 19,\n ES: 24,\n SE: 24,\n CH: 21,\n TL: 23,\n TN: 24,\n TR: 26,\n UA: 29,\n AE: 23,\n GB: 22,\n VA: 22,\n VG: 24,\n}\n\n// Run the MOD-97 remainder calculation on a numeric IBAN representation.\nfunction mod97(numStr: string): number {\n let remainder = 0\n for (let i = 0; i < numStr.length; i++) {\n remainder = (remainder * 10 + parseInt(numStr[i], 10)) % 97\n }\n return remainder\n}\n\n// Validate a full IBAN using country length rules and the MOD-97 checksum.\nexport function validateIBAN(value: string): ValidationResult {\n if (!value) return ok\n const iban = value.replace(/\\s/g, '').toUpperCase()\n\n if (iban.length < 2) return fail('IBAN too short')\n\n const countryCode = iban.slice(0, 2)\n const expectedLength = IBAN_LENGTHS[countryCode]\n\n if (!expectedLength) return fail('Unknown IBAN country code')\n if (iban.length !== expectedLength) {\n return fail(`IBAN for ${countryCode} should have ${expectedLength} characters`)\n }\n\n // MOD-97 check: move first 4 chars to end, convert letters to numbers\n const rearranged = iban.slice(4) + iban.slice(0, 4)\n const numStr = rearranged.replace(/[A-Z]/g, (ch) => String(ch.charCodeAt(0) - 55))\n\n return mod97(numStr) === 1 ? ok : fail('Invalid IBAN checksum')\n}\n\n// === NIP (Polish Tax ID) ===\n\nconst NIP_WEIGHTS = [6, 5, 7, 2, 3, 4, 5, 6, 7]\n\n// Validate a Polish NIP number with its weighted checksum.\nexport function validateNIP(value: string): ValidationResult {\n if (!value) return ok\n const digits = value.replace(/\\D/g, '')\n if (digits.length !== 10) return fail('NIP must have 10 digits')\n\n let sum = 0\n for (let i = 0; i < 9; i++) {\n sum += parseInt(digits[i], 10) * NIP_WEIGHTS[i]\n }\n const checkDigit = sum % 11\n if (checkDigit === 10) return fail('Invalid NIP')\n return checkDigit === parseInt(digits[9], 10) ? ok : fail('Invalid NIP checksum')\n}\n\n// === PESEL ===\n\nconst PESEL_WEIGHTS = [1, 3, 7, 9, 1, 3, 7, 9, 1, 3]\n\n// Validate a Polish PESEL number with its checksum algorithm.\nexport function validatePESEL(value: string): ValidationResult {\n if (!value) return ok\n const digits = value.replace(/\\D/g, '')\n if (digits.length !== 11) return fail('PESEL must have 11 digits')\n\n let sum = 0\n for (let i = 0; i < 10; i++) {\n sum += parseInt(digits[i], 10) * PESEL_WEIGHTS[i]\n }\n const checkDigit = (10 - (sum % 10)) % 10\n return checkDigit === parseInt(digits[10], 10) ? ok : fail('Invalid PESEL checksum')\n}\n\n// === REGON ===\n\nconst REGON9_WEIGHTS = [8, 9, 2, 3, 4, 5, 6, 7]\nconst REGON14_WEIGHTS = [2, 4, 8, 5, 0, 9, 7, 3, 6, 1, 2, 4, 8]\n\n// Validate REGON numbers in both the 9-digit and 14-digit variants.\nexport function validateREGON(value: string): ValidationResult {\n if (!value) return ok\n const digits = value.replace(/\\D/g, '')\n\n if (digits.length !== 9 && digits.length !== 14) {\n return fail('REGON must have 9 or 14 digits')\n }\n\n const weights = digits.length === 9 ? REGON9_WEIGHTS : REGON14_WEIGHTS\n let sum = 0\n for (let i = 0; i < weights.length; i++) {\n sum += parseInt(digits[i], 10) * weights[i]\n }\n const checkDigit = sum % 11 === 10 ? 0 : sum % 11\n const lastDigit = parseInt(digits[digits.length - 1], 10)\n return checkDigit === lastDigit ? ok : fail('Invalid REGON checksum')\n}\n\n// === Compose validators ===\n\n// Run validators in order and stop at the first failure.\nexport function composeValidators(...validators: ValidatorFn[]): ValidatorFn {\n return (value: string) => {\n for (const validator of validators) {\n const result = validator(value)\n if (!result.valid) return result\n }\n return ok\n }\n}\n\n// === Date (DD/MM/YYYY, MM/DD/YYYY, YYYY/MM/DD) ===\n\nexport type DateFormat = 'DD/MM/YYYY' | 'MM/DD/YYYY' | 'YYYY/MM/DD'\n\ninterface DateValidationOptions {\n format?: DateFormat\n minDate?: Date\n maxDate?: Date\n}\n\n// Parse a date string in the given format into a Date or null.\nexport function parseDateString(value: string, format: DateFormat = 'DD/MM/YYYY'): Date | null {\n const digits = value.replace(/\\D/g, '')\n if (digits.length !== 8) return null\n\n let day: number, month: number, year: number\n if (format === 'DD/MM/YYYY') {\n day = parseInt(digits.slice(0, 2), 10)\n month = parseInt(digits.slice(2, 4), 10)\n year = parseInt(digits.slice(4, 8), 10)\n } else if (format === 'MM/DD/YYYY') {\n month = parseInt(digits.slice(0, 2), 10)\n day = parseInt(digits.slice(2, 4), 10)\n year = parseInt(digits.slice(4, 8), 10)\n } else {\n year = parseInt(digits.slice(0, 4), 10)\n month = parseInt(digits.slice(4, 6), 10)\n day = parseInt(digits.slice(6, 8), 10)\n }\n\n if (month < 1 || month > 12) return null\n if (day < 1 || day > 31) return null\n if (year < 1) return null\n\n const date = new Date(year, month - 1, day)\n // Verify the date didn't overflow (e.g. Feb 30 → Mar 2)\n if (date.getFullYear() !== year || date.getMonth() !== month - 1 || date.getDate() !== day) {\n return null\n }\n return date\n}\n\n// Validate a date string with optional range constraints.\nexport function validateDate(value: string, options: DateValidationOptions = {}): ValidationResult {\n if (!value) return ok\n const {format = 'DD/MM/YYYY', minDate, maxDate} = options\n\n const digits = value.replace(/\\D/g, '')\n if (digits.length !== 8) return fail('Incomplete date')\n\n const date = parseDateString(value, format)\n if (!date) return fail('Invalid date')\n\n if (minDate) {\n const min = new Date(minDate.getFullYear(), minDate.getMonth(), minDate.getDate())\n if (date < min) return fail('Date is too early')\n }\n if (maxDate) {\n const max = new Date(maxDate.getFullYear(), maxDate.getMonth(), maxDate.getDate())\n if (date > max) return fail('Date is too far in the future')\n }\n\n return ok\n}\n\nexport {validatePostCode} from './postalCodes'\nexport {validateCardNumber} from './creditCards'\n"],"mappings":";AAeA,IAAM,IAA8B,EAAC,OAAO,IAAK;AAGjD,SAAS,EAAqB,GAAuB;AACjD,QAAO,EAAM,aAAa,CAAC,QAAQ,cAAc,GAAG;;AAIxD,SAAS,EAAiB,GAAuB;CAC7C,IAAM,IAAS,EAAM,QAAQ,OAAO,GAAG,CAAC,MAAM,GAAG,EAAE;AAMnD,QAJI,EAAO,UAAU,IACV,IAGJ,GAAG,EAAO,MAAM,GAAG,EAAE,CAAC,GAAG,EAAO,MAAM,EAAE;;AAInD,SAAS,EAAiB,GAAuB;CAC7C,IAAM,IAAS,EAAM,QAAQ,OAAO,GAAG,CAAC,MAAM,GAAG,EAAE;AAMnD,QAJI,EAAO,UAAU,IACV,IAGJ,GAAG,EAAO,MAAM,GAAG,EAAE,CAAC,GAAG,EAAO,MAAM,EAAE;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IAAM,IAAO,EAAgB,GAAO,EAAO;AAY3C,QAXK,IAED,KAEI,IADQ,IAAI,KAAK,EAAQ,aAAa,EAAE,EAAQ,UAAU,EAAE,EAAQ,SAAS,CAAC,GAC3D,EAAK,oBAAoB,GAEhD,KAEI,IADQ,IAAI,KAAK,EAAQ,aAAa,EAAE,EAAQ,UAAU,EAAE,EAAQ,SAAS,CAAC,GAC3D,EAAK,gCAAgC,GAGzD,IAXW,EAAK,eAAe"}
|
|
1
|
+
{"version":3,"file":"validators-YZyyyLvE.js","names":[],"sources":["../src/utils/postalCodes.ts","../src/utils/validators.ts"],"sourcesContent":["import type {ValidationResult} from './validators'\n\nexport interface PostCodeRule {\n countryCode: string\n label: string\n placeholder: string\n example: string\n inputMode: 'text' | 'numeric'\n maxLength: number\n regex: RegExp\n sanitize: (value: string) => string\n format: (value: string) => string\n message: string\n}\n\nconst OK_RESULT: ValidationResult = {valid: true}\n\n// Reuse one sanitizer for countries that mix letters and digits.\nfunction keepLettersAndDigits(value: string): string {\n return value.toUpperCase().replace(/[^A-Z0-9]/g, '')\n}\n\n// Apply the common Polish XX-XXX postcode shape.\nfunction formatPlPostCode(value: string): string {\n const digits = value.replace(/\\D/g, '').slice(0, 5)\n\n if (digits.length <= 2) {\n return digits\n }\n\n return `${digits.slice(0, 2)}-${digits.slice(2)}`\n}\n\n// Support ZIP and ZIP+4 with the same formatter.\nfunction formatUsPostCode(value: string): string {\n const digits = value.replace(/\\D/g, '').slice(0, 9)\n\n if (digits.length <= 5) {\n return digits\n }\n\n return `${digits.slice(0, 5)}-${digits.slice(5)}`\n}\n\n// Clamp countries that only need a fixed number of digits.\nfunction formatFixedDigits(value: string, maxLength: number): string {\n return value.replace(/\\D/g, '').slice(0, maxLength)\n}\n\n// Insert the standard center space used by Canadian post codes.\nfunction formatCaPostCode(value: string): string {\n const clean = keepLettersAndDigits(value).slice(0, 6)\n const chars = clean.split('')\n\n return chars\n .map((char, index) => {\n if (index === 3) {\n return ` ${char}`\n }\n\n return char\n })\n .join('')\n}\n\n// Split the outward and inward parts of a UK postcode.\nfunction formatGbPostCode(value: string): string {\n const clean = keepLettersAndDigits(value).slice(0, 7)\n\n if (clean.length <= 3) {\n return clean\n }\n\n return `${clean.slice(0, clean.length - 3)} ${clean.slice(-3)}`\n}\n\n// Split Dutch codes into four digits and two letters.\nfunction formatNlPostCode(value: string): string {\n const clean = keepLettersAndDigits(value).slice(0, 6)\n\n if (clean.length <= 4) {\n return clean\n }\n\n return `${clean.slice(0, 4)} ${clean.slice(4)}`\n}\n\nexport const postCodeRules: Record<string, PostCodeRule> = {\n PL: {\n countryCode: 'PL',\n label: 'Poland',\n placeholder: '12-345',\n example: '00-001',\n inputMode: 'numeric',\n maxLength: 6,\n regex: /^\\d{2}-\\d{3}$/,\n sanitize: (value) => value.replace(/\\D/g, '').slice(0, 5),\n format: formatPlPostCode,\n message: 'Use the Polish format XX-XXX',\n },\n DE: {\n countryCode: 'DE',\n label: 'Germany',\n placeholder: '12345',\n example: '10115',\n inputMode: 'numeric',\n maxLength: 5,\n regex: /^\\d{5}$/,\n sanitize: (value) => value.replace(/\\D/g, '').slice(0, 5),\n format: (value) => formatFixedDigits(value, 5),\n message: 'Use a 5-digit German postal code',\n },\n FR: {\n countryCode: 'FR',\n label: 'France',\n placeholder: '75001',\n example: '75001',\n inputMode: 'numeric',\n maxLength: 5,\n regex: /^\\d{5}$/,\n sanitize: (value) => value.replace(/\\D/g, '').slice(0, 5),\n format: (value) => formatFixedDigits(value, 5),\n message: 'Use a 5-digit French postal code',\n },\n ES: {\n countryCode: 'ES',\n label: 'Spain',\n placeholder: '28013',\n example: '28013',\n inputMode: 'numeric',\n maxLength: 5,\n regex: /^\\d{5}$/,\n sanitize: (value) => value.replace(/\\D/g, '').slice(0, 5),\n format: (value) => formatFixedDigits(value, 5),\n message: 'Use a 5-digit Spanish postal code',\n },\n IT: {\n countryCode: 'IT',\n label: 'Italy',\n placeholder: '00184',\n example: '00184',\n inputMode: 'numeric',\n maxLength: 5,\n regex: /^\\d{5}$/,\n sanitize: (value) => value.replace(/\\D/g, '').slice(0, 5),\n format: (value) => formatFixedDigits(value, 5),\n message: 'Use a 5-digit Italian postal code',\n },\n US: {\n countryCode: 'US',\n label: 'United States',\n placeholder: '12345 or 12345-6789',\n example: '10001',\n inputMode: 'numeric',\n maxLength: 10,\n regex: /^\\d{5}(?:-\\d{4})?$/,\n sanitize: (value) => value.replace(/\\D/g, '').slice(0, 9),\n format: formatUsPostCode,\n message: 'Use ZIP or ZIP+4 format',\n },\n CA: {\n countryCode: 'CA',\n label: 'Canada',\n placeholder: 'A1A 1A1',\n example: 'M5V 3L9',\n inputMode: 'text',\n maxLength: 7,\n regex: /^[A-Z]\\d[A-Z] \\d[A-Z]\\d$/,\n sanitize: (value) => keepLettersAndDigits(value).slice(0, 6),\n format: formatCaPostCode,\n message: 'Use the Canadian format A1A 1A1',\n },\n GB: {\n countryCode: 'GB',\n label: 'United Kingdom',\n placeholder: 'SW1A 1AA',\n example: 'SW1A 1AA',\n inputMode: 'text',\n maxLength: 8,\n regex: /^[A-Z]{1,2}\\d[A-Z\\d]? \\d[A-Z]{2}$/,\n sanitize: (value) => keepLettersAndDigits(value).slice(0, 7),\n format: formatGbPostCode,\n message: 'Use a valid UK postcode',\n },\n NL: {\n countryCode: 'NL',\n label: 'Netherlands',\n placeholder: '1234 AB',\n example: '1012 AB',\n inputMode: 'text',\n maxLength: 7,\n regex: /^\\d{4} [A-Z]{2}$/,\n sanitize: (value) => keepLettersAndDigits(value).slice(0, 6),\n format: formatNlPostCode,\n message: 'Use the Dutch format 1234 AB',\n },\n}\n\nexport const postCodeCountries = Object.values(postCodeRules).map(({countryCode, label}) => ({\n value: countryCode,\n label,\n}))\n\n// Return the active postal rule or fall back to Poland for deterministic behavior.\nexport function getPostCodeRule(countryCode: string = 'PL'): PostCodeRule {\n return postCodeRules[countryCode.toUpperCase()] ?? postCodeRules.PL\n}\n\n// Keep postal input values aligned with the selected country format.\nexport function formatPostCode(value: string, countryCode: string = 'PL'): string {\n const rule = getPostCodeRule(countryCode)\n return rule.format(rule.sanitize(value))\n}\n\n// Validate the user-visible postal code against the selected country rule.\nexport function validatePostCode(value: string, countryCode: string = 'PL'): ValidationResult {\n if (!value) {\n return OK_RESULT\n }\n\n const rule = getPostCodeRule(countryCode)\n const formatted = rule.format(rule.sanitize(value))\n\n if (!rule.regex.test(formatted)) {\n return {valid: false, error: rule.message}\n }\n\n return OK_RESULT\n}\n","export interface ValidationResult {\n valid: boolean\n error?: string\n}\n\nexport type ValidatorFn = (value: string) => ValidationResult\n\nconst ok: ValidationResult = {valid: true}\nconst fail = (error: string): ValidationResult => ({valid: false, error})\n\n// Ensure the field is not empty after trimming user input.\nexport function validateRequired(value: string): ValidationResult {\n return value.trim().length > 0 ? ok : fail('This field is required')\n}\n\n// Build a validator that enforces a minimum string length.\nexport function validateMinLength(min: number): ValidatorFn {\n return (value: string) => (value.length >= min ? ok : fail(`Minimum ${min} characters`))\n}\n\n// Build a validator that enforces a maximum string length.\nexport function validateMaxLength(max: number): ValidatorFn {\n return (value: string) => (value.length <= max ? ok : fail(`Maximum ${max} characters`))\n}\n\n// Build a validator around a custom regular expression.\nexport function validatePattern(pattern: RegExp, message?: string): ValidatorFn {\n return (value: string) => (pattern.test(value) ? ok : fail(message ?? 'Invalid format'))\n}\n\n// Validate numeric input against optional min and max bounds.\nexport function validateRange(min?: number, max?: number): ValidatorFn {\n return (value: string) => {\n const num = parseFloat(value)\n if (isNaN(num)) return fail('Must be a number')\n if (min !== undefined && num < min) return fail(`Minimum value is ${min}`)\n if (max !== undefined && num > max) return fail(`Maximum value is ${max}`)\n return ok\n }\n}\n\n// === Email ===\n\nconst EMAIL_RE =\n /^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/\n\n// Validate email format while allowing empty optional fields.\nexport function validateEmail(value: string): ValidationResult {\n if (!value) return ok\n return EMAIL_RE.test(value) ? ok : fail('Invalid email address')\n}\n\n// === Phone ===\n\nconst PHONE_LENGTH: Record<string, number> = {\n PL: 9,\n DE: 10,\n US: 10,\n GB: 10,\n FR: 9,\n CZ: 9,\n SK: 9,\n}\n\n// Validate a phone number with optional country-specific digit counts.\nexport function validatePhone(value: string, countryCode?: string): ValidationResult {\n if (!value) return ok\n const digits = value.replace(/\\D/g, '')\n if (digits.length < 7) return fail('Phone number too short')\n if (digits.length > 15) return fail('Phone number too long')\n if (countryCode) {\n const expected = PHONE_LENGTH[countryCode.toUpperCase()]\n if (expected && digits.length !== expected) {\n return fail(`Phone number should have ${expected} digits`)\n }\n }\n return ok\n}\n\n// === IBAN (MOD-97, ISO 13616) ===\n\nconst IBAN_LENGTHS: Record<string, number> = {\n AL: 28,\n AD: 24,\n AT: 20,\n AZ: 28,\n BH: 22,\n BY: 28,\n BE: 16,\n BA: 20,\n BR: 29,\n BG: 22,\n CR: 22,\n HR: 21,\n CY: 28,\n CZ: 24,\n DK: 18,\n DO: 28,\n EG: 29,\n SV: 28,\n EE: 20,\n FO: 18,\n FI: 18,\n FR: 27,\n GE: 22,\n DE: 22,\n GI: 23,\n GR: 27,\n GL: 18,\n GT: 28,\n HU: 28,\n IS: 26,\n IQ: 23,\n IE: 22,\n IL: 23,\n IT: 27,\n JO: 30,\n KZ: 20,\n XK: 20,\n KW: 30,\n LV: 21,\n LB: 28,\n LI: 21,\n LT: 20,\n LU: 20,\n MT: 31,\n MR: 27,\n MU: 30,\n MD: 24,\n MC: 27,\n ME: 22,\n NL: 18,\n MK: 19,\n NO: 15,\n PK: 24,\n PS: 29,\n PL: 28,\n PT: 25,\n QA: 29,\n RO: 24,\n LC: 32,\n SM: 27,\n SA: 24,\n RS: 22,\n SC: 31,\n SK: 24,\n SI: 19,\n ES: 24,\n SE: 24,\n CH: 21,\n TL: 23,\n TN: 24,\n TR: 26,\n UA: 29,\n AE: 23,\n GB: 22,\n VA: 22,\n VG: 24,\n}\n\n// Run the MOD-97 remainder calculation on a numeric IBAN representation.\nfunction mod97(numStr: string): number {\n let remainder = 0\n for (let i = 0; i < numStr.length; i++) {\n remainder = (remainder * 10 + parseInt(numStr[i], 10)) % 97\n }\n return remainder\n}\n\n// Validate a full IBAN using country length rules and the MOD-97 checksum.\nexport function validateIBAN(value: string): ValidationResult {\n if (!value) return ok\n const iban = value.replace(/\\s/g, '').toUpperCase()\n\n if (iban.length < 2) return fail('IBAN too short')\n\n const countryCode = iban.slice(0, 2)\n const expectedLength = IBAN_LENGTHS[countryCode]\n\n if (!expectedLength) return fail('Unknown IBAN country code')\n if (iban.length !== expectedLength) {\n return fail(`IBAN for ${countryCode} should have ${expectedLength} characters`)\n }\n\n // MOD-97 check: move first 4 chars to end, convert letters to numbers\n const rearranged = iban.slice(4) + iban.slice(0, 4)\n const numStr = rearranged.replace(/[A-Z]/g, (ch) => String(ch.charCodeAt(0) - 55))\n\n return mod97(numStr) === 1 ? ok : fail('Invalid IBAN checksum')\n}\n\n// === NIP (Polish Tax ID) ===\n\nconst NIP_WEIGHTS = [6, 5, 7, 2, 3, 4, 5, 6, 7]\n\n// Validate a Polish NIP number with its weighted checksum.\nexport function validateNIP(value: string): ValidationResult {\n if (!value) return ok\n const digits = value.replace(/\\D/g, '')\n if (digits.length !== 10) return fail('NIP must have 10 digits')\n\n let sum = 0\n for (let i = 0; i < 9; i++) {\n sum += parseInt(digits[i], 10) * NIP_WEIGHTS[i]\n }\n const checkDigit = sum % 11\n if (checkDigit === 10) return fail('Invalid NIP')\n return checkDigit === parseInt(digits[9], 10) ? ok : fail('Invalid NIP checksum')\n}\n\n// === PESEL ===\n\nconst PESEL_WEIGHTS = [1, 3, 7, 9, 1, 3, 7, 9, 1, 3]\n\n// Validate a Polish PESEL number with its checksum algorithm.\nexport function validatePESEL(value: string): ValidationResult {\n if (!value) return ok\n const digits = value.replace(/\\D/g, '')\n if (digits.length !== 11) return fail('PESEL must have 11 digits')\n\n let sum = 0\n for (let i = 0; i < 10; i++) {\n sum += parseInt(digits[i], 10) * PESEL_WEIGHTS[i]\n }\n const checkDigit = (10 - (sum % 10)) % 10\n return checkDigit === parseInt(digits[10], 10) ? ok : fail('Invalid PESEL checksum')\n}\n\n// === REGON ===\n\nconst REGON9_WEIGHTS = [8, 9, 2, 3, 4, 5, 6, 7]\nconst REGON14_WEIGHTS = [2, 4, 8, 5, 0, 9, 7, 3, 6, 1, 2, 4, 8]\n\n// Validate REGON numbers in both the 9-digit and 14-digit variants.\nexport function validateREGON(value: string): ValidationResult {\n if (!value) return ok\n const digits = value.replace(/\\D/g, '')\n\n if (digits.length !== 9 && digits.length !== 14) {\n return fail('REGON must have 9 or 14 digits')\n }\n\n const weights = digits.length === 9 ? REGON9_WEIGHTS : REGON14_WEIGHTS\n let sum = 0\n for (let i = 0; i < weights.length; i++) {\n sum += parseInt(digits[i], 10) * weights[i]\n }\n const checkDigit = sum % 11 === 10 ? 0 : sum % 11\n const lastDigit = parseInt(digits[digits.length - 1], 10)\n return checkDigit === lastDigit ? ok : fail('Invalid REGON checksum')\n}\n\n// === Compose validators ===\n\n// Run validators in order and stop at the first failure.\nexport function composeValidators(...validators: ValidatorFn[]): ValidatorFn {\n return (value: string) => {\n for (const validator of validators) {\n const result = validator(value)\n if (!result.valid) return result\n }\n return ok\n }\n}\n\n// === Date (DD/MM/YYYY, MM/DD/YYYY, YYYY/MM/DD) ===\n\nexport type DateFormat = 'DD/MM/YYYY' | 'MM/DD/YYYY' | 'YYYY/MM/DD'\n\ninterface DateValidationOptions {\n format?: DateFormat\n minDate?: Date\n maxDate?: Date\n}\n\n// Parse a date string in the given format into a Date or null.\nexport function parseDateString(value: string, format: DateFormat = 'DD/MM/YYYY'): Date | null {\n const digits = value.replace(/\\D/g, '')\n if (digits.length !== 8) return null\n\n let day: number, month: number, year: number\n if (format === 'DD/MM/YYYY') {\n day = parseInt(digits.slice(0, 2), 10)\n month = parseInt(digits.slice(2, 4), 10)\n year = parseInt(digits.slice(4, 8), 10)\n } else if (format === 'MM/DD/YYYY') {\n month = parseInt(digits.slice(0, 2), 10)\n day = parseInt(digits.slice(2, 4), 10)\n year = parseInt(digits.slice(4, 8), 10)\n } else {\n year = parseInt(digits.slice(0, 4), 10)\n month = parseInt(digits.slice(4, 6), 10)\n day = parseInt(digits.slice(6, 8), 10)\n }\n\n if (month < 1 || month > 12) return null\n if (day < 1 || day > 31) return null\n if (year < 1) return null\n\n const date = new Date(year, month - 1, day)\n // Verify the date didn't overflow (e.g. Feb 30 → Mar 2)\n if (date.getFullYear() !== year || date.getMonth() !== month - 1 || date.getDate() !== day) {\n return null\n }\n return date\n}\n\n// Validate a date string with optional range constraints.\nexport function validateDate(value: string, options: DateValidationOptions = {}): ValidationResult {\n if (!value) return ok\n const {format = 'DD/MM/YYYY', minDate, maxDate} = options\n\n const digits = value.replace(/\\D/g, '')\n if (digits.length !== 8) return fail('Incomplete date')\n\n const date = parseDateString(value, format)\n if (!date) return fail('Invalid date')\n\n if (minDate) {\n const min = new Date(minDate.getFullYear(), minDate.getMonth(), minDate.getDate())\n if (date < min) return fail('Date is too early')\n }\n if (maxDate) {\n const max = new Date(maxDate.getFullYear(), maxDate.getMonth(), maxDate.getDate())\n if (date > max) return fail('Date is too far in the future')\n }\n\n return ok\n}\n\nexport {validatePostCode} from './postalCodes'\nexport {validateCardNumber} from './creditCards'\n"],"mappings":";AAeA,IAAM,IAA8B,EAAC,OAAO,IAAK;AAGjD,SAAS,EAAqB,GAAuB;AACjD,QAAO,EAAM,aAAa,CAAC,QAAQ,cAAc,GAAG;;AAIxD,SAAS,EAAiB,GAAuB;CAC7C,IAAM,IAAS,EAAM,QAAQ,OAAO,GAAG,CAAC,MAAM,GAAG,EAAE;AAMnD,QAJI,EAAO,UAAU,IACV,IAGJ,GAAG,EAAO,MAAM,GAAG,EAAE,CAAC,GAAG,EAAO,MAAM,EAAE;;AAInD,SAAS,EAAi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AiC,EAAE,EAAoB;AAC/F,KAAI,CAAC,EAAO,QAAO;CACnB,IAAM,EAAC,YAAS,cAAc,YAAS,eAAW;AAGlD,KADe,EAAM,QAAQ,OAAO,GAAG,CAC5B,WAAW,EAAG,QAAO,EAAK,kBAAkB;CAEvD,IAAM,IAAO,EAAgB,GAAO,EAAO;AAY3C,QAXK,IAED,KAEI,IADQ,IAAI,KAAK,EAAQ,aAAa,EAAE,EAAQ,UAAU,EAAE,EAAQ,SAAS,CAAC,GAC3D,EAAK,oBAAoB,GAEhD,KAEI,IADQ,IAAI,KAAK,EAAQ,aAAa,EAAE,EAAQ,UAAU,EAAE,EAAQ,SAAS,CAAC,GAC3D,EAAK,gCAAgC,GAGzD,IAXW,EAAK,eAAe"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@banzamel/mineralui",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.5.0",
|
|
4
4
|
"description": "Modern React UI component framework with mineral dark aesthetic",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.cjs",
|
|
@@ -341,5 +341,8 @@
|
|
|
341
341
|
"homepage": "https://mineralui.io",
|
|
342
342
|
"bugs": {
|
|
343
343
|
"url": "https://github.com/Banzamel/mineralui/issues"
|
|
344
|
+
},
|
|
345
|
+
"dependencies": {
|
|
346
|
+
"prismjs": "^1.30.0"
|
|
344
347
|
}
|
|
345
348
|
}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
const e=require(`./theme-CyIOdO9W.cjs`),t=require(`./cn-CU5TNITO.cjs`),n=require(`./useInteractionEffect-DnEfbCrX.cjs`),r=require(`./MButton-Rg85cgO1.cjs`);let i=require(`react/jsx-runtime`);function a(e,t){if(t)return t.slice(0,2).toUpperCase();if(!e)return`?`;let n=e.trim().split(/\s+/).filter(Boolean);return n.length===0?`?`:n.length===1?n[0].slice(0,2).toUpperCase():`${n[0][0]}${n[1][0]}`.toUpperCase()}function o({src:o,alt:s,name:c,initials:l,size:u=`md`,shape:d=`circle`,hidden:f,color:p,badge:m,badgeColor:h,badgePulsing:g=!1,backgroundColor:_,clickEffect:v,rippleColor:y,skeleton:b=!1,className:x,style:S,onPointerDown:C,...w}){let T=a(c,l),E=typeof w.onClick==`function`||w.role===`button`||w.tabIndex!==void 0,{effectClassName:D,effectLayer:O,handlePointerDown:k}=n.t({effect:v??(E?`ripple`:`none`),disabled:!E||b,color:y}),A=typeof u==`number`?{width:`${u}px`,height:`${u}px`,...S,..._&&!b?{backgroundColor:_}:{}}:{...S,..._&&!b?{backgroundColor:_}:{}};return(0,i.jsxs)(`span`,{className:t.t(`avatar`,typeof u==`string`&&u,d,b&&`skeleton animate`,E&&!b&&`interactive`,D,!b&&p&&`color-${p}`,x),style:A,"aria-label":b?`Loading`:s??c??`MAvatar`,onPointerDown:e=>{k(e),C?.(e)},...e.n(f),...w,children:[O,r.n({badge:m,badgeColor:h,badgePulsing:g}),b?null:o?(0,i.jsx)(`img`,{src:o,alt:s??c??``,className:`image`}):(0,i.jsx)(`span`,{className:`fallback`,children:T})]})}Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return o}});
|
|
2
|
-
//# sourceMappingURL=MAvatar-D4ZC9wml.cjs.map
|
package/dist/MBadge-DJuqtMP7.cjs
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
const e=require(`./theme-CyIOdO9W.cjs`),t=require(`./cn-CU5TNITO.cjs`);let n=require(`react/jsx-runtime`);function r({color:r=`primary`,size:i=`md`,hidden:a,pulsing:o=!1,rounded:s=!1,fullWidth:c=!1,icon:l,className:u,children:d,...f}){return(0,n.jsxs)(`span`,{className:t.t(`badge`,`color-${r}`,i,o&&`pulsing`,s&&`rounded`,c&&`full-width`,u),...e.n(a),...f,children:[l&&(0,n.jsx)(`span`,{className:`badge-icon`,children:l}),d]})}Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return r}});
|
|
2
|
-
//# sourceMappingURL=MBadge-DJuqtMP7.cjs.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
const e=require(`./theme-CyIOdO9W.cjs`),t=require(`./cn-CU5TNITO.cjs`),n=require(`./useInteractionEffect-DnEfbCrX.cjs`);let r=require(`react`),i=require(`react/jsx-runtime`);var a=(0,r.createContext)(null);function o(){return(0,r.useContext)(a)}function s({color:e=`primary`,size:n=`md`,label:r=`Loading`,className:a,style:o,...s}){let c=typeof n==`number`?{width:`${n}px`,height:`${n}px`,...o}:o||{};return(0,i.jsx)(`span`,{className:t.t(`spinner`,typeof n==`string`&&n,e&&`color-${e}`,a),style:c,role:`status`,"aria-label":r,...s})}function c(e){return e!=null&&e!==!1}function l({badge:e,badgeColor:t,badgePulsing:n}){return c(e)}function u({badge:e,badgeColor:n=`primary`,badgePulsing:r=!1,className:a}){if(!l({badge:e,badgeColor:n,badgePulsing:r}))return null;let o=e===!0;return(0,i.jsx)(`span`,{className:t.t(`overlay-badge`,`color-${n}`,o&&`dot`,r&&`pulsing`,a),"aria-hidden":`true`,children:o?null:e})}var d=(0,r.forwardRef)(function({component:r,to:a,href:c,variant:l,size:d,color:f,hidden:p,fullWidth:m=!1,rounded:h=!1,shape:g,iconOnly:_=!1,loading:v=!1,active:y=!1,pulsing:b=!1,badge:x,badgeColor:S,badgePulsing:C=!1,startIcon:w,endIcon:T,clickEffect:E=`ripple`,rippleColor:D,className:O,style:k,children:A,disabled:j=!1,type:M=`button`,onClick:N,onPointerDown:P,onKeyDown:F,...I},L){let R=r??`button`,z=!r||R===`button`,B=o(),V=l??B?.variant??`filled`,H=d??B?.size??`md`,U=f??B?.color??`primary`,W=j||v,{effectClassName:G,effectLayer:K,handlePointerDown:q,triggerEffect:J}=n.t({effect:E,disabled:W,centered:_,color:D});function Y(e){if(W&&!z){e.preventDefault();return}N?.(e)}return(0,i.jsxs)(R,{ref:L,type:z?M:void 0,to:r?W?void 0:a:void 0,href:r?W?void 0:c:void 0,className:t.t(`button`,V,H,`color-${U}`,m&&`full-width`,h&&`rounded`,g===`circle`&&`circle`,_&&`icon-only`,v&&`loading`,y&&`active`,b&&`pulsing`,W&&`disabled`,G,O),style:k,disabled:z?W:void 0,"aria-busy":v||void 0,"aria-disabled":!z&&W?!0:void 0,onClick:Y,onPointerDown:e=>{q(e),P?.(e)},onKeyDown:e=>{(e.key===` `||e.key===`Enter`)&&J(e.currentTarget),F?.(e)},...e.n(p),...I,children:[K,u({badge:x,badgeColor:S,badgePulsing:C}),v&&(0,i.jsx)(s,{size:`sm`,color:`inherit`,"aria-hidden":`true`}),w&&(0,i.jsx)(`span`,{className:`icon start`,children:w}),A&&(0,i.jsx)(`span`,{className:`content`,children:A}),T&&(0,i.jsx)(`span`,{className:`icon end`,children:T})]})});Object.defineProperty(exports,`i`,{enumerable:!0,get:function(){return a}}),Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return u}}),Object.defineProperty(exports,`r`,{enumerable:!0,get:function(){return s}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return d}});
|
|
2
|
-
//# sourceMappingURL=MButton-Rg85cgO1.cjs.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
const e=require(`./cn-CU5TNITO.cjs`),t=require(`./useInteractionEffect-DnEfbCrX.cjs`);let n=require(`react`),r=require(`react/jsx-runtime`);var i=(0,n.forwardRef)(function({checked:i,defaultChecked:a,indeterminate:o=!1,name:s,id:c,value:l,disabled:u=!1,size:d=`md`,color:f=`primary`,label:p,labelPosition:m=`right`,error:h=!1,errorText:g,onChange:_,clickEffect:v=`ripple`,rippleColor:y,className:b,style:x},S){let C=(0,n.useRef)(null),w=S??C,{effectClassName:T,effectLayer:E,handlePointerDown:D,triggerEffect:O}=t.t({effect:v,disabled:u,centered:!0,color:y});(0,n.useEffect)(()=>{w.current&&(w.current.indeterminate=o)},[o,w]);let k=h||!!g;return(0,r.jsxs)(`div`,{className:e.t(`checkbox`,b),style:x,children:[(0,r.jsxs)(`label`,{className:e.t(`label`,d,m===`left`&&`label-left`,u&&`disabled`),children:[(0,r.jsxs)(`span`,{className:e.t(`box`,`color-${f}`,k&&`error`,T),onPointerDown:D,children:[E,(0,r.jsx)(`input`,{ref:w,type:`checkbox`,checked:i,defaultChecked:a,name:s,id:c,value:l,disabled:u,onChange:_,onKeyDown:e=>{(e.key===` `||e.key===`Enter`)&&O(e.currentTarget.parentElement)},className:`input`,"aria-invalid":k||void 0}),(0,r.jsx)(`span`,{className:`indeterminate-mark`})]}),p&&(0,r.jsx)(`span`,{className:e.t(`label-text`,k&&`error`),children:p})]}),g&&(0,r.jsx)(`span`,{className:`field-error`,role:`alert`,children:g})]})});Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return i}});
|
|
2
|
-
//# sourceMappingURL=MCheckbox-Bea3orrs.cjs.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
const e=require(`./icons-Dv1T-cF4.cjs`),t=require(`./cn-CU5TNITO.cjs`),n=require(`./MCheckbox-Bea3orrs.cjs`),r=require(`./MInputSearch-BKQnKS-9.cjs`),i=require(`./MPagination-C6hnhbTp.cjs`);let a=require(`react`),o=require(`react/jsx-runtime`);function s(e,t,n){return typeof n==`function`?n(e,t):String(typeof n==`string`?e[n]:e.id??t)}function c({columns:c,data:l,rowKey:u,sortable:d=!1,filterable:f=!1,selectable:p=!1,pagination:m=!1,pageSize:h=10,striped:g=!1,compact:_=!1,stickyHeader:v=!1,sort:y,onSortChange:b,selectedKeys:x,onSelectionChange:S,emptyText:C=`No data`,filterPlaceholder:w=`Search...`,className:T,...E}){let[D,O]=(0,a.useState)(null),[k,A]=(0,a.useState)([]),[j,M]=(0,a.useState)(``),[N,P]=(0,a.useState)(0),F=y===void 0?D:y,I=x??k,L=S??A;function R(e){let t;t=F?.key===e?F.dir===`asc`?{key:e,dir:`desc`}:null:{key:e,dir:`asc`},b?b(t):O(t),P(0)}let z=(0,a.useMemo)(()=>{if(!f||!j.trim())return l;let e=j.toLowerCase();return l.filter(t=>c.some(n=>{if(n.filterable===!1)return!1;let r=t[n.key];return r!=null&&String(r).toLowerCase().includes(e)}))},[l,j,f,c]),B=(0,a.useMemo)(()=>{if(!F||!c.find(e=>e.key===F.key)?.sortable&&!d)return z;let e=F.dir===`asc`?1:-1;return[...z].sort((t,n)=>{let r=t[F.key],i=n[F.key];return r==null&&i==null?0:r==null?1:i==null?-1:typeof r==`number`&&typeof i==`number`?(r-i)*e:String(r).localeCompare(String(i))*e})},[z,F,c,d]),V=m?Math.max(1,Math.ceil(B.length/h)):1,H=m?B.slice(N*h,(N+1)*h):B,U=H.map((e,t)=>s(e,N*h+t,u)),W=U.length>0&&U.every(e=>I.includes(e));function G(){L(W?I.filter(e=>!U.includes(e)):[...new Set([...I,...U])])}function K(e){L(I.includes(e)?I.filter(t=>t!==e):[...I,e])}function q(e,t){t.target.closest(`button, a, [data-no-row-select]`)||K(e)}return(0,o.jsxs)(`div`,{className:t.t(`data-table`,T),...E,children:[f&&(0,o.jsx)(`div`,{className:`toolbar`,children:(0,o.jsx)(r.t,{className:`filter-search`,size:`sm`,fullWidth:!0,placeholder:w,value:j,onChange:e=>{M(e.target.value),P(0)},onClear:()=>{M(``),P(0)}})}),(0,o.jsx)(`div`,{className:`scroll`,children:(0,o.jsxs)(`table`,{className:t.t(`root`,g&&`striped`,_&&`compact`),children:[(0,o.jsx)(`thead`,{className:t.t(`head`,v&&`sticky`),children:(0,o.jsxs)(`tr`,{children:[p&&(0,o.jsx)(`th`,{className:`th check-col`,children:(0,o.jsx)(n.t,{checked:W,onChange:G,size:`sm`,clickEffect:`none`})}),c.map(n=>{let r=n.sortable??d,i=F?.key===n.key;return(0,o.jsx)(`th`,{className:t.t(`th`,r&&`sortable`,i&&`sorted-${F.dir}`),style:{width:n.width,textAlign:n.align},onClick:r?()=>R(n.key):void 0,children:(0,o.jsxs)(`span`,{className:`th-content`,children:[n.label,r&&(0,o.jsx)(`span`,{className:`sort-icon`,children:i?F.dir===`asc`?(0,o.jsx)(e.Oi,{"aria-hidden":`true`}):(0,o.jsx)(e.Di,{"aria-hidden":`true`}):(0,o.jsx)(e.Ei,{"aria-hidden":`true`})})]})},n.key)})]})}),(0,o.jsxs)(`tbody`,{children:[H.length===0&&(0,o.jsx)(`tr`,{children:(0,o.jsx)(`td`,{className:`empty`,colSpan:c.length+ +!!p,children:C})}),H.map((e,r)=>{let i=s(e,N*h+r,u),a=I.includes(i);return(0,o.jsxs)(`tr`,{className:t.t(`row`,a&&`selected`,p&&`selectable`),onClick:p?e=>q(i,e):void 0,children:[p&&(0,o.jsx)(`td`,{className:`td check-col`,children:(0,o.jsx)(n.t,{checked:a,onChange:()=>{},size:`sm`,clickEffect:`none`})}),c.map(t=>(0,o.jsx)(`td`,{className:`td`,style:{textAlign:t.align},children:t.render?t.render(e[t.key],e,N*h+r):e[t.key]},t.key))]},i)})]})]})}),m&&V>1&&(0,o.jsx)(i.t,{total:B.length,page:N+1,pageSize:h,onChange:e=>P(e-1)})]})}Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return c}});
|
|
2
|
-
//# sourceMappingURL=MDataTable-_afEvx2S.cjs.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
const e=require(`./icons-Dv1T-cF4.cjs`),t=require(`./cn-CU5TNITO.cjs`),n=require(`./MPortal-PyRKsZxc.cjs`),r=require(`./MButton-Rg85cgO1.cjs`);let i=require(`react`),a=require(`react/jsx-runtime`);var o=600;function s(e){return(0,i.isValidElement)(e)&&!!e.type.__drawerHeader}function c(e){return(0,i.isValidElement)(e)&&!!e.type.__drawerBody}function l(e){return(0,i.isValidElement)(e)&&!!e.type.__drawerFooter}function u({children:e}){return(0,a.jsx)(a.Fragment,{children:e})}u.__drawerHeader=!0;function d({children:e}){return(0,a.jsx)(a.Fragment,{children:e})}d.__drawerBody=!0;function f({children:e}){return(0,a.jsx)(a.Fragment,{children:e})}f.__drawerFooter=!0;function p({open:u,onClose:d,side:f=`right`,size:p=`md`,overlay:m=!0,closeOnBackdrop:h=!0,closeOnEscape:g=!0,className:_,children:v,...y}){let[b,x]=(0,i.useState)(!1),[S,C]=(0,i.useState)(!1),w=(0,i.useRef)(null);if((0,i.useEffect)(()=>{u&&(x(!0),C(!1))},[u]),(0,i.useEffect)(()=>{if(!u&&b){C(!0);let e=setTimeout(()=>{x(!1),C(!1)},o);return()=>clearTimeout(e)}},[u,b]),(0,i.useEffect)(()=>{if(!u||!g)return;let e=e=>{e.key===`Escape`&&d()};return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[u,g,d]),(0,i.useEffect)(()=>{if(!b)return;let e=document.body.style.overflow;return document.body.style.overflow=`hidden`,()=>{document.body.style.overflow=e}},[b]),!b)return null;let T=e=>{h&&e.target===e.currentTarget&&d()},E=null,D=null,O=null,k=null,A=null,j=[];i.Children.forEach(v,e=>{if(s(e)){E=e.props.children,D=e.props;return}if(c(e)){O=e.props,j.push(e.props.children);return}if(l(e)){k=e.props.children,A=e.props;return}j.push(e)});let M=D??{children:void 0},N=O??{children:void 0},P=A??{children:void 0},{children:F,className:I,bordered:L=!1,...R}=M,{children:z,className:B,...V}=N,{children:H,className:U,bordered:W=!1,...G}=P;return(0,a.jsx)(n.t,{children:(0,a.jsx)(`div`,{ref:w,className:t.t(`mineral-backdrop`,`drawer-backdrop`,!m&&`no-overlay`,S&&`closing`),onMouseDown:T,children:(0,a.jsxs)(`div`,{className:t.t(`drawer`,f,p,_),role:`dialog`,"aria-modal":`true`,...y,children:[E&&(0,a.jsxs)(`div`,{...R,className:t.t(`drawer-header`,L&&`bordered`,I),children:[(0,a.jsx)(`div`,{className:`drawer-title`,children:E}),(0,a.jsx)(r.t,{variant:`link`,color:`neutral`,iconOnly:!0,size:`sm`,onClick:d,"aria-label":`Close`,className:`close`,children:(0,a.jsx)(e.Ii,{})})]}),(0,a.jsx)(`div`,{...V,className:t.t(`drawer-body`,B),children:j}),k&&(0,a.jsx)(`div`,{...G,className:t.t(`drawer-footer`,W&&`bordered`,U),children:k})]})})})}Object.defineProperty(exports,`i`,{enumerable:!0,get:function(){return u}}),Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return d}}),Object.defineProperty(exports,`r`,{enumerable:!0,get:function(){return f}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return p}});
|
|
2
|
-
//# sourceMappingURL=MDrawer-2NDNRU77.cjs.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
const e=require(`./cn-CU5TNITO.cjs`),t=require(`./useKeyboardNav-BrODLJaL.cjs`),n=require(`./MPopover-C3-fGAke.cjs`);let r=require(`react`),i=require(`react/jsx-runtime`);function a(e){return e.props}function o(e){return!!e.type.__dropdownItem}function s(e){return!!e.type.__dropdownGroup}function c(e){let t=[];return r.Children.forEach(e,e=>{(0,r.isValidElement)(e)&&(o(e)?t.push(e):s(e)&&r.Children.forEach(a(e).children,e=>{(0,r.isValidElement)(e)&&o(e)&&t.push(e)}))}),t}function l({trigger:l,placement:u=`bottom-start`,closeOnSelect:d=!0,openOn:f=`click`,onOpenChange:p,className:m,style:h,popoverClassName:g,popoverStyle:_,children:v}){let[y,b]=(0,r.useState)(!1),x=(0,r.useRef)(null),S=(0,r.useRef)(null),C=c(v),w=C.filter(e=>!a(e).disabled).length,T=(0,r.useCallback)(e=>{b(t=>{let n=typeof e==`function`?e(t):e;return p?.(n),n})},[p]),{activeIndex:E,setActiveIndex:D,onKeyDown:O}=t.t({itemCount:w,onSelect:(0,r.useCallback)(e=>{let t=0;for(let n of C){let r=a(n);if(!r.disabled){if(t===e){r.onClick?.();break}t++}}d&&T(!1)},[C,d,T]),onClose:()=>b(!1),isOpen:y}),k=()=>T(e=>!e),A=e=>{(e.key===`ArrowDown`||e.key===`Enter`||e.key===` `)&&(e.preventDefault(),T(!0)),y&&O(e)},j=0,M=e=>{if(!(0,r.isValidElement)(e))return e;if(o(e)){let t=a(e),n=t.disabled,i=n?-1:j++;return(0,r.cloneElement)(e,{_active:i===E,_onHover:n?void 0:()=>D(i),_onClick:()=>{n||(t.onClick?.(),d&&T(!1))}})}return s(e)?(0,r.cloneElement)(e,{children:r.Children.map(a(e).children,M)}):e},N=f===`hover`?{onMouseEnter:()=>{S.current&&clearTimeout(S.current),T(!0)},onMouseLeave:()=>{S.current=setTimeout(()=>T(!1),150)}}:{};return(0,i.jsxs)(`div`,{className:e.t(`dropdown menu anchor`,m),style:h,...N,children:[(0,i.jsx)(`div`,{ref:x,onClick:f===`click`?k:void 0,onKeyDown:A,role:`button`,tabIndex:0,className:`dropdown menu trigger`,children:l}),(0,i.jsx)(n.t,{open:y,anchorRef:x,onClose:()=>T(!1),placement:u,className:e.t(`dropdown menu popover`,g),style:_,children:(0,i.jsx)(`div`,{className:`dropdown menu list`,role:`menu`,...N,children:r.Children.map(v,M)})})]})}function u({icon:t,label:n,href:r,to:a,onClick:o,color:s,disabled:c=!1,active:l=!1,component:u,className:d,_active:f,_onHover:p,_onClick:m}){let h=f??l,g=(0,i.jsxs)(i.Fragment,{children:[t&&(0,i.jsx)(`span`,{className:`dropdown menu icon`,children:t}),(0,i.jsx)(`span`,{className:`dropdown menu label`,children:n})]}),_=e.t(`dropdown menu item`,h&&`active`,c&&`disabled`,s,d),v=e=>{if(c){e.preventDefault();return}o?.(),m?.()},y=u??(r||a?`a`:`button`),b=u?{...r?{href:r}:{},...a?{to:a}:{}}:r?{href:r}:a?{href:a}:{};return(0,i.jsx)(y,{className:_,role:`menuitem`,tabIndex:-1,onClick:v,onMouseEnter:p,"aria-disabled":c||void 0,...b,children:g})}u.__dropdownItem=!0;function d({label:e,children:t}){return(0,i.jsxs)(`div`,{className:`dropdown menu group`,role:`group`,children:[(0,i.jsx)(`div`,{className:`dropdown menu group-label`,children:e}),t]})}d.__dropdownGroup=!0;function f({className:t}){return(0,i.jsx)(`div`,{className:e.t(`dropdown menu divider`,t),role:`separator`})}Object.defineProperty(exports,`i`,{enumerable:!0,get:function(){return l}}),Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return d}}),Object.defineProperty(exports,`r`,{enumerable:!0,get:function(){return u}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return f}});
|
|
2
|
-
//# sourceMappingURL=MDropdownMenu-X7ywPqth.cjs.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
const e=require(`./cn-CU5TNITO.cjs`);let t=require(`react`),n=require(`react/jsx-runtime`);var r={xs:80,sm:120,md:200,lg:280,xl:400},i={primary:`var(--mineral-primary)`,neutral:`var(--mineral-neutral)`,success:`var(--mineral-success)`,error:`var(--mineral-error)`,warning:`var(--mineral-warning)`,info:`var(--mineral-info)`,light:`var(--mineral-light)`,dark:`var(--mineral-dark-color)`,news:`var(--mineral-news)`,inherit:`inherit`},a=(0,t.forwardRef)(function({size:t=`md`,color:a=`primary`,title:o,animate:s=!0,className:c,style:l,children:u,viewBox:d=`0 0 200 200`,...f},p){let m=typeof t==`number`?t:r[t],h=i[a]??i.primary;return(0,n.jsxs)(`svg`,{ref:p,width:m,height:m,viewBox:d,fill:`none`,"aria-hidden":o?void 0:!0,"aria-label":o??void 0,focusable:`false`,className:e.t(`illustration`,s&&`animate`,c),style:{"--illustration-accent":h,...l},...f,children:[o?(0,n.jsx)(`title`,{children:o}):null,u]})}),o=(0,t.forwardRef)(function(e,t){return(0,n.jsxs)(a,{ref:t,viewBox:`0 0 200 200`,...e,children:[(0,n.jsx)(`rect`,{x:`85`,y:`160`,width:`30`,height:`8`,rx:`2`,fill:`var(--mineral-border, #3a3f47)`}),(0,n.jsx)(`rect`,{x:`92`,y:`148`,width:`16`,height:`14`,rx:`1`,fill:`var(--mineral-border, #3a3f47)`}),(0,n.jsx)(`rect`,{x:`24`,y:`28`,width:`152`,height:`124`,rx:`8`,fill:`var(--mineral-surface, #1a1d23)`,stroke:`var(--mineral-border, #3a3f47)`,strokeWidth:`2`}),(0,n.jsx)(`rect`,{x:`32`,y:`36`,width:`136`,height:`108`,rx:`4`,fill:`var(--mineral-bg, #13151a)`}),(0,n.jsx)(`rect`,{x:`36`,y:`40`,width:`128`,height:`10`,rx:`2`,fill:`var(--mineral-surface, #1a1d23)`}),(0,n.jsx)(`circle`,{cx:`42`,cy:`45`,r:`2`,fill:`var(--mineral-error, #ef4444)`,opacity:`0.7`}),(0,n.jsx)(`circle`,{cx:`49`,cy:`45`,r:`2`,fill:`var(--mineral-warning, #f59e0b)`,opacity:`0.7`}),(0,n.jsx)(`circle`,{cx:`56`,cy:`45`,r:`2`,fill:`var(--mineral-success, #22c55e)`,opacity:`0.7`}),(0,n.jsx)(`rect`,{x:`100`,y:`43`,width:`56`,height:`4`,rx:`2`,fill:`var(--mineral-border, #3a3f47)`}),(0,n.jsx)(`rect`,{x:`36`,y:`54`,width:`38`,height:`24`,rx:`3`,fill:`var(--mineral-surface, #1a1d23)`}),(0,n.jsx)(`rect`,{x:`40`,y:`58`,width:`16`,height:`3`,rx:`1`,fill:`var(--mineral-text-secondary, #6b7280)`}),(0,n.jsx)(`rect`,{x:`40`,y:`64`,width:`24`,height:`5`,rx:`1`,fill:`var(--illustration-accent)`}),(0,n.jsx)(`rect`,{x:`40`,y:`72`,width:`12`,height:`2`,rx:`1`,fill:`var(--mineral-success, #22c55e)`,opacity:`0.6`}),(0,n.jsx)(`rect`,{x:`78`,y:`54`,width:`38`,height:`24`,rx:`3`,fill:`var(--mineral-surface, #1a1d23)`}),(0,n.jsx)(`rect`,{x:`82`,y:`58`,width:`16`,height:`3`,rx:`1`,fill:`var(--mineral-text-secondary, #6b7280)`}),(0,n.jsx)(`rect`,{x:`82`,y:`64`,width:`20`,height:`5`,rx:`1`,fill:`var(--illustration-accent)`,opacity:`0.7`}),(0,n.jsx)(`rect`,{x:`82`,y:`72`,width:`14`,height:`2`,rx:`1`,fill:`var(--mineral-warning, #f59e0b)`,opacity:`0.6`}),(0,n.jsx)(`rect`,{x:`120`,y:`54`,width:`40`,height:`24`,rx:`3`,fill:`var(--mineral-surface, #1a1d23)`}),(0,n.jsx)(`rect`,{x:`124`,y:`58`,width:`18`,height:`3`,rx:`1`,fill:`var(--mineral-text-secondary, #6b7280)`}),(0,n.jsx)(`rect`,{x:`124`,y:`64`,width:`26`,height:`5`,rx:`1`,fill:`var(--illustration-accent)`,opacity:`0.5`}),(0,n.jsx)(`rect`,{x:`124`,y:`72`,width:`10`,height:`2`,rx:`1`,fill:`var(--mineral-info, #3b82f6)`,opacity:`0.6`}),(0,n.jsx)(`rect`,{x:`36`,y:`82`,width:`80`,height:`56`,rx:`3`,fill:`var(--mineral-surface, #1a1d23)`}),(0,n.jsx)(`rect`,{x:`40`,y:`86`,width:`30`,height:`3`,rx:`1`,fill:`var(--mineral-text-secondary, #6b7280)`}),(0,n.jsx)(`rect`,{x:`44`,y:`118`,width:`8`,height:`14`,rx:`1.5`,fill:`var(--illustration-accent)`,opacity:`0.35`}),(0,n.jsx)(`rect`,{x:`56`,y:`110`,width:`8`,height:`22`,rx:`1.5`,fill:`var(--illustration-accent)`,opacity:`0.5`}),(0,n.jsx)(`rect`,{x:`68`,y:`104`,width:`8`,height:`28`,rx:`1.5`,fill:`var(--illustration-accent)`,opacity:`0.7`}),(0,n.jsx)(`rect`,{x:`80`,y:`96`,width:`8`,height:`36`,rx:`1.5`,fill:`var(--illustration-accent)`,opacity:`0.85`}),(0,n.jsx)(`rect`,{x:`92`,y:`100`,width:`8`,height:`32`,rx:`1.5`,fill:`var(--illustration-accent)`}),(0,n.jsx)(`polyline`,{points:`48,116 60,108 72,102 84,94 96,98`,fill:`none`,stroke:`var(--illustration-accent)`,strokeWidth:`1.5`,strokeLinecap:`round`,strokeLinejoin:`round`,opacity:`0.9`}),(0,n.jsx)(`rect`,{x:`120`,y:`82`,width:`40`,height:`56`,rx:`3`,fill:`var(--mineral-surface, #1a1d23)`}),(0,n.jsx)(`rect`,{x:`124`,y:`86`,width:`24`,height:`3`,rx:`1`,fill:`var(--mineral-text-secondary, #6b7280)`}),(0,n.jsx)(`rect`,{x:`124`,y:`93`,width:`32`,height:`4`,rx:`1`,fill:`var(--mineral-border, #3a3f47)`}),(0,n.jsx)(`rect`,{x:`124`,y:`101`,width:`28`,height:`4`,rx:`1`,fill:`var(--mineral-border, #3a3f47)`}),(0,n.jsx)(`rect`,{x:`124`,y:`109`,width:`32`,height:`4`,rx:`1`,fill:`var(--illustration-accent)`,opacity:`0.4`}),(0,n.jsx)(`rect`,{x:`124`,y:`117`,width:`24`,height:`4`,rx:`1`,fill:`var(--mineral-border, #3a3f47)`}),(0,n.jsx)(`rect`,{x:`124`,y:`125`,width:`30`,height:`4`,rx:`1`,fill:`var(--mineral-border, #3a3f47)`}),(0,n.jsx)(`ellipse`,{cx:`100`,cy:`100`,rx:`60`,ry:`50`,fill:`var(--illustration-accent)`,opacity:`0.04`})]})}),s=(0,t.forwardRef)(function(e,t){return(0,n.jsxs)(a,{ref:t,viewBox:`0 0 200 200`,...e,children:[(0,n.jsx)(`ellipse`,{cx:`100`,cy:`168`,rx:`52`,ry:`6`,fill:`var(--mineral-border, #3a3f47)`,opacity:`0.3`}),(0,n.jsx)(`path`,{d:`M52 92 L52 154 C52 158 55 161 59 161 L141 161 C145 161 148 158 148 154 L148 92`,fill:`var(--mineral-surface, #1a1d23)`,stroke:`var(--mineral-border, #3a3f47)`,strokeWidth:`2`}),(0,n.jsx)(`rect`,{x:`58`,y:`96`,width:`84`,height:`60`,rx:`2`,fill:`var(--mineral-bg, #13151a)`,opacity:`0.5`}),(0,n.jsx)(`path`,{d:`M48 92 L72 68 L100 82 L52 92 Z`,fill:`var(--mineral-surface, #1a1d23)`,stroke:`var(--mineral-border, #3a3f47)`,strokeWidth:`2`}),(0,n.jsx)(`path`,{d:`M152 92 L128 68 L100 82 L148 92 Z`,fill:`var(--mineral-surface, #1a1d23)`,stroke:`var(--mineral-border, #3a3f47)`,strokeWidth:`2`}),(0,n.jsx)(`path`,{d:`M100 82 L100 92`,stroke:`var(--mineral-border, #3a3f47)`,strokeWidth:`2`}),(0,n.jsx)(`rect`,{x:`52`,y:`92`,width:`96`,height:`4`,fill:`var(--illustration-accent)`,opacity:`0.3`}),(0,n.jsx)(`circle`,{cx:`68`,cy:`50`,r:`2`,fill:`var(--illustration-accent)`,opacity:`0.6`}),(0,n.jsx)(`line`,{x1:`68`,y1:`44`,x2:`68`,y2:`56`,stroke:`var(--illustration-accent)`,strokeWidth:`1`,opacity:`0.4`}),(0,n.jsx)(`line`,{x1:`62`,y1:`50`,x2:`74`,y2:`50`,stroke:`var(--illustration-accent)`,strokeWidth:`1`,opacity:`0.4`}),(0,n.jsx)(`circle`,{cx:`138`,cy:`44`,r:`1.5`,fill:`var(--illustration-accent)`,opacity:`0.5`}),(0,n.jsx)(`line`,{x1:`138`,y1:`39`,x2:`138`,y2:`49`,stroke:`var(--illustration-accent)`,strokeWidth:`1`,opacity:`0.3`}),(0,n.jsx)(`line`,{x1:`133`,y1:`44`,x2:`143`,y2:`44`,stroke:`var(--illustration-accent)`,strokeWidth:`1`,opacity:`0.3`}),(0,n.jsx)(`circle`,{cx:`156`,cy:`72`,r:`1`,fill:`var(--illustration-accent)`,opacity:`0.4`}),(0,n.jsx)(`ellipse`,{cx:`100`,cy:`110`,rx:`50`,ry:`40`,fill:`var(--illustration-accent)`,opacity:`0.04`})]})}),c=(0,t.forwardRef)(function(e,t){return(0,n.jsxs)(a,{ref:t,viewBox:`0 0 200 200`,...e,children:[(0,n.jsx)(`rect`,{x:`28`,y:`32`,width:`144`,height:`136`,rx:`8`,fill:`var(--mineral-surface, #1a1d23)`,stroke:`var(--mineral-border, #3a3f47)`,strokeWidth:`2`}),(0,n.jsx)(`rect`,{x:`28`,y:`32`,width:`144`,height:`20`,rx:`8`,fill:`var(--mineral-surface, #1a1d23)`}),(0,n.jsx)(`rect`,{x:`28`,y:`44`,width:`144`,height:`8`,fill:`var(--mineral-surface, #1a1d23)`}),(0,n.jsx)(`circle`,{cx:`42`,cy:`42`,r:`3`,fill:`var(--mineral-error, #ef4444)`,opacity:`0.8`}),(0,n.jsx)(`circle`,{cx:`52`,cy:`42`,r:`3`,fill:`var(--mineral-warning, #f59e0b)`,opacity:`0.8`}),(0,n.jsx)(`circle`,{cx:`62`,cy:`42`,r:`3`,fill:`var(--mineral-success, #22c55e)`,opacity:`0.8`}),(0,n.jsx)(`rect`,{x:`34`,y:`54`,width:`132`,height:`108`,rx:`2`,fill:`var(--mineral-bg, #13151a)`}),(0,n.jsx)(`path`,{d:`M100 80 L120 114 L80 114 Z`,fill:`none`,stroke:`var(--illustration-accent)`,strokeWidth:`3`,strokeLinejoin:`round`}),(0,n.jsx)(`line`,{x1:`100`,y1:`92`,x2:`100`,y2:`104`,stroke:`var(--illustration-accent)`,strokeWidth:`2.5`,strokeLinecap:`round`}),(0,n.jsx)(`circle`,{cx:`100`,cy:`109`,r:`1.5`,fill:`var(--illustration-accent)`}),(0,n.jsx)(`rect`,{x:`60`,y:`124`,width:`32`,height:`3`,rx:`1`,fill:`var(--mineral-border, #3a3f47)`,opacity:`0.6`}),(0,n.jsx)(`rect`,{x:`108`,y:`124`,width:`18`,height:`3`,rx:`1`,fill:`var(--mineral-border, #3a3f47)`,opacity:`0.4`}),(0,n.jsx)(`rect`,{x:`72`,y:`132`,width:`56`,height:`3`,rx:`1`,fill:`var(--mineral-border, #3a3f47)`,opacity:`0.5`}),(0,n.jsx)(`rect`,{x:`66`,y:`140`,width:`22`,height:`3`,rx:`1`,fill:`var(--mineral-border, #3a3f47)`,opacity:`0.3`}),(0,n.jsx)(`rect`,{x:`96`,y:`140`,width:`38`,height:`3`,rx:`1`,fill:`var(--mineral-border, #3a3f47)`,opacity:`0.3`}),(0,n.jsx)(`ellipse`,{cx:`100`,cy:`100`,rx:`40`,ry:`30`,fill:`var(--illustration-accent)`,opacity:`0.05`})]})}),l=(0,t.forwardRef)(function(e,t){return(0,n.jsxs)(a,{ref:t,viewBox:`0 0 200 200`,...e,children:[(0,n.jsx)(`ellipse`,{cx:`100`,cy:`172`,rx:`54`,ry:`5`,fill:`var(--mineral-border, #3a3f47)`,opacity:`0.25`}),(0,n.jsx)(`rect`,{x:`46`,y:`28`,width:`90`,height:`120`,rx:`4`,fill:`var(--mineral-surface, #1a1d23)`,stroke:`var(--mineral-border, #3a3f47)`,strokeWidth:`2`}),(0,n.jsx)(`path`,{d:`M116 28 L136 28 L136 48 Z`,fill:`var(--mineral-bg, #13151a)`,stroke:`var(--mineral-border, #3a3f47)`,strokeWidth:`1`}),(0,n.jsx)(`rect`,{x:`56`,y:`44`,width:`50`,height:`3`,rx:`1`,fill:`var(--mineral-border, #3a3f47)`,opacity:`0.5`}),(0,n.jsx)(`rect`,{x:`56`,y:`54`,width:`62`,height:`3`,rx:`1`,fill:`var(--mineral-border, #3a3f47)`,opacity:`0.4`}),(0,n.jsx)(`rect`,{x:`56`,y:`64`,width:`44`,height:`3`,rx:`1`,fill:`var(--mineral-border, #3a3f47)`,opacity:`0.3`}),(0,n.jsx)(`path`,{d:`M46 90 L56 86 L66 92 L76 84 L86 90 L96 85 L106 92 L116 86 L126 90 L136 88`,fill:`none`,stroke:`var(--mineral-border, #3a3f47)`,strokeWidth:`1.5`,opacity:`0.5`}),(0,n.jsx)(`text`,{x:`91`,y:`120`,textAnchor:`middle`,fontFamily:`inherit`,fontSize:`28`,fontWeight:`bold`,fill:`var(--illustration-accent)`,opacity:`0.7`,children:`404`}),(0,n.jsx)(`circle`,{cx:`132`,cy:`108`,r:`26`,fill:`var(--mineral-bg, #13151a)`,stroke:`var(--illustration-accent)`,strokeWidth:`3`,opacity:`0.9`}),(0,n.jsx)(`circle`,{cx:`132`,cy:`108`,r:`20`,fill:`none`,stroke:`var(--mineral-border, #3a3f47)`,strokeWidth:`1`,opacity:`0.4`}),(0,n.jsx)(`line`,{x1:`151`,y1:`127`,x2:`164`,y2:`148`,stroke:`var(--illustration-accent)`,strokeWidth:`4`,strokeLinecap:`round`,opacity:`0.8`}),(0,n.jsx)(`text`,{x:`132`,y:`116`,textAnchor:`middle`,fontFamily:`inherit`,fontSize:`22`,fontWeight:`bold`,fill:`var(--mineral-text-secondary, #6b7280)`,opacity:`0.5`,children:`?`}),(0,n.jsx)(`ellipse`,{cx:`100`,cy:`100`,rx:`56`,ry:`46`,fill:`var(--illustration-accent)`,opacity:`0.04`})]})}),u=(0,t.forwardRef)(function(e,t){return(0,n.jsxs)(a,{ref:t,viewBox:`0 0 200 200`,...e,children:[(0,n.jsx)(`circle`,{cx:`100`,cy:`100`,r:`62`,fill:`var(--illustration-accent)`,opacity:`0.06`}),(0,n.jsx)(`circle`,{cx:`100`,cy:`100`,r:`48`,fill:`var(--illustration-accent)`,opacity:`0.04`}),(0,n.jsx)(`circle`,{cx:`100`,cy:`100`,r:`44`,fill:`var(--mineral-surface, #1a1d23)`,stroke:`var(--illustration-accent)`,strokeWidth:`3`}),(0,n.jsx)(`circle`,{cx:`100`,cy:`100`,r:`36`,fill:`none`,stroke:`var(--illustration-accent)`,strokeWidth:`1`,opacity:`0.2`}),(0,n.jsx)(`polyline`,{points:`80,100 94,114 120,86`,fill:`none`,stroke:`var(--illustration-accent)`,strokeWidth:`5`,strokeLinecap:`round`,strokeLinejoin:`round`}),(0,n.jsx)(`rect`,{x:`44`,y:`48`,width:`6`,height:`3`,rx:`1`,fill:`var(--illustration-accent)`,opacity:`0.6`,transform:`rotate(-20 47 49)`}),(0,n.jsx)(`rect`,{x:`148`,y:`56`,width:`5`,height:`3`,rx:`1`,fill:`var(--illustration-accent)`,opacity:`0.5`,transform:`rotate(15 150 57)`}),(0,n.jsx)(`rect`,{x:`52`,y:`142`,width:`6`,height:`3`,rx:`1`,fill:`var(--illustration-accent)`,opacity:`0.4`,transform:`rotate(30 55 143)`}),(0,n.jsx)(`rect`,{x:`142`,y:`136`,width:`5`,height:`3`,rx:`1`,fill:`var(--illustration-accent)`,opacity:`0.5`,transform:`rotate(-10 144 137)`}),(0,n.jsx)(`circle`,{cx:`60`,cy:`66`,r:`2`,fill:`var(--mineral-warning, #f59e0b)`,opacity:`0.5`}),(0,n.jsx)(`circle`,{cx:`150`,cy:`86`,r:`1.5`,fill:`var(--mineral-info, #3b82f6)`,opacity:`0.5`}),(0,n.jsx)(`circle`,{cx:`46`,cy:`112`,r:`1.5`,fill:`var(--mineral-success, #22c55e)`,opacity:`0.5`}),(0,n.jsx)(`circle`,{cx:`156`,cy:`120`,r:`2`,fill:`var(--mineral-warning, #f59e0b)`,opacity:`0.4`}),(0,n.jsx)(`circle`,{cx:`72`,cy:`152`,r:`1.5`,fill:`var(--mineral-info, #3b82f6)`,opacity:`0.4`}),(0,n.jsx)(`circle`,{cx:`132`,cy:`156`,r:`1.5`,fill:`var(--mineral-success, #22c55e)`,opacity:`0.4`}),(0,n.jsx)(`line`,{x1:`100`,y1:`28`,x2:`100`,y2:`36`,stroke:`var(--illustration-accent)`,strokeWidth:`1.5`,opacity:`0.4`,strokeLinecap:`round`}),(0,n.jsx)(`line`,{x1:`96`,y1:`32`,x2:`104`,y2:`32`,stroke:`var(--illustration-accent)`,strokeWidth:`1.5`,opacity:`0.4`,strokeLinecap:`round`})]})}),d=(0,t.forwardRef)(function(e,t){return(0,n.jsxs)(a,{ref:t,viewBox:`0 0 200 200`,...e,children:[(0,n.jsx)(`rect`,{x:`32`,y:`56`,width:`72`,height:`92`,rx:`6`,fill:`var(--mineral-surface, #1a1d23)`,stroke:`var(--mineral-border, #3a3f47)`,strokeWidth:`1.5`}),(0,n.jsx)(`rect`,{x:`40`,y:`68`,width:`36`,height:`3`,rx:`1`,fill:`var(--mineral-text-secondary, #6b7280)`,opacity:`0.5`}),(0,n.jsx)(`rect`,{x:`40`,y:`76`,width:`52`,height:`3`,rx:`1`,fill:`var(--mineral-border, #3a3f47)`,opacity:`0.4`}),(0,n.jsx)(`rect`,{x:`40`,y:`84`,width:`44`,height:`3`,rx:`1`,fill:`var(--mineral-border, #3a3f47)`,opacity:`0.3`}),(0,n.jsx)(`rect`,{x:`40`,y:`96`,width:`56`,height:`24`,rx:`3`,fill:`var(--mineral-bg, #13151a)`,opacity:`0.5`}),(0,n.jsx)(`rect`,{x:`40`,y:`128`,width:`48`,height:`3`,rx:`1`,fill:`var(--mineral-border, #3a3f47)`,opacity:`0.3`}),(0,n.jsx)(`rect`,{x:`96`,y:`72`,width:`72`,height:`92`,rx:`6`,fill:`var(--mineral-surface, #1a1d23)`,stroke:`var(--mineral-border, #3a3f47)`,strokeWidth:`1.5`}),(0,n.jsx)(`rect`,{x:`104`,y:`84`,width:`40`,height:`3`,rx:`1`,fill:`var(--mineral-text-secondary, #6b7280)`,opacity:`0.5`}),(0,n.jsx)(`rect`,{x:`104`,y:`92`,width:`52`,height:`3`,rx:`1`,fill:`var(--mineral-border, #3a3f47)`,opacity:`0.4`}),(0,n.jsx)(`rect`,{x:`104`,y:`100`,width:`36`,height:`3`,rx:`1`,fill:`var(--mineral-border, #3a3f47)`,opacity:`0.3`}),(0,n.jsx)(`rect`,{x:`104`,y:`112`,width:`48`,height:`20`,rx:`3`,fill:`var(--mineral-bg, #13151a)`,opacity:`0.5`}),(0,n.jsx)(`rect`,{x:`104`,y:`140`,width:`42`,height:`3`,rx:`1`,fill:`var(--mineral-border, #3a3f47)`,opacity:`0.3`}),(0,n.jsx)(`rect`,{x:`40`,y:`94`,width:`58`,height:`28`,rx:`3`,fill:`var(--illustration-accent)`,opacity:`0.15`,stroke:`var(--illustration-accent)`,strokeWidth:`1`}),(0,n.jsx)(`circle`,{cx:`120`,cy:`52`,r:`24`,fill:`var(--mineral-bg, #13151a)`,stroke:`var(--illustration-accent)`,strokeWidth:`3`}),(0,n.jsx)(`circle`,{cx:`120`,cy:`52`,r:`16`,fill:`none`,stroke:`var(--illustration-accent)`,strokeWidth:`1`,opacity:`0.25`}),(0,n.jsx)(`line`,{x1:`138`,y1:`69`,x2:`152`,y2:`88`,stroke:`var(--illustration-accent)`,strokeWidth:`5`,strokeLinecap:`round`,opacity:`0.8`}),(0,n.jsx)(`circle`,{cx:`112`,cy:`48`,r:`2`,fill:`var(--illustration-accent)`,opacity:`0.4`}),(0,n.jsx)(`circle`,{cx:`120`,cy:`52`,r:`2`,fill:`var(--illustration-accent)`,opacity:`0.5`}),(0,n.jsx)(`circle`,{cx:`128`,cy:`48`,r:`2`,fill:`var(--illustration-accent)`,opacity:`0.4`}),(0,n.jsx)(`ellipse`,{cx:`100`,cy:`100`,rx:`60`,ry:`50`,fill:`var(--illustration-accent)`,opacity:`0.03`})]})}),f=(0,t.forwardRef)(function(e,t){return(0,n.jsxs)(a,{ref:t,viewBox:`0 0 200 200`,...e,children:[(0,n.jsx)(`ellipse`,{cx:`100`,cy:`162`,rx:`58`,ry:`6`,fill:`var(--mineral-border, #3a3f47)`,opacity:`0.25`}),(0,n.jsx)(`rect`,{x:`30`,y:`60`,width:`140`,height:`96`,rx:`6`,fill:`var(--mineral-surface, #1a1d23)`,stroke:`var(--mineral-border, #3a3f47)`,strokeWidth:`2`}),(0,n.jsx)(`rect`,{x:`42`,y:`52`,width:`116`,height:`70`,rx:`3`,fill:`var(--mineral-bg, #13151a)`}),(0,n.jsx)(`rect`,{x:`54`,y:`64`,width:`60`,height:`3`,rx:`1`,fill:`var(--mineral-text-secondary, #6b7280)`,opacity:`0.5`}),(0,n.jsx)(`rect`,{x:`54`,y:`72`,width:`80`,height:`3`,rx:`1`,fill:`var(--mineral-border, #3a3f47)`,opacity:`0.4`}),(0,n.jsx)(`rect`,{x:`54`,y:`80`,width:`48`,height:`3`,rx:`1`,fill:`var(--mineral-border, #3a3f47)`,opacity:`0.3`}),(0,n.jsx)(`path`,{d:`M30 60 L100 110 L170 60`,fill:`none`,stroke:`var(--mineral-border, #3a3f47)`,strokeWidth:`2`,strokeLinejoin:`round`}),(0,n.jsx)(`path`,{d:`M32 62 L100 108 L168 62 L168 60 C168 57 166 55 163 55 L37 55 C34 55 32 57 32 60 Z`,fill:`var(--mineral-surface, #1a1d23)`}),(0,n.jsx)(`path`,{d:`M32 62 L100 108 L168 62`,fill:`none`,stroke:`var(--illustration-accent)`,strokeWidth:`2`,strokeLinejoin:`round`,opacity:`0.6`}),(0,n.jsx)(`line`,{x1:`30`,y1:`156`,x2:`72`,y2:`120`,stroke:`var(--mineral-border, #3a3f47)`,strokeWidth:`1`,opacity:`0.3`}),(0,n.jsx)(`line`,{x1:`170`,y1:`156`,x2:`128`,y2:`120`,stroke:`var(--mineral-border, #3a3f47)`,strokeWidth:`1`,opacity:`0.3`}),(0,n.jsx)(`circle`,{cx:`156`,cy:`52`,r:`14`,fill:`var(--illustration-accent)`}),(0,n.jsx)(`text`,{x:`156`,y:`57`,textAnchor:`middle`,fontFamily:`inherit`,fontSize:`14`,fontWeight:`bold`,fill:`var(--mineral-text-inverted, #ffffff)`,children:`3`}),(0,n.jsx)(`circle`,{cx:`40`,cy:`40`,r:`1.5`,fill:`var(--illustration-accent)`,opacity:`0.4`}),(0,n.jsx)(`circle`,{cx:`52`,cy:`34`,r:`1`,fill:`var(--illustration-accent)`,opacity:`0.3`}),(0,n.jsx)(`ellipse`,{cx:`100`,cy:`105`,rx:`56`,ry:`40`,fill:`var(--illustration-accent)`,opacity:`0.04`})]})}),p=(0,t.forwardRef)(function(e,t){return(0,n.jsxs)(a,{ref:t,viewBox:`0 0 200 200`,...e,children:[(0,n.jsx)(`ellipse`,{cx:`100`,cy:`104`,rx:`56`,ry:`60`,fill:`var(--illustration-accent)`,opacity:`0.05`}),(0,n.jsx)(`path`,{d:`M100 30 L148 52 C148 52 152 108 100 168 C48 108 52 52 52 52 Z`,fill:`var(--mineral-surface, #1a1d23)`,stroke:`var(--illustration-accent)`,strokeWidth:`2.5`}),(0,n.jsx)(`path`,{d:`M100 42 L140 60 C140 60 143 106 100 158 C57 106 60 60 60 60 Z`,fill:`var(--mineral-bg, #13151a)`,opacity:`0.6`}),(0,n.jsx)(`path`,{d:`M100 42 L140 60 C140 60 141 72 138 86 L100 72 L62 86 C59 72 60 60 60 60 Z`,fill:`var(--illustration-accent)`,opacity:`0.12`}),(0,n.jsx)(`rect`,{x:`84`,y:`96`,width:`32`,height:`28`,rx:`4`,fill:`var(--illustration-accent)`,opacity:`0.85`}),(0,n.jsx)(`path`,{d:`M88 96 L88 84 C88 76 94 70 100 70 C106 70 112 76 112 84 L112 96`,fill:`none`,stroke:`var(--illustration-accent)`,strokeWidth:`3`,strokeLinecap:`round`}),(0,n.jsx)(`circle`,{cx:`100`,cy:`108`,r:`4`,fill:`var(--mineral-bg, #13151a)`}),(0,n.jsx)(`rect`,{x:`98`,y:`110`,width:`4`,height:`8`,rx:`1`,fill:`var(--mineral-bg, #13151a)`}),(0,n.jsx)(`circle`,{cx:`56`,cy:`40`,r:`1.5`,fill:`var(--illustration-accent)`,opacity:`0.3`}),(0,n.jsx)(`circle`,{cx:`144`,cy:`40`,r:`1.5`,fill:`var(--illustration-accent)`,opacity:`0.3`}),(0,n.jsx)(`circle`,{cx:`40`,cy:`80`,r:`1`,fill:`var(--illustration-accent)`,opacity:`0.2`}),(0,n.jsx)(`circle`,{cx:`160`,cy:`80`,r:`1`,fill:`var(--illustration-accent)`,opacity:`0.2`})]})}),m=(0,t.forwardRef)(function(e,t){return(0,n.jsxs)(a,{ref:t,viewBox:`0 0 200 200`,...e,children:[(0,n.jsx)(`circle`,{cx:`76`,cy:`96`,r:`40`,fill:`var(--mineral-surface, #1a1d23)`,stroke:`var(--mineral-border, #3a3f47)`,strokeWidth:`1.5`}),(0,n.jsx)(`path`,{d:`M76 56 A40 40 0 0 1 110 116 L76 96 Z`,fill:`var(--illustration-accent)`,opacity:`0.8`}),(0,n.jsx)(`path`,{d:`M110 116 A40 40 0 0 1 56 124 L76 96 Z`,fill:`var(--mineral-info, #3b82f6)`,opacity:`0.5`}),(0,n.jsx)(`path`,{d:`M56 124 A40 40 0 0 1 44 76 L76 96 Z`,fill:`var(--mineral-warning, #f59e0b)`,opacity:`0.5`}),(0,n.jsx)(`path`,{d:`M44 76 A40 40 0 0 1 76 56 L76 96 Z`,fill:`var(--mineral-border, #3a3f47)`,opacity:`0.5`}),(0,n.jsx)(`circle`,{cx:`76`,cy:`96`,r:`18`,fill:`var(--mineral-bg, #13151a)`}),(0,n.jsx)(`text`,{x:`76`,y:`100`,textAnchor:`middle`,fontFamily:`inherit`,fontSize:`12`,fontWeight:`bold`,fill:`var(--illustration-accent)`,opacity:`0.8`,children:`40%`}),(0,n.jsx)(`rect`,{x:`126`,y:`36`,width:`60`,height:`36`,rx:`4`,fill:`var(--mineral-surface, #1a1d23)`,stroke:`var(--mineral-border, #3a3f47)`,strokeWidth:`1.5`}),(0,n.jsx)(`rect`,{x:`132`,y:`44`,width:`24`,height:`3`,rx:`1`,fill:`var(--mineral-text-secondary, #6b7280)`,opacity:`0.5`}),(0,n.jsx)(`rect`,{x:`132`,y:`52`,width:`32`,height:`5`,rx:`1`,fill:`var(--illustration-accent)`,opacity:`0.7`}),(0,n.jsx)(`rect`,{x:`132`,y:`62`,width:`16`,height:`2`,rx:`1`,fill:`var(--mineral-success, #22c55e)`,opacity:`0.5`}),(0,n.jsx)(`rect`,{x:`126`,y:`82`,width:`60`,height:`36`,rx:`4`,fill:`var(--mineral-surface, #1a1d23)`,stroke:`var(--mineral-border, #3a3f47)`,strokeWidth:`1.5`}),(0,n.jsx)(`rect`,{x:`132`,y:`90`,width:`20`,height:`3`,rx:`1`,fill:`var(--mineral-text-secondary, #6b7280)`,opacity:`0.5`}),(0,n.jsx)(`rect`,{x:`132`,y:`98`,width:`28`,height:`5`,rx:`1`,fill:`var(--mineral-info, #3b82f6)`,opacity:`0.6`}),(0,n.jsx)(`rect`,{x:`132`,y:`108`,width:`18`,height:`2`,rx:`1`,fill:`var(--mineral-warning, #f59e0b)`,opacity:`0.5`}),(0,n.jsx)(`rect`,{x:`34`,y:`148`,width:`140`,height:`32`,rx:`4`,fill:`var(--mineral-surface, #1a1d23)`,stroke:`var(--mineral-border, #3a3f47)`,strokeWidth:`1`}),(0,n.jsx)(`polyline`,{points:`42,170 58,164 74,168 90,158 106,162 122,154 138,156 154,148 166,152`,fill:`none`,stroke:`var(--illustration-accent)`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,opacity:`0.7`}),(0,n.jsx)(`ellipse`,{cx:`100`,cy:`100`,rx:`60`,ry:`50`,fill:`var(--illustration-accent)`,opacity:`0.03`})]})}),h=(0,t.forwardRef)(function(e,t){return(0,n.jsxs)(a,{ref:t,viewBox:`0 0 200 200`,...e,children:[(0,n.jsx)(`ellipse`,{cx:`100`,cy:`176`,rx:`56`,ry:`5`,fill:`var(--mineral-border, #3a3f47)`,opacity:`0.25`}),(0,n.jsx)(`rect`,{x:`32`,y:`36`,width:`136`,height:`132`,rx:`8`,fill:`var(--mineral-surface, #1a1d23)`,stroke:`var(--mineral-border, #3a3f47)`,strokeWidth:`2`}),(0,n.jsx)(`rect`,{x:`32`,y:`36`,width:`136`,height:`28`,rx:`8`,fill:`var(--illustration-accent)`,opacity:`0.15`}),(0,n.jsx)(`rect`,{x:`32`,y:`56`,width:`136`,height:`8`,fill:`var(--illustration-accent)`,opacity:`0.15`}),(0,n.jsx)(`rect`,{x:`60`,y:`30`,width:`8`,height:`16`,rx:`3`,fill:`var(--mineral-border, #3a3f47)`}),(0,n.jsx)(`rect`,{x:`92`,y:`30`,width:`8`,height:`16`,rx:`3`,fill:`var(--mineral-border, #3a3f47)`}),(0,n.jsx)(`rect`,{x:`124`,y:`30`,width:`8`,height:`16`,rx:`3`,fill:`var(--mineral-border, #3a3f47)`}),(0,n.jsx)(`rect`,{x:`56`,y:`44`,width:`44`,height:`5`,rx:`2`,fill:`var(--illustration-accent)`,opacity:`0.7`}),(0,n.jsx)(`rect`,{x:`112`,y:`44`,width:`16`,height:`5`,rx:`2`,fill:`var(--mineral-text-secondary, #6b7280)`,opacity:`0.4`}),[0,1,2,3,4,5,6].map(e=>(0,n.jsx)(`rect`,{x:40+e*18,y:`72`,width:`10`,height:`3`,rx:`1`,fill:`var(--mineral-text-secondary, #6b7280)`,opacity:`0.4`},`dh-${e}`)),[0,1,2,3,4].map(e=>[0,1,2,3,4,5,6].map(t=>{let r=40+t*18,i=84+e*18,a=e===1&&t===3,o=e===2&&t===1||e===3&&t===5;return e===0&&t<2||e===4&&t>3?null:(0,n.jsxs)(`g`,{children:[(0,n.jsx)(`rect`,{x:r,y:i,width:`12`,height:`12`,rx:`3`,fill:a?`var(--illustration-accent)`:`var(--mineral-bg, #13151a)`,opacity:a?.85:.4}),o&&(0,n.jsx)(`circle`,{cx:r+6,cy:i+14,r:`1.5`,fill:`var(--illustration-accent)`,opacity:`0.6`})]},`d-${e}-${t}`)})),(0,n.jsx)(`ellipse`,{cx:`100`,cy:`104`,rx:`52`,ry:`48`,fill:`var(--illustration-accent)`,opacity:`0.03`})]})}),g=(0,t.forwardRef)(function(e,t){let r=(e,t,n,r)=>{let i=n*.7,a=n,o=Math.PI*2/(r*2),s=``;for(let n=0;n<r*2;n++){let r=n%2==0?a:i,c=e+r*Math.cos(n*o-Math.PI/2),l=t+r*Math.sin(n*o-Math.PI/2);s+=`${n===0?`M`:`L`}${c.toFixed(1)},${l.toFixed(1)} `}return s+`Z`};return(0,n.jsxs)(a,{ref:t,viewBox:`0 0 200 200`,...e,children:[(0,n.jsx)(`path`,{d:r(90,88,42,10),fill:`var(--mineral-surface, #1a1d23)`,stroke:`var(--illustration-accent)`,strokeWidth:`2`}),(0,n.jsx)(`circle`,{cx:`90`,cy:`88`,r:`16`,fill:`var(--mineral-bg, #13151a)`}),(0,n.jsx)(`circle`,{cx:`90`,cy:`88`,r:`8`,fill:`var(--illustration-accent)`,opacity:`0.3`}),(0,n.jsx)(`path`,{d:r(140,120,28,8),fill:`var(--mineral-surface, #1a1d23)`,stroke:`var(--illustration-accent)`,strokeWidth:`1.5`,opacity:`0.8`}),(0,n.jsx)(`circle`,{cx:`140`,cy:`120`,r:`10`,fill:`var(--mineral-bg, #13151a)`}),(0,n.jsx)(`circle`,{cx:`140`,cy:`120`,r:`5`,fill:`var(--illustration-accent)`,opacity:`0.25`}),(0,n.jsx)(`path`,{d:r(52,140,18,6),fill:`var(--mineral-surface, #1a1d23)`,stroke:`var(--illustration-accent)`,strokeWidth:`1.5`,opacity:`0.6`}),(0,n.jsx)(`circle`,{cx:`52`,cy:`140`,r:`7`,fill:`var(--mineral-bg, #13151a)`}),(0,n.jsx)(`circle`,{cx:`52`,cy:`140`,r:`3.5`,fill:`var(--illustration-accent)`,opacity:`0.2`}),(0,n.jsx)(`rect`,{x:`120`,y:`44`,width:`40`,height:`18`,rx:`9`,fill:`var(--illustration-accent)`,opacity:`0.3`}),(0,n.jsx)(`circle`,{cx:`148`,cy:`53`,r:`7`,fill:`var(--illustration-accent)`}),(0,n.jsx)(`rect`,{x:`120`,y:`68`,width:`40`,height:`18`,rx:`9`,fill:`var(--mineral-border, #3a3f47)`,opacity:`0.4`}),(0,n.jsx)(`circle`,{cx:`132`,cy:`77`,r:`7`,fill:`var(--mineral-border, #3a3f47)`}),(0,n.jsx)(`rect`,{x:`166`,y:`50`,width:`20`,height:`3`,rx:`1`,fill:`var(--mineral-text-secondary, #6b7280)`,opacity:`0.3`}),(0,n.jsx)(`rect`,{x:`166`,y:`74`,width:`16`,height:`3`,rx:`1`,fill:`var(--mineral-text-secondary, #6b7280)`,opacity:`0.3`}),(0,n.jsx)(`circle`,{cx:`34`,cy:`50`,r:`2`,fill:`var(--illustration-accent)`,opacity:`0.2`}),(0,n.jsx)(`circle`,{cx:`170`,cy:`160`,r:`2`,fill:`var(--illustration-accent)`,opacity:`0.2`}),(0,n.jsx)(`circle`,{cx:`100`,cy:`172`,r:`1.5`,fill:`var(--illustration-accent)`,opacity:`0.15`}),(0,n.jsx)(`ellipse`,{cx:`100`,cy:`100`,rx:`58`,ry:`50`,fill:`var(--illustration-accent)`,opacity:`0.03`})]})}),_=(0,t.forwardRef)(function(e,t){return(0,n.jsxs)(a,{ref:t,viewBox:`0 0 200 200`,...e,children:[(0,n.jsx)(`path`,{d:`M52 108 C32 108 20 92 28 76 C34 62 50 56 64 60 C68 42 86 32 104 36 C120 40 132 52 132 68 C148 66 164 78 162 96 C160 110 148 116 136 114 L52 114 Z`,fill:`var(--mineral-surface, #1a1d23)`,stroke:`var(--mineral-border, #3a3f47)`,strokeWidth:`2`}),(0,n.jsx)(`path`,{d:`M60 106 C44 106 34 94 40 82 C44 72 56 68 66 70 C70 56 84 48 98 50 C112 54 120 62 120 74 C134 72 146 82 144 94 C142 104 134 108 126 106 Z`,fill:`var(--mineral-bg, #13151a)`,opacity:`0.3`}),(0,n.jsx)(`line`,{x1:`94`,y1:`104`,x2:`94`,y2:`68`,stroke:`var(--illustration-accent)`,strokeWidth:`3`,strokeLinecap:`round`}),(0,n.jsx)(`polyline`,{points:`80,82 94,66 108,82`,fill:`none`,stroke:`var(--illustration-accent)`,strokeWidth:`3`,strokeLinecap:`round`,strokeLinejoin:`round`}),(0,n.jsx)(`rect`,{x:`44`,y:`128`,width:`30`,height:`38`,rx:`3`,fill:`var(--mineral-surface, #1a1d23)`,stroke:`var(--mineral-border, #3a3f47)`,strokeWidth:`1.5`}),(0,n.jsx)(`path`,{d:`M62 128 L74 128 L74 140 Z`,fill:`var(--mineral-bg, #13151a)`,stroke:`var(--mineral-border, #3a3f47)`,strokeWidth:`0.5`}),(0,n.jsx)(`rect`,{x:`50`,y:`144`,width:`18`,height:`2`,rx:`1`,fill:`var(--mineral-border, #3a3f47)`,opacity:`0.5`}),(0,n.jsx)(`rect`,{x:`50`,y:`150`,width:`14`,height:`2`,rx:`1`,fill:`var(--mineral-border, #3a3f47)`,opacity:`0.3`}),(0,n.jsx)(`rect`,{x:`50`,y:`156`,width:`16`,height:`2`,rx:`1`,fill:`var(--illustration-accent)`,opacity:`0.3`}),(0,n.jsx)(`rect`,{x:`82`,y:`132`,width:`30`,height:`38`,rx:`3`,fill:`var(--mineral-surface, #1a1d23)`,stroke:`var(--mineral-border, #3a3f47)`,strokeWidth:`1.5`}),(0,n.jsx)(`rect`,{x:`88`,y:`140`,width:`18`,height:`12`,rx:`2`,fill:`var(--illustration-accent)`,opacity:`0.15`}),(0,n.jsx)(`rect`,{x:`88`,y:`156`,width:`14`,height:`2`,rx:`1`,fill:`var(--mineral-border, #3a3f47)`,opacity:`0.4`}),(0,n.jsx)(`rect`,{x:`88`,y:`162`,width:`10`,height:`2`,rx:`1`,fill:`var(--mineral-border, #3a3f47)`,opacity:`0.3`}),(0,n.jsx)(`rect`,{x:`120`,y:`128`,width:`30`,height:`38`,rx:`3`,fill:`var(--mineral-surface, #1a1d23)`,stroke:`var(--mineral-border, #3a3f47)`,strokeWidth:`1.5`}),(0,n.jsx)(`rect`,{x:`126`,y:`136`,width:`18`,height:`2`,rx:`1`,fill:`var(--mineral-border, #3a3f47)`,opacity:`0.5`}),(0,n.jsx)(`rect`,{x:`126`,y:`142`,width:`14`,height:`2`,rx:`1`,fill:`var(--mineral-border, #3a3f47)`,opacity:`0.4`}),(0,n.jsx)(`rect`,{x:`126`,y:`148`,width:`16`,height:`2`,rx:`1`,fill:`var(--mineral-border, #3a3f47)`,opacity:`0.3`}),(0,n.jsx)(`rect`,{x:`126`,y:`154`,width:`12`,height:`2`,rx:`1`,fill:`var(--illustration-accent)`,opacity:`0.3`}),(0,n.jsx)(`circle`,{cx:`86`,cy:`120`,r:`2`,fill:`var(--illustration-accent)`,opacity:`0.5`}),(0,n.jsx)(`circle`,{cx:`94`,cy:`118`,r:`2`,fill:`var(--illustration-accent)`,opacity:`0.7`}),(0,n.jsx)(`circle`,{cx:`102`,cy:`120`,r:`2`,fill:`var(--illustration-accent)`,opacity:`0.4`}),(0,n.jsx)(`ellipse`,{cx:`94`,cy:`90`,rx:`50`,ry:`36`,fill:`var(--illustration-accent)`,opacity:`0.04`})]})}),v=(0,t.forwardRef)(function(e,t){return(0,n.jsxs)(a,{ref:t,viewBox:`0 0 200 200`,...e,children:[(0,n.jsx)(`circle`,{cx:`32`,cy:`36`,r:`1.5`,fill:`var(--mineral-text-secondary, #6b7280)`,opacity:`0.4`}),(0,n.jsx)(`circle`,{cx:`168`,cy:`28`,r:`1`,fill:`var(--mineral-text-secondary, #6b7280)`,opacity:`0.3`}),(0,n.jsx)(`circle`,{cx:`154`,cy:`52`,r:`1.5`,fill:`var(--mineral-text-secondary, #6b7280)`,opacity:`0.35`}),(0,n.jsx)(`circle`,{cx:`46`,cy:`64`,r:`1`,fill:`var(--mineral-text-secondary, #6b7280)`,opacity:`0.3`}),(0,n.jsx)(`circle`,{cx:`172`,cy:`88`,r:`1`,fill:`var(--mineral-text-secondary, #6b7280)`,opacity:`0.25`}),(0,n.jsx)(`path`,{d:`M100 148 C92 160 84 168 78 176 C86 172 94 170 100 170 C106 170 114 172 122 176 C116 168 108 160 100 148 Z`,fill:`var(--mineral-warning, #f59e0b)`,opacity:`0.3`}),(0,n.jsx)(`path`,{d:`M100 140 C96 150 90 158 86 164 C92 162 96 160 100 160 C104 160 108 162 114 164 C110 158 104 150 100 140 Z`,fill:`var(--illustration-accent)`,opacity:`0.4`}),(0,n.jsx)(`rect`,{x:`60`,y:`164`,width:`80`,height:`6`,rx:`3`,fill:`var(--mineral-surface, #1a1d23)`,stroke:`var(--mineral-border, #3a3f47)`,strokeWidth:`1.5`}),(0,n.jsx)(`rect`,{x:`72`,y:`170`,width:`8`,height:`10`,rx:`1`,fill:`var(--mineral-border, #3a3f47)`}),(0,n.jsx)(`rect`,{x:`120`,y:`170`,width:`8`,height:`10`,rx:`1`,fill:`var(--mineral-border, #3a3f47)`}),(0,n.jsx)(`path`,{d:`M88 140 L88 80 C88 60 100 36 100 36 C100 36 112 60 112 80 L112 140 Z`,fill:`var(--mineral-surface, #1a1d23)`,stroke:`var(--mineral-border, #3a3f47)`,strokeWidth:`2`}),(0,n.jsx)(`path`,{d:`M92 80 C92 64 100 42 100 42 C100 42 108 64 108 80 Z`,fill:`var(--illustration-accent)`,opacity:`0.6`}),(0,n.jsx)(`circle`,{cx:`100`,cy:`96`,r:`8`,fill:`var(--mineral-bg, #13151a)`,stroke:`var(--illustration-accent)`,strokeWidth:`1.5`,opacity:`0.8`}),(0,n.jsx)(`circle`,{cx:`98`,cy:`94`,r:`3`,fill:`var(--illustration-accent)`,opacity:`0.15`}),(0,n.jsx)(`rect`,{x:`90`,y:`112`,width:`20`,height:`3`,rx:`1`,fill:`var(--illustration-accent)`,opacity:`0.3`}),(0,n.jsx)(`rect`,{x:`90`,y:`120`,width:`20`,height:`3`,rx:`1`,fill:`var(--illustration-accent)`,opacity:`0.2`}),(0,n.jsx)(`path`,{d:`M88 128 L72 148 L88 142 Z`,fill:`var(--mineral-surface, #1a1d23)`,stroke:`var(--mineral-border, #3a3f47)`,strokeWidth:`1.5`}),(0,n.jsx)(`path`,{d:`M112 128 L128 148 L112 142 Z`,fill:`var(--mineral-surface, #1a1d23)`,stroke:`var(--mineral-border, #3a3f47)`,strokeWidth:`1.5`}),(0,n.jsx)(`line`,{x1:`68`,y1:`72`,x2:`56`,y2:`72`,stroke:`var(--illustration-accent)`,strokeWidth:`1`,strokeLinecap:`round`,opacity:`0.3`}),(0,n.jsx)(`line`,{x1:`64`,y1:`84`,x2:`48`,y2:`84`,stroke:`var(--illustration-accent)`,strokeWidth:`1`,strokeLinecap:`round`,opacity:`0.25`}),(0,n.jsx)(`line`,{x1:`132`,y1:`76`,x2:`148`,y2:`76`,stroke:`var(--illustration-accent)`,strokeWidth:`1`,strokeLinecap:`round`,opacity:`0.3`}),(0,n.jsx)(`line`,{x1:`136`,y1:`88`,x2:`152`,y2:`88`,stroke:`var(--illustration-accent)`,strokeWidth:`1`,strokeLinecap:`round`,opacity:`0.25`}),(0,n.jsx)(`ellipse`,{cx:`100`,cy:`100`,rx:`44`,ry:`56`,fill:`var(--illustration-accent)`,opacity:`0.04`})]})}),y=(0,t.forwardRef)(function(e,t){return(0,n.jsxs)(a,{ref:t,viewBox:`0 0 200 200`,...e,children:[(0,n.jsx)(`line`,{x1:`100`,y1:`80`,x2:`56`,y2:`120`,stroke:`var(--mineral-border, #3a3f47)`,strokeWidth:`1.5`,strokeDasharray:`4 3`,opacity:`0.4`}),(0,n.jsx)(`line`,{x1:`100`,y1:`80`,x2:`144`,y2:`120`,stroke:`var(--mineral-border, #3a3f47)`,strokeWidth:`1.5`,strokeDasharray:`4 3`,opacity:`0.4`}),(0,n.jsx)(`line`,{x1:`100`,y1:`80`,x2:`100`,y2:`148`,stroke:`var(--mineral-border, #3a3f47)`,strokeWidth:`1.5`,strokeDasharray:`4 3`,opacity:`0.4`}),(0,n.jsx)(`line`,{x1:`56`,y1:`120`,x2:`100`,y2:`148`,stroke:`var(--mineral-border, #3a3f47)`,strokeWidth:`1`,strokeDasharray:`4 3`,opacity:`0.25`}),(0,n.jsx)(`line`,{x1:`144`,y1:`120`,x2:`100`,y2:`148`,stroke:`var(--mineral-border, #3a3f47)`,strokeWidth:`1`,strokeDasharray:`4 3`,opacity:`0.25`}),(0,n.jsx)(`circle`,{cx:`100`,cy:`68`,r:`22`,fill:`var(--mineral-surface, #1a1d23)`,stroke:`var(--illustration-accent)`,strokeWidth:`2.5`}),(0,n.jsx)(`circle`,{cx:`100`,cy:`62`,r:`8`,fill:`var(--illustration-accent)`,opacity:`0.5`}),(0,n.jsx)(`path`,{d:`M84 80 C84 72 92 68 100 68 C108 68 116 72 116 80`,fill:`var(--illustration-accent)`,opacity:`0.3`}),(0,n.jsx)(`circle`,{cx:`56`,cy:`120`,r:`18`,fill:`var(--mineral-surface, #1a1d23)`,stroke:`var(--mineral-border, #3a3f47)`,strokeWidth:`2`}),(0,n.jsx)(`circle`,{cx:`56`,cy:`115`,r:`6`,fill:`var(--mineral-info, #3b82f6)`,opacity:`0.5`}),(0,n.jsx)(`path`,{d:`M44 128 C44 122 50 118 56 118 C62 118 68 122 68 128`,fill:`var(--mineral-info, #3b82f6)`,opacity:`0.25`}),(0,n.jsx)(`circle`,{cx:`144`,cy:`120`,r:`18`,fill:`var(--mineral-surface, #1a1d23)`,stroke:`var(--mineral-border, #3a3f47)`,strokeWidth:`2`}),(0,n.jsx)(`circle`,{cx:`144`,cy:`115`,r:`6`,fill:`var(--mineral-success, #22c55e)`,opacity:`0.5`}),(0,n.jsx)(`path`,{d:`M132 128 C132 122 138 118 144 118 C150 118 156 122 156 128`,fill:`var(--mineral-success, #22c55e)`,opacity:`0.25`}),(0,n.jsx)(`circle`,{cx:`100`,cy:`156`,r:`18`,fill:`var(--mineral-surface, #1a1d23)`,stroke:`var(--mineral-border, #3a3f47)`,strokeWidth:`2`}),(0,n.jsx)(`circle`,{cx:`100`,cy:`151`,r:`6`,fill:`var(--mineral-warning, #f59e0b)`,opacity:`0.5`}),(0,n.jsx)(`path`,{d:`M88 164 C88 158 94 154 100 154 C106 154 112 158 112 164`,fill:`var(--mineral-warning, #f59e0b)`,opacity:`0.25`}),(0,n.jsx)(`circle`,{cx:`116`,cy:`84`,r:`4`,fill:`var(--mineral-success, #22c55e)`,opacity:`0.8`}),(0,n.jsx)(`circle`,{cx:`68`,cy:`132`,r:`3`,fill:`var(--mineral-success, #22c55e)`,opacity:`0.7`}),(0,n.jsx)(`circle`,{cx:`156`,cy:`106`,r:`3`,fill:`var(--mineral-border, #3a3f47)`,opacity:`0.5`}),(0,n.jsx)(`circle`,{cx:`112`,cy:`170`,r:`3`,fill:`var(--mineral-success, #22c55e)`,opacity:`0.6`}),(0,n.jsx)(`circle`,{cx:`36`,cy:`80`,r:`1.5`,fill:`var(--illustration-accent)`,opacity:`0.2`}),(0,n.jsx)(`circle`,{cx:`164`,cy:`76`,r:`1.5`,fill:`var(--illustration-accent)`,opacity:`0.2`}),(0,n.jsx)(`circle`,{cx:`36`,cy:`156`,r:`1`,fill:`var(--illustration-accent)`,opacity:`0.15`}),(0,n.jsx)(`circle`,{cx:`164`,cy:`160`,r:`1`,fill:`var(--illustration-accent)`,opacity:`0.15`}),(0,n.jsx)(`ellipse`,{cx:`100`,cy:`110`,rx:`60`,ry:`50`,fill:`var(--illustration-accent)`,opacity:`0.03`})]})}),b=(0,t.forwardRef)(function(e,t){return(0,n.jsxs)(a,{ref:t,viewBox:`0 0 200 200`,...e,children:[(0,n.jsx)(`path`,{d:`M100 32 C100 32 68 40 68 80 L68 108 L56 120 L144 120 L132 108 L132 80 C132 40 100 32 100 32 Z`,fill:`var(--mineral-surface, #1a1d23)`,stroke:`var(--illustration-accent)`,strokeWidth:`2`}),(0,n.jsx)(`path`,{d:`M100 40 C100 40 76 46 76 80 L76 104 L68 112 L132 112 L124 104 L124 80 C124 46 100 40 100 40 Z`,fill:`var(--mineral-bg, #13151a)`,opacity:`0.4`}),(0,n.jsx)(`ellipse`,{cx:`100`,cy:`124`,rx:`12`,ry:`4`,fill:`var(--mineral-surface, #1a1d23)`,stroke:`var(--illustration-accent)`,strokeWidth:`1.5`}),(0,n.jsx)(`circle`,{cx:`100`,cy:`30`,r:`4`,fill:`var(--illustration-accent)`,opacity:`0.7`}),(0,n.jsx)(`path`,{d:`M54 72 C48 78 48 92 54 98`,fill:`none`,stroke:`var(--illustration-accent)`,strokeWidth:`1.5`,strokeLinecap:`round`,opacity:`0.3`}),(0,n.jsx)(`path`,{d:`M46 66 C38 76 38 96 46 106`,fill:`none`,stroke:`var(--illustration-accent)`,strokeWidth:`1.5`,strokeLinecap:`round`,opacity:`0.2`}),(0,n.jsx)(`path`,{d:`M146 72 C152 78 152 92 146 98`,fill:`none`,stroke:`var(--illustration-accent)`,strokeWidth:`1.5`,strokeLinecap:`round`,opacity:`0.3`}),(0,n.jsx)(`path`,{d:`M154 66 C162 76 162 96 154 106`,fill:`none`,stroke:`var(--illustration-accent)`,strokeWidth:`1.5`,strokeLinecap:`round`,opacity:`0.2`}),(0,n.jsx)(`circle`,{cx:`128`,cy:`48`,r:`12`,fill:`var(--illustration-accent)`}),(0,n.jsx)(`text`,{x:`128`,y:`53`,textAnchor:`middle`,fontFamily:`inherit`,fontSize:`12`,fontWeight:`bold`,fill:`var(--mineral-text-inverted, #ffffff)`,children:`5`}),(0,n.jsx)(`rect`,{x:`44`,y:`136`,width:`112`,height:`20`,rx:`4`,fill:`var(--mineral-surface, #1a1d23)`,stroke:`var(--mineral-border, #3a3f47)`,strokeWidth:`1`}),(0,n.jsx)(`circle`,{cx:`58`,cy:`146`,r:`5`,fill:`var(--illustration-accent)`,opacity:`0.4`}),(0,n.jsx)(`rect`,{x:`68`,y:`142`,width:`40`,height:`3`,rx:`1`,fill:`var(--mineral-text-secondary, #6b7280)`,opacity:`0.5`}),(0,n.jsx)(`rect`,{x:`68`,y:`148`,width:`28`,height:`2`,rx:`1`,fill:`var(--mineral-border, #3a3f47)`,opacity:`0.3`}),(0,n.jsx)(`circle`,{cx:`146`,cy:`146`,r:`3`,fill:`var(--illustration-accent)`,opacity:`0.6`}),(0,n.jsx)(`rect`,{x:`50`,y:`160`,width:`100`,height:`18`,rx:`4`,fill:`var(--mineral-surface, #1a1d23)`,stroke:`var(--mineral-border, #3a3f47)`,strokeWidth:`1`,opacity:`0.7`}),(0,n.jsx)(`circle`,{cx:`62`,cy:`169`,r:`4`,fill:`var(--mineral-info, #3b82f6)`,opacity:`0.3`}),(0,n.jsx)(`rect`,{x:`70`,y:`166`,width:`36`,height:`3`,rx:`1`,fill:`var(--mineral-text-secondary, #6b7280)`,opacity:`0.35`}),(0,n.jsx)(`rect`,{x:`70`,y:`172`,width:`24`,height:`2`,rx:`1`,fill:`var(--mineral-border, #3a3f47)`,opacity:`0.2`}),(0,n.jsx)(`ellipse`,{cx:`100`,cy:`90`,rx:`48`,ry:`44`,fill:`var(--illustration-accent)`,opacity:`0.04`})]})}),x=(0,t.forwardRef)(function(e,t){return(0,n.jsxs)(a,{ref:t,viewBox:`0 0 200 200`,...e,children:[(0,n.jsx)(`ellipse`,{cx:`100`,cy:`170`,rx:`56`,ry:`5`,fill:`var(--mineral-border, #3a3f47)`,opacity:`0.25`}),(0,n.jsx)(`rect`,{x:`32`,y:`64`,width:`136`,height:`96`,rx:`8`,fill:`var(--mineral-surface, #1a1d23)`,stroke:`var(--mineral-border, #3a3f47)`,strokeWidth:`2`}),(0,n.jsx)(`path`,{d:`M32 88 L32 72 C32 67.6 35.6 64 40 64 L160 64 C164.4 64 168 67.6 168 72 L168 88`,fill:`var(--mineral-surface, #1a1d23)`,stroke:`var(--mineral-border, #3a3f47)`,strokeWidth:`2`}),(0,n.jsx)(`rect`,{x:`32`,y:`84`,width:`136`,height:`6`,fill:`var(--illustration-accent)`,opacity:`0.15`}),(0,n.jsx)(`rect`,{x:`130`,y:`96`,width:`30`,height:`24`,rx:`4`,fill:`var(--mineral-bg, #13151a)`,stroke:`var(--mineral-border, #3a3f47)`,strokeWidth:`1.5`}),(0,n.jsx)(`circle`,{cx:`145`,cy:`108`,r:`6`,fill:`var(--illustration-accent)`,opacity:`0.5`}),(0,n.jsx)(`circle`,{cx:`145`,cy:`108`,r:`3`,fill:`var(--mineral-bg, #13151a)`}),(0,n.jsx)(`rect`,{x:`42`,y:`40`,width:`80`,height:`50`,rx:`5`,fill:`var(--illustration-accent)`,opacity:`0.7`,transform:`rotate(-6 82 65)`}),(0,n.jsx)(`rect`,{x:`50`,y:`52`,width:`24`,height:`4`,rx:`1`,fill:`var(--mineral-text-inverted, #ffffff)`,opacity:`0.4`,transform:`rotate(-6 62 54)`}),(0,n.jsx)(`rect`,{x:`50`,y:`60`,width:`40`,height:`3`,rx:`1`,fill:`var(--mineral-text-inverted, #ffffff)`,opacity:`0.25`,transform:`rotate(-6 70 62)`}),(0,n.jsx)(`rect`,{x:`96`,y:`44`,width:`16`,height:`12`,rx:`2`,fill:`var(--mineral-text-inverted, #ffffff)`,opacity:`0.15`,transform:`rotate(-6 104 50)`}),(0,n.jsx)(`ellipse`,{cx:`60`,cy:`140`,rx:`14`,ry:`5`,fill:`var(--mineral-warning, #f59e0b)`,opacity:`0.2`}),(0,n.jsx)(`ellipse`,{cx:`60`,cy:`138`,rx:`14`,ry:`5`,fill:`var(--mineral-warning, #f59e0b)`,opacity:`0.3`}),(0,n.jsx)(`ellipse`,{cx:`60`,cy:`136`,rx:`14`,ry:`5`,fill:`var(--mineral-warning, #f59e0b)`,opacity:`0.5`,stroke:`var(--mineral-border, #3a3f47)`,strokeWidth:`0.5`}),(0,n.jsx)(`ellipse`,{cx:`84`,cy:`142`,rx:`12`,ry:`4`,fill:`var(--mineral-warning, #f59e0b)`,opacity:`0.2`}),(0,n.jsx)(`ellipse`,{cx:`84`,cy:`140`,rx:`12`,ry:`4`,fill:`var(--mineral-warning, #f59e0b)`,opacity:`0.4`,stroke:`var(--mineral-border, #3a3f47)`,strokeWidth:`0.5`}),(0,n.jsx)(`text`,{x:`60`,y:`138`,textAnchor:`middle`,fontFamily:`inherit`,fontSize:`7`,fontWeight:`bold`,fill:`var(--mineral-surface, #1a1d23)`,opacity:`0.6`,children:`$`}),(0,n.jsx)(`rect`,{x:`42`,y:`102`,width:`76`,height:`12`,rx:`2`,fill:`var(--mineral-bg, #13151a)`,opacity:`0.5`}),(0,n.jsx)(`rect`,{x:`46`,y:`105`,width:`40`,height:`5`,rx:`1`,fill:`var(--illustration-accent)`,opacity:`0.4`}),(0,n.jsx)(`ellipse`,{cx:`100`,cy:`100`,rx:`56`,ry:`46`,fill:`var(--illustration-accent)`,opacity:`0.03`})]})}),S=(0,t.forwardRef)(function(e,t){return(0,n.jsxs)(a,{ref:t,viewBox:`0 0 200 200`,...e,children:[(0,n.jsx)(`rect`,{x:`32`,y:`40`,width:`100`,height:`42`,rx:`12`,fill:`var(--mineral-surface, #1a1d23)`,stroke:`var(--mineral-border, #3a3f47)`,strokeWidth:`1.5`}),(0,n.jsx)(`path`,{d:`M44 82 L36 94 L52 82`,fill:`var(--mineral-surface, #1a1d23)`,stroke:`var(--mineral-border, #3a3f47)`,strokeWidth:`1.5`}),(0,n.jsx)(`path`,{d:`M45 82 L38 92 L52 82`,fill:`var(--mineral-surface, #1a1d23)`}),(0,n.jsx)(`rect`,{x:`44`,y:`52`,width:`56`,height:`3`,rx:`1`,fill:`var(--mineral-text-secondary, #6b7280)`,opacity:`0.5`}),(0,n.jsx)(`rect`,{x:`44`,y:`60`,width:`72`,height:`3`,rx:`1`,fill:`var(--mineral-border, #3a3f47)`,opacity:`0.4`}),(0,n.jsx)(`rect`,{x:`44`,y:`68`,width:`44`,height:`3`,rx:`1`,fill:`var(--mineral-border, #3a3f47)`,opacity:`0.3`}),(0,n.jsx)(`rect`,{x:`68`,y:`100`,width:`100`,height:`36`,rx:`12`,fill:`var(--illustration-accent)`,opacity:`0.2`}),(0,n.jsx)(`rect`,{x:`68`,y:`100`,width:`100`,height:`36`,rx:`12`,fill:`none`,stroke:`var(--illustration-accent)`,strokeWidth:`1.5`,opacity:`0.5`}),(0,n.jsx)(`path`,{d:`M156 136 L164 148 L148 136`,fill:`var(--illustration-accent)`,opacity:`0.2`}),(0,n.jsx)(`path`,{d:`M156 136 L164 148 L148 136`,fill:`none`,stroke:`var(--illustration-accent)`,strokeWidth:`1.5`,opacity:`0.5`}),(0,n.jsx)(`rect`,{x:`80`,y:`112`,width:`64`,height:`3`,rx:`1`,fill:`var(--illustration-accent)`,opacity:`0.5`}),(0,n.jsx)(`rect`,{x:`80`,y:`120`,width:`48`,height:`3`,rx:`1`,fill:`var(--illustration-accent)`,opacity:`0.35`}),(0,n.jsx)(`rect`,{x:`32`,y:`156`,width:`60`,height:`28`,rx:`14`,fill:`var(--mineral-surface, #1a1d23)`,stroke:`var(--mineral-border, #3a3f47)`,strokeWidth:`1.5`}),(0,n.jsx)(`circle`,{cx:`50`,cy:`170`,r:`3.5`,fill:`var(--mineral-text-secondary, #6b7280)`,opacity:`0.5`}),(0,n.jsx)(`circle`,{cx:`62`,cy:`170`,r:`3.5`,fill:`var(--mineral-text-secondary, #6b7280)`,opacity:`0.4`}),(0,n.jsx)(`circle`,{cx:`74`,cy:`170`,r:`3.5`,fill:`var(--mineral-text-secondary, #6b7280)`,opacity:`0.3`}),(0,n.jsx)(`circle`,{cx:`36`,cy:`28`,r:`10`,fill:`var(--mineral-surface, #1a1d23)`,stroke:`var(--mineral-border, #3a3f47)`,strokeWidth:`1.5`}),(0,n.jsx)(`circle`,{cx:`36`,cy:`25`,r:`3.5`,fill:`var(--mineral-info, #3b82f6)`,opacity:`0.5`}),(0,n.jsx)(`path`,{d:`M30 34 C30 30 33 28 36 28 C39 28 42 30 42 34`,fill:`var(--mineral-info, #3b82f6)`,opacity:`0.25`}),(0,n.jsx)(`circle`,{cx:`164`,cy:`92`,r:`10`,fill:`var(--mineral-surface, #1a1d23)`,stroke:`var(--illustration-accent)`,strokeWidth:`1.5`,opacity:`0.6`}),(0,n.jsx)(`circle`,{cx:`164`,cy:`89`,r:`3.5`,fill:`var(--illustration-accent)`,opacity:`0.4`}),(0,n.jsx)(`path`,{d:`M158 98 C158 94 161 92 164 92 C167 92 170 94 170 98`,fill:`var(--illustration-accent)`,opacity:`0.2`}),(0,n.jsx)(`rect`,{x:`108`,y:`86`,width:`20`,height:`2`,rx:`1`,fill:`var(--mineral-text-secondary, #6b7280)`,opacity:`0.25`}),(0,n.jsx)(`rect`,{x:`72`,y:`150`,width:`20`,height:`2`,rx:`1`,fill:`var(--mineral-text-secondary, #6b7280)`,opacity:`0.25`}),(0,n.jsx)(`ellipse`,{cx:`100`,cy:`110`,rx:`56`,ry:`50`,fill:`var(--illustration-accent)`,opacity:`0.03`})]})}),C=(0,t.forwardRef)(function(e,t){return(0,n.jsxs)(a,{ref:t,viewBox:`0 0 200 200`,...e,children:[(0,n.jsx)(`ellipse`,{cx:`100`,cy:`170`,rx:`66`,ry:`10`,fill:`var(--mineral-border, #3a3f47)`,opacity:`0.18`}),(0,n.jsx)(`rect`,{x:`24`,y:`34`,width:`42`,height:`66`,rx:`8`,fill:`var(--mineral-surface, #1a1d23)`,stroke:`var(--mineral-border, #3a3f47)`,strokeWidth:`1.5`}),(0,n.jsx)(`rect`,{x:`30`,y:`42`,width:`30`,height:`24`,rx:`5`,fill:`var(--illustration-accent)`,opacity:`0.22`}),(0,n.jsx)(`rect`,{x:`30`,y:`74`,width:`20`,height:`4`,rx:`2`,fill:`var(--mineral-text-secondary, #6b7280)`,opacity:`0.7`}),(0,n.jsx)(`rect`,{x:`30`,y:`82`,width:`26`,height:`4`,rx:`2`,fill:`var(--mineral-border, #3a3f47)`,opacity:`0.8`}),(0,n.jsx)(`rect`,{x:`30`,y:`90`,width:`16`,height:`4`,rx:`2`,fill:`var(--illustration-accent)`,opacity:`0.5`}),(0,n.jsx)(`rect`,{x:`76`,y:`28`,width:`50`,height:`40`,rx:`8`,fill:`var(--mineral-surface, #1a1d23)`,stroke:`var(--mineral-border, #3a3f47)`,strokeWidth:`1.5`}),(0,n.jsx)(`rect`,{x:`82`,y:`36`,width:`38`,height:`10`,rx:`4`,fill:`var(--illustration-accent)`,opacity:`0.18`}),(0,n.jsx)(`circle`,{cx:`92`,cy:`54`,r:`3`,fill:`var(--mineral-info, #3b82f6)`,opacity:`0.8`}),(0,n.jsx)(`rect`,{x:`100`,y:`51`,width:`18`,height:`5`,rx:`2`,fill:`var(--mineral-text-secondary, #6b7280)`,opacity:`0.7`}),(0,n.jsx)(`rect`,{x:`82`,y:`60`,width:`30`,height:`3`,rx:`1.5`,fill:`var(--mineral-border, #3a3f47)`,opacity:`0.8`}),(0,n.jsx)(`rect`,{x:`136`,y:`24`,width:`40`,height:`82`,rx:`8`,fill:`var(--mineral-surface, #1a1d23)`,stroke:`var(--mineral-border, #3a3f47)`,strokeWidth:`1.5`}),(0,n.jsx)(`rect`,{x:`142`,y:`32`,width:`28`,height:`34`,rx:`6`,fill:`var(--mineral-info, #3b82f6)`,opacity:`0.12`}),(0,n.jsx)(`path`,{d:`M146 60 L154 50 L160 56 L168 44`,fill:`none`,stroke:`var(--illustration-accent)`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`,opacity:`0.9`}),(0,n.jsx)(`rect`,{x:`142`,y:`74`,width:`18`,height:`4`,rx:`2`,fill:`var(--mineral-text-secondary, #6b7280)`,opacity:`0.7`}),(0,n.jsx)(`rect`,{x:`142`,y:`82`,width:`24`,height:`4`,rx:`2`,fill:`var(--mineral-border, #3a3f47)`,opacity:`0.8`}),(0,n.jsx)(`rect`,{x:`142`,y:`90`,width:`14`,height:`4`,rx:`2`,fill:`var(--illustration-accent)`,opacity:`0.45`}),(0,n.jsx)(`rect`,{x:`24`,y:`110`,width:`42`,height:`34`,rx:`8`,fill:`var(--mineral-surface, #1a1d23)`,stroke:`var(--mineral-border, #3a3f47)`,strokeWidth:`1.5`}),(0,n.jsx)(`rect`,{x:`30`,y:`118`,width:`30`,height:`8`,rx:`4`,fill:`var(--illustration-accent)`,opacity:`0.16`}),(0,n.jsx)(`rect`,{x:`30`,y:`132`,width:`24`,height:`4`,rx:`2`,fill:`var(--mineral-border, #3a3f47)`,opacity:`0.8`}),(0,n.jsx)(`rect`,{x:`76`,y:`78`,width:`50`,height:`74`,rx:`8`,fill:`var(--mineral-surface, #1a1d23)`,stroke:`var(--mineral-border, #3a3f47)`,strokeWidth:`1.5`}),(0,n.jsx)(`rect`,{x:`82`,y:`86`,width:`38`,height:`24`,rx:`6`,fill:`var(--illustration-accent)`,opacity:`0.16`}),(0,n.jsx)(`circle`,{cx:`92`,cy:`98`,r:`4`,fill:`var(--mineral-warning, #f59e0b)`,opacity:`0.75`}),(0,n.jsx)(`rect`,{x:`100`,y:`95`,width:`14`,height:`5`,rx:`2`,fill:`var(--mineral-text-secondary, #6b7280)`,opacity:`0.7`}),(0,n.jsx)(`rect`,{x:`82`,y:`118`,width:`22`,height:`4`,rx:`2`,fill:`var(--mineral-border, #3a3f47)`,opacity:`0.8`}),(0,n.jsx)(`rect`,{x:`82`,y:`126`,width:`30`,height:`4`,rx:`2`,fill:`var(--mineral-border, #3a3f47)`,opacity:`0.8`}),(0,n.jsx)(`rect`,{x:`82`,y:`134`,width:`18`,height:`4`,rx:`2`,fill:`var(--illustration-accent)`,opacity:`0.45`}),(0,n.jsx)(`ellipse`,{cx:`100`,cy:`100`,rx:`74`,ry:`58`,fill:`var(--illustration-accent)`,opacity:`0.035`})]})}),w=(0,t.forwardRef)(function(e,t){return(0,n.jsxs)(a,{ref:t,viewBox:`0 0 200 200`,...e,children:[(0,n.jsx)(`rect`,{x:`42`,y:`34`,width:`116`,height:`126`,rx:`14`,fill:`var(--mineral-surface)`,stroke:`var(--mineral-border)`,strokeWidth:`2`}),(0,n.jsx)(`rect`,{x:`42`,y:`34`,width:`116`,height:`28`,rx:`14`,fill:`var(--illustration-accent)`,opacity:`0.18`}),(0,n.jsx)(`rect`,{x:`58`,y:`26`,width:`10`,height:`20`,rx:`5`,fill:`var(--mineral-text-secondary)`}),(0,n.jsx)(`rect`,{x:`132`,y:`26`,width:`10`,height:`20`,rx:`5`,fill:`var(--mineral-text-secondary)`}),(0,n.jsx)(`rect`,{x:`58`,y:`78`,width:`24`,height:`20`,rx:`6`,fill:`var(--illustration-accent)`,opacity:`0.18`}),(0,n.jsx)(`rect`,{x:`88`,y:`78`,width:`24`,height:`20`,rx:`6`,fill:`var(--mineral-info)`,opacity:`0.12`}),(0,n.jsx)(`rect`,{x:`118`,y:`78`,width:`24`,height:`20`,rx:`6`,fill:`var(--mineral-warning)`,opacity:`0.12`}),(0,n.jsx)(`rect`,{x:`58`,y:`104`,width:`24`,height:`20`,rx:`6`,fill:`var(--mineral-surface-subtle)`,stroke:`var(--mineral-border)`}),(0,n.jsx)(`rect`,{x:`88`,y:`104`,width:`24`,height:`20`,rx:`6`,fill:`var(--mineral-surface-subtle)`,stroke:`var(--mineral-border)`}),(0,n.jsx)(`rect`,{x:`118`,y:`104`,width:`24`,height:`20`,rx:`6`,fill:`var(--illustration-accent)`,opacity:`0.75`}),(0,n.jsx)(`path`,{d:`M124 114 L129 119 L138 108`,stroke:`var(--mineral-dark-color)`,strokeWidth:`3`,strokeLinecap:`round`,strokeLinejoin:`round`}),(0,n.jsx)(`ellipse`,{cx:`100`,cy:`154`,rx:`44`,ry:`8`,fill:`var(--illustration-accent)`,opacity:`0.05`})]})}),T=(0,t.forwardRef)(function(e,t){return(0,n.jsxs)(a,{ref:t,viewBox:`0 0 200 200`,...e,children:[(0,n.jsx)(`rect`,{x:`26`,y:`44`,width:`68`,height:`92`,rx:`12`,fill:`var(--mineral-surface)`,stroke:`var(--mineral-border)`,strokeWidth:`2`}),(0,n.jsx)(`rect`,{x:`106`,y:`44`,width:`68`,height:`92`,rx:`12`,fill:`var(--mineral-surface)`,stroke:`var(--mineral-border)`,strokeWidth:`2`}),(0,n.jsx)(`rect`,{x:`26`,y:`44`,width:`68`,height:`18`,rx:`12`,fill:`var(--illustration-accent)`,opacity:`0.14`}),(0,n.jsx)(`rect`,{x:`106`,y:`44`,width:`68`,height:`18`,rx:`12`,fill:`var(--illustration-accent)`,opacity:`0.14`}),(0,n.jsx)(`rect`,{x:`42`,y:`84`,width:`16`,height:`16`,rx:`5`,fill:`var(--illustration-accent)`,opacity:`0.65`}),(0,n.jsx)(`rect`,{x:`58`,y:`84`,width:`16`,height:`16`,rx:`0`,fill:`var(--illustration-accent)`,opacity:`0.18`}),(0,n.jsx)(`rect`,{x:`74`,y:`84`,width:`16`,height:`16`,rx:`5`,fill:`var(--illustration-accent)`,opacity:`0.65`}),(0,n.jsx)(`rect`,{x:`122`,y:`84`,width:`16`,height:`16`,rx:`5`,fill:`var(--illustration-accent)`,opacity:`0.65`}),(0,n.jsx)(`rect`,{x:`138`,y:`84`,width:`16`,height:`16`,rx:`0`,fill:`var(--illustration-accent)`,opacity:`0.18`}),(0,n.jsx)(`rect`,{x:`154`,y:`84`,width:`16`,height:`16`,rx:`5`,fill:`var(--illustration-accent)`,opacity:`0.65`}),(0,n.jsx)(`path`,{d:`M94 92 H106`,stroke:`var(--illustration-accent)`,strokeWidth:`4`,strokeLinecap:`round`}),(0,n.jsx)(`circle`,{cx:`100`,cy:`92`,r:`6`,fill:`var(--illustration-accent)`}),(0,n.jsx)(`ellipse`,{cx:`100`,cy:`142`,rx:`48`,ry:`9`,fill:`var(--illustration-accent)`,opacity:`0.05`})]})}),E=(0,t.forwardRef)(function(e,t){return(0,n.jsxs)(a,{ref:t,viewBox:`0 0 200 200`,...e,children:[(0,n.jsx)(`rect`,{x:`24`,y:`58`,width:`52`,height:`78`,rx:`12`,fill:`var(--mineral-surface)`,stroke:`var(--mineral-border)`,strokeWidth:`2`}),(0,n.jsx)(`rect`,{x:`74`,y:`40`,width:`52`,height:`96`,rx:`12`,fill:`var(--mineral-surface)`,stroke:`var(--illustration-accent)`,strokeWidth:`2`}),(0,n.jsx)(`rect`,{x:`124`,y:`58`,width:`52`,height:`78`,rx:`12`,fill:`var(--mineral-surface)`,stroke:`var(--mineral-border)`,strokeWidth:`2`}),(0,n.jsx)(`rect`,{x:`34`,y:`70`,width:`32`,height:`26`,rx:`8`,fill:`var(--illustration-accent)`,opacity:`0.14`}),(0,n.jsx)(`rect`,{x:`84`,y:`54`,width:`32`,height:`34`,rx:`8`,fill:`var(--illustration-accent)`,opacity:`0.2`}),(0,n.jsx)(`rect`,{x:`134`,y:`70`,width:`32`,height:`26`,rx:`8`,fill:`var(--illustration-accent)`,opacity:`0.14`}),(0,n.jsx)(`rect`,{x:`84`,y:`98`,width:`20`,height:`6`,rx:`3`,fill:`var(--illustration-accent)`}),(0,n.jsx)(`rect`,{x:`84`,y:`110`,width:`30`,height:`5`,rx:`2.5`,fill:`var(--mineral-text-secondary)`,opacity:`0.7`}),(0,n.jsx)(`ellipse`,{cx:`100`,cy:`148`,rx:`60`,ry:`10`,fill:`var(--illustration-accent)`,opacity:`0.05`})]})}),D=(0,t.forwardRef)(function(e,t){return(0,n.jsxs)(a,{ref:t,viewBox:`0 0 200 200`,...e,children:[(0,n.jsx)(`rect`,{x:`22`,y:`30`,width:`156`,height:`120`,rx:`14`,fill:`var(--mineral-surface)`,stroke:`var(--mineral-border)`,strokeWidth:`2`}),(0,n.jsx)(`path`,{d:`M22 64 H178`,stroke:`var(--mineral-border)`,strokeWidth:`2`}),(0,n.jsx)(`path`,{d:`M74 64 V150`,stroke:`var(--mineral-border)`}),(0,n.jsx)(`path`,{d:`M126 64 V150`,stroke:`var(--mineral-border)`}),(0,n.jsx)(`path`,{d:`M22 94 H178`,stroke:`var(--mineral-border)`}),(0,n.jsx)(`path`,{d:`M22 122 H178`,stroke:`var(--mineral-border)`}),(0,n.jsx)(`rect`,{x:`30`,y:`72`,width:`36`,height:`16`,rx:`6`,fill:`var(--illustration-accent)`,opacity:`0.16`}),(0,n.jsx)(`rect`,{x:`82`,y:`100`,width:`36`,height:`16`,rx:`6`,fill:`var(--illustration-accent)`,opacity:`0.75`}),(0,n.jsx)(`rect`,{x:`134`,y:`128`,width:`34`,height:`14`,rx:`6`,fill:`var(--mineral-info)`,opacity:`0.18`}),(0,n.jsx)(`circle`,{cx:`124`,cy:`108`,r:`5`,fill:`var(--mineral-dark-color)`})]})}),O=(0,t.forwardRef)(function(e,t){return(0,n.jsxs)(a,{ref:t,viewBox:`0 0 200 200`,...e,children:[(0,n.jsx)(`rect`,{x:`22`,y:`34`,width:`156`,height:`116`,rx:`14`,fill:`var(--mineral-surface)`,stroke:`var(--mineral-border)`,strokeWidth:`2`}),(0,n.jsx)(`rect`,{x:`22`,y:`34`,width:`46`,height:`116`,rx:`14`,fill:`var(--illustration-accent)`,opacity:`0.08`}),(0,n.jsx)(`path`,{d:`M68 34 V150`,stroke:`var(--mineral-border)`,strokeWidth:`2`}),(0,n.jsx)(`rect`,{x:`34`,y:`56`,width:`22`,height:`8`,rx:`4`,fill:`var(--illustration-accent)`,opacity:`0.75`}),(0,n.jsx)(`rect`,{x:`34`,y:`74`,width:`18`,height:`6`,rx:`3`,fill:`var(--mineral-text-secondary)`,opacity:`0.7`}),(0,n.jsx)(`rect`,{x:`34`,y:`88`,width:`16`,height:`6`,rx:`3`,fill:`var(--mineral-text-secondary)`,opacity:`0.7`}),(0,n.jsx)(`rect`,{x:`84`,y:`54`,width:`34`,height:`26`,rx:`8`,fill:`var(--illustration-accent)`,opacity:`0.14`}),(0,n.jsx)(`rect`,{x:`126`,y:`54`,width:`34`,height:`26`,rx:`8`,fill:`var(--mineral-info)`,opacity:`0.12`}),(0,n.jsx)(`rect`,{x:`84`,y:`92`,width:`76`,height:`10`,rx:`5`,fill:`var(--mineral-text-secondary)`,opacity:`0.18`}),(0,n.jsx)(`rect`,{x:`84`,y:`110`,width:`58`,height:`10`,rx:`5`,fill:`var(--mineral-text-secondary)`,opacity:`0.18`}),(0,n.jsx)(`rect`,{x:`84`,y:`128`,width:`68`,height:`10`,rx:`5`,fill:`var(--illustration-accent)`,opacity:`0.16`})]})}),k=(0,t.forwardRef)(function(e,t){return(0,n.jsxs)(a,{ref:t,viewBox:`0 0 200 200`,...e,children:[(0,n.jsx)(`circle`,{cx:`84`,cy:`102`,r:`44`,fill:`var(--mineral-surface)`,stroke:`var(--mineral-border)`,strokeWidth:`2`}),(0,n.jsx)(`circle`,{cx:`118`,cy:`76`,r:`16`,fill:`var(--mineral-page-bg)`}),(0,n.jsx)(`circle`,{cx:`72`,cy:`88`,r:`6`,fill:`var(--mineral-page-bg)`}),(0,n.jsx)(`circle`,{cx:`98`,cy:`118`,r:`5`,fill:`var(--mineral-page-bg)`}),(0,n.jsx)(`circle`,{cx:`66`,cy:`118`,r:`4`,fill:`var(--mineral-page-bg)`}),(0,n.jsx)(`rect`,{x:`116`,y:`112`,width:`50`,height:`34`,rx:`10`,fill:`var(--illustration-accent)`,opacity:`0.16`,stroke:`var(--illustration-accent)`,strokeWidth:`2`}),(0,n.jsx)(`path`,{d:`M130 128 L138 136 L152 120`,stroke:`var(--illustration-accent)`,strokeWidth:`4`,strokeLinecap:`round`,strokeLinejoin:`round`})]})}),A=(0,t.forwardRef)(function(e,t){return(0,n.jsxs)(a,{ref:t,viewBox:`0 0 200 200`,...e,children:[(0,n.jsx)(`rect`,{x:`40`,y:`40`,width:`120`,height:`120`,rx:`16`,fill:`var(--mineral-surface)`,stroke:`var(--mineral-border)`,strokeWidth:`2`}),(0,n.jsx)(`rect`,{x:`54`,y:`54`,width:`24`,height:`24`,rx:`5`,fill:`var(--illustration-accent)`}),(0,n.jsx)(`rect`,{x:`122`,y:`54`,width:`24`,height:`24`,rx:`5`,fill:`var(--illustration-accent)`}),(0,n.jsx)(`rect`,{x:`54`,y:`122`,width:`24`,height:`24`,rx:`5`,fill:`var(--illustration-accent)`}),(0,n.jsx)(`rect`,{x:`90`,y:`58`,width:`10`,height:`10`,rx:`2`,fill:`var(--mineral-text-secondary)`}),(0,n.jsx)(`rect`,{x:`104`,y:`58`,width:`10`,height:`10`,rx:`2`,fill:`var(--mineral-text-secondary)`}),(0,n.jsx)(`rect`,{x:`90`,y:`76`,width:`24`,height:`10`,rx:`3`,fill:`var(--mineral-text-secondary)`}),(0,n.jsx)(`rect`,{x:`90`,y:`94`,width:`10`,height:`10`,rx:`2`,fill:`var(--illustration-accent)`,opacity:`0.8`}),(0,n.jsx)(`rect`,{x:`104`,y:`94`,width:`10`,height:`10`,rx:`2`,fill:`var(--mineral-text-secondary)`}),(0,n.jsx)(`rect`,{x:`122`,y:`94`,width:`10`,height:`10`,rx:`2`,fill:`var(--illustration-accent)`,opacity:`0.8`}),(0,n.jsx)(`rect`,{x:`90`,y:`112`,width:`28`,height:`10`,rx:`3`,fill:`var(--mineral-text-secondary)`})]})}),j=(0,t.forwardRef)(function(e,t){return(0,n.jsxs)(a,{ref:t,viewBox:`0 0 200 200`,...e,children:[(0,n.jsx)(`rect`,{x:`34`,y:`44`,width:`132`,height:`90`,rx:`16`,fill:`var(--mineral-surface)`,stroke:`var(--mineral-border)`,strokeWidth:`2`}),(0,n.jsx)(`text`,{x:`100`,y:`96`,textAnchor:`middle`,fontFamily:`inherit`,fontSize:`28`,fontWeight:`700`,fill:`var(--illustration-accent)`,children:`12.4k`}),(0,n.jsx)(`path`,{d:`M58 120 L82 102 L102 110 L124 84 L144 92`,fill:`none`,stroke:`var(--illustration-accent)`,strokeWidth:`4`,strokeLinecap:`round`,strokeLinejoin:`round`}),(0,n.jsx)(`circle`,{cx:`144`,cy:`92`,r:`5`,fill:`var(--illustration-accent)`}),(0,n.jsx)(`rect`,{x:`58`,y:`58`,width:`34`,height:`8`,rx:`4`,fill:`var(--mineral-text-secondary)`,opacity:`0.4`}),(0,n.jsx)(`ellipse`,{cx:`100`,cy:`150`,rx:`44`,ry:`8`,fill:`var(--illustration-accent)`,opacity:`0.05`})]})}),M=(0,t.forwardRef)(function(e,t){return(0,n.jsxs)(a,{ref:t,viewBox:`0 0 200 200`,...e,children:[(0,n.jsx)(`circle`,{cx:`100`,cy:`86`,r:`42`,fill:`var(--mineral-surface)`,stroke:`var(--mineral-border)`,strokeWidth:`2`}),(0,n.jsx)(`circle`,{cx:`100`,cy:`86`,r:`5`,fill:`var(--illustration-accent)`}),(0,n.jsx)(`path`,{d:`M100 86 L100 62`,stroke:`var(--illustration-accent)`,strokeWidth:`5`,strokeLinecap:`round`}),(0,n.jsx)(`path`,{d:`M100 86 L122 98`,stroke:`var(--illustration-accent)`,strokeWidth:`5`,strokeLinecap:`round`}),(0,n.jsx)(`rect`,{x:`58`,y:`142`,width:`84`,height:`14`,rx:`7`,fill:`var(--illustration-accent)`,opacity:`0.14`}),(0,n.jsx)(`text`,{x:`100`,y:`153`,textAnchor:`middle`,fontFamily:`inherit`,fontSize:`12`,fontWeight:`700`,fill:`var(--illustration-accent)`,children:`2 min ago`})]})}),N=(0,t.forwardRef)(function(e,t){return(0,n.jsxs)(a,{ref:t,viewBox:`0 0 200 200`,...e,children:[(0,n.jsx)(`circle`,{cx:`100`,cy:`100`,r:`56`,fill:`var(--illustration-accent)`,opacity:`0.06`}),(0,n.jsx)(`circle`,{cx:`100`,cy:`96`,r:`40`,fill:`var(--mineral-surface)`,stroke:`var(--mineral-border)`,strokeWidth:`2`}),(0,n.jsx)(`ellipse`,{cx:`100`,cy:`96`,rx:`18`,ry:`40`,stroke:`var(--illustration-accent)`,strokeWidth:`2`,opacity:`0.7`}),(0,n.jsx)(`path`,{d:`M60 96 H140`,stroke:`var(--illustration-accent)`,strokeWidth:`2`,opacity:`0.75`}),(0,n.jsx)(`path`,{d:`M66 78 C80 84 120 84 134 78`,stroke:`var(--mineral-text-secondary)`,strokeWidth:`2`,opacity:`0.62`}),(0,n.jsx)(`path`,{d:`M66 114 C80 108 120 108 134 114`,stroke:`var(--mineral-text-secondary)`,strokeWidth:`2`,opacity:`0.62`}),(0,n.jsx)(`rect`,{x:`42`,y:`138`,width:`34`,height:`18`,rx:`6`,fill:`var(--mineral-surface)`,stroke:`var(--mineral-border)`,strokeWidth:`1.5`}),(0,n.jsx)(`rect`,{x:`83`,y:`138`,width:`34`,height:`18`,rx:`6`,fill:`var(--illustration-accent)`,opacity:`0.16`}),(0,n.jsx)(`rect`,{x:`124`,y:`138`,width:`34`,height:`18`,rx:`6`,fill:`var(--mineral-surface)`,stroke:`var(--mineral-border)`,strokeWidth:`1.5`}),(0,n.jsx)(`rect`,{x:`51`,y:`145`,width:`16`,height:`4`,rx:`2`,fill:`var(--mineral-info)`,opacity:`0.8`}),(0,n.jsx)(`rect`,{x:`92`,y:`145`,width:`16`,height:`4`,rx:`2`,fill:`var(--illustration-accent)`,opacity:`0.8`}),(0,n.jsx)(`rect`,{x:`133`,y:`145`,width:`16`,height:`4`,rx:`2`,fill:`var(--mineral-success)`,opacity:`0.8`})]})}),P=(0,t.forwardRef)(function(e,t){return(0,n.jsxs)(a,{ref:t,viewBox:`0 0 200 200`,...e,children:[(0,n.jsx)(`circle`,{cx:`100`,cy:`100`,r:`60`,fill:`var(--illustration-accent)`,opacity:`0.05`}),(0,n.jsx)(`rect`,{x:`42`,y:`46`,width:`42`,height:`42`,rx:`12`,fill:`var(--mineral-surface)`,stroke:`var(--mineral-border)`,strokeWidth:`2`}),(0,n.jsx)(`rect`,{x:`92`,y:`38`,width:`42`,height:`42`,rx:`12`,fill:`var(--mineral-surface)`,stroke:`var(--mineral-border)`,strokeWidth:`2`}),(0,n.jsx)(`rect`,{x:`116`,y:`96`,width:`42`,height:`42`,rx:`12`,fill:`var(--mineral-surface)`,stroke:`var(--mineral-border)`,strokeWidth:`2`}),(0,n.jsx)(`rect`,{x:`58`,y:`104`,width:`42`,height:`42`,rx:`12`,fill:`var(--mineral-surface)`,stroke:`var(--mineral-border)`,strokeWidth:`2`}),(0,n.jsx)(`circle`,{cx:`63`,cy:`67`,r:`8`,fill:`var(--illustration-accent)`,opacity:`0.9`}),(0,n.jsx)(`path`,{d:`M105 58 L110 69 L122 69 L113 76 L117 87 L105 80 L93 87 L97 76 L88 69 L100 69 Z`,fill:`var(--mineral-info)`,opacity:`0.92`}),(0,n.jsx)(`path`,{d:`M137 117 L145 125 L137 133 L129 125 Z`,fill:`var(--mineral-warning)`,opacity:`0.92`}),(0,n.jsx)(`path`,{d:`M69 124 H78 V133 H69 Z M80 135 H89 V144 H80 Z`,fill:`var(--mineral-success)`,opacity:`0.9`})]})}),F=(0,t.forwardRef)(function(e,t){return(0,n.jsxs)(a,{ref:t,viewBox:`0 0 200 200`,...e,children:[(0,n.jsx)(`rect`,{x:`40`,y:`32`,width:`120`,height:`128`,rx:`18`,fill:`var(--mineral-surface)`,stroke:`var(--mineral-border)`,strokeWidth:`2`}),(0,n.jsx)(`rect`,{x:`54`,y:`48`,width:`42`,height:`7`,rx:`3.5`,fill:`var(--mineral-text-secondary)`,opacity:`0.6`}),(0,n.jsx)(`rect`,{x:`54`,y:`64`,width:`92`,height:`16`,rx:`8`,fill:`var(--illustration-accent)`,opacity:`0.16`}),(0,n.jsx)(`rect`,{x:`54`,y:`92`,width:`92`,height:`16`,rx:`8`,fill:`var(--mineral-info)`,opacity:`0.12`}),(0,n.jsx)(`rect`,{x:`54`,y:`120`,width:`56`,height:`16`,rx:`8`,fill:`var(--mineral-success)`,opacity:`0.12`}),(0,n.jsx)(`circle`,{cx:`144`,cy:`128`,r:`12`,fill:`var(--illustration-accent)`,opacity:`0.18`}),(0,n.jsx)(`path`,{d:`M138 128 L142 132 L150 123`,stroke:`var(--illustration-accent)`,strokeWidth:`3`,strokeLinecap:`round`,strokeLinejoin:`round`}),(0,n.jsx)(`ellipse`,{cx:`100`,cy:`174`,rx:`44`,ry:`8`,fill:`var(--illustration-accent)`,opacity:`0.06`})]})}),I=(0,t.forwardRef)(function(e,t){return(0,n.jsxs)(a,{ref:t,viewBox:`0 0 200 200`,...e,children:[(0,n.jsx)(`rect`,{x:`22`,y:`44`,width:`156`,height:`26`,rx:`13`,fill:`var(--mineral-surface)`,stroke:`var(--mineral-border)`,strokeWidth:`2`}),(0,n.jsx)(`rect`,{x:`30`,y:`50`,width:`22`,height:`14`,rx:`7`,fill:`var(--illustration-accent)`,opacity:`0.18`}),(0,n.jsx)(`rect`,{x:`62`,y:`53`,width:`28`,height:`8`,rx:`4`,fill:`var(--mineral-text-secondary)`,opacity:`0.7`}),(0,n.jsx)(`rect`,{x:`100`,y:`53`,width:`28`,height:`8`,rx:`4`,fill:`var(--mineral-text-secondary)`,opacity:`0.7`}),(0,n.jsx)(`rect`,{x:`138`,y:`53`,width:`28`,height:`8`,rx:`4`,fill:`var(--mineral-text-secondary)`,opacity:`0.7`}),(0,n.jsx)(`rect`,{x:`88`,y:`82`,width:`64`,height:`64`,rx:`12`,fill:`var(--mineral-surface)`,stroke:`var(--mineral-border)`,strokeWidth:`2`}),(0,n.jsx)(`rect`,{x:`98`,y:`94`,width:`24`,height:`7`,rx:`3.5`,fill:`var(--illustration-accent)`,opacity:`0.85`}),(0,n.jsx)(`rect`,{x:`98`,y:`108`,width:`42`,height:`6`,rx:`3`,fill:`var(--mineral-text-secondary)`,opacity:`0.58`}),(0,n.jsx)(`rect`,{x:`98`,y:`120`,width:`36`,height:`6`,rx:`3`,fill:`var(--mineral-text-secondary)`,opacity:`0.58`}),(0,n.jsx)(`circle`,{cx:`78`,cy:`57`,r:`4`,fill:`var(--illustration-accent)`})]})}),L=(0,t.forwardRef)(function(e,t){return(0,n.jsxs)(a,{ref:t,viewBox:`0 0 200 200`,...e,children:[(0,n.jsx)(`rect`,{x:`28`,y:`30`,width:`50`,height:`140`,rx:`14`,fill:`var(--mineral-surface)`,stroke:`var(--mineral-border)`,strokeWidth:`2`}),(0,n.jsx)(`rect`,{x:`42`,y:`46`,width:`22`,height:`22`,rx:`7`,fill:`var(--illustration-accent)`,opacity:`0.18`}),(0,n.jsx)(`rect`,{x:`42`,y:`82`,width:`22`,height:`8`,rx:`4`,fill:`var(--mineral-text-secondary)`,opacity:`0.66`}),(0,n.jsx)(`rect`,{x:`42`,y:`100`,width:`22`,height:`8`,rx:`4`,fill:`var(--mineral-text-secondary)`,opacity:`0.52`}),(0,n.jsx)(`rect`,{x:`42`,y:`118`,width:`22`,height:`8`,rx:`4`,fill:`var(--illustration-accent)`,opacity:`0.62`}),(0,n.jsx)(`rect`,{x:`92`,y:`50`,width:`80`,height:`22`,rx:`10`,fill:`var(--mineral-surface)`,stroke:`var(--mineral-border)`,strokeWidth:`2`}),(0,n.jsx)(`rect`,{x:`102`,y:`57`,width:`30`,height:`8`,rx:`4`,fill:`var(--mineral-text-secondary)`,opacity:`0.6`}),(0,n.jsx)(`rect`,{x:`92`,y:`86`,width:`80`,height:`34`,rx:`12`,fill:`var(--illustration-accent)`,opacity:`0.08`}),(0,n.jsx)(`rect`,{x:`102`,y:`98`,width:`46`,height:`7`,rx:`3.5`,fill:`var(--illustration-accent)`,opacity:`0.8`}),(0,n.jsx)(`rect`,{x:`92`,y:`130`,width:`80`,height:`22`,rx:`10`,fill:`var(--mineral-surface)`,stroke:`var(--mineral-border)`,strokeWidth:`2`}),(0,n.jsx)(`rect`,{x:`102`,y:`137`,width:`30`,height:`8`,rx:`4`,fill:`var(--mineral-text-secondary)`,opacity:`0.56`})]})}),R=(0,t.forwardRef)(function(e,t){return(0,n.jsxs)(a,{ref:t,viewBox:`0 0 200 200`,...e,children:[(0,n.jsx)(`rect`,{x:`24`,y:`38`,width:`152`,height:`124`,rx:`16`,fill:`var(--mineral-surface)`,stroke:`var(--mineral-border)`,strokeWidth:`2`}),(0,n.jsx)(`rect`,{x:`36`,y:`52`,width:`128`,height:`14`,rx:`7`,fill:`var(--illustration-accent)`,opacity:`0.14`}),(0,n.jsx)(`rect`,{x:`36`,y:`80`,width:`32`,height:`8`,rx:`4`,fill:`var(--mineral-text-secondary)`,opacity:`0.58`}),(0,n.jsx)(`rect`,{x:`76`,y:`80`,width:`28`,height:`8`,rx:`4`,fill:`var(--mineral-text-secondary)`,opacity:`0.58`}),(0,n.jsx)(`rect`,{x:`112`,y:`80`,width:`24`,height:`8`,rx:`4`,fill:`var(--mineral-text-secondary)`,opacity:`0.58`}),(0,n.jsx)(`rect`,{x:`144`,y:`80`,width:`20`,height:`8`,rx:`4`,fill:`var(--mineral-text-secondary)`,opacity:`0.58`}),(0,n.jsx)(`rect`,{x:`36`,y:`96`,width:`128`,height:`1.5`,fill:`var(--mineral-border)`,opacity:`0.8`}),(0,n.jsx)(`rect`,{x:`36`,y:`110`,width:`56`,height:`8`,rx:`4`,fill:`var(--illustration-accent)`,opacity:`0.7`}),(0,n.jsx)(`rect`,{x:`108`,y:`110`,width:`36`,height:`8`,rx:`4`,fill:`var(--mineral-success)`,opacity:`0.18`}),(0,n.jsx)(`rect`,{x:`36`,y:`128`,width:`48`,height:`8`,rx:`4`,fill:`var(--mineral-text-secondary)`,opacity:`0.52`}),(0,n.jsx)(`rect`,{x:`108`,y:`128`,width:`28`,height:`8`,rx:`4`,fill:`var(--mineral-warning)`,opacity:`0.16`}),(0,n.jsx)(`rect`,{x:`36`,y:`146`,width:`60`,height:`8`,rx:`4`,fill:`var(--mineral-text-secondary)`,opacity:`0.52`}),(0,n.jsx)(`rect`,{x:`108`,y:`146`,width:`24`,height:`8`,rx:`4`,fill:`var(--mineral-info)`,opacity:`0.16`})]})}),z=(0,t.forwardRef)(function(e,t){return(0,n.jsxs)(a,{ref:t,viewBox:`0 0 200 200`,...e,children:[(0,n.jsx)(`rect`,{x:`42`,y:`34`,width:`116`,height:`132`,rx:`18`,fill:`var(--mineral-surface)`,stroke:`var(--mineral-border)`,strokeWidth:`2`}),(0,n.jsx)(`rect`,{x:`58`,y:`58`,width:`12`,height:`12`,rx:`4`,fill:`var(--illustration-accent)`,opacity:`0.16`,stroke:`var(--illustration-accent)`,strokeWidth:`1.5`}),(0,n.jsx)(`path`,{d:`M61 64 L64 67 L69 60`,stroke:`var(--illustration-accent)`,strokeWidth:`2.5`,strokeLinecap:`round`,strokeLinejoin:`round`}),(0,n.jsx)(`rect`,{x:`78`,y:`60`,width:`56`,height:`8`,rx:`4`,fill:`var(--mineral-text-secondary)`,opacity:`0.62`}),(0,n.jsx)(`rect`,{x:`58`,y:`88`,width:`12`,height:`12`,rx:`4`,fill:`var(--mineral-surface)`,stroke:`var(--mineral-border)`,strokeWidth:`1.5`}),(0,n.jsx)(`rect`,{x:`78`,y:`90`,width:`46`,height:`8`,rx:`4`,fill:`var(--mineral-text-secondary)`,opacity:`0.52`}),(0,n.jsx)(`rect`,{x:`58`,y:`118`,width:`12`,height:`12`,rx:`4`,fill:`var(--mineral-surface)`,stroke:`var(--mineral-border)`,strokeWidth:`1.5`}),(0,n.jsx)(`rect`,{x:`78`,y:`120`,width:`62`,height:`8`,rx:`4`,fill:`var(--illustration-accent)`,opacity:`0.7`}),(0,n.jsx)(`ellipse`,{cx:`100`,cy:`178`,rx:`38`,ry:`7`,fill:`var(--illustration-accent)`,opacity:`0.06`})]})}),B=(0,t.forwardRef)(function(e,t){return(0,n.jsxs)(a,{ref:t,viewBox:`0 0 200 200`,...e,children:[(0,n.jsx)(`rect`,{x:`22`,y:`52`,width:`156`,height:`28`,rx:`14`,fill:`var(--mineral-surface)`,stroke:`var(--mineral-border)`,strokeWidth:`2`}),(0,n.jsx)(`rect`,{x:`34`,y:`60`,width:`22`,height:`12`,rx:`6`,fill:`var(--illustration-accent)`,opacity:`0.18`}),(0,n.jsx)(`rect`,{x:`68`,y:`62`,width:`28`,height:`8`,rx:`4`,fill:`var(--mineral-text-secondary)`,opacity:`0.62`}),(0,n.jsx)(`rect`,{x:`108`,y:`62`,width:`28`,height:`8`,rx:`4`,fill:`var(--mineral-text-secondary)`,opacity:`0.62`}),(0,n.jsx)(`rect`,{x:`148`,y:`62`,width:`18`,height:`8`,rx:`4`,fill:`var(--mineral-text-secondary)`,opacity:`0.62`}),(0,n.jsx)(`rect`,{x:`60`,y:`98`,width:`80`,height:`44`,rx:`14`,fill:`var(--illustration-accent)`,opacity:`0.09`}),(0,n.jsx)(`rect`,{x:`74`,y:`114`,width:`24`,height:`7`,rx:`3.5`,fill:`var(--illustration-accent)`,opacity:`0.8`}),(0,n.jsx)(`rect`,{x:`104`,y:`114`,width:`22`,height:`7`,rx:`3.5`,fill:`var(--mineral-text-secondary)`,opacity:`0.5`})]})}),V=(0,t.forwardRef)(function(e,t){return(0,n.jsxs)(a,{ref:t,viewBox:`0 0 200 200`,...e,children:[(0,n.jsx)(`rect`,{x:`30`,y:`38`,width:`52`,height:`52`,rx:`10`,fill:`var(--mineral-surface)`,stroke:`var(--mineral-border)`,strokeWidth:`2`}),(0,n.jsx)(`rect`,{x:`92`,y:`38`,width:`78`,height:`52`,rx:`10`,fill:`var(--mineral-surface)`,stroke:`var(--mineral-border)`,strokeWidth:`2`}),(0,n.jsx)(`rect`,{x:`30`,y:`100`,width:`78`,height:`58`,rx:`10`,fill:`var(--mineral-surface)`,stroke:`var(--mineral-border)`,strokeWidth:`2`}),(0,n.jsx)(`rect`,{x:`118`,y:`100`,width:`52`,height:`58`,rx:`10`,fill:`var(--mineral-surface)`,stroke:`var(--mineral-border)`,strokeWidth:`2`}),(0,n.jsx)(`circle`,{cx:`55`,cy:`60`,r:`8`,fill:`var(--illustration-accent)`,opacity:`0.22`}),(0,n.jsx)(`path`,{d:`M40 78 L56 62 L70 74 L82 64`,stroke:`var(--illustration-accent)`,strokeWidth:`3`,strokeLinecap:`round`,strokeLinejoin:`round`,opacity:`0.8`}),(0,n.jsx)(`path`,{d:`M102 78 L120 58 L138 68 L158 52`,stroke:`var(--illustration-accent)`,strokeWidth:`3`,strokeLinecap:`round`,strokeLinejoin:`round`,opacity:`0.8`}),(0,n.jsx)(`path`,{d:`M44 144 L60 124 L82 136 L96 116`,stroke:`var(--illustration-accent)`,strokeWidth:`3`,strokeLinecap:`round`,strokeLinejoin:`round`,opacity:`0.8`}),(0,n.jsx)(`path`,{d:`M128 144 L140 126 L154 136 L164 120`,stroke:`var(--illustration-accent)`,strokeWidth:`3`,strokeLinecap:`round`,strokeLinejoin:`round`,opacity:`0.8`})]})});Object.defineProperty(exports,`A`,{enumerable:!0,get:function(){return f}}),Object.defineProperty(exports,`C`,{enumerable:!0,get:function(){return y}}),Object.defineProperty(exports,`D`,{enumerable:!0,get:function(){return h}}),Object.defineProperty(exports,`E`,{enumerable:!0,get:function(){return g}}),Object.defineProperty(exports,`F`,{enumerable:!0,get:function(){return s}}),Object.defineProperty(exports,`I`,{enumerable:!0,get:function(){return o}}),Object.defineProperty(exports,`L`,{enumerable:!0,get:function(){return a}}),Object.defineProperty(exports,`M`,{enumerable:!0,get:function(){return u}}),Object.defineProperty(exports,`N`,{enumerable:!0,get:function(){return l}}),Object.defineProperty(exports,`O`,{enumerable:!0,get:function(){return m}}),Object.defineProperty(exports,`P`,{enumerable:!0,get:function(){return c}}),Object.defineProperty(exports,`S`,{enumerable:!0,get:function(){return b}}),Object.defineProperty(exports,`T`,{enumerable:!0,get:function(){return _}}),Object.defineProperty(exports,`_`,{enumerable:!0,get:function(){return T}}),Object.defineProperty(exports,`a`,{enumerable:!0,get:function(){return L}}),Object.defineProperty(exports,`b`,{enumerable:!0,get:function(){return S}}),Object.defineProperty(exports,`c`,{enumerable:!0,get:function(){return P}}),Object.defineProperty(exports,`d`,{enumerable:!0,get:function(){return j}}),Object.defineProperty(exports,`f`,{enumerable:!0,get:function(){return A}}),Object.defineProperty(exports,`g`,{enumerable:!0,get:function(){return E}}),Object.defineProperty(exports,`h`,{enumerable:!0,get:function(){return D}}),Object.defineProperty(exports,`i`,{enumerable:!0,get:function(){return R}}),Object.defineProperty(exports,`j`,{enumerable:!0,get:function(){return d}}),Object.defineProperty(exports,`k`,{enumerable:!0,get:function(){return p}}),Object.defineProperty(exports,`l`,{enumerable:!0,get:function(){return N}}),Object.defineProperty(exports,`m`,{enumerable:!0,get:function(){return O}}),Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return B}}),Object.defineProperty(exports,`o`,{enumerable:!0,get:function(){return I}}),Object.defineProperty(exports,`p`,{enumerable:!0,get:function(){return k}}),Object.defineProperty(exports,`r`,{enumerable:!0,get:function(){return z}}),Object.defineProperty(exports,`s`,{enumerable:!0,get:function(){return F}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return V}}),Object.defineProperty(exports,`u`,{enumerable:!0,get:function(){return M}}),Object.defineProperty(exports,`v`,{enumerable:!0,get:function(){return w}}),Object.defineProperty(exports,`w`,{enumerable:!0,get:function(){return v}}),Object.defineProperty(exports,`x`,{enumerable:!0,get:function(){return x}}),Object.defineProperty(exports,`y`,{enumerable:!0,get:function(){return C}});
|
|
2
|
-
//# sourceMappingURL=MGalleryIllustration-CeOMHzpt.cjs.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
const e=require(`./theme-CyIOdO9W.cjs`),t=require(`./cn-CU5TNITO.cjs`),n=require(`./MText-YIBipYLh.cjs`);let r=require(`react`);function i({level:i=2,tone:a=`default`,hidden:o,color:s,truncate:c,className:l,style:u,children:d,...f}){let p=typeof c==`number`?c:void 0;return(0,r.createElement)(`h${i}`,{className:t.t(`heading`,`h${i}`,!s&&a,c===!0&&`truncate`,p!=null&&`line-clamp`,...n.n({color:s}),l),style:p?{"--line-clamp":p,...u}:u,...e.n(o),...f},d)}Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return i}});
|
|
2
|
-
//# sourceMappingURL=MHeading-CvAYmqMN.cjs.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
let e=require(`react`),t=require(`react/jsx-runtime`);var n=`mineralui-locale`;function r(e){try{return localStorage.getItem(n)??e}catch{return e}}function i(e,t){return t.split(`.`).reduce((e,t)=>typeof e==`object`&&e?e[t]:void 0,e)}var a=(0,e.createContext)(null);function o({locales:o,defaultLocale:s,persist:c=!0,children:l}){let u=(0,e.useMemo)(()=>Object.keys(o),[o]),d=s??u[0]??`en`,[f,p]=(0,e.useState)(()=>{if(c){let e=r(d);if(e in o)return e}return d}),m=(0,e.useCallback)(e=>{if(p(e),c)try{localStorage.setItem(n,e)}catch{}},[c]),h=(0,e.useCallback)(()=>{let e=u[(u.indexOf(f)+1)%u.length];m(e)},[u,f,m]);(0,e.useEffect)(()=>{document.documentElement.lang=f},[f]);let g=o[f]??o[d]??{},_=(0,e.useCallback)((e,t)=>{let n=i(g,e);if(typeof n==`string`)return n;let r=typeof g==`object`&&g&&typeof g.docsTranslations==`object`?g.docsTranslations[e]:void 0;return typeof r==`string`?r:t??e},[g]),v=(0,e.useMemo)(()=>({locale:f,setLocale:m,toggleLocale:h,dict:g,t:_}),[f,m,h,g,_]);return(0,t.jsx)(a.Provider,{value:v,children:l})}function s(){let t=(0,e.useContext)(a);if(!t)throw Error(`useMI18n must be used within MI18nProvider`);return t}function c(){return(0,e.useContext)(a)}Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return s}}),Object.defineProperty(exports,`r`,{enumerable:!0,get:function(){return c}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return o}});
|
|
2
|
-
//# sourceMappingURL=MI18nProvider-4ji0oN3U.cjs.map
|
package/dist/MImage-DqAx0_B0.cjs
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
const e=require(`./theme-CyIOdO9W.cjs`),t=require(`./cn-CU5TNITO.cjs`),n=require(`./useInteractionEffect-DnEfbCrX.cjs`),r=require(`./MSkeleton-BEdflu0F.cjs`);let i=require(`react`),a=require(`react/jsx-runtime`);var o={"1:1":`1 / 1`,"4:3":`4 / 3`,"16:9":`16 / 9`,"21:9":`21 / 9`};function s({fit:s=`cover`,ratio:c=`auto`,hidden:l,rounded:u=!1,bordered:d=!1,shadow:f=!1,clickEffect:p=`none`,fallback:m,skeleton:h=!1,className:g,style:_,alt:v,onError:y,...b}){let[x,S]=(0,i.useState)(!1),{effectClassName:C,effectLayer:w,handlePointerDown:T}=n.t({effect:h?`none`:p}),E=e=>{m&&!x&&(S(!0),e.currentTarget.src=m),y?.(e)},D=c!==`auto`&&!!o[c],O=D?{aspectRatio:o[c],..._}:_;if(h)return(0,a.jsx)(r.t,{variant:`rectangle`,animate:`pulse`,className:t.t(`image-skeleton`,u&&`rounded`,d&&`bordered`,g),style:O,"aria-label":`Loading`,...e.n(l)});let k=t.t(`image`,s,!w&&u&&`rounded`,!w&&d&&`bordered`,!w&&f&&`shadow`);return w?(0,a.jsxs)(`span`,{className:t.t(`image-wrap`,D&&`has-ratio`,u&&`rounded`,d&&`bordered`,f&&`shadow`,C,g),style:O,onPointerDown:T,...e.n(l),children:[w,(0,a.jsx)(`img`,{className:k,onError:E,...b,alt:v??``})]}):(0,a.jsx)(`img`,{className:t.t(k,g),style:O,onError:E,...e.n(l),...b,alt:v??``})}Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return s}});
|
|
2
|
-
//# sourceMappingURL=MImage-DqAx0_B0.cjs.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
const e=require(`./theme-CyIOdO9W.cjs`),t=require(`./cn-CU5TNITO.cjs`),n=require(`./useReveal-B_17PI89.cjs`),r=require(`./layoutProps-Ck4VtGm9.cjs`);let i=require(`react/jsx-runtime`);function a({align:a=`center`,justify:o=`start`,wrap:s=`wrap`,hidden:c,reveal:l,spacing:u,padding:d,fsize:f,mt:p,mb:m,ml:h,mr:g,mx:_,my:v,pt:y,pb:b,pl:x,pr:S,px:C,py:w,fullWidth:T,className:E,style:D,children:O,...k}){let A=r.n({fsize:f}),j=n.t(l);return(0,i.jsx)(`div`,{ref:l!==void 0&&l!==!1?j:void 0,className:t.t(`inline`,a,`justify-${o}`,s,l!==void 0&&l!==!1&&`reveal`,...r.t({spacing:u,padding:d,fsize:f,mt:p,mb:m,ml:h,mr:g,mx:_,my:v,pt:y,pb:b,pl:x,pr:S,px:C,py:w,fullWidth:T}),E),style:{...A,...D},...e.n(c),...k,children:O})}Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return a}});
|
|
2
|
-
//# sourceMappingURL=MInline-FgdIt6kv.cjs.map
|
package/dist/MInput-C_Prnehc.cjs
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
const e=require(`./icons-Dv1T-cF4.cjs`),t=require(`./cn-CU5TNITO.cjs`),n=require(`./useGhostText-QMdO_HK6.cjs`),r=require(`./useInteractionEffect-DnEfbCrX.cjs`),i=require(`./MButton-Rg85cgO1.cjs`);let a=require(`react`),o=require(`react/jsx-runtime`);function s(e){return e==null?``:e.toString()}function c(e,t){let[n,r]=(0,a.useState)(()=>s(t)),i=e!==void 0;return{isControlled:i,currentValue:i?s(e):n,setCurrentValue:(0,a.useCallback)(e=>{i||r(e)},[i])}}var l=(0,a.forwardRef)(function({type:s=`text`,value:l,defaultValue:u,name:d,id:f,placeholder:p,disabled:m=!1,readOnly:h=!1,required:g=!1,autoFocus:_=!1,autoComplete:v,inputMode:y,variant:ee=`outlined`,size:te=`md`,color:b,fullWidth:ne=!1,rounded:re=!1,label:x,helperText:S,errorText:C,startIcon:w,endIcon:T,clearable:E=!1,error:D=!1,success:O=!1,maxLength:k,showCharCount:A=!1,onChange:j,onFocus:M,onBlur:N,onKeyDown:P,onClear:F,ghostOptions:I,ghostMinChars:ie=2,onGhostAccept:L,loading:R=!1,clickEffect:z=`ripple`,rippleColor:B,className:ae,style:oe,inputClassName:V,labelClassName:se},H){let[U,W]=(0,a.useState)(!1),G=(0,a.useRef)(null),{effectClassName:ce,effectLayer:le,handlePointerDown:ue}=r.t({effect:z,disabled:m||h,color:B}),{isControlled:de,currentValue:K,setCurrentValue:q}=c(l,u),J=n.t({options:I??[],value:K,minChars:ie}),Y=D||!!C,fe=K.length>0,X=Y?`color-error`:b?`color-${b}`:void 0,Z=(0,a.useCallback)(e=>{W(!0),M?.(e)},[M]),Q=(0,a.useCallback)(e=>{W(!1),N?.(e)},[N]),$=(0,a.useCallback)(e=>{q(e.target.value),j?.(e),J.reset()},[j,q,J.reset]),pe=(0,a.useCallback)(e=>{if(I&&J.hint&&J.onKeyDown(e)){let e=J.accept();q(e.value),L?.(e.value);let t=H?.current??G.current;t&&((Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,`value`)?.set)?.call(t,e.value),t.dispatchEvent(new Event(`input`,{bubbles:!0})));return}P?.(e)},[I,J,q,L,P,H]),me=(0,a.useCallback)(()=>{q(``);let e=H?.current??G.current;e&&((Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,`value`)?.set)?.call(e,``),e.dispatchEvent(new Event(`input`,{bubbles:!0}))),F?.(),e?.focus()},[F,H,q]),he=t.t(`container`,`field-${ee}`,`field-${te}`,U&&`focused`,Y&&`input-error`,O&&!Y&&`input-success`,X,m&&`disabled`,re&&`rounded`,ce);return(0,o.jsxs)(`div`,{className:t.t(`input`,X,ne&&`full-width`,ae),style:oe,children:[x&&(0,o.jsx)(`label`,{htmlFor:f,className:t.t(`field-label`,U&&`focused`,Y&&`error`,O&&!Y&&`success`,g&&`required`,se),children:x}),(0,o.jsxs)(`div`,{className:he,onPointerDown:ue,children:[le,w&&(0,o.jsx)(`span`,{className:`start-icon`,children:w}),I?(0,o.jsxs)(`div`,{className:`ghost-text-field`,children:[(0,o.jsx)(`input`,{ref:H??G,type:s,value:K,name:d,id:f,placeholder:p,disabled:m,readOnly:h,required:g,autoFocus:_,autoComplete:v??`off`,inputMode:y,maxLength:k,className:t.t(`field`,V),onChange:$,onFocus:Z,onBlur:Q,onKeyDown:pe,"aria-invalid":Y||void 0,"aria-describedby":C?`${f}-error`:S?`${f}-helper`:void 0}),U&&J.hint&&(0,o.jsxs)(`span`,{className:`ghost-text-overlay`,"aria-hidden":`true`,children:[(0,o.jsx)(`span`,{className:`ghost-text-typed`,children:K}),(0,o.jsx)(`span`,{className:`ghost-text-hint`,children:J.hint})]})]}):(0,o.jsx)(`input`,{ref:H??G,type:s,value:K,name:d,id:f,placeholder:p,disabled:m,readOnly:h,required:g,autoFocus:_,autoComplete:v,inputMode:y,maxLength:k,className:t.t(`field`,V),onChange:$,onFocus:Z,onBlur:Q,onKeyDown:P,"aria-invalid":Y||void 0,"aria-describedby":C?`${f}-error`:S?`${f}-helper`:void 0}),R&&(0,o.jsx)(i.r,{size:`sm`,color:b}),E&&fe&&!R&&!m&&(0,o.jsx)(`button`,{type:`button`,className:`clear-btn clear-btn-base`,onClick:me,tabIndex:-1,"aria-label":`Clear input`,children:(0,o.jsx)(e.Ii,{})}),T&&!R&&(0,o.jsx)(`span`,{className:`end-icon`,children:T})]}),(C||S||A)&&(0,o.jsxs)(`div`,{className:`bottom-row`,children:[(0,o.jsxs)(`span`,{children:[C&&(0,o.jsx)(`span`,{id:f?`${f}-error`:void 0,className:`field-error`,role:`alert`,children:C}),!C&&S&&(0,o.jsx)(`span`,{id:f?`${f}-helper`:void 0,className:`field-helper`,children:S})]}),A&&k&&(0,o.jsxs)(`span`,{className:t.t(`char-count`,K.length>k&&`over`),children:[K.length,`/`,k]})]})]})});Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return c}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return l}});
|
|
2
|
-
//# sourceMappingURL=MInput-C_Prnehc.cjs.map
|