@beamimpact/web-sdk 1.36.4 → 1.36.6

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 (100) hide show
  1. package/dist/chunks/{_share-dialog-dependencies-sf17NEX8.esm.js → _share-dialog-dependencies-7OysCcbl.esm.js} +2 -2
  2. package/dist/chunks/_share-dialog-dependencies-7OysCcbl.esm.js.map +1 -0
  3. package/dist/chunks/{_share-dialog-dependencies-NHHxcIDe.esm.js → _share-dialog-dependencies-IH8H0M7S.esm.js} +2 -2
  4. package/dist/chunks/_share-dialog-dependencies-IH8H0M7S.esm.js.map +1 -0
  5. package/dist/chunks/index-D7cyvlBG.esm.js +2 -0
  6. package/dist/chunks/index-D7cyvlBG.esm.js.map +1 -0
  7. package/dist/chunks/index-Fvk8qalO.esm.js +2 -0
  8. package/dist/chunks/index-Fvk8qalO.esm.js.map +1 -0
  9. package/dist/chunks/{index-uBc0L0Qx.esm.js → index-JfA-djTR.esm.js} +2 -2
  10. package/dist/chunks/{index-uBc0L0Qx.esm.js.map → index-JfA-djTR.esm.js.map} +1 -1
  11. package/dist/chunks/index-LY8cCwxB.esm.js +2 -0
  12. package/dist/chunks/index-LY8cCwxB.esm.js.map +1 -0
  13. package/dist/chunks/index-Li9RyHWl.esm.js +2 -0
  14. package/dist/chunks/index-Li9RyHWl.esm.js.map +1 -0
  15. package/dist/chunks/index-YfVtHaFO.esm.js +2 -0
  16. package/dist/chunks/index-YfVtHaFO.esm.js.map +1 -0
  17. package/dist/chunks/index-YoXRWj_4.esm.js +2 -0
  18. package/dist/chunks/index-YoXRWj_4.esm.js.map +1 -0
  19. package/dist/chunks/{index-vg7ClGPn.esm.js → index-e6o8bmIt.esm.js} +2 -2
  20. package/dist/chunks/{index-vg7ClGPn.esm.js.map → index-e6o8bmIt.esm.js.map} +1 -1
  21. package/dist/chunks/order-page-LMEdbSdq.esm.js +2 -0
  22. package/dist/chunks/order-page-LMEdbSdq.esm.js.map +1 -0
  23. package/dist/chunks/order-page-sDLRWj-E.esm.js +2 -0
  24. package/dist/chunks/order-page-sDLRWj-E.esm.js.map +1 -0
  25. package/dist/chunks/{routes-BI_HfQw6.esm.js → routes-bWWE2fXp.esm.js} +2 -2
  26. package/dist/chunks/{routes-BI_HfQw6.esm.js.map → routes-bWWE2fXp.esm.js.map} +1 -1
  27. package/dist/chunks/{routes-WbfYG9qp.esm.js → routes-h6eWTToy.esm.js} +2 -2
  28. package/dist/chunks/{routes-WbfYG9qp.esm.js.map → routes-h6eWTToy.esm.js.map} +1 -1
  29. package/dist/chunks/{update-cart-mTi4PVhz.esm.js → update-cart-PflL_pK3.esm.js} +2 -2
  30. package/dist/chunks/{update-cart-mTi4PVhz.esm.js.map → update-cart-PflL_pK3.esm.js.map} +1 -1
  31. package/dist/chunks/{update-cart-hWMIlTUD.esm.js → update-cart-k_Y-sCyt.esm.js} +2 -2
  32. package/dist/chunks/{update-cart-hWMIlTUD.esm.js.map → update-cart-k_Y-sCyt.esm.js.map} +1 -1
  33. package/dist/components/community-impact.esm.js +1 -1
  34. package/dist/components/community-impact.js +1 -1
  35. package/dist/components/cumulative-impact.esm.js +1 -1
  36. package/dist/components/cumulative-impact.js +1 -1
  37. package/dist/components/impact-overview.esm.js +1 -1
  38. package/dist/components/impact-overview.js +1 -1
  39. package/dist/components/index.esm.js +1 -1
  40. package/dist/components/index.js +1 -1
  41. package/dist/components/post-purchase.d.ts +1 -1
  42. package/dist/components/post-purchase.esm.js +1 -1
  43. package/dist/components/post-purchase.js +1 -1
  44. package/dist/components/redeem-transaction.d.ts +1 -1
  45. package/dist/components/redeem-transaction.esm.js +1 -1
  46. package/dist/components/redeem-transaction.js +1 -1
  47. package/dist/components/select-nonprofit.d.ts +1 -1
  48. package/dist/components/select-nonprofit.esm.js +7 -7
  49. package/dist/components/select-nonprofit.esm.js.map +1 -1
  50. package/dist/components/select-nonprofit.js +7 -7
  51. package/dist/components/select-nonprofit.js.map +1 -1
  52. package/dist/components/shopify.esm.js +1 -1
  53. package/dist/components/shopify.js +1 -1
  54. package/dist/index.esm.js +1 -1
  55. package/dist/index.js +1 -1
  56. package/dist/integrations/beam.esm.js +1 -1
  57. package/dist/integrations/beam.js +1 -1
  58. package/dist/integrations/cart.esm.js +1 -1
  59. package/dist/integrations/cart.js +1 -1
  60. package/dist/integrations/index.esm.js +1 -1
  61. package/dist/integrations/index.js +1 -1
  62. package/dist/integrations/logs.esm.js +1 -1
  63. package/dist/integrations/logs.js +1 -1
  64. package/dist/integrations/shopify.esm.js +1 -1
  65. package/dist/integrations/shopify.js +1 -1
  66. package/dist/integrations/statsig.esm.js +1 -1
  67. package/dist/integrations/statsig.js +1 -1
  68. package/dist/react/community-impact.esm.js +1 -1
  69. package/dist/react/community-impact.js +1 -1
  70. package/dist/react/cumulative-impact.esm.js +1 -1
  71. package/dist/react/cumulative-impact.js +1 -1
  72. package/dist/react/impact-overview.esm.js +1 -1
  73. package/dist/react/impact-overview.js +1 -1
  74. package/dist/react/index.esm.js +1 -1
  75. package/dist/react/index.js +1 -1
  76. package/dist/react/post-purchase.esm.js +1 -1
  77. package/dist/react/post-purchase.js +1 -1
  78. package/dist/react/redeem-transaction.esm.js +1 -1
  79. package/dist/react/redeem-transaction.js +1 -1
  80. package/dist/react/select-nonprofit.esm.js +1 -1
  81. package/dist/react/select-nonprofit.js +1 -1
  82. package/package.json +1 -1
  83. package/dist/chunks/_share-dialog-dependencies-NHHxcIDe.esm.js.map +0 -1
  84. package/dist/chunks/_share-dialog-dependencies-sf17NEX8.esm.js.map +0 -1
  85. package/dist/chunks/index--ofShi8t.esm.js +0 -2
  86. package/dist/chunks/index--ofShi8t.esm.js.map +0 -1
  87. package/dist/chunks/index-TrsSwLUY.esm.js +0 -2
  88. package/dist/chunks/index-TrsSwLUY.esm.js.map +0 -1
  89. package/dist/chunks/index-oGO5HXSB.esm.js +0 -2
  90. package/dist/chunks/index-oGO5HXSB.esm.js.map +0 -1
  91. package/dist/chunks/index-pHbZDTW0.esm.js +0 -2
  92. package/dist/chunks/index-pHbZDTW0.esm.js.map +0 -1
  93. package/dist/chunks/index-tkKvWkzv.esm.js +0 -2
  94. package/dist/chunks/index-tkKvWkzv.esm.js.map +0 -1
  95. package/dist/chunks/index-u8nTsn3I.esm.js +0 -2
  96. package/dist/chunks/index-u8nTsn3I.esm.js.map +0 -1
  97. package/dist/chunks/order-page-PSfhnuaE.esm.js +0 -2
  98. package/dist/chunks/order-page-PSfhnuaE.esm.js.map +0 -1
  99. package/dist/chunks/order-page-WaIEqUq2.esm.js +0 -2
  100. package/dist/chunks/order-page-WaIEqUq2.esm.js.map +0 -1
@@ -1,4 +1,4 @@
1
- import{f as I,g as l,h as w,y as b,p as k,m as z,k as $}from"../chunks/lit-yVXn5Cbs.esm.js";import{c as L,u as m,d as D,e as u,A as N,b as p,f as T,a as A,_ as C,i as d}from"../chunks/localize-dXHrlK8g.esm.js";import{D as E,b as B,f as F,S as P}from"../chunks/routes-WbfYG9qp.esm.js";import{p as U}from"../chunks/progress-bar-7gWYaGlq.esm.js";import{c as S,f as y}from"../chunks/events-5IECSF-x.esm.js";import"../utils/network-listeners.js";import{createScopedLocalStorage as W}from"../utils/local-storage.js";import{getCookieValue as v}from"../utils/cookies.js";import{i as M}from"../chunks/lodash-P8OIs-at.esm.js";import{c as O}from"../chunks/responsive-LYEag6TI.esm.js";import{B as R}from"../chunks/cart-contents-h60geKWa.esm.js";import"../chunks/beam-errors-AMvTvR1C.esm.js";import"../utils/logger.js";const h={en:{beamAttribution:()=>"Powered by Beam",ctaTitle:()=>"Choose your impact",ctaMessage:({donationPercentage:r="1"}={})=>`Select a nonprofit and ${r}% of your purchase will be donated, at no extra cost.`,inlineSeparator:()=>": "},fr:{beamAttribution:()=>"Optimis\xE9 par Beam",ctaTitle:()=>"Choisissez votre cause",ctaMessage:({donationPercentage:r="1"}={})=>`Choisissez un organisme \xE0 but non lucratif et ${r} % lui sera vers\xE9 en votre nom, sans frais suppl\xE9mentaires.`,inlineSeparator:()=>" : "},de:{beamAttribution:()=>"Unterst\xFCtzt von Beam",ctaTitle:()=>"W\xE4hle deinen Impact",ctaMessage:({donationPercentage:r="1"}={})=>`W\xE4hle eine der gemeinn\xFCtzigen Organisationen und spende ${r}% deines Einkaufs ohne zus\xE4tzliche Kosten`,inlineSeparator:()=>": "},es:{beamAttribution:()=>"Ofrecido por Beam",ctaTitle:()=>"Elige tu contribuci\xF3n",ctaMessage:({donationPercentage:r="1"}={})=>`Elige una organizaci\xF3n sin fines de lucro y donaremos ${r}% de tu compra sin coste adicional.`,inlineSeparator:()=>": "},it:{beamAttribution:()=>"Gestito da Beam",ctaTitle:()=>"Scegli dove fare la differenza",ctaMessage:({donationPercentage:r="1"}={})=>`Seleziona un'organizzazione no-profit a cui devolvere l\u2019${r}% del tuo acquisto, senza costi aggiuntivi`,inlineSeparator:()=>": "},pl:{beamAttribution:()=>"Wspierany przez Beam",ctaTitle:()=>"Wybierz inicjatyw\u0119, kt\xF3r\u0105 chcesz wesprze\u0107",ctaMessage:({donationPercentage:r="1"}={})=>`Wybierz organizacj\u0119, kt\xF3rej przeka\u017Cesz ${r}% warto\u015Bci Twoich zakup\xF3w \u2013 bez \u017Cadnych dodatkowych koszt\xF3w!`,inlineSeparator:()=>": "}};var K=Object.defineProperty,_=Object.getOwnPropertyDescriptor,c=(r,t,e,i)=>{for(var n=i>1?void 0:i?_(t,e):t,a=r.length-1,o;a>=0;a--)(o=r[a])&&(n=(i?o(t,e,n):o(n))||n);return i&&n&&K(t,e,n),n};class s extends w{constructor(){super(...arguments),this.baseUrl=E,this.selectedNonprofitId=null,this.lang="en",this.debug=!1,this.enableNonprofitDeselection=!1,this.didTryToCreateNewSelectionFromCache=!1,this.getChainNonprofits=async()=>{u(["apiKey"],this);const t=this.cart?.content?{schema:this.cart?.schema,content:this.cart?.content}:void 0,e=await B({baseUrl:this.baseUrl,apiRoot:"/api/v3",headers:{authorization:`Api-Key ${this.apiKey}`},requestBody:{storeId:this.storeId,widgetName:"select-nonprofit",postalCode:this.postalCode,countryCode:this.countryCode,version:"1.0.0",lang:this.configLang,cart:t}});return this.enableNonprofitDeselection=!!e.config.enableNonprofitDeselection,this.selectedNonprofitId&&!e.nonprofits.map(i=>i.nonprofit.id).includes(this.selectedNonprofitId)&&(this.selectedNonprofitId=null,this.dispatchEvent(new S({selectedNonprofitId:this.selectedNonprofitId,selectionId:this.selectionId,nonprofitName:null}))),e.store?.id&&e.store.id!==this.storeId&&(this.storeId=e.store.id),await this.createNewSelectionForCachedNonprofit(),this.localStorage.setItemJson("chainNonprofits",{createdAt:new Date,data:e}),e},this.postSelectNonprofit=async({selectedNonprofitId:t})=>{u(["apiKey","storeId"],this);const e=this.getExternalCartId(),i=this.getBeamCartId(),n=await F({baseUrl:this.baseUrl,headers:{authorization:`Api-Key ${this.apiKey}`},requestBody:{nonprofitId:t,selectionId:this.selectionId,storeId:this.storeId,cartId:e,beamCartId:i}});this.selectionId=n?.selectionId,this.localStorage.setItem("transaction",this.selectionId),this.localStorage.setItem("nonprofit",t),await this.updateComplete;const a=this.getNonprofitById(t);this.dispatchEvent(new S({selectedNonprofitId:t,selectionId:this.selectionId,nonprofitName:a?.nonprofit?.name}))},this.nonprofitListDataController=new N(this,this.getChainNonprofits),this.selectionDataController=new N(this,this.postSelectNonprofit),this.localStorage=W(this),this.handleCartChange=t=>{this.cart=t.detail},this.makeHandleSelect=(t,e,i)=>async n=>{const a=this.selectedNonprofitId;if(n instanceof KeyboardEvent){let o=null;switch(n.key){case"ArrowUp":case"ArrowLeft":e===0?o=i[i.length-1]:o=i[e-1],n.preventDefault();break;case"ArrowRight":case"ArrowDown":e===i.length-1?o=i[0]:o=i[e+1],n.preventDefault();break;case"Enter":case" ":n.preventDefault();break;default:return}if(o){a!=null&&(this.selectedNonprofitId=o.nonprofit.id);const f=this.renderRoot.querySelector(`[data-value="${o.nonprofit.id}"]`);f!==null&&(f.tabIndex=0,f.focus());return}}if(n.currentTarget instanceof HTMLElement)if(a===t)if(this.enableNonprofitDeselection)this.selectedNonprofitId=null;else return;else this.selectedNonprofitId=t;await this.selectionDataController.exec({selectedNonprofitId:this.selectedNonprofitId})}}get configLang(){return P[this.lang]||"en"}getNonprofitById(t){return t?this.nonprofitListDataController?.data?.nonprofits.find(e=>e.nonprofit.id===t):null}connectedCallback(){super.connectedCallback(),window.addEventListener(y.eventName,this.handleCartChange)}async firstUpdated(t){await this.restoreStateFromCache()}async updated(t){const e=["baseUrl","storeId","apiKey","countryCode","postalCode","cart","lang"];for(const i of e)if(t.has(i)){await this.nonprofitListDataController.exec();break}}disconnectedCallback(){window.removeEventListener(y.eventName,this.handleCartChange),super.disconnectedCallback()}getExternalCartId(){return this.localStorage.getItemJson("cart")?.cartId??v("cart")}getBeamCartId(){return v(R)}async restoreStateFromCache(){try{this.selectedNonprofitId=parseInt(this.localStorage.getItem("nonprofit")||"")||null,this.selectionId=this.localStorage.getItem("transaction")??void 0,this.cart=this.localStorage.getItemJson("cart")??void 0;const{createdAt:t=0,data:e}=this.localStorage.getItemJson("chainNonprofits")||{},i=2*60*60*1e3;new Date(t).valueOf()+i>new Date().valueOf()&&(this.nonprofitListDataController.data=e,this.nonprofitListDataController.loading=!1)}catch{}}async createNewSelectionForCachedNonprofit(){if(u(["apiKey"],this),!(!this.storeId||this.didTryToCreateNewSelectionFromCache))try{if(this.didTryToCreateNewSelectionFromCache=!0,this.selectedNonprofitId){this.selectionId||await this.selectionDataController.exec({selectedNonprofitId:this.selectedNonprofitId});const t=this.getNonprofitById(this.selectedNonprofitId);this.dispatchEvent(new S({selectedNonprofitId:this.selectedNonprofitId,selectionId:this.selectionId,nonprofitName:t?.nonprofit?.name}))}}catch{}}get cssVariables(){const t={"--beam-fontFamily":"inherit","--beam-fontStyle":"inherit","--beam-fontSize":"inherit","--beam-textColor":"inherit","--beam-backgroundColor":"inherit",...U,"--beam-SelectNonprofit-title-textAlign":"inherit","--beam-SelectNonprofit-description-textAlign":"inherit","--beam-SelectNonprofit-maxWidth":"800px","--beam-SelectNonprofit-options-marginTop":"0px","--beam-SelectNonprofit-options-iconHeight":"24px","--beam-SelectNonprofit-options-padding":"10px","--beam-SelectNonprofit-options-borderRadius":"0px","--beam-SelectNonprofit-options-borderColor":"currentColor","--beam-SelectNonprofit-options--selected-borderColor":"currentColor","--beam-SelectNonprofit-options-backgroundColor":"transparent","--beam-SelectNonprofit-options-gap":"8px","--beam-SelectNonprofit-options--selected-backgroundColor":"currentColor","--beam-SelectNonprofit-details-marginTop":"10px","--beam-SelectNonprofit-details-borderRadius":"0px","--beam-SelectNonprofit-details-borderColor":"currentColor","--beam-SelectNonprofit-details-backgroundColor":"inherit",...p("--beam-SelectNonprofit-title",{fontSize:"1.25em",fontWeight:"bold"}),"--beam-SelectNonprofit-header-inline-lineHeight":"inherit",...p("--beam-SelectNonprofit-title-inline",{fontWeight:"bold"}),"--beam-SelectNonprofit-title-inline-textTransform":"none",...p("--beam-SelectNonprofit-description",{marginTop:"0.5em"}),...p("--beam-SelectNonprofit-description-inline"),...p("--beam-SelectNonprofit-details-cause",{fontSize:"0.85em",fontWeight:"bold"}),...p("--beam-SelectNonprofit-details-beamAttribution",{fontSize:"0.85em"}),...p("--beam-SelectNonprofit-details-impactDescription",{fontSize:"1em",marginTop:"10px"}),"--beam-SelectNonprofit-details-nonprofitName-fontWeight":"bold","--beam-SelectNonprofit-details-nonprofitName-fontStyle":"inherit","--beam-SelectNonprofit-details-fundingProgress-marginTop":"10px",...p("--beam-SelectNonprofit-details-fundingProgressLabel",{fontSize:"0.85em"})},e=this.nonprofitListDataController?.data?.config?.web?.theme||{},i={...t,...e};return Object.assign(Object.create({toCSS(){return T(this)}}),i)}render(){const{selectedNonprofitId:t}=this,{data:e,loading:i}=this.nonprofitListDataController;if(i&&!e)return A();if(this.nonprofitListDataController.error)return this.debug?C({error:this.nonprofitListDataController.error}):"";if(this.selectionDataController.error&&this.debug)return C({error:this.selectionDataController.error});const n=e?.nonprofits||[],a=n.find(o=>o.nonprofit.id===t)||null;return b`
1
+ import{f as I,g as l,h as w,y as b,p as k,m as z,k as $}from"../chunks/lit-yVXn5Cbs.esm.js";import{c as L,u as m,d as D,e as u,A as N,b as p,f as T,a as A,_ as C,i as d}from"../chunks/localize-dXHrlK8g.esm.js";import{D as E,b as B,f as F,S as P}from"../chunks/routes-h6eWTToy.esm.js";import{p as U}from"../chunks/progress-bar-7gWYaGlq.esm.js";import{c as S,f as y}from"../chunks/events-5IECSF-x.esm.js";import"../utils/network-listeners.js";import{createScopedLocalStorage as W}from"../utils/local-storage.js";import{getCookieValue as v}from"../utils/cookies.js";import{i as M}from"../chunks/lodash-P8OIs-at.esm.js";import{c as O}from"../chunks/responsive-LYEag6TI.esm.js";import{B as R}from"../chunks/cart-contents-h60geKWa.esm.js";import"../chunks/beam-errors-AMvTvR1C.esm.js";import"../utils/logger.js";const h={en:{beamAttribution:()=>"Powered by Beam",ctaTitle:()=>"Choose your impact",ctaMessage:({donationPercentage:r="1"}={})=>`Select a nonprofit and ${r}% of your purchase will be donated, at no extra cost.`,inlineSeparator:()=>": "},fr:{beamAttribution:()=>"Optimis\xE9 par Beam",ctaTitle:()=>"Choisissez votre cause",ctaMessage:({donationPercentage:r="1"}={})=>`Choisissez un organisme \xE0 but non lucratif et ${r} % lui sera vers\xE9 en votre nom, sans frais suppl\xE9mentaires.`,inlineSeparator:()=>" : "},de:{beamAttribution:()=>"Unterst\xFCtzt von Beam",ctaTitle:()=>"W\xE4hle deinen Impact",ctaMessage:({donationPercentage:r="1"}={})=>`W\xE4hle eine der gemeinn\xFCtzigen Organisationen und spende ${r}% deines Einkaufs ohne zus\xE4tzliche Kosten`,inlineSeparator:()=>": "},es:{beamAttribution:()=>"Ofrecido por Beam",ctaTitle:()=>"Elige tu contribuci\xF3n",ctaMessage:({donationPercentage:r="1"}={})=>`Elige una organizaci\xF3n sin fines de lucro y donaremos ${r}% de tu compra sin coste adicional.`,inlineSeparator:()=>": "},it:{beamAttribution:()=>"Gestito da Beam",ctaTitle:()=>"Scegli dove fare la differenza",ctaMessage:({donationPercentage:r="1"}={})=>`Seleziona un'organizzazione no-profit a cui devolvere l\u2019${r}% del tuo acquisto, senza costi aggiuntivi`,inlineSeparator:()=>": "},pl:{beamAttribution:()=>"Wspierany przez Beam",ctaTitle:()=>"Wybierz inicjatyw\u0119, kt\xF3r\u0105 chcesz wesprze\u0107",ctaMessage:({donationPercentage:r="1"}={})=>`Wybierz organizacj\u0119, kt\xF3rej przeka\u017Cesz ${r}% warto\u015Bci Twoich zakup\xF3w \u2013 bez \u017Cadnych dodatkowych koszt\xF3w!`,inlineSeparator:()=>": "}};var K=Object.defineProperty,_=Object.getOwnPropertyDescriptor,c=(r,e,t,i)=>{for(var n=i>1?void 0:i?_(e,t):e,a=r.length-1,o;a>=0;a--)(o=r[a])&&(n=(i?o(e,t,n):o(n))||n);return i&&n&&K(e,t,n),n};class s extends w{constructor(){super(...arguments),this.baseUrl=E,this.selectedNonprofitId=null,this.lang="en",this.debug=!1,this.enableNonprofitDeselection=!1,this.didTryToCreateNewSelectionFromCache=!1,this.getChainNonprofits=async()=>{u(["apiKey"],this);const e=this.cart?.content?{schema:this.cart?.schema,content:this.cart?.content}:void 0,t=await B({baseUrl:this.baseUrl,apiRoot:"/api/v3",headers:{authorization:`Api-Key ${this.apiKey}`},requestBody:{storeId:this.storeId,widgetName:"select-nonprofit",postalCode:this.postalCode,countryCode:this.countryCode,version:"1.0.0",lang:this.configLang,cart:e}});return this.enableNonprofitDeselection=!!t.config.enableNonprofitDeselection,this.selectedNonprofitId&&!t.nonprofits.map(i=>i.nonprofit.id).includes(this.selectedNonprofitId)&&(this.selectedNonprofitId=null,this.dispatchEvent(new S({selectedNonprofitId:this.selectedNonprofitId,selectionId:this.selectionId,nonprofitName:null}))),t.store?.id&&t.store.id!==this.storeId&&(this.storeId=t.store.id),await this.createNewSelectionForCachedNonprofit(),this.localStorage.setItemJson("chainNonprofits",{createdAt:new Date,data:t}),t},this.postSelectNonprofit=async({selectedNonprofitId:e})=>{u(["apiKey","storeId"],this);const t=this.getExternalCartId(),i=this.getBeamCartId(),n=await F({baseUrl:this.baseUrl,headers:{authorization:`Api-Key ${this.apiKey}`},requestBody:{nonprofitId:e,selectionId:this.selectionId,storeId:this.storeId,cartId:t,beamCartId:i}});this.selectionId=n?.selectionId,this.localStorage.setItem("transaction",this.selectionId),this.localStorage.setItem("nonprofit",e),await this.updateComplete;const a=this.getNonprofitById(e);this.dispatchEvent(new S({selectedNonprofitId:e,selectionId:this.selectionId,nonprofitName:a?.nonprofit?.name}))},this.nonprofitListDataController=new N(this,this.getChainNonprofits),this.selectionDataController=new N(this,this.postSelectNonprofit),this.localStorage=W(this),this.handleCartChange=e=>{this.cart=e.detail},this.makeHandleSelect=(e,t,i)=>async n=>{const a=this.selectedNonprofitId;if(n instanceof KeyboardEvent){let o=null;switch(n.key){case"ArrowUp":case"ArrowLeft":t===0?o=i[i.length-1]:o=i[t-1],n.preventDefault();break;case"ArrowRight":case"ArrowDown":t===i.length-1?o=i[0]:o=i[t+1],n.preventDefault();break;case"Enter":case" ":n.preventDefault();break;default:return}if(o){a!=null&&(this.selectedNonprofitId=o.nonprofit.id);const f=this.renderRoot.querySelector(`[data-value="${o.nonprofit.id}"]`);f!==null&&(f.tabIndex=0,f.focus());return}}if(n.currentTarget instanceof HTMLElement)if(a===e)if(this.enableNonprofitDeselection)this.selectedNonprofitId=null;else return;else this.selectedNonprofitId=e;await this.selectionDataController.exec({selectedNonprofitId:this.selectedNonprofitId})}}get configLang(){return P[this.lang]||"en"}getNonprofitById(e){return e?this.nonprofitListDataController?.data?.nonprofits.find(t=>t.nonprofit.id===e):null}connectedCallback(){super.connectedCallback(),window.addEventListener(y.eventName,this.handleCartChange)}async firstUpdated(e){await this.restoreStateFromCache()}async updated(e){const t=["baseUrl","storeId","apiKey","countryCode","postalCode","cart","lang"];for(const i of t)if(e.has(i)){await this.nonprofitListDataController.exec();break}}disconnectedCallback(){window.removeEventListener(y.eventName,this.handleCartChange),super.disconnectedCallback()}getExternalCartId(){return this.localStorage.getItemJson("cart")?.cartId??v("cart")}getBeamCartId(){return v(R)}async restoreStateFromCache(){try{this.selectedNonprofitId=parseInt(this.localStorage.getItem("nonprofit")||"")||null,this.selectionId=this.localStorage.getItem("transaction")??void 0,this.cart=this.localStorage.getItemJson("cart")??void 0;const{createdAt:e=0,data:t}=this.localStorage.getItemJson("chainNonprofits")||{},i=2*60*60*1e3;new Date(e).valueOf()+i>new Date().valueOf()&&(this.nonprofitListDataController.data=t,this.nonprofitListDataController.loading=!1)}catch{}}async createNewSelectionForCachedNonprofit(){if(u(["apiKey"],this),!(!this.storeId||this.didTryToCreateNewSelectionFromCache))try{if(this.didTryToCreateNewSelectionFromCache=!0,this.selectedNonprofitId){this.selectionId||await this.selectionDataController.exec({selectedNonprofitId:this.selectedNonprofitId});const e=this.getNonprofitById(this.selectedNonprofitId);this.dispatchEvent(new S({selectedNonprofitId:this.selectedNonprofitId,selectionId:this.selectionId,nonprofitName:e?.nonprofit?.name}))}}catch{}}get cssVariables(){const e={"--beam-fontFamily":"inherit","--beam-fontStyle":"inherit","--beam-fontSize":"inherit","--beam-textColor":"inherit","--beam-backgroundColor":"inherit",...U,"--beam-SelectNonprofit-title-textAlign":"inherit","--beam-SelectNonprofit-description-textAlign":"inherit","--beam-SelectNonprofit-maxWidth":"800px","--beam-SelectNonprofit-options-marginTop":"0px","--beam-SelectNonprofit-options-iconHeight":"24px","--beam-SelectNonprofit-options-padding":"10px","--beam-SelectNonprofit-options-borderRadius":"0px","--beam-SelectNonprofit-options-borderColor":"currentColor","--beam-SelectNonprofit-options--selected-borderColor":"currentColor","--beam-SelectNonprofit-options-backgroundColor":"transparent","--beam-SelectNonprofit-options-gap":"8px","--beam-SelectNonprofit-options--selected-backgroundColor":"currentColor","--beam-SelectNonprofit-details-marginTop":"10px","--beam-SelectNonprofit-details-borderRadius":"0px","--beam-SelectNonprofit-details-borderColor":"currentColor","--beam-SelectNonprofit-details-backgroundColor":"inherit",...p("--beam-SelectNonprofit-title",{fontSize:"1.25em",fontWeight:"bold"}),"--beam-SelectNonprofit-header-inline-lineHeight":"inherit",...p("--beam-SelectNonprofit-title-inline",{fontWeight:"bold"}),"--beam-SelectNonprofit-title-inline-textTransform":"none",...p("--beam-SelectNonprofit-description",{marginTop:"0.5em"}),...p("--beam-SelectNonprofit-description-inline"),...p("--beam-SelectNonprofit-details-cause",{fontSize:"0.85em",fontWeight:"bold"}),...p("--beam-SelectNonprofit-details-beamAttribution",{fontSize:"0.85em"}),...p("--beam-SelectNonprofit-details-impactDescription",{fontSize:"1em",marginTop:"10px"}),"--beam-SelectNonprofit-details-nonprofitName-fontWeight":"bold","--beam-SelectNonprofit-details-nonprofitName-fontStyle":"inherit","--beam-SelectNonprofit-details-fundingProgress-marginTop":"10px",...p("--beam-SelectNonprofit-details-fundingProgressLabel",{fontSize:"0.85em"})},t=this.nonprofitListDataController?.data?.config?.web?.theme||{},i={...e,...t};return Object.assign(Object.create({toCSS(){return T(this)}}),i)}render(){const{selectedNonprofitId:e}=this,{data:t,loading:i}=this.nonprofitListDataController;if(i&&!t)return A();if(this.nonprofitListDataController.error)return this.debug?C({error:this.nonprofitListDataController.error}):"";if(this.selectionDataController.error&&this.debug)return C({error:this.selectionDataController.error});const n=t?.nonprofits||[],a=n.find(o=>o.nonprofit.id===e)||null;return b`
2
2
  <style>
3
3
  :host {
4
4
  ${this.cssVariables.toCSS()}
@@ -6,18 +6,18 @@ import{f as I,g as l,h as w,y as b,p as k,m as z,k as $}from"../chunks/lit-yVXn5
6
6
  </style>
7
7
  <div part="heading">
8
8
  <h3 class="title-block d-none d-lg-block" part="title" id="beam-SelectNonprofit-title">
9
- ${d(this.configLang,e?.config?.web?.title||"")||h[this.configLang].ctaTitle()}
9
+ ${d(this.configLang,t?.config?.web?.title||"")||h[this.configLang].ctaTitle()}
10
10
  </h3>
11
11
  <p class="description" part="description">
12
12
  <span class="d-none d-lg-inline">
13
- ${d(this.configLang,e?.config?.web?.description||"")||h[this.configLang].ctaMessage()}
13
+ ${d(this.configLang,t?.config?.web?.description||"")||h[this.configLang].ctaMessage()}
14
14
  </span>
15
15
  <div class="d-lg-none header-inline">
16
16
  <span class="title-inline" part="title">
17
- ${(d(this.configLang,e?.config?.web?.title||"")||h[this.configLang].ctaTitle())+h[this.configLang].inlineSeparator()}
17
+ ${(d(this.configLang,t?.config?.web?.title||"")||h[this.configLang].ctaTitle())+h[this.configLang].inlineSeparator()}
18
18
  </span>
19
19
  <span class="description-inline" part="description">
20
- ${d(this.configLang,e?.config?.web?.description||"")||h[this.configLang].ctaMessage()}
20
+ ${d(this.configLang,t?.config?.web?.description||"")||h[this.configLang].ctaMessage()}
21
21
  </span>
22
22
  </div>
23
23
  </p>
@@ -29,7 +29,7 @@ import{f as I,g as l,h as w,y as b,p as k,m as z,k as $}from"../chunks/lit-yVXn5
29
29
  aria-labelledby="beam-SelectNonprofit-title"
30
30
  style="display: flex; gap: var(--beam-SelectNonprofit-options-gap); margin: 10px 0 0 0;"
31
31
  >
32
- ${k(n,o=>o.nonprofit.id,({nonprofit:o},f)=>{const g=t===o.id,x=g||a==null&&f===0;return b`
32
+ ${k(n,o=>o.nonprofit.id,({nonprofit:o},f)=>{const g=e===o.id,x=g||a==null&&f===0;return b`
33
33
  <div
34
34
  class="option"
35
35
  part="option"
@@ -152,5 +152,5 @@ import{f as I,g as l,h as w,y as b,p as k,m as z,k as $}from"../chunks/lit-yVXn5
152
152
  ${m("--beam-SelectNonprofit-description")}
153
153
  text-align: var(--beam-SelectNonprofit-description-textAlign);
154
154
  }
155
- `],c([l({type:String})],s.prototype,"baseUrl",2),c([l({type:String})],s.prototype,"apiKey",2),c([l({type:Number,reflect:!0})],s.prototype,"storeId",2),c([l({type:String})],s.prototype,"countryCode",2),c([l({type:String})],s.prototype,"postalCode",2),c([l({attribute:!1,hasChanged:M})],s.prototype,"cart",2),c([l({type:Number,reflect:!0})],s.prototype,"selectedNonprofitId",2),c([l({type:String})],s.prototype,"lang",2),c([l({type:Boolean})],s.prototype,"debug",2),D(s);export{s as BeamSelectNonprofit};
155
+ `],c([l({type:String})],s.prototype,"baseUrl",2),c([l({type:String})],s.prototype,"apiKey",2),c([l({type:Number,reflect:!0})],s.prototype,"storeId",2),c([l({type:String})],s.prototype,"countryCode",2),c([l({type:String})],s.prototype,"postalCode",2),c([l({attribute:!1,hasChanged:(r,e)=>!M(r,e)})],s.prototype,"cart",2),c([l({type:Number,reflect:!0})],s.prototype,"selectedNonprofitId",2),c([l({type:String})],s.prototype,"lang",2),c([l({type:Boolean})],s.prototype,"debug",2),D(s);export{s as BeamSelectNonprofit};
156
156
  //# sourceMappingURL=select-nonprofit.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"select-nonprofit.js","sources":["../../src/components/select-nonprofit/strings.ts","../../src/components/select-nonprofit/index.ts"],"sourcesContent":["export const strings = {\n en: {\n beamAttribution: () => `Powered by Beam`,\n ctaTitle: () => `Choose your impact`,\n ctaMessage: ({ donationPercentage = \"1\" } = {}) =>\n `Select a nonprofit and ${donationPercentage}% of your purchase will be donated, at no extra cost.`,\n inlineSeparator: () => `: `,\n },\n fr: {\n beamAttribution: () => `Optimisé par Beam`,\n ctaTitle: () => `Choisissez votre cause`,\n ctaMessage: ({ donationPercentage = \"1\" } = {}) =>\n `Choisissez un organisme à but non lucratif et ${donationPercentage} % lui sera versé en votre nom, sans frais supplémentaires.`,\n inlineSeparator: () => ` : `,\n },\n de: {\n beamAttribution: () => `Unterstützt von Beam`,\n ctaTitle: () => `Wähle deinen Impact`,\n ctaMessage: ({ donationPercentage = \"1\" } = {}) =>\n `Wähle eine der gemeinnützigen Organisationen und spende ${donationPercentage}% deines Einkaufs ohne zusätzliche Kosten`,\n inlineSeparator: () => `: `,\n },\n es: {\n beamAttribution: () => \"Ofrecido por Beam\",\n ctaTitle: () => \"Elige tu contribución\",\n ctaMessage: ({ donationPercentage = \"1\" } = {}) =>\n `Elige una organización sin fines de lucro y donaremos ${donationPercentage}% de tu compra sin coste adicional.`,\n inlineSeparator: () => \": \",\n },\n it: {\n beamAttribution: () => \"Gestito da Beam\",\n ctaTitle: () => \"Scegli dove fare la differenza\",\n ctaMessage: ({ donationPercentage = \"1\" } = {}) =>\n `Seleziona un'organizzazione no-profit a cui devolvere l’${donationPercentage}% del tuo acquisto, senza costi aggiuntivi`,\n inlineSeparator: () => \": \",\n },\n pl: {\n beamAttribution: () => `Wspierany przez Beam`,\n ctaTitle: () => `Wybierz inicjatywę, którą chcesz wesprzeć`,\n ctaMessage: ({ donationPercentage = \"1\" } = {}) =>\n `Wybierz organizację, której przekażesz ${donationPercentage}% wartości Twoich zakupów – bez żadnych dodatkowych kosztów!`,\n inlineSeparator: () => `: `,\n },\n};\n","import { css, html, LitElement, PropertyValues } from \"lit\";\nimport { repeat } from \"lit/directives/repeat.js\";\nimport { unsafeHTML } from \"lit/directives/unsafe-html.js\";\nimport { property } from \"lit/decorators/property.js\";\nimport { styleMap } from \"lit/directives/style-map.js\";\nimport { AsyncController } from \"../../shared/controllers/async-controller\";\nimport { DEFAULT_BASE_URL, SUPPORTED_LANGUAGES } from \"../../api-sdk/constants\";\nimport \"../../shared/components/progress-bar\";\nimport { defineCustomElement } from \"../../shared/defineCustomElement\";\nimport { _loading } from \"../../shared/fragments/loading-template\";\nimport { _errorMessage } from \"../../shared/fragments/error-message-template\";\nimport { defineCustomText, useCustomText } from \"../../shared/fragments/custom-text\";\nimport { cssReset } from \"../../shared/css-reset\";\nimport { _cssVariableMap } from \"../../shared/fragments/css-variable-map\";\nimport { enforceConfig } from \"../../shared/enforce-config\";\nimport { isEqual } from \"../../utils\";\nimport { MissingConfig } from \"../../utils/beam-errors\";\nimport { TNumericId } from \"../../shared/types\";\nimport { createScopedLocalStorage } from \"../../utils/local-storage\";\nimport { postChainEligibleNonprofitsForCart, postSelectNonprofit } from \"../../api-sdk/v3/routes\";\nimport { LANGUAGES } from \"../../api-sdk/types\";\nimport { BeamCartChangeEvent, BeamNonprofitSelectEvent } from \"../../utils/events\";\nimport { getCookieValue } from \"../../utils/cookies\";\nimport { localizeUserString } from \"../../shared/localize\";\nimport { progressBarConfigDefaults } from \"../../shared/components/progress-bar\";\nimport { cssResponsiveUtils } from \"../../shared/responsive\";\nimport { BEAM_CART_COOKIE_NAME, TBeamCartLocalStorage, TCart } from \"../../shared/cart-contents\";\nimport { strings } from \"./strings\";\n\ninterface RequiredConfig {\n apiKey: string;\n storeId: TNumericId; // Can be set async by postalCode + countryCode lookup\n}\n\nexport class BeamSelectNonprofit extends LitElement {\n static tagName = \"beam-select-nonprofit\";\n\n @property({ type: String }) public baseUrl: string = DEFAULT_BASE_URL;\n\n @property({ type: String }) public apiKey?: RequiredConfig[\"apiKey\"];\n\n // storeId can be omitted if countryCode + postalCode are provided\n @property({ type: Number, reflect: true }) public storeId?: TNumericId;\n\n @property({ type: String }) public countryCode?: string;\n\n @property({ type: String }) public postalCode?: string;\n\n @property({ attribute: false, hasChanged: isEqual }) public cart?: TCart;\n\n @property({ type: Number, reflect: true }) public selectedNonprofitId: TNumericId | null = null;\n\n @property({ type: String }) public lang: LANGUAGES = \"en\";\n\n @property({ type: Boolean }) public debug = false;\n\n private enableNonprofitDeselection = false;\n\n private selectionId?: string;\n\n private didTryToCreateNewSelectionFromCache = false; // Should only create selection once\n\n get configLang() {\n return SUPPORTED_LANGUAGES[this.lang] || \"en\";\n }\n\n private getChainNonprofits = async () => {\n if (!enforceConfig<RequiredConfig>([\"apiKey\"], this)) {\n throw new MissingConfig();\n }\n\n const cart: any = this.cart?.content\n ? {\n schema: this.cart?.schema,\n content: this.cart?.content,\n }\n : undefined;\n\n // We use a POST method because we send a nested JSON with data that we don't want to serialize/expose in URL\n const res = await postChainEligibleNonprofitsForCart({\n baseUrl: this.baseUrl,\n apiRoot: \"/api/v3\",\n headers: {\n authorization: `Api-Key ${this.apiKey}`,\n },\n requestBody: {\n storeId: this.storeId,\n widgetName: \"select-nonprofit\",\n postalCode: this.postalCode,\n countryCode: this.countryCode,\n version: \"1.0.0\",\n lang: this.configLang,\n cart,\n },\n });\n\n this.enableNonprofitDeselection = !!res.config.enableNonprofitDeselection;\n\n // Reset selection if list doesn't include the current selected nonprofit\n if (this.selectedNonprofitId && !res.nonprofits.map((np) => np.nonprofit.id).includes(this.selectedNonprofitId)) {\n this.selectedNonprofitId = null;\n this.dispatchEvent(\n new BeamNonprofitSelectEvent({\n selectedNonprofitId: this.selectedNonprofitId,\n selectionId: this.selectionId,\n nonprofitName: null,\n })\n );\n }\n\n // If store ID was not provided, get the store ID from response here\n if (res.store?.id && res.store.id !== this.storeId) {\n this.storeId = res.store.id;\n }\n\n await this.createNewSelectionForCachedNonprofit();\n\n this.localStorage.setItemJson(\"chainNonprofits\", {\n createdAt: new Date(),\n data: res,\n });\n\n return res;\n };\n\n private postSelectNonprofit = async ({ selectedNonprofitId }: { selectedNonprofitId: TNumericId | null }) => {\n if (!enforceConfig<RequiredConfig>([\"apiKey\", \"storeId\"], this)) {\n throw new MissingConfig();\n }\n const cartId = this.getExternalCartId();\n const beamCartId = this.getBeamCartId();\n const result = await postSelectNonprofit({\n baseUrl: this.baseUrl,\n headers: {\n authorization: `Api-Key ${this.apiKey}`,\n },\n requestBody: {\n nonprofitId: selectedNonprofitId,\n selectionId: this.selectionId,\n storeId: this.storeId,\n cartId,\n beamCartId,\n },\n });\n\n this.selectionId = result?.selectionId;\n this.localStorage.setItem(\"transaction\", this.selectionId);\n this.localStorage.setItem(\"nonprofit\", selectedNonprofitId);\n\n await this.updateComplete;\n\n const selectedNonprofit = this.getNonprofitById(selectedNonprofitId);\n\n this.dispatchEvent(\n new BeamNonprofitSelectEvent({\n selectedNonprofitId,\n selectionId: this.selectionId,\n nonprofitName: selectedNonprofit?.nonprofit?.name,\n })\n );\n };\n\n private nonprofitListDataController = new AsyncController<typeof this.getChainNonprofits>(\n this,\n this.getChainNonprofits\n );\n\n private selectionDataController = new AsyncController<typeof this.postSelectNonprofit>(\n this,\n this.postSelectNonprofit\n );\n\n private localStorage = createScopedLocalStorage(this as LitElement & RequiredConfig);\n\n private getNonprofitById(selectedNonprofitId: number | null) {\n if (!selectedNonprofitId) return null;\n return this.nonprofitListDataController?.data?.nonprofits.find((np) => np.nonprofit.id === selectedNonprofitId);\n }\n\n private handleCartChange = (evt: BeamCartChangeEvent) => {\n this.cart = evt.detail;\n };\n\n connectedCallback() {\n super.connectedCallback();\n window.addEventListener(BeamCartChangeEvent.eventName, this.handleCartChange as EventListener);\n }\n\n async firstUpdated(_changedProperties: PropertyValues) {\n await this.restoreStateFromCache();\n }\n\n async updated(previousPropertyValues: PropertyValues) {\n // Reload nonprofit list on change of any of these props:\n // Also fires on first load as props go from undefined => value\n const requireNewDataProps = [\"baseUrl\", \"storeId\", \"apiKey\", \"countryCode\", \"postalCode\", \"cart\", \"lang\"];\n for (const prop of requireNewDataProps) {\n if (previousPropertyValues.has(prop)) {\n await this.nonprofitListDataController.exec();\n break;\n }\n }\n }\n\n disconnectedCallback() {\n window.removeEventListener(BeamCartChangeEvent.eventName, this.handleCartChange as EventListener);\n super.disconnectedCallback();\n }\n\n private getExternalCartId() {\n return this.localStorage.getItemJson<TBeamCartLocalStorage>(\"cart\")?.cartId ?? getCookieValue(\"cart\");\n }\n\n private getBeamCartId() {\n return getCookieValue(BEAM_CART_COOKIE_NAME);\n }\n\n private async restoreStateFromCache() {\n try {\n // Restore previous selected nonprofit\n this.selectedNonprofitId = parseInt(this.localStorage.getItem(\"nonprofit\") || \"\") || null;\n // Restore previous transaction/selection\n // TODO: add max TTL for this cache item of 20 days [WEB-100]\n this.selectionId = this.localStorage.getItem(\"transaction\") ?? undefined;\n this.cart = this.localStorage.getItemJson<TBeamCartLocalStorage>(\"cart\") ?? undefined;\n\n // Try to restore nonprofit list if we have data and it's not too old\n // list will continue to refresh async and replace this data when ready\n const { createdAt = 0, data } =\n this.localStorage.getItemJson<{ createdAt: string; data: any }>(\"chainNonprofits\") || {};\n const cacheTtl = 2 * 60 * 60 * 1000;\n if (new Date(createdAt).valueOf() + cacheTtl > new Date().valueOf()) {\n this.nonprofitListDataController.data = data;\n this.nonprofitListDataController.loading = false;\n }\n } catch (err) {\n // ignore cache retrieval error and continue to fetch data\n }\n }\n\n private async createNewSelectionForCachedNonprofit() {\n if (!enforceConfig<RequiredConfig>([\"apiKey\"], this)) {\n throw new MissingConfig();\n }\n if (!this.storeId || this.didTryToCreateNewSelectionFromCache) {\n return; // storeId can be set async as a result of calling find nonprofits with postalCode + zipCode\n }\n try {\n // Immediately set flag to prevent more cache restore attempts from triggering\n this.didTryToCreateNewSelectionFromCache = true;\n\n // Create a new selection ID for the session (e.g., if restoring nonprofit after a completed order)\n\n if (this.selectedNonprofitId) {\n if (!this.selectionId) {\n await this.selectionDataController.exec({ selectedNonprofitId: this.selectedNonprofitId });\n }\n const selectedNonprofit = this.getNonprofitById(this.selectedNonprofitId);\n this.dispatchEvent(\n new BeamNonprofitSelectEvent({\n selectedNonprofitId: this.selectedNonprofitId,\n selectionId: this.selectionId,\n nonprofitName: selectedNonprofit?.nonprofit?.name,\n })\n );\n }\n } catch (err) {\n // Ignore error\n }\n }\n\n /**\n * Factory for selection event handler\n *\n * Nonprofit selector implements radio-button semantics:\n * * If nothing is selected, tabbing into selector selects first card\n * * Arrow keys changes focus between cards, but doesn't select\n * * Enter/Space sets selection\n * * If a nonprofit is selected, arrow keys change focus AND selection\n * * Click sets selection\n * @param {number} id\n * @param {number} index\n * @param {{id: number}[]} nonprofits\n * @returns {(evt: Event) => void}\n */\n private makeHandleSelect =\n (id: number, index: number, nonprofits: { nonprofit: { id: number } }[]) => async (evt: Event) => {\n const currentId = this.selectedNonprofitId;\n if (evt instanceof KeyboardEvent) {\n let nextFocus = null;\n switch (evt.key) {\n case \"ArrowUp\":\n case \"ArrowLeft\":\n if (index === 0) {\n nextFocus = nonprofits[nonprofits.length - 1];\n } else {\n nextFocus = nonprofits[index - 1];\n }\n evt.preventDefault();\n break;\n case \"ArrowRight\":\n case \"ArrowDown\":\n if (index === nonprofits.length - 1) {\n nextFocus = nonprofits[0];\n } else {\n nextFocus = nonprofits[index + 1];\n }\n evt.preventDefault();\n break;\n case \"Enter\":\n case \" \":\n evt.preventDefault();\n break; // continue to toggle-selection block below\n default:\n return;\n }\n if (nextFocus) {\n if (currentId != null) {\n this.selectedNonprofitId = nextFocus.nonprofit.id;\n }\n const focusTarget = this.renderRoot.querySelector(`[data-value=\"${nextFocus.nonprofit.id}\"]`) as HTMLElement;\n if (focusTarget !== null) {\n focusTarget.tabIndex = 0;\n focusTarget.focus();\n }\n return;\n }\n }\n // Handle selection with click or Enter/Space key\n const targetEl = evt.currentTarget;\n if (targetEl instanceof HTMLElement) {\n if (currentId === id) {\n if (this.enableNonprofitDeselection) {\n this.selectedNonprofitId = null; // unset\n } else {\n return;\n }\n } else {\n this.selectedNonprofitId = id;\n }\n }\n await this.selectionDataController.exec({ selectedNonprofitId: this.selectedNonprofitId });\n };\n\n public get cssVariables() {\n const defaults = {\n \"--beam-fontFamily\": \"inherit\",\n \"--beam-fontStyle\": \"inherit\",\n \"--beam-fontSize\": \"inherit\",\n \"--beam-textColor\": \"inherit\",\n \"--beam-backgroundColor\": \"inherit\",\n ...progressBarConfigDefaults,\n \"--beam-SelectNonprofit-title-textAlign\": \"inherit\",\n \"--beam-SelectNonprofit-description-textAlign\": \"inherit\",\n \"--beam-SelectNonprofit-maxWidth\": \"800px\",\n \"--beam-SelectNonprofit-options-marginTop\": \"0px\",\n \"--beam-SelectNonprofit-options-iconHeight\": \"24px\",\n \"--beam-SelectNonprofit-options-padding\": \"10px\",\n \"--beam-SelectNonprofit-options-borderRadius\": \"0px\",\n \"--beam-SelectNonprofit-options-borderColor\": \"currentColor\",\n \"--beam-SelectNonprofit-options--selected-borderColor\": \"currentColor\",\n \"--beam-SelectNonprofit-options-backgroundColor\": \"transparent\",\n \"--beam-SelectNonprofit-options-gap\": \"8px\",\n \"--beam-SelectNonprofit-options--selected-backgroundColor\": \"currentColor\",\n \"--beam-SelectNonprofit-details-marginTop\": \"10px\",\n \"--beam-SelectNonprofit-details-borderRadius\": \"0px\",\n \"--beam-SelectNonprofit-details-borderColor\": \"currentColor\",\n \"--beam-SelectNonprofit-details-backgroundColor\": \"inherit\",\n ...defineCustomText(\"--beam-SelectNonprofit-title\", {\n fontSize: \"1.25em\",\n fontWeight: \"bold\",\n }),\n \"--beam-SelectNonprofit-header-inline-lineHeight\": \"inherit\",\n ...defineCustomText(\"--beam-SelectNonprofit-title-inline\", {\n fontWeight: \"bold\",\n }),\n \"--beam-SelectNonprofit-title-inline-textTransform\": \"none\",\n ...defineCustomText(\"--beam-SelectNonprofit-description\", {\n marginTop: \"0.5em\",\n }),\n ...defineCustomText(\"--beam-SelectNonprofit-description-inline\"),\n ...defineCustomText(\"--beam-SelectNonprofit-details-cause\", {\n fontSize: \"0.85em\",\n fontWeight: \"bold\",\n }),\n ...defineCustomText(\"--beam-SelectNonprofit-details-beamAttribution\", {\n fontSize: \"0.85em\",\n }),\n ...defineCustomText(\"--beam-SelectNonprofit-details-impactDescription\", {\n fontSize: \"1em\",\n marginTop: \"10px\",\n }),\n \"--beam-SelectNonprofit-details-nonprofitName-fontWeight\": \"bold\",\n \"--beam-SelectNonprofit-details-nonprofitName-fontStyle\": \"inherit\",\n \"--beam-SelectNonprofit-details-fundingProgress-marginTop\": \"10px\",\n ...defineCustomText(\"--beam-SelectNonprofit-details-fundingProgressLabel\", {\n fontSize: \"0.85em\",\n }),\n };\n\n const remoteConfig = this.nonprofitListDataController?.data?.config?.web?.theme || {};\n\n const config = { ...defaults, ...remoteConfig };\n\n const serializable = Object.create({\n toCSS() {\n return _cssVariableMap(this as Record<string, string>);\n },\n });\n\n return Object.assign(serializable, config);\n }\n\n static styles = [\n cssReset,\n cssResponsiveUtils,\n css`\n :host {\n display: block;\n max-width: var(--beam-SelectNonprofit-maxWidth, 800px);\n font-family: var(--beam-fontFamily);\n font-style: var(--beam-fontStyle);\n font-size: var(--beam-fontSize);\n background-color: var(--beam-backgroundColor);\n color: var(--beam-textColor);\n }\n\n .details-impactDescription {\n ${useCustomText(\"--beam-SelectNonprofit-details-impactDescription\")}\n }\n\n .details-impactDescription .nonprofitName {\n font-weight: var(--beam-SelectNonprofit-details-nonprofitName-fontWeight);\n font-style: var(--beam-SelectNonprofit-details-nonprofitName-fontStyle, inherit);\n }\n\n /* Note: title/description display is responsive */\n\n .title-block {\n ${useCustomText(\"--beam-SelectNonprofit-title\")}\n text-align: var(--beam-SelectNonprofit-title-textAlign);\n }\n\n .header-inline {\n line-height: var(--beam-SelectNonprofit-header-inline-lineHeight);\n }\n\n .title-inline {\n font-size: var(--beam-SelectNonprofit-title-inline-fontSize);\n font-weight: var(--beam-SelectNonprofit-title-inline-fontWeight);\n color: var(--beam-SelectNonprofit-title-inline-color);\n font-family: var(--beam-SelectNonprofit-title-inline-fontFamily);\n text-transform: var(--beam-SelectNonprofit-title-inline-textTransform);\n }\n\n .description-inline {\n font-family: var(--beam-SelectNonprofit-description-inline-fontFamily);\n font-weight: var(--beam-SelectNonprofit-description-inline-fontWeight);\n color: var(--beam-SelectNonprofit-description-inline-color);\n text-transform: var(--beam-SelectNonprofit-description-inline-textTransform);\n font-size: var(--beam-SelectNonprofit-description-inline-fontSize);\n }\n\n .description {\n ${useCustomText(\"--beam-SelectNonprofit-description\")}\n text-align: var(--beam-SelectNonprofit-description-textAlign);\n }\n `,\n ];\n\n protected render() {\n const { selectedNonprofitId } = this;\n const { data, loading } = this.nonprofitListDataController;\n\n if (loading && !data) {\n // TODO: better loading UI\n return _loading(); // TODO: css theme first\n }\n if (this.nonprofitListDataController.error) {\n if (this.debug) {\n return _errorMessage({ error: this.nonprofitListDataController.error });\n }\n return \"\";\n }\n if (this.selectionDataController.error) {\n if (this.debug) {\n return _errorMessage({ error: this.selectionDataController.error });\n }\n // do not show error screen for interactive errors by default\n }\n const nonprofits = data?.nonprofits || [];\n const selectedNonprofit = nonprofits.find((np) => np.nonprofit.id === selectedNonprofitId) || null;\n return html`\n <style>\n :host {\n ${this.cssVariables.toCSS()}\n }\n </style>\n <div part=\"heading\">\n <h3 class=\"title-block d-none d-lg-block\" part=\"title\" id=\"beam-SelectNonprofit-title\">\n ${localizeUserString(this.configLang, data?.config?.web?.title || \"\") || strings[this.configLang].ctaTitle()}\n </h3>\n <p class=\"description\" part=\"description\">\n <span class=\"d-none d-lg-inline\">\n ${\n localizeUserString(this.configLang, data?.config?.web?.description || \"\") ||\n strings[this.configLang].ctaMessage()\n }\n </span>\n <div class=\"d-lg-none header-inline\">\n <span class=\"title-inline\" part=\"title\">\n ${\n (localizeUserString(this.configLang, data?.config?.web?.title || \"\") ||\n strings[this.configLang].ctaTitle()) + strings[this.configLang].inlineSeparator()\n }\n </span>\n <span class=\"description-inline\" part=\"description\">\n ${\n localizeUserString(this.configLang, data?.config?.web?.description || \"\") ||\n strings[this.configLang].ctaMessage()\n }\n </span>\n </div>\n </p>\n </div>\n <div\n class=\"options\"\n part=\"options\"\n role=\"radiogroup\"\n aria-labelledby=\"beam-SelectNonprofit-title\"\n style=\"display: flex; gap: var(--beam-SelectNonprofit-options-gap); margin: 10px 0 0 0;\"\n >\n ${repeat(\n nonprofits,\n (i) => i.nonprofit.id,\n ({ nonprofit }, index) => {\n const isSelected = selectedNonprofitId === nonprofit.id;\n const isFocusable = isSelected || (selectedNonprofit == null && index === 0);\n return html`\n <div\n class=\"option\"\n part=\"option\"\n role=\"radio\"\n tabindex=\"${isFocusable ? 0 : -1}\"\n data-value=${nonprofit.id}\n aria-checked=${isSelected}\n @click=${this.makeHandleSelect(nonprofit.id, index, nonprofits)}\n @keydown=${this.makeHandleSelect(nonprofit.id, index, nonprofits)}\n aria-label=\"${localizeUserString(this.configLang, nonprofit.cause || \"\")}\"\n style=\"${styleMap({\n cursor: \"pointer\",\n flex: \"1\",\n textAlign: \"center\",\n lineHeight: \"1\",\n marginTop: \"var(--beam-SelectNonprofit-options-marginTop, 0px)\",\n padding: \"var(--beam-SelectNonprofit-options-padding, 10px)\",\n borderWidth: \"var(--beam-SelectNonprofit-options-borderWidth, 1px)\",\n borderStyle: \"solid\",\n borderRadius: \"var(--beam-SelectNonprofit-options-borderRadius, 0)\",\n borderColor: isSelected\n ? nonprofit.causeColor || \"var(--beam-SelectNonprofit-options--selected-borderColor, currentColor)\"\n : \"var(--beam-SelectNonprofit-options-borderColor, currentColor)\",\n backgroundColor: isSelected\n ? nonprofit.causeColor ||\n \"var(--beam-SelectNonprofit-options--selected-backgroundColor, currentColor)\"\n : \"var(--beam-SelectNonprofit-options-backgroundColor, transparent)\",\n })}\"\n >\n <img\n src=\"${isSelected ? nonprofit.causeIconSelectedUrl : nonprofit.causeIconUrl}\"\n alt=\"\"\n role=\"presentation\"\n style=\"\n height: var(--beam-SelectNonprofit-options-iconHeight, 24px);\n user-select: none;\n \"\n />\n </div>\n `;\n }\n )}\n </div>\n ${\n selectedNonprofit != null\n ? html`\n <div\n class=\"details\"\n part=\"details\"\n style=\"\n border: 1px solid var(--beam-SelectNonprofit-details-borderColor);\n border-radius: var(--beam-SelectNonprofit-details-borderRadius);\n background-color: var(--beam-SelectNonprofit-details-backgroundColor);\n padding: 10px;\n margin-top: var(--beam-SelectNonprofit-details-marginTop)\n \"\n >\n <div\n style=\"display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap-reverse\"\n >\n <span\n class=\"details-cause\"\n style=\"flex: 0 1; white-space: nowrap; ${useCustomText(\"--beam-SelectNonprofit-details-cause\")}\"\n >\n ${localizeUserString(this.configLang, selectedNonprofit.nonprofit.cause || \"\")}\n </span>\n <span\n class=\"details-beamAttribution\"\n style=\"flex: 0 1; white-space: nowrap; ${useCustomText(\n \"--beam-SelectNonprofit-details-beamAttribution\"\n )}\"\n >\n ${strings[this.configLang].beamAttribution()}\n </span>\n </div>\n <p class=\"details-impactDescription\">\n ${unsafeHTML(localizeUserString(this.configLang, selectedNonprofit.impact.description || \"\"))}\n </p>\n <div\n style=\"display: flex; margin-top: var(--beam-SelectNonprofit-details-fundingProgress-marginTop); align-items: center;\"\n >\n <beam-progress-bar\n value=\"${selectedNonprofit.impact.goalProgressPercentage}\"\n style=\"flex: 1 0;\"\n ></beam-progress-bar>\n <span\n class=\"details-fundingProgressLabel\"\n style=\"${useCustomText(\n \"--beam-SelectNonprofit-details-fundingProgressLabel\"\n )} white-space: nowrap; text-align: right; flex: 0 1; margin-left: 15px;\"\n >\n ${localizeUserString(this.configLang, selectedNonprofit.impact.goalProgressText)}\n </span>\n </div>\n </div>\n `\n : \"\"\n }\n `;\n }\n}\n\ndefineCustomElement(BeamSelectNonprofit);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"beam-select-nonprofit\": BeamSelectNonprofit;\n }\n}\n"],"names":["strings","donationPercentage","x","L","s","h","g","t","e","i","o","r","BeamSelectNonprofit","LitElement","DEFAULT_BASE_URL","enforceConfig","cart","res","postChainEligibleNonprofitsForCart","np","BeamNonprofitSelectEvent","selectedNonprofitId","cartId","beamCartId","result","postSelectNonprofit","selectedNonprofit","AsyncController","createScopedLocalStorage","evt","id","index","nonprofits","currentId","nextFocus","focusTarget","SUPPORTED_LANGUAGES","BeamCartChangeEvent","_changedProperties","previousPropertyValues","requireNewDataProps","prop","getCookieValue","BEAM_CART_COOKIE_NAME","createdAt","data","cacheTtl","defaults","progressBarConfigDefaults","defineCustomText","remoteConfig","config","_cssVariableMap","loading","_loading","_errorMessage","html","localizeUserString","repeat","nonprofit","isSelected","isFocusable","styleMap","useCustomText","unsafeHTML","cssReset","cssResponsiveUtils","css","__decorateClass","property","isEqual","defineCustomElement"],"mappings":"syBAAO,MAAMA,EAAU,CACrB,GAAI,CACF,gBAAiB,IAAM,kBACvB,SAAU,IAAM,qBAChB,WAAY,CAAC,CAAE,mBAAAC,EAAqB,GAAI,EAAI,CAAA,IAC1C,0BAA0BA,CAAkB,wDAC9C,gBAAiB,IAAM,IACzB,EACA,GAAI,CACF,gBAAiB,IAAM,uBACvB,SAAU,IAAM,yBAChB,WAAY,CAAC,CAAE,mBAAAA,EAAqB,GAAI,EAAI,CAAA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AS,CAAE,KAAM,MAAO,CAAC,CAHf,EAAAzD,EAGwB,uBAEAwD,EAAA,CAAlCC,EAAS,CAAE,KAAM,MAAO,CAAC,CAAA,EALfzD,EAKwB,UAAA,SAAA,CAAA,EAGewD,EAAA,CAAjDC,EAAS,CAAE,KAAM,OAAQ,QAAS,EAAK,CAAC,CAR9B,EAAAzD,EAQuC,UAEfwD,UAAAA,CAAAA,EAAAA,EAAA,CAAlCC,EAAS,CAAE,KAAM,MAAO,CAAC,CAVf,EAAAzD,EAUwB,2BAEAwD,EAAA,CAAlCC,EAAS,CAAE,KAAM,MAAO,CAAC,CAZf,EAAAzD,EAYwB,0BAEyBwD,EAAA,CAA3DC,EAAS,CAAE,UAAW,GAAO,WAAYC,CAAQ,CAAC,CAdxC,EAAA1D,EAciD,oBAEVwD,EAAA,CAAjDC,EAAS,CAAE,KAAM,OAAQ,QAAS,EAAK,CAAC,GAhB9BzD,EAgBuC,UAAA,sBAAA,CAAA,EAEfwD,EAAA,CAAlCC,EAAS,CAAE,KAAM,MAAO,CAAC,CAAA,EAlBfzD,EAkBwB,UAAA,OAAA,CAAA,EAECwD,EAAA,CAAnCC,EAAS,CAAE,KAAM,OAAQ,CAAC,CApBhB,EAAAzD,EAoByB,UA2kBtC2D,QAAAA,CAAAA,EAAAA,EAAoB3D,CAAmB"}
1
+ {"version":3,"file":"select-nonprofit.js","sources":["../../src/components/select-nonprofit/strings.ts","../../src/components/select-nonprofit/index.ts"],"sourcesContent":["export const strings = {\n en: {\n beamAttribution: () => `Powered by Beam`,\n ctaTitle: () => `Choose your impact`,\n ctaMessage: ({ donationPercentage = \"1\" } = {}) =>\n `Select a nonprofit and ${donationPercentage}% of your purchase will be donated, at no extra cost.`,\n inlineSeparator: () => `: `,\n },\n fr: {\n beamAttribution: () => `Optimisé par Beam`,\n ctaTitle: () => `Choisissez votre cause`,\n ctaMessage: ({ donationPercentage = \"1\" } = {}) =>\n `Choisissez un organisme à but non lucratif et ${donationPercentage} % lui sera versé en votre nom, sans frais supplémentaires.`,\n inlineSeparator: () => ` : `,\n },\n de: {\n beamAttribution: () => `Unterstützt von Beam`,\n ctaTitle: () => `Wähle deinen Impact`,\n ctaMessage: ({ donationPercentage = \"1\" } = {}) =>\n `Wähle eine der gemeinnützigen Organisationen und spende ${donationPercentage}% deines Einkaufs ohne zusätzliche Kosten`,\n inlineSeparator: () => `: `,\n },\n es: {\n beamAttribution: () => \"Ofrecido por Beam\",\n ctaTitle: () => \"Elige tu contribución\",\n ctaMessage: ({ donationPercentage = \"1\" } = {}) =>\n `Elige una organización sin fines de lucro y donaremos ${donationPercentage}% de tu compra sin coste adicional.`,\n inlineSeparator: () => \": \",\n },\n it: {\n beamAttribution: () => \"Gestito da Beam\",\n ctaTitle: () => \"Scegli dove fare la differenza\",\n ctaMessage: ({ donationPercentage = \"1\" } = {}) =>\n `Seleziona un'organizzazione no-profit a cui devolvere l’${donationPercentage}% del tuo acquisto, senza costi aggiuntivi`,\n inlineSeparator: () => \": \",\n },\n pl: {\n beamAttribution: () => `Wspierany przez Beam`,\n ctaTitle: () => `Wybierz inicjatywę, którą chcesz wesprzeć`,\n ctaMessage: ({ donationPercentage = \"1\" } = {}) =>\n `Wybierz organizację, której przekażesz ${donationPercentage}% wartości Twoich zakupów – bez żadnych dodatkowych kosztów!`,\n inlineSeparator: () => `: `,\n },\n};\n","import { css, html, LitElement, PropertyValues } from \"lit\";\nimport { repeat } from \"lit/directives/repeat.js\";\nimport { unsafeHTML } from \"lit/directives/unsafe-html.js\";\nimport { property } from \"lit/decorators/property.js\";\nimport { styleMap } from \"lit/directives/style-map.js\";\nimport { AsyncController } from \"../../shared/controllers/async-controller\";\nimport { DEFAULT_BASE_URL, SUPPORTED_LANGUAGES } from \"../../api-sdk/constants\";\nimport \"../../shared/components/progress-bar\";\nimport { defineCustomElement } from \"../../shared/defineCustomElement\";\nimport { _loading } from \"../../shared/fragments/loading-template\";\nimport { _errorMessage } from \"../../shared/fragments/error-message-template\";\nimport { defineCustomText, useCustomText } from \"../../shared/fragments/custom-text\";\nimport { cssReset } from \"../../shared/css-reset\";\nimport { _cssVariableMap } from \"../../shared/fragments/css-variable-map\";\nimport { enforceConfig } from \"../../shared/enforce-config\";\nimport { isEqual } from \"../../utils\";\nimport { MissingConfig } from \"../../utils/beam-errors\";\nimport { TNumericId } from \"../../shared/types\";\nimport { createScopedLocalStorage } from \"../../utils/local-storage\";\nimport { postChainEligibleNonprofitsForCart, postSelectNonprofit } from \"../../api-sdk/v3/routes\";\nimport { LANGUAGES } from \"../../api-sdk/types\";\nimport { BeamCartChangeEvent, BeamNonprofitSelectEvent } from \"../../utils/events\";\nimport { getCookieValue } from \"../../utils/cookies\";\nimport { localizeUserString } from \"../../shared/localize\";\nimport { progressBarConfigDefaults } from \"../../shared/components/progress-bar\";\nimport { cssResponsiveUtils } from \"../../shared/responsive\";\nimport { BEAM_CART_COOKIE_NAME, TBeamCartLocalStorage, TCart } from \"../../shared/cart-contents\";\nimport { strings } from \"./strings\";\n\ninterface RequiredConfig {\n apiKey: string;\n storeId: TNumericId; // Can be set async by postalCode + countryCode lookup\n}\n\nexport class BeamSelectNonprofit extends LitElement {\n static tagName = \"beam-select-nonprofit\";\n\n @property({ type: String }) public baseUrl: string = DEFAULT_BASE_URL;\n\n @property({ type: String }) public apiKey?: RequiredConfig[\"apiKey\"];\n\n // storeId can be omitted if countryCode + postalCode are provided\n @property({ type: Number, reflect: true }) public storeId?: TNumericId;\n\n @property({ type: String }) public countryCode?: string;\n\n @property({ type: String }) public postalCode?: string;\n\n @property({ attribute: false, hasChanged: (a, b) => !isEqual(a, b) }) public cart?: TCart;\n\n @property({ type: Number, reflect: true }) public selectedNonprofitId: TNumericId | null = null;\n\n @property({ type: String }) public lang: LANGUAGES = \"en\";\n\n @property({ type: Boolean }) public debug = false;\n\n private enableNonprofitDeselection = false;\n\n private selectionId?: string;\n\n private didTryToCreateNewSelectionFromCache = false; // Should only create selection once\n\n get configLang() {\n return SUPPORTED_LANGUAGES[this.lang] || \"en\";\n }\n\n private getChainNonprofits = async () => {\n if (!enforceConfig<RequiredConfig>([\"apiKey\"], this)) {\n throw new MissingConfig();\n }\n\n const cart: any = this.cart?.content\n ? {\n schema: this.cart?.schema,\n content: this.cart?.content,\n }\n : undefined;\n\n // We use a POST method because we send a nested JSON with data that we don't want to serialize/expose in URL\n const res = await postChainEligibleNonprofitsForCart({\n baseUrl: this.baseUrl,\n apiRoot: \"/api/v3\",\n headers: {\n authorization: `Api-Key ${this.apiKey}`,\n },\n requestBody: {\n storeId: this.storeId,\n widgetName: \"select-nonprofit\",\n postalCode: this.postalCode,\n countryCode: this.countryCode,\n version: \"1.0.0\",\n lang: this.configLang,\n cart,\n },\n });\n\n this.enableNonprofitDeselection = !!res.config.enableNonprofitDeselection;\n\n // Reset selection if list doesn't include the current selected nonprofit\n if (this.selectedNonprofitId && !res.nonprofits.map((np) => np.nonprofit.id).includes(this.selectedNonprofitId)) {\n this.selectedNonprofitId = null;\n this.dispatchEvent(\n new BeamNonprofitSelectEvent({\n selectedNonprofitId: this.selectedNonprofitId,\n selectionId: this.selectionId,\n nonprofitName: null,\n })\n );\n }\n\n // If store ID was not provided, get the store ID from response here\n if (res.store?.id && res.store.id !== this.storeId) {\n this.storeId = res.store.id;\n }\n\n await this.createNewSelectionForCachedNonprofit();\n\n this.localStorage.setItemJson(\"chainNonprofits\", {\n createdAt: new Date(),\n data: res,\n });\n\n return res;\n };\n\n private postSelectNonprofit = async ({ selectedNonprofitId }: { selectedNonprofitId: TNumericId | null }) => {\n if (!enforceConfig<RequiredConfig>([\"apiKey\", \"storeId\"], this)) {\n throw new MissingConfig();\n }\n const cartId = this.getExternalCartId();\n const beamCartId = this.getBeamCartId();\n const result = await postSelectNonprofit({\n baseUrl: this.baseUrl,\n headers: {\n authorization: `Api-Key ${this.apiKey}`,\n },\n requestBody: {\n nonprofitId: selectedNonprofitId,\n selectionId: this.selectionId,\n storeId: this.storeId,\n cartId,\n beamCartId,\n },\n });\n\n this.selectionId = result?.selectionId;\n this.localStorage.setItem(\"transaction\", this.selectionId);\n this.localStorage.setItem(\"nonprofit\", selectedNonprofitId);\n\n await this.updateComplete;\n\n const selectedNonprofit = this.getNonprofitById(selectedNonprofitId);\n\n this.dispatchEvent(\n new BeamNonprofitSelectEvent({\n selectedNonprofitId,\n selectionId: this.selectionId,\n nonprofitName: selectedNonprofit?.nonprofit?.name,\n })\n );\n };\n\n private nonprofitListDataController = new AsyncController<typeof this.getChainNonprofits>(\n this,\n this.getChainNonprofits\n );\n\n private selectionDataController = new AsyncController<typeof this.postSelectNonprofit>(\n this,\n this.postSelectNonprofit\n );\n\n private localStorage = createScopedLocalStorage(this as LitElement & RequiredConfig);\n\n private getNonprofitById(selectedNonprofitId: number | null) {\n if (!selectedNonprofitId) return null;\n return this.nonprofitListDataController?.data?.nonprofits.find((np) => np.nonprofit.id === selectedNonprofitId);\n }\n\n private handleCartChange = (evt: BeamCartChangeEvent) => {\n this.cart = evt.detail;\n };\n\n connectedCallback() {\n super.connectedCallback();\n window.addEventListener(BeamCartChangeEvent.eventName, this.handleCartChange as EventListener);\n }\n\n async firstUpdated(_changedProperties: PropertyValues) {\n await this.restoreStateFromCache();\n }\n\n async updated(previousPropertyValues: PropertyValues) {\n // Reload nonprofit list on change of any of these props:\n // Also fires on first load as props go from undefined => value\n const requireNewDataProps = [\"baseUrl\", \"storeId\", \"apiKey\", \"countryCode\", \"postalCode\", \"cart\", \"lang\"];\n for (const prop of requireNewDataProps) {\n if (previousPropertyValues.has(prop)) {\n await this.nonprofitListDataController.exec();\n break;\n }\n }\n }\n\n disconnectedCallback() {\n window.removeEventListener(BeamCartChangeEvent.eventName, this.handleCartChange as EventListener);\n super.disconnectedCallback();\n }\n\n private getExternalCartId() {\n return this.localStorage.getItemJson<TBeamCartLocalStorage>(\"cart\")?.cartId ?? getCookieValue(\"cart\");\n }\n\n private getBeamCartId() {\n return getCookieValue(BEAM_CART_COOKIE_NAME);\n }\n\n private async restoreStateFromCache() {\n try {\n // Restore previous selected nonprofit\n this.selectedNonprofitId = parseInt(this.localStorage.getItem(\"nonprofit\") || \"\") || null;\n // Restore previous transaction/selection\n // TODO: add max TTL for this cache item of 20 days [WEB-100]\n this.selectionId = this.localStorage.getItem(\"transaction\") ?? undefined;\n this.cart = this.localStorage.getItemJson<TBeamCartLocalStorage>(\"cart\") ?? undefined;\n\n // Try to restore nonprofit list if we have data and it's not too old\n // list will continue to refresh async and replace this data when ready\n const { createdAt = 0, data } =\n this.localStorage.getItemJson<{ createdAt: string; data: any }>(\"chainNonprofits\") || {};\n const cacheTtl = 2 * 60 * 60 * 1000;\n if (new Date(createdAt).valueOf() + cacheTtl > new Date().valueOf()) {\n this.nonprofitListDataController.data = data;\n this.nonprofitListDataController.loading = false;\n }\n } catch (err) {\n // ignore cache retrieval error and continue to fetch data\n }\n }\n\n private async createNewSelectionForCachedNonprofit() {\n if (!enforceConfig<RequiredConfig>([\"apiKey\"], this)) {\n throw new MissingConfig();\n }\n if (!this.storeId || this.didTryToCreateNewSelectionFromCache) {\n return; // storeId can be set async as a result of calling find nonprofits with postalCode + zipCode\n }\n try {\n // Immediately set flag to prevent more cache restore attempts from triggering\n this.didTryToCreateNewSelectionFromCache = true;\n\n // Create a new selection ID for the session (e.g., if restoring nonprofit after a completed order)\n\n if (this.selectedNonprofitId) {\n if (!this.selectionId) {\n await this.selectionDataController.exec({ selectedNonprofitId: this.selectedNonprofitId });\n }\n const selectedNonprofit = this.getNonprofitById(this.selectedNonprofitId);\n this.dispatchEvent(\n new BeamNonprofitSelectEvent({\n selectedNonprofitId: this.selectedNonprofitId,\n selectionId: this.selectionId,\n nonprofitName: selectedNonprofit?.nonprofit?.name,\n })\n );\n }\n } catch (err) {\n // Ignore error\n }\n }\n\n /**\n * Factory for selection event handler\n *\n * Nonprofit selector implements radio-button semantics:\n * * If nothing is selected, tabbing into selector selects first card\n * * Arrow keys changes focus between cards, but doesn't select\n * * Enter/Space sets selection\n * * If a nonprofit is selected, arrow keys change focus AND selection\n * * Click sets selection\n * @param {number} id\n * @param {number} index\n * @param {{id: number}[]} nonprofits\n * @returns {(evt: Event) => void}\n */\n private makeHandleSelect =\n (id: number, index: number, nonprofits: { nonprofit: { id: number } }[]) => async (evt: Event) => {\n const currentId = this.selectedNonprofitId;\n if (evt instanceof KeyboardEvent) {\n let nextFocus = null;\n switch (evt.key) {\n case \"ArrowUp\":\n case \"ArrowLeft\":\n if (index === 0) {\n nextFocus = nonprofits[nonprofits.length - 1];\n } else {\n nextFocus = nonprofits[index - 1];\n }\n evt.preventDefault();\n break;\n case \"ArrowRight\":\n case \"ArrowDown\":\n if (index === nonprofits.length - 1) {\n nextFocus = nonprofits[0];\n } else {\n nextFocus = nonprofits[index + 1];\n }\n evt.preventDefault();\n break;\n case \"Enter\":\n case \" \":\n evt.preventDefault();\n break; // continue to toggle-selection block below\n default:\n return;\n }\n if (nextFocus) {\n if (currentId != null) {\n this.selectedNonprofitId = nextFocus.nonprofit.id;\n }\n const focusTarget = this.renderRoot.querySelector(`[data-value=\"${nextFocus.nonprofit.id}\"]`) as HTMLElement;\n if (focusTarget !== null) {\n focusTarget.tabIndex = 0;\n focusTarget.focus();\n }\n return;\n }\n }\n // Handle selection with click or Enter/Space key\n const targetEl = evt.currentTarget;\n if (targetEl instanceof HTMLElement) {\n if (currentId === id) {\n if (this.enableNonprofitDeselection) {\n this.selectedNonprofitId = null; // unset\n } else {\n return;\n }\n } else {\n this.selectedNonprofitId = id;\n }\n }\n await this.selectionDataController.exec({ selectedNonprofitId: this.selectedNonprofitId });\n };\n\n public get cssVariables() {\n const defaults = {\n \"--beam-fontFamily\": \"inherit\",\n \"--beam-fontStyle\": \"inherit\",\n \"--beam-fontSize\": \"inherit\",\n \"--beam-textColor\": \"inherit\",\n \"--beam-backgroundColor\": \"inherit\",\n ...progressBarConfigDefaults,\n \"--beam-SelectNonprofit-title-textAlign\": \"inherit\",\n \"--beam-SelectNonprofit-description-textAlign\": \"inherit\",\n \"--beam-SelectNonprofit-maxWidth\": \"800px\",\n \"--beam-SelectNonprofit-options-marginTop\": \"0px\",\n \"--beam-SelectNonprofit-options-iconHeight\": \"24px\",\n \"--beam-SelectNonprofit-options-padding\": \"10px\",\n \"--beam-SelectNonprofit-options-borderRadius\": \"0px\",\n \"--beam-SelectNonprofit-options-borderColor\": \"currentColor\",\n \"--beam-SelectNonprofit-options--selected-borderColor\": \"currentColor\",\n \"--beam-SelectNonprofit-options-backgroundColor\": \"transparent\",\n \"--beam-SelectNonprofit-options-gap\": \"8px\",\n \"--beam-SelectNonprofit-options--selected-backgroundColor\": \"currentColor\",\n \"--beam-SelectNonprofit-details-marginTop\": \"10px\",\n \"--beam-SelectNonprofit-details-borderRadius\": \"0px\",\n \"--beam-SelectNonprofit-details-borderColor\": \"currentColor\",\n \"--beam-SelectNonprofit-details-backgroundColor\": \"inherit\",\n ...defineCustomText(\"--beam-SelectNonprofit-title\", {\n fontSize: \"1.25em\",\n fontWeight: \"bold\",\n }),\n \"--beam-SelectNonprofit-header-inline-lineHeight\": \"inherit\",\n ...defineCustomText(\"--beam-SelectNonprofit-title-inline\", {\n fontWeight: \"bold\",\n }),\n \"--beam-SelectNonprofit-title-inline-textTransform\": \"none\",\n ...defineCustomText(\"--beam-SelectNonprofit-description\", {\n marginTop: \"0.5em\",\n }),\n ...defineCustomText(\"--beam-SelectNonprofit-description-inline\"),\n ...defineCustomText(\"--beam-SelectNonprofit-details-cause\", {\n fontSize: \"0.85em\",\n fontWeight: \"bold\",\n }),\n ...defineCustomText(\"--beam-SelectNonprofit-details-beamAttribution\", {\n fontSize: \"0.85em\",\n }),\n ...defineCustomText(\"--beam-SelectNonprofit-details-impactDescription\", {\n fontSize: \"1em\",\n marginTop: \"10px\",\n }),\n \"--beam-SelectNonprofit-details-nonprofitName-fontWeight\": \"bold\",\n \"--beam-SelectNonprofit-details-nonprofitName-fontStyle\": \"inherit\",\n \"--beam-SelectNonprofit-details-fundingProgress-marginTop\": \"10px\",\n ...defineCustomText(\"--beam-SelectNonprofit-details-fundingProgressLabel\", {\n fontSize: \"0.85em\",\n }),\n };\n\n const remoteConfig = this.nonprofitListDataController?.data?.config?.web?.theme || {};\n\n const config = { ...defaults, ...remoteConfig };\n\n const serializable = Object.create({\n toCSS() {\n return _cssVariableMap(this as Record<string, string>);\n },\n });\n\n return Object.assign(serializable, config);\n }\n\n static styles = [\n cssReset,\n cssResponsiveUtils,\n css`\n :host {\n display: block;\n max-width: var(--beam-SelectNonprofit-maxWidth, 800px);\n font-family: var(--beam-fontFamily);\n font-style: var(--beam-fontStyle);\n font-size: var(--beam-fontSize);\n background-color: var(--beam-backgroundColor);\n color: var(--beam-textColor);\n }\n\n .details-impactDescription {\n ${useCustomText(\"--beam-SelectNonprofit-details-impactDescription\")}\n }\n\n .details-impactDescription .nonprofitName {\n font-weight: var(--beam-SelectNonprofit-details-nonprofitName-fontWeight);\n font-style: var(--beam-SelectNonprofit-details-nonprofitName-fontStyle, inherit);\n }\n\n /* Note: title/description display is responsive */\n\n .title-block {\n ${useCustomText(\"--beam-SelectNonprofit-title\")}\n text-align: var(--beam-SelectNonprofit-title-textAlign);\n }\n\n .header-inline {\n line-height: var(--beam-SelectNonprofit-header-inline-lineHeight);\n }\n\n .title-inline {\n font-size: var(--beam-SelectNonprofit-title-inline-fontSize);\n font-weight: var(--beam-SelectNonprofit-title-inline-fontWeight);\n color: var(--beam-SelectNonprofit-title-inline-color);\n font-family: var(--beam-SelectNonprofit-title-inline-fontFamily);\n text-transform: var(--beam-SelectNonprofit-title-inline-textTransform);\n }\n\n .description-inline {\n font-family: var(--beam-SelectNonprofit-description-inline-fontFamily);\n font-weight: var(--beam-SelectNonprofit-description-inline-fontWeight);\n color: var(--beam-SelectNonprofit-description-inline-color);\n text-transform: var(--beam-SelectNonprofit-description-inline-textTransform);\n font-size: var(--beam-SelectNonprofit-description-inline-fontSize);\n }\n\n .description {\n ${useCustomText(\"--beam-SelectNonprofit-description\")}\n text-align: var(--beam-SelectNonprofit-description-textAlign);\n }\n `,\n ];\n\n protected render() {\n const { selectedNonprofitId } = this;\n const { data, loading } = this.nonprofitListDataController;\n\n if (loading && !data) {\n // TODO: better loading UI\n return _loading(); // TODO: css theme first\n }\n if (this.nonprofitListDataController.error) {\n if (this.debug) {\n return _errorMessage({ error: this.nonprofitListDataController.error });\n }\n return \"\";\n }\n if (this.selectionDataController.error) {\n if (this.debug) {\n return _errorMessage({ error: this.selectionDataController.error });\n }\n // do not show error screen for interactive errors by default\n }\n const nonprofits = data?.nonprofits || [];\n const selectedNonprofit = nonprofits.find((np) => np.nonprofit.id === selectedNonprofitId) || null;\n return html`\n <style>\n :host {\n ${this.cssVariables.toCSS()}\n }\n </style>\n <div part=\"heading\">\n <h3 class=\"title-block d-none d-lg-block\" part=\"title\" id=\"beam-SelectNonprofit-title\">\n ${localizeUserString(this.configLang, data?.config?.web?.title || \"\") || strings[this.configLang].ctaTitle()}\n </h3>\n <p class=\"description\" part=\"description\">\n <span class=\"d-none d-lg-inline\">\n ${\n localizeUserString(this.configLang, data?.config?.web?.description || \"\") ||\n strings[this.configLang].ctaMessage()\n }\n </span>\n <div class=\"d-lg-none header-inline\">\n <span class=\"title-inline\" part=\"title\">\n ${\n (localizeUserString(this.configLang, data?.config?.web?.title || \"\") ||\n strings[this.configLang].ctaTitle()) + strings[this.configLang].inlineSeparator()\n }\n </span>\n <span class=\"description-inline\" part=\"description\">\n ${\n localizeUserString(this.configLang, data?.config?.web?.description || \"\") ||\n strings[this.configLang].ctaMessage()\n }\n </span>\n </div>\n </p>\n </div>\n <div\n class=\"options\"\n part=\"options\"\n role=\"radiogroup\"\n aria-labelledby=\"beam-SelectNonprofit-title\"\n style=\"display: flex; gap: var(--beam-SelectNonprofit-options-gap); margin: 10px 0 0 0;\"\n >\n ${repeat(\n nonprofits,\n (i) => i.nonprofit.id,\n ({ nonprofit }, index) => {\n const isSelected = selectedNonprofitId === nonprofit.id;\n const isFocusable = isSelected || (selectedNonprofit == null && index === 0);\n return html`\n <div\n class=\"option\"\n part=\"option\"\n role=\"radio\"\n tabindex=\"${isFocusable ? 0 : -1}\"\n data-value=${nonprofit.id}\n aria-checked=${isSelected}\n @click=${this.makeHandleSelect(nonprofit.id, index, nonprofits)}\n @keydown=${this.makeHandleSelect(nonprofit.id, index, nonprofits)}\n aria-label=\"${localizeUserString(this.configLang, nonprofit.cause || \"\")}\"\n style=\"${styleMap({\n cursor: \"pointer\",\n flex: \"1\",\n textAlign: \"center\",\n lineHeight: \"1\",\n marginTop: \"var(--beam-SelectNonprofit-options-marginTop, 0px)\",\n padding: \"var(--beam-SelectNonprofit-options-padding, 10px)\",\n borderWidth: \"var(--beam-SelectNonprofit-options-borderWidth, 1px)\",\n borderStyle: \"solid\",\n borderRadius: \"var(--beam-SelectNonprofit-options-borderRadius, 0)\",\n borderColor: isSelected\n ? nonprofit.causeColor || \"var(--beam-SelectNonprofit-options--selected-borderColor, currentColor)\"\n : \"var(--beam-SelectNonprofit-options-borderColor, currentColor)\",\n backgroundColor: isSelected\n ? nonprofit.causeColor ||\n \"var(--beam-SelectNonprofit-options--selected-backgroundColor, currentColor)\"\n : \"var(--beam-SelectNonprofit-options-backgroundColor, transparent)\",\n })}\"\n >\n <img\n src=\"${isSelected ? nonprofit.causeIconSelectedUrl : nonprofit.causeIconUrl}\"\n alt=\"\"\n role=\"presentation\"\n style=\"\n height: var(--beam-SelectNonprofit-options-iconHeight, 24px);\n user-select: none;\n \"\n />\n </div>\n `;\n }\n )}\n </div>\n ${\n selectedNonprofit != null\n ? html`\n <div\n class=\"details\"\n part=\"details\"\n style=\"\n border: 1px solid var(--beam-SelectNonprofit-details-borderColor);\n border-radius: var(--beam-SelectNonprofit-details-borderRadius);\n background-color: var(--beam-SelectNonprofit-details-backgroundColor);\n padding: 10px;\n margin-top: var(--beam-SelectNonprofit-details-marginTop)\n \"\n >\n <div\n style=\"display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap-reverse\"\n >\n <span\n class=\"details-cause\"\n style=\"flex: 0 1; white-space: nowrap; ${useCustomText(\"--beam-SelectNonprofit-details-cause\")}\"\n >\n ${localizeUserString(this.configLang, selectedNonprofit.nonprofit.cause || \"\")}\n </span>\n <span\n class=\"details-beamAttribution\"\n style=\"flex: 0 1; white-space: nowrap; ${useCustomText(\n \"--beam-SelectNonprofit-details-beamAttribution\"\n )}\"\n >\n ${strings[this.configLang].beamAttribution()}\n </span>\n </div>\n <p class=\"details-impactDescription\">\n ${unsafeHTML(localizeUserString(this.configLang, selectedNonprofit.impact.description || \"\"))}\n </p>\n <div\n style=\"display: flex; margin-top: var(--beam-SelectNonprofit-details-fundingProgress-marginTop); align-items: center;\"\n >\n <beam-progress-bar\n value=\"${selectedNonprofit.impact.goalProgressPercentage}\"\n style=\"flex: 1 0;\"\n ></beam-progress-bar>\n <span\n class=\"details-fundingProgressLabel\"\n style=\"${useCustomText(\n \"--beam-SelectNonprofit-details-fundingProgressLabel\"\n )} white-space: nowrap; text-align: right; flex: 0 1; margin-left: 15px;\"\n >\n ${localizeUserString(this.configLang, selectedNonprofit.impact.goalProgressText)}\n </span>\n </div>\n </div>\n `\n : \"\"\n }\n `;\n }\n}\n\ndefineCustomElement(BeamSelectNonprofit);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"beam-select-nonprofit\": BeamSelectNonprofit;\n }\n}\n"],"names":["strings","donationPercentage","x","L","s","h","f","e","i","o","r","BeamSelectNonprofit","LitElement","DEFAULT_BASE_URL","enforceConfig","cart","res","postChainEligibleNonprofitsForCart","np","BeamNonprofitSelectEvent","selectedNonprofitId","cartId","beamCartId","result","postSelectNonprofit","selectedNonprofit","AsyncController","createScopedLocalStorage","evt","id","index","nonprofits","currentId","nextFocus","focusTarget","SUPPORTED_LANGUAGES","BeamCartChangeEvent","_changedProperties","previousPropertyValues","requireNewDataProps","prop","getCookieValue","BEAM_CART_COOKIE_NAME","createdAt","data","cacheTtl","defaults","progressBarConfigDefaults","defineCustomText","remoteConfig","config","_cssVariableMap","loading","_loading","_errorMessage","html","localizeUserString","repeat","nonprofit","isSelected","isFocusable","styleMap","useCustomText","unsafeHTML","cssReset","cssResponsiveUtils","css","__decorateClass","property","a","b","isEqual","defineCustomElement"],"mappings":"syBAAO,MAAMA,EAAU,CACrB,GAAI,CACF,gBAAiB,IAAM,kBACvB,SAAU,IAAM,qBAChB,WAAY,CAAC,CAAE,mBAAAC,EAAqB,GAAI,EAAI,CAAA,IAC1C,0BAA0BA,CAAkB,wDAC9C,gBAAiB,IAAM,IACzB,EACA,GAAI,CACF,gBAAiB,IAAM,uBACvB,SAAU,IAAM,yBAChB,WAAY,CAAC,CAAE,mBAAAA,EAAqB,GAAI,EAAI,CAAA,IAC1C,oDAAiDA,CAAkB,oEACrE,gBAAiB,IAAM,KACzB,EACA,GAAI,CACF,gBAAiB,IAAM,0BACvB,SAAU,IAAM,yBAChB,WAAY,CAAC,CAAE,mBAAAA,EAAqB,GAAI,EAAI,CAAC,IAC3C,iEAA2DA,CAAkB,+CAC/E,gBAAiB,IAAM,IACzB,EACA,GAAI,CACF,gBAAiB,IAAM,oBACvB,SAAU,IAAM,2BAChB,WAAY,CAAC,CAAE,mBAAAA,EAAqB,GAAI,EAAI,CAC1C,IAAA,4DAAyDA,CAAkB,sCAC7E,gBAAiB,IAAM,IACzB,EACA,GAAI,CACF,gBAAiB,IAAM,kBACvB,SAAU,IAAM,iCAChB,WAAY,CAAC,CAAE,mBAAAA,EAAqB,GAAI,EAAI,CAAC,IAC3C,gEAA2DA,CAAkB,6CAC/E,gBAAiB,IAAM,IACzB,EACA,GAAI,CACF,gBAAiB,IAAM,uBACvB,SAAU,IAAM,8DAChB,WAAY,CAAC,CAAE,mBAAAA,EAAqB,GAAI,EAAI,CAAA,IAC1C,uDAA0CA,CAAkB,oFAC9D,gBAAiB,IAAM,IACzB,CACF,EC3CA,IAAAC,EAAA,OAAA,eAAAC,EAAA,OAAA,yBAAAC,EAAA,CAAAC,EAAAC,EAAA,EAAAC,IAAA,CAAA,QAAAC,EAAAD,EAAA,EA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ApBhB,EAAAzD,EAoByB,UA2kBtC6D,QAAAA,CAAAA,EAAAA,EAAoB7D,CAAmB"}
@@ -1,2 +1,2 @@
1
- import{waitForElement as t}from"../utils/wait-for-element.esm.js";import{getCookieMap as r,getCookieValue as o}from"../utils/cookies.esm.js";import{initNetworkListeners as b}from"../utils/network-listeners.esm.js";import{e as I}from"../chunks/events-5IECSF-x.esm.js";import{h as O,C as P,A as T,s as W,N as j}from"../chunks/order-page-WaIEqUq2.esm.js";import"../chunks/beam-errors-AMvTvR1C.esm.js";import"../chunks/lodash-P8OIs-at.esm.js";import"../utils/local-storage.esm.js";import"../utils/memoize-last.esm.js";import"../chunks/cart-contents-h60geKWa.esm.js";import"../chunks/update-cart-mTi4PVhz.esm.js";import"../chunks/routes-BI_HfQw6.esm.js";import"../utils/logger.esm.js";import"../utils/remote-session.esm.js";import"./post-purchase.esm.js";import"../chunks/lit-yVXn5Cbs.esm.js";import"../chunks/localize-BGPniqcI.esm.js";import"./redeem-transaction.esm.js";import"../chunks/progress-bar-7gWYaGlq.esm.js";import"./beam-partner-logos.esm.js";import"../chunks/css-card-grid-3b56QBzq.esm.js";import"./impact-overview.esm.js";import"../chunks/vendor-eeJfrOkP.esm.js";import"../chunks/is-all-html-elements-SdSkxirh.esm.js";import"../chunks/responsive-LYEag6TI.esm.js";const i={waitForElement:t,getCookieMap:r,getCookieValue:o};export{O as addBeamAttributesToCart,I as events,P as getCurrentCart,b as initNetworkListeners,T as registerCartIntegration,W as showBeamOrderPageWidgets,j as trackCart,i as utils};
1
+ import{waitForElement as t}from"../utils/wait-for-element.esm.js";import{getCookieMap as r,getCookieValue as o}from"../utils/cookies.esm.js";import{initNetworkListeners as b}from"../utils/network-listeners.esm.js";import{e as A}from"../chunks/events-5IECSF-x.esm.js";import{h as N,C as P,O as T,s as W,L as j}from"../chunks/order-page-LMEdbSdq.esm.js";import"../chunks/beam-errors-AMvTvR1C.esm.js";import"../chunks/lodash-P8OIs-at.esm.js";import"../utils/local-storage.esm.js";import"../utils/memoize-last.esm.js";import"../chunks/cart-contents-h60geKWa.esm.js";import"../chunks/update-cart-PflL_pK3.esm.js";import"../chunks/routes-bWWE2fXp.esm.js";import"../utils/logger.esm.js";import"../utils/remote-session.esm.js";import"./post-purchase.esm.js";import"../chunks/lit-yVXn5Cbs.esm.js";import"../chunks/localize-BGPniqcI.esm.js";import"./redeem-transaction.esm.js";import"../chunks/progress-bar-7gWYaGlq.esm.js";import"./beam-partner-logos.esm.js";import"../chunks/css-card-grid-3b56QBzq.esm.js";import"./impact-overview.esm.js";import"../chunks/vendor-eeJfrOkP.esm.js";import"../chunks/is-all-html-elements-SdSkxirh.esm.js";import"../chunks/responsive-LYEag6TI.esm.js";const i={waitForElement:t,getCookieMap:r,getCookieValue:o};export{N as addBeamAttributesToCart,A as events,P as getCurrentCart,b as initNetworkListeners,T as registerCartIntegration,W as showBeamOrderPageWidgets,j as trackCart,i as utils};
2
2
  //# sourceMappingURL=shopify.esm.js.map
@@ -1,2 +1,2 @@
1
- import{waitForElement as t}from"../utils/wait-for-element.js";import{getCookieMap as r,getCookieValue as o}from"../utils/cookies.js";import{initNetworkListeners as b}from"../utils/network-listeners.js";import{e as I}from"../chunks/events-5IECSF-x.esm.js";import{h as O,C as P,A as T,s as W,N as j}from"../chunks/order-page-PSfhnuaE.esm.js";import"../chunks/beam-errors-AMvTvR1C.esm.js";import"../chunks/lodash-P8OIs-at.esm.js";import"../utils/local-storage.js";import"../utils/memoize-last.js";import"../chunks/cart-contents-h60geKWa.esm.js";import"../chunks/update-cart-hWMIlTUD.esm.js";import"../chunks/routes-WbfYG9qp.esm.js";import"../utils/logger.js";import"../utils/remote-session.js";import"./post-purchase.js";import"../chunks/lit-yVXn5Cbs.esm.js";import"../chunks/localize-dXHrlK8g.esm.js";import"./redeem-transaction.js";import"../chunks/progress-bar-7gWYaGlq.esm.js";import"./beam-partner-logos.js";import"../chunks/css-card-grid-3b56QBzq.esm.js";import"./impact-overview.js";import"../chunks/vendor-eeJfrOkP.esm.js";import"../chunks/is-all-html-elements-SdSkxirh.esm.js";import"../chunks/responsive-LYEag6TI.esm.js";const i={waitForElement:t,getCookieMap:r,getCookieValue:o};export{O as addBeamAttributesToCart,I as events,P as getCurrentCart,b as initNetworkListeners,T as registerCartIntegration,W as showBeamOrderPageWidgets,j as trackCart,i as utils};
1
+ import{waitForElement as t}from"../utils/wait-for-element.js";import{getCookieMap as r,getCookieValue as o}from"../utils/cookies.js";import{initNetworkListeners as b}from"../utils/network-listeners.js";import{e as A}from"../chunks/events-5IECSF-x.esm.js";import{h as N,C as P,O as T,s as W,L as j}from"../chunks/order-page-sDLRWj-E.esm.js";import"../chunks/beam-errors-AMvTvR1C.esm.js";import"../chunks/lodash-P8OIs-at.esm.js";import"../utils/local-storage.js";import"../utils/memoize-last.js";import"../chunks/cart-contents-h60geKWa.esm.js";import"../chunks/update-cart-k_Y-sCyt.esm.js";import"../chunks/routes-h6eWTToy.esm.js";import"../utils/logger.js";import"../utils/remote-session.js";import"./post-purchase.js";import"../chunks/lit-yVXn5Cbs.esm.js";import"../chunks/localize-dXHrlK8g.esm.js";import"./redeem-transaction.js";import"../chunks/progress-bar-7gWYaGlq.esm.js";import"./beam-partner-logos.js";import"../chunks/css-card-grid-3b56QBzq.esm.js";import"./impact-overview.js";import"../chunks/vendor-eeJfrOkP.esm.js";import"../chunks/is-all-html-elements-SdSkxirh.esm.js";import"../chunks/responsive-LYEag6TI.esm.js";const i={waitForElement:t,getCookieMap:r,getCookieValue:o};export{N as addBeamAttributesToCart,A as events,P as getCurrentCart,b as initNetworkListeners,T as registerCartIntegration,W as showBeamOrderPageWidgets,j as trackCart,i as utils};
2
2
  //# sourceMappingURL=shopify.js.map
package/dist/index.esm.js CHANGED
@@ -1,2 +1,2 @@
1
- import{i as N}from"./chunks/index-aGYbEHXq.esm.js";import{i as P}from"./chunks/index-tkKvWkzv.esm.js";import{i as S}from"./chunks/index-K9rDxqim.esm.js";import{i as V}from"./chunks/index-FAF7tYU6.esm.js";import"./components/community-impact.esm.js";import"./chunks/lit-yVXn5Cbs.esm.js";import"./chunks/progress-bar-7gWYaGlq.esm.js";import"./components/beam-partner-logos.esm.js";import"./chunks/localize-BGPniqcI.esm.js";import"./chunks/beam-errors-AMvTvR1C.esm.js";import"./utils/logger.esm.js";import"./chunks/routes-BI_HfQw6.esm.js";import"./chunks/css-card-grid-3b56QBzq.esm.js";import"./components/cumulative-impact.esm.js";import"./chunks/lodash-P8OIs-at.esm.js";import"./chunks/is-all-html-elements-SdSkxirh.esm.js";import"./components/impact-overview.esm.js";import"./chunks/vendor-eeJfrOkP.esm.js";import"./chunks/responsive-LYEag6TI.esm.js";import"./components/select-nonprofit.esm.js";import"./chunks/events-5IECSF-x.esm.js";import"./utils/network-listeners.esm.js";import"./utils/local-storage.esm.js";import"./utils/cookies.esm.js";import"./chunks/cart-contents-h60geKWa.esm.js";import"./components/redeem-transaction.esm.js";import"./components/post-purchase.esm.js";import"./chunks/index-uqEAgdEf.esm.js";import"./utils/wait-for-element.esm.js";import"./utils/remote-session.esm.js";import"./utils/memoize-last.esm.js";import"./chunks/index-TrsSwLUY.esm.js";import"./chunks/order-page-WaIEqUq2.esm.js";import"./chunks/update-cart-mTi4PVhz.esm.js";import"./chunks/index-9YcaEQju.esm.js";import"./chunks/index-oGO5HXSB.esm.js";import"./chunks/index-uBc0L0Qx.esm.js";import"./react/community-impact.esm.js";import"react";import"./react/cumulative-impact.esm.js";import"./react/impact-overview.esm.js";import"./react/select-nonprofit.esm.js";import"./react/redeem-transaction.esm.js";import"./react/post-purchase.esm.js";export{P as Integrations,S as ReactComponents,V as Utils,N as WebComponents};
1
+ import{i as N}from"./chunks/index-aGYbEHXq.esm.js";import{i as P}from"./chunks/index-Li9RyHWl.esm.js";import{i as S}from"./chunks/index-K9rDxqim.esm.js";import{i as V}from"./chunks/index-uqEAgdEf.esm.js";import"./components/community-impact.esm.js";import"./chunks/lit-yVXn5Cbs.esm.js";import"./chunks/progress-bar-7gWYaGlq.esm.js";import"./components/beam-partner-logos.esm.js";import"./chunks/localize-BGPniqcI.esm.js";import"./chunks/beam-errors-AMvTvR1C.esm.js";import"./utils/logger.esm.js";import"./chunks/routes-bWWE2fXp.esm.js";import"./chunks/css-card-grid-3b56QBzq.esm.js";import"./components/cumulative-impact.esm.js";import"./chunks/lodash-P8OIs-at.esm.js";import"./chunks/is-all-html-elements-SdSkxirh.esm.js";import"./components/impact-overview.esm.js";import"./chunks/vendor-eeJfrOkP.esm.js";import"./chunks/responsive-LYEag6TI.esm.js";import"./components/select-nonprofit.esm.js";import"./chunks/events-5IECSF-x.esm.js";import"./utils/network-listeners.esm.js";import"./utils/local-storage.esm.js";import"./utils/cookies.esm.js";import"./chunks/cart-contents-h60geKWa.esm.js";import"./components/redeem-transaction.esm.js";import"./components/post-purchase.esm.js";import"./chunks/index-FAF7tYU6.esm.js";import"./utils/wait-for-element.esm.js";import"./utils/remote-session.esm.js";import"./utils/memoize-last.esm.js";import"./chunks/index-LY8cCwxB.esm.js";import"./chunks/order-page-LMEdbSdq.esm.js";import"./chunks/update-cart-PflL_pK3.esm.js";import"./chunks/index-9YcaEQju.esm.js";import"./chunks/index-YoXRWj_4.esm.js";import"./chunks/index-JfA-djTR.esm.js";import"./react/community-impact.esm.js";import"react";import"./react/cumulative-impact.esm.js";import"./react/impact-overview.esm.js";import"./react/select-nonprofit.esm.js";import"./react/redeem-transaction.esm.js";import"./react/post-purchase.esm.js";export{P as Integrations,S as ReactComponents,V as Utils,N as WebComponents};
2
2
  //# sourceMappingURL=index.esm.js.map
package/dist/index.js CHANGED
@@ -1,2 +1,2 @@
1
- import{i as N}from"./chunks/index-bo9Yq4jd.esm.js";import{i as P}from"./chunks/index--ofShi8t.esm.js";import{i as S}from"./chunks/index-JL12lEnO.esm.js";import{i as V}from"./chunks/index-w9_XpjIg.esm.js";import"./components/community-impact.js";import"./chunks/lit-yVXn5Cbs.esm.js";import"./chunks/progress-bar-7gWYaGlq.esm.js";import"./components/beam-partner-logos.js";import"./chunks/localize-dXHrlK8g.esm.js";import"./chunks/beam-errors-AMvTvR1C.esm.js";import"./utils/logger.js";import"./chunks/routes-WbfYG9qp.esm.js";import"./chunks/css-card-grid-3b56QBzq.esm.js";import"./components/cumulative-impact.js";import"./chunks/lodash-P8OIs-at.esm.js";import"./chunks/is-all-html-elements-SdSkxirh.esm.js";import"./components/impact-overview.js";import"./chunks/vendor-eeJfrOkP.esm.js";import"./chunks/responsive-LYEag6TI.esm.js";import"./components/select-nonprofit.js";import"./chunks/events-5IECSF-x.esm.js";import"./utils/network-listeners.js";import"./utils/local-storage.js";import"./utils/cookies.js";import"./chunks/cart-contents-h60geKWa.esm.js";import"./components/redeem-transaction.js";import"./components/post-purchase.js";import"./chunks/index-rrdYIcOi.esm.js";import"./utils/wait-for-element.js";import"./utils/remote-session.js";import"./utils/memoize-last.js";import"./chunks/index-pHbZDTW0.esm.js";import"./chunks/order-page-PSfhnuaE.esm.js";import"./chunks/update-cart-hWMIlTUD.esm.js";import"./chunks/index-Z1UUeVXR.esm.js";import"./chunks/index-u8nTsn3I.esm.js";import"./chunks/index-vg7ClGPn.esm.js";import"./react/community-impact.js";import"react";import"./react/cumulative-impact.js";import"./react/impact-overview.js";import"./react/select-nonprofit.js";import"./react/redeem-transaction.js";import"./react/post-purchase.js";export{P as Integrations,S as ReactComponents,V as Utils,N as WebComponents};
1
+ import{i as N}from"./chunks/index-bo9Yq4jd.esm.js";import{i as P}from"./chunks/index-YfVtHaFO.esm.js";import{i as S}from"./chunks/index-JL12lEnO.esm.js";import{i as V}from"./chunks/index-rrdYIcOi.esm.js";import"./components/community-impact.js";import"./chunks/lit-yVXn5Cbs.esm.js";import"./chunks/progress-bar-7gWYaGlq.esm.js";import"./components/beam-partner-logos.js";import"./chunks/localize-dXHrlK8g.esm.js";import"./chunks/beam-errors-AMvTvR1C.esm.js";import"./utils/logger.js";import"./chunks/routes-h6eWTToy.esm.js";import"./chunks/css-card-grid-3b56QBzq.esm.js";import"./components/cumulative-impact.js";import"./chunks/lodash-P8OIs-at.esm.js";import"./chunks/is-all-html-elements-SdSkxirh.esm.js";import"./components/impact-overview.js";import"./chunks/vendor-eeJfrOkP.esm.js";import"./chunks/responsive-LYEag6TI.esm.js";import"./components/select-nonprofit.js";import"./chunks/events-5IECSF-x.esm.js";import"./utils/network-listeners.js";import"./utils/local-storage.js";import"./utils/cookies.js";import"./chunks/cart-contents-h60geKWa.esm.js";import"./components/redeem-transaction.js";import"./components/post-purchase.js";import"./chunks/index-w9_XpjIg.esm.js";import"./utils/wait-for-element.js";import"./utils/remote-session.js";import"./utils/memoize-last.js";import"./chunks/index-Fvk8qalO.esm.js";import"./chunks/order-page-sDLRWj-E.esm.js";import"./chunks/update-cart-k_Y-sCyt.esm.js";import"./chunks/index-Z1UUeVXR.esm.js";import"./chunks/index-D7cyvlBG.esm.js";import"./chunks/index-e6o8bmIt.esm.js";import"./react/community-impact.js";import"react";import"./react/cumulative-impact.js";import"./react/impact-overview.js";import"./react/select-nonprofit.js";import"./react/redeem-transaction.js";import"./react/post-purchase.js";export{P as Integrations,S as ReactComponents,V as Utils,N as WebComponents};
2
2
  //# sourceMappingURL=index.js.map
@@ -1,2 +1,2 @@
1
- import{D as u,a as g}from"../chunks/routes-BI_HfQw6.esm.js";import{S as y}from"../chunks/beam-errors-AMvTvR1C.esm.js";import{B as h}from"../chunks/events-5IECSF-x.esm.js";import{logger as w}from"../utils/logger.esm.js";import{s as f}from"../chunks/index-uBc0L0Qx.esm.js";var v=(t,s,a)=>{if(!s.has(t))throw TypeError("Cannot "+a)},c=(t,s,a)=>{if(s.has(t))throw TypeError("Cannot add the same private member more than once");s instanceof WeakSet?s.add(t):s.set(t,a)},i=(t,s,a)=>(v(t,s,"access private method"),a),r,n,o,m;let p,l;const E=new Promise((t,s)=>{p=t,l=s});class U extends EventTarget{constructor(s){super(),c(this,r),c(this,o),this.readyPromise=E,this.plugins={},this.status="pending",i(this,r,n).call(this,s)}async init(s){i(this,r,n).call(this,s);try{await i(this,o,m).call(this,s)}catch(a){const e=new y;throw e.cause=a,this.status="error",this.dispatchEvent(new h({status:"error",error:e})),l(e),w.error(e),this.apiKey&&await f({apiKey:this.apiKey,baseUrl:this.logUrl},{type:"error",code:e.name,metadata:{message:e.message,cause:a?.message}}),a}return this.status="ready",this.dispatchEvent(new h({status:"ready"})),p(!0),this}}r=new WeakSet,n=function(t){this.apiKey=t.apiKey,this.chainId=t.chainId,this.storeId=t.storeId,this.domain=t.domain,this.baseUrl=t.baseUrl||u,this.logUrl=t.logUrl||g},o=new WeakSet,m=async function(t){const s=(t.plugins||[]).map(async a=>(await a.init(t),this.plugins[a.name]=a,a));return Promise.all(s)};const d=new U({}),S=t=>d.init(t),L=()=>d;export{L as getConfig,S as init};
1
+ import{D as u,a as g}from"../chunks/routes-bWWE2fXp.esm.js";import{S as y}from"../chunks/beam-errors-AMvTvR1C.esm.js";import{B as h}from"../chunks/events-5IECSF-x.esm.js";import{logger as w}from"../utils/logger.esm.js";import{s as f}from"../chunks/index-JfA-djTR.esm.js";var v=(t,s,a)=>{if(!s.has(t))throw TypeError("Cannot "+a)},c=(t,s,a)=>{if(s.has(t))throw TypeError("Cannot add the same private member more than once");s instanceof WeakSet?s.add(t):s.set(t,a)},i=(t,s,a)=>(v(t,s,"access private method"),a),r,n,o,m;let p,l;const E=new Promise((t,s)=>{p=t,l=s});class U extends EventTarget{constructor(s){super(),c(this,r),c(this,o),this.readyPromise=E,this.plugins={},this.status="pending",i(this,r,n).call(this,s)}async init(s){i(this,r,n).call(this,s);try{await i(this,o,m).call(this,s)}catch(a){const e=new y;throw e.cause=a,this.status="error",this.dispatchEvent(new h({status:"error",error:e})),l(e),w.error(e),this.apiKey&&await f({apiKey:this.apiKey,baseUrl:this.logUrl},{type:"error",code:e.name,metadata:{message:e.message,cause:a?.message}}),a}return this.status="ready",this.dispatchEvent(new h({status:"ready"})),p(!0),this}}r=new WeakSet,n=function(t){this.apiKey=t.apiKey,this.chainId=t.chainId,this.storeId=t.storeId,this.domain=t.domain,this.baseUrl=t.baseUrl||u,this.logUrl=t.logUrl||g},o=new WeakSet,m=async function(t){const s=(t.plugins||[]).map(async a=>(await a.init(t),this.plugins[a.name]=a,a));return Promise.all(s)};const d=new U({}),S=t=>d.init(t),L=()=>d;export{L as getConfig,S as init};
2
2
  //# sourceMappingURL=beam.esm.js.map
@@ -1,2 +1,2 @@
1
- import{D as u,a as g}from"../chunks/routes-WbfYG9qp.esm.js";import{S as y}from"../chunks/beam-errors-AMvTvR1C.esm.js";import{B as h}from"../chunks/events-5IECSF-x.esm.js";import{logger as w}from"../utils/logger.js";import{s as f}from"../chunks/index-vg7ClGPn.esm.js";var v=(t,s,a)=>{if(!s.has(t))throw TypeError("Cannot "+a)},c=(t,s,a)=>{if(s.has(t))throw TypeError("Cannot add the same private member more than once");s instanceof WeakSet?s.add(t):s.set(t,a)},i=(t,s,a)=>(v(t,s,"access private method"),a),r,n,o,m;let p,l;const E=new Promise((t,s)=>{p=t,l=s});class U extends EventTarget{constructor(s){super(),c(this,r),c(this,o),this.readyPromise=E,this.plugins={},this.status="pending",i(this,r,n).call(this,s)}async init(s){i(this,r,n).call(this,s);try{await i(this,o,m).call(this,s)}catch(a){const e=new y;throw e.cause=a,this.status="error",this.dispatchEvent(new h({status:"error",error:e})),l(e),w.error(e),this.apiKey&&await f({apiKey:this.apiKey,baseUrl:this.logUrl},{type:"error",code:e.name,metadata:{message:e.message,cause:a?.message}}),a}return this.status="ready",this.dispatchEvent(new h({status:"ready"})),p(!0),this}}r=new WeakSet,n=function(t){this.apiKey=t.apiKey,this.chainId=t.chainId,this.storeId=t.storeId,this.domain=t.domain,this.baseUrl=t.baseUrl||u,this.logUrl=t.logUrl||g},o=new WeakSet,m=async function(t){const s=(t.plugins||[]).map(async a=>(await a.init(t),this.plugins[a.name]=a,a));return Promise.all(s)};const d=new U({}),S=t=>d.init(t),L=()=>d;export{L as getConfig,S as init};
1
+ import{D as u,a as g}from"../chunks/routes-h6eWTToy.esm.js";import{S as y}from"../chunks/beam-errors-AMvTvR1C.esm.js";import{B as h}from"../chunks/events-5IECSF-x.esm.js";import{logger as w}from"../utils/logger.js";import{s as f}from"../chunks/index-e6o8bmIt.esm.js";var v=(t,s,a)=>{if(!s.has(t))throw TypeError("Cannot "+a)},c=(t,s,a)=>{if(s.has(t))throw TypeError("Cannot add the same private member more than once");s instanceof WeakSet?s.add(t):s.set(t,a)},i=(t,s,a)=>(v(t,s,"access private method"),a),r,n,o,m;let p,l;const E=new Promise((t,s)=>{p=t,l=s});class U extends EventTarget{constructor(s){super(),c(this,r),c(this,o),this.readyPromise=E,this.plugins={},this.status="pending",i(this,r,n).call(this,s)}async init(s){i(this,r,n).call(this,s);try{await i(this,o,m).call(this,s)}catch(a){const e=new y;throw e.cause=a,this.status="error",this.dispatchEvent(new h({status:"error",error:e})),l(e),w.error(e),this.apiKey&&await f({apiKey:this.apiKey,baseUrl:this.logUrl},{type:"error",code:e.name,metadata:{message:e.message,cause:a?.message}}),a}return this.status="ready",this.dispatchEvent(new h({status:"ready"})),p(!0),this}}r=new WeakSet,n=function(t){this.apiKey=t.apiKey,this.chainId=t.chainId,this.storeId=t.storeId,this.domain=t.domain,this.baseUrl=t.baseUrl||u,this.logUrl=t.logUrl||g},o=new WeakSet,m=async function(t){const s=(t.plugins||[]).map(async a=>(await a.init(t),this.plugins[a.name]=a,a));return Promise.all(s)};const d=new U({}),S=t=>d.init(t),L=()=>d;export{L as getConfig,S as init};
2
2
  //# sourceMappingURL=beam.js.map
@@ -1,2 +1,2 @@
1
- import{x as C}from"../chunks/update-cart-mTi4PVhz.esm.js";import"../chunks/lodash-P8OIs-at.esm.js";import"../chunks/routes-BI_HfQw6.esm.js";import"../chunks/beam-errors-AMvTvR1C.esm.js";import"../utils/logger.esm.js";import"../chunks/events-5IECSF-x.esm.js";import"../utils/network-listeners.esm.js";import"../utils/local-storage.esm.js";import"../utils/cookies.esm.js";import"../utils/remote-session.esm.js";import"../utils/memoize-last.esm.js";import"../chunks/cart-contents-h60geKWa.esm.js";export{C as updateCart};
1
+ import{x as C}from"../chunks/update-cart-PflL_pK3.esm.js";import"../chunks/lodash-P8OIs-at.esm.js";import"../chunks/routes-bWWE2fXp.esm.js";import"../chunks/beam-errors-AMvTvR1C.esm.js";import"../utils/logger.esm.js";import"../chunks/events-5IECSF-x.esm.js";import"../utils/network-listeners.esm.js";import"../utils/local-storage.esm.js";import"../utils/cookies.esm.js";import"../utils/remote-session.esm.js";import"../utils/memoize-last.esm.js";import"../chunks/cart-contents-h60geKWa.esm.js";export{C as updateCart};
2
2
  //# sourceMappingURL=cart.esm.js.map
@@ -1,2 +1,2 @@
1
- import{x as C}from"../chunks/update-cart-hWMIlTUD.esm.js";import"../chunks/lodash-P8OIs-at.esm.js";import"../chunks/routes-WbfYG9qp.esm.js";import"../chunks/beam-errors-AMvTvR1C.esm.js";import"../utils/logger.js";import"../chunks/events-5IECSF-x.esm.js";import"../utils/network-listeners.js";import"../utils/local-storage.js";import"../utils/cookies.js";import"../utils/remote-session.js";import"../utils/memoize-last.js";import"../chunks/cart-contents-h60geKWa.esm.js";export{C as updateCart};
1
+ import{x as C}from"../chunks/update-cart-k_Y-sCyt.esm.js";import"../chunks/lodash-P8OIs-at.esm.js";import"../chunks/routes-h6eWTToy.esm.js";import"../chunks/beam-errors-AMvTvR1C.esm.js";import"../utils/logger.js";import"../chunks/events-5IECSF-x.esm.js";import"../utils/network-listeners.js";import"../utils/local-storage.js";import"../utils/cookies.js";import"../utils/remote-session.js";import"../utils/memoize-last.js";import"../chunks/cart-contents-h60geKWa.esm.js";export{C as updateCart};
2
2
  //# sourceMappingURL=cart.js.map
@@ -1,2 +1,2 @@
1
- import{i as v}from"../chunks/index-uqEAgdEf.esm.js";import{i as z}from"../chunks/index-TrsSwLUY.esm.js";import{i as B}from"../chunks/index-9YcaEQju.esm.js";import{i as E}from"../chunks/index-oGO5HXSB.esm.js";import{i as G}from"../chunks/index-uBc0L0Qx.esm.js";import"../chunks/beam-errors-AMvTvR1C.esm.js";import"../chunks/events-5IECSF-x.esm.js";import"../utils/logger.esm.js";import"../utils/network-listeners.esm.js";import"../utils/local-storage.esm.js";import"../utils/wait-for-element.esm.js";import"../utils/cookies.esm.js";import"../utils/remote-session.esm.js";import"../utils/memoize-last.esm.js";import"../chunks/lodash-P8OIs-at.esm.js";import"../chunks/order-page-WaIEqUq2.esm.js";import"../chunks/cart-contents-h60geKWa.esm.js";import"../chunks/update-cart-mTi4PVhz.esm.js";import"../chunks/routes-BI_HfQw6.esm.js";import"../components/post-purchase.esm.js";import"../chunks/lit-yVXn5Cbs.esm.js";import"../chunks/localize-BGPniqcI.esm.js";import"../components/redeem-transaction.esm.js";import"../chunks/progress-bar-7gWYaGlq.esm.js";import"../components/beam-partner-logos.esm.js";import"../chunks/css-card-grid-3b56QBzq.esm.js";import"../components/impact-overview.esm.js";import"../chunks/vendor-eeJfrOkP.esm.js";import"../chunks/is-all-html-elements-SdSkxirh.esm.js";import"../chunks/responsive-LYEag6TI.esm.js";export{E as Cart,G as Logs,B as Session,z as Shopify,v as Utils};
1
+ import{i as v}from"../chunks/index-FAF7tYU6.esm.js";import{i as z}from"../chunks/index-LY8cCwxB.esm.js";import{i as B}from"../chunks/index-9YcaEQju.esm.js";import{i as E}from"../chunks/index-YoXRWj_4.esm.js";import{i as G}from"../chunks/index-JfA-djTR.esm.js";import"../chunks/beam-errors-AMvTvR1C.esm.js";import"../chunks/events-5IECSF-x.esm.js";import"../utils/logger.esm.js";import"../utils/network-listeners.esm.js";import"../utils/local-storage.esm.js";import"../utils/wait-for-element.esm.js";import"../utils/cookies.esm.js";import"../utils/remote-session.esm.js";import"../utils/memoize-last.esm.js";import"../chunks/lodash-P8OIs-at.esm.js";import"../chunks/order-page-LMEdbSdq.esm.js";import"../chunks/cart-contents-h60geKWa.esm.js";import"../chunks/update-cart-PflL_pK3.esm.js";import"../chunks/routes-bWWE2fXp.esm.js";import"../components/post-purchase.esm.js";import"../chunks/lit-yVXn5Cbs.esm.js";import"../chunks/localize-BGPniqcI.esm.js";import"../components/redeem-transaction.esm.js";import"../chunks/progress-bar-7gWYaGlq.esm.js";import"../components/beam-partner-logos.esm.js";import"../chunks/css-card-grid-3b56QBzq.esm.js";import"../components/impact-overview.esm.js";import"../chunks/vendor-eeJfrOkP.esm.js";import"../chunks/is-all-html-elements-SdSkxirh.esm.js";import"../chunks/responsive-LYEag6TI.esm.js";export{E as Cart,G as Logs,B as Session,z as Shopify,v as Utils};
2
2
  //# sourceMappingURL=index.esm.js.map
@@ -1,2 +1,2 @@
1
- import{i as v}from"../chunks/index-rrdYIcOi.esm.js";import{i as z}from"../chunks/index-pHbZDTW0.esm.js";import{i as B}from"../chunks/index-Z1UUeVXR.esm.js";import{i as E}from"../chunks/index-u8nTsn3I.esm.js";import{i as G}from"../chunks/index-vg7ClGPn.esm.js";import"../chunks/beam-errors-AMvTvR1C.esm.js";import"../chunks/events-5IECSF-x.esm.js";import"../utils/logger.js";import"../utils/network-listeners.js";import"../utils/local-storage.js";import"../utils/wait-for-element.js";import"../utils/cookies.js";import"../utils/remote-session.js";import"../utils/memoize-last.js";import"../chunks/lodash-P8OIs-at.esm.js";import"../chunks/order-page-PSfhnuaE.esm.js";import"../chunks/cart-contents-h60geKWa.esm.js";import"../chunks/update-cart-hWMIlTUD.esm.js";import"../chunks/routes-WbfYG9qp.esm.js";import"../components/post-purchase.js";import"../chunks/lit-yVXn5Cbs.esm.js";import"../chunks/localize-dXHrlK8g.esm.js";import"../components/redeem-transaction.js";import"../chunks/progress-bar-7gWYaGlq.esm.js";import"../components/beam-partner-logos.js";import"../chunks/css-card-grid-3b56QBzq.esm.js";import"../components/impact-overview.js";import"../chunks/vendor-eeJfrOkP.esm.js";import"../chunks/is-all-html-elements-SdSkxirh.esm.js";import"../chunks/responsive-LYEag6TI.esm.js";export{E as Cart,G as Logs,B as Session,z as Shopify,v as Utils};
1
+ import{i as v}from"../chunks/index-w9_XpjIg.esm.js";import{i as z}from"../chunks/index-Fvk8qalO.esm.js";import{i as B}from"../chunks/index-Z1UUeVXR.esm.js";import{i as E}from"../chunks/index-D7cyvlBG.esm.js";import{i as G}from"../chunks/index-e6o8bmIt.esm.js";import"../chunks/beam-errors-AMvTvR1C.esm.js";import"../chunks/events-5IECSF-x.esm.js";import"../utils/logger.js";import"../utils/network-listeners.js";import"../utils/local-storage.js";import"../utils/wait-for-element.js";import"../utils/cookies.js";import"../utils/remote-session.js";import"../utils/memoize-last.js";import"../chunks/lodash-P8OIs-at.esm.js";import"../chunks/order-page-sDLRWj-E.esm.js";import"../chunks/cart-contents-h60geKWa.esm.js";import"../chunks/update-cart-k_Y-sCyt.esm.js";import"../chunks/routes-h6eWTToy.esm.js";import"../components/post-purchase.js";import"../chunks/lit-yVXn5Cbs.esm.js";import"../chunks/localize-dXHrlK8g.esm.js";import"../components/redeem-transaction.js";import"../chunks/progress-bar-7gWYaGlq.esm.js";import"../components/beam-partner-logos.js";import"../chunks/css-card-grid-3b56QBzq.esm.js";import"../components/impact-overview.js";import"../chunks/vendor-eeJfrOkP.esm.js";import"../chunks/is-all-html-elements-SdSkxirh.esm.js";import"../chunks/responsive-LYEag6TI.esm.js";export{E as Cart,G as Logs,B as Session,z as Shopify,v as Utils};
2
2
  //# sourceMappingURL=index.js.map
@@ -1,2 +1,2 @@
1
- import"../chunks/routes-BI_HfQw6.esm.js";import"../utils/logger.esm.js";import{s as i}from"../chunks/index-uBc0L0Qx.esm.js";import"../chunks/beam-errors-AMvTvR1C.esm.js";export{i as sendLog};
1
+ import"../chunks/routes-bWWE2fXp.esm.js";import"../utils/logger.esm.js";import{s as i}from"../chunks/index-JfA-djTR.esm.js";import"../chunks/beam-errors-AMvTvR1C.esm.js";export{i as sendLog};
2
2
  //# sourceMappingURL=logs.esm.js.map
@@ -1,2 +1,2 @@
1
- import"../chunks/routes-WbfYG9qp.esm.js";import"../utils/logger.js";import{s as i}from"../chunks/index-vg7ClGPn.esm.js";import"../chunks/beam-errors-AMvTvR1C.esm.js";export{i as sendLog};
1
+ import"../chunks/routes-h6eWTToy.esm.js";import"../utils/logger.js";import{s as i}from"../chunks/index-e6o8bmIt.esm.js";import"../chunks/beam-errors-AMvTvR1C.esm.js";export{i as sendLog};
2
2
  //# sourceMappingURL=logs.js.map
@@ -1,2 +1,2 @@
1
- import{h as P,C as T,A as W,s as j,N as l}from"../chunks/order-page-WaIEqUq2.esm.js";import"../chunks/lodash-P8OIs-at.esm.js";import"../chunks/events-5IECSF-x.esm.js";import"../utils/network-listeners.esm.js";import"../utils/local-storage.esm.js";import"../chunks/beam-errors-AMvTvR1C.esm.js";import"../utils/cookies.esm.js";import"../utils/memoize-last.esm.js";import"../chunks/cart-contents-h60geKWa.esm.js";import"../chunks/update-cart-mTi4PVhz.esm.js";import"../chunks/routes-BI_HfQw6.esm.js";import"../utils/logger.esm.js";import"../utils/remote-session.esm.js";import"../components/post-purchase.esm.js";import"../chunks/lit-yVXn5Cbs.esm.js";import"../chunks/localize-BGPniqcI.esm.js";import"../components/redeem-transaction.esm.js";import"../chunks/progress-bar-7gWYaGlq.esm.js";import"../components/beam-partner-logos.esm.js";import"../chunks/css-card-grid-3b56QBzq.esm.js";import"../components/impact-overview.esm.js";import"../chunks/vendor-eeJfrOkP.esm.js";import"../chunks/is-all-html-elements-SdSkxirh.esm.js";import"../chunks/responsive-LYEag6TI.esm.js";import"../utils/wait-for-element.esm.js";export{P as addBeamAttributesToCart,T as getCurrentCart,W as registerCartIntegration,j as showBeamOrderPageWidgets,l as trackCart};
1
+ import{h as P,C as T,O as W,s as j,L as l}from"../chunks/order-page-LMEdbSdq.esm.js";import"../chunks/lodash-P8OIs-at.esm.js";import"../chunks/events-5IECSF-x.esm.js";import"../utils/network-listeners.esm.js";import"../utils/local-storage.esm.js";import"../chunks/beam-errors-AMvTvR1C.esm.js";import"../utils/cookies.esm.js";import"../utils/memoize-last.esm.js";import"../chunks/cart-contents-h60geKWa.esm.js";import"../chunks/update-cart-PflL_pK3.esm.js";import"../chunks/routes-bWWE2fXp.esm.js";import"../utils/logger.esm.js";import"../utils/remote-session.esm.js";import"../components/post-purchase.esm.js";import"../chunks/lit-yVXn5Cbs.esm.js";import"../chunks/localize-BGPniqcI.esm.js";import"../components/redeem-transaction.esm.js";import"../chunks/progress-bar-7gWYaGlq.esm.js";import"../components/beam-partner-logos.esm.js";import"../chunks/css-card-grid-3b56QBzq.esm.js";import"../components/impact-overview.esm.js";import"../chunks/vendor-eeJfrOkP.esm.js";import"../chunks/is-all-html-elements-SdSkxirh.esm.js";import"../chunks/responsive-LYEag6TI.esm.js";import"../utils/wait-for-element.esm.js";export{P as addBeamAttributesToCart,T as getCurrentCart,W as registerCartIntegration,j as showBeamOrderPageWidgets,l as trackCart};
2
2
  //# sourceMappingURL=shopify.esm.js.map
@@ -1,2 +1,2 @@
1
- import{h as P,C as T,A as W,s as j,N as l}from"../chunks/order-page-PSfhnuaE.esm.js";import"../chunks/lodash-P8OIs-at.esm.js";import"../chunks/events-5IECSF-x.esm.js";import"../utils/network-listeners.js";import"../utils/local-storage.js";import"../chunks/beam-errors-AMvTvR1C.esm.js";import"../utils/cookies.js";import"../utils/memoize-last.js";import"../chunks/cart-contents-h60geKWa.esm.js";import"../chunks/update-cart-hWMIlTUD.esm.js";import"../chunks/routes-WbfYG9qp.esm.js";import"../utils/logger.js";import"../utils/remote-session.js";import"../components/post-purchase.js";import"../chunks/lit-yVXn5Cbs.esm.js";import"../chunks/localize-dXHrlK8g.esm.js";import"../components/redeem-transaction.js";import"../chunks/progress-bar-7gWYaGlq.esm.js";import"../components/beam-partner-logos.js";import"../chunks/css-card-grid-3b56QBzq.esm.js";import"../components/impact-overview.js";import"../chunks/vendor-eeJfrOkP.esm.js";import"../chunks/is-all-html-elements-SdSkxirh.esm.js";import"../chunks/responsive-LYEag6TI.esm.js";import"../utils/wait-for-element.js";export{P as addBeamAttributesToCart,T as getCurrentCart,W as registerCartIntegration,j as showBeamOrderPageWidgets,l as trackCart};
1
+ import{h as P,C as T,O as W,s as j,L as l}from"../chunks/order-page-sDLRWj-E.esm.js";import"../chunks/lodash-P8OIs-at.esm.js";import"../chunks/events-5IECSF-x.esm.js";import"../utils/network-listeners.js";import"../utils/local-storage.js";import"../chunks/beam-errors-AMvTvR1C.esm.js";import"../utils/cookies.js";import"../utils/memoize-last.js";import"../chunks/cart-contents-h60geKWa.esm.js";import"../chunks/update-cart-k_Y-sCyt.esm.js";import"../chunks/routes-h6eWTToy.esm.js";import"../utils/logger.js";import"../utils/remote-session.js";import"../components/post-purchase.js";import"../chunks/lit-yVXn5Cbs.esm.js";import"../chunks/localize-dXHrlK8g.esm.js";import"../components/redeem-transaction.js";import"../chunks/progress-bar-7gWYaGlq.esm.js";import"../components/beam-partner-logos.js";import"../chunks/css-card-grid-3b56QBzq.esm.js";import"../components/impact-overview.js";import"../chunks/vendor-eeJfrOkP.esm.js";import"../chunks/is-all-html-elements-SdSkxirh.esm.js";import"../chunks/responsive-LYEag6TI.esm.js";import"../utils/wait-for-element.js";export{P as addBeamAttributesToCart,T as getCurrentCart,W as registerCartIntegration,j as showBeamOrderPageWidgets,l as trackCart};
2
2
  //# sourceMappingURL=shopify.js.map
@@ -1,4 +1,4 @@
1
- import{p as R}from"../chunks/routes-BI_HfQw6.esm.js";import{B as M}from"../chunks/cart-contents-h60geKWa.esm.js";import{a as D,b as O,c as W}from"../chunks/events-5IECSF-x.esm.js";import{B as m}from"../chunks/beam-errors-AMvTvR1C.esm.js";import{getCookieValue as f,setCookieValue as $}from"../utils/cookies.esm.js";import{logger as C}from"../utils/logger.esm.js";import{saveRemoteSession as K}from"../utils/remote-session.esm.js";import"../utils/local-storage.esm.js";var w=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)},d=(e,t,i)=>(w(e,t,"read from private field"),i?i.call(e):t.get(e)),n=(e,t,i)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,i)},_=(e,t,i,s)=>(w(e,t,"write to private field"),s?s.call(e,i):t.set(e,i),i),r=(e,t,i)=>(w(e,t,"access private method"),i),h,c,E,T,b,A,l,v,B,g,S,y,L,I,k;const P=4,j=`https://cdn.jsdelivr.net/npm/statsig-js@${P}/build/statsig-prod-web-sdk.min.js`,x="beam_statsig_session_id",o="data-beam-visibility",z="beam-sync-visibility",p={STATSIG_INIT:"statsig_init",CART_CREATED:"cart_created",ORDER_CREATED:"order_created",BEAM_SELECTION:"beam_selection"};class G{constructor(t){n(this,E),n(this,b),n(this,v),n(this,g),n(this,y),n(this,I),this.name="statsig",this.experiments={shouldShowBeam:!1,isLoggingEnabled:!0},n(this,h,void 0),n(this,c,void 0),n(this,l,[]),this.statsigApiKey=t.statsigApiKey}async init(t){_(this,h,t),r(this,E,T).call(this),r(this,g,S).call(this,"hide");const i=document.createElement("style");if(i.innerHTML=`
1
+ import{p as R}from"../chunks/routes-bWWE2fXp.esm.js";import{B as M}from"../chunks/cart-contents-h60geKWa.esm.js";import{a as D,b as O,c as W}from"../chunks/events-5IECSF-x.esm.js";import{B as m}from"../chunks/beam-errors-AMvTvR1C.esm.js";import{getCookieValue as f,setCookieValue as $}from"../utils/cookies.esm.js";import{logger as C}from"../utils/logger.esm.js";import{saveRemoteSession as K}from"../utils/remote-session.esm.js";import"../utils/local-storage.esm.js";var w=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)},d=(e,t,i)=>(w(e,t,"read from private field"),i?i.call(e):t.get(e)),n=(e,t,i)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,i)},_=(e,t,i,s)=>(w(e,t,"write to private field"),s?s.call(e,i):t.set(e,i),i),r=(e,t,i)=>(w(e,t,"access private method"),i),h,c,E,T,b,A,l,v,B,g,S,y,L,I,k;const P=4,j=`https://cdn.jsdelivr.net/npm/statsig-js@${P}/build/statsig-prod-web-sdk.min.js`,x="beam_statsig_session_id",o="data-beam-visibility",z="beam-sync-visibility",p={STATSIG_INIT:"statsig_init",CART_CREATED:"cart_created",ORDER_CREATED:"order_created",BEAM_SELECTION:"beam_selection"};class G{constructor(t){n(this,E),n(this,b),n(this,v),n(this,g),n(this,y),n(this,I),this.name="statsig",this.experiments={shouldShowBeam:!1,isLoggingEnabled:!0},n(this,h,void 0),n(this,c,void 0),n(this,l,[]),this.statsigApiKey=t.statsigApiKey}async init(t){_(this,h,t),r(this,E,T).call(this),r(this,g,S).call(this,"hide");const i=document.createElement("style");if(i.innerHTML=`
2
2
  [${o}="hide"] beam-select-nonprofit,
3
3
  [${o}="hide"] beam-post-purchase,
4
4
  [${o}="hide"] beam-redeem-transaction,
@@ -1,4 +1,4 @@
1
- import{p as R}from"../chunks/routes-WbfYG9qp.esm.js";import{B as M}from"../chunks/cart-contents-h60geKWa.esm.js";import{a as D,b as O,c as W}from"../chunks/events-5IECSF-x.esm.js";import{B as m}from"../chunks/beam-errors-AMvTvR1C.esm.js";import{getCookieValue as f,setCookieValue as $}from"../utils/cookies.js";import{logger as C}from"../utils/logger.js";import{saveRemoteSession as K}from"../utils/remote-session.js";import"../utils/local-storage.js";var w=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)},d=(e,t,i)=>(w(e,t,"read from private field"),i?i.call(e):t.get(e)),n=(e,t,i)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,i)},_=(e,t,i,s)=>(w(e,t,"write to private field"),s?s.call(e,i):t.set(e,i),i),r=(e,t,i)=>(w(e,t,"access private method"),i),h,c,E,T,b,A,l,v,B,g,S,y,L,I,k;const P=4,j=`https://cdn.jsdelivr.net/npm/statsig-js@${P}/build/statsig-prod-web-sdk.min.js`,x="beam_statsig_session_id",o="data-beam-visibility",z="beam-sync-visibility",p={STATSIG_INIT:"statsig_init",CART_CREATED:"cart_created",ORDER_CREATED:"order_created",BEAM_SELECTION:"beam_selection"};class G{constructor(t){n(this,E),n(this,b),n(this,v),n(this,g),n(this,y),n(this,I),this.name="statsig",this.experiments={shouldShowBeam:!1,isLoggingEnabled:!0},n(this,h,void 0),n(this,c,void 0),n(this,l,[]),this.statsigApiKey=t.statsigApiKey}async init(t){_(this,h,t),r(this,E,T).call(this),r(this,g,S).call(this,"hide");const i=document.createElement("style");if(i.innerHTML=`
1
+ import{p as R}from"../chunks/routes-h6eWTToy.esm.js";import{B as M}from"../chunks/cart-contents-h60geKWa.esm.js";import{a as D,b as O,c as W}from"../chunks/events-5IECSF-x.esm.js";import{B as m}from"../chunks/beam-errors-AMvTvR1C.esm.js";import{getCookieValue as f,setCookieValue as $}from"../utils/cookies.js";import{logger as C}from"../utils/logger.js";import{saveRemoteSession as K}from"../utils/remote-session.js";import"../utils/local-storage.js";var w=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)},d=(e,t,i)=>(w(e,t,"read from private field"),i?i.call(e):t.get(e)),n=(e,t,i)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,i)},_=(e,t,i,s)=>(w(e,t,"write to private field"),s?s.call(e,i):t.set(e,i),i),r=(e,t,i)=>(w(e,t,"access private method"),i),h,c,E,T,b,A,l,v,B,g,S,y,L,I,k;const P=4,j=`https://cdn.jsdelivr.net/npm/statsig-js@${P}/build/statsig-prod-web-sdk.min.js`,x="beam_statsig_session_id",o="data-beam-visibility",z="beam-sync-visibility",p={STATSIG_INIT:"statsig_init",CART_CREATED:"cart_created",ORDER_CREATED:"order_created",BEAM_SELECTION:"beam_selection"};class G{constructor(t){n(this,E),n(this,b),n(this,v),n(this,g),n(this,y),n(this,I),this.name="statsig",this.experiments={shouldShowBeam:!1,isLoggingEnabled:!0},n(this,h,void 0),n(this,c,void 0),n(this,l,[]),this.statsigApiKey=t.statsigApiKey}async init(t){_(this,h,t),r(this,E,T).call(this),r(this,g,S).call(this,"hide");const i=document.createElement("style");if(i.innerHTML=`
2
2
  [${o}="hide"] beam-select-nonprofit,
3
3
  [${o}="hide"] beam-post-purchase,
4
4
  [${o}="hide"] beam-redeem-transaction,
@@ -1,2 +1,2 @@
1
- import o from"react";import{l as a}from"../chunks/lit-yVXn5Cbs.esm.js";import{BeamCommunityImpact as m}from"../components/community-impact.esm.js";import"../chunks/progress-bar-7gWYaGlq.esm.js";import"../components/beam-partner-logos.esm.js";import"../chunks/localize-BGPniqcI.esm.js";import"../chunks/beam-errors-AMvTvR1C.esm.js";import"../utils/logger.esm.js";import"../chunks/routes-BI_HfQw6.esm.js";import"../chunks/css-card-grid-3b56QBzq.esm.js";const t=a({tagName:m.tagName,elementClass:m,react:o,events:{}});export{t as BeamCommunityImpact,t as default};
1
+ import o from"react";import{l as a}from"../chunks/lit-yVXn5Cbs.esm.js";import{BeamCommunityImpact as m}from"../components/community-impact.esm.js";import"../chunks/progress-bar-7gWYaGlq.esm.js";import"../components/beam-partner-logos.esm.js";import"../chunks/localize-BGPniqcI.esm.js";import"../chunks/beam-errors-AMvTvR1C.esm.js";import"../utils/logger.esm.js";import"../chunks/routes-bWWE2fXp.esm.js";import"../chunks/css-card-grid-3b56QBzq.esm.js";const t=a({tagName:m.tagName,elementClass:m,react:o,events:{}});export{t as BeamCommunityImpact,t as default};
2
2
  //# sourceMappingURL=community-impact.esm.js.map
@@ -1,2 +1,2 @@
1
- import o from"react";import{l as a}from"../chunks/lit-yVXn5Cbs.esm.js";import{BeamCommunityImpact as m}from"../components/community-impact.js";import"../chunks/progress-bar-7gWYaGlq.esm.js";import"../components/beam-partner-logos.js";import"../chunks/localize-dXHrlK8g.esm.js";import"../chunks/beam-errors-AMvTvR1C.esm.js";import"../utils/logger.js";import"../chunks/routes-WbfYG9qp.esm.js";import"../chunks/css-card-grid-3b56QBzq.esm.js";const t=a({tagName:m.tagName,elementClass:m,react:o,events:{}});export{t as BeamCommunityImpact,t as default};
1
+ import o from"react";import{l as a}from"../chunks/lit-yVXn5Cbs.esm.js";import{BeamCommunityImpact as m}from"../components/community-impact.js";import"../chunks/progress-bar-7gWYaGlq.esm.js";import"../components/beam-partner-logos.js";import"../chunks/localize-dXHrlK8g.esm.js";import"../chunks/beam-errors-AMvTvR1C.esm.js";import"../utils/logger.js";import"../chunks/routes-h6eWTToy.esm.js";import"../chunks/css-card-grid-3b56QBzq.esm.js";const t=a({tagName:m.tagName,elementClass:m,react:o,events:{}});export{t as BeamCommunityImpact,t as default};
2
2
  //# sourceMappingURL=community-impact.js.map
@@ -1,2 +1,2 @@
1
- import a from"react";import{l as e}from"../chunks/lit-yVXn5Cbs.esm.js";import{BeamCumulativeImpact as m}from"../components/cumulative-impact.esm.js";import"../chunks/lodash-P8OIs-at.esm.js";import"../chunks/localize-BGPniqcI.esm.js";import"../chunks/beam-errors-AMvTvR1C.esm.js";import"../utils/logger.esm.js";import"../chunks/routes-BI_HfQw6.esm.js";import"../chunks/is-all-html-elements-SdSkxirh.esm.js";const t=e({tagName:m.tagName,elementClass:m,react:a,events:{}});export{t as BeamCumulativeImpact,t as default};
1
+ import a from"react";import{l as e}from"../chunks/lit-yVXn5Cbs.esm.js";import{BeamCumulativeImpact as m}from"../components/cumulative-impact.esm.js";import"../chunks/lodash-P8OIs-at.esm.js";import"../chunks/localize-BGPniqcI.esm.js";import"../chunks/beam-errors-AMvTvR1C.esm.js";import"../utils/logger.esm.js";import"../chunks/routes-bWWE2fXp.esm.js";import"../chunks/is-all-html-elements-SdSkxirh.esm.js";const t=e({tagName:m.tagName,elementClass:m,react:a,events:{}});export{t as BeamCumulativeImpact,t as default};
2
2
  //# sourceMappingURL=cumulative-impact.esm.js.map
@@ -1,2 +1,2 @@
1
- import a from"react";import{l as e}from"../chunks/lit-yVXn5Cbs.esm.js";import{BeamCumulativeImpact as m}from"../components/cumulative-impact.js";import"../chunks/lodash-P8OIs-at.esm.js";import"../chunks/localize-dXHrlK8g.esm.js";import"../chunks/beam-errors-AMvTvR1C.esm.js";import"../utils/logger.js";import"../chunks/routes-WbfYG9qp.esm.js";import"../chunks/is-all-html-elements-SdSkxirh.esm.js";const t=e({tagName:m.tagName,elementClass:m,react:a,events:{}});export{t as BeamCumulativeImpact,t as default};
1
+ import a from"react";import{l as e}from"../chunks/lit-yVXn5Cbs.esm.js";import{BeamCumulativeImpact as m}from"../components/cumulative-impact.js";import"../chunks/lodash-P8OIs-at.esm.js";import"../chunks/localize-dXHrlK8g.esm.js";import"../chunks/beam-errors-AMvTvR1C.esm.js";import"../utils/logger.js";import"../chunks/routes-h6eWTToy.esm.js";import"../chunks/is-all-html-elements-SdSkxirh.esm.js";const t=e({tagName:m.tagName,elementClass:m,react:a,events:{}});export{t as BeamCumulativeImpact,t as default};
2
2
  //# sourceMappingURL=cumulative-impact.js.map
@@ -1,2 +1,2 @@
1
- import r from"react";import{l as e}from"../chunks/lit-yVXn5Cbs.esm.js";import{BeamImpactOverview as m}from"../components/impact-overview.esm.js";import"../chunks/lodash-P8OIs-at.esm.js";import"../chunks/routes-BI_HfQw6.esm.js";import"../chunks/beam-errors-AMvTvR1C.esm.js";import"../utils/logger.esm.js";import"../chunks/progress-bar-7gWYaGlq.esm.js";import"../chunks/localize-BGPniqcI.esm.js";import"../chunks/vendor-eeJfrOkP.esm.js";import"../chunks/is-all-html-elements-SdSkxirh.esm.js";import"../components/beam-partner-logos.esm.js";import"../chunks/responsive-LYEag6TI.esm.js";const t=e({tagName:m.tagName,elementClass:m,react:r,events:{}});export{t as BeamImpactOverview,t as default};
1
+ import r from"react";import{l as e}from"../chunks/lit-yVXn5Cbs.esm.js";import{BeamImpactOverview as m}from"../components/impact-overview.esm.js";import"../chunks/lodash-P8OIs-at.esm.js";import"../chunks/routes-bWWE2fXp.esm.js";import"../chunks/beam-errors-AMvTvR1C.esm.js";import"../utils/logger.esm.js";import"../chunks/progress-bar-7gWYaGlq.esm.js";import"../chunks/localize-BGPniqcI.esm.js";import"../chunks/vendor-eeJfrOkP.esm.js";import"../chunks/is-all-html-elements-SdSkxirh.esm.js";import"../components/beam-partner-logos.esm.js";import"../chunks/responsive-LYEag6TI.esm.js";const t=e({tagName:m.tagName,elementClass:m,react:r,events:{}});export{t as BeamImpactOverview,t as default};
2
2
  //# sourceMappingURL=impact-overview.esm.js.map
@@ -1,2 +1,2 @@
1
- import r from"react";import{l as e}from"../chunks/lit-yVXn5Cbs.esm.js";import{BeamImpactOverview as m}from"../components/impact-overview.js";import"../chunks/lodash-P8OIs-at.esm.js";import"../chunks/routes-WbfYG9qp.esm.js";import"../chunks/beam-errors-AMvTvR1C.esm.js";import"../utils/logger.js";import"../chunks/progress-bar-7gWYaGlq.esm.js";import"../chunks/localize-dXHrlK8g.esm.js";import"../chunks/vendor-eeJfrOkP.esm.js";import"../chunks/is-all-html-elements-SdSkxirh.esm.js";import"../components/beam-partner-logos.js";import"../chunks/responsive-LYEag6TI.esm.js";const t=e({tagName:m.tagName,elementClass:m,react:r,events:{}});export{t as BeamImpactOverview,t as default};
1
+ import r from"react";import{l as e}from"../chunks/lit-yVXn5Cbs.esm.js";import{BeamImpactOverview as m}from"../components/impact-overview.js";import"../chunks/lodash-P8OIs-at.esm.js";import"../chunks/routes-h6eWTToy.esm.js";import"../chunks/beam-errors-AMvTvR1C.esm.js";import"../utils/logger.js";import"../chunks/progress-bar-7gWYaGlq.esm.js";import"../chunks/localize-dXHrlK8g.esm.js";import"../chunks/vendor-eeJfrOkP.esm.js";import"../chunks/is-all-html-elements-SdSkxirh.esm.js";import"../components/beam-partner-logos.js";import"../chunks/responsive-LYEag6TI.esm.js";const t=e({tagName:m.tagName,elementClass:m,react:r,events:{}});export{t as BeamImpactOverview,t as default};
2
2
  //# sourceMappingURL=impact-overview.js.map
@@ -1,2 +1,2 @@
1
- import{BeamCommunityImpact as R}from"./community-impact.esm.js";import{BeamCumulativeImpact as T}from"./cumulative-impact.esm.js";import{BeamImpactOverview as g}from"./impact-overview.esm.js";import{BeamSelectNonprofit as k}from"./select-nonprofit.esm.js";import{BeamRedeemTransaction as z}from"./redeem-transaction.esm.js";import{BeamPostPurchase as D}from"./post-purchase.esm.js";import"react";import"../chunks/lit-yVXn5Cbs.esm.js";import"../components/community-impact.esm.js";import"../chunks/progress-bar-7gWYaGlq.esm.js";import"../components/beam-partner-logos.esm.js";import"../chunks/localize-BGPniqcI.esm.js";import"../chunks/beam-errors-AMvTvR1C.esm.js";import"../utils/logger.esm.js";import"../chunks/routes-BI_HfQw6.esm.js";import"../chunks/css-card-grid-3b56QBzq.esm.js";import"../components/cumulative-impact.esm.js";import"../chunks/lodash-P8OIs-at.esm.js";import"../chunks/is-all-html-elements-SdSkxirh.esm.js";import"../components/impact-overview.esm.js";import"../chunks/vendor-eeJfrOkP.esm.js";import"../chunks/responsive-LYEag6TI.esm.js";import"../chunks/events-5IECSF-x.esm.js";import"../components/select-nonprofit.esm.js";import"../utils/network-listeners.esm.js";import"../utils/local-storage.esm.js";import"../utils/cookies.esm.js";import"../chunks/cart-contents-h60geKWa.esm.js";import"../components/redeem-transaction.esm.js";import"../components/post-purchase.esm.js";export{R as BeamCommunityImpact,T as BeamCumulativeImpact,g as BeamImpactOverview,D as BeamPostPurchase,z as BeamRedeemTransaction,k as BeamSelectNonprofit};
1
+ import{BeamCommunityImpact as R}from"./community-impact.esm.js";import{BeamCumulativeImpact as T}from"./cumulative-impact.esm.js";import{BeamImpactOverview as g}from"./impact-overview.esm.js";import{BeamSelectNonprofit as k}from"./select-nonprofit.esm.js";import{BeamRedeemTransaction as z}from"./redeem-transaction.esm.js";import{BeamPostPurchase as D}from"./post-purchase.esm.js";import"react";import"../chunks/lit-yVXn5Cbs.esm.js";import"../components/community-impact.esm.js";import"../chunks/progress-bar-7gWYaGlq.esm.js";import"../components/beam-partner-logos.esm.js";import"../chunks/localize-BGPniqcI.esm.js";import"../chunks/beam-errors-AMvTvR1C.esm.js";import"../utils/logger.esm.js";import"../chunks/routes-bWWE2fXp.esm.js";import"../chunks/css-card-grid-3b56QBzq.esm.js";import"../components/cumulative-impact.esm.js";import"../chunks/lodash-P8OIs-at.esm.js";import"../chunks/is-all-html-elements-SdSkxirh.esm.js";import"../components/impact-overview.esm.js";import"../chunks/vendor-eeJfrOkP.esm.js";import"../chunks/responsive-LYEag6TI.esm.js";import"../chunks/events-5IECSF-x.esm.js";import"../components/select-nonprofit.esm.js";import"../utils/network-listeners.esm.js";import"../utils/local-storage.esm.js";import"../utils/cookies.esm.js";import"../chunks/cart-contents-h60geKWa.esm.js";import"../components/redeem-transaction.esm.js";import"../components/post-purchase.esm.js";export{R as BeamCommunityImpact,T as BeamCumulativeImpact,g as BeamImpactOverview,D as BeamPostPurchase,z as BeamRedeemTransaction,k as BeamSelectNonprofit};
2
2
  //# sourceMappingURL=index.esm.js.map
@@ -1,2 +1,2 @@
1
- import{BeamCommunityImpact as R}from"./community-impact.js";import{BeamCumulativeImpact as T}from"./cumulative-impact.js";import{BeamImpactOverview as g}from"./impact-overview.js";import{BeamSelectNonprofit as k}from"./select-nonprofit.js";import{BeamRedeemTransaction as z}from"./redeem-transaction.js";import{BeamPostPurchase as D}from"./post-purchase.js";import"react";import"../chunks/lit-yVXn5Cbs.esm.js";import"../components/community-impact.js";import"../chunks/progress-bar-7gWYaGlq.esm.js";import"../components/beam-partner-logos.js";import"../chunks/localize-dXHrlK8g.esm.js";import"../chunks/beam-errors-AMvTvR1C.esm.js";import"../utils/logger.js";import"../chunks/routes-WbfYG9qp.esm.js";import"../chunks/css-card-grid-3b56QBzq.esm.js";import"../components/cumulative-impact.js";import"../chunks/lodash-P8OIs-at.esm.js";import"../chunks/is-all-html-elements-SdSkxirh.esm.js";import"../components/impact-overview.js";import"../chunks/vendor-eeJfrOkP.esm.js";import"../chunks/responsive-LYEag6TI.esm.js";import"../chunks/events-5IECSF-x.esm.js";import"../components/select-nonprofit.js";import"../utils/network-listeners.js";import"../utils/local-storage.js";import"../utils/cookies.js";import"../chunks/cart-contents-h60geKWa.esm.js";import"../components/redeem-transaction.js";import"../components/post-purchase.js";export{R as BeamCommunityImpact,T as BeamCumulativeImpact,g as BeamImpactOverview,D as BeamPostPurchase,z as BeamRedeemTransaction,k as BeamSelectNonprofit};
1
+ import{BeamCommunityImpact as R}from"./community-impact.js";import{BeamCumulativeImpact as T}from"./cumulative-impact.js";import{BeamImpactOverview as g}from"./impact-overview.js";import{BeamSelectNonprofit as k}from"./select-nonprofit.js";import{BeamRedeemTransaction as z}from"./redeem-transaction.js";import{BeamPostPurchase as D}from"./post-purchase.js";import"react";import"../chunks/lit-yVXn5Cbs.esm.js";import"../components/community-impact.js";import"../chunks/progress-bar-7gWYaGlq.esm.js";import"../components/beam-partner-logos.js";import"../chunks/localize-dXHrlK8g.esm.js";import"../chunks/beam-errors-AMvTvR1C.esm.js";import"../utils/logger.js";import"../chunks/routes-h6eWTToy.esm.js";import"../chunks/css-card-grid-3b56QBzq.esm.js";import"../components/cumulative-impact.js";import"../chunks/lodash-P8OIs-at.esm.js";import"../chunks/is-all-html-elements-SdSkxirh.esm.js";import"../components/impact-overview.js";import"../chunks/vendor-eeJfrOkP.esm.js";import"../chunks/responsive-LYEag6TI.esm.js";import"../chunks/events-5IECSF-x.esm.js";import"../components/select-nonprofit.js";import"../utils/network-listeners.js";import"../utils/local-storage.js";import"../utils/cookies.js";import"../chunks/cart-contents-h60geKWa.esm.js";import"../components/redeem-transaction.js";import"../components/post-purchase.js";export{R as BeamCommunityImpact,T as BeamCumulativeImpact,g as BeamImpactOverview,D as BeamPostPurchase,z as BeamRedeemTransaction,k as BeamSelectNonprofit};
2
2
  //# sourceMappingURL=index.js.map