@igstack/app-catalog-frontend-core 0.0.1

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.
Files changed (652) hide show
  1. package/LICENSE +21 -0
  2. package/dist/esm/App.d.ts +12 -0
  3. package/dist/esm/App.js +12 -0
  4. package/dist/esm/App.js.map +1 -0
  5. package/dist/esm/__tests__/setupTests.d.ts +0 -0
  6. package/dist/esm/api/infra/createQueryClient.d.ts +9 -0
  7. package/dist/esm/api/infra/createQueryClient.js +25 -0
  8. package/dist/esm/api/infra/createQueryClient.js.map +1 -0
  9. package/dist/esm/api/infra/trpc.d.ts +1624 -0
  10. package/dist/esm/api/infra/trpc.js +8 -0
  11. package/dist/esm/api/infra/trpc.js.map +1 -0
  12. package/dist/esm/api/unsorted/appCatalogFetcher.d.ts +10 -0
  13. package/dist/esm/api/unsorted/appCatalogFetcher.js +18 -0
  14. package/dist/esm/api/unsorted/appCatalogFetcher.js.map +1 -0
  15. package/dist/esm/api/unsorted/createCachingFetcher.d.ts +23 -0
  16. package/dist/esm/api/unsorted/createCachingFetcher.js +93 -0
  17. package/dist/esm/api/unsorted/createCachingFetcher.js.map +1 -0
  18. package/dist/esm/appPropsFactory.d.ts +2 -0
  19. package/dist/esm/appPropsFactory.js +34 -0
  20. package/dist/esm/appPropsFactory.js.map +1 -0
  21. package/dist/esm/assets/app-catalog.svg.js +6 -0
  22. package/dist/esm/assets/app-catalog.svg.js.map +1 -0
  23. package/dist/esm/components/IconPickerDialog.d.ts +8 -0
  24. package/dist/esm/components/IconPickerDialog.js +98 -0
  25. package/dist/esm/components/IconPickerDialog.js.map +1 -0
  26. package/dist/esm/components/IconPickerField.d.ts +9 -0
  27. package/dist/esm/components/IconPickerField.js +76 -0
  28. package/dist/esm/components/IconPickerField.js.map +1 -0
  29. package/dist/esm/components/ThemeSwitcher.d.ts +1 -0
  30. package/dist/esm/components/ThemeSwitcher.js +25 -0
  31. package/dist/esm/components/ThemeSwitcher.js.map +1 -0
  32. package/dist/esm/components/theme-provider.d.ts +2 -0
  33. package/dist/esm/components/theme-provider.js +10 -0
  34. package/dist/esm/components/theme-provider.js.map +1 -0
  35. package/dist/esm/errors/AuthorizationError.d.ts +19 -0
  36. package/dist/esm/errors/AuthorizationError.js +20 -0
  37. package/dist/esm/errors/AuthorizationError.js.map +1 -0
  38. package/dist/esm/errors/index.d.ts +1 -0
  39. package/dist/esm/index.d.ts +3 -0
  40. package/dist/esm/index.js +7 -0
  41. package/dist/esm/index.js.map +1 -0
  42. package/dist/esm/lib/utils.d.ts +2 -0
  43. package/dist/esm/lib/utils.js +9 -0
  44. package/dist/esm/lib/utils.js.map +1 -0
  45. package/dist/esm/main.d.ts +0 -0
  46. package/dist/esm/modules/admin-base/components/AdminChat.d.ts +1 -0
  47. package/dist/esm/modules/admin-base/components/AdminChat.js +82 -0
  48. package/dist/esm/modules/admin-base/components/AdminChat.js.map +1 -0
  49. package/dist/esm/modules/admin-base/components/AdminLayout.d.ts +5 -0
  50. package/dist/esm/modules/admin-base/components/AdminLayout.js +83 -0
  51. package/dist/esm/modules/admin-base/components/AdminLayout.js.map +1 -0
  52. package/dist/esm/modules/admin-base/components/AdminWelcome.d.ts +1 -0
  53. package/dist/esm/modules/admin-base/components/AdminWelcome.js +37 -0
  54. package/dist/esm/modules/admin-base/components/AdminWelcome.js.map +1 -0
  55. package/dist/esm/modules/admin-base/context/AdminConfigContext.d.ts +8 -0
  56. package/dist/esm/modules/admin-base/context/AdminConfigContext.js +27 -0
  57. package/dist/esm/modules/admin-base/context/AdminConfigContext.js.map +1 -0
  58. package/dist/esm/modules/admin-base/index.d.ts +5 -0
  59. package/dist/esm/modules/admin-base/types/adminTypes.d.ts +10 -0
  60. package/dist/esm/modules/appCatalog/AppCatalogAdminPage.d.ts +1 -0
  61. package/dist/esm/modules/appCatalog/AppCatalogAdminPage.js +196 -0
  62. package/dist/esm/modules/appCatalog/AppCatalogAdminPage.js.map +1 -0
  63. package/dist/esm/modules/appCatalog/ScreenshotItem.d.ts +7 -0
  64. package/dist/esm/modules/appCatalog/ScreenshotItem.js +57 -0
  65. package/dist/esm/modules/appCatalog/ScreenshotItem.js.map +1 -0
  66. package/dist/esm/modules/appCatalog/ScreenshotManager.d.ts +15 -0
  67. package/dist/esm/modules/appCatalog/ScreenshotManager.js +155 -0
  68. package/dist/esm/modules/appCatalog/ScreenshotManager.js.map +1 -0
  69. package/dist/esm/modules/appCatalog/api/ApiQueryMagazineAppCatalog.d.ts +11 -0
  70. package/dist/esm/modules/appCatalog/api/ApiQueryMagazineAppCatalog.js +14 -0
  71. package/dist/esm/modules/appCatalog/api/ApiQueryMagazineAppCatalog.js.map +1 -0
  72. package/dist/esm/modules/appCatalog/catalogRouteLoader.d.ts +5 -0
  73. package/dist/esm/modules/appCatalog/catalogRouteLoader.js +20 -0
  74. package/dist/esm/modules/appCatalog/catalogRouteLoader.js.map +1 -0
  75. package/dist/esm/modules/appCatalog/context/AppCatalogContext.d.ts +15 -0
  76. package/dist/esm/modules/appCatalog/context/AppCatalogContext.js +47 -0
  77. package/dist/esm/modules/appCatalog/context/AppCatalogContext.js.map +1 -0
  78. package/dist/esm/modules/appCatalog/index.d.ts +10 -0
  79. package/dist/esm/modules/appCatalog/routeLoader.d.ts +3 -0
  80. package/dist/esm/modules/appCatalog/routeLoader.js +7 -0
  81. package/dist/esm/modules/appCatalog/routeLoader.js.map +1 -0
  82. package/dist/esm/modules/appCatalog/ui/components/AccessRequestSection.d.ts +7 -0
  83. package/dist/esm/modules/appCatalog/ui/components/AccessRequestSection.js +257 -0
  84. package/dist/esm/modules/appCatalog/ui/components/AccessRequestSection.js.map +1 -0
  85. package/dist/esm/modules/appCatalog/ui/components/AppDetailModal.d.ts +7 -0
  86. package/dist/esm/modules/appCatalog/ui/components/ApproverDisplay.d.ts +30 -0
  87. package/dist/esm/modules/appCatalog/ui/components/GroupingColumn.d.ts +11 -0
  88. package/dist/esm/modules/appCatalog/ui/components/GroupingTabs.d.ts +7 -0
  89. package/dist/esm/modules/appCatalog/ui/components/ScreenshotGallery.d.ts +10 -0
  90. package/dist/esm/modules/appCatalog/ui/components/ScreenshotGallery.js +35 -0
  91. package/dist/esm/modules/appCatalog/ui/components/ScreenshotGallery.js.map +1 -0
  92. package/dist/esm/modules/appCatalog/ui/grid/AppCatalogFiltersCard.d.ts +9 -0
  93. package/dist/esm/modules/appCatalog/ui/grid/AppCatalogGrid.d.ts +8 -0
  94. package/dist/esm/modules/appCatalog/ui/grid/AppCatalogGrid.js +325 -0
  95. package/dist/esm/modules/appCatalog/ui/grid/AppCatalogGrid.js.map +1 -0
  96. package/dist/esm/modules/appCatalog/ui/grid/AppCatalogTable.d.ts +5 -0
  97. package/dist/esm/modules/appCatalog/ui/grid/appCatalogUtils.d.ts +2 -0
  98. package/dist/esm/modules/appCatalog/ui/hooks/useKeyboardNavigation.d.ts +10 -0
  99. package/dist/esm/modules/appCatalog/ui/hooks/useKeyboardNavigation.js +36 -0
  100. package/dist/esm/modules/appCatalog/ui/hooks/useKeyboardNavigation.js.map +1 -0
  101. package/dist/esm/modules/appCatalog/ui/layout/AppCatalogLayout.d.ts +9 -0
  102. package/dist/esm/modules/appCatalog/ui/layout/AppCatalogLayout.js +28 -0
  103. package/dist/esm/modules/appCatalog/ui/layout/AppCatalogLayout.js.map +1 -0
  104. package/dist/esm/modules/appCatalog/ui/pages/AppCatalogPage.d.ts +1 -0
  105. package/dist/esm/modules/appCatalog/ui/pages/AppCatalogPage.js +112 -0
  106. package/dist/esm/modules/appCatalog/ui/pages/AppCatalogPage.js.map +1 -0
  107. package/dist/esm/modules/approvalMethod/AccessRequestFormFields.d.ts +7 -0
  108. package/dist/esm/modules/approvalMethod/AccessRequestFormFields.js +323 -0
  109. package/dist/esm/modules/approvalMethod/AccessRequestFormFields.js.map +1 -0
  110. package/dist/esm/modules/approvalMethod/ApprovalMethodForm.d.ts +14 -0
  111. package/dist/esm/modules/approvalMethod/ApprovalMethodForm.js +227 -0
  112. package/dist/esm/modules/approvalMethod/ApprovalMethodForm.js.map +1 -0
  113. package/dist/esm/modules/approvalMethod/ApprovalMethodSelector.d.ts +7 -0
  114. package/dist/esm/modules/approvalMethod/ApprovalMethodSelector.js +124 -0
  115. package/dist/esm/modules/approvalMethod/ApprovalMethodSelector.js.map +1 -0
  116. package/dist/esm/modules/approvalMethod/api/ApiQueryMagazineApprovalMethod.d.ts +381 -0
  117. package/dist/esm/modules/approvalMethod/api/ApiQueryMagazineApprovalMethod.js +26 -0
  118. package/dist/esm/modules/approvalMethod/api/ApiQueryMagazineApprovalMethod.js.map +1 -0
  119. package/dist/esm/modules/auth/AuthContext.d.ts +38 -0
  120. package/dist/esm/modules/auth/AuthContext.js +88 -0
  121. package/dist/esm/modules/auth/AuthContext.js.map +1 -0
  122. package/dist/esm/modules/auth/AuthModalContext.d.ts +19 -0
  123. package/dist/esm/modules/auth/AuthModalContext.js +33 -0
  124. package/dist/esm/modules/auth/AuthModalContext.js.map +1 -0
  125. package/dist/esm/modules/auth/ProtectedContent.d.ts +19 -0
  126. package/dist/esm/modules/auth/authClient.d.ts +704 -0
  127. package/dist/esm/modules/auth/authClient.js +8 -0
  128. package/dist/esm/modules/auth/authClient.js.map +1 -0
  129. package/dist/esm/modules/auth/authUtils.d.ts +6 -0
  130. package/dist/esm/modules/auth/authUtils.js +25 -0
  131. package/dist/esm/modules/auth/authUtils.js.map +1 -0
  132. package/dist/esm/modules/auth/index.d.ts +5 -0
  133. package/dist/esm/modules/auth/ui/LoginModal.d.ts +6 -0
  134. package/dist/esm/modules/auth/ui/LoginModal.js +22 -0
  135. package/dist/esm/modules/auth/ui/LoginModal.js.map +1 -0
  136. package/dist/esm/modules/auth/ui/LoginPage.d.ts +5 -0
  137. package/dist/esm/modules/auth/ui/LoginPage.js +50 -0
  138. package/dist/esm/modules/auth/ui/LoginPage.js.map +1 -0
  139. package/dist/esm/modules/auth/useAuthActions.d.ts +17 -0
  140. package/dist/esm/modules/auth/useAuthActions.js +62 -0
  141. package/dist/esm/modules/auth/useAuthActions.js.map +1 -0
  142. package/dist/esm/modules/config/GlobalConfigContext.d.ts +14 -0
  143. package/dist/esm/modules/config/GlobalConfigContext.js +21 -0
  144. package/dist/esm/modules/config/GlobalConfigContext.js.map +1 -0
  145. package/dist/esm/modules/config/HealthStateContext.d.ts +16 -0
  146. package/dist/esm/modules/gallery/Gallery.d.ts +12 -0
  147. package/dist/esm/modules/gallery/Gallery.js +246 -0
  148. package/dist/esm/modules/gallery/Gallery.js.map +1 -0
  149. package/dist/esm/modules/icons/IconManagementPage.d.ts +1 -0
  150. package/dist/esm/modules/icons/IconManagementPage.js +177 -0
  151. package/dist/esm/modules/icons/IconManagementPage.js.map +1 -0
  152. package/dist/esm/modules/pluginCore/PluginManagerContext.d.ts +19 -0
  153. package/dist/esm/modules/pluginCore/PluginManagerContext.js +29 -0
  154. package/dist/esm/modules/pluginCore/PluginManagerContext.js.map +1 -0
  155. package/dist/esm/modules/pluginCore/makePluginManagerContext.d.ts +4 -0
  156. package/dist/esm/modules/pluginCore/makePluginManagerContext.js +9 -0
  157. package/dist/esm/modules/pluginCore/makePluginManagerContext.js.map +1 -0
  158. package/dist/esm/modules/pluginCore/types.d.ts +24 -0
  159. package/dist/esm/node_modules/.pnpm/@dnd-kit_accessibility@3.1.1_react@19.1.2/node_modules/@dnd-kit/accessibility/dist/accessibility.esm.js +60 -0
  160. package/dist/esm/node_modules/.pnpm/@dnd-kit_accessibility@3.1.1_react@19.1.2/node_modules/@dnd-kit/accessibility/dist/accessibility.esm.js.map +1 -0
  161. package/dist/esm/node_modules/.pnpm/@dnd-kit_core@6.3.1_react-dom@19.1.2_react@19.1.2__react@19.1.2/node_modules/@dnd-kit/core/dist/core.esm.js +3055 -0
  162. package/dist/esm/node_modules/.pnpm/@dnd-kit_core@6.3.1_react-dom@19.1.2_react@19.1.2__react@19.1.2/node_modules/@dnd-kit/core/dist/core.esm.js.map +1 -0
  163. package/dist/esm/node_modules/.pnpm/@dnd-kit_sortable@10.0.0_@dnd-kit_core@6.3.1_react-dom@19.1.2_react@19.1.2__react@19.1.2__react@19.1.2/node_modules/@dnd-kit/sortable/dist/sortable.esm.js +593 -0
  164. package/dist/esm/node_modules/.pnpm/@dnd-kit_sortable@10.0.0_@dnd-kit_core@6.3.1_react-dom@19.1.2_react@19.1.2__react@19.1.2__react@19.1.2/node_modules/@dnd-kit/sortable/dist/sortable.esm.js.map +1 -0
  165. package/dist/esm/node_modules/.pnpm/@dnd-kit_utilities@3.2.2_react@19.1.2/node_modules/@dnd-kit/utilities/dist/utilities.esm.js +302 -0
  166. package/dist/esm/node_modules/.pnpm/@dnd-kit_utilities@3.2.2_react@19.1.2/node_modules/@dnd-kit/utilities/dist/utilities.esm.js.map +1 -0
  167. package/dist/esm/node_modules/.pnpm/@hookform_resolvers@5.2.2_react-hook-form@7.71.1_react@19.1.2_/node_modules/@hookform/resolvers/dist/resolvers.js +34 -0
  168. package/dist/esm/node_modules/.pnpm/@hookform_resolvers@5.2.2_react-hook-form@7.71.1_react@19.1.2_/node_modules/@hookform/resolvers/dist/resolvers.js.map +1 -0
  169. package/dist/esm/node_modules/.pnpm/@hookform_resolvers@5.2.2_react-hook-form@7.71.1_react@19.1.2_/node_modules/@hookform/resolvers/zod/dist/zod.js +94 -0
  170. package/dist/esm/node_modules/.pnpm/@hookform_resolvers@5.2.2_react-hook-form@7.71.1_react@19.1.2_/node_modules/@hookform/resolvers/zod/dist/zod.js.map +1 -0
  171. package/dist/esm/node_modules/.pnpm/@tanstack_react-router-devtools@1.151.6_@tanstack_react-router@1.151.6_react-dom@19.1.2_20b78d099e847743bc64b4d051c71d30/node_modules/@tanstack/react-router-devtools/dist/esm/TanStackRouterDevtools.js +72 -0
  172. package/dist/esm/node_modules/.pnpm/@tanstack_react-router-devtools@1.151.6_@tanstack_react-router@1.151.6_react-dom@19.1.2_20b78d099e847743bc64b4d051c71d30/node_modules/@tanstack/react-router-devtools/dist/esm/TanStackRouterDevtools.js.map +1 -0
  173. package/dist/esm/node_modules/.pnpm/@tanstack_react-router-devtools@1.151.6_@tanstack_react-router@1.151.6_react-dom@19.1.2_20b78d099e847743bc64b4d051c71d30/node_modules/@tanstack/react-router-devtools/dist/esm/TanStackRouterDevtoolsPanel.js +44 -0
  174. package/dist/esm/node_modules/.pnpm/@tanstack_react-router-devtools@1.151.6_@tanstack_react-router@1.151.6_react-dom@19.1.2_20b78d099e847743bc64b4d051c71d30/node_modules/@tanstack/react-router-devtools/dist/esm/TanStackRouterDevtoolsPanel.js.map +1 -0
  175. package/dist/esm/node_modules/.pnpm/@tanstack_react-router-devtools@1.151.6_@tanstack_react-router@1.151.6_react-dom@19.1.2_20b78d099e847743bc64b4d051c71d30/node_modules/@tanstack/react-router-devtools/dist/esm/index.js +12 -0
  176. package/dist/esm/node_modules/.pnpm/@tanstack_react-router-devtools@1.151.6_@tanstack_react-router@1.151.6_react-dom@19.1.2_20b78d099e847743bc64b4d051c71d30/node_modules/@tanstack/react-router-devtools/dist/esm/index.js.map +1 -0
  177. package/dist/esm/node_modules/.pnpm/@tanstack_router-core@1.151.6/node_modules/@tanstack/router-core/dist/esm/new-process-route-tree.js +95 -0
  178. package/dist/esm/node_modules/.pnpm/@tanstack_router-core@1.151.6/node_modules/@tanstack/router-core/dist/esm/new-process-route-tree.js.map +1 -0
  179. package/dist/esm/node_modules/.pnpm/@tanstack_router-core@1.151.6/node_modules/@tanstack/router-core/dist/esm/path.js +107 -0
  180. package/dist/esm/node_modules/.pnpm/@tanstack_router-core@1.151.6/node_modules/@tanstack/router-core/dist/esm/path.js.map +1 -0
  181. package/dist/esm/node_modules/.pnpm/@tanstack_router-core@1.151.6/node_modules/@tanstack/router-core/dist/esm/root.js +5 -0
  182. package/dist/esm/node_modules/.pnpm/@tanstack_router-core@1.151.6/node_modules/@tanstack/router-core/dist/esm/root.js.map +1 -0
  183. package/dist/esm/node_modules/.pnpm/@tanstack_router-devtools-core@1.151.6_@tanstack_router-core@1.151.6_csstype@3.2.3/node_modules/@tanstack/router-devtools-core/dist/BaseTanStackRouterDevtoolsPanel-DxaCaP75.js +1963 -0
  184. package/dist/esm/node_modules/.pnpm/@tanstack_router-devtools-core@1.151.6_@tanstack_router-core@1.151.6_csstype@3.2.3/node_modules/@tanstack/router-devtools-core/dist/BaseTanStackRouterDevtoolsPanel-DxaCaP75.js.map +1 -0
  185. package/dist/esm/node_modules/.pnpm/@tanstack_router-devtools-core@1.151.6_@tanstack_router-core@1.151.6_csstype@3.2.3/node_modules/@tanstack/router-devtools-core/dist/FloatingTanStackRouterDevtools-CaypUmOS.js +284 -0
  186. package/dist/esm/node_modules/.pnpm/@tanstack_router-devtools-core@1.151.6_@tanstack_router-core@1.151.6_csstype@3.2.3/node_modules/@tanstack/router-devtools-core/dist/FloatingTanStackRouterDevtools-CaypUmOS.js.map +1 -0
  187. package/dist/esm/node_modules/.pnpm/@tanstack_router-devtools-core@1.151.6_@tanstack_router-core@1.151.6_csstype@3.2.3/node_modules/@tanstack/router-devtools-core/dist/index-5jfj03XJ.js +1855 -0
  188. package/dist/esm/node_modules/.pnpm/@tanstack_router-devtools-core@1.151.6_@tanstack_router-core@1.151.6_csstype@3.2.3/node_modules/@tanstack/router-devtools-core/dist/index-5jfj03XJ.js.map +1 -0
  189. package/dist/esm/node_modules/.pnpm/goober@2.1.18_csstype@3.2.3/node_modules/goober/dist/goober.modern.js +56 -0
  190. package/dist/esm/node_modules/.pnpm/goober@2.1.18_csstype@3.2.3/node_modules/goober/dist/goober.modern.js.map +1 -0
  191. package/dist/esm/node_modules/.pnpm/react-hook-form@7.71.1_react@19.1.2/node_modules/react-hook-form/dist/index.esm.js +1894 -0
  192. package/dist/esm/node_modules/.pnpm/react-hook-form@7.71.1_react@19.1.2/node_modules/react-hook-form/dist/index.esm.js.map +1 -0
  193. package/dist/esm/node_modules/.pnpm/tiny-invariant@1.3.3/node_modules/tiny-invariant/dist/esm/tiny-invariant.js +17 -0
  194. package/dist/esm/node_modules/.pnpm/tiny-invariant@1.3.3/node_modules/tiny-invariant/dist/esm/tiny-invariant.js.map +1 -0
  195. package/dist/esm/node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/classic/errors.js +45 -0
  196. package/dist/esm/node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/classic/errors.js.map +1 -0
  197. package/dist/esm/node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/classic/iso.js +44 -0
  198. package/dist/esm/node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/classic/iso.js.map +1 -0
  199. package/dist/esm/node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/classic/parse.js +30 -0
  200. package/dist/esm/node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/classic/parse.js.map +1 -0
  201. package/dist/esm/node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/classic/schemas.js +632 -0
  202. package/dist/esm/node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/classic/schemas.js.map +1 -0
  203. package/dist/esm/node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/core/api.js +500 -0
  204. package/dist/esm/node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/core/api.js.map +1 -0
  205. package/dist/esm/node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/core/checks.js +244 -0
  206. package/dist/esm/node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/core/checks.js.map +1 -0
  207. package/dist/esm/node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/core/core.js +75 -0
  208. package/dist/esm/node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/core/core.js.map +1 -0
  209. package/dist/esm/node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/core/doc.js +38 -0
  210. package/dist/esm/node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/core/doc.js.map +1 -0
  211. package/dist/esm/node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/core/errors.js +73 -0
  212. package/dist/esm/node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/core/errors.js.map +1 -0
  213. package/dist/esm/node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/core/json-schema-processors.js +274 -0
  214. package/dist/esm/node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/core/json-schema-processors.js.map +1 -0
  215. package/dist/esm/node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/core/parse.js +100 -0
  216. package/dist/esm/node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/core/parse.js.map +1 -0
  217. package/dist/esm/node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/core/regexes.js +80 -0
  218. package/dist/esm/node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/core/regexes.js.map +1 -0
  219. package/dist/esm/node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/core/registries.js +52 -0
  220. package/dist/esm/node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/core/registries.js.map +1 -0
  221. package/dist/esm/node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/core/schemas.js +1247 -0
  222. package/dist/esm/node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/core/schemas.js.map +1 -0
  223. package/dist/esm/node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/core/to-json-schema.js +363 -0
  224. package/dist/esm/node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/core/to-json-schema.js.map +1 -0
  225. package/dist/esm/node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/core/util.js +407 -0
  226. package/dist/esm/node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/core/util.js.map +1 -0
  227. package/dist/esm/node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/core/versions.js +9 -0
  228. package/dist/esm/node_modules/.pnpm/zod@4.3.5/node_modules/zod/v4/core/versions.js.map +1 -0
  229. package/dist/esm/plugins/builtin/pageUrl/pageUrlTypes.d.ts +11 -0
  230. package/dist/esm/routeTree.gen.d.ts +263 -0
  231. package/dist/esm/routeTree.gen.js +117 -0
  232. package/dist/esm/routeTree.gen.js.map +1 -0
  233. package/dist/esm/routes/__root.d.ts +2 -0
  234. package/dist/esm/routes/__root.js +22 -0
  235. package/dist/esm/routes/__root.js.map +1 -0
  236. package/dist/esm/routes/_layout/catalog.apps.index.d.ts +5 -0
  237. package/dist/esm/routes/_layout/catalog.apps.index.js +25 -0
  238. package/dist/esm/routes/_layout/catalog.apps.index.js.map +1 -0
  239. package/dist/esm/routes/_layout/index.d.ts +7 -0
  240. package/dist/esm/routes/_layout/index.js +28 -0
  241. package/dist/esm/routes/_layout/index.js.map +1 -0
  242. package/dist/esm/routes/_layout/login.d.ts +1 -0
  243. package/dist/esm/routes/_layout/login.js +16 -0
  244. package/dist/esm/routes/_layout/login.js.map +1 -0
  245. package/dist/esm/routes/_layout.d.ts +1 -0
  246. package/dist/esm/routes/_layout.js +12 -0
  247. package/dist/esm/routes/_layout.js.map +1 -0
  248. package/dist/esm/routes/admin/app-for-catalog/$id.d.ts +5 -0
  249. package/dist/esm/routes/admin/app-for-catalog/_id.js +67 -0
  250. package/dist/esm/routes/admin/app-for-catalog/_id.js.map +1 -0
  251. package/dist/esm/routes/admin/app-for-catalog/_id2.js +321 -0
  252. package/dist/esm/routes/admin/app-for-catalog/_id2.js.map +1 -0
  253. package/dist/esm/routes/admin/app-for-catalog/index.d.ts +1 -0
  254. package/dist/esm/routes/admin/app-for-catalog/index.js +9 -0
  255. package/dist/esm/routes/admin/app-for-catalog/index.js.map +1 -0
  256. package/dist/esm/routes/admin/app-for-catalog/index2.js +12 -0
  257. package/dist/esm/routes/admin/app-for-catalog/index2.js.map +1 -0
  258. package/dist/esm/routes/admin/app-for-catalog.d.ts +1 -0
  259. package/dist/esm/routes/admin/app-for-catalog.js +14 -0
  260. package/dist/esm/routes/admin/app-for-catalog.js.map +1 -0
  261. package/dist/esm/routes/admin/app-for-catalog2.js +9 -0
  262. package/dist/esm/routes/admin/app-for-catalog2.js.map +1 -0
  263. package/dist/esm/routes/admin/approval-methods/index.d.ts +32 -0
  264. package/dist/esm/routes/admin/approval-methods/index.js +24 -0
  265. package/dist/esm/routes/admin/approval-methods/index.js.map +1 -0
  266. package/dist/esm/routes/admin/approval-methods/index2.js +100 -0
  267. package/dist/esm/routes/admin/approval-methods/index2.js.map +1 -0
  268. package/dist/esm/routes/admin/approval-methods.d.ts +1 -0
  269. package/dist/esm/routes/admin/approval-methods.js +14 -0
  270. package/dist/esm/routes/admin/approval-methods.js.map +1 -0
  271. package/dist/esm/routes/admin/approval-methods2.js +7 -0
  272. package/dist/esm/routes/admin/approval-methods2.js.map +1 -0
  273. package/dist/esm/routes/admin/chat.d.ts +1 -0
  274. package/dist/esm/routes/admin/chat.js +14 -0
  275. package/dist/esm/routes/admin/chat.js.map +1 -0
  276. package/dist/esm/routes/admin/chat2.js +9 -0
  277. package/dist/esm/routes/admin/chat2.js.map +1 -0
  278. package/dist/esm/routes/admin/icons.d.ts +1 -0
  279. package/dist/esm/routes/admin/icons.js +14 -0
  280. package/dist/esm/routes/admin/icons.js.map +1 -0
  281. package/dist/esm/routes/admin/icons2.js +12 -0
  282. package/dist/esm/routes/admin/icons2.js.map +1 -0
  283. package/dist/esm/routes/admin/index.d.ts +1 -0
  284. package/dist/esm/routes/admin/index.js +9 -0
  285. package/dist/esm/routes/admin/index.js.map +1 -0
  286. package/dist/esm/routes/admin/index2.js +9 -0
  287. package/dist/esm/routes/admin/index2.js.map +1 -0
  288. package/dist/esm/routes/admin.d.ts +1 -0
  289. package/dist/esm/routes/admin.js +37 -0
  290. package/dist/esm/routes/admin.js.map +1 -0
  291. package/dist/esm/routes/admin2.js +18 -0
  292. package/dist/esm/routes/admin2.js.map +1 -0
  293. package/dist/esm/routes/auth.callback.d.ts +4 -0
  294. package/dist/esm/routes/auth.callback.js +56 -0
  295. package/dist/esm/routes/auth.callback.js.map +1 -0
  296. package/dist/esm/types/slateTypes.d.ts +28 -0
  297. package/dist/esm/types/table.d.ts +7 -0
  298. package/dist/esm/types/tanstackQuery.d.ts +13 -0
  299. package/dist/esm/types/types.d.ts +25 -0
  300. package/dist/esm/types/userBehaviourTypes.d.ts +76 -0
  301. package/dist/esm/types/utilityTypes.d.ts +1 -0
  302. package/dist/esm/ui/accordion.d.ts +7 -0
  303. package/dist/esm/ui/accordion.js +65 -0
  304. package/dist/esm/ui/accordion.js.map +1 -0
  305. package/dist/esm/ui/alert-dialog.d.ts +14 -0
  306. package/dist/esm/ui/alert-dialog.js +141 -0
  307. package/dist/esm/ui/alert-dialog.js.map +1 -0
  308. package/dist/esm/ui/autocomplete.d.ts +29 -0
  309. package/dist/esm/ui/badge.d.ts +9 -0
  310. package/dist/esm/ui/badge.js +27 -0
  311. package/dist/esm/ui/badge.js.map +1 -0
  312. package/dist/esm/ui/breadcrumb.d.ts +11 -0
  313. package/dist/esm/ui/breadcrumb.js +84 -0
  314. package/dist/esm/ui/breadcrumb.js.map +1 -0
  315. package/dist/esm/ui/button-group.d.ts +11 -0
  316. package/dist/esm/ui/button.d.ts +13 -0
  317. package/dist/esm/ui/button.js +53 -0
  318. package/dist/esm/ui/button.js.map +1 -0
  319. package/dist/esm/ui/card.d.ts +9 -0
  320. package/dist/esm/ui/card.js +66 -0
  321. package/dist/esm/ui/card.js.map +1 -0
  322. package/dist/esm/ui/checkbox.d.ts +4 -0
  323. package/dist/esm/ui/collapsible.d.ts +5 -0
  324. package/dist/esm/ui/command.d.ts +20 -0
  325. package/dist/esm/ui/command.js +131 -0
  326. package/dist/esm/ui/command.js.map +1 -0
  327. package/dist/esm/ui/components/ActionCard.d.ts +9 -0
  328. package/dist/esm/ui/components/AppIcon.d.ts +7 -0
  329. package/dist/esm/ui/components/Breadcrumbs.d.ts +19 -0
  330. package/dist/esm/ui/components/Breadcrumbs.js +36 -0
  331. package/dist/esm/ui/components/Breadcrumbs.js.map +1 -0
  332. package/dist/esm/ui/components/commandInput/EhBaseSelector.d.ts +2 -0
  333. package/dist/esm/ui/components/commandInput/types.d.ts +13 -0
  334. package/dist/esm/ui/components/error/BaseErrorPage.d.ts +10 -0
  335. package/dist/esm/ui/components/error/BaseErrorPage.js +16 -0
  336. package/dist/esm/ui/components/error/BaseErrorPage.js.map +1 -0
  337. package/dist/esm/ui/components/error/DefaultErrorComponent.d.ts +3 -0
  338. package/dist/esm/ui/components/error/DefaultErrorComponent.js +73 -0
  339. package/dist/esm/ui/components/error/DefaultErrorComponent.js.map +1 -0
  340. package/dist/esm/ui/components/error/ForbiddenErrorPage.d.ts +5 -0
  341. package/dist/esm/ui/components/error/ForbiddenErrorPage.js +54 -0
  342. package/dist/esm/ui/components/error/ForbiddenErrorPage.js.map +1 -0
  343. package/dist/esm/ui/components/error/RootErrorPage.d.ts +5 -0
  344. package/dist/esm/ui/components/error/RootErrorPage.js +15 -0
  345. package/dist/esm/ui/components/error/RootErrorPage.js.map +1 -0
  346. package/dist/esm/ui/components/footer/Footer.d.ts +1 -0
  347. package/dist/esm/ui/components/header/Header.d.ts +5 -0
  348. package/dist/esm/ui/components/header/Header.js +103 -0
  349. package/dist/esm/ui/components/header/Header.js.map +1 -0
  350. package/dist/esm/ui/components/widgetPanel/AddWidgetCard.d.ts +5 -0
  351. package/dist/esm/ui/components/widgetPanel/WidgetGrid.d.ts +6 -0
  352. package/dist/esm/ui/components/widgets/CredentialsWidget.d.ts +11 -0
  353. package/dist/esm/ui/components/widgets/VersionWidget.d.ts +7 -0
  354. package/dist/esm/ui/crud-list/CrudList.d.ts +2 -0
  355. package/dist/esm/ui/crud-list/CrudList.js +189 -0
  356. package/dist/esm/ui/crud-list/CrudList.js.map +1 -0
  357. package/dist/esm/ui/crud-list/index.d.ts +2 -0
  358. package/dist/esm/ui/crud-list/types.d.ts +35 -0
  359. package/dist/esm/ui/dialog.d.ts +15 -0
  360. package/dist/esm/ui/dialog.js +111 -0
  361. package/dist/esm/ui/dialog.js.map +1 -0
  362. package/dist/esm/ui/dropdown-menu.d.ts +25 -0
  363. package/dist/esm/ui/dropdown-menu.js +79 -0
  364. package/dist/esm/ui/dropdown-menu.js.map +1 -0
  365. package/dist/esm/ui/editable-list/EditableListField.d.ts +2 -0
  366. package/dist/esm/ui/editable-list/EditableListField.js +130 -0
  367. package/dist/esm/ui/editable-list/EditableListField.js.map +1 -0
  368. package/dist/esm/ui/editable-list/index.d.ts +2 -0
  369. package/dist/esm/ui/editable-list/types.d.ts +17 -0
  370. package/dist/esm/ui/empty.d.ts +11 -0
  371. package/dist/esm/ui/empty.js +103 -0
  372. package/dist/esm/ui/empty.js.map +1 -0
  373. package/dist/esm/ui/error/NotFoundError.d.ts +1 -0
  374. package/dist/esm/ui/error/NotFoundError.js +17 -0
  375. package/dist/esm/ui/error/NotFoundError.js.map +1 -0
  376. package/dist/esm/ui/form.d.ts +56 -0
  377. package/dist/esm/ui/form.js +134 -0
  378. package/dist/esm/ui/form.js.map +1 -0
  379. package/dist/esm/ui/input-group.d.ts +16 -0
  380. package/dist/esm/ui/input.d.ts +3 -0
  381. package/dist/esm/ui/input.js +22 -0
  382. package/dist/esm/ui/input.js.map +1 -0
  383. package/dist/esm/ui/item.d.ts +23 -0
  384. package/dist/esm/ui/label.d.ts +4 -0
  385. package/dist/esm/ui/label.js +23 -0
  386. package/dist/esm/ui/label.js.map +1 -0
  387. package/dist/esm/ui/layout/Footer.d.ts +1 -0
  388. package/dist/esm/ui/layout/LoadingScreen.d.ts +6 -0
  389. package/dist/esm/ui/layout/LoadingScreen.js +54 -0
  390. package/dist/esm/ui/layout/LoadingScreen.js.map +1 -0
  391. package/dist/esm/ui/layout/MainLayout.d.ts +7 -0
  392. package/dist/esm/ui/layout/MainLayout.js +17 -0
  393. package/dist/esm/ui/layout/MainLayout.js.map +1 -0
  394. package/dist/esm/ui/layout/SideColumn.d.ts +1 -0
  395. package/dist/esm/ui/layout/TopLevelProviders.d.ts +10 -0
  396. package/dist/esm/ui/layout/TopLevelProviders.js +46 -0
  397. package/dist/esm/ui/layout/TopLevelProviders.js.map +1 -0
  398. package/dist/esm/ui/layout/TopLevelProvidersForErrors.d.ts +10 -0
  399. package/dist/esm/ui/layout/TopLevelProvidersForErrors.js +24 -0
  400. package/dist/esm/ui/layout/TopLevelProvidersForErrors.js.map +1 -0
  401. package/dist/esm/ui/link.d.ts +13 -0
  402. package/dist/esm/ui/link.js +28 -0
  403. package/dist/esm/ui/link.js.map +1 -0
  404. package/dist/esm/ui/linkExternal.d.ts +8 -0
  405. package/dist/esm/ui/linkExternal.js +26 -0
  406. package/dist/esm/ui/linkExternal.js.map +1 -0
  407. package/dist/esm/ui/main/JumpTabContent.d.ts +1 -0
  408. package/dist/esm/ui/main/Tabs.d.ts +4 -0
  409. package/dist/esm/ui/markdown-editor/MarkdownEditor.d.ts +9 -0
  410. package/dist/esm/ui/markdown-editor/MarkdownEditor.js +116 -0
  411. package/dist/esm/ui/markdown-editor/MarkdownEditor.js.map +1 -0
  412. package/dist/esm/ui/markdown-editor/MarkdownToolbar.d.ts +6 -0
  413. package/dist/esm/ui/markdown-editor/MarkdownToolbar.js +99 -0
  414. package/dist/esm/ui/markdown-editor/MarkdownToolbar.js.map +1 -0
  415. package/dist/esm/ui/markdown-editor/index.d.ts +2 -0
  416. package/dist/esm/ui/popover.d.ts +7 -0
  417. package/dist/esm/ui/popover.js +40 -0
  418. package/dist/esm/ui/popover.js.map +1 -0
  419. package/dist/esm/ui/radio-group.d.ts +5 -0
  420. package/dist/esm/ui/resizable.d.ts +7 -0
  421. package/dist/esm/ui/resizable.js +47 -0
  422. package/dist/esm/ui/resizable.js.map +1 -0
  423. package/dist/esm/ui/scroll-area.d.ts +5 -0
  424. package/dist/esm/ui/scroll-area.js +62 -0
  425. package/dist/esm/ui/scroll-area.js.map +1 -0
  426. package/dist/esm/ui/search-input-with-shortcut.d.ts +25 -0
  427. package/dist/esm/ui/select.d.ts +15 -0
  428. package/dist/esm/ui/select.js +138 -0
  429. package/dist/esm/ui/select.js.map +1 -0
  430. package/dist/esm/ui/separator.d.ts +4 -0
  431. package/dist/esm/ui/shortcut-button.d.ts +24 -0
  432. package/dist/esm/ui/skeleton.d.ts +2 -0
  433. package/dist/esm/ui/skeleton.js +16 -0
  434. package/dist/esm/ui/skeleton.js.map +1 -0
  435. package/dist/esm/ui/spinner.d.ts +2 -0
  436. package/dist/esm/ui/spinner.js +18 -0
  437. package/dist/esm/ui/spinner.js.map +1 -0
  438. package/dist/esm/ui/table.d.ts +10 -0
  439. package/dist/esm/ui/table.js +87 -0
  440. package/dist/esm/ui/table.js.map +1 -0
  441. package/dist/esm/ui/tabs.d.ts +7 -0
  442. package/dist/esm/ui/textarea.d.ts +3 -0
  443. package/dist/esm/ui/textarea.js +19 -0
  444. package/dist/esm/ui/textarea.js.map +1 -0
  445. package/dist/esm/ui/tooltip.d.ts +7 -0
  446. package/dist/esm/userDb/AcDb.d.ts +14 -0
  447. package/dist/esm/userDb/AcDb.js +28 -0
  448. package/dist/esm/userDb/AcDb.js.map +1 -0
  449. package/dist/esm/userDb/DbContext.d.ts +9 -0
  450. package/dist/esm/userDb/DbContext.js +18 -0
  451. package/dist/esm/userDb/DbContext.js.map +1 -0
  452. package/dist/esm/util/createEhRouter.d.ts +7 -0
  453. package/dist/esm/util/createEhRouter.js +19 -0
  454. package/dist/esm/util/createEhRouter.js.map +1 -0
  455. package/dist/esm/util/error-utils.d.ts +6 -0
  456. package/dist/esm/util/error-utils.js +28 -0
  457. package/dist/esm/util/error-utils.js.map +1 -0
  458. package/dist/esm/util/highlightMatches.d.ts +2 -0
  459. package/dist/esm/util/reactQueryUtils.d.ts +10 -0
  460. package/dist/esm/util/reactQueryUtils.js +17 -0
  461. package/dist/esm/util/reactQueryUtils.js.map +1 -0
  462. package/dist/esm/util/slug-utils.d.ts +12 -0
  463. package/dist/index.css +225 -0
  464. package/dist/public/app-catalog-16x16.png +0 -0
  465. package/dist/public/app-catalog-192x192.png +0 -0
  466. package/dist/public/app-catalog-32x32.png +0 -0
  467. package/dist/public/app-catalog-48x48.png +0 -0
  468. package/dist/public/app-catalog-512x512.png +0 -0
  469. package/dist/public/app-catalog-square.svg +160 -0
  470. package/dist/public/app-catalog.png +0 -0
  471. package/dist/public/app-catalog.svg +198 -0
  472. package/dist/public/apple-touch-180x180.png +0 -0
  473. package/dist/public/favicon-app-catalog.ico +0 -0
  474. package/dist/public/favicon.ico +0 -0
  475. package/dist/public/robots.txt +2 -0
  476. package/package.json +159 -0
  477. package/public/app-catalog-16x16.png +0 -0
  478. package/public/app-catalog-192x192.png +0 -0
  479. package/public/app-catalog-32x32.png +0 -0
  480. package/public/app-catalog-48x48.png +0 -0
  481. package/public/app-catalog-512x512.png +0 -0
  482. package/public/app-catalog-square.svg +160 -0
  483. package/public/app-catalog.png +0 -0
  484. package/public/app-catalog.svg +198 -0
  485. package/public/apple-touch-180x180.png +0 -0
  486. package/public/favicon-app-catalog.ico +0 -0
  487. package/public/favicon.ico +0 -0
  488. package/public/robots.txt +2 -0
  489. package/src/App.tsx +28 -0
  490. package/src/__tests__/setupTests.tsx +0 -0
  491. package/src/api/infra/createQueryClient.ts +29 -0
  492. package/src/api/infra/trpc.ts +6 -0
  493. package/src/api/unsorted/appCatalogFetcher.ts +32 -0
  494. package/src/api/unsorted/createCachingFetcher.ts +159 -0
  495. package/src/appPropsFactory.ts +37 -0
  496. package/src/assets/app-catalog.svg +198 -0
  497. package/src/components/IconPickerDialog.tsx +136 -0
  498. package/src/components/IconPickerField.tsx +88 -0
  499. package/src/components/ThemeSwitcher.tsx +22 -0
  500. package/src/components/theme-provider.tsx +8 -0
  501. package/src/errors/AuthorizationError.ts +32 -0
  502. package/src/errors/index.ts +1 -0
  503. package/src/index.css +225 -0
  504. package/src/index.tsx +3 -0
  505. package/src/lib/utils.ts +7 -0
  506. package/src/main.tsx +57 -0
  507. package/src/modules/admin-base/components/AdminChat.tsx +122 -0
  508. package/src/modules/admin-base/components/AdminLayout.tsx +111 -0
  509. package/src/modules/admin-base/components/AdminWelcome.tsx +52 -0
  510. package/src/modules/admin-base/context/AdminConfigContext.tsx +36 -0
  511. package/src/modules/admin-base/index.ts +16 -0
  512. package/src/modules/admin-base/types/adminTypes.ts +11 -0
  513. package/src/modules/appCatalog/AppCatalogAdminPage.tsx +274 -0
  514. package/src/modules/appCatalog/ScreenshotItem.tsx +59 -0
  515. package/src/modules/appCatalog/ScreenshotManager.tsx +193 -0
  516. package/src/modules/appCatalog/api/ApiQueryMagazineAppCatalog.ts +12 -0
  517. package/src/modules/appCatalog/catalogRouteLoader.ts +28 -0
  518. package/src/modules/appCatalog/context/AppCatalogContext.tsx +52 -0
  519. package/src/modules/appCatalog/index.ts +16 -0
  520. package/src/modules/appCatalog/routeLoader.ts +9 -0
  521. package/src/modules/appCatalog/ui/components/AccessRequestSection.tsx +370 -0
  522. package/src/modules/appCatalog/ui/components/AppDetailModal.tsx +355 -0
  523. package/src/modules/appCatalog/ui/components/ApproverDisplay.tsx +260 -0
  524. package/src/modules/appCatalog/ui/components/GroupingColumn.tsx +65 -0
  525. package/src/modules/appCatalog/ui/components/GroupingTabs.tsx +41 -0
  526. package/src/modules/appCatalog/ui/components/ScreenshotGallery.tsx +51 -0
  527. package/src/modules/appCatalog/ui/grid/AppCatalogFiltersCard.tsx +79 -0
  528. package/src/modules/appCatalog/ui/grid/AppCatalogGrid.tsx +487 -0
  529. package/src/modules/appCatalog/ui/grid/AppCatalogTable.tsx +89 -0
  530. package/src/modules/appCatalog/ui/grid/appCatalogUtils.ts +5 -0
  531. package/src/modules/appCatalog/ui/hooks/useKeyboardNavigation.ts +54 -0
  532. package/src/modules/appCatalog/ui/layout/AppCatalogLayout.tsx +57 -0
  533. package/src/modules/appCatalog/ui/pages/AppCatalogPage.tsx +142 -0
  534. package/src/modules/approvalMethod/AccessRequestFormFields.tsx +393 -0
  535. package/src/modules/approvalMethod/ApprovalMethodForm.tsx +323 -0
  536. package/src/modules/approvalMethod/ApprovalMethodSelector.tsx +150 -0
  537. package/src/modules/approvalMethod/api/ApiQueryMagazineApprovalMethod.ts +34 -0
  538. package/src/modules/auth/AuthContext.tsx +130 -0
  539. package/src/modules/auth/AuthModalContext.tsx +49 -0
  540. package/src/modules/auth/ProtectedContent.tsx +55 -0
  541. package/src/modules/auth/authClient.ts +9 -0
  542. package/src/modules/auth/authUtils.ts +41 -0
  543. package/src/modules/auth/index.ts +6 -0
  544. package/src/modules/auth/ui/LoginModal.tsx +36 -0
  545. package/src/modules/auth/ui/LoginPage.tsx +62 -0
  546. package/src/modules/auth/useAuthActions.ts +85 -0
  547. package/src/modules/config/GlobalConfigContext.tsx +42 -0
  548. package/src/modules/config/HealthStateContext.tsx +47 -0
  549. package/src/modules/gallery/Gallery.tsx +317 -0
  550. package/src/modules/icons/IconManagementPage.tsx +245 -0
  551. package/src/modules/pluginCore/PluginManagerContext.tsx +78 -0
  552. package/src/modules/pluginCore/makePluginManagerContext.ts +13 -0
  553. package/src/modules/pluginCore/types.ts +27 -0
  554. package/src/plugins/builtin/pageUrl/pageUrlTypes.ts +16 -0
  555. package/src/routeTree.gen.ts +361 -0
  556. package/src/routes/__root.tsx +23 -0
  557. package/src/routes/_layout/catalog.apps.index.tsx +28 -0
  558. package/src/routes/_layout/index.tsx +31 -0
  559. package/src/routes/_layout/login.tsx +20 -0
  560. package/src/routes/_layout.tsx +9 -0
  561. package/src/routes/admin/app-for-catalog/$id.tsx +571 -0
  562. package/src/routes/admin/app-for-catalog/index.tsx +19 -0
  563. package/src/routes/admin/app-for-catalog.tsx +12 -0
  564. package/src/routes/admin/approval-methods/index.tsx +161 -0
  565. package/src/routes/admin/approval-methods.tsx +10 -0
  566. package/src/routes/admin/chat.tsx +13 -0
  567. package/src/routes/admin/icons.tsx +22 -0
  568. package/src/routes/admin/index.tsx +9 -0
  569. package/src/routes/admin.tsx +60 -0
  570. package/src/routes/auth.callback.tsx +74 -0
  571. package/src/types/slateTypes.ts +22 -0
  572. package/src/types/table.ts +9 -0
  573. package/src/types/tanstackQuery.ts +16 -0
  574. package/src/types/types.ts +30 -0
  575. package/src/types/userBehaviourTypes.ts +100 -0
  576. package/src/types/utilityTypes.ts +1 -0
  577. package/src/types/vite-env.d.ts +2 -0
  578. package/src/ui/accordion.tsx +64 -0
  579. package/src/ui/alert-dialog.tsx +155 -0
  580. package/src/ui/autocomplete.tsx +272 -0
  581. package/src/ui/badge.tsx +38 -0
  582. package/src/ui/breadcrumb.tsx +106 -0
  583. package/src/ui/button-group.tsx +85 -0
  584. package/src/ui/button.tsx +66 -0
  585. package/src/ui/card.tsx +92 -0
  586. package/src/ui/checkbox.tsx +30 -0
  587. package/src/ui/collapsible.tsx +45 -0
  588. package/src/ui/command.tsx +196 -0
  589. package/src/ui/components/ActionCard.tsx +30 -0
  590. package/src/ui/components/AppIcon.tsx +48 -0
  591. package/src/ui/components/Breadcrumbs.tsx +97 -0
  592. package/src/ui/components/commandInput/EhBaseSelector.tsx +17 -0
  593. package/src/ui/components/commandInput/types.ts +22 -0
  594. package/src/ui/components/error/BaseErrorPage.tsx +26 -0
  595. package/src/ui/components/error/DefaultErrorComponent.tsx +107 -0
  596. package/src/ui/components/error/ForbiddenErrorPage.tsx +89 -0
  597. package/src/ui/components/error/RootErrorPage.tsx +23 -0
  598. package/src/ui/components/footer/Footer.tsx +51 -0
  599. package/src/ui/components/header/Header.tsx +135 -0
  600. package/src/ui/components/widgetPanel/AddWidgetCard.tsx +17 -0
  601. package/src/ui/components/widgetPanel/WidgetGrid.tsx +18 -0
  602. package/src/ui/components/widgets/CredentialsWidget.tsx +55 -0
  603. package/src/ui/components/widgets/VersionWidget.tsx +29 -0
  604. package/src/ui/crud-list/CrudList.tsx +274 -0
  605. package/src/ui/crud-list/index.ts +2 -0
  606. package/src/ui/crud-list/types.ts +44 -0
  607. package/src/ui/dialog.tsx +141 -0
  608. package/src/ui/dropdown-menu.tsx +255 -0
  609. package/src/ui/editable-list/EditableListField.tsx +188 -0
  610. package/src/ui/editable-list/index.ts +2 -0
  611. package/src/ui/editable-list/types.ts +18 -0
  612. package/src/ui/empty.tsx +105 -0
  613. package/src/ui/error/NotFoundError.tsx +16 -0
  614. package/src/ui/form.tsx +188 -0
  615. package/src/ui/input-group.tsx +167 -0
  616. package/src/ui/input.tsx +21 -0
  617. package/src/ui/item.tsx +194 -0
  618. package/src/ui/label.tsx +22 -0
  619. package/src/ui/layout/Footer.tsx +16 -0
  620. package/src/ui/layout/LoadingScreen.tsx +67 -0
  621. package/src/ui/layout/MainLayout.tsx +28 -0
  622. package/src/ui/layout/SideColumn.tsx +3 -0
  623. package/src/ui/layout/TopLevelProviders.tsx +63 -0
  624. package/src/ui/layout/TopLevelProvidersForErrors.tsx +34 -0
  625. package/src/ui/link.tsx +33 -0
  626. package/src/ui/linkExternal.tsx +26 -0
  627. package/src/ui/main/JumpTabContent.tsx +12 -0
  628. package/src/ui/main/Tabs.tsx +29 -0
  629. package/src/ui/markdown-editor/MarkdownEditor.tsx +132 -0
  630. package/src/ui/markdown-editor/MarkdownToolbar.tsx +90 -0
  631. package/src/ui/markdown-editor/index.ts +2 -0
  632. package/src/ui/popover.tsx +48 -0
  633. package/src/ui/radio-group.tsx +43 -0
  634. package/src/ui/resizable.tsx +51 -0
  635. package/src/ui/scroll-area.tsx +58 -0
  636. package/src/ui/search-input-with-shortcut.tsx +54 -0
  637. package/src/ui/select.tsx +185 -0
  638. package/src/ui/separator.tsx +26 -0
  639. package/src/ui/shortcut-button.tsx +84 -0
  640. package/src/ui/skeleton.tsx +13 -0
  641. package/src/ui/spinner.tsx +16 -0
  642. package/src/ui/table.tsx +114 -0
  643. package/src/ui/tabs.tsx +64 -0
  644. package/src/ui/textarea.tsx +18 -0
  645. package/src/ui/tooltip.tsx +60 -0
  646. package/src/userDb/AcDb.ts +29 -0
  647. package/src/userDb/DbContext.tsx +22 -0
  648. package/src/util/createEhRouter.tsx +22 -0
  649. package/src/util/error-utils.ts +31 -0
  650. package/src/util/highlightMatches.tsx +29 -0
  651. package/src/util/reactQueryUtils.ts +20 -0
  652. package/src/util/slug-utils.ts +17 -0
@@ -0,0 +1,1247 @@
1
+ import { $ZodCheck, $ZodCheckStringFormat } from "./checks.js";
2
+ import { $constructor, $ZodAsyncError, $ZodEncodeError, config, globalConfig } from "./core.js";
3
+ import { Doc } from "./doc.js";
4
+ import { safeParse, safeParseAsync } from "./parse.js";
5
+ import { string, boolean, datetime, date, time, duration, email, guid, uuid, emoji, nanoid, cuid, cuid2, ulid, xid, ksuid, ipv4, ipv6, cidrv4, cidrv6, base64, base64url, e164 } from "./regexes.js";
6
+ import { getEnumValues, propertyKeyTypes, escapeRegex, defineLazy, aborted, cleanRegex, finalizeIssue, isPlainObject, allowsEval, cached, isObject, esc, prefixIssues, optionalKeys, issue } from "./util.js";
7
+ import { clone } from "./util.js";
8
+ import { version } from "./versions.js";
9
+ const $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => {
10
+ var _a2;
11
+ var _a;
12
+ inst ?? (inst = {});
13
+ inst._zod.def = def;
14
+ inst._zod.bag = inst._zod.bag || {};
15
+ inst._zod.version = version;
16
+ const checks = [...inst._zod.def.checks ?? []];
17
+ if (inst._zod.traits.has("$ZodCheck")) {
18
+ checks.unshift(inst);
19
+ }
20
+ for (const ch of checks) {
21
+ for (const fn of ch._zod.onattach) {
22
+ fn(inst);
23
+ }
24
+ }
25
+ if (checks.length === 0) {
26
+ (_a = inst._zod).deferred ?? (_a.deferred = []);
27
+ (_a2 = inst._zod.deferred) == null ? void 0 : _a2.push(() => {
28
+ inst._zod.run = inst._zod.parse;
29
+ });
30
+ } else {
31
+ const runChecks = (payload, checks2, ctx) => {
32
+ let isAborted = aborted(payload);
33
+ let asyncResult;
34
+ for (const ch of checks2) {
35
+ if (ch._zod.def.when) {
36
+ const shouldRun = ch._zod.def.when(payload);
37
+ if (!shouldRun)
38
+ continue;
39
+ } else if (isAborted) {
40
+ continue;
41
+ }
42
+ const currLen = payload.issues.length;
43
+ const _ = ch._zod.check(payload);
44
+ if (_ instanceof Promise && (ctx == null ? void 0 : ctx.async) === false) {
45
+ throw new $ZodAsyncError();
46
+ }
47
+ if (asyncResult || _ instanceof Promise) {
48
+ asyncResult = (asyncResult ?? Promise.resolve()).then(async () => {
49
+ await _;
50
+ const nextLen = payload.issues.length;
51
+ if (nextLen === currLen)
52
+ return;
53
+ if (!isAborted)
54
+ isAborted = aborted(payload, currLen);
55
+ });
56
+ } else {
57
+ const nextLen = payload.issues.length;
58
+ if (nextLen === currLen)
59
+ continue;
60
+ if (!isAborted)
61
+ isAborted = aborted(payload, currLen);
62
+ }
63
+ }
64
+ if (asyncResult) {
65
+ return asyncResult.then(() => {
66
+ return payload;
67
+ });
68
+ }
69
+ return payload;
70
+ };
71
+ const handleCanaryResult = (canary, payload, ctx) => {
72
+ if (aborted(canary)) {
73
+ canary.aborted = true;
74
+ return canary;
75
+ }
76
+ const checkResult = runChecks(payload, checks, ctx);
77
+ if (checkResult instanceof Promise) {
78
+ if (ctx.async === false)
79
+ throw new $ZodAsyncError();
80
+ return checkResult.then((checkResult2) => inst._zod.parse(checkResult2, ctx));
81
+ }
82
+ return inst._zod.parse(checkResult, ctx);
83
+ };
84
+ inst._zod.run = (payload, ctx) => {
85
+ if (ctx.skipChecks) {
86
+ return inst._zod.parse(payload, ctx);
87
+ }
88
+ if (ctx.direction === "backward") {
89
+ const canary = inst._zod.parse({ value: payload.value, issues: [] }, { ...ctx, skipChecks: true });
90
+ if (canary instanceof Promise) {
91
+ return canary.then((canary2) => {
92
+ return handleCanaryResult(canary2, payload, ctx);
93
+ });
94
+ }
95
+ return handleCanaryResult(canary, payload, ctx);
96
+ }
97
+ const result = inst._zod.parse(payload, ctx);
98
+ if (result instanceof Promise) {
99
+ if (ctx.async === false)
100
+ throw new $ZodAsyncError();
101
+ return result.then((result2) => runChecks(result2, checks, ctx));
102
+ }
103
+ return runChecks(result, checks, ctx);
104
+ };
105
+ }
106
+ defineLazy(inst, "~standard", () => ({
107
+ validate: (value) => {
108
+ var _a3;
109
+ try {
110
+ const r = safeParse(inst, value);
111
+ return r.success ? { value: r.data } : { issues: (_a3 = r.error) == null ? void 0 : _a3.issues };
112
+ } catch (_) {
113
+ return safeParseAsync(inst, value).then((r) => {
114
+ var _a4;
115
+ return r.success ? { value: r.data } : { issues: (_a4 = r.error) == null ? void 0 : _a4.issues };
116
+ });
117
+ }
118
+ },
119
+ vendor: "zod",
120
+ version: 1
121
+ }));
122
+ });
123
+ const $ZodString = /* @__PURE__ */ $constructor("$ZodString", (inst, def) => {
124
+ var _a;
125
+ $ZodType.init(inst, def);
126
+ inst._zod.pattern = [...((_a = inst == null ? void 0 : inst._zod.bag) == null ? void 0 : _a.patterns) ?? []].pop() ?? string(inst._zod.bag);
127
+ inst._zod.parse = (payload, _) => {
128
+ if (def.coerce)
129
+ try {
130
+ payload.value = String(payload.value);
131
+ } catch (_2) {
132
+ }
133
+ if (typeof payload.value === "string")
134
+ return payload;
135
+ payload.issues.push({
136
+ expected: "string",
137
+ code: "invalid_type",
138
+ input: payload.value,
139
+ inst
140
+ });
141
+ return payload;
142
+ };
143
+ });
144
+ const $ZodStringFormat = /* @__PURE__ */ $constructor("$ZodStringFormat", (inst, def) => {
145
+ $ZodCheckStringFormat.init(inst, def);
146
+ $ZodString.init(inst, def);
147
+ });
148
+ const $ZodGUID = /* @__PURE__ */ $constructor("$ZodGUID", (inst, def) => {
149
+ def.pattern ?? (def.pattern = guid);
150
+ $ZodStringFormat.init(inst, def);
151
+ });
152
+ const $ZodUUID = /* @__PURE__ */ $constructor("$ZodUUID", (inst, def) => {
153
+ if (def.version) {
154
+ const versionMap = {
155
+ v1: 1,
156
+ v2: 2,
157
+ v3: 3,
158
+ v4: 4,
159
+ v5: 5,
160
+ v6: 6,
161
+ v7: 7,
162
+ v8: 8
163
+ };
164
+ const v = versionMap[def.version];
165
+ if (v === void 0)
166
+ throw new Error(`Invalid UUID version: "${def.version}"`);
167
+ def.pattern ?? (def.pattern = uuid(v));
168
+ } else
169
+ def.pattern ?? (def.pattern = uuid());
170
+ $ZodStringFormat.init(inst, def);
171
+ });
172
+ const $ZodEmail = /* @__PURE__ */ $constructor("$ZodEmail", (inst, def) => {
173
+ def.pattern ?? (def.pattern = email);
174
+ $ZodStringFormat.init(inst, def);
175
+ });
176
+ const $ZodURL = /* @__PURE__ */ $constructor("$ZodURL", (inst, def) => {
177
+ $ZodStringFormat.init(inst, def);
178
+ inst._zod.check = (payload) => {
179
+ try {
180
+ const trimmed = payload.value.trim();
181
+ const url = new URL(trimmed);
182
+ if (def.hostname) {
183
+ def.hostname.lastIndex = 0;
184
+ if (!def.hostname.test(url.hostname)) {
185
+ payload.issues.push({
186
+ code: "invalid_format",
187
+ format: "url",
188
+ note: "Invalid hostname",
189
+ pattern: def.hostname.source,
190
+ input: payload.value,
191
+ inst,
192
+ continue: !def.abort
193
+ });
194
+ }
195
+ }
196
+ if (def.protocol) {
197
+ def.protocol.lastIndex = 0;
198
+ if (!def.protocol.test(url.protocol.endsWith(":") ? url.protocol.slice(0, -1) : url.protocol)) {
199
+ payload.issues.push({
200
+ code: "invalid_format",
201
+ format: "url",
202
+ note: "Invalid protocol",
203
+ pattern: def.protocol.source,
204
+ input: payload.value,
205
+ inst,
206
+ continue: !def.abort
207
+ });
208
+ }
209
+ }
210
+ if (def.normalize) {
211
+ payload.value = url.href;
212
+ } else {
213
+ payload.value = trimmed;
214
+ }
215
+ return;
216
+ } catch (_) {
217
+ payload.issues.push({
218
+ code: "invalid_format",
219
+ format: "url",
220
+ input: payload.value,
221
+ inst,
222
+ continue: !def.abort
223
+ });
224
+ }
225
+ };
226
+ });
227
+ const $ZodEmoji = /* @__PURE__ */ $constructor("$ZodEmoji", (inst, def) => {
228
+ def.pattern ?? (def.pattern = emoji());
229
+ $ZodStringFormat.init(inst, def);
230
+ });
231
+ const $ZodNanoID = /* @__PURE__ */ $constructor("$ZodNanoID", (inst, def) => {
232
+ def.pattern ?? (def.pattern = nanoid);
233
+ $ZodStringFormat.init(inst, def);
234
+ });
235
+ const $ZodCUID = /* @__PURE__ */ $constructor("$ZodCUID", (inst, def) => {
236
+ def.pattern ?? (def.pattern = cuid);
237
+ $ZodStringFormat.init(inst, def);
238
+ });
239
+ const $ZodCUID2 = /* @__PURE__ */ $constructor("$ZodCUID2", (inst, def) => {
240
+ def.pattern ?? (def.pattern = cuid2);
241
+ $ZodStringFormat.init(inst, def);
242
+ });
243
+ const $ZodULID = /* @__PURE__ */ $constructor("$ZodULID", (inst, def) => {
244
+ def.pattern ?? (def.pattern = ulid);
245
+ $ZodStringFormat.init(inst, def);
246
+ });
247
+ const $ZodXID = /* @__PURE__ */ $constructor("$ZodXID", (inst, def) => {
248
+ def.pattern ?? (def.pattern = xid);
249
+ $ZodStringFormat.init(inst, def);
250
+ });
251
+ const $ZodKSUID = /* @__PURE__ */ $constructor("$ZodKSUID", (inst, def) => {
252
+ def.pattern ?? (def.pattern = ksuid);
253
+ $ZodStringFormat.init(inst, def);
254
+ });
255
+ const $ZodISODateTime = /* @__PURE__ */ $constructor("$ZodISODateTime", (inst, def) => {
256
+ def.pattern ?? (def.pattern = datetime(def));
257
+ $ZodStringFormat.init(inst, def);
258
+ });
259
+ const $ZodISODate = /* @__PURE__ */ $constructor("$ZodISODate", (inst, def) => {
260
+ def.pattern ?? (def.pattern = date);
261
+ $ZodStringFormat.init(inst, def);
262
+ });
263
+ const $ZodISOTime = /* @__PURE__ */ $constructor("$ZodISOTime", (inst, def) => {
264
+ def.pattern ?? (def.pattern = time(def));
265
+ $ZodStringFormat.init(inst, def);
266
+ });
267
+ const $ZodISODuration = /* @__PURE__ */ $constructor("$ZodISODuration", (inst, def) => {
268
+ def.pattern ?? (def.pattern = duration);
269
+ $ZodStringFormat.init(inst, def);
270
+ });
271
+ const $ZodIPv4 = /* @__PURE__ */ $constructor("$ZodIPv4", (inst, def) => {
272
+ def.pattern ?? (def.pattern = ipv4);
273
+ $ZodStringFormat.init(inst, def);
274
+ inst._zod.bag.format = `ipv4`;
275
+ });
276
+ const $ZodIPv6 = /* @__PURE__ */ $constructor("$ZodIPv6", (inst, def) => {
277
+ def.pattern ?? (def.pattern = ipv6);
278
+ $ZodStringFormat.init(inst, def);
279
+ inst._zod.bag.format = `ipv6`;
280
+ inst._zod.check = (payload) => {
281
+ try {
282
+ new URL(`http://[${payload.value}]`);
283
+ } catch {
284
+ payload.issues.push({
285
+ code: "invalid_format",
286
+ format: "ipv6",
287
+ input: payload.value,
288
+ inst,
289
+ continue: !def.abort
290
+ });
291
+ }
292
+ };
293
+ });
294
+ const $ZodCIDRv4 = /* @__PURE__ */ $constructor("$ZodCIDRv4", (inst, def) => {
295
+ def.pattern ?? (def.pattern = cidrv4);
296
+ $ZodStringFormat.init(inst, def);
297
+ });
298
+ const $ZodCIDRv6 = /* @__PURE__ */ $constructor("$ZodCIDRv6", (inst, def) => {
299
+ def.pattern ?? (def.pattern = cidrv6);
300
+ $ZodStringFormat.init(inst, def);
301
+ inst._zod.check = (payload) => {
302
+ const parts = payload.value.split("/");
303
+ try {
304
+ if (parts.length !== 2)
305
+ throw new Error();
306
+ const [address, prefix] = parts;
307
+ if (!prefix)
308
+ throw new Error();
309
+ const prefixNum = Number(prefix);
310
+ if (`${prefixNum}` !== prefix)
311
+ throw new Error();
312
+ if (prefixNum < 0 || prefixNum > 128)
313
+ throw new Error();
314
+ new URL(`http://[${address}]`);
315
+ } catch {
316
+ payload.issues.push({
317
+ code: "invalid_format",
318
+ format: "cidrv6",
319
+ input: payload.value,
320
+ inst,
321
+ continue: !def.abort
322
+ });
323
+ }
324
+ };
325
+ });
326
+ function isValidBase64(data) {
327
+ if (data === "")
328
+ return true;
329
+ if (data.length % 4 !== 0)
330
+ return false;
331
+ try {
332
+ atob(data);
333
+ return true;
334
+ } catch {
335
+ return false;
336
+ }
337
+ }
338
+ const $ZodBase64 = /* @__PURE__ */ $constructor("$ZodBase64", (inst, def) => {
339
+ def.pattern ?? (def.pattern = base64);
340
+ $ZodStringFormat.init(inst, def);
341
+ inst._zod.bag.contentEncoding = "base64";
342
+ inst._zod.check = (payload) => {
343
+ if (isValidBase64(payload.value))
344
+ return;
345
+ payload.issues.push({
346
+ code: "invalid_format",
347
+ format: "base64",
348
+ input: payload.value,
349
+ inst,
350
+ continue: !def.abort
351
+ });
352
+ };
353
+ });
354
+ function isValidBase64URL(data) {
355
+ if (!base64url.test(data))
356
+ return false;
357
+ const base642 = data.replace(/[-_]/g, (c) => c === "-" ? "+" : "/");
358
+ const padded = base642.padEnd(Math.ceil(base642.length / 4) * 4, "=");
359
+ return isValidBase64(padded);
360
+ }
361
+ const $ZodBase64URL = /* @__PURE__ */ $constructor("$ZodBase64URL", (inst, def) => {
362
+ def.pattern ?? (def.pattern = base64url);
363
+ $ZodStringFormat.init(inst, def);
364
+ inst._zod.bag.contentEncoding = "base64url";
365
+ inst._zod.check = (payload) => {
366
+ if (isValidBase64URL(payload.value))
367
+ return;
368
+ payload.issues.push({
369
+ code: "invalid_format",
370
+ format: "base64url",
371
+ input: payload.value,
372
+ inst,
373
+ continue: !def.abort
374
+ });
375
+ };
376
+ });
377
+ const $ZodE164 = /* @__PURE__ */ $constructor("$ZodE164", (inst, def) => {
378
+ def.pattern ?? (def.pattern = e164);
379
+ $ZodStringFormat.init(inst, def);
380
+ });
381
+ function isValidJWT(token, algorithm = null) {
382
+ try {
383
+ const tokensParts = token.split(".");
384
+ if (tokensParts.length !== 3)
385
+ return false;
386
+ const [header] = tokensParts;
387
+ if (!header)
388
+ return false;
389
+ const parsedHeader = JSON.parse(atob(header));
390
+ if ("typ" in parsedHeader && (parsedHeader == null ? void 0 : parsedHeader.typ) !== "JWT")
391
+ return false;
392
+ if (!parsedHeader.alg)
393
+ return false;
394
+ if (algorithm && (!("alg" in parsedHeader) || parsedHeader.alg !== algorithm))
395
+ return false;
396
+ return true;
397
+ } catch {
398
+ return false;
399
+ }
400
+ }
401
+ const $ZodJWT = /* @__PURE__ */ $constructor("$ZodJWT", (inst, def) => {
402
+ $ZodStringFormat.init(inst, def);
403
+ inst._zod.check = (payload) => {
404
+ if (isValidJWT(payload.value, def.alg))
405
+ return;
406
+ payload.issues.push({
407
+ code: "invalid_format",
408
+ format: "jwt",
409
+ input: payload.value,
410
+ inst,
411
+ continue: !def.abort
412
+ });
413
+ };
414
+ });
415
+ const $ZodBoolean = /* @__PURE__ */ $constructor("$ZodBoolean", (inst, def) => {
416
+ $ZodType.init(inst, def);
417
+ inst._zod.pattern = boolean;
418
+ inst._zod.parse = (payload, _ctx) => {
419
+ if (def.coerce)
420
+ try {
421
+ payload.value = Boolean(payload.value);
422
+ } catch (_) {
423
+ }
424
+ const input = payload.value;
425
+ if (typeof input === "boolean")
426
+ return payload;
427
+ payload.issues.push({
428
+ expected: "boolean",
429
+ code: "invalid_type",
430
+ input,
431
+ inst
432
+ });
433
+ return payload;
434
+ };
435
+ });
436
+ const $ZodUnknown = /* @__PURE__ */ $constructor("$ZodUnknown", (inst, def) => {
437
+ $ZodType.init(inst, def);
438
+ inst._zod.parse = (payload) => payload;
439
+ });
440
+ const $ZodNever = /* @__PURE__ */ $constructor("$ZodNever", (inst, def) => {
441
+ $ZodType.init(inst, def);
442
+ inst._zod.parse = (payload, _ctx) => {
443
+ payload.issues.push({
444
+ expected: "never",
445
+ code: "invalid_type",
446
+ input: payload.value,
447
+ inst
448
+ });
449
+ return payload;
450
+ };
451
+ });
452
+ function handleArrayResult(result, final, index) {
453
+ if (result.issues.length) {
454
+ final.issues.push(...prefixIssues(index, result.issues));
455
+ }
456
+ final.value[index] = result.value;
457
+ }
458
+ const $ZodArray = /* @__PURE__ */ $constructor("$ZodArray", (inst, def) => {
459
+ $ZodType.init(inst, def);
460
+ inst._zod.parse = (payload, ctx) => {
461
+ const input = payload.value;
462
+ if (!Array.isArray(input)) {
463
+ payload.issues.push({
464
+ expected: "array",
465
+ code: "invalid_type",
466
+ input,
467
+ inst
468
+ });
469
+ return payload;
470
+ }
471
+ payload.value = Array(input.length);
472
+ const proms = [];
473
+ for (let i = 0; i < input.length; i++) {
474
+ const item = input[i];
475
+ const result = def.element._zod.run({
476
+ value: item,
477
+ issues: []
478
+ }, ctx);
479
+ if (result instanceof Promise) {
480
+ proms.push(result.then((result2) => handleArrayResult(result2, payload, i)));
481
+ } else {
482
+ handleArrayResult(result, payload, i);
483
+ }
484
+ }
485
+ if (proms.length) {
486
+ return Promise.all(proms).then(() => payload);
487
+ }
488
+ return payload;
489
+ };
490
+ });
491
+ function handlePropertyResult(result, final, key, input, isOptionalOut) {
492
+ if (result.issues.length) {
493
+ if (isOptionalOut && !(key in input)) {
494
+ return;
495
+ }
496
+ final.issues.push(...prefixIssues(key, result.issues));
497
+ }
498
+ if (result.value === void 0) {
499
+ if (key in input) {
500
+ final.value[key] = void 0;
501
+ }
502
+ } else {
503
+ final.value[key] = result.value;
504
+ }
505
+ }
506
+ function normalizeDef(def) {
507
+ var _a, _b, _c, _d;
508
+ const keys = Object.keys(def.shape);
509
+ for (const k of keys) {
510
+ if (!((_d = (_c = (_b = (_a = def.shape) == null ? void 0 : _a[k]) == null ? void 0 : _b._zod) == null ? void 0 : _c.traits) == null ? void 0 : _d.has("$ZodType"))) {
511
+ throw new Error(`Invalid element at key "${k}": expected a Zod schema`);
512
+ }
513
+ }
514
+ const okeys = optionalKeys(def.shape);
515
+ return {
516
+ ...def,
517
+ keys,
518
+ keySet: new Set(keys),
519
+ numKeys: keys.length,
520
+ optionalKeys: new Set(okeys)
521
+ };
522
+ }
523
+ function handleCatchall(proms, input, payload, ctx, def, inst) {
524
+ const unrecognized = [];
525
+ const keySet = def.keySet;
526
+ const _catchall = def.catchall._zod;
527
+ const t = _catchall.def.type;
528
+ const isOptionalOut = _catchall.optout === "optional";
529
+ for (const key in input) {
530
+ if (keySet.has(key))
531
+ continue;
532
+ if (t === "never") {
533
+ unrecognized.push(key);
534
+ continue;
535
+ }
536
+ const r = _catchall.run({ value: input[key], issues: [] }, ctx);
537
+ if (r instanceof Promise) {
538
+ proms.push(r.then((r2) => handlePropertyResult(r2, payload, key, input, isOptionalOut)));
539
+ } else {
540
+ handlePropertyResult(r, payload, key, input, isOptionalOut);
541
+ }
542
+ }
543
+ if (unrecognized.length) {
544
+ payload.issues.push({
545
+ code: "unrecognized_keys",
546
+ keys: unrecognized,
547
+ input,
548
+ inst
549
+ });
550
+ }
551
+ if (!proms.length)
552
+ return payload;
553
+ return Promise.all(proms).then(() => {
554
+ return payload;
555
+ });
556
+ }
557
+ const $ZodObject = /* @__PURE__ */ $constructor("$ZodObject", (inst, def) => {
558
+ $ZodType.init(inst, def);
559
+ const desc = Object.getOwnPropertyDescriptor(def, "shape");
560
+ if (!(desc == null ? void 0 : desc.get)) {
561
+ const sh = def.shape;
562
+ Object.defineProperty(def, "shape", {
563
+ get: () => {
564
+ const newSh = { ...sh };
565
+ Object.defineProperty(def, "shape", {
566
+ value: newSh
567
+ });
568
+ return newSh;
569
+ }
570
+ });
571
+ }
572
+ const _normalized = cached(() => normalizeDef(def));
573
+ defineLazy(inst._zod, "propValues", () => {
574
+ const shape = def.shape;
575
+ const propValues = {};
576
+ for (const key in shape) {
577
+ const field = shape[key]._zod;
578
+ if (field.values) {
579
+ propValues[key] ?? (propValues[key] = /* @__PURE__ */ new Set());
580
+ for (const v of field.values)
581
+ propValues[key].add(v);
582
+ }
583
+ }
584
+ return propValues;
585
+ });
586
+ const isObject$1 = isObject;
587
+ const catchall = def.catchall;
588
+ let value;
589
+ inst._zod.parse = (payload, ctx) => {
590
+ value ?? (value = _normalized.value);
591
+ const input = payload.value;
592
+ if (!isObject$1(input)) {
593
+ payload.issues.push({
594
+ expected: "object",
595
+ code: "invalid_type",
596
+ input,
597
+ inst
598
+ });
599
+ return payload;
600
+ }
601
+ payload.value = {};
602
+ const proms = [];
603
+ const shape = value.shape;
604
+ for (const key of value.keys) {
605
+ const el = shape[key];
606
+ const isOptionalOut = el._zod.optout === "optional";
607
+ const r = el._zod.run({ value: input[key], issues: [] }, ctx);
608
+ if (r instanceof Promise) {
609
+ proms.push(r.then((r2) => handlePropertyResult(r2, payload, key, input, isOptionalOut)));
610
+ } else {
611
+ handlePropertyResult(r, payload, key, input, isOptionalOut);
612
+ }
613
+ }
614
+ if (!catchall) {
615
+ return proms.length ? Promise.all(proms).then(() => payload) : payload;
616
+ }
617
+ return handleCatchall(proms, input, payload, ctx, _normalized.value, inst);
618
+ };
619
+ });
620
+ const $ZodObjectJIT = /* @__PURE__ */ $constructor("$ZodObjectJIT", (inst, def) => {
621
+ $ZodObject.init(inst, def);
622
+ const superParse = inst._zod.parse;
623
+ const _normalized = cached(() => normalizeDef(def));
624
+ const generateFastpass = (shape) => {
625
+ var _a;
626
+ const doc = new Doc(["shape", "payload", "ctx"]);
627
+ const normalized = _normalized.value;
628
+ const parseStr = (key) => {
629
+ const k = esc(key);
630
+ return `shape[${k}]._zod.run({ value: input[${k}], issues: [] }, ctx)`;
631
+ };
632
+ doc.write(`const input = payload.value;`);
633
+ const ids = /* @__PURE__ */ Object.create(null);
634
+ let counter = 0;
635
+ for (const key of normalized.keys) {
636
+ ids[key] = `key_${counter++}`;
637
+ }
638
+ doc.write(`const newResult = {};`);
639
+ for (const key of normalized.keys) {
640
+ const id = ids[key];
641
+ const k = esc(key);
642
+ const schema = shape[key];
643
+ const isOptionalOut = ((_a = schema == null ? void 0 : schema._zod) == null ? void 0 : _a.optout) === "optional";
644
+ doc.write(`const ${id} = ${parseStr(key)};`);
645
+ if (isOptionalOut) {
646
+ doc.write(`
647
+ if (${id}.issues.length) {
648
+ if (${k} in input) {
649
+ payload.issues = payload.issues.concat(${id}.issues.map(iss => ({
650
+ ...iss,
651
+ path: iss.path ? [${k}, ...iss.path] : [${k}]
652
+ })));
653
+ }
654
+ }
655
+
656
+ if (${id}.value === undefined) {
657
+ if (${k} in input) {
658
+ newResult[${k}] = undefined;
659
+ }
660
+ } else {
661
+ newResult[${k}] = ${id}.value;
662
+ }
663
+
664
+ `);
665
+ } else {
666
+ doc.write(`
667
+ if (${id}.issues.length) {
668
+ payload.issues = payload.issues.concat(${id}.issues.map(iss => ({
669
+ ...iss,
670
+ path: iss.path ? [${k}, ...iss.path] : [${k}]
671
+ })));
672
+ }
673
+
674
+ if (${id}.value === undefined) {
675
+ if (${k} in input) {
676
+ newResult[${k}] = undefined;
677
+ }
678
+ } else {
679
+ newResult[${k}] = ${id}.value;
680
+ }
681
+
682
+ `);
683
+ }
684
+ }
685
+ doc.write(`payload.value = newResult;`);
686
+ doc.write(`return payload;`);
687
+ const fn = doc.compile();
688
+ return (payload, ctx) => fn(shape, payload, ctx);
689
+ };
690
+ let fastpass;
691
+ const isObject$1 = isObject;
692
+ const jit = !globalConfig.jitless;
693
+ const allowsEval$1 = allowsEval;
694
+ const fastEnabled = jit && allowsEval$1.value;
695
+ const catchall = def.catchall;
696
+ let value;
697
+ inst._zod.parse = (payload, ctx) => {
698
+ value ?? (value = _normalized.value);
699
+ const input = payload.value;
700
+ if (!isObject$1(input)) {
701
+ payload.issues.push({
702
+ expected: "object",
703
+ code: "invalid_type",
704
+ input,
705
+ inst
706
+ });
707
+ return payload;
708
+ }
709
+ if (jit && fastEnabled && (ctx == null ? void 0 : ctx.async) === false && ctx.jitless !== true) {
710
+ if (!fastpass)
711
+ fastpass = generateFastpass(def.shape);
712
+ payload = fastpass(payload, ctx);
713
+ if (!catchall)
714
+ return payload;
715
+ return handleCatchall([], input, payload, ctx, value, inst);
716
+ }
717
+ return superParse(payload, ctx);
718
+ };
719
+ });
720
+ function handleUnionResults(results, final, inst, ctx) {
721
+ for (const result of results) {
722
+ if (result.issues.length === 0) {
723
+ final.value = result.value;
724
+ return final;
725
+ }
726
+ }
727
+ const nonaborted = results.filter((r) => !aborted(r));
728
+ if (nonaborted.length === 1) {
729
+ final.value = nonaborted[0].value;
730
+ return nonaborted[0];
731
+ }
732
+ final.issues.push({
733
+ code: "invalid_union",
734
+ input: final.value,
735
+ inst,
736
+ errors: results.map((result) => result.issues.map((iss) => finalizeIssue(iss, ctx, config())))
737
+ });
738
+ return final;
739
+ }
740
+ const $ZodUnion = /* @__PURE__ */ $constructor("$ZodUnion", (inst, def) => {
741
+ $ZodType.init(inst, def);
742
+ defineLazy(inst._zod, "optin", () => def.options.some((o) => o._zod.optin === "optional") ? "optional" : void 0);
743
+ defineLazy(inst._zod, "optout", () => def.options.some((o) => o._zod.optout === "optional") ? "optional" : void 0);
744
+ defineLazy(inst._zod, "values", () => {
745
+ if (def.options.every((o) => o._zod.values)) {
746
+ return new Set(def.options.flatMap((option) => Array.from(option._zod.values)));
747
+ }
748
+ return void 0;
749
+ });
750
+ defineLazy(inst._zod, "pattern", () => {
751
+ if (def.options.every((o) => o._zod.pattern)) {
752
+ const patterns = def.options.map((o) => o._zod.pattern);
753
+ return new RegExp(`^(${patterns.map((p) => cleanRegex(p.source)).join("|")})$`);
754
+ }
755
+ return void 0;
756
+ });
757
+ const single = def.options.length === 1;
758
+ const first = def.options[0]._zod.run;
759
+ inst._zod.parse = (payload, ctx) => {
760
+ if (single) {
761
+ return first(payload, ctx);
762
+ }
763
+ let async = false;
764
+ const results = [];
765
+ for (const option of def.options) {
766
+ const result = option._zod.run({
767
+ value: payload.value,
768
+ issues: []
769
+ }, ctx);
770
+ if (result instanceof Promise) {
771
+ results.push(result);
772
+ async = true;
773
+ } else {
774
+ if (result.issues.length === 0)
775
+ return result;
776
+ results.push(result);
777
+ }
778
+ }
779
+ if (!async)
780
+ return handleUnionResults(results, payload, inst, ctx);
781
+ return Promise.all(results).then((results2) => {
782
+ return handleUnionResults(results2, payload, inst, ctx);
783
+ });
784
+ };
785
+ });
786
+ const $ZodIntersection = /* @__PURE__ */ $constructor("$ZodIntersection", (inst, def) => {
787
+ $ZodType.init(inst, def);
788
+ inst._zod.parse = (payload, ctx) => {
789
+ const input = payload.value;
790
+ const left = def.left._zod.run({ value: input, issues: [] }, ctx);
791
+ const right = def.right._zod.run({ value: input, issues: [] }, ctx);
792
+ const async = left instanceof Promise || right instanceof Promise;
793
+ if (async) {
794
+ return Promise.all([left, right]).then(([left2, right2]) => {
795
+ return handleIntersectionResults(payload, left2, right2);
796
+ });
797
+ }
798
+ return handleIntersectionResults(payload, left, right);
799
+ };
800
+ });
801
+ function mergeValues(a, b) {
802
+ if (a === b) {
803
+ return { valid: true, data: a };
804
+ }
805
+ if (a instanceof Date && b instanceof Date && +a === +b) {
806
+ return { valid: true, data: a };
807
+ }
808
+ if (isPlainObject(a) && isPlainObject(b)) {
809
+ const bKeys = Object.keys(b);
810
+ const sharedKeys = Object.keys(a).filter((key) => bKeys.indexOf(key) !== -1);
811
+ const newObj = { ...a, ...b };
812
+ for (const key of sharedKeys) {
813
+ const sharedValue = mergeValues(a[key], b[key]);
814
+ if (!sharedValue.valid) {
815
+ return {
816
+ valid: false,
817
+ mergeErrorPath: [key, ...sharedValue.mergeErrorPath]
818
+ };
819
+ }
820
+ newObj[key] = sharedValue.data;
821
+ }
822
+ return { valid: true, data: newObj };
823
+ }
824
+ if (Array.isArray(a) && Array.isArray(b)) {
825
+ if (a.length !== b.length) {
826
+ return { valid: false, mergeErrorPath: [] };
827
+ }
828
+ const newArray = [];
829
+ for (let index = 0; index < a.length; index++) {
830
+ const itemA = a[index];
831
+ const itemB = b[index];
832
+ const sharedValue = mergeValues(itemA, itemB);
833
+ if (!sharedValue.valid) {
834
+ return {
835
+ valid: false,
836
+ mergeErrorPath: [index, ...sharedValue.mergeErrorPath]
837
+ };
838
+ }
839
+ newArray.push(sharedValue.data);
840
+ }
841
+ return { valid: true, data: newArray };
842
+ }
843
+ return { valid: false, mergeErrorPath: [] };
844
+ }
845
+ function handleIntersectionResults(result, left, right) {
846
+ const unrecKeys = /* @__PURE__ */ new Map();
847
+ let unrecIssue;
848
+ for (const iss of left.issues) {
849
+ if (iss.code === "unrecognized_keys") {
850
+ unrecIssue ?? (unrecIssue = iss);
851
+ for (const k of iss.keys) {
852
+ if (!unrecKeys.has(k))
853
+ unrecKeys.set(k, {});
854
+ unrecKeys.get(k).l = true;
855
+ }
856
+ } else {
857
+ result.issues.push(iss);
858
+ }
859
+ }
860
+ for (const iss of right.issues) {
861
+ if (iss.code === "unrecognized_keys") {
862
+ for (const k of iss.keys) {
863
+ if (!unrecKeys.has(k))
864
+ unrecKeys.set(k, {});
865
+ unrecKeys.get(k).r = true;
866
+ }
867
+ } else {
868
+ result.issues.push(iss);
869
+ }
870
+ }
871
+ const bothKeys = [...unrecKeys].filter(([, f]) => f.l && f.r).map(([k]) => k);
872
+ if (bothKeys.length && unrecIssue) {
873
+ result.issues.push({ ...unrecIssue, keys: bothKeys });
874
+ }
875
+ if (aborted(result))
876
+ return result;
877
+ const merged = mergeValues(left.value, right.value);
878
+ if (!merged.valid) {
879
+ throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(merged.mergeErrorPath)}`);
880
+ }
881
+ result.value = merged.data;
882
+ return result;
883
+ }
884
+ const $ZodEnum = /* @__PURE__ */ $constructor("$ZodEnum", (inst, def) => {
885
+ $ZodType.init(inst, def);
886
+ const values = getEnumValues(def.entries);
887
+ const valuesSet = new Set(values);
888
+ inst._zod.values = valuesSet;
889
+ inst._zod.pattern = new RegExp(`^(${values.filter((k) => propertyKeyTypes.has(typeof k)).map((o) => typeof o === "string" ? escapeRegex(o) : o.toString()).join("|")})$`);
890
+ inst._zod.parse = (payload, _ctx) => {
891
+ const input = payload.value;
892
+ if (valuesSet.has(input)) {
893
+ return payload;
894
+ }
895
+ payload.issues.push({
896
+ code: "invalid_value",
897
+ values,
898
+ input,
899
+ inst
900
+ });
901
+ return payload;
902
+ };
903
+ });
904
+ const $ZodLiteral = /* @__PURE__ */ $constructor("$ZodLiteral", (inst, def) => {
905
+ $ZodType.init(inst, def);
906
+ if (def.values.length === 0) {
907
+ throw new Error("Cannot create literal schema with no valid values");
908
+ }
909
+ const values = new Set(def.values);
910
+ inst._zod.values = values;
911
+ inst._zod.pattern = new RegExp(`^(${def.values.map((o) => typeof o === "string" ? escapeRegex(o) : o ? escapeRegex(o.toString()) : String(o)).join("|")})$`);
912
+ inst._zod.parse = (payload, _ctx) => {
913
+ const input = payload.value;
914
+ if (values.has(input)) {
915
+ return payload;
916
+ }
917
+ payload.issues.push({
918
+ code: "invalid_value",
919
+ values: def.values,
920
+ input,
921
+ inst
922
+ });
923
+ return payload;
924
+ };
925
+ });
926
+ const $ZodTransform = /* @__PURE__ */ $constructor("$ZodTransform", (inst, def) => {
927
+ $ZodType.init(inst, def);
928
+ inst._zod.parse = (payload, ctx) => {
929
+ if (ctx.direction === "backward") {
930
+ throw new $ZodEncodeError(inst.constructor.name);
931
+ }
932
+ const _out = def.transform(payload.value, payload);
933
+ if (ctx.async) {
934
+ const output = _out instanceof Promise ? _out : Promise.resolve(_out);
935
+ return output.then((output2) => {
936
+ payload.value = output2;
937
+ return payload;
938
+ });
939
+ }
940
+ if (_out instanceof Promise) {
941
+ throw new $ZodAsyncError();
942
+ }
943
+ payload.value = _out;
944
+ return payload;
945
+ };
946
+ });
947
+ function handleOptionalResult(result, input) {
948
+ if (result.issues.length && input === void 0) {
949
+ return { issues: [], value: void 0 };
950
+ }
951
+ return result;
952
+ }
953
+ const $ZodOptional = /* @__PURE__ */ $constructor("$ZodOptional", (inst, def) => {
954
+ $ZodType.init(inst, def);
955
+ inst._zod.optin = "optional";
956
+ inst._zod.optout = "optional";
957
+ defineLazy(inst._zod, "values", () => {
958
+ return def.innerType._zod.values ? /* @__PURE__ */ new Set([...def.innerType._zod.values, void 0]) : void 0;
959
+ });
960
+ defineLazy(inst._zod, "pattern", () => {
961
+ const pattern = def.innerType._zod.pattern;
962
+ return pattern ? new RegExp(`^(${cleanRegex(pattern.source)})?$`) : void 0;
963
+ });
964
+ inst._zod.parse = (payload, ctx) => {
965
+ if (def.innerType._zod.optin === "optional") {
966
+ const result = def.innerType._zod.run(payload, ctx);
967
+ if (result instanceof Promise)
968
+ return result.then((r) => handleOptionalResult(r, payload.value));
969
+ return handleOptionalResult(result, payload.value);
970
+ }
971
+ if (payload.value === void 0) {
972
+ return payload;
973
+ }
974
+ return def.innerType._zod.run(payload, ctx);
975
+ };
976
+ });
977
+ const $ZodExactOptional = /* @__PURE__ */ $constructor("$ZodExactOptional", (inst, def) => {
978
+ $ZodOptional.init(inst, def);
979
+ defineLazy(inst._zod, "values", () => def.innerType._zod.values);
980
+ defineLazy(inst._zod, "pattern", () => def.innerType._zod.pattern);
981
+ inst._zod.parse = (payload, ctx) => {
982
+ return def.innerType._zod.run(payload, ctx);
983
+ };
984
+ });
985
+ const $ZodNullable = /* @__PURE__ */ $constructor("$ZodNullable", (inst, def) => {
986
+ $ZodType.init(inst, def);
987
+ defineLazy(inst._zod, "optin", () => def.innerType._zod.optin);
988
+ defineLazy(inst._zod, "optout", () => def.innerType._zod.optout);
989
+ defineLazy(inst._zod, "pattern", () => {
990
+ const pattern = def.innerType._zod.pattern;
991
+ return pattern ? new RegExp(`^(${cleanRegex(pattern.source)}|null)$`) : void 0;
992
+ });
993
+ defineLazy(inst._zod, "values", () => {
994
+ return def.innerType._zod.values ? /* @__PURE__ */ new Set([...def.innerType._zod.values, null]) : void 0;
995
+ });
996
+ inst._zod.parse = (payload, ctx) => {
997
+ if (payload.value === null)
998
+ return payload;
999
+ return def.innerType._zod.run(payload, ctx);
1000
+ };
1001
+ });
1002
+ const $ZodDefault = /* @__PURE__ */ $constructor("$ZodDefault", (inst, def) => {
1003
+ $ZodType.init(inst, def);
1004
+ inst._zod.optin = "optional";
1005
+ defineLazy(inst._zod, "values", () => def.innerType._zod.values);
1006
+ inst._zod.parse = (payload, ctx) => {
1007
+ if (ctx.direction === "backward") {
1008
+ return def.innerType._zod.run(payload, ctx);
1009
+ }
1010
+ if (payload.value === void 0) {
1011
+ payload.value = def.defaultValue;
1012
+ return payload;
1013
+ }
1014
+ const result = def.innerType._zod.run(payload, ctx);
1015
+ if (result instanceof Promise) {
1016
+ return result.then((result2) => handleDefaultResult(result2, def));
1017
+ }
1018
+ return handleDefaultResult(result, def);
1019
+ };
1020
+ });
1021
+ function handleDefaultResult(payload, def) {
1022
+ if (payload.value === void 0) {
1023
+ payload.value = def.defaultValue;
1024
+ }
1025
+ return payload;
1026
+ }
1027
+ const $ZodPrefault = /* @__PURE__ */ $constructor("$ZodPrefault", (inst, def) => {
1028
+ $ZodType.init(inst, def);
1029
+ inst._zod.optin = "optional";
1030
+ defineLazy(inst._zod, "values", () => def.innerType._zod.values);
1031
+ inst._zod.parse = (payload, ctx) => {
1032
+ if (ctx.direction === "backward") {
1033
+ return def.innerType._zod.run(payload, ctx);
1034
+ }
1035
+ if (payload.value === void 0) {
1036
+ payload.value = def.defaultValue;
1037
+ }
1038
+ return def.innerType._zod.run(payload, ctx);
1039
+ };
1040
+ });
1041
+ const $ZodNonOptional = /* @__PURE__ */ $constructor("$ZodNonOptional", (inst, def) => {
1042
+ $ZodType.init(inst, def);
1043
+ defineLazy(inst._zod, "values", () => {
1044
+ const v = def.innerType._zod.values;
1045
+ return v ? new Set([...v].filter((x) => x !== void 0)) : void 0;
1046
+ });
1047
+ inst._zod.parse = (payload, ctx) => {
1048
+ const result = def.innerType._zod.run(payload, ctx);
1049
+ if (result instanceof Promise) {
1050
+ return result.then((result2) => handleNonOptionalResult(result2, inst));
1051
+ }
1052
+ return handleNonOptionalResult(result, inst);
1053
+ };
1054
+ });
1055
+ function handleNonOptionalResult(payload, inst) {
1056
+ if (!payload.issues.length && payload.value === void 0) {
1057
+ payload.issues.push({
1058
+ code: "invalid_type",
1059
+ expected: "nonoptional",
1060
+ input: payload.value,
1061
+ inst
1062
+ });
1063
+ }
1064
+ return payload;
1065
+ }
1066
+ const $ZodCatch = /* @__PURE__ */ $constructor("$ZodCatch", (inst, def) => {
1067
+ $ZodType.init(inst, def);
1068
+ defineLazy(inst._zod, "optin", () => def.innerType._zod.optin);
1069
+ defineLazy(inst._zod, "optout", () => def.innerType._zod.optout);
1070
+ defineLazy(inst._zod, "values", () => def.innerType._zod.values);
1071
+ inst._zod.parse = (payload, ctx) => {
1072
+ if (ctx.direction === "backward") {
1073
+ return def.innerType._zod.run(payload, ctx);
1074
+ }
1075
+ const result = def.innerType._zod.run(payload, ctx);
1076
+ if (result instanceof Promise) {
1077
+ return result.then((result2) => {
1078
+ payload.value = result2.value;
1079
+ if (result2.issues.length) {
1080
+ payload.value = def.catchValue({
1081
+ ...payload,
1082
+ error: {
1083
+ issues: result2.issues.map((iss) => finalizeIssue(iss, ctx, config()))
1084
+ },
1085
+ input: payload.value
1086
+ });
1087
+ payload.issues = [];
1088
+ }
1089
+ return payload;
1090
+ });
1091
+ }
1092
+ payload.value = result.value;
1093
+ if (result.issues.length) {
1094
+ payload.value = def.catchValue({
1095
+ ...payload,
1096
+ error: {
1097
+ issues: result.issues.map((iss) => finalizeIssue(iss, ctx, config()))
1098
+ },
1099
+ input: payload.value
1100
+ });
1101
+ payload.issues = [];
1102
+ }
1103
+ return payload;
1104
+ };
1105
+ });
1106
+ const $ZodPipe = /* @__PURE__ */ $constructor("$ZodPipe", (inst, def) => {
1107
+ $ZodType.init(inst, def);
1108
+ defineLazy(inst._zod, "values", () => def.in._zod.values);
1109
+ defineLazy(inst._zod, "optin", () => def.in._zod.optin);
1110
+ defineLazy(inst._zod, "optout", () => def.out._zod.optout);
1111
+ defineLazy(inst._zod, "propValues", () => def.in._zod.propValues);
1112
+ inst._zod.parse = (payload, ctx) => {
1113
+ if (ctx.direction === "backward") {
1114
+ const right = def.out._zod.run(payload, ctx);
1115
+ if (right instanceof Promise) {
1116
+ return right.then((right2) => handlePipeResult(right2, def.in, ctx));
1117
+ }
1118
+ return handlePipeResult(right, def.in, ctx);
1119
+ }
1120
+ const left = def.in._zod.run(payload, ctx);
1121
+ if (left instanceof Promise) {
1122
+ return left.then((left2) => handlePipeResult(left2, def.out, ctx));
1123
+ }
1124
+ return handlePipeResult(left, def.out, ctx);
1125
+ };
1126
+ });
1127
+ function handlePipeResult(left, next, ctx) {
1128
+ if (left.issues.length) {
1129
+ left.aborted = true;
1130
+ return left;
1131
+ }
1132
+ return next._zod.run({ value: left.value, issues: left.issues }, ctx);
1133
+ }
1134
+ const $ZodReadonly = /* @__PURE__ */ $constructor("$ZodReadonly", (inst, def) => {
1135
+ $ZodType.init(inst, def);
1136
+ defineLazy(inst._zod, "propValues", () => def.innerType._zod.propValues);
1137
+ defineLazy(inst._zod, "values", () => def.innerType._zod.values);
1138
+ defineLazy(inst._zod, "optin", () => {
1139
+ var _a, _b;
1140
+ return (_b = (_a = def.innerType) == null ? void 0 : _a._zod) == null ? void 0 : _b.optin;
1141
+ });
1142
+ defineLazy(inst._zod, "optout", () => {
1143
+ var _a, _b;
1144
+ return (_b = (_a = def.innerType) == null ? void 0 : _a._zod) == null ? void 0 : _b.optout;
1145
+ });
1146
+ inst._zod.parse = (payload, ctx) => {
1147
+ if (ctx.direction === "backward") {
1148
+ return def.innerType._zod.run(payload, ctx);
1149
+ }
1150
+ const result = def.innerType._zod.run(payload, ctx);
1151
+ if (result instanceof Promise) {
1152
+ return result.then(handleReadonlyResult);
1153
+ }
1154
+ return handleReadonlyResult(result);
1155
+ };
1156
+ });
1157
+ function handleReadonlyResult(payload) {
1158
+ payload.value = Object.freeze(payload.value);
1159
+ return payload;
1160
+ }
1161
+ const $ZodCustom = /* @__PURE__ */ $constructor("$ZodCustom", (inst, def) => {
1162
+ $ZodCheck.init(inst, def);
1163
+ $ZodType.init(inst, def);
1164
+ inst._zod.parse = (payload, _) => {
1165
+ return payload;
1166
+ };
1167
+ inst._zod.check = (payload) => {
1168
+ const input = payload.value;
1169
+ const r = def.fn(input);
1170
+ if (r instanceof Promise) {
1171
+ return r.then((r2) => handleRefineResult(r2, payload, input, inst));
1172
+ }
1173
+ handleRefineResult(r, payload, input, inst);
1174
+ return;
1175
+ };
1176
+ });
1177
+ function handleRefineResult(result, payload, input, inst) {
1178
+ if (!result) {
1179
+ const _iss = {
1180
+ code: "custom",
1181
+ input,
1182
+ inst,
1183
+ // incorporates params.error into issue reporting
1184
+ path: [...inst._zod.def.path ?? []],
1185
+ // incorporates params.error into issue reporting
1186
+ continue: !inst._zod.def.abort
1187
+ // params: inst._zod.def.params,
1188
+ };
1189
+ if (inst._zod.def.params)
1190
+ _iss.params = inst._zod.def.params;
1191
+ payload.issues.push(issue(_iss));
1192
+ }
1193
+ }
1194
+ export {
1195
+ $ZodArray,
1196
+ $ZodBase64,
1197
+ $ZodBase64URL,
1198
+ $ZodBoolean,
1199
+ $ZodCIDRv4,
1200
+ $ZodCIDRv6,
1201
+ $ZodCUID,
1202
+ $ZodCUID2,
1203
+ $ZodCatch,
1204
+ $ZodCustom,
1205
+ $ZodDefault,
1206
+ $ZodE164,
1207
+ $ZodEmail,
1208
+ $ZodEmoji,
1209
+ $ZodEnum,
1210
+ $ZodExactOptional,
1211
+ $ZodGUID,
1212
+ $ZodIPv4,
1213
+ $ZodIPv6,
1214
+ $ZodISODate,
1215
+ $ZodISODateTime,
1216
+ $ZodISODuration,
1217
+ $ZodISOTime,
1218
+ $ZodIntersection,
1219
+ $ZodJWT,
1220
+ $ZodKSUID,
1221
+ $ZodLiteral,
1222
+ $ZodNanoID,
1223
+ $ZodNever,
1224
+ $ZodNonOptional,
1225
+ $ZodNullable,
1226
+ $ZodObject,
1227
+ $ZodObjectJIT,
1228
+ $ZodOptional,
1229
+ $ZodPipe,
1230
+ $ZodPrefault,
1231
+ $ZodReadonly,
1232
+ $ZodString,
1233
+ $ZodStringFormat,
1234
+ $ZodTransform,
1235
+ $ZodType,
1236
+ $ZodULID,
1237
+ $ZodURL,
1238
+ $ZodUUID,
1239
+ $ZodUnion,
1240
+ $ZodUnknown,
1241
+ $ZodXID,
1242
+ clone,
1243
+ isValidBase64,
1244
+ isValidBase64URL,
1245
+ isValidJWT
1246
+ };
1247
+ //# sourceMappingURL=schemas.js.map