@learncard/react 2.5.17 → 2.5.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/base.css +1 -0
- package/dist/base.js +3 -0
- package/dist/cjs/AchievementCard-f0130caa.js +67 -0
- package/dist/cjs/AchievementCard-f0130caa.js.map +1 -0
- package/dist/cjs/ArrowArcLeft.svg +4 -0
- package/dist/cjs/ArrowArcRight.svg +4 -0
- package/dist/cjs/AwardRibbon-14ba45fb.js +33 -0
- package/dist/cjs/AwardRibbon-14ba45fb.js.map +1 -0
- package/dist/cjs/BoostGenericCard-315c6b82.js +77 -0
- package/dist/cjs/BoostGenericCard-315c6b82.js.map +1 -0
- package/dist/cjs/BoostSmallCard-30f75abb.js +117 -0
- package/dist/cjs/BoostSmallCard-30f75abb.js.map +1 -0
- package/dist/cjs/Button-a7af702b.js +18 -0
- package/dist/cjs/Button-a7af702b.js.map +1 -0
- package/dist/cjs/CaretRightFilled.svg +3 -0
- package/dist/cjs/Checkmark-f611aa4d.js +58 -0
- package/dist/cjs/Checkmark-f611aa4d.js.map +1 -0
- package/dist/cjs/CircleCheckButton-43c96841.js +30 -0
- package/dist/cjs/CircleCheckButton-43c96841.js.map +1 -0
- package/dist/cjs/CircleIcon-a45953f5.js +1083 -0
- package/dist/cjs/CircleIcon-a45953f5.js.map +1 -0
- package/dist/cjs/CircleSpinner-093cce04.js +49 -0
- package/dist/cjs/CircleSpinner-093cce04.js.map +1 -0
- package/dist/cjs/CourseCard-338a32ee.js +92 -0
- package/dist/cjs/CourseCard-338a32ee.js.map +1 -0
- package/dist/cjs/CourseVerticalCard-b76f5407.js +98 -0
- package/dist/cjs/CourseVerticalCard-b76f5407.js.map +1 -0
- package/dist/cjs/FlippyCard-209549c5.js +34 -0
- package/dist/cjs/FlippyCard-209549c5.js.map +1 -0
- package/dist/cjs/GenericArrow-8dfb261d.js +27 -0
- package/dist/cjs/GenericArrow-8dfb261d.js.map +1 -0
- package/dist/cjs/GenericCard-9674fcc0.js +61 -0
- package/dist/cjs/GenericCard-9674fcc0.js.map +1 -0
- package/dist/cjs/GreenCheckCircle.svg +4 -0
- package/dist/cjs/JobHistoryCard-05a3f98b.js +43 -0
- package/dist/cjs/JobHistoryCard-05a3f98b.js.map +1 -0
- package/dist/cjs/JobListCard-c662e649.js +127 -0
- package/dist/cjs/JobListCard-c662e649.js.map +1 -0
- package/dist/cjs/LearnCardCreditCardBackFace-87cc8b9f.js +72 -0
- package/dist/cjs/LearnCardCreditCardBackFace-87cc8b9f.js.map +1 -0
- package/dist/cjs/LearnCardCreditCardFrontFace-4452fd7a.js +78 -0
- package/dist/cjs/LearnCardCreditCardFrontFace-4452fd7a.js.map +1 -0
- package/dist/cjs/LearnPill-5c9bf172.js +40 -0
- package/dist/cjs/LearnPill-5c9bf172.js.map +1 -0
- package/dist/cjs/Lightbulb-1c28af02.js +22 -0
- package/dist/cjs/Lightbulb-1c28af02.js.map +1 -0
- package/dist/cjs/MiniVCThumbnail-a78e44f2.js +69 -0
- package/dist/cjs/MiniVCThumbnail-a78e44f2.js.map +1 -0
- package/dist/cjs/Notification-9d230f1b.js +94 -0
- package/dist/cjs/Notification-9d230f1b.js.map +1 -0
- package/dist/cjs/NotificationBoostCard-3b3bd47d.js +121 -0
- package/dist/cjs/NotificationBoostCard-3b3bd47d.js.map +1 -0
- package/dist/cjs/NotificationUserAcceptedBoostCard-423b9320.js +74 -0
- package/dist/cjs/NotificationUserAcceptedBoostCard-423b9320.js.map +1 -0
- package/dist/cjs/NotificationUserCard-d4dab06c.js +94 -0
- package/dist/cjs/NotificationUserCard-d4dab06c.js.map +1 -0
- package/dist/cjs/QRCodeCard-efaa58e1.js +42 -0
- package/dist/cjs/QRCodeCard-efaa58e1.js.map +1 -0
- package/dist/cjs/RedXCircle.svg +5 -0
- package/dist/cjs/RoundedPill-85e7ed68.js +106 -0
- package/dist/cjs/RoundedPill-85e7ed68.js.map +1 -0
- package/dist/cjs/SchoolIDCard-1baf77e8.js +4728 -0
- package/dist/cjs/SchoolIDCard-1baf77e8.js.map +1 -0
- package/dist/cjs/SkillTabCard-14ba0618.js +42 -0
- package/dist/cjs/SkillTabCard-14ba0618.js.map +1 -0
- package/dist/cjs/SkillVerticalCard-3eb3a8e9.js +35 -0
- package/dist/cjs/SkillVerticalCard-3eb3a8e9.js.map +1 -0
- package/dist/cjs/SkillsCard-4b6dbb4f.js +66 -0
- package/dist/cjs/SkillsCard-4b6dbb4f.js.map +1 -0
- package/dist/cjs/SkillsStatsCard-97a35a88.js +77 -0
- package/dist/cjs/SkillsStatsCard-97a35a88.js.map +1 -0
- package/dist/cjs/SmallAchievementCard-c76701ce.js +43 -0
- package/dist/cjs/SmallAchievementCard-c76701ce.js.map +1 -0
- package/dist/cjs/Trophy-9ede7f2b.js +25 -0
- package/dist/cjs/Trophy-9ede7f2b.js.map +1 -0
- package/dist/cjs/User-92f9cf40.js +91 -0
- package/dist/cjs/User-92f9cf40.js.map +1 -0
- package/dist/cjs/VCCard-b2c5eb4a.js +79 -0
- package/dist/cjs/VCCard-b2c5eb4a.js.map +1 -0
- package/dist/cjs/VCDisplayBackFace-8baacc99.js +87 -0
- package/dist/cjs/VCDisplayBackFace-8baacc99.js.map +1 -0
- package/dist/cjs/VCDisplayCard-9ee844a6.js +191 -0
- package/dist/cjs/VCDisplayCard-9ee844a6.js.map +1 -0
- package/dist/cjs/VCDisplayCard2-447b0452.js +1012 -0
- package/dist/cjs/VCDisplayCard2-447b0452.js.map +1 -0
- package/dist/cjs/VCThumbnail-6bf86bb2.js +143 -0
- package/dist/cjs/VCThumbnail-6bf86bb2.js.map +1 -0
- package/dist/cjs/VCVerificationCheck-46fa75d3.js +81 -0
- package/dist/cjs/VCVerificationCheck-46fa75d3.js.map +1 -0
- package/dist/cjs/VCVerificationPill-c6cd574c.js +75 -0
- package/dist/cjs/VCVerificationPill-c6cd574c.js.map +1 -0
- package/dist/cjs/X.svg +4 -0
- package/dist/cjs/YellowWarningCircle.svg +4 -0
- package/dist/cjs/addawardlight.svg +8 -0
- package/dist/cjs/award.svg +3 -0
- package/dist/cjs/badge.png +0 -0
- package/dist/cjs/briefcase.svg +6 -0
- package/dist/cjs/card-chip.svg +26 -0
- package/dist/cjs/coins.svg +3 -0
- package/dist/cjs/constants-35d9ebc6.js +109 -0
- package/dist/cjs/constants-35d9ebc6.js.map +1 -0
- package/dist/cjs/contactless-symbol.svg +3 -0
- package/dist/cjs/credential.helpers-80920a77.js +2188 -0
- package/dist/cjs/credential.helpers-80920a77.js.map +1 -0
- package/dist/cjs/default-face.jpeg +0 -0
- package/dist/cjs/gradcaplight.svg +3 -0
- package/dist/cjs/graduation.svg +3 -0
- package/dist/cjs/icon.green.fat-arrow.png +0 -0
- package/dist/cjs/icons-ac6eb6ec.js +48 -0
- package/dist/cjs/icons-ac6eb6ec.js.map +1 -0
- package/dist/cjs/index-82de573c.js +774 -0
- package/dist/cjs/index-82de573c.js.map +1 -0
- package/dist/cjs/index-83152f8d.js +74 -0
- package/dist/cjs/index-83152f8d.js.map +1 -0
- package/dist/cjs/index-a961acab.js +3538 -0
- package/dist/cjs/index-a961acab.js.map +1 -0
- package/dist/cjs/index-d836b84d.js +51 -0
- package/dist/cjs/index-d836b84d.js.map +1 -0
- package/dist/cjs/index.js +161 -0
- package/dist/cjs/index.js.map +1 -0
- package/dist/cjs/index10.js +11 -0
- package/dist/cjs/index10.js.map +1 -0
- package/dist/cjs/index11.js +36 -0
- package/dist/cjs/index11.js.map +1 -0
- package/dist/cjs/index12.js +161 -0
- package/dist/cjs/index12.js.map +1 -0
- package/dist/cjs/index13.js +12 -0
- package/dist/cjs/index13.js.map +1 -0
- package/dist/cjs/index14.js +24 -0
- package/dist/cjs/index14.js.map +1 -0
- package/dist/cjs/index15.js +12 -0
- package/dist/cjs/index15.js.map +1 -0
- package/dist/cjs/index16.js +14 -0
- package/dist/cjs/index16.js.map +1 -0
- package/dist/cjs/index17.js +23 -0
- package/dist/cjs/index17.js.map +1 -0
- package/dist/cjs/index18.js +11 -0
- package/dist/cjs/index18.js.map +1 -0
- package/dist/cjs/index19.js +12 -0
- package/dist/cjs/index19.js.map +1 -0
- package/dist/cjs/index2.js +37 -0
- package/dist/cjs/index2.js.map +1 -0
- package/dist/cjs/index20.js +17 -0
- package/dist/cjs/index20.js.map +1 -0
- package/dist/cjs/index21.js +19 -0
- package/dist/cjs/index21.js.map +1 -0
- package/dist/cjs/index22.js +15 -0
- package/dist/cjs/index22.js.map +1 -0
- package/dist/cjs/index23.js +17 -0
- package/dist/cjs/index23.js.map +1 -0
- package/dist/cjs/index24.js +12 -0
- package/dist/cjs/index24.js.map +1 -0
- package/dist/cjs/index25.js +24 -0
- package/dist/cjs/index25.js.map +1 -0
- package/dist/cjs/index26.js +40 -0
- package/dist/cjs/index26.js.map +1 -0
- package/dist/cjs/index27.js +11 -0
- package/dist/cjs/index27.js.map +1 -0
- package/dist/cjs/index28.js +12 -0
- package/dist/cjs/index28.js.map +1 -0
- package/dist/cjs/index29.js +12 -0
- package/dist/cjs/index29.js.map +1 -0
- package/dist/cjs/index3.js +36 -0
- package/dist/cjs/index3.js.map +1 -0
- package/dist/cjs/index30.js +25 -0
- package/dist/cjs/index30.js.map +1 -0
- package/dist/cjs/index31.js +12 -0
- package/dist/cjs/index31.js.map +1 -0
- package/dist/cjs/index32.js +12 -0
- package/dist/cjs/index32.js.map +1 -0
- package/dist/cjs/index33.js +24 -0
- package/dist/cjs/index33.js.map +1 -0
- package/dist/cjs/index34.js +31 -0
- package/dist/cjs/index34.js.map +1 -0
- package/dist/cjs/index35.js +22 -0
- package/dist/cjs/index35.js.map +1 -0
- package/dist/cjs/index36.js +26 -0
- package/dist/cjs/index36.js.map +1 -0
- package/dist/cjs/index37.js +20 -0
- package/dist/cjs/index37.js.map +1 -0
- package/dist/cjs/index38.js +10 -0
- package/dist/cjs/index38.js.map +1 -0
- package/dist/cjs/index39.js +13 -0
- package/dist/cjs/index39.js.map +1 -0
- package/dist/cjs/index4.js +39 -0
- package/dist/cjs/index4.js.map +1 -0
- package/dist/cjs/index40.js +15 -0
- package/dist/cjs/index40.js.map +1 -0
- package/dist/cjs/index41.js +15 -0
- package/dist/cjs/index41.js.map +1 -0
- package/dist/cjs/index5.js +11 -0
- package/dist/cjs/index5.js.map +1 -0
- package/dist/cjs/index6.js +24 -0
- package/dist/cjs/index6.js.map +1 -0
- package/dist/cjs/index7.js +24 -0
- package/dist/cjs/index7.js.map +1 -0
- package/dist/cjs/index8.js +15 -0
- package/dist/cjs/index8.js.map +1 -0
- package/dist/cjs/index9.js +27 -0
- package/dist/cjs/index9.js.map +1 -0
- package/dist/cjs/lhplaceholder.png +0 -0
- package/dist/cjs/lightbulb.svg +3 -0
- package/dist/cjs/master-card-logo.svg +20 -0
- package/dist/cjs/minigradcapcolored.svg +3 -0
- package/dist/cjs/minijob.svg +5 -0
- package/dist/cjs/minipuzzle.svg +3 -0
- package/dist/cjs/minipuzzlecolored.svg +3 -0
- package/dist/cjs/minitrophy.svg +3 -0
- package/dist/cjs/minitrophycolored.svg +3 -0
- package/dist/cjs/notifications-56c6fc94.js +21 -0
- package/dist/cjs/notifications-56c6fc94.js.map +1 -0
- package/dist/cjs/skillgraph.svg +29 -0
- package/dist/cjs/skillplaceholder.png +0 -0
- package/dist/cjs/social-badge.png +0 -0
- package/dist/cjs/trophy.svg +3 -0
- package/dist/cjs/types-c83b33ec.js +115 -0
- package/dist/cjs/types-c83b33ec.js.map +1 -0
- package/dist/cjs/types-e4d9a257.js +25 -0
- package/dist/cjs/types-e4d9a257.js.map +1 -0
- package/dist/cjs/types.esm-b81dff62.js +4080 -0
- package/dist/cjs/types.esm-b81dff62.js.map +1 -0
- package/dist/cjs/user.svg +4 -0
- package/dist/cjs/vc.check.svg +10 -0
- package/dist/cjs/verified-check.png +0 -0
- package/dist/cjs/walletTrophy.webp +0 -0
- package/dist/cjs/walletcurrency.webp +0 -0
- package/dist/cjs/walletids.webp +0 -0
- package/dist/cjs/walletjobhistory.webp +0 -0
- package/dist/cjs/walletlearninghistory.webp +0 -0
- package/dist/cjs/walletskills.webp +0 -0
- package/dist/esm/AchievementCard-b9eb551c.js +61 -0
- package/dist/esm/AchievementCard-b9eb551c.js.map +1 -0
- package/dist/esm/ArrowArcLeft.svg +4 -0
- package/dist/esm/ArrowArcRight.svg +4 -0
- package/dist/esm/AwardRibbon-3e682281.js +27 -0
- package/dist/esm/AwardRibbon-3e682281.js.map +1 -0
- package/dist/esm/BoostGenericCard-9c14e541.js +71 -0
- package/dist/esm/BoostGenericCard-9c14e541.js.map +1 -0
- package/dist/esm/BoostSmallCard-e42ec5ed.js +108 -0
- package/dist/esm/BoostSmallCard-e42ec5ed.js.map +1 -0
- package/dist/esm/Button-5f805204.js +12 -0
- package/dist/esm/Button-5f805204.js.map +1 -0
- package/dist/esm/CaretRightFilled.svg +3 -0
- package/dist/esm/Checkmark-d8b8f43d.js +52 -0
- package/dist/esm/Checkmark-d8b8f43d.js.map +1 -0
- package/dist/esm/CircleCheckButton-551054f6.js +24 -0
- package/dist/esm/CircleCheckButton-551054f6.js.map +1 -0
- package/dist/esm/CircleIcon-38b874e2.js +1076 -0
- package/dist/esm/CircleIcon-38b874e2.js.map +1 -0
- package/dist/esm/CircleSpinner-9b8b1a6b.js +42 -0
- package/dist/esm/CircleSpinner-9b8b1a6b.js.map +1 -0
- package/dist/esm/CourseCard-663ff174.js +82 -0
- package/dist/esm/CourseCard-663ff174.js.map +1 -0
- package/dist/esm/CourseVerticalCard-922a0860.js +88 -0
- package/dist/esm/CourseVerticalCard-922a0860.js.map +1 -0
- package/dist/esm/FlippyCard-a2de5cf1.js +28 -0
- package/dist/esm/FlippyCard-a2de5cf1.js.map +1 -0
- package/dist/esm/GenericArrow-0dba1707.js +21 -0
- package/dist/esm/GenericArrow-0dba1707.js.map +1 -0
- package/dist/esm/GenericCard-eaab7759.js +55 -0
- package/dist/esm/GenericCard-eaab7759.js.map +1 -0
- package/dist/esm/GreenCheckCircle.svg +4 -0
- package/dist/esm/JobHistoryCard-80d4ef27.js +37 -0
- package/dist/esm/JobHistoryCard-80d4ef27.js.map +1 -0
- package/dist/esm/JobListCard-5e3879ea.js +120 -0
- package/dist/esm/JobListCard-5e3879ea.js.map +1 -0
- package/dist/esm/LearnCardCreditCardBackFace-9baa9e6b.js +65 -0
- package/dist/esm/LearnCardCreditCardBackFace-9baa9e6b.js.map +1 -0
- package/dist/esm/LearnCardCreditCardFrontFace-cf793917.js +70 -0
- package/dist/esm/LearnCardCreditCardFrontFace-cf793917.js.map +1 -0
- package/dist/esm/LearnPill-3d9564d4.js +34 -0
- package/dist/esm/LearnPill-3d9564d4.js.map +1 -0
- package/dist/esm/Lightbulb-a3c1679f.js +16 -0
- package/dist/esm/Lightbulb-a3c1679f.js.map +1 -0
- package/dist/esm/MiniVCThumbnail-6a07e810.js +62 -0
- package/dist/esm/MiniVCThumbnail-6a07e810.js.map +1 -0
- package/dist/esm/Notification-0f58ef6a.js +88 -0
- package/dist/esm/Notification-0f58ef6a.js.map +1 -0
- package/dist/esm/NotificationBoostCard-134edf94.js +112 -0
- package/dist/esm/NotificationBoostCard-134edf94.js.map +1 -0
- package/dist/esm/NotificationUserAcceptedBoostCard-8c13bd3f.js +66 -0
- package/dist/esm/NotificationUserAcceptedBoostCard-8c13bd3f.js.map +1 -0
- package/dist/esm/NotificationUserCard-dbcc80f9.js +86 -0
- package/dist/esm/NotificationUserCard-dbcc80f9.js.map +1 -0
- package/dist/esm/QRCodeCard-c57e2067.js +36 -0
- package/dist/esm/QRCodeCard-c57e2067.js.map +1 -0
- package/dist/esm/RedXCircle.svg +5 -0
- package/dist/esm/RoundedPill-731211b3.js +99 -0
- package/dist/esm/RoundedPill-731211b3.js.map +1 -0
- package/dist/esm/SchoolIDCard-3b746226.js +4722 -0
- package/dist/esm/SchoolIDCard-3b746226.js.map +1 -0
- package/dist/esm/SkillTabCard-d86c6452.js +36 -0
- package/dist/esm/SkillTabCard-d86c6452.js.map +1 -0
- package/dist/esm/SkillVerticalCard-108f49bb.js +28 -0
- package/dist/esm/SkillVerticalCard-108f49bb.js.map +1 -0
- package/dist/esm/SkillsCard-92a51db2.js +59 -0
- package/dist/esm/SkillsCard-92a51db2.js.map +1 -0
- package/dist/esm/SkillsStatsCard-1628fe9c.js +70 -0
- package/dist/esm/SkillsStatsCard-1628fe9c.js.map +1 -0
- package/dist/esm/SmallAchievementCard-2d87ac82.js +37 -0
- package/dist/esm/SmallAchievementCard-2d87ac82.js.map +1 -0
- package/dist/esm/Trophy-702610b8.js +19 -0
- package/dist/esm/Trophy-702610b8.js.map +1 -0
- package/dist/esm/User-fd276ad5.js +82 -0
- package/dist/esm/User-fd276ad5.js.map +1 -0
- package/dist/esm/VCCard-0f8604e0.js +73 -0
- package/dist/esm/VCCard-0f8604e0.js.map +1 -0
- package/dist/esm/VCDisplayBackFace-52e1bef4.js +80 -0
- package/dist/esm/VCDisplayBackFace-52e1bef4.js.map +1 -0
- package/dist/esm/VCDisplayCard-140873eb.js +183 -0
- package/dist/esm/VCDisplayCard-140873eb.js.map +1 -0
- package/dist/esm/VCDisplayCard2-c1bbc53a.js +1005 -0
- package/dist/esm/VCDisplayCard2-c1bbc53a.js.map +1 -0
- package/dist/esm/VCThumbnail-3c254bda.js +135 -0
- package/dist/esm/VCThumbnail-3c254bda.js.map +1 -0
- package/dist/esm/VCVerificationCheck-80249524.js +72 -0
- package/dist/esm/VCVerificationCheck-80249524.js.map +1 -0
- package/dist/esm/VCVerificationPill-3433630e.js +65 -0
- package/dist/esm/VCVerificationPill-3433630e.js.map +1 -0
- package/dist/esm/X.svg +4 -0
- package/dist/esm/YellowWarningCircle.svg +4 -0
- package/dist/esm/addawardlight.svg +8 -0
- package/dist/esm/award.svg +3 -0
- package/dist/esm/badge.png +0 -0
- package/dist/esm/briefcase.svg +6 -0
- package/dist/esm/card-chip.svg +26 -0
- package/dist/esm/coins.svg +3 -0
- package/dist/esm/constants-db0e356b.js +89 -0
- package/dist/esm/constants-db0e356b.js.map +1 -0
- package/dist/esm/contactless-symbol.svg +3 -0
- package/dist/esm/credential.helpers-8ab3479c.js +2182 -0
- package/dist/esm/credential.helpers-8ab3479c.js.map +1 -0
- package/dist/esm/default-face.jpeg +0 -0
- package/dist/esm/gradcaplight.svg +3 -0
- package/dist/esm/graduation.svg +3 -0
- package/dist/esm/icon.green.fat-arrow.png +0 -0
- package/dist/esm/icons-9d160530.js +32 -0
- package/dist/esm/icons-9d160530.js.map +1 -0
- package/dist/esm/index-7103ad3c.js +46 -0
- package/dist/esm/index-7103ad3c.js.map +1 -0
- package/dist/esm/index-7dcfe90e.js +56 -0
- package/dist/esm/index-7dcfe90e.js.map +1 -0
- package/dist/esm/index-aa1098e1.js +768 -0
- package/dist/esm/index-aa1098e1.js.map +1 -0
- package/dist/esm/index-e1f279c6.js +3529 -0
- package/dist/esm/index-e1f279c6.js.map +1 -0
- package/dist/esm/index.js +96 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/index10.js +3 -0
- package/dist/esm/index10.js.map +1 -0
- package/dist/esm/index11.js +28 -0
- package/dist/esm/index11.js.map +1 -0
- package/dist/esm/index12.js +96 -0
- package/dist/esm/index12.js.map +1 -0
- package/dist/esm/index13.js +4 -0
- package/dist/esm/index13.js.map +1 -0
- package/dist/esm/index14.js +15 -0
- package/dist/esm/index14.js.map +1 -0
- package/dist/esm/index15.js +4 -0
- package/dist/esm/index15.js.map +1 -0
- package/dist/esm/index16.js +6 -0
- package/dist/esm/index16.js.map +1 -0
- package/dist/esm/index17.js +15 -0
- package/dist/esm/index17.js.map +1 -0
- package/dist/esm/index18.js +3 -0
- package/dist/esm/index18.js.map +1 -0
- package/dist/esm/index19.js +4 -0
- package/dist/esm/index19.js.map +1 -0
- package/dist/esm/index2.js +29 -0
- package/dist/esm/index2.js.map +1 -0
- package/dist/esm/index20.js +8 -0
- package/dist/esm/index20.js.map +1 -0
- package/dist/esm/index21.js +11 -0
- package/dist/esm/index21.js.map +1 -0
- package/dist/esm/index22.js +7 -0
- package/dist/esm/index22.js.map +1 -0
- package/dist/esm/index23.js +8 -0
- package/dist/esm/index23.js.map +1 -0
- package/dist/esm/index24.js +4 -0
- package/dist/esm/index24.js.map +1 -0
- package/dist/esm/index25.js +15 -0
- package/dist/esm/index25.js.map +1 -0
- package/dist/esm/index26.js +28 -0
- package/dist/esm/index26.js.map +1 -0
- package/dist/esm/index27.js +3 -0
- package/dist/esm/index27.js.map +1 -0
- package/dist/esm/index28.js +3 -0
- package/dist/esm/index28.js.map +1 -0
- package/dist/esm/index29.js +4 -0
- package/dist/esm/index29.js.map +1 -0
- package/dist/esm/index3.js +28 -0
- package/dist/esm/index3.js.map +1 -0
- package/dist/esm/index30.js +17 -0
- package/dist/esm/index30.js.map +1 -0
- package/dist/esm/index31.js +4 -0
- package/dist/esm/index31.js.map +1 -0
- package/dist/esm/index32.js +4 -0
- package/dist/esm/index32.js.map +1 -0
- package/dist/esm/index33.js +8 -0
- package/dist/esm/index33.js.map +1 -0
- package/dist/esm/index34.js +23 -0
- package/dist/esm/index34.js.map +1 -0
- package/dist/esm/index35.js +14 -0
- package/dist/esm/index35.js.map +1 -0
- package/dist/esm/index36.js +18 -0
- package/dist/esm/index36.js.map +1 -0
- package/dist/esm/index37.js +12 -0
- package/dist/esm/index37.js.map +1 -0
- package/dist/esm/index38.js +7 -0
- package/dist/esm/index38.js.map +1 -0
- package/dist/esm/index39.js +5 -0
- package/dist/esm/index39.js.map +1 -0
- package/dist/esm/index4.js +31 -0
- package/dist/esm/index4.js.map +1 -0
- package/dist/esm/index40.js +5 -0
- package/dist/esm/index40.js.map +1 -0
- package/dist/esm/index41.js +7 -0
- package/dist/esm/index41.js.map +1 -0
- package/dist/esm/index5.js +3 -0
- package/dist/esm/index5.js.map +1 -0
- package/dist/esm/index6.js +16 -0
- package/dist/esm/index6.js.map +1 -0
- package/dist/esm/index7.js +15 -0
- package/dist/esm/index7.js.map +1 -0
- package/dist/esm/index8.js +7 -0
- package/dist/esm/index8.js.map +1 -0
- package/dist/esm/index9.js +19 -0
- package/dist/esm/index9.js.map +1 -0
- package/dist/esm/lhplaceholder.png +0 -0
- package/dist/esm/lightbulb.svg +3 -0
- package/dist/esm/master-card-logo.svg +20 -0
- package/dist/esm/minigradcapcolored.svg +3 -0
- package/dist/esm/minijob.svg +5 -0
- package/dist/esm/minipuzzle.svg +3 -0
- package/dist/esm/minipuzzlecolored.svg +3 -0
- package/dist/esm/minitrophy.svg +3 -0
- package/dist/esm/minitrophycolored.svg +3 -0
- package/dist/esm/notifications-009bbd80.js +18 -0
- package/dist/esm/notifications-009bbd80.js.map +1 -0
- package/dist/esm/skillgraph.svg +29 -0
- package/dist/esm/skillplaceholder.png +0 -0
- package/dist/esm/social-badge.png +0 -0
- package/dist/esm/trophy.svg +3 -0
- package/dist/esm/types-7081a9e5.js +109 -0
- package/dist/esm/types-7081a9e5.js.map +1 -0
- package/dist/esm/types-b32d28d5.js +23 -0
- package/dist/esm/types-b32d28d5.js.map +1 -0
- package/dist/esm/types.esm-c5fc78aa.js +4078 -0
- package/dist/esm/types.esm-c5fc78aa.js.map +1 -0
- package/dist/esm/user.svg +4 -0
- package/dist/esm/vc.check.svg +10 -0
- package/dist/esm/verified-check.png +0 -0
- package/dist/esm/walletTrophy.webp +0 -0
- package/dist/esm/walletcurrency.webp +0 -0
- package/dist/esm/walletids.webp +0 -0
- package/dist/esm/walletjobhistory.webp +0 -0
- package/dist/esm/walletlearninghistory.webp +0 -0
- package/dist/esm/walletskills.webp +0 -0
- package/dist/images/walletTrophy.png +0 -0
- package/dist/images/walletcurrency.png +0 -0
- package/dist/images/walletids.png +0 -0
- package/dist/images/walletjobhistory.png +0 -0
- package/dist/images/walletlearninghistory.png +0 -0
- package/dist/images/walletskills.png +0 -0
- package/dist/index.d.ts +857 -0
- package/dist/main.css +1 -0
- package/dist/main.js +3 -0
- package/package.json +2 -2
|
@@ -0,0 +1,1083 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var React = require('react');
|
|
4
|
+
var index = require('./index-d836b84d.js');
|
|
5
|
+
var icons = require('./icons-ac6eb6ec.js');
|
|
6
|
+
|
|
7
|
+
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
8
|
+
|
|
9
|
+
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
10
|
+
|
|
11
|
+
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
12
|
+
|
|
13
|
+
var numeral$1 = {exports: {}};
|
|
14
|
+
|
|
15
|
+
/*! @preserve
|
|
16
|
+
* numeral.js
|
|
17
|
+
* version : 2.0.6
|
|
18
|
+
* author : Adam Draper
|
|
19
|
+
* license : MIT
|
|
20
|
+
* http://adamwdraper.github.com/Numeral-js/
|
|
21
|
+
*/
|
|
22
|
+
|
|
23
|
+
(function (module) {
|
|
24
|
+
(function (global, factory) {
|
|
25
|
+
if (module.exports) {
|
|
26
|
+
module.exports = factory();
|
|
27
|
+
} else {
|
|
28
|
+
global.numeral = factory();
|
|
29
|
+
}
|
|
30
|
+
}(commonjsGlobal, function () {
|
|
31
|
+
/************************************
|
|
32
|
+
Variables
|
|
33
|
+
************************************/
|
|
34
|
+
|
|
35
|
+
var numeral,
|
|
36
|
+
_,
|
|
37
|
+
VERSION = '2.0.6',
|
|
38
|
+
formats = {},
|
|
39
|
+
locales = {},
|
|
40
|
+
defaults = {
|
|
41
|
+
currentLocale: 'en',
|
|
42
|
+
zeroFormat: null,
|
|
43
|
+
nullFormat: null,
|
|
44
|
+
defaultFormat: '0,0',
|
|
45
|
+
scalePercentBy100: true
|
|
46
|
+
},
|
|
47
|
+
options = {
|
|
48
|
+
currentLocale: defaults.currentLocale,
|
|
49
|
+
zeroFormat: defaults.zeroFormat,
|
|
50
|
+
nullFormat: defaults.nullFormat,
|
|
51
|
+
defaultFormat: defaults.defaultFormat,
|
|
52
|
+
scalePercentBy100: defaults.scalePercentBy100
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
/************************************
|
|
57
|
+
Constructors
|
|
58
|
+
************************************/
|
|
59
|
+
|
|
60
|
+
// Numeral prototype object
|
|
61
|
+
function Numeral(input, number) {
|
|
62
|
+
this._input = input;
|
|
63
|
+
|
|
64
|
+
this._value = number;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
numeral = function(input) {
|
|
68
|
+
var value,
|
|
69
|
+
kind,
|
|
70
|
+
unformatFunction,
|
|
71
|
+
regexp;
|
|
72
|
+
|
|
73
|
+
if (numeral.isNumeral(input)) {
|
|
74
|
+
value = input.value();
|
|
75
|
+
} else if (input === 0 || typeof input === 'undefined') {
|
|
76
|
+
value = 0;
|
|
77
|
+
} else if (input === null || _.isNaN(input)) {
|
|
78
|
+
value = null;
|
|
79
|
+
} else if (typeof input === 'string') {
|
|
80
|
+
if (options.zeroFormat && input === options.zeroFormat) {
|
|
81
|
+
value = 0;
|
|
82
|
+
} else if (options.nullFormat && input === options.nullFormat || !input.replace(/[^0-9]+/g, '').length) {
|
|
83
|
+
value = null;
|
|
84
|
+
} else {
|
|
85
|
+
for (kind in formats) {
|
|
86
|
+
regexp = typeof formats[kind].regexps.unformat === 'function' ? formats[kind].regexps.unformat() : formats[kind].regexps.unformat;
|
|
87
|
+
|
|
88
|
+
if (regexp && input.match(regexp)) {
|
|
89
|
+
unformatFunction = formats[kind].unformat;
|
|
90
|
+
|
|
91
|
+
break;
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
unformatFunction = unformatFunction || numeral._.stringToNumber;
|
|
96
|
+
|
|
97
|
+
value = unformatFunction(input);
|
|
98
|
+
}
|
|
99
|
+
} else {
|
|
100
|
+
value = Number(input)|| null;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
return new Numeral(input, value);
|
|
104
|
+
};
|
|
105
|
+
|
|
106
|
+
// version number
|
|
107
|
+
numeral.version = VERSION;
|
|
108
|
+
|
|
109
|
+
// compare numeral object
|
|
110
|
+
numeral.isNumeral = function(obj) {
|
|
111
|
+
return obj instanceof Numeral;
|
|
112
|
+
};
|
|
113
|
+
|
|
114
|
+
// helper functions
|
|
115
|
+
numeral._ = _ = {
|
|
116
|
+
// formats numbers separators, decimals places, signs, abbreviations
|
|
117
|
+
numberToFormat: function(value, format, roundingFunction) {
|
|
118
|
+
var locale = locales[numeral.options.currentLocale],
|
|
119
|
+
negP = false,
|
|
120
|
+
optDec = false,
|
|
121
|
+
leadingCount = 0,
|
|
122
|
+
abbr = '',
|
|
123
|
+
trillion = 1000000000000,
|
|
124
|
+
billion = 1000000000,
|
|
125
|
+
million = 1000000,
|
|
126
|
+
thousand = 1000,
|
|
127
|
+
decimal = '',
|
|
128
|
+
neg = false,
|
|
129
|
+
abbrForce, // force abbreviation
|
|
130
|
+
abs,
|
|
131
|
+
int,
|
|
132
|
+
precision,
|
|
133
|
+
signed,
|
|
134
|
+
thousands,
|
|
135
|
+
output;
|
|
136
|
+
|
|
137
|
+
// make sure we never format a null value
|
|
138
|
+
value = value || 0;
|
|
139
|
+
|
|
140
|
+
abs = Math.abs(value);
|
|
141
|
+
|
|
142
|
+
// see if we should use parentheses for negative number or if we should prefix with a sign
|
|
143
|
+
// if both are present we default to parentheses
|
|
144
|
+
if (numeral._.includes(format, '(')) {
|
|
145
|
+
negP = true;
|
|
146
|
+
format = format.replace(/[\(|\)]/g, '');
|
|
147
|
+
} else if (numeral._.includes(format, '+') || numeral._.includes(format, '-')) {
|
|
148
|
+
signed = numeral._.includes(format, '+') ? format.indexOf('+') : value < 0 ? format.indexOf('-') : -1;
|
|
149
|
+
format = format.replace(/[\+|\-]/g, '');
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
// see if abbreviation is wanted
|
|
153
|
+
if (numeral._.includes(format, 'a')) {
|
|
154
|
+
abbrForce = format.match(/a(k|m|b|t)?/);
|
|
155
|
+
|
|
156
|
+
abbrForce = abbrForce ? abbrForce[1] : false;
|
|
157
|
+
|
|
158
|
+
// check for space before abbreviation
|
|
159
|
+
if (numeral._.includes(format, ' a')) {
|
|
160
|
+
abbr = ' ';
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
format = format.replace(new RegExp(abbr + 'a[kmbt]?'), '');
|
|
164
|
+
|
|
165
|
+
if (abs >= trillion && !abbrForce || abbrForce === 't') {
|
|
166
|
+
// trillion
|
|
167
|
+
abbr += locale.abbreviations.trillion;
|
|
168
|
+
value = value / trillion;
|
|
169
|
+
} else if (abs < trillion && abs >= billion && !abbrForce || abbrForce === 'b') {
|
|
170
|
+
// billion
|
|
171
|
+
abbr += locale.abbreviations.billion;
|
|
172
|
+
value = value / billion;
|
|
173
|
+
} else if (abs < billion && abs >= million && !abbrForce || abbrForce === 'm') {
|
|
174
|
+
// million
|
|
175
|
+
abbr += locale.abbreviations.million;
|
|
176
|
+
value = value / million;
|
|
177
|
+
} else if (abs < million && abs >= thousand && !abbrForce || abbrForce === 'k') {
|
|
178
|
+
// thousand
|
|
179
|
+
abbr += locale.abbreviations.thousand;
|
|
180
|
+
value = value / thousand;
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
// check for optional decimals
|
|
185
|
+
if (numeral._.includes(format, '[.]')) {
|
|
186
|
+
optDec = true;
|
|
187
|
+
format = format.replace('[.]', '.');
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
// break number and format
|
|
191
|
+
int = value.toString().split('.')[0];
|
|
192
|
+
precision = format.split('.')[1];
|
|
193
|
+
thousands = format.indexOf(',');
|
|
194
|
+
leadingCount = (format.split('.')[0].split(',')[0].match(/0/g) || []).length;
|
|
195
|
+
|
|
196
|
+
if (precision) {
|
|
197
|
+
if (numeral._.includes(precision, '[')) {
|
|
198
|
+
precision = precision.replace(']', '');
|
|
199
|
+
precision = precision.split('[');
|
|
200
|
+
decimal = numeral._.toFixed(value, (precision[0].length + precision[1].length), roundingFunction, precision[1].length);
|
|
201
|
+
} else {
|
|
202
|
+
decimal = numeral._.toFixed(value, precision.length, roundingFunction);
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
int = decimal.split('.')[0];
|
|
206
|
+
|
|
207
|
+
if (numeral._.includes(decimal, '.')) {
|
|
208
|
+
decimal = locale.delimiters.decimal + decimal.split('.')[1];
|
|
209
|
+
} else {
|
|
210
|
+
decimal = '';
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
if (optDec && Number(decimal.slice(1)) === 0) {
|
|
214
|
+
decimal = '';
|
|
215
|
+
}
|
|
216
|
+
} else {
|
|
217
|
+
int = numeral._.toFixed(value, 0, roundingFunction);
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
// check abbreviation again after rounding
|
|
221
|
+
if (abbr && !abbrForce && Number(int) >= 1000 && abbr !== locale.abbreviations.trillion) {
|
|
222
|
+
int = String(Number(int) / 1000);
|
|
223
|
+
|
|
224
|
+
switch (abbr) {
|
|
225
|
+
case locale.abbreviations.thousand:
|
|
226
|
+
abbr = locale.abbreviations.million;
|
|
227
|
+
break;
|
|
228
|
+
case locale.abbreviations.million:
|
|
229
|
+
abbr = locale.abbreviations.billion;
|
|
230
|
+
break;
|
|
231
|
+
case locale.abbreviations.billion:
|
|
232
|
+
abbr = locale.abbreviations.trillion;
|
|
233
|
+
break;
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
|
|
238
|
+
// format number
|
|
239
|
+
if (numeral._.includes(int, '-')) {
|
|
240
|
+
int = int.slice(1);
|
|
241
|
+
neg = true;
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
if (int.length < leadingCount) {
|
|
245
|
+
for (var i = leadingCount - int.length; i > 0; i--) {
|
|
246
|
+
int = '0' + int;
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
if (thousands > -1) {
|
|
251
|
+
int = int.toString().replace(/(\d)(?=(\d{3})+(?!\d))/g, '$1' + locale.delimiters.thousands);
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
if (format.indexOf('.') === 0) {
|
|
255
|
+
int = '';
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
output = int + decimal + (abbr ? abbr : '');
|
|
259
|
+
|
|
260
|
+
if (negP) {
|
|
261
|
+
output = (negP && neg ? '(' : '') + output + (negP && neg ? ')' : '');
|
|
262
|
+
} else {
|
|
263
|
+
if (signed >= 0) {
|
|
264
|
+
output = signed === 0 ? (neg ? '-' : '+') + output : output + (neg ? '-' : '+');
|
|
265
|
+
} else if (neg) {
|
|
266
|
+
output = '-' + output;
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
return output;
|
|
271
|
+
},
|
|
272
|
+
// unformats numbers separators, decimals places, signs, abbreviations
|
|
273
|
+
stringToNumber: function(string) {
|
|
274
|
+
var locale = locales[options.currentLocale],
|
|
275
|
+
stringOriginal = string,
|
|
276
|
+
abbreviations = {
|
|
277
|
+
thousand: 3,
|
|
278
|
+
million: 6,
|
|
279
|
+
billion: 9,
|
|
280
|
+
trillion: 12
|
|
281
|
+
},
|
|
282
|
+
abbreviation,
|
|
283
|
+
value,
|
|
284
|
+
regexp;
|
|
285
|
+
|
|
286
|
+
if (options.zeroFormat && string === options.zeroFormat) {
|
|
287
|
+
value = 0;
|
|
288
|
+
} else if (options.nullFormat && string === options.nullFormat || !string.replace(/[^0-9]+/g, '').length) {
|
|
289
|
+
value = null;
|
|
290
|
+
} else {
|
|
291
|
+
value = 1;
|
|
292
|
+
|
|
293
|
+
if (locale.delimiters.decimal !== '.') {
|
|
294
|
+
string = string.replace(/\./g, '').replace(locale.delimiters.decimal, '.');
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
for (abbreviation in abbreviations) {
|
|
298
|
+
regexp = new RegExp('[^a-zA-Z]' + locale.abbreviations[abbreviation] + '(?:\\)|(\\' + locale.currency.symbol + ')?(?:\\))?)?$');
|
|
299
|
+
|
|
300
|
+
if (stringOriginal.match(regexp)) {
|
|
301
|
+
value *= Math.pow(10, abbreviations[abbreviation]);
|
|
302
|
+
break;
|
|
303
|
+
}
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
// check for negative number
|
|
307
|
+
value *= (string.split('-').length + Math.min(string.split('(').length - 1, string.split(')').length - 1)) % 2 ? 1 : -1;
|
|
308
|
+
|
|
309
|
+
// remove non numbers
|
|
310
|
+
string = string.replace(/[^0-9\.]+/g, '');
|
|
311
|
+
|
|
312
|
+
value *= Number(string);
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
return value;
|
|
316
|
+
},
|
|
317
|
+
isNaN: function(value) {
|
|
318
|
+
return typeof value === 'number' && isNaN(value);
|
|
319
|
+
},
|
|
320
|
+
includes: function(string, search) {
|
|
321
|
+
return string.indexOf(search) !== -1;
|
|
322
|
+
},
|
|
323
|
+
insert: function(string, subString, start) {
|
|
324
|
+
return string.slice(0, start) + subString + string.slice(start);
|
|
325
|
+
},
|
|
326
|
+
reduce: function(array, callback /*, initialValue*/) {
|
|
327
|
+
if (this === null) {
|
|
328
|
+
throw new TypeError('Array.prototype.reduce called on null or undefined');
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
if (typeof callback !== 'function') {
|
|
332
|
+
throw new TypeError(callback + ' is not a function');
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
var t = Object(array),
|
|
336
|
+
len = t.length >>> 0,
|
|
337
|
+
k = 0,
|
|
338
|
+
value;
|
|
339
|
+
|
|
340
|
+
if (arguments.length === 3) {
|
|
341
|
+
value = arguments[2];
|
|
342
|
+
} else {
|
|
343
|
+
while (k < len && !(k in t)) {
|
|
344
|
+
k++;
|
|
345
|
+
}
|
|
346
|
+
|
|
347
|
+
if (k >= len) {
|
|
348
|
+
throw new TypeError('Reduce of empty array with no initial value');
|
|
349
|
+
}
|
|
350
|
+
|
|
351
|
+
value = t[k++];
|
|
352
|
+
}
|
|
353
|
+
for (; k < len; k++) {
|
|
354
|
+
if (k in t) {
|
|
355
|
+
value = callback(value, t[k], k, t);
|
|
356
|
+
}
|
|
357
|
+
}
|
|
358
|
+
return value;
|
|
359
|
+
},
|
|
360
|
+
/**
|
|
361
|
+
* Computes the multiplier necessary to make x >= 1,
|
|
362
|
+
* effectively eliminating miscalculations caused by
|
|
363
|
+
* finite precision.
|
|
364
|
+
*/
|
|
365
|
+
multiplier: function (x) {
|
|
366
|
+
var parts = x.toString().split('.');
|
|
367
|
+
|
|
368
|
+
return parts.length < 2 ? 1 : Math.pow(10, parts[1].length);
|
|
369
|
+
},
|
|
370
|
+
/**
|
|
371
|
+
* Given a variable number of arguments, returns the maximum
|
|
372
|
+
* multiplier that must be used to normalize an operation involving
|
|
373
|
+
* all of them.
|
|
374
|
+
*/
|
|
375
|
+
correctionFactor: function () {
|
|
376
|
+
var args = Array.prototype.slice.call(arguments);
|
|
377
|
+
|
|
378
|
+
return args.reduce(function(accum, next) {
|
|
379
|
+
var mn = _.multiplier(next);
|
|
380
|
+
return accum > mn ? accum : mn;
|
|
381
|
+
}, 1);
|
|
382
|
+
},
|
|
383
|
+
/**
|
|
384
|
+
* Implementation of toFixed() that treats floats more like decimals
|
|
385
|
+
*
|
|
386
|
+
* Fixes binary rounding issues (eg. (0.615).toFixed(2) === '0.61') that present
|
|
387
|
+
* problems for accounting- and finance-related software.
|
|
388
|
+
*/
|
|
389
|
+
toFixed: function(value, maxDecimals, roundingFunction, optionals) {
|
|
390
|
+
var splitValue = value.toString().split('.'),
|
|
391
|
+
minDecimals = maxDecimals - (optionals || 0),
|
|
392
|
+
boundedPrecision,
|
|
393
|
+
optionalsRegExp,
|
|
394
|
+
power,
|
|
395
|
+
output;
|
|
396
|
+
|
|
397
|
+
// Use the smallest precision value possible to avoid errors from floating point representation
|
|
398
|
+
if (splitValue.length === 2) {
|
|
399
|
+
boundedPrecision = Math.min(Math.max(splitValue[1].length, minDecimals), maxDecimals);
|
|
400
|
+
} else {
|
|
401
|
+
boundedPrecision = minDecimals;
|
|
402
|
+
}
|
|
403
|
+
|
|
404
|
+
power = Math.pow(10, boundedPrecision);
|
|
405
|
+
|
|
406
|
+
// Multiply up by precision, round accurately, then divide and use native toFixed():
|
|
407
|
+
output = (roundingFunction(value + 'e+' + boundedPrecision) / power).toFixed(boundedPrecision);
|
|
408
|
+
|
|
409
|
+
if (optionals > maxDecimals - boundedPrecision) {
|
|
410
|
+
optionalsRegExp = new RegExp('\\.?0{1,' + (optionals - (maxDecimals - boundedPrecision)) + '}$');
|
|
411
|
+
output = output.replace(optionalsRegExp, '');
|
|
412
|
+
}
|
|
413
|
+
|
|
414
|
+
return output;
|
|
415
|
+
}
|
|
416
|
+
};
|
|
417
|
+
|
|
418
|
+
// avaliable options
|
|
419
|
+
numeral.options = options;
|
|
420
|
+
|
|
421
|
+
// avaliable formats
|
|
422
|
+
numeral.formats = formats;
|
|
423
|
+
|
|
424
|
+
// avaliable formats
|
|
425
|
+
numeral.locales = locales;
|
|
426
|
+
|
|
427
|
+
// This function sets the current locale. If
|
|
428
|
+
// no arguments are passed in, it will simply return the current global
|
|
429
|
+
// locale key.
|
|
430
|
+
numeral.locale = function(key) {
|
|
431
|
+
if (key) {
|
|
432
|
+
options.currentLocale = key.toLowerCase();
|
|
433
|
+
}
|
|
434
|
+
|
|
435
|
+
return options.currentLocale;
|
|
436
|
+
};
|
|
437
|
+
|
|
438
|
+
// This function provides access to the loaded locale data. If
|
|
439
|
+
// no arguments are passed in, it will simply return the current
|
|
440
|
+
// global locale object.
|
|
441
|
+
numeral.localeData = function(key) {
|
|
442
|
+
if (!key) {
|
|
443
|
+
return locales[options.currentLocale];
|
|
444
|
+
}
|
|
445
|
+
|
|
446
|
+
key = key.toLowerCase();
|
|
447
|
+
|
|
448
|
+
if (!locales[key]) {
|
|
449
|
+
throw new Error('Unknown locale : ' + key);
|
|
450
|
+
}
|
|
451
|
+
|
|
452
|
+
return locales[key];
|
|
453
|
+
};
|
|
454
|
+
|
|
455
|
+
numeral.reset = function() {
|
|
456
|
+
for (var property in defaults) {
|
|
457
|
+
options[property] = defaults[property];
|
|
458
|
+
}
|
|
459
|
+
};
|
|
460
|
+
|
|
461
|
+
numeral.zeroFormat = function(format) {
|
|
462
|
+
options.zeroFormat = typeof(format) === 'string' ? format : null;
|
|
463
|
+
};
|
|
464
|
+
|
|
465
|
+
numeral.nullFormat = function (format) {
|
|
466
|
+
options.nullFormat = typeof(format) === 'string' ? format : null;
|
|
467
|
+
};
|
|
468
|
+
|
|
469
|
+
numeral.defaultFormat = function(format) {
|
|
470
|
+
options.defaultFormat = typeof(format) === 'string' ? format : '0.0';
|
|
471
|
+
};
|
|
472
|
+
|
|
473
|
+
numeral.register = function(type, name, format) {
|
|
474
|
+
name = name.toLowerCase();
|
|
475
|
+
|
|
476
|
+
if (this[type + 's'][name]) {
|
|
477
|
+
throw new TypeError(name + ' ' + type + ' already registered.');
|
|
478
|
+
}
|
|
479
|
+
|
|
480
|
+
this[type + 's'][name] = format;
|
|
481
|
+
|
|
482
|
+
return format;
|
|
483
|
+
};
|
|
484
|
+
|
|
485
|
+
|
|
486
|
+
numeral.validate = function(val, culture) {
|
|
487
|
+
var _decimalSep,
|
|
488
|
+
_thousandSep,
|
|
489
|
+
_currSymbol,
|
|
490
|
+
_valArray,
|
|
491
|
+
_abbrObj,
|
|
492
|
+
_thousandRegEx,
|
|
493
|
+
localeData,
|
|
494
|
+
temp;
|
|
495
|
+
|
|
496
|
+
//coerce val to string
|
|
497
|
+
if (typeof val !== 'string') {
|
|
498
|
+
val += '';
|
|
499
|
+
|
|
500
|
+
if (console.warn) {
|
|
501
|
+
console.warn('Numeral.js: Value is not string. It has been co-erced to: ', val);
|
|
502
|
+
}
|
|
503
|
+
}
|
|
504
|
+
|
|
505
|
+
//trim whitespaces from either sides
|
|
506
|
+
val = val.trim();
|
|
507
|
+
|
|
508
|
+
//if val is just digits return true
|
|
509
|
+
if (!!val.match(/^\d+$/)) {
|
|
510
|
+
return true;
|
|
511
|
+
}
|
|
512
|
+
|
|
513
|
+
//if val is empty return false
|
|
514
|
+
if (val === '') {
|
|
515
|
+
return false;
|
|
516
|
+
}
|
|
517
|
+
|
|
518
|
+
//get the decimal and thousands separator from numeral.localeData
|
|
519
|
+
try {
|
|
520
|
+
//check if the culture is understood by numeral. if not, default it to current locale
|
|
521
|
+
localeData = numeral.localeData(culture);
|
|
522
|
+
} catch (e) {
|
|
523
|
+
localeData = numeral.localeData(numeral.locale());
|
|
524
|
+
}
|
|
525
|
+
|
|
526
|
+
//setup the delimiters and currency symbol based on culture/locale
|
|
527
|
+
_currSymbol = localeData.currency.symbol;
|
|
528
|
+
_abbrObj = localeData.abbreviations;
|
|
529
|
+
_decimalSep = localeData.delimiters.decimal;
|
|
530
|
+
if (localeData.delimiters.thousands === '.') {
|
|
531
|
+
_thousandSep = '\\.';
|
|
532
|
+
} else {
|
|
533
|
+
_thousandSep = localeData.delimiters.thousands;
|
|
534
|
+
}
|
|
535
|
+
|
|
536
|
+
// validating currency symbol
|
|
537
|
+
temp = val.match(/^[^\d]+/);
|
|
538
|
+
if (temp !== null) {
|
|
539
|
+
val = val.substr(1);
|
|
540
|
+
if (temp[0] !== _currSymbol) {
|
|
541
|
+
return false;
|
|
542
|
+
}
|
|
543
|
+
}
|
|
544
|
+
|
|
545
|
+
//validating abbreviation symbol
|
|
546
|
+
temp = val.match(/[^\d]+$/);
|
|
547
|
+
if (temp !== null) {
|
|
548
|
+
val = val.slice(0, -1);
|
|
549
|
+
if (temp[0] !== _abbrObj.thousand && temp[0] !== _abbrObj.million && temp[0] !== _abbrObj.billion && temp[0] !== _abbrObj.trillion) {
|
|
550
|
+
return false;
|
|
551
|
+
}
|
|
552
|
+
}
|
|
553
|
+
|
|
554
|
+
_thousandRegEx = new RegExp(_thousandSep + '{2}');
|
|
555
|
+
|
|
556
|
+
if (!val.match(/[^\d.,]/g)) {
|
|
557
|
+
_valArray = val.split(_decimalSep);
|
|
558
|
+
if (_valArray.length > 2) {
|
|
559
|
+
return false;
|
|
560
|
+
} else {
|
|
561
|
+
if (_valArray.length < 2) {
|
|
562
|
+
return ( !! _valArray[0].match(/^\d+.*\d$/) && !_valArray[0].match(_thousandRegEx));
|
|
563
|
+
} else {
|
|
564
|
+
if (_valArray[0].length === 1) {
|
|
565
|
+
return ( !! _valArray[0].match(/^\d+$/) && !_valArray[0].match(_thousandRegEx) && !! _valArray[1].match(/^\d+$/));
|
|
566
|
+
} else {
|
|
567
|
+
return ( !! _valArray[0].match(/^\d+.*\d$/) && !_valArray[0].match(_thousandRegEx) && !! _valArray[1].match(/^\d+$/));
|
|
568
|
+
}
|
|
569
|
+
}
|
|
570
|
+
}
|
|
571
|
+
}
|
|
572
|
+
|
|
573
|
+
return false;
|
|
574
|
+
};
|
|
575
|
+
|
|
576
|
+
|
|
577
|
+
/************************************
|
|
578
|
+
Numeral Prototype
|
|
579
|
+
************************************/
|
|
580
|
+
|
|
581
|
+
numeral.fn = Numeral.prototype = {
|
|
582
|
+
clone: function() {
|
|
583
|
+
return numeral(this);
|
|
584
|
+
},
|
|
585
|
+
format: function(inputString, roundingFunction) {
|
|
586
|
+
var value = this._value,
|
|
587
|
+
format = inputString || options.defaultFormat,
|
|
588
|
+
kind,
|
|
589
|
+
output,
|
|
590
|
+
formatFunction;
|
|
591
|
+
|
|
592
|
+
// make sure we have a roundingFunction
|
|
593
|
+
roundingFunction = roundingFunction || Math.round;
|
|
594
|
+
|
|
595
|
+
// format based on value
|
|
596
|
+
if (value === 0 && options.zeroFormat !== null) {
|
|
597
|
+
output = options.zeroFormat;
|
|
598
|
+
} else if (value === null && options.nullFormat !== null) {
|
|
599
|
+
output = options.nullFormat;
|
|
600
|
+
} else {
|
|
601
|
+
for (kind in formats) {
|
|
602
|
+
if (format.match(formats[kind].regexps.format)) {
|
|
603
|
+
formatFunction = formats[kind].format;
|
|
604
|
+
|
|
605
|
+
break;
|
|
606
|
+
}
|
|
607
|
+
}
|
|
608
|
+
|
|
609
|
+
formatFunction = formatFunction || numeral._.numberToFormat;
|
|
610
|
+
|
|
611
|
+
output = formatFunction(value, format, roundingFunction);
|
|
612
|
+
}
|
|
613
|
+
|
|
614
|
+
return output;
|
|
615
|
+
},
|
|
616
|
+
value: function() {
|
|
617
|
+
return this._value;
|
|
618
|
+
},
|
|
619
|
+
input: function() {
|
|
620
|
+
return this._input;
|
|
621
|
+
},
|
|
622
|
+
set: function(value) {
|
|
623
|
+
this._value = Number(value);
|
|
624
|
+
|
|
625
|
+
return this;
|
|
626
|
+
},
|
|
627
|
+
add: function(value) {
|
|
628
|
+
var corrFactor = _.correctionFactor.call(null, this._value, value);
|
|
629
|
+
|
|
630
|
+
function cback(accum, curr, currI, O) {
|
|
631
|
+
return accum + Math.round(corrFactor * curr);
|
|
632
|
+
}
|
|
633
|
+
|
|
634
|
+
this._value = _.reduce([this._value, value], cback, 0) / corrFactor;
|
|
635
|
+
|
|
636
|
+
return this;
|
|
637
|
+
},
|
|
638
|
+
subtract: function(value) {
|
|
639
|
+
var corrFactor = _.correctionFactor.call(null, this._value, value);
|
|
640
|
+
|
|
641
|
+
function cback(accum, curr, currI, O) {
|
|
642
|
+
return accum - Math.round(corrFactor * curr);
|
|
643
|
+
}
|
|
644
|
+
|
|
645
|
+
this._value = _.reduce([value], cback, Math.round(this._value * corrFactor)) / corrFactor;
|
|
646
|
+
|
|
647
|
+
return this;
|
|
648
|
+
},
|
|
649
|
+
multiply: function(value) {
|
|
650
|
+
function cback(accum, curr, currI, O) {
|
|
651
|
+
var corrFactor = _.correctionFactor(accum, curr);
|
|
652
|
+
return Math.round(accum * corrFactor) * Math.round(curr * corrFactor) / Math.round(corrFactor * corrFactor);
|
|
653
|
+
}
|
|
654
|
+
|
|
655
|
+
this._value = _.reduce([this._value, value], cback, 1);
|
|
656
|
+
|
|
657
|
+
return this;
|
|
658
|
+
},
|
|
659
|
+
divide: function(value) {
|
|
660
|
+
function cback(accum, curr, currI, O) {
|
|
661
|
+
var corrFactor = _.correctionFactor(accum, curr);
|
|
662
|
+
return Math.round(accum * corrFactor) / Math.round(curr * corrFactor);
|
|
663
|
+
}
|
|
664
|
+
|
|
665
|
+
this._value = _.reduce([this._value, value], cback);
|
|
666
|
+
|
|
667
|
+
return this;
|
|
668
|
+
},
|
|
669
|
+
difference: function(value) {
|
|
670
|
+
return Math.abs(numeral(this._value).subtract(value).value());
|
|
671
|
+
}
|
|
672
|
+
};
|
|
673
|
+
|
|
674
|
+
/************************************
|
|
675
|
+
Default Locale && Format
|
|
676
|
+
************************************/
|
|
677
|
+
|
|
678
|
+
numeral.register('locale', 'en', {
|
|
679
|
+
delimiters: {
|
|
680
|
+
thousands: ',',
|
|
681
|
+
decimal: '.'
|
|
682
|
+
},
|
|
683
|
+
abbreviations: {
|
|
684
|
+
thousand: 'k',
|
|
685
|
+
million: 'm',
|
|
686
|
+
billion: 'b',
|
|
687
|
+
trillion: 't'
|
|
688
|
+
},
|
|
689
|
+
ordinal: function(number) {
|
|
690
|
+
var b = number % 10;
|
|
691
|
+
return (~~(number % 100 / 10) === 1) ? 'th' :
|
|
692
|
+
(b === 1) ? 'st' :
|
|
693
|
+
(b === 2) ? 'nd' :
|
|
694
|
+
(b === 3) ? 'rd' : 'th';
|
|
695
|
+
},
|
|
696
|
+
currency: {
|
|
697
|
+
symbol: '$'
|
|
698
|
+
}
|
|
699
|
+
});
|
|
700
|
+
|
|
701
|
+
|
|
702
|
+
|
|
703
|
+
(function() {
|
|
704
|
+
numeral.register('format', 'bps', {
|
|
705
|
+
regexps: {
|
|
706
|
+
format: /(BPS)/,
|
|
707
|
+
unformat: /(BPS)/
|
|
708
|
+
},
|
|
709
|
+
format: function(value, format, roundingFunction) {
|
|
710
|
+
var space = numeral._.includes(format, ' BPS') ? ' ' : '',
|
|
711
|
+
output;
|
|
712
|
+
|
|
713
|
+
value = value * 10000;
|
|
714
|
+
|
|
715
|
+
// check for space before BPS
|
|
716
|
+
format = format.replace(/\s?BPS/, '');
|
|
717
|
+
|
|
718
|
+
output = numeral._.numberToFormat(value, format, roundingFunction);
|
|
719
|
+
|
|
720
|
+
if (numeral._.includes(output, ')')) {
|
|
721
|
+
output = output.split('');
|
|
722
|
+
|
|
723
|
+
output.splice(-1, 0, space + 'BPS');
|
|
724
|
+
|
|
725
|
+
output = output.join('');
|
|
726
|
+
} else {
|
|
727
|
+
output = output + space + 'BPS';
|
|
728
|
+
}
|
|
729
|
+
|
|
730
|
+
return output;
|
|
731
|
+
},
|
|
732
|
+
unformat: function(string) {
|
|
733
|
+
return +(numeral._.stringToNumber(string) * 0.0001).toFixed(15);
|
|
734
|
+
}
|
|
735
|
+
});
|
|
736
|
+
})();
|
|
737
|
+
|
|
738
|
+
|
|
739
|
+
(function() {
|
|
740
|
+
var decimal = {
|
|
741
|
+
base: 1000,
|
|
742
|
+
suffixes: ['B', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB']
|
|
743
|
+
},
|
|
744
|
+
binary = {
|
|
745
|
+
base: 1024,
|
|
746
|
+
suffixes: ['B', 'KiB', 'MiB', 'GiB', 'TiB', 'PiB', 'EiB', 'ZiB', 'YiB']
|
|
747
|
+
};
|
|
748
|
+
|
|
749
|
+
var allSuffixes = decimal.suffixes.concat(binary.suffixes.filter(function (item) {
|
|
750
|
+
return decimal.suffixes.indexOf(item) < 0;
|
|
751
|
+
}));
|
|
752
|
+
var unformatRegex = allSuffixes.join('|');
|
|
753
|
+
// Allow support for BPS (http://www.investopedia.com/terms/b/basispoint.asp)
|
|
754
|
+
unformatRegex = '(' + unformatRegex.replace('B', 'B(?!PS)') + ')';
|
|
755
|
+
|
|
756
|
+
numeral.register('format', 'bytes', {
|
|
757
|
+
regexps: {
|
|
758
|
+
format: /([0\s]i?b)/,
|
|
759
|
+
unformat: new RegExp(unformatRegex)
|
|
760
|
+
},
|
|
761
|
+
format: function(value, format, roundingFunction) {
|
|
762
|
+
var output,
|
|
763
|
+
bytes = numeral._.includes(format, 'ib') ? binary : decimal,
|
|
764
|
+
suffix = numeral._.includes(format, ' b') || numeral._.includes(format, ' ib') ? ' ' : '',
|
|
765
|
+
power,
|
|
766
|
+
min,
|
|
767
|
+
max;
|
|
768
|
+
|
|
769
|
+
// check for space before
|
|
770
|
+
format = format.replace(/\s?i?b/, '');
|
|
771
|
+
|
|
772
|
+
for (power = 0; power <= bytes.suffixes.length; power++) {
|
|
773
|
+
min = Math.pow(bytes.base, power);
|
|
774
|
+
max = Math.pow(bytes.base, power + 1);
|
|
775
|
+
|
|
776
|
+
if (value === null || value === 0 || value >= min && value < max) {
|
|
777
|
+
suffix += bytes.suffixes[power];
|
|
778
|
+
|
|
779
|
+
if (min > 0) {
|
|
780
|
+
value = value / min;
|
|
781
|
+
}
|
|
782
|
+
|
|
783
|
+
break;
|
|
784
|
+
}
|
|
785
|
+
}
|
|
786
|
+
|
|
787
|
+
output = numeral._.numberToFormat(value, format, roundingFunction);
|
|
788
|
+
|
|
789
|
+
return output + suffix;
|
|
790
|
+
},
|
|
791
|
+
unformat: function(string) {
|
|
792
|
+
var value = numeral._.stringToNumber(string),
|
|
793
|
+
power,
|
|
794
|
+
bytesMultiplier;
|
|
795
|
+
|
|
796
|
+
if (value) {
|
|
797
|
+
for (power = decimal.suffixes.length - 1; power >= 0; power--) {
|
|
798
|
+
if (numeral._.includes(string, decimal.suffixes[power])) {
|
|
799
|
+
bytesMultiplier = Math.pow(decimal.base, power);
|
|
800
|
+
|
|
801
|
+
break;
|
|
802
|
+
}
|
|
803
|
+
|
|
804
|
+
if (numeral._.includes(string, binary.suffixes[power])) {
|
|
805
|
+
bytesMultiplier = Math.pow(binary.base, power);
|
|
806
|
+
|
|
807
|
+
break;
|
|
808
|
+
}
|
|
809
|
+
}
|
|
810
|
+
|
|
811
|
+
value *= (bytesMultiplier || 1);
|
|
812
|
+
}
|
|
813
|
+
|
|
814
|
+
return value;
|
|
815
|
+
}
|
|
816
|
+
});
|
|
817
|
+
})();
|
|
818
|
+
|
|
819
|
+
|
|
820
|
+
(function() {
|
|
821
|
+
numeral.register('format', 'currency', {
|
|
822
|
+
regexps: {
|
|
823
|
+
format: /(\$)/
|
|
824
|
+
},
|
|
825
|
+
format: function(value, format, roundingFunction) {
|
|
826
|
+
var locale = numeral.locales[numeral.options.currentLocale],
|
|
827
|
+
symbols = {
|
|
828
|
+
before: format.match(/^([\+|\-|\(|\s|\$]*)/)[0],
|
|
829
|
+
after: format.match(/([\+|\-|\)|\s|\$]*)$/)[0]
|
|
830
|
+
},
|
|
831
|
+
output,
|
|
832
|
+
symbol,
|
|
833
|
+
i;
|
|
834
|
+
|
|
835
|
+
// strip format of spaces and $
|
|
836
|
+
format = format.replace(/\s?\$\s?/, '');
|
|
837
|
+
|
|
838
|
+
// format the number
|
|
839
|
+
output = numeral._.numberToFormat(value, format, roundingFunction);
|
|
840
|
+
|
|
841
|
+
// update the before and after based on value
|
|
842
|
+
if (value >= 0) {
|
|
843
|
+
symbols.before = symbols.before.replace(/[\-\(]/, '');
|
|
844
|
+
symbols.after = symbols.after.replace(/[\-\)]/, '');
|
|
845
|
+
} else if (value < 0 && (!numeral._.includes(symbols.before, '-') && !numeral._.includes(symbols.before, '('))) {
|
|
846
|
+
symbols.before = '-' + symbols.before;
|
|
847
|
+
}
|
|
848
|
+
|
|
849
|
+
// loop through each before symbol
|
|
850
|
+
for (i = 0; i < symbols.before.length; i++) {
|
|
851
|
+
symbol = symbols.before[i];
|
|
852
|
+
|
|
853
|
+
switch (symbol) {
|
|
854
|
+
case '$':
|
|
855
|
+
output = numeral._.insert(output, locale.currency.symbol, i);
|
|
856
|
+
break;
|
|
857
|
+
case ' ':
|
|
858
|
+
output = numeral._.insert(output, ' ', i + locale.currency.symbol.length - 1);
|
|
859
|
+
break;
|
|
860
|
+
}
|
|
861
|
+
}
|
|
862
|
+
|
|
863
|
+
// loop through each after symbol
|
|
864
|
+
for (i = symbols.after.length - 1; i >= 0; i--) {
|
|
865
|
+
symbol = symbols.after[i];
|
|
866
|
+
|
|
867
|
+
switch (symbol) {
|
|
868
|
+
case '$':
|
|
869
|
+
output = i === symbols.after.length - 1 ? output + locale.currency.symbol : numeral._.insert(output, locale.currency.symbol, -(symbols.after.length - (1 + i)));
|
|
870
|
+
break;
|
|
871
|
+
case ' ':
|
|
872
|
+
output = i === symbols.after.length - 1 ? output + ' ' : numeral._.insert(output, ' ', -(symbols.after.length - (1 + i) + locale.currency.symbol.length - 1));
|
|
873
|
+
break;
|
|
874
|
+
}
|
|
875
|
+
}
|
|
876
|
+
|
|
877
|
+
|
|
878
|
+
return output;
|
|
879
|
+
}
|
|
880
|
+
});
|
|
881
|
+
})();
|
|
882
|
+
|
|
883
|
+
|
|
884
|
+
(function() {
|
|
885
|
+
numeral.register('format', 'exponential', {
|
|
886
|
+
regexps: {
|
|
887
|
+
format: /(e\+|e-)/,
|
|
888
|
+
unformat: /(e\+|e-)/
|
|
889
|
+
},
|
|
890
|
+
format: function(value, format, roundingFunction) {
|
|
891
|
+
var output,
|
|
892
|
+
exponential = typeof value === 'number' && !numeral._.isNaN(value) ? value.toExponential() : '0e+0',
|
|
893
|
+
parts = exponential.split('e');
|
|
894
|
+
|
|
895
|
+
format = format.replace(/e[\+|\-]{1}0/, '');
|
|
896
|
+
|
|
897
|
+
output = numeral._.numberToFormat(Number(parts[0]), format, roundingFunction);
|
|
898
|
+
|
|
899
|
+
return output + 'e' + parts[1];
|
|
900
|
+
},
|
|
901
|
+
unformat: function(string) {
|
|
902
|
+
var parts = numeral._.includes(string, 'e+') ? string.split('e+') : string.split('e-'),
|
|
903
|
+
value = Number(parts[0]),
|
|
904
|
+
power = Number(parts[1]);
|
|
905
|
+
|
|
906
|
+
power = numeral._.includes(string, 'e-') ? power *= -1 : power;
|
|
907
|
+
|
|
908
|
+
function cback(accum, curr, currI, O) {
|
|
909
|
+
var corrFactor = numeral._.correctionFactor(accum, curr),
|
|
910
|
+
num = (accum * corrFactor) * (curr * corrFactor) / (corrFactor * corrFactor);
|
|
911
|
+
return num;
|
|
912
|
+
}
|
|
913
|
+
|
|
914
|
+
return numeral._.reduce([value, Math.pow(10, power)], cback, 1);
|
|
915
|
+
}
|
|
916
|
+
});
|
|
917
|
+
})();
|
|
918
|
+
|
|
919
|
+
|
|
920
|
+
(function() {
|
|
921
|
+
numeral.register('format', 'ordinal', {
|
|
922
|
+
regexps: {
|
|
923
|
+
format: /(o)/
|
|
924
|
+
},
|
|
925
|
+
format: function(value, format, roundingFunction) {
|
|
926
|
+
var locale = numeral.locales[numeral.options.currentLocale],
|
|
927
|
+
output,
|
|
928
|
+
ordinal = numeral._.includes(format, ' o') ? ' ' : '';
|
|
929
|
+
|
|
930
|
+
// check for space before
|
|
931
|
+
format = format.replace(/\s?o/, '');
|
|
932
|
+
|
|
933
|
+
ordinal += locale.ordinal(value);
|
|
934
|
+
|
|
935
|
+
output = numeral._.numberToFormat(value, format, roundingFunction);
|
|
936
|
+
|
|
937
|
+
return output + ordinal;
|
|
938
|
+
}
|
|
939
|
+
});
|
|
940
|
+
})();
|
|
941
|
+
|
|
942
|
+
|
|
943
|
+
(function() {
|
|
944
|
+
numeral.register('format', 'percentage', {
|
|
945
|
+
regexps: {
|
|
946
|
+
format: /(%)/,
|
|
947
|
+
unformat: /(%)/
|
|
948
|
+
},
|
|
949
|
+
format: function(value, format, roundingFunction) {
|
|
950
|
+
var space = numeral._.includes(format, ' %') ? ' ' : '',
|
|
951
|
+
output;
|
|
952
|
+
|
|
953
|
+
if (numeral.options.scalePercentBy100) {
|
|
954
|
+
value = value * 100;
|
|
955
|
+
}
|
|
956
|
+
|
|
957
|
+
// check for space before %
|
|
958
|
+
format = format.replace(/\s?\%/, '');
|
|
959
|
+
|
|
960
|
+
output = numeral._.numberToFormat(value, format, roundingFunction);
|
|
961
|
+
|
|
962
|
+
if (numeral._.includes(output, ')')) {
|
|
963
|
+
output = output.split('');
|
|
964
|
+
|
|
965
|
+
output.splice(-1, 0, space + '%');
|
|
966
|
+
|
|
967
|
+
output = output.join('');
|
|
968
|
+
} else {
|
|
969
|
+
output = output + space + '%';
|
|
970
|
+
}
|
|
971
|
+
|
|
972
|
+
return output;
|
|
973
|
+
},
|
|
974
|
+
unformat: function(string) {
|
|
975
|
+
var number = numeral._.stringToNumber(string);
|
|
976
|
+
if (numeral.options.scalePercentBy100) {
|
|
977
|
+
return number * 0.01;
|
|
978
|
+
}
|
|
979
|
+
return number;
|
|
980
|
+
}
|
|
981
|
+
});
|
|
982
|
+
})();
|
|
983
|
+
|
|
984
|
+
|
|
985
|
+
(function() {
|
|
986
|
+
numeral.register('format', 'time', {
|
|
987
|
+
regexps: {
|
|
988
|
+
format: /(:)/,
|
|
989
|
+
unformat: /(:)/
|
|
990
|
+
},
|
|
991
|
+
format: function(value, format, roundingFunction) {
|
|
992
|
+
var hours = Math.floor(value / 60 / 60),
|
|
993
|
+
minutes = Math.floor((value - (hours * 60 * 60)) / 60),
|
|
994
|
+
seconds = Math.round(value - (hours * 60 * 60) - (minutes * 60));
|
|
995
|
+
|
|
996
|
+
return hours + ':' + (minutes < 10 ? '0' + minutes : minutes) + ':' + (seconds < 10 ? '0' + seconds : seconds);
|
|
997
|
+
},
|
|
998
|
+
unformat: function(string) {
|
|
999
|
+
var timeArray = string.split(':'),
|
|
1000
|
+
seconds = 0;
|
|
1001
|
+
|
|
1002
|
+
// turn hours and minutes into seconds and add them all up
|
|
1003
|
+
if (timeArray.length === 3) {
|
|
1004
|
+
// hours
|
|
1005
|
+
seconds = seconds + (Number(timeArray[0]) * 60 * 60);
|
|
1006
|
+
// minutes
|
|
1007
|
+
seconds = seconds + (Number(timeArray[1]) * 60);
|
|
1008
|
+
// seconds
|
|
1009
|
+
seconds = seconds + Number(timeArray[2]);
|
|
1010
|
+
} else if (timeArray.length === 2) {
|
|
1011
|
+
// minutes
|
|
1012
|
+
seconds = seconds + (Number(timeArray[0]) * 60);
|
|
1013
|
+
// seconds
|
|
1014
|
+
seconds = seconds + Number(timeArray[1]);
|
|
1015
|
+
}
|
|
1016
|
+
return Number(seconds);
|
|
1017
|
+
}
|
|
1018
|
+
});
|
|
1019
|
+
})();
|
|
1020
|
+
|
|
1021
|
+
return numeral;
|
|
1022
|
+
}));
|
|
1023
|
+
} (numeral$1));
|
|
1024
|
+
|
|
1025
|
+
var numeral = numeral$1.exports;
|
|
1026
|
+
|
|
1027
|
+
const CountCircle = ({
|
|
1028
|
+
size = "auto",
|
|
1029
|
+
count = "28",
|
|
1030
|
+
innerPadding = "3px 5px",
|
|
1031
|
+
className,
|
|
1032
|
+
onClick = () => {
|
|
1033
|
+
},
|
|
1034
|
+
bgColor = "bg-grayscale-50"
|
|
1035
|
+
}) => {
|
|
1036
|
+
const _count = count >= 1e3 ? numeral(count).format("0.0a") : count;
|
|
1037
|
+
const style = {
|
|
1038
|
+
width: size,
|
|
1039
|
+
height: size,
|
|
1040
|
+
padding: innerPadding
|
|
1041
|
+
};
|
|
1042
|
+
return /* @__PURE__ */ React__default["default"].createElement("section", {
|
|
1043
|
+
onClick,
|
|
1044
|
+
className: `${bgColor} rounded-full circle-icon-wrapper text-center absolute right-[-18px] top-[-18px] min-w-[25px] ${className}`,
|
|
1045
|
+
style
|
|
1046
|
+
}, /* @__PURE__ */ React__default["default"].createElement("div", {
|
|
1047
|
+
className: `h-full`
|
|
1048
|
+
}, /* @__PURE__ */ React__default["default"].createElement("p", {
|
|
1049
|
+
className: "h-full line-clamp-1 font-semibold text-grayscale-900 text-[12px]"
|
|
1050
|
+
}, _count)));
|
|
1051
|
+
};
|
|
1052
|
+
const CircleIcon = ({
|
|
1053
|
+
iconSrc = icons.ICONS_TO_SOURCE[index.Icons.coinsIcon],
|
|
1054
|
+
size = "52px",
|
|
1055
|
+
count = "28",
|
|
1056
|
+
innerPadding = "6px",
|
|
1057
|
+
onClick = () => {
|
|
1058
|
+
},
|
|
1059
|
+
bgColor = "bg-grayscale-900"
|
|
1060
|
+
}) => {
|
|
1061
|
+
const style = {
|
|
1062
|
+
width: size,
|
|
1063
|
+
height: size,
|
|
1064
|
+
padding: innerPadding
|
|
1065
|
+
};
|
|
1066
|
+
return /* @__PURE__ */ React__default["default"].createElement("section", {
|
|
1067
|
+
onClick,
|
|
1068
|
+
className: `${bgColor} rounded-full circle-icon-wrapper p-[0px] m-[0px]`,
|
|
1069
|
+
style
|
|
1070
|
+
}, /* @__PURE__ */ React__default["default"].createElement("div", {
|
|
1071
|
+
className: `relative w-full h-full`
|
|
1072
|
+
}, /* @__PURE__ */ React__default["default"].createElement(CountCircle, {
|
|
1073
|
+
count
|
|
1074
|
+
}), /* @__PURE__ */ React__default["default"].createElement("img", {
|
|
1075
|
+
className: "h-full w-full object-cover",
|
|
1076
|
+
src: iconSrc != null ? iconSrc : "",
|
|
1077
|
+
alt: "Icon image"
|
|
1078
|
+
})));
|
|
1079
|
+
};
|
|
1080
|
+
|
|
1081
|
+
exports.CircleIcon = CircleIcon;
|
|
1082
|
+
exports.CountCircle = CountCircle;
|
|
1083
|
+
//# sourceMappingURL=CircleIcon-a45953f5.js.map
|