@carlonicora/nextjs-jsonapi 6.24.0 → 6.26.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 (250) hide show
  1. package/dist/{BlockNoteEditor-MONT74RQ.js → BlockNoteEditor-JHXDOCS5.js} +28 -25
  2. package/dist/BlockNoteEditor-JHXDOCS5.js.map +1 -0
  3. package/dist/{BlockNoteEditor-ENDOVTAW.mjs → BlockNoteEditor-RVDSB6TF.mjs} +13 -10
  4. package/dist/{BlockNoteEditor-ENDOVTAW.mjs.map → BlockNoteEditor-RVDSB6TF.mjs.map} +1 -1
  5. package/dist/{BlockNoteViewer-2TJZ6JET.mjs → BlockNoteViewer-76CKL6W5.mjs} +8 -6
  6. package/dist/{BlockNoteViewer-2TJZ6JET.mjs.map → BlockNoteViewer-76CKL6W5.mjs.map} +1 -1
  7. package/dist/{BlockNoteViewer-K2HBF3IP.js → BlockNoteViewer-B25WKYQP.js} +9 -7
  8. package/dist/BlockNoteViewer-B25WKYQP.js.map +1 -0
  9. package/dist/JsonApiRequest-OKNQZLS6.js +26 -0
  10. package/dist/{JsonApiRequest-KC6DOHKT.js.map → JsonApiRequest-OKNQZLS6.js.map} +1 -1
  11. package/dist/{JsonApiRequest-ADLBJ5RX.mjs → JsonApiRequest-WNPDS356.mjs} +2 -2
  12. package/dist/billing/index.js +504 -517
  13. package/dist/billing/index.js.map +1 -1
  14. package/dist/billing/index.mjs +20 -33
  15. package/dist/billing/index.mjs.map +1 -1
  16. package/dist/{chunk-VNUT2D27.mjs → chunk-2PWYG2WJ.mjs} +2 -2
  17. package/dist/{chunk-W4ML6D2X.mjs → chunk-3U7YJ73T.mjs} +7 -7
  18. package/dist/{chunk-BQ2WAG4K.js → chunk-3VNDFKT7.js} +19 -19
  19. package/dist/{chunk-BQ2WAG4K.js.map → chunk-3VNDFKT7.js.map} +1 -1
  20. package/dist/{chunk-BE6UMM5X.mjs → chunk-47HNJQ7U.mjs} +3 -3
  21. package/dist/chunk-5T2AQMQ2.mjs +90 -0
  22. package/dist/chunk-5T2AQMQ2.mjs.map +1 -0
  23. package/dist/{chunk-A5M3MORY.js → chunk-5WM72MLE.js} +3 -3
  24. package/dist/{chunk-A5M3MORY.js.map → chunk-5WM72MLE.js.map} +1 -1
  25. package/dist/{chunk-OZADFYE7.mjs → chunk-64REWDSK.mjs} +308 -241
  26. package/dist/chunk-64REWDSK.mjs.map +1 -0
  27. package/dist/{chunk-S7SPAC6X.mjs → chunk-73NKUBMP.mjs} +3 -3
  28. package/dist/chunk-743M4TIB.mjs +76 -0
  29. package/dist/chunk-743M4TIB.mjs.map +1 -0
  30. package/dist/{chunk-HN7L6RRW.js → chunk-77JC2UCF.js} +903 -955
  31. package/dist/chunk-77JC2UCF.js.map +1 -0
  32. package/dist/{chunk-7OIWOPM5.mjs → chunk-7MGXQIEP.mjs} +4 -3
  33. package/dist/chunk-7MGXQIEP.mjs.map +1 -0
  34. package/dist/{chunk-YTDGYI62.mjs → chunk-DWPHHUMV.mjs} +3 -3
  35. package/dist/{chunk-SO3YUCL6.js → chunk-F3EVYBMA.js} +6 -5
  36. package/dist/chunk-F3EVYBMA.js.map +1 -0
  37. package/dist/{chunk-53SD4YRF.js → chunk-FBHUUPRV.js} +5 -5
  38. package/dist/{chunk-53SD4YRF.js.map → chunk-FBHUUPRV.js.map} +1 -1
  39. package/dist/{chunk-T6G2F2BK.mjs → chunk-FJUKLVVX.mjs} +16 -68
  40. package/dist/chunk-FJUKLVVX.mjs.map +1 -0
  41. package/dist/chunk-HROKKUBQ.js +156 -0
  42. package/dist/chunk-HROKKUBQ.js.map +1 -0
  43. package/dist/{chunk-BDWV4KYR.js → chunk-JE6QWCNE.js} +1386 -1319
  44. package/dist/chunk-JE6QWCNE.js.map +1 -0
  45. package/dist/{chunk-RCOKQ3R4.js → chunk-LNO2JLU3.js} +2 -2
  46. package/dist/{chunk-RCOKQ3R4.js.map → chunk-LNO2JLU3.js.map} +1 -1
  47. package/dist/{chunk-TMV7TL7O.mjs → chunk-M7YK5CCE.mjs} +8 -6
  48. package/dist/{chunk-TMV7TL7O.mjs.map → chunk-M7YK5CCE.mjs.map} +1 -1
  49. package/dist/{chunk-GMMDXINC.js → chunk-N3NQS7X6.js} +12 -12
  50. package/dist/{chunk-GMMDXINC.js.map → chunk-N3NQS7X6.js.map} +1 -1
  51. package/dist/chunk-NP3AFULU.js +76 -0
  52. package/dist/chunk-NP3AFULU.js.map +1 -0
  53. package/dist/{chunk-TNTCLVUR.js → chunk-ONU4WCDG.js} +17 -15
  54. package/dist/chunk-ONU4WCDG.js.map +1 -0
  55. package/dist/{chunk-YSE2Z4RB.js → chunk-PQQFOONG.js} +12 -12
  56. package/dist/{chunk-YSE2Z4RB.js.map → chunk-PQQFOONG.js.map} +1 -1
  57. package/dist/chunk-RW6XZGZG.mjs +156 -0
  58. package/dist/chunk-RW6XZGZG.mjs.map +1 -0
  59. package/dist/chunk-SYMI4IDW.js +90 -0
  60. package/dist/chunk-SYMI4IDW.js.map +1 -0
  61. package/dist/{chunk-N2BFT7KI.mjs → chunk-W7U6O3OE.mjs} +2 -71
  62. package/dist/chunk-W7U6O3OE.mjs.map +1 -0
  63. package/dist/{chunk-YMCL3JXZ.mjs → chunk-YPBIPE2B.mjs} +2 -2
  64. package/dist/{chunk-P7L6OFX5.js → chunk-Z6T2575A.js} +12 -81
  65. package/dist/chunk-Z6T2575A.js.map +1 -0
  66. package/dist/client/index.js +13 -10
  67. package/dist/client/index.js.map +1 -1
  68. package/dist/client/index.mjs +17 -14
  69. package/dist/components/forms/DatePickerPopover.d.ts.map +1 -1
  70. package/dist/components/forms/DateRangeSelector.d.ts.map +1 -1
  71. package/dist/components/forms/FormDate.d.ts.map +1 -1
  72. package/dist/components/forms/FormDateTime.d.ts.map +1 -1
  73. package/dist/components/forms/time-cycle.d.ts +14 -0
  74. package/dist/components/forms/time-cycle.d.ts.map +1 -0
  75. package/dist/components/index.js +11 -8
  76. package/dist/components/index.js.map +1 -1
  77. package/dist/components/index.mjs +10 -7
  78. package/dist/components/tables/cells/cell.date.d.ts.map +1 -1
  79. package/dist/components/tables/cells/cell.dateTime.d.ts.map +1 -1
  80. package/dist/contexts/DateLocaleContext.d.ts +56 -0
  81. package/dist/contexts/DateLocaleContext.d.ts.map +1 -0
  82. package/dist/contexts/index.d.ts +1 -0
  83. package/dist/contexts/index.d.ts.map +1 -1
  84. package/dist/contexts/index.js +24 -8
  85. package/dist/contexts/index.js.map +1 -1
  86. package/dist/contexts/index.mjs +23 -7
  87. package/dist/core/index.js +17 -6
  88. package/dist/core/index.js.map +1 -1
  89. package/dist/core/index.mjs +19 -8
  90. package/dist/date-locale/index.d.ts +2 -0
  91. package/dist/date-locale/index.d.ts.map +1 -0
  92. package/dist/date-locale/index.js +21 -0
  93. package/dist/date-locale/index.js.map +1 -0
  94. package/dist/date-locale/index.mjs +21 -0
  95. package/dist/email-automations/index.js +131 -123
  96. package/dist/email-automations/index.js.map +1 -1
  97. package/dist/email-automations/index.mjs +23 -15
  98. package/dist/email-automations/index.mjs.map +1 -1
  99. package/dist/features/account-deletion/components/AccountDeletionAdminTrigger.d.ts.map +1 -1
  100. package/dist/features/analytics/components/AnalyticsJourneyContainer.d.ts.map +1 -1
  101. package/dist/features/analytics/components/AnalyticsSessionsTable.d.ts.map +1 -1
  102. package/dist/features/analytics/index.js +154 -147
  103. package/dist/features/analytics/index.js.map +1 -1
  104. package/dist/features/analytics/index.mjs +32 -25
  105. package/dist/features/analytics/index.mjs.map +1 -1
  106. package/dist/features/analytics/server.js +11 -9
  107. package/dist/features/analytics/server.js.map +1 -1
  108. package/dist/features/analytics/server.mjs +9 -7
  109. package/dist/features/analytics/server.mjs.map +1 -1
  110. package/dist/features/billing/components/utils/date.d.ts +3 -3
  111. package/dist/features/billing/components/utils/format-options.d.ts +6 -4
  112. package/dist/features/billing/components/utils/format-options.d.ts.map +1 -1
  113. package/dist/features/billing/components/utils/useBillingFormatOptions.d.ts +5 -1
  114. package/dist/features/billing/components/utils/useBillingFormatOptions.d.ts.map +1 -1
  115. package/dist/features/billing/stripe-usage/components/details/UsageSummaryCard.d.ts.map +1 -1
  116. package/dist/features/billing/stripe-usage/components/lists/UsageHistoryTable.d.ts.map +1 -1
  117. package/dist/features/blog/components/admin/BlogTranslationStatus.d.ts.map +1 -1
  118. package/dist/features/blog/components/public/BlogPostMeta.d.ts.map +1 -1
  119. package/dist/features/blog/hooks/useBlogPostTableStructure.d.ts.map +1 -1
  120. package/dist/features/blog/index.js +168 -162
  121. package/dist/features/blog/index.js.map +1 -1
  122. package/dist/features/blog/index.mjs +25 -19
  123. package/dist/features/blog/index.mjs.map +1 -1
  124. package/dist/features/blog/server.js +29 -27
  125. package/dist/features/blog/server.js.map +1 -1
  126. package/dist/features/blog/server.mjs +8 -6
  127. package/dist/features/blog/server.mjs.map +1 -1
  128. package/dist/features/email-automation/hooks/useEmailAutomationEnrollmentTableStructure.d.ts.map +1 -1
  129. package/dist/features/handbook/components/parts/HandbookIndexStatus.d.ts.map +1 -1
  130. package/dist/features/help/components/HelpArticleBody.d.ts.map +1 -1
  131. package/dist/features/help/index.js +48 -43
  132. package/dist/features/help/index.js.map +1 -1
  133. package/dist/features/help/index.mjs +15 -10
  134. package/dist/features/help/index.mjs.map +1 -1
  135. package/dist/features/notification/components/notifications/Notification.d.ts +2 -1
  136. package/dist/features/notification/components/notifications/Notification.d.ts.map +1 -1
  137. package/dist/features/notification/contexts/NotificationContext.d.ts.map +1 -1
  138. package/dist/features/notification/hooks/useNotificationTableStructure.d.ts.map +1 -1
  139. package/dist/features/oauth/components/OAuthClientCard.d.ts.map +1 -1
  140. package/dist/features/oauth/components/OAuthClientDetail.d.ts.map +1 -1
  141. package/dist/features/tokenusage/index.js +133 -130
  142. package/dist/features/tokenusage/index.js.map +1 -1
  143. package/dist/features/tokenusage/index.mjs +10 -7
  144. package/dist/features/tokenusage/index.mjs.map +1 -1
  145. package/dist/features/tokenusage/lib/formatters.d.ts +6 -3
  146. package/dist/features/tokenusage/lib/formatters.d.ts.map +1 -1
  147. package/dist/index.js +19 -7
  148. package/dist/index.js.map +1 -1
  149. package/dist/index.mjs +23 -11
  150. package/dist/local-transport-AT4TE264.js +15 -0
  151. package/dist/{local-transport-MJPOKPTU.js.map → local-transport-AT4TE264.js.map} +1 -1
  152. package/dist/{local-transport-RVD4FZGA.mjs → local-transport-KWEUZ4GX.mjs} +5 -5
  153. package/dist/offline/index.js +56 -54
  154. package/dist/offline/index.js.map +1 -1
  155. package/dist/offline/index.mjs +23 -21
  156. package/dist/offline/index.mjs.map +1 -1
  157. package/dist/{request-4AWGPIGH.mjs → request-6GAIWWTG.mjs} +2 -2
  158. package/dist/{request-H5FZBZA2.js → request-BWO4Y434.js} +3 -3
  159. package/dist/{request-H5FZBZA2.js.map → request-BWO4Y434.js.map} +1 -1
  160. package/dist/server/ServerSession.d.ts +2 -0
  161. package/dist/server/ServerSession.d.ts.map +1 -1
  162. package/dist/server/index.js +10 -8
  163. package/dist/server/index.js.map +1 -1
  164. package/dist/server/index.mjs +9 -7
  165. package/dist/utils/date-formatter.d.ts +45 -4
  166. package/dist/utils/date-formatter.d.ts.map +1 -1
  167. package/dist/utils/index.d.ts +1 -1
  168. package/dist/utils/index.d.ts.map +1 -1
  169. package/dist/utils/toast.d.ts +2 -0
  170. package/dist/utils/toast.d.ts.map +1 -1
  171. package/dist/write-through-KNRI5L4V.mjs +15 -0
  172. package/dist/write-through-KNRI5L4V.mjs.map +1 -0
  173. package/dist/write-through-MYHQ6GJU.js +15 -0
  174. package/dist/{write-through-HE2QSOVI.js.map → write-through-MYHQ6GJU.js.map} +1 -1
  175. package/messages/en.json +1 -0
  176. package/messages/it.json +1 -0
  177. package/package.json +6 -1
  178. package/src/components/forms/DatePickerPopover.tsx +5 -3
  179. package/src/components/forms/DateRangeSelector.tsx +9 -7
  180. package/src/components/forms/FormDate.tsx +5 -3
  181. package/src/components/forms/FormDateTime.tsx +75 -39
  182. package/src/components/forms/__tests__/time-cycle.spec.ts +37 -0
  183. package/src/components/forms/time-cycle.ts +27 -0
  184. package/src/components/tables/cells/cell.date.tsx +3 -5
  185. package/src/components/tables/cells/cell.dateTime.tsx +3 -7
  186. package/src/contexts/DateLocaleContext.tsx +106 -0
  187. package/src/contexts/__tests__/DateLocaleContext.spec.tsx +175 -0
  188. package/src/contexts/index.ts +1 -0
  189. package/src/date-locale/index.ts +12 -0
  190. package/src/features/account-deletion/components/AccountDeletionAdminTrigger.tsx +3 -4
  191. package/src/features/analytics/components/AnalyticsJourneyContainer.tsx +8 -8
  192. package/src/features/analytics/components/AnalyticsSessionsTable.tsx +4 -6
  193. package/src/features/auth/components/two-factor/PasskeyList.tsx +3 -3
  194. package/src/features/auth/components/two-factor/TotpAuthenticatorList.tsx +3 -3
  195. package/src/features/billing/components/utils/__tests__/billing-formatters.spec.ts +14 -6
  196. package/src/features/billing/components/utils/date.ts +5 -5
  197. package/src/features/billing/components/utils/format-options.ts +6 -4
  198. package/src/features/billing/components/utils/useBillingFormatOptions.ts +8 -2
  199. package/src/features/billing/stripe-usage/components/details/UsageSummaryCard.tsx +4 -12
  200. package/src/features/billing/stripe-usage/components/lists/UsageHistoryTable.tsx +4 -17
  201. package/src/features/blog/components/admin/BlogTranslationStatus.tsx +3 -2
  202. package/src/features/blog/components/public/BlogPostMeta.tsx +5 -4
  203. package/src/features/blog/components/public/__tests__/BlogList.spec.tsx +1 -2
  204. package/src/features/blog/components/public/__tests__/BlogPostView.spec.tsx +2 -3
  205. package/src/features/blog/hooks/useBlogPostTableStructure.tsx +4 -8
  206. package/src/features/email-automation/hooks/useEmailAutomationEnrollmentTableStructure.tsx +11 -5
  207. package/src/features/email-blast/components/containers/EmailBlastContainer.tsx +3 -3
  208. package/src/features/email-blast/hooks/useEmailBlastTableStructure.tsx +4 -4
  209. package/src/features/handbook/components/parts/HandbookIndexStatus.tsx +4 -3
  210. package/src/features/help/components/HelpArticleBody.tsx +4 -3
  211. package/src/features/notification/components/notifications/Notification.tsx +38 -7
  212. package/src/features/notification/contexts/NotificationContext.tsx +6 -3
  213. package/src/features/notification/hooks/useNotificationTableStructure.tsx +6 -5
  214. package/src/features/oauth/components/OAuthClientCard.tsx +8 -5
  215. package/src/features/oauth/components/OAuthClientDetail.tsx +3 -6
  216. package/src/features/tokenusage/lib/__tests__/formatters.spec.ts +19 -0
  217. package/src/features/tokenusage/lib/formatters.ts +11 -6
  218. package/src/features/waitlist/hooks/useWaitlistTableStructure.tsx +5 -5
  219. package/src/server/ServerSession.ts +3 -0
  220. package/src/server/__tests__/ServerSession.read.spec.ts +18 -1
  221. package/src/utils/__tests__/date-formatter.spec.ts +134 -10
  222. package/src/utils/__tests__/toast.spec.ts +39 -0
  223. package/src/utils/date-formatter.ts +200 -44
  224. package/src/utils/index.ts +11 -1
  225. package/src/utils/toast.ts +2 -0
  226. package/dist/BlockNoteEditor-MONT74RQ.js.map +0 -1
  227. package/dist/BlockNoteViewer-K2HBF3IP.js.map +0 -1
  228. package/dist/JsonApiRequest-KC6DOHKT.js +0 -26
  229. package/dist/chunk-7OIWOPM5.mjs.map +0 -1
  230. package/dist/chunk-BDWV4KYR.js.map +0 -1
  231. package/dist/chunk-HN7L6RRW.js.map +0 -1
  232. package/dist/chunk-N2BFT7KI.mjs.map +0 -1
  233. package/dist/chunk-OZADFYE7.mjs.map +0 -1
  234. package/dist/chunk-P7L6OFX5.js.map +0 -1
  235. package/dist/chunk-SO3YUCL6.js.map +0 -1
  236. package/dist/chunk-T6G2F2BK.mjs.map +0 -1
  237. package/dist/chunk-TNTCLVUR.js.map +0 -1
  238. package/dist/local-transport-MJPOKPTU.js +0 -15
  239. package/dist/write-through-7I3LA2WN.mjs +0 -15
  240. package/dist/write-through-HE2QSOVI.js +0 -15
  241. /package/dist/{JsonApiRequest-ADLBJ5RX.mjs.map → JsonApiRequest-WNPDS356.mjs.map} +0 -0
  242. /package/dist/{chunk-VNUT2D27.mjs.map → chunk-2PWYG2WJ.mjs.map} +0 -0
  243. /package/dist/{chunk-W4ML6D2X.mjs.map → chunk-3U7YJ73T.mjs.map} +0 -0
  244. /package/dist/{chunk-BE6UMM5X.mjs.map → chunk-47HNJQ7U.mjs.map} +0 -0
  245. /package/dist/{chunk-S7SPAC6X.mjs.map → chunk-73NKUBMP.mjs.map} +0 -0
  246. /package/dist/{chunk-YTDGYI62.mjs.map → chunk-DWPHHUMV.mjs.map} +0 -0
  247. /package/dist/{chunk-YMCL3JXZ.mjs.map → chunk-YPBIPE2B.mjs.map} +0 -0
  248. /package/dist/{local-transport-RVD4FZGA.mjs.map → date-locale/index.mjs.map} +0 -0
  249. /package/dist/{request-4AWGPIGH.mjs.map → local-transport-KWEUZ4GX.mjs.map} +0 -0
  250. /package/dist/{write-through-7I3LA2WN.mjs.map → request-6GAIWWTG.mjs.map} +0 -0
@@ -81,11 +81,12 @@
81
81
 
82
82
 
83
83
 
84
- var _chunkBDWV4KYRjs = require('../chunk-BDWV4KYR.js');
84
+ var _chunkJE6QWCNEjs = require('../chunk-JE6QWCNE.js');
85
+ require('../chunk-SYMI4IDW.js');
85
86
  require('../chunk-3EPNHTMH.js');
86
87
 
87
88
 
88
- var _chunkTNTCLVURjs = require('../chunk-TNTCLVUR.js');
89
+ var _chunkONU4WCDGjs = require('../chunk-ONU4WCDG.js');
89
90
 
90
91
 
91
92
  var _chunkG4JR3SFVjs = require('../chunk-G4JR3SFV.js');
@@ -111,28 +112,32 @@ var _chunkG4JR3SFVjs = require('../chunk-G4JR3SFV.js');
111
112
 
112
113
 
113
114
 
114
-
115
- var _chunkHN7L6RRWjs = require('../chunk-HN7L6RRW.js');
116
- require('../chunk-DGN3PR2F.js');
115
+ var _chunk77JC2UCFjs = require('../chunk-77JC2UCF.js');
117
116
 
118
117
 
118
+ var _chunkHROKKUBQjs = require('../chunk-HROKKUBQ.js');
119
+ require('../chunk-DGN3PR2F.js');
119
120
 
120
121
 
121
- var _chunkP7L6OFX5js = require('../chunk-P7L6OFX5.js');
122
- require('../chunk-BQ2WAG4K.js');
123
- require('../chunk-A5M3MORY.js');
122
+ var _chunkZ6T2575Ajs = require('../chunk-Z6T2575A.js');
123
+ require('../chunk-3VNDFKT7.js');
124
+ require('../chunk-5WM72MLE.js');
124
125
  require('../chunk-WUNSG3IN.js');
125
- require('../chunk-RCOKQ3R4.js');
126
+ require('../chunk-LNO2JLU3.js');
126
127
  require('../chunk-LXKSUWAV.js');
127
128
 
128
129
 
130
+
131
+ var _chunkNP3AFULUjs = require('../chunk-NP3AFULU.js');
132
+
133
+
129
134
  var _chunk7QVYU63Ejs = require('../chunk-7QVYU63E.js');
130
135
 
131
136
  // src/features/billing/components/cards/SubscriptionSummaryCard.tsx
132
137
  var _nextintl = require('next-intl');
133
138
  var _lucidereact = require('lucide-react');
134
139
  var _jsxruntime = require('react/jsx-runtime');
135
- var SUBSCRIPTION_STATUSES = Object.values(_chunkHN7L6RRWjs.SubscriptionStatus);
140
+ var SUBSCRIPTION_STATUSES = Object.values(_chunk77JC2UCFjs.SubscriptionStatus);
136
141
  function getStatusBadgeVariant(status) {
137
142
  switch (status) {
138
143
  case "active" /* ACTIVE */:
@@ -164,43 +169,43 @@ function SubscriptionSummaryCard({
164
169
  onManageClick
165
170
  }) {
166
171
  const t = _nextintl.useTranslations.call(void 0, );
167
- const fmt = _chunkBDWV4KYRjs.useBillingFormatOptions.call(void 0, );
172
+ const fmt = _chunkJE6QWCNEjs.useBillingFormatOptions.call(void 0, );
168
173
  if (loading) {
169
- return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkBDWV4KYRjs.Card, { children: [
170
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkBDWV4KYRjs.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
171
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBDWV4KYRjs.CardTitle, { children: t("billing.ui.subscriptions.title") }),
174
+ return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkJE6QWCNEjs.Card, { children: [
175
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkJE6QWCNEjs.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
176
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkJE6QWCNEjs.CardTitle, { children: t("billing.ui.subscriptions.title") }),
172
177
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.CreditCard, { className: "h-4 w-4 text-muted-foreground" })
173
178
  ] }),
174
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkBDWV4KYRjs.CardContent, { children: [
175
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBDWV4KYRjs.Skeleton, { className: "h-6 w-32 mb-2" }),
176
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBDWV4KYRjs.Skeleton, { className: "h-4 w-24 mb-1" }),
177
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBDWV4KYRjs.Skeleton, { className: "h-4 w-40" })
179
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkJE6QWCNEjs.CardContent, { children: [
180
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkJE6QWCNEjs.Skeleton, { className: "h-6 w-32 mb-2" }),
181
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkJE6QWCNEjs.Skeleton, { className: "h-4 w-24 mb-1" }),
182
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkJE6QWCNEjs.Skeleton, { className: "h-4 w-40" })
178
183
  ] })
179
184
  ] });
180
185
  }
181
186
  if (error) {
182
- return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkBDWV4KYRjs.Card, { children: [
183
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkBDWV4KYRjs.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
184
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBDWV4KYRjs.CardTitle, { children: t("billing.ui.subscriptions.title") }),
187
+ return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkJE6QWCNEjs.Card, { children: [
188
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkJE6QWCNEjs.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
189
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkJE6QWCNEjs.CardTitle, { children: t("billing.ui.subscriptions.title") }),
185
190
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.CreditCard, { className: "h-4 w-4 text-muted-foreground" })
186
191
  ] }),
187
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBDWV4KYRjs.CardContent, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-destructive text-xs/relaxed", children: error }) })
192
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkJE6QWCNEjs.CardContent, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-destructive text-xs/relaxed", children: error }) })
188
193
  ] });
189
194
  }
190
195
  const activeSubscriptions = subscriptions.filter(
191
196
  (sub) => sub.status === "active" /* ACTIVE */ || sub.status === "trialing" /* TRIALING */ || sub.status === "past_due" /* PAST_DUE */
192
197
  );
193
198
  const primarySubscription = activeSubscriptions[0];
194
- return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkBDWV4KYRjs.Card, { className: "cursor-pointer hover:bg-accent/50 transition-colors", onClick: onManageClick, children: [
195
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkBDWV4KYRjs.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
196
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBDWV4KYRjs.CardTitle, { children: t("billing.ui.subscriptions.title") }),
199
+ return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkJE6QWCNEjs.Card, { className: "cursor-pointer hover:bg-accent/50 transition-colors", onClick: onManageClick, children: [
200
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkJE6QWCNEjs.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
201
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkJE6QWCNEjs.CardTitle, { children: t("billing.ui.subscriptions.title") }),
197
202
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.CreditCard, { className: "h-4 w-4 text-muted-foreground" })
198
203
  ] }),
199
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBDWV4KYRjs.CardContent, { children: !primarySubscription ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-2", children: [
204
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkJE6QWCNEjs.CardContent, { children: !primarySubscription ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-2", children: [
200
205
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-xl font-bold text-muted-foreground", children: t("billing.ui.cards.subscriptions.empty_title") }),
201
206
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-xs text-muted-foreground", children: t("billing.ui.cards.subscriptions.empty_description") }),
202
207
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
203
- _chunkBDWV4KYRjs.Button,
208
+ _chunkJE6QWCNEjs.Button,
204
209
  {
205
210
  variant: "outline",
206
211
  size: "sm",
@@ -218,8 +223,8 @@ function SubscriptionSummaryCard({
218
223
  ] }) : /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-2", children: [
219
224
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center gap-2", children: [
220
225
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-xl font-bold", children: formatPlanName(primarySubscription, t("billing.ui.cards.subscriptions.fallback_name")) }),
221
- primarySubscription.status === "past_due" /* PAST_DUE */ ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBDWV4KYRjs.Badge, { variant: "softRed", children: t("billing.ui.cards.subscriptions.payment_failing") }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
222
- _chunkBDWV4KYRjs.Badge,
226
+ primarySubscription.status === "past_due" /* PAST_DUE */ ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkJE6QWCNEjs.Badge, { variant: "softRed", children: t("billing.ui.cards.subscriptions.payment_failing") }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
227
+ _chunkJE6QWCNEjs.Badge,
223
228
  {
224
229
  variant: primarySubscription.cancelAtPeriodEnd ? "secondary" : getStatusBadgeVariant(primarySubscription.status),
225
230
  children: primarySubscription.cancelAtPeriodEnd ? t("billing.ui.cards.subscriptions.canceling") : SUBSCRIPTION_STATUSES.includes(primarySubscription.status) ? t(`billing.ui.subscription_status.${primarySubscription.status}`) : primarySubscription.status
@@ -227,11 +232,11 @@ function SubscriptionSummaryCard({
227
232
  )
228
233
  ] }),
229
234
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-xs text-muted-foreground", children: !_optionalChain([primarySubscription, 'access', _8 => _8.price, 'optionalAccess', _9 => _9.isTrial]) ? t("billing.ui.cards.subscriptions.ends_on", {
230
- date: _chunkBDWV4KYRjs.formatDate.call(void 0, primarySubscription.currentPeriodEnd, fmt)
235
+ date: _chunkJE6QWCNEjs.formatDate.call(void 0, primarySubscription.currentPeriodEnd, fmt)
231
236
  }) : primarySubscription.cancelAtPeriodEnd ? t("billing.ui.cards.subscriptions.cancels_on", {
232
- date: _chunkBDWV4KYRjs.formatDate.call(void 0, primarySubscription.currentPeriodEnd, fmt)
237
+ date: _chunkJE6QWCNEjs.formatDate.call(void 0, primarySubscription.currentPeriodEnd, fmt)
233
238
  }) : t("billing.ui.cards.subscriptions.renews_on", {
234
- date: _chunkBDWV4KYRjs.formatDate.call(void 0, primarySubscription.currentPeriodEnd, fmt)
239
+ date: _chunkJE6QWCNEjs.formatDate.call(void 0, primarySubscription.currentPeriodEnd, fmt)
235
240
  }) }),
236
241
  activeSubscriptions.length > 1 && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-xs text-muted-foreground", children: t("billing.ui.cards.subscriptions.more", { count: activeSubscriptions.length - 1 }) })
237
242
  ] }) })
@@ -265,37 +270,37 @@ function PaymentMethodSummaryCard({
265
270
  }) {
266
271
  const t = _nextintl.useTranslations.call(void 0, );
267
272
  if (loading) {
268
- return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkBDWV4KYRjs.Card, { children: [
269
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkBDWV4KYRjs.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
270
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBDWV4KYRjs.CardTitle, { children: t("billing.ui.payment_method.title") }),
273
+ return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkJE6QWCNEjs.Card, { children: [
274
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkJE6QWCNEjs.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
275
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkJE6QWCNEjs.CardTitle, { children: t("billing.ui.payment_method.title") }),
271
276
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.Wallet, { className: "h-4 w-4 text-muted-foreground" })
272
277
  ] }),
273
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkBDWV4KYRjs.CardContent, { children: [
274
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBDWV4KYRjs.Skeleton, { className: "h-6 w-32 mb-2" }),
275
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBDWV4KYRjs.Skeleton, { className: "h-4 w-24" })
278
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkJE6QWCNEjs.CardContent, { children: [
279
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkJE6QWCNEjs.Skeleton, { className: "h-6 w-32 mb-2" }),
280
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkJE6QWCNEjs.Skeleton, { className: "h-4 w-24" })
276
281
  ] })
277
282
  ] });
278
283
  }
279
284
  if (error) {
280
- return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkBDWV4KYRjs.Card, { children: [
281
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkBDWV4KYRjs.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
282
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBDWV4KYRjs.CardTitle, { children: t("billing.ui.payment_method.title") }),
285
+ return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkJE6QWCNEjs.Card, { children: [
286
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkJE6QWCNEjs.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
287
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkJE6QWCNEjs.CardTitle, { children: t("billing.ui.payment_method.title") }),
283
288
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.Wallet, { className: "h-4 w-4 text-muted-foreground" })
284
289
  ] }),
285
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBDWV4KYRjs.CardContent, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-destructive text-xs/relaxed", children: error }) })
290
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkJE6QWCNEjs.CardContent, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-destructive text-xs/relaxed", children: error }) })
286
291
  ] });
287
292
  }
288
293
  const defaultMethod = paymentMethods.find((pm) => pm.id === defaultPaymentMethodId) || paymentMethods[0];
289
- return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkBDWV4KYRjs.Card, { className: "cursor-pointer hover:bg-accent/50 transition-colors", onClick: onManageClick, children: [
290
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkBDWV4KYRjs.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
291
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBDWV4KYRjs.CardTitle, { children: t("billing.ui.payment_method.title") }),
294
+ return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkJE6QWCNEjs.Card, { className: "cursor-pointer hover:bg-accent/50 transition-colors", onClick: onManageClick, children: [
295
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkJE6QWCNEjs.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
296
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkJE6QWCNEjs.CardTitle, { children: t("billing.ui.payment_method.title") }),
292
297
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.Wallet, { className: "h-4 w-4 text-muted-foreground" })
293
298
  ] }),
294
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBDWV4KYRjs.CardContent, { children: paymentMethods.length === 0 ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-2", children: [
299
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkJE6QWCNEjs.CardContent, { children: paymentMethods.length === 0 ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-2", children: [
295
300
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-xl font-bold text-muted-foreground", children: t("billing.ui.cards.payment_method.empty_title") }),
296
301
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-xs text-muted-foreground", children: t("billing.ui.cards.payment_method.empty_description") }),
297
302
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
298
- _chunkBDWV4KYRjs.Button,
303
+ _chunkJE6QWCNEjs.Button,
299
304
  {
300
305
  variant: "outline",
301
306
  size: "sm",
@@ -344,13 +349,13 @@ function formatBalance(balance, currency, locale) {
344
349
  _chunk7QVYU63Ejs.__name.call(void 0, formatBalance, "formatBalance");
345
350
  function CustomerInfoCard({ customer, loading, error }) {
346
351
  const t = _nextintl.useTranslations.call(void 0, );
347
- const locale = _chunkP7L6OFX5js.useI18nLocale.call(void 0, );
352
+ const locale = _chunkNP3AFULUjs.useI18nLocale.call(void 0, );
348
353
  const [portalLoading, setPortalLoading] = _react.useState.call(void 0, false);
349
354
  const handlePortalClick = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, async (e) => {
350
355
  e.stopPropagation();
351
356
  setPortalLoading(true);
352
357
  try {
353
- const { url } = await _chunkHN7L6RRWjs.StripeCustomerService.createPortalSession();
358
+ const { url } = await _chunk77JC2UCFjs.StripeCustomerService.createPortalSession();
354
359
  window.open(url, "_blank");
355
360
  } catch (err) {
356
361
  console.error("[CustomerInfoCard] Failed to create portal session:", err);
@@ -359,45 +364,45 @@ function CustomerInfoCard({ customer, loading, error }) {
359
364
  }
360
365
  }, "handlePortalClick");
361
366
  if (loading) {
362
- return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkBDWV4KYRjs.Card, { children: [
363
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkBDWV4KYRjs.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
364
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBDWV4KYRjs.CardTitle, { children: t("billing.ui.cards.customer.title") }),
367
+ return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkJE6QWCNEjs.Card, { children: [
368
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkJE6QWCNEjs.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
369
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkJE6QWCNEjs.CardTitle, { children: t("billing.ui.cards.customer.title") }),
365
370
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.User, { className: "h-4 w-4 text-muted-foreground" })
366
371
  ] }),
367
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkBDWV4KYRjs.CardContent, { children: [
368
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBDWV4KYRjs.Skeleton, { className: "h-6 w-32 mb-2" }),
369
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBDWV4KYRjs.Skeleton, { className: "h-4 w-48 mb-1" }),
370
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBDWV4KYRjs.Skeleton, { className: "h-4 w-24" })
372
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkJE6QWCNEjs.CardContent, { children: [
373
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkJE6QWCNEjs.Skeleton, { className: "h-6 w-32 mb-2" }),
374
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkJE6QWCNEjs.Skeleton, { className: "h-4 w-48 mb-1" }),
375
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkJE6QWCNEjs.Skeleton, { className: "h-4 w-24" })
371
376
  ] })
372
377
  ] });
373
378
  }
374
379
  if (error) {
375
- return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkBDWV4KYRjs.Card, { children: [
376
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkBDWV4KYRjs.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
377
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBDWV4KYRjs.CardTitle, { children: t("billing.ui.cards.customer.title") }),
380
+ return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkJE6QWCNEjs.Card, { children: [
381
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkJE6QWCNEjs.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
382
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkJE6QWCNEjs.CardTitle, { children: t("billing.ui.cards.customer.title") }),
378
383
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.User, { className: "h-4 w-4 text-muted-foreground" })
379
384
  ] }),
380
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBDWV4KYRjs.CardContent, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-destructive text-xs/relaxed", children: error }) })
385
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkJE6QWCNEjs.CardContent, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-destructive text-xs/relaxed", children: error }) })
381
386
  ] });
382
387
  }
383
388
  if (!customer) {
384
- return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkBDWV4KYRjs.Card, { children: [
385
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkBDWV4KYRjs.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
386
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBDWV4KYRjs.CardTitle, { children: t("billing.ui.cards.customer.title") }),
389
+ return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkJE6QWCNEjs.Card, { children: [
390
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkJE6QWCNEjs.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
391
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkJE6QWCNEjs.CardTitle, { children: t("billing.ui.cards.customer.title") }),
387
392
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.User, { className: "h-4 w-4 text-muted-foreground" })
388
393
  ] }),
389
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkBDWV4KYRjs.CardContent, { children: [
394
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkJE6QWCNEjs.CardContent, { children: [
390
395
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-xl font-bold text-muted-foreground", children: t("billing.ui.cards.customer.not_set_up") }),
391
396
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-xs text-muted-foreground", children: t("billing.ui.cards.customer.not_set_up_description") })
392
397
  ] })
393
398
  ] });
394
399
  }
395
- return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkBDWV4KYRjs.Card, { children: [
396
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkBDWV4KYRjs.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
397
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBDWV4KYRjs.CardTitle, { children: t("billing.ui.cards.customer.title") }),
400
+ return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkJE6QWCNEjs.Card, { children: [
401
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkJE6QWCNEjs.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
402
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkJE6QWCNEjs.CardTitle, { children: t("billing.ui.cards.customer.title") }),
398
403
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.User, { className: "h-4 w-4 text-muted-foreground" })
399
404
  ] }),
400
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBDWV4KYRjs.CardContent, { children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-2", children: [
405
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkJE6QWCNEjs.CardContent, { children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-2", children: [
401
406
  customer.name && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-xl font-bold", children: customer.name }),
402
407
  customer.email && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-sm text-muted-foreground", children: customer.email }),
403
408
  customer.balance !== void 0 && customer.balance !== 0 && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "p", { className: "text-sm", children: [
@@ -407,7 +412,7 @@ function CustomerInfoCard({ customer, loading, error }) {
407
412
  ] }),
408
413
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: customer.balance < 0 ? "text-success" : "text-destructive", children: formatBalance(customer.balance, customer.currency, locale) })
409
414
  ] }),
410
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkBDWV4KYRjs.Button, { variant: "outline", size: "sm", className: "mt-2", onClick: handlePortalClick, disabled: portalLoading, children: [
415
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkJE6QWCNEjs.Button, { variant: "outline", size: "sm", className: "mt-2", onClick: handlePortalClick, disabled: portalLoading, children: [
411
416
  portalLoading ? t("common.loading") : t("billing.ui.cards.customer.manage_portal"),
412
417
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.ExternalLink, { className: "h-4 w-4 ms-1" })
413
418
  ] })
@@ -420,7 +425,7 @@ _chunk7QVYU63Ejs.__name.call(void 0, CustomerInfoCard, "CustomerInfoCard");
420
425
 
421
426
 
422
427
 
423
- var INVOICE_STATUSES = Object.values(_chunkHN7L6RRWjs.InvoiceStatus);
428
+ var INVOICE_STATUSES = Object.values(_chunk77JC2UCFjs.InvoiceStatus);
424
429
  function getStatusBadgeVariant2(status) {
425
430
  switch (status) {
426
431
  case "paid" /* PAID */:
@@ -445,46 +450,46 @@ function formatAmount(amount, currency, locale) {
445
450
  _chunk7QVYU63Ejs.__name.call(void 0, formatAmount, "formatAmount");
446
451
  function InvoicesSummaryCard({ invoices, loading, error, onViewAllClick }) {
447
452
  const t = _nextintl.useTranslations.call(void 0, );
448
- const fmt = _chunkBDWV4KYRjs.useBillingFormatOptions.call(void 0, );
453
+ const fmt = _chunkJE6QWCNEjs.useBillingFormatOptions.call(void 0, );
449
454
  if (loading) {
450
- return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkBDWV4KYRjs.Card, { children: [
451
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkBDWV4KYRjs.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
452
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBDWV4KYRjs.CardTitle, { children: t("billing.ui.cards.invoices.title") }),
455
+ return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkJE6QWCNEjs.Card, { children: [
456
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkJE6QWCNEjs.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
457
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkJE6QWCNEjs.CardTitle, { children: t("billing.ui.cards.invoices.title") }),
453
458
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.ReceiptIcon, { className: "h-4 w-4 text-muted-foreground" })
454
459
  ] }),
455
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkBDWV4KYRjs.CardContent, { children: [
456
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBDWV4KYRjs.Skeleton, { className: "h-6 w-24 mb-2" }),
457
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBDWV4KYRjs.Skeleton, { className: "h-4 w-32 mb-1" }),
458
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBDWV4KYRjs.Skeleton, { className: "h-4 w-20" })
460
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkJE6QWCNEjs.CardContent, { children: [
461
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkJE6QWCNEjs.Skeleton, { className: "h-6 w-24 mb-2" }),
462
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkJE6QWCNEjs.Skeleton, { className: "h-4 w-32 mb-1" }),
463
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkJE6QWCNEjs.Skeleton, { className: "h-4 w-20" })
459
464
  ] })
460
465
  ] });
461
466
  }
462
467
  if (error) {
463
- return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkBDWV4KYRjs.Card, { children: [
464
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkBDWV4KYRjs.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
465
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBDWV4KYRjs.CardTitle, { children: t("billing.ui.cards.invoices.title") }),
468
+ return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkJE6QWCNEjs.Card, { children: [
469
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkJE6QWCNEjs.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
470
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkJE6QWCNEjs.CardTitle, { children: t("billing.ui.cards.invoices.title") }),
466
471
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.ReceiptIcon, { className: "h-4 w-4 text-muted-foreground" })
467
472
  ] }),
468
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBDWV4KYRjs.CardContent, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-destructive text-xs/relaxed", children: error }) })
473
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkJE6QWCNEjs.CardContent, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-destructive text-xs/relaxed", children: error }) })
469
474
  ] });
470
475
  }
471
476
  const latestInvoice = _nullishCoalesce(invoices.find((inv) => inv.status !== "void" /* VOID */), () => ( invoices[0]));
472
477
  const paidInvoices = invoices.filter((inv) => inv.status === "paid" /* PAID */);
473
478
  const openInvoices = invoices.filter((inv) => inv.status === "open" /* OPEN */);
474
- return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkBDWV4KYRjs.Card, { className: "cursor-pointer hover:bg-accent/50 transition-colors", onClick: onViewAllClick, children: [
475
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkBDWV4KYRjs.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
476
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBDWV4KYRjs.CardTitle, { children: t("billing.ui.cards.invoices.title") }),
479
+ return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkJE6QWCNEjs.Card, { className: "cursor-pointer hover:bg-accent/50 transition-colors", onClick: onViewAllClick, children: [
480
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkJE6QWCNEjs.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
481
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkJE6QWCNEjs.CardTitle, { children: t("billing.ui.cards.invoices.title") }),
477
482
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.ReceiptIcon, { className: "h-4 w-4 text-muted-foreground" })
478
483
  ] }),
479
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBDWV4KYRjs.CardContent, { children: invoices.length === 0 ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-2", children: [
484
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkJE6QWCNEjs.CardContent, { children: invoices.length === 0 ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-2", children: [
480
485
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-xl font-bold text-muted-foreground", children: t("billing.ui.invoices.empty_title") }),
481
486
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-xs text-muted-foreground", children: t("billing.ui.cards.invoices.empty_description") })
482
487
  ] }) : latestInvoice ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-2", children: [
483
488
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center gap-2", children: [
484
489
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-xl font-bold", children: formatAmount(latestInvoice.total, latestInvoice.currency, fmt.locale) }),
485
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBDWV4KYRjs.Badge, { variant: getStatusBadgeVariant2(latestInvoice.status), children: INVOICE_STATUSES.includes(latestInvoice.status) ? t(`billing.ui.invoice_status.${latestInvoice.status}`) : latestInvoice.status })
490
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkJE6QWCNEjs.Badge, { variant: getStatusBadgeVariant2(latestInvoice.status), children: INVOICE_STATUSES.includes(latestInvoice.status) ? t(`billing.ui.invoice_status.${latestInvoice.status}`) : latestInvoice.status })
486
491
  ] }),
487
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-sm text-muted-foreground", children: latestInvoice.stripeInvoiceNumber || t("billing.ui.cards.invoices.invoice_from", { date: _chunkBDWV4KYRjs.formatDate.call(void 0, latestInvoice.periodStart, fmt) }) }),
492
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-sm text-muted-foreground", children: latestInvoice.stripeInvoiceNumber || t("billing.ui.cards.invoices.invoice_from", { date: _chunkJE6QWCNEjs.formatDate.call(void 0, latestInvoice.periodStart, fmt) }) }),
488
493
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center gap-4 text-xs text-muted-foreground", children: [
489
494
  paidInvoices.length > 0 && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: t("billing.ui.cards.invoices.paid_count", { count: paidInvoices.length }) }),
490
495
  openInvoices.length > 0 && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-warning", children: t("billing.ui.cards.invoices.open_count", { count: openInvoices.length }) }),
@@ -517,26 +522,26 @@ function BillingUsageSummaryCard({
517
522
  onViewDetailsClick
518
523
  }) {
519
524
  const t = _nextintl.useTranslations.call(void 0, );
520
- const locale = _chunkP7L6OFX5js.useI18nLocale.call(void 0, );
525
+ const locale = _chunkNP3AFULUjs.useI18nLocale.call(void 0, );
521
526
  if (loading) {
522
- return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkBDWV4KYRjs.Card, { children: [
523
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkBDWV4KYRjs.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
524
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBDWV4KYRjs.CardTitle, { children: t("billing.ui.cards.usage.title") }),
527
+ return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkJE6QWCNEjs.Card, { children: [
528
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkJE6QWCNEjs.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
529
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkJE6QWCNEjs.CardTitle, { children: t("billing.ui.cards.usage.title") }),
525
530
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.Activity, { className: "h-4 w-4 text-muted-foreground" })
526
531
  ] }),
527
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkBDWV4KYRjs.CardContent, { children: [
528
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBDWV4KYRjs.Skeleton, { className: "h-6 w-24 mb-2" }),
529
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBDWV4KYRjs.Skeleton, { className: "h-4 w-32" })
532
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkJE6QWCNEjs.CardContent, { children: [
533
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkJE6QWCNEjs.Skeleton, { className: "h-6 w-24 mb-2" }),
534
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkJE6QWCNEjs.Skeleton, { className: "h-4 w-32" })
530
535
  ] })
531
536
  ] });
532
537
  }
533
538
  if (error) {
534
- return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkBDWV4KYRjs.Card, { children: [
535
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkBDWV4KYRjs.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
536
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBDWV4KYRjs.CardTitle, { children: t("billing.ui.cards.usage.title") }),
539
+ return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkJE6QWCNEjs.Card, { children: [
540
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkJE6QWCNEjs.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
541
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkJE6QWCNEjs.CardTitle, { children: t("billing.ui.cards.usage.title") }),
537
542
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.Activity, { className: "h-4 w-4 text-muted-foreground" })
538
543
  ] }),
539
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBDWV4KYRjs.CardContent, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-destructive text-xs/relaxed", children: error }) })
544
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkJE6QWCNEjs.CardContent, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-destructive text-xs/relaxed", children: error }) })
540
545
  ] });
541
546
  }
542
547
  const totalUsage = Object.values(summaries).reduce((acc, summary) => {
@@ -544,12 +549,12 @@ function BillingUsageSummaryCard({
544
549
  }, 0);
545
550
  const primaryMeter = meters.find((m) => _optionalChain([summaries, 'access', _17 => _17[m.id], 'optionalAccess', _18 => _18.aggregatedValue]));
546
551
  const primarySummary = primaryMeter ? summaries[primaryMeter.id] : null;
547
- return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkBDWV4KYRjs.Card, { className: "cursor-pointer hover:bg-accent/50 transition-colors", onClick: onViewDetailsClick, children: [
548
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkBDWV4KYRjs.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
549
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBDWV4KYRjs.CardTitle, { children: t("billing.ui.cards.usage.title") }),
552
+ return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkJE6QWCNEjs.Card, { className: "cursor-pointer hover:bg-accent/50 transition-colors", onClick: onViewDetailsClick, children: [
553
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkJE6QWCNEjs.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
554
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkJE6QWCNEjs.CardTitle, { children: t("billing.ui.cards.usage.title") }),
550
555
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.Activity, { className: "h-4 w-4 text-muted-foreground" })
551
556
  ] }),
552
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBDWV4KYRjs.CardContent, { children: meters.length === 0 ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-2", children: [
557
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkJE6QWCNEjs.CardContent, { children: meters.length === 0 ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-2", children: [
553
558
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-xl font-bold text-muted-foreground", children: t("billing.ui.cards.usage.no_meters") }),
554
559
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-xs text-muted-foreground", children: t("billing.ui.cards.usage.no_meters_description") })
555
560
  ] }) : /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-2", children: [
@@ -606,7 +611,7 @@ function PaymentMethodForm({
606
611
  const fetchSetupIntent = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, async () => {
607
612
  setLoading(true);
608
613
  try {
609
- const intent = await _chunkHN7L6RRWjs.StripeCustomerService.createSetupIntent();
614
+ const intent = await _chunk77JC2UCFjs.StripeCustomerService.createSetupIntent();
610
615
  setSetupIntent(intent);
611
616
  } catch (err) {
612
617
  console.error("[PaymentMethodForm] Failed to create setup intent:", err);
@@ -644,7 +649,7 @@ function PaymentMethodForm({
644
649
  return;
645
650
  }
646
651
  if ((alwaysSetDefault || setAsDefault) && _optionalChain([confirmedSetupIntent, 'optionalAccess', _19 => _19.payment_method])) {
647
- await _chunkHN7L6RRWjs.StripeCustomerService.setDefaultPaymentMethod({
652
+ await _chunk77JC2UCFjs.StripeCustomerService.setDefaultPaymentMethod({
648
653
  paymentMethodId: typeof confirmedSetupIntent.payment_method === "string" ? confirmedSetupIntent.payment_method : confirmedSetupIntent.payment_method.id
649
654
  });
650
655
  }
@@ -660,7 +665,7 @@ function PaymentMethodForm({
660
665
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex items-center justify-center py-8", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-muted-foreground", children: t("billing.ui.payment_form.loading") }) });
661
666
  }
662
667
  if (!setupIntent && error) {
663
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBDWV4KYRjs.Alert, { variant: "destructive", className: "bg-red-50 border-red-200", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBDWV4KYRjs.AlertDescription, { children: error }) });
668
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkJE6QWCNEjs.Alert, { variant: "destructive", className: "bg-red-50 border-red-200", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkJE6QWCNEjs.AlertDescription, { children: error }) });
664
669
  }
665
670
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "form", { onSubmit: handleSubmit, className: "flex flex-col gap-y-4", children: [
666
671
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rounded-md border border-gray-300 p-3", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
@@ -684,19 +689,19 @@ function PaymentMethodForm({
684
689
  ) }),
685
690
  !alwaysSetDefault && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center gap-x-2", children: [
686
691
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
687
- _chunkBDWV4KYRjs.Checkbox,
692
+ _chunkJE6QWCNEjs.Checkbox,
688
693
  {
689
694
  id: "setAsDefault",
690
695
  checked: setAsDefault,
691
696
  onCheckedChange: (checked) => setSetAsDefault(!!checked)
692
697
  }
693
698
  ),
694
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBDWV4KYRjs.Label, { htmlFor: "setAsDefault", className: "cursor-pointer font-normal", children: t("billing.ui.payment_form.set_default") })
699
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkJE6QWCNEjs.Label, { htmlFor: "setAsDefault", className: "cursor-pointer font-normal", children: t("billing.ui.payment_form.set_default") })
695
700
  ] }),
696
- error && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBDWV4KYRjs.Alert, { variant: "destructive", className: "bg-red-50 border-red-200", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBDWV4KYRjs.AlertDescription, { children: error }) }),
701
+ error && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkJE6QWCNEjs.Alert, { variant: "destructive", className: "bg-red-50 border-red-200", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkJE6QWCNEjs.AlertDescription, { children: error }) }),
697
702
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex justify-end gap-x-2", children: [
698
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBDWV4KYRjs.Button, { type: "button", variant: "outline", onClick: onCancel, disabled: isSubmitting || isLoading, children: t("ui.buttons.cancel") }),
699
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBDWV4KYRjs.Button, { type: "submit", disabled: !stripe || isSubmitting || isLoading, children: isSubmitting ? t("billing.ui.wizard.review.processing") : t("billing.ui.cards.payment_method.add_card") })
703
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkJE6QWCNEjs.Button, { type: "button", variant: "outline", onClick: onCancel, disabled: isSubmitting || isLoading, children: t("ui.buttons.cancel") }),
704
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkJE6QWCNEjs.Button, { type: "submit", disabled: !stripe || isSubmitting || isLoading, children: isSubmitting ? t("billing.ui.wizard.review.processing") : t("billing.ui.cards.payment_method.add_card") })
700
705
  ] })
701
706
  ] });
702
707
  }
@@ -713,10 +718,10 @@ function PaymentMethodEditor({ open, onOpenChange, onSuccess }) {
713
718
  const handleCancel = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, () => {
714
719
  onOpenChange(false);
715
720
  }, "handleCancel");
716
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBDWV4KYRjs.Dialog, { open, onOpenChange, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkBDWV4KYRjs.DialogContent, { className: "max-w-md", children: [
717
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkBDWV4KYRjs.DialogHeader, { children: [
718
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBDWV4KYRjs.DialogTitle, { children: t("billing.ui.payment_methods.add") }),
719
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBDWV4KYRjs.DialogDescription, { children: t("billing.ui.payment_methods.add_description") })
721
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkJE6QWCNEjs.Dialog, { open, onOpenChange, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkJE6QWCNEjs.DialogContent, { className: "max-w-md", children: [
722
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkJE6QWCNEjs.DialogHeader, { children: [
723
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkJE6QWCNEjs.DialogTitle, { children: t("billing.ui.payment_methods.add") }),
724
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkJE6QWCNEjs.DialogDescription, { children: t("billing.ui.payment_methods.add_description") })
720
725
  ] }),
721
726
  open && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, PaymentMethodForm, { onSuccess: handleSuccess, onCancel: handleCancel })
722
727
  ] }) });
@@ -742,7 +747,7 @@ function PaymentMethodCard({ paymentMethod, onUpdate }) {
742
747
  _react.useEffect.call(void 0, () => {
743
748
  const loadCustomer = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, async () => {
744
749
  try {
745
- const fetchedCustomer = await _chunkHN7L6RRWjs.StripeCustomerService.getCustomer();
750
+ const fetchedCustomer = await _chunk77JC2UCFjs.StripeCustomerService.getCustomer();
746
751
  setCustomer(fetchedCustomer);
747
752
  } catch (error) {
748
753
  console.error("[PaymentMethodCard] Failed to load customer:", error);
@@ -759,7 +764,7 @@ function PaymentMethodCard({ paymentMethod, onUpdate }) {
759
764
  const handleSetDefault = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, async () => {
760
765
  setLoading(true);
761
766
  try {
762
- await _chunkHN7L6RRWjs.StripeCustomerService.setDefaultPaymentMethod({ paymentMethodId: paymentMethod.id });
767
+ await _chunk77JC2UCFjs.StripeCustomerService.setDefaultPaymentMethod({ paymentMethodId: paymentMethod.id });
763
768
  onUpdate();
764
769
  } catch (error) {
765
770
  console.error("[PaymentMethodCard] Failed to set as default:", error);
@@ -770,7 +775,7 @@ function PaymentMethodCard({ paymentMethod, onUpdate }) {
770
775
  const handleRemove = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, async () => {
771
776
  setLoading(true);
772
777
  try {
773
- await _chunkHN7L6RRWjs.StripeCustomerService.removePaymentMethod({ paymentMethodId: paymentMethod.id });
778
+ await _chunk77JC2UCFjs.StripeCustomerService.removePaymentMethod({ paymentMethodId: paymentMethod.id });
774
779
  setShowRemoveDialog(false);
775
780
  onUpdate();
776
781
  } catch (error) {
@@ -779,16 +784,16 @@ function PaymentMethodCard({ paymentMethod, onUpdate }) {
779
784
  }
780
785
  }, "handleRemove");
781
786
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
782
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkBDWV4KYRjs.Card, { className: "relative", children: [
783
- isDefault && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBDWV4KYRjs.Badge, { variant: "softGreen", className: "absolute end-2 top-2", children: t("billing.ui.payment_methods.default") }),
784
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkBDWV4KYRjs.CardHeader, { className: "flex flex-row items-center justify-between pb-2", children: [
787
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkJE6QWCNEjs.Card, { className: "relative", children: [
788
+ isDefault && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkJE6QWCNEjs.Badge, { variant: "softGreen", className: "absolute end-2 top-2", children: t("billing.ui.payment_methods.default") }),
789
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkJE6QWCNEjs.CardHeader, { className: "flex flex-row items-center justify-between pb-2", children: [
785
790
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center gap-x-2", children: [
786
791
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-2xl", children: brandIcon }),
787
792
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-sm font-medium capitalize", children: brand })
788
793
  ] }),
789
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkBDWV4KYRjs.DropdownMenu, { children: [
790
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBDWV4KYRjs.DropdownMenuTrigger, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
791
- _chunkBDWV4KYRjs.Button,
794
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkJE6QWCNEjs.DropdownMenu, { children: [
795
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkJE6QWCNEjs.DropdownMenuTrigger, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
796
+ _chunkJE6QWCNEjs.Button,
792
797
  {
793
798
  render: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", {}),
794
799
  nativeButton: false,
@@ -799,10 +804,10 @@ function PaymentMethodCard({ paymentMethod, onUpdate }) {
799
804
  children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.MoreVertical, { className: "h-4 w-4" })
800
805
  }
801
806
  ) }),
802
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkBDWV4KYRjs.DropdownMenuContent, { align: "end", children: [
803
- !isDefault && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBDWV4KYRjs.DropdownMenuItem, { onClick: handleSetDefault, disabled: loading, children: t("billing.ui.payment_methods.set_default") }),
807
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkJE6QWCNEjs.DropdownMenuContent, { align: "end", children: [
808
+ !isDefault && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkJE6QWCNEjs.DropdownMenuItem, { onClick: handleSetDefault, disabled: loading, children: t("billing.ui.payment_methods.set_default") }),
804
809
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
805
- _chunkBDWV4KYRjs.DropdownMenuItem,
810
+ _chunkJE6QWCNEjs.DropdownMenuItem,
806
811
  {
807
812
  onClick: () => setShowRemoveDialog(true),
808
813
  disabled: loading,
@@ -813,7 +818,7 @@ function PaymentMethodCard({ paymentMethod, onUpdate }) {
813
818
  ] })
814
819
  ] })
815
820
  ] }),
816
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBDWV4KYRjs.CardContent, { children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-col gap-y-1", children: [
821
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkJE6QWCNEjs.CardContent, { children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-col gap-y-1", children: [
817
822
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "p", { className: "text-lg font-semibold", children: [
818
823
  "\u2022\u2022\u2022\u2022 ",
819
824
  last4
@@ -821,17 +826,17 @@ function PaymentMethodCard({ paymentMethod, onUpdate }) {
821
826
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-sm text-muted-foreground", children: t("billing.ui.payment_method.expires", { date: `${String(expMonth).padStart(2, "0")}/${expYear}` }) })
822
827
  ] }) })
823
828
  ] }),
824
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBDWV4KYRjs.AlertDialog, { open: showRemoveDialog, onOpenChange: setShowRemoveDialog, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkBDWV4KYRjs.AlertDialogContent, { children: [
825
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkBDWV4KYRjs.AlertDialogHeader, { children: [
826
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBDWV4KYRjs.AlertDialogTitle, { children: t("billing.ui.payment_methods.remove_title") }),
827
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkBDWV4KYRjs.AlertDialogDescription, { children: [
829
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkJE6QWCNEjs.AlertDialog, { open: showRemoveDialog, onOpenChange: setShowRemoveDialog, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkJE6QWCNEjs.AlertDialogContent, { children: [
830
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkJE6QWCNEjs.AlertDialogHeader, { children: [
831
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkJE6QWCNEjs.AlertDialogTitle, { children: t("billing.ui.payment_methods.remove_title") }),
832
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkJE6QWCNEjs.AlertDialogDescription, { children: [
828
833
  t("billing.ui.payment_methods.remove_description"),
829
834
  isDefault && ` ${t("billing.ui.payment_methods.remove_default_warning")}`
830
835
  ] })
831
836
  ] }),
832
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkBDWV4KYRjs.AlertDialogFooter, { children: [
833
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBDWV4KYRjs.AlertDialogCancel, { disabled: loading, children: t("ui.buttons.cancel") }),
834
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBDWV4KYRjs.AlertDialogAction, { onClick: handleRemove, disabled: loading, className: "bg-red-600 hover:bg-red-700", children: loading ? t("billing.ui.payment_methods.removing") : t("ui.buttons.remove") })
837
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkJE6QWCNEjs.AlertDialogFooter, { children: [
838
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkJE6QWCNEjs.AlertDialogCancel, { disabled: loading, children: t("ui.buttons.cancel") }),
839
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkJE6QWCNEjs.AlertDialogAction, { onClick: handleRemove, disabled: loading, className: "bg-red-600 hover:bg-red-700", children: loading ? t("billing.ui.payment_methods.removing") : t("ui.buttons.remove") })
835
840
  ] })
836
841
  ] }) })
837
842
  ] });
@@ -855,7 +860,7 @@ function PaymentMethodsContainer() {
855
860
  const loadPaymentMethods = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, async () => {
856
861
  setLoading(true);
857
862
  try {
858
- const fetchedPaymentMethods = await _chunkHN7L6RRWjs.StripeCustomerService.listPaymentMethods();
863
+ const fetchedPaymentMethods = await _chunk77JC2UCFjs.StripeCustomerService.listPaymentMethods();
859
864
  setPaymentMethods(fetchedPaymentMethods);
860
865
  } catch (error) {
861
866
  console.error("[PaymentMethodsContainer] Failed to load payment methods:", error);
@@ -875,14 +880,14 @@ function PaymentMethodsContainer() {
875
880
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.CreditCard, { className: "h-8 w-8" }),
876
881
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h1", { className: "text-primary text-3xl font-semibold", children: t("billing.ui.payment_methods.title") })
877
882
  ] }),
878
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBDWV4KYRjs.Button, { onClick: () => setShowAddPaymentMethod(true), children: t("billing.ui.payment_methods.add") })
883
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkJE6QWCNEjs.Button, { onClick: () => setShowAddPaymentMethod(true), children: t("billing.ui.payment_methods.add") })
879
884
  ] }),
880
885
  paymentMethods.length === 0 && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-col items-center justify-center gap-y-4 rounded-lg border-2 border-dashed border-gray-300 bg-muted/50 p-12", children: [
881
886
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.CreditCard, { className: "h-16 w-16 text-muted-foreground" }),
882
887
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "text-center", children: [
883
888
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h3", { className: "mb-2 text-sm font-medium", children: t("billing.ui.payment_methods.empty_title") }),
884
889
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "mb-4 text-muted-foreground", children: t("billing.ui.payment_methods.empty_description") }),
885
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBDWV4KYRjs.Button, { onClick: () => setShowAddPaymentMethod(true), children: t("billing.ui.payment_methods.add_first") })
890
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkJE6QWCNEjs.Button, { onClick: () => setShowAddPaymentMethod(true), children: t("billing.ui.payment_methods.add_first") })
886
891
  ] })
887
892
  ] }),
888
893
  paymentMethods.length > 0 && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, PaymentMethodsList, { paymentMethods, onUpdate: loadPaymentMethods }),
@@ -938,7 +943,7 @@ var statusConfig = {
938
943
  function InvoiceStatusBadge({ status }) {
939
944
  const t = _nextintl.useTranslations.call(void 0, );
940
945
  const config = statusConfig[status] || statusConfig["draft" /* DRAFT */];
941
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBDWV4KYRjs.Badge, { variant: config.variant, children: t(config.label) });
946
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkJE6QWCNEjs.Badge, { variant: config.variant, children: t(config.label) });
942
947
  }
943
948
  _chunk7QVYU63Ejs.__name.call(void 0, InvoiceStatusBadge, "InvoiceStatusBadge");
944
949
 
@@ -951,7 +956,7 @@ function InvoiceDetails({
951
956
  onInvoiceChange: _onInvoiceChange
952
957
  }) {
953
958
  const t = _nextintl.useTranslations.call(void 0, );
954
- const fmt = _chunkBDWV4KYRjs.useBillingFormatOptions.call(void 0, );
959
+ const fmt = _chunkJE6QWCNEjs.useBillingFormatOptions.call(void 0, );
955
960
  const handleDownloadPDF = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, () => {
956
961
  if (invoice.stripePdfUrl) {
957
962
  window.open(invoice.stripePdfUrl, "_blank");
@@ -971,10 +976,10 @@ function InvoiceDetails({
971
976
  return invoice.stripeInvoiceId.slice(-8);
972
977
  }, "getInvoiceNumber");
973
978
  const productName = _optionalChain([invoice, 'access', _29 => _29.subscription, 'optionalAccess', _30 => _30.price, 'optionalAccess', _31 => _31.product, 'optionalAccess', _32 => _32.name]) || t("billing.ui.cards.subscriptions.fallback_name");
974
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBDWV4KYRjs.Dialog, { open, onOpenChange, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkBDWV4KYRjs.DialogContent, { className: "max-w-2xl", children: [
975
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkBDWV4KYRjs.DialogHeader, { children: [
976
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBDWV4KYRjs.DialogTitle, { children: t("billing.ui.invoice.title", { number: getInvoiceNumber() }) }),
977
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBDWV4KYRjs.DialogDescription, { children: _chunkBDWV4KYRjs.formatDate.call(void 0, invoice.periodStart, fmt) })
979
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkJE6QWCNEjs.Dialog, { open, onOpenChange, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkJE6QWCNEjs.DialogContent, { className: "max-w-2xl", children: [
980
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkJE6QWCNEjs.DialogHeader, { children: [
981
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkJE6QWCNEjs.DialogTitle, { children: t("billing.ui.invoice.title", { number: getInvoiceNumber() }) }),
982
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkJE6QWCNEjs.DialogDescription, { children: _chunkJE6QWCNEjs.formatDate.call(void 0, invoice.periodStart, fmt) })
978
983
  ] }),
979
984
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-6", children: [
980
985
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center gap-x-3", children: [
@@ -985,18 +990,18 @@ function InvoiceDetails({
985
990
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { children: [
986
991
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-muted-foreground text-xs", children: t("billing.ui.invoice.billing_period") }),
987
992
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "p", { className: "text-sm", children: [
988
- _chunkBDWV4KYRjs.formatDate.call(void 0, invoice.periodStart, fmt),
993
+ _chunkJE6QWCNEjs.formatDate.call(void 0, invoice.periodStart, fmt),
989
994
  " - ",
990
- _chunkBDWV4KYRjs.formatDate.call(void 0, invoice.periodEnd, fmt)
995
+ _chunkJE6QWCNEjs.formatDate.call(void 0, invoice.periodEnd, fmt)
991
996
  ] })
992
997
  ] }),
993
998
  invoice.dueDate && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { children: [
994
999
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-muted-foreground text-xs", children: t("billing.ui.invoice.due_date") }),
995
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-sm", children: _chunkBDWV4KYRjs.formatDate.call(void 0, invoice.dueDate, fmt) })
1000
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-sm", children: _chunkJE6QWCNEjs.formatDate.call(void 0, invoice.dueDate, fmt) })
996
1001
  ] }),
997
1002
  invoice.paidAt && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { children: [
998
1003
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-muted-foreground text-xs", children: t("billing.ui.invoice.paid_date") }),
999
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-sm", children: _chunkBDWV4KYRjs.formatDate.call(void 0, invoice.paidAt, fmt) })
1004
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-sm", children: _chunkJE6QWCNEjs.formatDate.call(void 0, invoice.paidAt, fmt) })
1000
1005
  ] }),
1001
1006
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { children: [
1002
1007
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-muted-foreground text-xs", children: t("billing.ui.invoice.attempt_count") }),
@@ -1012,42 +1017,42 @@ function InvoiceDetails({
1012
1017
  ] }) }),
1013
1018
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "tbody", { children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "tr", { className: "border-t", children: [
1014
1019
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "td", { className: "p-3", children: productName }),
1015
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "td", { className: "p-3 text-end", children: _chunkHN7L6RRWjs.formatCurrency.call(void 0, invoice.subtotal, invoice.currency, fmt) })
1020
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "td", { className: "p-3 text-end", children: _chunk77JC2UCFjs.formatCurrency.call(void 0, invoice.subtotal, invoice.currency, fmt) })
1016
1021
  ] }) })
1017
1022
  ] }) })
1018
1023
  ] }),
1019
1024
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-2 border-t pt-4", children: [
1020
1025
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex justify-between", children: [
1021
1026
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-muted-foreground text-xs", children: t("billing.ui.invoice.subtotal") }),
1022
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-sm", children: _chunkHN7L6RRWjs.formatCurrency.call(void 0, invoice.subtotal, invoice.currency, fmt) })
1027
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-sm", children: _chunk77JC2UCFjs.formatCurrency.call(void 0, invoice.subtotal, invoice.currency, fmt) })
1023
1028
  ] }),
1024
1029
  invoice.tax !== void 0 && invoice.tax > 0 && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex justify-between", children: [
1025
1030
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-muted-foreground text-xs", children: t("billing.ui.invoice.tax") }),
1026
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-sm", children: _chunkHN7L6RRWjs.formatCurrency.call(void 0, invoice.tax, invoice.currency, fmt) })
1031
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-sm", children: _chunk77JC2UCFjs.formatCurrency.call(void 0, invoice.tax, invoice.currency, fmt) })
1027
1032
  ] }),
1028
1033
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex justify-between text-lg font-semibold border-t pt-2", children: [
1029
1034
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: t("billing.ui.invoice.total") }),
1030
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: _chunkHN7L6RRWjs.formatCurrency.call(void 0, invoice.total, invoice.currency, fmt) })
1035
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: _chunk77JC2UCFjs.formatCurrency.call(void 0, invoice.total, invoice.currency, fmt) })
1031
1036
  ] }),
1032
1037
  invoice.amountPaid > 0 && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex justify-between", children: [
1033
1038
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-muted-foreground text-xs", children: t("billing.ui.invoice.amount_paid") }),
1034
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-sm text-success", children: _chunkHN7L6RRWjs.formatCurrency.call(void 0, invoice.amountPaid, invoice.currency, fmt) })
1039
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-sm text-success", children: _chunk77JC2UCFjs.formatCurrency.call(void 0, invoice.amountPaid, invoice.currency, fmt) })
1035
1040
  ] }),
1036
1041
  invoice.amountRemaining > 0 && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex justify-between", children: [
1037
1042
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-muted-foreground text-xs", children: t("billing.ui.invoice.amount_due") }),
1038
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-sm text-destructive", children: _chunkHN7L6RRWjs.formatCurrency.call(void 0, invoice.amountRemaining, invoice.currency, fmt) })
1043
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-sm text-destructive", children: _chunk77JC2UCFjs.formatCurrency.call(void 0, invoice.amountRemaining, invoice.currency, fmt) })
1039
1044
  ] })
1040
1045
  ] }),
1041
1046
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-wrap gap-2 pt-4 border-t", children: [
1042
- invoice.stripePdfUrl && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkBDWV4KYRjs.Button, { variant: "outline", onClick: handleDownloadPDF, children: [
1047
+ invoice.stripePdfUrl && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkJE6QWCNEjs.Button, { variant: "outline", onClick: handleDownloadPDF, children: [
1043
1048
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.Download, { className: "me-2 h-4 w-4" }),
1044
1049
  t("billing.ui.invoice.download_pdf")
1045
1050
  ] }),
1046
- invoice.status === "open" /* OPEN */ && invoice.attempted && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkBDWV4KYRjs.Button, { variant: "default", onClick: handleRetryPayment, children: [
1051
+ invoice.status === "open" /* OPEN */ && invoice.attempted && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkJE6QWCNEjs.Button, { variant: "default", onClick: handleRetryPayment, children: [
1047
1052
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.RefreshCw, { className: "me-2 h-4 w-4" }),
1048
1053
  t("billing.ui.invoice.retry_payment")
1049
1054
  ] }),
1050
- invoice.stripeHostedInvoiceUrl && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkBDWV4KYRjs.Button, { variant: "outline", onClick: handleViewInStripe, children: [
1055
+ invoice.stripeHostedInvoiceUrl && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkJE6QWCNEjs.Button, { variant: "outline", onClick: handleViewInStripe, children: [
1051
1056
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.ExternalLink, { className: "me-2 h-4 w-4" }),
1052
1057
  t("billing.ui.invoice.view_in_stripe")
1053
1058
  ] })
@@ -1061,7 +1066,7 @@ _chunk7QVYU63Ejs.__name.call(void 0, InvoiceDetails, "InvoiceDetails");
1061
1066
 
1062
1067
  function InvoicesList({ invoices, onInvoicesChange }) {
1063
1068
  const t = _nextintl.useTranslations.call(void 0, );
1064
- const fmt = _chunkBDWV4KYRjs.useBillingFormatOptions.call(void 0, );
1069
+ const fmt = _chunkJE6QWCNEjs.useBillingFormatOptions.call(void 0, );
1065
1070
  const [selectedInvoice, setSelectedInvoice] = _react.useState.call(void 0, null);
1066
1071
  const handleRowClick = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (invoice) => {
1067
1072
  setSelectedInvoice(invoice);
@@ -1073,30 +1078,30 @@ function InvoicesList({ invoices, onInvoicesChange }) {
1073
1078
  return invoice.stripeInvoiceId.slice(-8);
1074
1079
  }, "getInvoiceNumber");
1075
1080
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
1076
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "border rounded-lg overflow-clip", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkBDWV4KYRjs.Table, { children: [
1077
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBDWV4KYRjs.TableHeader, { className: "bg-muted", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkBDWV4KYRjs.TableRow, { children: [
1078
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBDWV4KYRjs.TableHead, { children: t("billing.ui.columns.invoice_number") }),
1079
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBDWV4KYRjs.TableHead, { children: t("billing.ui.columns.date") }),
1080
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBDWV4KYRjs.TableHead, { children: t("billing.ui.columns.status") }),
1081
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBDWV4KYRjs.TableHead, { className: "text-end", children: t("billing.ui.columns.amount") }),
1082
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBDWV4KYRjs.TableHead, { children: t("billing.ui.columns.period") })
1081
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "border rounded-lg overflow-clip", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkJE6QWCNEjs.Table, { children: [
1082
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkJE6QWCNEjs.TableHeader, { className: "bg-muted", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkJE6QWCNEjs.TableRow, { children: [
1083
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkJE6QWCNEjs.TableHead, { children: t("billing.ui.columns.invoice_number") }),
1084
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkJE6QWCNEjs.TableHead, { children: t("billing.ui.columns.date") }),
1085
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkJE6QWCNEjs.TableHead, { children: t("billing.ui.columns.status") }),
1086
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkJE6QWCNEjs.TableHead, { className: "text-end", children: t("billing.ui.columns.amount") }),
1087
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkJE6QWCNEjs.TableHead, { children: t("billing.ui.columns.period") })
1083
1088
  ] }) }),
1084
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBDWV4KYRjs.TableBody, { children: invoices.map((invoice) => {
1089
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkJE6QWCNEjs.TableBody, { children: invoices.map((invoice) => {
1085
1090
  const invoiceNumber = getInvoiceNumber(invoice);
1086
- const date = _chunkBDWV4KYRjs.formatDate.call(void 0, invoice.periodStart, fmt);
1087
- const amount = _chunkHN7L6RRWjs.formatCurrency.call(void 0, invoice.total, invoice.currency, fmt);
1088
- const period = `${_chunkBDWV4KYRjs.formatDate.call(void 0, invoice.periodStart, fmt)} - ${_chunkBDWV4KYRjs.formatDate.call(void 0, invoice.periodEnd, fmt)}`;
1091
+ const date = _chunkJE6QWCNEjs.formatDate.call(void 0, invoice.periodStart, fmt);
1092
+ const amount = _chunk77JC2UCFjs.formatCurrency.call(void 0, invoice.total, invoice.currency, fmt);
1093
+ const period = `${_chunkJE6QWCNEjs.formatDate.call(void 0, invoice.periodStart, fmt)} - ${_chunkJE6QWCNEjs.formatDate.call(void 0, invoice.periodEnd, fmt)}`;
1089
1094
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
1090
- _chunkBDWV4KYRjs.TableRow,
1095
+ _chunkJE6QWCNEjs.TableRow,
1091
1096
  {
1092
1097
  onClick: () => handleRowClick(invoice),
1093
1098
  className: "cursor-pointer hover:bg-muted/50",
1094
1099
  children: [
1095
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBDWV4KYRjs.TableCell, { className: "font-medium", children: invoiceNumber }),
1096
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBDWV4KYRjs.TableCell, { className: "text-muted-foreground text-xs", children: date }),
1097
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBDWV4KYRjs.TableCell, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, InvoiceStatusBadge, { status: invoice.status }) }),
1098
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBDWV4KYRjs.TableCell, { className: "text-end font-medium", children: amount }),
1099
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBDWV4KYRjs.TableCell, { className: "text-muted-foreground text-xs", children: period })
1100
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkJE6QWCNEjs.TableCell, { className: "font-medium", children: invoiceNumber }),
1101
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkJE6QWCNEjs.TableCell, { className: "text-muted-foreground text-xs", children: date }),
1102
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkJE6QWCNEjs.TableCell, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, InvoiceStatusBadge, { status: invoice.status }) }),
1103
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkJE6QWCNEjs.TableCell, { className: "text-end font-medium", children: amount }),
1104
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkJE6QWCNEjs.TableCell, { className: "text-muted-foreground text-xs", children: period })
1100
1105
  ]
1101
1106
  },
1102
1107
  invoice.id
@@ -1130,7 +1135,7 @@ function InvoicesContainer() {
1130
1135
  setLoading(true);
1131
1136
  try {
1132
1137
  const params = statusFilter !== "all" ? { status: statusFilter } : void 0;
1133
- const data = await _chunkHN7L6RRWjs.StripeInvoiceService.listInvoices(params);
1138
+ const data = await _chunk77JC2UCFjs.StripeInvoiceService.listInvoices(params);
1134
1139
  setInvoices(data);
1135
1140
  } catch (error) {
1136
1141
  console.error("[InvoicesContainer] Failed to load invoices:", error);
@@ -1146,12 +1151,12 @@ function InvoicesContainer() {
1146
1151
  setStatusFilter(value);
1147
1152
  }, "handleFilterChange");
1148
1153
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-4", children: [
1149
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBDWV4KYRjs.Tabs, { value: statusFilter, onValueChange: handleFilterChange, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkBDWV4KYRjs.TabsList, { children: [
1150
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBDWV4KYRjs.TabsTrigger, { value: "all", children: t("billing.ui.invoices.filter_all") }),
1151
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBDWV4KYRjs.TabsTrigger, { value: "paid" /* PAID */, children: t("billing.ui.invoice_status.paid") }),
1152
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBDWV4KYRjs.TabsTrigger, { value: "open" /* OPEN */, children: t("billing.ui.invoice_status.open") }),
1153
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBDWV4KYRjs.TabsTrigger, { value: "void" /* VOID */, children: t("billing.ui.invoice_status.void") }),
1154
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBDWV4KYRjs.TabsTrigger, { value: "uncollectible" /* UNCOLLECTIBLE */, children: t("billing.ui.invoice_status.uncollectible") })
1154
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkJE6QWCNEjs.Tabs, { value: statusFilter, onValueChange: handleFilterChange, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkJE6QWCNEjs.TabsList, { children: [
1155
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkJE6QWCNEjs.TabsTrigger, { value: "all", children: t("billing.ui.invoices.filter_all") }),
1156
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkJE6QWCNEjs.TabsTrigger, { value: "paid" /* PAID */, children: t("billing.ui.invoice_status.paid") }),
1157
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkJE6QWCNEjs.TabsTrigger, { value: "open" /* OPEN */, children: t("billing.ui.invoice_status.open") }),
1158
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkJE6QWCNEjs.TabsTrigger, { value: "void" /* VOID */, children: t("billing.ui.invoice_status.void") }),
1159
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkJE6QWCNEjs.TabsTrigger, { value: "uncollectible" /* UNCOLLECTIBLE */, children: t("billing.ui.invoice_status.uncollectible") })
1155
1160
  ] }) }),
1156
1161
  loading && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "text-center py-8 text-muted-foreground", children: t("billing.ui.invoices.loading") }),
1157
1162
  !loading && invoices.length === 0 && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "border border-dashed border-gray-300 rounded-lg p-8 text-center", children: [
@@ -1193,7 +1198,7 @@ function CancelSubscriptionDialog({
1193
1198
  onSuccess
1194
1199
  }) {
1195
1200
  const t = _nextintl.useTranslations.call(void 0, );
1196
- const fmt = _chunkBDWV4KYRjs.useBillingFormatOptions.call(void 0, );
1201
+ const fmt = _chunkJE6QWCNEjs.useBillingFormatOptions.call(void 0, );
1197
1202
  const [isSubmitting, setIsSubmitting] = _react.useState.call(void 0, false);
1198
1203
  const form = _reacthookform.useForm.call(void 0, {
1199
1204
  resolver: _zod.zodResolver.call(void 0, formSchema),
@@ -1204,7 +1209,7 @@ function CancelSubscriptionDialog({
1204
1209
  const onSubmit = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, async (_values) => {
1205
1210
  setIsSubmitting(true);
1206
1211
  try {
1207
- await _chunkHN7L6RRWjs.StripeSubscriptionService.cancelSubscription({
1212
+ await _chunk77JC2UCFjs.StripeSubscriptionService.cancelSubscription({
1208
1213
  id: subscription.id,
1209
1214
  cancelImmediately: false
1210
1215
  });
@@ -1216,16 +1221,16 @@ function CancelSubscriptionDialog({
1216
1221
  setIsSubmitting(false);
1217
1222
  }
1218
1223
  }, "onSubmit");
1219
- const periodEndDate = _chunkBDWV4KYRjs.formatDate.call(void 0, subscription.currentPeriodEnd, fmt);
1220
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBDWV4KYRjs.Dialog, { open, onOpenChange, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkBDWV4KYRjs.DialogContent, { className: "max-w-md", children: [
1221
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkBDWV4KYRjs.DialogHeader, { children: [
1222
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBDWV4KYRjs.DialogTitle, { children: t("billing.ui.subscription.cancel.title") }),
1223
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBDWV4KYRjs.DialogDescription, { children: t("billing.ui.subscription.cancel.description") })
1224
+ const periodEndDate = _chunkJE6QWCNEjs.formatDate.call(void 0, subscription.currentPeriodEnd, fmt);
1225
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkJE6QWCNEjs.Dialog, { open, onOpenChange, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkJE6QWCNEjs.DialogContent, { className: "max-w-md", children: [
1226
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkJE6QWCNEjs.DialogHeader, { children: [
1227
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkJE6QWCNEjs.DialogTitle, { children: t("billing.ui.subscription.cancel.title") }),
1228
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkJE6QWCNEjs.DialogDescription, { children: t("billing.ui.subscription.cancel.description") })
1224
1229
  ] }),
1225
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBDWV4KYRjs.Form, { ...form, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "form", { onSubmit: form.handleSubmit(onSubmit), className: "flex flex-col gap-y-4", children: [
1230
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkJE6QWCNEjs.Form, { ...form, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "form", { onSubmit: form.handleSubmit(onSubmit), className: "flex flex-col gap-y-4", children: [
1226
1231
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "bg-primary/10 border-primary/30 text-foreground rounded-lg border p-3 text-sm", children: t("billing.ui.subscription.cancel.remains_active", { date: periodEndDate }) }),
1227
1232
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1228
- _chunkBDWV4KYRjs.FormTextarea,
1233
+ _chunkJE6QWCNEjs.FormTextarea,
1229
1234
  {
1230
1235
  form,
1231
1236
  id: "reason",
@@ -1235,8 +1240,8 @@ function CancelSubscriptionDialog({
1235
1240
  }
1236
1241
  ),
1237
1242
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex gap-x-2 justify-end pt-2", children: [
1238
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBDWV4KYRjs.Button, { type: "button", variant: "outline", onClick: () => onOpenChange(false), disabled: isSubmitting, children: t("billing.ui.subscription.cancel.keep") }),
1239
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBDWV4KYRjs.Button, { type: "submit", variant: "destructive", disabled: isSubmitting, children: isSubmitting ? t("billing.ui.subscription.cancel.canceling") : t("billing.ui.subscription.cancel.confirm") })
1243
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkJE6QWCNEjs.Button, { type: "button", variant: "outline", onClick: () => onOpenChange(false), disabled: isSubmitting, children: t("billing.ui.subscription.cancel.keep") }),
1244
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkJE6QWCNEjs.Button, { type: "submit", variant: "destructive", disabled: isSubmitting, children: isSubmitting ? t("billing.ui.subscription.cancel.canceling") : t("billing.ui.subscription.cancel.confirm") })
1240
1245
  ] })
1241
1246
  ] }) })
1242
1247
  ] }) });
@@ -1287,7 +1292,7 @@ var cancelingConfig = {
1287
1292
  function SubscriptionStatusBadge({ status, cancelAtPeriodEnd }) {
1288
1293
  const t = _nextintl.useTranslations.call(void 0, );
1289
1294
  const config = cancelAtPeriodEnd ? cancelingConfig : statusConfig2[status] || statusConfig2["canceled" /* CANCELED */];
1290
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBDWV4KYRjs.Badge, { variant: config.variant, children: t(config.label) });
1295
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkJE6QWCNEjs.Badge, { variant: config.variant, children: t(config.label) });
1291
1296
  }
1292
1297
  _chunk7QVYU63Ejs.__name.call(void 0, SubscriptionStatusBadge, "SubscriptionStatusBadge");
1293
1298
 
@@ -1314,7 +1319,7 @@ function formatPlanName2(price, t) {
1314
1319
  _chunk7QVYU63Ejs.__name.call(void 0, formatPlanName2, "formatPlanName");
1315
1320
  function formatBillingAmount(price, notAvailable, fmt) {
1316
1321
  if (!_optionalChain([price, 'optionalAccess', _37 => _37.unitAmount])) return notAvailable;
1317
- return _chunkHN7L6RRWjs.formatCurrency.call(void 0, price.unitAmount, price.currency, fmt);
1322
+ return _chunk77JC2UCFjs.formatCurrency.call(void 0, price.unitAmount, price.currency, fmt);
1318
1323
  }
1319
1324
  _chunk7QVYU63Ejs.__name.call(void 0, formatBillingAmount, "formatBillingAmount");
1320
1325
  function SubscriptionDetails({
@@ -1326,11 +1331,11 @@ function SubscriptionDetails({
1326
1331
  renderCancelDialog
1327
1332
  }) {
1328
1333
  const t = _nextintl.useTranslations.call(void 0, );
1329
- const fmt = _chunkBDWV4KYRjs.useBillingFormatOptions.call(void 0, );
1334
+ const fmt = _chunkJE6QWCNEjs.useBillingFormatOptions.call(void 0, );
1330
1335
  const [showCancel, setShowCancel] = _react.useState.call(void 0, false);
1331
1336
  const handleManageViaPortal = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, async () => {
1332
1337
  try {
1333
- const { url } = await _chunkHN7L6RRWjs.StripeCustomerService.createPortalSession();
1338
+ const { url } = await _chunk77JC2UCFjs.StripeCustomerService.createPortalSession();
1334
1339
  window.open(url, "_blank");
1335
1340
  } catch (error) {
1336
1341
  console.error("[SubscriptionDetails] Failed to create portal session:", error);
@@ -1338,10 +1343,10 @@ function SubscriptionDetails({
1338
1343
  }, "handleManageViaPortal");
1339
1344
  const canCancel = subscription.status === "active" /* ACTIVE */ || subscription.status === "trialing" /* TRIALING */ || subscription.status === "paused" /* PAUSED */;
1340
1345
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
1341
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBDWV4KYRjs.Dialog, { open, onOpenChange, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkBDWV4KYRjs.DialogContent, { className: "max-w-2xl", children: [
1342
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkBDWV4KYRjs.DialogHeader, { children: [
1343
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBDWV4KYRjs.DialogTitle, { children: t("billing.ui.subscription.details_title") }),
1344
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBDWV4KYRjs.DialogDescription, { children: t("billing.ui.subscription.details_description") })
1346
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkJE6QWCNEjs.Dialog, { open, onOpenChange, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkJE6QWCNEjs.DialogContent, { className: "max-w-2xl", children: [
1347
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkJE6QWCNEjs.DialogHeader, { children: [
1348
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkJE6QWCNEjs.DialogTitle, { children: t("billing.ui.subscription.details_title") }),
1349
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkJE6QWCNEjs.DialogDescription, { children: t("billing.ui.subscription.details_description") })
1345
1350
  ] }),
1346
1351
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-6", children: [
1347
1352
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center gap-x-3", children: [
@@ -1367,22 +1372,22 @@ function SubscriptionDetails({
1367
1372
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "space-y-2", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex justify-between", children: [
1368
1373
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-muted-foreground text-xs", children: t("billing.ui.subscription.current_period") }),
1369
1374
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "text-sm", children: [
1370
- _chunkBDWV4KYRjs.formatDate.call(void 0, subscription.currentPeriodStart, fmt),
1375
+ _chunkJE6QWCNEjs.formatDate.call(void 0, subscription.currentPeriodStart, fmt),
1371
1376
  " - ",
1372
- _chunkBDWV4KYRjs.formatDate.call(void 0, subscription.currentPeriodEnd, fmt)
1377
+ _chunkJE6QWCNEjs.formatDate.call(void 0, subscription.currentPeriodEnd, fmt)
1373
1378
  ] })
1374
1379
  ] }) }),
1375
1380
  subscription.trialEnd && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex justify-between", children: [
1376
1381
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-muted-foreground text-xs", children: t("billing.ui.subscription.trial_ends") }),
1377
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-sm", children: _chunkBDWV4KYRjs.formatDate.call(void 0, subscription.trialEnd, fmt) })
1382
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-sm", children: _chunkJE6QWCNEjs.formatDate.call(void 0, subscription.trialEnd, fmt) })
1378
1383
  ] }),
1379
1384
  subscription.cancelAtPeriodEnd && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "bg-warning/15 border-warning/30 rounded-lg border p-3", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-warning text-xs/relaxed", children: t("billing.ui.subscription.cancel_at_period_end", {
1380
- date: _chunkBDWV4KYRjs.formatDate.call(void 0, subscription.currentPeriodEnd, fmt)
1385
+ date: _chunkJE6QWCNEjs.formatDate.call(void 0, subscription.currentPeriodEnd, fmt)
1381
1386
  }) }) }),
1382
1387
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-wrap gap-2 pt-4 border-t", children: [
1383
- onChangePlan && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBDWV4KYRjs.Button, { variant: "default", onClick: () => onChangePlan(subscription), children: t("billing.ui.subscription.change_plan") }),
1384
- canCancel && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBDWV4KYRjs.Button, { variant: "destructive", onClick: () => setShowCancel(true), children: t("ui.buttons.cancel") }),
1385
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBDWV4KYRjs.Button, { variant: "outline", onClick: handleManageViaPortal, children: t("billing.ui.subscription.manage_portal") })
1388
+ onChangePlan && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkJE6QWCNEjs.Button, { variant: "default", onClick: () => onChangePlan(subscription), children: t("billing.ui.subscription.change_plan") }),
1389
+ canCancel && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkJE6QWCNEjs.Button, { variant: "destructive", onClick: () => setShowCancel(true), children: t("ui.buttons.cancel") }),
1390
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkJE6QWCNEjs.Button, { variant: "outline", onClick: handleManageViaPortal, children: t("billing.ui.subscription.manage_portal") })
1386
1391
  ] })
1387
1392
  ] })
1388
1393
  ] }) }),
@@ -1442,46 +1447,46 @@ function SubscriptionsList({
1442
1447
  renderCancelDialog
1443
1448
  }) {
1444
1449
  const t = _nextintl.useTranslations.call(void 0, );
1445
- const fmt = _chunkBDWV4KYRjs.useBillingFormatOptions.call(void 0, );
1450
+ const fmt = _chunkJE6QWCNEjs.useBillingFormatOptions.call(void 0, );
1446
1451
  const [selectedSub, setSelectedSub] = _react.useState.call(void 0, null);
1447
1452
  const handleRowClick = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (subscription) => {
1448
1453
  setSelectedSub(subscription);
1449
1454
  }, "handleRowClick");
1450
1455
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
1451
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "border rounded-lg overflow-clip", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkBDWV4KYRjs.Table, { children: [
1452
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBDWV4KYRjs.TableHeader, { className: "bg-muted", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkBDWV4KYRjs.TableRow, { children: [
1453
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBDWV4KYRjs.TableHead, { children: t("billing.ui.columns.status") }),
1454
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBDWV4KYRjs.TableHead, { children: t("billing.ui.columns.plan") }),
1455
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBDWV4KYRjs.TableHead, { children: t("billing.ui.columns.period") }),
1456
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBDWV4KYRjs.TableHead, { className: "text-end", children: t("billing.ui.columns.amount") }),
1457
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBDWV4KYRjs.TableHead, { className: "text-end", children: t("billing.ui.columns.actions") })
1456
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "border rounded-lg overflow-clip", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkJE6QWCNEjs.Table, { children: [
1457
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkJE6QWCNEjs.TableHeader, { className: "bg-muted", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkJE6QWCNEjs.TableRow, { children: [
1458
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkJE6QWCNEjs.TableHead, { children: t("billing.ui.columns.status") }),
1459
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkJE6QWCNEjs.TableHead, { children: t("billing.ui.columns.plan") }),
1460
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkJE6QWCNEjs.TableHead, { children: t("billing.ui.columns.period") }),
1461
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkJE6QWCNEjs.TableHead, { className: "text-end", children: t("billing.ui.columns.amount") }),
1462
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkJE6QWCNEjs.TableHead, { className: "text-end", children: t("billing.ui.columns.actions") })
1458
1463
  ] }) }),
1459
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBDWV4KYRjs.TableBody, { children: subscriptions.map((subscription) => {
1464
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkJE6QWCNEjs.TableBody, { children: subscriptions.map((subscription) => {
1460
1465
  const price = subscription.price;
1461
- const amount = _optionalChain([price, 'optionalAccess', _42 => _42.unitAmount]) ? _chunkHN7L6RRWjs.formatCurrency.call(void 0, price.unitAmount, price.currency, fmt) : "0";
1462
- const discountedAmount = price ? _chunkBDWV4KYRjs.applyDiscount.call(void 0, price.unitAmount, _chunkBDWV4KYRjs.subscriptionDiscount.call(void 0, subscription)) : null;
1463
- const period = `${_chunkBDWV4KYRjs.formatDate.call(void 0, subscription.currentPeriodStart, fmt)} - ${_chunkBDWV4KYRjs.formatDate.call(void 0, subscription.currentPeriodEnd, fmt)}`;
1466
+ const amount = _optionalChain([price, 'optionalAccess', _42 => _42.unitAmount]) ? _chunk77JC2UCFjs.formatCurrency.call(void 0, price.unitAmount, price.currency, fmt) : "0";
1467
+ const discountedAmount = price ? _chunkJE6QWCNEjs.applyDiscount.call(void 0, price.unitAmount, _chunkJE6QWCNEjs.subscriptionDiscount.call(void 0, subscription)) : null;
1468
+ const period = `${_chunkJE6QWCNEjs.formatDate.call(void 0, subscription.currentPeriodStart, fmt)} - ${_chunkJE6QWCNEjs.formatDate.call(void 0, subscription.currentPeriodEnd, fmt)}`;
1464
1469
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
1465
- _chunkBDWV4KYRjs.TableRow,
1470
+ _chunkJE6QWCNEjs.TableRow,
1466
1471
  {
1467
1472
  onClick: () => handleRowClick(subscription),
1468
1473
  className: "cursor-pointer hover:bg-muted/50",
1469
1474
  children: [
1470
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBDWV4KYRjs.TableCell, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1475
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkJE6QWCNEjs.TableCell, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1471
1476
  SubscriptionStatusBadge,
1472
1477
  {
1473
1478
  status: subscription.status,
1474
1479
  cancelAtPeriodEnd: subscription.cancelAtPeriodEnd
1475
1480
  }
1476
1481
  ) }),
1477
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBDWV4KYRjs.TableCell, { className: "font-medium", children: formatPlanName3(price, t) }),
1478
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBDWV4KYRjs.TableCell, { className: "text-muted-foreground text-sm", children: period }),
1479
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBDWV4KYRjs.TableCell, { className: "text-end font-medium", children: discountedAmount !== null && price ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
1482
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkJE6QWCNEjs.TableCell, { className: "font-medium", children: formatPlanName3(price, t) }),
1483
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkJE6QWCNEjs.TableCell, { className: "text-muted-foreground text-sm", children: period }),
1484
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkJE6QWCNEjs.TableCell, { className: "text-end font-medium", children: discountedAmount !== null && price ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
1480
1485
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "line-through text-muted-foreground me-2", children: amount }),
1481
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-success", children: _chunkHN7L6RRWjs.formatCurrency.call(void 0, discountedAmount, price.currency, fmt) })
1486
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-success", children: _chunk77JC2UCFjs.formatCurrency.call(void 0, discountedAmount, price.currency, fmt) })
1482
1487
  ] }) : amount }),
1483
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBDWV4KYRjs.TableCell, { className: "text-end", children: (subscription.status === "active" /* ACTIVE */ || subscription.status === "trialing" /* TRIALING */) && onChangePlan && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1484
- _chunkBDWV4KYRjs.Button,
1488
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkJE6QWCNEjs.TableCell, { className: "text-end", children: (subscription.status === "active" /* ACTIVE */ || subscription.status === "trialing" /* TRIALING */) && onChangePlan && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1489
+ _chunkJE6QWCNEjs.Button,
1485
1490
  {
1486
1491
  size: "sm",
1487
1492
  variant: "outline",
@@ -1541,7 +1546,7 @@ function SubscriptionsContainer({
1541
1546
  }
1542
1547
  setLoading(true);
1543
1548
  try {
1544
- const fetchedSubscriptions = await _chunkHN7L6RRWjs.StripeSubscriptionService.listSubscriptions();
1549
+ const fetchedSubscriptions = await _chunk77JC2UCFjs.StripeSubscriptionService.listSubscriptions();
1545
1550
  setSubscriptions(fetchedSubscriptions);
1546
1551
  } catch (error) {
1547
1552
  console.error("[SubscriptionsContainer] Failed to load subscriptions:", error);
@@ -1564,7 +1569,7 @@ function SubscriptionsContainer({
1564
1569
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.CreditCard, { className: "h-8 w-8" }),
1565
1570
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h1", { className: "text-primary text-3xl font-semibold", children: t("billing.ui.subscriptions.title") })
1566
1571
  ] }),
1567
- subscriptions.length > 0 && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBDWV4KYRjs.Button, { onClick: () => _optionalChain([onOpenWizard, 'optionalCall', _44 => _44()]), children: hasActiveRecurringSubscription ? t("billing.ui.subscriptions.purchase_addons") : t("billing.ui.subscriptions.subscribe") })
1572
+ subscriptions.length > 0 && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkJE6QWCNEjs.Button, { onClick: () => _optionalChain([onOpenWizard, 'optionalCall', _44 => _44()]), children: hasActiveRecurringSubscription ? t("billing.ui.subscriptions.purchase_addons") : t("billing.ui.subscriptions.subscribe") })
1568
1573
  ] }),
1569
1574
  criticalSubscriptions.map((subscription) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, BillingAlertBanner, { subscription }, subscription.id)),
1570
1575
  subscriptions.length === 0 && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-col items-center justify-center py-12 space-y-4", children: [
@@ -1572,7 +1577,7 @@ function SubscriptionsContainer({
1572
1577
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "text-center", children: [
1573
1578
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h3", { className: "text-sm font-medium mb-2", children: t("billing.ui.subscriptions.empty_title") }),
1574
1579
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-muted-foreground mb-6", children: t("billing.ui.subscriptions.empty_description") }),
1575
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBDWV4KYRjs.Button, { onClick: () => _optionalChain([onOpenWizard, 'optionalCall', _45 => _45()]), children: t("billing.ui.subscriptions.subscribe") })
1580
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkJE6QWCNEjs.Button, { onClick: () => _optionalChain([onOpenWizard, 'optionalCall', _45 => _45()]), children: t("billing.ui.subscriptions.subscribe") })
1576
1581
  ] })
1577
1582
  ] }),
1578
1583
  subscriptions.length > 0 && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
@@ -1596,9 +1601,9 @@ function IntervalToggle({ value, onChange, hasMonthly, hasYearly }) {
1596
1601
  if (!hasMonthly || !hasYearly) {
1597
1602
  return null;
1598
1603
  }
1599
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBDWV4KYRjs.Tabs, { value, onValueChange: (v) => onChange(v), children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkBDWV4KYRjs.TabsList, { children: [
1600
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBDWV4KYRjs.TabsTrigger, { value: "month", children: t("billing.admin.prices.interval.month") }),
1601
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBDWV4KYRjs.TabsTrigger, { value: "year", children: t("billing.admin.prices.interval.year") })
1604
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkJE6QWCNEjs.Tabs, { value, onValueChange: (v) => onChange(v), children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkJE6QWCNEjs.TabsList, { children: [
1605
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkJE6QWCNEjs.TabsTrigger, { value: "month", children: t("billing.admin.prices.interval.month") }),
1606
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkJE6QWCNEjs.TabsTrigger, { value: "year", children: t("billing.admin.prices.interval.year") })
1602
1607
  ] }) });
1603
1608
  }
1604
1609
  _chunk7QVYU63Ejs.__name.call(void 0, IntervalToggle, "IntervalToggle");
@@ -1616,11 +1621,11 @@ function PricingCard({
1616
1621
  onSelect
1617
1622
  }) {
1618
1623
  const t = _nextintl.useTranslations.call(void 0, );
1619
- const fmt = _chunkBDWV4KYRjs.useBillingFormatOptions.call(void 0, );
1624
+ const fmt = _chunkJE6QWCNEjs.useBillingFormatOptions.call(void 0, );
1620
1625
  const description = price.description || price.nickname || t("billing.ui.pricing.standard");
1621
1626
  const features = price.features || [];
1622
- const formattedPrice = _chunkHN7L6RRWjs.formatCurrency.call(void 0, price.unitAmount, price.currency, fmt);
1623
- const interval = _chunkHN7L6RRWjs.formatInterval.call(void 0, price, fmt);
1627
+ const formattedPrice = _chunk77JC2UCFjs.formatCurrency.call(void 0, price.unitAmount, price.currency, fmt);
1628
+ const interval = _chunk77JC2UCFjs.formatInterval.call(void 0, price, fmt);
1624
1629
  const handleKeyDown = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (e) => {
1625
1630
  if ((e.key === "Enter" || e.key === " ") && !isDisabled && !isCurrentPlan) {
1626
1631
  e.preventDefault();
@@ -1633,7 +1638,7 @@ function PricingCard({
1633
1638
  }
1634
1639
  }, "handleClick");
1635
1640
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
1636
- _chunkBDWV4KYRjs.Card,
1641
+ _chunkJE6QWCNEjs.Card,
1637
1642
  {
1638
1643
  role: "radio",
1639
1644
  "aria-checked": isSelected,
@@ -1641,7 +1646,7 @@ function PricingCard({
1641
1646
  tabIndex: isDisabled ? -1 : 0,
1642
1647
  onKeyDown: handleKeyDown,
1643
1648
  onClick: handleClick,
1644
- className: _chunkHN7L6RRWjs.cn.call(void 0,
1649
+ className: _chunk77JC2UCFjs.cn.call(void 0,
1645
1650
  "relative cursor-pointer transition-all duration-200 flex flex-col h-full",
1646
1651
  "focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",
1647
1652
  isCurrentPlan && "bg-muted/30",
@@ -1651,9 +1656,9 @@ function PricingCard({
1651
1656
  isLoading && "pointer-events-none"
1652
1657
  ),
1653
1658
  children: [
1654
- isCurrentPlan && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBDWV4KYRjs.Badge, { variant: "secondary", className: "absolute top-2 end-2", children: t("billing.ui.pricing.current") }),
1655
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBDWV4KYRjs.CardHeader, { className: "pb-2", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h3", { className: "text-sm font-medium", children: description }) }),
1656
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkBDWV4KYRjs.CardContent, { className: "pb-4 grow", children: [
1659
+ isCurrentPlan && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkJE6QWCNEjs.Badge, { variant: "secondary", className: "absolute top-2 end-2", children: t("billing.ui.pricing.current") }),
1660
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkJE6QWCNEjs.CardHeader, { className: "pb-2", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h3", { className: "text-sm font-medium", children: description }) }),
1661
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkJE6QWCNEjs.CardContent, { className: "pb-4 grow", children: [
1657
1662
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "mb-4", children: [
1658
1663
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-3xl font-bold", children: formattedPrice }),
1659
1664
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-muted-foreground ms-1", children: interval })
@@ -1663,8 +1668,8 @@ function PricingCard({
1663
1668
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-sm text-muted-foreground", children: feature })
1664
1669
  ] }, index)) })
1665
1670
  ] }),
1666
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBDWV4KYRjs.CardFooter, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1667
- _chunkBDWV4KYRjs.Button,
1671
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkJE6QWCNEjs.CardFooter, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1672
+ _chunkJE6QWCNEjs.Button,
1668
1673
  {
1669
1674
  variant: isCurrentPlan ? "secondary" : isSelected ? "default" : "outline",
1670
1675
  className: "w-full",
@@ -1697,7 +1702,7 @@ function ProductPricingRow({
1697
1702
  return null;
1698
1703
  }
1699
1704
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-3", children: [
1700
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBDWV4KYRjs.SectionHeader, { children: product.name }),
1705
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkJE6QWCNEjs.SectionHeader, { children: product.name }),
1701
1706
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1702
1707
  "div",
1703
1708
  {
@@ -1798,15 +1803,15 @@ function ProductPricingList({
1798
1803
  _chunk7QVYU63Ejs.__name.call(void 0, ProductPricingList, "ProductPricingList");
1799
1804
  function ProductPricingListSkeleton() {
1800
1805
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "space-y-6", children: [1, 2].map((rowIndex) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-3", children: [
1801
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBDWV4KYRjs.Skeleton, { className: "h-6 w-32" }),
1806
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkJE6QWCNEjs.Skeleton, { className: "h-6 w-32" }),
1802
1807
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4", children: [1, 2, 3].map((cardIndex) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "p-4 rounded-lg border animate-pulse space-y-3", children: [
1803
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBDWV4KYRjs.Skeleton, { className: "h-6 w-24" }),
1804
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBDWV4KYRjs.Skeleton, { className: "h-8 w-32" }),
1808
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkJE6QWCNEjs.Skeleton, { className: "h-6 w-24" }),
1809
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkJE6QWCNEjs.Skeleton, { className: "h-8 w-32" }),
1805
1810
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-2", children: [
1806
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBDWV4KYRjs.Skeleton, { className: "h-4 w-full" }),
1807
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBDWV4KYRjs.Skeleton, { className: "h-4 w-3/4" })
1811
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkJE6QWCNEjs.Skeleton, { className: "h-4 w-full" }),
1812
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkJE6QWCNEjs.Skeleton, { className: "h-4 w-3/4" })
1808
1813
  ] }),
1809
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBDWV4KYRjs.Skeleton, { className: "h-10 w-full" })
1814
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkJE6QWCNEjs.Skeleton, { className: "h-10 w-full" })
1810
1815
  ] }, cardIndex)) })
1811
1816
  ] }, rowIndex)) });
1812
1817
  }
@@ -1817,20 +1822,20 @@ _chunk7QVYU63Ejs.__name.call(void 0, ProductPricingListSkeleton, "ProductPricing
1817
1822
 
1818
1823
  function ProrationPreview({ preview }) {
1819
1824
  const t = _nextintl.useTranslations.call(void 0, );
1820
- const fmt = _chunkBDWV4KYRjs.useBillingFormatOptions.call(void 0, );
1825
+ const fmt = _chunkJE6QWCNEjs.useBillingFormatOptions.call(void 0, );
1821
1826
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "bg-primary/10 border-primary/30 rounded-lg border p-4", children: [
1822
1827
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h4", { className: "text-primary mb-3 font-semibold", children: t("billing.ui.proration.title") }),
1823
1828
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-2", children: [
1824
1829
  preview.lineItems.map((item, index) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex justify-between text-sm", children: [
1825
1830
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-muted-foreground", children: item.description }),
1826
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: `font-medium ${item.amount < 0 ? "text-success" : "text-foreground"}`, children: _chunkHN7L6RRWjs.formatCurrency.call(void 0, item.amount, preview.currency, fmt) })
1831
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: `font-medium ${item.amount < 0 ? "text-success" : "text-foreground"}`, children: _chunk77JC2UCFjs.formatCurrency.call(void 0, item.amount, preview.currency, fmt) })
1827
1832
  ] }, index)),
1828
1833
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "border-primary/30 mt-2 border-t pt-2", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex justify-between font-semibold", children: [
1829
1834
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-foreground", children: t("billing.ui.proration.net_due_today") }),
1830
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-foreground", children: _chunkHN7L6RRWjs.formatCurrency.call(void 0, preview.immediateCharge, preview.currency, fmt) })
1835
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-foreground", children: _chunk77JC2UCFjs.formatCurrency.call(void 0, preview.immediateCharge, preview.currency, fmt) })
1831
1836
  ] }) }),
1832
1837
  preview.lineItems.length > 0 && preview.lineItems[0].period && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "text-muted-foreground mt-2 text-xs", children: t("billing.ui.proration.next_invoice", {
1833
- amount: _chunkHN7L6RRWjs.formatCurrency.call(void 0, preview.amountDue, preview.currency, fmt)
1838
+ amount: _chunk77JC2UCFjs.formatCurrency.call(void 0, preview.amountDue, preview.currency, fmt)
1834
1839
  }) })
1835
1840
  ] })
1836
1841
  ] });
@@ -1843,7 +1848,7 @@ _chunk7QVYU63Ejs.__name.call(void 0, ProrationPreview, "ProrationPreview");
1843
1848
 
1844
1849
  function SubscriptionConfirmation({ price, isLoading, onConfirm, onCancel }) {
1845
1850
  const t = _nextintl.useTranslations.call(void 0, );
1846
- const fmt = _chunkBDWV4KYRjs.useBillingFormatOptions.call(void 0, );
1851
+ const fmt = _chunkJE6QWCNEjs.useBillingFormatOptions.call(void 0, );
1847
1852
  const productName = _optionalChain([price, 'access', _51 => _51.product, 'optionalAccess', _52 => _52.name]) || price.nickname || t("billing.ui.wizard.review.selected_plan");
1848
1853
  const productDescription = _optionalChain([price, 'access', _53 => _53.product, 'optionalAccess', _54 => _54.description]) || price.description;
1849
1854
  const features = price.features || [];
@@ -1855,16 +1860,16 @@ function SubscriptionConfirmation({ price, isLoading, onConfirm, onCancel }) {
1855
1860
  productDescription && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "text-sm text-muted-foreground", children: productDescription })
1856
1861
  ] }),
1857
1862
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "text-lg font-semibold", children: [
1858
- _chunkHN7L6RRWjs.formatCurrency.call(void 0, price.unitAmount, price.currency, fmt),
1859
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-sm font-normal text-muted-foreground", children: _chunkHN7L6RRWjs.formatInterval.call(void 0, price, fmt) })
1863
+ _chunk77JC2UCFjs.formatCurrency.call(void 0, price.unitAmount, price.currency, fmt),
1864
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-sm font-normal text-muted-foreground", children: _chunk77JC2UCFjs.formatInterval.call(void 0, price, fmt) })
1860
1865
  ] }),
1861
1866
  features.length > 0 && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "space-y-1", children: features.map((feature, index) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center gap-2 text-sm ", children: [
1862
1867
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.Check, { className: "h-4 w-4 text-primary" }),
1863
1868
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: feature })
1864
1869
  ] }, index)) }),
1865
1870
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex justify-end gap-3 pt-2 border-t border-accent/30", children: [
1866
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBDWV4KYRjs.Button, { variant: "outline", onClick: onCancel, disabled: isLoading, children: t("ui.buttons.cancel") }),
1867
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBDWV4KYRjs.Button, { onClick: onConfirm, disabled: isLoading, children: isLoading ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
1871
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkJE6QWCNEjs.Button, { variant: "outline", onClick: onCancel, disabled: isLoading, children: t("ui.buttons.cancel") }),
1872
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkJE6QWCNEjs.Button, { onClick: onConfirm, disabled: isLoading, children: isLoading ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
1868
1873
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.Loader2, { className: "h-4 w-4 animate-spin me-2" }),
1869
1874
  t("billing.ui.wizard.review.processing")
1870
1875
  ] }) : t("billing.ui.confirmation.subscribe") })
@@ -2043,7 +2048,7 @@ function wizardReducer(state, action) {
2043
2048
  _chunk7QVYU63Ejs.__name.call(void 0, wizardReducer, "wizardReducer");
2044
2049
  function useSubscriptionWizard({ subscription, onSuccess, onClose }) {
2045
2050
  const t = _nextintl.useTranslations.call(void 0, );
2046
- const locale = _chunkP7L6OFX5js.useI18nLocale.call(void 0, );
2051
+ const locale = _chunkNP3AFULUjs.useI18nLocale.call(void 0, );
2047
2052
  const { confirmPayment } = useConfirmSubscriptionPayment();
2048
2053
  const [state, dispatch] = _react.useReducer.call(void 0, wizardReducer, {
2049
2054
  ...initialState,
@@ -2055,7 +2060,7 @@ function useSubscriptionWizard({ subscription, onSuccess, onClose }) {
2055
2060
  onCloseRef.current = onClose;
2056
2061
  const checkPaymentMethod = _react.useCallback.call(void 0, async () => {
2057
2062
  try {
2058
- const methods = await _chunkHN7L6RRWjs.StripeCustomerService.listPaymentMethods();
2063
+ const methods = await _chunk77JC2UCFjs.StripeCustomerService.listPaymentMethods();
2059
2064
  dispatch({ type: "SET_HAS_PAYMENT_METHOD", hasMethod: methods.length > 0 });
2060
2065
  } catch (error) {
2061
2066
  console.error("[useSubscriptionWizard] Failed to check payment methods:", error);
@@ -2073,10 +2078,10 @@ function useSubscriptionWizard({ subscription, onSuccess, onClose }) {
2073
2078
  }, []);
2074
2079
  const lookUpAutomaticCode = _react.useCallback.call(void 0, async (priceId) => {
2075
2080
  try {
2076
- const automaticCode = await _chunkHN7L6RRWjs.StripeCouponCodeService.findAutomatic({ priceId });
2081
+ const automaticCode = await _chunk77JC2UCFjs.StripeCouponCodeService.findAutomatic({ priceId });
2077
2082
  dispatch({
2078
2083
  type: "SET_PROMOTION_CODE",
2079
- code: automaticCode ? _chunkHN7L6RRWjs.toPromotionCodeResult.call(void 0, automaticCode) : null
2084
+ code: automaticCode ? _chunk77JC2UCFjs.toPromotionCodeResult.call(void 0, automaticCode) : null
2080
2085
  });
2081
2086
  return true;
2082
2087
  } catch (error) {
@@ -2103,7 +2108,7 @@ function useSubscriptionWizard({ subscription, onSuccess, onClose }) {
2103
2108
  const isTrialUpgrade = _optionalChain([subscription, 'optionalAccess', _61 => _61.status]) === "trialing" /* TRIALING */;
2104
2109
  dispatch({ type: "SET_IS_TRIAL_SUBSCRIPTION", isTrial: isTrialUpgrade });
2105
2110
  if (isTrialUpgrade && !state.hasPaymentMethod) {
2106
- const methods = await _chunkHN7L6RRWjs.StripeCustomerService.listPaymentMethods();
2111
+ const methods = await _chunk77JC2UCFjs.StripeCustomerService.listPaymentMethods();
2107
2112
  if (methods.length === 0) {
2108
2113
  dispatch({ type: "SET_STEP", step: "payment-method" });
2109
2114
  dispatch({
@@ -2121,7 +2126,7 @@ function useSubscriptionWizard({ subscription, onSuccess, onClose }) {
2121
2126
  }
2122
2127
  }
2123
2128
  if (subscription && state.selectedPrice.id !== _optionalChain([subscription, 'access', _62 => _62.price, 'optionalAccess', _63 => _63.id])) {
2124
- const preview = await _chunkHN7L6RRWjs.StripeSubscriptionService.getProrationPreview({
2129
+ const preview = await _chunk77JC2UCFjs.StripeSubscriptionService.getProrationPreview({
2125
2130
  subscriptionId: subscription.id,
2126
2131
  newPriceId: state.selectedPrice.id
2127
2132
  });
@@ -2155,14 +2160,14 @@ function useSubscriptionWizard({ subscription, onSuccess, onClose }) {
2155
2160
  newPriceId: state.selectedPrice.id,
2156
2161
  promotionCode: promotionCodeToSend(state.promotionCode)
2157
2162
  };
2158
- result = await _chunkHN7L6RRWjs.StripeSubscriptionService.changePlanWithMeta(changePlanParams);
2163
+ result = await _chunk77JC2UCFjs.StripeSubscriptionService.changePlanWithMeta(changePlanParams);
2159
2164
  } else {
2160
2165
  const createParams = {
2161
2166
  id: _uuid.v4.call(void 0, ),
2162
2167
  priceId: state.selectedPrice.id,
2163
2168
  promotionCode: promotionCodeToSend(state.promotionCode)
2164
2169
  };
2165
- result = await _chunkHN7L6RRWjs.StripeSubscriptionService.createSubscription(createParams);
2170
+ result = await _chunk77JC2UCFjs.StripeSubscriptionService.createSubscription(createParams);
2166
2171
  }
2167
2172
  const clientSecret = clientSecretToConfirm(result.meta);
2168
2173
  if (clientSecret) {
@@ -2178,7 +2183,7 @@ function useSubscriptionWizard({ subscription, onSuccess, onClose }) {
2178
2183
  const subscriptionId = subscriptionIdToSync(result.subscription, subscription);
2179
2184
  if (subscriptionId) {
2180
2185
  try {
2181
- await _chunkHN7L6RRWjs.StripeSubscriptionService.syncSubscription({ subscriptionId });
2186
+ await _chunk77JC2UCFjs.StripeSubscriptionService.syncSubscription({ subscriptionId });
2182
2187
  } catch (syncError) {
2183
2188
  console.error("[useSubscriptionWizard] Subscription sync after payment failed:", syncError);
2184
2189
  }
@@ -2226,7 +2231,7 @@ function useSubscriptionWizard({ subscription, onSuccess, onClose }) {
2226
2231
  dispatch({ type: "SET_VALIDATING_PROMO_CODE", isValidating: true });
2227
2232
  dispatch({ type: "SET_PROMO_CODE_ERROR", error: null });
2228
2233
  try {
2229
- const result = await _chunkHN7L6RRWjs.StripePromotionCodeService.validatePromotionCode({
2234
+ const result = await _chunk77JC2UCFjs.StripePromotionCodeService.validatePromotionCode({
2230
2235
  code,
2231
2236
  stripePriceId: _optionalChain([state, 'access', _72 => _72.selectedPrice, 'optionalAccess', _73 => _73.id]),
2232
2237
  language: locale
@@ -2351,7 +2356,7 @@ function WizardStepPlanSelection({
2351
2356
  _react.useEffect.call(void 0, () => {
2352
2357
  const loadProducts = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, async () => {
2353
2358
  try {
2354
- const fetchedProducts = await _chunkHN7L6RRWjs.StripeProductService.listProducts({ active: true });
2359
+ const fetchedProducts = await _chunk77JC2UCFjs.StripeProductService.listProducts({ active: true });
2355
2360
  setProducts(fetchedProducts);
2356
2361
  } catch (error) {
2357
2362
  console.error("[WizardStepPlanSelection] Failed to load products:", error);
@@ -2402,7 +2407,7 @@ function WizardStepPlanSelection({
2402
2407
  onSelectPrice: handleSelectPrice
2403
2408
  }
2404
2409
  ),
2405
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex justify-end pt-4 border-t", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBDWV4KYRjs.Button, { onClick: onNext, disabled: !selectedPrice || isProcessing, children: isProcessing ? t("common.loading") : t("billing.ui.wizard.next_review") }) })
2410
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex justify-end pt-4 border-t", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkJE6QWCNEjs.Button, { onClick: onNext, disabled: !selectedPrice || isProcessing, children: isProcessing ? t("common.loading") : t("billing.ui.wizard.next_review") }) })
2406
2411
  ] });
2407
2412
  }
2408
2413
  _chunk7QVYU63Ejs.__name.call(void 0, WizardStepPlanSelection, "WizardStepPlanSelection");
@@ -2426,7 +2431,7 @@ function PromoCodeInput({
2426
2431
  disabled = false
2427
2432
  }) {
2428
2433
  const t = _nextintl.useTranslations.call(void 0, );
2429
- const locale = _chunkP7L6OFX5js.useI18nLocale.call(void 0, );
2434
+ const locale = _chunkNP3AFULUjs.useI18nLocale.call(void 0, );
2430
2435
  const [code, setCode] = _react.useState.call(void 0, "");
2431
2436
  const appliedKey = _optionalChain([appliedCode, 'optionalAccess', _82 => _82.valid]) ? `${appliedCode.automatic ? "auto" : "typed"}:${_nullishCoalesce(appliedCode.code, () => ( ""))}` : null;
2432
2437
  const [previousAppliedKey, setPreviousAppliedKey] = _react.useState.call(void 0, appliedKey);
@@ -2455,7 +2460,7 @@ function PromoCodeInput({
2455
2460
  }
2456
2461
  const amount = (result.discountValue || 0) / 100;
2457
2462
  const currency = _optionalChain([result, 'access', _83 => _83.currency, 'optionalAccess', _84 => _84.toUpperCase, 'call', _85 => _85()]) || "USD";
2458
- return t("billing.ui.wizard.review.amount_off", { amount: `${currency} ${_chunkHN7L6RRWjs.formatFixed.call(void 0, amount, locale, 2)}` });
2463
+ return t("billing.ui.wizard.review.amount_off", { amount: `${currency} ${_chunk77JC2UCFjs.formatFixed.call(void 0, amount, locale, 2)}` });
2459
2464
  }, "formatDiscount");
2460
2465
  const formatDuration = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (result) => {
2461
2466
  switch (result.duration) {
@@ -2472,7 +2477,7 @@ function PromoCodeInput({
2472
2477
  const codeInput = /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-2", children: [
2473
2478
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex gap-2", children: [
2474
2479
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
2475
- _chunkBDWV4KYRjs.Input,
2480
+ _chunkJE6QWCNEjs.Input,
2476
2481
  {
2477
2482
  placeholder: t("billing.ui.promo_code.placeholder"),
2478
2483
  value: code,
@@ -2482,7 +2487,7 @@ function PromoCodeInput({
2482
2487
  className: "flex-1"
2483
2488
  }
2484
2489
  ),
2485
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBDWV4KYRjs.Button, { variant: "outline", onClick: handleApply, disabled: disabled || isValidating || !code.trim(), children: isValidating ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.Loader2, { className: "h-4 w-4 animate-spin" }) : t("billing.ui.promo_code.apply") })
2490
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkJE6QWCNEjs.Button, { variant: "outline", onClick: handleApply, disabled: disabled || isValidating || !code.trim(), children: isValidating ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.Loader2, { className: "h-4 w-4 animate-spin" }) : t("billing.ui.promo_code.apply") })
2486
2491
  ] }),
2487
2492
  error && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-destructive text-xs/relaxed", children: error })
2488
2493
  ] });
@@ -2511,7 +2516,7 @@ function PromoCodeInput({
2511
2516
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-success text-sm", children: formatDiscount(appliedCode) })
2512
2517
  ] }),
2513
2518
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
2514
- _chunkBDWV4KYRjs.Button,
2519
+ _chunkJE6QWCNEjs.Button,
2515
2520
  {
2516
2521
  variant: "ghost",
2517
2522
  size: "sm",
@@ -2559,7 +2564,7 @@ function WizardStepReview({
2559
2564
  isTrialUpgrade
2560
2565
  }) {
2561
2566
  const t = _nextintl.useTranslations.call(void 0, );
2562
- const fmt = _chunkBDWV4KYRjs.useBillingFormatOptions.call(void 0, );
2567
+ const fmt = _chunkJE6QWCNEjs.useBillingFormatOptions.call(void 0, );
2563
2568
  const [card, setCard] = _react.useState.call(void 0, null);
2564
2569
  _react.useEffect.call(void 0, () => {
2565
2570
  if (!hasPaymentMethod) {
@@ -2567,7 +2572,7 @@ function WizardStepReview({
2567
2572
  return;
2568
2573
  }
2569
2574
  let cancelled = false;
2570
- Promise.all([_chunkHN7L6RRWjs.StripeCustomerService.listPaymentMethods(), _chunkHN7L6RRWjs.StripeCustomerService.getCustomer()]).then(([methods, customer]) => {
2575
+ Promise.all([_chunk77JC2UCFjs.StripeCustomerService.listPaymentMethods(), _chunk77JC2UCFjs.StripeCustomerService.getCustomer()]).then(([methods, customer]) => {
2571
2576
  if (!cancelled) setCard(reviewCard(methods, _optionalChain([customer, 'optionalAccess', _90 => _90.defaultPaymentMethodId])));
2572
2577
  }).catch((err) => {
2573
2578
  console.error("[WizardStepReview] Failed to load the card on file:", err);
@@ -2586,11 +2591,11 @@ function WizardStepReview({
2586
2591
  const interval = _optionalChain([price, 'access', _93 => _93.recurring, 'optionalAccess', _94 => _94.interval]) || "month";
2587
2592
  return interval === "year" ? t("billing.ui.wizard.review.interval_yearly") : t("billing.ui.wizard.review.interval_monthly");
2588
2593
  }, "formatInterval");
2589
- const codeDiscount = _chunkBDWV4KYRjs.promotionCodeDiscount.call(void 0, promotionCode);
2590
- const carriedDiscount = isChangingPlan && !codeDiscount ? _chunkBDWV4KYRjs.subscriptionDiscount.call(void 0, subscription) : null;
2594
+ const codeDiscount = _chunkJE6QWCNEjs.promotionCodeDiscount.call(void 0, promotionCode);
2595
+ const carriedDiscount = isChangingPlan && !codeDiscount ? _chunkJE6QWCNEjs.subscriptionDiscount.call(void 0, subscription) : null;
2591
2596
  const discount = _nullishCoalesce(codeDiscount, () => ( carriedDiscount));
2592
- const discountedPrice = _chunkBDWV4KYRjs.applyDiscount.call(void 0, selectedPrice.unitAmount, discount);
2593
- const discountedImmediateCharge = _chunkBDWV4KYRjs.applyDiscount.call(void 0, _optionalChain([prorationPreview, 'optionalAccess', _95 => _95.immediateCharge]), discount);
2597
+ const discountedPrice = _chunkJE6QWCNEjs.applyDiscount.call(void 0, selectedPrice.unitAmount, discount);
2598
+ const discountedImmediateCharge = _chunkJE6QWCNEjs.applyDiscount.call(void 0, _optionalChain([prorationPreview, 'optionalAccess', _95 => _95.immediateCharge]), discount);
2594
2599
  const isProrationCredit = !isTrialUpgrade && (_nullishCoalesce(_nullishCoalesce(discountedImmediateCharge, () => ( _optionalChain([prorationPreview, 'optionalAccess', _96 => _96.immediateCharge]))), () => ( 0))) < 0;
2595
2600
  const prorationAmount = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (amount) => isProrationCredit ? Math.abs(amount) : amount, "prorationAmount");
2596
2601
  const getDiscountDescription = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, () => {
@@ -2599,13 +2604,13 @@ function WizardStepReview({
2599
2604
  return t("billing.ui.wizard.review.percent_off", { value: discount.discountValue });
2600
2605
  }
2601
2606
  return t("billing.ui.wizard.review.amount_off", {
2602
- amount: _chunkHN7L6RRWjs.formatCurrency.call(void 0, discount.discountValue, discount.currency || selectedPrice.currency, fmt)
2607
+ amount: _chunk77JC2UCFjs.formatCurrency.call(void 0, discount.discountValue, discount.currency || selectedPrice.currency, fmt)
2603
2608
  });
2604
2609
  }, "getDiscountDescription");
2605
2610
  const discountDescription = getDiscountDescription();
2606
2611
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-6", children: [
2607
2612
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "bg-muted/50 rounded-lg p-4 space-y-3", children: [
2608
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBDWV4KYRjs.SectionHeader, { children: t("billing.ui.wizard.review.selected_plan") }),
2613
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkJE6QWCNEjs.SectionHeader, { children: t("billing.ui.wizard.review.selected_plan") }),
2609
2614
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex justify-between items-center", children: [
2610
2615
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { children: [
2611
2616
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "font-medium", children: _optionalChain([selectedPrice, 'access', _97 => _97.product, 'optionalAccess', _98 => _98.name]) }),
@@ -2613,11 +2618,11 @@ function WizardStepReview({
2613
2618
  ] }),
2614
2619
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "text-end", children: [
2615
2620
  discountedPrice !== null ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
2616
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-sm text-muted-foreground line-through", children: _chunkHN7L6RRWjs.formatCurrency.call(void 0, selectedPrice.unitAmount || 0, selectedPrice.currency, fmt) }),
2617
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-success text-lg font-semibold", children: _chunkHN7L6RRWjs.formatCurrency.call(void 0, discountedPrice, selectedPrice.currency, fmt) }),
2618
- discountDescription && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBDWV4KYRjs.Badge, { variant: "softGreen", children: discountDescription }),
2621
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-sm text-muted-foreground line-through", children: _chunk77JC2UCFjs.formatCurrency.call(void 0, selectedPrice.unitAmount || 0, selectedPrice.currency, fmt) }),
2622
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-success text-lg font-semibold", children: _chunk77JC2UCFjs.formatCurrency.call(void 0, discountedPrice, selectedPrice.currency, fmt) }),
2623
+ discountDescription && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkJE6QWCNEjs.Badge, { variant: "softGreen", children: discountDescription }),
2619
2624
  carriedDiscount && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-sm text-muted-foreground", children: t("billing.ui.wizard.review.discount_carries_over") })
2620
- ] }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "font-semibold text-lg", children: _chunkHN7L6RRWjs.formatCurrency.call(void 0, selectedPrice.unitAmount || 0, selectedPrice.currency, fmt) }),
2625
+ ] }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "font-semibold text-lg", children: _chunk77JC2UCFjs.formatCurrency.call(void 0, selectedPrice.unitAmount || 0, selectedPrice.currency, fmt) }),
2621
2626
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-sm text-muted-foreground", children: formatInterval2(selectedPrice) })
2622
2627
  ] })
2623
2628
  ] })
@@ -2632,9 +2637,9 @@ function WizardStepReview({
2632
2637
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex justify-between text-sm", children: [
2633
2638
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: `${isTrialUpgrade ? "text-warning" : "text-muted-foreground"}`, children: isTrialUpgrade ? t("billing.ui.wizard.review.charge_now") : isProrationCredit ? t("billing.ui.wizard.review.credit_now") : t("billing.ui.wizard.review.due_now") }),
2634
2639
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: `font-medium ${isTrialUpgrade ? "text-warning" : "text-foreground"}`, children: discountedImmediateCharge !== null ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
2635
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "line-through text-muted-foreground me-2", children: _chunkHN7L6RRWjs.formatCurrency.call(void 0, prorationAmount(prorationPreview.immediateCharge), prorationPreview.currency, fmt) }),
2636
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-success", children: _chunkHN7L6RRWjs.formatCurrency.call(void 0, prorationAmount(discountedImmediateCharge), prorationPreview.currency, fmt) })
2637
- ] }) : _chunkHN7L6RRWjs.formatCurrency.call(void 0, prorationAmount(prorationPreview.immediateCharge), prorationPreview.currency, fmt) })
2640
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "line-through text-muted-foreground me-2", children: _chunk77JC2UCFjs.formatCurrency.call(void 0, prorationAmount(prorationPreview.immediateCharge), prorationPreview.currency, fmt) }),
2641
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-success", children: _chunk77JC2UCFjs.formatCurrency.call(void 0, prorationAmount(discountedImmediateCharge), prorationPreview.currency, fmt) })
2642
+ ] }) : _chunk77JC2UCFjs.formatCurrency.call(void 0, prorationAmount(prorationPreview.immediateCharge), prorationPreview.currency, fmt) })
2638
2643
  ] })
2639
2644
  ]
2640
2645
  }
@@ -2658,15 +2663,15 @@ function WizardStepReview({
2658
2663
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h4", { className: "font-medium", children: t("billing.ui.payment_method.title") }),
2659
2664
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-sm text-muted-foreground", children: hasPaymentMethod ? card ? t("billing.ui.wizard.review.card_on_file", { brand: card.brand, last4: card.last4 }) : t("billing.ui.wizard.review.payment_on_file") : t("billing.ui.wizard.review.no_payment_on_file") })
2660
2665
  ] }),
2661
- hasPaymentMethod ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBDWV4KYRjs.Button, { variant: "outline", onClick: onAddPaymentMethod, disabled: isProcessing, children: t("billing.ui.wizard.review.use_another_card") }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBDWV4KYRjs.Button, { variant: "outline", onClick: onAddPaymentMethod, children: t("billing.ui.payment_methods.add") })
2666
+ hasPaymentMethod ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkJE6QWCNEjs.Button, { variant: "outline", onClick: onAddPaymentMethod, disabled: isProcessing, children: t("billing.ui.wizard.review.use_another_card") }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkJE6QWCNEjs.Button, { variant: "outline", onClick: onAddPaymentMethod, children: t("billing.ui.payment_methods.add") })
2662
2667
  ] }) }),
2663
- error && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkBDWV4KYRjs.Alert, { variant: "destructive", children: [
2668
+ error && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkJE6QWCNEjs.Alert, { variant: "destructive", children: [
2664
2669
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.AlertCircle, { className: "h-4 w-4" }),
2665
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBDWV4KYRjs.AlertDescription, { children: error })
2670
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkJE6QWCNEjs.AlertDescription, { children: error })
2666
2671
  ] }),
2667
2672
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex justify-between pt-4 border-t", children: [
2668
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBDWV4KYRjs.Button, { variant: "outline", onClick: onBack, disabled: isProcessing, children: t("billing.ui.wizard.back") }),
2669
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBDWV4KYRjs.Button, { onClick: hasPaymentMethod ? onConfirm : onAddPaymentMethod, disabled: isProcessing, children: isProcessing ? t("billing.ui.wizard.review.processing") : hasPaymentMethod ? isChangingPlan ? t("billing.ui.wizard.review.confirm_change") : t("billing.ui.wizard.review.subscribe_now") : t("billing.ui.payment_methods.add") })
2673
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkJE6QWCNEjs.Button, { variant: "outline", onClick: onBack, disabled: isProcessing, children: t("billing.ui.wizard.back") }),
2674
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkJE6QWCNEjs.Button, { onClick: hasPaymentMethod ? onConfirm : onAddPaymentMethod, disabled: isProcessing, children: isProcessing ? t("billing.ui.wizard.review.processing") : hasPaymentMethod ? isChangingPlan ? t("billing.ui.wizard.review.confirm_change") : t("billing.ui.wizard.review.subscribe_now") : t("billing.ui.payment_methods.add") })
2670
2675
  ] })
2671
2676
  ] });
2672
2677
  }
@@ -2679,7 +2684,7 @@ function WizardStepPaymentMethod({ onBack, onSuccess, isProcessing }) {
2679
2684
  const t = _nextintl.useTranslations.call(void 0, );
2680
2685
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-6", children: [
2681
2686
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "text-center", children: [
2682
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBDWV4KYRjs.SectionHeader, { children: t("billing.ui.payment_methods.add") }),
2687
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkJE6QWCNEjs.SectionHeader, { children: t("billing.ui.payment_methods.add") }),
2683
2688
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-sm text-muted-foreground", children: t("billing.ui.wizard.payment_description") })
2684
2689
  ] }),
2685
2690
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, PaymentMethodForm, { onSuccess, onCancel: onBack, isLoading: isProcessing, alwaysSetDefault: true })
@@ -2722,10 +2727,10 @@ function SubscriptionWizard({
2722
2727
  const isChangePlanMode = !!subscription;
2723
2728
  const dialogTitle = subscription ? t("billing.ui.wizard.change_title") : isPurchasingAddons ? t("billing.ui.subscriptions.purchase_addons") : t("billing.ui.subscriptions.subscribe");
2724
2729
  const dialogDescription = subscription ? t("billing.ui.wizard.change_description") : isPurchasingAddons ? t("billing.ui.wizard.addons_description") : t("billing.ui.wizard.subscribe_description");
2725
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBDWV4KYRjs.Dialog, { open, onOpenChange, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkBDWV4KYRjs.DialogContent, { className: "max-w-2xl max-h-[90vh] overflow-y-auto", children: [
2726
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkBDWV4KYRjs.DialogHeader, { children: [
2727
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBDWV4KYRjs.DialogTitle, { children: dialogTitle }),
2728
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBDWV4KYRjs.DialogDescription, { children: dialogDescription })
2730
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkJE6QWCNEjs.Dialog, { open, onOpenChange, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkJE6QWCNEjs.DialogContent, { className: "max-w-2xl max-h-[90vh] overflow-y-auto", children: [
2731
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkJE6QWCNEjs.DialogHeader, { children: [
2732
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkJE6QWCNEjs.DialogTitle, { children: dialogTitle }),
2733
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkJE6QWCNEjs.DialogDescription, { children: dialogDescription })
2729
2734
  ] }),
2730
2735
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, WizardProgressIndicator, { currentStep: state.step }),
2731
2736
  state.step === "plan-selection" && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
@@ -2790,21 +2795,14 @@ function getProgressColor(percentage) {
2790
2795
  return "bg-green-500";
2791
2796
  }
2792
2797
  _chunk7QVYU63Ejs.__name.call(void 0, getProgressColor, "getProgressColor");
2793
- function formatDate2(date, { locale, t }) {
2798
+ function formatDate2(date, { dateLocale, t }) {
2794
2799
  if (!date) return t("billing.ui.not_available");
2795
- try {
2796
- return new Intl.DateTimeFormat(_chunkHN7L6RRWjs.dateFormatLocale.call(void 0, locale), {
2797
- month: "short",
2798
- day: "numeric"
2799
- }).format(new Date(date));
2800
- } catch (_error) {
2801
- return t("billing.ui.invalid_date");
2802
- }
2800
+ return _chunkHROKKUBQjs.formatDateStyle.call(void 0, { date, style: "dateMedium", locale: dateLocale }) || t("billing.ui.invalid_date");
2803
2801
  }
2804
2802
  _chunk7QVYU63Ejs.__name.call(void 0, formatDate2, "formatDate");
2805
2803
  function UsageSummaryCard({ meter, summary }) {
2806
2804
  const t = _nextintl.useTranslations.call(void 0, );
2807
- const fmt = _chunkBDWV4KYRjs.useBillingFormatOptions.call(void 0, );
2805
+ const fmt = _chunkJE6QWCNEjs.useBillingFormatOptions.call(void 0, );
2808
2806
  const currentUsage = _nullishCoalesce(_optionalChain([summary, 'optionalAccess', _101 => _101.aggregatedValue]), () => ( 0));
2809
2807
  const limit = meter.limit;
2810
2808
  const percentage = limit && limit > 0 ? currentUsage / limit * 100 : null;
@@ -2812,15 +2810,15 @@ function UsageSummaryCard({ meter, summary }) {
2812
2810
  const progressWidth = percentage !== null ? Math.min(percentage, 100) : 0;
2813
2811
  const displayName = meter.displayName || meter.eventName;
2814
2812
  const hasLimit = limit !== null && limit !== void 0;
2815
- return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkBDWV4KYRjs.Card, { children: [
2816
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkBDWV4KYRjs.CardHeader, { className: "flex flex-row items-center gap-x-3 pb-3", children: [
2813
+ return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkJE6QWCNEjs.Card, { children: [
2814
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkJE6QWCNEjs.CardHeader, { className: "flex flex-row items-center gap-x-3 pb-3", children: [
2817
2815
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex h-10 w-10 items-center justify-center rounded-lg bg-blue-100 text-blue-600", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.Activity, { className: "h-5 w-5" }) }),
2818
2816
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-col", children: [
2819
2817
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h3", { className: "text-sm font-medium", children: displayName }),
2820
2818
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-muted-foreground text-xs", children: meter.id })
2821
2819
  ] })
2822
2820
  ] }),
2823
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkBDWV4KYRjs.CardContent, { className: "flex flex-col gap-y-4", children: [
2821
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkJE6QWCNEjs.CardContent, { className: "flex flex-col gap-y-4", children: [
2824
2822
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { children: [
2825
2823
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-3xl font-bold", children: currentUsage.toLocaleString(fmt.locale) }),
2826
2824
  hasLimit && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-muted-foreground text-sm", children: t("billing.ui.usage.of_limit_used", { limit: limit.toLocaleString(fmt.locale) }) })
@@ -2828,7 +2826,7 @@ function UsageSummaryCard({ meter, summary }) {
2828
2826
  hasLimit ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-col gap-y-2", children: [
2829
2827
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "h-2 w-full overflow-hidden rounded-full bg-gray-200", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: `h-full transition-all ${progressColor}`, style: { width: `${progressWidth}%` } }) }),
2830
2828
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-muted-foreground text-sm", children: t("billing.ui.usage.percent_used", {
2831
- value: percentage !== null ? _chunkHN7L6RRWjs.formatFixed.call(void 0, percentage, fmt.locale, 1) : ""
2829
+ value: percentage !== null ? _chunk77JC2UCFjs.formatFixed.call(void 0, percentage, fmt.locale, 1) : ""
2832
2830
  }) })
2833
2831
  ] }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-muted-foreground text-sm", children: t("billing.ui.usage.no_limit") }),
2834
2832
  summary && summary.start && summary.end && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "border-t pt-3", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-muted-foreground text-xs", children: t("billing.ui.usage.period", {
@@ -2861,14 +2859,14 @@ function UsageContainer() {
2861
2859
  const loadUsageData = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, async () => {
2862
2860
  setLoading(true);
2863
2861
  try {
2864
- const fetchedSubscriptions = await _chunkHN7L6RRWjs.StripeSubscriptionService.listSubscriptions();
2862
+ const fetchedSubscriptions = await _chunk77JC2UCFjs.StripeSubscriptionService.listSubscriptions();
2865
2863
  setSubscriptions(fetchedSubscriptions);
2866
2864
  const hasMeteredSubscriptions2 = fetchedSubscriptions.some((sub) => _optionalChain([sub, 'access', _102 => _102.price, 'optionalAccess', _103 => _103.recurring, 'optionalAccess', _104 => _104.usageType]) === "metered");
2867
2865
  if (!hasMeteredSubscriptions2) {
2868
2866
  setLoading(false);
2869
2867
  return;
2870
2868
  }
2871
- const fetchedMeters = await _chunkHN7L6RRWjs.StripeUsageService.listMeters();
2869
+ const fetchedMeters = await _chunk77JC2UCFjs.StripeUsageService.listMeters();
2872
2870
  setMeters(fetchedMeters);
2873
2871
  const summariesMap = {};
2874
2872
  const now = /* @__PURE__ */ new Date();
@@ -2876,7 +2874,7 @@ function UsageContainer() {
2876
2874
  const endOfMonth = new Date(now.getFullYear(), now.getMonth() + 1, 0, 23, 59, 59, 999);
2877
2875
  for (const meter of fetchedMeters) {
2878
2876
  try {
2879
- const meterSummaries = await _chunkHN7L6RRWjs.StripeUsageService.getMeterSummaries({
2877
+ const meterSummaries = await _chunk77JC2UCFjs.StripeUsageService.getMeterSummaries({
2880
2878
  meterId: meter.id,
2881
2879
  startTime: startOfMonth,
2882
2880
  endTime: endOfMonth
@@ -2921,45 +2919,34 @@ _chunk7QVYU63Ejs.__name.call(void 0, UsageContainer, "UsageContainer");
2921
2919
  // src/features/billing/stripe-usage/components/lists/UsageHistoryTable.tsx
2922
2920
 
2923
2921
 
2924
- function formatDateTime(date, { locale, t }) {
2922
+ function formatDateTime(date, { dateLocale, t }) {
2925
2923
  if (!date) return t("billing.ui.not_available");
2926
- const dateObj = typeof date === "string" ? new Date(date) : date;
2927
- try {
2928
- return new Intl.DateTimeFormat(_chunkHN7L6RRWjs.dateFormatLocale.call(void 0, locale), {
2929
- month: "short",
2930
- day: "numeric",
2931
- year: "numeric",
2932
- hour: "numeric",
2933
- minute: "2-digit"
2934
- }).format(dateObj);
2935
- } catch (_error) {
2936
- return t("billing.ui.invalid_date");
2937
- }
2924
+ return _chunkHROKKUBQjs.formatDateStyle.call(void 0, { date, style: "dateTimeMedium", locale: dateLocale }) || t("billing.ui.invalid_date");
2938
2925
  }
2939
2926
  _chunk7QVYU63Ejs.__name.call(void 0, formatDateTime, "formatDateTime");
2940
2927
  function UsageHistoryTable({ usageRecords }) {
2941
2928
  const t = _nextintl.useTranslations.call(void 0, );
2942
- const fmt = _chunkBDWV4KYRjs.useBillingFormatOptions.call(void 0, );
2929
+ const fmt = _chunkJE6QWCNEjs.useBillingFormatOptions.call(void 0, );
2943
2930
  if (usageRecords.length === 0) {
2944
2931
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "rounded-lg border p-8 text-center", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-muted-foreground", children: t("billing.ui.usage.history_empty") }) });
2945
2932
  }
2946
2933
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex w-full flex-col gap-y-4", children: [
2947
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBDWV4KYRjs.SectionHeader, { level: 2, children: t("billing.ui.usage.history_title") }),
2948
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "overflow-clip rounded-lg border", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkBDWV4KYRjs.Table, { children: [
2949
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBDWV4KYRjs.TableHeader, { className: "bg-muted", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkBDWV4KYRjs.TableRow, { children: [
2950
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBDWV4KYRjs.TableHead, { children: t("billing.ui.columns.date_time") }),
2951
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBDWV4KYRjs.TableHead, { children: t("billing.ui.columns.meter_event") }),
2952
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBDWV4KYRjs.TableHead, { className: "text-end", children: t("billing.ui.columns.quantity") }),
2953
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBDWV4KYRjs.TableHead, { children: t("billing.ui.columns.event_id") })
2934
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkJE6QWCNEjs.SectionHeader, { level: 2, children: t("billing.ui.usage.history_title") }),
2935
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "overflow-clip rounded-lg border", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkJE6QWCNEjs.Table, { children: [
2936
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkJE6QWCNEjs.TableHeader, { className: "bg-muted", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkJE6QWCNEjs.TableRow, { children: [
2937
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkJE6QWCNEjs.TableHead, { children: t("billing.ui.columns.date_time") }),
2938
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkJE6QWCNEjs.TableHead, { children: t("billing.ui.columns.meter_event") }),
2939
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkJE6QWCNEjs.TableHead, { className: "text-end", children: t("billing.ui.columns.quantity") }),
2940
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkJE6QWCNEjs.TableHead, { children: t("billing.ui.columns.event_id") })
2954
2941
  ] }) }),
2955
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBDWV4KYRjs.TableBody, { children: usageRecords.map((record) => {
2942
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkJE6QWCNEjs.TableBody, { children: usageRecords.map((record) => {
2956
2943
  const dateTime = formatDateTime(record.timestamp, fmt);
2957
2944
  const quantity = record.quantity.toLocaleString(fmt.locale);
2958
- return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkBDWV4KYRjs.TableRow, { children: [
2959
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBDWV4KYRjs.TableCell, { className: "font-medium", children: dateTime }),
2960
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBDWV4KYRjs.TableCell, { className: "text-muted-foreground", children: record.meterEventName }),
2961
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBDWV4KYRjs.TableCell, { className: "text-end font-medium", children: quantity }),
2962
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBDWV4KYRjs.TableCell, { className: "text-muted-foreground text-sm tabular-nums", children: record.stripeEventId })
2945
+ return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkJE6QWCNEjs.TableRow, { children: [
2946
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkJE6QWCNEjs.TableCell, { className: "font-medium", children: dateTime }),
2947
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkJE6QWCNEjs.TableCell, { className: "text-muted-foreground", children: record.meterEventName }),
2948
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkJE6QWCNEjs.TableCell, { className: "text-end font-medium", children: quantity }),
2949
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkJE6QWCNEjs.TableCell, { className: "text-muted-foreground text-sm tabular-nums", children: record.stripeEventId })
2963
2950
  ] }, record.id);
2964
2951
  }) })
2965
2952
  ] }) })
@@ -2970,8 +2957,8 @@ _chunk7QVYU63Ejs.__name.call(void 0, UsageHistoryTable, "UsageHistoryTable");
2970
2957
  // src/features/billing/components/modals/BillingDetailModal.tsx
2971
2958
 
2972
2959
  function BillingDetailModal({ open, onOpenChange, title, children, className }) {
2973
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBDWV4KYRjs.Dialog, { open, onOpenChange, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkBDWV4KYRjs.DialogContent, { className: _nullishCoalesce(className, () => ( "max-w-4xl max-h-[90vh] overflow-y-auto")), children: [
2974
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBDWV4KYRjs.DialogHeader, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBDWV4KYRjs.DialogTitle, { children: title }) }),
2960
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkJE6QWCNEjs.Dialog, { open, onOpenChange, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkJE6QWCNEjs.DialogContent, { className: _nullishCoalesce(className, () => ( "max-w-4xl max-h-[90vh] overflow-y-auto")), children: [
2961
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkJE6QWCNEjs.DialogHeader, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkJE6QWCNEjs.DialogTitle, { children: title }) }),
2975
2962
  children
2976
2963
  ] }) });
2977
2964
  }
@@ -2999,7 +2986,7 @@ function BillingAlertBanner({ subscription, onUpdatePayment, onAddPayment }) {
2999
2986
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h3", { className: "text-destructive text-sm font-medium", children: t("billing.ui.alert.payment_failed_title") }),
3000
2987
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-destructive mt-1 text-sm", children: t("billing.ui.alert.payment_failed_description") })
3001
2988
  ] }),
3002
- onUpdatePayment && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBDWV4KYRjs.Button, { variant: "outline", size: "sm", onClick: onUpdatePayment, className: "text-destructive border-red-300", children: t("billing.ui.alert.update_payment_method") })
2989
+ onUpdatePayment && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkJE6QWCNEjs.Button, { variant: "outline", size: "sm", onClick: onUpdatePayment, className: "text-destructive border-red-300", children: t("billing.ui.alert.update_payment_method") })
3003
2990
  ] });
3004
2991
  }
3005
2992
  if (subscription.status === "trialing" /* TRIALING */ && subscription.trialEnd) {
@@ -3013,7 +3000,7 @@ function BillingAlertBanner({ subscription, onUpdatePayment, onAddPayment }) {
3013
3000
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h3", { className: "text-warning text-sm font-medium", children: t("billing.ui.alert.trial_ending_title") }),
3014
3001
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-warning mt-1 text-sm", children: t("billing.ui.alert.trial_ending_description", { count: daysRemaining }) })
3015
3002
  ] }),
3016
- onAddPayment && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBDWV4KYRjs.Button, { variant: "outline", size: "sm", onClick: onAddPayment, className: "text-warning border-yellow-300", children: t("billing.ui.payment_methods.add") })
3003
+ onAddPayment && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkJE6QWCNEjs.Button, { variant: "outline", size: "sm", onClick: onAddPayment, className: "text-warning border-yellow-300", children: t("billing.ui.payment_methods.add") })
3017
3004
  ] });
3018
3005
  }
3019
3006
  }
@@ -3066,7 +3053,7 @@ function BillingDashboardContainer({ renderCancelDialog } = {}) {
3066
3053
  setNoCustomerExists(false);
3067
3054
  let customer = null;
3068
3055
  try {
3069
- customer = await _chunkHN7L6RRWjs.StripeCustomerService.getCustomer();
3056
+ customer = await _chunk77JC2UCFjs.StripeCustomerService.getCustomer();
3070
3057
  setData((prev) => ({ ...prev, customer }));
3071
3058
  setErrors((prev) => ({ ...prev, customer: null }));
3072
3059
  setNoCustomerExists(false);
@@ -3092,7 +3079,7 @@ function BillingDashboardContainer({ renderCancelDialog } = {}) {
3092
3079
  }
3093
3080
  const fetchSubscriptions = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, async () => {
3094
3081
  try {
3095
- const subscriptions2 = await _chunkHN7L6RRWjs.StripeSubscriptionService.listSubscriptions();
3082
+ const subscriptions2 = await _chunk77JC2UCFjs.StripeSubscriptionService.listSubscriptions();
3096
3083
  setData((prev) => ({ ...prev, subscriptions: subscriptions2 }));
3097
3084
  setErrors((prev) => ({ ...prev, subscriptions: null }));
3098
3085
  return subscriptions2;
@@ -3106,7 +3093,7 @@ function BillingDashboardContainer({ renderCancelDialog } = {}) {
3106
3093
  }, "fetchSubscriptions");
3107
3094
  const fetchPaymentMethods = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, async () => {
3108
3095
  try {
3109
- const paymentMethods = await _chunkHN7L6RRWjs.StripeCustomerService.listPaymentMethods();
3096
+ const paymentMethods = await _chunk77JC2UCFjs.StripeCustomerService.listPaymentMethods();
3110
3097
  setData((prev) => ({ ...prev, paymentMethods }));
3111
3098
  setErrors((prev) => ({ ...prev, paymentMethods: null }));
3112
3099
  } catch (error) {
@@ -3118,7 +3105,7 @@ function BillingDashboardContainer({ renderCancelDialog } = {}) {
3118
3105
  }, "fetchPaymentMethods");
3119
3106
  const fetchInvoices = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, async () => {
3120
3107
  try {
3121
- const invoices = await _chunkHN7L6RRWjs.StripeInvoiceService.listInvoices();
3108
+ const invoices = await _chunk77JC2UCFjs.StripeInvoiceService.listInvoices();
3122
3109
  setData((prev) => ({ ...prev, invoices }));
3123
3110
  setErrors((prev) => ({ ...prev, invoices: null }));
3124
3111
  } catch (error) {
@@ -3141,7 +3128,7 @@ function BillingDashboardContainer({ renderCancelDialog } = {}) {
3141
3128
  const handleCreateCustomer = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, async () => {
3142
3129
  setCreatingCustomer(true);
3143
3130
  try {
3144
- await _chunkHN7L6RRWjs.StripeCustomerService.createCustomer();
3131
+ await _chunk77JC2UCFjs.StripeCustomerService.createCustomer();
3145
3132
  setNoCustomerExists(false);
3146
3133
  await fetchAllData();
3147
3134
  } catch (error) {
@@ -3153,7 +3140,7 @@ function BillingDashboardContainer({ renderCancelDialog } = {}) {
3153
3140
  }, "handleCreateCustomer");
3154
3141
  const fetchUsageData = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, async () => {
3155
3142
  try {
3156
- const meters = await _chunkHN7L6RRWjs.StripeUsageService.listMeters();
3143
+ const meters = await _chunk77JC2UCFjs.StripeUsageService.listMeters();
3157
3144
  setData((prev) => ({ ...prev, meters }));
3158
3145
  const summariesMap = {};
3159
3146
  const now = /* @__PURE__ */ new Date();
@@ -3161,7 +3148,7 @@ function BillingDashboardContainer({ renderCancelDialog } = {}) {
3161
3148
  const endOfMonth = new Date(now.getFullYear(), now.getMonth() + 1, 0, 23, 59, 59, 999);
3162
3149
  for (const meter of meters) {
3163
3150
  try {
3164
- const meterSummaries = await _chunkHN7L6RRWjs.StripeUsageService.getMeterSummaries({
3151
+ const meterSummaries = await _chunk77JC2UCFjs.StripeUsageService.getMeterSummaries({
3165
3152
  meterId: meter.id,
3166
3153
  startTime: startOfMonth,
3167
3154
  endTime: endOfMonth
@@ -3223,7 +3210,7 @@ function BillingDashboardContainer({ renderCancelDialog } = {}) {
3223
3210
  _react.useEffect.call(void 0, () => {
3224
3211
  if (!pendingChangePlan || loading.subscriptions) return;
3225
3212
  setPendingChangePlan(false);
3226
- handleOpenWizard(_chunkHN7L6RRWjs.resolveChangePlanTarget.call(void 0, data.subscriptions));
3213
+ handleOpenWizard(_chunk77JC2UCFjs.resolveChangePlanTarget.call(void 0, data.subscriptions));
3227
3214
  }, [pendingChangePlan, loading.subscriptions, data.subscriptions, handleOpenWizard]);
3228
3215
  const criticalSubscriptions = data.subscriptions.filter(
3229
3216
  (sub) => sub.status === "past_due" /* PAST_DUE */ || sub.status === "trialing" /* TRIALING */ && sub.trialEnd && new Date(sub.trialEnd).getTime() - (/* @__PURE__ */ new Date()).getTime() <= 7 * 24 * 60 * 60 * 1e3
@@ -3254,18 +3241,18 @@ function BillingDashboardContainer({ renderCancelDialog } = {}) {
3254
3241
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.Wallet, { className: "h-8 w-8" }),
3255
3242
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h1", { className: "text-primary text-3xl font-semibold", children: t("billing.title") })
3256
3243
  ] }),
3257
- isInitialLoading && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBDWV4KYRjs.Card, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBDWV4KYRjs.CardContent, { className: "flex items-center justify-center py-12", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.Loader2, { className: "h-8 w-8 animate-spin text-muted-foreground" }) }) }),
3258
- noCustomerExists && !isInitialLoading && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkBDWV4KYRjs.Card, { children: [
3259
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkBDWV4KYRjs.CardHeader, { className: "text-center", children: [
3244
+ isInitialLoading && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkJE6QWCNEjs.Card, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkJE6QWCNEjs.CardContent, { className: "flex items-center justify-center py-12", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.Loader2, { className: "h-8 w-8 animate-spin text-muted-foreground" }) }) }),
3245
+ noCustomerExists && !isInitialLoading && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkJE6QWCNEjs.Card, { children: [
3246
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkJE6QWCNEjs.CardHeader, { className: "text-center", children: [
3260
3247
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "mx-auto mb-4 flex h-16 w-16 items-center justify-center rounded-full bg-primary/10", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.CreditCard, { className: "h-8 w-8 text-primary" }) }),
3261
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBDWV4KYRjs.CardTitle, { children: t("billing.ui.dashboard.setup_title") }),
3262
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBDWV4KYRjs.CardDescription, { children: t("billing.ui.dashboard.setup_description") })
3248
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkJE6QWCNEjs.CardTitle, { children: t("billing.ui.dashboard.setup_title") }),
3249
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkJE6QWCNEjs.CardDescription, { children: t("billing.ui.dashboard.setup_description") })
3263
3250
  ] }),
3264
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBDWV4KYRjs.CardContent, { className: "flex justify-center pb-8", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBDWV4KYRjs.Button, { onClick: handleCreateCustomer, disabled: creatingCustomer, size: "lg", children: creatingCustomer ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
3251
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkJE6QWCNEjs.CardContent, { className: "flex justify-center pb-8", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkJE6QWCNEjs.Button, { onClick: handleCreateCustomer, disabled: creatingCustomer, size: "lg", children: creatingCustomer ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
3265
3252
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.Loader2, { className: "me-2 h-4 w-4 animate-spin" }),
3266
3253
  t("billing.ui.dashboard.setting_up")
3267
3254
  ] }) : t("billing.ui.dashboard.setup_button") }) }),
3268
- errors.customer && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBDWV4KYRjs.CardContent, { className: "pt-0", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-center text-destructive text-xs/relaxed", children: t(errors.customer) }) })
3255
+ errors.customer && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkJE6QWCNEjs.CardContent, { className: "pt-0", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-center text-destructive text-xs/relaxed", children: t(errors.customer) }) })
3269
3256
  ] }),
3270
3257
  !noCustomerExists && !isInitialLoading && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
3271
3258
  criticalSubscriptions.map((subscription) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
@@ -3410,7 +3397,7 @@ function getStripePromise(publishableKey) {
3410
3397
  }
3411
3398
  _chunk7QVYU63Ejs.__name.call(void 0, getStripePromise, "getStripePromise");
3412
3399
  function StripeProvider({ children }) {
3413
- const publishableKey = _chunkTNTCLVURjs.getStripePublishableKey.call(void 0, );
3400
+ const publishableKey = _chunkONU4WCDGjs.getStripePublishableKey.call(void 0, );
3414
3401
  const stripePromise = _react.useMemo.call(void 0, () => getStripePromise(publishableKey), [publishableKey]);
3415
3402
  const options = _react.useMemo.call(void 0, () => ({}), []);
3416
3403
  if (!publishableKey) {
@@ -3420,7 +3407,7 @@ function StripeProvider({ children }) {
3420
3407
  }
3421
3408
  _chunk7QVYU63Ejs.__name.call(void 0, StripeProvider, "StripeProvider");
3422
3409
  function isStripeConfigured() {
3423
- return !!_chunkTNTCLVURjs.getStripePublishableKey.call(void 0, );
3410
+ return !!_chunkONU4WCDGjs.getStripePublishableKey.call(void 0, );
3424
3411
  }
3425
3412
  _chunk7QVYU63Ejs.__name.call(void 0, isStripeConfigured, "isStripeConfigured");
3426
3413
 
@@ -3435,18 +3422,18 @@ _chunk7QVYU63Ejs.__name.call(void 0, isStripeConfigured, "isStripeConfigured");
3435
3422
 
3436
3423
  function PriceArchiver({ price }) {
3437
3424
  const t = _nextintl.useTranslations.call(void 0, );
3438
- const fmt = _chunkBDWV4KYRjs.useBillingFormatOptions.call(void 0, );
3425
+ const fmt = _chunkJE6QWCNEjs.useBillingFormatOptions.call(void 0, );
3439
3426
  const { archivePrice, restorePrice } = usePriceContext();
3440
3427
  const [open, setOpen] = _react.useState.call(void 0, false);
3441
3428
  const isArchived = !price.active;
3442
3429
  const scope = isArchived ? "restore" : "archive";
3443
3430
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
3444
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkBDWV4KYRjs.Button, { variant: "outline", size: "sm", onClick: () => setOpen(true), children: [
3431
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkJE6QWCNEjs.Button, { variant: "outline", size: "sm", onClick: () => setOpen(true), children: [
3445
3432
  isArchived ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.RotateCcwIcon, {}) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.ArchiveIcon, {}),
3446
3433
  t(`billing.admin.prices.${scope}.confirm`)
3447
3434
  ] }),
3448
3435
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
3449
- _chunkBDWV4KYRjs.ConfirmDialog,
3436
+ _chunkJE6QWCNEjs.ConfirmDialog,
3450
3437
  {
3451
3438
  open,
3452
3439
  onOpenChange: setOpen,
@@ -3460,7 +3447,7 @@ function PriceArchiver({ price }) {
3460
3447
  if (isArchived) await restorePrice(price.id);
3461
3448
  else await archivePrice(price.id);
3462
3449
  } catch (error) {
3463
- _chunkBDWV4KYRjs.errorToast.call(void 0, { title: t(`billing.admin.prices.${scope}.title`), error });
3450
+ _chunkJE6QWCNEjs.errorToast.call(void 0, { title: t(`billing.admin.prices.${scope}.title`), error });
3464
3451
  throw error;
3465
3452
  }
3466
3453
  }
@@ -3492,15 +3479,15 @@ function PriceEditorInternal({
3492
3479
  onDialogOpenChange
3493
3480
  }) {
3494
3481
  const t = _nextintl.useTranslations.call(void 0, );
3495
- const fmt = _chunkBDWV4KYRjs.useBillingFormatOptions.call(void 0, );
3496
- const router = _chunkP7L6OFX5js.useI18nRouter.call(void 0, );
3482
+ const fmt = _chunkJE6QWCNEjs.useBillingFormatOptions.call(void 0, );
3483
+ const router = _chunkNP3AFULUjs.useI18nRouter.call(void 0, );
3497
3484
  const { createPrice, updatePrice, productId: contextProductId } = usePriceContext();
3498
3485
  const [allFeatures, setAllFeatures] = _react.useState.call(void 0, []);
3499
3486
  const isEdit = !!price;
3500
3487
  const targetProductId = _nullishCoalesce(_nullishCoalesce(productId, () => ( _optionalChain([price, 'optionalAccess', _120 => _120.product, 'optionalAccess', _121 => _121.id]))), () => ( contextProductId));
3501
3488
  _react.useEffect.call(void 0, () => {
3502
3489
  const fetchFeatures = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, async () => {
3503
- setAllFeatures(await _chunkHN7L6RRWjs.FeatureService.findMany({}));
3490
+ setAllFeatures(await _chunk77JC2UCFjs.FeatureService.findMany({}));
3504
3491
  }, "fetchFeatures");
3505
3492
  void fetchFeatures();
3506
3493
  }, []);
@@ -3613,7 +3600,7 @@ function PriceEditorInternal({
3613
3600
  warnedUnknownFor.current = fingerprint;
3614
3601
  const { unknown } = resolvePlatformFeatures(seed.platformFeatures);
3615
3602
  if (unknown.length > 0)
3616
- _chunkHN7L6RRWjs.showToast.call(void 0, t("billing.admin.prices.import.warnings.unknownFeatures", { features: unknown.join(", ") }));
3603
+ _chunk77JC2UCFjs.showToast.call(void 0, t("billing.admin.prices.import.warnings.unknownFeatures", { features: unknown.join(", ") }));
3617
3604
  }, [seed, isEdit, allFeatures, resolvePlatformFeatures, t]);
3618
3605
  const watchInterval = form.watch("interval");
3619
3606
  const isRecurring = watchInterval !== "one_time";
@@ -3634,13 +3621,13 @@ function PriceEditorInternal({
3634
3621
  { id: "metered", text: t("billing.admin.prices.usage.metered") }
3635
3622
  ];
3636
3623
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
3637
- _chunkBDWV4KYRjs.EditorSheet,
3624
+ _chunkJE6QWCNEjs.EditorSheet,
3638
3625
  {
3639
3626
  form,
3640
3627
  entityType: t("billing.admin.prices.entity"),
3641
3628
  entityName: price ? priceLabel(price, fmt) : void 0,
3642
3629
  isEdit,
3643
- module: _chunkP7L6OFX5js.Modules.StripePrice,
3630
+ module: _chunkZ6T2575Ajs.Modules.StripePrice,
3644
3631
  size: "lg",
3645
3632
  propagateChanges,
3646
3633
  onSuccess,
@@ -3689,13 +3676,13 @@ function PriceEditorInternal({
3689
3676
  dialogOpen,
3690
3677
  onDialogOpenChange,
3691
3678
  children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex w-full flex-col gap-y-4", children: [
3692
- isEdit && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkBDWV4KYRjs.Alert, { children: [
3693
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBDWV4KYRjs.AlertTitle, { children: t("billing.admin.prices.immutability.title") }),
3694
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBDWV4KYRjs.AlertDescription, { children: t("billing.admin.prices.immutability.description") })
3679
+ isEdit && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkJE6QWCNEjs.Alert, { children: [
3680
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkJE6QWCNEjs.AlertTitle, { children: t("billing.admin.prices.immutability.title") }),
3681
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkJE6QWCNEjs.AlertDescription, { children: t("billing.admin.prices.immutability.description") })
3695
3682
  ] }),
3696
3683
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "grid grid-cols-2 gap-x-4", children: [
3697
3684
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
3698
- _chunkBDWV4KYRjs.FormInput,
3685
+ _chunkJE6QWCNEjs.FormInput,
3699
3686
  {
3700
3687
  form,
3701
3688
  id: "unitAmount",
@@ -3707,7 +3694,7 @@ function PriceEditorInternal({
3707
3694
  }
3708
3695
  ),
3709
3696
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
3710
- _chunkBDWV4KYRjs.FormSelect,
3697
+ _chunkJE6QWCNEjs.FormSelect,
3711
3698
  {
3712
3699
  form,
3713
3700
  id: "currency",
@@ -3718,7 +3705,7 @@ function PriceEditorInternal({
3718
3705
  )
3719
3706
  ] }),
3720
3707
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
3721
- _chunkBDWV4KYRjs.FormSelect,
3708
+ _chunkJE6QWCNEjs.FormSelect,
3722
3709
  {
3723
3710
  form,
3724
3711
  id: "interval",
@@ -3729,7 +3716,7 @@ function PriceEditorInternal({
3729
3716
  ),
3730
3717
  isRecurring && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "grid grid-cols-2 gap-x-4", children: [
3731
3718
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
3732
- _chunkBDWV4KYRjs.FormInput,
3719
+ _chunkJE6QWCNEjs.FormInput,
3733
3720
  {
3734
3721
  form,
3735
3722
  id: "intervalCount",
@@ -3740,7 +3727,7 @@ function PriceEditorInternal({
3740
3727
  }
3741
3728
  ),
3742
3729
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
3743
- _chunkBDWV4KYRjs.FormSelect,
3730
+ _chunkJE6QWCNEjs.FormSelect,
3744
3731
  {
3745
3732
  form,
3746
3733
  id: "usageType",
@@ -3751,7 +3738,7 @@ function PriceEditorInternal({
3751
3738
  )
3752
3739
  ] }),
3753
3740
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
3754
- _chunkBDWV4KYRjs.FormInput,
3741
+ _chunkJE6QWCNEjs.FormInput,
3755
3742
  {
3756
3743
  form,
3757
3744
  id: "nickname",
@@ -3760,7 +3747,7 @@ function PriceEditorInternal({
3760
3747
  }
3761
3748
  ),
3762
3749
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
3763
- _chunkBDWV4KYRjs.FormTextarea,
3750
+ _chunkJE6QWCNEjs.FormTextarea,
3764
3751
  {
3765
3752
  form,
3766
3753
  id: "description",
@@ -3770,7 +3757,7 @@ function PriceEditorInternal({
3770
3757
  }
3771
3758
  ),
3772
3759
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
3773
- _chunkBDWV4KYRjs.FormInput,
3760
+ _chunkJE6QWCNEjs.FormInput,
3774
3761
  {
3775
3762
  form,
3776
3763
  id: "token",
@@ -3780,10 +3767,10 @@ function PriceEditorInternal({
3780
3767
  }
3781
3768
  ),
3782
3769
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-col gap-y-2", children: [
3783
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBDWV4KYRjs.FieldLabel, { children: t("billing.admin.prices.fields.features") }),
3770
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkJE6QWCNEjs.FieldLabel, { children: t("billing.admin.prices.fields.features") }),
3784
3771
  form.watch("features").map((_, index) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex gap-2", children: [
3785
3772
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
3786
- _chunkBDWV4KYRjs.Input,
3773
+ _chunkJE6QWCNEjs.Input,
3787
3774
  {
3788
3775
  ...form.register(`features.${index}`),
3789
3776
  placeholder: t("billing.admin.prices.placeholders.feature", { index: index + 1 }),
@@ -3791,7 +3778,7 @@ function PriceEditorInternal({
3791
3778
  }
3792
3779
  ),
3793
3780
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
3794
- _chunkBDWV4KYRjs.Button,
3781
+ _chunkJE6QWCNEjs.Button,
3795
3782
  {
3796
3783
  type: "button",
3797
3784
  variant: "outline",
@@ -3806,7 +3793,7 @@ function PriceEditorInternal({
3806
3793
  )
3807
3794
  ] }, index)),
3808
3795
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
3809
- _chunkBDWV4KYRjs.Button,
3796
+ _chunkJE6QWCNEjs.Button,
3810
3797
  {
3811
3798
  type: "button",
3812
3799
  variant: "outline",
@@ -3821,12 +3808,12 @@ function PriceEditorInternal({
3821
3808
  )
3822
3809
  ] }),
3823
3810
  isRecurring && allFeatures.length > 0 && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-col gap-y-2", children: [
3824
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBDWV4KYRjs.FieldLabel, { children: t("billing.admin.prices.fields.platformFeatures") }),
3811
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkJE6QWCNEjs.FieldLabel, { children: t("billing.admin.prices.fields.platformFeatures") }),
3825
3812
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex max-h-48 flex-col gap-y-2 overflow-y-auto rounded-md border p-4", children: allFeatures.map((feature) => {
3826
3813
  const isChecked = form.watch("featureIds").includes(feature.id);
3827
3814
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center gap-x-2", children: [
3828
3815
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
3829
- _chunkBDWV4KYRjs.Checkbox,
3816
+ _chunkJE6QWCNEjs.Checkbox,
3830
3817
  {
3831
3818
  id: `feature-${feature.id}`,
3832
3819
  checked: isChecked,
@@ -3842,13 +3829,13 @@ function PriceEditorInternal({
3842
3829
  }
3843
3830
  }
3844
3831
  ),
3845
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBDWV4KYRjs.FieldLabel, { htmlFor: `feature-${feature.id}`, children: feature.name }),
3832
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkJE6QWCNEjs.FieldLabel, { htmlFor: `feature-${feature.id}`, children: feature.name }),
3846
3833
  feature.isCore && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-muted-foreground text-xs", children: t("billing.admin.prices.help.core") })
3847
3834
  ] }, feature.id);
3848
3835
  }) })
3849
3836
  ] }),
3850
3837
  isRecurring && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
3851
- _chunkBDWV4KYRjs.FormCheckbox,
3838
+ _chunkJE6QWCNEjs.FormCheckbox,
3852
3839
  {
3853
3840
  form,
3854
3841
  id: "isTrial",
@@ -3891,7 +3878,7 @@ var defaultContextValue = {
3891
3878
  productId: void 0
3892
3879
  };
3893
3880
  function priceLabel(price, fmt = {}) {
3894
- return _nullishCoalesce(price.nickname, () => ( `${_chunkHN7L6RRWjs.formatCurrency.call(void 0, price.unitAmount, price.currency, fmt)} ${_chunkHN7L6RRWjs.formatInterval.call(void 0, price, fmt)}`.trim()));
3881
+ return _nullishCoalesce(price.nickname, () => ( `${_chunk77JC2UCFjs.formatCurrency.call(void 0, price.unitAmount, price.currency, fmt)} ${_chunk77JC2UCFjs.formatInterval.call(void 0, price, fmt)}`.trim()));
3895
3882
  }
3896
3883
  _chunk7QVYU63Ejs.__name.call(void 0, priceLabel, "priceLabel");
3897
3884
  var PriceProvider = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, ({
@@ -3901,22 +3888,22 @@ var PriceProvider = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, ({
3901
3888
  productId: productIdProp
3902
3889
  }) => {
3903
3890
  const t = _nextintl.useTranslations.call(void 0, );
3904
- const fmt = _chunkBDWV4KYRjs.useBillingFormatOptions.call(void 0, );
3905
- const generateUrl = _chunkBDWV4KYRjs.usePageUrlGenerator.call(void 0, );
3906
- const { hasRole } = _chunkBDWV4KYRjs.useCurrentUserContext.call(void 0, );
3891
+ const fmt = _chunkJE6QWCNEjs.useBillingFormatOptions.call(void 0, );
3892
+ const generateUrl = _chunkJE6QWCNEjs.usePageUrlGenerator.call(void 0, );
3893
+ const { hasRole } = _chunkJE6QWCNEjs.useCurrentUserContext.call(void 0, );
3907
3894
  const [price, setPrice] = _react.useState.call(void 0,
3908
- dehydratedPrice ? _chunkHN7L6RRWjs.rehydrate.call(void 0, _chunkP7L6OFX5js.Modules.StripePrice, dehydratedPrice) : void 0
3895
+ dehydratedPrice ? _chunk77JC2UCFjs.rehydrate.call(void 0, _chunkZ6T2575Ajs.Modules.StripePrice, dehydratedPrice) : void 0
3909
3896
  );
3910
3897
  const [priceVersion, setPriceVersion] = _react.useState.call(void 0, 0);
3911
3898
  const refreshPrices = _react.useCallback.call(void 0, () => setPriceVersion((value2) => value2 + 1), []);
3912
3899
  const productId = _nullishCoalesce(productIdProp, () => ( _optionalChain([price, 'optionalAccess', _144 => _144.product, 'optionalAccess', _145 => _145.id])));
3913
3900
  const reloadPrice = _react.useCallback.call(void 0, async () => {
3914
3901
  if (!_optionalChain([price, 'optionalAccess', _146 => _146.id])) return;
3915
- setPrice(await _chunkHN7L6RRWjs.StripePriceService.getPrice({ id: price.id }));
3902
+ setPrice(await _chunk77JC2UCFjs.StripePriceService.getPrice({ id: price.id }));
3916
3903
  }, [_optionalChain([price, 'optionalAccess', _147 => _147.id])]);
3917
3904
  const createPrice = _react.useCallback.call(void 0,
3918
3905
  async (input) => {
3919
- const saved = await _chunkHN7L6RRWjs.StripePriceService.createPrice(input);
3906
+ const saved = await _chunk77JC2UCFjs.StripePriceService.createPrice(input);
3920
3907
  refreshPrices();
3921
3908
  return saved;
3922
3909
  },
@@ -3924,7 +3911,7 @@ var PriceProvider = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, ({
3924
3911
  );
3925
3912
  const updatePrice = _react.useCallback.call(void 0,
3926
3913
  async (input) => {
3927
- const saved = await _chunkHN7L6RRWjs.StripePriceService.updatePrice(input);
3914
+ const saved = await _chunk77JC2UCFjs.StripePriceService.updatePrice(input);
3928
3915
  setPrice(saved);
3929
3916
  refreshPrices();
3930
3917
  return saved;
@@ -3935,7 +3922,7 @@ var PriceProvider = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, ({
3935
3922
  async (id) => {
3936
3923
  const target = _nullishCoalesce(id, () => ( _optionalChain([price, 'optionalAccess', _148 => _148.id])));
3937
3924
  if (!target) return;
3938
- await _chunkHN7L6RRWjs.StripePriceService.archivePrice({ id: target });
3925
+ await _chunk77JC2UCFjs.StripePriceService.archivePrice({ id: target });
3939
3926
  await reloadPrice();
3940
3927
  refreshPrices();
3941
3928
  },
@@ -3945,7 +3932,7 @@ var PriceProvider = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, ({
3945
3932
  async (id) => {
3946
3933
  const target = _nullishCoalesce(id, () => ( _optionalChain([price, 'optionalAccess', _150 => _150.id])));
3947
3934
  if (!target) return;
3948
- await _chunkHN7L6RRWjs.StripePriceService.reactivatePrice({ id: target });
3935
+ await _chunk77JC2UCFjs.StripePriceService.reactivatePrice({ id: target });
3949
3936
  await reloadPrice();
3950
3937
  refreshPrices();
3951
3938
  },
@@ -3969,12 +3956,12 @@ var PriceProvider = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, ({
3969
3956
  if (!publishChrome) return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, PriceContext.Provider, { value, children });
3970
3957
  const breadcrumb = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, () => {
3971
3958
  const items = [
3972
- { name: t("billing.admin.products.title"), href: generateUrl({ page: _chunkP7L6OFX5js.Modules.StripeProduct }) }
3959
+ { name: t("billing.admin.products.title"), href: generateUrl({ page: _chunkZ6T2575Ajs.Modules.StripeProduct }) }
3973
3960
  ];
3974
3961
  if (_optionalChain([price, 'optionalAccess', _152 => _152.product]))
3975
3962
  items.push({
3976
3963
  name: price.product.name,
3977
- href: generateUrl({ page: _chunkP7L6OFX5js.Modules.StripeProduct, id: price.product.id })
3964
+ href: generateUrl({ page: _chunkZ6T2575Ajs.Modules.StripeProduct, id: price.product.id })
3978
3965
  });
3979
3966
  if (price) items.push({ name: priceLabel(price, fmt) });
3980
3967
  return items;
@@ -3991,7 +3978,7 @@ var PriceProvider = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, ({
3991
3978
  }
3992
3979
  return response;
3993
3980
  }, "title");
3994
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBDWV4KYRjs.SharedProvider, { value: { breadcrumbs: breadcrumb(), title: title() }, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, PriceContext.Provider, { value, children }) });
3981
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkJE6QWCNEjs.SharedProvider, { value: { breadcrumbs: breadcrumb(), title: title() }, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, PriceContext.Provider, { value, children }) });
3995
3982
  }, "PriceProvider");
3996
3983
  var usePriceContext = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, () => _nullishCoalesce(_react.useContext.call(void 0, PriceContext), () => ( defaultContextValue)), "usePriceContext");
3997
3984
 
@@ -4011,12 +3998,12 @@ function ProductArchiver({ product }) {
4011
3998
  const isArchived = !product.active;
4012
3999
  const scope = isArchived ? "restore" : "archive";
4013
4000
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
4014
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkBDWV4KYRjs.Button, { variant: "outline", size: "sm", onClick: () => setOpen(true), children: [
4001
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkJE6QWCNEjs.Button, { variant: "outline", size: "sm", onClick: () => setOpen(true), children: [
4015
4002
  isArchived ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.RotateCcwIcon, {}) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.ArchiveIcon, {}),
4016
4003
  t(`billing.admin.products.${scope}.confirm`)
4017
4004
  ] }),
4018
4005
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
4019
- _chunkBDWV4KYRjs.ConfirmDialog,
4006
+ _chunkJE6QWCNEjs.ConfirmDialog,
4020
4007
  {
4021
4008
  open,
4022
4009
  onOpenChange: setOpen,
@@ -4030,7 +4017,7 @@ function ProductArchiver({ product }) {
4030
4017
  if (isArchived) await restoreProduct(product.id);
4031
4018
  else await archiveProduct(product.id);
4032
4019
  } catch (error) {
4033
- _chunkBDWV4KYRjs.errorToast.call(void 0, { title: t(`billing.admin.products.${scope}.title`), error });
4020
+ _chunkJE6QWCNEjs.errorToast.call(void 0, { title: t(`billing.admin.products.${scope}.title`), error });
4034
4021
  throw error;
4035
4022
  }
4036
4023
  }
@@ -4059,7 +4046,7 @@ function ProductEditorInternal({
4059
4046
  onDialogOpenChange
4060
4047
  }) {
4061
4048
  const t = _nextintl.useTranslations.call(void 0, );
4062
- const router = _chunkP7L6OFX5js.useI18nRouter.call(void 0, );
4049
+ const router = _chunkNP3AFULUjs.useI18nRouter.call(void 0, );
4063
4050
  const { createProduct, updateProduct } = useProductContext();
4064
4051
  const isEdit = !!product;
4065
4052
  const formSchema2 = _react.useMemo.call(void 0,
@@ -4083,13 +4070,13 @@ function ProductEditorInternal({
4083
4070
  defaultValues: getDefaultValues()
4084
4071
  });
4085
4072
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
4086
- _chunkBDWV4KYRjs.EditorSheet,
4073
+ _chunkJE6QWCNEjs.EditorSheet,
4087
4074
  {
4088
4075
  form,
4089
4076
  entityType: t("billing.admin.products.entity"),
4090
4077
  entityName: _optionalChain([product, 'optionalAccess', _156 => _156.name]),
4091
4078
  isEdit,
4092
- module: _chunkP7L6OFX5js.Modules.StripeProduct,
4079
+ module: _chunkZ6T2575Ajs.Modules.StripeProduct,
4093
4080
  size: "md",
4094
4081
  propagateChanges,
4095
4082
  onSuccess,
@@ -4106,7 +4093,7 @@ function ProductEditorInternal({
4106
4093
  onDialogOpenChange,
4107
4094
  children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex w-full flex-col gap-y-4", children: [
4108
4095
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
4109
- _chunkBDWV4KYRjs.FormInput,
4096
+ _chunkJE6QWCNEjs.FormInput,
4110
4097
  {
4111
4098
  form,
4112
4099
  id: "name",
@@ -4116,7 +4103,7 @@ function ProductEditorInternal({
4116
4103
  }
4117
4104
  ),
4118
4105
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
4119
- _chunkBDWV4KYRjs.FormTextarea,
4106
+ _chunkJE6QWCNEjs.FormTextarea,
4120
4107
  {
4121
4108
  form,
4122
4109
  id: "description",
@@ -4160,20 +4147,20 @@ var defaultContextValue2 = {
4160
4147
  };
4161
4148
  var ProductProvider = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, ({ children, dehydratedProduct, publishChrome = true }) => {
4162
4149
  const t = _nextintl.useTranslations.call(void 0, );
4163
- const generateUrl = _chunkBDWV4KYRjs.usePageUrlGenerator.call(void 0, );
4164
- const { hasRole } = _chunkBDWV4KYRjs.useCurrentUserContext.call(void 0, );
4150
+ const generateUrl = _chunkJE6QWCNEjs.usePageUrlGenerator.call(void 0, );
4151
+ const { hasRole } = _chunkJE6QWCNEjs.useCurrentUserContext.call(void 0, );
4165
4152
  const [product, setProduct] = _react.useState.call(void 0,
4166
- dehydratedProduct ? _chunkHN7L6RRWjs.rehydrate.call(void 0, _chunkP7L6OFX5js.Modules.StripeProduct, dehydratedProduct) : void 0
4153
+ dehydratedProduct ? _chunk77JC2UCFjs.rehydrate.call(void 0, _chunkZ6T2575Ajs.Modules.StripeProduct, dehydratedProduct) : void 0
4167
4154
  );
4168
4155
  const [catalogueVersion, setCatalogueVersion] = _react.useState.call(void 0, 0);
4169
4156
  const refreshCatalogue = _react.useCallback.call(void 0, () => setCatalogueVersion((value2) => value2 + 1), []);
4170
4157
  const reloadProduct = _react.useCallback.call(void 0, async () => {
4171
4158
  if (!_optionalChain([product, 'optionalAccess', _157 => _157.id])) return;
4172
- setProduct(await _chunkHN7L6RRWjs.StripeProductService.getProduct({ id: product.id }));
4159
+ setProduct(await _chunk77JC2UCFjs.StripeProductService.getProduct({ id: product.id }));
4173
4160
  }, [_optionalChain([product, 'optionalAccess', _158 => _158.id])]);
4174
4161
  const createProduct = _react.useCallback.call(void 0,
4175
4162
  async (input) => {
4176
- const saved = await _chunkHN7L6RRWjs.StripeProductService.createProduct(input);
4163
+ const saved = await _chunk77JC2UCFjs.StripeProductService.createProduct(input);
4177
4164
  refreshCatalogue();
4178
4165
  return saved;
4179
4166
  },
@@ -4181,7 +4168,7 @@ var ProductProvider = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, ({ ch
4181
4168
  );
4182
4169
  const updateProduct = _react.useCallback.call(void 0,
4183
4170
  async (input) => {
4184
- const saved = await _chunkHN7L6RRWjs.StripeProductService.updateProduct(input);
4171
+ const saved = await _chunk77JC2UCFjs.StripeProductService.updateProduct(input);
4185
4172
  setProduct(saved);
4186
4173
  refreshCatalogue();
4187
4174
  return saved;
@@ -4192,7 +4179,7 @@ var ProductProvider = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, ({ ch
4192
4179
  async (id) => {
4193
4180
  const target = _nullishCoalesce(id, () => ( _optionalChain([product, 'optionalAccess', _159 => _159.id])));
4194
4181
  if (!target) return;
4195
- await _chunkHN7L6RRWjs.StripeProductService.archiveProduct({ id: target });
4182
+ await _chunk77JC2UCFjs.StripeProductService.archiveProduct({ id: target });
4196
4183
  await reloadProduct();
4197
4184
  refreshCatalogue();
4198
4185
  },
@@ -4202,7 +4189,7 @@ var ProductProvider = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, ({ ch
4202
4189
  async (id) => {
4203
4190
  const target = _nullishCoalesce(id, () => ( _optionalChain([product, 'optionalAccess', _161 => _161.id])));
4204
4191
  if (!target) return;
4205
- await _chunkHN7L6RRWjs.StripeProductService.reactivateProduct({ id: target });
4192
+ await _chunk77JC2UCFjs.StripeProductService.reactivateProduct({ id: target });
4206
4193
  await reloadProduct();
4207
4194
  refreshCatalogue();
4208
4195
  },
@@ -4237,7 +4224,7 @@ var ProductProvider = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, ({ ch
4237
4224
  {
4238
4225
  name: t("billing.admin.products.title"),
4239
4226
  // Linked only when it is NOT the current page.
4240
- ...product ? { href: generateUrl({ page: _chunkP7L6OFX5js.Modules.StripeProduct }) } : {}
4227
+ ...product ? { href: generateUrl({ page: _chunkZ6T2575Ajs.Modules.StripeProduct }) } : {}
4241
4228
  }
4242
4229
  ];
4243
4230
  if (product) items.push({ name: product.name });
@@ -4255,7 +4242,7 @@ var ProductProvider = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, ({ ch
4255
4242
  }
4256
4243
  return response;
4257
4244
  }, "title");
4258
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBDWV4KYRjs.SharedProvider, { value: { breadcrumbs: breadcrumb(), title: title() }, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, ProductContext.Provider, { value, children }) });
4245
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkJE6QWCNEjs.SharedProvider, { value: { breadcrumbs: breadcrumb(), title: title() }, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, ProductContext.Provider, { value, children }) });
4259
4246
  }, "ProductProvider");
4260
4247
  var useProductContext = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, () => _nullishCoalesce(_react.useContext.call(void 0, ProductContext), () => ( defaultContextValue2)), "useProductContext");
4261
4248
 
@@ -4264,57 +4251,57 @@ var useProductContext = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, ()
4264
4251
 
4265
4252
  function PriceDetails() {
4266
4253
  const t = _nextintl.useTranslations.call(void 0, );
4267
- const fmt = _chunkBDWV4KYRjs.useBillingFormatOptions.call(void 0, );
4268
- const generateUrl = _chunkBDWV4KYRjs.usePageUrlGenerator.call(void 0, );
4254
+ const fmt = _chunkJE6QWCNEjs.useBillingFormatOptions.call(void 0, );
4255
+ const generateUrl = _chunkJE6QWCNEjs.usePageUrlGenerator.call(void 0, );
4269
4256
  const { price } = usePriceContext();
4270
4257
  if (!price) return null;
4271
4258
  const isRecurring = price.priceType === "recurring";
4272
4259
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex w-full flex-col gap-y-8", children: [
4273
4260
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex w-full flex-col gap-y-4", children: [
4274
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBDWV4KYRjs.SectionHeader, { children: t("billing.admin.prices.title") }),
4261
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkJE6QWCNEjs.SectionHeader, { children: t("billing.admin.prices.title") }),
4275
4262
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "grid grid-cols-1 gap-4 md:grid-cols-2", children: [
4276
4263
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
4277
- _chunkBDWV4KYRjs.DetailField,
4264
+ _chunkJE6QWCNEjs.DetailField,
4278
4265
  {
4279
4266
  label: t("billing.admin.prices.fields.product"),
4280
- value: price.product ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBDWV4KYRjs.Link, { href: generateUrl({ page: _chunkP7L6OFX5js.Modules.StripeProduct, id: price.product.id }), children: price.product.name }) : "\u2014"
4267
+ value: price.product ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkJE6QWCNEjs.Link, { href: generateUrl({ page: _chunkZ6T2575Ajs.Modules.StripeProduct, id: price.product.id }), children: price.product.name }) : "\u2014"
4281
4268
  }
4282
4269
  ),
4283
4270
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
4284
- _chunkBDWV4KYRjs.DetailField,
4271
+ _chunkJE6QWCNEjs.DetailField,
4285
4272
  {
4286
4273
  label: t("billing.admin.prices.fields.status"),
4287
4274
  value: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "flex flex-wrap items-center gap-1", children: [
4288
- price.active ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBDWV4KYRjs.Badge, { variant: "softGreen", children: t("billing.admin.prices.status.active") }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBDWV4KYRjs.Badge, { variant: "softGray", children: t("billing.admin.prices.status.archived") }),
4289
- price.isTrial && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBDWV4KYRjs.Badge, { variant: "softBlue", children: t("billing.admin.prices.badge.trial") })
4275
+ price.active ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkJE6QWCNEjs.Badge, { variant: "softGreen", children: t("billing.admin.prices.status.active") }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkJE6QWCNEjs.Badge, { variant: "softGray", children: t("billing.admin.prices.status.archived") }),
4276
+ price.isTrial && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkJE6QWCNEjs.Badge, { variant: "softBlue", children: t("billing.admin.prices.badge.trial") })
4290
4277
  ] })
4291
4278
  }
4292
4279
  ),
4293
4280
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
4294
- _chunkBDWV4KYRjs.DetailField,
4281
+ _chunkJE6QWCNEjs.DetailField,
4295
4282
  {
4296
4283
  label: t("billing.admin.prices.fields.amount"),
4297
- value: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "tabular-nums", children: _chunkHN7L6RRWjs.formatCurrency.call(void 0, price.unitAmount, price.currency, fmt) })
4284
+ value: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "tabular-nums", children: _chunk77JC2UCFjs.formatCurrency.call(void 0, price.unitAmount, price.currency, fmt) })
4298
4285
  }
4299
4286
  ),
4300
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBDWV4KYRjs.DetailField, { label: t("billing.admin.prices.fields.currency"), value: price.currency.toUpperCase() }),
4287
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkJE6QWCNEjs.DetailField, { label: t("billing.admin.prices.fields.currency"), value: price.currency.toUpperCase() }),
4301
4288
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
4302
- _chunkBDWV4KYRjs.DetailField,
4289
+ _chunkJE6QWCNEjs.DetailField,
4303
4290
  {
4304
4291
  label: t("billing.admin.prices.fields.type"),
4305
4292
  value: isRecurring ? t("billing.admin.prices.type.recurring") : t("billing.admin.prices.type.oneTime")
4306
4293
  }
4307
4294
  ),
4308
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBDWV4KYRjs.DetailField, { label: t("billing.admin.prices.fields.billing"), value: _chunkHN7L6RRWjs.formatInterval.call(void 0, price, fmt) }),
4295
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkJE6QWCNEjs.DetailField, { label: t("billing.admin.prices.fields.billing"), value: _chunk77JC2UCFjs.formatInterval.call(void 0, price, fmt) }),
4309
4296
  isRecurring && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
4310
- _chunkBDWV4KYRjs.DetailField,
4297
+ _chunkJE6QWCNEjs.DetailField,
4311
4298
  {
4312
4299
  label: t("billing.admin.prices.fields.intervalCount"),
4313
4300
  value: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "tabular-nums", children: _nullishCoalesce(_optionalChain([price, 'access', _163 => _163.recurring, 'optionalAccess', _164 => _164.intervalCount]), () => ( 1)) })
4314
4301
  }
4315
4302
  ),
4316
4303
  isRecurring && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
4317
- _chunkBDWV4KYRjs.DetailField,
4304
+ _chunkJE6QWCNEjs.DetailField,
4318
4305
  {
4319
4306
  label: t("billing.admin.prices.fields.usageType"),
4320
4307
  value: _optionalChain([price, 'access', _165 => _165.recurring, 'optionalAccess', _166 => _166.usageType]) === "metered" ? t("billing.admin.prices.usage.metered") : t("billing.admin.prices.usage.licensed")
@@ -4323,24 +4310,24 @@ function PriceDetails() {
4323
4310
  ] })
4324
4311
  ] }),
4325
4312
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex w-full flex-col gap-y-4", children: [
4326
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBDWV4KYRjs.SectionHeader, { children: t("billing.admin.prices.fields.platformFeatures") }),
4313
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkJE6QWCNEjs.SectionHeader, { children: t("billing.admin.prices.fields.platformFeatures") }),
4327
4314
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "grid grid-cols-1 gap-4 md:grid-cols-2", children: [
4328
4315
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
4329
- _chunkBDWV4KYRjs.DetailField,
4316
+ _chunkJE6QWCNEjs.DetailField,
4330
4317
  {
4331
4318
  label: t("billing.admin.prices.fields.token"),
4332
4319
  value: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "tabular-nums", children: _nullishCoalesce(price.token, () => ( "\u2014")) })
4333
4320
  }
4334
4321
  ),
4335
4322
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
4336
- _chunkBDWV4KYRjs.DetailField,
4323
+ _chunkJE6QWCNEjs.DetailField,
4337
4324
  {
4338
4325
  label: t("billing.admin.prices.fields.stripeId"),
4339
4326
  value: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "tabular-nums", children: price.stripePriceId })
4340
4327
  }
4341
4328
  ),
4342
4329
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
4343
- _chunkBDWV4KYRjs.DetailField,
4330
+ _chunkJE6QWCNEjs.DetailField,
4344
4331
  {
4345
4332
  label: t("billing.admin.prices.fields.description"),
4346
4333
  value: _nullishCoalesce(price.description, () => ( "\u2014")),
@@ -4348,7 +4335,7 @@ function PriceDetails() {
4348
4335
  }
4349
4336
  ),
4350
4337
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
4351
- _chunkBDWV4KYRjs.DetailField,
4338
+ _chunkJE6QWCNEjs.DetailField,
4352
4339
  {
4353
4340
  label: t("billing.admin.prices.fields.features"),
4354
4341
  className: "md:col-span-2",
@@ -4356,11 +4343,11 @@ function PriceDetails() {
4356
4343
  }
4357
4344
  ),
4358
4345
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
4359
- _chunkBDWV4KYRjs.DetailField,
4346
+ _chunkJE6QWCNEjs.DetailField,
4360
4347
  {
4361
4348
  label: t("billing.admin.prices.fields.platformFeatures"),
4362
4349
  className: "md:col-span-2",
4363
- value: price.priceFeatures.length > 0 ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "flex flex-wrap items-center gap-1", children: price.priceFeatures.map((feature) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBDWV4KYRjs.Badge, { variant: "softGray", children: feature.name }, feature.id)) }) : "\u2014"
4350
+ value: price.priceFeatures.length > 0 ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "flex flex-wrap items-center gap-1", children: price.priceFeatures.map((feature) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkJE6QWCNEjs.Badge, { variant: "softGray", children: feature.name }, feature.id)) }) : "\u2014"
4364
4351
  }
4365
4352
  )
4366
4353
  ] })
@@ -4374,7 +4361,7 @@ _chunk7QVYU63Ejs.__name.call(void 0, PriceDetails, "PriceDetails");
4374
4361
  function PriceContainer() {
4375
4362
  const { price } = usePriceContext();
4376
4363
  if (!price) return null;
4377
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBDWV4KYRjs.RoundPageContainer, { module: _chunkP7L6OFX5js.Modules.StripePrice, id: price.id, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, PriceDetails, {}) });
4364
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkJE6QWCNEjs.RoundPageContainer, { module: _chunkZ6T2575Ajs.Modules.StripePrice, id: price.id, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, PriceDetails, {}) });
4378
4365
  }
4379
4366
  _chunk7QVYU63Ejs.__name.call(void 0, PriceContainer, "PriceContainer");
4380
4367
 
@@ -4499,10 +4486,10 @@ function PricesList({ productId, fullWidth }) {
4499
4486
  const importInputRef = _react.useRef.call(void 0, null);
4500
4487
  const [seed, setSeed] = _react.useState.call(void 0, void 0);
4501
4488
  const [seedNonce, setSeedNonce] = _react.useState.call(void 0, 0);
4502
- const data = _chunkBDWV4KYRjs.useDataListRetriever.call(void 0, {
4503
- retriever: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (params) => _chunkHN7L6RRWjs.StripePriceService.listPrices({ ...params, productId }), "retriever"),
4489
+ const data = _chunkJE6QWCNEjs.useDataListRetriever.call(void 0, {
4490
+ retriever: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (params) => _chunk77JC2UCFjs.StripePriceService.listPrices({ ...params, productId }), "retriever"),
4504
4491
  retrieverParams: {},
4505
- module: _chunkP7L6OFX5js.Modules.StripePrice
4492
+ module: _chunkZ6T2575Ajs.Modules.StripePrice
4506
4493
  });
4507
4494
  _react.useEffect.call(void 0, () => {
4508
4495
  if (priceVersion > 0) void data.refresh();
@@ -4537,7 +4524,7 @@ function PricesList({ productId, fullWidth }) {
4537
4524
  openSeededEditor(transfer.price);
4538
4525
  } catch (error) {
4539
4526
  console.error("[PricesList] price import failed", error);
4540
- _chunkBDWV4KYRjs.errorToast.call(void 0, {
4527
+ _chunkJE6QWCNEjs.errorToast.call(void 0, {
4541
4528
  title: t("billing.admin.prices.import.errors.title"),
4542
4529
  error: t("billing.admin.prices.import.errors.invalid")
4543
4530
  });
@@ -4556,7 +4543,7 @@ function PricesList({ productId, fullWidth }) {
4556
4543
  "create-price"
4557
4544
  ),
4558
4545
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _react.Fragment, { children: [
4559
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkBDWV4KYRjs.Button, { variant: "outline", size: "sm", type: "button", onClick: () => _optionalChain([importInputRef, 'access', _181 => _181.current, 'optionalAccess', _182 => _182.click, 'call', _183 => _183()]), children: [
4546
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkJE6QWCNEjs.Button, { variant: "outline", size: "sm", type: "button", onClick: () => _optionalChain([importInputRef, 'access', _181 => _181.current, 'optionalAccess', _182 => _182.click, 'call', _183 => _183()]), children: [
4560
4547
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.UploadIcon, {}),
4561
4548
  t("billing.admin.prices.actions.import")
4562
4549
  ] }),
@@ -4574,7 +4561,7 @@ function PricesList({ productId, fullWidth }) {
4574
4561
  ];
4575
4562
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
4576
4563
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
4577
- _chunkBDWV4KYRjs.ContentListTable,
4564
+ _chunkJE6QWCNEjs.ContentListTable,
4578
4565
  {
4579
4566
  data,
4580
4567
  fields: [
@@ -4585,13 +4572,13 @@ function PricesList({ productId, fullWidth }) {
4585
4572
  "status" /* status */,
4586
4573
  "actions" /* actions */
4587
4574
  ],
4588
- tableGeneratorType: _chunkP7L6OFX5js.Modules.StripePrice,
4575
+ tableGeneratorType: _chunkZ6T2575Ajs.Modules.StripePrice,
4589
4576
  functions,
4590
4577
  context: tableContext,
4591
4578
  fullWidth,
4592
4579
  title: t("billing.admin.prices.title"),
4593
4580
  emptyState: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
4594
- _chunkBDWV4KYRjs.EmptyState,
4581
+ _chunkJE6QWCNEjs.EmptyState,
4595
4582
  {
4596
4583
  icon: _lucidereact.DollarSignIcon,
4597
4584
  title: t("billing.admin.prices.empty.title"),
@@ -4631,18 +4618,18 @@ function ProductDetails() {
4631
4618
  const { product } = useProductContext();
4632
4619
  if (!product) return null;
4633
4620
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex w-full flex-col gap-y-4", children: [
4634
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBDWV4KYRjs.SectionHeader, { children: t("billing.admin.products.tabs.details") }),
4621
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkJE6QWCNEjs.SectionHeader, { children: t("billing.admin.products.tabs.details") }),
4635
4622
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "grid grid-cols-1 gap-4 md:grid-cols-2", children: [
4636
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBDWV4KYRjs.DetailField, { label: t("billing.admin.products.fields.name"), value: product.name }),
4623
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkJE6QWCNEjs.DetailField, { label: t("billing.admin.products.fields.name"), value: product.name }),
4637
4624
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
4638
- _chunkBDWV4KYRjs.DetailField,
4625
+ _chunkJE6QWCNEjs.DetailField,
4639
4626
  {
4640
4627
  label: t("billing.admin.products.fields.status"),
4641
- value: product.active ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBDWV4KYRjs.Badge, { variant: "softGreen", children: t("billing.admin.products.status.active") }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBDWV4KYRjs.Badge, { variant: "softGray", children: t("billing.admin.products.status.archived") })
4628
+ value: product.active ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkJE6QWCNEjs.Badge, { variant: "softGreen", children: t("billing.admin.products.status.active") }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkJE6QWCNEjs.Badge, { variant: "softGray", children: t("billing.admin.products.status.archived") })
4642
4629
  }
4643
4630
  ),
4644
4631
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
4645
- _chunkBDWV4KYRjs.DetailField,
4632
+ _chunkJE6QWCNEjs.DetailField,
4646
4633
  {
4647
4634
  label: t("billing.admin.products.fields.description"),
4648
4635
  value: _nullishCoalesce(product.description, () => ( "\u2014")),
@@ -4650,14 +4637,14 @@ function ProductDetails() {
4650
4637
  }
4651
4638
  ),
4652
4639
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
4653
- _chunkBDWV4KYRjs.DetailField,
4640
+ _chunkJE6QWCNEjs.DetailField,
4654
4641
  {
4655
4642
  label: t("billing.admin.products.fields.prices"),
4656
4643
  value: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "tabular-nums", children: product.stripePrices.length })
4657
4644
  }
4658
4645
  ),
4659
4646
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
4660
- _chunkBDWV4KYRjs.DetailField,
4647
+ _chunkJE6QWCNEjs.DetailField,
4661
4648
  {
4662
4649
  label: t("billing.admin.products.fields.stripeId"),
4663
4650
  value: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "tabular-nums", children: product.stripeProductId })
@@ -4675,9 +4662,9 @@ function ProductContainer() {
4675
4662
  const { product } = useProductContext();
4676
4663
  if (!product) return null;
4677
4664
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
4678
- _chunkBDWV4KYRjs.RoundPageContainer,
4665
+ _chunkJE6QWCNEjs.RoundPageContainer,
4679
4666
  {
4680
- module: _chunkP7L6OFX5js.Modules.StripeProduct,
4667
+ module: _chunkZ6T2575Ajs.Modules.StripeProduct,
4681
4668
  id: product.id,
4682
4669
  tabs: [
4683
4670
  {
@@ -4686,7 +4673,7 @@ function ProductContainer() {
4686
4673
  content: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, ProductDetails, {})
4687
4674
  },
4688
4675
  {
4689
- key: _chunkP7L6OFX5js.Modules.StripePrice,
4676
+ key: _chunkZ6T2575Ajs.Modules.StripePrice,
4690
4677
  label: t("billing.admin.prices.title"),
4691
4678
  // publishChrome={false}: SharedProvider REPLACES its value for the
4692
4679
  // subtree (SharedContext.tsx:35-37), so a nested provider publishing
@@ -4712,18 +4699,18 @@ _chunk7QVYU63Ejs.__name.call(void 0, ProductContainer, "ProductContainer");
4712
4699
 
4713
4700
  function CouponsList({ fullWidth } = {}) {
4714
4701
  const t = _nextintl.useTranslations.call(void 0, );
4715
- const { catalogueVersion } = _chunkBDWV4KYRjs.useCouponContext.call(void 0, );
4716
- const data = _chunkBDWV4KYRjs.useDataListRetriever.call(void 0, {
4717
- retriever: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (params) => _chunkHN7L6RRWjs.StripeCouponService.listCoupons(params), "retriever"),
4702
+ const { catalogueVersion } = _chunkJE6QWCNEjs.useCouponContext.call(void 0, );
4703
+ const data = _chunkJE6QWCNEjs.useDataListRetriever.call(void 0, {
4704
+ retriever: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (params) => _chunk77JC2UCFjs.StripeCouponService.listCoupons(params), "retriever"),
4718
4705
  retrieverParams: {},
4719
- module: _chunkP7L6OFX5js.Modules.StripeCoupon
4706
+ module: _chunkZ6T2575Ajs.Modules.StripeCoupon
4720
4707
  });
4721
4708
  _react.useEffect.call(void 0, () => {
4722
4709
  if (catalogueVersion > 0) void data.refresh();
4723
4710
  }, [catalogueVersion]);
4724
- const functions = [/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBDWV4KYRjs.CouponEditor, {}, "create-coupon")];
4711
+ const functions = [/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkJE6QWCNEjs.CouponEditor, {}, "create-coupon")];
4725
4712
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
4726
- _chunkBDWV4KYRjs.ContentListTable,
4713
+ _chunkJE6QWCNEjs.ContentListTable,
4727
4714
  {
4728
4715
  data,
4729
4716
  fields: [
@@ -4733,12 +4720,12 @@ function CouponsList({ fullWidth } = {}) {
4733
4720
  "codes" /* codes */,
4734
4721
  "status" /* status */
4735
4722
  ],
4736
- tableGeneratorType: _chunkP7L6OFX5js.Modules.StripeCoupon,
4723
+ tableGeneratorType: _chunkZ6T2575Ajs.Modules.StripeCoupon,
4737
4724
  functions,
4738
4725
  fullWidth,
4739
4726
  title: t("billing.admin.coupons.title"),
4740
4727
  emptyState: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
4741
- _chunkBDWV4KYRjs.EmptyState,
4728
+ _chunkJE6QWCNEjs.EmptyState,
4742
4729
  {
4743
4730
  icon: _lucidereact.TicketPercentIcon,
4744
4731
  title: t("billing.admin.coupons.empty.title"),
@@ -4758,26 +4745,26 @@ _chunk7QVYU63Ejs.__name.call(void 0, CouponsList, "CouponsList");
4758
4745
  function ProductsList({ fullWidth } = {}) {
4759
4746
  const t = _nextintl.useTranslations.call(void 0, );
4760
4747
  const { catalogueVersion } = useProductContext();
4761
- const data = _chunkBDWV4KYRjs.useDataListRetriever.call(void 0, {
4762
- retriever: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (params) => _chunkHN7L6RRWjs.StripeProductService.listProducts(params), "retriever"),
4748
+ const data = _chunkJE6QWCNEjs.useDataListRetriever.call(void 0, {
4749
+ retriever: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (params) => _chunk77JC2UCFjs.StripeProductService.listProducts(params), "retriever"),
4763
4750
  retrieverParams: {},
4764
- module: _chunkP7L6OFX5js.Modules.StripeProduct
4751
+ module: _chunkZ6T2575Ajs.Modules.StripeProduct
4765
4752
  });
4766
4753
  _react.useEffect.call(void 0, () => {
4767
4754
  if (catalogueVersion > 0) void data.refresh();
4768
4755
  }, [catalogueVersion]);
4769
4756
  const functions = [/* @__PURE__ */ _jsxruntime.jsx.call(void 0, ProductEditor, {}, "create-product")];
4770
4757
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
4771
- _chunkBDWV4KYRjs.ContentListTable,
4758
+ _chunkJE6QWCNEjs.ContentListTable,
4772
4759
  {
4773
4760
  data,
4774
4761
  fields: ["name" /* name */, "status" /* status */, "prices" /* prices */],
4775
- tableGeneratorType: _chunkP7L6OFX5js.Modules.StripeProduct,
4762
+ tableGeneratorType: _chunkZ6T2575Ajs.Modules.StripeProduct,
4776
4763
  functions,
4777
4764
  fullWidth,
4778
4765
  title: t("billing.admin.products.title"),
4779
4766
  emptyState: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
4780
- _chunkBDWV4KYRjs.EmptyState,
4767
+ _chunkJE6QWCNEjs.EmptyState,
4781
4768
  {
4782
4769
  icon: _lucidereact.PackageIcon,
4783
4770
  title: t("billing.admin.products.empty.title"),
@@ -4793,10 +4780,10 @@ _chunk7QVYU63Ejs.__name.call(void 0, ProductsList, "ProductsList");
4793
4780
 
4794
4781
  function ProductsListContainer() {
4795
4782
  const t = _nextintl.useTranslations.call(void 0, );
4796
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, ProductProvider, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBDWV4KYRjs.CouponProvider, { publishChrome: false, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
4797
- _chunkBDWV4KYRjs.RoundPageContainer,
4783
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, ProductProvider, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkJE6QWCNEjs.CouponProvider, { publishChrome: false, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
4784
+ _chunkJE6QWCNEjs.RoundPageContainer,
4798
4785
  {
4799
- module: _chunkP7L6OFX5js.Modules.StripeProduct,
4786
+ module: _chunkZ6T2575Ajs.Modules.StripeProduct,
4800
4787
  tabs: [
4801
4788
  { sectionKey: "products", label: t("billing.admin.products.tabs.products"), content: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, ProductsList, {}) },
4802
4789
  { sectionKey: "codes", label: t("billing.admin.products.tabs.codes"), content: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, CouponsList, {}) }
@@ -4814,30 +4801,30 @@ _chunk7QVYU63Ejs.__name.call(void 0, ProductsListContainer, "ProductsListContain
4814
4801
 
4815
4802
  function CouponDetails() {
4816
4803
  const t = _nextintl.useTranslations.call(void 0, );
4817
- const fmt = _chunkBDWV4KYRjs.useBillingFormatOptions.call(void 0, );
4818
- const { coupon } = _chunkBDWV4KYRjs.useCouponContext.call(void 0, );
4804
+ const fmt = _chunkJE6QWCNEjs.useBillingFormatOptions.call(void 0, );
4805
+ const { coupon } = _chunkJE6QWCNEjs.useCouponContext.call(void 0, );
4819
4806
  if (!coupon) return null;
4820
4807
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex w-full flex-col gap-y-4", children: [
4821
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBDWV4KYRjs.SectionHeader, { children: t("billing.admin.products.tabs.details") }),
4808
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkJE6QWCNEjs.SectionHeader, { children: t("billing.admin.products.tabs.details") }),
4822
4809
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-muted-foreground text-xs/relaxed", children: t("billing.admin.coupons.fixed_notice") }),
4823
4810
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "grid grid-cols-1 gap-4 md:grid-cols-2", children: [
4824
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBDWV4KYRjs.DetailField, { label: t("billing.admin.coupons.fields.name"), value: coupon.name }),
4811
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkJE6QWCNEjs.DetailField, { label: t("billing.admin.coupons.fields.name"), value: coupon.name }),
4825
4812
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
4826
- _chunkBDWV4KYRjs.DetailField,
4813
+ _chunkJE6QWCNEjs.DetailField,
4827
4814
  {
4828
4815
  label: t("billing.admin.coupons.fields.status"),
4829
- value: coupon.valid ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBDWV4KYRjs.Badge, { variant: "softGreen", children: t("billing.admin.coupons.status.active") }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBDWV4KYRjs.Badge, { variant: "softGray", children: t("billing.admin.coupons.status.ended") })
4816
+ value: coupon.valid ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkJE6QWCNEjs.Badge, { variant: "softGreen", children: t("billing.admin.coupons.status.active") }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkJE6QWCNEjs.Badge, { variant: "softGray", children: t("billing.admin.coupons.status.ended") })
4830
4817
  }
4831
4818
  ),
4832
4819
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
4833
- _chunkBDWV4KYRjs.DetailField,
4820
+ _chunkJE6QWCNEjs.DetailField,
4834
4821
  {
4835
4822
  label: t("billing.admin.coupons.fields.discount"),
4836
- value: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "tabular-nums", children: _chunkHN7L6RRWjs.formatCouponDiscount.call(void 0, coupon, t, fmt) })
4823
+ value: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "tabular-nums", children: _chunk77JC2UCFjs.formatCouponDiscount.call(void 0, coupon, t, fmt) })
4837
4824
  }
4838
4825
  ),
4839
4826
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
4840
- _chunkBDWV4KYRjs.DetailField,
4827
+ _chunkJE6QWCNEjs.DetailField,
4841
4828
  {
4842
4829
  label: t("billing.admin.coupons.fields.places"),
4843
4830
  value: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "tabular-nums", children: coupon.maxRedemptions !== void 0 ? t("billing.admin.coupons.places.limited", {
@@ -4847,21 +4834,21 @@ function CouponDetails() {
4847
4834
  }
4848
4835
  ),
4849
4836
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
4850
- _chunkBDWV4KYRjs.DetailField,
4837
+ _chunkJE6QWCNEjs.DetailField,
4851
4838
  {
4852
4839
  label: t("billing.admin.coupons.fields.products"),
4853
4840
  value: coupon.stripeProductIds.length > 0 ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "tabular-nums", children: coupon.stripeProductIds.join(", ") }) : t("billing.admin.coupons.all_products")
4854
4841
  }
4855
4842
  ),
4856
4843
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
4857
- _chunkBDWV4KYRjs.DetailField,
4844
+ _chunkJE6QWCNEjs.DetailField,
4858
4845
  {
4859
4846
  label: t("billing.admin.coupons.fields.redeemBy"),
4860
- value: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "tabular-nums", children: coupon.redeemBy ? _chunkBDWV4KYRjs.formatDate.call(void 0, coupon.redeemBy, fmt) : "\u2014" })
4847
+ value: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "tabular-nums", children: coupon.redeemBy ? _chunkJE6QWCNEjs.formatDate.call(void 0, coupon.redeemBy, fmt) : "\u2014" })
4861
4848
  }
4862
4849
  ),
4863
4850
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
4864
- _chunkBDWV4KYRjs.DetailField,
4851
+ _chunkJE6QWCNEjs.DetailField,
4865
4852
  {
4866
4853
  label: t("billing.admin.coupons.fields.stripeId"),
4867
4854
  value: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "tabular-nums", children: coupon.stripeCouponId })
@@ -4895,33 +4882,33 @@ function CouponCodeEditorInternal({
4895
4882
  onDialogOpenChange
4896
4883
  }) {
4897
4884
  const t = _nextintl.useTranslations.call(void 0, );
4898
- const router = _chunkP7L6OFX5js.useI18nRouter.call(void 0, );
4899
- const { createCode } = _chunkBDWV4KYRjs.useCouponContext.call(void 0, );
4900
- const formSchema2 = _react.useMemo.call(void 0, () => _zod3.z.object({ id: _zod3.z.uuidv4() }).and(_chunkBDWV4KYRjs.couponCodeSchema.call(void 0, t)), [t]);
4901
- const getDefaultValues = _react.useCallback.call(void 0, () => ({ id: _uuid.v4.call(void 0, ), ..._chunkBDWV4KYRjs.couponCodeDefaults.call(void 0, ) }), []);
4885
+ const router = _chunkNP3AFULUjs.useI18nRouter.call(void 0, );
4886
+ const { createCode } = _chunkJE6QWCNEjs.useCouponContext.call(void 0, );
4887
+ const formSchema2 = _react.useMemo.call(void 0, () => _zod3.z.object({ id: _zod3.z.uuidv4() }).and(_chunkJE6QWCNEjs.couponCodeSchema.call(void 0, t)), [t]);
4888
+ const getDefaultValues = _react.useCallback.call(void 0, () => ({ id: _uuid.v4.call(void 0, ), ..._chunkJE6QWCNEjs.couponCodeDefaults.call(void 0, ) }), []);
4902
4889
  const form = _reacthookform.useForm.call(void 0, {
4903
4890
  resolver: _zod.zodResolver.call(void 0, formSchema2),
4904
4891
  defaultValues: getDefaultValues()
4905
4892
  });
4906
4893
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
4907
- _chunkBDWV4KYRjs.EditorSheet,
4894
+ _chunkJE6QWCNEjs.EditorSheet,
4908
4895
  {
4909
4896
  form,
4910
4897
  entityType: t("billing.admin.coupons.codes.entity"),
4911
4898
  isEdit: false,
4912
- module: _chunkP7L6OFX5js.Modules.StripeCouponCode,
4899
+ module: _chunkZ6T2575Ajs.Modules.StripeCouponCode,
4913
4900
  size: "md",
4914
4901
  onSuccess: _nullishCoalesce(onSuccess, () => ( (() => {
4915
4902
  }))),
4916
4903
  onNavigate: (url) => router.push(url),
4917
- onSubmit: async (values) => await createCode({ id: values.id, couponId, ..._chunkBDWV4KYRjs.toCouponCodeInput.call(void 0, values) }),
4904
+ onSubmit: async (values) => await createCode({ id: values.id, couponId, ..._chunkJE6QWCNEjs.toCouponCodeInput.call(void 0, values) }),
4918
4905
  onReset: getDefaultValues,
4919
4906
  trigger,
4920
4907
  forceShow,
4921
4908
  onClose,
4922
4909
  dialogOpen,
4923
4910
  onDialogOpenChange,
4924
- children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkBDWV4KYRjs.CouponCodeFields, { form })
4911
+ children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkJE6QWCNEjs.CouponCodeFields, { form })
4925
4912
  }
4926
4913
  );
4927
4914
  }
@@ -4935,18 +4922,18 @@ _chunk7QVYU63Ejs.__name.call(void 0, CouponCodeEditor, "CouponCodeEditor");
4935
4922
 
4936
4923
  function CouponCodesList({ couponId }) {
4937
4924
  const t = _nextintl.useTranslations.call(void 0, );
4938
- const { catalogueVersion } = _chunkBDWV4KYRjs.useCouponContext.call(void 0, );
4939
- const data = _chunkBDWV4KYRjs.useDataListRetriever.call(void 0, {
4940
- retriever: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (params) => _chunkHN7L6RRWjs.StripeCouponCodeService.listByCoupon({ ...params, couponId }), "retriever"),
4925
+ const { catalogueVersion } = _chunkJE6QWCNEjs.useCouponContext.call(void 0, );
4926
+ const data = _chunkJE6QWCNEjs.useDataListRetriever.call(void 0, {
4927
+ retriever: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (params) => _chunk77JC2UCFjs.StripeCouponCodeService.listByCoupon({ ...params, couponId }), "retriever"),
4941
4928
  retrieverParams: {},
4942
- module: _chunkP7L6OFX5js.Modules.StripeCouponCode
4929
+ module: _chunkZ6T2575Ajs.Modules.StripeCouponCode
4943
4930
  });
4944
4931
  _react.useEffect.call(void 0, () => {
4945
4932
  if (catalogueVersion > 0) void data.refresh();
4946
4933
  }, [catalogueVersion]);
4947
4934
  const functions = [/* @__PURE__ */ _jsxruntime.jsx.call(void 0, CouponCodeEditor, { couponId }, "create-code")];
4948
4935
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
4949
- _chunkBDWV4KYRjs.ContentListTable,
4936
+ _chunkJE6QWCNEjs.ContentListTable,
4950
4937
  {
4951
4938
  data,
4952
4939
  fields: [
@@ -4957,11 +4944,11 @@ function CouponCodesList({ couponId }) {
4957
4944
  "status" /* status */,
4958
4945
  "actions" /* actions */
4959
4946
  ],
4960
- tableGeneratorType: _chunkP7L6OFX5js.Modules.StripeCouponCode,
4947
+ tableGeneratorType: _chunkZ6T2575Ajs.Modules.StripeCouponCode,
4961
4948
  functions,
4962
4949
  title: t("billing.admin.coupons.codes.title"),
4963
4950
  emptyState: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
4964
- _chunkBDWV4KYRjs.EmptyState,
4951
+ _chunkJE6QWCNEjs.EmptyState,
4965
4952
  {
4966
4953
  icon: _lucidereact.TicketIcon,
4967
4954
  title: t("billing.admin.coupons.codes.empty.title"),
@@ -4977,12 +4964,12 @@ _chunk7QVYU63Ejs.__name.call(void 0, CouponCodesList, "CouponCodesList");
4977
4964
 
4978
4965
  function CouponContainer() {
4979
4966
  const t = _nextintl.useTranslations.call(void 0, );
4980
- const { coupon } = _chunkBDWV4KYRjs.useCouponContext.call(void 0, );
4967
+ const { coupon } = _chunkJE6QWCNEjs.useCouponContext.call(void 0, );
4981
4968
  if (!coupon) return null;
4982
4969
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
4983
- _chunkBDWV4KYRjs.RoundPageContainer,
4970
+ _chunkJE6QWCNEjs.RoundPageContainer,
4984
4971
  {
4985
- module: _chunkBDWV4KYRjs.couponPageModule.call(void 0, ),
4972
+ module: _chunkJE6QWCNEjs.couponPageModule.call(void 0, ),
4986
4973
  id: coupon.id,
4987
4974
  tabs: [
4988
4975
  {
@@ -5089,5 +5076,5 @@ _chunk7QVYU63Ejs.__name.call(void 0, CouponContainer, "CouponContainer");
5089
5076
 
5090
5077
 
5091
5078
 
5092
- exports.BillingAlertBanner = BillingAlertBanner; exports.BillingDashboardContainer = BillingDashboardContainer; exports.BillingDetailModal = BillingDetailModal; exports.BillingUsageSummaryCard = BillingUsageSummaryCard; exports.CancelSubscriptionDialog = CancelSubscriptionDialog; exports.CouponCodeActions = _chunkBDWV4KYRjs.CouponCodeActions; exports.CouponCodeEditor = CouponCodeEditor; exports.CouponCodeFields = _chunkBDWV4KYRjs.CouponCodeFields; exports.CouponCodesList = CouponCodesList; exports.CouponContainer = CouponContainer; exports.CouponDetails = CouponDetails; exports.CouponEditor = _chunkBDWV4KYRjs.CouponEditor; exports.CouponProvider = _chunkBDWV4KYRjs.CouponProvider; exports.CouponRefresher = _chunkBDWV4KYRjs.CouponRefresher; exports.CouponsList = CouponsList; exports.CustomerInfoCard = CustomerInfoCard; exports.IntervalToggle = IntervalToggle; exports.InvoiceDetails = InvoiceDetails; exports.InvoiceStatusBadge = InvoiceStatusBadge; exports.InvoicesContainer = InvoicesContainer; exports.InvoicesList = InvoicesList; exports.InvoicesSummaryCard = InvoicesSummaryCard; exports.PaymentMethodCard = PaymentMethodCard; exports.PaymentMethodEditor = PaymentMethodEditor; exports.PaymentMethodForm = PaymentMethodForm; exports.PaymentMethodSummaryCard = PaymentMethodSummaryCard; exports.PaymentMethodsContainer = PaymentMethodsContainer; exports.PaymentMethodsList = PaymentMethodsList; exports.PriceArchiver = PriceArchiver; exports.PriceContainer = PriceContainer; exports.PriceDetails = PriceDetails; exports.PriceEditor = PriceEditor; exports.PriceProvider = PriceProvider; exports.PricesList = PricesList; exports.PricingCard = PricingCard; exports.ProductArchiver = ProductArchiver; exports.ProductContainer = ProductContainer; exports.ProductDetails = ProductDetails; exports.ProductEditor = ProductEditor; exports.ProductPricingList = ProductPricingList; exports.ProductPricingRow = ProductPricingRow; exports.ProductProvider = ProductProvider; exports.ProductsList = ProductsList; exports.ProductsListContainer = ProductsListContainer; exports.PromoCodeInput = PromoCodeInput; exports.ProrationPreview = ProrationPreview; exports.StripeProvider = StripeProvider; exports.SubscriptionConfirmation = SubscriptionConfirmation; exports.SubscriptionDetails = SubscriptionDetails; exports.SubscriptionStatusBadge = SubscriptionStatusBadge; exports.SubscriptionSummaryCard = SubscriptionSummaryCard; exports.SubscriptionWizard = SubscriptionWizard; exports.SubscriptionsContainer = SubscriptionsContainer; exports.SubscriptionsList = SubscriptionsList; exports.UsageContainer = UsageContainer; exports.UsageHistoryTable = UsageHistoryTable; exports.UsageSummaryCard = UsageSummaryCard; exports.UsageSummaryCards = UsageSummaryCards; exports.WizardProgressIndicator = WizardProgressIndicator; exports.WizardStepPaymentMethod = WizardStepPaymentMethod; exports.WizardStepPlanSelection = WizardStepPlanSelection; exports.WizardStepReview = WizardStepReview; exports.applyDiscount = _chunkBDWV4KYRjs.applyDiscount; exports.couponCodeDefaults = _chunkBDWV4KYRjs.couponCodeDefaults; exports.couponCodeSchema = _chunkBDWV4KYRjs.couponCodeSchema; exports.couponCurrencyOptions = _chunkBDWV4KYRjs.couponCurrencyOptions; exports.formatCurrency = _chunkHN7L6RRWjs.formatCurrency; exports.formatDate = _chunkBDWV4KYRjs.formatDate; exports.formatFixed = _chunkHN7L6RRWjs.formatFixed; exports.formatInterval = _chunkHN7L6RRWjs.formatInterval; exports.isStripeConfigured = isStripeConfigured; exports.optionalDate = _chunkBDWV4KYRjs.optionalDate; exports.optionalDecimal = _chunkBDWV4KYRjs.optionalDecimal; exports.optionalPositiveInt = _chunkBDWV4KYRjs.optionalPositiveInt; exports.parseOptionalDecimal = _chunkBDWV4KYRjs.parseOptionalDecimal; exports.parseOptionalPositiveInt = _chunkBDWV4KYRjs.parseOptionalPositiveInt; exports.priceLabel = priceLabel; exports.promotionCodeDiscount = _chunkBDWV4KYRjs.promotionCodeDiscount; exports.subscriptionDiscount = _chunkBDWV4KYRjs.subscriptionDiscount; exports.toCouponCodeInput = _chunkBDWV4KYRjs.toCouponCodeInput; exports.useBillingFormatOptions = _chunkBDWV4KYRjs.useBillingFormatOptions; exports.useCouponContext = _chunkBDWV4KYRjs.useCouponContext; exports.usePriceContext = usePriceContext; exports.useProductContext = useProductContext;
5079
+ exports.BillingAlertBanner = BillingAlertBanner; exports.BillingDashboardContainer = BillingDashboardContainer; exports.BillingDetailModal = BillingDetailModal; exports.BillingUsageSummaryCard = BillingUsageSummaryCard; exports.CancelSubscriptionDialog = CancelSubscriptionDialog; exports.CouponCodeActions = _chunkJE6QWCNEjs.CouponCodeActions; exports.CouponCodeEditor = CouponCodeEditor; exports.CouponCodeFields = _chunkJE6QWCNEjs.CouponCodeFields; exports.CouponCodesList = CouponCodesList; exports.CouponContainer = CouponContainer; exports.CouponDetails = CouponDetails; exports.CouponEditor = _chunkJE6QWCNEjs.CouponEditor; exports.CouponProvider = _chunkJE6QWCNEjs.CouponProvider; exports.CouponRefresher = _chunkJE6QWCNEjs.CouponRefresher; exports.CouponsList = CouponsList; exports.CustomerInfoCard = CustomerInfoCard; exports.IntervalToggle = IntervalToggle; exports.InvoiceDetails = InvoiceDetails; exports.InvoiceStatusBadge = InvoiceStatusBadge; exports.InvoicesContainer = InvoicesContainer; exports.InvoicesList = InvoicesList; exports.InvoicesSummaryCard = InvoicesSummaryCard; exports.PaymentMethodCard = PaymentMethodCard; exports.PaymentMethodEditor = PaymentMethodEditor; exports.PaymentMethodForm = PaymentMethodForm; exports.PaymentMethodSummaryCard = PaymentMethodSummaryCard; exports.PaymentMethodsContainer = PaymentMethodsContainer; exports.PaymentMethodsList = PaymentMethodsList; exports.PriceArchiver = PriceArchiver; exports.PriceContainer = PriceContainer; exports.PriceDetails = PriceDetails; exports.PriceEditor = PriceEditor; exports.PriceProvider = PriceProvider; exports.PricesList = PricesList; exports.PricingCard = PricingCard; exports.ProductArchiver = ProductArchiver; exports.ProductContainer = ProductContainer; exports.ProductDetails = ProductDetails; exports.ProductEditor = ProductEditor; exports.ProductPricingList = ProductPricingList; exports.ProductPricingRow = ProductPricingRow; exports.ProductProvider = ProductProvider; exports.ProductsList = ProductsList; exports.ProductsListContainer = ProductsListContainer; exports.PromoCodeInput = PromoCodeInput; exports.ProrationPreview = ProrationPreview; exports.StripeProvider = StripeProvider; exports.SubscriptionConfirmation = SubscriptionConfirmation; exports.SubscriptionDetails = SubscriptionDetails; exports.SubscriptionStatusBadge = SubscriptionStatusBadge; exports.SubscriptionSummaryCard = SubscriptionSummaryCard; exports.SubscriptionWizard = SubscriptionWizard; exports.SubscriptionsContainer = SubscriptionsContainer; exports.SubscriptionsList = SubscriptionsList; exports.UsageContainer = UsageContainer; exports.UsageHistoryTable = UsageHistoryTable; exports.UsageSummaryCard = UsageSummaryCard; exports.UsageSummaryCards = UsageSummaryCards; exports.WizardProgressIndicator = WizardProgressIndicator; exports.WizardStepPaymentMethod = WizardStepPaymentMethod; exports.WizardStepPlanSelection = WizardStepPlanSelection; exports.WizardStepReview = WizardStepReview; exports.applyDiscount = _chunkJE6QWCNEjs.applyDiscount; exports.couponCodeDefaults = _chunkJE6QWCNEjs.couponCodeDefaults; exports.couponCodeSchema = _chunkJE6QWCNEjs.couponCodeSchema; exports.couponCurrencyOptions = _chunkJE6QWCNEjs.couponCurrencyOptions; exports.formatCurrency = _chunk77JC2UCFjs.formatCurrency; exports.formatDate = _chunkJE6QWCNEjs.formatDate; exports.formatFixed = _chunk77JC2UCFjs.formatFixed; exports.formatInterval = _chunk77JC2UCFjs.formatInterval; exports.isStripeConfigured = isStripeConfigured; exports.optionalDate = _chunkJE6QWCNEjs.optionalDate; exports.optionalDecimal = _chunkJE6QWCNEjs.optionalDecimal; exports.optionalPositiveInt = _chunkJE6QWCNEjs.optionalPositiveInt; exports.parseOptionalDecimal = _chunkJE6QWCNEjs.parseOptionalDecimal; exports.parseOptionalPositiveInt = _chunkJE6QWCNEjs.parseOptionalPositiveInt; exports.priceLabel = priceLabel; exports.promotionCodeDiscount = _chunkJE6QWCNEjs.promotionCodeDiscount; exports.subscriptionDiscount = _chunkJE6QWCNEjs.subscriptionDiscount; exports.toCouponCodeInput = _chunkJE6QWCNEjs.toCouponCodeInput; exports.useBillingFormatOptions = _chunkJE6QWCNEjs.useBillingFormatOptions; exports.useCouponContext = _chunkJE6QWCNEjs.useCouponContext; exports.usePriceContext = usePriceContext; exports.useProductContext = useProductContext;
5093
5080
  //# sourceMappingURL=index.js.map