@beamimpact/web-sdk 1.36.7 → 1.36.9
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-KMjpyJhT.esm.js +2 -0
- package/dist/chunks/_share-dialog-dependencies-KMjpyJhT.esm.js.map +1 -0
- package/dist/chunks/_share-dialog-dependencies-MLhW3eyp.esm.js +2 -0
- package/dist/chunks/_share-dialog-dependencies-MLhW3eyp.esm.js.map +1 -0
- package/dist/chunks/beam-errors-P-Lu07Ce.esm.js +2 -0
- package/dist/chunks/beam-errors-P-Lu07Ce.esm.js.map +1 -0
- package/dist/chunks/{beam-errors-bKCZlkvr.esm.d.ts → beam-errors-fXDkG1zo.esm.d.ts} +7 -2
- package/dist/chunks/{cart-contents-Shc27L1J.esm.d.ts → cart-contents-Z-r5GpWA.esm.d.ts} +1 -1
- package/dist/chunks/enforce-config-fo8kIfoY.esm.js +22 -0
- package/dist/chunks/{enforce-config-MqLZWolV.esm.js.map → enforce-config-fo8kIfoY.esm.js.map} +1 -1
- package/dist/chunks/enforce-config-qna7hEL6.esm.js +22 -0
- package/dist/chunks/{enforce-config-n0D_zfMC.esm.js.map → enforce-config-qna7hEL6.esm.js.map} +1 -1
- package/dist/chunks/{events-qTu4iIOo.esm.d.ts → events-q1pdogmn.esm.d.ts} +1 -1
- package/dist/chunks/index-0XoQisEb.esm.js +2 -0
- package/dist/chunks/index-0XoQisEb.esm.js.map +1 -0
- package/dist/chunks/{index-I8DBdgx0.esm.d.ts → index-1yMQlmZQ.esm.d.ts} +1 -1
- package/dist/chunks/index-44M_qqUx.esm.js +2 -0
- package/dist/chunks/index-44M_qqUx.esm.js.map +1 -0
- package/dist/chunks/{index-hC71uT32.esm.js → index-58VYn82f.esm.js} +2 -2
- package/dist/chunks/{index-hC71uT32.esm.js.map → index-58VYn82f.esm.js.map} +1 -1
- package/dist/chunks/index-8Rkw987L.esm.js +2 -0
- package/dist/chunks/index-8Rkw987L.esm.js.map +1 -0
- package/dist/chunks/{index-FAF7tYU6.esm.js → index-9gijHGwh.esm.js} +2 -2
- package/dist/chunks/index-9gijHGwh.esm.js.map +1 -0
- package/dist/chunks/{index-kuEhVQcF.esm.d.ts → index-DU9Zy88b.esm.d.ts} +2 -2
- package/dist/chunks/{index-MAsTKsZm.esm.js → index-KbG1GoVy.esm.js} +2 -2
- package/dist/chunks/{index-MAsTKsZm.esm.js.map → index-KbG1GoVy.esm.js.map} +1 -1
- package/dist/chunks/{index-uqEAgdEf.esm.js → index-OnjTwvAw.esm.js} +2 -2
- package/dist/chunks/index-OnjTwvAw.esm.js.map +1 -0
- package/dist/chunks/{index-rrdYIcOi.esm.js → index-U8Oy2aur.esm.js} +2 -2
- package/dist/chunks/index-U8Oy2aur.esm.js.map +1 -0
- package/dist/chunks/index-YN68B9ro.esm.js +2 -0
- package/dist/chunks/index-YN68B9ro.esm.js.map +1 -0
- package/dist/chunks/{index-tfP1RBZU.esm.d.ts → index-_XbXZetF.esm.d.ts} +2 -2
- package/dist/chunks/{index-3Xf6QzNV.esm.d.ts → index-mrZj61ji.esm.d.ts} +1 -1
- package/dist/chunks/index-nb5G3fNW.esm.js +2 -0
- package/dist/chunks/index-nb5G3fNW.esm.js.map +1 -0
- package/dist/chunks/index-oCRI089I.esm.js +2 -0
- package/dist/chunks/index-oCRI089I.esm.js.map +1 -0
- package/dist/chunks/{index-3ThDVYOT.esm.d.ts → index-vziJysPD.esm.d.ts} +4 -4
- package/dist/chunks/{index-w9_XpjIg.esm.js → index-wsdeaTHd.esm.js} +2 -2
- package/dist/chunks/index-wsdeaTHd.esm.js.map +1 -0
- package/dist/chunks/{index-wbrSi6cp.esm.d.ts → index-xRdmiNwx.esm.d.ts} +1 -1
- package/dist/chunks/{localize-eZMViIud.esm.js → localize-GCkVUD8S.esm.js} +2 -2
- package/dist/chunks/{localize-eZMViIud.esm.js.map → localize-GCkVUD8S.esm.js.map} +1 -1
- package/dist/chunks/{localize-0rA0DbzI.esm.js → localize-pzAAkBvG.esm.js} +2 -2
- package/dist/chunks/{localize-0rA0DbzI.esm.js.map → localize-pzAAkBvG.esm.js.map} +1 -1
- package/dist/chunks/{openapi-spec-D_Zzbl2J.esm.d.ts → openapi-spec-S9cYW1SA.esm.d.ts} +80 -2
- package/dist/chunks/{order-page-MyFrJe1o.esm.js → order-page-OFWAlLqS.esm.js} +2 -2
- package/dist/chunks/{order-page-MyFrJe1o.esm.js.map → order-page-OFWAlLqS.esm.js.map} +1 -1
- package/dist/chunks/{order-page-ydw5uXTI.esm.d.ts → order-page-lfbHIKul.esm.d.ts} +3 -2
- package/dist/chunks/{order-page-PGTQXoSr.esm.js → order-page-zZ0JffzK.esm.js} +2 -2
- package/dist/chunks/{order-page-PGTQXoSr.esm.js.map → order-page-zZ0JffzK.esm.js.map} +1 -1
- package/dist/chunks/routes-1-1FXngS.esm.js +2 -0
- package/dist/chunks/{routes-USQ3n64Y.esm.js.map → routes-1-1FXngS.esm.js.map} +1 -1
- package/dist/chunks/routes-RgILh2Qy.esm.js +2 -0
- package/dist/chunks/{routes-wPiw5U5n.esm.js.map → routes-RgILh2Qy.esm.js.map} +1 -1
- package/dist/chunks/{update-cart-yCIzgmve.esm.d.ts → update-cart-9-QjPC1E.esm.d.ts} +1 -1
- package/dist/chunks/{update-cart-OkpQAdyP.esm.js → update-cart-EVuB41Qg.esm.js} +2 -2
- package/dist/chunks/{update-cart-OkpQAdyP.esm.js.map → update-cart-EVuB41Qg.esm.js.map} +1 -1
- package/dist/chunks/{update-cart-8xlajjFj.esm.js → update-cart-V2ysW2LO.esm.js} +2 -2
- package/dist/chunks/{update-cart-8xlajjFj.esm.js.map → update-cart-V2ysW2LO.esm.js.map} +1 -1
- package/dist/components/community-impact.esm.js +2 -1
- package/dist/components/community-impact.esm.js.map +1 -1
- package/dist/components/community-impact.js +2 -1
- package/dist/components/community-impact.js.map +1 -1
- package/dist/components/cumulative-impact.esm.js +2 -1
- package/dist/components/cumulative-impact.esm.js.map +1 -1
- package/dist/components/cumulative-impact.js +2 -1
- package/dist/components/cumulative-impact.js.map +1 -1
- package/dist/components/impact-overview.esm.js +2 -1
- package/dist/components/impact-overview.esm.js.map +1 -1
- package/dist/components/impact-overview.js +2 -1
- package/dist/components/impact-overview.js.map +1 -1
- package/dist/components/index.d.ts +2 -2
- package/dist/components/index.esm.js +1 -1
- package/dist/components/index.js +1 -1
- package/dist/components/post-purchase.d.ts +2 -2
- package/dist/components/post-purchase.esm.js +1 -1
- package/dist/components/post-purchase.js +1 -1
- package/dist/components/redeem-transaction.d.ts +15 -5
- package/dist/components/redeem-transaction.esm.js +12 -11
- package/dist/components/redeem-transaction.esm.js.map +1 -1
- package/dist/components/redeem-transaction.js +12 -11
- package/dist/components/redeem-transaction.js.map +1 -1
- package/dist/components/select-nonprofit.d.ts +2 -2
- package/dist/components/select-nonprofit.esm.js +2 -1
- package/dist/components/select-nonprofit.esm.js.map +1 -1
- package/dist/components/select-nonprofit.js +2 -1
- package/dist/components/select-nonprofit.js.map +1 -1
- package/dist/components/shopify.d.ts +6 -6
- package/dist/components/shopify.esm.js +1 -1
- package/dist/components/shopify.js +1 -1
- package/dist/components/subscription-management.d.ts +18 -5
- package/dist/components/subscription-management.esm.js +15 -5
- package/dist/components/subscription-management.esm.js.map +1 -1
- package/dist/components/subscription-management.js +15 -5
- package/dist/components/subscription-management.js.map +1 -1
- package/dist/index.d.ts +12 -12
- 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.d.ts +3 -3
- package/dist/integrations/cart.esm.js +1 -1
- package/dist/integrations/cart.js +1 -1
- package/dist/integrations/index.d.ts +10 -10
- package/dist/integrations/index.esm.js +1 -1
- package/dist/integrations/index.js +1 -1
- package/dist/integrations/logs.d.ts +2 -2
- package/dist/integrations/logs.esm.js +1 -1
- package/dist/integrations/logs.js +1 -1
- package/dist/integrations/session.esm.js +1 -1
- package/dist/integrations/session.js +1 -1
- package/dist/integrations/shopify.d.ts +4 -4
- 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 +4 -4
- 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 +3 -3
- package/dist/react/index.esm.js +1 -1
- package/dist/react/index.js +1 -1
- package/dist/react/post-purchase.d.ts +2 -2
- package/dist/react/post-purchase.esm.js +1 -1
- package/dist/react/post-purchase.js +1 -1
- package/dist/react/redeem-transaction.d.ts +3 -3
- package/dist/react/redeem-transaction.esm.js +1 -1
- package/dist/react/redeem-transaction.js +1 -1
- package/dist/react/select-nonprofit.d.ts +3 -3
- package/dist/react/select-nonprofit.esm.js +1 -1
- package/dist/react/select-nonprofit.js +1 -1
- package/dist/react/subscription-management.d.ts +2 -2
- package/dist/react/subscription-management.esm.js +1 -1
- package/dist/react/subscription-management.esm.js.map +1 -1
- package/dist/react/subscription-management.js +1 -1
- package/dist/react/subscription-management.js.map +1 -1
- package/dist/utils/beam-errors.d.ts +1 -1
- package/dist/utils/beam-errors.esm.js +1 -1
- package/dist/utils/beam-errors.js +1 -1
- package/dist/utils/cookies.d.ts +1 -1
- package/dist/utils/cookies.esm.js +1 -1
- package/dist/utils/cookies.esm.js.map +1 -1
- package/dist/utils/cookies.js +1 -1
- package/dist/utils/cookies.js.map +1 -1
- package/dist/utils/events.d.ts +3 -3
- package/dist/utils/index.d.ts +4 -4
- package/dist/utils/index.esm.js +1 -1
- package/dist/utils/index.js +1 -1
- package/dist/utils/local-storage.esm.js +1 -1
- package/dist/utils/local-storage.js +1 -1
- package/dist/utils/remote-session.esm.js +1 -1
- package/dist/utils/remote-session.js +1 -1
- package/dist/utils/wait-for-element.esm.js +1 -1
- package/dist/utils/wait-for-element.js +1 -1
- package/package.json +1 -1
- package/dist/chunks/_share-dialog-dependencies-BGBxD2DS.esm.js +0 -2
- package/dist/chunks/_share-dialog-dependencies-BGBxD2DS.esm.js.map +0 -1
- package/dist/chunks/_share-dialog-dependencies-l3E6m-4b.esm.js +0 -2
- package/dist/chunks/_share-dialog-dependencies-l3E6m-4b.esm.js.map +0 -1
- package/dist/chunks/beam-errors-AMvTvR1C.esm.js +0 -2
- package/dist/chunks/beam-errors-AMvTvR1C.esm.js.map +0 -1
- package/dist/chunks/enforce-config-MqLZWolV.esm.js +0 -22
- package/dist/chunks/enforce-config-n0D_zfMC.esm.js +0 -22
- package/dist/chunks/index-0CUzV2-m.esm.js +0 -2
- package/dist/chunks/index-0CUzV2-m.esm.js.map +0 -1
- package/dist/chunks/index-0JdRzhqA.esm.js +0 -2
- package/dist/chunks/index-0JdRzhqA.esm.js.map +0 -1
- package/dist/chunks/index-6hf6jo8u.esm.js +0 -2
- package/dist/chunks/index-6hf6jo8u.esm.js.map +0 -1
- package/dist/chunks/index-8G1d1I0a.esm.js +0 -2
- package/dist/chunks/index-8G1d1I0a.esm.js.map +0 -1
- package/dist/chunks/index-FAF7tYU6.esm.js.map +0 -1
- package/dist/chunks/index-L6UcfXYR.esm.js +0 -2
- package/dist/chunks/index-L6UcfXYR.esm.js.map +0 -1
- package/dist/chunks/index-m6tLtpwd.esm.js +0 -2
- package/dist/chunks/index-m6tLtpwd.esm.js.map +0 -1
- package/dist/chunks/index-rrdYIcOi.esm.js.map +0 -1
- package/dist/chunks/index-uqEAgdEf.esm.js.map +0 -1
- package/dist/chunks/index-w9_XpjIg.esm.js.map +0 -1
- package/dist/chunks/routes-USQ3n64Y.esm.js +0 -2
- package/dist/chunks/routes-wPiw5U5n.esm.js +0 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"subscription-management.js","sources":["../../src/components/subscription-management/strings.ts","../../src/components/subscription-management/index.ts"],"sourcesContent":["export const strings = {\n en: {\n nonprofitSwapText: ({ brandName = \"\" }) => `Support a new nonprofit with your next ${brandName} recurring order`,\n },\n fr: {\n nonprofitSwapText: ({ brandName = \"\" }) =>\n `Soutenez une nouvelle organisation à but non lucratif avec votre prochaine commande récurrente ${brandName}`,\n },\n de: {\n nonprofitSwapText: ({ brandName = \"\" }) =>\n `Unterstützen Sie eine neue gemeinnützige Organisation mit Ihrer nächsten wiederkehrenden Bestellung bei ${brandName}`,\n },\n es: {\n nonprofitSwapText: ({ brandName = \"\" }) =>\n `Apoye a una nueva organización sin fines de lucro con su próximo pedido recurrente ${brandName}`,\n },\n it: {\n nonprofitSwapText: ({ brandName = \"\" }) =>\n `Sostieni una nuova organizzazione non profit con il tuo prossimo ordine ricorrente ${brandName}`,\n },\n pl: {\n nonprofitSwapText: ({ brandName = \"\" }) =>\n `Wesprzyj nową organizację non-profit przy kolejnym zamówieniu cyklicznym ${brandName}`,\n },\n};\n","import { css, html, LitElement } from \"lit\";\nimport { property } from \"lit/decorators/property.js\";\nimport { state } from \"lit/decorators/state.js\";\nimport { DEFAULT_BASE_URL } from \"../../api-sdk/constants\";\nimport { LANGUAGES } from \"../../api-sdk/types\";\nimport { TCart } from \"../../shared/cart-contents\";\nimport { enforceConfig } from \"../../shared/enforce-config\";\nimport { postFindSubscription, postChainEligibleNonprofitsForCart } from \"../../api-sdk/v3/routes\";\nimport { AsyncController } from \"../../shared/controllers/async-controller\";\nimport { cssReset } from \"../../shared/css-reset\";\nimport { defineCustomElement } from \"../../shared/defineCustomElement\";\nimport { _errorMessage } from \"../../shared/fragments/error-message-template\";\nimport { _cssVariableMap } from \"../../shared/fragments/css-variable-map\";\nimport { strings } from \"./strings\";\n\nconst REQUIRED_DATA_PROPS = [\"baseUrl\", \"apiKey\", \"subscriptionId\", \"email\", \"lang\"];\n\nexport class BeamSubscriptionManagement extends LitElement {\n static tagName = \"beam-subscription-management\";\n\n @property({ type: String })\n public baseUrl: string = DEFAULT_BASE_URL;\n\n @property({ type: String })\n public apiKey!: string;\n\n @property({ type: String })\n public subscriptionId!: string;\n\n @property({ type: Number, reflect: true })\n public storeId?: number; // Either storeId or postalCode, countryCode must be provided\n\n @property({ type: String })\n public email!: string;\n\n @property({ type: String })\n public postalCode?: string;\n\n @property({ type: String })\n public countryCode?: string;\n\n @property({ type: String })\n public lang: LANGUAGES = \"en\";\n\n @property({ type: Object })\n public cart?: TCart;\n\n @property({ type: Boolean })\n public debug = false;\n\n @state() private activeWidget: \"redeem-transaction\" | \"impact-overview\" | null = null; // Based on /findSubscriptionByRemoteId\n @state() private nonprofitId: number | null = null; // From /findSubscriptionByRemoteId response\n @state() private userId: string | null = null; // From findSubscriptionByRemoteId\n @state() private chainName: string | null = null; // From findEligibleNonprofitsForCart\n\n private subscriptionDataController = new AsyncController<typeof this.fetchSubscription>(this, this.fetchSubscription);\n private eligibleNonprofitsDataController = new AsyncController<typeof this.fetchEligibleNonprofits>(\n this,\n this.fetchEligibleNonprofits\n );\n\n async firstUpdated() {\n enforceConfig(REQUIRED_DATA_PROPS, this);\n await this.loadWidget();\n }\n\n async loadWidget() {\n // In parallel:\n // (1). Fetch eligible nonprofits [storeId and chainName]\n // (2). Fetch subscription [userId and nonprofitId]\n await Promise.all([this.fetchEligibleNonprofits(), this.fetchSubscription()]);\n this.activeWidget = this.nonprofitId ? \"impact-overview\" : \"redeem-transaction\";\n }\n\n async fetchEligibleNonprofits() {\n enforceConfig(REQUIRED_DATA_PROPS, this);\n const res = await postChainEligibleNonprofitsForCart({\n baseUrl: this.baseUrl,\n headers: {\n authorization: `Api-Key ${this.apiKey}`,\n },\n requestBody: {\n postalCode: this.postalCode ? this.postalCode : undefined,\n countryCode: this.countryCode ? this.countryCode : undefined,\n widgetName: \"subscription-management\",\n version: \"1.0.0\",\n },\n });\n this.chainName = res.chain.name;\n this.storeId = res.store.id;\n return res;\n }\n\n async fetchSubscription() {\n enforceConfig(REQUIRED_DATA_PROPS, this);\n const result = await postFindSubscription({\n baseUrl: this.baseUrl,\n headers: {\n authorization: `Api-Key ${this.apiKey}`,\n },\n requestBody: {\n remoteSubscriptionId: this.subscriptionId,\n email: this.email,\n },\n });\n\n this.userId = result.beamUserId; // Returned in response regardless of subscription redemption\n this.nonprofitId = result.nonprofit?.id || null;\n return result;\n }\n\n handleSwapNonprofitButtonClick() {\n this.activeWidget = \"redeem-transaction\";\n }\n\n renderSwapNonprofitButton() {\n if (this.activeWidget === \"impact-overview\") {\n return html`<button class=\"swap-nonprofit-button\" @click=\"${this.handleSwapNonprofitButtonClick}\">\n ${strings[this.lang].nonprofitSwapText({ brandName: this.chainName || \"\" })}\n </button>`;\n } else {\n return \"\";\n }\n }\n\n public get cssVariables() {\n const defaults = {\n \"--beam-fontFamily\": \"inherit\",\n \"--beam-fontStyle\": \"inherit\",\n \"--beam-fontSize\": \"inherit\",\n \"--beam-textColor\": \"inherit\",\n \"--beam-backgroundColor\": \"inherit\",\n \"--beam-SubscriptionManagement-widgetContainer-borderColor\": \"#d5d5d5\",\n \"--beam-SubscriptionManagement-widgetContainer-borderRadius\": \"4px\",\n \"--beam-SubscriptionManagement-widgetContainer-padding\": \"15px\",\n \"--beam-SubscriptionManagement-widgetContainer-backgroundColor\": \"inherit\",\n \"--beam-SubscriptionManagement-widgetContainer-maxWidth\": \"800px\",\n \"--beam-SubscriptionManagement-swapNonprofitButtonText-textDecoration\": \"underline\",\n \"--beam-SubscriptionManagement-swapNonprofitButtonText-fontFamily\": \"inherit\",\n \"--beam-SubscriptionManagement-swapNonprofitButtonText-fontStyle\": \"inherit\",\n \"--beam-SubscriptionManagement-swapNonprofitButtonText-fontWeight\": \"inherit\",\n \"--beam-SubscriptionManagement-swapNonprofitButtonText-lineHeight\": \"inherit\",\n \"--beam-SubscriptionManagement-swapNonprofitButtonText-marginTop\": \"10px\",\n \"--beam-SubscriptionManagement-swapNonprofitButtonText-fontSize\": \"inherit\",\n \"--beam-SubscriptionManagement-swapNonprofitButtonText-color\": \"inherit\",\n };\n\n const remoteConfig = this.eligibleNonprofitsDataController?.data?.config?.web?.theme || {};\n\n const config = { ...defaults, ...remoteConfig };\n\n const serializable = Object.create({\n toCSS() {\n return _cssVariableMap(this as Record<string, string>);\n },\n });\n return Object.assign(serializable, config);\n }\n\n static styles = [\n cssReset,\n css`\n :host {\n display: block;\n font-family: var(--beam-fontFamily);\n font-style: var(--beam-fontStyle);\n font-size: var(--beam-fontSize);\n background-color: var(--beam-backgroundColor);\n color: var(--beam-textColor);\n }\n .swap-nonprofit-button {\n margin-top: var(--beam-SubscriptionManagement-swapNonprofitButtonText-marginTop, 10px);\n color: var(--beam-SubscriptionManagement-swapNonprofitButtonText-color, inherit);\n font-size: var(--beam-SubscriptionManagement-swapNonprofitButtonText-fontSize, inherit);\n text-decoration: var(--beam-SubscriptionManagement-swapNonprofitButtonText-textDecoration, underline);\n font-family: var(--beam-SubscriptionManagement-swapNonprofitButtonText-fontFamily, inherit);\n font-style: var(--beam-SubscriptionManagement-swapNonprofitButtonText-fontStyle, inherit);\n font-weight: var(--beam-SubscriptionManagement-swapNonprofitButtonText-fontWeight, inherit);\n line-height: var(--beam-SubscriptionManagement-swapNonprofitButtonText-lineHeight, inherit);\n background: none;\n border: none;\n cursor: pointer;\n }\n .sub-widget-container {\n background-color: var(--beam-SubscriptionManagement-widgetContainer-backgroundColor, inherit);\n border: 1px solid var(--beam-SubscriptionManagement-widgetContainer-borderColor, #d5d5d5);\n border-radius: var(--beam-SubscriptionManagement-widgetContainer-borderRadius, 4px);\n overflow: hidden; /* maintain clean border-radius */\n padding: var(--beam-SubscriptionManagement-widgetContainer-padding, 15px);\n max-width: var(--beam-SubscriptionManagement-widgetContainer-maxWidth, 800px);\n }\n }`,\n ];\n\n render() {\n let content;\n\n if (this.subscriptionDataController.loading || this.eligibleNonprofitsDataController.loading) {\n content = \"\";\n }\n\n if ((this.subscriptionDataController.error || this.eligibleNonprofitsDataController.error) && this.debug) {\n if (this.subscriptionDataController.error !== null) {\n return _errorMessage({ error: this.subscriptionDataController.error });\n } else if (this.eligibleNonprofitsDataController.error !== null) {\n return _errorMessage({ error: this.eligibleNonprofitsDataController.error });\n }\n } else {\n content = \"\";\n }\n\n if (this.activeWidget === \"redeem-transaction\") {\n // TODO: https://beamimpact.atlassian.net/browse/SDK-1695\n content = html` <p>Redeem transaction widget placeholder</p>`;\n } else if (this.activeWidget === \"impact-overview\") {\n content = html`\n <beam-impact-overview\n part=\"impact-overview\"\n baseUrl=\"${this.baseUrl}\"\n apiKey=\"${this.apiKey}\"\n userId=\"${this.userId}\"\n nonprofitId=\"${this.nonprofitId}\"\n lang=\"${this.lang}\"\n ?debug=\"${this.debug}\"\n ></beam-impact-overview>\n `;\n }\n return html`\n <style>\n :host {\n ${this.cssVariables.toCSS()}\n }\n </style>\n <div class=\"sub-widget-container\">${content}</div>\n ${this.renderSwapNonprofitButton()}\n `;\n }\n}\n\ndefineCustomElement(BeamSubscriptionManagement);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"beam-subscription-management\": BeamSubscriptionManagement;\n }\n}\n"],"names":["strings","brandName","f","h","i","l","n","t","o","a","REQUIRED_DATA_PROPS","BeamSubscriptionManagement","LitElement","DEFAULT_BASE_URL","AsyncController","enforceConfig","res","postChainEligibleNonprofitsForCart","result","postFindSubscription","html","defaults","remoteConfig","config","_cssVariableMap","content","_errorMessage","cssReset","css","__decorateClass","property","state","defineCustomElement"],"mappings":"0TAAO,MAAMA,EAAU,CACrB,GAAI,CACF,kBAAmB,CAAC,CAAE,UAAAC,EAAY,EAAG,IAAM,0CAA0CA,CAAS,kBAChG,EACA,GAAI,CACF,kBAAmB,CAAC,CAAE,UAAAA,EAAY,EAAG,IACnC,wGAAkGA,CAAS,EAC/G,EACA,GAAI,CACF,kBAAmB,CAAC,CAAE,UAAAA,EAAY,EAAG,IACnC,oHAA2GA,CAAS,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ources":["../../src/components/subscription-management/strings.ts","../../src/components/subscription-management/index.ts"],"sourcesContent":["export const strings = {\n en: {\n nonprofitSwapText: ({ brandName = \"\" }) => `Support a new nonprofit with your next ${brandName} recurring order`,\n },\n fr: {\n nonprofitSwapText: ({ brandName = \"\" }) =>\n `Soutenez une nouvelle organisation à but non lucratif avec votre prochaine commande récurrente ${brandName}`,\n },\n de: {\n nonprofitSwapText: ({ brandName = \"\" }) =>\n `Unterstützen Sie eine neue gemeinnützige Organisation mit Ihrer nächsten wiederkehrenden Bestellung bei ${brandName}`,\n },\n es: {\n nonprofitSwapText: ({ brandName = \"\" }) =>\n `Apoye a una nueva organización sin fines de lucro con su próximo pedido recurrente ${brandName}`,\n },\n it: {\n nonprofitSwapText: ({ brandName = \"\" }) =>\n `Sostieni una nuova organizzazione non profit con il tuo prossimo ordine ricorrente ${brandName}`,\n },\n pl: {\n nonprofitSwapText: ({ brandName = \"\" }) =>\n `Wesprzyj nową organizację non-profit przy kolejnym zamówieniu cyklicznym ${brandName}`,\n },\n};\n","import { css, html, LitElement } from \"lit\";\nimport { property } from \"lit/decorators/property.js\";\nimport { state } from \"lit/decorators/state.js\";\nimport { DEFAULT_BASE_URL } from \"../../api-sdk/constants\";\nimport { LANGUAGES } from \"../../api-sdk/types\";\nimport { TCart } from \"../../shared/cart-contents\";\nimport { enforceConfig } from \"../../shared/enforce-config\";\nimport { postFindOrCreateSubscription, postChainEligibleNonprofitsForCart } from \"../../api-sdk/v3/routes\";\nimport { AsyncController } from \"../../shared/controllers/async-controller\";\nimport { cssReset } from \"../../shared/css-reset\";\nimport { defineCustomElement } from \"../../shared/defineCustomElement\";\nimport { _errorMessage } from \"../../shared/fragments/error-message-template\";\nimport { _cssVariableMap } from \"../../shared/fragments/css-variable-map\";\nimport { BeamNonprofitSelectEvent } from \"../../utils/events\";\nimport { MissingConfig } from \"../../utils/beam-errors\";\nimport { strings } from \"./strings\";\n\ninterface RequiredDataPropsWithEmail {\n email: string;\n apiKey: string;\n subscriptionId: string;\n}\n\ninterface RequiredDataPropsWithPartnerUserId {\n partnerUserId: string;\n apiKey: string;\n subscriptionId: string;\n}\n\ntype TRequiredDataProps = RequiredDataPropsWithEmail | RequiredDataPropsWithPartnerUserId;\nexport class BeamSubscriptionManagement extends LitElement {\n static tagName = \"beam-subscription-management\";\n\n @property({ type: String })\n public baseUrl: string = DEFAULT_BASE_URL;\n\n @property({ type: String })\n public apiKey!: TRequiredDataProps[\"apiKey\"];\n\n @property({ type: String })\n public subscriptionId!: TRequiredDataProps[\"subscriptionId\"];\n\n @property({ type: Number, reflect: true })\n public storeId?: number; // Either storeId or postalCode, countryCode must be provided\n\n @property({ type: String })\n public email?: RequiredDataPropsWithEmail[\"email\"]; // Either email or partnerUserId must be provided\n\n @property({ type: String })\n public partnerUserId?: RequiredDataPropsWithPartnerUserId[\"partnerUserId\"]; // Either email or partnerUserId must be provided\n\n @property({ type: String })\n public postalCode?: string;\n\n @property({ type: String })\n public countryCode?: string;\n\n @property({ type: String })\n public lang: LANGUAGES = \"en\";\n\n @property({ type: Object })\n public cart?: TCart;\n\n @property({ type: Boolean })\n public debug = false;\n\n @state() private activeWidget: \"redeem-transaction\" | \"impact-overview\" | null = null; // Based on /findSubscriptionByRemoteId\n @state() private nonprofitId: number | null = null; // From /findSubscriptionByRemoteId response\n @state() private userId: string | null = null; // From findSubscriptionByRemoteId\n @state() private chainName: string | null = null; // From findEligibleNonprofitsForCart\n\n private subscriptionDataController = new AsyncController<typeof this.fetchSubscription>(this, this.fetchSubscription);\n private eligibleNonprofitsDataController = new AsyncController<typeof this.fetchEligibleNonprofits>(\n this,\n this.fetchEligibleNonprofits\n );\n\n async firstUpdated() {\n if (!this.email && !this.partnerUserId) {\n throw new MissingConfig(\n [\"email\", \"partnerUserId\"],\n \"One of the following properties needs to be specified: email, partnerUserId \"\n );\n }\n enforceConfig<TRequiredDataProps>([\"apiKey\", \"subscriptionId\"], this);\n await this.loadWidget();\n }\n\n async loadWidget() {\n // In parallel:\n // (1). Fetch eligible nonprofits [storeId and chainName]\n // (2). Fetch subscription [userId and nonprofitId]\n await Promise.all([this.fetchEligibleNonprofits(), this.fetchSubscription()]);\n this.activeWidget = this.nonprofitId ? \"impact-overview\" : \"redeem-transaction\";\n }\n\n async fetchEligibleNonprofits() {\n enforceConfig<TRequiredDataProps>([\"apiKey\", \"subscriptionId\"], this);\n const res = await postChainEligibleNonprofitsForCart({\n baseUrl: this.baseUrl,\n headers: {\n authorization: `Api-Key ${this.apiKey}`,\n },\n requestBody: {\n postalCode: this.postalCode ? this.postalCode : undefined,\n countryCode: this.countryCode ? this.countryCode : undefined,\n widgetName: \"subscription-management\",\n version: \"1.0.0\",\n },\n });\n this.chainName = res.chain.name;\n this.storeId = res.store.id;\n return res;\n }\n\n async fetchSubscription() {\n enforceConfig<TRequiredDataProps>([\"apiKey\", \"subscriptionId\"], this);\n const result = await postFindOrCreateSubscription({\n baseUrl: this.baseUrl,\n headers: {\n authorization: `Api-Key ${this.apiKey}`,\n },\n requestBody: {\n remoteSubscriptionId: this.subscriptionId,\n email: this.email,\n partnerUserId: this.partnerUserId,\n },\n });\n\n this.userId = result.beamUserId; // Returned in response regardless of subscription redemption\n this.nonprofitId = result.nonprofit?.id || null;\n return result;\n }\n\n handleSwapNonprofitButtonClick() {\n this.activeWidget = \"redeem-transaction\";\n }\n\n renderSwapNonprofitButton() {\n if (this.activeWidget === \"impact-overview\") {\n return html`<button class=\"swap-nonprofit-button\" @click=\"${this.handleSwapNonprofitButtonClick}\">\n ${strings[this.lang].nonprofitSwapText({ brandName: this.chainName || \"\" })}\n </button>`;\n } else {\n return \"\";\n }\n }\n\n public get cssVariables() {\n const defaults = {\n \"--beam-fontFamily\": \"inherit\",\n \"--beam-fontStyle\": \"inherit\",\n \"--beam-fontSize\": \"inherit\",\n \"--beam-textColor\": \"inherit\",\n \"--beam-backgroundColor\": \"inherit\",\n \"--beam-SubscriptionManagement-widgetContainer-borderColor\": \"#d5d5d5\",\n \"--beam-SubscriptionManagement-widgetContainer-borderRadius\": \"4px\",\n \"--beam-SubscriptionManagement-widgetContainer-padding\": \"15px\",\n \"--beam-SubscriptionManagement-widgetContainer-backgroundColor\": \"inherit\",\n \"--beam-SubscriptionManagement-widgetContainer-maxWidth\": \"800px\",\n \"--beam-SubscriptionManagement-swapNonprofitButtonText-textDecoration\": \"underline\",\n \"--beam-SubscriptionManagement-swapNonprofitButtonText-fontFamily\": \"inherit\",\n \"--beam-SubscriptionManagement-swapNonprofitButtonText-fontStyle\": \"inherit\",\n \"--beam-SubscriptionManagement-swapNonprofitButtonText-fontWeight\": \"inherit\",\n \"--beam-SubscriptionManagement-swapNonprofitButtonText-lineHeight\": \"inherit\",\n \"--beam-SubscriptionManagement-swapNonprofitButtonText-marginTop\": \"10px\",\n \"--beam-SubscriptionManagement-swapNonprofitButtonText-fontSize\": \"inherit\",\n \"--beam-SubscriptionManagement-swapNonprofitButtonText-color\": \"inherit\",\n };\n\n const remoteConfig = this.eligibleNonprofitsDataController?.data?.config?.web?.theme || {};\n\n const config = { ...defaults, ...remoteConfig };\n\n const serializable = Object.create({\n toCSS() {\n return _cssVariableMap(this as Record<string, string>);\n },\n });\n return Object.assign(serializable, config);\n }\n\n static styles = [\n cssReset,\n css`\n :host {\n display: block;\n font-family: var(--beam-fontFamily);\n font-style: var(--beam-fontStyle);\n font-size: var(--beam-fontSize);\n background-color: var(--beam-backgroundColor);\n color: var(--beam-textColor);\n word-break: normal;\n }\n .swap-nonprofit-button {\n margin-top: var(--beam-SubscriptionManagement-swapNonprofitButtonText-marginTop, 10px);\n color: var(--beam-SubscriptionManagement-swapNonprofitButtonText-color, inherit);\n font-size: var(--beam-SubscriptionManagement-swapNonprofitButtonText-fontSize, inherit);\n text-decoration: var(--beam-SubscriptionManagement-swapNonprofitButtonText-textDecoration, underline);\n font-family: var(--beam-SubscriptionManagement-swapNonprofitButtonText-fontFamily, inherit);\n font-style: var(--beam-SubscriptionManagement-swapNonprofitButtonText-fontStyle, inherit);\n font-weight: var(--beam-SubscriptionManagement-swapNonprofitButtonText-fontWeight, inherit);\n line-height: var(--beam-SubscriptionManagement-swapNonprofitButtonText-lineHeight, inherit);\n background: none;\n border: none;\n cursor: pointer;\n }\n .sub-widget-container {\n background-color: var(--beam-SubscriptionManagement-widgetContainer-backgroundColor, inherit);\n border: 1px solid var(--beam-SubscriptionManagement-widgetContainer-borderColor, #d5d5d5);\n border-radius: var(--beam-SubscriptionManagement-widgetContainer-borderRadius, 4px);\n overflow: hidden; /* maintain clean border-radius */\n padding: var(--beam-SubscriptionManagement-widgetContainer-padding, 15px);\n max-width: var(--beam-SubscriptionManagement-widgetContainer-maxWidth, 800px);\n }\n }`,\n ];\n\n render() {\n let content;\n\n if (this.subscriptionDataController.loading || this.eligibleNonprofitsDataController.loading) {\n content = \"\";\n }\n\n if ((this.subscriptionDataController.error || this.eligibleNonprofitsDataController.error) && this.debug) {\n if (this.subscriptionDataController.error !== null) {\n return _errorMessage({ error: this.subscriptionDataController.error });\n } else if (this.eligibleNonprofitsDataController.error !== null) {\n return _errorMessage({ error: this.eligibleNonprofitsDataController.error });\n }\n } else {\n content = \"\";\n }\n\n if (this.activeWidget === \"redeem-transaction\") {\n content = html` <beam-redeem-transaction\n part=\"redeem-transaction\"\n subscriptionId=\"${this.subscriptionId}\"\n nonprofitId=${this.nonprofitId}\n baseUrl=\"${this.baseUrl}\"\n apiKey=\"${this.apiKey}\"\n lang=\"${this.lang}\"\n ?debug=\"${this.debug}\"\n @beamnonprofitselect=\"${(event: Event) => {\n if (!(event instanceof BeamNonprofitSelectEvent)) return; // TS guard\n const { selectedNonprofitId } = event.detail;\n this.nonprofitId = selectedNonprofitId ?? null;\n this.activeWidget = \"impact-overview\";\n }}\"\n ></beam-redeem-transaction>`;\n } else if (this.activeWidget === \"impact-overview\") {\n content = html`\n <beam-impact-overview\n part=\"impact-overview\"\n baseUrl=\"${this.baseUrl}\"\n apiKey=\"${this.apiKey}\"\n userId=\"${this.userId}\"\n nonprofitId=\"${this.nonprofitId}\"\n lang=\"${this.lang}\"\n ?debug=\"${this.debug}\"\n ></beam-impact-overview>\n `;\n }\n return html`\n <style>\n :host {\n ${this.cssVariables.toCSS()}\n }\n </style>\n <div class=\"sub-widget-container\">${content}</div>\n ${this.renderSwapNonprofitButton()}\n `;\n }\n}\n\ndefineCustomElement(BeamSubscriptionManagement);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"beam-subscription-management\": BeamSubscriptionManagement;\n }\n}\n"],"names":["strings","brandName","m","h","e","l","n","t","o","i","a","d","BeamSubscriptionManagement","LitElement","DEFAULT_BASE_URL","AsyncController","MissingConfig","enforceConfig","res","postChainEligibleNonprofitsForCart","result","postFindOrCreateSubscription","html","defaults","remoteConfig","config","_cssVariableMap","content","_errorMessage","event","BeamNonprofitSelectEvent","selectedNonprofitId","cssReset","css","__decorateClass","property","state","defineCustomElement"],"mappings":"2XAAO,MAAMA,EAAU,CACrB,GAAI,CACF,kBAAmB,CAAC,CAAE,UAAAC,EAAY,EAAG,IAAM,0CAA0CA,CAAS,kBAChG,EACA,GAAI,CACF,kBAAmB,CAAC,CAAE,UAAAA,EAAY,EAAG,IACnC,wGAAkGA,CAAS,EAC/G,EACA,GAAI,CACF,kBAAmB,CAAC,CAAE,UAAAA,EAAY,EAAG,IACnC,oHAA2GA,CAAS,EACxH,EACA,GAAI,CACF,kBAAmB,CAAC,CAAE,UAAAA,EAAY,EAAG,IACnC,4FAAsFA,CAAS,EACnG,EACA,GAAI,CACF,kBAAmB,CAAC,CAAE,UAAAA,EAAY,EAAG,IACnC,sFAAsFA,CAAS,EACnG,EACA,GAAI,CACF,kBAAmB,CAAC,CAAE,UAAAA,EAAY,EAAG,IACnC,yFAA4EA,CAAS,EACzF,CACF,ECxBA,IAAAC,EAAA,OAAA,eAAAC,EAAA,OAAA,yBAAAC,EAAA,CAAAC,EAAAC,EAAAC,EAAAC,IAAA,CAAA,QAAAC,EAAAD,EAAA,EAAA,OAAAA,EAAAL,EAAAG,EA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uCM,UAAA,YAAA,CAAA,EA+MnByB,EAAoBzB,CAA0B"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export { i as WebComponents } from './chunks/index-oLz4lmx2.esm.js';
|
|
2
|
-
export { i as Integrations } from './chunks/index-
|
|
2
|
+
export { i as Integrations } from './chunks/index-vziJysPD.esm.js';
|
|
3
3
|
export { i as ReactComponents } from './chunks/index-6t9MtjyS.esm.js';
|
|
4
|
-
export { i as Utils } from './chunks/index-
|
|
4
|
+
export { i as Utils } from './chunks/index-_XbXZetF.esm.js';
|
|
5
5
|
import './components/community-impact.js';
|
|
6
6
|
import 'lit';
|
|
7
7
|
import 'lit-html';
|
|
@@ -13,14 +13,14 @@ import './components/cumulative-impact.js';
|
|
|
13
13
|
import 'lodash';
|
|
14
14
|
import './components/impact-overview.js';
|
|
15
15
|
import './components/select-nonprofit.js';
|
|
16
|
-
import './chunks/cart-contents-
|
|
17
|
-
import './chunks/openapi-spec-
|
|
16
|
+
import './chunks/cart-contents-Z-r5GpWA.esm.js';
|
|
17
|
+
import './chunks/openapi-spec-S9cYW1SA.esm.js';
|
|
18
18
|
import './components/redeem-transaction.js';
|
|
19
19
|
import './components/post-purchase.js';
|
|
20
20
|
import './components/subscription-management.js';
|
|
21
|
-
import './chunks/index-
|
|
22
|
-
import './chunks/beam-errors-
|
|
23
|
-
import './chunks/events-
|
|
21
|
+
import './chunks/index-DU9Zy88b.esm.js';
|
|
22
|
+
import './chunks/beam-errors-fXDkG1zo.esm.js';
|
|
23
|
+
import './chunks/events-q1pdogmn.esm.js';
|
|
24
24
|
import './utils/logger.js';
|
|
25
25
|
import './utils/network-listeners.js';
|
|
26
26
|
import './utils/local-storage.js';
|
|
@@ -30,12 +30,12 @@ import './utils/remote-session.js';
|
|
|
30
30
|
import './utils/memoize-last.js';
|
|
31
31
|
import 'lodash-es/debounce';
|
|
32
32
|
import 'lodash-es/isEqual';
|
|
33
|
-
import './chunks/index-
|
|
34
|
-
import './chunks/order-page-
|
|
35
|
-
import './chunks/update-cart-
|
|
33
|
+
import './chunks/index-1yMQlmZQ.esm.js';
|
|
34
|
+
import './chunks/order-page-lfbHIKul.esm.js';
|
|
35
|
+
import './chunks/update-cart-9-QjPC1E.esm.js';
|
|
36
36
|
import './chunks/index-EGiUuWe-.esm.js';
|
|
37
|
-
import './chunks/index-
|
|
38
|
-
import './chunks/index-
|
|
37
|
+
import './chunks/index-mrZj61ji.esm.js';
|
|
38
|
+
import './chunks/index-xRdmiNwx.esm.js';
|
|
39
39
|
import './react/community-impact.js';
|
|
40
40
|
import '@lit/react';
|
|
41
41
|
import './react/cumulative-impact.js';
|
package/dist/index.esm.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{i as Q}from"./chunks/index-5yFqo0yl.esm.js";import{i as T}from"./chunks/index-
|
|
1
|
+
import{i as Q}from"./chunks/index-5yFqo0yl.esm.js";import{i as T}from"./chunks/index-0XoQisEb.esm.js";import{i as X}from"./chunks/index-o7YiP4gC.esm.js";import{i as Z}from"./chunks/index-OnjTwvAw.esm.js";import"./components/community-impact.esm.js";import"./chunks/lit-yVXn5Cbs.esm.js";import"./chunks/progress-bar-7gWYaGlq.esm.js";import"./components/beam-partner-logos.esm.js";import"./chunks/enforce-config-qna7hEL6.esm.js";import"./chunks/beam-errors-P-Lu07Ce.esm.js";import"./utils/logger.esm.js";import"./chunks/routes-RgILh2Qy.esm.js";import"./chunks/localize-GCkVUD8S.esm.js";import"./chunks/css-card-grid-3b56QBzq.esm.js";import"./components/cumulative-impact.esm.js";import"./chunks/lodash-P8OIs-at.esm.js";import"./chunks/is-all-html-elements-SdSkxirh.esm.js";import"./components/impact-overview.esm.js";import"./chunks/vendor-eeJfrOkP.esm.js";import"./chunks/responsive-LYEag6TI.esm.js";import"./components/select-nonprofit.esm.js";import"./chunks/events-5IECSF-x.esm.js";import"./utils/network-listeners.esm.js";import"./utils/local-storage.esm.js";import"./utils/cookies.esm.js";import"./chunks/cart-contents-h60geKWa.esm.js";import"./components/redeem-transaction.esm.js";import"./components/post-purchase.esm.js";import"./components/subscription-management.esm.js";import"./chunks/index-9gijHGwh.esm.js";import"./utils/wait-for-element.esm.js";import"./utils/remote-session.esm.js";import"./utils/memoize-last.esm.js";import"./chunks/index-8Rkw987L.esm.js";import"./chunks/order-page-zZ0JffzK.esm.js";import"./chunks/update-cart-V2ysW2LO.esm.js";import"./chunks/index-9YcaEQju.esm.js";import"./chunks/index-oCRI089I.esm.js";import"./chunks/index-KbG1GoVy.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";export{T as Integrations,X as ReactComponents,Z as Utils,Q as WebComponents};
|
|
2
2
|
//# sourceMappingURL=index.esm.js.map
|
package/dist/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{i as Q}from"./chunks/index-IzAvjker.esm.js";import{i as T}from"./chunks/index-
|
|
1
|
+
import{i as Q}from"./chunks/index-IzAvjker.esm.js";import{i as T}from"./chunks/index-YN68B9ro.esm.js";import{i as X}from"./chunks/index-EHubF2KN.esm.js";import{i as Z}from"./chunks/index-U8Oy2aur.esm.js";import"./components/community-impact.js";import"./chunks/lit-yVXn5Cbs.esm.js";import"./chunks/progress-bar-7gWYaGlq.esm.js";import"./components/beam-partner-logos.js";import"./chunks/enforce-config-fo8kIfoY.esm.js";import"./chunks/beam-errors-P-Lu07Ce.esm.js";import"./utils/logger.js";import"./chunks/routes-1-1FXngS.esm.js";import"./chunks/localize-pzAAkBvG.esm.js";import"./chunks/css-card-grid-3b56QBzq.esm.js";import"./components/cumulative-impact.js";import"./chunks/lodash-P8OIs-at.esm.js";import"./chunks/is-all-html-elements-SdSkxirh.esm.js";import"./components/impact-overview.js";import"./chunks/vendor-eeJfrOkP.esm.js";import"./chunks/responsive-LYEag6TI.esm.js";import"./components/select-nonprofit.js";import"./chunks/events-5IECSF-x.esm.js";import"./utils/network-listeners.js";import"./utils/local-storage.js";import"./utils/cookies.js";import"./chunks/cart-contents-h60geKWa.esm.js";import"./components/redeem-transaction.js";import"./components/post-purchase.js";import"./components/subscription-management.js";import"./chunks/index-wsdeaTHd.esm.js";import"./utils/wait-for-element.js";import"./utils/remote-session.js";import"./utils/memoize-last.js";import"./chunks/index-nb5G3fNW.esm.js";import"./chunks/order-page-OFWAlLqS.esm.js";import"./chunks/update-cart-EVuB41Qg.esm.js";import"./chunks/index-Z1UUeVXR.esm.js";import"./chunks/index-44M_qqUx.esm.js";import"./chunks/index-58VYn82f.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";export{T as Integrations,X as ReactComponents,Z as Utils,Q 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-RgILh2Qy.esm.js";import{S as y}from"../chunks/beam-errors-P-Lu07Ce.esm.js";import{B as h}from"../chunks/events-5IECSF-x.esm.js";import{logger as w}from"../utils/logger.esm.js";import{s as f}from"../chunks/index-KbG1GoVy.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-1-1FXngS.esm.js";import{S as y}from"../chunks/beam-errors-P-Lu07Ce.esm.js";import{B as h}from"../chunks/events-5IECSF-x.esm.js";import{logger as w}from"../utils/logger.js";import{s as f}from"../chunks/index-58VYn82f.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,5 +1,5 @@
|
|
|
1
|
-
export { B as BeamCartAPIConfig, a as BeamCartValues, u as updateCart } from '../chunks/update-cart-
|
|
1
|
+
export { B as BeamCartAPIConfig, a as BeamCartValues, u as updateCart } from '../chunks/update-cart-9-QjPC1E.esm.js';
|
|
2
2
|
import 'lodash';
|
|
3
3
|
import '../chunks/types-aju0qrRe.esm.js';
|
|
4
|
-
import '../chunks/cart-contents-
|
|
5
|
-
import '../chunks/openapi-spec-
|
|
4
|
+
import '../chunks/cart-contents-Z-r5GpWA.esm.js';
|
|
5
|
+
import '../chunks/openapi-spec-S9cYW1SA.esm.js';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{x as C}from"../chunks/update-cart-
|
|
1
|
+
import{x as C}from"../chunks/update-cart-V2ysW2LO.esm.js";import"../chunks/lodash-P8OIs-at.esm.js";import"../chunks/routes-RgILh2Qy.esm.js";import"../chunks/beam-errors-P-Lu07Ce.esm.js";import"../utils/logger.esm.js";import"../chunks/events-5IECSF-x.esm.js";import"../utils/network-listeners.esm.js";import"../utils/local-storage.esm.js";import"../utils/cookies.esm.js";import"../utils/remote-session.esm.js";import"../utils/memoize-last.esm.js";import"../chunks/cart-contents-h60geKWa.esm.js";export{C as updateCart};
|
|
2
2
|
//# sourceMappingURL=cart.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{x as C}from"../chunks/update-cart-
|
|
1
|
+
import{x as C}from"../chunks/update-cart-EVuB41Qg.esm.js";import"../chunks/lodash-P8OIs-at.esm.js";import"../chunks/routes-1-1FXngS.esm.js";import"../chunks/beam-errors-P-Lu07Ce.esm.js";import"../utils/logger.js";import"../chunks/events-5IECSF-x.esm.js";import"../utils/network-listeners.js";import"../utils/local-storage.js";import"../utils/cookies.js";import"../utils/remote-session.js";import"../utils/memoize-last.js";import"../chunks/cart-contents-h60geKWa.esm.js";export{C as updateCart};
|
|
2
2
|
//# sourceMappingURL=cart.js.map
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
export { i as Utils } from '../chunks/index-
|
|
2
|
-
export { i as Shopify } from '../chunks/index-
|
|
1
|
+
export { i as Utils } from '../chunks/index-DU9Zy88b.esm.js';
|
|
2
|
+
export { i as Shopify } from '../chunks/index-1yMQlmZQ.esm.js';
|
|
3
3
|
export { i as Session } from '../chunks/index-EGiUuWe-.esm.js';
|
|
4
|
-
export { i as Cart } from '../chunks/index-
|
|
5
|
-
export { i as Logs } from '../chunks/index-
|
|
6
|
-
import '../chunks/beam-errors-
|
|
7
|
-
import '../chunks/events-
|
|
8
|
-
import '../chunks/cart-contents-
|
|
9
|
-
import '../chunks/openapi-spec-
|
|
4
|
+
export { i as Cart } from '../chunks/index-mrZj61ji.esm.js';
|
|
5
|
+
export { i as Logs } from '../chunks/index-xRdmiNwx.esm.js';
|
|
6
|
+
import '../chunks/beam-errors-fXDkG1zo.esm.js';
|
|
7
|
+
import '../chunks/events-q1pdogmn.esm.js';
|
|
8
|
+
import '../chunks/cart-contents-Z-r5GpWA.esm.js';
|
|
9
|
+
import '../chunks/openapi-spec-S9cYW1SA.esm.js';
|
|
10
10
|
import '../chunks/types-7kSi85Gv.esm.js';
|
|
11
11
|
import '../utils/logger.js';
|
|
12
12
|
import '../utils/network-listeners.js';
|
|
@@ -17,9 +17,9 @@ import '../utils/remote-session.js';
|
|
|
17
17
|
import '../utils/memoize-last.js';
|
|
18
18
|
import 'lodash-es/debounce';
|
|
19
19
|
import 'lodash-es/isEqual';
|
|
20
|
-
import '../chunks/order-page-
|
|
20
|
+
import '../chunks/order-page-lfbHIKul.esm.js';
|
|
21
21
|
import 'lodash';
|
|
22
|
-
import '../chunks/update-cart-
|
|
22
|
+
import '../chunks/update-cart-9-QjPC1E.esm.js';
|
|
23
23
|
import '../chunks/types-aju0qrRe.esm.js';
|
|
24
24
|
import '../components/post-purchase.js';
|
|
25
25
|
import 'lit';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{i as w}from"../chunks/index-
|
|
1
|
+
import{i as w}from"../chunks/index-9gijHGwh.esm.js";import{i as A}from"../chunks/index-8Rkw987L.esm.js";import{i as D}from"../chunks/index-9YcaEQju.esm.js";import{i as F}from"../chunks/index-oCRI089I.esm.js";import{i as H}from"../chunks/index-KbG1GoVy.esm.js";import"../chunks/beam-errors-P-Lu07Ce.esm.js";import"../chunks/events-5IECSF-x.esm.js";import"../utils/logger.esm.js";import"../utils/network-listeners.esm.js";import"../utils/local-storage.esm.js";import"../utils/wait-for-element.esm.js";import"../utils/cookies.esm.js";import"../utils/remote-session.esm.js";import"../utils/memoize-last.esm.js";import"../chunks/lodash-P8OIs-at.esm.js";import"../chunks/order-page-zZ0JffzK.esm.js";import"../chunks/cart-contents-h60geKWa.esm.js";import"../chunks/update-cart-V2ysW2LO.esm.js";import"../chunks/routes-RgILh2Qy.esm.js";import"../components/post-purchase.esm.js";import"../chunks/lit-yVXn5Cbs.esm.js";import"../chunks/enforce-config-qna7hEL6.esm.js";import"../components/redeem-transaction.esm.js";import"../chunks/progress-bar-7gWYaGlq.esm.js";import"../components/beam-partner-logos.esm.js";import"../chunks/localize-GCkVUD8S.esm.js";import"../chunks/css-card-grid-3b56QBzq.esm.js";import"../components/impact-overview.esm.js";import"../chunks/vendor-eeJfrOkP.esm.js";import"../chunks/is-all-html-elements-SdSkxirh.esm.js";import"../chunks/responsive-LYEag6TI.esm.js";export{F as Cart,H as Logs,D as Session,A as Shopify,w as Utils};
|
|
2
2
|
//# sourceMappingURL=index.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{i as w}from"../chunks/index-
|
|
1
|
+
import{i as w}from"../chunks/index-wsdeaTHd.esm.js";import{i as A}from"../chunks/index-nb5G3fNW.esm.js";import{i as D}from"../chunks/index-Z1UUeVXR.esm.js";import{i as F}from"../chunks/index-44M_qqUx.esm.js";import{i as H}from"../chunks/index-58VYn82f.esm.js";import"../chunks/beam-errors-P-Lu07Ce.esm.js";import"../chunks/events-5IECSF-x.esm.js";import"../utils/logger.js";import"../utils/network-listeners.js";import"../utils/local-storage.js";import"../utils/wait-for-element.js";import"../utils/cookies.js";import"../utils/remote-session.js";import"../utils/memoize-last.js";import"../chunks/lodash-P8OIs-at.esm.js";import"../chunks/order-page-OFWAlLqS.esm.js";import"../chunks/cart-contents-h60geKWa.esm.js";import"../chunks/update-cart-EVuB41Qg.esm.js";import"../chunks/routes-1-1FXngS.esm.js";import"../components/post-purchase.js";import"../chunks/lit-yVXn5Cbs.esm.js";import"../chunks/enforce-config-fo8kIfoY.esm.js";import"../components/redeem-transaction.js";import"../chunks/progress-bar-7gWYaGlq.esm.js";import"../components/beam-partner-logos.js";import"../chunks/localize-pzAAkBvG.esm.js";import"../chunks/css-card-grid-3b56QBzq.esm.js";import"../components/impact-overview.js";import"../chunks/vendor-eeJfrOkP.esm.js";import"../chunks/is-all-html-elements-SdSkxirh.esm.js";import"../chunks/responsive-LYEag6TI.esm.js";export{F as Cart,H as Logs,D as Session,A as Shopify,w as Utils};
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import '../chunks/openapi-spec-
|
|
2
|
-
export { s as sendLog } from '../chunks/index-
|
|
1
|
+
import '../chunks/openapi-spec-S9cYW1SA.esm.js';
|
|
2
|
+
export { s as sendLog } from '../chunks/index-xRdmiNwx.esm.js';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import"../chunks/routes-
|
|
1
|
+
import"../chunks/routes-RgILh2Qy.esm.js";import"../utils/logger.esm.js";import{s as i}from"../chunks/index-KbG1GoVy.esm.js";import"../chunks/beam-errors-P-Lu07Ce.esm.js";export{i as sendLog};
|
|
2
2
|
//# sourceMappingURL=logs.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import"../chunks/routes-
|
|
1
|
+
import"../chunks/routes-1-1FXngS.esm.js";import"../utils/logger.js";import{s as i}from"../chunks/index-58VYn82f.esm.js";import"../chunks/beam-errors-P-Lu07Ce.esm.js";export{i as sendLog};
|
|
2
2
|
//# sourceMappingURL=logs.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import"../chunks/vendor-eeJfrOkP.esm.js";import"../utils/cookies.esm.js";import"../utils/local-storage.esm.js";import{c as s,e as a}from"../chunks/index-9YcaEQju.esm.js";import"../chunks/lit-yVXn5Cbs.esm.js";import"../chunks/beam-errors-
|
|
1
|
+
import"../chunks/vendor-eeJfrOkP.esm.js";import"../utils/cookies.esm.js";import"../utils/local-storage.esm.js";import{c as s,e as a}from"../chunks/index-9YcaEQju.esm.js";import"../chunks/lit-yVXn5Cbs.esm.js";import"../chunks/beam-errors-P-Lu07Ce.esm.js";export{s as createSession,a as endSession};
|
|
2
2
|
//# sourceMappingURL=session.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import"../chunks/vendor-eeJfrOkP.esm.js";import"../utils/cookies.js";import"../utils/local-storage.js";import{c as s,e as a}from"../chunks/index-Z1UUeVXR.esm.js";import"../chunks/lit-yVXn5Cbs.esm.js";import"../chunks/beam-errors-
|
|
1
|
+
import"../chunks/vendor-eeJfrOkP.esm.js";import"../utils/cookies.js";import"../utils/local-storage.js";import{c as s,e as a}from"../chunks/index-Z1UUeVXR.esm.js";import"../chunks/lit-yVXn5Cbs.esm.js";import"../chunks/beam-errors-P-Lu07Ce.esm.js";export{s as createSession,a as endSession};
|
|
2
2
|
//# sourceMappingURL=session.js.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
export { T as TBeamOrderPageParams, a as addBeamAttributesToCart, g as getCurrentCart, r as registerCartIntegration, s as showBeamOrderPageWidgets, t as trackCart } from '../chunks/order-page-
|
|
1
|
+
export { T as TBeamOrderPageParams, a as addBeamAttributesToCart, g as getCurrentCart, r as registerCartIntegration, s as showBeamOrderPageWidgets, t as trackCart } from '../chunks/order-page-lfbHIKul.esm.js';
|
|
2
2
|
import 'lodash';
|
|
3
|
-
import '../chunks/update-cart-
|
|
3
|
+
import '../chunks/update-cart-9-QjPC1E.esm.js';
|
|
4
4
|
import '../chunks/types-aju0qrRe.esm.js';
|
|
5
|
-
import '../chunks/cart-contents-
|
|
6
|
-
import '../chunks/openapi-spec-
|
|
5
|
+
import '../chunks/cart-contents-Z-r5GpWA.esm.js';
|
|
6
|
+
import '../chunks/openapi-spec-S9cYW1SA.esm.js';
|
|
7
7
|
import '../components/post-purchase.js';
|
|
8
8
|
import 'lit';
|
|
9
9
|
import 'lit-html';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{h as T,C as W,O as j,s as l,L as q}from"../chunks/order-page-
|
|
1
|
+
import{h as T,C as W,O as j,s as l,L as q}from"../chunks/order-page-zZ0JffzK.esm.js";import"../chunks/lodash-P8OIs-at.esm.js";import"../chunks/events-5IECSF-x.esm.js";import"../utils/network-listeners.esm.js";import"../utils/local-storage.esm.js";import"../chunks/beam-errors-P-Lu07Ce.esm.js";import"../utils/cookies.esm.js";import"../utils/memoize-last.esm.js";import"../chunks/cart-contents-h60geKWa.esm.js";import"../chunks/update-cart-V2ysW2LO.esm.js";import"../chunks/routes-RgILh2Qy.esm.js";import"../utils/logger.esm.js";import"../utils/remote-session.esm.js";import"../components/post-purchase.esm.js";import"../chunks/lit-yVXn5Cbs.esm.js";import"../chunks/enforce-config-qna7hEL6.esm.js";import"../components/redeem-transaction.esm.js";import"../chunks/progress-bar-7gWYaGlq.esm.js";import"../components/beam-partner-logos.esm.js";import"../chunks/localize-GCkVUD8S.esm.js";import"../chunks/css-card-grid-3b56QBzq.esm.js";import"../components/impact-overview.esm.js";import"../chunks/vendor-eeJfrOkP.esm.js";import"../chunks/is-all-html-elements-SdSkxirh.esm.js";import"../chunks/responsive-LYEag6TI.esm.js";import"../utils/wait-for-element.esm.js";export{T as addBeamAttributesToCart,W as getCurrentCart,j as registerCartIntegration,l as showBeamOrderPageWidgets,q as trackCart};
|
|
2
2
|
//# sourceMappingURL=shopify.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{h as T,C as W,O as j,s as l,L as q}from"../chunks/order-page-
|
|
1
|
+
import{h as T,C as W,O as j,s as l,L as q}from"../chunks/order-page-OFWAlLqS.esm.js";import"../chunks/lodash-P8OIs-at.esm.js";import"../chunks/events-5IECSF-x.esm.js";import"../utils/network-listeners.js";import"../utils/local-storage.js";import"../chunks/beam-errors-P-Lu07Ce.esm.js";import"../utils/cookies.js";import"../utils/memoize-last.js";import"../chunks/cart-contents-h60geKWa.esm.js";import"../chunks/update-cart-EVuB41Qg.esm.js";import"../chunks/routes-1-1FXngS.esm.js";import"../utils/logger.js";import"../utils/remote-session.js";import"../components/post-purchase.js";import"../chunks/lit-yVXn5Cbs.esm.js";import"../chunks/enforce-config-fo8kIfoY.esm.js";import"../components/redeem-transaction.js";import"../chunks/progress-bar-7gWYaGlq.esm.js";import"../components/beam-partner-logos.js";import"../chunks/localize-pzAAkBvG.esm.js";import"../chunks/css-card-grid-3b56QBzq.esm.js";import"../components/impact-overview.js";import"../chunks/vendor-eeJfrOkP.esm.js";import"../chunks/is-all-html-elements-SdSkxirh.esm.js";import"../chunks/responsive-LYEag6TI.esm.js";import"../utils/wait-for-element.js";export{T as addBeamAttributesToCart,W as getCurrentCart,j as registerCartIntegration,l as showBeamOrderPageWidgets,q as trackCart};
|
|
2
2
|
//# sourceMappingURL=shopify.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{p as R}from"../chunks/routes-
|
|
1
|
+
import{p as R}from"../chunks/routes-RgILh2Qy.esm.js";import{B as M}from"../chunks/cart-contents-h60geKWa.esm.js";import{a as D,b as O,c as W}from"../chunks/events-5IECSF-x.esm.js";import{B as m}from"../chunks/beam-errors-P-Lu07Ce.esm.js";import{getCookieValue as f,setCookieValue as $}from"../utils/cookies.esm.js";import{logger as C}from"../utils/logger.esm.js";import{saveRemoteSession as K}from"../utils/remote-session.esm.js";import"../utils/local-storage.esm.js";var w=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)},d=(e,t,i)=>(w(e,t,"read from private field"),i?i.call(e):t.get(e)),n=(e,t,i)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,i)},_=(e,t,i,s)=>(w(e,t,"write to private field"),s?s.call(e,i):t.set(e,i),i),r=(e,t,i)=>(w(e,t,"access private method"),i),h,c,E,T,b,A,l,v,B,g,S,y,L,I,k;const P=4,j=`https://cdn.jsdelivr.net/npm/statsig-js@${P}/build/statsig-prod-web-sdk.min.js`,x="beam_statsig_session_id",o="data-beam-visibility",z="beam-sync-visibility",p={STATSIG_INIT:"statsig_init",CART_CREATED:"cart_created",ORDER_CREATED:"order_created",BEAM_SELECTION:"beam_selection"};class G{constructor(t){n(this,E),n(this,b),n(this,v),n(this,g),n(this,y),n(this,I),this.name="statsig",this.experiments={shouldShowBeam:!1,isLoggingEnabled:!0},n(this,h,void 0),n(this,c,void 0),n(this,l,[]),this.statsigApiKey=t.statsigApiKey}async init(t){_(this,h,t),r(this,E,T).call(this),r(this,g,S).call(this,"hide");const i=document.createElement("style");if(i.innerHTML=`
|
|
2
2
|
[${o}="hide"] beam-select-nonprofit,
|
|
3
3
|
[${o}="hide"] beam-post-purchase,
|
|
4
4
|
[${o}="hide"] beam-redeem-transaction,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{p as R}from"../chunks/routes-
|
|
1
|
+
import{p as R}from"../chunks/routes-1-1FXngS.esm.js";import{B as M}from"../chunks/cart-contents-h60geKWa.esm.js";import{a as D,b as O,c as W}from"../chunks/events-5IECSF-x.esm.js";import{B as m}from"../chunks/beam-errors-P-Lu07Ce.esm.js";import{getCookieValue as f,setCookieValue as $}from"../utils/cookies.js";import{logger as C}from"../utils/logger.js";import{saveRemoteSession as K}from"../utils/remote-session.js";import"../utils/local-storage.js";var w=(e,t,i)=>{if(!t.has(e))throw TypeError("Cannot "+i)},d=(e,t,i)=>(w(e,t,"read from private field"),i?i.call(e):t.get(e)),n=(e,t,i)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,i)},_=(e,t,i,s)=>(w(e,t,"write to private field"),s?s.call(e,i):t.set(e,i),i),r=(e,t,i)=>(w(e,t,"access private method"),i),h,c,E,T,b,A,l,v,B,g,S,y,L,I,k;const P=4,j=`https://cdn.jsdelivr.net/npm/statsig-js@${P}/build/statsig-prod-web-sdk.min.js`,x="beam_statsig_session_id",o="data-beam-visibility",z="beam-sync-visibility",p={STATSIG_INIT:"statsig_init",CART_CREATED:"cart_created",ORDER_CREATED:"order_created",BEAM_SELECTION:"beam_selection"};class G{constructor(t){n(this,E),n(this,b),n(this,v),n(this,g),n(this,y),n(this,I),this.name="statsig",this.experiments={shouldShowBeam:!1,isLoggingEnabled:!0},n(this,h,void 0),n(this,c,void 0),n(this,l,[]),this.statsigApiKey=t.statsigApiKey}async init(t){_(this,h,t),r(this,E,T).call(this),r(this,g,S).call(this,"hide");const i=document.createElement("style");if(i.innerHTML=`
|
|
2
2
|
[${o}="hide"] beam-select-nonprofit,
|
|
3
3
|
[${o}="hide"] beam-post-purchase,
|
|
4
4
|
[${o}="hide"] beam-redeem-transaction,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { b as errors } from '../chunks/beam-errors-
|
|
2
|
-
export { e as events } from '../chunks/events-
|
|
1
|
+
export { b as errors } from '../chunks/beam-errors-fXDkG1zo.esm.js';
|
|
2
|
+
export { e as events } from '../chunks/events-q1pdogmn.esm.js';
|
|
3
3
|
export { logger } from '../utils/logger.js';
|
|
4
4
|
export { fetchProxy, initNetworkListeners, xhrProxy } from '../utils/network-listeners.js';
|
|
5
5
|
export { createScopedLocalStorage } from '../utils/local-storage.js';
|
|
@@ -9,6 +9,6 @@ export { getRemoteSession, saveRemoteSession } from '../utils/remote-session.js'
|
|
|
9
9
|
export { memoizeLast } from '../utils/memoize-last.js';
|
|
10
10
|
export { default as debounce } from 'lodash-es/debounce';
|
|
11
11
|
export { default as isEqual } from 'lodash-es/isEqual';
|
|
12
|
-
import '../chunks/cart-contents-
|
|
13
|
-
import '../chunks/openapi-spec-
|
|
12
|
+
import '../chunks/cart-contents-Z-r5GpWA.esm.js';
|
|
13
|
+
import '../chunks/openapi-spec-S9cYW1SA.esm.js';
|
|
14
14
|
import '../chunks/types-7kSi85Gv.esm.js';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{b as r}from"../chunks/beam-errors-
|
|
1
|
+
import{b as r}from"../chunks/beam-errors-P-Lu07Ce.esm.js";import{e as s}from"../chunks/events-5IECSF-x.esm.js";import{logger as m}from"../utils/logger.esm.js";import{fetchProxy as x,initNetworkListeners as p,xhrProxy as f}from"../utils/network-listeners.esm.js";import{createScopedLocalStorage as n}from"../utils/local-storage.esm.js";import{waitForElement as c}from"../utils/wait-for-element.esm.js";import{deleteCookieValue as u,getCookieMap as d,getCookieValue as C,setCookieValue as S}from"../utils/cookies.esm.js";import{getRemoteSession as V,saveRemoteSession as b}from"../utils/remote-session.esm.js";import{memoizeLast as v}from"../utils/memoize-last.esm.js";import{d as y,i as E}from"../chunks/lodash-P8OIs-at.esm.js";export{n as createScopedLocalStorage,y as debounce,u as deleteCookieValue,r as errors,s as events,x as fetchProxy,d as getCookieMap,C as getCookieValue,V as getRemoteSession,p as initNetworkListeners,E as isEqual,m as logger,v as memoizeLast,b as saveRemoteSession,S as setCookieValue,c as waitForElement,f as xhrProxy};
|
|
2
2
|
//# sourceMappingURL=utils.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{b as r}from"../chunks/beam-errors-
|
|
1
|
+
import{b as r}from"../chunks/beam-errors-P-Lu07Ce.esm.js";import{e as s}from"../chunks/events-5IECSF-x.esm.js";import{logger as m}from"../utils/logger.js";import{fetchProxy as x,initNetworkListeners as p,xhrProxy as f}from"../utils/network-listeners.js";import{createScopedLocalStorage as n}from"../utils/local-storage.js";import{waitForElement as c}from"../utils/wait-for-element.js";import{deleteCookieValue as u,getCookieMap as d,getCookieValue as C,setCookieValue as S}from"../utils/cookies.js";import{getRemoteSession as V,saveRemoteSession as b}from"../utils/remote-session.js";import{memoizeLast as v}from"../utils/memoize-last.js";import{d as y,i as E}from"../chunks/lodash-P8OIs-at.esm.js";export{n as createScopedLocalStorage,y as debounce,u as deleteCookieValue,r as errors,s as events,x as fetchProxy,d as getCookieMap,C as getCookieValue,V as getRemoteSession,p as initNetworkListeners,E as isEqual,m as logger,v as memoizeLast,b as saveRemoteSession,S as setCookieValue,c as waitForElement,f as xhrProxy};
|
|
2
2
|
//# sourceMappingURL=utils.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import o from"react";import{l as r}from"../chunks/lit-yVXn5Cbs.esm.js";import{BeamCommunityImpact as m}from"../components/community-impact.esm.js";import"../chunks/progress-bar-7gWYaGlq.esm.js";import"../components/beam-partner-logos.esm.js";import"../chunks/enforce-config-
|
|
1
|
+
import o from"react";import{l as r}from"../chunks/lit-yVXn5Cbs.esm.js";import{BeamCommunityImpact as m}from"../components/community-impact.esm.js";import"../chunks/progress-bar-7gWYaGlq.esm.js";import"../components/beam-partner-logos.esm.js";import"../chunks/enforce-config-qna7hEL6.esm.js";import"../chunks/beam-errors-P-Lu07Ce.esm.js";import"../utils/logger.esm.js";import"../chunks/routes-RgILh2Qy.esm.js";import"../chunks/localize-GCkVUD8S.esm.js";import"../chunks/css-card-grid-3b56QBzq.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-yVXn5Cbs.esm.js";import{BeamCommunityImpact as m}from"../components/community-impact.js";import"../chunks/progress-bar-7gWYaGlq.esm.js";import"../components/beam-partner-logos.js";import"../chunks/enforce-config-
|
|
1
|
+
import o from"react";import{l as r}from"../chunks/lit-yVXn5Cbs.esm.js";import{BeamCommunityImpact as m}from"../components/community-impact.js";import"../chunks/progress-bar-7gWYaGlq.esm.js";import"../components/beam-partner-logos.js";import"../chunks/enforce-config-fo8kIfoY.esm.js";import"../chunks/beam-errors-P-Lu07Ce.esm.js";import"../utils/logger.js";import"../chunks/routes-1-1FXngS.esm.js";import"../chunks/localize-pzAAkBvG.esm.js";import"../chunks/css-card-grid-3b56QBzq.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 e}from"../chunks/lit-yVXn5Cbs.esm.js";import{BeamCumulativeImpact as m}from"../components/cumulative-impact.esm.js";import"../chunks/lodash-P8OIs-at.esm.js";import"../chunks/enforce-config-
|
|
1
|
+
import a from"react";import{l as e}from"../chunks/lit-yVXn5Cbs.esm.js";import{BeamCumulativeImpact as m}from"../components/cumulative-impact.esm.js";import"../chunks/lodash-P8OIs-at.esm.js";import"../chunks/enforce-config-qna7hEL6.esm.js";import"../chunks/beam-errors-P-Lu07Ce.esm.js";import"../utils/logger.esm.js";import"../chunks/routes-RgILh2Qy.esm.js";import"../chunks/localize-GCkVUD8S.esm.js";import"../chunks/is-all-html-elements-SdSkxirh.esm.js";const t=e({tagName:m.tagName,elementClass:m,react:a,events:{}});export{t as BeamCumulativeImpact,t as default};
|
|
2
2
|
//# sourceMappingURL=cumulative-impact.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import a from"react";import{l as e}from"../chunks/lit-yVXn5Cbs.esm.js";import{BeamCumulativeImpact as m}from"../components/cumulative-impact.js";import"../chunks/lodash-P8OIs-at.esm.js";import"../chunks/enforce-config-
|
|
1
|
+
import a from"react";import{l as e}from"../chunks/lit-yVXn5Cbs.esm.js";import{BeamCumulativeImpact as m}from"../components/cumulative-impact.js";import"../chunks/lodash-P8OIs-at.esm.js";import"../chunks/enforce-config-fo8kIfoY.esm.js";import"../chunks/beam-errors-P-Lu07Ce.esm.js";import"../utils/logger.js";import"../chunks/routes-1-1FXngS.esm.js";import"../chunks/localize-pzAAkBvG.esm.js";import"../chunks/is-all-html-elements-SdSkxirh.esm.js";const t=e({tagName:m.tagName,elementClass:m,react:a,events:{}});export{t as BeamCumulativeImpact,t as default};
|
|
2
2
|
//# sourceMappingURL=cumulative-impact.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import r from"react";import{l as e}from"../chunks/lit-yVXn5Cbs.esm.js";import{BeamImpactOverview as m}from"../components/impact-overview.esm.js";import"../chunks/lodash-P8OIs-at.esm.js";import"../chunks/routes-
|
|
1
|
+
import r from"react";import{l as e}from"../chunks/lit-yVXn5Cbs.esm.js";import{BeamImpactOverview as m}from"../components/impact-overview.esm.js";import"../chunks/lodash-P8OIs-at.esm.js";import"../chunks/routes-RgILh2Qy.esm.js";import"../chunks/beam-errors-P-Lu07Ce.esm.js";import"../utils/logger.esm.js";import"../chunks/progress-bar-7gWYaGlq.esm.js";import"../chunks/enforce-config-qna7hEL6.esm.js";import"../chunks/localize-GCkVUD8S.esm.js";import"../chunks/vendor-eeJfrOkP.esm.js";import"../chunks/is-all-html-elements-SdSkxirh.esm.js";import"../components/beam-partner-logos.esm.js";import"../chunks/responsive-LYEag6TI.esm.js";const t=e({tagName:m.tagName,elementClass:m,react:r,events:{}});export{t as BeamImpactOverview,t as default};
|
|
2
2
|
//# sourceMappingURL=impact-overview.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import r from"react";import{l as e}from"../chunks/lit-yVXn5Cbs.esm.js";import{BeamImpactOverview as m}from"../components/impact-overview.js";import"../chunks/lodash-P8OIs-at.esm.js";import"../chunks/routes-
|
|
1
|
+
import r from"react";import{l as e}from"../chunks/lit-yVXn5Cbs.esm.js";import{BeamImpactOverview as m}from"../components/impact-overview.js";import"../chunks/lodash-P8OIs-at.esm.js";import"../chunks/routes-1-1FXngS.esm.js";import"../chunks/beam-errors-P-Lu07Ce.esm.js";import"../utils/logger.js";import"../chunks/progress-bar-7gWYaGlq.esm.js";import"../chunks/enforce-config-fo8kIfoY.esm.js";import"../chunks/localize-pzAAkBvG.esm.js";import"../chunks/vendor-eeJfrOkP.esm.js";import"../chunks/is-all-html-elements-SdSkxirh.esm.js";import"../components/beam-partner-logos.js";import"../chunks/responsive-LYEag6TI.esm.js";const t=e({tagName:m.tagName,elementClass:m,react:r,events:{}});export{t as BeamImpactOverview,t as default};
|
|
2
2
|
//# sourceMappingURL=impact-overview.js.map
|
package/dist/react/index.d.ts
CHANGED
|
@@ -16,9 +16,9 @@ import '../chunks/types-7kSi85Gv.esm.js';
|
|
|
16
16
|
import '../components/cumulative-impact.js';
|
|
17
17
|
import 'lodash';
|
|
18
18
|
import '../components/impact-overview.js';
|
|
19
|
-
import '../chunks/events-
|
|
20
|
-
import '../chunks/cart-contents-
|
|
21
|
-
import '../chunks/openapi-spec-
|
|
19
|
+
import '../chunks/events-q1pdogmn.esm.js';
|
|
20
|
+
import '../chunks/cart-contents-Z-r5GpWA.esm.js';
|
|
21
|
+
import '../chunks/openapi-spec-S9cYW1SA.esm.js';
|
|
22
22
|
import '../components/select-nonprofit.js';
|
|
23
23
|
import '../components/redeem-transaction.js';
|
|
24
24
|
import '../components/post-purchase.js';
|
package/dist/react/index.esm.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{BeamCommunityImpact as N}from"./community-impact.esm.js";import{BeamCumulativeImpact as R}from"./cumulative-impact.esm.js";import{BeamImpactOverview as j}from"./impact-overview.esm.js";import{BeamSelectNonprofit as q}from"./select-nonprofit.esm.js";import{BeamRedeemTransaction as A}from"./redeem-transaction.esm.js";import{BeamPostPurchase as E}from"./post-purchase.esm.js";import{BeamSubscriptionManagement as G}from"./subscription-management.esm.js";import"react";import"../chunks/lit-yVXn5Cbs.esm.js";import"../components/community-impact.esm.js";import"../chunks/progress-bar-7gWYaGlq.esm.js";import"../components/beam-partner-logos.esm.js";import"../chunks/enforce-config-
|
|
1
|
+
import{BeamCommunityImpact as N}from"./community-impact.esm.js";import{BeamCumulativeImpact as R}from"./cumulative-impact.esm.js";import{BeamImpactOverview as j}from"./impact-overview.esm.js";import{BeamSelectNonprofit as q}from"./select-nonprofit.esm.js";import{BeamRedeemTransaction as A}from"./redeem-transaction.esm.js";import{BeamPostPurchase as E}from"./post-purchase.esm.js";import{BeamSubscriptionManagement as G}from"./subscription-management.esm.js";import"react";import"../chunks/lit-yVXn5Cbs.esm.js";import"../components/community-impact.esm.js";import"../chunks/progress-bar-7gWYaGlq.esm.js";import"../components/beam-partner-logos.esm.js";import"../chunks/enforce-config-qna7hEL6.esm.js";import"../chunks/beam-errors-P-Lu07Ce.esm.js";import"../utils/logger.esm.js";import"../chunks/routes-RgILh2Qy.esm.js";import"../chunks/localize-GCkVUD8S.esm.js";import"../chunks/css-card-grid-3b56QBzq.esm.js";import"../components/cumulative-impact.esm.js";import"../chunks/lodash-P8OIs-at.esm.js";import"../chunks/is-all-html-elements-SdSkxirh.esm.js";import"../components/impact-overview.esm.js";import"../chunks/vendor-eeJfrOkP.esm.js";import"../chunks/responsive-LYEag6TI.esm.js";import"../chunks/events-5IECSF-x.esm.js";import"../components/select-nonprofit.esm.js";import"../utils/network-listeners.esm.js";import"../utils/local-storage.esm.js";import"../utils/cookies.esm.js";import"../chunks/cart-contents-h60geKWa.esm.js";import"../components/redeem-transaction.esm.js";import"../components/post-purchase.esm.js";import"../components/subscription-management.esm.js";export{N as BeamCommunityImpact,R as BeamCumulativeImpact,j as BeamImpactOverview,E as BeamPostPurchase,A as BeamRedeemTransaction,q as BeamSelectNonprofit,G as BeamSubscriptionManagement};
|
|
2
2
|
//# sourceMappingURL=index.esm.js.map
|
package/dist/react/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{BeamCommunityImpact as N}from"./community-impact.js";import{BeamCumulativeImpact as R}from"./cumulative-impact.js";import{BeamImpactOverview as j}from"./impact-overview.js";import{BeamSelectNonprofit as q}from"./select-nonprofit.js";import{BeamRedeemTransaction as A}from"./redeem-transaction.js";import{BeamPostPurchase as E}from"./post-purchase.js";import{BeamSubscriptionManagement as G}from"./subscription-management.js";import"react";import"../chunks/lit-yVXn5Cbs.esm.js";import"../components/community-impact.js";import"../chunks/progress-bar-7gWYaGlq.esm.js";import"../components/beam-partner-logos.js";import"../chunks/enforce-config-
|
|
1
|
+
import{BeamCommunityImpact as N}from"./community-impact.js";import{BeamCumulativeImpact as R}from"./cumulative-impact.js";import{BeamImpactOverview as j}from"./impact-overview.js";import{BeamSelectNonprofit as q}from"./select-nonprofit.js";import{BeamRedeemTransaction as A}from"./redeem-transaction.js";import{BeamPostPurchase as E}from"./post-purchase.js";import{BeamSubscriptionManagement as G}from"./subscription-management.js";import"react";import"../chunks/lit-yVXn5Cbs.esm.js";import"../components/community-impact.js";import"../chunks/progress-bar-7gWYaGlq.esm.js";import"../components/beam-partner-logos.js";import"../chunks/enforce-config-fo8kIfoY.esm.js";import"../chunks/beam-errors-P-Lu07Ce.esm.js";import"../utils/logger.js";import"../chunks/routes-1-1FXngS.esm.js";import"../chunks/localize-pzAAkBvG.esm.js";import"../chunks/css-card-grid-3b56QBzq.esm.js";import"../components/cumulative-impact.js";import"../chunks/lodash-P8OIs-at.esm.js";import"../chunks/is-all-html-elements-SdSkxirh.esm.js";import"../components/impact-overview.js";import"../chunks/vendor-eeJfrOkP.esm.js";import"../chunks/responsive-LYEag6TI.esm.js";import"../chunks/events-5IECSF-x.esm.js";import"../components/select-nonprofit.js";import"../utils/network-listeners.js";import"../utils/local-storage.js";import"../utils/cookies.js";import"../chunks/cart-contents-h60geKWa.esm.js";import"../components/redeem-transaction.js";import"../components/post-purchase.js";import"../components/subscription-management.js";export{N as BeamCommunityImpact,R as BeamCumulativeImpact,j as BeamImpactOverview,E as BeamPostPurchase,A as BeamRedeemTransaction,q as BeamSelectNonprofit,G as BeamSubscriptionManagement};
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -8,8 +8,8 @@ import 'lodash';
|
|
|
8
8
|
import '../chunks/progress-bar-0VS_AmEf.esm.js';
|
|
9
9
|
import '../components/beam-partner-logos.js';
|
|
10
10
|
import '../chunks/types-7kSi85Gv.esm.js';
|
|
11
|
-
import '../chunks/cart-contents-
|
|
12
|
-
import '../chunks/openapi-spec-
|
|
11
|
+
import '../chunks/cart-contents-Z-r5GpWA.esm.js';
|
|
12
|
+
import '../chunks/openapi-spec-S9cYW1SA.esm.js';
|
|
13
13
|
import '../components/impact-overview.js';
|
|
14
14
|
|
|
15
15
|
declare const BeamPostPurchase: _lit_react.ReactWebComponent<BeamPostPurchase$1, {}>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import o from"react";import{l as r}from"../chunks/lit-yVXn5Cbs.esm.js";import{BeamPostPurchase as t}from"../components/post-purchase.esm.js";import"../utils/cookies.esm.js";import"../chunks/enforce-config-
|
|
1
|
+
import o from"react";import{l as r}from"../chunks/lit-yVXn5Cbs.esm.js";import{BeamPostPurchase as t}from"../components/post-purchase.esm.js";import"../utils/cookies.esm.js";import"../chunks/enforce-config-qna7hEL6.esm.js";import"../chunks/beam-errors-P-Lu07Ce.esm.js";import"../utils/logger.esm.js";import"../utils/local-storage.esm.js";import"../chunks/routes-RgILh2Qy.esm.js";import"../components/redeem-transaction.esm.js";import"../chunks/lodash-P8OIs-at.esm.js";import"../chunks/progress-bar-7gWYaGlq.esm.js";import"../components/beam-partner-logos.esm.js";import"../chunks/localize-GCkVUD8S.esm.js";import"../chunks/css-card-grid-3b56QBzq.esm.js";import"../chunks/events-5IECSF-x.esm.js";import"../components/impact-overview.esm.js";import"../chunks/vendor-eeJfrOkP.esm.js";import"../chunks/is-all-html-elements-SdSkxirh.esm.js";import"../chunks/responsive-LYEag6TI.esm.js";import"../chunks/cart-contents-h60geKWa.esm.js";const m=r({tagName:t.tagName,elementClass:t,react:o,events:{}});export{m as BeamPostPurchase,m as default};
|
|
2
2
|
//# sourceMappingURL=post-purchase.esm.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import o from"react";import{l as r}from"../chunks/lit-yVXn5Cbs.esm.js";import{BeamPostPurchase as t}from"../components/post-purchase.js";import"../utils/cookies.js";import"../chunks/enforce-config-
|
|
1
|
+
import o from"react";import{l as r}from"../chunks/lit-yVXn5Cbs.esm.js";import{BeamPostPurchase as t}from"../components/post-purchase.js";import"../utils/cookies.js";import"../chunks/enforce-config-fo8kIfoY.esm.js";import"../chunks/beam-errors-P-Lu07Ce.esm.js";import"../utils/logger.js";import"../utils/local-storage.js";import"../chunks/routes-1-1FXngS.esm.js";import"../components/redeem-transaction.js";import"../chunks/lodash-P8OIs-at.esm.js";import"../chunks/progress-bar-7gWYaGlq.esm.js";import"../components/beam-partner-logos.js";import"../chunks/localize-pzAAkBvG.esm.js";import"../chunks/css-card-grid-3b56QBzq.esm.js";import"../chunks/events-5IECSF-x.esm.js";import"../components/impact-overview.js";import"../chunks/vendor-eeJfrOkP.esm.js";import"../chunks/is-all-html-elements-SdSkxirh.esm.js";import"../chunks/responsive-LYEag6TI.esm.js";import"../chunks/cart-contents-h60geKWa.esm.js";const m=r({tagName:t.tagName,elementClass:t,react:o,events:{}});export{m as BeamPostPurchase,m as default};
|
|
2
2
|
//# sourceMappingURL=post-purchase.js.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import * as _lit_react from '@lit/react';
|
|
2
2
|
import { EventName } from '@lit/react';
|
|
3
|
-
import { B as BeamNonprofitSelectEvent } from '../chunks/events-
|
|
3
|
+
import { B as BeamNonprofitSelectEvent } from '../chunks/events-q1pdogmn.esm.js';
|
|
4
4
|
import { BeamRedeemTransaction as BeamRedeemTransaction$1 } from '../components/redeem-transaction.js';
|
|
5
|
-
import '../chunks/cart-contents-
|
|
6
|
-
import '../chunks/openapi-spec-
|
|
5
|
+
import '../chunks/cart-contents-Z-r5GpWA.esm.js';
|
|
6
|
+
import '../chunks/openapi-spec-S9cYW1SA.esm.js';
|
|
7
7
|
import '../chunks/types-7kSi85Gv.esm.js';
|
|
8
8
|
import 'lit-html';
|
|
9
9
|
import 'lit';
|