{"version":3,"file":"PageBody.5f219a79.js","sources":["../../../../../../node_modules/@ObamaFoundation/of-design-system/dist/utilities/youtubeIframeApi.js","../../../../../../node_modules/@ObamaFoundation/of-design-system/dist/molecules/Cards/AvatarCard.svelte","../../../../../../node_modules/@ObamaFoundation/of-design-system/dist/molecules/CallToAction.svelte","../../../../../../node_modules/@ObamaFoundation/of-design-system/dist/assets/patterns/amplify.svelte","../../../../../../node_modules/@ObamaFoundation/of-design-system/dist/assets/patterns/radiate.svelte","../../../../../../node_modules/@ObamaFoundation/of-design-system/dist/assets/patterns/spark.svelte","../../../../../../node_modules/@ObamaFoundation/of-design-system/dist/atoms/Pattern.svelte","../../../../../../node_modules/@ObamaFoundation/of-design-system/dist/atoms/WithPattern.svelte","../../../../../../node_modules/@ObamaFoundation/of-design-system/dist/molecules/CallToActionSticky.svelte","../../../../../../node_modules/@ObamaFoundation/of-design-system/dist/molecules/CardLayout.svelte","../../../../../../node_modules/@ObamaFoundation/of-design-system/dist/molecules/CardLayoutMasonry/GridMasonry.svelte","../../../../../../node_modules/@ObamaFoundation/of-design-system/dist/molecules/CardLayoutMasonry/CardLayoutMasonry.svelte","../../../../../../node_modules/@ObamaFoundation/of-design-system/dist/molecules/CardLayoutMixed.svelte","../../../../../../node_modules/@ObamaFoundation/of-design-system/dist/molecules/Carousel/CarouselSlide.svelte","../../../../../../node_modules/@ObamaFoundation/of-design-system/dist/molecules/Carousel/Carousel.svelte","../../../../../../node_modules/@ObamaFoundation/of-design-system/dist/molecules/Cards/LinkCard.svelte","../../../../../../node_modules/@ObamaFoundation/of-design-system/dist/organisms/CenteredLayout.svelte","../../../../../../node_modules/@ObamaFoundation/of-design-system/dist/molecules/WordCloud.svelte","../../../../../../node_modules/@ObamaFoundation/of-design-system/dist/organisms/Donate.svelte","../../../../../../node_modules/@ObamaFoundation/of-design-system/dist/molecules/ImageGrid.svelte","../../../../../../node_modules/@ObamaFoundation/of-design-system/dist/molecules/FormFields/Input.svelte","../../../../../../node_modules/@ObamaFoundation/of-design-system/dist/molecules/List/ListItem.svelte","../../../../../../node_modules/@ObamaFoundation/of-design-system/dist/molecules/List/List.svelte","../../../../../../node_modules/@ObamaFoundation/of-design-system/dist/molecules/ListQA/ListQA.svelte","../../../../../../node_modules/@ObamaFoundation/of-design-system/dist/molecules/FormFields/Textarea.svelte","../../../../../../node_modules/@ObamaFoundation/of-design-system/dist/molecules/FormFields/HiddenInput.svelte","../../../../../../node_modules/@ObamaFoundation/of-design-system/dist/molecules/FormFields/FormField.svelte","../../../../../../node_modules/@ObamaFoundation/of-design-system/dist/organisms/NewsLetter/NewsletterForm.svelte","../../../../../../node_modules/@ObamaFoundation/of-design-system/dist/organisms/NewsLetter/NewsletterFormView.svelte","../../../../../../node_modules/@ObamaFoundation/of-design-system/dist/organisms/NewsLetter/NewsletterConfirmationViewInfo.svelte","../../../../../../node_modules/@ObamaFoundation/of-design-system/dist/organisms/NewsLetter/NewsletterConfirmationView.svelte","../../../../../../node_modules/@ObamaFoundation/of-design-system/dist/organisms/NewsLetter/NewsLetter.svelte","../../../../../../node_modules/@ObamaFoundation/of-design-system/dist/molecules/Quote.svelte","../../../../../../node_modules/@ObamaFoundation/of-design-system/dist/molecules/StaticMenu/StaticMenuLink.svelte","../../../../../../node_modules/@ObamaFoundation/of-design-system/dist/molecules/StaticMenu/StaticMenu.svelte","../../../../../../node_modules/@ObamaFoundation/of-design-system/dist/molecules/Cards/StoryCard.svelte","../../../../../../node_modules/@ObamaFoundation/of-design-system/dist/organisms/TertiaryNavigation/TertiaryNavigationItem.svelte","../../../../../../node_modules/@ObamaFoundation/of-design-system/dist/organisms/TertiaryNavigation/TertiaryNavigation.svelte","../../../../../../node_modules/@ObamaFoundation/of-design-system/dist/organisms/Timeline/Timeline.svelte","../../../../../../node_modules/@ObamaFoundation/of-design-system/dist/molecules/YoutubeIframe.svelte","../../../../../../node_modules/@ObamaFoundation/of-design-system/dist/organisms/Video.svelte","../../../../../../node_modules/@ObamaFoundation/of-design-system/dist/organisms/VideoPlaylist.svelte","../../../../../../src/lib/utilities/contentTypes/itemPreviewList.js","../../../../../../src/lib/utilities/formFields.js","../../../../../../src/lib/utilities/contentTypes/email-signup.js","../../../../../../src/lib/utilities/contentTypes/contributors.js","../../../../../../src/lib/utilities/components/richText.js","../../../../../../node_modules/svelte-intersection-observer/IntersectionObserver.svelte","../../../../../../src/lib/components/WordCloud.svelte","../../../../../../src/lib/contentTypes/WordCloud.svelte","../../../../../../src/lib/components/Video.svelte","../../../../../../src/lib/utilities/components/embeds.js","../../../../../../src/lib/utilities/contentTypes/video.js","../../../../../../src/lib/contentTypes/Video.svelte","../../../../../../src/lib/components/BlockQuote.svelte","../../../../../../src/lib/contentTypes/BlockQuote.svelte","../../../../../../src/lib/components/Accordion.svelte","../../../../../../src/lib/components/CallToAction.svelte","../../../../../../src/lib/contentTypes/CallToActionComponent.svelte","../../../../../../src/lib/components/EmailSignupForm.svelte","../../../../../../src/lib/contentTypes/EmailSignupForm.svelte","../../../../../../src/lib/components/Embed/DoubleTheDonation.svelte","../../../../../../src/lib/components/Embed/EmbedWrapper.svelte","../../../../../../src/lib/components/Embed/FacebookEmbed.svelte","../../../../../../src/lib/components/Embed/InstagramEmbed.svelte","../../../../../../src/lib/components/Embed/Iframe.svelte","../../../../../../src/lib/components/Embed/SoundCloudEmbed.svelte","../../../../../../src/lib/components/Link.svelte","../../../../../../src/lib/components/Embed/SpotifyEmbed.svelte","../../../../../../src/lib/components/LoadingIndicator.svelte","../../../../../../src/lib/components/Embed/TwitterEmbed.svelte","../../../../../../node_modules/@typeform/embed/build/index.js","../../../../../../src/lib/components/Embed/TypeformEmbed.svelte","../../../../../../src/lib/contentTypes/Embed.svelte","../../../../../../src/lib/components/Button.svelte","../../../../../../src/lib/contentTypes/LinkComponent.svelte","../../../../../../src/lib/components/Heading.svelte","../../../../../../src/lib/contentTypes/HTMLSnippet.svelte","../../../../../../node_modules/@contentful/rich-text-types/dist/blocks.js","../../../../../../node_modules/@contentful/rich-text-types/dist/inlines.js","../../../../../../node_modules/@contentful/rich-text-types/dist/marks.js","../../../../../../node_modules/@contentful/rich-text-types/dist/schemaConstraints.js","../../../../../../node_modules/@contentful/rich-text-types/dist/types.js","../../../../../../node_modules/@contentful/rich-text-types/dist/nodeTypes.js","../../../../../../node_modules/@contentful/rich-text-types/dist/emptyDocument.js","../../../../../../node_modules/@contentful/rich-text-types/dist/helpers.js","../../../../../../node_modules/@contentful/rich-text-types/dist/index.js","../../../../../../src/lib/components/Element.svelte","../../../../../../node_modules/@sveltejs/kit/src/exports/index.js","../../../../../../src/lib/components/RichText.svelte","../../../../../../src/lib/contentTypes/FreeRichTextComponent.svelte","../../../../../../src/lib/components/List.svelte","../../../../../../src/lib/components/ListQA.svelte","../../../../../../src/lib/components/VideoPlaylist.svelte","../../../../../../src/lib/utilities/contentTypes/contentGroup.js","../../../../../../src/lib/components/SplitLayout.svelte","../../../../../../src/lib/components/Timeline.svelte","../../../../../../src/lib/contentTypes/ContentGroup.svelte","../../../../../../src/lib/components/ImageGrid.svelte","../../../../../../src/lib/components/Carousel.svelte","../../../../../../src/lib/contentTypes/ImageGroup.svelte","../../../../../../src/lib/utilities/date.js","../../../../../../src/lib/components/Card/Vertical/HeadlineCard.svelte","../../../../../../src/lib/components/ItemPreviewList.svelte","../../../../../../src/lib/contentTypes/ItemPreviewList.svelte","../../../../../../src/lib/components/MenuTypes/Static/Static.svelte","../../../../../../src/lib/utilities/menu-helpers.js","../../../../../../src/lib/components/TertiaryMenu.svelte","../../../../../../src/lib/contentTypes/Menu.svelte","../../../../../../src/lib/components/SplitLayoutCallToAction.svelte","../../../../../../src/lib/contentTypes/SplitLayoutComponent.svelte","../../../../../../src/lib/components/Form/NewsletterList.svelte","../../../../../../src/lib/contentTypes/CenteredLayout.svelte","../../../../../../src/lib/assets/fundraisingGraph.png","../../../../../../src/lib/components/GraphImage.svelte","../../../../../../src/lib/contentTypes/FundraisingGraph.svelte","../../../../../../src/lib/components/Donate.svelte","../../../../../../src/lib/contentTypes/Donate.svelte","../../../../../../src/lib/components/Contributors/DonorNames.svelte","../../../../../../src/lib/components/SearchableList.svelte","../../../../../../src/lib/components/Contributors/DonorSearch.svelte","../../../../../../src/lib/components/Contributors/DonorAccordion.svelte","../../../../../../src/lib/contentTypes/Contributors.svelte","../../../../../../src/lib/contentTypes/SectionComponent.svelte","../../../../../../src/lib/contentTypes/Bio.svelte","../../../../../../src/lib/components/Page/PageBody.svelte"],"sourcesContent":["export const extractYoutubeVideoId = (url) => {\n if (!url) {\n return undefined;\n }\n\n const youtubeRegex =\n /* eslint-disable-next-line */\n /(?:https?:\\/\\/)?(?:www\\.)?youtu\\.?be(?:\\.com)?\\/?.*(?:watch|embed)?(?:.*v=|v\\/|\\/)([\\w\\-_]+)\\&?/;\n\n const found = url.match(youtubeRegex);\n\n return found ? found[1] : undefined;\n};\n","\n\n{#if linkUrl && title}\n \n {#if hasFeatureImage}\n \n {/if}\n

\n {title}\n

\n {#if description}\n

\n {description}\n

\n {/if}\n \n{/if}\n","\n\n\n \n \n \n \n \n {#if cta}\n (isCardFocused = true)}\n on:focusout={() => (isCardFocused = false)}\n on:mouseenter={() => (isLinkHovered = true)}\n on:mouseleave={() => (isLinkHovered = false)}\n data-sveltekit-reload\n >\n {title}\n \n {/if}\n \n\n {#if description}\n

\n {description}\n

\n {/if}\n\n {#if cta}\n \n {/if}\n \n
\n \n
\n","\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n","\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n","\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n","\n\n\n\n\n","\n\n\n\n \n
\n \n
\n\n \n {#if name}\n
\n \n
\n {/if}\n\n","\n\n\n \n {#if eyebrow}\n

\n {eyebrow}\n

\n {/if}\n \n {#if cta}\n (isLinkHovered = true)}\n on:mouseleave={() => (isLinkHovered = false)}\n >\n {title}\n \n {:else}\n {title}\n {/if}\n \n {#if cta}\n \n {/if}\n \n
\n","\n\n\n\n{#if items.length > 0 && !!component && isValidLayout}\n \n \n \n \n \n \n \n {#each items as item}\n \n \n \n {/each}\n \n \n{/if}\n","\n\n\n \n\n\n {\n const target = /** @type {Window} */ (event.target);\n\n if (target.innerWidth !== screenWidth) {\n debouncedRefreshLayout(event);\n }\n }}\n/>\n","\n\n\n\n{#if items.length > 0 && !!component && isValidLayout}\n \n
\n \n \n \n {#each items as item, i}\n
\n \n {#if i < items.length - 1}\n
\n \n
\n {/if}\n
\n {/each}\n \n
\n
\n{/if}\n","\n\n\n\n{#if !!component && isValidLayout}\n
\n \n {#if gridItems.featuredItems.length > 0}\n \n \n {#each gridItems.featuredItems as item, index}\n \n \n
\n {/each}\n \n \n {/if}\n \n\n \n {#if gridItems.items.length > 0}\n {#if variant === \"masonry\"}\n \n {:else}\n \n {/if}\n {/if}\n \n \n{/if}\n","\n\n\n \n \n {#if text}\n

{text}

\n {/if}\n

{index + 1}/{totalSlides}

\n \n\n","\n\n\n\n{#if data?.length}\n \n \n \n {#each data as { text, image, altText, srcset, sizes }, index (index)}\n {@const pseudoElement = `before:content-[''] before:h-full before:scale-y-[10] before:absolute before:w-[1px] before:bg-black before:top-[0px] before:-left-[0.9375rem] md:before:-left-4.5 lg:before:-left-9 first-of-type:before:hidden`}\n \n \n \n {/each}\n \n \n\n
\n \n \n
\n \n {ariaLiveRegionText}\n \n
\n{/if}\n","\n\n{#if cta && cta.url && title}\n \n {#if hasImage}\n \n {/if}\n
\n

\n (isCardFocused = true)}\n on:focusout={() => (isCardFocused = false)}\n on:mouseenter={() => (isLinkHovered = true)}\n on:mouseleave={() => (isLinkHovered = false)}\n >\n {title}\n \n

\n {#if description && !centeredLayout}\n

\n {description}\n

\n {/if}\n {#if cta.text}\n \n {/if}\n
\n \n{/if}\n","\n\n\n \n \n
\n {#if title}\n \n {title}\n \n {/if}\n
\n \n
\n \n
\n
\n {#if linkCard}\n
\n \n
\n {/if}\n
\n
\n
\n
\n","\n\n{#if contentList?.length}\n \n
\n \n {#each parsedContentList as contentItem, index (index)}\n {#if contentItem?.type === \"image\"}\n \n \n \n \n \n {:else if contentItem?.type === \"text\"}\n \n \n {`${contentItem.content} `}\n \n \n {/if}\n {/each}\n {#if linkUrl && linkLabel}\n \n \n \n \n \n {/if}\n \n
\n
\n{/if}\n","\n\n\n \n
\n
\n \n \n \n
\n
\n \n {#if description}\n

\n {description}\n

\n {/if}\n
\n
\n
\n \n {#if disclaimer}\n

\n {disclaimer}\n

\n {/if}\n
\n
\n
\n
\n \n
\n
\n
\n","\n\n\n \n \n {#each images as { image, caption }}\n \n
\n \n {#if $$slots.caption}\n \n

{caption}

\n
\n {/if}\n
\n
\n \n {/each}\n
\n
\n","\n\n
\n
\n
\n {/if}\n
\n
\n {#if isInvalid && errorMessage}\n {errorMessage}\n {:else}\n   \n {/if}\n
\n\n","\n\n\n
\n {#if number}\n

{number}

\n {/if}\n
\n \n {label}\n \n \n
\n
\n
\n","\n\n
\n \n {#each data as { headline, body, component, componentProps }, index (index)}\n \n \n {#if component}\n \n {:else if !!body}\n {body}\n {/if}\n \n \n {/each}\n \n
\n","\n\n\n \n \n \n {#each items as { question, answer }}\n
  • \n \n {question}\n \n
    \n {#if answer.bodyProps}\n \n {:else}\n

    {answer.body}

    \n {/if}\n
    \n
  • \n {/each}\n \n
    \n
    \n
    \n","\n\n
    \n
    \n
    \n {/if}\n
    \n\n
    \n \n {#if isInvalid && errorMessage}\n {errorMessage}\n {/if}\n \n\n \n {inputLength}/{maxlength}\n \n
    \n\n","\n\n\n\n","\n\n\n\n\n \n
    \n","\n\n
    \n {#each formFields.filter((f) => f.type !== \"submit\") as formField (formField?.id)}\n \n \n {#if formField?.type === \"checkbox\"}\n \n Yes, I agree to the\n \n \n {/if}\n \n \n {/each}\n\n
    \n \n {#if formSubmitErrorMessage}\n
    \n {formSubmitErrorMessage}\n
    \n {/if}\n
    \n\n
    \n {ariaLiveTextOnValidatingFields ? ariaLiveTextOnValidatingFields : ariaLiveTextOnSubmitting}\n
    \n\n","\n\n\n
    \n {#if layoutVariant === \"horizontal\"}\n
    \n {#if hasFeatureImage}\n
    \n \n
    \n {:else}\n
    \n \n {title}\n \n

    {description}

    \n
    \n {/if}\n\n
    \n {#if hasFeatureImage}\n
    \n \n {title}\n \n

    {description}

    \n
    \n {/if}\n
    \n \n
    \n
    \n
    \n {:else}\n \n {/if}\n
    \n
    \n","\n\n\n
    \n \n {subTitle}\n \n

    {description}

    \n \n
    \n
    \n","\n\n\n
    \n {#if hasFeatureImage}\n
    \n \n
    \n {:else}\n
    \n \n {title}\n \n
    \n {/if}\n\n
    \n {#if hasFeatureImage}\n
    \n \n {title}\n \n
    \n \n
    \n
    \n {/if}\n
    \n {#if !hasFeatureImage}\n
    \n \n
    \n {/if}\n
    \n
    \n
    \n
    \n","\n\n
    \n \n \n
    \n\n
    \n \n
    \n\n","\n\n{#if variant === \"full\"}\n \n {#if hasImage}\n \n {/if}\n
    \n

    \n \n {text}”\n

    \n {#if caption}\n \n {caption}\n \n {/if}\n
    \n \n{:else if variant === \"inset\"}\n
    \n {#if hasImage && variant !== \"inset\"}\n \n {/if}\n
    \n

    \n \n {text}”\n

    \n {#if caption}\n \n {caption}\n \n {/if}\n
    \n
    \n{/if}\n","\n\n\n {link.label}\n
    \n \n \n \n {#if link.imageSrc}\n \n {/if}\n
    \n\n\n","\n\n\n \n\n","\n\n{#if cardUrl && title}\n \n {#if hasFeatureImage}\n \n {/if}\n
    \n {#if tags}\n \n {/if}\n
    \n (isCardFocused = true)}\n on:focusout={() => (isCardFocused = false)}\n on:mouseenter={() => (isLinkHovered = true)}\n on:mouseleave={() => (isLinkHovered = false)}\n >\n {title}\n \n
    \n {#if description}\n

    {description}

    \n {/if}\n {#if cta}\n \n {/if}\n
    \n \n{/if}\n","\n\n
      \n {#each links as link}\n {@const isCurrentRoute = link.url === currentRoute}\n
    • \n \n {link.label}\n \n
    • \n {/each}\n
    \n","\n\n\n","\n\n
    \n {#each schedules as schedule, index}\n {@const isLast = index === schedules.length - 1}\n
    \n \n \n
    \n {/each}\n
    \n","\n\n
    \n \n
    \n
    \n","\n\n\n
    \n {#if videoId}\n
    \n \n {#if !hasVideoStartedFromBeginning}\n \n {#if !isPlayingLoopSection && videoCoverImage && videoCoverImage.src}\n \n {/if}\n
    \n\n {#if hasLoopingSection}\n \n \n \n {/if}\n \n \n \n {/if}\n
    \n {/if}\n {#if caption}\n

    \n {caption}\n

    \n {/if}\n {#if header?.trim().length > 0}\n \n {header}\n \n {/if}\n {#if body}\n

    \n {body}\n

    \n {/if}\n
    \n\n","\n\n
    \n {#each videos as video, index}\n
    \n","import { FEATURED_IMAGES_POSITIONS, ITEM_PREVIEW_LIST_FORMS } from \"$lib/utilities/constants\";\nimport { correctedUrl, isExternalUrl } from \"$lib/utilities/url-helpers\";\nimport {\n buildSrc,\n srcSetFromWidths,\n SRCSET_WIDTHS,\n getClosestAspectRatioClass\n} from \"$lib/utilities\";\nimport { STORY_CARD_ASPECT_RATIO_CLASSES } from \"$lib/utilities/image\";\n\nexport let resizeParams = {};\n\nconst DEFAULT_STORY_CARD_THEME = \"lightGrey\";\n\nconst getStoryCardTheme = (theme) => {\n return theme ?? DEFAULT_STORY_CARD_THEME;\n};\n\nconst getStoryCardTags = (item) => {\n let tags = item.contentTags;\n\n if (item.sourceTagItemId) {\n tags = item.contentTags\n .filter((tag) => tag.sys.id !== item.sourceTagItemId)\n .slice(0, 2)\n .map((tag) => {\n return { name: tag.fields.name };\n });\n } else {\n tags = item.contentTags?.slice(0, 2).map((tag) => {\n return { name: tag.fields.name };\n });\n }\n\n return tags;\n};\n\nconst getStoryCardPropsByContentType = (item) => {\n switch (item.contentType) {\n case \"navTarget\": {\n return {\n title: item.text,\n description: item.description,\n imageAspectRatioClasses: item.image\n ? getClosestAspectRatioClass(\n item.image?.fields?.file?.details?.image?.width,\n item.image?.fields?.file?.details?.image?.height,\n STORY_CARD_ASPECT_RATIO_CLASSES\n )\n : null,\n featuredImage: item.image\n ? {\n alt: item.image?.fields?.title,\n src: item.image?.fields?.file.url,\n srcset: srcSetFromWidths(item.image?.fields?.file.url, SRCSET_WIDTHS, resizeParams)\n }\n : null,\n cardUrl: correctedUrl(item.url),\n cta: {\n url: correctedUrl(item.url),\n isExternal: isExternalUrl(item.url),\n text: \"Learn more\",\n id: `cta-${item.id}`\n },\n theme: item.isThemed ? getStoryCardTheme(item.theme) : undefined,\n tags: []\n };\n }\n case \"pageData\": {\n return {\n title: item.headline,\n description: item.previewText,\n imageAspectRatioClasses: item.previewImageComponent\n ? getClosestAspectRatioClass(\n item.previewImageComponent?.fields?.imageAsset?.fields?.file?.details?.image?.width,\n item.previewImageComponent?.fields?.imageAsset?.fields?.file?.details?.image?.height,\n STORY_CARD_ASPECT_RATIO_CLASSES\n )\n : null,\n featuredImage: item.previewImageComponent\n ? {\n alt: item.previewImageComponent?.fields?.altText ?? \"\",\n src: buildSrc(item.previewImageComponent?.fields?.imageAsset),\n srcset: srcSetFromWidths(\n item.previewImageComponent?.fields?.imageAsset.fields.file.url,\n SRCSET_WIDTHS,\n resizeParams\n ),\n theme: item.previewImageComponent?.fields?.theme\n }\n : null,\n cardUrl: correctedUrl(item.relativeUrl),\n cta: {\n url: correctedUrl(item.relativeUrl),\n text: \"Learn more\",\n id: item.sys?.id ? `cta-${item.sys?.id}` : `cta-${item.id}`\n },\n theme: item.isThemed ? getStoryCardTheme(item.theme) : undefined,\n tags: getStoryCardTags(item)\n };\n }\n default:\n return {};\n }\n};\n\nconst DEFAULT_LINK_CARD_THEME = \"skyBlue\";\n\nconst getLinkCardTheme = (theme) => {\n return theme ?? DEFAULT_LINK_CARD_THEME;\n};\n\nconst getLinkCardPropsByContentType = (item) => {\n switch (item.contentType) {\n case \"navTarget\": {\n return {\n title: item?.text,\n description: item.description,\n featuredImage: {\n alt: item.image?.fields?.title,\n src: item.image?.fields?.file.url,\n srcset: srcSetFromWidths(item.image?.fields?.file.url, SRCSET_WIDTHS, resizeParams)\n },\n cta: {\n url: correctedUrl(item.url),\n isExternal: isExternalUrl(item.url),\n text: \"Learn more\",\n id: `cta-${item.id}`\n },\n titleTag: \"h2\",\n theme: getLinkCardTheme(item.theme)\n };\n }\n case \"pageData\": {\n return {\n title: item.headline,\n description: item.previewText,\n featuredImage: {\n alt: item.previewImageComponent?.fields?.imageAsset?.fields?.title,\n src: item.previewImageComponent?.fields?.imageAsset?.fields?.file.url,\n srcset: srcSetFromWidths(\n item.previewImageComponent?.fields?.imageAsset?.fields?.file.url,\n SRCSET_WIDTHS,\n resizeParams\n ),\n theme: item.previewImageComponent?.fields?.theme\n },\n cta: {\n url: correctedUrl(item?.relativeUrl),\n isExternal: isExternalUrl(item?.relativeUrl),\n text: \"Learn more\",\n id: `cta-${item.id}`\n },\n titleTag: \"h2\",\n theme: getLinkCardTheme(item.theme)\n };\n }\n default:\n return {};\n }\n};\n\nconst getLinkTitleOnlyCardPropsByContentType = (item) => {\n switch (\n item.contentType // correctedUrl used to relativize url of each item in list\n ) {\n case \"navTarget\": {\n return {\n title: item.text,\n cta: {\n url: correctedUrl(item.url),\n isExternal: isExternalUrl(item.url),\n text: \"Learn more\",\n id: `cta-${item.id}`\n },\n titleTag: \"h2\",\n theme: getLinkCardTheme(item.theme)\n };\n }\n case \"pageData\": {\n return {\n title: item.headline,\n cta: {\n url: correctedUrl(item.relativeUrl),\n isExternal: isExternalUrl(item.relativeUrl),\n text: \"Learn more\",\n id: `cta-${item.id}`\n },\n titleTag: \"h2\",\n theme: getLinkCardTheme(item.theme)\n };\n }\n default: {\n return {};\n }\n }\n};\n\nconst getHeadlineCardPropsByContentType = (item) => {\n switch (item.contentType) {\n case \"navTarget\": {\n return {\n title: item.text,\n url: correctedUrl(item.url),\n description: item.name\n };\n }\n case \"pageData\": {\n return {\n timestamp: item.legacyPublishDate || item.sys?.createdAt,\n title: item.headline,\n url: correctedUrl(item.relativeUrl),\n description: item.previewText\n };\n }\n default:\n break;\n }\n};\n\n/**\n * Generate the props for each card component\n * @param {Object} item - data representing each card in the IPL\n * @param {string} itemsFormFactor - the itemsFormFactor for the IPL\n * @returns the props for the card component\n */\nexport const createItemProps = (item, itemsFormFactor) => {\n switch (itemsFormFactor) {\n case ITEM_PREVIEW_LIST_FORMS.Headline:\n return getHeadlineCardPropsByContentType(item);\n\n case ITEM_PREVIEW_LIST_FORMS.Link2:\n case ITEM_PREVIEW_LIST_FORMS.Link2Feature:\n case ITEM_PREVIEW_LIST_FORMS.Link3:\n case ITEM_PREVIEW_LIST_FORMS.Link4:\n return getLinkCardPropsByContentType(item);\n\n case ITEM_PREVIEW_LIST_FORMS.Link4TitleOnly:\n return getLinkTitleOnlyCardPropsByContentType(item);\n\n case ITEM_PREVIEW_LIST_FORMS.Story3FeatureImageLeft:\n return {\n ...getStoryCardPropsByContentType(item),\n imagePosition: FEATURED_IMAGES_POSITIONS.Left\n };\n\n case ITEM_PREVIEW_LIST_FORMS.Story3FeatureImageRight:\n return {\n ...getStoryCardPropsByContentType(item),\n imagePosition: FEATURED_IMAGES_POSITIONS.Right\n };\n\n case ITEM_PREVIEW_LIST_FORMS.Story2:\n case ITEM_PREVIEW_LIST_FORMS.Story3:\n case ITEM_PREVIEW_LIST_FORMS.Story3FeatureTwoThirds:\n case ITEM_PREVIEW_LIST_FORMS.Story3FeatureHalf:\n return getStoryCardPropsByContentType(item);\n\n case ITEM_PREVIEW_LIST_FORMS.Avatar4:\n case ITEM_PREVIEW_LIST_FORMS.Avatar6:\n return {\n title: item?.headline,\n description: item?.previewText,\n featuredImage: {\n alt: item.previewImageComponent?.fields?.imageAsset?.fields?.title,\n src: item.previewImageComponent?.fields?.imageAsset?.fields?.file.url,\n srcset: srcSetFromWidths(\n item.previewImageComponent?.fields?.imageAsset?.fields?.file.url,\n SRCSET_WIDTHS,\n resizeParams\n ),\n theme: item.previewImageComponent?.fields?.theme\n },\n linkUrl: correctedUrl(item.relativeUrl)\n };\n default:\n return {};\n }\n};\n\nexport const getThemedItemIds = (themeObject) => {\n if (themeObject) {\n return themeObject.map((themedItem) => {\n return themedItem.sys?.id;\n });\n }\n return [];\n};\nexport const filterPaginatedItemPreviewListItems = ({\n itemsData,\n featuredItems,\n excludedItems\n}) => {\n const featuredItemIds = featuredItems.map((featuredItem) => {\n return featuredItem.sys?.id;\n });\n const excludedItemIds = excludedItems.map((excludedItem) => {\n return excludedItem.sys?.id;\n });\n // remove excluded items and featured items from array\n let filteredItems = itemsData.filter(\n (item) => !excludedItemIds.includes(item.sys.id) && !featuredItemIds.includes(item.sys.id)\n );\n // sort featured items to the front of the items for display\n filteredItems = featuredItems.concat(filteredItems);\n // remove duplicated items\n filteredItems = filteredItems.filter(\n (item, index, self) => self.findIndex((e) => e.sys.id === item.sys.id) === index\n );\n\n return filteredItems;\n};\nexport const getPaginatedItemPreviewListItems = ({\n itemsData,\n itemsFormFactor,\n themedItemIds,\n featuredItems,\n excludedItems,\n sourceTagItemId,\n itemsPerPage,\n isPopulatedByPathOrTag\n}) => {\n const filteredItems = filterPaginatedItemPreviewListItems({\n itemsData,\n featuredItems,\n excludedItems\n });\n const numOfPages = Math.ceil(filteredItems.length / itemsPerPage);\n const paginatedItems = Array(numOfPages)\n .fill()\n .map((_, i) => {\n return filteredItems.slice(i * itemsPerPage, (i + 1) * itemsPerPage);\n });\n\n const itemsAsProps = paginatedItems.map((pageItems) => {\n return pageItems.map((item) => {\n const isThemed = themedItemIds.includes(item.sys?.id);\n\n return createItemProps(\n // Discriminate between featured items and Tag/Path children\n isPopulatedByPathOrTag && !item.fields\n ? {\n ...item,\n isThemed,\n sourceTagItemId\n }\n : {\n ...item.fields,\n id: item.sys?.id,\n contentType: item.sys?.contentType?.sys?.id,\n isThemed,\n sourceTagItemId\n },\n itemsFormFactor\n );\n });\n });\n\n return itemsAsProps;\n};\n","export const sharedProps = {\n type: \"checkbox\",\n required: false\n};\n\nexport const EMAIL_ADDRESS_ERROR_MESSAGE = \"Error: Must be a valid email address\";\nexport const ONE_OR_MORE_FAILURES_ERROR_MESSAGE =\n \"Error: One or more of the newsletters you selected is not available at the moment.\";\nexport const GENERIC_EMAIL_SIGNUP_SALESFORCE_ERROR_MESSAGE =\n \"We are experiencing issues with our subscription system. Please try again or come back soon to complete your sign-up.\";\n\n// Future work: Move these ids to Contentful so they can be adjusted as needed.\nexport const campaignIds = {\n \"newsletters-select-goa\": \"70136000000z93N\",\n \"newsletters-select-mbka\": \"70136000000z93N\",\n \"newsletters-select-opc\": \"7013p000001u2InAAI\",\n \"newsletters-select-general\": \"70136000000z93N\",\n \"newsletters-select-chicago\": \"7011R000000v7Ry\"\n};\n\n// Given an array of campaign ids, return an array of user friendly names of the corresponding campaigns.\n// Multiple campaigns may share a campaign id, returns all user friendly names associated with\n// each campaign. However, the array of returned names is de-duped.\nexport function getUserFriendlyCampaignsFromIds(valueArr) {\n let userFriendlies = new Set();\n let names = Object.keys(campaignIds).filter((key) => valueArr.includes(campaignIds[key]));\n names.forEach((name) => userFriendlies.add(getUserFriendlyCampaignFromName(name)));\n return Array.from(userFriendlies);\n}\n\n// Given the name (\"newsletter-select-\") of a newsletter, return the user-friendly label\n// of that campaign.\nexport function getUserFriendlyCampaignFromName(name) {\n let userFriendly = Object.keys(newsletterKeys).find(\n (key) => newsletterKeys[key].fieldProps.name === name\n );\n return userFriendly ?? \"\";\n}\n\n/*\n State is an object with the same keys as the campaignIds object with true or false\n indicating whether they have been selected.\n Returns: CSV string of campaignIds\n*/\nexport function listCampaignIdsFromState(state) {\n let ids = new Set();\n for (let newsletter in state) {\n if (state[newsletter] && campaignIds[newsletter]) {\n ids.add(campaignIds[newsletter]);\n }\n }\n return Array.from(ids).join();\n}\n\nexport const newsletterKeys = {\n \"Sign up for all newsletters\": {\n fieldType: \"checkboxField\",\n fieldProps: {\n ...sharedProps,\n name: `newsletters-select-all`,\n label: \"Sign up for all newsletters\",\n labelClass: \"font-bold\",\n id: `newsletters-select-all`\n }\n },\n \"The Girls Opportunity Alliance\": {\n fieldType: \"checkboxField\",\n fieldProps: {\n ...sharedProps,\n name: `newsletters-select-goa`,\n label: \"The Girls Opportunity Alliance\",\n labelClass: \"font-bold\",\n fieldDetailsRichText:\n \"When girls get the opportunities they deserve, amazing things start to happen. Follow the Girls Opportunity Alliance to help adolescent girls and the grassroots leaders working to educate them.\",\n id: `newsletters-select-goa`\n }\n },\n \"My Brother's Keeper Alliance\": {\n fieldType: \"checkboxField\",\n fieldProps: {\n ...sharedProps,\n name: `newsletters-select-mbka`,\n label: \"My Brother's Keeper Alliance\",\n labelClass: \"font-bold\",\n fieldDetailsRichText:\n \"The MBK Alliance focuses on building safe and supportive communities for boys and young men of color where they feel valued and have clear pathways to opportunity.\",\n id: `newsletters-select-mbka`\n }\n },\n \"The Obama Presidential Center\": {\n fieldType: \"checkboxField\",\n fieldProps: {\n ...sharedProps,\n name: `newsletters-select-opc`,\n label: \"The Obama Presidential Center\",\n labelClass: \"font-bold\",\n fieldDetailsRichText:\n \"Be the first to know about planned exhibits, construction updates, and events related to the Obama Presidential Center, a world-class museum and public gathering space that celebrates our nation’s first African American President and First Lady on the South Side of Chicago.\",\n id: `newsletters-select-opc`\n }\n },\n \"General News and Updates\": {\n fieldType: \"checkboxField\",\n fieldProps: {\n ...sharedProps,\n name: `newsletters-select-general`,\n label: \"General News and Updates\",\n labelClass: \"font-bold\",\n fieldDetailsRichText:\n \"President and Mrs. Obama believe the most important thing they can do now is pass the torch of leadership on to a new generation. You’ll get updates about our global network of emerging leaders and the inspiring work they’re doing around the world to change their communities -and our world - for the better.\",\n id: `newsletters-select-general`\n }\n },\n Chicago: {\n fieldType: \"checkboxField\",\n fieldProps: {\n ...sharedProps,\n name: `newsletters-select-chicago`,\n label: \"Chicago\",\n labelClass: \"font-bold\",\n fieldDetailsRichText:\n \"There are many exciting things happening at the Obama Foundation—across the country and the world, but some of the most important work is happening right here in Chicago. We're building a new landmark for the South Side and economic engine for the city with the Obama Presidential Center, in addition to launching new programming, hosting community events, and driving workforce efforts on our beloved South Side.\",\n id: `newsletters-select-chicago`\n }\n }\n};\n","import {\n getUserFriendlyCampaignsFromIds,\n EMAIL_ADDRESS_ERROR_MESSAGE,\n ONE_OR_MORE_FAILURES_ERROR_MESSAGE,\n GENERIC_EMAIL_SIGNUP_SALESFORCE_ERROR_MESSAGE\n} from \"../formFields\";\n\nexport async function postToSalesforce({ pageUrl, campaignIDs, firstname, lastname, email }) {\n const headers = { \"Content-Type\": \"application/x-www-form-urlencoded\" };\n const params = new URLSearchParams({\n leadsource: \"web\",\n contactsource: pageUrl,\n firstname,\n lastname,\n email,\n campaignids: campaignIDs\n }).toString();\n\n try {\n const resp = await fetch(`https://cloud.email.obama.org/signup-autocompleteV2?${params}`, {\n method: \"post\",\n headers\n });\n\n if (resp.ok) {\n const body = await resp.json();\n // Validation errors from Salesforce Cloud Page are formatted with a 200 response,\n // but the bodies contain a status object with value `fail` and descriptive error msg.\n if (body.status === \"fail\") {\n // If one or more campaigns has failed, the ids are returned as a CSV the response body as `failedCampaignIds`.\n // To make a user-friendly error message, we translate the campaign ids to user friendly names.\n let failedCampaignIds = body.failedCampaignIds.split(\",\");\n let failedCampaigns = getUserFriendlyCampaignsFromIds(failedCampaignIds);\n throw new Error(body.msg, { cause: failedCampaigns.join(\", \") });\n }\n return { ...body };\n } else {\n throw new Error(`HTTP Error: ${resp.statusCode}`);\n }\n } catch (err) {\n /* eslint-disable no-console*/\n console.error(err);\n let errorMsg = err.toString();\n // Error is unknown. Provide generic error message.\n if (\n errorMsg !== EMAIL_ADDRESS_ERROR_MESSAGE &&\n errorMsg !== ONE_OR_MORE_FAILURES_ERROR_MESSAGE\n ) {\n errorMsg = GENERIC_EMAIL_SIGNUP_SALESFORCE_ERROR_MESSAGE;\n }\n // Adjust Salesforce Error and add failure details\n if (errorMsg === ONE_OR_MORE_FAILURES_ERROR_MESSAGE) {\n errorMsg = `We are experiencing issues with the following newsletters. Please try again or come back soon to sign up: ${err.cause}`;\n }\n throw new Error(`${errorMsg}`);\n }\n}\n","const LOW_TIER_CATEGORIES = [\n \"$5,001 to $9,999\",\n \"$2,001 to $5,000\",\n \"$1,001 to $2,000\",\n \"$501 to $1,000\",\n \"$200 to $500\"\n];\n\nfunction getAnnonatedContributorName(row) {\n const name = row[\"Attribution Nameline\"];\n const annotation =\n row.flag.toUpperCase() === \"NEW\"\n ? \"*\"\n : row.flag.toUpperCase().startsWith(\"BEQUEST\") // this flag is sometimes suffixed by a question mark\n ? \"+\"\n : \"\";\n return name + annotation;\n}\n\nexport function sortContributorsByCategory(contributors) {\n return contributors.reduce((prev, row) => {\n const next = { ...prev };\n if (!row.Category) {\n return next;\n }\n const item = {\n name: getAnnonatedContributorName(row),\n category: row.Category\n };\n if (prev[row.Category]?.length > 0) {\n next[row.Category] = [...next[row.Category], item];\n } else {\n next[row.Category] = [item];\n }\n return next;\n }, {});\n}\n\nexport function getLowTierContributors(contributorsByCategory) {\n return LOW_TIER_CATEGORIES.reduce(\n (items, cat) => items.concat(contributorsByCategory[cat] ?? []),\n []\n ).map((contributor) => {\n return { name: `${contributor.name} (${contributor.category})` };\n });\n}\n\nexport function getHighTierContributors(contributorsByCategory) {\n return Object.keys(contributorsByCategory)\n .filter((cat) => !LOW_TIER_CATEGORIES.includes(cat))\n .sort((a, b) => {\n function getHigherRange(cat) {\n const digitsRegex = /\\d+/g;\n const thousandSeparatorRegex = /,/g;\n const [lowerRange, higherRange] = cat\n .replace(thousandSeparatorRegex, \"\")\n .matchAll(digitsRegex);\n // exception: \"$1,000,000+\"\n if (!higherRange) {\n return lowerRange[0];\n }\n // most categories: \"$500,001 to $999,999\"\n return higherRange[0];\n }\n\n return getHigherRange(a) - getHigherRange(b) > 0 ? -1 : 1;\n })\n .map((category) => ({\n category,\n contributors: contributorsByCategory[category]\n }));\n}\n","export function createRichTextString(string, options) {\n const marks = options?.bold === true ? [{ type: \"bold\" }] : [];\n const value = string;\n return {\n data: {},\n content: [\n {\n data: {},\n content: [\n {\n data: {},\n marks,\n value,\n nodeType: \"text\"\n }\n ],\n nodeType: \"paragraph\"\n }\n ],\n nodeType: \"document\"\n };\n}\n\nexport function createRichTextHyperlink(string, target = \"#\") {\n return {\n data: {},\n content: [\n {\n data: {},\n marks: [],\n value: \"\",\n nodeType: \"text\"\n },\n {\n data: {\n uri: target\n },\n content: [\n {\n data: {},\n marks: [],\n value: string,\n nodeType: \"text\"\n }\n ],\n nodeType: \"hyperlink\"\n },\n {\n data: {},\n marks: [],\n value: \"\",\n nodeType: \"text\"\n }\n ],\n nodeType: \"document\"\n };\n}\n\nexport const removeQuotationMarks = (str) => {\n const newStr = str.replace(/[\"'“”‘’]/g, \"\");\n return newStr;\n};\n","\n\n\n","\n\n\n {#if (!isContainerized || isSectionDescendant) && !isDonateDescendant}\n \n \n \n {:else}\n \n {/if}\n\n","\n\n\n","\n\n\n \n\n\n{#if isContainerized}\n \n{:else}\n \n \n \n{/if}\n","/**\n * Extracts the YouTube video ID from a given URL.\n *\n * @param {string} url - The YouTube video URL.\n * @returns {string|null} - The YouTube video ID if found, otherwise null.\n */\nexport const extractYoutubeVideoID = (url) => {\n if (!url) {\n return null;\n }\n\n const youtubeRegex =\n /* eslint-disable-next-line */\n /(?:https?:\\/\\/)?(?:www\\.)?youtu\\.?be(?:\\.com)?\\/?.*(?:watch|embed)?(?:.*v=|v\\/|\\/)([\\w\\-_]+)\\&?/;\n\n const found = url.match(youtubeRegex);\n\n return found ? found[1] : null;\n};\n\n/**\n * Returns the YouTube thumbnail URL for a given video ID.\n *\n * @param {string} videoId - The ID of the YouTube video.\n * @returns {string} The URL of the YouTube thumbnail.\n */\nexport const getYoutubeThumbnailUrlByVideoId = (videoId) =>\n `https://i3.ytimg.com/vi/${videoId}/maxresdefault.jpg`;\n\n/**\n * Returns the YouTube thumbnail URL for a given YouTube video URL.\n * @param {string} url - The YouTube video URL.\n * @returns {string|null} The YouTube thumbnail URL or null if the video ID cannot be extracted.\n */\nexport const getYoutubeThumbnailUrl = (url) => {\n let videoId = extractYoutubeVideoID(url);\n\n return videoId ? getYoutubeThumbnailUrlByVideoId(videoId) : null;\n};\n\nconst VALID_SPOTIFY_EMBED_TYPES = [\"playlist\", \"episode\", \"show\", \"artist\", \"album\", \"track\"];\n\nexport const getSpotifyEmbedType = (url) => {\n const urlParts = url.split(\"/\");\n const type = urlParts[urlParts.length - 2];\n return VALID_SPOTIFY_EMBED_TYPES.includes(type) ? type : null;\n};\n\n/**\n * Returns the Spotify iframe source URL from the share URL.\n *\n * @param {string} url - The Spotify share URL.\n * @returns {string} The Spotify iframe source URL.\n */\nexport const getSpotifyIframeSrcFromShareUrl = (url) => {\n const urlParts = url.split(\"/\");\n const type = getSpotifyEmbedType(url);\n const id = urlParts[urlParts.length - 1];\n\n return type && id ? `https://open.spotify.com/embed/${type}/${id}` : null;\n};\n","import { getYoutubeThumbnailUrlByVideoId } from \"$lib/utilities/components/embeds\";\n\nexport const getVideoComponentPropsForVideoContentType = (data) => {\n const defaultThumbnail = getYoutubeThumbnailUrlByVideoId(data.fields?.embedID);\n\n return {\n header: data.fields?.videoTitle,\n body: data.fields?.description,\n caption: data.fields?.caption,\n autoplay: data.fields?.autoPlay,\n loopSection: {\n startTime: data.fields?.loopStart || 0,\n endTime: data.fields?.loopEnd\n },\n videoCoverImage: defaultThumbnail\n ? {\n src: defaultThumbnail,\n alt: \"\"\n }\n : undefined,\n videoId: data.fields?.embedID\n };\n};\n","\n\n