@beamimpact/web-sdk 1.40.0 → 1.42.1

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 (320) hide show
  1. package/README.md +7 -11
  2. package/dist/chunks/_share-dialog-dependencies-KpCcT5X6.esm.js +2 -0
  3. package/dist/chunks/_share-dialog-dependencies-KpCcT5X6.esm.js.map +1 -0
  4. package/dist/chunks/_share-dialog-dependencies-vHG7OoOA.esm.js +2 -0
  5. package/dist/chunks/_share-dialog-dependencies-vHG7OoOA.esm.js.map +1 -0
  6. package/dist/chunks/cart-contents-h60geKWa.esm.js.map +1 -1
  7. package/dist/chunks/{cart-contents-3-9fB-7m.esm.d.ts → cart-contents-sUhfwLAz.esm.d.ts} +2 -1
  8. package/dist/chunks/checkbox-P2JYPqxl.esm.js +17 -0
  9. package/dist/chunks/checkbox-P2JYPqxl.esm.js.map +1 -0
  10. package/dist/chunks/{css-card-grid-7tObtoJx.esm.js → css-card-grid-r6wxRbPV.esm.js} +2 -2
  11. package/dist/chunks/{css-card-grid-7tObtoJx.esm.js.map → css-card-grid-r6wxRbPV.esm.js.map} +1 -1
  12. package/dist/chunks/enforce-config-HksNiOMu.esm.js +3 -0
  13. package/dist/chunks/enforce-config-HksNiOMu.esm.js.map +1 -0
  14. package/dist/chunks/enforce-config-er6B5Gkj.esm.js +3 -0
  15. package/dist/chunks/enforce-config-er6B5Gkj.esm.js.map +1 -0
  16. package/dist/chunks/{events-7cGXyV7_.esm.d.ts → events-QJc86_5Y.esm.d.ts} +2 -2
  17. package/dist/chunks/{events-Y8fYvSqM.esm.js → events-_4nImo3u.esm.js} +2 -2
  18. package/dist/chunks/{events-Y8fYvSqM.esm.js.map → events-_4nImo3u.esm.js.map} +1 -1
  19. package/dist/chunks/index--iA4GcfC.esm.js +2 -0
  20. package/dist/chunks/index--iA4GcfC.esm.js.map +1 -0
  21. package/dist/chunks/{index-uCfdsWtt.esm.js → index-1nI7l5vj.esm.js} +2 -2
  22. package/dist/chunks/{index-uCfdsWtt.esm.js.map → index-1nI7l5vj.esm.js.map} +1 -1
  23. package/dist/chunks/index-E8H5A7Qq.esm.js +2 -0
  24. package/dist/chunks/index-E8H5A7Qq.esm.js.map +1 -0
  25. package/dist/chunks/index-F1U8ROKG.esm.js +2 -0
  26. package/dist/chunks/index-F1U8ROKG.esm.js.map +1 -0
  27. package/dist/chunks/index-FQExZDX9.esm.js +2 -0
  28. package/dist/chunks/index-FQExZDX9.esm.js.map +1 -0
  29. package/dist/chunks/index-LF_9YLx7.esm.js +2 -0
  30. package/dist/chunks/index-LF_9YLx7.esm.js.map +1 -0
  31. package/dist/chunks/{index-8KzbQIsU.esm.d.ts → index-M-0eAFA6.esm.d.ts} +1 -1
  32. package/dist/chunks/index-MSOdvudi.esm.js +2 -0
  33. package/dist/chunks/index-MSOdvudi.esm.js.map +1 -0
  34. package/dist/chunks/{index-phDmC-TS.esm.js → index-NOF_HeFP.esm.js} +2 -2
  35. package/dist/chunks/index-NOF_HeFP.esm.js.map +1 -0
  36. package/dist/chunks/index-PiMq5a49.esm.js +2 -0
  37. package/dist/chunks/index-PiMq5a49.esm.js.map +1 -0
  38. package/dist/chunks/index-QeW-IaK9.esm.js +2 -0
  39. package/dist/chunks/index-QeW-IaK9.esm.js.map +1 -0
  40. package/dist/chunks/{index-rFBYAk7m.esm.d.ts → index-VHXu2kRx.esm.d.ts} +1 -1
  41. package/dist/chunks/index-XCMf22lv.esm.js +2 -0
  42. package/dist/chunks/index-XCMf22lv.esm.js.map +1 -0
  43. package/dist/chunks/{index-0VcD5nhV.esm.d.ts → index-ZgCs6F4e.esm.d.ts} +4 -4
  44. package/dist/chunks/{index-TOzSFOvI.esm.d.ts → index-_Hgu38MH.esm.d.ts} +1 -1
  45. package/dist/chunks/{index-SxFKifVJ.esm.d.ts → index-_UuYsIe9.esm.d.ts} +1 -1
  46. package/dist/chunks/index-e--9y-Sl.esm.js +2 -0
  47. package/dist/chunks/index-e--9y-Sl.esm.js.map +1 -0
  48. package/dist/chunks/{index-HBDtoJlQ.esm.d.ts → index-euJMrXIc.esm.d.ts} +1 -1
  49. package/dist/chunks/index-giTGb0gn.esm.js +2 -0
  50. package/dist/chunks/{index-fINTvZVX.esm.js.map → index-giTGb0gn.esm.js.map} +1 -1
  51. package/dist/chunks/{index-Hb-jziQs.esm.d.ts → index-hn6JhG_w.esm.d.ts} +7 -1
  52. package/dist/chunks/{index-6t9MtjyS.esm.d.ts → index-mTXm0DPh.esm.d.ts} +9 -1
  53. package/dist/chunks/{index-Q1vx4WtG.esm.js → index-mw70Caof.esm.js} +2 -2
  54. package/dist/chunks/{index-Q1vx4WtG.esm.js.map → index-mw70Caof.esm.js.map} +1 -1
  55. package/dist/chunks/{index-8yrr7ZZv.esm.js → index-n6QNFLXV.esm.js} +2 -2
  56. package/dist/chunks/index-n6QNFLXV.esm.js.map +1 -0
  57. package/dist/chunks/index-qjhWIDcT.esm.js +2 -0
  58. package/dist/chunks/{index-kxMe_AX1.esm.js.map → index-qjhWIDcT.esm.js.map} +1 -1
  59. package/dist/chunks/{index-uF-Qtewb.esm.js → index-x2kxA_Xo.esm.js} +2 -2
  60. package/dist/chunks/index-x2kxA_Xo.esm.js.map +1 -0
  61. package/dist/chunks/{index-Lw32NXij.esm.js → index-z8c9I9IQ.esm.js} +2 -2
  62. package/dist/chunks/index-z8c9I9IQ.esm.js.map +1 -0
  63. package/dist/chunks/{lit-qtGbjGnK.esm.js → lit-3QHn3fwl.esm.js} +5 -5
  64. package/dist/chunks/lit-3QHn3fwl.esm.js.map +1 -0
  65. package/dist/chunks/loading-template-mLjOGXMj.esm.js +2 -0
  66. package/dist/chunks/{loading-template-Av0IUyKF.esm.js.map → loading-template-mLjOGXMj.esm.js.map} +1 -1
  67. package/dist/chunks/localize-IRs8JglT.esm.js +29 -0
  68. package/dist/chunks/localize-IRs8JglT.esm.js.map +1 -0
  69. package/dist/chunks/localize-SsJbTmMj.esm.js +29 -0
  70. package/dist/chunks/localize-SsJbTmMj.esm.js.map +1 -0
  71. package/dist/chunks/{openapi-spec--MzXvfCC.esm.d.ts → openapi-spec--WoGcZgR.esm.d.ts} +232 -9
  72. package/dist/chunks/order-page-HoZ7DC0L.esm.js +2 -0
  73. package/dist/chunks/order-page-HoZ7DC0L.esm.js.map +1 -0
  74. package/dist/chunks/order-page-Ps8Qyjfg.esm.d.ts +74 -0
  75. package/dist/chunks/order-page-m5hkOPEQ.esm.js +2 -0
  76. package/dist/chunks/order-page-m5hkOPEQ.esm.js.map +1 -0
  77. package/dist/chunks/{progress-bar-Sn2QspHy.esm.js → progress-bar-HVG_n8_6.esm.js} +7 -6
  78. package/dist/chunks/progress-bar-HVG_n8_6.esm.js.map +1 -0
  79. package/dist/chunks/{promo-pill-label-j0A8qZ0c.esm.js → promo-pill-label-3Xtr5ALT.esm.js} +4 -3
  80. package/dist/chunks/{promo-pill-label-j0A8qZ0c.esm.js.map → promo-pill-label-3Xtr5ALT.esm.js.map} +1 -1
  81. package/dist/chunks/{responsive-aWj_7ZN_.esm.js → responsive-KbDsZM6S.esm.js} +2 -2
  82. package/dist/chunks/{responsive-aWj_7ZN_.esm.js.map → responsive-KbDsZM6S.esm.js.map} +1 -1
  83. package/dist/chunks/routes-qbvie7oI.esm.d.ts +445 -0
  84. package/dist/chunks/routes-sc6xljWU.esm.js +2 -0
  85. package/dist/chunks/routes-sc6xljWU.esm.js.map +1 -0
  86. package/dist/chunks/routes-zzEfDMIn.esm.js +2 -0
  87. package/dist/chunks/routes-zzEfDMIn.esm.js.map +1 -0
  88. package/dist/chunks/share-button-AUvXGlky.esm.js +163 -0
  89. package/dist/chunks/share-button-AUvXGlky.esm.js.map +1 -0
  90. package/dist/chunks/share-button-CqTd80g8.esm.js +2 -0
  91. package/dist/chunks/share-button-CqTd80g8.esm.js.map +1 -0
  92. package/dist/chunks/share-button-hDn8fnBI.esm.d.ts +22 -0
  93. package/dist/chunks/share-button-wmGQW923.esm.js +163 -0
  94. package/dist/chunks/share-button-wmGQW923.esm.js.map +1 -0
  95. package/dist/chunks/shoelace-components-29N4dEDv.esm.js +2 -0
  96. package/dist/chunks/shoelace-components-29N4dEDv.esm.js.map +1 -0
  97. package/dist/chunks/shoelace-components-YboJNgEe.esm.js +2 -0
  98. package/dist/chunks/shoelace-components-YboJNgEe.esm.js.map +1 -0
  99. package/dist/chunks/{types-CfbVJRfU.esm.d.ts → types-zbTZ8-KP.esm.d.ts} +4 -1
  100. package/dist/chunks/{update-cart-xaWdPxse.esm.d.ts → update-cart-SajqAoez.esm.d.ts} +2 -1
  101. package/dist/chunks/update-cart-_5yw3Tg7.esm.js +2 -0
  102. package/dist/chunks/update-cart-_5yw3Tg7.esm.js.map +1 -0
  103. package/dist/chunks/update-cart-yfZE8kwS.esm.js +2 -0
  104. package/dist/chunks/update-cart-yfZE8kwS.esm.js.map +1 -0
  105. package/dist/chunks/{vendor-jQ8cxMpw.esm.js → vendor--f7lkyBk.esm.js} +44 -44
  106. package/dist/chunks/vendor--f7lkyBk.esm.js.map +1 -0
  107. package/dist/components/beam-partner-logos.esm.js +2 -2
  108. package/dist/components/beam-partner-logos.esm.js.map +1 -1
  109. package/dist/components/beam-partner-logos.js +2 -2
  110. package/dist/components/beam-partner-logos.js.map +1 -1
  111. package/dist/components/community-impact.d.ts +1 -1
  112. package/dist/components/community-impact.esm.js +15 -9
  113. package/dist/components/community-impact.esm.js.map +1 -1
  114. package/dist/components/community-impact.js +15 -9
  115. package/dist/components/community-impact.js.map +1 -1
  116. package/dist/components/cumulative-impact.d.ts +1 -1
  117. package/dist/components/cumulative-impact.esm.js +1 -1
  118. package/dist/components/cumulative-impact.esm.js.map +1 -1
  119. package/dist/components/cumulative-impact.js +1 -1
  120. package/dist/components/cumulative-impact.js.map +1 -1
  121. package/dist/components/impact-overview.d.ts +16 -4
  122. package/dist/components/impact-overview.esm.js +29 -146
  123. package/dist/components/impact-overview.esm.js.map +1 -1
  124. package/dist/components/impact-overview.js +29 -146
  125. package/dist/components/impact-overview.js.map +1 -1
  126. package/dist/components/index.d.ts +8 -3
  127. package/dist/components/index.esm.js +1 -1
  128. package/dist/components/index.js +1 -1
  129. package/dist/components/post-purchase.d.ts +6 -3
  130. package/dist/components/post-purchase.esm.js +2 -1
  131. package/dist/components/post-purchase.esm.js.map +1 -1
  132. package/dist/components/post-purchase.js +2 -1
  133. package/dist/components/post-purchase.js.map +1 -1
  134. package/dist/components/product-details-page.d.ts +6 -0
  135. package/dist/components/product-details-page.esm.js +5 -5
  136. package/dist/components/product-details-page.esm.js.map +1 -1
  137. package/dist/components/product-details-page.js +5 -5
  138. package/dist/components/product-details-page.js.map +1 -1
  139. package/dist/components/redeem-transaction.d.ts +4 -3
  140. package/dist/components/redeem-transaction.esm.js +44 -55
  141. package/dist/components/redeem-transaction.esm.js.map +1 -1
  142. package/dist/components/redeem-transaction.js +44 -55
  143. package/dist/components/redeem-transaction.js.map +1 -1
  144. package/dist/components/select-nonprofit.d.ts +3 -3
  145. package/dist/components/select-nonprofit.esm.js +48 -43
  146. package/dist/components/select-nonprofit.esm.js.map +1 -1
  147. package/dist/components/select-nonprofit.js +48 -43
  148. package/dist/components/select-nonprofit.js.map +1 -1
  149. package/dist/components/select-subscription-nonprofit.d.ts +67 -0
  150. package/dist/components/select-subscription-nonprofit.esm.js +373 -0
  151. package/dist/components/select-subscription-nonprofit.esm.js.map +1 -0
  152. package/dist/components/select-subscription-nonprofit.js +373 -0
  153. package/dist/components/select-subscription-nonprofit.js.map +1 -0
  154. package/dist/components/shopify.d.ts +8 -6
  155. package/dist/components/shopify.esm.js +1 -1
  156. package/dist/components/shopify.esm.js.map +1 -1
  157. package/dist/components/shopify.js +1 -1
  158. package/dist/components/shopify.js.map +1 -1
  159. package/dist/components/social-share.d.ts +47 -0
  160. package/dist/components/social-share.esm.js +170 -0
  161. package/dist/components/social-share.esm.js.map +1 -0
  162. package/dist/components/social-share.js +170 -0
  163. package/dist/components/social-share.js.map +1 -0
  164. package/dist/components/subscription-impact.d.ts +179 -0
  165. package/dist/components/subscription-impact.esm.js +269 -0
  166. package/dist/components/subscription-impact.esm.js.map +1 -0
  167. package/dist/components/subscription-impact.js +269 -0
  168. package/dist/components/subscription-impact.js.map +1 -0
  169. package/dist/components/subscription-management.d.ts +143 -14
  170. package/dist/components/subscription-management.esm.js +267 -31
  171. package/dist/components/subscription-management.esm.js.map +1 -1
  172. package/dist/components/subscription-management.js +267 -31
  173. package/dist/components/subscription-management.js.map +1 -1
  174. package/dist/index.d.ts +23 -14
  175. package/dist/index.esm.js +1 -1
  176. package/dist/index.js +1 -1
  177. package/dist/integrations/beam.d.ts +1 -1
  178. package/dist/integrations/beam.esm.js +1 -1
  179. package/dist/integrations/beam.js +1 -1
  180. package/dist/integrations/cart.d.ts +3 -3
  181. package/dist/integrations/cart.esm.js +1 -1
  182. package/dist/integrations/cart.js +1 -1
  183. package/dist/integrations/index.d.ts +12 -10
  184. package/dist/integrations/index.esm.js +1 -1
  185. package/dist/integrations/index.js +1 -1
  186. package/dist/integrations/logs.d.ts +2 -2
  187. package/dist/integrations/logs.esm.js +1 -1
  188. package/dist/integrations/logs.js +1 -1
  189. package/dist/integrations/session.esm.js +1 -1
  190. package/dist/integrations/session.js +1 -1
  191. package/dist/integrations/shopify.d.ts +7 -5
  192. package/dist/integrations/shopify.esm.js +1 -1
  193. package/dist/integrations/shopify.js +1 -1
  194. package/dist/integrations/statsig.d.ts +1 -1
  195. package/dist/integrations/statsig.esm.js +14 -10
  196. package/dist/integrations/statsig.esm.js.map +1 -1
  197. package/dist/integrations/statsig.js +14 -10
  198. package/dist/integrations/statsig.js.map +1 -1
  199. package/dist/integrations/utils.d.ts +4 -4
  200. package/dist/integrations/utils.esm.js +1 -1
  201. package/dist/integrations/utils.js +1 -1
  202. package/dist/react/beam-partner-logos.esm.js +1 -1
  203. package/dist/react/beam-partner-logos.js +1 -1
  204. package/dist/react/community-impact.d.ts +1 -1
  205. package/dist/react/community-impact.esm.js +1 -1
  206. package/dist/react/community-impact.esm.js.map +1 -1
  207. package/dist/react/community-impact.js +1 -1
  208. package/dist/react/community-impact.js.map +1 -1
  209. package/dist/react/cumulative-impact.d.ts +1 -1
  210. package/dist/react/cumulative-impact.esm.js +1 -1
  211. package/dist/react/cumulative-impact.esm.js.map +1 -1
  212. package/dist/react/cumulative-impact.js +1 -1
  213. package/dist/react/cumulative-impact.js.map +1 -1
  214. package/dist/react/impact-overview.d.ts +2 -1
  215. package/dist/react/impact-overview.esm.js +1 -1
  216. package/dist/react/impact-overview.esm.js.map +1 -1
  217. package/dist/react/impact-overview.js +1 -1
  218. package/dist/react/impact-overview.js.map +1 -1
  219. package/dist/react/index.d.ts +14 -4
  220. package/dist/react/index.esm.js +1 -1
  221. package/dist/react/index.js +1 -1
  222. package/dist/react/post-purchase.d.ts +4 -3
  223. package/dist/react/post-purchase.esm.js +1 -1
  224. package/dist/react/post-purchase.esm.js.map +1 -1
  225. package/dist/react/post-purchase.js +1 -1
  226. package/dist/react/post-purchase.js.map +1 -1
  227. package/dist/react/product-details-page.esm.js +1 -1
  228. package/dist/react/product-details-page.esm.js.map +1 -1
  229. package/dist/react/product-details-page.js +1 -1
  230. package/dist/react/product-details-page.js.map +1 -1
  231. package/dist/react/redeem-transaction.d.ts +4 -4
  232. package/dist/react/redeem-transaction.esm.js +1 -1
  233. package/dist/react/redeem-transaction.esm.js.map +1 -1
  234. package/dist/react/redeem-transaction.js +1 -1
  235. package/dist/react/redeem-transaction.js.map +1 -1
  236. package/dist/react/select-nonprofit.d.ts +4 -4
  237. package/dist/react/select-nonprofit.esm.js +1 -1
  238. package/dist/react/select-nonprofit.esm.js.map +1 -1
  239. package/dist/react/select-nonprofit.js +1 -1
  240. package/dist/react/select-nonprofit.js.map +1 -1
  241. package/dist/react/select-subscription-nonprofit.d.ts +19 -0
  242. package/dist/react/select-subscription-nonprofit.esm.js +2 -0
  243. package/dist/react/select-subscription-nonprofit.esm.js.map +1 -0
  244. package/dist/react/select-subscription-nonprofit.js +2 -0
  245. package/dist/react/select-subscription-nonprofit.js.map +1 -0
  246. package/dist/react/social-share.d.ts +12 -0
  247. package/dist/react/social-share.esm.js +2 -0
  248. package/dist/react/social-share.esm.js.map +1 -0
  249. package/dist/react/social-share.js +2 -0
  250. package/dist/react/social-share.js.map +1 -0
  251. package/dist/react/subscription-impact.d.ts +13 -0
  252. package/dist/react/subscription-impact.esm.js +2 -0
  253. package/dist/react/subscription-impact.esm.js.map +1 -0
  254. package/dist/react/subscription-impact.js +2 -0
  255. package/dist/react/subscription-impact.js.map +1 -0
  256. package/dist/react/subscription-management.d.ts +9 -8
  257. package/dist/react/subscription-management.esm.js +1 -1
  258. package/dist/react/subscription-management.esm.js.map +1 -1
  259. package/dist/react/subscription-management.js +1 -1
  260. package/dist/react/subscription-management.js.map +1 -1
  261. package/dist/utils/events.d.ts +4 -4
  262. package/dist/utils/events.esm.js +1 -1
  263. package/dist/utils/events.js +1 -1
  264. package/dist/utils/index.d.ts +4 -4
  265. package/dist/utils/index.esm.js +1 -1
  266. package/dist/utils/index.js +1 -1
  267. package/dist/utils/network-listeners.esm.js +1 -1
  268. package/dist/utils/network-listeners.js +1 -1
  269. package/package.json +1 -1
  270. package/dist/chunks/_share-dialog-dependencies-1vD2dmjh.esm.js +0 -2
  271. package/dist/chunks/_share-dialog-dependencies-1vD2dmjh.esm.js.map +0 -1
  272. package/dist/chunks/_share-dialog-dependencies-jvbBs-cC.esm.js +0 -2
  273. package/dist/chunks/_share-dialog-dependencies-jvbBs-cC.esm.js.map +0 -1
  274. package/dist/chunks/index-8yrr7ZZv.esm.js.map +0 -1
  275. package/dist/chunks/index-EHubF2KN.esm.js +0 -2
  276. package/dist/chunks/index-EHubF2KN.esm.js.map +0 -1
  277. package/dist/chunks/index-FIfx75-P.esm.js +0 -2
  278. package/dist/chunks/index-FIfx75-P.esm.js.map +0 -1
  279. package/dist/chunks/index-GocMPeWn.esm.js +0 -2
  280. package/dist/chunks/index-GocMPeWn.esm.js.map +0 -1
  281. package/dist/chunks/index-HyzTMHYl.esm.js +0 -2
  282. package/dist/chunks/index-HyzTMHYl.esm.js.map +0 -1
  283. package/dist/chunks/index-LmCqzg5B.esm.js +0 -2
  284. package/dist/chunks/index-LmCqzg5B.esm.js.map +0 -1
  285. package/dist/chunks/index-Lw32NXij.esm.js.map +0 -1
  286. package/dist/chunks/index-V-BsPYtl.esm.js +0 -2
  287. package/dist/chunks/index-V-BsPYtl.esm.js.map +0 -1
  288. package/dist/chunks/index-bUooCSdc.esm.js +0 -2
  289. package/dist/chunks/index-bUooCSdc.esm.js.map +0 -1
  290. package/dist/chunks/index-cekgAcEE.esm.js +0 -2
  291. package/dist/chunks/index-cekgAcEE.esm.js.map +0 -1
  292. package/dist/chunks/index-fINTvZVX.esm.js +0 -2
  293. package/dist/chunks/index-iMRMlkF3.esm.js +0 -2
  294. package/dist/chunks/index-iMRMlkF3.esm.js.map +0 -1
  295. package/dist/chunks/index-kxMe_AX1.esm.js +0 -2
  296. package/dist/chunks/index-o7YiP4gC.esm.js +0 -2
  297. package/dist/chunks/index-o7YiP4gC.esm.js.map +0 -1
  298. package/dist/chunks/index-phDmC-TS.esm.js.map +0 -1
  299. package/dist/chunks/index-uF-Qtewb.esm.js.map +0 -1
  300. package/dist/chunks/lit-qtGbjGnK.esm.js.map +0 -1
  301. package/dist/chunks/loading-template-Av0IUyKF.esm.js +0 -2
  302. package/dist/chunks/localize-F31ae3j6.esm.js +0 -30
  303. package/dist/chunks/localize-F31ae3j6.esm.js.map +0 -1
  304. package/dist/chunks/localize-fH8KOrMi.esm.js +0 -30
  305. package/dist/chunks/localize-fH8KOrMi.esm.js.map +0 -1
  306. package/dist/chunks/order-page-0azkW5QD.esm.js +0 -2
  307. package/dist/chunks/order-page-0azkW5QD.esm.js.map +0 -1
  308. package/dist/chunks/order-page-DPx5SUKM.esm.d.ts +0 -255
  309. package/dist/chunks/order-page-n12hvsCN.esm.js +0 -2
  310. package/dist/chunks/order-page-n12hvsCN.esm.js.map +0 -1
  311. package/dist/chunks/progress-bar-Sn2QspHy.esm.js.map +0 -1
  312. package/dist/chunks/routes-31m626dW.esm.js +0 -2
  313. package/dist/chunks/routes-31m626dW.esm.js.map +0 -1
  314. package/dist/chunks/routes-sbqL3QFm.esm.js +0 -2
  315. package/dist/chunks/routes-sbqL3QFm.esm.js.map +0 -1
  316. package/dist/chunks/update-cart-NEt4A8dB.esm.js +0 -2
  317. package/dist/chunks/update-cart-NEt4A8dB.esm.js.map +0 -1
  318. package/dist/chunks/update-cart-XAwwFxhS.esm.js +0 -2
  319. package/dist/chunks/update-cart-XAwwFxhS.esm.js.map +0 -1
  320. package/dist/chunks/vendor-jQ8cxMpw.esm.js.map +0 -1
package/README.md CHANGED
@@ -42,7 +42,7 @@ Beam takes care of all the nonprofit management and compliance, impact tracking,
42
42
 
43
43
  <br />
44
44
 
45
- <img src="https://production-beam-widgets.beamimpact.com/assets/img/screenshots/beam-select-nonprofit.png"
45
+ <img src="https://sdk.beamimpact.com/assets/img/screenshots/beam-select-nonprofit.png"
46
46
  alt="Screenshot of Beam widget" />
47
47
 
48
48
  The Beam Web SDK provides a set of web components and framework-specific wrappers for
@@ -62,7 +62,7 @@ Include the script for the widget you want to use at the top of the page:
62
62
  <script
63
63
  type="module"
64
64
  crossorigin
65
- src="https://production-beam-widgets.beamimpact.com/web-sdk/v1.36.1/dist/components/community-impact.js"
65
+ src="https://sdk.beamimpact.com/web-sdk/v1.36.1/dist/components/community-impact.js"
66
66
  ></script>
67
67
  ```
68
68
 
@@ -244,7 +244,7 @@ A wrapper component that registers transactions and renders either the `beam-imp
244
244
  `beam-redeem-transaction` widget, depending on if the user made a selection before purchase or not.
245
245
 
246
246
  ```html
247
- <script src="https://production-beam-widgets.beamimpact.com/web-sdk/v1.36.1/dist/components/post-purchase.js"></script>
247
+ <script src="https://sdk.beamimpact.com/web-sdk/v1.36.1/dist/components/post-purchase.js"></script>
248
248
 
249
249
  <beam-post-purchase apiKey="abc123"></beam-post-purchase>
250
250
  ```
@@ -295,7 +295,7 @@ Use `beam-post-purchase::part(impact-overview)` or `beam-post-purchase::part(red
295
295
  Integrating Beam with your cart allows for customizing the available nonprofits based on the items in the cart.
296
296
 
297
297
  ```ts
298
- import { updateCart } from "https://production-beam-widgets.beamimpact.com/web-sdk/v1.36.1/dist/integrations/cart.js";
298
+ import { updateCart } from "https://sdk.beamimpact.com/web-sdk/v1.36.1/dist/integrations/cart.js";
299
299
 
300
300
  // on cart change
301
301
  const cart = {
@@ -331,7 +331,7 @@ checkout flow, and to track the cart token and cart value for the Beam ROI calcu
331
331
 
332
332
  ```html
333
333
  <script type="module" async crossorigin>
334
- import { registerCartIntegration } from "https://production-beam-widgets.beamimpact.com/web-sdk/v1.36.0/dist/integrations/shopify.esm.js";
334
+ import { registerCartIntegration } from "https://sdk.beamimpact.com/web-sdk/v1.36.0/dist/integrations/shopify.esm.js";
335
335
 
336
336
  registerCartIntegration({
337
337
  apiKey: "abc123",
@@ -344,7 +344,7 @@ checkout flow, and to track the cart token and cart value for the Beam ROI calcu
344
344
  Post-purchase script:
345
345
 
346
346
  ```ts
347
- import { showOrderPageWidgets } from "https://production-beam-widgets.beamimpact.com/web-sdk/v1.36.0/dist/integrations/shopify.esm.js";
347
+ import { showOrderPageWidgets } from "https://sdk.beamimpact.com/web-sdk/v1.36.0/dist/integrations/shopify.esm.js";
348
348
 
349
349
  await showBeamOrderPageWidgets({
350
350
  apiKey: beam.apiKey,
@@ -373,11 +373,7 @@ Several utilities are exposed which making integrating with existing application
373
373
  3. `events` contains Beam custom events classes / event names.
374
374
 
375
375
  ```js
376
- import {
377
- waitForElement,
378
- errors,
379
- events,
380
- } from "https://production-beam-widgets.beamimpact.com/web-sdk/v1.36.1/dist/integrations/utils.js";
376
+ import { waitForElement, errors, events } from "https://sdk.beamimpact.com/web-sdk/v1.36.1/dist/integrations/utils.js";
381
377
 
382
378
  try {
383
379
  const parentElement = await waitForElement("#my-selector", { timeout: 1000 });
@@ -0,0 +1,2 @@
1
+ import"./vendor--f7lkyBk.esm.js";import"./shoelace-components-29N4dEDv.esm.js";import"./lit-3QHn3fwl.esm.js";import"./routes-sc6xljWU.esm.js";import"./beam-errors-P-Lu07Ce.esm.js";import"../utils/logger.js";
2
+ //# sourceMappingURL=_share-dialog-dependencies-KpCcT5X6.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"_share-dialog-dependencies-KpCcT5X6.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ import"./vendor--f7lkyBk.esm.js";import"./shoelace-components-YboJNgEe.esm.js";import"./lit-3QHn3fwl.esm.js";import"./routes-zzEfDMIn.esm.js";import"./beam-errors-P-Lu07Ce.esm.js";import"../utils/logger.esm.js";
2
+ //# sourceMappingURL=_share-dialog-dependencies-vHG7OoOA.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"_share-dialog-dependencies-vHG7OoOA.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -1 +1 @@
1
- {"version":3,"file":"cart-contents-h60geKWa.esm.js","sources":["../../src/shared/cart-contents.ts"],"sourcesContent":["import { paths } from \"../api-sdk/v3/openapi-spec\";\n\nexport type TCartApi =\n paths[\"/chain/findEligibleNonprofitsForCart\"][\"post\"][\"requestBody\"][\"content\"][\"application/json\"][\"cart\"];\n\n// Same as type from API but with non-optional fields, so we can use where Shopify guarantees values\nexport type TCart = TCartApi & {\n content: {\n items: Record<string, any>[];\n };\n};\n\nexport type TCartItems = TCart[\"content\"][\"items\"];\n\nexport type TBeamCartLocalStorage = {\n cartId: string;\n beamCartId?: string;\n subtotal: number;\n itemCount: number;\n currencyCode: string;\n} & TCart;\n\nexport const BEAM_CART_COOKIE_NAME = \"beam_cart\";\n"],"names":["BEAM_CART_COOKIE_NAME"],"mappings":"AAsBO,MAAMA,EAAwB"}
1
+ {"version":3,"file":"cart-contents-h60geKWa.esm.js","sources":["../../src/shared/cart-contents.ts"],"sourcesContent":["import { paths } from \"../api-sdk/v3/openapi-spec\";\n\nexport type TCartApi =\n paths[\"/chain/findEligibleNonprofitsForCart\"][\"post\"][\"requestBody\"][\"content\"][\"application/json\"][\"cart\"];\n\n// Same as type from API but with non-optional fields, so we can use where Shopify guarantees values\nexport type TCart = TCartApi & {\n content: {\n items: Record<string, any>[];\n discounts?: Record<string, any>[] | undefined | null;\n };\n};\n\nexport type TCartItems = TCart[\"content\"][\"items\"];\n\nexport type TCartDiscounts = TCart[\"content\"][\"discounts\"];\n\nexport type TBeamCartLocalStorage = {\n cartId: string;\n beamCartId?: string;\n subtotal: number;\n itemCount: number;\n currencyCode: string;\n} & TCart;\n\nexport const BEAM_CART_COOKIE_NAME = \"beam_cart\";\n"],"names":["BEAM_CART_COOKIE_NAME"],"mappings":"AAyBO,MAAMA,EAAwB"}
@@ -1,9 +1,10 @@
1
- import { p as paths } from './openapi-spec--MzXvfCC.esm.js';
1
+ import { p as paths } from './openapi-spec--WoGcZgR.esm.js';
2
2
 
3
3
  type TCartApi = paths["/chain/findEligibleNonprofitsForCart"]["post"]["requestBody"]["content"]["application/json"]["cart"];
4
4
  type TCart = TCartApi & {
5
5
  content: {
6
6
  items: Record<string, any>[];
7
+ discounts?: Record<string, any>[] | undefined | null;
7
8
  };
8
9
  };
9
10
 
@@ -0,0 +1,17 @@
1
+ import{y as e,k as i}from"./lit-3QHn3fwl.esm.js";const l=({height:t="1em",width:o="1em"}={})=>e`
2
+ <svg
3
+ style="${i({height:t,width:o,position:"relative",bottom:"0"})}"
4
+ xmlns="http://www.w3.org/2000/svg"
5
+ viewBox="0 0 78.369 78.369"
6
+ >
7
+ <g>
8
+ <path
9
+ d="M78.049,19.015L29.458,67.606c-0.428,0.428-1.121,0.428-1.548,0L0.32,40.015c-0.427-0.426-0.427-1.119,0-1.547l6.704-6.704
10
+ c0.428-0.427,1.121-0.427,1.548,0l20.113,20.112l41.113-41.113c0.429-0.427,1.12-0.427,1.548,0l6.703,6.704
11
+ C78.477,17.894,78.477,18.586,78.049,19.015z"
12
+ style="fill: currentColor"
13
+ />
14
+ </g>
15
+ </svg>
16
+ `;export{l as _};
17
+ //# sourceMappingURL=checkbox-P2JYPqxl.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"checkbox-P2JYPqxl.esm.js","sources":["../../src/shared/fragments/checkbox.ts"],"sourcesContent":["import { html } from \"lit\";\nimport { styleMap } from \"lit/directives/style-map.js\";\n\nexport const _checkbox = ({ height = \"1em\", width = \"1em\" } = {}) =>\n html`\n <svg\n style=\"${styleMap({ height, width, position: \"relative\", bottom: \"0\" })}\"\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 78.369 78.369\"\n >\n <g>\n <path\n d=\"M78.049,19.015L29.458,67.606c-0.428,0.428-1.121,0.428-1.548,0L0.32,40.015c-0.427-0.426-0.427-1.119,0-1.547l6.704-6.704\n c0.428-0.427,1.121-0.427,1.548,0l20.113,20.112l41.113-41.113c0.429-0.427,1.12-0.427,1.548,0l6.703,6.704\n C78.477,17.894,78.477,18.586,78.049,19.015z\"\n style=\"fill: currentColor\"\n />\n </g>\n </svg>\n `;\n"],"names":["_checkbox","height","width","html","styleMap"],"mappings":"iDAGa,MAAAA,EAAY,CAAC,CAAE,OAAAC,EAAS,MAAO,MAAAC,EAAQ,KAAM,EAAI,CAC5DC,IAAAA;AAAAA;AAAAA,eAEaC,EAAS,CAAE,OAAAH,EAAQ,MAAAC,EAAO,SAAU,WAAY,OAAQ,GAAI,CAAC,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;"}
@@ -1,4 +1,4 @@
1
- import{f as g,j as a}from"./lit-qtGbjGnK.esm.js";const o=({className:i="cardGrid",gap:t="30px",columnCount:r=2,itemMinWidth:d="300px"}={})=>g`
1
+ import{f as g,j as a}from"./lit-3QHn3fwl.esm.js";const o=({className:i="cardGrid",gap:t="30px",columnCount:r=2,itemMinWidth:d="300px"}={})=>g`
2
2
  .${a(i)} {
3
3
  --grid-layout-gap: ${a(t)};
4
4
  --grid-column-count: ${a(r)};
@@ -17,4 +17,4 @@ import{f as g,j as a}from"./lit-qtGbjGnK.esm.js";const o=({className:i="cardGrid
17
17
  grid-auto-rows: 1fr; /* make all the rows the same height */
18
18
  }
19
19
  `;export{o as c};
20
- //# sourceMappingURL=css-card-grid-7tObtoJx.esm.js.map
20
+ //# sourceMappingURL=css-card-grid-r6wxRbPV.esm.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"css-card-grid-7tObtoJx.esm.js","sources":["../../src/shared/fragments/css-card-grid.ts"],"sourcesContent":["import { css, unsafeCSS } from \"lit\";\n\nexport const cssCardGrid = ({\n className = \"cardGrid\",\n gap = \"30px\",\n columnCount = 2,\n itemMinWidth = \"300px\",\n}: { className?: string; gap?: string; columnCount?: number | string; itemMinWidth?: string } = {}) => css`\n .${unsafeCSS(className)} {\n --grid-layout-gap: ${unsafeCSS(gap)};\n --grid-column-count: ${unsafeCSS(columnCount)};\n --grid-item--min-width: ${unsafeCSS(itemMinWidth)};\n\n --gap-count: calc(var(--grid-column-count) - 1);\n --total-gap-width: calc(var(--gap-count) * var(--grid-layout-gap));\n --grid-item--max-width: calc((100% - var(--total-gap-width)) / var(--grid-column-count));\n\n display: grid;\n grid-template-columns: repeat(\n auto-fill,\n minmax(max(var(--grid-item--min-width), var(--grid-item--max-width)), 1fr)\n );\n grid-gap: var(--grid-layout-gap);\n grid-auto-rows: 1fr; /* make all the rows the same height */\n }\n`;\n"],"names":["cssCardGrid","className","gap","columnCount","itemMinWidth","css","unsafeCSS"],"mappings":"iDAEa,MAAAA,EAAc,CAAC,CAC1B,UAAAC,EAAY,WACZ,IAAAC,EAAM,OACN,YAAAC,EAAc,EACd,aAAAC,EAAe,OACjB,EAAgG,CAAOC,IAAAA;AAAAA,KAClGC,EAAUL,CAAS,CAAC;AAAA,yBACAK,EAAUJ,CAAG,CAAC;AAAA,2BACZI,EAAUH,CAAW,CAAC;AAAA,8BACnBG,EAAUF,CAAY,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;"}
1
+ {"version":3,"file":"css-card-grid-r6wxRbPV.esm.js","sources":["../../src/shared/fragments/css-card-grid.ts"],"sourcesContent":["import { css, unsafeCSS } from \"lit\";\n\nexport const cssCardGrid = ({\n className = \"cardGrid\",\n gap = \"30px\",\n columnCount = 2,\n itemMinWidth = \"300px\",\n}: { className?: string; gap?: string; columnCount?: number | string; itemMinWidth?: string } = {}) => css`\n .${unsafeCSS(className)} {\n --grid-layout-gap: ${unsafeCSS(gap)};\n --grid-column-count: ${unsafeCSS(columnCount)};\n --grid-item--min-width: ${unsafeCSS(itemMinWidth)};\n\n --gap-count: calc(var(--grid-column-count) - 1);\n --total-gap-width: calc(var(--gap-count) * var(--grid-layout-gap));\n --grid-item--max-width: calc((100% - var(--total-gap-width)) / var(--grid-column-count));\n\n display: grid;\n grid-template-columns: repeat(\n auto-fill,\n minmax(max(var(--grid-item--min-width), var(--grid-item--max-width)), 1fr)\n );\n grid-gap: var(--grid-layout-gap);\n grid-auto-rows: 1fr; /* make all the rows the same height */\n }\n`;\n"],"names":["cssCardGrid","className","gap","columnCount","itemMinWidth","css","unsafeCSS"],"mappings":"iDAEa,MAAAA,EAAc,CAAC,CAC1B,UAAAC,EAAY,WACZ,IAAAC,EAAM,OACN,YAAAC,EAAc,EACd,aAAAC,EAAe,OACjB,EAAgG,CAAOC,IAAAA;AAAAA,KAClGC,EAAUL,CAAS,CAAC;AAAA,yBACAK,EAAUJ,CAAG,CAAC;AAAA,2BACZI,EAAUH,CAAW,CAAC;AAAA,8BACnBG,EAAUF,CAAY,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;"}
@@ -0,0 +1,3 @@
1
+ import{f as r}from"./lit-3QHn3fwl.esm.js";import{M as s,I as a}from"./beam-errors-P-Lu07Ce.esm.js";import{logger as l}from"../utils/logger.esm.js";const d=r`html,body,p,ol,ul,li,dl,dt,dd,blockquote,figure,fieldset,legend,textarea,pre,iframe,hr,h1,h2,h3,h4,h5,h6{margin:0;padding:0}h1,h2,h3,h4,h5,h6{font-size:100%;font-weight:normal}ul{list-style:none}button,input,select{margin:0}html{box-sizing:border-box}*,*::before,*::after{box-sizing:inherit}img,video{/*height:auto;*/max-width:100%}iframe{border:0}table{border-collapse:collapse;border-spacing:0}td,th{padding:0}`;function f(i,e=i.tagName){customElements.get(e)||customElements.define(e,i)}function h(i,e){const t=[],n=e;for(const o of i)n[o]==null&&t.push(o);if(t.length>0)throw l.error(`Beam Impact - Missing Required Config Values:
2
+ `,t.join(", "),e),new s(t);return!0}function m(i,e){return i.every(t=>t in e&&e[t]!=null)}function u(i,e){if(i.every(t=>e[t]!==null&&e[t]!==void 0))throw new a}export{u as a,m as b,d as c,f as d,h as e};
3
+ //# sourceMappingURL=enforce-config-HksNiOMu.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"enforce-config-HksNiOMu.esm.js","sources":["../../src/shared/css-reset.ts","../../src/shared/defineCustomElement.ts","../../src/shared/enforce-config.ts"],"sourcesContent":["import { css } from \"lit\";\n\n// minireset.css v0.0.7 | MIT License | github.com/jgthms/minireset.css\n// prettier-ignore\nexport const cssReset = css`html,body,p,ol,ul,li,dl,dt,dd,blockquote,figure,fieldset,legend,textarea,pre,iframe,hr,h1,h2,h3,h4,h5,h6{margin:0;padding:0}h1,h2,h3,h4,h5,h6{font-size:100%;font-weight:normal}ul{list-style:none}button,input,select{margin:0}html{box-sizing:border-box}*,*::before,*::after{box-sizing:inherit}img,video{/*height:auto;*/max-width:100%}iframe{border:0}table{border-collapse:collapse;border-spacing:0}td,th{padding:0}`;\n","/**\n * Defines a custom element based on its static tagName property\n */\nexport function defineCustomElement(\n CustomElementClass: CustomElementConstructor & { tagName: string },\n tagName = CustomElementClass[\"tagName\"]\n) {\n customElements.get(tagName) || customElements.define(tagName, CustomElementClass);\n}\n","import { InvalidAttributeCombinationError, MissingConfig } from \"../utils/beam-errors\";\nimport { logger } from \"../utils/logger\";\n\nexport function enforceConfig<T>(keys: (keyof T)[], input: unknown): input is Required<T> {\n const missingKeys: string[] = [];\n const check = input as Record<string | number | symbol, unknown>;\n for (const key of keys) {\n if (check[key] == null) {\n missingKeys.push(key as string);\n }\n }\n if (missingKeys.length > 0) {\n logger.error(\"Beam Impact - Missing Required Config Values:\\n\", missingKeys.join(\", \"), input);\n throw new MissingConfig(missingKeys);\n }\n return true;\n}\n\nexport function areRequiredKeysDefined<T extends object>(requiredKeys: (keyof T)[], config: T): boolean {\n return requiredKeys.every((key) => key in config && config[key] != null);\n}\n\nexport function checkForInvalidAttributeCombinations<T>(keys: (keyof T)[], config: T): void {\n const InvalidAttributeCombinationsPresent = keys.every((key) => config[key] !== null && config[key] !== undefined);\n if (InvalidAttributeCombinationsPresent) {\n throw new InvalidAttributeCombinationError();\n }\n}\n"],"names":["cssReset","css","defineCustomElement","CustomElementClass","tagName","enforceConfig","keys","input","missingKeys","check","key","logger","MissingConfig","areRequiredKeysDefined","requiredKeys","config","checkForInvalidAttributeCombinations","InvalidAttributeCombinationError"],"mappings":"mJAIO,MAAMA,EAAWC,gaCDjB,SAASC,EACdC,EACAC,EAAUD,EAAmB,QAC7B,CACA,eAAe,IAAIC,CAAO,GAAK,eAAe,OAAOA,EAASD,CAAkB,CAClF,CCLO,SAASE,EAAiBC,EAAmBC,EAAsC,CACxF,MAAMC,EAAwB,CAAA,EACxBC,EAAQF,EACd,UAAWG,KAAOJ,EACZG,EAAMC,CAAG,GAAK,MAChBF,EAAY,KAAKE,CAAa,EAGlC,GAAIF,EAAY,OAAS,EACvB,MAAAG,EAAO,MAAM;AAAA,EAAmDH,EAAY,KAAK,IAAI,EAAGD,CAAK,EACvF,IAAIK,EAAcJ,CAAW,EAErC,MAAO,EACT,CAEO,SAASK,EAAyCC,EAA2BC,EAAoB,CACtG,OAAOD,EAAa,MAAOJ,GAAQA,KAAOK,GAAUA,EAAOL,CAAG,GAAK,IAAI,CACzE,CAEO,SAASM,EAAwCV,EAAmBS,EAAiB,CAE1F,GAD4CT,EAAK,MAAOI,GAAQK,EAAOL,CAAG,IAAM,MAAQK,EAAOL,CAAG,IAAM,MAAS,EAE/G,MAAM,IAAIO,CAEd"}
@@ -0,0 +1,3 @@
1
+ import{f as r}from"./lit-3QHn3fwl.esm.js";import{M as s,I as a}from"./beam-errors-P-Lu07Ce.esm.js";import{logger as l}from"../utils/logger.js";const d=r`html,body,p,ol,ul,li,dl,dt,dd,blockquote,figure,fieldset,legend,textarea,pre,iframe,hr,h1,h2,h3,h4,h5,h6{margin:0;padding:0}h1,h2,h3,h4,h5,h6{font-size:100%;font-weight:normal}ul{list-style:none}button,input,select{margin:0}html{box-sizing:border-box}*,*::before,*::after{box-sizing:inherit}img,video{/*height:auto;*/max-width:100%}iframe{border:0}table{border-collapse:collapse;border-spacing:0}td,th{padding:0}`;function f(i,e=i.tagName){customElements.get(e)||customElements.define(e,i)}function h(i,e){const t=[],n=e;for(const o of i)n[o]==null&&t.push(o);if(t.length>0)throw l.error(`Beam Impact - Missing Required Config Values:
2
+ `,t.join(", "),e),new s(t);return!0}function m(i,e){return i.every(t=>t in e&&e[t]!=null)}function u(i,e){if(i.every(t=>e[t]!==null&&e[t]!==void 0))throw new a}export{u as a,m as b,d as c,f as d,h as e};
3
+ //# sourceMappingURL=enforce-config-er6B5Gkj.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"enforce-config-er6B5Gkj.esm.js","sources":["../../src/shared/css-reset.ts","../../src/shared/defineCustomElement.ts","../../src/shared/enforce-config.ts"],"sourcesContent":["import { css } from \"lit\";\n\n// minireset.css v0.0.7 | MIT License | github.com/jgthms/minireset.css\n// prettier-ignore\nexport const cssReset = css`html,body,p,ol,ul,li,dl,dt,dd,blockquote,figure,fieldset,legend,textarea,pre,iframe,hr,h1,h2,h3,h4,h5,h6{margin:0;padding:0}h1,h2,h3,h4,h5,h6{font-size:100%;font-weight:normal}ul{list-style:none}button,input,select{margin:0}html{box-sizing:border-box}*,*::before,*::after{box-sizing:inherit}img,video{/*height:auto;*/max-width:100%}iframe{border:0}table{border-collapse:collapse;border-spacing:0}td,th{padding:0}`;\n","/**\n * Defines a custom element based on its static tagName property\n */\nexport function defineCustomElement(\n CustomElementClass: CustomElementConstructor & { tagName: string },\n tagName = CustomElementClass[\"tagName\"]\n) {\n customElements.get(tagName) || customElements.define(tagName, CustomElementClass);\n}\n","import { InvalidAttributeCombinationError, MissingConfig } from \"../utils/beam-errors\";\nimport { logger } from \"../utils/logger\";\n\nexport function enforceConfig<T>(keys: (keyof T)[], input: unknown): input is Required<T> {\n const missingKeys: string[] = [];\n const check = input as Record<string | number | symbol, unknown>;\n for (const key of keys) {\n if (check[key] == null) {\n missingKeys.push(key as string);\n }\n }\n if (missingKeys.length > 0) {\n logger.error(\"Beam Impact - Missing Required Config Values:\\n\", missingKeys.join(\", \"), input);\n throw new MissingConfig(missingKeys);\n }\n return true;\n}\n\nexport function areRequiredKeysDefined<T extends object>(requiredKeys: (keyof T)[], config: T): boolean {\n return requiredKeys.every((key) => key in config && config[key] != null);\n}\n\nexport function checkForInvalidAttributeCombinations<T>(keys: (keyof T)[], config: T): void {\n const InvalidAttributeCombinationsPresent = keys.every((key) => config[key] !== null && config[key] !== undefined);\n if (InvalidAttributeCombinationsPresent) {\n throw new InvalidAttributeCombinationError();\n }\n}\n"],"names":["cssReset","css","defineCustomElement","CustomElementClass","tagName","enforceConfig","keys","input","missingKeys","check","key","logger","MissingConfig","areRequiredKeysDefined","requiredKeys","config","checkForInvalidAttributeCombinations","InvalidAttributeCombinationError"],"mappings":"+IAIO,MAAMA,EAAWC,gaCDjB,SAASC,EACdC,EACAC,EAAUD,EAAmB,QAC7B,CACA,eAAe,IAAIC,CAAO,GAAK,eAAe,OAAOA,EAASD,CAAkB,CAClF,CCLO,SAASE,EAAiBC,EAAmBC,EAAsC,CACxF,MAAMC,EAAwB,CAAA,EACxBC,EAAQF,EACd,UAAWG,KAAOJ,EACZG,EAAMC,CAAG,GAAK,MAChBF,EAAY,KAAKE,CAAa,EAGlC,GAAIF,EAAY,OAAS,EACvB,MAAAG,EAAO,MAAM;AAAA,EAAmDH,EAAY,KAAK,IAAI,EAAGD,CAAK,EACvF,IAAIK,EAAcJ,CAAW,EAErC,MAAO,EACT,CAEO,SAASK,EAAyCC,EAA2BC,EAAoB,CACtG,OAAOD,EAAa,MAAOJ,GAAQA,KAAOK,GAAUA,EAAOL,CAAG,GAAK,IAAI,CACzE,CAEO,SAASM,EAAwCV,EAAmBS,EAAiB,CAE1F,GAD4CT,EAAK,MAAOI,GAAQK,EAAOL,CAAG,IAAM,MAAQK,EAAOL,CAAG,IAAM,MAAS,EAE/G,MAAM,IAAIO,CAEd"}
@@ -1,5 +1,5 @@
1
- import { a as TCartApi } from './cart-contents-3-9fB-7m.esm.js';
2
- import { W as WidgetName, c as TId } from './types-CfbVJRfU.esm.js';
1
+ import { a as TCartApi } from './cart-contents-sUhfwLAz.esm.js';
2
+ import { W as WidgetName, a as TId } from './types-zbTZ8-KP.esm.js';
3
3
 
4
4
  type NetworkEventDetail = {
5
5
  url: string;
@@ -1,2 +1,2 @@
1
- const t=class C extends CustomEvent{constructor(e){super(C.eventName,{detail:e,bubbles:!0,composed:!0})}};t.eventName="beamnetworkcall";let a=t;const s=class E extends CustomEvent{constructor(e){super(E.eventName,{detail:e,bubbles:!0,composed:!0})}};s.eventName="beamnonprofitselect";let n=s;const o=class N extends CustomEvent{constructor(e){super(N.eventName,{detail:e,bubbles:!0,composed:!0})}};o.eventName="beamcartchange";let r=o;const m=class i extends CustomEvent{constructor(e){super(i.eventName,{detail:e,bubbles:!0,composed:!0})}};m.eventName="beamcartcreated";let c=m;const l=class B extends CustomEvent{constructor(e){super(B.eventName,{detail:e,bubbles:!0,composed:!0})}};l.eventName="beamordercreated";let v=l;const d=class f extends CustomEvent{constructor(e){super(f.eventName,{detail:e,bubbles:!0,composed:!0})}};d.eventName="beamstatuschange";let u=d;const b=class x extends CustomEvent{constructor(e){super(x.eventName,{detail:e,bubbles:!0,composed:!0})}};b.eventName="beamnonprofitselectionremoved";let p=b;var g=Object.freeze({__proto__:null,BeamCartChangeEvent:r,BeamCartCreatedEvent:c,BeamNetworkCallEvent:a,BeamNonprofitSelectEvent:n,BeamNonprofitSelectionRemovedEvent:p,BeamOrderCreatedEvent:v,BeamStatusChangeEvent:u});export{u as B,c as a,v as b,n as c,a as d,g as e,r as f,p as g};
2
- //# sourceMappingURL=events-Y8fYvSqM.esm.js.map
1
+ const t=class C extends CustomEvent{constructor(e){super(C.eventName,{detail:e,bubbles:!0,composed:!0})}};t.eventName="beamnetworkcall";let a=t;const s=class E extends CustomEvent{constructor(e){super(E.eventName,{detail:e,bubbles:!0,composed:!0})}};s.eventName="beamnonprofitselect";let n=s;const o=class N extends CustomEvent{constructor(e){super(N.eventName,{detail:e,bubbles:!0,composed:!0})}};o.eventName="beamcartchange";let r=o;const m=class i extends CustomEvent{constructor(e){super(i.eventName,{detail:e,bubbles:!0,composed:!0})}};m.eventName="beamcartcreated";let c=m;const l=class B extends CustomEvent{constructor(e){super(B.eventName,{detail:e,bubbles:!0,composed:!0})}};l.eventName="beamordercreated";let v=l;const d=class f extends CustomEvent{constructor(e){super(f.eventName,{detail:e,bubbles:!0,composed:!0})}};d.eventName="beamstatuschange";let u=d;const b=class x extends CustomEvent{constructor(e){super(x.eventName,{detail:e,bubbles:!0,composed:!0})}};b.eventName="beamnonprofitselectionremoved";let p=b;var g=Object.freeze({__proto__:null,BeamCartChangeEvent:r,BeamCartCreatedEvent:c,BeamNetworkCallEvent:a,BeamNonprofitSelectEvent:n,BeamNonprofitSelectionRemovedEvent:p,BeamOrderCreatedEvent:v,BeamStatusChangeEvent:u});export{u as B,v as a,a as b,n as c,r as d,g as e,c as f,p as g};
2
+ //# sourceMappingURL=events-_4nImo3u.esm.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"events-Y8fYvSqM.esm.js","sources":["../../src/utils/events.ts"],"sourcesContent":["import { TCartApi } from \"../shared/cart-contents\";\nimport { TId, WidgetName } from \"../shared/types\";\n\n/* ------------------------------------------------------------------------------------------------------------------ */\n\ntype NetworkEventDetail =\n | { url: string; method: string; type: \"fetch\"; response: Response }\n | { url: string; method: string; type: \"xhr\"; xhr: XMLHttpRequest };\n\n/**\n * beamnetworkcall\n * Emitted by the Beam network listener whenever any API calls are made on the page\n */\nexport class BeamNetworkCallEvent extends CustomEvent<NetworkEventDetail> {\n static eventName = \"beamnetworkcall\" as const;\n constructor(detail: NetworkEventDetail) {\n super(BeamNetworkCallEvent.eventName, { detail, bubbles: true, composed: true });\n }\n}\n\n/* ------------------------------------------------------------------------------------------------------------------ */\n\ntype NonprofitSelectDetail = {\n selectionId?: string;\n selectedNonprofitId?: number | null;\n nonprofitName?: string | null;\n source?: WidgetName | null;\n};\n\n/**\n * beamnonprofitselect\n * Emitted when the end user selects a nonprofit in the Beam widget, and when the previous selection was restored\n * automatically\n */\nexport class BeamNonprofitSelectEvent extends CustomEvent<NonprofitSelectDetail> {\n static eventName = \"beamnonprofitselect\" as const;\n constructor(detail: NonprofitSelectDetail) {\n super(BeamNonprofitSelectEvent.eventName, { detail, bubbles: true, composed: true });\n }\n}\n\n/* ------------------------------------------------------------------------------------------------------------------ */\n\ntype CartChangeDetail = TCartApi & {\n cartId?: string;\n subtotal?: number;\n itemCount?: number;\n currencyCode?: string;\n};\n\n/**\n * beamcartchange\n * Emitted when Beam detects that cart contents have changed, and when items are added to the cart for the first time\n */\nexport class BeamCartChangeEvent extends CustomEvent<CartChangeDetail> {\n static eventName = \"beamcartchange\" as const;\n constructor(detail: CartChangeDetail) {\n super(BeamCartChangeEvent.eventName, { detail, bubbles: true, composed: true });\n }\n}\n\n/* ------------------------------------------------------------------------------------------------------------------ */\n\ntype CartCreatedDetail = CartChangeDetail;\n\n/**\n * beamcartcreated\n * Emitted when a cart is created in Beam for the first time, but NOT when the cart is updated\n * Beam's cart expiration rules are used to determine when a returning visit counts as the same cart\n */\nexport class BeamCartCreatedEvent extends CustomEvent<CartCreatedDetail> {\n static eventName = \"beamcartcreated\" as const;\n constructor(detail: CartCreatedDetail) {\n super(BeamCartCreatedEvent.eventName, { detail, bubbles: true, composed: true });\n }\n}\n\n/* ------------------------------------------------------------------------------------------------------------------ */\n\ntype OrderCreatedDetail = {\n orderId: TId;\n transactionId: TId;\n cartTotal: number;\n currencyCode: string;\n};\n\n/**\n * beamordercreated\n * Emitted when an order is registered with Beam for the first time, but NOT on repeat visits, page refreshes, etc.\n */\nexport class BeamOrderCreatedEvent extends CustomEvent<OrderCreatedDetail> {\n static eventName = \"beamordercreated\" as const;\n\n constructor(detail: OrderCreatedDetail) {\n super(BeamOrderCreatedEvent.eventName, { detail, bubbles: true, composed: true });\n }\n}\n\n/* ------------------------------------------------------------------------------------------------------------------ */\n\n/**\n * beamstatuschange\n * Emitted when the Beam config object has finished initializing along with all plugins\n */\ntype BeamStatusChangeEventDetail = { status: \"pending\" } | { status: \"error\"; error: Error } | { status: \"ready\" };\nexport class BeamStatusChangeEvent extends CustomEvent<BeamStatusChangeEventDetail> {\n static eventName = \"beamstatuschange\" as const;\n\n constructor(detail: BeamStatusChangeEventDetail) {\n super(BeamStatusChangeEvent.eventName, { detail, bubbles: true, composed: true });\n }\n}\n\n/* ------------------------------------------------------------------------------------------------------------------ */\ntype NonprofitSelectionRemovedDetail = {\n previousNonprofitId?: number | null;\n newNonprofitId?: number | null;\n selectionId?: string;\n};\n\n/**\n * beamnonprofitselectionremoved\n * Emitted when the nonprofit selection is removed from deselection or due to nonprofit cohort change\n */\nexport class BeamNonprofitSelectionRemovedEvent extends CustomEvent<NonprofitSelectionRemovedDetail> {\n static eventName = \"beamnonprofitselectionremoved\" as const;\n constructor(detail: NonprofitSelectionRemovedDetail) {\n super(BeamNonprofitSelectionRemovedEvent.eventName, { detail, bubbles: true, composed: true });\n }\n}\n"],"names":["_BeamNetworkCallEvent","detail","BeamNetworkCallEvent","_BeamNonprofitSelectEvent","BeamNonprofitSelectEvent","_BeamCartChangeEvent","BeamCartChangeEvent","_BeamCartCreatedEvent","BeamCartCreatedEvent","_BeamOrderCreatedEvent","BeamOrderCreatedEvent","_BeamStatusChangeEvent","BeamStatusChangeEvent","_BeamNonprofitSelectionRemovedEvent","BeamNonprofitSelectionRemovedEvent"],"mappings":"AAaO,MAAMA,EAAN,MAAMA,UAA6B,WAAgC,CAExE,YAAYC,EAA4B,CACtC,MAAMD,EAAqB,UAAW,CAAE,OAAAC,EAAQ,QAAS,GAAM,SAAU,EAAK,CAAC,CACjF,CACF,EALaD,EACJ,UAAY,kBADd,IAAME,EAANF,EAqBA,MAAMG,EAAN,MAAMA,UAAiC,WAAmC,CAE/E,YAAYF,EAA+B,CACzC,MAAME,EAAyB,UAAW,CAAE,OAAAF,EAAQ,QAAS,GAAM,SAAU,EAAK,CAAC,CACrF,CACF,EALaE,EACJ,UAAY,sBADd,IAAMC,EAAND,EAoBA,MAAME,EAAN,MAAMA,UAA4B,WAA8B,CAErE,YAAYJ,EAA0B,CACpC,MAAMI,EAAoB,UAAW,CAAE,OAAAJ,EAAQ,QAAS,GAAM,SAAU,EAAK,CAAC,CAChF,CACF,EALaI,EACJ,UAAY,iBADR,IAAAC,EAAND,EAgBA,MAAME,EAAN,MAAMA,UAA6B,WAA+B,CAEvE,YAAYN,EAA2B,CACrC,MAAMM,EAAqB,UAAW,CAAE,OAAAN,EAAQ,QAAS,GAAM,SAAU,EAAK,CAAC,CACjF,CACF,EALaM,EACJ,UAAY,sBADRC,EAAND,EAoBA,MAAME,EAAN,MAAMA,UAA8B,WAAgC,CAGzE,YAAYR,EAA4B,CACtC,MAAMQ,EAAsB,UAAW,CAAE,OAAAR,EAAQ,QAAS,GAAM,SAAU,EAAK,CAAC,CAClF,CACF,EANaQ,EACJ,UAAY,uBADRC,EAAND,EAeA,MAAME,EAAN,MAAMA,UAA8B,WAAyC,CAGlF,YAAYV,EAAqC,CAC/C,MAAMU,EAAsB,UAAW,CAAE,OAAAV,EAAQ,QAAS,GAAM,SAAU,EAAK,CAAC,CAClF,CACF,EANaU,EACJ,UAAY,mBADR,IAAAC,EAAND,EAmBA,MAAME,EAAN,MAAMA,UAA2C,WAA6C,CAEnG,YAAYZ,EAAyC,CACnD,MAAMY,EAAmC,UAAW,CAAE,OAAAZ,EAAQ,QAAS,GAAM,SAAU,EAAK,CAAC,CAC/F,CACF,EALaY,EACJ,UAAY,gCADd,IAAMC,EAAND"}
1
+ {"version":3,"file":"events-_4nImo3u.esm.js","sources":["../../src/utils/events.ts"],"sourcesContent":["import { TCartApi } from \"../shared/cart-contents\";\nimport { TId, WidgetName } from \"../shared/types\";\n\n/* ------------------------------------------------------------------------------------------------------------------ */\n\ntype NetworkEventDetail =\n | { url: string; method: string; type: \"fetch\"; response: Response }\n | { url: string; method: string; type: \"xhr\"; xhr: XMLHttpRequest };\n\n/**\n * beamnetworkcall\n * Emitted by the Beam network listener whenever any API calls are made on the page\n */\nexport class BeamNetworkCallEvent extends CustomEvent<NetworkEventDetail> {\n static eventName = \"beamnetworkcall\" as const;\n constructor(detail: NetworkEventDetail) {\n super(BeamNetworkCallEvent.eventName, { detail, bubbles: true, composed: true });\n }\n}\n\n/* ------------------------------------------------------------------------------------------------------------------ */\n\ntype NonprofitSelectDetail = {\n selectionId?: string;\n selectedNonprofitId?: number | null;\n nonprofitName?: string | null;\n source?: WidgetName | null;\n};\n\n/**\n * beamnonprofitselect\n * Emitted when the end user selects a nonprofit in the Beam widget, and when the previous selection was restored\n * automatically\n */\nexport class BeamNonprofitSelectEvent extends CustomEvent<NonprofitSelectDetail> {\n static eventName = \"beamnonprofitselect\" as const;\n constructor(detail: NonprofitSelectDetail) {\n super(BeamNonprofitSelectEvent.eventName, { detail, bubbles: true, composed: true });\n }\n}\n\n/* ------------------------------------------------------------------------------------------------------------------ */\n\ntype CartChangeDetail = TCartApi & {\n cartId?: string;\n subtotal?: number;\n itemCount?: number;\n currencyCode?: string;\n};\n\n/**\n * beamcartchange\n * Emitted when Beam detects that cart contents have changed, and when items are added to the cart for the first time\n */\nexport class BeamCartChangeEvent extends CustomEvent<CartChangeDetail> {\n static eventName = \"beamcartchange\" as const;\n constructor(detail: CartChangeDetail) {\n super(BeamCartChangeEvent.eventName, { detail, bubbles: true, composed: true });\n }\n}\n\n/* ------------------------------------------------------------------------------------------------------------------ */\n\ntype CartCreatedDetail = CartChangeDetail;\n\n/**\n * beamcartcreated\n * Emitted when a cart is created in Beam for the first time, but NOT when the cart is updated\n * Beam's cart expiration rules are used to determine when a returning visit counts as the same cart\n */\nexport class BeamCartCreatedEvent extends CustomEvent<CartCreatedDetail> {\n static eventName = \"beamcartcreated\" as const;\n constructor(detail: CartCreatedDetail) {\n super(BeamCartCreatedEvent.eventName, { detail, bubbles: true, composed: true });\n }\n}\n\n/* ------------------------------------------------------------------------------------------------------------------ */\n\ntype OrderCreatedDetail = {\n orderId: TId;\n transactionId: TId;\n cartTotal: number;\n currencyCode: string;\n};\n\n/**\n * beamordercreated\n * Emitted when an order is registered with Beam for the first time, but NOT on repeat visits, page refreshes, etc.\n */\nexport class BeamOrderCreatedEvent extends CustomEvent<OrderCreatedDetail> {\n static eventName = \"beamordercreated\" as const;\n\n constructor(detail: OrderCreatedDetail) {\n super(BeamOrderCreatedEvent.eventName, { detail, bubbles: true, composed: true });\n }\n}\n\n/* ------------------------------------------------------------------------------------------------------------------ */\n\n/**\n * beamstatuschange\n * Emitted when the Beam config object has finished initializing along with all plugins\n */\ntype BeamStatusChangeEventDetail = { status: \"pending\" } | { status: \"error\"; error: Error } | { status: \"ready\" };\nexport class BeamStatusChangeEvent extends CustomEvent<BeamStatusChangeEventDetail> {\n static eventName = \"beamstatuschange\" as const;\n\n constructor(detail: BeamStatusChangeEventDetail) {\n super(BeamStatusChangeEvent.eventName, { detail, bubbles: true, composed: true });\n }\n}\n\n/* ------------------------------------------------------------------------------------------------------------------ */\ntype NonprofitSelectionRemovedDetail = {\n previousNonprofitId?: number | null;\n newNonprofitId?: number | null;\n selectionId?: string;\n};\n\n/**\n * beamnonprofitselectionremoved\n * Emitted when the nonprofit selection is removed from deselection or due to nonprofit cohort change\n */\nexport class BeamNonprofitSelectionRemovedEvent extends CustomEvent<NonprofitSelectionRemovedDetail> {\n static eventName = \"beamnonprofitselectionremoved\" as const;\n constructor(detail: NonprofitSelectionRemovedDetail) {\n super(BeamNonprofitSelectionRemovedEvent.eventName, { detail, bubbles: true, composed: true });\n }\n}\n"],"names":["_BeamNetworkCallEvent","detail","BeamNetworkCallEvent","_BeamNonprofitSelectEvent","BeamNonprofitSelectEvent","_BeamCartChangeEvent","BeamCartChangeEvent","_BeamCartCreatedEvent","BeamCartCreatedEvent","_BeamOrderCreatedEvent","BeamOrderCreatedEvent","_BeamStatusChangeEvent","BeamStatusChangeEvent","_BeamNonprofitSelectionRemovedEvent","BeamNonprofitSelectionRemovedEvent"],"mappings":"AAaO,MAAMA,EAAN,MAAMA,UAA6B,WAAgC,CAExE,YAAYC,EAA4B,CACtC,MAAMD,EAAqB,UAAW,CAAE,OAAAC,EAAQ,QAAS,GAAM,SAAU,EAAK,CAAC,CACjF,CACF,EALaD,EACJ,UAAY,kBADd,IAAME,EAANF,EAqBA,MAAMG,EAAN,MAAMA,UAAiC,WAAmC,CAE/E,YAAYF,EAA+B,CACzC,MAAME,EAAyB,UAAW,CAAE,OAAAF,EAAQ,QAAS,GAAM,SAAU,EAAK,CAAC,CACrF,CACF,EALaE,EACJ,UAAY,sBADd,IAAMC,EAAND,EAoBA,MAAME,EAAN,MAAMA,UAA4B,WAA8B,CAErE,YAAYJ,EAA0B,CACpC,MAAMI,EAAoB,UAAW,CAAE,OAAAJ,EAAQ,QAAS,GAAM,SAAU,EAAK,CAAC,CAChF,CACF,EALaI,EACJ,UAAY,iBADR,IAAAC,EAAND,EAgBA,MAAME,EAAN,MAAMA,UAA6B,WAA+B,CAEvE,YAAYN,EAA2B,CACrC,MAAMM,EAAqB,UAAW,CAAE,OAAAN,EAAQ,QAAS,GAAM,SAAU,EAAK,CAAC,CACjF,CACF,EALaM,EACJ,UAAY,sBADRC,EAAND,EAoBA,MAAME,EAAN,MAAMA,UAA8B,WAAgC,CAGzE,YAAYR,EAA4B,CACtC,MAAMQ,EAAsB,UAAW,CAAE,OAAAR,EAAQ,QAAS,GAAM,SAAU,EAAK,CAAC,CAClF,CACF,EANaQ,EACJ,UAAY,uBADRC,EAAND,EAeA,MAAME,EAAN,MAAMA,UAA8B,WAAyC,CAGlF,YAAYV,EAAqC,CAC/C,MAAMU,EAAsB,UAAW,CAAE,OAAAV,EAAQ,QAAS,GAAM,SAAU,EAAK,CAAC,CAClF,CACF,EANaU,EACJ,UAAY,mBADR,IAAAC,EAAND,EAmBA,MAAME,EAAN,MAAMA,UAA2C,WAA6C,CAEnG,YAAYZ,EAAyC,CACnD,MAAMY,EAAmC,UAAW,CAAE,OAAAZ,EAAQ,QAAS,GAAM,SAAU,EAAK,CAAC,CAC/F,CACF,EALaY,EACJ,UAAY,gCADd,IAAMC,EAAND"}
@@ -0,0 +1,2 @@
1
+ import{p as e,I as r,M as t,s as a,U as o}from"./order-page-HoZ7DC0L.esm.js";var s=Object.freeze({__proto__:null,addBeamAttributesToCart:e,getCurrentCart:r,registerCartIntegration:t,showBeamOrderPageWidgets:a,trackCart:o});export{s as i};
2
+ //# sourceMappingURL=index--iA4GcfC.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index--iA4GcfC.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -1,2 +1,2 @@
1
- import{v as d}from"./vendor-jQ8cxMpw.esm.js";import{getCookieValue as i,setCookieValue as p,deleteCookieValue as l}from"../utils/cookies.js";import{createScopedLocalStorage as n}from"../utils/local-storage.js";const s="beam_session";async function r({cookieName:e=s,domain:o=window.location.hostname,apiKey:t=""}={}){if(await i(e))return;const a=d(),m=Date.now()+30*24*60*60*1e3;await p({name:e,value:a,domain:o,path:"/",expires:m}),n({apiKey:t}).setItemJson("cart",{cartId:a})}async function c({cookieName:e=s,domain:o=window.location.hostname,apiKey:t=""}={}){const a=await i(e);a&&(n({apiKey:t}).setItemJson("cart",{cartId:a}),await l({name:e,domain:o}))}var u=Object.freeze({__proto__:null,createSession:r,endSession:c});export{r as c,c as e,u as i};
2
- //# sourceMappingURL=index-uCfdsWtt.esm.js.map
1
+ import{v as d}from"./vendor--f7lkyBk.esm.js";import{getCookieValue as i,setCookieValue as p,deleteCookieValue as l}from"../utils/cookies.js";import{createScopedLocalStorage as n}from"../utils/local-storage.js";const s="beam_session";async function r({cookieName:e=s,domain:o=window.location.hostname,apiKey:t=""}={}){if(await i(e))return;const a=d(),m=Date.now()+30*24*60*60*1e3;await p({name:e,value:a,domain:o,path:"/",expires:m}),n({apiKey:t}).setItemJson("cart",{cartId:a})}async function c({cookieName:e=s,domain:o=window.location.hostname,apiKey:t=""}={}){const a=await i(e);a&&(n({apiKey:t}).setItemJson("cart",{cartId:a}),await l({name:e,domain:o}))}var u=Object.freeze({__proto__:null,createSession:r,endSession:c});export{r as c,c as e,u as i};
2
+ //# sourceMappingURL=index-1nI7l5vj.esm.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index-uCfdsWtt.esm.js","sources":["../../src/integrations/session/index.ts"],"sourcesContent":["/**\n If checkout and order page are on different subdomains, we can't access localStorage for nonprofitId/selectionId\n We can make post-transaction work by copying a \"cartID\"-style cookie to the expected localStorage key on the current\n domain, which will allow the post-transaction widgets to send that to the backend which can restore the selection\n from the cart.\n\n This will also work if we don't have a cart cookie for some other reason, although it is not directly integrated\n with the host site's concept of a cart (e.g., line items and expiration dates).\n\n Note: Use a module import rather than a self-executing script so that we can set cookies on the host domain\n rather than our 3rd party CDN domain, and customize the options via arguments.\n\n Usage:\n <script type=\"module\">\n import { createSession } from 'https://...';\n createSession({domain: 'mystore.com'})\n </script>\n */\n\nimport { v4 as uuid } from \"@lukeed/uuid/secure\";\nimport { deleteCookieValue, getCookieValue, setCookieValue } from \"../../utils/cookies\";\nimport { createScopedLocalStorage } from \"../../utils/local-storage\";\n\nconst DEFAULT_COOKIE_NAME = \"beam_session\";\n\nexport async function createSession({\n cookieName = DEFAULT_COOKIE_NAME,\n domain = window.location.hostname, // domain or subdomain to set cookie on\n apiKey = \"\", // optional unless scoping localStorage to api key\n} = {}) {\n const existingValue = await getCookieValue(cookieName);\n\n if (existingValue) {\n return; // do nothing\n }\n\n const cookieValue = uuid();\n\n const expires = Date.now() + 30 * 24 * 60 * 60 * 1000; // 30 days\n\n await setCookieValue({ name: cookieName, value: cookieValue, domain, path: \"/\", expires });\n\n const beamLocalStorage = createScopedLocalStorage({ apiKey });\n beamLocalStorage.setItemJson(\"cart\", { cartId: cookieValue });\n}\n\nexport async function endSession({\n cookieName = DEFAULT_COOKIE_NAME,\n domain = window.location.hostname, // domain to remove cookie from\n apiKey = \"\", // optional unless scoping localStorage to api key\n} = {}) {\n const cookieValue = await getCookieValue(cookieName);\n\n if (!cookieValue) {\n return; // do nothing\n }\n\n // copy cookie value into localStorage for widgets to use\n const beamLocalStorage = createScopedLocalStorage({ apiKey });\n beamLocalStorage.setItemJson(\"cart\", { cartId: cookieValue });\n\n // delete cookie to end session (will generate new one on next visit)\n await deleteCookieValue({ name: cookieName, domain });\n}\n"],"names":["DEFAULT_COOKIE_NAME","createSession","cookieName","domain","apiKey","getCookieValue","cookieValue","uuid","expires","setCookieValue","createScopedLocalStorage","endSession","deleteCookieValue"],"mappings":"kNAuBA,MAAMA,EAAsB,eAE5B,eAAsBC,EAAc,CAClC,WAAAC,EAAaF,EACb,OAAAG,EAAS,OAAO,SAAS,SACzB,OAAAC,EAAS,EACX,EAAI,CAAI,EAAA,CAGN,GAFsB,MAAMC,EAAeH,CAAU,EAGnD,OAGF,MAAMI,EAAcC,EAAK,EAEnBC,EAAU,KAAK,IAAA,EAAQ,GAAK,GAAK,GAAK,GAAK,IAEjD,MAAMC,EAAe,CAAE,KAAMP,EAAY,MAAOI,EAAa,OAAAH,EAAQ,KAAM,IAAK,QAAAK,CAAQ,CAAC,EAEhEE,EAAyB,CAAE,OAAAN,CAAO,CAAC,EAC3C,YAAY,OAAQ,CAAE,OAAQE,CAAY,CAAC,CAC9D,CAEA,eAAsBK,EAAW,CAC/B,WAAAT,EAAaF,EACb,OAAAG,EAAS,OAAO,SAAS,SACzB,OAAAC,EAAS,EACX,EAAI,GAAI,CACN,MAAME,EAAc,MAAMD,EAAeH,CAAU,EAE9CI,IAKoBI,EAAyB,CAAE,OAAAN,CAAO,CAAC,EAC3C,YAAY,OAAQ,CAAE,OAAQE,CAAY,CAAC,EAG5D,MAAMM,EAAkB,CAAE,KAAMV,EAAY,OAAAC,CAAO,CAAC,EACtD"}
1
+ {"version":3,"file":"index-1nI7l5vj.esm.js","sources":["../../src/integrations/session/index.ts"],"sourcesContent":["/**\n If checkout and order page are on different subdomains, we can't access localStorage for nonprofitId/selectionId\n We can make post-transaction work by copying a \"cartID\"-style cookie to the expected localStorage key on the current\n domain, which will allow the post-transaction widgets to send that to the backend which can restore the selection\n from the cart.\n\n This will also work if we don't have a cart cookie for some other reason, although it is not directly integrated\n with the host site's concept of a cart (e.g., line items and expiration dates).\n\n Note: Use a module import rather than a self-executing script so that we can set cookies on the host domain\n rather than our 3rd party CDN domain, and customize the options via arguments.\n\n Usage:\n <script type=\"module\">\n import { createSession } from 'https://...';\n createSession({domain: 'mystore.com'})\n </script>\n */\n\nimport { v4 as uuid } from \"@lukeed/uuid/secure\";\nimport { deleteCookieValue, getCookieValue, setCookieValue } from \"../../utils/cookies\";\nimport { createScopedLocalStorage } from \"../../utils/local-storage\";\n\nconst DEFAULT_COOKIE_NAME = \"beam_session\";\n\nexport async function createSession({\n cookieName = DEFAULT_COOKIE_NAME,\n domain = window.location.hostname, // domain or subdomain to set cookie on\n apiKey = \"\", // optional unless scoping localStorage to api key\n} = {}) {\n const existingValue = await getCookieValue(cookieName);\n\n if (existingValue) {\n return; // do nothing\n }\n\n const cookieValue = uuid();\n\n const expires = Date.now() + 30 * 24 * 60 * 60 * 1000; // 30 days\n\n await setCookieValue({ name: cookieName, value: cookieValue, domain, path: \"/\", expires });\n\n const beamLocalStorage = createScopedLocalStorage({ apiKey });\n beamLocalStorage.setItemJson(\"cart\", { cartId: cookieValue });\n}\n\nexport async function endSession({\n cookieName = DEFAULT_COOKIE_NAME,\n domain = window.location.hostname, // domain to remove cookie from\n apiKey = \"\", // optional unless scoping localStorage to api key\n} = {}) {\n const cookieValue = await getCookieValue(cookieName);\n\n if (!cookieValue) {\n return; // do nothing\n }\n\n // copy cookie value into localStorage for widgets to use\n const beamLocalStorage = createScopedLocalStorage({ apiKey });\n beamLocalStorage.setItemJson(\"cart\", { cartId: cookieValue });\n\n // delete cookie to end session (will generate new one on next visit)\n await deleteCookieValue({ name: cookieName, domain });\n}\n"],"names":["DEFAULT_COOKIE_NAME","createSession","cookieName","domain","apiKey","getCookieValue","cookieValue","uuid","expires","setCookieValue","createScopedLocalStorage","endSession","deleteCookieValue"],"mappings":"kNAuBA,MAAMA,EAAsB,eAE5B,eAAsBC,EAAc,CAClC,WAAAC,EAAaF,EACb,OAAAG,EAAS,OAAO,SAAS,SACzB,OAAAC,EAAS,EACX,EAAI,CAAI,EAAA,CAGN,GAFsB,MAAMC,EAAeH,CAAU,EAGnD,OAGF,MAAMI,EAAcC,EAAK,EAEnBC,EAAU,KAAK,IAAA,EAAQ,GAAK,GAAK,GAAK,GAAK,IAEjD,MAAMC,EAAe,CAAE,KAAMP,EAAY,MAAOI,EAAa,OAAAH,EAAQ,KAAM,IAAK,QAAAK,CAAQ,CAAC,EAEhEE,EAAyB,CAAE,OAAAN,CAAO,CAAC,EAC3C,YAAY,OAAQ,CAAE,OAAQE,CAAY,CAAC,CAC9D,CAEA,eAAsBK,EAAW,CAC/B,WAAAT,EAAaF,EACb,OAAAG,EAAS,OAAO,SAAS,SACzB,OAAAC,EAAS,EACX,EAAI,GAAI,CACN,MAAME,EAAc,MAAMD,EAAeH,CAAU,EAE9CI,IAKoBI,EAAyB,CAAE,OAAAN,CAAO,CAAC,EAC3C,YAAY,OAAQ,CAAE,OAAQE,CAAY,CAAC,EAG5D,MAAMM,EAAkB,CAAE,KAAMV,EAAY,OAAAC,CAAO,CAAC,EACtD"}
@@ -0,0 +1,2 @@
1
+ import{BeamCommunityImpact as m}from"../react/community-impact.esm.js";import{BeamCumulativeImpact as e}from"../react/cumulative-impact.esm.js";import{BeamImpactOverview as a}from"../react/impact-overview.esm.js";import{BeamSelectNonprofit as t}from"../react/select-nonprofit.esm.js";import{BeamRedeemTransaction as o}from"../react/redeem-transaction.esm.js";import{BeamPostPurchase as r}from"../react/post-purchase.esm.js";import{BeamSubscriptionManagement as i}from"../react/subscription-management.esm.js";import{BeamSelectSubscriptionNonprofit as p}from"../react/select-subscription-nonprofit.esm.js";import{BeamSubscriptionImpact as c}from"../react/subscription-impact.esm.js";import{BeamProductDetailsPage as n}from"../react/product-details-page.esm.js";import{BeamSocialShare as B}from"../react/social-share.esm.js";var u=Object.freeze({__proto__:null,BeamCommunityImpact:m,BeamCumulativeImpact:e,BeamImpactOverview:a,BeamPostPurchase:r,BeamProductDetailsPage:n,BeamRedeemTransaction:o,BeamSelectNonprofit:t,BeamSelectSubscriptionNonprofit:p,BeamSocialShare:B,BeamSubscriptionImpact:c,BeamSubscriptionManagement:i});export{u as i};
2
+ //# sourceMappingURL=index-E8H5A7Qq.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index-E8H5A7Qq.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ import{K as e}from"./update-cart-yfZE8kwS.esm.js";var r=Object.freeze({__proto__:null,updateCart:e});export{r as i};
2
+ //# sourceMappingURL=index-F1U8ROKG.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index-F1U8ROKG.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ import{BeamCommunityImpact as m}from"../components/community-impact.js";import{BeamCumulativeImpact as e}from"../components/cumulative-impact.js";import{BeamImpactOverview as a}from"../components/impact-overview.js";import{BeamSelectNonprofit as t}from"../components/select-nonprofit.js";import{BeamRedeemTransaction as o}from"../components/redeem-transaction.js";import{BeamPostPurchase as r}from"../components/post-purchase.js";import{BeamSubscriptionManagement as i}from"../components/subscription-management.js";import{BeamSubscriptionImpact as p}from"../components/subscription-impact.js";import{BeamProductDetailsPage as c}from"../components/product-details-page.js";import{BeamSelectSubscriptionNonprofit as n}from"../components/select-subscription-nonprofit.js";import{BeamSocialShare as B}from"../components/social-share.js";var u=Object.freeze({__proto__:null,BeamCommunityImpact:m,BeamCumulativeImpact:e,BeamImpactOverview:a,BeamPostPurchase:r,BeamProductDetailsPage:c,BeamRedeemTransaction:o,BeamSelectNonprofit:t,BeamSelectSubscriptionNonprofit:n,BeamSocialShare:B,BeamSubscriptionImpact:p,BeamSubscriptionManagement:i});export{u as i};
2
+ //# sourceMappingURL=index-FQExZDX9.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index-FQExZDX9.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ import{K as e}from"./update-cart-_5yw3Tg7.esm.js";var r=Object.freeze({__proto__:null,updateCart:e});export{r as i};
2
+ //# sourceMappingURL=index-LF_9YLx7.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index-LF_9YLx7.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -1,5 +1,5 @@
1
1
  import { b as beamErrors } from './beam-errors-fXDkG1zo.esm.js';
2
- import { e as events } from './events-7cGXyV7_.esm.js';
2
+ import { e as events } from './events-QJc86_5Y.esm.js';
3
3
  import { logger } from '../utils/logger.js';
4
4
  import { fetchProxy, initNetworkListeners, xhrProxy } from '../utils/network-listeners.js';
5
5
  import { createScopedLocalStorage } from '../utils/local-storage.js';
@@ -0,0 +1,2 @@
1
+ import{p as e,I as r,M as t,s as a,U as o}from"./order-page-m5hkOPEQ.esm.js";var s=Object.freeze({__proto__:null,addBeamAttributesToCart:e,getCurrentCart:r,registerCartIntegration:t,showBeamOrderPageWidgets:a,trackCart:o});export{s as i};
2
+ //# sourceMappingURL=index-MSOdvudi.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index-MSOdvudi.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -1,2 +1,2 @@
1
- import{b as e}from"./beam-errors-P-Lu07Ce.esm.js";import{e as o}from"./events-Y8fYvSqM.esm.js";import{logger as r}from"../utils/logger.js";import{fetchProxy as t,initNetworkListeners as i,xhrProxy as m}from"../utils/network-listeners.js";import{createScopedLocalStorage as a}from"../utils/local-storage.js";import{waitForElement as s}from"../utils/wait-for-element.js";import{deleteCookieValue as l,getCookieMap as n,getCookieValue as p,setCookieValue as f}from"../utils/cookies.js";import{getRemoteSession as g,saveRemoteSession as c}from"../utils/remote-session.js";import{memoizeLast as u}from"../utils/memoize-last.js";import{d as k,i as d}from"./lodash-P8OIs-at.esm.js";var x=Object.freeze({__proto__:null,createScopedLocalStorage:a,debounce:k,deleteCookieValue:l,errors:e,events:o,fetchProxy:t,getCookieMap:n,getCookieValue:p,getRemoteSession:g,initNetworkListeners:i,isEqual:d,logger:r,memoizeLast:u,saveRemoteSession:c,setCookieValue:f,waitForElement:s,xhrProxy:m});export{x as i};
2
- //# sourceMappingURL=index-phDmC-TS.esm.js.map
1
+ import{b as e}from"./beam-errors-P-Lu07Ce.esm.js";import{e as o}from"./events-_4nImo3u.esm.js";import{logger as r}from"../utils/logger.js";import{fetchProxy as t,initNetworkListeners as i,xhrProxy as m}from"../utils/network-listeners.js";import{createScopedLocalStorage as a}from"../utils/local-storage.js";import{waitForElement as s}from"../utils/wait-for-element.js";import{deleteCookieValue as l,getCookieMap as n,getCookieValue as p,setCookieValue as f}from"../utils/cookies.js";import{getRemoteSession as g,saveRemoteSession as c}from"../utils/remote-session.js";import{memoizeLast as u}from"../utils/memoize-last.js";import{d as k,i as d}from"./lodash-P8OIs-at.esm.js";var x=Object.freeze({__proto__:null,createScopedLocalStorage:a,debounce:k,deleteCookieValue:l,errors:e,events:o,fetchProxy:t,getCookieMap:n,getCookieValue:p,getRemoteSession:g,initNetworkListeners:i,isEqual:d,logger:r,memoizeLast:u,saveRemoteSession:c,setCookieValue:f,waitForElement:s,xhrProxy:m});export{x as i};
2
+ //# sourceMappingURL=index-NOF_HeFP.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index-NOF_HeFP.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ import{BeamCommunityImpact as m}from"../components/community-impact.esm.js";import{BeamCumulativeImpact as e}from"../components/cumulative-impact.esm.js";import{BeamImpactOverview as a}from"../components/impact-overview.esm.js";import{BeamSelectNonprofit as t}from"../components/select-nonprofit.esm.js";import{BeamRedeemTransaction as o}from"../components/redeem-transaction.esm.js";import{BeamPostPurchase as r}from"../components/post-purchase.esm.js";import{BeamSubscriptionManagement as i}from"../components/subscription-management.esm.js";import{BeamSubscriptionImpact as p}from"../components/subscription-impact.esm.js";import{BeamProductDetailsPage as c}from"../components/product-details-page.esm.js";import{BeamSelectSubscriptionNonprofit as n}from"../components/select-subscription-nonprofit.esm.js";import{BeamSocialShare as B}from"../components/social-share.esm.js";var u=Object.freeze({__proto__:null,BeamCommunityImpact:m,BeamCumulativeImpact:e,BeamImpactOverview:a,BeamPostPurchase:r,BeamProductDetailsPage:c,BeamRedeemTransaction:o,BeamSelectNonprofit:t,BeamSelectSubscriptionNonprofit:n,BeamSocialShare:B,BeamSubscriptionImpact:p,BeamSubscriptionManagement:i});export{u as i};
2
+ //# sourceMappingURL=index-PiMq5a49.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index-PiMq5a49.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ import{i}from"./index-x2kxA_Xo.esm.js";import{i as o}from"./index--iA4GcfC.esm.js";import{i as r}from"./index-1nI7l5vj.esm.js";import{i as e}from"./index-LF_9YLx7.esm.js";import{i as m}from"./index-giTGb0gn.esm.js";var s=Object.freeze({__proto__:null,Cart:e,Logs:m,Session:r,Shopify:o,Utils:i});export{s as i};
2
+ //# sourceMappingURL=index-QeW-IaK9.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index-QeW-IaK9.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -1,5 +1,5 @@
1
1
  import { b as beamErrors } from './beam-errors-fXDkG1zo.esm.js';
2
- import { e as events } from './events-7cGXyV7_.esm.js';
2
+ import { e as events } from './events-QJc86_5Y.esm.js';
3
3
  import { logger } from '../utils/logger.js';
4
4
  import { fetchProxy, initNetworkListeners, xhrProxy } from '../utils/network-listeners.js';
5
5
  import { createScopedLocalStorage } from '../utils/local-storage.js';
@@ -0,0 +1,2 @@
1
+ import{BeamCommunityImpact as m}from"../react/community-impact.js";import{BeamCumulativeImpact as e}from"../react/cumulative-impact.js";import{BeamImpactOverview as a}from"../react/impact-overview.js";import{BeamSelectNonprofit as t}from"../react/select-nonprofit.js";import{BeamRedeemTransaction as o}from"../react/redeem-transaction.js";import{BeamPostPurchase as r}from"../react/post-purchase.js";import{BeamSubscriptionManagement as i}from"../react/subscription-management.js";import{BeamSelectSubscriptionNonprofit as p}from"../react/select-subscription-nonprofit.js";import{BeamSubscriptionImpact as c}from"../react/subscription-impact.js";import{BeamProductDetailsPage as n}from"../react/product-details-page.js";import{BeamSocialShare as B}from"../react/social-share.js";var u=Object.freeze({__proto__:null,BeamCommunityImpact:m,BeamCumulativeImpact:e,BeamImpactOverview:a,BeamPostPurchase:r,BeamProductDetailsPage:n,BeamRedeemTransaction:o,BeamSelectNonprofit:t,BeamSelectSubscriptionNonprofit:p,BeamSocialShare:B,BeamSubscriptionImpact:c,BeamSubscriptionManagement:i});export{u as i};
2
+ //# sourceMappingURL=index-XCMf22lv.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index-XCMf22lv.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -1,8 +1,8 @@
1
- import { i as index$5 } from './index-8KzbQIsU.esm.js';
2
- import { i as index$4 } from './index-SxFKifVJ.esm.js';
1
+ import { i as index$5 } from './index-VHXu2kRx.esm.js';
2
+ import { i as index$4 } from './index-_UuYsIe9.esm.js';
3
3
  import { i as index$3 } from './index-EGiUuWe-.esm.js';
4
- import { i as index$1 } from './index-HBDtoJlQ.esm.js';
5
- import { i as index$2 } from './index-TOzSFOvI.esm.js';
4
+ import { i as index$1 } from './index-euJMrXIc.esm.js';
5
+ import { i as index$2 } from './index-_Hgu38MH.esm.js';
6
6
 
7
7
  /**
8
8
  * This file is used to provide type definitions
@@ -1,4 +1,4 @@
1
- import { p as paths } from './openapi-spec--MzXvfCC.esm.js';
1
+ import { p as paths } from './openapi-spec--WoGcZgR.esm.js';
2
2
 
3
3
  type PostLogsReq = paths["/logs"]["post"]["requestBody"]["content"]["application/json"];
4
4
  interface SendLogConfig {
@@ -1,4 +1,4 @@
1
- import { T as TBeamOrderPageParams, a as addBeamAttributesToCart, g as getCurrentCart, r as registerCartIntegration, s as showBeamOrderPageWidgets, t as trackCart } from './order-page-DPx5SUKM.esm.js';
1
+ import { T as TBeamOrderPageParams, a as addBeamAttributesToCart, g as getCurrentCart, r as registerCartIntegration, s as showBeamOrderPageWidgets, t as trackCart } from './order-page-Ps8Qyjfg.esm.js';
2
2
 
3
3
  declare const index_TBeamOrderPageParams: typeof TBeamOrderPageParams;
4
4
  declare const index_addBeamAttributesToCart: typeof addBeamAttributesToCart;
@@ -0,0 +1,2 @@
1
+ import{i}from"./index-n6QNFLXV.esm.js";import{i as o}from"./index-MSOdvudi.esm.js";import{i as r}from"./index-mw70Caof.esm.js";import{i as e}from"./index-F1U8ROKG.esm.js";import{i as m}from"./index-qjhWIDcT.esm.js";var s=Object.freeze({__proto__:null,Cart:e,Logs:m,Session:r,Shopify:o,Utils:i});export{s as i};
2
+ //# sourceMappingURL=index-e--9y-Sl.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index-e--9y-Sl.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -1,4 +1,4 @@
1
- import { B as BeamCartAPIConfig, a as BeamCartValues, u as updateCart } from './update-cart-xaWdPxse.esm.js';
1
+ import { B as BeamCartAPIConfig, a as BeamCartValues, u as updateCart } from './update-cart-SajqAoez.esm.js';
2
2
 
3
3
  declare const index_BeamCartAPIConfig: typeof BeamCartAPIConfig;
4
4
  declare const index_BeamCartValues: typeof BeamCartValues;
@@ -0,0 +1,2 @@
1
+ import{a as i,c as n}from"./routes-sc6xljWU.esm.js";import{logger as c}from"../utils/logger.js";async function e(o,r){const{apiKey:a,baseUrl:s}=o;try{await n({baseUrl:s||i,headers:{authorization:`Api-Key ${a}`},requestBody:{...r}})}catch(t){c.error("Failed to send log",t)}}var d=Object.freeze({__proto__:null,sendLog:e});export{d as i,e as s};
2
+ //# sourceMappingURL=index-giTGb0gn.esm.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index-fINTvZVX.esm.js","sources":["../../src/integrations/logs/index.ts"],"sourcesContent":["import { postLogs } from \"../../api-sdk/v3/routes\";\nimport { paths } from \"../../api-sdk/v3/openapi-spec\";\nimport { logger } from \"../../utils/logger\";\nimport { DEFAULT_LOG_URL } from \"../../api-sdk/constants\";\n\ntype PostLogsReq = paths[\"/logs\"][\"post\"][\"requestBody\"][\"content\"][\"application/json\"];\n\ninterface SendLogConfig {\n apiKey: string;\n baseUrl?: string;\n}\n\nexport async function sendLog(config: SendLogConfig, payload: PostLogsReq): Promise<void> {\n const { apiKey, baseUrl } = config;\n try {\n await postLogs({\n baseUrl: baseUrl || DEFAULT_LOG_URL,\n headers: {\n authorization: `Api-Key ${apiKey}`,\n },\n requestBody: {\n ...payload,\n },\n });\n } catch (err) {\n logger.error(\"Failed to send log\", err);\n }\n}\n"],"names":["sendLog","config","payload","apiKey","baseUrl","postLogs","DEFAULT_LOG_URL","err","logger"],"mappings":"gGAYA,eAAsBA,EAAQC,EAAuBC,EAAqC,CACxF,KAAM,CAAE,OAAAC,EAAQ,QAAAC,CAAQ,EAAIH,EAC5B,GAAI,CACF,MAAMI,EAAS,CACb,QAASD,GAAWE,EACpB,QAAS,CACP,cAAe,WAAWH,CAAM,EAClC,EACA,YAAa,CACX,GAAGD,CACL,CACF,CAAC,CACH,OAASK,EAAK,CACZC,EAAO,MAAM,qBAAsBD,CAAG,CACxC,CACF"}
1
+ {"version":3,"file":"index-giTGb0gn.esm.js","sources":["../../src/integrations/logs/index.ts"],"sourcesContent":["import { postLogs } from \"../../api-sdk/v3/routes\";\nimport { paths } from \"../../api-sdk/v3/openapi-spec\";\nimport { logger } from \"../../utils/logger\";\nimport { DEFAULT_LOG_URL } from \"../../api-sdk/constants\";\n\ntype PostLogsReq = paths[\"/logs\"][\"post\"][\"requestBody\"][\"content\"][\"application/json\"];\n\ninterface SendLogConfig {\n apiKey: string;\n baseUrl?: string;\n}\n\nexport async function sendLog(config: SendLogConfig, payload: PostLogsReq): Promise<void> {\n const { apiKey, baseUrl } = config;\n try {\n await postLogs({\n baseUrl: baseUrl || DEFAULT_LOG_URL,\n headers: {\n authorization: `Api-Key ${apiKey}`,\n },\n requestBody: {\n ...payload,\n },\n });\n } catch (err) {\n logger.error(\"Failed to send log\", err);\n }\n}\n"],"names":["sendLog","config","payload","apiKey","baseUrl","postLogs","DEFAULT_LOG_URL","err","logger"],"mappings":"gGAYA,eAAsBA,EAAQC,EAAuBC,EAAqC,CACxF,KAAM,CAAE,OAAAC,EAAQ,QAAAC,CAAQ,EAAIH,EAC5B,GAAI,CACF,MAAMI,EAAS,CACb,QAASD,GAAWE,EACpB,QAAS,CACP,cAAe,WAAWH,CAAM,EAClC,EACA,YAAa,CACX,GAAGD,CACL,CACF,CAAC,CACH,OAASK,EAAK,CACZC,EAAO,MAAM,qBAAsBD,CAAG,CACxC,CACF"}
@@ -5,7 +5,10 @@ import { BeamSelectNonprofit } from '../components/select-nonprofit.js';
5
5
  import { BeamRedeemTransaction } from '../components/redeem-transaction.js';
6
6
  import { BeamPostPurchase } from '../components/post-purchase.js';
7
7
  import { BeamSubscriptionManagement } from '../components/subscription-management.js';
8
+ import { BeamSubscriptionImpact } from '../components/subscription-impact.js';
8
9
  import { BeamProductDetailsPage } from '../components/product-details-page.js';
10
+ import { BeamSelectSubscriptionNonprofit } from '../components/select-subscription-nonprofit.js';
11
+ import { BeamSocialShare } from '../components/social-share.js';
9
12
 
10
13
  /**
11
14
  * This file is used to provide type definitions
@@ -18,9 +21,12 @@ declare const index_BeamPostPurchase: typeof BeamPostPurchase;
18
21
  declare const index_BeamProductDetailsPage: typeof BeamProductDetailsPage;
19
22
  declare const index_BeamRedeemTransaction: typeof BeamRedeemTransaction;
20
23
  declare const index_BeamSelectNonprofit: typeof BeamSelectNonprofit;
24
+ declare const index_BeamSelectSubscriptionNonprofit: typeof BeamSelectSubscriptionNonprofit;
25
+ declare const index_BeamSocialShare: typeof BeamSocialShare;
26
+ declare const index_BeamSubscriptionImpact: typeof BeamSubscriptionImpact;
21
27
  declare const index_BeamSubscriptionManagement: typeof BeamSubscriptionManagement;
22
28
  declare namespace index {
23
- export { index_BeamCommunityImpact as BeamCommunityImpact, index_BeamCumulativeImpact as BeamCumulativeImpact, index_BeamImpactOverview as BeamImpactOverview, index_BeamPostPurchase as BeamPostPurchase, index_BeamProductDetailsPage as BeamProductDetailsPage, index_BeamRedeemTransaction as BeamRedeemTransaction, index_BeamSelectNonprofit as BeamSelectNonprofit, index_BeamSubscriptionManagement as BeamSubscriptionManagement };
29
+ export { index_BeamCommunityImpact as BeamCommunityImpact, index_BeamCumulativeImpact as BeamCumulativeImpact, index_BeamImpactOverview as BeamImpactOverview, index_BeamPostPurchase as BeamPostPurchase, index_BeamProductDetailsPage as BeamProductDetailsPage, index_BeamRedeemTransaction as BeamRedeemTransaction, index_BeamSelectNonprofit as BeamSelectNonprofit, index_BeamSelectSubscriptionNonprofit as BeamSelectSubscriptionNonprofit, index_BeamSocialShare as BeamSocialShare, index_BeamSubscriptionImpact as BeamSubscriptionImpact, index_BeamSubscriptionManagement as BeamSubscriptionManagement };
24
30
  }
25
31
 
26
32
  export { index as i };
@@ -5,16 +5,24 @@ import BeamSelectNonprofit from '../react/select-nonprofit.js';
5
5
  import BeamRedeemTransaction from '../react/redeem-transaction.js';
6
6
  import BeamPostPurchase from '../react/post-purchase.js';
7
7
  import BeamSubscriptionManagement from '../react/subscription-management.js';
8
+ import BeamSelectSubscriptionNonprofit from '../react/select-subscription-nonprofit.js';
9
+ import BeamSubscriptionImpact from '../react/subscription-impact.js';
10
+ import BeamProductDetailsPage from '../react/product-details-page.js';
11
+ import BeamSocialShare from '../react/social-share.js';
8
12
 
9
13
  declare const index_BeamCommunityImpact: typeof BeamCommunityImpact;
10
14
  declare const index_BeamCumulativeImpact: typeof BeamCumulativeImpact;
11
15
  declare const index_BeamImpactOverview: typeof BeamImpactOverview;
12
16
  declare const index_BeamPostPurchase: typeof BeamPostPurchase;
17
+ declare const index_BeamProductDetailsPage: typeof BeamProductDetailsPage;
13
18
  declare const index_BeamRedeemTransaction: typeof BeamRedeemTransaction;
14
19
  declare const index_BeamSelectNonprofit: typeof BeamSelectNonprofit;
20
+ declare const index_BeamSelectSubscriptionNonprofit: typeof BeamSelectSubscriptionNonprofit;
21
+ declare const index_BeamSocialShare: typeof BeamSocialShare;
22
+ declare const index_BeamSubscriptionImpact: typeof BeamSubscriptionImpact;
15
23
  declare const index_BeamSubscriptionManagement: typeof BeamSubscriptionManagement;
16
24
  declare namespace index {
17
- export { index_BeamCommunityImpact as BeamCommunityImpact, index_BeamCumulativeImpact as BeamCumulativeImpact, index_BeamImpactOverview as BeamImpactOverview, index_BeamPostPurchase as BeamPostPurchase, index_BeamRedeemTransaction as BeamRedeemTransaction, index_BeamSelectNonprofit as BeamSelectNonprofit, index_BeamSubscriptionManagement as BeamSubscriptionManagement };
25
+ export { index_BeamCommunityImpact as BeamCommunityImpact, index_BeamCumulativeImpact as BeamCumulativeImpact, index_BeamImpactOverview as BeamImpactOverview, index_BeamPostPurchase as BeamPostPurchase, index_BeamProductDetailsPage as BeamProductDetailsPage, index_BeamRedeemTransaction as BeamRedeemTransaction, index_BeamSelectNonprofit as BeamSelectNonprofit, index_BeamSelectSubscriptionNonprofit as BeamSelectSubscriptionNonprofit, index_BeamSocialShare as BeamSocialShare, index_BeamSubscriptionImpact as BeamSubscriptionImpact, index_BeamSubscriptionManagement as BeamSubscriptionManagement };
18
26
  }
19
27
 
20
28
  export { index as i };
@@ -1,2 +1,2 @@
1
- import{v as d}from"./vendor-jQ8cxMpw.esm.js";import{getCookieValue as i,setCookieValue as p,deleteCookieValue as l}from"../utils/cookies.esm.js";import{createScopedLocalStorage as n}from"../utils/local-storage.esm.js";const s="beam_session";async function r({cookieName:e=s,domain:o=window.location.hostname,apiKey:t=""}={}){if(await i(e))return;const a=d(),m=Date.now()+30*24*60*60*1e3;await p({name:e,value:a,domain:o,path:"/",expires:m}),n({apiKey:t}).setItemJson("cart",{cartId:a})}async function c({cookieName:e=s,domain:o=window.location.hostname,apiKey:t=""}={}){const a=await i(e);a&&(n({apiKey:t}).setItemJson("cart",{cartId:a}),await l({name:e,domain:o}))}var u=Object.freeze({__proto__:null,createSession:r,endSession:c});export{r as c,c as e,u as i};
2
- //# sourceMappingURL=index-Q1vx4WtG.esm.js.map
1
+ import{v as d}from"./vendor--f7lkyBk.esm.js";import{getCookieValue as i,setCookieValue as p,deleteCookieValue as l}from"../utils/cookies.esm.js";import{createScopedLocalStorage as n}from"../utils/local-storage.esm.js";const s="beam_session";async function r({cookieName:e=s,domain:o=window.location.hostname,apiKey:t=""}={}){if(await i(e))return;const a=d(),m=Date.now()+30*24*60*60*1e3;await p({name:e,value:a,domain:o,path:"/",expires:m}),n({apiKey:t}).setItemJson("cart",{cartId:a})}async function c({cookieName:e=s,domain:o=window.location.hostname,apiKey:t=""}={}){const a=await i(e);a&&(n({apiKey:t}).setItemJson("cart",{cartId:a}),await l({name:e,domain:o}))}var u=Object.freeze({__proto__:null,createSession:r,endSession:c});export{r as c,c as e,u as i};
2
+ //# sourceMappingURL=index-mw70Caof.esm.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index-Q1vx4WtG.esm.js","sources":["../../src/integrations/session/index.ts"],"sourcesContent":["/**\n If checkout and order page are on different subdomains, we can't access localStorage for nonprofitId/selectionId\n We can make post-transaction work by copying a \"cartID\"-style cookie to the expected localStorage key on the current\n domain, which will allow the post-transaction widgets to send that to the backend which can restore the selection\n from the cart.\n\n This will also work if we don't have a cart cookie for some other reason, although it is not directly integrated\n with the host site's concept of a cart (e.g., line items and expiration dates).\n\n Note: Use a module import rather than a self-executing script so that we can set cookies on the host domain\n rather than our 3rd party CDN domain, and customize the options via arguments.\n\n Usage:\n <script type=\"module\">\n import { createSession } from 'https://...';\n createSession({domain: 'mystore.com'})\n </script>\n */\n\nimport { v4 as uuid } from \"@lukeed/uuid/secure\";\nimport { deleteCookieValue, getCookieValue, setCookieValue } from \"../../utils/cookies\";\nimport { createScopedLocalStorage } from \"../../utils/local-storage\";\n\nconst DEFAULT_COOKIE_NAME = \"beam_session\";\n\nexport async function createSession({\n cookieName = DEFAULT_COOKIE_NAME,\n domain = window.location.hostname, // domain or subdomain to set cookie on\n apiKey = \"\", // optional unless scoping localStorage to api key\n} = {}) {\n const existingValue = await getCookieValue(cookieName);\n\n if (existingValue) {\n return; // do nothing\n }\n\n const cookieValue = uuid();\n\n const expires = Date.now() + 30 * 24 * 60 * 60 * 1000; // 30 days\n\n await setCookieValue({ name: cookieName, value: cookieValue, domain, path: \"/\", expires });\n\n const beamLocalStorage = createScopedLocalStorage({ apiKey });\n beamLocalStorage.setItemJson(\"cart\", { cartId: cookieValue });\n}\n\nexport async function endSession({\n cookieName = DEFAULT_COOKIE_NAME,\n domain = window.location.hostname, // domain to remove cookie from\n apiKey = \"\", // optional unless scoping localStorage to api key\n} = {}) {\n const cookieValue = await getCookieValue(cookieName);\n\n if (!cookieValue) {\n return; // do nothing\n }\n\n // copy cookie value into localStorage for widgets to use\n const beamLocalStorage = createScopedLocalStorage({ apiKey });\n beamLocalStorage.setItemJson(\"cart\", { cartId: cookieValue });\n\n // delete cookie to end session (will generate new one on next visit)\n await deleteCookieValue({ name: cookieName, domain });\n}\n"],"names":["DEFAULT_COOKIE_NAME","createSession","cookieName","domain","apiKey","getCookieValue","cookieValue","uuid","expires","setCookieValue","createScopedLocalStorage","endSession","deleteCookieValue"],"mappings":"0NAuBA,MAAMA,EAAsB,eAE5B,eAAsBC,EAAc,CAClC,WAAAC,EAAaF,EACb,OAAAG,EAAS,OAAO,SAAS,SACzB,OAAAC,EAAS,EACX,EAAI,CAAI,EAAA,CAGN,GAFsB,MAAMC,EAAeH,CAAU,EAGnD,OAGF,MAAMI,EAAcC,EAAK,EAEnBC,EAAU,KAAK,IAAA,EAAQ,GAAK,GAAK,GAAK,GAAK,IAEjD,MAAMC,EAAe,CAAE,KAAMP,EAAY,MAAOI,EAAa,OAAAH,EAAQ,KAAM,IAAK,QAAAK,CAAQ,CAAC,EAEhEE,EAAyB,CAAE,OAAAN,CAAO,CAAC,EAC3C,YAAY,OAAQ,CAAE,OAAQE,CAAY,CAAC,CAC9D,CAEA,eAAsBK,EAAW,CAC/B,WAAAT,EAAaF,EACb,OAAAG,EAAS,OAAO,SAAS,SACzB,OAAAC,EAAS,EACX,EAAI,GAAI,CACN,MAAME,EAAc,MAAMD,EAAeH,CAAU,EAE9CI,IAKoBI,EAAyB,CAAE,OAAAN,CAAO,CAAC,EAC3C,YAAY,OAAQ,CAAE,OAAQE,CAAY,CAAC,EAG5D,MAAMM,EAAkB,CAAE,KAAMV,EAAY,OAAAC,CAAO,CAAC,EACtD"}
1
+ {"version":3,"file":"index-mw70Caof.esm.js","sources":["../../src/integrations/session/index.ts"],"sourcesContent":["/**\n If checkout and order page are on different subdomains, we can't access localStorage for nonprofitId/selectionId\n We can make post-transaction work by copying a \"cartID\"-style cookie to the expected localStorage key on the current\n domain, which will allow the post-transaction widgets to send that to the backend which can restore the selection\n from the cart.\n\n This will also work if we don't have a cart cookie for some other reason, although it is not directly integrated\n with the host site's concept of a cart (e.g., line items and expiration dates).\n\n Note: Use a module import rather than a self-executing script so that we can set cookies on the host domain\n rather than our 3rd party CDN domain, and customize the options via arguments.\n\n Usage:\n <script type=\"module\">\n import { createSession } from 'https://...';\n createSession({domain: 'mystore.com'})\n </script>\n */\n\nimport { v4 as uuid } from \"@lukeed/uuid/secure\";\nimport { deleteCookieValue, getCookieValue, setCookieValue } from \"../../utils/cookies\";\nimport { createScopedLocalStorage } from \"../../utils/local-storage\";\n\nconst DEFAULT_COOKIE_NAME = \"beam_session\";\n\nexport async function createSession({\n cookieName = DEFAULT_COOKIE_NAME,\n domain = window.location.hostname, // domain or subdomain to set cookie on\n apiKey = \"\", // optional unless scoping localStorage to api key\n} = {}) {\n const existingValue = await getCookieValue(cookieName);\n\n if (existingValue) {\n return; // do nothing\n }\n\n const cookieValue = uuid();\n\n const expires = Date.now() + 30 * 24 * 60 * 60 * 1000; // 30 days\n\n await setCookieValue({ name: cookieName, value: cookieValue, domain, path: \"/\", expires });\n\n const beamLocalStorage = createScopedLocalStorage({ apiKey });\n beamLocalStorage.setItemJson(\"cart\", { cartId: cookieValue });\n}\n\nexport async function endSession({\n cookieName = DEFAULT_COOKIE_NAME,\n domain = window.location.hostname, // domain to remove cookie from\n apiKey = \"\", // optional unless scoping localStorage to api key\n} = {}) {\n const cookieValue = await getCookieValue(cookieName);\n\n if (!cookieValue) {\n return; // do nothing\n }\n\n // copy cookie value into localStorage for widgets to use\n const beamLocalStorage = createScopedLocalStorage({ apiKey });\n beamLocalStorage.setItemJson(\"cart\", { cartId: cookieValue });\n\n // delete cookie to end session (will generate new one on next visit)\n await deleteCookieValue({ name: cookieName, domain });\n}\n"],"names":["DEFAULT_COOKIE_NAME","createSession","cookieName","domain","apiKey","getCookieValue","cookieValue","uuid","expires","setCookieValue","createScopedLocalStorage","endSession","deleteCookieValue"],"mappings":"0NAuBA,MAAMA,EAAsB,eAE5B,eAAsBC,EAAc,CAClC,WAAAC,EAAaF,EACb,OAAAG,EAAS,OAAO,SAAS,SACzB,OAAAC,EAAS,EACX,EAAI,CAAI,EAAA,CAGN,GAFsB,MAAMC,EAAeH,CAAU,EAGnD,OAGF,MAAMI,EAAcC,EAAK,EAEnBC,EAAU,KAAK,IAAA,EAAQ,GAAK,GAAK,GAAK,GAAK,IAEjD,MAAMC,EAAe,CAAE,KAAMP,EAAY,MAAOI,EAAa,OAAAH,EAAQ,KAAM,IAAK,QAAAK,CAAQ,CAAC,EAEhEE,EAAyB,CAAE,OAAAN,CAAO,CAAC,EAC3C,YAAY,OAAQ,CAAE,OAAQE,CAAY,CAAC,CAC9D,CAEA,eAAsBK,EAAW,CAC/B,WAAAT,EAAaF,EACb,OAAAG,EAAS,OAAO,SAAS,SACzB,OAAAC,EAAS,EACX,EAAI,GAAI,CACN,MAAME,EAAc,MAAMD,EAAeH,CAAU,EAE9CI,IAKoBI,EAAyB,CAAE,OAAAN,CAAO,CAAC,EAC3C,YAAY,OAAQ,CAAE,OAAQE,CAAY,CAAC,EAG5D,MAAMM,EAAkB,CAAE,KAAMV,EAAY,OAAAC,CAAO,CAAC,EACtD"}
@@ -1,2 +1,2 @@
1
- import{b as e}from"./beam-errors-P-Lu07Ce.esm.js";import{e as o}from"./events-Y8fYvSqM.esm.js";import{logger as r}from"../utils/logger.esm.js";import{fetchProxy as t,initNetworkListeners as i,xhrProxy as m}from"../utils/network-listeners.esm.js";import{createScopedLocalStorage as a}from"../utils/local-storage.esm.js";import{waitForElement as s}from"../utils/wait-for-element.esm.js";import{deleteCookieValue as l,getCookieMap as n,getCookieValue as p,setCookieValue as f}from"../utils/cookies.esm.js";import{getRemoteSession as g,saveRemoteSession as c}from"../utils/remote-session.esm.js";import{memoizeLast as u}from"../utils/memoize-last.esm.js";import{d as k,i as d}from"./lodash-P8OIs-at.esm.js";var x=Object.freeze({__proto__:null,createScopedLocalStorage:a,debounce:k,deleteCookieValue:l,errors:e,events:o,fetchProxy:t,getCookieMap:n,getCookieValue:p,getRemoteSession:g,initNetworkListeners:i,isEqual:d,logger:r,memoizeLast:u,saveRemoteSession:c,setCookieValue:f,waitForElement:s,xhrProxy:m});export{x as i};
2
- //# sourceMappingURL=index-8yrr7ZZv.esm.js.map
1
+ import{b as e}from"./beam-errors-P-Lu07Ce.esm.js";import{e as o}from"./events-_4nImo3u.esm.js";import{logger as r}from"../utils/logger.esm.js";import{fetchProxy as t,initNetworkListeners as i,xhrProxy as m}from"../utils/network-listeners.esm.js";import{createScopedLocalStorage as a}from"../utils/local-storage.esm.js";import{waitForElement as s}from"../utils/wait-for-element.esm.js";import{deleteCookieValue as l,getCookieMap as n,getCookieValue as p,setCookieValue as f}from"../utils/cookies.esm.js";import{getRemoteSession as g,saveRemoteSession as c}from"../utils/remote-session.esm.js";import{memoizeLast as u}from"../utils/memoize-last.esm.js";import{d as k,i as d}from"./lodash-P8OIs-at.esm.js";var x=Object.freeze({__proto__:null,createScopedLocalStorage:a,debounce:k,deleteCookieValue:l,errors:e,events:o,fetchProxy:t,getCookieMap:n,getCookieValue:p,getRemoteSession:g,initNetworkListeners:i,isEqual:d,logger:r,memoizeLast:u,saveRemoteSession:c,setCookieValue:f,waitForElement:s,xhrProxy:m});export{x as i};
2
+ //# sourceMappingURL=index-n6QNFLXV.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index-n6QNFLXV.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ import{a as i,c as n}from"./routes-zzEfDMIn.esm.js";import{logger as c}from"../utils/logger.esm.js";async function e(o,r){const{apiKey:a,baseUrl:s}=o;try{await n({baseUrl:s||i,headers:{authorization:`Api-Key ${a}`},requestBody:{...r}})}catch(t){c.error("Failed to send log",t)}}var d=Object.freeze({__proto__:null,sendLog:e});export{d as i,e as s};
2
+ //# sourceMappingURL=index-qjhWIDcT.esm.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index-kxMe_AX1.esm.js","sources":["../../src/integrations/logs/index.ts"],"sourcesContent":["import { postLogs } from \"../../api-sdk/v3/routes\";\nimport { paths } from \"../../api-sdk/v3/openapi-spec\";\nimport { logger } from \"../../utils/logger\";\nimport { DEFAULT_LOG_URL } from \"../../api-sdk/constants\";\n\ntype PostLogsReq = paths[\"/logs\"][\"post\"][\"requestBody\"][\"content\"][\"application/json\"];\n\ninterface SendLogConfig {\n apiKey: string;\n baseUrl?: string;\n}\n\nexport async function sendLog(config: SendLogConfig, payload: PostLogsReq): Promise<void> {\n const { apiKey, baseUrl } = config;\n try {\n await postLogs({\n baseUrl: baseUrl || DEFAULT_LOG_URL,\n headers: {\n authorization: `Api-Key ${apiKey}`,\n },\n requestBody: {\n ...payload,\n },\n });\n } catch (err) {\n logger.error(\"Failed to send log\", err);\n }\n}\n"],"names":["sendLog","config","payload","apiKey","baseUrl","postLogs","DEFAULT_LOG_URL","err","logger"],"mappings":"oGAYA,eAAsBA,EAAQC,EAAuBC,EAAqC,CACxF,KAAM,CAAE,OAAAC,EAAQ,QAAAC,CAAQ,EAAIH,EAC5B,GAAI,CACF,MAAMI,EAAS,CACb,QAASD,GAAWE,EACpB,QAAS,CACP,cAAe,WAAWH,CAAM,EAClC,EACA,YAAa,CACX,GAAGD,CACL,CACF,CAAC,CACH,OAASK,EAAK,CACZC,EAAO,MAAM,qBAAsBD,CAAG,CACxC,CACF"}
1
+ {"version":3,"file":"index-qjhWIDcT.esm.js","sources":["../../src/integrations/logs/index.ts"],"sourcesContent":["import { postLogs } from \"../../api-sdk/v3/routes\";\nimport { paths } from \"../../api-sdk/v3/openapi-spec\";\nimport { logger } from \"../../utils/logger\";\nimport { DEFAULT_LOG_URL } from \"../../api-sdk/constants\";\n\ntype PostLogsReq = paths[\"/logs\"][\"post\"][\"requestBody\"][\"content\"][\"application/json\"];\n\ninterface SendLogConfig {\n apiKey: string;\n baseUrl?: string;\n}\n\nexport async function sendLog(config: SendLogConfig, payload: PostLogsReq): Promise<void> {\n const { apiKey, baseUrl } = config;\n try {\n await postLogs({\n baseUrl: baseUrl || DEFAULT_LOG_URL,\n headers: {\n authorization: `Api-Key ${apiKey}`,\n },\n requestBody: {\n ...payload,\n },\n });\n } catch (err) {\n logger.error(\"Failed to send log\", err);\n }\n}\n"],"names":["sendLog","config","payload","apiKey","baseUrl","postLogs","DEFAULT_LOG_URL","err","logger"],"mappings":"oGAYA,eAAsBA,EAAQC,EAAuBC,EAAqC,CACxF,KAAM,CAAE,OAAAC,EAAQ,QAAAC,CAAQ,EAAIH,EAC5B,GAAI,CACF,MAAMI,EAAS,CACb,QAASD,GAAWE,EACpB,QAAS,CACP,cAAe,WAAWH,CAAM,EAClC,EACA,YAAa,CACX,GAAGD,CACL,CACF,CAAC,CACH,OAASK,EAAK,CACZC,EAAO,MAAM,qBAAsBD,CAAG,CACxC,CACF"}
@@ -1,2 +1,2 @@
1
- import{b as e}from"./beam-errors-P-Lu07Ce.esm.js";import{e as o}from"./events-Y8fYvSqM.esm.js";import{logger as r}from"../utils/logger.js";import{fetchProxy as t,initNetworkListeners as i,xhrProxy as m}from"../utils/network-listeners.js";import{createScopedLocalStorage as a}from"../utils/local-storage.js";import{waitForElement as s}from"../utils/wait-for-element.js";import{deleteCookieValue as l,getCookieMap as n,getCookieValue as p,setCookieValue as f}from"../utils/cookies.js";import{getRemoteSession as g,saveRemoteSession as c}from"../utils/remote-session.js";import{memoizeLast as u}from"../utils/memoize-last.js";import{d as k,i as d}from"./lodash-P8OIs-at.esm.js";var x=Object.freeze({__proto__:null,createScopedLocalStorage:a,debounce:k,deleteCookieValue:l,errors:e,events:o,fetchProxy:t,getCookieMap:n,getCookieValue:p,getRemoteSession:g,initNetworkListeners:i,isEqual:d,logger:r,memoizeLast:u,saveRemoteSession:c,setCookieValue:f,waitForElement:s,xhrProxy:m});export{x as i};
2
- //# sourceMappingURL=index-uF-Qtewb.esm.js.map
1
+ import{b as e}from"./beam-errors-P-Lu07Ce.esm.js";import{e as o}from"./events-_4nImo3u.esm.js";import{logger as r}from"../utils/logger.js";import{fetchProxy as t,initNetworkListeners as i,xhrProxy as m}from"../utils/network-listeners.js";import{createScopedLocalStorage as a}from"../utils/local-storage.js";import{waitForElement as s}from"../utils/wait-for-element.js";import{deleteCookieValue as l,getCookieMap as n,getCookieValue as p,setCookieValue as f}from"../utils/cookies.js";import{getRemoteSession as g,saveRemoteSession as c}from"../utils/remote-session.js";import{memoizeLast as u}from"../utils/memoize-last.js";import{d as k,i as d}from"./lodash-P8OIs-at.esm.js";var x=Object.freeze({__proto__:null,createScopedLocalStorage:a,debounce:k,deleteCookieValue:l,errors:e,events:o,fetchProxy:t,getCookieMap:n,getCookieValue:p,getRemoteSession:g,initNetworkListeners:i,isEqual:d,logger:r,memoizeLast:u,saveRemoteSession:c,setCookieValue:f,waitForElement:s,xhrProxy:m});export{x as i};
2
+ //# sourceMappingURL=index-x2kxA_Xo.esm.js.map