@burdenoff/microfe-billing 2026.1113.2 → 2026.1113.4

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 (118) 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 +187 -164
  43. package/dist/billing/modules/credits/pages/CreditWithdrawalPage.js.map +1 -1
  44. package/dist/billing/modules/credits/pages/CreditsPage.js +67 -67
  45. package/dist/billing/modules/dashboard/pages/OverviewPage.js +594 -442
  46. package/dist/billing/modules/dashboard/pages/OverviewPage.js.map +1 -1
  47. package/dist/billing/modules/dashboard/utils/overviewSummary.d.ts +46 -0
  48. package/dist/billing/modules/dashboard/utils/overviewSummary.js +37 -0
  49. package/dist/billing/modules/dashboard/utils/overviewSummary.js.map +1 -0
  50. package/dist/billing/modules/discounts/pages/DiscountsListPage.js +199 -199
  51. package/dist/billing/modules/discounts/pages/DiscountsListPage.js.map +1 -1
  52. package/dist/billing/modules/earnings/components/PayoutDestinationList.d.ts +15 -0
  53. package/dist/billing/modules/earnings/components/PayoutDestinationList.js +66 -0
  54. package/dist/billing/modules/earnings/components/PayoutDestinationList.js.map +1 -0
  55. package/dist/billing/modules/earnings/components/PayoutErrorNotice.d.ts +7 -0
  56. package/dist/billing/modules/earnings/components/PayoutErrorNotice.js +19 -0
  57. package/dist/billing/modules/earnings/components/PayoutErrorNotice.js.map +1 -0
  58. package/dist/billing/modules/earnings/pages/DeveloperRevenueAdminPage.js +64 -64
  59. package/dist/billing/modules/earnings/pages/DeveloperRevenueOrgDetailPage.js +122 -122
  60. package/dist/billing/modules/earnings/pages/DeveloperRevenueOrgDetailPage.js.map +1 -1
  61. package/dist/billing/modules/earnings/pages/EarningsPage.js +123 -110
  62. package/dist/billing/modules/earnings/pages/EarningsPage.js.map +1 -1
  63. package/dist/billing/modules/earnings/pages/PayoutAdminPage.js +178 -178
  64. package/dist/billing/modules/earnings/pages/PayoutAdminPage.js.map +1 -1
  65. package/dist/billing/modules/earnings/pages/PayoutsPage.js +215 -157
  66. package/dist/billing/modules/earnings/pages/PayoutsPage.js.map +1 -1
  67. package/dist/billing/modules/earnings/utils/payoutDestination.d.ts +20 -0
  68. package/dist/billing/modules/earnings/utils/payoutDestination.js +27 -0
  69. package/dist/billing/modules/earnings/utils/payoutDestination.js.map +1 -0
  70. package/dist/billing/modules/earnings/utils/plainPayoutError.d.ts +10 -0
  71. package/dist/billing/modules/earnings/utils/plainPayoutError.js +50 -0
  72. package/dist/billing/modules/earnings/utils/plainPayoutError.js.map +1 -0
  73. package/dist/billing/modules/plans/pages/PlanAssignFreePage.js +54 -54
  74. package/dist/billing/modules/plans/pages/PlanBrowseDetailPage.js +94 -94
  75. package/dist/billing/modules/plans/pages/PlanCreatePage.js +73 -73
  76. package/dist/billing/modules/plans/pages/PlanDetailPage.js +96 -96
  77. package/dist/billing/modules/plans/pages/PlanEditPage.js +16 -16
  78. package/dist/billing/modules/plans/pages/PlanEditPage.js.map +1 -1
  79. package/dist/billing/modules/plans/pages/PlansBrowsePage.js +100 -100
  80. package/dist/billing/modules/plans/pages/PlansListPage.js +88 -88
  81. package/dist/billing/modules/promotions/pages/CreatePromotionPage.js +60 -60
  82. package/dist/billing/modules/promotions/pages/PromotionsListPage.js +37 -37
  83. package/dist/billing/modules/quota/pages/QuotaAssignFreePage.js +62 -62
  84. package/dist/billing/modules/quota/pages/QuotaPage.js +1 -1
  85. package/dist/billing/modules/quota/pages/QuotaTemplateCreatePage.js +69 -69
  86. package/dist/billing/modules/quota/pages/QuotaTemplateDetailPage.js +76 -76
  87. package/dist/billing/modules/quota/pages/QuotaTemplateEditPage.js +80 -80
  88. package/dist/billing/modules/quota/pages/QuotaTemplatesListPage.js +95 -95
  89. package/dist/billing/modules/settings/pages/SettingsPage.js +134 -134
  90. package/dist/billing/modules/settings/pages/SettingsPage.js.map +1 -1
  91. package/dist/billing/modules/settings/pages/TeamPermissionsPage.js +62 -62
  92. package/dist/billing/modules/settings/pages/TeamPermissionsPage.js.map +1 -1
  93. package/dist/billing/modules/subscriptions/components/ManageSeatsModal.js +36 -36
  94. package/dist/billing/modules/subscriptions/pages/SubscriptionDetailPage.js +534 -410
  95. package/dist/billing/modules/subscriptions/pages/SubscriptionDetailPage.js.map +1 -1
  96. package/dist/billing/modules/subscriptions/pages/SubscriptionsListPage.js +111 -111
  97. package/dist/billing/modules/subscriptions/pages/UpgradeSubscriptionPage.js +166 -160
  98. package/dist/billing/modules/subscriptions/pages/UpgradeSubscriptionPage.js.map +1 -1
  99. package/dist/billing/modules/subscriptions/utils/subscriptionDetailView.d.ts +30 -0
  100. package/dist/billing/modules/subscriptions/utils/subscriptionDetailView.js +20 -0
  101. package/dist/billing/modules/subscriptions/utils/subscriptionDetailView.js.map +1 -0
  102. package/dist/billing/modules/subscriptions/utils/upgradeAccess.d.ts +10 -0
  103. package/dist/billing/modules/subscriptions/utils/upgradeAccess.js +7 -0
  104. package/dist/billing/modules/subscriptions/utils/upgradeAccess.js.map +1 -0
  105. package/dist/billing/modules/usage/pages/UsagePage.js +722 -591
  106. package/dist/billing/modules/usage/pages/UsagePage.js.map +1 -1
  107. package/dist/billing/modules/usage/utils/usageHealth.d.ts +63 -0
  108. package/dist/billing/modules/usage/utils/usageHealth.js +43 -0
  109. package/dist/billing/modules/usage/utils/usageHealth.js.map +1 -0
  110. package/dist/billing/shared/components/EmptyState.js +3 -3
  111. package/dist/billing/shared/components/MoneyActionDialog.js +12 -12
  112. package/dist/billing/shared/ui/MetricCard.js +13 -13
  113. package/dist/billing/shared/utils/format.js +16 -4
  114. package/dist/billing/shared/utils/format.js.map +1 -1
  115. package/dist/billing/shared/utils/index.js +8 -8
  116. package/dist/generated/global-operations.js +294 -286
  117. package/dist/generated/global-operations.js.map +1 -1
  118. package/package.json +2 -2
@@ -11,10 +11,10 @@ import "../../../shared/components/index.js";
11
11
  import "../../../shared/utils/index.js";
12
12
  import { fetchAdminDeveloperRevenueOrg as u, fetchAdminDeveloperRevenueOrgDetail as d, fetchAdminDeveloperRevenueOrgMonthly as te, fetchAdminPayoutRequests as f, fetchBillingAccountCreditBalance as p, fetchCreditCost as m, retrySaleCreditSync as ne } from "../api.js";
13
13
  import { useCallback as h, useEffect as re, useMemo as g, useState as _ } from "react";
14
- import { ArrowLeft as ie, BadgeCheck as ae, CreditCard as oe, Loader2 as v, TrendingDown as y, TrendingUp as b, Wallet as se } from "lucide-react";
15
- import { useParams as ce } from "react-router";
16
- import { Fragment as le, jsx as x, jsxs as S } from "react/jsx-runtime";
17
- import { PagePurpose as C } from "@burdenoff/fe-libs/ui";
14
+ import { PagePurpose as ie } from "@burdenoff/fe-libs/ui";
15
+ import { ArrowLeft as ae, BadgeCheck as oe, CreditCard as se, Loader2 as v, TrendingDown as y, TrendingUp as b, Wallet as ce } from "lucide-react";
16
+ import { useParams as le } from "react-router";
17
+ import { Fragment as x, jsx as S, jsxs as C } from "react/jsx-runtime";
18
18
  // src/billing/modules/earnings/pages/DeveloperRevenueOrgDetailPage.tsx
19
19
  var w = "all", T = {
20
20
  REQUESTED: "Requested",
@@ -34,7 +34,7 @@ var w = "all", T = {
34
34
  CANCELED: "bg-bg-sunken text-text-muted"
35
35
  };
36
36
  function D({ status: e }) {
37
- return /* @__PURE__ */ x("span", {
37
+ return /* @__PURE__ */ S("span", {
38
38
  className: `inline-flex items-center rounded-full px-2.5 py-0.5 text-xs font-medium ${E[e] ?? "bg-bg-sunken text-text-muted"}`,
39
39
  children: T[e] ?? e
40
40
  });
@@ -54,75 +54,75 @@ function ue(e) {
54
54
  };
55
55
  }
56
56
  function de({ points: e }) {
57
- return e.length === 0 ? /* @__PURE__ */ x("div", {
57
+ return e.length === 0 ? /* @__PURE__ */ S("div", {
58
58
  className: "px-5 py-10 text-center text-sm text-text-muted",
59
59
  children: "No sales recorded yet — the revenue trend will appear once the first sale comes in."
60
- }) : /* @__PURE__ */ x("div", {
60
+ }) : /* @__PURE__ */ S("div", {
61
61
  className: "overflow-x-auto",
62
- children: /* @__PURE__ */ S("table", {
62
+ children: /* @__PURE__ */ C("table", {
63
63
  className: "min-w-full text-sm",
64
- children: [/* @__PURE__ */ x("thead", {
64
+ children: [/* @__PURE__ */ S("thead", {
65
65
  className: "bg-bg-sunken/60 text-left text-xs uppercase tracking-wide text-text-muted",
66
- children: /* @__PURE__ */ S("tr", { children: [
67
- /* @__PURE__ */ x("th", {
66
+ children: /* @__PURE__ */ C("tr", { children: [
67
+ /* @__PURE__ */ S("th", {
68
68
  className: "px-4 py-3",
69
69
  children: "Month"
70
70
  }),
71
- /* @__PURE__ */ x("th", {
71
+ /* @__PURE__ */ S("th", {
72
72
  className: "px-4 py-3",
73
73
  children: "Gross revenue"
74
74
  }),
75
- /* @__PURE__ */ x("th", {
75
+ /* @__PURE__ */ S("th", {
76
76
  className: "px-4 py-3",
77
77
  children: "Platform fee"
78
78
  }),
79
- /* @__PURE__ */ x("th", {
79
+ /* @__PURE__ */ S("th", {
80
80
  className: "px-4 py-3",
81
81
  children: "Net revenue"
82
82
  }),
83
- /* @__PURE__ */ x("th", {
83
+ /* @__PURE__ */ S("th", {
84
84
  className: "px-4 py-3",
85
85
  children: "Sales"
86
86
  }),
87
- /* @__PURE__ */ x("th", {
87
+ /* @__PURE__ */ S("th", {
88
88
  className: "px-4 py-3",
89
89
  children: "Growth (MoM)"
90
90
  })
91
91
  ] })
92
- }), /* @__PURE__ */ x("tbody", { children: e.map((t, n) => {
92
+ }), /* @__PURE__ */ S("tbody", { children: e.map((t, n) => {
93
93
  let r = n > 0 ? e[n - 1] : null, i = r && r.grossRevenue > 0 ? (t.grossRevenue - r.grossRevenue) / r.grossRevenue * 100 : null;
94
- return /* @__PURE__ */ S("tr", {
94
+ return /* @__PURE__ */ C("tr", {
95
95
  className: "border-t border-border-seam",
96
96
  children: [
97
- /* @__PURE__ */ x("td", {
97
+ /* @__PURE__ */ S("td", {
98
98
  className: "px-4 py-3 font-medium text-text-primary",
99
99
  children: O(t.month)
100
100
  }),
101
- /* @__PURE__ */ x("td", {
101
+ /* @__PURE__ */ S("td", {
102
102
  className: "px-4 py-3 text-text-primary",
103
103
  children: s(t.grossRevenue, "USD")
104
104
  }),
105
- /* @__PURE__ */ x("td", {
105
+ /* @__PURE__ */ S("td", {
106
106
  className: "px-4 py-3 text-text-secondary",
107
107
  children: s(t.platformFees, "USD")
108
108
  }),
109
- /* @__PURE__ */ x("td", {
109
+ /* @__PURE__ */ S("td", {
110
110
  className: "px-4 py-3 text-text-secondary",
111
111
  children: s(t.netRevenue, "USD")
112
112
  }),
113
- /* @__PURE__ */ x("td", {
113
+ /* @__PURE__ */ S("td", {
114
114
  className: "px-4 py-3 text-text-secondary",
115
115
  children: t.salesCount
116
116
  }),
117
- /* @__PURE__ */ x("td", {
117
+ /* @__PURE__ */ S("td", {
118
118
  className: "px-4 py-3",
119
- children: i === null ? /* @__PURE__ */ x("span", {
119
+ children: i === null ? /* @__PURE__ */ S("span", {
120
120
  className: "text-text-muted",
121
121
  children: "—"
122
- }) : /* @__PURE__ */ S("span", {
122
+ }) : /* @__PURE__ */ C("span", {
123
123
  className: `inline-flex items-center gap-1 font-medium ${i >= 0 ? "text-status-success-text" : "text-status-error-text"}`,
124
124
  children: [
125
- x(i >= 0 ? b : y, { className: "size-3.5" }),
125
+ S(i >= 0 ? b : y, { className: "size-3.5" }),
126
126
  i >= 0 ? "+" : "",
127
127
  i.toFixed(1),
128
128
  "%"
@@ -136,65 +136,65 @@ function de({ points: e }) {
136
136
  });
137
137
  }
138
138
  function fe({ requests: e }) {
139
- return e.length === 0 ? /* @__PURE__ */ x("div", {
139
+ return e.length === 0 ? /* @__PURE__ */ S("div", {
140
140
  className: "px-5 py-10 text-center text-sm text-text-muted",
141
141
  children: "No withdrawal requests in this period."
142
- }) : /* @__PURE__ */ x("div", {
142
+ }) : /* @__PURE__ */ S("div", {
143
143
  className: "overflow-x-auto",
144
- children: /* @__PURE__ */ S("table", {
144
+ children: /* @__PURE__ */ C("table", {
145
145
  className: "min-w-full text-sm",
146
- children: [/* @__PURE__ */ x("thead", {
146
+ children: [/* @__PURE__ */ S("thead", {
147
147
  className: "bg-bg-sunken/60 text-left text-xs uppercase tracking-wide text-text-muted",
148
- children: /* @__PURE__ */ S("tr", { children: [
149
- /* @__PURE__ */ x("th", {
148
+ children: /* @__PURE__ */ C("tr", { children: [
149
+ /* @__PURE__ */ S("th", {
150
150
  className: "px-4 py-3",
151
151
  children: "Requested"
152
152
  }),
153
- /* @__PURE__ */ x("th", {
153
+ /* @__PURE__ */ S("th", {
154
154
  className: "px-4 py-3",
155
155
  children: "Kind"
156
156
  }),
157
- /* @__PURE__ */ x("th", {
157
+ /* @__PURE__ */ S("th", {
158
158
  className: "px-4 py-3",
159
159
  children: "Amount"
160
160
  }),
161
- /* @__PURE__ */ x("th", {
161
+ /* @__PURE__ */ S("th", {
162
162
  className: "px-4 py-3",
163
163
  children: "Status"
164
164
  }),
165
- /* @__PURE__ */ x("th", {
165
+ /* @__PURE__ */ S("th", {
166
166
  className: "px-4 py-3",
167
167
  children: "Paid"
168
168
  }),
169
- /* @__PURE__ */ x("th", {
169
+ /* @__PURE__ */ S("th", {
170
170
  className: "px-4 py-3",
171
171
  children: "Notes"
172
172
  })
173
173
  ] })
174
- }), /* @__PURE__ */ x("tbody", { children: e.map((e) => /* @__PURE__ */ S("tr", {
174
+ }), /* @__PURE__ */ S("tbody", { children: e.map((e) => /* @__PURE__ */ C("tr", {
175
175
  className: "border-t border-border-seam",
176
176
  children: [
177
- /* @__PURE__ */ x("td", {
177
+ /* @__PURE__ */ S("td", {
178
178
  className: "px-4 py-3 text-text-secondary",
179
179
  children: c(e.createdAt)
180
180
  }),
181
- /* @__PURE__ */ x("td", {
181
+ /* @__PURE__ */ S("td", {
182
182
  className: "px-4 py-3 text-text-secondary",
183
183
  children: e.requestKind === "CREDIT_CONVERSION" ? "Revenue-share credits" : "Cash payout"
184
184
  }),
185
- /* @__PURE__ */ x("td", {
185
+ /* @__PURE__ */ S("td", {
186
186
  className: "px-4 py-3 font-medium text-text-primary",
187
187
  children: s(e.requestedAmount, e.currency)
188
188
  }),
189
- /* @__PURE__ */ x("td", {
189
+ /* @__PURE__ */ S("td", {
190
190
  className: "px-4 py-3",
191
- children: /* @__PURE__ */ x(D, { status: e.status })
191
+ children: /* @__PURE__ */ S(D, { status: e.status })
192
192
  }),
193
- /* @__PURE__ */ x("td", {
193
+ /* @__PURE__ */ S("td", {
194
194
  className: "px-4 py-3 text-text-secondary",
195
195
  children: e.paidAt ? c(e.paidAt) : "—"
196
196
  }),
197
- /* @__PURE__ */ x("td", {
197
+ /* @__PURE__ */ S("td", {
198
198
  className: "px-4 py-3 text-text-muted",
199
199
  children: e.failureReason || e.userNotes || "—"
200
200
  })
@@ -204,7 +204,7 @@ function fe({ requests: e }) {
204
204
  });
205
205
  }
206
206
  var k = () => {
207
- let { organizationId: y } = ce(), T = ee(), { apiGatewayUrl: E, authToken: D, orgId: k } = e(), pe = a(), [A, j] = _(null), [M, N] = _([]), [P, F] = _(null), [I, L] = _(null), [R, z] = _([]), [B, me] = _(null), [he, ge] = _([]), [V, H] = _(w), [_e, U] = _(!0), [W, G] = _(!1), [K, q] = _(null), [J, Y] = _(null), X = g(() => ({
207
+ let { organizationId: y } = le(), T = ee(), { apiGatewayUrl: E, authToken: D, orgId: k } = e(), pe = a(), [A, j] = _(null), [M, N] = _([]), [P, F] = _(null), [I, L] = _(null), [R, z] = _([]), [B, me] = _(null), [he, ge] = _([]), [V, H] = _(w), [_e, U] = _(!0), [W, G] = _(!1), [K, q] = _(null), [J, Y] = _(null), X = g(() => ({
208
208
  apiGatewayUrl: E,
209
209
  authToken: D,
210
210
  orgId: k
@@ -265,160 +265,160 @@ var k = () => {
265
265
  q(e instanceof Error ? e : /* @__PURE__ */ Error("Failed to load period data"));
266
266
  }).finally(() => G(!1)));
267
267
  };
268
- if (!T.isBillingAdmin) return /* @__PURE__ */ x(t, { message: "You don't have permission to view developer revenue." });
269
- if (K && l(K)) return /* @__PURE__ */ x(i, {
268
+ if (!T.isBillingAdmin) return /* @__PURE__ */ S(t, { message: "You don't have permission to view developer revenue." });
269
+ if (K && l(K)) return /* @__PURE__ */ S(i, {
270
270
  title: "Developer revenue unavailable",
271
271
  message: K.message,
272
272
  showRetry: !0,
273
273
  onRetry: () => void Q()
274
274
  });
275
- if (_e || !A) return /* @__PURE__ */ x("div", {
275
+ if (_e || !A) return /* @__PURE__ */ S("div", {
276
276
  className: "flex items-center justify-center py-20 text-text-secondary",
277
- children: /* @__PURE__ */ x(v, { className: "size-8 animate-spin" })
277
+ children: /* @__PURE__ */ S(v, { className: "size-8 animate-spin" })
278
278
  });
279
279
  let ye = R.filter((e) => e.status === "PAID").reduce((e, t) => e + (t.approvedAmount ?? t.requestedAmount), 0), $ = R.filter((e) => [
280
280
  "REQUESTED",
281
281
  "APPROVED",
282
282
  "PROCESSING"
283
283
  ].includes(e.status)).reduce((e, t) => e + t.requestedAmount, 0), be = [...M].reverse();
284
- return /* @__PURE__ */ S("div", {
284
+ return /* @__PURE__ */ C("div", {
285
285
  className: "space-y-6 p-6",
286
286
  children: [
287
- /* @__PURE__ */ x(n, {
287
+ /* @__PURE__ */ S(n, {
288
288
  title: A.name,
289
289
  description: `/${A.slug}${A.isVerified ? " · Verified developer organization" : ""}`,
290
- actions: /* @__PURE__ */ S("button", {
290
+ actions: /* @__PURE__ */ C("button", {
291
291
  type: "button",
292
292
  onClick: () => pe("/developer-revenue"),
293
293
  className: "inline-flex items-center gap-2 rounded-md border border-border-subtle px-4 py-2 text-sm font-medium text-text-primary",
294
- children: [/* @__PURE__ */ x(ie, { className: "size-4" }), "Back to developer revenue"]
294
+ children: [/* @__PURE__ */ S(ae, { className: "size-4" }), "Back to developer revenue"]
295
295
  })
296
296
  }),
297
- /* @__PURE__ */ x(C, { children: "Store revenue for this org is credited into its linked billing account as earned credits. The developer withdraws those credits later through their own billing withdrawal flow — this page is a read-and-verify view of that whole loop, from sale to payout." }),
298
- /* @__PURE__ */ S("div", {
297
+ /* @__PURE__ */ S(ie, { children: "Store revenue for this org is credited into its linked billing account as earned credits. The developer withdraws those credits later through their own billing withdrawal flow — this page is a read-and-verify view of that whole loop, from sale to payout." }),
298
+ /* @__PURE__ */ C("div", {
299
299
  className: "grid gap-3 md:grid-cols-2 xl:grid-cols-4",
300
300
  children: [
301
- /* @__PURE__ */ x(r, {
301
+ /* @__PURE__ */ S(r, {
302
302
  label: "Gross revenue (all time)",
303
303
  value: s(A.totalRevenue, "USD"),
304
- icon: /* @__PURE__ */ x(b, { className: "size-4" })
304
+ icon: /* @__PURE__ */ S(b, { className: "size-4" })
305
305
  }),
306
- /* @__PURE__ */ x(r, {
306
+ /* @__PURE__ */ S(r, {
307
307
  label: "Platform fees (all time)",
308
308
  value: s(A.totalPlatformFees, "USD"),
309
- icon: /* @__PURE__ */ x(oe, { className: "size-4" })
309
+ icon: /* @__PURE__ */ S(se, { className: "size-4" })
310
310
  }),
311
- /* @__PURE__ */ x(r, {
311
+ /* @__PURE__ */ S(r, {
312
312
  label: "Pending earned credits",
313
313
  value: s(B?.summary?.pendingBalance ?? A.pendingBalance, "USD"),
314
- icon: /* @__PURE__ */ x(se, { className: "size-4" })
314
+ icon: /* @__PURE__ */ S(ce, { className: "size-4" })
315
315
  }),
316
- /* @__PURE__ */ x(r, {
316
+ /* @__PURE__ */ S(r, {
317
317
  label: "Already withdrawn (all time)",
318
318
  value: s(ye, "USD"),
319
- icon: /* @__PURE__ */ x(ae, { className: "size-4" })
319
+ icon: /* @__PURE__ */ S(oe, { className: "size-4" })
320
320
  })
321
321
  ]
322
322
  }),
323
- /* @__PURE__ */ S("section", {
323
+ /* @__PURE__ */ C("section", {
324
324
  className: "overflow-hidden rounded-card border border-border-seam bg-bg-surface shadow-[var(--shadow-elevation-1)]",
325
325
  children: [
326
- /* @__PURE__ */ S("div", {
326
+ /* @__PURE__ */ C("div", {
327
327
  className: "border-b border-border-seam px-5 py-4",
328
- children: [/* @__PURE__ */ x("h2", {
328
+ children: [/* @__PURE__ */ S("h2", {
329
329
  className: "text-base font-semibold text-text-primary",
330
330
  children: "Billing account balance"
331
- }), /* @__PURE__ */ x("p", {
331
+ }), /* @__PURE__ */ S("p", {
332
332
  className: "mt-1 text-sm text-text-muted",
333
333
  children: "The current credit ledger on the org's linked billing account, right now. These are credit units, not currency — 1 credit is worth a small fraction of $1 at the platform's current credit rate."
334
334
  })]
335
335
  }),
336
- A.billingAccountId ? P ? /* @__PURE__ */ S(le, { children: [/* @__PURE__ */ S("div", {
336
+ A.billingAccountId ? P ? /* @__PURE__ */ C(x, { children: [/* @__PURE__ */ C("div", {
337
337
  className: "grid gap-3 p-5 md:grid-cols-3 xl:grid-cols-5",
338
338
  children: [
339
- /* @__PURE__ */ x(r, {
339
+ /* @__PURE__ */ S(r, {
340
340
  label: "Earned",
341
341
  value: o(P.earned)
342
342
  }),
343
- /* @__PURE__ */ x(r, {
343
+ /* @__PURE__ */ S(r, {
344
344
  label: "Purchased",
345
345
  value: o(P.purchased)
346
346
  }),
347
- /* @__PURE__ */ x(r, {
347
+ /* @__PURE__ */ S(r, {
348
348
  label: "Granted",
349
349
  value: o(P.granted)
350
350
  }),
351
- /* @__PURE__ */ x(r, {
351
+ /* @__PURE__ */ S(r, {
352
352
  label: "Withdrawable",
353
353
  value: o(P.withdrawable)
354
354
  }),
355
- /* @__PURE__ */ x(r, {
355
+ /* @__PURE__ */ S(r, {
356
356
  label: "Total balance",
357
357
  value: o(P.total)
358
358
  })
359
359
  ]
360
- }), /* @__PURE__ */ x("div", {
360
+ }), /* @__PURE__ */ S("div", {
361
361
  className: "px-5 pb-4 text-xs text-text-muted",
362
362
  children: I === null ? "Estimated cash value could not be loaded." : `≈ ${s(I, "USD")} total at the current credit rate.`
363
- })] }) : /* @__PURE__ */ x("div", {
363
+ })] }) : /* @__PURE__ */ S("div", {
364
364
  className: "px-5 py-8 text-center text-sm text-text-muted",
365
365
  children: "Credit balance could not be loaded."
366
- }) : /* @__PURE__ */ x("div", {
366
+ }) : /* @__PURE__ */ S("div", {
367
367
  className: "px-5 py-8 text-center text-sm text-text-muted",
368
368
  children: "No billing account is linked yet — revenue cannot be credited until this org links one."
369
369
  }),
370
- $ > 0 && /* @__PURE__ */ S("div", {
370
+ $ > 0 && /* @__PURE__ */ C("div", {
371
371
  className: "border-t border-border-seam bg-status-warning-bg-subtle px-5 py-3 text-xs text-status-warning-text",
372
372
  children: [s($, "USD"), " is currently tied up in a pending or approved withdrawal request — it has already left the withdrawable balance above."]
373
373
  })
374
374
  ]
375
375
  }),
376
- /* @__PURE__ */ S("section", {
376
+ /* @__PURE__ */ C("section", {
377
377
  className: "overflow-hidden rounded-card border border-border-seam bg-bg-surface shadow-[var(--shadow-elevation-1)]",
378
- children: [/* @__PURE__ */ S("div", {
378
+ children: [/* @__PURE__ */ C("div", {
379
379
  className: "border-b border-border-seam px-5 py-4",
380
- children: [/* @__PURE__ */ x("h2", {
380
+ children: [/* @__PURE__ */ S("h2", {
381
381
  className: "text-base font-semibold text-text-primary",
382
382
  children: "Monthly revenue trend"
383
- }), /* @__PURE__ */ x("p", {
383
+ }), /* @__PURE__ */ S("p", {
384
384
  className: "mt-1 text-sm text-text-muted",
385
385
  children: "Last 12 months of gross/net revenue for this org, computed from completed sales."
386
386
  })]
387
- }), /* @__PURE__ */ x(de, { points: M })]
387
+ }), /* @__PURE__ */ S(de, { points: M })]
388
388
  }),
389
- /* @__PURE__ */ S("div", {
389
+ /* @__PURE__ */ C("div", {
390
390
  className: "flex flex-wrap items-center justify-between gap-3 rounded-card border border-border-seam bg-bg-surface px-5 py-4 shadow-[var(--shadow-elevation-1)]",
391
- children: [/* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("h2", {
391
+ children: [/* @__PURE__ */ C("div", { children: [/* @__PURE__ */ S("h2", {
392
392
  className: "text-sm font-semibold text-text-primary",
393
393
  children: "Viewing activity for"
394
- }), /* @__PURE__ */ x("p", {
394
+ }), /* @__PURE__ */ S("p", {
395
395
  className: "mt-1 text-xs text-text-muted",
396
396
  children: "Scopes both the withdrawal history and sales tables below — pick a single month to keep long-running orgs easy to review, or switch to all time."
397
- })] }), /* @__PURE__ */ S("div", {
397
+ })] }), /* @__PURE__ */ C("div", {
398
398
  className: "flex items-center gap-2",
399
- children: [W && /* @__PURE__ */ x(v, { className: "size-4 animate-spin text-text-muted" }), /* @__PURE__ */ S("select", {
399
+ children: [W && /* @__PURE__ */ S(v, { className: "size-4 animate-spin text-text-muted" }), /* @__PURE__ */ C("select", {
400
400
  value: V,
401
401
  onChange: (e) => ve(e.target.value),
402
402
  disabled: W,
403
403
  className: "rounded-md border border-border-subtle bg-bg-surface scheme-normal dark:scheme-dark [&_option]:bg-bg-surface [&_option]:text-text-primary px-3 py-2 text-sm text-text-primary disabled:opacity-50",
404
- children: [/* @__PURE__ */ x("option", {
404
+ children: [/* @__PURE__ */ S("option", {
405
405
  value: w,
406
406
  children: "All time"
407
- }), be.map((e) => /* @__PURE__ */ x("option", {
407
+ }), be.map((e) => /* @__PURE__ */ S("option", {
408
408
  value: e.month,
409
409
  children: O(e.month)
410
410
  }, e.month))]
411
411
  })]
412
412
  })]
413
413
  }),
414
- /* @__PURE__ */ S("section", {
414
+ /* @__PURE__ */ C("section", {
415
415
  className: "overflow-hidden rounded-card border border-border-seam bg-bg-surface shadow-[var(--shadow-elevation-1)]",
416
- children: [/* @__PURE__ */ S("div", {
416
+ children: [/* @__PURE__ */ C("div", {
417
417
  className: "border-b border-border-seam px-5 py-4",
418
- children: [/* @__PURE__ */ x("h2", {
418
+ children: [/* @__PURE__ */ S("h2", {
419
419
  className: "text-base font-semibold text-text-primary",
420
420
  children: "Withdrawal history"
421
- }), /* @__PURE__ */ S("p", {
421
+ }), /* @__PURE__ */ C("p", {
422
422
  className: "mt-1 text-sm text-text-muted",
423
423
  children: [
424
424
  "Payout requests this org made in",
@@ -427,19 +427,19 @@ var k = () => {
427
427
  " — both revenue-share credit conversions and cash payouts — with current status."
428
428
  ]
429
429
  })]
430
- }), /* @__PURE__ */ x("div", {
430
+ }), /* @__PURE__ */ S("div", {
431
431
  className: W ? "pointer-events-none opacity-50" : void 0,
432
- children: /* @__PURE__ */ x(fe, { requests: he })
432
+ children: /* @__PURE__ */ S(fe, { requests: he })
433
433
  })]
434
434
  }),
435
- /* @__PURE__ */ S("section", {
435
+ /* @__PURE__ */ C("section", {
436
436
  className: "overflow-hidden rounded-card border border-border-seam bg-bg-surface shadow-[var(--shadow-elevation-1)]",
437
- children: [/* @__PURE__ */ S("div", {
437
+ children: [/* @__PURE__ */ C("div", {
438
438
  className: "border-b border-border-seam px-5 py-4",
439
- children: [/* @__PURE__ */ x("h2", {
439
+ children: [/* @__PURE__ */ S("h2", {
440
440
  className: "text-base font-semibold text-text-primary",
441
441
  children: "Sales currently contributing to earned credits"
442
- }), /* @__PURE__ */ S("p", {
442
+ }), /* @__PURE__ */ C("p", {
443
443
  className: "mt-1 text-xs text-text-muted",
444
444
  children: [
445
445
  "Unpaid sales purchased in",
@@ -448,68 +448,68 @@ var k = () => {
448
448
  " that should exist as earned credits in the linked billing account until the developer withdraws them."
449
449
  ]
450
450
  })]
451
- }), /* @__PURE__ */ x("div", {
451
+ }), /* @__PURE__ */ S("div", {
452
452
  className: `overflow-x-auto ${W ? "pointer-events-none opacity-50" : ""}`,
453
- children: /* @__PURE__ */ S("table", {
453
+ children: /* @__PURE__ */ C("table", {
454
454
  className: "min-w-full text-sm",
455
- children: [/* @__PURE__ */ x("thead", {
455
+ children: [/* @__PURE__ */ S("thead", {
456
456
  className: "bg-bg-sunken/60 text-left text-xs uppercase tracking-wide text-text-muted",
457
- children: /* @__PURE__ */ S("tr", { children: [
458
- /* @__PURE__ */ x("th", {
457
+ children: /* @__PURE__ */ C("tr", { children: [
458
+ /* @__PURE__ */ S("th", {
459
459
  className: "px-4 py-3",
460
460
  children: "Application"
461
461
  }),
462
- /* @__PURE__ */ x("th", {
462
+ /* @__PURE__ */ S("th", {
463
463
  className: "px-4 py-3",
464
464
  children: "Purchased"
465
465
  }),
466
- /* @__PURE__ */ x("th", {
466
+ /* @__PURE__ */ S("th", {
467
467
  className: "px-4 py-3",
468
468
  children: "Net revenue"
469
469
  }),
470
- /* @__PURE__ */ x("th", {
470
+ /* @__PURE__ */ S("th", {
471
471
  className: "px-4 py-3",
472
472
  children: "Credit sync"
473
473
  }),
474
- /* @__PURE__ */ x("th", {
474
+ /* @__PURE__ */ S("th", {
475
475
  className: "px-4 py-3",
476
476
  children: "Status"
477
477
  })
478
478
  ] })
479
- }), /* @__PURE__ */ x("tbody", { children: !B || B.unpaidSales.items.length === 0 ? /* @__PURE__ */ x("tr", { children: /* @__PURE__ */ x("td", {
479
+ }), /* @__PURE__ */ S("tbody", { children: !B || B.unpaidSales.items.length === 0 ? /* @__PURE__ */ S("tr", { children: /* @__PURE__ */ S("td", {
480
480
  colSpan: 5,
481
481
  className: "px-4 py-8 text-center text-sm text-text-muted",
482
482
  children: "No outstanding unpaid sales in this period."
483
- }) }) : B.unpaidSales.items.map((e) => /* @__PURE__ */ S("tr", {
483
+ }) }) : B.unpaidSales.items.map((e) => /* @__PURE__ */ C("tr", {
484
484
  className: "border-t border-border-seam",
485
485
  children: [
486
- /* @__PURE__ */ S("td", {
486
+ /* @__PURE__ */ C("td", {
487
487
  className: "px-4 py-3",
488
- children: [/* @__PURE__ */ x("div", {
488
+ children: [/* @__PURE__ */ S("div", {
489
489
  className: "font-medium text-text-primary",
490
490
  children: e.application?.name ?? "Unknown app"
491
- }), /* @__PURE__ */ S("div", {
491
+ }), /* @__PURE__ */ C("div", {
492
492
  className: "text-xs text-text-muted",
493
493
  children: ["/", e.application?.slug ?? "unknown"]
494
494
  })]
495
495
  }),
496
- /* @__PURE__ */ x("td", {
496
+ /* @__PURE__ */ S("td", {
497
497
  className: "px-4 py-3 text-text-secondary",
498
498
  children: c(e.purchasedAt)
499
499
  }),
500
- /* @__PURE__ */ x("td", {
500
+ /* @__PURE__ */ S("td", {
501
501
  className: "px-4 py-3 text-text-primary",
502
502
  children: s(e.netAmount, e.currency)
503
503
  }),
504
- /* @__PURE__ */ S("td", {
504
+ /* @__PURE__ */ C("td", {
505
505
  className: "px-4 py-3 text-text-secondary",
506
506
  children: [
507
- /* @__PURE__ */ x("div", { children: e.billingCreditSyncStatus ?? "UNKNOWN" }),
508
- e.billingCreditSyncError && /* @__PURE__ */ x("div", {
507
+ /* @__PURE__ */ S("div", { children: e.billingCreditSyncStatus ?? "UNKNOWN" }),
508
+ e.billingCreditSyncError && /* @__PURE__ */ S("div", {
509
509
  className: "mt-1 text-xs text-status-error-text",
510
510
  children: e.billingCreditSyncError
511
511
  }),
512
- e.billingCreditSyncStatus !== "SYNCED" && A.billingAccountId && /* @__PURE__ */ x("button", {
512
+ e.billingCreditSyncStatus !== "SYNCED" && A.billingAccountId && /* @__PURE__ */ S("button", {
513
513
  type: "button",
514
514
  onClick: () => {
515
515
  y && (async () => {
@@ -527,7 +527,7 @@ var k = () => {
527
527
  })
528
528
  ]
529
529
  }),
530
- /* @__PURE__ */ x("td", {
530
+ /* @__PURE__ */ S("td", {
531
531
  className: "px-4 py-3 text-text-secondary",
532
532
  children: e.status
533
533
  })