@openrails/billing-ui 0.273.0 → 0.274.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (160) hide show
  1. package/dist/admin/components/customer-search.d.ts +5 -0
  2. package/dist/admin/components/missing-record.d.ts +6 -0
  3. package/dist/admin/components/status-badge.d.ts +1 -0
  4. package/dist/admin/context.d.ts +20 -2
  5. package/dist/admin/lib/api/endpoints.d.ts +3 -1
  6. package/dist/admin/lib/api/index.d.ts +2 -0
  7. package/dist/admin/lib/api/types.d.ts +2 -0
  8. package/dist/admin/lib/capabilities.d.ts +4 -0
  9. package/dist/admin/lib/dialog-width.d.ts +4 -3
  10. package/dist/admin/lib/error-text.d.ts +4 -0
  11. package/dist/admin/lib/mutations.d.ts +6 -1
  12. package/dist/admin/lib/queries.d.ts +3 -0
  13. package/dist/admin/lib/tile-grids.d.ts +6 -0
  14. package/dist/admin/messages.d.ts +89 -0
  15. package/dist/admin/pages/payments/index.d.ts +1 -2
  16. package/dist/admin/pages/subscriptions/index.d.ts +1 -2
  17. package/dist/{admin-attempts-DyDDt-qw.js → admin-attempts-Dzipkstg.js} +145 -144
  18. package/dist/admin-attempts-Dzipkstg.js.map +1 -0
  19. package/dist/{admin-auth-1aZIgXiS.js → admin-auth-BCl_Tv3t.js} +2 -2
  20. package/dist/{admin-auth-1aZIgXiS.js.map → admin-auth-BCl_Tv3t.js.map} +1 -1
  21. package/dist/{admin-badge-pgG6D9-a.js → admin-badge-kmYQM9Ge.js} +2 -2
  22. package/dist/{admin-badge-pgG6D9-a.js.map → admin-badge-kmYQM9Ge.js.map} +1 -1
  23. package/dist/{admin-button-CrcYk5r0.js → admin-button-Cq9ZfX4R.js} +2 -2
  24. package/dist/{admin-button-CrcYk5r0.js.map → admin-button-Cq9ZfX4R.js.map} +1 -1
  25. package/dist/{admin-capabilities-BDcZeHL_.js → admin-capabilities-k5fQZhN9.js} +35 -14
  26. package/dist/admin-capabilities-k5fQZhN9.js.map +1 -0
  27. package/dist/{admin-card-DvTMc5Se.js → admin-card-C8k67jJv.js} +2 -2
  28. package/dist/{admin-card-DvTMc5Se.js.map → admin-card-C8k67jJv.js.map} +1 -1
  29. package/dist/{admin-catalog-BlF5mnu4.js → admin-catalog-CON-GwKL.js} +286 -286
  30. package/dist/{admin-catalog-BlF5mnu4.js.map → admin-catalog-CON-GwKL.js.map} +1 -1
  31. package/dist/{admin-cursor-pager-CIb3Jw2F.js → admin-cursor-pager-DqFruoNu.js} +6 -6
  32. package/dist/{admin-cursor-pager-CIb3Jw2F.js.map → admin-cursor-pager-DqFruoNu.js.map} +1 -1
  33. package/dist/admin-customer-search-CJHB80rg.js +117 -0
  34. package/dist/admin-customer-search-CJHB80rg.js.map +1 -0
  35. package/dist/{admin-customers-EpfoWDh-.js → admin-customers-CWWOrcVR.js} +18 -17
  36. package/dist/{admin-customers-EpfoWDh-.js.map → admin-customers-CWWOrcVR.js.map} +1 -1
  37. package/dist/admin-dashboard-BiShWFk2.js +456 -0
  38. package/dist/admin-dashboard-BiShWFk2.js.map +1 -0
  39. package/dist/admin-data-table-CdsjYJh5.js +107 -0
  40. package/dist/admin-data-table-CdsjYJh5.js.map +1 -0
  41. package/dist/admin-detail-BWSC1aCH.js +338 -0
  42. package/dist/admin-detail-BWSC1aCH.js.map +1 -0
  43. package/dist/admin-detail-CKRtK43V.js +728 -0
  44. package/dist/admin-detail-CKRtK43V.js.map +1 -0
  45. package/dist/admin-detail-CMmhZQ2A.js +346 -0
  46. package/dist/admin-detail-CMmhZQ2A.js.map +1 -0
  47. package/dist/admin-detail-CiONe1Pt.js +1357 -0
  48. package/dist/admin-detail-CiONe1Pt.js.map +1 -0
  49. package/dist/{admin-detail-3wFIDPNB.js → admin-detail-Cyuf_i9U.js} +62 -62
  50. package/dist/{admin-detail-3wFIDPNB.js.map → admin-detail-Cyuf_i9U.js.map} +1 -1
  51. package/dist/{admin-dialog-BSRf9Zre.js → admin-dialog-Ch7rTOCr.js} +3 -3
  52. package/dist/{admin-dialog-BSRf9Zre.js.map → admin-dialog-Ch7rTOCr.js.map} +1 -1
  53. package/dist/admin-dialog-width-CC7QHT1p.js +6 -0
  54. package/dist/admin-dialog-width-CC7QHT1p.js.map +1 -0
  55. package/dist/{admin-dropdown-menu-D0E5rwmn.js → admin-dropdown-menu-Bah3f8AZ.js} +2 -2
  56. package/dist/{admin-dropdown-menu-D0E5rwmn.js.map → admin-dropdown-menu-Bah3f8AZ.js.map} +1 -1
  57. package/dist/{admin-fact-card-BPSVhS15.js → admin-fact-card-Bt__Cd_U.js} +2 -2
  58. package/dist/{admin-fact-card-BPSVhS15.js.map → admin-fact-card-Bt__Cd_U.js.map} +1 -1
  59. package/dist/{admin-health-D0L5Kig7.js → admin-health-pzTO6_0v.js} +249 -248
  60. package/dist/admin-health-pzTO6_0v.js.map +1 -0
  61. package/dist/{admin-imports-CgZB5JAV.js → admin-imports-tT5et8-V.js} +62 -62
  62. package/dist/{admin-imports-CgZB5JAV.js.map → admin-imports-tT5et8-V.js.map} +1 -1
  63. package/dist/{admin-input-DJAK9nmk.js → admin-input-DvRZy_2a.js} +2 -2
  64. package/dist/{admin-input-DJAK9nmk.js.map → admin-input-DvRZy_2a.js.map} +1 -1
  65. package/dist/{admin-label-aviN9Gng.js → admin-label-QZtWJGH-.js} +2 -2
  66. package/dist/{admin-label-aviN9Gng.js.map → admin-label-QZtWJGH-.js.map} +1 -1
  67. package/dist/{admin-linked-table-row-BGr7JXeM.js → admin-linked-table-row-6jkCKwMn.js} +4 -4
  68. package/dist/{admin-linked-table-row-BGr7JXeM.js.map → admin-linked-table-row-6jkCKwMn.js.map} +1 -1
  69. package/dist/{admin-map-dialog-DS2Wz6G3.js → admin-map-dialog-BV54mvMQ.js} +22 -22
  70. package/dist/{admin-map-dialog-DS2Wz6G3.js.map → admin-map-dialog-BV54mvMQ.js.map} +1 -1
  71. package/dist/{admin-metering-D-e-37Jn.js → admin-metering-Bv5EcX6M.js} +306 -306
  72. package/dist/{admin-metering-D-e-37Jn.js.map → admin-metering-Bv5EcX6M.js.map} +1 -1
  73. package/dist/admin-missing-record-BXqGFDt3.js +42 -0
  74. package/dist/admin-missing-record-BXqGFDt3.js.map +1 -0
  75. package/dist/admin-ops-h3RjpcNu.js +356 -0
  76. package/dist/admin-ops-h3RjpcNu.js.map +1 -0
  77. package/dist/admin-orders-DYxPiuTl.js +192 -0
  78. package/dist/admin-orders-DYxPiuTl.js.map +1 -0
  79. package/dist/{admin-parked-B8xHkV2e.js → admin-parked-ClKA60d5.js} +51 -51
  80. package/dist/{admin-parked-B8xHkV2e.js.map → admin-parked-ClKA60d5.js.map} +1 -1
  81. package/dist/admin-payments-BlIuy3wL.js +220 -0
  82. package/dist/admin-payments-BlIuy3wL.js.map +1 -0
  83. package/dist/{admin-price-detail-CSI5oKdb.js → admin-price-detail-BjWYU5A-.js} +98 -98
  84. package/dist/{admin-price-detail-CSI5oKdb.js.map → admin-price-detail-BjWYU5A-.js.map} +1 -1
  85. package/dist/{admin-price-wizard-CBEcNGvP.js → admin-price-wizard-CTbkbmYc.js} +61 -61
  86. package/dist/{admin-price-wizard-CBEcNGvP.js.map → admin-price-wizard-CTbkbmYc.js.map} +1 -1
  87. package/dist/{admin-proposals-Cuj7tvaM.js → admin-proposals-Ci9Q8j7Y.js} +64 -64
  88. package/dist/{admin-proposals-Cuj7tvaM.js.map → admin-proposals-Ci9Q8j7Y.js.map} +1 -1
  89. package/dist/{admin-provider-prices-B6vwnVPi.js → admin-provider-prices-B6Ayq-eN.js} +66 -66
  90. package/dist/{admin-provider-prices-B6vwnVPi.js.map → admin-provider-prices-B6Ayq-eN.js.map} +1 -1
  91. package/dist/{admin-range-picker-De36L-AP.js → admin-range-picker-nfflPp21.js} +9 -9
  92. package/dist/{admin-range-picker-De36L-AP.js.map → admin-range-picker-nfflPp21.js.map} +1 -1
  93. package/dist/{admin-records-H0MlhEVY.js → admin-records-CrTCorWH.js} +43 -43
  94. package/dist/{admin-records-H0MlhEVY.js.map → admin-records-CrTCorWH.js.map} +1 -1
  95. package/dist/{admin-reports-BFGS_PWf.js → admin-reports-BO6wrvtw.js} +50 -50
  96. package/dist/{admin-reports-BFGS_PWf.js.map → admin-reports-BO6wrvtw.js.map} +1 -1
  97. package/dist/{admin-select-BUcEU5Rg.js → admin-select-DvfJ80Rg.js} +2 -2
  98. package/dist/{admin-select-BUcEU5Rg.js.map → admin-select-DvfJ80Rg.js.map} +1 -1
  99. package/dist/{admin-settings-DYC-c7mJ.js → admin-settings-BOoTzhyf.js} +332 -332
  100. package/dist/admin-settings-BOoTzhyf.js.map +1 -0
  101. package/dist/{admin-shared-lfIUEbPY.js → admin-shared-BbGT_qTo.js} +21 -21
  102. package/dist/{admin-shared-lfIUEbPY.js.map → admin-shared-BbGT_qTo.js.map} +1 -1
  103. package/dist/{admin-skeleton-B0yzYY_X.js → admin-skeleton-B2a4ScVE.js} +2 -2
  104. package/dist/{admin-skeleton-B0yzYY_X.js.map → admin-skeleton-B2a4ScVE.js.map} +1 -1
  105. package/dist/admin-status-badge-Bp6cssXY.js +51 -0
  106. package/dist/admin-status-badge-Bp6cssXY.js.map +1 -0
  107. package/dist/admin-subscriptions-D9JmoicC.js +275 -0
  108. package/dist/admin-subscriptions-D9JmoicC.js.map +1 -0
  109. package/dist/{admin-switch-DDorugaw.js → admin-switch-DBBxJRZP.js} +2 -2
  110. package/dist/{admin-switch-DDorugaw.js.map → admin-switch-DBBxJRZP.js.map} +1 -1
  111. package/dist/{admin-table-BU6Tie69.js → admin-table-CPDoVfK4.js} +2 -2
  112. package/dist/{admin-table-BU6Tie69.js.map → admin-table-CPDoVfK4.js.map} +1 -1
  113. package/dist/{admin-tabs-D5lqdVcC.js → admin-tabs-DDUv3kiu.js} +2 -2
  114. package/dist/{admin-tabs-D5lqdVcC.js.map → admin-tabs-DDUv3kiu.js.map} +1 -1
  115. package/dist/{admin-textarea-Dc6lnEub.js → admin-textarea-d3fu_waS.js} +2 -2
  116. package/dist/{admin-textarea-Dc6lnEub.js.map → admin-textarea-d3fu_waS.js.map} +1 -1
  117. package/dist/admin-tile-grids-CzGpidd9.js +6 -0
  118. package/dist/admin-tile-grids-CzGpidd9.js.map +1 -0
  119. package/dist/{admin-typed-confirm-dialog-Bk6XxmPb.js → admin-typed-confirm-dialog-BVklYjFo.js} +11 -11
  120. package/dist/{admin-typed-confirm-dialog-Bk6XxmPb.js.map → admin-typed-confirm-dialog-BVklYjFo.js.map} +1 -1
  121. package/dist/{admin-utils-B9eEBNsR.js → admin-utils-DTT53IpS.js} +266 -223
  122. package/dist/admin-utils-DTT53IpS.js.map +1 -0
  123. package/dist/{admin-widget-viz-8aukE3v_.js → admin-widget-viz-Exsqz3Dw.js} +165 -128
  124. package/dist/admin-widget-viz-Exsqz3Dw.js.map +1 -0
  125. package/dist/admin.css +1 -1
  126. package/dist/admin.js +531 -405
  127. package/dist/admin.js.map +1 -1
  128. package/dist/index.js +1 -1
  129. package/dist/styles.css +1 -1
  130. package/package.json +1 -1
  131. package/dist/admin-attempts-DyDDt-qw.js.map +0 -1
  132. package/dist/admin-capabilities-BDcZeHL_.js.map +0 -1
  133. package/dist/admin-dashboard-CJE63yz4.js +0 -420
  134. package/dist/admin-dashboard-CJE63yz4.js.map +0 -1
  135. package/dist/admin-data-table-hvFcJepL.js +0 -96
  136. package/dist/admin-data-table-hvFcJepL.js.map +0 -1
  137. package/dist/admin-detail-BRP6pL7t.js +0 -328
  138. package/dist/admin-detail-BRP6pL7t.js.map +0 -1
  139. package/dist/admin-detail-CRzFb_pa.js +0 -1331
  140. package/dist/admin-detail-CRzFb_pa.js.map +0 -1
  141. package/dist/admin-detail-QLxU8r-5.js +0 -344
  142. package/dist/admin-detail-QLxU8r-5.js.map +0 -1
  143. package/dist/admin-detail-pPC8Q9l-.js +0 -710
  144. package/dist/admin-detail-pPC8Q9l-.js.map +0 -1
  145. package/dist/admin-dialog-width-BPrgdYlj.js +0 -6
  146. package/dist/admin-dialog-width-BPrgdYlj.js.map +0 -1
  147. package/dist/admin-health-D0L5Kig7.js.map +0 -1
  148. package/dist/admin-ops-CQP4TzWM.js +0 -235
  149. package/dist/admin-ops-CQP4TzWM.js.map +0 -1
  150. package/dist/admin-orders-BJ7W5S8P.js +0 -192
  151. package/dist/admin-orders-BJ7W5S8P.js.map +0 -1
  152. package/dist/admin-payments-CzkzqYA1.js +0 -246
  153. package/dist/admin-payments-CzkzqYA1.js.map +0 -1
  154. package/dist/admin-settings-DYC-c7mJ.js.map +0 -1
  155. package/dist/admin-status-badge-0-K37EfN.js +0 -43
  156. package/dist/admin-status-badge-0-K37EfN.js.map +0 -1
  157. package/dist/admin-subscriptions-CvW-YFs0.js +0 -301
  158. package/dist/admin-subscriptions-CvW-YFs0.js.map +0 -1
  159. package/dist/admin-utils-B9eEBNsR.js.map +0 -1
  160. package/dist/admin-widget-viz-8aukE3v_.js.map +0 -1
@@ -1,20 +1,20 @@
1
- import { C as e, D as t, T as n, c as r, p as i, r as a, s as o } from "./admin-utils-B9eEBNsR.js";
2
- import { t as s } from "./admin-button-CrcYk5r0.js";
3
- import { t as c } from "./admin-input-DJAK9nmk.js";
4
- import { t as l } from "./admin-skeleton-B0yzYY_X.js";
5
- import { s as u } from "./admin-capabilities-BDcZeHL_.js";
1
+ import { E as e, O as t, c as n, p as r, r as i, s as a, w as o } from "./admin-utils-DTT53IpS.js";
2
+ import { t as s } from "./admin-button-Cq9ZfX4R.js";
3
+ import { t as c } from "./admin-input-DvRZy_2a.js";
4
+ import { t as l } from "./admin-skeleton-B2a4ScVE.js";
5
+ import { c as u } from "./admin-capabilities-k5fQZhN9.js";
6
6
  import { c as d, d as f, l as p, n as m, o as h, s as g } from "./admin-format-DoohJ7Fg.js";
7
7
  import { n as _ } from "./admin-confirm-katGq0Qo.js";
8
- import { t as v } from "./admin-form-field-errors-hbUMIriS.js";
9
- import { a as y, i as b, n as x, r as S, t as C } from "./admin-select-BUcEU5Rg.js";
10
- import { n as w, t as T } from "./admin-cursor-pager-CIb3Jw2F.js";
11
- import { a as E, n as ee, o as te, r as D, s as O, t as k } from "./admin-table-BU6Tie69.js";
12
- import { t as ne } from "./admin-linked-table-row-BGr7JXeM.js";
13
- import { t as A } from "./admin-badge-pgG6D9-a.js";
14
- import { a as re, i as ie, n as ae, o as oe, r as se, s as ce, t as le } from "./admin-dialog-BSRf9Zre.js";
15
- import { t as j } from "./admin-label-aviN9Gng.js";
16
- import { t as ue } from "./admin-switch-DDorugaw.js";
17
- import { n as de, r as fe } from "./admin-dialog-width-BPrgdYlj.js";
8
+ import { t as v } from "./admin-badge-kmYQM9Ge.js";
9
+ import { t as y } from "./admin-form-field-errors-hbUMIriS.js";
10
+ import { a as b, i as x, n as S, r as C, t as w } from "./admin-select-DvfJ80Rg.js";
11
+ import { n as T, t as E } from "./admin-cursor-pager-DqFruoNu.js";
12
+ import { a as D, n as ee, o as te, r as O, s as k, t as ne } from "./admin-table-CPDoVfK4.js";
13
+ import { t as A } from "./admin-linked-table-row-6jkCKwMn.js";
14
+ import { a as re, i as ie, n as ae, o as oe, r as se, s as ce, t as le } from "./admin-dialog-Ch7rTOCr.js";
15
+ import { t as j } from "./admin-label-QZtWJGH-.js";
16
+ import { t as ue } from "./admin-switch-DBBxJRZP.js";
17
+ import { i as de, r as fe } from "./admin-dialog-width-CC7QHT1p.js";
18
18
  import * as M from "react";
19
19
  import { useMutation as pe, useQuery as me, useQueryClient as he } from "@tanstack/react-query";
20
20
  import { Fragment as N, jsx as P, jsxs as F } from "react/jsx-runtime";
@@ -243,53 +243,53 @@ function Le(e, t) {
243
243
  }
244
244
  //#endregion
245
245
  //#region src/admin/pages/catalog/meter-form.tsx
246
- function Re({ meter: e, writesAllowed: r }) {
247
- let { toast: a, toastApiError: o, adminMutations: l } = i(), { id: u, text: d } = t(), [f, p] = M.useState(!1), [m, h] = M.useState(""), g = he(), _ = pe(l.putUsageMeter(g)), w = e ? Le(e, r) : null, T = Se({
248
- defaultValues: Ee(e),
249
- onSubmit: async ({ value: t }) => {
246
+ function Re({ meter: n, writesAllowed: i }) {
247
+ let { toast: a, toastApiError: o, adminMutations: l } = r(), { id: u, text: d } = t(), [f, p] = M.useState(!1), [m, h] = M.useState(""), g = he(), _ = pe(l.putUsageMeter(g)), v = n ? Le(n, i) : null, T = Se({
248
+ defaultValues: Ee(n),
249
+ onSubmit: async ({ value: e }) => {
250
250
  h("");
251
251
  try {
252
- let n = De(t);
253
- n.meter.expected_revision = e?.revision ?? 0, await _.mutateAsync(n), a.success(e ? "Meter updated" : "Meter created"), p(!1), T.reset();
254
- } catch (t) {
255
- if (t instanceof Error && !("status" in t)) {
256
- h(t.message);
252
+ let t = De(e);
253
+ t.meter.expected_revision = n?.revision ?? 0, await _.mutateAsync(t), a.success(n ? "Meter updated" : "Meter created"), p(!1), T.reset();
254
+ } catch (e) {
255
+ if (e instanceof Error && !("status" in e)) {
256
+ h(e.message);
257
257
  return;
258
258
  }
259
- o(t, e ? "Update meter" : "Create meter");
259
+ o(e, n ? "Update meter" : "Create meter");
260
260
  }
261
261
  }
262
262
  });
263
- return w ? /* @__PURE__ */ F(s, {
263
+ return v ? /* @__PURE__ */ F(s, {
264
264
  variant: "outline",
265
265
  size: "sm",
266
266
  disabled: !0,
267
- title: w,
267
+ title: v,
268
268
  children: [/* @__PURE__ */ P(I, {
269
269
  icon: z,
270
270
  className: "size-4"
271
- }), /* @__PURE__ */ P(n, { id: "Edit definition" })]
271
+ }), /* @__PURE__ */ P(e, { id: "Edit definition" })]
272
272
  }) : /* @__PURE__ */ F(le, {
273
273
  open: f,
274
274
  onOpenChange: (e) => {
275
275
  p(e), h(""), e || T.reset();
276
276
  },
277
277
  children: [/* @__PURE__ */ P(ce, { render: /* @__PURE__ */ F(s, {
278
- variant: e ? "outline" : "default",
278
+ variant: n ? "outline" : "default",
279
279
  size: "sm",
280
280
  children: [/* @__PURE__ */ P(I, {
281
- icon: e ? z : L,
281
+ icon: n ? z : L,
282
282
  className: "size-4"
283
- }), e ? "Edit definition" : "Create meter"]
283
+ }), n ? "Edit definition" : "Create meter"]
284
284
  }) }), /* @__PURE__ */ P(ae, {
285
- className: de,
285
+ className: fe,
286
286
  children: /* @__PURE__ */ F("form", {
287
287
  className: "grid gap-5",
288
288
  onSubmit: (e) => {
289
289
  e.preventDefault(), e.stopPropagation(), T.handleSubmit();
290
290
  },
291
291
  children: [
292
- /* @__PURE__ */ F(re, { children: [/* @__PURE__ */ P(oe, { children: e ? "Edit meter" : "Create meter" }), /* @__PURE__ */ P(se, { children: /* @__PURE__ */ P(n, { id: "Define the event fields OpenRails will aggregate. Your host still reports each event through the usage API." }) })] }),
292
+ /* @__PURE__ */ F(re, { children: [/* @__PURE__ */ P(oe, { children: n ? "Edit meter" : "Create meter" }), /* @__PURE__ */ P(se, { children: /* @__PURE__ */ P(e, { id: "Define the event fields OpenRails will aggregate. Your host still reports each event through the usage API." }) })] }),
293
293
  /* @__PURE__ */ F("div", {
294
294
  className: "grid gap-4",
295
295
  children: [
@@ -301,22 +301,22 @@ function Re({ meter: e, writesAllowed: r }) {
301
301
  children: [
302
302
  /* @__PURE__ */ P(j, {
303
303
  htmlFor: u("meter-key"),
304
- children: /* @__PURE__ */ P(n, { id: "Key" })
304
+ children: /* @__PURE__ */ P(e, { id: "Key" })
305
305
  }),
306
306
  /* @__PURE__ */ P(c, {
307
307
  id: u("meter-key"),
308
308
  value: t.state.value,
309
309
  onChange: (e) => t.handleChange(e.target.value),
310
310
  onBlur: t.handleBlur,
311
- disabled: !!e,
311
+ disabled: !!n,
312
312
  placeholder: d("api-tokens"),
313
313
  autoComplete: "off"
314
314
  }),
315
315
  /* @__PURE__ */ P("p", {
316
316
  className: "text-xs text-muted-foreground",
317
- children: /* @__PURE__ */ P(n, { id: "Stable identifier. It cannot be renamed after creation." })
317
+ children: /* @__PURE__ */ P(e, { id: "Stable identifier. It cannot be renamed after creation." })
318
318
  }),
319
- /* @__PURE__ */ P(v, { errors: t.state.meta.errors })
319
+ /* @__PURE__ */ P(y, { errors: t.state.meta.errors })
320
320
  ]
321
321
  })
322
322
  }),
@@ -324,45 +324,45 @@ function Re({ meter: e, writesAllowed: r }) {
324
324
  className: "grid gap-4 sm:grid-cols-2",
325
325
  children: [/* @__PURE__ */ P(T.Field, {
326
326
  name: "eventType",
327
- children: (e) => /* @__PURE__ */ F("div", {
327
+ children: (t) => /* @__PURE__ */ F("div", {
328
328
  className: "grid gap-1.5",
329
329
  children: [
330
330
  /* @__PURE__ */ P(j, {
331
331
  htmlFor: u("meter-event-type"),
332
- children: /* @__PURE__ */ P(n, { id: "Event type" })
332
+ children: /* @__PURE__ */ P(e, { id: "Event type" })
333
333
  }),
334
334
  /* @__PURE__ */ P(c, {
335
335
  id: u("meter-event-type"),
336
- value: e.state.value,
337
- onChange: (t) => e.handleChange(t.target.value),
336
+ value: t.state.value,
337
+ onChange: (e) => t.handleChange(e.target.value),
338
338
  placeholder: d("token.used"),
339
339
  autoComplete: "off"
340
340
  }),
341
341
  /* @__PURE__ */ P("p", {
342
342
  className: "text-xs text-muted-foreground",
343
- children: /* @__PURE__ */ P(n, { id: "Leave blank to use the meter key." })
343
+ children: /* @__PURE__ */ P(e, { id: "Leave blank to use the meter key." })
344
344
  })
345
345
  ]
346
346
  })
347
347
  }), /* @__PURE__ */ P(T.Field, {
348
348
  name: "unit",
349
- children: (e) => /* @__PURE__ */ F("div", {
349
+ children: (t) => /* @__PURE__ */ F("div", {
350
350
  className: "grid gap-1.5",
351
351
  children: [
352
352
  /* @__PURE__ */ P(j, {
353
353
  htmlFor: u("meter-unit"),
354
- children: /* @__PURE__ */ P(n, { id: "Unit" })
354
+ children: /* @__PURE__ */ P(e, { id: "Unit" })
355
355
  }),
356
356
  /* @__PURE__ */ P(c, {
357
357
  id: u("meter-unit"),
358
- value: e.state.value,
359
- onChange: (t) => e.handleChange(t.target.value),
358
+ value: t.state.value,
359
+ onChange: (e) => t.handleChange(e.target.value),
360
360
  placeholder: d("tokens"),
361
361
  autoComplete: "off"
362
362
  }),
363
363
  /* @__PURE__ */ P("p", {
364
364
  className: "text-xs text-muted-foreground",
365
- children: /* @__PURE__ */ P(n, { id: "Human-readable quantity shown in billing." })
365
+ children: /* @__PURE__ */ P(e, { id: "Human-readable quantity shown in billing." })
366
366
  })
367
367
  ]
368
368
  })
@@ -372,92 +372,92 @@ function Re({ meter: e, writesAllowed: r }) {
372
372
  className: "grid gap-4 sm:grid-cols-2",
373
373
  children: [/* @__PURE__ */ P(T.Field, {
374
374
  name: "aggregation",
375
- children: (e) => /* @__PURE__ */ F("div", {
375
+ children: (t) => /* @__PURE__ */ F("div", {
376
376
  className: "grid gap-1.5",
377
377
  children: [/* @__PURE__ */ P(j, {
378
378
  htmlFor: u("meter-aggregation"),
379
- children: /* @__PURE__ */ P(n, { id: "Aggregation" })
380
- }), /* @__PURE__ */ F(C, {
381
- value: e.state.value,
382
- onValueChange: (t) => e.handleChange(t),
383
- children: [/* @__PURE__ */ P(b, {
379
+ children: /* @__PURE__ */ P(e, { id: "Aggregation" })
380
+ }), /* @__PURE__ */ F(w, {
381
+ value: t.state.value,
382
+ onValueChange: (e) => t.handleChange(e),
383
+ children: [/* @__PURE__ */ P(x, {
384
384
  id: u("meter-aggregation"),
385
385
  className: "w-full",
386
- children: /* @__PURE__ */ P(y, {})
387
- }), /* @__PURE__ */ F(x, { children: [/* @__PURE__ */ P(S, {
386
+ children: /* @__PURE__ */ P(b, {})
387
+ }), /* @__PURE__ */ F(S, { children: [/* @__PURE__ */ P(C, {
388
388
  value: "sum",
389
- children: /* @__PURE__ */ P(n, { id: "Sum a numeric field" })
390
- }), /* @__PURE__ */ P(S, {
389
+ children: /* @__PURE__ */ P(e, { id: "Sum a numeric field" })
390
+ }), /* @__PURE__ */ P(C, {
391
391
  value: "count",
392
- children: /* @__PURE__ */ P(n, { id: "Count events" })
392
+ children: /* @__PURE__ */ P(e, { id: "Count events" })
393
393
  })] })]
394
394
  })]
395
395
  })
396
396
  }), /* @__PURE__ */ P(T.Subscribe, {
397
397
  selector: (e) => e.values.aggregation,
398
- children: (e) => e === "sum" ? /* @__PURE__ */ P(T.Field, {
398
+ children: (t) => t === "sum" ? /* @__PURE__ */ P(T.Field, {
399
399
  name: "valueProperty",
400
400
  validators: { onBlur: ({ value: e }) => e.trim() ? void 0 : "Sum meters require a value property." },
401
- children: (e) => /* @__PURE__ */ F("div", {
401
+ children: (t) => /* @__PURE__ */ F("div", {
402
402
  className: "grid gap-1.5",
403
403
  children: [
404
404
  /* @__PURE__ */ P(j, {
405
405
  htmlFor: u("meter-value-property"),
406
- children: /* @__PURE__ */ P(n, { id: "Value property" })
406
+ children: /* @__PURE__ */ P(e, { id: "Value property" })
407
407
  }),
408
408
  /* @__PURE__ */ P(c, {
409
409
  id: u("meter-value-property"),
410
- value: e.state.value,
411
- onChange: (t) => e.handleChange(t.target.value),
412
- onBlur: e.handleBlur,
410
+ value: t.state.value,
411
+ onChange: (e) => t.handleChange(e.target.value),
412
+ onBlur: t.handleBlur,
413
413
  placeholder: d("tokens"),
414
414
  autoComplete: "off"
415
415
  }),
416
- /* @__PURE__ */ P(v, { errors: e.state.meta.errors })
416
+ /* @__PURE__ */ P(y, { errors: t.state.meta.errors })
417
417
  ]
418
418
  })
419
419
  }) : /* @__PURE__ */ P("div", {
420
420
  className: "self-end rounded-lg bg-muted/50 px-3 py-2 text-xs text-muted-foreground",
421
- children: /* @__PURE__ */ P(n, { id: "Count uses one unit for every matching event." })
421
+ children: /* @__PURE__ */ P(e, { id: "Count uses one unit for every matching event." })
422
422
  })
423
423
  })]
424
424
  }),
425
425
  /* @__PURE__ */ P(T.Field, {
426
426
  name: "groupBy",
427
427
  mode: "array",
428
- children: (e) => /* @__PURE__ */ F("fieldset", {
428
+ children: (t) => /* @__PURE__ */ F("fieldset", {
429
429
  className: "grid gap-2",
430
430
  children: [/* @__PURE__ */ F("div", {
431
431
  className: "flex items-center justify-between gap-3",
432
- children: [/* @__PURE__ */ F("div", { children: [/* @__PURE__ */ P(j, { children: /* @__PURE__ */ P(n, { id: "Dimensions" }) }), /* @__PURE__ */ P("p", {
432
+ children: [/* @__PURE__ */ F("div", { children: [/* @__PURE__ */ P(j, { children: /* @__PURE__ */ P(e, { id: "Dimensions" }) }), /* @__PURE__ */ P("p", {
433
433
  className: "text-xs text-muted-foreground",
434
- children: /* @__PURE__ */ P(n, { id: "Register event properties used by filters or matrix rates." })
434
+ children: /* @__PURE__ */ P(e, { id: "Register event properties used by filters or matrix rates." })
435
435
  })] }), /* @__PURE__ */ F(s, {
436
436
  type: "button",
437
437
  variant: "outline",
438
438
  size: "sm",
439
- onClick: () => e.pushValue({
439
+ onClick: () => t.pushValue({
440
440
  key: "",
441
441
  value: ""
442
442
  }),
443
443
  children: [/* @__PURE__ */ P(I, {
444
444
  icon: L,
445
445
  className: "size-4"
446
- }), /* @__PURE__ */ P(n, { id: "Add dimension" })]
446
+ }), /* @__PURE__ */ P(e, { id: "Add dimension" })]
447
447
  })]
448
- }), e.state.value.map((t, n) => /* @__PURE__ */ F("div", {
448
+ }), t.state.value.map((e, n) => /* @__PURE__ */ F("div", {
449
449
  className: "grid grid-cols-[1fr_1fr_auto] gap-2",
450
450
  children: [
451
451
  /* @__PURE__ */ P(c, {
452
452
  "aria-label": `Dimension ${n + 1} name`,
453
- value: t.key,
453
+ value: e.key,
454
454
  onChange: (e) => T.setFieldValue(`groupBy[${n}].key`, e.target.value),
455
455
  placeholder: d("model"),
456
456
  autoComplete: "off"
457
457
  }),
458
458
  /* @__PURE__ */ P(c, {
459
459
  "aria-label": `Dimension ${n + 1} property`,
460
- value: t.value,
460
+ value: e.value,
461
461
  onChange: (e) => T.setFieldValue(`groupBy[${n}].value`, e.target.value),
462
462
  placeholder: d("metadata.model"),
463
463
  autoComplete: "off"
@@ -467,7 +467,7 @@ function Re({ meter: e, writesAllowed: r }) {
467
467
  variant: "ghost",
468
468
  size: "icon",
469
469
  "aria-label": `Remove dimension ${n + 1}`,
470
- onClick: () => e.removeValue(n),
470
+ onClick: () => t.removeValue(n),
471
471
  children: /* @__PURE__ */ P(I, {
472
472
  icon: R,
473
473
  className: "size-4"
@@ -488,7 +488,7 @@ function Re({ meter: e, writesAllowed: r }) {
488
488
  type: "button",
489
489
  variant: "outline",
490
490
  onClick: () => p(!1),
491
- children: /* @__PURE__ */ P(n, { id: "Cancel" })
491
+ children: /* @__PURE__ */ P(e, { id: "Cancel" })
492
492
  }), /* @__PURE__ */ P(T.Subscribe, {
493
493
  selector: (e) => e.isSubmitting,
494
494
  children: (e) => /* @__PURE__ */ P(s, {
@@ -505,14 +505,14 @@ function Re({ meter: e, writesAllowed: r }) {
505
505
  //#endregion
506
506
  //#region src/admin/pages/catalog/rate-card-editor.tsx
507
507
  var G = M.createContext(null);
508
- function ze({ meter: e, writesAllowed: r = !1, products: o, productsPending: l = !1, productsError: u = !1, productsForbidden: d = !1 }) {
509
- let { toast: f, toastApiError: p, adminMutations: m } = i(), { id: h, text: g } = t(), [v, w] = M.useState(!1), [T, E] = M.useState(null), ee = _(), te = he(), D = pe(m.putDefaultUsageRateCard(te)), O = o.filter((e) => !e.archived), k = e.rate_card, ne = D.isPending, A = Se({
508
+ function ze({ meter: n, writesAllowed: a = !1, products: o, productsPending: l = !1, productsError: u = !1, productsForbidden: d = !1 }) {
509
+ let { toast: f, toastApiError: p, adminMutations: m } = r(), { id: h, text: g } = t(), [v, y] = M.useState(!1), [T, E] = M.useState(null), D = _(), ee = he(), te = pe(m.putDefaultUsageRateCard(ee)), O = o.filter((e) => !e.archived), k = n.rate_card, ne = te.isPending, A = Se({
510
510
  defaultValues: Oe(k),
511
511
  onSubmit: async ({ value: e }) => {
512
512
  E(null);
513
513
  try {
514
514
  let t = ke(e);
515
- if (k && !await ee({
515
+ if (k && !await D({
516
516
  title: "Replace the default rate?",
517
517
  description: "Amounts already charged do not change. New events use the new rate; admitted work keeps its pinned rate.",
518
518
  confirmLabel: "Replace rate",
@@ -532,22 +532,22 @@ function ze({ meter: e, writesAllowed: r = !1, products: o, productsPending: l =
532
532
  p(e, "Save rate card");
533
533
  }
534
534
  }
535
- }), ue = async (t) => {
535
+ }), ue = async (e) => {
536
536
  try {
537
- await D.mutateAsync({
538
- meter: e,
539
- rateCard: t
540
- }), f.success(k ? "Default rate replaced" : "Default rate added"), w(!1);
537
+ await te.mutateAsync({
538
+ meter: n,
539
+ rateCard: e
540
+ }), f.success(k ? "Default rate replaced" : "Default rate added"), y(!1);
541
541
  } catch (e) {
542
542
  p(e, "Save default rate");
543
543
  }
544
544
  };
545
- return !r || !e.billing_supported ? null : /* @__PURE__ */ P(G.Provider, {
545
+ return !a || !n.billing_supported ? null : /* @__PURE__ */ P(G.Provider, {
546
546
  value: T,
547
547
  children: /* @__PURE__ */ F(le, {
548
548
  open: v,
549
549
  onOpenChange: (e) => {
550
- w(e), E(null), e || A.reset();
550
+ y(e), E(null), e || A.reset();
551
551
  },
552
552
  children: [/* @__PURE__ */ P(ce, { render: /* @__PURE__ */ F(s, {
553
553
  variant: k ? "outline" : "default",
@@ -557,7 +557,7 @@ function ze({ meter: e, writesAllowed: r = !1, products: o, productsPending: l =
557
557
  className: "size-4"
558
558
  }), k ? "Edit default rate" : "Add default rate"]
559
559
  }) }), /* @__PURE__ */ P(ae, {
560
- className: `${fe} max-h-[calc(100dvh-2rem)] overflow-y-auto`,
560
+ className: `${de} max-h-[calc(100dvh-2rem)] overflow-y-auto`,
561
561
  children: /* @__PURE__ */ F("form", {
562
562
  className: "grid gap-6",
563
563
  onChange: () => E(null),
@@ -565,47 +565,47 @@ function ze({ meter: e, writesAllowed: r = !1, products: o, productsPending: l =
565
565
  e.preventDefault(), e.stopPropagation(), A.handleSubmit();
566
566
  },
567
567
  children: [
568
- /* @__PURE__ */ F(re, { children: [/* @__PURE__ */ P(oe, { children: k ? "Edit default rate" : "Add default rate" }), /* @__PURE__ */ P(se, { children: /* @__PURE__ */ P(n, { id: "Set the price that charges every customer's usage as it is recorded. Money is entered in major currency units." }) })] }),
568
+ /* @__PURE__ */ F(re, { children: [/* @__PURE__ */ P(oe, { children: k ? "Edit default rate" : "Add default rate" }), /* @__PURE__ */ P(se, { children: /* @__PURE__ */ P(e, { id: "Set the price that charges every customer's usage as it is recorded. Money is entered in major currency units." }) })] }),
569
569
  /* @__PURE__ */ F("section", {
570
570
  className: "grid gap-4",
571
571
  children: [/* @__PURE__ */ P("h3", {
572
572
  className: "text-sm font-medium",
573
- children: /* @__PURE__ */ P(n, { id: "Product and model" })
573
+ children: /* @__PURE__ */ P(e, { id: "Product and model" })
574
574
  }), l ? /* @__PURE__ */ P("div", {
575
575
  className: "rounded-lg bg-muted/50 p-3 text-sm text-muted-foreground",
576
- children: /* @__PURE__ */ P(n, { id: "Loading products…" })
576
+ children: /* @__PURE__ */ P(e, { id: "Loading products…" })
577
577
  }) : u ? /* @__PURE__ */ P("div", {
578
578
  role: "alert",
579
579
  className: "rounded-lg bg-muted/50 p-3 text-sm text-destructive",
580
580
  children: d ? "Your role cannot read products for this merchant." : "Products could not be loaded. Close this form and try again."
581
581
  }) : O.length === 0 ? /* @__PURE__ */ F("div", {
582
582
  className: "rounded-lg bg-muted/50 p-3 text-sm",
583
- children: [/* @__PURE__ */ P("p", { children: /* @__PURE__ */ P(n, { id: "No active products are available." }) }), /* @__PURE__ */ P(a, {
583
+ children: [/* @__PURE__ */ P("p", { children: /* @__PURE__ */ P(e, { id: "No active products are available." }) }), /* @__PURE__ */ P(i, {
584
584
  className: "text-primary underline underline-offset-3",
585
585
  to: "/catalog",
586
- children: /* @__PURE__ */ P(n, { id: "Create or activate a product first" })
586
+ children: /* @__PURE__ */ P(e, { id: "Create or activate a product first" })
587
587
  })]
588
588
  }) : /* @__PURE__ */ F("div", {
589
589
  className: "grid gap-4 sm:grid-cols-3",
590
590
  children: [
591
591
  /* @__PURE__ */ P(A.Field, {
592
592
  name: "productId",
593
- children: (e) => /* @__PURE__ */ F("div", {
593
+ children: (t) => /* @__PURE__ */ F("div", {
594
594
  className: "grid gap-1.5 sm:col-span-2",
595
595
  children: [
596
596
  /* @__PURE__ */ P(j, {
597
597
  htmlFor: h("rate-product"),
598
- children: /* @__PURE__ */ P(n, { id: "Product" })
598
+ children: /* @__PURE__ */ P(e, { id: "Product" })
599
599
  }),
600
- /* @__PURE__ */ F(C, {
601
- value: e.state.value || null,
602
- onValueChange: (t) => e.handleChange(t ?? ""),
603
- children: [/* @__PURE__ */ P(b, {
600
+ /* @__PURE__ */ F(w, {
601
+ value: t.state.value || null,
602
+ onValueChange: (e) => t.handleChange(e ?? ""),
603
+ children: [/* @__PURE__ */ P(x, {
604
604
  id: h("rate-product"),
605
605
  className: "w-full",
606
606
  ...Y("rate-product", T),
607
- children: /* @__PURE__ */ P(y, { placeholder: g("Select product") })
608
- }), /* @__PURE__ */ P(x, { children: O.map((e) => /* @__PURE__ */ P(S, {
607
+ children: /* @__PURE__ */ P(b, { placeholder: g("Select product") })
608
+ }), /* @__PURE__ */ P(S, { children: O.map((e) => /* @__PURE__ */ P(C, {
609
609
  value: e.id,
610
610
  children: e.display_name
611
611
  }, e.id)) })]
@@ -616,17 +616,17 @@ function ze({ meter: e, writesAllowed: r = !1, products: o, productsPending: l =
616
616
  }),
617
617
  /* @__PURE__ */ P(A.Field, {
618
618
  name: "currency",
619
- children: (e) => /* @__PURE__ */ F("div", {
619
+ children: (t) => /* @__PURE__ */ F("div", {
620
620
  className: "grid gap-1.5",
621
621
  children: [
622
622
  /* @__PURE__ */ P(j, {
623
623
  htmlFor: h("rate-currency"),
624
- children: /* @__PURE__ */ P(n, { id: "Currency" })
624
+ children: /* @__PURE__ */ P(e, { id: "Currency" })
625
625
  }),
626
626
  /* @__PURE__ */ P(c, {
627
627
  id: h("rate-currency"),
628
- value: e.state.value,
629
- onChange: (t) => e.handleChange(t.target.value.toUpperCase()),
628
+ value: t.state.value,
629
+ onChange: (e) => t.handleChange(e.target.value.toUpperCase()),
630
630
  maxLength: 3,
631
631
  placeholder: g("USD"),
632
632
  className: "uppercase",
@@ -639,7 +639,7 @@ function ze({ meter: e, writesAllowed: r = !1, products: o, productsPending: l =
639
639
  }),
640
640
  /* @__PURE__ */ P(Be, {
641
641
  form: A,
642
- meter: e
642
+ meter: n
643
643
  })
644
644
  ]
645
645
  })]
@@ -651,24 +651,24 @@ function ze({ meter: e, writesAllowed: r = !1, products: o, productsPending: l =
651
651
  children: [
652
652
  /* @__PURE__ */ P("h3", {
653
653
  className: "text-sm font-medium",
654
- children: /* @__PURE__ */ P(n, { id: "Rate" })
654
+ children: /* @__PURE__ */ P(e, { id: "Rate" })
655
655
  }),
656
656
  t === "per_unit" && /* @__PURE__ */ P(Ve, {
657
657
  form: A,
658
- meter: e
658
+ meter: n
659
659
  }),
660
660
  t === "tiered" && /* @__PURE__ */ P(Ue, { form: A }),
661
661
  t === "package" && /* @__PURE__ */ P(We, { form: A }),
662
662
  t === "dynamic" && /* @__PURE__ */ P("p", {
663
663
  className: "text-sm text-muted-foreground",
664
- children: /* @__PURE__ */ P(n, { id: "Charge each event’s stated amount when it reports positive units. Missing amounts or zero units charge nothing." })
664
+ children: /* @__PURE__ */ P(e, { id: "Charge each event’s stated amount when it reports positive units. Missing amounts or zero units charge nothing." })
665
665
  })
666
666
  ]
667
667
  })
668
668
  }),
669
669
  /* @__PURE__ */ P(Ge, {
670
670
  form: A,
671
- meter: e
671
+ meter: n
672
672
  }),
673
673
  /* @__PURE__ */ P(A.Subscribe, {
674
674
  selector: (e) => e.values.model,
@@ -686,8 +686,8 @@ function ze({ meter: e, writesAllowed: r = !1, products: o, productsPending: l =
686
686
  /* @__PURE__ */ F(ie, { children: [/* @__PURE__ */ P(s, {
687
687
  type: "button",
688
688
  variant: "outline",
689
- onClick: () => w(!1),
690
- children: /* @__PURE__ */ P(n, { id: "Cancel" })
689
+ onClick: () => y(!1),
690
+ children: /* @__PURE__ */ P(e, { id: "Cancel" })
691
691
  }), /* @__PURE__ */ P(s, {
692
692
  type: "submit",
693
693
  disabled: ne || l || u || O.length === 0,
@@ -699,72 +699,72 @@ function ze({ meter: e, writesAllowed: r = !1, products: o, productsPending: l =
699
699
  })
700
700
  });
701
701
  }
702
- function Be({ form: e, meter: r }) {
702
+ function Be({ form: n, meter: r }) {
703
703
  let { id: i } = t();
704
- return /* @__PURE__ */ P(e.Field, {
704
+ return /* @__PURE__ */ P(n.Field, {
705
705
  name: "model",
706
- children: (e) => /* @__PURE__ */ F("div", {
706
+ children: (t) => /* @__PURE__ */ F("div", {
707
707
  className: "grid gap-1.5 sm:col-span-3",
708
708
  children: [/* @__PURE__ */ P(j, {
709
709
  htmlFor: i("rate-model"),
710
- children: /* @__PURE__ */ P(n, { id: "Pricing model" })
711
- }), /* @__PURE__ */ F(C, {
712
- value: e.state.value,
713
- onValueChange: (t) => e.handleChange(t),
714
- children: [/* @__PURE__ */ P(b, {
710
+ children: /* @__PURE__ */ P(e, { id: "Pricing model" })
711
+ }), /* @__PURE__ */ F(w, {
712
+ value: t.state.value,
713
+ onValueChange: (e) => t.handleChange(e),
714
+ children: [/* @__PURE__ */ P(x, {
715
715
  id: i("rate-model"),
716
716
  className: "w-full",
717
- children: /* @__PURE__ */ P(y, {})
718
- }), /* @__PURE__ */ F(x, { children: [
719
- /* @__PURE__ */ P(S, {
717
+ children: /* @__PURE__ */ P(b, {})
718
+ }), /* @__PURE__ */ F(S, { children: [
719
+ /* @__PURE__ */ P(C, {
720
720
  value: "per_unit",
721
- children: /* @__PURE__ */ P(n, { id: "Per unit" })
721
+ children: /* @__PURE__ */ P(e, { id: "Per unit" })
722
722
  }),
723
- /* @__PURE__ */ P(S, {
723
+ /* @__PURE__ */ P(C, {
724
724
  value: "tiered",
725
- children: /* @__PURE__ */ P(n, { id: "Tiered" })
725
+ children: /* @__PURE__ */ P(e, { id: "Tiered" })
726
726
  }),
727
- /* @__PURE__ */ P(S, {
727
+ /* @__PURE__ */ P(C, {
728
728
  value: "package",
729
- children: /* @__PURE__ */ P(n, { id: "Package" })
729
+ children: /* @__PURE__ */ P(e, { id: "Package" })
730
730
  }),
731
- /* @__PURE__ */ P(S, {
731
+ /* @__PURE__ */ P(C, {
732
732
  value: "dynamic",
733
733
  disabled: r.aggregation !== "sum",
734
- children: /* @__PURE__ */ P(n, { id: "Dynamic (event amount)" })
734
+ children: /* @__PURE__ */ P(e, { id: "Dynamic (event amount)" })
735
735
  })
736
736
  ] })]
737
737
  })]
738
738
  })
739
739
  });
740
740
  }
741
- function Ve({ form: e, meter: r }) {
741
+ function Ve({ form: n, meter: r }) {
742
742
  let { id: i, text: a } = t();
743
743
  return /* @__PURE__ */ F(N, { children: [
744
- /* @__PURE__ */ P(e.Field, {
744
+ /* @__PURE__ */ P(n.Field, {
745
745
  name: "matrixEnabled",
746
- children: (e) => /* @__PURE__ */ F("div", {
746
+ children: (t) => /* @__PURE__ */ F("div", {
747
747
  className: "flex items-center justify-between gap-4 rounded-lg bg-muted/50 px-3 py-2.5",
748
748
  children: [/* @__PURE__ */ F("div", { children: [/* @__PURE__ */ P(j, {
749
749
  htmlFor: i("rate-matrix"),
750
- children: /* @__PURE__ */ P(n, { id: "Use matrix rates" })
750
+ children: /* @__PURE__ */ P(e, { id: "Use matrix rates" })
751
751
  }), /* @__PURE__ */ P("p", {
752
752
  className: "text-xs text-muted-foreground",
753
- children: /* @__PURE__ */ P(n, { id: "Price each value of one registered dimension separately." })
753
+ children: /* @__PURE__ */ P(e, { id: "Price each value of one registered dimension separately." })
754
754
  })] }), /* @__PURE__ */ P(ue, {
755
755
  id: i("rate-matrix"),
756
- checked: e.state.value,
757
- onCheckedChange: e.handleChange,
756
+ checked: t.state.value,
757
+ onCheckedChange: t.handleChange,
758
758
  disabled: Object.keys(r.group_by ?? {}).length === 0
759
759
  })]
760
760
  })
761
761
  }),
762
- /* @__PURE__ */ P(e.Subscribe, {
762
+ /* @__PURE__ */ P(n.Subscribe, {
763
763
  selector: (e) => e.values.matrixEnabled,
764
- children: (t) => t ? /* @__PURE__ */ P(He, {
765
- form: e,
764
+ children: (e) => e ? /* @__PURE__ */ P(He, {
765
+ form: n,
766
766
  meter: r
767
- }) : /* @__PURE__ */ P(e.Field, {
767
+ }) : /* @__PURE__ */ P(n.Field, {
768
768
  name: "unitAmount",
769
769
  children: (e) => /* @__PURE__ */ P(q, {
770
770
  id: "rate-unit-amount",
@@ -778,7 +778,7 @@ function Ve({ form: e, meter: r }) {
778
778
  /* @__PURE__ */ F("div", {
779
779
  className: "grid gap-4 sm:grid-cols-3",
780
780
  children: [
781
- /* @__PURE__ */ P(e.Field, {
781
+ /* @__PURE__ */ P(n.Field, {
782
782
  name: "divideBy",
783
783
  children: (e) => /* @__PURE__ */ P(K, {
784
784
  id: "rate-divide-by",
@@ -789,38 +789,38 @@ function Ve({ form: e, meter: r }) {
789
789
  placeholder: "1"
790
790
  })
791
791
  }),
792
- /* @__PURE__ */ P(e.Field, {
792
+ /* @__PURE__ */ P(n.Field, {
793
793
  name: "round",
794
- children: (e) => /* @__PURE__ */ F("div", {
794
+ children: (t) => /* @__PURE__ */ F("div", {
795
795
  className: "grid gap-1.5",
796
796
  children: [/* @__PURE__ */ P(j, {
797
797
  htmlFor: i("rate-round"),
798
- children: /* @__PURE__ */ P(n, { id: "Rounding" })
799
- }), /* @__PURE__ */ F(C, {
800
- value: e.state.value,
801
- onValueChange: (t) => e.handleChange(t),
802
- children: [/* @__PURE__ */ P(b, {
798
+ children: /* @__PURE__ */ P(e, { id: "Rounding" })
799
+ }), /* @__PURE__ */ F(w, {
800
+ value: t.state.value,
801
+ onValueChange: (e) => t.handleChange(e),
802
+ children: [/* @__PURE__ */ P(x, {
803
803
  id: i("rate-round"),
804
804
  className: "w-full",
805
- children: /* @__PURE__ */ P(y, {})
806
- }), /* @__PURE__ */ F(x, { children: [
807
- /* @__PURE__ */ P(S, {
805
+ children: /* @__PURE__ */ P(b, {})
806
+ }), /* @__PURE__ */ F(S, { children: [
807
+ /* @__PURE__ */ P(C, {
808
808
  value: "half_up",
809
- children: /* @__PURE__ */ P(n, { id: "Nearest" })
809
+ children: /* @__PURE__ */ P(e, { id: "Nearest" })
810
810
  }),
811
- /* @__PURE__ */ P(S, {
811
+ /* @__PURE__ */ P(C, {
812
812
  value: "up",
813
- children: /* @__PURE__ */ P(n, { id: "Up" })
813
+ children: /* @__PURE__ */ P(e, { id: "Up" })
814
814
  }),
815
- /* @__PURE__ */ P(S, {
815
+ /* @__PURE__ */ P(C, {
816
816
  value: "down",
817
- children: /* @__PURE__ */ P(n, { id: "Down" })
817
+ children: /* @__PURE__ */ P(e, { id: "Down" })
818
818
  })
819
819
  ] })]
820
820
  })]
821
821
  })
822
822
  }),
823
- /* @__PURE__ */ P(e.Field, {
823
+ /* @__PURE__ */ P(n.Field, {
824
824
  name: "maximumAmount",
825
825
  children: (e) => /* @__PURE__ */ P(q, {
826
826
  id: "rate-maximum",
@@ -834,26 +834,26 @@ function Ve({ form: e, meter: r }) {
834
834
  })
835
835
  ] });
836
836
  }
837
- function He({ form: e, meter: r }) {
837
+ function He({ form: n, meter: r }) {
838
838
  let { id: i, text: a } = t(), o = M.useContext(G);
839
- return /* @__PURE__ */ F(N, { children: [/* @__PURE__ */ P(e.Field, {
839
+ return /* @__PURE__ */ F(N, { children: [/* @__PURE__ */ P(n.Field, {
840
840
  name: "matrixDimension",
841
- children: (e) => /* @__PURE__ */ F("div", {
841
+ children: (t) => /* @__PURE__ */ F("div", {
842
842
  className: "grid gap-1.5",
843
843
  children: [
844
844
  /* @__PURE__ */ P(j, {
845
845
  htmlFor: i("matrix-dimension"),
846
- children: /* @__PURE__ */ P(n, { id: "Dimension" })
846
+ children: /* @__PURE__ */ P(e, { id: "Dimension" })
847
847
  }),
848
- /* @__PURE__ */ F(C, {
849
- value: e.state.value || null,
850
- onValueChange: (t) => e.handleChange(t ?? ""),
851
- children: [/* @__PURE__ */ P(b, {
848
+ /* @__PURE__ */ F(w, {
849
+ value: t.state.value || null,
850
+ onValueChange: (e) => t.handleChange(e ?? ""),
851
+ children: [/* @__PURE__ */ P(x, {
852
852
  id: i("matrix-dimension"),
853
853
  className: "w-full",
854
854
  ...Y("matrix-dimension", o),
855
- children: /* @__PURE__ */ P(y, { placeholder: a("Select dimension") })
856
- }), /* @__PURE__ */ P(x, { children: Object.keys(r.group_by ?? {}).map((e) => /* @__PURE__ */ P(S, {
855
+ children: /* @__PURE__ */ P(b, { placeholder: a("Select dimension") })
856
+ }), /* @__PURE__ */ P(S, { children: Object.keys(r.group_by ?? {}).map((e) => /* @__PURE__ */ P(C, {
857
857
  value: e,
858
858
  children: e
859
859
  }, e)) })]
@@ -861,7 +861,7 @@ function He({ form: e, meter: r }) {
861
861
  /* @__PURE__ */ P(X, { fieldId: "matrix-dimension" })
862
862
  ]
863
863
  })
864
- }), /* @__PURE__ */ P(e.Field, {
864
+ }), /* @__PURE__ */ P(n.Field, {
865
865
  name: "matrixCells",
866
866
  mode: "array",
867
867
  children: (t) => /* @__PURE__ */ F("div", {
@@ -869,7 +869,7 @@ function He({ form: e, meter: r }) {
869
869
  children: [
870
870
  /* @__PURE__ */ F("div", {
871
871
  className: "flex items-center justify-between gap-3",
872
- children: [/* @__PURE__ */ P(j, { children: /* @__PURE__ */ P(n, { id: "Matrix cells" }) }), /* @__PURE__ */ F(s, {
872
+ children: [/* @__PURE__ */ P(j, { children: /* @__PURE__ */ P(e, { id: "Matrix cells" }) }), /* @__PURE__ */ F(s, {
873
873
  id: i("matrix-add-cell"),
874
874
  type: "button",
875
875
  variant: "outline",
@@ -882,45 +882,45 @@ function He({ form: e, meter: r }) {
882
882
  children: [/* @__PURE__ */ P(I, {
883
883
  icon: L,
884
884
  className: "size-4"
885
- }), /* @__PURE__ */ P(n, { id: "Add cell" })]
885
+ }), /* @__PURE__ */ P(e, { id: "Add cell" })]
886
886
  })]
887
887
  }),
888
888
  /* @__PURE__ */ P(X, { fieldId: "matrix-add-cell" }),
889
889
  t.state.value.length > 0 && /* @__PURE__ */ F("div", {
890
890
  className: "hidden gap-2 px-0.5 text-xs text-muted-foreground sm:grid sm:grid-cols-[1fr_1fr_1fr_auto]",
891
891
  children: [
892
- /* @__PURE__ */ P("span", { children: /* @__PURE__ */ P(n, { id: "Value" }) }),
893
- /* @__PURE__ */ P("span", { children: /* @__PURE__ */ P(n, { id: "Unit price" }) }),
894
- /* @__PURE__ */ P("span", { children: /* @__PURE__ */ P(n, { id: "Maximum" }) }),
892
+ /* @__PURE__ */ P("span", { children: /* @__PURE__ */ P(e, { id: "Value" }) }),
893
+ /* @__PURE__ */ P("span", { children: /* @__PURE__ */ P(e, { id: "Unit price" }) }),
894
+ /* @__PURE__ */ P("span", { children: /* @__PURE__ */ P(e, { id: "Maximum" }) }),
895
895
  /* @__PURE__ */ P("span", {
896
896
  className: "size-8",
897
897
  "aria-hidden": "true"
898
898
  })
899
899
  ]
900
900
  }),
901
- t.state.value.map((n, r) => /* @__PURE__ */ F("div", {
901
+ t.state.value.map((e, r) => /* @__PURE__ */ F("div", {
902
902
  className: "grid gap-2 sm:grid-cols-[1fr_1fr_1fr_auto]",
903
903
  children: [
904
904
  /* @__PURE__ */ P(J, {
905
905
  id: `matrix-cell-${r}-value`,
906
906
  label: a("Value"),
907
- value: n.key,
908
- onChange: (t) => e.setFieldValue(`matrixCells[${r}].key`, t),
907
+ value: e.key,
908
+ onChange: (e) => n.setFieldValue(`matrixCells[${r}].key`, e),
909
909
  placeholder: a("gpt-5")
910
910
  }),
911
911
  /* @__PURE__ */ P(J, {
912
912
  id: `matrix-cell-${r}-unit-price`,
913
913
  label: a("Unit price"),
914
- value: n.unitAmount,
915
- onChange: (t) => e.setFieldValue(`matrixCells[${r}].unitAmount`, t),
914
+ value: e.unitAmount,
915
+ onChange: (e) => n.setFieldValue(`matrixCells[${r}].unitAmount`, e),
916
916
  inputMode: "decimal",
917
917
  placeholder: a("Price")
918
918
  }),
919
919
  /* @__PURE__ */ P(J, {
920
920
  id: `matrix-cell-${r}-maximum`,
921
921
  label: a("Maximum"),
922
- value: n.maximumAmount,
923
- onChange: (t) => e.setFieldValue(`matrixCells[${r}].maximumAmount`, t),
922
+ value: e.maximumAmount,
923
+ onChange: (e) => n.setFieldValue(`matrixCells[${r}].maximumAmount`, e),
924
924
  inputMode: "decimal",
925
925
  placeholder: a("Maximum")
926
926
  }),
@@ -934,9 +934,9 @@ function He({ form: e, meter: r }) {
934
934
  })
935
935
  })] });
936
936
  }
937
- function Ue({ form: e }) {
937
+ function Ue({ form: n }) {
938
938
  let { id: r, text: i } = t();
939
- return /* @__PURE__ */ P(N, { children: /* @__PURE__ */ P(e.Field, {
939
+ return /* @__PURE__ */ P(N, { children: /* @__PURE__ */ P(n.Field, {
940
940
  name: "tiers",
941
941
  mode: "array",
942
942
  children: (t) => /* @__PURE__ */ F("div", {
@@ -944,9 +944,9 @@ function Ue({ form: e }) {
944
944
  children: [
945
945
  /* @__PURE__ */ F("div", {
946
946
  className: "flex items-center justify-between gap-3",
947
- children: [/* @__PURE__ */ F("div", { children: [/* @__PURE__ */ P(j, { children: /* @__PURE__ */ P(n, { id: "Tiers" }) }), /* @__PURE__ */ P("p", {
947
+ children: [/* @__PURE__ */ F("div", { children: [/* @__PURE__ */ P(j, { children: /* @__PURE__ */ P(e, { id: "Tiers" }) }), /* @__PURE__ */ P("p", {
948
948
  className: "text-xs text-muted-foreground",
949
- children: /* @__PURE__ */ P(n, { id: "Leave the final limit blank for the unbounded tier." })
949
+ children: /* @__PURE__ */ P(e, { id: "Leave the final limit blank for the unbounded tier." })
950
950
  })] }), /* @__PURE__ */ F(s, {
951
951
  id: r("tier-add"),
952
952
  type: "button",
@@ -960,46 +960,46 @@ function Ue({ form: e }) {
960
960
  children: [/* @__PURE__ */ P(I, {
961
961
  icon: L,
962
962
  className: "size-4"
963
- }), /* @__PURE__ */ P(n, { id: "Add tier" })]
963
+ }), /* @__PURE__ */ P(e, { id: "Add tier" })]
964
964
  })]
965
965
  }),
966
966
  /* @__PURE__ */ P(X, { fieldId: "tier-add" }),
967
967
  t.state.value.length > 0 && /* @__PURE__ */ F("div", {
968
968
  className: "hidden gap-2 px-0.5 text-xs text-muted-foreground sm:grid sm:grid-cols-[1fr_1fr_1fr_auto]",
969
969
  children: [
970
- /* @__PURE__ */ P("span", { children: /* @__PURE__ */ P(n, { id: "Upper limit" }) }),
971
- /* @__PURE__ */ P("span", { children: /* @__PURE__ */ P(n, { id: "Unit price" }) }),
972
- /* @__PURE__ */ P("span", { children: /* @__PURE__ */ P(n, { id: "Flat amount" }) }),
970
+ /* @__PURE__ */ P("span", { children: /* @__PURE__ */ P(e, { id: "Upper limit" }) }),
971
+ /* @__PURE__ */ P("span", { children: /* @__PURE__ */ P(e, { id: "Unit price" }) }),
972
+ /* @__PURE__ */ P("span", { children: /* @__PURE__ */ P(e, { id: "Flat amount" }) }),
973
973
  /* @__PURE__ */ P("span", {
974
974
  className: "size-8",
975
975
  "aria-hidden": "true"
976
976
  })
977
977
  ]
978
978
  }),
979
- t.state.value.map((n, r) => /* @__PURE__ */ F("div", {
979
+ t.state.value.map((e, r) => /* @__PURE__ */ F("div", {
980
980
  className: "grid gap-2 sm:grid-cols-[1fr_1fr_1fr_auto]",
981
981
  children: [
982
982
  /* @__PURE__ */ P(J, {
983
983
  id: `tier-${r}-limit`,
984
984
  label: i("Upper limit"),
985
- value: n.upTo,
986
- onChange: (t) => e.setFieldValue(`tiers[${r}].upTo`, t),
985
+ value: e.upTo,
986
+ onChange: (e) => n.setFieldValue(`tiers[${r}].upTo`, e),
987
987
  inputMode: "numeric",
988
988
  placeholder: r === t.state.value.length - 1 ? "No limit" : "Up to"
989
989
  }),
990
990
  /* @__PURE__ */ P(J, {
991
991
  id: `tier-${r}-unit-price`,
992
992
  label: i("Unit price"),
993
- value: n.unitAmount,
994
- onChange: (t) => e.setFieldValue(`tiers[${r}].unitAmount`, t),
993
+ value: e.unitAmount,
994
+ onChange: (e) => n.setFieldValue(`tiers[${r}].unitAmount`, e),
995
995
  inputMode: "decimal",
996
996
  placeholder: i("Unit price")
997
997
  }),
998
998
  /* @__PURE__ */ P(J, {
999
999
  id: `tier-${r}-flat-amount`,
1000
1000
  label: i("Flat amount"),
1001
- value: n.flatAmount,
1002
- onChange: (t) => e.setFieldValue(`tiers[${r}].flatAmount`, t),
1001
+ value: e.flatAmount,
1002
+ onChange: (e) => n.setFieldValue(`tiers[${r}].flatAmount`, e),
1003
1003
  inputMode: "decimal",
1004
1004
  placeholder: i("Flat amount")
1005
1005
  }),
@@ -1054,17 +1054,17 @@ function We({ form: e }) {
1054
1054
  ]
1055
1055
  });
1056
1056
  }
1057
- function Ge({ form: e, meter: r }) {
1057
+ function Ge({ form: n, meter: r }) {
1058
1058
  let { id: i, text: a } = t(), o = M.useContext(G);
1059
1059
  return /* @__PURE__ */ F("section", {
1060
1060
  className: "grid gap-3 border-t pt-5",
1061
1061
  children: [/* @__PURE__ */ F("div", { children: [/* @__PURE__ */ P("h3", {
1062
1062
  className: "text-sm font-medium",
1063
- children: /* @__PURE__ */ P(n, { id: "Event filters" })
1063
+ children: /* @__PURE__ */ P(e, { id: "Event filters" })
1064
1064
  }), /* @__PURE__ */ P("p", {
1065
1065
  className: "text-xs text-muted-foreground",
1066
- children: /* @__PURE__ */ P(n, { id: "Optional. Only events with one of the listed dimension values are rated." })
1067
- })] }), /* @__PURE__ */ P(e.Field, {
1066
+ children: /* @__PURE__ */ P(e, { id: "Optional. Only events with one of the listed dimension values are rated." })
1067
+ })] }), /* @__PURE__ */ P(n.Field, {
1068
1068
  name: "filters",
1069
1069
  mode: "array",
1070
1070
  children: (t) => /* @__PURE__ */ F("div", {
@@ -1073,8 +1073,8 @@ function Ge({ form: e, meter: r }) {
1073
1073
  t.state.value.length > 0 && /* @__PURE__ */ F("div", {
1074
1074
  className: "hidden gap-2 px-0.5 text-xs text-muted-foreground sm:grid sm:grid-cols-[1fr_2fr_auto]",
1075
1075
  children: [
1076
- /* @__PURE__ */ P("span", { children: /* @__PURE__ */ P(n, { id: "Dimension" }) }),
1077
- /* @__PURE__ */ P("span", { children: /* @__PURE__ */ P(n, { id: "Values" }) }),
1076
+ /* @__PURE__ */ P("span", { children: /* @__PURE__ */ P(e, { id: "Dimension" }) }),
1077
+ /* @__PURE__ */ P("span", { children: /* @__PURE__ */ P(e, { id: "Values" }) }),
1078
1078
  /* @__PURE__ */ P("span", {
1079
1079
  className: "size-8",
1080
1080
  "aria-hidden": "true"
@@ -1090,17 +1090,17 @@ function Ge({ form: e, meter: r }) {
1090
1090
  /* @__PURE__ */ P(j, {
1091
1091
  htmlFor: i(`filter-${c}-dimension`),
1092
1092
  className: "text-xs text-muted-foreground sm:sr-only",
1093
- children: /* @__PURE__ */ P(n, { id: "Dimension" })
1093
+ children: /* @__PURE__ */ P(e, { id: "Dimension" })
1094
1094
  }),
1095
- /* @__PURE__ */ F(C, {
1095
+ /* @__PURE__ */ F(w, {
1096
1096
  value: s.key || null,
1097
- onValueChange: (t) => e.setFieldValue(`filters[${c}].key`, t ?? ""),
1098
- children: [/* @__PURE__ */ P(b, {
1097
+ onValueChange: (e) => n.setFieldValue(`filters[${c}].key`, e ?? ""),
1098
+ children: [/* @__PURE__ */ P(x, {
1099
1099
  id: i(`filter-${c}-dimension`),
1100
1100
  className: "w-full",
1101
1101
  ...Y(`filter-${c}-dimension`, o),
1102
- children: /* @__PURE__ */ P(y, { placeholder: a("Dimension") })
1103
- }), /* @__PURE__ */ P(x, { children: Object.keys(r.group_by ?? {}).map((e) => /* @__PURE__ */ P(S, {
1102
+ children: /* @__PURE__ */ P(b, { placeholder: a("Dimension") })
1103
+ }), /* @__PURE__ */ P(S, { children: Object.keys(r.group_by ?? {}).map((e) => /* @__PURE__ */ P(C, {
1104
1104
  value: e,
1105
1105
  children: e
1106
1106
  }, e)) })]
@@ -1112,7 +1112,7 @@ function Ge({ form: e, meter: r }) {
1112
1112
  id: `filter-${c}-values`,
1113
1113
  label: a("Values"),
1114
1114
  value: s.value,
1115
- onChange: (t) => e.setFieldValue(`filters[${c}].value`, t),
1115
+ onChange: (e) => n.setFieldValue(`filters[${c}].value`, e),
1116
1116
  placeholder: a("eu, us")
1117
1117
  }),
1118
1118
  /* @__PURE__ */ P(Ye, {
@@ -1134,49 +1134,49 @@ function Ge({ form: e, meter: r }) {
1134
1134
  children: [/* @__PURE__ */ P(I, {
1135
1135
  icon: L,
1136
1136
  className: "size-4"
1137
- }), /* @__PURE__ */ P(n, { id: "Add filter" })]
1137
+ }), /* @__PURE__ */ P(e, { id: "Add filter" })]
1138
1138
  })
1139
1139
  ]
1140
1140
  })
1141
1141
  })]
1142
1142
  });
1143
1143
  }
1144
- function Ke({ form: e }) {
1144
+ function Ke({ form: n }) {
1145
1145
  let { id: r, text: i } = t();
1146
1146
  return /* @__PURE__ */ F("section", {
1147
1147
  className: "grid gap-4 border-t pt-5",
1148
1148
  children: [
1149
1149
  /* @__PURE__ */ P("h3", {
1150
1150
  className: "text-sm font-medium",
1151
- children: /* @__PURE__ */ P(n, { id: "Allowance" })
1151
+ children: /* @__PURE__ */ P(e, { id: "Allowance" })
1152
1152
  }),
1153
- /* @__PURE__ */ P(e.Field, {
1153
+ /* @__PURE__ */ P(n.Field, {
1154
1154
  name: "allowanceMode",
1155
- children: (e) => /* @__PURE__ */ F("div", {
1155
+ children: (t) => /* @__PURE__ */ F("div", {
1156
1156
  className: "grid gap-1.5",
1157
1157
  children: [/* @__PURE__ */ P(j, {
1158
1158
  htmlFor: r("allowance-mode"),
1159
- children: /* @__PURE__ */ P(n, { id: "Included usage" })
1160
- }), /* @__PURE__ */ F(C, {
1161
- value: e.state.value,
1162
- onValueChange: (t) => e.handleChange(t),
1163
- children: [/* @__PURE__ */ P(b, {
1159
+ children: /* @__PURE__ */ P(e, { id: "Included usage" })
1160
+ }), /* @__PURE__ */ F(w, {
1161
+ value: t.state.value,
1162
+ onValueChange: (e) => t.handleChange(e),
1163
+ children: [/* @__PURE__ */ P(x, {
1164
1164
  id: r("allowance-mode"),
1165
1165
  className: "w-full",
1166
- children: /* @__PURE__ */ P(y, {})
1167
- }), /* @__PURE__ */ F(x, { children: [/* @__PURE__ */ P(S, {
1166
+ children: /* @__PURE__ */ P(b, {})
1167
+ }), /* @__PURE__ */ F(S, { children: [/* @__PURE__ */ P(C, {
1168
1168
  value: "none",
1169
- children: /* @__PURE__ */ P(n, { id: "No allowance" })
1170
- }), /* @__PURE__ */ P(S, {
1169
+ children: /* @__PURE__ */ P(e, { id: "No allowance" })
1170
+ }), /* @__PURE__ */ P(C, {
1171
1171
  value: "included",
1172
- children: /* @__PURE__ */ P(n, { id: "Fixed included units" })
1172
+ children: /* @__PURE__ */ P(e, { id: "Fixed included units" })
1173
1173
  })] })]
1174
1174
  })]
1175
1175
  })
1176
1176
  }),
1177
- /* @__PURE__ */ P(e.Subscribe, {
1177
+ /* @__PURE__ */ P(n.Subscribe, {
1178
1178
  selector: (e) => e.values.allowanceMode,
1179
- children: (t) => t === "included" ? /* @__PURE__ */ P(e.Field, {
1179
+ children: (e) => e === "included" ? /* @__PURE__ */ P(n.Field, {
1180
1180
  name: "allowanceIncluded",
1181
1181
  children: (e) => /* @__PURE__ */ P(K, {
1182
1182
  id: "allowance-included",
@@ -1191,21 +1191,21 @@ function Ke({ form: e }) {
1191
1191
  ]
1192
1192
  });
1193
1193
  }
1194
- function qe({ values: e }) {
1195
- let t = "Complete the required fields to preview this rate.";
1194
+ function qe({ values: t }) {
1195
+ let n = "Complete the required fields to preview this rate.";
1196
1196
  try {
1197
- let n = ke(e);
1198
- t = Ie({ price: n.price }), n.allowance?.included !== void 0 && (t += ` · ${n.allowance.included.toLocaleString()} included`);
1197
+ let e = ke(t);
1198
+ n = Ie({ price: e.price }), e.allowance?.included !== void 0 && (n += ` · ${e.allowance.included.toLocaleString()} included`);
1199
1199
  } catch {}
1200
1200
  return /* @__PURE__ */ F("section", {
1201
1201
  className: "rounded-lg bg-muted/50 px-3 py-2.5",
1202
1202
  "aria-live": "polite",
1203
1203
  children: [/* @__PURE__ */ P("p", {
1204
1204
  className: "text-xs font-medium text-muted-foreground",
1205
- children: /* @__PURE__ */ P(n, { id: "Rate preview" })
1205
+ children: /* @__PURE__ */ P(e, { id: "Rate preview" })
1206
1206
  }), /* @__PURE__ */ P("p", {
1207
1207
  className: "mt-1 text-sm font-medium tabular-nums",
1208
- children: t
1208
+ children: n
1209
1209
  })]
1210
1210
  });
1211
1211
  }
@@ -1304,7 +1304,7 @@ function Ye({ label: e, onClick: t, disabled: n }) {
1304
1304
  //#region src/admin/pages/catalog/metering.tsx
1305
1305
  var Xe = 200;
1306
1306
  function Ze() {
1307
- let { text: r } = t(), { adminQueries: a } = i(), [o, l] = M.useState(""), d = w("", Xe), { data: f, isPending: p, error: m, refetch: h } = me(a.usageMeters(d.size, d.cursor)), g = u(), _ = f?.data ?? [], v = o.trim().toLowerCase(), y = v ? _.filter((e) => [
1307
+ let { text: n } = t(), { adminQueries: i } = r(), [a, l] = M.useState(""), d = T("", Xe), { data: f, isPending: p, error: m, refetch: h } = me(i.usageMeters(d.size, d.cursor)), g = u(), _ = f?.data ?? [], v = a.trim().toLowerCase(), y = v ? _.filter((e) => [
1308
1308
  e.key,
1309
1309
  e.event_type,
1310
1310
  e.aggregation,
@@ -1312,7 +1312,7 @@ function Ze() {
1312
1312
  e.rate_card?.product_key
1313
1313
  ].some((e) => e?.toLowerCase().includes(v))) : _, b = we({
1314
1314
  pending: p,
1315
- error: m instanceof e ? m : m ? { status: 500 } : null,
1315
+ error: m instanceof o ? m : m ? { status: 500 } : null,
1316
1316
  count: _.length
1317
1317
  });
1318
1318
  return /* @__PURE__ */ F("div", {
@@ -1324,29 +1324,29 @@ function Ze() {
1324
1324
  className: "max-w-2xl",
1325
1325
  children: [/* @__PURE__ */ P("h1", {
1326
1326
  className: "text-2xl font-semibold tracking-tight text-balance",
1327
- children: /* @__PURE__ */ P(n, { id: "Metering" })
1327
+ children: /* @__PURE__ */ P(e, { id: "Metering" })
1328
1328
  }), /* @__PURE__ */ P("p", {
1329
1329
  className: "mt-1 text-sm text-pretty text-muted-foreground",
1330
- children: /* @__PURE__ */ P(n, { id: "Define usage streams and the default rates charged when usage is recorded. Applications report the events separately." })
1330
+ children: /* @__PURE__ */ P(e, { id: "Define usage streams and the default rates charged when usage is recorded. Applications report the events separately." })
1331
1331
  })]
1332
1332
  }), g && b !== "permission" && /* @__PURE__ */ P(Re, { writesAllowed: !0 })]
1333
1333
  }),
1334
- f && !g && /* @__PURE__ */ P(Q, { children: /* @__PURE__ */ P(n, { id: "Catalog updates are disabled. Meter definitions and rates are visible here; changes require the host operator." }) }),
1334
+ f && !g && /* @__PURE__ */ P(Q, { children: /* @__PURE__ */ P(e, { id: "Catalog updates are disabled. Meter definitions and rates are visible here; changes require the host operator." }) }),
1335
1335
  b === "loading" ? /* @__PURE__ */ P(tt, {}) : b === "permission" ? /* @__PURE__ */ P($, {
1336
- title: r("Metering access is restricted"),
1337
- description: r("Your role does not have permission to read the merchant catalog.")
1336
+ title: n("Metering access is restricted"),
1337
+ description: n("Your role does not have permission to read the merchant catalog.")
1338
1338
  }) : b === "error" ? /* @__PURE__ */ P($, {
1339
- title: r("Metering could not be loaded"),
1340
- description: r("Try again. If the problem continues, check the OpenRails API logs."),
1339
+ title: n("Metering could not be loaded"),
1340
+ description: n("Try again. If the problem continues, check the OpenRails API logs."),
1341
1341
  action: /* @__PURE__ */ P(s, {
1342
1342
  variant: "outline",
1343
1343
  size: "sm",
1344
1344
  onClick: () => void h(),
1345
- children: /* @__PURE__ */ P(n, { id: "Try again" })
1345
+ children: /* @__PURE__ */ P(e, { id: "Try again" })
1346
1346
  })
1347
1347
  }) : b === "empty" ? /* @__PURE__ */ P($, {
1348
- title: r("No usage meters yet"),
1349
- description: r("Create a meter to describe the events your application will report and bill."),
1348
+ title: n("No usage meters yet"),
1349
+ description: n("Create a meter to describe the events your application will report and bill."),
1350
1350
  action: g ? /* @__PURE__ */ P(Re, { writesAllowed: !0 }) : void 0
1351
1351
  }) : /* @__PURE__ */ F(N, { children: [
1352
1352
  /* @__PURE__ */ F("div", {
@@ -1355,62 +1355,62 @@ function Ze() {
1355
1355
  icon: xe,
1356
1356
  className: "absolute top-1/2 left-2.5 size-4 -translate-y-1/2 text-muted-foreground"
1357
1357
  }), /* @__PURE__ */ P(c, {
1358
- value: o,
1358
+ value: a,
1359
1359
  onChange: (e) => l(e.target.value),
1360
1360
  className: "pl-8",
1361
- placeholder: r("Filter this page…"),
1362
- "aria-label": r("Filter meters on this page")
1361
+ placeholder: n("Filter this page…"),
1362
+ "aria-label": n("Filter meters on this page")
1363
1363
  })]
1364
1364
  }),
1365
1365
  /* @__PURE__ */ P("div", {
1366
1366
  className: "max-w-full overflow-x-auto",
1367
- children: /* @__PURE__ */ F(k, { children: [/* @__PURE__ */ P(te, { children: /* @__PURE__ */ F(O, {
1367
+ children: /* @__PURE__ */ F(ne, { children: [/* @__PURE__ */ P(te, { children: /* @__PURE__ */ F(k, {
1368
1368
  className: "hover:bg-transparent",
1369
1369
  children: [
1370
- /* @__PURE__ */ P(E, {
1370
+ /* @__PURE__ */ P(D, {
1371
1371
  className: "text-muted-foreground",
1372
- children: /* @__PURE__ */ P(n, { id: "Meter" })
1372
+ children: /* @__PURE__ */ P(e, { id: "Meter" })
1373
1373
  }),
1374
- /* @__PURE__ */ P(E, {
1374
+ /* @__PURE__ */ P(D, {
1375
1375
  className: "text-muted-foreground",
1376
- children: /* @__PURE__ */ P(n, { id: "Event" })
1376
+ children: /* @__PURE__ */ P(e, { id: "Event" })
1377
1377
  }),
1378
- /* @__PURE__ */ P(E, {
1378
+ /* @__PURE__ */ P(D, {
1379
1379
  className: "text-muted-foreground",
1380
- children: /* @__PURE__ */ P(n, { id: "Aggregation" })
1380
+ children: /* @__PURE__ */ P(e, { id: "Aggregation" })
1381
1381
  }),
1382
- /* @__PURE__ */ P(E, {
1382
+ /* @__PURE__ */ P(D, {
1383
1383
  className: "text-muted-foreground",
1384
- children: /* @__PURE__ */ P(n, { id: "Default price" })
1384
+ children: /* @__PURE__ */ P(e, { id: "Default price" })
1385
1385
  }),
1386
- /* @__PURE__ */ P(E, {
1386
+ /* @__PURE__ */ P(D, {
1387
1387
  className: "text-muted-foreground",
1388
- children: /* @__PURE__ */ P(n, { id: "Product" })
1388
+ children: /* @__PURE__ */ P(e, { id: "Product" })
1389
1389
  }),
1390
- /* @__PURE__ */ P(E, {
1390
+ /* @__PURE__ */ P(D, {
1391
1391
  className: "text-muted-foreground",
1392
- children: /* @__PURE__ */ P(n, { id: "Activity" })
1392
+ children: /* @__PURE__ */ P(e, { id: "Activity" })
1393
1393
  }),
1394
- /* @__PURE__ */ P(E, {
1394
+ /* @__PURE__ */ P(D, {
1395
1395
  className: "text-muted-foreground",
1396
- children: /* @__PURE__ */ P(n, { id: "Last event" })
1396
+ children: /* @__PURE__ */ P(e, { id: "Last event" })
1397
1397
  }),
1398
- /* @__PURE__ */ P(E, { children: /* @__PURE__ */ P("span", {
1398
+ /* @__PURE__ */ P(D, { children: /* @__PURE__ */ P("span", {
1399
1399
  className: "sr-only",
1400
- children: /* @__PURE__ */ P(n, { id: "Open" })
1400
+ children: /* @__PURE__ */ P(e, { id: "Open" })
1401
1401
  }) })
1402
1402
  ]
1403
- }) }), /* @__PURE__ */ F(ee, { children: [y.map((e) => /* @__PURE__ */ P(Qe, { meter: e }, e.key)), y.length === 0 && /* @__PURE__ */ P(O, { children: /* @__PURE__ */ F(D, {
1403
+ }) }), /* @__PURE__ */ F(ee, { children: [y.map((e) => /* @__PURE__ */ P(Qe, { meter: e }, e.key)), y.length === 0 && /* @__PURE__ */ P(k, { children: /* @__PURE__ */ F(O, {
1404
1404
  colSpan: 9,
1405
1405
  className: "h-24 text-center text-muted-foreground",
1406
1406
  children: [
1407
- /* @__PURE__ */ P(n, { id: "No meters on this page match “" }),
1408
- o,
1407
+ /* @__PURE__ */ P(e, { id: "No meters on this page match “" }),
1408
+ a,
1409
1409
  "”."
1410
1410
  ]
1411
1411
  }) })] })] })
1412
1412
  }),
1413
- /* @__PURE__ */ P(T, {
1413
+ /* @__PURE__ */ P(E, {
1414
1414
  pages: d,
1415
1415
  rows: f?.data?.length ?? 0,
1416
1416
  nextCursor: f?.next_cursor,
@@ -1426,10 +1426,10 @@ function Ze() {
1426
1426
  });
1427
1427
  }
1428
1428
  function Qe({ meter: e }) {
1429
- return /* @__PURE__ */ F(ne, {
1429
+ return /* @__PURE__ */ F(A, {
1430
1430
  to: `/catalog/metering/${encodeURIComponent(e.key)}`,
1431
1431
  children: [
1432
- /* @__PURE__ */ F(D, { children: [/* @__PURE__ */ P(a, {
1432
+ /* @__PURE__ */ F(O, { children: [/* @__PURE__ */ P(i, {
1433
1433
  className: "font-medium underline-offset-3 hover:underline",
1434
1434
  to: `/catalog/metering/${encodeURIComponent(e.key)}`,
1435
1435
  children: e.key
@@ -1437,25 +1437,25 @@ function Qe({ meter: e }) {
1437
1437
  className: "text-xs text-muted-foreground",
1438
1438
  children: e.unit
1439
1439
  })] }),
1440
- /* @__PURE__ */ P(D, { children: e.event_type }),
1441
- /* @__PURE__ */ P(D, { children: /* @__PURE__ */ P(A, {
1440
+ /* @__PURE__ */ P(O, { children: e.event_type }),
1441
+ /* @__PURE__ */ P(O, { children: /* @__PURE__ */ P(v, {
1442
1442
  variant: "secondary",
1443
1443
  children: e.aggregation
1444
1444
  }) }),
1445
- /* @__PURE__ */ P(D, {
1445
+ /* @__PURE__ */ P(O, {
1446
1446
  className: "font-medium tabular-nums",
1447
1447
  children: Ie(e.rate_card)
1448
1448
  }),
1449
- /* @__PURE__ */ P(D, { children: e.rate_card?.product_key ?? "—" }),
1450
- /* @__PURE__ */ P(D, { children: /* @__PURE__ */ F("span", {
1449
+ /* @__PURE__ */ P(O, { children: e.rate_card?.product_key ?? "—" }),
1450
+ /* @__PURE__ */ P(O, { children: /* @__PURE__ */ F("span", {
1451
1451
  className: "inline-flex items-center gap-1.5 text-sm",
1452
1452
  children: [/* @__PURE__ */ P("span", { className: `size-1.5 rounded-full ${e.has_activity ? "bg-settled" : "bg-muted-foreground/50"}` }), e.has_activity ? "Active" : "No events"]
1453
1453
  }) }),
1454
- /* @__PURE__ */ P(D, {
1454
+ /* @__PURE__ */ P(O, {
1455
1455
  className: "text-muted-foreground tabular-nums",
1456
1456
  children: h(e.last_event_at)
1457
1457
  }),
1458
- /* @__PURE__ */ P(D, {
1458
+ /* @__PURE__ */ P(O, {
1459
1459
  className: "text-right",
1460
1460
  children: /* @__PURE__ */ P(I, {
1461
1461
  icon: ve,
@@ -1466,18 +1466,18 @@ function Qe({ meter: e }) {
1466
1466
  });
1467
1467
  }
1468
1468
  function $e() {
1469
- let { text: a } = t(), { adminQueries: c } = i(), { key: l = "" } = r(), d = l, f = o(), p = me(c.usageMeter(d)), m = u(), h = me(c.allProducts({ errorAction: "Load products for metering" }));
1469
+ let { text: i } = t(), { adminQueries: c } = r(), { key: l = "" } = n(), d = l, f = a(), p = me(c.usageMeter(d)), m = u(), h = me(c.allProducts({ errorAction: "Load products for metering" }));
1470
1470
  if (p.isPending) return /* @__PURE__ */ P(nt, {});
1471
1471
  if (p.error) {
1472
- let t = p.error instanceof e && p.error.status === 404, n = p.error instanceof e && p.error.status === 403;
1472
+ let e = p.error instanceof o && p.error.status === 404, t = p.error instanceof o && p.error.status === 403;
1473
1473
  return /* @__PURE__ */ P($, {
1474
- title: n ? "Metering access is restricted" : t ? "Meter not found" : "Meter could not be loaded",
1475
- description: n ? "Your role does not have permission to read this meter." : t ? "This meter does not exist in the active merchant catalog." : "Try loading the meter again.",
1476
- action: n ? void 0 : /* @__PURE__ */ P(s, {
1474
+ title: t ? "Metering access is restricted" : e ? "Meter not found" : "Meter could not be loaded",
1475
+ description: t ? "Your role does not have permission to read this meter." : e ? "This meter does not exist in the active merchant catalog." : "Try loading the meter again.",
1476
+ action: t ? void 0 : /* @__PURE__ */ P(s, {
1477
1477
  variant: "outline",
1478
1478
  size: "sm",
1479
- onClick: () => t ? f("/catalog/metering") : void p.refetch(),
1480
- children: t ? "Back to metering" : "Try again"
1479
+ onClick: () => e ? f("/catalog/metering") : void p.refetch(),
1480
+ children: e ? "Back to metering" : "Try again"
1481
1481
  })
1482
1482
  });
1483
1483
  }
@@ -1494,7 +1494,7 @@ function $e() {
1494
1494
  variant: "ghost",
1495
1495
  size: "icon",
1496
1496
  onClick: () => f("/catalog/metering"),
1497
- "aria-label": a("Back to metering"),
1497
+ "aria-label": i("Back to metering"),
1498
1498
  children: /* @__PURE__ */ P(I, {
1499
1499
  icon: _e,
1500
1500
  className: "size-4"
@@ -1507,9 +1507,9 @@ function $e() {
1507
1507
  children: [/* @__PURE__ */ P("h1", {
1508
1508
  className: "truncate text-xl font-semibold tracking-tight",
1509
1509
  children: g.key
1510
- }), !m && /* @__PURE__ */ P(A, {
1510
+ }), !m && /* @__PURE__ */ P(v, {
1511
1511
  variant: "secondary",
1512
- children: /* @__PURE__ */ P(n, { id: "read-only" })
1512
+ children: /* @__PURE__ */ P(e, { id: "read-only" })
1513
1513
  })]
1514
1514
  }), /* @__PURE__ */ F("p", {
1515
1515
  className: "mt-1 text-sm text-muted-foreground",
@@ -1532,47 +1532,47 @@ function $e() {
1532
1532
  products: h.data?.data ?? [],
1533
1533
  productsPending: h.isPending,
1534
1534
  productsError: !!h.error,
1535
- productsForbidden: h.error instanceof e && h.error.status === 403
1535
+ productsForbidden: h.error instanceof o && h.error.status === 403
1536
1536
  })]
1537
1537
  })
1538
1538
  ]
1539
1539
  }),
1540
- !m && /* @__PURE__ */ P(Q, { children: /* @__PURE__ */ P(n, { id: "Catalog updates are disabled. The console is read-only." }) }),
1540
+ !m && /* @__PURE__ */ P(Q, { children: /* @__PURE__ */ P(e, { id: "Catalog updates are disabled. The console is read-only." }) }),
1541
1541
  /* @__PURE__ */ F("section", {
1542
1542
  className: "grid gap-4",
1543
1543
  children: [
1544
1544
  /* @__PURE__ */ F("div", { children: [/* @__PURE__ */ P("h2", {
1545
1545
  className: "text-base font-semibold",
1546
- children: /* @__PURE__ */ P(n, { id: "Event contract" })
1546
+ children: /* @__PURE__ */ P(e, { id: "Event contract" })
1547
1547
  }), /* @__PURE__ */ F("p", {
1548
1548
  className: "mt-1 max-w-3xl text-sm text-pretty text-muted-foreground",
1549
1549
  children: [
1550
- /* @__PURE__ */ P(n, { id: "Creating this meter does not send events. The host application must report idempotent usage to" }),
1550
+ /* @__PURE__ */ P(e, { id: "Creating this meter does not send events. The host application must report idempotent usage to" }),
1551
1551
  " ",
1552
1552
  /* @__PURE__ */ P("code", {
1553
1553
  className: "text-foreground",
1554
- children: /* @__PURE__ */ P(n, { id: "/app/usage-events" })
1554
+ children: /* @__PURE__ */ P(e, { id: "/app/usage-events" })
1555
1555
  }),
1556
- /* @__PURE__ */ P(n, { id: " with this shape." })
1556
+ /* @__PURE__ */ P(e, { id: " with this shape." })
1557
1557
  ]
1558
1558
  })] }),
1559
1559
  /* @__PURE__ */ F("dl", {
1560
1560
  className: "grid gap-x-8 gap-y-4 border-y py-4 sm:grid-cols-2 lg:grid-cols-4",
1561
1561
  children: [
1562
1562
  /* @__PURE__ */ P(Z, {
1563
- label: a("Event type"),
1563
+ label: i("Event type"),
1564
1564
  value: g.event_type
1565
1565
  }),
1566
1566
  /* @__PURE__ */ P(Z, {
1567
- label: a("Aggregation"),
1567
+ label: i("Aggregation"),
1568
1568
  value: g.aggregation === "sum" ? `Sum ${g.value_property}` : "Count each event"
1569
1569
  }),
1570
1570
  /* @__PURE__ */ P(Z, {
1571
- label: a("Meter key"),
1571
+ label: i("Meter key"),
1572
1572
  value: g.key
1573
1573
  }),
1574
1574
  /* @__PURE__ */ P(Z, {
1575
- label: a("Billing support"),
1575
+ label: i("Billing support"),
1576
1576
  value: g.billing_supported ? "Supported" : "Read only"
1577
1577
  }),
1578
1578
  Object.entries(g.group_by ?? {}).map(([e, t]) => /* @__PURE__ */ P(Z, {
@@ -1597,8 +1597,8 @@ function $e() {
1597
1597
  ]
1598
1598
  });
1599
1599
  }
1600
- function et({ meter: e, writesAllowed: r }) {
1601
- let { toast: a, toastApiError: o, adminMutations: c } = i(), { text: l } = t(), u = _(), d = he(), f = pe(c.deleteDefaultUsageRateCard(d)), p = e.rate_card, m = async () => {
1600
+ function et({ meter: n, writesAllowed: i }) {
1601
+ let { toast: a, toastApiError: o, adminMutations: c } = r(), { text: l } = t(), u = _(), d = he(), f = pe(c.deleteDefaultUsageRateCard(d)), p = n.rate_card, m = async () => {
1602
1602
  if (await u({
1603
1603
  title: "Remove the default rate?",
1604
1604
  description: "New usage for this meter will stop being rated after removal. Billed usage orders and accrued amounts remain unchanged.",
@@ -1606,7 +1606,7 @@ function et({ meter: e, writesAllowed: r }) {
1606
1606
  cancelLabel: "Keep rate",
1607
1607
  tone: "destructive"
1608
1608
  })) try {
1609
- await f.mutateAsync(e), a.success("Default rate removed");
1609
+ await f.mutateAsync(n), a.success("Default rate removed");
1610
1610
  } catch (e) {
1611
1611
  o(e, "Remove default rate");
1612
1612
  }
@@ -1617,11 +1617,11 @@ function et({ meter: e, writesAllowed: r }) {
1617
1617
  className: "flex flex-wrap items-start justify-between gap-4",
1618
1618
  children: [/* @__PURE__ */ F("div", { children: [/* @__PURE__ */ P("h2", {
1619
1619
  className: "text-base font-semibold",
1620
- children: /* @__PURE__ */ P(n, { id: "Default rate" })
1620
+ children: /* @__PURE__ */ P(e, { id: "Default rate" })
1621
1621
  }), /* @__PURE__ */ P("p", {
1622
1622
  className: "mt-1 text-sm text-muted-foreground",
1623
- children: /* @__PURE__ */ P(n, { id: "Used for every customer." })
1624
- })] }), p && r && /* @__PURE__ */ F(s, {
1623
+ children: /* @__PURE__ */ P(e, { id: "Used for every customer." })
1624
+ })] }), p && i && /* @__PURE__ */ F(s, {
1625
1625
  variant: "outline",
1626
1626
  size: "sm",
1627
1627
  disabled: f.isPending,
@@ -1631,7 +1631,7 @@ function et({ meter: e, writesAllowed: r }) {
1631
1631
  className: "size-4"
1632
1632
  }), f.isPending ? "Removing…" : "Remove default"]
1633
1633
  })]
1634
- }), e.billing_supported ? p ? /* @__PURE__ */ F("dl", {
1634
+ }), n.billing_supported ? p ? /* @__PURE__ */ F("dl", {
1635
1635
  className: "grid gap-x-8 gap-y-4 border-y py-4 sm:grid-cols-2 lg:grid-cols-4",
1636
1636
  children: [
1637
1637
  /* @__PURE__ */ P(Z, {
@@ -1661,8 +1661,8 @@ function et({ meter: e, writesAllowed: r }) {
1661
1661
  ]
1662
1662
  }) : /* @__PURE__ */ P("p", {
1663
1663
  className: "border-y py-6 text-sm text-muted-foreground",
1664
- children: /* @__PURE__ */ P(n, { id: "No default rate. Usage is recorded but is not billed by this meter." })
1665
- }) : /* @__PURE__ */ P(Q, { children: /* @__PURE__ */ P(n, { id: "This meter uses an aggregation that the billing engine cannot rate." }) })]
1664
+ children: /* @__PURE__ */ P(e, { id: "No default rate. Usage is recorded but is not billed by this meter." })
1665
+ }) : /* @__PURE__ */ P(Q, { children: /* @__PURE__ */ P(e, { id: "This meter uses an aggregation that the billing engine cannot rate." }) })]
1666
1666
  });
1667
1667
  }
1668
1668
  function Z({ label: e, value: t }) {
@@ -1718,4 +1718,4 @@ function nt() {
1718
1718
  //#endregion
1719
1719
  export { Ze as CatalogMeteringPage, $e as MeterDetailPage };
1720
1720
 
1721
- //# sourceMappingURL=admin-metering-D-e-37Jn.js.map
1721
+ //# sourceMappingURL=admin-metering-Bv5EcX6M.js.map