@beamimpact/web-sdk 1.54.2 → 1.54.5
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.
- package/dist/chunks/{_share-dialog-dependencies-CwQxKtg2.esm.js → _share-dialog-dependencies-DQlABdY4.esm.js} +2 -2
- package/dist/chunks/{_share-dialog-dependencies-CwQxKtg2.esm.js.map → _share-dialog-dependencies-DQlABdY4.esm.js.map} +1 -1
- package/dist/chunks/{_share-dialog-dependencies-BXp5YnfR.esm.js → _share-dialog-dependencies-Dg-9riak.esm.js} +2 -2
- package/dist/chunks/{_share-dialog-dependencies-BXp5YnfR.esm.js.map → _share-dialog-dependencies-Dg-9riak.esm.js.map} +1 -1
- package/dist/chunks/{events-D7Q2jJgz.esm.d.ts → events-C55rozsO.esm.d.ts} +19 -3
- package/dist/chunks/events-Dki0ka4F.esm.js +2 -0
- package/dist/chunks/{events-DahlkyxO.esm.js.map → events-Dki0ka4F.esm.js.map} +1 -1
- package/dist/chunks/{index-CuzElPMZ.esm.d.ts → index-B6EWjlNI.esm.d.ts} +1 -1
- package/dist/chunks/index-B9cvR1bA.esm.js +2 -0
- package/dist/chunks/index-B9cvR1bA.esm.js.map +1 -0
- package/dist/chunks/index-BBU6h_u0.esm.js +2 -0
- package/dist/chunks/index-BBU6h_u0.esm.js.map +1 -0
- package/dist/chunks/index-BJWJMzYy.esm.js +2 -0
- package/dist/chunks/index-BJWJMzYy.esm.js.map +1 -0
- package/dist/chunks/index-BXVkhkpJ.esm.js +2 -0
- package/dist/chunks/index-BXVkhkpJ.esm.js.map +1 -0
- package/dist/chunks/{index--NDbk-eE.esm.js → index-Bp9sWMsk.esm.js} +2 -2
- package/dist/chunks/{index--NDbk-eE.esm.js.map → index-Bp9sWMsk.esm.js.map} +1 -1
- package/dist/chunks/{index-Bydn4zMN.esm.js → index-BzcA5RKX.esm.js} +2 -2
- package/dist/chunks/{index-Bydn4zMN.esm.js.map → index-BzcA5RKX.esm.js.map} +1 -1
- package/dist/chunks/{index-CeYpLstb.esm.js → index-CGKJagBi.esm.js} +2 -2
- package/dist/chunks/index-CGKJagBi.esm.js.map +1 -0
- package/dist/chunks/{index-Ls4pNA_r.esm.js → index-Cb7X_azQ.esm.js} +2 -2
- package/dist/chunks/{index-Ls4pNA_r.esm.js.map → index-Cb7X_azQ.esm.js.map} +1 -1
- package/dist/chunks/{index-MKr3f8W9.esm.js → index-Ct1m4IjM.esm.js} +2 -2
- package/dist/chunks/index-Ct1m4IjM.esm.js.map +1 -0
- package/dist/chunks/{index-DDNrz43j.esm.js → index-DA4pws6n.esm.js} +2 -2
- package/dist/chunks/{index-DDNrz43j.esm.js.map → index-DA4pws6n.esm.js.map} +1 -1
- package/dist/chunks/{index-Co6Pvowh.esm.js → index-DBb5HSkR.esm.js} +2 -2
- package/dist/chunks/index-DBb5HSkR.esm.js.map +1 -0
- package/dist/chunks/{index-C-TP8NdG.esm.d.ts → index-DjSzY8-j.esm.d.ts} +1 -1
- package/dist/chunks/index-Dw8XJ6pi.esm.js +2 -0
- package/dist/chunks/index-Dw8XJ6pi.esm.js.map +1 -0
- package/dist/chunks/{index-E5gX8_N2.esm.js → index-MGQHF6Jd.esm.js} +2 -2
- package/dist/chunks/index-MGQHF6Jd.esm.js.map +1 -0
- package/dist/chunks/{index-CCRz-5hA.esm.d.ts → index-OTDSwrqr.esm.d.ts} +1 -1
- package/dist/chunks/index-VrM10qBv.esm.js +2 -0
- package/dist/chunks/index-VrM10qBv.esm.js.map +1 -0
- package/dist/chunks/{index-XTzV546k.esm.js → index-ayo08Z4n.esm.js} +2 -2
- package/dist/chunks/index-ayo08Z4n.esm.js.map +1 -0
- package/dist/chunks/{index-rO_5zds6.esm.js → index-tbwbkOdj.esm.js} +2 -2
- package/dist/chunks/index-tbwbkOdj.esm.js.map +1 -0
- package/dist/chunks/order-page-Bowqodk5.esm.js +2 -0
- package/dist/chunks/order-page-Bowqodk5.esm.js.map +1 -0
- package/dist/chunks/order-page-C2wPfn6k.esm.js +2 -0
- package/dist/chunks/order-page-C2wPfn6k.esm.js.map +1 -0
- package/dist/chunks/{routes-Ck-AZVsH.esm.js → routes-DCT5U9dA.esm.js} +2 -2
- package/dist/chunks/{routes-Ck-AZVsH.esm.js.map → routes-DCT5U9dA.esm.js.map} +1 -1
- package/dist/chunks/{routes-Bw7hn3RL.esm.js → routes-DelUpFFo.esm.js} +2 -2
- package/dist/chunks/{routes-Bw7hn3RL.esm.js.map → routes-DelUpFFo.esm.js.map} +1 -1
- package/dist/chunks/{share-button-BopORXeO.esm.js → share-button-7um4cBYz.esm.js} +2 -2
- package/dist/chunks/{share-button-BopORXeO.esm.js.map → share-button-7um4cBYz.esm.js.map} +1 -1
- package/dist/chunks/{share-button-BupVxILq.esm.js → share-button-B376j4qt.esm.js} +2 -2
- package/dist/chunks/{share-button-BupVxILq.esm.js.map → share-button-B376j4qt.esm.js.map} +1 -1
- package/dist/chunks/{share-button-gAbnieb4.esm.js → share-button-BEXn6SRs.esm.js} +2 -2
- package/dist/chunks/{share-button-gAbnieb4.esm.js.map → share-button-BEXn6SRs.esm.js.map} +1 -1
- package/dist/chunks/{share-button-G4zNdeOS.esm.js → share-button-BZ9Dmpsy.esm.js} +2 -2
- package/dist/chunks/{share-button-G4zNdeOS.esm.js.map → share-button-BZ9Dmpsy.esm.js.map} +1 -1
- package/dist/chunks/{update-cart-CmyZ_Qmv.esm.js → update-cart-BGAM3i5j.esm.js} +2 -2
- package/dist/chunks/{update-cart-CmyZ_Qmv.esm.js.map → update-cart-BGAM3i5j.esm.js.map} +1 -1
- package/dist/chunks/{update-cart-DhgjSmWJ.esm.js → update-cart-pMo1b75q.esm.js} +2 -2
- package/dist/chunks/{update-cart-DhgjSmWJ.esm.js.map → update-cart-pMo1b75q.esm.js.map} +1 -1
- package/dist/components/community-impact.esm.js +1 -1
- package/dist/components/community-impact.js +1 -1
- package/dist/components/cumulative-impact.esm.js +1 -1
- package/dist/components/cumulative-impact.js +1 -1
- package/dist/components/impact-overview.esm.js +1 -1
- package/dist/components/impact-overview.js +1 -1
- package/dist/components/index.esm.js +1 -1
- package/dist/components/index.js +1 -1
- package/dist/components/post-purchase.esm.js +1 -1
- package/dist/components/post-purchase.js +1 -1
- package/dist/components/product-details-page.esm.js +1 -1
- package/dist/components/product-details-page.js +1 -1
- package/dist/components/redeem-transaction.esm.js +1 -1
- package/dist/components/redeem-transaction.js +1 -1
- package/dist/components/select-nonprofit.esm.js +21 -21
- package/dist/components/select-nonprofit.esm.js.map +1 -1
- package/dist/components/select-nonprofit.js +21 -21
- package/dist/components/select-nonprofit.js.map +1 -1
- package/dist/components/select-subscription-nonprofit.esm.js +1 -1
- package/dist/components/select-subscription-nonprofit.js +1 -1
- package/dist/components/shopify.d.ts +1 -1
- package/dist/components/shopify.esm.js +1 -1
- package/dist/components/shopify.esm.js.map +1 -1
- package/dist/components/shopify.js +1 -1
- package/dist/components/shopify.js.map +1 -1
- package/dist/components/social-share.esm.js +1 -1
- package/dist/components/social-share.js +1 -1
- package/dist/components/subscription-impact.esm.js +1 -1
- package/dist/components/subscription-impact.js +1 -1
- package/dist/components/subscription-management.esm.js +1 -1
- package/dist/components/subscription-management.js +1 -1
- package/dist/index.d.ts +4 -4
- package/dist/index.esm.js +1 -1
- package/dist/index.js +1 -1
- package/dist/integrations/beam.esm.js +1 -1
- package/dist/integrations/beam.js +1 -1
- package/dist/integrations/cart.esm.js +1 -1
- package/dist/integrations/cart.js +1 -1
- package/dist/integrations/index.d.ts +2 -2
- package/dist/integrations/index.esm.js +1 -1
- package/dist/integrations/index.js +1 -1
- package/dist/integrations/logs.esm.js +1 -1
- package/dist/integrations/logs.js +1 -1
- package/dist/integrations/promoManager.esm.js +1 -1
- package/dist/integrations/promoManager.js +1 -1
- package/dist/integrations/shopify.esm.js +1 -1
- package/dist/integrations/shopify.js +1 -1
- package/dist/integrations/statsig.esm.js +1 -1
- package/dist/integrations/statsig.js +1 -1
- package/dist/integrations/utils.d.ts +1 -1
- package/dist/integrations/utils.esm.js +1 -1
- package/dist/integrations/utils.js +1 -1
- package/dist/react/community-impact.esm.js +1 -1
- package/dist/react/community-impact.js +1 -1
- package/dist/react/cumulative-impact.esm.js +1 -1
- package/dist/react/cumulative-impact.js +1 -1
- package/dist/react/impact-overview.esm.js +1 -1
- package/dist/react/impact-overview.js +1 -1
- package/dist/react/index.d.ts +1 -1
- package/dist/react/index.esm.js +1 -1
- package/dist/react/index.js +1 -1
- package/dist/react/post-purchase.esm.js +1 -1
- package/dist/react/post-purchase.js +1 -1
- package/dist/react/product-details-page.esm.js +1 -1
- package/dist/react/product-details-page.js +1 -1
- package/dist/react/redeem-transaction.d.ts +1 -1
- package/dist/react/redeem-transaction.esm.js +1 -1
- package/dist/react/redeem-transaction.js +1 -1
- package/dist/react/select-nonprofit.d.ts +1 -1
- package/dist/react/select-nonprofit.esm.js +1 -1
- package/dist/react/select-nonprofit.js +1 -1
- package/dist/react/select-subscription-nonprofit.d.ts +1 -1
- package/dist/react/select-subscription-nonprofit.esm.js +1 -1
- package/dist/react/select-subscription-nonprofit.js +1 -1
- package/dist/react/social-share.esm.js +1 -1
- package/dist/react/social-share.js +1 -1
- package/dist/react/subscription-impact.esm.js +1 -1
- package/dist/react/subscription-impact.js +1 -1
- package/dist/react/subscription-management.esm.js +1 -1
- package/dist/react/subscription-management.js +1 -1
- package/dist/utils/events.d.ts +1 -1
- package/dist/utils/events.esm.js +1 -1
- package/dist/utils/events.js +1 -1
- package/dist/utils/index.d.ts +1 -1
- package/dist/utils/index.esm.js +1 -1
- package/dist/utils/index.js +1 -1
- package/dist/utils/network-listeners.esm.js +1 -1
- package/dist/utils/network-listeners.js +1 -1
- package/package.json +1 -1
- package/dist/chunks/events-DahlkyxO.esm.js +0 -2
- package/dist/chunks/index-B7ij5jz8.esm.js +0 -2
- package/dist/chunks/index-B7ij5jz8.esm.js.map +0 -1
- package/dist/chunks/index-C2KsnRGC.esm.js +0 -2
- package/dist/chunks/index-C2KsnRGC.esm.js.map +0 -1
- package/dist/chunks/index-CIey5rKC.esm.js +0 -2
- package/dist/chunks/index-CIey5rKC.esm.js.map +0 -1
- package/dist/chunks/index-CInpKPId.esm.js +0 -2
- package/dist/chunks/index-CInpKPId.esm.js.map +0 -1
- package/dist/chunks/index-CeYpLstb.esm.js.map +0 -1
- package/dist/chunks/index-Co6Pvowh.esm.js.map +0 -1
- package/dist/chunks/index-DqwTVzld.esm.js +0 -2
- package/dist/chunks/index-DqwTVzld.esm.js.map +0 -1
- package/dist/chunks/index-E5gX8_N2.esm.js.map +0 -1
- package/dist/chunks/index-MKr3f8W9.esm.js.map +0 -1
- package/dist/chunks/index-XTzV546k.esm.js.map +0 -1
- package/dist/chunks/index-ewiV_0-t.esm.js +0 -2
- package/dist/chunks/index-ewiV_0-t.esm.js.map +0 -1
- package/dist/chunks/index-rO_5zds6.esm.js.map +0 -1
- package/dist/chunks/order-page-CJR7GRgk.esm.js +0 -2
- package/dist/chunks/order-page-CJR7GRgk.esm.js.map +0 -1
- package/dist/chunks/order-page-CtQ9OX_A.esm.js +0 -2
- package/dist/chunks/order-page-CtQ9OX_A.esm.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shopify.js","sources":["../../src/components/shopify/index.ts"],"sourcesContent":["/**\n * @deprecated\n * This file is preserved for backwards compatability, but future users should import from:\n * - integrations/shopify\n * - integration/utils\n * */\n\nimport { waitForElement } from \"../../utils/wait-for-element\";\nimport { getCookieMap, getCookieValue } from \"../../utils/cookies\";\n\nconst utils = {\n waitForElement,\n getCookieMap,\n getCookieValue,\n};\n\nexport { utils };\nexport { initNetworkListeners } from \"../../utils/network-listeners\";\nexport * as events from \"../../utils/events\";\n\nexport * from \"../../integrations/shopify\";\n"],"names":["utils","waitForElement","getCookieMap","getCookieValue"],"mappings":"
|
|
1
|
+
{"version":3,"file":"shopify.js","sources":["../../src/components/shopify/index.ts"],"sourcesContent":["/**\n * @deprecated\n * This file is preserved for backwards compatability, but future users should import from:\n * - integrations/shopify\n * - integration/utils\n * */\n\nimport { waitForElement } from \"../../utils/wait-for-element\";\nimport { getCookieMap, getCookieValue } from \"../../utils/cookies\";\n\nconst utils = {\n waitForElement,\n getCookieMap,\n getCookieValue,\n};\n\nexport { utils };\nexport { initNetworkListeners } from \"../../utils/network-listeners\";\nexport * as events from \"../../utils/events\";\n\nexport * from \"../../integrations/shopify\";\n"],"names":["utils","waitForElement","getCookieMap","getCookieValue"],"mappings":"6iDAUA,MAAMA,EAAQ,CACZ,eAAAC,EACA,aAAAC,EACA,eAAAC,CACF"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{f as m,g as o,t as n,h as g,y as f}from"../chunks/lit-WqMxC_PA.esm.js";import"../chunks/vendor-KKSARHWL.esm.js";import"../chunks/_share-dialog-dependencies-
|
|
1
|
+
import{f as m,g as o,t as n,h as g,y as f}from"../chunks/lit-WqMxC_PA.esm.js";import"../chunks/vendor-KKSARHWL.esm.js";import"../chunks/_share-dialog-dependencies-DQlABdY4.esm.js";import"../chunks/progress-bar-DF7UuuHb.esm.js";import"./beam-partner-logos.esm.js";import{c as b,d as y,e as u}from"../chunks/enforce-config-CZ3ToOgr.esm.js";import{D as w,S as x,g as I,W as U}from"../chunks/routes-DCT5U9dA.esm.js";import{_ as S}from"../chunks/loading-template-DG4lkIIc.esm.js";import{u as d,s as r,p}from"../chunks/share-button-7um4cBYz.esm.js";import"../chunks/beam-errors-Ci0d3926.esm.js";import"../utils/logger.esm.js";import"../chunks/promo-types-DKAOFHJr.esm.js";var k=Object.defineProperty,a=(l,t,i,v)=>{for(var s=void 0,c=l.length-1,h;c>=0;c--)(h=l[c])&&(s=h(t,i,s)||s);return s&&k(t,i,s),s};class e extends g{constructor(){super(...arguments),this.baseUrl=w,this.lang="en",this.debug=!1,this.brandName=null,this.shareImageUrl=null,this.isMobile=!1,this.windowResized=!1,this.checkViewport=()=>{this.windowResized=window.innerWidth<=768}}get configLang(){return x[this.lang]||"en"}connectedCallback(){super.connectedCallback(),window.addEventListener("resize",this.checkViewport),this.checkViewport()}disconnectedCallback(){window.removeEventListener("resize",this.checkViewport),super.disconnectedCallback()}async fetchImpactData(){u(["apiKey","storeId","nonprofitId"],this);try{return await I({baseUrl:this.baseUrl,headers:{authorization:`Api-Key ${this.apiKey}`},queryParams:{storeId:this.storeId,personalImpactLimit:0,nonprofitId:this.nonprofitId,widgetName:U.community_impact,version:"1.0.0",lang:this.configLang,transactionId:this.transactionId??void 0}})}catch(t){throw this.debug&&console.error("Failed to fetch impact data",t),t}}async updateImpactData(){try{const t=await this.fetchImpactData();if(t&&(this.brandName=t.chain.name,this.shareImageUrl=t.promoAssetUrl||t.personalImpactAssetUrl||t.community[0].share.imageUrl,this.shareImageUrl)){const i=await d(this.shareImageUrl);this.file=i,this.dataUrl=URL.createObjectURL(i)}}catch(t){this.debug&&console.error("Error updating impact data:",t)}}async firstUpdated(){await this.updateImpactData(),this.isMobile=/Mobi|Android/i.test(navigator.userAgent)||"ontouchstart"in window||navigator.maxTouchPoints>0}async openSystemShareSheet(t){if(t)try{const i=await d(t);navigator.share&&this.brandName&&await navigator.share({files:[i],title:r[this.lang].impactShareTitle(),text:r[this.lang].impactShareText({brandName:this.brandName})})}catch(i){this.debug&&console.error("Failed to open share sheet",i)}}async handleClickCopy(){if(this.file)try{this.apiKey&&this.transactionId?p({baseUrl:this.baseUrl,apiKey:this.apiKey||"",requestBody:{eventName:"ExtensibilityCopyImageButtonClick",nonprofitId:this.nonprofitId,storeId:this.storeId,timestamp:Date.now(),transactionId:Number(this.transactionId)}}).catch(()=>null):console.error("Missing data for social share analytics. Skipping send"),await navigator.clipboard.write([new ClipboardItem({"image/png":this.file})])}catch(t){this.debug&&console.error("Failed to copy image to clipboard:",t)}}handleClickDownload(t){this.apiKey&&this.transactionId?p({baseUrl:this.baseUrl,apiKey:this.apiKey||"",requestBody:{eventName:"ExtensibilityDownloadImageButtonClick",nonprofitId:this.nonprofitId,storeId:this.storeId,timestamp:Date.now(),transactionId:Number(this.transactionId)}}).catch(()=>null):console.error("Missing data for social share analytics. Skipping send");const i=t.currentTarget;this.isMobile&&this.shareImageUrl?(t.preventDefault(),this.openSystemShareSheet(this.shareImageUrl)):this.dataUrl&&(i.href=this.dataUrl,i.download=r[this.lang].impactShareTitle())}render(){return!this.brandName||!this.shareImageUrl||!this.dataUrl?S():f`
|
|
2
2
|
<div class="share-container ${this.windowResized||this.isMobile?"mobile":"desktop"}">
|
|
3
3
|
<h2 class="share-title">${r[this.lang].impactShareTitle()}</h2>
|
|
4
4
|
<p class="share-text">${r[this.lang].impactShareText({brandName:this.brandName})}</p>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{f as m,g as o,t as n,h as g,y as f}from"../chunks/lit-WqMxC_PA.esm.js";import"../chunks/vendor-KKSARHWL.esm.js";import"../chunks/_share-dialog-dependencies-
|
|
1
|
+
import{f as m,g as o,t as n,h as g,y as f}from"../chunks/lit-WqMxC_PA.esm.js";import"../chunks/vendor-KKSARHWL.esm.js";import"../chunks/_share-dialog-dependencies-Dg-9riak.esm.js";import"../chunks/progress-bar-DF7UuuHb.esm.js";import"./beam-partner-logos.js";import{c as b,d as y,e as u}from"../chunks/enforce-config-Ba1JkOHs.esm.js";import{D as w,S as x,g as I,W as U}from"../chunks/routes-DelUpFFo.esm.js";import{_ as S}from"../chunks/loading-template-DG4lkIIc.esm.js";import{u as d,s as r,p}from"../chunks/share-button-BZ9Dmpsy.esm.js";import"../chunks/beam-errors-Ci0d3926.esm.js";import"../utils/logger.js";import"../chunks/promo-types-DKAOFHJr.esm.js";var k=Object.defineProperty,a=(l,t,i,v)=>{for(var s=void 0,c=l.length-1,h;c>=0;c--)(h=l[c])&&(s=h(t,i,s)||s);return s&&k(t,i,s),s};class e extends g{constructor(){super(...arguments),this.baseUrl=w,this.lang="en",this.debug=!1,this.brandName=null,this.shareImageUrl=null,this.isMobile=!1,this.windowResized=!1,this.checkViewport=()=>{this.windowResized=window.innerWidth<=768}}get configLang(){return x[this.lang]||"en"}connectedCallback(){super.connectedCallback(),window.addEventListener("resize",this.checkViewport),this.checkViewport()}disconnectedCallback(){window.removeEventListener("resize",this.checkViewport),super.disconnectedCallback()}async fetchImpactData(){u(["apiKey","storeId","nonprofitId"],this);try{return await I({baseUrl:this.baseUrl,headers:{authorization:`Api-Key ${this.apiKey}`},queryParams:{storeId:this.storeId,personalImpactLimit:0,nonprofitId:this.nonprofitId,widgetName:U.community_impact,version:"1.0.0",lang:this.configLang,transactionId:this.transactionId??void 0}})}catch(t){throw this.debug&&console.error("Failed to fetch impact data",t),t}}async updateImpactData(){try{const t=await this.fetchImpactData();if(t&&(this.brandName=t.chain.name,this.shareImageUrl=t.promoAssetUrl||t.personalImpactAssetUrl||t.community[0].share.imageUrl,this.shareImageUrl)){const i=await d(this.shareImageUrl);this.file=i,this.dataUrl=URL.createObjectURL(i)}}catch(t){this.debug&&console.error("Error updating impact data:",t)}}async firstUpdated(){await this.updateImpactData(),this.isMobile=/Mobi|Android/i.test(navigator.userAgent)||"ontouchstart"in window||navigator.maxTouchPoints>0}async openSystemShareSheet(t){if(t)try{const i=await d(t);navigator.share&&this.brandName&&await navigator.share({files:[i],title:r[this.lang].impactShareTitle(),text:r[this.lang].impactShareText({brandName:this.brandName})})}catch(i){this.debug&&console.error("Failed to open share sheet",i)}}async handleClickCopy(){if(this.file)try{this.apiKey&&this.transactionId?p({baseUrl:this.baseUrl,apiKey:this.apiKey||"",requestBody:{eventName:"ExtensibilityCopyImageButtonClick",nonprofitId:this.nonprofitId,storeId:this.storeId,timestamp:Date.now(),transactionId:Number(this.transactionId)}}).catch(()=>null):console.error("Missing data for social share analytics. Skipping send"),await navigator.clipboard.write([new ClipboardItem({"image/png":this.file})])}catch(t){this.debug&&console.error("Failed to copy image to clipboard:",t)}}handleClickDownload(t){this.apiKey&&this.transactionId?p({baseUrl:this.baseUrl,apiKey:this.apiKey||"",requestBody:{eventName:"ExtensibilityDownloadImageButtonClick",nonprofitId:this.nonprofitId,storeId:this.storeId,timestamp:Date.now(),transactionId:Number(this.transactionId)}}).catch(()=>null):console.error("Missing data for social share analytics. Skipping send");const i=t.currentTarget;this.isMobile&&this.shareImageUrl?(t.preventDefault(),this.openSystemShareSheet(this.shareImageUrl)):this.dataUrl&&(i.href=this.dataUrl,i.download=r[this.lang].impactShareTitle())}render(){return!this.brandName||!this.shareImageUrl||!this.dataUrl?S():f`
|
|
2
2
|
<div class="share-container ${this.windowResized||this.isMobile?"mobile":"desktop"}">
|
|
3
3
|
<h2 class="share-title">${r[this.lang].impactShareTitle()}</h2>
|
|
4
4
|
<p class="share-text">${r[this.lang].impactShareText({brandName:this.brandName})}</p>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{h as w,f as $,y as p,g as m,t as O,p as C}from"../chunks/lit-WqMxC_PA.esm.js";import{d as z,b as G}from"../chunks/lodash-D3TLHRR_.esm.js";import{p as K}from"../chunks/progress-bar-DF7UuuHb.esm.js";import{s as S,a as q}from"../chunks/share-button-
|
|
1
|
+
import{h as w,f as $,y as p,g as m,t as O,p as C}from"../chunks/lit-WqMxC_PA.esm.js";import{d as z,b as G}from"../chunks/lodash-D3TLHRR_.esm.js";import{p as K}from"../chunks/progress-bar-DF7UuuHb.esm.js";import{s as S,a as q}from"../chunks/share-button-BEXn6SRs.esm.js";import"../chunks/vendor-KKSARHWL.esm.js";import{D as Y,g as J,S as Q}from"../chunks/routes-DCT5U9dA.esm.js";import{u as b,A as X,d as u,a as Z,_ as ee,i as n}from"../chunks/localize-Btu9xYcE.esm.js";import{c as ie,d as ae,e as te}from"../chunks/enforce-config-CZ3ToOgr.esm.js";import{_ as ne}from"../chunks/loading-template-DG4lkIIc.esm.js";import{makeApiKeyHeader as re}from"../utils/makeApiKeyHeader.esm.js";import{c as oe}from"../chunks/responsive-BR8qUfBa.esm.js";import{logger as se}from"../utils/logger.esm.js";import{c as ce}from"../chunks/css-card-grid-CvoGpsJH.esm.js";import"../chunks/is-all-html-elements-fcB7UUA1.esm.js";import"../chunks/share-button-7um4cBYz.esm.js";import"../chunks/promo-types-DKAOFHJr.esm.js";import"../chunks/beam-errors-Ci0d3926.esm.js";var pe=Object.defineProperty,me=(i,e,r,l)=>{for(var t=void 0,a=i.length-1,d;a>=0;a--)(d=i[a])&&(t=d(e,r,t)||t);return t&&pe(e,r,t),t};class A extends w{constructor(){super(...arguments),this.infoText=""}static get styles(){return $`
|
|
2
2
|
sl-badge::part(base) {
|
|
3
3
|
background-color: var(--beam-pillLabel-color-background, #000);
|
|
4
4
|
color: var(--beam-pillLabel-color, #fff);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{h as w,f as $,y as p,g as m,t as O,p as C}from"../chunks/lit-WqMxC_PA.esm.js";import{d as z,b as G}from"../chunks/lodash-D3TLHRR_.esm.js";import{p as K}from"../chunks/progress-bar-DF7UuuHb.esm.js";import{s as S,a as q}from"../chunks/share-button-
|
|
1
|
+
import{h as w,f as $,y as p,g as m,t as O,p as C}from"../chunks/lit-WqMxC_PA.esm.js";import{d as z,b as G}from"../chunks/lodash-D3TLHRR_.esm.js";import{p as K}from"../chunks/progress-bar-DF7UuuHb.esm.js";import{s as S,a as q}from"../chunks/share-button-B376j4qt.esm.js";import"../chunks/vendor-KKSARHWL.esm.js";import{D as Y,g as J,S as Q}from"../chunks/routes-DelUpFFo.esm.js";import{u as b,A as X,d as u,a as Z,_ as ee,i as n}from"../chunks/localize-C25pEGnx.esm.js";import{c as ie,d as ae,e as te}from"../chunks/enforce-config-Ba1JkOHs.esm.js";import{_ as ne}from"../chunks/loading-template-DG4lkIIc.esm.js";import{makeApiKeyHeader as re}from"../utils/makeApiKeyHeader.js";import{c as oe}from"../chunks/responsive-BR8qUfBa.esm.js";import{logger as se}from"../utils/logger.js";import{c as ce}from"../chunks/css-card-grid-CvoGpsJH.esm.js";import"../chunks/is-all-html-elements-fcB7UUA1.esm.js";import"../chunks/share-button-BZ9Dmpsy.esm.js";import"../chunks/promo-types-DKAOFHJr.esm.js";import"../chunks/beam-errors-Ci0d3926.esm.js";var pe=Object.defineProperty,me=(i,e,r,l)=>{for(var t=void 0,a=i.length-1,d;a>=0;a--)(d=i[a])&&(t=d(e,r,t)||t);return t&&pe(e,r,t),t};class A extends w{constructor(){super(...arguments),this.infoText=""}static get styles(){return $`
|
|
2
2
|
sl-badge::part(base) {
|
|
3
3
|
background-color: var(--beam-pillLabel-color-background, #000);
|
|
4
4
|
color: var(--beam-pillLabel-color, #fff);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{f as z,g as r,t as d,h as H,y as o,k as E}from"../chunks/lit-WqMxC_PA.esm.js";import{D as R,S as _,d as j,W as B,e as K,g as F}from"../chunks/routes-Ck-AZVsH.esm.js";import{p as O}from"../chunks/progress-bar-DF7UuuHb.esm.js";import{c as V,d as Y,e as S}from"../chunks/enforce-config-CZ3ToOgr.esm.js";import{u as l,A as y,d as c,a as G,i as p,_ as v}from"../chunks/localize-Btu9xYcE.esm.js";import{c as N}from"../chunks/events-DahlkyxO.esm.js";import{M as q}from"../chunks/beam-errors-Ci0d3926.esm.js";import"./select-subscription-nonprofit.esm.js";import"./subscription-impact.esm.js";import{partnerLogosConfigDefaults as J}from"./beam-partner-logos.esm.js";import{makeApiKeyHeader as x}from"../utils/makeApiKeyHeader.esm.js";import{_ as D}from"../chunks/loading-template-DG4lkIIc.esm.js";import{c as Q}from"../chunks/css-card-grid-CvoGpsJH.esm.js";import"../chunks/promo-types-DKAOFHJr.esm.js";import"../utils/logger.esm.js";import"../chunks/lodash-D3TLHRR_.esm.js";import"../utils/local-storage.esm.js";import"../chunks/share-button-BupVxILq.esm.js";import"../chunks/is-all-html-elements-fcB7UUA1.esm.js";import"../chunks/share-button-BopORXeO.esm.js";import"../chunks/vendor-KKSARHWL.esm.js";import"../chunks/responsive-BR8qUfBa.esm.js";const g={en:{changeNonprofitButton:()=>"Change Nonprofit",previousImpactHeader:()=>"Your Previous Impact",previousNonprofitButton:()=>"Back to Previous Nonprofit",supportAgainButton:()=>"Support Again",via:()=>"via",showAllButton:()=>"Show All",showLessButton:()=>"Show Less"},fr:{changeNonprofitButton:()=>"Change Nonprofit",previousImpactHeader:()=>"Your Previous Impact",previousNonprofitButton:()=>"Back to Previous Nonprofit",supportAgainButton:()=>"Support Again",via:()=>"via",showAllButton:()=>"Show All",showLessButton:()=>"Show Less"},de:{changeNonprofitButton:()=>"Change Nonprofit",previousImpactHeader:()=>"Your Previous Impact",previousNonprofitButton:()=>"Back to Previous Nonprofit",supportAgainButton:()=>"Support Again",via:()=>"via",showAllButton:()=>"Show All",showLessButton:()=>"Show Less"},es:{changeNonprofitButton:()=>"Change Nonprofit",previousImpactHeader:()=>"Your Previous Impact",previousNonprofitButton:()=>"Back to Previous Nonprofit",supportAgainButton:()=>"Support Again",via:()=>"via",showAllButton:()=>"Show All",showLessButton:()=>"Show Less"},it:{changeNonprofitButton:()=>"Change Nonprofit",previousImpactHeader:()=>"Your Previous Impact",previousNonprofitButton:()=>"Back to Previous Nonprofit",supportAgainButton:()=>"Support Again",via:()=>"via",showAllButton:()=>"Show All",showLessButton:()=>"Show Less"},pl:{changeNonprofitButton:()=>"Change Nonprofit",previousImpactHeader:()=>"Your Previous Impact",previousNonprofitButton:()=>"Back to Previous Nonprofit",supportAgainButton:()=>"Support Again",via:()=>"via",showAllButton:()=>"Show All",showLessButton:()=>"Show Less"}};var X=Object.defineProperty,i=(M,t,n,s)=>{for(var a=void 0,b=M.length-1,m;b>=0;b--)(m=M[b])&&(a=m(t,n,a)||a);return a&&X(t,n,a),a};const $=3,Z=0,tt=1,et=98;class e extends H{constructor(){super(...arguments),this.baseUrl=R,this.lang="en",this.debug=!1,this.draftConfig=!1,this.activeWidget=null,this.nonprofitId=null,this.beamUserId=null,this.eligibleNonprofits=[],this.showAllTiles=!1,this.isMobile=window.innerWidth<720,this.dropdownVisible=!1,this.emojis=["\u{1F44F}","\u{1F4AA}","\u{1F64C}","\u2728","\u{1F947}"],this.subscriptionDataController=new y(this,this.fetchSubscription),this.eligibleNonprofitsDataController=new y(this,this.fetchEligibleNonprofits),this.personalImpactDataController=new y(this,this.fetchImpact)}get configLang(){return _[this.lang]||"en"}async firstUpdated(){if(!this.email&&!this.partnerUserId)throw new q(["email","partnerUserId"],"One of the following properties needs to be specified: email, partnerUserId ");S(["apiKey","subscriptionId"],this),await this.loadWidget()}async loadWidget(){await Promise.all([this.fetchEligibleNonprofits(),this.fetchSubscription()]),await this.fetchImpact(),this.activeWidget=this.nonprofitId?"subscription-impact":"select-subscription-nonprofit"}async fetchEligibleNonprofits(){S(["apiKey","subscriptionId"],this);const t=await j({baseUrl:this.baseUrl,headers:x(this.apiKey),requestBody:{storeId:this.storeId||void 0,postalCode:this.postalCode||void 0,countryCode:this.countryCode||void 0,widgetName:B.subscription_management,version:"1.0.0"}});return this.storeId=t.store.id,this.eligibleNonprofits=t.nonprofits,this.eligibleNonprofitsDataController.data=t,t}async fetchSubscription(){S(["apiKey","subscriptionId"],this);const t=await K({baseUrl:this.baseUrl,headers:x(this.apiKey),requestBody:{remoteSubscriptionId:this.subscriptionId,email:this.email,partnerUserId:this.partnerUserId}});return this.beamUserId=t.beamUserId,this.nonprofitId=t.nonprofit?.id||null,t}async fetchImpact(){S(["apiKey"],this);const t=await F({baseUrl:this.baseUrl,headers:x(this.apiKey),queryParams:{beamUserId:this.beamUserId?this.beamUserId:void 0,widgetName:"subscription-management",version:"1.0.0",lang:this.configLang}});return this.personalImpactDataController.data=t,t}getDisplayablePreviousImpacts(){const t=this.personalImpactDataController.data?.personal;return!t||t?.length<1?[]:t.filter(n=>!(!n.nonprofit.includeInPersonalImpact||n.nonprofit.id===this.nonprofitId&&(!n.impact.goalCompletionText||n.impact.goalCompletionText?.length<1)))}handleSwapNonprofitButtonClick(){this.activeWidget="select-subscription-nonprofit"}handleBackToSubscriptionImpactButtonClick(){this.activeWidget="subscription-impact"}handleSupportAgainButtonClick(t,n){this.activeWidget="select-subscription-nonprofit",this.selectedNonprofitId=t;const s=new N({selectedNonprofitId:t,nonprofitName:n,source:B.subscription_management});this.dispatchEvent(s)}handleNonprofitSelect(t){if(!(t instanceof N))return;const{selectedNonprofitId:n}=t.detail;this.nonprofitId=n??null,this.activeWidget="subscription-impact"}isNonprofitEligible(t){return this.eligibleNonprofits.some(n=>n.nonprofit.id===t)}shouldDisplayProgressBar(t){return t>tt&&t<et}get cssVariables(){const t={...J,...O,"--beam-fontFamily":"inherit","--beam-fontStyle":"inherit","--beam-fontSize":"inherit","--beam-textColor":"inherit","--beam-backgroundColor":"inherit","--beam-SubscriptionManagement-widgetContainer-borderColor":"#d5d5d5","--beam-SubscriptionManagement-widgetContainer-borderRadius":"4px","--beam-SubscriptionManagement-widgetContainer-padding":"8px 20px","--beam-SubscriptionManagement-widgetContainer-backgroundColor":"inherit","--beam-SubscriptionManagement-widgetContainer-maxWidth":"820px","--beam-SubscriptionManagement-logo-align-desktop":"left","--beam-SubscriptionManagement-logo-align-mobile":"center","--beam-SubscriptionManagement-previousImpact-cardStyle":"'selected_icon'","--beam-SubscriptionManagement-header-padding":"10px 20px 10px 0px","--beam-SubscriptionManagement-header-borderRadius":"0px","--beam-SubscriptionManagement-header-backgroundColor":"#fff","--beam-SubscriptionManagement-header-meatballsMenu-fontSize":"24px","--beam-SubscriptionManagement-header-meatballsMenu-color":"24px","--beam-SubscriptionManagement-lineBreak-color":"#ddd","--beam-SubscriptionManagement-lineBreak-width":"1px","--beam-SubscriptionManagement-lineBreak-margin":"10px 0 20px 0","--beam-SubscriptionManagement-tile-marginBottom":"20px","--beam-SubscriptionManagement-tile-border-width":"0px","--beam-SubscriptionManagement-tile-border-color":"#ddd","--beam-SubscriptionManagement-tile-padding":"12.5px","--beam-SubscriptionManagement-tile-borderRadius":"8px","--beam-SubscriptionManagement-tile-background":"#f8fbfb","--beam-SubscriptionManagement-tileContent-gap":" 15px","--beam-SubscriptionManagement-tileContent-padding":"5px 0px","--beam-SubscriptionManagement-tile-icon-borderRadius":"4px","--beam-SubscriptionManagement-tile-icon-height":"28px","--beam-SubscriptionManagement-tile-icon-background-borderRadius":"50%","--beam-SubscriptionManagement-tile-icon-background-width":"50px","--beam-SubscriptionManagement-tile-icon-background-height":"50px","--beam-SubscriptionManagement-tile-icon-background-backgroundColor":"#0a323c","--beam-SubscriptionManagement-tile-icon-background-padding":"10px","--beam-SubscriptionManagement-blockTileDescription-gap":"5px","--beam-SubscriptionManagement-blockTileDescription-padding":"0px","--beam-SubscriptionManagement-blockTileDescription-lineHeight":"130%","--beam-SubscriptionManagement-blockTileDescription-progressBar-width-desktop":"60%","--beam-SubscriptionManagement-blockTileDescription-progressBar-width-mobile":"100%","--beam-SubscriptionManagement-subWidgetContainer-padding":"0px 0px 10px","--beam-SubscriptionManagement-previousImpactContainer-padding-desktop":"10px 24px 10px 0px","--beam-SubscriptionManagement-previousImpactContainer-padding-mobile":"0px","--beam-SubscriptionManagement-dropDown-padding":"15px 8px","--beam-SubscriptionManagement-dropDown-borderRadius":"8px","--beam-SubscriptionManagement-dropDown-backgroundColor":"#f8fbfb","--beam-SubscriptionManagement-dropDown-boxShadow":"0px 4px 28px 0px rgba(0, 0, 0, 0.04)","--beam-SubscriptionManagement-dropDown-width":"128px","--beam-SubscriptionManagement-dropDown-hover-backgroundColor":"#E1F1EE","--beam-SubscriptionManagement-dropDownOptions-textDecoration":"underline",...c("--beam-SubscriptionManagement-dropDownOptions",{fontSize:"12px",fontWeight:"400",textTransform:"capitalize",fontStyle:"normal",color:"#0a323c"}),"--beam-SubscriptionManagement-yourPreviousImpactTitle-marginBottom":"15px",...c("--beam-SubscriptionManagement-yourPreviousImpactTitle",{fontSize:"18px",fontWeight:"bold",lineHeight:"120%",textTransform:"capitalize",fontStyle:"normal",color:"#0a323c"}),"--beam-SubscriptionManagement-yourPreviousImpact-showAllButton-textDecoration":"underline",...c("--beam-SubscriptionManagement-yourPreviousImpact-showAllButton",{fontSize:"12px",fontWeight:"bold",lineHeight:"120%",textTransform:"capitalize",fontStyle:"normal",color:"#0a323c"}),"--beam-SubscriptionManagement-tile-title-letterSpacing":"0.36px",...c("--beam-SubscriptionManagement-tile-title",{fontSize:"12px",fontWeight:"bold",lineHeight:"120%",textTransform:"uppercase",fontStyle:"normal",color:"#0a323c"}),...c("--beam-SubscriptionManagement-tile-description",{fontSize:"14px",lineHeight:"120%",fontStyle:"normal",color:"#454a47"}),...c("--beam-SubscriptionManagement-tile-via",{fontSize:"14px",lineHeight:"120%",fontStyle:"normal",color:"#454a47"}),"--beam-SubscriptionManagement-tile-nonprofitLink-textDecoration":"underline",...c("--beam-SubscriptionManagement-tile-nonprofitLink",{fontSize:"14px",fontWeight:"400",lineHeight:"120%",textTransform:"capitalize",fontStyle:"normal",color:"#0a323c"}),"--beam-SubscriptionManagement-tile-supportAgainButton-textDecoration":"underline",...c("--beam-SubscriptionManagement-tile-supportAgainButton",{fontSize:"14px",fontWeight:"400",lineHeight:"120%",textTransform:"capitalize",fontStyle:"normal",color:"#0a323c"}),"--beam-SubscriptionManagement-tile-progressBarLabel-marginLeft":"8px",...c("--beam-SubscriptionManagement-tile-progressBarLabel",{fontSize:"10px",fontWeight:"bold",fontStyle:"normal",color:"#878a92"}),"--beam-SubscriptionManagement-tile-fundedAmount-lineHeight":"16px",...c("--beam-SubscriptionManagement-tile-fundedAmount",{fontSize:"14px",fontWeight:"400",lineHeight:"120%",fontStyle:"italic",color:"#0a323c"})},n=this.eligibleNonprofitsDataController?.data?.config?.web?.theme||{},s={...t,...n};return Object.assign(Object.create({toCSS(){return G(this)}}),s)}renderPreviousImpactTiles({personalImpact:t,cardStyle:n,eligibleNonprofitConfig:s}){if(!t)return o``;if(!s)return o``;const a=this.showAllTiles?t:t.slice(0,$);let b=0;return o`
|
|
1
|
+
import{f as z,g as r,t as d,h as H,y as o,k as E}from"../chunks/lit-WqMxC_PA.esm.js";import{D as R,S as _,d as j,W as B,e as K,g as F}from"../chunks/routes-DCT5U9dA.esm.js";import{p as O}from"../chunks/progress-bar-DF7UuuHb.esm.js";import{c as V,d as Y,e as S}from"../chunks/enforce-config-CZ3ToOgr.esm.js";import{u as l,A as y,d as c,a as G,i as p,_ as v}from"../chunks/localize-Btu9xYcE.esm.js";import{c as N}from"../chunks/events-Dki0ka4F.esm.js";import{M as q}from"../chunks/beam-errors-Ci0d3926.esm.js";import"./select-subscription-nonprofit.esm.js";import"./subscription-impact.esm.js";import{partnerLogosConfigDefaults as J}from"./beam-partner-logos.esm.js";import{makeApiKeyHeader as x}from"../utils/makeApiKeyHeader.esm.js";import{_ as D}from"../chunks/loading-template-DG4lkIIc.esm.js";import{c as Q}from"../chunks/css-card-grid-CvoGpsJH.esm.js";import"../chunks/promo-types-DKAOFHJr.esm.js";import"../utils/logger.esm.js";import"../chunks/lodash-D3TLHRR_.esm.js";import"../utils/local-storage.esm.js";import"../chunks/share-button-BEXn6SRs.esm.js";import"../chunks/is-all-html-elements-fcB7UUA1.esm.js";import"../chunks/share-button-7um4cBYz.esm.js";import"../chunks/vendor-KKSARHWL.esm.js";import"../chunks/responsive-BR8qUfBa.esm.js";const g={en:{changeNonprofitButton:()=>"Change Nonprofit",previousImpactHeader:()=>"Your Previous Impact",previousNonprofitButton:()=>"Back to Previous Nonprofit",supportAgainButton:()=>"Support Again",via:()=>"via",showAllButton:()=>"Show All",showLessButton:()=>"Show Less"},fr:{changeNonprofitButton:()=>"Change Nonprofit",previousImpactHeader:()=>"Your Previous Impact",previousNonprofitButton:()=>"Back to Previous Nonprofit",supportAgainButton:()=>"Support Again",via:()=>"via",showAllButton:()=>"Show All",showLessButton:()=>"Show Less"},de:{changeNonprofitButton:()=>"Change Nonprofit",previousImpactHeader:()=>"Your Previous Impact",previousNonprofitButton:()=>"Back to Previous Nonprofit",supportAgainButton:()=>"Support Again",via:()=>"via",showAllButton:()=>"Show All",showLessButton:()=>"Show Less"},es:{changeNonprofitButton:()=>"Change Nonprofit",previousImpactHeader:()=>"Your Previous Impact",previousNonprofitButton:()=>"Back to Previous Nonprofit",supportAgainButton:()=>"Support Again",via:()=>"via",showAllButton:()=>"Show All",showLessButton:()=>"Show Less"},it:{changeNonprofitButton:()=>"Change Nonprofit",previousImpactHeader:()=>"Your Previous Impact",previousNonprofitButton:()=>"Back to Previous Nonprofit",supportAgainButton:()=>"Support Again",via:()=>"via",showAllButton:()=>"Show All",showLessButton:()=>"Show Less"},pl:{changeNonprofitButton:()=>"Change Nonprofit",previousImpactHeader:()=>"Your Previous Impact",previousNonprofitButton:()=>"Back to Previous Nonprofit",supportAgainButton:()=>"Support Again",via:()=>"via",showAllButton:()=>"Show All",showLessButton:()=>"Show Less"}};var X=Object.defineProperty,i=(M,t,n,s)=>{for(var a=void 0,b=M.length-1,m;b>=0;b--)(m=M[b])&&(a=m(t,n,a)||a);return a&&X(t,n,a),a};const $=3,Z=0,tt=1,et=98;class e extends H{constructor(){super(...arguments),this.baseUrl=R,this.lang="en",this.debug=!1,this.draftConfig=!1,this.activeWidget=null,this.nonprofitId=null,this.beamUserId=null,this.eligibleNonprofits=[],this.showAllTiles=!1,this.isMobile=window.innerWidth<720,this.dropdownVisible=!1,this.emojis=["\u{1F44F}","\u{1F4AA}","\u{1F64C}","\u2728","\u{1F947}"],this.subscriptionDataController=new y(this,this.fetchSubscription),this.eligibleNonprofitsDataController=new y(this,this.fetchEligibleNonprofits),this.personalImpactDataController=new y(this,this.fetchImpact)}get configLang(){return _[this.lang]||"en"}async firstUpdated(){if(!this.email&&!this.partnerUserId)throw new q(["email","partnerUserId"],"One of the following properties needs to be specified: email, partnerUserId ");S(["apiKey","subscriptionId"],this),await this.loadWidget()}async loadWidget(){await Promise.all([this.fetchEligibleNonprofits(),this.fetchSubscription()]),await this.fetchImpact(),this.activeWidget=this.nonprofitId?"subscription-impact":"select-subscription-nonprofit"}async fetchEligibleNonprofits(){S(["apiKey","subscriptionId"],this);const t=await j({baseUrl:this.baseUrl,headers:x(this.apiKey),requestBody:{storeId:this.storeId||void 0,postalCode:this.postalCode||void 0,countryCode:this.countryCode||void 0,widgetName:B.subscription_management,version:"1.0.0"}});return this.storeId=t.store.id,this.eligibleNonprofits=t.nonprofits,this.eligibleNonprofitsDataController.data=t,t}async fetchSubscription(){S(["apiKey","subscriptionId"],this);const t=await K({baseUrl:this.baseUrl,headers:x(this.apiKey),requestBody:{remoteSubscriptionId:this.subscriptionId,email:this.email,partnerUserId:this.partnerUserId}});return this.beamUserId=t.beamUserId,this.nonprofitId=t.nonprofit?.id||null,t}async fetchImpact(){S(["apiKey"],this);const t=await F({baseUrl:this.baseUrl,headers:x(this.apiKey),queryParams:{beamUserId:this.beamUserId?this.beamUserId:void 0,widgetName:"subscription-management",version:"1.0.0",lang:this.configLang}});return this.personalImpactDataController.data=t,t}getDisplayablePreviousImpacts(){const t=this.personalImpactDataController.data?.personal;return!t||t?.length<1?[]:t.filter(n=>!(!n.nonprofit.includeInPersonalImpact||n.nonprofit.id===this.nonprofitId&&(!n.impact.goalCompletionText||n.impact.goalCompletionText?.length<1)))}handleSwapNonprofitButtonClick(){this.activeWidget="select-subscription-nonprofit"}handleBackToSubscriptionImpactButtonClick(){this.activeWidget="subscription-impact"}handleSupportAgainButtonClick(t,n){this.activeWidget="select-subscription-nonprofit",this.selectedNonprofitId=t;const s=new N({selectedNonprofitId:t,nonprofitName:n,source:B.subscription_management});this.dispatchEvent(s)}handleNonprofitSelect(t){if(!(t instanceof N))return;const{selectedNonprofitId:n}=t.detail;this.nonprofitId=n??null,this.activeWidget="subscription-impact"}isNonprofitEligible(t){return this.eligibleNonprofits.some(n=>n.nonprofit.id===t)}shouldDisplayProgressBar(t){return t>tt&&t<et}get cssVariables(){const t={...J,...O,"--beam-fontFamily":"inherit","--beam-fontStyle":"inherit","--beam-fontSize":"inherit","--beam-textColor":"inherit","--beam-backgroundColor":"inherit","--beam-SubscriptionManagement-widgetContainer-borderColor":"#d5d5d5","--beam-SubscriptionManagement-widgetContainer-borderRadius":"4px","--beam-SubscriptionManagement-widgetContainer-padding":"8px 20px","--beam-SubscriptionManagement-widgetContainer-backgroundColor":"inherit","--beam-SubscriptionManagement-widgetContainer-maxWidth":"820px","--beam-SubscriptionManagement-logo-align-desktop":"left","--beam-SubscriptionManagement-logo-align-mobile":"center","--beam-SubscriptionManagement-previousImpact-cardStyle":"'selected_icon'","--beam-SubscriptionManagement-header-padding":"10px 20px 10px 0px","--beam-SubscriptionManagement-header-borderRadius":"0px","--beam-SubscriptionManagement-header-backgroundColor":"#fff","--beam-SubscriptionManagement-header-meatballsMenu-fontSize":"24px","--beam-SubscriptionManagement-header-meatballsMenu-color":"24px","--beam-SubscriptionManagement-lineBreak-color":"#ddd","--beam-SubscriptionManagement-lineBreak-width":"1px","--beam-SubscriptionManagement-lineBreak-margin":"10px 0 20px 0","--beam-SubscriptionManagement-tile-marginBottom":"20px","--beam-SubscriptionManagement-tile-border-width":"0px","--beam-SubscriptionManagement-tile-border-color":"#ddd","--beam-SubscriptionManagement-tile-padding":"12.5px","--beam-SubscriptionManagement-tile-borderRadius":"8px","--beam-SubscriptionManagement-tile-background":"#f8fbfb","--beam-SubscriptionManagement-tileContent-gap":" 15px","--beam-SubscriptionManagement-tileContent-padding":"5px 0px","--beam-SubscriptionManagement-tile-icon-borderRadius":"4px","--beam-SubscriptionManagement-tile-icon-height":"28px","--beam-SubscriptionManagement-tile-icon-background-borderRadius":"50%","--beam-SubscriptionManagement-tile-icon-background-width":"50px","--beam-SubscriptionManagement-tile-icon-background-height":"50px","--beam-SubscriptionManagement-tile-icon-background-backgroundColor":"#0a323c","--beam-SubscriptionManagement-tile-icon-background-padding":"10px","--beam-SubscriptionManagement-blockTileDescription-gap":"5px","--beam-SubscriptionManagement-blockTileDescription-padding":"0px","--beam-SubscriptionManagement-blockTileDescription-lineHeight":"130%","--beam-SubscriptionManagement-blockTileDescription-progressBar-width-desktop":"60%","--beam-SubscriptionManagement-blockTileDescription-progressBar-width-mobile":"100%","--beam-SubscriptionManagement-subWidgetContainer-padding":"0px 0px 10px","--beam-SubscriptionManagement-previousImpactContainer-padding-desktop":"10px 24px 10px 0px","--beam-SubscriptionManagement-previousImpactContainer-padding-mobile":"0px","--beam-SubscriptionManagement-dropDown-padding":"15px 8px","--beam-SubscriptionManagement-dropDown-borderRadius":"8px","--beam-SubscriptionManagement-dropDown-backgroundColor":"#f8fbfb","--beam-SubscriptionManagement-dropDown-boxShadow":"0px 4px 28px 0px rgba(0, 0, 0, 0.04)","--beam-SubscriptionManagement-dropDown-width":"128px","--beam-SubscriptionManagement-dropDown-hover-backgroundColor":"#E1F1EE","--beam-SubscriptionManagement-dropDownOptions-textDecoration":"underline",...c("--beam-SubscriptionManagement-dropDownOptions",{fontSize:"12px",fontWeight:"400",textTransform:"capitalize",fontStyle:"normal",color:"#0a323c"}),"--beam-SubscriptionManagement-yourPreviousImpactTitle-marginBottom":"15px",...c("--beam-SubscriptionManagement-yourPreviousImpactTitle",{fontSize:"18px",fontWeight:"bold",lineHeight:"120%",textTransform:"capitalize",fontStyle:"normal",color:"#0a323c"}),"--beam-SubscriptionManagement-yourPreviousImpact-showAllButton-textDecoration":"underline",...c("--beam-SubscriptionManagement-yourPreviousImpact-showAllButton",{fontSize:"12px",fontWeight:"bold",lineHeight:"120%",textTransform:"capitalize",fontStyle:"normal",color:"#0a323c"}),"--beam-SubscriptionManagement-tile-title-letterSpacing":"0.36px",...c("--beam-SubscriptionManagement-tile-title",{fontSize:"12px",fontWeight:"bold",lineHeight:"120%",textTransform:"uppercase",fontStyle:"normal",color:"#0a323c"}),...c("--beam-SubscriptionManagement-tile-description",{fontSize:"14px",lineHeight:"120%",fontStyle:"normal",color:"#454a47"}),...c("--beam-SubscriptionManagement-tile-via",{fontSize:"14px",lineHeight:"120%",fontStyle:"normal",color:"#454a47"}),"--beam-SubscriptionManagement-tile-nonprofitLink-textDecoration":"underline",...c("--beam-SubscriptionManagement-tile-nonprofitLink",{fontSize:"14px",fontWeight:"400",lineHeight:"120%",textTransform:"capitalize",fontStyle:"normal",color:"#0a323c"}),"--beam-SubscriptionManagement-tile-supportAgainButton-textDecoration":"underline",...c("--beam-SubscriptionManagement-tile-supportAgainButton",{fontSize:"14px",fontWeight:"400",lineHeight:"120%",textTransform:"capitalize",fontStyle:"normal",color:"#0a323c"}),"--beam-SubscriptionManagement-tile-progressBarLabel-marginLeft":"8px",...c("--beam-SubscriptionManagement-tile-progressBarLabel",{fontSize:"10px",fontWeight:"bold",fontStyle:"normal",color:"#878a92"}),"--beam-SubscriptionManagement-tile-fundedAmount-lineHeight":"16px",...c("--beam-SubscriptionManagement-tile-fundedAmount",{fontSize:"14px",fontWeight:"400",lineHeight:"120%",fontStyle:"italic",color:"#0a323c"})},n=this.eligibleNonprofitsDataController?.data?.config?.web?.theme||{},s={...t,...n};return Object.assign(Object.create({toCSS(){return G(this)}}),s)}renderPreviousImpactTiles({personalImpact:t,cardStyle:n,eligibleNonprofitConfig:s}){if(!t)return o``;if(!s)return o``;const a=this.showAllTiles?t:t.slice(0,$);let b=0;return o`
|
|
2
2
|
${a.map(m=>{const{impact:{goalCompletionText:u,description:h,goalProgressPercentage:f,goalProgressText:A},nonprofit:{cause:C,causeIconSelectedUrl:L,causeIconUrl:T,website:P,name:I,id:w}}=m,k=this.nonprofitId!==w&&this.isNonprofitEligible(w),U=k&&this.shouldDisplayProgressBar(f),W=u?`${this.emojis[b]} `:"";return b=(b+1)%this.emojis.length,o`
|
|
3
3
|
<div class="tile">
|
|
4
4
|
<div class="tile-header">
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{f as z,g as r,t as d,h as H,y as o,k as E}from"../chunks/lit-WqMxC_PA.esm.js";import{D as R,S as _,d as j,W as B,e as K,g as F}from"../chunks/routes-Bw7hn3RL.esm.js";import{p as O}from"../chunks/progress-bar-DF7UuuHb.esm.js";import{c as V,d as Y,e as S}from"../chunks/enforce-config-Ba1JkOHs.esm.js";import{u as l,A as y,d as c,a as G,i as p,_ as v}from"../chunks/localize-C25pEGnx.esm.js";import{c as N}from"../chunks/events-DahlkyxO.esm.js";import{M as q}from"../chunks/beam-errors-Ci0d3926.esm.js";import"./select-subscription-nonprofit.js";import"./subscription-impact.js";import{partnerLogosConfigDefaults as J}from"./beam-partner-logos.js";import{makeApiKeyHeader as x}from"../utils/makeApiKeyHeader.js";import{_ as D}from"../chunks/loading-template-DG4lkIIc.esm.js";import{c as Q}from"../chunks/css-card-grid-CvoGpsJH.esm.js";import"../chunks/promo-types-DKAOFHJr.esm.js";import"../utils/logger.js";import"../chunks/lodash-D3TLHRR_.esm.js";import"../utils/local-storage.js";import"../chunks/share-button-gAbnieb4.esm.js";import"../chunks/is-all-html-elements-fcB7UUA1.esm.js";import"../chunks/share-button-G4zNdeOS.esm.js";import"../chunks/vendor-KKSARHWL.esm.js";import"../chunks/responsive-BR8qUfBa.esm.js";const g={en:{changeNonprofitButton:()=>"Change Nonprofit",previousImpactHeader:()=>"Your Previous Impact",previousNonprofitButton:()=>"Back to Previous Nonprofit",supportAgainButton:()=>"Support Again",via:()=>"via",showAllButton:()=>"Show All",showLessButton:()=>"Show Less"},fr:{changeNonprofitButton:()=>"Change Nonprofit",previousImpactHeader:()=>"Your Previous Impact",previousNonprofitButton:()=>"Back to Previous Nonprofit",supportAgainButton:()=>"Support Again",via:()=>"via",showAllButton:()=>"Show All",showLessButton:()=>"Show Less"},de:{changeNonprofitButton:()=>"Change Nonprofit",previousImpactHeader:()=>"Your Previous Impact",previousNonprofitButton:()=>"Back to Previous Nonprofit",supportAgainButton:()=>"Support Again",via:()=>"via",showAllButton:()=>"Show All",showLessButton:()=>"Show Less"},es:{changeNonprofitButton:()=>"Change Nonprofit",previousImpactHeader:()=>"Your Previous Impact",previousNonprofitButton:()=>"Back to Previous Nonprofit",supportAgainButton:()=>"Support Again",via:()=>"via",showAllButton:()=>"Show All",showLessButton:()=>"Show Less"},it:{changeNonprofitButton:()=>"Change Nonprofit",previousImpactHeader:()=>"Your Previous Impact",previousNonprofitButton:()=>"Back to Previous Nonprofit",supportAgainButton:()=>"Support Again",via:()=>"via",showAllButton:()=>"Show All",showLessButton:()=>"Show Less"},pl:{changeNonprofitButton:()=>"Change Nonprofit",previousImpactHeader:()=>"Your Previous Impact",previousNonprofitButton:()=>"Back to Previous Nonprofit",supportAgainButton:()=>"Support Again",via:()=>"via",showAllButton:()=>"Show All",showLessButton:()=>"Show Less"}};var X=Object.defineProperty,i=(M,t,n,s)=>{for(var a=void 0,b=M.length-1,m;b>=0;b--)(m=M[b])&&(a=m(t,n,a)||a);return a&&X(t,n,a),a};const $=3,Z=0,tt=1,et=98;class e extends H{constructor(){super(...arguments),this.baseUrl=R,this.lang="en",this.debug=!1,this.draftConfig=!1,this.activeWidget=null,this.nonprofitId=null,this.beamUserId=null,this.eligibleNonprofits=[],this.showAllTiles=!1,this.isMobile=window.innerWidth<720,this.dropdownVisible=!1,this.emojis=["\u{1F44F}","\u{1F4AA}","\u{1F64C}","\u2728","\u{1F947}"],this.subscriptionDataController=new y(this,this.fetchSubscription),this.eligibleNonprofitsDataController=new y(this,this.fetchEligibleNonprofits),this.personalImpactDataController=new y(this,this.fetchImpact)}get configLang(){return _[this.lang]||"en"}async firstUpdated(){if(!this.email&&!this.partnerUserId)throw new q(["email","partnerUserId"],"One of the following properties needs to be specified: email, partnerUserId ");S(["apiKey","subscriptionId"],this),await this.loadWidget()}async loadWidget(){await Promise.all([this.fetchEligibleNonprofits(),this.fetchSubscription()]),await this.fetchImpact(),this.activeWidget=this.nonprofitId?"subscription-impact":"select-subscription-nonprofit"}async fetchEligibleNonprofits(){S(["apiKey","subscriptionId"],this);const t=await j({baseUrl:this.baseUrl,headers:x(this.apiKey),requestBody:{storeId:this.storeId||void 0,postalCode:this.postalCode||void 0,countryCode:this.countryCode||void 0,widgetName:B.subscription_management,version:"1.0.0"}});return this.storeId=t.store.id,this.eligibleNonprofits=t.nonprofits,this.eligibleNonprofitsDataController.data=t,t}async fetchSubscription(){S(["apiKey","subscriptionId"],this);const t=await K({baseUrl:this.baseUrl,headers:x(this.apiKey),requestBody:{remoteSubscriptionId:this.subscriptionId,email:this.email,partnerUserId:this.partnerUserId}});return this.beamUserId=t.beamUserId,this.nonprofitId=t.nonprofit?.id||null,t}async fetchImpact(){S(["apiKey"],this);const t=await F({baseUrl:this.baseUrl,headers:x(this.apiKey),queryParams:{beamUserId:this.beamUserId?this.beamUserId:void 0,widgetName:"subscription-management",version:"1.0.0",lang:this.configLang}});return this.personalImpactDataController.data=t,t}getDisplayablePreviousImpacts(){const t=this.personalImpactDataController.data?.personal;return!t||t?.length<1?[]:t.filter(n=>!(!n.nonprofit.includeInPersonalImpact||n.nonprofit.id===this.nonprofitId&&(!n.impact.goalCompletionText||n.impact.goalCompletionText?.length<1)))}handleSwapNonprofitButtonClick(){this.activeWidget="select-subscription-nonprofit"}handleBackToSubscriptionImpactButtonClick(){this.activeWidget="subscription-impact"}handleSupportAgainButtonClick(t,n){this.activeWidget="select-subscription-nonprofit",this.selectedNonprofitId=t;const s=new N({selectedNonprofitId:t,nonprofitName:n,source:B.subscription_management});this.dispatchEvent(s)}handleNonprofitSelect(t){if(!(t instanceof N))return;const{selectedNonprofitId:n}=t.detail;this.nonprofitId=n??null,this.activeWidget="subscription-impact"}isNonprofitEligible(t){return this.eligibleNonprofits.some(n=>n.nonprofit.id===t)}shouldDisplayProgressBar(t){return t>tt&&t<et}get cssVariables(){const t={...J,...O,"--beam-fontFamily":"inherit","--beam-fontStyle":"inherit","--beam-fontSize":"inherit","--beam-textColor":"inherit","--beam-backgroundColor":"inherit","--beam-SubscriptionManagement-widgetContainer-borderColor":"#d5d5d5","--beam-SubscriptionManagement-widgetContainer-borderRadius":"4px","--beam-SubscriptionManagement-widgetContainer-padding":"8px 20px","--beam-SubscriptionManagement-widgetContainer-backgroundColor":"inherit","--beam-SubscriptionManagement-widgetContainer-maxWidth":"820px","--beam-SubscriptionManagement-logo-align-desktop":"left","--beam-SubscriptionManagement-logo-align-mobile":"center","--beam-SubscriptionManagement-previousImpact-cardStyle":"'selected_icon'","--beam-SubscriptionManagement-header-padding":"10px 20px 10px 0px","--beam-SubscriptionManagement-header-borderRadius":"0px","--beam-SubscriptionManagement-header-backgroundColor":"#fff","--beam-SubscriptionManagement-header-meatballsMenu-fontSize":"24px","--beam-SubscriptionManagement-header-meatballsMenu-color":"24px","--beam-SubscriptionManagement-lineBreak-color":"#ddd","--beam-SubscriptionManagement-lineBreak-width":"1px","--beam-SubscriptionManagement-lineBreak-margin":"10px 0 20px 0","--beam-SubscriptionManagement-tile-marginBottom":"20px","--beam-SubscriptionManagement-tile-border-width":"0px","--beam-SubscriptionManagement-tile-border-color":"#ddd","--beam-SubscriptionManagement-tile-padding":"12.5px","--beam-SubscriptionManagement-tile-borderRadius":"8px","--beam-SubscriptionManagement-tile-background":"#f8fbfb","--beam-SubscriptionManagement-tileContent-gap":" 15px","--beam-SubscriptionManagement-tileContent-padding":"5px 0px","--beam-SubscriptionManagement-tile-icon-borderRadius":"4px","--beam-SubscriptionManagement-tile-icon-height":"28px","--beam-SubscriptionManagement-tile-icon-background-borderRadius":"50%","--beam-SubscriptionManagement-tile-icon-background-width":"50px","--beam-SubscriptionManagement-tile-icon-background-height":"50px","--beam-SubscriptionManagement-tile-icon-background-backgroundColor":"#0a323c","--beam-SubscriptionManagement-tile-icon-background-padding":"10px","--beam-SubscriptionManagement-blockTileDescription-gap":"5px","--beam-SubscriptionManagement-blockTileDescription-padding":"0px","--beam-SubscriptionManagement-blockTileDescription-lineHeight":"130%","--beam-SubscriptionManagement-blockTileDescription-progressBar-width-desktop":"60%","--beam-SubscriptionManagement-blockTileDescription-progressBar-width-mobile":"100%","--beam-SubscriptionManagement-subWidgetContainer-padding":"0px 0px 10px","--beam-SubscriptionManagement-previousImpactContainer-padding-desktop":"10px 24px 10px 0px","--beam-SubscriptionManagement-previousImpactContainer-padding-mobile":"0px","--beam-SubscriptionManagement-dropDown-padding":"15px 8px","--beam-SubscriptionManagement-dropDown-borderRadius":"8px","--beam-SubscriptionManagement-dropDown-backgroundColor":"#f8fbfb","--beam-SubscriptionManagement-dropDown-boxShadow":"0px 4px 28px 0px rgba(0, 0, 0, 0.04)","--beam-SubscriptionManagement-dropDown-width":"128px","--beam-SubscriptionManagement-dropDown-hover-backgroundColor":"#E1F1EE","--beam-SubscriptionManagement-dropDownOptions-textDecoration":"underline",...c("--beam-SubscriptionManagement-dropDownOptions",{fontSize:"12px",fontWeight:"400",textTransform:"capitalize",fontStyle:"normal",color:"#0a323c"}),"--beam-SubscriptionManagement-yourPreviousImpactTitle-marginBottom":"15px",...c("--beam-SubscriptionManagement-yourPreviousImpactTitle",{fontSize:"18px",fontWeight:"bold",lineHeight:"120%",textTransform:"capitalize",fontStyle:"normal",color:"#0a323c"}),"--beam-SubscriptionManagement-yourPreviousImpact-showAllButton-textDecoration":"underline",...c("--beam-SubscriptionManagement-yourPreviousImpact-showAllButton",{fontSize:"12px",fontWeight:"bold",lineHeight:"120%",textTransform:"capitalize",fontStyle:"normal",color:"#0a323c"}),"--beam-SubscriptionManagement-tile-title-letterSpacing":"0.36px",...c("--beam-SubscriptionManagement-tile-title",{fontSize:"12px",fontWeight:"bold",lineHeight:"120%",textTransform:"uppercase",fontStyle:"normal",color:"#0a323c"}),...c("--beam-SubscriptionManagement-tile-description",{fontSize:"14px",lineHeight:"120%",fontStyle:"normal",color:"#454a47"}),...c("--beam-SubscriptionManagement-tile-via",{fontSize:"14px",lineHeight:"120%",fontStyle:"normal",color:"#454a47"}),"--beam-SubscriptionManagement-tile-nonprofitLink-textDecoration":"underline",...c("--beam-SubscriptionManagement-tile-nonprofitLink",{fontSize:"14px",fontWeight:"400",lineHeight:"120%",textTransform:"capitalize",fontStyle:"normal",color:"#0a323c"}),"--beam-SubscriptionManagement-tile-supportAgainButton-textDecoration":"underline",...c("--beam-SubscriptionManagement-tile-supportAgainButton",{fontSize:"14px",fontWeight:"400",lineHeight:"120%",textTransform:"capitalize",fontStyle:"normal",color:"#0a323c"}),"--beam-SubscriptionManagement-tile-progressBarLabel-marginLeft":"8px",...c("--beam-SubscriptionManagement-tile-progressBarLabel",{fontSize:"10px",fontWeight:"bold",fontStyle:"normal",color:"#878a92"}),"--beam-SubscriptionManagement-tile-fundedAmount-lineHeight":"16px",...c("--beam-SubscriptionManagement-tile-fundedAmount",{fontSize:"14px",fontWeight:"400",lineHeight:"120%",fontStyle:"italic",color:"#0a323c"})},n=this.eligibleNonprofitsDataController?.data?.config?.web?.theme||{},s={...t,...n};return Object.assign(Object.create({toCSS(){return G(this)}}),s)}renderPreviousImpactTiles({personalImpact:t,cardStyle:n,eligibleNonprofitConfig:s}){if(!t)return o``;if(!s)return o``;const a=this.showAllTiles?t:t.slice(0,$);let b=0;return o`
|
|
1
|
+
import{f as z,g as r,t as d,h as H,y as o,k as E}from"../chunks/lit-WqMxC_PA.esm.js";import{D as R,S as _,d as j,W as B,e as K,g as F}from"../chunks/routes-DelUpFFo.esm.js";import{p as O}from"../chunks/progress-bar-DF7UuuHb.esm.js";import{c as V,d as Y,e as S}from"../chunks/enforce-config-Ba1JkOHs.esm.js";import{u as l,A as y,d as c,a as G,i as p,_ as v}from"../chunks/localize-C25pEGnx.esm.js";import{c as N}from"../chunks/events-Dki0ka4F.esm.js";import{M as q}from"../chunks/beam-errors-Ci0d3926.esm.js";import"./select-subscription-nonprofit.js";import"./subscription-impact.js";import{partnerLogosConfigDefaults as J}from"./beam-partner-logos.js";import{makeApiKeyHeader as x}from"../utils/makeApiKeyHeader.js";import{_ as D}from"../chunks/loading-template-DG4lkIIc.esm.js";import{c as Q}from"../chunks/css-card-grid-CvoGpsJH.esm.js";import"../chunks/promo-types-DKAOFHJr.esm.js";import"../utils/logger.js";import"../chunks/lodash-D3TLHRR_.esm.js";import"../utils/local-storage.js";import"../chunks/share-button-B376j4qt.esm.js";import"../chunks/is-all-html-elements-fcB7UUA1.esm.js";import"../chunks/share-button-BZ9Dmpsy.esm.js";import"../chunks/vendor-KKSARHWL.esm.js";import"../chunks/responsive-BR8qUfBa.esm.js";const g={en:{changeNonprofitButton:()=>"Change Nonprofit",previousImpactHeader:()=>"Your Previous Impact",previousNonprofitButton:()=>"Back to Previous Nonprofit",supportAgainButton:()=>"Support Again",via:()=>"via",showAllButton:()=>"Show All",showLessButton:()=>"Show Less"},fr:{changeNonprofitButton:()=>"Change Nonprofit",previousImpactHeader:()=>"Your Previous Impact",previousNonprofitButton:()=>"Back to Previous Nonprofit",supportAgainButton:()=>"Support Again",via:()=>"via",showAllButton:()=>"Show All",showLessButton:()=>"Show Less"},de:{changeNonprofitButton:()=>"Change Nonprofit",previousImpactHeader:()=>"Your Previous Impact",previousNonprofitButton:()=>"Back to Previous Nonprofit",supportAgainButton:()=>"Support Again",via:()=>"via",showAllButton:()=>"Show All",showLessButton:()=>"Show Less"},es:{changeNonprofitButton:()=>"Change Nonprofit",previousImpactHeader:()=>"Your Previous Impact",previousNonprofitButton:()=>"Back to Previous Nonprofit",supportAgainButton:()=>"Support Again",via:()=>"via",showAllButton:()=>"Show All",showLessButton:()=>"Show Less"},it:{changeNonprofitButton:()=>"Change Nonprofit",previousImpactHeader:()=>"Your Previous Impact",previousNonprofitButton:()=>"Back to Previous Nonprofit",supportAgainButton:()=>"Support Again",via:()=>"via",showAllButton:()=>"Show All",showLessButton:()=>"Show Less"},pl:{changeNonprofitButton:()=>"Change Nonprofit",previousImpactHeader:()=>"Your Previous Impact",previousNonprofitButton:()=>"Back to Previous Nonprofit",supportAgainButton:()=>"Support Again",via:()=>"via",showAllButton:()=>"Show All",showLessButton:()=>"Show Less"}};var X=Object.defineProperty,i=(M,t,n,s)=>{for(var a=void 0,b=M.length-1,m;b>=0;b--)(m=M[b])&&(a=m(t,n,a)||a);return a&&X(t,n,a),a};const $=3,Z=0,tt=1,et=98;class e extends H{constructor(){super(...arguments),this.baseUrl=R,this.lang="en",this.debug=!1,this.draftConfig=!1,this.activeWidget=null,this.nonprofitId=null,this.beamUserId=null,this.eligibleNonprofits=[],this.showAllTiles=!1,this.isMobile=window.innerWidth<720,this.dropdownVisible=!1,this.emojis=["\u{1F44F}","\u{1F4AA}","\u{1F64C}","\u2728","\u{1F947}"],this.subscriptionDataController=new y(this,this.fetchSubscription),this.eligibleNonprofitsDataController=new y(this,this.fetchEligibleNonprofits),this.personalImpactDataController=new y(this,this.fetchImpact)}get configLang(){return _[this.lang]||"en"}async firstUpdated(){if(!this.email&&!this.partnerUserId)throw new q(["email","partnerUserId"],"One of the following properties needs to be specified: email, partnerUserId ");S(["apiKey","subscriptionId"],this),await this.loadWidget()}async loadWidget(){await Promise.all([this.fetchEligibleNonprofits(),this.fetchSubscription()]),await this.fetchImpact(),this.activeWidget=this.nonprofitId?"subscription-impact":"select-subscription-nonprofit"}async fetchEligibleNonprofits(){S(["apiKey","subscriptionId"],this);const t=await j({baseUrl:this.baseUrl,headers:x(this.apiKey),requestBody:{storeId:this.storeId||void 0,postalCode:this.postalCode||void 0,countryCode:this.countryCode||void 0,widgetName:B.subscription_management,version:"1.0.0"}});return this.storeId=t.store.id,this.eligibleNonprofits=t.nonprofits,this.eligibleNonprofitsDataController.data=t,t}async fetchSubscription(){S(["apiKey","subscriptionId"],this);const t=await K({baseUrl:this.baseUrl,headers:x(this.apiKey),requestBody:{remoteSubscriptionId:this.subscriptionId,email:this.email,partnerUserId:this.partnerUserId}});return this.beamUserId=t.beamUserId,this.nonprofitId=t.nonprofit?.id||null,t}async fetchImpact(){S(["apiKey"],this);const t=await F({baseUrl:this.baseUrl,headers:x(this.apiKey),queryParams:{beamUserId:this.beamUserId?this.beamUserId:void 0,widgetName:"subscription-management",version:"1.0.0",lang:this.configLang}});return this.personalImpactDataController.data=t,t}getDisplayablePreviousImpacts(){const t=this.personalImpactDataController.data?.personal;return!t||t?.length<1?[]:t.filter(n=>!(!n.nonprofit.includeInPersonalImpact||n.nonprofit.id===this.nonprofitId&&(!n.impact.goalCompletionText||n.impact.goalCompletionText?.length<1)))}handleSwapNonprofitButtonClick(){this.activeWidget="select-subscription-nonprofit"}handleBackToSubscriptionImpactButtonClick(){this.activeWidget="subscription-impact"}handleSupportAgainButtonClick(t,n){this.activeWidget="select-subscription-nonprofit",this.selectedNonprofitId=t;const s=new N({selectedNonprofitId:t,nonprofitName:n,source:B.subscription_management});this.dispatchEvent(s)}handleNonprofitSelect(t){if(!(t instanceof N))return;const{selectedNonprofitId:n}=t.detail;this.nonprofitId=n??null,this.activeWidget="subscription-impact"}isNonprofitEligible(t){return this.eligibleNonprofits.some(n=>n.nonprofit.id===t)}shouldDisplayProgressBar(t){return t>tt&&t<et}get cssVariables(){const t={...J,...O,"--beam-fontFamily":"inherit","--beam-fontStyle":"inherit","--beam-fontSize":"inherit","--beam-textColor":"inherit","--beam-backgroundColor":"inherit","--beam-SubscriptionManagement-widgetContainer-borderColor":"#d5d5d5","--beam-SubscriptionManagement-widgetContainer-borderRadius":"4px","--beam-SubscriptionManagement-widgetContainer-padding":"8px 20px","--beam-SubscriptionManagement-widgetContainer-backgroundColor":"inherit","--beam-SubscriptionManagement-widgetContainer-maxWidth":"820px","--beam-SubscriptionManagement-logo-align-desktop":"left","--beam-SubscriptionManagement-logo-align-mobile":"center","--beam-SubscriptionManagement-previousImpact-cardStyle":"'selected_icon'","--beam-SubscriptionManagement-header-padding":"10px 20px 10px 0px","--beam-SubscriptionManagement-header-borderRadius":"0px","--beam-SubscriptionManagement-header-backgroundColor":"#fff","--beam-SubscriptionManagement-header-meatballsMenu-fontSize":"24px","--beam-SubscriptionManagement-header-meatballsMenu-color":"24px","--beam-SubscriptionManagement-lineBreak-color":"#ddd","--beam-SubscriptionManagement-lineBreak-width":"1px","--beam-SubscriptionManagement-lineBreak-margin":"10px 0 20px 0","--beam-SubscriptionManagement-tile-marginBottom":"20px","--beam-SubscriptionManagement-tile-border-width":"0px","--beam-SubscriptionManagement-tile-border-color":"#ddd","--beam-SubscriptionManagement-tile-padding":"12.5px","--beam-SubscriptionManagement-tile-borderRadius":"8px","--beam-SubscriptionManagement-tile-background":"#f8fbfb","--beam-SubscriptionManagement-tileContent-gap":" 15px","--beam-SubscriptionManagement-tileContent-padding":"5px 0px","--beam-SubscriptionManagement-tile-icon-borderRadius":"4px","--beam-SubscriptionManagement-tile-icon-height":"28px","--beam-SubscriptionManagement-tile-icon-background-borderRadius":"50%","--beam-SubscriptionManagement-tile-icon-background-width":"50px","--beam-SubscriptionManagement-tile-icon-background-height":"50px","--beam-SubscriptionManagement-tile-icon-background-backgroundColor":"#0a323c","--beam-SubscriptionManagement-tile-icon-background-padding":"10px","--beam-SubscriptionManagement-blockTileDescription-gap":"5px","--beam-SubscriptionManagement-blockTileDescription-padding":"0px","--beam-SubscriptionManagement-blockTileDescription-lineHeight":"130%","--beam-SubscriptionManagement-blockTileDescription-progressBar-width-desktop":"60%","--beam-SubscriptionManagement-blockTileDescription-progressBar-width-mobile":"100%","--beam-SubscriptionManagement-subWidgetContainer-padding":"0px 0px 10px","--beam-SubscriptionManagement-previousImpactContainer-padding-desktop":"10px 24px 10px 0px","--beam-SubscriptionManagement-previousImpactContainer-padding-mobile":"0px","--beam-SubscriptionManagement-dropDown-padding":"15px 8px","--beam-SubscriptionManagement-dropDown-borderRadius":"8px","--beam-SubscriptionManagement-dropDown-backgroundColor":"#f8fbfb","--beam-SubscriptionManagement-dropDown-boxShadow":"0px 4px 28px 0px rgba(0, 0, 0, 0.04)","--beam-SubscriptionManagement-dropDown-width":"128px","--beam-SubscriptionManagement-dropDown-hover-backgroundColor":"#E1F1EE","--beam-SubscriptionManagement-dropDownOptions-textDecoration":"underline",...c("--beam-SubscriptionManagement-dropDownOptions",{fontSize:"12px",fontWeight:"400",textTransform:"capitalize",fontStyle:"normal",color:"#0a323c"}),"--beam-SubscriptionManagement-yourPreviousImpactTitle-marginBottom":"15px",...c("--beam-SubscriptionManagement-yourPreviousImpactTitle",{fontSize:"18px",fontWeight:"bold",lineHeight:"120%",textTransform:"capitalize",fontStyle:"normal",color:"#0a323c"}),"--beam-SubscriptionManagement-yourPreviousImpact-showAllButton-textDecoration":"underline",...c("--beam-SubscriptionManagement-yourPreviousImpact-showAllButton",{fontSize:"12px",fontWeight:"bold",lineHeight:"120%",textTransform:"capitalize",fontStyle:"normal",color:"#0a323c"}),"--beam-SubscriptionManagement-tile-title-letterSpacing":"0.36px",...c("--beam-SubscriptionManagement-tile-title",{fontSize:"12px",fontWeight:"bold",lineHeight:"120%",textTransform:"uppercase",fontStyle:"normal",color:"#0a323c"}),...c("--beam-SubscriptionManagement-tile-description",{fontSize:"14px",lineHeight:"120%",fontStyle:"normal",color:"#454a47"}),...c("--beam-SubscriptionManagement-tile-via",{fontSize:"14px",lineHeight:"120%",fontStyle:"normal",color:"#454a47"}),"--beam-SubscriptionManagement-tile-nonprofitLink-textDecoration":"underline",...c("--beam-SubscriptionManagement-tile-nonprofitLink",{fontSize:"14px",fontWeight:"400",lineHeight:"120%",textTransform:"capitalize",fontStyle:"normal",color:"#0a323c"}),"--beam-SubscriptionManagement-tile-supportAgainButton-textDecoration":"underline",...c("--beam-SubscriptionManagement-tile-supportAgainButton",{fontSize:"14px",fontWeight:"400",lineHeight:"120%",textTransform:"capitalize",fontStyle:"normal",color:"#0a323c"}),"--beam-SubscriptionManagement-tile-progressBarLabel-marginLeft":"8px",...c("--beam-SubscriptionManagement-tile-progressBarLabel",{fontSize:"10px",fontWeight:"bold",fontStyle:"normal",color:"#878a92"}),"--beam-SubscriptionManagement-tile-fundedAmount-lineHeight":"16px",...c("--beam-SubscriptionManagement-tile-fundedAmount",{fontSize:"14px",fontWeight:"400",lineHeight:"120%",fontStyle:"italic",color:"#0a323c"})},n=this.eligibleNonprofitsDataController?.data?.config?.web?.theme||{},s={...t,...n};return Object.assign(Object.create({toCSS(){return G(this)}}),s)}renderPreviousImpactTiles({personalImpact:t,cardStyle:n,eligibleNonprofitConfig:s}){if(!t)return o``;if(!s)return o``;const a=this.showAllTiles?t:t.slice(0,$);let b=0;return o`
|
|
2
2
|
${a.map(m=>{const{impact:{goalCompletionText:u,description:h,goalProgressPercentage:f,goalProgressText:A},nonprofit:{cause:C,causeIconSelectedUrl:L,causeIconUrl:T,website:P,name:I,id:w}}=m,k=this.nonprofitId!==w&&this.isNonprofitEligible(w),U=k&&this.shouldDisplayProgressBar(f),W=u?`${this.emojis[b]} `:"";return b=(b+1)%this.emojis.length,o`
|
|
3
3
|
<div class="tile">
|
|
4
4
|
<div class="tile-header">
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export { i as WebComponents } from './chunks/index-DXj15KHe.esm.js';
|
|
2
|
-
export { i as Integrations } from './chunks/index-
|
|
2
|
+
export { i as Integrations } from './chunks/index-B6EWjlNI.esm.js';
|
|
3
3
|
export { i as ReactComponents } from './chunks/index-DbaDUPup.esm.js';
|
|
4
|
-
export { i as Utils } from './chunks/index-
|
|
4
|
+
export { i as Utils } from './chunks/index-DjSzY8-j.esm.js';
|
|
5
5
|
import './components/community-impact.js';
|
|
6
6
|
import 'lit';
|
|
7
7
|
import 'lit-html';
|
|
@@ -25,9 +25,9 @@ import './components/select-subscription-nonprofit.js';
|
|
|
25
25
|
import './components/subscription-impact.js';
|
|
26
26
|
import './components/product-details-page.js';
|
|
27
27
|
import './components/social-share.js';
|
|
28
|
-
import './chunks/index-
|
|
28
|
+
import './chunks/index-OTDSwrqr.esm.js';
|
|
29
29
|
import './chunks/beam-errors-CCe004HS.esm.js';
|
|
30
|
-
import './chunks/events-
|
|
30
|
+
import './chunks/events-C55rozsO.esm.js';
|
|
31
31
|
import './chunks/promo-types-Cz_Zkjy1.esm.js';
|
|
32
32
|
import './utils/logger.js';
|
|
33
33
|
import './utils/network-listeners.js';
|
package/dist/index.esm.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{i as ao}from"./chunks/index-
|
|
1
|
+
import{i as ao}from"./chunks/index-MGQHF6Jd.esm.js";import{i as fo}from"./chunks/index-B9cvR1bA.esm.js";import{i as Co}from"./chunks/index-C3hpHWh1.esm.js";import{i as co}from"./chunks/index-Ct1m4IjM.esm.js";import"./components/community-impact.esm.js";import"./chunks/lit-WqMxC_PA.esm.js";import"./chunks/progress-bar-DF7UuuHb.esm.js";import"./components/beam-partner-logos.esm.js";import"./chunks/enforce-config-CZ3ToOgr.esm.js";import"./chunks/beam-errors-Ci0d3926.esm.js";import"./utils/logger.esm.js";import"./chunks/localize-Btu9xYcE.esm.js";import"./chunks/routes-DCT5U9dA.esm.js";import"./chunks/promo-types-DKAOFHJr.esm.js";import"./chunks/loading-template-DG4lkIIc.esm.js";import"./chunks/css-card-grid-CvoGpsJH.esm.js";import"./components/cumulative-impact.esm.js";import"./chunks/lodash-D3TLHRR_.esm.js";import"./chunks/is-all-html-elements-fcB7UUA1.esm.js";import"./components/impact-overview.esm.js";import"./chunks/_share-dialog-dependencies-DQlABdY4.esm.js";import"./chunks/vendor-KKSARHWL.esm.js";import"./chunks/share-button-BEXn6SRs.esm.js";import"./chunks/share-button-7um4cBYz.esm.js";import"./chunks/responsive-BR8qUfBa.esm.js";import"./components/select-nonprofit.esm.js";import"./chunks/promo-pill-label-CbW_Vcru.esm.js";import"./chunks/events-Dki0ka4F.esm.js";import"./utils/local-storage.esm.js";import"./utils/promoManager.esm.js";import"./utils/cookies.esm.js";import"./chunks/cart-contents-DkoytiZh.esm.js";import"./utils/cart.esm.js";import"./chunks/index-Bp9sWMsk.esm.js";import"./components/post-purchase.esm.js";import"./components/subscription-management.esm.js";import"./components/select-subscription-nonprofit.esm.js";import"./utils/makeApiKeyHeader.esm.js";import"./components/subscription-impact.esm.js";import"./components/product-details-page.esm.js";import"./components/social-share.esm.js";import"./chunks/index-CGKJagBi.esm.js";import"./utils/network-listeners.esm.js";import"./utils/wait-for-element.esm.js";import"./utils/remote-session.esm.js";import"./utils/memoize-last.esm.js";import"./chunks/index-BBU6h_u0.esm.js";import"./chunks/order-page-Bowqodk5.esm.js";import"./chunks/update-cart-BGAM3i5j.esm.js";import"./chunks/index-IKiJwo5v.esm.js";import"./chunks/index-Dw8XJ6pi.esm.js";import"./chunks/index-BzcA5RKX.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";import"./react/subscription-management.esm.js";import"./react/select-subscription-nonprofit.esm.js";import"./react/subscription-impact.esm.js";import"./react/product-details-page.esm.js";import"./react/social-share.esm.js";export{fo as Integrations,Co as ReactComponents,co as Utils,ao as WebComponents};
|
|
2
2
|
//# sourceMappingURL=index.esm.js.map
|
package/dist/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{i as ao}from"./chunks/index-
|
|
1
|
+
import{i as ao}from"./chunks/index-ayo08Z4n.esm.js";import{i as fo}from"./chunks/index-VrM10qBv.esm.js";import{i as Co}from"./chunks/index-D6qJfs7_.esm.js";import{i as co}from"./chunks/index-tbwbkOdj.esm.js";import"./components/community-impact.js";import"./chunks/lit-WqMxC_PA.esm.js";import"./chunks/progress-bar-DF7UuuHb.esm.js";import"./components/beam-partner-logos.js";import"./chunks/enforce-config-Ba1JkOHs.esm.js";import"./chunks/beam-errors-Ci0d3926.esm.js";import"./utils/logger.js";import"./chunks/localize-C25pEGnx.esm.js";import"./chunks/routes-DelUpFFo.esm.js";import"./chunks/promo-types-DKAOFHJr.esm.js";import"./chunks/loading-template-DG4lkIIc.esm.js";import"./chunks/css-card-grid-CvoGpsJH.esm.js";import"./components/cumulative-impact.js";import"./chunks/lodash-D3TLHRR_.esm.js";import"./chunks/is-all-html-elements-fcB7UUA1.esm.js";import"./components/impact-overview.js";import"./chunks/_share-dialog-dependencies-Dg-9riak.esm.js";import"./chunks/vendor-KKSARHWL.esm.js";import"./chunks/share-button-B376j4qt.esm.js";import"./chunks/share-button-BZ9Dmpsy.esm.js";import"./chunks/responsive-BR8qUfBa.esm.js";import"./components/select-nonprofit.js";import"./chunks/promo-pill-label-CbW_Vcru.esm.js";import"./chunks/events-Dki0ka4F.esm.js";import"./utils/local-storage.js";import"./utils/promoManager.js";import"./utils/cookies.js";import"./chunks/cart-contents-DkoytiZh.esm.js";import"./utils/cart.js";import"./chunks/index-DA4pws6n.esm.js";import"./components/post-purchase.js";import"./components/subscription-management.js";import"./components/select-subscription-nonprofit.js";import"./utils/makeApiKeyHeader.js";import"./components/subscription-impact.js";import"./components/product-details-page.js";import"./components/social-share.js";import"./chunks/index-DBb5HSkR.esm.js";import"./utils/network-listeners.js";import"./utils/wait-for-element.js";import"./utils/remote-session.js";import"./utils/memoize-last.js";import"./chunks/index-BXVkhkpJ.esm.js";import"./chunks/order-page-C2wPfn6k.esm.js";import"./chunks/update-cart-pMo1b75q.esm.js";import"./chunks/index-BNjsFEGn.esm.js";import"./chunks/index-BJWJMzYy.esm.js";import"./chunks/index-Cb7X_azQ.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";import"./react/subscription-management.js";import"./react/select-subscription-nonprofit.js";import"./react/subscription-impact.js";import"./react/product-details-page.js";import"./react/social-share.js";export{fo as Integrations,Co as ReactComponents,co as Utils,ao as WebComponents};
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{D as u,a as g}from"../chunks/routes-
|
|
1
|
+
import{D as u,a as g}from"../chunks/routes-DCT5U9dA.esm.js";import{S as y}from"../chunks/beam-errors-Ci0d3926.esm.js";import{B as h}from"../chunks/events-Dki0ka4F.esm.js";import{logger as w}from"../utils/logger.esm.js";import{s as f}from"../chunks/index-BzcA5RKX.esm.js";import"../chunks/promo-types-DKAOFHJr.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-
|
|
1
|
+
import{D as u,a as g}from"../chunks/routes-DelUpFFo.esm.js";import{S as y}from"../chunks/beam-errors-Ci0d3926.esm.js";import{B as h}from"../chunks/events-Dki0ka4F.esm.js";import{logger as w}from"../utils/logger.js";import{s as f}from"../chunks/index-Cb7X_azQ.esm.js";import"../chunks/promo-types-DKAOFHJr.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{O as b}from"../chunks/update-cart-
|
|
1
|
+
import{O as b}from"../chunks/update-cart-BGAM3i5j.esm.js";import"../chunks/lodash-D3TLHRR_.esm.js";import"../chunks/routes-DCT5U9dA.esm.js";import"../chunks/promo-types-DKAOFHJr.esm.js";import"../chunks/beam-errors-Ci0d3926.esm.js";import"../utils/logger.esm.js";import"../chunks/events-Dki0ka4F.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"../utils/promoManager.esm.js";import"../chunks/cart-contents-DkoytiZh.esm.js";import"../utils/cart.esm.js";export{b as updateCart};
|
|
2
2
|
//# sourceMappingURL=cart.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{O as b}from"../chunks/update-cart-
|
|
1
|
+
import{O as b}from"../chunks/update-cart-pMo1b75q.esm.js";import"../chunks/lodash-D3TLHRR_.esm.js";import"../chunks/routes-DelUpFFo.esm.js";import"../chunks/promo-types-DKAOFHJr.esm.js";import"../chunks/beam-errors-Ci0d3926.esm.js";import"../utils/logger.js";import"../chunks/events-Dki0ka4F.esm.js";import"../utils/local-storage.js";import"../utils/cookies.js";import"../utils/remote-session.js";import"../utils/memoize-last.js";import"../utils/promoManager.js";import"../chunks/cart-contents-DkoytiZh.esm.js";import"../utils/cart.js";export{b as updateCart};
|
|
2
2
|
//# sourceMappingURL=cart.js.map
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
export { i as Utils } from '../chunks/index-
|
|
1
|
+
export { i as Utils } from '../chunks/index-OTDSwrqr.esm.js';
|
|
2
2
|
export { i as Shopify } from '../chunks/index-1Mhh255_.esm.js';
|
|
3
3
|
export { i as Session } from '../chunks/index-C-hPf29c.esm.js';
|
|
4
4
|
export { i as Cart } from '../chunks/index-CkuCObi0.esm.js';
|
|
5
5
|
export { i as Logs } from '../chunks/index-CPVMm4wx.esm.js';
|
|
6
6
|
import '../chunks/beam-errors-CCe004HS.esm.js';
|
|
7
|
-
import '../chunks/events-
|
|
7
|
+
import '../chunks/events-C55rozsO.esm.js';
|
|
8
8
|
import '../chunks/cart-contents-oArgpFbi.esm.js';
|
|
9
9
|
import '../chunks/openapi-spec-x9NbL7bU.esm.js';
|
|
10
10
|
import '../chunks/promo-types-Cz_Zkjy1.esm.js';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{i as H}from"../chunks/index-
|
|
1
|
+
import{i as H}from"../chunks/index-CGKJagBi.esm.js";import{i as J}from"../chunks/index-BBU6h_u0.esm.js";import{i as M}from"../chunks/index-IKiJwo5v.esm.js";import{i as O}from"../chunks/index-Dw8XJ6pi.esm.js";import{i as Q}from"../chunks/index-BzcA5RKX.esm.js";import"../chunks/beam-errors-Ci0d3926.esm.js";import"../chunks/events-Dki0ka4F.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-D3TLHRR_.esm.js";import"../utils/promoManager.esm.js";import"../chunks/promo-types-DKAOFHJr.esm.js";import"../chunks/order-page-Bowqodk5.esm.js";import"../chunks/cart-contents-DkoytiZh.esm.js";import"../chunks/update-cart-BGAM3i5j.esm.js";import"../chunks/routes-DCT5U9dA.esm.js";import"../utils/cart.esm.js";import"../components/post-purchase.esm.js";import"../chunks/lit-WqMxC_PA.esm.js";import"../chunks/enforce-config-CZ3ToOgr.esm.js";import"../chunks/localize-Btu9xYcE.esm.js";import"../chunks/index-Bp9sWMsk.esm.js";import"../chunks/progress-bar-DF7UuuHb.esm.js";import"../chunks/promo-pill-label-CbW_Vcru.esm.js";import"../chunks/vendor-KKSARHWL.esm.js";import"../components/beam-partner-logos.esm.js";import"../chunks/loading-template-DG4lkIIc.esm.js";import"../chunks/css-card-grid-CvoGpsJH.esm.js";import"../components/impact-overview.esm.js";import"../chunks/_share-dialog-dependencies-DQlABdY4.esm.js";import"../chunks/share-button-BEXn6SRs.esm.js";import"../chunks/is-all-html-elements-fcB7UUA1.esm.js";import"../chunks/share-button-7um4cBYz.esm.js";import"../chunks/responsive-BR8qUfBa.esm.js";export{O as Cart,Q as Logs,M as Session,J as Shopify,H as Utils};
|
|
2
2
|
//# sourceMappingURL=index.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{i as H}from"../chunks/index-
|
|
1
|
+
import{i as H}from"../chunks/index-DBb5HSkR.esm.js";import{i as J}from"../chunks/index-BXVkhkpJ.esm.js";import{i as M}from"../chunks/index-BNjsFEGn.esm.js";import{i as O}from"../chunks/index-BJWJMzYy.esm.js";import{i as Q}from"../chunks/index-Cb7X_azQ.esm.js";import"../chunks/beam-errors-Ci0d3926.esm.js";import"../chunks/events-Dki0ka4F.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-D3TLHRR_.esm.js";import"../utils/promoManager.js";import"../chunks/promo-types-DKAOFHJr.esm.js";import"../chunks/order-page-C2wPfn6k.esm.js";import"../chunks/cart-contents-DkoytiZh.esm.js";import"../chunks/update-cart-pMo1b75q.esm.js";import"../chunks/routes-DelUpFFo.esm.js";import"../utils/cart.js";import"../components/post-purchase.js";import"../chunks/lit-WqMxC_PA.esm.js";import"../chunks/enforce-config-Ba1JkOHs.esm.js";import"../chunks/localize-C25pEGnx.esm.js";import"../chunks/index-DA4pws6n.esm.js";import"../chunks/progress-bar-DF7UuuHb.esm.js";import"../chunks/promo-pill-label-CbW_Vcru.esm.js";import"../chunks/vendor-KKSARHWL.esm.js";import"../components/beam-partner-logos.js";import"../chunks/loading-template-DG4lkIIc.esm.js";import"../chunks/css-card-grid-CvoGpsJH.esm.js";import"../components/impact-overview.js";import"../chunks/_share-dialog-dependencies-Dg-9riak.esm.js";import"../chunks/share-button-B376j4qt.esm.js";import"../chunks/is-all-html-elements-fcB7UUA1.esm.js";import"../chunks/share-button-BZ9Dmpsy.esm.js";import"../chunks/responsive-BR8qUfBa.esm.js";export{O as Cart,Q as Logs,M as Session,J as Shopify,H as Utils};
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import"../chunks/routes-
|
|
1
|
+
import"../chunks/routes-DCT5U9dA.esm.js";import"../utils/logger.esm.js";import{s}from"../chunks/index-BzcA5RKX.esm.js";import"../chunks/promo-types-DKAOFHJr.esm.js";import"../chunks/beam-errors-Ci0d3926.esm.js";export{s as sendLog};
|
|
2
2
|
//# sourceMappingURL=logs.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import"../chunks/routes-
|
|
1
|
+
import"../chunks/routes-DelUpFFo.esm.js";import"../utils/logger.js";import{s}from"../chunks/index-Cb7X_azQ.esm.js";import"../chunks/promo-types-DKAOFHJr.esm.js";import"../chunks/beam-errors-Ci0d3926.esm.js";export{s as sendLog};
|
|
2
2
|
//# sourceMappingURL=logs.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as u}from"../chunks/events-
|
|
1
|
+
import{a as u}from"../chunks/events-Dki0ka4F.esm.js";import{getPromoCodesLocalStorage as P,formatStoreAndReturnPromoCodes as f,promoCodesAreEqual as g,getSanitizedUrlForStorage as v,getPromoCodeFromShopifyCookie as k}from"../utils/promoManager.esm.js";import{logger as t}from"../utils/logger.esm.js";import"../chunks/promo-types-DKAOFHJr.esm.js";import"../chunks/beam-errors-Ci0d3926.esm.js";import"../utils/cookies.esm.js";import"../utils/local-storage.esm.js";var y=(o,e,r)=>{if(!e.has(o))throw TypeError("Cannot "+r)},s=(o,e,r)=>{if(e.has(o))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(o):e.set(o,r)},n=(o,e,r)=>(y(o,e,"access private method"),r),d,h,m,p,c,C;class S{constructor(e){s(this,d),s(this,m),s(this,c),this.name="promoManager",this.promoCodes={unvalidatedPromoCodes:[],validatedPromoCodes:[]},this.disableDiscountCodeCookieCheck=!!e?.disableDiscountCodeCookieCheck}async init(e){try{const r=n(this,d,h).call(this),a=this.disableDiscountCodeCookieCheck?null:n(this,m,p).call(this);if(r||a){const l=P({apiKey:e.apiKey})??{unvalidatedPromoCodes:[],validatedPromoCodes:[]},i=[];r&&i.push(r),a&&i.push({value:a}),this.promoCodes=f(i,e.apiKey),!g(this.promoCodes,l)&&n(this,c,C).call(this)}}catch(r){t.error("[PromoManager] Initialization failed:",r)}}}d=new WeakSet,h=function(){try{return v()}catch(o){t.error("[PromoManager] URL sanitization error:",o);return}},m=new WeakSet,p=function(){try{return k()}catch(o){return t.error("[PromoManager] Cookie extraction error:",o),null}},c=new WeakSet,C=function(){if(this.promoCodes)try{const o=new u({promoCodes:{...this.promoCodes}});window.dispatchEvent(o)}catch(o){t.error("[PromoManager] Failed to dispatch event:",o)}};export{S as PromoManagerPlugin};
|
|
2
2
|
//# sourceMappingURL=promoManager.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as u}from"../chunks/events-
|
|
1
|
+
import{a as u}from"../chunks/events-Dki0ka4F.esm.js";import{getPromoCodesLocalStorage as P,formatStoreAndReturnPromoCodes as f,promoCodesAreEqual as g,getSanitizedUrlForStorage as v,getPromoCodeFromShopifyCookie as k}from"../utils/promoManager.js";import{logger as t}from"../utils/logger.js";import"../chunks/promo-types-DKAOFHJr.esm.js";import"../chunks/beam-errors-Ci0d3926.esm.js";import"../utils/cookies.js";import"../utils/local-storage.js";var y=(o,e,r)=>{if(!e.has(o))throw TypeError("Cannot "+r)},s=(o,e,r)=>{if(e.has(o))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(o):e.set(o,r)},n=(o,e,r)=>(y(o,e,"access private method"),r),d,h,m,p,c,C;class S{constructor(e){s(this,d),s(this,m),s(this,c),this.name="promoManager",this.promoCodes={unvalidatedPromoCodes:[],validatedPromoCodes:[]},this.disableDiscountCodeCookieCheck=!!e?.disableDiscountCodeCookieCheck}async init(e){try{const r=n(this,d,h).call(this),a=this.disableDiscountCodeCookieCheck?null:n(this,m,p).call(this);if(r||a){const l=P({apiKey:e.apiKey})??{unvalidatedPromoCodes:[],validatedPromoCodes:[]},i=[];r&&i.push(r),a&&i.push({value:a}),this.promoCodes=f(i,e.apiKey),!g(this.promoCodes,l)&&n(this,c,C).call(this)}}catch(r){t.error("[PromoManager] Initialization failed:",r)}}}d=new WeakSet,h=function(){try{return v()}catch(o){t.error("[PromoManager] URL sanitization error:",o);return}},m=new WeakSet,p=function(){try{return k()}catch(o){return t.error("[PromoManager] Cookie extraction error:",o),null}},c=new WeakSet,C=function(){if(this.promoCodes)try{const o=new u({promoCodes:{...this.promoCodes}});window.dispatchEvent(o)}catch(o){t.error("[PromoManager] Failed to dispatch event:",o)}};export{S as PromoManagerPlugin};
|
|
2
2
|
//# sourceMappingURL=promoManager.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{t as $,b as j,Z as l,x as q,C as z,v as D,E as G,X as H,s as J,$ as K}from"../chunks/order-page-Bowqodk5.esm.js";import"../chunks/lodash-D3TLHRR_.esm.js";import"../chunks/events-Dki0ka4F.esm.js";import"../utils/logger.esm.js";import"../utils/network-listeners.esm.js";import"../utils/local-storage.esm.js";import"../chunks/beam-errors-Ci0d3926.esm.js";import"../utils/memoize-last.esm.js";import"../chunks/promo-types-DKAOFHJr.esm.js";import"../chunks/cart-contents-DkoytiZh.esm.js";import"../chunks/update-cart-BGAM3i5j.esm.js";import"../chunks/routes-DCT5U9dA.esm.js";import"../utils/cookies.esm.js";import"../utils/remote-session.esm.js";import"../utils/promoManager.esm.js";import"../utils/cart.esm.js";import"../components/post-purchase.esm.js";import"../chunks/lit-WqMxC_PA.esm.js";import"../chunks/enforce-config-CZ3ToOgr.esm.js";import"../chunks/localize-Btu9xYcE.esm.js";import"../chunks/index-Bp9sWMsk.esm.js";import"../chunks/progress-bar-DF7UuuHb.esm.js";import"../chunks/promo-pill-label-CbW_Vcru.esm.js";import"../chunks/vendor-KKSARHWL.esm.js";import"../components/beam-partner-logos.esm.js";import"../chunks/loading-template-DG4lkIIc.esm.js";import"../chunks/css-card-grid-CvoGpsJH.esm.js";import"../components/impact-overview.esm.js";import"../chunks/_share-dialog-dependencies-DQlABdY4.esm.js";import"../chunks/share-button-BEXn6SRs.esm.js";import"../chunks/is-all-html-elements-fcB7UUA1.esm.js";import"../chunks/share-button-7um4cBYz.esm.js";import"../chunks/responsive-BR8qUfBa.esm.js";import"../utils/wait-for-element.esm.js";export{$ as addBeamAttributesToCart,j as appendBeamAttributesToCart,l as appendStatsigToShopifyCartAttributes,q as appendToShopifyCartBeamAttribute,z as getBeamAttributesForCart,D as getCurrentCart,G as getShopifyCart,H as registerCartIntegration,J as showBeamOrderPageWidgets,K as trackCart};
|
|
2
2
|
//# sourceMappingURL=shopify.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{t as $,b as j,Z as l,x as q,C as z,v as D,E as G,X as H,s as J,$ as K}from"../chunks/order-page-C2wPfn6k.esm.js";import"../chunks/lodash-D3TLHRR_.esm.js";import"../chunks/events-Dki0ka4F.esm.js";import"../utils/logger.js";import"../utils/network-listeners.js";import"../utils/local-storage.js";import"../chunks/beam-errors-Ci0d3926.esm.js";import"../utils/memoize-last.js";import"../chunks/promo-types-DKAOFHJr.esm.js";import"../chunks/cart-contents-DkoytiZh.esm.js";import"../chunks/update-cart-pMo1b75q.esm.js";import"../chunks/routes-DelUpFFo.esm.js";import"../utils/cookies.js";import"../utils/remote-session.js";import"../utils/promoManager.js";import"../utils/cart.js";import"../components/post-purchase.js";import"../chunks/lit-WqMxC_PA.esm.js";import"../chunks/enforce-config-Ba1JkOHs.esm.js";import"../chunks/localize-C25pEGnx.esm.js";import"../chunks/index-DA4pws6n.esm.js";import"../chunks/progress-bar-DF7UuuHb.esm.js";import"../chunks/promo-pill-label-CbW_Vcru.esm.js";import"../chunks/vendor-KKSARHWL.esm.js";import"../components/beam-partner-logos.js";import"../chunks/loading-template-DG4lkIIc.esm.js";import"../chunks/css-card-grid-CvoGpsJH.esm.js";import"../components/impact-overview.js";import"../chunks/_share-dialog-dependencies-Dg-9riak.esm.js";import"../chunks/share-button-B376j4qt.esm.js";import"../chunks/is-all-html-elements-fcB7UUA1.esm.js";import"../chunks/share-button-BZ9Dmpsy.esm.js";import"../chunks/responsive-BR8qUfBa.esm.js";import"../utils/wait-for-element.js";export{$ as addBeamAttributesToCart,j as appendBeamAttributesToCart,l as appendStatsigToShopifyCartAttributes,q as appendToShopifyCartBeamAttribute,z as getBeamAttributesForCart,D as getCurrentCart,G as getShopifyCart,H as registerCartIntegration,J as showBeamOrderPageWidgets,K as trackCart};
|
|
2
2
|
//# sourceMappingURL=shopify.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{c as M}from"../chunks/routes-
|
|
1
|
+
import{c as M}from"../chunks/routes-DCT5U9dA.esm.js";import{B as D}from"../chunks/cart-contents-DkoytiZh.esm.js";import{h as O,b as W,c as K}from"../chunks/events-Dki0ka4F.esm.js";import{B as g}from"../chunks/beam-errors-Ci0d3926.esm.js";import{getCookieValue as _,setCookieValue as P}from"../utils/cookies.esm.js";import{logger as A}from"../utils/logger.esm.js";import{saveRemoteSession as j}from"../utils/remote-session.esm.js";import"../chunks/promo-types-DKAOFHJr.esm.js";import"../utils/local-storage.esm.js";var b=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)},d=(e,t,i)=>(b(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)},T=(e,t,i,a)=>(b(e,t,"write to private field"),t.set(e,i),i),h=(e,t,i)=>(b(e,t,"access private method"),i),l,p,E,L,v,B,m,f,$,u,S,y,k,I,x;const z=4,G=`https://cdn.jsdelivr.net/npm/statsig-js@${z}/build/statsig-prod-web-sdk.min.js`,N="beam_statsig_session_id",s="data-beam-visibility",F="beam-sync-visibility",w={STATSIG_INIT:"statsig_init",CART_CREATED:"cart_created",ORDER_CREATED:"order_created",BEAM_SELECTION:"beam_selection"};class U{constructor(t){n(this,E),n(this,v),n(this,f),n(this,u),n(this,y),n(this,I),this.name="statsig",this.experiments={shouldShowBeam:!1,isLoggingEnabled:!0},n(this,l,void 0),n(this,p,void 0),n(this,m,[]),this.statsigApiKey=t.statsigApiKey,this.beforeLogEvent=t.beforeLogEvent}async init(t){T(this,l,t),h(this,E,L).call(this),h(this,u,S).call(this,"hide");const i=document.createElement("style");if(i.innerHTML=`
|
|
2
2
|
[${s}="hide"] beam-select-nonprofit,
|
|
3
3
|
[${s}="hide"] beam-post-purchase,
|
|
4
4
|
[${s}="hide"] beam-redeem-transaction,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{c as M}from"../chunks/routes-
|
|
1
|
+
import{c as M}from"../chunks/routes-DelUpFFo.esm.js";import{B as D}from"../chunks/cart-contents-DkoytiZh.esm.js";import{h as O,b as W,c as K}from"../chunks/events-Dki0ka4F.esm.js";import{B as g}from"../chunks/beam-errors-Ci0d3926.esm.js";import{getCookieValue as _,setCookieValue as P}from"../utils/cookies.js";import{logger as A}from"../utils/logger.js";import{saveRemoteSession as j}from"../utils/remote-session.js";import"../chunks/promo-types-DKAOFHJr.esm.js";import"../utils/local-storage.js";var b=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)},d=(e,t,i)=>(b(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)},T=(e,t,i,a)=>(b(e,t,"write to private field"),t.set(e,i),i),h=(e,t,i)=>(b(e,t,"access private method"),i),l,p,E,L,v,B,m,f,$,u,S,y,k,I,x;const z=4,G=`https://cdn.jsdelivr.net/npm/statsig-js@${z}/build/statsig-prod-web-sdk.min.js`,N="beam_statsig_session_id",s="data-beam-visibility",F="beam-sync-visibility",w={STATSIG_INIT:"statsig_init",CART_CREATED:"cart_created",ORDER_CREATED:"order_created",BEAM_SELECTION:"beam_selection"};class U{constructor(t){n(this,E),n(this,v),n(this,f),n(this,u),n(this,y),n(this,I),this.name="statsig",this.experiments={shouldShowBeam:!1,isLoggingEnabled:!0},n(this,l,void 0),n(this,p,void 0),n(this,m,[]),this.statsigApiKey=t.statsigApiKey,this.beforeLogEvent=t.beforeLogEvent}async init(t){T(this,l,t),h(this,E,L).call(this),h(this,u,S).call(this,"hide");const i=document.createElement("style");if(i.innerHTML=`
|
|
2
2
|
[${s}="hide"] beam-select-nonprofit,
|
|
3
3
|
[${s}="hide"] beam-post-purchase,
|
|
4
4
|
[${s}="hide"] beam-redeem-transaction,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { b as errors } from '../chunks/beam-errors-CCe004HS.esm.js';
|
|
2
|
-
export { e as events } from '../chunks/events-
|
|
2
|
+
export { e as events } from '../chunks/events-C55rozsO.esm.js';
|
|
3
3
|
export { logger } from '../utils/logger.js';
|
|
4
4
|
export { initNetworkListeners } from '../utils/network-listeners.js';
|
|
5
5
|
export { createScopedLocalStorage } from '../utils/local-storage.js';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{b as t}from"../chunks/beam-errors-Ci0d3926.esm.js";import{e as a}from"../chunks/events-
|
|
1
|
+
import{b as t}from"../chunks/beam-errors-Ci0d3926.esm.js";import{e as a}from"../chunks/events-Dki0ka4F.esm.js";import{logger as i}from"../utils/logger.esm.js";import{initNetworkListeners as d}from"../utils/network-listeners.esm.js";import{createScopedLocalStorage as C}from"../utils/local-storage.esm.js";import{waitForElement as l}from"../utils/wait-for-element.esm.js";import{deleteCookieValue as S,getCookieMap as x,getCookieValue as P,setCookieValue as k}from"../utils/cookies.esm.js";import{getRemoteSession as c,saveRemoteSession as A}from"../utils/remote-session.esm.js";import{memoizeLast as L}from"../utils/memoize-last.esm.js";import{d as R,i as v}from"../chunks/lodash-D3TLHRR_.esm.js";import{formatStoreAndReturnPromoCodes as V,getAllPromoCodesFromCookie as b,getPromoCodeFromShopifyCookie as q,getPromoCodesFromCart as w,getPromoCodesLocalStorage as z,getSanitizedUrlForStorage as I,isEmptyPromoData as U,mapToUnvalidatedPromoCodes as h,mergeStoreAndReturnPromos as D,parseJsonStringArray as J,promoCodesAreEqual as M,setPromoCodeInCookie as N,setPromoCodesInLocalStorage as T}from"../utils/promoManager.esm.js";import"../chunks/promo-types-DKAOFHJr.esm.js";export{C as createScopedLocalStorage,R as debounce,S as deleteCookieValue,t as errors,a as events,V as formatStoreAndReturnPromoCodes,b as getAllPromoCodesFromCookie,x as getCookieMap,P as getCookieValue,q as getPromoCodeFromShopifyCookie,w as getPromoCodesFromCart,z as getPromoCodesLocalStorage,c as getRemoteSession,I as getSanitizedUrlForStorage,d as initNetworkListeners,U as isEmptyPromoData,v as isEqual,i as logger,h as mapToUnvalidatedPromoCodes,L as memoizeLast,D as mergeStoreAndReturnPromos,J as parseJsonStringArray,M as promoCodesAreEqual,A as saveRemoteSession,k as setCookieValue,N as setPromoCodeInCookie,T as setPromoCodesInLocalStorage,l as waitForElement};
|
|
2
2
|
//# sourceMappingURL=utils.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{b as t}from"../chunks/beam-errors-Ci0d3926.esm.js";import{e as a}from"../chunks/events-
|
|
1
|
+
import{b as t}from"../chunks/beam-errors-Ci0d3926.esm.js";import{e as a}from"../chunks/events-Dki0ka4F.esm.js";import{logger as i}from"../utils/logger.js";import{initNetworkListeners as d}from"../utils/network-listeners.js";import{createScopedLocalStorage as C}from"../utils/local-storage.js";import{waitForElement as l}from"../utils/wait-for-element.js";import{deleteCookieValue as S,getCookieMap as x,getCookieValue as P,setCookieValue as k}from"../utils/cookies.js";import{getRemoteSession as c,saveRemoteSession as A}from"../utils/remote-session.js";import{memoizeLast as L}from"../utils/memoize-last.js";import{d as R,i as v}from"../chunks/lodash-D3TLHRR_.esm.js";import{formatStoreAndReturnPromoCodes as V,getAllPromoCodesFromCookie as b,getPromoCodeFromShopifyCookie as q,getPromoCodesFromCart as w,getPromoCodesLocalStorage as z,getSanitizedUrlForStorage as I,isEmptyPromoData as U,mapToUnvalidatedPromoCodes as h,mergeStoreAndReturnPromos as D,parseJsonStringArray as J,promoCodesAreEqual as M,setPromoCodeInCookie as N,setPromoCodesInLocalStorage as T}from"../utils/promoManager.js";import"../chunks/promo-types-DKAOFHJr.esm.js";export{C as createScopedLocalStorage,R as debounce,S as deleteCookieValue,t as errors,a as events,V as formatStoreAndReturnPromoCodes,b as getAllPromoCodesFromCookie,x as getCookieMap,P as getCookieValue,q as getPromoCodeFromShopifyCookie,w as getPromoCodesFromCart,z as getPromoCodesLocalStorage,c as getRemoteSession,I as getSanitizedUrlForStorage,d as initNetworkListeners,U as isEmptyPromoData,v as isEqual,i as logger,h as mapToUnvalidatedPromoCodes,L as memoizeLast,D as mergeStoreAndReturnPromos,J as parseJsonStringArray,M as promoCodesAreEqual,A as saveRemoteSession,k as setCookieValue,N as setPromoCodeInCookie,T as setPromoCodesInLocalStorage,l as waitForElement};
|
|
2
2
|
//# sourceMappingURL=utils.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import o from"react";import{l as r}from"../chunks/lit-WqMxC_PA.esm.js";import{BeamCommunityImpact as m}from"../components/community-impact.esm.js";import"../chunks/progress-bar-DF7UuuHb.esm.js";import"../components/beam-partner-logos.esm.js";import"../chunks/enforce-config-CZ3ToOgr.esm.js";import"../chunks/beam-errors-Ci0d3926.esm.js";import"../utils/logger.esm.js";import"../chunks/localize-Btu9xYcE.esm.js";import"../chunks/routes-
|
|
1
|
+
import o from"react";import{l as r}from"../chunks/lit-WqMxC_PA.esm.js";import{BeamCommunityImpact as m}from"../components/community-impact.esm.js";import"../chunks/progress-bar-DF7UuuHb.esm.js";import"../components/beam-partner-logos.esm.js";import"../chunks/enforce-config-CZ3ToOgr.esm.js";import"../chunks/beam-errors-Ci0d3926.esm.js";import"../utils/logger.esm.js";import"../chunks/localize-Btu9xYcE.esm.js";import"../chunks/routes-DCT5U9dA.esm.js";import"../chunks/promo-types-DKAOFHJr.esm.js";import"../chunks/loading-template-DG4lkIIc.esm.js";import"../chunks/css-card-grid-CvoGpsJH.esm.js";const t=r({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 r}from"../chunks/lit-WqMxC_PA.esm.js";import{BeamCommunityImpact as m}from"../components/community-impact.js";import"../chunks/progress-bar-DF7UuuHb.esm.js";import"../components/beam-partner-logos.js";import"../chunks/enforce-config-Ba1JkOHs.esm.js";import"../chunks/beam-errors-Ci0d3926.esm.js";import"../utils/logger.js";import"../chunks/localize-C25pEGnx.esm.js";import"../chunks/routes-
|
|
1
|
+
import o from"react";import{l as r}from"../chunks/lit-WqMxC_PA.esm.js";import{BeamCommunityImpact as m}from"../components/community-impact.js";import"../chunks/progress-bar-DF7UuuHb.esm.js";import"../components/beam-partner-logos.js";import"../chunks/enforce-config-Ba1JkOHs.esm.js";import"../chunks/beam-errors-Ci0d3926.esm.js";import"../utils/logger.js";import"../chunks/localize-C25pEGnx.esm.js";import"../chunks/routes-DelUpFFo.esm.js";import"../chunks/promo-types-DKAOFHJr.esm.js";import"../chunks/loading-template-DG4lkIIc.esm.js";import"../chunks/css-card-grid-CvoGpsJH.esm.js";const t=r({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 o}from"../chunks/lit-WqMxC_PA.esm.js";import{BeamCumulativeImpact as m}from"../components/cumulative-impact.esm.js";import"../chunks/lodash-D3TLHRR_.esm.js";import"../chunks/enforce-config-CZ3ToOgr.esm.js";import"../chunks/beam-errors-Ci0d3926.esm.js";import"../utils/logger.esm.js";import"../chunks/localize-Btu9xYcE.esm.js";import"../chunks/routes-
|
|
1
|
+
import a from"react";import{l as o}from"../chunks/lit-WqMxC_PA.esm.js";import{BeamCumulativeImpact as m}from"../components/cumulative-impact.esm.js";import"../chunks/lodash-D3TLHRR_.esm.js";import"../chunks/enforce-config-CZ3ToOgr.esm.js";import"../chunks/beam-errors-Ci0d3926.esm.js";import"../utils/logger.esm.js";import"../chunks/localize-Btu9xYcE.esm.js";import"../chunks/routes-DCT5U9dA.esm.js";import"../chunks/promo-types-DKAOFHJr.esm.js";import"../chunks/loading-template-DG4lkIIc.esm.js";import"../chunks/is-all-html-elements-fcB7UUA1.esm.js";const t=o({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 o}from"../chunks/lit-WqMxC_PA.esm.js";import{BeamCumulativeImpact as m}from"../components/cumulative-impact.js";import"../chunks/lodash-D3TLHRR_.esm.js";import"../chunks/enforce-config-Ba1JkOHs.esm.js";import"../chunks/beam-errors-Ci0d3926.esm.js";import"../utils/logger.js";import"../chunks/localize-C25pEGnx.esm.js";import"../chunks/routes-
|
|
1
|
+
import a from"react";import{l as o}from"../chunks/lit-WqMxC_PA.esm.js";import{BeamCumulativeImpact as m}from"../components/cumulative-impact.js";import"../chunks/lodash-D3TLHRR_.esm.js";import"../chunks/enforce-config-Ba1JkOHs.esm.js";import"../chunks/beam-errors-Ci0d3926.esm.js";import"../utils/logger.js";import"../chunks/localize-C25pEGnx.esm.js";import"../chunks/routes-DelUpFFo.esm.js";import"../chunks/promo-types-DKAOFHJr.esm.js";import"../chunks/loading-template-DG4lkIIc.esm.js";import"../chunks/is-all-html-elements-fcB7UUA1.esm.js";const t=o({tagName:m.tagName,elementClass:m,react:a,events:{}});export{t as BeamCumulativeImpact,t as default};
|
|
2
2
|
//# sourceMappingURL=cumulative-impact.js.map
|