@fairmint/ui 0.3.33 → 0.3.34
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/_virtual/index3.cjs +3 -5
- package/dist/_virtual/index3.cjs.map +1 -1
- package/dist/_virtual/index3.js +2 -5
- package/dist/_virtual/index3.js.map +1 -1
- package/dist/_virtual/index4.cjs +5 -3
- package/dist/_virtual/index4.cjs.map +1 -1
- package/dist/_virtual/index4.js +5 -2
- package/dist/_virtual/index4.js.map +1 -1
- package/dist/components/BrandedLoadingScreen/BrandedLoadingScreen.d.ts +1 -1
- package/dist/components/BrandedLoadingScreen/BrandedLoadingScreen.d.ts.map +1 -1
- package/dist/components/ErrorFallback/ErrorFallback.d.ts +1 -1
- package/dist/components/ErrorFallback/ErrorFallback.d.ts.map +1 -1
- package/dist/components/FairmintLogo/FairmintBrandLogo.d.ts +1 -1
- package/dist/components/FairmintLogo/FairmintBrandLogo.d.ts.map +1 -1
- package/dist/components/FairmintLogo/FairmintLogo.d.ts +1 -1
- package/dist/components/FairmintLogo/FairmintLogo.d.ts.map +1 -1
- package/dist/components/FairmintLogo/FairmintLogoGraphic.d.ts +1 -1
- package/dist/components/FairmintLogo/FairmintLogoGraphic.d.ts.map +1 -1
- package/dist/components/FairmintLogo/FairmintLogoMark.d.ts +1 -1
- package/dist/components/FairmintLogo/FairmintLogoMark.d.ts.map +1 -1
- package/dist/components/FairmintLogo/FairmintLogoMarkRounded.d.ts +1 -1
- package/dist/components/FairmintLogo/FairmintLogoMarkRounded.d.ts.map +1 -1
- package/dist/components/FairmintProvider/FairmintNotifications.d.ts +1 -1
- package/dist/components/FairmintProvider/FairmintNotifications.d.ts.map +1 -1
- package/dist/components/FairmintProvider/FairmintProvider.d.ts +1 -1
- package/dist/components/FairmintProvider/FairmintProvider.d.ts.map +1 -1
- package/dist/components/LoadingOverlay/LoadingOverlay.d.ts +1 -1
- package/dist/components/LoadingOverlay/LoadingOverlay.d.ts.map +1 -1
- package/dist/components/LoadingSpinner/LoadingSpinner.d.ts +1 -1
- package/dist/components/LoadingSpinner/LoadingSpinner.d.ts.map +1 -1
- package/dist/components/form/BirthdayDatePicker/BirthdayDatePicker.d.ts +1 -1
- package/dist/components/form/BirthdayDatePicker/BirthdayDatePicker.d.ts.map +1 -1
- package/dist/components/form/EmailField.d.ts +1 -1
- package/dist/components/form/EmailField.d.ts.map +1 -1
- package/dist/components/form/EthereumAddressField/EthereumAddressField.d.ts +1 -1
- package/dist/components/form/EthereumAddressField/EthereumAddressField.d.ts.map +1 -1
- package/dist/components/form/Form.d.ts +1 -1
- package/dist/components/form/Form.d.ts.map +1 -1
- package/dist/components/form/FormField.d.ts +1 -1
- package/dist/components/form/FormField.d.ts.map +1 -1
- package/dist/components/form/PasswordField.d.ts +1 -1
- package/dist/components/form/PasswordField.d.ts.map +1 -1
- package/dist/components/form/PhoneField.d.ts +2 -1
- package/dist/components/form/PhoneField.d.ts.map +1 -1
- package/dist/components/form/SignatureNameField/SignatureNameField.d.ts +1 -1
- package/dist/components/form/SignatureNameField/SignatureNameField.d.ts.map +1 -1
- package/dist/components/form/USStateField/USStateField.d.ts +1 -1
- package/dist/components/form/USStateField/USStateField.d.ts.map +1 -1
- package/dist/components/form/ZipField/ZipField.d.ts +1 -1
- package/dist/components/form/ZipField/ZipField.d.ts.map +1 -1
- package/dist/components/generic/AgentSuggestion/AgentSuggestion.d.ts +2 -2
- package/dist/components/generic/AgentSuggestion/AgentSuggestion.d.ts.map +1 -1
- package/dist/components/generic/AnimateIn/AnimateIn.d.ts +1 -1
- package/dist/components/generic/AnimateIn/AnimateIn.d.ts.map +1 -1
- package/dist/components/generic/Banner/Banner.d.ts +1 -1
- package/dist/components/generic/Banner/Banner.d.ts.map +1 -1
- package/dist/components/generic/BottomSheet/BottomSheet.d.ts +1 -1
- package/dist/components/generic/BottomSheet/BottomSheet.d.ts.map +1 -1
- package/dist/components/generic/ClickableCard/ClickableCard.d.ts +1 -1
- package/dist/components/generic/ClickableCard/ClickableCard.d.ts.map +1 -1
- package/dist/components/generic/ColorDot/ColorDot.d.ts +1 -1
- package/dist/components/generic/ColorDot/ColorDot.d.ts.map +1 -1
- package/dist/components/generic/CompanyBanner/CompanyBanner.d.ts +1 -1
- package/dist/components/generic/CompanyBanner/CompanyBanner.d.ts.map +1 -1
- package/dist/components/generic/ConfidentialityBanner/ConfidentialityBanner.d.ts +1 -1
- package/dist/components/generic/ConfidentialityBanner/ConfidentialityBanner.d.ts.map +1 -1
- package/dist/components/generic/ConfirmDialog/ConfirmDialog.d.ts +1 -1
- package/dist/components/generic/ConfirmDialog/ConfirmDialog.d.ts.map +1 -1
- package/dist/components/generic/Currency/Currency.d.ts +2 -1
- package/dist/components/generic/Currency/Currency.d.ts.map +1 -1
- package/dist/components/generic/DataRow/DataRow.d.ts +3 -3
- package/dist/components/generic/DataRow/DataRow.d.ts.map +1 -1
- package/dist/components/generic/DataTable/DataTable.d.ts +1 -1
- package/dist/components/generic/DataTable/DataTable.d.ts.map +1 -1
- package/dist/components/generic/DateDisplay/DateDisplay.d.ts +1 -1
- package/dist/components/generic/DateDisplay/DateDisplay.d.ts.map +1 -1
- package/dist/components/generic/DetailDrawer/DetailDrawer.d.ts +1 -1
- package/dist/components/generic/DetailDrawer/DetailDrawer.d.ts.map +1 -1
- package/dist/components/generic/DocumentRow/DocumentRow.d.ts +1 -1
- package/dist/components/generic/DocumentRow/DocumentRow.d.ts.map +1 -1
- package/dist/components/generic/EditableSection/EditableSection.d.ts +1 -1
- package/dist/components/generic/EditableSection/EditableSection.d.ts.map +1 -1
- package/dist/components/generic/EmptyState/EmptyState.d.ts +1 -1
- package/dist/components/generic/EmptyState/EmptyState.d.ts.map +1 -1
- package/dist/components/generic/ErrorPage/ErrorPage.d.ts +1 -1
- package/dist/components/generic/ErrorPage/ErrorPage.d.ts.map +1 -1
- package/dist/components/generic/Eyebrow/Eyebrow.d.ts +1 -1
- package/dist/components/generic/Eyebrow/Eyebrow.d.ts.map +1 -1
- package/dist/components/generic/FileDropzone/FileDropzone.d.ts +1 -1
- package/dist/components/generic/FileDropzone/FileDropzone.d.ts.map +1 -1
- package/dist/components/generic/ListRow/ListRow.d.ts +1 -1
- package/dist/components/generic/ListRow/ListRow.d.ts.map +1 -1
- package/dist/components/generic/NotificationRow/NotificationRow.d.ts +1 -1
- package/dist/components/generic/NotificationRow/NotificationRow.d.ts.map +1 -1
- package/dist/components/generic/Percent/Percent.d.ts +1 -1
- package/dist/components/generic/Percent/Percent.d.ts.map +1 -1
- package/dist/components/generic/PhotoCropModal/PhotoCropModal.d.ts +1 -1
- package/dist/components/generic/PhotoCropModal/PhotoCropModal.d.ts.map +1 -1
- package/dist/components/generic/ProcessingState/ProcessingState.d.ts +1 -1
- package/dist/components/generic/ProcessingState/ProcessingState.d.ts.map +1 -1
- package/dist/components/generic/RadioCard/RadioCard.d.ts +1 -1
- package/dist/components/generic/RadioCard/RadioCard.d.ts.map +1 -1
- package/dist/components/generic/SearchInput/SearchInput.d.ts +1 -1
- package/dist/components/generic/SearchInput/SearchInput.d.ts.map +1 -1
- package/dist/components/generic/StatCard/StatCard.d.ts +1 -1
- package/dist/components/generic/StatCard/StatCard.d.ts.map +1 -1
- package/dist/components/generic/StatusBadge/StatusBadge.d.ts +1 -1
- package/dist/components/generic/StatusBadge/StatusBadge.d.ts.map +1 -1
- package/dist/components/generic/StepCard/StepCard.d.ts +1 -1
- package/dist/components/generic/StepCard/StepCard.d.ts.map +1 -1
- package/dist/components/generic/StepFlow/StepFlow.d.ts +1 -1
- package/dist/components/generic/StepFlow/StepFlow.d.ts.map +1 -1
- package/dist/components/generic/StepProgress/StepProgress.d.ts +1 -1
- package/dist/components/generic/StepProgress/StepProgress.d.ts.map +1 -1
- package/dist/components/generic/TablePagination/TablePagination.d.ts +1 -1
- package/dist/components/generic/TablePagination/TablePagination.d.ts.map +1 -1
- package/dist/components/generic/TaskInboxPopover/TaskInboxPopover.d.ts +1 -1
- package/dist/components/generic/TaskInboxPopover/TaskInboxPopover.d.ts.map +1 -1
- package/dist/components/generic/TaskRow/TaskRow.d.ts +1 -1
- package/dist/components/generic/TaskRow/TaskRow.d.ts.map +1 -1
- package/dist/components/generic/ValidationWarning/ValidationWarning.d.ts +1 -1
- package/dist/components/generic/ValidationWarning/ValidationWarning.d.ts.map +1 -1
- package/dist/components/layout/AccountSheet/AccountSheet.d.ts +1 -1
- package/dist/components/layout/AccountSheet/AccountSheet.d.ts.map +1 -1
- package/dist/components/layout/AppHeader/AppHeader.d.ts +1 -1
- package/dist/components/layout/AppHeader/AppHeader.d.ts.map +1 -1
- package/dist/components/layout/MobileNav/MobileNav.d.ts +1 -1
- package/dist/components/layout/MobileNav/MobileNav.d.ts.map +1 -1
- package/dist/components/layout/PageHeader/PageHeader.d.ts +1 -1
- package/dist/components/layout/PageHeader/PageHeader.d.ts.map +1 -1
- package/dist/components/layout/SideNav/SideNav.d.ts +1 -1
- package/dist/components/layout/SideNav/SideNav.d.ts.map +1 -1
- package/dist/components/layout/UserMenu/UserMenu.d.ts +1 -1
- package/dist/components/layout/UserMenu/UserMenu.d.ts.map +1 -1
- package/dist/components/primitives/Alert/Alert.d.ts +1 -1
- package/dist/components/primitives/Alert/Alert.d.ts.map +1 -1
- package/dist/components/primitives/Drawer/Drawer.d.ts +1 -1
- package/dist/components/primitives/Drawer/Drawer.d.ts.map +1 -1
- package/dist/components/primitives/Loader/Loader.d.ts +1 -1
- package/dist/components/primitives/Loader/Loader.d.ts.map +1 -1
- package/dist/components/primitives/Menu/Menu.d.ts +1 -1
- package/dist/components/primitives/Menu/Menu.d.ts.map +1 -1
- package/dist/components/primitives/Modal/Modal.d.ts +1 -1
- package/dist/components/primitives/Modal/Modal.d.ts.map +1 -1
- package/dist/components/primitives/Pdf/Pdf.d.ts +2 -2
- package/dist/components/primitives/Pdf/Pdf.d.ts.map +1 -1
- package/dist/components/primitives/Popover/Popover.d.ts +1 -1
- package/dist/components/primitives/Popover/Popover.d.ts.map +1 -1
- package/dist/components/primitives/Skeleton/Skeleton.d.ts +1 -1
- package/dist/components/primitives/Skeleton/Skeleton.d.ts.map +1 -1
- package/dist/components/primitives/Table/Table.d.ts +1 -1
- package/dist/components/primitives/Table/Table.d.ts.map +1 -1
- package/dist/components/primitives/Tabs/Tabs.d.ts +3 -3
- package/dist/components/primitives/Tabs/Tabs.d.ts.map +1 -1
- package/dist/components/primitives/Tooltip/Tooltip.d.ts +1 -1
- package/dist/components/primitives/Tooltip/Tooltip.d.ts.map +1 -1
- package/dist/components/primitives/layout.d.ts +8 -8
- package/dist/components/primitives/layout.d.ts.map +1 -1
- package/dist/components/primitives/muiCompat.cjs.map +1 -1
- package/dist/components/primitives/muiCompat.d.ts +41 -42
- package/dist/components/primitives/muiCompat.d.ts.map +1 -1
- package/dist/components/primitives/muiCompat.js.map +1 -1
- package/dist/components/specific/DocumentRow/DocumentRow.d.ts +1 -1
- package/dist/components/specific/DocumentRow/DocumentRow.d.ts.map +1 -1
- package/dist/components/specific/EquityGrantCard/EquityGrantCard.d.ts +1 -1
- package/dist/components/specific/EquityGrantCard/EquityGrantCard.d.ts.map +1 -1
- package/dist/components/specific/EquityRibbonChart/EquityRibbonChart.d.ts +1 -1
- package/dist/components/specific/EquityRibbonChart/EquityRibbonChart.d.ts.map +1 -1
- package/dist/components/specific/EquityRibbonChart/FairmintRibbonMark.d.ts +1 -1
- package/dist/components/specific/EquityRibbonChart/FairmintRibbonMark.d.ts.map +1 -1
- package/dist/components/specific/InvestmentCard/InvestmentCard.d.ts +1 -1
- package/dist/components/specific/InvestmentCard/InvestmentCard.d.ts.map +1 -1
- package/dist/components/specific/InvestorProfileCard/InvestorProfileCard.d.ts +1 -1
- package/dist/components/specific/InvestorProfileCard/InvestorProfileCard.d.ts.map +1 -1
- package/dist/components/specific/WalletList/WalletList.d.ts +1 -1
- package/dist/components/specific/WalletList/WalletList.d.ts.map +1 -1
- package/dist/components/specific/WalletListItem/WalletListItem.d.ts +1 -1
- package/dist/components/specific/WalletListItem/WalletListItem.d.ts.map +1 -1
- package/dist/node_modules/@mantine/form/esm/hooks/use-form-status/use-form-status.cjs +1 -1
- package/dist/node_modules/@mantine/form/esm/hooks/use-form-status/use-form-status.js +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/createReactComponent.cjs.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/createReactComponent.js.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/defaultAttributes.cjs.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/defaultAttributes.js.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconActivity.cjs.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconActivity.js.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconAlertCircle.cjs.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconAlertCircle.js.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconAlertTriangle.cjs.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconAlertTriangle.js.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconArrowLeft.cjs.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconArrowLeft.js.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconArrowRight.cjs.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconArrowRight.js.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconArrowsExchange.cjs.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconArrowsExchange.js.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconArrowsMaximize.cjs.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconArrowsMaximize.js.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconArrowsSort.cjs.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconArrowsSort.js.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconAward.cjs.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconAward.js.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconBell.cjs.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconBell.js.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconBolt.cjs.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconBolt.js.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconBrandFacebook.cjs.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconBrandFacebook.js.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconBrandInstagram.cjs.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconBrandInstagram.js.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconBrandLinkedin.cjs.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconBrandLinkedin.js.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconBrandX.cjs.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconBrandX.js.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconBrandYoutube.cjs.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconBrandYoutube.js.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconBriefcase.cjs.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconBriefcase.js.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconBuilding.cjs.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconBuilding.js.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconBuildingBank.cjs.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconBuildingBank.js.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconCalendar.cjs.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconCalendar.js.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconCalendarEvent.cjs.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconCalendarEvent.js.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconCashBanknote.cjs.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconCashBanknote.js.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconCategory.cjs.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconCategory.js.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconCertificate.cjs.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconCertificate.js.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconChartBar.cjs.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconChartBar.js.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconChartDots.cjs.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconChartDots.js.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconChartPie.cjs.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconChartPie.js.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconCheck.cjs.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconCheck.js.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconChevronDown.cjs.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconChevronDown.js.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconChevronLeft.cjs.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconChevronLeft.js.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconChevronRight.cjs.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconChevronRight.js.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconChevronUp.cjs.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconChevronUp.js.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconCircleCheck.cjs.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconCircleCheck.js.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconCircleMinus.cjs.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconCircleMinus.js.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconCircleOff.cjs.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconCircleOff.js.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconCircleX.cjs.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconCircleX.js.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconClipboardCheck.cjs.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconClipboardCheck.js.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconClock.cjs.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconClock.js.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconCloudUpload.cjs.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconCloudUpload.js.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconCopy.cjs.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconCopy.js.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconDeviceFloppy.cjs.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconDeviceFloppy.js.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconDeviceMobile.cjs.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconDeviceMobile.js.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconDots.cjs.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconDots.js.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconEdit.cjs.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconEdit.js.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconExternalLink.cjs.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconExternalLink.js.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconEye.cjs.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconEye.js.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconFile.cjs.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconFile.js.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconFileDownload.cjs.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconFileDownload.js.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconFilePlus.cjs.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconFilePlus.js.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconFileText.cjs.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconFileText.js.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconFileTypePdf.cjs.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconFileTypePdf.js.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconFolderPlus.cjs.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconFolderPlus.js.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconHelpCircle.cjs.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconHelpCircle.js.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconHourglass.cjs.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconHourglass.js.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconInfoCircle.cjs.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconInfoCircle.js.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconLanguage.cjs.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconLanguage.js.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutSidebarLeftCollapse.cjs.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutSidebarLeftCollapse.js.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutSidebarLeftExpand.cjs.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconLayoutSidebarLeftExpand.js.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconLock.cjs.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconLock.js.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconLockOpen.cjs.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconLockOpen.js.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconMail.cjs.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconMail.js.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconMapPin.cjs.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconMapPin.js.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconNews.cjs.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconNews.js.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconPencil.cjs.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconPencil.js.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconPlayerPause.cjs.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconPlayerPause.js.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconPlayerPlay.cjs.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconPlayerPlay.js.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconPlayerStop.cjs.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconPlayerStop.js.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconPlus.cjs.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconPlus.js.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconRefresh.cjs.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconRefresh.js.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconReload.cjs.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconReload.js.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconRocket.cjs.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconRocket.js.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconSearch.cjs.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconSearch.js.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconSearchOff.cjs.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconSearchOff.js.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconSend.cjs.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconSend.js.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconSettings.cjs.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconSettings.js.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconShieldCheck.cjs.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconShieldCheck.js.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconShieldDollar.cjs.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconShieldDollar.js.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconShieldOff.cjs.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconShieldOff.js.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconSitemap.cjs.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconSitemap.js.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconSparkles.cjs.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconSparkles.js.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconStar.cjs.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconStar.js.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconTable.cjs.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconTable.js.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconThumbDown.cjs.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconThumbDown.js.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconThumbUp.cjs.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconThumbUp.js.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconTimeline.cjs.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconTimeline.js.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconTrash.cjs.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconTrash.js.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconTrendingUp.cjs.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconTrendingUp.js.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconTrophy.cjs.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconTrophy.js.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconUpload.cjs.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconUpload.js.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconUser.cjs.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconUser.js.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconUserCheck.cjs.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconUserCheck.js.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconUserCircle.cjs.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconUserCircle.js.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconUserPlus.cjs.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconUserPlus.js.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconUsers.cjs.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconUsers.js.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconUsersGroup.cjs.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconUsersGroup.js.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconUsersPlus.cjs.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconUsersPlus.js.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconX.cjs.map +1 -1
- package/dist/node_modules/@tabler/icons-react/dist/esm/icons/IconX.js.map +1 -1
- package/dist/node_modules/dayjs/dayjs.min.cjs +4 -4
- package/dist/node_modules/dayjs/dayjs.min.cjs.map +1 -1
- package/dist/node_modules/dayjs/dayjs.min.js +4 -4
- package/dist/node_modules/dayjs/dayjs.min.js.map +1 -1
- package/dist/node_modules/prop-types/index.cjs +1 -1
- package/dist/node_modules/prop-types/index.js +1 -1
- package/dist/node_modules/zod/v4/classic/checks.cjs +0 -1
- package/dist/node_modules/zod/v4/classic/checks.cjs.map +1 -1
- package/dist/node_modules/zod/v4/classic/checks.js +0 -1
- package/dist/node_modules/zod/v4/classic/checks.js.map +1 -1
- package/dist/node_modules/zod/v4/classic/coerce.cjs +1 -2
- package/dist/node_modules/zod/v4/classic/coerce.cjs.map +1 -1
- package/dist/node_modules/zod/v4/classic/coerce.js +1 -2
- package/dist/node_modules/zod/v4/classic/coerce.js.map +1 -1
- package/dist/node_modules/zod/v4/classic/compat.cjs +0 -1
- package/dist/node_modules/zod/v4/classic/compat.cjs.map +1 -1
- package/dist/node_modules/zod/v4/classic/compat.js +0 -1
- package/dist/node_modules/zod/v4/classic/compat.js.map +1 -1
- package/dist/node_modules/zod/v4/classic/errors.cjs +4 -5
- package/dist/node_modules/zod/v4/classic/errors.cjs.map +1 -1
- package/dist/node_modules/zod/v4/classic/errors.js +4 -5
- package/dist/node_modules/zod/v4/classic/errors.js.map +1 -1
- package/dist/node_modules/zod/v4/classic/external.cjs +2 -0
- package/dist/node_modules/zod/v4/classic/external.cjs.map +1 -1
- package/dist/node_modules/zod/v4/classic/external.js +3 -1
- package/dist/node_modules/zod/v4/classic/from-json-schema.cjs +16 -10
- package/dist/node_modules/zod/v4/classic/from-json-schema.cjs.map +1 -1
- package/dist/node_modules/zod/v4/classic/from-json-schema.js +16 -10
- package/dist/node_modules/zod/v4/classic/from-json-schema.js.map +1 -1
- package/dist/node_modules/zod/v4/classic/iso.cjs +2 -3
- package/dist/node_modules/zod/v4/classic/iso.cjs.map +1 -1
- package/dist/node_modules/zod/v4/classic/iso.js +2 -3
- package/dist/node_modules/zod/v4/classic/iso.js.map +1 -1
- package/dist/node_modules/zod/v4/classic/parse.cjs +1 -2
- package/dist/node_modules/zod/v4/classic/parse.cjs.map +1 -1
- package/dist/node_modules/zod/v4/classic/parse.js +1 -2
- package/dist/node_modules/zod/v4/classic/parse.js.map +1 -1
- package/dist/node_modules/zod/v4/classic/schemas.cjs +325 -112
- package/dist/node_modules/zod/v4/classic/schemas.cjs.map +1 -1
- package/dist/node_modules/zod/v4/classic/schemas.js +327 -114
- package/dist/node_modules/zod/v4/classic/schemas.js.map +1 -1
- package/dist/node_modules/zod/v4/core/api.cjs +2 -2
- package/dist/node_modules/zod/v4/core/api.cjs.map +1 -1
- package/dist/node_modules/zod/v4/core/api.js +2 -2
- package/dist/node_modules/zod/v4/core/api.js.map +1 -1
- package/dist/node_modules/zod/v4/core/core.cjs +6 -4
- package/dist/node_modules/zod/v4/core/core.cjs.map +1 -1
- package/dist/node_modules/zod/v4/core/core.js +6 -4
- package/dist/node_modules/zod/v4/core/core.js.map +1 -1
- package/dist/node_modules/zod/v4/core/errors.cjs +24 -21
- package/dist/node_modules/zod/v4/core/errors.cjs.map +1 -1
- package/dist/node_modules/zod/v4/core/errors.js +24 -21
- package/dist/node_modules/zod/v4/core/errors.js.map +1 -1
- package/dist/node_modules/zod/v4/core/index.cjs +1 -0
- package/dist/node_modules/zod/v4/core/index.cjs.map +1 -1
- package/dist/node_modules/zod/v4/core/index.js +2 -1
- package/dist/node_modules/zod/v4/core/json-schema-processors.cjs +15 -22
- package/dist/node_modules/zod/v4/core/json-schema-processors.cjs.map +1 -1
- package/dist/node_modules/zod/v4/core/json-schema-processors.js +15 -22
- package/dist/node_modules/zod/v4/core/json-schema-processors.js.map +1 -1
- package/dist/node_modules/zod/v4/core/parse.cjs +7 -7
- package/dist/node_modules/zod/v4/core/parse.cjs.map +1 -1
- package/dist/node_modules/zod/v4/core/parse.js +7 -7
- package/dist/node_modules/zod/v4/core/parse.js.map +1 -1
- package/dist/node_modules/zod/v4/core/regexes.cjs +3 -1
- package/dist/node_modules/zod/v4/core/regexes.cjs.map +1 -1
- package/dist/node_modules/zod/v4/core/regexes.js +3 -1
- package/dist/node_modules/zod/v4/core/regexes.js.map +1 -1
- package/dist/node_modules/zod/v4/core/schemas.cjs +176 -53
- package/dist/node_modules/zod/v4/core/schemas.cjs.map +1 -1
- package/dist/node_modules/zod/v4/core/schemas.js +178 -55
- package/dist/node_modules/zod/v4/core/schemas.js.map +1 -1
- package/dist/node_modules/zod/v4/core/to-json-schema.cjs +8 -1
- package/dist/node_modules/zod/v4/core/to-json-schema.cjs.map +1 -1
- package/dist/node_modules/zod/v4/core/to-json-schema.js +8 -1
- package/dist/node_modules/zod/v4/core/to-json-schema.js.map +1 -1
- package/dist/node_modules/zod/v4/core/util.cjs +45 -27
- package/dist/node_modules/zod/v4/core/util.cjs.map +1 -1
- package/dist/node_modules/zod/v4/core/util.js +45 -27
- package/dist/node_modules/zod/v4/core/util.js.map +1 -1
- package/dist/node_modules/zod/v4/core/versions.cjs +2 -2
- package/dist/node_modules/zod/v4/core/versions.cjs.map +1 -1
- package/dist/node_modules/zod/v4/core/versions.js +2 -2
- package/dist/node_modules/zod/v4/core/versions.js.map +1 -1
- package/dist/node_modules/zod/v4/locales/el.cjs +112 -0
- package/dist/node_modules/zod/v4/locales/el.cjs.map +1 -0
- package/dist/node_modules/zod/v4/locales/el.js +113 -0
- package/dist/node_modules/zod/v4/locales/el.js.map +1 -0
- package/dist/node_modules/zod/v4/locales/en.cjs +4 -0
- package/dist/node_modules/zod/v4/locales/en.cjs.map +1 -1
- package/dist/node_modules/zod/v4/locales/en.js +4 -0
- package/dist/node_modules/zod/v4/locales/en.js.map +1 -1
- package/dist/node_modules/zod/v4/locales/fr.cjs +25 -8
- package/dist/node_modules/zod/v4/locales/fr.cjs.map +1 -1
- package/dist/node_modules/zod/v4/locales/fr.js +25 -8
- package/dist/node_modules/zod/v4/locales/fr.js.map +1 -1
- package/dist/node_modules/zod/v4/locales/hr.cjs +125 -0
- package/dist/node_modules/zod/v4/locales/hr.cjs.map +1 -0
- package/dist/node_modules/zod/v4/locales/hr.js +126 -0
- package/dist/node_modules/zod/v4/locales/hr.js.map +1 -0
- package/dist/node_modules/zod/v4/locales/index.cjs +6 -0
- package/dist/node_modules/zod/v4/locales/index.cjs.map +1 -1
- package/dist/node_modules/zod/v4/locales/index.js +88 -82
- package/dist/node_modules/zod/v4/locales/index.js.map +1 -1
- package/dist/node_modules/zod/v4/locales/it.cjs +1 -1
- package/dist/node_modules/zod/v4/locales/it.cjs.map +1 -1
- package/dist/node_modules/zod/v4/locales/it.js +1 -1
- package/dist/node_modules/zod/v4/locales/it.js.map +1 -1
- package/dist/node_modules/zod/v4/locales/ka.cjs +8 -8
- package/dist/node_modules/zod/v4/locales/ka.cjs.map +1 -1
- package/dist/node_modules/zod/v4/locales/ka.js +8 -8
- package/dist/node_modules/zod/v4/locales/ka.js.map +1 -1
- package/dist/node_modules/zod/v4/locales/ro.cjs +122 -0
- package/dist/node_modules/zod/v4/locales/ro.cjs.map +1 -0
- package/dist/node_modules/zod/v4/locales/ro.js +123 -0
- package/dist/node_modules/zod/v4/locales/ro.js.map +1 -0
- package/dist/node_modules/zod/v4/locales/uz.cjs +2 -1
- package/dist/node_modules/zod/v4/locales/uz.cjs.map +1 -1
- package/dist/node_modules/zod/v4/locales/uz.js +2 -1
- package/dist/node_modules/zod/v4/locales/uz.js.map +1 -1
- package/package.json +22 -22
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"core.js","sources":["../../../../../node_modules/zod/v4/core/core.js"],"sourcesContent":["/** A special constant with type `never` */\nexport const NEVER = Object.freeze({\n status: \"aborted\",\n});\nexport /*@__NO_SIDE_EFFECTS__*/ function $constructor(name, initializer, params) {\n function init(inst, def) {\n if (!inst._zod) {\n Object.defineProperty(inst, \"_zod\", {\n value: {\n def,\n constr: _,\n traits: new Set(),\n },\n enumerable: false,\n });\n }\n if (inst._zod.traits.has(name)) {\n return;\n }\n inst._zod.traits.add(name);\n initializer(inst, def);\n // support prototype modifications\n const proto = _.prototype;\n const keys = Object.keys(proto);\n for (let i = 0; i < keys.length; i++) {\n const k = keys[i];\n if (!(k in inst)) {\n inst[k] = proto[k].bind(inst);\n }\n }\n }\n // doesn't work if Parent has a constructor with arguments\n const Parent = params?.Parent ?? Object;\n class Definition extends Parent {\n }\n Object.defineProperty(Definition, \"name\", { value: name });\n function _(def) {\n var _a;\n const inst = params?.Parent ? new Definition() : this;\n init(inst, def);\n (_a = inst._zod).deferred ?? (_a.deferred = []);\n for (const fn of inst._zod.deferred) {\n fn();\n }\n return inst;\n }\n Object.defineProperty(_, \"init\", { value: init });\n Object.defineProperty(_, Symbol.hasInstance, {\n value: (inst) => {\n if (params?.Parent && inst instanceof params.Parent)\n return true;\n return inst?._zod?.traits?.has(name);\n },\n });\n Object.defineProperty(_, \"name\", { value: name });\n return _;\n}\n////////////////////////////// UTILITIES ///////////////////////////////////////\nexport const $brand = Symbol(\"zod_brand\");\nexport class $ZodAsyncError extends Error {\n constructor() {\n super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`);\n }\n}\nexport class $ZodEncodeError extends Error {\n constructor(name) {\n super(`Encountered unidirectional transform during encode: ${name}`);\n this.name = \"ZodEncodeError\";\n }\n}\nexport const globalConfig =
|
|
1
|
+
{"version":3,"file":"core.js","sources":["../../../../../node_modules/zod/v4/core/core.js"],"sourcesContent":["var _a;\n/** A special constant with type `never` */\nexport const NEVER = /*@__PURE__*/ Object.freeze({\n status: \"aborted\",\n});\nexport /*@__NO_SIDE_EFFECTS__*/ function $constructor(name, initializer, params) {\n function init(inst, def) {\n if (!inst._zod) {\n Object.defineProperty(inst, \"_zod\", {\n value: {\n def,\n constr: _,\n traits: new Set(),\n },\n enumerable: false,\n });\n }\n if (inst._zod.traits.has(name)) {\n return;\n }\n inst._zod.traits.add(name);\n initializer(inst, def);\n // support prototype modifications\n const proto = _.prototype;\n const keys = Object.keys(proto);\n for (let i = 0; i < keys.length; i++) {\n const k = keys[i];\n if (!(k in inst)) {\n inst[k] = proto[k].bind(inst);\n }\n }\n }\n // doesn't work if Parent has a constructor with arguments\n const Parent = params?.Parent ?? Object;\n class Definition extends Parent {\n }\n Object.defineProperty(Definition, \"name\", { value: name });\n function _(def) {\n var _a;\n const inst = params?.Parent ? new Definition() : this;\n init(inst, def);\n (_a = inst._zod).deferred ?? (_a.deferred = []);\n for (const fn of inst._zod.deferred) {\n fn();\n }\n return inst;\n }\n Object.defineProperty(_, \"init\", { value: init });\n Object.defineProperty(_, Symbol.hasInstance, {\n value: (inst) => {\n if (params?.Parent && inst instanceof params.Parent)\n return true;\n return inst?._zod?.traits?.has(name);\n },\n });\n Object.defineProperty(_, \"name\", { value: name });\n return _;\n}\n////////////////////////////// UTILITIES ///////////////////////////////////////\nexport const $brand = Symbol(\"zod_brand\");\nexport class $ZodAsyncError extends Error {\n constructor() {\n super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`);\n }\n}\nexport class $ZodEncodeError extends Error {\n constructor(name) {\n super(`Encountered unidirectional transform during encode: ${name}`);\n this.name = \"ZodEncodeError\";\n }\n}\n(_a = globalThis).__zod_globalConfig ?? (_a.__zod_globalConfig = {});\nexport const globalConfig = globalThis.__zod_globalConfig;\nexport function config(newConfig) {\n if (newConfig)\n Object.assign(glob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AAAA,IACzC,OAAO,CAAC,SAAS;AACb,UAAI,QAAQ,UAAU,gBAAgB,OAAO;AACzC,eAAO;AACX,aAAO,MAAM,MAAM,QAAQ,IAAI,IAAI;AAAA,IACvC;AAAA,EACR,CAAK;AACD,SAAO,eAAe,GAAG,QAAQ,EAAE,OAAO,MAAM;AAChD,SAAO;AACX;AAEY,MAAC,SAAS,uBAAO,WAAW;AACjC,MAAM,uBAAuB,MAAM;AAAA,EACtC,cAAc;AACV,UAAM,0EAA0E;AAAA,EACpF;AACJ;AACO,MAAM,wBAAwB,MAAM;AAAA,EACvC,YAAY,MAAM;AACd,UAAM,uDAAuD,IAAI,EAAE;AACnE,SAAK,OAAO;AAAA,EAChB;AACJ;AAAA,CACC,KAAK,YAAY,uBAAuB,GAAG,qBAAqB,CAAA;AACrD,MAAC,eAAe,WAAW;AAChC,SAAS,OAAO,WAAW;AAC9B,MAAI;AACA,WAAO,OAAO,cAAc,SAAS;AACzC,SAAO;AACX;","x_google_ignoreList":[0]}
|
|
@@ -35,30 +35,33 @@ function flattenError(error, mapper = (issue) => issue.message) {
|
|
|
35
35
|
}
|
|
36
36
|
function formatError(error, mapper = (issue) => issue.message) {
|
|
37
37
|
const fieldErrors = { _errors: [] };
|
|
38
|
-
const processError = (error2) => {
|
|
38
|
+
const processError = (error2, path = []) => {
|
|
39
39
|
for (const issue of error2.issues) {
|
|
40
40
|
if (issue.code === "invalid_union" && issue.errors.length) {
|
|
41
|
-
issue.errors.map((issues) => processError({ issues }));
|
|
41
|
+
issue.errors.map((issues) => processError({ issues }, [...path, ...issue.path]));
|
|
42
42
|
} else if (issue.code === "invalid_key") {
|
|
43
|
-
processError({ issues: issue.issues });
|
|
43
|
+
processError({ issues: issue.issues }, [...path, ...issue.path]);
|
|
44
44
|
} else if (issue.code === "invalid_element") {
|
|
45
|
-
processError({ issues: issue.issues });
|
|
46
|
-
} else if (issue.path.length === 0) {
|
|
47
|
-
fieldErrors._errors.push(mapper(issue));
|
|
45
|
+
processError({ issues: issue.issues }, [...path, ...issue.path]);
|
|
48
46
|
} else {
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
47
|
+
const fullpath = [...path, ...issue.path];
|
|
48
|
+
if (fullpath.length === 0) {
|
|
49
|
+
fieldErrors._errors.push(mapper(issue));
|
|
50
|
+
} else {
|
|
51
|
+
let curr = fieldErrors;
|
|
52
|
+
let i = 0;
|
|
53
|
+
while (i < fullpath.length) {
|
|
54
|
+
const el = fullpath[i];
|
|
55
|
+
const terminal = i === fullpath.length - 1;
|
|
56
|
+
if (!terminal) {
|
|
57
|
+
curr[el] = curr[el] || { _errors: [] };
|
|
58
|
+
} else {
|
|
59
|
+
curr[el] = curr[el] || { _errors: [] };
|
|
60
|
+
curr[el]._errors.push(mapper(issue));
|
|
61
|
+
}
|
|
62
|
+
curr = curr[el];
|
|
63
|
+
i++;
|
|
59
64
|
}
|
|
60
|
-
curr = curr[el];
|
|
61
|
-
i++;
|
|
62
65
|
}
|
|
63
66
|
}
|
|
64
67
|
}
|
|
@@ -72,11 +75,11 @@ function treeifyError(error, mapper = (issue) => issue.message) {
|
|
|
72
75
|
var _a, _b;
|
|
73
76
|
for (const issue of error2.issues) {
|
|
74
77
|
if (issue.code === "invalid_union" && issue.errors.length) {
|
|
75
|
-
issue.errors.map((issues) => processError({ issues }, issue.path));
|
|
78
|
+
issue.errors.map((issues) => processError({ issues }, [...path, ...issue.path]));
|
|
76
79
|
} else if (issue.code === "invalid_key") {
|
|
77
|
-
processError({ issues: issue.issues }, issue.path);
|
|
80
|
+
processError({ issues: issue.issues }, [...path, ...issue.path]);
|
|
78
81
|
} else if (issue.code === "invalid_element") {
|
|
79
|
-
processError({ issues: issue.issues }, issue.path);
|
|
82
|
+
processError({ issues: issue.issues }, [...path, ...issue.path]);
|
|
80
83
|
} else {
|
|
81
84
|
const fullpath = [...path, ...issue.path];
|
|
82
85
|
if (fullpath.length === 0) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.cjs","sources":["../../../../../node_modules/zod/v4/core/errors.js"],"sourcesContent":["import { $constructor } from \"./core.js\";\nimport * as util from \"./util.js\";\nconst initializer = (inst, def) => {\n inst.name = \"$ZodError\";\n Object.defineProperty(inst, \"_zod\", {\n value: inst._zod,\n enumerable: false,\n });\n Object.defineProperty(inst, \"issues\", {\n value: def,\n enumerable: false,\n });\n inst.message = JSON.stringify(def, util.jsonStringifyReplacer, 2);\n Object.defineProperty(inst, \"toString\", {\n value: () => inst.message,\n enumerable: false,\n });\n};\nexport const $ZodError = $constructor(\"$ZodError\", initializer);\nexport const $ZodRealError = $constructor(\"$ZodError\", initializer, { Parent: Error });\nexport function flattenError(error, mapper = (issue) => issue.message) {\n const fieldErrors = {};\n const formErrors = [];\n for (const sub of error.issues) {\n if (sub.path.length > 0) {\n fieldErrors[sub.path[0]] = fieldErrors[sub.path[0]] || [];\n fieldErrors[sub.path[0]].push(mapper(sub));\n }\n else {\n formErrors.push(mapper(sub));\n }\n }\n return { formErrors, fieldErrors };\n}\nexport function formatError(error, mapper = (issue) => issue.message) {\n const fieldErrors = { _errors: [] };\n const processError = (error) => {\n for (const issue of error.issues) {\n if (issue.code === \"invalid_union\" && issue.errors.length) {\n issue.errors.map((issues) => processError({ issues }));\n }\n else if (issue.code === \"invalid_key\") {\n processError({ issues: issue.issues });\n }\n else if (issue.code === \"invalid_element\") {\n processError({ issues: issue.issues });\n }\n else if (issue.path.length === 0) {\n fieldErrors._errors.push(mapper(issue));\n }\n else {\n let curr = fieldErrors;\n let i = 0;\n while (i < issue.path.length) {\n const el = issue.path[i];\n const terminal = i === issue.path.length - 1;\n if (!terminal) {\n curr[el] = curr[el] || { _errors: [] };\n }\n else {\n curr[el] = curr[el] || { _errors: [] };\n curr[el]._errors.push(mapper(issue));\n }\n curr = curr[el];\n i++;\n }\n }\n }\n };\n processError(error);\n return fieldErrors;\n}\nexport function treeifyError(error, mapper = (issue) => issue.message) {\n const result = { errors: [] };\n const processError = (error, path = []) => {\n var _a, _b;\n for (const issue of error.issues) {\n if (issue.code === \"invalid_union\" && issue.errors.length) {\n // regular union error\n issue.errors.map((issues) => processError({ issues }, issue.path));\n }\n else if (issue.code === \"invalid_key\") {\n processError({ issues: issue.issues }, issue.path);\n }\n else if (issue.code === \"invalid_element\") {\n processError({ issues: issue.issues }, issue.path);\n }\n else {\n const fullpath = [...path, ...issue.path];\n if (fullpath.length === 0) {\n result.errors.push(mapper(issue));\n continue;\n }\n let curr = result;\n let i = 0;\n while (i < fullpath.length) {\n const el = fullpath[i];\n const terminal = i === fullpath.length - 1;\n if (typeof el === \"string\") {\n curr.properties ?? (curr.properties = {});\n (_a = curr.properties)[el] ?? (_a[el] = { errors: [] });\n curr = curr.properties[el];\n }\n else {\n curr.items ?? (curr.items = []);\n (_b = curr.items)[el] ?? (_b[el] = { errors: [] });\n curr = curr.items[el];\n }\n if (terminal) {\n curr.errors.push(mapper(issue));\n }\n i++;\n }\n }\n }\n };\n processError(error);\n return result;\n}\n/** Format a ZodError as a human-readable string in the following form.\n *\n * From\n *\n * ```ts\n * ZodError {\n * issues: [\n * {\n * expected: 'string',\n * code: 'invalid_type',\n * path: [ 'username' ],\n * message: 'Invalid input: expected string'\n * },\n * {\n * expected: 'number',\n * code: 'invalid_type',\n * path: [ 'favoriteNumbers', 1 ],\n * message: 'Invalid input: expected number'\n * }\n * ];\n * }\n * ```\n *\n * to\n *\n * ```\n * username\n * ✖ Expected number, received string at \"username\n * favoriteNumbers[0]\n * ✖ Invalid input: expected number\n * ```\n */\nexport function toDotPath(_path) {\n const segs = [];\n const path = _path.map((seg) => (typeof seg === \"object\" ? seg.key : seg));\n for (const seg of path) {\n if (typeof seg === \"number\")\n segs.push(`[${seg}]`);\n else if (typeof seg === \"symbol\")\n segs.push(`[${JSON.stringify(String(seg))}]`);\n else if (/[^\\w$]/.test(seg))\n segs.push(`[${JSON.stringify(seg)}]`);\n else {\n if (segs.length)\n segs.push(\".\");\n segs.push(seg);\n }\n }\n return segs.join(\"\");\n}\nexport function prettifyError(error) {\n const lines = [];\n // sort by path length\n const issues = [...error.issues].sort((a, b) => (a.path ?? []).length - (b.path ?? []).length);\n // Process each issue\n for (const issue of issues) {\n lines.push(`✖ ${issue.message}`);\n if (issue.path?.length)\n lines.push(` → at ${toDotPath(issue.path)}`);\n }\n // Convert Map to formatted string\n return lines.join(\"\\n\");\n}\n"],"names":["util.jsonStringifyReplacer","$constructor","error"],"mappings":";;;;AAEA,MAAM,cAAc,CAAC,MAAM,QAAQ;AAC/B,OAAK,OAAO;AACZ,SAAO,eAAe,MAAM,QAAQ;AAAA,IAChC,OAAO,KAAK;AAAA,IACZ,YAAY;AAAA,EACpB,CAAK;AACD,SAAO,eAAe,MAAM,UAAU;AAAA,IAClC,OAAO;AAAA,IACP,YAAY;AAAA,EACpB,CAAK;AACD,OAAK,UAAU,KAAK,UAAU,KAAKA,KAAAA,uBAA4B,CAAC;AAChE,SAAO,eAAe,MAAM,YAAY;AAAA,IACpC,OAAO,MAAM,KAAK;AAAA,IAClB,YAAY;AAAA,EACpB,CAAK;AACL;AACY,MAAC,YAAYC,KAAAA,aAAa,aAAa,WAAW;AAClD,MAAC,gBAAgBA,KAAAA,aAAa,aAAa,aAAa,EAAE,QAAQ,MAAK,CAAE;AAC9E,SAAS,aAAa,OAAO,SAAS,CAAC,UAAU,MAAM,SAAS;AACnE,QAAM,cAAc,CAAA;AACpB,QAAM,aAAa,CAAA;AACnB,aAAW,OAAO,MAAM,QAAQ;AAC5B,QAAI,IAAI,KAAK,SAAS,GAAG;AACrB,kBAAY,IAAI,KAAK,CAAC,CAAC,IAAI,YAAY,IAAI,KAAK,CAAC,CAAC,KAAK,CAAA;AACvD,kBAAY,IAAI,KAAK,CAAC,CAAC,EAAE,KAAK,OAAO,GAAG,CAAC;AAAA,IAC7C,OACK;AACD,iBAAW,KAAK,OAAO,G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A;AACb,QAAM,OAAO,MAAM,IAAI,CAAC,QAAS,OAAO,QAAQ,WAAW,IAAI,MAAM,GAAI;AACzE,aAAW,OAAO,MAAM;AACpB,QAAI,OAAO,QAAQ;AACf,WAAK,KAAK,IAAI,GAAG,GAAG;AAAA,aACf,OAAO,QAAQ;AACpB,WAAK,KAAK,IAAI,KAAK,UAAU,OAAO,GAAG,CAAC,CAAC,GAAG;AAAA,aACvC,SAAS,KAAK,GAAG;AACtB,WAAK,KAAK,IAAI,KAAK,UAAU,GAAG,CAAC,GAAG;AAAA,SACnC;AACD,UAAI,KAAK;AACL,aAAK,KAAK,GAAG;AACjB,WAAK,KAAK,GAAG;AAAA,IACjB;AAAA,EACJ;AACA,SAAO,KAAK,KAAK,EAAE;AACvB;AACO,SAAS,cAAc,OAAO;AACjC,QAAM,QAAQ,CAAA;AAEd,QAAM,SAAS,CAAC,GAAG,MAAM,MAAM,EAAE,KAAK,CAAC,GAAG,OAAO,EAAE,QAAQ,CAAA,GAAI,UAAU,EAAE,QAAQ,CAAA,GAAI,MAAM;AAE7F,aAAW,SAAS,QAAQ;AACxB,UAAM,KAAK,KAAK,MAAM,OAAO,EAAE;AAC/B,QAAI,MAAM,MAAM;AACZ,YAAM,KAAK,UAAU,UAAU,MAAM,IAAI,CAAC,EAAE;AAAA,EACpD;AAEA,SAAO,MAAM,KAAK,IAAI;AAC1B;;;;;;;;","x_google_ignoreList":[0]}
|
|
1
|
+
{"version":3,"file":"errors.cjs","sources":["../../../../../node_modules/zod/v4/core/errors.js"],"sourcesContent":["import { $constructor } from \"./core.js\";\nimport * as util from \"./util.js\";\nconst initializer = (inst, def) => {\n inst.name = \"$ZodError\";\n Object.defineProperty(inst, \"_zod\", {\n value: inst._zod,\n enumerable: false,\n });\n Object.defineProperty(inst, \"issues\", {\n value: def,\n enumerable: false,\n });\n inst.message = JSON.stringify(def, util.jsonStringifyReplacer, 2);\n Object.defineProperty(inst, \"toString\", {\n value: () => inst.message,\n enumerable: false,\n });\n};\nexport const $ZodError = $constructor(\"$ZodError\", initializer);\nexport const $ZodRealError = $constructor(\"$ZodError\", initializer, { Parent: Error });\nexport function flattenError(error, mapper = (issue) => issue.message) {\n const fieldErrors = {};\n const formErrors = [];\n for (const sub of error.issues) {\n if (sub.path.length > 0) {\n fieldErrors[sub.path[0]] = fieldErrors[sub.path[0]] || [];\n fieldErrors[sub.path[0]].push(mapper(sub));\n }\n else {\n formErrors.push(mapper(sub));\n }\n }\n return { formErrors, fieldErrors };\n}\nexport function formatError(error, mapper = (issue) => issue.message) {\n const fieldErrors = { _errors: [] };\n const processError = (error, path = []) => {\n for (const issue of error.issues) {\n if (issue.code === \"invalid_union\" && issue.errors.length) {\n issue.errors.map((issues) => processError({ issues }, [...path, ...issue.path]));\n }\n else if (issue.code === \"invalid_key\") {\n processError({ issues: issue.issues }, [...path, ...issue.path]);\n }\n else if (issue.code === \"invalid_element\") {\n processError({ issues: issue.issues }, [...path, ...issue.path]);\n }\n else {\n const fullpath = [...path, ...issue.path];\n if (fullpath.length === 0) {\n fieldErrors._errors.push(mapper(issue));\n }\n else {\n let curr = fieldErrors;\n let i = 0;\n while (i < fullpath.length) {\n const el = fullpath[i];\n const terminal = i === fullpath.length - 1;\n if (!terminal) {\n curr[el] = curr[el] || { _errors: [] };\n }\n else {\n curr[el] = curr[el] || { _errors: [] };\n curr[el]._errors.push(mapper(issue));\n }\n curr = curr[el];\n i++;\n }\n }\n }\n }\n };\n processError(error);\n return fieldErrors;\n}\nexport function treeifyError(error, mapper = (issue) => issue.message) {\n const result = { errors: [] };\n const processError = (error, path = []) => {\n var _a, _b;\n for (const issue of error.issues) {\n if (issue.code === \"invalid_union\" && issue.errors.length) {\n // regular union error\n issue.errors.map((issues) => processError({ issues }, [...path, ...issue.path]));\n }\n else if (issue.code === \"invalid_key\") {\n processError({ issues: issue.issues }, [...path, ...issue.path]);\n }\n else if (issue.code === \"invalid_element\") {\n processError({ issues: issue.issues }, [...path, ...issue.path]);\n }\n else {\n const fullpath = [...path, ...issue.path];\n if (fullpath.length === 0) {\n result.errors.push(mapper(issue));\n continue;\n }\n let curr = result;\n let i = 0;\n while (i < fullpath.length) {\n const el = fullpath[i];\n const terminal = i === fullpath.length - 1;\n if (typeof el === \"string\") {\n curr.properties ?? (curr.properties = {});\n (_a = curr.properties)[el] ?? (_a[el] = { errors: [] });\n curr = curr.properties[el];\n }\n else {\n curr.items ?? (curr.items = []);\n (_b = curr.items)[el] ?? (_b[el] = { errors: [] });\n curr = curr.items[el];\n }\n if (terminal) {\n curr.errors.push(mapper(issue));\n }\n i++;\n }\n }\n }\n };\n processError(error);\n return result;\n}\n/** Format a ZodError as a human-readable string in the following form.\n *\n * From\n *\n * ```ts\n * ZodError {\n * issues: [\n * {\n * expected: 'string',\n * code: 'invalid_type',\n * path: [ 'username' ],\n * message: 'Invalid input: expected string'\n * },\n * {\n * expected: 'number',\n * code: 'invalid_type',\n * path: [ 'favoriteNumbers', 1 ],\n * message: 'Invalid input: expected number'\n * }\n * ];\n * }\n * ```\n *\n * to\n *\n * ```\n * username\n * ✖ Expected number, received string at \"username\n * favoriteNumbers[0]\n * ✖ Invalid input: expected number\n * ```\n */\nexport function toDotPath(_path) {\n const segs = [];\n const path = _path.map((seg) => (typeof seg === \"object\" ? seg.key : seg));\n for (const seg of path) {\n if (typeof seg === \"number\")\n segs.push(`[${seg}]`);\n else if (typeof seg === \"symbol\")\n segs.push(`[${JSON.stringify(String(seg))}]`);\n else if (/[^\\w$]/.test(seg))\n segs.push(`[${JSON.stringify(seg)}]`);\n else {\n if (segs.length)\n segs.push(\".\");\n segs.push(seg);\n }\n }\n return segs.join(\"\");\n}\nexport function prettifyError(error) {\n const lines = [];\n // sort by path length\n const issues = [...error.issues].sort((a, b) => (a.path ?? []).length - (b.path ?? []).length);\n // Process each issue\n for (const issue of issues) {\n lines.push(`✖ ${issue.message}`);\n if (issue.path?.length)\n lines.push(` → at ${toDotPath(issue.path)}`);\n }\n // Convert Map to formatted string\n return lines.join(\"\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MAAM,IAAI,CAAC,QAAS,OAAO,QAAQ,WAAW,IAAI,MAAM,GAAI;AACzE,aAAW,OAAO,MAAM;AACpB,QAAI,OAAO,QAAQ;AACf,WAAK,KAAK,IAAI,GAAG,GAAG;AAAA,aACf,OAAO,QAAQ;AACpB,WAAK,KAAK,IAAI,KAAK,UAAU,OAAO,GAAG,CAAC,CAAC,GAAG;AAAA,aACvC,SAAS,KAAK,GAAG;AACtB,WAAK,KAAK,IAAI,KAAK,UAAU,GAAG,CAAC,GAAG;AAAA,SACnC;AACD,UAAI,KAAK;AACL,aAAK,KAAK,GAAG;AACjB,WAAK,KAAK,GAAG;AAAA,IACjB;AAAA,EACJ;AACA,SAAO,KAAK,KAAK,EAAE;AACvB;AACO,SAAS,cAAc,OAAO;AACjC,QAAM,QAAQ,CAAA;AAEd,QAAM,SAAS,CAAC,GAAG,MAAM,MAAM,EAAE,KAAK,CAAC,GAAG,OAAO,EAAE,QAAQ,CAAA,GAAI,UAAU,EAAE,QAAQ,CAAA,GAAI,MAAM;AAE7F,aAAW,SAAS,QAAQ;AACxB,UAAM,KAAK,KAAK,MAAM,OAAO,EAAE;AAC/B,QAAI,MAAM,MAAM;AACZ,YAAM,KAAK,UAAU,UAAU,MAAM,IAAI,CAAC,EAAE;AAAA,EACpD;AAEA,SAAO,MAAM,KAAK,IAAI;AAC1B;;;;;;;;","x_google_ignoreList":[0]}
|
|
@@ -33,30 +33,33 @@ function flattenError(error, mapper = (issue) => issue.message) {
|
|
|
33
33
|
}
|
|
34
34
|
function formatError(error, mapper = (issue) => issue.message) {
|
|
35
35
|
const fieldErrors = { _errors: [] };
|
|
36
|
-
const processError = (error2) => {
|
|
36
|
+
const processError = (error2, path = []) => {
|
|
37
37
|
for (const issue of error2.issues) {
|
|
38
38
|
if (issue.code === "invalid_union" && issue.errors.length) {
|
|
39
|
-
issue.errors.map((issues) => processError({ issues }));
|
|
39
|
+
issue.errors.map((issues) => processError({ issues }, [...path, ...issue.path]));
|
|
40
40
|
} else if (issue.code === "invalid_key") {
|
|
41
|
-
processError({ issues: issue.issues });
|
|
41
|
+
processError({ issues: issue.issues }, [...path, ...issue.path]);
|
|
42
42
|
} else if (issue.code === "invalid_element") {
|
|
43
|
-
processError({ issues: issue.issues });
|
|
44
|
-
} else if (issue.path.length === 0) {
|
|
45
|
-
fieldErrors._errors.push(mapper(issue));
|
|
43
|
+
processError({ issues: issue.issues }, [...path, ...issue.path]);
|
|
46
44
|
} else {
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
45
|
+
const fullpath = [...path, ...issue.path];
|
|
46
|
+
if (fullpath.length === 0) {
|
|
47
|
+
fieldErrors._errors.push(mapper(issue));
|
|
48
|
+
} else {
|
|
49
|
+
let curr = fieldErrors;
|
|
50
|
+
let i = 0;
|
|
51
|
+
while (i < fullpath.length) {
|
|
52
|
+
const el = fullpath[i];
|
|
53
|
+
const terminal = i === fullpath.length - 1;
|
|
54
|
+
if (!terminal) {
|
|
55
|
+
curr[el] = curr[el] || { _errors: [] };
|
|
56
|
+
} else {
|
|
57
|
+
curr[el] = curr[el] || { _errors: [] };
|
|
58
|
+
curr[el]._errors.push(mapper(issue));
|
|
59
|
+
}
|
|
60
|
+
curr = curr[el];
|
|
61
|
+
i++;
|
|
57
62
|
}
|
|
58
|
-
curr = curr[el];
|
|
59
|
-
i++;
|
|
60
63
|
}
|
|
61
64
|
}
|
|
62
65
|
}
|
|
@@ -70,11 +73,11 @@ function treeifyError(error, mapper = (issue) => issue.message) {
|
|
|
70
73
|
var _a, _b;
|
|
71
74
|
for (const issue of error2.issues) {
|
|
72
75
|
if (issue.code === "invalid_union" && issue.errors.length) {
|
|
73
|
-
issue.errors.map((issues) => processError({ issues }, issue.path));
|
|
76
|
+
issue.errors.map((issues) => processError({ issues }, [...path, ...issue.path]));
|
|
74
77
|
} else if (issue.code === "invalid_key") {
|
|
75
|
-
processError({ issues: issue.issues }, issue.path);
|
|
78
|
+
processError({ issues: issue.issues }, [...path, ...issue.path]);
|
|
76
79
|
} else if (issue.code === "invalid_element") {
|
|
77
|
-
processError({ issues: issue.issues }, issue.path);
|
|
80
|
+
processError({ issues: issue.issues }, [...path, ...issue.path]);
|
|
78
81
|
} else {
|
|
79
82
|
const fullpath = [...path, ...issue.path];
|
|
80
83
|
if (fullpath.length === 0) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.js","sources":["../../../../../node_modules/zod/v4/core/errors.js"],"sourcesContent":["import { $constructor } from \"./core.js\";\nimport * as util from \"./util.js\";\nconst initializer = (inst, def) => {\n inst.name = \"$ZodError\";\n Object.defineProperty(inst, \"_zod\", {\n value: inst._zod,\n enumerable: false,\n });\n Object.defineProperty(inst, \"issues\", {\n value: def,\n enumerable: false,\n });\n inst.message = JSON.stringify(def, util.jsonStringifyReplacer, 2);\n Object.defineProperty(inst, \"toString\", {\n value: () => inst.message,\n enumerable: false,\n });\n};\nexport const $ZodError = $constructor(\"$ZodError\", initializer);\nexport const $ZodRealError = $constructor(\"$ZodError\", initializer, { Parent: Error });\nexport function flattenError(error, mapper = (issue) => issue.message) {\n const fieldErrors = {};\n const formErrors = [];\n for (const sub of error.issues) {\n if (sub.path.length > 0) {\n fieldErrors[sub.path[0]] = fieldErrors[sub.path[0]] || [];\n fieldErrors[sub.path[0]].push(mapper(sub));\n }\n else {\n formErrors.push(mapper(sub));\n }\n }\n return { formErrors, fieldErrors };\n}\nexport function formatError(error, mapper = (issue) => issue.message) {\n const fieldErrors = { _errors: [] };\n const processError = (error) => {\n for (const issue of error.issues) {\n if (issue.code === \"invalid_union\" && issue.errors.length) {\n issue.errors.map((issues) => processError({ issues }));\n }\n else if (issue.code === \"invalid_key\") {\n processError({ issues: issue.issues });\n }\n else if (issue.code === \"invalid_element\") {\n processError({ issues: issue.issues });\n }\n else if (issue.path.length === 0) {\n fieldErrors._errors.push(mapper(issue));\n }\n else {\n let curr = fieldErrors;\n let i = 0;\n while (i < issue.path.length) {\n const el = issue.path[i];\n const terminal = i === issue.path.length - 1;\n if (!terminal) {\n curr[el] = curr[el] || { _errors: [] };\n }\n else {\n curr[el] = curr[el] || { _errors: [] };\n curr[el]._errors.push(mapper(issue));\n }\n curr = curr[el];\n i++;\n }\n }\n }\n };\n processError(error);\n return fieldErrors;\n}\nexport function treeifyError(error, mapper = (issue) => issue.message) {\n const result = { errors: [] };\n const processError = (error, path = []) => {\n var _a, _b;\n for (const issue of error.issues) {\n if (issue.code === \"invalid_union\" && issue.errors.length) {\n // regular union error\n issue.errors.map((issues) => processError({ issues }, issue.path));\n }\n else if (issue.code === \"invalid_key\") {\n processError({ issues: issue.issues }, issue.path);\n }\n else if (issue.code === \"invalid_element\") {\n processError({ issues: issue.issues }, issue.path);\n }\n else {\n const fullpath = [...path, ...issue.path];\n if (fullpath.length === 0) {\n result.errors.push(mapper(issue));\n continue;\n }\n let curr = result;\n let i = 0;\n while (i < fullpath.length) {\n const el = fullpath[i];\n const terminal = i === fullpath.length - 1;\n if (typeof el === \"string\") {\n curr.properties ?? (curr.properties = {});\n (_a = curr.properties)[el] ?? (_a[el] = { errors: [] });\n curr = curr.properties[el];\n }\n else {\n curr.items ?? (curr.items = []);\n (_b = curr.items)[el] ?? (_b[el] = { errors: [] });\n curr = curr.items[el];\n }\n if (terminal) {\n curr.errors.push(mapper(issue));\n }\n i++;\n }\n }\n }\n };\n processError(error);\n return result;\n}\n/** Format a ZodError as a human-readable string in the following form.\n *\n * From\n *\n * ```ts\n * ZodError {\n * issues: [\n * {\n * expected: 'string',\n * code: 'invalid_type',\n * path: [ 'username' ],\n * message: 'Invalid input: expected string'\n * },\n * {\n * expected: 'number',\n * code: 'invalid_type',\n * path: [ 'favoriteNumbers', 1 ],\n * message: 'Invalid input: expected number'\n * }\n * ];\n * }\n * ```\n *\n * to\n *\n * ```\n * username\n * ✖ Expected number, received string at \"username\n * favoriteNumbers[0]\n * ✖ Invalid input: expected number\n * ```\n */\nexport function toDotPath(_path) {\n const segs = [];\n const path = _path.map((seg) => (typeof seg === \"object\" ? seg.key : seg));\n for (const seg of path) {\n if (typeof seg === \"number\")\n segs.push(`[${seg}]`);\n else if (typeof seg === \"symbol\")\n segs.push(`[${JSON.stringify(String(seg))}]`);\n else if (/[^\\w$]/.test(seg))\n segs.push(`[${JSON.stringify(seg)}]`);\n else {\n if (segs.length)\n segs.push(\".\");\n segs.push(seg);\n }\n }\n return segs.join(\"\");\n}\nexport function prettifyError(error) {\n const lines = [];\n // sort by path length\n const issues = [...error.issues].sort((a, b) => (a.path ?? []).length - (b.path ?? []).length);\n // Process each issue\n for (const issue of issues) {\n lines.push(`✖ ${issue.message}`);\n if (issue.path?.length)\n lines.push(` → at ${toDotPath(issue.path)}`);\n }\n // Convert Map to formatted string\n return lines.join(\"\\n\");\n}\n"],"names":["util.jsonStringifyReplacer","error"],"mappings":";;AAEA,MAAM,cAAc,CAAC,MAAM,QAAQ;AAC/B,OAAK,OAAO;AACZ,SAAO,eAAe,MAAM,QAAQ;AAAA,IAChC,OAAO,KAAK;AAAA,IACZ,YAAY;AAAA,EACpB,CAAK;AACD,SAAO,eAAe,MAAM,UAAU;AAAA,IAClC,OAAO;AAAA,IACP,YAAY;AAAA,EACpB,CAAK;AACD,OAAK,UAAU,KAAK,UAAU,KAAKA,uBAA4B,CAAC;AAChE,SAAO,eAAe,MAAM,YAAY;AAAA,IACpC,OAAO,MAAM,KAAK;AAAA,IAClB,YAAY;AAAA,EACpB,CAAK;AACL;AACY,MAAC,YAAY,aAAa,aAAa,WAAW;AAClD,MAAC,gBAAgB,aAAa,aAAa,aAAa,EAAE,QAAQ,MAAK,CAAE;AAC9E,SAAS,aAAa,OAAO,SAAS,CAAC,UAAU,MAAM,SAAS;AACnE,QAAM,cAAc,CAAA;AACpB,QAAM,aAAa,CAAA;AACnB,aAAW,OAAO,MAAM,QAAQ;AAC5B,QAAI,IAAI,KAAK,SAAS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A,cAAI,UAAU;AACV,iBAAK,OAAO,KAAK,OAAO,KAAK,CAAC;AAAA,UAClC;AACA;AAAA,QACJ;AAAA,MACJ;AAAA,IACJ;AAAA,EACJ;AACA,eAAa,KAAK;AAClB,SAAO;AACX;AAiCO,SAAS,UAAU,OAAO;AAC7B,QAAM,OAAO,CAAA;AACb,QAAM,OAAO,MAAM,IAAI,CAAC,QAAS,OAAO,QAAQ,WAAW,IAAI,MAAM,GAAI;AACzE,aAAW,OAAO,MAAM;AACpB,QAAI,OAAO,QAAQ;AACf,WAAK,KAAK,IAAI,GAAG,GAAG;AAAA,aACf,OAAO,QAAQ;AACpB,WAAK,KAAK,IAAI,KAAK,UAAU,OAAO,GAAG,CAAC,CAAC,GAAG;AAAA,aACvC,SAAS,KAAK,GAAG;AACtB,WAAK,KAAK,IAAI,KAAK,UAAU,GAAG,CAAC,GAAG;AAAA,SACnC;AACD,UAAI,KAAK;AACL,aAAK,KAAK,GAAG;AACjB,WAAK,KAAK,GAAG;AAAA,IACjB;AAAA,EACJ;AACA,SAAO,KAAK,KAAK,EAAE;AACvB;AACO,SAAS,cAAc,OAAO;AACjC,QAAM,QAAQ,CAAA;AAEd,QAAM,SAAS,CAAC,GAAG,MAAM,MAAM,EAAE,KAAK,CAAC,GAAG,OAAO,EAAE,QAAQ,CAAA,GAAI,UAAU,EAAE,QAAQ,CAAA,GAAI,MAAM;AAE7F,aAAW,SAAS,QAAQ;AACxB,UAAM,KAAK,KAAK,MAAM,OAAO,EAAE;AAC/B,QAAI,MAAM,MAAM;AACZ,YAAM,KAAK,UAAU,UAAU,MAAM,IAAI,CAAC,EAAE;AAAA,EACpD;AAEA,SAAO,MAAM,KAAK,IAAI;AAC1B;","x_google_ignoreList":[0]}
|
|
1
|
+
{"version":3,"file":"errors.js","sources":["../../../../../node_modules/zod/v4/core/errors.js"],"sourcesContent":["import { $constructor } from \"./core.js\";\nimport * as util from \"./util.js\";\nconst initializer = (inst, def) => {\n inst.name = \"$ZodError\";\n Object.defineProperty(inst, \"_zod\", {\n value: inst._zod,\n enumerable: false,\n });\n Object.defineProperty(inst, \"issues\", {\n value: def,\n enumerable: false,\n });\n inst.message = JSON.stringify(def, util.jsonStringifyReplacer, 2);\n Object.defineProperty(inst, \"toString\", {\n value: () => inst.message,\n enumerable: false,\n });\n};\nexport const $ZodError = $constructor(\"$ZodError\", initializer);\nexport const $ZodRealError = $constructor(\"$ZodError\", initializer, { Parent: Error });\nexport function flattenError(error, mapper = (issue) => issue.message) {\n const fieldErrors = {};\n const formErrors = [];\n for (const sub of error.issues) {\n if (sub.path.length > 0) {\n fieldErrors[sub.path[0]] = fieldErrors[sub.path[0]] || [];\n fieldErrors[sub.path[0]].push(mapper(sub));\n }\n else {\n formErrors.push(mapper(sub));\n }\n }\n return { formErrors, fieldErrors };\n}\nexport function formatError(error, mapper = (issue) => issue.message) {\n const fieldErrors = { _errors: [] };\n const processError = (error, path = []) => {\n for (const issue of error.issues) {\n if (issue.code === \"invalid_union\" && issue.errors.length) {\n issue.errors.map((issues) => processError({ issues }, [...path, ...issue.path]));\n }\n else if (issue.code === \"invalid_key\") {\n processError({ issues: issue.issues }, [...path, ...issue.path]);\n }\n else if (issue.code === \"invalid_element\") {\n processError({ issues: issue.issues }, [...path, ...issue.path]);\n }\n else {\n const fullpath = [...path, ...issue.path];\n if (fullpath.length === 0) {\n fieldErrors._errors.push(mapper(issue));\n }\n else {\n let curr = fieldErrors;\n let i = 0;\n while (i < fullpath.length) {\n const el = fullpath[i];\n const terminal = i === fullpath.length - 1;\n if (!terminal) {\n curr[el] = curr[el] || { _errors: [] };\n }\n else {\n curr[el] = curr[el] || { _errors: [] };\n curr[el]._errors.push(mapper(issue));\n }\n curr = curr[el];\n i++;\n }\n }\n }\n }\n };\n processError(error);\n return fieldErrors;\n}\nexport function treeifyError(error, mapper = (issue) => issue.message) {\n const result = { errors: [] };\n const processError = (error, path = []) => {\n var _a, _b;\n for (const issue of error.issues) {\n if (issue.code === \"invalid_union\" && issue.errors.length) {\n // regular union error\n issue.errors.map((issues) => processError({ issues }, [...path, ...issue.path]));\n }\n else if (issue.code === \"invalid_key\") {\n processError({ issues: issue.issues }, [...path, ...issue.path]);\n }\n else if (issue.code === \"invalid_element\") {\n processError({ issues: issue.issues }, [...path, ...issue.path]);\n }\n else {\n const fullpath = [...path, ...issue.path];\n if (fullpath.length === 0) {\n result.errors.push(mapper(issue));\n continue;\n }\n let curr = result;\n let i = 0;\n while (i < fullpath.length) {\n const el = fullpath[i];\n const terminal = i === fullpath.length - 1;\n if (typeof el === \"string\") {\n curr.properties ?? (curr.properties = {});\n (_a = curr.properties)[el] ?? (_a[el] = { errors: [] });\n curr = curr.properties[el];\n }\n else {\n curr.items ?? (curr.items = []);\n (_b = curr.items)[el] ?? (_b[el] = { errors: [] });\n curr = curr.items[el];\n }\n if (terminal) {\n curr.errors.push(mapper(issue));\n }\n i++;\n }\n }\n }\n };\n processError(error);\n return result;\n}\n/** Format a ZodError as a human-readable string in the following form.\n *\n * From\n *\n * ```ts\n * ZodError {\n * issues: [\n * {\n * expected: 'string',\n * code: 'invalid_type',\n * path: [ 'username' ],\n * message: 'Invalid input: expected string'\n * },\n * {\n * expected: 'number',\n * code: 'invalid_type',\n * path: [ 'favoriteNumbers', 1 ],\n * message: 'Invalid input: expected number'\n * }\n * ];\n * }\n * ```\n *\n * to\n *\n * ```\n * username\n * ✖ Expected number, received string at \"username\n * favoriteNumbers[0]\n * ✖ Invalid input: expected number\n * ```\n */\nexport function toDotPath(_path) {\n const segs = [];\n const path = _path.map((seg) => (typeof seg === \"object\" ? seg.key : seg));\n for (const seg of path) {\n if (typeof seg === \"number\")\n segs.push(`[${seg}]`);\n else if (typeof seg === \"symbol\")\n segs.push(`[${JSON.stringify(String(seg))}]`);\n else if (/[^\\w$]/.test(seg))\n segs.push(`[${JSON.stringify(seg)}]`);\n else {\n if (segs.length)\n segs.push(\".\");\n segs.push(seg);\n }\n }\n return segs.join(\"\");\n}\nexport function prettifyError(error) {\n const lines = [];\n // sort by path length\n const issues = [...error.issues].sort((a, b) => (a.path ?? []).length - (b.path ?? []).length);\n // Process each issue\n for (const issue of issues) {\n lines.push(`✖ ${issue.message}`);\n if (issue.path?.length)\n lines.push(` → at ${toDotPath(issue.path)}`);\n }\n // Convert Map to formatted string\n return lines.join(\"\\n\");\n}\n"],"names":["util.jsonStringifyReplacer","error"],"mappings":";;AAEA,MAAM,cAAc,CAAC,MAAM,QAAQ;AAC/B,OAAK,OAAO;AACZ,SAAO,eAAe,MAAM,QAAQ;AAAA,IAChC,OAAO,KAAK;AAAA,IACZ,YAAY;AAAA,EACpB,CAAK;AACD,SAAO,eAAe,MAAM,UAAU;AAAA,IAClC,OAAO;AAAA,IACP,YAAY;AAAA,EACpB,CAAK;AACD,OAAK,UAAU,KAAK,UAAU,KAAKA,uBAA4B,CAAC;AAChE,SAAO,eAAe,MAAM,YAAY;AAAA,IACpC,OAAO,MAAM,KAAK;AAAA,IAClB,YAAY;AAAA,EACpB,CAAK;AACL;AACY,MAAC,YAAY,aAAa,aAAa,WAAW;AAClD,MAAC,gBAAgB,aAAa,aAAa,aAAa,EAAE,QAAQ,MAAK,CAAE;AAC9E,SAAS,aAAa,OAAO,SAAS,CAAC,UAAU,MAAM,SAAS;AACnE,QAAM,cAAc,CAAA;AACpB,QAAM,aAAa,CAAA;AACnB,aAAW,OAAO,MAAM,QAAQ;AAC5B,QAAI,IAAI,KAAK,SAAS,GAAG;AACrB,kBAAY,IAAI,KAAK,CAAC,CAAC,IAAI,YAAY,IAAI,KAAK,CAAC,CAAC,KAAK,CAAA;AACvD,kBAAY,IAAI,KAAK,CAAC,CAAC,EAAE,KAAK,OAAO,GAAG,CAAC;AAAA,IAC7C,OACK;AACD,iBAAW,KAAK,OAAO,GAAG,CAAC;AAAA,IAC/B;AAAA,EACJ;AACA,SAAO,EAAE,YAAY,YAAW;AACpC;AACO,SAAS,YAAY,OAAO,SAAS,CAAC,UAAU,MAAM,SAAS;AAClE,QAAM,cAAc,EA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UAClC;AACA;AAAA,QACJ;AAAA,MACJ;AAAA,IACJ;AAAA,EACJ;AACA,eAAa,KAAK;AAClB,SAAO;AACX;AAiCO,SAAS,UAAU,OAAO;AAC7B,QAAM,OAAO,CAAA;AACb,QAAM,OAAO,MAAM,IAAI,CAAC,QAAS,OAAO,QAAQ,WAAW,IAAI,MAAM,GAAI;AACzE,aAAW,OAAO,MAAM;AACpB,QAAI,OAAO,QAAQ;AACf,WAAK,KAAK,IAAI,GAAG,GAAG;AAAA,aACf,OAAO,QAAQ;AACpB,WAAK,KAAK,IAAI,KAAK,UAAU,OAAO,GAAG,CAAC,CAAC,GAAG;AAAA,aACvC,SAAS,KAAK,GAAG;AACtB,WAAK,KAAK,IAAI,KAAK,UAAU,GAAG,CAAC,GAAG;AAAA,SACnC;AACD,UAAI,KAAK;AACL,aAAK,KAAK,GAAG;AACjB,WAAK,KAAK,GAAG;AAAA,IACjB;AAAA,EACJ;AACA,SAAO,KAAK,KAAK,EAAE;AACvB;AACO,SAAS,cAAc,OAAO;AACjC,QAAM,QAAQ,CAAA;AAEd,QAAM,SAAS,CAAC,GAAG,MAAM,MAAM,EAAE,KAAK,CAAC,GAAG,OAAO,EAAE,QAAQ,CAAA,GAAI,UAAU,EAAE,QAAQ,CAAA,GAAI,MAAM;AAE7F,aAAW,SAAS,QAAQ;AACxB,UAAM,KAAK,KAAK,MAAM,OAAO,EAAE;AAC/B,QAAI,MAAM,MAAM;AACZ,YAAM,KAAK,UAAU,UAAU,MAAM,IAAI,CAAC,EAAE;AAAA,EACpD;AAEA,SAAO,MAAM,KAAK,IAAI;AAC1B;","x_google_ignoreList":[0]}
|
|
@@ -106,6 +106,7 @@ exports.$ZodObjectJIT = schemas.$ZodObjectJIT;
|
|
|
106
106
|
exports.$ZodOptional = schemas.$ZodOptional;
|
|
107
107
|
exports.$ZodPipe = schemas.$ZodPipe;
|
|
108
108
|
exports.$ZodPrefault = schemas.$ZodPrefault;
|
|
109
|
+
exports.$ZodPreprocess = schemas.$ZodPreprocess;
|
|
109
110
|
exports.$ZodPromise = schemas.$ZodPromise;
|
|
110
111
|
exports.$ZodReadonly = schemas.$ZodReadonly;
|
|
111
112
|
exports.$ZodRecord = schemas.$ZodRecord;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { $ZodAsyncError, $ZodEncodeError, $brand, $constructor, NEVER, config, globalConfig } from "./core.js";
|
|
2
2
|
import { _decode, _decodeAsync, _encode, _encodeAsync, _parse, _parseAsync, _safeDecode, _safeDecodeAsync, _safeEncode, _safeEncodeAsync, _safeParse, _safeParseAsync, decode, decodeAsync, encode, encodeAsync, parse, parseAsync, safeDecode, safeDecodeAsync, safeEncode, safeEncodeAsync, safeParse, safeParseAsync } from "./parse.js";
|
|
3
3
|
import { $ZodError, $ZodRealError, flattenError, formatError, prettifyError, toDotPath, treeifyError } from "./errors.js";
|
|
4
|
-
import { $ZodAny, $ZodArray, $ZodBase64, $ZodBase64URL, $ZodBigInt, $ZodBigIntFormat, $ZodBoolean, $ZodCIDRv4, $ZodCIDRv6, $ZodCUID, $ZodCUID2, $ZodCatch, $ZodCodec, $ZodCustom, $ZodCustomStringFormat, $ZodDate, $ZodDefault, $ZodDiscriminatedUnion, $ZodE164, $ZodEmail, $ZodEmoji, $ZodEnum, $ZodExactOptional, $ZodFile, $ZodFunction, $ZodGUID, $ZodIPv4, $ZodIPv6, $ZodISODate, $ZodISODateTime, $ZodISODuration, $ZodISOTime, $ZodIntersection, $ZodJWT, $ZodKSUID, $ZodLazy, $ZodLiteral, $ZodMAC, $ZodMap, $ZodNaN, $ZodNanoID, $ZodNever, $ZodNonOptional, $ZodNull, $ZodNullable, $ZodNumber, $ZodNumberFormat, $ZodObject, $ZodObjectJIT, $ZodOptional, $ZodPipe, $ZodPrefault, $ZodPromise, $ZodReadonly, $ZodRecord, $ZodSet, $ZodString, $ZodStringFormat, $ZodSuccess, $ZodSymbol, $ZodTemplateLiteral, $ZodTransform, $ZodTuple, $ZodType, $ZodULID, $ZodURL, $ZodUUID, $ZodUndefined, $ZodUnion, $ZodUnknown, $ZodVoid, $ZodXID, $ZodXor, isValidBase64, isValidBase64URL, isValidJWT } from "./schemas.js";
|
|
4
|
+
import { $ZodAny, $ZodArray, $ZodBase64, $ZodBase64URL, $ZodBigInt, $ZodBigIntFormat, $ZodBoolean, $ZodCIDRv4, $ZodCIDRv6, $ZodCUID, $ZodCUID2, $ZodCatch, $ZodCodec, $ZodCustom, $ZodCustomStringFormat, $ZodDate, $ZodDefault, $ZodDiscriminatedUnion, $ZodE164, $ZodEmail, $ZodEmoji, $ZodEnum, $ZodExactOptional, $ZodFile, $ZodFunction, $ZodGUID, $ZodIPv4, $ZodIPv6, $ZodISODate, $ZodISODateTime, $ZodISODuration, $ZodISOTime, $ZodIntersection, $ZodJWT, $ZodKSUID, $ZodLazy, $ZodLiteral, $ZodMAC, $ZodMap, $ZodNaN, $ZodNanoID, $ZodNever, $ZodNonOptional, $ZodNull, $ZodNullable, $ZodNumber, $ZodNumberFormat, $ZodObject, $ZodObjectJIT, $ZodOptional, $ZodPipe, $ZodPrefault, $ZodPreprocess, $ZodPromise, $ZodReadonly, $ZodRecord, $ZodSet, $ZodString, $ZodStringFormat, $ZodSuccess, $ZodSymbol, $ZodTemplateLiteral, $ZodTransform, $ZodTuple, $ZodType, $ZodULID, $ZodURL, $ZodUUID, $ZodUndefined, $ZodUnion, $ZodUnknown, $ZodVoid, $ZodXID, $ZodXor, isValidBase64, isValidBase64URL, isValidJWT } from "./schemas.js";
|
|
5
5
|
import { $ZodCheck, $ZodCheckBigIntFormat, $ZodCheckEndsWith, $ZodCheckGreaterThan, $ZodCheckIncludes, $ZodCheckLengthEquals, $ZodCheckLessThan, $ZodCheckLowerCase, $ZodCheckMaxLength, $ZodCheckMaxSize, $ZodCheckMimeType, $ZodCheckMinLength, $ZodCheckMinSize, $ZodCheckMultipleOf, $ZodCheckNumberFormat, $ZodCheckOverwrite, $ZodCheckProperty, $ZodCheckRegex, $ZodCheckSizeEquals, $ZodCheckStartsWith, $ZodCheckStringFormat, $ZodCheckUpperCase } from "./checks.js";
|
|
6
6
|
import { version } from "./versions.js";
|
|
7
7
|
import * as util from "./util.js";
|
|
@@ -93,6 +93,7 @@ export {
|
|
|
93
93
|
$ZodOptional,
|
|
94
94
|
$ZodPipe,
|
|
95
95
|
$ZodPrefault,
|
|
96
|
+
$ZodPreprocess,
|
|
96
97
|
$ZodPromise,
|
|
97
98
|
$ZodReadonly,
|
|
98
99
|
$ZodRealError,
|
|
@@ -49,39 +49,28 @@ const numberProcessor = (schema, ctx, _json, _params) => {
|
|
|
49
49
|
json.type = "integer";
|
|
50
50
|
else
|
|
51
51
|
json.type = "number";
|
|
52
|
-
|
|
53
|
-
|
|
52
|
+
const exMin = typeof exclusiveMinimum === "number" && exclusiveMinimum >= (minimum ?? Number.NEGATIVE_INFINITY);
|
|
53
|
+
const exMax = typeof exclusiveMaximum === "number" && exclusiveMaximum <= (maximum ?? Number.POSITIVE_INFINITY);
|
|
54
|
+
const legacy = ctx.target === "draft-04" || ctx.target === "openapi-3.0";
|
|
55
|
+
if (exMin) {
|
|
56
|
+
if (legacy) {
|
|
54
57
|
json.minimum = exclusiveMinimum;
|
|
55
58
|
json.exclusiveMinimum = true;
|
|
56
59
|
} else {
|
|
57
60
|
json.exclusiveMinimum = exclusiveMinimum;
|
|
58
61
|
}
|
|
59
|
-
}
|
|
60
|
-
if (typeof minimum === "number") {
|
|
62
|
+
} else if (typeof minimum === "number") {
|
|
61
63
|
json.minimum = minimum;
|
|
62
|
-
if (typeof exclusiveMinimum === "number" && ctx.target !== "draft-04") {
|
|
63
|
-
if (exclusiveMinimum >= minimum)
|
|
64
|
-
delete json.minimum;
|
|
65
|
-
else
|
|
66
|
-
delete json.exclusiveMinimum;
|
|
67
|
-
}
|
|
68
64
|
}
|
|
69
|
-
if (
|
|
70
|
-
if (
|
|
65
|
+
if (exMax) {
|
|
66
|
+
if (legacy) {
|
|
71
67
|
json.maximum = exclusiveMaximum;
|
|
72
68
|
json.exclusiveMaximum = true;
|
|
73
69
|
} else {
|
|
74
70
|
json.exclusiveMaximum = exclusiveMaximum;
|
|
75
71
|
}
|
|
76
|
-
}
|
|
77
|
-
if (typeof maximum === "number") {
|
|
72
|
+
} else if (typeof maximum === "number") {
|
|
78
73
|
json.maximum = maximum;
|
|
79
|
-
if (typeof exclusiveMaximum === "number" && ctx.target !== "draft-04") {
|
|
80
|
-
if (exclusiveMaximum <= maximum)
|
|
81
|
-
delete json.maximum;
|
|
82
|
-
else
|
|
83
|
-
delete json.exclusiveMaximum;
|
|
84
|
-
}
|
|
85
74
|
}
|
|
86
75
|
if (typeof multipleOf === "number")
|
|
87
76
|
json.multipleOf = multipleOf;
|
|
@@ -252,7 +241,10 @@ const arrayProcessor = (schema, ctx, _json, params) => {
|
|
|
252
241
|
if (typeof maximum === "number")
|
|
253
242
|
json.maxItems = maximum;
|
|
254
243
|
json.type = "array";
|
|
255
|
-
json.items = toJsonSchema.process(def.element, ctx, {
|
|
244
|
+
json.items = toJsonSchema.process(def.element, ctx, {
|
|
245
|
+
...params,
|
|
246
|
+
path: [...params.path, "items"]
|
|
247
|
+
});
|
|
256
248
|
};
|
|
257
249
|
const objectProcessor = (schema, ctx, _json, params) => {
|
|
258
250
|
const json = _json;
|
|
@@ -445,7 +437,8 @@ const catchProcessor = (schema, ctx, json, params) => {
|
|
|
445
437
|
};
|
|
446
438
|
const pipeProcessor = (schema, ctx, _json, params) => {
|
|
447
439
|
const def = schema._zod.def;
|
|
448
|
-
const
|
|
440
|
+
const inIsTransform = def.in._zod.traits.has("$ZodTransform");
|
|
441
|
+
const innerType = ctx.io === "input" ? inIsTransform ? def.out : def.in : def.out;
|
|
449
442
|
toJsonSchema.process(innerType, ctx, params);
|
|
450
443
|
const seen = ctx.seen.get(schema);
|
|
451
444
|
seen.ref = innerType;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"json-schema-processors.cjs","sources":["../../../../../node_modules/zod/v4/core/json-schema-processors.js"],"sourcesContent":["import { extractDefs, finalize, initializeContext, process, } from \"./to-json-schema.js\";\nimport { getEnumValues } from \"./util.js\";\nconst formatMap = {\n guid: \"uuid\",\n url: \"uri\",\n datetime: \"date-time\",\n json_string: \"json-string\",\n regex: \"\", // do not set\n};\n// ==================== SIMPLE TYPE PROCESSORS ====================\nexport const stringProcessor = (schema, ctx, _json, _params) => {\n const json = _json;\n json.type = \"string\";\n const { minimum, maximum, format, patterns, contentEncoding } = schema._zod\n .bag;\n if (typeof minimum === \"number\")\n json.minLength = minimum;\n if (typeof maximum === \"number\")\n json.maxLength = maximum;\n // custom pattern overrides format\n if (format) {\n json.format = formatMap[format] ?? format;\n if (json.format === \"\")\n delete json.format; // empty format is not valid\n // JSON Schema format: \"time\" requires a full time with offset or Z\n // z.iso.time() does not include timezone information, so format: \"time\" should never be used\n if (format === \"time\") {\n delete json.format;\n }\n }\n if (contentEncoding)\n json.contentEncoding = contentEncoding;\n if (patterns && patterns.size > 0) {\n const regexes = [...patterns];\n if (regexes.length === 1)\n json.pattern = regexes[0].source;\n else if (regexes.length > 1) {\n json.allOf = [\n ...regexes.map((regex) => ({\n ...(ctx.target === \"draft-07\" || ctx.target === \"draft-04\" || ctx.target === \"openapi-3.0\"\n ? { type: \"string\" }\n : {}),\n pattern: regex.source,\n })),\n ];\n }\n }\n};\nexport const numberProcessor = (schema, ctx, _json, _params) => {\n const json = _json;\n const { minimum, maximum, format, multipleOf, exclusiveMaximum, exclusiveMinimum } = schema._zod.bag;\n if (typeof format === \"string\" && format.includes(\"int\"))\n json.type = \"integer\";\n else\n json.type = \"number\";\n if (typeof exclusiveMinimum === \"number\") {\n if (ctx.target === \"draft-04\" || ctx.target === \"openapi-3.0\") {\n json.minimum = exclusiveMinimum;\n json.exclusiveMinimum = true;\n }\n else {\n json.exclusiveMinimum = exclusiveMinimum;\n }\n }\n if (typeof minimum === \"number\") {\n json.minimum = minimum;\n if (typeof exclusiveMinimum === \"number\" && ctx.target !== \"draft-04\") {\n if (exclusiveMinimum >= minimum)\n delete json.minimum;\n else\n delete json.exclusiveMinimum;\n }\n }\n if (typeof exclusiveMaximum === \"number\") {\n if (ctx.target === \"draft-04\" || ctx.target === \"openapi-3.0\") {\n json.maximum = exclusiveMaximum;\n json.exclusiveMaximum = true;\n }\n else {\n json.exclusiveMaximum = exclusiveMaximum;\n }\n }\n if (typeof maximum === \"number\") {\n json.maximum = maximum;\n if (typeof exclusiveMaximum === \"number\" && ctx.target !== \"draft-04\") {\n if (exclusiveMaximum <= maximum)\n delete json.maximum;\n else\n delete json.exclusiveMaximum;\n }\n }\n if (typeof multipleOf === \"number\")\n json.multipleOf = multipleOf;\n};\nexport const booleanProcessor = (_schema, _ctx, json, _params) => {\n json.type = \"boolean\";\n};\nexport const bigintProcessor = (_schema, ctx, _json, _params) => {\n if (ctx.unrepresentable === \"throw\") {\n throw new Error(\"BigInt cannot be represented in JSON Schema\");\n }\n};\nexport const symbolProcessor = (_schema, ctx, _json, _params) => {\n if (ctx.unrepresentable === \"throw\") {\n throw new Error(\"Symbols cannot be represented in JSON Schema\");\n }\n};\nexport const nullProcessor = (_schema, ctx, json, _params) => {\n if (ctx.target === \"openapi-3.0\") {\n json.type = \"string\";\n json.nullable = true;\n json.enum = [null];\n }\n else {\n json.type = \"null\";\n }\n};\nexport const undefinedProcessor = (_schema, ctx, _json, _params) => {\n if (ctx.unrepresentable === \"throw\") {\n throw new Error(\"Undefined cannot be represented in JSON Schema\");\n }\n};\nexport const voidProcessor = (_schema, ctx, _json, _params) => {\n if (ctx.unrepresentable === \"throw\") {\n throw new Error(\"Void cannot be represented in JSON Schema\");\n }\n};\nexport const neverProcessor = (_schema, _ctx, json, _params) => {\n json.not = {};\n};\nexport const anyProcessor = (_schema, _ctx, _json, _params) => {\n // empty schema accepts anything\n};\nexport const unknownProcessor = (_schema, _ctx, _json, _params) => {\n // empty schema accepts anything\n};\nexport const dateProcessor = (_schema, ctx, _json, _params) => {\n if (ctx.unrepresentable === \"throw\") {\n throw new Error(\"Date cannot be represented in JSON Schema\");\n }\n};\nexport const enumProcessor = (schema, _ctx, json, _params) => {\n const def = schema._zod.def;\n const values = getEnumValues(def.entries);\n // Number enums can have both string and number values\n if (values.every((v) => typeof v === \"number\"))\n json.type = \"number\";\n if (values.every((v) => typeof v === \"string\"))\n json.type = \"string\";\n json.enum = values;\n};\nexport const literalProcessor = (schema, ctx, json, _params) => {\n const def = schema._zod.def;\n const vals = [];\n for (const val of def.values) {\n if (val === undefined) {\n if (ctx.unrepresentable === \"throw\") {\n throw new Error(\"Literal `undefined` cannot be represented in JSON Schema\");\n }\n else {\n // do not add to vals\n }\n }\n else if (typeof val === \"bigint\") {\n if (ctx.unrepresentable === \"throw\") {\n throw new Error(\"BigInt literals cannot be represented in JSON Schema\");\n }\n else {\n vals.push(Number(val));\n }\n }\n else {\n vals.push(val);\n }\n }\n if (vals.length === 0) {\n // do nothing (an undefined literal was stripped)\n }\n else if (vals.length === 1) {\n const val = vals[0];\n json.type = val === null ? \"null\" : typeof val;\n if (ctx.target === \"draft-04\" || ctx.target === \"openapi-3.0\") {\n json.enum = [val];\n }\n else {\n json.const = val;\n }\n }\n else {\n if (vals.every((v) => typeof v === \"number\"))\n json.type = \"number\";\n if (vals.every((v) => typeof v === \"string\"))\n json.type = \"string\";\n if (vals.every((v) => typeof v === \"boolean\"))\n json.type = \"boolean\";\n if (vals.every((v) => v === null))\n json.type = \"null\";\n json.enum = vals;\n }\n};\nexport const nanProcessor = (_schema, ctx, _json, _params) => {\n if (ctx.unrepresentable === \"throw\") {\n throw new Error(\"NaN cannot be represented in JSON Schema\");\n }\n};\nexport const templateLiteralProcessor = (schema, _ctx, json, _params) => {\n const _json = json;\n const pattern = schema._zod.pattern;\n if (!pattern)\n throw new Error(\"Pattern not found in template literal\");\n _json.type = \"string\";\n _json.pattern = pattern.source;\n};\nexport const fileProcessor = (schema, _ctx, json, _params) => {\n const _json = json;\n const file = {\n type: \"string\",\n format: \"binary\",\n contentEncoding: \"binary\",\n };\n const { minimum, maximum, mime } = schema._zod.bag;\n if (minimum !== undefined)\n file.minLength = minimum;\n if (maximum !== undefined)\n file.maxLength = maximum;\n if (mime) {\n if (mime.length === 1) {\n file.contentMediaType = mime[0];\n Object.assign(_json, file);\n }\n else {\n Object.assign(_json, file); // shared props at root\n _json.anyOf = mime.map((m) => ({ contentMediaType: m })); // only contentMediaType differs\n }\n }\n else {\n Object.assign(_json, file);\n }\n};\nexport const successProcessor = (_schema, _ctx, json, _params) => {\n json.type = \"boolean\";\n};\nexport const customProcessor = (_schema, ctx, _json, _params) => {\n if (ctx.unrepresentable === \"throw\") {\n throw new Error(\"Custom types cannot be represented in JSON Schema\");\n }\n};\nexport const functionProcessor = (_schema, ctx, _json, _params) => {\n if (ctx.unrepresentable === \"throw\") {\n throw new Error(\"Function types cannot be represented in JSON Schema\");\n }\n};\nexport const transformProcessor = (_schema, ctx, _json, _params) => {\n if (ctx.unrepresentable === \"throw\") {\n throw new Error(\"Transforms cannot be represented in JSON Schema\");\n }\n};\nexport const mapProcessor = (_schema, ctx, _json, _params) => {\n if (ctx.unrepresentable === \"throw\") {\n throw new Error(\"Map cannot be represented in JSON Schema\");\n }\n};\nexport const setProcessor = (_schema, ctx, _json, _params) => {\n if (ctx.unrepresentable === \"throw\") {\n throw new Error(\"Set cannot be represented in JSON Schema\");\n }\n};\n// ==================== COMPOSITE TYPE PROCESSORS ====================\nexport const arrayProcessor = (schema, ctx, _json, params) => {\n const json = _json;\n const def = schema._zod.def;\n const { minimum, maximum } = schema._zod.bag;\n if (typeof minimum === \"number\")\n json.minItems = minimum;\n if (typeof maximum === \"number\")\n json.maxItems = maximum;\n json.type = \"array\";\n json.items = process(def.element, ctx, { ...params, path: [...params.path, \"items\"] });\n};\nexport const objectProcessor = (schema, ctx, _json, params) => {\n const json = _json;\n const def = schema._zod.def;\n json.type = \"object\";\n json.properties = {};\n const shape = def.shape;\n for (const key in shape) {\n json.properties[key] = process(shape[key], ctx, {\n ...params,\n path: [...params.path, \"properties\", key],\n });\n }\n // required keys\n const allKeys = new Set(Object.keys(shape));\n const requiredKeys = new Set([...allKeys].filter((key) => {\n const v = def.shape[key]._zod;\n if (ctx.io === \"input\") {\n return v.optin === undefined;\n }\n else {\n return v.optout === undefined;\n }\n }));\n if (requiredKeys.size > 0) {\n json.required = Array.from(requiredKeys);\n }\n // catchall\n if (def.catchall?._zod.def.type === \"never\") {\n // strict\n json.additionalProperties = false;\n }\n else if (!def.catchall) {\n // regular\n if (ctx.io === \"output\")\n json.additionalProperties = false;\n }\n else if (def.catchall) {\n json.additionalProperties = process(def.catchall, ctx, {\n ...params,\n path: [...params.path, \"additionalProperties\"],\n });\n }\n};\nexport const unionProcessor = (schema, ctx, json, params) => {\n const def = schema._zod.def;\n // Exclusive unions (inclusive === false) use oneOf (exactly one match) instead of anyOf (one or more matches)\n // This includes both z.xor() and discriminated unions\n const isExclusive = def.inclusive === false;\n const options = def.options.map((x, i) => process(x, ctx, {\n ...params,\n path: [...params.path, isExclusive ? \"oneOf\" : \"anyOf\", i],\n }));\n if (isExclusive) {\n json.oneOf = options;\n }\n else {\n json.anyOf = options;\n }\n};\nexport const intersectionProcessor = (schema, ctx, json, params) => {\n const def = schema._zod.def;\n const a = process(def.left, ctx, {\n ...params,\n path: [...params.path, \"allOf\", 0],\n });\n const b = process(def.right, ctx, {\n ...params,\n path: [...params.path, \"allOf\", 1],\n });\n const isSimpleIntersection = (val) => \"allOf\" in val && Object.keys(val).length === 1;\n const allOf = [\n ...(isSimpleIntersection(a) ? a.allOf : [a]),\n ...(isSimpleIntersection(b) ? b.allOf : [b]),\n ];\n json.allOf = allOf;\n};\nexport const tupleProcessor = (schema, ctx, _json, params) => {\n const json = _json;\n const def = schema._zod.def;\n json.type = \"array\";\n const prefixPath = ctx.target === \"draft-2020-12\" ? \"prefixItems\" : \"items\";\n const restPath = ctx.target === \"draft-2020-12\" ? \"items\" : ctx.target === \"openapi-3.0\" ? \"items\" : \"additionalItems\";\n const prefixItems = def.items.map((x, i) => process(x, ctx, {\n ...params,\n path: [...params.path, prefixPath, i],\n }));\n const rest = def.rest\n ? process(def.rest, ctx, {\n ...params,\n path: [...params.path, restPath, ...(ctx.target === \"openapi-3.0\" ? [def.items.length] : [])],\n })\n : null;\n if (ctx.target === \"draft-2020-12\") {\n json.prefixItems = prefixItems;\n if (rest) {\n json.items = rest;\n }\n }\n else if (ctx.target === \"openapi-3.0\") {\n json.items = {\n anyOf: prefixItems,\n };\n if (rest) {\n json.items.anyOf.push(rest);\n }\n json.minItems = prefixItems.length;\n if (!rest) {\n json.maxItems = prefixItems.length;\n }\n }\n else {\n json.items = prefixItems;\n if (rest) {\n json.additionalItems = rest;\n }\n }\n // length\n const { minimum, maximum } = schema._zod.bag;\n if (typeof minimum === \"number\")\n json.minItems = minimum;\n if (typeof maximum === \"number\")\n json.maxItems = maximum;\n};\nexport const recordProcessor = (schema, ctx, _json, params) => {\n const json = _json;\n const def = schema._zod.def;\n json.type = \"object\";\n // For looseRecord with regex patterns, use patternProperties\n // This correctly represents \"only validate keys matching the pattern\" semantics\n // and composes well with allOf (intersections)\n const keyType = def.keyType;\n const keyBag = keyType._zod.bag;\n const patterns = keyBag?.patterns;\n if (def.mode === \"loose\" && patterns && patterns.size > 0) {\n // Use patternProperties for looseRecord with regex patterns\n const valueSchema = process(def.valueType, ctx, {\n ...params,\n path: [...params.path, \"patternProperties\", \"*\"],\n });\n json.patternProperties = {};\n for (const pattern of patterns) {\n json.patternProperties[pattern.source] = valueSchema;\n }\n }\n else {\n // Default behavior: use propertyNames + additionalProperties\n if (ctx.target === \"draft-07\" || ctx.target === \"draft-2020-12\") {\n json.propertyNames = process(def.keyType, ctx, {\n ...params,\n path: [...params.path, \"propertyNames\"],\n });\n }\n json.additionalProperties = process(def.valueType, ctx, {\n ...params,\n path: [...params.path, \"additionalProperties\"],\n });\n }\n // Add required for keys with discrete values (enum, literal, etc.)\n const keyValues = keyType._zod.values;\n if (keyValues) {\n const validKeyValues = [...keyValues].filter((v) => typeof v === \"string\" || typeof v === \"number\");\n if (validKeyValues.length > 0) {\n json.required = validKeyValues;\n }\n }\n};\nexport const nullableProcessor = (schema, ctx, json, params) => {\n const def = schema._zod.def;\n const inner = process(def.innerType, ctx, params);\n const seen = ctx.seen.get(schema);\n if (ctx.target === \"openapi-3.0\") {\n seen.ref = def.innerType;\n json.nullable = true;\n }\n else {\n json.anyOf = [inner, { type: \"null\" }];\n }\n};\nexport const nonoptionalProcessor = (schema, ctx, _json, params) => {\n const def = schema._zod.def;\n process(def.innerType, ctx, params);\n const seen = ctx.seen.get(schema);\n seen.ref = def.innerType;\n};\nexport const defaultProcessor = (schema, ctx, json, params) => {\n const def = schema._zod.def;\n process(def.innerType, ctx, params);\n const seen = ctx.seen.get(schema);\n seen.ref = def.innerType;\n json.default = JSON.parse(JSON.stringify(def.defaultValue));\n};\nexport const prefaultProcessor = (schema, ctx, json, params) => {\n const def = schema._zod.def;\n process(def.innerType, ctx, params);\n const seen = ctx.seen.get(schema);\n seen.ref = def.innerType;\n if (ctx.io === \"input\")\n json._prefault = JSON.parse(JSON.stringify(def.defaultValue));\n};\nexport const catchProcessor = (schema, ctx, json, params) => {\n const def = schema._zod.def;\n process(def.innerType, ctx, params);\n const seen = ctx.seen.get(schema);\n seen.ref = def.innerType;\n let catchValue;\n try {\n catchValue = def.catchValue(undefined);\n }\n catch {\n throw new Error(\"Dynamic catch values are not supported in JSON Schema\");\n }\n json.default = catchValue;\n};\nexport const pipeProcessor = (schema, ctx, _json, params) => {\n const def = schema._zod.def;\n const innerType = ctx.io === \"input\" ? (def.in._zod.def.type === \"transform\" ? def.out : def.in) : def.out;\n process(innerType, ctx, params);\n const seen = ctx.seen.get(schema);\n seen.ref = innerType;\n};\nexport const readonlyProcessor = (schema, ctx, json, params) => {\n const def = schema._zod.def;\n process(def.innerType, ctx, params);\n const seen = ctx.seen.get(schema);\n seen.ref = def.innerType;\n json.readOnly = true;\n};\nexport const promiseProcessor = (schema, ctx, _json, params) => {\n const def = schema._zod.def;\n process(def.innerType, ctx, params);\n const seen = ctx.seen.get(schema);\n seen.ref = def.innerType;\n};\nexport const optionalProcessor = (schema, ctx, _json, params) => {\n const def = schema._zod.def;\n process(def.innerType, ctx, params);\n const seen = ctx.seen.get(schema);\n seen.ref = def.innerType;\n};\nexport const lazyProcessor = (schema, ctx, _json, params) => {\n const innerType = schema._zod.innerType;\n process(innerType, ctx, params);\n const seen = ctx.seen.get(schema);\n seen.ref = innerType;\n};\n// ==================== ALL PROCESSORS ====================\nexport const allProcessors = {\n string: stringProcessor,\n number: numberProcessor,\n boolean: booleanProcessor,\n bigint: bigintProcessor,\n symbol: symbolProcessor,\n null: nullProcessor,\n undefined: undefinedProcessor,\n void: voidProcessor,\n never: neverProcessor,\n any: anyProcessor,\n unknown: unknownProcessor,\n date: dateProcessor,\n enum: enumProcessor,\n literal: literalProcessor,\n nan: nanProcessor,\n template_literal: templateLiteralProcessor,\n file: fileProcessor,\n success: successProcessor,\n custom: customProcessor,\n function: functionProcessor,\n transform: transformProcessor,\n map: mapProcessor,\n set: setProcessor,\n array: arrayProcessor,\n object: objectProcessor,\n union: unionProcessor,\n intersection: intersectionProcessor,\n tuple: tupleProcessor,\n record: recordProcessor,\n nullable: nullableProcessor,\n nonoptional: nonoptionalProcessor,\n default: defaultProcessor,\n prefault: prefaultProcessor,\n catch: catchProcessor,\n pipe: pipeProcessor,\n readonly: readonlyProcessor,\n promise: promiseProcessor,\n optional: optionalProcessor,\n lazy: lazyProcessor,\n};\nexport function toJSONSchema(input, params) {\n if (\"_idmap\" in input) {\n // Registry case\n const registry = input;\n const ctx = initializeContext({ ...params, processors: allProcessors });\n const defs = {};\n // First pass: process all schemas to build the seen map\n for (const entry of registry._idmap.entries()) {\n const [_, schema] = entry;\n process(schema, ctx);\n }\n const schemas = {};\n const external = {\n registry,\n uri: params?.uri,\n defs,\n };\n // Update the context with external configuration\n ctx.external = external;\n // Second pass: emit each schema\n for (const entry of registry._idmap.entries()) {\n const [key, schema] = entry;\n extractDefs(ctx, schema);\n schemas[key] = finalize(ctx, schema);\n }\n if (Object.keys(defs).length > 0) {\n const defsSegment = ctx.target === \"draft-2020-12\" ? \"$defs\" : \"definitions\";\n schemas.__shared = {\n [defsSegment]: defs,\n };\n }\n return { schemas };\n }\n // Single schema case\n const ctx = initializeContext({ ...params, processors: allProcessors });\n process(input, ctx);\n extractDefs(ctx, input);\n return finalize(ctx, input);\n}\n"],"names":["getEnumValues","process","ctx","initializeContext","extractDefs","finalize"],"mappings":";;;;AAEA,MAAM,YAAY;AAAA,EACd,MAAM;AAAA,EACN,KAAK;AAAA,EACL,UAAU;AAAA,EACV,aAAa;AAAA,EACb,OAAO;AAAA;AACX;AAEY,MAAC,kBAAkB,CAAC,QAAQ,KAAK,OAAO,YAAY;AAC5D,QAAM,OAAO;AACb,OAAK,OAAO;AACZ,QAAM,EAAE,SAAS,SAAS,QAAQ,UAAU,gBAAe,IAAK,OAAO,KAClE;AACL,MAAI,OAAO,YAAY;AACnB,SAAK,YAAY;AACrB,MAAI,OAAO,YAAY;AACnB,SAAK,YAAY;AAErB,MAAI,QAAQ;AACR,SAAK,SAAS,UAAU,MAAM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EACT,UAAU;AAAA,EACV,OAAO;AAAA,EACP,MAAM;AAAA,EACN,UAAU;AAAA,EACV,SAAS;AAAA,EACT,UAAU;AAAA,EACV,MAAM;AACV;AACO,SAAS,aAAa,OAAO,QAAQ;AACxC,MAAI,YAAY,OAAO;AAEnB,UAAM,WAAW;AACjB,UAAMC,OAAMC,aAAAA,kBAAkB,EAAE,GAAG,QAAQ,YAAY,eAAe;AACtE,UAAM,OAAO,CAAA;AAEb,eAAW,SAAS,SAAS,OAAO,QAAO,GAAI;AAC3C,YAAM,CAAC,GAAG,MAAM,IAAI;AACpBF,mBAAAA,QAAQ,QAAQC,IAAG;AAAA,IACvB;AACA,UAAM,UAAU,CAAA;AAChB,UAAM,WAAW;AAAA,MACb;AAAA,MACA,KAAK,QAAQ;AAAA,MACb;AAAA,IACZ;AAEQ,IAAAA,KAAI,WAAW;AAEf,eAAW,SAAS,SAAS,OAAO,QAAO,GAAI;AAC3C,YAAM,CAAC,KAAK,MAAM,IAAI;AACtBE,mBAAAA,YAAYF,MAAK,MAAM;AACvB,cAAQ,GAAG,IAAIG,sBAASH,MAAK,MAAM;AAAA,IACvC;AACA,QAAI,OAAO,KAAK,IAAI,EAAE,SAAS,GAAG;AAC9B,YAAM,cAAcA,KAAI,WAAW,kBAAkB,UAAU;AAC/D,cAAQ,WAAW;AAAA,QACf,CAAC,WAAW,GAAG;AAAA,MAC/B;AAAA,IACQ;AACA,WAAO,EAAE,QAAO;AAAA,EACpB;AAEA,QAAM,MAAMC,aAAAA,kBAAkB,EAAE,GAAG,QAAQ,YAAY,eAAe;AACtEF,eAAAA,QAAQ,OAAO,GAAG;AAClBG,eAAAA,YAAY,KAAK,KAAK;AACtB,SAAOC,aAAAA,SAAS,KAAK,KAAK;AAC9B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","x_google_ignoreList":[0]}
|
|
1
|
+
{"version":3,"file":"json-schema-processors.cjs","sources":["../../../../../node_modules/zod/v4/core/json-schema-processors.js"],"sourcesContent":["import { extractDefs, finalize, initializeContext, process, } from \"./to-json-schema.js\";\nimport { getEnumValues } from \"./util.js\";\nconst formatMap = {\n guid: \"uuid\",\n url: \"uri\",\n datetime: \"date-time\",\n json_string: \"json-string\",\n regex: \"\", // do not set\n};\n// ==================== SIMPLE TYPE PROCESSORS ====================\nexport const stringProcessor = (schema, ctx, _json, _params) => {\n const json = _json;\n json.type = \"string\";\n const { minimum, maximum, format, patterns, contentEncoding } = schema._zod\n .bag;\n if (typeof minimum === \"number\")\n json.minLength = minimum;\n if (typeof maximum === \"number\")\n json.maxLength = maximum;\n // custom pattern overrides format\n if (format) {\n json.format = formatMap[format] ?? format;\n if (json.format === \"\")\n delete json.format; // empty format is not valid\n // JSON Schema format: \"time\" requires a full time with offset or Z\n // z.iso.time() does not include timezone information, so format: \"time\" should never be used\n if (format === \"time\") {\n delete json.format;\n }\n }\n if (contentEncoding)\n json.contentEncoding = contentEncoding;\n if (patterns && patterns.size > 0) {\n const regexes = [...patterns];\n if (regexes.length === 1)\n json.pattern = regexes[0].source;\n else if (regexes.length > 1) {\n json.allOf = [\n ...regexes.map((regex) => ({\n ...(ctx.target === \"draft-07\" || ctx.target === \"draft-04\" || ctx.target === \"openapi-3.0\"\n ? { type: \"string\" }\n : {}),\n pattern: regex.source,\n })),\n ];\n }\n }\n};\nexport const numberProcessor = (schema, ctx, _json, _params) => {\n const json = _json;\n const { minimum, maximum, format, multipleOf, exclusiveMaximum, exclusiveMinimum } = schema._zod.bag;\n if (typeof format === \"string\" && format.includes(\"int\"))\n json.type = \"integer\";\n else\n json.type = \"number\";\n // when both minimum and exclusiveMinimum exist, pick the more restrictive one\n const exMin = typeof exclusiveMinimum === \"number\" && exclusiveMinimum >= (minimum ?? Number.NEGATIVE_INFINITY);\n const exMax = typeof exclusiveMaximum === \"number\" && exclusiveMaximum <= (maximum ?? Number.POSITIVE_INFINITY);\n const legacy = ctx.target === \"draft-04\" || ctx.target === \"openapi-3.0\";\n if (exMin) {\n if (legacy) {\n json.minimum = exclusiveMinimum;\n json.exclusiveMinimum = true;\n }\n else {\n json.exclusiveMinimum = exclusiveMinimum;\n }\n }\n else if (typeof minimum === \"number\") {\n json.minimum = minimum;\n }\n if (exMax) {\n if (legacy) {\n json.maximum = exclusiveMaximum;\n json.exclusiveMaximum = true;\n }\n else {\n json.exclusiveMaximum = exclusiveMaximum;\n }\n }\n else if (typeof maximum === \"number\") {\n json.maximum = maximum;\n }\n if (typeof multipleOf === \"number\")\n json.multipleOf = multipleOf;\n};\nexport const booleanProcessor = (_schema, _ctx, json, _params) => {\n json.type = \"boolean\";\n};\nexport const bigintProcessor = (_schema, ctx, _json, _params) => {\n if (ctx.unrepresentable === \"throw\") {\n throw new Error(\"BigInt cannot be represented in JSON Schema\");\n }\n};\nexport const symbolProcessor = (_schema, ctx, _json, _params) => {\n if (ctx.unrepresentable === \"throw\") {\n throw new Error(\"Symbols cannot be represented in JSON Schema\");\n }\n};\nexport const nullProcessor = (_schema, ctx, json, _params) => {\n if (ctx.target === \"openapi-3.0\") {\n json.type = \"string\";\n json.nullable = true;\n json.enum = [null];\n }\n else {\n json.type = \"null\";\n }\n};\nexport const undefinedProcessor = (_schema, ctx, _json, _params) => {\n if (ctx.unrepresentable === \"throw\") {\n throw new Error(\"Undefined cannot be represented in JSON Schema\");\n }\n};\nexport const voidProcessor = (_schema, ctx, _json, _params) => {\n if (ctx.unrepresentable === \"throw\") {\n throw new Error(\"Void cannot be represented in JSON Schema\");\n }\n};\nexport const neverProcessor = (_schema, _ctx, json, _params) => {\n json.not = {};\n};\nexport const anyProcessor = (_schema, _ctx, _json, _params) => {\n // empty schema accepts anything\n};\nexport const unknownProcessor = (_schema, _ctx, _json, _params) => {\n // empty schema accepts anything\n};\nexport const dateProcessor = (_schema, ctx, _json, _params) => {\n if (ctx.unrepresentable === \"throw\") {\n throw new Error(\"Date cannot be represented in JSON Schema\");\n }\n};\nexport const enumProcessor = (schema, _ctx, json, _params) => {\n const def = schema._zod.def;\n const values = getEnumValues(def.entries);\n // Number enums can have both string and number values\n if (values.every((v) => typeof v === \"number\"))\n json.type = \"number\";\n if (values.every((v) => typeof v === \"string\"))\n json.type = \"string\";\n json.enum = values;\n};\nexport const literalProcessor = (schema, ctx, json, _params) => {\n const def = schema._zod.def;\n const vals = [];\n for (const val of def.values) {\n if (val === undefined) {\n if (ctx.unrepresentable === \"throw\") {\n throw new Error(\"Literal `undefined` cannot be represented in JSON Schema\");\n }\n else {\n // do not add to vals\n }\n }\n else if (typeof val === \"bigint\") {\n if (ctx.unrepresentable === \"throw\") {\n throw new Error(\"BigInt literals cannot be represented in JSON Schema\");\n }\n else {\n vals.push(Number(val));\n }\n }\n else {\n vals.push(val);\n }\n }\n if (vals.length === 0) {\n // do nothing (an undefined literal was stripped)\n }\n else if (vals.length === 1) {\n const val = vals[0];\n json.type = val === null ? \"null\" : typeof val;\n if (ctx.target === \"draft-04\" || ctx.target === \"openapi-3.0\") {\n json.enum = [val];\n }\n else {\n json.const = val;\n }\n }\n else {\n if (vals.every((v) => typeof v === \"number\"))\n json.type = \"number\";\n if (vals.every((v) => typeof v === \"string\"))\n json.type = \"string\";\n if (vals.every((v) => typeof v === \"boolean\"))\n json.type = \"boolean\";\n if (vals.every((v) => v === null))\n json.type = \"null\";\n json.enum = vals;\n }\n};\nexport const nanProcessor = (_schema, ctx, _json, _params) => {\n if (ctx.unrepresentable === \"throw\") {\n throw new Error(\"NaN cannot be represented in JSON Schema\");\n }\n};\nexport const templateLiteralProcessor = (schema, _ctx, json, _params) => {\n const _json = json;\n const pattern = schema._zod.pattern;\n if (!pattern)\n throw new Error(\"Pattern not found in template literal\");\n _json.type = \"string\";\n _json.pattern = pattern.source;\n};\nexport const fileProcessor = (schema, _ctx, json, _params) => {\n const _json = json;\n const file = {\n type: \"string\",\n format: \"binary\",\n contentEncoding: \"binary\",\n };\n const { minimum, maximum, mime } = schema._zod.bag;\n if (minimum !== undefined)\n file.minLength = minimum;\n if (maximum !== undefined)\n file.maxLength = maximum;\n if (mime) {\n if (mime.length === 1) {\n file.contentMediaType = mime[0];\n Object.assign(_json, file);\n }\n else {\n Object.assign(_json, file); // shared props at root\n _json.anyOf = mime.map((m) => ({ contentMediaType: m })); // only contentMediaType differs\n }\n }\n else {\n Object.assign(_json, file);\n }\n};\nexport const successProcessor = (_schema, _ctx, json, _params) => {\n json.type = \"boolean\";\n};\nexport const customProcessor = (_schema, ctx, _json, _params) => {\n if (ctx.unrepresentable === \"throw\") {\n throw new Error(\"Custom types cannot be represented in JSON Schema\");\n }\n};\nexport const functionProcessor = (_schema, ctx, _json, _params) => {\n if (ctx.unrepresentable === \"throw\") {\n throw new Error(\"Function types cannot be represented in JSON Schema\");\n }\n};\nexport const transformProcessor = (_schema, ctx, _json, _params) => {\n if (ctx.unrepresentable === \"throw\") {\n throw new Error(\"Transforms cannot be represented in JSON Schema\");\n }\n};\nexport const mapProcessor = (_schema, ctx, _json, _params) => {\n if (ctx.unrepresentable === \"throw\") {\n throw new Error(\"Map cannot be represented in JSON Schema\");\n }\n};\nexport const setProcessor = (_schema, ctx, _json, _params) => {\n if (ctx.unrepresentable === \"throw\") {\n throw new Error(\"Set cannot be represented in JSON Schema\");\n }\n};\n// ==================== COMPOSITE TYPE PROCESSORS ====================\nexport const arrayProcessor = (schema, ctx, _json, params) => {\n const json = _json;\n const def = schema._zod.def;\n const { minimum, maximum } = schema._zod.bag;\n if (typeof minimum === \"number\")\n json.minItems = minimum;\n if (typeof maximum === \"number\")\n json.maxItems = maximum;\n json.type = \"array\";\n json.items = process(def.element, ctx, {\n ...params,\n path: [...params.path, \"items\"],\n });\n};\nexport const objectProcessor = (schema, ctx, _json, params) => {\n const json = _json;\n const def = schema._zod.def;\n json.type = \"object\";\n json.properties = {};\n const shape = def.shape;\n for (const key in shape) {\n json.properties[key] = process(shape[key], ctx, {\n ...params,\n path: [...params.path, \"properties\", key],\n });\n }\n // required keys\n const allKeys = new Set(Object.keys(shape));\n const requiredKeys = new Set([...allKeys].filter((key) => {\n const v = def.shape[key]._zod;\n if (ctx.io === \"input\") {\n return v.optin === undefined;\n }\n else {\n return v.optout === undefined;\n }\n }));\n if (requiredKeys.size > 0) {\n json.required = Array.from(requiredKeys);\n }\n // catchall\n if (def.catchall?._zod.def.type === \"never\") {\n // strict\n json.additionalProperties = false;\n }\n else if (!def.catchall) {\n // regular\n if (ctx.io === \"output\")\n json.additionalProperties = false;\n }\n else if (def.catchall) {\n json.additionalProperties = process(def.catchall, ctx, {\n ...params,\n path: [...params.path, \"additionalProperties\"],\n });\n }\n};\nexport const unionProcessor = (schema, ctx, json, params) => {\n const def = schema._zod.def;\n // Exclusive unions (inclusive === false) use oneOf (exactly one match) instead of anyOf (one or more matches)\n // This includes both z.xor() and discriminated unions\n const isExclusive = def.inclusive === false;\n const options = def.options.map((x, i) => process(x, ctx, {\n ...params,\n path: [...params.path, isExclusive ? \"oneOf\" : \"anyOf\", i],\n }));\n if (isExclusive) {\n json.oneOf = options;\n }\n else {\n json.anyOf = options;\n }\n};\nexport const intersectionProcessor = (schema, ctx, json, params) => {\n const def = schema._zod.def;\n const a = process(def.left, ctx, {\n ...params,\n path: [...params.path, \"allOf\", 0],\n });\n const b = process(def.right, ctx, {\n ...params,\n path: [...params.path, \"allOf\", 1],\n });\n const isSimpleIntersection = (val) => \"allOf\" in val && Object.keys(val).length === 1;\n const allOf = [\n ...(isSimpleIntersection(a) ? a.allOf : [a]),\n ...(isSimpleIntersection(b) ? b.allOf : [b]),\n ];\n json.allOf = allOf;\n};\nexport const tupleProcessor = (schema, ctx, _json, params) => {\n const json = _json;\n const def = schema._zod.def;\n json.type = \"array\";\n const prefixPath = ctx.target === \"draft-2020-12\" ? \"prefixItems\" : \"items\";\n const restPath = ctx.target === \"draft-2020-12\" ? \"items\" : ctx.target === \"openapi-3.0\" ? \"items\" : \"additionalItems\";\n const prefixItems = def.items.map((x, i) => process(x, ctx, {\n ...params,\n path: [...params.path, prefixPath, i],\n }));\n const rest = def.rest\n ? process(def.rest, ctx, {\n ...params,\n path: [...params.path, restPath, ...(ctx.target === \"openapi-3.0\" ? [def.items.length] : [])],\n })\n : null;\n if (ctx.target === \"draft-2020-12\") {\n json.prefixItems = prefixItems;\n if (rest) {\n json.items = rest;\n }\n }\n else if (ctx.target === \"openapi-3.0\") {\n json.items = {\n anyOf: prefixItems,\n };\n if (rest) {\n json.items.anyOf.push(rest);\n }\n json.minItems = prefixItems.length;\n if (!rest) {\n json.maxItems = prefixItems.length;\n }\n }\n else {\n json.items = prefixItems;\n if (rest) {\n json.additionalItems = rest;\n }\n }\n // length\n const { minimum, maximum } = schema._zod.bag;\n if (typeof minimum === \"number\")\n json.minItems = minimum;\n if (typeof maximum === \"number\")\n json.maxItems = maximum;\n};\nexport const recordProcessor = (schema, ctx, _json, params) => {\n const json = _json;\n const def = schema._zod.def;\n json.type = \"object\";\n // For looseRecord with regex patterns, use patternProperties\n // This correctly represents \"only validate keys matching the pattern\" semantics\n // and composes well with allOf (intersections)\n const keyType = def.keyType;\n const keyBag = keyType._zod.bag;\n const patterns = keyBag?.patterns;\n if (def.mode === \"loose\" && patterns && patterns.size > 0) {\n // Use patternProperties for looseRecord with regex patterns\n const valueSchema = process(def.valueType, ctx, {\n ...params,\n path: [...params.path, \"patternProperties\", \"*\"],\n });\n json.patternProperties = {};\n for (const pattern of patterns) {\n json.patternProperties[pattern.source] = valueSchema;\n }\n }\n else {\n // Default behavior: use propertyNames + additionalProperties\n if (ctx.target === \"draft-07\" || ctx.target === \"draft-2020-12\") {\n json.propertyNames = process(def.keyType, ctx, {\n ...params,\n path: [...params.path, \"propertyNames\"],\n });\n }\n json.additionalProperties = process(def.valueType, ctx, {\n ...params,\n path: [...params.path, \"additionalProperties\"],\n });\n }\n // Add required for keys with discrete values (enum, literal, etc.)\n const keyValues = keyType._zod.values;\n if (keyValues) {\n const validKeyValues = [...keyValues].filter((v) => typeof v === \"string\" || typeof v === \"number\");\n if (validKeyValues.length > 0) {\n json.required = validKeyValues;\n }\n }\n};\nexport const nullableProcessor = (schema, ctx, json, params) => {\n const def = schema._zod.def;\n const inner = process(def.innerType, ctx, params);\n const seen = ctx.seen.get(schema);\n if (ctx.target === \"openapi-3.0\") {\n seen.ref = def.innerType;\n json.nullable = true;\n }\n else {\n json.anyOf = [inner, { type: \"null\" }];\n }\n};\nexport const nonoptionalProcessor = (schema, ctx, _json, params) => {\n const def = schema._zod.def;\n process(def.innerType, ctx, params);\n const seen = ctx.seen.get(schema);\n seen.ref = def.innerType;\n};\nexport const defaultProcessor = (schema, ctx, json, params) => {\n const def = schema._zod.def;\n process(def.innerType, ctx, params);\n const seen = ctx.seen.get(schema);\n seen.ref = def.innerType;\n json.default = JSON.parse(JSON.stringify(def.defaultValue));\n};\nexport const prefaultProcessor = (schema, ctx, json, params) => {\n const def = schema._zod.def;\n process(def.innerType, ctx, params);\n const seen = ctx.seen.get(schema);\n seen.ref = def.innerType;\n if (ctx.io === \"input\")\n json._prefault = JSON.parse(JSON.stringify(def.defaultValue));\n};\nexport const catchProcessor = (schema, ctx, json, params) => {\n const def = schema._zod.def;\n process(def.innerType, ctx, params);\n const seen = ctx.seen.get(schema);\n seen.ref = def.innerType;\n let catchValue;\n try {\n catchValue = def.catchValue(undefined);\n }\n catch {\n throw new Error(\"Dynamic catch values are not supported in JSON Schema\");\n }\n json.default = catchValue;\n};\nexport const pipeProcessor = (schema, ctx, _json, params) => {\n const def = schema._zod.def;\n const inIsTransform = def.in._zod.traits.has(\"$ZodTransform\");\n const innerType = ctx.io === \"input\" ? (inIsTransform ? def.out : def.in) : def.out;\n process(innerType, ctx, params);\n const seen = ctx.seen.get(schema);\n seen.ref = innerType;\n};\nexport const readonlyProcessor = (schema, ctx, json, params) => {\n const def = schema._zod.def;\n process(def.innerType, ctx, params);\n const seen = ctx.seen.get(schema);\n seen.ref = def.innerType;\n json.readOnly = true;\n};\nexport const promiseProcessor = (schema, ctx, _json, params) => {\n const def = schema._zod.def;\n process(def.innerType, ctx, params);\n const seen = ctx.seen.get(schema);\n seen.ref = def.innerType;\n};\nexport const optionalProcessor = (schema, ctx, _json, params) => {\n const def = schema._zod.def;\n process(def.innerType, ctx, params);\n const seen = ctx.seen.get(schema);\n seen.ref = def.innerType;\n};\nexport const lazyProcessor = (schema, ctx, _json, params) => {\n const innerType = schema._zod.innerType;\n process(innerType, ctx, params);\n const seen = ctx.seen.get(schema);\n seen.ref = innerType;\n};\n// ==================== ALL PROCESSORS ====================\nexport const allProcessors = {\n string: stringProcessor,\n number: numberProcessor,\n boolean: booleanProcessor,\n bigint: bigintProcessor,\n symbol: symbolProcessor,\n null: nullProcessor,\n undefined: undefinedProcessor,\n void: voidProcessor,\n never: neverProcessor,\n any: anyProcessor,\n unknown: unknownProcessor,\n date: dateProcessor,\n enum: enumProcessor,\n literal: literalProcessor,\n nan: nanProcessor,\n template_literal: templateLiteralProcessor,\n file: fileProcessor,\n success: successProcessor,\n custom: customProcessor,\n function: functionProcessor,\n transform: transformProcessor,\n map: mapProcessor,\n set: setProcessor,\n array: arrayProcessor,\n object: objectProcessor,\n union: unionProcessor,\n intersection: intersectionProcessor,\n tuple: tupleProcessor,\n record: recordProcessor,\n nullable: nullableProcessor,\n nonoptional: nonoptionalProcessor,\n default: defaultProcessor,\n prefault: prefaultProcessor,\n catch: catchProcessor,\n pipe: pipeProcessor,\n readonly: readonlyProcessor,\n promise: promiseProcessor,\n optional: optionalProcessor,\n lazy: lazyProcessor,\n};\nexport function toJSONSchema(input, params) {\n if (\"_idmap\" in input) {\n // Registry case\n const registry = input;\n const ctx = initializeContext({ ...params, processors: allProcessors });\n const defs = {};\n // First pass: process all schemas to build the seen map\n for (const entry of registry._idmap.entries()) {\n const [_, schema] = entry;\n process(schema, ctx);\n }\n const schemas = {};\n const external = {\n registry,\n uri: params?.uri,\n defs,\n };\n // Update the context with external configuration\n ctx.external = external;\n // Second pass: emit each schema\n for (const entry of registry._idmap.entries()) {\n const [key, schema] = entry;\n extractDefs(ctx, schema);\n schemas[key] = finalize(ctx, schema);\n }\n if (Object.keys(defs).length > 0) {\n const defsSegment = ctx.target === \"draft-2020-12\" ? \"$defs\" : \"definitions\";\n schemas.__shared = {\n [defsSegment]: defs,\n };\n }\n return { schemas };\n }\n // Single schema case\n const ctx = initializeContext({ ...params, processors: allProcessors });\n process(input, ctx);\n extractDefs(ctx, input);\n return finalize(ctx, input);\n}\n"],"names":["getEnumValues","process","ctx","initializeContext","extractDefs","finalize"],"mappings":";;;;AAEA,MAAM,YAAY;AAAA,EACd,MAAM;AAAA,EACN,KAAK;AAAA,EACL,UAAU;AAAA,EACV,aAAa;AAAA,EACb,OAAO;AAAA;AACX;AAEY,MAAC,kBAAkB,CAAC,QAAQ,KAAK,OAAO,YAAY;AAC5D,QAAM,OAAO;AACb,OAAK,OAAO;AACZ,QAAM,EAAE,SAAS,SAAS,QAAQ,UAAU,gBAAe,IAAK,OAAO,KAClE;AACL,MAAI,OAAO,YAAY;AACnB,SAAK,YAAY;AACrB,MAAI,OAAO,YAAY;AACnB,SAAK,YAAY;AAErB,MAAI,QAAQ;AACR,SAAK,SAAS,UAAU,MAAM,KAAK;AACnC,QAAI,KAAK,WAAW;AAChB,aAAO,KAAK;AAGhB,QAAI,WAAW,QAAQ;AACnB,aAAO,KAAK;AAAA,IAChB;AAAA,EACJ;AACA,MAAI;AACA,SAAK,kBAAkB;AAC3B,MAAI,YAAY,SAAS,OAAO,GAAG;AAC/B,UAAM,UAAU,CAAC,GAAG,QAAQ;AAC5B,QAAI,QAAQ,WAAW;AACnB,WAAK,UAAU,QAAQ,CAAC,EAAE;AAAA,aACrB,QAAQ,SAAS,GAAG;AACzB,WAAK,QAAQ;AAAA,QACT,GAAG,QAAQ,IAAI,CAAC,WAAW;AAAA,UACvB,GAAI,IAAI,WAAW,cAAc,IAAI,WAAW,cAAc,IAAI,WAAW,gBACvE,EAAE,MAAM,SAAQ,IAChB;UACN,SAAS,MAAM;AAAA,QACnC,EAAkB;AAAA,MAClB;AAAA,IACQ;AAAA,EACJ;AACJ;AACY,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