@beamimpact/web-sdk 1.48.0 → 1.51.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 (370) hide show
  1. package/dist/chunks/_share-dialog-dependencies-B3N69ml2.esm.js +2 -0
  2. package/dist/chunks/_share-dialog-dependencies-B3N69ml2.esm.js.map +1 -0
  3. package/dist/chunks/_share-dialog-dependencies-CHbTSPha.esm.js +2 -0
  4. package/dist/chunks/_share-dialog-dependencies-CHbTSPha.esm.js.map +1 -0
  5. package/dist/chunks/{beam-errors-fXDkG1zo.esm.d.ts → beam-errors-CCe004HS.esm.d.ts} +2 -7
  6. package/dist/chunks/beam-errors-Ci0d3926.esm.js +2 -0
  7. package/dist/chunks/beam-errors-Ci0d3926.esm.js.map +1 -0
  8. package/dist/chunks/cart-contents-CUgc4y1N.esm.d.ts +18 -0
  9. package/dist/chunks/cart-contents-DkoytiZh.esm.js +2 -0
  10. package/dist/chunks/{cart-contents-h60geKWa.esm.js.map → cart-contents-DkoytiZh.esm.js.map} +1 -1
  11. package/dist/chunks/{css-card-grid-nEc--M5M.esm.js → css-card-grid-B6IEaTiP.esm.js} +2 -2
  12. package/dist/chunks/{css-card-grid-nEc--M5M.esm.js.map → css-card-grid-B6IEaTiP.esm.js.map} +1 -1
  13. package/dist/chunks/enforce-config-CQb5MiAV.esm.js +3 -0
  14. package/dist/chunks/enforce-config-CQb5MiAV.esm.js.map +1 -0
  15. package/dist/chunks/enforce-config-Cw52SuAc.esm.js +3 -0
  16. package/dist/chunks/enforce-config-Cw52SuAc.esm.js.map +1 -0
  17. package/dist/chunks/{events-ZCTR9JGZ.esm.d.ts → events-BKkf9u9l.esm.d.ts} +33 -4
  18. package/dist/chunks/events-BohmT6Lp.esm.js +2 -0
  19. package/dist/chunks/events-BohmT6Lp.esm.js.map +1 -0
  20. package/dist/chunks/{index-JDZQClkA.esm.js → index-BQ4Nr7Ux.esm.js} +2 -2
  21. package/dist/chunks/{index-JDZQClkA.esm.js.map → index-BQ4Nr7Ux.esm.js.map} +1 -1
  22. package/dist/chunks/index-B_8DexDX.esm.js +2 -0
  23. package/dist/chunks/index-B_8DexDX.esm.js.map +1 -0
  24. package/dist/chunks/{index-v6fG3D6u.esm.d.ts → index-BqBEii8E.esm.d.ts} +1 -1
  25. package/dist/chunks/index-C-beNpP0.esm.js +2 -0
  26. package/dist/chunks/index-C-beNpP0.esm.js.map +1 -0
  27. package/dist/chunks/{index-E8H5A7Qq.esm.js → index-C3hpHWh1.esm.js} +1 -1
  28. package/dist/chunks/index-C3hpHWh1.esm.js.map +1 -0
  29. package/dist/chunks/{index-XHm2EBaD.esm.js → index-CFYWEffm.esm.js} +2 -2
  30. package/dist/chunks/{index-XHm2EBaD.esm.js.map → index-CFYWEffm.esm.js.map} +1 -1
  31. package/dist/chunks/{index-FQExZDX9.esm.js → index-CFtmDAHb.esm.js} +1 -1
  32. package/dist/chunks/index-CFtmDAHb.esm.js.map +1 -0
  33. package/dist/chunks/{index-eXilYHHK.esm.js → index-C_ZNnJIS.esm.js} +2 -2
  34. package/dist/chunks/{index-eXilYHHK.esm.js.map → index-C_ZNnJIS.esm.js.map} +1 -1
  35. package/dist/chunks/{index-PA0NAKHV.esm.d.ts → index-CbKkAM6h.esm.d.ts} +1 -1
  36. package/dist/chunks/index-CbWdmBet.esm.js +2 -0
  37. package/dist/chunks/index-CbWdmBet.esm.js.map +1 -0
  38. package/dist/chunks/index-CpPbNdWA.esm.js +2 -0
  39. package/dist/chunks/index-CpPbNdWA.esm.js.map +1 -0
  40. package/dist/chunks/index-CyiXyHi8.esm.js +2 -0
  41. package/dist/chunks/index-CyiXyHi8.esm.js.map +1 -0
  42. package/dist/chunks/{index-XCMf22lv.esm.js → index-D6qJfs7_.esm.js} +1 -1
  43. package/dist/chunks/index-D6qJfs7_.esm.js.map +1 -0
  44. package/dist/chunks/index-DhtZDPvk.esm.js +2 -0
  45. package/dist/chunks/index-DhtZDPvk.esm.js.map +1 -0
  46. package/dist/chunks/index-Dnm34FcO.esm.d.ts +46 -0
  47. package/dist/chunks/index-DvbUE31b.esm.d.ts +46 -0
  48. package/dist/chunks/index-GcpuX_TZ.esm.js +2 -0
  49. package/dist/chunks/index-GcpuX_TZ.esm.js.map +1 -0
  50. package/dist/chunks/index-JSoHc6g1.esm.js +2 -0
  51. package/dist/chunks/index-JSoHc6g1.esm.js.map +1 -0
  52. package/dist/chunks/index-MS8_Vije.esm.d.ts +15 -0
  53. package/dist/chunks/index-XZRQN4Rs.esm.js +2 -0
  54. package/dist/chunks/index-XZRQN4Rs.esm.js.map +1 -0
  55. package/dist/chunks/{index-JJjxnRZK.esm.js → index-kDoWfjd5.esm.js} +2 -2
  56. package/dist/chunks/{index-JJjxnRZK.esm.js.map → index-kDoWfjd5.esm.js.map} +1 -1
  57. package/dist/chunks/index-n7pxZENA.esm.js +2 -0
  58. package/dist/chunks/index-n7pxZENA.esm.js.map +1 -0
  59. package/dist/chunks/{index-PiMq5a49.esm.js → index-oGObXjk6.esm.js} +1 -1
  60. package/dist/chunks/index-oGObXjk6.esm.js.map +1 -0
  61. package/dist/chunks/{index--z5MSe4-.esm.d.ts → index-v0tUXySN.esm.d.ts} +3 -2
  62. package/dist/chunks/{is-all-html-elements-SdSkxirh.esm.js → is-all-html-elements-fcB7UUA1.esm.js} +1 -1
  63. package/dist/chunks/{is-all-html-elements-SdSkxirh.esm.js.map → is-all-html-elements-fcB7UUA1.esm.js.map} +1 -1
  64. package/dist/chunks/lit-5uUWs2aX.esm.js +34 -0
  65. package/dist/chunks/{lit-iNN5L_Qk.esm.js.map → lit-5uUWs2aX.esm.js.map} +1 -1
  66. package/dist/chunks/loading-template-DXNS89Th.esm.js +2 -0
  67. package/dist/chunks/{loading-template-t4fFsYtr.esm.js.map → loading-template-DXNS89Th.esm.js.map} +1 -1
  68. package/dist/chunks/{localize-m-_ESmpk.esm.js → localize-CQCRjY9s.esm.js} +6 -6
  69. package/dist/chunks/{localize-m-_ESmpk.esm.js.map → localize-CQCRjY9s.esm.js.map} +1 -1
  70. package/dist/chunks/{localize-o-cYvHQf.esm.js → localize-cDQFOecn.esm.js} +6 -6
  71. package/dist/chunks/{localize-o-cYvHQf.esm.js.map → localize-cDQFOecn.esm.js.map} +1 -1
  72. package/dist/chunks/lodash-7H4x2457.esm.js +2 -0
  73. package/dist/chunks/lodash-7H4x2457.esm.js.map +1 -0
  74. package/dist/chunks/{openapi-spec-hjdK2L9Q.esm.d.ts → openapi-spec-VAt3phhg.esm.d.ts} +332 -0
  75. package/dist/chunks/order-page-CMGPM57D.esm.js +2 -0
  76. package/dist/chunks/order-page-CMGPM57D.esm.js.map +1 -0
  77. package/dist/chunks/order-page-FzVtMkga.esm.js +2 -0
  78. package/dist/chunks/order-page-FzVtMkga.esm.js.map +1 -0
  79. package/dist/chunks/{order-page-9clVUPaS.esm.d.ts → order-page-tSPKLQ24.esm.d.ts} +11 -8
  80. package/dist/chunks/{progress-bar-PMU_xI3L.esm.js → progress-bar-oJB_t7od.esm.js} +4 -4
  81. package/dist/chunks/{progress-bar-PMU_xI3L.esm.js.map → progress-bar-oJB_t7od.esm.js.map} +1 -1
  82. package/dist/chunks/promo-pill-label-D9ptiGak.esm.js +16 -0
  83. package/dist/chunks/{promo-pill-label-P1X4xeAx.esm.js.map → promo-pill-label-D9ptiGak.esm.js.map} +1 -1
  84. package/dist/chunks/promo-types-C1unMpo2.esm.d.ts +14 -0
  85. package/dist/chunks/promoManager-B9cTR1R3.esm.js +2 -0
  86. package/dist/chunks/promoManager-B9cTR1R3.esm.js.map +1 -0
  87. package/dist/chunks/promoManager-fl54hq13.esm.js +2 -0
  88. package/dist/chunks/promoManager-fl54hq13.esm.js.map +1 -0
  89. package/dist/chunks/{responsive-2lC2Wrtg.esm.js → responsive-9jAzOYoE.esm.js} +2 -2
  90. package/dist/chunks/{responsive-2lC2Wrtg.esm.js.map → responsive-9jAzOYoE.esm.js.map} +1 -1
  91. package/dist/chunks/routes-CaSRr919.esm.js +2 -0
  92. package/dist/chunks/routes-CaSRr919.esm.js.map +1 -0
  93. package/dist/chunks/{routes-iurI6dvR.esm.d.ts → routes-DDRd747e.esm.d.ts} +76 -3
  94. package/dist/chunks/routes-KHEaM_40.esm.js +2 -0
  95. package/dist/chunks/routes-KHEaM_40.esm.js.map +1 -0
  96. package/dist/chunks/{share-button-k_Xn5956.esm.js → share-button-BbG-gnwj.esm.js} +4 -4
  97. package/dist/chunks/{share-button-diP8wKOc.esm.js.map → share-button-BbG-gnwj.esm.js.map} +1 -1
  98. package/dist/chunks/{share-button-diP8wKOc.esm.js → share-button-CvTUluNq.esm.js} +4 -4
  99. package/dist/chunks/{share-button-k_Xn5956.esm.js.map → share-button-CvTUluNq.esm.js.map} +1 -1
  100. package/dist/chunks/{share-button-hDn8fnBI.esm.d.ts → share-button-DBVhw4qa.esm.d.ts} +1 -1
  101. package/dist/chunks/{share-button-SNvuFDC9.esm.js → share-button-R7jgVCPv.esm.js} +1 -1
  102. package/dist/chunks/{share-button-SNvuFDC9.esm.js.map → share-button-R7jgVCPv.esm.js.map} +1 -1
  103. package/dist/chunks/{types-zbTZ8-KP.esm.d.ts → types-CPxMwnoR.esm.d.ts} +5 -1
  104. package/dist/chunks/update-cart-3JFUCJLD.esm.js +2 -0
  105. package/dist/chunks/update-cart-3JFUCJLD.esm.js.map +1 -0
  106. package/dist/chunks/update-cart-DNfl9QP2.esm.js +2 -0
  107. package/dist/chunks/update-cart-DNfl9QP2.esm.js.map +1 -0
  108. package/dist/chunks/{update-cart-l86bU5uS.esm.d.ts → update-cart-NiToHHJH.esm.d.ts} +2 -2
  109. package/dist/chunks/{vendor-GKiOHg2N.esm.js → vendor-DRA8u-S7.esm.js} +2 -2
  110. package/dist/chunks/{vendor-GKiOHg2N.esm.js.map → vendor-DRA8u-S7.esm.js.map} +1 -1
  111. package/dist/components/beam-partner-logos.d.ts +1 -1
  112. package/dist/components/beam-partner-logos.esm.js +4 -4
  113. package/dist/components/beam-partner-logos.esm.js.map +1 -1
  114. package/dist/components/beam-partner-logos.js +4 -4
  115. package/dist/components/beam-partner-logos.js.map +1 -1
  116. package/dist/components/community-impact.d.ts +3 -3
  117. package/dist/components/community-impact.esm.js +13 -13
  118. package/dist/components/community-impact.esm.js.map +1 -1
  119. package/dist/components/community-impact.js +13 -13
  120. package/dist/components/community-impact.js.map +1 -1
  121. package/dist/components/cumulative-impact.d.ts +2 -2
  122. package/dist/components/cumulative-impact.esm.js +8 -8
  123. package/dist/components/cumulative-impact.esm.js.map +1 -1
  124. package/dist/components/cumulative-impact.js +8 -8
  125. package/dist/components/cumulative-impact.js.map +1 -1
  126. package/dist/components/impact-overview.d.ts +9 -5
  127. package/dist/components/impact-overview.esm.js +19 -19
  128. package/dist/components/impact-overview.esm.js.map +1 -1
  129. package/dist/components/impact-overview.js +19 -19
  130. package/dist/components/impact-overview.js.map +1 -1
  131. package/dist/components/index.d.ts +8 -8
  132. package/dist/components/index.esm.js +1 -1
  133. package/dist/components/index.js +1 -1
  134. package/dist/components/post-purchase.d.ts +15 -7
  135. package/dist/components/post-purchase.esm.js +4 -4
  136. package/dist/components/post-purchase.esm.js.map +1 -1
  137. package/dist/components/post-purchase.js +4 -4
  138. package/dist/components/post-purchase.js.map +1 -1
  139. package/dist/components/product-details-page.d.ts +25 -7
  140. package/dist/components/product-details-page.esm.js +39 -28
  141. package/dist/components/product-details-page.esm.js.map +1 -1
  142. package/dist/components/product-details-page.js +39 -28
  143. package/dist/components/product-details-page.js.map +1 -1
  144. package/dist/components/redeem-transaction.d.ts +8 -17
  145. package/dist/components/redeem-transaction.esm.js +27 -27
  146. package/dist/components/redeem-transaction.esm.js.map +1 -1
  147. package/dist/components/redeem-transaction.js +27 -27
  148. package/dist/components/redeem-transaction.js.map +1 -1
  149. package/dist/components/select-nonprofit.d.ts +13 -6
  150. package/dist/components/select-nonprofit.esm.js +50 -45
  151. package/dist/components/select-nonprofit.esm.js.map +1 -1
  152. package/dist/components/select-nonprofit.js +50 -45
  153. package/dist/components/select-nonprofit.js.map +1 -1
  154. package/dist/components/select-subscription-nonprofit.d.ts +3 -3
  155. package/dist/components/select-subscription-nonprofit.esm.js +13 -13
  156. package/dist/components/select-subscription-nonprofit.esm.js.map +1 -1
  157. package/dist/components/select-subscription-nonprofit.js +13 -13
  158. package/dist/components/select-subscription-nonprofit.js.map +1 -1
  159. package/dist/components/shopify.d.ts +12 -11
  160. package/dist/components/shopify.esm.js +1 -1
  161. package/dist/components/shopify.esm.js.map +1 -1
  162. package/dist/components/shopify.js +1 -1
  163. package/dist/components/shopify.js.map +1 -1
  164. package/dist/components/social-share.d.ts +3 -3
  165. package/dist/components/social-share.esm.js +3 -3
  166. package/dist/components/social-share.esm.js.map +1 -1
  167. package/dist/components/social-share.js +3 -3
  168. package/dist/components/social-share.js.map +1 -1
  169. package/dist/components/subscription-impact.d.ts +5 -4
  170. package/dist/components/subscription-impact.esm.js +16 -16
  171. package/dist/components/subscription-impact.esm.js.map +1 -1
  172. package/dist/components/subscription-impact.js +16 -16
  173. package/dist/components/subscription-impact.js.map +1 -1
  174. package/dist/components/subscription-management.d.ts +18 -7
  175. package/dist/components/subscription-management.esm.js +9 -9
  176. package/dist/components/subscription-management.esm.js.map +1 -1
  177. package/dist/components/subscription-management.js +9 -9
  178. package/dist/components/subscription-management.js.map +1 -1
  179. package/dist/index.d.ts +23 -21
  180. package/dist/index.esm.js +1 -1
  181. package/dist/index.js +1 -1
  182. package/dist/integrations/beam.d.ts +1 -1
  183. package/dist/integrations/beam.esm.js +1 -1
  184. package/dist/integrations/beam.esm.js.map +1 -1
  185. package/dist/integrations/beam.js +1 -1
  186. package/dist/integrations/beam.js.map +1 -1
  187. package/dist/integrations/cart.d.ts +4 -4
  188. package/dist/integrations/cart.esm.js +1 -1
  189. package/dist/integrations/cart.js +1 -1
  190. package/dist/integrations/index.d.ts +19 -17
  191. package/dist/integrations/index.esm.js +1 -1
  192. package/dist/integrations/index.js +1 -1
  193. package/dist/integrations/logs.d.ts +2 -2
  194. package/dist/integrations/logs.esm.js +1 -1
  195. package/dist/integrations/logs.js +1 -1
  196. package/dist/integrations/promoManager.d.ts +36 -0
  197. package/dist/integrations/promoManager.esm.js +2 -0
  198. package/dist/integrations/promoManager.esm.js.map +1 -0
  199. package/dist/integrations/promoManager.js +2 -0
  200. package/dist/integrations/promoManager.js.map +1 -0
  201. package/dist/integrations/session.d.ts +1 -1
  202. package/dist/integrations/session.esm.js +1 -1
  203. package/dist/integrations/session.js +1 -1
  204. package/dist/integrations/shopify.d.ts +10 -10
  205. package/dist/integrations/shopify.esm.js +1 -1
  206. package/dist/integrations/shopify.js +1 -1
  207. package/dist/integrations/statsig.d.ts +1 -1
  208. package/dist/integrations/statsig.esm.js +2 -2
  209. package/dist/integrations/statsig.esm.js.map +1 -1
  210. package/dist/integrations/statsig.js +2 -2
  211. package/dist/integrations/statsig.js.map +1 -1
  212. package/dist/integrations/utils.d.ts +7 -5
  213. package/dist/integrations/utils.esm.js +1 -1
  214. package/dist/integrations/utils.js +1 -1
  215. package/dist/react/beam-partner-logos.d.ts +1 -1
  216. package/dist/react/beam-partner-logos.esm.js +1 -1
  217. package/dist/react/beam-partner-logos.js +1 -1
  218. package/dist/react/community-impact.d.ts +3 -3
  219. package/dist/react/community-impact.esm.js +1 -1
  220. package/dist/react/community-impact.js +1 -1
  221. package/dist/react/cumulative-impact.d.ts +2 -2
  222. package/dist/react/cumulative-impact.esm.js +1 -1
  223. package/dist/react/cumulative-impact.js +1 -1
  224. package/dist/react/impact-overview.d.ts +4 -4
  225. package/dist/react/impact-overview.esm.js +1 -1
  226. package/dist/react/impact-overview.esm.js.map +1 -1
  227. package/dist/react/impact-overview.js +1 -1
  228. package/dist/react/impact-overview.js.map +1 -1
  229. package/dist/react/index.d.ts +10 -9
  230. package/dist/react/index.esm.js +1 -1
  231. package/dist/react/index.js +1 -1
  232. package/dist/react/post-purchase.d.ts +7 -7
  233. package/dist/react/post-purchase.esm.js +1 -1
  234. package/dist/react/post-purchase.esm.js.map +1 -1
  235. package/dist/react/post-purchase.js +1 -1
  236. package/dist/react/post-purchase.js.map +1 -1
  237. package/dist/react/product-details-page.d.ts +3 -3
  238. package/dist/react/product-details-page.esm.js +1 -1
  239. package/dist/react/product-details-page.esm.js.map +1 -1
  240. package/dist/react/product-details-page.js +1 -1
  241. package/dist/react/product-details-page.js.map +1 -1
  242. package/dist/react/redeem-transaction.d.ts +8 -7
  243. package/dist/react/redeem-transaction.esm.js +1 -1
  244. package/dist/react/redeem-transaction.js +1 -1
  245. package/dist/react/select-nonprofit.d.ts +8 -7
  246. package/dist/react/select-nonprofit.esm.js +1 -1
  247. package/dist/react/select-nonprofit.esm.js.map +1 -1
  248. package/dist/react/select-nonprofit.js +1 -1
  249. package/dist/react/select-nonprofit.js.map +1 -1
  250. package/dist/react/select-subscription-nonprofit.d.ts +7 -6
  251. package/dist/react/select-subscription-nonprofit.esm.js +1 -1
  252. package/dist/react/select-subscription-nonprofit.js +1 -1
  253. package/dist/react/social-share.d.ts +3 -3
  254. package/dist/react/social-share.esm.js +1 -1
  255. package/dist/react/social-share.esm.js.map +1 -1
  256. package/dist/react/social-share.js +1 -1
  257. package/dist/react/social-share.js.map +1 -1
  258. package/dist/react/subscription-impact.d.ts +4 -4
  259. package/dist/react/subscription-impact.esm.js +1 -1
  260. package/dist/react/subscription-impact.js +1 -1
  261. package/dist/react/subscription-management.d.ts +7 -7
  262. package/dist/react/subscription-management.esm.js +1 -1
  263. package/dist/react/subscription-management.js +1 -1
  264. package/dist/utils/beam-errors.d.ts +1 -1
  265. package/dist/utils/beam-errors.esm.js +1 -1
  266. package/dist/utils/beam-errors.js +1 -1
  267. package/dist/utils/cart.esm.js +1 -1
  268. package/dist/utils/cart.js +1 -1
  269. package/dist/utils/cookies.esm.js +1 -1
  270. package/dist/utils/cookies.esm.js.map +1 -1
  271. package/dist/utils/cookies.js +1 -1
  272. package/dist/utils/cookies.js.map +1 -1
  273. package/dist/utils/debounce.esm.js +1 -1
  274. package/dist/utils/debounce.js +1 -1
  275. package/dist/utils/events.d.ts +5 -4
  276. package/dist/utils/events.esm.js +1 -1
  277. package/dist/utils/events.js +1 -1
  278. package/dist/utils/index.d.ts +7 -5
  279. package/dist/utils/index.esm.js +1 -1
  280. package/dist/utils/index.js +1 -1
  281. package/dist/utils/is-equal.esm.js +1 -1
  282. package/dist/utils/is-equal.js +1 -1
  283. package/dist/utils/local-storage.esm.js +1 -1
  284. package/dist/utils/local-storage.js +1 -1
  285. package/dist/utils/memoize-last.esm.js +1 -1
  286. package/dist/utils/memoize-last.esm.js.map +1 -1
  287. package/dist/utils/memoize-last.js +1 -1
  288. package/dist/utils/memoize-last.js.map +1 -1
  289. package/dist/utils/network-listeners.esm.js +1 -1
  290. package/dist/utils/network-listeners.esm.js.map +1 -1
  291. package/dist/utils/network-listeners.js +1 -1
  292. package/dist/utils/network-listeners.js.map +1 -1
  293. package/dist/utils/promoManager.d.ts +123 -0
  294. package/dist/utils/promoManager.esm.js +2 -0
  295. package/dist/utils/promoManager.esm.js.map +1 -0
  296. package/dist/utils/promoManager.js +2 -0
  297. package/dist/utils/promoManager.js.map +1 -0
  298. package/dist/utils/remote-session.esm.js +1 -1
  299. package/dist/utils/remote-session.js +1 -1
  300. package/dist/utils/wait-for-element.esm.js +1 -1
  301. package/dist/utils/wait-for-element.js +1 -1
  302. package/package.json +4 -4
  303. package/dist/chunks/_share-dialog-dependencies-2jzbs44g.esm.js +0 -2
  304. package/dist/chunks/_share-dialog-dependencies-2jzbs44g.esm.js.map +0 -1
  305. package/dist/chunks/_share-dialog-dependencies-C8uChjuF.esm.js +0 -2
  306. package/dist/chunks/_share-dialog-dependencies-C8uChjuF.esm.js.map +0 -1
  307. package/dist/chunks/beam-errors-P-Lu07Ce.esm.js +0 -2
  308. package/dist/chunks/beam-errors-P-Lu07Ce.esm.js.map +0 -1
  309. package/dist/chunks/cart-contents-CMm57qu0.esm.d.ts +0 -11
  310. package/dist/chunks/cart-contents-h60geKWa.esm.js +0 -2
  311. package/dist/chunks/enforce-config-ZAI7WYAd.esm.js +0 -3
  312. package/dist/chunks/enforce-config-ZAI7WYAd.esm.js.map +0 -1
  313. package/dist/chunks/enforce-config-ZyPq_4CF.esm.js +0 -3
  314. package/dist/chunks/enforce-config-ZyPq_4CF.esm.js.map +0 -1
  315. package/dist/chunks/events-6Z5MkCRr.esm.js +0 -2
  316. package/dist/chunks/events-6Z5MkCRr.esm.js.map +0 -1
  317. package/dist/chunks/index-2bLOkP4H.esm.d.ts +0 -32
  318. package/dist/chunks/index-CsWTfuok.esm.js +0 -2
  319. package/dist/chunks/index-CsWTfuok.esm.js.map +0 -1
  320. package/dist/chunks/index-E8H5A7Qq.esm.js.map +0 -1
  321. package/dist/chunks/index-FQExZDX9.esm.js.map +0 -1
  322. package/dist/chunks/index-GynYZRPI.esm.d.ts +0 -32
  323. package/dist/chunks/index-M7Ut5U3j.esm.js +0 -2
  324. package/dist/chunks/index-M7Ut5U3j.esm.js.map +0 -1
  325. package/dist/chunks/index-MIp7LlXH.esm.js +0 -2
  326. package/dist/chunks/index-MIp7LlXH.esm.js.map +0 -1
  327. package/dist/chunks/index-PiMq5a49.esm.js.map +0 -1
  328. package/dist/chunks/index-WvOCqhxv.esm.js +0 -2
  329. package/dist/chunks/index-WvOCqhxv.esm.js.map +0 -1
  330. package/dist/chunks/index-XCMf22lv.esm.js.map +0 -1
  331. package/dist/chunks/index-XH3OS_sy.esm.d.ts +0 -15
  332. package/dist/chunks/index-YJNgLCif.esm.js +0 -2
  333. package/dist/chunks/index-YJNgLCif.esm.js.map +0 -1
  334. package/dist/chunks/index-a6oXV2ro.esm.js +0 -2
  335. package/dist/chunks/index-a6oXV2ro.esm.js.map +0 -1
  336. package/dist/chunks/index-dkwGkvOu.esm.js +0 -2
  337. package/dist/chunks/index-dkwGkvOu.esm.js.map +0 -1
  338. package/dist/chunks/index-iK195-B9.esm.js +0 -2
  339. package/dist/chunks/index-iK195-B9.esm.js.map +0 -1
  340. package/dist/chunks/index-nstmHC95.esm.js +0 -2
  341. package/dist/chunks/index-nstmHC95.esm.js.map +0 -1
  342. package/dist/chunks/index-vq14EaW4.esm.js +0 -2
  343. package/dist/chunks/index-vq14EaW4.esm.js.map +0 -1
  344. package/dist/chunks/lit-iNN5L_Qk.esm.js +0 -34
  345. package/dist/chunks/loading-template-t4fFsYtr.esm.js +0 -2
  346. package/dist/chunks/lodash-P8OIs-at.esm.js +0 -2
  347. package/dist/chunks/lodash-P8OIs-at.esm.js.map +0 -1
  348. package/dist/chunks/order-page-Z3WcYluU.esm.js +0 -2
  349. package/dist/chunks/order-page-Z3WcYluU.esm.js.map +0 -1
  350. package/dist/chunks/order-page-rrfJ4w9F.esm.js +0 -2
  351. package/dist/chunks/order-page-rrfJ4w9F.esm.js.map +0 -1
  352. package/dist/chunks/promo-pill-label-P1X4xeAx.esm.js +0 -16
  353. package/dist/chunks/routes-Dmf2ZNnZ.esm.js +0 -2
  354. package/dist/chunks/routes-Dmf2ZNnZ.esm.js.map +0 -1
  355. package/dist/chunks/routes-o1QpF40R.esm.js +0 -2
  356. package/dist/chunks/routes-o1QpF40R.esm.js.map +0 -1
  357. package/dist/chunks/shoelace-components-wBxNHnyr.esm.js +0 -2
  358. package/dist/chunks/shoelace-components-wBxNHnyr.esm.js.map +0 -1
  359. package/dist/chunks/shoelace-components-xrhk189_.esm.js +0 -2
  360. package/dist/chunks/shoelace-components-xrhk189_.esm.js.map +0 -1
  361. package/dist/chunks/update-cart-EGTcbNRX.esm.js +0 -2
  362. package/dist/chunks/update-cart-EGTcbNRX.esm.js.map +0 -1
  363. package/dist/chunks/update-cart-FwtFnnGe.esm.js +0 -2
  364. package/dist/chunks/update-cart-FwtFnnGe.esm.js.map +0 -1
  365. /package/dist/chunks/{index-EGiUuWe-.esm.d.ts → index-C-hPf29c.esm.d.ts} +0 -0
  366. /package/dist/chunks/{index-hn6JhG_w.esm.d.ts → index-DXj15KHe.esm.d.ts} +0 -0
  367. /package/dist/chunks/{index-mTXm0DPh.esm.d.ts → index-DbaDUPup.esm.d.ts} +0 -0
  368. /package/dist/chunks/{progress-bar-0VS_AmEf.esm.d.ts → progress-bar-CveZ8E6Q.esm.d.ts} +0 -0
  369. /package/dist/chunks/{promo-pill-label-3bA1z-la.esm.d.ts → promo-pill-label-BXRqZHET.esm.d.ts} +0 -0
  370. /package/dist/chunks/{types-aju0qrRe.esm.d.ts → types-C7gqAyyH.esm.d.ts} +0 -0
@@ -2,17 +2,17 @@ import * as _lit_react from '@lit/react';
2
2
  import { BeamSubscriptionManagement as BeamSubscriptionManagement$1 } from '../components/subscription-management.js';
3
3
  import 'lit-html';
4
4
  import 'lit';
5
- import '../chunks/routes-iurI6dvR.esm.js';
6
- import '../chunks/cart-contents-CMm57qu0.esm.js';
7
- import '../chunks/openapi-spec-hjdK2L9Q.esm.js';
5
+ import '../chunks/routes-DDRd747e.esm.js';
6
+ import '../chunks/cart-contents-CUgc4y1N.esm.js';
7
+ import '../chunks/openapi-spec-VAt3phhg.esm.js';
8
8
  import '../components/select-subscription-nonprofit.js';
9
9
  import 'lodash';
10
- import '../chunks/types-zbTZ8-KP.esm.js';
11
- import '../chunks/types-aju0qrRe.esm.js';
12
- import '../chunks/progress-bar-0VS_AmEf.esm.js';
10
+ import '../chunks/types-CPxMwnoR.esm.js';
11
+ import '../chunks/types-C7gqAyyH.esm.js';
12
+ import '../chunks/progress-bar-CveZ8E6Q.esm.js';
13
13
  import '../components/beam-partner-logos.js';
14
14
  import '../components/subscription-impact.js';
15
- import '../chunks/share-button-hDn8fnBI.esm.js';
15
+ import '../chunks/share-button-DBVhw4qa.esm.js';
16
16
 
17
17
  declare const BeamSubscriptionManagement: _lit_react.ReactWebComponent<BeamSubscriptionManagement$1, {}>;
18
18
 
@@ -1,2 +1,2 @@
1
- import o from"react";import{l as r}from"../chunks/lit-iNN5L_Qk.esm.js";import{BeamSubscriptionManagement as t}from"../components/subscription-management.esm.js";import"../chunks/routes-Dmf2ZNnZ.esm.js";import"../chunks/beam-errors-P-Lu07Ce.esm.js";import"../utils/logger.esm.js";import"../chunks/progress-bar-PMU_xI3L.esm.js";import"../chunks/enforce-config-ZAI7WYAd.esm.js";import"../chunks/localize-o-cYvHQf.esm.js";import"../chunks/events-6Z5MkCRr.esm.js";import"../components/select-subscription-nonprofit.esm.js";import"../chunks/lodash-P8OIs-at.esm.js";import"../chunks/loading-template-t4fFsYtr.esm.js";import"../utils/makeApiKeyHeader.esm.js";import"../utils/local-storage.esm.js";import"../chunks/css-card-grid-nEc--M5M.esm.js";import"../components/beam-partner-logos.esm.js";import"../components/subscription-impact.esm.js";import"../chunks/share-button-k_Xn5956.esm.js";import"../chunks/is-all-html-elements-SdSkxirh.esm.js";import"../chunks/vendor-GKiOHg2N.esm.js";import"../chunks/share-button-SNvuFDC9.esm.js";import"../chunks/responsive-2lC2Wrtg.esm.js";const m=r({tagName:t.tagName,elementClass:t,react:o,events:{}});export{m as BeamSubscriptionManagement,m as default};
1
+ import o from"react";import{l as r}from"../chunks/lit-5uUWs2aX.esm.js";import{BeamSubscriptionManagement as t}from"../components/subscription-management.esm.js";import"../chunks/routes-CaSRr919.esm.js";import"../chunks/beam-errors-Ci0d3926.esm.js";import"../utils/logger.esm.js";import"../chunks/progress-bar-oJB_t7od.esm.js";import"../chunks/enforce-config-Cw52SuAc.esm.js";import"../chunks/localize-cDQFOecn.esm.js";import"../chunks/events-BohmT6Lp.esm.js";import"../components/select-subscription-nonprofit.esm.js";import"../chunks/lodash-7H4x2457.esm.js";import"../chunks/loading-template-DXNS89Th.esm.js";import"../utils/makeApiKeyHeader.esm.js";import"../utils/local-storage.esm.js";import"../chunks/css-card-grid-B6IEaTiP.esm.js";import"../components/beam-partner-logos.esm.js";import"../components/subscription-impact.esm.js";import"../chunks/share-button-CvTUluNq.esm.js";import"../chunks/is-all-html-elements-fcB7UUA1.esm.js";import"../chunks/vendor-DRA8u-S7.esm.js";import"../chunks/share-button-R7jgVCPv.esm.js";import"../chunks/responsive-9jAzOYoE.esm.js";const m=r({tagName:t.tagName,elementClass:t,react:o,events:{}});export{m as BeamSubscriptionManagement,m as default};
2
2
  //# sourceMappingURL=subscription-management.esm.js.map
@@ -1,2 +1,2 @@
1
- import o from"react";import{l as r}from"../chunks/lit-iNN5L_Qk.esm.js";import{BeamSubscriptionManagement as t}from"../components/subscription-management.js";import"../chunks/routes-o1QpF40R.esm.js";import"../chunks/beam-errors-P-Lu07Ce.esm.js";import"../utils/logger.js";import"../chunks/progress-bar-PMU_xI3L.esm.js";import"../chunks/enforce-config-ZyPq_4CF.esm.js";import"../chunks/localize-m-_ESmpk.esm.js";import"../chunks/events-6Z5MkCRr.esm.js";import"../components/select-subscription-nonprofit.js";import"../chunks/lodash-P8OIs-at.esm.js";import"../chunks/loading-template-t4fFsYtr.esm.js";import"../utils/makeApiKeyHeader.js";import"../utils/local-storage.js";import"../chunks/css-card-grid-nEc--M5M.esm.js";import"../components/beam-partner-logos.js";import"../components/subscription-impact.js";import"../chunks/share-button-diP8wKOc.esm.js";import"../chunks/is-all-html-elements-SdSkxirh.esm.js";import"../chunks/vendor-GKiOHg2N.esm.js";import"../chunks/share-button-SNvuFDC9.esm.js";import"../chunks/responsive-2lC2Wrtg.esm.js";const m=r({tagName:t.tagName,elementClass:t,react:o,events:{}});export{m as BeamSubscriptionManagement,m as default};
1
+ import o from"react";import{l as r}from"../chunks/lit-5uUWs2aX.esm.js";import{BeamSubscriptionManagement as t}from"../components/subscription-management.js";import"../chunks/routes-KHEaM_40.esm.js";import"../chunks/beam-errors-Ci0d3926.esm.js";import"../utils/logger.js";import"../chunks/progress-bar-oJB_t7od.esm.js";import"../chunks/enforce-config-CQb5MiAV.esm.js";import"../chunks/localize-CQCRjY9s.esm.js";import"../chunks/events-BohmT6Lp.esm.js";import"../components/select-subscription-nonprofit.js";import"../chunks/lodash-7H4x2457.esm.js";import"../chunks/loading-template-DXNS89Th.esm.js";import"../utils/makeApiKeyHeader.js";import"../utils/local-storage.js";import"../chunks/css-card-grid-B6IEaTiP.esm.js";import"../components/beam-partner-logos.js";import"../components/subscription-impact.js";import"../chunks/share-button-BbG-gnwj.esm.js";import"../chunks/is-all-html-elements-fcB7UUA1.esm.js";import"../chunks/vendor-DRA8u-S7.esm.js";import"../chunks/share-button-R7jgVCPv.esm.js";import"../chunks/responsive-9jAzOYoE.esm.js";const m=r({tagName:t.tagName,elementClass:t,react:o,events:{}});export{m as BeamSubscriptionManagement,m as default};
2
2
  //# sourceMappingURL=subscription-management.js.map
@@ -1 +1 @@
1
- export { B as BeamError, I as InvalidAttributeCombinationError, L as LocalStorageError, M as MissingConfig, N as NetworkError, S as SetupError } from '../chunks/beam-errors-fXDkG1zo.esm.js';
1
+ export { B as BeamError, L as LocalStorageError, M as MissingConfig, N as NetworkError, S as SetupError } from '../chunks/beam-errors-CCe004HS.esm.js';
@@ -1,2 +1,2 @@
1
- import{B as a,I as s,L as t,M as i,N as e,S as n}from"../chunks/beam-errors-P-Lu07Ce.esm.js";export{a as BeamError,s as InvalidAttributeCombinationError,t as LocalStorageError,i as MissingConfig,e as NetworkError,n as SetupError};
1
+ import{B as a,L as s,M as e,N as t,S as E}from"../chunks/beam-errors-Ci0d3926.esm.js";export{a as BeamError,s as LocalStorageError,e as MissingConfig,t as NetworkError,E as SetupError};
2
2
  //# sourceMappingURL=beam-errors.esm.js.map
@@ -1,2 +1,2 @@
1
- import{B as a,I as s,L as t,M as i,N as e,S as n}from"../chunks/beam-errors-P-Lu07Ce.esm.js";export{a as BeamError,s as InvalidAttributeCombinationError,t as LocalStorageError,i as MissingConfig,e as NetworkError,n as SetupError};
1
+ import{B as a,L as s,M as e,N as t,S as E}from"../chunks/beam-errors-Ci0d3926.esm.js";export{a as BeamError,s as LocalStorageError,e as MissingConfig,t as NetworkError,E as SetupError};
2
2
  //# sourceMappingURL=beam-errors.js.map
@@ -1,2 +1,2 @@
1
- import{getCookieValue as r}from"./cookies.esm.js";import{createScopedLocalStorage as o}from"./local-storage.esm.js";import"../chunks/beam-errors-P-Lu07Ce.esm.js";import"./logger.esm.js";const a=(t,e)=>o(e).getItemJson("cart")?.beamCartId??r(t)??null,m=(t,e)=>o(e).getItemJson("cart")?.cartId??r(t)??null;export{a as getBeamCartId,m as getExternalCartId};
1
+ import{getCookieValue as r}from"./cookies.esm.js";import{createScopedLocalStorage as o}from"./local-storage.esm.js";import"../chunks/beam-errors-Ci0d3926.esm.js";import"./logger.esm.js";const a=(t,e)=>o(e).getItemJson("cart")?.beamCartId??r(t)??null,m=(t,e)=>o(e).getItemJson("cart")?.cartId??r(t)??null;export{a as getBeamCartId,m as getExternalCartId};
2
2
  //# sourceMappingURL=cart.esm.js.map
@@ -1,2 +1,2 @@
1
- import{getCookieValue as r}from"./cookies.js";import{createScopedLocalStorage as o}from"./local-storage.js";import"../chunks/beam-errors-P-Lu07Ce.esm.js";import"./logger.js";const a=(t,e)=>o(e).getItemJson("cart")?.beamCartId??r(t)??null,m=(t,e)=>o(e).getItemJson("cart")?.cartId??r(t)??null;export{a as getBeamCartId,m as getExternalCartId};
1
+ import{getCookieValue as r}from"./cookies.js";import{createScopedLocalStorage as o}from"./local-storage.js";import"../chunks/beam-errors-Ci0d3926.esm.js";import"./logger.js";const a=(t,e)=>o(e).getItemJson("cart")?.beamCartId??r(t)??null,m=(t,e)=>o(e).getItemJson("cart")?.cartId??r(t)??null;export{a as getBeamCartId,m as getExternalCartId};
2
2
  //# sourceMappingURL=cart.js.map
@@ -1,2 +1,2 @@
1
- const c=(e=document.cookie)=>e.split(";").reduce((t,n)=>{const o=n.trim(),[i,...s]=o.split("="),l=decodeURIComponent(s.join("="));return t.set(i,l)},new Map),m=e=>c().get(e),p=e=>{const{name:t,value:n,expires:o,...i}=e,s=encodeURIComponent(n),l=`${t}=${s}`,u=o!=null?` ;expires=${new Date(o).toUTCString()}`:"",a=Object.entries(i).map(([d,r])=>r!=null?` ;${d}=${r}`:"").join("");document.cookie=l+a+u},C=e=>p({...e,value:"",expires:-1});export{C as deleteCookieValue,c as getCookieMap,m as getCookieValue,p as setCookieValue};
1
+ const p=(e=document.cookie)=>e.split(";").reduce((i,n)=>{const o=n.trim(),[t,...a]=o.split("="),r=decodeURIComponent(a.join("="));return i.set(t,r)},new Map),m=e=>p().get(e),c=e=>{const{name:i,value:n,expires:o,...t}=e,a=encodeURIComponent(n),r=`${i}=${a}`,d=o!=null?` ;expires=${new Date(o).toUTCString()}`:"",l=Object.entries(t).map(([u,s])=>s!=null?` ;${u}=${s}`:"").join("");document.cookie=r+l+d},C=e=>{const{name:i,domain:n,path:o}=e,t={name:i,value:"",expires:0};return o!==void 0&&(t.path=o),n!==void 0&&(t.domain=n),c(t)};export{C as deleteCookieValue,p as getCookieMap,m as getCookieValue,c as setCookieValue};
2
2
  //# sourceMappingURL=cookies.esm.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"cookies.esm.js","sources":["../../src/utils/cookies.ts"],"sourcesContent":["/*\n * Wrapper functions for CookieStore using document.cookie as a fallback if not supported\n */\n\nexport const getCookieMap = (cookieString = document.cookie) => {\n // document.cookie has the format: \"key1=value1; key2=value2; key3=value3\"\n return cookieString.split(\";\").reduce((result: Map<string, string>, next: string) => {\n const cookieKeyValuePair = next.trim(); // \" key=value \" => \"key=value\"\n const [key, ...restOfString] = cookieKeyValuePair.split(\"=\"); // [\"key\", [\"value\"]]\n const value = decodeURIComponent(restOfString.join(\"=\")); // .join() handles if value contained \"=\"\n return result.set(key, value);\n }, new Map<string, string>());\n};\n\nexport const getCookieValue = (name: string): string | undefined => {\n // New Async API, not supported in FF/Safari:\n // if (window.cookieStore) {\n // return (await window.cookieStore.get(name))?.value;\n // }\n return getCookieMap().get(name);\n};\n\nexport const setCookieValue = (options: CookieInit): undefined => {\n // New Async API, not supported in FF/Safari:\n // if (window.cookieStore) {\n // const { domain, ...rest } = options;\n // const validatedDomain = domain === \"localhost\" ? undefined : domain;\n // return await window.cookieStore.set({ ...rest, domain: validatedDomain });\n // }\n // https://developer.mozilla.org/en-US/docs/Web/API/Document/cookie#write_a_new_cookie\n const { name, value, expires, ...rest } = options;\n const encodedValue = encodeURIComponent(value);\n const base = `${name}=${encodedValue}`;\n const expiration = expires != null ? ` ;expires=${new Date(expires).toUTCString()}` : \"\";\n const modifiers = Object.entries(rest)\n .map(([key, val]) => (val != null ? ` ;${key}=${val}` : \"\"))\n .join(\"\");\n document.cookie = base + modifiers + expiration;\n return;\n};\n\nexport const deleteCookieValue = (options: { name: string; domain?: string; path?: string }): undefined => {\n return setCookieValue({ ...options, value: \"\", expires: -1 });\n};\n\n/*\n * CookieStore API Types\n * https://developer.mozilla.org/en-US/docs/Web/API/CookieStore#browser_compatibility\n */\n\ninterface CookieListItem {\n name: string;\n value: string;\n path: string;\n domain: string | null;\n expires: number | null; // timestamp, unix time in ms\n secure: boolean;\n sameSite: \"strict\" | \"lax\" | \"none\";\n}\n\ninterface CookieInit {\n name: string;\n value: string;\n path?: string;\n domain?: string;\n expires?: number; // timestamp, unix time in ms\n sameSite?: \"strict\" | \"lax\" | \"none\";\n}\n\n// https://wicg.github.io/cookie-store/#CookieChangeEvent\nexport interface CookieChangeEvent extends Event {\n readonly changed: CookieListItem[];\n readonly deleted: CookieListItem[];\n type: \"deleted\" | \"changed\";\n}\n\ntype SetCookie = {\n (options: CookieInit): Promise<undefined>;\n (name: string, value: string): Promise<undefined>;\n};\n\n// https://wicg.github.io/cookie-store/#CookieStore\ninterface CookieStore extends EventTarget {\n get: (name: string | { name: string; url: string }) => Promise<CookieListItem | undefined>;\n getAll: (name: string | { name: string; url: string }) => Promise<CookieListItem[]>;\n set: SetCookie; // function overload for multiple signatures\n delete: (name: string | { name: string; domain?: string | null; path?: string }) => Promise<undefined>;\n onchange: (event: CookieChangeEvent) => boolean | void | Promise<boolean | void>;\n}\n\ndeclare global {\n interface Window {\n cookieStore: CookieStore;\n }\n}\n"],"names":["getCookieMap","cookieString","result","next","cookieKeyValuePair","key","restOfString","value","getCookieValue","name","setCookieValue","options","expires","rest","encodedValue","base","expiration","modifiers","val","deleteCookieValue"],"mappings":"AAIO,MAAMA,EAAe,CAACC,EAAe,SAAS,SAE5CA,EAAa,MAAM,GAAG,EAAE,OAAO,CAACC,EAA6BC,IAAiB,CACnF,MAAMC,EAAqBD,EAAK,KAAA,EAC1B,CAACE,EAAK,GAAGC,CAAY,EAAIF,EAAmB,MAAM,GAAG,EACrDG,EAAQ,mBAAmBD,EAAa,KAAK,GAAG,CAAC,EACvD,OAAOJ,EAAO,IAAIG,EAAKE,CAAK,CAC9B,EAAG,IAAI,GAAqB,EAGjBC,EAAkBC,GAKtBT,EAAa,EAAE,IAAIS,CAAI,EAGnBC,EAAkBC,GAAmC,CAQhE,KAAM,CAAE,KAAAF,EAAM,MAAAF,EAAO,QAAAK,EAAS,GAAGC,CAAK,EAAIF,EACpCG,EAAe,mBAAmBP,CAAK,EACvCQ,EAAO,GAAGN,CAAI,IAAIK,CAAY,GAC9BE,EAAaJ,GAAW,KAAO,aAAa,IAAI,KAAKA,CAAO,EAAE,aAAa,GAAK,GAChFK,EAAY,OAAO,QAAQJ,CAAI,EAClC,IAAI,CAAC,CAACR,EAAKa,CAAG,IAAOA,GAAO,KAAO,KAAKb,CAAG,IAAIa,CAAG,GAAK,EAAG,EAC1D,KAAK,EAAE,EACV,SAAS,OAASH,EAAOE,EAAYD,CAEvC,EAEaG,EAAqBR,GACzBD,EAAe,CAAE,GAAGC,EAAS,MAAO,GAAI,QAAS,EAAG,CAAC"}
1
+ {"version":3,"file":"cookies.esm.js","sources":["../../src/utils/cookies.ts"],"sourcesContent":["/*\n * Wrapper functions for CookieStore using document.cookie as a fallback if not supported\n */\n\nexport const getCookieMap = (cookieString = document.cookie) => {\n // document.cookie has the format: \"key1=value1; key2=value2; key3=value3\"\n return cookieString.split(\";\").reduce((result: Map<string, string>, next: string) => {\n const cookieKeyValuePair = next.trim(); // \" key=value \" => \"key=value\"\n const [key, ...restOfString] = cookieKeyValuePair.split(\"=\"); // [\"key\", [\"value\"]]\n const value = decodeURIComponent(restOfString.join(\"=\")); // .join() handles if value contained \"=\"\n return result.set(key, value);\n }, new Map<string, string>());\n};\n\nexport const getCookieValue = (name: string): string | undefined => {\n // New Async API, not supported in FF/Safari:\n // if (window.cookieStore) {\n // return (await window.cookieStore.get(name))?.value;\n // }\n return getCookieMap().get(name);\n};\n\nexport const setCookieValue = (options: CookieInit): undefined => {\n // New Async API, not supported in FF/Safari:\n // if (window.cookieStore) {\n // const { domain, ...rest } = options;\n // const validatedDomain = domain === \"localhost\" ? undefined : domain;\n // return await window.cookieStore.set({ ...rest, domain: validatedDomain });\n // }\n // https://developer.mozilla.org/en-US/docs/Web/API/Document/cookie#write_a_new_cookie\n const { name, value, expires, ...rest } = options;\n const encodedValue = encodeURIComponent(value);\n const base = `${name}=${encodedValue}`;\n const expiration = expires != null ? ` ;expires=${new Date(expires).toUTCString()}` : \"\";\n const modifiers = Object.entries(rest)\n .map(([key, val]) => (val != null ? ` ;${key}=${val}` : \"\"))\n .join(\"\");\n document.cookie = base + modifiers + expiration;\n return;\n};\n\nexport const deleteCookieValue = (options: { name: string; domain?: string; path?: string }): undefined => {\n const { name, domain, path } = options;\n const cookieOptions: any = {\n name: name,\n value: \"\",\n expires: 0,\n };\n if (path !== undefined) {\n cookieOptions.path = path;\n }\n if (domain !== undefined) {\n cookieOptions.domain = domain;\n }\n return setCookieValue(cookieOptions);\n};\n\n/*\n * CookieStore API Types\n * https://developer.mozilla.org/en-US/docs/Web/API/CookieStore#browser_compatibility\n */\n\ninterface CookieListItem {\n name: string;\n value: string;\n path: string;\n domain: string | null;\n expires: number | null; // timestamp, unix time in ms\n secure: boolean;\n sameSite: \"strict\" | \"lax\" | \"none\";\n}\n\ninterface CookieInit {\n name: string;\n value: string;\n path?: string;\n domain?: string;\n expires?: number; // timestamp, unix time in ms\n sameSite?: \"strict\" | \"lax\" | \"none\";\n}\n\n// https://wicg.github.io/cookie-store/#CookieChangeEvent\nexport interface CookieChangeEvent extends Event {\n readonly changed: CookieListItem[];\n readonly deleted: CookieListItem[];\n type: \"deleted\" | \"changed\";\n}\n\ntype SetCookie = {\n (options: CookieInit): Promise<undefined>;\n (name: string, value: string): Promise<undefined>;\n};\n\n// https://wicg.github.io/cookie-store/#CookieStore\ninterface CookieStore extends EventTarget {\n get: (name: string | { name: string; url: string }) => Promise<CookieListItem | undefined>;\n getAll: (name: string | { name: string; url: string }) => Promise<CookieListItem[]>;\n set: SetCookie; // function overload for multiple signatures\n delete: (name: string | { name: string; domain?: string | null; path?: string }) => Promise<undefined>;\n onchange: (event: CookieChangeEvent) => boolean | void | Promise<boolean | void>;\n}\n\ndeclare global {\n interface Window {\n cookieStore: CookieStore;\n }\n}\n"],"names":["getCookieMap","cookieString","result","next","cookieKeyValuePair","key","restOfString","value","getCookieValue","name","setCookieValue","options","expires","rest","encodedValue","base","expiration","modifiers","val","deleteCookieValue","domain","path","cookieOptions"],"mappings":"AAIO,MAAMA,EAAe,CAACC,EAAe,SAAS,SAE5CA,EAAa,MAAM,GAAG,EAAE,OAAO,CAACC,EAA6BC,IAAiB,CACnF,MAAMC,EAAqBD,EAAK,KAAK,EAC/B,CAACE,EAAK,GAAGC,CAAY,EAAIF,EAAmB,MAAM,GAAG,EACrDG,EAAQ,mBAAmBD,EAAa,KAAK,GAAG,CAAC,EACvD,OAAOJ,EAAO,IAAIG,EAAKE,CAAK,CAC9B,EAAG,IAAI,GAAqB,EAGjBC,EAAkBC,GAKtBT,EAAA,EAAe,IAAIS,CAAI,EAGnBC,EAAkBC,GAAmC,CAQhE,KAAM,CAAE,KAAAF,EAAM,MAAAF,EAAO,QAAAK,EAAS,GAAGC,CAAK,EAAIF,EACpCG,EAAe,mBAAmBP,CAAK,EACvCQ,EAAO,GAAGN,CAAI,IAAIK,CAAY,GAC9BE,EAAaJ,GAAW,KAAO,aAAa,IAAI,KAAKA,CAAO,EAAE,YAAa,CAAA,GAAK,GAChFK,EAAY,OAAO,QAAQJ,CAAI,EAClC,IAAI,CAAC,CAACR,EAAKa,CAAG,IAAOA,GAAO,KAAO,KAAKb,CAAG,IAAIa,CAAG,GAAK,EAAG,EAC1D,KAAK,EAAE,EACV,SAAS,OAASH,EAAOE,EAAYD,CAEvC,EAEaG,EAAqBR,GAAyE,CACzG,KAAM,CAAE,KAAAF,EAAM,OAAAW,EAAQ,KAAAC,CAAK,EAAIV,EACzBW,EAAqB,CACzB,KAAMb,EACN,MAAO,GACP,QAAS,CACX,EACA,OAAIY,IAAS,SACXC,EAAc,KAAOD,GAEnBD,IAAW,SACbE,EAAc,OAASF,GAElBV,EAAeY,CAAa,CACrC"}
@@ -1,2 +1,2 @@
1
- const c=(e=document.cookie)=>e.split(";").reduce((t,n)=>{const o=n.trim(),[i,...s]=o.split("="),l=decodeURIComponent(s.join("="));return t.set(i,l)},new Map),m=e=>c().get(e),p=e=>{const{name:t,value:n,expires:o,...i}=e,s=encodeURIComponent(n),l=`${t}=${s}`,u=o!=null?` ;expires=${new Date(o).toUTCString()}`:"",a=Object.entries(i).map(([d,r])=>r!=null?` ;${d}=${r}`:"").join("");document.cookie=l+a+u},C=e=>p({...e,value:"",expires:-1});export{C as deleteCookieValue,c as getCookieMap,m as getCookieValue,p as setCookieValue};
1
+ const p=(e=document.cookie)=>e.split(";").reduce((i,n)=>{const o=n.trim(),[t,...a]=o.split("="),r=decodeURIComponent(a.join("="));return i.set(t,r)},new Map),m=e=>p().get(e),c=e=>{const{name:i,value:n,expires:o,...t}=e,a=encodeURIComponent(n),r=`${i}=${a}`,d=o!=null?` ;expires=${new Date(o).toUTCString()}`:"",l=Object.entries(t).map(([u,s])=>s!=null?` ;${u}=${s}`:"").join("");document.cookie=r+l+d},C=e=>{const{name:i,domain:n,path:o}=e,t={name:i,value:"",expires:0};return o!==void 0&&(t.path=o),n!==void 0&&(t.domain=n),c(t)};export{C as deleteCookieValue,p as getCookieMap,m as getCookieValue,c as setCookieValue};
2
2
  //# sourceMappingURL=cookies.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"cookies.js","sources":["../../src/utils/cookies.ts"],"sourcesContent":["/*\n * Wrapper functions for CookieStore using document.cookie as a fallback if not supported\n */\n\nexport const getCookieMap = (cookieString = document.cookie) => {\n // document.cookie has the format: \"key1=value1; key2=value2; key3=value3\"\n return cookieString.split(\";\").reduce((result: Map<string, string>, next: string) => {\n const cookieKeyValuePair = next.trim(); // \" key=value \" => \"key=value\"\n const [key, ...restOfString] = cookieKeyValuePair.split(\"=\"); // [\"key\", [\"value\"]]\n const value = decodeURIComponent(restOfString.join(\"=\")); // .join() handles if value contained \"=\"\n return result.set(key, value);\n }, new Map<string, string>());\n};\n\nexport const getCookieValue = (name: string): string | undefined => {\n // New Async API, not supported in FF/Safari:\n // if (window.cookieStore) {\n // return (await window.cookieStore.get(name))?.value;\n // }\n return getCookieMap().get(name);\n};\n\nexport const setCookieValue = (options: CookieInit): undefined => {\n // New Async API, not supported in FF/Safari:\n // if (window.cookieStore) {\n // const { domain, ...rest } = options;\n // const validatedDomain = domain === \"localhost\" ? undefined : domain;\n // return await window.cookieStore.set({ ...rest, domain: validatedDomain });\n // }\n // https://developer.mozilla.org/en-US/docs/Web/API/Document/cookie#write_a_new_cookie\n const { name, value, expires, ...rest } = options;\n const encodedValue = encodeURIComponent(value);\n const base = `${name}=${encodedValue}`;\n const expiration = expires != null ? ` ;expires=${new Date(expires).toUTCString()}` : \"\";\n const modifiers = Object.entries(rest)\n .map(([key, val]) => (val != null ? ` ;${key}=${val}` : \"\"))\n .join(\"\");\n document.cookie = base + modifiers + expiration;\n return;\n};\n\nexport const deleteCookieValue = (options: { name: string; domain?: string; path?: string }): undefined => {\n return setCookieValue({ ...options, value: \"\", expires: -1 });\n};\n\n/*\n * CookieStore API Types\n * https://developer.mozilla.org/en-US/docs/Web/API/CookieStore#browser_compatibility\n */\n\ninterface CookieListItem {\n name: string;\n value: string;\n path: string;\n domain: string | null;\n expires: number | null; // timestamp, unix time in ms\n secure: boolean;\n sameSite: \"strict\" | \"lax\" | \"none\";\n}\n\ninterface CookieInit {\n name: string;\n value: string;\n path?: string;\n domain?: string;\n expires?: number; // timestamp, unix time in ms\n sameSite?: \"strict\" | \"lax\" | \"none\";\n}\n\n// https://wicg.github.io/cookie-store/#CookieChangeEvent\nexport interface CookieChangeEvent extends Event {\n readonly changed: CookieListItem[];\n readonly deleted: CookieListItem[];\n type: \"deleted\" | \"changed\";\n}\n\ntype SetCookie = {\n (options: CookieInit): Promise<undefined>;\n (name: string, value: string): Promise<undefined>;\n};\n\n// https://wicg.github.io/cookie-store/#CookieStore\ninterface CookieStore extends EventTarget {\n get: (name: string | { name: string; url: string }) => Promise<CookieListItem | undefined>;\n getAll: (name: string | { name: string; url: string }) => Promise<CookieListItem[]>;\n set: SetCookie; // function overload for multiple signatures\n delete: (name: string | { name: string; domain?: string | null; path?: string }) => Promise<undefined>;\n onchange: (event: CookieChangeEvent) => boolean | void | Promise<boolean | void>;\n}\n\ndeclare global {\n interface Window {\n cookieStore: CookieStore;\n }\n}\n"],"names":["getCookieMap","cookieString","result","next","cookieKeyValuePair","key","restOfString","value","getCookieValue","name","setCookieValue","options","expires","rest","encodedValue","base","expiration","modifiers","val","deleteCookieValue"],"mappings":"AAIO,MAAMA,EAAe,CAACC,EAAe,SAAS,SAE5CA,EAAa,MAAM,GAAG,EAAE,OAAO,CAACC,EAA6BC,IAAiB,CACnF,MAAMC,EAAqBD,EAAK,KAAA,EAC1B,CAACE,EAAK,GAAGC,CAAY,EAAIF,EAAmB,MAAM,GAAG,EACrDG,EAAQ,mBAAmBD,EAAa,KAAK,GAAG,CAAC,EACvD,OAAOJ,EAAO,IAAIG,EAAKE,CAAK,CAC9B,EAAG,IAAI,GAAqB,EAGjBC,EAAkBC,GAKtBT,EAAa,EAAE,IAAIS,CAAI,EAGnBC,EAAkBC,GAAmC,CAQhE,KAAM,CAAE,KAAAF,EAAM,MAAAF,EAAO,QAAAK,EAAS,GAAGC,CAAK,EAAIF,EACpCG,EAAe,mBAAmBP,CAAK,EACvCQ,EAAO,GAAGN,CAAI,IAAIK,CAAY,GAC9BE,EAAaJ,GAAW,KAAO,aAAa,IAAI,KAAKA,CAAO,EAAE,aAAa,GAAK,GAChFK,EAAY,OAAO,QAAQJ,CAAI,EAClC,IAAI,CAAC,CAACR,EAAKa,CAAG,IAAOA,GAAO,KAAO,KAAKb,CAAG,IAAIa,CAAG,GAAK,EAAG,EAC1D,KAAK,EAAE,EACV,SAAS,OAASH,EAAOE,EAAYD,CAEvC,EAEaG,EAAqBR,GACzBD,EAAe,CAAE,GAAGC,EAAS,MAAO,GAAI,QAAS,EAAG,CAAC"}
1
+ {"version":3,"file":"cookies.js","sources":["../../src/utils/cookies.ts"],"sourcesContent":["/*\n * Wrapper functions for CookieStore using document.cookie as a fallback if not supported\n */\n\nexport const getCookieMap = (cookieString = document.cookie) => {\n // document.cookie has the format: \"key1=value1; key2=value2; key3=value3\"\n return cookieString.split(\";\").reduce((result: Map<string, string>, next: string) => {\n const cookieKeyValuePair = next.trim(); // \" key=value \" => \"key=value\"\n const [key, ...restOfString] = cookieKeyValuePair.split(\"=\"); // [\"key\", [\"value\"]]\n const value = decodeURIComponent(restOfString.join(\"=\")); // .join() handles if value contained \"=\"\n return result.set(key, value);\n }, new Map<string, string>());\n};\n\nexport const getCookieValue = (name: string): string | undefined => {\n // New Async API, not supported in FF/Safari:\n // if (window.cookieStore) {\n // return (await window.cookieStore.get(name))?.value;\n // }\n return getCookieMap().get(name);\n};\n\nexport const setCookieValue = (options: CookieInit): undefined => {\n // New Async API, not supported in FF/Safari:\n // if (window.cookieStore) {\n // const { domain, ...rest } = options;\n // const validatedDomain = domain === \"localhost\" ? undefined : domain;\n // return await window.cookieStore.set({ ...rest, domain: validatedDomain });\n // }\n // https://developer.mozilla.org/en-US/docs/Web/API/Document/cookie#write_a_new_cookie\n const { name, value, expires, ...rest } = options;\n const encodedValue = encodeURIComponent(value);\n const base = `${name}=${encodedValue}`;\n const expiration = expires != null ? ` ;expires=${new Date(expires).toUTCString()}` : \"\";\n const modifiers = Object.entries(rest)\n .map(([key, val]) => (val != null ? ` ;${key}=${val}` : \"\"))\n .join(\"\");\n document.cookie = base + modifiers + expiration;\n return;\n};\n\nexport const deleteCookieValue = (options: { name: string; domain?: string; path?: string }): undefined => {\n const { name, domain, path } = options;\n const cookieOptions: any = {\n name: name,\n value: \"\",\n expires: 0,\n };\n if (path !== undefined) {\n cookieOptions.path = path;\n }\n if (domain !== undefined) {\n cookieOptions.domain = domain;\n }\n return setCookieValue(cookieOptions);\n};\n\n/*\n * CookieStore API Types\n * https://developer.mozilla.org/en-US/docs/Web/API/CookieStore#browser_compatibility\n */\n\ninterface CookieListItem {\n name: string;\n value: string;\n path: string;\n domain: string | null;\n expires: number | null; // timestamp, unix time in ms\n secure: boolean;\n sameSite: \"strict\" | \"lax\" | \"none\";\n}\n\ninterface CookieInit {\n name: string;\n value: string;\n path?: string;\n domain?: string;\n expires?: number; // timestamp, unix time in ms\n sameSite?: \"strict\" | \"lax\" | \"none\";\n}\n\n// https://wicg.github.io/cookie-store/#CookieChangeEvent\nexport interface CookieChangeEvent extends Event {\n readonly changed: CookieListItem[];\n readonly deleted: CookieListItem[];\n type: \"deleted\" | \"changed\";\n}\n\ntype SetCookie = {\n (options: CookieInit): Promise<undefined>;\n (name: string, value: string): Promise<undefined>;\n};\n\n// https://wicg.github.io/cookie-store/#CookieStore\ninterface CookieStore extends EventTarget {\n get: (name: string | { name: string; url: string }) => Promise<CookieListItem | undefined>;\n getAll: (name: string | { name: string; url: string }) => Promise<CookieListItem[]>;\n set: SetCookie; // function overload for multiple signatures\n delete: (name: string | { name: string; domain?: string | null; path?: string }) => Promise<undefined>;\n onchange: (event: CookieChangeEvent) => boolean | void | Promise<boolean | void>;\n}\n\ndeclare global {\n interface Window {\n cookieStore: CookieStore;\n }\n}\n"],"names":["getCookieMap","cookieString","result","next","cookieKeyValuePair","key","restOfString","value","getCookieValue","name","setCookieValue","options","expires","rest","encodedValue","base","expiration","modifiers","val","deleteCookieValue","domain","path","cookieOptions"],"mappings":"AAIO,MAAMA,EAAe,CAACC,EAAe,SAAS,SAE5CA,EAAa,MAAM,GAAG,EAAE,OAAO,CAACC,EAA6BC,IAAiB,CACnF,MAAMC,EAAqBD,EAAK,KAAK,EAC/B,CAACE,EAAK,GAAGC,CAAY,EAAIF,EAAmB,MAAM,GAAG,EACrDG,EAAQ,mBAAmBD,EAAa,KAAK,GAAG,CAAC,EACvD,OAAOJ,EAAO,IAAIG,EAAKE,CAAK,CAC9B,EAAG,IAAI,GAAqB,EAGjBC,EAAkBC,GAKtBT,EAAA,EAAe,IAAIS,CAAI,EAGnBC,EAAkBC,GAAmC,CAQhE,KAAM,CAAE,KAAAF,EAAM,MAAAF,EAAO,QAAAK,EAAS,GAAGC,CAAK,EAAIF,EACpCG,EAAe,mBAAmBP,CAAK,EACvCQ,EAAO,GAAGN,CAAI,IAAIK,CAAY,GAC9BE,EAAaJ,GAAW,KAAO,aAAa,IAAI,KAAKA,CAAO,EAAE,YAAa,CAAA,GAAK,GAChFK,EAAY,OAAO,QAAQJ,CAAI,EAClC,IAAI,CAAC,CAACR,EAAKa,CAAG,IAAOA,GAAO,KAAO,KAAKb,CAAG,IAAIa,CAAG,GAAK,EAAG,EAC1D,KAAK,EAAE,EACV,SAAS,OAASH,EAAOE,EAAYD,CAEvC,EAEaG,EAAqBR,GAAyE,CACzG,KAAM,CAAE,KAAAF,EAAM,OAAAW,EAAQ,KAAAC,CAAK,EAAIV,EACzBW,EAAqB,CACzB,KAAMb,EACN,MAAO,GACP,QAAS,CACX,EACA,OAAIY,IAAS,SACXC,EAAc,KAAOD,GAEnBD,IAAW,SACbE,EAAc,OAASF,GAElBV,EAAeY,CAAa,CACrC"}
@@ -1,2 +1,2 @@
1
- import{d}from"../chunks/lodash-P8OIs-at.esm.js";export{d as debounce};
1
+ import{d}from"../chunks/lodash-7H4x2457.esm.js";export{d as debounce};
2
2
  //# sourceMappingURL=debounce.esm.js.map
@@ -1,2 +1,2 @@
1
- import{d}from"../chunks/lodash-P8OIs-at.esm.js";export{d as debounce};
1
+ import{d}from"../chunks/lodash-7H4x2457.esm.js";export{d as debounce};
2
2
  //# sourceMappingURL=debounce.js.map
@@ -1,4 +1,5 @@
1
- import '../chunks/cart-contents-CMm57qu0.esm.js';
2
- import '../chunks/types-zbTZ8-KP.esm.js';
3
- export { b as BeamCartChangeEvent, c as BeamCartCreatedEvent, a as BeamNetworkCallEvent, B as BeamNonprofitSelectEvent, g as BeamNonprofitSelectionRemovedEvent, d as BeamOrderCreatedEvent, f as BeamStatusChangeEvent } from '../chunks/events-ZCTR9JGZ.esm.js';
4
- import '../chunks/openapi-spec-hjdK2L9Q.esm.js';
1
+ import '../chunks/cart-contents-CUgc4y1N.esm.js';
2
+ import '../chunks/promo-types-C1unMpo2.esm.js';
3
+ import '../chunks/types-CPxMwnoR.esm.js';
4
+ export { b as BeamCartChangeEvent, c as BeamCartCreatedEvent, a as BeamNetworkCallEvent, B as BeamNonprofitSelectEvent, g as BeamNonprofitSelectionRemovedEvent, d as BeamOrderCreatedEvent, h as BeamPromoCodesStoredEvent, f as BeamStatusChangeEvent, i as BeamWidgetStoredPromoCodesEvent } from '../chunks/events-BKkf9u9l.esm.js';
5
+ import '../chunks/openapi-spec-VAt3phhg.esm.js';
@@ -1,2 +1,2 @@
1
- import{d as t,f as n,c as r,b as m,g as o,a as s,B as v}from"../chunks/events-6Z5MkCRr.esm.js";export{t as BeamCartChangeEvent,n as BeamCartCreatedEvent,r as BeamNetworkCallEvent,m as BeamNonprofitSelectEvent,o as BeamNonprofitSelectionRemovedEvent,s as BeamOrderCreatedEvent,v as BeamStatusChangeEvent};
1
+ import{g as t,h as o,d as r,c as n,i as m,b as s,a as d,B as v,f as B}from"../chunks/events-BohmT6Lp.esm.js";export{t as BeamCartChangeEvent,o as BeamCartCreatedEvent,r as BeamNetworkCallEvent,n as BeamNonprofitSelectEvent,m as BeamNonprofitSelectionRemovedEvent,s as BeamOrderCreatedEvent,d as BeamPromoCodesStoredEvent,v as BeamStatusChangeEvent,B as BeamWidgetStoredPromoCodesEvent};
2
2
  //# sourceMappingURL=events.esm.js.map
@@ -1,2 +1,2 @@
1
- import{d as t,f as n,c as r,b as m,g as o,a as s,B as v}from"../chunks/events-6Z5MkCRr.esm.js";export{t as BeamCartChangeEvent,n as BeamCartCreatedEvent,r as BeamNetworkCallEvent,m as BeamNonprofitSelectEvent,o as BeamNonprofitSelectionRemovedEvent,s as BeamOrderCreatedEvent,v as BeamStatusChangeEvent};
1
+ import{g as t,h as o,d as r,c as n,i as m,b as s,a as d,B as v,f as B}from"../chunks/events-BohmT6Lp.esm.js";export{t as BeamCartChangeEvent,o as BeamCartCreatedEvent,r as BeamNetworkCallEvent,n as BeamNonprofitSelectEvent,m as BeamNonprofitSelectionRemovedEvent,s as BeamOrderCreatedEvent,d as BeamPromoCodesStoredEvent,v as BeamStatusChangeEvent,B as BeamWidgetStoredPromoCodesEvent};
2
2
  //# sourceMappingURL=events.js.map
@@ -1,5 +1,5 @@
1
- export { b as errors } from '../chunks/beam-errors-fXDkG1zo.esm.js';
2
- export { e as events } from '../chunks/events-ZCTR9JGZ.esm.js';
1
+ export { b as errors } from '../chunks/beam-errors-CCe004HS.esm.js';
2
+ export { e as events } from '../chunks/events-BKkf9u9l.esm.js';
3
3
  export { logger } from './logger.js';
4
4
  export { initNetworkListeners } from './network-listeners.js';
5
5
  export { createScopedLocalStorage } from './local-storage.js';
@@ -9,6 +9,8 @@ export { getRemoteSession, saveRemoteSession } from './remote-session.js';
9
9
  export { memoizeLast } from './memoize-last.js';
10
10
  export { default as debounce } from 'lodash-es/debounce';
11
11
  export { default as isEqual } from 'lodash-es/isEqual';
12
- import '../chunks/cart-contents-CMm57qu0.esm.js';
13
- import '../chunks/openapi-spec-hjdK2L9Q.esm.js';
14
- import '../chunks/types-zbTZ8-KP.esm.js';
12
+ export { formatStoreAndReturnPromoCodes, getAllPromoCodesFromCookie, getPromoCodeFromShopifyCookie, getPromoCodesFromCart, getPromoCodesLocalStorage, getSanitizedUrlForStorage, isEmptyPromoData, mapToUnvalidatedPromoCodes, mergeStoreAndReturnPromos, parseJsonStringArray, promoCodesAreEqual, setPromoCodeInCookie, setPromoCodesInLocalStorage } from './promoManager.js';
13
+ import '../chunks/cart-contents-CUgc4y1N.esm.js';
14
+ import '../chunks/openapi-spec-VAt3phhg.esm.js';
15
+ import '../chunks/promo-types-C1unMpo2.esm.js';
16
+ import '../chunks/types-CPxMwnoR.esm.js';
@@ -1,2 +1,2 @@
1
- import{b as r}from"../chunks/beam-errors-P-Lu07Ce.esm.js";import{e as s}from"../chunks/events-6Z5MkCRr.esm.js";import{logger as m}from"./logger.esm.js";import{initNetworkListeners as p}from"./network-listeners.esm.js";import{createScopedLocalStorage as x}from"./local-storage.esm.js";import{waitForElement as n}from"./wait-for-element.esm.js";import{deleteCookieValue as k,getCookieMap as u,getCookieValue as c,setCookieValue as d}from"./cookies.esm.js";import{getRemoteSession as S,saveRemoteSession as L}from"./remote-session.esm.js";import{memoizeLast as b}from"./memoize-last.esm.js";import{d as w,i as E}from"../chunks/lodash-P8OIs-at.esm.js";export{x as createScopedLocalStorage,w as debounce,k as deleteCookieValue,r as errors,s as events,u as getCookieMap,c as getCookieValue,S as getRemoteSession,p as initNetworkListeners,E as isEqual,m as logger,b as memoizeLast,L as saveRemoteSession,d as setCookieValue,n as waitForElement};
1
+ import{b as r}from"../chunks/beam-errors-Ci0d3926.esm.js";import{e as a}from"../chunks/events-BohmT6Lp.esm.js";import{logger as m}from"./logger.esm.js";import{initNetworkListeners as p}from"./network-listeners.esm.js";import{createScopedLocalStorage as g}from"./local-storage.esm.js";import{waitForElement as C}from"./wait-for-element.esm.js";import{deleteCookieValue as f,getCookieMap as S,getCookieValue as x,setCookieValue as P}from"./cookies.esm.js";import{getRemoteSession as u,saveRemoteSession as c}from"./remote-session.esm.js";import{memoizeLast as F}from"./memoize-last.esm.js";import{d as E,i as R}from"../chunks/lodash-7H4x2457.esm.js";import{f as v,c as y,b as V,h,g as q,a as w,i as z,m as I,j as U,e as j,p as D,s as J,k as M}from"../chunks/promoManager-fl54hq13.esm.js";export{g as createScopedLocalStorage,E as debounce,f as deleteCookieValue,r as errors,a as events,v as formatStoreAndReturnPromoCodes,y as getAllPromoCodesFromCookie,S as getCookieMap,x as getCookieValue,V as getPromoCodeFromShopifyCookie,h as getPromoCodesFromCart,q as getPromoCodesLocalStorage,u as getRemoteSession,w as getSanitizedUrlForStorage,p as initNetworkListeners,z as isEmptyPromoData,R as isEqual,m as logger,I as mapToUnvalidatedPromoCodes,F as memoizeLast,U as mergeStoreAndReturnPromos,j as parseJsonStringArray,D as promoCodesAreEqual,c as saveRemoteSession,P as setCookieValue,J as setPromoCodeInCookie,M as setPromoCodesInLocalStorage,C as waitForElement};
2
2
  //# sourceMappingURL=index.esm.js.map
@@ -1,2 +1,2 @@
1
- import{b as r}from"../chunks/beam-errors-P-Lu07Ce.esm.js";import{e as s}from"../chunks/events-6Z5MkCRr.esm.js";import{logger as m}from"./logger.js";import{initNetworkListeners as p}from"./network-listeners.js";import{createScopedLocalStorage as x}from"./local-storage.js";import{waitForElement as n}from"./wait-for-element.js";import{deleteCookieValue as k,getCookieMap as u,getCookieValue as c,setCookieValue as d}from"./cookies.js";import{getRemoteSession as S,saveRemoteSession as L}from"./remote-session.js";import{memoizeLast as b}from"./memoize-last.js";import{d as w,i as E}from"../chunks/lodash-P8OIs-at.esm.js";export{x as createScopedLocalStorage,w as debounce,k as deleteCookieValue,r as errors,s as events,u as getCookieMap,c as getCookieValue,S as getRemoteSession,p as initNetworkListeners,E as isEqual,m as logger,b as memoizeLast,L as saveRemoteSession,d as setCookieValue,n as waitForElement};
1
+ import{b as r}from"../chunks/beam-errors-Ci0d3926.esm.js";import{e as a}from"../chunks/events-BohmT6Lp.esm.js";import{logger as m}from"./logger.js";import{initNetworkListeners as p}from"./network-listeners.js";import{createScopedLocalStorage as g}from"./local-storage.js";import{waitForElement as C}from"./wait-for-element.js";import{deleteCookieValue as f,getCookieMap as S,getCookieValue as x,setCookieValue as P}from"./cookies.js";import{getRemoteSession as u,saveRemoteSession as c}from"./remote-session.js";import{memoizeLast as F}from"./memoize-last.js";import{d as E,i as R}from"../chunks/lodash-7H4x2457.esm.js";import{f as v,c as y,b as V,h,g as q,a as w,i as z,m as I,j as U,e as j,p as D,s as J,k as M}from"../chunks/promoManager-B9cTR1R3.esm.js";export{g as createScopedLocalStorage,E as debounce,f as deleteCookieValue,r as errors,a as events,v as formatStoreAndReturnPromoCodes,y as getAllPromoCodesFromCookie,S as getCookieMap,x as getCookieValue,V as getPromoCodeFromShopifyCookie,h as getPromoCodesFromCart,q as getPromoCodesLocalStorage,u as getRemoteSession,w as getSanitizedUrlForStorage,p as initNetworkListeners,z as isEmptyPromoData,R as isEqual,m as logger,I as mapToUnvalidatedPromoCodes,F as memoizeLast,U as mergeStoreAndReturnPromos,j as parseJsonStringArray,D as promoCodesAreEqual,c as saveRemoteSession,P as setCookieValue,J as setPromoCodeInCookie,M as setPromoCodesInLocalStorage,C as waitForElement};
2
2
  //# sourceMappingURL=index.js.map
@@ -1,2 +1,2 @@
1
- import{i as o}from"../chunks/lodash-P8OIs-at.esm.js";export{o as isEqual};
1
+ import{i as o}from"../chunks/lodash-7H4x2457.esm.js";export{o as isEqual};
2
2
  //# sourceMappingURL=is-equal.esm.js.map
@@ -1,2 +1,2 @@
1
- import{i as o}from"../chunks/lodash-P8OIs-at.esm.js";export{o as isEqual};
1
+ import{i as o}from"../chunks/lodash-7H4x2457.esm.js";export{o as isEqual};
2
2
  //# sourceMappingURL=is-equal.js.map
@@ -1,2 +1,2 @@
1
- import{L as o}from"../chunks/beam-errors-P-Lu07Ce.esm.js";import{logger as s}from"./logger.esm.js";const i=r=>({get prefix(){return"beam_"},get postfix(){return`_key_${r.apiKey}`},getItem(e){return localStorage.getItem(this.prefix+e+this.postfix)},setItem(e,t){return localStorage.setItem(this.prefix+e+this.postfix,`${t}`)},removeItem(e){return localStorage.removeItem(this.prefix+e+this.postfix)},getItemJson(e){try{const t=this.getItem(e);if(t)return JSON.parse(t)}catch{s.error(new o(`Could not parse JSON: ${e}`))}return null},setItemJson(e,t){return this.setItem(e,JSON.stringify(t))}});export{i as createScopedLocalStorage};
1
+ import{L as o}from"../chunks/beam-errors-Ci0d3926.esm.js";import{logger as s}from"./logger.esm.js";const i=r=>({get prefix(){return"beam_"},get postfix(){return`_key_${r.apiKey}`},getItem(e){return localStorage.getItem(this.prefix+e+this.postfix)},setItem(e,t){return localStorage.setItem(this.prefix+e+this.postfix,`${t}`)},removeItem(e){return localStorage.removeItem(this.prefix+e+this.postfix)},getItemJson(e){try{const t=this.getItem(e);if(t)return JSON.parse(t)}catch{s.error(new o(`Could not parse JSON: ${e}`))}return null},setItemJson(e,t){return this.setItem(e,JSON.stringify(t))}});export{i as createScopedLocalStorage};
2
2
  //# sourceMappingURL=local-storage.esm.js.map
@@ -1,2 +1,2 @@
1
- import{L as o}from"../chunks/beam-errors-P-Lu07Ce.esm.js";import{logger as s}from"./logger.js";const i=r=>({get prefix(){return"beam_"},get postfix(){return`_key_${r.apiKey}`},getItem(e){return localStorage.getItem(this.prefix+e+this.postfix)},setItem(e,t){return localStorage.setItem(this.prefix+e+this.postfix,`${t}`)},removeItem(e){return localStorage.removeItem(this.prefix+e+this.postfix)},getItemJson(e){try{const t=this.getItem(e);if(t)return JSON.parse(t)}catch{s.error(new o(`Could not parse JSON: ${e}`))}return null},setItemJson(e,t){return this.setItem(e,JSON.stringify(t))}});export{i as createScopedLocalStorage};
1
+ import{L as o}from"../chunks/beam-errors-Ci0d3926.esm.js";import{logger as s}from"./logger.js";const i=r=>({get prefix(){return"beam_"},get postfix(){return`_key_${r.apiKey}`},getItem(e){return localStorage.getItem(this.prefix+e+this.postfix)},setItem(e,t){return localStorage.setItem(this.prefix+e+this.postfix,`${t}`)},removeItem(e){return localStorage.removeItem(this.prefix+e+this.postfix)},getItemJson(e){try{const t=this.getItem(e);if(t)return JSON.parse(t)}catch{s.error(new o(`Could not parse JSON: ${e}`))}return null},setItemJson(e,t){return this.setItem(e,JSON.stringify(t))}});export{i as createScopedLocalStorage};
2
2
  //# sourceMappingURL=local-storage.js.map
@@ -1,2 +1,2 @@
1
- import{i as a}from"../chunks/lodash-P8OIs-at.esm.js";function c(s,{isEqual:u=a}={}){let r=null,n=null,e=!1,i=0;return(...o)=>{if(e&&u(r,o))return n;const t=s(...o);if(t instanceof Promise){i++;const l=i;t.catch(()=>{l===i&&(e=!1)})}return r=o,n=t,e=!0,t}}export{c as memoizeLast};
1
+ import{i as a}from"../chunks/lodash-7H4x2457.esm.js";function f(o,{isEqual:u=a}={}){let i=null,l=null,e=!1,r=0;return(...s)=>{if(e&&u(i,s))return l;const t=o(...s);if(t instanceof Promise){r++;const n=r;t.catch(()=>{n===r&&(e=!1)})}return i=s,l=t,e=!0,t}}export{f as memoizeLast};
2
2
  //# sourceMappingURL=memoize-last.esm.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"memoize-last.esm.js","sources":["../../src/utils/memoize-last.ts"],"sourcesContent":["import { isEqual as defaultIsEqual } from \"./is-equal\";\n\ntype Func<T extends any[], R> = (...args: T) => R;\n\n/**\n * Takes a function and returns a new memoized function.\n * If the same arguments are passed to the memoized function, it will return the previously computed result.\n * This is a \"memoize once\" function meaning it only compares the previous and current arguments, not historic values.\n * Results that throw errors or return rejected Promises are not cached.\n *\n * @param {Function} fn - The function to be memoized.\n * @param {(value: any) => boolean} [isEqual]- The equality function used to compare arguments.\n * @returns {Function} - The memoized function.\n * @param func\n */\nexport function memoizeLast<T extends any[], R>(func: Func<T, R>, { isEqual = defaultIsEqual } = {}): Func<T, R> {\n let lastArgs: T | null = null;\n let lastResult: R | null = null;\n let hasResult = false; // Separate variable to track whether lastResult exists because lastResult could be falsy\n let promiseCounter = 0; // Used to keep track of result order in async invocation so we know to replace cache or not\n\n return (...args: T): R => {\n if (hasResult && isEqual(lastArgs, args)) {\n return lastResult as R;\n }\n\n const result = func(...args); // Errors here are not caught, so result will not cache if there is an error\n\n if (result instanceof Promise) {\n promiseCounter++;\n const promiseCounterAtStart = promiseCounter;\n result.catch(() => {\n // Don't return cached result next time if the Promise rejects, unless a new Promise has already replaced\n // the one that rejected\n if (promiseCounterAtStart === promiseCounter) {\n hasResult = false;\n }\n });\n }\n\n // Cache the latest args and result.\n lastArgs = args;\n lastResult = result;\n hasResult = true;\n\n return result;\n };\n}\n"],"names":["memoizeLast","func","isEqual","defaultIsEqual","lastArgs","lastResult","hasResult","promiseCounter","args","result","promiseCounterAtStart"],"mappings":"qDAeO,SAASA,EAAgCC,EAAkB,CAAE,QAAAC,EAAUC,CAAe,EAAI,GAAgB,CAC/G,IAAIC,EAAqB,KACrBC,EAAuB,KACvBC,EAAY,GACZC,EAAiB,EAErB,MAAO,IAAIC,IAAe,CACxB,GAAIF,GAAaJ,EAAQE,EAAUI,CAAI,EACrC,OAAOH,EAGT,MAAMI,EAASR,EAAK,GAAGO,CAAI,EAE3B,GAAIC,aAAkB,QAAS,CAC7BF,IACA,MAAMG,EAAwBH,EAC9BE,EAAO,MAAM,IAAM,CAGbC,IAA0BH,IAC5BD,EAAY,GAEhB,CAAC,CACH,CAGA,OAAAF,EAAWI,EACXH,EAAaI,EACbH,EAAY,GAELG,CACT,CACF"}
1
+ {"version":3,"file":"memoize-last.esm.js","sources":["../../src/utils/memoize-last.ts"],"sourcesContent":["import { isEqual as defaultIsEqual } from \"./is-equal\";\n\ntype Func<T extends any[], R> = (...args: T) => R;\n\n/**\n * Takes a function and returns a new memoized function.\n * If the same arguments are passed to the memoized function, it will return the previously computed result.\n * This is a \"memoize once\" function meaning it only compares the previous and current arguments, not historic values.\n * Results that throw errors or return rejected Promises are not cached.\n *\n * @param {Function} fn - The function to be memoized.\n * @param {(value: any) => boolean} [isEqual]- The equality function used to compare arguments.\n * @returns {Function} - The memoized function.\n * @param func\n */\nexport function memoizeLast<T extends any[], R>(func: Func<T, R>, { isEqual = defaultIsEqual } = {}): Func<T, R> {\n let lastArgs: T | null = null;\n let lastResult: R | null = null;\n let hasResult = false; // Separate variable to track whether lastResult exists because lastResult could be falsy\n let promiseCounter = 0; // Used to keep track of result order in async invocation so we know to replace cache or not\n\n return (...args: T): R => {\n if (hasResult && isEqual(lastArgs, args)) {\n return lastResult as R;\n }\n\n const result = func(...args); // Errors here are not caught, so result will not cache if there is an error\n\n if (result instanceof Promise) {\n promiseCounter++;\n const promiseCounterAtStart = promiseCounter;\n result.catch(() => {\n // Don't return cached result next time if the Promise rejects, unless a new Promise has already replaced\n // the one that rejected\n if (promiseCounterAtStart === promiseCounter) {\n hasResult = false;\n }\n });\n }\n\n // Cache the latest args and result.\n lastArgs = args;\n lastResult = result;\n hasResult = true;\n\n return result;\n };\n}\n"],"names":["memoizeLast","func","isEqual","defaultIsEqual","lastArgs","lastResult","hasResult","promiseCounter","args","result","promiseCounterAtStart"],"mappings":"qDAeO,SAASA,EAAgCC,EAAkB,CAAE,QAAAC,EAAUC,CAAe,EAAI,CAAC,EAAe,CAC/G,IAAIC,EAAqB,KACrBC,EAAuB,KACvBC,EAAY,GACZC,EAAiB,EAErB,MAAO,IAAIC,IAAe,CACxB,GAAIF,GAAaJ,EAAQE,EAAUI,CAAI,EACrC,OAAOH,EAGT,MAAMI,EAASR,EAAK,GAAGO,CAAI,EAE3B,GAAIC,aAAkB,QAAS,CAC7BF,IACA,MAAMG,EAAwBH,EAC9BE,EAAO,MAAM,IAAM,CAGbC,IAA0BH,IAC5BD,EAAY,GAEhB,CAAC,CACH,CAGA,OAAAF,EAAWI,EACXH,EAAaI,EACbH,EAAY,GAELG,CACT,CACF"}
@@ -1,2 +1,2 @@
1
- import{i as a}from"../chunks/lodash-P8OIs-at.esm.js";function c(s,{isEqual:u=a}={}){let r=null,n=null,e=!1,i=0;return(...o)=>{if(e&&u(r,o))return n;const t=s(...o);if(t instanceof Promise){i++;const l=i;t.catch(()=>{l===i&&(e=!1)})}return r=o,n=t,e=!0,t}}export{c as memoizeLast};
1
+ import{i as a}from"../chunks/lodash-7H4x2457.esm.js";function f(o,{isEqual:u=a}={}){let i=null,l=null,e=!1,r=0;return(...s)=>{if(e&&u(i,s))return l;const t=o(...s);if(t instanceof Promise){r++;const n=r;t.catch(()=>{n===r&&(e=!1)})}return i=s,l=t,e=!0,t}}export{f as memoizeLast};
2
2
  //# sourceMappingURL=memoize-last.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"memoize-last.js","sources":["../../src/utils/memoize-last.ts"],"sourcesContent":["import { isEqual as defaultIsEqual } from \"./is-equal\";\n\ntype Func<T extends any[], R> = (...args: T) => R;\n\n/**\n * Takes a function and returns a new memoized function.\n * If the same arguments are passed to the memoized function, it will return the previously computed result.\n * This is a \"memoize once\" function meaning it only compares the previous and current arguments, not historic values.\n * Results that throw errors or return rejected Promises are not cached.\n *\n * @param {Function} fn - The function to be memoized.\n * @param {(value: any) => boolean} [isEqual]- The equality function used to compare arguments.\n * @returns {Function} - The memoized function.\n * @param func\n */\nexport function memoizeLast<T extends any[], R>(func: Func<T, R>, { isEqual = defaultIsEqual } = {}): Func<T, R> {\n let lastArgs: T | null = null;\n let lastResult: R | null = null;\n let hasResult = false; // Separate variable to track whether lastResult exists because lastResult could be falsy\n let promiseCounter = 0; // Used to keep track of result order in async invocation so we know to replace cache or not\n\n return (...args: T): R => {\n if (hasResult && isEqual(lastArgs, args)) {\n return lastResult as R;\n }\n\n const result = func(...args); // Errors here are not caught, so result will not cache if there is an error\n\n if (result instanceof Promise) {\n promiseCounter++;\n const promiseCounterAtStart = promiseCounter;\n result.catch(() => {\n // Don't return cached result next time if the Promise rejects, unless a new Promise has already replaced\n // the one that rejected\n if (promiseCounterAtStart === promiseCounter) {\n hasResult = false;\n }\n });\n }\n\n // Cache the latest args and result.\n lastArgs = args;\n lastResult = result;\n hasResult = true;\n\n return result;\n };\n}\n"],"names":["memoizeLast","func","isEqual","defaultIsEqual","lastArgs","lastResult","hasResult","promiseCounter","args","result","promiseCounterAtStart"],"mappings":"qDAeO,SAASA,EAAgCC,EAAkB,CAAE,QAAAC,EAAUC,CAAe,EAAI,GAAgB,CAC/G,IAAIC,EAAqB,KACrBC,EAAuB,KACvBC,EAAY,GACZC,EAAiB,EAErB,MAAO,IAAIC,IAAe,CACxB,GAAIF,GAAaJ,EAAQE,EAAUI,CAAI,EACrC,OAAOH,EAGT,MAAMI,EAASR,EAAK,GAAGO,CAAI,EAE3B,GAAIC,aAAkB,QAAS,CAC7BF,IACA,MAAMG,EAAwBH,EAC9BE,EAAO,MAAM,IAAM,CAGbC,IAA0BH,IAC5BD,EAAY,GAEhB,CAAC,CACH,CAGA,OAAAF,EAAWI,EACXH,EAAaI,EACbH,EAAY,GAELG,CACT,CACF"}
1
+ {"version":3,"file":"memoize-last.js","sources":["../../src/utils/memoize-last.ts"],"sourcesContent":["import { isEqual as defaultIsEqual } from \"./is-equal\";\n\ntype Func<T extends any[], R> = (...args: T) => R;\n\n/**\n * Takes a function and returns a new memoized function.\n * If the same arguments are passed to the memoized function, it will return the previously computed result.\n * This is a \"memoize once\" function meaning it only compares the previous and current arguments, not historic values.\n * Results that throw errors or return rejected Promises are not cached.\n *\n * @param {Function} fn - The function to be memoized.\n * @param {(value: any) => boolean} [isEqual]- The equality function used to compare arguments.\n * @returns {Function} - The memoized function.\n * @param func\n */\nexport function memoizeLast<T extends any[], R>(func: Func<T, R>, { isEqual = defaultIsEqual } = {}): Func<T, R> {\n let lastArgs: T | null = null;\n let lastResult: R | null = null;\n let hasResult = false; // Separate variable to track whether lastResult exists because lastResult could be falsy\n let promiseCounter = 0; // Used to keep track of result order in async invocation so we know to replace cache or not\n\n return (...args: T): R => {\n if (hasResult && isEqual(lastArgs, args)) {\n return lastResult as R;\n }\n\n const result = func(...args); // Errors here are not caught, so result will not cache if there is an error\n\n if (result instanceof Promise) {\n promiseCounter++;\n const promiseCounterAtStart = promiseCounter;\n result.catch(() => {\n // Don't return cached result next time if the Promise rejects, unless a new Promise has already replaced\n // the one that rejected\n if (promiseCounterAtStart === promiseCounter) {\n hasResult = false;\n }\n });\n }\n\n // Cache the latest args and result.\n lastArgs = args;\n lastResult = result;\n hasResult = true;\n\n return result;\n };\n}\n"],"names":["memoizeLast","func","isEqual","defaultIsEqual","lastArgs","lastResult","hasResult","promiseCounter","args","result","promiseCounterAtStart"],"mappings":"qDAeO,SAASA,EAAgCC,EAAkB,CAAE,QAAAC,EAAUC,CAAe,EAAI,CAAC,EAAe,CAC/G,IAAIC,EAAqB,KACrBC,EAAuB,KACvBC,EAAY,GACZC,EAAiB,EAErB,MAAO,IAAIC,IAAe,CACxB,GAAIF,GAAaJ,EAAQE,EAAUI,CAAI,EACrC,OAAOH,EAGT,MAAMI,EAASR,EAAK,GAAGO,CAAI,EAE3B,GAAIC,aAAkB,QAAS,CAC7BF,IACA,MAAMG,EAAwBH,EAC9BE,EAAO,MAAM,IAAM,CAGbC,IAA0BH,IAC5BD,EAAY,GAEhB,CAAC,CACH,CAGA,OAAAF,EAAWI,EACXH,EAAaI,EACbH,EAAY,GAELG,CACT,CACF"}
@@ -1,2 +1,2 @@
1
- import{c}from"../chunks/events-6Z5MkCRr.esm.js";const d={apply:function(o,r,t){return o(...t).then(e=>{if(e.ok){const n=e.clone();window.dispatchEvent(new c({url:t[0].toString(),method:(t[1]?.method||"get").toLowerCase(),type:"fetch",response:n}))}return e})}},h={construct(o,r){const t=new o(...r),e=t.open;let n,i;return t.open=function(w,s){n=w,i=s,e.apply(this,[w,s])},t.addEventListener("load",()=>{window.dispatchEvent(new c({url:(i||"").toString(),method:(n||"get").toLowerCase(),type:"xhr",xhr:t}))}),t}};let p=!1;const a=()=>{p||(window.fetch=new Proxy(window.fetch,d),XMLHttpRequest=new Proxy(XMLHttpRequest,h),p=!0)};export{a as initNetworkListeners};
1
+ import{d as i}from"../chunks/events-BohmT6Lp.esm.js";const a={apply:function(o,r,t){return o(...t).then(e=>{if(e.ok){const n=e.clone();window.dispatchEvent(new i({url:t[0].toString(),method:(t[1]?.method||"get").toLowerCase(),type:"fetch",response:n}))}return e})}},d={construct(o,r){const t=new o(...r),e=t.open;let n,s;return t.open=function(c,p){n=c,s=p,e.apply(this,arguments)},t.addEventListener("load",()=>{window.dispatchEvent(new i({url:(s||"").toString(),method:(n||"get").toLowerCase(),type:"xhr",xhr:t}))}),t}};let w=!1;const h=()=>{w||(window.fetch=new Proxy(window.fetch,a),XMLHttpRequest=new Proxy(XMLHttpRequest,d),w=!0)};export{h as initNetworkListeners};
2
2
  //# sourceMappingURL=network-listeners.esm.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"network-listeners.esm.js","sources":["../../src/utils/network-listeners.ts"],"sourcesContent":["import { BeamNetworkCallEvent } from \"./events\";\n\n/**\n * Fetch Listener\n */\n\nconst fetchHandler = {\n apply: function (target: any, _thisArg: any, args: any[]) {\n return target(...args).then((response: Response) => {\n if (response.ok) {\n const responseCopy = response.clone();\n window.dispatchEvent(\n new BeamNetworkCallEvent({\n url: args[0].toString(),\n method: (args[1]?.method || \"get\").toLowerCase(),\n type: \"fetch\",\n response: responseCopy,\n })\n );\n }\n return response;\n });\n },\n};\n\n/**\n * XMLHTTPRequest Listener\n */\n\nconst xhrHandler = {\n construct(TargetConstructor: any, args: any[]) {\n const xhr: XMLHttpRequest = new TargetConstructor(...args);\n const _open: (method: string, url: string | URL) => void = xhr.open;\n let _method: string;\n let _url: string | URL;\n\n xhr.open = function (method: string, url: string | URL) {\n _method = method;\n _url = url;\n _open.apply(this, [method, url]);\n };\n\n xhr.addEventListener(\"load\", () => {\n window.dispatchEvent(\n new BeamNetworkCallEvent({\n url: (_url || \"\").toString(),\n method: (_method || \"get\").toLowerCase(),\n type: \"xhr\",\n xhr,\n })\n );\n });\n\n return xhr;\n },\n};\n\n/**\n * Side-Effects Setup (initialize listeners)\n */\n\nlet initializedListeners = false;\n\nexport const initNetworkListeners = () => {\n if (initializedListeners) return;\n window.fetch = new Proxy(window.fetch, fetchHandler);\n XMLHttpRequest = new Proxy(XMLHttpRequest, xhrHandler);\n initializedListeners = true;\n};\n"],"names":["fetchHandler","target","_thisArg","args","response","responseCopy","BeamNetworkCallEvent","xhrHandler","TargetConstructor","xhr","_open","_method","_url","method","url","initializedListeners","initNetworkListeners"],"mappings":"gDAMA,MAAMA,EAAe,CACnB,MAAO,SAAUC,EAAaC,EAAeC,EAAa,CACxD,OAAOF,EAAO,GAAGE,CAAI,EAAE,KAAMC,GAAuB,CAClD,GAAIA,EAAS,GAAI,CACf,MAAMC,EAAeD,EAAS,MAC9B,EAAA,OAAO,cACL,IAAIE,EAAqB,CACvB,IAAKH,EAAK,CAAC,EAAE,SAAS,EACtB,QAASA,EAAK,CAAC,GAAG,QAAU,OAAO,YAAY,EAC/C,KAAM,QACN,SAAUE,CACZ,CAAC,CACH,CACF,CACA,OAAOD,CACT,CAAC,CACH,CACF,EAMMG,EAAa,CACjB,UAAUC,EAAwBL,EAAa,CAC7C,MAAMM,EAAsB,IAAID,EAAkB,GAAGL,CAAI,EACnDO,EAAqDD,EAAI,KAC/D,IAAIE,EACAC,EAEJ,OAAAH,EAAI,KAAO,SAAUI,EAAgBC,EAAmB,CACtDH,EAAUE,EACVD,EAAOE,EACPJ,EAAM,MAAM,KAAM,CAACG,EAAQC,CAAG,CAAC,CACjC,EAEAL,EAAI,iBAAiB,OAAQ,IAAM,CACjC,OAAO,cACL,IAAIH,EAAqB,CACvB,KAAMM,GAAQ,IAAI,SAAA,EAClB,QAASD,GAAW,OAAO,cAC3B,KAAM,MACN,IAAAF,CACF,CAAC,CACH,CACF,CAAC,EAEMA,CACT,CACF,EAMA,IAAIM,EAAuB,GAEd,MAAAC,EAAuB,IAAM,CACpCD,IACJ,OAAO,MAAQ,IAAI,MAAM,OAAO,MAAOf,CAAY,EACnD,eAAiB,IAAI,MAAM,eAAgBO,CAAU,EACrDQ,EAAuB,GACzB"}
1
+ {"version":3,"file":"network-listeners.esm.js","sources":["../../src/utils/network-listeners.ts"],"sourcesContent":["import { BeamNetworkCallEvent } from \"./events\";\n\n/**\n * Fetch Listener\n */\n\nconst fetchHandler = {\n apply: function (target: any, _thisArg: any, args: any[]) {\n return target(...args).then((response: Response) => {\n if (response.ok) {\n const responseCopy = response.clone();\n window.dispatchEvent(\n new BeamNetworkCallEvent({\n url: args[0].toString(),\n method: (args[1]?.method || \"get\").toLowerCase(),\n type: \"fetch\",\n response: responseCopy,\n })\n );\n }\n return response;\n });\n },\n};\n\n/**\n * XMLHTTPRequest Listener\n */\nconst xhrHandler = {\n construct(TargetConstructor: any, args: any[]) {\n const xhr: XMLHttpRequest = new TargetConstructor(...args);\n const _open: (method: string, url: string | URL) => void = xhr.open;\n let _method: string;\n let _url: string | URL;\n\n xhr.open = function (method: string, url: string | URL) {\n _method = method;\n _url = url;\n // @ts-expect-error arguments is untyped since xhr.open is an overloaded method\n // eslint-disable-next-line prefer-rest-params\n _open.apply(this, arguments);\n };\n\n xhr.addEventListener(\"load\", () => {\n window.dispatchEvent(\n new BeamNetworkCallEvent({\n url: (_url || \"\").toString(),\n method: (_method || \"get\").toLowerCase(),\n type: \"xhr\",\n xhr,\n })\n );\n });\n\n return xhr;\n },\n};\n\n/**\n * Side-Effects Setup (initialize listeners)\n */\n\nlet initializedListeners = false;\n\nexport const initNetworkListeners = () => {\n if (initializedListeners) return;\n window.fetch = new Proxy(window.fetch, fetchHandler);\n XMLHttpRequest = new Proxy(XMLHttpRequest, xhrHandler);\n initializedListeners = true;\n};\n"],"names":["fetchHandler","target","_thisArg","args","response","responseCopy","BeamNetworkCallEvent","xhrHandler","TargetConstructor","xhr","_open","_method","_url","method","url","initializedListeners","initNetworkListeners"],"mappings":"qDAMA,MAAMA,EAAe,CACnB,MAAO,SAAUC,EAAaC,EAAeC,EAAa,CACxD,OAAOF,EAAO,GAAGE,CAAI,EAAE,KAAMC,GAAuB,CAClD,GAAIA,EAAS,GAAI,CACf,MAAMC,EAAeD,EAAS,MAAM,EACpC,OAAO,cACL,IAAIE,EAAqB,CACvB,IAAKH,EAAK,CAAC,EAAE,SACb,EAAA,QAASA,EAAK,CAAC,GAAG,QAAU,OAAO,YAAY,EAC/C,KAAM,QACN,SAAUE,CACZ,CAAC,CACH,CACF,CACA,OAAOD,CACT,CAAC,CACH,CACF,EAKMG,EAAa,CACjB,UAAUC,EAAwBL,EAAa,CAC7C,MAAMM,EAAsB,IAAID,EAAkB,GAAGL,CAAI,EACnDO,EAAqDD,EAAI,KAC/D,IAAIE,EACAC,EAEJ,OAAAH,EAAI,KAAO,SAAUI,EAAgBC,EAAmB,CACtDH,EAAUE,EACVD,EAAOE,EAGPJ,EAAM,MAAM,KAAM,SAAS,CAC7B,EAEAD,EAAI,iBAAiB,OAAQ,IAAM,CACjC,OAAO,cACL,IAAIH,EAAqB,CACvB,KAAMM,GAAQ,IAAI,WAClB,QAASD,GAAW,OAAO,YAAA,EAC3B,KAAM,MACN,IAAAF,CACF,CAAC,CACH,CACF,CAAC,EAEMA,CACT,CACF,EAMA,IAAIM,EAAuB,GAEd,MAAAC,EAAuB,IAAM,CACpCD,IACJ,OAAO,MAAQ,IAAI,MAAM,OAAO,MAAOf,CAAY,EACnD,eAAiB,IAAI,MAAM,eAAgBO,CAAU,EACrDQ,EAAuB,GACzB"}
@@ -1,2 +1,2 @@
1
- import{c}from"../chunks/events-6Z5MkCRr.esm.js";const d={apply:function(o,r,t){return o(...t).then(e=>{if(e.ok){const n=e.clone();window.dispatchEvent(new c({url:t[0].toString(),method:(t[1]?.method||"get").toLowerCase(),type:"fetch",response:n}))}return e})}},h={construct(o,r){const t=new o(...r),e=t.open;let n,i;return t.open=function(w,s){n=w,i=s,e.apply(this,[w,s])},t.addEventListener("load",()=>{window.dispatchEvent(new c({url:(i||"").toString(),method:(n||"get").toLowerCase(),type:"xhr",xhr:t}))}),t}};let p=!1;const a=()=>{p||(window.fetch=new Proxy(window.fetch,d),XMLHttpRequest=new Proxy(XMLHttpRequest,h),p=!0)};export{a as initNetworkListeners};
1
+ import{d as i}from"../chunks/events-BohmT6Lp.esm.js";const a={apply:function(o,r,t){return o(...t).then(e=>{if(e.ok){const n=e.clone();window.dispatchEvent(new i({url:t[0].toString(),method:(t[1]?.method||"get").toLowerCase(),type:"fetch",response:n}))}return e})}},d={construct(o,r){const t=new o(...r),e=t.open;let n,s;return t.open=function(c,p){n=c,s=p,e.apply(this,arguments)},t.addEventListener("load",()=>{window.dispatchEvent(new i({url:(s||"").toString(),method:(n||"get").toLowerCase(),type:"xhr",xhr:t}))}),t}};let w=!1;const h=()=>{w||(window.fetch=new Proxy(window.fetch,a),XMLHttpRequest=new Proxy(XMLHttpRequest,d),w=!0)};export{h as initNetworkListeners};
2
2
  //# sourceMappingURL=network-listeners.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"network-listeners.js","sources":["../../src/utils/network-listeners.ts"],"sourcesContent":["import { BeamNetworkCallEvent } from \"./events\";\n\n/**\n * Fetch Listener\n */\n\nconst fetchHandler = {\n apply: function (target: any, _thisArg: any, args: any[]) {\n return target(...args).then((response: Response) => {\n if (response.ok) {\n const responseCopy = response.clone();\n window.dispatchEvent(\n new BeamNetworkCallEvent({\n url: args[0].toString(),\n method: (args[1]?.method || \"get\").toLowerCase(),\n type: \"fetch\",\n response: responseCopy,\n })\n );\n }\n return response;\n });\n },\n};\n\n/**\n * XMLHTTPRequest Listener\n */\n\nconst xhrHandler = {\n construct(TargetConstructor: any, args: any[]) {\n const xhr: XMLHttpRequest = new TargetConstructor(...args);\n const _open: (method: string, url: string | URL) => void = xhr.open;\n let _method: string;\n let _url: string | URL;\n\n xhr.open = function (method: string, url: string | URL) {\n _method = method;\n _url = url;\n _open.apply(this, [method, url]);\n };\n\n xhr.addEventListener(\"load\", () => {\n window.dispatchEvent(\n new BeamNetworkCallEvent({\n url: (_url || \"\").toString(),\n method: (_method || \"get\").toLowerCase(),\n type: \"xhr\",\n xhr,\n })\n );\n });\n\n return xhr;\n },\n};\n\n/**\n * Side-Effects Setup (initialize listeners)\n */\n\nlet initializedListeners = false;\n\nexport const initNetworkListeners = () => {\n if (initializedListeners) return;\n window.fetch = new Proxy(window.fetch, fetchHandler);\n XMLHttpRequest = new Proxy(XMLHttpRequest, xhrHandler);\n initializedListeners = true;\n};\n"],"names":["fetchHandler","target","_thisArg","args","response","responseCopy","BeamNetworkCallEvent","xhrHandler","TargetConstructor","xhr","_open","_method","_url","method","url","initializedListeners","initNetworkListeners"],"mappings":"gDAMA,MAAMA,EAAe,CACnB,MAAO,SAAUC,EAAaC,EAAeC,EAAa,CACxD,OAAOF,EAAO,GAAGE,CAAI,EAAE,KAAMC,GAAuB,CAClD,GAAIA,EAAS,GAAI,CACf,MAAMC,EAAeD,EAAS,MAC9B,EAAA,OAAO,cACL,IAAIE,EAAqB,CACvB,IAAKH,EAAK,CAAC,EAAE,SAAS,EACtB,QAASA,EAAK,CAAC,GAAG,QAAU,OAAO,YAAY,EAC/C,KAAM,QACN,SAAUE,CACZ,CAAC,CACH,CACF,CACA,OAAOD,CACT,CAAC,CACH,CACF,EAMMG,EAAa,CACjB,UAAUC,EAAwBL,EAAa,CAC7C,MAAMM,EAAsB,IAAID,EAAkB,GAAGL,CAAI,EACnDO,EAAqDD,EAAI,KAC/D,IAAIE,EACAC,EAEJ,OAAAH,EAAI,KAAO,SAAUI,EAAgBC,EAAmB,CACtDH,EAAUE,EACVD,EAAOE,EACPJ,EAAM,MAAM,KAAM,CAACG,EAAQC,CAAG,CAAC,CACjC,EAEAL,EAAI,iBAAiB,OAAQ,IAAM,CACjC,OAAO,cACL,IAAIH,EAAqB,CACvB,KAAMM,GAAQ,IAAI,SAAA,EAClB,QAASD,GAAW,OAAO,cAC3B,KAAM,MACN,IAAAF,CACF,CAAC,CACH,CACF,CAAC,EAEMA,CACT,CACF,EAMA,IAAIM,EAAuB,GAEd,MAAAC,EAAuB,IAAM,CACpCD,IACJ,OAAO,MAAQ,IAAI,MAAM,OAAO,MAAOf,CAAY,EACnD,eAAiB,IAAI,MAAM,eAAgBO,CAAU,EACrDQ,EAAuB,GACzB"}
1
+ {"version":3,"file":"network-listeners.js","sources":["../../src/utils/network-listeners.ts"],"sourcesContent":["import { BeamNetworkCallEvent } from \"./events\";\n\n/**\n * Fetch Listener\n */\n\nconst fetchHandler = {\n apply: function (target: any, _thisArg: any, args: any[]) {\n return target(...args).then((response: Response) => {\n if (response.ok) {\n const responseCopy = response.clone();\n window.dispatchEvent(\n new BeamNetworkCallEvent({\n url: args[0].toString(),\n method: (args[1]?.method || \"get\").toLowerCase(),\n type: \"fetch\",\n response: responseCopy,\n })\n );\n }\n return response;\n });\n },\n};\n\n/**\n * XMLHTTPRequest Listener\n */\nconst xhrHandler = {\n construct(TargetConstructor: any, args: any[]) {\n const xhr: XMLHttpRequest = new TargetConstructor(...args);\n const _open: (method: string, url: string | URL) => void = xhr.open;\n let _method: string;\n let _url: string | URL;\n\n xhr.open = function (method: string, url: string | URL) {\n _method = method;\n _url = url;\n // @ts-expect-error arguments is untyped since xhr.open is an overloaded method\n // eslint-disable-next-line prefer-rest-params\n _open.apply(this, arguments);\n };\n\n xhr.addEventListener(\"load\", () => {\n window.dispatchEvent(\n new BeamNetworkCallEvent({\n url: (_url || \"\").toString(),\n method: (_method || \"get\").toLowerCase(),\n type: \"xhr\",\n xhr,\n })\n );\n });\n\n return xhr;\n },\n};\n\n/**\n * Side-Effects Setup (initialize listeners)\n */\n\nlet initializedListeners = false;\n\nexport const initNetworkListeners = () => {\n if (initializedListeners) return;\n window.fetch = new Proxy(window.fetch, fetchHandler);\n XMLHttpRequest = new Proxy(XMLHttpRequest, xhrHandler);\n initializedListeners = true;\n};\n"],"names":["fetchHandler","target","_thisArg","args","response","responseCopy","BeamNetworkCallEvent","xhrHandler","TargetConstructor","xhr","_open","_method","_url","method","url","initializedListeners","initNetworkListeners"],"mappings":"qDAMA,MAAMA,EAAe,CACnB,MAAO,SAAUC,EAAaC,EAAeC,EAAa,CACxD,OAAOF,EAAO,GAAGE,CAAI,EAAE,KAAMC,GAAuB,CAClD,GAAIA,EAAS,GAAI,CACf,MAAMC,EAAeD,EAAS,MAAM,EACpC,OAAO,cACL,IAAIE,EAAqB,CACvB,IAAKH,EAAK,CAAC,EAAE,SACb,EAAA,QAASA,EAAK,CAAC,GAAG,QAAU,OAAO,YAAY,EAC/C,KAAM,QACN,SAAUE,CACZ,CAAC,CACH,CACF,CACA,OAAOD,CACT,CAAC,CACH,CACF,EAKMG,EAAa,CACjB,UAAUC,EAAwBL,EAAa,CAC7C,MAAMM,EAAsB,IAAID,EAAkB,GAAGL,CAAI,EACnDO,EAAqDD,EAAI,KAC/D,IAAIE,EACAC,EAEJ,OAAAH,EAAI,KAAO,SAAUI,EAAgBC,EAAmB,CACtDH,EAAUE,EACVD,EAAOE,EAGPJ,EAAM,MAAM,KAAM,SAAS,CAC7B,EAEAD,EAAI,iBAAiB,OAAQ,IAAM,CACjC,OAAO,cACL,IAAIH,EAAqB,CACvB,KAAMM,GAAQ,IAAI,WAClB,QAASD,GAAW,OAAO,YAAA,EAC3B,KAAM,MACN,IAAAF,CACF,CAAC,CACH,CACF,CAAC,EAEMA,CACT,CACF,EAMA,IAAIM,EAAuB,GAEd,MAAAC,EAAuB,IAAM,CACpCD,IACJ,OAAO,MAAQ,IAAI,MAAM,OAAO,MAAOf,CAAY,EACnD,eAAiB,IAAI,MAAM,eAAgBO,CAAU,EACrDQ,EAAuB,GACzB"}
@@ -0,0 +1,123 @@
1
+ import { b as TBeamCartLocalStorage } from '../chunks/cart-contents-CUgc4y1N.esm.js';
2
+ import { a as TPromoCodeResponse, b as TValidatedPromoResponse, T as TPromoCodeRequest, c as TPromoCodeAttribute } from '../chunks/promo-types-C1unMpo2.esm.js';
3
+ import '../chunks/openapi-spec-VAt3phhg.esm.js';
4
+
5
+ /**
6
+ * Retrieves all validated promo codes stored in the "beam_promo_codes" cookie and parses it
7
+ *
8
+ * @returns {TPromoCodeResponse | undefined} An array of `ValidatedPromoCode` objects if found and parsed successfully, otherwise `undefined`
9
+ */
10
+ declare const getAllPromoCodesFromCookie: () => TPromoCodeResponse | undefined;
11
+ /**
12
+ * Stores the validated promo codes in the "beam_promo_codes" cookie, replaces and does not merge
13
+ *
14
+ * @param {TValidatedPromoResponse} validatedPromoCodes
15
+ * @param {string} domain
16
+ */
17
+ declare const setPromoCodeInCookie: ({ validatedPromoCodes, domain, }: {
18
+ validatedPromoCodes: TValidatedPromoResponse;
19
+ domain?: string | undefined;
20
+ }) => void;
21
+ /**
22
+ * Retrieves promo codes from localStorage, scoped by API key
23
+ * @param {string} apiKey API key used for storage scoping
24
+ * @returns {TPromoCodeRequest | null} - Returns stored promo codes object containing both
25
+ * validated and unvalidated codes
26
+ * - If no codes exist, returns a fresh object with empty arrays
27
+ *
28
+ */
29
+ declare const getPromoCodesLocalStorage: ({ apiKey }: {
30
+ apiKey: string;
31
+ }) => TPromoCodeRequest | null;
32
+ /**
33
+ * Sets promo codes in localStorage
34
+ * @param {TPromoCodeRequest} promoCodes New promo codes to add
35
+ * @param {string} apiKey API key for storage scoping
36
+ */
37
+ declare const setPromoCodesInLocalStorage: ({ apiKey, promoCodes, }: {
38
+ apiKey?: string | undefined;
39
+ promoCodes: Partial<TPromoCodeRequest>;
40
+ }) => void;
41
+ /**
42
+ * Merges new promo codes with existing ones and returns the combined result
43
+ * @param {Partial<TPromoCodeRequest>} newPromos New promo codes to add
44
+ * @param {string} apiKey API key for storage scoping
45
+ * @returns {TPromoCodeRequest} An object containing both validated and unvalidated promo codes
46
+ * @example
47
+ * const result = mergePromoCodes({
48
+ * apiKey: 'beam_123',
49
+ * newPromos: {
50
+ * unvalidatedPromoCodes: [
51
+ * { type: 'manual', attributes: { value: 'WINTER20' } },
52
+ * { type: 'url', attributes: { url: 'www.example.com/?promo=HOLIDAY25' } }
53
+ * ]
54
+ * }
55
+ * });
56
+ */
57
+ declare const mergeStoreAndReturnPromos: ({ newPromos, apiKey, }: {
58
+ newPromos: Partial<TPromoCodeRequest>;
59
+ apiKey: string;
60
+ }) => TPromoCodeRequest;
61
+ /**
62
+ * Formats unvalidated promo codes by determining their source and attributes
63
+ * The function will assign `QueryParam` as the source if a `url` exists,
64
+ * otherwise, it will assign `Manual` as the source
65
+ *
66
+ * @param {TPromoCodeAttribute[]} promoAttributes An array of promo attributes to be formatted
67
+ * @returns {TUnvalidatedPromoRequest} - An array of UnvalidatedPromoCode objects,
68
+ * each with a source and attributes object
69
+ */
70
+ declare const mapToUnvalidatedPromoCodes: (promoAttributes: TPromoCodeAttribute[]) => (Partial<{
71
+ type?: "manual" | "url" | undefined;
72
+ } & {
73
+ attributes?: {
74
+ value?: string | undefined;
75
+ } | undefined;
76
+ }> & Partial<{
77
+ type?: "manual" | "url" | undefined;
78
+ } & {
79
+ attributes?: {
80
+ url?: string | undefined;
81
+ } | undefined;
82
+ }>)[];
83
+ /**
84
+ * @param {TPromoCodeAttribute[]} promoAttributes An array of promo attributes to be formatted
85
+ * @param {string} apiKey API key for storage scoping
86
+ * @returns {TPromoCodeRequest} An object containing both validated and unvalidated promo codes
87
+ */
88
+ declare const formatStoreAndReturnPromoCodes: (promoAttributes: TPromoCodeAttribute[], apiKey: string) => TPromoCodeRequest;
89
+ /**
90
+ * Extracts applicable promo codes from the cart object
91
+ * This function retrieves discounts stored in the cart's `content.discounts` array,
92
+ * filters out only the applicable promo codes, and returns them as an array of strings
93
+ *
94
+ * @param {TBeamCartLocalStorage} cart The cart object retrieved from local storage
95
+ * @returns {string[]} An array of applicable promo codes
96
+ */
97
+ declare const getPromoCodesFromCart: (cart: TBeamCartLocalStorage) => string[];
98
+ /**
99
+ * Gets promo code exclusively from Shopify discount cookie
100
+ * @returns {string | null} Single discount code or null if not found
101
+ */
102
+ declare const getPromoCodeFromShopifyCookie: () => string | null;
103
+ /**
104
+ * Safely parses a JSON string into an array of strings
105
+ * If parsing fails or the input is not a valid JSON array, it returns an empty array
106
+ *
107
+ * @param {string | undefined | null} jsonString The JSON string to parse
108
+ * @returns {string[]} The parsed array of strings or an empty array if parsing fails
109
+ */
110
+ declare const parseJsonStringArray: (jsonString: string | undefined | null) => string[];
111
+ /**
112
+ * Retrieves and sanitizes the current URL for storage, preserving only safe query parameters
113
+ *
114
+ * @returns {TPromoCodeAttribute} Returns an object with only the `url` property set
115
+ */
116
+ declare const getSanitizedUrlForStorage: () => TPromoCodeAttribute | undefined;
117
+ declare const promoCodesAreEqual: (a: TPromoCodeRequest, b: TPromoCodeRequest) => boolean;
118
+ declare const isEmptyPromoData: (promos: {
119
+ unvalidatedPromoCodes?: unknown[];
120
+ validatedPromoCodes?: unknown[];
121
+ }) => boolean;
122
+
123
+ export { formatStoreAndReturnPromoCodes, getAllPromoCodesFromCookie, getPromoCodeFromShopifyCookie, getPromoCodesFromCart, getPromoCodesLocalStorage, getSanitizedUrlForStorage, isEmptyPromoData, mapToUnvalidatedPromoCodes, mergeStoreAndReturnPromos, parseJsonStringArray, promoCodesAreEqual, setPromoCodeInCookie, setPromoCodesInLocalStorage };
@@ -0,0 +1,2 @@
1
+ import{f as m,c as d,b as i,h as C,g,a as p,i as n,m as P,j as S,e as l,p as A,s as f,k}from"../chunks/promoManager-fl54hq13.esm.js";import"../chunks/beam-errors-Ci0d3926.esm.js";import"./cookies.esm.js";import"./local-storage.esm.js";import"./logger.esm.js";export{m as formatStoreAndReturnPromoCodes,d as getAllPromoCodesFromCookie,i as getPromoCodeFromShopifyCookie,C as getPromoCodesFromCart,g as getPromoCodesLocalStorage,p as getSanitizedUrlForStorage,n as isEmptyPromoData,P as mapToUnvalidatedPromoCodes,S as mergeStoreAndReturnPromos,l as parseJsonStringArray,A as promoCodesAreEqual,f as setPromoCodeInCookie,k as setPromoCodesInLocalStorage};
2
+ //# sourceMappingURL=promoManager.esm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"promoManager.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ import{f as m,c as d,b as i,h as C,g,a as p,i as n,m as P,j as S,e as l,p as A,s as f,k}from"../chunks/promoManager-B9cTR1R3.esm.js";import"../chunks/beam-errors-Ci0d3926.esm.js";import"./cookies.js";import"./local-storage.js";import"./logger.js";export{m as formatStoreAndReturnPromoCodes,d as getAllPromoCodesFromCookie,i as getPromoCodeFromShopifyCookie,C as getPromoCodesFromCart,g as getPromoCodesLocalStorage,p as getSanitizedUrlForStorage,n as isEmptyPromoData,P as mapToUnvalidatedPromoCodes,S as mergeStoreAndReturnPromos,l as parseJsonStringArray,A as promoCodesAreEqual,f as setPromoCodeInCookie,k as setPromoCodesInLocalStorage};
2
+ //# sourceMappingURL=promoManager.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"promoManager.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -1,2 +1,2 @@
1
- import{createScopedLocalStorage as o}from"./local-storage.esm.js";import"../chunks/beam-errors-P-Lu07Ce.esm.js";import"./logger.esm.js";const t="remote_session_id";function s({remoteSessionId:e,apiKey:i=""}){o({apiKey:i}).setItem(t,e)}function r({apiKey:e=""}){return o({apiKey:e}).getItem(t)}export{r as getRemoteSession,s as saveRemoteSession};
1
+ import{createScopedLocalStorage as o}from"./local-storage.esm.js";import"../chunks/beam-errors-Ci0d3926.esm.js";import"./logger.esm.js";const t="remote_session_id";function s({remoteSessionId:e,apiKey:i=""}){o({apiKey:i}).setItem(t,e)}function r({apiKey:e=""}){return o({apiKey:e}).getItem(t)}export{r as getRemoteSession,s as saveRemoteSession};
2
2
  //# sourceMappingURL=remote-session.esm.js.map
@@ -1,2 +1,2 @@
1
- import{createScopedLocalStorage as o}from"./local-storage.js";import"../chunks/beam-errors-P-Lu07Ce.esm.js";import"./logger.js";const t="remote_session_id";function s({remoteSessionId:e,apiKey:i=""}){o({apiKey:i}).setItem(t,e)}function r({apiKey:e=""}){return o({apiKey:e}).getItem(t)}export{r as getRemoteSession,s as saveRemoteSession};
1
+ import{createScopedLocalStorage as o}from"./local-storage.js";import"../chunks/beam-errors-Ci0d3926.esm.js";import"./logger.js";const t="remote_session_id";function s({remoteSessionId:e,apiKey:i=""}){o({apiKey:i}).setItem(t,e)}function r({apiKey:e=""}){return o({apiKey:e}).getItem(t)}export{r as getRemoteSession,s as saveRemoteSession};
2
2
  //# sourceMappingURL=remote-session.js.map
@@ -1,2 +1,2 @@
1
- import{B as s}from"../chunks/beam-errors-P-Lu07Ce.esm.js";function l(t,{timeout:i=1e4}={}){return new Promise((r,m)=>{let e=document.querySelector(t);if(e){r(e);return}let o;const u=setTimeout(()=>{e||(o?.disconnect(),m(new s(`Timed out waiting for '${t}'`)))},i);new MutationObserver((a,n)=>{o=n,Array.from(document.querySelectorAll(t)).forEach(c=>{e=c,r(c),n.disconnect(),clearTimeout(u)})}).observe(document.documentElement,{childList:!0,subtree:!0})})}export{l as waitForElement};
1
+ import{B as s}from"../chunks/beam-errors-Ci0d3926.esm.js";function l(t,{timeout:c=1e4}={}){return new Promise((r,i)=>{let e=document.querySelector(t);if(e){r(e);return}let o;const m=setTimeout(()=>{e||(o?.disconnect(),i(new s(`Timed out waiting for '${t}'`)))},c);new MutationObserver((a,n)=>{o=n,Array.from(document.querySelectorAll(t)).forEach(u=>{e=u,r(u),n.disconnect(),clearTimeout(m)})}).observe(document.documentElement,{childList:!0,subtree:!0})})}export{l as waitForElement};
2
2
  //# sourceMappingURL=wait-for-element.esm.js.map
@@ -1,2 +1,2 @@
1
- import{B as s}from"../chunks/beam-errors-P-Lu07Ce.esm.js";function l(t,{timeout:i=1e4}={}){return new Promise((r,m)=>{let e=document.querySelector(t);if(e){r(e);return}let o;const u=setTimeout(()=>{e||(o?.disconnect(),m(new s(`Timed out waiting for '${t}'`)))},i);new MutationObserver((a,n)=>{o=n,Array.from(document.querySelectorAll(t)).forEach(c=>{e=c,r(c),n.disconnect(),clearTimeout(u)})}).observe(document.documentElement,{childList:!0,subtree:!0})})}export{l as waitForElement};
1
+ import{B as s}from"../chunks/beam-errors-Ci0d3926.esm.js";function l(t,{timeout:c=1e4}={}){return new Promise((r,i)=>{let e=document.querySelector(t);if(e){r(e);return}let o;const m=setTimeout(()=>{e||(o?.disconnect(),i(new s(`Timed out waiting for '${t}'`)))},c);new MutationObserver((a,n)=>{o=n,Array.from(document.querySelectorAll(t)).forEach(u=>{e=u,r(u),n.disconnect(),clearTimeout(m)})}).observe(document.documentElement,{childList:!0,subtree:!0})})}export{l as waitForElement};
2
2
  //# sourceMappingURL=wait-for-element.js.map
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@beamimpact/web-sdk",
3
3
  "private": false,
4
- "version": "1.48.0",
4
+ "version": "1.51.1",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
7
7
  "module": "dist/index.js",
@@ -83,19 +83,19 @@
83
83
  "eslint-plugin-import": "2.27.5",
84
84
  "eslint-plugin-lit": "1.8.2",
85
85
  "eslint-plugin-lodash": "7.4.0",
86
- "fastify": "4.13.0",
86
+ "fastify": "4.29.1",
87
87
  "husky": "8.0.3",
88
88
  "lint-staged": "13.1.1",
89
89
  "nodemon": "3.0.1",
90
90
  "npm-run-all": "4.1.5",
91
91
  "prettier": "2.8.4",
92
92
  "react": "18.2.0",
93
- "rollup": "4.1.4",
93
+ "rollup": "4.41.1",
94
94
  "rollup-plugin-copy": "3.5.0",
95
95
  "rollup-plugin-dts": "6.1.0",
96
96
  "rollup-plugin-esbuild": "6.1.0",
97
97
  "typescript": "4.9.5",
98
- "vite": "4.5.2",
98
+ "vite": "4.5.14",
99
99
  "wait-on": "7.2.0"
100
100
  }
101
101
  }
@@ -1,2 +0,0 @@
1
- import"./vendor-GKiOHg2N.esm.js";import"./shoelace-components-wBxNHnyr.esm.js";import"./lit-iNN5L_Qk.esm.js";import"./routes-o1QpF40R.esm.js";import"./beam-errors-P-Lu07Ce.esm.js";import"../utils/logger.js";
2
- //# sourceMappingURL=_share-dialog-dependencies-2jzbs44g.esm.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"_share-dialog-dependencies-2jzbs44g.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -1,2 +0,0 @@
1
- import"./vendor-GKiOHg2N.esm.js";import"./shoelace-components-xrhk189_.esm.js";import"./lit-iNN5L_Qk.esm.js";import"./routes-Dmf2ZNnZ.esm.js";import"./beam-errors-P-Lu07Ce.esm.js";import"../utils/logger.esm.js";
2
- //# sourceMappingURL=_share-dialog-dependencies-C8uChjuF.esm.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"_share-dialog-dependencies-C8uChjuF.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}