@burdenoff/microfe-billing 2026.1113.2 → 2026.1113.3

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 (105) hide show
  1. package/dist/billing/BillingRoot.js +83 -77
  2. package/dist/billing/BillingRoot.js.map +1 -1
  3. package/dist/billing/modules/addons/pages/AddonBrowseDetailPage.js +78 -78
  4. package/dist/billing/modules/addons/pages/AddonCreatePage.js +70 -70
  5. package/dist/billing/modules/addons/pages/AddonDetailPage.js +72 -72
  6. package/dist/billing/modules/addons/pages/AddonEditPage.js +79 -79
  7. package/dist/billing/modules/addons/pages/AddonsBrowsePage.js +224 -224
  8. package/dist/billing/modules/addons/pages/AddonsListPage.js +186 -186
  9. package/dist/billing/modules/affiliate/pages/AffiliateDashboardPage.js +168 -168
  10. package/dist/billing/modules/affiliate/pages/AffiliateDashboardPage.js.map +1 -1
  11. package/dist/billing/modules/analytics/pages/AnalyticsPage.js +88 -88
  12. package/dist/billing/modules/billing/hooks/index.js +5 -5
  13. package/dist/billing/modules/billing/hooks/useInvoices.js +39 -20
  14. package/dist/billing/modules/billing/hooks/useInvoices.js.map +1 -1
  15. package/dist/billing/modules/billing/index.js +14 -14
  16. package/dist/billing/modules/billing/pages/BillingWebhookLogsPage.js +92 -92
  17. package/dist/billing/modules/billing/pages/InvoiceDetailPage.js +160 -160
  18. package/dist/billing/modules/billing/pages/InvoiceDetailPage.js.map +1 -1
  19. package/dist/billing/modules/billing/pages/InvoicesListPage.js +100 -100
  20. package/dist/billing/modules/billing/pages/OrderCallbackLogsPage.js +105 -105
  21. package/dist/billing/modules/billing/pages/PaymentMethodsPage.js +37 -37
  22. package/dist/billing/modules/billing/pages/RefundIssueLogsPage.js +41 -41
  23. package/dist/billing/modules/billing/pages/RefundsPage.js +334 -334
  24. package/dist/billing/modules/billing/pages/RefundsPage.js.map +1 -1
  25. package/dist/billing/modules/billing/pages/TransactionsPage.js +174 -174
  26. package/dist/billing/modules/billing/pages/TransactionsPage.js.map +1 -1
  27. package/dist/billing/modules/billing/pages/UserRefundsPage.js +24 -24
  28. package/dist/billing/modules/billing/pages/UserRefundsPage.js.map +1 -1
  29. package/dist/billing/modules/checkout/components/OrderSummary.js +71 -71
  30. package/dist/billing/modules/checkout/pages/CheckoutPage.js +646 -625
  31. package/dist/billing/modules/checkout/pages/CheckoutPage.js.map +1 -1
  32. package/dist/billing/modules/checkout/utils/checkoutOptions.d.ts +23 -0
  33. package/dist/billing/modules/checkout/utils/checkoutOptions.js +8 -0
  34. package/dist/billing/modules/checkout/utils/checkoutOptions.js.map +1 -0
  35. package/dist/billing/modules/coupons/pages/CouponDetailPage.js +112 -112
  36. package/dist/billing/modules/coupons/pages/CouponsListPage.js +118 -118
  37. package/dist/billing/modules/coupons/pages/CouponsListPage.js.map +1 -1
  38. package/dist/billing/modules/coupons/pages/CreateCouponPage.js +119 -119
  39. package/dist/billing/modules/coupons/pages/EditCouponPage.js +82 -82
  40. package/dist/billing/modules/credits/pages/AdminCreditsPage.js +30 -30
  41. package/dist/billing/modules/credits/pages/CreditTransactionsPage.js +77 -77
  42. package/dist/billing/modules/credits/pages/CreditWithdrawalPage.js +144 -144
  43. package/dist/billing/modules/credits/pages/CreditsPage.js +67 -67
  44. package/dist/billing/modules/dashboard/pages/OverviewPage.js +594 -442
  45. package/dist/billing/modules/dashboard/pages/OverviewPage.js.map +1 -1
  46. package/dist/billing/modules/dashboard/utils/overviewSummary.d.ts +46 -0
  47. package/dist/billing/modules/dashboard/utils/overviewSummary.js +37 -0
  48. package/dist/billing/modules/dashboard/utils/overviewSummary.js.map +1 -0
  49. package/dist/billing/modules/discounts/pages/DiscountsListPage.js +199 -199
  50. package/dist/billing/modules/discounts/pages/DiscountsListPage.js.map +1 -1
  51. package/dist/billing/modules/earnings/pages/DeveloperRevenueAdminPage.js +64 -64
  52. package/dist/billing/modules/earnings/pages/DeveloperRevenueOrgDetailPage.js +122 -122
  53. package/dist/billing/modules/earnings/pages/DeveloperRevenueOrgDetailPage.js.map +1 -1
  54. package/dist/billing/modules/earnings/pages/EarningsPage.js +102 -102
  55. package/dist/billing/modules/earnings/pages/EarningsPage.js.map +1 -1
  56. package/dist/billing/modules/earnings/pages/PayoutAdminPage.js +178 -178
  57. package/dist/billing/modules/earnings/pages/PayoutAdminPage.js.map +1 -1
  58. package/dist/billing/modules/earnings/pages/PayoutsPage.js +107 -107
  59. package/dist/billing/modules/earnings/pages/PayoutsPage.js.map +1 -1
  60. package/dist/billing/modules/plans/pages/PlanAssignFreePage.js +54 -54
  61. package/dist/billing/modules/plans/pages/PlanBrowseDetailPage.js +94 -94
  62. package/dist/billing/modules/plans/pages/PlanCreatePage.js +73 -73
  63. package/dist/billing/modules/plans/pages/PlanDetailPage.js +96 -96
  64. package/dist/billing/modules/plans/pages/PlanEditPage.js +16 -16
  65. package/dist/billing/modules/plans/pages/PlanEditPage.js.map +1 -1
  66. package/dist/billing/modules/plans/pages/PlansBrowsePage.js +100 -100
  67. package/dist/billing/modules/plans/pages/PlansListPage.js +88 -88
  68. package/dist/billing/modules/promotions/pages/CreatePromotionPage.js +60 -60
  69. package/dist/billing/modules/promotions/pages/PromotionsListPage.js +37 -37
  70. package/dist/billing/modules/quota/pages/QuotaAssignFreePage.js +62 -62
  71. package/dist/billing/modules/quota/pages/QuotaPage.js +1 -1
  72. package/dist/billing/modules/quota/pages/QuotaTemplateCreatePage.js +69 -69
  73. package/dist/billing/modules/quota/pages/QuotaTemplateDetailPage.js +76 -76
  74. package/dist/billing/modules/quota/pages/QuotaTemplateEditPage.js +80 -80
  75. package/dist/billing/modules/quota/pages/QuotaTemplatesListPage.js +95 -95
  76. package/dist/billing/modules/settings/pages/SettingsPage.js +134 -134
  77. package/dist/billing/modules/settings/pages/SettingsPage.js.map +1 -1
  78. package/dist/billing/modules/settings/pages/TeamPermissionsPage.js +62 -62
  79. package/dist/billing/modules/settings/pages/TeamPermissionsPage.js.map +1 -1
  80. package/dist/billing/modules/subscriptions/components/ManageSeatsModal.js +36 -36
  81. package/dist/billing/modules/subscriptions/pages/SubscriptionDetailPage.js +534 -410
  82. package/dist/billing/modules/subscriptions/pages/SubscriptionDetailPage.js.map +1 -1
  83. package/dist/billing/modules/subscriptions/pages/SubscriptionsListPage.js +111 -111
  84. package/dist/billing/modules/subscriptions/pages/UpgradeSubscriptionPage.js +166 -160
  85. package/dist/billing/modules/subscriptions/pages/UpgradeSubscriptionPage.js.map +1 -1
  86. package/dist/billing/modules/subscriptions/utils/subscriptionDetailView.d.ts +30 -0
  87. package/dist/billing/modules/subscriptions/utils/subscriptionDetailView.js +20 -0
  88. package/dist/billing/modules/subscriptions/utils/subscriptionDetailView.js.map +1 -0
  89. package/dist/billing/modules/subscriptions/utils/upgradeAccess.d.ts +10 -0
  90. package/dist/billing/modules/subscriptions/utils/upgradeAccess.js +7 -0
  91. package/dist/billing/modules/subscriptions/utils/upgradeAccess.js.map +1 -0
  92. package/dist/billing/modules/usage/pages/UsagePage.js +722 -591
  93. package/dist/billing/modules/usage/pages/UsagePage.js.map +1 -1
  94. package/dist/billing/modules/usage/utils/usageHealth.d.ts +63 -0
  95. package/dist/billing/modules/usage/utils/usageHealth.js +43 -0
  96. package/dist/billing/modules/usage/utils/usageHealth.js.map +1 -0
  97. package/dist/billing/shared/components/EmptyState.js +3 -3
  98. package/dist/billing/shared/components/MoneyActionDialog.js +12 -12
  99. package/dist/billing/shared/ui/MetricCard.js +13 -13
  100. package/dist/billing/shared/utils/format.js +16 -4
  101. package/dist/billing/shared/utils/format.js.map +1 -1
  102. package/dist/billing/shared/utils/index.js +8 -8
  103. package/dist/generated/global-operations.js +294 -286
  104. package/dist/generated/global-operations.js.map +1 -1
  105. package/package.json +2 -2
@@ -14,16 +14,16 @@ import { getPlanFeatureQuantity as c } from "../../../shared/utils/planFeatureQu
14
14
  import { useQuotas as l } from "../../plans/hooks/useQuotas.js";
15
15
  import { PlanDuration as u } from "../../../shared/types/graphql.js";
16
16
  import { useEffect as d, useState as f } from "react";
17
- import { useParams as p } from "react-router";
18
- import { Fragment as m, jsx as h, jsxs as g } from "react/jsx-runtime";
19
- import { useI18n as _ } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
20
- import { PagePurpose as v } from "@burdenoff/fe-libs/ui";
17
+ import { PagePurpose as p } from "@burdenoff/fe-libs/ui";
18
+ import { useParams as m } from "react-router";
19
+ import { Fragment as h, jsx as g, jsxs as _ } from "react/jsx-runtime";
20
+ import { useI18n as v } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
21
21
  // src/billing/modules/addons/pages/AddonEditPage.tsx
22
22
  var y = () => {
23
- let { t: y } = _(), b = (e, t) => {
23
+ let { t: y } = v(), b = (e, t) => {
24
24
  let n = y(e);
25
25
  return n === e ? t : n;
26
- }, { addonId: x } = p(), S = ee(), C = a(), { addon: w, isLoading: T, error: E, refetch: D } = o(x), { quotas: O, isLoading: k } = l({ onlyActive: !0 }), { updateAddon: A, isUpdating: j } = s(), [M, N] = f(""), [P, F] = f(""), [I, L] = f("USD"), [R, z] = f(u.MONTHLY), [B, V] = f(!0), [H, U] = f(!0), [W, G] = f([]), [K, q] = f([]), [J, Y] = f(null), [X, Z] = f(!1);
26
+ }, { addonId: x } = m(), S = ee(), C = a(), { addon: w, isLoading: T, error: E, refetch: D } = o(x), { quotas: O, isLoading: k } = l({ onlyActive: !0 }), { updateAddon: A, isUpdating: j } = s(), [M, N] = f(""), [P, F] = f(""), [I, L] = f("USD"), [R, z] = f(u.MONTHLY), [B, V] = f(!0), [H, U] = f(!0), [W, G] = f([]), [K, q] = f([]), [J, Y] = f(null), [X, Z] = f(!1);
27
27
  if (d(() => {
28
28
  if (w) {
29
29
  if (N(w.name ?? ""), F(String(w.price ?? "")), L(w.currency ?? "USD"), z(w.duration ?? u.MONTHLY), V(w.isActive ?? !0), U(w.requiresPaidSubscription ?? !0), w.currencyPrices && typeof w.currencyPrices == "object") {
@@ -46,10 +46,10 @@ var y = () => {
46
46
  G(e);
47
47
  }
48
48
  }
49
- }, [w]), !C.canManageAddons) return /* @__PURE__ */ h(e, { message: b("billing.addons.noEditPermission", "You don't have permission to edit addons.") });
50
- if (T || k) return /* @__PURE__ */ g("div", {
49
+ }, [w]), !C.canManageAddons) return /* @__PURE__ */ g(e, { message: b("billing.addons.noEditPermission", "You don't have permission to edit addons.") });
50
+ if (T || k) return /* @__PURE__ */ _("div", {
51
51
  className: "space-y-6 p-6",
52
- children: [/* @__PURE__ */ h("div", { className: "h-8 w-48 bg-bg-sunken animate-pulse rounded" }), /* @__PURE__ */ h("div", {
52
+ children: [/* @__PURE__ */ g("div", { className: "h-8 w-48 bg-bg-sunken animate-pulse rounded" }), /* @__PURE__ */ g("div", {
53
53
  className: "max-w-2xl space-y-4",
54
54
  children: [
55
55
  1,
@@ -57,26 +57,26 @@ var y = () => {
57
57
  3,
58
58
  4,
59
59
  5
60
- ].map((e) => /* @__PURE__ */ h("div", { className: "h-16 bg-bg-sunken animate-pulse rounded" }, e))
60
+ ].map((e) => /* @__PURE__ */ g("div", { className: "h-16 bg-bg-sunken animate-pulse rounded" }, e))
61
61
  })]
62
62
  });
63
- if (E && i(E)) return /* @__PURE__ */ h("div", {
63
+ if (E && i(E)) return /* @__PURE__ */ g("div", {
64
64
  className: "p-6",
65
- children: /* @__PURE__ */ h(n, {
65
+ children: /* @__PURE__ */ g(n, {
66
66
  title: b("billing.addons.serverUnavailable", "Server Unavailable"),
67
67
  message: b("billing.addons.serverUnavailableLoadAddon", "Unable to load addon. The server might be down or experiencing issues."),
68
68
  onRetry: () => D(),
69
69
  showRetry: !0
70
70
  })
71
71
  });
72
- if (!w) return /* @__PURE__ */ h("div", {
72
+ if (!w) return /* @__PURE__ */ g("div", {
73
73
  className: "flex items-center justify-center h-full min-h-[400px]",
74
- children: /* @__PURE__ */ g("div", {
74
+ children: /* @__PURE__ */ _("div", {
75
75
  className: "text-center space-y-4",
76
- children: [/* @__PURE__ */ h("h2", {
76
+ children: [/* @__PURE__ */ g("h2", {
77
77
  className: "text-lg font-semibold text-text-primary",
78
78
  children: b("billing.addons.addonNotFound", "Addon not found")
79
- }), /* @__PURE__ */ h("button", {
79
+ }), /* @__PURE__ */ g("button", {
80
80
  type: "button",
81
81
  onClick: () => S("/addons"),
82
82
  className: "px-4 py-2 text-sm font-medium bg-action-primary-bg text-action-primary-text rounded-button hover:bg-action-primary-bgHover",
@@ -95,15 +95,15 @@ var y = () => {
95
95
  let r = [...W];
96
96
  t === "quotaId" ? r[e].quotaId = n : r[e].quantity = Number(n), G(r);
97
97
  };
98
- return /* @__PURE__ */ g("div", {
98
+ return /* @__PURE__ */ _("div", {
99
99
  className: "space-y-6 p-6",
100
100
  children: [
101
- /* @__PURE__ */ h(t, {
101
+ /* @__PURE__ */ g(t, {
102
102
  title: `Edit Addon: ${w.name}`,
103
103
  description: b("billing.addons.editAddonDesc", "Update the addon details and quota allocations")
104
104
  }),
105
- /* @__PURE__ */ h(v, { children: b("billing.addons.editPurpose", "Update this add-on's price, currency overrides and the quotas it grants. Changes affect new purchases; existing add-on subscriptions keep what they already bought.") }),
106
- /* @__PURE__ */ g("form", {
105
+ /* @__PURE__ */ g(p, { children: b("billing.addons.editPurpose", "Update this add-on's price, currency overrides and the quotas it grants. Changes affect new purchases; existing add-on subscriptions keep what they already bought.") }),
106
+ /* @__PURE__ */ _("form", {
107
107
  onSubmit: async (e) => {
108
108
  if (e.preventDefault(), Y(null), Z(!1), !M.trim()) {
109
109
  Y("Addon name is required");
@@ -143,38 +143,38 @@ var y = () => {
143
143
  },
144
144
  className: "space-y-6",
145
145
  children: [
146
- J && /* @__PURE__ */ h("div", {
146
+ J && /* @__PURE__ */ g("div", {
147
147
  className: "p-4 bg-status-error-bg-subtle border border-border-subtle rounded-lg",
148
- children: /* @__PURE__ */ h("p", {
148
+ children: /* @__PURE__ */ g("p", {
149
149
  className: "text-sm text-status-error-text",
150
150
  children: J
151
151
  })
152
152
  }),
153
- X && /* @__PURE__ */ h("div", {
153
+ X && /* @__PURE__ */ g("div", {
154
154
  className: "p-4 bg-status-success-bg-subtle border border-border-subtle rounded-lg",
155
- children: /* @__PURE__ */ h("p", {
155
+ children: /* @__PURE__ */ g("p", {
156
156
  className: "text-sm text-status-success-text",
157
157
  children: b("billing.addons.updateSuccess", "Addon updated successfully! Redirecting...")
158
158
  })
159
159
  }),
160
- /* @__PURE__ */ g("div", {
160
+ /* @__PURE__ */ _("div", {
161
161
  className: "grid grid-cols-1 lg:grid-cols-2 gap-6",
162
- children: [/* @__PURE__ */ g("div", {
162
+ children: [/* @__PURE__ */ _("div", {
163
163
  className: "border border-border-seam rounded-card bg-bg-surface overflow-hidden shadow-[var(--shadow-elevation-1)] h-fit",
164
- children: [/* @__PURE__ */ h("div", {
164
+ children: [/* @__PURE__ */ g("div", {
165
165
  className: "p-4 border-b border-border-subtle bg-bg-sunken/30",
166
- children: /* @__PURE__ */ h("h2", {
166
+ children: /* @__PURE__ */ g("h2", {
167
167
  className: "font-semibold text-text-primary",
168
168
  children: b("billing.addons.basicInfo", "Basic Information")
169
169
  })
170
- }), /* @__PURE__ */ g("div", {
170
+ }), /* @__PURE__ */ _("div", {
171
171
  className: "p-4 space-y-4",
172
172
  children: [
173
- /* @__PURE__ */ g("div", { children: [/* @__PURE__ */ g("label", {
173
+ /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ _("label", {
174
174
  htmlFor: "name",
175
175
  className: "block text-sm font-medium text-text-primary mb-1",
176
176
  children: [b("billing.addons.addonNameLabel", "Addon Name"), " *"]
177
- }), /* @__PURE__ */ h("input", {
177
+ }), /* @__PURE__ */ g("input", {
178
178
  id: "name",
179
179
  type: "text",
180
180
  value: M,
@@ -183,13 +183,13 @@ var y = () => {
183
183
  placeholder: b("billing.addons.addonNamePlaceholder", "e.g., Extra Storage"),
184
184
  required: !0
185
185
  })] }),
186
- /* @__PURE__ */ g("div", {
186
+ /* @__PURE__ */ _("div", {
187
187
  className: "grid grid-cols-2 gap-4",
188
- children: [/* @__PURE__ */ g("div", { children: [/* @__PURE__ */ g("label", {
188
+ children: [/* @__PURE__ */ _("div", { children: [/* @__PURE__ */ _("label", {
189
189
  htmlFor: "price",
190
190
  className: "block text-sm font-medium text-text-primary mb-1",
191
191
  children: [b("billing.addons.priceLabel", "Price"), " *"]
192
- }), /* @__PURE__ */ h("input", {
192
+ }), /* @__PURE__ */ g("input", {
193
193
  id: "price",
194
194
  type: "number",
195
195
  step: "0.01",
@@ -199,97 +199,97 @@ var y = () => {
199
199
  className: "w-full px-3 py-2 border border-border-subtle rounded-input bg-bg-surface text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]",
200
200
  placeholder: "9.99",
201
201
  required: !0
202
- })] }), /* @__PURE__ */ g("div", { children: [/* @__PURE__ */ g("label", {
202
+ })] }), /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ _("label", {
203
203
  htmlFor: "currency",
204
204
  className: "block text-sm font-medium text-text-primary mb-1",
205
205
  children: [b("billing.addons.currencyLabel", "Currency"), " *"]
206
- }), /* @__PURE__ */ g("select", {
206
+ }), /* @__PURE__ */ _("select", {
207
207
  id: "currency",
208
208
  value: I,
209
209
  onChange: (e) => L(e.target.value),
210
210
  className: "w-full px-3 py-2 border border-border-subtle rounded-input bg-bg-surface text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)] scheme-normal dark:scheme-dark [&_option]:bg-bg-surface [&_option]:text-text-primary",
211
211
  children: [
212
- /* @__PURE__ */ h("option", {
212
+ /* @__PURE__ */ g("option", {
213
213
  value: "USD",
214
214
  children: "USD ($)"
215
215
  }),
216
- /* @__PURE__ */ h("option", {
216
+ /* @__PURE__ */ g("option", {
217
217
  value: "EUR",
218
218
  children: "EUR"
219
219
  }),
220
- /* @__PURE__ */ h("option", {
220
+ /* @__PURE__ */ g("option", {
221
221
  value: "GBP",
222
222
  children: "GBP"
223
223
  }),
224
- /* @__PURE__ */ h("option", {
224
+ /* @__PURE__ */ g("option", {
225
225
  value: "INR",
226
226
  children: "INR"
227
227
  }),
228
- /* @__PURE__ */ h("option", {
228
+ /* @__PURE__ */ g("option", {
229
229
  value: "AUD",
230
230
  children: "AUD"
231
231
  }),
232
- /* @__PURE__ */ h("option", {
232
+ /* @__PURE__ */ g("option", {
233
233
  value: "CAD",
234
234
  children: "CAD"
235
235
  }),
236
- /* @__PURE__ */ h("option", {
236
+ /* @__PURE__ */ g("option", {
237
237
  value: "JPY",
238
238
  children: "JPY"
239
239
  }),
240
- /* @__PURE__ */ h("option", {
240
+ /* @__PURE__ */ g("option", {
241
241
  value: "SGD",
242
242
  children: "SGD"
243
243
  })
244
244
  ]
245
245
  })] })]
246
246
  }),
247
- /* @__PURE__ */ g("div", { children: [/* @__PURE__ */ g("label", {
247
+ /* @__PURE__ */ _("div", { children: [/* @__PURE__ */ _("label", {
248
248
  htmlFor: "duration",
249
249
  className: "block text-sm font-medium text-text-primary mb-1",
250
250
  children: [b("billing.addons.billingPeriodLabel", "Billing Period"), " *"]
251
- }), /* @__PURE__ */ g("select", {
251
+ }), /* @__PURE__ */ _("select", {
252
252
  id: "duration",
253
253
  value: R,
254
254
  onChange: (e) => z(e.target.value),
255
255
  className: "w-full px-3 py-2 border border-border-subtle rounded-input bg-bg-surface text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)] scheme-normal dark:scheme-dark [&_option]:bg-bg-surface [&_option]:text-text-primary",
256
- children: [/* @__PURE__ */ h("option", {
256
+ children: [/* @__PURE__ */ g("option", {
257
257
  value: u.MONTHLY,
258
258
  children: "Monthly"
259
- }), /* @__PURE__ */ h("option", {
259
+ }), /* @__PURE__ */ g("option", {
260
260
  value: u.YEARLY,
261
261
  children: "Yearly"
262
262
  })]
263
263
  })] }),
264
- /* @__PURE__ */ g("div", {
264
+ /* @__PURE__ */ _("div", {
265
265
  className: "flex items-center gap-3",
266
- children: [/* @__PURE__ */ h("input", {
266
+ children: [/* @__PURE__ */ g("input", {
267
267
  id: "isActive",
268
268
  type: "checkbox",
269
269
  checked: B,
270
270
  onChange: (e) => V(e.target.checked),
271
271
  className: "size-4 rounded border-border-subtle text-text-link focus:ring-[var(--color-focus-ring)]"
272
- }), /* @__PURE__ */ h("label", {
272
+ }), /* @__PURE__ */ g("label", {
273
273
  htmlFor: "isActive",
274
274
  className: "text-sm font-medium text-text-primary",
275
275
  children: b("billing.addons.addonIsActive", "Addon is active")
276
276
  })]
277
277
  }),
278
- /* @__PURE__ */ g("div", {
278
+ /* @__PURE__ */ _("div", {
279
279
  className: "flex items-start gap-3",
280
- children: [/* @__PURE__ */ h("input", {
280
+ children: [/* @__PURE__ */ g("input", {
281
281
  id: "requiresPaidSubscription",
282
282
  type: "checkbox",
283
283
  checked: H,
284
284
  onChange: (e) => U(e.target.checked),
285
285
  className: "mt-0.5 size-4 rounded border-border-subtle text-text-link focus:ring-[var(--color-focus-ring)]"
286
- }), /* @__PURE__ */ g("label", {
286
+ }), /* @__PURE__ */ _("label", {
287
287
  htmlFor: "requiresPaidSubscription",
288
288
  className: "text-sm text-text-primary",
289
- children: [/* @__PURE__ */ h("span", {
289
+ children: [/* @__PURE__ */ g("span", {
290
290
  className: "font-medium",
291
291
  children: b("billing.addons.requiresPaidSubscription", "Requires a paid subscription")
292
- }), /* @__PURE__ */ h("span", {
292
+ }), /* @__PURE__ */ g("span", {
293
293
  className: "block text-text-secondary",
294
294
  children: b("billing.addons.requiresPaidSubscriptionDesc", "Free-plan workspaces cannot buy this add-on. Clear it only for items sold to Free users on purpose, such as credit packs or fees.")
295
295
  })]
@@ -297,53 +297,53 @@ var y = () => {
297
297
  })
298
298
  ]
299
299
  })]
300
- }), /* @__PURE__ */ g("div", {
300
+ }), /* @__PURE__ */ _("div", {
301
301
  className: "border border-border-seam rounded-card bg-bg-surface overflow-hidden shadow-[var(--shadow-elevation-1)] h-fit",
302
- children: [/* @__PURE__ */ g("div", {
302
+ children: [/* @__PURE__ */ _("div", {
303
303
  className: "p-4 border-b border-border-subtle bg-bg-sunken/30 flex items-center justify-between",
304
- children: [/* @__PURE__ */ h("h2", {
304
+ children: [/* @__PURE__ */ g("h2", {
305
305
  className: "font-semibold text-text-primary",
306
306
  children: b("billing.addons.quotaAllocations", "Quota Allocations")
307
- }), /* @__PURE__ */ h("button", {
307
+ }), /* @__PURE__ */ g("button", {
308
308
  type: "button",
309
309
  onClick: Q,
310
310
  className: "px-3 py-1 text-sm font-medium text-text-link hover:bg-[var(--color-accent-soft)] rounded-md transition-colors",
311
311
  children: "+ Add Quota"
312
312
  })]
313
- }), /* @__PURE__ */ h("div", {
313
+ }), /* @__PURE__ */ g("div", {
314
314
  className: "p-4 space-y-3",
315
- children: W.length === 0 ? /* @__PURE__ */ h("p", {
315
+ children: W.length === 0 ? /* @__PURE__ */ g("p", {
316
316
  className: "text-sm text-text-muted",
317
317
  children: b("billing.addons.noQuotasAllocated", "No quotas allocated. Click \"Add Quota\" to add one.")
318
318
  }) : W.map((e, t) => {
319
319
  let n = O.find((t) => t.id === e.quotaId), r = n?.limits?.type ?? "unknown";
320
- return /* @__PURE__ */ g("div", {
320
+ return /* @__PURE__ */ _("div", {
321
321
  className: "p-3 border border-border-subtle rounded-lg bg-bg-sunken/20 space-y-3",
322
- children: [/* @__PURE__ */ g("div", {
322
+ children: [/* @__PURE__ */ _("div", {
323
323
  className: "flex items-center gap-3",
324
- children: [/* @__PURE__ */ g("select", {
324
+ children: [/* @__PURE__ */ _("select", {
325
325
  value: e.quotaId,
326
326
  onChange: (e) => $(t, "quotaId", e.target.value),
327
327
  className: `flex-1 px-3 py-2 border border-border-subtle rounded-input bg-bg-surface scheme-normal dark:scheme-dark [&_option]:bg-bg-surface [&_option]:text-text-primary focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)] ${e.quotaId === "" ? "text-text-muted" : "text-text-primary"}`,
328
- children: [/* @__PURE__ */ h("option", {
328
+ children: [/* @__PURE__ */ g("option", {
329
329
  value: "",
330
330
  disabled: !0,
331
331
  children: b("billing.addons.selectQuota", "Select a quota...")
332
- }), O.map((e) => /* @__PURE__ */ h("option", {
332
+ }), O.map((e) => /* @__PURE__ */ g("option", {
333
333
  value: e.id,
334
334
  children: e.name
335
335
  }, e.id))]
336
- }), /* @__PURE__ */ h("button", {
336
+ }), /* @__PURE__ */ g("button", {
337
337
  type: "button",
338
338
  onClick: () => te(t),
339
339
  className: "p-2 text-status-error-text hover:bg-status-error-bg-subtle rounded-md transition-colors",
340
340
  title: "Remove quota",
341
- children: /* @__PURE__ */ h("svg", {
341
+ children: /* @__PURE__ */ g("svg", {
342
342
  className: "size-5",
343
343
  fill: "none",
344
344
  viewBox: "0 0 24 24",
345
345
  stroke: "currentColor",
346
- children: /* @__PURE__ */ h("path", {
346
+ children: /* @__PURE__ */ g("path", {
347
347
  strokeLinecap: "round",
348
348
  strokeLinejoin: "round",
349
349
  strokeWidth: 2,
@@ -351,18 +351,18 @@ var y = () => {
351
351
  })
352
352
  })
353
353
  })]
354
- }), n && /* @__PURE__ */ g(m, { children: [/* @__PURE__ */ h("div", {
354
+ }), n && /* @__PURE__ */ _(h, { children: [/* @__PURE__ */ g("div", {
355
355
  className: "flex items-center justify-between text-sm",
356
- children: /* @__PURE__ */ g("span", {
356
+ children: /* @__PURE__ */ _("span", {
357
357
  className: "capitalize text-text-muted",
358
358
  children: ["Type: ", r]
359
359
  })
360
- }), /* @__PURE__ */ g("div", {
360
+ }), /* @__PURE__ */ _("div", {
361
361
  className: "flex items-center gap-2",
362
- children: [/* @__PURE__ */ g("label", {
362
+ children: [/* @__PURE__ */ _("label", {
363
363
  className: "text-sm text-text-muted",
364
364
  children: [b("billing.addons.limit", "Limit"), ":"]
365
- }), /* @__PURE__ */ h("input", {
365
+ }), /* @__PURE__ */ g("input", {
366
366
  type: "number",
367
367
  min: "1",
368
368
  value: e.quantity,
@@ -375,18 +375,18 @@ var y = () => {
375
375
  })]
376
376
  })]
377
377
  }),
378
- /* @__PURE__ */ h(r, {
378
+ /* @__PURE__ */ g(r, {
379
379
  overrides: K,
380
380
  onChange: q
381
381
  }),
382
- /* @__PURE__ */ g("div", {
382
+ /* @__PURE__ */ _("div", {
383
383
  className: "flex items-center gap-3 pt-4",
384
- children: [/* @__PURE__ */ h("button", {
384
+ children: [/* @__PURE__ */ g("button", {
385
385
  type: "submit",
386
386
  disabled: j,
387
387
  className: "px-6 py-2 text-sm font-medium bg-action-primary-bg text-action-primary-text rounded-button hover:bg-action-primary-bgHover transition-colors disabled:opacity-50",
388
388
  children: j ? b("billing.addons.saving", "Saving...") : b("billing.addons.saveChanges", "Save Changes")
389
- }), /* @__PURE__ */ h("button", {
389
+ }), /* @__PURE__ */ g("button", {
390
390
  type: "button",
391
391
  onClick: () => S(`/addons/${x}`),
392
392
  className: "px-6 py-2 text-sm font-medium border border-border-subtle text-text-primary rounded-button hover:bg-bg-sunken transition-colors",