@cedros/pay-react 1.1.18 → 1.1.20

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 (710) hide show
  1. package/dist/{AISettingsSection-CD9IRyR1.mjs → AISettingsSection-BH-RXvk1.mjs} +10 -10
  2. package/dist/{AISettingsSection-C-thWh51.js → AISettingsSection-f5K0nUoQ.js} +1 -1
  3. package/dist/{AutosaveIndicator-DxemlKnX.js → AutosaveIndicator-CpTVtJIz.js} +1 -1
  4. package/dist/{AutosaveIndicator-G2CRN8hH.mjs → AutosaveIndicator-DTOaopUP.mjs} +1 -1
  5. package/dist/{CedrosContext-BnJ2Cf7R.mjs → CedrosContext-BE6P5PQ0.mjs} +241 -245
  6. package/dist/{CedrosContext-C26DlvLF.js → CedrosContext-D-lnoEkR.js} +3 -3
  7. package/dist/{CryptoButton-BdOtL7w-.mjs → CryptoButton-CksMkZjL.mjs} +48 -48
  8. package/dist/CryptoButton-Dy-g3bR0.js +1 -0
  9. package/dist/{FAQSection-CyYK9OAN.mjs → FAQSection-BO7ZfQMN.mjs} +4 -4
  10. package/dist/{FAQSection-_pm1ekTe.js → FAQSection-CVJ5w6cB.js} +1 -1
  11. package/dist/{MessagingSection-BHzf1Mhu.js → MessagingSection-CRFtSoE8.js} +1 -1
  12. package/dist/{MessagingSection-DO2yPTvs.mjs → MessagingSection-CmFYFdaw.mjs} +5 -5
  13. package/dist/{PaymentSettingsSection-DpENgoca.js → PaymentSettingsSection-BKDiep-C.js} +1 -1
  14. package/dist/{PaymentSettingsSection--Aqlne1F.mjs → PaymentSettingsSection-VDcgpOkp.mjs} +1 -1
  15. package/dist/{SettingsSection-CGKKGXWz.mjs → SettingsSection-B0TpaIOG.mjs} +1 -1
  16. package/dist/{SettingsSection-DNoODw7i.js → SettingsSection-DSlW47o4.js} +1 -1
  17. package/dist/SingleCategorySettings-BTXR7zex.js +3 -0
  18. package/dist/{SingleCategorySettings-8DCtLcow.mjs → SingleCategorySettings-Cwlehl0u.mjs} +62 -69
  19. package/dist/{StorefrontSection-Mzr1H51w.mjs → StorefrontSection-BAY9V1j6.mjs} +8 -8
  20. package/dist/{StorefrontSection-BEOMtSAg.js → StorefrontSection-DfN5yxkV.js} +1 -1
  21. package/dist/{SubscriptionsSection-4b29i-41.js → SubscriptionsSection-BboudRYv.js} +1 -1
  22. package/dist/{SubscriptionsSection-Dy1e15fe.mjs → SubscriptionsSection-D_RKCILr.mjs} +6 -6
  23. package/dist/{WalletManager-HXXyARQ7.mjs → WalletManager-D78miaJ2.mjs} +1 -1
  24. package/dist/{WalletManager-D6BYTwXn.js → WalletManager-QcfgQmap.js} +1 -1
  25. package/dist/crypto-only.d.ts +2 -23
  26. package/dist/crypto-only.js +1 -1
  27. package/dist/crypto-only.mjs +64 -63
  28. package/dist/{index-bbSf3B7-.mjs → index-75RhiLDq.mjs} +7192 -9782
  29. package/dist/index-B5ck27xb.js +84 -0
  30. package/dist/index.d.ts +2 -45
  31. package/dist/index.js +1 -1
  32. package/dist/index.mjs +64 -63
  33. package/dist/pay-react.css +1 -1
  34. package/dist/sections-BCdzdqlG.js +1 -0
  35. package/dist/sections-BIBMX6KS.mjs +8 -0
  36. package/dist/src/admin/index.d.ts.map +1 -0
  37. package/dist/src/admin/plugin.d.ts.map +1 -0
  38. package/dist/src/admin/types.d.ts.map +1 -0
  39. package/dist/src/components/CedrosPay.d.ts.map +1 -0
  40. package/dist/src/components/CreditsButton.d.ts.map +1 -0
  41. package/dist/src/components/CreditsSubscribeButton.d.ts.map +1 -0
  42. package/dist/src/components/CryptoButton.d.ts.map +1 -0
  43. package/dist/src/components/CryptoSubscribeButton.d.ts.map +1 -0
  44. package/dist/src/components/PaymentModal.d.ts.map +1 -0
  45. package/dist/src/components/ProductPrice.d.ts.map +1 -0
  46. package/dist/src/components/PurchaseButton.d.ts.map +1 -0
  47. package/dist/src/components/StripeButton.d.ts.map +1 -0
  48. package/dist/src/components/SubscribeButton.d.ts.map +1 -0
  49. package/dist/src/components/SubscriptionManagementPanel.d.ts.map +1 -0
  50. package/dist/src/components/admin/AISettingsSection.d.ts.map +1 -0
  51. package/dist/src/components/admin/AdminAuthManager.d.ts.map +1 -0
  52. package/dist/src/components/admin/AutosaveIndicator.d.ts.map +1 -0
  53. package/dist/src/components/admin/CedrosPayAdminDashboard.d.ts.map +1 -0
  54. package/dist/src/components/admin/ConfigEditor.d.ts.map +1 -0
  55. package/dist/src/components/admin/CouponsSection.d.ts.map +1 -0
  56. package/dist/src/components/admin/Dropdown.d.ts.map +1 -0
  57. package/dist/src/components/admin/ErrorBanner.d.ts.map +1 -0
  58. package/dist/src/components/admin/FAQSection.d.ts.map +1 -0
  59. package/dist/src/components/admin/MessagingSection.d.ts.map +1 -0
  60. package/dist/src/components/admin/OverviewSection.d.ts.map +1 -0
  61. package/dist/src/components/admin/PaymentSettingsSection.d.ts.map +1 -0
  62. package/dist/src/components/admin/ProductVariationsEditor.d.ts.map +1 -0
  63. package/dist/src/components/admin/ProductsSection.d.ts.map +1 -0
  64. package/dist/src/components/admin/RefundsSection.d.ts.map +1 -0
  65. package/dist/src/components/admin/SecretArrayEditor.d.ts.map +1 -0
  66. package/dist/src/components/admin/SettingsSection.d.ts.map +1 -0
  67. package/dist/src/components/admin/SingleCategorySettings.d.ts.map +1 -0
  68. package/dist/src/components/admin/StatsBar.d.ts.map +1 -0
  69. package/dist/src/components/admin/StorefrontSection.d.ts.map +1 -0
  70. package/dist/src/components/admin/SubscriptionsSection.d.ts.map +1 -0
  71. package/dist/src/components/admin/Toggle.d.ts.map +1 -0
  72. package/dist/{components → src/components}/admin/TokenMintSelector.d.ts +1 -1
  73. package/dist/src/components/admin/TokenMintSelector.d.ts.map +1 -0
  74. package/dist/src/components/admin/TransactionsSection.d.ts.map +1 -0
  75. package/dist/src/components/admin/VariantInventoryGrid.d.ts.map +1 -0
  76. package/dist/src/components/admin/VariationTypeEditor.d.ts.map +1 -0
  77. package/dist/src/components/admin/configApi.d.ts.map +1 -0
  78. package/dist/src/components/admin/icons.d.ts.map +1 -0
  79. package/dist/{components → src/components}/admin/index.d.ts +1 -1
  80. package/dist/src/components/admin/index.d.ts.map +1 -0
  81. package/dist/src/components/admin/sections-more.d.ts.map +1 -0
  82. package/dist/src/components/admin/sections.d.ts.map +1 -0
  83. package/dist/src/components/admin/types.d.ts.map +1 -0
  84. package/dist/{components → src/components}/admin/useAdminAuth.d.ts +11 -23
  85. package/dist/src/components/admin/useAdminAuth.d.ts.map +1 -0
  86. package/dist/src/components/admin/useAutosave.d.ts.map +1 -0
  87. package/dist/src/components/admin/useProductVariations.d.ts.map +1 -0
  88. package/dist/src/components/subscriptionPanelStyles.d.ts.map +1 -0
  89. package/dist/src/context/CedrosContext.d.ts.map +1 -0
  90. package/dist/src/context/ThemeContext.d.ts.map +1 -0
  91. package/dist/src/context/index.d.ts.map +1 -0
  92. package/dist/src/crypto-only.d.ts +23 -0
  93. package/dist/src/crypto-only.d.ts.map +1 -0
  94. package/dist/src/ecommerce/__tests__/cartCheckoutRequirements.test.d.ts.map +1 -0
  95. package/dist/src/ecommerce/__tests__/cartProviderPersistence.test.d.ts.map +1 -0
  96. package/dist/src/ecommerce/__tests__/cartReducer.test.d.ts.map +1 -0
  97. package/dist/src/ecommerce/__tests__/cartServerMerge.test.d.ts.map +1 -0
  98. package/dist/src/ecommerce/__tests__/checkoutPaymentMethods.test.d.ts.map +1 -0
  99. package/dist/src/ecommerce/__tests__/checkoutReturn.test.d.ts.map +1 -0
  100. package/dist/src/ecommerce/__tests__/checkoutSchema.test.d.ts.map +1 -0
  101. package/dist/src/ecommerce/__tests__/inventoryHooks.test.d.ts.map +1 -0
  102. package/dist/src/ecommerce/__tests__/mockAdapter.test.d.ts.map +1 -0
  103. package/dist/src/ecommerce/__tests__/storage.test.d.ts.map +1 -0
  104. package/dist/src/ecommerce/adapters/CommerceAdapter.d.ts.map +1 -0
  105. package/dist/src/ecommerce/adapters/mock/mockAdapter.d.ts.map +1 -0
  106. package/dist/src/ecommerce/adapters/paywall/paywallAdapter.d.ts.map +1 -0
  107. package/dist/src/ecommerce/adapters/paywall/paywallAdapter.test.d.ts.map +1 -0
  108. package/dist/src/ecommerce/components/cart/CartLineItem.d.ts.map +1 -0
  109. package/dist/src/ecommerce/components/cart/CartPageContent.d.ts.map +1 -0
  110. package/dist/src/ecommerce/components/cart/CartPanel.d.ts.map +1 -0
  111. package/dist/src/ecommerce/components/cart/CartSidebar.d.ts.map +1 -0
  112. package/dist/src/ecommerce/components/cart/CartSummary.d.ts.map +1 -0
  113. package/dist/src/ecommerce/components/cart/PromoCodeInput.d.ts.map +1 -0
  114. package/dist/src/ecommerce/components/catalog/Breadcrumbs.d.ts.map +1 -0
  115. package/dist/src/ecommerce/components/catalog/CategoryNav.d.ts.map +1 -0
  116. package/dist/src/ecommerce/components/catalog/FilterPanel.d.ts.map +1 -0
  117. package/dist/src/ecommerce/components/catalog/Price.d.ts.map +1 -0
  118. package/dist/src/ecommerce/components/catalog/ProductCard.d.ts.map +1 -0
  119. package/dist/src/ecommerce/components/catalog/ProductGallery.d.ts.map +1 -0
  120. package/dist/src/ecommerce/components/catalog/ProductGrid.d.ts.map +1 -0
  121. package/dist/src/ecommerce/components/catalog/QuantitySelector.d.ts.map +1 -0
  122. package/dist/src/ecommerce/components/catalog/QuickViewDialog.d.ts.map +1 -0
  123. package/dist/src/ecommerce/components/catalog/SearchInput.d.ts.map +1 -0
  124. package/dist/src/ecommerce/components/catalog/VariantSelector.d.ts.map +1 -0
  125. package/dist/src/ecommerce/components/chat/ShopChatPanel.d.ts.map +1 -0
  126. package/dist/src/ecommerce/components/checkout/AddressForm.d.ts.map +1 -0
  127. package/dist/src/ecommerce/components/checkout/CheckoutCancelPage.d.ts.map +1 -0
  128. package/dist/src/ecommerce/components/checkout/CheckoutForm.d.ts.map +1 -0
  129. package/dist/src/ecommerce/components/checkout/CheckoutLayout.d.ts.map +1 -0
  130. package/dist/src/ecommerce/components/checkout/CheckoutReceipt.d.ts.map +1 -0
  131. package/dist/src/ecommerce/components/checkout/CheckoutSuccessPage.d.ts.map +1 -0
  132. package/dist/src/ecommerce/components/checkout/InventoryVerificationDialog.d.ts.map +1 -0
  133. package/dist/src/ecommerce/components/checkout/OrderReview.d.ts.map +1 -0
  134. package/dist/src/ecommerce/components/checkout/PaymentStep.d.ts.map +1 -0
  135. package/dist/src/ecommerce/components/checkout/ShippingMethodSelector.d.ts.map +1 -0
  136. package/dist/src/ecommerce/components/faq/FAQItem.d.ts.map +1 -0
  137. package/dist/src/ecommerce/components/faq/FAQItem.test.d.ts.map +1 -0
  138. package/dist/src/ecommerce/components/faq/FAQList.d.ts.map +1 -0
  139. package/dist/src/ecommerce/components/faq/index.d.ts.map +1 -0
  140. package/dist/src/ecommerce/components/general/EmptyState.d.ts.map +1 -0
  141. package/dist/src/ecommerce/components/general/ErrorBoundary.d.ts.map +1 -0
  142. package/dist/src/ecommerce/components/general/ErrorState.d.ts.map +1 -0
  143. package/dist/src/ecommerce/components/general/toast.d.ts.map +1 -0
  144. package/dist/src/ecommerce/components/orders/OrderCard.d.ts.map +1 -0
  145. package/dist/src/ecommerce/components/orders/OrderDetails.d.ts.map +1 -0
  146. package/dist/src/ecommerce/components/orders/OrderList.d.ts.map +1 -0
  147. package/dist/src/ecommerce/components/ui/accordion.d.ts.map +1 -0
  148. package/dist/src/ecommerce/components/ui/badge.d.ts.map +1 -0
  149. package/dist/src/ecommerce/components/ui/button.d.ts.map +1 -0
  150. package/dist/src/ecommerce/components/ui/card.d.ts.map +1 -0
  151. package/dist/src/ecommerce/components/ui/dialog.d.ts.map +1 -0
  152. package/dist/src/ecommerce/components/ui/input.d.ts.map +1 -0
  153. package/dist/src/ecommerce/components/ui/label.d.ts.map +1 -0
  154. package/dist/src/ecommerce/components/ui/select.d.ts.map +1 -0
  155. package/dist/src/ecommerce/components/ui/separator.d.ts.map +1 -0
  156. package/dist/src/ecommerce/components/ui/sheet.d.ts.map +1 -0
  157. package/dist/src/ecommerce/components/ui/skeleton.d.ts.map +1 -0
  158. package/dist/src/ecommerce/components/ui/tabs.d.ts.map +1 -0
  159. package/dist/src/ecommerce/components/ui/textarea.d.ts.map +1 -0
  160. package/dist/src/ecommerce/config/context.d.ts.map +1 -0
  161. package/dist/src/ecommerce/config/types.d.ts.map +1 -0
  162. package/dist/src/ecommerce/hooks/checkoutReturn.d.ts.map +1 -0
  163. package/dist/src/ecommerce/hooks/useAIRelatedProducts.d.ts.map +1 -0
  164. package/dist/src/ecommerce/hooks/useCartInventory.d.ts.map +1 -0
  165. package/dist/src/ecommerce/hooks/useCatalogUrlState.d.ts.map +1 -0
  166. package/dist/src/ecommerce/hooks/useCategories.d.ts.map +1 -0
  167. package/dist/src/ecommerce/hooks/useCheckoutResultFromUrl.d.ts.map +1 -0
  168. package/dist/src/ecommerce/hooks/useHoldExpiry.d.ts.map +1 -0
  169. package/dist/src/ecommerce/hooks/useInventoryVerification.d.ts.map +1 -0
  170. package/dist/src/ecommerce/hooks/useOrders.d.ts.map +1 -0
  171. package/dist/src/ecommerce/hooks/usePaymentMethodsConfig.d.ts.map +1 -0
  172. package/dist/src/ecommerce/hooks/useProduct.d.ts.map +1 -0
  173. package/dist/src/ecommerce/hooks/useProducts.d.ts.map +1 -0
  174. package/dist/src/ecommerce/hooks/useShippingMethods.d.ts.map +1 -0
  175. package/dist/src/ecommerce/hooks/useStorefrontSettings.d.ts.map +1 -0
  176. package/dist/src/ecommerce/hooks/useSubscriptionData.d.ts.map +1 -0
  177. package/dist/src/ecommerce/index.d.ts.map +1 -0
  178. package/dist/src/ecommerce/integrations/cedros-pay/useCedrosPayCheckoutAdapter.d.ts.map +1 -0
  179. package/dist/src/ecommerce/state/cart/CartProvider.d.ts.map +1 -0
  180. package/dist/src/ecommerce/state/cart/cartReducer.d.ts.map +1 -0
  181. package/dist/src/ecommerce/state/checkout/checkoutSchema.d.ts.map +1 -0
  182. package/dist/src/ecommerce/state/checkout/useCheckout.d.ts.map +1 -0
  183. package/dist/src/ecommerce/templates/CartTemplate.d.ts.map +1 -0
  184. package/dist/src/ecommerce/templates/CategoryTemplate.d.ts.map +1 -0
  185. package/dist/src/ecommerce/templates/CheckoutTemplate.d.ts.map +1 -0
  186. package/dist/src/ecommerce/templates/ProductTemplate.d.ts.map +1 -0
  187. package/dist/src/ecommerce/templates/PurchaseHistoryTemplate.d.ts.map +1 -0
  188. package/dist/src/ecommerce/templates/ReceiptTemplate.d.ts.map +1 -0
  189. package/dist/src/ecommerce/templates/ShopTemplate.d.ts.map +1 -0
  190. package/dist/src/ecommerce/templates/SubscriptionTemplate.d.ts.map +1 -0
  191. package/dist/src/ecommerce/testing/adapterContract.d.ts.map +1 -0
  192. package/dist/src/ecommerce/types.d.ts.map +1 -0
  193. package/dist/src/ecommerce/utils/cartCheckoutRequirements.d.ts.map +1 -0
  194. package/dist/src/ecommerce/utils/cartItemMetadata.d.ts.map +1 -0
  195. package/dist/src/ecommerce/utils/cn.d.ts.map +1 -0
  196. package/dist/src/ecommerce/utils/money.d.ts.map +1 -0
  197. package/dist/src/ecommerce/utils/storage.d.ts.map +1 -0
  198. package/dist/src/hooks/useCreditsPayment.d.ts.map +1 -0
  199. package/dist/src/hooks/useCreditsSubscription.d.ts.map +1 -0
  200. package/dist/src/hooks/useCryptoSubscription.d.ts.map +1 -0
  201. package/dist/src/hooks/usePaymentMode.d.ts.map +1 -0
  202. package/dist/src/hooks/useRefundVerification.d.ts.map +1 -0
  203. package/dist/src/hooks/useStripeCheckout.d.ts.map +1 -0
  204. package/dist/src/hooks/useSubscription.d.ts.map +1 -0
  205. package/dist/src/hooks/useSubscriptionManagement.d.ts.map +1 -0
  206. package/dist/src/hooks/useX402Payment.d.ts.map +1 -0
  207. package/dist/src/i18n/index.d.ts.map +1 -0
  208. package/dist/src/i18n/useTranslation.d.ts.map +1 -0
  209. package/dist/src/index.d.ts +45 -0
  210. package/dist/src/index.d.ts.map +1 -0
  211. package/dist/src/managers/CreditsManager.d.ts.map +1 -0
  212. package/dist/src/managers/ManagerCache.d.ts.map +1 -0
  213. package/dist/src/managers/RouteDiscoveryManager.d.ts +6 -0
  214. package/dist/src/managers/RouteDiscoveryManager.d.ts.map +1 -0
  215. package/dist/src/managers/StripeManager.d.ts.map +1 -0
  216. package/dist/src/managers/SubscriptionChangeManager.d.ts.map +1 -0
  217. package/dist/src/managers/SubscriptionManager.d.ts.map +1 -0
  218. package/dist/src/managers/WalletManager.d.ts.map +1 -0
  219. package/dist/src/managers/X402Manager.d.ts.map +1 -0
  220. package/dist/src/stripe-only.d.ts +49 -0
  221. package/dist/src/stripe-only.d.ts.map +1 -0
  222. package/dist/src/telemetry.d.ts +27 -0
  223. package/dist/src/telemetry.d.ts.map +1 -0
  224. package/dist/src/testing/__tests__/providers.test.d.ts.map +1 -0
  225. package/dist/src/testing/helpers.d.ts.map +1 -0
  226. package/dist/src/testing/index.d.ts +12 -0
  227. package/dist/src/testing/index.d.ts.map +1 -0
  228. package/dist/src/testing/mocks.d.ts.map +1 -0
  229. package/dist/src/testing/providers.d.ts.map +1 -0
  230. package/dist/src/types/componentOptions.d.ts.map +1 -0
  231. package/dist/src/types/errors.d.ts.map +1 -0
  232. package/dist/src/types/index.d.ts.map +1 -0
  233. package/dist/src/types/subscription.d.ts.map +1 -0
  234. package/dist/src/utils/__tests__/couponHelpers.test.d.ts.map +1 -0
  235. package/dist/src/utils/__tests__/cspHelper.test.d.ts.map +1 -0
  236. package/dist/src/utils/__tests__/fetchWithTimeout.test.d.ts.map +1 -0
  237. package/dist/src/utils/cartHelpers.d.ts.map +1 -0
  238. package/dist/src/utils/circuitBreaker.d.ts.map +1 -0
  239. package/dist/src/utils/couponHelpers.d.ts.map +1 -0
  240. package/dist/src/utils/cspHelper.d.ts.map +1 -0
  241. package/dist/src/utils/csvHelpers.d.ts.map +1 -0
  242. package/dist/src/utils/csvHelpers.test.d.ts.map +1 -0
  243. package/dist/src/utils/dateHelpers.d.ts.map +1 -0
  244. package/dist/src/utils/deprecation.d.ts.map +1 -0
  245. package/dist/src/utils/errorHandling.d.ts.map +1 -0
  246. package/dist/src/utils/errorMessages.d.ts.map +1 -0
  247. package/dist/src/utils/errorParser.d.ts.map +1 -0
  248. package/dist/src/utils/eventEmitter.d.ts.map +1 -0
  249. package/dist/src/utils/exponentialBackoff.d.ts.map +1 -0
  250. package/dist/src/utils/fetchWithTimeout.d.ts.map +1 -0
  251. package/dist/src/utils/index.d.ts.map +1 -0
  252. package/dist/src/utils/logger.d.ts.map +1 -0
  253. package/dist/src/utils/modalStyles.d.ts.map +1 -0
  254. package/dist/src/utils/rateLimiter.d.ts.map +1 -0
  255. package/dist/src/utils/requestDeduplication.d.ts.map +1 -0
  256. package/dist/src/utils/securityValidation.d.ts.map +1 -0
  257. package/dist/src/utils/solanaCheck.d.ts.map +1 -0
  258. package/dist/src/utils/telemetry.d.ts.map +1 -0
  259. package/dist/src/utils/tokenMintValidator.d.ts.map +1 -0
  260. package/dist/src/utils/uuid.d.ts.map +1 -0
  261. package/dist/src/utils/validateConfig.d.ts.map +1 -0
  262. package/dist/src/utils/walletDetection.d.ts.map +1 -0
  263. package/dist/src/utils/walletPool.d.ts.map +1 -0
  264. package/dist/stripe-only.d.ts +2 -14
  265. package/dist/stripe-only.js +1 -1
  266. package/dist/stripe-only.mjs +59 -62
  267. package/dist/styles--eKKnfdj.mjs +2578 -0
  268. package/dist/styles-BWrLnaUW.js +1 -0
  269. package/dist/telemetry.d.ts +2 -27
  270. package/dist/testing/index.d.ts +2 -12
  271. package/dist/testing/index.js +1 -1
  272. package/dist/testing/index.mjs +1 -1
  273. package/dist/{walletPool-DjA7J3a9.js → walletPool-BqNfOhB0.js} +1 -1
  274. package/dist/{walletPool-BV_z1lEA.mjs → walletPool-DShNjCQ6.mjs} +1 -1
  275. package/package.json +8 -3
  276. package/dist/CryptoButton-N8kRfNDO.js +0 -1
  277. package/dist/SingleCategorySettings-NLBYxM0O.js +0 -3
  278. package/dist/admin/index.d.ts.map +0 -1
  279. package/dist/admin/plugin.d.ts.map +0 -1
  280. package/dist/admin/types.d.ts.map +0 -1
  281. package/dist/components/CedrosPay.d.ts.map +0 -1
  282. package/dist/components/CreditsButton.d.ts.map +0 -1
  283. package/dist/components/CreditsSubscribeButton.d.ts.map +0 -1
  284. package/dist/components/CryptoButton.d.ts.map +0 -1
  285. package/dist/components/CryptoSubscribeButton.d.ts.map +0 -1
  286. package/dist/components/PaymentModal.d.ts.map +0 -1
  287. package/dist/components/ProductPrice.d.ts.map +0 -1
  288. package/dist/components/PurchaseButton.d.ts.map +0 -1
  289. package/dist/components/StripeButton.d.ts.map +0 -1
  290. package/dist/components/SubscribeButton.d.ts.map +0 -1
  291. package/dist/components/SubscriptionManagementPanel.d.ts.map +0 -1
  292. package/dist/components/admin/AISettingsSection.d.ts.map +0 -1
  293. package/dist/components/admin/AdminAuthManager.d.ts.map +0 -1
  294. package/dist/components/admin/AutosaveIndicator.d.ts.map +0 -1
  295. package/dist/components/admin/CedrosPayAdminDashboard.d.ts.map +0 -1
  296. package/dist/components/admin/ConfigEditor.d.ts.map +0 -1
  297. package/dist/components/admin/CouponsSection.d.ts.map +0 -1
  298. package/dist/components/admin/Dropdown.d.ts.map +0 -1
  299. package/dist/components/admin/ErrorBanner.d.ts.map +0 -1
  300. package/dist/components/admin/FAQSection.d.ts.map +0 -1
  301. package/dist/components/admin/MessagingSection.d.ts.map +0 -1
  302. package/dist/components/admin/OverviewSection.d.ts.map +0 -1
  303. package/dist/components/admin/PaymentSettingsSection.d.ts.map +0 -1
  304. package/dist/components/admin/ProductVariationsEditor.d.ts.map +0 -1
  305. package/dist/components/admin/ProductsSection.d.ts.map +0 -1
  306. package/dist/components/admin/RefundsSection.d.ts.map +0 -1
  307. package/dist/components/admin/SecretArrayEditor.d.ts.map +0 -1
  308. package/dist/components/admin/SettingsSection.d.ts.map +0 -1
  309. package/dist/components/admin/SingleCategorySettings.d.ts.map +0 -1
  310. package/dist/components/admin/StatsBar.d.ts.map +0 -1
  311. package/dist/components/admin/StorefrontSection.d.ts.map +0 -1
  312. package/dist/components/admin/SubscriptionsSection.d.ts.map +0 -1
  313. package/dist/components/admin/Toggle.d.ts.map +0 -1
  314. package/dist/components/admin/TokenMintSelector.d.ts.map +0 -1
  315. package/dist/components/admin/TransactionsSection.d.ts.map +0 -1
  316. package/dist/components/admin/VariantInventoryGrid.d.ts.map +0 -1
  317. package/dist/components/admin/VariationTypeEditor.d.ts.map +0 -1
  318. package/dist/components/admin/configApi.d.ts.map +0 -1
  319. package/dist/components/admin/icons.d.ts.map +0 -1
  320. package/dist/components/admin/index.d.ts.map +0 -1
  321. package/dist/components/admin/sections-more.d.ts.map +0 -1
  322. package/dist/components/admin/sections.d.ts.map +0 -1
  323. package/dist/components/admin/types.d.ts.map +0 -1
  324. package/dist/components/admin/useAdminAuth.d.ts.map +0 -1
  325. package/dist/components/admin/useAutosave.d.ts.map +0 -1
  326. package/dist/components/admin/useProductVariations.d.ts.map +0 -1
  327. package/dist/components/subscriptionPanelStyles.d.ts.map +0 -1
  328. package/dist/context/CedrosContext.d.ts.map +0 -1
  329. package/dist/context/ThemeContext.d.ts.map +0 -1
  330. package/dist/context/index.d.ts.map +0 -1
  331. package/dist/crypto-only.d.ts.map +0 -1
  332. package/dist/ecommerce/__tests__/cartCheckoutRequirements.test.d.ts.map +0 -1
  333. package/dist/ecommerce/__tests__/cartProviderPersistence.test.d.ts.map +0 -1
  334. package/dist/ecommerce/__tests__/cartReducer.test.d.ts.map +0 -1
  335. package/dist/ecommerce/__tests__/cartServerMerge.test.d.ts.map +0 -1
  336. package/dist/ecommerce/__tests__/checkoutPaymentMethods.test.d.ts.map +0 -1
  337. package/dist/ecommerce/__tests__/checkoutReturn.test.d.ts.map +0 -1
  338. package/dist/ecommerce/__tests__/checkoutSchema.test.d.ts.map +0 -1
  339. package/dist/ecommerce/__tests__/inventoryHooks.test.d.ts.map +0 -1
  340. package/dist/ecommerce/__tests__/mockAdapter.test.d.ts.map +0 -1
  341. package/dist/ecommerce/__tests__/storage.test.d.ts.map +0 -1
  342. package/dist/ecommerce/adapters/CommerceAdapter.d.ts.map +0 -1
  343. package/dist/ecommerce/adapters/mock/mockAdapter.d.ts.map +0 -1
  344. package/dist/ecommerce/adapters/paywall/paywallAdapter.d.ts.map +0 -1
  345. package/dist/ecommerce/adapters/paywall/paywallAdapter.test.d.ts.map +0 -1
  346. package/dist/ecommerce/components/cart/CartLineItem.d.ts.map +0 -1
  347. package/dist/ecommerce/components/cart/CartPageContent.d.ts.map +0 -1
  348. package/dist/ecommerce/components/cart/CartPanel.d.ts.map +0 -1
  349. package/dist/ecommerce/components/cart/CartSidebar.d.ts.map +0 -1
  350. package/dist/ecommerce/components/cart/CartSummary.d.ts.map +0 -1
  351. package/dist/ecommerce/components/cart/PromoCodeInput.d.ts.map +0 -1
  352. package/dist/ecommerce/components/catalog/Breadcrumbs.d.ts.map +0 -1
  353. package/dist/ecommerce/components/catalog/CategoryNav.d.ts.map +0 -1
  354. package/dist/ecommerce/components/catalog/FilterPanel.d.ts.map +0 -1
  355. package/dist/ecommerce/components/catalog/Price.d.ts.map +0 -1
  356. package/dist/ecommerce/components/catalog/ProductCard.d.ts.map +0 -1
  357. package/dist/ecommerce/components/catalog/ProductGallery.d.ts.map +0 -1
  358. package/dist/ecommerce/components/catalog/ProductGrid.d.ts.map +0 -1
  359. package/dist/ecommerce/components/catalog/QuantitySelector.d.ts.map +0 -1
  360. package/dist/ecommerce/components/catalog/QuickViewDialog.d.ts.map +0 -1
  361. package/dist/ecommerce/components/catalog/SearchInput.d.ts.map +0 -1
  362. package/dist/ecommerce/components/catalog/VariantSelector.d.ts.map +0 -1
  363. package/dist/ecommerce/components/chat/ShopChatPanel.d.ts.map +0 -1
  364. package/dist/ecommerce/components/checkout/AddressForm.d.ts.map +0 -1
  365. package/dist/ecommerce/components/checkout/CheckoutCancelPage.d.ts.map +0 -1
  366. package/dist/ecommerce/components/checkout/CheckoutForm.d.ts.map +0 -1
  367. package/dist/ecommerce/components/checkout/CheckoutLayout.d.ts.map +0 -1
  368. package/dist/ecommerce/components/checkout/CheckoutReceipt.d.ts.map +0 -1
  369. package/dist/ecommerce/components/checkout/CheckoutSuccessPage.d.ts.map +0 -1
  370. package/dist/ecommerce/components/checkout/InventoryVerificationDialog.d.ts.map +0 -1
  371. package/dist/ecommerce/components/checkout/OrderReview.d.ts.map +0 -1
  372. package/dist/ecommerce/components/checkout/PaymentStep.d.ts.map +0 -1
  373. package/dist/ecommerce/components/checkout/ShippingMethodSelector.d.ts.map +0 -1
  374. package/dist/ecommerce/components/faq/FAQItem.d.ts.map +0 -1
  375. package/dist/ecommerce/components/faq/FAQItem.test.d.ts.map +0 -1
  376. package/dist/ecommerce/components/faq/FAQList.d.ts.map +0 -1
  377. package/dist/ecommerce/components/faq/index.d.ts.map +0 -1
  378. package/dist/ecommerce/components/general/EmptyState.d.ts.map +0 -1
  379. package/dist/ecommerce/components/general/ErrorBoundary.d.ts.map +0 -1
  380. package/dist/ecommerce/components/general/ErrorState.d.ts.map +0 -1
  381. package/dist/ecommerce/components/general/toast.d.ts.map +0 -1
  382. package/dist/ecommerce/components/orders/OrderCard.d.ts.map +0 -1
  383. package/dist/ecommerce/components/orders/OrderDetails.d.ts.map +0 -1
  384. package/dist/ecommerce/components/orders/OrderList.d.ts.map +0 -1
  385. package/dist/ecommerce/components/ui/accordion.d.ts.map +0 -1
  386. package/dist/ecommerce/components/ui/badge.d.ts.map +0 -1
  387. package/dist/ecommerce/components/ui/button.d.ts.map +0 -1
  388. package/dist/ecommerce/components/ui/card.d.ts.map +0 -1
  389. package/dist/ecommerce/components/ui/dialog.d.ts.map +0 -1
  390. package/dist/ecommerce/components/ui/input.d.ts.map +0 -1
  391. package/dist/ecommerce/components/ui/label.d.ts.map +0 -1
  392. package/dist/ecommerce/components/ui/select.d.ts.map +0 -1
  393. package/dist/ecommerce/components/ui/separator.d.ts.map +0 -1
  394. package/dist/ecommerce/components/ui/sheet.d.ts.map +0 -1
  395. package/dist/ecommerce/components/ui/skeleton.d.ts.map +0 -1
  396. package/dist/ecommerce/components/ui/tabs.d.ts.map +0 -1
  397. package/dist/ecommerce/components/ui/textarea.d.ts.map +0 -1
  398. package/dist/ecommerce/config/context.d.ts.map +0 -1
  399. package/dist/ecommerce/config/types.d.ts.map +0 -1
  400. package/dist/ecommerce/hooks/checkoutReturn.d.ts.map +0 -1
  401. package/dist/ecommerce/hooks/useAIRelatedProducts.d.ts.map +0 -1
  402. package/dist/ecommerce/hooks/useCartInventory.d.ts.map +0 -1
  403. package/dist/ecommerce/hooks/useCatalogUrlState.d.ts.map +0 -1
  404. package/dist/ecommerce/hooks/useCategories.d.ts.map +0 -1
  405. package/dist/ecommerce/hooks/useCheckoutResultFromUrl.d.ts.map +0 -1
  406. package/dist/ecommerce/hooks/useHoldExpiry.d.ts.map +0 -1
  407. package/dist/ecommerce/hooks/useInventoryVerification.d.ts.map +0 -1
  408. package/dist/ecommerce/hooks/useOrders.d.ts.map +0 -1
  409. package/dist/ecommerce/hooks/usePaymentMethodsConfig.d.ts.map +0 -1
  410. package/dist/ecommerce/hooks/useProduct.d.ts.map +0 -1
  411. package/dist/ecommerce/hooks/useProducts.d.ts.map +0 -1
  412. package/dist/ecommerce/hooks/useShippingMethods.d.ts.map +0 -1
  413. package/dist/ecommerce/hooks/useStorefrontSettings.d.ts.map +0 -1
  414. package/dist/ecommerce/hooks/useSubscriptionData.d.ts.map +0 -1
  415. package/dist/ecommerce/index.d.ts.map +0 -1
  416. package/dist/ecommerce/integrations/cedros-pay/useCedrosPayCheckoutAdapter.d.ts.map +0 -1
  417. package/dist/ecommerce/state/cart/CartProvider.d.ts.map +0 -1
  418. package/dist/ecommerce/state/cart/cartReducer.d.ts.map +0 -1
  419. package/dist/ecommerce/state/checkout/checkoutSchema.d.ts.map +0 -1
  420. package/dist/ecommerce/state/checkout/useCheckout.d.ts.map +0 -1
  421. package/dist/ecommerce/templates/CartTemplate.d.ts.map +0 -1
  422. package/dist/ecommerce/templates/CategoryTemplate.d.ts.map +0 -1
  423. package/dist/ecommerce/templates/CheckoutTemplate.d.ts.map +0 -1
  424. package/dist/ecommerce/templates/ProductTemplate.d.ts.map +0 -1
  425. package/dist/ecommerce/templates/PurchaseHistoryTemplate.d.ts.map +0 -1
  426. package/dist/ecommerce/templates/ReceiptTemplate.d.ts.map +0 -1
  427. package/dist/ecommerce/templates/ShopTemplate.d.ts.map +0 -1
  428. package/dist/ecommerce/templates/SubscriptionTemplate.d.ts.map +0 -1
  429. package/dist/ecommerce/testing/adapterContract.d.ts.map +0 -1
  430. package/dist/ecommerce/types.d.ts.map +0 -1
  431. package/dist/ecommerce/utils/cartCheckoutRequirements.d.ts.map +0 -1
  432. package/dist/ecommerce/utils/cartItemMetadata.d.ts.map +0 -1
  433. package/dist/ecommerce/utils/cn.d.ts.map +0 -1
  434. package/dist/ecommerce/utils/money.d.ts.map +0 -1
  435. package/dist/ecommerce/utils/storage.d.ts.map +0 -1
  436. package/dist/hooks/useCreditsPayment.d.ts.map +0 -1
  437. package/dist/hooks/useCreditsSubscription.d.ts.map +0 -1
  438. package/dist/hooks/useCryptoSubscription.d.ts.map +0 -1
  439. package/dist/hooks/usePaymentMode.d.ts.map +0 -1
  440. package/dist/hooks/useRefundVerification.d.ts.map +0 -1
  441. package/dist/hooks/useStripeCheckout.d.ts.map +0 -1
  442. package/dist/hooks/useSubscription.d.ts.map +0 -1
  443. package/dist/hooks/useSubscriptionManagement.d.ts.map +0 -1
  444. package/dist/hooks/useX402Payment.d.ts.map +0 -1
  445. package/dist/i18n/index.d.ts.map +0 -1
  446. package/dist/i18n/useTranslation.d.ts.map +0 -1
  447. package/dist/index-B-0trqeD.js +0 -84
  448. package/dist/index.d.ts.map +0 -1
  449. package/dist/managers/CreditsManager.d.ts.map +0 -1
  450. package/dist/managers/ManagerCache.d.ts.map +0 -1
  451. package/dist/managers/RouteDiscoveryManager.d.ts +0 -75
  452. package/dist/managers/RouteDiscoveryManager.d.ts.map +0 -1
  453. package/dist/managers/StripeManager.d.ts.map +0 -1
  454. package/dist/managers/SubscriptionChangeManager.d.ts.map +0 -1
  455. package/dist/managers/SubscriptionManager.d.ts.map +0 -1
  456. package/dist/managers/WalletManager.d.ts.map +0 -1
  457. package/dist/managers/X402Manager.d.ts.map +0 -1
  458. package/dist/sections-CKwGmrzV.js +0 -1
  459. package/dist/sections-DpEdFL1B.mjs +0 -10
  460. package/dist/stripe-only.d.ts.map +0 -1
  461. package/dist/telemetry.d.ts.map +0 -1
  462. package/dist/testing/__tests__/providers.test.d.ts.map +0 -1
  463. package/dist/testing/helpers.d.ts.map +0 -1
  464. package/dist/testing/index.d.ts.map +0 -1
  465. package/dist/testing/mocks.d.ts.map +0 -1
  466. package/dist/testing/providers.d.ts.map +0 -1
  467. package/dist/types/componentOptions.d.ts.map +0 -1
  468. package/dist/types/errors.d.ts.map +0 -1
  469. package/dist/types/index.d.ts.map +0 -1
  470. package/dist/types/subscription.d.ts.map +0 -1
  471. package/dist/utils/__tests__/couponHelpers.test.d.ts.map +0 -1
  472. package/dist/utils/__tests__/cspHelper.test.d.ts.map +0 -1
  473. package/dist/utils/__tests__/fetchWithTimeout.test.d.ts.map +0 -1
  474. package/dist/utils/cartHelpers.d.ts.map +0 -1
  475. package/dist/utils/circuitBreaker.d.ts.map +0 -1
  476. package/dist/utils/couponHelpers.d.ts.map +0 -1
  477. package/dist/utils/cspHelper.d.ts.map +0 -1
  478. package/dist/utils/csvHelpers.d.ts.map +0 -1
  479. package/dist/utils/csvHelpers.test.d.ts.map +0 -1
  480. package/dist/utils/dateHelpers.d.ts.map +0 -1
  481. package/dist/utils/deprecation.d.ts.map +0 -1
  482. package/dist/utils/errorHandling.d.ts.map +0 -1
  483. package/dist/utils/errorMessages.d.ts.map +0 -1
  484. package/dist/utils/errorParser.d.ts.map +0 -1
  485. package/dist/utils/eventEmitter.d.ts.map +0 -1
  486. package/dist/utils/exponentialBackoff.d.ts.map +0 -1
  487. package/dist/utils/fetchWithTimeout.d.ts.map +0 -1
  488. package/dist/utils/index.d.ts.map +0 -1
  489. package/dist/utils/logger.d.ts.map +0 -1
  490. package/dist/utils/modalStyles.d.ts.map +0 -1
  491. package/dist/utils/rateLimiter.d.ts.map +0 -1
  492. package/dist/utils/requestDeduplication.d.ts.map +0 -1
  493. package/dist/utils/securityValidation.d.ts.map +0 -1
  494. package/dist/utils/solanaCheck.d.ts.map +0 -1
  495. package/dist/utils/telemetry.d.ts.map +0 -1
  496. package/dist/utils/tokenMintValidator.d.ts.map +0 -1
  497. package/dist/utils/uuid.d.ts.map +0 -1
  498. package/dist/utils/validateConfig.d.ts.map +0 -1
  499. package/dist/utils/walletDetection.d.ts.map +0 -1
  500. package/dist/utils/walletPool.d.ts.map +0 -1
  501. /package/dist/{admin → src/admin}/index.d.ts +0 -0
  502. /package/dist/{admin → src/admin}/plugin.d.ts +0 -0
  503. /package/dist/{admin → src/admin}/types.d.ts +0 -0
  504. /package/dist/{components → src/components}/CedrosPay.d.ts +0 -0
  505. /package/dist/{components → src/components}/CreditsButton.d.ts +0 -0
  506. /package/dist/{components → src/components}/CreditsSubscribeButton.d.ts +0 -0
  507. /package/dist/{components → src/components}/CryptoButton.d.ts +0 -0
  508. /package/dist/{components → src/components}/CryptoSubscribeButton.d.ts +0 -0
  509. /package/dist/{components → src/components}/PaymentModal.d.ts +0 -0
  510. /package/dist/{components → src/components}/ProductPrice.d.ts +0 -0
  511. /package/dist/{components → src/components}/PurchaseButton.d.ts +0 -0
  512. /package/dist/{components → src/components}/StripeButton.d.ts +0 -0
  513. /package/dist/{components → src/components}/SubscribeButton.d.ts +0 -0
  514. /package/dist/{components → src/components}/SubscriptionManagementPanel.d.ts +0 -0
  515. /package/dist/{components → src/components}/admin/AISettingsSection.d.ts +0 -0
  516. /package/dist/{components → src/components}/admin/AdminAuthManager.d.ts +0 -0
  517. /package/dist/{components → src/components}/admin/AutosaveIndicator.d.ts +0 -0
  518. /package/dist/{components → src/components}/admin/CedrosPayAdminDashboard.d.ts +0 -0
  519. /package/dist/{components → src/components}/admin/ConfigEditor.d.ts +0 -0
  520. /package/dist/{components → src/components}/admin/CouponsSection.d.ts +0 -0
  521. /package/dist/{components → src/components}/admin/Dropdown.d.ts +0 -0
  522. /package/dist/{components → src/components}/admin/ErrorBanner.d.ts +0 -0
  523. /package/dist/{components → src/components}/admin/FAQSection.d.ts +0 -0
  524. /package/dist/{components → src/components}/admin/MessagingSection.d.ts +0 -0
  525. /package/dist/{components → src/components}/admin/OverviewSection.d.ts +0 -0
  526. /package/dist/{components → src/components}/admin/PaymentSettingsSection.d.ts +0 -0
  527. /package/dist/{components → src/components}/admin/ProductVariationsEditor.d.ts +0 -0
  528. /package/dist/{components → src/components}/admin/ProductsSection.d.ts +0 -0
  529. /package/dist/{components → src/components}/admin/RefundsSection.d.ts +0 -0
  530. /package/dist/{components → src/components}/admin/SecretArrayEditor.d.ts +0 -0
  531. /package/dist/{components → src/components}/admin/SettingsSection.d.ts +0 -0
  532. /package/dist/{components → src/components}/admin/SingleCategorySettings.d.ts +0 -0
  533. /package/dist/{components → src/components}/admin/StatsBar.d.ts +0 -0
  534. /package/dist/{components → src/components}/admin/StorefrontSection.d.ts +0 -0
  535. /package/dist/{components → src/components}/admin/SubscriptionsSection.d.ts +0 -0
  536. /package/dist/{components → src/components}/admin/Toggle.d.ts +0 -0
  537. /package/dist/{components → src/components}/admin/TransactionsSection.d.ts +0 -0
  538. /package/dist/{components → src/components}/admin/VariantInventoryGrid.d.ts +0 -0
  539. /package/dist/{components → src/components}/admin/VariationTypeEditor.d.ts +0 -0
  540. /package/dist/{components → src/components}/admin/configApi.d.ts +0 -0
  541. /package/dist/{components → src/components}/admin/icons.d.ts +0 -0
  542. /package/dist/{components → src/components}/admin/sections-more.d.ts +0 -0
  543. /package/dist/{components → src/components}/admin/sections.d.ts +0 -0
  544. /package/dist/{components → src/components}/admin/types.d.ts +0 -0
  545. /package/dist/{components → src/components}/admin/useAutosave.d.ts +0 -0
  546. /package/dist/{components → src/components}/admin/useProductVariations.d.ts +0 -0
  547. /package/dist/{components → src/components}/subscriptionPanelStyles.d.ts +0 -0
  548. /package/dist/{context → src/context}/CedrosContext.d.ts +0 -0
  549. /package/dist/{context → src/context}/ThemeContext.d.ts +0 -0
  550. /package/dist/{context → src/context}/index.d.ts +0 -0
  551. /package/dist/{ecommerce → src/ecommerce}/__tests__/cartCheckoutRequirements.test.d.ts +0 -0
  552. /package/dist/{ecommerce → src/ecommerce}/__tests__/cartProviderPersistence.test.d.ts +0 -0
  553. /package/dist/{ecommerce → src/ecommerce}/__tests__/cartReducer.test.d.ts +0 -0
  554. /package/dist/{ecommerce → src/ecommerce}/__tests__/cartServerMerge.test.d.ts +0 -0
  555. /package/dist/{ecommerce → src/ecommerce}/__tests__/checkoutPaymentMethods.test.d.ts +0 -0
  556. /package/dist/{ecommerce → src/ecommerce}/__tests__/checkoutReturn.test.d.ts +0 -0
  557. /package/dist/{ecommerce → src/ecommerce}/__tests__/checkoutSchema.test.d.ts +0 -0
  558. /package/dist/{ecommerce → src/ecommerce}/__tests__/inventoryHooks.test.d.ts +0 -0
  559. /package/dist/{ecommerce → src/ecommerce}/__tests__/mockAdapter.test.d.ts +0 -0
  560. /package/dist/{ecommerce → src/ecommerce}/__tests__/storage.test.d.ts +0 -0
  561. /package/dist/{ecommerce → src/ecommerce}/adapters/CommerceAdapter.d.ts +0 -0
  562. /package/dist/{ecommerce → src/ecommerce}/adapters/mock/mockAdapter.d.ts +0 -0
  563. /package/dist/{ecommerce → src/ecommerce}/adapters/paywall/paywallAdapter.d.ts +0 -0
  564. /package/dist/{ecommerce → src/ecommerce}/adapters/paywall/paywallAdapter.test.d.ts +0 -0
  565. /package/dist/{ecommerce → src/ecommerce}/components/cart/CartLineItem.d.ts +0 -0
  566. /package/dist/{ecommerce → src/ecommerce}/components/cart/CartPageContent.d.ts +0 -0
  567. /package/dist/{ecommerce → src/ecommerce}/components/cart/CartPanel.d.ts +0 -0
  568. /package/dist/{ecommerce → src/ecommerce}/components/cart/CartSidebar.d.ts +0 -0
  569. /package/dist/{ecommerce → src/ecommerce}/components/cart/CartSummary.d.ts +0 -0
  570. /package/dist/{ecommerce → src/ecommerce}/components/cart/PromoCodeInput.d.ts +0 -0
  571. /package/dist/{ecommerce → src/ecommerce}/components/catalog/Breadcrumbs.d.ts +0 -0
  572. /package/dist/{ecommerce → src/ecommerce}/components/catalog/CategoryNav.d.ts +0 -0
  573. /package/dist/{ecommerce → src/ecommerce}/components/catalog/FilterPanel.d.ts +0 -0
  574. /package/dist/{ecommerce → src/ecommerce}/components/catalog/Price.d.ts +0 -0
  575. /package/dist/{ecommerce → src/ecommerce}/components/catalog/ProductCard.d.ts +0 -0
  576. /package/dist/{ecommerce → src/ecommerce}/components/catalog/ProductGallery.d.ts +0 -0
  577. /package/dist/{ecommerce → src/ecommerce}/components/catalog/ProductGrid.d.ts +0 -0
  578. /package/dist/{ecommerce → src/ecommerce}/components/catalog/QuantitySelector.d.ts +0 -0
  579. /package/dist/{ecommerce → src/ecommerce}/components/catalog/QuickViewDialog.d.ts +0 -0
  580. /package/dist/{ecommerce → src/ecommerce}/components/catalog/SearchInput.d.ts +0 -0
  581. /package/dist/{ecommerce → src/ecommerce}/components/catalog/VariantSelector.d.ts +0 -0
  582. /package/dist/{ecommerce → src/ecommerce}/components/chat/ShopChatPanel.d.ts +0 -0
  583. /package/dist/{ecommerce → src/ecommerce}/components/checkout/AddressForm.d.ts +0 -0
  584. /package/dist/{ecommerce → src/ecommerce}/components/checkout/CheckoutCancelPage.d.ts +0 -0
  585. /package/dist/{ecommerce → src/ecommerce}/components/checkout/CheckoutForm.d.ts +0 -0
  586. /package/dist/{ecommerce → src/ecommerce}/components/checkout/CheckoutLayout.d.ts +0 -0
  587. /package/dist/{ecommerce → src/ecommerce}/components/checkout/CheckoutReceipt.d.ts +0 -0
  588. /package/dist/{ecommerce → src/ecommerce}/components/checkout/CheckoutSuccessPage.d.ts +0 -0
  589. /package/dist/{ecommerce → src/ecommerce}/components/checkout/InventoryVerificationDialog.d.ts +0 -0
  590. /package/dist/{ecommerce → src/ecommerce}/components/checkout/OrderReview.d.ts +0 -0
  591. /package/dist/{ecommerce → src/ecommerce}/components/checkout/PaymentStep.d.ts +0 -0
  592. /package/dist/{ecommerce → src/ecommerce}/components/checkout/ShippingMethodSelector.d.ts +0 -0
  593. /package/dist/{ecommerce → src/ecommerce}/components/faq/FAQItem.d.ts +0 -0
  594. /package/dist/{ecommerce → src/ecommerce}/components/faq/FAQItem.test.d.ts +0 -0
  595. /package/dist/{ecommerce → src/ecommerce}/components/faq/FAQList.d.ts +0 -0
  596. /package/dist/{ecommerce → src/ecommerce}/components/faq/index.d.ts +0 -0
  597. /package/dist/{ecommerce → src/ecommerce}/components/general/EmptyState.d.ts +0 -0
  598. /package/dist/{ecommerce → src/ecommerce}/components/general/ErrorBoundary.d.ts +0 -0
  599. /package/dist/{ecommerce → src/ecommerce}/components/general/ErrorState.d.ts +0 -0
  600. /package/dist/{ecommerce → src/ecommerce}/components/general/toast.d.ts +0 -0
  601. /package/dist/{ecommerce → src/ecommerce}/components/orders/OrderCard.d.ts +0 -0
  602. /package/dist/{ecommerce → src/ecommerce}/components/orders/OrderDetails.d.ts +0 -0
  603. /package/dist/{ecommerce → src/ecommerce}/components/orders/OrderList.d.ts +0 -0
  604. /package/dist/{ecommerce → src/ecommerce}/components/ui/accordion.d.ts +0 -0
  605. /package/dist/{ecommerce → src/ecommerce}/components/ui/badge.d.ts +0 -0
  606. /package/dist/{ecommerce → src/ecommerce}/components/ui/button.d.ts +0 -0
  607. /package/dist/{ecommerce → src/ecommerce}/components/ui/card.d.ts +0 -0
  608. /package/dist/{ecommerce → src/ecommerce}/components/ui/dialog.d.ts +0 -0
  609. /package/dist/{ecommerce → src/ecommerce}/components/ui/input.d.ts +0 -0
  610. /package/dist/{ecommerce → src/ecommerce}/components/ui/label.d.ts +0 -0
  611. /package/dist/{ecommerce → src/ecommerce}/components/ui/select.d.ts +0 -0
  612. /package/dist/{ecommerce → src/ecommerce}/components/ui/separator.d.ts +0 -0
  613. /package/dist/{ecommerce → src/ecommerce}/components/ui/sheet.d.ts +0 -0
  614. /package/dist/{ecommerce → src/ecommerce}/components/ui/skeleton.d.ts +0 -0
  615. /package/dist/{ecommerce → src/ecommerce}/components/ui/tabs.d.ts +0 -0
  616. /package/dist/{ecommerce → src/ecommerce}/components/ui/textarea.d.ts +0 -0
  617. /package/dist/{ecommerce → src/ecommerce}/config/context.d.ts +0 -0
  618. /package/dist/{ecommerce → src/ecommerce}/config/types.d.ts +0 -0
  619. /package/dist/{ecommerce → src/ecommerce}/hooks/checkoutReturn.d.ts +0 -0
  620. /package/dist/{ecommerce → src/ecommerce}/hooks/useAIRelatedProducts.d.ts +0 -0
  621. /package/dist/{ecommerce → src/ecommerce}/hooks/useCartInventory.d.ts +0 -0
  622. /package/dist/{ecommerce → src/ecommerce}/hooks/useCatalogUrlState.d.ts +0 -0
  623. /package/dist/{ecommerce → src/ecommerce}/hooks/useCategories.d.ts +0 -0
  624. /package/dist/{ecommerce → src/ecommerce}/hooks/useCheckoutResultFromUrl.d.ts +0 -0
  625. /package/dist/{ecommerce → src/ecommerce}/hooks/useHoldExpiry.d.ts +0 -0
  626. /package/dist/{ecommerce → src/ecommerce}/hooks/useInventoryVerification.d.ts +0 -0
  627. /package/dist/{ecommerce → src/ecommerce}/hooks/useOrders.d.ts +0 -0
  628. /package/dist/{ecommerce → src/ecommerce}/hooks/usePaymentMethodsConfig.d.ts +0 -0
  629. /package/dist/{ecommerce → src/ecommerce}/hooks/useProduct.d.ts +0 -0
  630. /package/dist/{ecommerce → src/ecommerce}/hooks/useProducts.d.ts +0 -0
  631. /package/dist/{ecommerce → src/ecommerce}/hooks/useShippingMethods.d.ts +0 -0
  632. /package/dist/{ecommerce → src/ecommerce}/hooks/useStorefrontSettings.d.ts +0 -0
  633. /package/dist/{ecommerce → src/ecommerce}/hooks/useSubscriptionData.d.ts +0 -0
  634. /package/dist/{ecommerce → src/ecommerce}/index.d.ts +0 -0
  635. /package/dist/{ecommerce → src/ecommerce}/integrations/cedros-pay/useCedrosPayCheckoutAdapter.d.ts +0 -0
  636. /package/dist/{ecommerce → src/ecommerce}/state/cart/CartProvider.d.ts +0 -0
  637. /package/dist/{ecommerce → src/ecommerce}/state/cart/cartReducer.d.ts +0 -0
  638. /package/dist/{ecommerce → src/ecommerce}/state/checkout/checkoutSchema.d.ts +0 -0
  639. /package/dist/{ecommerce → src/ecommerce}/state/checkout/useCheckout.d.ts +0 -0
  640. /package/dist/{ecommerce → src/ecommerce}/templates/CartTemplate.d.ts +0 -0
  641. /package/dist/{ecommerce → src/ecommerce}/templates/CategoryTemplate.d.ts +0 -0
  642. /package/dist/{ecommerce → src/ecommerce}/templates/CheckoutTemplate.d.ts +0 -0
  643. /package/dist/{ecommerce → src/ecommerce}/templates/ProductTemplate.d.ts +0 -0
  644. /package/dist/{ecommerce → src/ecommerce}/templates/PurchaseHistoryTemplate.d.ts +0 -0
  645. /package/dist/{ecommerce → src/ecommerce}/templates/ReceiptTemplate.d.ts +0 -0
  646. /package/dist/{ecommerce → src/ecommerce}/templates/ShopTemplate.d.ts +0 -0
  647. /package/dist/{ecommerce → src/ecommerce}/templates/SubscriptionTemplate.d.ts +0 -0
  648. /package/dist/{ecommerce → src/ecommerce}/testing/adapterContract.d.ts +0 -0
  649. /package/dist/{ecommerce → src/ecommerce}/types.d.ts +0 -0
  650. /package/dist/{ecommerce → src/ecommerce}/utils/cartCheckoutRequirements.d.ts +0 -0
  651. /package/dist/{ecommerce → src/ecommerce}/utils/cartItemMetadata.d.ts +0 -0
  652. /package/dist/{ecommerce → src/ecommerce}/utils/cn.d.ts +0 -0
  653. /package/dist/{ecommerce → src/ecommerce}/utils/money.d.ts +0 -0
  654. /package/dist/{ecommerce → src/ecommerce}/utils/storage.d.ts +0 -0
  655. /package/dist/{hooks → src/hooks}/useCreditsPayment.d.ts +0 -0
  656. /package/dist/{hooks → src/hooks}/useCreditsSubscription.d.ts +0 -0
  657. /package/dist/{hooks → src/hooks}/useCryptoSubscription.d.ts +0 -0
  658. /package/dist/{hooks → src/hooks}/usePaymentMode.d.ts +0 -0
  659. /package/dist/{hooks → src/hooks}/useRefundVerification.d.ts +0 -0
  660. /package/dist/{hooks → src/hooks}/useStripeCheckout.d.ts +0 -0
  661. /package/dist/{hooks → src/hooks}/useSubscription.d.ts +0 -0
  662. /package/dist/{hooks → src/hooks}/useSubscriptionManagement.d.ts +0 -0
  663. /package/dist/{hooks → src/hooks}/useX402Payment.d.ts +0 -0
  664. /package/dist/{i18n → src/i18n}/index.d.ts +0 -0
  665. /package/dist/{i18n → src/i18n}/useTranslation.d.ts +0 -0
  666. /package/dist/{managers → src/managers}/CreditsManager.d.ts +0 -0
  667. /package/dist/{managers → src/managers}/ManagerCache.d.ts +0 -0
  668. /package/dist/{managers → src/managers}/StripeManager.d.ts +0 -0
  669. /package/dist/{managers → src/managers}/SubscriptionChangeManager.d.ts +0 -0
  670. /package/dist/{managers → src/managers}/SubscriptionManager.d.ts +0 -0
  671. /package/dist/{managers → src/managers}/WalletManager.d.ts +0 -0
  672. /package/dist/{managers → src/managers}/X402Manager.d.ts +0 -0
  673. /package/dist/{testing → src/testing}/__tests__/providers.test.d.ts +0 -0
  674. /package/dist/{testing → src/testing}/helpers.d.ts +0 -0
  675. /package/dist/{testing → src/testing}/mocks.d.ts +0 -0
  676. /package/dist/{testing → src/testing}/providers.d.ts +0 -0
  677. /package/dist/{types → src/types}/componentOptions.d.ts +0 -0
  678. /package/dist/{types → src/types}/errors.d.ts +0 -0
  679. /package/dist/{types → src/types}/index.d.ts +0 -0
  680. /package/dist/{types → src/types}/subscription.d.ts +0 -0
  681. /package/dist/{utils → src/utils}/__tests__/couponHelpers.test.d.ts +0 -0
  682. /package/dist/{utils → src/utils}/__tests__/cspHelper.test.d.ts +0 -0
  683. /package/dist/{utils → src/utils}/__tests__/fetchWithTimeout.test.d.ts +0 -0
  684. /package/dist/{utils → src/utils}/cartHelpers.d.ts +0 -0
  685. /package/dist/{utils → src/utils}/circuitBreaker.d.ts +0 -0
  686. /package/dist/{utils → src/utils}/couponHelpers.d.ts +0 -0
  687. /package/dist/{utils → src/utils}/cspHelper.d.ts +0 -0
  688. /package/dist/{utils → src/utils}/csvHelpers.d.ts +0 -0
  689. /package/dist/{utils → src/utils}/csvHelpers.test.d.ts +0 -0
  690. /package/dist/{utils → src/utils}/dateHelpers.d.ts +0 -0
  691. /package/dist/{utils → src/utils}/deprecation.d.ts +0 -0
  692. /package/dist/{utils → src/utils}/errorHandling.d.ts +0 -0
  693. /package/dist/{utils → src/utils}/errorMessages.d.ts +0 -0
  694. /package/dist/{utils → src/utils}/errorParser.d.ts +0 -0
  695. /package/dist/{utils → src/utils}/eventEmitter.d.ts +0 -0
  696. /package/dist/{utils → src/utils}/exponentialBackoff.d.ts +0 -0
  697. /package/dist/{utils → src/utils}/fetchWithTimeout.d.ts +0 -0
  698. /package/dist/{utils → src/utils}/index.d.ts +0 -0
  699. /package/dist/{utils → src/utils}/logger.d.ts +0 -0
  700. /package/dist/{utils → src/utils}/modalStyles.d.ts +0 -0
  701. /package/dist/{utils → src/utils}/rateLimiter.d.ts +0 -0
  702. /package/dist/{utils → src/utils}/requestDeduplication.d.ts +0 -0
  703. /package/dist/{utils → src/utils}/securityValidation.d.ts +0 -0
  704. /package/dist/{utils → src/utils}/solanaCheck.d.ts +0 -0
  705. /package/dist/{utils → src/utils}/telemetry.d.ts +0 -0
  706. /package/dist/{utils → src/utils}/tokenMintValidator.d.ts +0 -0
  707. /package/dist/{utils → src/utils}/uuid.d.ts +0 -0
  708. /package/dist/{utils → src/utils}/validateConfig.d.ts +0 -0
  709. /package/dist/{utils → src/utils}/walletDetection.d.ts +0 -0
  710. /package/dist/{utils → src/utils}/walletPool.d.ts +0 -0
@@ -1,16 +1,16 @@
1
- import { jsxs as G, jsx as h } from "react/jsx-runtime";
1
+ import { jsxs as O, jsx as h } from "react/jsx-runtime";
2
2
  import { useState as L, useRef as R, useCallback as P, useMemo as Y, useEffect as H } from "react";
3
3
  import { useWallet as be } from "@solana/wallet-adapter-react";
4
4
  import { WalletReadyState as pe } from "@solana/wallet-adapter-base";
5
5
  import { WalletIcon as Te } from "@solana/wallet-adapter-react-ui";
6
- import { u as he, m as Z, i as n, a as Ie } from "./CedrosContext-BnJ2Cf7R.mjs";
7
- import { a3 as Ee, k as We, T as Re, a4 as J, E as _e, F as fe, A as qe, D as ge, y as ze, z as we, B as ee, a5 as Me, a6 as De } from "./index-bbSf3B7-.mjs";
8
- function Fe() {
6
+ import { T as Ie, i as Ee, O as We, U as V, B as Re, D as fe, y as _e, A as ge, w as qe, x as we, z as Z, V as ze, W as Me } from "./styles--eKKnfdj.mjs";
7
+ import { u as he, m as ee, i as n, a as De } from "./CedrosContext-BE6P5PQ0.mjs";
8
+ function $e() {
9
9
  const { x402Manager: g, walletManager: s } = he(), { publicKey: _, signTransaction: q } = be(), [X, d] = L({
10
10
  status: "idle",
11
11
  error: null,
12
12
  transactionId: null
13
- }), [I, k] = L(null), [O, x] = L(null), C = R(_);
13
+ }), [I, k] = L(null), [G, x] = L(null), C = R(_);
14
14
  C.current = _;
15
15
  const w = R(q);
16
16
  w.current = q;
@@ -36,7 +36,7 @@ function Fe() {
36
36
  throw new Error("Invalid requirement received from server");
37
37
  return k(l), d((i) => ({ ...i, status: "idle" })), l;
38
38
  } catch (l) {
39
- const i = Z(l, "Failed to fetch requirement");
39
+ const i = ee(l, "Failed to fetch requirement");
40
40
  throw d({
41
41
  status: "error",
42
42
  error: i,
@@ -69,7 +69,7 @@ function Fe() {
69
69
  blockhash: D
70
70
  });
71
71
  n().debug("[useX402Payment] Submitting partial transaction");
72
- const F = await g.submitGaslessTransaction({
72
+ const $ = await g.submitGaslessTransaction({
73
73
  resource: l,
74
74
  partialTx: T,
75
75
  couponCode: i,
@@ -77,7 +77,7 @@ function Fe() {
77
77
  resourceType: r,
78
78
  requirement: o
79
79
  });
80
- return F.success && F.settlement && x(F.settlement), F;
80
+ return $.success && $.settlement && x($.settlement), $;
81
81
  } else {
82
82
  const f = await s.buildTransaction({
83
83
  requirement: o,
@@ -132,7 +132,7 @@ function Fe() {
132
132
  transactionId: null
133
133
  }), a;
134
134
  } catch (r) {
135
- const a = Z(r, "Payment failed");
135
+ const a = ee(r, "Payment failed");
136
136
  return d({
137
137
  status: "error",
138
138
  error: a,
@@ -156,7 +156,7 @@ function Fe() {
156
156
  transactionId: null
157
157
  });
158
158
  try {
159
- const r = Ee(o), a = await g.requestCartQuote({
159
+ const r = Ie(o), a = await g.requestCartQuote({
160
160
  items: r,
161
161
  metadata: l,
162
162
  couponCode: i
@@ -175,7 +175,7 @@ function Fe() {
175
175
  transactionId: null
176
176
  }), f;
177
177
  } catch (r) {
178
- const a = Z(r, "Cart payment failed");
178
+ const a = ee(r, "Cart payment failed");
179
179
  return d({
180
180
  status: "error",
181
181
  error: a,
@@ -196,14 +196,14 @@ function Fe() {
196
196
  return {
197
197
  ...X,
198
198
  requirement: I,
199
- settlement: O,
199
+ settlement: G,
200
200
  fetchQuote: z,
201
201
  processPayment: p,
202
202
  processCartPayment: M,
203
203
  reset: W
204
204
  };
205
205
  }
206
- function $e({
206
+ function Fe({
207
207
  resource: g,
208
208
  items: s,
209
209
  label: _,
@@ -212,16 +212,16 @@ function $e({
212
212
  onSuccess: d,
213
213
  onError: I,
214
214
  className: k = "",
215
- testPageUrl: O,
215
+ testPageUrl: G,
216
216
  hideMessages: x = !1,
217
217
  metadata: C,
218
218
  couponCode: w
219
219
  }) {
220
- const { connected: u, connecting: K, connect: E, disconnect: v, select: z, wallets: B, wallet: p, publicKey: M } = be(), { status: W, error: o, transactionId: l, processPayment: i, processCartPayment: b } = Fe(), r = Ie(), { solanaError: a } = he(), { isCartMode: y, effectiveResource: c } = We(g, s), { t: f, translations: D } = Re(), A = _ || f("ui.pay_with_crypto"), T = o && typeof o != "string" ? o?.code ?? null : null, F = a && typeof a != "string" ? a?.code ?? null : null, te = (e) => {
220
+ const { connected: u, connecting: K, connect: E, disconnect: v, select: z, wallets: B, wallet: p, publicKey: M } = be(), { status: W, error: o, transactionId: l, processPayment: i, processCartPayment: b } = $e(), r = De(), { solanaError: a } = he(), { isCartMode: y, effectiveResource: c } = Ee(g, s), { t: f, translations: D } = We(), A = _ || f("ui.pay_with_crypto"), T = o && typeof o != "string" ? o?.code ?? null : null, $ = a && typeof a != "string" ? a?.code ?? null : null, te = (e) => {
221
221
  if (!e || !D) return "";
222
222
  const t = D.errors[e];
223
223
  return t ? t.action ? `${t.message} ${t.action}` : t.message : "";
224
- }, re = o ? typeof o == "string" ? o : te(T) : null, ne = a ? typeof a == "string" ? a : te(F) : null, oe = R(d), ae = R(I), se = R(i), le = R(b);
224
+ }, re = o ? typeof o == "string" ? o : te(T) : null, ne = a ? typeof a == "string" ? a : te($) : null, oe = R(d), ae = R(I), se = R(i), le = R(b);
225
225
  oe.current = d, ae.current = I, se.current = i, le.current = b;
226
226
  const Ce = Y(
227
227
  () => B.map((e) => `${e.adapter.name}-${e.readyState}`).join(","),
@@ -236,28 +236,28 @@ function $e({
236
236
  );
237
237
  H(() => {
238
238
  if (W === "success" && l) {
239
- const e = y && s ? J(s) : void 0;
240
- _e("crypto", l, c, e), oe.current?.(l);
239
+ const e = y && s ? V(s) : void 0;
240
+ Re("crypto", l, c, e), oe.current?.(l);
241
241
  }
242
242
  }, [W, l, y, s, c]), H(() => {
243
243
  if (W === "error" && o) {
244
- const e = y && s ? J(s) : void 0;
244
+ const e = y && s ? V(s) : void 0;
245
245
  fe("crypto", o, c, e), ae.current?.(o);
246
246
  }
247
247
  }, [W, o, y, s, c]);
248
- const ce = typeof window < "u" && window.top !== window.self, [ie, $] = L(!1), [ue, V] = L(!1), [N, S] = L(null), j = a;
248
+ const ce = typeof window < "u" && window.top !== window.self, [ie, F] = L(!1), [ue, J] = L(!1), [N, S] = L(null), j = a;
249
249
  H(() => {
250
250
  let e = !1;
251
251
  return e || (async () => {
252
252
  if (ue && p && !u && !K) {
253
- n().debug("[CryptoButton] Wallet detected, attempting auto-connect:", p.adapter.name), V(!1), we(p.adapter.name);
253
+ n().debug("[CryptoButton] Wallet detected, attempting auto-connect:", p.adapter.name), J(!1), we(p.adapter.name);
254
254
  try {
255
255
  await E(), e || n().debug("[CryptoButton] Auto-connect successful");
256
256
  } catch (m) {
257
257
  if (!e) {
258
258
  n().error("[CryptoButton] Auto-connect failed:", m);
259
259
  const U = m instanceof Error ? m.message : "Failed to connect wallet";
260
- ee(U, p.adapter.name), S(null);
260
+ Z(U, p.adapter.name), S(null);
261
261
  }
262
262
  }
263
263
  }
@@ -272,10 +272,10 @@ function $e({
272
272
  hasPublicKey: !!M,
273
273
  pendingPaymentType: N?.type
274
274
  }), u && N && M && p && e) {
275
- qe(p.adapter.name, M.toString()), n().debug("[CryptoButton] All conditions met! Processing pending payment:", N);
275
+ _e(p.adapter.name, M.toString()), n().debug("[CryptoButton] All conditions met! Processing pending payment:", N);
276
276
  const t = N;
277
- S(null), $(!1);
278
- const m = t.type === "cart" && t.items ? J(t.items) : void 0;
277
+ S(null), F(!1);
278
+ const m = t.type === "cart" && t.items ? V(t.items) : void 0;
279
279
  ge("crypto", t.resource, m), t.type === "cart" && t.items ? (n().debug("[CryptoButton] Auto-processing cart payment"), le.current(t.items, t.metadata, t.couponCode)) : t.type === "single" && t.resource && (n().debug("[CryptoButton] Auto-processing single payment"), se.current(t.resource, t.couponCode, t.metadata));
280
280
  }
281
281
  return () => {
@@ -291,13 +291,13 @@ function $e({
291
291
  hasItems: !!s,
292
292
  effectiveResource: c
293
293
  });
294
- const e = y && s ? J(s) : void 0;
295
- if (ze("crypto", c, e), X && X("crypto"), j) {
294
+ const e = y && s ? V(s) : void 0;
295
+ if (qe("crypto", c, e), X && X("crypto"), j) {
296
296
  n().error("[CryptoButton] Solana dependencies missing:", j), fe("crypto", j, c, e), I && I(j);
297
297
  return;
298
298
  }
299
299
  if (ce) {
300
- const t = O || window.location.href;
300
+ const t = G || window.location.href;
301
301
  try {
302
302
  if (new URL(t, window.location.origin).origin !== window.location.origin)
303
303
  throw n().error("[CryptoButton] Blocked attempt to open external URL:", t), new Error("Cannot open external URLs from embedded context");
@@ -325,18 +325,18 @@ function $e({
325
325
  ), Q.length === 0) {
326
326
  S(null);
327
327
  const m = "No wallets available";
328
- throw ee(m), new Error(m);
328
+ throw Z(m), new Error(m);
329
329
  }
330
- $(!0);
330
+ F(!0);
331
331
  }
332
332
  } catch (m) {
333
333
  S(null);
334
334
  const U = m instanceof Error ? m.message : "Failed to connect wallet";
335
- n().error("[CryptoButton] Connection error:", U), ee(U, p?.adapter.name);
335
+ n().error("[CryptoButton] Connection error:", U), Z(U, p?.adapter.name);
336
336
  }
337
337
  }
338
- }, [u, p, w, y, s, c, ce, O, Q, E, C, b, i, j, X, I]), ye = Y(() => y && s ? `crypto-cart-${s.map((e) => e.resource).join("-")}` : `crypto-${c || "unknown"}`, [y, s, c]), Pe = Y(
339
- () => Me(ye, de, {
338
+ }, [u, p, w, y, s, c, ce, G, Q, E, C, b, i, j, X, I]), ye = Y(() => y && s ? `crypto-cart-${s.map((e) => e.resource).join("-")}` : `crypto-${c || "unknown"}`, [y, s, c]), Pe = Y(
339
+ () => ze(ye, de, {
340
340
  cooldownMs: 200,
341
341
  deduplicationWindowMs: 0
342
342
  // MUST be 0 for crypto - each payment needs fresh transaction
@@ -344,12 +344,12 @@ function $e({
344
344
  [ye, de]
345
345
  ), me = W === "loading", xe = q || me || K || !!j, ve = me ? f("ui.processing") : A, Se = P(async () => {
346
346
  try {
347
- V(!1), u && await v(), z(null), $(!0);
347
+ J(!1), u && await v(), z(null), F(!0);
348
348
  } catch (e) {
349
349
  n().error("Failed to change wallet:", e);
350
350
  }
351
351
  }, [u, v, z]), ke = P((e) => {
352
- n().debug("[CryptoButton] Wallet clicked:", e), $(!1), z(e), V(!0), n().debug("[CryptoButton] Wallet selected, useEffect will auto-connect");
352
+ n().debug("[CryptoButton] Wallet clicked:", e), F(!1), z(e), J(!0), n().debug("[CryptoButton] Wallet selected, useEffect will auto-connect");
353
353
  }, [z]), Be = P(async () => {
354
354
  try {
355
355
  if (await v(), S(null), typeof window < "u" && window.localStorage)
@@ -362,7 +362,7 @@ function $e({
362
362
  n().error("Failed to disconnect wallet:", e);
363
363
  }
364
364
  }, [v]);
365
- return /* @__PURE__ */ G("div", { className: r.unstyled ? k : `${r.className} cedros-theme__crypto-button ${k || ""}`, style: r.unstyled ? {} : r.style, children: [
365
+ return /* @__PURE__ */ O("div", { className: r.unstyled ? k : `${r.className} cedros-theme__crypto-button ${k || ""}`, style: r.unstyled ? {} : r.style, children: [
366
366
  /* @__PURE__ */ h(
367
367
  "button",
368
368
  {
@@ -391,9 +391,9 @@ function $e({
391
391
  padding: "1rem"
392
392
  },
393
393
  onClick: () => {
394
- $(!1), S(null);
394
+ F(!1), S(null);
395
395
  },
396
- children: /* @__PURE__ */ G(
396
+ children: /* @__PURE__ */ O(
397
397
  "div",
398
398
  {
399
399
  className: "cedros-modal-content",
@@ -408,7 +408,7 @@ function $e({
408
408
  },
409
409
  onClick: (e) => e.stopPropagation(),
410
410
  children: [
411
- /* @__PURE__ */ G(
411
+ /* @__PURE__ */ O(
412
412
  "div",
413
413
  {
414
414
  style: {
@@ -434,9 +434,9 @@ function $e({
434
434
  "button",
435
435
  {
436
436
  onClick: () => {
437
- $(!1), S(null);
437
+ F(!1), S(null);
438
438
  },
439
- style: De(r.tokens.surfaceText),
439
+ style: Me(r.tokens.surfaceText),
440
440
  "aria-label": "Close modal",
441
441
  type: "button",
442
442
  children: "×"
@@ -445,7 +445,7 @@ function $e({
445
445
  ]
446
446
  }
447
447
  ),
448
- /* @__PURE__ */ h("div", { style: { display: "flex", flexDirection: "column", gap: "0.75rem" }, children: Q.map((e) => /* @__PURE__ */ G(
448
+ /* @__PURE__ */ h("div", { style: { display: "flex", flexDirection: "column", gap: "0.75rem" }, children: Q.map((e) => /* @__PURE__ */ O(
449
449
  "button",
450
450
  {
451
451
  onClick: () => ke(e.adapter.name),
@@ -483,7 +483,7 @@ function $e({
483
483
  )
484
484
  }
485
485
  ),
486
- u && !x && !ie && /* @__PURE__ */ G("div", { style: {
486
+ u && !x && !ie && /* @__PURE__ */ O("div", { style: {
487
487
  display: "flex",
488
488
  justifyContent: "space-between",
489
489
  marginTop: "0.5rem",
@@ -531,12 +531,12 @@ function $e({
531
531
  !x && l && /* @__PURE__ */ h("div", { className: r.unstyled ? "" : "cedros-theme__success", children: f("ui.payment_successful") })
532
532
  ] });
533
533
  }
534
- const Oe = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
534
+ const Ge = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
535
535
  __proto__: null,
536
- CryptoButton: $e
536
+ CryptoButton: Fe
537
537
  }, Symbol.toStringTag, { value: "Module" }));
538
538
  export {
539
- $e as C,
540
- Oe as a,
541
- Fe as u
539
+ Fe as C,
540
+ Ge as a,
541
+ $e as u
542
542
  };
@@ -0,0 +1 @@
1
+ "use strict";const p=require("react/jsx-runtime"),a=require("react"),ce=require("@solana/wallet-adapter-react"),le=require("@solana/wallet-adapter-base"),be=require("@solana/wallet-adapter-react-ui"),i=require("./styles-BWrLnaUW.js"),t=require("./CedrosContext-D-lnoEkR.js");function ie(){const{x402Manager:C,walletManager:l}=t.useCedrosContext(),{publicKey:W,signTransaction:j}=ce.useWallet(),[N,y]=a.useState({status:"idle",error:null,transactionId:null}),[R,L]=a.useState(null),[K,k]=a.useState(null),P=a.useRef(W);P.current=W;const h=a.useRef(j);h.current=j;const g=a.useRef(0),X=6e4,I=()=>{const o=g.current;return o>0&&Date.now()-o<X},S=a.useCallback(()=>{if(!W){const o="Wallet not connected";return y({status:"error",error:o,transactionId:null}),{valid:!1,error:o}}if(!j){const o="Wallet does not support signing";return y({status:"error",error:o,transactionId:null}),{valid:!1,error:o}}return{valid:!0}},[W,j]),q=a.useCallback(async o=>{try{y(d=>({...d,status:"loading"}));const c=await C.requestQuote({resource:o});if(!C.validateRequirement(c))throw new Error("Invalid requirement received from server");return L(c),y(d=>({...d,status:"idle"})),c}catch(c){const d=t.formatError(c,"Failed to fetch requirement");throw y({status:"error",error:d,transactionId:null}),c}},[C]),B=a.useCallback(async(o,c,d,x,n="regular")=>{const s=P.current,m=h.current;if(!s||!m)throw new Error("Wallet disconnected during payment flow");if(!!o.extra?.feePayer){t.getLogger().debug("[useX402Payment] Gasless flow enabled"),t.getLogger().debug("[useX402Payment] Building gasless transaction");const{transaction:b,blockhash:M}=await C.buildGaslessTransaction({resourceId:c,userWallet:s.toString(),feePayer:o.extra.feePayer,couponCode:d});t.getLogger().debug("[useX402Payment] Deserializing backend transaction");const A=l.deserializeTransaction(b);if(P.current?.toString()!==s.toString())throw new Error("Wallet changed during payment flow");t.getLogger().debug("[useX402Payment] Requesting partial signature");const E=await l.partiallySignTransaction({transaction:A,signTransaction:m,blockhash:M});t.getLogger().debug("[useX402Payment] Submitting partial transaction");const z=await C.submitGaslessTransaction({resource:c,partialTx:E,couponCode:d,metadata:x,resourceType:n,requirement:o});return z.success&&z.settlement&&k(z.settlement),z}else{const b=await l.buildTransaction({requirement:o,payerPublicKey:s});if(P.current?.toString()!==s.toString())throw new Error("Wallet changed during payment flow");const M=await l.signTransaction({transaction:b,signTransaction:m}),A=l.buildPaymentPayload({requirement:o,signedTx:M,payerPublicKey:s}),E=await C.submitPayment({resource:c,payload:A,couponCode:d,metadata:x,resourceType:n});return E.success&&E.settlement&&k(E.settlement),E}},[C,l]),w=a.useCallback(async(o,c,d)=>{if(I())return{success:!1,error:"Payment already in progress"};const x=S();if(!x.valid)return{success:!1,error:x.error};g.current=Date.now(),y({status:"loading",error:null,transactionId:null});try{t.getLogger().debug("[useX402Payment] Fetching fresh quote");const n=await C.requestQuote({resource:o,couponCode:c});t.getLogger().debug("[useX402Payment] Received quote",{amount:n.maxAmountRequired}),L(n),t.getLogger().debug("[useX402Payment] Executing payment flow");const s=await B(n,o,c,d,"regular");return s.success?y({status:"success",error:null,transactionId:s.transactionId||"payment-success"}):y({status:"error",error:s.error||"Payment failed",transactionId:null}),s}catch(n){const s=t.formatError(n,"Payment failed");return y({status:"error",error:s,transactionId:null}),{success:!1,error:s}}finally{g.current=0}},[S,C,B]),_=a.useCallback(async(o,c,d)=>{if(I())return{success:!1,error:"Payment already in progress"};const x=S();if(!x.valid)return{success:!1,error:x.error};g.current=Date.now(),y({status:"loading",error:null,transactionId:null});try{const n=i.normalizeCartItems(o),s=await C.requestCartQuote({items:n,metadata:c,couponCode:d}),m=s.cartId,u=s.quote;if(!C.validateRequirement(u))throw new Error("Invalid cart quote received from server");L(u);const b=await B(u,m,d,c,"cart");return b.success?y({status:"success",error:null,transactionId:b.transactionId||"cart-payment-success"}):y({status:"error",error:b.error||"Cart payment failed",transactionId:null}),b}catch(n){const s=t.formatError(n,"Cart payment failed");return y({status:"error",error:s,transactionId:null}),{success:!1,error:s}}finally{g.current=0}},[S,C,B]),T=a.useCallback(()=>{y({status:"idle",error:null,transactionId:null}),L(null),k(null),g.current=0},[]);return{...N,requirement:R,settlement:K,fetchQuote:q,processPayment:w,processCartPayment:_,reset:T}}function ue({resource:C,items:l,label:W,disabled:j=!1,onAttempt:N,onSuccess:y,onError:R,className:L="",testPageUrl:K,hideMessages:k=!1,metadata:P,couponCode:h}){const{connected:g,connecting:X,connect:I,disconnect:S,select:q,wallets:B,wallet:w,publicKey:_}=ce.useWallet(),{status:T,error:o,transactionId:c,processPayment:d,processCartPayment:x}=ie(),n=t.useCedrosTheme(),{solanaError:s}=t.useCedrosContext(),{isCartMode:m,effectiveResource:u}=i.usePaymentMode(C,l),{t:b,translations:M}=i.useTranslation(),A=W||b("ui.pay_with_crypto"),E=o&&typeof o!="string"?o?.code??null:null,z=s&&typeof s!="string"?s?.code??null:null,U=e=>{if(!e||!M)return"";const r=M.errors[e];return r?r.action?`${r.message} ${r.action}`:r.message:""},Y=o?typeof o=="string"?o:U(E):null,H=s?typeof s=="string"?s:U(z):null,J=a.useRef(y),V=a.useRef(R),Z=a.useRef(d),ee=a.useRef(x);J.current=y,V.current=R,Z.current=d,ee.current=x;const de=a.useMemo(()=>B.map(e=>`${e.adapter.name}-${e.readyState}`).join(","),[B]),G=a.useMemo(()=>B.filter(({readyState:e})=>e===le.WalletReadyState.Installed||e===le.WalletReadyState.Loadable),[de]);a.useEffect(()=>{if(T==="success"&&c){const e=m&&l?i.getCartItemCount(l):void 0;i.emitPaymentSuccess("crypto",c,u,e),J.current?.(c)}},[T,c,m,l,u]),a.useEffect(()=>{if(T==="error"&&o){const e=m&&l?i.getCartItemCount(l):void 0;i.emitPaymentError("crypto",o,u,e),V.current?.(o)}},[T,o,m,l,u]);const te=typeof window<"u"&&window.top!==window.self,[re,$]=a.useState(!1),[ne,Q]=a.useState(!1),[D,v]=a.useState(null),F=s;a.useEffect(()=>{let e=!1;return e||(async()=>{if(ne&&w&&!g&&!X){t.getLogger().debug("[CryptoButton] Wallet detected, attempting auto-connect:",w.adapter.name),Q(!1),i.emitWalletConnect(w.adapter.name);try{await I(),e||t.getLogger().debug("[CryptoButton] Auto-connect successful")}catch(f){if(!e){t.getLogger().error("[CryptoButton] Auto-connect failed:",f);const O=f instanceof Error?f.message:"Failed to connect wallet";i.emitWalletError(O,w.adapter.name),v(null)}}}})(),()=>{e=!0}},[w,ne,g,X,I]),a.useEffect(()=>{let e=!0;if(t.getLogger().debug("[CryptoButton] Payment useEffect triggered",{connected:g,hasPendingPayment:!!D,hasPublicKey:!!_,pendingPaymentType:D?.type}),g&&D&&_&&w&&e){i.emitWalletConnected(w.adapter.name,_.toString()),t.getLogger().debug("[CryptoButton] All conditions met! Processing pending payment:",D);const r=D;v(null),$(!1);const f=r.type==="cart"&&r.items?i.getCartItemCount(r.items):void 0;i.emitPaymentProcessing("crypto",r.resource,f),r.type==="cart"&&r.items?(t.getLogger().debug("[CryptoButton] Auto-processing cart payment"),ee.current(r.items,r.metadata,r.couponCode)):r.type==="single"&&r.resource&&(t.getLogger().debug("[CryptoButton] Auto-processing single payment"),Z.current(r.resource,r.couponCode,r.metadata))}return()=>{e=!1}},[g,D,_,w]);const oe=a.useCallback(async()=>{t.getLogger().debug("[CryptoButton] executePaymentFlow called",{connected:g,wallet:w?.adapter.name,couponCode:h,isCartMode:m,hasItems:!!l,effectiveResource:u});const e=m&&l?i.getCartItemCount(l):void 0;if(i.emitPaymentStart("crypto",u,e),N&&N("crypto"),F){t.getLogger().error("[CryptoButton] Solana dependencies missing:",F),i.emitPaymentError("crypto",F,u,e),R&&R(F);return}if(te){const r=K||window.location.href;try{if(new URL(r,window.location.origin).origin!==window.location.origin)throw t.getLogger().error("[CryptoButton] Blocked attempt to open external URL:",r),new Error("Cannot open external URLs from embedded context");window.open(r,"_blank","noopener,noreferrer")}catch(f){throw t.getLogger().error("[CryptoButton] URL validation failed:",f),f}return}if(g)i.emitPaymentProcessing("crypto",u,e),m&&l?(t.getLogger().debug("[CryptoButton] Processing cart payment with coupon:",h),await x(l,P,h)):u&&(t.getLogger().debug("[CryptoButton] Processing single payment with coupon:",h),await d(u,h,P));else{let r=!1;if(m&&l?(t.getLogger().debug("[CryptoButton] Setting pending cart payment with coupon:",h),v({type:"cart",items:l,metadata:P,couponCode:h}),r=!0):u&&(t.getLogger().debug("[CryptoButton] Setting pending single payment with coupon:",h),v({type:"single",resource:u,metadata:P,couponCode:h}),r=!0),!r){t.getLogger().error("[CryptoButton] No valid payment to process");return}try{if(w)t.getLogger().debug("[CryptoButton] Wallet already selected, connecting:",w.adapter.name),i.emitWalletConnect(w.adapter.name),await I();else{if(t.getLogger().debug("[CryptoButton] No wallet selected, showing selector. Available wallets:",G.map(f=>f.adapter.name)),G.length===0){v(null);const f="No wallets available";throw i.emitWalletError(f),new Error(f)}$(!0)}}catch(f){v(null);const O=f instanceof Error?f.message:"Failed to connect wallet";t.getLogger().error("[CryptoButton] Connection error:",O),i.emitWalletError(O,w?.adapter.name)}}},[g,w,h,m,l,u,te,K,G,I,P,x,d,F,N,R]),ae=a.useMemo(()=>m&&l?`crypto-cart-${l.map(e=>e.resource).join("-")}`:`crypto-${u||"unknown"}`,[m,l,u]),ge=a.useMemo(()=>i.createDedupedClickHandler(ae,oe,{cooldownMs:200,deduplicationWindowMs:0}),[ae,oe]),se=T==="loading",ye=j||se||X||!!F,me=se?b("ui.processing"):A,fe=a.useCallback(async()=>{try{Q(!1),g&&await S(),q(null),$(!0)}catch(e){t.getLogger().error("Failed to change wallet:",e)}},[g,S,q]),pe=a.useCallback(e=>{t.getLogger().debug("[CryptoButton] Wallet clicked:",e),$(!1),q(e),Q(!0),t.getLogger().debug("[CryptoButton] Wallet selected, useEffect will auto-connect")},[q]),we=a.useCallback(async()=>{try{if(await S(),v(null),typeof window<"u"&&window.localStorage)try{window.localStorage.removeItem("walletName")}catch(e){e instanceof Error&&e.name==="QuotaExceededError"?t.getLogger().warn("localStorage quota exceeded when removing wallet preference"):t.getLogger().error("Failed to clear wallet preference from localStorage:",e)}}catch(e){t.getLogger().error("Failed to disconnect wallet:",e)}},[S]);return p.jsxs("div",{className:n.unstyled?L:`${n.className} cedros-theme__crypto-button ${L||""}`,style:n.unstyled?{}:n.style,children:[p.jsx("button",{onClick:ge,disabled:ye,className:n.unstyled?L:"cedros-theme__button cedros-theme__crypto",type:"button",children:me}),re&&!k&&p.jsx("div",{className:"cedros-modal-overlay",style:{position:"fixed",top:0,left:0,right:0,bottom:0,backgroundColor:n.tokens.modalOverlay,display:"flex",alignItems:"center",justifyContent:"center",zIndex:9999,padding:"1rem"},onClick:()=>{$(!1),v(null)},children:p.jsxs("div",{className:"cedros-modal-content",style:{backgroundColor:n.tokens.modalBackground,borderRadius:"12px",padding:"2rem",maxWidth:"400px",width:"100%",boxShadow:"0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04)",border:`1px solid ${n.tokens.modalBorder}`},onClick:e=>e.stopPropagation(),children:[p.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:"1.5rem"},children:[p.jsx("h3",{style:{margin:0,fontSize:"1.25rem",fontWeight:600,color:n.tokens.surfaceText},children:b("wallet.select_wallet")}),p.jsx("button",{onClick:()=>{$(!1),v(null)},style:i.getModalCloseButtonStyles(n.tokens.surfaceText),"aria-label":"Close modal",type:"button",children:"×"})]}),p.jsx("div",{style:{display:"flex",flexDirection:"column",gap:"0.75rem"},children:G.map(e=>p.jsxs("button",{onClick:()=>pe(e.adapter.name),style:{width:"100%",padding:"1rem",backgroundColor:n.tokens.surfaceBackground,border:`1px solid ${n.tokens.surfaceBorder}`,borderRadius:"0.5rem",cursor:"pointer",fontSize:"1rem",textAlign:"left",color:n.tokens.surfaceText,display:"flex",alignItems:"center",gap:"1rem",transition:"all 0.2s ease"},onMouseEnter:r=>{r.currentTarget.style.backgroundColor=n.tokens.modalBackground,r.currentTarget.style.borderColor=n.tokens.surfaceText,r.currentTarget.style.transform="translateY(-2px)"},onMouseLeave:r=>{r.currentTarget.style.backgroundColor=n.tokens.surfaceBackground,r.currentTarget.style.borderColor=n.tokens.surfaceBorder,r.currentTarget.style.transform="translateY(0)"},type:"button",children:[p.jsx(be.WalletIcon,{wallet:e,style:{width:"24px",height:"24px"}}),p.jsx("span",{style:{fontWeight:500},children:e.adapter.name})]},e.adapter.name))})]})}),g&&!k&&!re&&p.jsxs("div",{style:{display:"flex",justifyContent:"space-between",marginTop:"0.5rem",fontSize:"0.75rem",color:n.tokens.surfaceText,opacity:.7},children:[p.jsx("button",{onClick:fe,style:{background:"none",border:"none",padding:0,color:"inherit",textDecoration:"none",cursor:"pointer",fontSize:"inherit"},type:"button",children:b("wallet.change")}),p.jsx("button",{onClick:we,style:{background:"none",border:"none",padding:0,color:"inherit",textDecoration:"none",cursor:"pointer",fontSize:"inherit"},type:"button",children:b("ui.disconnect")})]}),!k&&H&&p.jsx("div",{className:n.unstyled?"":"cedros-theme__error",children:H}),!k&&Y&&p.jsx("div",{className:n.unstyled?"":"cedros-theme__error",children:Y}),!k&&c&&p.jsx("div",{className:n.unstyled?"":"cedros-theme__success",children:b("ui.payment_successful")})]})}const Ce=Object.freeze(Object.defineProperty({__proto__:null,CryptoButton:ue},Symbol.toStringTag,{value:"Module"}));exports.CryptoButton=ue;exports.CryptoButton$1=Ce;exports.useX402Payment=ie;
@@ -1,8 +1,8 @@
1
1
  import { jsxs as a, jsx as t } from "react/jsx-runtime";
2
2
  import { useState as r, useCallback as R, useEffect as V, useMemo as G } from "react";
3
- import { a0 as H, a1 as Y, $ as l } from "./index-bbSf3B7-.mjs";
3
+ import { E as H, b as Y, I as l } from "./index-75RhiLDq.mjs";
4
4
  function M({ serverUrl: u, apiKey: d, pageSize: A = 20, authManager: o }) {
5
- const [_, F] = r([]), [$, C] = r(!0), [S, N] = r(!1), [v, k] = r(null), [Q, I] = r(!1), [y, E] = r(""), [f, x] = r("all"), [q, w] = r(null), [T, b] = r(null), [n, m] = r({
5
+ const [_, F] = r([]), [E, C] = r(!0), [S, N] = r(!1), [v, k] = r(null), [Q, I] = r(!1), [y, $] = r(""), [f, x] = r("all"), [q, w] = r(null), [T, b] = r(null), [n, m] = r({
6
6
  question: "",
7
7
  answer: "",
8
8
  keywordsCsv: "",
@@ -161,7 +161,7 @@ function M({ serverUrl: u, apiKey: d, pageSize: A = 20, authManager: o }) {
161
161
  type: "text",
162
162
  placeholder: "Search FAQs...",
163
163
  value: y,
164
- onChange: (e) => E(e.target.value),
164
+ onChange: (e) => $(e.target.value),
165
165
  className: "cedros-admin__input",
166
166
  style: { flex: 1, maxWidth: 300 }
167
167
  }
@@ -283,7 +283,7 @@ function M({ serverUrl: u, apiKey: d, pageSize: A = 20, authManager: o }) {
283
283
  )
284
284
  ] })
285
285
  ] }) }),
286
- $ ? /* @__PURE__ */ a("div", { className: "cedros-admin__loading", children: [
286
+ E ? /* @__PURE__ */ a("div", { className: "cedros-admin__loading", children: [
287
287
  l.loading,
288
288
  /* @__PURE__ */ t("span", { children: "Loading FAQs..." })
289
289
  ] }) : P.length === 0 ? /* @__PURE__ */ t("div", { className: "cedros-admin__empty", children: /* @__PURE__ */ t("p", { children: y || f !== "all" ? "No FAQs match your filters." : "No FAQs yet. Add one to get started." }) }) : /* @__PURE__ */ t("div", { className: "cedros-admin__faq-list", children: P.map((e) => /* @__PURE__ */ a(
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),c=require("react"),d=require("./index-B-0trqeD.js");function R({serverUrl:h,apiKey:o,pageSize:g=20,authManager:r}){const[u,N]=c.useState([]),[Q,w]=c.useState(!0),[S,f]=c.useState(!1),[p,A]=c.useState(null),[F,C]=c.useState(!1),[x,P]=c.useState(""),[v,O]=c.useState("all"),[q,b]=c.useState(null),[$,j]=c.useState(null),[n,l]=c.useState({question:"",answer:"",keywordsCsv:"",active:!0,useInChat:!0,displayOnPage:!0}),_=c.useCallback(async()=>{w(!0);try{j(null);let s;const t=`/admin/faqs?limit=${g}`;if(r?.isAuthenticated())s=await r.fetchWithAuth(t);else{const i={"Content-Type":"application/json"};o&&(i["X-API-Key"]=o);const a=await fetch(`${h}${t}`,{headers:i});if(!a.ok)throw new Error(`Failed to fetch FAQs: ${a.status}`);s=await a.json()}N(s.faqs||[])}catch{N([]),j("Failed to load FAQs")}finally{w(!1)}},[h,o,g,r]);c.useEffect(()=>{_()},[_]);const E=async s=>{if(s.preventDefault(),!(!n.question.trim()||!n.answer.trim())){C(!0);try{const t=n.keywordsCsv.split(",").map(a=>a.trim().toLowerCase()).filter(Boolean),i={question:n.question.trim(),answer:n.answer.trim(),keywords:t,active:n.active,useInChat:n.useInChat,displayOnPage:n.displayOnPage};if(p){const a=`/admin/faqs/${p.id}`;if(r?.isAuthenticated())await r.fetchWithAuth(a,{method:"PUT",body:JSON.stringify(i)});else{const m={"Content-Type":"application/json"};o&&(m["X-API-Key"]=o);const I=await fetch(`${h}${a}`,{method:"PUT",headers:m,body:JSON.stringify(i)});if(!I.ok)throw new Error(`Failed to update FAQ: ${I.status}`)}}else if(r?.isAuthenticated())await r.fetchWithAuth("/admin/faqs",{method:"POST",body:JSON.stringify(i)});else{const a={"Content-Type":"application/json"};o&&(a["X-API-Key"]=o);const m=await fetch(`${h}/admin/faqs`,{method:"POST",headers:a,body:JSON.stringify(i)});if(!m.ok)throw new Error(`Failed to create FAQ: ${m.status}`)}y(),_()}catch{j(p?"Failed to update FAQ":"Failed to create FAQ")}finally{C(!1)}}},T=async s=>{try{const t=`/admin/faqs/${s}`;if(r?.isAuthenticated())await r.fetchWithAuth(t,{method:"DELETE"});else{const i={"Content-Type":"application/json"};o&&(i["X-API-Key"]=o);const a=await fetch(`${h}${t}`,{method:"DELETE",headers:i});if(!a.ok)throw new Error(`Failed to delete FAQ: ${a.status}`)}_()}catch{j("Failed to delete FAQ")}b(null)},D=async s=>{try{const t=`/admin/faqs/${s.id}`,i={...s,active:!s.active};if(r?.isAuthenticated())await r.fetchWithAuth(t,{method:"PUT",body:JSON.stringify(i)});else{const a={"Content-Type":"application/json"};o&&(a["X-API-Key"]=o);const m=await fetch(`${h}${t}`,{method:"PUT",headers:a,body:JSON.stringify(i)});if(!m.ok)throw new Error(`Failed to update FAQ: ${m.status}`)}_()}catch{j("Failed to update FAQ status")}},y=()=>{l({question:"",answer:"",keywordsCsv:"",active:!0,useInChat:!0,displayOnPage:!0}),A(null),f(!1)},L=s=>{l({question:s.question,answer:s.answer,keywordsCsv:s.keywords.join(", "),active:s.active,useInChat:s.useInChat??!0,displayOnPage:s.displayOnPage??!0}),A(s),f(!0)},W=u.length,B=u.filter(s=>s.active).length,J=u.filter(s=>s.active&&s.useInChat).length,X=u.filter(s=>s.active&&s.displayOnPage).length,k=c.useMemo(()=>u.filter(s=>{if(v==="active"&&!s.active||v==="inactive"&&s.active)return!1;if(x){const t=x.toLowerCase();return s.question.toLowerCase().includes(t)||s.answer.toLowerCase().includes(t)||s.keywords.some(i=>i.includes(t))}return!0}),[u,v,x]);return e.jsxs("div",{className:"cedros-admin__faqs",children:[e.jsx(d.ErrorBanner,{message:$,onRetry:_}),e.jsx(d.StatsBar,{stats:[{label:"Total FAQs",value:W},{label:"Active",value:B,variant:"success"},{label:"In Chat",value:J},{label:"On Page",value:X}]}),e.jsxs("div",{className:"cedros-admin__section",children:[e.jsxs("div",{className:"cedros-admin__section-header",children:[e.jsxs("div",{className:"cedros-admin__section-header-left",children:[e.jsx("h3",{className:"cedros-admin__section-title",children:"Knowledge Base"}),e.jsx("p",{className:"cedros-admin__section-subtitle",children:"Manage FAQs for the AI chat assistant and public FAQ page."})]}),e.jsx("div",{className:"cedros-admin__section-header-right",children:e.jsxs("button",{className:"cedros-admin__button cedros-admin__button--primary",onClick:()=>{y(),f(!0)},children:[d.Icons.plus," Add FAQ"]})})]}),e.jsxs("div",{className:"cedros-admin__filters",style:{display:"flex",gap:"1rem",marginBottom:"1rem"},children:[e.jsx("input",{type:"text",placeholder:"Search FAQs...",value:x,onChange:s=>P(s.target.value),className:"cedros-admin__input",style:{flex:1,maxWidth:300}}),e.jsxs("select",{value:v,onChange:s=>O(s.target.value),className:"cedros-admin__select",children:[e.jsx("option",{value:"all",children:"All Status"}),e.jsx("option",{value:"active",children:"Active Only"}),e.jsx("option",{value:"inactive",children:"Inactive Only"})]})]}),S&&e.jsx("div",{className:"cedros-admin__form-container",style:{marginBottom:"1.5rem"},children:e.jsxs("form",{onSubmit:E,className:"cedros-admin__form",children:[e.jsxs("div",{className:"cedros-admin__form-header",children:[e.jsx("h4",{children:p?"Edit FAQ":"Add New FAQ"}),e.jsx("button",{type:"button",className:"cedros-admin__button--icon",onClick:y,children:d.Icons.close})]}),e.jsxs("div",{className:"cedros-admin__form-group",children:[e.jsx("label",{className:"cedros-admin__label",children:"Question *"}),e.jsx("input",{type:"text",value:n.question,onChange:s=>l(t=>({...t,question:s.target.value})),className:"cedros-admin__input",placeholder:"What is your return policy?",required:!0})]}),e.jsxs("div",{className:"cedros-admin__form-group",children:[e.jsx("label",{className:"cedros-admin__label",children:"Answer *"}),e.jsx("textarea",{value:n.answer,onChange:s=>l(t=>({...t,answer:s.target.value})),className:"cedros-admin__textarea",placeholder:"We accept returns within 30 days...",rows:4,required:!0}),e.jsx("span",{className:"cedros-admin__hint",children:"Supports markdown formatting."})]}),e.jsxs("div",{className:"cedros-admin__form-group",children:[e.jsx("label",{className:"cedros-admin__label",children:"Keywords"}),e.jsx("input",{type:"text",value:n.keywordsCsv,onChange:s=>l(t=>({...t,keywordsCsv:s.target.value})),className:"cedros-admin__input",placeholder:"returns, refund, policy"}),e.jsx("span",{className:"cedros-admin__hint",children:"Comma-separated keywords to help AI find this FAQ."})]}),e.jsxs("div",{className:"cedros-admin__form-group",children:[e.jsxs("label",{className:"cedros-admin__checkbox-label",children:[e.jsx("input",{type:"checkbox",checked:n.active,onChange:s=>l(t=>({...t,active:s.target.checked}))}),e.jsx("span",{children:"Active"})]}),e.jsx("span",{className:"cedros-admin__hint",children:"Inactive FAQs won't appear anywhere."})]}),e.jsxs("div",{className:"cedros-admin__form-group",children:[e.jsx("label",{className:"cedros-admin__label",children:"Visibility"}),e.jsxs("div",{className:"cedros-admin__checkbox-group",children:[e.jsxs("label",{className:"cedros-admin__checkbox-label",children:[e.jsx("input",{type:"checkbox",checked:n.useInChat,onChange:s=>l(t=>({...t,useInChat:s.target.checked}))}),e.jsx("span",{children:"Use in AI Chat"})]}),e.jsxs("label",{className:"cedros-admin__checkbox-label",children:[e.jsx("input",{type:"checkbox",checked:n.displayOnPage,onChange:s=>l(t=>({...t,displayOnPage:s.target.checked}))}),e.jsx("span",{children:"Display on FAQ Page"})]})]}),e.jsx("span",{className:"cedros-admin__hint",children:"Choose where this FAQ should appear."})]}),e.jsxs("div",{className:"cedros-admin__form-actions",children:[e.jsx("button",{type:"button",className:"cedros-admin__button",onClick:y,children:"Cancel"}),e.jsx("button",{type:"submit",className:"cedros-admin__button cedros-admin__button--primary",disabled:F||!n.question.trim()||!n.answer.trim(),children:F?d.Icons.loading:p?"Update FAQ":"Create FAQ"})]})]})}),Q?e.jsxs("div",{className:"cedros-admin__loading",children:[d.Icons.loading,e.jsx("span",{children:"Loading FAQs..."})]}):k.length===0?e.jsx("div",{className:"cedros-admin__empty",children:e.jsx("p",{children:x||v!=="all"?"No FAQs match your filters.":"No FAQs yet. Add one to get started."})}):e.jsx("div",{className:"cedros-admin__faq-list",children:k.map(s=>e.jsxs("div",{className:`cedros-admin__faq-item ${s.active?"":"cedros-admin__faq-item--inactive"}`,children:[e.jsxs("div",{className:"cedros-admin__faq-content",children:[e.jsxs("div",{className:"cedros-admin__faq-question",children:[e.jsx("span",{className:`cedros-admin__status-dot ${s.active?"cedros-admin__status-dot--active":"cedros-admin__status-dot--inactive"}`}),s.question]}),e.jsx("div",{className:"cedros-admin__faq-answer",children:s.answer}),e.jsxs("div",{className:"cedros-admin__faq-meta",children:[s.keywords.length>0&&e.jsx("div",{className:"cedros-admin__faq-keywords",children:s.keywords.map(t=>e.jsx("span",{className:"cedros-admin__tag",children:t},t))}),e.jsxs("div",{className:"cedros-admin__faq-visibility",children:[s.useInChat&&e.jsxs("span",{className:"cedros-admin__badge cedros-admin__badge--chat",title:"Used in AI Chat",children:[d.Icons.chat," Chat"]}),s.displayOnPage&&e.jsxs("span",{className:"cedros-admin__badge cedros-admin__badge--page",title:"Displayed on FAQ Page",children:[d.Icons.globe," Page"]})]})]})]}),e.jsxs("div",{className:"cedros-admin__faq-actions",children:[e.jsx("button",{className:"cedros-admin__button--icon",onClick:()=>D(s),title:s.active?"Deactivate":"Activate",children:s.active?d.Icons.eyeOff:d.Icons.eye}),e.jsx("button",{className:"cedros-admin__button--icon",onClick:()=>L(s),title:"Edit",children:d.Icons.edit}),e.jsx("button",{className:"cedros-admin__button--icon cedros-admin__btn--danger",onClick:()=>b(s.id),title:"Delete",children:d.Icons.trash})]}),q===s.id&&e.jsx("div",{className:"cedros-admin__confirm-overlay",children:e.jsxs("div",{className:"cedros-admin__confirm-dialog",children:[e.jsx("p",{children:"Delete this FAQ?"}),e.jsxs("div",{className:"cedros-admin__confirm-actions",children:[e.jsx("button",{className:"cedros-admin__button",onClick:()=>b(null),children:"Cancel"}),e.jsx("button",{className:"cedros-admin__button cedros-admin__button--danger",onClick:()=>T(s.id),children:"Delete"})]})]})})]},s.id))})]})]})}exports.FAQSection=R;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),c=require("react"),d=require("./index-B5ck27xb.js");function R({serverUrl:h,apiKey:o,pageSize:g=20,authManager:r}){const[u,N]=c.useState([]),[Q,w]=c.useState(!0),[S,f]=c.useState(!1),[p,A]=c.useState(null),[F,C]=c.useState(!1),[x,P]=c.useState(""),[v,O]=c.useState("all"),[q,b]=c.useState(null),[$,j]=c.useState(null),[n,l]=c.useState({question:"",answer:"",keywordsCsv:"",active:!0,useInChat:!0,displayOnPage:!0}),_=c.useCallback(async()=>{w(!0);try{j(null);let s;const t=`/admin/faqs?limit=${g}`;if(r?.isAuthenticated())s=await r.fetchWithAuth(t);else{const i={"Content-Type":"application/json"};o&&(i["X-API-Key"]=o);const a=await fetch(`${h}${t}`,{headers:i});if(!a.ok)throw new Error(`Failed to fetch FAQs: ${a.status}`);s=await a.json()}N(s.faqs||[])}catch{N([]),j("Failed to load FAQs")}finally{w(!1)}},[h,o,g,r]);c.useEffect(()=>{_()},[_]);const E=async s=>{if(s.preventDefault(),!(!n.question.trim()||!n.answer.trim())){C(!0);try{const t=n.keywordsCsv.split(",").map(a=>a.trim().toLowerCase()).filter(Boolean),i={question:n.question.trim(),answer:n.answer.trim(),keywords:t,active:n.active,useInChat:n.useInChat,displayOnPage:n.displayOnPage};if(p){const a=`/admin/faqs/${p.id}`;if(r?.isAuthenticated())await r.fetchWithAuth(a,{method:"PUT",body:JSON.stringify(i)});else{const m={"Content-Type":"application/json"};o&&(m["X-API-Key"]=o);const I=await fetch(`${h}${a}`,{method:"PUT",headers:m,body:JSON.stringify(i)});if(!I.ok)throw new Error(`Failed to update FAQ: ${I.status}`)}}else if(r?.isAuthenticated())await r.fetchWithAuth("/admin/faqs",{method:"POST",body:JSON.stringify(i)});else{const a={"Content-Type":"application/json"};o&&(a["X-API-Key"]=o);const m=await fetch(`${h}/admin/faqs`,{method:"POST",headers:a,body:JSON.stringify(i)});if(!m.ok)throw new Error(`Failed to create FAQ: ${m.status}`)}y(),_()}catch{j(p?"Failed to update FAQ":"Failed to create FAQ")}finally{C(!1)}}},T=async s=>{try{const t=`/admin/faqs/${s}`;if(r?.isAuthenticated())await r.fetchWithAuth(t,{method:"DELETE"});else{const i={"Content-Type":"application/json"};o&&(i["X-API-Key"]=o);const a=await fetch(`${h}${t}`,{method:"DELETE",headers:i});if(!a.ok)throw new Error(`Failed to delete FAQ: ${a.status}`)}_()}catch{j("Failed to delete FAQ")}b(null)},D=async s=>{try{const t=`/admin/faqs/${s.id}`,i={...s,active:!s.active};if(r?.isAuthenticated())await r.fetchWithAuth(t,{method:"PUT",body:JSON.stringify(i)});else{const a={"Content-Type":"application/json"};o&&(a["X-API-Key"]=o);const m=await fetch(`${h}${t}`,{method:"PUT",headers:a,body:JSON.stringify(i)});if(!m.ok)throw new Error(`Failed to update FAQ: ${m.status}`)}_()}catch{j("Failed to update FAQ status")}},y=()=>{l({question:"",answer:"",keywordsCsv:"",active:!0,useInChat:!0,displayOnPage:!0}),A(null),f(!1)},L=s=>{l({question:s.question,answer:s.answer,keywordsCsv:s.keywords.join(", "),active:s.active,useInChat:s.useInChat??!0,displayOnPage:s.displayOnPage??!0}),A(s),f(!0)},W=u.length,B=u.filter(s=>s.active).length,J=u.filter(s=>s.active&&s.useInChat).length,X=u.filter(s=>s.active&&s.displayOnPage).length,k=c.useMemo(()=>u.filter(s=>{if(v==="active"&&!s.active||v==="inactive"&&s.active)return!1;if(x){const t=x.toLowerCase();return s.question.toLowerCase().includes(t)||s.answer.toLowerCase().includes(t)||s.keywords.some(i=>i.includes(t))}return!0}),[u,v,x]);return e.jsxs("div",{className:"cedros-admin__faqs",children:[e.jsx(d.ErrorBanner,{message:$,onRetry:_}),e.jsx(d.StatsBar,{stats:[{label:"Total FAQs",value:W},{label:"Active",value:B,variant:"success"},{label:"In Chat",value:J},{label:"On Page",value:X}]}),e.jsxs("div",{className:"cedros-admin__section",children:[e.jsxs("div",{className:"cedros-admin__section-header",children:[e.jsxs("div",{className:"cedros-admin__section-header-left",children:[e.jsx("h3",{className:"cedros-admin__section-title",children:"Knowledge Base"}),e.jsx("p",{className:"cedros-admin__section-subtitle",children:"Manage FAQs for the AI chat assistant and public FAQ page."})]}),e.jsx("div",{className:"cedros-admin__section-header-right",children:e.jsxs("button",{className:"cedros-admin__button cedros-admin__button--primary",onClick:()=>{y(),f(!0)},children:[d.Icons.plus," Add FAQ"]})})]}),e.jsxs("div",{className:"cedros-admin__filters",style:{display:"flex",gap:"1rem",marginBottom:"1rem"},children:[e.jsx("input",{type:"text",placeholder:"Search FAQs...",value:x,onChange:s=>P(s.target.value),className:"cedros-admin__input",style:{flex:1,maxWidth:300}}),e.jsxs("select",{value:v,onChange:s=>O(s.target.value),className:"cedros-admin__select",children:[e.jsx("option",{value:"all",children:"All Status"}),e.jsx("option",{value:"active",children:"Active Only"}),e.jsx("option",{value:"inactive",children:"Inactive Only"})]})]}),S&&e.jsx("div",{className:"cedros-admin__form-container",style:{marginBottom:"1.5rem"},children:e.jsxs("form",{onSubmit:E,className:"cedros-admin__form",children:[e.jsxs("div",{className:"cedros-admin__form-header",children:[e.jsx("h4",{children:p?"Edit FAQ":"Add New FAQ"}),e.jsx("button",{type:"button",className:"cedros-admin__button--icon",onClick:y,children:d.Icons.close})]}),e.jsxs("div",{className:"cedros-admin__form-group",children:[e.jsx("label",{className:"cedros-admin__label",children:"Question *"}),e.jsx("input",{type:"text",value:n.question,onChange:s=>l(t=>({...t,question:s.target.value})),className:"cedros-admin__input",placeholder:"What is your return policy?",required:!0})]}),e.jsxs("div",{className:"cedros-admin__form-group",children:[e.jsx("label",{className:"cedros-admin__label",children:"Answer *"}),e.jsx("textarea",{value:n.answer,onChange:s=>l(t=>({...t,answer:s.target.value})),className:"cedros-admin__textarea",placeholder:"We accept returns within 30 days...",rows:4,required:!0}),e.jsx("span",{className:"cedros-admin__hint",children:"Supports markdown formatting."})]}),e.jsxs("div",{className:"cedros-admin__form-group",children:[e.jsx("label",{className:"cedros-admin__label",children:"Keywords"}),e.jsx("input",{type:"text",value:n.keywordsCsv,onChange:s=>l(t=>({...t,keywordsCsv:s.target.value})),className:"cedros-admin__input",placeholder:"returns, refund, policy"}),e.jsx("span",{className:"cedros-admin__hint",children:"Comma-separated keywords to help AI find this FAQ."})]}),e.jsxs("div",{className:"cedros-admin__form-group",children:[e.jsxs("label",{className:"cedros-admin__checkbox-label",children:[e.jsx("input",{type:"checkbox",checked:n.active,onChange:s=>l(t=>({...t,active:s.target.checked}))}),e.jsx("span",{children:"Active"})]}),e.jsx("span",{className:"cedros-admin__hint",children:"Inactive FAQs won't appear anywhere."})]}),e.jsxs("div",{className:"cedros-admin__form-group",children:[e.jsx("label",{className:"cedros-admin__label",children:"Visibility"}),e.jsxs("div",{className:"cedros-admin__checkbox-group",children:[e.jsxs("label",{className:"cedros-admin__checkbox-label",children:[e.jsx("input",{type:"checkbox",checked:n.useInChat,onChange:s=>l(t=>({...t,useInChat:s.target.checked}))}),e.jsx("span",{children:"Use in AI Chat"})]}),e.jsxs("label",{className:"cedros-admin__checkbox-label",children:[e.jsx("input",{type:"checkbox",checked:n.displayOnPage,onChange:s=>l(t=>({...t,displayOnPage:s.target.checked}))}),e.jsx("span",{children:"Display on FAQ Page"})]})]}),e.jsx("span",{className:"cedros-admin__hint",children:"Choose where this FAQ should appear."})]}),e.jsxs("div",{className:"cedros-admin__form-actions",children:[e.jsx("button",{type:"button",className:"cedros-admin__button",onClick:y,children:"Cancel"}),e.jsx("button",{type:"submit",className:"cedros-admin__button cedros-admin__button--primary",disabled:F||!n.question.trim()||!n.answer.trim(),children:F?d.Icons.loading:p?"Update FAQ":"Create FAQ"})]})]})}),Q?e.jsxs("div",{className:"cedros-admin__loading",children:[d.Icons.loading,e.jsx("span",{children:"Loading FAQs..."})]}):k.length===0?e.jsx("div",{className:"cedros-admin__empty",children:e.jsx("p",{children:x||v!=="all"?"No FAQs match your filters.":"No FAQs yet. Add one to get started."})}):e.jsx("div",{className:"cedros-admin__faq-list",children:k.map(s=>e.jsxs("div",{className:`cedros-admin__faq-item ${s.active?"":"cedros-admin__faq-item--inactive"}`,children:[e.jsxs("div",{className:"cedros-admin__faq-content",children:[e.jsxs("div",{className:"cedros-admin__faq-question",children:[e.jsx("span",{className:`cedros-admin__status-dot ${s.active?"cedros-admin__status-dot--active":"cedros-admin__status-dot--inactive"}`}),s.question]}),e.jsx("div",{className:"cedros-admin__faq-answer",children:s.answer}),e.jsxs("div",{className:"cedros-admin__faq-meta",children:[s.keywords.length>0&&e.jsx("div",{className:"cedros-admin__faq-keywords",children:s.keywords.map(t=>e.jsx("span",{className:"cedros-admin__tag",children:t},t))}),e.jsxs("div",{className:"cedros-admin__faq-visibility",children:[s.useInChat&&e.jsxs("span",{className:"cedros-admin__badge cedros-admin__badge--chat",title:"Used in AI Chat",children:[d.Icons.chat," Chat"]}),s.displayOnPage&&e.jsxs("span",{className:"cedros-admin__badge cedros-admin__badge--page",title:"Displayed on FAQ Page",children:[d.Icons.globe," Page"]})]})]})]}),e.jsxs("div",{className:"cedros-admin__faq-actions",children:[e.jsx("button",{className:"cedros-admin__button--icon",onClick:()=>D(s),title:s.active?"Deactivate":"Activate",children:s.active?d.Icons.eyeOff:d.Icons.eye}),e.jsx("button",{className:"cedros-admin__button--icon",onClick:()=>L(s),title:"Edit",children:d.Icons.edit}),e.jsx("button",{className:"cedros-admin__button--icon cedros-admin__btn--danger",onClick:()=>b(s.id),title:"Delete",children:d.Icons.trash})]}),q===s.id&&e.jsx("div",{className:"cedros-admin__confirm-overlay",children:e.jsxs("div",{className:"cedros-admin__confirm-dialog",children:[e.jsx("p",{children:"Delete this FAQ?"}),e.jsxs("div",{className:"cedros-admin__confirm-actions",children:[e.jsx("button",{className:"cedros-admin__button",onClick:()=>b(null),children:"Cancel"}),e.jsx("button",{className:"cedros-admin__button cedros-admin__button--danger",onClick:()=>T(s.id),children:"Delete"})]})]})})]},s.id))})]})]})}exports.FAQSection=R;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),o=require("react"),v=require("./index-B-0trqeD.js"),j=require("./Toggle-CsPSF8Dr.js"),I=require("./useAutosave-B2p6iwh8.js"),P=require("./AutosaveIndicator-DxemlKnX.js"),g={email_enabled:!1,smtp_host:"",smtp_port:587,smtp_username:"",smtp_password:"",from_email:"",from_name:"",webhook_enabled:!1,webhook_url:"",webhook_secret:"",webhook_timeout:30};function W({serverUrl:h,apiKey:d,authManager:r}){const[l,_]=o.useState("messages"),[a,p]=o.useState(g),[y,w]=o.useState(!0),[N,S]=o.useState(!0),[k,b]=o.useState(null),[m,C]=o.useState(new Set),u=o.useCallback(async()=>{try{b(null);let s;const n="/admin/config/messaging";if(r?.isAuthenticated())s=await r.fetchWithAuth(n);else{const t={"Content-Type":"application/json"};d&&(t["X-API-Key"]=d);const c=await fetch(`${h}${n}`,{headers:t});if(!c.ok)throw new Error(`Failed to fetch: ${c.status}`);s=await c.json()}p({...g,...s.config})}catch{p(g),b("Could not load saved settings. Showing defaults.")}finally{w(!1),setTimeout(()=>S(!1),100)}},[h,d,r]);o.useEffect(()=>{u()},[u]);const E=o.useCallback(async s=>{const n="/admin/config/messaging",t={...s};m.has("smtp_password")||delete t.smtp_password,m.has("webhook_secret")||delete t.webhook_secret;const c=JSON.stringify({config:t});try{if(r?.isAuthenticated())await r.fetchWithAuth(n,{method:"PUT",body:c});else{const f={"Content-Type":"application/json"};d&&(f["X-API-Key"]=d);const x=await fetch(`${h}${n}`,{method:"PUT",headers:f,body:c});if(!x.ok)throw new Error(`Failed to save: ${x.status}`)}}catch{throw b("Failed to save messaging settings"),new Error("Save failed")}},[h,d,r,m]),{status:T,error:A}=I.useAutosave({data:a,onSave:E,debounceMs:1500,enabled:!N}),i=(s,n)=>{(s==="smtp_password"||s==="webhook_secret")&&C(t=>new Set(t).add(s)),p(t=>({...t,[s]:n}))};return y?e.jsxs("div",{className:"cedros-admin__messaging-settings",children:[e.jsxs("div",{className:"cedros-admin__page-header",children:[e.jsx("h2",{className:"cedros-admin__page-title",children:"Store Messages"}),e.jsx("p",{className:"cedros-admin__page-description",children:"Configure email delivery and webhook notifications."})]}),e.jsxs("div",{className:"cedros-admin__loading",style:{marginTop:"1rem"},children:[v.Icons.loading," Loading message settings..."]})]}):e.jsxs("div",{className:"cedros-admin__messaging-settings",children:[e.jsxs("div",{className:"cedros-admin__page-header",children:[e.jsx("h2",{className:"cedros-admin__page-title",children:"Store Messages"}),e.jsx("p",{className:"cedros-admin__page-description",children:"Configure email delivery and webhook notifications."})]}),e.jsxs("div",{className:"cedros-admin__tabs cedros-admin__tabs--line",children:[e.jsx("button",{type:"button",className:`cedros-admin__tab ${l==="messages"?"cedros-admin__tab--active":""}`,onClick:()=>_("messages"),children:"Messages"}),e.jsx("button",{type:"button",className:`cedros-admin__tab ${l==="email"?"cedros-admin__tab--active":""}`,onClick:()=>_("email"),children:"Email"}),e.jsx("button",{type:"button",className:`cedros-admin__tab ${l==="webhooks"?"cedros-admin__tab--active":""}`,onClick:()=>_("webhooks"),children:"Webhooks"}),e.jsx("div",{style:{flex:1}}),e.jsx(P.AutosaveIndicator,{status:T,error:A})]}),e.jsx(v.ErrorBanner,{message:k,onRetry:u}),e.jsxs("div",{className:"cedros-admin__tab-content",style:{marginTop:"1rem"},children:[l==="messages"&&e.jsxs("div",{className:"cedros-admin__section",children:[e.jsx("p",{style:{marginBottom:"1.5rem",fontSize:"0.875rem",opacity:.7},children:"Enable or disable notification types. Configure the delivery settings in the Email or Webhooks tab."}),e.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"1rem"},children:[e.jsxs("div",{style:{display:"flex",alignItems:"flex-start",gap:"1rem",padding:"1rem",border:"1px solid var(--cedros-admin-border, #e5e5e5)",borderRadius:"0.5rem"},children:[e.jsx(j.Toggle,{checked:a.email_enabled,onChange:s=>i("email_enabled",s)}),e.jsxs("div",{style:{flex:1},children:[e.jsx("div",{style:{fontWeight:500},children:"Email Confirmation"}),e.jsx("p",{style:{margin:"0.25rem 0 0",fontSize:"0.8125rem",opacity:.6},children:"Send order confirmation emails to customers after successful purchase."}),e.jsx("p",{style:{margin:"0.5rem 0 0",fontSize:"0.75rem",opacity:.5},children:"Requires Email configuration"})]})]}),e.jsxs("div",{style:{display:"flex",alignItems:"flex-start",gap:"1rem",padding:"1rem",border:"1px solid var(--cedros-admin-border, #e5e5e5)",borderRadius:"0.5rem"},children:[e.jsx(j.Toggle,{checked:a.webhook_enabled,onChange:s=>i("webhook_enabled",s)}),e.jsxs("div",{style:{flex:1},children:[e.jsx("div",{style:{fontWeight:500},children:"Admin Purchase Notification"}),e.jsx("p",{style:{margin:"0.25rem 0 0",fontSize:"0.8125rem",opacity:.6},children:"Send webhook notifications to your server when a purchase is completed."}),e.jsx("p",{style:{margin:"0.5rem 0 0",fontSize:"0.75rem",opacity:.5},children:"Requires Webhook configuration"})]})]})]})]}),l==="email"&&e.jsxs("div",{className:"cedros-admin__section",children:[e.jsx("p",{style:{marginBottom:"1.5rem",fontSize:"0.875rem",opacity:.7},children:"Configure your email provider for sending customer notifications."}),!a.email_enabled&&e.jsx("div",{style:{padding:"1rem",marginBottom:"1.5rem",background:"var(--cedros-admin-bg-accent, #fef3c7)",borderRadius:"0.5rem",border:"1px solid var(--cedros-admin-warning, #f59e0b)",fontSize:"0.875rem"},children:"Email notifications are disabled. Enable them in the Messages tab."}),e.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"1rem",opacity:a.email_enabled?1:.5},children:[e.jsxs("div",{className:"cedros-admin__field",children:[e.jsx("label",{className:"cedros-admin__field-label",children:"SMTP Host"}),e.jsx("input",{type:"text",className:"cedros-admin__input",value:a.smtp_host,onChange:s=>i("smtp_host",s.target.value),placeholder:"smtp.example.com",disabled:!a.email_enabled})]}),e.jsxs("div",{className:"cedros-admin__field",children:[e.jsx("label",{className:"cedros-admin__field-label",children:"SMTP Port"}),e.jsx("input",{type:"number",className:"cedros-admin__input",value:a.smtp_port,onChange:s=>i("smtp_port",parseInt(s.target.value)||587),placeholder:"587",disabled:!a.email_enabled,style:{maxWidth:120}})]}),e.jsxs("div",{className:"cedros-admin__field",children:[e.jsx("label",{className:"cedros-admin__field-label",children:"SMTP Username"}),e.jsx("input",{type:"text",className:"cedros-admin__input",value:a.smtp_username,onChange:s=>i("smtp_username",s.target.value),placeholder:"username or API key",disabled:!a.email_enabled})]}),e.jsxs("div",{className:"cedros-admin__field",children:[e.jsx("label",{className:"cedros-admin__field-label",children:"SMTP Password"}),e.jsx("input",{type:"password",className:"cedros-admin__input",value:m.has("smtp_password")?a.smtp_password:"",onChange:s=>i("smtp_password",s.target.value),placeholder:a.smtp_password?"••••••••":"Enter password",disabled:!a.email_enabled})]}),e.jsxs("div",{className:"cedros-admin__field",children:[e.jsx("label",{className:"cedros-admin__field-label",children:"From Email"}),e.jsx("input",{type:"email",className:"cedros-admin__input",value:a.from_email,onChange:s=>i("from_email",s.target.value),placeholder:"orders@yourstore.com",disabled:!a.email_enabled})]}),e.jsxs("div",{className:"cedros-admin__field",children:[e.jsx("label",{className:"cedros-admin__field-label",children:"From Name"}),e.jsx("input",{type:"text",className:"cedros-admin__input",value:a.from_name,onChange:s=>i("from_name",s.target.value),placeholder:"Your Store",disabled:!a.email_enabled})]})]})]}),l==="webhooks"&&e.jsxs("div",{className:"cedros-admin__section",children:[e.jsx("p",{style:{marginBottom:"1.5rem",fontSize:"0.875rem",opacity:.7},children:"Configure webhook endpoint for receiving purchase notifications."}),!a.webhook_enabled&&e.jsx("div",{style:{padding:"1rem",marginBottom:"1.5rem",background:"var(--cedros-admin-bg-accent, #fef3c7)",borderRadius:"0.5rem",border:"1px solid var(--cedros-admin-warning, #f59e0b)",fontSize:"0.875rem"},children:"Webhook notifications are disabled. Enable them in the Messages tab."}),e.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"1rem",opacity:a.webhook_enabled?1:.5},children:[e.jsxs("div",{className:"cedros-admin__field",children:[e.jsx("label",{className:"cedros-admin__field-label",children:"Webhook URL"}),e.jsx("input",{type:"url",className:"cedros-admin__input",value:a.webhook_url,onChange:s=>i("webhook_url",s.target.value),placeholder:"https://api.yoursite.com/webhooks/orders",disabled:!a.webhook_enabled})]}),e.jsxs("div",{className:"cedros-admin__field",children:[e.jsx("label",{className:"cedros-admin__field-label",children:"Webhook Secret"}),e.jsx("input",{type:"password",className:"cedros-admin__input",value:m.has("webhook_secret")?a.webhook_secret:"",onChange:s=>i("webhook_secret",s.target.value),placeholder:a.webhook_secret?"••••••••":"Enter secret for HMAC-SHA256",disabled:!a.webhook_enabled}),e.jsx("p",{style:{margin:"0.25rem 0 0",fontSize:"0.75rem",opacity:.6},children:"Used for HMAC-SHA256 signature verification"})]}),e.jsxs("div",{className:"cedros-admin__field",children:[e.jsx("label",{className:"cedros-admin__field-label",children:"Timeout (seconds)"}),e.jsx("input",{type:"number",className:"cedros-admin__input",value:a.webhook_timeout,onChange:s=>i("webhook_timeout",parseInt(s.target.value)||30),placeholder:"30",disabled:!a.webhook_enabled,style:{maxWidth:120}})]})]})]})]})]})}exports.MessagingSection=W;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),o=require("react"),v=require("./index-B5ck27xb.js"),j=require("./Toggle-CsPSF8Dr.js"),I=require("./useAutosave-B2p6iwh8.js"),P=require("./AutosaveIndicator-CpTVtJIz.js"),g={email_enabled:!1,smtp_host:"",smtp_port:587,smtp_username:"",smtp_password:"",from_email:"",from_name:"",webhook_enabled:!1,webhook_url:"",webhook_secret:"",webhook_timeout:30};function W({serverUrl:h,apiKey:d,authManager:r}){const[l,_]=o.useState("messages"),[a,p]=o.useState(g),[y,w]=o.useState(!0),[N,S]=o.useState(!0),[k,b]=o.useState(null),[m,C]=o.useState(new Set),u=o.useCallback(async()=>{try{b(null);let s;const n="/admin/config/messaging";if(r?.isAuthenticated())s=await r.fetchWithAuth(n);else{const t={"Content-Type":"application/json"};d&&(t["X-API-Key"]=d);const c=await fetch(`${h}${n}`,{headers:t});if(!c.ok)throw new Error(`Failed to fetch: ${c.status}`);s=await c.json()}p({...g,...s.config})}catch{p(g),b("Could not load saved settings. Showing defaults.")}finally{w(!1),setTimeout(()=>S(!1),100)}},[h,d,r]);o.useEffect(()=>{u()},[u]);const E=o.useCallback(async s=>{const n="/admin/config/messaging",t={...s};m.has("smtp_password")||delete t.smtp_password,m.has("webhook_secret")||delete t.webhook_secret;const c=JSON.stringify({config:t});try{if(r?.isAuthenticated())await r.fetchWithAuth(n,{method:"PUT",body:c});else{const f={"Content-Type":"application/json"};d&&(f["X-API-Key"]=d);const x=await fetch(`${h}${n}`,{method:"PUT",headers:f,body:c});if(!x.ok)throw new Error(`Failed to save: ${x.status}`)}}catch{throw b("Failed to save messaging settings"),new Error("Save failed")}},[h,d,r,m]),{status:T,error:A}=I.useAutosave({data:a,onSave:E,debounceMs:1500,enabled:!N}),i=(s,n)=>{(s==="smtp_password"||s==="webhook_secret")&&C(t=>new Set(t).add(s)),p(t=>({...t,[s]:n}))};return y?e.jsxs("div",{className:"cedros-admin__messaging-settings",children:[e.jsxs("div",{className:"cedros-admin__page-header",children:[e.jsx("h2",{className:"cedros-admin__page-title",children:"Store Messages"}),e.jsx("p",{className:"cedros-admin__page-description",children:"Configure email delivery and webhook notifications."})]}),e.jsxs("div",{className:"cedros-admin__loading",style:{marginTop:"1rem"},children:[v.Icons.loading," Loading message settings..."]})]}):e.jsxs("div",{className:"cedros-admin__messaging-settings",children:[e.jsxs("div",{className:"cedros-admin__page-header",children:[e.jsx("h2",{className:"cedros-admin__page-title",children:"Store Messages"}),e.jsx("p",{className:"cedros-admin__page-description",children:"Configure email delivery and webhook notifications."})]}),e.jsxs("div",{className:"cedros-admin__tabs cedros-admin__tabs--line",children:[e.jsx("button",{type:"button",className:`cedros-admin__tab ${l==="messages"?"cedros-admin__tab--active":""}`,onClick:()=>_("messages"),children:"Messages"}),e.jsx("button",{type:"button",className:`cedros-admin__tab ${l==="email"?"cedros-admin__tab--active":""}`,onClick:()=>_("email"),children:"Email"}),e.jsx("button",{type:"button",className:`cedros-admin__tab ${l==="webhooks"?"cedros-admin__tab--active":""}`,onClick:()=>_("webhooks"),children:"Webhooks"}),e.jsx("div",{style:{flex:1}}),e.jsx(P.AutosaveIndicator,{status:T,error:A})]}),e.jsx(v.ErrorBanner,{message:k,onRetry:u}),e.jsxs("div",{className:"cedros-admin__tab-content",style:{marginTop:"1rem"},children:[l==="messages"&&e.jsxs("div",{className:"cedros-admin__section",children:[e.jsx("p",{style:{marginBottom:"1.5rem",fontSize:"0.875rem",opacity:.7},children:"Enable or disable notification types. Configure the delivery settings in the Email or Webhooks tab."}),e.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"1rem"},children:[e.jsxs("div",{style:{display:"flex",alignItems:"flex-start",gap:"1rem",padding:"1rem",border:"1px solid var(--cedros-admin-border, #e5e5e5)",borderRadius:"0.5rem"},children:[e.jsx(j.Toggle,{checked:a.email_enabled,onChange:s=>i("email_enabled",s)}),e.jsxs("div",{style:{flex:1},children:[e.jsx("div",{style:{fontWeight:500},children:"Email Confirmation"}),e.jsx("p",{style:{margin:"0.25rem 0 0",fontSize:"0.8125rem",opacity:.6},children:"Send order confirmation emails to customers after successful purchase."}),e.jsx("p",{style:{margin:"0.5rem 0 0",fontSize:"0.75rem",opacity:.5},children:"Requires Email configuration"})]})]}),e.jsxs("div",{style:{display:"flex",alignItems:"flex-start",gap:"1rem",padding:"1rem",border:"1px solid var(--cedros-admin-border, #e5e5e5)",borderRadius:"0.5rem"},children:[e.jsx(j.Toggle,{checked:a.webhook_enabled,onChange:s=>i("webhook_enabled",s)}),e.jsxs("div",{style:{flex:1},children:[e.jsx("div",{style:{fontWeight:500},children:"Admin Purchase Notification"}),e.jsx("p",{style:{margin:"0.25rem 0 0",fontSize:"0.8125rem",opacity:.6},children:"Send webhook notifications to your server when a purchase is completed."}),e.jsx("p",{style:{margin:"0.5rem 0 0",fontSize:"0.75rem",opacity:.5},children:"Requires Webhook configuration"})]})]})]})]}),l==="email"&&e.jsxs("div",{className:"cedros-admin__section",children:[e.jsx("p",{style:{marginBottom:"1.5rem",fontSize:"0.875rem",opacity:.7},children:"Configure your email provider for sending customer notifications."}),!a.email_enabled&&e.jsx("div",{style:{padding:"1rem",marginBottom:"1.5rem",background:"var(--cedros-admin-bg-accent, #fef3c7)",borderRadius:"0.5rem",border:"1px solid var(--cedros-admin-warning, #f59e0b)",fontSize:"0.875rem"},children:"Email notifications are disabled. Enable them in the Messages tab."}),e.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"1rem",opacity:a.email_enabled?1:.5},children:[e.jsxs("div",{className:"cedros-admin__field",children:[e.jsx("label",{className:"cedros-admin__field-label",children:"SMTP Host"}),e.jsx("input",{type:"text",className:"cedros-admin__input",value:a.smtp_host,onChange:s=>i("smtp_host",s.target.value),placeholder:"smtp.example.com",disabled:!a.email_enabled})]}),e.jsxs("div",{className:"cedros-admin__field",children:[e.jsx("label",{className:"cedros-admin__field-label",children:"SMTP Port"}),e.jsx("input",{type:"number",className:"cedros-admin__input",value:a.smtp_port,onChange:s=>i("smtp_port",parseInt(s.target.value)||587),placeholder:"587",disabled:!a.email_enabled,style:{maxWidth:120}})]}),e.jsxs("div",{className:"cedros-admin__field",children:[e.jsx("label",{className:"cedros-admin__field-label",children:"SMTP Username"}),e.jsx("input",{type:"text",className:"cedros-admin__input",value:a.smtp_username,onChange:s=>i("smtp_username",s.target.value),placeholder:"username or API key",disabled:!a.email_enabled})]}),e.jsxs("div",{className:"cedros-admin__field",children:[e.jsx("label",{className:"cedros-admin__field-label",children:"SMTP Password"}),e.jsx("input",{type:"password",className:"cedros-admin__input",value:m.has("smtp_password")?a.smtp_password:"",onChange:s=>i("smtp_password",s.target.value),placeholder:a.smtp_password?"••••••••":"Enter password",disabled:!a.email_enabled})]}),e.jsxs("div",{className:"cedros-admin__field",children:[e.jsx("label",{className:"cedros-admin__field-label",children:"From Email"}),e.jsx("input",{type:"email",className:"cedros-admin__input",value:a.from_email,onChange:s=>i("from_email",s.target.value),placeholder:"orders@yourstore.com",disabled:!a.email_enabled})]}),e.jsxs("div",{className:"cedros-admin__field",children:[e.jsx("label",{className:"cedros-admin__field-label",children:"From Name"}),e.jsx("input",{type:"text",className:"cedros-admin__input",value:a.from_name,onChange:s=>i("from_name",s.target.value),placeholder:"Your Store",disabled:!a.email_enabled})]})]})]}),l==="webhooks"&&e.jsxs("div",{className:"cedros-admin__section",children:[e.jsx("p",{style:{marginBottom:"1.5rem",fontSize:"0.875rem",opacity:.7},children:"Configure webhook endpoint for receiving purchase notifications."}),!a.webhook_enabled&&e.jsx("div",{style:{padding:"1rem",marginBottom:"1.5rem",background:"var(--cedros-admin-bg-accent, #fef3c7)",borderRadius:"0.5rem",border:"1px solid var(--cedros-admin-warning, #f59e0b)",fontSize:"0.875rem"},children:"Webhook notifications are disabled. Enable them in the Messages tab."}),e.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"1rem",opacity:a.webhook_enabled?1:.5},children:[e.jsxs("div",{className:"cedros-admin__field",children:[e.jsx("label",{className:"cedros-admin__field-label",children:"Webhook URL"}),e.jsx("input",{type:"url",className:"cedros-admin__input",value:a.webhook_url,onChange:s=>i("webhook_url",s.target.value),placeholder:"https://api.yoursite.com/webhooks/orders",disabled:!a.webhook_enabled})]}),e.jsxs("div",{className:"cedros-admin__field",children:[e.jsx("label",{className:"cedros-admin__field-label",children:"Webhook Secret"}),e.jsx("input",{type:"password",className:"cedros-admin__input",value:m.has("webhook_secret")?a.webhook_secret:"",onChange:s=>i("webhook_secret",s.target.value),placeholder:a.webhook_secret?"••••••••":"Enter secret for HMAC-SHA256",disabled:!a.webhook_enabled}),e.jsx("p",{style:{margin:"0.25rem 0 0",fontSize:"0.75rem",opacity:.6},children:"Used for HMAC-SHA256 signature verification"})]}),e.jsxs("div",{className:"cedros-admin__field",children:[e.jsx("label",{className:"cedros-admin__field-label",children:"Timeout (seconds)"}),e.jsx("input",{type:"number",className:"cedros-admin__input",value:a.webhook_timeout,onChange:s=>i("webhook_timeout",parseInt(s.target.value)||30),placeholder:"30",disabled:!a.webhook_enabled,style:{maxWidth:120}})]})]})]})]})]})}exports.MessagingSection=W;
@@ -1,9 +1,9 @@
1
1
  import { jsxs as i, jsx as e } from "react/jsx-runtime";
2
2
  import { useState as m, useCallback as w, useEffect as W } from "react";
3
- import { $ as z, a0 as $ } from "./index-bbSf3B7-.mjs";
3
+ import { I as z, E as M } from "./index-75RhiLDq.mjs";
4
4
  import { T as N } from "./Toggle-DAxIdpY4.mjs";
5
- import { u as M } from "./useAutosave-YwMqRzqy.mjs";
6
- import { A as F } from "./AutosaveIndicator-G2CRN8hH.mjs";
5
+ import { u as $ } from "./useAutosave-YwMqRzqy.mjs";
6
+ import { A as F } from "./AutosaveIndicator-DTOaopUP.mjs";
7
7
  const g = {
8
8
  email_enabled: !1,
9
9
  smtp_host: "",
@@ -58,7 +58,7 @@ function U({ serverUrl: _, apiKey: n, authManager: r }) {
58
58
  } catch {
59
59
  throw f("Failed to save messaging settings"), new Error("Save failed");
60
60
  }
61
- }, [_, n, r, h]), { status: I, error: P } = M({
61
+ }, [_, n, r, h]), { status: I, error: P } = $({
62
62
  data: s,
63
63
  onSave: A,
64
64
  debounceMs: 1500,
@@ -111,7 +111,7 @@ function U({ serverUrl: _, apiKey: n, authManager: r }) {
111
111
  /* @__PURE__ */ e("div", { style: { flex: 1 } }),
112
112
  /* @__PURE__ */ e(F, { status: I, error: P })
113
113
  ] }),
114
- /* @__PURE__ */ e($, { message: E, onRetry: u }),
114
+ /* @__PURE__ */ e(M, { message: E, onRetry: u }),
115
115
  /* @__PURE__ */ i("div", { className: "cedros-admin__tab-content", style: { marginTop: "1rem" }, children: [
116
116
  l === "messages" && /* @__PURE__ */ i("div", { className: "cedros-admin__section", children: [
117
117
  /* @__PURE__ */ e("p", { style: { marginBottom: "1.5rem", fontSize: "0.875rem", opacity: 0.7 }, children: "Enable or disable notification types. Configure the delivery settings in the Email or Webhooks tab." }),
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),l=require("react"),p=require("./SingleCategorySettings-NLBYxM0O.js");function r({href:s,children:n}){return e.jsx("a",{href:s,target:"_blank",rel:"noopener noreferrer",style:{color:"inherit",textDecoration:"underline"},children:n})}const a=[{id:"stripe",label:"Stripe",category:"stripe",description:e.jsxs(e.Fragment,{children:["Configure your Stripe integration for card payments. Get your API keys from the"," ",e.jsx(r,{href:"https://dashboard.stripe.com/apikeys",children:"Stripe Dashboard"}),"."]})},{id:"crypto",label:"Crypto",category:"x402",description:e.jsxs(e.Fragment,{children:["Configure Solana wallet and token settings for crypto payments. Get a fast RPC endpoint from"," ",e.jsx(r,{href:"https://www.helius.dev",children:"Helius"})," or"," ",e.jsx(r,{href:"https://www.quicknode.com/chains/sol",children:"QuickNode"}),". Set up a payment address using"," ",e.jsx(r,{href:"https://phantom.app",children:"Phantom"})," or"," ",e.jsx(r,{href:"https://solflare.com",children:"Solflare"})," wallet."]})},{id:"credits",label:"Credits",category:"cedros_login",description:e.jsxs(e.Fragment,{children:["Configure Cedros Login integration for credits payments. See the"," ",e.jsx(r,{href:"https://docs.cedros.dev/credits",children:"Credits API documentation"}),"."]})}];function h({serverUrl:s,apiKey:n,authManager:c}){const[o,d]=l.useState("stripe"),i=a.find(t=>t.id===o);return e.jsxs("div",{className:"cedros-admin__payment-settings",children:[e.jsxs("div",{className:"cedros-admin__page-header",children:[e.jsx("h2",{className:"cedros-admin__page-title",children:"Payment Options"}),e.jsx("p",{className:"cedros-admin__page-description",children:"Configure payment methods including Stripe, crypto, and credits."})]}),e.jsx("div",{className:"cedros-admin__tabs cedros-admin__tabs--line",children:a.map(t=>e.jsx("button",{type:"button",className:`cedros-admin__tab ${o===t.id?"cedros-admin__tab--active":""}`,onClick:()=>d(t.id),children:t.label},t.id))}),e.jsx("div",{style:{marginTop:"1rem"},children:e.jsx(p.SingleCategorySettings,{serverUrl:s,apiKey:n,authManager:c,category:i.category,title:`${i.label} Settings`,description:i.description,showEnabledToggle:!0},i.category)})]})}exports.PaymentSettingsSection=h;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),l=require("react"),p=require("./SingleCategorySettings-BTXR7zex.js");function r({href:s,children:n}){return e.jsx("a",{href:s,target:"_blank",rel:"noopener noreferrer",style:{color:"inherit",textDecoration:"underline"},children:n})}const a=[{id:"stripe",label:"Stripe",category:"stripe",description:e.jsxs(e.Fragment,{children:["Configure your Stripe integration for card payments. Get your API keys from the"," ",e.jsx(r,{href:"https://dashboard.stripe.com/apikeys",children:"Stripe Dashboard"}),"."]})},{id:"crypto",label:"Crypto",category:"x402",description:e.jsxs(e.Fragment,{children:["Configure Solana wallet and token settings for crypto payments. Get a fast RPC endpoint from"," ",e.jsx(r,{href:"https://www.helius.dev",children:"Helius"})," or"," ",e.jsx(r,{href:"https://www.quicknode.com/chains/sol",children:"QuickNode"}),". Set up a payment address using"," ",e.jsx(r,{href:"https://phantom.app",children:"Phantom"})," or"," ",e.jsx(r,{href:"https://solflare.com",children:"Solflare"})," wallet."]})},{id:"credits",label:"Credits",category:"cedros_login",description:e.jsxs(e.Fragment,{children:["Configure Cedros Login integration for credits payments. See the"," ",e.jsx(r,{href:"https://docs.cedros.dev/credits",children:"Credits API documentation"}),"."]})}];function h({serverUrl:s,apiKey:n,authManager:c}){const[o,d]=l.useState("stripe"),i=a.find(t=>t.id===o);return e.jsxs("div",{className:"cedros-admin__payment-settings",children:[e.jsxs("div",{className:"cedros-admin__page-header",children:[e.jsx("h2",{className:"cedros-admin__page-title",children:"Payment Options"}),e.jsx("p",{className:"cedros-admin__page-description",children:"Configure payment methods including Stripe, crypto, and credits."})]}),e.jsx("div",{className:"cedros-admin__tabs cedros-admin__tabs--line",children:a.map(t=>e.jsx("button",{type:"button",className:`cedros-admin__tab ${o===t.id?"cedros-admin__tab--active":""}`,onClick:()=>d(t.id),children:t.label},t.id))}),e.jsx("div",{style:{marginTop:"1rem"},children:e.jsx(p.SingleCategorySettings,{serverUrl:s,apiKey:n,authManager:c,category:i.category,title:`${i.label} Settings`,description:i.description,showEnabledToggle:!0},i.category)})]})}exports.PaymentSettingsSection=h;
@@ -1,6 +1,6 @@
1
1
  import { jsxs as i, jsx as e, Fragment as s } from "react/jsx-runtime";
2
2
  import { useState as h } from "react";
3
- import { S as m } from "./SingleCategorySettings-8DCtLcow.mjs";
3
+ import { S as m } from "./SingleCategorySettings-Cwlehl0u.mjs";
4
4
  function r({ href: o, children: a }) {
5
5
  return /* @__PURE__ */ e(
6
6
  "a",
@@ -1,6 +1,6 @@
1
1
  import { jsxs as n, jsx as i } from "react/jsx-runtime";
2
2
  import { useState as g } from "react";
3
- import { S as l } from "./SingleCategorySettings-8DCtLcow.mjs";
3
+ import { S as l } from "./SingleCategorySettings-Cwlehl0u.mjs";
4
4
  const s = [
5
5
  {
6
6
  id: "logging",
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),d=require("react"),g=require("./SingleCategorySettings-NLBYxM0O.js"),n=[{id:"logging",label:"Logging",category:"logging",description:"Configure log levels, format, and environment settings."},{id:"metrics",label:"Metrics",category:"metrics",description:"Configure metrics collection and API access for monitoring."},{id:"security",label:"Security",category:"security",description:"Configure CORS, rate limiting, and other security settings."}];function l({serverUrl:r,apiKey:c,authManager:o}){const[s,a]=d.useState("logging"),t=n.find(i=>i.id===s);return e.jsxs("div",{className:"cedros-admin__server-settings",children:[e.jsxs("div",{className:"cedros-admin__page-header",children:[e.jsx("h2",{className:"cedros-admin__page-title",children:"Store Server"}),e.jsx("p",{className:"cedros-admin__page-description",children:"Configure logging, metrics, and security settings."})]}),e.jsx("div",{className:"cedros-admin__tabs cedros-admin__tabs--line",children:n.map(i=>e.jsx("button",{type:"button",className:`cedros-admin__tab ${s===i.id?"cedros-admin__tab--active":""}`,onClick:()=>a(i.id),children:i.label},i.id))}),e.jsx("div",{style:{marginTop:"1rem"},children:e.jsx(g.SingleCategorySettings,{serverUrl:r,apiKey:c,authManager:o,category:t.category,title:`${t.label} Settings`,description:t.description},t.category)})]})}exports.SettingsSection=l;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),d=require("react"),g=require("./SingleCategorySettings-BTXR7zex.js"),n=[{id:"logging",label:"Logging",category:"logging",description:"Configure log levels, format, and environment settings."},{id:"metrics",label:"Metrics",category:"metrics",description:"Configure metrics collection and API access for monitoring."},{id:"security",label:"Security",category:"security",description:"Configure CORS, rate limiting, and other security settings."}];function l({serverUrl:r,apiKey:c,authManager:o}){const[s,a]=d.useState("logging"),t=n.find(i=>i.id===s);return e.jsxs("div",{className:"cedros-admin__server-settings",children:[e.jsxs("div",{className:"cedros-admin__page-header",children:[e.jsx("h2",{className:"cedros-admin__page-title",children:"Store Server"}),e.jsx("p",{className:"cedros-admin__page-description",children:"Configure logging, metrics, and security settings."})]}),e.jsx("div",{className:"cedros-admin__tabs cedros-admin__tabs--line",children:n.map(i=>e.jsx("button",{type:"button",className:`cedros-admin__tab ${s===i.id?"cedros-admin__tab--active":""}`,onClick:()=>a(i.id),children:i.label},i.id))}),e.jsx("div",{style:{marginTop:"1rem"},children:e.jsx(g.SingleCategorySettings,{serverUrl:r,apiKey:c,authManager:o,category:t.category,title:`${t.label} Settings`,description:t.description},t.category)})]})}exports.SettingsSection=l;