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U2C,EAAK3F,OAAO,CAACD,WAAW,CAACiD,QAAQ,CAC3CC,UAAW0C,EAAK3F,OAAO,CAACD,WAAW,CAACkD,SAAS,CAC7C+L,OAAQ,CACV,CACF,GAGAnY,WAAW,KACTmX,EAAkB,GACpB,EAAGvI,EAAAA,CAAwBA,EAG3B5O,WAAW,KACToX,SAAStI,EACX,EAAGF,EAAAA,CAAwBA,CAAGD,EAAAA,CAAmBA,CACnD,EAEA,MACE,GAAArR,EAAAC,GAAA,EAAAD,EAAAmQ,QAAA,WACGuJ,EACC,GAAA1Z,EAAAuB,IAAA,EAACpB,MAAAA,CAAIb,UAAU,0FACb,GAAAU,EAAAC,GAAA,EAACka,EAAAA,EAAmBA,CAAAA,CAAE,GAAGpV,EAAAA,EAAgC,GAExD6U,GAAkB,GAAA5Z,EAAAC,GAAA,EAACma,EAAAA,CAAcA,CAAAA,CAAC/a,SAAUgS,EAAAA,CAAmBA,MAGlE,GAAArR,EAAAuB,IAAA,EAAC8Y,EAAAA,EAAqBA,CAAAA,CACpB/G,OAAQA,EACRY,OAAQA,EACRoG,WAAW,mBAEX,GAAAta,EAAAC,GAAA,EAACsa,EAAAA,CAAIA,CAAAA,CAACC,MAAM,eAAeC,QAAS,KACpC,GAAAza,EAAAC,GAAA,EAACya,EAAAA,CAAmBA,CAAAA,CAElBC,eAAgBK,aAChBF,cAAetH,EACfD,oBAAqBA,GAHhBW,OASjB","sources":["webpack://_N_E/./core--client--components/src/components/atoms/AnimateItem/AnimateItem.tsx","webpack://_N_E/./src/components/molecules/CircleButton/CircleButton.tsx","webpack://_N_E/./src/components/molecules/LinkCopy/LinkCopy.tsx","webpack://_N_E/./src/components/molecules/PageTransition/PageTransition.tsx","webpack://_N_E/./src/components/molecules/PartnerInterstitial/PartnerInterstitial.tsx","webpack://_N_E/./src/components/molecules/PartnerInterstitial/defaultValues.ts","webpack://_N_E/./src/components/molecules/SocialMediaButton/SocialMediaButton.tsx","webpack://_N_E/./src/components/organisms/ShareThisPet/ShareThisPet.tsx","webpack://_N_E/./src/lib/dataSource/lostApi/user/pets/reactivate.ts","webpack://_N_E/./src/components/templates/DashPet/DashPet.tsx","webpack://_N_E/./src/lib/analytics/helpers/getPetSpeciesForAnalytics.ts","webpack://_N_E/./src/lib/analytics/helpers/getPetStatusForAnalytics.ts","webpack://_N_E/./src/lib/constants/constants/search.ts","webpack://_N_E/./src/lib/constants/constants/timer.ts","webpack://_N_E/./src/lib/dataSource/lostApi/nextdoor/prepare.ts","webpack://_N_E/./src/lib/dataSource/lostApi/pet/details.ts","webpack://_N_E/./src/lib/constants/constants/storage.ts","webpack://_N_E/./src/lib/storageClasses/analyticsEventStorage.ts","webpack://_N_E/./src/lib/hooks/analytics/useEventContext.tsx","webpack://_N_E/./src/lib/hooks/multiPageForm/useInitialFormStep.ts","webpack://_N_E/./src/lib/hooks/searchParameters/useSearchParameters.ts","webpack://_N_E/./src/lib/hooks/toasts/useToast.ts","webpack://_N_E/./src/lib/dataSource/lostApi/chat/conversations/totalUnread.ts","webpack://_N_E/./src/lib/hooks/userContext/UserContext.tsx","webpack://_N_E/./src/lib/utils/analytics/photoUpload.ts","webpack://_N_E/./src/lib/utils/analytics/share.ts","webpack://_N_E/./src/lib/utils/analytics/viewFlyer.ts","webpack://_N_E/./src/lib/utils/helpers/dateHelpers/dateToMonthDDYYYY.ts","webpack://_N_E/./src/lib/utils/helpers/photoHelpers/maybeAddInactiveClasses.ts","webpack://_N_E/./src/lib/utils/helpers/stringHelpers/capitalizeFirstLetter.ts","webpack://_N_E/./src/pages/i-found-a-pet/index.tsx","webpack://_N_E/./src/pages/i-lost-a-pet/index.tsx","webpack://_N_E/<anon>"],"sourcesContent":["import {\n  Variant,\n  cubicBezier,\n  motion,\n  useAnimation,\n  useInView,\n} from 'framer-motion';\nimport { useEffect, useRef } from 'react';\n\n/**\n * AnimateItem Props\n *\n * @interface IAnimateItem\n */\nexport interface IAnimateItem {\n  /**\n   * Children to animate\n   *\n   * @memberof IAnimateItem\n   * @member {React.ReactNode} children\n   */\n  children: React.ReactNode;\n  /**\n   * From variant\n   *\n   * @memberof IAnimateItem\n   * @member {Variant} [from]\n   */\n  from?: Variant;\n  /**\n   * To variant\n   *\n   * @memberof IAnimateItem\n   * @member {Variant} [to]\n   */\n  to?: Variant;\n  /**\n   * Delay\n   *\n   * @memberof IAnimateItem\n   * @default 0.2\n   * @member {number} [delay]\n   */\n  delay?: number;\n  /**\n   * Duration\n   *\n   * @memberof IAnimateItem\n   * @default 0.9\n   * @member {number} [duration]\n   */\n  duration?: number;\n  /**\n   * Classes\n   *\n   * @memberof IAnimateItem\n   * @default ''\n   * @member {string} [className]\n   */\n  className?: string;\n}\n\n/**\n * AnimateItem\n *\n * @param {IAnimateItem} props - Props\n * @returns {React.ReactNode} - AnimateItem\n */\nconst AnimateItem: React.FC<IAnimateItem> = ({\n  children,\n  from,\n  to,\n  delay = 0.2,\n  duration = 0.9,\n  className = '',\n}: IAnimateItem) => {\n  const ref = useRef(null);\n  const controls = useAnimation();\n  const inView = useInView(ref);\n\n  useEffect(() => {\n    if (inView) {\n      controls.start('visible');\n    }\n  }, [controls, inView]);\n\n  return (\n    <motion.div\n      className={className}\n      ref={ref}\n      initial={'hidden'}\n      animate={controls}\n      variants={{\n        hidden: {\n          opacity: 0,\n          ...from,\n        },\n        visible: {\n          opacity: 1,\n          scale: 1,\n          translateX: 0,\n          translateY: 0,\n          transition: {\n            delay: delay,\n            duration: duration,\n            ease: cubicBezier(0.17, 0.55, 0.55, 1),\n          },\n          ...to,\n        },\n      }}\n      data-testid=\"animate-item\"\n    >\n      {children}\n    </motion.div>\n  );\n};\n\nexport default AnimateItem;\n","import Icon, { IconType } from '@/components/atoms/Icon/Icon';\nimport { MouseEventHandler } from 'react';\n\n/**\n * ICircleButton Interface for the Circle Button Component\n *\n * @interface ICircleButton\n */\nexport interface ICircleButton {\n  /**\n   * The icon to display.\n   *\n   * @memberof ICircleButton\n   * @member {IconType} icon\n   */\n  icon: IconType;\n  /**\n   * The label to display.\n   *\n   * @memberof ICircleButton\n   * @member {string} label\n   */\n  label: string;\n  /**\n   * If the button is disabled.\n   *\n   * @memberof ICircleButton\n   * @member {boolean} [disabled]\n   */\n  disabled?: boolean;\n  /**\n   * The onClick event handler.\n   *\n   * @memberof ICircleButton\n   * @member {MouseEventHandler<HTMLButtonElement>} [onClickAction]\n   */\n  onClickAction?: MouseEventHandler<HTMLButtonElement>;\n}\n\n/**\n * Base Circle Button Classes\n *\n * @constant\n */\nconst baseClasses = 'rounded-full w-12 h-12 flex items-center justify-center';\n\n/**\n * Disabled Circle Button Classes\n *\n * @constant\n */\nconst disabledClasses = 'bg-neutral-300 cursor-not-allowed';\n\n/**\n * Circle Button Focus Classes\n *\n * @constant\n */\nconst focusClasses =\n  'focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-focus-400';\n\n/**\n * Circle Button Circle Button Component that renders a button with an icon in\n * the center.\n *\n * @param {ICircleButton} props - The props of the Circle Button Component\n * @returns {React.FC<ICircleButton>} Circle Button Component\n */\nconst CircleButton: React.FC<ICircleButton> = ({\n  icon,\n  label,\n  disabled,\n  onClickAction,\n}: ICircleButton) => {\n  /**\n   * Active Circle Button Classes\n   *\n   * @constant\n   */\n  const activeClasses =\n    'bg-base-400 hover:bg-base-500 cursor-pointer transition-colors duration-200 ease-in-out ' +\n    focusClasses;\n  // Current State Classes\n  const stateClasses = disabled ? disabledClasses : activeClasses;\n  const buttonClasses = `${baseClasses} ${stateClasses}`;\n  const currentButtonShade = disabled ? 200 : 100;\n\n  return (\n    <button\n      type=\"button\"\n      data-testid=\"circle-button\"\n      disabled={disabled}\n      onClick={onClickAction}\n      className={buttonClasses}\n    >\n      <Icon\n        icon={icon}\n        size={28}\n        colorType=\"neutral\"\n        colorShade={currentButtonShade}\n      />\n      <span className=\"sr-only\">{label}</span>\n    </button>\n  );\n};\n\nexport default CircleButton;\n","import Paragraph from '@/components/atoms/Paragraph/Paragraph';\nimport { useState } from 'react';\n\n/**\n * ILinkCopy - The props for the LinkCopy component\n *\n * @interface ILinkCopy\n */\nexport interface ILinkCopy {\n  /**\n   * The Url to Copy\n   *\n   * @memberof ILinkCopy\n   * @member {string} url\n   */\n  url: string;\n  /**\n   * The label for the link\n   *\n   * @memberof ILinkCopy\n   * @default 'Link'\n   * @member {string} [label]\n   */\n  label?: string;\n  /**\n   * The text size used in the component\n   *\n   * @memberof ILinkCopy\n   * @default 'md'\n   * @member {'sm' | 'md'} [size]\n   */\n  size?: 'sm' | 'md';\n  /**\n   * The analytics event function to send\n   *\n   * @memberof ILinkCopy\n   * @member {() => void} [analyticsEvent]\n   */\n  analyticsEvent?: () => void;\n  /**\n   * The optional classes to add to the component\n   *\n   * @memberof ILinkCopy\n   * @default ''\n   * @member {string} [classes]\n   */\n  classes?: string;\n}\n\n/**\n * LinkCopy A component that allows a user to copy a link at the click of a\n * button\n *\n * @param {ILinkCopy} props - The props for the LinkCopy component\n * @returns {React.FC<ILinkCopy>} LinkCopy Component\n */\nconst LinkCopy: React.FC<ILinkCopy> = ({\n  url,\n  classes = '',\n  label = 'Link',\n  size = 'md',\n  analyticsEvent,\n}: ILinkCopy) => {\n  const [copied, setCopied] = useState(false);\n  /** Copy to Clipboard Copies the url to the clipboard */\n  const copyToClipboard = () => {\n    if (analyticsEvent) {\n      analyticsEvent();\n    }\n    navigator.clipboard.writeText(url);\n\n    setCopied(true);\n\n    setTimeout(() => {\n      setCopied(false);\n    }, 5000);\n  };\n\n  return (\n    <div data-testid=\"link-copy\" className=\"flex justify-center\">\n      <div\n        className={`grid grid-cols-[1fr_auto] justify-start items-center pl-3 p-4 h-14 w-full rounded border border-neutral-700 ${classes}`}\n      >\n        <div className=\"truncate text-neutral-700\">\n          <Paragraph\n            size={size === 'sm' ? 'body5' : 'body4'}\n            className=\"truncate text-neutral-700 inline\"\n          >\n            {url}\n          </Paragraph>\n        </div>\n        <div className=\"text-right pl-4\">\n          <button\n            data-testid=\"copy-button\"\n            onClick={copyToClipboard}\n            className={`text-neutral-700 underline font-petco hover:text-base-300 ${\n              size === 'sm' ? 'text-body5' : 'text-body4'\n            }`}\n          >\n            {copied ? 'Copied!' : `Copy ${label}`}\n          </button>\n        </div>\n      </div>\n      {copied && (\n        <div className=\"w-[179px] h-7 flex justify-center items-center absolute z-10 bg-info-200 text-neutral-100 px-2 py-1 rounded text-xs font-petco translate-y-10 pointer-events-none\">\n          {label} copied to clipboard\n        </div>\n      )}\n    </div>\n  );\n};\n\nexport default LinkCopy;\n","import AnimateItem from '@/component-library/atoms/AnimateItem/AnimateItem';\nimport { motion } from 'framer-motion';\n\n/**\n * IPageTransition\n *\n * @interface IPageTransition\n */\nexport interface IPageTransition {\n  /**\n   * The duration of the animation in milliseconds\n   *\n   * @memberof IPageTransition\n   * @default 750\n   * @member {number} [duration]\n   */\n  duration?: number;\n}\n\n/**\n * PageTransition A transition animation between pages\n *\n * @param {IPageTransition} props - The props for the PageTransition component\n * @returns {React.FC<IPageTransition>} Component\n */\nconst PageTransition: React.FC<IPageTransition> = ({\n  duration = 750,\n}: IPageTransition) => {\n  const durationSeconds = duration / 1000;\n\n  return (\n    <div data-testid=\"page-transition\">\n      <AnimateItem\n        className=\"w-full h-full fixed top-0 right-0 z-50 flex items-center justify-center bg-base-300\"\n        duration={0.5}\n      >\n        <motion.div\n          className=\"bg-base-100 w-1 h-1\"\n          animate={{\n            borderRadius: ['80%', '0%'],\n            scale: [0, 1000],\n          }}\n          transition={{\n            delay: 0.5,\n            duration: durationSeconds,\n            ease: 'easeInOut',\n          }}\n        />\n      </AnimateItem>\n    </div>\n  );\n};\n\nexport default PageTransition;\n","import AnimateItem from '@/component-library/atoms/AnimateItem/AnimateItem';\nimport CdnImage from '@/component-library/atoms/CdnImage/CdnImage';\nimport Paragraph from '@/components/atoms/Paragraph/Paragraph';\nimport ProgressBar from '@/components/atoms/ProgressBar/ProgressBar';\nimport { useEffect, useMemo, useState } from 'react';\nimport { twMerge } from 'tailwind-merge';\n\n/**\n * IPartnerInterstitialSlide\n *\n * @interface IPartnerInterstitialSlide\n */\nexport interface IPartnerInterstitialSlide {\n  /**\n   * The image path to display\n   *\n   * @memberof IPartnerInterstitialSlide\n   * @member {string} imgPath\n   */\n  imgPath: string;\n  /**\n   * The image width\n   *\n   * @memberof IPartnerInterstitialSlide\n   * @member {number} imgWidth\n   */\n  imgWidth: number;\n  /**\n   * The image height\n   *\n   * @memberof IPartnerInterstitialSlide\n   * @member {number} imgHeight\n   */\n  imgHeight: number;\n  /**\n   * The copy above image\n   *\n   * @memberof IPartnerInterstitialSlide\n   * @member {string} text\n   */\n  text: string;\n  /**\n   * The second line of text\n   *\n   * @memberof IPartnerInterstitialSlide\n   * @member {string} bottomText\n   */\n  bottomText: string;\n  /**\n   * Optional Copy under loading bar\n   *\n   * @memberof IPartnerInterstitialSlide\n   * @member {string} [bottomCopy]\n   */\n  bottomCopy?: string;\n}\n\n/**\n * IPartnerInterstitial\n *\n * @interface IPartnerInterstitial\n */\nexport interface IPartnerInterstitial {\n  /**\n   * The slides to cycle through\n   *\n   * @memberof IPartnerInterstitial\n   * @member {IPartnerInterstitialSlide[]} slides\n   */\n  slides: IPartnerInterstitialSlide[];\n  /**\n   * The optional text displayed at the end of the animation\n   *\n   * @memberof IPartnerInterstitial\n   * @member {string} [bottomCopy]\n   */\n  bottomCopy?: string;\n  /**\n   * Minimum time in milliseconds to display each of the logos and the loading\n   * bar\n   *\n   * @memberof IPartnerInterstitial\n   * @member {number} [slideDuration]\n   */\n  slideDuration?: number;\n  /**\n   * Hide progress bar\n   *\n   * @memberof IPartnerInterstitial\n   * @member {boolean} [hideProgressBar]\n   */\n  hideProgressBar?: boolean;\n  /**\n   * The optional className\n   *\n   * @memberof IPartnerInterstitial\n   * @member {string} [className]\n   */\n  className?: string;\n}\n\n/**\n * The default duration for each slide\n *\n * @constant {number} defaultSlideDuration\n */\nexport const defaultSlideDuration = 2000;\n\n/**\n * This will give the total duration of the interstitial for the parent\n * component\n *\n * @param {number} slides - The number of slides\n * @param {number} slideDuration - The duration of each slide\n * @returns {number} - The total duration of the interstitial\n */\nexport const getInterstitialDuration = (\n  slides: number,\n  slideDuration?: number\n) => {\n  const duration = slideDuration || defaultSlideDuration;\n  return slides * duration;\n};\n\n/**\n * PartnerInterstitial Slider of partner logos\n *\n * @param {IPartnerInterstitial} props - The props for the PartnerInterstitial\n *   component\n * @returns {React.FC<IPartnerInterstitial>} Component\n */\nconst PartnerInterstitial: React.FC<IPartnerInterstitial> = ({\n  slides,\n  bottomCopy,\n  slideDuration = defaultSlideDuration,\n  hideProgressBar = false,\n  className = '',\n}: IPartnerInterstitial) => {\n  const [index, setIndex] = useState(0);\n  const [progress, setProgress] = useState(0);\n\n  const logo = useMemo(() => {\n    return (\n      <AnimateItem\n        key={index}\n        from={{ opacity: 0 }}\n        className=\"h-[68px] flex justify-center items-center\"\n      >\n        <CdnImage\n          data-testid={`partner-logo-${index}`}\n          src={slides[index].imgPath}\n          alt={slides[index].text}\n          width={slides[index].imgWidth}\n          height={slides[index].imgHeight}\n        />\n      </AnimateItem>\n    );\n    // eslint-disable-next-line react-hooks/exhaustive-deps\n  }, [index]);\n\n  useEffect(() => {\n    if (index !== slides.length - 1) {\n      const interval = setInterval(() => {\n        const nextIndex = index + 1;\n        setIndex(nextIndex);\n      }, slideDuration);\n\n      return () => clearInterval(interval);\n    }\n    // eslint-disable-next-line react-hooks/exhaustive-deps\n  }, [index]);\n\n  // Animate the loading bar to reach 100% on the duration time\n  useEffect(() => {\n    if (progress < 100) {\n      const interval = setInterval(() => {\n        const newProgress = progress + 1;\n        setProgress(newProgress);\n      }, (slides.length * slideDuration) / 100);\n      return () => clearInterval(interval);\n    }\n    // eslint-disable-next-line react-hooks/exhaustive-deps\n  }, [progress]);\n\n  return (\n    <section\n      data-testid=\"partner-interstitial\"\n      className={twMerge(\n        'h-screen w-screen grid grid-cols-4 sm:grid-cols-6 md:grid-cols-12 gap-x-4 sm:gap-x-6 md:gap-x-8 text-center',\n        className\n      )}\n    >\n      <div className=\"col-span-4 sm:col-start-2 md:col-start-5 pt-12\">\n        <div className=\"flex w-full flex-col items-center justify-center h-12\">\n          <Paragraph\n            size=\"body4\"\n            styling=\"bold\"\n            className=\"text-secondaryBase-400 md:px-4\"\n          >\n            {slides[index].text}\n          </Paragraph>\n          <Paragraph\n            size=\"body4\"\n            styling=\"bold\"\n            className=\"text-secondaryBase-400 mb-10 md:px-4\"\n          >\n            {slides[index].bottomText}\n          </Paragraph>\n        </div>\n        <div className=\"mb-16 h-10\">{logo}</div>\n\n        {!hideProgressBar && (\n          <ProgressBar\n            percentage={progress}\n            classes=\"transition-all duration-500 mb-2\"\n          />\n        )}\n        {bottomCopy && (\n          <div className=\"inline-flex\">\n            <Paragraph size=\"overline\" className=\"text-neutral-500\">\n              {slides[index].bottomCopy || bottomCopy}\n            </Paragraph>\n            <div className=\"flex flex-row space-x-1 items-end pb-2 ml-1\">\n              <div\n                className={`rounded-full h-0.5 w-0.5 animate-chat-typing-animation-1 bg-neutral-600`}\n              ></div>\n              <div\n                className={`rounded-full h-0.5 w-0.5 animate-chat-typing-animation-2 bg-neutral-600`}\n              ></div>\n              <div\n                className={`rounded-full h-0.5 w-0.5 animate-chat-typing-animation-3 bg-neutral-600`}\n              ></div>\n            </div>\n          </div>\n        )}\n      </div>\n    </section>\n  );\n};\n\nexport default PartnerInterstitial;\n","import generateImageUrl from '@/lib/utils/helpers/photoHelpers/generateImageUrl';\nimport { IPartnerInterstitial } from './PartnerInterstitial';\n\n/** The default values for the Partner Interstitial */\nexport const partnerInterstitialDefaultValues: IPartnerInterstitial = {\n  slides: [\n    {\n      imgPath: generateImageUrl('/assets/lost/lost-logo-small.svg'),\n      imgWidth: 155,\n      imgHeight: 28,\n      text: 'Searching our database of pets reported by',\n      bottomText: 'shelter partners and individuals on',\n    },\n    {\n      imgPath: generateImageUrl('/assets/lost/partners/nextdoor-logo.svg'),\n      imgWidth: 171,\n      imgHeight: 28,\n      text: 'Searching for missing pets reported',\n      bottomText: 'near your location on',\n    },\n    {\n      imgPath: generateImageUrl(\n        '/assets/lost/partners/neighbors-full-logo.png'\n      ),\n      imgWidth: 171,\n      imgHeight: 39,\n      text: 'Your results may also include',\n      bottomText: ' missing pets reported on',\n    },\n  ],\n  bottomCopy: 'Searching',\n  hideProgressBar: false,\n};\n\nexport const noPartnerInterstitialMicrochipSearch: IPartnerInterstitial = {\n  ...partnerInterstitialDefaultValues,\n  slides: [\n    {\n      imgPath: generateImageUrl('/assets/lost/info-graphic/microchip.svg'),\n      imgWidth: 68,\n      imgHeight: 68,\n      text: 'Scanning for microchip',\n      bottomText: 'number matches',\n    },\n  ],\n};\n\nexport const noPartnerInterstitialMicrochipMatch: IPartnerInterstitial = {\n  ...noPartnerInterstitialMicrochipSearch,\n  slides: [\n    {\n      imgPath: generateImageUrl('/assets/lost/petco-love-heart.svg'),\n      imgWidth: 68,\n      imgHeight: 68,\n      text: 'We found a',\n      bottomText: 'microchip match!',\n      bottomCopy: 'Taking you to the pet report',\n    },\n  ],\n};\n\nexport const partnerInterstitialMicrochipSearch: IPartnerInterstitial = {\n  ...partnerInterstitialDefaultValues,\n  slides: [\n    ...partnerInterstitialDefaultValues.slides,\n    ...noPartnerInterstitialMicrochipSearch.slides,\n  ],\n};\n\nexport const partnerInterstitialMicrochipMatch: IPartnerInterstitial = {\n  ...partnerInterstitialDefaultValues,\n  slides: [\n    ...partnerInterstitialDefaultValues.slides,\n    ...noPartnerInterstitialMicrochipSearch.slides,\n    ...noPartnerInterstitialMicrochipMatch.slides,\n  ],\n};\n","import { buttonBaseFont } from '@/components/atoms/Button/Button';\nimport { ColorShade } from '@/components/atoms/Colors/Colors';\nimport Icon from '@/components/atoms/Icon/Icon';\nimport React, { MouseEventHandler, useState } from 'react';\n\n/**\n * ISocialMediaButton\n *\n * @interface ISocialMediaButton\n */\nexport interface ISocialMediaButton {\n  /**\n   * The text to display.\n   *\n   * @memberof ISocialMediaButton\n   * @member {string} label\n   */\n  label: string;\n  /**\n   * The type of button to display (Facebook or Nextdoor).\n   *\n   * @memberof ISocialMediaButton\n   * @member {'facebook' | 'nextdoor'} type\n   */\n  type: 'facebook' | 'nextdoor';\n  /**\n   * Whether the button should be disabled.\n   *\n   * @memberof ISocialMediaButton\n   * @member {boolean} [disabled]\n   */\n  disabled?: boolean;\n  /**\n   * The optional classes to be applied to the component.\n   *\n   * @memberof ISocialMediaButton\n   * @default ''\n   * @member {string} [classes]\n   */\n  classes?: string;\n  /**\n   * The click handler for the button.\n   *\n   * @memberof ISocialMediaButton\n   * @member {MouseEventHandler<HTMLButtonElement>} [onClickAction]\n   */\n  onClickAction?: MouseEventHandler<HTMLButtonElement>;\n}\n\n/**\n * Icon color and shade values\n *\n * @constant\n */\nconst iconColorsAndShades: {\n  [key: string]: {\n    /** The color type of the icon */\n    color: {\n      [key: string]: string;\n    };\n    /** The color shade of the icon */\n    shade: ColorShade;\n  };\n} = {\n  facebook: {\n    color: {\n      focused: 'neutral',\n      normal: 'neutral',\n    },\n    shade: 100,\n  },\n  nextdoor: {\n    color: {\n      focused: 'neutral',\n      normal: 'nextdoor',\n    },\n    shade: 800,\n  },\n};\n\n/**\n * Base SocialMediaButton Classes\n *\n * @constant\n */\nconst baseClasses =\n  'rounded-full h-12 flex items-center justify-center w-full sm:w-[249px] ';\n\n/**\n * Disabled SocialMediaButton Classes\n *\n * @constant\n */\nconst disabledClasses = 'bg-neutral-300 text-neutral-200 cursor-not-allowed';\n\n/**\n * SocialMediaButton Focus Classes\n *\n * @constant\n */\nconst focusClasses =\n  'focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-focus-visible-400';\n\n/**\n * Default Social Media Button Classes\n *\n * @constant\n */\nconst activeClasses = {\n  facebook: `${focusClasses} bg-facebook-100 hover:bg-facebook-200 cursor-pointer text-neutral-100 transition-colors duration-200 ease-in-out`,\n  nextdoor: `${focusClasses} bg-nextdoor-100 hover:bg-nextdoor-200 cursor-pointer text-nextdoor-800 hover:text-neutral-800 transition-colors duration-200 ease-in-out`,\n};\n\n/**\n * SocialMediaButton Social Media Button with icon\n *\n * @param {ISocialMediaButton} props - The props to pass to the component.\n * @returns {React.FC<ISocialMediaButton>} SocialMediaButton Component\n */\nconst SocialMediaButton: React.FC<ISocialMediaButton> = ({\n  type,\n  label,\n  disabled,\n  onClickAction,\n  classes = '',\n}: ISocialMediaButton) => {\n  const [hovered, setHovered] = useState(false);\n  const [focused, setFocused] = useState(false);\n\n  // Current State Classes\n  const stateClasses = disabled ? disabledClasses : activeClasses[type];\n  const buttonClasses = `${baseClasses} ${stateClasses} ${buttonBaseFont}`;\n\n  // Computed colors and shades\n  const currentState = focused || hovered ? 'focused' : 'normal';\n  const iconColors = disabled\n    ? 'neutral'\n    : iconColorsAndShades[type].color[currentState];\n  const iconShades = disabled ? 100 : iconColorsAndShades[type].shade;\n\n  return (\n    <button\n      type=\"button\"\n      disabled={disabled}\n      onClick={onClickAction}\n      className={`${buttonClasses} ${classes}`}\n      data-testid={`social-media-button-${type}`}\n      onFocus={() => setFocused(true)}\n      onBlur={() => setFocused(false)}\n      onMouseEnter={() => setHovered(true)}\n      onMouseLeave={() => setHovered(false)}\n    >\n      <Icon\n        icon={type}\n        size={20}\n        colorType={iconColors}\n        colorShade={iconShades}\n      />\n      <div className=\"ml-2\">{label}</div>\n    </button>\n  );\n};\n\nexport default SocialMediaButton;\n","import Heading from '@/components/atoms/Heading/Heading';\nimport Paragraph from '@/components/atoms/Paragraph/Paragraph';\nimport CircleButton from '@/components/molecules/CircleButton/CircleButton';\nimport LinkCopy from '@/components/molecules/LinkCopy/LinkCopy';\nimport SocialMediaButton from '@/components/molecules/SocialMediaButton/SocialMediaButton';\nimport getPetSpeciesForAnalytics from '@/lib/analytics/helpers/getPetSpeciesForAnalytics';\nimport getPetStatusForAnalytics from '@/lib/analytics/helpers/getPetStatusForAnalytics';\nimport {\n  InferredSpecies,\n  ListingTypeKey,\n  PetType,\n} from '@/lib/constants/types/pets';\nimport { getPetDetails } from '@/lib/dataSource/lostApi/pet/details';\nimport { shareEventHandler, ShareMethods } from '@/lib/utils/analytics/share';\nimport {\n  IViewFlyerEventData,\n  viewFlyerEventHandler,\n} from '@/lib/utils/analytics/viewFlyer';\nimport getBasePath from '@/lib/utils/getBasePath/getBasePath';\nimport getBaseUrl from '@/lib/utils/getBaseUrl/getBaseUrl';\nimport getPetUrlPath from '@/lib/utils/getPetUrlPath/getPetUrlPath';\nimport { useEffect, useMemo, useState } from 'react';\n\n/**\n * The call to action segment of the social media copy\n *\n * @constant {string}\n */\nconst callToActionSegment = `Report a lost or found pet on Petco Love Lost https://petco.love/nextdoor`;\n\n/**\n * IShareThisPet\n *\n * @interface IShareThisPet\n */\nexport interface IShareThisPet {\n  /**\n   * Is the current user the owner of the pet\n   *\n   * @memberof IShareThisPet\n   * @member {boolean} [isOwner]\n   */\n  isOwner?: boolean;\n  /**\n   * The id of the pet\n   *\n   * @memberof IShareThisPet\n   * @member {number} petId\n   */\n  petId: number;\n  /**\n   * The type of pet\n   *\n   * @memberof IShareThisPet\n   * @member {ListingTypeKey} typeKey\n   */\n  typeKey: ListingTypeKey;\n  /**\n   * The optional city of the pet only required for lostUserPet and foundUserPet\n   *\n   * @memberof IShareThisPet\n   * @default ''\n   * @member {string} [city]\n   */\n  city?: string;\n  /**\n   * The optional name of the pet\n   *\n   * @memberof IShareThisPet\n   * @default ''\n   * @member {string} [petName]\n   */\n  petName?: string;\n  /**\n   * The optional name of the shelter require for foundShelterPet\n   *\n   * @memberof IShareThisPet\n   * @default ''\n   * @member {string} [shelterName]\n   */\n  shelterName?: string;\n  /**\n   * The optional state of the pet only required for lostUserPet and\n   * foundUserPet\n   *\n   * @memberof IShareThisPet\n   * @default ''\n   * @member {string} [state]\n   */\n  state?: string;\n  /**\n   * The zip code associated with the pet used for analytics\n   *\n   * @memberof IShareThisPet\n   * @member {string} [zip]\n   */\n  zip?: string;\n  /**\n   * The species of the pet used for analytics\n   *\n   * @memberof IShareThisPet\n   * @member {InferredSpecies} [petSpecies]\n   */\n  petSpecies?: InferredSpecies;\n  /**\n   * The lost / found date\n   *\n   * @memberof IShareThisPet\n   * @member {string} [date]\n   */\n  date?: string;\n  /**\n   * The optional classes to add to the component\n   *\n   * @memberof IShareThisPet\n   * @default ''\n   * @member {string} [classes]\n   */\n  classes?: string;\n}\n\n/** @param {number} petId - The id of the pet */\nexport const flyerAnalytics = async (petId: number) => {\n  const petInfo = await getPetDetails(petId);\n  const flyerEvent: IViewFlyerEventData = {\n    clickText: 'Print Icon',\n    petId: petId,\n    petName: petInfo.name || undefined,\n    petStatus: getPetStatusForAnalytics(petInfo.type),\n    listingSource: petInfo.type === 'foundOrgPet' ? 'Shelter' : 'User',\n    species: getPetSpeciesForAnalytics(\n      petInfo.species as PetType\n    ) as InferredSpecies,\n    locationId: petInfo.location?.zip,\n  };\n  viewFlyerEventHandler(flyerEvent);\n};\n\n/**\n * ShareThisPet A component used to display the sharing options for a pet\n *\n * @param {IShareThisPet} props - The props for the ShareThisPet component\n * @returns {React.FC<IShareThisPet>} ShareThisPet Component\n */\nconst ShareThisPet: React.FC<IShareThisPet> = ({\n  city = '',\n  classes = '',\n  isOwner,\n  petId,\n  petName = '',\n  petSpecies,\n  shelterName = '',\n  state = '',\n  typeKey,\n  zip,\n  date,\n}: IShareThisPet) => {\n  const [encodedString, setEncodedString] = useState<string>('');\n  const [encodedUrl, setEncodedUrl] = useState<string>('');\n\n  useEffect(() => {\n    selectEncodeString();\n    encodeUrl();\n  });\n\n  /**\n   * The pet species\n   *\n   * @constant {string}\n   */\n  const species = petSpecies || 'Pet';\n  /**\n   * The share url for the pet\n   *\n   * @constant {string}\n   */\n  const shareUrl = `${getBaseUrl()}${getPetUrlPath({\n    id: petId,\n    listingType: typeKey,\n  })}`;\n\n  /**\n   * The nextdoor lost user pet social media copy\n   *\n   * @constant {string}\n   */\n  const lostUserPetNextdoorCopy = useMemo(() => {\n    /**\n     * The alert segment of the social media copy\n     *\n     * @constant {string}\n     */\n    const alertSegment = `LOST ${species.toUpperCase()} ALERT! Have you seen this pet?\\n\\n`;\n    /**\n     * The pet missing segment of the social media copy\n     *\n     * @constant {string}\n     */\n    const petMissingSegment = `${petName} was lost on ${date} and was last seen near ${city}, ${state}\\n\\n`;\n\n    /**\n     * The pet link segment of the social media copy\n     *\n     * @constant {string}\n     */\n    const petLinkSegment = `If you have information on their location, please reach out to the pet parent directly on Petco Love Lost: ${shareUrl}\\n\\n`;\n    /**\n     * The call to action segment of the social media copy\n     *\n     * @constant {string}\n     */\n    const repostSegment = `Repost to spread the word and help bring ${petName} back home!\\n\\n`;\n\n    return `${alertSegment}${petMissingSegment}${petLinkSegment}${repostSegment}${callToActionSegment}`;\n  }, [city, date, petName, shareUrl, species, state]);\n\n  /**\n   * The nextdoor found user pet social media copy\n   *\n   * @constant {string}\n   */\n  const foundUserPetNextdoorCopy = useMemo(() => {\n    /**\n     * The alert segment of the social media copy\n     *\n     * @constant {string}\n     */\n    const alertSegment = `FOUND ${species.toUpperCase()} ALERT! is this your pet?\\n\\n`;\n    /**\n     * The pet missing segment of the social media copy\n     *\n     * @constant {string}\n     */\n    const petMissingSegment = `Pet was found on ${date} near ${city}, ${state}\\n\\n`;\n    /**\n     * The pet link segment of the social media copy\n     *\n     * @constant {string}\n     */\n    const petLinkSegment = `For more details about this pet or to contact the finder, click here: ${shareUrl}\\n\\n`;\n    /**\n     * The call to action segment of the social media copy\n     *\n     * @constant {string}\n     */\n    const repostSegment = `Repost to spread the word and help bring this pet back home!\\n\\n`;\n\n    return `${alertSegment}${petMissingSegment}${petLinkSegment}${repostSegment}${callToActionSegment}`;\n  }, [city, date, shareUrl, species, state]);\n\n  /**\n   * The nextdoor found shelter pet social media copy\n   *\n   * @constant {string}\n   */\n  const foundShelterPetNextdoorCopy = useMemo(() => {\n    /**\n     * The alert segment of the social media copy\n     *\n     * @constant {string}\n     */\n    const alertSegment = `FOUND ${species.toUpperCase()} ALERT! Is this your pet?\\n\\n`;\n    /**\n     * The pet missing segment of the social media copy\n     *\n     * @constant {string}\n     */\n    const petMissingSegment = `Pet was found on ${date} and is currently located at ${shelterName}\\n\\n`;\n    /**\n     * The pet link segment of the social media copy\n     *\n     * @constant {string}\n     */\n    const petLinkSegment = `For more details about this pet, click here: ${shareUrl}\\n\\n`;\n    /**\n     * The call to action segment of the social media copy\n     *\n     * @constant {string}\n     */\n    const repostSegment = `Repost to spread the word and help bring this pet back home!\\n\\n`;\n\n    return `${alertSegment}${petMissingSegment}${petLinkSegment}${repostSegment}${callToActionSegment}`;\n  }, [date, shareUrl, shelterName, species]);\n\n  /**\n   * Select which string to encode based on the typeKey Then set the\n   * encodedString state\n   *\n   * @constant\n   */\n  const selectEncodeString = () => {\n    switch (typeKey) {\n      case 'lostUserPet':\n        setEncodedString(encodeURIComponent(lostUserPetNextdoorCopy));\n        break;\n      case 'foundUserPet':\n        setEncodedString(encodeURIComponent(foundUserPetNextdoorCopy));\n        break;\n      case 'foundOrgPet':\n        setEncodedString(encodeURIComponent(foundShelterPetNextdoorCopy));\n        break;\n    }\n  };\n\n  /**\n   * Encode the url and set the encodedUrl state\n   *\n   * @constant\n   */\n  const encodeUrl = () => {\n    setEncodedUrl(encodeURIComponent(shareUrl));\n  };\n\n  /**\n   * Open a new tab with the url passed in\n   *\n   * @constant\n   * @param {string} url - The url to open in a new window\n   */\n  const buttonLinkHandler = (url: string) => {\n    window.open(`${url}`, '_blank', 'noopener,noreferrer');\n  };\n\n  /** Handle the flyer button click */\n  const flyerButtonClickHandler = async () => {\n    if (isOwner) {\n      flyerAnalytics(petId);\n    }\n    window.open(`${getBasePath()}/flyer/${petId}`);\n  };\n\n  /**\n   * Send the share event to the analytics handler\n   *\n   * @param {ShareMethods} method - The method used to share the pet\n   */\n  const sendShareEvent = (method: ShareMethods) => {\n    shareEventHandler({\n      method,\n      contentType:\n        typeKey === 'lostUserPet' ? 'Lost Pet Listing' : 'Found Pet Listing',\n      petId,\n      petName: petName,\n      petSpecies,\n      petStatus: getPetStatusForShare(typeKey, isOwner),\n      listingSource:\n        typeKey === 'foundOrgPet'\n          ? 'Shelter Pet Listing'\n          : 'Consumer Pet Listing',\n      locationId: zip,\n    });\n  };\n\n  /**\n   * The nextdoor share url\n   *\n   * @constant {string}\n   */\n  const nextDoorShareUrl = useMemo(() => {\n    /**\n     * A list of hashtags to pass to the nextdoor share plugin\n     *\n     * @constant {string}\n     */\n    const hashTags = `PetcoLove,${\n      typeKey === 'lostUserPet' ? 'Lost' : 'Found'\n    }${species.toLowerCase() === 'cat' ? 'Cat' : 'Dog'}`;\n\n    return `https://nextdoor.com/sharekit/?source=petcolove&hashtag=${hashTags}&body=${encodedString}`;\n  }, [encodedString, species, typeKey]);\n\n  return (\n    <div\n      data-testid=\"share-this-pet\"\n      className={`py-10 sm:py-12 md:py-20 bg-neutral-200 px-6 sm:px-8 md:px-10 ${classes}`}\n    >\n      <div className=\"flex flex-row justify-center items-center pb-6 px-6 sm:px-0\">\n        <Heading size=\"h2\" font=\"petco\">\n          Share This Pet\n        </Heading>\n      </div>\n      <div className=\"flex flex-col sm:flex-row justify-center items-center space-y-4 sm:space-y-0 sm:space-x-4\">\n        <SocialMediaButton\n          label=\"Share on Facebook\"\n          type=\"facebook\"\n          onClickAction={() => {\n            sendShareEvent('Facebook');\n            buttonLinkHandler(\n              `https://www.facebook.com/sharer.php?display=page&u=${encodedUrl}`\n            );\n          }}\n        />\n        <SocialMediaButton\n          label=\"Share on Nextdoor\"\n          type=\"nextdoor\"\n          onClickAction={() => {\n            sendShareEvent('Nextdoor');\n            buttonLinkHandler(nextDoorShareUrl);\n          }}\n        />\n      </div>\n      <div className=\"flex justify-center items-center pt-8\">\n        <Paragraph styling=\"bold\" size=\"body4\">\n          Other options:\n        </Paragraph>\n      </div>\n      <div className=\"flex justify-center items-center pt-6 space-x-6\">\n        <CircleButton\n          icon=\"twitter\"\n          label=\"Share pet on Twitter\"\n          onClickAction={() => {\n            sendShareEvent('Twitter');\n            buttonLinkHandler(\n              `https://twitter.com/intent/tweet?url=${encodedUrl}`\n            );\n          }}\n        />\n        <CircleButton\n          icon=\"envelope\"\n          label=\"Share pet via email\"\n          onClickAction={() => {\n            sendShareEvent('Email');\n            window.open(\n              `mailto:?subject=Petco Love Lost - ${\n                typeKey === 'lostUserPet' ? 'Lost' : 'Found'\n              } Pet Listing&body=${shareUrl}`\n            );\n          }}\n        />\n        <CircleButton\n          icon=\"printer\"\n          label=\"Print pet flyer\"\n          onClickAction={() => {\n            sendShareEvent('Print Flyer');\n            flyerButtonClickHandler();\n          }}\n        />\n      </div>\n      <div className=\"flex justify-center items-center pt-8 w-full\">\n        <div className=\"w-full sm:w-1/2 md:w-[327px]\">\n          <LinkCopy\n            url={`${getBaseUrl()}${getPetUrlPath({\n              id: petId,\n              listingType: typeKey,\n            })}`}\n            analyticsEvent={() => sendShareEvent('Link')}\n          />\n        </div>\n      </div>\n    </div>\n  );\n};\n\nexport default ShareThisPet;\n\n/**\n * Get the pet status for the share event.\n *\n * @param {ListingTypeKey} listingType - The pet status\n * @param {boolean} isOwner - Is the current user the owner of the pet\n * @returns {'Lost' | 'Found' | undefined} - The pet status\n */\nfunction getPetStatusForShare(listingType: ListingTypeKey, isOwner?: boolean) {\n  if (!isOwner) {\n    return;\n  }\n\n  if (listingType === 'lostUserPet') {\n    return 'Lost';\n  }\n\n  if (listingType === 'foundUserPet' || listingType === 'foundOrgPet') {\n    return 'Found';\n  }\n}\n","import { sdk } from '@/lib/dataSource/lostApi/common';\nimport { IHttpResponse } from '@petcolove/lost--core--http-client';\n\n/**\n * This will reactivate a pet.\n *\n * @param {string} authToken - The auth token.\n * @param {number} userId - The user id.\n * @param {number} petId - The pet id.\n * @returns {Promise<IHttpResponse>} The response.\n */\nexport async function reactivateUserPet(\n  authToken: string,\n  userId: number,\n  petId: number\n): Promise<IHttpResponse> {\n  try {\n    const response = await sdk\n      .userReactivatePet({\n        contextId: userId,\n        authToken,\n      })\n      .reactivate(petId);\n\n    return response;\n  } catch (error) {\n    console.error(error);\n    throw error;\n  }\n}\n","import CdnImage from '@/component-library/atoms/CdnImage/CdnImage';\nimport Button, { IButton } from '@/components/atoms/Button/Button';\nimport Divider from '@/components/atoms/Divider/Divider';\nimport Heading from '@/components/atoms/Heading/Heading';\nimport Icon, { IconType } from '@/components/atoms/Icon/Icon';\nimport Paragraph from '@/components/atoms/Paragraph/Paragraph';\nimport PageWrapper from '@/components/organisms/PageWrapper/PageWrapper';\nimport ShareThisPet from '@/components/organisms/ShareThisPet/ShareThisPet';\nimport getPetSpeciesForAnalytics from '@/lib/analytics/helpers/getPetSpeciesForAnalytics';\nimport { defaultSearchRadius } from '@/lib/constants/constants/search';\nimport {\n  FoundUserPetListingType,\n  InactiveUserPetListingType,\n  InferredSpecies,\n  LostUserPetListingType,\n  PetStatusOptions,\n  PetType,\n} from '@/lib/constants/types/pets';\nimport { reactivateUserPet } from '@/lib/dataSource/lostApi/user/pets/reactivate';\nimport {\n  EventData,\n  useEventContext,\n} from '@/lib/hooks/analytics/useEventContext';\nimport useMe from '@/lib/hooks/me/useMe';\nimport { useToast } from '@/lib/hooks/toasts/useToast';\nimport { SpeciesTypes } from '@/lib/utils/analytics/petSearch';\nimport { startPetSearchEventHandler } from '@/lib/utils/analytics/startPetSearch';\nimport {\n  IViewFlyerEventData,\n  viewFlyerEventHandler,\n} from '@/lib/utils/analytics/viewFlyer';\nimport { tomorrow } from '@/lib/utils/helpers/dateHelpers/dates';\nimport { dateToMonthDDYYYY } from '@/lib/utils/helpers/dateHelpers/dateToMonthDDYYYY';\nimport generateImageUrl from '@/lib/utils/helpers/photoHelpers/generateImageUrl';\nimport maybeAddInactiveClasses from '@/lib/utils/helpers/photoHelpers/maybeAddInactiveClasses';\nimport capitalizeFirstLetter from '@/lib/utils/helpers/stringHelpers/capitalizeFirstLetter';\nimport LocalStorage from '@/lib/utils/storage/local-storage';\nimport { iFoundAPetStorageKey } from '@/pages/i-found-a-pet';\nimport { iLostAPetStorageKey } from '@/pages/i-lost-a-pet';\nimport { IPetFacebookPosts } from '@petcolove/lost--client--api-sdk/dist/concrete/sdks/services/users/pets/dto';\nimport clsx from 'clsx';\nimport Link from 'next/link';\nimport { useRouter } from 'next/router';\nimport React, { useState } from 'react';\n\n/**\n * The search button children\n *\n * @constant {string}\n */\nconst searchButtonChildren = 'Search';\n\nexport const userDashboardSearchDataKey = 'user-dashboard-search-data';\n\n/**\n * IDashPetContent\n *\n * Used to define the text content for the Dash Pet\n *\n * @interface\n */\nexport interface IDashPetContent {\n  /** Heading for the DashPet */\n  heading: {\n    /** The title of the heading to display */\n    title: string;\n  };\n}\n\n/**\n * IDashPet\n *\n * @interface\n */\nexport interface IDashPet {\n  /** The user id */\n  userId: number;\n  /** The pet id */\n  petId: number;\n  /** The name of the pet */\n  petName?: string;\n  /** The pet photo url */\n  petPhoto: string;\n  /** The pet species */\n  petSpecies: string;\n  /** The type of the pet */\n  petType: PetStatusOptions | InactiveUserPetListingType;\n  /** The date a pet as lost or found */\n  petLostOrFoundAt: string;\n  /** The date a pet was inactivated. */\n  petDeactivatedAt?: string;\n  /** The pet status before being inactive. */\n  previousLostOrFound?: 'lost' | 'found';\n  /** The label associated with the address */\n  address: string;\n  /** Coordinates of where pet was lost/found */\n  coordinates?: {\n    /** The latitude of the coordinate */\n    latitude: number;\n    /** The longitude of the coordinate */\n    longitude: number;\n  };\n  /** The zip code associated with the lost or found pet for analytics */\n  zip?: string;\n  /** The city associated with the lost or found pet */\n  city?: string;\n  /** The state associated with the lost or found pet */\n  state?: string;\n  /** The facebook posts associated with the pet */\n  facebookPosts?: IPetFacebookPosts[];\n}\n\n/**\n * DashPet - A page for pet under the dash\n *\n * @param {IDashPet} props - The props for the DashPet component\n * @returns {React.FC<IDashPet>} Component\n */\nconst DashPet = ({\n  petId,\n  petName,\n  petPhoto,\n  petSpecies,\n  petType,\n  petLostOrFoundAt,\n  petDeactivatedAt,\n  previousLostOrFound,\n  coordinates,\n  zip,\n  address,\n  city,\n  state,\n  facebookPosts,\n}: IDashPet) => {\n  const router = useRouter();\n  const { clearData, updateData, setInitiatingComponent } = useEventContext();\n  const [isReactivating, setIsReactivating] = useState(false);\n\n  const { idToken, me } = useMe();\n  const userId = me?.user?.id;\n\n  const { displayToast, saveToastToStorage } = useToast();\n\n  /**\n   * The props for the 'Report as Lost' button\n   *\n   * @constant {IButton}\n   */\n  const reportAsLostProps: IButton = {\n    size: 'md',\n    variant: 'light',\n    color: 'primary',\n    href: `/dash/pet/${petId}/report-as-lost/location/`,\n    children: 'Report as Lost',\n  };\n\n  /**\n   * The props for the 'Mark as Safe' button\n   *\n   * @constant {IButton}\n   */\n  const reportAsSafeProps: IButton = {\n    size: 'md',\n    variant: 'light',\n    color: 'secondary',\n    children: 'Mark as Safe',\n    href: `/dash/pet/${petId}/confirm-safe/`,\n  };\n\n  /**\n   * The props for the 'Mark as Reunited' button\n   *\n   * @constant {IButton}\n   */\n  const reportAsReunitedProps: IButton = {\n    size: 'md',\n    variant: 'light',\n    color: 'secondary',\n    children: 'Mark as Reunited',\n    href: `/dash/pet/${petId}/confirm-reunited/`,\n  };\n\n  /** The search radius for the search button. */\n  const searchRadius = String(defaultSearchRadius);\n\n  /**\n   * Build and return the query string for the search button.\n   *\n   * @returns {string} - The query string for the search button.\n   */\n  function getSearchButtonQueryString() {\n    const searchParams = new URLSearchParams();\n    searchParams.append('species', petSpecies);\n    searchParams.append('photoSearchSpecies', petSpecies);\n    searchParams.append('searchRadius', searchRadius);\n    searchParams.append('imageObjectKey', petPhoto);\n    searchParams.append('address', address);\n\n    if (petType === 'lostUserPet') {\n      searchParams.append('start', petLostOrFoundAt.split('T')[0]);\n    }\n\n    if (coordinates?.latitude && coordinates?.longitude) {\n      searchParams.append('latitude', coordinates?.latitude?.toString());\n      searchParams.append('longitude', coordinates?.longitude?.toString());\n    }\n\n    searchParams.append(\n      'searchType',\n      petType === 'lostUserPet' ? 'found' : 'lost'\n    );\n\n    return searchParams.toString();\n  }\n\n  /**\n   * The props for the 'Search' button\n   *\n   * @constant {IButton}\n   */\n  const searchButtonProps: IButton = {\n    size: 'md',\n    variant: 'light',\n    color: 'primary',\n    /**\n     * Redirects to the photo search page and send the start search event to\n     * google analytics\n     */\n    onClick: () => {\n      const petStatus = petType === 'lostUserPet' ? 'Lost' : 'Found';\n      const petSearchFlow = petType === 'lostUserPet' ? 'Found' : 'Lost';\n      const initiatingComponent = 'Search Button / User Dashboard';\n\n      startPetSearchEventHandler({\n        clickText: searchButtonChildren,\n        component: initiatingComponent,\n        flow: petSearchFlow,\n      });\n\n      const searchEventData: EventData = {\n        clickText: searchButtonChildren,\n        petId,\n        petStatus: petStatus,\n        species: petSpecies as SpeciesTypes,\n        locationId: zip,\n      };\n\n      if (petType === 'lostUserPet') {\n        searchEventData.petName = petName;\n      }\n\n      setInitiatingComponent(initiatingComponent);\n\n      clearData();\n      updateData(searchEventData);\n\n      const storage = new LocalStorage();\n\n      storage.set(\n        userDashboardSearchDataKey,\n        {\n          place: {\n            city,\n            region: state,\n            postalCode: zip,\n            coordinates,\n            label: address,\n          },\n          species: capitalizeFirstLetter(petSpecies),\n          start: petLostOrFoundAt.split('T')[0],\n        },\n        { expires: tomorrow }\n      );\n\n      storage.delete(iFoundAPetStorageKey);\n      storage.delete(iLostAPetStorageKey);\n\n      router.push(`/photo-search?${getSearchButtonQueryString()}`);\n    },\n    children: searchButtonChildren,\n  };\n\n  const reactivatePetButtonProps: IButton = {\n    size: 'md',\n    variant: 'light',\n    color: 'primary',\n    children: 'Reactivate',\n    loading: isReactivating,\n    disabled: isReactivating,\n    /** Handles the pet reactivation. */\n    onClick: () => {\n      setIsReactivating(true);\n\n      if (!idToken || !userId) {\n        return;\n      }\n\n      reactivateUserPet(idToken, userId, petId)\n        .then(() => {\n          saveToastToStorage('success', 'Pet status updated successfully.');\n          router.reload();\n        })\n        .catch(() => {\n          displayToast(\n            'error',\n            'Unable to update pet status. Please try again later.'\n          );\n          setIsReactivating(false);\n        });\n    },\n  };\n\n  const buttonProps = (() => {\n    if (petType === 'lostUserPet') {\n      return reportAsSafeProps;\n    }\n\n    if (petType === 'foundUserPet') {\n      return reportAsReunitedProps;\n    }\n\n    if (petType === 'safeAtHome') {\n      return reportAsLostProps;\n    }\n\n    return null;\n  })();\n\n  const isLostOrFound = petType === 'lostUserPet' || petType === 'foundUserPet';\n  const isInactivePet = petType === 'inactiveUserPet';\n\n  const buttonContainerStyles = isLostOrFound\n    ? 'grid-cols-2'\n    : 'grid-cols-1 sm:grid-cols-2';\n\n  /** This will send the view pet flyer event. */\n  const fireViewPetFlyerEvent = async () => {\n    const flyerEvent: IViewFlyerEventData = {\n      clickText: 'View pet flyer',\n      petId: petId,\n      petName: petName === 'Unknown Name' ? '' : petName,\n      petStatus: petType === 'lostUserPet' ? 'Lost' : 'Found',\n      listingSource: 'User',\n      species: capitalizeFirstLetter(petSpecies) as InferredSpecies,\n      locationId: zip,\n    };\n\n    viewFlyerEventHandler(flyerEvent);\n  };\n\n  const petSpeciesForShareEvent = getPetSpeciesForAnalytics(\n    petSpecies as PetType\n  ) as InferredSpecies;\n\n  return (\n    <div data-testid=\"dash-pet\">\n      <PageWrapper classes=\"grid grid-cols-4 gap-x-6 pt-8 px-6 sm:grid-cols-6 sm:pt-9 sm:px-8 md:grid-cols-12 md:gap-x-8 md:pt-16 md:px-10 mb-20\">\n        <div className=\"aspect-square relative self-center col-start-1 col-pan-1 sm:col-start-2 sm:col-span-1 md:col-start-4 md:col-span-2\">\n          <CdnImage\n            src={generateImageUrl(petPhoto)}\n            alt={`Photo of ${petName}`}\n            layout=\"fill\"\n            objectFit=\"cover\"\n            className={maybeAddInactiveClasses('rounded-lg', isInactivePet)}\n            sizes=\"(max-width: 739px) (100vw/4), (max-width: 1199px) calc(100vw/6), 200px\"\n          />\n        </div>\n\n        <div className=\"justify-center flex flex-col col-start-2 col-span-3 sm:col-start-3 sm:col-span-3 md:col-start-6 md:col-span-4\">\n          <Heading size=\"h2\" className=\"text-secondaryBase-400\">\n            {petName}\n          </Heading>\n\n          <div className=\"mt-1 text-neutral-700 text-body5\">\n            <PetStatus\n              status={petType}\n              lostOrFoundAt={petLostOrFoundAt}\n              deactivatedAt={petDeactivatedAt}\n            />\n          </div>\n\n          {/* Desktop buttons. */}\n          <div className=\"hidden md:flex gap-2 md:mt-6\">\n            {isInactivePet && (\n              <>\n                <Button {...reactivatePetButtonProps} />\n                {previousLostOrFound === 'lost' && (\n                  <Button {...reportAsSafeProps} />\n                )}\n                {previousLostOrFound === 'found' && (\n                  <Button {...reportAsReunitedProps} />\n                )}\n              </>\n            )}\n\n            {isLostOrFound && (\n              <Button\n                {...searchButtonProps}\n                size=\"md\"\n                data-testid=\"search-button\"\n              />\n            )}\n\n            {buttonProps && <Button {...buttonProps} />}\n          </div>\n        </div>\n\n        {/* Mobile buttons. */}\n        <div\n          className={clsx(\n            'md:hidden grid gap-2 mt-6 mb-8 sm:mt-8 col-start-1 col-span-4 sm:col-start-2 sm:col-span-4',\n            buttonContainerStyles\n          )}\n        >\n          {isInactivePet && (\n            <>\n              <Button {...reactivatePetButtonProps} size=\"sm\" />\n              {previousLostOrFound === 'lost' && (\n                <Button {...reportAsSafeProps} size=\"sm\" />\n              )}\n              {previousLostOrFound === 'found' && (\n                <Button {...reportAsReunitedProps} size=\"sm\" />\n              )}\n            </>\n          )}\n          {isLostOrFound && <Button {...searchButtonProps} size=\"sm\" />}\n\n          {buttonProps && <Button {...buttonProps} size=\"sm\" />}\n        </div>\n\n        <section className=\"md:mt-12 col-start-1 col-span-4 sm:col-start-2 sm:col-span-4 md:col-start-4 md:col-span-6\">\n          <Divider type=\"lightGrey\" classes=\"mb-4 md:hidden\" />\n\n          <ListButton\n            href={`/dash/pet/${petId}/edit/`}\n            icon=\"paw\"\n            text=\"Edit pet details\"\n            disabled={isInactivePet}\n          />\n\n          {(isLostOrFound || isInactivePet) && (\n            <>\n              <Divider type=\"lightGrey\" classes=\"my-4\" />\n\n              <ListButton\n                href={`/flyer/${petId}/`}\n                dataTestid=\"view-flyer\"\n                onClick={() => {\n                  fireViewPetFlyerEvent();\n                }}\n                target=\"_blank\"\n                icon=\"signPost\"\n                text=\"View pet flyer\"\n                disabled={isInactivePet}\n              />\n            </>\n          )}\n\n          {(isLostOrFound || isInactivePet) && facebookPosts?.length\n            ? facebookPosts.map((post) => (\n                <React.Fragment key={post.postId}>\n                  <Divider type=\"lightGrey\" classes=\"my-4\" />\n\n                  <ListButton\n                    href={`https://www.facebook.com/${post.postId}/`}\n                    dataTestid=\"view-facebook-post\"\n                    target=\"_blank\"\n                    icon=\"facebookStroke\"\n                    text=\"View Facebook post\"\n                    disabled={isInactivePet}\n                  />\n                </React.Fragment>\n              ))\n            : null}\n\n          <Divider type=\"lightGrey\" classes=\"my-4\" />\n\n          <Link\n            href={`/dash/pet/${petId}/remove/`}\n            className=\"font-petco text-error-200 hover:text-error-300\"\n          >\n            Remove Pet\n          </Link>\n\n          <Divider type=\"lightGrey\" classes=\"mt-4\" />\n        </section>\n      </PageWrapper>\n\n      {isLostOrFound && (\n        <ShareThisPet\n          petId={petId}\n          typeKey={petType as LostUserPetListingType | FoundUserPetListingType}\n          petSpecies={petSpeciesForShareEvent}\n          petName={petName}\n          isOwner={true}\n          zip={zip}\n          date={dateToMonthDDYYYY(petLostOrFoundAt)}\n          city={city}\n          state={state}\n        />\n      )}\n    </div>\n  );\n};\n\nexport default DashPet;\n\n/** @interface IPetStatus */\ninterface IPetStatus {\n  /**\n   * The pet's status.\n   *\n   * @memberof IPetStatus\n   * @member {IDashPet['petType']} type\n   */\n  status: IDashPet['petType'];\n  /**\n   * The pet's lost or found date.\n   *\n   * @memberof IPetStatus\n   * @member {IDashPet['petLostOrFoundAt']} [lostOrFoundAt]\n   */\n  lostOrFoundAt?: IDashPet['petLostOrFoundAt'] | null;\n  /**\n   * The pet's deactivation date.\n   *\n   * @memberof IPetStatus\n   * @member {IDashPet['petDeactivatedAt']} [deactivatedAt]\n   */\n  deactivatedAt?: IDashPet['petDeactivatedAt'] | null;\n}\n\n/**\n * Builds the pet status element.\n *\n * @returns {React.ReactElement | null} The pet status.\n */\nconst PetStatus = ({ status, lostOrFoundAt, deactivatedAt }: IPetStatus) => {\n  if (status === 'inactiveUserPet') {\n    return (\n      <div className=\"text-warning-200 flex items-center gap-x-1.5 font-bold\">\n        <Icon icon=\"alert\" size={24} />\n\n        {deactivatedAt && (\n          <div>Inactive as of {dateToMonthDDYYYY(deactivatedAt)}</div>\n        )}\n      </div>\n    );\n  }\n\n  if (status === 'safeAtHome') {\n    return <div>Safe at home</div>;\n  }\n\n  const statusLabel = (() => {\n    if (status === 'lostUserPet') {\n      return 'lost';\n    }\n\n    if (status === 'foundUserPet') {\n      return 'found';\n    }\n  })();\n\n  if (statusLabel && lostOrFoundAt) {\n    return (\n      <div>\n        Reported {statusLabel} {dateToMonthDDYYYY(lostOrFoundAt)}\n      </div>\n    );\n  }\n\n  return null;\n};\n\n/** @interface IListButton */\ninterface IListButton {\n  /**\n   * @memberof IListButton\n   * @member {string} href\n   */\n  href: string;\n  /**\n   * @memberof IListButton\n   * @member {string} [dataTestid]\n   */\n  dataTestid?: string;\n  /**\n   * @memberof IListButton\n   * @member {() => void} [onClick]\n   */\n  onClick?: () => void;\n  /**\n   * @memberof IListButton\n   * @member {'_blank'} [target]\n   */\n  target?: '_blank';\n  /**\n   * @memberof IListButton\n   * @member {IconType} icon\n   */\n  icon: IconType;\n  /**\n   * @memberof IListButton\n   * @member {string} text\n   */\n  text: string;\n  /**\n   * @memberof IListButton\n   * @member {boolean} disabled\n   */\n  disabled?: boolean;\n}\n\n/**\n * The list button component.\n *\n * @param {IListButton} props Component props.\n * @returns {React.ReactNode} The component.\n */\nfunction ListButton({\n  dataTestid,\n  href,\n  onClick,\n  target,\n  icon,\n  text,\n  disabled,\n}: IListButton) {\n  if (disabled) {\n    return (\n      <button\n        data-testid={dataTestid}\n        className=\"flex flex-row items-center grow text-neutral-600 cursor-not-allowed\"\n        disabled\n      >\n        <Icon size={24} icon={icon} classes=\"mr-2\" />\n\n        <Paragraph size=\"body4\" className=\"grow text-inherit\">\n          {text}\n        </Paragraph>\n\n        <Icon size={24} icon=\"chevronRight\" classes=\"md:hidden\" />\n      </button>\n    );\n  }\n\n  return (\n    <Link\n      href={href}\n      data-testid={dataTestid}\n      className=\"flex flex-row items-center grow text-neutral-800 hover:text-base-300\"\n      target={target}\n      onClick={onClick}\n    >\n      <Icon size={24} icon={icon} classes=\"mr-2\" />\n\n      <Paragraph size=\"body4\" className=\"grow text-inherit\">\n        {text}\n      </Paragraph>\n\n      <Icon size={24} icon=\"chevronRight\" classes=\"md:hidden\" />\n    </Link>\n  );\n}\n","import { PetType } from '@/lib/constants/types/pets';\n\n/**\n * Get the pet species\n *\n * @param {PetType} petSpecies - The pet species\n * @returns {string | undefined} - The pet species to send to analytics\n */\nexport default function getPetSpeciesForAnalytics(\n  petSpecies: PetType\n): string | undefined {\n  if (petSpecies.toLowerCase() === 'dog') {\n    return 'Dog';\n  }\n  if (petSpecies.toLowerCase() === 'cat') {\n    return 'Cat';\n  }\n}\n","/**\n * Get the pet status from the pet type\n *\n * @param {string} petType - The pet type\n * @returns {string | undefined} - The pet listing status to send to analytics\n */\nexport default function getPetStatusForAnalytics(\n  petType: string\n): string | undefined {\n  if (petType.toLowerCase().includes('lost')) {\n    return 'Lost';\n  }\n  if (petType.toLowerCase().includes('found')) {\n    return 'Found';\n  }\n  if (petType.toLowerCase().includes('safe')) {\n    return 'Safe at Home';\n  }\n}\n","/** The default search radius */\nexport const defaultSearchRadius = 50;\n\n/** The default search radius index (should point to defaultSearchRadius) */\nexport const defaultSearchRadiusIndex = 2;\n\n/**\n * The coordinates of Petco Love HQ. Used as a fallback location if no\n * coordinates are provided.\n */\nexport const petcoLoveHQCoordinates = {\n  latitude: 29.44241,\n  longitude: -98.655,\n};\n","/** \n * The page transition timer \n * \n * @constant {number} milliseconds - The page transition timer\n */\nexport const timerPageTransition = 750;\n\n/** \n * The partner interstitial timer\n * \n * @constant {number} milliseconds - The partner interstitial timer\n */\nexport const timerPartnerInterstitial = 9000;\n","import { INextdoorPrepareRequest } from '@petcolove/lost--client--api-sdk/dist/concrete/sdks/services/nextdoor/interfaces';\nimport { sdk } from '../common';\nimport { IServiceMethodResponse } from '@petcolove/lost--client--api-sdk/dist/abstract/service/interfaces';\n\n/**\n * Call to prepare the nextdoor posts\n *\n * @param {INextdoorPrepareRequest} data - The data to send\n * @returns {void}\n */\nexport async function prepareNextdoor(data: INextdoorPrepareRequest): Promise<IServiceMethodResponse> {\n  try {\n    const response: IServiceMethodResponse = await sdk.nextdoorPrepare().prepare(data);\n    return response;\n  } catch (error) {\n    console.error(error);\n    throw error;\n  }\n}\n","import { validStatus } from '@/lib/constants/constants/pets';\nimport { IPetDetailsDTO } from '@petcolove/lost--client--api-sdk/dist/concrete/sdks/services/petDetails/dto';\nimport { IPetDetailsServiceResponse } from '@petcolove/lost--client--api-sdk/dist/concrete/sdks/services/petDetails/interfaces';\nimport { sdk } from '../common';\n\n/**\n * The valid pet types to allow displaying details for\n *\n * @constant {string[]} validPetTypes\n */\nexport const defaultValidPetTypes: string[] = [\n  'lostUserPet',\n  'foundUserPet',\n  'foundOrgPet',\n  'safeAtHome',\n];\n\n/**\n * Get the details of a pet by its ID from the SDK\n *\n * @param {number} id - The ID of the pet\n * @param {string[]} [validPetTypes=defaultValidPetTypes] - The optional valid\n *   pet types to allow displaying details for. Default is\n *   `defaultValidPetTypes`. Default is `defaultValidPetTypes`\n * @returns {Promise<IPetDetailsDTO>} The pet details\n */\nexport async function getPetDetails(\n  id: number,\n  validPetTypes: string[] = defaultValidPetTypes\n): Promise<IPetDetailsDTO> {\n  try {\n    /**\n     * Get the pet details from the SDK\n     *\n     * @constant {IPetDetailsServiceResponse} pet - The Pet Details Response\n     */\n    const pet: IPetDetailsServiceResponse = await sdk.petDetails().details(id);\n\n    /** Check if the pet type is valid */\n    if (!validPetTypes.includes(pet.data.type)) {\n      throw new Error(`Invalid pet type: ${pet.data.type}`);\n    }\n\n    /** Check if the pet status is valid */\n    if (!validStatus.includes(pet.data.status)) {\n      throw new Error(`Invalid pet status: ${pet.data.status}`);\n    }\n\n    return pet.data;\n  } catch (error) {\n    console.error(error);\n    throw error;\n  }\n}\n","import { tomorrow } from '@/lib/utils/helpers/dateHelpers/dates';\n\n/**\n * The default expiration date\n *\n * @constant {Date}\n */\nexport const defaultExpirationDate: Date = tomorrow;\n","import { notApplicableString } from '@/lib/constants/constants/analytics';\nimport { defaultExpirationDate } from '@/lib/constants/constants/storage';\nimport { EventData } from '@/lib/hooks/analytics/useEventContext';\nimport { tomorrow } from '@/lib/utils/helpers/dateHelpers/dates';\nimport LocalStorage from '@/lib/utils/storage/local-storage';\n\n/**\n * The valid type for the initiating component param\n *\n * @type {AnalyticsInitiatingComponent}\n */\nexport type AnalyticsInitiatingComponent =\n  | 'I Lost A Pet Button / Homepage'\n  | 'I Found A Pet Button / Homepage'\n  | 'I Lost A Pet Footer Link / All Pages'\n  | 'I Found A Pet Footer Link / All Pages'\n  | 'Search All Pets Link / Homepage'\n  | 'Search All Pets Link / How To Help Page'\n  | 'Search All Pets Button / How To Help Page'\n  | 'Sign Up Button / All Pages'\n  | 'Search Persistent Banner / All Pages'\n  | 'I Found A Pet Button / Shelter Dashboard'\n  | 'I Found A Pet Button / Shelter Homepage'\n  | 'Search Button / User Dashboard'\n  | 'Photo Search Chip / Search Results Page'\n  | 'Microchip Search Chip / Search Results Page'\n  | 'Distance Search Chip / Search Results Page'\n  | 'Photo Search Button / Search Results Page'\n  | 'Microchip Search Button / Search Results Page'\n  | 'Distance Search Button / Search Results Page'\n  | 'Photo Search Link / Search Results Page'\n  | 'Microchip Search Link / Search Results Page'\n  | 'Distance Search Link / Search Results Page'\n  | 'Search By Microchip Link / Lost and Found Tips Page'\n  | 'Contact Pet Finder Button'\n  | 'Contact Pet Parent Button'\n  | 'View Reported Pets Near Me / Alert Matches Page'\n  | 'View Matches Button / Shelter Pets Page'\n  | 'View Matches Button / Shelter Pet Profile'\n  | 'Card Header Link / Photo Search Results Page / Lost'\n  | 'Card Header Link / Photo Search Results Page / Found'\n  | 'Card Header Link / Distance Search Results Page / Lost'\n  | 'Card Header Link / Distance Search Results Page / Found'\n  | 'Card Header Link / Microchip Search Results Page / Lost'\n  | 'Card Header Link / Microchip Search Results Page / Found'\n  | 'Card Header Link / Distance Search Results Page / All'\n  | 'Card Header Link / Distance Search Results Map / Lost'\n  | 'Card Header Link / Distance Search Results Map / Found'\n  | 'Card Header Link / Distance Search Results Map / All'\n  | 'Add Pet Button / User Dashboard / Lost'\n  | 'Add Pet Button / User Dashboard / Found'\n  | 'Report as Lost Button / User Dashboard / Lost'\n  | 'Map View Icon'\n  | 'List View Icon'\n  | typeof notApplicableString;\n\n/**\n * The initiating component data\n *\n * @interface IAnalyticsInitiatingComponentData\n */\ninterface IAnalyticsInitiatingComponentData {\n  /** The initiating component */\n  component: AnalyticsInitiatingComponent;\n  /** The data expiration date */\n  expiration: Date;\n}\n\n/**\n * AnalyticsEventStorage class, this is used to store the analytics event\n * information that is not present in the context of certain pages\n *\n * @class AnalyticsEventStorage\n */\nexport class AnalyticsEventStorage {\n  /** The session storage instance */\n  private readonly analyticsEventStorage = new LocalStorage();\n\n  /** The key to store the analytics event data under */\n  private readonly analyticsEventStorageKey = 'analyticsEvent';\n\n  private readonly initiatingComponentKey = 'initiatingAnalyticsComponent';\n\n  /**\n   * Set data in session storage\n   *\n   * @param {EventData} analyticsEvent - The analytics event object to store\n   */\n  public set = (analyticsEvent: EventData) => {\n    this.analyticsEventStorage.set(\n      this.analyticsEventStorageKey,\n      analyticsEvent,\n      { expires: tomorrow }\n    );\n  };\n\n  /**\n   * Get data from session storage\n   *\n   * @returns {EventData | null} The analytics event object\n   */\n  public get = (): EventData | null => {\n    return this.analyticsEventStorage.get(\n      this.analyticsEventStorageKey\n    ) as EventData;\n  };\n\n  /** Delete data from session storage */\n  public delete = () => {\n    this.analyticsEventStorage.delete(this.analyticsEventStorageKey);\n  };\n\n  /**\n   * Set the initiating component\n   *\n   * @param {string} component - The initiating component\n   */\n  public setInitiatingComponent = (component: AnalyticsInitiatingComponent) => {\n    this.analyticsEventStorage.set(\n      this.initiatingComponentKey,\n      { component },\n      { expires: defaultExpirationDate }\n    );\n  };\n\n  /**\n   * Retrieve the initiating component\n   *\n   * @constant {AnalyticsInitiatingComponent} initiatingComponent\n   * @returns {AnalyticsInitiatingComponent} The initiating component\n   */\n  public getInitiatingComponent = (): AnalyticsInitiatingComponent => {\n    /**\n     * The analytics initiating component data\n     *\n     * @constant {IAnalyticsInitiatingComponentData} data\n     */\n    const data = this.analyticsEventStorage.get(\n      this.initiatingComponentKey\n    ) as IAnalyticsInitiatingComponentData;\n    /**\n     * The initiating component\n     *\n     * @constant {AnalyticsInitiatingComponent} component\n     */\n    const component = data?.component;\n\n    if (component) {\n      return component;\n    }\n\n    return 'NA';\n  };\n}\n","import { notApplicableString } from '@/lib/constants/constants/analytics';\nimport { PetStatus } from '@/lib/constants/types/analytics';\nimport {\n  AnalyticsEventStorage,\n  AnalyticsInitiatingComponent,\n} from '@/lib/storageClasses/analyticsEventStorage';\nimport { PetFlowType } from '@/lib/utils/analytics/petSearch';\nimport {\n  createContext,\n  ReactNode,\n  useCallback,\n  useContext,\n  useMemo,\n} from 'react';\n\n/**\n * The data structure for the event data, we can add more properties as needed\n *\n * @interface EventData\n */\nexport interface EventData {\n  /**\n   * The method behind the operation\n   *\n   * @memberof EventData\n   * @member {string} [method]\n   */\n  method?: string;\n  /**\n   * The status of the pet (Lost, Found, Safe at Home)\n   *\n   * @memberof EventData\n   * @member {PetStatus} [petStatus]\n   */\n  petStatus?: PetStatus;\n  /**\n   * The text on the button that was clicked to get to this event\n   *\n   * @memberof EventData\n   * @member {string} [clickText]\n   */\n  clickText?: string;\n  /**\n   * The id of the pet entity\n   *\n   * @memberof EventData\n   * @member {number} [petId]\n   */\n  petId?: number;\n  /**\n   * The name of the pet\n   *\n   * @memberof EventData\n   * @member {string} [petName]\n   */\n  petName?: string;\n  /**\n   * The zip code associated with the pet\n   *\n   * @memberof EventData\n   * @member {string} [locationId]\n   */\n  locationId?: string;\n  /**\n   * The latitude of the pet\n   *\n   * @memberof EventData\n   * @member {string} [latitude]\n   */\n  latitude?: string;\n  /**\n   * The longitude of the pet\n   *\n   * @memberof EventData\n   * @member {string} [longitude]\n   */\n  longitude?: string;\n  /**\n   * The species of the pet\n   *\n   * @memberof EventData\n   * @member {string} [species]\n   */\n  species?: string;\n  /**\n   * The start date of the search\n   *\n   * @memberof EventData\n   * @member {string | null} [start]\n   */\n  start?: string | null;\n  /**\n   * The flow type\n   *\n   * @memberof EventData\n   * @member {PetFlowType} [flowType]\n   */\n  flowType?: PetFlowType;\n}\n\n/** This is the data structure that can be returned from the provider */\nexport interface IEventContext {\n  /** This is the method for updating the data */\n  updateData: (newData: EventData) => void;\n  /** This is the method for clearing the data */\n  clearData: () => void;\n  /** Get data */\n  getData: () => EventData | undefined;\n  /** Set the initiating component state */\n  setInitiatingComponent: (component: AnalyticsInitiatingComponent) => void;\n  /** The initiating component */\n  getInitiatingComponent: () => AnalyticsInitiatingComponent;\n  /** Get the pet id */\n  getPetId: () => number | undefined;\n}\n\n/**\n * The default event context\n *\n * @constant {IEventContext} defaultEventContext\n */\nexport const defaultEventContext: IEventContext = {\n  /** This method is used to update the data */\n  // eslint-disable-next-line @typescript-eslint/no-empty-function\n  updateData: () => {},\n  /**\n   * This method is used to get the data\n   *\n   * @returns {undefined} - The data\n   */\n  getData: () => undefined,\n  /** This method is used to clear the data */\n  // eslint-disable-next-line @typescript-eslint/no-empty-function\n  clearData: () => {},\n  /** Set the initiating component state */\n  // eslint-disable-next-line @typescript-eslint/no-empty-function\n  setInitiatingComponent: () => {},\n  /**\n   * The default initiating component\n   *\n   * @returns {string} - The initiating component\n   */\n  getInitiatingComponent: (): AnalyticsInitiatingComponent =>\n    notApplicableString,\n  /**\n   * The default pet id\n   *\n   * @returns {number | undefined} - The pet id\n   */\n  getPetId: () => undefined,\n};\n\n/** This is the context */\nconst EventContext = createContext<IEventContext>(defaultEventContext);\n\n/**\n * The interface for the EventContextProvider props\n *\n * @interface\n */\ninterface IEventContextProvider {\n  /** The children wrapped by the provider */\n  children: ReactNode;\n}\n\n/**\n * The EventContextProvider component.\n *\n * @param {IEventContextProvider} props - The props for the\n *   EventContextProvider.\n * @returns {Element} - The EventContextProvider.\n */\nexport function EventContextProvider({\n  children,\n}: IEventContextProvider): JSX.Element {\n  // Make instance of AnalyticsEventStorage referentially stable so context methods can be passed to the dependency array\n  const analyticsEventStorage = useMemo(() => new AnalyticsEventStorage(), []);\n\n  /**\n   * Update the state of data\n   *\n   * @param {EventData} newData - The new data\n   * @returns {void}\n   */\n  const updateData = useCallback(\n    (newData: EventData) => {\n      const storedData = analyticsEventStorage.get();\n      const currentData = storedData || {};\n      if (currentData && newData) {\n        newData = { ...currentData, ...newData };\n      }\n      analyticsEventStorage.set(newData);\n    },\n    [analyticsEventStorage]\n  );\n\n  /**\n   * Clear the state of data\n   *\n   * @returns {void}\n   */\n  const clearData = useCallback(() => {\n    analyticsEventStorage.delete();\n  }, [analyticsEventStorage]);\n\n  /**\n   * Return the state of data, if it is not there then check the storage\n   *\n   * @returns {EventData | undefined} - The data\n   */\n  const getData = useCallback(() => {\n    return analyticsEventStorage.get() || undefined;\n  }, [analyticsEventStorage]);\n\n  /**\n   * Return the pet id from the storage if available\n   *\n   * @returns {number | undefined} - The pet id\n   */\n  const getPetId = useCallback(() => {\n    const data = analyticsEventStorage.get();\n    return data?.petId;\n  }, [analyticsEventStorage]);\n\n  /**\n   * Set the initiating component\n   *\n   * @param {AnalyticsInitiatingComponent} component - The initiating component\n   */\n  const setInitiatingComponent = useCallback(\n    (component: AnalyticsInitiatingComponent) => {\n      analyticsEventStorage.setInitiatingComponent(component);\n    },\n    [analyticsEventStorage]\n  );\n\n  /**\n   * Retrieve the initiating component\n   *\n   * @returns {AnalyticsInitiatingComponent} - The initiating component\n   */\n  const getInitiatingComponent = useCallback(() => {\n    return analyticsEventStorage.getInitiatingComponent();\n  }, [analyticsEventStorage]);\n\n  return (\n    <EventContext.Provider\n      value={{\n        clearData,\n        getPetId,\n        getData,\n        getInitiatingComponent,\n        setInitiatingComponent,\n        updateData,\n      }}\n    >\n      {children}\n    </EventContext.Provider>\n  );\n}\n\n/**\n * This is the hook for the event context\n *\n * @returns {IEventContext} - The context\n */\nexport const useEventContext = (): IEventContext => useContext(EventContext);\n","import { useRouter } from 'next/router';\nimport { useEffect, useState } from 'react';\nimport configurations, { FormTypes, PageTypes } from './configs/Configuration';\nimport { ParsedUrlQuery } from 'querystring';\n\n/**\n * Sets the initial form step based on the query param. Used for client-side\n * implementation of forms.\n *\n * @param {FormTypes} formId - The form id\n * @param {ParsedUrlQuery} originalQueryParams - The original query params\n * @returns {{ isLoading: boolean; pageId: PageTypes }} The hook results\n */\nexport function useInitialFormStep(\n  formId: FormTypes,\n  originalQueryParams?: ParsedUrlQuery\n) {\n  const router = useRouter();\n  const [isLoading, setIsLoading] = useState(true);\n\n  const firstPage = configurations[formId].order[0];\n  const stepId = (router.query.step || firstPage) as PageTypes;\n\n  useEffect(() => {\n    if (router.isReady) {\n      if (!router.query.step) {\n        router.replace({\n          query: { step: firstPage, ...originalQueryParams },\n        });\n      }\n\n      setIsLoading(false);\n    }\n    /** Only router.isReady and router.query.step should be enough. */\n    // eslint-disable-next-line react-hooks/exhaustive-deps\n  }, [router.isReady, router.query.step]);\n\n  return {\n    isLoading,\n    pageId: stepId,\n  };\n}\n","import { ISearchParameters } from '@/components/templates/SearchResultsTemplate/interfaces';\nimport {\n  foundSearchArticleSlugNames,\n  lostSearchArticleSlugNames,\n} from '@/lib/constants/constants/articles';\nimport { SearchType } from '@/lib/constants/types/pets';\nimport { getReverseGeocode } from '@/lib/dataSource/lostApi/utilities/geolocation/reverseGeocode';\nimport ReverseGeocode from '@/lib/dataSource/utilities/geolocation/reverseGeocode';\nimport LocalStorage from '@/lib/utils/storage/local-storage';\nimport { useCallback, useEffect, useState } from 'react';\n\n/**\n * The search parameters storage key\n *\n * @constant {string} searchParametersStorageKey - The search parameters storage\n *   key\n */\nexport const searchParametersStorageKey = 'search-params';\n\n/**\n * The local storage instance to store the search parameters\n *\n * @constant {LocalStorage} storage - The local storage instance\n */\nexport const searchParametersStorage = new LocalStorage();\n\n/**\n * IUseSearchParameters\n *\n * @interface\n */\nexport interface IUseSearchParameters {\n  /**\n   * Function to get the articles slug names\n   *\n   * @returns {void}\n   */\n  getArticlesSlugNames: (searchType?: SearchType) => void;\n  /**\n   * Function to get the reverse geocode from the search parameters\n   *\n   * @returns {Promise<ReverseGeocode | undefined>} The reverse geocode\n   */\n  getSearchParamsReverseGeocode: () => Promise<ReverseGeocode>;\n  /**\n   * Function to clear the search parameters from the storage\n   *\n   * @returns {void}\n   */\n  clearSearchParameters: () => void;\n  /** The articles slug names to display in the no results page */\n  articleSlugNames?: string[];\n  /** The search parameters */\n  searchParameters?: ISearchParameters;\n}\n\n/**\n * Hook to get the search parameters from storage\n *\n * @returns {IUseSearchParameters} The useSearchParameters hook return\n */\nconst useSearchParameters = (): IUseSearchParameters => {\n  const [searchParameters, _setSearchParameters] =\n    useState<ISearchParameters>();\n\n  /**\n   * The articles slug names to display in the no results page\n   *\n   * @constant {string[]} articleSlugNames - The articles slug names to display\n   */\n  const [articleSlugNames, setArticlesSlugNames] = useState<string[]>([]);\n\n  /** Set search parameters from storage */\n  const setSearchParameters = useCallback(() => {\n    /**\n     * The search parameters from local storage\n     *\n     * @constant {ISearchParameters} searchParametersFromStorage - The search\n     */\n    const searchParametersFromStorage =\n      searchParametersStorage.get(searchParametersStorageKey) ?? {};\n\n    _setSearchParameters(searchParametersFromStorage as ISearchParameters);\n  }, []);\n\n  /** Hook to update the distanceSearchResults options with local storage values */\n  useEffect(() => {\n    setSearchParameters();\n  }, [setSearchParameters]);\n\n  /**\n   * Function to get the articles slug names\n   *\n   * @param {SearchType} searchType - The search type to get the articles slug\n   *   names\n   */\n  const getArticlesSlugNames = useCallback(\n    (searchType?: SearchType) => {\n      /** Fallback to lost search if no searchType is provided */\n      const storedSearchType = searchType || searchParameters?.searchType;\n\n      if (storedSearchType) {\n        const slugNames =\n          storedSearchType === 'lost'\n            ? lostSearchArticleSlugNames\n            : foundSearchArticleSlugNames;\n        setArticlesSlugNames(slugNames);\n      }\n    },\n    [searchParameters]\n  );\n\n  /**\n   * Function to get the reverse geocode from the search parameters\n   *\n   * @returns {Promise<ReverseGeocode>} The reverse geocode\n   */\n  const getSearchParamsReverseGeocode = useCallback(async () => {\n    const latitude = searchParameters?.latitude as number;\n    const longitude = searchParameters?.longitude as number;\n    const reverseGeocodeData = await getReverseGeocode({ latitude, longitude });\n    const reverseGeocode = new ReverseGeocode(reverseGeocodeData, {\n      latitude,\n      longitude,\n    });\n\n    return reverseGeocode;\n  }, [searchParameters]);\n\n  /**\n   * Clear the search parameters from the storage\n   *\n   * @returns {void}\n   */\n  const clearSearchParameters = useCallback((): void => {\n    searchParametersStorage.delete(searchParametersStorageKey);\n    setSearchParameters();\n  }, [setSearchParameters]);\n\n  /** Hook to fetch articles slug names */\n  useEffect(() => {\n    getArticlesSlugNames();\n  }, [getArticlesSlugNames, searchParameters?.searchType]);\n\n  return {\n    getArticlesSlugNames,\n    getSearchParamsReverseGeocode,\n    clearSearchParameters,\n    articleSlugNames,\n    searchParameters,\n  };\n};\n\nexport default useSearchParameters;\n","import { tomorrow } from '@/lib/utils/helpers/dateHelpers/dates';\nimport LocalStorage from '@/lib/utils/storage/local-storage';\nimport { ToastType, useToastContext } from './Toast';\n\nconst localStorage = new LocalStorage();\n\nconst STORAGE_TOAST_KEY = 'toast';\n\n/** @interface IBuildToastPayload */\ninterface IBuildToastPayload {\n  /**\n   * Toast id.\n   *\n   * @memberof IBuildToastPayload\n   * @member {string} [id]\n   */\n  id?: string;\n  /**\n   * Toast type.\n   *\n   * @memberof IBuildToastPayload\n   * @member {ToastType} type\n   */\n  type: ToastType;\n  /**\n   * Toast message.\n   *\n   * @memberof IBuildToastPayload\n   * @member {string} message\n   */\n  message: string;\n}\n\n/**\n * Generates a toast payload for the local storage.\n *\n * @param {string} [param.id] - The toast id\n * @param {ToastType} param.type - The toast type\n * @param {string} param.message - The toast message\n * @returns {object} - The built toast payload\n */\nexport const buildToastPayload = ({\n  id = '1',\n  type,\n  message,\n}: IBuildToastPayload) => {\n  return {\n    id,\n    type: type,\n    message: message,\n    persistent: false,\n    showIcon: true,\n  };\n};\n\n/** @interface IUseToastReturn */\ninterface IUseToastReturn {\n  /**\n   * Displays a toast.\n   *\n   * @memberof IUseToastReturn\n   * @member {(type: ToastType, message: string, id: string) => void} displayToast\n   */\n  displayToast: (type: ToastType, message: string, id?: string) => void;\n  /**\n   * Saves toast data to storage.\n   *\n   * @memberof IUseToastReturn\n   * @member {(type: ToastType, message: string, id: string) => void} saveToastToStorage\n   */\n  saveToastToStorage: (type: ToastType, message: string, id?: string) => void;\n}\n\n/**\n * Expose toast-related functions.\n *\n * @returns {IUseToastReturn} Toast-related functions.\n */\nexport function useToast(): IUseToastReturn {\n  const { dispatch } = useToastContext();\n\n  /**\n   * Displays a toast.\n   *\n   * @param {ToastType} type The toast type.\n   * @param {string} message The toast message.\n   * @param {string} [id] The toast id.\n   */\n  function displayToast(type: ToastType, message: string, id = '1') {\n    dispatch({\n      type: 'ADD_TOAST',\n      toast: buildToastPayload({ id, type, message }),\n    });\n  }\n\n  /**\n   * Saves toast data to storage.\n   *\n   * @param {ToastType} type The toast type.\n   * @param {string} message The toast message.\n   * @param {string} [id] The toast id.\n   * @returns {void}\n   */\n  function saveToastToStorage(type: ToastType, message: string, id = 's1') {\n    localStorage.set(\n      STORAGE_TOAST_KEY,\n      buildToastPayload({ id, type, message }),\n      {\n        expires: tomorrow,\n      }\n    );\n  }\n\n  return { displayToast, saveToastToStorage };\n}\n","import { sdk } from '@/lib/dataSource/lostApi/common';\nimport { IConversationTotalUnreadCountResponseData } from '@petcolove/lost--client--api-sdk/dist/concrete/sdks/interfaces/chat';\n\n/**\n * The params for the total unread conversation\n *\n * @interface IConversationTotalUnreadCountParams\n */\ninterface IConversationTotalUnreadCountParams {\n  /** The auth token */\n  authToken: string;\n  /** The user entity id */\n  userEntityId: number;\n}\n\n/**\n * Get the total of unread conversation\n *\n * @param {IConversationTotalUnreadCountParams} params - The params for the total unread function\n * @returns {Promise<IConversationTotalUnreadCountResponseData>} The list of all\n *   conversations\n */\nexport async function totalUnread({\n  authToken,\n  userEntityId,\n}: IConversationTotalUnreadCountParams): Promise<IConversationTotalUnreadCountResponseData> {\n  try {\n    const conversations = await sdk\n      .conversationsTotalUnread({\n        contextId: userEntityId,\n        authToken,\n      })\n      .read();\n    return conversations.data;\n  } catch (error) {\n    console.error(error);\n    throw error;\n  }\n}\n","import { totalUnread } from '@/lib/dataSource/lostApi/chat/conversations/totalUnread';\nimport useMe, { IUseMe } from '@/lib/hooks/me/useMe';\nimport {\n  Context,\n  Dispatch,\n  ReactNode,\n  SetStateAction,\n  createContext,\n  useCallback,\n  useContext,\n  useEffect,\n  useMemo,\n  useState,\n} from 'react';\n\n/** The types of users that can be returned */\nexport type UserType = 'shelter' | 'user';\n\n/**\n * The type used to create the context\n *\n * @interface\n */\nexport interface IUserContext extends IUseMe {\n  /** If the user has unread messages */\n  hasMessage: boolean;\n  /** A method for returning the user type */\n  userType: UserType | null;\n  /** The number of unread messages for the user */\n  unreadMessageCount: number;\n  /** The fetch state of unread messages count */\n  fetchingUnreadMessageCount: boolean;\n  /** The logged in state of the user */\n  isLoggedIn: boolean;\n  /** Whether if the logged in user is a shelter or not */\n  isShelter: boolean;\n  /** The function to get unread messages for user */\n  getUnreadMessagesForUser: () => Promise<void>;\n  /** The unreadMessageCount setter */\n  setUnreadMessageCount: Dispatch<SetStateAction<number>>;\n}\n\n/**\n * The default user context\n *\n * @constant {IUserContext}\n */\nexport const defaultUserContext: IUserContext = {\n  hasMessage: false,\n  userType: null,\n  isFetchingUser: true,\n  isLoggedIn: false,\n  isShelter: true,\n  unreadMessageCount: 0,\n  fetchingUnreadMessageCount: false,\n  getUnreadMessagesForUser:\n    /** The default function to get unread messages for user */\n    // eslint-disable-next-line @typescript-eslint/no-empty-function\n    async () => {},\n  setUnreadMessageCount:\n    /** The default function to set the unread message count */\n    // eslint-disable-next-line @typescript-eslint/no-empty-function\n    () => {},\n};\n\n/**\n * The UserContext\n *\n * @constant {Context<IUserContext>}\n */\nconst UserContext: Context<IUserContext> =\n  createContext<IUserContext>(defaultUserContext);\n\n/**\n * The interface for the UserProvider props\n *\n * @interface\n */\nexport interface IUserProvider {\n  /** The children wrapped by the provider */\n  children: ReactNode;\n}\n\n/**\n * The UserContextProvider component.\n *\n * @param {IUserProvider} props - The props for the UserContextProvider.\n * @returns {Element} - The UserContextProvider.\n */\nexport function UserContextProvider({ children }: IUserProvider): JSX.Element {\n  /**\n   * The data from the me hook\n   *\n   * @see useMe\n   */\n  const { idToken, me, isFetchingUser, isError, errorMessage } = useMe();\n  /**\n   * The total unread message count\n   *\n   * @constant {number}\n   */\n  const [unreadMessageCount, setUnreadMessageCount] = useState<number>(0);\n  /**\n   * The fetch state of unread messages count\n   *\n   * @constant {boolean}\n   */\n  const [fetchingUnreadMessageCount, setFetchingUnreadMessageCount] =\n    useState(true);\n  /**\n   * If the user has unread messages\n   *\n   * @constant {boolean}\n   */\n  const hasMessage = useMemo(\n    () => unreadMessageCount > 0,\n    [unreadMessageCount]\n  );\n\n  /** This will determine the type of user that is currently logged in. */\n  const userType = useMemo(() => {\n    let userType: UserType | null = null;\n\n    if (me?.awos) {\n      userType = 'shelter';\n    } else if (me?.user && !me?.awos) {\n      userType = 'user';\n    }\n    return userType;\n  }, [me?.awos, me?.user]);\n\n  /**\n   * The logged in state of the user We get it by checking if we are able to get\n   * a user type from the me object\n   *\n   * @constant {boolean}\n   */\n  const isLoggedIn = useMemo(() => {\n    return !isFetchingUser && userType !== null;\n  }, [isFetchingUser, userType]);\n\n  /**\n   * Whether if the logged in user is a shelter or not\n   *\n   * We explicitly check if the user type is of type 'user' so we do not show\n   * user specific options while we determine the user type\n   *\n   * @constant {boolean}\n   */\n  const isShelter = useMemo(() => {\n    if (userType === 'user') {\n      return false;\n    }\n    return true;\n  }, [userType]);\n\n  /**\n   * Callback to get the total unread messages for a user\n   *\n   * @returns {void}\n   */\n  const getUnreadMessagesForUser = useCallback(async () => {\n    if (!me || !idToken || userType === 'shelter')\n      return setUnreadMessageCount(0);\n    /**\n     * @property {string} id - The user id\n     * @property {string} idToken - The user idToken\n     */\n    const {\n      user: { id },\n    } = me;\n    try {\n      /**\n       * The response from the totalUnread function\n       *\n       * @property {number} unread - The total unread messages for a user\n       */\n      const { unread } = await totalUnread({\n        authToken: idToken,\n        userEntityId: id,\n      });\n\n      if (unread !== unreadMessageCount) {\n        setUnreadMessageCount(unread);\n      }\n    } catch (error) {\n      console.error('Error fetching unread messages', error);\n    } finally {\n      setFetchingUnreadMessageCount(false);\n    }\n  }, [idToken, me, unreadMessageCount, userType]);\n\n  /** Make initial call for unread messages */\n  useEffect(() => {\n    getUnreadMessagesForUser();\n    // eslint-disable-next-line react-hooks/exhaustive-deps\n  }, [idToken, me]);\n\n  return (\n    <UserContext.Provider\n      value={{\n        idToken,\n        hasMessage,\n        me,\n        userType,\n        isLoggedIn,\n        isShelter,\n        isFetchingUser,\n        getUnreadMessagesForUser,\n        unreadMessageCount,\n        setUnreadMessageCount,\n        fetchingUnreadMessageCount,\n        isError,\n        errorMessage,\n      }}\n    >\n      {children}\n    </UserContext.Provider>\n  );\n}\n\n/**\n * A hook to access the UserContext\n *\n * @returns {IUserContext} - The UserContext\n */\nexport const useUserContext = (): IUserContext => useContext(UserContext);\n","import { defaultEventEmitter } from '@/lib/analytics/commonEmitter';\nimport { notApplicableString } from '@/lib/constants/constants/analytics';\nimport { PetStatus } from '@/lib/constants/types/analytics';\nimport { InferredSpecies } from '@/lib/constants/types/pets';\n\n/** Add Pet Event Handler Data */\nexport interface IUploadPhotoData {\n  /** Click Text */\n  clickText: string;\n  /** Id of the pet associated with photo */\n  petId?: number;\n  /** Pet Name */\n  name?: string;\n  /** Pet Status */\n  petStatus?: PetStatus;\n  /** What type of user is creating the pet */\n  listingSource: 'Consumer Pet Listing' | 'Shelter Pet Listing';\n  /** Pet Species */\n  species?: InferredSpecies;\n  /** Zip code where pet was found */\n  locationId?: string;\n}\n\n/**\n * Send the photo upload event to google analytics\n *\n * @param {IUploadPhotoData} data - The data to send\n */\nexport const uploadPhotoEventHandler = ({\n  clickText,\n  petId,\n  name,\n  petStatus,\n  listingSource,\n  species,\n  locationId,\n}: IUploadPhotoData) => {\n  /** Create the event data object */\n  const eventData = {\n    name: 'photo_upload',\n    data: {\n      click_text: clickText,\n      items: [\n        {\n          pet_id: petId || notApplicableString,\n          pet_name: name || notApplicableString,\n          pet_status: petStatus || notApplicableString,\n          listing_source: listingSource,\n          species: species || notApplicableString,\n          location_id: locationId || notApplicableString,\n        },\n      ],\n    },\n  };\n  defaultEventEmitter.handleEvent(eventData);\n};\n","import { defaultEventEmitter } from '@/lib/analytics/commonEmitter';\nimport { notApplicableString } from '@/lib/constants/constants/analytics';\nimport { PetStatus } from '@/lib/constants/types/analytics';\nimport { InferredSpecies } from '@/lib/constants/types/pets';\nimport { UserReadAllPetsItemDto } from '@petcolove/lost--client--api-sdk/dist/concrete/sdks/services/users/pets/dto';\nimport capitalizeFirstLetter from '../helpers/stringHelpers/capitalizeFirstLetter';\n\n/** The acceptable types of sharing methods */\nexport type ShareMethods =\n  | 'Facebook'\n  | 'Nextdoor'\n  | 'Print Flyer'\n  | 'Email'\n  | 'Twitter'\n  | 'Link';\n\n/** The acceptable types of content to share */\ntype ShareContent = 'Article' | 'Lost Pet Listing' | 'Found Pet Listing';\n\n/** Share Event Handler Data */\nexport interface IShareEventData {\n  /** The method of sharing */\n  method: ShareMethods;\n  /** The type of content that is being shared */\n  contentType: ShareContent;\n  /** If pet listing the id of the pet */\n  petId?: number;\n  /** If lost pet listing the name of the pet being shared */\n  petName?: string;\n  /** If a pet listing what is the pet status */\n  petStatus?: Omit<PetStatus, 'Safe at Home'>;\n  /** If pet listing did the pet originate from a shelter or user */\n  listingSource?: 'Shelter Pet Listing' | 'Consumer Pet Listing';\n  /** If pet listing the species of the pet */\n  petSpecies?: InferredSpecies;\n  /** If pet listing the location id of the pet */\n  locationId?: string;\n}\n\n/**\n * Determine the correct species for the pet\n *\n * @param {string} species - The species of the pet\n * @returns {InferredSpecies | undefined} The species of the pet\n */\nexport const petSpecies = (species?: string): InferredSpecies | undefined => {\n  if (species) {\n    if (species.toLowerCase() === 'dog') {\n      return 'Dog';\n    } else if (species.toLowerCase() === 'cat') {\n      return 'Cat';\n    }\n  }\n  return undefined;\n};\n\n/**\n * Send the add pet event to google analytics\n *\n * @param {IShareEventData} data - The data to send\n */\nexport const shareEventHandler = ({\n  method,\n  contentType,\n  petId,\n  petName,\n  petStatus,\n  listingSource,\n  petSpecies,\n  locationId,\n}: IShareEventData) => {\n  /**\n   * Account for found pet names being updated to Unknown Name\n   *\n   * @returns {string} - The pet name or NA if not found\n   */\n  const unknownPetName = () => {\n    if (!petName || petName === 'Unknown Name') {\n      return 'NA';\n    }\n    return petName;\n  };\n\n  /** Create the event data object */\n  const eventData = {\n    name: 'share',\n    data: {\n      method,\n      content_type: contentType,\n      items: [\n        {\n          pet_id: petId || notApplicableString,\n          pet_name: unknownPetName(),\n          pet_status: petStatus || notApplicableString,\n          listing_source: listingSource || notApplicableString,\n          species: petSpecies || notApplicableString,\n          location_id: locationId || notApplicableString,\n        },\n      ],\n    },\n  };\n  defaultEventEmitter.handleEvent(eventData);\n};\n\n/** The share event data */\ntype IShareEventDataFromPetListing = Omit<IShareEventData, 'method'>;\n\n/**\n * Build the data for the share event\n *\n * @param {UserReadAllPetsItemDto} petListing - Pet listing data\n * @returns {IShareEventDataFromPetListing} - The Share event data\n */\nexport const getShareEventDataFromPetListing = (\n  petListing?: UserReadAllPetsItemDto\n): IShareEventDataFromPetListing => {\n  const petStatus = petListing?.type === 'lostUserPet' ? 'Lost' : 'Found';\n  const petSpecies =\n    (capitalizeFirstLetter(petListing?.species || '') as InferredSpecies) ||\n    undefined;\n\n  const contentType =\n    petListing?.type === 'lostUserPet'\n      ? 'Lost Pet Listing'\n      : 'Found Pet Listing';\n\n  const listingSource =\n    petListing?.type === 'foundOrgPet'\n      ? 'Shelter Pet Listing'\n      : 'Consumer Pet Listing';\n\n  const eventData: IShareEventDataFromPetListing = {\n    contentType,\n    petId: petListing?.id,\n    petName: petListing?.name || undefined,\n    petSpecies,\n    petStatus,\n    listingSource,\n    locationId: petListing?.location?.postalCode,\n  };\n\n  return eventData;\n};\n","import { defaultEventEmitter } from '@/lib/analytics/commonEmitter';\nimport { notApplicableString } from '@/lib/constants/constants/analytics';\nimport { InferredSpecies } from '@/lib/constants/types/pets';\n\n/** View Flyer Event Data Interface */\nexport interface IViewFlyerEventData {\n  /** Click Text */\n  clickText: string;\n  /** Pet Id */\n  petId: number;\n  /** Pet Name */\n  petName?: string;\n  /** Pet Status */\n  petStatus?: string;\n  /** What type of user created the pet listing */\n  listingSource: 'User' | 'Shelter';\n  /** Pet Species */\n  species: InferredSpecies;\n  /** Zip code where pet was lost/found */\n  locationId?: string;\n}\n\n/**\n * Send the view pet flyer event to google analytics\n *\n * @param {IViewFlyerEventData} data - The data to send\n */\nexport const viewFlyerEventHandler = ({\n  clickText,\n  petId,\n  petName,\n  petStatus,\n  listingSource,\n  species,\n  locationId,\n}: IViewFlyerEventData) => {\n  /** Create the event data object */\n  const eventData = {\n    name: 'view_pet_flyer',\n    data: {\n      click_text: clickText,\n      items: [\n        {\n          pet_id: petId,\n          pet_name: petName || notApplicableString,\n          pet_status: petStatus || notApplicableString,\n          listing_source: listingSource,\n          species: species,\n          location_id: locationId || notApplicableString,\n        },\n      ],\n    },\n  };\n  defaultEventEmitter.handleEvent(eventData);\n};\n","/**\n * Converts a date string to a string in the format Month DD, YYYY\n *\n * @param {string | Date} date - The date to convert\n * @param {'short' | 'long'} month - The month format\n * @returns {string} - The date in the format Month DD, YYYY\n */\nexport const dateToMonthDDYYYY = (\n  date: string | Date,\n  month: 'short' | 'long' = 'long'\n): string => {\n  return new Date(date).toLocaleDateString('en-US', {\n    timeZone: 'UTC',\n    month,\n    day: '2-digit',\n    year: 'numeric',\n  });\n};\n","export const inactiveClasses = 'saturate-0';\n\n/**\n * Adds the inactive classes for an based on the isInactive value\n *\n * @param {string} classes - The original classes\n * @param {boolean} isInactive - Whether is inactive or not\n * @returns {string} - The resulting classes\n */\nexport default function maybeAddInactiveClasses(\n  classes: string,\n  isInactive: boolean\n): string {\n  if (!isInactive) {\n    return classes;\n  }\n  return `${classes} ${inactiveClasses}`;\n}\n","/**\n * Capitalize the first letter of a string\n *\n * @param {string | null} str - The string to capitalize\n * @returns {string} The capitalized string\n */\nexport default function capitalizeFirstLetter(str?: string | null): string {\n  /** Check if the string is empty */\n  if (!str) {\n    return '';\n  }\n\n  /** Capitalize the first letter and concatenate it with the rest of the string */\n  return str[0].toUpperCase() + str.slice(1);\n}\n","import { ILocationDto } from '@/components/molecules/InputPlacesFieldGoogle/InputPlacesFieldGoogle';\nimport PageTransition from '@/components/molecules/PageTransition/PageTransition';\nimport { partnerInterstitialDefaultValues } from '@/components/molecules/PartnerInterstitial/defaultValues';\nimport PartnerInterstitial from '@/components/molecules/PartnerInterstitial/PartnerInterstitial';\nimport { PetSpecies } from '@/components/molecules/ShelterPetCard/ShelterPetCard';\nimport { userDashboardSearchDataKey } from '@/components/templates/DashPet/DashPet';\nimport Head from '@/components/templates/Head/Head';\nimport StepperFormTemplate from '@/components/templates/StepperFormTemplate/StepperFormTemplate';\nimport { defaultSearchRadius } from '@/lib/constants/constants/search';\nimport {\n  timerPageTransition,\n  timerPartnerInterstitial,\n} from '@/lib/constants/constants/timer';\nimport { InferredSpecies } from '@/lib/constants/types/pets';\nimport { prepareNextdoor } from '@/lib/dataSource/lostApi/nextdoor/prepare';\nimport {\n  EventData,\n  useEventContext,\n} from '@/lib/hooks/analytics/useEventContext';\nimport { FormTypes } from '@/lib/hooks/multiPageForm/configs/Configuration';\nimport {\n  foundPages,\n  storage as iFoundAPetStorage,\n} from '@/lib/hooks/multiPageForm/configs/IFoundAPetConfiguration';\nimport { storage as iLostAPetStorage } from '@/lib/hooks/multiPageForm/configs/ILostAPetConfiguration';\nimport {\n  FormTypeData,\n  MultiPageFormProvider,\n} from '@/lib/hooks/multiPageForm/MultiPageForm';\nimport { useInitialFormStep } from '@/lib/hooks/multiPageForm/useInitialFormStep';\nimport {\n  CreateAccountBannerProps,\n  usePersistentBannerContext,\n} from '@/lib/hooks/persistentBanner/PersistentBanner';\nimport {\n  searchParametersStorage,\n  searchParametersStorageKey,\n} from '@/lib/hooks/searchParameters/useSearchParameters';\nimport { useUserContext } from '@/lib/hooks/userContext/UserContext';\nimport { SpeciesTypes } from '@/lib/utils/analytics/petSearch';\nimport { uploadPhotoEventHandler } from '@/lib/utils/analytics/photoUpload';\nimport { tomorrow } from '@/lib/utils/helpers/dateHelpers/dates';\nimport capitalizeFirstLetter from '@/lib/utils/helpers/stringHelpers/capitalizeFirstLetter';\nimport { iLostAPetStorageKey } from '@/pages/i-lost-a-pet';\nimport {\n  GetServerSidePropsContext,\n  GetServerSidePropsResult,\n  NextPage,\n} from 'next';\nimport { useRouter } from 'next/router';\nimport { ParsedUrlQuery, ParsedUrlQueryInput } from 'querystring';\nimport { useState } from 'react';\n\n/**\n * The form Id is used to identify the form in the MultiPageFormProvider.\n *\n * @constant\n * @type {FormTypes}\n */\nexport const formId: FormTypes = 'i-found-a-pet';\n\n/**\n * The storage key for the persistent data from the I Found A Pet Form.\n *\n * @constant\n * @type {FormTypeData}\n */\nexport const iFoundAPetStorageKey: FormTypeData = `${formId}-data`;\n\n/**\n * IIFoundAPetFormFields I Lost a Pet Form Fields Interface\n *\n * @interface\n */\nexport interface IIFoundAPetFormFields {\n  /**\n   * The address of the pet.\n   *\n   * @memberof IIFoundAPetFormFields\n   * @member {ILocationDto} address\n   */\n  address: ILocationDto;\n  /**\n   * The photo object.\n   *\n   * @memberof IIFoundAPetFormFields\n   * @member [photo]\n   */\n  photo?: {\n    /**\n     * The image objectKey.\n     *\n     * @memberof IIFoundAPetFormFields.photo\n     * @member {string} objectKey\n     */\n    objectKey: string;\n    /**\n     * The inferred species.\n     *\n     * @memberof IIFoundAPetFormFields.photo\n     * @member {string} species\n     */\n    species: string;\n  };\n\n  /**\n   * The cross streets data.\n   *\n   * @memberof IIFoundAPetFormFields\n   * @member {string} [crossStreets]\n   */\n  crossStreets?: string;\n}\n/**\n * Get the search params from the form data and store it in local storage.\n *\n * @param {IIFoundAPetFormFields} data - The submitted form data\n * @returns {ParsedUrlQueryInput} - The search params\n */\nexport const getSearchParams = (\n  data: IIFoundAPetFormFields\n): ParsedUrlQueryInput => {\n  iFoundAPetStorage.delete(iFoundAPetStorageKey);\n  const address = data.address;\n  const { latitude, longitude } = address.coordinates;\n\n  const searchType = 'lost';\n\n  let objectKey;\n  let species;\n  let searchData = {};\n\n  if (data.photo && data.photo.species) {\n    objectKey = data.photo.objectKey;\n    species = data.photo.species;\n    iFoundAPetStorage.set(\n      iFoundAPetStorageKey,\n      {\n        place: address,\n        geolocation: { latitude, longitude },\n        species,\n        photo: objectKey,\n        crossStreets: data.crossStreets,\n      },\n      { expires: tomorrow }\n    );\n    /** Set the updated form data so it can be used by other workflows */\n    searchData = {\n      species: species.toLowerCase(),\n      photoSearchSpecies: species.toLowerCase(),\n      latitude,\n      longitude,\n      searchType: searchType,\n      searchRadius: defaultSearchRadius,\n      imageObjectKey: objectKey,\n      address: address.label,\n    };\n  } else {\n    iFoundAPetStorage.set(\n      iFoundAPetStorageKey,\n      {\n        place: address,\n        geolocation: { latitude, longitude },\n        crossStreets: data.crossStreets,\n      },\n      { expires: tomorrow }\n    );\n    /** Set the updated form data so it can be used by other workflows */\n    searchData = {\n      latitude,\n      longitude,\n      searchType: searchType,\n      searchRadius: defaultSearchRadius,\n      address: address.label,\n    };\n  }\n  iLostAPetStorage.delete(iLostAPetStorageKey);\n  iLostAPetStorage.delete(userDashboardSearchDataKey);\n  return searchData;\n};\n\n/**\n * ILostAPet Page Props\n *\n * @interface\n */\ninterface IIFoundAPetPage {\n  /** The original query params */\n  originalQueryParams: ParsedUrlQuery;\n}\n\n/**\n * I Found a Pet Form Page\n *\n * @param {IIFoundAPetPage} {originalQueryParams} - The page props\n * @returns {NextPage} - The I Found a Pet Form Page\n */\nconst IFoundAPetForm: NextPage = ({ originalQueryParams }: IIFoundAPetPage) => {\n  const { userType } = useUserContext();\n\n  const router = useRouter();\n  const { setBannerData } = usePersistentBannerContext();\n  const { clearData, updateData } = useEventContext();\n\n  const { pageId, isLoading } = useInitialFormStep(formId, originalQueryParams);\n  const [isSubmitting, setIsSubmitting] = useState(false);\n  const [showTransition, setShowTransition] = useState<boolean>(false);\n\n  /**\n   * On Submit\n   *\n   * @param {IIFoundAPetFormFields} data - The data from the form\n   * @returns {void}\n   */\n  const onSubmit = (data: IIFoundAPetFormFields) => {\n    const searchParams = getSearchParams(data);\n    /** Set banner data */\n    const bannerData: CreateAccountBannerProps = {\n      petReportType: 'found',\n      searchType: data.photo ? 'photo' : 'distance',\n      species: data.photo ? (data.photo.species as PetSpecies) : undefined,\n    };\n    if (userType === null) {\n      setBannerData('info', bannerData);\n    }\n\n    searchParametersStorage.delete(searchParametersStorageKey);\n    if (data.photo && data.photo.species) {\n      /** Send the upload photo event to google analytics */\n      uploadPhotoEventHandler({\n        clickText: 'Search for Pet',\n        petStatus: 'Found',\n        listingSource: 'Consumer Pet Listing',\n        species: data.photo.species as InferredSpecies,\n        locationId: data.address.postalCode,\n      });\n      const species = data.photo.species;\n      const petSearchData: EventData = {\n        clickText: 'Continue',\n        petStatus: 'Found',\n        method: 'Photo',\n        species: capitalizeFirstLetter(species) as SpeciesTypes,\n        locationId: data.address.postalCode,\n      };\n      clearData();\n      updateData(petSearchData);\n\n      router.push({\n        pathname: '/photo-search',\n        query: { ...searchParams, ...originalQueryParams },\n      });\n    } else {\n      const petSearchData: EventData = {\n        clickText: 'Search all pets',\n        petStatus: 'Found',\n        method: 'Distance',\n        locationId: data.address.postalCode,\n      };\n\n      clearData();\n      updateData(petSearchData);\n\n      router.push({\n        pathname: '/search-results',\n        query: { ...searchParams, ...originalQueryParams },\n      });\n    }\n  };\n\n  /**\n   * Handle Submit\n   *\n   * @param {IIFoundAPetFormFields} data - The data from the form\n   * @returns {void}\n   */\n  const handleSubmit = (data: IIFoundAPetFormFields) => {\n    setIsSubmitting(true);\n\n    prepareNextdoor({\n      category: 'lost',\n      location: {\n        latitude: data.address.coordinates.latitude,\n        longitude: data.address.coordinates.longitude,\n        radius: 5,\n      },\n    });\n\n    // Animate the partner interstitial\n    setTimeout(() => {\n      setShowTransition(true);\n    }, timerPartnerInterstitial);\n\n    // Animate the page transition\n    setTimeout(() => {\n      onSubmit(data);\n    }, timerPartnerInterstitial + timerPageTransition);\n  };\n\n  return (\n    <>\n      {isSubmitting ? (\n        <div className=\"px-6 sm:px-8 md:px-16 h-screen flex items-start justify-center pt-28 sm:pt-40\">\n          <PartnerInterstitial {...partnerInterstitialDefaultValues} />\n\n          {showTransition && <PageTransition duration={timerPageTransition} />}\n        </div>\n      ) : (\n        <MultiPageFormProvider\n          formId={formId}\n          pageId={pageId}\n          renderMode=\"client\"\n        >\n          <Head title=\"I Found A Pet\" noIndex={true} />\n          <StepperFormTemplate\n            key={pageId}\n            submitFunction={handleSubmit}\n            isLoadingForm={isLoading}\n            originalQueryParams={originalQueryParams}\n          />\n        </MultiPageFormProvider>\n      )}\n    </>\n  );\n};\n\n/**\n * Redirect if the step is not found.\n *\n * @param {GetServerSidePropsContext} context - The context object\n * @returns {GetServerSidePropsResult} - The server side props\n */\nexport const getServerSideProps = async (\n  context: GetServerSidePropsContext\n): GetServerSidePropsResult => {\n  if (foundPages.indexOf(context.query.step) > -1 || !context.query.step) {\n    const originalQueryParams = { ...context.query };\n    delete originalQueryParams.step;\n    return {\n      props: {\n        originalQueryParams,\n      },\n    };\n  }\n  return {\n    notFound: true,\n  };\n};\n\nexport default IFoundAPetForm;\n","import { ILocationDto } from '@/components/molecules/InputPlacesFieldGoogle/InputPlacesFieldGoogle';\nimport PageTransition from '@/components/molecules/PageTransition/PageTransition';\nimport { partnerInterstitialDefaultValues } from '@/components/molecules/PartnerInterstitial/defaultValues';\nimport PartnerInterstitial from '@/components/molecules/PartnerInterstitial/PartnerInterstitial';\nimport { PetSpecies } from '@/components/molecules/ShelterPetCard/ShelterPetCard';\nimport { userDashboardSearchDataKey } from '@/components/templates/DashPet/DashPet';\nimport Head from '@/components/templates/Head/Head';\nimport StepperFormTemplate from '@/components/templates/StepperFormTemplate/StepperFormTemplate';\nimport { defaultSearchRadius } from '@/lib/constants/constants/search';\nimport {\n  timerPageTransition,\n  timerPartnerInterstitial,\n} from '@/lib/constants/constants/timer';\nimport { InferredSpecies } from '@/lib/constants/types/pets';\nimport { prepareNextdoor } from '@/lib/dataSource/lostApi/nextdoor/prepare';\nimport {\n  EventData,\n  useEventContext,\n} from '@/lib/hooks/analytics/useEventContext';\nimport { FormTypes } from '@/lib/hooks/multiPageForm/configs/Configuration';\nimport { storage as iFoundAPetStorage } from '@/lib/hooks/multiPageForm/configs/IFoundAPetConfiguration';\nimport {\n  storage as iLostAPetStorage,\n  lostPages,\n} from '@/lib/hooks/multiPageForm/configs/ILostAPetConfiguration';\nimport {\n  FormTypeData,\n  MultiPageFormProvider,\n} from '@/lib/hooks/multiPageForm/MultiPageForm';\nimport { useInitialFormStep } from '@/lib/hooks/multiPageForm/useInitialFormStep';\nimport {\n  CreateAccountBannerProps,\n  usePersistentBannerContext,\n} from '@/lib/hooks/persistentBanner/PersistentBanner';\nimport {\n  searchParametersStorage,\n  searchParametersStorageKey,\n} from '@/lib/hooks/searchParameters/useSearchParameters';\nimport { SpeciesTypes } from '@/lib/utils/analytics/petSearch';\nimport { uploadPhotoEventHandler } from '@/lib/utils/analytics/photoUpload';\nimport { tomorrow } from '@/lib/utils/helpers/dateHelpers/dates';\nimport capitalizeFirstLetter from '@/lib/utils/helpers/stringHelpers/capitalizeFirstLetter';\nimport { iFoundAPetStorageKey } from '@/pages/i-found-a-pet';\nimport {\n  GetServerSidePropsContext,\n  GetServerSidePropsResult,\n  NextPage,\n} from 'next';\nimport { useRouter } from 'next/router';\nimport { ParsedUrlQuery, ParsedUrlQueryInput } from 'querystring';\nimport { useState } from 'react';\n\n/**\n * The form Id is used to identify the form in the MultiPageFormProvider.\n *\n * @constant\n * @type {FormTypes}\n */\nexport const formId: FormTypes = 'i-lost-a-pet';\n\n/**\n * The storage key for the persistent data from the I Lost A Pet Form.\n *\n * @constant\n * @type {FormTypeData}\n */\nexport const iLostAPetStorageKey: FormTypeData = `${formId}-data`;\n\n/**\n * IILostAPetFormFields I Lost a Pet Form Fields Interface\n *\n * @interface\n */\nexport interface IILostAPetFormFields {\n  /**\n   * The address of the pet.\n   *\n   * @memberof IILostAPetFormFields\n   * @member {ILocationDto} address\n   */\n  address: ILocationDto;\n  /**\n   * The date the pet went missing.\n   *\n   * @memberof IILostAPetFormFields\n   * @member {string} [lostDate]\n   */\n  lostDate?: string;\n  /**\n   * The photo object.\n   *\n   * @memberof IILostAPetFormFields\n   * @member [photo]\n   */\n  photo?: {\n    /**\n     * The image objectKey.\n     *\n     * @memberof IILostAPetFormFields.photo\n     * @member {string} objectKey\n     */\n    objectKey: string;\n    /**\n     * The inferred species.\n     *\n     * @memberof IILostAPetFormFields.photo\n     * @member {string} species\n     */\n    species: string;\n  };\n  /**\n   * The cross streets data.\n   *\n   * @memberof IILostAPetFormFields\n   * @member {string} [crossStreets]\n   */\n  crossStreets?: string;\n}\n\n/**\n * Get the search params from the form data and store it in local storage.\n *\n * @param {IILostAPetFormFields} data - The submitted form data\n * @returns {ParsedUrlQueryInput} - The search params\n */\nexport const getSearchParams = (\n  data: IILostAPetFormFields\n): ParsedUrlQueryInput => {\n  iLostAPetStorage.delete(iLostAPetStorageKey);\n  const address = data.address;\n  const { latitude, longitude } = address.coordinates;\n\n  const searchType = 'found';\n\n  let objectKey;\n  let species;\n  let searchData = {};\n\n  if (data.photo && data.photo.species) {\n    objectKey = data.photo.objectKey;\n    species = data.photo.species;\n\n    iLostAPetStorage.set(\n      iLostAPetStorageKey,\n      {\n        place: address,\n        geolocation: { latitude, longitude },\n        species,\n        photo: objectKey,\n        start: data.lostDate,\n        crossStreets: data.crossStreets,\n      },\n      { expires: tomorrow }\n    );\n\n    /** Set the updated form data so it can be used by other workflows */\n    searchData = {\n      species: species.toLowerCase(),\n      photoSearchSpecies: species.toLowerCase(),\n      imageObjectKey: objectKey,\n      latitude,\n      longitude,\n      searchType: searchType,\n      searchRadius: defaultSearchRadius,\n      address: address.label,\n      start: data.lostDate,\n    };\n  } else {\n    iLostAPetStorage.set(\n      iLostAPetStorageKey,\n      {\n        place: address,\n        geolocation: { latitude, longitude },\n        start: data.lostDate,\n        crossStreets: data.crossStreets,\n      },\n      { expires: tomorrow }\n    );\n\n    /** Set the updated form data so it can be used by other workflows */\n    searchData = {\n      latitude,\n      longitude,\n      searchType: searchType,\n      searchRadius: defaultSearchRadius,\n      address: address.label,\n      start: data.lostDate,\n    };\n  }\n\n  iFoundAPetStorage.delete(iFoundAPetStorageKey);\n  iFoundAPetStorage.delete(userDashboardSearchDataKey);\n\n  return searchData;\n};\n\n/**\n * ILostAPet Page Props\n *\n * @interface\n */\ninterface IILostAPetPage {\n  /** The original query params */\n  originalQueryParams: ParsedUrlQuery;\n}\n\n/**\n * I Lost a Pet Form Page\n *\n * @param {IILostAPetPage} {originalQueryParams} - The page props\n * @returns {NextPage} - The I Lost a Pet Form Page\n */\nconst ILostAPetForm: NextPage = ({ originalQueryParams }: IILostAPetPage) => {\n  const router = useRouter();\n  const { setBannerData } = usePersistentBannerContext();\n  const { clearData, updateData } = useEventContext();\n\n  const { pageId, isLoading } = useInitialFormStep(formId, originalQueryParams);\n  const [isSubmitting, setIsSubmitting] = useState(false);\n  const [showTransition, setShowTransition] = useState<boolean>(false);\n\n  /**\n   * On Submit\n   *\n   * @param {IILostAPetFormFields} data - The data from the form\n   * @returns {void}\n   */\n  const onSubmit = (data: IILostAPetFormFields) => {\n    const searchParams = getSearchParams(data);\n    /** Set banner data */\n    const bannerData: CreateAccountBannerProps = {\n      petReportType: 'lost',\n      searchType: data.photo ? 'photo' : 'distance',\n      species: data.photo ? (data.photo.species as PetSpecies) : undefined,\n    };\n    setBannerData('info', bannerData);\n\n    searchParametersStorage.delete(searchParametersStorageKey);\n\n    if (data.photo && data.photo.species) {\n      /** Send the upload photo event to google analytics */\n      uploadPhotoEventHandler({\n        clickText: 'Search for Pet',\n        petStatus: 'Lost',\n        listingSource: 'Consumer Pet Listing',\n        species: data.photo.species as InferredSpecies,\n        locationId: data.address.postalCode,\n      });\n\n      const species = data.photo.species;\n      const petSearchData: EventData = {\n        clickText: 'Continue',\n        petStatus: 'Lost',\n        method: 'Photo',\n        species: capitalizeFirstLetter(species) as SpeciesTypes,\n        locationId: data.address.postalCode,\n      };\n\n      clearData();\n      updateData(petSearchData);\n\n      router.push({\n        pathname: '/photo-search',\n        query: { ...searchParams, ...originalQueryParams },\n      });\n    } else {\n      const petSearchData: EventData = {\n        clickText: 'Search all pets',\n        petStatus: 'Lost',\n        method: 'Distance',\n        locationId: data.address.postalCode,\n      };\n\n      clearData();\n      updateData(petSearchData);\n\n      router.push({\n        pathname: '/search-results',\n        query: { ...searchParams, ...originalQueryParams },\n      });\n    }\n  };\n\n  /**\n   * Handle Submit\n   *\n   * @param {IILostAPetFormFields} data - The data from the form\n   * @returns {Promise<void>}\n   */\n  const handleSubmit = async (data: IILostAPetFormFields) => {\n    setIsSubmitting(true);\n\n    prepareNextdoor({\n      category: 'found',\n      location: {\n        latitude: data.address.coordinates.latitude,\n        longitude: data.address.coordinates.longitude,\n        radius: 5,\n      },\n    });\n\n    // Animate the partner interstitial\n    setTimeout(() => {\n      setShowTransition(true);\n    }, timerPartnerInterstitial);\n\n    // Animate the page transition\n    setTimeout(() => {\n      onSubmit(data);\n    }, timerPartnerInterstitial + timerPageTransition);\n  };\n\n  return (\n    <>\n      {isSubmitting ? (\n        <div className=\"px-6 sm:px-8 md:px-16 h-screen flex items-start justify-center pt-28 sm:pt-40\">\n          <PartnerInterstitial {...partnerInterstitialDefaultValues} />\n\n          {showTransition && <PageTransition duration={timerPageTransition} />}\n        </div>\n      ) : (\n        <MultiPageFormProvider\n          formId={formId}\n          pageId={pageId}\n          renderMode=\"client\"\n        >\n          <Head title=\"I Lost A Pet\" noIndex={true} />\n          <StepperFormTemplate\n            key={pageId}\n            submitFunction={handleSubmit}\n            isLoadingForm={isLoading}\n            originalQueryParams={originalQueryParams}\n          />\n        </MultiPageFormProvider>\n      )}\n    </>\n  );\n};\n\n/**\n * Redirect if the step is not found.\n *\n * @param {GetServerSidePropsContext} context - The context object\n * @returns {GetServerSidePropsResult} - The server side props\n */\nexport const getServerSideProps = async (\n  context: GetServerSidePropsContext\n): GetServerSidePropsResult => {\n  if (lostPages.indexOf(context.query.step) > -1 || !context.query.step) {\n    const originalQueryParams = { ...context.query };\n    delete originalQueryParams.step;\n    return {\n      props: {\n        originalQueryParams,\n      },\n    };\n  }\n  return {\n    notFound: true,\n  };\n};\n\nexport default ILostAPetForm;\n"],"names":["__webpack_exports__","Z","children","from","to","delay","duration","className","param","ref","useRef","controls","useAnimation","inView","useInView","useEffect","start","react_jsx_runtime__WEBPACK_IMPORTED_MODULE_0__","jsx","motion","div","initial","animate","variants","hidden","opacity","visible","scale","translateX","translateY","transition","ease","cubicBezier","icon","label","disabled","onClickAction","buttonClasses","stateClasses","concat","jsxs","button","type","onClick","Icon","size","colorType","colorShade","span","url","classes","analyticsEvent","copied","setCopied","useState","Paragraph","navigator","clipboard","writeText","setTimeout","AnimateItem","borderRadius","getInterstitialDuration","slides","slideDuration","defaultSlideDuration","ZP","bottomCopy","hideProgressBar","index","setIndex","progress","setProgress","logo","useMemo","CdnImage","src","imgPath","alt","text","width","imgWidth","height","imgHeight","length","interval","setInterval","nextIndex","clearInterval","newProgress","section","twMerge","styling","bottomText","ProgressBar","percentage","partnerInterstitialDefaultValues","generateImageUrl","noPartnerInterstitialMicrochipSearch","noPartnerInterstitialMicrochipMatch","partnerInterstitialMicrochipSearch","partnerInterstitialMicrochipMatch","iconColorsAndShades","facebook","color","focused","normal","shade","nextdoor","focusClasses","activeClasses","SocialMediaButton_SocialMediaButton","hovered","setHovered","setFocused","buttonBaseFont","iconColors","iconShades","jsx_runtime","onFocus","onBlur","onMouseEnter","onMouseLeave","callToActionSegment","flyerAnalytics","petId","petInfo","getPetDetails","flyerEvent","clickText","petName","name","undefined","petStatus","getPetStatusForAnalytics","listingSource","species","getPetSpeciesForAnalytics","locationId","location","zip","viewFlyerEventHandler","ShareThisPet_ShareThisPet","city","isOwner","petSpecies","shelterName","state","typeKey","date","encodedString","setEncodedString","encodedUrl","setEncodedUrl","selectEncodeString","encodeUrl","shareUrl","getPetUrlPath","getBaseUrl","id","listingType","lostUserPetNextdoorCopy","alertSegment","toUpperCase","petMissingSegment","petLinkSegment","repostSegment","foundUserPetNextdoorCopy","foundShelterPetNextdoorCopy","encodeURIComponent","buttonLinkHandler","window","open","flyerButtonClickHandler","getBasePath","sendShareEvent","shareEventHandler","method","contentType","nextDoorShareUrl","hashTags","toLowerCase","Heading","font","SocialMediaButton","CircleButton","LinkCopy","reactivateUserPet","authToken","userId","response","sdk","userReactivatePet","contextId","reactivate","error","searchButtonChildren","userDashboardSearchDataKey","DashPet_DashPet","me","petPhoto","petType","petLostOrFoundAt","petDeactivatedAt","previousLostOrFound","coordinates","address","facebookPosts","router","useRouter","clearData","updateData","setInitiatingComponent","useEventContext","isReactivating","setIsReactivating","idToken","useMe","user","displayToast","saveToastToStorage","useToast","reportAsSafeProps","variant","href","reportAsReunitedProps","searchRadius","String","defaultSearchRadius","searchButtonProps","petSearchFlow","initiatingComponent","startPetSearchEventHandler","component","flow","searchEventData","storage","LocalStorage","set","place","region","postalCode","capitalizeFirstLetter","split","expires","tomorrow","delete","iFoundAPetStorageKey","iLostAPetStorageKey","push","getSearchButtonQueryString","searchParams","URLSearchParams","append","latitude","longitude","toString","reactivatePetButtonProps","loading","then","reload","catch","buttonProps","isLostOrFound","isInactivePet","fireViewPetFlyerEvent","petSpeciesForShareEvent","PageWrapper","layout","objectFit","maybeAddInactiveClasses","sizes","PetStatus","status","lostOrFoundAt","deactivatedAt","Fragment","Button","clsx","Divider","ListButton","dataTestid","target","map","React","post","postId","Link","ShareThisPet","dateToMonthDDYYYY","statusLabel","includes","defaultSearchRadiusIndex","petcoLoveHQCoordinates","timerPageTransition","timerPartnerInterstitial","prepareNextdoor","data","nextdoorPrepare","prepare","defaultValidPetTypes","validPetTypes","pet","petDetails","details","validStatus","defaultExpirationDate","AnalyticsEventStorage","analyticsEventStorage","analyticsEventStorageKey","initiatingComponentKey","get","getInitiatingComponent","EventContext","createContext","getData","notApplicableString","getPetId","EventContextProvider","useCallback","storedData","currentData","newData","Provider","value","useContext","useInitialFormStep","formId","originalQueryParams","isLoading","setIsLoading","firstPage","configurations","order","stepId","query","step","isReady","replace","pageId","searchParametersStorageKey","searchParametersStorage","searchParameters","_setSearchParameters","articleSlugNames","setArticlesSlugNames","setSearchParameters","searchParametersFromStorage","getArticlesSlugNames","storedSearchType","searchType","slugNames","lostSearchArticleSlugNames","foundSearchArticleSlugNames","getSearchParamsReverseGeocode","reverseGeocodeData","getReverseGeocode","reverseGeocode","ReverseGeocode","clearSearchParameters","localStorage","buildToastPayload","message","persistent","showIcon","dispatch","useToastContext","toast","totalUnread","userEntityId","conversations","conversationsTotalUnread","read","UserContext","hasMessage","userType","isFetchingUser","isLoggedIn","isShelter","unreadMessageCount","fetchingUnreadMessageCount","getUnreadMessagesForUser","setUnreadMessageCount","UserContextProvider","isError","errorMessage","setFetchingUnreadMessageCount","awos","unread","useUserContext","uploadPhotoEventHandler","eventData","click_text","items","pet_id","pet_name","pet_status","listing_source","location_id","defaultEventEmitter","handleEvent","content_type","getShareEventDataFromPetListing","petListing","_helpers_stringHelpers_capitalizeFirstLetter__WEBPACK_IMPORTED_MODULE_2__","month","Date","toLocaleDateString","timeZone","day","year","isInactive","inactiveClasses","str","slice","getSearchParams","objectKey","iFoundAPetStorage","searchData","photo","geolocation","crossStreets","photoSearchSpecies","imageObjectKey","iLostAPetStorage","setBannerData","usePersistentBannerContext","isSubmitting","setIsSubmitting","showTransition","setShowTransition","onSubmit","bannerData","petReportType","petSearchData","pathname","PartnerInterstitial","PageTransition","MultiPageFormProvider","renderMode","Head","title","noIndex","StepperFormTemplate","submitFunction","category","radius","isLoadingForm","lostDate","handleSubmit"],"sourceRoot":""}