@openrails/billing-ui 0.280.0 → 0.282.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 (236) hide show
  1. package/dist/account/format.d.ts +1 -1
  2. package/dist/admin/lib/duration.d.ts +4 -0
  3. package/dist/{admin-attempts-CP5CWyNR.js → admin-attempts-Cs2u-BLY.js} +71 -72
  4. package/dist/admin-attempts-Cs2u-BLY.js.map +1 -0
  5. package/dist/{admin-auth-DlIOmwPo.js → admin-auth-CTLBqp7N.js} +3 -4
  6. package/dist/admin-auth-CTLBqp7N.js.map +1 -0
  7. package/dist/{admin-badge-DR_8AhdC.js → admin-badge-3zABrSBc.js} +3 -4
  8. package/dist/admin-badge-3zABrSBc.js.map +1 -0
  9. package/dist/{admin-button-DBzTD6By.js → admin-button-FRNl7_Yf.js} +3 -4
  10. package/dist/admin-button-FRNl7_Yf.js.map +1 -0
  11. package/dist/{admin-capabilities-CZdT1Pxe.js → admin-capabilities-uSi2Pb2h.js} +3 -4
  12. package/dist/admin-capabilities-uSi2Pb2h.js.map +1 -0
  13. package/dist/{admin-card-mZl4-s5d.js → admin-card-YKPGmx5w.js} +3 -4
  14. package/dist/admin-card-YKPGmx5w.js.map +1 -0
  15. package/dist/admin-catalog-DB5lr46V.js +1096 -0
  16. package/dist/admin-catalog-DB5lr46V.js.map +1 -0
  17. package/dist/{admin-confirm-katGq0Qo.js → admin-confirm-DWq-edDC.js} +2 -3
  18. package/dist/admin-confirm-DWq-edDC.js.map +1 -0
  19. package/dist/{admin-csv-CPoNZj2D.js → admin-csv-CRrmaR6a.js} +2 -3
  20. package/dist/admin-csv-CRrmaR6a.js.map +1 -0
  21. package/dist/{admin-cursor-pager-C-KjCIy9.js → admin-cursor-pager-BGgOOq7s.js} +6 -8
  22. package/dist/admin-cursor-pager-BGgOOq7s.js.map +1 -0
  23. package/dist/{admin-customers-BE3N839X.js → admin-customers-DFQ75ZBi.js} +21 -22
  24. package/dist/admin-customers-DFQ75ZBi.js.map +1 -0
  25. package/dist/{admin-dashboard-BxjkV15J.js → admin-dashboard-Q_4-OFsE.js} +150 -153
  26. package/dist/admin-dashboard-Q_4-OFsE.js.map +1 -0
  27. package/dist/{admin-data-table-D89AwWz_.js → admin-data-table-DyYm4h_Y.js} +19 -26
  28. package/dist/admin-data-table-DyYm4h_Y.js.map +1 -0
  29. package/dist/{admin-detail-Ln56otK0.js → admin-detail-BytmF-e3.js} +74 -75
  30. package/dist/admin-detail-BytmF-e3.js.map +1 -0
  31. package/dist/{admin-detail-D6zD085K.js → admin-detail-CG3kLIDS.js} +92 -94
  32. package/dist/admin-detail-CG3kLIDS.js.map +1 -0
  33. package/dist/admin-detail-RS0o4-Cq.js +1351 -0
  34. package/dist/{admin-detail-P-UnNvXJ.js.map → admin-detail-RS0o4-Cq.js.map} +1 -1
  35. package/dist/{admin-detail-C8lD7U2t.js → admin-detail-SLijWf4F.js} +199 -202
  36. package/dist/admin-detail-SLijWf4F.js.map +1 -0
  37. package/dist/admin-detail-wttCvrxI.js +337 -0
  38. package/dist/admin-detail-wttCvrxI.js.map +1 -0
  39. package/dist/{admin-dialog-Dn2FRJu4.js → admin-dialog-BVx92baz.js} +4 -5
  40. package/dist/admin-dialog-BVx92baz.js.map +1 -0
  41. package/dist/{admin-dialog-width-CC7QHT1p.js → admin-dialog-width-C_WFpow0.js} +2 -3
  42. package/dist/admin-dialog-width-C_WFpow0.js.map +1 -0
  43. package/dist/{admin-dom-C7Y7A6Wa.js → admin-dom-BP9QROfy.js} +2 -3
  44. package/dist/admin-dom-BP9QROfy.js.map +1 -0
  45. package/dist/{admin-dropdown-menu-DLUn6Uj3.js → admin-dropdown-menu-BV7vxYr9.js} +3 -4
  46. package/dist/admin-dropdown-menu-BV7vxYr9.js.map +1 -0
  47. package/dist/{admin-dunning-COaHzrmN.js → admin-dunning-D8lAP7OA.js} +3 -4
  48. package/dist/admin-dunning-D8lAP7OA.js.map +1 -0
  49. package/dist/{admin-fact-card-DKvBnUXB.js → admin-fact-card-CTQyFmQY.js} +3 -4
  50. package/dist/admin-fact-card-CTQyFmQY.js.map +1 -0
  51. package/dist/{admin-form-field-errors-hbUMIriS.js → admin-form-field-errors-Cuhy38F1.js} +2 -3
  52. package/dist/admin-form-field-errors-Cuhy38F1.js.map +1 -0
  53. package/dist/{admin-format-BbiTCqUG.js → admin-format-D9Ablh0P.js} +3 -5
  54. package/dist/admin-format-D9Ablh0P.js.map +1 -0
  55. package/dist/{admin-health-DmnI4e8K.js → admin-health-DWpONa-7.js} +91 -93
  56. package/dist/admin-health-DWpONa-7.js.map +1 -0
  57. package/dist/{admin-imports-C0aMP6sj.js → admin-imports-Dsd5QmAe.js} +92 -93
  58. package/dist/admin-imports-Dsd5QmAe.js.map +1 -0
  59. package/dist/{admin-input-JKrQIGfD.js → admin-input-DhYEd7Yp.js} +3 -4
  60. package/dist/admin-input-DhYEd7Yp.js.map +1 -0
  61. package/dist/{admin-invoice-profile-model-Cgjy3zV8.js → admin-invoice-profile-model-CNsvK89v.js} +2 -3
  62. package/dist/admin-invoice-profile-model-CNsvK89v.js.map +1 -0
  63. package/dist/{admin-label-CHWsVIZC.js → admin-label-DwUfUVm6.js} +3 -4
  64. package/dist/admin-label-DwUfUVm6.js.map +1 -0
  65. package/dist/{admin-linked-table-row-BMZYYsuk.js → admin-linked-table-row-CqG_aCwd.js} +5 -6
  66. package/dist/admin-linked-table-row-CqG_aCwd.js.map +1 -0
  67. package/dist/{admin-map-dialog-BHUGdCcv.js → admin-map-dialog-DZuPq4UA.js} +26 -27
  68. package/dist/admin-map-dialog-DZuPq4UA.js.map +1 -0
  69. package/dist/{admin-mapping-csv-FtkyTBmk.js → admin-mapping-csv-DzpB9HQn.js} +1 -2
  70. package/dist/admin-mapping-csv-DzpB9HQn.js.map +1 -0
  71. package/dist/admin-metering-kGrQIiEX.js +1717 -0
  72. package/dist/admin-metering-kGrQIiEX.js.map +1 -0
  73. package/dist/{admin-missing-record-BPFs3MmO.js → admin-missing-record-CjIQEv9L.js} +3 -4
  74. package/dist/admin-missing-record-CjIQEv9L.js.map +1 -0
  75. package/dist/{admin-ops-CL2kjDwi.js → admin-ops-B1Gwrsq6.js} +99 -100
  76. package/dist/admin-ops-B1Gwrsq6.js.map +1 -0
  77. package/dist/{admin-orders-C1Sf2qhc.js → admin-orders-DRpUMK7N.js} +41 -42
  78. package/dist/admin-orders-DRpUMK7N.js.map +1 -0
  79. package/dist/{admin-parked-a0tB5bhG.js → admin-parked-uH5dSPjL.js} +47 -48
  80. package/dist/admin-parked-uH5dSPjL.js.map +1 -0
  81. package/dist/{admin-payments-DJcjwRA4.js → admin-payments-DFW5O19Q.js} +36 -37
  82. package/dist/admin-payments-DFW5O19Q.js.map +1 -0
  83. package/dist/{admin-price-detail-BOmeWw15.js → admin-price-detail-CaUekDWP.js} +88 -90
  84. package/dist/admin-price-detail-CaUekDWP.js.map +1 -0
  85. package/dist/{admin-price-format-CqOmHrIn.js → admin-price-format-BrXm8J1w.js} +15 -8
  86. package/dist/admin-price-format-BrXm8J1w.js.map +1 -0
  87. package/dist/admin-price-wizard-CCejN6lZ.js +355 -0
  88. package/dist/admin-price-wizard-CCejN6lZ.js.map +1 -0
  89. package/dist/{admin-proposals-DVrl-ym4.js → admin-proposals-BuPBTbX7.js} +114 -116
  90. package/dist/admin-proposals-BuPBTbX7.js.map +1 -0
  91. package/dist/{admin-provider-prices-BVVogH7Q.js → admin-provider-prices-BtyrGlSd.js} +74 -75
  92. package/dist/admin-provider-prices-BtyrGlSd.js.map +1 -0
  93. package/dist/{admin-range-picker-C6BtSm2B.js → admin-range-picker-B1C1R9Yh.js} +8 -11
  94. package/dist/admin-range-picker-B1C1R9Yh.js.map +1 -0
  95. package/dist/admin-records-CZ_Q1j7i.js +390 -0
  96. package/dist/admin-records-CZ_Q1j7i.js.map +1 -0
  97. package/dist/{admin-reports-CtPoiceH.js → admin-reports-ZDEVF7aC.js} +59 -60
  98. package/dist/admin-reports-ZDEVF7aC.js.map +1 -0
  99. package/dist/{admin-select-6Yuh5M1Q.js → admin-select-CCliJ9d-.js} +3 -4
  100. package/dist/admin-select-CCliJ9d-.js.map +1 -0
  101. package/dist/{admin-settings-DscHu4ww.js → admin-settings-HBiilJTI.js} +640 -645
  102. package/dist/admin-settings-HBiilJTI.js.map +1 -0
  103. package/dist/{admin-shared-BywM-MMp.js → admin-shared-Bozlh9cy.js} +23 -25
  104. package/dist/admin-shared-Bozlh9cy.js.map +1 -0
  105. package/dist/{admin-skeleton-lndmw89u.js → admin-skeleton-CKxohm-g.js} +3 -4
  106. package/dist/admin-skeleton-CKxohm-g.js.map +1 -0
  107. package/dist/{admin-status-badge-IL8ofZ_6.js → admin-status-badge-BhHyBG8J.js} +6 -7
  108. package/dist/{admin-status-badge-IL8ofZ_6.js.map → admin-status-badge-BhHyBG8J.js.map} +1 -1
  109. package/dist/{admin-subscriptions-Cd5CGrue.js → admin-subscriptions-VwEbVACW.js} +38 -39
  110. package/dist/admin-subscriptions-VwEbVACW.js.map +1 -0
  111. package/dist/{admin-switch-DpwQSzEm.js → admin-switch-CE0N-HwZ.js} +3 -4
  112. package/dist/admin-switch-CE0N-HwZ.js.map +1 -0
  113. package/dist/{admin-table-D-GdGM1m.js → admin-table-Ce6xyiwJ.js} +3 -4
  114. package/dist/admin-table-Ce6xyiwJ.js.map +1 -0
  115. package/dist/{admin-tabs-B--1flzO.js → admin-tabs-BPfOyBa6.js} +8 -10
  116. package/dist/admin-tabs-BPfOyBa6.js.map +1 -0
  117. package/dist/{admin-textarea-xsp5V9xM.js → admin-textarea-CBAshts8.js} +3 -4
  118. package/dist/admin-textarea-CBAshts8.js.map +1 -0
  119. package/dist/{admin-tile-grids-CzGpidd9.js → admin-tile-grids-Gc67MtA6.js} +2 -3
  120. package/dist/admin-tile-grids-Gc67MtA6.js.map +1 -0
  121. package/dist/{admin-typed-confirm-dialog-NiEDwX_0.js → admin-typed-confirm-dialog-C1kHdYgH.js} +13 -14
  122. package/dist/admin-typed-confirm-dialog-C1kHdYgH.js.map +1 -0
  123. package/dist/{admin-utils-wuPUD0uh.js → admin-utils-CuwG3SAt.js} +27 -47
  124. package/dist/admin-utils-CuwG3SAt.js.map +1 -0
  125. package/dist/{admin-widget-viz-kHHVmDEx.js → admin-widget-viz-Dd1Fjd_j.js} +21 -24
  126. package/dist/admin-widget-viz-Dd1Fjd_j.js.map +1 -0
  127. package/dist/admin.js +60 -84
  128. package/dist/admin.js.map +1 -1
  129. package/dist/client/generated/wire.d.ts +6 -0
  130. package/dist/client/types.d.ts +6 -2
  131. package/dist/{client-ctrbivyN.js → client-BrURpRWz.js} +8 -11
  132. package/dist/client-BrURpRWz.js.map +1 -0
  133. package/dist/client.js +1 -2
  134. package/dist/{create-card-BEILS1VB-DeyyfyFD.js → create-card-BEILS1VB-B1MQg0iK.js} +3 -4
  135. package/dist/create-card-BEILS1VB-B1MQg0iK.js.map +1 -0
  136. package/dist/{create-card-display-Dv5pcpzc-BWB6vzo2.js → create-card-display-Dv5pcpzc-DotrmqWH.js} +5 -9
  137. package/dist/create-card-display-Dv5pcpzc-DotrmqWH.js.map +1 -0
  138. package/dist/{create-copy-button-CAYmfugS-qNapojfj.js → create-copy-button-CAYmfugS-CAgco7FO.js} +3 -4
  139. package/dist/create-copy-button-CAYmfugS-CAgco7FO.js.map +1 -0
  140. package/dist/{dist-CslWupfi.js → dist-BPWQ2tCx.js} +6 -7
  141. package/dist/dist-BPWQ2tCx.js.map +1 -0
  142. package/dist/{hooks-KpTetx6F.js → hooks-Bbp1RWgw.js} +13 -22
  143. package/dist/hooks-Bbp1RWgw.js.map +1 -0
  144. package/dist/{index-rGw83t5v-BE6naeQR.js → index-rGw83t5v-ydBZxXI_.js} +10 -24
  145. package/dist/index-rGw83t5v-ydBZxXI_.js.map +1 -0
  146. package/dist/index.js +78 -130
  147. package/dist/index.js.map +1 -1
  148. package/dist/lib/price-label.d.ts +1 -1
  149. package/dist/locales/de.js +1 -2
  150. package/dist/locales/de.js.map +1 -1
  151. package/dist/locales/en.d.ts +4 -0
  152. package/dist/locales/en.js +5 -2
  153. package/dist/locales/en.js.map +1 -1
  154. package/dist/locales/es.js +1 -2
  155. package/dist/locales/es.js.map +1 -1
  156. package/dist/locales/ja.js +1 -2
  157. package/dist/locales/ja.js.map +1 -1
  158. package/dist/locales/ko.js +1 -2
  159. package/dist/locales/ko.js.map +1 -1
  160. package/dist/locales/zh.js +1 -2
  161. package/dist/locales/zh.js.map +1 -1
  162. package/dist/react.js +1 -2
  163. package/package.json +2 -2
  164. package/dist/admin-attempts-CP5CWyNR.js.map +0 -1
  165. package/dist/admin-auth-DlIOmwPo.js.map +0 -1
  166. package/dist/admin-badge-DR_8AhdC.js.map +0 -1
  167. package/dist/admin-button-DBzTD6By.js.map +0 -1
  168. package/dist/admin-capabilities-CZdT1Pxe.js.map +0 -1
  169. package/dist/admin-card-mZl4-s5d.js.map +0 -1
  170. package/dist/admin-catalog-DpTjS0Yo.js +0 -1099
  171. package/dist/admin-catalog-DpTjS0Yo.js.map +0 -1
  172. package/dist/admin-confirm-katGq0Qo.js.map +0 -1
  173. package/dist/admin-csv-CPoNZj2D.js.map +0 -1
  174. package/dist/admin-cursor-pager-C-KjCIy9.js.map +0 -1
  175. package/dist/admin-customers-BE3N839X.js.map +0 -1
  176. package/dist/admin-dashboard-BxjkV15J.js.map +0 -1
  177. package/dist/admin-data-table-D89AwWz_.js.map +0 -1
  178. package/dist/admin-detail-BKe9xqPd.js +0 -338
  179. package/dist/admin-detail-BKe9xqPd.js.map +0 -1
  180. package/dist/admin-detail-C8lD7U2t.js.map +0 -1
  181. package/dist/admin-detail-D6zD085K.js.map +0 -1
  182. package/dist/admin-detail-Ln56otK0.js.map +0 -1
  183. package/dist/admin-detail-P-UnNvXJ.js +0 -1357
  184. package/dist/admin-dialog-Dn2FRJu4.js.map +0 -1
  185. package/dist/admin-dialog-width-CC7QHT1p.js.map +0 -1
  186. package/dist/admin-dom-C7Y7A6Wa.js.map +0 -1
  187. package/dist/admin-dropdown-menu-DLUn6Uj3.js.map +0 -1
  188. package/dist/admin-dunning-COaHzrmN.js.map +0 -1
  189. package/dist/admin-fact-card-DKvBnUXB.js.map +0 -1
  190. package/dist/admin-form-field-errors-hbUMIriS.js.map +0 -1
  191. package/dist/admin-format-BbiTCqUG.js.map +0 -1
  192. package/dist/admin-health-DmnI4e8K.js.map +0 -1
  193. package/dist/admin-imports-C0aMP6sj.js.map +0 -1
  194. package/dist/admin-input-JKrQIGfD.js.map +0 -1
  195. package/dist/admin-invoice-profile-model-Cgjy3zV8.js.map +0 -1
  196. package/dist/admin-label-CHWsVIZC.js.map +0 -1
  197. package/dist/admin-linked-table-row-BMZYYsuk.js.map +0 -1
  198. package/dist/admin-map-dialog-BHUGdCcv.js.map +0 -1
  199. package/dist/admin-mapping-csv-FtkyTBmk.js.map +0 -1
  200. package/dist/admin-metering-CDqueHUh.js +0 -1721
  201. package/dist/admin-metering-CDqueHUh.js.map +0 -1
  202. package/dist/admin-missing-record-BPFs3MmO.js.map +0 -1
  203. package/dist/admin-ops-CL2kjDwi.js.map +0 -1
  204. package/dist/admin-orders-C1Sf2qhc.js.map +0 -1
  205. package/dist/admin-parked-a0tB5bhG.js.map +0 -1
  206. package/dist/admin-payments-DJcjwRA4.js.map +0 -1
  207. package/dist/admin-price-detail-BOmeWw15.js.map +0 -1
  208. package/dist/admin-price-format-CqOmHrIn.js.map +0 -1
  209. package/dist/admin-price-wizard-B6s5OJeO.js +0 -356
  210. package/dist/admin-price-wizard-B6s5OJeO.js.map +0 -1
  211. package/dist/admin-proposals-DVrl-ym4.js.map +0 -1
  212. package/dist/admin-provider-prices-BVVogH7Q.js.map +0 -1
  213. package/dist/admin-range-picker-C6BtSm2B.js.map +0 -1
  214. package/dist/admin-records-DKtcgN11.js +0 -391
  215. package/dist/admin-records-DKtcgN11.js.map +0 -1
  216. package/dist/admin-reports-CtPoiceH.js.map +0 -1
  217. package/dist/admin-select-6Yuh5M1Q.js.map +0 -1
  218. package/dist/admin-settings-DscHu4ww.js.map +0 -1
  219. package/dist/admin-shared-BywM-MMp.js.map +0 -1
  220. package/dist/admin-skeleton-lndmw89u.js.map +0 -1
  221. package/dist/admin-subscriptions-Cd5CGrue.js.map +0 -1
  222. package/dist/admin-switch-DpwQSzEm.js.map +0 -1
  223. package/dist/admin-table-D-GdGM1m.js.map +0 -1
  224. package/dist/admin-tabs-B--1flzO.js.map +0 -1
  225. package/dist/admin-textarea-xsp5V9xM.js.map +0 -1
  226. package/dist/admin-tile-grids-CzGpidd9.js.map +0 -1
  227. package/dist/admin-typed-confirm-dialog-NiEDwX_0.js.map +0 -1
  228. package/dist/admin-utils-wuPUD0uh.js.map +0 -1
  229. package/dist/admin-widget-viz-kHHVmDEx.js.map +0 -1
  230. package/dist/client-ctrbivyN.js.map +0 -1
  231. package/dist/create-card-BEILS1VB-DeyyfyFD.js.map +0 -1
  232. package/dist/create-card-display-Dv5pcpzc-BWB6vzo2.js.map +0 -1
  233. package/dist/create-copy-button-CAYmfugS-qNapojfj.js.map +0 -1
  234. package/dist/dist-CslWupfi.js.map +0 -1
  235. package/dist/hooks-KpTetx6F.js.map +0 -1
  236. package/dist/index-rGw83t5v-BE6naeQR.js.map +0 -1
package/dist/index.js CHANGED
@@ -11,9 +11,9 @@ if (typeof document !== "undefined") {
11
11
  if (__orckStyle.textContent !== __orckCss) __orckStyle.textContent = __orckCss;
12
12
  }
13
13
 
14
- import { A as e, C as t, E as n, O as r, S as i, _ as a, a as o, b as s, d as c, f as l, g as u, h as d, p as f, s as p, v as m, w as h, x as g, y as _ } from "./client-ctrbivyN.js";
15
- import { S as v, _ as y, a as b, b as x, c as S, g as C, h as w, i as T, m as E, n as D, o as O, p as k, r as A, s as ee, t as j, u as M, v as te, x as ne, y as re } from "./hooks-KpTetx6F.js";
16
- import { t as N } from "./index-rGw83t5v-BE6naeQR.js";
14
+ import { A as e, C as t, E as n, O as r, S as i, _ as a, a as o, b as s, d as c, f as l, g as u, h as d, p as f, s as p, v as m, w as h, x as g, y as _ } from "./client-BrURpRWz.js";
15
+ import { S as v, _ as y, a as b, b as x, c as S, g as C, h as w, i as T, m as E, n as D, o as O, p as k, r as A, s as ee, t as j, u as M, v as te, x as ne, y as re } from "./hooks-Bbp1RWgw.js";
16
+ import { t as N } from "./index-rGw83t5v-ydBZxXI_.js";
17
17
  import { z as P } from "zod";
18
18
  import * as F from "react";
19
19
  import { Fragment as ie, jsx as I, jsxs as L } from "react/jsx-runtime";
@@ -29,7 +29,7 @@ import { Dialog as V } from "@base-ui/react/dialog";
29
29
  import { Input as me } from "@base-ui/react/input";
30
30
  import { Radio as he } from "@base-ui/react/radio";
31
31
  import { RadioGroup as ge } from "@base-ui/react/radio-group";
32
- //#region src/scope.tsx
32
+ // src/scope.tsx
33
33
  function _e({ appearance: e, className: t, style: n, ...r }) {
34
34
  let i = k(e);
35
35
  return /* @__PURE__ */ I("div", {
@@ -42,8 +42,7 @@ function _e({ appearance: e, className: t, style: n, ...r }) {
42
42
  ...r
43
43
  });
44
44
  }
45
- //#endregion
46
- //#region src/components/ui/button.tsx
45
+ // src/components/ui/button.tsx
47
46
  var ve = ae("group/button inline-flex shrink-0 items-center justify-center rounded-md border border-transparent bg-clip-padding text-sm font-medium whitespace-nowrap transition-all outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 active:not-aria-[haspopup]:translate-y-px disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", {
48
47
  variants: {
49
48
  variant: {
@@ -81,8 +80,7 @@ function H({ className: e, variant: t = "default", size: n = "default", ...r })
81
80
  ...r
82
81
  });
83
82
  }
84
- //#endregion
85
- //#region src/lib/card-brands.ts
83
+ // src/lib/card-brands.ts
86
84
  var ye = {
87
85
  visa: "visa",
88
86
  mastercard: "mastercard",
@@ -110,8 +108,7 @@ function U(e) {
110
108
  let t = e?.trim().toLowerCase().replace(/[^a-z ]/g, "");
111
109
  return t ? ye[t] : void 0;
112
110
  }
113
- //#endregion
114
- //#region src/lib/period.ts
111
+ // src/lib/period.ts
115
112
  function Se(e) {
116
113
  return !e || !Number.isSafeInteger(e) || e <= 0 ? null : e % 168 == 0 ? {
117
114
  unit: "week",
@@ -132,8 +129,7 @@ function we(e, t) {
132
129
  let n = Se(e);
133
130
  return n ? t.plural(`interval.access.${n.unit}`, n.count) : null;
134
131
  }
135
- //#endregion
136
- //#region src/account/format.ts
132
+ // src/account/format.ts
137
133
  function W(e, t) {
138
134
  if (!e) return null;
139
135
  let n = new Date(e);
@@ -150,7 +146,7 @@ function G(e, t, n, r) {
150
146
  return i === void 0 ? null : d(e, t, i, r);
151
147
  }
152
148
  function Te(e, t) {
153
- return e ? e.billing_interval_hours ? Ce(e.billing_interval_hours, t) : we(e.access_duration_hours, t) ?? t.t("interval.once") : null;
149
+ return e ? e.billing_interval_months ? t.plural("interval.every.month", e.billing_interval_months) : e.billing_interval_hours ? Ce(e.billing_interval_hours, t) : we(e.access_duration_hours, t) ?? t.t("interval.once") : null;
154
150
  }
155
151
  function Ee(e, { t }) {
156
152
  return e.product?.display_name?.trim() || e.price?.key?.trim() || t("subscriptions.fallbackName");
@@ -159,7 +155,7 @@ function De(e, t, n) {
159
155
  let r = [...new Set((t?.lines ?? []).map((e) => e.description.trim()).filter(Boolean))], i = t?.lines.length === 1 ? t.lines[0] : void 0;
160
156
  return {
161
157
  name: r.join(", ") || n.t(e.subscription_id ? "history.subscription" : "history.purchase"),
162
- detail: i?.billing_interval_hours ? Ce(i.billing_interval_hours, n) : null
158
+ detail: i?.billing_interval_months ? n.plural("interval.every.month", i.billing_interval_months) : i?.billing_interval_hours ? Ce(i.billing_interval_hours, n) : null
163
159
  };
164
160
  }
165
161
  function Oe(e, t) {
@@ -200,8 +196,7 @@ var je = /* @__PURE__ */ new Set([
200
196
  canceled: "neutral",
201
197
  refunded: "neutral"
202
198
  }, Ie = (e) => Fe[e] ?? "neutral", q = "[&_h2]:m-0 [&_p]:m-0 [&_ul]:m-0 [&_ul]:list-none [&_ul]:p-0 [&_table]:border-spacing-0";
203
- //#endregion
204
- //#region src/components/ui/card.tsx
199
+ // src/components/ui/card.tsx
205
200
  function J({ className: e, size: t = "default", ...n }) {
206
201
  return /* @__PURE__ */ I("div", {
207
202
  "data-slot": "card",
@@ -245,8 +240,7 @@ function Ve({ className: e, ...t }) {
245
240
  ...t
246
241
  });
247
242
  }
248
- //#endregion
249
- //#region src/components/ui/skeleton.tsx
243
+ // src/components/ui/skeleton.tsx
250
244
  function Y({ className: e, ...t }) {
251
245
  return /* @__PURE__ */ I("div", {
252
246
  "data-slot": "skeleton",
@@ -254,8 +248,7 @@ function Y({ className: e, ...t }) {
254
248
  ...t
255
249
  });
256
250
  }
257
- //#endregion
258
- //#region src/account/section.tsx
251
+ // src/account/section.tsx
259
252
  function He({ title: e, description: t, action: n, appearance: r, className: i, children: a, ...o }) {
260
253
  let s = k(r), c = F.useId();
261
254
  return /* @__PURE__ */ I("section", {
@@ -334,8 +327,7 @@ function X({ error: e, message: t, onRetry: n }) {
334
327
  })]
335
328
  });
336
329
  }
337
- //#endregion
338
- //#region src/components/ui/badge.tsx
330
+ // src/components/ui/badge.tsx
339
331
  var Ge = ae("group/badge inline-flex h-5 w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-4xl border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-all focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3!", {
340
332
  variants: { variant: {
341
333
  default: "bg-primary text-primary-foreground [a]:hover:bg-primary/80",
@@ -358,8 +350,7 @@ function Ke({ className: e, variant: t = "default", render: n, ...r }) {
358
350
  }
359
351
  });
360
352
  }
361
- //#endregion
362
- //#region src/account/status-badge.tsx
353
+ // src/account/status-badge.tsx
363
354
  var qe = {
364
355
  success: "bg-[color:var(--orck-success)]/12 text-[color:var(--orck-success)]",
365
356
  warning: "bg-[color:var(--orck-warning)]/14 text-[color:var(--orck-warning)]",
@@ -374,8 +365,7 @@ function Je({ status: e, label: t, className: n }) {
374
365
  children: o
375
366
  });
376
367
  }
377
- //#endregion
378
- //#region src/account/payment-history.tsx
368
+ // src/account/payment-history.tsx
379
369
  function Ye(e, t) {
380
370
  if (e.card?.last4) return ke(e.card, t);
381
371
  let n = e.rail ?? "";
@@ -529,8 +519,7 @@ function Xe({ appearance: e, className: t, ...n }) {
529
519
  ]
530
520
  });
531
521
  }
532
- //#endregion
533
- //#region src/components/card-brands.tsx
522
+ // src/components/card-brands.tsx
534
523
  function Ze() {
535
524
  return /* @__PURE__ */ I("svg", {
536
525
  viewBox: "0 0 1000 324.68",
@@ -668,8 +657,7 @@ function nt({ active: e }) {
668
657
  }, e))
669
658
  });
670
659
  }
671
- //#endregion
672
- //#region src/components/ui/alert-dialog.tsx
660
+ // src/components/ui/alert-dialog.tsx
673
661
  function rt({ ...e }) {
674
662
  return /* @__PURE__ */ I(pe.Root, {
675
663
  "data-slot": "alert-dialog",
@@ -736,8 +724,7 @@ function dt({ className: e, variant: t = "outline", size: n = "default", ...r })
736
724
  ...r
737
725
  });
738
726
  }
739
- //#endregion
740
- //#region src/components/ui/dialog.tsx
727
+ // src/components/ui/dialog.tsx
741
728
  function ft({ ...e }) {
742
729
  return /* @__PURE__ */ I(V.Root, {
743
730
  "data-slot": "dialog",
@@ -811,8 +798,7 @@ function yt({ className: e, ...t }) {
811
798
  ...t
812
799
  });
813
800
  }
814
- //#endregion
815
- //#region src/components/ui/spinner.tsx
801
+ // src/components/ui/spinner.tsx
816
802
  function Z({ className: e, ...t }) {
817
803
  let { t: n } = y();
818
804
  return /* @__PURE__ */ I(se, {
@@ -825,8 +811,7 @@ function Z({ className: e, ...t }) {
825
811
  ...t
826
812
  });
827
813
  }
828
- //#endregion
829
- //#region src/components/ui/input.tsx
814
+ // src/components/ui/input.tsx
830
815
  function bt({ className: e, type: t, ...n }) {
831
816
  return /* @__PURE__ */ I(me, {
832
817
  type: t,
@@ -835,8 +820,7 @@ function bt({ className: e, type: t, ...n }) {
835
820
  ...n
836
821
  });
837
822
  }
838
- //#endregion
839
- //#region src/components/ui/label.tsx
823
+ // src/components/ui/label.tsx
840
824
  function Q({ className: e, ...t }) {
841
825
  return /* @__PURE__ */ I("label", {
842
826
  "data-slot": "label",
@@ -844,8 +828,7 @@ function Q({ className: e, ...t }) {
844
828
  ...t
845
829
  });
846
830
  }
847
- //#endregion
848
- //#region src/lib/billing.ts
831
+ // src/lib/billing.ts
849
832
  var xt = "AD AE AF AG AI AL AM AO AQ AR AS AT AU AW AX AZ BA BB BD BE BF BG BH BI BJ BL BM BN BO BQ BR BS BT BV BW BY BZ CA CC CD CF CG CH CI CK CL CM CN CO CR CU CV CW CX CY CZ DE DJ DK DM DO DZ EC EE EG EH ER ES ET FI FJ FK FM FO FR GA GB GD GE GF GG GH GI GL GM GN GP GQ GR GS GT GU GW GY HK HM HN HR HT HU ID IE IL IM IN IO IQ IR IS IT JE JM JO JP KE KG KH KI KM KN KP KR KW KY KZ LA LB LC LI LK LR LS LT LU LV LY MA MC MD ME MF MG MH MK ML MM MN MO MP MQ MR MS MT MU MV MW MX MY MZ NA NC NE NF NG NI NL NO NP NR NU NZ OM PA PE PF PG PH PK PL PM PN PR PS PT PW PY QA RE RO RS RU RW SA SB SC SD SE SG SH SI SJ SK SL SM SN SO SR SS ST SV SX SY SZ TC TD TF TG TH TJ TK TL TM TN TO TR TT TV TW TZ UA UG UM US UY UZ VA VC VE VG VI VN VU WF WS YE YT ZA ZM ZW".split(" "), St = /* @__PURE__ */ new Set(/* @__PURE__ */ "AE.AG.AO.AQ.AW.BF.BI.BJ.BO.BQ.BS.BV.BW.BZ.CF.CG.CI.CK.CM.CW.DM.ER.FJ.GA.GD.GM.GQ.JM.KM.KP.LY.ML.MR.QA.RW.SB.SC.SL.SO.SR.SS.ST.SX.SY.TD.TG.TK.TO.TV.UM.VU.YE.ZW".split(".")), Ct = {
850
833
  AR: "C1000",
851
834
  BR: "01000-000",
@@ -927,8 +910,7 @@ var Ft = /* @__PURE__ */ new Set(/* @__PURE__ */ "AT.BE.BG.CY.CZ.DE.DK.EE.ES.FI.
927
910
  function It(e) {
928
911
  return Ft.has(e.trim().toUpperCase());
929
912
  }
930
- //#endregion
931
- //#region src/components/billing-fields.tsx
913
+ // src/components/billing-fields.tsx
932
914
  var Lt = "text-[13px] font-medium text-foreground", Rt = "h-[38px] rounded-[9px] border border-input bg-card text-sm text-foreground", zt = `${Rt} px-2.5`;
933
915
  function Bt({ id: e, name: t, label: n, value: r, onChange: i, autoComplete: a, placeholder: o, disabled: s, maxLength: c, required: l, type: u, inputMode: d, pattern: f }) {
934
916
  return /* @__PURE__ */ L("div", {
@@ -1044,8 +1026,7 @@ function Ut({ idPrefix: e, value: t, onChange: n, disabled: r, postalError: i, c
1044
1026
  ]
1045
1027
  });
1046
1028
  }
1047
- //#endregion
1048
- //#region src/components/card-fields.tsx
1029
+ // src/components/card-fields.tsx
1049
1030
  function Wt({ id: e, message: t }) {
1050
1031
  return t ? /* @__PURE__ */ I("p", {
1051
1032
  id: e,
@@ -1207,8 +1188,7 @@ function Yt({ ids: e, card: t, fieldErrors: n = {}, disabled: r, hidden: i }) {
1207
1188
  })]
1208
1189
  });
1209
1190
  }
1210
- //#endregion
1211
- //#region src/components/pay-button.tsx
1191
+ // src/components/pay-button.tsx
1212
1192
  function $({ label: e, processing: t, disabled: n }) {
1213
1193
  return /* @__PURE__ */ I(H, {
1214
1194
  type: "submit",
@@ -1243,8 +1223,7 @@ function Xt() {
1243
1223
  ]
1244
1224
  });
1245
1225
  }
1246
- //#endregion
1247
- //#region src/components/platform-card-form.tsx
1226
+ // src/components/platform-card-form.tsx
1248
1227
  function Zt({ publicKey: e, submitLabel: t, disabled: n, onTokenized: r, purpose: i = "payment", defaultCountry: a }) {
1249
1228
  let o = F.useId().replace(/[^a-zA-Z0-9-]/g, ""), s = F.useMemo(() => ({
1250
1229
  number: `bt-${o}-number`,
@@ -1336,8 +1315,7 @@ function Zt({ publicKey: e, submitLabel: t, disabled: n, onTokenized: r, purpose
1336
1315
  ]
1337
1316
  });
1338
1317
  }
1339
- //#endregion
1340
- //#region src/lib/stripe.ts
1318
+ // src/lib/stripe.ts
1341
1319
  var Qt = /* @__PURE__ */ new Map();
1342
1320
  function $t(e) {
1343
1321
  let t = Qt.get(e);
@@ -1346,8 +1324,7 @@ function $t(e) {
1346
1324
  return e;
1347
1325
  }), t.catch(() => Qt.delete(e)), Qt.set(e, t)), t;
1348
1326
  }
1349
- //#endregion
1350
- //#region src/lib/collect.ts
1327
+ // src/lib/collect.ts
1351
1328
  var en = "openrails-collectjs", tn = 3e4, nn = /* @__PURE__ */ new WeakMap();
1352
1329
  function rn(e) {
1353
1330
  try {
@@ -1575,8 +1552,7 @@ function dn(e) {
1575
1552
  ...n.length === 4 ? { expiry_date: `${n.slice(0, 2)}/${n.slice(2)}` } : {}
1576
1553
  };
1577
1554
  }
1578
- //#endregion
1579
- //#region src/lib/stripe-appearance.ts
1555
+ // src/lib/stripe-appearance.ts
1580
1556
  function fn(e) {
1581
1557
  let t = window.getComputedStyle(e), n = (e) => an(t.getPropertyValue(e).trim()) || void 0;
1582
1558
  return {
@@ -1611,8 +1587,7 @@ function fn(e) {
1611
1587
  }
1612
1588
  };
1613
1589
  }
1614
- //#endregion
1615
- //#region src/components/stripe-card.tsx
1590
+ // src/components/stripe-card.tsx
1616
1591
  var pn = F.forwardRef(function({ psp: e, client: t, defaultCountry: n, onCompleteChange: r, unavailableMessage: i, verificationPendingMessage: a }, o) {
1617
1592
  let [s, c] = F.useState(), l = F.useRef(null), u = F.useRef(null), d = F.useRef(r);
1618
1593
  F.useEffect(() => {
@@ -1784,8 +1759,7 @@ function wn() {
1784
1759
  clear: o
1785
1760
  };
1786
1761
  }
1787
- //#endregion
1788
- //#region src/tokenized-card-form.tsx
1762
+ // src/tokenized-card-form.tsx
1789
1763
  function Tn({ tokenizationKey: e, tokenizationURL: t, onTokenized: n, submitLabel: r = "Save card", disabled: i = !1, defaultCountry: a, saveOptInMerchant: o, terms: s, statementDescriptor: c, appearance: l, className: u }) {
1790
1764
  let d = k(l), [f, p] = F.useState(!1), m = F.useId().replace(/[^a-zA-Z0-9-]/g, ""), h = F.useMemo(() => ({
1791
1765
  number: `orck-save-${m}-number`,
@@ -1910,8 +1884,7 @@ function Tn({ tokenizationKey: e, tokenizationURL: t, onTokenized: n, submitLabe
1910
1884
  })
1911
1885
  });
1912
1886
  }
1913
- //#endregion
1914
- //#region src/save-payment-method.tsx
1887
+ // src/save-payment-method.tsx
1915
1888
  function En(e) {
1916
1889
  let { t } = y(), n = k(e.appearance), r = s(e.psp);
1917
1890
  return r ? /* @__PURE__ */ L("div", {
@@ -2030,7 +2003,7 @@ function kn({ psp: e, onSaved: t, submitLabel: n, defaultCountry: r }) {
2030
2003
  }
2031
2004
  function An({ psp: e, onSaved: t, submitLabel: n, defaultCountry: r }) {
2032
2005
  let i = y(), { t: a } = i, { client: o, notify: s } = M(), c = F.useRef(null), [l, u] = F.useState(!1), [d, f] = F.useState(!1), [p, m] = F.useState(), h = F.useMemo(() => Pt(r), [r]), g = async (e) => {
2033
- if (e.preventDefault(), !(!c.current || d)) {
2006
+ if (e.preventDefault(), c.current && !d) {
2034
2007
  f(!0), m(void 0);
2035
2008
  try {
2036
2009
  let e = await c.current.save();
@@ -2104,8 +2077,7 @@ function jn({ psp: e, onSaved: t, submitLabel: r, defaultCountry: i }) {
2104
2077
  }
2105
2078
  })] });
2106
2079
  }
2107
- //#endregion
2108
- //#region src/account/notice.tsx
2080
+ // src/account/notice.tsx
2109
2081
  function Mn() {
2110
2082
  let [e, t] = F.useState(null);
2111
2083
  return F.useEffect(() => {
@@ -2119,8 +2091,7 @@ function Mn() {
2119
2091
  children: e
2120
2092
  }), t];
2121
2093
  }
2122
- //#endregion
2123
- //#region src/account/payment-methods-panel.tsx
2094
+ // src/account/payment-methods-panel.tsx
2124
2095
  function Nn(e, t) {
2125
2096
  return ke(e.card, t);
2126
2097
  }
@@ -2142,11 +2113,7 @@ function Fn({ defaultCurrency: e, defaultCountry: t, appearance: n, className: r
2142
2113
  if (!l) return;
2143
2114
  f(null);
2144
2115
  let e = await c.remove(l.id);
2145
- if (e) {
2146
- f(Pn(e, a));
2147
- return;
2148
- }
2149
- u(null), j(o("paymentMethods.removed"));
2116
+ e ? f(Pn(e, a)) : (u(null), j(o("paymentMethods.removed")));
2150
2117
  }, ne = async (e) => {
2151
2118
  if (!M) return;
2152
2119
  h(null);
@@ -2334,8 +2301,7 @@ function Fn({ defaultCurrency: e, defaultCountry: t, appearance: n, className: r
2334
2301
  ]
2335
2302
  });
2336
2303
  }
2337
- //#endregion
2338
- //#region src/components/ui/textarea.tsx
2304
+ // src/components/ui/textarea.tsx
2339
2305
  function In({ className: e, ...t }) {
2340
2306
  return /* @__PURE__ */ I("textarea", {
2341
2307
  "data-slot": "textarea",
@@ -2343,8 +2309,7 @@ function In({ className: e, ...t }) {
2343
2309
  ...t
2344
2310
  });
2345
2311
  }
2346
- //#endregion
2347
- //#region src/account/cancel-dialog.tsx
2312
+ // src/account/cancel-dialog.tsx
2348
2313
  function Ln({ open: e, onOpenChange: t, name: n, onChain: r = !1, pending: i, onConfirm: a, appearance: o }) {
2349
2314
  let s = y(), { t: c } = s, l = k(o), u = F.useId(), d = F.useId(), [f, m] = F.useState(""), [h, g] = F.useState(!1), [_, v] = F.useState(!1), [b, x] = F.useState(null), S = i !== void 0, C = f.trim().length, w = C < 4, T = async () => {
2350
2315
  if (v(!0), w || S) return;
@@ -2355,7 +2320,7 @@ function Ln({ open: e, onOpenChange: t, name: n, onChain: r = !1, pending: i, on
2355
2320
  return /* @__PURE__ */ I(rt, {
2356
2321
  open: e,
2357
2322
  onOpenChange: (e) => {
2358
- !e && S || t(e);
2323
+ (e || !S) && t(e);
2359
2324
  },
2360
2325
  children: /* @__PURE__ */ I(ot, {
2361
2326
  className: `${l.className} ${q} bg-popover text-popover-foreground`,
@@ -2434,8 +2399,7 @@ function Ln({ open: e, onOpenChange: t, name: n, onChain: r = !1, pending: i, on
2434
2399
  })
2435
2400
  });
2436
2401
  }
2437
- //#endregion
2438
- //#region src/components/ui/radio-group.tsx
2402
+ // src/components/ui/radio-group.tsx
2439
2403
  function Rn({ className: e, ...t }) {
2440
2404
  return /* @__PURE__ */ I(ge, {
2441
2405
  "data-slot": "radio-group",
@@ -2455,8 +2419,7 @@ function zn({ className: e, ...t }) {
2455
2419
  })
2456
2420
  });
2457
2421
  }
2458
- //#endregion
2459
- //#region src/account/change-card-dialog.tsx
2422
+ // src/account/change-card-dialog.tsx
2460
2423
  var Bn = "default";
2461
2424
  function Vn(e, t) {
2462
2425
  return t.filter((t) => t.health?.active !== !1 && t.health?.expiry_status !== "expired" && (!e.psp_id || !t.psp_id || t.psp_id === e.psp_id) && (!e.rail || !t.rail || t.rail === e.rail));
@@ -2466,7 +2429,7 @@ function Hn({ subscription: e, name: t, onOpenChange: n, pending: r, onConfirm:
2466
2429
  return /* @__PURE__ */ I(ft, {
2467
2430
  open: e !== null,
2468
2431
  onOpenChange: (e) => {
2469
- !e && r || n(e);
2432
+ (e || !r) && n(e);
2470
2433
  },
2471
2434
  children: /* @__PURE__ */ I(ht, {
2472
2435
  showCloseButton: !1,
@@ -2641,8 +2604,7 @@ function Wn({ subscription: e, appearance: t, onSaved: n }) {
2641
2604
  children: r("paymentMethods.addUnavailable")
2642
2605
  });
2643
2606
  }
2644
- //#endregion
2645
- //#region src/authenticate.ts
2607
+ // src/authenticate.ts
2646
2608
  async function Gn(e, t, n, r) {
2647
2609
  let i = n.next_action, o = i?.payload?.client_secret;
2648
2610
  if (n.status !== "requires_action" || i?.type !== "authenticate" || !o || !a(r)) return n;
@@ -2650,8 +2612,7 @@ async function Gn(e, t, n, r) {
2650
2612
  if (s.error) throw Error(s.error.message ?? "Authentication failed.");
2651
2613
  return e.confirmSubscriptionChange(t);
2652
2614
  }
2653
- //#endregion
2654
- //#region src/account/change-plan.tsx
2615
+ // src/account/change-plan.tsx
2655
2616
  var Kn = /* @__PURE__ */ new Map(), qn = (e, t) => JSON.stringify([e, t]);
2656
2617
  function Jn(e, t) {
2657
2618
  let n = qn(e, t), r = Kn.get(n) ?? crypto.randomUUID();
@@ -2724,7 +2685,7 @@ function Zn({ open: e, onOpenChange: t, appearance: n, busy: r, ...i }) {
2724
2685
  return /* @__PURE__ */ I(ft, {
2725
2686
  open: e,
2726
2687
  onOpenChange: (e) => {
2727
- !e && r || t(e);
2688
+ (e || !r) && t(e);
2728
2689
  },
2729
2690
  children: /* @__PURE__ */ I(ht, {
2730
2691
  showCloseButton: !1,
@@ -2785,7 +2746,7 @@ function Qn({ name: e, options: t, busy: n, stage: r, onConfirm: i, onCancel: a
2785
2746
  className: "grid gap-5",
2786
2747
  noValidate: !0,
2787
2748
  onSubmit: (e) => {
2788
- e.preventDefault(), !(!g || n) && (m(null), i(g).then(m));
2749
+ e.preventDefault(), g && !n && (m(null), i(g).then(m));
2789
2750
  },
2790
2751
  children: [
2791
2752
  /* @__PURE__ */ L(gt, { children: [/* @__PURE__ */ I(vt, { children: s("changePlan.title", { name: e }) }), /* @__PURE__ */ I(yt, { children: h?.length === 0 ? s("changePlan.none") : s("changePlan.description") })] }),
@@ -2823,14 +2784,13 @@ function $n(e, t, n, r) {
2823
2784
  date: o
2824
2785
  }) : i.message ?? "";
2825
2786
  }
2826
- //#endregion
2827
- //#region src/account/resume-dialog.tsx
2787
+ // src/account/resume-dialog.tsx
2828
2788
  function er({ open: e, onOpenChange: t, name: n, price: r, date: i, busy: a, onConfirm: o, appearance: s }) {
2829
2789
  let c = y().t, l = k(s);
2830
2790
  return /* @__PURE__ */ I(rt, {
2831
2791
  open: e,
2832
2792
  onOpenChange: (e) => {
2833
- !e && a || t(e);
2793
+ (e || !a) && t(e);
2834
2794
  },
2835
2795
  children: /* @__PURE__ */ L(ot, {
2836
2796
  className: `${l.className} ${q} bg-popover text-popover-foreground`,
@@ -2851,8 +2811,7 @@ function er({ open: e, onOpenChange: t, name: n, price: r, date: i, busy: a, onC
2851
2811
  })
2852
2812
  });
2853
2813
  }
2854
- //#endregion
2855
- //#region src/account/subscriptions-panel.tsx
2814
+ // src/account/subscriptions-panel.tsx
2856
2815
  var tr = (e) => (e.rail === "nmi" || e.rail === "stripe") && e.collection_policy === "engine";
2857
2816
  function nr({ sendSolanaTransaction: e, plansHref: t, renderSubscriptionFooter: n, appearance: r, className: i, ...a }) {
2858
2817
  let o = y(), { t: s } = o, { locale: c, navigate: l } = E(), u = T(a), d = ee(), [f, p] = F.useState(null), [m, h] = F.useState(null), [g, _] = F.useState(null), [v, b] = F.useState(null), [x, S] = Mn(), C = F.useMemo(() => {
@@ -2886,7 +2845,7 @@ function nr({ sendSolanaTransaction: e, plansHref: t, renderSubscriptionFooter:
2886
2845
  }) : /* @__PURE__ */ I("ul", {
2887
2846
  className: "-my-1 divide-y divide-border",
2888
2847
  children: C.map((t) => {
2889
- let i = K(t), a = u.pending[t.id], l = Ee(t, o), m = t.price ? G(t.price.unit_amount, t.price.currency, d, c) : null, g = Te(t.price, o), y = W(t.current_period_ends_at, c), x = W(t.access?.ends_at, c), C = W(t.ended_at ?? t.canceled_at ?? t.current_period_ends_at, c), w = Ne(t), T = i && !w && !!t.price?.billing_interval_hours, E = i ? T && y ? s("subscriptions.renews", { date: y }) : x ? s("subscriptions.endsOn", { date: x }) : s("subscriptions.noMorePayments") : t.status === "canceled" ? s("subscriptions.noMorePayments") : C && s("subscriptions.endedOn", { date: C }), D = T ? t.rail === "solana" ? s("subscriptions.wallet") : t.card?.last4 ? s("subscriptions.paidWith", {
2848
+ let i = K(t), a = u.pending[t.id], l = Ee(t, o), m = t.price ? G(t.price.unit_amount, t.price.currency, d, c) : null, g = Te(t.price, o), y = W(t.current_period_ends_at, c), x = W(t.access?.ends_at, c), C = W(t.ended_at ?? t.canceled_at ?? t.current_period_ends_at, c), w = Ne(t), T = i && !w && !!(t.price?.billing_interval_hours || t.price?.billing_interval_months), E = i ? T && y ? s("subscriptions.renews", { date: y }) : x ? s("subscriptions.endsOn", { date: x }) : s("subscriptions.noMorePayments") : t.status === "canceled" ? s("subscriptions.noMorePayments") : C && s("subscriptions.endedOn", { date: C }), D = T ? t.rail === "solana" ? s("subscriptions.wallet") : t.card?.last4 ? s("subscriptions.paidWith", {
2890
2849
  brand: Oe(t.card.brand, s("paymentMethods.fallbackBrand")),
2891
2850
  last4: t.card.last4
2892
2851
  }) : null : null, O = i && !w ? t.cancel_portal_url : null, k = je.has(t.status) && !w && !O, A = (t.resumable && t.collection_policy === "engine" || (t.status === "active" || t.status === "past_due" || t.status === "awaiting_method" || t.status === "unverified") && !w) && !O && t.rail !== "solana" && (t.collection_policy === "engine" || t.collection_policy === "nmi_schedule"), ee = t.cancel_scheduled ? "cancel_scheduled" : t.status, j = n?.(t);
@@ -3068,8 +3027,7 @@ function nr({ sendSolanaTransaction: e, plansHref: t, renderSubscriptionFooter:
3068
3027
  ]
3069
3028
  });
3070
3029
  }
3071
- //#endregion
3072
- //#region src/account/account-billing.tsx
3030
+ // src/account/account-billing.tsx
3073
3031
  function rr({ defaultCurrency: e, defaultCountry: t, sendSolanaTransaction: n, plansHref: r, renderSubscriptionFooter: i, historyPageSize: a, appearance: o, className: s }) {
3074
3032
  return /* @__PURE__ */ L(_e, {
3075
3033
  appearance: o,
@@ -3094,8 +3052,7 @@ function rr({ defaultCurrency: e, defaultCountry: t, sendSolanaTransaction: n, p
3094
3052
  ]
3095
3053
  });
3096
3054
  }
3097
- //#endregion
3098
- //#region src/account/renewal-prompt.tsx
3055
+ // src/account/renewal-prompt.tsx
3099
3056
  function ir({ plansHref: e, appearance: t, className: n }) {
3100
3057
  let { t: r } = y(), { navigate: i } = E(), a = k(t), { subscriptions: o } = T();
3101
3058
  return !o?.length || o.some(K) ? null : /* @__PURE__ */ L("div", {
@@ -3122,8 +3079,7 @@ function ir({ plansHref: e, appearance: t, className: n }) {
3122
3079
  })]
3123
3080
  });
3124
3081
  }
3125
- //#endregion
3126
- //#region src/components/qr.tsx
3082
+ // src/components/qr.tsx
3127
3083
  var ar = 208;
3128
3084
  function or({ amountLabel: e, payload: t, statusLine: n }) {
3129
3085
  let r = F.useRef(null), [i, a] = F.useState("loading");
@@ -3131,7 +3087,7 @@ function or({ amountLabel: e, payload: t, statusLine: n }) {
3131
3087
  let e = r.current;
3132
3088
  if (!e || !t) return;
3133
3089
  let n = !1;
3134
- return e.replaceChildren(), a("loading"), import("./dist-CslWupfi.js").then(({ createQR: r }) => {
3090
+ return e.replaceChildren(), a("loading"), import("./dist-BPWQ2tCx.js").then(({ createQR: r }) => {
3135
3091
  n || (r(t, ar, "#ffffff", "#18181b").append(e), a("ready"));
3136
3092
  }).catch(() => {
3137
3093
  n || a("failed");
@@ -3211,7 +3167,7 @@ function lr(e) {
3211
3167
  }
3212
3168
  function ur(e) {
3213
3169
  let t = e.card;
3214
- if (!(!t?.exp_month || !t.exp_year)) return `${String(t.exp_month).padStart(2, "0")}/${String(t.exp_year).slice(-2)}`;
3170
+ if (t?.exp_month && t.exp_year) return `${String(t.exp_month).padStart(2, "0")}/${String(t.exp_year).slice(-2)}`;
3215
3171
  }
3216
3172
  function dr({ methods: e, value: t, onChange: n, disabled: r, idPrefix: i }) {
3217
3173
  return /* @__PURE__ */ L(Rn, {
@@ -3286,8 +3242,7 @@ function dr({ methods: e, value: t, onChange: n, disabled: r, idPrefix: i }) {
3286
3242
  })]
3287
3243
  });
3288
3244
  }
3289
- //#endregion
3290
- //#region src/components/states.tsx
3245
+ // src/components/states.tsx
3291
3246
  function fr() {
3292
3247
  return /* @__PURE__ */ L("div", {
3293
3248
  className: "grid gap-4",
@@ -3302,8 +3257,7 @@ function fr() {
3302
3257
  ]
3303
3258
  });
3304
3259
  }
3305
- //#endregion
3306
- //#region src/components/stripe-wallets.tsx
3260
+ // src/components/stripe-wallets.tsx
3307
3261
  function pr({ publishableKey: e, amount: t, currency: n, onPaymentMethod: r, onAvailable: i }) {
3308
3262
  let a = F.useRef(null), o = F.useRef(r), s = F.useRef(i);
3309
3263
  F.useEffect(() => {
@@ -3338,7 +3292,7 @@ function pr({ publishableKey: e, amount: t, currency: n, onPaymentMethod: r, onA
3338
3292
  }), l.on("confirm", (t) => {
3339
3293
  (async () => {
3340
3294
  let n = ((await s.submit()).error ? void 0 : await e.createPaymentMethod({ elements: s }))?.paymentMethod?.id;
3341
- (!n || !await o.current(n)) && t.paymentFailed({ reason: "fail" });
3295
+ n && await o.current(n) || t.paymentFailed({ reason: "fail" });
3342
3296
  })();
3343
3297
  }), l.mount(a.current), i = () => l.destroy();
3344
3298
  }, () => c(!1)), () => {
@@ -3354,8 +3308,7 @@ function pr({ publishableKey: e, amount: t, currency: n, onPaymentMethod: r, onA
3354
3308
  style: { visibility: c ? "visible" : "hidden" }
3355
3309
  });
3356
3310
  }
3357
- //#endregion
3358
- //#region src/fallbacks.ts
3311
+ // src/fallbacks.ts
3359
3312
  function mr(e, t, n) {
3360
3313
  let r = /* @__PURE__ */ new Set();
3361
3314
  if (!e) return r;
@@ -3395,8 +3348,7 @@ function Sr(e) {
3395
3348
  return r;
3396
3349
  }
3397
3350
  }
3398
- //#endregion
3399
- //#region src/order-payment.tsx
3351
+ // src/order-payment.tsx
3400
3352
  var Cr = (e) => e.custodian === "platform" && e.rail === "nmi" && e.flow === "tokenize" && !e.status && !!e.config?.public_api_key, wr = (e) => e.status === "complete" || e.status === "processing", Tr = 3e3, Er = 1e4;
3401
3353
  function Dr({ orderId: e, client: t, returnUrl: r, savedPaymentMethods: i = !0, serverCardEntry: a = !0, wallets: o = !1, fallbacks: c, onSettled: l, appearance: u, className: p }) {
3402
3354
  let m = y(), h = M(), g = t ?? h.client, { config: _ } = O(), { config: v, error: b, refetch: x } = S(), T = ee(), [E, D] = F.useState(), [k, A] = F.useState([]), [j, te] = F.useState("new"), [ne, re] = F.useState(), [N, P] = F.useState(), [z, ae] = F.useState(!1), [B, oe] = F.useState(), [se, ce] = F.useState(!1), [le, ue] = F.useState(() => crypto.randomUUID()), de = F.useRef(null), fe = F.useRef(l);
@@ -3461,7 +3413,7 @@ function Dr({ orderId: e, client: t, returnUrl: r, savedPaymentMethods: i = !0,
3461
3413
  psp_id: e.psp_id ?? "",
3462
3414
  rail: e.rail ?? "",
3463
3415
  card: e.card ?? void 0
3464
- })), U = ye.find((e) => e.psp_id === ne) ?? ye[0], Se = _e.find((e) => e.accepts.includes("solana_pay")), Ce = ve.filter((e) => s(e) === null && _e.some((t) => t.psp_id === e.psp_id && t.accepts.includes("redirect"))), we = (e) => !!c && Object.keys(c).some((t) => t.toLowerCase() === e.key.toLowerCase()), W = Ce.filter((e) => !we(e)), G = Ce.filter(we), Te = E?.lines.some((e) => e.billing_interval_hours !== null) ?? !1, Ee = Se ? (v?.payment.solana?.tokens ?? []).filter((e) => !Te || e.recurring_eligible === !0) : [], De = o ? ye.find((e) => s(e) === "stripe_elements" && !!e.config?.publishable_key) : void 0;
3416
+ })), U = ye.find((e) => e.psp_id === ne) ?? ye[0], Se = _e.find((e) => e.accepts.includes("solana_pay")), Ce = ve.filter((e) => s(e) === null && _e.some((t) => t.psp_id === e.psp_id && t.accepts.includes("redirect"))), we = (e) => !!c && Object.keys(c).some((t) => t.toLowerCase() === e.key.toLowerCase()), W = Ce.filter((e) => !we(e)), G = Ce.filter(we), Te = E?.lines.some((e) => !!(e.billing_interval_hours || e.billing_interval_months)) ?? !1, Ee = Se ? (v?.payment.solana?.tokens ?? []).filter((e) => !Te || e.recurring_eligible === !0) : [], De = o ? ye.find((e) => s(e) === "stripe_elements" && !!e.config?.publishable_key) : void 0;
3465
3417
  if (!E) return N ? /* @__PURE__ */ I("p", {
3466
3418
  role: "alert",
3467
3419
  className: "text-sm text-destructive",
@@ -3793,8 +3745,7 @@ function Dr({ orderId: e, client: t, returnUrl: r, savedPaymentMethods: i = !0,
3793
3745
  })]
3794
3746
  });
3795
3747
  }
3796
- //#endregion
3797
- //#region src/embedded-payment.tsx
3748
+ // src/embedded-payment.tsx
3798
3749
  var Or = "openrails.payment.complete", kr = "openrails.payment.resize", Ar = 12e3;
3799
3750
  function jr(e) {
3800
3751
  return /* @__PURE__ */ I(Mr, { ...e }, e.url);
@@ -3890,8 +3841,7 @@ function Mr({ url: e, onComplete: t, fallbacks: n, onLoadFailure: r, title: i =
3890
3841
  }
3891
3842
  }, l)] }) : null;
3892
3843
  }
3893
- //#endregion
3894
- //#region src/cart.tsx
3844
+ // src/cart.tsx
3895
3845
  function Nr({ client: e, onOrder: t, onSettled: n, fallbacks: r, appearance: i, className: a }) {
3896
3846
  let o = y(), s = M(), c = e ?? s.client, l = ee(), [u, f] = F.useState(), [p, m] = F.useState(), [h, g] = F.useState(), [_, v] = F.useState(!1), [b, x] = F.useState(() => crypto.randomUUID());
3897
3847
  F.useEffect(() => {
@@ -4010,10 +3960,14 @@ function Nr({ client: e, onOrder: t, onSettled: n, fallbacks: r, appearance: i,
4010
3960
  ]
4011
3961
  });
4012
3962
  }
4013
- //#endregion
4014
- //#region src/lib/price-label.ts
3963
+ // src/lib/price-label.ts
4015
3964
  function Pr(e, t, n, r) {
4016
- let i = G(e.unit_amount, e.currency, t, r) ?? `${e.unit_amount} ${e.currency}`, a = Se(e.billing_interval_hours);
3965
+ let i = G(e.unit_amount, e.currency, t, r) ?? `${e.unit_amount} ${e.currency}`;
3966
+ if (e.billing_interval_months) return n.t("products.recurring", {
3967
+ amount: i,
3968
+ every: n.plural("interval.every.month", e.billing_interval_months)
3969
+ });
3970
+ let a = Se(e.billing_interval_hours);
4017
3971
  if (a) return n.t("products.recurring", {
4018
3972
  amount: i,
4019
3973
  every: n.plural(`interval.every.${a.unit}`, a.count)
@@ -4024,8 +3978,7 @@ function Pr(e, t, n, r) {
4024
3978
  period: n.plural(`interval.duration.${o.unit}`, o.count)
4025
3979
  }) : n.t("products.once", { amount: i });
4026
3980
  }
4027
- //#endregion
4028
- //#region src/modal.tsx
3981
+ // src/modal.tsx
4029
3982
  function Fr({ open: e, onOpenChange: t, appearance: n, children: r }) {
4030
3983
  return /* @__PURE__ */ I(ft, {
4031
3984
  open: e,
@@ -4068,8 +4021,7 @@ function Lr({ open: e, onOpenChange: t, appearance: n, ...r }) {
4068
4021
  children: /* @__PURE__ */ I(jr, { ...r })
4069
4022
  });
4070
4023
  }
4071
- //#endregion
4072
- //#region src/buy-button.tsx
4024
+ // src/buy-button.tsx
4073
4025
  function Rr(e) {
4074
4026
  if (!n(e) || e.code !== "already_owned") return;
4075
4027
  let t = e.metadata.owned_by;
@@ -4161,9 +4113,8 @@ function Br({ price: t, label: i, amount: a, returnUrl: o, fallbacks: s, onPaid:
4161
4113
  ]
4162
4114
  });
4163
4115
  }
4164
- //#endregion
4165
- //#region src/product-list.tsx
4166
- var Vr = (e, t) => e.unit_amount === t.unit_amount && e.currency === t.currency && e.billing_interval_hours === t.billing_interval_hours && e.access_duration_hours === (t.provider?.access_duration_default ? t.billing_interval_hours : t.access_duration_hours) && !e.trial_unit_amount && !t.trial_unit_amount && !e.trial_duration_hours && !t.trial_duration_hours && !e.quantity && !t.quantity;
4116
+ // src/product-list.tsx
4117
+ var Vr = (e, t) => e.unit_amount === t.unit_amount && e.currency === t.currency && e.billing_interval_hours === t.billing_interval_hours && e.billing_interval_months === t.billing_interval_months && e.access_duration_hours === (t.provider?.access_duration_default ? t.billing_interval_hours : t.access_duration_hours) && !e.trial_unit_amount && !t.trial_unit_amount && !e.trial_duration_hours && !t.trial_duration_hours && !e.quantity && !t.quantity;
4167
4118
  function Hr({ products: e, onPaid: t, onSignInRequired: n, signedIn: r, returnUrl: i, fallbacks: a, appearance: o, className: s }) {
4168
4119
  let c = y(), l = k(o), u = e.filter((e) => !e.archived).map((e) => {
4169
4120
  let t = e.prices.filter((e) => !e.archived && !e.customer_amount && (!e.provider || e.provider.rail === "ccbill"));
@@ -4198,8 +4149,7 @@ function Hr({ products: e, onPaid: t, onSignInRequired: n, signedIn: r, returnUr
4198
4149
  children: d
4199
4150
  });
4200
4151
  }
4201
- //#endregion
4202
- //#region src/lib/billing-notification.ts
4152
+ // src/lib/billing-notification.ts
4203
4153
  function Ur(e) {
4204
4154
  return e.data && typeof e.data == "object" && !Array.isArray(e.data) ? e.data : {};
4205
4155
  }
@@ -4218,8 +4168,7 @@ function Kr(e) {
4218
4168
  let t = Ur(e).recovery_action ?? (e.kind === "payment_method_update_required" ? "update_payment_method" : e.kind === "payment_authentication_required" ? "authenticate_payment" : void 0);
4219
4169
  return t === "update_payment_method" || t === "resubscribe" || t === "authenticate_payment" || t === "contact_support" ? t : "manage_billing";
4220
4170
  }
4221
- //#endregion
4222
- //#region src/components/billing-notification.tsx
4171
+ // src/components/billing-notification.tsx
4223
4172
  function qr({ item: e, actions: t = {}, language: n, messages: r, appearance: i }) {
4224
4173
  let a = y(), o = n || r ? te(r ? v(r) : a.messages, void 0, n ?? a.locale) : a, { t: s } = o;
4225
4174
  if (!Gr(e)) return null;
@@ -4261,12 +4210,11 @@ function qr({ item: e, actions: t = {}, language: n, messages: r, appearance: i
4261
4210
  });
4262
4211
  }
4263
4212
  function Jr(e, t) {
4264
- if (!(typeof e != "string" || !Number.isFinite(Date.parse(e)))) return new Intl.DateTimeFormat(t.locale, {
4213
+ if (typeof e == "string" && Number.isFinite(Date.parse(e))) return new Intl.DateTimeFormat(t.locale, {
4265
4214
  dateStyle: "medium",
4266
4215
  timeStyle: "short"
4267
4216
  }).format(new Date(e));
4268
4217
  }
4269
- //#endregion
4270
4218
  export { rr as AccountBilling, qr as BillingNotification, b as BillingProvider, Je as BillingStatusBadge, _e as BillingUiRoot, Br as BuyButton, Ln as CancelSubscriptionDialog, et as CardBrandPlate, Nr as Cart, jr as EmbeddedPayment, Dr as OrderPayment, Or as PAYMENT_COMPLETE_MESSAGE, kr as PAYMENT_RESIZE_MESSAGE, Xe as PaymentHistory, Fn as PaymentMethodsPanel, Hr as ProductList, ir as RenewalPrompt, En as SavePaymentMethod, nr as SubscriptionsPanel, Tn as TokenizedCardForm, c as addAmounts, l as amountToDecimal, Gn as authenticateChange, Kr as billingNotificationAction, Nt as browserCountry, a as canAuthenticatePayment, m as canSavePaymentMethod, s as cardSetupDriver, o as createBillingClient, te as createTranslator, re as defaultMessages, x as defineMessages, d as formatAmount, Pt as initialCountry, ne as interpolate, u as isAmount, Gr as isBillingNotification, g as pspConfigSchema, Sr as readPaymentFragment, t as redeemAssertion, U as resolveCardBrand, v as resolveMessages, i as routedPsps, Ie as statusTone, h as tokenSource, y as useMessages, xr as withPaymentFallbacks };
4271
4219
 
4272
4220
  //# sourceMappingURL=index.js.map