@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
@@ -655,23 +655,32 @@ function j(e) {
655
655
  outcome: n,
656
656
  notes: r
657
657
  }
658
- }), ee = (e) => t("/merchant/configuration", { signal: e }), G = (e) => t("/merchant/configuration", {
658
+ }), G = (e, n) => t("/merchant/destructive-holds", {
659
+ query: {
660
+ limit: 100,
661
+ cursor: e
662
+ },
663
+ signal: n
664
+ }), K = (e, n) => t(`/merchant/destructive-holds/${encodeURIComponent(e)}/clear`, {
665
+ method: "POST",
666
+ body: { reason: n }
667
+ }), q = (e) => t("/merchant/configuration", { signal: e }), ee = (e) => t("/merchant/configuration", {
659
668
  method: "PATCH",
660
669
  body: e
661
- }), te = (e) => t("/merchant/psps?limit=500", { signal: e }), K = (e) => t("/merchant/custodians", { signal: e }), ne = (e, n) => t(`/admin/customers/${encodeURIComponent(e)}/payment-methods/${encodeURIComponent(n)}`, { method: "DELETE" }), q = (e, n) => t(`/merchant/custodians/${encodeURIComponent(e)}`, {
670
+ }), J = (e) => t("/merchant/psps?limit=500", { signal: e }), te = (e) => t("/merchant/custodians", { signal: e }), ne = (e, n) => t(`/admin/customers/${encodeURIComponent(e)}/payment-methods/${encodeURIComponent(n)}`, { method: "DELETE" }), re = (e, n) => t(`/merchant/custodians/${encodeURIComponent(e)}`, {
662
671
  method: "PUT",
663
672
  body: n
664
- }), J = async (e) => (await Z(e)).rails, Y = (e) => t("/merchant/psps", {
673
+ }), Y = async (e) => (await ie(e)).rails, X = (e) => t("/merchant/psps", {
665
674
  method: "POST",
666
675
  body: e
667
- }), X = (e, n) => t(`/merchant/psps/${encodeURIComponent(e)}`, {
676
+ }), Z = (e, n) => t(`/merchant/psps/${encodeURIComponent(e)}`, {
668
677
  method: "PATCH",
669
678
  body: n
670
- }), re = (e, n) => t("/merchant/psps/routing-preview", {
679
+ }), Q = (e, n) => t("/merchant/psps/routing-preview", {
671
680
  method: "POST",
672
681
  body: e,
673
682
  signal: n
674
- }), Z = (e) => t("/config", { signal: e });
683
+ }), ie = (e) => t("/config", { signal: e });
675
684
  return {
676
685
  listCustomers: n,
677
686
  getCustomer: r,
@@ -716,17 +725,19 @@ function j(e) {
716
725
  listFindings: H,
717
726
  getFinding: U,
718
727
  resolveFinding: W,
719
- getMerchantConfiguration: ee,
720
- updateMerchantConfiguration: G,
721
- listPSPs: te,
722
- listRails: J,
723
- createPSP: Y,
724
- listCustodians: K,
725
- putCustodian: q,
728
+ listDestructiveHolds: G,
729
+ clearDestructiveHold: K,
730
+ getMerchantConfiguration: q,
731
+ updateMerchantConfiguration: ee,
732
+ listPSPs: J,
733
+ listRails: Y,
734
+ createPSP: X,
735
+ listCustodians: te,
736
+ putCustodian: re,
726
737
  deleteCustomerPaymentMethod: ne,
727
- updatePSP: X,
728
- previewPSPRouting: re,
729
- getConfig: Z,
738
+ updatePSP: Z,
739
+ previewPSPRouting: Q,
740
+ getConfig: ie,
730
741
  getAdminAccess: (e) => t("/admin/access", { signal: e }),
731
742
  updateCustomer: (e, n) => t(`/admin/customers/${e}`, {
732
743
  method: "PATCH",
@@ -961,8 +972,28 @@ function B(e) {
961
972
  };
962
973
  }
963
974
  //#endregion
975
+ //#region src/admin/lib/error-text.ts
976
+ var V = {
977
+ destructive_actions_held: "Refunds, revokes and cancels are paused for you after several in a short time. Someone else can clear the hold on the Ops page.",
978
+ authorization_unavailable: "Billing couldn't check your permissions just now. Try again in a moment.",
979
+ permission_required: "Your role doesn't allow this."
980
+ }, H = (e) => {
981
+ let t = e.trim();
982
+ if (!t) return t;
983
+ let n = t.charAt(0).toUpperCase() + t.slice(1);
984
+ return /[.!?]$/.test(n) ? n : `${n}.`;
985
+ };
986
+ function U(e) {
987
+ if (!(e instanceof x)) return { text: H(e instanceof Error && e.message ? e.message : b.errors.generic) };
988
+ let t = e.code;
989
+ return {
990
+ text: (t && V[t] || (e.message ? void 0 : t && b.errors[t] || (e.status === 404 ? b.errors.resource_not_found : void 0) || (e.status === 403 ? V.permission_required : void 0))) ?? H(e.message || b.errors.generic),
991
+ code: t
992
+ };
993
+ }
994
+ //#endregion
964
995
  //#region src/admin/lib/toast.ts
965
- function V(e) {
996
+ function W(e) {
966
997
  let t = (t) => (n, r) => t(n, {
967
998
  ...r,
968
999
  toasterId: e
@@ -974,7 +1005,7 @@ function V(e) {
974
1005
  warning: t(u.warning)
975
1006
  });
976
1007
  }
977
- function H(e) {
1008
+ function G(e) {
978
1009
  function t(t, n) {
979
1010
  if (t instanceof x) {
980
1011
  if (t.code === "revision_mismatch") {
@@ -985,15 +1016,9 @@ function H(e) {
985
1016
  e.error(`${n}: only a signed-in person can do this`, { description: t.message });
986
1017
  return;
987
1018
  }
988
- if (t.isPermissionDenied) {
989
- e.error(`${n}: your role lacks permission`, { description: t.message });
990
- return;
991
- }
992
- let r = t.code ? `${n} (${t.code})` : n;
993
- e.error(r, { description: t.message });
994
- return;
995
1019
  }
996
- e.error(n, { description: t instanceof Error ? t.message : String(t) });
1020
+ let { text: r, code: i } = U(t);
1021
+ e.error(`Couldn't ${n.charAt(0).toLowerCase()}${n.slice(1)}`, { description: i ? `${r} Code: ${i}.` : r });
997
1022
  }
998
1023
  function n(t) {
999
1024
  e.error(`${t} changed since you opened it`, { description: "Reloaded. Review the current version and edit again." });
@@ -1005,11 +1030,11 @@ function H(e) {
1005
1030
  }
1006
1031
  //#endregion
1007
1032
  //#region src/admin/lib/queries.ts
1008
- function U(e) {
1033
+ function K(e) {
1009
1034
  let t = e.rows[0] ?? [];
1010
1035
  return Object.fromEntries(e.columns.map((e, n) => [e.name, t[n] ?? null]));
1011
1036
  }
1012
- async function W(e, t) {
1037
+ async function q(e, t) {
1013
1038
  return {
1014
1039
  data: await T((n) => e(n, t), t),
1015
1040
  next_cursor: null
@@ -1054,18 +1079,18 @@ var ee = (e) => ({
1054
1079
  ops: () => [...e(), "ops"],
1055
1080
  dashboard: () => [...e(), "dashboard"],
1056
1081
  notifications: () => [...e(), "notifications"]
1057
- }), G = (e) => e ? { errorAction: e } : void 0;
1082
+ }), J = (e) => e ? { errorAction: e } : void 0;
1058
1083
  function te(e, t) {
1059
- let { queryRoot: n } = e, { getCustomer: r, getMerchantConfiguration: i, getPayment: a, getPaymentAttempt: o, getPrice: c, getPriceHistory: u, getProduct: d, getRenewal: f, getSubscription: p, getUsageMeter: m, listCustomerEntitlements: h, listCustomerPaymentMethods: g, listCustomerProductAccess: _, listCustomers: v, listFindings: y, listPaymentAttempts: b, listPSPs: x, listRails: S, previewPSPRouting: C, listPayments: w, listPrices: E, listProducts: D, listRenewals: O, listPriceMigrations: k, listSubscriptions: A, listUsageMeters: j, getAdminAccess: M, getConfig: N, listWebhooks: P, getDashboard: F, metricsQuery: I } = t, L = n, R = ee(L);
1084
+ let { queryRoot: n } = e, { getCustomer: r, getMerchantConfiguration: i, getPayment: a, getPaymentAttempt: o, getPrice: c, getPriceHistory: u, getProduct: d, getRenewal: f, getSubscription: p, getUsageMeter: m, listCustomerEntitlements: h, listCustomerPaymentMethods: g, listCustomerProductAccess: _, listCustomers: v, listFindings: y, listDestructiveHolds: b, listPaymentAttempts: x, listPSPs: S, listRails: C, previewPSPRouting: w, listPayments: E, listPrices: D, listProducts: O, listRenewals: k, listPriceMigrations: A, listSubscriptions: j, listUsageMeters: M, getAdminAccess: N, getConfig: P, listWebhooks: F, getDashboard: I, metricsQuery: L } = t, R = n, z = ee(R);
1060
1085
  return {
1061
- queryKeys: R,
1086
+ queryKeys: z,
1062
1087
  merchantQueryKeys: () => {
1063
- let e = L();
1088
+ let e = R();
1064
1089
  return ee(() => e);
1065
1090
  },
1066
1091
  adminQueries: {
1067
1092
  customers: (e, t, n) => l({
1068
- queryKey: [...R.customers(), {
1093
+ queryKey: [...z.customers(), {
1069
1094
  search: e,
1070
1095
  limit: t,
1071
1096
  cursor: n
@@ -1075,35 +1100,35 @@ function te(e, t) {
1075
1100
  meta: { errorAction: "Load customers" }
1076
1101
  }),
1077
1102
  customer: (e) => l({
1078
- queryKey: R.customer(e),
1103
+ queryKey: z.customer(e),
1079
1104
  queryFn: ({ signal: t }) => r(e, t),
1080
1105
  enabled: !!e,
1081
1106
  meta: { errorAction: "Load customer" }
1082
1107
  }),
1083
1108
  customerSubscriptions: (e, t, n) => l({
1084
1109
  queryKey: [
1085
- ...R.customer(e),
1110
+ ...z.customer(e),
1086
1111
  "subscriptions",
1087
1112
  {
1088
1113
  limit: t,
1089
1114
  cursor: n
1090
1115
  }
1091
1116
  ],
1092
- queryFn: ({ signal: r }) => A({ customer_id: e }, t, n || void 0, r),
1117
+ queryFn: ({ signal: r }) => j({ customer_id: e }, t, n || void 0, r),
1093
1118
  enabled: !!e,
1094
1119
  placeholderData: s,
1095
1120
  meta: { errorAction: "Load subscriptions" }
1096
1121
  }),
1097
1122
  customerPayments: (e, t, n) => l({
1098
1123
  queryKey: [
1099
- ...R.customer(e),
1124
+ ...z.customer(e),
1100
1125
  "payments",
1101
1126
  {
1102
1127
  limit: t,
1103
1128
  cursor: n
1104
1129
  }
1105
1130
  ],
1106
- queryFn: ({ signal: r }) => w({ customer_id: e }, {
1131
+ queryFn: ({ signal: r }) => E({ customer_id: e }, {
1107
1132
  limit: t,
1108
1133
  cursor: n || void 0
1109
1134
  }, r),
@@ -1113,7 +1138,7 @@ function te(e, t) {
1113
1138
  }),
1114
1139
  customerPaymentMethodsPage: (e, t, n) => l({
1115
1140
  queryKey: [
1116
- ...R.customer(e),
1141
+ ...z.customer(e),
1117
1142
  "payment-methods",
1118
1143
  {
1119
1144
  limit: t,
@@ -1130,7 +1155,7 @@ function te(e, t) {
1130
1155
  }),
1131
1156
  customerEntitlements: (e, t, n) => l({
1132
1157
  queryKey: [
1133
- ...R.customer(e),
1158
+ ...z.customer(e),
1134
1159
  "entitlements",
1135
1160
  {
1136
1161
  limit: t,
@@ -1147,7 +1172,7 @@ function te(e, t) {
1147
1172
  }),
1148
1173
  customerProductAccess: (e, t, n) => l({
1149
1174
  queryKey: [
1150
- ...R.customer(e),
1175
+ ...z.customer(e),
1151
1176
  "product-access",
1152
1177
  {
1153
1178
  limit: t,
@@ -1163,23 +1188,23 @@ function te(e, t) {
1163
1188
  meta: { errorAction: "Load product access" }
1164
1189
  }),
1165
1190
  subscriptions: (e, t, n) => l({
1166
- queryKey: [...R.subscriptions(), {
1191
+ queryKey: [...z.subscriptions(), {
1167
1192
  filters: e,
1168
1193
  limit: t,
1169
1194
  cursor: n
1170
1195
  }],
1171
- queryFn: ({ signal: r }) => A(e, t, n || void 0, r),
1196
+ queryFn: ({ signal: r }) => j(e, t, n || void 0, r),
1172
1197
  placeholderData: s,
1173
1198
  meta: { errorAction: "Load subscriptions" }
1174
1199
  }),
1175
1200
  subscription: (e) => l({
1176
- queryKey: R.subscription(e),
1201
+ queryKey: z.subscription(e),
1177
1202
  queryFn: ({ signal: t }) => p(e, t),
1178
1203
  enabled: !!e,
1179
1204
  meta: { errorAction: "Load subscription" }
1180
1205
  }),
1181
1206
  customerPaymentMethods: (e) => l({
1182
- queryKey: [...R.customer(e ?? "unselected"), "payment-methods"],
1207
+ queryKey: [...z.customer(e ?? "unselected"), "payment-methods"],
1183
1208
  queryFn: ({ signal: t }) => T((n) => g(e, {
1184
1209
  limit: 100,
1185
1210
  cursor: n
@@ -1187,12 +1212,12 @@ function te(e, t) {
1187
1212
  enabled: !!e
1188
1213
  }),
1189
1214
  payments: (e, t, n) => l({
1190
- queryKey: [...R.payments(), {
1215
+ queryKey: [...z.payments(), {
1191
1216
  filters: e,
1192
1217
  limit: t,
1193
1218
  cursor: n
1194
1219
  }],
1195
- queryFn: ({ signal: r }) => w(e, {
1220
+ queryFn: ({ signal: r }) => E(e, {
1196
1221
  limit: t,
1197
1222
  cursor: n
1198
1223
  }, r),
@@ -1200,18 +1225,18 @@ function te(e, t) {
1200
1225
  meta: { errorAction: "Load payments" }
1201
1226
  }),
1202
1227
  payment: (e) => l({
1203
- queryKey: R.payment(e),
1228
+ queryKey: z.payment(e),
1204
1229
  queryFn: ({ signal: t }) => a(e, t),
1205
1230
  enabled: !!e,
1206
1231
  meta: { errorAction: "Load payment" }
1207
1232
  }),
1208
1233
  attempts: (e, t, n) => l({
1209
- queryKey: [...R.attempts(), {
1234
+ queryKey: [...z.attempts(), {
1210
1235
  filters: e,
1211
1236
  limit: t,
1212
1237
  cursor: n
1213
1238
  }],
1214
- queryFn: ({ signal: r }) => b(e, {
1239
+ queryFn: ({ signal: r }) => x(e, {
1215
1240
  limit: t,
1216
1241
  cursor: n
1217
1242
  }, r),
@@ -1219,18 +1244,18 @@ function te(e, t) {
1219
1244
  meta: { errorAction: "Load payment attempts" }
1220
1245
  }),
1221
1246
  attempt: (e) => l({
1222
- queryKey: [...R.attempts(), e],
1247
+ queryKey: [...z.attempts(), e],
1223
1248
  queryFn: ({ signal: t }) => o(e, t),
1224
1249
  enabled: !!e,
1225
1250
  meta: { errorAction: "Load payment attempt" }
1226
1251
  }),
1227
1252
  cycles: (e, t, n) => l({
1228
- queryKey: [...R.cycles(), {
1253
+ queryKey: [...z.cycles(), {
1229
1254
  filters: e,
1230
1255
  limit: t,
1231
1256
  cursor: n
1232
1257
  }],
1233
- queryFn: ({ signal: r }) => O(e, {
1258
+ queryFn: ({ signal: r }) => k(e, {
1234
1259
  limit: t,
1235
1260
  cursor: n
1236
1261
  }, r),
@@ -1238,7 +1263,7 @@ function te(e, t) {
1238
1263
  meta: { errorAction: "Load renewals" }
1239
1264
  }),
1240
1265
  cycle: (e) => l({
1241
- queryKey: [...R.cycles(), e],
1266
+ queryKey: [...z.cycles(), e],
1242
1267
  queryFn: ({ signal: t }) => f(e, t),
1243
1268
  enabled: !!e,
1244
1269
  meta: { errorAction: "Load renewal" }
@@ -1247,32 +1272,32 @@ function te(e, t) {
1247
1272
  let { limit: t = 100, cursor: n, errorAction: r } = e;
1248
1273
  return l({
1249
1274
  queryKey: [
1250
- ...R.catalog(),
1275
+ ...z.catalog(),
1251
1276
  "products",
1252
1277
  {
1253
1278
  limit: t,
1254
1279
  cursor: n
1255
1280
  }
1256
1281
  ],
1257
- queryFn: ({ signal: e }) => D(t, n, void 0, e),
1282
+ queryFn: ({ signal: e }) => O(t, n, void 0, e),
1258
1283
  placeholderData: s,
1259
- meta: G(r)
1284
+ meta: J(r)
1260
1285
  });
1261
1286
  },
1262
1287
  allProducts: (e = {}) => l({
1263
1288
  queryKey: [
1264
- ...R.catalog(),
1289
+ ...z.catalog(),
1265
1290
  "products",
1266
1291
  "all"
1267
1292
  ],
1268
- queryFn: ({ signal: e }) => W((e, t) => D(500, e, void 0, t), e),
1269
- meta: G(e.errorAction)
1293
+ queryFn: ({ signal: e }) => q((e, t) => O(500, e, void 0, t), e),
1294
+ meta: J(e.errorAction)
1270
1295
  }),
1271
1296
  prices: (e = {}) => {
1272
1297
  let { productId: t, limit: n = 100, cursor: r, errorAction: i } = e;
1273
1298
  return l({
1274
1299
  queryKey: [
1275
- ...R.catalog(),
1300
+ ...z.catalog(),
1276
1301
  "prices",
1277
1302
  {
1278
1303
  productId: t,
@@ -1280,26 +1305,26 @@ function te(e, t) {
1280
1305
  cursor: r
1281
1306
  }
1282
1307
  ],
1283
- queryFn: ({ signal: e }) => E(n, r, t, e),
1308
+ queryFn: ({ signal: e }) => D(n, r, t, e),
1284
1309
  placeholderData: s,
1285
- meta: G(i)
1310
+ meta: J(i)
1286
1311
  });
1287
1312
  },
1288
1313
  allPrices: (e = {}) => l({
1289
1314
  queryKey: [
1290
- ...R.catalog(),
1315
+ ...z.catalog(),
1291
1316
  "prices",
1292
1317
  "all",
1293
1318
  { productId: e.productId }
1294
1319
  ],
1295
- queryFn: ({ signal: t }) => W((t, n) => E(500, t, e.productId, n), t),
1296
- meta: G(e.errorAction)
1320
+ queryFn: ({ signal: t }) => q((t, n) => D(500, t, e.productId, n), t),
1321
+ meta: J(e.errorAction)
1297
1322
  }),
1298
1323
  price: (e, t = {}) => {
1299
1324
  let { verify: n = !1, errorAction: r } = t;
1300
1325
  return l({
1301
1326
  queryKey: [
1302
- ...R.catalog(),
1327
+ ...z.catalog(),
1303
1328
  "prices",
1304
1329
  e,
1305
1330
  { verify: n }
@@ -1307,12 +1332,12 @@ function te(e, t) {
1307
1332
  queryFn: ({ signal: t }) => c(e, n, t),
1308
1333
  enabled: !!e,
1309
1334
  placeholderData: s,
1310
- meta: G(r)
1335
+ meta: J(r)
1311
1336
  });
1312
1337
  },
1313
1338
  product: (e) => l({
1314
1339
  queryKey: [
1315
- ...R.catalog(),
1340
+ ...z.catalog(),
1316
1341
  "products",
1317
1342
  e ?? "unselected"
1318
1343
  ],
@@ -1321,7 +1346,7 @@ function te(e, t) {
1321
1346
  }),
1322
1347
  priceHistory: (e) => l({
1323
1348
  queryKey: [
1324
- ...R.catalog(),
1349
+ ...z.catalog(),
1325
1350
  "prices",
1326
1351
  "history",
1327
1352
  e ?? "unselected"
@@ -1331,7 +1356,7 @@ function te(e, t) {
1331
1356
  }),
1332
1357
  priceMigrations: (e, t, n = 5) => l({
1333
1358
  queryKey: [
1334
- ...R.catalog(),
1359
+ ...z.catalog(),
1335
1360
  "price-migrations",
1336
1361
  {
1337
1362
  productKey: e,
@@ -1339,43 +1364,43 @@ function te(e, t) {
1339
1364
  limit: n
1340
1365
  }
1341
1366
  ],
1342
- queryFn: ({ signal: r }) => k(e, t, n, r),
1367
+ queryFn: ({ signal: r }) => A(e, t, n, r),
1343
1368
  enabled: !!(e && t)
1344
1369
  }),
1345
1370
  pspRouting: (e) => l({
1346
1371
  queryKey: [
1347
- ...R.catalog(),
1372
+ ...z.catalog(),
1348
1373
  "prices",
1349
1374
  e,
1350
1375
  "routing"
1351
1376
  ],
1352
- queryFn: ({ signal: t }) => C({ price_id: e }, t),
1377
+ queryFn: ({ signal: t }) => w({ price_id: e }, t),
1353
1378
  enabled: !!e,
1354
1379
  meta: { errorAction: "Check purchase readiness" }
1355
1380
  }),
1356
1381
  usageMeters: (e = 200, t) => l({
1357
- queryKey: [...R.usageMeters(), {
1382
+ queryKey: [...z.usageMeters(), {
1358
1383
  limit: e,
1359
1384
  cursor: t
1360
1385
  }],
1361
- queryFn: ({ signal: n }) => j(e, t, n),
1386
+ queryFn: ({ signal: n }) => M(e, t, n),
1362
1387
  placeholderData: s,
1363
1388
  meta: { errorAction: "Load usage meters" }
1364
1389
  }),
1365
1390
  allUsageMeters: () => l({
1366
- queryKey: [...R.usageMeters(), "all"],
1367
- queryFn: ({ signal: e }) => W((e, t) => j(500, e, t), e),
1391
+ queryKey: [...z.usageMeters(), "all"],
1392
+ queryFn: ({ signal: e }) => q((e, t) => M(500, e, t), e),
1368
1393
  meta: { errorAction: "Load usage meters" }
1369
1394
  }),
1370
1395
  usageMeter: (e) => l({
1371
- queryKey: R.usageMeter(e),
1396
+ queryKey: z.usageMeter(e),
1372
1397
  queryFn: ({ signal: t }) => m(e, t),
1373
1398
  enabled: !!e,
1374
1399
  meta: { errorAction: "Load usage meter" }
1375
1400
  }),
1376
1401
  findings: (e = !0) => l({
1377
1402
  queryKey: [
1378
- ...R.ops(),
1403
+ ...z.ops(),
1379
1404
  "findings",
1380
1405
  { limit: 100 }
1381
1406
  ],
@@ -1383,14 +1408,20 @@ function te(e, t) {
1383
1408
  enabled: e,
1384
1409
  meta: { errorAction: "Load findings" }
1385
1410
  }),
1411
+ destructiveHolds: (e = !0) => l({
1412
+ queryKey: [...z.ops(), "destructive-holds"],
1413
+ queryFn: ({ signal: e }) => q((e, t) => b(e, t), e),
1414
+ enabled: e,
1415
+ meta: { errorAction: "Load holds" }
1416
+ }),
1386
1417
  findingSummary: () => l({
1387
1418
  queryKey: [
1388
- ...R.ops(),
1419
+ ...z.ops(),
1389
1420
  "findings",
1390
1421
  "summary"
1391
1422
  ],
1392
1423
  queryFn: async ({ signal: e }) => {
1393
- let t = U(await I({
1424
+ let t = K(await L({
1394
1425
  measures: [
1395
1426
  "open_findings",
1396
1427
  "orphaned_members",
@@ -1409,60 +1440,60 @@ function te(e, t) {
1409
1440
  meta: { errorAction: "Load the findings summary" }
1410
1441
  }),
1411
1442
  merchantConfiguration: (e) => l({
1412
- queryKey: R.settings(),
1443
+ queryKey: z.settings(),
1413
1444
  queryFn: ({ signal: e }) => i(e),
1414
- meta: G(e)
1445
+ meta: J(e)
1415
1446
  }),
1416
1447
  psps: () => l({
1417
- queryKey: [...R.settings(), "psps"],
1418
- queryFn: ({ signal: e }) => x(e),
1448
+ queryKey: [...z.settings(), "psps"],
1449
+ queryFn: ({ signal: e }) => S(e),
1419
1450
  meta: { errorAction: "Load PSPs" }
1420
1451
  }),
1421
1452
  rails: () => l({
1422
- queryKey: [...R.settings(), "rails"],
1423
- queryFn: ({ signal: e }) => S(e),
1453
+ queryKey: [...z.settings(), "rails"],
1454
+ queryFn: ({ signal: e }) => C(e),
1424
1455
  staleTime: Infinity,
1425
1456
  meta: { errorAction: "Load rails" }
1426
1457
  }),
1427
1458
  config: () => l({
1428
1459
  queryKey: ["config"],
1429
- queryFn: ({ signal: e }) => N(e),
1460
+ queryFn: ({ signal: e }) => P(e),
1430
1461
  staleTime: 3e5,
1431
1462
  meta: { errorAction: "Load configuration" }
1432
1463
  }),
1433
1464
  access: () => l({
1434
- queryKey: [...R.merchant(), "access"],
1435
- queryFn: ({ signal: e }) => M(e),
1465
+ queryKey: [...z.merchant(), "access"],
1466
+ queryFn: ({ signal: e }) => N(e),
1436
1467
  staleTime: 3e5,
1437
1468
  meta: { errorAction: "Load your access" }
1438
1469
  }),
1439
1470
  webhooks: () => l({
1440
- queryKey: [...R.alerts(), "webhooks"],
1441
- queryFn: ({ signal: e }) => P(e),
1471
+ queryKey: [...z.alerts(), "webhooks"],
1472
+ queryFn: ({ signal: e }) => F(e),
1442
1473
  meta: { errorAction: "Load webhooks" }
1443
1474
  }),
1444
1475
  dashboard: () => l({
1445
- queryKey: R.dashboard(),
1446
- queryFn: ({ signal: e }) => F(e),
1476
+ queryKey: z.dashboard(),
1477
+ queryFn: ({ signal: e }) => I(e),
1447
1478
  meta: { errorAction: "Load dashboard" }
1448
1479
  }),
1449
1480
  widgetMetrics: (e) => l({
1450
1481
  queryKey: [
1451
- ...R.dashboard(),
1482
+ ...z.dashboard(),
1452
1483
  "metrics",
1453
1484
  e ?? "unselected"
1454
1485
  ],
1455
- queryFn: ({ signal: t }) => I(e, t),
1486
+ queryFn: ({ signal: t }) => L(e, t),
1456
1487
  enabled: !!e
1457
1488
  }),
1458
1489
  notifications: (e) => l({
1459
- queryKey: R.notifications(),
1490
+ queryKey: z.notifications(),
1460
1491
  queryFn: ({ signal: e }) => y({ status: "requires_review" }, 10, e),
1461
1492
  enabled: e
1462
1493
  }),
1463
1494
  unreadNotifications: () => l({
1464
- queryKey: [...R.notifications(), "count"],
1465
- queryFn: async ({ signal: e }) => Number(U(await I({
1495
+ queryKey: [...z.notifications(), "count"],
1496
+ queryFn: async ({ signal: e }) => Number(K(await L({
1466
1497
  measures: ["open_findings"],
1467
1498
  range: { last: "1d" },
1468
1499
  filters: { finding_status: ["requires_review"] }
@@ -1475,65 +1506,65 @@ function te(e, t) {
1475
1506
  }
1476
1507
  //#endregion
1477
1508
  //#region src/admin/lib/mutations.ts
1478
- var K = 200, ne = async (e) => {
1509
+ var ne = 200, re = async (e) => {
1479
1510
  let t = [], n;
1480
1511
  for (;;) {
1481
- let r = await e(K, n);
1512
+ let r = await e(ne, n);
1482
1513
  if (t.push(...r.data), !r.next_cursor || r.data.length === 0) return t;
1483
1514
  n = r.next_cursor;
1484
1515
  }
1485
- }, q = (e, t) => e.invalidateQueries({
1516
+ }, Y = (e, t) => e.invalidateQueries({
1486
1517
  queryKey: t,
1487
1518
  exact: !0
1488
- }), J = (e, t) => () => q(e, t), Y = (e, t) => () => e.invalidateQueries({ queryKey: t }), X = (e, ...t) => (n) => {
1519
+ }), X = (e, t) => () => Y(e, t), Z = (e, t) => () => e.invalidateQueries({ queryKey: t }), Q = (e, ...t) => (n) => {
1489
1520
  n instanceof x && n.code === "revision_mismatch" && Promise.all(t.map((t) => e.invalidateQueries({ queryKey: t })));
1490
1521
  };
1491
- function re(e, t, n) {
1492
- let { selectedMerchant: r } = e, { askCatalog: i, cancelPriceMigration: a, cancelSubscription: o, changeSubscriptionPaymentMethod: s, changeSubscription: l, createPrice: u, createProduct: d, createWebhook: f, createPSP: p, deleteWebhook: m, getCustomer: h, getProductByKey: g, grantProductAccess: _, listCustomers: v, listPayments: y, listSubscriptions: b, putUsageMeterRateCard: S, updatePSP: C, putUsageMeter: w, previewPriceMigration: E, previewSubscriptionChange: D, applyCatalog: O, refundPayment: k, createPriceMigration: A, resolveFinding: j, resumeSubscription: M, revokeProductAccess: N, updateCustomer: P, updateMerchantConfiguration: F, updatePrice: I, updateProduct: L, updateWebhook: R, putDashboard: z } = t, { adminQueries: B, merchantQueryKeys: V } = n, H = (e) => (t) => {
1493
- t instanceof x && t.merchantConfigReadOnly && e.invalidateQueries({ queryKey: B.config().queryKey });
1494
- }, U = (e, t) => () => Promise.all([q(e, [...t.alerts(), "webhooks"]), q(e, t.settings())]);
1522
+ function ie(e, t, n) {
1523
+ let { selectedMerchant: r } = e, { askCatalog: i, cancelPriceMigration: a, cancelSubscription: o, changeSubscriptionPaymentMethod: s, changeSubscription: l, createPrice: u, createProduct: d, createWebhook: f, createPSP: p, deleteWebhook: m, getCustomer: h, getProductByKey: g, grantProductAccess: _, listCustomers: v, listPayments: y, listSubscriptions: b, putUsageMeterRateCard: S, updatePSP: C, putUsageMeter: w, previewPriceMigration: E, previewSubscriptionChange: D, applyCatalog: O, refundPayment: k, createPriceMigration: A, resolveFinding: j, clearDestructiveHold: M, resumeSubscription: N, revokeProductAccess: P, updateCustomer: F, updateMerchantConfiguration: I, updatePrice: L, updateProduct: R, updateWebhook: z, putDashboard: B } = t, { adminQueries: V, merchantQueryKeys: H } = n, U = (e) => (t) => {
1524
+ t instanceof x && t.merchantConfigReadOnly && e.invalidateQueries({ queryKey: V.config().queryKey });
1525
+ }, W = (e, t) => () => Promise.all([Y(e, [...t.alerts(), "webhooks"]), Y(e, t.settings())]);
1495
1526
  return { adminMutations: {
1496
1527
  saveDashboard: (e) => {
1497
- let t = V().dashboard();
1528
+ let t = H().dashboard();
1498
1529
  return c({
1499
1530
  mutationKey: [...t, "save"],
1500
- mutationFn: (e) => z(e),
1531
+ mutationFn: (e) => B(e),
1501
1532
  onSuccess: (n) => e.setQueryData(t, n)
1502
1533
  });
1503
1534
  },
1504
- findCustomer: () => {
1505
- let e = V().customers();
1535
+ findCustomers: () => {
1536
+ let e = H().customers();
1506
1537
  return c({
1507
1538
  mutationKey: [...e, "find"],
1508
- mutationFn: async (e) => (await v(e, 1, "")).data[0]
1539
+ mutationFn: async (e) => (await v(e, 9, "")).data
1509
1540
  });
1510
1541
  },
1511
1542
  exportCustomers: () => {
1512
- let e = V().customers();
1543
+ let e = H().customers();
1513
1544
  return c({
1514
1545
  mutationKey: [...e, "export"],
1515
- mutationFn: (e) => ne((t, n) => v(e, t, n ?? ""))
1546
+ mutationFn: (e) => re((t, n) => v(e, t, n ?? ""))
1516
1547
  });
1517
1548
  },
1518
1549
  exportSubscriptions: () => {
1519
- let e = V().subscriptions();
1550
+ let e = H().subscriptions();
1520
1551
  return c({
1521
1552
  mutationKey: [...e, "export"],
1522
- mutationFn: (e) => ne((t, n) => b(e, t, n))
1553
+ mutationFn: (e) => re((t, n) => b(e, t, n))
1523
1554
  });
1524
1555
  },
1525
1556
  exportPayments: () => {
1526
- let e = V().payments();
1557
+ let e = H().payments();
1527
1558
  return c({
1528
1559
  mutationKey: [...e, "export"],
1529
1560
  mutationFn: (e) => T((t) => y(e, {
1530
- limit: K,
1561
+ limit: ne,
1531
1562
  cursor: t
1532
1563
  }))
1533
1564
  });
1534
1565
  },
1535
1566
  resolveFinding: (e) => {
1536
- let t = V().ops();
1567
+ let t = H().ops();
1537
1568
  return c({
1538
1569
  mutationKey: [
1539
1570
  ...t,
@@ -1541,11 +1572,23 @@ function re(e, t, n) {
1541
1572
  "resolve"
1542
1573
  ],
1543
1574
  mutationFn: ({ id: e, outcome: t, notes: n }) => j(e, t, n),
1544
- onSuccess: Y(e, t)
1575
+ onSuccess: Z(e, t)
1576
+ });
1577
+ },
1578
+ clearDestructiveHold: (e) => {
1579
+ let t = H().ops();
1580
+ return c({
1581
+ mutationKey: [
1582
+ ...t,
1583
+ "destructive-holds",
1584
+ "clear"
1585
+ ],
1586
+ mutationFn: ({ id: e, reason: t }) => M(e, t),
1587
+ onSuccess: Z(e, t)
1545
1588
  });
1546
1589
  },
1547
1590
  refundPayment: (e, t, n, r) => {
1548
- let i = V(), a = i.payments(), o = n ? i.customer(n) : void 0, s = r ? i.subscription(r) : void 0;
1591
+ let i = H(), a = i.payments(), o = n ? i.customer(n) : void 0, s = r ? i.subscription(r) : void 0;
1549
1592
  return c({
1550
1593
  mutationKey: [
1551
1594
  ...a,
@@ -1561,7 +1604,7 @@ function re(e, t, n) {
1561
1604
  });
1562
1605
  },
1563
1606
  cancelSubscription: (e, t, n) => {
1564
- let r = V(), i = r.subscriptions(), a = n ? r.customer(n) : void 0;
1607
+ let r = H(), i = r.subscriptions(), a = n ? r.customer(n) : void 0;
1565
1608
  return c({
1566
1609
  mutationKey: [
1567
1610
  ...i,
@@ -1573,19 +1616,19 @@ function re(e, t, n) {
1573
1616
  });
1574
1617
  },
1575
1618
  resumeSubscription: (e, t, n) => {
1576
- let r = V(), i = r.subscriptions(), a = n ? r.customer(n) : void 0;
1619
+ let r = H(), i = r.subscriptions(), a = n ? r.customer(n) : void 0;
1577
1620
  return c({
1578
1621
  mutationKey: [
1579
1622
  ...i,
1580
1623
  t,
1581
1624
  "resume"
1582
1625
  ],
1583
- mutationFn: () => M(t),
1626
+ mutationFn: () => N(t),
1584
1627
  onSuccess: () => Promise.all([e.invalidateQueries({ queryKey: i }), ...a ? [e.invalidateQueries({ queryKey: a })] : []])
1585
1628
  });
1586
1629
  },
1587
1630
  changeSubscriptionPaymentMethod: (e, t, n) => {
1588
- let r = V(), i = r.subscriptions(), a = n ? r.customer(n) : void 0;
1631
+ let r = H(), i = r.subscriptions(), a = n ? r.customer(n) : void 0;
1589
1632
  return c({
1590
1633
  mutationKey: [
1591
1634
  ...i,
@@ -1597,7 +1640,7 @@ function re(e, t, n) {
1597
1640
  });
1598
1641
  },
1599
1642
  previewSubscriptionChange: (e) => {
1600
- let t = V().subscriptions();
1643
+ let t = H().subscriptions();
1601
1644
  return c({
1602
1645
  mutationKey: [
1603
1646
  ...t,
@@ -1609,7 +1652,7 @@ function re(e, t, n) {
1609
1652
  });
1610
1653
  },
1611
1654
  changeSubscription: (e, t, n) => {
1612
- let r = V(), i = r.subscriptions(), a = n ? r.customer(n) : void 0, o = r.payments();
1655
+ let r = H(), i = r.subscriptions(), a = n ? r.customer(n) : void 0, o = r.payments();
1613
1656
  return c({
1614
1657
  mutationKey: [
1615
1658
  ...i,
@@ -1625,7 +1668,7 @@ function re(e, t, n) {
1625
1668
  });
1626
1669
  },
1627
1670
  grantCustomerProductAccess: (e, t) => {
1628
- let n = V().customer(t);
1671
+ let n = H().customer(t);
1629
1672
  return c({
1630
1673
  mutationKey: [
1631
1674
  ...n,
@@ -1633,23 +1676,23 @@ function re(e, t, n) {
1633
1676
  "grant"
1634
1677
  ],
1635
1678
  mutationFn: (e) => _(t, e),
1636
- onSuccess: Y(e, n)
1679
+ onSuccess: Z(e, n)
1637
1680
  });
1638
1681
  },
1639
1682
  revokeCustomerProductAccess: (e, t) => {
1640
- let n = V().customer(t);
1683
+ let n = H().customer(t);
1641
1684
  return c({
1642
1685
  mutationKey: [
1643
1686
  ...n,
1644
1687
  "product-access",
1645
1688
  "revoke"
1646
1689
  ],
1647
- mutationFn: ({ grantId: e, reason: t }) => N(e, t),
1648
- onSuccess: Y(e, n)
1690
+ mutationFn: ({ grantId: e, reason: t }) => P(e, t),
1691
+ onSuccess: Z(e, n)
1649
1692
  });
1650
1693
  },
1651
1694
  askCatalogCopilot: () => {
1652
- let e = V();
1695
+ let e = H();
1653
1696
  return c({
1654
1697
  mutationKey: [
1655
1698
  ...e.catalog(),
@@ -1660,7 +1703,7 @@ function re(e, t, n) {
1660
1703
  });
1661
1704
  },
1662
1705
  loadCatalogPriceDraft: () => {
1663
- let e = V();
1706
+ let e = H();
1664
1707
  return c({
1665
1708
  mutationKey: [
1666
1709
  ...e.catalog(),
@@ -1679,7 +1722,7 @@ function re(e, t, n) {
1679
1722
  });
1680
1723
  },
1681
1724
  createCatalogDraftPrice: (e) => {
1682
- let t = V();
1725
+ let t = H();
1683
1726
  return c({
1684
1727
  mutationKey: [
1685
1728
  ...t.catalog(),
@@ -1687,19 +1730,19 @@ function re(e, t, n) {
1687
1730
  "create-price"
1688
1731
  ],
1689
1732
  mutationFn: (e) => u(e),
1690
- onSuccess: Y(e, t.catalog())
1733
+ onSuccess: Z(e, t.catalog())
1691
1734
  });
1692
1735
  },
1693
1736
  applyCatalog: (e) => {
1694
- let t = V();
1737
+ let t = H();
1695
1738
  return c({
1696
1739
  mutationKey: [...t.catalog(), "apply"],
1697
1740
  mutationFn: ({ document: e, force: t }) => O(e, t),
1698
- onSuccess: Y(e, t.catalog())
1741
+ onSuccess: Z(e, t.catalog())
1699
1742
  });
1700
1743
  },
1701
1744
  createProduct: (e) => {
1702
- let t = V();
1745
+ let t = H();
1703
1746
  return c({
1704
1747
  mutationKey: [
1705
1748
  ...t.catalog(),
@@ -1707,40 +1750,40 @@ function re(e, t, n) {
1707
1750
  "create"
1708
1751
  ],
1709
1752
  mutationFn: (e) => d(e),
1710
- onSuccess: Y(e, t.catalog())
1753
+ onSuccess: Z(e, t.catalog())
1711
1754
  });
1712
1755
  },
1713
1756
  updateProduct: (e) => {
1714
- let t = V();
1757
+ let t = H();
1715
1758
  return c({
1716
1759
  mutationKey: [
1717
1760
  ...t.catalog(),
1718
1761
  "products",
1719
1762
  "update"
1720
1763
  ],
1721
- mutationFn: ({ id: e, product: t }) => L(e, t),
1722
- onSuccess: Y(e, t.catalog()),
1723
- onError: X(e, t.catalog())
1764
+ mutationFn: ({ id: e, product: t }) => R(e, t),
1765
+ onSuccess: Z(e, t.catalog()),
1766
+ onError: Q(e, t.catalog())
1724
1767
  });
1725
1768
  },
1726
1769
  setProductActive: (e) => {
1727
- let t = V();
1770
+ let t = H();
1728
1771
  return c({
1729
1772
  mutationKey: [
1730
1773
  ...t.catalog(),
1731
1774
  "products",
1732
1775
  "set-active"
1733
1776
  ],
1734
- mutationFn: ({ id: e, active: t, revision: n }) => L(e, {
1777
+ mutationFn: ({ id: e, active: t, revision: n }) => R(e, {
1735
1778
  archived: !t,
1736
1779
  expected_revision: n
1737
1780
  }),
1738
- onSuccess: Y(e, t.catalog()),
1739
- onError: X(e, t.catalog())
1781
+ onSuccess: Z(e, t.catalog()),
1782
+ onError: Q(e, t.catalog())
1740
1783
  });
1741
1784
  },
1742
1785
  createPrice: (e) => {
1743
- let t = V();
1786
+ let t = H();
1744
1787
  return c({
1745
1788
  mutationKey: [
1746
1789
  ...t.catalog(),
@@ -1748,36 +1791,36 @@ function re(e, t, n) {
1748
1791
  "create"
1749
1792
  ],
1750
1793
  mutationFn: (e) => u(e),
1751
- onSuccess: Y(e, t.catalog())
1794
+ onSuccess: Z(e, t.catalog())
1752
1795
  });
1753
1796
  },
1754
1797
  setPriceActive: (e) => {
1755
- let t = V();
1798
+ let t = H();
1756
1799
  return c({
1757
1800
  mutationKey: [
1758
1801
  ...t.catalog(),
1759
1802
  "prices",
1760
1803
  "set-active"
1761
1804
  ],
1762
- mutationFn: ({ id: e, active: t, revision: n }) => I(e, {
1805
+ mutationFn: ({ id: e, active: t, revision: n }) => L(e, {
1763
1806
  archived: !t,
1764
1807
  expected_revision: n
1765
1808
  }),
1766
- onSuccess: Y(e, t.catalog()),
1767
- onError: X(e, t.catalog())
1809
+ onSuccess: Z(e, t.catalog()),
1810
+ onError: Q(e, t.catalog())
1768
1811
  });
1769
1812
  },
1770
1813
  putUsageMeter: (e) => {
1771
- let t = V(), n = t.usageMeters();
1814
+ let t = H(), n = t.usageMeters();
1772
1815
  return c({
1773
1816
  mutationKey: [...n, "put"],
1774
1817
  mutationFn: ({ key: e, meter: t }) => w(e, t),
1775
1818
  onSuccess: (r, { key: i }) => Promise.all([e.invalidateQueries({ queryKey: n }), e.invalidateQueries({ queryKey: t.usageMeter(i) })]),
1776
- onError: X(e, n)
1819
+ onError: Q(e, n)
1777
1820
  });
1778
1821
  },
1779
1822
  putDefaultUsageRateCard: (e) => {
1780
- let t = V(), n = t.usageMeters();
1823
+ let t = H(), n = t.usageMeters();
1781
1824
  return c({
1782
1825
  mutationKey: [
1783
1826
  ...n,
@@ -1786,11 +1829,11 @@ function re(e, t, n) {
1786
1829
  ],
1787
1830
  mutationFn: ({ meter: e, rateCard: t }) => S(e, t),
1788
1831
  onSuccess: (r, { meter: i }) => Promise.all([e.invalidateQueries({ queryKey: n }), e.invalidateQueries({ queryKey: t.usageMeter(i.key) })]),
1789
- onError: X(e, n)
1832
+ onError: Q(e, n)
1790
1833
  });
1791
1834
  },
1792
1835
  deleteDefaultUsageRateCard: (e) => {
1793
- let t = V(), n = t.usageMeters();
1836
+ let t = H(), n = t.usageMeters();
1794
1837
  return c({
1795
1838
  mutationKey: [
1796
1839
  ...n,
@@ -1802,7 +1845,7 @@ function re(e, t, n) {
1802
1845
  });
1803
1846
  },
1804
1847
  previewPriceChange: () => {
1805
- let e = V();
1848
+ let e = H();
1806
1849
  return c({
1807
1850
  mutationKey: [
1808
1851
  ...e.catalog(),
@@ -1813,7 +1856,7 @@ function re(e, t, n) {
1813
1856
  });
1814
1857
  },
1815
1858
  changePrice: (e) => {
1816
- let t = V();
1859
+ let t = H();
1817
1860
  return c({
1818
1861
  mutationKey: [
1819
1862
  ...t.catalog(),
@@ -1824,11 +1867,11 @@ function re(e, t, n) {
1824
1867
  let n = await u(e);
1825
1868
  return t && await A(t.productKey, t.priceKey, n.id, t.effectiveAt), n;
1826
1869
  },
1827
- onSettled: Y(e, t.catalog())
1870
+ onSettled: Z(e, t.catalog())
1828
1871
  });
1829
1872
  },
1830
1873
  cancelPriceMigration: (e) => {
1831
- let t = V();
1874
+ let t = H();
1832
1875
  return c({
1833
1876
  mutationKey: [
1834
1877
  ...t.catalog(),
@@ -1836,20 +1879,20 @@ function re(e, t, n) {
1836
1879
  "cancel"
1837
1880
  ],
1838
1881
  mutationFn: (e) => a(e),
1839
- onSuccess: Y(e, t.catalog())
1882
+ onSuccess: Z(e, t.catalog())
1840
1883
  });
1841
1884
  },
1842
1885
  updateMerchantConfiguration: (e) => {
1843
- let t = V();
1886
+ let t = H();
1844
1887
  return c({
1845
1888
  mutationKey: [...t.settings(), "update"],
1846
- mutationFn: (e) => F(e),
1847
- onSettled: J(e, t.settings()),
1848
- onError: H(e)
1889
+ mutationFn: (e) => I(e),
1890
+ onSettled: X(e, t.settings()),
1891
+ onError: U(e)
1849
1892
  });
1850
1893
  },
1851
1894
  createPSP: (e) => {
1852
- let t = r(), n = V();
1895
+ let t = r(), n = H();
1853
1896
  return c({
1854
1897
  mutationKey: [
1855
1898
  ...n.settings(),
@@ -1862,12 +1905,12 @@ function re(e, t, n) {
1862
1905
  if (r() !== t) throw Error("Merchant changed; reopen this form before saving");
1863
1906
  return p(e);
1864
1907
  },
1865
- onSettled: J(e, [...n.settings(), "psps"]),
1866
- onError: H(e)
1908
+ onSettled: X(e, [...n.settings(), "psps"]),
1909
+ onError: U(e)
1867
1910
  });
1868
1911
  },
1869
1912
  updatePSP: (e) => {
1870
- let t = r(), n = V();
1913
+ let t = r(), n = H();
1871
1914
  return c({
1872
1915
  mutationKey: [
1873
1916
  ...n.settings(),
@@ -1880,26 +1923,26 @@ function re(e, t, n) {
1880
1923
  if (r() !== t) throw Error("Merchant changed; reopen this form before saving");
1881
1924
  return C(e, n);
1882
1925
  },
1883
- onSettled: J(e, [...n.settings(), "psps"]),
1884
- onError: H(e)
1926
+ onSettled: X(e, [...n.settings(), "psps"]),
1927
+ onError: U(e)
1885
1928
  });
1886
1929
  },
1887
1930
  setCreditLimit: () => {
1888
- let e = V();
1931
+ let e = H();
1889
1932
  return c({
1890
1933
  mutationKey: [
1891
1934
  ...e.settings(),
1892
1935
  "customer-controls",
1893
1936
  "credit-limit"
1894
1937
  ],
1895
- mutationFn: ({ customerId: e, currency: t, amount: n }) => P(e, { credit_limits: [{
1938
+ mutationFn: ({ customerId: e, currency: t, amount: n }) => F(e, { credit_limits: [{
1896
1939
  currency: t,
1897
1940
  amount: n
1898
1941
  }] })
1899
1942
  });
1900
1943
  },
1901
1944
  lookupCustomerControls: () => {
1902
- let e = V();
1945
+ let e = H();
1903
1946
  return c({
1904
1947
  mutationKey: [
1905
1948
  ...e.settings(),
@@ -1919,7 +1962,7 @@ function re(e, t, n) {
1919
1962
  });
1920
1963
  },
1921
1964
  createWebhook: (e) => {
1922
- let t = V();
1965
+ let t = H();
1923
1966
  return c({
1924
1967
  mutationKey: [
1925
1968
  ...t.alerts(),
@@ -1927,25 +1970,25 @@ function re(e, t, n) {
1927
1970
  "create"
1928
1971
  ],
1929
1972
  mutationFn: (e) => f(e),
1930
- onSuccess: U(e, t),
1931
- onError: H(e)
1973
+ onSuccess: W(e, t),
1974
+ onError: U(e)
1932
1975
  });
1933
1976
  },
1934
1977
  updateWebhook: (e) => {
1935
- let t = V();
1978
+ let t = H();
1936
1979
  return c({
1937
1980
  mutationKey: [
1938
1981
  ...t.alerts(),
1939
1982
  "webhooks",
1940
1983
  "update"
1941
1984
  ],
1942
- mutationFn: ({ id: e, webhook: t }) => R(e, t),
1943
- onSuccess: U(e, t),
1944
- onError: H(e)
1985
+ mutationFn: ({ id: e, webhook: t }) => z(e, t),
1986
+ onSuccess: W(e, t),
1987
+ onError: U(e)
1945
1988
  });
1946
1989
  },
1947
1990
  deleteWebhook: (e) => {
1948
- let t = V();
1991
+ let t = H();
1949
1992
  return c({
1950
1993
  mutationKey: [
1951
1994
  ...t.alerts(),
@@ -1953,22 +1996,22 @@ function re(e, t, n) {
1953
1996
  "delete"
1954
1997
  ],
1955
1998
  mutationFn: (e) => m(e),
1956
- onSuccess: U(e, t),
1957
- onError: H(e)
1999
+ onSuccess: W(e, t),
2000
+ onError: U(e)
1958
2001
  });
1959
2002
  }
1960
2003
  } };
1961
2004
  }
1962
2005
  //#endregion
1963
2006
  //#region src/admin/lib/credit-queries.ts
1964
- function Z(e, t) {
2007
+ function ae(e, t) {
1965
2008
  let { selectedMerchant: n } = e, r = (t, n) => [
1966
2009
  ...e.queryRoot(t),
1967
2010
  "customers",
1968
2011
  n
1969
2012
  ], { createCreditGrant: i, listCreditGrants: a, listBalanceTransactions: o, revokeCreditGrant: s } = t;
1970
2013
  function u(e) {
1971
- if (!e || n() !== e) throw Error("The selected merchant changed. Reload this customer's credits.");
2014
+ if (n() !== e) throw Error("The selected merchant changed. Reload this customer's credits.");
1972
2015
  }
1973
2016
  return {
1974
2017
  assertMerchant: u,
@@ -1981,7 +2024,7 @@ function Z(e, t) {
1981
2024
  i,
1982
2025
  o
1983
2026
  ],
1984
- enabled: !!(e && t && n),
2027
+ enabled: !!(t && n),
1985
2028
  queryFn: ({ signal: r }) => (u(e), a(t, n, i, o, r))
1986
2029
  }),
1987
2030
  transactions: (e, t, n, i, a) => l({
@@ -1992,7 +2035,7 @@ function Z(e, t) {
1992
2035
  i,
1993
2036
  a
1994
2037
  ],
1995
- enabled: !!(e && t && n),
2038
+ enabled: !!(t && n),
1996
2039
  queryFn: ({ signal: r }) => (u(e), o(t, n, i, a, r))
1997
2040
  })
1998
2041
  },
@@ -2010,7 +2053,7 @@ function Z(e, t) {
2010
2053
  }
2011
2054
  //#endregion
2012
2055
  //#region src/admin/lib/order-queries.ts
2013
- function ie(e, t, n) {
2056
+ function oe(e, t, n) {
2014
2057
  let { queryRoot: r } = e, { queryKeys: i } = n, a = t, o = t, u = {
2015
2058
  root: () => [...r(), "orders"],
2016
2059
  detail: (e) => [...u.root(), e],
@@ -2080,7 +2123,7 @@ function ie(e, t, n) {
2080
2123
  }
2081
2124
  //#endregion
2082
2125
  //#region src/admin/lib/import-queries.ts
2083
- var ae = (e) => e === "pulling" || e === "applying", oe = 2e3, se = (e) => ({
2126
+ var se = (e) => e === "pulling" || e === "applying", ce = 2e3, le = (e) => ({
2084
2127
  imports: () => [...e(), "psp-imports"],
2085
2128
  import: (t) => [
2086
2129
  ...e(),
@@ -2093,10 +2136,10 @@ var ae = (e) => e === "pulling" || e === "applying", oe = 2e3, se = (e) => ({
2093
2136
  catalog: () => [...e(), "catalog"],
2094
2137
  ops: () => [...e(), "ops"]
2095
2138
  });
2096
- function ce(e, t) {
2097
- let { queryRoot: n } = e, r = se(n), i = () => {
2139
+ function ue(e, t) {
2140
+ let { queryRoot: n } = e, r = le(n), i = () => {
2098
2141
  let e = n();
2099
- return se(() => e);
2142
+ return le(() => e);
2100
2143
  };
2101
2144
  return {
2102
2145
  importKeys: r,
@@ -2114,7 +2157,7 @@ function ce(e, t) {
2114
2157
  cursor: i
2115
2158
  }, r),
2116
2159
  placeholderData: s,
2117
- refetchInterval: (e) => e.state.data?.data.some((e) => ae(e.status)) ? oe : !1,
2160
+ refetchInterval: (e) => e.state.data?.data.some((e) => se(e.status)) ? ce : !1,
2118
2161
  meta: { errorAction: "Load PSP imports" }
2119
2162
  }),
2120
2163
  latest: (e) => l({
@@ -2130,7 +2173,7 @@ function ce(e, t) {
2130
2173
  queryKey: r.import(e),
2131
2174
  queryFn: ({ signal: n }) => t.getPSPImport(e, n),
2132
2175
  enabled: !!e,
2133
- refetchInterval: (e) => ae(e.state.data?.status) ? oe : !1,
2176
+ refetchInterval: (e) => se(e.state.data?.status) ? ce : !1,
2134
2177
  meta: { errorAction: "Load PSP import" }
2135
2178
  }),
2136
2179
  records: (e, n, i, a, o) => l({
@@ -2270,29 +2313,29 @@ function ce(e, t) {
2270
2313
  }
2271
2314
  //#endregion
2272
2315
  //#region src/admin/context.tsx
2273
- function le(e) {
2274
- let t = E(e), n = B(t), r = te(t, n), i = V(e.namespace);
2316
+ function de(e) {
2317
+ let t = E(e), n = B(t), r = te(t, n), i = W(e.namespace);
2275
2318
  return {
2276
2319
  toast: i,
2277
- ...H(i),
2320
+ ...G(i),
2278
2321
  ...t,
2279
2322
  ...n,
2280
2323
  ...r,
2281
- ...re(t, n, r),
2282
- ...Z(t, n),
2283
2324
  ...ie(t, n, r),
2284
- ...ce(t, n)
2325
+ ...ae(t, n),
2326
+ ...oe(t, n, r),
2327
+ ...ue(t, n)
2285
2328
  };
2286
2329
  }
2287
- var ue = e(null);
2288
- function de() {
2289
- let e = n(ue);
2330
+ var fe = e(null);
2331
+ function pe() {
2332
+ let e = n(fe);
2290
2333
  if (!e) throw Error("BillingAdmin context is missing");
2291
2334
  return e;
2292
2335
  }
2293
- var fe = () => de().services, Q = e(null), pe = (e) => (window.addEventListener("popstate", e), () => window.removeEventListener("popstate", e)), me = () => window.location.pathname + window.location.search;
2294
- function he({ basePath: e = "/", navigation: n, children: r }) {
2295
- let s = o(pe, me, () => e), c = e.replace(/\/$/, ""), l = new URL(s, "http://billing.local"), u = n?.pathname ?? l.pathname, f = n?.search ?? l.search, p = u === c ? "/" : u.startsWith(c + "/") ? u.slice(c.length) : "/", [m, h] = a(() => /* @__PURE__ */ new Map()), g = t((e) => {
2336
+ var me = () => pe().services, he = e(null), ge = (e) => (window.addEventListener("popstate", e), () => window.removeEventListener("popstate", e)), _e = () => window.location.pathname + window.location.search;
2337
+ function ve({ basePath: e = "/", navigation: n, children: r }) {
2338
+ let s = o(ge, _e, () => e), c = e.replace(/\/$/, ""), l = new URL(s, "http://billing.local"), u = n?.pathname ?? l.pathname, f = n?.search ?? l.search, p = u === c ? "/" : u.startsWith(c + "/") ? u.slice(c.length) : "/", [m, h] = a(() => /* @__PURE__ */ new Map()), g = t((e) => {
2296
2339
  if (/^(?:[a-z][a-z\d+.-]*:|\/\/)/i.test(e)) return e;
2297
2340
  let t = new URL(e, "http://billing.local" + p + f);
2298
2341
  return c + t.pathname + t.search + t.hash;
@@ -2329,25 +2372,25 @@ function he({ basePath: e = "/", navigation: n, children: r }) {
2329
2372
  n,
2330
2373
  m
2331
2374
  ]);
2332
- return /* @__PURE__ */ d(Q.Provider, {
2375
+ return /* @__PURE__ */ d(he.Provider, {
2333
2376
  value: v,
2334
2377
  children: r
2335
2378
  });
2336
2379
  }
2337
2380
  function $() {
2338
- let e = n(Q);
2381
+ let e = n(he);
2339
2382
  if (!e) throw Error("BillingAdmin router is missing");
2340
2383
  return e;
2341
2384
  }
2342
- var ge = () => $().location, _e = () => $().navigate, ve = () => $().params;
2343
- function ye() {
2385
+ var ye = () => $().location, be = () => $().navigate, xe = () => $().params;
2386
+ function Se() {
2344
2387
  let { location: e, navigate: t } = $();
2345
2388
  return [i(() => new URLSearchParams(e.search), [e.search]), (n, r) => {
2346
2389
  let i = new URLSearchParams(n).toString();
2347
2390
  t(e.pathname + (i ? "?" + i : ""), r);
2348
2391
  }];
2349
2392
  }
2350
- function be({ to: e, onClick: t, ...n }) {
2393
+ function Ce({ to: e, onClick: t, ...n }) {
2351
2394
  let { href: r, navigate: i } = $();
2352
2395
  return /* @__PURE__ */ d("a", {
2353
2396
  ...n,
@@ -2357,17 +2400,17 @@ function be({ to: e, onClick: t, ...n }) {
2357
2400
  }
2358
2401
  });
2359
2402
  }
2360
- function xe({ to: e, replace: t }) {
2361
- let n = _e();
2403
+ function we({ to: e, replace: t }) {
2404
+ let n = be();
2362
2405
  return r(() => n(e, { replace: t }), [
2363
2406
  n,
2364
2407
  e,
2365
2408
  t
2366
2409
  ]), null;
2367
2410
  }
2368
- function Se({ params: e, children: t }) {
2411
+ function Te({ params: e, children: t }) {
2369
2412
  let n = $();
2370
- return /* @__PURE__ */ d(Q.Provider, {
2413
+ return /* @__PURE__ */ d(he.Provider, {
2371
2414
  value: {
2372
2415
  ...n,
2373
2416
  params: e
@@ -2377,10 +2420,10 @@ function Se({ params: e, children: t }) {
2377
2420
  }
2378
2421
  //#endregion
2379
2422
  //#region src/admin/lib/utils.ts
2380
- function Ce(...e) {
2423
+ function Ee(...e) {
2381
2424
  return p(f(e));
2382
2425
  }
2383
2426
  //#endregion
2384
- export { x as C, h as D, m as E, k as S, g as T, B as _, Se as a, O as b, ve as c, le as d, de as f, H as g, V as h, xe as i, ye as l, ae as m, he as n, ge as o, fe as p, be as r, _e as s, Ce as t, ue as u, M as v, E as w, A as x, D as y };
2427
+ export { k as C, m as D, g as E, h as O, A as S, E as T, U as _, Te as a, D as b, xe as c, de as d, pe as f, G as g, W as h, we as i, Se as l, se as m, ve as n, ye as o, me as p, Ce as r, be as s, Ee as t, fe as u, B as v, x as w, O as x, M as y };
2385
2428
 
2386
- //# sourceMappingURL=admin-utils-B9eEBNsR.js.map
2429
+ //# sourceMappingURL=admin-utils-DTT53IpS.js.map