@carlonicora/nextjs-jsonapi 6.20.3 → 6.20.5

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 (67) hide show
  1. package/dist/{BlockNoteEditor-GKCETT5I.mjs → BlockNoteEditor-H5QBL25M.mjs} +20 -23
  2. package/dist/BlockNoteEditor-H5QBL25M.mjs.map +1 -0
  3. package/dist/{BlockNoteEditor-GZCLWUF6.js → BlockNoteEditor-IRMQQGPS.js} +34 -37
  4. package/dist/BlockNoteEditor-IRMQQGPS.js.map +1 -0
  5. package/dist/{BlockNoteViewer-G3L46SGQ.mjs → BlockNoteViewer-2UDFTXRS.mjs} +2 -2
  6. package/dist/{BlockNoteViewer-ZFJ3DZXN.js → BlockNoteViewer-4OHBRE4Q.js} +3 -3
  7. package/dist/{BlockNoteViewer-ZFJ3DZXN.js.map → BlockNoteViewer-4OHBRE4Q.js.map} +1 -1
  8. package/dist/billing/index.js +467 -467
  9. package/dist/billing/index.mjs +3 -3
  10. package/dist/{chunk-WU3UXTDS.mjs → chunk-4RA5PRXX.mjs} +2 -2
  11. package/dist/{chunk-SFDOUTEV.js → chunk-54K2CZ2F.js} +4 -4
  12. package/dist/{chunk-SFDOUTEV.js.map → chunk-54K2CZ2F.js.map} +1 -1
  13. package/dist/{chunk-2CR7HWVS.js → chunk-BD6ARGGI.js} +3 -3
  14. package/dist/{chunk-2CR7HWVS.js.map → chunk-BD6ARGGI.js.map} +1 -1
  15. package/dist/{chunk-4GB35M62.mjs → chunk-DPXOPLQP.mjs} +5 -2
  16. package/dist/{chunk-4GB35M62.mjs.map → chunk-DPXOPLQP.mjs.map} +1 -1
  17. package/dist/{chunk-6IQCMCIA.js → chunk-EGTC75OW.js} +730 -730
  18. package/dist/{chunk-6IQCMCIA.js.map → chunk-EGTC75OW.js.map} +1 -1
  19. package/dist/{chunk-QSNZ6HPY.mjs → chunk-G2UIQSNJ.mjs} +2 -2
  20. package/dist/{chunk-GNHY6W42.mjs → chunk-RF2PR5G3.mjs} +5 -5
  21. package/dist/{chunk-CMNJENSJ.js → chunk-ZB6OYIMB.js} +5 -2
  22. package/dist/chunk-ZB6OYIMB.js.map +1 -0
  23. package/dist/client/index.js +4 -4
  24. package/dist/client/index.mjs +3 -3
  25. package/dist/components/index.js +4 -4
  26. package/dist/components/index.mjs +3 -3
  27. package/dist/contexts/index.js +4 -4
  28. package/dist/contexts/index.mjs +3 -3
  29. package/dist/core/index.js +2 -2
  30. package/dist/core/index.mjs +1 -1
  31. package/dist/email-automations/index.js +107 -107
  32. package/dist/email-automations/index.mjs +3 -3
  33. package/dist/features/analytics/index.d.mts +1 -1
  34. package/dist/features/analytics/index.d.ts +1 -1
  35. package/dist/features/analytics/index.js +116 -116
  36. package/dist/features/analytics/index.js.map +1 -1
  37. package/dist/features/analytics/index.mjs +3 -3
  38. package/dist/features/analytics/index.mjs.map +1 -1
  39. package/dist/features/analytics/server.js +4 -4
  40. package/dist/features/analytics/server.mjs +2 -2
  41. package/dist/features/blog/index.js +129 -129
  42. package/dist/features/blog/index.mjs +3 -3
  43. package/dist/features/blog/server.js +7 -7
  44. package/dist/features/blog/server.mjs +1 -1
  45. package/dist/features/help/index.js +37 -37
  46. package/dist/features/help/index.mjs +3 -3
  47. package/dist/features/tokenusage/index.js +114 -114
  48. package/dist/features/tokenusage/index.mjs +3 -3
  49. package/dist/index.js +3 -3
  50. package/dist/index.mjs +2 -2
  51. package/dist/server/index.js +3 -3
  52. package/dist/server/index.mjs +2 -2
  53. package/package.json +1 -1
  54. package/src/components/editors/BlockNoteEditor.tsx +8 -48
  55. package/src/components/editors/__tests__/removeTrailingEmptyBlocks.spec.ts +60 -0
  56. package/src/components/editors/blockNoteEditorOptions.ts +39 -0
  57. package/src/features/analytics/analytics.modules.ts +4 -1
  58. package/src/features/analytics/data/__tests__/AnalyticsService.spec.ts +1 -1
  59. package/src/features/analytics/data/analytics-event.ts +1 -1
  60. package/src/features/analytics/data/analytics.types.ts +1 -1
  61. package/dist/BlockNoteEditor-GKCETT5I.mjs.map +0 -1
  62. package/dist/BlockNoteEditor-GZCLWUF6.js.map +0 -1
  63. package/dist/chunk-CMNJENSJ.js.map +0 -1
  64. /package/dist/{BlockNoteViewer-G3L46SGQ.mjs.map → BlockNoteViewer-2UDFTXRS.mjs.map} +0 -0
  65. /package/dist/{chunk-WU3UXTDS.mjs.map → chunk-4RA5PRXX.mjs.map} +0 -0
  66. /package/dist/{chunk-QSNZ6HPY.mjs.map → chunk-G2UIQSNJ.mjs.map} +0 -0
  67. /package/dist/{chunk-GNHY6W42.mjs.map → chunk-RF2PR5G3.mjs.map} +0 -0
@@ -81,11 +81,11 @@
81
81
 
82
82
 
83
83
 
84
- var _chunk6IQCMCIAjs = require('../chunk-6IQCMCIA.js');
84
+ var _chunkEGTC75OWjs = require('../chunk-EGTC75OW.js');
85
85
  require('../chunk-3EPNHTMH.js');
86
86
 
87
87
 
88
- var _chunk2CR7HWVSjs = require('../chunk-2CR7HWVS.js');
88
+ var _chunkBD6ARGGIjs = require('../chunk-BD6ARGGI.js');
89
89
 
90
90
 
91
91
  var _chunkG4JR3SFVjs = require('../chunk-G4JR3SFV.js');
@@ -112,7 +112,7 @@ var _chunkG4JR3SFVjs = require('../chunk-G4JR3SFV.js');
112
112
 
113
113
 
114
114
 
115
- var _chunkCMNJENSJjs = require('../chunk-CMNJENSJ.js');
115
+ var _chunkZB6OYIMBjs = require('../chunk-ZB6OYIMB.js');
116
116
  require('../chunk-DGN3PR2F.js');
117
117
 
118
118
 
@@ -132,7 +132,7 @@ var _chunk7QVYU63Ejs = require('../chunk-7QVYU63E.js');
132
132
  var _nextintl = require('next-intl');
133
133
  var _lucidereact = require('lucide-react');
134
134
  var _jsxruntime = require('react/jsx-runtime');
135
- var SUBSCRIPTION_STATUSES = Object.values(_chunkCMNJENSJjs.SubscriptionStatus);
135
+ var SUBSCRIPTION_STATUSES = Object.values(_chunkZB6OYIMBjs.SubscriptionStatus);
136
136
  function getStatusBadgeVariant(status) {
137
137
  switch (status) {
138
138
  case "active" /* ACTIVE */:
@@ -164,43 +164,43 @@ function SubscriptionSummaryCard({
164
164
  onManageClick
165
165
  }) {
166
166
  const t = _nextintl.useTranslations.call(void 0, );
167
- const fmt = _chunk6IQCMCIAjs.useBillingFormatOptions.call(void 0, );
167
+ const fmt = _chunkEGTC75OWjs.useBillingFormatOptions.call(void 0, );
168
168
  if (loading) {
169
- return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk6IQCMCIAjs.Card, { children: [
170
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk6IQCMCIAjs.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
171
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6IQCMCIAjs.CardTitle, { children: t("billing.ui.subscriptions.title") }),
169
+ return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkEGTC75OWjs.Card, { children: [
170
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkEGTC75OWjs.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
171
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEGTC75OWjs.CardTitle, { children: t("billing.ui.subscriptions.title") }),
172
172
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.CreditCard, { className: "h-4 w-4 text-muted-foreground" })
173
173
  ] }),
174
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk6IQCMCIAjs.CardContent, { children: [
175
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6IQCMCIAjs.Skeleton, { className: "h-6 w-32 mb-2" }),
176
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6IQCMCIAjs.Skeleton, { className: "h-4 w-24 mb-1" }),
177
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6IQCMCIAjs.Skeleton, { className: "h-4 w-40" })
174
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkEGTC75OWjs.CardContent, { children: [
175
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEGTC75OWjs.Skeleton, { className: "h-6 w-32 mb-2" }),
176
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEGTC75OWjs.Skeleton, { className: "h-4 w-24 mb-1" }),
177
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEGTC75OWjs.Skeleton, { className: "h-4 w-40" })
178
178
  ] })
179
179
  ] });
180
180
  }
181
181
  if (error) {
182
- return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk6IQCMCIAjs.Card, { children: [
183
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk6IQCMCIAjs.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
184
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6IQCMCIAjs.CardTitle, { children: t("billing.ui.subscriptions.title") }),
182
+ return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkEGTC75OWjs.Card, { children: [
183
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkEGTC75OWjs.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
184
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEGTC75OWjs.CardTitle, { children: t("billing.ui.subscriptions.title") }),
185
185
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.CreditCard, { className: "h-4 w-4 text-muted-foreground" })
186
186
  ] }),
187
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6IQCMCIAjs.CardContent, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-destructive text-xs/relaxed", children: error }) })
187
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEGTC75OWjs.CardContent, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-destructive text-xs/relaxed", children: error }) })
188
188
  ] });
189
189
  }
190
190
  const activeSubscriptions = subscriptions.filter(
191
191
  (sub) => sub.status === "active" /* ACTIVE */ || sub.status === "trialing" /* TRIALING */ || sub.status === "past_due" /* PAST_DUE */
192
192
  );
193
193
  const primarySubscription = activeSubscriptions[0];
194
- return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk6IQCMCIAjs.Card, { className: "cursor-pointer hover:bg-accent/50 transition-colors", onClick: onManageClick, children: [
195
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk6IQCMCIAjs.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
196
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6IQCMCIAjs.CardTitle, { children: t("billing.ui.subscriptions.title") }),
194
+ return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkEGTC75OWjs.Card, { className: "cursor-pointer hover:bg-accent/50 transition-colors", onClick: onManageClick, children: [
195
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkEGTC75OWjs.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
196
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEGTC75OWjs.CardTitle, { children: t("billing.ui.subscriptions.title") }),
197
197
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.CreditCard, { className: "h-4 w-4 text-muted-foreground" })
198
198
  ] }),
199
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6IQCMCIAjs.CardContent, { children: !primarySubscription ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-2", children: [
199
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEGTC75OWjs.CardContent, { children: !primarySubscription ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-2", children: [
200
200
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-xl font-bold text-muted-foreground", children: t("billing.ui.cards.subscriptions.empty_title") }),
201
201
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-xs text-muted-foreground", children: t("billing.ui.cards.subscriptions.empty_description") }),
202
202
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
203
- _chunk6IQCMCIAjs.Button,
203
+ _chunkEGTC75OWjs.Button,
204
204
  {
205
205
  variant: "outline",
206
206
  size: "sm",
@@ -218,8 +218,8 @@ function SubscriptionSummaryCard({
218
218
  ] }) : /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-2", children: [
219
219
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center gap-2", children: [
220
220
  /* @__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, _chunk6IQCMCIAjs.Badge, { variant: "softRed", children: t("billing.ui.cards.subscriptions.payment_failing") }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
222
- _chunk6IQCMCIAjs.Badge,
221
+ primarySubscription.status === "past_due" /* PAST_DUE */ ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEGTC75OWjs.Badge, { variant: "softRed", children: t("billing.ui.cards.subscriptions.payment_failing") }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
222
+ _chunkEGTC75OWjs.Badge,
223
223
  {
224
224
  variant: primarySubscription.cancelAtPeriodEnd ? "secondary" : getStatusBadgeVariant(primarySubscription.status),
225
225
  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 +227,11 @@ function SubscriptionSummaryCard({
227
227
  )
228
228
  ] }),
229
229
  /* @__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: _chunk6IQCMCIAjs.formatDate.call(void 0, primarySubscription.currentPeriodEnd, fmt)
230
+ date: _chunkEGTC75OWjs.formatDate.call(void 0, primarySubscription.currentPeriodEnd, fmt)
231
231
  }) : primarySubscription.cancelAtPeriodEnd ? t("billing.ui.cards.subscriptions.cancels_on", {
232
- date: _chunk6IQCMCIAjs.formatDate.call(void 0, primarySubscription.currentPeriodEnd, fmt)
232
+ date: _chunkEGTC75OWjs.formatDate.call(void 0, primarySubscription.currentPeriodEnd, fmt)
233
233
  }) : t("billing.ui.cards.subscriptions.renews_on", {
234
- date: _chunk6IQCMCIAjs.formatDate.call(void 0, primarySubscription.currentPeriodEnd, fmt)
234
+ date: _chunkEGTC75OWjs.formatDate.call(void 0, primarySubscription.currentPeriodEnd, fmt)
235
235
  }) }),
236
236
  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
237
  ] }) })
@@ -265,37 +265,37 @@ function PaymentMethodSummaryCard({
265
265
  }) {
266
266
  const t = _nextintl.useTranslations.call(void 0, );
267
267
  if (loading) {
268
- return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk6IQCMCIAjs.Card, { children: [
269
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk6IQCMCIAjs.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
270
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6IQCMCIAjs.CardTitle, { children: t("billing.ui.payment_method.title") }),
268
+ return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkEGTC75OWjs.Card, { children: [
269
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkEGTC75OWjs.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
270
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEGTC75OWjs.CardTitle, { children: t("billing.ui.payment_method.title") }),
271
271
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.Wallet, { className: "h-4 w-4 text-muted-foreground" })
272
272
  ] }),
273
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk6IQCMCIAjs.CardContent, { children: [
274
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6IQCMCIAjs.Skeleton, { className: "h-6 w-32 mb-2" }),
275
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6IQCMCIAjs.Skeleton, { className: "h-4 w-24" })
273
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkEGTC75OWjs.CardContent, { children: [
274
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEGTC75OWjs.Skeleton, { className: "h-6 w-32 mb-2" }),
275
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEGTC75OWjs.Skeleton, { className: "h-4 w-24" })
276
276
  ] })
277
277
  ] });
278
278
  }
279
279
  if (error) {
280
- return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk6IQCMCIAjs.Card, { children: [
281
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk6IQCMCIAjs.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
282
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6IQCMCIAjs.CardTitle, { children: t("billing.ui.payment_method.title") }),
280
+ return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkEGTC75OWjs.Card, { children: [
281
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkEGTC75OWjs.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
282
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEGTC75OWjs.CardTitle, { children: t("billing.ui.payment_method.title") }),
283
283
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.Wallet, { className: "h-4 w-4 text-muted-foreground" })
284
284
  ] }),
285
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6IQCMCIAjs.CardContent, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-destructive text-xs/relaxed", children: error }) })
285
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEGTC75OWjs.CardContent, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-destructive text-xs/relaxed", children: error }) })
286
286
  ] });
287
287
  }
288
288
  const defaultMethod = paymentMethods.find((pm) => pm.id === defaultPaymentMethodId) || paymentMethods[0];
289
- return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk6IQCMCIAjs.Card, { className: "cursor-pointer hover:bg-accent/50 transition-colors", onClick: onManageClick, children: [
290
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk6IQCMCIAjs.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
291
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6IQCMCIAjs.CardTitle, { children: t("billing.ui.payment_method.title") }),
289
+ return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkEGTC75OWjs.Card, { className: "cursor-pointer hover:bg-accent/50 transition-colors", onClick: onManageClick, children: [
290
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkEGTC75OWjs.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
291
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEGTC75OWjs.CardTitle, { children: t("billing.ui.payment_method.title") }),
292
292
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.Wallet, { className: "h-4 w-4 text-muted-foreground" })
293
293
  ] }),
294
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6IQCMCIAjs.CardContent, { children: paymentMethods.length === 0 ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-2", children: [
294
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEGTC75OWjs.CardContent, { children: paymentMethods.length === 0 ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-2", children: [
295
295
  /* @__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
296
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-xs text-muted-foreground", children: t("billing.ui.cards.payment_method.empty_description") }),
297
297
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
298
- _chunk6IQCMCIAjs.Button,
298
+ _chunkEGTC75OWjs.Button,
299
299
  {
300
300
  variant: "outline",
301
301
  size: "sm",
@@ -350,7 +350,7 @@ function CustomerInfoCard({ customer, loading, error }) {
350
350
  e.stopPropagation();
351
351
  setPortalLoading(true);
352
352
  try {
353
- const { url } = await _chunkCMNJENSJjs.StripeCustomerService.createPortalSession();
353
+ const { url } = await _chunkZB6OYIMBjs.StripeCustomerService.createPortalSession();
354
354
  window.open(url, "_blank");
355
355
  } catch (err) {
356
356
  console.error("[CustomerInfoCard] Failed to create portal session:", err);
@@ -359,45 +359,45 @@ function CustomerInfoCard({ customer, loading, error }) {
359
359
  }
360
360
  }, "handlePortalClick");
361
361
  if (loading) {
362
- return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk6IQCMCIAjs.Card, { children: [
363
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk6IQCMCIAjs.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
364
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6IQCMCIAjs.CardTitle, { children: t("billing.ui.cards.customer.title") }),
362
+ return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkEGTC75OWjs.Card, { children: [
363
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkEGTC75OWjs.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
364
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEGTC75OWjs.CardTitle, { children: t("billing.ui.cards.customer.title") }),
365
365
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.User, { className: "h-4 w-4 text-muted-foreground" })
366
366
  ] }),
367
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk6IQCMCIAjs.CardContent, { children: [
368
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6IQCMCIAjs.Skeleton, { className: "h-6 w-32 mb-2" }),
369
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6IQCMCIAjs.Skeleton, { className: "h-4 w-48 mb-1" }),
370
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6IQCMCIAjs.Skeleton, { className: "h-4 w-24" })
367
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkEGTC75OWjs.CardContent, { children: [
368
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEGTC75OWjs.Skeleton, { className: "h-6 w-32 mb-2" }),
369
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEGTC75OWjs.Skeleton, { className: "h-4 w-48 mb-1" }),
370
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEGTC75OWjs.Skeleton, { className: "h-4 w-24" })
371
371
  ] })
372
372
  ] });
373
373
  }
374
374
  if (error) {
375
- return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk6IQCMCIAjs.Card, { children: [
376
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk6IQCMCIAjs.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
377
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6IQCMCIAjs.CardTitle, { children: t("billing.ui.cards.customer.title") }),
375
+ return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkEGTC75OWjs.Card, { children: [
376
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkEGTC75OWjs.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
377
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEGTC75OWjs.CardTitle, { children: t("billing.ui.cards.customer.title") }),
378
378
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.User, { className: "h-4 w-4 text-muted-foreground" })
379
379
  ] }),
380
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6IQCMCIAjs.CardContent, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-destructive text-xs/relaxed", children: error }) })
380
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEGTC75OWjs.CardContent, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-destructive text-xs/relaxed", children: error }) })
381
381
  ] });
382
382
  }
383
383
  if (!customer) {
384
- return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk6IQCMCIAjs.Card, { children: [
385
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk6IQCMCIAjs.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
386
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6IQCMCIAjs.CardTitle, { children: t("billing.ui.cards.customer.title") }),
384
+ return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkEGTC75OWjs.Card, { children: [
385
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkEGTC75OWjs.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
386
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEGTC75OWjs.CardTitle, { children: t("billing.ui.cards.customer.title") }),
387
387
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.User, { className: "h-4 w-4 text-muted-foreground" })
388
388
  ] }),
389
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk6IQCMCIAjs.CardContent, { children: [
389
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkEGTC75OWjs.CardContent, { children: [
390
390
  /* @__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
391
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-xs text-muted-foreground", children: t("billing.ui.cards.customer.not_set_up_description") })
392
392
  ] })
393
393
  ] });
394
394
  }
395
- return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk6IQCMCIAjs.Card, { children: [
396
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk6IQCMCIAjs.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
397
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6IQCMCIAjs.CardTitle, { children: t("billing.ui.cards.customer.title") }),
395
+ return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkEGTC75OWjs.Card, { children: [
396
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkEGTC75OWjs.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
397
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEGTC75OWjs.CardTitle, { children: t("billing.ui.cards.customer.title") }),
398
398
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.User, { className: "h-4 w-4 text-muted-foreground" })
399
399
  ] }),
400
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6IQCMCIAjs.CardContent, { children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-2", children: [
400
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEGTC75OWjs.CardContent, { children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-2", children: [
401
401
  customer.name && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-xl font-bold", children: customer.name }),
402
402
  customer.email && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-sm text-muted-foreground", children: customer.email }),
403
403
  customer.balance !== void 0 && customer.balance !== 0 && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "p", { className: "text-sm", children: [
@@ -407,7 +407,7 @@ function CustomerInfoCard({ customer, loading, error }) {
407
407
  ] }),
408
408
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: customer.balance < 0 ? "text-success" : "text-destructive", children: formatBalance(customer.balance, customer.currency, locale) })
409
409
  ] }),
410
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk6IQCMCIAjs.Button, { variant: "outline", size: "sm", className: "mt-2", onClick: handlePortalClick, disabled: portalLoading, children: [
410
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkEGTC75OWjs.Button, { variant: "outline", size: "sm", className: "mt-2", onClick: handlePortalClick, disabled: portalLoading, children: [
411
411
  portalLoading ? t("common.loading") : t("billing.ui.cards.customer.manage_portal"),
412
412
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.ExternalLink, { className: "h-4 w-4 ms-1" })
413
413
  ] })
@@ -420,7 +420,7 @@ _chunk7QVYU63Ejs.__name.call(void 0, CustomerInfoCard, "CustomerInfoCard");
420
420
 
421
421
 
422
422
 
423
- var INVOICE_STATUSES = Object.values(_chunkCMNJENSJjs.InvoiceStatus);
423
+ var INVOICE_STATUSES = Object.values(_chunkZB6OYIMBjs.InvoiceStatus);
424
424
  function getStatusBadgeVariant2(status) {
425
425
  switch (status) {
426
426
  case "paid" /* PAID */:
@@ -445,46 +445,46 @@ function formatAmount(amount, currency, locale) {
445
445
  _chunk7QVYU63Ejs.__name.call(void 0, formatAmount, "formatAmount");
446
446
  function InvoicesSummaryCard({ invoices, loading, error, onViewAllClick }) {
447
447
  const t = _nextintl.useTranslations.call(void 0, );
448
- const fmt = _chunk6IQCMCIAjs.useBillingFormatOptions.call(void 0, );
448
+ const fmt = _chunkEGTC75OWjs.useBillingFormatOptions.call(void 0, );
449
449
  if (loading) {
450
- return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk6IQCMCIAjs.Card, { children: [
451
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk6IQCMCIAjs.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
452
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6IQCMCIAjs.CardTitle, { children: t("billing.ui.cards.invoices.title") }),
450
+ return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkEGTC75OWjs.Card, { children: [
451
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkEGTC75OWjs.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
452
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEGTC75OWjs.CardTitle, { children: t("billing.ui.cards.invoices.title") }),
453
453
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.ReceiptIcon, { className: "h-4 w-4 text-muted-foreground" })
454
454
  ] }),
455
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk6IQCMCIAjs.CardContent, { children: [
456
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6IQCMCIAjs.Skeleton, { className: "h-6 w-24 mb-2" }),
457
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6IQCMCIAjs.Skeleton, { className: "h-4 w-32 mb-1" }),
458
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6IQCMCIAjs.Skeleton, { className: "h-4 w-20" })
455
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkEGTC75OWjs.CardContent, { children: [
456
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEGTC75OWjs.Skeleton, { className: "h-6 w-24 mb-2" }),
457
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEGTC75OWjs.Skeleton, { className: "h-4 w-32 mb-1" }),
458
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEGTC75OWjs.Skeleton, { className: "h-4 w-20" })
459
459
  ] })
460
460
  ] });
461
461
  }
462
462
  if (error) {
463
- return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk6IQCMCIAjs.Card, { children: [
464
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk6IQCMCIAjs.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
465
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6IQCMCIAjs.CardTitle, { children: t("billing.ui.cards.invoices.title") }),
463
+ return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkEGTC75OWjs.Card, { children: [
464
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkEGTC75OWjs.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
465
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEGTC75OWjs.CardTitle, { children: t("billing.ui.cards.invoices.title") }),
466
466
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.ReceiptIcon, { className: "h-4 w-4 text-muted-foreground" })
467
467
  ] }),
468
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6IQCMCIAjs.CardContent, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-destructive text-xs/relaxed", children: error }) })
468
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEGTC75OWjs.CardContent, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-destructive text-xs/relaxed", children: error }) })
469
469
  ] });
470
470
  }
471
471
  const latestInvoice = _nullishCoalesce(invoices.find((inv) => inv.status !== "void" /* VOID */), () => ( invoices[0]));
472
472
  const paidInvoices = invoices.filter((inv) => inv.status === "paid" /* PAID */);
473
473
  const openInvoices = invoices.filter((inv) => inv.status === "open" /* OPEN */);
474
- return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk6IQCMCIAjs.Card, { className: "cursor-pointer hover:bg-accent/50 transition-colors", onClick: onViewAllClick, children: [
475
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk6IQCMCIAjs.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
476
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6IQCMCIAjs.CardTitle, { children: t("billing.ui.cards.invoices.title") }),
474
+ return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkEGTC75OWjs.Card, { className: "cursor-pointer hover:bg-accent/50 transition-colors", onClick: onViewAllClick, children: [
475
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkEGTC75OWjs.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
476
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEGTC75OWjs.CardTitle, { children: t("billing.ui.cards.invoices.title") }),
477
477
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.ReceiptIcon, { className: "h-4 w-4 text-muted-foreground" })
478
478
  ] }),
479
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6IQCMCIAjs.CardContent, { children: invoices.length === 0 ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-2", children: [
479
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEGTC75OWjs.CardContent, { children: invoices.length === 0 ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-2", children: [
480
480
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-xl font-bold text-muted-foreground", children: t("billing.ui.invoices.empty_title") }),
481
481
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-xs text-muted-foreground", children: t("billing.ui.cards.invoices.empty_description") })
482
482
  ] }) : latestInvoice ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-2", children: [
483
483
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center gap-2", children: [
484
484
  /* @__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, _chunk6IQCMCIAjs.Badge, { variant: getStatusBadgeVariant2(latestInvoice.status), children: INVOICE_STATUSES.includes(latestInvoice.status) ? t(`billing.ui.invoice_status.${latestInvoice.status}`) : latestInvoice.status })
485
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEGTC75OWjs.Badge, { variant: getStatusBadgeVariant2(latestInvoice.status), children: INVOICE_STATUSES.includes(latestInvoice.status) ? t(`billing.ui.invoice_status.${latestInvoice.status}`) : latestInvoice.status })
486
486
  ] }),
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: _chunk6IQCMCIAjs.formatDate.call(void 0, latestInvoice.periodStart, fmt) }) }),
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: _chunkEGTC75OWjs.formatDate.call(void 0, latestInvoice.periodStart, fmt) }) }),
488
488
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center gap-4 text-xs text-muted-foreground", children: [
489
489
  paidInvoices.length > 0 && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: t("billing.ui.cards.invoices.paid_count", { count: paidInvoices.length }) }),
490
490
  openInvoices.length > 0 && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-warning", children: t("billing.ui.cards.invoices.open_count", { count: openInvoices.length }) }),
@@ -519,24 +519,24 @@ function BillingUsageSummaryCard({
519
519
  const t = _nextintl.useTranslations.call(void 0, );
520
520
  const locale = _chunkYWLSIIE6js.useI18nLocale.call(void 0, );
521
521
  if (loading) {
522
- return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk6IQCMCIAjs.Card, { children: [
523
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk6IQCMCIAjs.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
524
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6IQCMCIAjs.CardTitle, { children: t("billing.ui.cards.usage.title") }),
522
+ return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkEGTC75OWjs.Card, { children: [
523
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkEGTC75OWjs.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
524
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEGTC75OWjs.CardTitle, { children: t("billing.ui.cards.usage.title") }),
525
525
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.Activity, { className: "h-4 w-4 text-muted-foreground" })
526
526
  ] }),
527
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk6IQCMCIAjs.CardContent, { children: [
528
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6IQCMCIAjs.Skeleton, { className: "h-6 w-24 mb-2" }),
529
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6IQCMCIAjs.Skeleton, { className: "h-4 w-32" })
527
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkEGTC75OWjs.CardContent, { children: [
528
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEGTC75OWjs.Skeleton, { className: "h-6 w-24 mb-2" }),
529
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEGTC75OWjs.Skeleton, { className: "h-4 w-32" })
530
530
  ] })
531
531
  ] });
532
532
  }
533
533
  if (error) {
534
- return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk6IQCMCIAjs.Card, { children: [
535
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk6IQCMCIAjs.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
536
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6IQCMCIAjs.CardTitle, { children: t("billing.ui.cards.usage.title") }),
534
+ return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkEGTC75OWjs.Card, { children: [
535
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkEGTC75OWjs.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
536
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEGTC75OWjs.CardTitle, { children: t("billing.ui.cards.usage.title") }),
537
537
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.Activity, { className: "h-4 w-4 text-muted-foreground" })
538
538
  ] }),
539
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6IQCMCIAjs.CardContent, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-destructive text-xs/relaxed", children: error }) })
539
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEGTC75OWjs.CardContent, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-destructive text-xs/relaxed", children: error }) })
540
540
  ] });
541
541
  }
542
542
  const totalUsage = Object.values(summaries).reduce((acc, summary) => {
@@ -544,12 +544,12 @@ function BillingUsageSummaryCard({
544
544
  }, 0);
545
545
  const primaryMeter = meters.find((m) => _optionalChain([summaries, 'access', _17 => _17[m.id], 'optionalAccess', _18 => _18.aggregatedValue]));
546
546
  const primarySummary = primaryMeter ? summaries[primaryMeter.id] : null;
547
- return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk6IQCMCIAjs.Card, { className: "cursor-pointer hover:bg-accent/50 transition-colors", onClick: onViewDetailsClick, children: [
548
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk6IQCMCIAjs.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
549
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6IQCMCIAjs.CardTitle, { children: t("billing.ui.cards.usage.title") }),
547
+ return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkEGTC75OWjs.Card, { className: "cursor-pointer hover:bg-accent/50 transition-colors", onClick: onViewDetailsClick, children: [
548
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkEGTC75OWjs.CardHeader, { className: "flex flex-row items-center justify-between space-y-0 pb-2", children: [
549
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEGTC75OWjs.CardTitle, { children: t("billing.ui.cards.usage.title") }),
550
550
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.Activity, { className: "h-4 w-4 text-muted-foreground" })
551
551
  ] }),
552
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6IQCMCIAjs.CardContent, { children: meters.length === 0 ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-2", children: [
552
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEGTC75OWjs.CardContent, { children: meters.length === 0 ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-2", children: [
553
553
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-xl font-bold text-muted-foreground", children: t("billing.ui.cards.usage.no_meters") }),
554
554
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-xs text-muted-foreground", children: t("billing.ui.cards.usage.no_meters_description") })
555
555
  ] }) : /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-2", children: [
@@ -606,7 +606,7 @@ function PaymentMethodForm({
606
606
  const fetchSetupIntent = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, async () => {
607
607
  setLoading(true);
608
608
  try {
609
- const intent = await _chunkCMNJENSJjs.StripeCustomerService.createSetupIntent();
609
+ const intent = await _chunkZB6OYIMBjs.StripeCustomerService.createSetupIntent();
610
610
  setSetupIntent(intent);
611
611
  } catch (err) {
612
612
  console.error("[PaymentMethodForm] Failed to create setup intent:", err);
@@ -644,7 +644,7 @@ function PaymentMethodForm({
644
644
  return;
645
645
  }
646
646
  if ((alwaysSetDefault || setAsDefault) && _optionalChain([confirmedSetupIntent, 'optionalAccess', _19 => _19.payment_method])) {
647
- await _chunkCMNJENSJjs.StripeCustomerService.setDefaultPaymentMethod({
647
+ await _chunkZB6OYIMBjs.StripeCustomerService.setDefaultPaymentMethod({
648
648
  paymentMethodId: typeof confirmedSetupIntent.payment_method === "string" ? confirmedSetupIntent.payment_method : confirmedSetupIntent.payment_method.id
649
649
  });
650
650
  }
@@ -660,7 +660,7 @@ function PaymentMethodForm({
660
660
  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
661
  }
662
662
  if (!setupIntent && error) {
663
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6IQCMCIAjs.Alert, { variant: "destructive", className: "bg-red-50 border-red-200", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6IQCMCIAjs.AlertDescription, { children: error }) });
663
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEGTC75OWjs.Alert, { variant: "destructive", className: "bg-red-50 border-red-200", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEGTC75OWjs.AlertDescription, { children: error }) });
664
664
  }
665
665
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "form", { onSubmit: handleSubmit, className: "flex flex-col gap-y-4", children: [
666
666
  /* @__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 +684,19 @@ function PaymentMethodForm({
684
684
  ) }),
685
685
  !alwaysSetDefault && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center gap-x-2", children: [
686
686
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
687
- _chunk6IQCMCIAjs.Checkbox,
687
+ _chunkEGTC75OWjs.Checkbox,
688
688
  {
689
689
  id: "setAsDefault",
690
690
  checked: setAsDefault,
691
691
  onCheckedChange: (checked) => setSetAsDefault(!!checked)
692
692
  }
693
693
  ),
694
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6IQCMCIAjs.Label, { htmlFor: "setAsDefault", className: "cursor-pointer font-normal", children: t("billing.ui.payment_form.set_default") })
694
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEGTC75OWjs.Label, { htmlFor: "setAsDefault", className: "cursor-pointer font-normal", children: t("billing.ui.payment_form.set_default") })
695
695
  ] }),
696
- error && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6IQCMCIAjs.Alert, { variant: "destructive", className: "bg-red-50 border-red-200", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6IQCMCIAjs.AlertDescription, { children: error }) }),
696
+ error && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEGTC75OWjs.Alert, { variant: "destructive", className: "bg-red-50 border-red-200", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEGTC75OWjs.AlertDescription, { children: error }) }),
697
697
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex justify-end gap-x-2", children: [
698
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6IQCMCIAjs.Button, { type: "button", variant: "outline", onClick: onCancel, disabled: isSubmitting || isLoading, children: t("ui.buttons.cancel") }),
699
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6IQCMCIAjs.Button, { type: "submit", disabled: !stripe || isSubmitting || isLoading, children: isSubmitting ? t("billing.ui.wizard.review.processing") : t("billing.ui.cards.payment_method.add_card") })
698
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEGTC75OWjs.Button, { type: "button", variant: "outline", onClick: onCancel, disabled: isSubmitting || isLoading, children: t("ui.buttons.cancel") }),
699
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEGTC75OWjs.Button, { type: "submit", disabled: !stripe || isSubmitting || isLoading, children: isSubmitting ? t("billing.ui.wizard.review.processing") : t("billing.ui.cards.payment_method.add_card") })
700
700
  ] })
701
701
  ] });
702
702
  }
@@ -713,10 +713,10 @@ function PaymentMethodEditor({ open, onOpenChange, onSuccess }) {
713
713
  const handleCancel = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, () => {
714
714
  onOpenChange(false);
715
715
  }, "handleCancel");
716
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6IQCMCIAjs.Dialog, { open, onOpenChange, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk6IQCMCIAjs.DialogContent, { className: "max-w-md", children: [
717
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk6IQCMCIAjs.DialogHeader, { children: [
718
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6IQCMCIAjs.DialogTitle, { children: t("billing.ui.payment_methods.add") }),
719
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6IQCMCIAjs.DialogDescription, { children: t("billing.ui.payment_methods.add_description") })
716
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEGTC75OWjs.Dialog, { open, onOpenChange, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkEGTC75OWjs.DialogContent, { className: "max-w-md", children: [
717
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkEGTC75OWjs.DialogHeader, { children: [
718
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEGTC75OWjs.DialogTitle, { children: t("billing.ui.payment_methods.add") }),
719
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEGTC75OWjs.DialogDescription, { children: t("billing.ui.payment_methods.add_description") })
720
720
  ] }),
721
721
  open && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, PaymentMethodForm, { onSuccess: handleSuccess, onCancel: handleCancel })
722
722
  ] }) });
@@ -742,7 +742,7 @@ function PaymentMethodCard({ paymentMethod, onUpdate }) {
742
742
  _react.useEffect.call(void 0, () => {
743
743
  const loadCustomer = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, async () => {
744
744
  try {
745
- const fetchedCustomer = await _chunkCMNJENSJjs.StripeCustomerService.getCustomer();
745
+ const fetchedCustomer = await _chunkZB6OYIMBjs.StripeCustomerService.getCustomer();
746
746
  setCustomer(fetchedCustomer);
747
747
  } catch (error) {
748
748
  console.error("[PaymentMethodCard] Failed to load customer:", error);
@@ -759,7 +759,7 @@ function PaymentMethodCard({ paymentMethod, onUpdate }) {
759
759
  const handleSetDefault = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, async () => {
760
760
  setLoading(true);
761
761
  try {
762
- await _chunkCMNJENSJjs.StripeCustomerService.setDefaultPaymentMethod({ paymentMethodId: paymentMethod.id });
762
+ await _chunkZB6OYIMBjs.StripeCustomerService.setDefaultPaymentMethod({ paymentMethodId: paymentMethod.id });
763
763
  onUpdate();
764
764
  } catch (error) {
765
765
  console.error("[PaymentMethodCard] Failed to set as default:", error);
@@ -770,7 +770,7 @@ function PaymentMethodCard({ paymentMethod, onUpdate }) {
770
770
  const handleRemove = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, async () => {
771
771
  setLoading(true);
772
772
  try {
773
- await _chunkCMNJENSJjs.StripeCustomerService.removePaymentMethod({ paymentMethodId: paymentMethod.id });
773
+ await _chunkZB6OYIMBjs.StripeCustomerService.removePaymentMethod({ paymentMethodId: paymentMethod.id });
774
774
  setShowRemoveDialog(false);
775
775
  onUpdate();
776
776
  } catch (error) {
@@ -779,16 +779,16 @@ function PaymentMethodCard({ paymentMethod, onUpdate }) {
779
779
  }
780
780
  }, "handleRemove");
781
781
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
782
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk6IQCMCIAjs.Card, { className: "relative", children: [
783
- isDefault && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6IQCMCIAjs.Badge, { variant: "softGreen", className: "absolute end-2 top-2", children: t("billing.ui.payment_methods.default") }),
784
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk6IQCMCIAjs.CardHeader, { className: "flex flex-row items-center justify-between pb-2", children: [
782
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkEGTC75OWjs.Card, { className: "relative", children: [
783
+ isDefault && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEGTC75OWjs.Badge, { variant: "softGreen", className: "absolute end-2 top-2", children: t("billing.ui.payment_methods.default") }),
784
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkEGTC75OWjs.CardHeader, { className: "flex flex-row items-center justify-between pb-2", children: [
785
785
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center gap-x-2", children: [
786
786
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-2xl", children: brandIcon }),
787
787
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-sm font-medium capitalize", children: brand })
788
788
  ] }),
789
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk6IQCMCIAjs.DropdownMenu, { children: [
790
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6IQCMCIAjs.DropdownMenuTrigger, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
791
- _chunk6IQCMCIAjs.Button,
789
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkEGTC75OWjs.DropdownMenu, { children: [
790
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEGTC75OWjs.DropdownMenuTrigger, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
791
+ _chunkEGTC75OWjs.Button,
792
792
  {
793
793
  render: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", {}),
794
794
  nativeButton: false,
@@ -799,10 +799,10 @@ function PaymentMethodCard({ paymentMethod, onUpdate }) {
799
799
  children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.MoreVertical, { className: "h-4 w-4" })
800
800
  }
801
801
  ) }),
802
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk6IQCMCIAjs.DropdownMenuContent, { align: "end", children: [
803
- !isDefault && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6IQCMCIAjs.DropdownMenuItem, { onClick: handleSetDefault, disabled: loading, children: t("billing.ui.payment_methods.set_default") }),
802
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkEGTC75OWjs.DropdownMenuContent, { align: "end", children: [
803
+ !isDefault && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEGTC75OWjs.DropdownMenuItem, { onClick: handleSetDefault, disabled: loading, children: t("billing.ui.payment_methods.set_default") }),
804
804
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
805
- _chunk6IQCMCIAjs.DropdownMenuItem,
805
+ _chunkEGTC75OWjs.DropdownMenuItem,
806
806
  {
807
807
  onClick: () => setShowRemoveDialog(true),
808
808
  disabled: loading,
@@ -813,7 +813,7 @@ function PaymentMethodCard({ paymentMethod, onUpdate }) {
813
813
  ] })
814
814
  ] })
815
815
  ] }),
816
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6IQCMCIAjs.CardContent, { children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-col gap-y-1", children: [
816
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEGTC75OWjs.CardContent, { children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-col gap-y-1", children: [
817
817
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "p", { className: "text-lg font-semibold", children: [
818
818
  "\u2022\u2022\u2022\u2022 ",
819
819
  last4
@@ -821,17 +821,17 @@ function PaymentMethodCard({ paymentMethod, onUpdate }) {
821
821
  /* @__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
822
  ] }) })
823
823
  ] }),
824
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6IQCMCIAjs.AlertDialog, { open: showRemoveDialog, onOpenChange: setShowRemoveDialog, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk6IQCMCIAjs.AlertDialogContent, { children: [
825
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk6IQCMCIAjs.AlertDialogHeader, { children: [
826
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6IQCMCIAjs.AlertDialogTitle, { children: t("billing.ui.payment_methods.remove_title") }),
827
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk6IQCMCIAjs.AlertDialogDescription, { children: [
824
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEGTC75OWjs.AlertDialog, { open: showRemoveDialog, onOpenChange: setShowRemoveDialog, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkEGTC75OWjs.AlertDialogContent, { children: [
825
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkEGTC75OWjs.AlertDialogHeader, { children: [
826
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEGTC75OWjs.AlertDialogTitle, { children: t("billing.ui.payment_methods.remove_title") }),
827
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkEGTC75OWjs.AlertDialogDescription, { children: [
828
828
  t("billing.ui.payment_methods.remove_description"),
829
829
  isDefault && ` ${t("billing.ui.payment_methods.remove_default_warning")}`
830
830
  ] })
831
831
  ] }),
832
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk6IQCMCIAjs.AlertDialogFooter, { children: [
833
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6IQCMCIAjs.AlertDialogCancel, { disabled: loading, children: t("ui.buttons.cancel") }),
834
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6IQCMCIAjs.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") })
832
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkEGTC75OWjs.AlertDialogFooter, { children: [
833
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEGTC75OWjs.AlertDialogCancel, { disabled: loading, children: t("ui.buttons.cancel") }),
834
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEGTC75OWjs.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
835
  ] })
836
836
  ] }) })
837
837
  ] });
@@ -855,7 +855,7 @@ function PaymentMethodsContainer() {
855
855
  const loadPaymentMethods = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, async () => {
856
856
  setLoading(true);
857
857
  try {
858
- const fetchedPaymentMethods = await _chunkCMNJENSJjs.StripeCustomerService.listPaymentMethods();
858
+ const fetchedPaymentMethods = await _chunkZB6OYIMBjs.StripeCustomerService.listPaymentMethods();
859
859
  setPaymentMethods(fetchedPaymentMethods);
860
860
  } catch (error) {
861
861
  console.error("[PaymentMethodsContainer] Failed to load payment methods:", error);
@@ -875,14 +875,14 @@ function PaymentMethodsContainer() {
875
875
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.CreditCard, { className: "h-8 w-8" }),
876
876
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h1", { className: "text-primary text-3xl font-semibold", children: t("billing.ui.payment_methods.title") })
877
877
  ] }),
878
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6IQCMCIAjs.Button, { onClick: () => setShowAddPaymentMethod(true), children: t("billing.ui.payment_methods.add") })
878
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEGTC75OWjs.Button, { onClick: () => setShowAddPaymentMethod(true), children: t("billing.ui.payment_methods.add") })
879
879
  ] }),
880
880
  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
881
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.CreditCard, { className: "h-16 w-16 text-muted-foreground" }),
882
882
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "text-center", children: [
883
883
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h3", { className: "mb-2 text-sm font-medium", children: t("billing.ui.payment_methods.empty_title") }),
884
884
  /* @__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, _chunk6IQCMCIAjs.Button, { onClick: () => setShowAddPaymentMethod(true), children: t("billing.ui.payment_methods.add_first") })
885
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEGTC75OWjs.Button, { onClick: () => setShowAddPaymentMethod(true), children: t("billing.ui.payment_methods.add_first") })
886
886
  ] })
887
887
  ] }),
888
888
  paymentMethods.length > 0 && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, PaymentMethodsList, { paymentMethods, onUpdate: loadPaymentMethods }),
@@ -938,7 +938,7 @@ var statusConfig = {
938
938
  function InvoiceStatusBadge({ status }) {
939
939
  const t = _nextintl.useTranslations.call(void 0, );
940
940
  const config = statusConfig[status] || statusConfig["draft" /* DRAFT */];
941
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6IQCMCIAjs.Badge, { variant: config.variant, children: t(config.label) });
941
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEGTC75OWjs.Badge, { variant: config.variant, children: t(config.label) });
942
942
  }
943
943
  _chunk7QVYU63Ejs.__name.call(void 0, InvoiceStatusBadge, "InvoiceStatusBadge");
944
944
 
@@ -951,7 +951,7 @@ function InvoiceDetails({
951
951
  onInvoiceChange: _onInvoiceChange
952
952
  }) {
953
953
  const t = _nextintl.useTranslations.call(void 0, );
954
- const fmt = _chunk6IQCMCIAjs.useBillingFormatOptions.call(void 0, );
954
+ const fmt = _chunkEGTC75OWjs.useBillingFormatOptions.call(void 0, );
955
955
  const handleDownloadPDF = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, () => {
956
956
  if (invoice.stripePdfUrl) {
957
957
  window.open(invoice.stripePdfUrl, "_blank");
@@ -971,10 +971,10 @@ function InvoiceDetails({
971
971
  return invoice.stripeInvoiceId.slice(-8);
972
972
  }, "getInvoiceNumber");
973
973
  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, _chunk6IQCMCIAjs.Dialog, { open, onOpenChange, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk6IQCMCIAjs.DialogContent, { className: "max-w-2xl", children: [
975
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk6IQCMCIAjs.DialogHeader, { children: [
976
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6IQCMCIAjs.DialogTitle, { children: t("billing.ui.invoice.title", { number: getInvoiceNumber() }) }),
977
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6IQCMCIAjs.DialogDescription, { children: _chunk6IQCMCIAjs.formatDate.call(void 0, invoice.periodStart, fmt) })
974
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEGTC75OWjs.Dialog, { open, onOpenChange, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkEGTC75OWjs.DialogContent, { className: "max-w-2xl", children: [
975
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkEGTC75OWjs.DialogHeader, { children: [
976
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEGTC75OWjs.DialogTitle, { children: t("billing.ui.invoice.title", { number: getInvoiceNumber() }) }),
977
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEGTC75OWjs.DialogDescription, { children: _chunkEGTC75OWjs.formatDate.call(void 0, invoice.periodStart, fmt) })
978
978
  ] }),
979
979
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-6", children: [
980
980
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center gap-x-3", children: [
@@ -985,18 +985,18 @@ function InvoiceDetails({
985
985
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { children: [
986
986
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-muted-foreground text-xs", children: t("billing.ui.invoice.billing_period") }),
987
987
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "p", { className: "text-sm", children: [
988
- _chunk6IQCMCIAjs.formatDate.call(void 0, invoice.periodStart, fmt),
988
+ _chunkEGTC75OWjs.formatDate.call(void 0, invoice.periodStart, fmt),
989
989
  " - ",
990
- _chunk6IQCMCIAjs.formatDate.call(void 0, invoice.periodEnd, fmt)
990
+ _chunkEGTC75OWjs.formatDate.call(void 0, invoice.periodEnd, fmt)
991
991
  ] })
992
992
  ] }),
993
993
  invoice.dueDate && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { children: [
994
994
  /* @__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: _chunk6IQCMCIAjs.formatDate.call(void 0, invoice.dueDate, fmt) })
995
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-sm", children: _chunkEGTC75OWjs.formatDate.call(void 0, invoice.dueDate, fmt) })
996
996
  ] }),
997
997
  invoice.paidAt && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { children: [
998
998
  /* @__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: _chunk6IQCMCIAjs.formatDate.call(void 0, invoice.paidAt, fmt) })
999
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-sm", children: _chunkEGTC75OWjs.formatDate.call(void 0, invoice.paidAt, fmt) })
1000
1000
  ] }),
1001
1001
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { children: [
1002
1002
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-muted-foreground text-xs", children: t("billing.ui.invoice.attempt_count") }),
@@ -1012,42 +1012,42 @@ function InvoiceDetails({
1012
1012
  ] }) }),
1013
1013
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "tbody", { children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "tr", { className: "border-t", children: [
1014
1014
  /* @__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: _chunkCMNJENSJjs.formatCurrency.call(void 0, invoice.subtotal, invoice.currency, fmt) })
1015
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "td", { className: "p-3 text-end", children: _chunkZB6OYIMBjs.formatCurrency.call(void 0, invoice.subtotal, invoice.currency, fmt) })
1016
1016
  ] }) })
1017
1017
  ] }) })
1018
1018
  ] }),
1019
1019
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-2 border-t pt-4", children: [
1020
1020
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex justify-between", children: [
1021
1021
  /* @__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: _chunkCMNJENSJjs.formatCurrency.call(void 0, invoice.subtotal, invoice.currency, fmt) })
1022
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-sm", children: _chunkZB6OYIMBjs.formatCurrency.call(void 0, invoice.subtotal, invoice.currency, fmt) })
1023
1023
  ] }),
1024
1024
  invoice.tax !== void 0 && invoice.tax > 0 && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex justify-between", children: [
1025
1025
  /* @__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: _chunkCMNJENSJjs.formatCurrency.call(void 0, invoice.tax, invoice.currency, fmt) })
1026
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-sm", children: _chunkZB6OYIMBjs.formatCurrency.call(void 0, invoice.tax, invoice.currency, fmt) })
1027
1027
  ] }),
1028
1028
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex justify-between text-lg font-semibold border-t pt-2", children: [
1029
1029
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: t("billing.ui.invoice.total") }),
1030
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: _chunkCMNJENSJjs.formatCurrency.call(void 0, invoice.total, invoice.currency, fmt) })
1030
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: _chunkZB6OYIMBjs.formatCurrency.call(void 0, invoice.total, invoice.currency, fmt) })
1031
1031
  ] }),
1032
1032
  invoice.amountPaid > 0 && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex justify-between", children: [
1033
1033
  /* @__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: _chunkCMNJENSJjs.formatCurrency.call(void 0, invoice.amountPaid, invoice.currency, fmt) })
1034
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-sm text-success", children: _chunkZB6OYIMBjs.formatCurrency.call(void 0, invoice.amountPaid, invoice.currency, fmt) })
1035
1035
  ] }),
1036
1036
  invoice.amountRemaining > 0 && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex justify-between", children: [
1037
1037
  /* @__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: _chunkCMNJENSJjs.formatCurrency.call(void 0, invoice.amountRemaining, invoice.currency, fmt) })
1038
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-sm text-destructive", children: _chunkZB6OYIMBjs.formatCurrency.call(void 0, invoice.amountRemaining, invoice.currency, fmt) })
1039
1039
  ] })
1040
1040
  ] }),
1041
1041
  /* @__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, _chunk6IQCMCIAjs.Button, { variant: "outline", onClick: handleDownloadPDF, children: [
1042
+ invoice.stripePdfUrl && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkEGTC75OWjs.Button, { variant: "outline", onClick: handleDownloadPDF, children: [
1043
1043
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.Download, { className: "me-2 h-4 w-4" }),
1044
1044
  t("billing.ui.invoice.download_pdf")
1045
1045
  ] }),
1046
- invoice.status === "open" /* OPEN */ && invoice.attempted && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk6IQCMCIAjs.Button, { variant: "default", onClick: handleRetryPayment, children: [
1046
+ invoice.status === "open" /* OPEN */ && invoice.attempted && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkEGTC75OWjs.Button, { variant: "default", onClick: handleRetryPayment, children: [
1047
1047
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.RefreshCw, { className: "me-2 h-4 w-4" }),
1048
1048
  t("billing.ui.invoice.retry_payment")
1049
1049
  ] }),
1050
- invoice.stripeHostedInvoiceUrl && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk6IQCMCIAjs.Button, { variant: "outline", onClick: handleViewInStripe, children: [
1050
+ invoice.stripeHostedInvoiceUrl && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkEGTC75OWjs.Button, { variant: "outline", onClick: handleViewInStripe, children: [
1051
1051
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.ExternalLink, { className: "me-2 h-4 w-4" }),
1052
1052
  t("billing.ui.invoice.view_in_stripe")
1053
1053
  ] })
@@ -1061,7 +1061,7 @@ _chunk7QVYU63Ejs.__name.call(void 0, InvoiceDetails, "InvoiceDetails");
1061
1061
 
1062
1062
  function InvoicesList({ invoices, onInvoicesChange }) {
1063
1063
  const t = _nextintl.useTranslations.call(void 0, );
1064
- const fmt = _chunk6IQCMCIAjs.useBillingFormatOptions.call(void 0, );
1064
+ const fmt = _chunkEGTC75OWjs.useBillingFormatOptions.call(void 0, );
1065
1065
  const [selectedInvoice, setSelectedInvoice] = _react.useState.call(void 0, null);
1066
1066
  const handleRowClick = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (invoice) => {
1067
1067
  setSelectedInvoice(invoice);
@@ -1073,30 +1073,30 @@ function InvoicesList({ invoices, onInvoicesChange }) {
1073
1073
  return invoice.stripeInvoiceId.slice(-8);
1074
1074
  }, "getInvoiceNumber");
1075
1075
  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, _chunk6IQCMCIAjs.Table, { children: [
1077
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6IQCMCIAjs.TableHeader, { className: "bg-muted", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk6IQCMCIAjs.TableRow, { children: [
1078
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6IQCMCIAjs.TableHead, { children: t("billing.ui.columns.invoice_number") }),
1079
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6IQCMCIAjs.TableHead, { children: t("billing.ui.columns.date") }),
1080
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6IQCMCIAjs.TableHead, { children: t("billing.ui.columns.status") }),
1081
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6IQCMCIAjs.TableHead, { className: "text-end", children: t("billing.ui.columns.amount") }),
1082
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6IQCMCIAjs.TableHead, { children: t("billing.ui.columns.period") })
1076
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "border rounded-lg overflow-clip", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkEGTC75OWjs.Table, { children: [
1077
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEGTC75OWjs.TableHeader, { className: "bg-muted", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkEGTC75OWjs.TableRow, { children: [
1078
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEGTC75OWjs.TableHead, { children: t("billing.ui.columns.invoice_number") }),
1079
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEGTC75OWjs.TableHead, { children: t("billing.ui.columns.date") }),
1080
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEGTC75OWjs.TableHead, { children: t("billing.ui.columns.status") }),
1081
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEGTC75OWjs.TableHead, { className: "text-end", children: t("billing.ui.columns.amount") }),
1082
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEGTC75OWjs.TableHead, { children: t("billing.ui.columns.period") })
1083
1083
  ] }) }),
1084
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6IQCMCIAjs.TableBody, { children: invoices.map((invoice) => {
1084
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEGTC75OWjs.TableBody, { children: invoices.map((invoice) => {
1085
1085
  const invoiceNumber = getInvoiceNumber(invoice);
1086
- const date = _chunk6IQCMCIAjs.formatDate.call(void 0, invoice.periodStart, fmt);
1087
- const amount = _chunkCMNJENSJjs.formatCurrency.call(void 0, invoice.total, invoice.currency, fmt);
1088
- const period = `${_chunk6IQCMCIAjs.formatDate.call(void 0, invoice.periodStart, fmt)} - ${_chunk6IQCMCIAjs.formatDate.call(void 0, invoice.periodEnd, fmt)}`;
1086
+ const date = _chunkEGTC75OWjs.formatDate.call(void 0, invoice.periodStart, fmt);
1087
+ const amount = _chunkZB6OYIMBjs.formatCurrency.call(void 0, invoice.total, invoice.currency, fmt);
1088
+ const period = `${_chunkEGTC75OWjs.formatDate.call(void 0, invoice.periodStart, fmt)} - ${_chunkEGTC75OWjs.formatDate.call(void 0, invoice.periodEnd, fmt)}`;
1089
1089
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
1090
- _chunk6IQCMCIAjs.TableRow,
1090
+ _chunkEGTC75OWjs.TableRow,
1091
1091
  {
1092
1092
  onClick: () => handleRowClick(invoice),
1093
1093
  className: "cursor-pointer hover:bg-muted/50",
1094
1094
  children: [
1095
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6IQCMCIAjs.TableCell, { className: "font-medium", children: invoiceNumber }),
1096
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6IQCMCIAjs.TableCell, { className: "text-muted-foreground text-xs", children: date }),
1097
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6IQCMCIAjs.TableCell, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, InvoiceStatusBadge, { status: invoice.status }) }),
1098
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6IQCMCIAjs.TableCell, { className: "text-end font-medium", children: amount }),
1099
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6IQCMCIAjs.TableCell, { className: "text-muted-foreground text-xs", children: period })
1095
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEGTC75OWjs.TableCell, { className: "font-medium", children: invoiceNumber }),
1096
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEGTC75OWjs.TableCell, { className: "text-muted-foreground text-xs", children: date }),
1097
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEGTC75OWjs.TableCell, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, InvoiceStatusBadge, { status: invoice.status }) }),
1098
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEGTC75OWjs.TableCell, { className: "text-end font-medium", children: amount }),
1099
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEGTC75OWjs.TableCell, { className: "text-muted-foreground text-xs", children: period })
1100
1100
  ]
1101
1101
  },
1102
1102
  invoice.id
@@ -1130,7 +1130,7 @@ function InvoicesContainer() {
1130
1130
  setLoading(true);
1131
1131
  try {
1132
1132
  const params = statusFilter !== "all" ? { status: statusFilter } : void 0;
1133
- const data = await _chunkCMNJENSJjs.StripeInvoiceService.listInvoices(params);
1133
+ const data = await _chunkZB6OYIMBjs.StripeInvoiceService.listInvoices(params);
1134
1134
  setInvoices(data);
1135
1135
  } catch (error) {
1136
1136
  console.error("[InvoicesContainer] Failed to load invoices:", error);
@@ -1146,12 +1146,12 @@ function InvoicesContainer() {
1146
1146
  setStatusFilter(value);
1147
1147
  }, "handleFilterChange");
1148
1148
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-4", children: [
1149
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6IQCMCIAjs.Tabs, { value: statusFilter, onValueChange: handleFilterChange, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk6IQCMCIAjs.TabsList, { children: [
1150
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6IQCMCIAjs.TabsTrigger, { value: "all", children: t("billing.ui.invoices.filter_all") }),
1151
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6IQCMCIAjs.TabsTrigger, { value: "paid" /* PAID */, children: t("billing.ui.invoice_status.paid") }),
1152
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6IQCMCIAjs.TabsTrigger, { value: "open" /* OPEN */, children: t("billing.ui.invoice_status.open") }),
1153
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6IQCMCIAjs.TabsTrigger, { value: "void" /* VOID */, children: t("billing.ui.invoice_status.void") }),
1154
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6IQCMCIAjs.TabsTrigger, { value: "uncollectible" /* UNCOLLECTIBLE */, children: t("billing.ui.invoice_status.uncollectible") })
1149
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEGTC75OWjs.Tabs, { value: statusFilter, onValueChange: handleFilterChange, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkEGTC75OWjs.TabsList, { children: [
1150
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEGTC75OWjs.TabsTrigger, { value: "all", children: t("billing.ui.invoices.filter_all") }),
1151
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEGTC75OWjs.TabsTrigger, { value: "paid" /* PAID */, children: t("billing.ui.invoice_status.paid") }),
1152
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEGTC75OWjs.TabsTrigger, { value: "open" /* OPEN */, children: t("billing.ui.invoice_status.open") }),
1153
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEGTC75OWjs.TabsTrigger, { value: "void" /* VOID */, children: t("billing.ui.invoice_status.void") }),
1154
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEGTC75OWjs.TabsTrigger, { value: "uncollectible" /* UNCOLLECTIBLE */, children: t("billing.ui.invoice_status.uncollectible") })
1155
1155
  ] }) }),
1156
1156
  loading && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "text-center py-8 text-muted-foreground", children: t("billing.ui.invoices.loading") }),
1157
1157
  !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 +1193,7 @@ function CancelSubscriptionDialog({
1193
1193
  onSuccess
1194
1194
  }) {
1195
1195
  const t = _nextintl.useTranslations.call(void 0, );
1196
- const fmt = _chunk6IQCMCIAjs.useBillingFormatOptions.call(void 0, );
1196
+ const fmt = _chunkEGTC75OWjs.useBillingFormatOptions.call(void 0, );
1197
1197
  const [isSubmitting, setIsSubmitting] = _react.useState.call(void 0, false);
1198
1198
  const form = _reacthookform.useForm.call(void 0, {
1199
1199
  resolver: _zod.zodResolver.call(void 0, formSchema),
@@ -1204,7 +1204,7 @@ function CancelSubscriptionDialog({
1204
1204
  const onSubmit = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, async (_values) => {
1205
1205
  setIsSubmitting(true);
1206
1206
  try {
1207
- await _chunkCMNJENSJjs.StripeSubscriptionService.cancelSubscription({
1207
+ await _chunkZB6OYIMBjs.StripeSubscriptionService.cancelSubscription({
1208
1208
  id: subscription.id,
1209
1209
  cancelImmediately: false
1210
1210
  });
@@ -1216,16 +1216,16 @@ function CancelSubscriptionDialog({
1216
1216
  setIsSubmitting(false);
1217
1217
  }
1218
1218
  }, "onSubmit");
1219
- const periodEndDate = _chunk6IQCMCIAjs.formatDate.call(void 0, subscription.currentPeriodEnd, fmt);
1220
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6IQCMCIAjs.Dialog, { open, onOpenChange, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk6IQCMCIAjs.DialogContent, { className: "max-w-md", children: [
1221
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk6IQCMCIAjs.DialogHeader, { children: [
1222
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6IQCMCIAjs.DialogTitle, { children: t("billing.ui.subscription.cancel.title") }),
1223
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6IQCMCIAjs.DialogDescription, { children: t("billing.ui.subscription.cancel.description") })
1219
+ const periodEndDate = _chunkEGTC75OWjs.formatDate.call(void 0, subscription.currentPeriodEnd, fmt);
1220
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEGTC75OWjs.Dialog, { open, onOpenChange, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkEGTC75OWjs.DialogContent, { className: "max-w-md", children: [
1221
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkEGTC75OWjs.DialogHeader, { children: [
1222
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEGTC75OWjs.DialogTitle, { children: t("billing.ui.subscription.cancel.title") }),
1223
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEGTC75OWjs.DialogDescription, { children: t("billing.ui.subscription.cancel.description") })
1224
1224
  ] }),
1225
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6IQCMCIAjs.Form, { ...form, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "form", { onSubmit: form.handleSubmit(onSubmit), className: "flex flex-col gap-y-4", children: [
1225
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEGTC75OWjs.Form, { ...form, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "form", { onSubmit: form.handleSubmit(onSubmit), className: "flex flex-col gap-y-4", children: [
1226
1226
  /* @__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
1227
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1228
- _chunk6IQCMCIAjs.FormTextarea,
1228
+ _chunkEGTC75OWjs.FormTextarea,
1229
1229
  {
1230
1230
  form,
1231
1231
  id: "reason",
@@ -1235,8 +1235,8 @@ function CancelSubscriptionDialog({
1235
1235
  }
1236
1236
  ),
1237
1237
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex gap-x-2 justify-end pt-2", children: [
1238
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6IQCMCIAjs.Button, { type: "button", variant: "outline", onClick: () => onOpenChange(false), disabled: isSubmitting, children: t("billing.ui.subscription.cancel.keep") }),
1239
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6IQCMCIAjs.Button, { type: "submit", variant: "destructive", disabled: isSubmitting, children: isSubmitting ? t("billing.ui.subscription.cancel.canceling") : t("billing.ui.subscription.cancel.confirm") })
1238
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEGTC75OWjs.Button, { type: "button", variant: "outline", onClick: () => onOpenChange(false), disabled: isSubmitting, children: t("billing.ui.subscription.cancel.keep") }),
1239
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEGTC75OWjs.Button, { type: "submit", variant: "destructive", disabled: isSubmitting, children: isSubmitting ? t("billing.ui.subscription.cancel.canceling") : t("billing.ui.subscription.cancel.confirm") })
1240
1240
  ] })
1241
1241
  ] }) })
1242
1242
  ] }) });
@@ -1287,7 +1287,7 @@ var cancelingConfig = {
1287
1287
  function SubscriptionStatusBadge({ status, cancelAtPeriodEnd }) {
1288
1288
  const t = _nextintl.useTranslations.call(void 0, );
1289
1289
  const config = cancelAtPeriodEnd ? cancelingConfig : statusConfig2[status] || statusConfig2["canceled" /* CANCELED */];
1290
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6IQCMCIAjs.Badge, { variant: config.variant, children: t(config.label) });
1290
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEGTC75OWjs.Badge, { variant: config.variant, children: t(config.label) });
1291
1291
  }
1292
1292
  _chunk7QVYU63Ejs.__name.call(void 0, SubscriptionStatusBadge, "SubscriptionStatusBadge");
1293
1293
 
@@ -1314,7 +1314,7 @@ function formatPlanName2(price, t) {
1314
1314
  _chunk7QVYU63Ejs.__name.call(void 0, formatPlanName2, "formatPlanName");
1315
1315
  function formatBillingAmount(price, notAvailable, fmt) {
1316
1316
  if (!_optionalChain([price, 'optionalAccess', _37 => _37.unitAmount])) return notAvailable;
1317
- return _chunkCMNJENSJjs.formatCurrency.call(void 0, price.unitAmount, price.currency, fmt);
1317
+ return _chunkZB6OYIMBjs.formatCurrency.call(void 0, price.unitAmount, price.currency, fmt);
1318
1318
  }
1319
1319
  _chunk7QVYU63Ejs.__name.call(void 0, formatBillingAmount, "formatBillingAmount");
1320
1320
  function SubscriptionDetails({
@@ -1326,11 +1326,11 @@ function SubscriptionDetails({
1326
1326
  renderCancelDialog
1327
1327
  }) {
1328
1328
  const t = _nextintl.useTranslations.call(void 0, );
1329
- const fmt = _chunk6IQCMCIAjs.useBillingFormatOptions.call(void 0, );
1329
+ const fmt = _chunkEGTC75OWjs.useBillingFormatOptions.call(void 0, );
1330
1330
  const [showCancel, setShowCancel] = _react.useState.call(void 0, false);
1331
1331
  const handleManageViaPortal = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, async () => {
1332
1332
  try {
1333
- const { url } = await _chunkCMNJENSJjs.StripeCustomerService.createPortalSession();
1333
+ const { url } = await _chunkZB6OYIMBjs.StripeCustomerService.createPortalSession();
1334
1334
  window.open(url, "_blank");
1335
1335
  } catch (error) {
1336
1336
  console.error("[SubscriptionDetails] Failed to create portal session:", error);
@@ -1338,10 +1338,10 @@ function SubscriptionDetails({
1338
1338
  }, "handleManageViaPortal");
1339
1339
  const canCancel = subscription.status === "active" /* ACTIVE */ || subscription.status === "trialing" /* TRIALING */ || subscription.status === "paused" /* PAUSED */;
1340
1340
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
1341
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6IQCMCIAjs.Dialog, { open, onOpenChange, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk6IQCMCIAjs.DialogContent, { className: "max-w-2xl", children: [
1342
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk6IQCMCIAjs.DialogHeader, { children: [
1343
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6IQCMCIAjs.DialogTitle, { children: t("billing.ui.subscription.details_title") }),
1344
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6IQCMCIAjs.DialogDescription, { children: t("billing.ui.subscription.details_description") })
1341
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEGTC75OWjs.Dialog, { open, onOpenChange, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkEGTC75OWjs.DialogContent, { className: "max-w-2xl", children: [
1342
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkEGTC75OWjs.DialogHeader, { children: [
1343
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEGTC75OWjs.DialogTitle, { children: t("billing.ui.subscription.details_title") }),
1344
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEGTC75OWjs.DialogDescription, { children: t("billing.ui.subscription.details_description") })
1345
1345
  ] }),
1346
1346
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-6", children: [
1347
1347
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center gap-x-3", children: [
@@ -1367,22 +1367,22 @@ function SubscriptionDetails({
1367
1367
  /* @__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
1368
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-muted-foreground text-xs", children: t("billing.ui.subscription.current_period") }),
1369
1369
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: "text-sm", children: [
1370
- _chunk6IQCMCIAjs.formatDate.call(void 0, subscription.currentPeriodStart, fmt),
1370
+ _chunkEGTC75OWjs.formatDate.call(void 0, subscription.currentPeriodStart, fmt),
1371
1371
  " - ",
1372
- _chunk6IQCMCIAjs.formatDate.call(void 0, subscription.currentPeriodEnd, fmt)
1372
+ _chunkEGTC75OWjs.formatDate.call(void 0, subscription.currentPeriodEnd, fmt)
1373
1373
  ] })
1374
1374
  ] }) }),
1375
1375
  subscription.trialEnd && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex justify-between", children: [
1376
1376
  /* @__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: _chunk6IQCMCIAjs.formatDate.call(void 0, subscription.trialEnd, fmt) })
1377
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-sm", children: _chunkEGTC75OWjs.formatDate.call(void 0, subscription.trialEnd, fmt) })
1378
1378
  ] }),
1379
1379
  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: _chunk6IQCMCIAjs.formatDate.call(void 0, subscription.currentPeriodEnd, fmt)
1380
+ date: _chunkEGTC75OWjs.formatDate.call(void 0, subscription.currentPeriodEnd, fmt)
1381
1381
  }) }) }),
1382
1382
  /* @__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, _chunk6IQCMCIAjs.Button, { variant: "default", onClick: () => onChangePlan(subscription), children: t("billing.ui.subscription.change_plan") }),
1384
- canCancel && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6IQCMCIAjs.Button, { variant: "destructive", onClick: () => setShowCancel(true), children: t("ui.buttons.cancel") }),
1385
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6IQCMCIAjs.Button, { variant: "outline", onClick: handleManageViaPortal, children: t("billing.ui.subscription.manage_portal") })
1383
+ onChangePlan && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEGTC75OWjs.Button, { variant: "default", onClick: () => onChangePlan(subscription), children: t("billing.ui.subscription.change_plan") }),
1384
+ canCancel && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEGTC75OWjs.Button, { variant: "destructive", onClick: () => setShowCancel(true), children: t("ui.buttons.cancel") }),
1385
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEGTC75OWjs.Button, { variant: "outline", onClick: handleManageViaPortal, children: t("billing.ui.subscription.manage_portal") })
1386
1386
  ] })
1387
1387
  ] })
1388
1388
  ] }) }),
@@ -1442,46 +1442,46 @@ function SubscriptionsList({
1442
1442
  renderCancelDialog
1443
1443
  }) {
1444
1444
  const t = _nextintl.useTranslations.call(void 0, );
1445
- const fmt = _chunk6IQCMCIAjs.useBillingFormatOptions.call(void 0, );
1445
+ const fmt = _chunkEGTC75OWjs.useBillingFormatOptions.call(void 0, );
1446
1446
  const [selectedSub, setSelectedSub] = _react.useState.call(void 0, null);
1447
1447
  const handleRowClick = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (subscription) => {
1448
1448
  setSelectedSub(subscription);
1449
1449
  }, "handleRowClick");
1450
1450
  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, _chunk6IQCMCIAjs.Table, { children: [
1452
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6IQCMCIAjs.TableHeader, { className: "bg-muted", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk6IQCMCIAjs.TableRow, { children: [
1453
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6IQCMCIAjs.TableHead, { children: t("billing.ui.columns.status") }),
1454
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6IQCMCIAjs.TableHead, { children: t("billing.ui.columns.plan") }),
1455
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6IQCMCIAjs.TableHead, { children: t("billing.ui.columns.period") }),
1456
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6IQCMCIAjs.TableHead, { className: "text-end", children: t("billing.ui.columns.amount") }),
1457
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6IQCMCIAjs.TableHead, { className: "text-end", children: t("billing.ui.columns.actions") })
1451
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "border rounded-lg overflow-clip", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkEGTC75OWjs.Table, { children: [
1452
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEGTC75OWjs.TableHeader, { className: "bg-muted", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkEGTC75OWjs.TableRow, { children: [
1453
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEGTC75OWjs.TableHead, { children: t("billing.ui.columns.status") }),
1454
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEGTC75OWjs.TableHead, { children: t("billing.ui.columns.plan") }),
1455
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEGTC75OWjs.TableHead, { children: t("billing.ui.columns.period") }),
1456
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEGTC75OWjs.TableHead, { className: "text-end", children: t("billing.ui.columns.amount") }),
1457
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEGTC75OWjs.TableHead, { className: "text-end", children: t("billing.ui.columns.actions") })
1458
1458
  ] }) }),
1459
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6IQCMCIAjs.TableBody, { children: subscriptions.map((subscription) => {
1459
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEGTC75OWjs.TableBody, { children: subscriptions.map((subscription) => {
1460
1460
  const price = subscription.price;
1461
- const amount = _optionalChain([price, 'optionalAccess', _42 => _42.unitAmount]) ? _chunkCMNJENSJjs.formatCurrency.call(void 0, price.unitAmount, price.currency, fmt) : "0";
1462
- const discountedAmount = price ? _chunk6IQCMCIAjs.applyDiscount.call(void 0, price.unitAmount, _chunk6IQCMCIAjs.subscriptionDiscount.call(void 0, subscription)) : null;
1463
- const period = `${_chunk6IQCMCIAjs.formatDate.call(void 0, subscription.currentPeriodStart, fmt)} - ${_chunk6IQCMCIAjs.formatDate.call(void 0, subscription.currentPeriodEnd, fmt)}`;
1461
+ const amount = _optionalChain([price, 'optionalAccess', _42 => _42.unitAmount]) ? _chunkZB6OYIMBjs.formatCurrency.call(void 0, price.unitAmount, price.currency, fmt) : "0";
1462
+ const discountedAmount = price ? _chunkEGTC75OWjs.applyDiscount.call(void 0, price.unitAmount, _chunkEGTC75OWjs.subscriptionDiscount.call(void 0, subscription)) : null;
1463
+ const period = `${_chunkEGTC75OWjs.formatDate.call(void 0, subscription.currentPeriodStart, fmt)} - ${_chunkEGTC75OWjs.formatDate.call(void 0, subscription.currentPeriodEnd, fmt)}`;
1464
1464
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
1465
- _chunk6IQCMCIAjs.TableRow,
1465
+ _chunkEGTC75OWjs.TableRow,
1466
1466
  {
1467
1467
  onClick: () => handleRowClick(subscription),
1468
1468
  className: "cursor-pointer hover:bg-muted/50",
1469
1469
  children: [
1470
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6IQCMCIAjs.TableCell, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1470
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEGTC75OWjs.TableCell, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1471
1471
  SubscriptionStatusBadge,
1472
1472
  {
1473
1473
  status: subscription.status,
1474
1474
  cancelAtPeriodEnd: subscription.cancelAtPeriodEnd
1475
1475
  }
1476
1476
  ) }),
1477
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6IQCMCIAjs.TableCell, { className: "font-medium", children: formatPlanName3(price, t) }),
1478
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6IQCMCIAjs.TableCell, { className: "text-muted-foreground text-sm", children: period }),
1479
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6IQCMCIAjs.TableCell, { className: "text-end font-medium", children: discountedAmount !== null && price ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
1477
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEGTC75OWjs.TableCell, { className: "font-medium", children: formatPlanName3(price, t) }),
1478
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEGTC75OWjs.TableCell, { className: "text-muted-foreground text-sm", children: period }),
1479
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEGTC75OWjs.TableCell, { className: "text-end font-medium", children: discountedAmount !== null && price ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
1480
1480
  /* @__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: _chunkCMNJENSJjs.formatCurrency.call(void 0, discountedAmount, price.currency, fmt) })
1481
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-success", children: _chunkZB6OYIMBjs.formatCurrency.call(void 0, discountedAmount, price.currency, fmt) })
1482
1482
  ] }) : amount }),
1483
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6IQCMCIAjs.TableCell, { className: "text-end", children: (subscription.status === "active" /* ACTIVE */ || subscription.status === "trialing" /* TRIALING */) && onChangePlan && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1484
- _chunk6IQCMCIAjs.Button,
1483
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEGTC75OWjs.TableCell, { className: "text-end", children: (subscription.status === "active" /* ACTIVE */ || subscription.status === "trialing" /* TRIALING */) && onChangePlan && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1484
+ _chunkEGTC75OWjs.Button,
1485
1485
  {
1486
1486
  size: "sm",
1487
1487
  variant: "outline",
@@ -1541,7 +1541,7 @@ function SubscriptionsContainer({
1541
1541
  }
1542
1542
  setLoading(true);
1543
1543
  try {
1544
- const fetchedSubscriptions = await _chunkCMNJENSJjs.StripeSubscriptionService.listSubscriptions();
1544
+ const fetchedSubscriptions = await _chunkZB6OYIMBjs.StripeSubscriptionService.listSubscriptions();
1545
1545
  setSubscriptions(fetchedSubscriptions);
1546
1546
  } catch (error) {
1547
1547
  console.error("[SubscriptionsContainer] Failed to load subscriptions:", error);
@@ -1564,7 +1564,7 @@ function SubscriptionsContainer({
1564
1564
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.CreditCard, { className: "h-8 w-8" }),
1565
1565
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h1", { className: "text-primary text-3xl font-semibold", children: t("billing.ui.subscriptions.title") })
1566
1566
  ] }),
1567
- subscriptions.length > 0 && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6IQCMCIAjs.Button, { onClick: () => _optionalChain([onOpenWizard, 'optionalCall', _44 => _44()]), children: hasActiveRecurringSubscription ? t("billing.ui.subscriptions.purchase_addons") : t("billing.ui.subscriptions.subscribe") })
1567
+ subscriptions.length > 0 && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEGTC75OWjs.Button, { onClick: () => _optionalChain([onOpenWizard, 'optionalCall', _44 => _44()]), children: hasActiveRecurringSubscription ? t("billing.ui.subscriptions.purchase_addons") : t("billing.ui.subscriptions.subscribe") })
1568
1568
  ] }),
1569
1569
  criticalSubscriptions.map((subscription) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, BillingAlertBanner, { subscription }, subscription.id)),
1570
1570
  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 +1572,7 @@ function SubscriptionsContainer({
1572
1572
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "text-center", children: [
1573
1573
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h3", { className: "text-sm font-medium mb-2", children: t("billing.ui.subscriptions.empty_title") }),
1574
1574
  /* @__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, _chunk6IQCMCIAjs.Button, { onClick: () => _optionalChain([onOpenWizard, 'optionalCall', _45 => _45()]), children: t("billing.ui.subscriptions.subscribe") })
1575
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEGTC75OWjs.Button, { onClick: () => _optionalChain([onOpenWizard, 'optionalCall', _45 => _45()]), children: t("billing.ui.subscriptions.subscribe") })
1576
1576
  ] })
1577
1577
  ] }),
1578
1578
  subscriptions.length > 0 && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
@@ -1596,9 +1596,9 @@ function IntervalToggle({ value, onChange, hasMonthly, hasYearly }) {
1596
1596
  if (!hasMonthly || !hasYearly) {
1597
1597
  return null;
1598
1598
  }
1599
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6IQCMCIAjs.Tabs, { value, onValueChange: (v) => onChange(v), children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk6IQCMCIAjs.TabsList, { children: [
1600
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6IQCMCIAjs.TabsTrigger, { value: "month", children: t("billing.admin.prices.interval.month") }),
1601
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6IQCMCIAjs.TabsTrigger, { value: "year", children: t("billing.admin.prices.interval.year") })
1599
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEGTC75OWjs.Tabs, { value, onValueChange: (v) => onChange(v), children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkEGTC75OWjs.TabsList, { children: [
1600
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEGTC75OWjs.TabsTrigger, { value: "month", children: t("billing.admin.prices.interval.month") }),
1601
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEGTC75OWjs.TabsTrigger, { value: "year", children: t("billing.admin.prices.interval.year") })
1602
1602
  ] }) });
1603
1603
  }
1604
1604
  _chunk7QVYU63Ejs.__name.call(void 0, IntervalToggle, "IntervalToggle");
@@ -1616,11 +1616,11 @@ function PricingCard({
1616
1616
  onSelect
1617
1617
  }) {
1618
1618
  const t = _nextintl.useTranslations.call(void 0, );
1619
- const fmt = _chunk6IQCMCIAjs.useBillingFormatOptions.call(void 0, );
1619
+ const fmt = _chunkEGTC75OWjs.useBillingFormatOptions.call(void 0, );
1620
1620
  const description = price.description || price.nickname || t("billing.ui.pricing.standard");
1621
1621
  const features = price.features || [];
1622
- const formattedPrice = _chunkCMNJENSJjs.formatCurrency.call(void 0, price.unitAmount, price.currency, fmt);
1623
- const interval = _chunkCMNJENSJjs.formatInterval.call(void 0, price, fmt);
1622
+ const formattedPrice = _chunkZB6OYIMBjs.formatCurrency.call(void 0, price.unitAmount, price.currency, fmt);
1623
+ const interval = _chunkZB6OYIMBjs.formatInterval.call(void 0, price, fmt);
1624
1624
  const handleKeyDown = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (e) => {
1625
1625
  if ((e.key === "Enter" || e.key === " ") && !isDisabled && !isCurrentPlan) {
1626
1626
  e.preventDefault();
@@ -1633,7 +1633,7 @@ function PricingCard({
1633
1633
  }
1634
1634
  }, "handleClick");
1635
1635
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
1636
- _chunk6IQCMCIAjs.Card,
1636
+ _chunkEGTC75OWjs.Card,
1637
1637
  {
1638
1638
  role: "radio",
1639
1639
  "aria-checked": isSelected,
@@ -1641,7 +1641,7 @@ function PricingCard({
1641
1641
  tabIndex: isDisabled ? -1 : 0,
1642
1642
  onKeyDown: handleKeyDown,
1643
1643
  onClick: handleClick,
1644
- className: _chunkCMNJENSJjs.cn.call(void 0,
1644
+ className: _chunkZB6OYIMBjs.cn.call(void 0,
1645
1645
  "relative cursor-pointer transition-all duration-200 flex flex-col h-full",
1646
1646
  "focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",
1647
1647
  isCurrentPlan && "bg-muted/30",
@@ -1651,9 +1651,9 @@ function PricingCard({
1651
1651
  isLoading && "pointer-events-none"
1652
1652
  ),
1653
1653
  children: [
1654
- isCurrentPlan && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6IQCMCIAjs.Badge, { variant: "secondary", className: "absolute top-2 end-2", children: t("billing.ui.pricing.current") }),
1655
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6IQCMCIAjs.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, _chunk6IQCMCIAjs.CardContent, { className: "pb-4 grow", children: [
1654
+ isCurrentPlan && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEGTC75OWjs.Badge, { variant: "secondary", className: "absolute top-2 end-2", children: t("billing.ui.pricing.current") }),
1655
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEGTC75OWjs.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, _chunkEGTC75OWjs.CardContent, { className: "pb-4 grow", children: [
1657
1657
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "mb-4", children: [
1658
1658
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-3xl font-bold", children: formattedPrice }),
1659
1659
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-muted-foreground ms-1", children: interval })
@@ -1663,8 +1663,8 @@ function PricingCard({
1663
1663
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-sm text-muted-foreground", children: feature })
1664
1664
  ] }, index)) })
1665
1665
  ] }),
1666
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6IQCMCIAjs.CardFooter, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1667
- _chunk6IQCMCIAjs.Button,
1666
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEGTC75OWjs.CardFooter, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1667
+ _chunkEGTC75OWjs.Button,
1668
1668
  {
1669
1669
  variant: isCurrentPlan ? "secondary" : isSelected ? "default" : "outline",
1670
1670
  className: "w-full",
@@ -1697,7 +1697,7 @@ function ProductPricingRow({
1697
1697
  return null;
1698
1698
  }
1699
1699
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-3", children: [
1700
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6IQCMCIAjs.SectionHeader, { children: product.name }),
1700
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEGTC75OWjs.SectionHeader, { children: product.name }),
1701
1701
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1702
1702
  "div",
1703
1703
  {
@@ -1798,15 +1798,15 @@ function ProductPricingList({
1798
1798
  _chunk7QVYU63Ejs.__name.call(void 0, ProductPricingList, "ProductPricingList");
1799
1799
  function ProductPricingListSkeleton() {
1800
1800
  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, _chunk6IQCMCIAjs.Skeleton, { className: "h-6 w-32" }),
1801
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEGTC75OWjs.Skeleton, { className: "h-6 w-32" }),
1802
1802
  /* @__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, _chunk6IQCMCIAjs.Skeleton, { className: "h-6 w-24" }),
1804
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6IQCMCIAjs.Skeleton, { className: "h-8 w-32" }),
1803
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEGTC75OWjs.Skeleton, { className: "h-6 w-24" }),
1804
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEGTC75OWjs.Skeleton, { className: "h-8 w-32" }),
1805
1805
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-2", children: [
1806
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6IQCMCIAjs.Skeleton, { className: "h-4 w-full" }),
1807
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6IQCMCIAjs.Skeleton, { className: "h-4 w-3/4" })
1806
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEGTC75OWjs.Skeleton, { className: "h-4 w-full" }),
1807
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEGTC75OWjs.Skeleton, { className: "h-4 w-3/4" })
1808
1808
  ] }),
1809
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6IQCMCIAjs.Skeleton, { className: "h-10 w-full" })
1809
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEGTC75OWjs.Skeleton, { className: "h-10 w-full" })
1810
1810
  ] }, cardIndex)) })
1811
1811
  ] }, rowIndex)) });
1812
1812
  }
@@ -1817,20 +1817,20 @@ _chunk7QVYU63Ejs.__name.call(void 0, ProductPricingListSkeleton, "ProductPricing
1817
1817
 
1818
1818
  function ProrationPreview({ preview }) {
1819
1819
  const t = _nextintl.useTranslations.call(void 0, );
1820
- const fmt = _chunk6IQCMCIAjs.useBillingFormatOptions.call(void 0, );
1820
+ const fmt = _chunkEGTC75OWjs.useBillingFormatOptions.call(void 0, );
1821
1821
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "bg-primary/10 border-primary/30 rounded-lg border p-4", children: [
1822
1822
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h4", { className: "text-primary mb-3 font-semibold", children: t("billing.ui.proration.title") }),
1823
1823
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-2", children: [
1824
1824
  preview.lineItems.map((item, index) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex justify-between text-sm", children: [
1825
1825
  /* @__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: _chunkCMNJENSJjs.formatCurrency.call(void 0, item.amount, preview.currency, fmt) })
1826
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: `font-medium ${item.amount < 0 ? "text-success" : "text-foreground"}`, children: _chunkZB6OYIMBjs.formatCurrency.call(void 0, item.amount, preview.currency, fmt) })
1827
1827
  ] }, index)),
1828
1828
  /* @__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
1829
  /* @__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: _chunkCMNJENSJjs.formatCurrency.call(void 0, preview.immediateCharge, preview.currency, fmt) })
1830
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-foreground", children: _chunkZB6OYIMBjs.formatCurrency.call(void 0, preview.immediateCharge, preview.currency, fmt) })
1831
1831
  ] }) }),
1832
1832
  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: _chunkCMNJENSJjs.formatCurrency.call(void 0, preview.amountDue, preview.currency, fmt)
1833
+ amount: _chunkZB6OYIMBjs.formatCurrency.call(void 0, preview.amountDue, preview.currency, fmt)
1834
1834
  }) })
1835
1835
  ] })
1836
1836
  ] });
@@ -1843,7 +1843,7 @@ _chunk7QVYU63Ejs.__name.call(void 0, ProrationPreview, "ProrationPreview");
1843
1843
 
1844
1844
  function SubscriptionConfirmation({ price, isLoading, onConfirm, onCancel }) {
1845
1845
  const t = _nextintl.useTranslations.call(void 0, );
1846
- const fmt = _chunk6IQCMCIAjs.useBillingFormatOptions.call(void 0, );
1846
+ const fmt = _chunkEGTC75OWjs.useBillingFormatOptions.call(void 0, );
1847
1847
  const productName = _optionalChain([price, 'access', _51 => _51.product, 'optionalAccess', _52 => _52.name]) || price.nickname || t("billing.ui.wizard.review.selected_plan");
1848
1848
  const productDescription = _optionalChain([price, 'access', _53 => _53.product, 'optionalAccess', _54 => _54.description]) || price.description;
1849
1849
  const features = price.features || [];
@@ -1855,16 +1855,16 @@ function SubscriptionConfirmation({ price, isLoading, onConfirm, onCancel }) {
1855
1855
  productDescription && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "text-sm text-muted-foreground", children: productDescription })
1856
1856
  ] }),
1857
1857
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "text-lg font-semibold", children: [
1858
- _chunkCMNJENSJjs.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: _chunkCMNJENSJjs.formatInterval.call(void 0, price, fmt) })
1858
+ _chunkZB6OYIMBjs.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: _chunkZB6OYIMBjs.formatInterval.call(void 0, price, fmt) })
1860
1860
  ] }),
1861
1861
  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
1862
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.Check, { className: "h-4 w-4 text-primary" }),
1863
1863
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: feature })
1864
1864
  ] }, index)) }),
1865
1865
  /* @__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, _chunk6IQCMCIAjs.Button, { variant: "outline", onClick: onCancel, disabled: isLoading, children: t("ui.buttons.cancel") }),
1867
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6IQCMCIAjs.Button, { onClick: onConfirm, disabled: isLoading, children: isLoading ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
1866
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEGTC75OWjs.Button, { variant: "outline", onClick: onCancel, disabled: isLoading, children: t("ui.buttons.cancel") }),
1867
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEGTC75OWjs.Button, { onClick: onConfirm, disabled: isLoading, children: isLoading ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
1868
1868
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.Loader2, { className: "h-4 w-4 animate-spin me-2" }),
1869
1869
  t("billing.ui.wizard.review.processing")
1870
1870
  ] }) : t("billing.ui.confirmation.subscribe") })
@@ -2055,7 +2055,7 @@ function useSubscriptionWizard({ subscription, onSuccess, onClose }) {
2055
2055
  onCloseRef.current = onClose;
2056
2056
  const checkPaymentMethod = _react.useCallback.call(void 0, async () => {
2057
2057
  try {
2058
- const methods = await _chunkCMNJENSJjs.StripeCustomerService.listPaymentMethods();
2058
+ const methods = await _chunkZB6OYIMBjs.StripeCustomerService.listPaymentMethods();
2059
2059
  dispatch({ type: "SET_HAS_PAYMENT_METHOD", hasMethod: methods.length > 0 });
2060
2060
  } catch (error) {
2061
2061
  console.error("[useSubscriptionWizard] Failed to check payment methods:", error);
@@ -2073,10 +2073,10 @@ function useSubscriptionWizard({ subscription, onSuccess, onClose }) {
2073
2073
  }, []);
2074
2074
  const lookUpAutomaticCode = _react.useCallback.call(void 0, async (priceId) => {
2075
2075
  try {
2076
- const automaticCode = await _chunkCMNJENSJjs.StripeCouponCodeService.findAutomatic({ priceId });
2076
+ const automaticCode = await _chunkZB6OYIMBjs.StripeCouponCodeService.findAutomatic({ priceId });
2077
2077
  dispatch({
2078
2078
  type: "SET_PROMOTION_CODE",
2079
- code: automaticCode ? _chunkCMNJENSJjs.toPromotionCodeResult.call(void 0, automaticCode) : null
2079
+ code: automaticCode ? _chunkZB6OYIMBjs.toPromotionCodeResult.call(void 0, automaticCode) : null
2080
2080
  });
2081
2081
  return true;
2082
2082
  } catch (error) {
@@ -2103,7 +2103,7 @@ function useSubscriptionWizard({ subscription, onSuccess, onClose }) {
2103
2103
  const isTrialUpgrade = _optionalChain([subscription, 'optionalAccess', _61 => _61.status]) === "trialing" /* TRIALING */;
2104
2104
  dispatch({ type: "SET_IS_TRIAL_SUBSCRIPTION", isTrial: isTrialUpgrade });
2105
2105
  if (isTrialUpgrade && !state.hasPaymentMethod) {
2106
- const methods = await _chunkCMNJENSJjs.StripeCustomerService.listPaymentMethods();
2106
+ const methods = await _chunkZB6OYIMBjs.StripeCustomerService.listPaymentMethods();
2107
2107
  if (methods.length === 0) {
2108
2108
  dispatch({ type: "SET_STEP", step: "payment-method" });
2109
2109
  dispatch({
@@ -2121,7 +2121,7 @@ function useSubscriptionWizard({ subscription, onSuccess, onClose }) {
2121
2121
  }
2122
2122
  }
2123
2123
  if (subscription && state.selectedPrice.id !== _optionalChain([subscription, 'access', _62 => _62.price, 'optionalAccess', _63 => _63.id])) {
2124
- const preview = await _chunkCMNJENSJjs.StripeSubscriptionService.getProrationPreview({
2124
+ const preview = await _chunkZB6OYIMBjs.StripeSubscriptionService.getProrationPreview({
2125
2125
  subscriptionId: subscription.id,
2126
2126
  newPriceId: state.selectedPrice.id
2127
2127
  });
@@ -2155,14 +2155,14 @@ function useSubscriptionWizard({ subscription, onSuccess, onClose }) {
2155
2155
  newPriceId: state.selectedPrice.id,
2156
2156
  promotionCode: promotionCodeToSend(state.promotionCode)
2157
2157
  };
2158
- result = await _chunkCMNJENSJjs.StripeSubscriptionService.changePlanWithMeta(changePlanParams);
2158
+ result = await _chunkZB6OYIMBjs.StripeSubscriptionService.changePlanWithMeta(changePlanParams);
2159
2159
  } else {
2160
2160
  const createParams = {
2161
2161
  id: _uuid.v4.call(void 0, ),
2162
2162
  priceId: state.selectedPrice.id,
2163
2163
  promotionCode: promotionCodeToSend(state.promotionCode)
2164
2164
  };
2165
- result = await _chunkCMNJENSJjs.StripeSubscriptionService.createSubscription(createParams);
2165
+ result = await _chunkZB6OYIMBjs.StripeSubscriptionService.createSubscription(createParams);
2166
2166
  }
2167
2167
  const clientSecret = clientSecretToConfirm(result.meta);
2168
2168
  if (clientSecret) {
@@ -2178,7 +2178,7 @@ function useSubscriptionWizard({ subscription, onSuccess, onClose }) {
2178
2178
  const subscriptionId = subscriptionIdToSync(result.subscription, subscription);
2179
2179
  if (subscriptionId) {
2180
2180
  try {
2181
- await _chunkCMNJENSJjs.StripeSubscriptionService.syncSubscription({ subscriptionId });
2181
+ await _chunkZB6OYIMBjs.StripeSubscriptionService.syncSubscription({ subscriptionId });
2182
2182
  } catch (syncError) {
2183
2183
  console.error("[useSubscriptionWizard] Subscription sync after payment failed:", syncError);
2184
2184
  }
@@ -2226,7 +2226,7 @@ function useSubscriptionWizard({ subscription, onSuccess, onClose }) {
2226
2226
  dispatch({ type: "SET_VALIDATING_PROMO_CODE", isValidating: true });
2227
2227
  dispatch({ type: "SET_PROMO_CODE_ERROR", error: null });
2228
2228
  try {
2229
- const result = await _chunkCMNJENSJjs.StripePromotionCodeService.validatePromotionCode({
2229
+ const result = await _chunkZB6OYIMBjs.StripePromotionCodeService.validatePromotionCode({
2230
2230
  code,
2231
2231
  stripePriceId: _optionalChain([state, 'access', _72 => _72.selectedPrice, 'optionalAccess', _73 => _73.id]),
2232
2232
  language: locale
@@ -2351,7 +2351,7 @@ function WizardStepPlanSelection({
2351
2351
  _react.useEffect.call(void 0, () => {
2352
2352
  const loadProducts = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, async () => {
2353
2353
  try {
2354
- const fetchedProducts = await _chunkCMNJENSJjs.StripeProductService.listProducts({ active: true });
2354
+ const fetchedProducts = await _chunkZB6OYIMBjs.StripeProductService.listProducts({ active: true });
2355
2355
  setProducts(fetchedProducts);
2356
2356
  } catch (error) {
2357
2357
  console.error("[WizardStepPlanSelection] Failed to load products:", error);
@@ -2402,7 +2402,7 @@ function WizardStepPlanSelection({
2402
2402
  onSelectPrice: handleSelectPrice
2403
2403
  }
2404
2404
  ),
2405
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex justify-end pt-4 border-t", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6IQCMCIAjs.Button, { onClick: onNext, disabled: !selectedPrice || isProcessing, children: isProcessing ? t("common.loading") : t("billing.ui.wizard.next_review") }) })
2405
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "flex justify-end pt-4 border-t", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEGTC75OWjs.Button, { onClick: onNext, disabled: !selectedPrice || isProcessing, children: isProcessing ? t("common.loading") : t("billing.ui.wizard.next_review") }) })
2406
2406
  ] });
2407
2407
  }
2408
2408
  _chunk7QVYU63Ejs.__name.call(void 0, WizardStepPlanSelection, "WizardStepPlanSelection");
@@ -2455,7 +2455,7 @@ function PromoCodeInput({
2455
2455
  }
2456
2456
  const amount = (result.discountValue || 0) / 100;
2457
2457
  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} ${_chunkCMNJENSJjs.formatFixed.call(void 0, amount, locale, 2)}` });
2458
+ return t("billing.ui.wizard.review.amount_off", { amount: `${currency} ${_chunkZB6OYIMBjs.formatFixed.call(void 0, amount, locale, 2)}` });
2459
2459
  }, "formatDiscount");
2460
2460
  const formatDuration = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (result) => {
2461
2461
  switch (result.duration) {
@@ -2472,7 +2472,7 @@ function PromoCodeInput({
2472
2472
  const codeInput = /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-2", children: [
2473
2473
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex gap-2", children: [
2474
2474
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
2475
- _chunk6IQCMCIAjs.Input,
2475
+ _chunkEGTC75OWjs.Input,
2476
2476
  {
2477
2477
  placeholder: t("billing.ui.promo_code.placeholder"),
2478
2478
  value: code,
@@ -2482,7 +2482,7 @@ function PromoCodeInput({
2482
2482
  className: "flex-1"
2483
2483
  }
2484
2484
  ),
2485
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6IQCMCIAjs.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") })
2485
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEGTC75OWjs.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
2486
  ] }),
2487
2487
  error && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-destructive text-xs/relaxed", children: error })
2488
2488
  ] });
@@ -2511,7 +2511,7 @@ function PromoCodeInput({
2511
2511
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-success text-sm", children: formatDiscount(appliedCode) })
2512
2512
  ] }),
2513
2513
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
2514
- _chunk6IQCMCIAjs.Button,
2514
+ _chunkEGTC75OWjs.Button,
2515
2515
  {
2516
2516
  variant: "ghost",
2517
2517
  size: "sm",
@@ -2559,7 +2559,7 @@ function WizardStepReview({
2559
2559
  isTrialUpgrade
2560
2560
  }) {
2561
2561
  const t = _nextintl.useTranslations.call(void 0, );
2562
- const fmt = _chunk6IQCMCIAjs.useBillingFormatOptions.call(void 0, );
2562
+ const fmt = _chunkEGTC75OWjs.useBillingFormatOptions.call(void 0, );
2563
2563
  const [card, setCard] = _react.useState.call(void 0, null);
2564
2564
  _react.useEffect.call(void 0, () => {
2565
2565
  if (!hasPaymentMethod) {
@@ -2567,7 +2567,7 @@ function WizardStepReview({
2567
2567
  return;
2568
2568
  }
2569
2569
  let cancelled = false;
2570
- Promise.all([_chunkCMNJENSJjs.StripeCustomerService.listPaymentMethods(), _chunkCMNJENSJjs.StripeCustomerService.getCustomer()]).then(([methods, customer]) => {
2570
+ Promise.all([_chunkZB6OYIMBjs.StripeCustomerService.listPaymentMethods(), _chunkZB6OYIMBjs.StripeCustomerService.getCustomer()]).then(([methods, customer]) => {
2571
2571
  if (!cancelled) setCard(reviewCard(methods, _optionalChain([customer, 'optionalAccess', _90 => _90.defaultPaymentMethodId])));
2572
2572
  }).catch((err) => {
2573
2573
  console.error("[WizardStepReview] Failed to load the card on file:", err);
@@ -2586,11 +2586,11 @@ function WizardStepReview({
2586
2586
  const interval = _optionalChain([price, 'access', _93 => _93.recurring, 'optionalAccess', _94 => _94.interval]) || "month";
2587
2587
  return interval === "year" ? t("billing.ui.wizard.review.interval_yearly") : t("billing.ui.wizard.review.interval_monthly");
2588
2588
  }, "formatInterval");
2589
- const codeDiscount = _chunk6IQCMCIAjs.promotionCodeDiscount.call(void 0, promotionCode);
2590
- const carriedDiscount = isChangingPlan && !codeDiscount ? _chunk6IQCMCIAjs.subscriptionDiscount.call(void 0, subscription) : null;
2589
+ const codeDiscount = _chunkEGTC75OWjs.promotionCodeDiscount.call(void 0, promotionCode);
2590
+ const carriedDiscount = isChangingPlan && !codeDiscount ? _chunkEGTC75OWjs.subscriptionDiscount.call(void 0, subscription) : null;
2591
2591
  const discount = _nullishCoalesce(codeDiscount, () => ( carriedDiscount));
2592
- const discountedPrice = _chunk6IQCMCIAjs.applyDiscount.call(void 0, selectedPrice.unitAmount, discount);
2593
- const discountedImmediateCharge = _chunk6IQCMCIAjs.applyDiscount.call(void 0, _optionalChain([prorationPreview, 'optionalAccess', _95 => _95.immediateCharge]), discount);
2592
+ const discountedPrice = _chunkEGTC75OWjs.applyDiscount.call(void 0, selectedPrice.unitAmount, discount);
2593
+ const discountedImmediateCharge = _chunkEGTC75OWjs.applyDiscount.call(void 0, _optionalChain([prorationPreview, 'optionalAccess', _95 => _95.immediateCharge]), discount);
2594
2594
  const isProrationCredit = !isTrialUpgrade && (_nullishCoalesce(_nullishCoalesce(discountedImmediateCharge, () => ( _optionalChain([prorationPreview, 'optionalAccess', _96 => _96.immediateCharge]))), () => ( 0))) < 0;
2595
2595
  const prorationAmount = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (amount) => isProrationCredit ? Math.abs(amount) : amount, "prorationAmount");
2596
2596
  const getDiscountDescription = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, () => {
@@ -2599,13 +2599,13 @@ function WizardStepReview({
2599
2599
  return t("billing.ui.wizard.review.percent_off", { value: discount.discountValue });
2600
2600
  }
2601
2601
  return t("billing.ui.wizard.review.amount_off", {
2602
- amount: _chunkCMNJENSJjs.formatCurrency.call(void 0, discount.discountValue, discount.currency || selectedPrice.currency, fmt)
2602
+ amount: _chunkZB6OYIMBjs.formatCurrency.call(void 0, discount.discountValue, discount.currency || selectedPrice.currency, fmt)
2603
2603
  });
2604
2604
  }, "getDiscountDescription");
2605
2605
  const discountDescription = getDiscountDescription();
2606
2606
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-6", children: [
2607
2607
  /* @__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, _chunk6IQCMCIAjs.SectionHeader, { children: t("billing.ui.wizard.review.selected_plan") }),
2608
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEGTC75OWjs.SectionHeader, { children: t("billing.ui.wizard.review.selected_plan") }),
2609
2609
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex justify-between items-center", children: [
2610
2610
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { children: [
2611
2611
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "font-medium", children: _optionalChain([selectedPrice, 'access', _97 => _97.product, 'optionalAccess', _98 => _98.name]) }),
@@ -2613,11 +2613,11 @@ function WizardStepReview({
2613
2613
  ] }),
2614
2614
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "text-end", children: [
2615
2615
  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: _chunkCMNJENSJjs.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: _chunkCMNJENSJjs.formatCurrency.call(void 0, discountedPrice, selectedPrice.currency, fmt) }),
2618
- discountDescription && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6IQCMCIAjs.Badge, { variant: "softGreen", children: discountDescription }),
2616
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-sm text-muted-foreground line-through", children: _chunkZB6OYIMBjs.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: _chunkZB6OYIMBjs.formatCurrency.call(void 0, discountedPrice, selectedPrice.currency, fmt) }),
2618
+ discountDescription && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEGTC75OWjs.Badge, { variant: "softGreen", children: discountDescription }),
2619
2619
  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: _chunkCMNJENSJjs.formatCurrency.call(void 0, selectedPrice.unitAmount || 0, selectedPrice.currency, fmt) }),
2620
+ ] }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "font-semibold text-lg", children: _chunkZB6OYIMBjs.formatCurrency.call(void 0, selectedPrice.unitAmount || 0, selectedPrice.currency, fmt) }),
2621
2621
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-sm text-muted-foreground", children: formatInterval2(selectedPrice) })
2622
2622
  ] })
2623
2623
  ] })
@@ -2632,9 +2632,9 @@ function WizardStepReview({
2632
2632
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex justify-between text-sm", children: [
2633
2633
  /* @__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
2634
  /* @__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: _chunkCMNJENSJjs.formatCurrency.call(void 0, prorationAmount(prorationPreview.immediateCharge), prorationPreview.currency, fmt) }),
2636
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-success", children: _chunkCMNJENSJjs.formatCurrency.call(void 0, prorationAmount(discountedImmediateCharge), prorationPreview.currency, fmt) })
2637
- ] }) : _chunkCMNJENSJjs.formatCurrency.call(void 0, prorationAmount(prorationPreview.immediateCharge), prorationPreview.currency, fmt) })
2635
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "line-through text-muted-foreground me-2", children: _chunkZB6OYIMBjs.formatCurrency.call(void 0, prorationAmount(prorationPreview.immediateCharge), prorationPreview.currency, fmt) }),
2636
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-success", children: _chunkZB6OYIMBjs.formatCurrency.call(void 0, prorationAmount(discountedImmediateCharge), prorationPreview.currency, fmt) })
2637
+ ] }) : _chunkZB6OYIMBjs.formatCurrency.call(void 0, prorationAmount(prorationPreview.immediateCharge), prorationPreview.currency, fmt) })
2638
2638
  ] })
2639
2639
  ]
2640
2640
  }
@@ -2658,15 +2658,15 @@ function WizardStepReview({
2658
2658
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h4", { className: "font-medium", children: t("billing.ui.payment_method.title") }),
2659
2659
  /* @__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
2660
  ] }),
2661
- hasPaymentMethod ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6IQCMCIAjs.Button, { variant: "outline", onClick: onAddPaymentMethod, disabled: isProcessing, children: t("billing.ui.wizard.review.use_another_card") }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6IQCMCIAjs.Button, { variant: "outline", onClick: onAddPaymentMethod, children: t("billing.ui.payment_methods.add") })
2661
+ hasPaymentMethod ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEGTC75OWjs.Button, { variant: "outline", onClick: onAddPaymentMethod, disabled: isProcessing, children: t("billing.ui.wizard.review.use_another_card") }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEGTC75OWjs.Button, { variant: "outline", onClick: onAddPaymentMethod, children: t("billing.ui.payment_methods.add") })
2662
2662
  ] }) }),
2663
- error && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk6IQCMCIAjs.Alert, { variant: "destructive", children: [
2663
+ error && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkEGTC75OWjs.Alert, { variant: "destructive", children: [
2664
2664
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.AlertCircle, { className: "h-4 w-4" }),
2665
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6IQCMCIAjs.AlertDescription, { children: error })
2665
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEGTC75OWjs.AlertDescription, { children: error })
2666
2666
  ] }),
2667
2667
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex justify-between pt-4 border-t", children: [
2668
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6IQCMCIAjs.Button, { variant: "outline", onClick: onBack, disabled: isProcessing, children: t("billing.ui.wizard.back") }),
2669
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6IQCMCIAjs.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") })
2668
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEGTC75OWjs.Button, { variant: "outline", onClick: onBack, disabled: isProcessing, children: t("billing.ui.wizard.back") }),
2669
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEGTC75OWjs.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
2670
  ] })
2671
2671
  ] });
2672
2672
  }
@@ -2679,7 +2679,7 @@ function WizardStepPaymentMethod({ onBack, onSuccess, isProcessing }) {
2679
2679
  const t = _nextintl.useTranslations.call(void 0, );
2680
2680
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "space-y-6", children: [
2681
2681
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "text-center", children: [
2682
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6IQCMCIAjs.SectionHeader, { children: t("billing.ui.payment_methods.add") }),
2682
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEGTC75OWjs.SectionHeader, { children: t("billing.ui.payment_methods.add") }),
2683
2683
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-sm text-muted-foreground", children: t("billing.ui.wizard.payment_description") })
2684
2684
  ] }),
2685
2685
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, PaymentMethodForm, { onSuccess, onCancel: onBack, isLoading: isProcessing, alwaysSetDefault: true })
@@ -2722,10 +2722,10 @@ function SubscriptionWizard({
2722
2722
  const isChangePlanMode = !!subscription;
2723
2723
  const dialogTitle = subscription ? t("billing.ui.wizard.change_title") : isPurchasingAddons ? t("billing.ui.subscriptions.purchase_addons") : t("billing.ui.subscriptions.subscribe");
2724
2724
  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, _chunk6IQCMCIAjs.Dialog, { open, onOpenChange, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk6IQCMCIAjs.DialogContent, { className: "max-w-2xl max-h-[90vh] overflow-y-auto", children: [
2726
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk6IQCMCIAjs.DialogHeader, { children: [
2727
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6IQCMCIAjs.DialogTitle, { children: dialogTitle }),
2728
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6IQCMCIAjs.DialogDescription, { children: dialogDescription })
2725
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEGTC75OWjs.Dialog, { open, onOpenChange, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkEGTC75OWjs.DialogContent, { className: "max-w-2xl max-h-[90vh] overflow-y-auto", children: [
2726
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkEGTC75OWjs.DialogHeader, { children: [
2727
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEGTC75OWjs.DialogTitle, { children: dialogTitle }),
2728
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEGTC75OWjs.DialogDescription, { children: dialogDescription })
2729
2729
  ] }),
2730
2730
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, WizardProgressIndicator, { currentStep: state.step }),
2731
2731
  state.step === "plan-selection" && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
@@ -2793,7 +2793,7 @@ _chunk7QVYU63Ejs.__name.call(void 0, getProgressColor, "getProgressColor");
2793
2793
  function formatDate2(date, { locale, t }) {
2794
2794
  if (!date) return t("billing.ui.not_available");
2795
2795
  try {
2796
- return new Intl.DateTimeFormat(_chunkCMNJENSJjs.dateFormatLocale.call(void 0, locale), {
2796
+ return new Intl.DateTimeFormat(_chunkZB6OYIMBjs.dateFormatLocale.call(void 0, locale), {
2797
2797
  month: "short",
2798
2798
  day: "numeric"
2799
2799
  }).format(new Date(date));
@@ -2804,7 +2804,7 @@ function formatDate2(date, { locale, t }) {
2804
2804
  _chunk7QVYU63Ejs.__name.call(void 0, formatDate2, "formatDate");
2805
2805
  function UsageSummaryCard({ meter, summary }) {
2806
2806
  const t = _nextintl.useTranslations.call(void 0, );
2807
- const fmt = _chunk6IQCMCIAjs.useBillingFormatOptions.call(void 0, );
2807
+ const fmt = _chunkEGTC75OWjs.useBillingFormatOptions.call(void 0, );
2808
2808
  const currentUsage = _nullishCoalesce(_optionalChain([summary, 'optionalAccess', _101 => _101.aggregatedValue]), () => ( 0));
2809
2809
  const limit = meter.limit;
2810
2810
  const percentage = limit && limit > 0 ? currentUsage / limit * 100 : null;
@@ -2812,15 +2812,15 @@ function UsageSummaryCard({ meter, summary }) {
2812
2812
  const progressWidth = percentage !== null ? Math.min(percentage, 100) : 0;
2813
2813
  const displayName = meter.displayName || meter.eventName;
2814
2814
  const hasLimit = limit !== null && limit !== void 0;
2815
- return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk6IQCMCIAjs.Card, { children: [
2816
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk6IQCMCIAjs.CardHeader, { className: "flex flex-row items-center gap-x-3 pb-3", children: [
2815
+ return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkEGTC75OWjs.Card, { children: [
2816
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkEGTC75OWjs.CardHeader, { className: "flex flex-row items-center gap-x-3 pb-3", children: [
2817
2817
  /* @__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
2818
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-col", children: [
2819
2819
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h3", { className: "text-sm font-medium", children: displayName }),
2820
2820
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-muted-foreground text-xs", children: meter.id })
2821
2821
  ] })
2822
2822
  ] }),
2823
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk6IQCMCIAjs.CardContent, { className: "flex flex-col gap-y-4", children: [
2823
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkEGTC75OWjs.CardContent, { className: "flex flex-col gap-y-4", children: [
2824
2824
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { children: [
2825
2825
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-3xl font-bold", children: currentUsage.toLocaleString(fmt.locale) }),
2826
2826
  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 +2828,7 @@ function UsageSummaryCard({ meter, summary }) {
2828
2828
  hasLimit ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-col gap-y-2", children: [
2829
2829
  /* @__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
2830
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-muted-foreground text-sm", children: t("billing.ui.usage.percent_used", {
2831
- value: percentage !== null ? _chunkCMNJENSJjs.formatFixed.call(void 0, percentage, fmt.locale, 1) : ""
2831
+ value: percentage !== null ? _chunkZB6OYIMBjs.formatFixed.call(void 0, percentage, fmt.locale, 1) : ""
2832
2832
  }) })
2833
2833
  ] }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-muted-foreground text-sm", children: t("billing.ui.usage.no_limit") }),
2834
2834
  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 +2861,14 @@ function UsageContainer() {
2861
2861
  const loadUsageData = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, async () => {
2862
2862
  setLoading(true);
2863
2863
  try {
2864
- const fetchedSubscriptions = await _chunkCMNJENSJjs.StripeSubscriptionService.listSubscriptions();
2864
+ const fetchedSubscriptions = await _chunkZB6OYIMBjs.StripeSubscriptionService.listSubscriptions();
2865
2865
  setSubscriptions(fetchedSubscriptions);
2866
2866
  const hasMeteredSubscriptions2 = fetchedSubscriptions.some((sub) => _optionalChain([sub, 'access', _102 => _102.price, 'optionalAccess', _103 => _103.recurring, 'optionalAccess', _104 => _104.usageType]) === "metered");
2867
2867
  if (!hasMeteredSubscriptions2) {
2868
2868
  setLoading(false);
2869
2869
  return;
2870
2870
  }
2871
- const fetchedMeters = await _chunkCMNJENSJjs.StripeUsageService.listMeters();
2871
+ const fetchedMeters = await _chunkZB6OYIMBjs.StripeUsageService.listMeters();
2872
2872
  setMeters(fetchedMeters);
2873
2873
  const summariesMap = {};
2874
2874
  const now = /* @__PURE__ */ new Date();
@@ -2876,7 +2876,7 @@ function UsageContainer() {
2876
2876
  const endOfMonth = new Date(now.getFullYear(), now.getMonth() + 1, 0, 23, 59, 59, 999);
2877
2877
  for (const meter of fetchedMeters) {
2878
2878
  try {
2879
- const meterSummaries = await _chunkCMNJENSJjs.StripeUsageService.getMeterSummaries({
2879
+ const meterSummaries = await _chunkZB6OYIMBjs.StripeUsageService.getMeterSummaries({
2880
2880
  meterId: meter.id,
2881
2881
  startTime: startOfMonth,
2882
2882
  endTime: endOfMonth
@@ -2925,7 +2925,7 @@ function formatDateTime(date, { locale, t }) {
2925
2925
  if (!date) return t("billing.ui.not_available");
2926
2926
  const dateObj = typeof date === "string" ? new Date(date) : date;
2927
2927
  try {
2928
- return new Intl.DateTimeFormat(_chunkCMNJENSJjs.dateFormatLocale.call(void 0, locale), {
2928
+ return new Intl.DateTimeFormat(_chunkZB6OYIMBjs.dateFormatLocale.call(void 0, locale), {
2929
2929
  month: "short",
2930
2930
  day: "numeric",
2931
2931
  year: "numeric",
@@ -2939,27 +2939,27 @@ function formatDateTime(date, { locale, t }) {
2939
2939
  _chunk7QVYU63Ejs.__name.call(void 0, formatDateTime, "formatDateTime");
2940
2940
  function UsageHistoryTable({ usageRecords }) {
2941
2941
  const t = _nextintl.useTranslations.call(void 0, );
2942
- const fmt = _chunk6IQCMCIAjs.useBillingFormatOptions.call(void 0, );
2942
+ const fmt = _chunkEGTC75OWjs.useBillingFormatOptions.call(void 0, );
2943
2943
  if (usageRecords.length === 0) {
2944
2944
  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
2945
  }
2946
2946
  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, _chunk6IQCMCIAjs.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, _chunk6IQCMCIAjs.Table, { children: [
2949
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6IQCMCIAjs.TableHeader, { className: "bg-muted", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk6IQCMCIAjs.TableRow, { children: [
2950
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6IQCMCIAjs.TableHead, { children: t("billing.ui.columns.date_time") }),
2951
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6IQCMCIAjs.TableHead, { children: t("billing.ui.columns.meter_event") }),
2952
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6IQCMCIAjs.TableHead, { className: "text-end", children: t("billing.ui.columns.quantity") }),
2953
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6IQCMCIAjs.TableHead, { children: t("billing.ui.columns.event_id") })
2947
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEGTC75OWjs.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, _chunkEGTC75OWjs.Table, { children: [
2949
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEGTC75OWjs.TableHeader, { className: "bg-muted", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkEGTC75OWjs.TableRow, { children: [
2950
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEGTC75OWjs.TableHead, { children: t("billing.ui.columns.date_time") }),
2951
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEGTC75OWjs.TableHead, { children: t("billing.ui.columns.meter_event") }),
2952
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEGTC75OWjs.TableHead, { className: "text-end", children: t("billing.ui.columns.quantity") }),
2953
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEGTC75OWjs.TableHead, { children: t("billing.ui.columns.event_id") })
2954
2954
  ] }) }),
2955
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6IQCMCIAjs.TableBody, { children: usageRecords.map((record) => {
2955
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEGTC75OWjs.TableBody, { children: usageRecords.map((record) => {
2956
2956
  const dateTime = formatDateTime(record.timestamp, fmt);
2957
2957
  const quantity = record.quantity.toLocaleString(fmt.locale);
2958
- return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk6IQCMCIAjs.TableRow, { children: [
2959
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6IQCMCIAjs.TableCell, { className: "font-medium", children: dateTime }),
2960
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6IQCMCIAjs.TableCell, { className: "text-muted-foreground", children: record.meterEventName }),
2961
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6IQCMCIAjs.TableCell, { className: "text-end font-medium", children: quantity }),
2962
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6IQCMCIAjs.TableCell, { className: "text-muted-foreground text-sm tabular-nums", children: record.stripeEventId })
2958
+ return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkEGTC75OWjs.TableRow, { children: [
2959
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEGTC75OWjs.TableCell, { className: "font-medium", children: dateTime }),
2960
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEGTC75OWjs.TableCell, { className: "text-muted-foreground", children: record.meterEventName }),
2961
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEGTC75OWjs.TableCell, { className: "text-end font-medium", children: quantity }),
2962
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEGTC75OWjs.TableCell, { className: "text-muted-foreground text-sm tabular-nums", children: record.stripeEventId })
2963
2963
  ] }, record.id);
2964
2964
  }) })
2965
2965
  ] }) })
@@ -2970,8 +2970,8 @@ _chunk7QVYU63Ejs.__name.call(void 0, UsageHistoryTable, "UsageHistoryTable");
2970
2970
  // src/features/billing/components/modals/BillingDetailModal.tsx
2971
2971
 
2972
2972
  function BillingDetailModal({ open, onOpenChange, title, children, className }) {
2973
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6IQCMCIAjs.Dialog, { open, onOpenChange, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk6IQCMCIAjs.DialogContent, { className: _nullishCoalesce(className, () => ( "max-w-4xl max-h-[90vh] overflow-y-auto")), children: [
2974
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6IQCMCIAjs.DialogHeader, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6IQCMCIAjs.DialogTitle, { children: title }) }),
2973
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEGTC75OWjs.Dialog, { open, onOpenChange, children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkEGTC75OWjs.DialogContent, { className: _nullishCoalesce(className, () => ( "max-w-4xl max-h-[90vh] overflow-y-auto")), children: [
2974
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEGTC75OWjs.DialogHeader, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEGTC75OWjs.DialogTitle, { children: title }) }),
2975
2975
  children
2976
2976
  ] }) });
2977
2977
  }
@@ -2999,7 +2999,7 @@ function BillingAlertBanner({ subscription, onUpdatePayment, onAddPayment }) {
2999
2999
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h3", { className: "text-destructive text-sm font-medium", children: t("billing.ui.alert.payment_failed_title") }),
3000
3000
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-destructive mt-1 text-sm", children: t("billing.ui.alert.payment_failed_description") })
3001
3001
  ] }),
3002
- onUpdatePayment && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6IQCMCIAjs.Button, { variant: "outline", size: "sm", onClick: onUpdatePayment, className: "text-destructive border-red-300", children: t("billing.ui.alert.update_payment_method") })
3002
+ onUpdatePayment && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEGTC75OWjs.Button, { variant: "outline", size: "sm", onClick: onUpdatePayment, className: "text-destructive border-red-300", children: t("billing.ui.alert.update_payment_method") })
3003
3003
  ] });
3004
3004
  }
3005
3005
  if (subscription.status === "trialing" /* TRIALING */ && subscription.trialEnd) {
@@ -3013,7 +3013,7 @@ function BillingAlertBanner({ subscription, onUpdatePayment, onAddPayment }) {
3013
3013
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h3", { className: "text-warning text-sm font-medium", children: t("billing.ui.alert.trial_ending_title") }),
3014
3014
  /* @__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
3015
  ] }),
3016
- onAddPayment && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6IQCMCIAjs.Button, { variant: "outline", size: "sm", onClick: onAddPayment, className: "text-warning border-yellow-300", children: t("billing.ui.payment_methods.add") })
3016
+ onAddPayment && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEGTC75OWjs.Button, { variant: "outline", size: "sm", onClick: onAddPayment, className: "text-warning border-yellow-300", children: t("billing.ui.payment_methods.add") })
3017
3017
  ] });
3018
3018
  }
3019
3019
  }
@@ -3066,7 +3066,7 @@ function BillingDashboardContainer({ renderCancelDialog } = {}) {
3066
3066
  setNoCustomerExists(false);
3067
3067
  let customer = null;
3068
3068
  try {
3069
- customer = await _chunkCMNJENSJjs.StripeCustomerService.getCustomer();
3069
+ customer = await _chunkZB6OYIMBjs.StripeCustomerService.getCustomer();
3070
3070
  setData((prev) => ({ ...prev, customer }));
3071
3071
  setErrors((prev) => ({ ...prev, customer: null }));
3072
3072
  setNoCustomerExists(false);
@@ -3092,7 +3092,7 @@ function BillingDashboardContainer({ renderCancelDialog } = {}) {
3092
3092
  }
3093
3093
  const fetchSubscriptions = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, async () => {
3094
3094
  try {
3095
- const subscriptions2 = await _chunkCMNJENSJjs.StripeSubscriptionService.listSubscriptions();
3095
+ const subscriptions2 = await _chunkZB6OYIMBjs.StripeSubscriptionService.listSubscriptions();
3096
3096
  setData((prev) => ({ ...prev, subscriptions: subscriptions2 }));
3097
3097
  setErrors((prev) => ({ ...prev, subscriptions: null }));
3098
3098
  return subscriptions2;
@@ -3106,7 +3106,7 @@ function BillingDashboardContainer({ renderCancelDialog } = {}) {
3106
3106
  }, "fetchSubscriptions");
3107
3107
  const fetchPaymentMethods = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, async () => {
3108
3108
  try {
3109
- const paymentMethods = await _chunkCMNJENSJjs.StripeCustomerService.listPaymentMethods();
3109
+ const paymentMethods = await _chunkZB6OYIMBjs.StripeCustomerService.listPaymentMethods();
3110
3110
  setData((prev) => ({ ...prev, paymentMethods }));
3111
3111
  setErrors((prev) => ({ ...prev, paymentMethods: null }));
3112
3112
  } catch (error) {
@@ -3118,7 +3118,7 @@ function BillingDashboardContainer({ renderCancelDialog } = {}) {
3118
3118
  }, "fetchPaymentMethods");
3119
3119
  const fetchInvoices = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, async () => {
3120
3120
  try {
3121
- const invoices = await _chunkCMNJENSJjs.StripeInvoiceService.listInvoices();
3121
+ const invoices = await _chunkZB6OYIMBjs.StripeInvoiceService.listInvoices();
3122
3122
  setData((prev) => ({ ...prev, invoices }));
3123
3123
  setErrors((prev) => ({ ...prev, invoices: null }));
3124
3124
  } catch (error) {
@@ -3141,7 +3141,7 @@ function BillingDashboardContainer({ renderCancelDialog } = {}) {
3141
3141
  const handleCreateCustomer = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, async () => {
3142
3142
  setCreatingCustomer(true);
3143
3143
  try {
3144
- await _chunkCMNJENSJjs.StripeCustomerService.createCustomer();
3144
+ await _chunkZB6OYIMBjs.StripeCustomerService.createCustomer();
3145
3145
  setNoCustomerExists(false);
3146
3146
  await fetchAllData();
3147
3147
  } catch (error) {
@@ -3153,7 +3153,7 @@ function BillingDashboardContainer({ renderCancelDialog } = {}) {
3153
3153
  }, "handleCreateCustomer");
3154
3154
  const fetchUsageData = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, async () => {
3155
3155
  try {
3156
- const meters = await _chunkCMNJENSJjs.StripeUsageService.listMeters();
3156
+ const meters = await _chunkZB6OYIMBjs.StripeUsageService.listMeters();
3157
3157
  setData((prev) => ({ ...prev, meters }));
3158
3158
  const summariesMap = {};
3159
3159
  const now = /* @__PURE__ */ new Date();
@@ -3161,7 +3161,7 @@ function BillingDashboardContainer({ renderCancelDialog } = {}) {
3161
3161
  const endOfMonth = new Date(now.getFullYear(), now.getMonth() + 1, 0, 23, 59, 59, 999);
3162
3162
  for (const meter of meters) {
3163
3163
  try {
3164
- const meterSummaries = await _chunkCMNJENSJjs.StripeUsageService.getMeterSummaries({
3164
+ const meterSummaries = await _chunkZB6OYIMBjs.StripeUsageService.getMeterSummaries({
3165
3165
  meterId: meter.id,
3166
3166
  startTime: startOfMonth,
3167
3167
  endTime: endOfMonth
@@ -3223,7 +3223,7 @@ function BillingDashboardContainer({ renderCancelDialog } = {}) {
3223
3223
  _react.useEffect.call(void 0, () => {
3224
3224
  if (!pendingChangePlan || loading.subscriptions) return;
3225
3225
  setPendingChangePlan(false);
3226
- handleOpenWizard(_chunkCMNJENSJjs.resolveChangePlanTarget.call(void 0, data.subscriptions));
3226
+ handleOpenWizard(_chunkZB6OYIMBjs.resolveChangePlanTarget.call(void 0, data.subscriptions));
3227
3227
  }, [pendingChangePlan, loading.subscriptions, data.subscriptions, handleOpenWizard]);
3228
3228
  const criticalSubscriptions = data.subscriptions.filter(
3229
3229
  (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 +3254,18 @@ function BillingDashboardContainer({ renderCancelDialog } = {}) {
3254
3254
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.Wallet, { className: "h-8 w-8" }),
3255
3255
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "h1", { className: "text-primary text-3xl font-semibold", children: t("billing.title") })
3256
3256
  ] }),
3257
- isInitialLoading && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6IQCMCIAjs.Card, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6IQCMCIAjs.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, _chunk6IQCMCIAjs.Card, { children: [
3259
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk6IQCMCIAjs.CardHeader, { className: "text-center", children: [
3257
+ isInitialLoading && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEGTC75OWjs.Card, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEGTC75OWjs.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, _chunkEGTC75OWjs.Card, { children: [
3259
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkEGTC75OWjs.CardHeader, { className: "text-center", children: [
3260
3260
  /* @__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, _chunk6IQCMCIAjs.CardTitle, { children: t("billing.ui.dashboard.setup_title") }),
3262
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6IQCMCIAjs.CardDescription, { children: t("billing.ui.dashboard.setup_description") })
3261
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEGTC75OWjs.CardTitle, { children: t("billing.ui.dashboard.setup_title") }),
3262
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEGTC75OWjs.CardDescription, { children: t("billing.ui.dashboard.setup_description") })
3263
3263
  ] }),
3264
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6IQCMCIAjs.CardContent, { className: "flex justify-center pb-8", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6IQCMCIAjs.Button, { onClick: handleCreateCustomer, disabled: creatingCustomer, size: "lg", children: creatingCustomer ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
3264
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEGTC75OWjs.CardContent, { className: "flex justify-center pb-8", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEGTC75OWjs.Button, { onClick: handleCreateCustomer, disabled: creatingCustomer, size: "lg", children: creatingCustomer ? /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
3265
3265
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.Loader2, { className: "me-2 h-4 w-4 animate-spin" }),
3266
3266
  t("billing.ui.dashboard.setting_up")
3267
3267
  ] }) : t("billing.ui.dashboard.setup_button") }) }),
3268
- errors.customer && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6IQCMCIAjs.CardContent, { className: "pt-0", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-center text-destructive text-xs/relaxed", children: t(errors.customer) }) })
3268
+ errors.customer && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEGTC75OWjs.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
3269
  ] }),
3270
3270
  !noCustomerExists && !isInitialLoading && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
3271
3271
  criticalSubscriptions.map((subscription) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
@@ -3410,7 +3410,7 @@ function getStripePromise(publishableKey) {
3410
3410
  }
3411
3411
  _chunk7QVYU63Ejs.__name.call(void 0, getStripePromise, "getStripePromise");
3412
3412
  function StripeProvider({ children }) {
3413
- const publishableKey = _chunk2CR7HWVSjs.getStripePublishableKey.call(void 0, );
3413
+ const publishableKey = _chunkBD6ARGGIjs.getStripePublishableKey.call(void 0, );
3414
3414
  const stripePromise = _react.useMemo.call(void 0, () => getStripePromise(publishableKey), [publishableKey]);
3415
3415
  const options = _react.useMemo.call(void 0, () => ({}), []);
3416
3416
  if (!publishableKey) {
@@ -3420,7 +3420,7 @@ function StripeProvider({ children }) {
3420
3420
  }
3421
3421
  _chunk7QVYU63Ejs.__name.call(void 0, StripeProvider, "StripeProvider");
3422
3422
  function isStripeConfigured() {
3423
- return !!_chunk2CR7HWVSjs.getStripePublishableKey.call(void 0, );
3423
+ return !!_chunkBD6ARGGIjs.getStripePublishableKey.call(void 0, );
3424
3424
  }
3425
3425
  _chunk7QVYU63Ejs.__name.call(void 0, isStripeConfigured, "isStripeConfigured");
3426
3426
 
@@ -3435,18 +3435,18 @@ _chunk7QVYU63Ejs.__name.call(void 0, isStripeConfigured, "isStripeConfigured");
3435
3435
 
3436
3436
  function PriceArchiver({ price }) {
3437
3437
  const t = _nextintl.useTranslations.call(void 0, );
3438
- const fmt = _chunk6IQCMCIAjs.useBillingFormatOptions.call(void 0, );
3438
+ const fmt = _chunkEGTC75OWjs.useBillingFormatOptions.call(void 0, );
3439
3439
  const { archivePrice, restorePrice } = usePriceContext();
3440
3440
  const [open, setOpen] = _react.useState.call(void 0, false);
3441
3441
  const isArchived = !price.active;
3442
3442
  const scope = isArchived ? "restore" : "archive";
3443
3443
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
3444
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk6IQCMCIAjs.Button, { variant: "outline", size: "sm", onClick: () => setOpen(true), children: [
3444
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkEGTC75OWjs.Button, { variant: "outline", size: "sm", onClick: () => setOpen(true), children: [
3445
3445
  isArchived ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.RotateCcwIcon, {}) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.ArchiveIcon, {}),
3446
3446
  t(`billing.admin.prices.${scope}.confirm`)
3447
3447
  ] }),
3448
3448
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
3449
- _chunk6IQCMCIAjs.ConfirmDialog,
3449
+ _chunkEGTC75OWjs.ConfirmDialog,
3450
3450
  {
3451
3451
  open,
3452
3452
  onOpenChange: setOpen,
@@ -3460,7 +3460,7 @@ function PriceArchiver({ price }) {
3460
3460
  if (isArchived) await restorePrice(price.id);
3461
3461
  else await archivePrice(price.id);
3462
3462
  } catch (error) {
3463
- _chunk6IQCMCIAjs.errorToast.call(void 0, { title: t(`billing.admin.prices.${scope}.title`), error });
3463
+ _chunkEGTC75OWjs.errorToast.call(void 0, { title: t(`billing.admin.prices.${scope}.title`), error });
3464
3464
  throw error;
3465
3465
  }
3466
3466
  }
@@ -3492,7 +3492,7 @@ function PriceEditorInternal({
3492
3492
  onDialogOpenChange
3493
3493
  }) {
3494
3494
  const t = _nextintl.useTranslations.call(void 0, );
3495
- const fmt = _chunk6IQCMCIAjs.useBillingFormatOptions.call(void 0, );
3495
+ const fmt = _chunkEGTC75OWjs.useBillingFormatOptions.call(void 0, );
3496
3496
  const router = _chunkYWLSIIE6js.useI18nRouter.call(void 0, );
3497
3497
  const { createPrice, updatePrice, productId: contextProductId } = usePriceContext();
3498
3498
  const [allFeatures, setAllFeatures] = _react.useState.call(void 0, []);
@@ -3500,7 +3500,7 @@ function PriceEditorInternal({
3500
3500
  const targetProductId = _nullishCoalesce(_nullishCoalesce(productId, () => ( _optionalChain([price, 'optionalAccess', _120 => _120.product, 'optionalAccess', _121 => _121.id]))), () => ( contextProductId));
3501
3501
  _react.useEffect.call(void 0, () => {
3502
3502
  const fetchFeatures = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, async () => {
3503
- setAllFeatures(await _chunkCMNJENSJjs.FeatureService.findMany({}));
3503
+ setAllFeatures(await _chunkZB6OYIMBjs.FeatureService.findMany({}));
3504
3504
  }, "fetchFeatures");
3505
3505
  void fetchFeatures();
3506
3506
  }, []);
@@ -3613,7 +3613,7 @@ function PriceEditorInternal({
3613
3613
  warnedUnknownFor.current = fingerprint;
3614
3614
  const { unknown } = resolvePlatformFeatures(seed.platformFeatures);
3615
3615
  if (unknown.length > 0)
3616
- _chunkCMNJENSJjs.showToast.call(void 0, t("billing.admin.prices.import.warnings.unknownFeatures", { features: unknown.join(", ") }));
3616
+ _chunkZB6OYIMBjs.showToast.call(void 0, t("billing.admin.prices.import.warnings.unknownFeatures", { features: unknown.join(", ") }));
3617
3617
  }, [seed, isEdit, allFeatures, resolvePlatformFeatures, t]);
3618
3618
  const watchInterval = form.watch("interval");
3619
3619
  const isRecurring = watchInterval !== "one_time";
@@ -3634,7 +3634,7 @@ function PriceEditorInternal({
3634
3634
  { id: "metered", text: t("billing.admin.prices.usage.metered") }
3635
3635
  ];
3636
3636
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
3637
- _chunk6IQCMCIAjs.EditorSheet,
3637
+ _chunkEGTC75OWjs.EditorSheet,
3638
3638
  {
3639
3639
  form,
3640
3640
  entityType: t("billing.admin.prices.entity"),
@@ -3689,13 +3689,13 @@ function PriceEditorInternal({
3689
3689
  dialogOpen,
3690
3690
  onDialogOpenChange,
3691
3691
  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, _chunk6IQCMCIAjs.Alert, { children: [
3693
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6IQCMCIAjs.AlertTitle, { children: t("billing.admin.prices.immutability.title") }),
3694
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6IQCMCIAjs.AlertDescription, { children: t("billing.admin.prices.immutability.description") })
3692
+ isEdit && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkEGTC75OWjs.Alert, { children: [
3693
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEGTC75OWjs.AlertTitle, { children: t("billing.admin.prices.immutability.title") }),
3694
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEGTC75OWjs.AlertDescription, { children: t("billing.admin.prices.immutability.description") })
3695
3695
  ] }),
3696
3696
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "grid grid-cols-2 gap-x-4", children: [
3697
3697
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
3698
- _chunk6IQCMCIAjs.FormInput,
3698
+ _chunkEGTC75OWjs.FormInput,
3699
3699
  {
3700
3700
  form,
3701
3701
  id: "unitAmount",
@@ -3707,7 +3707,7 @@ function PriceEditorInternal({
3707
3707
  }
3708
3708
  ),
3709
3709
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
3710
- _chunk6IQCMCIAjs.FormSelect,
3710
+ _chunkEGTC75OWjs.FormSelect,
3711
3711
  {
3712
3712
  form,
3713
3713
  id: "currency",
@@ -3718,7 +3718,7 @@ function PriceEditorInternal({
3718
3718
  )
3719
3719
  ] }),
3720
3720
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
3721
- _chunk6IQCMCIAjs.FormSelect,
3721
+ _chunkEGTC75OWjs.FormSelect,
3722
3722
  {
3723
3723
  form,
3724
3724
  id: "interval",
@@ -3729,7 +3729,7 @@ function PriceEditorInternal({
3729
3729
  ),
3730
3730
  isRecurring && /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "grid grid-cols-2 gap-x-4", children: [
3731
3731
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
3732
- _chunk6IQCMCIAjs.FormInput,
3732
+ _chunkEGTC75OWjs.FormInput,
3733
3733
  {
3734
3734
  form,
3735
3735
  id: "intervalCount",
@@ -3740,7 +3740,7 @@ function PriceEditorInternal({
3740
3740
  }
3741
3741
  ),
3742
3742
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
3743
- _chunk6IQCMCIAjs.FormSelect,
3743
+ _chunkEGTC75OWjs.FormSelect,
3744
3744
  {
3745
3745
  form,
3746
3746
  id: "usageType",
@@ -3751,7 +3751,7 @@ function PriceEditorInternal({
3751
3751
  )
3752
3752
  ] }),
3753
3753
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
3754
- _chunk6IQCMCIAjs.FormInput,
3754
+ _chunkEGTC75OWjs.FormInput,
3755
3755
  {
3756
3756
  form,
3757
3757
  id: "nickname",
@@ -3760,7 +3760,7 @@ function PriceEditorInternal({
3760
3760
  }
3761
3761
  ),
3762
3762
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
3763
- _chunk6IQCMCIAjs.FormTextarea,
3763
+ _chunkEGTC75OWjs.FormTextarea,
3764
3764
  {
3765
3765
  form,
3766
3766
  id: "description",
@@ -3770,7 +3770,7 @@ function PriceEditorInternal({
3770
3770
  }
3771
3771
  ),
3772
3772
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
3773
- _chunk6IQCMCIAjs.FormInput,
3773
+ _chunkEGTC75OWjs.FormInput,
3774
3774
  {
3775
3775
  form,
3776
3776
  id: "token",
@@ -3780,10 +3780,10 @@ function PriceEditorInternal({
3780
3780
  }
3781
3781
  ),
3782
3782
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex flex-col gap-y-2", children: [
3783
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6IQCMCIAjs.FieldLabel, { children: t("billing.admin.prices.fields.features") }),
3783
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEGTC75OWjs.FieldLabel, { children: t("billing.admin.prices.fields.features") }),
3784
3784
  form.watch("features").map((_, index) => /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex gap-2", children: [
3785
3785
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
3786
- _chunk6IQCMCIAjs.Input,
3786
+ _chunkEGTC75OWjs.Input,
3787
3787
  {
3788
3788
  ...form.register(`features.${index}`),
3789
3789
  placeholder: t("billing.admin.prices.placeholders.feature", { index: index + 1 }),
@@ -3791,7 +3791,7 @@ function PriceEditorInternal({
3791
3791
  }
3792
3792
  ),
3793
3793
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
3794
- _chunk6IQCMCIAjs.Button,
3794
+ _chunkEGTC75OWjs.Button,
3795
3795
  {
3796
3796
  type: "button",
3797
3797
  variant: "outline",
@@ -3806,7 +3806,7 @@ function PriceEditorInternal({
3806
3806
  )
3807
3807
  ] }, index)),
3808
3808
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
3809
- _chunk6IQCMCIAjs.Button,
3809
+ _chunkEGTC75OWjs.Button,
3810
3810
  {
3811
3811
  type: "button",
3812
3812
  variant: "outline",
@@ -3821,12 +3821,12 @@ function PriceEditorInternal({
3821
3821
  )
3822
3822
  ] }),
3823
3823
  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, _chunk6IQCMCIAjs.FieldLabel, { children: t("billing.admin.prices.fields.platformFeatures") }),
3824
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEGTC75OWjs.FieldLabel, { children: t("billing.admin.prices.fields.platformFeatures") }),
3825
3825
  /* @__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
3826
  const isChecked = form.watch("featureIds").includes(feature.id);
3827
3827
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex items-center gap-x-2", children: [
3828
3828
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
3829
- _chunk6IQCMCIAjs.Checkbox,
3829
+ _chunkEGTC75OWjs.Checkbox,
3830
3830
  {
3831
3831
  id: `feature-${feature.id}`,
3832
3832
  checked: isChecked,
@@ -3842,13 +3842,13 @@ function PriceEditorInternal({
3842
3842
  }
3843
3843
  }
3844
3844
  ),
3845
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6IQCMCIAjs.FieldLabel, { htmlFor: `feature-${feature.id}`, children: feature.name }),
3845
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEGTC75OWjs.FieldLabel, { htmlFor: `feature-${feature.id}`, children: feature.name }),
3846
3846
  feature.isCore && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "text-muted-foreground text-xs", children: t("billing.admin.prices.help.core") })
3847
3847
  ] }, feature.id);
3848
3848
  }) })
3849
3849
  ] }),
3850
3850
  isRecurring && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
3851
- _chunk6IQCMCIAjs.FormCheckbox,
3851
+ _chunkEGTC75OWjs.FormCheckbox,
3852
3852
  {
3853
3853
  form,
3854
3854
  id: "isTrial",
@@ -3891,7 +3891,7 @@ var defaultContextValue = {
3891
3891
  productId: void 0
3892
3892
  };
3893
3893
  function priceLabel(price, fmt = {}) {
3894
- return _nullishCoalesce(price.nickname, () => ( `${_chunkCMNJENSJjs.formatCurrency.call(void 0, price.unitAmount, price.currency, fmt)} ${_chunkCMNJENSJjs.formatInterval.call(void 0, price, fmt)}`.trim()));
3894
+ return _nullishCoalesce(price.nickname, () => ( `${_chunkZB6OYIMBjs.formatCurrency.call(void 0, price.unitAmount, price.currency, fmt)} ${_chunkZB6OYIMBjs.formatInterval.call(void 0, price, fmt)}`.trim()));
3895
3895
  }
3896
3896
  _chunk7QVYU63Ejs.__name.call(void 0, priceLabel, "priceLabel");
3897
3897
  var PriceProvider = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, ({
@@ -3901,22 +3901,22 @@ var PriceProvider = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, ({
3901
3901
  productId: productIdProp
3902
3902
  }) => {
3903
3903
  const t = _nextintl.useTranslations.call(void 0, );
3904
- const fmt = _chunk6IQCMCIAjs.useBillingFormatOptions.call(void 0, );
3905
- const generateUrl = _chunk6IQCMCIAjs.usePageUrlGenerator.call(void 0, );
3906
- const { hasRole } = _chunk6IQCMCIAjs.useCurrentUserContext.call(void 0, );
3904
+ const fmt = _chunkEGTC75OWjs.useBillingFormatOptions.call(void 0, );
3905
+ const generateUrl = _chunkEGTC75OWjs.usePageUrlGenerator.call(void 0, );
3906
+ const { hasRole } = _chunkEGTC75OWjs.useCurrentUserContext.call(void 0, );
3907
3907
  const [price, setPrice] = _react.useState.call(void 0,
3908
- dehydratedPrice ? _chunkCMNJENSJjs.rehydrate.call(void 0, _chunkYWLSIIE6js.Modules.StripePrice, dehydratedPrice) : void 0
3908
+ dehydratedPrice ? _chunkZB6OYIMBjs.rehydrate.call(void 0, _chunkYWLSIIE6js.Modules.StripePrice, dehydratedPrice) : void 0
3909
3909
  );
3910
3910
  const [priceVersion, setPriceVersion] = _react.useState.call(void 0, 0);
3911
3911
  const refreshPrices = _react.useCallback.call(void 0, () => setPriceVersion((value2) => value2 + 1), []);
3912
3912
  const productId = _nullishCoalesce(productIdProp, () => ( _optionalChain([price, 'optionalAccess', _144 => _144.product, 'optionalAccess', _145 => _145.id])));
3913
3913
  const reloadPrice = _react.useCallback.call(void 0, async () => {
3914
3914
  if (!_optionalChain([price, 'optionalAccess', _146 => _146.id])) return;
3915
- setPrice(await _chunkCMNJENSJjs.StripePriceService.getPrice({ id: price.id }));
3915
+ setPrice(await _chunkZB6OYIMBjs.StripePriceService.getPrice({ id: price.id }));
3916
3916
  }, [_optionalChain([price, 'optionalAccess', _147 => _147.id])]);
3917
3917
  const createPrice = _react.useCallback.call(void 0,
3918
3918
  async (input) => {
3919
- const saved = await _chunkCMNJENSJjs.StripePriceService.createPrice(input);
3919
+ const saved = await _chunkZB6OYIMBjs.StripePriceService.createPrice(input);
3920
3920
  refreshPrices();
3921
3921
  return saved;
3922
3922
  },
@@ -3924,7 +3924,7 @@ var PriceProvider = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, ({
3924
3924
  );
3925
3925
  const updatePrice = _react.useCallback.call(void 0,
3926
3926
  async (input) => {
3927
- const saved = await _chunkCMNJENSJjs.StripePriceService.updatePrice(input);
3927
+ const saved = await _chunkZB6OYIMBjs.StripePriceService.updatePrice(input);
3928
3928
  setPrice(saved);
3929
3929
  refreshPrices();
3930
3930
  return saved;
@@ -3935,7 +3935,7 @@ var PriceProvider = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, ({
3935
3935
  async (id) => {
3936
3936
  const target = _nullishCoalesce(id, () => ( _optionalChain([price, 'optionalAccess', _148 => _148.id])));
3937
3937
  if (!target) return;
3938
- await _chunkCMNJENSJjs.StripePriceService.archivePrice({ id: target });
3938
+ await _chunkZB6OYIMBjs.StripePriceService.archivePrice({ id: target });
3939
3939
  await reloadPrice();
3940
3940
  refreshPrices();
3941
3941
  },
@@ -3945,7 +3945,7 @@ var PriceProvider = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, ({
3945
3945
  async (id) => {
3946
3946
  const target = _nullishCoalesce(id, () => ( _optionalChain([price, 'optionalAccess', _150 => _150.id])));
3947
3947
  if (!target) return;
3948
- await _chunkCMNJENSJjs.StripePriceService.reactivatePrice({ id: target });
3948
+ await _chunkZB6OYIMBjs.StripePriceService.reactivatePrice({ id: target });
3949
3949
  await reloadPrice();
3950
3950
  refreshPrices();
3951
3951
  },
@@ -3991,7 +3991,7 @@ var PriceProvider = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, ({
3991
3991
  }
3992
3992
  return response;
3993
3993
  }, "title");
3994
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6IQCMCIAjs.SharedProvider, { value: { breadcrumbs: breadcrumb(), title: title() }, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, PriceContext.Provider, { value, children }) });
3994
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEGTC75OWjs.SharedProvider, { value: { breadcrumbs: breadcrumb(), title: title() }, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, PriceContext.Provider, { value, children }) });
3995
3995
  }, "PriceProvider");
3996
3996
  var usePriceContext = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, () => _nullishCoalesce(_react.useContext.call(void 0, PriceContext), () => ( defaultContextValue)), "usePriceContext");
3997
3997
 
@@ -4011,12 +4011,12 @@ function ProductArchiver({ product }) {
4011
4011
  const isArchived = !product.active;
4012
4012
  const scope = isArchived ? "restore" : "archive";
4013
4013
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
4014
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk6IQCMCIAjs.Button, { variant: "outline", size: "sm", onClick: () => setOpen(true), children: [
4014
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkEGTC75OWjs.Button, { variant: "outline", size: "sm", onClick: () => setOpen(true), children: [
4015
4015
  isArchived ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.RotateCcwIcon, {}) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.ArchiveIcon, {}),
4016
4016
  t(`billing.admin.products.${scope}.confirm`)
4017
4017
  ] }),
4018
4018
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
4019
- _chunk6IQCMCIAjs.ConfirmDialog,
4019
+ _chunkEGTC75OWjs.ConfirmDialog,
4020
4020
  {
4021
4021
  open,
4022
4022
  onOpenChange: setOpen,
@@ -4030,7 +4030,7 @@ function ProductArchiver({ product }) {
4030
4030
  if (isArchived) await restoreProduct(product.id);
4031
4031
  else await archiveProduct(product.id);
4032
4032
  } catch (error) {
4033
- _chunk6IQCMCIAjs.errorToast.call(void 0, { title: t(`billing.admin.products.${scope}.title`), error });
4033
+ _chunkEGTC75OWjs.errorToast.call(void 0, { title: t(`billing.admin.products.${scope}.title`), error });
4034
4034
  throw error;
4035
4035
  }
4036
4036
  }
@@ -4083,7 +4083,7 @@ function ProductEditorInternal({
4083
4083
  defaultValues: getDefaultValues()
4084
4084
  });
4085
4085
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
4086
- _chunk6IQCMCIAjs.EditorSheet,
4086
+ _chunkEGTC75OWjs.EditorSheet,
4087
4087
  {
4088
4088
  form,
4089
4089
  entityType: t("billing.admin.products.entity"),
@@ -4106,7 +4106,7 @@ function ProductEditorInternal({
4106
4106
  onDialogOpenChange,
4107
4107
  children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex w-full flex-col gap-y-4", children: [
4108
4108
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
4109
- _chunk6IQCMCIAjs.FormInput,
4109
+ _chunkEGTC75OWjs.FormInput,
4110
4110
  {
4111
4111
  form,
4112
4112
  id: "name",
@@ -4116,7 +4116,7 @@ function ProductEditorInternal({
4116
4116
  }
4117
4117
  ),
4118
4118
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
4119
- _chunk6IQCMCIAjs.FormTextarea,
4119
+ _chunkEGTC75OWjs.FormTextarea,
4120
4120
  {
4121
4121
  form,
4122
4122
  id: "description",
@@ -4160,20 +4160,20 @@ var defaultContextValue2 = {
4160
4160
  };
4161
4161
  var ProductProvider = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, ({ children, dehydratedProduct, publishChrome = true }) => {
4162
4162
  const t = _nextintl.useTranslations.call(void 0, );
4163
- const generateUrl = _chunk6IQCMCIAjs.usePageUrlGenerator.call(void 0, );
4164
- const { hasRole } = _chunk6IQCMCIAjs.useCurrentUserContext.call(void 0, );
4163
+ const generateUrl = _chunkEGTC75OWjs.usePageUrlGenerator.call(void 0, );
4164
+ const { hasRole } = _chunkEGTC75OWjs.useCurrentUserContext.call(void 0, );
4165
4165
  const [product, setProduct] = _react.useState.call(void 0,
4166
- dehydratedProduct ? _chunkCMNJENSJjs.rehydrate.call(void 0, _chunkYWLSIIE6js.Modules.StripeProduct, dehydratedProduct) : void 0
4166
+ dehydratedProduct ? _chunkZB6OYIMBjs.rehydrate.call(void 0, _chunkYWLSIIE6js.Modules.StripeProduct, dehydratedProduct) : void 0
4167
4167
  );
4168
4168
  const [catalogueVersion, setCatalogueVersion] = _react.useState.call(void 0, 0);
4169
4169
  const refreshCatalogue = _react.useCallback.call(void 0, () => setCatalogueVersion((value2) => value2 + 1), []);
4170
4170
  const reloadProduct = _react.useCallback.call(void 0, async () => {
4171
4171
  if (!_optionalChain([product, 'optionalAccess', _157 => _157.id])) return;
4172
- setProduct(await _chunkCMNJENSJjs.StripeProductService.getProduct({ id: product.id }));
4172
+ setProduct(await _chunkZB6OYIMBjs.StripeProductService.getProduct({ id: product.id }));
4173
4173
  }, [_optionalChain([product, 'optionalAccess', _158 => _158.id])]);
4174
4174
  const createProduct = _react.useCallback.call(void 0,
4175
4175
  async (input) => {
4176
- const saved = await _chunkCMNJENSJjs.StripeProductService.createProduct(input);
4176
+ const saved = await _chunkZB6OYIMBjs.StripeProductService.createProduct(input);
4177
4177
  refreshCatalogue();
4178
4178
  return saved;
4179
4179
  },
@@ -4181,7 +4181,7 @@ var ProductProvider = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, ({ ch
4181
4181
  );
4182
4182
  const updateProduct = _react.useCallback.call(void 0,
4183
4183
  async (input) => {
4184
- const saved = await _chunkCMNJENSJjs.StripeProductService.updateProduct(input);
4184
+ const saved = await _chunkZB6OYIMBjs.StripeProductService.updateProduct(input);
4185
4185
  setProduct(saved);
4186
4186
  refreshCatalogue();
4187
4187
  return saved;
@@ -4192,7 +4192,7 @@ var ProductProvider = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, ({ ch
4192
4192
  async (id) => {
4193
4193
  const target = _nullishCoalesce(id, () => ( _optionalChain([product, 'optionalAccess', _159 => _159.id])));
4194
4194
  if (!target) return;
4195
- await _chunkCMNJENSJjs.StripeProductService.archiveProduct({ id: target });
4195
+ await _chunkZB6OYIMBjs.StripeProductService.archiveProduct({ id: target });
4196
4196
  await reloadProduct();
4197
4197
  refreshCatalogue();
4198
4198
  },
@@ -4202,7 +4202,7 @@ var ProductProvider = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, ({ ch
4202
4202
  async (id) => {
4203
4203
  const target = _nullishCoalesce(id, () => ( _optionalChain([product, 'optionalAccess', _161 => _161.id])));
4204
4204
  if (!target) return;
4205
- await _chunkCMNJENSJjs.StripeProductService.reactivateProduct({ id: target });
4205
+ await _chunkZB6OYIMBjs.StripeProductService.reactivateProduct({ id: target });
4206
4206
  await reloadProduct();
4207
4207
  refreshCatalogue();
4208
4208
  },
@@ -4255,7 +4255,7 @@ var ProductProvider = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, ({ ch
4255
4255
  }
4256
4256
  return response;
4257
4257
  }, "title");
4258
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6IQCMCIAjs.SharedProvider, { value: { breadcrumbs: breadcrumb(), title: title() }, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, ProductContext.Provider, { value, children }) });
4258
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEGTC75OWjs.SharedProvider, { value: { breadcrumbs: breadcrumb(), title: title() }, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, ProductContext.Provider, { value, children }) });
4259
4259
  }, "ProductProvider");
4260
4260
  var useProductContext = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, () => _nullishCoalesce(_react.useContext.call(void 0, ProductContext), () => ( defaultContextValue2)), "useProductContext");
4261
4261
 
@@ -4264,57 +4264,57 @@ var useProductContext = /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, ()
4264
4264
 
4265
4265
  function PriceDetails() {
4266
4266
  const t = _nextintl.useTranslations.call(void 0, );
4267
- const fmt = _chunk6IQCMCIAjs.useBillingFormatOptions.call(void 0, );
4268
- const generateUrl = _chunk6IQCMCIAjs.usePageUrlGenerator.call(void 0, );
4267
+ const fmt = _chunkEGTC75OWjs.useBillingFormatOptions.call(void 0, );
4268
+ const generateUrl = _chunkEGTC75OWjs.usePageUrlGenerator.call(void 0, );
4269
4269
  const { price } = usePriceContext();
4270
4270
  if (!price) return null;
4271
4271
  const isRecurring = price.priceType === "recurring";
4272
4272
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex w-full flex-col gap-y-8", children: [
4273
4273
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex w-full flex-col gap-y-4", children: [
4274
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6IQCMCIAjs.SectionHeader, { children: t("billing.admin.prices.title") }),
4274
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEGTC75OWjs.SectionHeader, { children: t("billing.admin.prices.title") }),
4275
4275
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "grid grid-cols-1 gap-4 md:grid-cols-2", children: [
4276
4276
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
4277
- _chunk6IQCMCIAjs.DetailField,
4277
+ _chunkEGTC75OWjs.DetailField,
4278
4278
  {
4279
4279
  label: t("billing.admin.prices.fields.product"),
4280
- value: price.product ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6IQCMCIAjs.Link, { href: generateUrl({ page: _chunkYWLSIIE6js.Modules.StripeProduct, id: price.product.id }), children: price.product.name }) : "\u2014"
4280
+ value: price.product ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEGTC75OWjs.Link, { href: generateUrl({ page: _chunkYWLSIIE6js.Modules.StripeProduct, id: price.product.id }), children: price.product.name }) : "\u2014"
4281
4281
  }
4282
4282
  ),
4283
4283
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
4284
- _chunk6IQCMCIAjs.DetailField,
4284
+ _chunkEGTC75OWjs.DetailField,
4285
4285
  {
4286
4286
  label: t("billing.admin.prices.fields.status"),
4287
4287
  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, _chunk6IQCMCIAjs.Badge, { variant: "softGreen", children: t("billing.admin.prices.status.active") }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6IQCMCIAjs.Badge, { variant: "softGray", children: t("billing.admin.prices.status.archived") }),
4289
- price.isTrial && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6IQCMCIAjs.Badge, { variant: "softBlue", children: t("billing.admin.prices.badge.trial") })
4288
+ price.active ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEGTC75OWjs.Badge, { variant: "softGreen", children: t("billing.admin.prices.status.active") }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEGTC75OWjs.Badge, { variant: "softGray", children: t("billing.admin.prices.status.archived") }),
4289
+ price.isTrial && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEGTC75OWjs.Badge, { variant: "softBlue", children: t("billing.admin.prices.badge.trial") })
4290
4290
  ] })
4291
4291
  }
4292
4292
  ),
4293
4293
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
4294
- _chunk6IQCMCIAjs.DetailField,
4294
+ _chunkEGTC75OWjs.DetailField,
4295
4295
  {
4296
4296
  label: t("billing.admin.prices.fields.amount"),
4297
- value: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "tabular-nums", children: _chunkCMNJENSJjs.formatCurrency.call(void 0, price.unitAmount, price.currency, fmt) })
4297
+ value: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "tabular-nums", children: _chunkZB6OYIMBjs.formatCurrency.call(void 0, price.unitAmount, price.currency, fmt) })
4298
4298
  }
4299
4299
  ),
4300
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6IQCMCIAjs.DetailField, { label: t("billing.admin.prices.fields.currency"), value: price.currency.toUpperCase() }),
4300
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEGTC75OWjs.DetailField, { label: t("billing.admin.prices.fields.currency"), value: price.currency.toUpperCase() }),
4301
4301
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
4302
- _chunk6IQCMCIAjs.DetailField,
4302
+ _chunkEGTC75OWjs.DetailField,
4303
4303
  {
4304
4304
  label: t("billing.admin.prices.fields.type"),
4305
4305
  value: isRecurring ? t("billing.admin.prices.type.recurring") : t("billing.admin.prices.type.oneTime")
4306
4306
  }
4307
4307
  ),
4308
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6IQCMCIAjs.DetailField, { label: t("billing.admin.prices.fields.billing"), value: _chunkCMNJENSJjs.formatInterval.call(void 0, price, fmt) }),
4308
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEGTC75OWjs.DetailField, { label: t("billing.admin.prices.fields.billing"), value: _chunkZB6OYIMBjs.formatInterval.call(void 0, price, fmt) }),
4309
4309
  isRecurring && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
4310
- _chunk6IQCMCIAjs.DetailField,
4310
+ _chunkEGTC75OWjs.DetailField,
4311
4311
  {
4312
4312
  label: t("billing.admin.prices.fields.intervalCount"),
4313
4313
  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
4314
  }
4315
4315
  ),
4316
4316
  isRecurring && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
4317
- _chunk6IQCMCIAjs.DetailField,
4317
+ _chunkEGTC75OWjs.DetailField,
4318
4318
  {
4319
4319
  label: t("billing.admin.prices.fields.usageType"),
4320
4320
  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 +4323,24 @@ function PriceDetails() {
4323
4323
  ] })
4324
4324
  ] }),
4325
4325
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "flex w-full flex-col gap-y-4", children: [
4326
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6IQCMCIAjs.SectionHeader, { children: t("billing.admin.prices.fields.platformFeatures") }),
4326
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEGTC75OWjs.SectionHeader, { children: t("billing.admin.prices.fields.platformFeatures") }),
4327
4327
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "grid grid-cols-1 gap-4 md:grid-cols-2", children: [
4328
4328
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
4329
- _chunk6IQCMCIAjs.DetailField,
4329
+ _chunkEGTC75OWjs.DetailField,
4330
4330
  {
4331
4331
  label: t("billing.admin.prices.fields.token"),
4332
4332
  value: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "tabular-nums", children: _nullishCoalesce(price.token, () => ( "\u2014")) })
4333
4333
  }
4334
4334
  ),
4335
4335
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
4336
- _chunk6IQCMCIAjs.DetailField,
4336
+ _chunkEGTC75OWjs.DetailField,
4337
4337
  {
4338
4338
  label: t("billing.admin.prices.fields.stripeId"),
4339
4339
  value: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "tabular-nums", children: price.stripePriceId })
4340
4340
  }
4341
4341
  ),
4342
4342
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
4343
- _chunk6IQCMCIAjs.DetailField,
4343
+ _chunkEGTC75OWjs.DetailField,
4344
4344
  {
4345
4345
  label: t("billing.admin.prices.fields.description"),
4346
4346
  value: _nullishCoalesce(price.description, () => ( "\u2014")),
@@ -4348,7 +4348,7 @@ function PriceDetails() {
4348
4348
  }
4349
4349
  ),
4350
4350
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
4351
- _chunk6IQCMCIAjs.DetailField,
4351
+ _chunkEGTC75OWjs.DetailField,
4352
4352
  {
4353
4353
  label: t("billing.admin.prices.fields.features"),
4354
4354
  className: "md:col-span-2",
@@ -4356,11 +4356,11 @@ function PriceDetails() {
4356
4356
  }
4357
4357
  ),
4358
4358
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
4359
- _chunk6IQCMCIAjs.DetailField,
4359
+ _chunkEGTC75OWjs.DetailField,
4360
4360
  {
4361
4361
  label: t("billing.admin.prices.fields.platformFeatures"),
4362
4362
  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, _chunk6IQCMCIAjs.Badge, { variant: "softGray", children: feature.name }, feature.id)) }) : "\u2014"
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, _chunkEGTC75OWjs.Badge, { variant: "softGray", children: feature.name }, feature.id)) }) : "\u2014"
4364
4364
  }
4365
4365
  )
4366
4366
  ] })
@@ -4374,7 +4374,7 @@ _chunk7QVYU63Ejs.__name.call(void 0, PriceDetails, "PriceDetails");
4374
4374
  function PriceContainer() {
4375
4375
  const { price } = usePriceContext();
4376
4376
  if (!price) return null;
4377
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6IQCMCIAjs.RoundPageContainer, { module: _chunkYWLSIIE6js.Modules.StripePrice, id: price.id, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, PriceDetails, {}) });
4377
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEGTC75OWjs.RoundPageContainer, { module: _chunkYWLSIIE6js.Modules.StripePrice, id: price.id, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, PriceDetails, {}) });
4378
4378
  }
4379
4379
  _chunk7QVYU63Ejs.__name.call(void 0, PriceContainer, "PriceContainer");
4380
4380
 
@@ -4499,8 +4499,8 @@ function PricesList({ productId, fullWidth }) {
4499
4499
  const importInputRef = _react.useRef.call(void 0, null);
4500
4500
  const [seed, setSeed] = _react.useState.call(void 0, void 0);
4501
4501
  const [seedNonce, setSeedNonce] = _react.useState.call(void 0, 0);
4502
- const data = _chunk6IQCMCIAjs.useDataListRetriever.call(void 0, {
4503
- retriever: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (params) => _chunkCMNJENSJjs.StripePriceService.listPrices({ ...params, productId }), "retriever"),
4502
+ const data = _chunkEGTC75OWjs.useDataListRetriever.call(void 0, {
4503
+ retriever: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (params) => _chunkZB6OYIMBjs.StripePriceService.listPrices({ ...params, productId }), "retriever"),
4504
4504
  retrieverParams: {},
4505
4505
  module: _chunkYWLSIIE6js.Modules.StripePrice
4506
4506
  });
@@ -4537,7 +4537,7 @@ function PricesList({ productId, fullWidth }) {
4537
4537
  openSeededEditor(transfer.price);
4538
4538
  } catch (error) {
4539
4539
  console.error("[PricesList] price import failed", error);
4540
- _chunk6IQCMCIAjs.errorToast.call(void 0, {
4540
+ _chunkEGTC75OWjs.errorToast.call(void 0, {
4541
4541
  title: t("billing.admin.prices.import.errors.title"),
4542
4542
  error: t("billing.admin.prices.import.errors.invalid")
4543
4543
  });
@@ -4556,7 +4556,7 @@ function PricesList({ productId, fullWidth }) {
4556
4556
  "create-price"
4557
4557
  ),
4558
4558
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _react.Fragment, { children: [
4559
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunk6IQCMCIAjs.Button, { variant: "outline", size: "sm", type: "button", onClick: () => _optionalChain([importInputRef, 'access', _181 => _181.current, 'optionalAccess', _182 => _182.click, 'call', _183 => _183()]), children: [
4559
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _chunkEGTC75OWjs.Button, { variant: "outline", size: "sm", type: "button", onClick: () => _optionalChain([importInputRef, 'access', _181 => _181.current, 'optionalAccess', _182 => _182.click, 'call', _183 => _183()]), children: [
4560
4560
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.UploadIcon, {}),
4561
4561
  t("billing.admin.prices.actions.import")
4562
4562
  ] }),
@@ -4574,7 +4574,7 @@ function PricesList({ productId, fullWidth }) {
4574
4574
  ];
4575
4575
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
4576
4576
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
4577
- _chunk6IQCMCIAjs.ContentListTable,
4577
+ _chunkEGTC75OWjs.ContentListTable,
4578
4578
  {
4579
4579
  data,
4580
4580
  fields: [
@@ -4591,7 +4591,7 @@ function PricesList({ productId, fullWidth }) {
4591
4591
  fullWidth,
4592
4592
  title: t("billing.admin.prices.title"),
4593
4593
  emptyState: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
4594
- _chunk6IQCMCIAjs.EmptyState,
4594
+ _chunkEGTC75OWjs.EmptyState,
4595
4595
  {
4596
4596
  icon: _lucidereact.DollarSignIcon,
4597
4597
  title: t("billing.admin.prices.empty.title"),
@@ -4631,18 +4631,18 @@ function ProductDetails() {
4631
4631
  const { product } = useProductContext();
4632
4632
  if (!product) return null;
4633
4633
  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, _chunk6IQCMCIAjs.SectionHeader, { children: t("billing.admin.products.tabs.details") }),
4634
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEGTC75OWjs.SectionHeader, { children: t("billing.admin.products.tabs.details") }),
4635
4635
  /* @__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, _chunk6IQCMCIAjs.DetailField, { label: t("billing.admin.products.fields.name"), value: product.name }),
4636
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEGTC75OWjs.DetailField, { label: t("billing.admin.products.fields.name"), value: product.name }),
4637
4637
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
4638
- _chunk6IQCMCIAjs.DetailField,
4638
+ _chunkEGTC75OWjs.DetailField,
4639
4639
  {
4640
4640
  label: t("billing.admin.products.fields.status"),
4641
- value: product.active ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6IQCMCIAjs.Badge, { variant: "softGreen", children: t("billing.admin.products.status.active") }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6IQCMCIAjs.Badge, { variant: "softGray", children: t("billing.admin.products.status.archived") })
4641
+ value: product.active ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEGTC75OWjs.Badge, { variant: "softGreen", children: t("billing.admin.products.status.active") }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEGTC75OWjs.Badge, { variant: "softGray", children: t("billing.admin.products.status.archived") })
4642
4642
  }
4643
4643
  ),
4644
4644
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
4645
- _chunk6IQCMCIAjs.DetailField,
4645
+ _chunkEGTC75OWjs.DetailField,
4646
4646
  {
4647
4647
  label: t("billing.admin.products.fields.description"),
4648
4648
  value: _nullishCoalesce(product.description, () => ( "\u2014")),
@@ -4650,14 +4650,14 @@ function ProductDetails() {
4650
4650
  }
4651
4651
  ),
4652
4652
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
4653
- _chunk6IQCMCIAjs.DetailField,
4653
+ _chunkEGTC75OWjs.DetailField,
4654
4654
  {
4655
4655
  label: t("billing.admin.products.fields.prices"),
4656
4656
  value: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "tabular-nums", children: product.stripePrices.length })
4657
4657
  }
4658
4658
  ),
4659
4659
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
4660
- _chunk6IQCMCIAjs.DetailField,
4660
+ _chunkEGTC75OWjs.DetailField,
4661
4661
  {
4662
4662
  label: t("billing.admin.products.fields.stripeId"),
4663
4663
  value: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "tabular-nums", children: product.stripeProductId })
@@ -4675,7 +4675,7 @@ function ProductContainer() {
4675
4675
  const { product } = useProductContext();
4676
4676
  if (!product) return null;
4677
4677
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
4678
- _chunk6IQCMCIAjs.RoundPageContainer,
4678
+ _chunkEGTC75OWjs.RoundPageContainer,
4679
4679
  {
4680
4680
  module: _chunkYWLSIIE6js.Modules.StripeProduct,
4681
4681
  id: product.id,
@@ -4712,18 +4712,18 @@ _chunk7QVYU63Ejs.__name.call(void 0, ProductContainer, "ProductContainer");
4712
4712
 
4713
4713
  function CouponsList({ fullWidth } = {}) {
4714
4714
  const t = _nextintl.useTranslations.call(void 0, );
4715
- const { catalogueVersion } = _chunk6IQCMCIAjs.useCouponContext.call(void 0, );
4716
- const data = _chunk6IQCMCIAjs.useDataListRetriever.call(void 0, {
4717
- retriever: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (params) => _chunkCMNJENSJjs.StripeCouponService.listCoupons(params), "retriever"),
4715
+ const { catalogueVersion } = _chunkEGTC75OWjs.useCouponContext.call(void 0, );
4716
+ const data = _chunkEGTC75OWjs.useDataListRetriever.call(void 0, {
4717
+ retriever: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (params) => _chunkZB6OYIMBjs.StripeCouponService.listCoupons(params), "retriever"),
4718
4718
  retrieverParams: {},
4719
4719
  module: _chunkYWLSIIE6js.Modules.StripeCoupon
4720
4720
  });
4721
4721
  _react.useEffect.call(void 0, () => {
4722
4722
  if (catalogueVersion > 0) void data.refresh();
4723
4723
  }, [catalogueVersion]);
4724
- const functions = [/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6IQCMCIAjs.CouponEditor, {}, "create-coupon")];
4724
+ const functions = [/* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEGTC75OWjs.CouponEditor, {}, "create-coupon")];
4725
4725
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
4726
- _chunk6IQCMCIAjs.ContentListTable,
4726
+ _chunkEGTC75OWjs.ContentListTable,
4727
4727
  {
4728
4728
  data,
4729
4729
  fields: [
@@ -4738,7 +4738,7 @@ function CouponsList({ fullWidth } = {}) {
4738
4738
  fullWidth,
4739
4739
  title: t("billing.admin.coupons.title"),
4740
4740
  emptyState: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
4741
- _chunk6IQCMCIAjs.EmptyState,
4741
+ _chunkEGTC75OWjs.EmptyState,
4742
4742
  {
4743
4743
  icon: _lucidereact.TicketPercentIcon,
4744
4744
  title: t("billing.admin.coupons.empty.title"),
@@ -4758,8 +4758,8 @@ _chunk7QVYU63Ejs.__name.call(void 0, CouponsList, "CouponsList");
4758
4758
  function ProductsList({ fullWidth } = {}) {
4759
4759
  const t = _nextintl.useTranslations.call(void 0, );
4760
4760
  const { catalogueVersion } = useProductContext();
4761
- const data = _chunk6IQCMCIAjs.useDataListRetriever.call(void 0, {
4762
- retriever: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (params) => _chunkCMNJENSJjs.StripeProductService.listProducts(params), "retriever"),
4761
+ const data = _chunkEGTC75OWjs.useDataListRetriever.call(void 0, {
4762
+ retriever: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (params) => _chunkZB6OYIMBjs.StripeProductService.listProducts(params), "retriever"),
4763
4763
  retrieverParams: {},
4764
4764
  module: _chunkYWLSIIE6js.Modules.StripeProduct
4765
4765
  });
@@ -4768,7 +4768,7 @@ function ProductsList({ fullWidth } = {}) {
4768
4768
  }, [catalogueVersion]);
4769
4769
  const functions = [/* @__PURE__ */ _jsxruntime.jsx.call(void 0, ProductEditor, {}, "create-product")];
4770
4770
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
4771
- _chunk6IQCMCIAjs.ContentListTable,
4771
+ _chunkEGTC75OWjs.ContentListTable,
4772
4772
  {
4773
4773
  data,
4774
4774
  fields: ["name" /* name */, "status" /* status */, "prices" /* prices */],
@@ -4777,7 +4777,7 @@ function ProductsList({ fullWidth } = {}) {
4777
4777
  fullWidth,
4778
4778
  title: t("billing.admin.products.title"),
4779
4779
  emptyState: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
4780
- _chunk6IQCMCIAjs.EmptyState,
4780
+ _chunkEGTC75OWjs.EmptyState,
4781
4781
  {
4782
4782
  icon: _lucidereact.PackageIcon,
4783
4783
  title: t("billing.admin.products.empty.title"),
@@ -4793,8 +4793,8 @@ _chunk7QVYU63Ejs.__name.call(void 0, ProductsList, "ProductsList");
4793
4793
 
4794
4794
  function ProductsListContainer() {
4795
4795
  const t = _nextintl.useTranslations.call(void 0, );
4796
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, ProductProvider, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6IQCMCIAjs.CouponProvider, { publishChrome: false, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
4797
- _chunk6IQCMCIAjs.RoundPageContainer,
4796
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, ProductProvider, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEGTC75OWjs.CouponProvider, { publishChrome: false, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
4797
+ _chunkEGTC75OWjs.RoundPageContainer,
4798
4798
  {
4799
4799
  module: _chunkYWLSIIE6js.Modules.StripeProduct,
4800
4800
  tabs: [
@@ -4814,30 +4814,30 @@ _chunk7QVYU63Ejs.__name.call(void 0, ProductsListContainer, "ProductsListContain
4814
4814
 
4815
4815
  function CouponDetails() {
4816
4816
  const t = _nextintl.useTranslations.call(void 0, );
4817
- const fmt = _chunk6IQCMCIAjs.useBillingFormatOptions.call(void 0, );
4818
- const { coupon } = _chunk6IQCMCIAjs.useCouponContext.call(void 0, );
4817
+ const fmt = _chunkEGTC75OWjs.useBillingFormatOptions.call(void 0, );
4818
+ const { coupon } = _chunkEGTC75OWjs.useCouponContext.call(void 0, );
4819
4819
  if (!coupon) return null;
4820
4820
  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, _chunk6IQCMCIAjs.SectionHeader, { children: t("billing.admin.products.tabs.details") }),
4821
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEGTC75OWjs.SectionHeader, { children: t("billing.admin.products.tabs.details") }),
4822
4822
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "p", { className: "text-muted-foreground text-xs/relaxed", children: t("billing.admin.coupons.fixed_notice") }),
4823
4823
  /* @__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, _chunk6IQCMCIAjs.DetailField, { label: t("billing.admin.coupons.fields.name"), value: coupon.name }),
4824
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEGTC75OWjs.DetailField, { label: t("billing.admin.coupons.fields.name"), value: coupon.name }),
4825
4825
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
4826
- _chunk6IQCMCIAjs.DetailField,
4826
+ _chunkEGTC75OWjs.DetailField,
4827
4827
  {
4828
4828
  label: t("billing.admin.coupons.fields.status"),
4829
- value: coupon.valid ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6IQCMCIAjs.Badge, { variant: "softGreen", children: t("billing.admin.coupons.status.active") }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6IQCMCIAjs.Badge, { variant: "softGray", children: t("billing.admin.coupons.status.ended") })
4829
+ value: coupon.valid ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEGTC75OWjs.Badge, { variant: "softGreen", children: t("billing.admin.coupons.status.active") }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEGTC75OWjs.Badge, { variant: "softGray", children: t("billing.admin.coupons.status.ended") })
4830
4830
  }
4831
4831
  ),
4832
4832
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
4833
- _chunk6IQCMCIAjs.DetailField,
4833
+ _chunkEGTC75OWjs.DetailField,
4834
4834
  {
4835
4835
  label: t("billing.admin.coupons.fields.discount"),
4836
- value: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "tabular-nums", children: _chunkCMNJENSJjs.formatCouponDiscount.call(void 0, coupon, t, fmt) })
4836
+ value: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "tabular-nums", children: _chunkZB6OYIMBjs.formatCouponDiscount.call(void 0, coupon, t, fmt) })
4837
4837
  }
4838
4838
  ),
4839
4839
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
4840
- _chunk6IQCMCIAjs.DetailField,
4840
+ _chunkEGTC75OWjs.DetailField,
4841
4841
  {
4842
4842
  label: t("billing.admin.coupons.fields.places"),
4843
4843
  value: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "tabular-nums", children: coupon.maxRedemptions !== void 0 ? t("billing.admin.coupons.places.limited", {
@@ -4847,21 +4847,21 @@ function CouponDetails() {
4847
4847
  }
4848
4848
  ),
4849
4849
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
4850
- _chunk6IQCMCIAjs.DetailField,
4850
+ _chunkEGTC75OWjs.DetailField,
4851
4851
  {
4852
4852
  label: t("billing.admin.coupons.fields.products"),
4853
4853
  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
4854
  }
4855
4855
  ),
4856
4856
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
4857
- _chunk6IQCMCIAjs.DetailField,
4857
+ _chunkEGTC75OWjs.DetailField,
4858
4858
  {
4859
4859
  label: t("billing.admin.coupons.fields.redeemBy"),
4860
- value: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "tabular-nums", children: coupon.redeemBy ? _chunk6IQCMCIAjs.formatDate.call(void 0, coupon.redeemBy, fmt) : "\u2014" })
4860
+ value: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "tabular-nums", children: coupon.redeemBy ? _chunkEGTC75OWjs.formatDate.call(void 0, coupon.redeemBy, fmt) : "\u2014" })
4861
4861
  }
4862
4862
  ),
4863
4863
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
4864
- _chunk6IQCMCIAjs.DetailField,
4864
+ _chunkEGTC75OWjs.DetailField,
4865
4865
  {
4866
4866
  label: t("billing.admin.coupons.fields.stripeId"),
4867
4867
  value: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "tabular-nums", children: coupon.stripeCouponId })
@@ -4896,15 +4896,15 @@ function CouponCodeEditorInternal({
4896
4896
  }) {
4897
4897
  const t = _nextintl.useTranslations.call(void 0, );
4898
4898
  const router = _chunkYWLSIIE6js.useI18nRouter.call(void 0, );
4899
- const { createCode } = _chunk6IQCMCIAjs.useCouponContext.call(void 0, );
4900
- const formSchema2 = _react.useMemo.call(void 0, () => _zod3.z.object({ id: _zod3.z.uuidv4() }).and(_chunk6IQCMCIAjs.couponCodeSchema.call(void 0, t)), [t]);
4901
- const getDefaultValues = _react.useCallback.call(void 0, () => ({ id: _uuid.v4.call(void 0, ), ..._chunk6IQCMCIAjs.couponCodeDefaults.call(void 0, ) }), []);
4899
+ const { createCode } = _chunkEGTC75OWjs.useCouponContext.call(void 0, );
4900
+ const formSchema2 = _react.useMemo.call(void 0, () => _zod3.z.object({ id: _zod3.z.uuidv4() }).and(_chunkEGTC75OWjs.couponCodeSchema.call(void 0, t)), [t]);
4901
+ const getDefaultValues = _react.useCallback.call(void 0, () => ({ id: _uuid.v4.call(void 0, ), ..._chunkEGTC75OWjs.couponCodeDefaults.call(void 0, ) }), []);
4902
4902
  const form = _reacthookform.useForm.call(void 0, {
4903
4903
  resolver: _zod.zodResolver.call(void 0, formSchema2),
4904
4904
  defaultValues: getDefaultValues()
4905
4905
  });
4906
4906
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
4907
- _chunk6IQCMCIAjs.EditorSheet,
4907
+ _chunkEGTC75OWjs.EditorSheet,
4908
4908
  {
4909
4909
  form,
4910
4910
  entityType: t("billing.admin.coupons.codes.entity"),
@@ -4914,14 +4914,14 @@ function CouponCodeEditorInternal({
4914
4914
  onSuccess: _nullishCoalesce(onSuccess, () => ( (() => {
4915
4915
  }))),
4916
4916
  onNavigate: (url) => router.push(url),
4917
- onSubmit: async (values) => await createCode({ id: values.id, couponId, ..._chunk6IQCMCIAjs.toCouponCodeInput.call(void 0, values) }),
4917
+ onSubmit: async (values) => await createCode({ id: values.id, couponId, ..._chunkEGTC75OWjs.toCouponCodeInput.call(void 0, values) }),
4918
4918
  onReset: getDefaultValues,
4919
4919
  trigger,
4920
4920
  forceShow,
4921
4921
  onClose,
4922
4922
  dialogOpen,
4923
4923
  onDialogOpenChange,
4924
- children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk6IQCMCIAjs.CouponCodeFields, { form })
4924
+ children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkEGTC75OWjs.CouponCodeFields, { form })
4925
4925
  }
4926
4926
  );
4927
4927
  }
@@ -4935,9 +4935,9 @@ _chunk7QVYU63Ejs.__name.call(void 0, CouponCodeEditor, "CouponCodeEditor");
4935
4935
 
4936
4936
  function CouponCodesList({ couponId }) {
4937
4937
  const t = _nextintl.useTranslations.call(void 0, );
4938
- const { catalogueVersion } = _chunk6IQCMCIAjs.useCouponContext.call(void 0, );
4939
- const data = _chunk6IQCMCIAjs.useDataListRetriever.call(void 0, {
4940
- retriever: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (params) => _chunkCMNJENSJjs.StripeCouponCodeService.listByCoupon({ ...params, couponId }), "retriever"),
4938
+ const { catalogueVersion } = _chunkEGTC75OWjs.useCouponContext.call(void 0, );
4939
+ const data = _chunkEGTC75OWjs.useDataListRetriever.call(void 0, {
4940
+ retriever: /* @__PURE__ */ _chunk7QVYU63Ejs.__name.call(void 0, (params) => _chunkZB6OYIMBjs.StripeCouponCodeService.listByCoupon({ ...params, couponId }), "retriever"),
4941
4941
  retrieverParams: {},
4942
4942
  module: _chunkYWLSIIE6js.Modules.StripeCouponCode
4943
4943
  });
@@ -4946,7 +4946,7 @@ function CouponCodesList({ couponId }) {
4946
4946
  }, [catalogueVersion]);
4947
4947
  const functions = [/* @__PURE__ */ _jsxruntime.jsx.call(void 0, CouponCodeEditor, { couponId }, "create-code")];
4948
4948
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
4949
- _chunk6IQCMCIAjs.ContentListTable,
4949
+ _chunkEGTC75OWjs.ContentListTable,
4950
4950
  {
4951
4951
  data,
4952
4952
  fields: [
@@ -4961,7 +4961,7 @@ function CouponCodesList({ couponId }) {
4961
4961
  functions,
4962
4962
  title: t("billing.admin.coupons.codes.title"),
4963
4963
  emptyState: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
4964
- _chunk6IQCMCIAjs.EmptyState,
4964
+ _chunkEGTC75OWjs.EmptyState,
4965
4965
  {
4966
4966
  icon: _lucidereact.TicketIcon,
4967
4967
  title: t("billing.admin.coupons.codes.empty.title"),
@@ -4977,12 +4977,12 @@ _chunk7QVYU63Ejs.__name.call(void 0, CouponCodesList, "CouponCodesList");
4977
4977
 
4978
4978
  function CouponContainer() {
4979
4979
  const t = _nextintl.useTranslations.call(void 0, );
4980
- const { coupon } = _chunk6IQCMCIAjs.useCouponContext.call(void 0, );
4980
+ const { coupon } = _chunkEGTC75OWjs.useCouponContext.call(void 0, );
4981
4981
  if (!coupon) return null;
4982
4982
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
4983
- _chunk6IQCMCIAjs.RoundPageContainer,
4983
+ _chunkEGTC75OWjs.RoundPageContainer,
4984
4984
  {
4985
- module: _chunk6IQCMCIAjs.couponPageModule.call(void 0, ),
4985
+ module: _chunkEGTC75OWjs.couponPageModule.call(void 0, ),
4986
4986
  id: coupon.id,
4987
4987
  tabs: [
4988
4988
  {
@@ -5089,5 +5089,5 @@ _chunk7QVYU63Ejs.__name.call(void 0, CouponContainer, "CouponContainer");
5089
5089
 
5090
5090
 
5091
5091
 
5092
- exports.BillingAlertBanner = BillingAlertBanner; exports.BillingDashboardContainer = BillingDashboardContainer; exports.BillingDetailModal = BillingDetailModal; exports.BillingUsageSummaryCard = BillingUsageSummaryCard; exports.CancelSubscriptionDialog = CancelSubscriptionDialog; exports.CouponCodeActions = _chunk6IQCMCIAjs.CouponCodeActions; exports.CouponCodeEditor = CouponCodeEditor; exports.CouponCodeFields = _chunk6IQCMCIAjs.CouponCodeFields; exports.CouponCodesList = CouponCodesList; exports.CouponContainer = CouponContainer; exports.CouponDetails = CouponDetails; exports.CouponEditor = _chunk6IQCMCIAjs.CouponEditor; exports.CouponProvider = _chunk6IQCMCIAjs.CouponProvider; exports.CouponRefresher = _chunk6IQCMCIAjs.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 = _chunk6IQCMCIAjs.applyDiscount; exports.couponCodeDefaults = _chunk6IQCMCIAjs.couponCodeDefaults; exports.couponCodeSchema = _chunk6IQCMCIAjs.couponCodeSchema; exports.couponCurrencyOptions = _chunk6IQCMCIAjs.couponCurrencyOptions; exports.formatCurrency = _chunkCMNJENSJjs.formatCurrency; exports.formatDate = _chunk6IQCMCIAjs.formatDate; exports.formatFixed = _chunkCMNJENSJjs.formatFixed; exports.formatInterval = _chunkCMNJENSJjs.formatInterval; exports.isStripeConfigured = isStripeConfigured; exports.optionalDate = _chunk6IQCMCIAjs.optionalDate; exports.optionalDecimal = _chunk6IQCMCIAjs.optionalDecimal; exports.optionalPositiveInt = _chunk6IQCMCIAjs.optionalPositiveInt; exports.parseOptionalDecimal = _chunk6IQCMCIAjs.parseOptionalDecimal; exports.parseOptionalPositiveInt = _chunk6IQCMCIAjs.parseOptionalPositiveInt; exports.priceLabel = priceLabel; exports.promotionCodeDiscount = _chunk6IQCMCIAjs.promotionCodeDiscount; exports.subscriptionDiscount = _chunk6IQCMCIAjs.subscriptionDiscount; exports.toCouponCodeInput = _chunk6IQCMCIAjs.toCouponCodeInput; exports.useBillingFormatOptions = _chunk6IQCMCIAjs.useBillingFormatOptions; exports.useCouponContext = _chunk6IQCMCIAjs.useCouponContext; exports.usePriceContext = usePriceContext; exports.useProductContext = useProductContext;
5092
+ exports.BillingAlertBanner = BillingAlertBanner; exports.BillingDashboardContainer = BillingDashboardContainer; exports.BillingDetailModal = BillingDetailModal; exports.BillingUsageSummaryCard = BillingUsageSummaryCard; exports.CancelSubscriptionDialog = CancelSubscriptionDialog; exports.CouponCodeActions = _chunkEGTC75OWjs.CouponCodeActions; exports.CouponCodeEditor = CouponCodeEditor; exports.CouponCodeFields = _chunkEGTC75OWjs.CouponCodeFields; exports.CouponCodesList = CouponCodesList; exports.CouponContainer = CouponContainer; exports.CouponDetails = CouponDetails; exports.CouponEditor = _chunkEGTC75OWjs.CouponEditor; exports.CouponProvider = _chunkEGTC75OWjs.CouponProvider; exports.CouponRefresher = _chunkEGTC75OWjs.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 = _chunkEGTC75OWjs.applyDiscount; exports.couponCodeDefaults = _chunkEGTC75OWjs.couponCodeDefaults; exports.couponCodeSchema = _chunkEGTC75OWjs.couponCodeSchema; exports.couponCurrencyOptions = _chunkEGTC75OWjs.couponCurrencyOptions; exports.formatCurrency = _chunkZB6OYIMBjs.formatCurrency; exports.formatDate = _chunkEGTC75OWjs.formatDate; exports.formatFixed = _chunkZB6OYIMBjs.formatFixed; exports.formatInterval = _chunkZB6OYIMBjs.formatInterval; exports.isStripeConfigured = isStripeConfigured; exports.optionalDate = _chunkEGTC75OWjs.optionalDate; exports.optionalDecimal = _chunkEGTC75OWjs.optionalDecimal; exports.optionalPositiveInt = _chunkEGTC75OWjs.optionalPositiveInt; exports.parseOptionalDecimal = _chunkEGTC75OWjs.parseOptionalDecimal; exports.parseOptionalPositiveInt = _chunkEGTC75OWjs.parseOptionalPositiveInt; exports.priceLabel = priceLabel; exports.promotionCodeDiscount = _chunkEGTC75OWjs.promotionCodeDiscount; exports.subscriptionDiscount = _chunkEGTC75OWjs.subscriptionDiscount; exports.toCouponCodeInput = _chunkEGTC75OWjs.toCouponCodeInput; exports.useBillingFormatOptions = _chunkEGTC75OWjs.useBillingFormatOptions; exports.useCouponContext = _chunkEGTC75OWjs.useCouponContext; exports.usePriceContext = usePriceContext; exports.useProductContext = useProductContext;
5093
5093
  //# sourceMappingURL=index.js.map