@carlonicora/nextjs-jsonapi 3.28.2 → 4.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (213) hide show
  1. package/dist/{BlockNoteEditor-36VL2TNM.js → BlockNoteEditor-BXMTGKDV.js} +21 -20
  2. package/dist/BlockNoteEditor-BXMTGKDV.js.map +1 -0
  3. package/dist/{BlockNoteEditor-4IDXT6ZU.mjs → BlockNoteEditor-FGVQP35E.mjs} +9 -8
  4. package/dist/{BlockNoteEditor-4IDXT6ZU.mjs.map → BlockNoteEditor-FGVQP35E.mjs.map} +1 -1
  5. package/dist/{BlockNoteViewer-KRTAFTUX.mjs → BlockNoteViewer-DQYT6IJW.mjs} +3 -3
  6. package/dist/{BlockNoteViewer-7BFNTN4E.js → BlockNoteViewer-YH7G66PS.js} +4 -4
  7. package/dist/{BlockNoteViewer-7BFNTN4E.js.map → BlockNoteViewer-YH7G66PS.js.map} +1 -1
  8. package/dist/{HandbookSectionInterface-DgYH--Ik.d.mts → HandbookSectionInterface-BYsmnPEz.d.mts} +1 -1
  9. package/dist/{HandbookSectionInterface-Ck1wZJ81.d.ts → HandbookSectionInterface-OePKPbqN.d.ts} +1 -1
  10. package/dist/{JsonApiRequest-UHOWNI3O.mjs → JsonApiRequest-MEP6AXDT.mjs} +2 -2
  11. package/dist/JsonApiRequest-OB6WL4LA.js +26 -0
  12. package/dist/{JsonApiRequest-TE5WD3WS.js.map → JsonApiRequest-OB6WL4LA.js.map} +1 -1
  13. package/dist/ServerSession-DFNNNkg7.d.ts +29 -0
  14. package/dist/ServerSession-DK1z0_Ql.d.mts +29 -0
  15. package/dist/{analytics.modules-CfczU12P.d.ts → analytics.modules-Bsacu6ik.d.ts} +1 -1
  16. package/dist/{analytics.modules-pzGwMASI.d.mts → analytics.modules-txdCLNG-.d.mts} +1 -1
  17. package/dist/billing/index.js +404 -402
  18. package/dist/billing/index.js.map +1 -1
  19. package/dist/billing/index.mjs +10 -8
  20. package/dist/billing/index.mjs.map +1 -1
  21. package/dist/{chunk-7B4E42R5.mjs → chunk-3CZ2GK5R.mjs} +33 -9
  22. package/dist/chunk-3CZ2GK5R.mjs.map +1 -0
  23. package/dist/{chunk-4Z45NYPR.js → chunk-5W5MN7JP.js} +14 -83
  24. package/dist/chunk-5W5MN7JP.js.map +1 -0
  25. package/dist/{chunk-CAKOFJZD.js → chunk-6OFANJTE.js} +195 -142
  26. package/dist/chunk-6OFANJTE.js.map +1 -0
  27. package/dist/{chunk-5TRFNKJS.js → chunk-6TUB7Y6T.js} +23 -25
  28. package/dist/chunk-6TUB7Y6T.js.map +1 -0
  29. package/dist/{chunk-37DMFVLN.mjs → chunk-7SCREMTX.mjs} +4 -3
  30. package/dist/{chunk-37DMFVLN.mjs.map → chunk-7SCREMTX.mjs.map} +1 -1
  31. package/dist/{chunk-Q6J2ICKO.mjs → chunk-ADZSH3MG.mjs} +3 -72
  32. package/dist/chunk-ADZSH3MG.mjs.map +1 -0
  33. package/dist/{chunk-E3I4MT53.mjs → chunk-AQZ3T4BR.mjs} +71 -18
  34. package/dist/chunk-AQZ3T4BR.mjs.map +1 -0
  35. package/dist/{chunk-SJLXPHK5.mjs → chunk-E2LENTUH.mjs} +22 -24
  36. package/dist/chunk-E2LENTUH.mjs.map +1 -0
  37. package/dist/chunk-EBEXWN3I.mjs +17 -0
  38. package/dist/chunk-EBEXWN3I.mjs.map +1 -0
  39. package/dist/chunk-G4JR3SFV.js +28 -0
  40. package/dist/chunk-G4JR3SFV.js.map +1 -0
  41. package/dist/chunk-IK65TDQH.js +15 -0
  42. package/dist/chunk-IK65TDQH.js.map +1 -0
  43. package/dist/{chunk-GHFMKH3M.js → chunk-JEQ34Z5E.js} +62 -38
  44. package/dist/chunk-JEQ34Z5E.js.map +1 -0
  45. package/dist/{chunk-KOTKKBJT.js → chunk-NFCXUAE6.js} +1328 -1183
  46. package/dist/chunk-NFCXUAE6.js.map +1 -0
  47. package/dist/chunk-OEOK6A3P.js +17 -0
  48. package/dist/chunk-OEOK6A3P.js.map +1 -0
  49. package/dist/chunk-PW42LRSL.mjs +28 -0
  50. package/dist/chunk-PW42LRSL.mjs.map +1 -0
  51. package/dist/{chunk-U65JPKO3.mjs → chunk-R6ZYB4VN.mjs} +2 -2
  52. package/dist/chunk-T7SAW3UW.mjs +15 -0
  53. package/dist/chunk-T7SAW3UW.mjs.map +1 -0
  54. package/dist/{chunk-GKDHYB2R.js → chunk-TWBZ2GSX.js} +3 -3
  55. package/dist/{chunk-GKDHYB2R.js.map → chunk-TWBZ2GSX.js.map} +1 -1
  56. package/dist/{chunk-26MQIJNB.js → chunk-WGVNJXZO.js} +4 -3
  57. package/dist/chunk-WGVNJXZO.js.map +1 -0
  58. package/dist/{chunk-HPUV6FBW.mjs → chunk-WJC4SYRL.mjs} +2131 -1986
  59. package/dist/chunk-WJC4SYRL.mjs.map +1 -0
  60. package/dist/client/index.d.mts +3 -3
  61. package/dist/client/index.d.ts +3 -3
  62. package/dist/client/index.js +6 -5
  63. package/dist/client/index.js.map +1 -1
  64. package/dist/client/index.mjs +13 -12
  65. package/dist/components/index.d.mts +16 -6
  66. package/dist/components/index.d.ts +16 -6
  67. package/dist/components/index.js +8 -5
  68. package/dist/components/index.js.map +1 -1
  69. package/dist/components/index.mjs +9 -6
  70. package/dist/{config-3N1LSrcC.d.ts → config-B6UB7j69.d.ts} +1 -1
  71. package/dist/{config-BmufyEj6.d.mts → config-CEAq4Ozy.d.mts} +10 -1
  72. package/dist/{config-AVtuvfM1.d.ts → config-DydDHCfb.d.ts} +10 -1
  73. package/dist/{config-BSKTYDoh.d.mts → config-n-ZpPmOL.d.mts} +1 -1
  74. package/dist/contexts/index.d.mts +28 -4
  75. package/dist/contexts/index.d.ts +28 -4
  76. package/dist/contexts/index.js +10 -5
  77. package/dist/contexts/index.js.map +1 -1
  78. package/dist/contexts/index.mjs +9 -4
  79. package/dist/core/index.d.mts +6 -6
  80. package/dist/core/index.d.ts +6 -6
  81. package/dist/core/index.js +5 -5
  82. package/dist/core/index.js.map +1 -1
  83. package/dist/core/index.mjs +4 -4
  84. package/dist/features/analytics/index.d.mts +2 -2
  85. package/dist/features/analytics/index.d.ts +2 -2
  86. package/dist/features/analytics/index.js +124 -123
  87. package/dist/features/analytics/index.js.map +1 -1
  88. package/dist/features/analytics/index.mjs +6 -5
  89. package/dist/features/analytics/index.mjs.map +1 -1
  90. package/dist/features/analytics/server.d.mts +10 -2
  91. package/dist/features/analytics/server.d.ts +10 -2
  92. package/dist/features/analytics/server.js +8 -6
  93. package/dist/features/analytics/server.js.map +1 -1
  94. package/dist/features/analytics/server.mjs +6 -4
  95. package/dist/features/analytics/server.mjs.map +1 -1
  96. package/dist/features/help/index.d.mts +2 -2
  97. package/dist/features/help/index.d.ts +2 -2
  98. package/dist/features/help/index.js +39 -38
  99. package/dist/features/help/index.js.map +1 -1
  100. package/dist/features/help/index.mjs +5 -4
  101. package/dist/features/help/index.mjs.map +1 -1
  102. package/dist/features/tokenusage/index.d.mts +2 -2
  103. package/dist/features/tokenusage/index.d.ts +2 -2
  104. package/dist/features/tokenusage/index.js +127 -126
  105. package/dist/features/tokenusage/index.js.map +1 -1
  106. package/dist/features/tokenusage/index.mjs +6 -5
  107. package/dist/features/tokenusage/index.mjs.map +1 -1
  108. package/dist/index.d.mts +5 -5
  109. package/dist/index.d.ts +5 -5
  110. package/dist/index.js +8 -6
  111. package/dist/index.js.map +1 -1
  112. package/dist/index.mjs +11 -9
  113. package/dist/next-config/index.d.mts +43 -0
  114. package/dist/next-config/index.d.ts +43 -0
  115. package/dist/next-config/index.js +230 -0
  116. package/dist/next-config/index.js.map +1 -0
  117. package/dist/next-config/index.mjs +230 -0
  118. package/dist/next-config/index.mjs.map +1 -0
  119. package/dist/{request-FXF63NSQ.mjs → request-3IUMNVOS.mjs} +2 -2
  120. package/dist/request-LZBAOT3Y.js +8 -0
  121. package/dist/request-LZBAOT3Y.js.map +1 -0
  122. package/dist/server/cachedGet.d.mts +28 -0
  123. package/dist/server/cachedGet.d.ts +28 -0
  124. package/dist/server/cachedGet.js +60 -0
  125. package/dist/server/cachedGet.js.map +1 -0
  126. package/dist/server/cachedGet.mjs +60 -0
  127. package/dist/server/cachedGet.mjs.map +1 -0
  128. package/dist/server/cachedGet.stub.d.mts +7 -0
  129. package/dist/server/cachedGet.stub.d.ts +7 -0
  130. package/dist/server/cachedGet.stub.js +17 -0
  131. package/dist/server/cachedGet.stub.js.map +1 -0
  132. package/dist/server/cachedGet.stub.mjs +17 -0
  133. package/dist/server/cachedGet.stub.mjs.map +1 -0
  134. package/dist/server/index.d.mts +27 -25
  135. package/dist/server/index.d.ts +27 -25
  136. package/dist/server/index.js +13 -6
  137. package/dist/server/index.js.map +1 -1
  138. package/dist/server/index.mjs +15 -8
  139. package/dist/testing/index.js.map +1 -1
  140. package/dist/testing/index.mjs.map +1 -1
  141. package/dist/{types-D0uLYV2P.d.mts → types-Bq_UA8Lg.d.mts} +1 -1
  142. package/dist/{types-Cn153-mH.d.ts → types-bsm8Fp55.d.ts} +1 -1
  143. package/dist/{usePageUrlGenerator-B-3FRKBD.d.ts → usePageUrlGenerator-J_ECv-oQ.d.ts} +1 -1
  144. package/dist/{usePageUrlGenerator-CCJ_cdQy.d.mts → usePageUrlGenerator-uKBjAKqC.d.mts} +1 -1
  145. package/package.json +12 -1
  146. package/src/components/forms/__tests__/EditorSheet.test.tsx +25 -1
  147. package/src/components/forms/__tests__/useEditorDialog.test.ts +164 -1
  148. package/src/components/forms/useEditorDialog.ts +69 -2
  149. package/src/contexts/SessionContext.tsx +20 -0
  150. package/src/contexts/SocketContext.tsx +30 -3
  151. package/src/contexts/ViewportContext.tsx +17 -2
  152. package/src/contexts/__tests__/SessionContext.test.tsx +58 -0
  153. package/src/contexts/__tests__/SocketContext.session.test.tsx +77 -0
  154. package/src/contexts/index.ts +1 -0
  155. package/src/core/abstracts/AbstractService.ts +4 -6
  156. package/src/core/abstracts/__tests__/AbstractService.locale.test.ts +64 -0
  157. package/src/features/analytics/components/server/AnalyticsAdminPage.tsx +5 -1
  158. package/src/features/analytics/components/server/AnalyticsJourneyPage.tsx +5 -1
  159. package/src/features/notification/contexts/NotificationContext.tsx +5 -2
  160. package/src/features/notification/contexts/__tests__/NotificationContext.spec.tsx +22 -0
  161. package/src/features/user/contexts/CurrentUserContext.tsx +7 -5
  162. package/src/features/user/contexts/__tests__/CurrentUserContext.spec.tsx +63 -3
  163. package/src/hooks/__tests__/useSocket.render.test.ts +22 -0
  164. package/src/hooks/useSocket.ts +0 -1
  165. package/src/i18n/__tests__/config.test.ts +27 -0
  166. package/src/i18n/config.ts +17 -0
  167. package/src/i18n/index.ts +2 -0
  168. package/src/next-config/__tests__/createNextConfig.test.ts +268 -0
  169. package/src/next-config/csp.ts +128 -0
  170. package/src/next-config/headers.ts +61 -0
  171. package/src/next-config/index.ts +114 -0
  172. package/src/server/JsonApiServer.ts +3 -1
  173. package/src/server/ServerSession.ts +29 -1
  174. package/src/server/__tests__/JsonApiServer.test.ts +41 -0
  175. package/src/server/__tests__/ServerSession.read.test.ts +67 -0
  176. package/src/server/__tests__/cache.test.ts +48 -0
  177. package/src/server/__tests__/cachedGet.test.ts +125 -0
  178. package/src/server/__tests__/request.test.ts +96 -1
  179. package/src/server/cache.ts +21 -4
  180. package/src/server/cacheDigest.ts +10 -0
  181. package/src/server/cacheProfiles.ts +15 -0
  182. package/src/server/cachedGet.stub.ts +15 -0
  183. package/src/server/cachedGet.ts +80 -0
  184. package/src/server/request.ts +33 -32
  185. package/src/shadcnui/ui/__tests__/sidebar.menu-skeleton.test.tsx +50 -0
  186. package/src/shadcnui/ui/__tests__/sidebar.session.test.tsx +133 -0
  187. package/src/shadcnui/ui/sidebar.tsx +121 -18
  188. package/src/testing/matchers/jsonApiMatchers.ts +1 -0
  189. package/src/unified/JsonApiRequest.ts +4 -1
  190. package/src/unified/__tests__/JsonApiGet.cache.test.ts +51 -0
  191. package/src/utils/__tests__/map-thenable.test.ts +29 -0
  192. package/src/utils/__tests__/use-mobile.test.tsx +102 -1
  193. package/src/utils/map-thenable.ts +15 -0
  194. package/src/utils/use-mobile.tsx +13 -4
  195. package/dist/BlockNoteEditor-36VL2TNM.js.map +0 -1
  196. package/dist/JsonApiRequest-TE5WD3WS.js +0 -26
  197. package/dist/chunk-26MQIJNB.js.map +0 -1
  198. package/dist/chunk-4Z45NYPR.js.map +0 -1
  199. package/dist/chunk-5TRFNKJS.js.map +0 -1
  200. package/dist/chunk-7B4E42R5.mjs.map +0 -1
  201. package/dist/chunk-CAKOFJZD.js.map +0 -1
  202. package/dist/chunk-E3I4MT53.mjs.map +0 -1
  203. package/dist/chunk-GHFMKH3M.js.map +0 -1
  204. package/dist/chunk-HPUV6FBW.mjs.map +0 -1
  205. package/dist/chunk-KOTKKBJT.js.map +0 -1
  206. package/dist/chunk-Q6J2ICKO.mjs.map +0 -1
  207. package/dist/chunk-SJLXPHK5.mjs.map +0 -1
  208. package/dist/request-ZTX6I63X.js +0 -8
  209. package/dist/request-ZTX6I63X.js.map +0 -1
  210. /package/dist/{BlockNoteViewer-KRTAFTUX.mjs.map → BlockNoteViewer-DQYT6IJW.mjs.map} +0 -0
  211. /package/dist/{JsonApiRequest-UHOWNI3O.mjs.map → JsonApiRequest-MEP6AXDT.mjs.map} +0 -0
  212. /package/dist/{chunk-U65JPKO3.mjs.map → chunk-R6ZYB4VN.mjs.map} +0 -0
  213. /package/dist/{request-FXF63NSQ.mjs.map → request-3IUMNVOS.mjs.map} +0 -0
package/dist/index.d.mts CHANGED
@@ -9,8 +9,8 @@ export { H as HttpMethod, N as NextRef, P as PreviousRef, S as SelfRef, T as Tot
9
9
  export { A as AssistantInput, b as AssistantInterface, e as AssistantMessageInput, f as AssistantMessageInterface, c as AssistantMessageRole, d as AssistantMessageType, B as BreadcrumbItemData, g as ChunkInterface, C as ChunkRelationshipMeta, H as HowToInput, a as HowToInterface } from './AssistantMessageInterface-sHjI2zPN.mjs';
10
10
  export { C as ContentFields, D as D3Link, a as D3Node, R as RoleFields, U as UserFields } from './content.fields-1AlHDtDb.mjs';
11
11
  export { ClassValue } from 'clsx';
12
- export { h as AiConnection, l as AiConnectionEnvDefaults, i as AiConnectionFields, n as AiConnectionInput, m as AiConnectionInterface, p as AiConnectionModule, o as AiConnectionService, j as AiProviderFieldDescriptor, k as AiProviderRegistry, A as AuthComponent, H as HandbookPageInterface, q as HandbookSectionInterface, P as PasskeyInterface, T as TotpAuthenticatorInterface, b as getIcon, a as getIconByModule, c as getIconByModuleName, g as getInitials, d as getLucideIcon, e as getLucideIconByModule, f as getLucideIconByModuleName } from './HandbookSectionInterface-DgYH--Ik.mjs';
13
- export { A as Action, d as ModuleDefinition, M as ModuleFactory, c as ModulePermissionDefinition, a as ModuleWithPermissions, P as PageUrl, b as PermissionCheck, e as PermissionConfig, f as PermissionModule, g as PermissionUser } from './types-D0uLYV2P.mjs';
12
+ export { h as AiConnection, l as AiConnectionEnvDefaults, i as AiConnectionFields, n as AiConnectionInput, m as AiConnectionInterface, p as AiConnectionModule, o as AiConnectionService, j as AiProviderFieldDescriptor, k as AiProviderRegistry, A as AuthComponent, H as HandbookPageInterface, q as HandbookSectionInterface, P as PasskeyInterface, T as TotpAuthenticatorInterface, b as getIcon, a as getIconByModule, c as getIconByModuleName, g as getInitials, d as getLucideIcon, e as getLucideIconByModule, f as getLucideIconByModuleName } from './HandbookSectionInterface-BYsmnPEz.mjs';
13
+ export { A as Action, d as ModuleDefinition, a as ModuleFactory, c as ModulePermissionDefinition, M as ModuleWithPermissions, P as PageUrl, b as PermissionCheck, e as PermissionConfig, f as PermissionModule, g as PermissionUser } from './types-Bq_UA8Lg.mjs';
14
14
  export { A as AuthInput, b as AuthInterface, a as AuthQuery } from './auth.interface-Df4vXbNz.mjs';
15
15
  export { A as AuthService, C as CompanyService, a as ContentService, F as FeatureService, N as NotificationService, P as PushService, R as RoleService, b as S3Input, c as S3Interface, S as S3Service, T as TwoFactorChallengeInterface, U as UserService } from './s3.service-DAp8FbuG.mjs';
16
16
  export { I as InvoiceStatus, M as MeterInterface, o as MeterSummaryInterface, P as PaymentMethodInterface, e as PriceRecurring, q as PromotionCodeValidationResult, c as ProrationLineItem, b as ProrationPreviewInterface, R as ReportUsageInput, S as StripeCustomerInterface, a as StripeInvoiceInterface, f as StripePriceInput, d as StripePriceInterface, h as StripeProductInput, g as StripeProductInterface, l as StripeSubscriptionCreateMeta, m as StripeSubscriptionCreateResponse, k as StripeSubscriptionInput, j as StripeSubscriptionInterface, n as StripeUsageInterface, i as SubscriptionStatus, p as UsageRecordInterface, U as UsageSummaryInterface } from './stripe-promotion-code.interface-ClZ7DxS9.mjs';
@@ -18,9 +18,9 @@ export { C as CompanyInput, a as CompanyInterface, R as RoleInput, b as RoleInte
18
18
  export { a as ContentInput, C as ContentInterface, b as NotificationInput, N as NotificationInterface } from './notification.interface-P_pNfzZQ.mjs';
19
19
  export { F as FeatureInterface, M as ModuleInterface } from './feature.interface-CXb1-vNq.mjs';
20
20
  export { A as AVAILABLE_OAUTH_SCOPES, D as DEFAULT_GRANT_TYPES, g as OAUTH_SCOPE_DISPLAY, b as OAuthClientCreateRequest, c as OAuthClientCreateResponse, a as OAuthClientInput, O as OAuthClientInterface, f as OAuthConsentInfo, d as OAuthConsentRequest, e as OAuthScopeInfo } from './oauth.interface-nVwnzxJw.mjs';
21
- export { b as TokenUsageAdminBreakdownModule, T as TokenUsageAdminSummaryModule, a as TokenUsageAdminTimelineModule, c as configureTokenUsage, g as getTokenUsageCurrency, t as tokenUsageModules } from './config-BSKTYDoh.mjs';
22
- export { a as analyticsModules } from './analytics.modules-pzGwMASI.mjs';
23
- export { I as I18nConfig, f as configureI18n, c as configureJsonApi, g as getApiUrl, b as getAppUrl, a as getPublicApiUrl, e as getStripePublishableKey, d as getTrackablePages } from './config-BmufyEj6.mjs';
21
+ export { b as TokenUsageAdminBreakdownModule, T as TokenUsageAdminSummaryModule, a as TokenUsageAdminTimelineModule, c as configureTokenUsage, g as getTokenUsageCurrency, t as tokenUsageModules } from './config-n-ZpPmOL.mjs';
22
+ export { a as analyticsModules } from './analytics.modules-txdCLNG-.mjs';
23
+ export { I as I18nConfig, f as configureI18n, c as configureJsonApi, g as getApiUrl, b as getAppUrl, a as getPublicApiUrl, e as getStripePublishableKey, d as getTrackablePages } from './config-CEAq4Ozy.mjs';
24
24
  export { Q as QuestionnaireField, a as QuestionnaireFieldType, b as QuestionnaireOption, W as WaitlistConfig, c as configureWaitlist, g as getWaitlistConfig } from './waitlist.config-kPfjImle.mjs';
25
25
  import { R as RbacMatrix } from './RbacTypes-BTbr27Ew.mjs';
26
26
  export { a as ACTION_TYPES, A as ActionType, C as COMPANY_ADMINISTRATOR_ROLE_ID, c as PermToken, P as PermissionValue, b as PermissionsMap, d as RbacModuleBlock } from './RbacTypes-BTbr27Ew.mjs';
package/dist/index.d.ts CHANGED
@@ -9,8 +9,8 @@ export { H as HttpMethod, N as NextRef, P as PreviousRef, S as SelfRef, T as Tot
9
9
  export { A as AssistantInput, b as AssistantInterface, e as AssistantMessageInput, f as AssistantMessageInterface, c as AssistantMessageRole, d as AssistantMessageType, B as BreadcrumbItemData, g as ChunkInterface, C as ChunkRelationshipMeta, H as HowToInput, a as HowToInterface } from './AssistantMessageInterface-CubxuBIJ.js';
10
10
  export { C as ContentFields, D as D3Link, a as D3Node, R as RoleFields, U as UserFields } from './content.fields-1AlHDtDb.js';
11
11
  export { ClassValue } from 'clsx';
12
- export { h as AiConnection, l as AiConnectionEnvDefaults, i as AiConnectionFields, n as AiConnectionInput, m as AiConnectionInterface, p as AiConnectionModule, o as AiConnectionService, j as AiProviderFieldDescriptor, k as AiProviderRegistry, A as AuthComponent, H as HandbookPageInterface, q as HandbookSectionInterface, P as PasskeyInterface, T as TotpAuthenticatorInterface, b as getIcon, a as getIconByModule, c as getIconByModuleName, g as getInitials, d as getLucideIcon, e as getLucideIconByModule, f as getLucideIconByModuleName } from './HandbookSectionInterface-Ck1wZJ81.js';
13
- export { A as Action, d as ModuleDefinition, M as ModuleFactory, c as ModulePermissionDefinition, a as ModuleWithPermissions, P as PageUrl, b as PermissionCheck, e as PermissionConfig, f as PermissionModule, g as PermissionUser } from './types-Cn153-mH.js';
12
+ export { h as AiConnection, l as AiConnectionEnvDefaults, i as AiConnectionFields, n as AiConnectionInput, m as AiConnectionInterface, p as AiConnectionModule, o as AiConnectionService, j as AiProviderFieldDescriptor, k as AiProviderRegistry, A as AuthComponent, H as HandbookPageInterface, q as HandbookSectionInterface, P as PasskeyInterface, T as TotpAuthenticatorInterface, b as getIcon, a as getIconByModule, c as getIconByModuleName, g as getInitials, d as getLucideIcon, e as getLucideIconByModule, f as getLucideIconByModuleName } from './HandbookSectionInterface-OePKPbqN.js';
13
+ export { A as Action, d as ModuleDefinition, a as ModuleFactory, c as ModulePermissionDefinition, M as ModuleWithPermissions, P as PageUrl, b as PermissionCheck, e as PermissionConfig, f as PermissionModule, g as PermissionUser } from './types-bsm8Fp55.js';
14
14
  export { A as AuthInput, b as AuthInterface, a as AuthQuery } from './auth.interface-BzI4onI_.js';
15
15
  export { A as AuthService, C as CompanyService, a as ContentService, F as FeatureService, N as NotificationService, P as PushService, R as RoleService, b as S3Input, c as S3Interface, S as S3Service, T as TwoFactorChallengeInterface, U as UserService } from './s3.service-CbUa6a-8.js';
16
16
  export { I as InvoiceStatus, M as MeterInterface, o as MeterSummaryInterface, P as PaymentMethodInterface, e as PriceRecurring, q as PromotionCodeValidationResult, c as ProrationLineItem, b as ProrationPreviewInterface, R as ReportUsageInput, S as StripeCustomerInterface, a as StripeInvoiceInterface, f as StripePriceInput, d as StripePriceInterface, h as StripeProductInput, g as StripeProductInterface, l as StripeSubscriptionCreateMeta, m as StripeSubscriptionCreateResponse, k as StripeSubscriptionInput, j as StripeSubscriptionInterface, n as StripeUsageInterface, i as SubscriptionStatus, p as UsageRecordInterface, U as UsageSummaryInterface } from './stripe-promotion-code.interface-C3qqh3mi.js';
@@ -18,9 +18,9 @@ export { C as CompanyInput, a as CompanyInterface, R as RoleInput, b as RoleInte
18
18
  export { a as ContentInput, C as ContentInterface, b as NotificationInput, N as NotificationInterface } from './notification.interface-BNCvnVCW.js';
19
19
  export { F as FeatureInterface, M as ModuleInterface } from './feature.interface-BO25VLlx.js';
20
20
  export { A as AVAILABLE_OAUTH_SCOPES, D as DEFAULT_GRANT_TYPES, g as OAUTH_SCOPE_DISPLAY, b as OAuthClientCreateRequest, c as OAuthClientCreateResponse, a as OAuthClientInput, O as OAuthClientInterface, f as OAuthConsentInfo, d as OAuthConsentRequest, e as OAuthScopeInfo } from './oauth.interface-BZKZAPRw.js';
21
- export { b as TokenUsageAdminBreakdownModule, T as TokenUsageAdminSummaryModule, a as TokenUsageAdminTimelineModule, c as configureTokenUsage, g as getTokenUsageCurrency, t as tokenUsageModules } from './config-3N1LSrcC.js';
22
- export { a as analyticsModules } from './analytics.modules-CfczU12P.js';
23
- export { I as I18nConfig, f as configureI18n, c as configureJsonApi, g as getApiUrl, b as getAppUrl, a as getPublicApiUrl, e as getStripePublishableKey, d as getTrackablePages } from './config-AVtuvfM1.js';
21
+ export { b as TokenUsageAdminBreakdownModule, T as TokenUsageAdminSummaryModule, a as TokenUsageAdminTimelineModule, c as configureTokenUsage, g as getTokenUsageCurrency, t as tokenUsageModules } from './config-B6UB7j69.js';
22
+ export { a as analyticsModules } from './analytics.modules-Bsacu6ik.js';
23
+ export { I as I18nConfig, f as configureI18n, c as configureJsonApi, g as getApiUrl, b as getAppUrl, a as getPublicApiUrl, e as getStripePublishableKey, d as getTrackablePages } from './config-DydDHCfb.js';
24
24
  export { Q as QuestionnaireField, a as QuestionnaireFieldType, b as QuestionnaireOption, W as WaitlistConfig, c as configureWaitlist, g as getWaitlistConfig } from './waitlist.config-kPfjImle.js';
25
25
  import { R as RbacMatrix } from './RbacTypes-BTbr27Ew.js';
26
26
  export { a as ACTION_TYPES, A as ActionType, C as COMPANY_ADMINISTRATOR_ROLE_ID, c as PermToken, P as PermissionValue, b as PermissionsMap, d as RbacModuleBlock } from './RbacTypes-BTbr27Ew.js';
package/dist/index.js CHANGED
@@ -14,11 +14,12 @@
14
14
 
15
15
 
16
16
 
17
+ var _chunk5W5MN7JPjs = require('./chunk-5W5MN7JP.js');
17
18
 
18
19
 
19
20
 
20
21
 
21
- var _chunk4Z45NYPRjs = require('./chunk-4Z45NYPR.js');
22
+ var _chunkG4JR3SFVjs = require('./chunk-G4JR3SFV.js');
22
23
 
23
24
 
24
25
 
@@ -246,8 +247,10 @@ var _chunk4Z45NYPRjs = require('./chunk-4Z45NYPR.js');
246
247
 
247
248
 
248
249
 
249
- var _chunkCAKOFJZDjs = require('./chunk-CAKOFJZD.js');
250
250
 
251
+ var _chunk6OFANJTEjs = require('./chunk-6OFANJTE.js');
252
+ require('./chunk-LXKSUWAV.js');
253
+ require('./chunk-JTPRJNT2.js');
251
254
 
252
255
 
253
256
 
@@ -258,9 +261,8 @@ var _chunkCAKOFJZDjs = require('./chunk-CAKOFJZD.js');
258
261
 
259
262
 
260
263
 
261
- var _chunk26MQIJNBjs = require('./chunk-26MQIJNB.js');
262
- require('./chunk-LXKSUWAV.js');
263
- require('./chunk-JTPRJNT2.js');
264
+
265
+ var _chunkWGVNJXZOjs = require('./chunk-WGVNJXZO.js');
264
266
  require('./chunk-7QVYU63E.js');
265
267
 
266
268
 
@@ -519,5 +521,5 @@ require('./chunk-7QVYU63E.js');
519
521
 
520
522
 
521
523
 
522
- exports.ACTION_TYPES = _chunk4Z45NYPRjs.ACTION_TYPES; exports.AVAILABLE_OAUTH_SCOPES = _chunkCAKOFJZDjs.AVAILABLE_OAUTH_SCOPES; exports.AbstractApiData = _chunkCAKOFJZDjs.AbstractApiData; exports.AbstractService = _chunkCAKOFJZDjs.AbstractService; exports.Action = _chunkCAKOFJZDjs.Action; exports.AiConnection = _chunkCAKOFJZDjs.AiConnection; exports.AiConnectionFields = _chunkCAKOFJZDjs.AiConnectionFields; exports.AiConnectionModule = _chunkCAKOFJZDjs.AiConnectionModule; exports.AiConnectionService = _chunkCAKOFJZDjs.AiConnectionService; exports.Assistant = _chunkCAKOFJZDjs.Assistant; exports.AssistantAction = _chunkCAKOFJZDjs.AssistantAction; exports.AssistantActionModule = _chunkCAKOFJZDjs.AssistantActionModule; exports.AssistantActionService = _chunkCAKOFJZDjs.AssistantActionService; exports.AssistantMessage = _chunkCAKOFJZDjs.AssistantMessage; exports.AssistantMessageModule = _chunkCAKOFJZDjs.AssistantMessageModule; exports.AssistantMessageService = _chunkCAKOFJZDjs.AssistantMessageService; exports.AssistantModule = _chunkCAKOFJZDjs.AssistantModule; exports.AssistantService = _chunkCAKOFJZDjs.AssistantService; exports.AuditLog = _chunkCAKOFJZDjs.AuditLog; exports.AuditLogModule = _chunkCAKOFJZDjs.AuditLogModule; exports.AuditLogService = _chunkCAKOFJZDjs.AuditLogService; exports.Auth = _chunkCAKOFJZDjs.Auth; exports.AuthComponent = _chunkCAKOFJZDjs.AuthComponent; exports.AuthModule = _chunkCAKOFJZDjs.AuthModule; exports.AuthService = _chunkCAKOFJZDjs.AuthService; exports.AuthorModule = _chunkCAKOFJZDjs.AuthorModule; exports.BackupCodeVerify = _chunkCAKOFJZDjs.BackupCodeVerify; exports.BackupCodeVerifyModule = _chunkCAKOFJZDjs.BackupCodeVerifyModule; exports.Billing = _chunkCAKOFJZDjs.Billing; exports.BillingModule = _chunkCAKOFJZDjs.BillingModule; exports.BillingService = _chunkCAKOFJZDjs.BillingService; exports.BlockNoteDiffUtil = _chunkCAKOFJZDjs.BlockNoteDiffUtil; exports.BlockNoteWordDiffRendererUtil = _chunkCAKOFJZDjs.BlockNoteWordDiffRendererUtil; exports.COMPANY_ADMINISTRATOR_ROLE_ID = _chunk4Z45NYPRjs.COMPANY_ADMINISTRATOR_ROLE_ID; exports.CURRENT_USER_STORAGE_KEY = _chunkCAKOFJZDjs.CURRENT_USER_STORAGE_KEY; exports.Chunk = _chunkCAKOFJZDjs.Chunk; exports.ChunkModule = _chunkCAKOFJZDjs.ChunkModule; exports.ClientAbstractService = _chunkCAKOFJZDjs.ClientAbstractService; exports.ClientHttpMethod = _chunkCAKOFJZDjs.ClientHttpMethod; exports.Company = _chunkCAKOFJZDjs.Company; exports.CompanyFields = _chunkCAKOFJZDjs.CompanyFields; exports.CompanyModule = _chunkCAKOFJZDjs.CompanyModule; exports.CompanyService = _chunkCAKOFJZDjs.CompanyService; exports.Content = _chunkCAKOFJZDjs.Content; exports.ContentFields = _chunkCAKOFJZDjs.ContentFields; exports.ContentModule = _chunkCAKOFJZDjs.ContentModule; exports.ContentService = _chunkCAKOFJZDjs.ContentService; exports.DEFAULT_GRANT_TYPES = _chunkCAKOFJZDjs.DEFAULT_GRANT_TYPES; exports.DataClass = _chunk26MQIJNBjs.DataClassRegistry; exports.DataClassRegistry = _chunk26MQIJNBjs.DataClassRegistry; exports.ENV = _chunk26MQIJNBjs.ENV; exports.EndpointCreator = _chunkCAKOFJZDjs.EndpointCreator; exports.EntityAiStatus = _chunkCAKOFJZDjs.EntityAiStatus; exports.Feature = _chunkCAKOFJZDjs.Feature; exports.FeatureModule = _chunkCAKOFJZDjs.FeatureModule; exports.FeatureService = _chunkCAKOFJZDjs.FeatureService; exports.HandbookPage = _chunkCAKOFJZDjs.HandbookPage; exports.HandbookPageFields = _chunkCAKOFJZDjs.HandbookPageFields; exports.HandbookPageModule = _chunkCAKOFJZDjs.HandbookPageModule; exports.HandbookPageService = _chunkCAKOFJZDjs.HandbookPageService; exports.HandbookSection = _chunkCAKOFJZDjs.HandbookSection; exports.HandbookSectionModule = _chunkCAKOFJZDjs.HandbookSectionModule; exports.HandbookSectionService = _chunkCAKOFJZDjs.HandbookSectionService; exports.HandbookThread = _chunkCAKOFJZDjs.HandbookThread; exports.HandbookThreadMessage = _chunkCAKOFJZDjs.HandbookThreadMessage; exports.HandbookThreadMessageModule = _chunkCAKOFJZDjs.HandbookThreadMessageModule; exports.HandbookThreadMessageService = _chunkCAKOFJZDjs.HandbookThreadMessageService; exports.HandbookThreadModule = _chunkCAKOFJZDjs.HandbookThreadModule; exports.HandbookThreadService = _chunkCAKOFJZDjs.HandbookThreadService; exports.HowTo = _chunkCAKOFJZDjs.HowTo; exports.HowToFields = _chunkCAKOFJZDjs.HowToFields; exports.HowToModule = _chunkCAKOFJZDjs.HowToModule; exports.HowToService = _chunkCAKOFJZDjs.HowToService; exports.HttpMethod = _chunkCAKOFJZDjs.HttpMethod; exports.InvoiceStatus = _chunkCAKOFJZDjs.InvoiceStatus; exports.JsonApiDataFactory = _chunk26MQIJNBjs.JsonApiDataFactory; exports.MOBILE_BREAKPOINT = _chunkCAKOFJZDjs.MOBILE_BREAKPOINT; exports.Module = _chunkCAKOFJZDjs.Module; exports.ModuleModule = _chunkCAKOFJZDjs.ModuleModule; exports.ModulePaths = _chunkCAKOFJZDjs.ModulePaths; exports.ModulePathsModule = _chunkCAKOFJZDjs.ModulePathsModule; exports.ModuleRegistrar = _chunkCAKOFJZDjs.ModuleRegistrar; exports.ModuleRegistry = _chunkCAKOFJZDjs.ModuleRegistry; exports.Modules = _chunkCAKOFJZDjs.Modules; exports.Notification = _chunkCAKOFJZDjs.Notification; exports.NotificationFields = _chunkCAKOFJZDjs.NotificationFields; exports.NotificationModule = _chunkCAKOFJZDjs.NotificationModule; exports.NotificationService = _chunkCAKOFJZDjs.NotificationService; exports.OAUTH_SCOPE_DISPLAY = _chunkCAKOFJZDjs.OAUTH_SCOPE_DISPLAY; exports.OAuthClient = _chunkCAKOFJZDjs.OAuthClient; exports.OAuthModule = _chunkCAKOFJZDjs.OAuthModule; exports.OAuthService = _chunkCAKOFJZDjs.OAuthService; exports.Passkey = _chunkCAKOFJZDjs.Passkey; exports.PasskeyAuthenticationOptions = _chunkCAKOFJZDjs.PasskeyAuthenticationOptions; exports.PasskeyAuthenticationOptionsModule = _chunkCAKOFJZDjs.PasskeyAuthenticationOptionsModule; exports.PasskeyModule = _chunkCAKOFJZDjs.PasskeyModule; exports.PasskeyRegistrationOptions = _chunkCAKOFJZDjs.PasskeyRegistrationOptions; exports.PasskeyRegistrationOptionsModule = _chunkCAKOFJZDjs.PasskeyRegistrationOptionsModule; exports.PasskeyRegistrationVerify = _chunkCAKOFJZDjs.PasskeyRegistrationVerify; exports.PasskeyRegistrationVerifyModule = _chunkCAKOFJZDjs.PasskeyRegistrationVerifyModule; exports.PasskeyRename = _chunkCAKOFJZDjs.PasskeyRename; exports.PasskeyRenameModule = _chunkCAKOFJZDjs.PasskeyRenameModule; exports.PasskeyVerifyLogin = _chunkCAKOFJZDjs.PasskeyVerifyLogin; exports.PasskeyVerifyLoginModule = _chunkCAKOFJZDjs.PasskeyVerifyLoginModule; exports.PaymentMethod = _chunkCAKOFJZDjs.PaymentMethod; exports.PermissionMapping = _chunkCAKOFJZDjs.PermissionMapping; exports.PermissionMappingModule = _chunkCAKOFJZDjs.PermissionMappingModule; exports.Push = _chunkCAKOFJZDjs.Push; exports.PushModule = _chunkCAKOFJZDjs.PushModule; exports.PushService = _chunkCAKOFJZDjs.PushService; exports.RbacMatrixModel = _chunkCAKOFJZDjs.RbacMatrixModel; exports.RbacMatrixModule = _chunkCAKOFJZDjs.RbacMatrixModule; exports.RbacService = _chunk4Z45NYPRjs.RbacService; exports.ReferralModule = _chunkCAKOFJZDjs.ReferralModule; exports.ReferralService = _chunkCAKOFJZDjs.ReferralService; exports.ReferralStats = _chunkCAKOFJZDjs.ReferralStats; exports.ReferralStatsModule = _chunkCAKOFJZDjs.ReferralStatsModule; exports.RehydrationFactory = _chunkCAKOFJZDjs.RehydrationFactory; exports.Role = _chunkCAKOFJZDjs.Role; exports.RoleFields = _chunkCAKOFJZDjs.RoleFields; exports.RoleModule = _chunkCAKOFJZDjs.RoleModule; exports.RoleService = _chunkCAKOFJZDjs.RoleService; exports.S3 = _chunkCAKOFJZDjs.S3; exports.S3Module = _chunkCAKOFJZDjs.S3Module; exports.S3Service = _chunkCAKOFJZDjs.S3Service; exports.StripeCustomer = _chunkCAKOFJZDjs.StripeCustomer; exports.StripeCustomerModule = _chunkCAKOFJZDjs.StripeCustomerModule; exports.StripeCustomerService = _chunkCAKOFJZDjs.StripeCustomerService; exports.StripeInvoice = _chunkCAKOFJZDjs.StripeInvoice; exports.StripeInvoiceModule = _chunkCAKOFJZDjs.StripeInvoiceModule; exports.StripeInvoiceService = _chunkCAKOFJZDjs.StripeInvoiceService; exports.StripePaymentMethodModule = _chunkCAKOFJZDjs.StripePaymentMethodModule; exports.StripePrice = _chunkCAKOFJZDjs.StripePrice; exports.StripePriceFields = _chunkCAKOFJZDjs.StripePriceFields; exports.StripePriceModule = _chunkCAKOFJZDjs.StripePriceModule; exports.StripePriceService = _chunkCAKOFJZDjs.StripePriceService; exports.StripeProduct = _chunkCAKOFJZDjs.StripeProduct; exports.StripeProductFields = _chunkCAKOFJZDjs.StripeProductFields; exports.StripeProductModule = _chunkCAKOFJZDjs.StripeProductModule; exports.StripeProductService = _chunkCAKOFJZDjs.StripeProductService; exports.StripePromotionCode = _chunkCAKOFJZDjs.StripePromotionCode; exports.StripePromotionCodeModule = _chunkCAKOFJZDjs.StripePromotionCodeModule; exports.StripePromotionCodeService = _chunkCAKOFJZDjs.StripePromotionCodeService; exports.StripeSubscription = _chunkCAKOFJZDjs.StripeSubscription; exports.StripeSubscriptionModule = _chunkCAKOFJZDjs.StripeSubscriptionModule; exports.StripeSubscriptionService = _chunkCAKOFJZDjs.StripeSubscriptionService; exports.StripeUsage = _chunkCAKOFJZDjs.StripeUsage; exports.StripeUsageModule = _chunkCAKOFJZDjs.StripeUsageModule; exports.StripeUsageService = _chunkCAKOFJZDjs.StripeUsageService; exports.SubscriptionStatus = _chunkCAKOFJZDjs.SubscriptionStatus; exports.TableOptions = _chunkCAKOFJZDjs.TableOptions; exports.TokenUsageAdminBreakdownModule = _chunkCAKOFJZDjs.TokenUsageAdminBreakdownModule; exports.TokenUsageAdminSummaryModule = _chunkCAKOFJZDjs.TokenUsageAdminSummaryModule; exports.TokenUsageAdminTimelineModule = _chunkCAKOFJZDjs.TokenUsageAdminTimelineModule; exports.TotpAuthenticator = _chunkCAKOFJZDjs.TotpAuthenticator; exports.TotpAuthenticatorModule = _chunkCAKOFJZDjs.TotpAuthenticatorModule; exports.TotpSetup = _chunkCAKOFJZDjs.TotpSetup; exports.TotpSetupModule = _chunkCAKOFJZDjs.TotpSetupModule; exports.TotpVerify = _chunkCAKOFJZDjs.TotpVerify; exports.TotpVerifyLogin = _chunkCAKOFJZDjs.TotpVerifyLogin; exports.TotpVerifyLoginModule = _chunkCAKOFJZDjs.TotpVerifyLoginModule; exports.TotpVerifyModule = _chunkCAKOFJZDjs.TotpVerifyModule; exports.TwoFactorChallenge = _chunkCAKOFJZDjs.TwoFactorChallenge; exports.TwoFactorChallengeModule = _chunkCAKOFJZDjs.TwoFactorChallengeModule; exports.TwoFactorEnable = _chunkCAKOFJZDjs.TwoFactorEnable; exports.TwoFactorEnableModule = _chunkCAKOFJZDjs.TwoFactorEnableModule; exports.TwoFactorService = _chunkCAKOFJZDjs.TwoFactorService; exports.TwoFactorStatus = _chunkCAKOFJZDjs.TwoFactorStatus; exports.TwoFactorStatusModule = _chunkCAKOFJZDjs.TwoFactorStatusModule; exports.User = _chunkCAKOFJZDjs.User; exports.UserFields = _chunkCAKOFJZDjs.UserFields; exports.UserModule = _chunkCAKOFJZDjs.UserModule; exports.UserService = _chunkCAKOFJZDjs.UserService; exports.VIEWPORT_COOKIE_NAME = _chunkCAKOFJZDjs.VIEWPORT_COOKIE_NAME; exports.Waitlist = _chunkCAKOFJZDjs.Waitlist; exports.WaitlistFields = _chunkCAKOFJZDjs.WaitlistFields; exports.WaitlistModule = _chunkCAKOFJZDjs.WaitlistModule; exports.WaitlistService = _chunkCAKOFJZDjs.WaitlistService; exports.WaitlistStats = _chunkCAKOFJZDjs.WaitlistStats; exports.WaitlistStatsModule = _chunkCAKOFJZDjs.WaitlistStatsModule; exports.analyticsModules = _chunkCAKOFJZDjs.analyticsModules; exports.checkPermissions = _chunkCAKOFJZDjs.checkPermissions; exports.checkPermissionsFromServer = _chunkCAKOFJZDjs.checkPermissionsFromServer; exports.clearLastApiMeta = _chunkCAKOFJZDjs.clearLastApiMeta; exports.clearLastApiTotal = _chunkCAKOFJZDjs.clearLastApiTotal; exports.cn = _chunkCAKOFJZDjs.cn; exports.composeRefs = _chunkCAKOFJZDjs.composeRefs; exports.configureAuth = _chunkCAKOFJZDjs.configureAuth; exports.configureI18n = _chunk4Z45NYPRjs.configureI18n; exports.configureJsonApi = _chunk4Z45NYPRjs.configureJsonApi; exports.configureLogin = _chunk4Z45NYPRjs.configureLogin; exports.configureReferral = _chunk4Z45NYPRjs.configureReferral; exports.configureRoles = _chunk4Z45NYPRjs.configureRoles; exports.configureTokenUsage = _chunkCAKOFJZDjs.configureTokenUsage; exports.configureWaitlist = _chunk4Z45NYPRjs.configureWaitlist; exports.createJsonApiInclusion = _chunkCAKOFJZDjs.createJsonApiInclusion; exports.dismissToast = _chunkCAKOFJZDjs.dismissToast; exports.entityObjectSchema = _chunkCAKOFJZDjs.entityObjectSchema; exports.exists = _chunkCAKOFJZDjs.exists; exports.formatCodiceFiscale = _chunkCAKOFJZDjs.formatCodiceFiscale; exports.formatDate = _chunkCAKOFJZDjs.formatDate; exports.formatLocalDate = _chunkCAKOFJZDjs.formatLocalDate; exports.formatPartitaIva = _chunkCAKOFJZDjs.formatPartitaIva; exports.getApiUrl = _chunk4Z45NYPRjs.getApiUrl; exports.getAppUrl = _chunk4Z45NYPRjs.getAppUrl; exports.getBootstrapper = _chunk26MQIJNBjs.getBootstrapper; exports.getClientGlobalErrorHandler = _chunkCAKOFJZDjs.getClientGlobalErrorHandler; exports.getGlobalErrorHandler = _chunkCAKOFJZDjs.getGlobalErrorHandler; exports.getIcon = _chunkCAKOFJZDjs.getIcon; exports.getIconByModule = _chunkCAKOFJZDjs.getIconByModule; exports.getIconByModuleName = _chunkCAKOFJZDjs.getIconByModuleName; exports.getInitials = _chunkCAKOFJZDjs.getInitials; exports.getLastApiMeta = _chunkCAKOFJZDjs.getLastApiMeta; exports.getLastApiTotal = _chunkCAKOFJZDjs.getLastApiTotal; exports.getLucideIcon = _chunkCAKOFJZDjs.getLucideIcon; exports.getLucideIconByModule = _chunkCAKOFJZDjs.getLucideIconByModule; exports.getLucideIconByModuleName = _chunkCAKOFJZDjs.getLucideIconByModuleName; exports.getPublicApiUrl = _chunk4Z45NYPRjs.getPublicApiUrl; exports.getReferralConfig = _chunk4Z45NYPRjs.getReferralConfig; exports.getRoleId = _chunk4Z45NYPRjs.getRoleId; exports.getStripePublishableKey = _chunk4Z45NYPRjs.getStripePublishableKey; exports.getTableComponents = _chunkCAKOFJZDjs.getTableComponents; exports.getTableOptions = _chunkCAKOFJZDjs.getTableOptions; exports.getTokenHandler = _chunkCAKOFJZDjs.getTokenHandler; exports.getTokenUsageCurrency = _chunkCAKOFJZDjs.getTokenUsageCurrency; exports.getTrackablePages = _chunk4Z45NYPRjs.getTrackablePages; exports.getValueFromPath = _chunkCAKOFJZDjs.getValueFromPath; exports.getWaitlistConfig = _chunk4Z45NYPRjs.getWaitlistConfig; exports.handbookPageContent = _chunkCAKOFJZDjs.handbookPageContent; exports.handbookPageSummary = _chunkCAKOFJZDjs.handbookPageSummary; exports.handbookPageTitle = _chunkCAKOFJZDjs.handbookPageTitle; exports.handbookSectionSummary = _chunkCAKOFJZDjs.handbookSectionSummary; exports.handbookSectionTitle = _chunkCAKOFJZDjs.handbookSectionTitle; exports.hasBootstrapper = _chunk26MQIJNBjs.hasBootstrapper; exports.isReferralEnabled = _chunk4Z45NYPRjs.isReferralEnabled; exports.isRemoteImageSrc = _chunkCAKOFJZDjs.isRemoteImageSrc; exports.isRolesConfigured = _chunk4Z45NYPRjs.isRolesConfigured; exports.rehydrate = _chunkCAKOFJZDjs.rehydrate; exports.rehydrateList = _chunkCAKOFJZDjs.rehydrateList; exports.resetBootstrapStore = _chunk26MQIJNBjs.resetBootstrapStore; exports.setBootstrapper = _chunk26MQIJNBjs.setBootstrapper; exports.setClientGlobalErrorHandler = _chunkCAKOFJZDjs.setClientGlobalErrorHandler; exports.setGlobalErrorHandler = _chunkCAKOFJZDjs.setGlobalErrorHandler; exports.showCustomToast = _chunkCAKOFJZDjs.showCustomToast; exports.showError = _chunkCAKOFJZDjs.showError; exports.showToast = _chunkCAKOFJZDjs.showToast; exports.tokenUsageModules = _chunkCAKOFJZDjs.tokenUsageModules; exports.translateData = _chunk26MQIJNBjs.translateData; exports.translateResponse = _chunk26MQIJNBjs.translateResponse; exports.tryBootstrap = _chunk26MQIJNBjs.tryBootstrap; exports.useComposedRefs = _chunkCAKOFJZDjs.useComposedRefs; exports.useIsMobile = _chunkCAKOFJZDjs.useIsMobile; exports.userObjectSchema = _chunkCAKOFJZDjs.userObjectSchema; exports.validateCodiceFiscale = _chunkCAKOFJZDjs.validateCodiceFiscale; exports.validateItalianTaxCode = _chunkCAKOFJZDjs.validateItalianTaxCode; exports.validatePartitaIva = _chunkCAKOFJZDjs.validatePartitaIva;
524
+ exports.ACTION_TYPES = _chunk5W5MN7JPjs.ACTION_TYPES; exports.AVAILABLE_OAUTH_SCOPES = _chunk6OFANJTEjs.AVAILABLE_OAUTH_SCOPES; exports.AbstractApiData = _chunk6OFANJTEjs.AbstractApiData; exports.AbstractService = _chunk6OFANJTEjs.AbstractService; exports.Action = _chunk6OFANJTEjs.Action; exports.AiConnection = _chunk6OFANJTEjs.AiConnection; exports.AiConnectionFields = _chunk6OFANJTEjs.AiConnectionFields; exports.AiConnectionModule = _chunk6OFANJTEjs.AiConnectionModule; exports.AiConnectionService = _chunk6OFANJTEjs.AiConnectionService; exports.Assistant = _chunk6OFANJTEjs.Assistant; exports.AssistantAction = _chunk6OFANJTEjs.AssistantAction; exports.AssistantActionModule = _chunk6OFANJTEjs.AssistantActionModule; exports.AssistantActionService = _chunk6OFANJTEjs.AssistantActionService; exports.AssistantMessage = _chunk6OFANJTEjs.AssistantMessage; exports.AssistantMessageModule = _chunk6OFANJTEjs.AssistantMessageModule; exports.AssistantMessageService = _chunk6OFANJTEjs.AssistantMessageService; exports.AssistantModule = _chunk6OFANJTEjs.AssistantModule; exports.AssistantService = _chunk6OFANJTEjs.AssistantService; exports.AuditLog = _chunk6OFANJTEjs.AuditLog; exports.AuditLogModule = _chunk6OFANJTEjs.AuditLogModule; exports.AuditLogService = _chunk6OFANJTEjs.AuditLogService; exports.Auth = _chunk6OFANJTEjs.Auth; exports.AuthComponent = _chunk6OFANJTEjs.AuthComponent; exports.AuthModule = _chunk6OFANJTEjs.AuthModule; exports.AuthService = _chunk6OFANJTEjs.AuthService; exports.AuthorModule = _chunk6OFANJTEjs.AuthorModule; exports.BackupCodeVerify = _chunk6OFANJTEjs.BackupCodeVerify; exports.BackupCodeVerifyModule = _chunk6OFANJTEjs.BackupCodeVerifyModule; exports.Billing = _chunk6OFANJTEjs.Billing; exports.BillingModule = _chunk6OFANJTEjs.BillingModule; exports.BillingService = _chunk6OFANJTEjs.BillingService; exports.BlockNoteDiffUtil = _chunk6OFANJTEjs.BlockNoteDiffUtil; exports.BlockNoteWordDiffRendererUtil = _chunk6OFANJTEjs.BlockNoteWordDiffRendererUtil; exports.COMPANY_ADMINISTRATOR_ROLE_ID = _chunk5W5MN7JPjs.COMPANY_ADMINISTRATOR_ROLE_ID; exports.CURRENT_USER_STORAGE_KEY = _chunk6OFANJTEjs.CURRENT_USER_STORAGE_KEY; exports.Chunk = _chunk6OFANJTEjs.Chunk; exports.ChunkModule = _chunk6OFANJTEjs.ChunkModule; exports.ClientAbstractService = _chunk6OFANJTEjs.ClientAbstractService; exports.ClientHttpMethod = _chunk6OFANJTEjs.ClientHttpMethod; exports.Company = _chunk6OFANJTEjs.Company; exports.CompanyFields = _chunk6OFANJTEjs.CompanyFields; exports.CompanyModule = _chunk6OFANJTEjs.CompanyModule; exports.CompanyService = _chunk6OFANJTEjs.CompanyService; exports.Content = _chunk6OFANJTEjs.Content; exports.ContentFields = _chunk6OFANJTEjs.ContentFields; exports.ContentModule = _chunk6OFANJTEjs.ContentModule; exports.ContentService = _chunk6OFANJTEjs.ContentService; exports.DEFAULT_GRANT_TYPES = _chunk6OFANJTEjs.DEFAULT_GRANT_TYPES; exports.DataClass = _chunkWGVNJXZOjs.DataClassRegistry; exports.DataClassRegistry = _chunkWGVNJXZOjs.DataClassRegistry; exports.ENV = _chunkWGVNJXZOjs.ENV; exports.EndpointCreator = _chunk6OFANJTEjs.EndpointCreator; exports.EntityAiStatus = _chunk6OFANJTEjs.EntityAiStatus; exports.Feature = _chunk6OFANJTEjs.Feature; exports.FeatureModule = _chunk6OFANJTEjs.FeatureModule; exports.FeatureService = _chunk6OFANJTEjs.FeatureService; exports.HandbookPage = _chunk6OFANJTEjs.HandbookPage; exports.HandbookPageFields = _chunk6OFANJTEjs.HandbookPageFields; exports.HandbookPageModule = _chunk6OFANJTEjs.HandbookPageModule; exports.HandbookPageService = _chunk6OFANJTEjs.HandbookPageService; exports.HandbookSection = _chunk6OFANJTEjs.HandbookSection; exports.HandbookSectionModule = _chunk6OFANJTEjs.HandbookSectionModule; exports.HandbookSectionService = _chunk6OFANJTEjs.HandbookSectionService; exports.HandbookThread = _chunk6OFANJTEjs.HandbookThread; exports.HandbookThreadMessage = _chunk6OFANJTEjs.HandbookThreadMessage; exports.HandbookThreadMessageModule = _chunk6OFANJTEjs.HandbookThreadMessageModule; exports.HandbookThreadMessageService = _chunk6OFANJTEjs.HandbookThreadMessageService; exports.HandbookThreadModule = _chunk6OFANJTEjs.HandbookThreadModule; exports.HandbookThreadService = _chunk6OFANJTEjs.HandbookThreadService; exports.HowTo = _chunk6OFANJTEjs.HowTo; exports.HowToFields = _chunk6OFANJTEjs.HowToFields; exports.HowToModule = _chunk6OFANJTEjs.HowToModule; exports.HowToService = _chunk6OFANJTEjs.HowToService; exports.HttpMethod = _chunk6OFANJTEjs.HttpMethod; exports.InvoiceStatus = _chunk6OFANJTEjs.InvoiceStatus; exports.JsonApiDataFactory = _chunkWGVNJXZOjs.JsonApiDataFactory; exports.MOBILE_BREAKPOINT = _chunk6OFANJTEjs.MOBILE_BREAKPOINT; exports.Module = _chunk6OFANJTEjs.Module; exports.ModuleModule = _chunk6OFANJTEjs.ModuleModule; exports.ModulePaths = _chunk6OFANJTEjs.ModulePaths; exports.ModulePathsModule = _chunk6OFANJTEjs.ModulePathsModule; exports.ModuleRegistrar = _chunk6OFANJTEjs.ModuleRegistrar; exports.ModuleRegistry = _chunk6OFANJTEjs.ModuleRegistry; exports.Modules = _chunk6OFANJTEjs.Modules; exports.Notification = _chunk6OFANJTEjs.Notification; exports.NotificationFields = _chunk6OFANJTEjs.NotificationFields; exports.NotificationModule = _chunk6OFANJTEjs.NotificationModule; exports.NotificationService = _chunk6OFANJTEjs.NotificationService; exports.OAUTH_SCOPE_DISPLAY = _chunk6OFANJTEjs.OAUTH_SCOPE_DISPLAY; exports.OAuthClient = _chunk6OFANJTEjs.OAuthClient; exports.OAuthModule = _chunk6OFANJTEjs.OAuthModule; exports.OAuthService = _chunk6OFANJTEjs.OAuthService; exports.Passkey = _chunk6OFANJTEjs.Passkey; exports.PasskeyAuthenticationOptions = _chunk6OFANJTEjs.PasskeyAuthenticationOptions; exports.PasskeyAuthenticationOptionsModule = _chunk6OFANJTEjs.PasskeyAuthenticationOptionsModule; exports.PasskeyModule = _chunk6OFANJTEjs.PasskeyModule; exports.PasskeyRegistrationOptions = _chunk6OFANJTEjs.PasskeyRegistrationOptions; exports.PasskeyRegistrationOptionsModule = _chunk6OFANJTEjs.PasskeyRegistrationOptionsModule; exports.PasskeyRegistrationVerify = _chunk6OFANJTEjs.PasskeyRegistrationVerify; exports.PasskeyRegistrationVerifyModule = _chunk6OFANJTEjs.PasskeyRegistrationVerifyModule; exports.PasskeyRename = _chunk6OFANJTEjs.PasskeyRename; exports.PasskeyRenameModule = _chunk6OFANJTEjs.PasskeyRenameModule; exports.PasskeyVerifyLogin = _chunk6OFANJTEjs.PasskeyVerifyLogin; exports.PasskeyVerifyLoginModule = _chunk6OFANJTEjs.PasskeyVerifyLoginModule; exports.PaymentMethod = _chunk6OFANJTEjs.PaymentMethod; exports.PermissionMapping = _chunk6OFANJTEjs.PermissionMapping; exports.PermissionMappingModule = _chunk6OFANJTEjs.PermissionMappingModule; exports.Push = _chunk6OFANJTEjs.Push; exports.PushModule = _chunk6OFANJTEjs.PushModule; exports.PushService = _chunk6OFANJTEjs.PushService; exports.RbacMatrixModel = _chunk6OFANJTEjs.RbacMatrixModel; exports.RbacMatrixModule = _chunk6OFANJTEjs.RbacMatrixModule; exports.RbacService = _chunk5W5MN7JPjs.RbacService; exports.ReferralModule = _chunk6OFANJTEjs.ReferralModule; exports.ReferralService = _chunk6OFANJTEjs.ReferralService; exports.ReferralStats = _chunk6OFANJTEjs.ReferralStats; exports.ReferralStatsModule = _chunk6OFANJTEjs.ReferralStatsModule; exports.RehydrationFactory = _chunk6OFANJTEjs.RehydrationFactory; exports.Role = _chunk6OFANJTEjs.Role; exports.RoleFields = _chunk6OFANJTEjs.RoleFields; exports.RoleModule = _chunk6OFANJTEjs.RoleModule; exports.RoleService = _chunk6OFANJTEjs.RoleService; exports.S3 = _chunk6OFANJTEjs.S3; exports.S3Module = _chunk6OFANJTEjs.S3Module; exports.S3Service = _chunk6OFANJTEjs.S3Service; exports.StripeCustomer = _chunk6OFANJTEjs.StripeCustomer; exports.StripeCustomerModule = _chunk6OFANJTEjs.StripeCustomerModule; exports.StripeCustomerService = _chunk6OFANJTEjs.StripeCustomerService; exports.StripeInvoice = _chunk6OFANJTEjs.StripeInvoice; exports.StripeInvoiceModule = _chunk6OFANJTEjs.StripeInvoiceModule; exports.StripeInvoiceService = _chunk6OFANJTEjs.StripeInvoiceService; exports.StripePaymentMethodModule = _chunk6OFANJTEjs.StripePaymentMethodModule; exports.StripePrice = _chunk6OFANJTEjs.StripePrice; exports.StripePriceFields = _chunk6OFANJTEjs.StripePriceFields; exports.StripePriceModule = _chunk6OFANJTEjs.StripePriceModule; exports.StripePriceService = _chunk6OFANJTEjs.StripePriceService; exports.StripeProduct = _chunk6OFANJTEjs.StripeProduct; exports.StripeProductFields = _chunk6OFANJTEjs.StripeProductFields; exports.StripeProductModule = _chunk6OFANJTEjs.StripeProductModule; exports.StripeProductService = _chunk6OFANJTEjs.StripeProductService; exports.StripePromotionCode = _chunk6OFANJTEjs.StripePromotionCode; exports.StripePromotionCodeModule = _chunk6OFANJTEjs.StripePromotionCodeModule; exports.StripePromotionCodeService = _chunk6OFANJTEjs.StripePromotionCodeService; exports.StripeSubscription = _chunk6OFANJTEjs.StripeSubscription; exports.StripeSubscriptionModule = _chunk6OFANJTEjs.StripeSubscriptionModule; exports.StripeSubscriptionService = _chunk6OFANJTEjs.StripeSubscriptionService; exports.StripeUsage = _chunk6OFANJTEjs.StripeUsage; exports.StripeUsageModule = _chunk6OFANJTEjs.StripeUsageModule; exports.StripeUsageService = _chunk6OFANJTEjs.StripeUsageService; exports.SubscriptionStatus = _chunk6OFANJTEjs.SubscriptionStatus; exports.TableOptions = _chunk6OFANJTEjs.TableOptions; exports.TokenUsageAdminBreakdownModule = _chunk6OFANJTEjs.TokenUsageAdminBreakdownModule; exports.TokenUsageAdminSummaryModule = _chunk6OFANJTEjs.TokenUsageAdminSummaryModule; exports.TokenUsageAdminTimelineModule = _chunk6OFANJTEjs.TokenUsageAdminTimelineModule; exports.TotpAuthenticator = _chunk6OFANJTEjs.TotpAuthenticator; exports.TotpAuthenticatorModule = _chunk6OFANJTEjs.TotpAuthenticatorModule; exports.TotpSetup = _chunk6OFANJTEjs.TotpSetup; exports.TotpSetupModule = _chunk6OFANJTEjs.TotpSetupModule; exports.TotpVerify = _chunk6OFANJTEjs.TotpVerify; exports.TotpVerifyLogin = _chunk6OFANJTEjs.TotpVerifyLogin; exports.TotpVerifyLoginModule = _chunk6OFANJTEjs.TotpVerifyLoginModule; exports.TotpVerifyModule = _chunk6OFANJTEjs.TotpVerifyModule; exports.TwoFactorChallenge = _chunk6OFANJTEjs.TwoFactorChallenge; exports.TwoFactorChallengeModule = _chunk6OFANJTEjs.TwoFactorChallengeModule; exports.TwoFactorEnable = _chunk6OFANJTEjs.TwoFactorEnable; exports.TwoFactorEnableModule = _chunk6OFANJTEjs.TwoFactorEnableModule; exports.TwoFactorService = _chunk6OFANJTEjs.TwoFactorService; exports.TwoFactorStatus = _chunk6OFANJTEjs.TwoFactorStatus; exports.TwoFactorStatusModule = _chunk6OFANJTEjs.TwoFactorStatusModule; exports.User = _chunk6OFANJTEjs.User; exports.UserFields = _chunk6OFANJTEjs.UserFields; exports.UserModule = _chunk6OFANJTEjs.UserModule; exports.UserService = _chunk6OFANJTEjs.UserService; exports.VIEWPORT_COOKIE_NAME = _chunk6OFANJTEjs.VIEWPORT_COOKIE_NAME; exports.Waitlist = _chunk6OFANJTEjs.Waitlist; exports.WaitlistFields = _chunk6OFANJTEjs.WaitlistFields; exports.WaitlistModule = _chunk6OFANJTEjs.WaitlistModule; exports.WaitlistService = _chunk6OFANJTEjs.WaitlistService; exports.WaitlistStats = _chunk6OFANJTEjs.WaitlistStats; exports.WaitlistStatsModule = _chunk6OFANJTEjs.WaitlistStatsModule; exports.analyticsModules = _chunk6OFANJTEjs.analyticsModules; exports.checkPermissions = _chunk6OFANJTEjs.checkPermissions; exports.checkPermissionsFromServer = _chunk6OFANJTEjs.checkPermissionsFromServer; exports.clearLastApiMeta = _chunk6OFANJTEjs.clearLastApiMeta; exports.clearLastApiTotal = _chunk6OFANJTEjs.clearLastApiTotal; exports.cn = _chunk6OFANJTEjs.cn; exports.composeRefs = _chunk6OFANJTEjs.composeRefs; exports.configureAuth = _chunk6OFANJTEjs.configureAuth; exports.configureI18n = _chunk6OFANJTEjs.configureI18n; exports.configureJsonApi = _chunk5W5MN7JPjs.configureJsonApi; exports.configureLogin = _chunk5W5MN7JPjs.configureLogin; exports.configureReferral = _chunk5W5MN7JPjs.configureReferral; exports.configureRoles = _chunkG4JR3SFVjs.configureRoles; exports.configureTokenUsage = _chunk6OFANJTEjs.configureTokenUsage; exports.configureWaitlist = _chunk5W5MN7JPjs.configureWaitlist; exports.createJsonApiInclusion = _chunk6OFANJTEjs.createJsonApiInclusion; exports.dismissToast = _chunk6OFANJTEjs.dismissToast; exports.entityObjectSchema = _chunk6OFANJTEjs.entityObjectSchema; exports.exists = _chunk6OFANJTEjs.exists; exports.formatCodiceFiscale = _chunk6OFANJTEjs.formatCodiceFiscale; exports.formatDate = _chunk6OFANJTEjs.formatDate; exports.formatLocalDate = _chunk6OFANJTEjs.formatLocalDate; exports.formatPartitaIva = _chunk6OFANJTEjs.formatPartitaIva; exports.getApiUrl = _chunk5W5MN7JPjs.getApiUrl; exports.getAppUrl = _chunk5W5MN7JPjs.getAppUrl; exports.getBootstrapper = _chunkWGVNJXZOjs.getBootstrapper; exports.getClientGlobalErrorHandler = _chunk6OFANJTEjs.getClientGlobalErrorHandler; exports.getGlobalErrorHandler = _chunk6OFANJTEjs.getGlobalErrorHandler; exports.getIcon = _chunk6OFANJTEjs.getIcon; exports.getIconByModule = _chunk6OFANJTEjs.getIconByModule; exports.getIconByModuleName = _chunk6OFANJTEjs.getIconByModuleName; exports.getInitials = _chunk6OFANJTEjs.getInitials; exports.getLastApiMeta = _chunk6OFANJTEjs.getLastApiMeta; exports.getLastApiTotal = _chunk6OFANJTEjs.getLastApiTotal; exports.getLucideIcon = _chunk6OFANJTEjs.getLucideIcon; exports.getLucideIconByModule = _chunk6OFANJTEjs.getLucideIconByModule; exports.getLucideIconByModuleName = _chunk6OFANJTEjs.getLucideIconByModuleName; exports.getPublicApiUrl = _chunk5W5MN7JPjs.getPublicApiUrl; exports.getReferralConfig = _chunk5W5MN7JPjs.getReferralConfig; exports.getRoleId = _chunkG4JR3SFVjs.getRoleId; exports.getStripePublishableKey = _chunk5W5MN7JPjs.getStripePublishableKey; exports.getTableComponents = _chunk6OFANJTEjs.getTableComponents; exports.getTableOptions = _chunk6OFANJTEjs.getTableOptions; exports.getTokenHandler = _chunk6OFANJTEjs.getTokenHandler; exports.getTokenUsageCurrency = _chunk6OFANJTEjs.getTokenUsageCurrency; exports.getTrackablePages = _chunk5W5MN7JPjs.getTrackablePages; exports.getValueFromPath = _chunk6OFANJTEjs.getValueFromPath; exports.getWaitlistConfig = _chunk5W5MN7JPjs.getWaitlistConfig; exports.handbookPageContent = _chunk6OFANJTEjs.handbookPageContent; exports.handbookPageSummary = _chunk6OFANJTEjs.handbookPageSummary; exports.handbookPageTitle = _chunk6OFANJTEjs.handbookPageTitle; exports.handbookSectionSummary = _chunk6OFANJTEjs.handbookSectionSummary; exports.handbookSectionTitle = _chunk6OFANJTEjs.handbookSectionTitle; exports.hasBootstrapper = _chunkWGVNJXZOjs.hasBootstrapper; exports.isReferralEnabled = _chunk5W5MN7JPjs.isReferralEnabled; exports.isRemoteImageSrc = _chunk6OFANJTEjs.isRemoteImageSrc; exports.isRolesConfigured = _chunkG4JR3SFVjs.isRolesConfigured; exports.rehydrate = _chunk6OFANJTEjs.rehydrate; exports.rehydrateList = _chunk6OFANJTEjs.rehydrateList; exports.resetBootstrapStore = _chunkWGVNJXZOjs.resetBootstrapStore; exports.setBootstrapper = _chunkWGVNJXZOjs.setBootstrapper; exports.setClientGlobalErrorHandler = _chunk6OFANJTEjs.setClientGlobalErrorHandler; exports.setGlobalErrorHandler = _chunk6OFANJTEjs.setGlobalErrorHandler; exports.showCustomToast = _chunk6OFANJTEjs.showCustomToast; exports.showError = _chunk6OFANJTEjs.showError; exports.showToast = _chunk6OFANJTEjs.showToast; exports.tokenUsageModules = _chunk6OFANJTEjs.tokenUsageModules; exports.translateData = _chunkWGVNJXZOjs.translateData; exports.translateResponse = _chunkWGVNJXZOjs.translateResponse; exports.tryBootstrap = _chunkWGVNJXZOjs.tryBootstrap; exports.useComposedRefs = _chunk6OFANJTEjs.useComposedRefs; exports.useIsMobile = _chunk6OFANJTEjs.useIsMobile; exports.userObjectSchema = _chunk6OFANJTEjs.userObjectSchema; exports.validateCodiceFiscale = _chunk6OFANJTEjs.validateCodiceFiscale; exports.validateItalianTaxCode = _chunk6OFANJTEjs.validateItalianTaxCode; exports.validatePartitaIva = _chunk6OFANJTEjs.validatePartitaIva;
523
525
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["/home/runner/work/nextjs-jsonapi/nextjs-jsonapi/dist/index.js"],"names":[],"mappings":"AAAA;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACF,sDAA4B;AAC5B;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACF,sDAA4B;AAC5B;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACF,sDAA4B;AAC5B,+BAA4B;AAC5B,+BAA4B;AAC5B,+BAA4B;AAC5B;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACF,+7eAAC","file":"/home/runner/work/nextjs-jsonapi/nextjs-jsonapi/dist/index.js"}
1
+ {"version":3,"sources":["/home/runner/work/nextjs-jsonapi/nextjs-jsonapi/dist/index.js"],"names":[],"mappings":"AAAA;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACF,sDAA4B;AAC5B;AACE;AACA;AACA;AACF,sDAA4B;AAC5B;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACF,sDAA4B;AAC5B,+BAA4B;AAC5B,+BAA4B;AAC5B;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACF,sDAA4B;AAC5B,+BAA4B;AAC5B;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACF,+7eAAC","file":"/home/runner/work/nextjs-jsonapi/nextjs-jsonapi/dist/index.js"}
package/dist/index.mjs CHANGED
@@ -2,23 +2,24 @@ import {
2
2
  ACTION_TYPES,
3
3
  COMPANY_ADMINISTRATOR_ROLE_ID,
4
4
  RbacService,
5
- configureI18n,
6
5
  configureJsonApi,
7
6
  configureLogin,
8
7
  configureReferral,
9
- configureRoles,
10
8
  configureWaitlist,
11
9
  getApiUrl,
12
10
  getAppUrl,
13
11
  getPublicApiUrl,
14
12
  getReferralConfig,
15
- getRoleId,
16
13
  getStripePublishableKey,
17
14
  getTrackablePages,
18
15
  getWaitlistConfig,
19
- isReferralEnabled,
16
+ isReferralEnabled
17
+ } from "./chunk-ADZSH3MG.mjs";
18
+ import {
19
+ configureRoles,
20
+ getRoleId,
20
21
  isRolesConfigured
21
- } from "./chunk-Q6J2ICKO.mjs";
22
+ } from "./chunk-PW42LRSL.mjs";
22
23
  import {
23
24
  AVAILABLE_OAUTH_SCOPES,
24
25
  AbstractApiData,
@@ -201,6 +202,7 @@ import {
201
202
  cn,
202
203
  composeRefs,
203
204
  configureAuth,
205
+ configureI18n,
204
206
  configureTokenUsage,
205
207
  createJsonApiInclusion,
206
208
  dismissToast,
@@ -246,7 +248,9 @@ import {
246
248
  validateCodiceFiscale,
247
249
  validateItalianTaxCode,
248
250
  validatePartitaIva
249
- } from "./chunk-E3I4MT53.mjs";
251
+ } from "./chunk-AQZ3T4BR.mjs";
252
+ import "./chunk-AUXK7QSA.mjs";
253
+ import "./chunk-PI56A4DG.mjs";
250
254
  import {
251
255
  DataClassRegistry,
252
256
  ENV,
@@ -258,9 +262,7 @@ import {
258
262
  translateData,
259
263
  translateResponse,
260
264
  tryBootstrap
261
- } from "./chunk-37DMFVLN.mjs";
262
- import "./chunk-AUXK7QSA.mjs";
263
- import "./chunk-PI56A4DG.mjs";
265
+ } from "./chunk-7SCREMTX.mjs";
264
266
  import "./chunk-PAWJFY3S.mjs";
265
267
  export {
266
268
  ACTION_TYPES,
@@ -0,0 +1,43 @@
1
+ import { NextConfig } from 'next';
2
+
3
+ type CspDirective = "script-src" | "style-src" | "img-src" | "font-src" | "connect-src" | "frame-src" | "worker-src";
4
+ /**
5
+ * Third-party services an app may load. Each one adds its hosts to the
6
+ * directives it needs; nothing is allowed unless the app names it.
7
+ *
8
+ * - `stripe`: the billing feature (`@carlonicora/nextjs-jsonapi/billing`).
9
+ * - `googleMaps`: `FormPlaceAutocomplete` (Places API) and Maps JS/static tiles.
10
+ * - `turnstile`: Cloudflare Turnstile widgets (contact and waitlist forms).
11
+ * - `discord`: Discord avatars shown for users who log in with Discord.
12
+ * - `googleFonts`: fonts linked at runtime from Google Fonts. Not needed for
13
+ * `next/font/google`, which self-hosts at build time.
14
+ */
15
+ type CspService = "stripe" | "googleMaps" | "turnstile" | "discord" | "googleFonts";
16
+ interface CspOptions {
17
+ services?: CspService[];
18
+ csp?: Partial<Record<CspDirective, string[]>>;
19
+ }
20
+ declare function buildCsp(options: CspOptions, env: NodeJS.ProcessEnv): string;
21
+
22
+ interface NjaNextConfigOptions {
23
+ devOrigins: string[];
24
+ /** Third-party services the app loads; each adds its own hosts to the CSP. Nothing is allowed by default. */
25
+ services?: CspService[];
26
+ /** Extra CSP sources per directive, for hosts no named service covers. */
27
+ csp?: Partial<Record<CspDirective, string[]>>;
28
+ env?: Record<string, string>;
29
+ imageMinimumCacheTTL?: number;
30
+ permissionsPolicy?: {
31
+ camera?: "none" | "self";
32
+ };
33
+ mdx?: boolean;
34
+ serwist?: boolean;
35
+ securityHeaders?: boolean;
36
+ authInterrupts?: boolean;
37
+ reactCompiler?: boolean;
38
+ rewrites?: NextConfig["rewrites"];
39
+ extend?: (config: NextConfig) => NextConfig;
40
+ }
41
+ declare function createNextConfig(options: NjaNextConfigOptions): NextConfig;
42
+
43
+ export { type CspDirective, type CspService, type NjaNextConfigOptions, buildCsp, createNextConfig };
@@ -0,0 +1,43 @@
1
+ import { NextConfig } from 'next';
2
+
3
+ type CspDirective = "script-src" | "style-src" | "img-src" | "font-src" | "connect-src" | "frame-src" | "worker-src";
4
+ /**
5
+ * Third-party services an app may load. Each one adds its hosts to the
6
+ * directives it needs; nothing is allowed unless the app names it.
7
+ *
8
+ * - `stripe`: the billing feature (`@carlonicora/nextjs-jsonapi/billing`).
9
+ * - `googleMaps`: `FormPlaceAutocomplete` (Places API) and Maps JS/static tiles.
10
+ * - `turnstile`: Cloudflare Turnstile widgets (contact and waitlist forms).
11
+ * - `discord`: Discord avatars shown for users who log in with Discord.
12
+ * - `googleFonts`: fonts linked at runtime from Google Fonts. Not needed for
13
+ * `next/font/google`, which self-hosts at build time.
14
+ */
15
+ type CspService = "stripe" | "googleMaps" | "turnstile" | "discord" | "googleFonts";
16
+ interface CspOptions {
17
+ services?: CspService[];
18
+ csp?: Partial<Record<CspDirective, string[]>>;
19
+ }
20
+ declare function buildCsp(options: CspOptions, env: NodeJS.ProcessEnv): string;
21
+
22
+ interface NjaNextConfigOptions {
23
+ devOrigins: string[];
24
+ /** Third-party services the app loads; each adds its own hosts to the CSP. Nothing is allowed by default. */
25
+ services?: CspService[];
26
+ /** Extra CSP sources per directive, for hosts no named service covers. */
27
+ csp?: Partial<Record<CspDirective, string[]>>;
28
+ env?: Record<string, string>;
29
+ imageMinimumCacheTTL?: number;
30
+ permissionsPolicy?: {
31
+ camera?: "none" | "self";
32
+ };
33
+ mdx?: boolean;
34
+ serwist?: boolean;
35
+ securityHeaders?: boolean;
36
+ authInterrupts?: boolean;
37
+ reactCompiler?: boolean;
38
+ rewrites?: NextConfig["rewrites"];
39
+ extend?: (config: NextConfig) => NextConfig;
40
+ }
41
+ declare function createNextConfig(options: NjaNextConfigOptions): NextConfig;
42
+
43
+ export { type CspDirective, type CspService, type NjaNextConfigOptions, buildCsp, createNextConfig };
@@ -0,0 +1,230 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
2
+
3
+ var _chunk7QVYU63Ejs = require('../chunk-7QVYU63E.js');
4
+
5
+ // src/next-config/csp.ts
6
+ var SERVICE_SOURCES = {
7
+ stripe: {
8
+ "script-src": ["https://js.stripe.com"],
9
+ "img-src": ["https://*.stripe.com"],
10
+ "connect-src": ["https://api.stripe.com"],
11
+ "frame-src": ["https://js.stripe.com", "https://hooks.stripe.com"]
12
+ },
13
+ googleMaps: {
14
+ "script-src": ["https://maps.googleapis.com"],
15
+ "img-src": ["https://maps.googleapis.com", "https://maps.gstatic.com"],
16
+ "connect-src": ["https://maps.googleapis.com", "https://places.googleapis.com"]
17
+ },
18
+ turnstile: {
19
+ "script-src": ["https://challenges.cloudflare.com"],
20
+ "connect-src": ["https://challenges.cloudflare.com"],
21
+ "frame-src": ["https://challenges.cloudflare.com"]
22
+ },
23
+ discord: {
24
+ "img-src": ["https://cdn.discordapp.com"]
25
+ },
26
+ googleFonts: {
27
+ "style-src": ["https://fonts.googleapis.com"],
28
+ "font-src": ["https://fonts.gstatic.com"]
29
+ }
30
+ };
31
+ function listImageSources(env) {
32
+ return env.IMAGE_SOURCES ? env.IMAGE_SOURCES.split(",").map((s) => s.trim()) : [];
33
+ }
34
+ _chunk7QVYU63Ejs.__name.call(void 0, listImageSources, "listImageSources");
35
+ function buildCsp(options, env) {
36
+ const apiUrl = env.NEXT_PUBLIC_API_URL || "";
37
+ const imageSources = listImageSources(env);
38
+ const services = _nullishCoalesce(options.services, () => ( []));
39
+ const fetchDirectives = {
40
+ // Scripts: self, and unsafe-inline/eval for Next.js
41
+ "script-src": { base: ["'self'", "'unsafe-inline'", "'unsafe-eval'"], fromEnv: [] },
42
+ // Styles: self and unsafe-inline for styled-components/emotion
43
+ "style-src": { base: ["'self'", "'unsafe-inline'"], fromEnv: [] },
44
+ // Images: self, data URIs, blobs, and configured image sources
45
+ "img-src": { base: ["'self'", "data:", "blob:"], fromEnv: imageSources },
46
+ // Fonts: self
47
+ "font-src": { base: ["'self'"], fromEnv: [] },
48
+ // Connect: self, API (http + ws for socket.io), and storage (for uploads)
49
+ "connect-src": {
50
+ base: ["'self'"],
51
+ fromEnv: [
52
+ apiUrl,
53
+ // Add WebSocket URL for socket.io (convert http->ws, https->wss)
54
+ apiUrl.replace(/^http/, "ws"),
55
+ env.NEXT_PUBLIC_ADDRESS || "",
56
+ ...imageSources
57
+ ]
58
+ },
59
+ // Frames: self
60
+ "frame-src": { base: ["'self'"], fromEnv: [] },
61
+ // Worker sources: self and blob (for Web Workers with dynamic imports)
62
+ "worker-src": { base: ["'self'", "blob:"], fromEnv: [] }
63
+ };
64
+ const directive = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (name) => {
65
+ const { base, fromEnv } = fetchDirectives[name];
66
+ const fromServices = services.flatMap((service) => _nullishCoalesce(SERVICE_SOURCES[service][name], () => ( [])));
67
+ const sources = [...base, ...fromServices, ..._nullishCoalesce(_optionalChain([options, 'access', _ => _.csp, 'optionalAccess', _2 => _2[name]]), () => ( [])), ...fromEnv].filter(
68
+ (source) => source !== ""
69
+ );
70
+ return [name, ...new Set(sources)].join(" ");
71
+ }, "directive");
72
+ return [
73
+ "default-src 'self'",
74
+ directive("script-src"),
75
+ directive("style-src"),
76
+ directive("img-src"),
77
+ directive("font-src"),
78
+ directive("connect-src"),
79
+ directive("frame-src"),
80
+ // Frame ancestors: deny embedding (equivalent to X-Frame-Options: DENY)
81
+ "frame-ancestors 'none'",
82
+ // Form actions: only self
83
+ "form-action 'self'",
84
+ // Base URI: only self
85
+ "base-uri 'self'",
86
+ // Object sources: none (no plugins)
87
+ "object-src 'none'",
88
+ directive("worker-src"),
89
+ // Upgrade insecure requests in production.
90
+ //
91
+ // NOT under E2E_BUILD: the e2e harness runs a PRODUCTION build (for speed)
92
+ // and serves it over plain http on a custom hostname. With this directive
93
+ // the browser rewrites every /_next/static asset to https, which nothing is
94
+ // listening on — every chunk fails with ERR_SSL_PROTOCOL_ERROR, the page
95
+ // never hydrates, and each spec sees only server-rendered markup.
96
+ env.NODE_ENV === "production" && env.E2E_BUILD !== "true" ? "upgrade-insecure-requests" : ""
97
+ ].filter(Boolean).join("; ");
98
+ }
99
+ _chunk7QVYU63Ejs.__name.call(void 0, buildCsp, "buildCsp");
100
+
101
+ // src/next-config/headers.ts
102
+ function buildSecurityHeaders(options, env) {
103
+ const camera = _optionalChain([options, 'access', _3 => _3.permissionsPolicy, 'optionalAccess', _4 => _4.camera]) === "none" ? "" : "self";
104
+ return [
105
+ {
106
+ // Apply to all routes
107
+ source: "/:path*",
108
+ headers: [
109
+ // Content Security Policy - prevents XSS attacks
110
+ {
111
+ key: "Content-Security-Policy",
112
+ value: buildCsp(options, env)
113
+ },
114
+ // X-Frame-Options - prevents clickjacking (backup for older browsers)
115
+ {
116
+ key: "X-Frame-Options",
117
+ value: "DENY"
118
+ },
119
+ // X-Content-Type-Options - prevents MIME sniffing
120
+ {
121
+ key: "X-Content-Type-Options",
122
+ value: "nosniff"
123
+ },
124
+ // Strict-Transport-Security - enforces HTTPS (1 year, include subdomains).
125
+ // Omitted under E2E_BUILD for the same reason as upgrade-insecure-requests:
126
+ // the suite speaks plain http, and an HSTS pin would force https on every
127
+ // later request to this host from the same browser profile.
128
+ ...env.E2E_BUILD === "true" ? [] : [
129
+ {
130
+ key: "Strict-Transport-Security",
131
+ value: "max-age=31536000; includeSubDomains"
132
+ }
133
+ ],
134
+ // Referrer-Policy - controls referrer information
135
+ {
136
+ key: "Referrer-Policy",
137
+ value: "strict-origin-when-cross-origin"
138
+ },
139
+ // Permissions-Policy - restricts browser features
140
+ {
141
+ key: "Permissions-Policy",
142
+ value: `camera=(${camera}), microphone=(), geolocation=()`
143
+ }
144
+ ]
145
+ }
146
+ ];
147
+ }
148
+ _chunk7QVYU63Ejs.__name.call(void 0, buildSecurityHeaders, "buildSecurityHeaders");
149
+
150
+ // src/next-config/index.ts
151
+ function parseImageSources(env) {
152
+ return env.IMAGE_SOURCES ? env.IMAGE_SOURCES.split(",").map((url) => {
153
+ const { hostname, protocol, port } = new URL(url.trim());
154
+ return {
155
+ protocol: protocol.replace(":", ""),
156
+ hostname,
157
+ port: port || void 0
158
+ };
159
+ }) : [];
160
+ }
161
+ _chunk7QVYU63Ejs.__name.call(void 0, parseImageSources, "parseImageSources");
162
+ function createNextConfig(options) {
163
+ const env = process.env;
164
+ const reactCompiler = options.reactCompiler === true;
165
+ const config = {
166
+ // The e2e stack (scripts/e2e.sh) runs a PRODUCTION build of this app while a
167
+ // `next dev` server may still be running against the same worktree. `next
168
+ // build` and `next dev` share `.next`, so a build performed underneath a live
169
+ // dev server clobbers it and that dev server then 404s every route. Giving
170
+ // the e2e build its own directory keeps the two independent. E2E_BUILD must
171
+ // be set for `next build` AND for `next start`, or `start` looks in `.next`
172
+ // and serves someone else's output.
173
+ ...env.E2E_BUILD === "true" ? { distDir: ".next-e2e" } : {},
174
+ cacheComponents: true,
175
+ partialPrefetching: true,
176
+ reactCompiler,
177
+ experimental: {
178
+ serverActions: {
179
+ bodySizeLimit: "5mb"
180
+ },
181
+ // Required by `unauthorized()` (next/navigation), which ServerSession.checkPermission
182
+ // calls to deny access. Without this flag the function throws a plain Error instead of
183
+ // rendering the nearest unauthorized.tsx.
184
+ authInterrupts: _nullishCoalesce(options.authInterrupts, () => ( true)),
185
+ turbopackGc: true,
186
+ turbopackLazyDynamicImports: true,
187
+ ...reactCompiler ? { turbopackRustReactCompiler: true } : {}
188
+ },
189
+ allowedDevOrigins: options.devOrigins,
190
+ pageExtensions: options.mdx ? ["ts", "tsx", "mdx"] : ["ts", "tsx"],
191
+ images: {
192
+ minimumCacheTTL: _nullishCoalesce(options.imageMinimumCacheTTL, () => ( 60)),
193
+ remotePatterns: parseImageSources(env),
194
+ dangerouslyAllowLocalIP: true
195
+ },
196
+ poweredByHeader: false,
197
+ reactStrictMode: false,
198
+ env: {
199
+ NEXT_PUBLIC_API_URL: _nullishCoalesce(env.NEXT_PUBLIC_API_URL, () => ( "")),
200
+ NEXT_PUBLIC_ADDRESS: _nullishCoalesce(env.NEXT_PUBLIC_ADDRESS, () => ( "")),
201
+ NEXT_PUBLIC_VAPID_PUBLIC_KEY: _nullishCoalesce(env.NEXT_PUBLIC_VAPID_PUBLIC_KEY, () => ( "")),
202
+ NEXT_PUBLIC_GOOGLE_MAPS_API_KEY: _nullishCoalesce(env.NEXT_PUBLIC_GOOGLE_MAPS_API_KEY, () => ( "")),
203
+ ...options.env
204
+ },
205
+ // Inlined replacement for @serwist/turbopack's withSerwist wrapper, which
206
+ // does nothing but append these two entries. Requiring the package here
207
+ // instead CRASHES production: it is a devDependency, next.config.js is loaded
208
+ // at RUNTIME by `next start`, and the web-production image installs with
209
+ // --prod. Do not re-add a require of any devDependency to this file.
210
+ ...options.serwist ? { serverExternalPackages: ["esbuild", "esbuild-wasm"] } : {},
211
+ // Next 16 builds AND serves dev with Turbopack, so this is what pins yjs to a
212
+ // single instance in both modes.
213
+ turbopack: {
214
+ resolveAlias: {
215
+ yjs: "./node_modules/yjs"
216
+ }
217
+ }
218
+ };
219
+ if (options.securityHeaders !== false) {
220
+ config.headers = async () => buildSecurityHeaders(options, process.env);
221
+ }
222
+ if (options.rewrites) config.rewrites = options.rewrites;
223
+ return options.extend ? options.extend(config) : config;
224
+ }
225
+ _chunk7QVYU63Ejs.__name.call(void 0, createNextConfig, "createNextConfig");
226
+
227
+
228
+
229
+ exports.buildCsp = buildCsp; exports.createNextConfig = createNextConfig;
230
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["/home/runner/work/nextjs-jsonapi/nextjs-jsonapi/dist/next-config/index.js","../../src/next-config/csp.ts","../../src/next-config/headers.ts","../../src/next-config/index.ts"],"names":[],"mappings":"AAAA;AACE;AACF,uDAA6B;AAC7B;AACA;ACoBA,IAAM,gBAAA,EAA+E;AAAA,EACnF,MAAA,EAAQ;AAAA,IACN,YAAA,EAAc,CAAC,uBAAuB,CAAA;AAAA,IACtC,SAAA,EAAW,CAAC,sBAAsB,CAAA;AAAA,IAClC,aAAA,EAAe,CAAC,wBAAwB,CAAA;AAAA,IACxC,WAAA,EAAa,CAAC,uBAAA,EAAyB,0BAA0B;AAAA,EACnE,CAAA;AAAA,EACA,UAAA,EAAY;AAAA,IACV,YAAA,EAAc,CAAC,6BAA6B,CAAA;AAAA,IAC5C,SAAA,EAAW,CAAC,6BAAA,EAA+B,0BAA0B,CAAA;AAAA,IACrE,aAAA,EAAe,CAAC,6BAAA,EAA+B,+BAA+B;AAAA,EAChF,CAAA;AAAA,EACA,SAAA,EAAW;AAAA,IACT,YAAA,EAAc,CAAC,mCAAmC,CAAA;AAAA,IAClD,aAAA,EAAe,CAAC,mCAAmC,CAAA;AAAA,IACnD,WAAA,EAAa,CAAC,mCAAmC;AAAA,EACnD,CAAA;AAAA,EACA,OAAA,EAAS;AAAA,IACP,SAAA,EAAW,CAAC,4BAA4B;AAAA,EAC1C,CAAA;AAAA,EACA,WAAA,EAAa;AAAA,IACX,WAAA,EAAa,CAAC,8BAA8B,CAAA;AAAA,IAC5C,UAAA,EAAY,CAAC,2BAA2B;AAAA,EAC1C;AACF,CAAA;AAEA,SAAS,gBAAA,CAAiB,GAAA,EAAkC;AAC1D,EAAA,OAAO,GAAA,CAAI,cAAA,EAAgB,GAAA,CAAI,aAAA,CAAc,KAAA,CAAM,GAAG,CAAA,CAAE,GAAA,CAAI,CAAC,CAAA,EAAA,GAAM,CAAA,CAAE,IAAA,CAAK,CAAC,EAAA,EAAI,CAAC,CAAA;AAClF;AAFS,qCAAA,gBAAA,EAAA,kBAAA,CAAA;AAOF,SAAS,QAAA,CAAS,OAAA,EAAqB,GAAA,EAAgC;AAC5E,EAAA,MAAM,OAAA,EAAS,GAAA,CAAI,oBAAA,GAAuB,EAAA;AAC1C,EAAA,MAAM,aAAA,EAAe,gBAAA,CAAiB,GAAG,CAAA;AACzC,EAAA,MAAM,SAAA,mBAAW,OAAA,CAAQ,QAAA,UAAY,CAAC,GAAA;AAItC,EAAA,MAAM,gBAAA,EAA+E;AAAA;AAAA,IAEnF,YAAA,EAAc,EAAE,IAAA,EAAM,CAAC,QAAA,EAAU,iBAAA,EAAmB,eAAe,CAAA,EAAG,OAAA,EAAS,CAAC,EAAE,CAAA;AAAA;AAAA,IAElF,WAAA,EAAa,EAAE,IAAA,EAAM,CAAC,QAAA,EAAU,iBAAiB,CAAA,EAAG,OAAA,EAAS,CAAC,EAAE,CAAA;AAAA;AAAA,IAEhE,SAAA,EAAW,EAAE,IAAA,EAAM,CAAC,QAAA,EAAU,OAAA,EAAS,OAAO,CAAA,EAAG,OAAA,EAAS,aAAa,CAAA;AAAA;AAAA,IAEvE,UAAA,EAAY,EAAE,IAAA,EAAM,CAAC,QAAQ,CAAA,EAAG,OAAA,EAAS,CAAC,EAAE,CAAA;AAAA;AAAA,IAE5C,aAAA,EAAe;AAAA,MACb,IAAA,EAAM,CAAC,QAAQ,CAAA;AAAA,MACf,OAAA,EAAS;AAAA,QACP,MAAA;AAAA;AAAA,QAEA,MAAA,CAAO,OAAA,CAAQ,OAAA,EAAS,IAAI,CAAA;AAAA,QAC5B,GAAA,CAAI,oBAAA,GAAuB,EAAA;AAAA,QAC3B,GAAG;AAAA,MACL;AAAA,IACF,CAAA;AAAA;AAAA,IAEA,WAAA,EAAa,EAAE,IAAA,EAAM,CAAC,QAAQ,CAAA,EAAG,OAAA,EAAS,CAAC,EAAE,CAAA;AAAA;AAAA,IAE7C,YAAA,EAAc,EAAE,IAAA,EAAM,CAAC,QAAA,EAAU,OAAO,CAAA,EAAG,OAAA,EAAS,CAAC,EAAE;AAAA,EACzD,CAAA;AAEA,EAAA,MAAM,UAAA,kBAAY,qCAAA,CAAC,IAAA,EAAA,GAA+B;AAChD,IAAA,MAAM,EAAE,IAAA,EAAM,QAAQ,EAAA,EAAI,eAAA,CAAgB,IAAI,CAAA;AAC9C,IAAA,MAAM,aAAA,EAAe,QAAA,CAAS,OAAA,CAAQ,CAAC,OAAA,EAAA,oBAAY,eAAA,CAAgB,OAAO,CAAA,CAAE,IAAI,CAAA,UAAK,CAAC,GAAC,CAAA;AACvF,IAAA,MAAM,QAAA,EAAU,CAAC,GAAG,IAAA,EAAM,GAAG,YAAA,EAAc,oCAAI,OAAA,mBAAQ,GAAA,4BAAA,CAAM,IAAI,GAAA,UAAK,CAAC,GAAA,EAAI,GAAG,OAAO,CAAA,CAAE,MAAA;AAAA,MACrF,CAAC,MAAA,EAAA,GAAW,OAAA,IAAW;AAAA,IACzB,CAAA;AACA,IAAA,OAAO,CAAC,IAAA,EAAM,GAAG,IAAI,GAAA,CAAI,OAAO,CAAC,CAAA,CAAE,IAAA,CAAK,GAAG,CAAA;AAAA,EAC7C,CAAA,EAPkB,WAAA,CAAA;AASlB,EAAA,OAAO;AAAA,IACL,oBAAA;AAAA,IACA,SAAA,CAAU,YAAY,CAAA;AAAA,IACtB,SAAA,CAAU,WAAW,CAAA;AAAA,IACrB,SAAA,CAAU,SAAS,CAAA;AAAA,IACnB,SAAA,CAAU,UAAU,CAAA;AAAA,IACpB,SAAA,CAAU,aAAa,CAAA;AAAA,IACvB,SAAA,CAAU,WAAW,CAAA;AAAA;AAAA,IAErB,wBAAA;AAAA;AAAA,IAEA,oBAAA;AAAA;AAAA,IAEA,iBAAA;AAAA;AAAA,IAEA,mBAAA;AAAA,IACA,SAAA,CAAU,YAAY,CAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAQtB,GAAA,CAAI,SAAA,IAAa,aAAA,GAAgB,GAAA,CAAI,UAAA,IAAc,OAAA,EAAS,4BAAA,EAA8B;AAAA,EAC5F,CAAA,CACG,MAAA,CAAO,OAAO,CAAA,CACd,IAAA,CAAK,IAAI,CAAA;AACd;AAtEgB,qCAAA,QAAA,EAAA,UAAA,CAAA;AD0ChB;AACA;AExFO,SAAS,oBAAA,CAAqB,OAAA,EAAgC,GAAA,EAAsC;AACzG,EAAA,MAAM,OAAA,kBAAS,OAAA,qBAAQ,iBAAA,6BAAmB,SAAA,IAAW,OAAA,EAAS,GAAA,EAAK,MAAA;AAEnE,EAAA,OAAO;AAAA,IACL;AAAA;AAAA,MAEE,MAAA,EAAQ,SAAA;AAAA,MACR,OAAA,EAAS;AAAA;AAAA,QAEP;AAAA,UACE,GAAA,EAAK,yBAAA;AAAA,UACL,KAAA,EAAO,QAAA,CAAS,OAAA,EAAS,GAAG;AAAA,QAC9B,CAAA;AAAA;AAAA,QAEA;AAAA,UACE,GAAA,EAAK,iBAAA;AAAA,UACL,KAAA,EAAO;AAAA,QACT,CAAA;AAAA;AAAA,QAEA;AAAA,UACE,GAAA,EAAK,wBAAA;AAAA,UACL,KAAA,EAAO;AAAA,QACT,CAAA;AAAA;AAAA;AAAA;AAAA;AAAA,QAKA,GAAI,GAAA,CAAI,UAAA,IAAc,OAAA,EAClB,CAAC,EAAA,EACD;AAAA,UACE;AAAA,YACE,GAAA,EAAK,2BAAA;AAAA,YACL,KAAA,EAAO;AAAA,UACT;AAAA,QACF,CAAA;AAAA;AAAA,QAEJ;AAAA,UACE,GAAA,EAAK,iBAAA;AAAA,UACL,KAAA,EAAO;AAAA,QACT,CAAA;AAAA;AAAA,QAEA;AAAA,UACE,GAAA,EAAK,oBAAA;AAAA,UACL,KAAA,EAAO,CAAA,QAAA,EAAW,MAAM,CAAA,gCAAA;AAAA,QAC1B;AAAA,MACF;AAAA,IACF;AAAA,EACF,CAAA;AACF;AAhDgB,qCAAA,oBAAA,EAAA,sBAAA,CAAA;AFwIhB;AACA;AGnHA,SAAS,iBAAA,CAAkB,GAAA,EAAyC;AAClE,EAAA,OAAO,GAAA,CAAI,cAAA,EACP,GAAA,CAAI,aAAA,CAAc,KAAA,CAAM,GAAG,CAAA,CAAE,GAAA,CAAI,CAAC,GAAA,EAAA,GAAQ;AACxC,IAAA,MAAM,EAAE,QAAA,EAAU,QAAA,EAAU,KAAK,EAAA,EAAI,IAAI,GAAA,CAAI,GAAA,CAAI,IAAA,CAAK,CAAC,CAAA;AACvD,IAAA,OAAO;AAAA,MACL,QAAA,EAAU,QAAA,CAAS,OAAA,CAAQ,GAAA,EAAK,EAAE,CAAA;AAAA,MAClC,QAAA;AAAA,MACA,IAAA,EAAM,KAAA,GAAQ,KAAA;AAAA,IAChB,CAAA;AAAA,EACF,CAAC,EAAA,EACD,CAAC,CAAA;AACP;AAXS,qCAAA,iBAAA,EAAA,mBAAA,CAAA;AAaF,SAAS,gBAAA,CAAiB,OAAA,EAA2C;AAC1E,EAAA,MAAM,IAAA,EAAM,OAAA,CAAQ,GAAA;AACpB,EAAA,MAAM,cAAA,EAAgB,OAAA,CAAQ,cAAA,IAAkB,IAAA;AAEhD,EAAA,MAAM,OAAA,EAAqB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAQzB,GAAI,GAAA,CAAI,UAAA,IAAc,OAAA,EAAS,EAAE,OAAA,EAAS,YAAY,EAAA,EAAI,CAAC,CAAA;AAAA,IAC3D,eAAA,EAAiB,IAAA;AAAA,IACjB,kBAAA,EAAoB,IAAA;AAAA,IACpB,aAAA;AAAA,IACA,YAAA,EAAc;AAAA,MACZ,aAAA,EAAe;AAAA,QACb,aAAA,EAAe;AAAA,MACjB,CAAA;AAAA;AAAA;AAAA;AAAA,MAIA,cAAA,mBAAgB,OAAA,CAAQ,cAAA,UAAkB,MAAA;AAAA,MAC1C,WAAA,EAAa,IAAA;AAAA,MACb,2BAAA,EAA6B,IAAA;AAAA,MAC7B,GAAI,cAAA,EAAgB,EAAE,0BAAA,EAA4B,KAAK,EAAA,EAAI,CAAC;AAAA,IAC9D,CAAA;AAAA,IACA,iBAAA,EAAmB,OAAA,CAAQ,UAAA;AAAA,IAC3B,cAAA,EAAgB,OAAA,CAAQ,IAAA,EAAM,CAAC,IAAA,EAAM,KAAA,EAAO,KAAK,EAAA,EAAI,CAAC,IAAA,EAAM,KAAK,CAAA;AAAA,IACjE,MAAA,EAAQ;AAAA,MACN,eAAA,mBAAiB,OAAA,CAAQ,oBAAA,UAAwB,IAAA;AAAA,MACjD,cAAA,EAAgB,iBAAA,CAAkB,GAAG,CAAA;AAAA,MACrC,uBAAA,EAAyB;AAAA,IAC3B,CAAA;AAAA,IACA,eAAA,EAAiB,KAAA;AAAA,IACjB,eAAA,EAAiB,KAAA;AAAA,IACjB,GAAA,EAAK;AAAA,MACH,mBAAA,mBAAqB,GAAA,CAAI,mBAAA,UAAuB,IAAA;AAAA,MAChD,mBAAA,mBAAqB,GAAA,CAAI,mBAAA,UAAuB,IAAA;AAAA,MAChD,4BAAA,mBAA8B,GAAA,CAAI,4BAAA,UAAgC,IAAA;AAAA,MAClE,+BAAA,mBAAiC,GAAA,CAAI,+BAAA,UAAmC,IAAA;AAAA,MACxE,GAAG,OAAA,CAAQ;AAAA,IACb,CAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAMA,GAAI,OAAA,CAAQ,QAAA,EAAU,EAAE,sBAAA,EAAwB,CAAC,SAAA,EAAW,cAAc,EAAE,EAAA,EAAI,CAAC,CAAA;AAAA;AAAA;AAAA,IAGjF,SAAA,EAAW;AAAA,MACT,YAAA,EAAc;AAAA,QACZ,GAAA,EAAK;AAAA,MACP;AAAA,IACF;AAAA,EACF,CAAA;AAEA,EAAA,GAAA,CAAI,OAAA,CAAQ,gBAAA,IAAoB,KAAA,EAAO;AACrC,IAAA,MAAA,CAAO,QAAA,EAAU,MAAA,CAAA,EAAA,GAAY,oBAAA,CAAqB,OAAA,EAAS,OAAA,CAAQ,GAAG,CAAA;AAAA,EACxE;AAEA,EAAA,GAAA,CAAI,OAAA,CAAQ,QAAA,EAAU,MAAA,CAAO,SAAA,EAAW,OAAA,CAAQ,QAAA;AAEhD,EAAA,OAAO,OAAA,CAAQ,OAAA,EAAS,OAAA,CAAQ,MAAA,CAAO,MAAM,EAAA,EAAI,MAAA;AACnD;AAlEgB,qCAAA,gBAAA,EAAA,kBAAA,CAAA;AHkLhB;AACE;AACA;AACF,yEAAC","file":"/home/runner/work/nextjs-jsonapi/nextjs-jsonapi/dist/next-config/index.js","sourcesContent":[null,"// Runtime imports: none. next.config.js loads this at RUNTIME under `next start`\n// in an image installed with --prod, so it may import only Node built-ins.\n\nexport type CspDirective =\n \"script-src\" | \"style-src\" | \"img-src\" | \"font-src\" | \"connect-src\" | \"frame-src\" | \"worker-src\";\n\n/**\n * Third-party services an app may load. Each one adds its hosts to the\n * directives it needs; nothing is allowed unless the app names it.\n *\n * - `stripe`: the billing feature (`@carlonicora/nextjs-jsonapi/billing`).\n * - `googleMaps`: `FormPlaceAutocomplete` (Places API) and Maps JS/static tiles.\n * - `turnstile`: Cloudflare Turnstile widgets (contact and waitlist forms).\n * - `discord`: Discord avatars shown for users who log in with Discord.\n * - `googleFonts`: fonts linked at runtime from Google Fonts. Not needed for\n * `next/font/google`, which self-hosts at build time.\n */\nexport type CspService = \"stripe\" | \"googleMaps\" | \"turnstile\" | \"discord\" | \"googleFonts\";\n\nexport interface CspOptions {\n services?: CspService[];\n csp?: Partial<Record<CspDirective, string[]>>;\n}\n\nconst SERVICE_SOURCES: Record<CspService, Partial<Record<CspDirective, string[]>>> = {\n stripe: {\n \"script-src\": [\"https://js.stripe.com\"],\n \"img-src\": [\"https://*.stripe.com\"],\n \"connect-src\": [\"https://api.stripe.com\"],\n \"frame-src\": [\"https://js.stripe.com\", \"https://hooks.stripe.com\"],\n },\n googleMaps: {\n \"script-src\": [\"https://maps.googleapis.com\"],\n \"img-src\": [\"https://maps.googleapis.com\", \"https://maps.gstatic.com\"],\n \"connect-src\": [\"https://maps.googleapis.com\", \"https://places.googleapis.com\"],\n },\n turnstile: {\n \"script-src\": [\"https://challenges.cloudflare.com\"],\n \"connect-src\": [\"https://challenges.cloudflare.com\"],\n \"frame-src\": [\"https://challenges.cloudflare.com\"],\n },\n discord: {\n \"img-src\": [\"https://cdn.discordapp.com\"],\n },\n googleFonts: {\n \"style-src\": [\"https://fonts.googleapis.com\"],\n \"font-src\": [\"https://fonts.gstatic.com\"],\n },\n};\n\nfunction listImageSources(env: NodeJS.ProcessEnv): string[] {\n return env.IMAGE_SOURCES ? env.IMAGE_SOURCES.split(\",\").map((s) => s.trim()) : [];\n}\n\n// Build CSP directives\n// Note: 'unsafe-inline' and 'unsafe-eval' needed for Next.js dev mode and some runtime features\n// In production, consider using nonces for stricter CSP\nexport function buildCsp(options: CspOptions, env: NodeJS.ProcessEnv): string {\n const apiUrl = env.NEXT_PUBLIC_API_URL || \"\";\n const imageSources = listImageSources(env);\n const services = options.services ?? [];\n\n // Each fetch directive: what Next itself needs, then the named services, then\n // the app's extras, then the sources derived from the env.\n const fetchDirectives: Record<CspDirective, { base: string[]; fromEnv: string[] }> = {\n // Scripts: self, and unsafe-inline/eval for Next.js\n \"script-src\": { base: [\"'self'\", \"'unsafe-inline'\", \"'unsafe-eval'\"], fromEnv: [] },\n // Styles: self and unsafe-inline for styled-components/emotion\n \"style-src\": { base: [\"'self'\", \"'unsafe-inline'\"], fromEnv: [] },\n // Images: self, data URIs, blobs, and configured image sources\n \"img-src\": { base: [\"'self'\", \"data:\", \"blob:\"], fromEnv: imageSources },\n // Fonts: self\n \"font-src\": { base: [\"'self'\"], fromEnv: [] },\n // Connect: self, API (http + ws for socket.io), and storage (for uploads)\n \"connect-src\": {\n base: [\"'self'\"],\n fromEnv: [\n apiUrl,\n // Add WebSocket URL for socket.io (convert http->ws, https->wss)\n apiUrl.replace(/^http/, \"ws\"),\n env.NEXT_PUBLIC_ADDRESS || \"\",\n ...imageSources,\n ],\n },\n // Frames: self\n \"frame-src\": { base: [\"'self'\"], fromEnv: [] },\n // Worker sources: self and blob (for Web Workers with dynamic imports)\n \"worker-src\": { base: [\"'self'\", \"blob:\"], fromEnv: [] },\n };\n\n const directive = (name: CspDirective): string => {\n const { base, fromEnv } = fetchDirectives[name];\n const fromServices = services.flatMap((service) => SERVICE_SOURCES[service][name] ?? []);\n const sources = [...base, ...fromServices, ...(options.csp?.[name] ?? []), ...fromEnv].filter(\n (source) => source !== \"\",\n );\n return [name, ...new Set(sources)].join(\" \");\n };\n\n return [\n \"default-src 'self'\",\n directive(\"script-src\"),\n directive(\"style-src\"),\n directive(\"img-src\"),\n directive(\"font-src\"),\n directive(\"connect-src\"),\n directive(\"frame-src\"),\n // Frame ancestors: deny embedding (equivalent to X-Frame-Options: DENY)\n \"frame-ancestors 'none'\",\n // Form actions: only self\n \"form-action 'self'\",\n // Base URI: only self\n \"base-uri 'self'\",\n // Object sources: none (no plugins)\n \"object-src 'none'\",\n directive(\"worker-src\"),\n // Upgrade insecure requests in production.\n //\n // NOT under E2E_BUILD: the e2e harness runs a PRODUCTION build (for speed)\n // and serves it over plain http on a custom hostname. With this directive\n // the browser rewrites every /_next/static asset to https, which nothing is\n // listening on — every chunk fails with ERR_SSL_PROTOCOL_ERROR, the page\n // never hydrates, and each spec sees only server-rendered markup.\n env.NODE_ENV === \"production\" && env.E2E_BUILD !== \"true\" ? \"upgrade-insecure-requests\" : \"\",\n ]\n .filter(Boolean)\n .join(\"; \");\n}\n","// Runtime imports: relative only. See csp.ts.\nimport { buildCsp, type CspOptions } from \"./csp\";\n\nexport interface SecurityHeaderOptions extends CspOptions {\n permissionsPolicy?: { camera?: \"none\" | \"self\" };\n}\n\nexport interface HeaderRule {\n source: string;\n headers: { key: string; value: string }[];\n}\n\nexport function buildSecurityHeaders(options: SecurityHeaderOptions, env: NodeJS.ProcessEnv): HeaderRule[] {\n const camera = options.permissionsPolicy?.camera === \"none\" ? \"\" : \"self\";\n\n return [\n {\n // Apply to all routes\n source: \"/:path*\",\n headers: [\n // Content Security Policy - prevents XSS attacks\n {\n key: \"Content-Security-Policy\",\n value: buildCsp(options, env),\n },\n // X-Frame-Options - prevents clickjacking (backup for older browsers)\n {\n key: \"X-Frame-Options\",\n value: \"DENY\",\n },\n // X-Content-Type-Options - prevents MIME sniffing\n {\n key: \"X-Content-Type-Options\",\n value: \"nosniff\",\n },\n // Strict-Transport-Security - enforces HTTPS (1 year, include subdomains).\n // Omitted under E2E_BUILD for the same reason as upgrade-insecure-requests:\n // the suite speaks plain http, and an HSTS pin would force https on every\n // later request to this host from the same browser profile.\n ...(env.E2E_BUILD === \"true\"\n ? []\n : [\n {\n key: \"Strict-Transport-Security\",\n value: \"max-age=31536000; includeSubDomains\",\n },\n ]),\n // Referrer-Policy - controls referrer information\n {\n key: \"Referrer-Policy\",\n value: \"strict-origin-when-cross-origin\",\n },\n // Permissions-Policy - restricts browser features\n {\n key: \"Permissions-Policy\",\n value: `camera=(${camera}), microphone=(), geolocation=()`,\n },\n ],\n },\n ];\n}\n","// Shared next.config for the nja fleet. Apps wrap the result with their own\n// plugins: `withNextIntl(withMDX(createNextConfig({...})))`.\n//\n// next.config.js is loaded at RUNTIME by `next start`, and the production image\n// installs with --prod. This entry may therefore import only Node built-ins at\n// runtime: never next-intl, @next/mdx, serwist or any devDependency. `next` is\n// imported for its types only.\nimport type { NextConfig } from \"next\";\nimport { buildCsp, type CspDirective, type CspService } from \"./csp\";\nimport { buildSecurityHeaders } from \"./headers\";\n\nexport { buildCsp };\nexport type { CspDirective, CspService };\n\nexport interface NjaNextConfigOptions {\n devOrigins: string[];\n /** Third-party services the app loads; each adds its own hosts to the CSP. Nothing is allowed by default. */\n services?: CspService[];\n /** Extra CSP sources per directive, for hosts no named service covers. */\n csp?: Partial<Record<CspDirective, string[]>>;\n env?: Record<string, string>;\n imageMinimumCacheTTL?: number;\n permissionsPolicy?: { camera?: \"none\" | \"self\" };\n mdx?: boolean;\n serwist?: boolean;\n securityHeaders?: boolean;\n authInterrupts?: boolean;\n reactCompiler?: boolean;\n rewrites?: NextConfig[\"rewrites\"];\n extend?: (config: NextConfig) => NextConfig;\n}\n\ntype RemotePattern = { protocol: \"http\" | \"https\"; hostname: string; port?: string };\n\nfunction parseImageSources(env: NodeJS.ProcessEnv): RemotePattern[] {\n return env.IMAGE_SOURCES\n ? env.IMAGE_SOURCES.split(\",\").map((url) => {\n const { hostname, protocol, port } = new URL(url.trim());\n return {\n protocol: protocol.replace(\":\", \"\") as RemotePattern[\"protocol\"],\n hostname,\n port: port || undefined,\n };\n })\n : [];\n}\n\nexport function createNextConfig(options: NjaNextConfigOptions): NextConfig {\n const env = process.env;\n const reactCompiler = options.reactCompiler === true;\n\n const config: NextConfig = {\n // The e2e stack (scripts/e2e.sh) runs a PRODUCTION build of this app while a\n // `next dev` server may still be running against the same worktree. `next\n // build` and `next dev` share `.next`, so a build performed underneath a live\n // dev server clobbers it and that dev server then 404s every route. Giving\n // the e2e build its own directory keeps the two independent. E2E_BUILD must\n // be set for `next build` AND for `next start`, or `start` looks in `.next`\n // and serves someone else's output.\n ...(env.E2E_BUILD === \"true\" ? { distDir: \".next-e2e\" } : {}),\n cacheComponents: true,\n partialPrefetching: true,\n reactCompiler,\n experimental: {\n serverActions: {\n bodySizeLimit: \"5mb\",\n },\n // Required by `unauthorized()` (next/navigation), which ServerSession.checkPermission\n // calls to deny access. Without this flag the function throws a plain Error instead of\n // rendering the nearest unauthorized.tsx.\n authInterrupts: options.authInterrupts ?? true,\n turbopackGc: true,\n turbopackLazyDynamicImports: true,\n ...(reactCompiler ? { turbopackRustReactCompiler: true } : {}),\n },\n allowedDevOrigins: options.devOrigins,\n pageExtensions: options.mdx ? [\"ts\", \"tsx\", \"mdx\"] : [\"ts\", \"tsx\"],\n images: {\n minimumCacheTTL: options.imageMinimumCacheTTL ?? 60,\n remotePatterns: parseImageSources(env),\n dangerouslyAllowLocalIP: true,\n },\n poweredByHeader: false,\n reactStrictMode: false,\n env: {\n NEXT_PUBLIC_API_URL: env.NEXT_PUBLIC_API_URL ?? \"\",\n NEXT_PUBLIC_ADDRESS: env.NEXT_PUBLIC_ADDRESS ?? \"\",\n NEXT_PUBLIC_VAPID_PUBLIC_KEY: env.NEXT_PUBLIC_VAPID_PUBLIC_KEY ?? \"\",\n NEXT_PUBLIC_GOOGLE_MAPS_API_KEY: env.NEXT_PUBLIC_GOOGLE_MAPS_API_KEY ?? \"\",\n ...options.env,\n },\n // Inlined replacement for @serwist/turbopack's withSerwist wrapper, which\n // does nothing but append these two entries. Requiring the package here\n // instead CRASHES production: it is a devDependency, next.config.js is loaded\n // at RUNTIME by `next start`, and the web-production image installs with\n // --prod. Do not re-add a require of any devDependency to this file.\n ...(options.serwist ? { serverExternalPackages: [\"esbuild\", \"esbuild-wasm\"] } : {}),\n // Next 16 builds AND serves dev with Turbopack, so this is what pins yjs to a\n // single instance in both modes.\n turbopack: {\n resolveAlias: {\n yjs: \"./node_modules/yjs\",\n },\n },\n };\n\n if (options.securityHeaders !== false) {\n config.headers = async () => buildSecurityHeaders(options, process.env);\n }\n\n if (options.rewrites) config.rewrites = options.rewrites;\n\n return options.extend ? options.extend(config) : config;\n}\n"]}