@cedros/pay-react 1.1.29 → 1.1.31

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 (120) hide show
  1. package/README.md +53 -22
  2. package/dist/{AISettingsSection-B7qrycfY.js → AISettingsSection-B12x5sV5.js} +2 -2
  3. package/dist/{AISettingsSection-DtAgMsDw.mjs → AISettingsSection-DXWDF4Cf.mjs} +4 -4
  4. package/dist/AutosaveIndicator-CJdkhZis.js +1 -0
  5. package/dist/{AutosaveIndicator-BEvABoKU.mjs → AutosaveIndicator-D966vOrP.mjs} +1 -1
  6. package/dist/CedrosContext-3Dz7_9Ct.js +3 -0
  7. package/dist/{CedrosContext-5Gjveoba.mjs → CedrosContext-DQc_k5PG.mjs} +430 -314
  8. package/dist/ChatLogsSection-CH37u0nX.js +1 -0
  9. package/dist/{ChatLogsSection-Ber5o8hF.mjs → ChatLogsSection-DR7mpuQS.mjs} +2 -2
  10. package/dist/{ComplianceSection-ZCr0wsvw.mjs → ComplianceSection-C61_Hf-X.mjs} +3 -3
  11. package/dist/ComplianceSection-DS4e2IBp.js +1 -0
  12. package/dist/CryptoButton-BQceZhbn.js +1 -0
  13. package/dist/{CryptoButton-Cl2kZbOP.mjs → CryptoButton-BuO_RZLj.mjs} +4 -5
  14. package/dist/CustomersSection-Bzs9Qon3.js +1 -0
  15. package/dist/{CustomersSection-D9UknSKC.mjs → CustomersSection-CWWvusxs.mjs} +2 -2
  16. package/dist/DisputesSection-ClcYIHga.js +1 -0
  17. package/dist/{DisputesSection-C_eySK-W.mjs → DisputesSection-D8rcS5Vs.mjs} +2 -2
  18. package/dist/{Dropdown-B90Zabxr.mjs → Dropdown-0y3S40Xf.mjs} +1 -1
  19. package/dist/Dropdown-BuKiVR_L.js +1 -0
  20. package/dist/{ErrorBanner-CZXsHi3H.mjs → ErrorBanner-DAjYj6Dx.mjs} +1 -1
  21. package/dist/ErrorBanner-DxrRVqwe.js +1 -0
  22. package/dist/FAQSection-0UnN2BZs.js +1 -0
  23. package/dist/{FAQSection-Bv_Hdt8B.mjs → FAQSection-Dck0NM-A.mjs} +3 -3
  24. package/dist/{ImagesSection-DpdXQ6qu.mjs → ImagesSection-Bn9GrRRa.mjs} +2 -2
  25. package/dist/ImagesSection-CSwBHvNl.js +1 -0
  26. package/dist/{InventorySection-DZMu9DMw.mjs → InventorySection-Dytfmtn8.mjs} +2 -2
  27. package/dist/InventorySection-ymxaMcIg.js +1 -0
  28. package/dist/{MessagingSection-D_cOBfFt.mjs → MessagingSection-CHFbSxJL.mjs} +3 -3
  29. package/dist/MessagingSection-Dtfv0DvU.js +1 -0
  30. package/dist/OrdersSection-BuzTs9XG.js +1 -0
  31. package/dist/{OrdersSection-wfPavit9.mjs → OrdersSection-vYNuVF5X.mjs} +2 -2
  32. package/dist/{PaymentSettingsSection-BdBDgaRg.js → PaymentSettingsSection-BOaW8lLv.js} +1 -1
  33. package/dist/{PaymentSettingsSection-DunzBo9n.mjs → PaymentSettingsSection-BqdGrXen.mjs} +3 -3
  34. package/dist/{ReturnsSection-B4FL7bUv.mjs → ReturnsSection-CRzhXKtI.mjs} +2 -2
  35. package/dist/ReturnsSection-i5W_3so1.js +1 -0
  36. package/dist/{SettingsSection-DoeNDbqd.mjs → SettingsSection-6o3d8DrH.mjs} +1 -1
  37. package/dist/{SettingsSection-Cz2Yjdhr.js → SettingsSection-CIhO51Zj.js} +1 -1
  38. package/dist/ShippingSection-BUzPW1AG.js +1 -0
  39. package/dist/{ShippingSection-BlVsYC6B.mjs → ShippingSection-CbNzGyCP.mjs} +2 -2
  40. package/dist/SingleCategorySettings-BxVUUy8R.js +3 -0
  41. package/dist/{SingleCategorySettings-B406nnF-.mjs → SingleCategorySettings-Qj_ptB_x.mjs} +4 -4
  42. package/dist/{StatsBar-D4v-I_Dj.mjs → StatsBar-CwCBHBn-.mjs} +1 -1
  43. package/dist/StatsBar-DDUWoizP.js +1 -0
  44. package/dist/StorefrontSection-CZZj5he9.js +1 -0
  45. package/dist/{StorefrontSection-BK_rhrAi.mjs → StorefrontSection-DIYDmj59.mjs} +4 -4
  46. package/dist/SubscriptionsSection-Bof5MElz.js +1 -0
  47. package/dist/{SubscriptionsSection-D8V9RBv-.mjs → SubscriptionsSection-lMVHdV5X.mjs} +3 -3
  48. package/dist/TaxSection-Be-9v60Z.js +1 -0
  49. package/dist/{TaxSection-Cj6TXL6x.mjs → TaxSection-dD7PzQvG.mjs} +2 -2
  50. package/dist/Token22Section-Di5fHsrU.js +1 -0
  51. package/dist/{Token22Section-DtYAcT54.mjs → Token22Section-Dos0CYEk.mjs} +2 -2
  52. package/dist/{WalletManager-D-eoqUDy.mjs → WalletManager-CGR69MiR.mjs} +1 -1
  53. package/dist/{WalletManager-DXChB9LA.js → WalletManager-ZJbGQHrn.js} +1 -1
  54. package/dist/{WebhooksSection-DBAIxtBy.mjs → WebhooksSection-5gqXzIhq.mjs} +2 -2
  55. package/dist/WebhooksSection-CiLDyl7c.js +1 -0
  56. package/dist/admin.js +1 -1
  57. package/dist/admin.mjs +4 -5
  58. package/dist/crypto-only.js +1 -1
  59. package/dist/crypto-only.mjs +102 -104
  60. package/dist/{index-9QF_UfSN.mjs → index-CU6M10Rs.mjs} +13 -14
  61. package/dist/{index-Cq9ya93W.js → index-DVxx_62C.js} +10 -10
  62. package/dist/index.js +1 -1
  63. package/dist/index.mjs +21 -23
  64. package/dist/pay-react.css +1 -1
  65. package/dist/plugin-BIkt3boU.mjs +339 -0
  66. package/dist/plugin-Dw8_Q8rE.js +1 -0
  67. package/dist/sections-D1d83mfH.js +1 -0
  68. package/dist/{sections-more-CMFgfU4d.mjs → sections-DcUfZQNE.mjs} +263 -270
  69. package/dist/src/admin/plugin.d.ts.map +1 -1
  70. package/dist/src/admin/sectionIds.d.ts.map +1 -1
  71. package/dist/src/admin.d.ts +0 -7
  72. package/dist/src/admin.d.ts.map +1 -1
  73. package/dist/src/components/admin/index.d.ts +0 -1
  74. package/dist/src/components/admin/index.d.ts.map +1 -1
  75. package/dist/src/index.d.ts +0 -1
  76. package/dist/src/index.d.ts.map +1 -1
  77. package/dist/stripe-only.js +1 -1
  78. package/dist/stripe-only.mjs +18 -19
  79. package/dist/styles-BwaDljnz.js +1 -0
  80. package/dist/{styles-DGagylUj.mjs → styles-fihm6qVA.mjs} +51 -52
  81. package/dist/testing/index.js +1 -1
  82. package/dist/testing/index.mjs +1 -1
  83. package/package.json +6 -2
  84. package/dist/AutosaveIndicator-DiyeAg93.js +0 -1
  85. package/dist/CedrosContext-CCakH2SZ.js +0 -3
  86. package/dist/CedrosPayAdminDashboard-CAwEvn66.js +0 -1
  87. package/dist/CedrosPayAdminDashboard-CBuvNAtB.mjs +0 -250
  88. package/dist/ChatLogsSection-DLxMMi9I.js +0 -1
  89. package/dist/ComplianceSection-Buu0zTiL.js +0 -1
  90. package/dist/CryptoButton-DxFCYDlJ.js +0 -1
  91. package/dist/CustomersSection-BywmMLur.js +0 -1
  92. package/dist/DisputesSection-DwkHGv2a.js +0 -1
  93. package/dist/Dropdown-CtY91emj.js +0 -1
  94. package/dist/ErrorBanner-Cx2dUhps.js +0 -1
  95. package/dist/FAQSection-DlPLnIJD.js +0 -1
  96. package/dist/ImagesSection-B4Jzet79.js +0 -1
  97. package/dist/InventorySection-BgRdpn1l.js +0 -1
  98. package/dist/MessagingSection-CxV-pf-f.js +0 -1
  99. package/dist/OrdersSection-BbAX79Ff.js +0 -1
  100. package/dist/ReturnsSection-7k4LZ8yp.js +0 -1
  101. package/dist/ShippingSection-C-HI8rOb.js +0 -1
  102. package/dist/SingleCategorySettings-BqC2UXt3.js +0 -3
  103. package/dist/StatsBar-m6GSRNxs.js +0 -1
  104. package/dist/StorefrontSection-Axvh_KeS.js +0 -1
  105. package/dist/SubscriptionsSection-EeULMWIB.js +0 -1
  106. package/dist/TaxSection-CzHPhaHl.js +0 -1
  107. package/dist/ThemeContext-CFXyYx7A.js +0 -1
  108. package/dist/ThemeContext-l0bqcOGW.mjs +0 -126
  109. package/dist/Token22Section-DqRKVG_G.js +0 -1
  110. package/dist/WebhooksSection-D--iPZuM.js +0 -1
  111. package/dist/sectionIds-B_tFiNvF.js +0 -1
  112. package/dist/sectionIds-DBavltrL.mjs +0 -359
  113. package/dist/sections-BHph7CYj.mjs +0 -9
  114. package/dist/sections-C2zEJr5G.js +0 -1
  115. package/dist/sections-more-C1VNVwkp.js +0 -1
  116. package/dist/src/components/admin/CedrosPayAdminDashboard.d.ts +0 -40
  117. package/dist/src/components/admin/CedrosPayAdminDashboard.d.ts.map +0 -1
  118. package/dist/src/components/admin/LazyCedrosPayAdminDashboard.d.ts +0 -4
  119. package/dist/src/components/admin/LazyCedrosPayAdminDashboard.d.ts.map +0 -1
  120. package/dist/styles--fxb3lCl.js +0 -1
@@ -1,359 +0,0 @@
1
- import { jsx as e, jsxs as i } from "react/jsx-runtime";
2
- import { lazy as w, Suspense as P, useMemo as A } from "react";
3
- import { b as T } from "./index-BFt38o8Q.mjs";
4
- import { g as m, b as x, f as v } from "./fetchWithTimeout-DmMOwL0Q.mjs";
5
- const j = w(async () => ({ default: (await import("./CedrosPayAdminDashboard-CBuvNAtB.mjs")).CedrosPayAdminDashboard }));
6
- function D(o) {
7
- return /* @__PURE__ */ e(P, { fallback: null, children: /* @__PURE__ */ e(j, { ...o }) });
8
- }
9
- function y() {
10
- return /* @__PURE__ */ i("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [
11
- /* @__PURE__ */ e("path", { d: "M20 7.5v9l-4 2.25M4 7.5v9l4 2.25" }),
12
- /* @__PURE__ */ e("path", { d: "m20 7.5-8-4.5-8 4.5" }),
13
- /* @__PURE__ */ e("path", { d: "m12 12 8-4.5M12 12v9.5M12 12 4 7.5" })
14
- ] });
15
- }
16
- function L() {
17
- return /* @__PURE__ */ e("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: /* @__PURE__ */ e("path", { d: "M12 2v20M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6" }) });
18
- }
19
- function S() {
20
- return /* @__PURE__ */ i("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [
21
- /* @__PURE__ */ e("path", { d: "M2 9a3 3 0 0 1 0 6v2a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-2a3 3 0 0 1 0-6V7a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2Z" }),
22
- /* @__PURE__ */ e("path", { d: "M13 5v2M13 17v2M13 11v2" })
23
- ] });
24
- }
25
- function M() {
26
- return /* @__PURE__ */ i("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [
27
- /* @__PURE__ */ e("path", { d: "M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8" }),
28
- /* @__PURE__ */ e("path", { d: "M3 3v5h5" }),
29
- /* @__PURE__ */ e("path", { d: "M12 7v5l4 2" })
30
- ] });
31
- }
32
- function C() {
33
- return /* @__PURE__ */ i("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [
34
- /* @__PURE__ */ e("path", { d: "M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z" }),
35
- /* @__PURE__ */ e("circle", { cx: "12", cy: "12", r: "3" })
36
- ] });
37
- }
38
- function b() {
39
- return /* @__PURE__ */ i("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [
40
- /* @__PURE__ */ e("path", { d: "M19 7V4a1 1 0 0 0-1-1H5a2 2 0 0 0 0 4h15a1 1 0 0 1 1 1v4h-3a2 2 0 0 0 0 4h3a1 1 0 0 0 1-1v-2a1 1 0 0 0-1-1" }),
41
- /* @__PURE__ */ e("path", { d: "M3 5v14a2 2 0 0 0 2 2h15a1 1 0 0 0 1-1v-4" })
42
- ] });
43
- }
44
- const d = {
45
- products: () => /* @__PURE__ */ e(y, {}),
46
- transactions: () => /* @__PURE__ */ e(L, {}),
47
- coupons: () => /* @__PURE__ */ e(S, {}),
48
- refunds: () => /* @__PURE__ */ e(M, {}),
49
- settings: () => /* @__PURE__ */ e(C, {}),
50
- wallet: () => /* @__PURE__ */ e(b, {})
51
- }, V = {
52
- products: /* @__PURE__ */ e(y, {}),
53
- transactions: /* @__PURE__ */ e(L, {}),
54
- coupons: /* @__PURE__ */ e(S, {}),
55
- refunds: /* @__PURE__ */ e(M, {}),
56
- settings: /* @__PURE__ */ e(C, {}),
57
- wallet: /* @__PURE__ */ e(b, {}),
58
- chevronRight: /* @__PURE__ */ e("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: /* @__PURE__ */ e("path", { d: "m9 18 6-6-6-6" }) }),
59
- loading: /* @__PURE__ */ e("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", className: "cedros-admin__spinner", children: /* @__PURE__ */ e("path", { d: "M21 12a9 9 0 1 1-6.219-8.56" }) }),
60
- refresh: /* @__PURE__ */ i("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [
61
- /* @__PURE__ */ e("path", { d: "M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8" }),
62
- /* @__PURE__ */ e("path", { d: "M21 3v5h-5" }),
63
- /* @__PURE__ */ e("path", { d: "M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16" }),
64
- /* @__PURE__ */ e("path", { d: "M8 16H3v5" })
65
- ] }),
66
- user: /* @__PURE__ */ i("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [
67
- /* @__PURE__ */ e("circle", { cx: "12", cy: "8", r: "5" }),
68
- /* @__PURE__ */ e("path", { d: "M20 21a8 8 0 0 0-16 0" })
69
- ] }),
70
- check: /* @__PURE__ */ e("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: /* @__PURE__ */ e("path", { d: "M20 6 9 17l-5-5" }) }),
71
- trash: /* @__PURE__ */ e("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: /* @__PURE__ */ e("path", { d: "M3 6h18M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2" }) }),
72
- plus: /* @__PURE__ */ e("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: /* @__PURE__ */ e("path", { d: "M12 5v14M5 12h14" }) }),
73
- chevronDown: /* @__PURE__ */ e("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: /* @__PURE__ */ e("path", { d: "m6 9 6 6 6-6" }) }),
74
- chevronUp: /* @__PURE__ */ e("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: /* @__PURE__ */ e("path", { d: "m18 15-6-6-6 6" }) }),
75
- storefront: /* @__PURE__ */ i("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [
76
- /* @__PURE__ */ e("path", { d: "M3 9h18v10a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V9Z" }),
77
- /* @__PURE__ */ e("path", { d: "m3 9 2.45-4.9A2 2 0 0 1 7.24 3h9.52a2 2 0 0 1 1.8 1.1L21 9" }),
78
- /* @__PURE__ */ e("path", { d: "M12 3v6" })
79
- ] }),
80
- arrowUp: /* @__PURE__ */ i("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [
81
- /* @__PURE__ */ e("path", { d: "m5 12 7-7 7 7" }),
82
- /* @__PURE__ */ e("path", { d: "M12 19V5" })
83
- ] }),
84
- arrowDown: /* @__PURE__ */ i("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [
85
- /* @__PURE__ */ e("path", { d: "m5 12 7 7 7-7" }),
86
- /* @__PURE__ */ e("path", { d: "M12 5v14" })
87
- ] }),
88
- delete: /* @__PURE__ */ i("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [
89
- /* @__PURE__ */ e("path", { d: "M3 6h18M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2" }),
90
- /* @__PURE__ */ e("path", { d: "M10 11v6M14 11v6" })
91
- ] }),
92
- close: /* @__PURE__ */ e("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: /* @__PURE__ */ e("path", { d: "M18 6 6 18M6 6l12 12" }) }),
93
- edit: /* @__PURE__ */ i("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [
94
- /* @__PURE__ */ e("path", { d: "M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7" }),
95
- /* @__PURE__ */ e("path", { d: "M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z" })
96
- ] }),
97
- faq: /* @__PURE__ */ i("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [
98
- /* @__PURE__ */ e("circle", { cx: "12", cy: "12", r: "10" }),
99
- /* @__PURE__ */ e("path", { d: "M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3" }),
100
- /* @__PURE__ */ e("path", { d: "M12 17h.01" })
101
- ] }),
102
- chat: /* @__PURE__ */ e("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: /* @__PURE__ */ e("path", { d: "m3 21 1.9-5.7a8.5 8.5 0 1 1 3.8 3.8z" }) }),
103
- globe: /* @__PURE__ */ i("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [
104
- /* @__PURE__ */ e("circle", { cx: "12", cy: "12", r: "10" }),
105
- /* @__PURE__ */ e("path", { d: "M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20" }),
106
- /* @__PURE__ */ e("path", { d: "M2 12h20" })
107
- ] }),
108
- eye: /* @__PURE__ */ i("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [
109
- /* @__PURE__ */ e("path", { d: "M2 12s3-7 10-7 10 7 10 7-3 7-10 7-10-7-10-7Z" }),
110
- /* @__PURE__ */ e("circle", { cx: "12", cy: "12", r: "3" })
111
- ] }),
112
- eyeOff: /* @__PURE__ */ i("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [
113
- /* @__PURE__ */ e("path", { d: "M9.88 9.88a3 3 0 1 0 4.24 4.24" }),
114
- /* @__PURE__ */ e("path", { d: "M10.73 5.08A10.43 10.43 0 0 1 12 5c7 0 10 7 10 7a13.16 13.16 0 0 1-1.67 2.68" }),
115
- /* @__PURE__ */ e("path", { d: "M6.61 6.61A13.526 13.526 0 0 0 2 12s3 7 10 7a9.74 9.74 0 0 0 5.39-1.61" }),
116
- /* @__PURE__ */ e("line", { x1: "2", x2: "22", y1: "2", y2: "22" })
117
- ] }),
118
- creditCard: /* @__PURE__ */ i("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [
119
- /* @__PURE__ */ e("rect", { width: "20", height: "14", x: "2", y: "5", rx: "2" }),
120
- /* @__PURE__ */ e("line", { x1: "2", x2: "22", y1: "10", y2: "10" })
121
- ] }),
122
- mail: /* @__PURE__ */ i("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [
123
- /* @__PURE__ */ e("rect", { width: "20", height: "16", x: "2", y: "4", rx: "2" }),
124
- /* @__PURE__ */ e("path", { d: "m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7" })
125
- ] }),
126
- server: /* @__PURE__ */ i("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [
127
- /* @__PURE__ */ e("rect", { width: "20", height: "8", x: "2", y: "2", rx: "2", ry: "2" }),
128
- /* @__PURE__ */ e("rect", { width: "20", height: "8", x: "2", y: "14", rx: "2", ry: "2" }),
129
- /* @__PURE__ */ e("line", { x1: "6", x2: "6.01", y1: "6", y2: "6" }),
130
- /* @__PURE__ */ e("line", { x1: "6", x2: "6.01", y1: "18", y2: "18" })
131
- ] }),
132
- calendarRepeat: /* @__PURE__ */ i("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [
133
- /* @__PURE__ */ e("rect", { width: "18", height: "18", x: "3", y: "4", rx: "2", ry: "2" }),
134
- /* @__PURE__ */ e("line", { x1: "16", x2: "16", y1: "2", y2: "6" }),
135
- /* @__PURE__ */ e("line", { x1: "8", x2: "8", y1: "2", y2: "6" }),
136
- /* @__PURE__ */ e("line", { x1: "3", x2: "21", y1: "10", y2: "10" }),
137
- /* @__PURE__ */ e("path", { d: "M11 14h1.5a1.5 1.5 0 0 1 0 3H11v2" }),
138
- /* @__PURE__ */ e("path", { d: "M16 14v3a1 1 0 0 0 1 1h1" })
139
- ] }),
140
- shield: /* @__PURE__ */ e("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: /* @__PURE__ */ e("path", { d: "M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z" }) }),
141
- brain: /* @__PURE__ */ i("svg", { width: "16", height: "16", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [
142
- /* @__PURE__ */ e("path", { d: "M12 5a3 3 0 1 0-5.997.125 4 4 0 0 0-2.526 5.77 4 4 0 0 0 .556 6.588A4 4 0 1 0 12 18Z" }),
143
- /* @__PURE__ */ e("path", { d: "M12 5a3 3 0 1 1 5.997.125 4 4 0 0 1 2.526 5.77 4 4 0 0 1-.556 6.588A4 4 0 1 1 12 18Z" }),
144
- /* @__PURE__ */ e("path", { d: "M15 13a4.5 4.5 0 0 1-3-4 4.5 4.5 0 0 1-3 4" }),
145
- /* @__PURE__ */ e("path", { d: "M17.599 6.5a3 3 0 0 0 .399-1.375" }),
146
- /* @__PURE__ */ e("path", { d: "M6.003 5.125A3 3 0 0 0 6.401 6.5" }),
147
- /* @__PURE__ */ e("path", { d: "M3.477 10.896a4 4 0 0 1 .585-.396" }),
148
- /* @__PURE__ */ e("path", { d: "M19.938 10.5a4 4 0 0 1 .585.396" }),
149
- /* @__PURE__ */ e("path", { d: "M6 18a4 4 0 0 1-1.967-.516" }),
150
- /* @__PURE__ */ e("path", { d: "M19.967 17.484A4 4 0 0 1 18 18" })
151
- ] })
152
- };
153
- class B {
154
- serverUrl;
155
- walletSigner = null;
156
- jwtToken = null;
157
- isAdminUser = !1;
158
- constructor(r) {
159
- this.serverUrl = r;
160
- }
161
- getAuthMethod() {
162
- return this.walletSigner?.publicKey && this.walletSigner.signMessage ? "wallet" : this.jwtToken && this.isAdminUser ? "cedros-login" : "none";
163
- }
164
- isAuthenticated() {
165
- return this.getAuthMethod() !== "none";
166
- }
167
- setWalletSigner(r) {
168
- this.walletSigner = r, m().debug("[AdminAuthManager] Wallet signer updated:", !!r?.publicKey);
169
- }
170
- setCedrosLoginAuth(r, n) {
171
- this.jwtToken = r, this.isAdminUser = n ?? !1, m().debug("[AdminAuthManager] Cedros-login auth updated:", { hasToken: !!r, isAdmin: this.isAdminUser });
172
- }
173
- async createAuthHeaders(r) {
174
- const n = this.getAuthMethod();
175
- if (n === "wallet")
176
- return this.createWalletAuthHeaders(r);
177
- if (n === "cedros-login")
178
- return this.createJwtAuthHeaders();
179
- throw new Error("No admin authentication configured. Connect a wallet or sign in as admin.");
180
- }
181
- async createWalletAuthHeaders(r) {
182
- if (!this.walletSigner?.publicKey || !this.walletSigner.signMessage)
183
- throw new Error("Wallet not connected or does not support message signing");
184
- const n = await this.fetchNonce(r), l = new TextEncoder().encode(n.nonce), a = await this.walletSigner.signMessage(l), s = T.encode(this.walletSigner.publicKey.toBytes()), p = x.fromUint8Array(a);
185
- return {
186
- "X-Signer": s,
187
- "X-Message": n.nonce,
188
- "X-Signature": p
189
- };
190
- }
191
- createJwtAuthHeaders() {
192
- if (!this.jwtToken)
193
- throw new Error("No JWT token available");
194
- return {
195
- Authorization: `Bearer ${this.jwtToken}`
196
- };
197
- }
198
- async fetchNonce(r) {
199
- const n = `${this.serverUrl}/paywall/v1/nonce`, l = typeof r == "string" ? { purpose: r } : { path: r.path, method: r.method.toUpperCase() };
200
- m().debug("[AdminAuthManager] Fetching nonce:", l);
201
- const a = await v(n, {
202
- method: "POST",
203
- headers: { "Content-Type": "application/json" },
204
- body: JSON.stringify(l)
205
- });
206
- if (!a.ok) {
207
- const s = await a.text();
208
- throw new Error(`Failed to fetch nonce: ${a.status} ${s}`);
209
- }
210
- return await a.json();
211
- }
212
- async fetchWithAuth(r, n = {}) {
213
- if (this.getAuthMethod() === "none")
214
- throw new Error("No admin authentication configured");
215
- const a = (n.method || "GET").toUpperCase(), s = await this.createAuthHeaders({ path: r, method: a }), p = {
216
- // Only set Content-Type for methods that typically carry a body
217
- ...a !== "GET" && a !== "HEAD" ? { "Content-Type": "application/json" } : {},
218
- ...n.headers || {},
219
- ...s
220
- }, u = await v(`${this.serverUrl}${r}`, {
221
- ...n,
222
- headers: p
223
- });
224
- if (!u.ok) {
225
- let g = `Admin API error ${u.status}`;
226
- try {
227
- const h = await u.json();
228
- h && typeof h.error == "string" ? g = h.error : h && typeof h.message == "string" && (g = h.message);
229
- } catch {
230
- }
231
- throw new Error(g);
232
- }
233
- return await u.json();
234
- }
235
- }
236
- const t = {
237
- adminProfile: "admin-profile",
238
- adminSectionAccess: "admin-section-access",
239
- cedrosLogin: "cedros-login",
240
- cedrosPay: "cedros-pay",
241
- org: "org",
242
- dashboardPermissions: "dashboard-permissions"
243
- };
244
- function W(o = {}) {
245
- return { ...o };
246
- }
247
- function E(o) {
248
- const r = W(o.services);
249
- return !(t.adminProfile in r) && o.cedrosLogin?.user && (r[t.adminProfile] = {
250
- user: o.cedrosLogin.user
251
- }), !(t.adminSectionAccess in r) && o.dashboardPermissions && (r[t.adminSectionAccess] = o.dashboardPermissions), !(t.cedrosLogin in r) && o.cedrosLogin && (r[t.cedrosLogin] = o.cedrosLogin), !(t.cedrosPay in r) && o.cedrosPay && (r[t.cedrosPay] = o.cedrosPay), !(t.org in r) && o.org && (r[t.org] = o.org), !(t.dashboardPermissions in r) && o.dashboardPermissions && (r[t.dashboardPermissions] = o.dashboardPermissions), r;
252
- }
253
- function f(o, r) {
254
- return U(E(o), r);
255
- }
256
- function U(o, r) {
257
- return o[r];
258
- }
259
- const c = (o) => w(async () => {
260
- const l = (await o()).default;
261
- return { default: ({ pluginContext: s }) => {
262
- const p = s.getAccessToken(), u = s.hasPermission("cedros-pay:admin") || s.hasPermission("admin"), g = A(() => {
263
- const k = new B(s.serverUrl);
264
- return k.setCedrosLoginAuth(p ?? null, u), k;
265
- }, [u, s.serverUrl, p]), h = {
266
- serverUrl: s.serverUrl,
267
- authManager: g
268
- };
269
- return /* @__PURE__ */ e(l, { ...h });
270
- } };
271
- }), _ = {
272
- id: "cedros-pay",
273
- name: "Cedros Pay",
274
- version: "1.0.0",
275
- sections: [
276
- // Store group (main cedros-pay sections)
277
- { id: "transactions", label: "Transactions", icon: d.transactions, group: "Store", order: 0 },
278
- { id: "products", label: "Products", icon: d.products, group: "Store", order: 1 },
279
- { id: "subscriptions", label: "Subscriptions", icon: d.products, group: "Store", order: 2 },
280
- { id: "coupons", label: "Coupons", icon: d.coupons, group: "Store", order: 3 },
281
- { id: "refunds", label: "Refunds", icon: d.refunds, group: "Store", order: 4 },
282
- { id: "compliance", label: "Compliance", icon: d.settings, group: "Store", order: 5 },
283
- // Configuration group
284
- { id: "storefront", label: "Storefront", icon: d.products, group: "Configuration", order: 10 },
285
- { id: "ai-settings", label: "Store AI", icon: d.settings, group: "Configuration", order: 11 },
286
- { id: "faqs", label: "Knowledge Base", icon: d.settings, group: "Configuration", order: 12 },
287
- { id: "payment-settings", label: "Payment Options", icon: d.wallet, group: "Configuration", order: 13 },
288
- { id: "messaging", label: "Store Messages", icon: d.settings, group: "Configuration", order: 14 },
289
- { id: "settings", label: "Store Server", icon: d.settings, group: "Configuration", order: 15 }
290
- ],
291
- groups: [
292
- { id: "Store", label: "Store", order: 1 },
293
- { id: "Configuration", label: "Configuration", order: 2, defaultCollapsed: !0 }
294
- ],
295
- components: {
296
- products: c(() => import("./sections-BHph7CYj.mjs").then((o) => ({ default: o.ProductsSection }))),
297
- subscriptions: c(() => import("./SubscriptionsSection-D8V9RBv-.mjs").then((o) => ({ default: o.SubscriptionsSection }))),
298
- transactions: c(() => import("./sections-BHph7CYj.mjs").then((o) => ({ default: o.TransactionsSection }))),
299
- coupons: c(() => import("./sections-BHph7CYj.mjs").then((o) => ({ default: o.CouponsSection }))),
300
- refunds: c(() => import("./sections-BHph7CYj.mjs").then((o) => ({ default: o.RefundsSection }))),
301
- compliance: c(() => import("./ComplianceSection-ZCr0wsvw.mjs").then((o) => ({ default: o.ComplianceSection }))),
302
- storefront: c(() => import("./StorefrontSection-BK_rhrAi.mjs").then((o) => ({ default: o.StorefrontSection }))),
303
- "ai-settings": c(() => import("./AISettingsSection-DtAgMsDw.mjs").then((o) => ({ default: o.AISettingsSection }))),
304
- faqs: c(() => import("./FAQSection-Bv_Hdt8B.mjs").then((o) => ({ default: o.FAQSection }))),
305
- "payment-settings": c(() => import("./PaymentSettingsSection-DunzBo9n.mjs").then((o) => ({ default: o.PaymentSettingsSection }))),
306
- messaging: c(() => import("./MessagingSection-D_cOBfFt.mjs").then((o) => ({ default: o.MessagingSection }))),
307
- settings: c(() => import("./SettingsSection-DoeNDbqd.mjs").then((o) => ({ default: o.SettingsSection })))
308
- },
309
- createPluginContext(o) {
310
- const r = f(
311
- o,
312
- t.cedrosPay
313
- ), n = f(
314
- o,
315
- t.cedrosLogin
316
- ), l = f(o, t.org);
317
- return {
318
- serverUrl: r?.serverUrl || n?.serverUrl || "",
319
- userId: n?.user?.id,
320
- getAccessToken: () => n?.getAccessToken?.() || r?.jwtToken || null,
321
- hasPermission: (s) => this.checkPermission(s, o),
322
- orgId: l?.orgId,
323
- pluginData: {
324
- walletAddress: r?.walletAddress
325
- }
326
- };
327
- },
328
- checkPermission(o, r) {
329
- const n = f(r, t.org);
330
- return n?.permissions ? n.permissions.includes(o) : !1;
331
- },
332
- cssNamespace: "cedros-dashboard"
333
- }, I = [
334
- // ── Store group ──
335
- { id: "transactions", qualifiedId: "cedros-pay:transactions", label: "Transactions", group: "Store", order: 0, endpoints: ["GET /admin/transactions"] },
336
- { id: "products", qualifiedId: "cedros-pay:products", label: "Products", group: "Store", order: 1, endpoints: ["GET /admin/products", "POST /admin/products", "PUT /admin/products/{id}", "DELETE /admin/products/{id}"] },
337
- { id: "subscriptions", qualifiedId: "cedros-pay:subscriptions", label: "Subscriptions", group: "Store", order: 2, endpoints: ["GET /admin/subscriptions", "POST /admin/subscriptions", "PUT /admin/subscriptions/{id}"] },
338
- { id: "coupons", qualifiedId: "cedros-pay:coupons", label: "Coupons", group: "Store", order: 3, endpoints: ["GET /admin/coupons", "POST /admin/coupons", "PUT /admin/coupons/{id}", "DELETE /admin/coupons/{id}"] },
339
- { id: "refunds", qualifiedId: "cedros-pay:refunds", label: "Refunds", group: "Store", order: 4, endpoints: ["GET /admin/refunds", "POST /admin/refunds/{id}/approve", "POST /admin/refunds/{id}/deny"] },
340
- // ── Configuration group ──
341
- { id: "storefront", qualifiedId: "cedros-pay:storefront", label: "Storefront", group: "Configuration", order: 10, endpoints: ["GET /admin/config/shop", "PUT /admin/config/shop"] },
342
- { id: "ai-settings", qualifiedId: "cedros-pay:ai-settings", label: "Store AI", group: "Configuration", order: 11, endpoints: ["GET /admin/config/ai", "PUT /admin/config/ai/api-key", "PUT /admin/config/ai/assignment", "PUT /admin/config/ai/prompt"] },
343
- { id: "faqs", qualifiedId: "cedros-pay:faqs", label: "Knowledge Base", group: "Configuration", order: 12, endpoints: ["GET /admin/faqs", "POST /admin/faqs", "PUT /admin/faqs/{id}", "DELETE /admin/faqs/{id}"] },
344
- { id: "payment-settings", qualifiedId: "cedros-pay:payment-settings", label: "Payment Options", group: "Configuration", order: 13, endpoints: ["GET /admin/config/stripe", "PUT /admin/config/stripe", "GET /admin/config/x402", "PUT /admin/config/x402", "GET /admin/config/cedros_login", "PUT /admin/config/cedros_login"] },
345
- { id: "messaging", qualifiedId: "cedros-pay:messaging", label: "Store Messages", group: "Configuration", order: 14, endpoints: ["GET /admin/config/messaging", "PUT /admin/config/messaging"] },
346
- { id: "settings", qualifiedId: "cedros-pay:settings", label: "Store Server", group: "Configuration", order: 15, endpoints: ["GET /admin/config/server", "PUT /admin/config/server"] }
347
- ], R = I.map((o) => o.qualifiedId), N = [
348
- { id: "Store", label: "Store", order: 1, defaultCollapsed: !1 },
349
- { id: "Configuration", label: "Configuration", order: 2, defaultCollapsed: !0 }
350
- ];
351
- export {
352
- B as A,
353
- N as C,
354
- V as I,
355
- I as a,
356
- R as b,
357
- D as c,
358
- _ as d
359
- };
@@ -1,9 +0,0 @@
1
- import { R as t, C as s, T as n, P as e } from "./sections-more-CMFgfU4d.mjs";
2
- import { S as c } from "./sections-more-CMFgfU4d.mjs";
3
- export {
4
- s as CouponsSection,
5
- e as ProductsSection,
6
- t as RefundsSection,
7
- c as SettingsSection,
8
- n as TransactionsSection
9
- };
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./sections-more-C1VNVwkp.js");exports.CouponsSection=t.CouponsSection;exports.ProductsSection=t.ProductsSection;exports.RefundsSection=t.RefundsSection;exports.SettingsSection=t.SettingsSection;exports.TransactionsSection=t.TransactionsSection;