PageSourceSearch

https://corporate.gwp-cdn.elanco.com/08bddf7d35eb0fd4effa35dc7e547…/%5B%5B...slug%5D%5D-2cf892c574cceee3.js

js elanco.com collected 2026-09-24 08:42:18 UTC 736,809 bytes, 2 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[243],{5840:e=>{e.exports={CountryDropdownMenu:"countryDropdown_CountryDropdownMenu__5X2y0",Open:"countryDropdown_Open__gsOe4",CountryDropdownMenuItemActive:"countryDropdown_CountryDropdownMenuItemActive__cGsNf",CountryDropdownMenuFirstLevel:"countryDropdown_CountryDropdownMenuFirstLevel__el2HP",CountryDropdownMenuSecondLevel:"countryDropdown_CountryDropdownMenuSecondLevel__svu8E",CountryDropdownMenuFlag:"countryDropdown_CountryDropdownMenuFlag__3g4nM",CountryDropdownMenuSecondLevelLinksContainer:"countryDropdown_CountryDropdownMenuSecondLevelLinksContainer__9qvty",CountryDropdownMenuSecondaryLink:"countryDropdown_CountryDropdownMenuSecondaryLink__UqZiC"}},7075:e=>{e.exports={"slick-slider":"slickSlider_slick-slider__Gdlv4","slick-list":"slickSlider_slick-list__mPLZR",dragging:"slickSlider_dragging__ZpMOB","slick-track":"slickSlider_slick-track__Q_1x0","slick-loading":"slickSlider_slick-loading___ZUfe","slick-slide":"slickSlider_slick-slide__HM87H","slick-initialized":"slickSlider_slick-initialized__AbirE","slick-vertical":"slickSlider_slick-vertical__ub4Sp","slick-arrow":"slickSlider_slick-arrow__82s0j","slick-hidden":"slickSlider_slick-hidden__INTn0","slick-prev":"slickSlider_slick-prev__pRx9j","slick-next":"slickSlider_slick-next__xpzel",dark:"slickSlider_dark__muNNG","slick-dots":"slickSlider_slick-dots__NHnBG","slick-active":"slickSlider_slick-active__S8JO0","slick-slider--dark-mode":"slickSlider_slick-slider--dark-mode__5xHKM"}},14302:e=>{e.exports={crumb:"breadcrumbs_crumb__n_It7",wrapper:"breadcrumbs_wrapper__ao4o8"}},15060:e=>{e.exports={skipToMainContent:"skip-to-main-content_skipToMainContent__L9ZiW",hidden:"skip-to-main-content_hidden__pDgQM",visible:"skip-to-main-content_visible__t3g3D"}},19376:e=>{e.exports={"arrow-overlap":"steps_arrow-overlap__Z64ir",StepContainer:"steps_StepContainer__7_I7L"}},21272:(e,t,l)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/[[...slug]]",function(){return l(94593)}])},25735:e=>{e.exports={tabsStack:"tabbed_content-block_tabsStack__R8WzN","keys-block":"tabbed_content-block_keys-block__Qjreb","keys-container":"tabbed_content-block_keys-container__vVqTl","phase-overview":"tabbed_content-block_phase-overview__yAskp","overview-cards-container":"tabbed_content-block_overview-cards-container__kgyDC","pipeline-cards-container":"tabbed_content-block_pipeline-cards-container__nkeHp",tabsScroll:"tabbed_content-block_tabsScroll__3bnRI",tab:"tabbed_content-block_tab__6GSpQ",indicator:"tabbed_content-block_indicator__xRvdh",panel:"tabbed_content-block_panel__J_gFz",panelNoOverflow:"tabbed_content-block_panelNoOverflow__m_lv9",pipeCard:"tabbed_content-block_pipeCard__I234x",tabContent:"tabbed_content-block_tabContent__emqtu",inactiveTab:"tabbed_content-block_inactiveTab__hoygP"}},26237:e=>{e.exports={interactiveItem:"InteractiveList_interactiveItem__o8Z6e",active:"InteractiveList_active__6_PC3",blur:"InteractiveList_blur___SjSc",NavCarousel:"InteractiveList_NavCarousel__tZ5_v",MainSlider:"InteractiveList_MainSlider__QdgN2"}},29388:e=>{e.exports={"slick-slider":"SlickSlider_slick-slider__RxHjb","slick-list":"SlickSlider_slick-list__B3pMA",dragging:"SlickSlider_dragging__L0IWZ","slick-track":"SlickSlider_slick-track__3vlm8","slick-loading":"SlickSlider_slick-loading__2V2b4","slick-slide":"SlickSlider_slick-slide__zG_CS","slick-initialized":"SlickSlider_slick-initialized__Yy0gh","slick-vertical":"SlickSlider_slick-vertical__TsHzx","slick-arrow":"SlickSlider_slick-arrow__Xc5gn","slick-hidden":"SlickSlider_slick-hidden__ZBZJ5","slick-prev":"SlickSlider_slick-prev__DEIAE","slick-next":"SlickSlider_slick-next__7Sy1D",dark:"SlickSlider_dark__2lIqr","slick-dots":"SlickSlider_slick-dots__ZgKzT","slick-active":"SlickSlider_slick-active__md5Gi","slick-slider--dark-mode":"SlickSlider_slick-slider--dark-mode__fkn1I"}},35407:e=>{e.exports={shareBlockShowOnHover:"ShareBlock_shareBlockShowOnHover__014ca",noText:"ShareBlock_noText__rXV6_",mediumIconSize:"ShareBlock_mediumIconSize__mZA_Q"}},37472:e=>{e.exports={quoteSlider:"quote-slider_quoteSlider__LWBpJ",largeMode:"quote-slider_largeMode__PHBwj",dark:"quote-slider_dark__L3XdK"}},43605:e=>{e.exports={cardCarousel:"dynamicCardsLister_cardCarousel__l9PXC",customNav:"dynamicCardsLister_customNav__4Qr_A",rangeBar:"dynamicCardsLister_rangeBar__WVvHp",seekBar:"dynamicCardsLister_seekBar__RlXB_"}},47624:(e,t,l)=>{"use strict";l.d(t,{l:()=>s});var n=l(71041);let a={width:void 0,height:void 0,isMobile:!1,isTablet:!1},s=()=>
1{let[e,t]=(0,n.useState)(a);return(0,n.useEffect)(()=>{let e=()=>{t({width:window.innerWidth,height:window.innerHeight,isMobile:window.innerWidth<768,isTablet:window.innerWidth>=768&&window.innerWidth<1024})};return e(),window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}},[]),e}},48768:e=>{e.exports={nav:"navigation_nav__6B27C",open:"navigation_open__zBoWX",selected:"navigation_selected__XSy9e",subNavButton:"navigation_subNavButton__N04JW",mainNavListItem:"navigation_mainNavListItem__BXHNd",subNavListItem:"navigation_subNavListItem__GiVLb",subNavChevron:"navigation_subNavChevron__zKZ7j"}},50364:e=>{e.exports={"slick-slider":"slick-slider_slick-slider__QMRTR","slick-list":"slick-slider_slick-list__2tqR_",dragging:"slick-slider_dragging__Z4BUG","slick-track":"slick-slider_slick-track__Ewv_X","slick-loading":"slick-slider_slick-loading__hMDv2","slick-slide":"slick-slider_slick-slide__dDgj0","slick-initialized":"slick-slider_slick-initialized__QyU0d","slick-vertical":"slick-slider_slick-vertical__PosQ4","slick-arrow":"slick-slider_slick-arrow__ytC_j","slick-hidden":"slick-slider_slick-hidden__qZzz7","slick-prev":"slick-slider_slick-prev__Za_iq","slick-next":"slick-slider_slick-next__6ztrT",dark:"slick-slider_dark___xfKq","slick-dots":"slick-slider_slick-dots__OQR0E","slick-active":"slick-slider_slick-active__ER419","slick-slider--dark-mode":"slick-slider_slick-slider--dark-mode__U2JoB"}},54970:e=>{e.exports={input:"map-filter_input__ORw5h"}},58875:e=>{e.exports={"full-width":"row_full-width__JFLUh","seventy-thirty":"row_seventy-thirty__Zdaij","thirty-seventy":"row_thirty-seventy__BEwXZ","fifty-fifty":"row_fifty-fifty__tITmc","flex-reverse":"row_flex-reverse__Du_An","fifty-fifty-gap":"row_fifty-fifty-gap__n50I_"}},61545:e=>{e.exports={Thumbnails:"ImageGallery_Thumbnails__nio4S",ImageGalleryWithPagination:"ImageGallery_ImageGalleryWithPagination__OdTfW"}},62518:e=>{e.exports={HeaderBlockCarousel:"HeaderBlockWithCarousel_HeaderBlockCarousel__UPOTo"}},79752:e=>{e.exports={bullets:"bullet_bullets__AWi27"}},90737:e=>{e.exports={sliderContainer:"media-slider_sliderContainer__fi7ZJ"}},94593:(e,t,l)=>{"use strict";l.r(t),l.d(t,{__N_SSP:()=>i7,default:()=>i8});var n=l(74429),a=l(45867),s=l(71041);let r=e=>{let[t,l]=(0,s.useState)(""),[a,r]=(0,s.useState)("");(0,s.useEffect)(()=>
1{l(window.location.origin),r(window.location.pathname)},[]);let i="http://".concat(e.previewData.previewUrl,"&slug=").concat(a),o="Share URL",[c,d]=(0,s.useState)(o);return(0,s.useEffect)(()=>{let e=setTimeout(()=>{d(o)},2500);return()=>{clearTimeout(e)}},[c]),(0,n.jsx)(n.Fragment,{children:e.isInPreviewMode?(0,n.jsx)("div",{className:"banner_top fixed left-0 right-0 top-0 z-50 w-full bg-primary p-1 opacity-75","data-testid":"preview-banner",style:{height:"40px",maxHeight:"150px",zIndex:"9999"},children:(0,n.jsxs)("div",{className:"flex h-full flex-row items-center justify-center",children:[(0,n.jsxs)("div",{className:"absolute right-0 px-5 py-0 text-center text-base text-white",children:[(0,n.jsx)("button",{className:"mr-6 hidden h-7 items-center border-2 border-solid px-2 outline outline-1 outline-offset-2 md:inline-block","data-testid":"share-url-button",onClick:()=>{navigator.clipboard.writeText(i),d("URL Copied To Clipboard")},type:"button",children:(0,n.jsx)("span",{className:"pb-1.5","data-testid":"share-url-button-label",children:c})}),(0,n.jsx)("a",{className:"ml-2","data-testid":"exit-anchor",href:"".concat(t,"/api/preview/exit-preview"),children:(0,n.jsx)("strong",{children:"X"})})]}),(0,n.jsx)("div",{className:"flex h-full flex-col items-center justify-center md:flex-row",children:(0,n.jsx)("div",{className:"flex flex-col items-center sm:mr-5 sm:flex-row",children:(0,n.jsx)("h4",{className:"my-0 uppercase text-white sm:mr-5","data-testid":"preview-mode",children:"Preview Mode"})})})]})}):(0,n.jsx)(n.Fragment,{})})};var i=l(97393),o=l(83793),c=l(79281);let d="my-12 md:my-16",m={default:"my-6 md:my-8",top:"mt-6 md:mt-8",bottom:"mb-6 md:mb-8",none:"my-0 py-0"},u={default:"py-12 md:py-16",top:"pt-12 md:pt-16",bottom:"pb-12 md:pb-16",none:"my-0 py-0"};var h=l(71791);let p=e=>{var t,l,a,s,r,o,d,u;let{block:p,BlockMapper:x,page:f,className:g,richTextRendererClassName:v,...b}=e,y=m[null!=(d=null==(t=p.elements.snippetSpacingSpacing[0])?void 0:t.codename)?d:"none"],j=null!=(u=null==(l=p.elements.snippetContainerResize[0])?void 0:l.codename)?u:null,w=(0,h.As)(j||"none","w-full"),N=e=>{switch(e){case"left":return"text-left";case"center":default:return"text-center";case"right":return"text-right";case"justify":return"text-justify"}},_=N(null==(a=p.elements.textAlignment[0])?void 0:a.codename),k=N(null==(s=p.elements.tableTextAlignment[0])?void 0:s.codename),C=Array.isArray(p.elements.stretchImageFullWidthLargeScreens)&&(null==(r=p.elements.stretchImageFullWidthLargeScreens[0])?void 0:r.codename)==="yes"?"2xl:w-full":"";return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("div",{className:(0,i.$)("flex flex-col",y,w,_,g),"data-kontent-element-codename":"content",style:{overflowWrap:"break-word"},children:(0,n.jsx)(c.rM,{BlockMapper:x,className:v,element:p.elements.content,page:f,stretchImageFullWidth:C,tableTextAlignment:k,...b})}),(null==(o=p.elements.showTextDivider[0])?void 0:o.codename)==="yes"?(0,n.jsx)("hr",{className:"mt-6 border border-gray-300","data-kontent-element-codename":"show_text_divider"}):null]})};var x=l(14779),f=l.n(x);let g=(e,t)=>e&&"<p><br></p>"!==e?e:t;var v=l(10819),b=l(96607),y=l(83226),j=l(50042);let w=e=>
1{let t,[l,a]=(0,s.useState)(),{getSubTheme:r}=(0,y.r)();(0,s.useEffect)(()=>{a(r().background)},[r]);let{as:i="a",children:o,className:c="",disabled:d=!1,href:m,iconSize:u,iconText:h="",noIconAnimation:p=!1,onClick:x,size:f="md",tabIndex:g="",target:v,title:b="",type:w="button",variant:N="primary"}=e,_=(0,j.C)(e),{icon:k}=e,C="";k&&"object"==typeof k&&"icon"in k&&(C=p?"":"btn-".concat(k.class),k=k.icon);let S={lg:"w-24 h-24",md:"w-12 h-12",sm:"w-8 h-8"},L=S[f]||f||S.md,T={lg:"w-12 h-12",md:"w-4 h-4"},I=u||T[f]||T.md;k&&(t=(0,s.cloneElement)(k,{className:"".concat(k.props.className||""," block fill-current overflow-visible ").concat(I),..."svg"===k.type&&{focusable:!1},key:k.key}));let E={href:m};if(v&&(E.target=v),g&&(E.tabIndex=g),"button"===i&&(E={disabled:d,type:w}),o&&(void 0===_["data-btn-id"]||""===_["data-btn-id"])){let e="";if(Array.isArray(o))e=o.map(e=>e.type?e.props.children:e).join("").replace(/,/g,"-");else if((0,s.isValidElement)(o)){let t=o.props.children;e="string"==typeof t?t:""}else"string"==typeof o&&(e=o);_["data-btn-id"]=e.split(" ").join("-")}return(0,n.jsx)(i,{...E,..._,"aria-label":((e,t)=>e||("string"==typeof t?t:Array.isArray(t)?t.map(e=>"string"==typeof e?e:(0,s.isValidElement)(e)&&"string"==typeof e.props.children?e.props.children:"").join(" ").trim()||void 0:(0,s.isValidElement)(t)&&"string"==typeof t.props.children?t.props.children:void 0))(b,o),className:"btn btn-ellipse ".concat(C," ").concat(l||({danger:"bg-red-500 hover:bg-red-600",inverted:"bg-none border-2 text-primary border-primary hover:bg-primary hover:text-white",primary:"bg-theme-main text-white hover:bg-theme-highlight focus:bg-secondary",secondary:"text-black border-2 border-black hover:bg-black hover:text-white ",tertiary:"bg-white text-theme-main shadow-sm",pet_primary_green:"bg-green-600 hover:bg-green-600 border-2 border-green-600 text-white"})[N]," ").concat(L," inline-block cursor-pointer overflow-hidden rounded-full font-bold text-white\n        focus:bg-secondary ").concat(c,"\n        ").concat(d&&"a"===i?"disabled":""),onClick:x,title:b,children:(0,n.jsxs)("span",{className:"flex h-full w-full flex-col items-center justify-center",children:[t,h?(0,n.jsx)("span",{className:"text-sm",style:{textAlign:"center"},children:h}):null]})})};var N=l(35407),_=l.n(N);let k=e=>{let{title:t,className:l,showOnHover:a,facebookShareUrl:r,twitterShareUrl:o,linkedinShareUrl:c,mailSubject:d,mailBody:m,mailLink:u,mailLinkToggle:h="no",ellipseColor:p,ellipseHoverColor:x,sharetitle:f,iconSize:g="sm",hasAuthor:v}=e,[y,j]=(0,s.useState)(null),[N,k]=(0,s.useState)(""),C=(0,s.useCallback)(()=>{y&&y.classList.add("focus")},[y]),S=(0,s.useCallback)(()=>{y&&y.classList.remove("focus")},[y]),L=e=>{(0,b.d)({event:"share",method:e,url:window.location.href})};(0,s.useEffect)(()=>{k(window.location.href),j(document.querySelector(".".concat(_().shareBlockShowOnHover)));let e=document.querySelectorAll(".".concat(_().shareBlockShowOnHover," .js-social-link"));return e.forEach(e=>{e.addEventListener("focus",C),e.addEventListener("blur",S)}),()=>{e.forEach(e=>{e.removeEventListener("focus",C),e.removeEventListener("blur",S)})}},[C,S]);let T=t.length>0,I="";return"md"===g&&_().mediumIconSize&&(I=_().mediumIconSize),(0,n.jsx)("div",{className:(0,i.$)(l),children:(0,n.jsxs)("div",{className:a?"".concat(_().shareBlockShowOnHover," ").concat(I," ").concat(T?"":_().noText):"flex items-center ".concat(v?"":"justify-end"),children:[(0,n.jsx)("p",{className:"text-md ".concat(_().shareBlockShowOnHover?T?"mr-0":"mr-10":"mr-2"),children:t||"Share on"}),(0,n.jsxs)("ul",{className:"flex p-0 text-primary",children:[a?(0,n.jsx)("li",{className:"shrink-0",children:(0,n.jsx)(w,{className:"mr-2 ".concat(p," hover:").concat(x," pointer-events-none"),href:"",icon:(0,n.jsx)("svg",{height:"24.957",viewBox:"0 0 21.837 24.957",width:"21.837",children:(0,n.jsx)("path",{d:"M17.158,15.6a4.659,4.659,0,0,0-2.914,1.019l-5-3.122a4.706,4.706,0,0,0,0-2.032l5-3.122A4.671,4.671,0,1,0,12.589,5.7l-5,3.122a4.679,4.679,0,1,0,0,7.322l5,3.122A4.68,4.68,0,1,0,17.158,15.6Z",fill:"#fff"})}),iconSize:"h-6 w-6",title:"share",children:"Share"})}):null,(0,n.jsx)("li",{className:"mr-1 shrink-0",children:(0,n.jsx)("a",{className:"js-social-link",href:"https://www.facebook.com/sharer/sharer.php?kid_directed_site=0&u=".concat(r.length>0?r:N,"&display=popup&ref=plugin&src=share_button"),onClick:()=>{L("Facebook")},rel:"noreferrer",target:"_blank",title:"Share on Facebook",children:(0,n.jsx)("svg",{className:"m-auto h-5 fill-current",height:"32.748",viewBox:"0 0 15.115 32.748",width:"15.115",children:(0,n.jsx)("path",{d:"M60.73,87.464H57.161c-1.26,0-1.523.516-1.523,1.819v3.149H60.73l-.49,5.528h-4.6v16.514H49.044V98.031H45.615v-5.6h3.429V88.025c0-4.137,2.213-6.3,7.119-6.3H60.73v5.738Z",transform:"translate(-45.615 -81.727)"})})})}),(0,n.jsx)("li",{className:"mx-1 shrink-0",children:(0,n.jsx)("a",{className:"js-social-link",href:"https://twitter.com/share?url=".concat(o.length>0?o:N),rel:"noreferrer",target:"_blank",title:"Share on Twitter",children:(0,n.jsx)("svg",{className:"m-auto h-5 fill-current",height:"24.612",viewBox:"0 0 1200 1227",width:"30.285",children:(0,n.jsx)("path",{d:"M714.163 519.284L1160.89 0H1055.03L667.137 450.887L357.328 0H0L468.492 681.821L0 1226.37H105.866L515.491 750.218L842.672 1226.37H1200L714.137 519.284H714.163ZM569.165 687.828L521.697 619.934L144.011 79.6944H306.615L611.412 515.685L658.88 583.579L1055.08 1150.3H892.476L569.165 687.854V687.828Z"})})})}),(0,n.jsx)("li",{className:"mx-1 shrink-0",children:(0,n.jsx)("a",{className:"js-social-link",href:"https://www.linkedin.com/sharing/share-offsite/?url=".concat(c.length>0?c:N),rel:"noreferrer",target:"_blank",title:"Share on LinkedIn",children:(0,n.jsx)("svg",{className:"m-auto h-5 fill-current",height:"26.464",viewBox:"0 0 26.452 26.464",width:"26.452",children:(0,n.jsx)("path",{d:"M421.615,96.922h5.461v17.643h-5.461Zm2.7-2.31a3.255,3.255,0,1,0-3.229-3.255A3.243,3.243,0,0,0,424.319,94.612ZM435.806,105.3c0-2.481,1.142-3.958,3.327-3.958,2.009,0,2.974,1.417,2.974,3.958v9.261h5.435V103.394c0-4.725-2.678-7.01-6.419-7.01a6.153,6.153,0,0,0-5.317,2.915V96.922h-5.238v17.643h5.238Z",transform:"translate(-421.09 -88.101)"})})})}),"no"!==h&&(0,n.jsx)("li",{className:"ml-2 shrink-0 cursor-pointer",children:(0,n.jsx)("span",{className:"js-social-link",onClick:()=>{navigator.clipboard.writeText(u)},title:f||"share via URL",children:(0,n.jsx)("svg",{className:"m-auto h-5 fill-current",height:"50.32",viewBox:"0 0 44.03 50.32",width:"44.03",children:(0,n.jsx)("path",{d:"M34.6,31.44c-2.14-0.01-4.21,0.72-5.88,2.05l-10.07-6.3c0.3-1.35,0.3-2.75,0-4.1l10.07-6.3c4.07,3.24,10,2.56,13.23-1.51s2.56-10-1.51-13.23s-10-2.56-13.23,1.51c-1.77,2.22-2.44,5.13-1.82,7.9l-10.07,6.3c-4.08
1-3.25-10.01-2.57-13.26,1.51s-2.57,10.01,1.51,13.26c3.44,2.74,8.31,2.74,11.75,0l10.07,6.3c-1.14,5.09,2.07,10.13,7.15,11.27c5.09,1.14,10.13-2.07,11.27-7.15c1.14-5.09-2.07-10.13-7.15-11.27C35.98,31.52,35.29,31.44,34.6,31.44z"})})})}),d.length>0&&(0,n.jsx)("li",{className:"ml-2 shrink-0",children:(0,n.jsx)("a",{className:"js-social-link",href:"mailto:?subject=".concat(d,"&body=").concat(m),onClick:()=>{L("Email")},rel:"noreferrer",target:"_blank",title:"Share via Email",children:(0,n.jsx)("svg",{className:"m-auto h-5 fill-current",viewBox:"0 0 1792 1792",xmlns:"http://www.w3.org/2000/svg",children:(0,n.jsx)("path",{d:"M1792 710v794q0 66-47 113t-113 47h-1472q-66 0-113-47t-47-113v-794q44 49 101 87 362 246 497 345 57 42 92.5 65.5t94.5 48 110 24.5h2q51 0 110-24.5t94.5-48 92.5-65.5q170-123 498-345 57-39 100-87zm0-294q0 79-49 151t-122 123q-376 261-468 325-10 7-42.5 30.5t-54 38-52 32.5-57.5 27-50 9h-2q-23 0-50-9t-57.5-27-52-32.5-54-38-42.5-30.5q-91-64-262-182.5t-205-142.5q-62-42-117-115.5t-55-136.5q0-78 41.5-130t118.5-52h1472q65 0 112.5 47t47.5 113z"})})})})]})]})})},C={none:"h-auto w-auto",xs:"h-[35px] w-[35px] border-3",sm:"h-[55px] w-[55px] border-3",md:"h-20 w-20 border-[5px]",lg:"h-[120px] w-[120px] border-[7px]",xxs:"undefined"},S=e=>{let{boldTitle:t=!1,children:l,className:a="",noBackground:r=!1,noBorder:o=!1,noShadow:c=!1,showSquareIcon:d=!1,size:m="lg",title:u="",iconCustomClasses:h,borderHexColor:p}=e,x=(0,s.cloneElement)(l,{className:l.props.className||"w-full"}),f=(0,i.$)("text-theme-highlight flex items-center justify-center overflow-hidden [&>img]:mb-0",r?"bg-transparent":"bg-white",c?null:"shadow-secondary",o?"border-none":"border-theme-main",d?null:"rounded-[50%]",C[m],null!=h?h:null);return(0,n.jsxs)("div",{className:(0,i.$)("flex flex-col items-center",a),children:[(0,n.jsx)("div",{className:f,style:p?{borderColor:p}:void 0,children:x}),u?(0,n.jsx)("div",{className:(0,i.$)("mb-4 mt-6 w-full text-center leading-tight",t?"font-bold":"font-normal"),children:u}):null]})},L=e=>{let{className:t="",title:l=null,authorImage:a=null,postedByText:s=null,shareBlock:r=null}=e,i=a||s;return(0,n.jsxs)("div",{className:t,children:[l?(0,n.jsx)("h1",{className:"mb-3 text-3xl md:text-4xl",children:l}):null,(0,n.jsxs)("div",{className:"".concat(i?"justify-between":"justify-end"," mb-6 items-center md:flex"),children:[i?(0,n.jsxs)("div",{className:"flex items-center",children:[a?(0,n.jsx)(S,{className:"mr-4",noBorder:!0,noShadow:!0,size:"sm",children:a}):null,s?(0,n.jsx)("p",{className:"text-sm",children:s}):null]}):null,r?(0,n.jsx)("div",{className:"ml-6 text-right",children:r}):null]})]})};var T=l(47624);let I=e=>e.trim().replace(/\s+/g,"-").toLowerCase(),E=e=>{let{anchorLink:t="",classNames:l="",scrollMarginTop:a={desktop:"8rem",mobile:"4rem"}}=e,r=(0,T.l)(),{desktop:i,mobile:o}=a,c=I(t);return(0,s.useEffect)(()=>{if(!c)return;let e=globalThis.window.requestAnimationFrame(()=>{let e=I(function(e){try{return decodeURIComponent(e)}catch(t){return e}}(globalThis.window.location.hash.replace(/^#/,"")));if(!e||e!==c)return;let t=document.getElementById(c);t&&t.scrollIntoView({behavior:"smooth",block:"start"})});return()=>{globalThis.window.cancelAnimationFrame(e)}},[c]),(0,n.jsx)("div",{className:"invisible h-0 w-0 ".concat(l),id:c,style:{scrollMarginTop:r.isMobile?o:i}})};var A=l(48013),F=l(97286),B=l.n(F);let M=e=>{let{aligned:t="left",bgColor:l="",children:a,className:r="",image:i,isExternalLink:o=!1,metaBlockHref:c}=e,d=(0,n.jsxs)("div",{className:"text-white ".concat(l||"bg-theme-main"," inline-flex items-center justify-center px-4 py-2 text-center ").concat("left"===t?"rounded-br-lg":"rounded-bl-lg md:rounded-tr-lg"," "),style:{minWidth:"120px"},children:[i?(0,n.jsx)("span",{className:"mr-4 inline-block",children:(0,s.cloneElement)(i,{className:"".concat(i.props.className," inline-block fill-current")})}):null,a]});return(0,n.jsx)("div",{className:r,children:c?(0,n.jsx)("a",{href:c,rel:"noreferrer",target:o?"_blank":"_self",children:d}):d})};var P=l(70875);let D=e=>{let t,{as:l="a",children:a,className:r="",href:i,target:o,variant:c="primary",noIconAnimation:d=!1,onClick:m,disabled:u=!1,type:h="button",title:p=""}=e,{icon:x}=e,f=(0,j.C)(e),g="";x&&"object"==typeof x&&"icon"in x&&(g=d?"":"btn-".concat(x.class),x=x.icon,t=(0,s.cloneElement)(x,{className:"".concat(x.props.className||""," text-theme-highlight inline-block mr-2 fill-current overflow-visible")}));let v={href:i};
1if(o&&(v.target=o),"button"===l&&(v={type:h,disabled:u}),a&&(void 0===f["data-btn-id"]||""===f["data-btn-id"])){let e="";if(Array.isArray(a))e=a.map(e=>"string"==typeof e?e:e.props.children||"").join("").replace(/,/g,"-");else if((0,s.isValidElement)(a)){let t=a.props.children;e="string"==typeof t?t:""}else"string"==typeof a&&(e=a);f["data-btn-id"]=e.split(" ").join("-")}return(0,n.jsxs)(l,{...v,...f,"aria-label":p,className:"text-btn ".concat(g," ").concat({primary:"text-primary hover:text-primary-dark",secondary:"text-blue-900 hover:text-blue-800",none:""}[c]," cursor-pointer text-xs font-bold italic underline hover:no-underline focus:text-secondary focus:no-underline focus:outline-none ").concat(r),onClick:m,title:p,children:[t,a]})},R={default:"en-gb",en_gb:"en-gb",us:"en-us",au:"en-au",nl:"nl-nl",dk:"da-dk",se:"sv-se",ru:"ru-ru",it:"it-it",en_ca:"en-ca",fr_ca:"fr-ca",fr:"fr-fr",hu:"hu-hu",de:"de-de",br:"pt-br",es:"es-es",mx:"es-mx",pl:"pl-pl",ar:"es-ar",at:"de-at",nl_be:"nl-be",fr_be:"fr-be",cn:"zh-cn",cl:"es-es",co:"es-es",cz:"cs-cz",jp:"ja-jp",pt:"pt-pt",ua:"ru-ua",nz:"en-gb",sa:"en-za",th:"th-th",fi:"fi-fi",no:"no-no",tr:"tr-tr",hr:"hr-hr",testing:"en-gb",null:"en-gb"},q={SER_Dog_Product:8,SER_Cat_Product:8,AXD_Cat_Product:2},z=e=>{var t;return null!=(t=e.replace(/^\//,"").split(/[/?#]/)[0])?t:""},O=(e,t)=>z(e)===t,U=(e,t)=>e.startsWith("/")&&z(e)===t,$=(e,t)=>{let l=e.trim(),n=RegExp("^(?:[a-z+]+:)?//","i").test(l),a=Object.keys(R);return""===l?l:"/"===l?"/".concat(t):["mailto:","tel:","sms:","#"].some(e=>l.startsWith(e))||n||U(l,t)?l:!l.startsWith("/")&&!O(l,t)&&a.some(e=>O(l,e))||!l.startsWith("/")&&O(l,t)?"/".concat(l):l.startsWith("/")||O(l,t)?l.startsWith("/")&&!U(l,t)&&a.some(e=>U(l,e))?l:"/".concat(t).concat(l):"/".concat(t,"/").concat(l)};var H=l(85285),V=l(75916);let Z={beige:"#D5C4AF",black:"#000000",dark:"#1a1a1a",light:"#f5f5f5",none:"transparent",gray:"#9CA3AF"};function G(e){var t,l,n;let{blockColor:a,blockColorLegacy:s,pageConfig:r,fallbackColorId:i,fallbackHexColor:o}=e,c=function(e,t){if("string"==typeof e&&e)return e;if(Array.isArray(t)&&t.length>0){var l,n;return null!=(n=null==(l=t[0])?void 0:l.codename)?n:null}return null}(a,s),d=r?(0,h.rw)(r):null,m=r?(0,h.QT)(r):null,u=c||d||m||i,p=u?(0,V.ps)(u)||(0,V.oU)(u):void 0,x=null!=(l=null!=(t=null==p?void 0:p.id)?t:u)?l:null,f=null;if(x){let e=(0,V.f3)(x);f=e||(x in Z?null!=(n=Z[x])?n:null:null!=o?o:null)}else f=null!=o?o:null;let g=null!==x&&!p&&x in Z,v=x&&!g?"bg-".concat(x):null;return{colorId:x,hexCode:f,bgClass:v}}let W="https://elanco.local",K=["secret","slug"];function Y(e){try{let t=new URL(e,W).searchParams;K.forEach(e=>{t.delete(e)});let l=t.toString();return l?"?".concat(l):""}catch(e){return""}}function Q(e,t){let l=new URLSearchParams(t.replace(/^[?&]+/,""));return!e||["mailto:","tel:","sms:","#"].some(t=>e.startsWith(t))||0===l.size||!function(e){try{return new URL(e,W),!0}catch(e){return!1}}(e)?e:function(e,t){var l;let n=e.indexOf("#"),a=-1===n?e:e.slice(0,n),s=-1===n?"":e.slice(n),r=(l=a).endsWith("?")||l.endsWith("&")?"":l.includes("?")?"&":"?";return"".concat(a).concat(r).concat(t).concat(s)}(e,l.toString())}let X=e=>{var t,l,s,r,o;let{block:c,className:d,variant:m,onClick:u,page:h,customPrecedence:p,ctaButtonOrigin:x}=e,f=(0,a.useRouter)(),g=Y(f.asPath),v="string"==typeof c.elements.brandColor?c.elements.brandColor:void 0,y=null==(t=c.elements.variant[0])?void 0:t.codename,j=!!v,w=$((null==(l=c.elements.preserveQueryString[0])?void 0:l.codename)==="yes"?Q(c.elements.url,g):c.elements.url,null!=(o=f.locale)?o:""),N=null==(s=c.elements.icon[0])?void 0:s.name,_=(null==(r=c.elements.openLinkInNewTab[0])?void 0:r.codename)==="yes",{colorId:k}=G({blockColor:v,blockColorLegacy:y&&"inverted"!==y?c.elements.variant:void 0,pageConfig:h.elements.config[0],fallbackColorId:"primary"}),{colorId:C}=G({pageConfig:h.elements.config[0],fallbackColorId:"primary"}),S="inverted"===y&&!j&&!m&&"primary"!==C,L=p&&"inverted"===m,T=(e=>{let{customPrecedence:t,variant:l,hasExplicitBrandColor:n,finalColorId:a,useBrandedInvertedOverride:s,resolvedLegacyVariant:r}=e;return t?null!=l?l:"primary":n?null!=a?a:"primary":null!=l?l:s?"transparent":r})({customPrecedence:p,variant:m,hasExplicitBrandColor:j,finalColorId:k,useBrandedInvertedOverride:S,resolvedLegacyVariant:y&&"secondary"!==y?y:"none"});return(0,n.jsx)(H.$,{className:(0,i.$)(d,(S||L)&&"!border-2 !border-white !bg-transparent !text-white hover:!border-white hover:!bg-white hover:!text-black focus:!border-white focus:!bg-white focus:!text-black"),href:w,icon:N?P.v[N]:null,onClick:e=>{(0,b.d)({event:"cta_click",cta_name:c.elements.text,cta_category:c.system.type,cta_origin:x,cta_targetURL:w}),null==u||u(e),w&&!_&&f.push(w)},target:_?"_blank":"_self",variant:T,children:c.elements.text})},J=e=>{var t;let{block:l,...a}=e,s=m[null==(t=l.elements.snippetSpacingSpacing[0])?void 0:t.codename]||m.default;return(0,n.jsx)("div",{className:(0,i.$)(s,"container-narrow text-center"),children:(0,n.jsx)(X,{block:l,...a})})},ee=e=>{let{alt:t="",children:l,className:a,imageUrl:r="",src:i,isFooterCardImage:o}=e,c="shrink-0 ".concat(a," ").concat(o?"w-full object-cover h-full":"w-full");return l&&(0,s.isValidElement)(l)?(0,s.cloneElement)(l,{className:"shrink-0",children:s.Children.map(l.props.children,e=>"img"===e.type?(0,s.cloneElement)(e,{className:c}):e)}):(0,n.jsx)(n.Fragment,{children:r.length?(0,n.jsx)(B(),{href:r,children:(0,n.jsx)(f(),{alt:t||"",className:c,height:170,loader:v.L,src:i,width:330})}):(0,n.jsx)(f(),{alt:t||"",className:c,height:170,loader:v.L,src:i,width:330})})},et=e=>{let{children:t=null,className:l="",href:a=null,mobileOnlyHref:r=null,mobileOnlyHrefLabel:i,imageOnLeft:o=!1,leadingTitle:c=!1,metaBlock:d,removeBorders:m=!1,subtitle:u="",title:h="",isFooterCard:p=!1,hasFooterCardOnMobile:x=!1,cardContentInCenter:f=!1}=e,g=s.Children.toArray(t),v=(0,n.jsxs)(n.Fragment,{children:[g.find(e=>o?null:e.type===ee),!p&&c&&h?(0,n.jsx)("div",{className:"px-6 py-3",children:(0,n.jsx)("h3",{children:h})}):null,p?(0,n.jsx)("h3",{className:"w-full bg-gray-100 text-center text-lg md:py-1",children:h}):null,(0,n.jsxs)("div",{className:"".concat(m&&!p&&"content py-4"," ").concat(p&&m?"md:flex-col lg:flex-row":"flex-grow px-5 py-5 md:px-6"," flex flex-col bg-white sm:flex-row"),children:[o?(0,n.jsx)("div",{className:p?"h-40 w-full":"mr-4",children:g.find(e=>e.type===ee)}):null,(0,n.jsxs)("div",{className:"flex h-full w-full flex-col bg-white ".concat(m&&p&&!x&&"pb-2"," ").concat(x&&"pb-4"," [&>ol]:list-[auto] [&>ul]:list-disc ").concat(f?"text-center":""),children:[p||c||!h?null:(0,n.jsx)("h3",{className:"mb-2 text-lg lg:text-xl ".concat(a?"hover:underline":""," ").concat(f?"text-center":""),children:h}),u?(0,n.jsx)("p",{className:"content content--no-width-restriction mb-2 text-sm",children:u}):null,g.filter(e=>e.type!==ee)]})]})]}),b="flex w-84 flex-col ".concat(g.length>3?"w-84":""," ").concat(1===g.length?"w-full":"","\n			").concat(o&&p?"max-w-md":"max-w-full"," ").concat(p?"max-h-full shadow-around":"shadow-md"," ").concat(x?"mx-auto max-h-60":"mx-2"," overflow-hidden rounded-lg bg-white ").concat(a?"cursor-pointer no-underline":""," ").concat(l||""),y=(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("div",{className:"relative",children:d?(0,s.cloneElement)(d,{className:"".concat(d.props.className||""," absolute top-0"),blur:!1!==d.props.blur,metaBlockHref:d.props.metaBlockHref}):null}),v]});return a?/^(?:[a-z+]+:)?\/\//i.test(a)?(0,n.jsx)("a",{className:b,href:a,children:y}):(0,n.jsx)(B(),{className:b,href:a,children:y}):r?(0,n.jsx)("div",{"aria-label":i,className:"".concat(b," cursor-pointer md:cursor-default"),onClick:e=>{e.target.closest("a, button")||(window.location.href=r)},onKeyDown:e=>
1{("Enter"===e.key||" "===e.key)&&(e.target.closest("a, button")||(window.location.href=r))},role:"link",tabIndex:0,children:y}):(0,n.jsx)("div",{className:b,children:y})},el=e=>{let{children:t,className:l,isFooterCard:a}=e;return(0,n.jsx)("div",{className:"mt-auto ".concat(a?"":"pt-8"," ").concat(l),children:t})},en=e=>{var t,l,s,r;let{block:o,...c}=e,d=(0,a.useRouter)(),m=o.elements.metaBlock[0],u=null==m?void 0:m.elements.image[0],h=null==m||null==(t=m.elements.horizontalAlignment[0])?void 0:t.codename,p=o.elements.snippetCategoryColorCategoryColor,x="string"==typeof p&&p?p:null,{locale:g}=(0,a.useRouter)(),y=$(null!=(r=null==m?void 0:m.elements.url)?r:"",null!=g?g:""),j=$(o.elements.url,null!=g?g:"");return(0,n.jsxs)(et,{className:"article-card relative h-full text-black",metaBlock:(null==m?void 0:m.elements.title)?(0,n.jsx)(M,{aligned:h||"left",bgColor:x&&"none"!==x?"bg-category-".concat(x):"",blur:!0,className:"z-10",image:u?(0,n.jsx)(f(),{alt:u.description||"",fill:!0,loader:v.L,src:u.url}):null,isExternalLink:(null==(l=m.elements.openInNewTab[0])?void 0:l.codename)==="yes",metaBlockHref:y,metaText:"",children:m.elements.title}):void 0,subtitle:(0,n.jsx)("span",{"data-kontent-element-codename":"subtitle",children:o.elements.subtitle}),title:o.elements.title?o.elements.url?(0,n.jsx)(B(),{className:"flex h-full flex-col after:absolute after:inset-0 after:content-['']",href:j,onClick:()=>{(0,b.d)({event:"card_click",element_text:o.elements.title,link_url:j})},prefetch:!1,rel:"noreferrer",target:(null==(s=o.elements.openInNewTab[0])?void 0:s.codename)==="yes"?"_blank":"_self",children:(0,n.jsx)("span",{"data-kontent-element-codename":"title",children:o.elements.title})}):(0,n.jsx)("span",{"data-kontent-element-codename":"title",children:o.elements.title}):null,children:[o.elements.image[0]?(0,n.jsx)(ee,{alt:o.elements.image[0].description,className:"h-44 object-cover",src:o.elements.image[0].url}):null,(0,n.jsx)(el,{children:(0,n.jsxs)(n.Fragment,{children:[o.elements.ctaButton.map((e,t,l)=>(0,n.jsx)(X,{block:e,className:(0,i.$)("relative z-10 mb-2",1===l.length?"w-full":null,t<l.length-1&&1!==l.length?"mr-4":null),...c},e.system.id)),o.elements.productLabelUrl.map(e=>{var t,l,a;let s=$(e.elements.url,null!=(a=d.locale)?a:""),r=null==(t=e.elements.icon[0])?void 0:t.codename;return(0,n.jsx)("div",{className:"flex text-center",children:(0,n.jsx)(D,{className:"relative z-10 w-full text-center",href:s,icon:r?P.v[r]:null,onClick:async e=>{e.stopPropagation(),await d.push(s)},target:(null==(l=e.elements.openLinkInNewTab[0])?void 0:l.codename)==="yes"?"_blank":"_self",children:e.elements.text})},e.system.id)})]})})]})},ea=e=>{var t;let{authorImage:l=null,bodyMetaBlock:a=null,children:r=null,className:o="",description:c=null,imageMetablock:d=null,imageUrl:m=null,subtitle:u="",title:h}=e,p=null!==a;return(0,n.jsxs)("div",{className:(0,i.$)("rounded-lg shadow-secondary md:flex md:flex-row",o),children:[(0,n.jsxs)("div",{className:"relative h-56 shrink-0 rounded-t-lg bg-cover bg-center bg-no-repeat sm:h-64 md:h-auto md:w-2/5 md:rounded-l-lg md:rounded-t-none",style:{backgroundImage:"url(".concat(m,")")},children:[d?(0,s.cloneElement)(d,{className:(0,i.$)(d.props.className,"absolute left-0 top-0 rounded-tl-lg overflow-hidden"),blur:d.props.blur}):null,l?(0,s.cloneElement)(l,{className:(0,i.$)(l.props.className,"absolute bottom-0 left-0 transform translate-x-4 translate-y-1/2 md:-translate-x-4 md:translate-y-4"),size:null!=(t=l.props.size)?t:"md"}):null]}),(0,n.jsxs)("div",{className:"h-full",children:[(0,n.jsxs)("div",{className:"top-0 flex flex-col-reverse flex-wrap items-start md:flex-row md:flex-nowrap md:items-center",children:[u?(0,n.jsx)("p",{className:(0,i.$)("px-4 text-xs",l&&"mt-6",!l&&"mt-0",p||l?"pt-6 md:pt-0":"pt-3","md:pl-6"),children:u}):null,p?(0,s.cloneElement)(a,{className:(0,i.$)(a.props.className,"right-0 shrink-0 ml-auto"),aligned:"right",shadow:!1}):null]}),(0,n.jsxs)("div",{className:(0,i.$)("p-4 pb-8 md:pl-6",p&&"pt-4"),children:[(0,n.jsx)("h3",{className:"mb-4 text-xl",children:h}),c?(0,n.jsx)("div",{className:"content content--no-width-restriction mb-4 md:mb-8",children:c}):null,r]})]})]})};var es=l(43788),er=l(35096);let ei=e=>{let{className:t,style:l,onClick:a,onPreClick:s,currentSlide:r}=e;return(0,n.jsx)("div",{className:t,onClick:()=>{s&&s(r),a&&a()},role:"presentation",style:{...l,cursor:"pointer"}})},eo=(0,s.forwardRef)((e,t)=>
1{let{className:l="",children:a=null,stylesClass:r="verticalyCenteredArrows",hasHrBelow:o=!1,autoScroll:c=!0,autoScrollDuration:d=3e3}=e,[m,u]=(0,s.useState)(!0),[h,p]=(0,s.useState)(0),x=s.Children.toArray(a);return(0,s.useEffect)(()=>{let e=e=>{"Tab"===e.key&&m&&u(!1)};return window.addEventListener("keydown",e),()=>{window.removeEventListener("keydown",e)}},[m]),(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(er.default,{className:(0,i.$)(l,r,o?"hasHrBelow":""),...{autoplay:c&&m,dots:!0,infinite:!0,slidesToScroll:1,slidesToShow:1,ref:null,speed:500,autoplaySpeed:d,pauseOnFocus:!0,pauseOnHover:!0,afterChange:e=>{p(e)}},nextArrow:(0,n.jsx)(ei,{currentSlide:h,onPreClick:e=>{var t,l;(0,b.d)({event:"carousel_click",carousel_name:null!=(l=null==(t=x[(e+1)%x.length])?void 0:t.props.heading)?l:"image ".concat(e),carousel_action:"Click Right"})}}),prevArrow:(0,n.jsx)(ei,{currentSlide:h,onPreClick:e=>{var t,l;(0,b.d)({event:"carousel_click",carousel_name:null!=(l=null==(t=x[(e-1+x.length)%x.length])?void 0:t.props.heading)?l:"image ".concat(e),carousel_action:"Click Left"})}}),ref:t,children:a}),o?(0,n.jsx)("hr",{className:"border-b border-t-0 border-gray-200 pt-8"}):null]})});eo.displayName="FullWidthCarousel";var ec=l(62518),ed=l.n(ec);let em=e=>{let{className:t="",children:l=null,autoScrollEnabled:a=!0,autoScrollDuration:s=3e3}=e;return(0,n.jsx)("div",{children:(0,n.jsx)(eo,{autoScroll:a,autoScrollDuration:s,className:"".concat(t," ").concat(ed().HeaderBlockCarousel),children:l})})},eu=e=>{let{className:t="",button:l,image:a,subheading:r,heading:o,url:c,headingUrl:d,isContentOnTopOfImage:m}=e,u=(0,T.l)().isMobile,h=e=>(0,n.jsx)("h1",{className:e,children:o}),p=()=>(0,n.jsx)("a",{href:c,children:(0,s.isValidElement)(a)?(0,s.cloneElement)(a,{className:"w-full object-cover"}):null});return m?u?(0,n.jsx)("div",{className:(0,i.$)("relative",t),children:r&&o?(0,n.jsxs)(n.Fragment,{children:[p(),(0,n.jsx)("div",{className:"bottom-0 w-full pl-6 pr-6",children:(0,n.jsxs)("div",{className:"slide-text-block mx-auto max-w-screen-xl items-center justify-between p-4 md:flex",children:[(0,n.jsxs)("div",{className:"md:mr-1",children:[(0,n.jsx)("a",{href:d,children:h("mb-4")}),(0,n.jsx)("a",{href:c,children:(0,n.jsx)("p",{children:r})})]}),!!l&&l]})})]}):p()}):(0,n.jsx)("div",{className:(0,i.$)("relative",t),children:r&&o?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("div",{className:"absolute h-full w-full overflow-hidden",children:(0,n.jsx)("div",{className:"container-wide flex h-full items-center",children:(0,n.jsx)("div",{className:"flex h-full w-full items-center",children:(0,n.jsxs)("div",{className:"items-left max-w-2/3 w-1/2 flex-col justify-between rounded-lg bg-white p-2 md:flex md:max-h-full lg:w-1/3 lg:p-4",children:[(0,n.jsxs)("div",{className:"pb-2 md:mr-1 md:pb-4",children:[(0,n.jsx)("a",{href:d,children:h("mb-2 text-xl leading-none text-black lg:mb-4 lg:text-2xl")}),(0,n.jsx)("a",{href:c,children:(0,n.jsx)("p",{className:"text-sm text-black lg:text-base",children:r})})]}),!!l&&l]})})})}),p()]}):p()}):(0,n.jsxs)("div",{className:(0,i.$)("relative",t),children:[p(),(0,n.jsx)("div",{className:"bottom-0 w-full pl-6 pr-6",children:(0,n.jsxs)("div",{className:"slide-text-block mx-auto max-w-screen-xl items-center justify-between p-4 md:flex",children:[(0,n.jsxs)("div",{className:"md:mr-1",children:[(0,n.jsx)("a",{href:d,children:h("mb-4")}),(0,n.jsx)("a",{href:c,children:(0,n.jsx)("p",{children:r})})]}),!!l&&l]})})]})};var eh=l(73695),ep=l.n(eh);let ex=e=>{let{children:t,className:l="",col:a=2}=e,r={1:"md:w-full",2:"md:w-1/2",3:"md:w-1/2 lg:w-1/3",4:"md:w-1/2 lg:w-1/3 xl:w-1/4",5:"w-full md:w-1/2 lg:w-max"},i=s.Children.map(t,e=>(0,n.jsx)("div",{className:"".concat(r[a]," flex justify-center p-4"),children:e}));return(0,n.jsx)("div",{className:"flex-wrap md:flex ".concat(l," m-auto justify-center md:max-w-[68rem] lg:max-w-[90rem]"),children:i})};var ef=l(43605),eg=l.n(ef);l(7075);let ev=ep()(()=>Promise.resolve().then(l.bind(l,35096)),{loadableGenerated:{webpack:()=>[35096]},ssr:!1}),eb=e=>{let{className:t="",children:l,columns:a=3,isEqualHeightContent:r=!1,isSliderOnMobile:i=!1,hideSliderUI:o=!1,ofLabel:c,showAsSlider:d=!1,sliderNavText:m="slider nav",autoplay:u=!1,autoplaySpeed:h=2e3}=e,p=s.Children.toArray(l).filter(s.isValidElement).map(e=>
1e),[x,f]=(0,s.useState)(1),[g,v]=(0,s.useState)(0),[y,j]=(0,s.useState)(!1),w=(0,s.useRef)(null),[N,_]=(0,s.useState)(!1),{isMobile:k=!1,isTablet:C=!1,width:S=0}=(0,T.l)();(0,s.useEffect)(()=>{_(!0)},[]),(0,s.useEffect)(()=>{f(k?1:a>2?2:a),j(k&&p.length>4||p.length>8)},[S,k,C,p.length,a]);let L=d||k&&i,I=L&&N;if(L&&!I)return(0,n.jsx)("div",{className:t,suppressHydrationWarning:!0});let E=c?c.replace(/{{X}}/,"".concat(g+1)).replace(/{{Y}}/,"".concat(p.length)):"".concat(g+1," of ").concat(p.length);return(0,n.jsx)("div",{className:t,children:I?(0,n.jsxs)("div",{className:"".concat(eg().cardCarousel," ").concat(y&&!o?eg().customNav:""," relative mx-auto max-w-sm md:max-w-none"),children:[(0,n.jsx)(ev,{className:r?"flex-slider":"",ref:w,...{dots:!y&&!o,arrows:!o,autoplay:u,autoplaySpeed:h,infinite:!0,speed:500,slidesToShow:x,slidesToScroll:1,adaptiveHeight:!1,dotsClass:"slick-dots",variableWidth:!0,beforeChange:(e,t)=>{let l=t-e,n=(e+l+p.length)%p.length;if(!u){var a,s,r;(0,b.d)({event:"carousel_click",carousel_name:null!=(r=null==(a=(null==(s=p[n])?void 0:s.props).block)?void 0:a.title)?r:m,carousel_action:1===l?"Click Right":"Click Left"})}v(t)}},children:p.map(e=>(0,n.jsx)("div",{className:"h-full p-4",children:(0,s.cloneElement)(e,{className:"".concat(e.props.className||""," h-full")})},e.key))}),y&&!o?(0,n.jsxs)("div",{className:eg().rangeBar,children:[(0,n.jsx)("input",{max:p.length-1,min:0,onChange:e=>{var t;return null==(t=w.current)?void 0:t.slickGoTo(Number(e.target.value))},title:m,type:"range",value:g}),(0,n.jsx)("span",{children:E})]}):null]}):(0,n.jsx)(ex,{col:a,children:p})})},ey={columns:3,showAsSlider:!1,isSliderOnMobile:!1,children:[]},ej=function(){let{columns:e,showAsSlider:t,isSliderOnMobile:l,snippetContainerResize:a,children:r,ofLabel:i,autoplay:o=!1,autoplaySpeed:c=2e3}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ey,[d,m]=(0,s.useState)(0),u=(0,h.As)(null!=a?a:""),p=(0,T.l)();return(0,s.useEffect)(()=>{m(window.innerWidth)},[]),(0,n.jsx)(eb,{autoplay:o,autoplaySpeed:c,className:d<768||p.isMobile?"w-full":u,columns:e,hideSliderUI:o,isEqualHeightContent:!0,isSliderOnMobile:l,ofLabel:i,showAsSlider:t,children:r})};var ew=l(58875),eN=l.n(ew);let e_=e=>{let{className:t="",bgColor:l="none",containerClassName:a="container-wide",rowWidthType:s="full-width",children:r=null,mobileStackOrder:o="default",fiftyFiftyRowGap:c=!1}=e,d="fifty-fifty"===s&&c?eN()["fifty-fifty-gap"]:"";return(0,n.jsx)("div",{className:(0,i.$)(t,V.TE.get(l)),children:(0,n.jsx)("div",{className:(0,i.$)(a,eN()[s],d,(0,i.$)("reverse"===o?"".concat(eN()["flex-reverse"]):"")),children:r})})},ek=e=>{let{className:t="",headerText:l="",tags:a=[],noBackground:s=!1,noBorder:r=!1,as:i="p",titleAboveTags:o=!1,titleBorder:c=!1,variant:d="",tagUrlPrefix:m=""}=e,u="";u=o?c?"pb-4 mb-4 border-b":"mb-4":c?"pt-4 mt-4 border-t":"pb-2 mt-3";let h=a.every(e=>"string"==typeof e);return(0,n.jsxs)("div",{className:"".concat(t," ").concat(o?" flex flex-col-reverse":""),children:[(0,n.jsx)("div",{className:"-mx-1 flex flex-wrap",children:a.map((e,t)=>{let l=h?e:e.name,o=h?e:e.codename;return(0,n.jsxs)(i,{className:"m-1 ".concat(s?"":"border-2 px-2 ".concat(d?"text-".concat(d," border-").concat(d):"border-primary text-primary"," rounded-md font-semibold")," ").concat(r?"border-none pl-0 underline":""),href:(()=>{if("a"===i)return m.length?"/".concat(m,"/").concat(o.toString().normalize("NFD").replace(/_/g,"-").replace(/&/g,"-and-").replace(/[^a-z0-9-]/g,"").replace(/-+/g,"-").replace(/^-*/,"").replace(/-*$/,"")):void 0})(),children:["string"==typeof l?l:"",s&&t<a.length-1?",":null]},"string"==typeof o?o:e.codename)})}),l?(0,n.jsx)("h1",{className:u,children:l}):null]})},eC=e=>{let{children:t=null,className:l="",col:a=0,grayBG:r=!0,hasNoFlexWrap:o=!1}=e,c={1:"",2:"md:w-1/2",3:"md:w-1/3",4:"md:w-1/2 lg:w-1/4"},d=Array.isArray(t)?t.length:0,m=0===a?d:a,u=Array.isArray(t)?s.Children.map(t,e=>(0,n.jsx)("div",{className:"p-2 ".concat(c[m]),children:(0,s.cloneElement)(e,{className:"".concat(r?"bg-gray-100 ":"","rounded-lg text-center h-full p-8")})})):null;return(0,n.jsx)("div",{className:(0,i.$)(l),children:(0,n.jsx)("div",{className:(0,i.$)(o?"flex-nowrap":"flex-wrap","-mx-2 justify-center md:flex"),children:u})})},eS=e=>{var t,l,a,s;let{block:r,page:i,borderOption:o,...d}=e,{colorId:m}=G({blockColor:r.elements.brandColor,pageConfig:i.elements.config[0],fallbackColorId:"primary"});return(0,n.jsxs)("div",{"data-kontent-item-id":r.system.id,children:[(0,n.jsx)(S,{boldTitle:(null==(t=r.elements.boldTitle[0])?void 0:t.codename)==="bold",brand:null!=m?m:void 0,noB
1order:(null==(l=o[0])?void 0:l.codename)!=="yes",size:(null==(a=r.elements.iconSize[0])?void 0:a.codename)||"lg",title:(0,n.jsx)("span",{"data-kontent-element-codename":"title",children:r.elements.title}),children:(0,n.jsx)("div",{className:"relative h-full w-full",children:r.elements.icon[0]?(0,n.jsx)(f(),{alt:null!=(s=r.elements.icon[0].description)?s:"","data-kontent-element-codename":"icon",fill:!0,loader:v.L,src:r.elements.icon[0].url}):null})}),(0,n.jsx)(c.rM,{"data-kontent-element-codename":"description",element:r.elements.description,page:i,...d})]},r.system.id)};var eL=l(45056),eT=l(7295);function eI(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"elanco-blue";return(0,eT.g2)(e||t,t)}let eE=e=>{let{size:t,title:l,titleCenter:a=!1,onClose:r,children:i,variant:o="center",isOpen:c=!0,brandColor:d}=e,[m,u]=(0,s.useState)("center"===o),[h,p]=(0,s.useState)("center"===o),x=eI(d).text,f=d&&d.startsWith("#")?{color:d}:void 0;return((0,s.useEffect)(()=>{let e;if("right-slide"!==o)return;let t=0,l=0;return c?(u(!0),t=requestAnimationFrame(()=>{l=requestAnimationFrame(()=>{p(!0)})})):(p(!1),e=window.setTimeout(()=>{u(!1)},300)),()=>{t&&cancelAnimationFrame(t),l&&cancelAnimationFrame(l),e&&clearTimeout(e)}},[c,o]),(0,s.useEffect)(()=>{let e=e=>{"Escape"===e.key&&c&&r()};if(c)return document.addEventListener("keydown",e),"right-slide"===o&&(document.body.style.overflow="hidden"),()=>{document.removeEventListener("keydown",e),"right-slide"===o&&(document.body.style.overflow="unset")}},[c,r,o]),"right-slide"!==o||m)?"right-slide"===o?(0,n.jsxs)("div",{className:"fixed inset-0 z-[9999] overflow-hidden",children:[(0,n.jsx)("div",{"aria-hidden":"true",className:"absolute inset-0 bg-black transition-opacity duration-300 ".concat(h?"bg-opacity-50":"bg-opacity-0"),onClick:r,onKeyDown:e=>{("Enter"===e.key||" "===e.key)&&r()},role:"button",tabIndex:0}),(0,n.jsxs)("div",{className:"absolute right-0 top-0 flex h-full w-full max-w-full transform flex-col bg-white pt-0 shadow-xl transition-transform duration-300 ease-in-out sm:max-w-lg md:max-w-xl lg:max-w-2xl ".concat(h?"translate-x-0":"translate-x-full"),children:[(0,n.jsx)("div",{className:"relative mr-2 mt-2 px-4 pb-6 sm:mr-4 sm:mt-4 sm:px-6 sm:pb-8 md:ml-4 md:mr-0 md:px-8 md:pb-10",children:(0,n.jsx)("button",{"aria-label":"Close",className:"".concat(x," absolute right-2 top-0 transition-colors focus:outline-none md:left-2 md:right-auto"),onClick:r,style:f,type:"button",children:(0,n.jsx)("svg",{className:"h-8 w-8 sm:h-10 sm:w-10 md:h-12 md:w-12",fill:"none",stroke:"currentColor",strokeWidth:1,viewBox:"0 0 24 24",children:(0,n.jsx)("path",{d:"M6 18L18 6M6 6l12 12",strokeLinecap:"round",strokeLinejoin:"round"})})})}),l?(0,n.jsx)("div",{className:"px-8 py-3 sm:px-8 sm:py-4 md:px-8",children:(0,n.jsx)("h2",{className:"text-gray-900 text-[24px] font-bold leading-none",children:l})}):null,(0,n.jsx)("div",{className:"flex-1 overflow-y-auto px-8 pb-8 pt-10 sm:px-8 sm:pb-10 sm:pt-6 md:px-8 md:pb-12 md:pt-8",children:i})]})]}):(0,n.jsx)("div",{"aria-modal":!0,className:"fixed bottom-0 left-0 right-0 top-0 z-[1000] flex items-center justify-center bg-black/50",children:(0,n.jsxs)("div",{className:"".concat({sm:"max-w-sm",md:"max-w-md",lg:"max-w-xl",xl:"max-w-3xl"}[t]," m-6 h-fit max-h-[90%] overflow-y-auto rounded border-light-grey bg-white shadow-lg"),children:[(0,n.jsx)("div",{className:"mr-4 mt-4 flex justify-end",children:(0,n.jsx)("button",{onClick:r,type:"button",children:(0,n.jsx)("span",{"aria-label":"Close",children:(0,n.jsx)("svg",{height:"19.784",viewBox:"0 0 19.789 19.784",width:"19.789",xmlns:"http://www.w3.org/2000/svg",children:(0,n.jsx)("path",{d:"M23.524,21.181l7.068-7.068a1.656,1.656,0,1,0-2.342-2.342l-7.068,7.068-7.068-7.068a1.656,1.656,0,1,0-2.342,2.342l7.068,7.068-7.068,7.068a1.656,1.656,0,0,0,2.342,2.342l7.068-7.068,7.068,7.068a1.656,1.656,0,0,0,2.342-2.342Z","data-name":"Icon ionic-ios-close",fill:"#021546",transform:"translate(-11.285 -11.289)"})})})})}),(0,n.jsxs)("div",{className:"p-8 pt-2",children:[l?(0,n.jsx)("h2",{className:"text-pet-primary ".concat(a?"text-center":"text-left"," mb-4 text-2xl font-bold"),children:l}):null,i]})]})}):null},eA=e=>{let{theme:t}=e;return(0,n.jsxs)("div",{className:"lds-spinner ".concat(t),children:[(0,n.jsx)("div",{}),(0,n.jsx)("div",{}),(0,n.jsx)("div",{}),(0,n.jsx)("div",{}),(0,n.jsx)("div",{}),(0,n.jsx)("div",{}),(0,n.jsx)("div",{}),(0,n.jsx)("div",{}),(0,n.jsx)("div",{}),(0,n.jsx)("div",{}),(0,n.jsx)("div",{}),(0,n.jsx)("div",{})]})};var eF=l(87209),eB=l(79664),eM=l(43259);let eP=async(e,t)=>{let l={agent:navigator.userAgent,code:e,deviceId:t};
1if("geolocation"in navigator)try{let{latitude:e,longitude:t}=(await new Promise((e,t)=>{navigator.geolocation.getCurrentPosition(e,t)})).coords;l.geoLoc={lat:e,lng:t}}catch(e){console.error("Unable to fetch Geolocation Data")}let{data:n}=await eM.L.post("/api/trustcode/trustcodeCheck",l);return n},eD="device_id",eR=e=>{let{children:t,src:l,alt:a,width:s,height:r,text:i}=e;return(0,n.jsxs)("div",{className:"flex flex-col",children:[(0,n.jsxs)("div",{className:"container-wide my-2 grid min-h-8 grid-cols-[1fr_auto_1fr] items-center self-center lg:mx-auto",children:[(0,n.jsx)("div",{className:"flex h-8 items-center justify-self-start",children:l?(0,n.jsx)(f(),{alt:null!=a?a:"",className:"h-full w-auto max-w-[40vw] object-contain",height:null!=r?r:23.99,loader:v.L,src:l,width:null!=s?s:81.04}):null}),(0,n.jsx)("h2",{className:"px-2 text-center text-base leading-tight sm:text-lg",children:i}),(0,n.jsx)("div",{className:"h-8"})]}),t]})};var eq=l(42954);let ez=e=>{let{children:t=null,reversed:l=!1,image:a}=e;return(0,n.jsxs)("div",{className:"container-wide relative",children:[(0,n.jsx)("div",{className:(0,i.$)("absolute h-full w-full rounded-lg bg-gray-100 md:w-3/5",l&&"right-0")}),(0,n.jsxs)("div",{className:(0,i.$)("z-1 relative items-start justify-between px-6 py-8 md:flex md:px-0 md:py-12",l?"flex-row-reverse md:pr-10 lg:pr-20":"md:pl-10 lg:pl-20"),children:[(0,n.jsxs)("div",{className:"md:w-1/3",children:[t,(0,n.jsx)("div",{className:"absolute relative right-0 mb-6 mt-8 hidden overflow-hidden rounded-lg text-white md:hidden",children:(0,n.jsx)("div",{className:"z-10 mr-4 mt-4 text-center",children:a})})]}),(0,n.jsxs)("div",{className:"absolute relative right-0 hidden overflow-hidden rounded-lg text-white md:block md:w-3/5",children:[(0,n.jsx)("div",{className:"z-10 mr-4 mt-4 hidden text-center"}),a]})]})]})},eO=e=>{var t,l,a,s,r,o,c,d;let{block:m,page:u,borderOption:h,backgroundOption:p,className:x,...g}=e,{colorId:b}=G({blockColor:m.elements.brandColor,blockColorLegacy:m.elements.brand,pageConfig:u.elements.config[0],fallbackColorId:"primary"});return(0,n.jsxs)("div",{className:(0,i.$)("text-center",x),"data-kontent-item-id":m.system.id,children:[(0,n.jsx)(S,{brand:null!=b?b:void 0,noBackground:(null==(t=p[0])?void 0:t.codename)==="yes",noBorder:(null==(l=h[0])?void 0:l.codename)!=="yes",size:(null==(a=m.elements.size[0])?void 0:a.codename)||"lg",title:(0,n.jsx)("span",{className:(null==(s=m.elements.boldTitle[0])?void 0:s.codename)==="bold"?"font-bold":void 0,"data-kontent-element-codename":"title",children:m.elements.title}),children:(0,n.jsx)("div",{className:"relative h-full w-full",children:(0,n.jsx)(f(),{alt:null!=(c=null==(r=m.elements.icon[0])?void 0:r.description)?c:"","data-kontent-element-codename":"icon",fill:!0,loader:v.L,src:null!=(d=null==(o=m.elements.icon[0])?void 0:o.url)?d:"https://assets-eu-01.kc-usercontent.com/43db687c-fb47-015f-c990-00802940e2bc/f03522f9-0615-4ca8-a83c-3eb311fd2159/placeholder-256x176.png"})})}),(0,n.jsx)("div",{className:"text-center",dangerouslySetInnerHTML:{__html:m.elements.content.value},"data-kontent-element-codename":"content"}),m.elements.buttons.map(e=>(0,n.jsx)(X,{block:e,className:"mt-6",page:u,...g},e.system.id))]},m.system.id)},eU=e=>{let{as:t="div",text:l="",className:a=""}=e;return(0,n.jsx)(t,{className:"[&>ol]:list-inside [&>ol]:list-decimal [&>ul]:list-inside [&>ul]:list-disc ".concat(a),dangerouslySetInnerHTML:{__html:l}})},e$=e=>{let{title:t="",body:l=null,children:a=null,className:s=""}=e;return(0,n.jsxs)("div",{className:"flex flex-col md:flex ".concat(s),children:[(0,n.jsxs)("div",{className:"content text-center",children:[t?(0,n.jsx)("h2",{children:t}):null,l?(0,n.jsx)("p",{children:l}):null]}),a]})};e$.Icons=e=>{let{children:t=null,col:l=1}=e,a={1:"sm:w-full",2:"sm:w-1/2",3:"sm:w-1/2 md:w-1/3",4:"sm:w-1/2 lg:w-1/4"},r=s.Children.toArray(t),i=a[l]||a[1];return(0,n.jsx)("ul",{className:"mt-6 flex flex-wrap justify-center overflow-hidden sm:justify-around",children:r.map((e,t)=>(0,n.jsx)("li",{className:"my-4 w-1/2 px-2 text-center lg:my-0 ".concat(i," list-none"),children:e},e.key||t))})};let eH=e=>{var t,l,a,s,r,o,c,d,m,u;let{block:h,page:p,borderOption:x,squareIcon:g}=e,{colorId:b}=G({blockColor:h.elements.brandColor,blockColorLegacy:h.elements.brand,pageConfig:p.elements.config[0],fallbackColorId:"primary"});return(0,n.jsxs)("div",{"data-kontent-item-id":h.system.id,children:[(0,n.jsx)(S,{brand:null!=b?b:void 0,className:(0,i.$)("p-1"),noBorder:(null==(t=x[0])?void 0:t.codename)!=="yes",showSquareIcon:(null==(l=g[0])?void 0:l.codename)==="yes",size:(null==(a=h.elements.iconSize[0])?void 0:a.codename)||"lg",title:h.elements.title?(0,n.jsx)("span",{className:(null==(s=h.elements.boldTitle[0])?void 0:s.codename)==="bold"?"font-bold":"","data-kontent-element-codename":"title",children:h.elements.title}):null,children:(0,n.jsx)("div",{className:"relative h-full w-full object-contain",children:(0,n.jsx)(f(),{alt:null!=(m=null==(r=h.elements.icon[0])?void 0:r.description)?m:"","data-kontent-element-codename":"icon",height:(null==(o=h.elements.icon[0])?void 0:o.height)||200,loader:v.L,src:null!=(u=null==(c=h.elements.icon[0])?void 0:c.url)?u:"https://assets-eu-01.kc-usercontent.com/43db687c-fb47-015f-c990-00802940e2bc/f03522f9-0615-4ca8-a83c-3eb3
111fd2159/placeholder-256x176.png",width:(null==(d=h.elements.icon[0])?void 0:d.width)||200})})}),h.elements.description.value?(0,n.jsx)(eU,{className:"content content--no-width-restriction leading-tight","data-kontent-element-codename":"description",text:h.elements.description.value}):null]},h.system.id)},eV=e=>{var t,l;let{block:a,page:s,...r}=e,{colorId:o}=G({blockColor:a.elements.brandColor,pageConfig:s.elements.config[0],fallbackColorId:"primary"});return(0,n.jsxs)("div",{className:"flex items-start pb-5 text-black last:pb-0",role:"listitem",children:[(0,n.jsx)(S,{brand:null!=o?o:void 0,className:(0,i.$)("p-1"),noBorder:!0,size:(null==(t=a.elements.iconSize[0])?void 0:t.codename)||"xs",children:(0,n.jsx)("div",{className:"relative h-full w-full object-contain",children:a.elements.icon[0]?(0,n.jsx)(f(),{alt:null!=(l=a.elements.icon[0].description)?l:"","data-kontent-element-codename":"icon",fill:!0,loader:v.L,src:a.elements.icon[0].url}):null})}),(0,n.jsxs)("div",{className:"content ml-4",children:[(0,n.jsx)("strong",{children:a.elements.title}),(0,n.jsx)(c.rM,{element:a.elements.description,page:s,...r})]})]},a.system.id)},eZ=e=>{var t,l,r;let{block:i,...o}=e,d=(0,a.useRouter)(),m=(0,s.useRef)(null),[u,h]=(0,s.useState)(!1),p=(null==(t=i.elements.preConfirmationUsed[0])?void 0:t.codename)==="yes"&&!u,x=Array.isArray(i.elements.preserveQueryString)&&(null==(l=i.elements.preserveQueryString[0])?void 0:l.codename)==="yes"?Q(i.elements.modalConfirmHref,Y(d.asPath)):i.elements.modalConfirmHref;return(0,s.useEffect)(()=>{let e=m.current;if(!e)return;let t=t=>{t.target===e&&e.close()};return e.addEventListener("click",t),()=>{e.removeEventListener("click",t)}},[]),(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("style",{children:"\n                    .card-modal-rich-text p {\n                        margin-bottom: 0;\n                    }\n                    .card-modal-rich-text li {\n                        margin-bottom: 0;\n                    }\n                "}),(0,n.jsx)("button",{className:"h-10 w-full rounded-md border border-elanco-blue bg-elanco-blue px-4 py-2 text-center text-sm font-medium text-[#F8FAFC]",onClick:()=>{var e;null==(e=m.current)||e.showModal()},type:"button",children:i.elements.modalTriggerText}),(0,n.jsx)("dialog",{className:"w-[calc(100%-2rem)] max-w-[32rem] rounded-lg border text-left",ref:m,children:(0,n.jsxs)("div",{className:"flex flex-col gap-4 p-6",children:[(0,n.jsxs)("div",{className:"flex items-center gap-2",children:[(0,n.jsxs)("svg",{className:"-mt-px",fill:"none",height:"24",viewBox:"0 0 24 24",width:"24",xmlns:"http://www.w3.org/2000/svg",children:[(0,n.jsx)("g",{clipPath:"url(#clip0_226_6465)",children:(0,n.jsx)("path",{d:"M12 8V12M12 16H12.01M22 12C22 17.5228 17.5228 22 12 22C6.47715 22 2 17.5228 2 12C2 6.47715 6.47715 2 12 2C17.5228 2 22 6.47715 22 12Z",stroke:"#0F172A",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2"})}),(0,n.jsx)("defs",{children:(0,n.jsx)("clipPath",{id:"clip0_226_6465",children:(0,n.jsx)("rect",{fill:"white",height:"24",width:"24"})})})]}),(0,n.jsx)("div",{children:(0,n.jsx)("h2",{className:"text-lg font-semibold leading-7 text-[#0F172A]",children:i.elements.modalTitle})})]}),(0,n.jsx)(c.rM,{className:"card-modal-rich-text text-[#475569]",element:i.elements.modalText,...o}),(null==(r=i.elements.preConfirmationUsed[0])?void 0:r.codename)==="yes"&&(0,n.jsxs)("div",{className:"flex items-start gap-2",children:[(0,n.jsxs)("label",{"aria-label":"privacy-consent",className:"mt-1 inline-flex cursor-pointer items-center",children:[(0,n.jsx)("input",{checked:u,className:"peer sr-only",id:"privacy-consent-checkbox",onChange:e=>{h(e.target.checked)},type:"checkbox"}),(0,n.jsx)("span",{className:"relative flex h-4 w-4 items-center justify-center rounded-[2px] border border-[#005AA4] bg-white peer-checked:bg-[#005AA4] peer-focus:ring-2 peer-focus:ring-[#005AA4]/40 [&_svg]:opacity-0 peer-checked:[&_svg]:opacity-100",children:(0,n.jsx)("svg",{className:"h-3.5 w-3.5",fill:"none",viewBox:"0 0 16 16",xmlns:"http://www.w3.org/2000/svg",children:(0,n.jsx)("path",{d:"M13.3334 4L6.00002 11.3333L2.66669 8",stroke:"#F8FAFC",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.33"})})})]}),(0,n.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,n.jsx)("label",{className:"cursor-pointer text-base font-medium text-[#0F172A]",htmlFor:"privacy-consent-checkbox",children:i.elements.preConfirmationLabel}),(0,n.jsx)(c.rM,{className:"text-sm text-[#475569]",element:i.elements.preConfirmationDescription,...o})]})]}
1),(0,n.jsxs)("div",{className:"flex gap-2 self-end",children:[(0,n.jsx)("button",{className:"h-10 rounded-md border border-elanco-blue bg-white px-4 py-2 text-center text-sm font-medium text-elanco-blue",onClick:()=>{var e;null==(e=m.current)||e.close()},type:"button",children:i.elements.modalCancelButton}),(0,n.jsx)("a",{"aria-disabled":p,className:"h-10 rounded-md border border-elanco-blue bg-elanco-blue px-4 py-2 text-center text-sm font-medium text-[#F8FAFC] ".concat(p?"pointer-events-none opacity-50":""),href:p?"#":x,onClick:p?e=>{e.preventDefault()}:void 0,rel:"noopener noreferrer",target:"_blank",children:i.elements.modalConfirmButton})]})]})})]})},eG=e=>{try{let{width:t,height:n}=e,a=l(14779).default;return(0,s.createElement)(a,{...e,loader:e=>{let{src:t,width:l,quality:n}=e;return"".concat(t,"?w=").concat(l,"&q=").concat(n||75,"&auto=format")},...!t||!n?{fill:!0}:{}})}catch(t){return(0,s.createElement)("img",{...e})}},eW=e=>{let{cards:t=[],className:l="",children:a}=e,r=t.map(e=>{var t;return(0,n.jsx)("div",{className:"mb-3 md:w-64",children:(0,n.jsxs)(et,{className:"mx-auto h-full w-auto rounded-md border border-gray-700 pt-0 shadow-primary md:mx-2",title:e.title,children:[e.image?(0,s.cloneElement)(e.image,{className:"px-8 pt-8 h-40 object-contain mx-auto"}):null,e.button?(0,n.jsx)(el,{className:"m-0 pt-0",children:(0,s.cloneElement)(e.button,{variant:e.button.props.variant||"inverted",className:"".concat(e.button.props.className," w-full"),icon:null!=(t=e.button.props.icon)?t:P.v.External})}):null]})},e.title)});return(0,n.jsxs)("div",{className:"py-8 md:py-12 ".concat(l),children:[(0,n.jsx)("div",{className:"content container-narrow text-center",children:a}),(0,n.jsx)("div",{className:"container-wide mt-8",children:(0,n.jsx)("div",{className:"justify-center md:-mx-4 md:flex md:flex-wrap",children:r})})]})},eK=e=>{var t,l,a;let{block:s,page:r,...o}=e,{colorId:c}=G({blockColor:s.elements.brandColor,blockColorLegacy:s.elements.variant,pageConfig:r.elements.config[0],fallbackColorId:"primary"}),d=s.elements.text.split(/\n/).filter(e=>e),u=m[null==(t=s.elements.snippetSpacingSpacing[0])?void 0:t.codename]||m.none;return(0,n.jsxs)(et,{className:(0,i.$)("h-full break-words text-black sm:!w-[21rem] xxs:!max-w-[18rem]",u),href:null,title:(0,n.jsx)("span",{"data-kontent-element-codename":"card_title",children:s.elements.title}),children:[s.elements.image[0]?(0,n.jsx)(ee,{alt:null==(l=s.elements.image[0])?void 0:l.description,className:"h-48 object-cover","data-kontent-element-codename":"image",src:null==(a=s.elements.image[0])?void 0:a.url}):null,d.length>0&&(0,n.jsx)("div",{"data-kontent-element-codename":"card_text",children:d.map((e,t)=>(0,n.jsx)("p",{className:d.length-1!==t?"mb-3":"",children:e},e))}),s.elements.buttonText?(0,n.jsx)(el,{children:(0,n.jsx)(X,{block:{elements:{icon:[],openLinkInNewTab:s.elements.openInNewTab,preserveQueryString:[],text:s.elements.buttonText,url:s.elements.buttonLink,variant:s.elements.variant,brandColor:null!=c?c:"",authenticationGateComponentUserRoles:[],snippetSpacingSpacing:[]},system:{codename:"",id:"",type:"cta_button",name:""}},className:"w-full",ctaButtonOrigin:"".concat(s.elements.title," card"),"data-kontent-element-codename":"button_text",page:r,...o})}):null]})},eY=e=>{let{title:t,icon:l,link:a}=e,s=a===window.location.href;return(0,n.jsx)(B(),{href:a,legacyBehavior:!0,children:(0,n.jsxs)("div",{className:(0,i.$)("h-32 w-full border-2 border-solid border-white p-5",s?"bg-elanco-blue hover:bg-blue-400":"bg-pet-green hover:bg-green-400"),children:[(0,n.jsx)(S,{noBackground:!0,noBorder:!0,noShadow:!0,size:"sm",children:(0,n.jsx)(n.Fragment,{children:l[0]?(0,n.jsx)(f(),{alt:l[0].description||"",className:"h-full",height:55,loader:v.L,src:l[0].url||"",width:55}):null})}),(0,n.jsx)("p",{className:"truncate text-center capitalize text-white",children:t})]})})},eQ=e=>{let{title:t="",ofLabel:l="of",children:a,subtitle:r="",className:o="",sliderNavText:c="slider nav"}=e,[d,m]=(0,s.useState)(0),[u,h]=(0,s.useState)(!1),p=(0,T.l)(),x=(0,s.useRef)(null);return(0,s.useEffect)(()=>{h(p.isMobile||a.length>8)},[p,a.length]),(0,n.jsxs)("div",{className:o,children:[(0,n.jsxs)("div",{className:"h-36 bg-elanco-blue p-5 text-white",children:[(0,n.jsx)("h1",{className:"text-center text-2xl font-bold leading-[1.28]",children:t}),(0,n.jsx)("p",{className:"text-center",children:r})]}),(0,n.jsxs)("div",{className:(0,i.$)("card-carousel relative -top-16 mx-auto",u?"custom-nav":null),children:[(0,n.jsx)(er.default,{className:"flex-sli
1der",ref:x,...{dots:!u,speed:500,infinite:!0,slidesToShow:5,adaptiveHeight:!1,dotsClass:"slick-dots",beforeChange:(e,t)=>{var l,n,s,r;let i=t-e==1||t-e==-(a.length-1),o=t-e==-1||t-e==a.length-1;i?(0,b.d)({event:"carousel_click",carousel_name:(null==(l=a[(e+1)%a.length])?void 0:l.props.title)?null==(n=a[(e+1)%a.length])?void 0:n.props.title:c,carousel_action:"Click Right"}):o&&(0,b.d)({event:"carousel_click",carousel_name:(null==(s=a[(e-1+a.length)%a.length])?void 0:s.props.title)?null==(r=a[(e-1+a.length)%a.length])?void 0:r.props.title:c,carousel_action:"Click Left"}),m(t)},responsive:[{breakpoint:1024,settings:{slidesToShow:4}},{breakpoint:500,settings:{slidesToShow:2}}]},children:a.map(e=>(0,n.jsx)("div",{className:"h-full w-32 p-2",children:(0,s.cloneElement)(e,{className:(0,i.$)(e.props.className,"h-full")})},e.key))}),u?(0,n.jsxs)("div",{className:"range-bar",children:[(0,n.jsx)("input",{max:a.length-1,min:0,onChange:e=>{var t;return null==(t=x.current)?void 0:t.slickGoTo(Number(e.target.value))},title:c,type:"range",value:d}),(0,n.jsxs)("span",{children:[d+1," ",l," ",a.length]})]}):null]})]})},eX=ep()(()=>l.e(514).then(l.bind(l,40514)).then(e=>e.ClickToBuyMultiProduct),{loadableGenerated:{webpack:()=>[40514]},ssr:!1}),eJ=e=>(0,n.jsx)(eX,{...e}),e0=ep()(()=>l.e(26).then(l.bind(l,67026)).then(e=>e.ClickToBuySingleComponent),{loadableGenerated:{webpack:()=>[67026]},ssr:!1}),e1=e=>(0,n.jsx)(e0,{...e}),e2=ep()(()=>l.e(584).then(l.bind(l,30584)).then(e=>e.ClickToCartBlock),{loadableGenerated:{webpack:()=>[30584]},ssr:!1}),e4=e=>{let{block:{elements:{clientCode:t,clientBrand:l,defaultMasterProductId:a,dataSourceId:s,dataSourceType:r,petWeightOptions:i}}}=e,o="https://s3-us-west-2.amazonaws.com/static.smartcommerce.co/assets/client/";return(0,n.jsx)(e2,{brandJsUrl:"".concat(o).concat(t,"/js/smartcart_").concat(l,"_prod.js"),cssUrl:"".concat(o).concat(t,"/css/smartcart_").concat(l,"_prod.css"),defaultProductId:a,sourceId:s,sourceType:r,weightOptions:i.map(e=>({master_product_id:e.elements.masterProductId,pet_weight:e.elements.petWeight}))})},e6=e=>{var t,l;let{block:a,page:s}=e,{colorId:r}=G({blockColor:a.elements.brandColor,blockColorLegacy:a.elements.variant,pageConfig:s.elements.config[0],fallbackColorId:"primary"}),o=(null==(t=a.elements.hideMikmakBuyNowButton[0])?void 0:t.codename)==="yes",c=m[null==(l=a.elements.snippetSpacingSpacing[0])?void 0:l.codename],d=null!=c?c:m.default,u=()=>{(0,b.d)({event:"cta_click",cta_name:a.elements.text,cta_category:"CTA_Button"}),(0,eF.$s)({name:"MIKMAK_BUTTON_CLICK",properties:{cta_name:a.elements.text,product_ids:a.elements.productIds.map(e=>e.elements.dataEan.trim()).join(",")}})};return(0,n.jsx)("div",{className:(0,i.$)("text-center",d),"data-kontent-element-codename":a.system.codename,children:o?(0,n.jsx)(H.$,{className:"swn-tag-wtb-btn sr-only mt-2","data-eans":a.elements.productIds.map(e=>e.elements.dataEan.trim()).join(","),"data-mm-sticky":!0,"data-mm-wtbid":a.elements.wtbId,onClick:u,variant:r,children:a.elements.text}):(0,n.jsx)(H.$,{className:"swn-tag-wtb-btn mt-2","data-eans":a.elements.productIds.map(e=>e.elements.dataEan.trim()).join(","),"data-mm-sticky":!0,"data-mm-wtbid":a.elements.wtbId,onClick:u,variant:r,children:a.elements.text})})},e3=e=>{var t;let{table:l}=e;return(0,n.jsxs)("div",{children:[(0,n.jsx)("table",{className:"mx-auto w-full max-w-sm md:hidden",children:(0,n.jsx)("tbody",{children:null==(t=l.rows[0])?void 0:t.data.slice(1).map((e,t)=>{var a,s;return(0,n.jsx)("tr",{children:(0,n.jsx)("td",{className:"p-4",children:l.rows.map(e=>{var a,s;return(0,n.jsxs)("span",{className:"flex items-end ".concat(e!==l.rows[l.rows.length-1]?"mb-2":""),children:[(0,n.jsxs)("span",{className:"mr-2 block w-4/5",children:[null==(a=e.data[0])?void 0:a.content,(0,n.jsx)("span",{className:"font-bold",children:":"})]}),(0,n.jsx)("span",{className:"w-1/5",children:null==(s=e.data[t+1])?void 0:s.content})]},e.id)})})},null==(s=l.rows[0])||null==(a=s.data[t+1])?void 0:a.id)})})}),(0,n.jsx)("table",{className:"hidden w-full md:table",children:(0,n.jsx)("tbody",{children:l.rows.map((e,t)=>(0,n.jsx)("tr",{children:e.data.map((e,l)=>(0,n.jsx)("td",{className:"p-4 text-center ".concat(0===t&&0!==l?"align-bottom":""),children:e.content},e.id))},e.id))})})]})},e5=e=>{let{centered:t=!1,column:l=!1,iconAlt:a="",iconUrl:s,text:r="\xa0"}=e;return(0,n.jsxs)("span",{className:"".concat(l?"flex-col":""," ").concat(s?"flex items-center":""," ").concat(t?"mb-5 md:mb-0 md:justify-center":""),children:[s?(0,n.jsx)(f(),{alt:a||"icon",className:l?"flex-col":"h-6",height:50,loader:v.L,src:s,width:50}):null,(0,n.jsx)("span",{className:"min-w-18 font-bold ".concat(s?"ml-2 inline-block":""),children:r})]})}
1,e7=e=>{let{iconAlt:t="",iconUrl:l="",text:a}=e;return(0,n.jsxs)("span",{className:"flex-col items-center justify-end md:flex",children:[l?(0,n.jsx)(f(),{alt:t,className:"hidden aspect-square max-w-[130px] md:block",height:100,loader:v.L,src:l,width:100}):null,(0,n.jsx)("span",{className:"inline-block ".concat(l&&"mt-2"),children:a})]})},e8=e=>{let{table:t,className:l="",mobileClassName:a=""}=e;return(0,n.jsxs)("div",{children:[(0,n.jsx)("table",{className:"w-full md:hidden ".concat(a),children:(0,n.jsx)("tbody",{children:t.rows.map(e=>e.data.map((e,l)=>{var a,s;return(0,n.jsx)("tr",{children:(0,n.jsxs)("td",{className:"p-4",children:[null==(s=t.headers[0])||null==(a=s.columns[l])?void 0:a.title," -"," ",e.content]})},e.id)}))})}),(0,n.jsxs)("table",{className:"hidden w-full md:table ".concat(l),children:[(0,n.jsx)("thead",{children:t.headers.map(e=>{var t;return(0,n.jsx)("tr",{children:e.columns.map(e=>{let t=e.title?"bg-blue-700 p-6 text-white":"";return(0,n.jsx)("th",{className:t,children:null===e.title?(0,n.jsx)("span",{children:"\xa0"}):e.title},e.id)})},null==(t=e.columns[0])?void 0:t.id)})}),(0,n.jsx)("tbody",{children:t.rows.map(e=>(0,n.jsx)("tr",{children:e.data.map(e=>(0,n.jsx)("td",{className:"p-4",children:e.content},e.id))},e.id))})]})]})},e9=e=>{let{circleClasses:t,iconType:l}=e;return(0,n.jsx)("div",{className:(0,i.$)("h-5 w-5 overflow-hidden rounded-full md:h-6 md:w-6",t),children:(0,n.jsxs)("span",{className:"flex h-full w-full flex-col items-center justify-center",children:["Tick"===l&&(0,n.jsx)("svg",{"aria-hidden":"true",className:"h-6 w-6 fill-current text-white",focusable:"false",viewBox:"0 0 188 188",children:(0,n.jsx)("path",{d:"M148.49,61.73l-7.94-7.94a5.62,5.62,0,0,0-7.94,0L80,106.43,55.39,81.85a5.62,5.62,0,0,0-7.94,0l-7.94,7.94a5.62,5.
162,0,0,0,0,7.94L76,134.21a5.62,5.62,0,0,0,7.94,0l64.55-64.55A5.61,5.61,0,0,0,148.49,61.73Z"})}),"Cross"===l&&(0,n.jsxs)("svg",{className:"h-3 w-3 fill-current text-white",height:"20",viewBox:"0 0 15.7 15.7",width:"20",children:[(0,n.jsx)("path",{d:"M14.3,0.3l1.1,1.1c0.4,0.4,0.4,1,0,1.4L2.8,15.4c-0.4,0.4-1,0.4-1.4,0l-1.1-1.1c-0.4-0.4-0.4-1,0-1.4     L12.9,0.3C13.3-0.1,13.9-0.1,14.3,0.3z"}),(0,n.jsx)("path",{d:"M15.4,14.3l-1.1,1.1c-0.4,0.4-1,0.4-1.4,0L0.3,2.8c-0.4-0.4-0.4-1,0-1.4l1.1-1.1c0.4-0.4,1-0.4,1.4,0     l12.6,12.6C15.8,13.3,15.8,13.9,15.4,14.3z"})]})]})})};var te=l(79752),tt=l.n(te);let tl=e=>{let{children:t,className:l="",twoColumn:a=!1,threeColumn:s=!1}=e,r=(0,i.$)(tt().bullets,"font-semibold [&>li]:relative [&>li]:mb-4 [&>li]:py-1 [&>li]:pl-12 [&>li]:before:absolute [&>li]:before:left-2.5 [&>li]:before:top-2.5 [&>li]:before:block [&>li]:before:h-6 [&>li]:before:w-6 [&>li]:before:scale-[200%] [&>li]:before:bg-no-repeat [&>li]:before:content-['']",a&&"sm:flex sm:flex-wrap sm:justify-between sm:[&>li]:w-[48%]",s&&"sm:flex sm:flex-wrap sm:justify-between lg:after:w-3/10 lg:after:content-[''] sm:[&>li]:w-[48%] lg:[&>li]:w-3/10",l);return(0,n.jsx)("ul",{className:r,children:t})},tn=e=>{let{children:t=null,className:l="",scrollToRef:a="",scrollBtnIcon:s=null,navHeight:r=0,goToSectionAriaLabelText:i="Go to below section"}=e;return(0,n.jsxs)("div",{className:"content ".concat(l),children:[t,a?(0,n.jsx)(w,{as:"button",icon:s,iconSize:"w-6",onClick:()=>{let e=document.querySelector("#".concat(a));if(e){let t=e.offsetTop-r;window.scroll({top:t,behavior:"smooth"})}},children:i}):null]})};var ta=l(89767);l(97065);let ts=e=>{var t;let{largeImageUrl:l,image:a,className:r="",shouldDisplayInteractiveClasses:o=!0,openFullscreenImageAriaLabel:c="Open image in popup"}=e,[d,m]=(0,s.useState)(!1);return(0,n.jsxs)("div",{className:(0,i.$)(r,"leading-[0]"),children:[(0,n.jsxs)("div",{className:"relative inline-block w-full",children:[(0,n.jsx)(f(),{alt:a.alt,className:(0,i.$)("w-full",o&&"rounded-lg shadow-secondary",r),height:300,loader:v.L,src:null!=(t=a.src)?t:"",width:450}),(0,n.jsx)("button",{"aria-label":c,className:"absolute right-2.5 top-2.5 z-10 h-8 w-8 rounded-full bg-primary hover:bg-primary-dark focus:bg-primary-dark",onClick:()=>{m(!0)},title:c,type:"button",children:(0,n.jsx)("div",{className:"flex items-center justify-center",children:(0,n.jsxs)("svg",{"aria-hidden":"true",focusable:"false",height:"15.07",viewBox:"0 0 14.92 15.07",width:"14.92",xmlns:"http://www.w3.org/2000/svg",children:[(0,n.jsx)("title",{children:"icon-expand"}),(0,n.jsx)("path",{className:"fill-white",d:"M7.18,9.43,4.1,12.51l2.56,2.56H0V8.41L2.56,11,5.64,7.89Z",transform:"translate(0)"}),(0,n.jsx)("path",{className:"fill-white",d:"M14.92,0V6.67L12.36,4.1,9.28,7.18,7.74,5.64l3.08-3.08L8.25,0Z",transform:"translate(0)"})]})})})]}),d?(0,n.jsx)(ta.Yf,{carousel:{finite:!0},close:()=>{m(!1)},open:d,slides:[{src:l}]}):null]})},tr=e=>{let{className:t="",children:l,imageOverflowPosition:a="",isLarge:r=!1,reversed:i=!1,metaBlock:o=null,hideImageOnMobile:c=!1,imageFull:d=!1,largeBackgroundButContained:m=!1,subtitle:u=""}=e,h=l.find(e=>(0,s.isValidElement)(e)&&"string"==typeof e.type&&e.type.includes("h")),p=l.filter(e=>Array.isArray(e)||e&&(0,s.isValidElement)(e)&&e.type!==f()&&e!==h),x=l.find(e=>e&&(0,s.isValidElement)(e)&&e.type===f());return(0,n.jsx)("div",{className:m?"bg-gray-100":"",children:(0,n.jsxs)("div",{className:"".concat(m?"":"bg-gray-100"," relative mx-auto px-6 py-8 md:flex ").concat(t,"\n        ").concat(d?"":"px-6 py-8 md:px-6 md:py-10","\n        ").concat(i?"flex-row-reverse":"","\n        ").concat(r?"":"container-wide","\n        ").concat(a?({top:"md:mt-12",bottom:"md:mb-12"})[a]:""),children:[(0,n.jsxs)("div",{className:"".concat(x?"md:w-2/3":""," ").concat(d?"px-6 py-6":""," md:mx-4"),children:[u?(0,n.jsx)("div",{className:"content content--no-width-restriction pb-2 text-sm italic",children:u}):null,h,!c&&(0,n.jsxs)("div",{className:"".concat(x?"mt-6 ":""," relative md:hidden"),children:[o?(0,s.cloneElement)(o,{className:"".concat(void 0!==o.props.className?o.props.className:""," font-bold absolute top-0 ").concat(i?"left-0":"right-0"),aligned:i?"left":"right"}):null,x]}),(0,n.jsx)("div",{className:"content content--no-width-restriction",children:p})]}),(0,n.jsxs)("div",{className:"hidden md:block ".concat(a?({top:"self-start",bottom:"self-end"})[a]:""," ").concat(x&&!d?"md:mx-4 md:w-1/3":"md:w-1/3"),children:[o?(0,s.cloneElement)(o,{className:"".concat(void 0!==o.props.className?o.props.className:""," font-bold absolute top-0 ").concat(i?"left-0":"right-0"),aligned:i?"left":"right"}):null,(0,n.jsx)("div",{className:a?({top:"-mt-24",bottom:"-mb-24"})[a]:"",children:x})]})]})})},ti=(()=>{try{return new URL(o._.NEXT_PUBLIC_APP_URL).hostname.toLowerCase()}catch(e){return""}})(),to=ti.endsWith(".elanco.com")||"elanco.com"===ti;function tc(e){if(!e.toLowerCase().startsWith("http"))return e;try{let t=new URL(e),l=t.hostname.toLowerCase();if(!(l.endsWith(".elanco.com")||l.endsWith(".elancoapps.com")||"elanco.com"===l||"elancoapps.com"===l))return e;if(!to||ti&&l===ti)return t.pathname+t.search+t.hash}catch(e){}return e}let td=ep()(()=>l.e(438).then(l.bind(l,64438)).then(e=>
1e.CouponIframeComponent),{loadableGenerated:{webpack:()=>[64438]},ssr:!1}),tm=e=>{let{className:t="",reversed:l=!1,titleBelowImageOnMobile:a=!1,imgPosOnMobileSameAsDesktop:s=!1,title:r,image:o,infoSection:c,textAlignmentCenter:d,buttonSection:m}=e;return(0,n.jsxs)("div",{className:(0,i.$)("relative","px-6","py-4","md:flex","md:px-0","md:py-8",{"flex-row-reverse":l},{className:t}),children:[(0,n.jsxs)("div",{className:o?(0,i.$)("md:w-1/2",{"md:ml-8":l,"md:mr-8":!l}):"",children:[!a&&(0,n.jsx)("div",{className:d?"md:hidden":"",children:r}),!s&&(0,n.jsx)("div",{className:"mt-6 md:hidden",children:o}),a?(0,n.jsx)("div",{className:"mt-6 md:mt-0",children:r}):null,d?(0,n.jsxs)("div",{className:"md:flex md:h-full md:flex-col md:justify-center",children:[!a&&(0,n.jsx)("div",{className:"hidden md:block",children:r}),c]}):(0,n.jsx)(n.Fragment,{children:c}),m]}),(0,n.jsx)("div",{className:(0,i.$)("relative",{"mt-8 md:mt-0":s,"hidden md:block":!s},{"md:flex-1":null!=o}),children:o})]})};async function tu(e){let{queryKey:t,pageParam:l}=e,[,n]=t,{codename:a,locale:s,excludeId:r,filters:i,hideElementCodename:o,limit:c,orderBy:d,skip:m,roles:u}=n,h=new URLSearchParams({codename:a,locale:s});r&&h.set("excludeId",r),i&&h.set("filters",i),o&&h.set("hideElementCodename",o),null!==c&&h.set("limit",String(c)),null!==m&&(void 0!==l&&!Number.isNaN(l)&&c?h.set("skip",String((m+(l+1))*c)):h.set("skip",String(m))),d&&h.set("orderBy",d),"string"==typeof u?h.set("roles",u):Array.isArray(u)&&u.forEach(e=>{h.append("roles",e)});let{data:p}=await (0,eM.L)("/api/v2/lister-items?".concat(h.toString()));if(!p.success)throw Error(p.message);return p}let th=e=>{let{amount:t}=e,l=e=>(0,n.jsxs)("div",{className:"h-96 w-full animate-pulse rounded border border-gray-200 p-4 shadow-md",children:[(0,n.jsx)("div",{className:"mb-4 h-2.5 w-48 rounded-full bg-gray-200"}),(0,n.jsx)("div",{className:"mb-4 h-48 rounded bg-gray-200"}),(0,n.jsx)("div",{className:"mb-2.5 h-2 max-w-[360px] rounded-full bg-gray-200"}),(0,n.jsx)("div",{className:"mb-2.5 h-2 rounded-full bg-gray-200"}),(0,n.jsx)("div",{className:"mb-2.5 h-2 max-w-[330px] rounded-full bg-gray-200"}),(0,n.jsx)("div",{className:"mb-2.5 h-2 max-w-[300px] rounded-full bg-gray-200"}),(0,n.jsx)("div",{className:"mb-2.5 h-2 max-w-[360px] rounded-full bg-gray-200"}),(0,n.jsx)("div",{className:"mb-2.5 h-2 max-w-[330px] rounded-full bg-gray-200"}),(0,n.jsx)("div",{className:"mb-2.5 h-2 max-w-[300px] rounded-full bg-gray-200"}),(0,n.jsx)("span",{"aria-busy":"true","aria-live":"polite",className:"sr-only",role:"alert",children:"Loading..."})]},e);return t?(0,n.jsx)(n.Fragment,{children:Array(t).fill(1).map((e,t)=>l(t))}):l()},tp=e=>{var t,l,s,r,o,c,d,m;let{block:{elements:{button:u,content:h,hasTitleLink:p,image:x,imageOnLeft:f,makeTheImageAClickableLink:g,removeBorders:v,stackButtons:b,title:y,titleUrl:j,cardContentInCenter:w,imageClickDestinationUrl:N},system:{codename:_}},...k}=e,{locale:C=""}=(0,a.useRouter)(),S="",L=(null==(t=u[0])?void 0:t.system.type)==="cta_button"?u[0].elements.url:void 0;(null==(l=g[0])?void 0:l.codename)==="yes"&&(""!==N?S=$(N,C):L&&(S=$(L,C)));let T=L?$(L,C):null,I=(null==(s=p[0])?void 0:s.codename)==="yes"&&""!==j?$(j,C):T;return(0,n.jsxs)(et,{cardContentInCenter:(null==(r=w[0])?void 0:r.codename)==="yes",className:(0,i.$)((null==(o=v[0])?void 0:o.codename)==="yes"?void 0:"p-4","h-full flex-none text-black"),"data-kontent-element-codename":"enhanced_card",imageOnLeft:(null==(c=f[0])?void 0:c.codename)==="yes",mobileOnlyHref:I,mobileOnlyHrefLabel:y,removeBorders:(null==(d=v[0])?void 0:d.codename)==="yes",title:(0,n.jsx)("span",{"data-kontent-element-codename":"card_title",children:y}),children:[x[0]?(0,n.jsx)(ee,{alt:x[0].description,className:(0,i.$)("h-48",(null==(m=v[0])?void 0:m.codename)==="yes"?"object-cover":"",_.startsWith("brand")?"object-cover":"object-contain"),"data-kontent-element-codename":"image",imageUrl:S,src:x[0].url}):null,(0,n.jsx)("div",{className:"content m-0 w-full break-words",dangerouslySetInnerHTML:{__html:h.value},"data-kontent-element-codename":"text"}),(0,n.jsx)(el,{children:(0,n.jsx)(n.Fragment,{children:u.map((e,t,l)=>{var a,s,r,o,c,d;return"cta_button"===e.system.type?(0,n.jsx)(X,{block:e,className:(0,i.$)("mb-2",1===l.length?"w-full":null,t<l.length-1&&1!==l.length?"mr-4":null,(null==(a=v[0])?void 0:a.codename)==="yes"||(null==(s=b[0])?void 0:s.codename)==="yes"?"w-full":null),...k},e.system.id):(0,n.jsx)("div",{className:(0,i.$)("mb-2 inline-block",1===l.length?"w-full":null,t<l.length-1&&1!==l.length?"mr-4":null,(null==(r=v[0])?void 0:r.codename)==="yes"||(null==(o=b[0])?void 0:o.codename)==="yes"?"w-full":null,"[&>div]:text-left","[&>div]:my-0 [&_.swn-tag-wtb-btn]:mt-0",(1===l.length||(null==(c=v[0])?void 0:c.codename)==="yes"||(null==(d=b[0])?void 0:d.codename)==="yes")&&"[&_.swn-tag-wtb-btn]:w-full"),"data-kontent-item-id":e.system.id,children:(0,n.jsx)(e6,{block:e,...k})},e.system.id)})})})]})};var tx=l(14302),tf=l.n(tx);let tg=e=>{let t,l,{children:a,className:r=""}=e,i=(0,s.createRef)(),o=!1,c=e=>!i.current||t===e.pageX-i.current.offsetLeft||(e.preventDefault(),!1),d=s.Children.map(a,(e,t)=>{let l=(0,s.cloneElement)(e,{children:(0,n.jsx)("span",{itemProp:"title",children:e.props.children}),key:e.key,itemProp:"url","aria-current":!a.length||t===a.length-1,className:"mr-2",onClick:c});return(0,n.jsx)("li",{className:"whitespace-nowrap ".concat(tf().crumb,' fist:hidden shrink-0 self-center text-xs before:mr-2 before:inline-block before:h-[9px] before:w-[5px] before:align-middle before:content-[""] last:pr-4 [&>a]:hover:text-primary-dark'),children:l},"".concat(l.key,"l"))});return(0,n.jsx)("nav",{"aria-label":"Breadcrumb",className:"".concat(r," ").concat(tf().wrapper,' relative after:absolute after:right-0 after:top-0 after:block after:h-full after:w-10 after:content-[""]'),children:(0,n.jsx)("div",{className:"no-scrollbar flex h-8 flex-nowrap overflow-x-auto",onMouseDown:e=>{i.current&&(o=!0,t=e.pageX-i.current.offsetLeft,l=i.current.scrollLeft)},onMouseLeave:()=>{o=!1},onMouseMove:e=>{if(!o||!i.current)return;e.preventDefault();let n=(e.pageX-i.current.offsetLeft-t)*3;i.current.scrollLeft=l-n},onMouseUp:()=>{o=!1},ref:i,role:"presentation",children:(0,n.jsx)("ol",{className:"flex items-center",children:d})})})},tv=e=>{var t,l,a,s,r,o;let{block:d,page:m,isHorizontal:u,...h}=e,p=(r=d.elements.brandColor||void 0,o=null==(t=d.elements.brand[0])?void 0:t.codename,r||o);return(0,n.jsxs)("li",{className:(0,i.$)("mb-4 flex",u&&"mr-3 flex-col"),"data-kontent-item-id":d.system.id,children:[(0,n.jsx)(S,{brand:function(e){var t;if(!e)return"none";let l=(0,eT.oU)(e)||(0,eT.ps)(e);return null!=(t=null==l?void 0:l.id)?t:e}(p),className:"flex-shrink-0",iconCustomClasses:function(e){if(!e)return"";let t=(0,eT.oU)(e)||(0,eT.ps)(e);return t?"border-".concat(t.id):""}(p),noBorder:!0,showSquareIcon:(null==(l=d.elements.squareIcon[0])?void 0:l.codename)==="yes",size:(null==(a=d.elements.iconSize[0])?void 0:a.codename)||"lg",children:(0,n.jsx)("div",{className:"relative h-full w-full",children:d.elements.icon[0]?(0,n.jsx)(f(),{alt:null!=(s=d.elements.icon[0].description)?s:"","data-kontent-element-codename":"icon",fill:!0,loader:v.L,src:d.elements.icon[0].url}):null})}),(0,n.jsxs)("div",{className:"ml-2",children:[(0,n.jsx)("div",{className:"font-bold",children:d.elements.title}),"<p><br></p>"!==d.elements.text.value&&(0,n.jsx)(c.rM,{element:d.elements.text,page:m,...h})]})]},d.system.id)},tb=e=>{var t,l;let{block:a,className:s,page:r,...o}=e,c=(null==(t=a.elements.horizontal[0])?void 0:t.codename)==="yes";return(0,n.jsxs)("div",{children:[a.elements.title?(0,n.jsx)("h4",{children:a.elements.title}):null,(0,n.jsx)("ul",{className:(0,i.$)("container-narrow container",c&&"m-0 mb
1-2 flex flex-wrap p-0",s||d,(null==(l=a.elements.margin[0])?void 0:l.codename)==="no"?"":d),children:a.elements.items.map(e=>(0,n.jsx)(tv,{block:e,isHorizontal:c,page:r,...o},e.system.id))})]})};function ty(){let[e,t]=(0,s.useState)(),l=(0,s.useRef)(null);return(0,s.useEffect)(()=>{let n=()=>{var l;let n=null==(l=document.cookie.split("; ").find(e=>e.startsWith("notice_preferences=")))?void 0:l.split("=")[1];n&&n!==e&&((0,eF.OG)("Cookie value has changed to ".concat(document.cookie)),t(n))};return n(),l.current=setInterval(n,1e3),()=>{l.current&&clearInterval(l.current)}},[e]),e}let tj=()=>(0,n.jsx)("div",{className:"container-narrow",children:(0,n.jsx)("div",{className:"h-96 bg-blue-900"})});var tw=l(15552),tN=l(60848);let t_={time:()=>0,duration:()=>0,bind:()=>void 0,pause:()=>void 0,play:()=>void 0},tk=e=>{let{alt:t="",autoPlay:l=!1,className:a="",id:r,componentSpacing:o,spacing:c,wistiaPodcast:d,playSuspendedOffScreen:m=!0,isActiveSlide:u=!0}=e,h=(0,s.useRef)(t_),p=(0,s.useRef)([10,25,50,75]),x=(0,s.useRef)(!1),f=(0,s.useRef)(!1),g=(0,s.useRef)(!1),v=(0,tN.w)(),[y,j]=(0,s.useState)(!1);(0,s.useEffect)(()=>{"ADVERTISE_COOKIES"===v||"ALL_COOKIES"===v?j(!0):j(!1)},[v]);let w=()=>{x.current||((0,b.d)({event:"video_start",video_title:"".concat(t||"No alt text set"," (wistia id: ").concat(r,")"),video_url:"https://elancoanimalhealth.wistia.com/medias/".concat(r)}),x.current=!0)},N=()=>{f.current||((0,b.d)({event:"video_complete",video_percent:"100%",video_title:"".concat(t," (wistia id: ").concat(r,")"),video_url:"https://elancoanimalhealth.wistia.com/medias/".concat(r),video_duration:h.current.duration()}),f.current=!0)},_=e=>{h.current=e,e.bind("play",w),e.bind("end",N)};(0,s.useEffect)(()=>{var e;null!=(e=window)._wq||(e._wq=[]),window._wq.push({id:r,onReady:_}),window._wq.push(e=>{e.consent(y)})},[y]),(0,s.useEffect)(()=>{let e=setInterval(()=>{let e=h.current,l=e.time()/e.duration()*100,n=p.current.length,a=[...p.current].filter(n=>{let a=l>=n;return a&&(0,b.d)({event:"video_progress",video_percent:"".concat(n,"%"),video_title:"".concat(t," (wistia id: ").concat(r,")"),video_url:"https://elancoanimalhealth.wistia.com/medias/".concat(r),video_duration:e.duration()}),!a});a.length<n&&(p.current=a)},2e3);return()=>{clearInterval(e)}},[t,r]),(0,s.useEffect)(()=>{let e=()=>{m&&(document.hidden||!u?(h.current.pause(),g.current=!0):g.current&&(g.current=!1))};return document.addEventListener("visibilitychange",e),()=>{document.removeEventListener("visibilitychange",e)}},[u,m]);let k=(null==d?void 0:d.choice)==="podcast"?"218px":"100%",C=["playSuspendedOffScreen=".concat(m),"autoPlay=".concat(l?"1":"0")].join("&");return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(tw.m,{children:(0,n.jsx)("script",{async:!0,src:"//fast.wistia.net/assets/external/E-v1.js"})}),(0,n.jsx)("div",{className:(0,i.$)(a,o!==(null==c?void 0:c.none)?"container-wide":"w-full","flex justify-center rounded-md py-4"),children:(0,n.jsx)("div",{className:(0,i.$)((null==d?void 0:d.choice)==="podcast"?"px-0 pb-0 pt-[20%]":"px-0 pb-0 pt-[52%]","wistia_responsive_padding relative w-[inherit]"),children:(0,n.jsx)("div",{className:"wistia_responsive_wrapper absolute left-0 top-0 h-full w-full",children:(0,n.jsx)("iframe",{allow:"autoplay; fullscreen",allowFullScreen:!0,className:"wistia_embed",frameBorder:"0",height:k,name:"wistia_embed",scrolling:"no",src:"https://fast.wistia.net/embed/iframe/".concat(r,"?videoFoam=true&").concat(C),title:t,width:"100%"})})})})]})},tC=e=>{var t,l,a,s,r;let{block:o,className:d,...u}=e,h=m[null==(t=o.elements.snippetSpacingSpacing[0])?void 0:t.codename]||m.default,p=ty(),x={left:"text-left",center:"text-center",right:"text-right",justify:"text-justify"}[null!=(s=null==(l=o.elements.textAlignment[0])?void 0:l.codename)?s:"left"];return(0,n.jsx)("div",{className:h,children:"0:"!==p&&p?(0,n.jsxs)("div",{className:(0,i.$)(h===m.none?"mb-4 w-full pb-6 lg:mb-10 lg:pb-10":"container-wide mb-4 pb-6","my-0 flex flex-col py-0",x),children:["<p><br></p>"!==o.elements.videoDescription.value&&(0,n.jsx)(c.rM,{element:o.elements.videoDescription,...u}),(0,n.jsx)(tk,{alt:o.elements.alt,className:d,componentSpacing:h,id:o.elements.id,spacing:m,wistiaPodcast:{choice:(null==(a=o.elements.wistiaPodcast[0])?void 0:a.codename)||"video"}}
1)]}):(0,n.jsx)("div",{className:"flex justify-center",children:o.elements.cookieFallbackImage[0]?(0,n.jsx)(f(),{alt:null!=(r=o.elements.cookieFallbackImage[0].description)?r:"",height:384,loader:v.L,src:o.elements.cookieFallbackImage[0].url,width:800}):(0,n.jsx)(tj,{})})})},tS=e=>{let{children:t,className:l=""}=e,[a,r]=(0,s.useState)();return(0,s.useEffect)(()=>{r(!!document.querySelector("#theme"))},[]),(0,n.jsx)("dl",{className:(0,i.$)(a?"bg-alternative":"bg-white","shadow-tertiary rounded-lg",l),children:t})},tL=e=>{let{children:t,className:l="",expanded:a=!1,iconColor:r="#000000",title:o="",isTitleBold:c=!1}=e,[d,m]=(0,s.useState)(a),[u,h]=(0,s.useState)(!1);return(0,s.useEffect)(()=>{h(null!==document.querySelector("#theme"))},[]),(0,n.jsxs)("div",{className:"border-b border-elanco-beige last-of-type:border-0",children:[(0,n.jsx)("dt",{children:(0,n.jsx)("button",{"aria-expanded":d,className:"w-full px-5 py-5 text-left text-black",onClick:()=>{(0,b.d)({event:"accordion_click",accordion_name:o,accordion_status:d?"close":"open"}),m(!d)},type:"button",children:(0,n.jsxs)("div",{className:"flex items-center",children:[(0,n.jsx)("svg",{className:(0,i.$)("mr-4 h-4 w-4 shrink-0 transition-all duration-300",d&&"rotate-45"),fill:r,height:"26.883",viewBox:"0 0 26.883 26.883",width:"26.883",children:(0,n.jsx)("path",{d:"M1.9,18.729l-1.6-1.595a1,1,0,0,1,0-1.414l6.2-6.2-6.2-6.2a1,1,0,0,1,0-1.414L1.9.306a1,1,0,0,1,1.415,0l6.2,6.2,6.2-6.2a1,1,0,0,1,1.415,0l1.595,1.6a1,1,0,0,1,0,1.414l-6.2,6.2,6.2,6.2a1,1,0,0,1,0,1.414l-1.595,1.595a1,1,0,0,1-1.415,0l-6.2-6.2-6.2,6.2a1,1,0,0,1-1.414,0Z",transform:"translate(".concat(d?23.442:13.442," ").concat(d?3.9982:-.018,") rotate(").concat(d?90:45,")")})}),(0,n.jsx)("h2",{className:(0,i.$)("text-base",c?"font-bold":"font-normal",d?u?"text-main":"text-black":u?"text-alternative":""),children:o})]})})}),(0,n.jsx)("dd",{className:(0,i.$)("content--no-width-restriction px-5",l,d?"block pb-6":"hidden"),children:t})]})};var tT=l(43060);let tI=e=>{let{className:t="",videoId:l="",isPlaying:a=()=>null,playAt:r=0,isNotSkippable:o=!1,pauseHandler:c=()=>null,endVideoHandler:d=()=>null,aspectRatio:m="16:9"}=e,[u,h]=(0,s.useState)(!1),[p,x]=(0,s.useState)(),f=(e=>{let[t,l]=e.split(":"),n=parseInt(null!=t?t:"1",10);return parseInt(null!=l?l:"1",10)/n*100})(m),[g,v]=(0,s.useState)(!0),[y,j]=(0,s.useState)(1),[w,N]=(0,s.useState)(""),[_,k]=(0,s.useState)(""),[C,S]=(0,s.useState)([10,25,50,75]),[L,T]=(0,s.useState)(null),I=ty(),[E,A]=(0,s.useState)(!1);(0,s.useEffect)(()=>{"1:"===I?A(!0):A(!1)},[I]);let F=(0,s.useRef)(null);(0,s.useEffect)(()=>(F.current=setInterval(()=>{if(null==L?void 0:L.target.getCurrentTime()){let e=L.target.getCurrentTime()/y*100,t=C.length,l=[...C].filter(t=>{let l=e>=t;return l&&(0,b.d)({event:"video_progress",video_percent:"".concat(t,"%"),video_title:w,video_url:_,video_duration:y}),!l});l.length<t&&S(l)}},2e3),()=>{F.current&&(clearInterval(F.current),F.current=null)}),[L,y,C,w,_]);let B=()=>void 0!==p;return(0,n.jsxs)("div",{className:(0,i.$)("relative h-0 w-full max-w-screen-xl overflow-hidden",t),style:{paddingBottom:"".concat(f,"%")},children:[(0,n.jsx)(tT.A,{className:"absolute left-0 top-0 h-full w-full",onEnd:()=>{(0,b.d)({event:"video_complete",video_percent:"100%",video_title:w,video_url:_,video_duration:y}),d()},onPause:e=>{c(0!==e.target.getCurrentTime()),a(!1)},onPlay:e=>{a(!0),g&&((0,b.d)({event:"video_start",video_title:w,video_url:_}),v(!1)),T(e)},onReady:e=>{e.target.mute(),x(e.target),j(e.target.getDuration()),N(e.target.videoTitle),k(e.target.playerInfo.videoUrl),u&&(h(!0),B()&&(null==p||p.seekTo(r),null==p||p.unMute()))},opts:{height:"100%",width:"100%",playerVars:{autoplay:0,rel:0,controls:1,modestbranding:1,disablekb:o,fs:!o,playsinline:o},host:E?"https://www.youtube-nocookie.com":"https://www.youtube.com"},videoId:l}),o?(0,n.jsx)("div",{className:"absolute left-0 right-0 h-6",style:{bottom:"35px"}}):null]})},tE=e=>{let{backgroundColor:t,className:l="",videoId:a,posterFrameImageUrl:r="",transcript:i,title:o="",children:c=null,fullScreenIconOnLeft:d=!1,icons:m=null,noFullScreenButton:u=!1,controls:h=0,fullscreenButtonAriaLabel:p="Open video in fullscreen",playButtonAriaLabel:x="Play video",playButtonText:f="Play",closeButtonAriaLabel:g="Close fullscreen modal",closeButtonText:v="Close",shareBlock:b=null,isPlaying:y=()=>null,onEnd:j=()=>null,onPause:N=()=>null,playAt:_=0,isNotSkippable:k=!1,backgroundColorClass:C="bg-blue-transparent"}
1=e,[S,L]=(0,s.useState)(!1),[T,I]=(0,s.useState)(!1),[E,A]=(0,s.useState)(!1),F=(0,s.useRef)(null);return(0,n.jsxs)("div",{children:[(0,n.jsxs)("div",{className:"".concat(l," ").concat(C," block w-full overflow-hidden rounded-lg shadow-secondary ").concat(S?"fixed inset-0 px-4 md:px-10":"relative"),style:{backgroundImage:T?"none":"url('".concat(r,"')"),backgroundColor:T&&!S?"#000":t,backgroundSize:"cover",backgroundPosition:"center",paddingBottom:T?0:"56.25%",zIndex:S?999:void 0},children:[(0,n.jsxs)("div",{className:"",style:{zIndex:"9"},children:[!u&&(0,n.jsx)(w,{as:"button",className:"absolute mt-4 ".concat(d?"left-0 ml-4":"right-0 mr-4"," ").concat(E?"hidden":""),icon:(0,n.jsxs)("svg",{"aria-hidden":"true",focusable:"false",height:"15.07",viewBox:"0 0 14.92 15.07",width:"14.92",xmlns:"http://www.w3.org/2000/svg",children:[(0,n.jsx)("title",{children:"icon-expand"}),(0,n.jsx)("path",{d:"M7.18,9.43,4.1,12.51l2.56,2.56H0V8.41L2.56,11,5.64,7.89Z",style:{fill:"#fff"},transform:"translate(0)"}),(0,n.jsx)("path",{d:"M14.92,0V6.67L12.36,4.1,9.28,7.18,7.74,5.64l3.08-3.08L8.25,0Z",style:{fill:"#fff"},transform:"translate(0)"})]}),iconSize:"w-5 h-5 md:w-4 md:h-4",onClick:()=>{L(!0),A(!0)},size:"w-10 h-10 md:w-9 md:h-9",children:p}),(0,n.jsxs)("div",{className:"absolute right-0 z-10 text-center text-white ".concat(m?"mt-2":"mt-20"," mr-4"),children:[m?(()=>{if(!m||!(0,s.isValidElement)(m))return null;let e=m.props.children,t={className:"bg-blue-900 z-10 h-16 w-16 mb-2 flex justify-center items-center"};if(!Array.isArray(e)){if((0,s.isValidElement)(e)){var l;return(0,s.cloneElement)(e,{...t,key:null!=(l=e.key)?l:"single-icon"})}return null}return e.filter(e=>(0,s.isValidElement)(e)).map((e,l)=>{var n;return(0,s.cloneElement)(e,{...t,key:null!=(n=e.key)?n:"icon-".concat(l)})})})():null,null!==b&&(0,n.jsx)("div",{className:"relative",children:b})]})]}),a?(0,n.jsx)(w,{as:"button",className:"absolute inset-0 z-10 m-auto ".concat(T?"hidden":""),icon:(0,n.jsx)("svg",{className:"pl-2",height:"18.492",viewBox:"0 0 15.954 18.492",width:"15.954",children:(0,n.jsx)("path",{d:"M8.381,1.493a1,1,0,0,1,1.73,0l7.511,12.96a1,1,0,0,1-.865,1.5H1.735a1,1,0,0,1-.865-1.5Z",transform:"translate(15.954) rotate(90)"})}),iconSize:"w-8 h-14 md:w-7 md:h-10",iconText:f,onClick:()=>{var e;I(!0),null==(e=F.current)||e.playVideo()},size:"w-20 h-20 md:w-16 md:h-16",children:x}):null,(0,n.jsx)(H.$,{as:"button",className:"absolute ".concat(d?"left-0 ml-4":"right-0 mr-4"," z-10 mt-4 bg-blue-800 text-white hover:bg-blue-900 ").concat(E?"":"hidden"),icon:(0,n.jsx)("svg",{height:"21.5",viewBox:"0 0 21.499 21.5",width:"21.499",children:(0,n.jsx)("path",{d:"M-45.484,39.457l-1.973-1.973a1,1,0,0,1,0-1.415l7.07-7.07-7.069-7.07a1,1,0,0,1,0-1.414l1.973-1.973a1,1,0,0,1,1.414,0L-37,25.612l7.069-7.069a1,1,0,0,1,1.414,0l1.973,1.973a1,1,0,0,1,0,1.414L-33.613,29l7.07,7.07a1,1,0,0,1,0,1.414l-1.973,1.973a1,1,0,0,1-1.414,0L-37,32.386l-7.07,7.071a1,1,0,0,1-.707.293A1,1,0,0,1-45.484,39.457Z",transform:"translate(47.75 -18.25)"})}),onClick:()=>{L(!1),A(!1)},reversed:!0,title:g,children:v}),a?(0,n.jsx)("div",{className:"mx-auto flex h-full w-full max-w-screen-xl items-center",children:(0,n.jsx)(tI,{className:"absolute mx-auto ".concat(T?"":"hidden"),controls:h,endVideoHandler:()=>{j()},isNotSkippable:k,isPlaying:y,pauseHandler:e=>{e||I(!1),N(e)},playAt:_,videoId:a})}):null]}),(0,n.jsx)("div",{className:"mt-4 ".concat(i?"":"hidden"),children:(0,n.jsx)("div",{className:"mt-6",children:(0,n.jsx)(tS,{className:"overflow-hidden rounded-lg shadow-secondary",children:(0,n.jsx)(tL,{className:"bg-white pt-5",title:o,children:c})})})})]})},tA=e=>{var t,l,a;let{block:s,className:r,...o}=e,d=m[null==(t=s.elements.snippetSpacingSpacing[0])?void 0:t.codename]||m.default,u="<p><br></p>"!==s.elements.transcript.value,h=ty();return(0,n.jsx)("div",{className:(0,i.$)("flex justify-center",d),children:"0:"===h?(0,n.jsx)(n.Fragment,{children:s.elements.cookieFallbackImage[0]?(0,n.jsx)(f(),{alt:null!=(a=s.elements.cookieFallbackImage[0].description)?a:"",height:s.elements.cookieFallbackImage[0].height||720,loader:v.L,src:s.elements.cookieFallbackImage[0].url,width:s.elements.cookieFallbackImage[0].width||1280}):(0,n.jsx)(tj,{})}):(0,n.jsxs)("div",{className:r||(0,i.$)(d!==m.none?"mx-2":null,"w-full md:w-10/12 lg:w-full"),children:[!!s.elements.videoTitle&&(0,n.jsx)("h2",{children:s.elements.videoTitle}),!!s.elements.videoDescription&&(0,n.jsx)("p",{className:"my-6",children:s.elements.videoDescription}),(0,n.jsx)(tE,{posterFrameImageUrl:null==(l=s.elements.posterFrameImage[0])?void 0:l.url,title:(0,n.jsx)("span",{"data-kontent-element-codename":"title",children:s.elements.title}),transcript:!!u,videoId:s.elements.videoId,children:!!u&&(0,n.jsx)(c.rM,{className:"text-blue-900",element:s.elements.transcript,...o}
1)})]})})},tF=e=>{let{className:t="",title:l="",desc:a="",reps:r=[],searchLabel:i="Search",chooseFromRepsLabel:o="Choose from our reps",emailNowText:c="Email me now",yourRepsText:d="Your representative(s)"}=e,[m,u]=(0,s.useState)([]),[h,p]=(0,s.useState)(""),[x,g]=(0,s.useState)(""),b=e=>{e.length&&u(r.filter(t=>t.name.toLowerCase().includes(e.toLowerCase())))};return(0,n.jsxs)("div",{className:"max-w-xl overflow-hidden rounded-lg border border-gray-500 bg-gray-100 p-4 shadow-secondary ".concat(t),children:[(0,n.jsxs)("div",{className:"mb-12 px-5",children:[(0,n.jsx)("h3",{className:"mb-2",children:l}),(0,n.jsx)("p",{children:a})]}),(0,n.jsxs)("div",{className:"w-full",children:[(0,n.jsxs)("form",{action:"",className:"relative",onSubmit:e=>{e.preventDefault(),g(""),b(h)},children:[(0,n.jsxs)("label",{htmlFor:"search-rep",children:[(0,n.jsx)("span",{className:"visuallyhidden",children:i}),(0,n.jsx)("input",{className:"mb-0 text-black","data-clarity-mask":"true",id:"search-rep",onChange:e=>{p(e.target.value)},placeholder:i,type:"text",value:h})]}),(0,n.jsx)(w,{as:"button",className:"absolute inset-y-0 right-0 my-auto mr-2",icon:P.v.Search,iconSize:"w-6 h-6",type:"submit",children:i})]}),(0,n.jsx)("div",{className:"relative mt-6",children:(0,n.jsxs)("label",{htmlFor:"select-rep",children:[(0,n.jsx)("span",{className:"visuallyhidden",children:o}),(0,n.jsxs)("select",{className:"appearance-none border border-gray-500",id:"select-rep",onChange:e=>{g(e.target.value),p(""),b(e.target.value)},value:x,children:[(0,n.jsx)("option",{value:"",children:o}),(0,n.jsx)("option",{disabled:!0,value:"",children:"-------------------------------------------"}),r.map(e=>(0,n.jsx)("option",{value:e.name,children:e.name},e.name))]}),(0,n.jsxs)("svg",{height:"46",viewBox:"0 0 48 48",width:"46",xmlns:"http://www.w3.org/2000/svg",children:[(0,n.jsx)("rect",{fill:"#0067B1",height:"48",rx:"24",width:"48"}),(0,n.jsx)("path",{d:"M7,10,18.426,21.426,29.853,10Z",fill:"#fff",fillRule:"evenodd",transform:"translate(5.574 10.287)"})]})]})})]}),m.length>0&&(0,n.jsxs)("div",{className:"mt-8",children:[(0,n.jsx)("p",{className:"mb-2 px-5 italic",children:d}),(0,n.jsx)("div",{className:m.length>1?"max-h-screen overflow-y-scroll sm:h-64":"",children:m.map((e,t)=>(0,n.jsxs)("div",{className:"rounded-lg border border-gray-400 bg-gray-200 p-4 text-center sm:flex sm:items-center sm:p-6 sm:text-left ".concat(t>0?"mt-6":""),children:[(0,n.jsx)("div",{className:"sm:w-1/2 sm:pr-8",children:(0,n.jsx)(f(),{alt:e.name,className:"mx-auto rounded-full",height:300,loader:v.L,src:e.thumbnailUrl||"",width:300})}),(0,n.jsxs)("div",{className:"mt-4 sm:mt-0",children:[(0,n.jsx)("h4",{className:"mb-1 text-xl",children:e.name}),(0,n.jsx)("p",{className:"mb-6",children:e.jobTitle}),(0,n.jsx)("p",{className:"mb-3",children:(0,n.jsx)(D,{className:"text-sm not-italic",href:"tel:".concat(e.phoneNumber),icon:(0,n.jsx)("svg",{height:"21",viewBox:"0 0 21 21",width:"21",children:(0,n.jsx)("path",{d:"M20.4,14.84l-4.594-1.969a.984.984,0,0,0-1.148.283L12.624,15.64A15.2,15.2,0,0,1,5.357,8.372L7.842,6.338a.982.982,0,0,0,.283-1.148L6.157.6A.991.991,0,0,0,5.029.025L.763,1.01A.984.984,0,0,0,0,1.969,19.029,19.029,0,0,0,19.031,21a.984.984,0,0,0,.96-.763l.984-4.266A1,1,0,0,0,20.4,14.84Z",transform:"translate(0 0)"})}),children:(0,n.jsx)("span",{children:e.phoneNumber})})}),(0,n.jsx)("p",{children:(0,n.jsx)(D,{className:"text-sm not-italic",href:"mailto:".concat(e.email),icon:(0,n.jsx)("svg",{height:"24.456",viewBox:"0 0 22.709 24.456",width:"22.709",children:(0,n.jsx)("path",{d:"M25.511,11.956c-.218-.218-8.641-8.811-8.641-8.811a3,3,0,0,0-4.28.005S4.2,11.694,3.948,11.961a2.193,2.193,0,0,0-.573,1.425V24.959a1.752,1.752,0,0,0,1.747,1.747H24.337a1.752,1.752,0,0,0,1.747-1.747V13.332A2.1,2.1,0,0,0,25.511,11.956Zm-1.059,2.309-4.427,4.629a.106.106,0,0,0,0,.153l4.111,4.378a.708.708,0,0,1,0,1,.712.712,0,0,1-1,0l-8.243-8.8a.215.215,0,0,0-.317,0L6.334,24.424a.712.712,0,0,1-1,0,.708.708,0,0,1,0-1L9.44,19.042a.116.116,0,0,0,0-.153L5,14.26a1.245,1.245,0,0,1,.879-1.954H23.584A1.289,1.289,0,0,1,24.452,14.265Z",transform:"translate(-3.375 -2.25)"})}),children:(0,n.jsx)("span",{children:c})})})]})]},e.name))})]})]})},tB=e=>{var t;let{block:l,page:a,...s}=e,r=m[null==(t=l.elements.snippetSpacingSpacing[0])?void 0:t.codename]||m.none,{hexCode:o}=G({blockColor:l.elements.expandIconColorPicker,blockColorLegacy:l.elements.expandIconColor,pageConfig:a.elements.config[0],fallbackColorId:"black",fallbackHexColor:"#000000"}),d=null!=o?o:"#000000";return(0,n.jsx)("div",{className:r,children:(0,n.jsx)(tS,{className:"container-narrow faq-block","data-kontent-element-codename":"faq_items",children:l.elements.faqItems.map(e=>{var t,l;return(0,n.jsxs)(tL,{"data-kontent-element-codename":"faq_item",iconColor:d,title:e.elements.title,children:[(0,n.jsxs)("div",{className:(0,i.$)("mt-6",(null==(t=e.elements.fullWidthImage[0])?void 0:t.codename)==="yes"?"flex-col":"flex"),children:[e.elements.imageUrl[0]?(0,n.jsx)("div",{className:(0,i.$)("overflow-hidden",(null==(l=e.elements.fullWidthImage[0])?void 0:l.codename)==="yes"?"mb-5 w-full":"w-1/2"),children:(0,n.jsx)(f(),{alt:"",className:"pr-2","data-kontent-element-codename":"image_url",height:e.elements.imageUrl[0].height||200,loader:v.L,src:e.elements.imageUrl[0].url,width:e.elements.imageUrl[0].width||200})}):null,(0,n.jsx)(c.rM,{className:(0,i.$)("content faq-content text-base text-black",e.elements.imageUrl[0]?"w-1/2 pl-2":""),element:e.elements.content,page:a,...s})]}),e.elements.faqItemButtons.map(e=>(0,n.jsx)(X,{block:e,className:"m-auto mr-6 mt-6",page:a,...s},e.system.id)),e.elements.video.map(e=>"video_block"===e.system.type?(0,n.jsx)(tA,{block:e,page:a,...s},e.system.id):(0,n.jsx)(tC,{block:e,page:a,...s},e.system.id))]},e.system.id)})})})};var tM=l(29531),tP=l(49470),tD=l(97324),tR=l.n(tD);let tq=e=>{var t,l;let{expanded:a=!0,selected:r=0,tabClasses:i="mx-2 px-4 py-4 rounded-t-lg text-center max-w-1/2 md:px-6 md:w-1/3 lg:w-3/12",ariaLabel:o="",className:c="",id:d="",headerHeight:m=0,isGrowable:u=!1,name:h="",children:p}
1=e,x=s.Children.toArray(p),[f,g]=(0,s.useState)(a),[v,b]=(0,s.useState)(!f||r?-1:(null==(l=x[r])||null==(t=l.props)?void 0:t.title)||""),[y,j]=(0,s.useState)(f?r:-1),[N,_]=(0,s.useState)(0),[k,C]=(0,s.useState)(0),[S,L]=(0,s.useState)(0),[T,I]=(0,s.useState)(),[E,A]=(0,s.useState)(),[F,B]=(0,s.useState)(),M=(0,s.useRef)(null),D=[],R=[],q=[],z=(0,s.useRef)(null),O=(0,s.useRef)(null),U=(0,s.useRef)(null),$=(e,t,l)=>{x.find(t=>t.props.title===e)&&b(e),j(t),g(!0),l&&l()},H=()=>{g(!1)},V=()=>{C(window.innerWidth||0),L(window.innerHeight||0)};return x.forEach((e,t)=>{let l=v===e.props.title,a="";D.push((0,n.jsx)(tM.Ph,{children:(s,r)=>(a=s,(0,n.jsx)("button",{"aria-controls":e.props.id||"panel".concat(s),"aria-selected":l,className:"mt-5 ".concat(i," ").concat(l?"bg-main font-bold text-main ":"bg-gray-200 text-blue-900 hover:bg-white"),id:"tab".concat(s),onClick:()=>{$(e.props.title,t)},role:"tab",style:{flexShrink:0,flexGrow:u?1:void 0,boxShadow:"0px -6px 12px 0px rgb(0 0 0 / 6%)"},tabIndex:l?0:-1,type:"button",children:e.props.title},r(e)))},"".concat(e.props.title,"-tabs-").concat(t))),R.push((0,n.jsx)(tM.Ph,{children:(l,r)=>(0,n.jsx)(n.Fragment,{children:(0,s.cloneElement)(e,{key:r(e),active:String(v)===e.props.title,expanded:f,closeBtnHandler:H,label:e.props.id||"tab".concat(a),panel:e.props.id||"panel".concat(a),headerHeight:m,changeTab:()=>{var l;l=e.props.title,g(!0),j(t),b(l)}})})},"".concat(e.props.title,"-tabs-").concat(t))),e.props.pinned&&q.push((0,n.jsx)(tM.Ph,{children:(l,s)=>(0,n.jsx)(n.Fragment,{children:k>275*(t+1)&&(0,n.jsx)("button",{className:"mx-2 w-60 cursor-default rounded-t-lg bg-gray-200 py-4 text-center text-blue-900 hover:bg-gray-300 lg:w-80",id:"pinnedTab".concat(l),onClick:()=>{$(e.props.title,t,()=>{(e=>{let t=document.getElementById(e),l=t?t.closest(".js-tabs-container"):document.querySelector(".js-tabs-container");if(!l)return;let n=document.querySelector("header"),a=((null==n?void 0:n.offsetHeight)||0)+10||0,s={top:l.offsetTop-a,left:0,behavior:"smooth"};window.scroll(s)})(e.props.id||"panel".concat(a))})},style:{boxShadow:"0px -6px 12px 0px rgb(0 0 0 / 6%)"},type:"button",children:e.props.title},s(e))})},"".concat(e.props.title,"-tabs-").concat(t)))}),(0,s.useEffect)(()=>{C(window.innerWidth||0),L(window.innerHeight||0),I(z.current||void 0),A(O.current||void 0),B(U.current||void 0),window.addEventListener("resize",V);let e=document.getElementById("sticky_bottom_nav_spacer")||document.getElementById("our_sticky_bottom_nav_spacer");return e&&new ResizeObserver(e=>{var t;let l=null==(t=e[0])?void 0:t.contentRect;if(l&&S!==N){let{height:e}=l;_(e)}}).observe(e),()=>{window.removeEventListener("resize",V)}},[h,N,S]),(0,s.useEffect)(()=>{T&&F&&T.offsetWidth<T.scrollWidth&&(F.classList.remove("hidden"),F.classList.add("block"),F.style.background="linear-gradient(to left, #FFFFFF 75%, transparent)")},[F,T]),(0,n.jsx)("div",{className:"js-tabs-container flex flex-col ".concat(c),id:d,onKeyDown:e=>{let t=y;("ArrowRight"===e.key||"ArrowLeft"===e.key)&&("ArrowRight"===e.key?(t+=1)>=D.length&&(t=0):(t-=1)<0&&(t=D.length-1),j(t))},ref:M,children:(0,n.jsxs)(tM.j7,{children:[!!q.length&&(0,n.jsx)(tP.A,{enableTransforms:!1,top:S-0-N,children:e=>{let{status:t}=e;return(0,n.jsx)(n.Fragment,{children:t===tP.A.STATUS_ORIGINAL&&(0,n.jsx)("div",{className:"fixed z-50 bg-transparent",id:"pinnedTabsBar",style:{bottom:"".concat(N,"px")},children:q})})}}),(0,n.jsx)("div",{className:"absolute mt-5 hidden h-9 w-10",id:"leftArrowBlock_".concat(h),ref:O,children:(0,n.jsx)(w,{className:"ml-2 mt-2",icon:P.v.ArrowLeft,iconSize:"w-3 h-3",onClick:()=>{T&&(T.scrollLeft-=100),F&&(F.classList.remove("hidden"),F.classList.add("block"),F.style.background="linear-gradient(to left, #FFFFFF 75%, transparent)"),T&&T.scrollLeft<=100&&E&&(E.classList.remove("block"),E.classList.add("hidden"),E.style.removeProperty("background"))},size:"w-4 h-4"})}),(0,n.jsx)("div",{"aria-label":o,className:"".concat(tR().scrollBar," flex overflow-x-auto scroll-smooth pb-0"),id:h,ref:z,role:"tablist",children:D}),(0,n.jsx)("div",{className:"absolute right-0 mt-5 hidden h-9 w-10",id:"rightArrowBlock_".concat(h),ref:U,children:(0,n.jsx)(w,{className:"ml-4 mt-2",icon:P.v.ArrowRight,iconSize:"w-3 h-3",onClick:()=>{T&&(T.scrollLeft+=100),E&&(E.classList.remove("hidden"),E.classList.add("block"),E.style.background="linear-gradient(to right, #FFFFFF 75%, transparent)"),T&&T.scrollLeft>=T.scrollWidth-T.offsetWidth-100&&F&&(F.classList.remove("block"),F.classList.add("hidden"),F.style.removeProperty("background"))},size:"w-4 h-4"})}),R]})})},tz=e=>{let{children:t,active:l=!1,expanded:a=!1,hideCloseBtn:s=!1,closeBtnHandler:r=()=>null,title:i="",panel:o="",label:c="",tabPaddingClasses:d="py-12 px-18",tabContentClassName:m=""}=e;return(0,n.jsxs)("div",{"aria-labelledby":c,className:"content content--no-width-restriction dark:bg-highlight ".concat(d," relative ").concat(l&&a?"block":"hidden"),id:o,role:"tabpanel",style:{boxShadow:"0px -6px 12px 0px rgb(0 0 0 / 6%)"},children:[(0,n.jsx)("div",{className:"text-sm ".concat(s?" h-full px-2":"mx-auto w-10/12 pr-6"),children:(0,n.jsx)("div",{className:s?"h-full":"max-w-7xl ".concat(m),children:t})}),!s&&(0,n.jsx)("button",{"aria-label":"Close ".concat(i," panel"),className:"absolute right-0 top-0 mr-10 mt-10 cursor-pointer",onClick:r,type:"button",children:(0,n.jsx)("svg",{className:"fill-current text-blue-500 hover:text-gray-600",height:"21.5",viewBox:"0 0 21.5 21.5",width:"21.5",children:(0,n.jsx)("path",{d:"M2.265,21.707.293,19.734a1,1,0,0,1,0-1.415l7.071-7.07L.293,4.18a1,1,0,0,1,0-1.414L2.266.793a1,1,0,0,1,1.414,0l7.07,7.07L17.819.794a1,1,0,0,1,1.414,0l1.973,1.973a1,1,0,0,1,0,1.414L14.137,11.25l7.07,7.07a1,1,0,0,1,0,1.414l-1.973,1.973a1,1,0,0,1-1.414,0l-7.07-7.07L3.68,21.707a1,1,0,0,1-1.415,0Z",transform:"translate(0 -0.5)"})})})]})},tO=e=>
1{let{className:t="",jobRole:l,name:a,showSquareIcon:s=!1,showFullWidth:r=!1,showLargeIcon:i=!1,thumbnailUrl:o,thumbnailAltText:c=""}=e;return(0,n.jsxs)("div",{className:"".concat(t," flex items-center p-3 ").concat(r?"w-full":"sm:w-1/2 md:w-full lg:w-1/2"),children:[(0,n.jsx)(S,{className:"mr-4 shrink-0",showSquareIcon:s,size:i?"md":"sm",children:(0,n.jsx)(f(),{alt:c,height:100,loader:v.L,src:o,width:100})}),(0,n.jsxs)("div",{className:"text-sm",children:[(0,n.jsx)("p",{children:a}),(0,n.jsx)("p",{className:"italic",children:l})]})]})},tU=e=>{let{children:t,className:l=""}=e;return(0,n.jsx)("div",{className:"-mx-3 flex-wrap sm:flex ".concat(l),children:t})},t$=e=>{let{alignment:t="top",alt:l="",children:a=null,className:r="",contain:o=!1,mediaAlignRight:c=!1,mediaLeftPosition:d="",mediaTopPosition:m="",src:u="",packshotImage:h=null,isMobile:p=!1}=e,x=null,g={top:"top-0",center:"inset-y-0",bottom:"bottom-0"},b=()=>{let e=e=>e>=0&&e<=100,t=/^\d+$/;return c?"".concat(t.test(d)&&e(Number(d))?d:"90","% ").concat(t.test(m)&&e(Number(m))?m:"10","%"):""},y=(0,i.$)("w-full",o?"object-contain object-top max-h-[380px]":"min-h-full md:object-cover","md:absolute inset-x-0 m-auto",o&&!h?"mt-12 md:mt-0":"",g[t],r);if(a)x=(0,n.jsx)("picture",{children:s.Children.map(a,e=>(0,s.isValidElement)(e)&&"img"===e.type?(0,s.cloneElement)(e,{className:y}):e)});else if(u){let e=(0,i.$)("w-full min-h-full object-contain md:absolute inset-x-0 m-auto",g[t],r);if(["mp4"].includes(u.split(".").pop()||""))x=(0,n.jsx)("video",{autoPlay:!0,className:e,loop:!0,muted:!0,playsInline:!0,preload:"true",src:u});else{let e={};b()&&(e={objectPosition:b()}),x=(0,n.jsx)(f(),{alt:l||"",className:y,height:391,loader:v.L,sizes:"(max-width: 1366px) 1080px, 2000px",src:u,style:e,width:p||o?375:2e3})}}return(0,n.jsxs)("div",{className:"h-full",children:[x,h]})},tH=e=>{let{alignment:t="top",alt:l="",className:a="",mediaAlign:s=!1,mediaRightPosition:r="",mediaTopPosition:o="",src:c,hasMobileImage:d}=e,m={top:"top-0",center:"inset-y-0",bottom:"bottom-0"},u=(0,T.l)(),h=e=>e&&s&&/^\d+$/.test(e)&&(e=>e>=0&&e<=100)(Number(e))?"".concat(e,"%"):"0%";return(()=>{let e=(0,i.$)("w-full","min-h-full","object-contain","md:absolute","inset-x-0","m-auto",m[t],a);return["mp4"].includes(c.split(".").pop()||"")?(0,n.jsx)("video",{autoPlay:!0,className:e,loop:!0,muted:!0,preload:"true",src:c}):(0,n.jsx)(f(),{alt:l||"",className:(0,i.$)(d?"absolute":"relative md:absolute","z-20","h-auto"),height:300,loader:v.L,src:c,style:{top:u.isMobile?"0%":h(o),right:u.isMobile?"0%":h(r)},width:400})})()},tV=e=>{let{bgColor:t="bg-transparent",bgImageSrc:l="",children:a=null,className:r="",contain:o=!1,containerSize:c="",fixedBlockHeight:d=!1,fixedInfoWidth:m=!1,fullBackgroundImage:u=!1,hasWhiteInfoContainerBg:h=!1,infoSectionTopStack:p=!1,leftAlignContentBlock:x=!1,light:g=!1,logoImgAlt:b="",logoImgSrc:y="",noTheme:j=!1,reversed:w=!1,reversedMobile:N=!1,widget:_=null}=e,k=s.Children.toArray(a),C="",S=k.find(e=>e.type===t$),L=k.filter(e=>e.type!==t$&&e.type!==tH);switch(c){case"sm":C="container-narrow";break;case"lg":C="w-100 pt-0 md:pt-0";break;default:C="".concat(S?"max-w-7xl":"max-w-5xl"," container-wide")}return(0,n.jsxs)("div",{className:(0,i.$)({[t]:j,[g?"bg-gray-200 text-blue-900":"bg-blue-900 text-white"]:!j},r),style:{backgroundImage:""!==l?"url(".concat(l,")"):"none",backgroundPosition:"center",backgroundSize:"cover"},children:[(0,n.jsxs)("div",{className:(0,i.$)({container:o,[C]:!o,"relative justify-between md:flex md:min-
1h-[380px] md:py-8":!0,"md:flex-row-reverse":w,"flex flex-col-reverse md:flex-row":N,"md:h-[450px]":d}),children:[(0,n.jsxs)("div",{className:(0,i.$)("h-full p-8 text-main",{"md:px-12":t,"break-word rounded-lg text-black":!0,"md:max-w-[450px] lg:max-w-[500px]":m,"md:w-1/2 lg:w-2/5":S,[x?"w-full":"mx-auto"]:!m&&!S,"bg-white":!(j&&"bg-transparent"!==t),"md:bg-white":u&&h,"md:bg-transparent":u&&!h,"md:relative md:left-12 md:top-14 md:mb-8 xl:left-20 xlg:left-35":u,"md:pl-0":o,"md:z-50":p}),children:[y?(0,n.jsx)("div",{className:"relative h-12",children:(0,n.jsx)(f(),{alt:b||"",className:"object-contain object-left",fill:!0,loader:v.L,src:y})}):null,L]}),S?(0,n.jsx)("div",{className:(0,i.$)("relative",{"md:bottom-auto md:mt-0":N,"-bottom-28 -mt-16 md:bottom-auto md:mt-0":!N,"left-0":w,"right-0":!w},"z-20 h-full md:absolute",{"md:w-full":u,"md:w-1/2":!u},!o&&"overflow-hidden"),children:S}):null]}),_?(0,n.jsx)("div",{className:(0,i.$)(o?"container":C,"flex justify-center md:justify-end"),children:_}):null]})},tZ=e=>{let t,{containerId:l="",navOffset:a=0,navItems:r=[],extraLinks:o=[],closeNavAriaLabel:c="Close navigation",openNavAriaLabel:d="Open navigation",storageKey:m="show-in-page-nav",hideOnMobile:u=!1,showDropdownOnMobile:h=!1,isPositionWithinParent:p=!1}=e,{isMobile:x}=(0,T.l)(),f=(0,V.K_)("elanco-dark-navy"),g=x&&h,v="bounce-in-page-nav",b=(0,s.createRef)(),[y,j]=(0,s.useState)(!1),[w,N]=(0,s.useState)(!0),[_,k]=(0,s.useState)(0),[C,L]=(0,s.useState)(h?0:-1),[I,E]=(0,s.useState)(!1),A=!1,F=0,B=()=>{if(!l||x&&u)return;let e=document.querySelector("#".concat(l)),t=b.current;if(!e||!t)return;let n=t.parentElement;if(!n)return;let s=window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop,i=document.querySelector("#sticky-nav");i&&(F=i.offsetHeight);let o=n.offsetHeight,c=e.getBoundingClientRect().top+s-(g?o:a+60),d=c+e.offsetHeight-o;s>=c&&s<d?(n.classList.add("fixed"),n.style.top="".concat(F,"px")):s>=d?(n.classList.remove("fixed"),n.style.top="".concat(d-c,"px")):(n.classList.remove(p?"fixed":""),n.style.top=p?"":"".concat(F,"px")),(e=>{var t;let l=h?0:-1,n=null==(t=b.current)?void 0:t.parentElement,s=null==n?void 0:n.offsetHeight;r.forEach((t,n)=>{let r=document.querySelector("#".concat(t.id));if(!r||!s)return;let i=r.getBoundingClientRect().top+e-(g&&0!==n?s:0)-(g?a:a+60),o=i+a+r.offsetHeight;e>=i&&e<o&&(l=n)}),l>=0&&(e=>{if(!x){var t;let l=null==(t=b.current)?void 0:t.parentElement,n=null==l?void 0:l.querySelectorAll("li")[e];n&&(l.scrollTop=n.offsetTop)}})(l),L(l)})(s)},M=()=>{clearTimeout(t)},P=()=>{t=setTimeout(()=>{var e;let t=b.current;null!==t&&x&&((null==(e=t.parentElement)?void 0:e.contains(document.activeElement))||E(!1))},0)},D=()=>{w&&(N(!1),localStorage.setItem(v,JSON.stringify(!1)))},R=()=>{j(!y),localStorage.setItem(m,JSON.stringify(!y)),D()},q=()=>{let e=b.current,t=null==e?void 0:e.parentElement;if(!t)return;let l=()=>{A=!0,window.addEventListener("scroll",B),h&&(t.addEventListener("focus",M,!0),t.addEventListener("blur",P,!0))};x&&u&&A?(A=!1,window.removeEventListener("scroll",B),h&&(t.removeEventListener("focus",M,!0),t.removeEventListener("blur",P,!0))):(x||!u||A)&&(u||A)||l()};return(0,s.useEffect)(()=>{let e=b.current,t=null==e?void 0:e.parentElement;if(!t)return;let l=document.querySelector("#sticky-nav");t.style.top=p?"":"".concat(null==l?void 0:l.offsetHeight,"px"),k(e.offsetWidth),null===localStorage.getItem(m)&&localStorage.setItem(m,JSON.stringify(!1)),null===localStorage.getItem(v)&&localStorage.setItem(v,JSON.stringify(!0));let n=localStorage.getItem(m);if(n){let e=!!JSON.parse(n);y!==e&&j(e)}let a=localStorage.getItem(v);if(a){let e=!!JSON.parse(a);e||N(e)}return q(),window.addEventListener("resize",q),window.addEventListener("scroll",()=>setTimeout(B,500)),()=>{window.removeEventListener("resize",q),window.removeEventListener("scroll",B),t.removeEventListener("focus",M,!0),t.removeEventListener("blur",P,!0)}},[]),(0,n.jsx)("div",{className:(0,i.$)(u&&"hidden md:block",h&&"md:block"),children:(0,n.jsxs)("div",{className:(0,i.$)("transition-left absolute left-0 top-0 z-30 max-h-none w-full duration-200 ease-in-out md:flex",!p&&"!fixed"),style:{maxHeight:"calc(100vh - ".concat(a,"px)"),left:y||g?"0":"-".concat(_,"px")},children:[(0,n.jsxs)("ul",{className:(0,i.$)("max-h-screen w-auto overflow-y-auto before:absolute before:right-0 before:top-0 before:z-30 before:ml-2 before:mr-4 before:mt-6 before:inline-block before:h-[6px] before:w-[14px] before:bg-dropdown before:bg-no-repeat before:content-[''] md:before:hidden",I&&"before:rotate-180"),ref:b,children:[r.map((e,t)=>(0,n.jsx)("li",{className:(0,i.$)(g&&!I&&C!==t&&"hidden"),children:(0,n.jsx)("button",{className:(0,i.$)("relative block w-full border-2 border-b-2 border-gray-500 bg-white px-4 py-3 text-left before:absolute before:left-0 before:top-0 before:h-full before:w-2 before:bg-[#eee8df] before:transition before:duration-[400] before:content-[''] md:w-[160px] md:border-l-0 md:border-r-0 md:border-t-0",(g&&!I||C!==t)&&"before:hidden"),onClick:()=>{(e=>{if(g&&(E(!I),!I))return;let t=document.querySelector("#".concat(e));t&&(e=>{var t;let l=null==(t=b.current)?void 0:t.parentElement,n=window.pageYOffset||document.documentElement.scrollTop||document.body.scrollTop,s=null==l?void 0:l.offsetHeight;if(!s)return;let r=e.getBoundingClientRect().top+n-(g?s+a:a+60);window.scroll({top:r+5,behavior:"smooth"})})(t)})(e.id)},type:"button",children:e.title})},e.title)),o.map((e,t)=>(0,n.jsx)("li",{children:(0,n.jsxs)("a",{className:"relative flex w-[160px] items-center border-b-2 border-gray-400 bg-gray-400 px-4 py-3 text-left before:hidden",href:e.url,rel:"noopener noreferrer",target:"_blank",children:[(0,n.jsx)("span",{className:"pr-2",children:e.text}),(0,n.jsx)(S,{className:"ml-auto shrink-0",size:"xs",children:(0,n.jsx)(n.Fragment,{children:e.svg})})]})},t))]}),(0,n.jsx)("div",{children:(0,n.jsx)("button",{"aria-label":y?c:d,className:(0,i.$)("mt-2 hidden cursor-pointer bg-gray-400 hover:bg-gray-300 md:block",w&&!y&&"animate-bounce"),onClick:R,onKeyUp:e=>{"Enter"===e.key&&(R(),D())},tabIndex:0,title:y?c:d,type:"button",children:y?(0,n.jsxs)("svg",{className:"h-8 w-8 fill-current p-2",viewBox:"0 0 15.7 15.7",children:[(0,n.jsx)("path",{d:"M14.3,0.3l1.1,1.1c0.4,0.4,0.4,1,0,1.4L2.8,15.4c-0.4,0.4-1,0.4-1.4,0l-1.1-1.1c-0.4-0.4-0.4-1,0-1.4L12.9,0.3C13.3-0.1,13.9-0.1,14.3,0.3z"}),(0,n.jsx)("path",{d:"M15.4,14.3l-1.1,1.1c-0.4,0.4-1,0.4-1.4,0L0.3,2.8c-0.4-0.4-0.4-1,0-1.4l1.1-1.1c0.4-0.4,1-0.4,1.4,0l12.6,12.6C15.8,13.3,15.8,13.9,15.4,14.3z"})]}):(0,n.jsx)("svg",{className:"h-10 w-8 px-2 py-2",viewBox:"0 0 16 24",children:(0,n.jsxs)("g",{transform:"translate(-5 -4)",children:[(0,n.jsx)("path",{d:"M10.5,15l8,8,8-8Z",fill:f,transform:"translate(-5.5 5)"}),(0,n.jsx)("path",{d:"M10.5,23l8-8,8,8Z",fill:f,transform:"translate(-5.5 -11)"})]})})})})]})})},tG=e=>{let{children:t,navOffset:l=0,closeNavAriaLabel:a="Close timeline navigation",openNavAriaLabel:r="Open timeline navigation"}=e,i=s.Children.toArray(t).filter(e=>(0,s.isValidElement)(e)),o=i.map(e=>({id:e.props.id,title:e.props.title}));return(0,n.jsx)(tM.j7,{children:(0,n.jsx)(tM.Ph,{children:e=>(0,n.jsxs)("div",{className:"relative pt-12",id:"history-timeline-".concat(e),children:[(0,n.jsx)(tZ,{closeNavAriaLabel:a,c
1ontainerId:"history-timeline-".concat(e),navItems:o,navOffset:l,openNavAriaLabel:r,showDropdownOnMobile:!0,storageKey:"show-history-nav"}),i.map(t=>(0,n.jsx)("div",{children:t},e+t.props.title))]},e)})})},tW=e=>{let{children:t,title:l,id:a}=e;return(0,n.jsx)("div",{className:"pr-4 md:pl-[200px] xl:mx-auto xl:w-[calc(100%-400px)] xl:max-w-5xl xl:px-0",id:a,children:t})},tK=e=>{let{children:t,circleText:l,hasLargeCircle:a=!1}=e;return(0,n.jsxs)("section",{className:"relative py-2 after:absolute after:left-4 after:top-0 after:h-full after:w-px after:bg-primary after:content-[''] md:flex md:items-center md:py-8 after:md:left-[52px]",children:[(0,n.jsx)("h2",{className:(0,i.$)("relative z-20 ml-4 w-14 border-2 border-primary bg-white py-[14px] text-center text-base leading-6 md:mx-6 md:my-0 md:shrink-0 md:rounded-full",a&&"w-[104px] border-secondary bg-secondary py-[38px] text-h2 leading-6 text-white md:m-0",l.length>4&&"text-base"),children:l}),(0,n.jsx)("div",{className:(0,i.$)("pl-8",a?"w-[calc(100%-104px)]":"w-[calc(100%-56px)]"),children:t})]})};var tY=l(42742),tQ=l(18743);let tX=["h1","h2","h3","h4"],tJ=e=>{let{title:t="",titleTag:l="h1",children:a=null,className:r="",backgroundColor:i="bg-white"}=e,o=tX.includes(l)?l:"h1";return(0,n.jsxs)("div",{className:"p-6 md:rounded-lg md:p-8 ".concat(r," ").concat(i),children:[(0,s.createElement)(o,null,t),a]})},t0=e=>{let{className:t="",children:l=null,id:a="auto-scroll-content",isAutoScroll:r=!1,scrollTimerSeconds:i=5,scrollSpeed:o=5}=e,[c,d]=(0,s.useState)(r),[m,u]=(0,s.useState)(!0),[h,p]=(0,s.use
1State)(1e3*i),[x,f]=(0,s.useState)(0),[g,v]=(0,s.useState)(!1),b=()=>{m&&d(!1)},y=()=>{let e=document.getElementById(a);e&&(f(e.scrollTop),d(!1))};return(0,s.useEffect)(()=>{let e=()=>{let e=document.getElementById(a);e&&v(window.innerHeight>e.getBoundingClientRect().top+200)},t=document.getElementById(a);if(!t)return;v(window.innerHeight>t.getBoundingClientRect().top+200),window.addEventListener("scroll",e);let l=null;return g&&(h>0&&c||!m&&c?l=setTimeout(function(){t&&(t.scrollTop>=t.scrollHeight-t.offsetHeight?d(!1):(f(x+o),t.scrollTo({top:x,behavior:"smooth"})),p(h-100))},100):(u(!1),d(!1))),()=>{window.removeEventListener("scroll",e),l&&clearTimeout(l)}},[h,c,g]),(0,n.jsxs)("div",{className:"".concat(t," px-2 pt-6 ").concat(r?"":"pb-6"," custom-scrollbar relative overflow-y-auto"),id:a,onFocus:b,onKeyDown:e=>{("ArrowUp"===e.key||"ArrowDown"===e.key)&&y()},onMouseOver:b,onTouchMove:y,onWheel:y,role:"presentation",children:[(0,n.jsx)("div",{className:"content",children:l}),r?(0,n.jsx)("div",{className:"sticky bottom-0 left-0 right-0 bg-white py-2 text-right",children:(0,n.jsx)(w,{as:"button",icon:c?(0,n.jsx)("svg",{version:"1.1",viewBox:"0 0 512 512",children:(0,n.jsxs)("g",{children:[(0,n.jsx)("path",{d:"M224,435.8V76.1c0-6.7-5.4-12.1-12.2-12.1h-71.6c-6.8,0-12.2,5.4-12.2,12.1v359.7c0,6.7,5.4,12.2,12.2,12.2h71.6   C218.6,448,224,442.6,224,435.8z"}),(0,n.jsx)("path",{d:"M371.8,64h-71.6c-6.7,0-12.2,5.4-12.2,12.1v359.7c0,6.7,5.4,12.2,12.2,12.2h71.6c6.7,0,12.2-5.4,12.2-12.2V76.1   C384,69.4,378.6,64,371.8,64z"})]})}):P.v.Play,onClick:e=>{e.stopPropagation(),d(!c)},size:"sm",children:c?"Pause":"Play"})}):null]})},t1=e=>{let{children:t,className:l="",expanded:a=!1,iconColor:r="#000000",title:i=""}=e,[o,c]=(0,s.useState)(a),[d,m]=(0,s.useState)(!1);return(0,s.useEffect)(()=>{m(null!==document.querySelector("#theme"))},[]),(0,n.jsxs)("div",{className:"border-b border-elanco-beige last-of-type:border-0",children:[(0,n.jsx)("dt",{children:(0,n.jsx)("button",{"aria-expanded":o,className:"w-full px-5 py-5 text-left text-black",onClick:()=>{(0,b.d)({event:"accordion_click",accordion_name:i,accordion_status:o?"close":"open"}),c(!o)},type:"button",children:(0,n.jsxs)("div",{className:"flex items-center",children:[(0,n.jsx)("svg",{className:"mr-4 h-4 w-4 shrink-0 transition-all duration-300 ".concat(o?"rotate-45":""),fill:r,height:"26.883",viewBox:"0 0 26.883 26.883",width:"26.883",children:(0,n.jsx)("path",{d:"M1.9,18.729l-1.6-1.595a1,1,0,0,1,0-1.414l6.2-6.2-6.2-6.2a1,1,0,0,1,0-1.414L1.9.306a1,1,0,0,1,1.415,0l6.2,6.2,6.2-6.2a1,1,0,0,1,1.415,0l1.595,1.6a1,1,0,0,1,0,1.414l-6.2,6.2,6.2,6.2a1,1,0,0,1,0,1.414l-1.595,1.595a1,1,0,0,1-1.415,0l-6.2-6.2-6.2,6.2a1,1,0,0,1-1.414,0Z",transform:o?"translate(23.442 3.982) rotate(90)":"translate(13.442 -0.018) rotate(45)"})}),(0,n.jsx)("h2",{className:"text-base font-normal ".concat(o?d?"text-main":"text-black":d?"text-alternative":""),children:i})]})})}),(0,n.jsx)("dd",{className:"content--no-width-restriction px-5  ".concat(l," ").concat(o?"block pb-6":"hidden"),children:t})]})},t2=e=>{let{children:t,className:l=""}=e,[a,r]=(0,s.useState)(!1);return(0,s.useEffect)(()=>{r(!!document.querySelector("#theme"))},[]),(0,n.jsx)("dl",{className:"".concat(a?"bg-alternative":"bg-white"," shadow-tertiary rounded-lg ").concat(l),children:t})},t4="objectFit"in document.documentElement.style,t6=e=>{let{children:t=[],alignment:l="center",posterFrameImageUrl:a="",mobilePosterFrameImageUrl:r="",posterFrameImageAltText:o="",priority:c=!1}=e,d={top:"object-top",center:"object-center",bottom:"object-bottom"};if(t&&Array.isArray(t)&&t.length>0)return(0,n.jsx)("picture",{className:"block h-64 w-full sm:h-80 md:absolute md:h-full xs:h-72",children:Array.isArray(t)&&t.map(e=>(0,s.isValidElement)(e)&&"img"!==e.type?e:(0,s.cloneElement)(e,{className:(0,i.$)("object-cover",d[l],"w-full","h-full")}))});if(!a)return null;let m=r?(0,x.getImageProps)({alt:"",fill:!0,loader:v.L,quality:65,sizes:"100vw",src:r}).props.srcSet:void 0;return(0,n.jsxs)("picture",{className:"relative block h-64 w-full sm:h-80 md:absolute md:h-full xs:h-72",children:[m?(0,n.jsx)("source",{media:"(max-width: 767px)",srcSet:m}):null,(0,n.jsx)(f(),{alt:null!=o?o:"",className:(0,i.$)("object-cover",d[l]),fetchPriority:c?"high":"auto",fill:!0,loader:v.L,priority:c,qual
1ity:65,sizes:"100vw",src:a})]})},t3=e=>{let{children:t=null,title:l=""}=e;return(0,n.jsx)("div",{className:"container-narrow mt-4",children:(0,n.jsx)("div",{className:"mt-6",children:(0,n.jsx)(t2,{className:"overflow-hidden rounded-lg shadow-secondary",children:(0,n.jsx)(t1,{className:"bg-white pt-5",title:l,children:t})})})})},t5=e=>{let{backgroundColor:t="",children:l=[],videoId:a="",posterFrameAlignment:r="center",posterFrameImageAltText:o="",posterFrameImageUrl:c="",mobilePosterFrameImageUrl:d="",id:m="",style:u={backgroundColor:""},controls:h=0,videoTitle:p="",className:x="",priority:g=!1,closeBtnText:b="Close",playBtnText:y="Play",thumbnailImage:j=!1}=e,N={top:"bg-top",center:"bg-center",bottom:"bg-bottom"}[r],_=(0,s.useRef)(null),[k,C]=(0,s.useState)(!1),[S,L]=(0,s.useState)(!1),T=()=>{var e;C(!0),L(!0),null==(e=_.current)||e.playVideo()},I=()=>{var e;C(!1),L(!1),null==(e=_.current)||e.pauseVideo()},E=e=>{"Escape"===e.key&&I()},A=s.Children.toArray(l).filter(e=>(0,s.isValidElement)(e)),F=A.find(e=>e.type===t6);F=F?(0,s.cloneElement)(F,{alignment:r,posterFrameImageUrl:c,mobilePosterFrameImageUrl:d,posterFrameImageAltText:o,priority:g}):(0,s.createElement)(t6,{alignment:r,posterFrameImageUrl:c,mobilePosterFrameImageUrl:d,posterFrameImageAltText:o,priority:g});let B=A.find(e=>e.type===t3),M=A.find(e=>e.type!==t6&&e.type!==t3),D=A.find(e=>e.type===t0);return j&&c?(0,n.jsxs)("div",{className:"relative px-6 py-[42px]",style:{backgroundColor:t},children:[(0,n.jsxs)("div",{className:"md:flex md:justify-evenly",children:[(0,n.jsx)("div",{className:"inline-block max-w-[34rem] md:mt-12 md:max-w-[30rem]",children:M}),(0,n.jsxs)("div",{className:"relative mx-auto w-[calc(100%-3rem)] pt-6 md:m-0 md:h-[432px] md:min-w-[400px] md:pt-0",children:[(0,n.jsx)("picture",{className:"block h-64 w-full sm:h-80 md:absolute md:h-full xs:h-72",children:(0,n.jsx)(f(),{alt:null!=o?o:"",className:"h-full w-full object-cover object-center",height:300,loader:v.L,priority:g,quality:65,src:c,width:300})}),(0,n.jsx)("div",{className:"absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2",onClick:T,onKeyDown:e=>{E(e)},children:(0,n.jsx)(w,{as:"button",icon:P.v.Play,iconSize:"w-12 h-20 md:w-10 md:h-16",iconText:y,size:"w-28 h-28 md:w-24 md:h-24"})})]})]}),(0,n.jsxs)("div",{className:(0,i.$)("flex w-full overflow-hidden bg-center",k?"fixed top-0 z-50 h-screen items-center bg-blue-transparent p-4 pt-12 md:p-24":" absolute top-0"),onClick:I,style:{zIndex:k?100:void 0},children:[a?(0,n.jsx)("div",{className:"mx-auto w-full max-w-screen-xl",children:(0,n.jsx)(tI,{className:(0,i.$)(S?"":"hidden"),controls:h,pauseHandler:I,videoId:a})}):null,k?(0,n.jsx)(H.$,{as:"button",className:"absolute right-0 top-0 z-10 mr-4 mt-4 bg-blue-800 text-white hover:bg-blue-900",icon:P.v.Close,onClick:I,reversed:!0,variant:"",children:b}):null]})]}):(0,n.jsxs)("div",{children:[(0,n.jsxs)("div",{className:(0,i.$)("relative bg-cover",x),style:{backgroundColor:t,backgroundImage:"none"},children:[(0,n.jsxs)("div",{className:"flex items-center justify-center md:absolute md:inset-0",children:[t4?F:null,(0,n.jsx)("div",{className:(0,i.$)("absolute z-10 flex justify-center md:right-0 md:w-2/5 lg:w-3/5",a?"":"hidden"),children:(0,n.jsx)("div",{onClick:T,onKeyDown:e=>{E(e)},children:(0,n.jsx)(w,{as:"button",icon:P.v.Play,iconSize:"w-12 h-20 md:w-10 md:h-16",iconText:y,size:"w-28 h-28 md:w-24 md:h-24"})})})]}),(0,n.jsxs)("div",{className:(0,i.$)("flex w-full overflow-hidden",N,k?"fixed top-0 z-50 h-screen items-center bg-blue-transparent p-4 pt-12 md:p-24":"h-full md:absolute"),onClick:I,style:{zIndex:k?100:void 0},children:[a?(0,n.jsx)("div",{className:"mx-auto w-full max-w-screen-xl",children:(0,n.jsx)(tI,{className:(0,i.$)(S?"":"hidden"),controls:h,pauseHandler:I,videoId:a})}):null,(0,n.jsx)(H.$,{as:"button",className:(0,i.$)("absolute right-0 top-0 z-10 mr-4 mt-4 bg-blue-800 text-white hover:bg-blue-900",k?"":"hidden"),icon:P.v.Close,onClick:I,reversed:!0,variant:"",children:b})]}),(0,n.jsx)("div",{className:"relative overflow-hidden md:py-24",id:m,style:u,children:(0,n.jsxs)("div",{className:"mx-auto items-center justify-between md:flex md:w-9/10 md:max-w-6xl",children:[(0,n.jsx)("div",{className:"md:w-3/5 lg:w-2/5",children:M}),D?(0,n.jsx)("div",{className:"md:w-1/3 lg:w-2/5",children:D}):null]})})]}),(0,n.jsx)("div",{className:(0,i.$)(B?"":"hidden"),children:(0,n.jsx)(t3,{title:p,children:B?B.props.children:null})})]})},t7=e=>{let{children:t}=e;return(0,n.jsx)(n.Fragment,{children:t})};var t8=l(61545),t9=l.n(t8);let le={dots:!1,infinite:!0,speed:500,slidesToShow:1,slidesToScroll:1,adaptiveHeight:!0,arrows:!1}
1,lt={dots:!1,infinite:!0,speed:500,slidesToScroll:1},ll=e=>{let{children:t,className:l}=e,[a,r]=(0,s.useState)(null),[i,o]=(0,s.useState)(null),c=(0,s.useRef)(null),d=(0,s.useRef)(null);(0,s.useEffect)(()=>{c.current&&d.current&&(r(c.current),o(d.current))},[]);let m=s.Children.count(t),u=Math.min(3,m),h=m>3,p=s.Children.toArray(t);return(0,n.jsxs)("div",{className:"relative mb-2 ".concat(t9().ImageGallery," ").concat(h?t9().ImageGalleryWithPagination:""," ").concat(l),children:[(0,n.jsx)(er.default,{className:"mx-auto -mb-[5px] max-w-[800px] overflow-hidden rounded-t-lg shadow-primary",...le,asNavFor:i||void 0,ref:c,children:p}),(0,n.jsx)(er.default,{asNavFor:a||void 0,className:"".concat(t9().Thumbnails," relative z-10 mx-auto max-w-[800px] rounded-b-lg bg-white p-4 shadow-primary"),ref:d,...lt,focusOnSelect:!0,slidesToShow:u,swipeToSlide:!0,children:p.map((e,t)=>{var l;let a=null!=(l=e.key)?l:t;return(0,n.jsx)("div",{children:(0,n.jsx)("button",{className:"thumbnail-container mx-[5px] cursor-pointer overflow-hidden rounded-lg border-2 border-white shadow-primary",title:"thumbnail-".concat(a),type:"button",children:e})},a)})})]})};var ln=l(47942),la=l.n(ln),ls=l(19376),lr=l.n(ls);let li=e=>{let{children:t,step:l,title:a}=e,r=null==t?void 0:t.find(e=>(0,s.isValidElement)(e)&&e.type===f()),i=null==t?void 0:t.filter(e=>(0,s.isValidElement)(e)&&e.type!==f());return(0,n.jsxs)("div",{className:"".concat(lr().StepContainer," px-2 md:w-1/2 lg:w-1/4"),children:[(0,n.jsxs)("div",{className:"md:relative",children:[(0,n.jsx)("div",{className:"".concat(lr()["arrow-overlap"]," relative inset-0 mx-auto mb-8 h-[76px] w-[76px] rounded-full bg-white md:absolute md:inset-0 md:z-10 md:mx-0 md:my-auto md:rounded-full ").concat(lr()["arrow-overlap"]," ").concat("1"===l?" hidden":"","\n					"),children:(0,n.jsx)("svg",{className:"absolute inset-0 m-auto w-3/5",height:"49.189",viewBox:"0 0 50.467 49.189",width:"50.467",children:(0,n.jsx)("path",{d:"M21.457,5.942l2.5-2.5a2.692,2.692,0,0,1,3.818,0l21.9,21.886a2.692,2.692,0,0,1,0,3.818l-21.9,21.9a2.692,2.692,0,0,1-3.818,0l-2.5-2.5a2.706,2.706,0,0,1,.045-3.863L35.075,31.747H2.7a2.7,2.7,0,0,1-2.7-2.7v-3.6a2.7,2.7,0,0,1,2.7-2.7H35.075L21.5,9.805A2.687,2.687,0,0,1,21.457,5.942Z",fill:"#bcbaba",transform:"translate(0 -2.647)"})})}),(0,n.jsx)("div",{className:"relative h-64 overflow-hidden",children:r})]}),(0,n.jsxs)("div",{className:"p-4",children:[(0,n.jsxs)("h4",{className:"pb-3",children:["".concat(l,". "),a]}),i]})]})};var lo=l(56175),lc=l(34450),ld=l.n(lc),lm=l(81838);let lu={YOUTUBE:"youtube",WISTIA:"wistia"},lh=e=>{var t;let{className:l="",leadingTitle:a=!1,title:r,subtitle:i="",videoPosterFrameUrl:o="",videoPosterAltText:c="",videoId:d="",videoElement:m,videoType:u=lu.YOUTUBE,children:h=null,metaBlock:p=null,closeBtnText:x="Close",playBtnText:g="Play",hasPlayVideoButton:b=!1}=e,y=s.Children.toArray(h),j=y.filter(e=>e.type===H.$),N=y.filter(e=>e.type!==H.$&&e.type!==f()&&"img"!==e.type&&e.type!==ts),[_,k]=(0,s.useState)(!1),[C,S]=(0,s.useState)(d),L=()=>{k(e=>!e)},I=(0,T.l)(),E=(0,s.useRef)(null);return(0,s.useEffect)(()=>{C!==d&&S(d)},[d,C,u]),(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("div",{className:"mx-2 flex max-w-sm flex-col overflow-hidden rounded-lg bg-white shadow-md ".concat(l),children:[a&&r?(0,n.jsx)("div",{className:"px-6 py-3",children:(0,n.jsx)("h3",{children:r})}):null,(0,n.jsxs)("div",{className:"relative",children:[p?(0,s.cloneElement)(p,{className:"".concat(null!=(t=p.props.className)?t:""," absolute top-0 z-10"),blur:!1!==p.props.blur}):null,d&&o?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(f(),{alt:c||"",className:"h-48 w-full object-cover",height:200,loader:v.L,src:o,width:200}),(0,n.jsx)("div",{className:"absolute inset-0 z-10 flex items-center justify-center",children:(0,n.jsx)(w,{as:"button",icon:(0,n.jsx)("svg",{className:"pl-1",viewBox:"0 0 15.954 18.492",children:(0,n.jsx)("path",{d:"M8.381,1.493a1,1,0,0,1,1.73,0l7.511,12.96a1,1,0,0,1-.865,1.5H1.735a1,1,0,0,1-.865-1.5Z",transform:"translate(15.954) rotate(90)"})}),iconSize:"w-6 h-6",onClick:L,size:"md",title:g})})]}):(0,n.jsx)("div",{className:"no-video-placeholder",children:m?"Video not available":""})]}),(0,n.jsxs)("div",{className:"flex h-full flex-col px-5 py-5 [&>ol]:list-[auto] [&>ul]:list-disc",children:[i?(0,n.jsx)("p",{className:"content content--no-width-restriction mb-2 text-sm",children:i}):null,!a&&r?(0,n.jsx)("h3",{className:"mb-2 text-xl",children:r}):null,N,(0,n.jsx)("div",{className:j.length?"mt-auto pt-8":"",children:d?j.map((e,t)=>(0,s.cloneElement)(e,0===t&&null===e.props.onClick&&null===e.props.href||b?{onClick:L}:void 0)):j})]})]}),I.width?(0,lo.createPortal)((0,n.jsx)(lm.A,{classNames:"popup",in:_,nodeRef:E,onEntered:()=>null,timeout:500,unmountOnExit:!0,children:(0,n.jsx)(ld(),{children:(0,n.jsxs)("div",{className:"fixed left-0 top-0 z-100 flex h-full w-full items-center bg-blue-transparent py-20 md:px-12",onClick:L,onKeyDown:e=>{("Enter"===e.key||" "===e.key)&&L()},ref:E,role:"button",tabIndex:0,children:[(0,n.jsx)(H.$,{as:"button",className:"absolute right-0 top-0 z-10 mr-4 mt-4 bg-blue-800 text-white hover:bg-blue-900",icon:P.v.Close,onClick:e=>{e.stopPropagation(),L()},reversed:!0,variant:"",children:x}),(0,n.jsx)("div",{className:"container-wide popup-container flex h-full items-center",children:(()=>{switch(u){case lu.YOUTUBE:return(0,n.jsx)(tI,{controls:1,pauseHandler:()=>null,videoId:C});case lu.WISTIA:return(0,n.jsx)(tk,{autoPlay:!0,id:C});default:return null}})()})]})})}),document.body):null]})},lp=e=>{var t;let{block:{elements:{openInNewTab:l,text:s,url:r}},className:i}=e,{locale:o=""}=(0,a.useRouter)(),c=$(r,o),d=c.endsWith(".xml"),m=(null==(t=l[0])?void 0:t.codename)==="yes"?"_blank":"_self";return d?(0,n.jsx)("a",{className:i,href:c,rel:"_blank"===m?"noopener noreferrer":void 0,target:m,children:s}):(0,n.jsx)(B(),{className:i,"data-kontent-element-codename":"text",href:c,passHref:!0,target:m,children:s})},lx=e=>{var t;let{block:l}=e,a=m[null==(t=l.elements.snippetSpacingSpacing[0])?void 0:t.codename]||m.default;return(0,eF.$s)({name:"IN_PAGE_WIDGET",properties:{wtbId:l.elements.widgetId,productIds:l.elements.productIds.map(e=>e.elements.dataEan.trim()).join(",")}}),(0,n.jsx)("div",{className:a,"data-kontent-element-codename":l.system.codename,"data-mm-ids":l.elements.productIds.map(e=>e.elements.dataEan.trim()).join(","),"data-mm-wtbid":l.elements.widgetId})},lf=e=>{let{children:t,className:l,title:a}=e;return(0,n.jsx)("div",{className:"".concat(l," align-center mx-auto mt-5 flex justify-center"),title:a,children:(0,n.jsxs)("div",{className:"mx-auto flex w-[95vw] max-w-[900px]",children:[a?(0,n.jsx)("h2",{className:"mb-4 text-center md:mb-8",children:a}):null,(0,n.jsx)("div",{className:"mx-auto grid grid-cols-1 gap-y-5 px-2 md:grid-cols-2 md:gap-x-8 md:px-5 lg:px-6",children:t})]})})},lg=e=>{var t,l;let{block:a,page:s,...r}=e,{colorId:i}=G({blockColor:a.elements.brandColor,pageConfig:s.elements.config[0],fallbackColorId:"primary"});return(0,n.jsxs)("div",{className:"flex","data-kontent-item-id":a.system.id,role:"listitem",children:[a.elements.icon[0]?(0,n.jsx)(S,{brand:null!=i?i:void 0,noB
1order:!0,size:(null==(t=a.elements.iconSize[0])?void 0:t.codename)||"xs",children:(0,n.jsx)("div",{className:"relative h-full w-full","data-kontent-element-codename":"icon",children:(0,n.jsx)(f(),{alt:null!=(l=a.elements.icon[0].description)?l:"","data-kontent-element-codename":"icon",fill:!0,loader:v.L,src:a.elements.icon[0].url})})}):null,(0,n.jsxs)("div",{className:"ml-5 w-full",children:[a.elements.title?(0,n.jsx)("strong",{className:"mb-2 inline-block","data-kontent-element-codename":"title",children:a.elements.title}):null,(0,n.jsx)(c.rM,{element:a.elements.description,page:s,...r})]})]},a.system.id)},lv=e=>{let{className:t="",children:l}=e;return(0,n.jsx)("div",{className:"flex flex-col justify-between ".concat(t),children:l})},lb=e=>{let{className:t="",children:l,noBorder:a=!1}=e;return(0,n.jsx)("div",{className:"flex flex-col justify-between ".concat(a?"":"xl:border-l"," border-gray-300 ").concat(t),children:l})},ly=e=>{let{className:t="",children:l}=e;return(0,n.jsx)("div",{className:"flex justify-center bg-gray-100 py-6 ".concat(t),children:l})},lj=e=>{let{className:t="",disclaimerNotes:l}=e;return(0,n.jsx)("ul",{className:"".concat(t," mt-8 list-none"),children:l.map(e=>(0,n.jsx)("li",{className:"mb-2",children:(0,n.jsx)("cite",{children:e})},e))})},lw=e=>{let{className:t="",children:l}=e,a=s.Children.toArray(l),r=a.filter(e=>(0,s.isValidElement)(e)&&e.type===f()),i=a.filter(e=>(0,s.isValidElement)(e)&&e.type===ly),o=a.filter(e=>(0,s.isValidElement)(e)&&"section"===e.type),c=a.filter(e=>(0,s.isValidElement)(e)&&e.type===lv),d=a.filter(e=>(0,s.isValidElement)(e)&&e.type===lb),m=a.filter(e=>(0,s.isValidElement)(e)&&e.type===lj),u=a.filter(e=>(0,s.isValidElement)(e)&&"section"!==e.type&&e.type!==f()&&e.type!==lv&&e.type!==lb&&e.type!==ly&&e.type!==lj);return(0,n.jsxs)("div",{className:"items-start md:flex ".concat(t),children:[(0,n.jsxs)("div",{className:"mb-2 overflow-hidden rounded-lg border border-gray-300 md:mb-0 md:mb-6 md:w-1/3",children:[(0,s.cloneElement)(u[0],{className:"px-4 pt-2 pb-0 md:sr-only"}),(0,n.jsx)("div",{className:"p-4 md:p-8 lg:p-10",children:(0,s.cloneElement)(r[0],{className:"mx-auto"})}),i]}),(0,n.jsxs)("div",{className:"md:ml-16 md:w-2/3",children:[(0,n.jsxs)("div",{className:"content content--no-width-restriction px-4 md:p-0",children:[(0,s.isValidElement)(u[0])?(0,n.jsx)("div",{"aria-hidden":"true",className:"hidden text-h1 font-bold md:block",children:u[0].props.children}):null,u[1],o.length>0&&(0,n.jsx)("div",{className:"my-10 hidden bg-gray-100 p-4 md:block",children:o}),(c.length>0||d.length>0)&&(0,n.jsxs)("div",{className:"hidden px-4 md:flex md:flex-wrap",children:[c," ",d]})]}),m.length>0&&(0,n.jsx)("div",{className:"hidden md:block",children:m})]}),(0,n.jsxs)("div",{className:"mt-8 md:hidden",children:[(0,n.jsx)(tS,{children:[o.length>
10&&(0,n.jsx)(tL,{expanded:e.expandFirst,title:"Key Features",children:o},"key-features"),c.length>0?(0,n.jsx)(tL,{title:c[0]?c[0].props.title:null,children:c},"weight"):null,...d.length>0?d.map((e,t)=>{var l;return(0,n.jsx)(tL,{title:e.props.title,children:e},null!=(l=e.key)?l:"pack-".concat(t))}):[]].filter(Boolean)}),m]})]})};var lN=l(60297);let l_=e=>{let{defaultLng:t,defaultLat:l,initialZoom:a,minZoom:r,maxZoom:i=0,onLoad:o,onClick:c,containerStyle:d,containerClassName:m,children:u}=e,h=(0,s.useMemo)(()=>({lat:l,lng:t}),[l,t]),p=(0,s.useMemo)(()=>a,[a]);return(0,n.jsx)(lN.u6,{center:h,mapContainerClassName:m,mapContainerStyle:d,onClick:c,onLoad:o,options:{disableDefaultUI:!0,maxZoom:i,minZoom:r,zoomControl:!0},zoom:p,children:u})};function lk(e){let{color:t=""}=e;return(0,n.jsx)("div",{className:"absolute bottom-0 left-0 right-0 top-0 z-30 flex items-center justify-center bg-black bg-opacity-5",children:(0,n.jsxs)("div",{children:[(0,n.jsxs)("svg",{className:"h-10 w-10 animate-spin",fill:"none",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:[(0,n.jsx)("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"#fff",strokeWidth:"4"}),(0,n.jsx)("path",{d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z",fill:t})]}),(0,n.jsx)("span",{"aria-busy":"true",className:"sr-only",role:"alert",children:"Loading"})]})})}let lC=e=>{let{className:t="",title:l="",description:a="",markerDescription:s="",primaryContactNumber:r="",secondaryContactNumber:i="",emailAddress:o="",ctaTitle:c="",primaryCta:d=null,secondaryCta:m=null}=e;return(0,n.jsxs)("div",{className:"relative z-10 mx-auto bg-gray-100 p-4 ".concat(t),children:[(0,n.jsx)("h2",{className:"mb-4",children:l}),"<p><br></p>"!==s?(0,n.jsx)("div",{className:"mb-4",dangerouslySetInnerHTML:{__html:s}}):(0,n.jsx)("p",{className:"mb-4",children:a}),r?(0,n.jsxs)("a",{className:"group mb-4 flex items-center font-semibold hover:underline focus:underline",href:"tel:".concat(r),children:[(0,n.jsx)(w,{as:"span",className:"mr-4 group-hover:bg-secondary",icon:P.v.Contact,iconSize:"h-8 w-8"}),(0,n.jsx)("span",{"data-clarity-mask":"true",children:r})]}):null,i?(0,n.jsxs)("a",{className:"group mb-4 flex items-center font-semibold hover:underline focus:underline",href:"tel:".concat(i),children:[(0,n.jsx)(w,{as:"span",className:"mr-4 group-hover:bg-secondary",icon:P.v.Contact,iconSize:"h-8 w-8"}),(0,n.jsx)("span",{"data-clarity-mask":"true",children:i})]}):null,o?(0,n.jsxs)("a",{className:"group mb-4 flex items-center font-semibold hover:underline focus:underline",href:"mailto:".concat(o),children:[(0,n.jsx)(w,{as:"span",className:"mr-4 w-12 flex-none group-hover:bg-secondary",icon:P.v.EmailInverted,iconSize:"h-8 w-8"}),(0,n.jsx)("span",{className:"flex-initial","data-clarity-mask":"true",style:{overflowWrap:"break-word"},children:o})]}):null,c?(0,n.jsx)("h3",{className:"mb-4",children:c}):null,d?(0,n.jsx)(H.$,{href:d.url,...d.isExternal?{target:"_blank",icon:P.v.External}:{},className:"mb-4 w-full",children:d.text}):null,m?(0,n.jsx)(H.$,{href:m.url,variant:"secondary",...m.isExternal?{target:"_blank",icon:P.v.External}:{},className:"mb-4 w-full",children:m.text}):null]})},lS=e=>{let{className:t="",disabled:l=!1,dropdownData:a,fieldName:s="",hasValueAsUrl:r=!1,identifier:i="",label:o,showLabel:c=!0,updateFilterValue:d,value:m=""}=e;return(0,n.jsx)("div",{className:"relative mb-8 ".concat(t),children:(0,n.jsxs)("label",{htmlFor:o,children:[c?(0,n.jsx)("span",{className:"label-text top",children:o}):null,(0,n.jsx)("select",{className:"dropdown-blue-icon appearance-none",disabled:l,id:o,name:s,onChange:e=>{d(e.target.value,i,r)},style:{marginBottom:0},value:m,children:a.map(e=>(0,n.jsx)("option",{value:e.value,children:e.text},e.value+e.text))}),(0,n.jsxs)("svg",{height:"46",viewBox:"0 0 48 48",width:"46",xmlns:"http://www.w3.org/2000/svg",children:[(0,n.jsx)("rect",{fill:"",height:"48",rx:"24",width:"48"}),(0,n.jsx)("path",{d:"M7,10,18.426,21.426,29.853,10Z",fill:"#fff",fillRule:"evenodd",transform:"translate(5.574 10.287)"})]})]})})},lL=["geometry","places"],lT=e=>{var t,l;let{apiKey:a,title:r="",description:i="",markers:o,showCountryFilter:c=!1,countryDropdownLabel:d="Filter by Countries",countryDropdownPlaceholder:m="Please Select a Country"}=e,u=c&&null!=(l=null==(t=o[0])?void 0:t.country)?l:"",h=u?o.filter(e=>
1e.country===u):o,[p,x]=(0,s.useState)(null),[f,g]=(0,s.useState)(h),[v,b]=(0,s.useState)(h[0]),[y,j]=(0,s.useState)(u),w=[];c&&o.map(e=>(void 0===w.find(t=>t.value===e.country)&&w.push({text:e.country,value:e.country}),e));let{isLoaded:N}=(0,lN.KD)({googleMapsApiKey:null!=a?a:"",libraries:lL}),_=(0,s.useCallback)(()=>{if(0===f.length)return;let[e]=f;if(1===f.length&&e){null==p||p.setCenter({lat:e.lat,lng:e.lng}),null==p||p.setZoom(18);return}let t=new window.google.maps.LatLngBounds;f.forEach(e=>{t.extend(new google.maps.LatLng(e.lat,e.lng))}),null==p||p.setCenter(t.getCenter()),null==p||p.panToBounds(t),null==p||p.fitBounds(t)},[f,p]);(0,s.useEffect)(()=>{!(o.length<1)&&p&&_()},[f,p,o.length,_]);let k=(0,s.useCallback)(e=>{null==e||e.setOptions({minZoom:3,maxZoom:0}),x(e)},[]);return(0,n.jsxs)("div",{children:[r||i||c?(0,n.jsxs)("div",{className:"content -mb-8 py-4 md:my-8",children:[r||i?(0,n.jsxs)("div",{className:"pb-6 text-center",children:[r?(0,n.jsx)("h2",{children:r}):null,i?(0,n.jsx)("p",{children:i}):null]}):null,c?(0,n.jsx)(lS,{className:"w-full md:mx-auto md:w-1/2 lg:w-1/3",dropdownData:[{text:m,value:""},...w],fieldName:"country",label:d,updateFilterValue:e=>{let t=o.filter(t=>""===e||t.country===e);j(null!=e?e:""),g(t),t.length&&b(t[0])},value:y}):null]}):null,(0,n.jsxs)("div",{className:"mx-4 overflow-hidden rounded-lg shadow-primary md:mx-8 md:flex",children:[(0,n.jsx)(lC,{className:"px-4 py-8 md:m-0 md:w-2/5 lg:w-[30%]",ctaTitle:null==v?void 0:v.ctaTitle,description:null==v?void 0:v.description,emailAddress:null==v?void 0:v.emailAddress,markerDescription:null==v?void 0:v.marker_description,primaryContactNumber:null==v?void 0:v.primaryContactNumber,primaryCta:null==v?void 0:v.primaryCta,secondaryContactNumber:null==v?void 0:v.secondaryContactNumber,secondaryCta:null==v?void 0:v.secondaryCta,title:null==v?void 0:v.title}),(0,n.jsxs)("div",{className:"mx-auto h-[300px] w-full overflow-hidden shadow-primary md:mx-0 md:mb-0 md:h-[700px] md:w-3/5 md:rounded-none md:shadow-none lg:w-7/10",children:[!N&&(0,n.jsx)(lk,{color:"#fff"}),N?(0,n.jsx)(l_,{containerClassName:"w-full h-full",defaultLat:0,defaultLng:0,initialZoom:18,maxZoom:20,minZoom:3,onLoad:k,children:f.map(e=>(0,n.jsx)(lN.X0,{onClick:()=>{b(e)},options:{icon:{url:"data:image/svg+xml;base64,".concat((e=>{let t=e.key===(null==v?void 0:v.key)?(0,V.K_)("elanco-teal"):(0,V.K_)("elanco-dark-navy");return window.btoa('\n<svg viewBox="117.443 80.313 246.107 310.581" xmlns="http://www.w3.org/2000/svg">\n  <ellipse style="paint-order: fill; fill: rgb(128, 146, 158); stroke: rgb(77, 102, 120); stroke-width: 2px;" cx="324.09" cy="351.434" rx="39.46" ry="39.46"/>\n  <rect style="stroke-linecap: round; stroke-miterlimit: 1; stroke-linejoin: round; stroke: rgb(0, 114, 206); fill-rule: nonzero; stroke-width: 0px; paint-order: stroke; fill: '.concat(t,';" x="117.443" y="80.313" width="208.456" height="197.848" rx="25" ry="25"/>\n  <path d="M 254.272 201.002 L 225.244 228.338 C 223.382 230.09 220.48 230.09 218.624 228.338 L 189.597 201.002 C 171.69 183.524 171.69 154.74 189.597 137.263 C 207.578 119.7 236.284 119.7 254.272 137.263 C 272.172 154.74 272.172 183.524 254.272 201.002 Z M 247.505 144.12 C 233.279 130.25 210.584 130.25 196.363 144.12 C 182.297 157.811 182.266 180.396 196.293 194.131 L 221.934 218.28 L 247.536 194.171 C 261.582 180.441 261.57 157.83 247.505 144.12 Z M 221.934 188.857 C 207.157 188.799 197.993 172.768 205.427 160.003 C 212.866 147.237 231.332 147.314 238.67 160.137 C 240.33 163.041 241.203 166.323 241.203 169.666 C 241.176 180.286 232.554 188.876 221.934 188.857 Z M 221.934 179.258 C 229.324 179.225 233.905 171.211 230.188 164.824 C 226.466 158.444 217.228 158.477 213.565 164.895 C 212.731 166.343 212.297 167.986 212.297 169.66 C 212.303 174.973 216.62 179.271 221.934 179.258 Z" style="stroke-miterlimit: 3;" fill="#fff"/>\n  <path d="M 303.638 472.247 L 352.868 654.342 L 254.407 654.342 L 303.638 472.247 Z" style="stroke: rgb(0, 0, 0); stroke-width: 0px; fill: ').concat(t,';" transform="matrix(-0.006135, -0.999981, 1.002915, 0.472139, -328.125977, 297.440918)"/>\n</svg>'))})(e)),scaledSize:new window.google.maps.Size(75,75),labelOrigin:new window.google.maps.Point(25,16)}},position:{lat:e.lat,lng:e.lng}},e.key))}):null]})]})]})},lI=e=>{let{children:t,disableClickEvent:l=!1,name:a=""}=e,r=s.Children.toArray(t);return(0,n.jsx)(tq,{"aria-label":"Card tabs",className:"-mx-6 flex-grow",expanded:!0,isGrowable:!0,name:a,selected:0,tabClasses:"".concat(l?"pointer-events-none cursor-default":""," text-sm p-2 pb-6 font-bold flex-grow border-r border-grey-400 last:border-r-0"),children:r})};function lE(e){let t=e.slice();for(let e=t.length-1;e>0;e--){let l=Math.floor(Math.random()*(e+1));[t[e],t[l]]=[t[l],t[e]]}return t}let lA="/api/petNames",lF=e=>{if("error"in e)throw Error(e.error);return e},lB=async e=>{let{data:t}=await eM.L.post("".concat(lA,"/search"),e,{validateStatus:()=>!0});return lF(t).data.names},lM=async e=>{let{data:t}=await eM.L.post("".concat(lA,"/all"),e,{validateStatus:()=>!0});return lF(t).data.names},lP=e=>{let{petResultsList:t,moreThanFortyNames:l,loadMore:a}=e,s=[];if(!a&&l){let e=t.slice().sort(()=>.5-Math.random());s.push(...e.slice(0,40).sort())}else s.push(...t);return(0,n.jsx)("ul",{className:"columns-2 md:columns-4",children:s.map(e=>(0,n.jsx)("li",{children:e},e))})},lD=e=>{let{title:t,children:l}=e;return(0,n.jsx)("div",{className:"mb-4 md:p-8",style:{width:"100%",background:"#FCFCFC",boxShadow:"0px 6px 12px #00000010",borderRadius:"6px"},children:(0,n.jsxs)("div",{style:{width:"100%",margin:"20px auto"},children:[(0,n.jsx)("h2",{className:"text-center",children:t}),(0,n.jsx)("div",{className:"flex",style:{justifyContent:"center",gap:"3.5rem",flexWrap:"wrap",marginTop:"40px"},children:l})]})})},lR=e=>{let{block:t,onClick:l,isActive:a,unselected:s}=e;return(0,n.jsxs)("div",{className:(0,i.$)("cursor-pointer text-center",s?"opacity-[40%]":"opacity-[100%]"),children:[(0,n.jsxs)("button",{className:"relative flex h-[164px] w-[134px] max-w-full select-none flex-col items-center justify-center gap-4 roun
1ded-[25%] text-center",onClick:()=>{l(t)},type:"button",children:[t.elements.icon[0]?(0,n.jsx)(f(),{alt:t.elements.displayName,height:134,loader:v.L,src:t.elements.icon[0].url,width:134}):null,a?(0,n.jsx)("div",{className:"absolute bottom-7 left-auto right-3 flex h-7 w-7 scale-[1.4] items-center justify-center rounded-[50%] bg-green-600",children:(0,n.jsx)("div",{className:"mb-[10%] inline-block h-[15px] w-2 border-b-[2.5px] border-r-[2.5px] border-b-white border-r-white",style:{transform:"rotate(45deg)"}})}):null]}),(0,n.jsx)("span",{className:"font-bold",children:t.elements.displayName})]})},lq=e=>{var t,l,a,s,r,i;let{block:o,otherNames:c,resetResults:d,selectedTraitsByGroup:m,shuffle:u,topNames:h,...p}=e,x=h[0],g=h.slice(1),y=Object.keys(Object.fromEntries(Object.entries(m).filter(e=>{let[t,l]=e;return null!==l}))),j=y.length-1,w="";return y.reverse().forEach((e,t)=>{var l;let n=null==(l=m[e])?void 0:l.elements.displayName;n&&(t===j||0===t?w+=" ".concat(n):w+=", ".concat(n))}),w+=".",w=w.trim(),(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(lD,{title:o.elements.topMatchesTitle,children:(0,n.jsxs)("div",{className:"mt-4 flex flex-col md:flex-row",style:{gap:"5rem"},children:[!x&&(0,n.jsx)("span",{className:"text-red-500",children:o.elements.noResultsErrorText}),x?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("div",{className:"relative text-center",children:[o.elements.topNameBackground[0]?(0,n.jsx)(f(),{alt:null!=(s=o.elements.topNameBackground[0].description)?s:"",height:240,loader:v.L,src:o.elements.topNameBackground[0].url,width:320}):null,o.elements.topNameIcon[0]?(0,n.jsx)("div",{className:"absolute left-1/2 top-[-20%] h-20 w-20 -translate-x-1/2 transform",children:(0,n.jsx)(f(),{alt:null!=(r=o.elements.topNameIcon[0].description)?r:"",className:"object-cover",height:80,loader:v.L,src:null==(t=o.elements.topNameIcon[0])?void 0:t.url,width:80})}):null,(0,n.jsx)("h3",{className:"absolute left-[50%] top-[-10%] text-3xl font-bold text-white",style:{transform:"translate(-50%, 0)"},children:"1"}),(0,n.jsxs)("div",{className:"absolute left-[50%] top-[20%] w-full text-white",style:{transform:"translate(-50%, 0)"},children:[(0,n.jsx)("h3",{className:"mb-4 text-4xl font-bold",style:{wordBreak:"break-all"},children:x}),(0,n.jsx)("span",{className:"text-xl font-bold",children:w})]})]}),(0,n.jsxs)("div",{children:[(0,n.jsx)("h3",{className:"text-center md:text-left",children:o.elements.otherTopNamesTitle}),(0,n.jsx)("ul",{className:"mt-8 columns-2 text-center",children:g.map((e,t)=>(0,n.jsxs)("div",{className:"mb-6 flex",children:[(0,n.jsx)("div",{className:"text-bold flex items-center justify-center rounded-full bg-orange-500 text-lg text-white",style:{width:"1.5em",height:"1.5em",borderRadius:"50%",marginRight:"10px"},children:t+2}),(0,n.jsx)("span",{className:"text-lg",children:e})]},e))})]})]}):null]})}),(0,n.jsx)(lD,{title:o.elements.selectedAttributesTitle,children:Object.keys(m).map(e=>{let t=m[e];return t?(0,n.jsx)(lR,{block:t,isActive:!0,onClick:()=>{},unselected:!0,...p},t.elements.displayName):null})}),(0,n.jsxs)("div",{className:"text-center",children:[(0,n.jsxs)("div",{className:"flex justify-center",style:{marginTop:64,marginBottom:"2rem",gap:"1.5rem"},children:[(0,n.jsx)(H.$,{"data-kontent-element-codename":"button_text",onClick:()=>{(0,b.d)({event:"cta_click",cta_name:o.elements.shuffleButtonText,cta_category:"CTA_Button"}),u()},variant:"inverted_pet_primary_green",children:o.elements.shuffleButtonText}),(0,n.jsx)(H.$,{"data-kontent-element-codename":"button_text",onClick:()=>{(0,b.d)({event:"cta_click",cta_name:o.elements.changeAttributesButtonText,cta_category:"CTA_Button"}),d()},variant:"pet_primary_green",children:o.elements.changeAttributesButtonText})]}),(0,n.jsx)(B(),{className:"font-bold text-pet-green underline",href:null!=(i=null==(l=o.elements.viewAllLink[0])?void 0:l.elements.url)?i:"",passHref:!0,children:null==(a=o.elements.viewAllLink[0])?void 0:a.elements.text})]}),(0,n.jsxs)("div",{className:"mt-8 w-full",children:[(0,n.jsx)("h1",{className:"text-center",children:o.elements.otherNamesTitle}),(0,n.jsx)("div",{className:"container-narrow my-10",children:(0,n.jsx)(lP,{moreThanFortyNames:!1,petResultsList:c})})]})]})},lz=e=>{let{traitGroup:t,selectedTraitsByGroup:l,toggleTrait:a,...r}=e,i=2===t.elements.traitBlocks.length;return(0,n.jsx)(lD,{title:t.elements.displayTitle,children:(0,n.jsx)("ul",{className:"flex max-w-[515px] flex-wrap justify-center",children:t.elements.traitBlocks.map(e=>{let o=l[t.elements.displayTitle],c=null==o?void 0:o.elements.displayName,d=c===e.elements.displayName,m=c!==e.elements.displayName;return(0,n.jsx)("li",{className:"mb-5 flex justify-center px-4 ".concat(i?"basis-1/2":"basis-1/2 md:basis-1/3"),children:(0,s.createElement)(lR,{...r,block:e,isActive:d,key:e.elements.displayName,onClick:e=>{a(e,t.elements.displayTitle)},unselected:!!(c&&m)})},e.elements.displayName)})})})},lO=e=>{let{block:{elements:{resetButtonText:t,submitButtonText:l,viewAllLink:a}},activeTraitGroups:s,selectedTraitsByGroup:r,toggleTrait:i,isButtonDisabled:o,reset:c,searchNames:d,...m}=e,u=s.map(e=>(0,n.jsx)(lz,{block:{elements:{authenticationGateComponentUserRoles:[]},system:{codename:"",id:"",type:"",name:""}},selectedTraitsByGroup:r,toggleTrait:i,traitGroup:e,...m},e.system.id));return(0,n.jsxs)("div",{className:"flex w-full flex-col items-center justify-center",children:[u,(0,n.jsxs)("div",{className:"flex",style:{marginTop:64,marginBottom:"2rem",gap:"1.5rem"},children:[(0,n.jsx)(H.$,{"data-kontent-element-codename":"button_text",onClick:()=>{c()},variant:"inverted_pet_primary_green",children:t}),(0,n.jsx)(H.$,{"data-kontent-element-codename":"button_text",disabled:o,onClick:()=>{d()},variant:"pet_primary_green",children:l})]}),a[0]?(0,n.jsx)(B(),{className:"text-pet-green",href:a[0].elements.url,passHref:!0,style:{fontWeight:700,textDecoration:"underline"},children:a[0].elements.text}):null]})};var lU=l(30304),l$=l.n(lU);let lH=e=>(0,n.jsxs)("div",{className:"py-8 ".concat(e.className),children:[(0,n.jsxs)("div",{className:"container-narrow text-center",children:[(0,n.jsx)("h2",{className:"mb-4",children:e.title}),(0,n.jsx)("div",{className:"content text-center",children:e.introText})]}),(0,n.jsxs)("div",{className:"mt-6 items-center justify-between md:flex",children:[(0,n.jsx)("div",{className:"text-center md:w-1/2",children:(0,n.jsx)(f(),{alt:e.imageAltText||"",className:"pb-8 md:pb-0 md:pr-12",height:400,loader:v.L,src:e.imageSrc,width:400})}),(0,n.jsx)("div",{className:"md:w-1/2",children:(0,n.jsx)("div",{className:"mb-6",children:e.children})})]})]}),lV=e=>
1{let{className:t,title:l,text:a,promoButton:s,termsText:r,termsLink:i,endDate:o,horizontal:c=!1}=e;return(0,n.jsxs)("div",{className:"container-narrow rounded-lg border-2 border-dashed p-4 shadow-secondary md:px-8 md:py-6 ".concat(t),children:[(0,n.jsxs)("div",{className:"".concat(c?"flex flex-col items-center md:flex-row":"md:flex"," justify-between"),children:[c?(0,n.jsxs)("div",{className:"flex flex-col items-center justify-center md:w-2/3 md:flex-row md:pr-6 ",children:[(0,n.jsx)("p",{className:"mb-4 md:mb-0 md:mr-6 md:w-2/3",children:a}),(0,n.jsx)("h2",{className:"mb-4 text-4xl md:mb-0 md:ml-6 md:w-1/3",children:l})]}):(0,n.jsxs)("div",{className:"md:w-2/3 md:pr-6",children:[(0,n.jsx)("h2",{className:"pb-2 text-4xl",children:l}),(0,n.jsx)("p",{children:a})]}),(0,n.jsx)("div",{className:"md:w-1/3 md:pl-6 md:text-right",children:s})]}),(0,n.jsxs)("div",{className:"".concat(c?"pt-0":"pt-8"," justify-between italic md:flex"),children:[(0,n.jsx)("a",{className:"underline",href:i,rel:"noopener noreferrer",target:"_blank",children:r}),(0,n.jsxs)("p",{className:"pt-2 md:pt-0",children:[o," "]})]})]})},lZ=e=>{let{className:t,...l}=e;return(0,n.jsx)("svg",{className:t,viewBox:"0 0 56 41.76",...l,children:(0,n.jsx)("path",{className:"translate-x-[-45px] translate-y-[-54.25px]",d:"M64,95.19,45.82,77a2.81,2.81,0,0,1,0-4h0l4-4a2.81,2.81,0,0,1,4,0h0L66,81.33,92.26,55.07a2.81,2.81,0,0,1,4,0h0l4,4a2.81,2.81,0,0,1,0,4h0L68,95.19a2.79,2.79,0,0,1-4,0Z"})})},lG=e=>{let{className:t,...l}=e;return(0,n.jsx)("svg",{className:t,viewBox:"0 0 21.5 21.5",...l,children:(0,n.jsx)("path",{className:"translate-x-0 translate-y-[-0.5px]",d:"M2.265,21.707.293,19.734a1,1,0,0,1,0-1.415l7.071-7.07L.293,4.18a1,1,0,0,1,0-1.414L2.266.793a1,1,0,0,1,1.414,0l7.07,7.07L17.819.794a1,1,0,0,1,1.414,0l1.973,1.973a1,1,0,0,1,0,1.414L14.137,11.25l7.07,7.07a1,1,0,0,1,0,1.414l-1.973,1.973a1,1,0,0,1-1.414,0l-7.07-7.07L3.68,21.707a1,1,0,0,1-1.415,0Z"})})},lW=e=>{let{className:t,...l}=e;return(0,n.jsx)("svg",{className:t,viewBox:"0 0 144 137.737",xmlns:"http://www.w3.org/2000/svg",...l,children:(0,n.jsxs)("g",{transform:"translate(13918 -8150)",children:[(0,n.jsx)("g",{transform:"translate(-13918 8150)",children:(0,n.jsx)("path",{d:"M65.717,4.79,48.14,40.4,8.816,46.134A8.61,8.61,0,0,0,4.052,60.82L32.5,88.526l-6.729,39.137a8.607,8.607,0,0,0,12.489,9.065l35.179-18.479,35.179,18.479a8.613,8.613,0,0,0,12.489-9.065L114.38,88.526,142.83,60.82a8.61,8.61,0,0,0-4.764-14.687L98.742,40.4,81.166,4.79a8.623,8.623,0,0,0-15.45,0Z",fill:"#00ab9c",transform:"translate(-1.441 0.001)"})}),(0,n.jsx)("path",{d:"M19.02,45.517.82,27.317a2.8,2.8,0,0,1,0-3.96L4.78,19.4a2.8,2.8,0,0,1,3.96,0L21,31.658,47.26,5.4a2.8,2.8,0,0,1,3.96,0l3.96,3.96a2.8,2.8,0,0,1,0,3.96l-32.2,32.2A2.8,2.8,0,0,1,19.02,45.517Z",fill:"#fff",transform:"translate(-13873 8199.674)"})]})})},lK=e=>{let{className:t,...l}=e;return(0,n.jsxs)("svg",{className:t,viewBox:"0 0 143.98 137.72",xmlns:"http://www.w3.org/2000/svg",...l,children:[(0,n.jsx)("path",{className:"translate-x-[-0.01px] fill-[#ea0101]",d:"M64.28,4.79,46.7,40.4,7.38,46.13A8.61,8.61,0,0,0,2.61,60.82L31.06,88.53l-6.73,39.13a8.61,8.61,0,0,0,12.49,9.07L72,118.25l35.18,18.48a8.62,8.62,0,0,0,12.49-9.07l-6.73-39.13,28.45-27.71a8.62,8.62,0,0,0-4.76-14.69L97.3,40.4,79.73,4.79A8.62,8.62,0,0,0,68.17.9a8.52,8.52,0,0,0-3.89,3.89Z"}),(0,n.jsx)("path",{className:"translate-x-[-0.01px] fill-white",d:"M91.62,53.62l3.13,3.13a2.75,2.75,0,0,1,0,4L58.87,96.62a2.75,2.75,0,0,1-4,0l-3.13-3.13a2.75,2.75,0,0,1,0-4L87.63,53.62A2.75,2.75,0,0,1,91.62,53.62Z"}),(0,n.jsx)("path",{className:"translate-x-[-0.01px] fill-white",d:"M94.75,93.49l-3.13,3.13a2.75,2.75,0,0,1-4,0L51.75,60.74a2.75,2.75,0,0,1,0-4l3.13-3.13a2.75,2.75,0,0,1,4,0L94.75,89.5A2.75,2.75,0,0,1,94.75,93.49Z"})]})},lY=e=>{let{className:t,...l}=e;return(0,n.jsx)("svg",{className:t,viewBox:"0 0 92 87.999",xmlns:"http://www.w3.org/2000/svg",...l,children:(0,n.jsx)("path",{d:"M42.506,3.06,31.277,25.813,6.153,29.474a5.5,5.5,0,0,0-3.044,9.383l18.176,17.7-4.3,25a5.5,5.5,0,0,0,7.979,5.791L47.441,75.547,69.917,87.354A5.5,5.5,0,0,0,77.9,81.562l-4.3-25,18.176-17.7a5.5,5.5,0,0,0-3.044-9.383l-25.124-3.66L52.377,3.06a5.509,5.509,0,0,0-9.871,0Z",transform:"translate(-1.441 0.001)"})})},lQ=e=>{let{message:t}=e;return(0,n.jsxs)("div",{className:"absolute left-0 top-0 z-10 -ml-2 mt-10 flex rotate-45 items-center rounded-lg border-2 border-red-500 bg-white px-2 py-2 text-xs not-italic text-red-500 before:absolute before:left-0 before:top-0 before:-mt-2 before:ml-4 before:block before:h-3 before:w-3 before:border-2 before:border-b-0 before:border-r-0 before:border-red-500 before:bg-white before:content-['']",children:[(0,n.jsx)("svg",{className:"inline-block fill-current",height:"20",viewBox:"0 0 27 27",width:"20",children:(0,n.jsx)("path",{d:"M13.3,26.8c-3.6,0-7-1.4-9.5-4c-2.5-2.5-4-6-4-9.5c0-3.6,1.4-7,4-9.5c2.5-2.5,6-4,9.5-4c3.6,0,7,1.4,9.5,4c2.5,2.5,4,6,4,9.5c0,3.6-1.4,7-4,9.5C20.3,25.4,16.8,26.8,13.3,26.8z M13.6,17.8c-0.7,0-1.4,0.2-1.9,0.6c-0.4,0.4-0.7,.1-0.7,1.7c0,0.6,0.2,1.2,0.7,1.7c0.5,0.4,1.2,0.6,1.9,0.6c0.7,0,1.3-0.2,1.8-0.6c0.5-0.4,0.7-1.1,0.7-1.7c0-0.6-0.2-1.2-0.6-1.7C14.9,18,14.2,17.8,13.6,17.8L13.6,17.8z M11,4.6L11,4.6l0.6,11.4h4l0.6-11.4H11z"})}),(0,n.jsx)("span",{className:"pl-2 text-black",children:t})]})},lX=e=>{let{checked:t,className:l,id:a,onAnswerSelected:s,optionText:r,questionId:i,showError:o,wrongOptionTooltip:c}=e;return(0,n.jsxs)("div",{className:"relative",children:[(0,n.jsx)("input",{checked:t,className:l,id:a,name:i,onChange:s,type:"radio",value:r}),(0,n.jsx)("label",{className:"text-gray-800 block cursor-pointer rounded-lg p-4 peer-checked:border-primary peer-checked:bg-primary peer-checked:text-white",htmlFor:a,children:r}),o&&c?(0,n.jsx)(lQ,{message:c}):null]})},lJ=e=>{let{counter:t,questionText:l}=e;return(0,n.jsxs)("div",{children:[(0,n.jsx)("div",{className:"mb-2 italic",children:(0,n.jsx)("span",{children:"Question ".concat(t)})}),(0,n.jsx)("h3",{className:"mb-4",children:l})]})},l0=e=>{var t,l,a,r;let o,{introPageContent:c=null,introPageButtonText:d="Example Button",questions:m,className:u="",isCertification:h=!1,noFeedbackPerQuestion:p=!1,result:x,failedResult:f=null,passPercent:g=80,showUserScore:v=!1,correctOptionFeedbackTitle:y="",wrongOptionFeedbackTitle:j="",wrongOptionTooltip:N="",shareNotes:_,prevButtonText:k="Prev",nextButtonText:C="Next",userCorrectAnswersCountText:S="You got {0} out of {1} correct",facebookShareUrl:L="",twitterShareUrl:T="",linkedinShareUrl:I="",hideShareIcons:E=!1,hideProgressBar:A=!1}
1=e,F=null!==c,[B,M]=(0,s.useState)(F),D=(0,s.useRef)(B),[R,q]=(0,s.useState)(1),[z,O]=(0,s.useState)(1),[U,$]=(0,s.useState)(!B),[V,Z]=(0,s.useState)(!0),[G,W]=(0,s.useState)(!1),[K,Y]=(0,s.useState)(null==(t=m[R-1])?void 0:t.id),Q=(0,s.useRef)(K),[X,J]=(0,s.useState)(null==(l=m[R-1])?void 0:l.questionText),[ee,et]=(0,s.useState)(null==(a=m[R-1])?void 0:a.options),[el,en]=(0,s.useState)(!1),ea=(0,s.useRef)(el),[es,er]=(0,s.useState)(!1),[ei,eo]=(0,s.useState)(0),[ec,ed]=(0,s.useState)([]),[em,eu]=(0,s.useState)(!1),[eh,ep]=(0,s.useState)(""),[ex,ef]=(0,s.useState)("");(0,s.useEffect)(()=>{let e=ec.find(e=>e.id===K);e?ep(e.answerText):ep("")},[K,ec]);let eg=m.length,ev=m.map(e=>{var t;return{id:e.id,answerText:(null==(t=e.options.find(e=>e.isCorrect))?void 0:t.optionText)||""}}),eb=!L&&!T&&!I||E,ey=e=>"object"==typeof e&&null!==e&&(0,s.isValidElement)(e),ej=null;if(f&&ey(f)){let e=s.Children.toArray(f.props.children);o=e.find(e=>ey(e)&&e.type===H.$&&"data-reset-quiz"in e.props),ej=e.filter(e=>e!==o)}let ew=()=>{let e=ec.find(e=>e.id===K);e&&ep(e.answerText)},eN=e=>{e&&(0,b.d)({event:"cta_click",cta_name:e,cta_category:"CTA_Button"})};return(0,s.useEffect)(()=>{Q.current!==K||D.current!==B?ew():ea.current!==el&&ew(),Q.current=K,D.current=B,ea.current=el}),(0,n.jsxs)("div",{className:(0,i.$)("mx-auto my-4 rounded-lg ".concat(u)),children:[B?(0,n.jsxs)("div",{children:[(0,n.jsx)("div",{className:"bg-blue-900 p-4 text-center text-white md:p-8 lg:py-16",children:(0,n.jsx)("div",{className:"content",children:c})}),(0,n.jsx)("div",{className:"p-4 text-center md:py-8 lg:py-16",children:(0,n.jsx)(H.$,{as:"button",onClick:()=>{M(!1)},type:"button",children:d})})]}):null,!B&&(0,n.jsxs)("div",{children:[!G&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("div",{className:"p-4 md:p-8",children:[!el&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(lJ,{counter:R,questionText:X}),null==ee?void 0:ee.map((e,t)=>(0,n.jsx)(lX,{checked:eh===e.optionText,className:(0,i.$)("js-quiz-input ".concat(ex===e.optionText?"invalid":"")),id:"".concat(K,"-").concat(t+1),onAnswerSelected:t=>{((e,t)=>{ep(t.optionText),void 0===ec.find(e=>e.id===K)?ed(ec.concat({id:K,answerText:t.optionText})):ed(ec.map(e=>e.id===K?{...e,answerText:t.optionText}:e));let l=t.isCorrect;if(!h){Z(!1),er(l);return}ef(l?"":t.optionText),Z(!l),l?Z(!1):(e.currentTarget.classList.add("invalid"),Z(!0))})(t,e)},optionText:e.optionText,questionId:"q-".concat(K),wrongOptionTooltip:N},"".concat(K,"-").concat(t+1)))]}),el?(0,n.jsxs)("div",{className:"mx-auto my-6 max-w-xl",children:[es?(0,n.jsx)(lZ,{className:"mx-auto h-12 w-12"}):(0,n.jsx)(lG,{className:"mx-auto h-12 w-12"}),(0,n.jsx)("h3",{className:"mb-4 mt-8",children:es?y:j}),(0,n.jsx)("div",{children:null==(r=m[R-1])?void 0:r.feedback})]}):null,(0,n.jsxs)("div",{className:"flex pt-6",children:[(0,n.jsx)(H.$,{as:"button",disabled:U,icon:P.v.ArrowLeft,onClick:()=>{(e=>{if(eN(e),!h&&!p){if(R>1&&!el)en(!0);else if(el){en(!1),1!==R||F||$(!0);return}}if(R>1){var t,l,n;
12===R&&!F&&(h||p?$(!0):el&&$(!0)),q(R-1),Y(null==(t=m[R-2])?void 0:t.id),J(null==(l=m[R-2])?void 0:l.questionText),et(null==(n=m[R-2])?void 0:n.options),Z(!1)}else F&&M(!0)})(k)},reversed:!0,type:"button",children:k}),(0,n.jsx)(H.$,{as:"button",className:"ml-auto",disabled:V,icon:P.v.ArrowRight,onClick:()=>{(e=>{if(eN(e),$(!1),h||p||(en(!el),el))if(R<m.length){var t,l,n;R+1>=z&&(O(R+1),Z(!0)),q(R+1),Y(null==(t=m[R])?void 0:t.id),J(null==(l=m[R])?void 0:l.questionText),et(null==(n=m[R])?void 0:n.options)}else{let e=0;ev.forEach(t=>{let l=ec.find(e=>e.id===t.id);JSON.stringify(t)===JSON.stringify(l)&&(e+=1)}),eo(e),eu(100*e/eg>=g),W(!0)}})(C)},type:"button",children:C})]})]}),!A&&(0,n.jsxs)("div",{className:"bg-blue-900 p-8 text-center text-white",children:[(0,n.jsx)("ul",{className:"mb-2 flex items-center justify-center",children:m.map((e,t)=>t+1<m.length?(0,n.jsx)("li",{children:(0,n.jsx)("span",{className:(0,i.$)("mx-1 inline-block h-5 w-5 rounded-full text-xs ".concat(t+1<R?"bg-secondary":"bg-white"))})},e.id):(0,n.jsx)("li",{children:(0,n.jsx)("span",{className:"mx-1 inline-block h-10 w-10 rounded-full text-xs",children:(0,n.jsx)(lY,{className:(0,i.$)("mx-auto h-full w-full fill-current ".concat(t+1<R?"text-secondary":"text-white"))})})},e.id))}),(0,n.jsx)("p",{className:"text-sm",children:"".concat(R," of ").concat(eg)})]})]}),G?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("div",{className:"mx-auto max-w-xl p-8 py-12 text-center",children:[h||!v||em?null:(0,n.jsx)("h4",{className:"mb-4",children:S.replace("{0}",ei.toString()).replace("{1}",eg.toString())}),em?(0,n.jsxs)("div",{children:[(0,n.jsx)(lW,{className:"mx-auto h-20 w-20"}),x]}):(0,n.jsxs)("div",{children:[(0,n.jsx)(lK,{className:"mx-auto mb-6 h-20 w-20"}),ej,o?(0,s.cloneElement)(o,{onClick:()=>{var e,t,l;M(F),q(1),O(1),$(!F),Z(!0),W(!1),Y(null==(e=m[0])?void 0:e.id),J(null==(t=m[0])?void 0:t.questionText),et(null==(l=m[0])?void 0:l.options),en(!1),er(!1),eo(0),ed([]),eu(!1),ep(""),ef("")}}):null]})]}),(0,n.jsx)("div",{className:(0,i.$)("items-center justify-center bg-blue-900 p-8 text-center text-white sm:flex ".concat(eb?"py-16":"")),children:!eb&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("p",{className:"mb-4 sm:mb-1 sm:mr-6",children:_}),(0,n.jsxs)("div",{children:[L?(0,n.jsx)(w,{className:"mr-4 h-12 w-12 border border-white",href:"https://www.facebook.com/sharer/sharer.php?kid_directed_site=0&u=".concat(L,"&display=popup&ref=plugin&src=share_button"),icon:P.v.Facebook.icon,iconSize:"h-8 w-8",target:"_blank",variant:"secondary",children:"Facebook"}):null,T?(0,n.jsx)(w,{className:"mr-4 border border-white",href:"https://twitter.com/share?url=".concat(T),icon:P.v.Twitter.icon,iconSize:"h-7 w-7",target:"_blank",variant:"secondary",children:"Twitter"}):null,I?(0,n.jsx)(w,{className:"mr-4 h-12 w-12 border border-white",href:"https://www.linkedin.com/sharing/share-offsite/?url=".concat(I),icon:P.v.LinkedIn.icon,iconSize:"h-7 w-7",target:"_blank",variant:"secondary",children:"Linkedin"}):null]})]})})]}):null]})]})},l1={primary:"border-primary",secondary:"border-secondary",galliprant:"border-galliprant",galliprant_red:"border-galliprant_red",bexacat_dark_grey:"border-bexacat_dark_grey",varenzin_blue:"border-varenzin_blue",varenzin_purple:"border-varenzin_purple",trifexis:"border-trifexis",micotil:"border-micotil",interceptor_plus:"border-interceptor_plus",capstar:"border-capstar",credelio:"border-credelio",bewormready:"border-bewormready",elura:"border-elura",entyce:"border-entyce",comfortis:"border-comfortis",advocate:"border-advocate",experior:"border-experior",zenrelia_primary:"border-zenrelia_primary",zenrelia_secondary:"border-zenrelia_secondary",zenrelia_contrast:"border-zenrelia_contrast",zenrelia_accent:"border-zenrelia_accent",zenrelia_sku1:"border-zenrelia_sku1",zenrelia_sku2:"border-zenrelia_sku2",zenrelia_sku3:"border-zenrelia_sku3",zenrelia_sku4:"border-zenrelia_sku4",credelio_quattro_guard_dog:"border-credelio_quattro_guard_dog",credelio_quattro_hunter_green:"border-credelio_quattro_hunter_green",credelio_quattro_grass_green:"border-credelio_quattro_grass_green",credelio_quattro_tennis_ball_green:"border-credelio_quattro_tennis_ball_green",credelio_quattro_park_green:"border-credelio_quattro_park_green",credelio_quattro_milk_bone:"border-credelio_quattro_milk_bone",credelio_quattro_golden:"border-credelio_quattro_golden",credelio_quattro_frisbee:"border-credelio_quattro_frisbee",credelio_quattro_sunny_day:"border-credelio_quattro_sunny_day",credelio_quattro_sky_blue:"border-credelio_quattro_sky_blue",pet_protect_red:"border-pet_protect_red",pet_protect_green:"border-pet_protect_green",pet_protect_blue:"border-pet_protect_blue",clean_up_2:"border-clean_up_2",cydectin:"border-cydectin",scour_bos:"border-scour_bos",vira_shield:"border-vira_shield",pet_protect_skin:"border-pet_protect_skin",pet_protect_calm:"border-pet_protect_calm",pet_protect_allergy:"border-pet_protect_allergy",civ:"border-civ",elmaro_navy_blue:"border-elmaro_navy_blue",elmaro_pink:"border-elmaro_pink",elmaro_yellow:"border-elmaro_yellow",rosa_xo_verme:"border-rosa_xo_verme",catosal_metabol:"border-catosal_metabol",befrena_primary_blue:"border-befrena_primary_blue",befrena_accent_green:"border-befrena_accent_green",befrena_accent_pink:"border-befrena_accent_pink",zolvix_plus_green:"border-zolvix_plus_green",zolvix_plus_orange:"border-zolvix_plus_orange",eluracat_dark_pink:"border-eluracat_dark_pink",eluracat_light_pink:"border-eluracat_light_pink",eluracat_yellow:"border-eluracat_yellow",milbemax_red:"border-milbemax_red",milbemax_blue:"border-milbemax_blue"}
1,l2={round:"rounded-full h-44 w-44",square:"h-44 w-auto",oval:"h-44 w-64 rounded-full"},l4=e=>{let{fontClass:t="text-xl",image:l,quote:a,quotee:r="",richTextContent:o,showImageOnTop:c=!1,borderColor:d="",borderHexColor:m,imageShape:u="oval"}=e,h=a.split(" "),p=h.pop(),x=(0,i.$)("mx-auto",l2[u],m?"border-3":d&&"border-3 ".concat(l1[d]));return(0,n.jsxs)("div",{className:(0,i.$)("md:flex md:items-center",c&&"flex flex-col items-center"),children:[(0,s.isValidElement)(l)?(0,s.cloneElement)(l,{className:(0,i.$)(x,l.props.className),...m?{style:{...l.props.style,borderColor:m}}:{}}):l,(0,n.jsx)("div",{className:!c&&(0,s.isValidElement)(l)?"md:w-3/5":"",children:null!=o?o:(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("blockquote",{className:(0,i.$)("relative m-4 mb-8 pr-6",t),children:[(0,n.jsxs)("svg",{"aria-hidden":"true",className:"absolute left-0 top-0 fill-current",focusable:"false",height:"23.3",viewBox:"0 0 31.02 23.3",width:"31.02",xmlns:"http://www.w3.org/2000/svg",children:[(0,n.jsx)("title",{children:"left-side-quote"}),(0,n.jsx)("path",{d:"M9.027,22.9V15.324H5a16.635,16.635,0,0,1,.171-2.355,6.984,6.984,0,0,1,.648-2.15A4.371,4.371,0,0,1,7.048,9.284,3.034,3.034,0,0,1,8.959,8.7V5.292a6.624,6.624,0,0,0-3.344.819A6.984,6.984,0,0,0,3.261,8.295,9.784,9.784,0,0,0,1.9,11.468a16.145,16.145,0,0,0-.444,3.856V22.9Zm12.489,0V15.324H17.49a16.634,16.634,0,0,1,.171-2.355,6.984,6.984,0,0,1,.648-2.15,4.371,4.371,0,0,1,1.228-1.536,3.034,3.034,0,0,1,1.911-.58V5.292a6.624,6.624,0,0,0-3.344.819A6.984,6.984,0,0,0,15.75,8.295a9.784,9.784,0,0,0-1.365,3.174,16.145,16.145,0,0,0-.444,3.856V22.9Z",transform:"translate(-1.452 -5.292)"})]}),(0,n.jsxs)("span",{className:"inline-block pl-12",children:["".concat(h.join(" ")," "),(0,n.jsxs)("span",{className:"relative",children:[p,(0,n.jsxs)("svg",{"aria-hidden":"true",className:"absolute right-0 fill-current",focusable:"false",height:"23.3",style:{right:"-60px",bottom:"-15px"},viewBox:"0 0 31.02 23.3",width:"31.02",xmlns:"http://www.w3.org/2000/svg",children:[(0,n.jsx)("title",{children:"right-side-quote"}),(0,n.jsx)("path",{d:"M9.027,22.9V15.324H5a16.635,16.635,0,0,1,.171-2.355,6.984,6.984,0,0,1,.648-2.15A4.371,4.371,0,0,1,7.048,9.284,3.034,3.034,0,0,1,8.959,8.7V5.292a6.624,6.624,0,0,0-3.344.819A6.984,6.984,0,0,0,3.261,8.295,9.784,9.784,0,0,0,1.9,11.468a16.145,16.145,0,0,0-.444,3.856V22.9Zm12.489,0V15.324H17.49a16.634,16.634,0,0,1,.171-2.355,6.984,6.984,0,0,1,.648-2.15,4.371,4.371,0,0,1,1.228-1.536,3.034,3.034,0,0,1,1.911-.58V5.292a6.624,6.624,0,0,0-3.344.819A6.984,6.984,0,0,0,15.75,8.295a9.784,9.784,0,0,0-1.365,3.174,16.145,16.145,0,0,0-.444,3.856V22.9Z",transform:"translate(21.517 22.9) rotate(180)"})]})]})]})]}),r?(0,n.jsxs)("p",{className:"px-16",children:["— ",r]}):null]})})]})},l6=e=>{var t,l,a;let{block:s,page:r,...i}=e,o=(null==(t=s.elements.imagePlacement[0])?void 0:t.codename)==="top",{colorId:c,hexCode:d}=G({blockColor:s.elements.brandColor,blockColorLegacy:s.elements.borderColor,pageConfig:r.elements.config[0],fallbackColorId:"primary"}),m=(null==(l=s.elements.imageShape[0])?void 0:l.codename)||"oval",u=(null==(a=s.elements.richText)?void 0:a[0])?(0,n.jsx)(p,{block:s.elements.richText[0],page:r,...i}):null;return(0,n.jsx)("div",{"data-kontent-element-codename":"quote",children:(0,n.jsx)(l4,{borderColor:null!=c?c:"primary",borderHexColor:null!=d?d:void 0,image:s.elements.image[0]?(0,n.jsx)(f(),{alt:s.elements.image[0].description||"",className:"mx-auto h-44 w-auto rounded-full",height:s.elements.image[0].height||164,loader:v.L,src:s.elements.image[0].url,width:s.elements.image[0].width||306}):null,imageShape:m,quote:s.elements.quote,quotee:s.elements.quotee,richTextContent:u,showImageOnTop:o})})};l(50364);var l3=l(37472),l5=l.n(l3);let l7=e=>{let{className:t="",isLargeMode:l=!1,children:a=null,autoPlay:r=!1,autoPlaySpeed:o=1e3}=e,[c,d]=(0,s.useState)(r);(0,s.useEffect)(()=>{let e=e=>{"Tab"===e.key&&c&&d(!1)};return window.addEventListener("keydown",e),()=>{window.removeEventListener("keydown",e)}},[c]);let m=l5().largeMode||"";return(0,n.jsx)(er.default,{className:(0,i.$)(t,l5().quoteSlider,{[m]:l}),...{dots:!0,infinite:!0,speed:500,slidesToShow:1,slidesToScroll:1,adaptiveHeight:!0,dotsClass:"slick-dots",autoplay:c,autoplaySpeed:o},children:a})},l8={YOUTUBE:"youtube",WISTIA:"wistia"},l9=e=>{if("video_block"===e.system.type)return{videoId:e.elements.videoId,type:l8.YOUTUBE};if("wistia"===e.system.type)return{videoId:e.elements.id,type:l8.WISTIA};
1throw RangeError("Received an invalid video type, got ".concat(e.system.type,", expected either 'video_block' or 'wistia'"))},ne=e=>{var t,l,s,r,i,o,d,m,u,h;let{block:p,...x}=e,g=p.elements.buttontext||"Play Video",b="0:"===ty()?"hide":"",y=p.elements.video[0]?l9(p.elements.video[0]):null,{locale:j}=(0,a.useRouter)(),w=p.elements.metaBlock[0],N=$(null!=(h=null==w?void 0:w.elements.url)?h:"",null!=j?j:""),_=p.elements.richDescription.value,k=p.elements.description.trim(),C=!_||"<p><br></p>"===_,S=!C,L=C&&!!k;return(0,n.jsx)(n.Fragment,{children:p.elements.ctaButton.length>0?(0,n.jsxs)(et,{className:"flex h-full flex-col",metaBlock:(0,n.jsx)(M,{blur:!0,isExternalLink:(null==w||null==(t=w.elements.openInNewTab[0])?void 0:t.codename)==="yes",metaBlockHref:N,metaText:"",children:(null==(l=p.elements.metaBlock[0])?void 0:l.elements.title)||""}),title:p.elements.title,children:[p.elements.image[0]?(0,n.jsx)(ee,{alt:p.elements.image[0].description||"",className:"h-48 w-full object-contain",src:p.elements.image[0].url}):null,S?(0,n.jsx)(c.rM,{className:"mb-4 flex-grow","data-kontent-element-codename":"rich_description",element:p.elements.richDescription,...x}):null,L?(0,n.jsx)("p",{className:"mb-4 flex-grow",children:k}):null,(0,n.jsx)(el,{children:(0,n.jsx)(n.Fragment,{children:p.elements.ctaButton[0]?(0,n.jsx)(X,{block:p.elements.ctaButton[0],className:"w-full",...x,variant:"primary"}):null})})]}):(0,n.jsxs)(lh,{className:"h-full",hasPlayVideoButton:!0,metaBlock:(0,n.jsx)(M,{blur:!0,isExternalLink:(null==w||null==(s=w.elements.openInNewTab[0])?void 0:s.codename)==="yes",metaBlockHref:N,metaText:"",children:(null==(r=p.elements.metaBlock[0])?void 0:r.elements.title)||""}),title:p.elements.title,videoElement:!0,videoId:"hide"===b?"":null==y?void 0:y.videoId,videoPosterAltText:(null==(i=p.elements.image[0])?void 0:i.description)||"",videoPosterFrameUrl:"hide"===b?"":null==(o=p.elements.image[0])?void 0:o.url,videoType:null==y?void 0:y.type,children:["hide"===b&&((null==(d=p.elements.cookieFallbackImage[0])?void 0:d.url)?(0,n.jsx)("div",{className:"mb-4 mt-10 h-48 w-full flex-shrink-0",children:(0,n.jsx)(f(),{alt:(null==(m=p.elements.cookieFallbackImage[0])?void 0:m.description)||"",className:"object-contain",height:192,loader:v.L,src:null==(u=p.elements.cookieFallbackImage[0])?void 0:u.url,width:336})}):(0,n.jsx)("div",{className:"mb-4 mt-10 h-48 w-full bg-blue-900"})),S?(0,n.jsx)(c.rM,{className:"mb-4 flex-grow","data-kontent-element-codename":"rich_description",element:p.elements.richDescription,...x}):null,L?(0,n.jsx)("p",{className:"mb-4 flex-grow",children:k}):null,"hide"===b?"":(0,n.jsx)(H.$,{className:"w-full",children:g})]})})},nt=e=>{let{icon:t="",isExternalLink:l=!1,text:a="",url:s="",description:r=""}=e;return(0,n.jsx)("a",{href:s,onClick:()=>{(0,b.d)({event:"cta_click",cta_name:a,cta_category:"CTA_Button"})},rel:"noreferrer",target:l?"_blank":"_self",children:(0,n.jsxs)("div",{className:"flex cursor-pointer flex-col items-center justify-center md:flex-row",children:[(0,n.jsx)(f(),{alt:r,className:"mb-1 h-8 w-8 md:m-0",height:32,loader:v.L,src:t,width:32}),(0,n.jsx)("span",{className:"mt-3 flex h-10 items-center justify-center text-center leading-tight hover:underline md:mt-0 md:h-auto md:pl-2 md:text-left",children:a})]})})},nl=e=>{var t,l;let{className:s,block:r}=e,{locale:i=""}=(0,a.useRouter)(),o=(null==(t=r.elements.openInNewTab[0])?void 0:t.codename)==="yes",c=r.elements.url.startsWith("/")?"/".concat(i):"";return(0,n.jsx)("div",{className:s||"","data-kontent-element-codename":r.system.codename,children:(0,n.jsx)(nt,{description:r.elements.description,icon:null==(l=r.elements.icon[0])?void 0:l.url,isExternalLink:o,text:r.elements.text,url:"".concat(c).concat(r.elements.url)})})},nn={primary:"bg-theme-main",secondary:"bg-blue-900",galliprant:"bg-galliprant",trifexis:"bg-trifexis",micotil:"bg-micotil",interceptorplus:"bg-interceptor_plus",capstar:"bg-capstar",credelio:"bg-credelio",bewormready:"bg-bewormready",entyce:"bg-entyce",elura:"bg-elura",comfortis:"bg-comfortis",advocate:"bg-advocate",experior_green:"bg-experior",hemicell:"bg-hemicell"},na=e=>{var t;let{brand:l="primary",expanded:a=!1,fixed:s=!1,id:r="",className:i=""}=e,o="";o=a?"h-12":s?"h-1 md:h-2":"h-8";let c=null!=(t=nn[l])?t:"bg-".concat(l);return(0,n.jsx)("hr",{className:"".concat(i," border-0 transition-all duration-200 ease-out ").concat(o," ").concat(c," ").concat(s?'after:content-[" "] -z-1 md:absolute md:bottom-0 md:inline-block md:h-1 md:w-full md:shadow-secondary':""),id:r})};var ns=l(89922),nr=l(47720);let ni=async e=>{let{data:t}=await (0,eM.L)({url:"/api/getToken?locale=".concat(e)});return t};var no=l(72076).hp;let nc=e=>{let{block:t}
1=e,[l,r]=(0,s.useState)(""),{locale:i=""}=(0,a.useRouter)();return(0,s.useEffect)(()=>{let e=new URL(window.location.href).searchParams.get("q");r(null!=e?e:"")},[]),(0,n.jsxs)(tV,{className:"text-center",noTheme:!0,children:[(0,n.jsx)("h1",{children:t.elements.title}),t.elements.description.length>0?(0,n.jsx)("p",{className:"max-w-2xl pt-4",children:t.elements.description}):null,(0,n.jsxs)("form",{className:"relative mx-auto mt-16 min-w-[90%] max-w-full md:w-2/5",onSubmit:e=>{(e=>{if(e.preventDefault(),""!==t.elements.searchResultsPagePath){let e=new URL("".concat(i,"/").concat(t.elements.searchResultsPagePath,"?q=").concat(encodeURIComponent(l)),"".concat(window.location.protocol,"//").concat(window.location.host));window.location.replace(e)}else{let e=new URL(window.location.href);e.searchParams.set("q",l),window.history.pushState(null,"",e),window.dispatchEvent(new Event("popstate"))}})(e)},children:[(0,n.jsxs)("label",{htmlFor:"search-header-input",children:[(0,n.jsx)("span",{className:"sr-only",children:"Search"}),(0,n.jsx)("input",{className:"mb-0 text-black","data-clarity-mask":"true",id:"search-header-input",onChange:e=>{r(e.target.value)},placeholder:t.elements.placeholder,type:"text",value:l})]}),(0,n.jsx)(w,{as:"button",className:"absolute inset-y-0 right-0 my-auto mr-2",icon:P.v.Search,iconSize:"w-6 h-6",size:"sm",type:"submit",children:"Search"})]})]})},nd=e=>{let{results:t=[],totalCount:l=t.length,resultsTitle:a="{totalCount} results found for '{searchTerm}'",noResultsText:s="No results to show for '{searchTerm}'",resultsText:r="Showing 1 - {pageLength} out of {totalCount} results",linkText:i,searchTerm:c=""}=e,d=function(e){for(var t=arguments.length,l=Array(t>1?t-1:0),n=1;n<t;n++)l[n-1]=arguments[n];let a=e;if(l.length){let e=l[0];Object.entries("object"==typeof e?e:l.reduce((e,t,l)=>(e[l.toString()]=t,e),{})).forEach(e=>{let[t,l]=e;a=a.replace(RegExp("\\{".concat(t,"\\}"),"gi"),l.toString())})}return a},m="corporate"===o._.NEXT_PUBLIC_TOWER,u=t.map((e,t)=>(0,n.jsxs)("div",{className:"relative mb-6 border border-gray-200 bg-white p-6 text-midnight shadow-sm md:p-7",children:[e.category?(0,n.jsx)("span",{className:"inline-block border-2 border-midnight bg-white px-4 py-1 text-sm uppercase",children:m&&"simple_page"===e.category?"web page":e.category}):null,(0,n.jsx)("h3",{className:"mb-1 mt-4 text-lg",children:e.title}),(0,n.jsx)("p",{className:"mb-4 mt-1 line-clamp-3",children:e.desc}),(0,n.jsx)("a",{className:"text-sm font-bold text-primary underline hover:text-primary-dark focus:text-secondary focus:outline-none",href:e.url,onClick:()=>{(0,b.d)({event:"selected_search_results",search_term:c,search_result_selected:window.location.origin+e.url,search_result_position:t+1})},children:i||e.url})]},e.title)),h=d(s,{searchTerm:c});return l&&(h=d(r,{pageLength:t.length,totalCount:l})),(0,n.jsxs)("div",{children:[(0,n.jsx)("h2",{className:"mb-12 font-semibold",children:d(a,{totalCount:l,searchTerm:c})}),(0,n.jsx)("p",{className:"mb-2 text-gray-600",children:h}),(0,n.jsx)("div",{children:u})]})},nm=e=>{var t;let{block:l,...r}=e,i=(0,es.As)(),{locale:c=""}=(0,a.useRouter)(),[d,m]=(0,s.useState)([]),[u,h]=(0,s.useState)(""),[p,x]=(0,s.useState)(0),[f,g]=(0,s.useState)(0),[v,y]=(0,s.useState)(!1),j=!1,w=r.globalConfig.elements,N=w.searchIndexUrl,_="showGatedContentInInternalSearch"in w&&(null==(t=w.showGatedContentInInternalSearch[0])?void 0:t.codename)==="yes",k=o._.NEXT_PUBLIC_SEARCH_API_KEY,C=async()=>{y(!0);let e=new URL(window.location.href).searchParams.get("q"),t=_?"":"&$filter=(gateLevel le ".concat(i.authLevel,")"),n="".concat(N).concat(e,"&$top=").concat(18,"&$skip=").concat(f,"&$count=true").concat(t);h(null!=e?e:"");try{let{data:t}=await eM.L.get(n,{headers:{"api-key":k}});if(t.value){let n=t.value.map(e=>{e.url&&!e.url.startsWith("/")&&(e.url="/".concat(e.url));let t="/".concat(c).concat(e.url);return{category:(e=>{var t;let n=l.elements.categoryDisplayNames.find(t=>t.elements.pageTypeCodename.toLowerCase().trim()===e.toLowerCase().trim());return null!=(t=null==n?void 0:n.elements.displayName)?t:e}
1)(e.category),title:e.title,desc:e.description,url:t}});0===f&&(0,b.d)({event:"initiate_search_results",search_term:e,current_page:!j&&document.referrer||window.location.href}),j=!0,0===f&&(0,b.d)({event:"returned_search_results",search_term:e,search_results_count:t["@odata.count"],search_status:t["@odata.count"]>0?"Successful":"Unsuccessful"}),m([...d,...n]),x(t["@odata.count"]),g(e=>e+18),y(!1)}}catch(t){t instanceof Error?console.error("An error occurred when obtaining search results.",{error:t.message||t.name}):console.error("An error occurred when obtaining search results.",{error:t}),0===f&&(0,b.d)({event:"initiate_search_results",search_term:e,current_page:!j&&document.referrer||window.location.href}),j=!0,y(!1)}};(0,s.useEffect)(()=>{i.authLevel>=0&&C();let e=()=>{C(),g(0)};return window.addEventListener("popstate",e),()=>{window.removeEventListener("popstate",e)}},[i.authLevel]);let S=p>18&&p!==d.length,L=""!==u||0!==d.length;return(0,n.jsxs)("div",{"data-kontent-element-codename":"show_search_results",children:[v?(0,n.jsx)("div",{className:"flex w-full justify-center py-6",children:(0,n.jsx)(l$(),{color:(0,V.K_)("elanco-dark-navy"),height:15,loading:!0,margin:2,radius:2,width:5})}):null,L&&!v?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(nd,{linkText:l.elements.linkText,newText:l.elements.label,noResultsText:l.elements.noResultsText,results:d,resultsText:l.elements.resultsText||void 0,resultsTitle:l.elements.title||void 0,searchTerm:u,totalCount:p}),S?(0,n.jsx)("div",{className:"text-center",children:l.elements.loadMore.map(e=>(0,n.jsx)(X,{block:e,onClick:e=>{e.preventDefault(),C()},...r},e.system.id))}):null]}):null]})},nu=["none","xs","sm","md","lg"],nh=e=>{var t,l;let{icon:a,borderHexColor:s}=e,r=null!=(l=null==(t=a.elements.size[0])?void 0:t.codename)?l:"";return(0,n.jsx)("div",{"data-kontent-item-id":a.system.id,children:(0,n.jsx)(S,{borderHexColor:s,className:"mr-2",size:nu.includes(r)?r:"sm",children:(0,n.jsx)("div",{className:"relative h-full w-full",children:a.elements.icon[0]?(0,n.jsx)(f(),{alt:a.elements.icon[0].description||"","data-kontent-element-codename":"icon",fill:!0,loader:v.L,src:a.elements.icon[0].url}):null})})})},np=e=>{var t,l,s,r,o;let{block:{elements:{columnHeadings:d,rebate:[m]}},forceMobileView:u=!1,hideClaimButtons:h=!1,...p}=e,{locale:x=""}=(0,a.useRouter)();if(!m)return(0,n.jsx)(n.Fragment,{});let g=(0,i.$)("relative grid grid-cols-2 border-b border-light-grey !bg-white py-2 text-sm",{"md:table-row":!u,"px-4":!u}),y=(0,i.$)("font-bold italic text-midnight-blue",{"md:hidden":!u});return(0,n.jsxs)("tr",{className:g,children:[(0,n.jsx)("td",{className:(0,i.$)("col-span-2 grid place-content-start border-r-0 py-2 text-left first-letter:uppercase",{"px-2 md:table-cell  md:px-4 md:pl-0":!u}),children:(0,n.jsx)("span",{className:"block w-full max-w-[160px] text-[#333] md:max-w-[130px]",children:m.elements.brandImage.map((e,t)=>{let{elements:{image:[l]},system:{id:a}}=e;return l?(0,n.jsx)(f(),{alt:l.description||"",className:1===t?"mt-2":void 0,height:l.height||80,loader:v.L,src:l.url,width:l.width||160},a):null})})}),(0,n.jsxs)("td",{className:(0,i.$)("col-span-2 grid place-content-start border-r-0 py-2 text-left",{"px-2 md:table-cell md:px-4":!u}),children:[(0,n.jsx)("span",{className:y,children:null==(t=d[1])?void 0:t.elements.content}),(0,n.jsx)("span",{className:"text-lg font-bold text-[#333]",children:m.elements.offerCode})]}),(0,n.jsxs)("td",{className:(0,i.$)("col-span-1 grid place-content-start border-r-0 py-2 text-left",{"md:table-cell md:max-w-[240px] md:px-4":!u}),children:[(0,n.jsx)("span",{className:y,children:null==(l=d[2])?void 0:l.elements.content}),(0,n.jsx)(c.rM,{as:"span",className:"text-[#333]",element:m.elements.offerDetails,...p})]}),(0,n.jsxs)("td",{className:(0,i.$)("col-span-1 grid place-content-start border-r-0 py-2 text-left",{"px-2 md:table-cell md:max-w-[145px] md:px-4":!u}),children:[(0,n.jsx)("span",{className:y,children:null==(s=d[3])?void 0:s.elements.content}),(0,n.jsx)(c.rM,{as:"span",className:"text-[#333]",element:m.elements.rebateValue,...p})]}),(0,n.jsxs)("td",{className:(0,i.$)("col-span-1 grid place-content-start border-r-0 py-2 text-left",{"px-2 md:table-cell md:px-4":!u}),children:[(0,n.jsx)("span",{className:y,children:null==(r=d[4])?void 0:r.elements.content}),(0,n.jsx)("span",{className:"text-[#333]",children:m.elements.validPurchaseDates})]}),(0,n.jsxs)("td",{className:(0,i.$)("col-span-1 grid place-content-start border-r-0 py-2 text-left",{"px-2 md:table-cell md:px-4":!u}),children:[(0,n.jsx)("span",{className:y,children:null==(o=d[4])?void 0:o.elements.content}),(0,n.jsx)("span",{className:"text-[#333]",children:m.elements.submissionDeadline})]}),(0,n.jsxs)("td",{className:(0,i.$)("col-span-2 grid border-r-0 py-2 text-center",{"px-2 md:table-cell md:max-w-[150px] md:px-0":!u}),children:[!h&&m.elements.claimRebateCta.map(e=>{var t,l;return(0,n.jsx)(B(),{href:$(e.elements.url,x),legacyBehavior:!0,children:(0,n.jsx)(H.$,{href:e.elements.url,onClick:()=>{(0,b.d)({event:"cta_click",cta_name:e.elements.text,cta_category:"CTA_Button"})},target:(null==(t=e.elements.openLinkInNewTab[0])?void 0:t.codename)==="yes"?"_blank":"_self",variant:(null==(l=e.elements.variant[0])?void 0:l.codename)||"pet_primary_green",children:e.elements.text})},e.system.id)}),m.elements.offerInfoText?(0,n.jsx)("p",{className:"my-1 text-center text-xs",children:m.elements.offerInfoText}):null,m.elements.safetyLinks[0]?(0,n.jsx)("ul",{className:"flex flex-col justify-center space-y-1",children:m.elements.safetyLinks.map(e=>{var t;return(0,n.jsx)(D,{as:"a",className:"text-center not-italic text-green-400 hover:text-green-600",href:$(e.elements.url,x),target:(null==(t=e.elements.openInNewTab[0])?void 0:t.codename)==="yes"?"_blank":"_self",children:e.elements.text},e.system.id)})}):null]})]})},nx=e=>{let{block:{elements:{columnHeadings:t,noRebatesText:l,loadMoreButton:a}},rebates:r,...i}
1=e,[o,d]=(0,s.useState)([...r].slice(0,6)),[m,u]=(0,s.useState)(6),h=o.length!==r.length;return(0,s.useEffect)(()=>{d([...r].slice(0,m))},[m,r]),(0,n.jsxs)("div",{className:"relative",id:"rebates-table",children:[(0,n.jsxs)("table",{className:"block w-full md:table",children:[(0,n.jsx)("thead",{children:(0,n.jsx)("tr",{className:"absolute left-[-9999px] top-[-9999px] block border-light-grey md:static md:left-auto md:top-auto md:table-row md:border-b",children:t.map(e=>(0,n.jsx)("th",{className:"border-0 px-4 py-3 text-left text-sm italic first-of-type:pl-0",children:e.elements.content},e.system.id))})}),(0,n.jsx)("tbody",{className:"block border-t-2 md:table-row-group md:border-0",children:o.length>0?(0,n.jsx)(n.Fragment,{children:o.map(e=>(0,n.jsx)(np,{block:{elements:{authenticationGateComponentUserRoles:[],columnHeadings:t,rebate:[e]},system:e.system},...i},e.system.id))}):(0,n.jsx)("tr",{className:"block bg-white px-4 py-2 md:table-row",children:(0,n.jsx)("td",{className:"py-10 text-center",colSpan:7,children:(0,n.jsx)(c.rM,{element:l,...i})})})})]}),h?(0,n.jsx)("div",{className:"py-4 text-center",children:a.map(e=>{var t;return(0,n.jsx)(X,{block:e,onClick:e=>{e.preventDefault(),d([...r].slice(0,m+6)),u(e=>e+6)},variant:(null==(t=e.elements.variant[0])?void 0:t.codename)||"pet_primary_green",...i},e.system.id)})}):null]})},nf=async()=>{let{data:e}=await eM.L.get("/api/brands?params=rebate_brands");if(!e.success)throw Error("Failed to fetch rebate brands");return e.data},ng={ALL:"all",DOGS:"for_dogs",CATS:"for_cats",MIXMAX:"mix_and_match_offers",BEEF:"for_beef",SWINE:"for_swine",DAIRY:"for_dairy",POULTRY:"for_poultry"},nv=e=>{let{block:{elements:{allText:t,forCatsText:l,forDogsText:a,forBeefText:s,forDairyText:r,forPoultryText:c,forSwineText:d,heading:m,mixAndMatchText:u,selectBrandText:h,sortByText:p}},activeType:x=ng.ALL,activeBrand:f="",setActiveType:g,setActiveBrand:v}=e,{data:b=[]}=(0,eB.useQuery)({queryKey:["rebateBrands"],queryFn:nf,staleTime:9e5,onError:e=>{let t=e instanceof Error?e.message:"Unknown error";(0,eF.$s)({name:"brands_fetch_error",properties:{error:t,component:"ModuleRebatesFilterBlock"}})}});return(0,n.jsx)("div",{children:(0,n.jsxs)("div",{className:"my-10 flex flex-col items-center gap-6 border-b border-light-grey pb-2 md:flex-row md:justify-between",children:[(0,n.jsx)("h4",{className:"text-xl font-normal",children:m}),(0,n.jsxs)("div",{className:"flex flex-col gap-2 md:flex-row md:items-center lg:gap-3",children:[(0,n.jsx)("span",{className:"text-xs italic",children:p}),(0,n.jsx)("button",{className:(0,i.$)(x===ng.ALL?"bg-pet-midnight text-white":null,"rounded-3xl border-2 border-pet-midnight px-2 py-0.5 text-sm font-semibold lg:px-5"),onClick:()=>{g(ng.ALL)},type:"button",children:t}),"pet"===o._.NEXT_PUBLIC_TOWER?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("button",{className:(0,i.$)(x===ng.DOGS?"bg-pet-midnight text-white":null,"rounded-3xl border-2 border-pet-midnight px-2 py-0.5 text-sm font-semibold lg:px-5"),onClick:()=>{g(ng.DOGS)},type:"button",children:a}),(0,n.jsx)("button",{className:(0,i.$)(x===ng.CATS?"bg-pet-midnight text-white":null,"rounded-3xl border-2 border-pet-midnight px-2 py-0.5 text-sm font-semibold lg:px-5"),onClick:()=>{g(ng.CATS)},type:"button",children:l}),(0,n.jsx)("button",{className:(0,i.$)(x===ng.MIXMAX?"bg-pet-midnight text-white":null,"rounded-3xl border-2 border-pet-midnight px-2 py-0.5 text-sm font-semibold lg:px-5"),onClick:()=>{g(ng.MIXMAX)},type:"button",children:u})]}):null]}),"farm"===o._.NEXT_PUBLIC_TOWER&&(0,n.jsxs)("div",{className:"flex gap-1",children:[(0,n.jsx)("button",{className:(0,i.$)(x===ng.BEEF?"bg-pet-midnight text-white":null,"rounded-3xl border-2 border-pet-midnight px-2 py-0.5 text-sm font-semibold lg:px-5"),onClick:()=>{g(ng.BEEF)},type:"button",children:s}),(0,n.jsx)("button",{className:(0,i.$)(x===ng.SWINE?"bg-pet-midnight text-white":null,"rounded-3xl border-2 border-pet-midnight px-2 py-0.5 text-sm font-semibold lg:px-5"),onClick:()=>{g(ng.SWINE)},type:"button",children:d}),(0,n.jsx)("button",{className:(0,i.$)(x===ng.DAIRY?"bg-pet-midnight text-white":null,"rounded-3xl border-2 border-pet-midnight px-2 py-0.5 text-sm font-semibold lg:px-5"),onClick:()=>{g(ng.DAIRY)},type:"button",children:r}),(0,n.jsx)("button",{className:(0,i.$)(x===ng.POULTRY?"bg-pet-midnight text-white":null,"rounded-3xl border-2 border-pet-midnight px-2 py-0.5 text-sm font-semibold lg:px-5"),onClick:()=>{g(ng.POULTRY)},type:"button",children:c})]}),h?(0,n.jsxs)("div",{className:"relative",children:[(0,n.jsxs)("select",{className:"mb-0 max-w-[200px] appearance-none rounded-md border border-pet-midnight !bg-white py-1 text-sm font-semibold text-pet-primary",name:"brand-dropdown",onChange:e=>{v(e.target.value)},value:f,children:[(0,n.jsx)("option",{value:"",children:h}),b.map(e=>(0,n.jsx)("option",{value:e.codename,children:e.name},e.codename))]}),(0,n.jsx)("svg",{"aria-hidden":"true",className:"mr-[7px] mt-[5px] !fill-pet-midnight",focusable:"false",height:"20",viewBox:"0 0 20 20",width:"20",children:(0,n.jsx)("path",{d:"M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z"})})]}):null]})})},nb=e=>{var t,l,s;let{block:{elements:{downloadRebateFormLink:r,rebateFaqLink:i,searchButtonText:o,searchPlaceholderText:c,searchSubtitle:d,searchTitle:m}},searchTerm:u,setSearchTerm:h,onSearch:p}=e,{locale:x=""}=(0,a.useRouter)();return(0,n.jsxs)("div",{className:"md:mr-20 md:mt-10 md:max-w-[400px]",children:[(0,n.jsxs)("div",{className:"flex flex-col rounded border border-light-grey p-4",children:[(0,n.jsx)("h3",{className:"pb-2 text-base font-normal",children:m}),(0,n.jsx)("h4",{className:"text-xs font-normal",children:d}),(0,n.jsxs)("div",{className:"flex flex-row pt-4",children:[(0,n.jsx)("input",{className:"text-sky-900 mb-0 h-9 rounded-l rounded-r-none border-r-0 border-light-grey !bg-white py-2 pr-8 text-sm font-light text-pet-primary placeholder:text-sm",name:"rebate-search-input",onChange:e=>{h(e.target.value)},onKeyDown:e=>{"Enter"===e.key&&p()},placeholder:c,value:u}),(0,n.jsx)(H.$,{className:"h-9 rounded-none font-semibold",onClick:p,variant:"pet_primary_green",children:o})]})]}),(0,n.jsxs)("div",{className:"mt-2 flex flex-row justify-between",children:[r[0]?(0,n.jsxs)("a",{className:"flex flex-row items-center gap-2 text-xs italic",download:!0,href:r[0].elements.url,rel:"noreferrer",target:(null==(l=r[0])||null==(t=l.elements.openInNewTab[0])?void 0:t.codename)==="yes"?"_blank":"_self",children:[(0,n.jsx)("svg",{height:"15.772",viewBox:"0 0 21.09 20.772",width:"15.09",children:(0,n.jsxs)("g",{transform:"translate(77.186 0.953)",children:[(0,n.jsx)("path",{d:"M-66.6,9.6l5.3-5.3h-4V-1H-68v5.3h-4L-66.6,9.6z"}),(0,n.jsx)("path",{d:"M-61.8,8.4l-1.5,1.5l5.4,2l-8.7,3.2l-8.7-3.2l5.4-2l-1.5-1.5l-5.8,2.2v5.3l10.5,4l10.5-4v-5.3 L-61.8,8.4z"})]})}),r[0].elements.text]}
1):null,i[0]?(0,n.jsx)(B(),{className:"text-xs text-pet-green",href:$(i[0].elements.url,x),passHref:!0,rel:"noreferrer",target:(null==(s=i[0].elements.openInNewTab[0])?void 0:s.codename)==="yes"?"_blank":"_self",children:i[0].elements.text}):null]})]})},ny=e=>{let{block:{elements:{ctaButton:t,heading:l,modalHeading:a,modalStepOneDescription:r,modalStepOneTitle:i,modalStepThreeDescription:o,modalStepThreeTitle:d,modalStepTwoDescription:m,modalStepTwoTitle:u,modalSubheading:h,subHeading:p,title:x}},...f}=e,[g,v]=(0,s.useState)(!1);return(0,n.jsxs)("div",{className:"my-8 md:my-16 md:pr-8",children:[(0,n.jsx)("div",{children:(0,n.jsx)("h1",{className:"text-xl font-semibold uppercase text-pet-green",children:x})}),(0,n.jsx)("div",{className:"mb-2 mt-2",children:(0,n.jsx)("h2",{className:"text-4xl font-semibold",children:l})}),(0,n.jsx)("div",{className:"mb-4 mt-2",children:(0,n.jsx)("p",{children:p})}),t.map(e=>{var t;return(0,n.jsx)(X,{block:e,className:"px-6 py-1 text-sm",onClick:e=>{e.preventDefault(),v(!0)},variant:(null==(t=e.elements.variant[0])?void 0:t.codename)||"inverted_pet_primary_green",...f},e.system.id)}),g?(0,n.jsxs)(eE,{onClose:()=>{v(!1)},size:"xl",children:[(0,n.jsx)("span",{className:"italic",children:a}),(0,n.jsx)("h2",{className:"font-semibold",children:h}),(0,n.jsxs)("div",{className:"my-8 flex flex-col border border-midnight md:flex-row",children:[(0,n.jsxs)("div",{className:"flex flex-1 flex-col items-center bg-[#F6FBF4] p-4",children:[(0,n.jsx)("span",{className:"mb-2 text-5xl",children:"1"}),(0,n.jsx)("span",{className:"mb-4 text-sm font-semibold uppercase",children:i}),(0,n.jsx)(c.rM,{className:"content text-sm",element:r,...f})]}),(0,n.jsxs)("div",{className:"flex flex-1 flex-col items-center bg-[#E2F2DD] p-4",children:[(0,n.jsx)("span",{className:"mb-2 text-5xl",children:"2"}),(0,n.jsx)("span",{className:"mb-4 text-sm font-semibold uppercase",children:u}),(0,n.jsx)(c.rM,{className:"content text-sm",element:m,...f})]}),(0,n.jsxs)("div",{className:"flex flex-1 flex-col items-center bg-[#CFEAC6] p-4",children:[(0,n.jsx)("span",{className:"mb-2 text-5xl",children:"3"}),(0,n.jsx)("span",{className:"mb-4 text-sm font-semibold uppercase",children:d}),(0,n.jsx)(c.rM,{className:"content text-sm",element:o,...f})]})]})]}):null]})},nj=async e=>{let{data:t}=await (0,eM.L)("/api/petProfiles?locale=".concat(e));if(!t.success)throw Error("Failed to fetch pet profiles");return t.data.data},nw=async(e,t)=>{let[,l]=e.queryKey,n="/api/pets/".concat(l.id,"?locale=").concat(t),{data:a}=await (0,eM.L)(n);if(!a.success)throw Error("Failed to create pet profile");return a.data},nN=async(e,t)=>{let{data:l}=await (0,eM.L)("/api/petProfiles?locale=".concat(t),{method:"POST",data:{name:e.petName,gender:e.petSex,breed:e.breed,species:e.petSpecies,birthDate:e.petDateOfBirth,weight:Number(e.petWeight),acquisitionSource:e.petAcquisitionType,acquisitionDate:e.petAcquisitionDate,petShelterId:e.petShelter,petShelterName:e.shelterName,vetClinicId:e.vetClinic,vetClinicName:e.clinicName,imageReference:e.imageReference}});if(!l.success)throw Error("Failed to fetch pet profile");return l.data},n_=e=>{let t=(e=>{let t=e.getTimezoneOffset(),l=e.getHours(),n=e.getMinutes();return t>0&&e.setHours(l+t/60,n+t%60),e})(new Date(e)),l=t.getMonth()+1,n=t.getDate(),a=t.getFullYear();return l<=9&&(l="0".concat(l)),n<=9&&(n="0".concat(n)),[l,n,a].join("/")},nk=async e=>{let{data:t}=await (0,eM.L)("/api/reminders?locale=".concat(e));return((e,t,l)=>{let{data:n}=e,a=new Date;return n.forEach(e=>{e.recurringDates=[],e.pastDates=[],e.serestoRefillDate=[];let n=new Date(e.date?e.date:e.startDate);(n>a||n.toLocaleDateString()===a.toLocaleDateString())&&e.recurringDates.push(n_(n));let s=(e=>{if(!e||"object"!=typeof e)return Number(1);let t=e.marketingBrand;if(!t||"object"!=typeof t)return Number(1);let l=t.id,n=null===l?"":String(l);return n&&Object.prototype.hasOwnProperty.call(q,n)?Number(q[n]):Number(1)})(e),r=new Date(e.date);r.setDate(r.getDate()+210),e.serestoRefillDate.push(n_(r));let i=n.getDate(),o=s;for(;e.recurringDates.length<t;){let t=new Date(n);if(100===o)break;let l=n.getMonth()+Number(o);t.setMonth(l),t.getDate()!==i&&t.setDate(0),t>
1a?e.recurringDates.push(n_(t)):e.pastDates.push(n_(t)),o+=s}e.pastDates.length>l&&e.pastDates.splice(0,e.pastDates.length-l),e.pastDates.length<l&&n<a&&n.toLocaleDateString()!==a.toLocaleDateString()&&e.pastDates.push(n_(new Date(n.getTime())))}),e})(t,12,1).data},nC=e=>{let{message:t="There's been an error, please try again later.",type:l="error"}=e;return(0,n.jsx)("div",{children:(0,n.jsxs)("div",{className:"".concat({error:"text-red-500 bg-[#ffe5e5]"}[l]," mb-4 inline-flex items-center rounded p-4 text-sm"),role:"alert",children:[(0,n.jsx)("svg",{"aria-hidden":"true",className:"mr-3 inline h-4 w-4 flex-shrink-0",fill:"currentColor",viewBox:"0 0 20 20",xmlns:"http://www.w3.org/2000/svg",children:(0,n.jsx)("path",{d:"M10 .5a9.5 9.5 0 1 0 9.5 9.5A9.51 9.51 0 0 0 10 .5ZM9.5 4a1.5 1.5 0 1 1 0 3 1.5 1.5 0 0 1 0-3ZM12 15H8a1 1 0 0 1 0-2h1v-3H8a1 1 0 0 1 0-2h2a1 1 0 0 1 1 1v4h1a1 1 0 0 1 0 2Z"})}),(0,n.jsx)("span",{className:"sr-only",children:"Info"}),(0,n.jsx)("div",{children:t})]})})},nS=e=>{let t={};return e.forEach(e=>{var l,n;t["".concat(null==(l=e.pet)?void 0:l.id,"-").concat(null==(n=e.marketingBrand)?void 0:n.id)]=e}),Object.values(t)},nL=e=>"SER_Dog_Product"===e||"SER_Cat_Product"===e,nT=e=>{var t,l,s,r,i,o,d,m,u,h;let{block:{elements:{doseDayLabel:p,reminderIcon:x,setupRemindersText:g,viewPetProfileCta:b,addReminderCta:y}},petData:j,remindersData:w,isLoading:N,globalConfig:_,...k}=e,C=(0,a.useRouter)(),{locale:L=""}=C,{name:T,id:I,imageReference:E,petSpecies:A}=j,F=nS([...w].slice(0,3)),B=_.elements.petIcons.find(e=>e.system.id===E),M="dog"===A?_.elements.defaultDogIcon:_.elements.defaultCatIcon,P=()=>{var e;if(!(null==(e=b[0])?void 0:e.elements.url))return;let t=b[0].elements.url;C.push({pathname:$(t,L),query:{id:I}},void 0)};return(0,n.jsxs)("div",{className:"relative flex shrink flex-col rounded border border-light-grey bg-white p-8 md:basis-1/3",children:[(0,n.jsxs)("div",{className:"mb-4 flex items-center space-x-8",children:[(0,n.jsx)(f(),{alt:(null==B||null==(t=B.elements.image[0])?void 0:t.description)||(null==(s=M[0])||null==(l=s.elements.image[0])?void 0:l.description)||"",className:"h-16 w-16 rounded-full border-2 border-pet-green",height:64,loader:v.L,src:(null==B||null==(r=B.elements.image[0])?void 0:r.url)||(null==(d=M[0])||null==(o=d.elements.image)||null==(i=o[0])?void 0:i.url)||"",width:64}),(0,n.jsx)("h3",{className:"text-xl uppercase leading-6 text-midnight-blue",children:T})]}),!N&&F.length>0?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("ul",{className:"mb-4",children:F.map(e=>{var t,l,a,s;return(0,n.jsxs)("li",{className:"mb-2 flex items-center",children:[(null==(t=x[0])?void 0:t.elements.icon[0])?(0,n.jsx)(S,{noBackground:!0,noBorder:!0,size:"none",children:(0,n.jsx)(f(),{alt:null!=(s=x[0].elements.icon[0].description)?s:"",className:"h-4 w-4",height:16,loader:v.L,src:x[0].elements.icon[0].url,width:16})}):null,(0,n.jsxs)("span",{className:"ml-4 w-5/6 italic",children:[(0,n.jsx)("p",{className:"text-midnight-blue",children:null==(l=e.marketingBrand)?void 0:l.name}),(0,n.jsxs)("span",{className:"font-bold text-[#666]",children:[p,":",(0,n.jsxs)("span",{className:"font-normal not-italic",children:["\xa0",null==(a=e.recurringDates)?void 0:a[0]]})]})]})]},e.id)})}),(0,n.jsx)("div",{className:"mt-auto",children:(0,n.jsx)(H.$,{className:"w-full",onClick:P,type:"button",variant:"pet_primary_green",children:null==(m=b[0])?void 0:m.elements.text})})]}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(c.rM,{className:"mb-4 text-midnight-blue",element:g,globalConfig:_,...k}),(0,n.jsxs)("div",{className:"mt-auto inline-flex flex-col space-y-2",children:[(0,n.jsx)("button",{className:"btn inline-flex w-full cursor-pointer items-center justify-center overflow-hidden rounded-sm border-2 border-green-600 bg-white px-4 py-3 text-center align-middle font-bold text-green-600 transition-colors duration-200 hover:bg-green-600 hover:text-white",onClick:()=>{C.replace({pathname:$(L,C.asPath),query:{reminder:I}},void 0,{shallow:!0})},type:"button",children:null==(u=y[0])?void 0:u.elements.text}),(0,n.jsx)(H.$,{className:"w-full",onClick:P,type:"button",variant:"pet_primary_green",children:null==(h=b[0])?void 0:h.elements.text})]})]})]})},nI=e=>{let{block:{elements:{ctaButton:t,description:l,title:s}},...r}=e,{locale:i=""}=(0,a.useRouter)();return(0,n.jsxs)("div",{className:"relative my-6 w-full space-y-4 rounded border border-light-grey bg-white px-8 py-12 md:max-w-[415px]",children:[(0,n.jsx)("h3",{className:"text-xl uppercase leading-6 text-midnight-blue",children:s}),(0,n.jsx)(c.rM,{className:"text-midnight-blue",element:l,...r}),t.map(e=>{var t,l;return(0,n.jsx)(B(),{href:$(e.elements.url,i),legacyBehavior:!0,passHref:!0,children:(0,n.jsx)(H.$,{as:"a",className:"uppercase",icon:P.v[null==(t=e.elements.icon[0])?void 0:t.name],title:e.elements.text,variant:null==(l=e.elements.variant[0])?void 0:l.codename,children:e.elements.text})},e.system.id)})]})},nE=e=>{var t,l,r,i;let{block:{elements:{ctaButton:o,functionalityType:c,icon:[d]},system:{id:m}}}=e,u=(0,a.useRouter)(),{isLoading:h,data:p}=(0,eB.useQuery)({queryKey:["pets"],queryFn:()=>{var e;return nj(null!=(e=u.locale)?e:"null")},staleTime:1/0,cacheTime:9e5}),x=(null==(t=c[0])?void 0:t.codename)==="add_reminder",g=(null!=(r=h||(null==p?void 0:p.length)!==1?"":null==(l=p[0])?void 0:l.id)?r:"")||(null!=(i=u.query.id)?i:""),b=e=>{var t;e.preventDefault(),u.replace({pathname:$(u.asPath,null!=(t=u.locale)?t:""),query:{reminder:g}},void 0,{shallow:!0})};return(0,n.jsx)("div",{"data-kontent-item-id":m,children:o.length>0&&o.map(e=>{var t,l,a;return(0,n.jsx)(s.Fragment,{children:x?(0,n.jsxs)("button",{className:"flex items-center justify-end space-x-2",onClick:b,type:"button",children:[(0,n.jsx)("span",{className:"text-xs",children:e.elements.text}),(null==d?void 0:d.elements.icon[0])?(0,n.jsx)(S,{className:"h-8 w-8",noBackgroun
1d:!0,noBorder:!0,children:(0,n.jsx)(f(),{alt:null!=(t=d.elements.icon[0].description)?t:"",className:"h-8 w-8",height:32,loader:v.L,src:d.elements.icon[0].url,width:32})}):null]}):(0,n.jsxs)("a",{className:"flex items-center justify-end space-x-2 text-[#333]",href:$(e.elements.url,null!=(l=u.locale)?l:""),children:[(0,n.jsx)("span",{className:"text-xs",children:e.elements.text}),(null==d?void 0:d.elements.icon[0])?(0,n.jsx)(S,{className:"h-8 w-8",noBackground:!0,noBorder:!0,children:(0,n.jsx)(f(),{alt:null!=(a=d.elements.icon[0].description)?a:"",className:"h-8 w-8",height:32,loader:v.L,src:d.elements.icon[0].url,width:32})}):null]})},e.system.id)})})},nA=e=>{var t,l,s;let{id:r,globalConfig:i,className:o}=e,{locale:c=""}=(0,a.useRouter)(),d=null==(t=i.elements.medicationRefillButtons.find(e=>e.elements.id===r))?void 0:t.elements.ctaButton[0];return d?(0,n.jsx)(B(),{href:$(d.elements.url,c),legacyBehavior:!0,passHref:!0,children:(0,n.jsx)(H.$,{as:"a",className:o||"w-full",target:(null==(l=d.elements.openLinkInNewTab[0])?void 0:l.codename)==="yes"?"_blank":"_self",variant:(null==(s=d.elements.variant[0])?void 0:s.codename)||"pet_primary_green",children:d.elements.text})}):(0,n.jsx)(n.Fragment,{})},nF=["GAL_Dog_Product","SER_Dog_Product","SER_Cat_Product","BEX_Cat_Product","AXD_Cat_Product"],nB=e=>nS(e.filter(e=>{var t;let{marketingBrand:l}=e;return!nF.includes(null!=(t=null==l?void 0:l.id)?t:"")}));var nM=l(76301);let nP=e=>{let{dates:t=[],className:l="",onClick:a=()=>{},progressHandler:r=()=>{},iconActiveColor:o="border-primary",activeDateColor:c="bg-blue-100",btnVariant:d="primary",hideNeighboringMonth:m=!1,selectedDate:u=new Date}
1=e,[h,p]=(0,s.useState)(u.toUTCString());(0,s.useEffect)(()=>{p(u.toUTCString())},[u]);let x=e=>{let t=e.getTimezoneOffset(),l=e.getHours(),n=e.getMinutes();return t>0&&e.setHours(l+t/60,n+t%60),e};return(0,n.jsx)("div",{className:l,children:(0,n.jsx)(nM.A,{activeStartDate:new Date(h),className:"p-4",defaultValue:new Date(h),maxDetail:"month",next2Label:null,nextLabel:(0,n.jsx)(w,{icon:P.v.ArrowRight,noIconAnimation:!0,size:"sm",variant:d,children:"Next Month"}),onActiveStartDateChange:e=>{let{activeStartDate:l,value:n,view:s}=e;((e,l)=>{if(e.getMonth()!==l.getMonth()||e.getFullYear()!==l.getFullYear()){let l=t.find(t=>{let l=new Date(t);return l.getMonth()===e.getMonth()&&l.getFullYear()===e.getFullYear()});l?(p(new Date(l).toUTCString()),a(x(new Date(l)))):p(e.toUTCString())}})(l,n),r(l,n,s)},onClickDay:e=>{p(e.toUTCString()),a(e)},prev2Label:null,prevLabel:(0,n.jsx)(w,{icon:P.v.ArrowLeft,noIconAnimation:!0,size:"sm",variant:d,children:"Previous Month"}),showNeighboringMonth:!m,tileClassName:e=>{let{date:l}=e;return(e=>{let l=[],n=e.toLocaleDateString();return n===new Date().toLocaleDateString()&&l.push("".concat(c," rounded-md outline-none today")),t.some(e=>n===x(new Date(e)).toLocaleDateString())&&l.push("relative has-reminder"),(0,i.$)(l.join(" "))})(l)},tileContent:e=>{let{date:l}=e;return t.find(e=>l.toLocaleDateString()===x(new Date(e)).toLocaleDateString())?(0,n.jsx)("div",{className:"absolute inset-0 z-0 m-auto h-10 w-10 rounded-full border-3 ".concat(o," sm:h-12 sm:w-12")}):null},value:new Date(h),view:"month"})})},nD=e=>{let{heading:t="",reminders:l,defaultDate:a,activePet:r}=e,[i,o]=(0,s.useState)([]);return(0,s.useEffect)(()=>{let e=l;r&&(e=l.filter(e=>{let{pet:t}=e;return(null==t?void 0:t.id)===r})),o(nB(e).flatMap(e=>{var t,l;return[...null!=(t=e.pastDates)?t:[],...null!=(l=e.recurringDates)?l:[]]}))},[l,r]),(0,n.jsxs)("div",{className:"flex flex-1 flex-col rounded rounded-b-none border border-pet-midnight md:rounded-b md:rounded-r-none",children:[(0,n.jsx)("div",{className:"bg-pet-midnight",children:(0,n.jsx)("h4",{className:"pb-4 pt-4 text-center font-semibold uppercase text-white",children:t})}),(0,n.jsx)(nP,{activeDateColor:"bg-[#EBEBEB]",btnVariant:"pet_primary_green",dates:i,hideNeighboringMonth:!0,iconActiveColor:"border-pet-midnight",selectedDate:a})]})};var nR=l(18158);let nq=e=>{let{message:t}=e;return(0,n.jsxs)("span",{className:"flex items-center py-1 text-red-500",children:[(0,n.jsx)("svg",{className:"inline-block fill-current",height:"20",viewBox:"0 0 27 27",width:"20",children:(0,n.jsx)("path",{d:"M13.3,26.8c-3.6,0-7-1.4-9.5-4c-2.5-2.5-4-6-4-9.5c0-3.6,1.4-7,4-9.5c2.5-2.5,6-4,9.5-4c3.6,0,7,1.4,9.5,4c2.5,2.5,4,6,4,9.5c0,3.6-1.4,7-4,9.5C20.3,25.4,16.8,26.8,13.3,26.8z M13.6,17.8c-0.7,0-1.4,0.2-1.9,0.6c-0.4,0.4-0.7,.1-0.7,1.7c0,0.6,0.2,1.2,0.7,1.7c0.5,0.4,1.2,0.6,1.9,0.6c0.7,0,1.3-0.2,1.8-0.6c0.5-0.4,0.7-1.1,0.7-1.7c0-0.6-0.2-1.2-0.6-1.7C14.9,18,14.2,17.8,13.6,17.8L13.6,17.8z M11,4.6L11,4.6l0.6,11.4h4l0.6-11.4H11z"})}),(0,n.jsx)("span",{className:"pl-2 !text-xs text-pet-primary",children:t})]})};var nz=l(98305);let nO=e=>{let{d:t,transform:l,id:a,dataName:s}=e;return(0,n.jsx)("path",{d:t,"data-name":s,fill:"none",id:a,stroke:"#000",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"1.5",transform:l})},nU=e=>{let{id:t,dataName:l,transform:a}=e;return(0,n.jsx)("rect",{"data-name":l,fill:"#000",height:"3",id:t,transform:a,width:"3"})},n$=e=>{let{action:t,className:l="",children:a,ajaxSubmission:r=!1,onSubmit:i,setFormField:o=null}=e,c=(0,nR.mN)({mode:"onBlur"});return((0,s.useEffect)(()=>{if(o&&Object.keys(o).length>0){let e=Object.keys(o)[0],t=Object.values(o)[0];e&&void 0!==t&&c.setValue(e,t)}},[c,o]),a)?(0,n.jsx)("div",{className:l,children:(0,n.jsx)(nR.Op,{...c,children:(0,n.jsx)("form",{action:t,noValidate:!0,onSubmit:e=>{e.preventDefault(),c.handleSubmit(t=>{((e,t)=>{i&&i(e),!r&&(null==t?void 0:t.target)instanceof HTMLFormElement&&t.target.submit()})(t,e)})()},children:a})})}):null};n$.InputField=e=>{var t;let{defaultValue:l="",className:a="",type:r="text",label:o,name:c,isOptional:d=!1,requiredErrorMsg:m="",invalidErrorMsg:u="",onValidate:h,maxLength:p=100,onChange:x,disabled:f=!1,min:g=0,max:v=100}=e,b=m||"".concat(String(o)," is required"),y=u||"Please enter a valid ".concat(String(o)),{register:j,trigger:w,formState:N}=(0,nR.xW)();(0,s.useEffect)(()=>{let e=!1;return(async function(){l&&!e&&await w(c)})().catch(e=>{(0,eF.vV)("InputField Validation failed: ".concat(e))}),()=>{e=!0}},[l,c,w]);let{onChange:_,onBlur:k,...C}=j(c,{validate:h,required:!d,..."email"===r&&{pattern:/^[a-z0-9._%+-]+@[a-z0-9.-]+\.[a-z]{2,4}$/},..."tel"===r&&{pattern:/^[+]*[(]{0,1}[0-9]{1,4}[)]{0,1}[-\s./0-9]*$/},..."number"===r&&{min:g,max:v}});return(0,n.jsx)("div",{className:(0,i.$)("relative mb-4",a),children:(0,n.jsxs)("label",{className:"w-full text-xs text-pet-primary",htmlFor:c,children:[(0,n.jsxs)("span",{children:[o,!d&&(0,n.jsx)("span",{className:"text-red-600",children:"*"})]}),(0,n.jsxs)("div",{className:"relative mt-2",children:[(0,n.jsx)("input",{...C,className:(0,i.$)(N.errors[c]?"invali
1d":"","text-sky-900 rounded-md !bg-white py-3 text-sm font-normal text-pet-primary"),defaultValue:l,disabled:f,id:c,max:v,maxLength:p,min:g,name:c,onBlur:e=>{k(e).catch(e=>{(0,eF.vV)("InputField Error in libOnBlur: ".concat(e))}),null==x||x(e.target.value=e.target.value.trim())},onChange:e=>{_(e).catch(e=>{(0,eF.vV)("InputField Error in libOnChange: ".concat(e))}),null==x||x(e.target.value)},type:r}),N.errors[c]?(0,n.jsx)(nq,{message:(null==(t=N.errors[c])?void 0:t.type)==="required"?b:y}):null]})]})})},n$.SelectField=e=>{let{defaultValue:t="",className:l="",children:a,label:r,name:o,isOptional:c=!1,requiredErrorMsg:d="",onChange:m,disabled:u=!1}=e,h=d||"".concat(String(r)," is required"),{register:p,trigger:x,formState:f}=(0,nR.xW)();(0,s.useEffect)(()=>{let e=!1;return(async function(){t&&!e&&await x(o)})().catch(e=>{(0,eF.vV)("SelectField Validation failed: ".concat(e))}),()=>{e=!0}},[t,o,x]);let{onChange:g,...v}=p(o,{required:!c});return(0,n.jsx)("div",{className:(0,i.$)("relative mb-4",l),children:(0,n.jsxs)("label",{className:"w-full text-xs text-pet-primary",htmlFor:o,children:[(0,n.jsxs)("span",{children:[r,!c&&(0,n.jsx)("span",{className:"text-red-600",children:"*"})]}),(0,n.jsx)("div",{className:"relative mt-2",children:(0,n.jsxs)("fieldset",{className:"bg-transparent",disabled:u,children:[(0,n.jsx)("select",{...v,className:(0,i.$)(f.errors[o]&&"invalid","appearance-none rounded-md !bg-white py-3 text-sm font-normal text-pet-primary"),defaultValue:t,id:o,name:o,onChange:e=>{g(e).catch(e=>{(0,eF.vV)("SelectField Error in libOnChange: ".concat(e))}),null==m||m(e.target.value)},children:a}),(0,n.jsx)("svg",{"aria-hidden":"true",className:"mr-[15px] mt-[13px] !fill-mid-grey",focusable:"false",height:"20",viewBox:"0 0 20 20",width:"20",children:(0,n.jsx)("path",{d:"M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z"})}),f.errors[o]?(0,n.jsx)(nq,{message:h}):null]})})]})})},n$.SearchableSelectField=e=>{let{defaultValue:t="",className:l="",options:a,label:r,name:o,isOptional:c=!1,requiredErrorMsg:d="",onChange:m,disabled:u=!1}=e,h=d||"".concat(String(r)," is required"),{control:p,trigger:x,formState:g}=(0,nR.xW)();(0,s.useEffect)(()=>{let e=!1;return(async function(){t&&!e&&await x(o)})().catch(e=>{(0,eF.vV)(Error("SearchableSelectField Validation failed: ".concat(e)))}),()=>{e=!0}},[t,o,x]);let b=e=>{let{data:t,innerProps:l}=e;return(0,n.jsxs)("div",{...l,className:"flex items-center py-2",children:[t.icon?(0,n.jsx)("div",{className:"mr-4 h-10 w-10 flex-shrink-0",children:(0,n.jsx)(f(),{alt:"".concat(t.label," icon"),height:40,loader:v.L,src:t.icon,width:40})}):null,(0,n.jsxs)("div",{className:"flex-col",children:[(0,n.jsxs)("p",{children:[t.label," "]}),t.additionalText?(0,n.jsx)("p",{className:"pt-1 text-xs",children:t.additionalText}):null]})]})},y=(e,t)=>{var l;return!!(e.data.label.toLowerCase().includes(t.toLowerCase())||(null==(l=e.data.additionalText)?void 0:l.toLowerCase().includes(t.toLowerCase())))};return(0,n.jsx)("div",{className:(0,i.$)("relative mb-4",l),children:(0,n.jsxs)("label",{className:"w-full text-xs text-pet-primary",htmlFor:o,children:[(0,n.jsxs)("span",{children:[r,!c&&(0,n.jsx)("span",{className:"text-red-600",children:"*"})]}),(0,n.jsxs)("div",{className:"relative mt-2",children:[(0,n.jsx)(nR.xI,{control:p,defaultValue:t,name:o,render:e=>{let{field:t}=e;return(0,n.jsx)(nz.Ay,{...t,classNames:{control:()=>(0,i.$)("!rounded-md !bg-white !opacity-1 !text-sm !font-normal !text-pet-primary !border !py-[4px] !mb-1",g.errors[o]?"!border-[#ea0101]":"!border-[#a0aec0]"),singleValue:()=>"!text-sm !font-normal !text-pet-primary",placeholder:()=>"!text-sm !font-normal",input:()=>"!text-sm !p-0 !m-0",indicatorsContainer:()=>"!p-0",indicatorSeparator:()=>"!w-0",dropdownIndicator:()=>"!p-2 !text-mid-grey"},components:{Option:b},filterOption:y,id:o,isDisabled:u,isMulti:!1,name:o,onChange:e=>{e&&(t.onChange(e.value),null==m||m(e.value))},options:a,placeholder:"Start typing to filter",value:a.find(e=>e.value===t.value)})},rules:{required:!c}}),g.errors[o]?(0,n.jsx)(nq,{message:h}):null]})]})})},n$.ChoiceGroup=e=>{let{className:t="",groupClassName:l="",labelClassName:a="",children:s,name:r,label:o,isOptional:c=!1,requiredErrorMsg:d=""}=e,{register:m,formState:u}=(0,nR.xW)();if(!s)return null;let h=d||"".concat(String(o)," is required");return(0,n.jsxs)("fieldset",{className:(0,i.$)("mb-4",l),id:r,...m(r),
1children:[(0,n.jsx)("h5",{className:(0,i.$)("align-middle text-xs font-normal text-pet-primary",a),children:c?o:(0,n.jsxs)(n.Fragment,{children:[o,(0,n.jsx)("span",{className:"text-red-600",children:"*"})]})}),(0,n.jsxs)("div",{className:"relative",children:[(0,n.jsx)("div",{className:(0,i.$)("md:flex md:flex-wrap",t),children:s}),u.errors[r]?(0,n.jsx)(nq,{message:h}):null]})]})},n$.ChoiceField=e=>{let{className:t="",checked:l=!1,type:a,label:s,name:r,id:o,value:c,isOptional:d=!1,requiredErrorMsg:m="",isGroup:u,onChange:h,disabled:p=!1}=e,x=m||"".concat(s," is required"),{register:f,formState:g}=(0,nR.xW)(),{onChange:v,...b}=f(r,{required:!d});return(0,n.jsxs)("div",{className:(0,i.$)(u?"my-1":"mb-4","relative",t),children:[(0,n.jsx)("input",{...b,className:(0,i.$)(g.errors[r]?"invalid":"","hover:!bg-white"),defaultChecked:l,disabled:p,id:o,name:r,onChange:e=>{v(e).catch(e=>{(0,eF.vV)("ChoiceField Error in libOnChange:".concat(e))}),null==h||h(e.target.value)},type:a,value:c}),(0,n.jsx)("label",{className:"w-full !text-sm text-pet-primary before:!border before:!border-light-grey after:!left-[9px] after:!top-[9px] after:!h-[14px] after:!w-[14px] after:!bg-pet-green",htmlFor:o,style:{marginTop:"0",marginBottom:"0"},children:(0,n.jsx)("span",{children:u||d?s:(0,n.jsxs)(n.Fragment,{children:[s,(0,n.jsx)("span",{className:"text-red-600",children:"*"})]})})}),!u&&g.errors[r]?(0,n.jsx)(nq,{message:x}):null]})},n$.TextareaField=e=>{let{defaultValue:t="",className:l="",label:a,name:r,isOptional:o=!1,requiredErrorMsg:c="",maxLength:d=1e3,disabled:m=!1}=e,u=c||"".concat(String(a)," is required"),{register:h,trigger:p,formState:x}=(0,nR.xW)();return(0,s.useEffect)(()=>{let e=!1;return(async function(){t&&!e&&await p(r)})().catch(e=>{(0,eF.vV)(Error("TextareaField Validation failed: ".concat(e)))}),()=>{e=!0}},[t,r,p]),(0,n.jsx)("div",{className:(0,i.$)("relative mb-4",l),children:(0,n.jsxs)("label",{htmlFor:r,children:[(0,n.jsxs)("span",{children:[a,!o&&(0,n.jsx)("span",{className:"text-red-600",children:"*"})]}),(0,n.jsxs)("div",{className:"relative mt-2",children:[(0,n.jsx)("textarea",{...h(r,{required:!o}),className:x.errors[r]?"invalid":"",defaultValue:t,disabled:m,id:r,maxLength:d,name:r,rows:5}),x.errors[r]?(0,n.jsx)(nq,{message:u}):null]})]})})},n$.DateField=e=>{var t;let{defaultValue:l="",minDate:a="",maxDate:r="",className:o="",label:c,name:d,isOptional:m=!1,requiredErrorMsg:u="",invalidErrorMsg:h="",maxLength:p=100,onChange:x,disabled:f=!1}=e,g=u||"".concat(String(c)," is required"),v=h||"Please enter a valid ".concat(String(c)),{register:b,trigger:y,formState:j,clearErrors:w}=(0,nR.xW)();(0,s.useEffect)(()=>{let e=!1;return(async function(){l&&!e&&await y(d)})().catch(e=>{(0,eF.vV)("DateField Validation failed:".concat(e))}),()=>{e=!0}},[l,d,y]),(0,s.useEffect)(()=>{w()},[a,r,w]);let{onChange:N,..._}=b(d,{required:!m,min:a,max:r});return(0,n.jsx)("div",{className:(0,i.$)("relative mb-4",o),children:(0,n.jsxs)("label",{className:"w-full text-xs text-pet-primary",htmlFor:d,children:[(0,n.jsxs)("span",{children:[c,!m&&(0,n.jsx)("span",{className:"text-red-600",children:"*"})]}),(0,n.jsxs)("div",{className:"relative mt-2",children:[(0,n.jsx)("input",{..._,className:(0,i.$)(j.errors[d]?"invalid":"","text-sky-900 rounded-md !bg-white py-3 text-sm font-normal text-pet-primary"),defaultValue:l,disabled:f,id:d,max:r,maxLength:p,min:a,name:d,onChange:e=>{N(e).catch(e=>{(0,eF.vV)("DateField Error in libOnChange: ".concat(e))}),null==x||x(e.target.value)},type:"date"}),(0,n.jsx)("svg",{className:"mr-[10px] mt-[10px]",height:"28.09",viewBox:"0 0 25.204 28.09",width:"25.204",xmlns:"http://www.w3.org/2000/svg",children:(0,n.jsxs)("g",{"data-name":"Group 947",id:"Group_947",transform:"translate(0.75 0.75)",children:[(0,n.jsxs)("g",{"data-name":"Icon feather-calendar",id:"Icon_feather-calendar",transform:"translate(0 0)",children:[(0,n.jsx)(nO,{d:"M7.134,6H25.57A2.654,2.654,0,0,1,28.2,8.674V27.39a2.654,2.654,0,0,1-2.634,2.674H7.134A2.654,2.654,0,0,1,4.5,27.39V8.674A2.654,2.654,0,0,1,7.134,6Z","data-name":"Path 335",id:"Path_335",transform:"translate(-4.5 -3.473)"}),(0,n.jsx)(nO,{d:"M24,3V8.054",dataName:"Path 336",id:"Path_336",transform:"translate(-6.88 -3)"}),(0,n.jsx)(nO,{d:"M12,3V8.054",dataName:"Path 337",id:"Path_337",transform:"translate(-5.416 -3)"}
1),(0,n.jsx)(nO,{d:"M4.5,15H28.2",dataName:"Path 338",id:"Path_338",transform:"translate(-4.5 -4.364)"})]}),(0,n.jsx)(nU,{dataName:"Rectangle 869",id:"Rectangle_869",transform:"translate(7.837 12.769)"}),(0,n.jsx)(nU,{dataName:"Rectangle 870",id:"Rectangle_870",transform:"translate(12.837 12.769)"}),(0,n.jsx)(nU,{dataName:"Rectangle 871",id:"Rectangle_871",transform:"translate(17.837 12.769)"}),(0,n.jsx)(nU,{dataName:"Rectangle 873",id:"Rectangle_873",transform:"translate(7.837 16.769)"}),(0,n.jsx)(nU,{dataName:"Rectangle 874",id:"Rectangle_874",transform:"translate(12.837 16.769)"}),(0,n.jsx)(nU,{dataName:"Rectangle 875",id:"Rectangle_875",transform:"translate(17.837 16.769)"}),(0,n.jsx)(nU,{dataName:"Rectangle 876",id:"Rectangle_876",transform:"translate(2.837 16.769)"}),(0,n.jsx)(nU,{dataName:"Rectangle 877",id:"Rectangle_877",transform:"translate(7.837 20.769)"}),(0,n.jsx)(nU,{dataName:"Rectangle 878",id:"Rectangle_878",transform:"translate(12.837 20.769)"}),(0,n.jsx)(nU,{dataName:"Rectangle 880",id:"Rectangle_880",transform:"translate(2.837 20.769)"})]})}),j.errors[d]?(0,n.jsx)(nq,{message:(null==(t=j.errors[d])?void 0:t.type)==="required"?g:v}):null]})]})})},n$.FieldGroup=e=>{let{className:t="",groupClassName:l="",name:a,children:s}=e;return(0,n.jsx)("fieldset",{className:l,id:a,children:(0,n.jsx)("div",{className:t,children:s})})};let nH=e=>{let{theme:t,isLoading:l}=e;return l?(0,n.jsx)("div",{className:"absolute bottom-0 left-0 right-0 top-0 z-20 flex items-center justify-center bg-white/70",children:(0,n.jsx)(eA,{theme:t})}):null};async function nV(e,t){return(0,eM.L)("/api/reminders/".concat(e,"?locale=").concat(t),{method:"DELETE"})}async function nZ(e,t){let{id:l,petId:n,productId:a,startDate:s,dosesRemaining:r,channel:i}=e;return(0,eM.L)("/api/reminders/".concat(l,"?locale=").concat(t),{method:"PUT",data:{reminder:{productId:a,petId:n,channel:i,startDate:s,dosesRemaining:r}}})}let nG=async(e,t)=>{let{petId:l,productId:n,startDate:a,dosesRemaining:s,channel:r}=e;return(0,eM.L)("/api/reminders?locale=".concat(t),{method:"POST",data:{reminder:{petId:l,productId:n,channel:r,startDate:a,dosesRemaining:s}}})},nW=e=>{var t;let{block:l,setShowDeleteReminderModal:s,selectedPet:r,remindersIds:i}=e,{heading:o,description:c,deleteReminderCta:d,backToRemindersLink:m}=l.elements,u=(0,a.useRouter)(),h=(0,eB.useQueryClient)(),p=null!=(t=u.locale)?t:"",{mutateAsync:x,isLoading:f}=(0,eB.useMutation)({mutationFn:e=>nV(e,p),mutationKey:"petReminder/delete",onSuccess:()=>{var e,t;h.invalidateQueries({queryKey:["reminders"]}),h.invalidateQueries({queryKey:["pets"]}),h.invalidateQueries({queryKey:["petData",{id:null!=(e=u.query.id)?e:null==r?void 0:r.id}]}),h.invalidateQueries(["remindersData",{id:null!=(t=u.query.id)?t:null==r?void 0:r.id}])}}),g=async()=>{if(0===i.length)return;await Promise.all(i.map(e=>x(e))),s(!1);let e=new URLSearchParams(u.asPath.split("?")[1]);e.delete("reminder"),e.delete("edit");let t=u.asPath.split("?")[0];u.replace({pathname:"/".concat(p).concat(t),query:Object.fromEntries(e)},void 0,{shallow:!0})};return(0,n.jsx)(eE,{onClose:()=>{s(!1)},size:"md",children:(0,n.jsxs)("div",{className:"relative my-5 flex flex-col items-center",children:[(0,n.jsx)(nH,{isLoading:f,theme:"green"}),(0,n.jsxs)("div",{children:[(0,n.jsx)("h2",{className:"mb-4 text-center font-semibold",children:o}),(0,n.jsx)("div",{dangerouslySetInnerHTML:{__html:c.value}})]}),(0,n.jsx)("div",{className:"my-4",children:d.length>0&&d.map(e=>{var t;return(0,n.jsx)(H.$,{onClick:g,variant:(null==(t=e.elements.variant[0])?void 0:t.codename)||"pet_primary_green",children:e.elements.text},e.system.id)})}),(0,n.jsx)("div",{className:"cursor-pointer text-pet-green underline",children:(0,n.jsx)("button",{onClick:()=>{s(!1)},type:"button",children:m})})]})})},nK=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new Date;return"".concat(e.getFullYear().toLocaleString("en-US",{minimumIntegerDigits:4,useGrouping:!1}),"-").concat((e.getMonth()+1).toLocaleString("en-US",{minimumIntegerDigits:2,useGrouping:!1}
1),"-").concat(e.getDate().toLocaleString("en-US",{minimumIntegerDigits:2,useGrouping:!1}))},nY=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"en-US";return new Date("".concat(e,"T00:00:00")).toLocaleDateString(t,{year:"numeric",month:"2-digit",day:"2-digit"})},nQ=e=>{if(!e)return"";let t=e instanceof Date?e:new Date("".concat(e,"T00:00:00")),l="0".concat(t.getMonth()+1).slice(-2),n="0".concat(t.getDate()).slice(-2);return[t.getFullYear(),l,n].join("-")},nX=async e=>{let{data:t}=await (0,eM.L)("/api/species/all/marketingbrands?locale=".concat(e));if(!t.success)throw Error("Failed to create pet profile");return t.data.data};function nJ(e,t){let l=new Date,n=t?Number(24*e*36e5):-(24*e*36e5),a=new Date(l.getTime()+n),s=a.getFullYear(),r=a.getMonth()+1,i=a.getDate();return r=r>9?r:"0".concat(r),i=i>9?i:"0".concat(i),"".concat(s,"-").concat(r,"-").concat(i)}let n0=e=>{let t,{block:l,selectedPet:r,redirectUrl:i,globalConfig:o,BlockMapper:d,page:m}=e,{locale:u="",asPath:h}=(0,a.useRouter)(),{pets:p,marketingbrands:x,onPetChange:f,minDate:g,maxDate:v,handleFormSubmit:y,isLoading:j,displayModal:w,defaultPet:N,isProductSeresto:_,isProductGalliprant:k,isProductAdvantageXD:C,onMedicationChange:S,displayPhoneVerification:L,showTermsModal:T,closeTermsModal:I,checkSmsChannel:E,checkEmailChannel:A,defaultMedication:F,defaultDate:B,closeModal:M,setDisplayPhoneVerification:P,selectedPetName:D,currentRemindersIds:R,defaultValues:q,onReminderDateChange:z,showError:O}=function(e,t,l,n,r){var i,o,c,d,m;
1let u=(0,a.useRouter)(),[h,p]=(0,s.useState)(!1),[x,f]=(0,s.useState)(),[g,v]=(0,s.useState)(""),[b,y]=(0,s.useState)(!1),[j,w]=(0,s.useState)([]),N=!!u.query.edit,[_,k]=(0,s.useState)(!1),[C,S]=(0,s.useState)(!1),L=(0,eB.useQueryClient)(),T=()=>{L.invalidateQueries({queryKey:["reminders"]}),L.invalidateQueries({queryKey:["pets"]}),L.invalidateQueries(["remindersData",{id:null==x?void 0:x.id}])},I=(0,eB.useMutation)({mutationFn:e=>nG(e,t),onSuccess:T}),E=(0,eB.useMutation)({mutationFn:e=>nZ(e,t),onSuccess:T}),A=(0,eB.useMutation)({mutationFn:e=>nV(e,t),onSuccess:T}),F=Object.prototype.hasOwnProperty.call(u.query,"reminder"),{isLoading:B,data:M}=(0,eB.useQuery)({queryKey:["pets"],queryFn:()=>nj(t),staleTime:1/0,cacheTime:9e5}),{isLoading:P,data:D}=(0,eB.useQuery)({queryKey:["marketingBrands"],queryFn:()=>nX(t),staleTime:1/0,cacheTime:9e5}),{isLoading:R,data:q}=(0,eB.useQuery)({queryKey:["reminders"],queryFn:()=>nk(t),staleTime:1/0,cacheTime:9e5,select:e=>e.map(e=>{var t,l;let n=null==(t=e.marketingBrand)?void 0:t.id;return n&&nL(n)||n&&"GAL_Dog_Product"===n?e:{...e,startDate:(null==(l=e.recurringDates)?void 0:l[0])?nQ(new Date(e.recurringDates[0])):""}})}),z=null==q?void 0:q.find(e=>e.id===u.query.reminder),O=null==q?void 0:q.filter(e=>{var t,l,n,a;return(null==(t=e.pet)?void 0:t.id)===(null==z||null==(l=z.pet)?void 0:l.id)&&(null==(n=e.marketingBrand)?void 0:n.id)===(null==z||null==(a=z.marketingBrand)?void 0:a.id)}),U=null==O?void 0:O.find(e=>"email"===e.channel),$=null==O?void 0:O.find(e=>"sms"===e.channel);(0,s.useEffect)(()=>{var e;if(k(!1),r)return void f(r);if(!u.query.reminder||!M)return;let t=M.find(e=>e.id===u.query.reminder);if(t){k(!0),f(t);return}if(!q)return;let l=q.find(e=>e.id===u.query.reminder);(null==l?void 0:l.id)&&(w(q.filter(e=>{var t,n,a,s;return(null==(t=e.pet)?void 0:t.id)===(null==(n=l.pet)?void 0:n.id)&&(null==(a=e.marketingBrand)?void 0:a.id)===(null==(s=l.marketingBrand)?void 0:s.id)})),f(M.find(e=>{var t;return e.id===(null==(t=l.pet)?void 0:t.id)})),(null==(e=l.marketingBrand)?void 0:e.id)&&v(l.marketingBrand.id),setTimeout(()=>{k(!0)}))},[r,M,q,u.query]),(0,s.useEffect)(()=>{r&&f(r)},[r]);let H=D&&x?D.filter(e=>e.species.toLowerCase()===x.species.toLowerCase()):D,V=nJ(7,!1),Z=nJ(45,!0),G=nJ(210,!1),W=nJ(30,!0);function K(){let e=document.getElementById("terms-modal-btn");e&&e.addEventListener("click",e=>{e.preventDefault(),y(!0)})}function Y(){if(k(!1),Object.prototype.hasOwnProperty.call(u.query,"reminder")){let e=new URLSearchParams(l.split("?")[1]);e.delete("reminder"),e.delete("edit");let n=l.split("?")[0];u.replace({pathname:"/".concat(t).concat(n),query:Object.fromEntries(e)},void 0,{shallow:!0})}else u.push("/".concat(t).concat(n));f(r),v("")}async function Q(t){let l=arguments.length>1&&void 0!==arguments[1]&&arguments[1];S(!1),""===t.nextReminderDate&&(t.nextReminderDate=new Date().toISOString().slice(0,10));try{var n,a,s,i,o,c,d,m;if(!t.petId&&x&&r&&(t.petId=r.id),t.remindersCommunicationPreference.includes(e)&&!l){p(!0),setTimeout(()=>{var e;null==(e=gigya)||e.accounts.showScreenSet({screenSet:"Loyalty-Web-Portal-RegistrationLoginV2",startScreen:"loyalty-phone-required",containerID:"phone-form-test",onAfterSubmit:()=>{p(!1),Q(t,!0)},onAfterScreenLoad:K})},2e3);return}if(!N&&x){await Promise.all(t.remindersCommunicationPreference.map(e=>I.mutateAsync({petId:x.id,productId:t.medication,startDate:t.nextReminderDate,dosesRemaining:0,channel:e,cdcPetOwnerId:x.cdcPetOwnerId,id:t.id,isDeleted:!1,lastModified:new Date(Date.now()).toUTCString(),status:"active",date:"",serestoRefillDate:[]}))),Y();return}let u=t.remindersCommunicationPreference.includes("email"),h=t.remindersCommunicationPreference.includes(e);(null==U?void 0:U.id)?u?await E.mutateAsync({...U,id:U.id,petId:null==(n=U.pet)?void 0:n.id,productId:null==(a=U.marketingBrand)?void 0:a.id,startDate:t.nextReminderDate,dosesRemaining:0,channel:U.channel}):await A.mutateAsync(U.id):u&&j[0]&&I.mutateAsync({petId:null==(s=j[0].pet)?void 0:s.id,productId:null==(i=j[0].marketingBrand)?void 0:i.id,startDate:t.nextReminderDate,dosesRemaining:0,channel:"email",id:j[0].id,cdcPetOwnerId:j[0].cdcPetOwnerId,isDeleted:j[0].isDeleted,lastModified:j[0].lastModified,status:j[0].status,date:"",serestoRefillDate:[]}),(null==$?void 0:$.id)?h?await E.mutateAsync({id:$.id,petId:null==(o=$.pet)?void 0:o.id,productId:null==(c=$.marketingBrand)?void 0:c.id,startDate:t.
1nextReminderDate,dosesRemaining:0,channel:$.channel,cdcPetOwnerId:$.cdcPetOwnerId,isDeleted:$.isDeleted,lastModified:$.lastModified,status:$.status,date:"",serestoRefillDate:[]}):A.mutate($.id):h&&j[0]&&await I.mutateAsync({petId:null==(d=j[0].pet)?void 0:d.id,productId:null==(m=j[0].marketingBrand)?void 0:m.id,startDate:t.nextReminderDate,dosesRemaining:0,channel:e,cdcPetOwnerId:j[0].cdcPetOwnerId,id:j[0].id,isDeleted:j[0].isDeleted,lastModified:j[0].lastModified,status:j[0].status,date:"",serestoRefillDate:[]}),Y()}catch(e){S(!0)}}let X=nL(g),J="",ee=null==q?void 0:q.find(e=>e.id===u.query.reminder);(null==ee?void 0:ee.id)&&(J=(null==M||null==(d=M.find(e=>{var t;return e.id===(null==(t=ee.pet)?void 0:t.id)}))?void 0:d.id)||"");let et="";return(null==ee||null==(i=ee.recurringDates)?void 0:i[0])&&(et=nQ(ee.startDate)),{pets:M||[],marketingbrands:H||[],onPetChange:e=>{f(null==M?void 0:M.find(t=>t.id===e))},minDate:_&&(X?G:V),maxDate:_&&(X?W:Z),handleFormSubmit:Q,isLoading:B||R||I.isLoading||E.isLoading||A.isLoading||P,displayModal:F,defaultPet:J||(null==x?void 0:x.id)||(null==(o=u.query.reminder)?void 0:o.toString())||"",onMedicationChange:e=>{v(e),k(!0)},isProductSeresto:X,displayPhoneVerification:h,showTermsModal:b,closeTermsModal:()=>{y(!1)},checkSmsChannel:void 0!==$,checkEmailChannel:void 0!==U,defaultMedication:null==ee||null==(c=ee.marketingBrand)?void 0:c.id,defaultDate:et,closeModal:Y,setDisplayPhoneVerification:p,isProductGalliprant:"GAL_Dog_Product"===g,isProductAdvantageXD:"AXD_Cat_Product"===g,selectedPetName:(null==x?void 0:x.name)||"Your Pet",currentRemindersIds:null!=(m=null==O?void 0:O.map(e=>e.id).filter(Boolean))?m:[],defaultValues:!N&&{remindersCommunicationPreference:[]},onReminderDateChange:()=>{k(!0)},showError:C}}("sms",u,h,null!=i?i:"",r),[U,V]=(0,s.useState)(!1),Z=!!(0,a.useRouter)().query.edit;if(h&&!w)return(0,n.jsx)("div",{});let G=h?eE:"div";switch(!0){case _:t=l.elements.selectSerestoReminderDateLabel.replace("{petName}",D);break;case C:t=l.elements.selectAdvantagexdReminderDateLabel.replace("{petName}",D);break;default:t=l.elements.selectReminderDateLabel.replace("{petName}",D)}return(0,n.jsxs)(G,{onClose:M,size:"lg",title:F?l.elements.editReminderTitle:l.elements.title,children:[(0,n.jsxs)("div",{className:"relative","data-clarity-mask":"true",children:[!Z&&"div"===G&&(0,n.jsx)("h3",{className:"mb-6 text-center font-semibold",children:l.elements.title}),j?(0,n.jsx)("div",{className:"m-20 flex p-20",children:(0,n.jsx)(nH,{isLoading:j,theme:"green"})}):null,!j&&(0,n.jsxs)(n$,{action:"",ajaxSubmission:!0,className:"text-left",onSubmit:e=>{y(e)},setFormField:q||void 0,children:[(0,n.jsx)("div",{className:"mb-8 text-center text-xs font-bold text-red-500",children:l.elements.mandatoryFieldsText}),!r&&(0,n.jsxs)(n$.SelectField,{defaultValue:N,disabled:Z,label:(0,n.jsx)("span",{className:"mr-1",children:l.elements.selectPetLabel}),name:"petId",onChange:f,requiredErrorMsg:l.elements.fieldIsRequiredText,children:[(0,n.jsx)("option",{value:"",children:l.elements.selectPetPlaceholder}),p.map(e=>(0,n.jsx)("option",{value:e.id,children:e.name},e.id))]}),(0,n.jsxs)(n$.SelectField,{className:"break-words",defaultValue:F,disabled:Z,label:(0,n.jsx)("span",{className:"mr-1",children:l.elements.selectMedicationLabel.replace("{petName}",D)}),name:"medication",onChange:S,requiredErrorMsg:l.elements.fieldIsRequiredText,children:[(0,n.jsx)("option",{value:"",children:l.elements.selectMedicationPlaceholder}),x.map(e=>(0,n.jsx)("option",{value:e.id,children:e.name},e.id))]}),!k&&(0,n.jsx)(n$.DateField,{className:"flex break-words",defaultValue:B,invalidErrorMsg:"Please enter a valid date",label:t,maxDate:v||void 0,minDate:g||void 0,name:"nextReminderDate",onChange:z,requiredErrorMsg:l.elements.fieldIsRequiredText,type:"date"}),(0,n.jsxs)(n$.ChoiceGroup,{label:k?l.elements.reminderTypePreferenceLabelGalliprant.replace("{petName}",D):l.elements.reminderTypePreferenceLabel.replace("{petName}",D),name:"remindersCommunicationPreference",requiredErrorMsg:l.elements.fieldIsRequiredText,children:[(0,n.jsx)(n$.ChoiceField,{checked:A,className:"mb-0 w-full",id:"email",isGroup:!0,label:l.elements.emailOptionText,name:"remindersCommunicationPreference",type:"checkbox",value:"email"}),(0,n.jsx)(n$.ChoiceField,{checked:E,className:"mb-0 w-full ".concat(_||k?"hidden":""),id:"sms",isGroup:!0,label:l.elements.textOptionText,name:"remindersCommunicationPreference",type:"checkbox",value:"sms"})]}),O?(0,n.jsx)(nC,{message:o.elements.genericApiError,type:"error"}):null,(0,n.jsxs)("div",{className:"flex flex-col justify-center gap-4 pt-4 md:flex-row",children:[i?(0,n.jsx)(H.$,{as:"a",className:"w-full flex-1 md:max-w-[245px]","data-btn-id":"reminder-form-create-reminder",href:$(i,u),onClick:()=>{(0,b.d)({event:"pet_profile",step_completed:"3",step_name:l.elements.title})},type:"button",variant:"inverted_pet_primary_green",children:l.elements.skipButtonText}):null,(0,n.jsx)(H.$,{as:"button",className:"w-full flex-1 md:max-w-[245px]","data-btn-id":"reminder-form-create-reminder",onClick:()=>{(0,b.d)({event:"pet_profile",step_completed:"3",step_name:l.elements.title})},type:"submit",variant:"pet_primary_green",children:F?l.elements.editButtonText:l.elements.submitButtonText})]}),F?(0,n.jsx)("div",{className:"mt-4 flex justify-center",children:(0,n.jsx)("button",{className:"cursor-pointer text-green-600 underline",onClick:()=>{V(!0)},type:"button",children:l.elements.deleteReminderText})}):null,U&&l.elements.medicationReminderDeleteModal[0]?(0,n.jsx)("div",{children:(0,n.jsx)(nW,{BlockMapper:d,block:l.elements.medicationReminderDeleteModal[0],globalConfig:o,page:m,remindersIds:R,selectedPet:r,setShowDeleteReminderModal:V})}):null]})]}),L?(0,n.jsxs)(eE,{onClose:()=>{P(!1)},size:"md",children:[(0,n.jsx)("div",{className:"relative flex min-h-[200px] min-w-[200px] justify-center",id:"phone-form-test",children:(0,n.jsx)(nH,{isLoading:!0,theme:"green"})}),T?(0,n.jsx)(eE,{onClose:I,size:"sm",children:(0,n.jsxs)("div",{className:"content content--no-width-restriction",children:[(0,n.jsx)("h3",{className:"py-4 text-center text-2xl",children:l.elements.smsTermsAndConditionsHeading}),(0,n.jsx)(c.rM,{BlockMapper:d,element:l.elements.smsTermsAndConditionsBody,globalConfig:o,page:m})]})}):null]}):null]})},n1=async(e,t)=>{let{data:l}=await (0,eM.L)("/api/pets/".concat(e.id,"?locale=").concat(t),{method:"PUT",data:{name:e.petName,gender:e.petSex,breed:e.breed,species:e.petSpecies,birthDate:e.petDateOfBirth,weight:Number(e.petWeight),acquisitionSource:e.petAcquisitionType,acquisitionDate:e.petAcquisitionDate,petShelterId:e.petShelter,petShelterName:e.shelterName,vetClinicId:e.vetClinic,vetClinicName:e.clinicName,imageReference:e.imageReference}});if(!l.success)throw Error("Failed to update pet profile");return l.data},n2=async(e,t)=>{let l="/api/species/".concat(e,"/breeds?locale=").concat(t),{data:n}=await (0,eM.L)(l);if(!n.success)throw Error("Failed to create pet profile");return null==n?void 0:n.data.data};async function n4(e){try{let{data:t}=await (0,eM.L)({method:"POST",url:"/api/google/geocode",data:{address:e}});return t}catch(e){throw Error("Geocode API error status ".concat(e.response.status,"\nMessage: ").concat(e.message))}}async function n6(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"*",l=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"",s=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"10mi";try{let{data:r}=await eM.L.post("/api/vet",{q:t,offset:l,classification:e,lat:n,lng:a,dist:s});if(!r.success)throw Error(r.message||"API request failed");return{entities:(r.data.entities||[]).map(e=>({entityId:e.entityId,entity:e.entity}))}}catch(e){throw Error("Couldn't fetch data")}}async function n3(e,t,l){return n6(l,"*",0,e,t)}let n5=async e=>{if(!e)return[];try{var t,l;let n=await n4(e);if("OK"!==n.status)return[];let{lat:a,lng:s}=null==n||null==(l=n.results[0])||null==(t=l.geometry)?void 0:t.location,r=await n3(String(a),String(s),"ELA_AC_061");if((null==r?void 0:r.entities)!==void 0)return r.entities;return[]}catch(e){return[]}},n7=async e=>{if(!e)return[];try{var t,l;let n=await n4(e);if("OK"!==n.status)return[];let{lat:a,lng:s}=null==n||null==(l=n.results[0])||null==(t=l.geometry)?void 0:t.location,r=await n3(String(a),String(s),"ELA_AC_003");if((null==r?void 0:r.entities)!==void 0)return r.entities;return[]}catch(e){return[]}},n8=e=>
1{var t,l,r,i,o,c,d;let{block:m,data:u,onSubmit:h,hideHeading:p,isEdit:x=!1,shelterData:f=[],multiplePetCreation:g=!1,globalConfig:v}=e,{submitForm:y,maxDate:j,minDate:w,minAdoptionDate:N,setMinAdoptionDate:_,breeds:k,searchClinics:C,searchShelters:S,setSelectedSpecies:L,setClinicZipCode:T,clinics:I,showVetClinic:E,showShelterSearch:A,onAcquisitionTypeChange:F,showPetShelter:B,setShelterZipCode:M,shelters:P,isLoading:R,isSubmitting:q,onShelterChange:z,createAdditionalPet:O,isLoadingVetClinics:U,isLoadingShelters:$,formFieldValue:V,isError:Z,isValidPetName:G,isApiError:W}=function(e,t,l){var n;let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],i=arguments.length>4?arguments[4]:void 0,[o,c]=(0,s.useState)(!1),[d,m]=(0,s.useState)(!1),{locale:u=""}=(0,a.useRouter)(),h=(0,eB.useQueryClient)(),{mutateAsync:p,isLoading:x}=(0,eB.useMutation)({mutationFn:e=>nN(e,u),mutationKey:"petProfile/create",onSuccess:()=>h.invalidateQueries({queryKey:["pets"]})}),{mutateAsync:f,isLoading:g}=(0,eB.useMutation)({mutationFn:e=>n1(e,u),mutationKey:"petProfile/update",onSuccess:()=>{h.invalidateQueries({queryKey:["pets"]}),h.invalidateQueries({queryKey:["petData",{id:null==i?void 0:i.id}]})}}),{isLoading:v,data:b=[],isError:y}=(0,eB.useQuery)({queryKey:["pets"],queryFn:()=>nj(u),staleTime:1/0,cacheTime:9e5}),[j,w]=(0,s.useState)(""),[N,_]=(0,s.useState)(""),[k,C]=(0,s.useState)(r.length>0),[S,L]=(0,s.useState)(r.length>
10),[T,I]=(0,s.useState)((null==i||null==(n=i.vetClinic)?void 0:n.name)!==void 0),[E,A]=(0,s.useState)([]),[F,B]=(0,s.useState)(void 0),M=new Date,P=M.getFullYear(),D=M.getMonth()+1,R=M.getDate();D=D>9?D:"0".concat(D),R=R>9?R:"0".concat(R);let q="".concat(P,"-").concat(D,"-").concat(R),z=new Date(M.getTime()-63072e7),O=z.getFullYear(),U=z.getMonth()+1,$=z.getDate();U=U>9?U:"0".concat(U),$=$>9?$:"0".concat($);let H="".concat(O,"-").concat(U,"-").concat($),[V,Z]=(0,s.useState)(H),G="".concat(P,"-").concat(D,"-").concat(R),[W,K]=(0,s.useState)((null==i?void 0:i.species)||"dog"),{data:Y,isLoading:Q,isError:X}=(0,eB.useQuery)({queryKey:["petBreeds",{species:W}],queryFn:()=>n2(W,u),select:e=>e.map(e=>({value:e.breedName,label:e.breedName})),staleTime:1/0,cacheTime:9e5}),{data:J,isLoading:ee,refetch:et}=(0,eB.useQuery)({queryKey:["vetClinics",{zipCode:j}],queryFn:()=>n5(j),select:e=>e.map(e=>{var t;return{value:e.entity.ELA_customer_id__c,label:e.entity.corporate_name__v,additionalText:null==(t=e.entity.addresses__v[0])?void 0:t.formatted_address__v,customerId:e.entity.ELA_customer_id__c,corporateName:e.entity.corporate_name__v}}),staleTime:1/0,cacheTime:9e5,enabled:!1}),{data:el,isLoading:en,refetch:ea}=(0,eB.useQuery)({queryKey:["shelters",{zipCode:N}],queryFn:()=>n7(N),select:e=>e.map(e=>{var t;return{value:e.entity.ELA_customer_id__c,label:e.entity.corporate_name__v,additionalText:null==(t=e.entity.addresses__v[0])?void 0:t.formatted_address__v,customerId:e.entity.ELA_customer_id__c,corporateName:e.entity.corporate_name__v}}),staleTime:1/0,cacheTime:9e5,enabled:!1}),es=async e=>{m(!1);try{let s=null==i?void 0:i.acquisitionDetail,d=null==i?void 0:i.id,m=r.find(t=>t.elements.crmId===e.petShelter),u=(()=>{var t,l;if(m)return m.elements.name;let n=null==el||null==(t=el.find(t=>t.customerId===e.petShelter))?void 0:t.corporateName;return null!=(l=null!=n?n:null==s?void 0:s.name)?l:""})(),h=(()=>{var t,l,n,a,s;if(m)return null!=(a=null==(n=m.elements.clinics.find(t=>e.vetClinic===t.elements.crmId))?void 0:n.elements.name)?a:"";let r=null==J||null==(t=J.find(t=>t.customerId===e.vetClinic))?void 0:t.corporateName;return r||(null!=(s=null==i||null==(l=i.vetClinic)?void 0:l.name)?s:"")})(),x=null==i?void 0:i.imageReference;if(!x){var n,a;let t=null==(n=l.elements.defaultDogIcon[0])?void 0:n.system.id,s=null==(a=l.elements.defaultCatIcon[0])?void 0:a.system.id;"dog"===e.petSpecies&&t?x=t:s&&(x=s)}let g={...e,shelterName:u,clinicName:h,imageReference:null!=x?x:"",...d?{id:d}:{}},v=d?await f(g):await p(g);t({id:v.id,...e,shelterName:u,clinicName:h},v,o),c(!1)}catch(e){m(!0)}},er=(0,s.useCallback)(t=>{t===e?C(!0):C(!1)},[e]);return(0,s.useEffect)(()=>{if(i){var e;(null==(e=i.acquisitionDetail)?void 0:e.id)&&L(!0),er(i.acquisitionSource)}},[er,i]),{submitForm:es,maxDate:q,minDate:H,minAdoptionDate:V,defaultAdoptionDate:G,setMinAdoptionDate:Z,breeds:Y||[],selectedSpecies:W,setSelectedSpecies:K,searchClinics:function(){et(),I(!0)},searchShelters:function(){ea(),L(!0)},setClinicZipCode:w,clinics:E.length>0?E.map(e=>({value:e.elements.crmId,label:e.elements.name})):J||[],shelters:r.length>0?r.map(e=>({value:e.elements.crmId,label:e.elements.name})):el||[],onAcquisitionTypeChange:er,showVetClinic:T,showShelterSearch:k,showPetShelter:S,setShelterZipCode:_,isLoading:Q||v,isLoadingVetClinics:ee,isLoadingShelters:en,isSubmitting:x||g,onShelterChange:function(e){let t=r.find(t=>t.elements.crmId===e);B({vetClinic:""}),void 0!==t&&A(t.elements.clinics),r.length>0&&I(!0)},createAdditionalPet:()=>{c(!0)},formFieldValue:F,isError:d,isValidPetName:e=>b.every(t=>t.name!==e),isApiError:y||X}}(m.elements.shelter,h,v,f,u);return W?(0,n.jsx)("div",{children:(0,n.jsx)(nC,{message:v.elements.genericApiError,type:"error"})}):(0,n.jsxs)("div",{className:"relative flex flex-col items-center justify-center","data-clarity-mask":"true",children:[(0,n.jsx)(nH,{isLoading:R||q||U||$,theme:"green"}),(0,n.jsxs)(n$,{action:"",ajaxSubmission:!0,className:"w-full",onSubmit:e=>{y(e)},setFormField:V,children:[!p&&(0,n.jsx)("h3",{className:"mb-6 text-center font-semibold",children:m.elements.heading}),(0,n.jsx)(n$.InputField,{defaultValue:null==u?void 0:u.name,invali
1dErrorMsg:m.elements.duplicatePetNameErrorMessage,label:m.elements.petName,max:30,name:"petName",onValidate:e=>(null==u?void 0:u.name)===e||G(e),type:"text"}),(0,n.jsxs)("div",{className:"flex flex-col gap-3 md:flex-row",children:[(0,n.jsxs)(n$.ChoiceGroup,{className:"flex flex-col",groupClassName:"flex flex-1 flex-col",label:m.elements.petSpeciesLabel,name:"petSpecies",children:[(0,n.jsx)(n$.ChoiceField,{checked:(null==u?void 0:u.species)==="cat",className:"md:w-1/2",disabled:!!f.length,id:"cat",isGroup:!0,label:m.elements.petSpeciesCat,name:"petSpecies",onChange:e=>{L(e)},type:"radio",value:"cat"}),(0,n.jsx)(n$.ChoiceField,{checked:(null==u?void 0:u.species)==="dog",className:"md:w-1/2",id:"dog",isGroup:!0,label:m.elements.petSpeciesDog,name:"petSpecies",onChange:e=>{L(e)},type:"radio",value:"dog"})]}),(0,n.jsxs)(n$.ChoiceGroup,{className:"flex flex-col",groupClassName:"flex flex-1 flex-col",label:m.elements.petSexLabel,name:"petSex",children:[(0,n.jsx)(n$.ChoiceField,{checked:(null==u?void 0:u.gender)==="male",className:"md:w-1/2",id:"male",isGroup:!0,label:"Male",name:"petSex",type:"radio",value:"male"}),(0,n.jsx)(n$.ChoiceField,{checked:(null==u?void 0:u.gender)==="female",className:"md:w-1/2",id:"female",isGroup:!0,label:"Female",name:"petSex",type:"radio",value:"female"})]})]}),(0,n.jsxs)("div",{className:"flex flex-col gap-3 md:flex-row",children:[(0,n.jsx)(n$.DateField,{className:"flex flex-1",defaultValue:nQ(null!=(c=null==u?void 0:u.birthDate)?c:""),invalidErrorMsg:"",label:m.elements.petDateOfBirth,maxDate:j,minDate:w,name:"petDateOfBirth",onChange:e=>{_(e)},requiredErrorMsg:""}),(0,n.jsx)(n$.DateField,{className:"flex flex-1",defaultValue:nQ(null!=(d=null==u?void 0:u.adoptionDate)?d:""),invalidErrorMsg:"",isOptional:!f.length,label:m.elements.petAdoptionDay,maxDate:j,minDate:N,name:"petAcquisitionDate",requiredErrorMsg:""})]}),(0,n.jsxs)("div",{className:"flex flex-col gap-3 md:flex-row",children:[(0,n.jsx)(n$.SearchableSelectField,{className:"flex flex-1",defaultValue:null==u?void 0:u.breed,label:m.elements.petBreed,name:"breed",options:k}),(0,n.jsx)(n$.InputField,{className:"flex flex-1",defaultValue:null==u||null==(t=u.weight)?void 0:t.value,invalidErrorMsg:"",label:m.elements.petWeight,max:300,min:.1,name:"petWeight",requiredErrorMsg:"",type:"number"})]}),0===f.length&&(0,n.jsx)("div",{className:"flex flex-col",children:(0,n.jsxs)(n$.SelectField,{defaultValue:null==u?void 0:u.acquisitionSource,label:m.elements.petAcquisition,name:"petAcquisitionType",onChange:e=>{F(e)},requiredErrorMsg:"",children:[(0,n.jsx)("option",{value:"",children:"Please select an option"}),(0,n.jsx)("option",{value:m.elements.breeder,children:m.elements.breeder}),(0,n.jsx)("option",{value:m.elements.petStore,children:m.elements.petStore}),(0,n.jsx)("option",{value:m.elements.shelter,children:m.elements.shelter}),(0,n.jsx)("option",{value:m.elements.friendFamily,children:m.elements.friendFamily}),(0,n.jsx)("option",{value:m.elements.rescued,children:m.elements.rescued}),(0,n.jsx)("option",{value:m.elements.other,children:m.elements.other})]})}),(0,n.jsx)("div",{className:"flex flex-col gap-3 md:flex-row",children:A?(0,n.jsxs)(n$.FieldGroup,{groupClassName:"flex flex-1 flex-col",name:"shelterFieldsForNonShelter",children:[f.length>0&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(n$.InputField,{className:"flex flex-1",isOptional:!0,label:(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("span",{className:"mb-1 block font-bold",children:m.elements.shelterZipcode}),(0,n.jsx)("span",{children:m.elements.shelterZipcodeDescription})]}),name:"shelterZipcode",onChange:e=>{M(e)},type:"text"}),(0,n.jsx)("div",{className:"-mt-2 mb-4 flex justify-end",children:(0,n.jsx)(D,{as:"button",className:"font-normal !text-pet-green",onClick:S,type:"button",children:(0,n.jsx)("span",{children:m.elements.searchSheltersButtonText})})})]}),B?(0,n.jsx)(n$.SearchableSelectField,{className:"w-full",defaultValue:null==u||null==(l=u.acquisitionDetail)?void 0:l.id,isOptional:!f,label:m.elements.sheltersLabel,name:"petShelter",onChange:e=>{g&&z(e)},options:[(null==u||null==(r=u.acquisitionDetail)?void 0:r.name)?{value:u.acquisitionDetail.id,label:u.acquisitionDetail.name}:{value:"",label:m.elements.sheltersPlaceholder},...P]}):null]}):null}),(0,n.jsxs)(n$.FieldGroup,{name:"clinicFieldsForNonShelter",children:[0===f.length&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(n$.InputField,{isOptional:!0,label:(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("span",{className:"mb-1 block font-bold",children:m.elements.clinicZipcode}),(0,n.jsx)("span",{children:m.elements.clinicZipcodeDescription})]}),name:"clinicZipcode",onChange:e=>{T(e)},type:"text"}),(0,n.jsx)("div",{className:"-mt-2 mb-4 flex justify-end",children:(0,n.jsx)(D,{as:"button",className:"font-normal 
1!text-pet-green",onClick:C,type:"button",children:(0,n.jsx)("span",{children:m.elements.searchClinicsButtonText})})})]}),E?(0,n.jsx)(n$.SearchableSelectField,{defaultValue:null==u||null==(i=u.vetClinic)?void 0:i.id,isOptional:!f.length,label:m.elements.searchClinicsLabel,name:"vetClinic",options:[(null==u||null==(o=u.vetClinic)?void 0:o.name)?{value:u.vetClinic.id,label:u.vetClinic.name}:{value:"",label:m.elements.vetClinicsPlaceholder},...I]}):null]}),Z?(0,n.jsx)(nC,{message:m.elements.formGenericErrorMessage,type:"error"}):null,(0,n.jsxs)("div",{className:"flex flex-col justify-center gap-4 pt-4 text-center md:flex-row",children:[(0,n.jsx)(H.$,{as:"button",className:"w-full flex-1 md:max-w-[245px]",onClick:()=>{(0,b.d)({event:"cta_click",cta_name:x?m.elements.submitButtonText:m.elements.nextButtonText,cta_category:"CTA_Button"})},type:"submit",variant:"pet_primary_green",children:x?m.elements.submitButtonText:m.elements.nextButtonText}),g?(0,n.jsx)(H.$,{as:"button",className:"w-full flex-1 md:max-w-[245px]",onClick:()=>{(0,b.d)({event:"cta_click",cta_name:m.elements.addExtraPetButtonText,cta_category:"CTA_Button"}),O()},type:"submit",variant:"inverted_pet_primary_green",children:m.elements.addExtraPetButtonText}):null]})]})]})},n9=e=>{var t;let{block:l,icons:a,petName:r,icon:i,onSubmit:o,isLoading:c,onBack:d,isEdit:m,error:u}
1=e,[h,p]=(0,s.useState)(i);return(0,n.jsxs)("div",{className:"relative",children:[(0,n.jsx)(nH,{isLoading:c,theme:"green"}),(0,n.jsxs)("div",{className:"text-center",children:[(0,n.jsx)("h3",{className:"mb-8 break-words font-semibold leading-6",children:l.elements.title.replace("{{petName}}",r)}),(0,n.jsx)(S,{className:"mx-auto mb-10",iconCustomClasses:"bg-white w-40 h-40",size:"none",children:h.imageUrl||i.imageUrl?(0,n.jsx)("div",{className:"relative h-40 w-40",children:(0,n.jsx)(f(),{alt:"",className:"rounded-full border-3 border-pet-green",fill:!0,loader:v.L,src:null!=(t=h.imageUrl)?t:i.imageUrl})}):(0,n.jsx)("img",{alt:"",src:""})}),(0,n.jsx)("h4",{className:"mb-5 break-words text-base font-semibold leading-5",children:l.elements.description.replace("{{petName}}",r)}),(0,n.jsx)("div",{children:(0,n.jsx)("div",{className:"grid grid-cols-2 gap-4 md:grid-cols-3",children:a.map(e=>(0,n.jsx)("button",{className:h.id===e.id?"opacity-50":"",onClick:()=>{p(e)},type:"button",children:(0,n.jsx)(S,{iconCustomClasses:"w-24 h-24",size:"none",children:(0,n.jsx)(n.Fragment,{children:e.imageUrl?(0,n.jsx)("div",{className:"relative h-24 w-24",children:(0,n.jsx)(f(),{alt:e.id,className:"h-24 w-24 rounded-full border-2 border-pet-green",fill:!0,loader:v.L,src:e.imageUrl})}):null})})},e.id))})})]}),u?(0,n.jsx)("div",{children:u}):null,(0,n.jsxs)("div",{className:"flex flex-col items-center justify-center gap-4 pt-8 md:flex-row",children:[!m&&(0,n.jsx)(H.$,{as:"button",className:"w-full flex-1 md:max-w-[245px]",onClick:()=>{d(),(0,b.d)({event:"cta_click",cta_name:l.elements.backButtonText,cta_category:"CTA_Button"})},type:"button",variant:"inverted_pet_primary_green",children:l.elements.backButtonText}),(0,n.jsx)(H.$,{as:"button",className:"w-full flex-1 md:max-w-[245px]",onClick:()=>{(0,b.d)({event:"cta_click",cta_name:l.elements.nextButtonText,cta_category:"CTA_Button"}),o(h.id)},type:"button",variant:"pet_primary_green",children:l.elements.nextButtonText})]})]})};var ae=l(92874),at=l(25735),al=l.n(at);let an=e=>{let{className:t="",children:l,icon:a=null,title:s,disableOverflow:r,color:i={}}=e;return(0,n.jsx)(n.Fragment,{children:" "})},aa=e=>{let{className:t="",children:l,populateOverviewTab:a=!1,overviewTabTitle:r="Overview",activeTabIndex:i=0,onChange:o=()=>void 0,tabMobileView:c="stack",tabColorStyles:d={}}
1=e,m=(0,s.useRef)(null),u=(0,s.useRef)(null),[h,p]=(0,s.useState)(i),[x,f]=(0,s.useState)(0),[g,v]=(0,s.useState)(!1);(0,s.useEffect)(()=>{let e=()=>{v(window.innerWidth>=1024)};return e(),window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}},[]);let b=g?"scroll":c,y="scroll"===b,j="stack"===b,N=e=>{p(Number(e)),j&&f(x===Number(e)?null:Number(e)),o(e)};(0,s.useEffect)(()=>{if(!y)return;let e=document.getElementsByClassName("RRT__tabs")[0],t=()=>{var t,l;let{scrollLeft:n,clientWidth:a,scrollWidth:s}=e;0===n&&(null==(t=m.current)||t.classList.add("hidden")),0!==n&&m.current&&(m.current.classList.remove("hidden"),m.current.style.background="linear-gradient(to right, #D3D3D3 75%, transparent)"),s>a&&u.current&&(u.current.classList.remove("hidden"),u.current.style.background="linear-gradient(to left, #D3D3D3 75%, transparent)"),Math.ceil(n)+a>=s&&(null==(l=u.current)||l.classList.add("hidden"))};return t(),e.addEventListener("scroll",t),()=>{e.removeEventListener("scroll",t)}},[y,h]);let _=(a?[(0,n.jsx)(an,{title:r,children:l.map((e,t)=>(0,s.isValidElement)(e)&&(0,n.jsxs)("div",{children:[(0,n.jsx)("h3",{className:t>0?"mt-6":"",children:e.props.title}),s.Children.toArray(e.props.children).map(e=>e)]},e.key))})].concat(l):l).map((e,t)=>{var l,n;let a=String((null==(l=e.props.color)?void 0:l.choice)||""),s=d[a],r=V.TE.has(a),i=V.TE.get(a),o=(null==s?void 0:s.defaultStyle)?s:r&&i?{defaultStyle:"",collapsed:"bg-gray-300 text-blue-900",selected:i}:{defaultStyle:"bg-gray-400 text-gray-900 hover:bg-gray-300",collapsed:"bg-gray-300 text-blue-900",selected:"bg-gray-200 text-blue-900"},c={default:"".concat(o.defaultStyle," text-sm py-4 px-6 flex-1 border-l-2 border-gray-500 cursor-pointer flex items-center justify-center"),collapsed:"".concat(o.collapsed," border-l-0 border-b"),selected:"".concat(o.selected," font-bold")};return{key:String(null!=(n=e.key)?n:"tab-".concat(t)),title:e.props.title,getContent:()=>e.props.children,tabClassNames:c,panelClassName:e.props.disableOverflow?al().panelNoOverflow:al().panel,disableOverflow:e.props.disableOverflow,icon:e.props.icon}});return(0,n.jsxs)("div",{className:"relative",children:[y?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("div",{className:"absolute left-0 top-2 z-10 h-9 w-10",ref:m,children:(0,n.jsx)(w,{className:"ml-2 mt-2",icon:P.v.ArrowLeft,iconSize:"w-3 h-3",onClick:()=>{let e=document.getElementsByClassName("RRT__tabs")[0];e.scrollLeft-=100},size:"w-4 h-4"})}),(0,n.jsx)("div",{className:"absolute right-0 top-2 z-10 h-9 w-10",ref:u,children:(0,n.jsx)(w,{className:"ml-4 mt-2",icon:P.v.ArrowRight,iconSize:"w-3 h-3",onClick:()=>{let e=document.getElementsByClassName("RRT__tabs")[0];e.scrollLeft+=100},size:"w-4 h-4"})})]}):null,y?(0,n.jsx)(ae.A,{containerClass:"".concat(t," overflow-hidden w-full container-wide shadow-secondary rounded-lg flex flex-col"),items:_.map((e,t)=>({title:e.title,getContent:e.getContent,tabClassName:"".concat(e.tabClassNames.default," lg:min-w-max ").concat(t===h?e.tabClassNames.selected:""," ").concat(t!==h?e.tabClassNames.collapsed:""),panelClassName:e.panelClassName})),name:"TabbedContentBlock",onChange:N,selected:h,showMore:!1,tabsWrapperClass:"flex border-b border-gray-300 overflow-x-auto whitespace-nowrap no-scrollbar",transform:!1}):(0,n.jsx)("section",{className:al().tabContent,children:_.map((e,t)=>{var l;return(0,n.jsxs)("div",{className:"border-b border-gray-400",children:[(0,n.jsx)("button",{className:"".concat(e.tabClassNames.default," ").concat(x===t?e.tabClassNames.selected:e.tabClassNames.collapsed," w-full text-left"),onClick:()=>{N(t)},type:"button",children:((e,t,l)=>(0,n.jsxs)(n.Fragment,{children:[j?(0,n.jsx)("svg",{className:"mr-4 h-5 w-5 fill-current transition-transform duration-300",height:"26.883",style:{transform:x===l?"rotate(45deg)":"rotate(0)"},viewBox:"0 0 26.883 26.883",width:"26.883",children:(0,n.jsx)("path",{d:"M1.9,18.729l-1.6-1.595a1,1,0,0,1,0-1.414l6.2-6.2-6.2-6.2a1,1,0,0,1,0-1.414L1.9.306a1,1,0,0,1,1.415,0l6.2,6.2,6.2-6.2a1,1,0,0,1,1.415,0l1.595,1.6a1,1,0,0,1,0,1.414l-6.2,6.2,6.2,6.2a1,1,0,0,1,0,1.414l-1.595,1.595a1,1,0,0,1-1.415,0l-6.2-6.2-6.2,6.2a1,1,0,0,1-1.414,0Z",transform:"translate(13.442 -0.018) rotate(45)"})}):null,!j&&(0,s.isValidElement)(e)&&(0,s.cloneElement)(e,{className:"mr-4 shrink-0"}),(0,n.jsx)("p",{children:t})]}))(e.icon,e.title,t)}),x===t&&(0,n.jsx)("div",{className:e.panelClassName,children:null==(l=e.getContent)?void 0:l.call(e)})]},e.key)})})]})},as=e=>e.cookieFallbackImage[0]?(0,n.jsx)(f(),{alt:e.cookieFallbackImage[0].description||"",className:"mb-4 h-48 w-full flex-shrink-0 object-contain",loader:v.L,src:e.cookieFallbackImage[0].url}):(0,n.jsx)("div",{className:"mb-4 h-48 w-full bg-blue-900"}),ar=e=>{let{legends:t}=e;return(0,n.jsx)("div",{className:"-mx-1 inline-flex flex-wrap",style:{display:"grid",gridAutoFlow:"column",gridAutoColumns:"1fr"},children:t.map((e,t)=>(0,n.jsxs)("div",{className:"m-auto flex flex-col items-center text-center",id:"legend".concat(t),style:{margin:"0 5px"},children:[(0,n.jsx)("div",{className:"h-6 border border-black",style:{backgroundColor:e.color,width:"100%"}}),(0,n.jsx)("p",{className:"mt-0.5 text-xs font-semibold",children:e.legend_name})]},"".concat(e.legend_name,"+").concat(e.color)))})},ai=e=>{let{subTitle:t,legends:l}=e;return(0,n.jsx)("div",{className:"outline-style: solid container inline-flex w-auto rounded-md border-2 border-current bg-white md:items-center",children:(0,n.jsxs)("div",{className:"m-3 inline-flex w-auto flex-col",children:[(0,n.jsx)(ar,{legends:l}),(0,n.jsx)("p",{className:"mt-1 text-xs font-semibold",children:t})]})})};var ao=l(69026);function ac(e){let{onSearchApi:t,placeholderText:l="Search",onError:r,onLoading:i,theme:c}
1=e,d=(0,s.useRef)(null),[m,u]=(0,s.useState)(null),[h,p]=(0,s.useState)(""),{locale:x}=(0,a.useRouter)(),f=x?x.includes("_")?x.split("_")[1]:x:null,g={Location:{class:"location",icon:(0,n.jsx)("svg",{baseProfile:"tiny",fill:null!=c?c:"currentColor",height:"24px",stroke:null!=c?c:"currentColor",strokeWidth:"0",version:"1.2",viewBox:"0 0 24 24",width:"24px",xmlns:"http://www.w3.org/2000/svg",children:(0,n.jsx)("path",{d:"M12 5c1.609 0 3.12.614 4.254 1.73 1.126 1.107 1.746 2.579 1.746 4.14s-.62 3.03-1.745 4.139l-4.255 4.184-4.254-4.186c-1.125-1.107-1.745-2.576-1.745-4.139s.62-3.032 1.745-4.141c1.135-1.113 2.647-1.727 4.254-1.727m0-2c-2.047 0-4.096.768-5.657 2.305-3.124 3.074-3.124 8.057 0 11.131l5.657 5.563 5.657-5.565c3.124-3.072 3.124-8.056 0-11.129-1.561-1.537-3.609-2.305-5.657-2.305zM12 8.499c.668 0 1.296.26 1.768.731.976.976.976 2.562 0 3.537-.473.472-1.1.731-1.768.731s-1.295-.26-1.768-.731c-.976-.976-.976-2.562 0-3.537.473-.471 1.101-.731 1.768-.731m0-1c-.896 0-1.792.342-2.475 1.024-1.367 1.367-1.367 3.584 0 4.951.684.684 1.578 1.024 2.475 1.024s1.792-.342 2.475-1.024c1.366-1.367 1.366-3.584 0-4.951-.683-.683-1.579-1.024-2.475-1.024z",style:{fill:null!=c?c:"currentcolor"}})})}};(0,s.useEffect)(()=>{new ao.aH({apiKey:o._.NEXT_PUBLIC_MAP_API_KEY,version:"weekly"}).importLibrary("places").then(()=>{if(d.current){let e=new google.maps.places.Autocomplete(d.current,{types:["geocode"],componentRestrictions:f?{country:f}:void 0,fields:["formatted_address","geometry","name","address_components"]});u(e),e.addListener("place_changed",()=>{var l;let n=e.getPlace();if(!(null==(l=n.geometry)?void 0:l.location))return;let{formatted_address:a,address_components:s}=n;i(!0),t({lat:n.geometry.location.lat(),lng:n.geometry.location.lng()},v(s)),p(a||""),i(!1)})}})},[f,r,i,t]);let v=e=>(null==e?void 0:e.some(e=>e.types.includes("administrative_area_level_2")))?"administrative_area_level_2":(null==e?void 0:e.some(e=>e.types.includes("administrative_area_level_1")))?"administrative_area_level_1":"country";return(0,n.jsxs)("div",{className:"absolute z-40 flex w-full max-w-md items-center pl-2 md:right-5 md:top-2 ",children:[(0,n.jsx)("div",{className:"relative mt-3 w-3/5 sm:w-10/12 md:mt-0",children:(0,n.jsxs)("label",{htmlFor:"parasite-search-input",children:[(0,n.jsx)("span",{className:"visuallyhidden",children:"Search"}),(0,n.jsx)("input",{className:"parasite-search-input mb-0 p-3 text-black","data-clarity-mask":"true",id:"parasite-search-input",onChange:e=>{m&&p(e.target.value)},placeholder:l,ref:d,type:"text",value:h})]})}),(0,n.jsx)(w,{as:"button",className:"z-50 m-2 my-auto",icon:g.Location,iconSize:"w-4 h-4",noIconAnimation:!0,onClick:()=>{i(!0),navigator.geolocation.getCurrentPosition(e=>{var l,n;t({lat:e.coords.latitude,lng:e.coords.longitude},"administrative_area_level_1"),l=e.coords.latitude,n=e.coords.longitude,new window.google.maps.Geocoder().geocode({location:{lat:l,lng:n}}).then(e=>{let{results:t}=e;t[0]&&p(t[0].formatted_address)}).catch(()=>{(0,eF.vV)("No address found for the ".concat(l," and ").concat(n)),r()})}),i(!1)},size:"w-7 h-7",variant:"tertiary",children:"Search by current location"})]})}async function ad(e){var t,l;let{queryKey:[,n]}=e,a=new URLSearchParams(Object.entries(n).map(e=>{let[t,l]=e;return void 0===l||"string"==typeof l&&""===l?null:"string"==typeof l?[t,l]:"number"==typeof l?[t,String(l)]:[t,l.join(",")]}).filter(Boolean));n.startDate&&a.set("startDate",null!=(t=n.startDate.split("T")[0])?t:""),n.endDate&&a.set("endDate",null!=(l=n.endDate.split("T")[0])?l:"");let s="".concat("/api/disease/group-by-administrative-area","?").concat(a.toString()),{data:r}=await (0,eM.L)(s);return r}async function am(e){let{queryKey:[,t]}=e,{lat:l,lng:n,selectedRadius:a,diseases:s,startDate:r,endDate:i}=t,o=i?"&endDate=".concat(nK(new Date(i))):"&endDate=".concat(nK(new Date)),c=r?"&startDate=".concat(nK(new Date(r))):"",d="/api/disease/nearby-cases?lat=".concat(l,"&lng=").concat(n,"&radius=").concat(a,"&diseases=").concat(s,"&statuses=New,Approved").concat(c).concat(o),{data:m}=await (0,eM.L)(d);return m}var au=l(17464);let ah=(0,V.K_)("salmonella_360"),ap="terrain",ax="roadmap",af=au.k5(["heatmap","markers","heatmap_and_markers"]),ag="heatmap",av="heatmap_and_markers";var ab=l(18443);class ay{async getGoogleMaps(){var e,t,l,n,a;if(this.map&&this.geocoder)return{map:this.map,geocoder:this.geocoder};let s=this.mapRef.current;if(!s)return null;let r=new ao.aH({apiKey:o._.NEXT_PUBLIC_MAP_API_KEY,version:"weekly"}),{Map:i}=await r.importLibrary("maps"),c=af.safeParse(null!=(t=null==(e=this.block.elements.mapType[0])?void 0:e.codename)?t:""),d=c.success?c.data:null;return this.map=new i(s,{mapId:o._.NEXT_PUBLIC_PARASITE_MAP_STYLE_ID,center:{lat:null!=(l=this.block.elements.latitude)?l:52.5555,lng:null!=(n=this.block.elements.longitude)?n:0},zoom:null!=(a=this.block.elements.zoomLevel)?a:8,streetViewControl:!1,mapTypeControl:!1,clickableIcons:!1,keyboardShortcuts:!1,mapTypeId:"markers"===d?ap:ax}),this.geocoder=new google.maps.Geocoder,{map:this.map,geocoder:this.geocoder}}getMapType(e){let t=af.safeParse(e);return t.success?t.data:null}sortCasesByPostCode(e){return e.reduce((e,t)=>
1{let l={...e},n=t.location.postalCode;if(n){var a;l[n]||(l[n]=[]),null==(a=l[n])||a.push(t)}return l},{})}async fetchLevel2Data(e){var t;let l=this.block.elements.startDate,n=this.block.elements.endDate,a=n?"&endDate=".concat(nK(new Date(n))):"",s=l?"&startDate=".concat(nK(new Date(l))):"",r=this.router.locale,i="/api/disease/group-by-administrative-area?countryCodes=".concat(null==r?void 0:r.toLowerCase(),"&diseases=").concat(null==(t=this.block.elements.parasiteType[0])?void 0:t.codename.toUpperCase(),"&groupBy=administrativeAreaLevel2&placeId=").concat(e).concat(s).concat(a),{data:o}=await (0,eM.L)(i);return o}async createMarker(e,t,l,n,a,s){let{AdvancedMarkerElement:r}=await google.maps.importLibrary("marker"),{InfoWindow:i}=await google.maps.importLibrary("maps"),o=Object.entries(e),c=new DOMParser,d=new i,m=o.reduce((e,t)=>{let[,l]=t;return e+l.length},0);return this.setReportedCases(String(m)),o.map(e=>{let{location:i}=e[1][0]||{},o=e[1].length,m='<svg xmlns="http://www.w3.org/2000/svg" width="30" height="45" viewBox="0 0 40 60">\n  <g id="Group_16846" data-name="Group 16846" transform="translate(-1409 -316)">\n  <path id="Path_11480" data-name="Path 11480" d="M20,0A20.082,20.082,0,0,1,40,20.164C40,31.3,20,60,20,60S0,31.3,0,20.164A20.082,20.082,0,0,1,20,0Z" transform="translate(1409 316)" fill="'.concat(ah,'"/>\n  <circle id="Ellipse_91498" data-name="Ellipse 91498" cx="16" cy="16" r="16" transform="translate(1413 320)" fill="#fff"/>\n  <text font-size="12px" stroke="black" text-anchor="middle" transform="translate(1429 341)">').concat(o,"</text>\n  </g>\n  </svg>"),u=c.parseFromString(m,"image/svg+xml").documentElement,h=new r({position:{lat:i.latitude,lng:i.longitude},map:t,content:u});return h.addListener("click",()=>{let t;d.close(),d.setContent((t=e[0],'<h4 class="text-s font-bold">'.concat(o<=1?l:a,'</h4>\n<span class="text-xs block my-2.5">').concat(o," ").concat(o<=1?n:s,'</span>\n<span class="text-s block font-bold">').concat(t,"</span>"))),d.open(h.map,h)}),h.caseCount=o,h})}async createNewMarkerCluster(e){let t=new DOMParser,{AdvancedMarkerElement:l}=await google.maps.importLibrary("marker");return new ab.w1({map:this.map,markers:e,renderer:{render:e=>{let n=e.markers.reduce((e,t)=>"object"==typeof e&&"caseCount"in e&&"number"==typeof e.caseCount&&"object"==typeof t&&"caseCount"in t&&"number"==typeof t.caseCount?e.caseCount+t.caseCount:"number"==typeof e&&"object"==typeof t&&"caseCount"in t&&"number"==typeof t.caseCount?e+t.caseCount:"object"==typeof e&&"caseCount"in e&&"number"==typeof e.caseCount&&"number"==typeof t?e.caseCount+t:e,0)||0,a='\n        <svg xmlns="http://www.w3.org/2000/svg" width="35" height="35" viewBox="0 0 46 46">\n        <g id="Group_16843" data-name="Group 16843" transform="translate(-1462 -312)">\n          <g id="Ellipse_91499" data-name="Ellipse 91499" transform="translate(1464 314)" fill="#fff" stroke="'.concat(ah,'" stroke-width="2">\n            <circle cx="21" cy="21" r="21" stroke="none"/>\n            <circle cx="21" cy="21" r="22" fill="none"/>\n			<text font-size="12px" fill="black" stroke-width="1" stroke="black" x="21" y="26" text-anchor="middle">').concat(n,"</text>\n          </g>\n        </g>\n      </svg>"),s=t.parseFromString(a,"image/svg+xml").documentElement;return new l({position:e.position,map:this.map,content:s})}}})}renderRadiusCircle(e,t){if(!this.map)throw Error("Map is not set.");return new window.google.maps.Circle({map:this.map,center:e,radius:1609.34*t,strokeColor:ah,strokeOpacity:.8,strokeWeight:2,fillColor:ah,fillOpacity:.2})}zoomToPlace(e,t){if(!this.geocoder)throw Error("Geocoder not set.");return this.geocoder.geocode({placeId:e}).then(e=>{var l;let{results:n}=e,a=(null==(l=n[0])?void 0:l.geometry.viewport)||null;if(!this.map)throw Error("Map not set.");a&&this.map.fitBounds(a,t?55:155)}).catch(()=>((0,eF.vV)("Could not zoom to the place ID ".concat(e)),!0)),!1}getHeatmapStyles(e,t,l){var n,a,s,r,i,o,c,d;let m,u,h,p=null!=(s=null==(n=e[t])?void 0:n.worstAffectedArea)?s:0;for(let e of(null==(a=this.block.elements.mapLegend[0])?void 0:a.elements.legend)||[])p>=(null!=(r=e.elements.lowerBound)?r:0)&&p<(null!=(i=e.elements.upperBound)?i:0)&&(m=e.elements.color);return this.hoveredPlaceId!==this.selectedLevel2Id&&this.hoveredPlaceId===t&&p>0?{strokeColor:(0,V.K_)("elanco-mid-blue"),strokeOpacity:1,strokeWeight:3,fillColor:m,fillOpacity:1}:("administrative_area_level_1"===l?(u=this.block.elements.stateBorderColor||void 0,h=null!=(o=this.block.elements.stateBorderWidth)?o:void 0):t===this.selectedLevel2Id?(u="black",h=2):(u
1=this.block.elements.countyBorderColor||void 0,h=null!=(c=this.block.elements.countyBorderWidth)?c:void 0),{fillColor:m,fillOpacity:null!=(d=this.block.elements.heatmapOpacity)?d:1,strokeColor:u,strokeOpacity:1,strokeWeight:h})}getCleanAddress(e){return e.filter(e=>!e.types.includes("country")).map((e,t)=>0===t?e.long_name:e.short_name).join(", ")}async renderCircleAndMarkers(e,t,l,n,a,s){var r,i,o;let c=await this.getGoogleMaps();if(!c)return;let{map:d}=c;await t();let m={lat:null!=(r=null==e?void 0:e.lat)?r:52.5555,lng:null!=(i=null==e?void 0:e.lng)?i:0};s.current=this.renderRadiusCircle(m,l);let u=this.getMapType(n);u===av&&(null==(o=this.map)||o.setMapTypeId(ap)),e&&d.panTo(e),d.setZoom(8),u===av&&this.map&&window.google.maps.event.addListener(this.map,"zoom_changed",()=>{var e,t,l,n;(null!=(t=null==(e=this.map)?void 0:e.getZoom())?t:0)>6?(null==(l=this.map)||l.setMapTypeId(ap),a(!0)):(null==(n=this.map)||n.setMapTypeId(ax),a(!1))})}render(e,t,l,n){let a,s,r=e.length>0?e.map(e=>e.codename):this.DEFAULT_LAYERS,i=t.getFeatureLayer(google.maps.FeatureType.ADMINISTRATIVE_AREA_LEVEL_1),o=t.getFeatureLayer(google.maps.FeatureType.ADMINISTRATIVE_AREA_LEVEL_2);r.includes("administrative_layer_1")?a=l:(s=l,this.level2Data=(null==l?void 0:l.success)?l.data:{}),i.style=e=>{if(!(null==a?void 0:a.success)||r.length>0&&!r.includes("administrative_layer_1"))return;let t=a.data,{placeId:l}=e.feature;return l===this.selectedLevel1Id?{fillColor:void 0,fillOpacity:void 0,strokeColor:"black",strokeOpacity:1,strokeWeight:2}:this.getHeatmapStyles(t,l,"administrative_area_level_1")},r.includes("administrative_layer_1")?o.style=e=>{let{placeId:t}=e.feature;return n&&this.selectedLevel1Id&&n[t]&&(!(r.length>0)||r.includes("administrative_layer_2"))?this.getHeatmapStyles(n,t,"administrative_area_level_2"):{fillColor:void 0,fillOpacity:void 0,strokeColor:void 0,strokeOpacity:void 0,strokeWeight:void 0}}:o.style=e=>{if(!(null==s?void 0:s.success)||r.length>0&&!r.includes("administrative_layer_2"))return;let t=s.data,{placeId:l}=e.feature;return this.getHeatmapStyles(t,l,"administrative_area_level_2")}}onRenderTypeChanged(e){if(e.getRenderingType()===google.maps.RenderingType.RASTER){this.setError(!0);let e="Sorry, we cannot display the ParvoTrack Map, as your device or browser is not supported. Try updating your device and browser and try again.";this.setErrorMessage(e),(0,eF.OG)(e)}}onZoom(e){var t;let l=e.getZoom();l&&l<=(null!=(t=this.block.elements.zoomLevel)?t:8)&&(this.selectedLevel1Id=null,this.setShowSummaryText(!1),this.setReportedCases(""),this.render(this.block.elements.layers,e,this.loadData,this.level2Data))}onHover(e){var t;let l=null==(t=e.features[0])?void 0:t.placeId;if(!l)return void(0,eF.OG)("PlaceId not found for handleHover function!");this.hoveredPlaceId=l,this.map&&this.render(this.block.elements.layers,this.map,this.loadData,this.level2Data)}async onFeatureLevel1Click(e){var t,l,n;let a=null==(t=e.features[0])?void 0:t.placeId;if(!a)return void(0,eF.OG)("PlaceId not found for feature layer 1 click lister!");if(!(null==(l=this.loadData)?void 0:l.success))return;let s=null==(n=this.loadData.data[a])?void 0:n.numberOfCases;if(!s)return void(0,eF.OG)("No cases found for feature layer 1 click lister!");this.setShowLoadingOverlay(!0);let r=await this.fetchLevel2Data(a);this.level2Data=r.success?r.data:{},this.selectedLevel1Id=a,this.selectedLevel2Id=null,this.setShowSummaryText(!0),this.setReportedCases(String(s)),this.zoomToPlace(a,this.isMobile);let i=await this.getGoogleMaps();if(!i)return;let{map:o,geocoder:c}=i;c.geocode({placeId:a}).then(e=>{var t,l;let{results:n}=e,a=this.getCleanAddress(null!=(l=null==(t=n[0])?void 0:t.address_components)?l:[]);this.setLocationName(a||"the selected area")}),this.render(this.block.elements.layers,o,this.loadData,this.level2Data),this.setShowLoadingOverlay(!1)}async onFeatureLevel2Click(e){var t,l,n;let a=null==(t=e.features[0])?void 0:t.placeId;if(!a)return void(0,eF.OG)("PlaceId not found for feature layer 2 click lister!");this.setShowSummaryText(!0),this.setReportedCases(this.level2Data?String(null!=(n=null==(l=this.level2Data[a])?void 0:l.numberOfCases)?n:"0"):"0"),this.selectedLevel2Id=a;let s=await this.getGoogleMaps();if(!s)return;let{map:r,geocoder:i}=s;i.geocode({placeId:a}).then(e=>{var t,l;let{results:n}=e,a=this.getCleanAddress(null!=(l=null==(t=n[0])?void 0:t.address_components)?l:[]);this.setLocationName(a||"the selected area")}),this.render(this.block.elements.layers,r,this.loadData,this.level2Data)}initEventListeners(e){let t=e.getFeatureLayer(google.maps.FeatureType.ADMINISTRATIVE_AREA_LEVEL_1),l=e.getFeatureLayer(google.maps.FeatureType.ADMINISTRATIVE_AREA_LEVEL_2);e.addListener("renderingtype_changed",()=>{this.onRenderTypeChanged(e)}),t.addListener("click",e=>this.onFeatureLevel1Click(e)),l.addListener("click",e=>this.onFeatureLevel2Click(e)),e.addListener("zoom_changed",()=>{this.onZoom(e)});let n=e=>{this.onHover(e)};t.addListener("mousemove",n),l.addListener("mousemove",n)}async renderMap(){var e;let t=await this.getGoogleMaps();if(!t)return;let{map:l,geocoder:n}=t,a=af.safeParse(null==(e=this.block.elements.mapType[0])?void 0:e.codename),s=a.success?a.data:null;this.initEventListeners(l);let r=async(e,t)=>{var a,r,i,o,c,d,m,u,h;let{results:p}=await n.geocode({location:e}),x=p.find(e=>{let{types:l}=e;return l.includes(t)});if(!x)return void(0,eF.OG)("Place not found for ".concat(t," in handleSearch function!"));switch(t){case"administrative_area_level_1":{if(!(null==(a=this.loadData)?void 0:a.success))return;let e=null!=(i=null==(r=this.loadData.data[x.place_id])?void 0:r.numberOfCases)?i:0;this.setShowLoadingOverlay(!0);let t=await this.fetchLevel2Data(x.place_id);if(this.level2Data=t.success?t.data:{},this.selectedLevel1Id=x.place_id,this.setShowSummaryText(!0),this.setReportedCases(String(e)),s===ag){let e=this.zoomToPlace(x.place_id,!!this.isMobile);this.setError(e)}this.setLocationName(this.getCleanAddress(x.address_components)),this.map=l,this.setMapState(l),this.setSearchLocation({lat:x.geometry.location.lat(),lng:x.geometry.location.lng()}),this.setShowLoadingOverlay(!1);break}case"administrative_area_level_2":{if(!(null==(o=this.loadData)?void 0:o.success))return;let e=p.find(e=>{let{types:t}=e;return t.includes("administrative_area_level_1")}),t=p.find(e=>{let{types:t}=e;return t.includes("administrative_area_level_2")}),n=null!=(d=null==(c=this.loadData.data[x.place_id])?void 0:c.numberOfCases)?d:0,a=null!=(u=null!=(m=null==e?void 0:e.place_id)?m:null==t?void 0:t.place_id)?u:null;if(!a)return;this.setShowLoadingOverlay(!0);let r=await this.fetchLevel2Data(a);if(this.level2Data=r.success?r.data:{},this.selectedLevel1Id=a,this.selectedLevel2Id=null!=(h=null==t?void 0:t.place_id)?h:null,this.setShowSummaryText(!0),this.setReportedCases(String(n)),s===ag){let e=this.zoomToPlace(x.place_id,!!this.isMobile);this.setError(e)}this.setLocationName(this.getCleanAddress(x.address_components)),this.map=l,this.setMapState(l),this.setSearchLocation({lat:x.geometry.location.lat(),lng:x.geometry.location.lng()}),this.setShowLoadingOverlay(!1);break}default:{this.selectedLevel1Id=null,this.setShowSummaryText(!1),this.setReportedCases("");let e=this.zoomToPlace(x.place_id,!!this.isMobile);this.setError(e)}}this.render(this.block.elements.layers,l,this.loadData,this.level2Data)};this.setSearchHandler(()=>r),this.render(this.block.elements.layers,l,this.loadData,this.level2Data)}constructor({block:e,isMobile:t,loadData:l,setErrorMessage:n,setError:a,setShowLoadingOverlay:s,setShowSummaryText:r,setReportedCases:i,setLocationName:o,setSearchLocation:c,setSearchHandler:d,mapRef:m,setMapState:u,router:h}){this.hoveredPlaceId=null,this.selectedLevel1Id=null,this.selectedLevel2Id=null,this.DEFAULT_LAYERS=["administrative_layer_1","administrative_layer_2"],this.map=null,this.geocoder=null,this.block=e,this.isMobile=t,this.loadData=l,this.level2Data=null,this.setErrorMessage=n,this.setError=a,this.setShowLoadingOverlay=s,this.setShowSummaryText=r,this.setReportedCases=i,this.setLocationName=o,this.setSearchLocation=c,this.mapRef=m,this.setSearchHandler=
1d,this.setMapState=u,this.router=h}}let aj=e=>{let t=(0,s.useRef)(null),{mapLegend:l,setError:r,isLevel1Fetching:i,isLevel1Loading:o,level1ApiError:c,error:d,setShowLoadingOverlay:m,showLoadingOverlay:u,searchHandler:h,errorMessage:p,theme:x,placeholderText:f}=(e=>{var t,l,n,r,i,o,c,d,m,u;let{block:h,error:p,setError:x,setShowSummaryText:f,setReportedCases:g,setLocationName:v,theme:b,mapRef:y}=e,{layers:j,longitude:w,latitude:N,radius:_,heatmapOpacity:k,zoomLevel:C,errorMessage:S,mapLegend:L,startDate:I,endDate:E,parasiteType:A,countyBorderColor:F,countyBorderWidth:B,stateBorderColor:M,stateBorderWidth:P,mapType:D,singleCaseTitle:R,singleCaseSubtitle:q,multipleCaseTitle:z,multipleCaseSubtitle:O,placeholderText:U}=h.elements,$=(null==(t=j[0])?void 0:t.codename)==="administrative_layer_1"?"administrativeAreaLevel1":null,H=(null==(l=j[0])?void 0:l.codename)==="administrative_layer_2"?"administrativeAreaLevel2":null,V=null!=(i=null!=$?$:H)?i:"administrativeAreaLevel1",[Z,G]=(0,s.useState)(S||"An unexpected error occurred. Please try again later."),[W,K]=(0,s.useState)(!1),[Y,Q]=(0,s.useState)(null),[X,J]=(0,s.useState)(null),[ee,et]=(0,s.useState)(!0),[el,en]=(0,s.useState)([]),ea=(0,s.useRef)(null),[es,er]=(0,s.useState)(void 0),ei=(0,s.useRef)(null),eo=null!=_?_:50,ec=(0,a.useRouter)(),ed=ec.locale?[ec.locale.toLowerCase()]:[],{isMobile:em}=(0,T.l)(),{refetch:eu}=(m={lat:null!=(o=null==X?void 0:X.lat)?o:0,lng:null!=(c=null==X?void 0:X.lng)?c:0,selectedRadius:eo||0,diseases:null!=(d=null==(n=A[0])?void 0:n.codename.toUpperCase())?d:"",startDate:I,endDate:E},(0,eB.useQuery)(["NearbyDiseaseCases",m],am,{refetchOnWindowFocus:!1,cacheTime:9e5})),{isLoading:eh,isFetching:ep,error:ex,data:ef}
1=(u={diseases:[null==(r=A[0])?void 0:r.codename.toUpperCase()],groupBy:V,startDate:null!=I?I:void 0,endDate:null!=E?E:void 0,countryCodes:ed},(0,eB.useQuery)(["DiseaseCasesByPlaceId",u],ad,{refetchOnWindowFocus:!1,cacheTime:9e5})),eg=(0,s.useMemo)(()=>new ay({block:h,isMobile:!!em,loadData:ef,setErrorMessage:G,setError:x,setShowLoadingOverlay:K,setShowSummaryText:f,setReportedCases:g,setLocationName:v,setSearchLocation:J,setSearchHandler:er,mapRef:y,setMapState:Q,router:ec}),[h,em,ef,y,x,v,g,f,ec]),ev=(0,s.useCallback)(e=>{x(eg.zoomToPlace(e,!!em))},[eg,em,x]),eb=(0,s.useRef)(async()=>{let{isError:e,data:t}=await eu();if(e||!t)return;ea.current&&ea.current.setMap(null),el.forEach(e=>e.map=null),en([]);let l=eg.sortCasesByPostCode(t.data.data),n=await eg.createMarker(l,Y,R,q,z,O);0===n.length&&g("0"),en(n);let a=await eg.createNewMarkerCluster(n);a.render(),ea.current=a});return(0,s.useEffect)(()=>{eg.renderMap()},[k,N,ef,w,L,x,v,g,f,C,ev,M,P,F,B,j,eg]),(0,s.useEffect)(()=>{var e,t,l,n;let a=af.safeParse(null!=(t=null==(e=D[0])?void 0:e.codename)?t:""),s=a.success?a.data:null;Y&&X&&s!==ag&&(ei.current&&(ei.current.setMap(null),ei.current=null),eg.renderCircleAndMarkers(X,eb.current,eo,null!=(n=null==(l=D[0])?void 0:l.codename)?n:"",et,ei));let r=ei.current;return()=>{r&&r.setMap(null),ea.current&&ea.current.setMap(null),en([])}},[eg,Y,D,eo,X]),(0,s.useEffect)(()=>{ee||(ei.current&&ei.current.setMap(null),ea.current&&ea.current.setMap(null),el.forEach(e=>e.map=null)),ee&&(ei.current&&ei.current.setMap(Y),ea.current&&ea.current.setMap(Y),el.forEach(e=>e.map=Y))},[Y,el,ee]),{mapLegend:L,setError:x,isLevel1Fetching:ep,isLevel1Loading:eh,level1ApiError:ex,error:p,setShowLoadingOverlay:K,showLoadingOverlay:W,searchHandler:es,errorMessage:Z,theme:b,placeholderText:U}})({...e,mapRef:t});return(0,n.jsxs)("div",{className:"relative","data-kontent-element-codename":"parasite_tracker_map",children:[o||i?(0,n.jsx)("div",{className:"flex h-[350px] w-full animate-pulse items-center justify-center rounded bg-elanco-blue bg-opacity-20 p-5 sm:h-[700px]",children:(0,n.jsx)(eA,{theme:"blue"})}):null,!i&&!o&&(0,n.jsxs)(n.Fragment,{children:[d||c?(0,n.jsx)("div",{className:"absolute bottom-0 left-0 right-0 top-0 z-50 flex justify-center bg-black bg-opacity-50",children:(0,n.jsx)("div",{className:"m-5 flex self-center rounded-md border border-red-500 bg-red-300 p-3",children:(0,n.jsx)("span",{className:"text-s text-center font-semibold",children:p})})}):null,u?(0,n.jsx)(lk,{color:"#ffffff"}):null,(0,n.jsx)("div",{className:"flex justify-center",children:h?(0,n.jsx)(ac,{onError:()=>{r(!0)},onLoading:e=>{m(e)},onSearchApi:h,placeholderText:f||"Search",theme:x}):null}),(0,n.jsx)("div",{className:"h-full min-h-[700px] w-full",id:"parvomap",ref:t}),l[0]?(0,n.jsx)("div",{className:"absolute bottom-5 left-5 z-40 w-80",children:(0,n.jsx)("div",{"data-kontent-element-codename":"parasite_tracker_legend",children:(0,n.jsx)(ai,{legends:l[0].elements.legend.map(e=>{let{elements:{color:t,legendName:l}}=e;return{color:t,legend_name:l}}),subTitle:l[0].elements.subTitle})})}):null]})]})};var aw=l(16349);let aN=e=>{let{onChange:t,id:l,required:a,value:s,label:r}=e;return(0,n.jsxs)("div",{className:"relative",children:[(0,n.jsx)("input",{className:"form-control",id:l,onChange:()=>{t(!s)},required:a,type:"checkbox"}),(0,n.jsx)("label",{htmlFor:l,style:{marginTop:"0",marginBottom:"0"},children:r})]})},a_=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new Date,t=e.getTimezoneOffset(),l=new Date(e.getTime()-60*t*1e3).toISOString().split("T")[0];return l||""},ak=e=>{let{value:t,onChange:l,id:a,required:s}=e;return(0,n.jsx)("div",{className:"relative",children:(0,n.jsx)("input",{className:"form-control",id:a,max:a_(),name:a,onChange:e=>{l(e.target.value)},required:s,type:"date",value:t})})},aC={blowfly:{formSchema:{default:{type:"object",required:["strikeDate","casePostcode","checkbox"],properties:{strikeDate:{type:"string",title:"Your blowfly strike date",format:"date"},casePostcode:{type:"string",title:"Postcode of reported case",pattern:"^([A-Za-z][A-Ha-hJ-Yj-y]?[0-9][A-Za-z0-9]? ?[0-9][A-Za-z]{2}|[Gg][Ii][Rr] ?0[Aa]{2})$"},country:{type:"string",default:""},practiceName:{type:"string",enum:["Prescriber","Farmer","Other"],title:"Are you a prescriber or farmer?"},checkbox:{type:"boolean",title:"Terms and conditions?"}},dependencies:{practiceName:{oneOf:[{properties:{practiceName:{enum:["Other"]},other:{type:"string",title:"Other"}}}]}}},en_gb:{type:"object",required:["strikeDate","casePostcode"],properties:{strikeDate:{type:"string",title:"Your Blowfly Strike Date",format:"date"},casePostcode:{type:"string",title:"Postcode of Reported Case",pattern:"^([A-Za-z][A-Ha-hJ-Yj-y]?[0-9][A-Za-z0-9]? ?[0-9][A-Za-z]{2}|[Gg][Ii][Rr] ?0[Aa]{2})$"},practiceName:{type:"string",enum:["Prescriber","Farmer","Other"],title:"Are you a Prescriber or Farmer?"},country:{type:"string",default:"GB"}},dependencies:{practiceName:{oneOf:[{properties:{practiceName:{enum:["Other"]},other:{type:"string",title:"Other"}}}]}}}},uiSchema:{"ui:rootFieldId":"blowfly","ui:order":["strikeDate","casePostcode","practiceName","other","country"],country:{"ui:widget":"hidden"},casePostcode:{"ui:help":"N.B. Your postcode will not be displayed - the strike will be reported to county level."},description:'<span class="content">I agree for Elanco to use the data I submit for the purpose of populating the Blowfly Strike map, and understand that this data will be used in accordance with Elanco’s <a href="https://www.elancostatements.com/uk/en/privacy/elanco-uk">Privacy Policy</a> and <a href="https://www.elancostatements.com/uk/en/terms-of-use/elanco-uk">Terms and Conditions</a>. Submissions are sent for approval by our team.</span>'}},lungworm_vet:{formSchema:{default:{type:"object",required:["firstName","lastName","practiceName","practicePostcode","emailAddress","country","checkbox","caseDate"],properties:{firstName:{type:"string",title:"First name"},lastName:{type:"string",title:"Last name"},practiceName:{type:"string",title:"Name of practice/business"},country:{type:"string",title:"Country",enum:["United Kingdom","Republic of Ireland"]},practicePostcode:{type:"string",title:"Practice/business postcode",pattern:"^([A-Za-z][A-Ha-hJ-Yj-y]?[0-9][A-Za-z0-9]? ?[0-9][A-Za-z]{2}|[Gg][Ii][Rr] ?0[Aa]{2})$"},telephone:{type:["string","null"],title:"Contact number",pattern:"^(?:0|\\+?44)(?:\\ds?){9,10}$"},emailAddress:{type:"string",title:"Email address",pattern:"^[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+.[a-zA-Z0-9-.]+$"},caseOutcome:{type:"string",title:"Outcome of case",enum:["Full Recovery","Ongoing","Fatal"]},diagnosisConfirmed:{type:"string",title:"Was a diagnosis of lungworm (A.vasorum) confirmed?",enum:["Confirmed","Suspected"]},caseDate:{type:"string",title:"Date of admission",format:"date"},checkbox:{type:"boolean",title:"I understand that Elanco will pass on my details to my vet practice in order to verify my case before it is published on the map."}},dependencies:{country:{oneOf:[{properties:{country:{enum:["United Kingdom"]},practicePostcode:{type:"string",title:"Practice/business postcode",pattern:"^([A-Za-z][A-Ha-hJ-Yj-y]?[0-9][A-Za-z0-9]? ?[0-9][A-Za-z]{2}|[Gg][Ii][Rr] ?0[Aa]{2})$"}}},{properties:{country:{enum:["Republic of Ireland"]},practicePostcode:{type:"string",title:"Practice/business eircode",pattern:"^([AC-FHKNPRTV-Y][0-9]{2}|D6W)[ -]?[0-9AC-FHKNPRTV-Y]{4}$"}}}]}}},en_gb:{type:"object",required:["firstName","lastName","practiceName","practicePostcode","emailAddress","country","caseDate","caseOutcome"],properties:{firstName:{type:"string",title:"First Name"},lastName:{type:"string",title:"Last Name"},practiceName:{type:"string",title:"Name of practice"},country:{type:"string",title:"Country",enum:["United Kingdom","Republic of Ireland"]},practicePostcode:{type:"string",title:"Practice postcode",pattern:"^([A-Za-z][A-Ha-hJ-Yj-y]?[0-9][A-Za-z0-9]? ?[0-9][A-Za-z]{2}|[Gg][Ii][Rr] ?0[Aa]{2})$"},telephone:{type:["string","null"],title:"Contact number",pattern:"^(?:0|\\+?44)(?:\\ds?){9,10}$"},emailAddress:{type:"string",title:"Email address",pattern:"^[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+.[a-zA-Z0-9-.]+$"},caseOutcome:{type:"string",title:"Outcome of case",enum:["Full Recovery","Ongoing","Fatal"]},diagnosisConfirmed:{type:"string",title:"Diagnosis of lungworm (A. vasorum)?",enum:["Confirmed","Suspected"]},caseDate:{type:"string",title:"Date of admission to practice",format:"date"}},dependencies:{country:{oneOf:[{properties:{country:{enum:["United Kingdom"]},practicePostcode:{type:"string",title:"Practice postcode",pattern:"^([A-Za-z][A-Ha-hJ-Yj-y]?[0-9][A-Za-z0-9]? ?[0-9][A-Za-z]{2}|[Gg][Ii][Rr] ?0[Aa]{2})$"}}},{properties:{country:{enum:["Republic of Ireland"]},practicePostcode:{type:"string",title:"Practice eircode",pattern:"^([AC-FHKNPRTV-Y][0-9]{2}|D6W)[ -]?[0-9AC-FHKNPRTV-Y]{4}$"}}}]}}}},uiSchema:{"ui:rootFieldId":"vet","ui:title":"To be completed by vet practice","ui:order":["firstName","lastName","practiceName","country","practicePostcode","telephone","emailAddress","caseOutcome","diagnosisConfirmed","caseDate","checkbox"],description:'For Elanco’s contact details, data protection officer, the purposes and legal basis for our processing of your personal data, and how we use, share, or transfer your personal data, please see our <a href="https://privacy.elanco.com/en-us">Privacy Notice</a>.'}},lungworm_pet:{formSchema:{default:{type:"object",required:["firstName","lastName","emailAddress","petName","caseDate","practiceName","practicePostcode","checkbox"],properties:{firstName:{type:"string",title:"First Name"},lastName:{type:"string",title:"Last Name"},emailAddress:{type:"string",title:"Email address",pattern:"^[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+.[a-zA-Z0-9-.]+$"},petName:{type:"string",title:"Pet Name"},caseDate:{type:"string",title:"Date of case",format:"date"},practiceName:{type:"string",title:"Name of practice/business"},country:{type:"string",title:"Country",enum:["United Kingdom","Republic of Ireland"]},practicePostcode:{type:"string",title:"Practice/business postcode",pattern:"^([A-Za-z][A-Ha-hJ-Yj-y]?[0-9][A-Za-z0-9]? ?[0-9][A-Za-z]{2}|[Gg][Ii][Rr] ?0[Aa]{2})$"},checkbox:{type:"boolean",title:"I understand that Elanco will pass on my details to my vet practice in order to verify my case before it is published on the map."}},dependencies:{country:{oneOf:[{properties:{country:{enum:["United Kingdom"]},practicePostcode:{type:"string",title:"Practice/business postcode",pattern:"^([A-Za-z][A-Ha-hJ-Yj-y]?[0-9][A-Za-z0-9]? ?[0-9][A-Za-z]{2}|[Gg][Ii][Rr] ?0[Aa]{2})$"}}},{properties:{country:{enum:["Republic of Ireland"]},practicePostcode:{type:"string",title:"Practice/business eircode",pattern:"^([AC-FHKNPRTV-Y][0-9]{2}|D6W)[ -]?[0-9AC-FHKNPRTV-Y]{4}$"}}}]}}},en_gb:{type:"object",required:["firstName","lastName","emailAddress","petName","caseDate","practiceName","practicePostcode"],properties:{firstName:{type:"string",title:"First Name"},lastName:{type:"string",title:"Last Name"},emailAddress:{type:"string",title:"Email address",pattern:"^[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+.[a-zA-Z0-9-.]+$"},petName:{type:"string",title:"Pet Name"},caseDate:{type:"string",title:"Date of case",format:"date"},practiceName:{type:"string",title:"Name of practice"},country:{type:"string",title:"Country",enum:["United Kingdom","Republic of Ireland"]},practicePostcode:{type:"string",title:"Practice postcode",pattern:"^([A-Za-z][A-Ha-hJ-Yj-y]?[0-9][A-Za-z0-9]? ?[0-9][A-Za-z]{2}|[Gg][Ii][Rr] ?0[Aa]{2})$"}},dependencies:{country:{oneOf:[{properties:{country:{enum:["United Kingdom"]},practicePostcode:{type:"string",title:"Practice postcode",pattern:"^([A-Za-z][A-Ha-hJ-Yj-y]?[0-9][A-Za-z0-9]? ?[0-9][A-Za-z]{2}|[Gg][Ii][Rr] ?0[Aa]{2})$"}}},{properties:{country:{enum:["Republic of Ireland"]},practicePostcode:{type:"string",title:"Practice eircode",pattern:"^([AC-FHKNPRTV-Y][0-9]{2}|D6W)[ -]?[0-9AC-FHKNPRTV-Y]{4}$"}}}]}}}},uiSchema:{"ui:rootFieldId":"pet","ui:order":["firstName","lastName","emailAddress","petName","caseDate","practiceName","country","practicePostcode","checkbox"],description:'For Elanco’s contact details, data protection officer, the purposes and legal basis for our processing of your personal data, and how we use, share, or transfer your personal data, please see our <a href="https://privacy.elanco.com/en-us">Privacy Notice</a>.'}},find_my_sales_rep:{formSchema:{default:{type:"object",required:["firstName","lastName","emailAddress","postcode","helpWith","query"],properties:{firstName:{type:"string",title:"First Name"},lastName:{type:"string",title:"Last Name"},emailAddress:{type:"string",title:"Email address",pattern:"^[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+.[a-zA-Z0-9-.]+$"},telephone:{type:"string",title:"Contact number",pattern:"^(?:0|\\+?44)(?:\\ds?){9,10}$"},postcode:{type:"string",title:"Postcode",pattern:"^([A-Za-z][A-Ha-hJ-Yj-y]?[0-9][A-Za-z0-9]? ?[0-9][A-Za-z]{2}|[Gg][Ii][Rr] ?0[Aa]{2})$"},species:{type:"string",title:"Species",enum:["Dog","Cat","Rabbit"]},helpWith:{type:"string",title:"I need help with",enum:["Product information","Placing an Order","General Question"]},query:{type:"string",title:"Query"}}},testing:{type:"object",required:["firstName","lastName","emailAddress","postcode","helpWith","query"],properties:{firstName:{type:"string",title:"Test First Name"},lastName:{type:"string",title:"Last Name"},emailAddress:{type:"string",title:"Email address",pattern:"^[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+.[a-zA-Z0-9-.]+$"},telephone:{type:"string",title:"Contact number",pattern:"^(?:0|\\+?44)(?:\\ds?){9,10}$"},postcode:{type:"string",title:"Postcode",pattern:"^([A-Za-z][A-Ha-hJ-Yj-y]?[0-9][A-Za-z0-9]? ?[0-9][A-Za-z]{2}|[Gg][Ii][Rr] ?0[Aa]{2})$"},species:{type:"string",title:"Species",enum:["Dog","Cat","Rabbit"]},helpWith:{type:"string",title:"I need help with",enum:["Product information","Placing an Order","General Question"]},query:{type:"string",title:"Query"}}}},uiSchema:{"ui:rootFieldId":"findMySalesRep",query:{"ui:widget":"textarea","ui:options":{rows:4},"ui:placeholder":"Enter your query here..."}}}
1,ask_an_expert:{formSchema:{default:{type:"object",required:["firstName","lastName","emailAddress","postcode","query"],properties:{firstName:{type:"string",title:"First Name"},lastName:{type:"string",title:"Last Name"},emailAddress:{type:"string",title:"Email address",pattern:"^[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+.[a-zA-Z0-9-.]+$"},telephone:{type:"string",title:"Contact number",pattern:"^(?:0|\\+?44)(?:\\ds?){9,10}$"},postcode:{type:"string",title:"Postcode",pattern:"^([A-Za-z][A-Ha-hJ-Yj-y]?[0-9][A-Za-z0-9]? ?[0-9][A-Za-z]{2}|[Gg][Ii][Rr] ?0[Aa]{2})$"},query:{type:"string",title:"Query"}}}},uiSchema:{"ui:rootFieldId":"askAnExpert",query:{"ui:widget":"textarea","ui:options":{rows:4},"ui:placeholder":"Enter your query here..."}}},parvo_pet:{formSchema:{us:{type:"object",required:["firstName","lastName","emailAddress","caseDate","clinicZipcode","practiceName"],properties:{firstName:{type:"string",title:"First Name"},lastName:{type:"string",title:"Last Name"},emailAddress:{type:"string",title:"Email Address",pattern:"^[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+.[a-zA-Z0-9-.]+$"},caseDate:{type:"string",title:"Date of Case",format:"date"},clinicZipcode:{type:"string",title:"Case Zip Code",pattern:"(^[0-9]{5}$)|(^[0-9]{5}-[0-9]{4}$)"},practiceName:{type:["string"],title:"If you took your dog to the veterinarian, which veterinary clinic?"}}},testing:{type:"object",required:["firstName","lastName","emailAddress","caseDate","clinicZipcode","practiceName"],properties:{firstName:{type:"string",title:"First Name"},lastName:{type:"string",title:"Last Name"},emailAddress:{type:"string",title:"Email Address",pattern:"^[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+.[a-zA-Z0-9-.]+$"},caseDate:{type:"string",title:"Date of Case",format:"date"},clinicZipcode:{type:"string",title:"Case Zip Code",pattern:"(^[0-9]{5}$)|(^[0-9]{5}-[0-9]{4}$)"},practiceName:{type:["string"],title:"If you took your dog to the veterinarian, which veterinary clinic?"}}}},uiSchema:{"ui:rootFieldId":"parvoPet","ui:order":["firstName","lastName","emailAddress","caseDate","clinicZipcode","practiceName"],description:'By clicking “Submit” I agree to Elanco’s <a href="https://www.elancostatements.com/en/terms-of-use/elanco-com">Terms of Use</a>, and acknowledge that Elanco will collect and process my personal information in accordance with Elanco’s <a href="https://privacy.elanco.com/en-us">Privacy Notice</a>.'}},parvo_vet:{formSchema:{us:{type:"object",required:["firstName","lastName","emailAddress","caseDate","clinicZipcode","practiceName"],properties:{firstName:{type:"string",title:"First Name"},lastName:{type:"string",title:"Last Name"},emailAddress:{type:"string",title:"Email Address",pattern:"^[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+.[a-zA-Z0-9-.]+$"},caseDate:{type:"string",title:"Date of Diagnosis",format:"date"},clinicZipcode:{type:"string",title:"Clinic Zip Code",pattern:"(^[0-9]{5}$)|(^[0-9]{5}-[0-9]{4}$)"},practiceName:{type:["string"],title:"Practice Name"}}},testing:{type:"object",required:["firstName","lastName","emailAddress","caseDate","clinicZipcode","practiceName"],properties:{firstName:{type:"string",title:"First Name"},lastName:{type:"string",title:"Last Name"},emailAddress:{type:"string",title:"Email address",pattern:"^[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+.[a-zA-Z0-9-.]+$"},caseDate:{type:"string",title:"Date of Diagnosis",format:"date"},clinicZipcode:{type:"string",title:"Clinic Zip Code",pattern:"(^[0-9]{5}$)|(^[0-9]{5}-[0-9]{4}$)"},practiceName:{type:["string"],title:"Practice Name"}}}},uiSchema:{"ui:rootFieldId":"parvoVet","ui:order":["firstName","lastName","emailAddress","caseDate","clinicZipcode","practiceName"],description:'By clicking “Submit” I agree to Elanco’s <a href="https://www.elancostatements.com/en/terms-of-use/elanco-com">Terms of Use</a>, and acknowledge that Elanco will collect and process my personal information in accordance with Elanco’s <a href="https://privacy.elanco.com/en-us">Privacy Notice</a>.'}},parvo_shelter:{formSchema:{us:{type:"object",required:["firstName","lastName","emailAddress","caseDate","practiceName","clinicZipcode"],properties:{firstName:{type:"string",title:"First Name"},lastName:{type:"string",title:"Last Name"},emailAddress:{type:"string",title:"Email Address",pattern:"^[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+.[a-zA-Z0-9-.]+$"},caseDate:{type:"string",title:"Date of Diagnosis",format:"date"},practiceName:{type:["string"],title:"Shelter Name"},clinicZipcode:{type:"string",title:"Shelter Zip Code",pattern:"(^[0-9]{5}$)|(^[0-9]{5}-[0-9]{4}$)"}}},testing:{type:"object",required:["firstName","lastName","emailAddress","caseDate","practiceName","clinicZipcode"],properties:{firstName:{type:"string",title:"First Name"},lastName:{type:"string",title:"Last Name"},emailAddress:{type:"string",title:"Email address",pattern:"^[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+.[a-zA-Z0-9-.]+$"},caseDate:{type:"string",title:"Date of Diagnosis",format:"date"},practiceName:{type:["string"],title:"Shelter Name"},clinicZipcode:{type:"string",title:"Shelter Zip Code",pattern:"(^[0-9]{5}$)|(^[0-9]{5}-[0-9]{4}$)"}}}},uiSchema:{"ui:rootFieldId":"parvoShelter","ui:order":["firstName","lastName","emailAddress","caseDate","practiceName","clinicZipcode"],description:'By clicking “Submit” I agree to Elanco’s <a href="https://www.elancostatements.com/en/terms-of-use/elanco-com">Terms of Use</a>, and acknowledge that Elanco will collect and process my personal information in accordance with Elanco’s <a href="https://privacy.elanco.com/en-us">Privacy Notice</a>.'}}},aS={blowfly:"/api/disease/blowfly",lungworm_vet:"/api/disease/lungworm/vet",lungworm_pet:"/api/disease/lungworm/pet",parvo_pet:"/api/disease/parvo/pet",parvo_vet:"/api/disease/parvo/vet",parvo_shelter:"/api/disease/parvo/shelter",find_my_sales_rep:"/api/contact/find-my-sales-rep",ask_an_expert
1:"/api/contact/ask-an-expert"},aL=e=>{let{block:t}=e,l=(0,es.As)(),{locale:r="",...i}=(0,a.useRouter)(),[o,c]=(0,s.useState)(""),[d,m]=(0,s.useState)(l.userDetails),[u,h]=(0,s.useState)(!1),p=t.elements.formId,x=aC[p];if(!x)return(0,n.jsx)("div",{children:"Form does not exist"});let f=aS[p],g=x.formSchema[r],{uiSchema:v}=x,y=async e=>{var l,n;h(!0),(0,b.d)({event:"cta_click",cta_name:null==(l=t.elements.submitButton[0])?void 0:l.elements.text,cta_category:"CTA_Button"});let a=t.elements.redirectUrl?$(t.elements.redirectUrl,r):"/".concat(r);try{await (0,eM.L)({url:f,method:"POST",data:{locale:r,formId:p,...e.formData,...(null==(n=t.elements.submitToSendgrid[0])?void 0:n.codename)==="yes"?{toAddress:t.elements.toEmailAddress,fromAddress:t.elements.fromEmailAddress,ccAddress:t.elements.ccEmailAddress,templateId:t.elements.templateId}:{}}}),i.push(a)}catch(l){(0,eF.vV)(l),m(e.formData),c(t.elements.submitFormError),h(!1)}};return(0,n.jsxs)("div",{className:"mx-15 relative flex w-full flex-col justify-center","data-kontent-element-codename":"form_selector",children:[u?(0,n.jsx)("div",{className:"absolute bottom-0 left-0 right-0 top-0 z-50 flex items-center justify-center bg-white bg-opacity-50",children:(0,n.jsx)(l$(),{color:(0,V.K_)("elanco-dark-navy"),height:15,loading:!0,margin:2,radius:2,width:5})}):null,g?(0,n.jsxs)(aw.Ay,{className:"rjsf-form",formData:d,onChange:e=>{m(e.formData)},onSubmit:y,schema:g,showErrorList:!1,transformErrors:e=>e.map(e=>("pattern"===e.name?e.message=t.elements.validationError:"required"===e.name&&(e.message=t.elements.requiredError),e)),uiSchema:v,widgets:{CheckboxWidget:aN,DateWidget:ak},children:[(0,n.jsx)("p",{dangerouslySetInnerHTML:{__html:v.description}}),o?(0,n.jsx)("p",{className:"rjsf-form-error",children:o}):null,t.elements.submitButton.map(e=>{var t,l;return(0,n.jsx)(H.$,{as:"button",className:"mt-6 max-w-xs",type:"submit",variant:null!=(l=null==(t=e.elements.variant[0])?void 0:t.codename)?l:"primary",children:e.elements.text},e.system.id)})]}):null]})},aT=e=>{let{title:t="",subtitle:l="",children:a=null,togglePopup:s}=e;return(0,n.jsx)(lc.FocusTrap,{focusTrapOptions:{delayInitialFocus:!1},children:(0,n.jsx)("div",{className:"fixed left-0 top-0 z-100 flex h-full w-full items-center bg-white-transparent pb-8 pt-16",children:(0,n.jsxs)("div",{className:"container-narrow relative max-h-full overflow-auto rounded-lg bg-white shadow-secondary",children:[(0,n.jsx)(H.$,{as:"button",className:"absolute right-0 top-0 mt-4 block h-10 border-0 bg-white p-3 text-black",icon:P.v.Close,onClick:s,variant:"transparent"}),(0,n.jsxs)("div",{className:"w-full bg-white px-4 py-8 lg:px-10 lg:py-10",children:[(0,n.jsx)("h2",{className:"mb-6",children:t}),(0,n.jsx)("div",{className:"content",children:l}),a]})]})})})},aI=e=>{let{className:t="",title:l="",modalCta:a,secondaryCta:r,textLink:i,summaryText:o="",reportedCases:c,reportedTextAbove:d="",reportedTextBelow:m="",modalTitle:u="",modalSubtitle:h="",theme:p=(0,V.K_)("elanco-mid-blue"),children:x=null}=e,[f,g]=(0,s.useState)(!1),v=(0,s.useRef)(null),y=(0,s.useRef)({}),j=(0,s.useRef)(null);(0,s.useEffect)(()=>{c&&o&&d&&(y.current.cases!==c||y.current.country!==d)&&(y.current={cases:c,country:d},j.current&&clearTimeout(j.current),j.current=setTimeout(()=>{(0,b.d)({event:"reportedCases",reportedCases:c,country:d})},300))},[c,o,d]);let w=()=>{f||(0,b.d)({event:"cta_click",cta_name:null==a?void 0:a.text,cta_category:"CTA_Button"}),g(!f)};return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("aside",{className:t,children:(0,n.jsxs)("div",{className:"flex flex-col",children:[(0,n.jsxs)("div",{className:"flex items-center justify-start space-x-4 p-6",style:{backgroundColor:p},children:[(0,n.jsxs)("svg",{"data-name":"Group 16853",height:"60",id:"Group_16853",viewBox:"0 0 40 60",width:"40",xmlns:"http://www.w3.org/2000/svg",children:[(0,n.jsx)("path",{d:"M20,0A20.082,20.082,0,0,1,40,20.164C40,31.3,20,60,20,60S0,31.3,0,20.164A20.082,20.082,0,0,1,20,0Z","data-name":"Path 11480",fill:"#fff",id:"Path_11480"}),(0,n.jsx)("circle",{cx:"16",cy:"16","data-name":"Ellipse 91498",fill:p,id:"Ellipse_91498",r:"16",transform:"translate(4 4)"})]}),(0,n.jsx)("h3",{className:"text-xl text-white md:text-2xl",children:l})]}),(0,n.jsxs)("div",{className:"flex flex-wrap items-center justify-start p-6 pb-0 md:space-x-4",children:[a?(0,n.jsx)(H.$,{as:"button",className:"mr-4",onClick:w,variant:a.variant.choice,children:a.text}):null,r?(0,n.jsx)(H.$,{as:"a",href:r.url,target:r.openLinkInNewTab.boolean?"_blank":"_self",variant:r.variant.choice,children:r.text}):null,i?(0,n.jsx)(D,{as:"a",className:"ml-0 px-3 py-5 not-italic",href:i.url,target:i.openInNewTab?"_blank":"_self",variant:"secondary",children:i.text}):null]}),(0,n.jsxs)("div",{className:"flex w-full flex-col justify-center space-y-4 p-6 md:p-6",children:[c?(0,n.jsxs)("div",{className:"flex flex-col space-y-2",children:[d?(0,n.jsx)("p",{className:"text-center font-semibold",children:d}):null,(0,n.jsx)("span",{className:"text-center text-7xl",children:(0,n.jsx)("strong",{children:c})}),m?(0,n.jsx)("p",{className:"text-center font-semibold",children:m}):null]}):null,(0,n.jsx)("div",{className:"content w-full",dangerouslySetInnerHTML:{__html:o}})]})]})}),(0,n.jsx)(lm.A,{classNames:"popup",in:f,nodeRef:v,timeout:500,unmountOnExit:!0,children:(0,n.jsx)(aT,{subtitle:h,title:u,togglePopup:w,children:x})})]})},aE=e=>{var t,l,a,s,r,i;let{block:o,radius:c,locationName:d,reportedCases:m,showSummaryText:u,...h}=e,p=o.elements.riskLevelMap,x=(null==p||null==(t=p[0])?void 0:t.codename)==="yes";function f(e){return e.replaceAll("{{location}}",d)}return(0,n.jsx)("div",{children:(0,n.jsx)(aI,{modalCta:o.elements.modalCta[0]?{variant:{choice:null==(l=o.elements.modalCta[0].elements.variant[0])?void 0:l.codename},text:o.elements.modalCta[0].elements.text}:null,reportedCases:(null==(a=o.elements.showDataAs[0])?void 0:a.codename)==="score_text"?(e=>e>=1&&e<5?o.elements.lowScoreText:e>=5&&e<9?o.elements.mediumScoreText:e>=9?o.elements.highScoreText:o.elements.noScoreText)(Number(m)):m,reportedTextAbove:f(o.elements.reportedText1),reportedTextBelow:f(o.elements.reportedText2).replaceAll("{{radius}}",c?c.toString():""),secondaryCta:o.elements.secondaryCta[0]?{url:o.elements.secondaryCta[0].elements.url,openLinkInNewTab:{boolean:(null==(s=o.elements.secondaryCta[0].elements.openLinkInNewTab[0])?void 0:s.codename)==="yes"},variant:{choice:null==(r=o.elements.secondaryCta[0].elements.variant[0])?void 0:r.codename},text:o.elements.secondaryCta[0].elements.text}:null,summaryText:f(u?function(e){if(x){if(0===e)return o.elements.noCasesSummaryText;if(1===e)return o.elements.noneSummaryText;if(2===e)return o.elements.lowSummaryText;if(3===e)return o.elements.mediumSummaryText;if(4===e)return o.elements.highSummaryText}return 0===e?o.elements.noneSummaryText:e<10?o.elements.lowSummaryText:e<25?o.elements.mediumSummaryText:o.elements.highSummaryText}(Number(m)).value:o.elements.defaultSummaryText.value),textLink:o.elements.textLink[0]?{url:o.elements.textLink[0].elements.url,openInNewTab:(null==(i=o.elements.textLink[0].elements.openInNewTab[0])?void 0:i.codename)==="yes",text:o.elements.textLink[0].elements.text}:null,theme:o.elements.themeHexcode||(0,V.K_)("elanco-mid-blue"),title:o.elements.title,children:(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("h2",{className:"mb-5 text-center text-2xl","data-kontent-element-codename":"form_title",children:o.elements.formTitle}),(0,n.jsx)("p",{className:"mb-5 text-center text-sm italic","data-kontent-element-codename":"form_subtitle",children:o.elements.formSubtitle}),o.elements.submissionForm[0]?o.elements.submissionForm.length>1?(0,n.jsx)(tq,{className:"rjsf-form-tabs",name:"ParasiteTrackerSidebar",tabClasses:"rjsf-form-tab flex-grow flex-1",children:o.elements.submissionForm.map(e=>(0,n.jsx)(tz,{hideCloseBtn:!0,title:e.elements.tabTitle,children:(0,n.jsx)(aL,{block:e,...h})},e.system.id))}):(0,n.jsx)(aL,{block:o.elements.submissionForm[0],...h}):null]})})})};var aA=l(76696);function aF(e){return(0,n.jsxs)("select",{className:"mx-2 my-2 lg:w-1/4",onCh
1ange:e.handleChange,value:e.selectedOption,children:[(0,n.jsxs)("option",{value:"",children:["Select ",e.name]}),[...e.options].map(e=>(0,n.jsx)("option",{value:e,children:e},e))]})}let aB=e=>{var t;let{block:l}=e,{locale:s=""}=(0,a.useRouter)(),r=(null==(t=l.elements.openInNewTab[0])?void 0:t.codename)==="yes",i=l.elements.url.startsWith("/"),o=i?"/".concat(s).concat(l.elements.url):l.elements.url;return i?(0,n.jsx)("li",{className:"grid place-items-center rounded-md border border-[#ccc]",children:(0,n.jsx)(B(),{className:"h-full w-full p-6",href:o,children:(0,n.jsx)(aM,{block:l})})}):(0,n.jsx)("li",{className:"grid place-items-center rounded-md border border-[#ccc]",children:r?(0,n.jsx)("a",{className:"h-full w-full p-6",href:o,rel:"noreferrer",target:"_blank",children:(0,n.jsx)(aM,{block:l})}):(0,n.jsx)("a",{className:"h-full w-full p-6",href:o,children:(0,n.jsx)(aM,{block:l})})})},aM=e=>{let{block:t}=e;return(0,n.jsxs)(n.Fragment,{children:[t.elements.icon.map(e=>{var t,l,a;return(0,n.jsx)(S,{className:"mx-auto mb-2 h-8 w-8",noBackground:!0,noBorder:!0,children:(0,n.jsx)(f(),{alt:(null==(t=e.elements.icon[0])?void 0:t.description)||"",className:"h-8 w-8",height:32,loader:v.L,src:null!=(a=null==(l=e.elements.icon[0])?void 0:l.url)?a:"",width:32})},e.system.id)}),(0,n.jsx)("h4",{className:"text-center text-midnight-blue",children:t.elements.primaryText}),t.elements.secondaryText?(0,n.jsx)("p",{className:"text-center text-sm text-[#999]",children:t.elements.secondaryText}):null]})},aP=e=>{let{block:t,eventRegistration:l={},holdRedirectUntilInterestApiFinished:r=!1,campaignInterestSuccess:i=null}=e,[o,c]=(0,s.useState)(!1),[d,m]=(0,s.useState)("loading"),[u,h]=(0,s.useState)(""),p=(0,a.useRouter)(),x=(0,s.useRef)(i),f=(0,s.useRef)(!1);(0,s.useEffect)(()=>{x.current=i},[i]);let g=(0,s.useCallback)(()=>{if(f.current)return;f.current=!0;let e=new URLSearchParams(window.location.search).get("returnUrl");if(e&&"string"==typeof e&&e.startsWith("/"))p.push(e);else if(t.elements.redirectPath.length){var l;if(t.elements.redirectPath.endsWith(".pdf"))return void window.open(t.elements.redirectPath,"_blank");p.push($(t.elements.redirectPath,null!=(l=p.locale)?l:""))}},[p,t]);return(0,s.useEffect)(()=>{i&&r&&g()},[i,r,g]),(0,s.useEffect)(()=>{if(!o)return void function(){let e=document.getElementById("CDC-status");if(e){let t=()=>{"Ready"===e.value&&c(!0)};t(),new MutationObserver(t).observe(e,{attributes:!0})}}();let e={onHide:e=>{(!r||x.current)&&g(),"function"==typeof l.onHide&&l.onHide(e)},onAfterSubmit:e=>{let{response:t,form:n}=e;(0,b.H4)(Object.fromEntries(Object.entries(t).map(e=>{let[t,l]=e;return[t,String(l)]})),n),"function"==typeof l.onAfterSubmit&&Promise.resolve(l.onAfterSubmit(e)).catch(e=>{(0,eF.vV)(e instanceof Error?e:Error(String(e)))})},onAfterScreenLoad:e=>{f.current=!1,h(e.currentScreen),m("ready"),"function"==typeof l.onAfterScreenLoad&&l.onAfterScreenLoad(e)},..."function"==typeof l.onError?{onError:e=>"function"==typeof l.onError?l.onError(e):null}:{},..."function"==typeof l.onBeforeSubmit?{onBeforeSubmit:e=>"function"!=typeof l.onBeforeSubmit||l.onBeforeSubmit(e)}:{},..."function"==typeof l.onSubmit?{onSubmit:e=>"function"==typeof l.onSubmit?l.onSubmit(e):null}:{},..."function"==typeof l.onBeforeScreenLoad?{onBeforeScreenLoad:e=>"function"!=typeof l.onBeforeScreenLoad||l.onBeforeScreenLoad(e)}:{},..."function"==typeof l.onFieldChanged?{onFieldChanged:e=>{"function"==typeof l.onFieldChanged&&l.onFieldChanged(e)}}:{},..."function"==typeof l.onBeforeValidation?{onBeforeValidation:e=>"function"==typeof l.onBeforeValidation?l.onBeforeValidation(e):{}}:{}},n={screenSet:t.elements.screensetId,startScreen:t.elements.screenId,containerID:t.system.id,...e};gigya.accounts.showScreenSet(n)},[o,p]),(0,n.jsx)("div",{"data-cdc-screenset-status":d,"data-cdc-screenset-screen":u,"data-clarity-mask":"true","data-kontent-element-codename":"cdc_gigya",id:t.system.id})},aD=e=>{let{bgColor:t="none",children:l=null,className:a="",containerClassName:s="container-wide"}=e;return(0,n.jsx)("div",{className:(0,i.$)(a,V.TE.get(t),"h-full"),children:(0,n.jsx)("div",{className:(0,i.$)(s,"container"===s&&"px-4 md:px-0","grid auto-cols-auto grid-flow-row auto-rows-min grid-cols-1 place-items-center md:grid-flow-row md:grid-cols-1"),children:l})})};var aR=l(36e3),aq=l(26237),az=l.n(aq);l(29388);var aO=l(27410);let aU=async()=>
1{if(!("permissions"in navigator)||!("geolocation"in navigator))return null;try{let{state:e}=await navigator.permissions.query({name:"geolocation"});if("granted"!==e)return null;return await new Promise(e=>{navigator.geolocation.getCurrentPosition(t=>{let{coords:l}=t;e(l)},()=>{e(null)})})}catch(e){return null}},a$=e=>{let{className:t,countries:l=[],setSearchLocation:a,label:r,placeholderText:i,currentLocationText:o,isMapLoaded:c,setShowLoadingOverlay:d,setLocationState:m,showLocationPrompt:u=!1,setSearchLocationLatLong:h,searchLocationLatLong:p,enableSearch:x,permission:f}=e,[g,v]=(0,s.useState)(p.searchName||""),y=(0,s.useRef)(null),j=(0,s.useCallback)(e=>{var t,l;a({lat:e.latitude,lng:e.longitude}),h({searchName:"",lat:e.latitude,lng:e.longitude}),t=e.latitude,l=e.longitude,c&&new window.google.maps.Geocoder().geocode({location:{lat:t,lng:l}}).then(e=>{e.results[0]?v(e.results[0].formatted_address):nC({message:"No results found",type:"error"})}).catch(e=>{nC({message:"Geocoder failed due to: ".concat(e.message),type:"error"})}),null==d||d(!1)},[a,h,c,d]),w=(0,s.useCallback)(()=>{null==d||d(!0),navigator.geolocation.getCurrentPosition(e=>{let{coords:t}=e;j(t),m({permission:"granted",enableSearch:!0})},e=>{console.error(e),null==d||d(!1),m({enableSearch:x,permission:"denied"})}),(0,b.d)({event:"finder_usage",finder_interaction:"Auto-search",finder_url:window.location.href})},[j,m,d,x]);return(0,s.useEffect)(()=>{let e;return navigator.permissions.query({name:"geolocation"}).then(t=>{e=t,m({enableSearch:x,permission:t.state}),"prompt"===t.state&&navigator.geolocation.getCurrentPosition(e=>{console.log("Geolocation success:",e),w()},e=>{console.warn("Geolocation error:",e)}),e.onchange=()=>{m({enableSearch:x,permission:e.state}),"granted"===e.state&&w()}}).catch(e=>{console.error("Error checking geolocation permission:",e)}),()=>{e.onchange=null}},[w,m,u,c,x]),(0,s.useEffect)(()=>{c&&aU().then(e=>{e&&(null==d||d(!0),j(e))})},[c,j,d]),(0,n.jsx)("div",{className:"flex items-center justify-center md:w-1/2 md:justify-start ".concat(t),children:(0,n.jsxs)("div",{className:"flex w-full flex-col md:max-w-lg",children:[(0,n.jsx)("label",{className:"mb-2 text-xs font-bold text-gray-500",htmlFor:"search",children:r}),(0,n.jsxs)("div",{className:"flex flex-col items-center space-x-2 md:mb-4 md:flex-row",children:[(0,n.jsx)("input",{className:"mb-0 w-full border-elanco-blue p-5 text-sm placeholder-black md:w-3/5","data-clarity-mask":"true",id:"search",name:"search",onChange:e=>{(e=>{let t=new window.google.maps.places.Autocomplete(y.current,{types:["geocode"],componentRestrictions:{country:l}});v(e),t.setFields(["formatted_address","geometry","name"]),t.addListener("place_changed",()=>{var e;let l=t.getPlace();if(!(null==(e=l.geometry)?void 0:e.location))return void console.error("No details available for input: '".concat(l.name,"'"));let n=l.formatted_address||"";a({lat:l.geometry.location.lat(),lng:l.geometry.location.lng()}),v(n||""),h({searchName:n,lat:l.geometry.location.lat(),lng:l.geometry.location.lng()}),m({permission:f,enableSearch:!0}),(0,b.d)({event:"finder_usage",finder_interaction:"Search",finder_url:window.location.href})})})(e.target.value)},placeholder:i,ref:y,value:g}),(0,n.jsx)(D,{as:"a",className:"mt-3 w-full not-italic md:mt-0 md:w-2/5",icon:P.v.
1Location,onClick:w,children:(0,n.jsx)("span",{children:o})})]})]})})};var aH=l(54970),aV=l.n(aH);let aZ=e=>{let{resetText:t="Reset Filters",buttonText:l="All Filters",filterOptions:a,businessFilterTitle:r="Filter By Business Type",tagsFilterTitle:i="Filter By Product",setFilterData:o}=e,[c,d]=(0,s.useState)(!1),[m,u]=(0,s.useState)(a);(0,s.useEffect)(()=>{let{businessTypes:e,tags:t}=m;o({businessTypeIds:e.filter(e=>e.preselected_filter).filter(e=>e.type_id.choice).map(e=>e.type_id.choice),tagIds:t.filter(e=>e.preselected_filter.boolean).map(e=>e.pal_id)})},[m,o]);let h=()=>{u(a),(0,b.d)({event:"finder_usage",finder_interaction:"Filter Cleared",finder_url:window.location.href})};return(0,n.jsxs)("div",{className:"flex flex-col items-center pb-4 text-xs md:flex-row md:space-x-4",children:[(0,n.jsx)("div",{className:"mr-4",children:(0,n.jsx)(D,{className:"hidden not-italic text-black md:block",onClick:h,children:t})}),(0,n.jsxs)("div",{className:"relative w-full",children:[(0,n.jsxs)("div",{className:"flex w-full min-w-[280px] items-center justify-between rounded border border-elanco-blue bg-gray-200 px-5 py-[14px] text-left text-sm font-semibold placeholder-black",onClick:()=>{d(!c)},role:"presentation",children:[l,(0,n.jsx)(w,{icon:P.v.ChevronDown,noIconAnimation:!0,size:"sm"})]}),c?(0,n.jsxs)("div",{className:"absolute z-10 max-h-96 w-full overflow-auto rounded-md bg-white px-5 py-4 shadow-[0_10px_15px_-3px_rgb(0_0_0_/_10%),_0_4px_6px_-4px_rgb(0_0_0_/_10%)]",children:[m.businessTypes.length>1&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("h2",{className:"text-sm",children:r}),(0,n.jsx)("ul",{className:"mb-4",children:m.businessTypes.filter(e=>e.type_id.choice&&e.type_id.choice.length>0).map(e=>{let{imageURL:t,description:l}=(e=>{let t="",l="";if(e.icons&&e.icons.length>0){let i=e.icons[0];if((null==i?void 0:i.elements.icon)&&i.elements.icon.length>0){var n,a,s,r;t=null!=(s=null==(n=i.elements.icon[0])?void 0:n.url)?s:"",l=null!=(r=null==(a=i.elements.icon[0])?void 0:a.description)?r:""}}return{imageURL:t,description:l}})(e),a=e.display_name||"";return(0,n.jsxs)("li",{children:[(0,n.jsx)("input",{checked:e.preselected_filter,className:aV().input,id:"".concat(a.trim(),"-").concat(e.type_id.choice),name:a,onChange:t=>{((e,t)=>{let{businessTypes:l=[]}=m;u({...m,businessTypes:[...l.map(l=>l.type_id.choice===e.type_id.choice?{...l,preselected_filter:t}:l)]}),(0,b.d)({event:"finder_usage",finder_interaction:t?"Filter Selected-Business Type":"Filter Cleared",finder_url:window.location.href})})(e,t.target.checked)},type:"checkbox"}),(0,n.jsxs)("label",{className:"my-2 text-black",htmlFor:"".concat(a.trim(),"-").concat(e.type_id.choice),children:[t?(0,n.jsx)(S,{className:"h-10 w-6 justify-center",noBorder:!0,noShadow:!0,size:"xxs",children:(0,n.jsx)(f(),{alt:l,height:30,loader:v.L,src:t,width:24})}):null,(0,n.jsx)("span",{children:a})]})]},e.type_id.choice)})})]}),m.tags.length>1&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("h2",{className:"text-sm",children:i}),(0,n.jsx)("ul",{className:"mb-4",children:m.tags.filter(e=>e.pal_id&&e.pal_id.length>0).map(e=>{let t=e.display_name||"";return(0,n.jsxs)("li",{children:[(0,n.jsx)("input",{checked:e.preselected_filter.boolean,className:aV().input,id:"".concat(t.trim(),"-").concat(e.pal_id),name:t,onChange:t=>{((e,t)=>{let{tags:l=[]}=m;u({...m,tags:[...l.map(l=>l.pal_id===e.pal_id?{...l,preselected_filter:{boolean:t}}:l)]}),(0,b.d)({event:"finder_usage",finder_interaction:t?"Filter Selected-Product":"Filter Cleared",finder_url:window.location.href})})(e,t.target.checked)},type:"checkbox"}),(0,n.jsx)("label",{className:"my-2 text-black",htmlFor:"".concat(t.trim(),"-").concat(e.pal_id),children:(0,n.jsx)("span",{children:t})})]},e.pal_id)})})]}),(0,n.jsxs)("div",{className:"flex items-center justify-between",children:[(0,n.jsx)(D,{className:"not-italic text-black",onClick:h,children:t}),(0,n.jsx)(w,{icon:P.v.Close,noIconAnimation:!0,onClick:()=>{d(!1)},size:"sm"})]})]}):null]})]})};var aG=l(74084);let aW=(0,V.K_)("locator-blue"),aK={strokeColor:aW,strokeOpacity:.8,strokeWeight:2,fillColor:aW,fillOpacity:.1,clickable:!1,draggable:!1,editable:!1,visible:!0,radius:3e3,zIndex:1},aY=e=>{var t,l;let{initialZoom:a,minZoom:r,maxZoom:i,onLoad:o,onClick:c,containerStyle:d,containerClassName:m,children:u,radiu
1s:h,searchAreaAccentColour:p,searchAreaOpacity:x,searchLocation:f,showCircle:g}=e,v=(0,s.useRef)(null);return(0,n.jsxs)(lN.u6,{center:{lat:null!=(t=null==f?void 0:f.lat)?t:0,lng:null!=(l=null==f?void 0:f.lng)?l:0},mapContainerClassName:m,mapContainerStyle:d,onClick:c,onLoad:e=>{v.current=e,o(e)},options:{minZoom:r,maxZoom:i,disableDefaultUI:!0,zoomControl:!0},zoom:a,children:[f&&g?(0,n.jsx)(lN.jl,{center:{lat:f.lat,lng:f.lng},options:{...aK,strokeColor:p,fillColor:p,fillOpacity:x||.1,radius:1609.34*h}}):null,u]})},aQ=e=>{let{address:t="",directions:l,name:a="",phone:s,websiteUrl:r}=e,{lat:i,lng:o,searchLocation:c,text:d}=l;return(0,n.jsxs)("div",{className:"mx-2 my-4 max-w-xs",children:[a?(0,n.jsx)("p",{className:"text-sm font-bold","data-clarity-mask":"true",children:a}):null,t?t.split("\n").map(e=>(0,n.jsx)("p",{className:"text-sm","data-clarity-mask":"true",children:e},e)):null,s?(0,n.jsxs)("div",{className:"mt-5 flex","data-clarity-mask":"true",children:[(0,n.jsx)(w,{className:"flex-none",href:"tel:".concat(s),icon:P.v.Contact,noIconAnimation:!0,size:"sm"}),(0,n.jsx)("a",{className:"ml-2 self-center truncate text-sm hover:underline",href:"tel:".concat(s),children:s})]}):null,r?(0,n.jsxs)("div",{className:"mt-5 flex",children:[(0,n.jsx)(w,{className:"flex-none",href:r.startsWith("http")?r:"https://".concat(r),icon:P.v.Globe,noIconAnimation:!0,size:"sm",target:"_blank"}),(0,n.jsx)("a",{className:"ml-2 self-center truncate text-sm hover:underline",href:r.startsWith("http")?r:"https://".concat(r),rel:"noreferrer",target:"_blank",children:r})]}):null,d?(0,n.jsx)("a",{className:"text-btn get-directions mt-5 block cursor-pointer whitespace-nowrap text-sm font-bold not-italic text-black underline hover:no-underline focus:text-secondary focus:no-underline focus:outline-none","data-clarity-mask":"true",href:c?"https://www.google.com/maps/dir/?api=1&origin=".concat(c.lat,",").concat(c.lng,"&destination=").concat(i,",").concat(o):"https://www.google.com/maps/search/?api=1&query=".concat(i,",").concat(o),rel:"noreferrer",target:"_blank",children:d}):null]})},aX=e=>{let{markers:t=[],title:l,description:a,isLoaded:r,defaultBounds:i,searchLocation:o,directionsText:c,enterLocationPrompt:d,radius:m,searchAreaAccentColour:u,searchAreaOpacity:h}=e,[p,x]=(0,s.useState)(null),[f,g]=(0,s.useState)(null),v=(0,s.useRef)([]),y=(0,s.useRef)(null),j=(0,s.useRef)(null),w=(0,s.useRef)(null),N=(0,s.useCallback)(()=>{let e;w.current=new window.google.maps.InfoWindow;let l=()=>{(0,b.d)({event:"finder_usage",finder_interaction:"Location Selected",finder_url:window.location.href})};w.current.addListener("closeclick",()=>{e.forEach(e=>{e.removeEventListener("click",l)}),g(null)}),t.forEach(t=>{let a=new window.google.maps.Marker({position:{lat:t.lat||0,lng:t.lng||0},map:p,icon:t.image});a.addListener("click",()=>{var s,r;g(t),null==(s=w.current)||s.setContent((0,aG.F0)((0,n.jsx)(aQ,{address:t.address,directions:{text:c,searchLocation:o,lat:t.lat,lng:t.lng},name:t.name,phone:t.accountPhone,websiteUrl:t.websiteUrl}))),null==(r=w.current)||r.open({anchor:a,map:p,shouldFocus:!0}),(0,b.d)({event:"finder_usage",finder_interaction:"Marker Click",finder_url:window.location.href}),w.current&&google.maps.event.addListener(w.current,"domready",()=>{(e=document.querySelectorAll(".get-directions")).forEach(e=>{e.addEventListener("click",l)})})}),v.current.push(a)}),j.current=new lN.yK.MarkerClusterer({map:p,markers:v.current,renderer:{render:e=>{let t=window.btoa('\n			<svg xmlns="http://www.w3.org/2000/svg" width="46" height="46" viewBox="0 0 46 46">\n			<g id="Group_16843" data-name="Group 16843" transform="translate(-1462 -312)">\n				<g id="Ellipse_91499" data-name="Ellipse 91499" transform="translate(1464 314)" fill="#fff" stroke="'.concat((0,V.K_)("elanco-mid-blue"),'" stroke-width="2">\n					<circle cx="21" cy="21" r="21" stroke="none"/>\n					<circle cx="21" cy="21" r="22" fill="none"/>\n				</g>\n			</g>\n		</svg>'));return new window.google.maps.Marker({icon:{url:"data:image/svg+xml;base64,".concat(t),scaledSize:new window.google.maps.Size(40,40)},label:{text:String(e.count),color:"black",fontSize:"12px",fontWeight:"700"},position:e.position,zIndex:Number(window.google.maps.Marker.MAX_ZINDEX)+e.count})}}}),j.current.render(),p&&window.google.maps.event.addListener(p,"zoom_changed",()=>{var e;null==(e=w.current)||e.close(),g(null)})},[p,t,c,o]),_=(0,s.useCallback)(()=>{let e=window.btoa('\n		<svg xmlns="http://www.w3.org/2000/svg" width="46" height="46" viewBox="0 0 46 46">\n		<g id="Group_16843" data-name="Group 16843" transform="translate(-1462 -312)">\n		<g id="Ellipse_91499" data-name="Ellipse 91499" transform="translate(1464 314)" fill="'.concat((0,V.K_)("elanco-mid-blue"),'" stroke="#fff" stroke-width="3">\n		<circle cx="21" cy="21" r="21" stroke="none"/>\n		<circle cx="21" cy="21" r="22" fill="none"/>\n		</g>\n		</g>\n		</svg>'));
1o&&(y.current=new window.google.maps.Marker({position:{lat:o.lat,lng:o.lng},map:p,icon:{url:"data:image/svg+xml;base64,".concat(e),scaledSize:new window.google.maps.Size(25,25),labelOrigin:new window.google.maps.Point(25,16)}}))},[p,o]),k=(0,s.useCallback)(()=>{if(!o||t.length<1)return;_();let e=[new window.google.maps.LatLng(o.lat,o.lng),...t.map(e=>({accountClassification:e.accountClassification,lat:e.lat,lng:e.lng,distance:((e,t,l,n)=>{let a=Math.PI*e/180,s=Math.PI*l/180,r=Math.sin(a)*Math.sin(s)+Math.cos(a)*Math.cos(s)*Math.cos(Math.PI*(t-n)/180);return 60*(r=180*(r=Math.acos(r))/Math.PI)*1.1515})(o.lat,o.lng,e.lat||0,e.lng||0)})).sort((e,t)=>e.distance-t.distance).slice(0,3).map(e=>new window.google.maps.LatLng(e.lat||0,e.lng||0))],l=new window.google.maps.LatLngBounds;e.forEach(e=>l.extend(e)),p&&(p.setCenter(l.getCenter()),p.panToBounds(l),p.fitBounds(l)),l=new window.google.maps.LatLngBounds(null)},[p,t,o,_]);(0,s.useEffect)(()=>(p&&((null==o?void 0:o.lat)!==0&&(null==o?void 0:o.lng)!==0?(p.setCenter({lat:(null==o?void 0:o.lat)||0,lng:(null==o?void 0:o.lng)||0}),p.setZoom(8)):p.fitBounds(i)),r&&p&&t.length>0&&(N(),k()),()=>{v.current.length>0&&(v.current.forEach(e=>{e.setMap(null)}),v.current=[]),j.current&&j.current.clearMarkers(),w.current&&w.current.close(),y.current&&y.current.setMap(null)}),[p,t,o,i,r,N,k]);let C=(0,s.useCallback)(e=>{e.fitBounds(i),x(e)},[i]);return(0,n.jsxs)("div",{className:"flex flex-col bg-gray-100 md:flex-row",children:[(0,n.jsxs)("div",{className:"w-full px-4 py-8 md:m-0 md:w-2/5 lg:w-[30%]",children:[(0,n.jsx)("h2",{className:"mx-2",children:l}),f?(0,n.jsx)(aQ,{address:f.address,directions:{text:c,searchLocation:o,lat:f.lat,lng:f.lng},name:f.name,phone:f.accountPhone,websiteUrl:f.websiteUrl}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("p",{className:"mx-2 mr-2 mt-4 text-sm leading-relaxed",children:a}),d?(0,n.jsx)("div",{className:"mx-2 mr-2 mt-4 text-sm leading-relaxed",dangerouslySetInnerHTML:{__html:d}}):null]})]}),(0,n.jsxs)("div",{className:"relative mx-auto h-[460px] w-full overflow-hidden shadow-primary md:mx-0 md:mb-0 md:h-[700px] md:w-[700px] md:rounded-none md:shadow-none lg:w-[70%]",children:[!r&&(0,n.jsx)(lk,{color:"#fff"}),r?(0,n.jsx)(aY,{containerClassName:"w-full h-full",initialZoom:8,maxZoom:0,onClick:()=>{(0,b.d)({event:"finder_usage",finder_interaction:"Map Click",finder_url:window.location.href})},onLoad:C,radius:m,searchAreaAccentColour:u,searchAreaOpacity:h,searchLocation:o,showCircle:t.length>0}):null]})]})},aJ=["geometry","places"],a0=e=>{var t;let{className:l="",markers:a=[],title:r,description:i,defaultSouthBound:o,defaultWestBound:c,defaultNorthBound:d,defaultEastBound:m,apiKey:u,businessTypes:h=[],tags:p=[],currentLocationText:x="Search by current location",placeholderText:f="Enter your town or postcode",label:g="Your location",countries:v=[],businessFilterTitle:b,tagsFilterTitle:y,filterButtonText:j,filterResetText:w,directionsText:N,enterLocationPrompt:_,setLocationState:k,searchLocationLatLong:C,setSearchLocationLatLong:S,enableSearch:L,permission:T,radius:I,searchAreaAccentColour:E,searchAreaOpacity:A}=e,[F,B]=(0,s.useState)(a),[M,P]=(0,s.useState)({businessTypeIds:[],tagIds:[]}),[D,R]=(0,s.useState)({searchName:"",lat:0,lng:0}),q=h.length>1||p.length>1,{isLoaded:z}=(0,lN.KD)({googleMapsApiKey:u,libraries:aJ});return(0,s.useEffect)(()=>{let{businessTypeIds:e,tagIds:t}=M,l=[];0===e.length&&0===t.length?l=a:e.length&&t.length?l=a.filter(l=>{var n,a;return e.includes(null!=(a=l.accountClassification)?a:"")&&(null==(n=l.tags)?void 0:n.length)&&l.tags.find(e=>t.includes(e))}):0===e.length&&t.length?l=a.filter(e=>{var l;return(null==(l=e.tags)?void 0:l.length)&&e.tags.find(e=>t.includes(e))}):e.length&&0===t.length&&(l=a.filter(t=>{var l;return e.includes(null!=(l=t.accountClassification)?l:"")})),0===l.length&&(l=a),B(l)},[M,a]),(0,n.jsxs)("div",{className:"".concat(l," flex-col md:justify-center"),children:[(0,n.jsxs)("div",{className:"flex flex-col justify-between space-y-4 p-4 md:flex-row md:items-end md:space-y-0 md:p-0",children:[(0,n.jsx)(a$,{className:l,countries:v,currentLocationText:x,enableSearch:L,isMapLoaded:z,label:g,permission:T,placeholderText:f,searchLocationLatLong:C,setLocationState:k,setSearchLocation:R,setSearchLocationLatLong:S}),q?(0,n.jsx)(aZ,{businessFilterTitle:null!=b?b:"",buttonText:null!=j?j:"",filterOptions:{businessTypes:h,tags:p},resetText:null!=w?w:"",setFilterData:P,tagsFilterTitle:null!=y?y:""}):null]}),(0,n.jsx)("div",{className:"relative",children:(0,n.jsx)(aX,{defaultBounds:{south:o||0,west:c||0,north:d||0,east:m||0}
1,description:null!=i?i:"",directionsText:null!=N?N:"",enterLocationPrompt:(null==(t=C.searchName)?void 0:t.length)?"":_,isLoaded:z,markers:F,radius:I,searchAreaAccentColour:E,searchAreaOpacity:A,searchLocation:D,title:null!=r?r:""})})]})},a1=async e=>{let[,t]=e.queryKey,{tagIdsString:l,typeIdsString:n,lat:a,lon:s,radius:r}=t,i=0,o=!0,c=[];for(;o;){let{data:e}=await (0,eM.L)("/api/find-a-business?tagIdsString=".concat(l,"&typeIdsString=").concat(encodeURIComponent(n),"&limit=").concat(1e4,"&offset=").concat(i,"&lat=").concat(a,"&lon=").concat(s,"&radius=").concat(r),{timeout:18e4});c.push(...e.activeMarkers),i+=1e4,o=e.hasNextPage}return c},a2=new Map(Object.entries({agricultural_merchant___farm_store:"Agricultural Merchant / Farm Store",allied_industry:"Allied Industry",animal_health_advisory_service:"Animal Health Advisory Service",animal_shelter___charity:"Animal Shelter / Charity",aqua_breeding_company:"Aqua Breeding Company",aquaculture_company:"Aquaculture Company",backgrounder_lot:"Backgrounder Lot",beef_producer:"Beef Producer",brick:"Brick",broilers:"Broilers",buying_group:"Buying Group",calf_production:"Calf Production",calf_ranch___developer:"Calf Ranch / Developer",cattle_buyer:"Cattle Buyer",co_operative:"Co Operative",competitor:"Competitor",consulting_services:"Consulting Services",contract_grower:"Contract Grower",contract_research_organization:"Contract Research Organization",corporate_office:"Corporate Office",cow___calf_operation:"Cow / Calf Operation",custom_applicator:"Custom Applicator",dairy_production:"Dairy Production",diagnostic___laboratory_svcs:"Diagnostic / Laboratory Svcs",disinfection_company:"Disinfection Company",distributor___agent:"Distributor / Agent",feed_mill:"Feed Mill",feedyard:"Feedyard",financial_institution:"Financial Institution",fish_health_services:"Fish Health Services",grower___growyard:"Grower / Growyard",hatchery:"Hatchery",heifer_production:"Heifer Production",human_medical:"Human Medical",industry_group:"Industry Group",internal_employee:"Internal Employee",layer_integration:"Layer Integration",layers:"Layers",live_exporter:"Live Exporter",marine_site:"Marine Site",media:"Media",milk_cooperative___buyer:"Milk Cooperative / Buyer",mixed___other_producer:"Mixed / Other Producer",nutrient_supplier:"Nutrient Supplier",online:"Online",organization_vod:"Organization_vod",packer___processor:"Packer / Processor",pastoral_company:"Pastoral Company",pet_retail_outlet:"Pet Retail Outlet",pet_retail_outlet___brick___mortar:"Pet Retail Outlet - Brick & Mortar",pet_retail_outlet___e_commerce:"Pet Retail Outlet - E-Commerce",pet_retail_outlet___food_drug_mass:"Pet Retail Outlet - Food Drug Mass",pharmacy:"Pharmacy",poultry_breeder:"Poultry Breeder",poultry_integrator:"Poultry Integrator",publishing_house:"Publishing House",restaurant___food_svcs:"Restaurant / Food Svcs",satellite_office:"Satellite Office",sheep_producer:"Sheep Producer",specialty:"Specialty",stocker_operation:"Stocker Operation",stockyard___salebarn:"Stockyard / Salebarn",swine_producer:"Swine Producer",turkeys:"Turkeys",university___education:"University / Education",vaccination_company:"Vaccination Company",veterinary_practice:"Veterinary Practice",wholesaler___retailer:"Wholesaler / Retailer",wool_buyer:"Wool Buyer"})),a4={afghanistan:"AF",åland_islands:"AX",albania:"AL",algeria:"DZ",american_samoa:"AS",andorra:"AD",angola:"AO",anguilla:"AI",antarctica:"AQ",antigua_and_barbuda:"AG",argentina:"AR",armenia:"AM",aruba:"AW",australia:"AU",austria:"AT",azerbaijan:"AZ",bahrain:"BH",bahamas:"BS",bangladesh:"BD",barbados:"BB",belarus:"BY",belgium:"BE",belize:"BZ",benin:"BJ",bermuda:"BM",bhutan:"BT",bolivia:"BO",bonaire:"BES",bosnia_and_herzegovina:"BA",botswana:"BW",bouvet_island:"BV",brazil:"BR",british_indian_ocean_territory:"IO",brunei_darussalam:"BN",bulgaria:"BG",burkina_faso:"BF",burundi:"BI",cambodia:"KH",cameroon:"CM",canada:"CA",cape_verde:"CV",cayman_islands:"KY",central_african_republic:"CF",chad:"TD",chile:"CL",china:"CN",christmas_island:"CX",colombia:"CO",comoros:"KM",congo:"CG",republic_of_congo:"CD",cook_islands:"CK",costa_rica:"CR","c\xf4te_d'ivoire":"CI",croatia:"HR",cuba:"CU",curaçao:"CW",cyprus:"CY",czech_republic:"CZ",de
1nmark:"DK",djibouti:"DJ",dominica:"DM",dominican_republic:"DO",ecuador:"EC",egypt:"EG",el_salvador:"SV",equatorial_guinea:"GQ",eritrea:"ER",estonia:"EE",ethiopia:"ET",falkland_islands:"FK",faroe_islands:"FO",fiji:"FJ",finland:"FI",france:"FR",french_guiana:"GF",french_polynesia:"PF",french_southern_territories:"TF",gabon:"GA",gambia:"GM",georgia:"GE",germany:"DE",ghana:"GH",gibraltar:"GI",greece:"GR",greenland:"GL",grenada:"GD",guadeloupe:"GP",guam:"GU",guatemala:"GT",guernsey:"GG",guinea:"GN",guinea_bissau:"GW",guyana:"GY",haiti:"HT",heard_island_and_mcdonald_islands:"HM",holy_see:"VA",honduras:"HN",hong_kong:"HK",hungary:"HU",iceland:"IS",india:"IN",indonesia:"ID",iran:"IR",iraq:"IQ",ireland:"IE",isle_of_man:"IM",israel:"IL",italy:"IT",jamaica:"JM",japan:"JP",jersey:"JE",jordan:"JO",kazakhstan:"KZ",kenya:"KE",kiribati:"KI",north_korea:"KP",south_korea:"KR",kuwait:"KW",kyrgyzstan:"KG",lao:"LA",latvia:"LV",lebanon:"LB",lesotho:"LS",liberia:"LR",libya:"LY",liechtenstein:"LI",lithuania:"LT",luxembourg:"LU",macao:"MO",macedonia:"",madagascar:"MG",malawi:"MW",malaysia:"MY",maldives:"MV",mali:"ML",malta:"MT",marshall_islands:"MH",martinique:"MQ",mauritania:"MR",mauritius:"MU",mayotte:"YT",mexico:"MX",micronesia:"FM",moldova:"MD",monaco:"MC",mongolia:"MN",montenegro:"ME",montserrat:"MS",morocco:"MA",mozambique:"MZ",myanmar:"MM",namibia:"NA",nauru:"NR",nepal:"NP",netherlands:"NL",new_caledonia:"NC",new_zealand:"NZ",nicaragua:"NI",niger:"NE",nigeria:"NG",niue:"NU",norfolk_island:"NF",northern_mariana_islands:"MP",norway:"NO",oman:"OM",pakistan:"PK",palau:"PW",palestine:"PS",panama:"PA",papua_new_guinea:"PG",paraguay:"PY",peru:"PE",philippines:"PH",pitcairn:"PN",poland:"PL",portugal:"PT",puerto_rico:"PR",qatar:"QA",réunion:"RE",romania:"RO",russian_federation:"RU",rwanda:"RW",saint_barthélemy:"BL",saint_helena_ascension_and_tristan_da_cunha:"SH",saint_kitts_and_nevis:"KN",saint_lucia:"LC",saint_martin:"MF",saint_pierre_and_miquelon:"PM",saint_vincent_and_the_grenadines:"VC",samoa:"WS",san_marino:"SM",sao_tome_and_principe:"ST",saudi_arabia:"SA",senegal:"SN",serbia:"RS",seychelles:"SC",sierra_leone:"SL",singapore:"SG",sint_maarten:"MF",slovakia:"SK",slovenia:"SI",solomon_islands:"SB",somalia:"SO",south_africa:"ZA",south_georgia_and_the_south_sandwich_islands:"GS",south_sudan:"SS",spain:"ES",sri_lanka:"LK",sudan:"SD",suriname:"SR",svalbard_and_jan_mayen:"SJ",swaziland:"",sweden:"SE",switzerland:"CH",syrian_arab_republic:"SY",taiwan:"TW",tajikistan:"TJ",tanzania:"TZ",thailand:"TH",timor_leste:"TL",togo:"TG",tokelau:"TK",tonga:"TO",trinidad_and_tobago:"TT",tunisia:"TN",turkey:"TR",turkmenistan:"TM",turks_and_caicos_islands:"TC",tuvalu:"TV",uganda:"UG",ukraine:"UA",united_arab_emirates:"AE",united_kingdom:"GB",united_states:"US",united_states_minor_outlying_islands:"UM",uruguay:"UY",uzbekistan:"UZ",vanuatu:"VU",venezuela:"VE",vietnam:"VN",virgin_islands_british:"VG",virgin_islands_us:"VI",wallis_and_futuna:"WF",western_sahara:"EH",yemen:"YE",zambia:"ZM",zimbabwe:"ZW"};function a6(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document;return t.querySelector(e)}function a3(e,t){null!==e&&(e.innerText=t,""===t?(e.style.visibility="hidden",e.classList.remove("gigya-error-msg","gigya-error-msg-active")):(e.style.visibility="visible",e.classList.add("gigya-error-msg","gigya-error-msg-active")))}function a5(e){return a6('input[name="data.business.'.concat(e,'"][data-screenset-roles*="instance"]'))}function a7(e){return a6('select[name="data.business.'.concat(e,'"][data-screenset-roles*="instance"]'))}function a8(){var e;return null==(e=a5("phone"))?void 0:e.value}function a9(e){let t=a5("crmId");t&&(t.value=e)}function se(){return a6('[data-screenset-roles*="instance"] .renderresult')}function st(){return a6(".autocomplete-sep input[id^=gigya-textbox]")}function sl(){return a6('.autocomplete-sep > span[data-screenset-roles*="instance"]')}function sn(){return a6("".concat('input[id^=gigya-loginID][name=email][data-screenset-roles*="instance"]',", ").concat('input[id^=gigya-textbox-email][name="profile.email"][data-screenset-roles*="instance"]'))}function sa(){return a6('.confirmemail > input[id^=gigya-textbox][data-screenset-roles*="instance"]')}function ss(){return a6('.confirmemail > label[data-screenset-roles*="instance"]')}function sr(){return a6('.confirmemail > span[data-screenset-roles*="instance"]')}let si="gigya-error-msg",so="preferences.email.isConsentGranted";function sc(e){var t,l,n;let a=a6('input[name="'.concat(so,'"][data-screenset-roles*="instance"]')),s=null!=(l=null!=(t=null==a?void 0:a.closest(".gigya-composite-control"))?t:null==a?void 0:a.parentElement)?l:null;if(null===a||null===s)return;let r=""!==a.id?"".concat(si,"-").concat(a.id):"".concat(si,"-").concat(so),i=null!=(n=s.parentElement)?n:s,o=a6('span[data-bound-to="'.concat(so,'"]'),i);null!==o&&""===o.id&&(o.id=r),""!==e&&null===o&&((o=document.createElement("span")).id=r,o.dataset.boundTo=so,o.dataset.screensetRoles="instance",o.classList.add("gigya-error-msg"),s.after(o)),a.setAttribute("aria-invalid",""===e?"false":"true"),a.classList.toggle("gigya-error",""!==e),""===e?a.removeAttribute("aria-describedby"):o&&a.setAttribute("aria-describedby",o.id),s.classList.toggle("gigya-error",""!==e),a3(o,e)}function sd(){return a6(".campaign-form-submit-error-message")}let sm=new Set(["cee_english_master","default","global","null","testing"]),su={al:"sq-AL",ar:"es-AR",at:"de-AT",au:"en-AU",bg:"bg-BG",bih:"bs-BA",bo:"es-BO",br:"pt-BR",ch:"de-CH",cl:"es-CL",cn:"zh-CN",co:"es-CO",cz:"cs-CZ",de:"de-DE",de_be:"de-BE",de_lu:"de-LU",dk:"da-DK",ec:"es-EC",el_cy:"el-CY",en_ca:"en-CA",en_gb:"en-GB",es:"es-ES",et:"et-EE",fi:"fi-FI",fr:"fr-FR",fr_be:"fr-BE",fr_ca:"fr-CA",fr_lu:"fr-LU",gr:"el-GR",hr:"hr-HR",hu:"hu-HU",id:"id-ID",ie:"en-IE",il:"he-IL",in:"en-IN",is:"is-IS",it:"it-IT",it_mt:"it-MT",jp:"ja-JP",kr:"ko-KR",lt:"lt-LT",lv:"lv-LV",me:"sr-ME",mk:"mk-MK",mx:"es-MX",my:"ms-MY",nl:"nl-NL",nl_be:"nl-BE",no:"no-NO",nz:"en-NZ",pe:"es-PE",pl:"pl-PL",pt:"pt-PT",py:"es-PY",ro:"ro-RO",rs:"sr-RS",ru:"ru-RU",se:"sv-SE",si:"sl-SI",sk:"sk-SK",th:"th-TH",tr:"tr-TR",tw:"zh-TW",ua:"uk-UA",us:"en-US",uy:"es-UY",ve:"es-VE",vn:"vi-VN",za:"en-ZA"};function sh(e,t){var l;if(!(null==e?void 0:e.trim()))return t;let n=e.toLowerCase();return sm.has(n)?t:null!=(l=su[n])?l:n.replace("_","-")}function sp(e,t,l){return e.localeCompare(t,sh(l,"en-US"),{sensitivity:"base"})}function sx(e){var t;let l=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"US",n=sh(e),a=null==n?void 0:n.split("-")[1];return null!=(t=null==a?void 0:a.toUpperCase())?t:l}let sf=null;async function sg(){let e=globalThis;return e.autoComplete?e.autoComplete:sf||(sf=document.querySelector('script[src*="autoComplete.min.js"]')?new Promise((t,l)=>{let n=setInterval(()=>{e.autoComplete&&(clearInterval(n),t(e.autoComplete))},100);setTimeout(()=>{clearInterval(n),sf=null,l(Error("AutoComplete library load timeout"))},1e4)}):new Promise((t,l)=>{let n=document.createElement("script");n.src="https://cdn.jsdelivr.net/npm/@tarekraafat/[email protected]/dist/autoComplete.min.js",n.crossOrigin="anonymous",n.async=!0;let a=globalThis.setTimeout(()=>{n.remove(),sf=null,l(Error("AutoComplete library load timeout"))},1e4);n.onload=()=>{clearTimeout(a),e.autoComplete?t(e.autoComplete):(n.remove(),sf=null,l(Error("AutoComplete library failed to load")))},n.onerror=()=>{clearTimeout(a),n.remove(),sf=null,l(Error("Failed to load AutoComplete script"))},document.head.appendChild(n)}))}let sv="";
1function sb(){let e=se();e&&(e.innerHTML="",e.style.display="none")}function sy(){let e=sl();e&&a3(e,"")}async function sj(e,t){if("US"!==sv&&"AU"!==sv&&e.length<3)return[];let l=new URL("/api/business/search",globalThis.location.origin);l.searchParams.set("search",e),l.searchParams.set("countryCode",sv);try{let{data:n}=await eM.L.get("".concat(l.pathname).concat(l.search)),a=n.data.resultCount;if("US"===sv||"AU"===sv)return n.data.value;if(0===a)return[{zeroResults:t?"".concat(t,' "').concat(e,'"'):""}];return n.data.value}catch(e){return[{error:JSON.stringify(e)}]}}function sw(e){return{selector:".autocomplete-sep input[id^=gigya-textbox]",placeHolder:"",debounce:500,data:{src:sj,cache:!1},searchEngine:(e,t)=>t.error?"error":t.errorMessage?t.errorMessage:t.nullValueMessage?t.nullValueMessage:t.zeroResults||""===t.zeroResults?t.zeroResults:"<b>".concat(t.Name,"</b> <br>").concat(t.location.address,", ").concat(t.location.city,", ").concat(t.location.state," ").concat(t.location.postalCode,"<br><br>"),resultsList:{maxResults:50,element:(t,l)=>{var n;l.results.length||function(e,t){let l=se();l&&t&&(l.innerHTML='<span style="font-weight:bold;">\''.concat(t," ").concat(e,"'</span>"),l.style.display="inline-block")}(l.query,e),(null==(n=l.results[0])?void 0:n.value.error)&&"Failed to fetch"===l.results[0].value.error.message&&function(){let e=se();e&&(e.innerHTML='<span style="font-weight:bold;">The business search service is currently unavailable. Please try again later or enter your business manually.</span>',e.style.display="inline-block")}()},noResults:!0},resultItem:{highlight:!0}}}class sN{async init(e){if(this.searchDisabled)return;let t=a6("input[id^=gigya-checkbox");null==t||t.addEventListener("change",e=>{this.manualBusinessEntryToggled=!this.manualBusinessEntryToggled,this.businessData=null,sy();if(!e.currentTarget)throw Error("Event has no target");let{checked:t}=e.currentTarget,l=st();if(t){let e=se();e&&(e.innerHTML="",e.style.display="none"),l&&(l.disabled=!0,l.value=""),a9("manual")}else l&&(l.disabled=!1),a9("");!function(e){let t=a7("type");t&&(t.selectedIndex=0)}(0),function(e){let t=a5("name");t&&(t.value="")}(0),function(e){let t=a5("address1");t&&(t.value="")}(0),function(e){let t=a5("address2");t&&(t.value="")}(0),function(e){let t=a5("city");t&&(t.value="")}(0),function(e){let t=a7("state");t&&(t.selectedIndex=0)}(0),function(e){let t=a5("zip");t&&(t.value="")}(0),function(e){let t=a5("phone");t&&(t.value="")}(0),(()=>{let e=a5("crmId");e&&(e.dispatchEvent(new Event("keydown")),e.dispatchEvent(new Event("keypress")),e.dispatchEvent(new Event("keyup")))})()}),sb(),await this.setupAutoComplete(e)}validate(){if(this.searchDisabled)return!0;let e=null===this.businessData,t=!this.manualBusinessEntryToggled;if(e&&t){let e=sl();return e&&a3(e,"Please select or manually enter a business"),!1}return sy(),!0}getBusinessData(){if(this.manualBusinessEntryToggled){var e,t,l,n,a,s,r,i,o,c,d,m,u,h;return{crmId:"",type:null!=(e=null==(i=a7("type"))?void 0:i.value)?e:"",name:null!=(t=null==(o=a5("name"))?void 0:o.value)?t:"",address1:null!=(l=null==(c=a5("address1"))?void 0:c.value)?l:"",address2:null==(d=a5("address2"))?void 0:d.value,city:null!=(n=null==(m=a5("city"))?void 0:m.value)?n:"",state:null!=(a=null==(u=a7("state"))?void 0:u.value)?a:"",zip:null!=(s=null==(h=a5("zip"))?void 0:h.value)?s:"",phone:null!=(r=a8())?r:"",country:sv}}return this.businessData}async setupAutoComplete(e){if(this.searchDisabled)return;sv=""===e||"testing"===e?"US":e.toLocaleUpperCase();let t=new(await sg())({...sw(this.noResultText||""),data:{...sw(this.noResultText||"").data,src:e=>sj(e,this.noResultText)}});t.input.addEventListener("selection",e=>{var l;let n=e.detail;t.input.blur();let a=n.selection.value;this.businessData={crmId:a.CRMId,type:a.AccountClassification,name:a.Name,phone:null!=(l=a8())?l:"",address1:a.location.address,address2:a.location.address2,city:a.location.city,state:a.location.state,zip:a.location.postalCode,country:a.location.countryCode},t.input.value=n.query;let s=se();s&&(s.innerHTML='<span style="font-weight:bold;">'.concat(a.Name,"</span><br>").concat(a.location.address,", ").concat(a.location.city,", ").concat(a.location.state," ").concat(a.location.postalCode),s.style.display="inline")}),t.input.addEventListener("input",()=>{sb(),sy(),this.businessData=null}),t.list.style.overflowY="scroll",t.list.style.maxHeight="200px",t.list.style.border="1px solid rgba(33, 33, 33, 0.07)",t.list.classList.add("gigya-style-modern")}constructor(e){this.searchDisabled=!1,this.manualBusinessEntryToggled=!1,this.businessData=null,this.noResultText=void 0,this.noResultText=e,this.searchDisabled=null===st()}}class s_{static getInstance(e){return s_.instance||(s_.instance=new sN(e)),s_.instance}constructor(){throw Error("Use BusinessSearchFactory.getInstance()")}}async function sk(e,t){await s_.getInstance(t).init(e)}class sC{confirmEmailFieldsMatch(){var e,t,l;if(this.confirmationDisabled)return!0;let n=null!=(l=null==(e=sn())?void 0:e.value)?l:"",a=null==(t=sa())?void 0:t.value;return 0!==n.length&&(n!==a?(a3(sr(),"Email addresses must match."),!1):0===a.length?(a3(sr(),"Please confirm your email"),!1):(a3(sr(),""),!0))}setupEmailConfirmation(){let e;if(this.confirmationDisabled)return;let t=sn(),l=sa(),n=ss(),a=document.createElement("label");a.setAttribute("class","gigya-required-display"),a.innerText="*",null==n||n.after(a);let s=()=>{clearTimeout(e),e=setTimeout(()=>this.confirmEmailFieldsMatch(),1e3)};null==t||t.addEventListener("input",()=>{s()}),null==l||l.addEventListener("input",()=>{s()})}constructor(){this.confirmationDisabled=!1;let e=!!sa()&&!!ss();this.confirmationDisabled=!e}}class sS{static getInstance(){return sS.instance||(sS.instance=new sC),sS.instance}constructor(){throw Error("Use EmailConfirmationFactory.getInstance()")}}let sL="入力必須です。";class sT{async setup(e,t){sS.getInstance().setupEmailConfirmation(),"JP"===sx(e)&&function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=a6('input[name="'.concat(so,'"][data-screenset-roles*="instance"]'));null!==t&&"true"!==t.dataset.consentValidationBound&&(t.dataset.consentValidationBound="true",t.addEventListener("change",()=>{let l=t.checked?"":e;(""!==l||t.checked)&&sc(l)}))}(sL);try{await sk(e,t)}catch(e){console.error("Failed to set up business search; continuing without it.",e)}}isValid(){let e=!(arguments.length>0)||void 0===arguments[0]||arguments[0];
1return this.emailMatch&&this.flatConsentIsValid&&(!e||this.businessIsValid)}validate(e,t){this.emailMatch=sS.getInstance().confirmEmailFieldsMatch(),this.businessIsValid=s_.getInstance().validate(),this.flatConsentIsValid=this.validateFlatConsent(e,t)}validateFlatConsent(e,t){var l;if("JP"!==sx(t)||"undefined"==typeof document)return!0;if(null===document.querySelector('input[name="preferences.email.isConsentGranted"][data-screenset-roles*="instance"]'))return sc(""),!0;let n=!0===(l=null==e?void 0:e["preferences.email.isConsentGranted"])||"true"===l||1===l||"1"===l;return sc(n?"":sL),n}constructor(){this.emailMatch=!1,this.businessIsValid=!1,this.flatConsentIsValid=!0}}function sI(e){return"string"==typeof e?e:Array.isArray(e)?e[0]:""}class sE{registerQuestion(e,t,l,n){this.selectedOptionsCallbacks.push(e),this.injectedElementCallbacks.push(t),this.errorsCallbacks.push(l),this.validationEvents.push(n),(0,eF.OG)("Campaign question registered")}validate(){let e={validateNow:!0};this.validationEvents.forEach(t=>{t(e)})}getSelectedOptions(){return this.selectedOptions=[],this.selectedOptionsCallbacks.forEach(e=>{let t=e();t&&this.selectedOptions.push(t)}),this.selectedOptions}getInjectedElements(){return this.injectedElements=[],this.injectedElementCallbacks.forEach(e=>{this.injectedElements=[...this.injectedElements,...e()]}),this.injectedElements}isValid(){return this.errorsCallbacks.every(e=>!e())}async send(e){let t=[];if(t=this.getInjectedElements().length>0?this.getSelectedOptions():e.formResponse,e.formId&&e.cdcProfile.UID){let l={...e,formResponse:t},n=Date.now();try{let e=await eM.L.post("/api/campaign/interest",l,{timeout:6e4}),t=Date.now()-n;return(0,eF.$s)({name:"CAMPAIGN_API_PERFORMANCE",properties:{duration:t,status:e.status,timeout:6e4}}),200===e.status}catch(l){let e=Date.now()-n,t=l instanceof Error?l.message:"Unknown error";(0,eF.vV)(Error("Campaign interest submission failed: ".concat(t))),(0,eF.$s)({name:"CAMPAIGN_INTEREST_SUBMISSION_FAILED",properties:{error:t,timeout:6e4,duration:e}})}}return!1}constructor(){this.selectedOptionsCallbacks=[],this.injectedElementCallbacks=[],this.errorsCallbacks=[],this.selectedOptions=[],this.injectedElements=[],this.validationEvents=[]}}var sA=l(29506),sF=l(88701);let sB=(e,t)=>t?e.replace(/(?:<\/\w+>)(?![\s\S]*<\/\w+>)/g,'<span class="gigya-required-display gigya-reset" style="color:#ce4635;padding: 0 5px;">*</span>$&'):e;function sM(e){var t;let{errorsCallback:l,question:n,selectedOptionsCallback:a,validationEvent:r}=e,[i,o]=(0,s.useState)(!1),[c,d]=(0,s.useState)([]),[m,u]=(0,s.useState)(""),h=(null==(t=n.elements.requiredOrOptional[0])?void 0:t.codename)==="required";return(0,s.useEffect)(()=>
1{l(!1)},[l]),(0,s.useEffect)(()=>{r.validateNow&&h&&0===c.length?(o(!0),u("gigya-error")):(o(!1),u(""))},[r,h,c]),(0,s.useEffect)(()=>{0===c.length?a([""]):a(c)},[c,a]),(0,s.useEffect)(()=>{l(h&&0===c.length)},[l,h,c]),{required:h,questionKontentItemId:n.system.id,displayError:i,errorClass:m,setSelectedItems:d}}let sP=e=>{let{question:t,selectedOptionsCallback:l,injectedElementsCallback:a,errorsCallback:s,validationEvent:r}=e,{required:i,questionKontentItemId:o,displayError:c,errorClass:d,setSelectedItems:m}=sM({question:t,selectedOptionsCallback:l,injectedElementsCallback:a,errorsCallback:s,validationEvent:r}),u="label-".concat(o),h="span-".concat(o),p="input-".concat(o);return a(u),a(h),a(p),(0,n.jsxs)("div",{className:"gigya-composite-control gigya-composite-control-textbox",id:o,children:[(0,n.jsxs)("label",{className:"gigya-label",htmlFor:p,id:u,children:[(0,n.jsx)("span",{className:"gigya-label-text",id:h,children:(0,n.jsx)("div",{dangerouslySetInnerHTML:{__html:sB(t.elements.questionText.value,i)}})}),i?(0,n.jsx)("label",{className:"hidden",children:"*"}):null]}),(0,n.jsxs)("div",{className:"relative",children:[(0,n.jsx)("input",{className:"gigya-input-text ".concat(d),id:p,name:p,onChange:e=>{m([e.target.value])},type:"date"}),c?(0,n.jsx)("span",{className:"gigya-error-msg gigya-error-msg-active",children:"This field is required"}):null]})]})},sD=e=>{let{question:t,selectedOptionsCallback:l,injectedElementsCallback:a,errorsCallback:s,validationEvent:r}=e;return(0,n.jsx)(sP,{errorsCallback:s,injectedElementsCallback:a,question:t,selectedOptionsCallback:l,validationEvent:r})},sR=e=>{let{question:t,selectedOptionsCallback:l,injectedElementsCallback:a,errorsCallback:s,validationEvent:r}=e,{required:i,questionKontentItemId:o,displayError:c,setSelectedItems:d}=sM({question:t,selectedOptionsCallback:l,injectedElementsCallback:a,errorsCallback:s,validationEvent:r}),m="span-".concat(o);return a(m),(0,n.jsxs)("div",{className:"gigya-composite-control gigya-composite-control-multi-choice opt-group",id:o,children:[(0,n.jsxs)("label",{className:"gigya-label",children:[(0,n.jsx)("span",{className:"gigya-label-text",id:m,children:(0,n.jsx)("div",{dangerouslySetInnerHTML:{__html:sB(t.elements.questionText.value,i)}})}),i?(0,n.jsx)("label",{"aria-hidden":"true",className:"hidden",children:"*"}):null]}),t.elements.selections.map(e=>{let t="checkbox-".concat(e.system.id),l="label-".concat(e.system.id);return a(t),a(l),(0,n.jsxs)("div",{className:"gigya-multi-choice-item",children:[(0,n.jsx)("input",{className:"gigya-input-checkbox fd-checkbox",id:t,name:t,onChange:e=>{let{checked:t}=e.target;t?d(t=>[...t,e.target.value]):d(t=>t.filter(t=>t!==e.target.value))},type:"checkbox",value:e.elements.selectionValue}),(0,n.jsx)("label",{htmlFor:t,id:l,children:e.elements.displayValue})]},e.system.id)}),c?(0,n.jsx)("span",{className:"gigya-error-msg gigya-error-msg-active",children:"This field is required"}):null]})},sq=e=>{var t;let{question:l,selectedOptionsCallback:a,injectedElementsCallback:s,errorsCallback:r,validationEvent:i}=e;return 0===l.elements.selections.length?(0,n.jsx)("div",{}):(null==(t=l.elements.renderMode[0])?void 0:t.codename)==="checkbox"?(0,n.jsx)(sR,{errorsCallback:r,injectedElementsCallback:s,question:l,selectedOptionsCallback:a,validationEvent:i}):(0,n.jsx)("div",{})},sz=e=>{let{question:t,selectedOptionsCallback:l,injectedElementsCallback:a,errorsCallback:s,validationEvent:r}=e,{required:i,questionKontentItemId:o,displayError:c,errorClass:d,setSelectedItems:m}=sM({question:t,selectedOptionsCallback:l,injectedElementsCallback:a,errorsCallback:s,validationEvent:r}),u="label-".concat(o),h="select-".concat(o),p="span-".concat(o);return a(u),a(h),a(p),(0,n.jsxs)("div",{className:"gigya-composite-control gigya-composite-control-dropdown",id:o,children:[(0,n.jsxs)("label",{className:"gigya-label",htmlFor:h,id:u,children:[(0,n.jsx)("span",{className:"gigya-label-text",id:p,children:(0,n.jsx)("div",{dangerouslySetInnerHTML:{__html:sB(t.elements.questionText.value,i)}})}),i?(0,n.jsx)("label",{className:"hidden",children:"*"}):null]}),(0,n.jsxs)("select",{className:d,id:h,name:h,onChange:e=>{let{options:t}=e.target,l=[];for(let e of t)e.selected&&e.value&&l.push(e.value);m(l)},children:[(0,n.jsxs)("option",{value:"",children:[t.elements.selectionPrompt||"Please select an option"," ",i?"*":null]},"default-option"),t.elements.selections.map(e=>(0,n.jsx)("option",{id:e.system.id,value:e.elements.selectionValue,children:e.elements.displayValue},e.system.id))]}),c?(0,n.jsx)("span",{className:"gigya-error-msg gigya-error-msg-active",children:"This field is required"}):null]})},sO=e=>{let{question:t,selectedOptionsCallback:l,injectedElementsCallback:a,errorsCallback:s,validationEvent:r}=e,{required:i,questionKontentItemId:o,displayError:c,setSelectedItems:d}=sM({question:t,selectedOptionsCallback:l,injectedElementsCallback:a,errorsCallback:s,validationEvent:r}),m="radio-".concat(o);return a(m),(0,n.jsxs)("div",{className:"gigya-composite-control gigya-composite-control-multi-choice opt-group",id:o,children:[(0,n.jsxs)("label",{className:"gigya-label",children:[(0,n.jsx)("span",{className:"gigya-label-text",id:"span-".concat(o),children:(0,n.jsx)("div",{dangerouslySetInnerHTML:{__html:sB(t.elements.questionText.value,i)}})}),i?(0,n.jsx)("label",{"aria-hidden":"true",className:"hidden",children:"*"}):null]}),t.elements.selections.map(e=>{let t="label-".concat(e.system.id),l="radio-".concat(e.system.id);return a(t),a(l),(0,n.jsxs)("div",{className:"gigya-multi-choice-item",children:[(0,n.jsx)("input",{className:"gigya-input-radio fd-radio",id:l,name:m,onChange:e=>{let{checked:t}=e.target;t&&d([e.target.value])},type:"radio",value:e.elements.selectionValue}),(0,n.jsx)("label",{htmlFor:l,id:t,children:e.elements.displayValue})]},e.system.id)}),c?(0,n.jsx)("span",{className:"gigya-error-msg gigya-error-msg-active",children:"This field is required"}):null]})},sU=e=>{var t;let{question:l,selectedOptionsCallback:a,injectedElementsCallback:s,errorsCallback:r,validationEvent:i}=e;if(0===l.elements.selections.length)return(0,n.jsx)("div",{});switch(null==(t=l.elements.renderMode[0])?void 0:t.codename){case"drop_down":return(0,n.jsx)(sz,{errorsCallback:r,
1injectedElementsCallback:s,question:l,selectedOptionsCallback:a,validationEvent:i});case"radio_button":return(0,n.jsx)(sO,{errorsCallback:r,injectedElementsCallback:s,question:l,selectedOptionsCallback:a,validationEvent:i});default:return(0,n.jsx)("div",{})}},s$=e=>{let{question:t,handler:l}=e,[a,r]=(0,s.useState)([]),i=(0,s.useRef)(a),[o,c]=(0,s.useState)(!1),d=(0,s.useRef)(o),[m,u]=(0,s.useState)({validateNow:!1}),h=[],p=e=>{h.push(e)};switch((0,s.useEffect)(()=>{i.current=a},[a]),(0,s.useEffect)(()=>{d.current=o},[o]),(0,s.useEffect)(()=>{l.registerQuestion(()=>0===i.current.length?null:{questionId:t.elements.questionId,questionLabel:(0,sF.stripHtml)(t.elements.questionText.value).result,answer:i.current},()=>h,()=>d.current,u)},[]),t.system.type){case"single_selection":return(0,n.jsx)(sU,{errorsCallback:c,injectedElementsCallback:p,question:t,selectedOptionsCallback:r,validationEvent:m},t.system.id);case"multiple_selection":return(0,n.jsx)(sq,{errorsCallback:c,injectedElementsCallback:p,question:t,selectedOptionsCallback:r,validationEvent:m},t.system.id);case"date_selection":return(0,n.jsx)(sD,{errorsCallback:c,injectedElementsCallback:p,question:t,selectedOptionsCallback:r,validationEvent:m},t.system.id);default:return(0,n.jsx)("div",{})}},sH=e=>{let{id:t,campaignQuestions:l,handler:a}=e;return(0,n.jsx)("div",{className:"gigya-composite-control",id:t,children:l.map(e=>(0,n.jsx)(s$,{handler:a,question:e},e.system.id))})};function sV(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document,l=t.querySelector(e);if(!l)throw Error("Element not found");return l}let sZ=(0,s.createContext)(null),sG=e=>{let{children:t,initialGlobalState:l}=e,[a,r]=(0,s.useState)(null!=l?l:null);return(0,n.jsx)(sZ.Provider,{value:[a,r],children:t})},sW=e=>{var t,l;let{block:s,...r}=e,{locale:o="",push:d}=(0,a.useRouter)();return(0,n.jsx)("div",{className:"flex h-full w-full justify-center",children:(0,n.jsxs)(et,{className:"relative h-full border border-gray-700 md:w-full",children:[(0,n.jsxs)("div",{className:"flex w-full flex-col",children:[s.elements.logo[0]?(0,n.jsx)(f(),{alt:null!=(t=s.elements.logo[0].description)?t:"",className:"left-0 top-0 h-14 max-w-150px object-contain",height:s.elements.logo[0].height||56,loader:v.L,src:s.elements.logo[0].url,width:s.elements.logo[0].width||150}):null,s.elements.image[0]?(0,n.jsx)(ee,{alt:null!=(l=s.elements.image[0].description)?l:"",className:(0,i.$)(s.elements.logo[0]?"mt-5":"mt-20","mb-1 h-40 justify-center object-contain align-middle"),imageUrl:s.elements.imageLink?$(s.elements.imageLink,o):void 0,src:s.elements.image[0].url}):null]}),(0,n.jsx)("h3",{className:"mb-2 h-14 text-lg lg:text-xl",children:(0,n.jsx)("span",{"data-kontent-element-codename":"title",children:s.elements.title})}),s.elements.tabs.length>0?(0,n.jsx)(lI,{disableClickEvent:1===s.elements.tabs.length,name:s.system.id,children:s.elements.tabs.map(e=>(0,n.jsx)(tz,{hideCloseBtn:!0,tabPaddingClasses:"p-4 pb-0 h-full",title:e.elements.title,children:(0,n.jsxs)("div",{className:"flex h-full flex-col","data-kontent-item-id":e.system.id,children:[(0,n.jsx)("div",{children:e.elements.icons.map(e=>(0,n.jsx)(tb,{block:e,className:"-ml-5 mb-0 mt-0 pl-4",...r},e.system.id))}),(0,n.jsx)(c.rM,{element:e.elements.content,...r}),e.elements.link.map(e=>{var t,l;return(0,n.jsx)(D,{className:"mb-3 w-full",href:e.elements.url,icon:P.v[null==(t=e.elements.icon[0])?void 0:t.name],kontentProps:e,routerNavigateToPath:d,target:(null==(l=e.elements.openLinkInNewTab[0])?void 0:l.codename)==="yes"?"_blank":"_self",children:e.elements.text},e.system.id)}),e.elements.button.map(e=>(0,n.jsx)(X,{block:e,className:"mb-3 mt-auto w-full",...r},e.system.id))]})},"".concat(s.elements.title,"-").concat(e.elements.title)))}):null,s.elements.whereToBuyUrl.length>0||s.elements.productLabelUrl.length>0?(0,n.jsxs)("div",{className:"mt-auto ".concat(1===s.elements.whereToBuyUrl.length&&1===s.elements.productLabelUrl.length?"flex items-center justify-between":"flex flex-col space-y-2"),children:[s.elements.whereToBuyUrl.map(e=>(0,n.jsx)(X,{block:e,className:"w-full",...r},e.system.id)),s.elements.productLabelUrl.map(e=>{var t,l,a;return(0,n.jsx)(D,{className:"w-full text-center",href:e.elements.url,icon:(null==(t=e.elements.icon[0])?void 0:t.name)?P.v[null==(l=e.elements.icon[0])?void 0:l.name]:void 0,kontentProps:e,routerNavigateToPath:d,target:(null==(a=e.elements.openLinkInNewTab[0])?void 0:a.codename)==="yes"?"_blank":"_self",children:e.elements.text},e.system.id)})]}):null]})})},sK=e=>{let{block:t,...l}=e;return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("h4",{children:t.elements.title}),(0,n.jsx)("div",{className:"-mt-8",children:t.elements.iconList[0]?(0,n.jsx)(tb,{block:t.elements.iconList[0],...l}):null})]})},sY=e=>{let{className:t="",children:l}=e;return(0,n.jsx)("div",{className:t,children:(0,n.jsx)("div",{children:l})})},sQ=e=>{let{className:t="",children:l,title:a=""}=e;return(0,n.jsxs)("div",{className:" ".concat(t),children:[(0,n.jsx)("h4",{children:a}),(0,n.jsx)("div",{className:"mt-4 flex flex-wrap",children:l})]})},sX=e=>{let{className:t="",children:l}=e,a=s.Children.toArray(l),r=a.filter(e=>e.type===sY),i=a.filter(e=>e.type===sQ),o=a.filter(e=>e.type===f()),c=a.filter(e=>e.type!==sQ&&e.type!==sY&&e.type!==f());return(0,n.jsxs)("div",{className:"rounded-lg shadow-secondary md:flex".concat(t),children:[(0,n.jsxs)("div",{className:"bg-gray-200 px-4 py-10 pb-10 md:w-1/2 md:pl-6 md:pr-16",children:[(0,n.jsx)("div",{className:"content",children:r}),(0,n.jsx)("div",{className:"hidden flex-col flex-wrap items-center text-sm md:flex md:flex-row",children:c})]}),(0,n.jsxs)("div",{className:"md:w-1/2",children:[(0,n.jsx)("div",{className:"md:-mt-[20%] md:px-10",children:o}),(0,n.jsx)("div",{className:"p-6",children:i})]}),(0,n.jsx)("div",{className:"flex flex-wrap items-center justify-center md:hidden",children:c})]})},sJ=async e=>{let[,t]=e.queryKey,l=new URLSearchParams({locale:t.locale});t.codenames&&l.set("codenames",encodeURIComponent(t.codenames.join()));let{data:n}=await (0,eM.L)("/api/v2/faqs-by-codenames?".concat(l.toString()));if(!n.success)throw Error(n.message);return{...n,items:n.items.filter(e=>e.elements.title.trim().length>0&&"<p><br></p>"!==e.elements.content.value)}},s0=async e=>{let[,t]=e.queryKey,{searchEndpoint:l,searchQuery:n}=t,{data:a}
1=await (0,eM.L)(l+n,{headers:{"api-key":o._.NEXT_PUBLIC_FAQ_COGNITIVE_SEARCH_API_KEY}});return a.value.map(e=>e.id)};function s1(){return(0,n.jsx)("svg",{className:"fill-current",height:"32",viewBox:"0 0 32 32",width:"32",xmlns:"http://www.w3.org/2000/svg",children:(0,n.jsx)("path",{d:"M15.983 32.002a16.007 16.007 0 1 1 11.325-4.687 15.87 15.87 0 0 1-11.325 4.687m.038-11.314 5.275 3.76a.83.83 0 0 0 .451.16.66.66 0 0 0 .4-.172.7.7 0 0 0 .242-.8l-2.074-6.033 5.367-3.852.129-.107a.688.688 0 0 0-.532-1.2h-6.58l-2-5.963a.722.722 0 0 0-1.359 0l-2 5.963H6.716a.72.72 0 0 0-.714.721.4.4 0 0 0 .011.117.69.69 0 0 0 .3.506l5.41 3.814-2.079 6.033a.72.72 0 0 0 .247.8.7.7 0 0 0 .4.172.9.9 0 0 0 .446-.16l5.28-3.76Z"})})}let s2=async(e,t)=>{let{petId:l}=e;await (0,eM.L)("/api/pets/".concat(l,"?locale=").concat(t),{method:"DELETE"})},s4=e=>{let{block:{elements:{petDeleteButtonText:t,petDeleteGoBackToEditLinkText:l,petDeleteModalDescription:s,petDeleteModalHeading:r,redirectUrl:i}},showModal:o,petData:d,hideModal:m,...u}=e,h=(0,a.useRouter)(),{locale:p=""}=h,x=(0,eB.useQueryClient)(),f=(0,eB.useMutation)({mutationFn:e=>s2(e,p),onSuccess:()=>x.invalidateQueries({queryKey:["pets"]})}),g=(0,eB.useMutation)({mutationFn:e=>nV(e,p),onSuccess:()=>x.invalidateQueries({queryKey:["reminders"]})}),{data:v,isLoading:b}=(0,eB.useQuery)({queryKey:["reminders"],queryFn:()=>nk(p),staleTime:1/0,cacheTime:9e5}),y=async e=>{if(v){let t=v.filter(t=>{var l;return(null==(l=t.pet)?void 0:l.id)===e});await Promise.all(t.map(e=>g.mutateAsync(e.id)))}await f.mutateAsync({petId:e}),m(),h.push({pathname:"/".concat(p).concat(i)},void 0)},j=b||g.isLoading||f.isLoading;return(0,n.jsx)("div",{children:o?(0,n.jsx)(eE,{onClose:m,size:"md",title:r,titleCenter:!0,children:(0,n.jsxs)("div",{className:"relative",children:[(0,n.jsx)(nH,{isLoading:j,theme:"green"}),(0,n.jsxs)("div",{className:"flex flex-col items-center justify-center",children:[(0,n.jsx)(c.rM,{element:{...s,value:s.value.replaceAll(/{{petName}}/gi,d.name)},...u}),(0,n.jsx)("div",{className:"w-full",children:(0,n.jsxs)("div",{className:"flex flex-col items-center pt-6",children:[(0,n.jsx)("div",{className:"mb-4",children:(0,n.jsx)(H.$,{onClick:()=>y(d.id),variant:"pet_primary_green",children:t})}),(0,n.jsx)("div",{className:"pb-10",children:(0,n.jsx)("button",{className:"cursor-pointer text-green-600 underline",onClick:m,type:"button",children:l})})]})})]})]})}):null})},s6=e=>{let{checkboxesClassName:t="",checkboxData:l,className:a="",identifier:r,title:o="",updateFilterValue:c=()=>null}=e;return(0,n.jsxs)("div",{className:a,children:[""!==o&&(0,n.jsx)("p",{className:"mb-3 font-bold leading-none text-black",children:o}),(0,n.jsx)("div",{className:t,children:l.map((e,t)=>{let{value:l,checked:a}=e,o="".concat(l.trim(),"_").concat(t);return(0,n.jsxs)(s.Fragment,{children:[(0,n.jsx)("input",{checked:a,className:"multipleCheckboxesImput",id:o,onChange:e=>{c(e.target.value,r)},type:"checkbox",value:l}),(0,n.jsx)("label",{className:"multipleCheckboxesLabel",htmlFor:o,children:(0,n.jsx)("span",{className:(0,i.$)(a&&"border-b border-black"),children:l})})]},o)})})]})};function s3(e){let{globalState:t,filterBarKey:l,filterBarOptions:n,additionalFilterBarOptions:a,showAdditionalFilters:s,checkShowAdditionalFilters:r}=e,i=(0,es.As)(),o=(null==t?void 0:t[l])?n.filter(e=>i.isBlockVisible(e)&&i.checkUserRoleForBlock(e)):[],c=(null==t?void 0:t[l])?a.filter(e=>i.isBlockVisible(e)&&i.checkUserRoleForBlock(e)):[],d=s?c:[],m=r&&c.length>0,u=o.length>0||c.length>0,h=u||c.length>0;return{visibleFilterOptions:o,visibleAdditionalFilterOptionsForUser:c,visibleAdditionalFilterOptions:d,shouldShowAdditionalFilterButton:m,hasVisibleFilters:u,hasVisibleFiltersOrAdditionalFilters:h}}let s5=e=>{let{filterBarKey:t,renderFilterOptions:l,toggleAdditionalFilters:a,additionalFilterTitle:s,resetButtonTitle:r,resetAllFilters:o,className:c}=e,{visibleFilterOptions:d,visibleAdditionalFilterOptions:m,shouldShowAdditionalFilterButton:u,hasVisibleFiltersOrAdditionalFilters:h}=s3(e);return h?(0,n.jsx)("div",{className:c,children:(0,n.jsxs)("div",{className:(0,i.$)("mx-auto flex max-w-screen-xl","productsFilterOptions"===t?"mb-8 flex-row justify-between px-3":"flex-col items-center justify-center"),children:[(0,n.jsx)("div",{className:(0,i.$)("productsFilterOptions"===t?"w-11/12 pr-12":"w-full",d.length<3&&"w-9/12"),children:(0,n.jsxs)("div",{className:(0,i.$)("gap-y-3","productsFilterOptions"===t?"flex flex-wrap gap-x-12":"grid grid-cols-2"),children:[d.map(l),m.map(l)]})}),(0,n.jsx)("div",{className:"productsFilterOptions"===t?"py-5":"pt-8",children:(0,n.jsxs)("div",{className:"flex items-center justify-center",children:[u?(0,n.jsx)(H.$,{as:"button",className:"mr-2 whitespace-nowrap bg-white px-7 py-2",onClick:a,title:s,variant:"inverted",children:s}):null,(0,n.jsx)(H.$,{as:"button",className:"truncate bg-white py-2",icon:P.v.
1Load,onClick:()=>{o(),(0,b.d)({event:"filter_clear",filter_name:"reset"})},title:r,variant:"inverted",children:r})]})})]})}):null},s7=e=>{let{setShowMobileFilters:t,showMobileFilters:l,title:a,toggleAdditionalFilters:s,additionalFilterTitle:r,resetButtonTitle:o,resetAllFilters:c,closeButtonTitle:d,className:m,renderFilterOptions:u,showAdditionalFilters:h}=e,{visibleFilterOptions:p,visibleAdditionalFilterOptions:x,shouldShowAdditionalFilterButton:f,hasVisibleFiltersOrAdditionalFilters:g}=s3(e);return(0,n.jsxs)("div",{className:m,children:[(0,n.jsxs)("div",{className:"z-[1001] mx-auto mb-8 flex max-w-screen-xl flex-col justify-between bg-white xl:fixed xl:left-2/4    xl:top-2/4 xl:w-3/12 xl:-translate-x-2/4 xl:-translate-y-2/4 xl:transform xl:rounded",children:[g?(0,n.jsx)("div",{className:(0,i.$)("bg-gray-100 px-3 py-5 xl:rounded-t",h?"block":"xl:hidden"),children:(0,n.jsxs)("div",{className:"relative mx-auto w-full max-w-[285px] sm:max-w-screen-md",children:[(0,n.jsx)("h3",{className:"text-black xl:text-center",children:a||"Filters"}),(0,n.jsxs)("button",{className:"absolute right-0 top-0",onClick:()=>{s(),t(!l)},type:"button",children:[(0,n.jsx)("svg",{className:"hidden h-8 w-8 text-black xl:block",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,n.jsx)("path",{d:"M6 18L18 6M6 6l12 12",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2"})}),(0,n.jsx)("svg",{className:"h-8 w-8 transform text-black xl:hidden",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,n.jsx)("path",{d:"M12 6V4m0 2a2 2 0 100 4m0-4a2 2 0 110 4m-6 8a2 2 0 100-4m0 4a2 2 0 110-4m0 4v2m0-6V4m6 6v10m6-2a2 2 0 100-4m0 4a2 2 0 110-4m0 4v2m0-6V4",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2"})})]})]})}):null,(0,n.jsx)("div",{className:"p-4",children:(0,n.jsxs)("div",{className:(0,i.$)("flex-no-wrap mx-auto max-h-[350px] w-full max-w-[285px] flex-col justify-start space-y-4 overflow-y-scroll px-3 pr-6 scrollbar-thin scrollbar-track-gray-100 scrollbar-thumb-blue-500 sm:max-w-screen-md xl:px-6",l?"flex":"hidden xl:flex"),children:[p.map(u),x.length>0&&x.map(u)]})}),(0,n.jsx)("div",{className:(0,i.$)("bg-gray-100 py-5 xl:rounded-b",l?"block":"hidden xl:block"),children:(0,n.jsxs)("div",{className:"mx-auto grid max-w-[300px] grid-cols-2 items-center gap-4",children:[f?(0,n.jsx)(H.$,{as:"button",className:"col-span-full bg-white py-2 xl:hidden",onClick:s,title:r,variant:"inverted",children:r}):null,(0,n.jsx)(H.$,{as:"button",className:"bg-white py-2",icon:P.v.Load,onClick:()=>{c(),(0,b.d)({event:"filter_clear",filter_name:"reset"})},title:o,variant:"inverted",children:o}),(0,n.jsx)(H.$,{as:"button",className:"inline-block bg-white py-2",onClick:()=>{s(),t(!1)},title:d,variant:"inverted",children:d})]})})]}),(0,n.jsx)("div",{className:"fixed bottom-0 left-0 right-0 top-0 z-[1000] hidden bg-black/50 xl:block",onClick:()=>{s(),t(!1)}})]})};function s8(e,t,l){var n,a;let s=null!=(a=null==(n=t.elements.type[0])?void 0:n.codename)?a:"dropdown",r=t.elements.taxonomy[
10],i=r.system.type.replace("taxonomy_",""),c=i.toLowerCase().replace(/(?:_\w)/g,e=>{var t,l;return null!=(l=null==(t=e[1])?void 0:t.toUpperCase())?l:""}),d=new URL("".concat(o._.NEXT_PUBLIC_APP_URL,"/").concat(l)).searchParams,m=d.has(i)?d.getAll(i):void 0;if("dropdown"===s)return{...e,[i]:{label:t.elements.allItemsTitle,value:m?m.toString().toLowerCase():""}};if("multiselect"===s){let t=null==m?void 0:m.toString().toLowerCase(),l=r.elements[c].map(e=>({value:e.name,codename:e.codename,checked:!!m&&(null==t?void 0:t.includes(e.name.toLowerCase()))})),n=e[i];return{...e,[i]:{checkboxOptions:n&&"checkboxOptions"in n&&n.checkboxOptions.length>0?[...e[i].checkboxOptions,...l]:l}}}}let s9={jp:[["parasiticides","heart","kidney","skin","oa_pain","anti_bio","nutrition","others"],["_vaccine_","antibacterial_agent_","parasite_control_agents_","_parasite_control_agents_","environmental_hygiene_products_","mixed_feed_","feed_additives_","others_"]]},re=e=>{let{block:t,BlockMapper:l,globalConfig:r,page:o}=e,{authenticated:c}=(0,es.As)(),d=(0,a.useRouter)(),m="/".concat(d.locale).concat(d.asPath),[u,h]=(0,s.useState)(!1),{buttonText:p,icon:x,title:g,termsAndConditionsText:b,termsAndConditionsUrl:y,rebatesTable:j,loginTitle:w,iconWithText:N,loginButton:_,registerButton:k,columnHeadings:C}=t.elements,S=x[0],{brandColor:L,brandColorClasses:T}=(0,s.useMemo)(()=>{let{colorId:e}=G({pageConfig:o.elements.config[0]}),t=eI(e);return{brandColor:e,brandColorClasses:t}},[o.elements.config]),I=L?"bg-".concat(L):"bg-primary",E=_.filter(e=>{var t,l;return(null==(l=e.elements.hideComponentOnLoginEnabled)||null==(t=l[0])?void 0:t.codename)==="yes"}),A=k.filter(e=>{var t,l;return(null==(l=e.elements.hideComponentOnLoginEnabled)||null==(t=l[0])?void 0:t.codename)==="yes"}),F=()=>{h(!1)};return(0,s.useEffect)(()=>{let e=e=>{"Escape"===e.key&&u&&F()},t=e=>{u&&e.target.classList.contains("bg-black/50")&&F()};if(u)return document.addEventListener("keydown",e),document.addEventListener("click",t),()=>{document.removeEventListener("keydown",e),document.removeEventListener("click",t)}},[u]),(0,n.jsxs)("div",{className:"inline-block",children:[(0,n.jsxs)("button",{"aria-expanded":u,"aria-haspopup":"dialog",className:"inline-flex items-center gap-2 rounded border-2 px-3 py-1 text-sm font-bold transition-all duration-200 hover:shadow-sm focus:outline-none focus:ring-2 focus:ring-offset-2 ".concat(T.border," bg-white ").concat(T.text," hover:bg-gray-50 focus:ring-").concat(L||"elanco-blue"),onClick:()=>{h(!0)},type:"button",children:[S?(0,n.jsx)(f(),{alt:"",className:"h-5 w-5 flex-shrink-0",height:20,loader:v.L,src:S.url,width:20}):null,p]}),u?(0,n.jsx)(eE,{brandColor:L||"elanco-blue",isOpen:u,onClose:F,size:"lg",title:g,variant:"right-slide",children:(0,n.jsxs)("div",{className:"space-y-3",children:[j.length>0?(0,n.jsx)("div",{className:"space-y-4",children:(0,n.jsx)("div",{className:"block w-full",children:(0,n.jsx)("table",{className:"block w-full",children:(0,n.jsx)("tbody",{className:"block border-t border-light-grey",children:j.map(e=>(0,n.jsx)(np,{BlockMapper:l,block:{elements:{columnHeadings:C,rebate:[e]},system:e.system},forceMobileView:!0,globalConfig:r,hideClaimButtons:!0,page:o},e.system.id))})})})}):null,b&&y?(0,n.jsx)("div",{className:"300 pb-2",children:(0,n.jsx)("div",{className:"text-right md:text-left",children:(0,n.jsx)("a",{className:"text-[14px] font-bold leading-none underline",href:y,rel:"noopener noreferrer",target:"_blank",children:b})})}):null,(0,n.jsx)("div",{className:"space-y-[13px]",children:!c&&w?(0,n.jsx)("h3",{className:"text-gray-900 py-4 text-[24px] font-bold leading-none",children:w}):null}),!c&&N.length>0?(0,n.jsx)("div",{className:"space-y-[13px]",children:N.map(e=>{var t,l,a,s;let{elements:{icon:r,title:o,boldTitle:c},system:{id:d}}=e;return(0,n.jsxs)("div",{className:"flex items-start space-x-3",children:[(null==(t=r[0])?void 0:t.url)?(0,n.jsx)("div",{className:"flex-shrink-0",children:(0,n.jsx)(f(),{alt:null!=(s=null==(l=r[0])?void 0:l.description)?s:"",height:24,loader:v.L,src:r[0].url,width:24})}):null,(0,n.jsx)("div",{className:"flex-1",children:o?(0,n.jsx)("span",{className:(0,i.$)("text-gray-900",(null==(a=c[0])?void 0:a.codename)==="bold"?"font-bold":"font-normal"),children:o}):null})]},d)})}):null,c?null:(0,n.jsx)("div",{className:"space-y-[13px]",children:(0,n.jsxs)("div",{className:"flex flex-wrap",children:[E.map((e,t)=>(0,n.jsx)("div",{className:(0,i.$)("flex",E.length+A.length>=2?"w-1/2":"w-fit"),children:(0,n.jsx)("div",{className:(0,i.$)("mt-6 flex flex-1 flex-col justify-center",0===t?"mr-1":"ml-1"),children:(0,n.jsx)(X,{BlockMapper:l,block:{...e,elements:{...e.elements,url:"".concat(e.elements.url,"?returnUrl=").concat(m)}},className:(0,i.$)("mb-2 h-full text-white",I,"!important"),globalConfig:r,page:o,variant:null!=L?L:void 0})})},e.system.id)),A.map((e,t)=>{let a="ml-1";return 0===E.length&&(a=0===t?"mr-1":"ml-1"),(0,n.jsx)("div",{className:(0,i.$)("flex",E.length+A.length>=2?"w-1/2":"w-fit"),children:(0,n.jsx)("div",{className:(0,i.$)("mt-6 flex flex-1 flex-col justify-center",a),children:(0,n.jsx)(X,{BlockMapper:l,block:{...e,elements:{...e.elements,url:"".concat(e.elements.url,"?returnUrl=").concat(m)}},className:"mb-2 h-full",globalConfig:r,page:o,variant:null!=L?L:void 0})})},e.system.id)})]})})]})}):null]})},rt=e=>
1{let{dropDownData:t,label:l,onChange:a,className:s,id:r,codename:i}=e;return(0,n.jsx)("div",{className:s,"data-kontent-item-id":r,children:(0,n.jsxs)("select",{className:"xl rounded bg-white text-black","data-kontent-element-codename":i,defaultValue:"",id:r,onChange:e=>{a(e),(0,b.d)({event:"sorting_selected",sorting_name:e.target.value})},children:[(0,n.jsx)("option",{disabled:!0,value:"",children:(0,n.jsx)("div",{dangerouslySetInnerHTML:{__html:l}})}),t.map(e=>(0,n.jsx)("option",{value:e.value,children:(0,n.jsx)("div",{dangerouslySetInnerHTML:{__html:e.label}})},e.value+r))]})})};function rl(e,t,l){return"aZ"===t?e.toSorted((e,t)=>sp(e.elements.title,t.elements.title,l)):"zA"===t?e.toSorted((e,t)=>sp(t.elements.title,e.elements.title,l)):"recommended"===t?e.toSorted((e,t)=>{var l,n;return(null!=(l=e.elements.listerOrderNumber)?l:1/0)-(null!=(n=t.elements.listerOrderNumber)?n:1/0)}):e}function rn(e){return[{value:"aZ",label:g(e.elements.aZ.value,"A-Z")},{value:"zA",label:g(e.elements.zA.value,"Z-A")},{value:"recommended",label:g(e.elements.recommended.value,"Recommended")}]}function ra(e,t){return[...[{taxonomy:"species",terms:e}].map(e=>({...e,terms:e.terms.filter(Boolean)})).filter(e=>e.terms.length>0),...Object.entries(t).map(e=>{let[t,l]=e;return{taxonomy:t,terms:"checkboxOptions"in l?l.checkboxOptions.filter(e=>e.checked).map(e=>e.codename):[l.value]}})]}var rs=l(64965);function rr(e,t){return[...[{taxonomy:"species_taxonomy",terms:[e]}].map(e=>({...e,terms:e.terms.filter(Boolean)})).filter(e=>e.terms.length>0),...Object.entries(t).map(e=>{let[t,l]=e;return{taxonomy:"species"===t?"species_taxonomy":t,terms:"checkboxOptions"in l?l.checkboxOptions.filter(e=>e.checked).map(e=>e.codename):[l.value]}})]}let ri=e=>{let{block:t}=e,l=(0,a.useRouter)(),[r,i]=(0,s.useState)(t.elements.productId);return(0,s.useEffect)(()=>{i(("string"==typeof l.query.sku?l.query.sku:void 0)||t.elements.productId)},[l.query.sku,t.elements.productId]),(0,n.jsx)("div",{"data-bv-product-id":r,"data-bv-show":"rating_summary","data-kontent-element-codename":"product_id"})},ro=()=>{let e=(0,a.useRouter)();return(0,s.useEffect)(()=>{let{sku:t,offerId:l}=e.query,n=Array.isArray(t)?t[0]:t,a=Array.isArray(l)?l[0]:l;if(!n||!a)return void console.error("Missing required parameters - sku or offerId not found");let s=!1,r=()=>{if(s)return;let e=document.querySelector("#pear-pdp-target iframe");if(e&&e instanceof HTMLIFrameElement)try{let t=new URL(e.src),l=t.pathname.split("/"),r=l.indexOf("agnostic-pdp-label");-1!==r&&l[r+1]&&(l[r+1]=a,t.pathname=l.join("/"));let i=new URLSearchParams(t.search);i.set("sku",n),i.set("offerId",a),i.set("childId","pear-widget-iframe-wrap-".concat(a));let o=i.get("parentUrl");if(o)try{let e=new URL(decodeURIComponent(o)),t=new URLSearchParams(e.search);t.set("sku",n),t.set("offerId",a),e.search=t.toString(),i.set("parentUrl",e.toString())}catch(e){console.error("Error updating parentUrl:",e)}t.search=i.toString(),e.src=t.toString(),s=!0}catch(e){console.error("Error updating iframe URL:",e)}};if(r(),!s){let e=document.getElementById("pear-pdp-target");if(!e)return;let t=new MutationObserver(()=>{r(),s&&t.disconnect()});return t.observe(e,{childList:!0,subtree:!0}),()=>{t.disconnect()}}},[e.query]),(0,n.jsx)("div",{"data-kontent-element-codename":"pear_commerce_widget_guidelines",id:"pear-pdp-target"})},rc=e=>{let{block:t,page:l}=e,{colorId:r}=G({pageConfig:l.elements.config[0]}),o=r?"border-".concat(r):"border-primary",c=r?"border-".concat(r," border-3"):"border-primary border-3",d=(0,a.useRouter)(),m=(0,s.useMemo)(()=>(Array.isArray(t.elements.sizeSelector)?t.elements.sizeSelector:[]).map(e=>({size:e.elements.size,quantities:(Array.isArray(e.elements.quantitySelector)?e.elements.quantitySelector:[]).map(e=>({quantity:e.elements.quantity,productId:e.elements.elancoProductId,system:e.system,pearOfferId:e.elements.pearOfferId})),system:e.system})),[t.elements.sizeSelector]),[u,h]=(0,s.useState)(0),[p,x]=(0,s.useState)(0),[f,g]=(0,s.useState)(!1),v=(0,s.useRef)(!0),b=(0,s.useRef)(0),y=(0,s.useMemo)(()=>m[u],[m,u]),j=(0,s.useMemo)(()=>{var e;return null!=(e=null==y?void 0:y.quantities)?e:[]},[y]),w=(0,s.useMemo)(()=>j[p],[j,p]),N=(0,s.useMemo)(()=>null==w?void 0:w.productId,[w]),_=(0,s.useMemo)(()=>m.length>1,[m.length]),k=(0,s.useMemo)(()=>null==w?void 0:w.pearOfferId,[w]);return(0,s.useEffect)(()=>{var e,t,l,n;if(f)return;if(!m.length||!(null==(t=m[0])||null==(e=t.quantities)?void 0:e.length))return void g(!0);let a="string"==typeof d.query.sku?d.query.sku:void 0,s=0,r=0,i=!1;if(a){let e=((e,t)=>{if(!t||"string"!=typeof t||!e.length)return null;for(let l=0;l<e.length;l++){let n=e[l];
1if(n&&n.quantities.length)for(let e=0;e<n.quantities.length;e++){let a=n.quantities[e];if((null==a?void 0:a.productId)===t)return{sizeIdx:l,quantityIdx:e}}}return null})(m,a);e?(s=e.sizeIdx,r=e.quantityIdx):i=!0}else i=!0;if(h(s),x(r),b.current=s,g(!0),i){let e=null==(n=m[s])||null==(l=n.quantities[r])?void 0:l.productId;e&&d.replace({pathname:d.asPath.split("?")[0],query:{sku:e}},void 0,{shallow:!0})}},[d,m,f]),(0,s.useEffect)(()=>{f&&v.current?v.current=!1:f&&!v.current&&b.current!==u&&(x(0),b.current=u)},[f,u]),(0,s.useEffect)(()=>{f&&N&&d.query.sku!==N&&d.replace({pathname:d.asPath.split("?")[0],query:{sku:N,offerId:k}},void 0,{shallow:!0})},[N,k,d,f]),(0,n.jsxs)("div",{className:"flex flex-col items-start gap-6",children:[_?(0,n.jsxs)("div",{children:[(0,n.jsx)("div",{className:"mb-2 text-sm font-semibold",children:"Pet weight"}),(0,n.jsx)("div",{className:"flex flex-wrap gap-4",children:m.map((e,t)=>(0,n.jsx)("button",{className:(0,i.$)("flex min-w-[64px] items-center justify-center rounded-lg border px-3 py-2 text-sm font-bold leading-5 transition-all duration-150",o,u===t?[c,"shadow"]:[]),"data-kontent-element-codename":"size","data-kontent-item-id":e.system.id,onClick:()=>{h(t),x(0)},type:"button",children:e.size},e.size))})]}):null,j.length>0&&(0,n.jsxs)("div",{children:[(0,n.jsx)("div",{className:"mb-2 text-sm font-semibold",children:"Quantity"}),(0,n.jsx)("div",{className:"flex flex-wrap gap-4",children:j.map((e,t)=>(0,n.jsx)("button",{className:(0,i.$)("flex min-w-[64px] items-center justify-center rounded-lg border px-3 py-2 text-sm font-bold leading-5 transition-all duration-150",o,p===t?[c,"shadow"]:[]),"data-kontent-element-codename":"quantity","data-kontent-item-id":e.system.id,onClick:()=>{x(t)},type:"button",children:e.quantity},e.quantity))})]})]})};var rd=l(18225),rm=l.n(rd);let ru={openAccordionId:null,listeners:new Set,setOpenAccordion(e){this.openAccordionId=e,this.listeners.forEach(t=>{t(e)})},subscribe(e){return this.listeners.add(e),()=>this.listeners.delete(e)}},rh=(0,s.createContext)(null),rp=e=>{let{block:t,page:l,BlockMapper:a,globalConfig:r}=e,o=t.elements.groupTitle,d=t.elements.descriptionRichText,m=t.system.id,[u,h]=(0,s.useState)(!1),p=(0,s.useContext)(rh);(0,s.useEffect)(()=>{let e=ru.subscribe(e=>{h(e===m)});return()=>{e()}},[m]);let x=p?p.openAccordionId===m:u,f=p?()=>{p.setOpenAccordionId(x?null:m)}:()=>{let e=!u;ru.setOpenAccordion(e?m:null)},{colorId:g}=G({pageConfig:l.elements.config[0]}),v=eI(g);return o||d.value?(0,n.jsx)("div",{className:"pdp-accordion mx-auto first:border-t-2 first:border-gray-200","data-kontent-element-codename":"pdp_header_accordion",children:(0,n.jsxs)("div",{className:"border-b-2 border-gray-200 bg-white",children:[(0,n.jsxs)("button",{"aria-controls":"accordion-content-".concat(m),"aria-expanded":x,className:(0,i.$)("hover:bg-gray-50 flex w-full items-center justify-between bg-white px-4 py-4 text-left transition-colors duration-200 focus:outline-none focus-visible:ring-2 focus-visible:ring-blue-500"),onClick:f,type:"button",children:[(0,n.jsx)("span",{className:"text-gray-900 text-lg font-semibold",children:o}),(0,n.jsx)("svg",{className:(0,i.$)("h-6 w-6 transition-transform duration-200 ".concat(v.text),x?"rotate-180":"rotate-0"),fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,n.jsx)("path",{d:"M19 9l-7 7-7-7",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2})})]}),x?(0,n.jsx)("div",{className:"bg-white pb-4",id:"accordion-content-".concat(m),children:(0,n.jsx)("div",{className:"text-gray-900 px-4 text-base leading-relaxed",children:(0,n.jsx)(c.rM,{BlockMapper:a,element:d,globalConfig:r,page:l})})}):null]})}):null},rx=e=>{let{block:t,BlockMapper:l,globalConfig:a,page:r}=e,[i,o]=(0,s.useState)(!1),{buttonText:d,icon:m,description:u}=t.elements,h=m[0],{brandColor:p,brandColorClasses:x}=(0,s.useMemo)(()=>{let{colorId:e}=G({pageConfig:r.elements.config[0]}),t=eI(e);return{brandColor:e,brandColorClasses:t}},[r.elements.config]),g=()=>{o(!1)};return(0,s.useEffect)(()=>{let e=e=>{"Escape"===e.key&&i&&g()},t=e=>{i&&e.target.classList.contains("bg-black/50")&&g()};if(i)return document.addEventListener("keydown",e),document.addEventListener("click",t),()=>{document.removeEventListener("keydown",e),document.removeEventListener("click",t)}},[i]),(0,n.jsxs)("div",{className:"inline-block",children:[(0,n.jsxs)("button",{"aria-expanded":i,"aria-haspopup":"dialog",className:"inline-flex items-center gap-2 rounded border-2 px-3 py-1 text-sm font-bold transition-all duration-200 hover:shadow-sm focus:outline-none focus:ring-2 focus:ring-offset-2 ".concat(x.border," bg-white ").concat(x.text," hover:bg-gray-50 focus:ring-").concat(p||"elanco-blue"),onClick:()=>{o(!0)},type:"button",children:[h?(0,n.jsx)(f(),{alt:"",className:"h-5 w-5 flex-shrink-0",height:20,loader:v.L,src:h.url,width:20}):null,d]}),i?(0,n.jsx)(eE,{brandColor:p||"elanco-blue",isOpen:i,onClose:g,size:"lg",variant:"right-slide",children:(0,n.jsx)("div",{className:"prose prose-sm max-w-none",children:(0,n.jsx)(c.rM,{BlockMapper:l,element:u,globalConfig:a,page:r})})}):null]})};var rf=l(90737),rg=l.n(rf);let rv="video",rb=e=>(null==e?void 0:e.type)===rv?rv:"image";function ry(e){if(!e)return"";let t=(0,eT.f3)(e);return null!=t?t:e}function rj(e,t,l,n){let a=arguments.length>4&&void 0!==arguments[4]&&arguments[4];if(l>4){let s=e.querySelector(".thumbnail-item"),r=n?110:80;s&&(r=a?s.offsetWidth:s.offsetHeight);let i=Math.floor((a?e.offsetWidth:e.offsetHeight)/r),o=Math.max(0,t-1),c=(o=Math.min(o,Math.max(0,l-i)))*r;e.scrollTo({[a?"left":"top"]:c,behavior:"smooth"})}}let rw=e=>{let{onClick:t,arrowColor:l,onKeyboardActivate:a}=e,s=ry(l),r=()=>{null==t||t(),null==a||a()};return(0,n.jsx)("button",{"aria-label":"Previous image",className:"absolute !left-[-35px] top-1/2 z-10 !mt-0 flex !h-8 !w-8 -translate-y-1/2 items-center justify-center rounded-full shadow-lg after:!content-none md:!left-[-4rem] md:!h-9 md:!w-9 bg-".concat(l," hover:bg-").concat(l,"/90"),onClick:()=>{r()},onKeyDown:e=>
1{("Enter"===e.key||" "===e.key)&&(e.preventDefault(),e.stopPropagation(),r())},type:"button",children:(0,n.jsx)("svg",{className:"h-6 w-6 md:h-8 md:w-8",fill:"none",stroke:"#ffffff"===s?"black":"white",strokeWidth:2,viewBox:"0 0 24 24",children:(0,n.jsx)("path",{d:"M19 12H5m0 0l7 7m-7-7l7-7",strokeLinecap:"round",strokeLinejoin:"round"})})})},rN=e=>{let{onClick:t,arrowColor:l,onKeyboardActivate:a}=e,s=ry(l),r=()=>{null==t||t(),null==a||a()};return(0,n.jsx)("button",{"aria-label":"Next image",className:"absolute !right-[-35px] top-1/2 z-10 !mt-0 flex !h-8 !w-8 -translate-y-1/2 items-center justify-center rounded-full shadow-lg after:!content-none md:!right-[-4rem] md:!h-9 md:!w-9 bg-".concat(l," hover:bg-").concat(l,"/90"),onClick:()=>{r()},onKeyDown:e=>{("Enter"===e.key||" "===e.key)&&(e.preventDefault(),e.stopPropagation(),r())},type:"button",children:(0,n.jsx)("svg",{className:"h-6 w-6 md:h-8 md:w-8",fill:"none",stroke:"#ffffff"===s?"black":"white",strokeWidth:2,viewBox:"0 0 24 24",children:(0,n.jsx)("path",{d:"M5 12h14m0 0l-7-7m7 7l-7 7",strokeLinecap:"round",strokeLinejoin:"round"})})})},r_=(0,s.forwardRef)((e,t)=>{var l;let{mediaItems:a,config:r={},className:o,containerClassName:c,mainImageClassName:d,thumbnailClassName:m,fullWidth:u=!1,productTitleText:h,enlargeImageText:p,enlargeVideoText:x,onMediaChange:g,renderVideoComponent:b}=e,{enableZoom:y=!0,autoplay:j=!1,autoplaySpeed:w=3e3,enableLazy:N=!0,showThumbnails:_=!0,thumbnailPosition:k="left",position:C="right",arrowColor:S="elanco-blue"}=r,[L,T]=(0,s.useState)(0),[I,E]=(0,s.useState)(""),[A,F]=(0,s.useState)(!1),[B,M]=(0,s.useState)(null),[P,D]=(0,s.use
1State)(!1),R=(0,s.useRef)(null),q=(0,s.useRef)(null),z=(0,s.useRef)(null),O=(0,s.useRef)(null),U=(0,s.useRef)(null),$=(0,s.useRef)(null),H=(0,s.useRef)(null),V=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"border-elanco-blue";if(!e)return t;let l=(0,eT.oU)(e)||(0,eT.ps)(e);return l?"border-".concat(l.id):t}(S),Z=ry(S),G=(0,s.useCallback)(e=>{q.current&&rj(q.current,e,a.length,u)},[a.length,u]),W=(0,s.useCallback)(e=>{z.current&&rj(z.current,e,a.length,u,!0)},[a.length,u]),K=(0,s.useCallback)(()=>O.current?function(e){let t=e.querySelector(".slick-navigation-container");if(t){let e=t.offsetHeight;return"".concat(e,"px")}let l=e.offsetHeight;return"".concat(l-50,"px")}(O.current):"calc(100vh - 200px)",[]);(0,s.useEffect)(()=>{let e=()=>{if(!P&&q.current&&O.current){let e=K();q.current.style.height=e}},t=setTimeout(e,100),l=()=>{e()};return window.addEventListener("resize",l),()=>{clearTimeout(t),window.removeEventListener("resize",l)}},[K,a.length,u,P]),(0,s.useEffect)(()=>{let e=()=>{let e=window.innerWidth<768;D(e),P&&!e&&q.current&&O.current&&setTimeout(()=>{if(q.current&&O.current){let e=K();q.current.style.height=e}},100),!P&&e&&q.current&&(q.current.style.height="auto")};return e(),window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}}
1,[P,K]);let Y=(0,s.useCallback)(e=>{T(e),R.current&&R.current.slickGoTo(e),G(e)},[G]),Q=(0,s.useCallback)(e=>{T(e),G(e);let t=a[e];g&&t&&g(t,e)},[g,a,G]),X=(0,s.useCallback)(()=>{let e=L>0?L-1:a.length-1;T(e);let t=rb(a[e]);E("Previous ".concat(t,". Now showing ").concat(t," ").concat(e+1," of ").concat(a.length)),R.current&&R.current.slickGoTo(e),Q(e)},[L,a,Q]),J=(0,s.useCallback)(()=>{let e=L<a.length-1?L+1:0;T(e);let t=rb(a[e]);E("Next ".concat(t,". Now showing ").concat(t," ").concat(e+1," of ").concat(a.length)),R.current&&R.current.slickGoTo(e),Q(e)},[L,a,Q]),ee=(0,s.useCallback)(()=>{let e=a[L];y&&e&&(M(e),F(!0))},[y,a,L]),et=(0,s.useCallback)(()=>{F(!1),M(null),setTimeout(()=>{H.current&&H.current.focus()},100)},[]);(0,s.useEffect)(()=>{A&&$.current&&$.current.focus()},[A]),(0,s.useEffect)(()=>{let e=e=>{if("Escape"===e.key&&A)return void et();if(A&&"Tab"===e.key&&U.current){var t;let l;e.preventDefault();let n=Array.from(U.current.querySelectorAll('button, [tabindex="0"], [role="button"][tabindex="0"]')).filter(e=>!e.disabled&&null!==e.offsetParent&&"hidden"!==getComputedStyle(e).visibility);if(0===n.length)return;let a=n.findIndex(e=>e===document.activeElement);l=e.shiftKey?a<=0?n.length-1:a-1:a>=n.length-1?0:a+1,null==(t=n[l])||t.focus()}};if(A)return document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e)}},[A,et]),(0,s.useEffect)(()=>{let e=O.current;e&&e.querySelectorAll('.slick-track button, .slick-track [href], .slick-track input, .slick-track select, .slick-track textarea, .slick-track [tabindex]:not([tabindex="-1"]), .slick-track iframe, .slick-track video, .slick-track audio').forEach(e=>{e.setAttribute("tabindex","-1")})},[a,L]),(0,s.useEffect)(()=>{G(L),A&&W(L)},[L,G,W,A]);let el=(0,s.useCallback)(e=>{let t=e.thumbnail?(0,n.jsx)(f(),{alt:e.alt||e.title||"Video thumbnail",className:"h-full w-full object-cover",height:80,loader:v.L,src:e.thumbnail,width:80}):(0,n.jsx)("div",{className:"flex h-full w-full items-center justify-center bg-gray-200",children:(0,n.jsx)("div",{className:"text-xs text-gray-500",children:"Video"})});return(0,n.jsxs)("div",{className:"relative h-full w-full",children:[t,(0,n.jsx)("div",{className:"pointer-events-none absolute inset-0 flex items-center justify-center",children:(0,n.jsx)("div",{className:"flex h-6 w-6 items-center justify-center rounded-full bg-black bg-opacity-60",children:(0,n.jsx)("svg",{className:"h-3 w-3 text-white",fill:"currentColor",viewBox:"0 0 24 24",children:(0,n.jsx)("path",{d:"M8 5v14l11-7z"})})})})]})},[]),en=(0,s.useCallback)(function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],l=arguments.length>2&&void 0!==arguments[2]&&arguments[2],a=arguments.length>3&&void 0!==arguments[3]&&arguments[3],s=arguments.length>4?arguments[4]:void 0;if("video"===e.type)return t&&b?b(e,l):el(e);let r=!a||void 0===s||s===L||1>=Math.abs(s-L)||t;return(0,n.jsx)("div",{className:(0,i.$)("relative flex items-center justify-center ",t?"aspect-[4/3]":"h-full w-full"),children:a&&t&&!r?(0,n.jsx)("div",{className:"flex h-full w-full items-center justify-center bg-gray-100",children:(0,n.jsx)("div",{className:"border-gray-900 h-8 w-8 animate-spin rounded-full border-b-2"})}):(0,n.jsx)(f(),{alt:e.alt||e.title||"Product image",className:"h-full w-full object-contain",height:t?400:80,loader:v.L,src:e.url,width:t?400:80})})},[b,el,L]),ea={dots:a.length>1,dotsClass:"slick-dots",infinite:a.length>1,speed:500,slidesToShow:1,slidesToScroll:1,autoplay:j,autoplaySpeed:w,arrows:a.length>1,prevArrow:(0,n.jsx)(rw,{arrowColor:S,onKeyboardActivate:X}),nextArrow:(0,n.jsx)(rN,{arrowColor:S,onKeyboardActivate:J}),beforeChange:(e,t)=>
1{Q(t)},afterChange:e=>{T(e)}};return 0===a.length?(0,n.jsx)("div",{className:"flex h-96 items-center justify-center rounded-lg bg-gray-100",children:(0,n.jsx)("p",{className:"text-gray-500",children:"No media available"})}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("div",{"aria-atomic":"true","aria-live":"polite",className:"sr-only",children:I}),(0,n.jsx)("div",{"aria-label":"Product image carousel with ".concat(a.length," ").concat(1===a.length?"image":"images"),className:function(e,t,l){return(0,i.$)("pdp-slider-container w-full",{left:"",center:"mx-auto",right:"ml-auto",full:"w-full"}[e],t||"full"===e?"":"max-w-2xl",l)}(C,u,o),role:"region",children:(0,n.jsxs)("div",{className:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"left";return(0,i.$)("bottom"===t?"mx-3 flex flex-col":"mx-3 flex flex-col md:flex-row",e)}(c,k),children:[_&&a.length>1?(0,n.jsx)("div",{className:(0,i.$)(function(e,t){let l="flex justify-center",n=t?"md:w-32":"md:w-24";switch(e){case"bottom":return"".concat(l," order-2 mt-4 md:order-2 md:mt-4 md:w-full md:flex-row");case"right":return"".concat(l," order-2 ml-4 md:order-2 md:ml-4 ").concat(n," md:flex-col md:justify-start");default:return"".concat(l," order-2 mt-4 md:order-1 md:mt-0 ").concat(n," md:flex-col md:justify-start")}}(k,u),m,"hidden md:flex"),children:(0,n.jsx)("div",{className:(0,i.$)("flex scrollbar-none","bottom"===k?"flex-row gap-2 overflow-x-auto":"flex-col overflow-y-auto"),ref:q,children:a.map((e,t)=>{let l=u?"100px":"70px";return(0,n.jsx)("div",{"aria-current":L===t?"true":void 0,"aria-label":"".concat("video"===rb(e)?"Video":"Image"," ").concat(t+1," of ").concat(a.length).concat(e.alt?": ".concat(e.alt):""),className:(0,i.$)("thumbnail-item flex-shrink-0 cursor-pointer overflow-hidden border-2 transition-all duration-200 hover:shadow-sm","bottom"===k?"mr-2":"mb-2",L===t?"border-2 ".concat(V):"border-gray-200 hover:border-gray-300"),onClick:()=>{Y(t)},onKeyDown:e=>{("Enter"===e.key||" "===e.key)&&(e.preventDefault(),Y(t))},role:"button",style:"bottom"===k?{width:l,height:l}:{height:l},tabIndex:0,children:en(e)},"desktop-thumb-".concat(e.id))})})}):null,(0,n.jsxs)("div",{className:(0,i.$)(function(e,t){let l=function(e){let t="relative flex-1";switch(e){case"bottom":case"right":return"".concat(t," order-1 md:order-1");default:return"".concat(t," order-1 md:order-2")}}(e);return(0,i.$)(l," px-12 pb-4 md:px-16",t)}(k,d),rg().sliderContainer),ref:O,style:{"--dots-active-color":Z,"--dots-inactive-color":"".concat(Z,"66"),"--dots-hover-color":"".concat(Z,"CC")},children:[(0,n.jsx)("div",{"aria-label":"".concat("video"===rb(a[L])?"Video":"Image"," ").concat(L+1," of ").concat(a.length),className:"slick-navigation-container relative aspect-[4/3]",onKeyDown:e=>{("Enter"===e.key||" "===e.key)&&(e.preventDefault(),y&&ee())},role:"button",tabIndex:0,children:(0,n.jsx)("div",{children:(0,n.jsx)(er.default,{...ea,ref:R,children:a.map((e,t)=>(0,n.jsx)("div",{children:(0,n.jsx)("div",{className:(0,i.$)("transition-opacity duration-200",y&&P?"cursor-pointer hover:opacity-90":"cursor-default"),onClick:()=>{y&&P&&ee()},onKeyDown:e=>{y&&!P&&("Enter"===e.key||" "===e.key)&&(e.preventDefault(),ee())},role:y&&!P?"button":void 0,tabIndex:y&&!P?0:-1,children:en(e,!0,!1,N,t)})},e.id))})})}),y&&a[L]?(0,n.jsx)("div",{className:"mt-2 hidden justify-center md:flex lg:-mt-7 xl:-mt-2",children:(0,n.jsxs)("button",{className:"text-blue-600 flex items-center gap-1 text-sm underline hover:text-blue-800",onClick:ee,ref:H,type:"button",children:[(0,n.jsx)("svg",{className:"h-4 w-4",fill:"none",stroke:"currentColor",strokeWidth:2,viewBox:"0 0 24 24",children:(0,n.jsx)("path",{d:"M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0zM10 7v3m0 0v3m0-3h3m-3 0H7",strokeLinecap:"round",strokeLinejoin:"round"})}),(null==(l=a[L])?void 0:l.type)==="image"?p:x]})}):null]})]})}),A&&B?(0,lo.createPortal)((0,n.jsx)("div",{"aria-label":"Enlarged media view","aria-modal":"true",className:"fixed inset-0 z-[9999] flex items-center justify-center bg-black bg-opacity-75",role:"dialog",tabIndex:-1,children:(0,n.jsxs)("div",{className:"relative flex h-[85vh] w-[90vw] max-w-6xl flex-col overflow-hidden bg-white shadow-2xl lg:flex-row",ref:U,children:[(0,n.jsx)("div",{className:"relative flex flex-1 items-center justify-center bg-white p-4 pt-16",children:"video"===B.type&&b?b(B,!0):(0,n.jsx)(f(),{alt:B.alt||B.title||"Enlarged image",className:"max-h-full max-w-full object-contain",height:600,loader:v.L,src:B.url,width:800})}),a.length>1?(0,n.jsxs)("div",{className:"bg-gray-50 p-4",children:[h?(0,n.jsx)("div",{className:"mb-2 text-left lg:mb-2",children:(0,n.jsx)("h3",{className:"text-gray-900 text-lg font-semibold",children:h})}):null,(0,n.jsx)("div",{className:"flex gap-2 overflow-x-auto scrollbar-none lg:hidden",ref:z,children:a.map((e,t)=>(0,n.jsx)("div",{"aria-label":"".concat("video"===rb(e)?"Video":"Image"," ").concat(t+1," of ").concat(a.length).concat(e.alt?": ".concat(e.alt):""),className:(0,i.$)("thumbnail-item h-16 w-16 flex-shrink-0 cursor-pointer overflow-hidden border-2 transition-all duration-200",L===t?"border-2 ".concat(V):"border-gray-200 hover:border-gray-300"),onClick:()=>{T(t),M(e),W(t),R.current&&R.current.slickGoTo(t)},onKeyDown:l=>
1{("Enter"===l.key||" "===l.key)&&(l.preventDefault(),T(t),M(e),W(t),R.current&&R.current.slickGoTo(t))},role:"button",tabIndex:0,children:en(e,!1,!0)},"modal-mobile-thumb-".concat(e.id)))}),(0,n.jsx)("div",{className:"hidden max-h-[calc(85vh-6rem)] w-[18vw] overflow-y-auto pt-2 scrollbar-none lg:block",style:{minWidth:"120px",maxWidth:"200px"},children:(0,n.jsx)("div",{className:"grid grid-cols-2 gap-2",children:a.map((e,t)=>(0,n.jsx)("div",{"aria-label":"".concat("video"===rb(e)?"Video":"Image"," ").concat(t+1," of ").concat(a.length).concat(e.alt?": ".concat(e.alt):""),className:(0,i.$)("aspect-square cursor-pointer overflow-hidden border-2 transition-all duration-200 hover:shadow-md",L===t?"border-2 ".concat(V):"border-gray-200 hover:border-gray-300"),onClick:()=>{T(t),M(e),R.current&&R.current.slickGoTo(t)},onKeyDown:l=>{("Enter"===l.key||" "===l.key)&&(l.preventDefault(),T(t),M(e),R.current&&R.current.slickGoTo(t))},role:"button",tabIndex:0,children:(0,n.jsx)("div",{className:"h-full w-full",children:en(e,!1,!0)})},"modal-desktop-thumb-".concat(e.id)))})})]}):null,(0,n.jsx)("button",{"aria-label":"Close enlarged view",className:"text-gray-900 absolute left-4 top-4 z-10 flex h-10 w-10 items-center justify-center",onClick:et,ref:$,type:"button",children:(0,n.jsx)("svg",{className:"h-6 w-6",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,n.jsx)("path",{d:"M6 18L18 6M6 6l12 12",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2})})})]})}),document.body):null]})});r_.displayName="MediaSlider";let rk=e=>{let{block:t,config:l={},pageConfig:a,onMediaChange:r,className:i,containerClassName:o="",mainImageClassName:c="",thumbnailClassName:d=" p-3",fullWidth:m=!0,...u}=e,h=a||u.page.elements.config[0],{colorId:p}=G({blockColor:t.elements.brandColor,pageConfig:h,fallbackColorId:"elanco-blue"}),x=(0,s.useMemo)(()=>{let e=t.elements.videoImage;return Array.isArray(e)?e.map((e,t)=>{if("image"===e.system.type){let l=e.elements.image[0];if(l)return{id:e.system.id||"image-".concat(t),url:String(l.url||""),type:"image",alt:String(l.description||"Image ".concat(t+1)),title:e.system.name||void 0}}if("wistia"===e.system.type||"video_block"===e.system.type)try{let l=l9(e),n="";if("video_block"===e.system.type){let t=e.elements.posterFrameImage[0];n=(null==t?void 0:t.url)||""}else{let t=e.elements.cookieFallbackImage[0];n=(null==t?void 0:t.url)||""}return{id:e.system.id||"".concat(l.type,"-").concat(t),url:String(l.videoId),type:"video",videoType:l.type,alt:String("wistia"===e.system.type?e.elements.alt||"Wistia Video ".concat(t+1):e.elements.videoTitle||"YouTube Video ".concat(t+1)),title:e.system.name||void 0,thumbnail:n}}catch(t){(0,eF.vV)(t),(0,eF.OG)("PDP Slider context: Processing ".concat(e.system.type," failed for item ").concat(e.system.id))}return null}).filter(e=>null!==e):[]},[t.elements.videoImage]),f=(0,s.useCallback)(function(e){let l=arguments.length>1&&void 0!==arguments[1]&&arguments[1],a=t.elements.videoImage.find(t=>t.system.id===e.id);return a&&"video"===e.type?"wistia"===e.videoType?(0,n.jsx)("div",{className:"h-full w-full",children:(0,n.jsx)(tC,{block:a,className:"h-full w-full",...u,...l&&{interactive:!0}})}):"youtube"===e.videoType?(0,n.jsx)("div",{className:"h-full w-full",children:(0,n.jsx)(tA,{block:a,className:"h-full w-full",...u})}):(0,n.jsx)("div",{className:"bg-gray-50 relative flex h-full w-full items-center justify-center",children:(0,n.jsx)("div",{className:"text-gray-500",children:"Unsupported video type"})}):(0,n.jsx)("div",{children:"Invalid video content"})},[t.elements.videoImage,u]),g={arrowColor:p||"elanco-blue",...l,position:"left"};return(0,n.jsx)("div",{"data-kontent-element-codename":t.system.codename,children:(0,n.jsx)(r_,{className:i,config:g,containerClassName:o,enlargeImageText:t.elements.enlargeTextImage||"Enlarge Image",enlargeVideoText:t.elements.enlargeTextVideo||"Enlarge Video",fullWidth:m,mainImageClassName:c,mediaItems:x,onMediaChange:r,productTitleText:t.elements.productTitle,renderVideoComponent:f,thumbnailClassName:d})})},rC=e=>{let{block:t,BlockMapper:l,globalConfig:a,page:r}=e,{findAVetCardTitle:i,findAVetCardImage:o,findAVetCardDescription:c,pdpFindAVetCardCtaButton:d}=t.elements,m=o[0],u=d[0],{brandColor:h}=(0,s.useMemo)(()=>{let{colorId:e}=G({pageConfig:r.elements.config[0]});return{brandColor:e}},[r.elements.config]);return(0,n.jsxs)("div",{className:"flex h-full flex-col",children:[!!i&&(0,n.jsx)("h2",{className:"mb-4 text-xl font-semibold text-black",children:i}),(0,n.jsxs)("div",{className:"mb-4 flex flex-1 flex-col gap-4 xxs:flex-row xs:flex-row xs:items-start",children:[!!m&&(0,n.jsx)("div",{className:"relative h-32 w-full overflow-hidden rounded-lg bg-gray-100 xxs:h-24 xxs:w-24 xs:h-24 xs:w-24 xs:flex-shrink-0",children:(0,n.jsx)(f(),{alt:(null==m?void 0:m.description)||"Find a vet map",className:"object-cover",fill:!0,loader:v.L,src:(null==m?void 0:m.url)||""})}),!!c&&(0,n.jsx)("div",{className:"flex-1",children:(0,n.jsx)("p",{className:"text-base font-semibold leading-[1.3] text-black",children:c})})]}),u&&u?(0,n.jsx)("div",{className:"w-full",children:(0,n.jsx)(X,{BlockMapper:l,block:u,className:"bg-green-700 hover:bg-green-800 w-full rounded px-4 py-3 text-center font-medium text-white transition-colors duration-200",globalConfig:a,page:r,variant:null!=h?h:void 0})}):null]})},rS=(0,s.memo)(e=>{var t,l;let{block:s,BlockMapper:r,globalConfig:i,page:o}=e,{slider:c,title:d,productLabelText:m,productLabelUrl:u,safetyDataText:h,safetyDataUrl:p,description:x,ratings:f,skuProvider:g,pearCommerce:v,pdpHeaderAccordion:y,pdpPopupRebates:j,pdpPopupRichText:w,pdpWithFindAVetCard:N,buyOnlineCta:_,findVetCta:k}=s.elements,{colorId:C}=G({pageConfig:o.elements.config[0]}),S=eI(C),{locale:L="us"}=(0,a.useRouter)(),T="us"===L;return(0,n.jsx)("div",{className:"pdp-header-container mx-auto max-w-7xl px-4 py-4 sm:px-6 sm:py-6 lg:px-8 lg:py-8","data-kontent-element-codename":"pdp_header_block",children:(0,n.jsxs)("div",{className:"flex flex-col gap-4 lg:flex-row lg:gap-8 xl:gap-10",children:[(0,n.jsx)("div",{className:"order-1 hidden w-full lg:sticky lg:!top-20 lg:block lg:h-fit lg:w-[55%] lg:!pt-4 lg:pr-4",children:c.length>0&&c[0]?(0,n.jsx)("div",{"data-kontent-element-codename":"slider",children:(0,n.jsx)(rk,{BlockMapper:r,block:c[0],config:{thumbnailPosition:"bottom",position:"center",enableZoom:!0,showThumbnails:!0},globalConfig:i,mainImageClassName:"!px-4 md:!px-6",page:o,thumbnailClassName:"p-1"})}):null}),(0,n.jsxs)("div",{className:"order-2 flex-1 space-y-6 lg:order-2",children:[d?(0,n.jsx)("h1",{className:"text-gray-900 text-2xl font-bold lg:text-3xl","data-kontent-element-codename":"title",children:d}):null,m&&u||h&&p?(0,n.jsx)("div",{className:"flex flex-col gap-3 sm:flex-row sm:gap-4","data-kontent-element-codename":"product_label_text",children:(0,n.jsxs)("div",{className:"flex flex-wrap gap-3",children:[m&&u?(0,n.jsx)(D,{className:"!text-sm font-light not-italic",href:u,target:"_blank",variant:"none",children:m}):null,p&&h?(0,n.jsx)(D,{className:"ml-2 !text-sm font-light not-italic",href:p,target:"_blank",variant:"none",children:h}):null]})}):null,x?(0,n.jsx)("div",{className:"text-gray-900 hidden text-base leading-relaxed lg:block lg:text-base","data-kontent-element-codename":"description",children:x}):null,T&&f.length>0&&f[0]?(0,n.jsx)("div",{"data-kontent-element-codename":"ratings",children:(0,n.jsx)(ri,{BlockMapper:r,block:f[0],globalConfig:i,page:o})}):null,T&&j.length>0||T&&w.length>0?(0,n.jsxs)("div",{className:"flex flex-wrap items-center gap-3",children:[j.length>0&&j[0]?(0,n.jsx)("div",{"data-kontent-element-codename":"pdp_popup_rebates",children:(0,n.jsx)(re,{BlockMapper:r,block:j[0],globalConfig:i,page:o})}):null,w.length>0&&w[0]?(0,n.jsx)("div",{"data-kontent-element-codename":"pdp_popup_rich_text",children:(0,n.jsx)(rx,{BlockMapper:r,block:w[0],globalConfig:i,page:o})}):null]}):null,c.length>0&&c[0]?(0,n.jsx)("div",{className:"lg:hidden","data-kontent-element-codename":"slider",children:(0,n.jsx)(rk,{BlockMapper:r,block:c[0],config:{thumbnailPosition:"bottom",position:"center",enableZoom:!0,showThumbnails:!0},globalConfig:i,mainImageClassName:"!px-8 sm:!px-10",page:o,thumbnailClassName:"p-1"})}):null,x?(0,n.jsx)("div",{className:"text-gray-900 text-base leading-relaxed lg:hidden","data-kontent-element-codename":"description",children:x}):null,T&&g.length>0&&g[0]?(0,n.jsx)("div",{"data-kontent-element-codename":"sku_provider",children:(0,n.jsx)(rc,{BlockMapper:r,block:g[0],globalConfig:i,page:o})}):null,T?(0,n.jsxs)("div",{className:"flex flex-col gap-[20px]",children:[(0,n.jsx)("div",{children:N.length>0&&N[0]?(0,n.jsx)("p",{className:"text-[16px] font-black md:font-medium",children:N[0].elements.buyOrFindAVetCardTitle}):null}),(0,n.jsxs)("div",{className:"flex flex-col gap-[16px] md:flex-row md:gap-[10px]",children:[N.length>0&&N[0]?(0,n.jsx)("div",{className:"max-w-[328px] basis-4/6 rounded border-2 bg-white p-[16px] ".concat(S.border),"data-kontent-element-codename":"pdp_with_find_a_vet_card",children:(0,n.jsx)(rC,{BlockMapper:r,block:N[0],globalConfig:i,page:o})}):null,v.length>0&&v[0]?(0,n.jsx)("div",{className:"max-w-[362px] basis-5/6 rounded border-2 bg-white p-[16px] ".concat(S.border),"data-kontent-element-codename":"pear_commerce",children:(0,n.jsx)(ro,{BlockMapper:r,block:v[0],globalConfig:i,page:o})}):null]})]}):null,T?null:(0,n.jsxs)("div",{className:"flex w-full flex-col items-center gap-2 md:w-auto md:flex-row",children:[_[0]?(0,n.jsx)("div",{className:"-mt-2","data-kontent-item-id":_[0].system.id,children:(0,n.jsx)(e6,{BlockMapper:r,block:_[0],globalConfig:i,page:o})}):null,k[0]?(0,n.jsx)(B(),{href:k[0].elements.url,legacyBehavior:!0,passHref:!0,children:(0,n.jsx)(H.$,{"data-kontent-element-codename":"button_text",onClick:()=>{var e;(0,b.d)({event:"cta_click",cta_name:null==(e=k[0])?void 0:e.system.id,cta_category:"CTA_Button"})},variant:null!=(l=null==(t=k[0].elements.variant[0])?void 0:t.codename)?l:"primary",children:k[0].elements.text})}):null]}),y.length>0?(0,n.jsx)("div",{className:"w-full","data-kontent-element-codename":"pdp_header_accordion",children:y.map(e=>(0,n.jsx)(rp,{BlockMapper:r,block:e,globalConfig:i,page:o},e.system.id))}):null]})]})})});var rL=l(44087),rT=l(14580),rI=l(37646);function rE(e,t){let l=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e;return{label:e,value:l,id:t}}rE("Agricultural Merchant / Farm Store","agricultural_merchant_farm_store"),rE("Animal Shelter / Charity","animal_shelter_charity"),rE("Backgroun
1der Lot","backgrounder_lot"),rE("Beef Producer","beef_producer"),rE("Broilers","broilers"),rE("Buying Group","buying_group"),rE("Calf Production","calf_production"),rE("Beef Calf Ranch/Developer","beef_calf_ranch_developer","Beef Calf - Ranch / Developer"),rE("Cattle Buyer","cattle_buyer"),rE("Cooperative","cooperative","Co Operative"),rE("Corporate Office","corporate_office"),rE("Beef Cow/Calf Operation","beef_cow_calf_operation","Beef - Cow / Calf Operation"),rE("Dairy Producer","dairy_producer","Dairy Producer"),rE("Distributor / Agent","distributor_agent","Distributor / Agent"),rE("Feed Mill","feed_mill"),rE("Beef Feedyard","beef_feedyard","Beef - Feedyard"),rE("Beef Grower/Growyard","beef_grower_growyard","Beef - Grower / Growyard"),rE("Hatchery","hatchery"),rE("Dairy Heifer Production","dairy_heifer_production","Dairy - Heifer Production"),rE("Layer Integration","layer_integration"),rE("Layers","layers"),rE("Media","media"),rE("Dairy Milk Cooperative/Buyer","dairy_milk_cooperative_buyer","Dairy - Milk Cooperative / Buyer"),rE("Mixed/Other Producer","mixed_other_producer","Mixed / Other Producer"),rE("Nutrient Supplier","nutrient_supplier"),rE("Packer/Processor","packer_processor","Packer / Processor"),rE("Pet Retail Outlet","pet_retail_outlet","Pet Retail Outlet - Brick & Mortar"),rE("Pharmacy","pharmacy"),rE("Poultry Breeder","poultry_breeder"),rE("Poultry Integrator","poultry_integrator"),rE("Sheep Producer","sheep_producer"),rE("Stocker Operation","stocker_operation"),rE("Stockyard/Salebarn","stockyard_salebarn","Stockyard / Salebarn"),rE("Swine Producer","swine_producer"),rE("Turkeys","turkeys","Turkeys"),rE("University / Education","university_education"),rE("Veterinary Practice","veterinary_practice"),rE("Wholesaler / Retailer","wholesaler_retailer"),rE("Wool Buyer","wool_buyer"),rE("Cattle Grower/Growyard","cattle_grower_growyard"),rE("Calf Producer","calf_producer"),rE("Animal Health Advisory Services","animal_health_advisory_services"),rE("Calf Ranch / Developer","calf_ranch_developer"),rE("Beef - Stocker Operation","beef_stocker_operation"),rE("Heifer Production","heifer_production"),rE("Milk Cooperative / Buyer","milk_cooperative_buyer"),rE("Cow / Calf Operation","cow_calf_operation"),rE("Feedyard","feedyard"),rE("Dairy Production","dairy_production","Dairy Production"),rE("Grower / Growyard","grower_growyard"),rE("Distributor","distributor"),rE("Turkey Producer","turkey_producer","Turkey Producer"),rE("Contract Grower","contract_grower");let rA=[rE("Academic","academic"),rE("Animal Welfare - Other","animal_welfare_other"),rE("Animal Welfare - Retail Staff","animal_welfare_retail_staff"),rE("Animal Welfare - Vet","animal_welfare_vet"),rE("Animal Welfare - Vet Nurse","animal_welfare_vet_nurse"),rE("Animal Welfare - Volunteer","animal_welfare_volunteer"),rE("Beef / Feedlot Extension","beef_feedlot_extension"),rE("Beef Producer","beef_producer"),rE("Breeder","breeder"),rE("Business Administrator / Receptionist","business_administrator_receptionist"),rE("Business Owner / Partner","business_owner_partner"),rE("Consulting Nutritionist","consulting_nutritionist"),rE("Corporate Veterinary Employee (non-hospital)","corporate_employee_non_dvm","Corporate Employee Non DVM"),rE("Dairy Producer","dairy_producer"),rE("Distributor","distributor"),rE("Distributor Rep, Field Based","distributor_rep_field_based"),rE("Distributor Rep, Inside","distributor_rep_inside"),rE("Educational Institute - Highschool Student","educational_institution_highschool_student","Educational Institution - Highschool Student"),rE("Educational Institute - TAFE Student","educational_institution_tafe_student","Educational Institution - TAFE Student"),rE("Educational Institute - University Student","educational_institution_university_student","Educational Institution - University Student"),rE("Groomer","groomer"),rE("Medical/Clinic Director","medical_clinic_director","Medical / Clinic Director"),rE("Nutrition / Feed Sales","nutrition_feed_sales"),rE("Nutritional Professional","nutritional_professional"),rE("Nutritionist","nutritionist"),rE("Office/Practice Manager","office_practice_manager","Office / Practice Manager"),rE("OTC Retailer","otc_retailer"),rE("Pharmacist","pharmacist"),rE("Pharmacy - Staff","pharmacy_staff"),rE("Pig Producer","pig_producer"),rE("Poultry Producer","poultry_producer"),rE("Practice Owner, Non DVM","practice_owner_non_dvm"),rE("Producer - Mixed/Other","producer_mixed_other","Producer - Mixed / Other"),rE("Receptionist/Client Service","receptionist_client_service","Receptionist / Client Service"),rE("Reseller Store - Staff","reseller_store_staff"),rE("RAMA / SQP","sqp","SQP"),rE("Retailer","retailer"),rE("Sheep Producer","sheep_producer"),rE("Student RAMA","student_rama"),rE("Student","student"),rE("Tierarzt/Tier\xe4rztin","tierarzt_tierarztin","Tierarzt/ Tier\xe4rztin"),rE("Trainer","trainer"),rE("Veterinarian","veterinarian"),rE("Veterinarian, Practice Owner","veterinarian_practice_owner"),rE("Veterinary Assistant","veterinary_assistant"),rE("Veterinary Nurse","veterinary_nurse"),rE("Veterinary Practice - Other","veterinary_practice_other"),rE("Veterinary Practice - Vet","veterinary_practice_vet"),rE("Veterinary Practice - Vet Nurse","veterinary_practice_vet_nurse"),rE("Veterinary Specialist","veterinary_specialist"),rE("Veterinary Student","veterinary_student"),rE("Veterinary Surgeon","veterinary_surgeon"),rE("Veterinary Technician","veterinary_technician"),r
1E("Wholesaler","wholesaler")];rE("Dr.","dr"),rE("M.","m"),rE("Miss","miss"),rE("Mr.","mr"),rE("Mrs.","mrs"),rE("Ms.","ms"),rE("Mx.","mx"),rE("Professor","professor");let rF=e=>Array.isArray(e)?[...new Set(e.flatMap(e=>"object"!=typeof e||null===e||"string"!=typeof e.codename?[]:[e.codename]))]:[],rB=e=>{let t=new Set(e);return rA.filter(e=>t.has(e.id))},rM=e=>{var t,l,n;let a=rF(null==(t=e.elements)?void 0:t.formCdcRoleFieldOptions);if(a.length>0)return rB(a);let s=[...rF(null==(l=e.elements)?void 0:l.formCdcRoleFieldRolesRequiringProfessionalNumber),...rF(null==(n=e.elements)?void 0:n.formCdcRoleFieldOtherRoles)];return 0===s.length?rA:rB(s)},rP=e=>{var t;return rB(rF(null==(t=e.elements)?void 0:t.formCdcRoleFieldRolesRequiringProfessionalNumber)).map(e=>e.value)},rD=(e,t,l)=>{var n;let a=(0,rT.wp)(e,t);return null==a||null==(n=a.errors)?void 0:n[l]},rR=new Set(["form_checkbox_field","form_checkbox_group_field","form_radio_group_field","form_select_field","form_combobox_field","form_text_field","form_number_field"]),rq=e=>{var t,l,n;if("form_cdc_email_field"===e.system.type&&(null==(n=e.elements)||null==(l=n.formCdcEmailFieldRequireConfirmation)||null==(t=l[0])?void 0:t.codename)==="yes")return"confirmEmail";let a=r3[e.system.type];return a?rR.has(e.system.type)?"".concat(a,"_").concat(e.system.codename):a:""},rz=e=>rI.Yj().min(1,rD(e,"email","required")).email(rD(e,"email","invalidEmail")),rO=(e,t)=>rI.Yj().max(50,rD(e,"firstName","maxLength")).refine(e=>!t||e.length>=1,{message:rD(e,"firstName","required")}).refine(e=>0===e.length||e.length>=2,{message:rD(e,"firstName","minLength")}),rU=(e,t)=>rI.Yj().max(50,rD(e,"lastName","maxLength")).refine(e=>!t||e.length>=1,{message:rD(e,"lastName","required")}).refine(e=>0===e.length||e.length>=2,{message:rD(e,"lastName","minLength")}),r$=(e,t)=>rI.Yj().max(100,rD(e,"businessName","maxLength")).refine(e=>!t||e.length>=1,{message:rD(e,"businessName","required")}).refine(e=>0===e.length||e.length>=2,{message:rD(e,"businessName","minLength")}),rH=(e,t,l)=>{let n=rM(e).map(e=>e.value);return rI.Yj().refine(e=>0===e.length&&!l||n.includes(e),{message:rD(t,"role","invalid")})},rV=(e,t)=>t?rI.Ik({_validation:rI.Yj().min(1,rD(e,"businessSearchField","required")),entryMethod:rI.Yj().optional(),business:rI.Ik({businessType:rI.Yj().min(1,rD(e,"businessType","required")),name:rI.Yj().min(1,rD(e,"businessName","required")),line1:rI.Yj().min(1,rD(e,"addressLine1","required")),line2:rI.Yj().optional(),city:rI.Yj().min(1,rD(e,"city","required")),state:rI.Yj().min(1,rD(e,"state","required")),postalCode:rI.Yj().min(1,rD(e,"zipCode","required")),CRMId:rI.Yj().optional()})}):rI.Ik({_validation:rI.Yj().optional(),entryMethod:rI.Yj().optional(),business:rI.Ik({businessType:rI.Yj().optional(),name:rI.Yj().optional(),line1:rI.Yj().optional(),line2:rI.Yj().optional(),city:rI.Yj().optional(),state:rI.Yj().optional(),postalCode:rI.Yj().optional(),CRMId:rI.Yj().optional()}).optional()}),rZ=(e,t)=>t?rI.zM().refine(e=>e,{message:rD(e,"explicitConsent","required")}):rI.zM(),rG=(e,t)=>t?rI.zM().refine(e=>e,{message:rD(e,"explicitSmsConsent","required")}):rI.zM(),rW=()=>rI.eu(!0),rK=(e,t)=>{let l=rI.Ik({diallingCode:rI.Yj(),localNumber:rI.Yj(),country:rI.Yj().optional()});return t?l.refine(e=>{let t=e.diallingCode&&e.diallingCode.length>0,l=e.localNumber&&e.localNumber.length>0;return t&&l},{message:rD(e,"telephoneField","invalidTelephone"),path:[]}).refine(e=>!e.localNumber||!(e.localNumber.length>0)||/^\d+$/.test(e.localNumber),{message:rD(e,"telephoneField","invalidFormat"),path:[]}):l.refine(e=>!e.localNumber||0===e.localNumber.length||/^\d+$/.test(e.localNumber),{message:rD(e,"telephoneField","invalidFormat"),path:[]})},rY=(e,t)=>rI.Yj().max(255,rD(e,"text","maxLength")).refine(e=>!t||e.length>=1,{message:rD(e,"text","required")}).refine(e=>0===e.length||e.length>=2,{message:rD(e,"text","minLength")}),rQ=(e,t)=>rI.Yj().refine(e=>!t||e.length>=1,{message:rD(e,"combobox","required")}),rX=(e,t,l)=>rI.ai().nullable().refine(e=>!l||null!==e,{message:rD(t,"number","required")}).refine(t=>{var l;return null===t||null==(l=e.elements)||!l.formNumberFieldMin||t>=e.elements.formNumberFieldMin},{message:rD(t,"number","minValue")}).refine(t=>{var l;return null===t||null==(l=e.elements)||!l.formNumberFieldMax||t<=e.elements.formNumberFieldMax},{message:rD(t,"number","maxValue")}),rJ=(e,t)=>
1rI.YO(rI.Yj()).refine(e=>!t||e.length>=1,{message:rD(e,"checkboxGroup","required")}),r0=(e,t)=>rI.Yj().refine(e=>!t||e.length>=1,{message:rD(e,"checkboxGroup","required")}),r1=(e,t)=>rI.Yj().refine(e=>!t||e.length>=1,{message:rD(e,"select","required")}),r2=(e,t)=>!t||"form_button"===e||"form_display_text"===e,r4=(e,t)=>{let l=((e,t)=>{switch(e.system.type){case"form_cdc_email_field":var l,n,a;if((null==(a=e.elements)||null==(n=a.formCdcEmailFieldRequireConfirmation)||null==(l=n[0])?void 0:l.codename)==="yes")return{required:()=>rI.Yj(),optional:()=>rI.Yj()};return{required:()=>rz(t),optional:()=>rz(t)};case"form_cdc_first_name_field":return{required:()=>rO(t,!0),optional:()=>rO(t,!1)};case"form_cdc_last_name_field":return{required:()=>rU(t,!0),optional:()=>rU(t,!1)};case"form_cdc_business_name_field":return{required:()=>r$(t,!0),optional:()=>r$(t,!1)};case"form_cdc_role_field":return{required:()=>rH(e,t,!0),optional:()=>rH(e,t,!1)};case"form_cdc_business_search_field":return{required:()=>rV(t,!0),optional:()=>rV(t,!1)};case"form_cdc_explicit_consent_field":return{required:()=>rZ(t,!0),optional:()=>rZ(t,!1)};case"form_cdc_explicit_sms_consent_field":return{required:()=>rG(t,!0),optional:()=>rG(t,!1)};case"form_cdc_implicit_consent_field":return{required:()=>rW(),optional:()=>rW()};case"form_cdc_salutation_field":return{required:()=>rI.Yj().min(1,rD(t,"salutation","required")),optional:()=>rI.Yj().optional()};case"form_cdc_telephone_field":case"form_cdc_business_telephone_field":return{required:()=>rK(t,!0),optional:()=>rK(t,!1)};case"form_checkbox_group_field":return{required:()=>rJ(t,!0),optional:()=>rJ(t,!1)};case"form_radio_group_field":return{required:()=>r0(t,!0),optional:()=>r0(t,!1)};case"form_select_field":return{required:()=>r1(t,!0),optional:()=>r1(t,!1)};case"form_combobox_field":return{required:()=>rQ(t,!0),optional:()=>rQ(t,!1)};case"form_checkbox_field":return{required:()=>rI.zM().refine(e=>e,{message:rD(t,"checkbox","required")}),optional:()=>rI.zM()};case"form_text_field":return{required:()=>rY(t,!0),optional:()=>rY(t,!1)};case"form_number_field":return{required:()=>rX(e,t,!0),optional:()=>rX(e,t,!1)};default:return}})(e,t);if(!l){let t=Error("Unsupported field type in form schema: ".concat(e.system.type,". Field codename: ").concat(e.system.name,". Field ID: ").concat(e.system.id));return(0,eF.vV)(t),{data:rI.Ik({}),error:{message:"Unsupported field",fieldType:e.system.type,fieldCodename:e.system.name,fieldId:e.system.id}}}return{data:(e=>{var t,l,n,a,s,r,i,o,c,d,m,u,h,p,x,f,g,v,b,y,j,w,N,_,k,C,S,L,T,I,E,A,F,B,M,P,D,R,q,z,O,U;return!!e.elements&&((null==(l=e.elements.formCdcFirstNameFieldRequired)||null==(t=l[0])?void 0:t.codename)==="yes"||(null==(a=e.elements.formCdcLastNameFieldRequired)||null==(n=a[0])?void 0:n.codename)==="yes"||(null==(r=e.elements.formCdcRoleFieldRequired)||null==(s=r[0])?void 0:s.codename)==="yes"||(null==(o=e.elements.formCdcBusinessSearchFieldRequired)||null==(i=o[0])?void 0:i.codename)==="yes"||(null==(d=e.elements.formCdcSalutationFieldRequired)||null==(c=d[0])?void 0:c.codename)==="yes"||(null==(u=e.elements.formCdcTelephoneFieldRequired)||null==(m=u[0])?void 0:m.codename)==="yes"||(null==(p=e.elements.formCdcBusinessTelephoneFieldRequired)||null==(h=p[0])?void 0:h.codename)==="yes"||(null==(f=e.elements.formCdcBusinessNameFieldRequired)||null==(x=f[0])?void 0:x.codename)==="yes"||(null==(v=e.elements.formCdcProfessionalNumberFieldRequired)||null==(g=v[0])?void 0:g.codename)==="yes"||(null==(y=e.elements.formCdcBusinessTypeFieldRequired)||null==(b=y[0])?void 0:b.codename)==="yes"||(null==(w=e.elements.formCdcExplicitConsentCheckboxFieldRequired)||null==(j=w[0])?void 0:j.codename)==="yes"||(null==(_=e.elements.formCdcExplicitSmsConsentCheckboxFieldRequired)||null==(N=_[0])?void 0:N.codename)==="yes"||(null==(C=e.elements.formCheckboxFieldRequired)||null==(k=C[0])?void 0:k.codename)==="yes"||(null==(L=e.elements.formCheckboxGroupFieldRequired)||null==(S=L[0])?void 0:S.codename)==="yes"||(null==(I=e.elements.formComboboxFieldRequired)||null==(T=I[0])?void 0:T.codename)==="yes"||(null==(A=e.elements.formRadioGroupFieldRequired)||null==(E=A[0])?void 0:E.
1codename)==="yes"||(null==(B=e.elements.formSelectFieldRequired)||null==(F=B[0])?void 0:F.codename)==="yes"||(null==(P=e.elements.formTextFieldRequired)||null==(M=P[0])?void 0:M.codename)==="yes"||(null==(R=e.elements.formNumberFieldRequired)||null==(D=R[0])?void 0:D.codename)==="yes"||(null==(z=e.elements.formTelephoneFieldRequired)||null==(q=z[0])?void 0:q.codename)==="yes"||(null==(U=e.elements.formSwitchFieldRequired)||null==(O=U[0])?void 0:O.codename)==="yes")})(e)?l.required():l.optional()}},r6=(e,t,l)=>{var n,a,s;"form_cdc_role_field"!==t.system.type||(null!=(s=null==(a=t.elements)||null==(n=a.formCdcRoleFieldRolesRequiringProfessionalNumber)?void 0:n.length)?s:0)===0||"professionalNumber"in e||(e.professionalNumber=rI.Ik({number:rI.Yj().min(1,rD(l,"professionalNumber","required")),state:rI.Yj().min(1,rD(l,"jurisdiction","required"))}).optional())},r3={form_cdc_first_name_field:"firstName",form_cdc_last_name_field:"lastName",form_cdc_email_field:"email",form_cdc_role_field:"role",form_cdc_business_search_field:"businessSearch",form_cdc_salutation_field:"salutation",form_cdc_telephone_field:"telephone",form_cdc_business_telephone_field:"businessTelephone",form_cdc_business_name_field:"businessName",form_cdc_explicit_consent_field:"explicitConsent",form_cdc_explicit_sms_consent_field:"smsConsent",form_cdc_implicit_consent_field:"implicitConsent",form_cdc_address_city_field:"addressCity",form_cdc_address_line1_field:"addressLine1",form_cdc_address_line2_field:"addressLine2",form_cdc_address_zip_code_field:"addressPostalCode",form_cdc_address_state_field:"addressState",form_checkbox_group_field:"checkboxGroup",form_radio_group_field:"radioGroup",form_select_field:"select",form_checkbox_field:"checkbox",form_combobox_field:"combobox",form_text_field:"text",form_number_field:"number",form_address_search_field:"addressSearch",form_display_text:"displayText",form_button:"button"},r5={form_cdc_email_field:rT.PC,form_cdc_first_name_field:rT.G0,form_cdc_last_name_field:rT._e,form_cdc_role_field:rT.Vc,form_cdc_business_name_field:rT.kY,form_cdc_business_search_field:rT.ln,form_cdc_telephone_field:rT.jS,form_cdc_business_telephone_field:rT.Hh,form_cdc_salutation_field:rT.P0,form_checkbox_group_field:rT.Tt,form_checkbox_field:rT.Yh,form_combobox_field:rT.oy,form_button:rT.$n,form_display_text:rT.i7,form_radio_group_field:rT.n9,form_select_field:rT.zM,form_cdc_explicit_consent_field:rT.Tx,form_cdc_explicit_sms_consent_field:rT.WD,form_cdc_implicit_consent_field:rT.Mo,form_text_field:rT.A_,form_number_field:rT.oz},r7=e=>{var t;let{block:l,BlockMapper:r,globalConfig:i,page:d}=e,{authenticated:m,ready:u,userDetails:h}=(0,es.As)(),{locale:p="",...x}=(0,a.useRouter)(),[f,g]=(0,s.useState)(!1),[v,y]=(0,s.useState)(!1),[j,w]=(0,s.useState)(null),N=new sE,{hexCode:_}=G({blockColor:l.elements.brandColor,blockColorLegacy:l.elements.campaignFormColorStyling,fallbackColorId:"elanco-blue",fallbackHexColor:"#0072CE"}),k=sh(p,"en-US"),C=(0,s.useMemo)(()=>Array.isArray(l.elements.campaignFormQuestions)?l.elements.campaignFormQuestions:[],[l.elements.campaignFormQuestions]),S=(null==(t=l.elements.campaignFormHideOnLogin[0])?void 0:t.codename)==="yes"&&m,L=l.elements.campaignFormRedirectPath||"",T=((e,t)=>{let l={};if(!Array.isArray(e)||0===e.length)return{data:rI.Ik({})};for(let n of e){if(!n.system.type||!n.system.codename)continue;let e=n.system.type,a=rq(n);if(r2(e,a))continue;let s=r4(n,t);if(s.error)return{data:rI.Ik({}),error:s.error};l[a]=s.data,r6(l,n,t)}return{data:((e,t)=>{let l=rI.Ik(e);return"email"in e&&"confirmEmail"in e?l.refine(e=>e.email===e.confirmEmail,{message:rD(t,"confirmEmail","emailMatchError"),path:["confirmEmail"]}):l})(l,t)}})(C,k),I=(e=>{let t={};if(0===e.length)return{data:t};for(let s of e){var l,n,a;if(!s.system.type||!s.system.codename)continue;let e=s.system.type,r=s.system.name,i=rq(s);if(i){switch(e){case"form_cdc_email_field":case"form_cdc_first_name_field":case"form_cdc_last_name_field":case"form_cdc_role_field":case"form_cdc_business_name_field":case"form_cdc_salutation_field":case"form_radio_group_field":case"form_select_field":case"form_combobox_field":case"form_text_field":t[i]="";break;case"form_cdc_business_search_field":t[i]={_validation:"",entryMethod:"automatic",business:{businessType:"",name:"",line1:"",line2:"",city:"",state:"",postalCode:"",CRMId:""}};break;case"form_cdc_explicit_consent_field":case"form_cdc_explicit_sms_consent_field":case"form_checkbox_field":t[i]=!1;break;case"form_cdc_implicit_consent_field":t[i]=!0;break;case"form_cdc_telephone_field":case"form_cdc_business_telephone_field":t[i]={diallingCode:"",localNumber:""};break;case"form_checkbox_group_field":t[i]=[];break;case"form_number_field":t[i]=null;break;case"form_button":case"form_display_text":break;default:{let t=Error("Unsupported field type in default values: ".concat(e,". Field codename: ").concat(r,". Field ID: ").concat(s.system.id));return(0,eF.vV)(t),{data:{},error:{message:"Unsupported field",fieldType:e,fieldCodename:r,fieldId:s.system.id}}}}"form_cdc_role_field"!==e||!((null!=(a=null==(n=s.elements)||null==(l=n.formCdcRoleFieldRolesRequiringProfessionalNumber)?void 0:l.length)?a:0)>0)||"professionalNumber"in t||(t.professionalNumber={number:"",state:""})}}return{data:t}})(C),E=T.error||I.error,A=T.data,F=I.data,B=(0,nR.mN)({resolver:(0,rL.u)(A),defaultValues:F}),M=B.watch("role");
1if((0,s.useEffect)(()=>{m&&(h.emailAddress&&(B.setValue("email",h.emailAddress),B.setValue("confirmEmail",h.emailAddress)),h.firstName&&B.setValue("firstName",h.firstName),h.lastName&&B.setValue("lastName",h.lastName))},[m,h.emailAddress,h.firstName,h.lastName,B]),(0,s.useEffect)(()=>{let e=C.find(e=>"form_cdc_role_field"===e.system.type),t=e?rP(e):[],l=t.length>0&&!!M&&t.includes(null!=M?M:"");t.length>0&&e&&!l&&B.setValue("professionalNumber",void 0)},[M,C,B]),S)return null;if(E)return(0,eF.vV)(Error("Campaign form has unsupported field: ".concat(E.fieldType,". Field codename: ").concat(E.fieldCodename,". Campaign ID: ").concat(l.elements.campaignFormCampaignId||"unknown"))),(0,n.jsx)("div",{className:"mx-auto w-full max-w-2xl rounded-lg bg-white p-6 shadow-sm",children:(0,n.jsxs)("div",{className:"border-yellow-300 bg-yellow-50 text-yellow-800 ",role:"alert",children:[(0,n.jsx)("p",{className:"font-medium",children:rD(k,"form","configuration")}),(0,n.jsx)("br",{}),(0,n.jsx)("p",{className:"text-sm",children:rD(k,"form","formComponentLoad")}),(0,n.jsxs)("p",{className:"text-sm",children:[rD(k,"form","code"),":"," ",(0,n.jsx)("strong",{children:E.fieldCodename})]}),(0,n.jsxs)("p",{className:"text-sm",children:[rD(k,"form","type"),":"," ",(0,n.jsx)("strong",{children:E.fieldType})]}),(0,n.jsx)("br",{}),(0,n.jsx)("p",{className:"text-sm",children:rD(k,"form","reportAnIssue")})]})});if(0===C.length)return(0,eF.vV)(Error("Campaign form rendered with no questions. Campaign ID: ".concat(l.elements.campaignFormCampaignId||"unknown"))),(0,n.jsx)("div",{className:"mx-auto w-full max-w-2xl rounded-lg bg-white p-6 shadow-sm",children:(0,n.jsx)("p",{className:"text-gray-500",children:rD(k,"form","noFormQuestionsAvailable")})});let P=C.some(e=>"form_cdc_email_field"===e.system.type),D=C.some(e=>"form_cdc_explicit_consent_field"===e.system.type),R=C.some(e=>"form_cdc_implicit_consent_field"===e.system.type),q=!P,z=!D,O=!R;if(q||z&&O){let e=[...q?["Email"]:[],...z&&O?["Explicit Consent","Implicit Consent"]:[]].join(", ");return(0,eF.vV)(Error("Campaign form is missing required CDC fields: ".concat(e,". Campaign ID: ").concat(l.elements.campaignFormCampaignId||"unknown"))),(0,n.jsx)("div",{className:"mx-auto w-full max-w-2xl rounded-lg bg-white p-6 shadow-sm",children:(0,n.jsxs)("div",{className:"border-yellow-300 bg-yellow-50 text-yellow-800 rounded-md border p-4",role:"alert",children:[(0,n.jsx)("p",{className:"font-medium",children:rD(k,"form","configuration")}),(0,n.jsx)("br",{}),(0,n.jsx)("p",{className:"text-sm",children:rD(k,"form","missingRequiredFields")}),(0,n.jsx)("br",{}),(0,n.jsx)("p",{className:"text-sm",children:rD(k,"form","reportAnIssue")})]})})}let U=async e=>{(0,b.d)({event:"signup_campaign_initiated",action:"Signup Initiated",campaign:l.elements.campaignFormCampaignId||"unknown",user_Id:h.id||null}),y(!0),w(null);try{var t,n,a,s,r,i,c,d,f,v,j,_,S,T,I,E,A,F,B,M,P,D,R,q,z,O,U,$,H,V,Z,G,W,K,Y,Q,X;let y=function e(t){return"string"==typeof t?t.trim():Array.isArray(t)?t.map(t=>e(t)):null!==t&&"object"==typeof t?Object.fromEntries(Object.entries(t).map(t=>{let[l,n]=t;return[l,e(n)]})):t}(e),w=y.email||h.emailAddress,J=y.firstName||h.firstName||"",ee=y.lastName||h.lastName||"",et=y.role||"",el=((e,t)=>"boolean"!=typeof e&&"boolean"!=typeof t?null:!!e||!!t)(y.explicitConsent,y.implicitConsent),en="boolean"==typeof y.smsConsent?y.smsConsent:null,ea=y.salutation||"",es=y.telephone,er=y.businessTelephone,ei=es?"".concat(es.diallingCode||"").concat(es.localNumber||""):"",eo=er?"".concat(er.diallingCode||"").concat(er.localNumber||""):"",ec=y.professionalNumber,ed=(null==ec?void 0:ec.number)||"",em=(null==ec?void 0:ec.state)||"",eu=y.businessSearch,eh=null!=($=null!=(U=null==eu||null==(t=eu.business)?void 0:t.name)?U:y.businessName)?$:"",ep=null!=(H=null==eu||null==(n=eu.business)?void 0:n.postalCode)?H:"",ex=null!=(V=null==eu||null==(a=eu.business)?void 0:a.businessType)?V:"",ef=null!=(Z=null==eu||null==(s=eu.business)?void 0:s.line1)?Z:"",eg=null!=(G=null==eu||null==(r=eu.business)?void 0:r.line2)?G:"",ev=null!=(W=null==eu||null==(i=eu.business)?void 0:i.city)?W:"",eb=null!=(K=null==eu||null==(c=eu.business)?void 0:c.state)?K:"",ey=null!=(Y=null==eu||null==(d=eu.business)?void 0:d.CRMId)?Y:"",ej={emailAddress:w,firstName:J,lastName:ee,role:et,telephone:ei,practiceName:eh,practicePostcode:ep,businessType:ex,businessTelephone:eo,address1:ef,address2:eg,city:ev,state:eb,crmId:ey,salutation:ea,professionalNumber:ed,professionalNumberJurisdiction:em,pets:void 0,locale:p,profileLocale:k,sourceName:"".concat(window.location.origin,"/").concat(p).concat(x.asPath),consent:"us"===p||el,smsConsent:en},ew=m&&u&&h.id?await eM.L.post("/api/user/upsertAndFetchUser",{...ej,uid:h.id,hasFullAccount:!1===
1h.light}):await eM.L.post("/api/user/createAndFetchUser",ej);if(!ew.data.success||!ew.data.data)throw Error(ew.data.error||"Failed to create lite user");let eN=ew.data.data,e_=eN.subscriptions,ek=null==e_||null==(f=e_.preference)?void 0:f.b2b,eC={productService:(null==ek||null==(v=ek.ProductServiceCommunications)?void 0:v.email.isSubscribed)||!1,businessManagement:(null==ek||null==(j=ek.businessManagement)?void 0:j.email.isSubscribed)||!1,professionalEducation:(null==ek||null==(_=ek.professionalEducation)?void 0:_.email.isSubscribed)||!1,productPromotions:(null==ek||null==(S=ek.ProductPromotions)?void 0:S.email.isSubscribed)||!1},eS={email:null!=(Q=null==(I=eN.preferences)||null==(T=I.email)?void 0:T.isConsentGranted)&&Q,sms:null!=(X=null==(A=eN.preferences)||null==(E=A.sms)?void 0:E.isConsentGranted)&&X},eL=[];Object.entries(y).forEach(e=>{let[t,l]=e;if("email"===t||"confirmEmail"===t||"firstName"===t||"lastName"===t||"role"===t||"businessName"===t||"businessSearch"===t||"salutation"===t||"telephone"===t||"businessTelephone"===t||"professionalNumber"===t||"professionalNumberJurisdiction"===t||"explicitConsent"===t||"implicitConsent"===t||"smsConsent"===t)return;let n=C.find(e=>rq(e)===t);if(n&&"form_button"!==n.system.type){var a,s,r,i,o,c,d;let e=(null==(a=n.elements)?void 0:a.formNumberFieldLabel)||(null==(s=n.elements)?void 0:s.formCheckboxGroupFieldLabel)||(null==(r=n.elements)?void 0:r.formCheckboxFieldLabel)||(null==(i=n.elements)?void 0:i.formComboboxFieldLabel)||(null==(o=n.elements)?void 0:o.formRadioGroupFieldLabel)||(null==(c=n.elements)?void 0:c.formSelectFieldLabel)||(null==(d=n.elements)?void 0:d.formTextFieldLabel)||n.system.name||t,m=[];Array.isArray(l)?m=l.map(e=>String(e)):"boolean"==typeof l?m=[l?"true":"false"]:null!=l&&(m=[String(l)]),m.length>0&&eL.push({questionId:e.replaceAll(" ","-"),questionLabel:e,answer:m})}});let eT={submissionId:crypto.randomUUID(),submissionTimeStamp:new Date().toISOString(),formId:l.elements.campaignFormCampaignId||"unknown",sourceLocale:p,sourcePortal:o._.NEXT_PUBLIC_TOWER,sourcePage:"".concat(window.location.origin,"/").concat(p).concat(x.asPath),formCategory:"campaign",formResponse:eL,cdcProfile:{UID:eN.UID,email:w,firstName:J,lastName:ee,phone:null==(M=eN.profile)||null==(B=M.phones)||null==(F=B[0])?void 0:F.number,salutation:null==(P=eN.data)?void 0:P.salutation,role:null==(D=eN.data)?void 0:D.role,role2:null==(R=eN.data)?void 0:R.role2,professionalNumberJurisdiction:null==(q=eN.data)?void 0:q.professionalNumberJurisdiction,professionalNumber:null==(z=eN.data)?void 0:z.professionalNumber,preferences:eC,consent:eS,business:null==(O=eN.data)?void 0:O.business}};if((0,eF.$s)({name:"CAMPAIGN_FORM_SUBMISSION_STARTED",properties:{campaignId:l.elements.campaignFormCampaignId,UID:eN.UID}}),await N.send(eT))(0,b.d)({event:"signup_campaign_submitted",action:"Signup Completed",status:"Successful ",campaign:l.elements.campaignFormCampaignId||"unknown",user_id:eN.UID}),L?x.push(L):g(!0);else throw Error("Failed to submit campaign interest data")}catch(t){let e=t instanceof Error?t.message:"An unknown error occurred";(0,eF.vV)(Error("Campaign form submission failed: ".concat(e,". Campaign ID: ").concat(l.elements.campaignFormCampaignId))),(0,b.d)({event:"signup_campaign_submitted",action:"Signup Failed",status:"Unsuccessful",campaign:l.elements.campaignFormCampaignId||"unknown",user_id:h.id||null}),w(l.elements.submissionFailureText)}finally{y(!1)}};return f?(0,n.jsx)("div",{className:"mx-auto my-8 w-full max-w-2xl rounded-lg bg-white p-6 text-center shadow-sm",children:(0,n.jsxs)("div",{className:"space-y-6",children:[(0,n.jsx)(c.rM,{BlockMapper:r,element:l.elements.successScreenMessage,globalConfig:i,page:d}),(0,n.jsx)("div",{className:"flex justify-center",children:(0,n.jsx)(rT.$n,{className:"min-w-32",onClick:()=>{m?window.location.reload():(B.reset(),g(!1))},style:_?{backgroundColor:_}:void 0,type:"button",children:l.elements.successScreenButtonText||"OK"})})]})}):(0,n.jsx)("div",{className:"mx-auto my-8 w-full max-w-2xl rounded-lg bg-white p-6 shadow-sm",children:(0,n.jsx)(rT.lV,{...B,children:(0,n.jsxs)("form",{className:"cmp-form space-y-3",onSubmit:B.handleSubmit(U,e=>{(0,eF.vV)(Error("Campaign form failed validation on submit. Invalid fields: ".concat(Object.keys(e).join(", "),". Campaign ID: ").concat(l.elements.campaignFormCampaignId||"unknown"))),w(l.elements.submissionFailureText)}),children:[null!==j&&(0,n.jsxs)("div",{className:"bg-red-50 text-red-800 border-black-400 rounded-md border p-4",role:"alert",children:[(0,n.jsx)("p",{className:"font-arial text-[15px] font-medium",children:"Error"}),(0,n.jsx)("p",{className:"font-arial text-[15px]",children:j})]}),C.map(e=>(0,n.jsx)(s.Fragment,{children:(e=>{let{type:t}=e.system,l=rq(e);
1if(!l)return null;if("form_button"===t)return(e=>{var t,l,a,s,r,i;let o=null!=(r=null==(t=e.elements)?void 0:t.formButtonText)?r:"Submit",c=(e=>{switch(e){case"center":return"justify-center";case"left":return"justify-start";case"right":return"justify-end";default:return"w-full"}})(null!=(i=null==(s=e.elements)||null==(a=s.formButtonPosition)||null==(l=a[0])?void 0:l.codename)?i:"full_width");return(0,n.jsx)("div",{className:"flex ".concat(c),children:(0,n.jsx)(rT.$n,{className:"min-w-32",disabled:v,style:_?{backgroundColor:_}:void 0,type:"submit",children:o})},e.system.id)})(e);let a=r5[t],s=((e,t,l)=>{let n={control:B.control,locale:k,name:t};switch(l){case"form_cdc_role_field":((e,t)=>{var l,n,a;t.options=rM(e),t.required=(null==(a=e.elements)||null==(n=a.formCdcRoleFieldRequired)||null==(l=n[0])?void 0:l.codename)==="yes"})(e,n);break;case"form_cdc_business_search_field":((e,t)=>{var l,n,a,s,r,o,c,d,m,u,h;t.businessTypeParamName="businessTypes",t.inputParamName="search",t.countryParamName="countryCode",t.allowManualEntry=(null==(a=e.elements)||null==(n=a.formCdcBusinessSearchFieldAllowManualEntry)||null==(l=n[0])?void 0:l.codename)==="yes";let x=sx(p);t.country=x,t.searchMode="US"===x||"AU"===x?"postal-code":"business-name",t.locale=sh(p,"en-US");let f=(0,rT.TI)(k);if(t.apiEndpoint=(null==(s=e.elements)?void 0:s.formCdcBusinessSearchFieldApiEndpoint)||"/api/business/search",t.required=(null==(c=e.elements)||null==(o=c.formCdcBusinessSearchFieldRequired)||null==(r=o[0])?void 0:r.codename)==="yes",t.maxResults=Math.max(5,Math.min(50,null!=(h=i.elements.businessSearchMaxResults)?h:10)),t.searchPlaceholder=(null==(d=e.elements)?void 0:d.formCdcBusinessSearchFieldPlaceholderText)||"",t.allowManualEntry&&(null==(u=e.elements)||null==(m
1=u.formCdcBusinessSearchFieldBusinessTypeFilter)?void 0:m.length)){let l=new Set(e.elements.formCdcBusinessSearchFieldBusinessTypeFilter.map(e=>e.codename)),n=f.filter(e=>l.has(e.id)).map(e=>({label:e.label,value:e.value})),a=[...l].join(",");n.length>0&&(t.businessTypeOptions=n),t.businessTypeFilterOptions=a}})(e,n);break;case"form_checkbox_group_field":((e,t)=>{var l,n,a,s,r,i,o,c,d,m;t.label=(null==(l=e.elements)?void 0:l.formCheckboxGroupFieldLabel)||"Select Options",t.description=(null==(n=e.elements)?void 0:n.formCheckboxGroupFieldDescription)||"",t.layout=(null==(r=e.elements)||null==(s=r.formCheckboxGroupFieldLayout)||null==(a=s[0])?void 0:a.codename)||"vertical",t.required=(null==(c=e.elements)||null==(o=c.formCheckboxGroupFieldRequired)||null==(i=o[0])?void 0:i.codename)==="yes";let u=Array.isArray(null==(d=e.elements)?void 0:d.formCheckboxGroupFieldOptions)?null==(m=e.elements)?void 0:m.formCheckboxGroupFieldOptions:[];t.items=Array.isArray(u)&&u.map(e=>({id:e.elements.formFieldOptionValue,label:e.elements.formFieldOptionLabel}))})(e,n);break;case"form_radio_group_field":((e,t)=>{var l,n,a,s,r,i,o,c,d;t.label=(null==(l=e.elements)?void 0:l.formRadioGroupFieldLabel)||"Select an Option",t.description=(null==(n=e.elements)?void 0:n.formRadioGroupFieldDescription)||"",t.layout=(null==(r=e.elements)||null==(s=r.formRadioGroupFieldLayout)||null==(a=s[0])?void 0:a.codename)||"vertical",t.required=(null==(c=e.elements)||null==(o=c.formRadioGroupFieldRequired)||null==(i=o[0])?void 0:i.codename)==="yes";let m=null==(d=e.elements)?void 0:d.formRadioGroupFieldOptions;t.options=(null!=m?m:[]).map(e=>({value:e.elements.formFieldOptionValue,label:e.elements.formFieldOptionLabel}))})(e,n);break;case"form_select_field":((e,t)=>{var l,n,a,s,r,i,o;t.label=(null==(l=e.elements)?void 0:l.formSelectFieldLabel)||"Select an option",t.description=(null==(n=e.elements)?void 0:n.formSelectFieldDescription)||"",t.placeholder=(null==(a=e.elements)?void 0:a.formSelectFieldPlaceholder)||"Select an option...",t.required=(null==(i=e.elements)||null==(r=i.formSelectFieldRequired)||null==(s=r[0])?void 0:s.codename)==="yes";let c=null==(o=e.elements)?void 0:o.formSelectFieldOptions;t.options=(null!=c?c:[]).map(e=>({value:e.elements.formFieldOptionValue,label:e.elements.formFieldOptionLabel}))})(e,n);break;case"form_combobox_field":((e,t)=>{var l,n,a,s,r,i,o,c,d;t.label=(null==(l=e.elements)?void 0:l.formComboboxFieldLabel)||"",t.description=(null==(n=e.elements)?void 0:n.formComboboxFieldDescription)||"",t.placeholder=(null==(a=e.elements)?void 0:a.formComboboxFieldPlaceholder)||"",t.searchPlaceholder=(null==(s=e.elements)?void 0:s.formComboboxFieldSearchPlaceholder)||"",t.emptyText=(null==(r=e.elements)?void 0:r.formComboboxFieldEmptyText)||"",t.required=(null==(c=e.elements)||null==(o=c.formComboboxFieldRequired)||null==(i=o[0])?void 0:i.codename)==="yes";let m=null==(d=e.elements)?void 0:d.formComboboxFieldOptions;t.options=(null!=m?m:[]).map(e=>({value:e.elements.formFieldOptionValue,label:e.elements.formFieldOptionLabel}))})(e,n);break;case"form_cdc_email_field":((e,t)=>{var l,n,a;t.isConfirmation=(null==(a=e.elements)||null==(n=a.formCdcEmailFieldRequireConfirmation)||null==(l=n[0])?void 0:l.codename)==="yes",t.isConfirmation&&(t.name="confirmEmail"),m&&h.emailAddress&&(t.description=rD(k,"email","emailAssociatedWithYourAccount")||"Your email address is associated with your account and cannot be changed.",t.disabled=!0)})(e,n);break;case"form_cdc_first_name_field":case"form_cdc_last_name_field":case"form_cdc_business_name_field":case"form_cdc_telephone_field":case"form_cdc_business_telephone_field":case"form_cdc_salutation_field":((e,t,l)=>{var n,a;let s={form_cdc_first_name_field:"formCdcFirstNameFieldRequired",form_cdc_last_name_field:"formCdcLastNameFieldRequired",form_cdc_business_name_field:"formCdcBusinessNameFieldRequired",form_cdc_telephone_field:"formCdcTelephoneFieldRequired",form_cdc_business_telephone_field:"formCdcBusinessTelephoneFieldRequired",form_cdc_salutation_field:"formCdcSalutationFieldRequired"}[l];if(s){let l=e.elements[s];t.required=(null==l||null==(n=l[0])?void 0:n.codename)==="yes"}switch(l){case"form_cdc_first_name_field":t.disabled=m&&!!h.firstName;break;case"form_cdc_last_name_field":t.disabled=m&&!!h.lastName}if("form_cdc_business_telephone_field"===l){let l=e.elements.formCdcBusinessTelephoneFieldShow;t.show=(null==l||null==(a=l[0])?void 0:a.codename)==="yes"}})(e,n,l);break;default:((e,t,l)=>{var n,a,s,r,i,o,c,d,m,u,h,p,x,f,g,v,b,y,j,w,N,_,k,C,S,L,T,I;switch(l){case"form_display_text":t.textAlign=(null==(s=e.elements)||null==(a=s.formDisplayTextAlignment)||null==(n=a[0])?void 0:n.codename)||"left",t.text=null==(i=e.elements)||null==(r=i.formDisplayTextContent)?void 0:r.value;break;case"form_checkbox_field":t.label=null==(o=e.elements)?void 0:o.formCheckboxFieldLabel,t.description=null==(c=e.elements)?void 0:c.formCheckboxFieldDescription,t.required=(null==(u=e.elements)||null==(m
1=u.formCheckboxFieldRequired)||null==(d=m[0])?void 0:d.codename)==="yes";break;case"form_cdc_explicit_consent_field":t.label=null==(p=e.elements)||null==(h=p.formCdcExplicitConsentCheckboxFieldLabel)?void 0:h.value;break;case"form_cdc_explicit_sms_consent_field":t.label=null==(f=e.elements)||null==(x=f.formCdcExplicitSmsConsentCheckboxFieldLabel)?void 0:x.value;break;case"form_cdc_implicit_consent_field":t.label=null==(v=e.elements)||null==(g=v.formCdcImplicitConsentCheckboxFieldLabel)?void 0:g.value;break;case"form_text_field":t.label=(null==(b=e.elements)?void 0:b.formTextFieldLabel)||"",t.description=(null==(y=e.elements)?void 0:y.formTextFieldDescription)||"",t.placeholder=(null==(j=e.elements)?void 0:j.formTextFieldPlaceholder)||"",t.required=(null==(_=e.elements)||null==(N=_.formTextFieldRequired)||null==(w=N[0])?void 0:w.codename)==="yes";break;case"form_number_field":t.required=(null==(S=e.elements)||null==(C=S.formNumberFieldRequired)||null==(k=C[0])?void 0:k.codename)==="yes",t.description=(null==(L=e.elements)?void 0:L.formNumberFieldDescription)||"",t.label=(null==(T=e.elements)?void 0:T.formNumberFieldLabel)||"",t.placeholder=(null==(I=e.elements)?void 0:I.formNumberFieldPlaceholder)||""}})(e,n,l)}return n})(e,l,t);if("form_cdc_role_field"===t){let t=rP(e);if(t.length>0){let e=!!M&&t.includes(null!=M?M:"");return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(a,{...s}),e?(0,n.jsx)(rT.Fv,{control:B.control,locale:k,name:"professionalNumber",required:!0,stateDropdown:!0,stateRequired:!0}):null]})}}let r="form_cdc_explicit_consent_field"===t||"form_cdc_explicit_sms_consent_field"===t||"form_cdc_implicit_consent_field"===t,o=m&&("form_cdc_first_name_field"===t&&!!h.firstName||"form_cdc_last_name_field"===t&&!!h.lastName),c=(0,n.jsx)(a,{...s});return(0,n.jsx)("div",{className:r?"[&_a:active]:text-secondary [&_a:hover]:text-primary-dark [&_a]:text-primary [&_a]:underline":void 0,children:o?(0,n.jsx)("fieldset",{className:"m-0 min-w-0 border-0 p-0",disabled:!0,children:c}):c})})(e)},e.system.codename))]})})})},r8=e=>new Date(e.toLocaleString("en-US",{timeZone:"America/New_York"})),r9=()=>r8(new Date),ie=e=>e.toString().padStart(2,"0"),it=new Map(Object.entries({adoptwizard:e=>{var t,l,a;let r,i,{block:o,BlockMapper:c,page:d,globalConfig:m}=e,{userDetails:u}=(0,es.As)(),{formStep:h,onPetCreate:p,newPets:x,handleLogout:g}=function(){let e=(0,es.As)(),[t,l]=(0,s.useState)(1),[n,a]=(0,s.useState)([]),[r,i]=(0,s.useState)(!1);return(0,s.useEffect)(()=>{function t(){!function(){let e=document.getElementById("registration-form");if(!e)return;let t=e.querySelector("input[name='profile.email']");t&&t.addEventListener("keyup",()=>{let t=e.getElementsByClassName("custom-gigya-message");for(let e=t.length-1;e>=0;e-=1){var l;null==(l=t[e])||l.remove()}})}()}function n(t){!function(){let e=document.getElementById("registration-form");if(!e)return;let t=e.getElementsByClassName("custom-gigya-message");for(let e=t.length-1;e>=0;e-=1){var l;null==(l=t[e])||l.remove()}}(),t.response.UID&&"string"==typeof t.response.UID&&(e.handleUserDetails(t.response.UID,!0,t.profile,t.data),l(2))}!function e(){try{var l;null==(l=gigya)||l.accounts.showScreenSet({screenSet:"Loyalty-Web-Portal-RegistrationLoginV2",startScreen:"loyalty-shelter-registration",containerID:"registration-form",onAfterScreenLoad:t,onAfterSubmit:n})}catch(t){setTimeout(()=>{e()},100)}}()},[e]),(0,s.useEffect)(()=>{e.userDetails.id&&l(2)},[e.userDetails.id]),{formStep:t,onPetCreate:(t,n,s)=>{if(a(e=>[...e,t]),s)l(1),l(2);else{if(e.userDetails.light){var r;null==(r=window.gigya)||r.accounts.logout()}l(3),window.scrollTo(0,0)}},newPets:n,handleLogout:()=>{var e;null==(e=window.gigya)||e.accounts.logout({callback:()=>{(0,nr.setCookie)("cdc_user",null),window.location.reload()}})},showErrorsModal:r,closeErrorModal:()=>{i(!1)}}}();switch(h){case 3:r=o.elements.bannerHeading3,i=o.elements.bannerCopy3.replace("{{shelterName}}",null!=(l=null==(t=x[0])?void 0:t.shelterName)?l:"");break;case 2:r=o.elements.bannerHeading2,i="";break;default:r=o.elements.bannerHeading1,i=o.elements.bannerCopy1}return(0,n.jsxs)("div",{children:[(0,n.jsxs)("div",{className:"container-wide relative flex flex-col md:h-[450px] md:flex-row md:justify-between",children:[(0,n.jsx)("div",{className:"absolute -left-44 top-8 z-0 hidden h-[270px] w-[270px] rounded-full bg-[#CFEAC640] md:block"}),(0,n.jsxs)("div",{className:"relative z-20 mt-6 flex flex-col md:mt-20 md:max-w-xs lg:max-w-lg",children:[(0,n.jsx)("h1",{className:"mb-5 text-4xl font-semibold",children:r}),(0,n.jsx)("h2",{className:"text-sm font-normal",children:i})]}),o.elements.backgroundImage[0]?(0,n.jsxs)("div",{className:"flex justify-center md:absolute md:right-0",children:[(0,n.jsx)("div",{className:"absolute -right-4 top-16 z-0 hidden h-[140px] w-[140px] rounded-full bg-[#258821AA]/[0.4] md:block"}),(0,n.jsx)("div",{className:"block max-w-[180px] md:max-w-[450px]",children:(0,n.jsx)(f(),{alt:null!=(a=o.elements.backgroundImage[0].description)?a:"",className:"relative z-10",height:o.elements.backgroundImage[0].height||450,loader:v.L,priority:!0,src:o.elements.backgroundImage[0].url,width:o.elements.backgroundImage[0].width||450})}),(0,n.jsx)("div",{className:"absolute -left-16 bottom-0 z-0 hidden h-[270px] w-[270px] rounded-full bg-[#CFEAC640] md:block"})]}):null]}),(0,n.jsx)("section",{className:"container-wide relative z-20 mb-10 md:-mt-44",children:(0,n.jsxs)("div",{className:"relative my-6 mt-2 max-w-xl rounded border border-light-grey bg-white p-8",children:[(0,n.jsxs)("div",{className:1===h?"block":"hidden",children:[(0,n.jsx)("h3",{className:"mb-6 text-center font-semibold",children:o.elements.formHeading1}),(0,n.jsx)("div",{className:"mb-8 text-center",dangerouslySetInnerHTML:{__html:o.elements.formSubtext1.value}}),(0,n.jsx)("div",{className:"mx-auto max-w-sm",id:"registration-form"})]}),2===h&&(0,n.jsx)("div",{className:"block",children:o.elements.petform[0]?(0,n.jsx)(n8,{BlockMapper:c,block:o.elements.petform[0],globalConfig:m,hideHeading:!1,multiplePetCreation:!0,onSubmit:p,page:d,shelterData:o.elements.shelters}):null}),(0,n.jsxs)("div",{className:3===h?"block":"hidden",children:[(0,n.jsx)("h3",{className:"mb-6 text-center font-semibold",children:o.elements.summaryTitle3}),(0,n.jsxs)("div",{className:"py-1",children:[(0,n.jsxs)("span",{className:"font-bold",children:[o.elements.firstNameLabel,":"]}
1)," ",u.firstName]}),(0,n.jsxs)("div",{className:"py-1userDetails",children:[(0,n.jsxs)("span",{className:"font-bold",children:[o.elements.lastNameLabel,":"]})," ",u.lastName]}),(0,n.jsxs)("div",{className:"mb-3 border-b py-1 pb-4",children:[(0,n.jsxs)("span",{className:"font-bold",children:[o.elements.emailLabel,":"]})," ",u.emailAddress]}),x.map(e=>{var t;return(0,n.jsxs)("div",{className:x.length>1?"mb-3 border-b pb-4 last:border-none":void 0,children:[(0,n.jsxs)("div",{className:"py-1",children:[(0,n.jsxs)("span",{className:"font-bold",children:[o.elements.petNameLabel,":"]})," ",e.petName]}),(0,n.jsxs)("div",{className:"py-1",children:[(0,n.jsxs)("span",{className:"font-bold",children:[o.elements.petSpeciesLabel,":"]}),(0,n.jsxs)("span",{className:"capitalize",children:[" ",e.petSpecies]})]}),(0,n.jsxs)("div",{className:"py-1",children:[(0,n.jsxs)("span",{className:"font-bold",children:[o.elements.petGenderLabel,":"]}),(0,n.jsxs)("span",{className:"capitalize",children:[" ",e.petSex]})]}),(0,n.jsxs)("div",{className:"py-1",children:[(0,n.jsxs)("span",{className:"font-bold",children:[o.elements.petDobLabel,":"]})," ",nY(e.petDateOfBirth)]}),(0,n.jsxs)("div",{className:"py-1",children:[(0,n.jsxs)("span",{className:"font-bold",children:[o.elements.petBreedLabel,":"]}
1)," ",e.breed]}),(0,n.jsxs)("div",{className:"py-1",children:[(0,n.jsxs)("span",{className:"font-bold",children:[o.elements.petWeightLabel,":"]})," ",e.petWeight]}),(0,n.jsxs)("div",{className:"py-1",children:[(0,n.jsxs)("span",{className:"font-bold",children:[o.elements.gotchaDayLabel,":"]})," ",nY(e.petAcquisitionDate)]}),e.shelterName?(0,n.jsxs)("div",{className:"py-1",children:[(0,n.jsxs)("span",{className:"font-bold",children:[o.elements.shelterNameLabel,":"]})," ",e.shelterName]}):null,e.clinicName?(0,n.jsxs)("div",{className:"py-1",children:[(0,n.jsxs)("span",{className:"font-bold",children:[o.elements.vetClinicLabel,":"]})," ",e.clinicName]}):null]},null!=(t=e.id)?t:e.petName)}),o.elements.logoutButton[0]?(0,n.jsx)("div",{className:"pt-4 text-center",children:o.elements.logoutButton.map(e=>{var t,l;return(0,n.jsx)(H.$,{className:"w-full flex-1 md:max-w-[245px]",onClick:g,title:e.elements.text,variant:null!=(l=null==(t=e.elements.variant[0])?void 0:t.codename)?l:"pet_primary_green",children:e.elements.text},e.system.id)})}):null]})]})})]})},anchor:e=>{let{block:t}=e;return(0,n.jsx)(E,{anchorLink:t.elements.anchorId,"data-kontent-element-codename":"anchor_id",scrollMarginTop:{desktop:t.elements.scrollMarginTopDesktop||"8rem",mobile:t.elements.scrollMarginTopMobile||"4rem"}})},arrowhead_iframe:e=>{var t,l;let{block:r,page:i,...o}=e,d=(0,a.useRouter)(),m=d.query.code,{userDetails:u}=(0,es.As)(),h=r.elements.successfulRebateModalContainer[0],[p,x]=(0,s.useState)(!1),f=new URL(r.elements.iframeUrl).origin,g=(0,s.useCallback)(e=>{e.origin===f&&"success"===e.data&&x(!0)},[f]),v=(null==(t=r.elements.rebateList[0])?void 0:t.codename)==="yes";return(0,s.useEffect)(()=>{if(v){if(!u.id)return;let e=document.querySelector("#rebate-form");null==e||e.submit()}(0,eL.iframeResizer)({},"#the_iframe")},[v,u.id]),(0,s.useEffect)(()=>h?(window.addEventListener("message",g),()=>{window.removeEventListener("message",g)}):()=>{},[h,g]),(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("div",{"data-clarity-mask":"true",children:[v?(0,n.jsx)("div",{children:(0,n.jsxs)("form",{action:r.elements.iframeUrl,id:"rebate-form",method:"post",target:"the_iframe",children:[(0,n.jsx)("input",{name:"UUID",type:"hidden",value:null!=(l=u.id)?l:void 0}),(0,n.jsx)("input",{name:"ProfileFirstName",type:"hidden",value:u.firstName}),(0,n.jsx)("input",{name:"ProfileLastName",type:"hidden",value:u.lastName}),(0,n.jsx)("input",{name:"ProfileEmail",type:"hidden",value:u.emailAddress}),(0,n.jsx)("input",{name:"Brand",type:"hidden",value:"TestBrand"}),(0,n.jsx)("input",{name:"OfferCode",type:"hidden",value:m})]})}):null,(0,n.jsx)("div",{className:"container-wide my-12 md:my-16",children:(0,n.jsx)("iframe",{className:"w-full",id:"the_iframe",name:"the_iframe",src:r.elements.iframeUrl,title:"Rebates iframe"})})]}),p&&h?(0,n.jsx)(eE,{onClose:()=>{x(!1)},size:"lg",title:h.elements.heading,titleCenter:!0,children:(0,n.jsxs)("div",{className:"flex flex-col items-center justify-center",children:[(0,n.jsx)(c.rM,{className:"mb-4 w-full text-center text-charcoal","data-testid":"arrowhead-success-modal-subheading",element:h.elements.subHeading,page:i,...o}),(0,n.jsx)("div",{className:"flex flex-col space-y-2 md:flex-row md:space-x-2 md:space-y-0",children:h.elements.ctaButtons.map(e=>{var t,l,a;return(0,n.jsx)(H.$,{as:"a",className:"w-full md:w-auto",href:$(e.elements.url,null!=(a=d.locale)?a:""),icon:P.v[null==(t=e.elements.icon[0])?void 0:t.name],routerNavigateToPath:e=>d.push(e),title:e.elements.text,variant:(null==(l=e.elements.variant[0])?void 0:l.codename)||"pet_primary_green",children:e.elements.text},e.system.id)})})]})}):null]})},article_header_block:e=>{var t,l,a;let{block:s}=e,r=s.elements.articleMobileImage[0],o=null!=(l=s.elements.image[0])?l:r,c=(0,h.As)(null!=(a=null==(t=s.elements.snippetContainerResize[0])?void 0:t.codename)?a:"","container-wide");return(0,n.jsx)("div",{className:(0,i.$)(c,"w-full md:flex"),children:(0,n.jsx)("div",{className:"relative z-20 w-full overflow-hidden rounded-t-lg md:mb-0",children:(0,n.jsx)(A.m,{className:"h-auto w-full object-cover",desktopAsset:o,fallbackHeight:500,fallbackWidth:750,fetchPriority:"high",mobileAsset:r,priority:!0,qual
1ity:65,sizes:"100vw"})})})},article_lister_block_large:e=>{var t,l,a,s,r,o;let{block:c,...d}=e,m=c.elements.metaBlock[0],u=null==m?void 0:m.elements.image[0],h=null==m||null==(t=m.elements.horizontalAlignment[0])?void 0:t.codename,p=null!=(o=null==(l=c.elements.snippetLayoutBackgroundColorColor[0])?void 0:l.codename)?o:"white",x=(null==(a=c.elements.hasWhiteText[0])?void 0:a.codename)==="yes"?"white":"black";return(0,n.jsx)(ea,{className:(0,i.$)("max-w-4xl !shadow-around","text-".concat(x),(0,V.Th)(p)||"bg-".concat(p.replace(RegExp("(?<lowercaseletters>[a-z])(?<uppercaseletters>[A-Z])","g"),"$1-$2").replace(/[\s_]+/g,"-"))),description:(0,n.jsx)("p",{"data-kontent-element-codename":"description",children:c.elements.description}),imageMetablock:m?(0,n.jsx)(M,{aligned:h||"left",blur:!0,image:u?(0,n.jsx)(f(),{alt:u.description||"",height:u.height||40,loader:v.L,src:u.url,width:u.width||166}):null,isExternalLink:(null==(s=m.elements.openInNewTab[0])?void 0:s.codename)==="yes",metaBlockHref:m.elements.url,metaText:"",children:m.elements.title}):null,imageUrl:null==(r=c.elements.image[0])?void 0:r.url,subtitle:(0,n.jsx)("span",{"data-kontent-element-codename":"subtitle",children:c.elements.subtitle}),title:c.elements.title?(0,n.jsx)("span",{"data-kontent-element-codename":"title",children:c.elements.title}):null,children:c.elements.ctaButton.map((e,t,l)=>(0,n.jsx)(X,{block:e,className:"mt-6 w-full max-w-xs ".concat(l.length>1&&t!==l.length-1?"sm:mr-6":""),...d},e.system.id))})},article_lister_block:en,article_lister:e=>{let{block:t,...l}=e,a=t.elements.image[0];return(0,n.jsx)("div",{className:"container-wide px-8 ".concat(d),children:(0,n.jsx)(ea,{description:(0,n.jsx)(c.rM,{"data-kontent-element-codename":"text",element:t.elements.text,...l}),imageMetablock:(0,n.jsx)(M,{blur:!1,metaText:t.elements.metaText}),imageUrl:a?a.url:null,title:(0,n.jsx)("span",{"data-kontent-element-codename":"title",children:t.elements.title}),children:t.elements.buttonText?(0,n.jsx)(B(),{href:t.elements.buttonUrl,legacyBehavior:!0,passHref:!0,children:(0,n.jsx)(H.$,{"data-kontent-element-codename":"button_text",onClick:()=>{(0,b.d)({event:"cta_click",cta_name:t.elements.buttonText,cta_category:"CTA_Button"})},children:t.elements.buttonText})}):null})})},bazaar_voice_ratings_widget:ri,bazaar_voice_reviews_widget:e=>{let{block:t}=e,l=(0,a.useRouter)(),[r,i]=(0,s.useState)(t.elements.productId);return(0,s.useEffect)(()=>{i(("string"==typeof l.query.sku?l.query.sku:void 0)||t.elements.productId)},[l.query.sku,t.elements.productId]),(0,n.jsx)("div",{"data-bv-product-id":r,"data-bv-show":"reviews","data-kontent-element-codename":"product_id"})},benefits_module:e=>{var t,l,s,r,i,o,c,d,m,u,h;let{block:p}=e,{locale:x}=(0,a.useRouter)(),g=p.elements.benefitsHero[0],y=null==g?void 0:g.elements.ctaButton[0],j=null==g?void 0:g.elements.mobileImage[0],w=null!=(s=null==g?void 0:g.elements.image[0])?s:j,N=p.elements.benefitsContent[0],_=null==N?void 0:N.elements.image[0],k=null==N?void 0:N.elements.mobileImage[0],C=null==N?void 0:N.elements.ctaButton[0],S=null==N?void 0:N.elements.benefitsTitle;return(0,n.jsxs)("div",{className:"-mt-8 flex flex-col py-6",children:[(0,n.jsxs)("div",{className:"container-wide relative my-2 flex flex-col md:h-[450px] md:flex-row md:justify-between md:px-12 lg:px-14",children:[(0,n.jsx)("div",{className:"absolute -left-12 top-2 z-0 h-[230px] w-[230px] rounded-full bg-[#CFEAC640] sm:-top-6 md:left-12 md:top-14 md:block lg:left-12 lg:top-6 lg:h-[280px] lg:w-[280px] xl:left-20"}),(0,n.jsxs)("div",{className:"z-20 ml-6 mt-6 flex flex-col md:mt-20 lg:ml-8 lg:w-1/2 lg:px-16 xl:ml-12",children:[(0,n.jsx)("div",{className:"mb-4 ml-2",dangerouslySetInnerHTML:{__html:null!=(r=null==g?void 0:g.elements.title.value)?r:""}}),null==g?void 0:g.elements.iconsWithText.map(e=>{var t;return(0,n.jsx)("div",{className:"flex flex-col",children:(0,n.jsxs)("div",{className:"flex flex-row items-center justify-start",children:[(0,n.jsx)("div",{children:e.elements.icon[0]?(0,n.jsx)(f(),{alt:null!=(t=e.elements.icon[0].description)?t:"",className:"h-10 w-10 p-2",he
1ight:40,loader:v.L,src:e.elements.icon[0].url,width:40}):null}),(0,n.jsx)("div",{className:"flex items-center text-lg",children:e.elements.title})]})},e.system.id)}),(0,n.jsx)("div",{className:"ml-2 mt-8",children:(0,n.jsx)(B(),{href:$(null!=(i=null==y?void 0:y.elements.url)?i:"",null!=x?x:""),legacyBehavior:!0,passHref:!0,children:(0,n.jsx)(H.$,{as:"a",className:"!px-12 !py-2 uppercase",href:$(null!=(o=null==y?void 0:y.elements.url)?o:"",null!=x?x:""),onClick:()=>{(0,b.d)({event:"cta_click",cta_name:null==y?void 0:y.elements.text,cta_category:null==y?void 0:y.system.type})},title:null==y?void 0:y.elements.text,variant:(null==y||null==(t=y.elements.variant[0])?void 0:t.codename)||"pet_primary_green",children:null==y?void 0:y.elements.text})})})]}),(0,n.jsxs)("div",{className:"relative mx-auto mt-20 md:mt-12 lg:mr-6 lg:mt-0",children:[(0,n.jsx)("div",{className:"absolute -left-6 -top-6 -z-20 h-[150px] w-[150px] rounded-full bg-[#258821AA]/[0.4] md:-left-12 md:-top-12 md:block md:h-[200px] md:w-[200px]"}),(0,n.jsx)("div",{className:"absolute -left-20 bottom-6 z-0 h-[100px] w-[100px] rounded-full bg-[#CFEAC640] md:bottom-20 md:block"}),(0,n.jsx)("div",{className:"block w-full max-w-[300px] md:max-w-[420px]",children:(0,n.jsx)(A.m,{className:"h-auto w-full",desktopAsset:w,fallbackHeight:420,fallbackWidth:420,fetchPriority:"high",mobileAsset:j,priority:!0,sizes:"(min-width: 768px) 420px, 300px"})})]})]}),(0,n.jsxs)("div",{className:"container-wide relative my-2 flex flex-col items-start md:flex-row",children:[(0,n.jsx)("div",{className:"hidden md:flex",children:(0,n.jsx)("div",{className:"relative mt-8 w-full max-w-[590px] sm:mt-12 md:mt-4",children:_?(0,n.jsx)(f(),{alt:null!=(c=_.description)?c:"",height:_.height||400,loader:v.L,priority:!0,src:_.url,width:_.width||590}):null})}),(0,n.jsxs)("div",{className:"z-20 mt-0 flex flex-col items-start md:my-6 md:w-1/2",children:[(0,n.jsx)("div",{className:"mr-6 px-6 sm:pt-4",children:(0,n.jsx)("h2",{className:"mb-2",children:null==N?void 0:N.elements.title})}),(0,n.jsx)("div",{className:"mr-6 px-6",children:(0,n.jsx)("p",{className:"my-2",children:null==N?void 0:N.elements.description})}),(0,n.jsx)("div",{className:"mb-12 mt-6 px-6",children:(0,n.jsx)(B(),{href:$(null!=(d=null==C?void 0:C.elements.url)?d:"",null!=x?x:""),legacyBehavior:!0,children:(0,n.jsx)(H.$,{as:"a",className:"!px-12 !py-2 uppercase",onClick:()=>{(0,b.d)({event:"cta_click",cta_name:null==C?void 0:C.elements.text,cta_category:null==C?void 0:C.system.type})},title:null==C?void 0:C.elements.text,variant:(null==C||null==(l=C.elements.variant[0])?void 0:l.codename)||"pet_primary_green",children:null==C?void 0:C.elements.text})})}),(0,n.jsx)("div",{className:"my-6 mr-6 hidden flex-row justify-center px-6 md:flex",children:(0,n.jsx)("div",{className:"my-2",children:(0,n.jsx)("div",{className:"content-rich-text mb-4 ml-2",dangerouslySetInnerHTML:{__html:null!=(m=null==S?void 0:S.value)?m:""}})})})]}),(0,n.jsxs)("div",{className:"mt-12 flex flex-col px-6 md:hidden",children:[(0,n.jsx)("div",{className:"my-2",children:(0,n.jsx)("div",{className:"content-rich-text mb-4 ml-2",dangerouslySetInnerHTML:{__html:null!=(u=null==S?void 0:S.value)?u:""}})}),(0,n.jsx)("div",{className:"my-2 block w-full max-w-[480px]",children:k?(0,n.jsx)(f(),{alt:null!=(h=k.description)?h:"",height:k.height||360,loader:v.L,src:k.url,width:k.width||480}):null})]})]})]})},better_page_model:p,blog_heading:e=>{var t,l,a,r,i,o,c;let{block:{elements:{author:d,authorImage:m,date:u,displayText:h,facebookUrl:p,linkedinUrl:x,twitterUrl:b,mailBody:y,mailSubject:j,maillinkToggle:w,shareBlockTitle:N,showOnHover:_,title:C}}}=e,S="";d&&u?S="<p>Posted by <strong>{author}</strong> on <strong>{date}</strong></p>":d?S="<p>Posted by <strong>{author}</strong>":u&&(S="<p>Posted on <strong>{date}</strong></p>");let T=[["{author}",d],["{date}",u]].reduce((e,t)=>{let[l,n]=t;return l&&n?e.replace(l,n):e},g(h.value,S)),I=!!T||!!m.length,[E,A]=(0,s.useState)("");return(0,s.useEffect)(()=>{A(window.location.href)},[]),(0,n.jsx)(L,{authorImage:m.length&&(null==(t=m[0])?void 0:t.url)?(0,n.jsx)("div",{className:"relative h-full w-full",children:(0,n.jsx)(f(),{alt:null!=(o=null==(l=m[0])?void 0:l.description)?o:"",f
1ill:!0,loader:v.L,src:null==(a=m[0])?void 0:a.url})}):null,className:"w-full","data-kontent-element-codename":"blog_heading",postedByText:!!T&&(0,n.jsx)("div",{dangerouslySetInnerHTML:{__html:T},"data-kontent-element-codename":"display_text"}),shareBlock:(0,n.jsx)(k,{facebookShareUrl:p,hasAuthor:I,linkedinShareUrl:x,mailBody:"".concat(y,"\n\n").concat(E),mailLink:E,mailLinkToggle:null!=(c=null==(r=w[0])?void 0:r.codename)?c:"no",mailSubject:j,sharetitle:N,showOnHover:(null==(i=_[0])?void 0:i.codename)==="yes",title:N,twitterShareUrl:b}),title:(0,n.jsx)("span",{"data-kontent-element-codename":"title",children:C})})},brand_card:e=>{let{block:t,page:l,...a}=e;return(0,n.jsx)(et,{className:"h-full py-6","data-kontent-element-codename":"brand_card",children:t.elements.iconsWithText.map(e=>(0,n.jsx)(eV,{block:e,page:l,...a},e.system.id))})},breadcrumbs:e=>{var t,l,s;let{block:r}=e,{asPath:i,locale:o}=(0,a.useRouter)(),c=null!=(s=null==(t=i.split("?")[0])?void 0:t.split("/"))?s:[],d=m[null==(l=r.elements.snippetSpacingSpacing[0])?void 0:l.codename]||m.none,u=o?"/".concat(o):"",h=c.flatMap((e,t,l)=>{let a=l.slice(0,t+1).join("/")||"/";if(1===t&&a.match(/^\/([\w]{2})-([\w]{2})/g))return[];let s=""===r.elements.homeBreadcrumbs?"Home":r.elements.homeBreadcrumbs,i="/"===a?s:e.charAt(0).toUpperCase()+e.slice(1).replace(".html","").replace("-"," ");return(0,n.jsx)("a",{href:"".concat(u).concat(a),children:i},a)});return(0,n.jsx)("div",{"data-kontent-element-codename":"home_breadcrumbs",children:(0,n.jsx)("div",{className:"container-wide",children:(0,n.jsx)(tg,{className:d,children:h})})})},buy_online_links:e=>{let{block:t,...l}=e,[a,r]=(0,s.useState)(!1);(0,s.useEffect)(()=>{var e;r((null==(e=t.elements.shuffleOnlineLinks[0])?void 0:e.codename)==="yes")},[t.elements.shuffleOnlineLinks]);let i=t.elements.onlineLinks.map(e=>({...e}));a&&i.sort(()=>Math.random()-.5);let o=i.map(e=>{var t,a,s,r;let i=Math.random().toString(36).substring(7),{image:o,button:c,title:d}=e.elements;if((null==(t=c[0])?void 0:t.system.type)!=="cta_button")return null;let m=c[0];return{key:"".concat(i,"_").concat(d),image:o[0]?(0,n.jsx)(ee,{alt:o[0].description,imageUrl:m.elements.url,src:o[0].url}):null,button:c[0]?(0,n.jsx)(X,{block:{...c[0],elements:{...m.elements,icon:[{codename:"external",name:"External"}]}},...l,variant:(null==(a=m.elements.variant[0])?void 0:a.codename)==="primary"||(null==(s=m.elements.variant[0])?void 0:s.codename)===void 0?"inverted":(null==(r=m.elements.variant[0])?void 0:r.codename)||"inverted"}):null}}).filter(e=>null!==e);return(0,n.jsx)(eW,{cards:o,children:(0,n.jsx)("div",{"data-kontent-element-codename":"buy_online_links",children:(0,n.jsx)(c.rM,{"data-kontent-element-codename":"content",element:t.elements.content,...l})})})},admin_campaign_form:e=>{let{block:t,BlockMapper:l,globalConfig:a,page:s}=e,r={...t,elements:{...t.elements,campaignFormCampaignId:t.elements.adminCampaignFormCampaignId,campaignFormQuestions:t.elements.adminCampaignFormQuestions,campaignFormColorStyling:t.elements.adminCampaignFormColorStyling,brandColor:t.elements.adminBrandColor,campaignFormHideOnLogin:t.elements.adminCampaignFormHideOnLogin,campaignFormRedirectPath:t.elements.adminCampaignFormRedirectPath,submissionFailureText:t.elements.adminSubmissionFailureText,successScreenMessage:t.elements.adminSuccessScreenMessage,successScreenButtonText:t.elements.adminSuccessScreenButtonText}};return(0,n.jsx)(r7,{BlockMapper:l,block:r,globalConfig:a,page:s})},campaign_form:r7,card_lister:e=>{var t,l,a,s,r;let{block:i,BlockMapper:o,...c}=e;return(0,n.jsx)(ej,{columns:Number(null!=(r=null==(t=i.elements.columns[0])?void 0:t.name)?r:3),isSliderOnMobile:(null==(l=i.elements.mobileSlider[0])?void 0:l.codename)==="yes",ofLabel:i.elements.ofLabel,showAsSlider:(null==(a=i.elements.slider[0])?void 0:a.codename)==="yes",snippetContainerResize:null==(s=i.elements.snippetContainerResize[0])?void 0:s.codename,children:i.elements.items.map(e=>(0,n.jsx)(o,{blocks:[e],...c},e.system.id))})},card_modal_trigger:eZ,card:eK,carousel_cta_block:e=>{let{block:t}=e,{locale:l=""}=(0,a.useRouter)();return(0,n.jsx)(eQ,{subtitle:t.elements.subtitle,title:t.elements.title,children:t.elements.carouselCtas.map(e=>(0,n.jsx)(eY,{icon:e.elements.icon,link:$(e.elements.link,l),title:e.elements.title},e.elements.title))})},cdc_gigya_popup:e=>{let{block:t}
1=e,[l,a]=(0,s.useState)(!1),r=()=>{a(!0)};return(0,s.useEffect)(()=>{if(!l)return void function(){let e=document.getElementById("CDC-status");e&&("Ready"===e.value?r():new MutationObserver(()=>{r()}).observe(e,{attributes:!0}))}();let e="CDCPopup_".concat(t.system.codename);if(!function(e){let t="; ".concat(document.cookie).split("; ".concat(e,"="));if(2===t.length){var l;return null==(l=t.pop())?void 0:l.split(";").shift()}}(e)){var n;setTimeout(()=>{var l;!function(e,t,l){let n=new Date;n.setTime(n.getTime()+24*l*36e5),document.cookie="".concat(e,"=").concat(t,"; expires=").concat(n.toUTCString(),"; path=/")}(e,"true",null!=(l=t.elements.popupSuppress)?l:0),gigya.accounts.showScreenSet({screenSet:t.elements.screensetId,startScreen:t.elements.screenId})},null!=(n=t.elements.popupDelay)?n:0)}},[t.elements.popupDelay,t.elements.popupSuppress,t.elements.screenId,t.elements.screensetId,t.system.codename,l]),(0,n.jsx)("div",{"data-clarity-mask":"true","data-kontent-element-codename":"cdc_gigya",id:t.system.codename})},cdc_gigya:aP,cdc_screen_set_wrapper:e=>{var t;let{block:{elements:{bsNoResultText:l,campaignQuestions:r,redirectPathOverride:i,formSubmissionGenericErrorMessage:c,customerLeavePageMessage:d,disableFormScrollingAfterSubmit:m,wrappedScreenset:[u]},system:{id:h,type:p}},page:x,...f}=e,{userDetails:g}=(0,es.As)(),v=(0,s.useRef)(g),y=(0,a.useRouter)(),{events:j,query:w,locale:N=""}=y,_=new sT,k="beforeunload",C="routeChangeStart",S=(null==(t=m[0])?void 0:t.codename)==="yes",L=new sE,T=0!==r.length,I=(0,s.useRef)(null),E=function(e){let t=e.elements.config[0];if(!t||!("campaignId"in t.elements))return null;let l=t.elements.campaignId;return"string"==typeof l&&l.length>0?l:null}(x),A=!!E,[F,B]=(0,s.useState)(null),[M,P]=(0,s.useState)(null),D=(0,s.useRef)(!1),R=e=>(e.preventDefault(),!0),q="string"==typeof d&&d.trim().length>0?d:"You have unsaved changes. Are you sure you want to leave this page?",z=()=>{if(F)if(D.current){if(D.current=!1,!confirm(q))throw(0,eF.vV)(Error("Route change Aborted by the user via confirmation dialog for campaign form")),j.emit("routeChangeError"),Error("Route change aborted by user")}else throw(0,eF.vV)(Error("Route change Aborted :unload event alert is not true for campaign form")),j.emit("routeChangeError"),Error("Route change aborted by user")};(0,s.useEffect)(()=>{v.current=g},[g]),(0,s.useEffect)(()=>{if(F)return D.current=!0,window.addEventListener(k,R),j.on(C,z),()=>{window.removeEventListener(k,R),j.off(C,z)};window.removeEventListener(k,R),j.off(C,z)},[F]),(0,s.useEffect)(()=>{null===M||M||((0,eF.vV)(Error("Campaign Form submission error".concat(c))),a3(sd(),c))},[M]);let O=async e=>{var t,l,n,a,s,r,i,c;(0,eF.OG)("Campaign Form Submitted Successfully"),((e,t)=>{if(t||!e)return;let{top:l}=e.getBoundingClientRect();window.scrollTo({top:window.scrollY+l-270,behavior:"smooth"})})(I.current,S);let{UID:d}=e.response,{response:m,form:u}=e,h=null!=(t=sI(w.utm_medium))?t:"",x=null!=(l=sI(w.utm_source))?l:"",f=!0;if(E){B(!0),a3(sd(),""),(0,eF.$s)({name:"ATTACH_BEFORE_UNLOAD_EVENT_ENABLED_FOR_CAMPAIGN_FORM",properties:{campaignId:E}});let t={ProductServiceCommunications:"productService",businessManagement:"businessManagement",professionalEducation:"professionalEducation",ProductPromotions:"productPromotions"},l=Object.keys(null!=(r=null==(n=e.subscriptions.preference)?void 0:n.b2b)?r:{}).reduce((l,n)=>{let a=t[n];if(a){var s,r,i;l[a]=(null==(i=e.subscriptions.preference)||null==(r=i.b2b)||null==(s=r[n])?void 0:s.email.isSubscribed)==="true"}return l},{productService:!1,businessManagement:!1,professionalEducation:!1,productPromotions:!1}),g=Object.keys(e.preferences).reduce((t,l)=>{var n;return t[l]=(null==(n=e.preferences[l])?void 0:n.isConsentGranted)==="true",t},{email:!1,sms:!1}),j=Object.fromEntries(Object.entries(null!=(i=e.response.requestParams.data.business)?i:{}).map(e=>{let[t,l]=e;return[t,null==l?void 0:String(l)]})),w={submissionId:crypto.randomUUID(),submissionTimeStamp:new Date().toISOString(),formId:E,sourceLocale:N,sourcePortal:o._.NEXT_PUBLIC_TOWER,sourcePage:"".concat(window.location.origin,"/").concat(y.locale).concat(y.asPath),formResponse:[],formCategory:"campaign",cdcProfile:{UID:null!=(c=v.current.id)?c:String(d),email:"string"==typeof e.profile.email?e.profile.email:"",salutation:e.data.salutation,role:e.data.role,role2:e.data.role2,professionalNumberJurisdiction:e.data.professionalNumberJurisdiction,professionalNumber:e.data.professionalNumber,firstName:"string"==typeof e.profile.firstName?e.profile.firstName:"",lastName:"string"==typeof e.profile.lastName?e.profile.lastName:"",phone:null==(s=e.profile.phones)||null==(a=s[0])?void 0:a.number,preferences:l,consent:g,business:j}};P(f=await L.send(w)),f&&(0,eF.$s)({name:"CAMPAIGN_INTEREST_DATA_SENT",properties:{campaignId:E,contactId:String(d),medium:h,source:x}}),B(!1),f&&"gigya-subscribe-with-email-form"===u&&(0,b.H4)(Object.fromEntries(Object.entries(m).map(e=>{let[t,l]=e;return[t,String(l)]})),u,p,E)}return"gigya-subscribe-with-email-form"!==u||E||(0,b.H4)(Object.fromEntries(Object.entries(m).map(e=>{let[t,l]=e;return[t,String(l)]})),u,p),(0,eF.$s)({name:"CAMPAIGN_SUBMISSION_COMPLETED",properties:{campaignSubmissionResponse:f,formName:u}}),f},U=i||(null==u?void 0:u.elements.redirectPath);return u&&(u.elements.redirectPath=null!=U?U:""),(0,n.jsx)("div",{"data-clarity-mask":"true",ref:I,children:u?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(aP,{block:u,campaignInterestSuccess:M,eventRegistration:{onSubmit:e=>{let t=s_.getInstance().getBusinessData(),l=null!=t?t:e.formModel.data.business,n={...e.formModel.data,business:l};(0,eF.OG)("Successfully fetched business data for campaign form.");let a=L.getInjectedElements();(0,eF.OG)("fetched injected elements for removal for campaign form");let s=T?Object.fromEntries(Object.entries(e.formModel.profile).filter(e=>{let[t,l]=e;return!a.includes(t)})):e.formModel.profile;return{...e.formModel,profile:s,data:n}},onBeforeValidation:e=>
1{T&&L.validate(),_.validate(e.formData,N)},onAfterScreenLoad:e=>{P(null),a3(sd(),""),_.setup(N,l).catch(e=>{(0,eF.vV)(e instanceof Error?e:Error("Business-search setup failed: ".concat(String(e))))}),T&&function(e,t,l){var a;let r=sV('div[data-kontent-element-codename="cdc_gigya"]'),i=sV('label[class~="interests"][data-screenset-roles*="instance"]',r),o=document.createElement("div");o.setAttribute("class","gigya-layout-row");let c=(0,n.jsx)(sH,{campaignQuestions:t,handler:l,id:e}),d=(0,s.createElement)("div",{className:"gigya-composite-control",key:e,id:e},c);null==(a=i.parentElement)||a.after(o),(0,sA.createRoot)(o).render(d)}(h,r,L)},onBeforeSubmit:e=>{if(T&&!L.isValid())return(0,eF.OG)("Campaign interest is not valid"),!1;let t=e.formData["data.role"];return t&&["Beef Farmer","Sheep Farmer","Dairy Farmer"].includes(t)?_.isValid(!1):_.isValid()},onAfterSubmit:O},holdRedirectUntilInterestApiFinished:A,page:x,...f}),(0,n.jsx)("span",{className:"campaign-form-submit-error-message block text-center text-sm font-bold leading-5 text-red-500",role:"alert"})]}):null})},click_to_buy_multi_product:eJ,click_to_buy_single_product:e1,click_to_cart:e4,column_card_lister:e=>{let{block:t,BlockMapper:l,...a}=e,s=(()=>{var e;switch(null==(e=t.elements.snippetSpacingSpacing[0])?void 0:e.codename){case"default":return u.default;case"top":return u.top;case"bottom":return u.bottom;default:return u.none}})(),{title:r}=t.elements;return(0,n.jsxs)("div",{className:s,children:[(0,n.jsx)("h2",{className:"pb-1 pt-2 text-center",children:r}),(0,n.jsx)("div",{className:"mx-auto flex flex-col items-center",children:t.elements.articleBlocks.map(e=>(0,n.jsx)("div",{className:"article-block my-4 !p-0 p-4",children:(0,n.jsx)(l,{blocks:[e],...a,className:"h-full"},e.system.id)},e.system.id))})]})},column:e=>{var t;let{block:l,BlockMapper:a,page:s,...r}=e,o=null==(t=l.elements.snippetContainerResize[0])?void 0:t.codename,c=o?(0,h.As)(o,"container-wide"):"container-wide",d=(()=>{var e;switch(null==(e=l.elements.snippetSpacingSpacing[0])?void 0:e.codename){case"default":return u.default;case"top":return u.top;case"bottom":return u.bottom;default:return u.none}})(),{colorId:m}=G({blockColor:l.elements.snippetLayoutBackgroundColorBrandColor||void 0,pageConfig:s.elements.config[0],fallbackColorId:"primary"}),p=(()=>{var e;let t=null==(e=l.elements.snippetLayoutBackgroundColorColor[0])?void 0:e.codename;return t||"none"})(),x=!!l.elements.snippetLayoutBackgroundColorBrandColor,f=x&&m?(0,V.wj)(m):"",g=x?"none":p,v="brand"!==p||x?"":"!bg-".concat(m,"-light bg-default-light-background");return(0,n.jsx)(aD,{bgColor:g,className:(0,i.$)(d,v,f,l.system.type),containerClassName:c,children:(0,n.jsx)("div",{className:"w-[inherit]",children:l.elements.items.map(e=>(0,n.jsx)(a,{blocks:[e],page:s,...r},e.system.id))})})},comparison_table:e=>{var t,l,a,r,i;let{block:o}=e,c=[{label:"",id:"",content:null},...o.elements.comparisonColumns.map(e=>{var t;let{elements:{comparisonLabel:l,companyLogo:a},system:{id:s}}=e;return{label:l,id:s,content:(0,n.jsx)(e5,{centered:!0,column:!0,iconAlt:l||"",iconUrl:(null==(t=a[0])?void 0:t.url)||"",text:(0,n.jsx)("span",{className:"block md:hidden",children:l||""})})}})],d=o.elements.comparisonRows.map((e,t)=>{var l,a;let{elements:{comparisonFeature:s,icon:r},system:{id:i}}=e;return{header:{label:s,id:i,content:(0,n.jsx)(e5,{iconAlt:s||"",iconUrl:(null==(l=r[0])?void 0:l.url)?null==(a=r[0])?void 0:a.url:"",text:s||""})},row:o.elements.comparisonColumns.flatMap(e=>{var l;let a=(null==(l=e.elements["row".concat(t+1,"Tick")][0])?void 0:l.codename)==="yes";return{columnId:e.system.id,rowId:i,content:a?(0,n.jsx)(e9,{circleClasses:"mx-auto bg-blue-500",iconType:"Tick"}):(0,n.jsx)(e9,{circleClasses:"mx-auto bg-red-500",iconType:"Cross"})}})}}),[m,u]=(0,s.useState)(null!=(i=null==(t=c[2])?void 0:t.id)?i:""),h=c.filter(e=>{var t;return e.label&&(null==(t=c[1])?void 0:t.id)!==e.id}),p=(0,n.jsxs)("table",{className:"w-full shadow-primary md:hidden",children:[(0,n.jsx)("thead",{children:(0,n.jsxs)("tr",{children:[(0,n.jsx)("td",{className:"border-r !border-solid border-gray-600 p-6 pb-0",children:null==(l=c[0])?void 0:l.content}),(0,n.jsx)("th",{className:"border-r !border-solid border-gray-600 p-3",scope:"col",children:null==(a=c[1])?void 0:a.content}),(0,n.jsx)("th",{className:"border-r border-gray-600 p-3",scope:"col",children:h.length>0?(0,n.jsx)("label",{htmlFor:"products-dropdown",children:(0,n.jsx)("select",{className:"min-w-110 p-2.5 text-sm",id:"products-dropdown",name:"products-dropdown",onChange:e=>{u(e.target.value)},style:{minWidth:"110px !important"},children:h.map(e=>{let{label:t,id:l}=e;return(0,n.jsx)("option",{value:l,children:t},l)})})}):(0,n.jsx)("th",{className:"border-r border-gray-600 p-3",scope:"col",children:null==(r=c[2])?void 0:r.content})})]})}),(0,n.jsx)("tbody",{children:d.map(e=>{var t,l,a;let{header:s,row:r}=e;return(0,n.jsxs)("tr",{className:"odd:bg-gray-100 even:bg-transparent",children:[(0,n.jsx)("th",{className:"border-r !border-solid border-gray-600 p-3",scope:"row",children:s.content}),(0,n.jsx)("td",{className:"border-r border-gray-600 p-7",children:(null==(t=r[0])?void 0:t.content)||(0,n.jsx)("span",{})}),(0,n.jsx)("td",{className:"border-r border-gray-600 p-3",children:(null==(l=r.find(e=>e.columnId===m))?void 0:l.content)||(0,n.jsx)("span",{})})]},"".concat(s.id,"-").concat(null==(a=r[0])?void 0:a.columnId))})})]}),x=(0,n.jsxs)("table",{className:"hidden w-full rounded-lg shadow-primary md:!table",children:[(0,n.jsx)("thead",{children:(0,n.jsx)("tr",{children:c.map(e=>(0,n.jsx)(s.Fragment,{children:e.content?(0,n.jsx)("th",{className:"border-r border-gray-600 p-6 pb-0 md:pb-4",scope:"col",children:e.content}):(0,n.jsx)("td",{className:"border-r !border-solid border-gray-600"})},e.id))})}),(0,n.jsx)("tbody",{children:d.map(e=>{let{header:t,row:l}=e;return(0,n.jsxs)("tr",{className:"odd:bg-gray-100 even:bg-transparent",children:[(0,n.jsx)("th",{className:"border-r !border-solid border-gray-600 p-7",scope:"row",children:t.content}),l.map(e=>(0,n.jsx)("td",{className:"border-r border-gray-600 p-7",children:e.content},"".concat(e.columnId,"-").concat(e.rowId)))]},t.id)})})]});return(0,n.jsxs)("div",{children:[p,x]})},content_module_with_bullets:e=>{var t,l,a;let{block:{elements:{title:s,description:r,bulletTitle:i,bullets:o,smallImage:c,largeImage:d,secondTitle:m,secondDescription:u,thirdTitle:h,thirdDescription:p}}}=e;return(0,n.jsxs)("div",{className:"container-wide",children:[(0,n.jsxs)(tn,{className:"mb-6",children:[(0,n.jsx)("h2",{children:s}),(0,n.jsx)("p",{children:r})]}),(0,n.jsx)("div",{className:"bg-gray-200 p-6 md:p-8",children:(0,n.jsxs)("div",{className:"container-narrow md:flex",children:[(0,n.jsx)("div",{className:"pb-4 md:w-1/2 md:pb-0",children:(0,n.jsxs)(tn,{children:[(0,n.jsx)("h3",{children:i}),(0,n.jsx)(tl,{children:o.map(e=>{let{elements:{item:t},system:{id:l}}=e;return(0,n.jsx)("li",{children:t},"".concat(l,"-").concat(t))})})]})}),(0,n.jsx)("div",{className:"md:w-1/2 md:pl-8",children:(0,n.jsx)(ts,{image:{src:null==(t=c[0])?void 0:t.url,alt:(null==(l=c[0])?void 0:l.description)||""},largeImageUrl:(null==(a=d[0])?void 0:a.url)||""})})]})}),(0,n.jsxs)(tn,{className:"mt-6",children:[(0,n.jsx)("h3",{children:m}),(0,n.jsx)("p",{children:u})]}),(0,n.jsxs)(tn,{className:"mt-6",children:[(0,n.jsx)("h3",{children:h}),(0,n.jsx)("p",{children:p})]})]})},country_selector:e=>{let{block:t,...l}=e,a=t.elements.countryFlagItems.map(e=>{let{system:t,elements:{flagImage:l,localeName:a,localeUrl:s}}=e,r=l[0],i=tc(s);return r&&a&&s&&(0,n.jsx)("a",{className:"relative w-full hover:bg-gray-200",href:i,onClick:()=>{(0,eF.OG)('Flag clicked: {locale: "'.concat(a,'", codename: "').concat(s,'"}'))},children:(0,n.jsxs)("div",{className:"flex flex-nowrap items-center justify-start gap-3 p-2",children:[(0,n.jsx)(f(),{alt:a,className:"flex-start aspect-[3/2] h-[33px] w-[50px] flex-shrink-0",height:33,loader:v.L,src:r.url,width:50}),(0,n.jsx)("span",{className:"break-words",children:a})]})},t.id)});return(0,n.jsx)("div",{className:"my-6 flex flex-col items-center justify-center",children:(0,n.jsxs)("div",{className:"mx-auto flex max-w-[1024px] flex-col items-center justify-center",children:[(0,n.jsx)("hr",{className:"h-px w-full border-0 bg-gray-400 dark:bg-gray-700"}),(0,n.jsx)("div",{className:"my-6 grid auto-rows-fr grid-cols-2 items-center justify-items-start gap-3 gap-y-4 px-5 md:grid-cols-3 lg:grid-cols-4 xl:grid-cols-5","data-kontent-element-codename":"flags",children:a}),(0,n.jsx)("hr",{className:"h-px w-full border-0 bg-gray-400 dark:bg-gray-700"}),(0,n.jsx)("div",{className:"my-6 grid w-full items-center justify-items-center gap-2 sm:grid-cols-1 md:grid-cols-2",children:t.elements.towerLinks.map(e=>(0,n.jsx)("div",{className:"w-content my-3 flex flex-row items-center justify-center","data-kontent-item-id":e.system.id,children:(0,n.jsx)(X,{block:e,...l})},e.system.id))}),(0,n.jsx)("div",{className:"mt-5 text-lg sm:mx-5","data-kontent-element-codename":"disclaimer",children:t.elements.disclaimer[0]?(0,n.jsx)(p,{block:t.elements.disclaimer[0],richTextRendererClassName:"container-narrow",...l}):null})]})})},coupon_iframe:e=>(0,n.jsx)(td,{...e}),coupon:e=>{var t,l;let{block:a,page:s}=e,{bgClass:r}=G({blockColor:a.elements.brandColorCustom,blockColorLegacy:a.elements.brandColor,pageConfig:s.elements.config[0],fallbackColorId:"primary"});return(0,n.jsxs)("div",{className:"mx-auto mt-20 max-w-3xl rounded-lg border-2",children:[(0,n.jsxs)("div",{className:"flex flex-col px-4 py-6 md:flex-row md:px-12 md:py-10",children:[(0,n.jsxs)("div",{className:"w-full flex-col items-center pb-5 md:mr-6 md:w-1/3 md:p-0",children:[(null==(t=a.elements.logo[0])?void 0:t.url)?(0,n.jsx)(f(),{alt:a.elements.logo[0].description||"coupon-logo",className:"mx-auto h-1/4 w-1/2 object-contain pb-2.5 md:mx-0 md:w-full",height:a.elements.logo[0].height||100,loader:v.L,src:a.elements.logo[0].url,width:a.elements.logo[0].width||200}):null,(null==(l=a.elements.image[0])?void 0:l.url)?(0,n.jsx)(f(),{alt:a.elements.image[0].description||"coupon",className:"h-full w-full object-cover md:h-3/4",height:a.elements.image[0].height||300,loader:v.L,src:a.elements.image[0].url,width:a.elements.image[0].width||400}):null]}),(0,n.jsxs)("div",{className:"w-full md:w-2/3",children:[(0,n.jsx)("h2",{className:"mb-5 text-2xl md:text-4xl",children:a.elements.title}),(0,n.jsx)("p",{children:a.elements.description}),(0,n.jsx)(H.$,{className:"".concat(r," mr-6 mt-6 w-full md:w-1/2"),href:a.elements.url,variant:r,children:a.elements.buttonText})]})]}),(0,n.jsx)("div",{className:"flex bg-gray-300 px-12 py-5",children:(0,n.jsx)("p",{className:"text-xs text-gray-600",children:a.elements.footerText})})]})},cta_button_email:e=>{var t,l;let{block:s,page:r}=e,{locale:i}=(0,a.useRouter)(),o=m[null==(t=s.elements.snippetSpacingSpacing[0])?void 0:t.codename]||m.default,c=s.elements.emailCc,d=s.elements.emailSubject,u=s.elements.emailBody,h=s.elements.emailRecipient,p=encodeURIComponent(c),x=encodeURIComponent(d),f=encodeURIComponent(u),g="mailto:".concat(h,"?cc=").concat(p,"&subject=").concat(x,"&body=").concat(f),{colorId:v}=G({blockColor:s.elements.brandColor,blockColorLegacy:s.elements.variant,pageConfig:r.elements.config[0],fallbackColorId:"primary"});return(0,n.jsx)("div",{className:"".concat(o," container-narrow text-center"),children:(0,n.jsx)(H.$,{as:"a","data-kontent-element-codename":"text",href:g,icon:P.v[null==(l=s.elements.icon[0])?void 0:l.name],locale:i,variant:v,children:s.elements.text})})},cta_button:J,distributor_card_lister:e=>
1{var t,l,r,i,o,c;let{block:d,block:{elements:{buttonText:u,initialItemsNumber:h,subsequentItemsNumber:p,paginationString:x,snippetSpacingSpacing:f}},BlockMapper:g,...v}=e,{locale:b=""}=(0,a.useRouter)(),y=(0,es.As)(),[j,w]=(0,s.useState)(0),N=m[null==(t=f[0])?void 0:t.codename]||m.none,_=null!=h?h:6,k=null!=p?p:6,C=null!=(r=y.userDetails.userRoles)?r:[],{isLoading:S,isFetching:L,data:T}=(0,eB.useInfiniteQuery)({queryKey:["distributor_card",{codename:"distributor_card",locale:b,orderBy:"order_alphabetically_by_title",skip:j*k,limit:0===j?_:k,roles:C.join(",")}],queryFn:e=>tu(e)}),I=null!=(i=null==T?void 0:T.pages)?i:d.initialItems?[{items:d.initialItems}]:[],E=null!=(c=null!=(o=null==T||null==(l=T.pages[0])?void 0:l.pagination.totalCount)?o:d.initialTotalCount)?c:0,A=I.flatMap(e=>e.items).length,F=!T&&0===A,B=(!S&&T||A>0)&&A>0,M=()=>Math.min(A,E),P=x.replace("{{X}}",M().toString()).replace("{{Y}}",E.toString());return(0,n.jsxs)("div",{className:"mx-auto ".concat(N),style:{maxWidth:"1200px"},children:[(0,n.jsx)("p",{className:"mb-4 text-center font-bold sm:text-left",children:P}),F?(0,n.jsx)(th,{amount:_}):null,(0,n.jsx)("div",{className:"flex flex-col",children:B?I.map(e=>e.items.map(e=>(0,n.jsx)("div",{className:"w-full",children:(0,n.jsx)(g,{blocks:[e],...v})},e.system.id))):null}),L&&T?(0,n.jsx)(th,{amount:k}):null,u&&M()<E?(0,n.jsx)("div",{className:"my-10 w-full text-center",children:(0,n.jsx)(H.$,{onClick:()=>{w(e=>e+1)},type:"button",children:u})}):null]})},distributor_card:e=>{var t,l;let{block:{elements:{button:a,description:s,image:[r],imageAlignment:i,title:o}},...d}=e;return(0,n.jsx)(tm,{buttonSection:a.map(e=>(0,n.jsx)(X,{block:e,...d},e.system.id)),image:r?(0,n.jsx)(f(),{alt:null!=(l=r.description)?l:"",height:r.height||300,loader:v.L,src:r.url,width:r.width||500}):null,infoSection:(0,n.jsx)(c.rM,{className:"py-6",element:s,...d}),reversed:(null==(t=i[0])?void 0:t.codename)==="left",title:(0,n.jsx)("h3",{children:o})})},dynamic_article_lister:e=>{var t,l,r,o,c,d,m,u,h,p,x,f;let{block:g,page:v,...y}=e,j=(0,a.useRouter)(),{page:w}=j.query,N=(0,es.As)(),[_,k]=(0,s.useState)(0),C=g.initialItems,{featuredTitle:S,buttonText:L,featuredDescription:T}=g.elements,I="nextButtonText"in g.elements&&g.elements.nextButtonText?g.elements.nextButtonText:"Next",E="prevButtonText"in g.elements&&g.elements.prevButtonText?g.elements.prevButtonText:"Prev",A=null!=(d=g.elements.subsequentArticleNumber)?d:6,F=null!=(m=g.elements.initialArticleNumber)?m:6,B=(null==(t=g.elements.showFeatured[0])?void 0:t.codename)!=="no",M=v.elements.config[0],P=(()=>{var e;if(!M||!("snippetCategoryColorCategoryColor"in M.elements))return null;let t=M.elements.snippetCategoryColorBrandColor||(null==(e=M.elements.snippetCategoryColorCategoryColor[0])?void 0:e.codename);return"string"==typeof t&&t?t:null})(),D=P&&"none"!==P?"bg-category-".concat(P):"",R="  ".concat(D?"".concat(D," text-white"):""),q="tags"in g.elements?g.elements.tags:"category"in g.elements?g.elements.category:"categories"in g.elements?g.elements.categories:[],z="tags"in g.elements?"tags":"category"in g.elements?"category":"categories"in g.elements?"categories":null,O=[{taxonomy:z,terms:[null==(l=q[0])?void 0:l.codename]}],U=null!=(u=N.userDetails.userRoles)?u:[],$="usePagination"in g.elements&&(null==(r=g.elements.usePagination[0])?void 0:r.codename)==="yes",{isLoading:V,isFetching:Z,fetchNextPage:G,data:W}=(0,eB.useInfiniteQuery)({queryKey:["dynamicArticleLister",{codename:"config_article",locale:null!=(h=j.locale)?h:"",filters:JSON.stringify(O),orderBy:"order_by_date_last_modified",hideElementCodename:"hide_from_lister",skip:(Number(null!=(p=null==w?void 0:w.toString())?p:1)-1)*F,limit:F,roles:U.join(",")}],queryFn:e=>tu(e),getNextPageParam:()=>_,staleTime:6e5,cacheTime:9e5}),K=(0,s.useMemo)(()=>{var e;return null!=(e=null==W?void 0:W.pages)?e:C?[{items:C}]:[]},[null==W?void 0:W.pages,C]),Y=null!=(f=null!=(x=null==W||null==(o=W.pages[0])?void 0:o.pagination.totalCount)?x:g.initialTotalCount)?f:0,Q=(Number(w)||1)+_+1,X=!V&&W||K.length>0,J="titleDescSpacing"in g.elements?null==(c=g.elements.titleDescSpacing[0])?void 0:c.codename:void 0,ee=e=>e.map(e=>{var t,l;let{elements:{title:a,thumbnailImage:s,articleListerCategory:r,tags:i,articleSlug:o}}=e,c=j.locale?"/".concat(j.locale).concat(o):o,d=(null==(t=r[0])?void 0:t.name)||(null==(l=i[0])?void 0:l.name)||"";return(0,n.jsx)("div",{className:"my-2 flex w-full flex-wrap justify-center sm:w-1/2 md:w-1/3",children:(0,n.jsx)(en,{block:{elements:{title:a,subtitle:"",url:c,image:s,metaBlock:[{elements:{title:d,url:c,openInNewTab:[{codename:"no",name:"No"}],image:[],horizontalAlignment:[{codename:"left",name:"Left"}],authenticationGateComponentUserRoles:[]},system:{codename:"",id:"",type:"meta_block",name:""}}],authenticationGateComponentUserRoles:[],ctaButton:[],openInNewTab:[],productLabelUrl:[],snippetCategoryColorCategoryColor:null!=P?P:""},system:{codename:"",id:"",type:"article_lister_block",name:""}},page:v,...y})},e.system.id)});return(0,n.jsxs)("div",{children:[B&&S?(0,n.jsxs)("div",{className:(0,i.$)("full flex flex-col items-center py-10 text-center",R),children:[(0,n.jsx)("h1",{"data-kontent-element-codename":"featured_title",children:S}),T?(0,n.jsx)("h2",{"data-kontent-element-codename":"featured_description",children:T}):null]}):null,(0,n.jsx)("div",{className:"mx-auto flex max-w-screen-xl flex-wrap justify-center","data-kontent-element-codename":null!=z?z:void 0,children:X?K.slice(0,1).map(e=>ee(B?e.items.slice(0,3):[])):null}),Z?(0,n.jsx)("div",{className:"mx-auto my-2 grid max-w-screen-xl grid-cols-1 gap-10 px-3 sm:grid-cols-2 sm:px-0 md:grid-cols-3",children:(0,n.jsx)(th,{amount:W?A:F})}):null,g.elements.listerTitle?(0,n.jsxs)("div",{className:"full flex flex-col items-center py-10 text-center ".concat(B?"":R," "),children:[(0,n.jsx)("h2",{className:J&&({none:"pb-0",sm:"pb-8",md:"pb-16",lg:"pb-24"})[J]||"","data-kontent-element-codename":"lister_title",children:g.elements.listerTitle}),g.elements.listerDescription?(0,n.jsx)("p",{"data-kontent-element-codename":"lister_description",children:g.elements.listerDescription}):null]}):null,(0,n.jsx)("div",{className:"mx-auto flex max-w-screen-xl flex-wrap justify-center",children:X?K.map((e,t)=>ee(B&&0===t?e.items.slice(3):e.items)):null}),Z?(0,n.jsx)("div",{className:"mx-auto my-2 grid max-w-screen-xl grid-cols-1 gap-10 px-3 sm:grid-cols-2 sm:px-0 md:grid-cols-3",children:(0,n.jsx)(th,{amount:W?A:F})}):null,$?(0,n.jsx)(aO.d,{activeIndex:Number(w)||1,amountOfPages:Math.ceil(Y/F),nextButtonText:(0,n.jsx)("span",{"data-kontent-element-codename":"next_button_text",children:I}),onPageChange:e=>{var t;j.push({pathname:"".concat(null!=(t=j.locale)?t:"").concat(j.asPath.split("?")[0]),query:{page:e}})},pagesToShow:3,prevButtonText:(0,n.jsx)("span",{"data-kontent-element-codename":"prev_button_text",children:E}),showLastPage:!0}):L&&function(){let e=(_+1)*F;return e>Y?Y:e}()<Y&&(0,n.jsx)("div",{className:"my-10 text-center","data-kontent-element-codename":"button_text",children:(0,n.jsx)(H.$,{href:"?page=".concat(Q),onClick:async e=>{!function(e){return"button"in e&&(0!==e.button||e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}(e)&&(e.preventDefault(),function(e){let t=new URL(window.location.href);t.searchParams.set("page",e.toString()),window.history.replaceState(null,"",t)}(Q),await G(),k(e=>e+1),(0,b.d)({event:"cta_click",cta_name:L,cta_category:"button"}))},type:"button",children:L})})]})},enhanced_card:tp,enhanced_product_card:sW,enhanced_product_directory_card:sW,fact_lister_block:e=>{let{block:{elements:{factsList:t,title:l,body:{value:a},ctaButton:s}}}=e,r=t.map(e=>({title:e.elements.title,sub_title:e.elements.subTitle}));return(0,n.jsxs)("div",{className:"container mt-16 md:flex md:items-center",children:[(0,n.jsx)("div",{className:"md:w-1/2",children:(0,n.jsx)(ex,{col:5,children:r.map(e=>(0,n.jsx)("div",{className:"factBlock flex h-36 w-full items-center     rounded bg-gray-200 leading-normal md:h-44 md:w-44",children:(0,n.jsxs)("div",{className:"p-20px m-auto flex flex-col text-center",children:[(0,n.jsx)("h2",{className:"mb-1",children:e.title}),(0,n.jsx)("h4",{className:"font-light",children:e.sub_title})]})}
1,e.title))})}),(0,n.jsxs)("div",{className:"my-8 md:mx-8 md:w-1/2",children:[(0,n.jsxs)("div",{className:"content",children:[(0,n.jsx)("h3",{children:l}),(0,n.jsx)("div",{dangerouslySetInnerHTML:{__html:a}})]}),s[0]?(0,n.jsx)(H.$,{className:"text-base",href:s[0].elements.url,icon:P.v.External,children:s[0].elements.text}):null]})]})},faq_heading_share_block:e=>{let{block:{elements:{linkIcon:t,heading:l}}}=e,{locale:s=""}=(0,a.useRouter)();return(0,n.jsx)("section",{className:"container-wide my-6",children:(0,n.jsxs)("div",{className:"flex flex-col justify-between md:flex-row md:items-center",children:[(0,n.jsx)("div",{children:(0,n.jsx)("h1",{className:"mb-8 text-4xl font-semibold text-midnight-blue md:mb-0","data-kontent-element-codename":"heading",children:l})}),(0,n.jsx)("ul",{className:"flex space-x-2",children:t.length>0&&t.map(e=>(0,n.jsx)("li",{"data-kontent-item-id":e.system.id,children:(()=>{var t,l;let a=(null==(t=e.elements.openInNewTab[0])?void 0:t.codename)==="yes",r=$(e.elements.url,s),i=(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(S,{className:"h-6 w-6",noBackground:!0,noBorder:!0,children:(0,n.jsx)(n.Fragment,{children:(null==(l=e.elements.icon[0])?void 0:l.url)?(0,n.jsx)(f(),{alt:e.elements.icon[0].description||"",className:"h-6 w-6",height:24,loader:v.L,src:e.elements.icon[0].url,width:24}):null})}),(0,n.jsx)("span",{className:"text-sm","data-kontent-element-codename":"text",children:e.elements.text})]});return a?(0,n.jsx)("a",{className:"flex flex-col items-center justify-end text-[#333]",href:r,rel:"noreferrer",target:"_blank",children:i}):(0,n.jsx)(B(),{className:"flex flex-col items-center justify-end text-[#333]",href:r,children:i})})()},e.system.id))})]})})},faq_search_header:e=>{var t;let{block:l}=e,a=(0,s.useContext)(sZ),[r,i]=(0,s.useState)((null==a||null==(t=a[0])?void 0:t.faqSearchQuery)||"");return(0,s.useEffect)(()=>{let e=new URL(window.location.href).searchParams.get("q");i(null!=e?e:"")},[]),(0,s.useEffect)(()=>{let e=setTimeout(()=>{null==a||a[1]({...a[0],faqSearchQuery:r})},500);return()=>{clearTimeout(e)}},[a,r]),(0,n.jsxs)(tV,{className:"text-center",noTheme:!0,children:[(0,n.jsx)("h1",{children:l.elements.title}),(0,n.jsx)("p",{className:"max-w-2xl pt-4",children:l.elements.description}),(0,n.jsxs)("form",{className:"relative mx-auto mt-16 w-full max-w-full md:w-[575px]",onSubmit:e=>{e.preventDefault()},children:[(0,n.jsxs)("label",{className:"flex items-center",htmlFor:"search-header-input",children:[(0,n.jsx)("span",{className:"sr-only",children:"Search"}),(0,n.jsx)("div",{className:"-left-56 bottom-2 mt-1 pr-4 text-left lg:absolute lg:mt-0 lg:pr-0",children:(0,n.jsx)(B(),{className:"inline-block lg:text-white",href:l.elements.backButtonUrl,children:(0,n.jsx)("svg",{className:"h-8 w-8",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:(0,n.jsx)("path",{d:"M10 19l-7-7m0 0l7-7m-7 7h18",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"2"})})})}),(0,n.jsx)("input",{className:"mb-0 text-black","data-clarity-mask":"true",id:"search-header-input",onChange:e=>{i(e.target.value)},placeholder:l.elements.placeholder,type:"text",value:r})]}),(0,n.jsx)(w,{as:"button",className:"absolute inset-y-0 right-0 my-auto mr-2",icon:P.v.Search,iconSize:"w-6 h-6",type:"submit",children:"Search"})]})]})},faq_search_results:e=>{var t,l,r,i,o;let{block:c,globalConfig:d,...m}=e,{locale:u=""}=(0,a.useRouter)(),h=(0,s.useContext)(sZ),{data:p}=(0,eB.useQuery)({queryFn:s0,queryKey:["faqCognitiveSearchResults",{searchEndpoint:d.elements.faqSearchIndexUrl,searchQuery:null!=(i=null==h||null==(t=h[0])?void 0:t.faqSearchQuery)?i:""}]}),{isLoading:x,isFetching:f,isError:g,data:v}=(0,eB.useQuery)({queryKey:["faqSearchResults",{locale:u,codenames:p}],queryFn:sJ,enabled:p&&p.length>0}),b=c.elements.resultsForTitle.replace(/{{X}}/,null!=(o=null==h||null==(l=h[0])?void 0:l.faqSearchQuery)?o:"");return x||f?(0,n.jsx)(eA,{theme:"blue"}):g?(0,n.jsx)("p",{children:"We were unable to retrieve FAQs at this time. Try again later."}):v&&0!==v.items.length?(0,n.jsxs)(n.Fragment,{children:[(null==h||null==(r=h[0])?void 0:r.faqSearchQuery)?(0,n.jsx)("p",{className:"mb-5 text-lg font-bold text-black",children:b}):null,(0,n.jsx)(tB,{block:{elements:{authenticationGateComponentUserRoles:c.elements.authenticationGateComponentUserRoles,faqItems:v.items,expandIconColor:[],expandIconColorPicker:"",snippetSpacingSpacing:[]},system:c.system},globalConfig:d,...m})]}):(0,n.jsx)("p",{className:"mb-5 text-lg font-bold text-black",children:c.elements.noResultsTitle})},faq:tB,featured_article:e=>{var t,l,r,o,c;let{block:d}=e,{locale:u=""}=(0,a.useRouter)(),h=(0,s.useContext)(sZ),p=null==(t=d.elements.snippetSpacingSpacing[0])?void 0:t.codename,x=Object.keys(m).includes(null!=p?p:"")?m[p]:m.none,f=null==(l=d.elements.config[0])?void 0:l.elements,g="#";return(null==f?void 0:f.articleSlug)&&""!==f.articleSlug&&(g=f.articleSlug.startsWith("/")?f.articleSlug:"/".concat(f.articleSlug),g=""!==u?"".concat(u).
1concat(g):g),(0,s.useEffect)(()=>{null==h||h[1]({...h[0],featuredArticle:d.system.id})},[]),(0,n.jsx)("div",{children:(0,n.jsx)(ea,{bodyMetaBlock:(0,n.jsx)(M,{blur:!1,image:(0,n.jsx)(s1,{}),metaText:"",children:d.elements.bodyMetaText}),className:(0,i.$)("container-narrow !shadow-around",x),description:null==f?void 0:f.description,imageMetablock:(null==f||null==(r=f.articleListerCategory[0])?void 0:r.name)?(0,n.jsx)(M,{blur:!1,metaText:"",children:null==(o=f.articleListerCategory[0])?void 0:o.name}):null,imageUrl:null==f||null==(c=f.thumbnailImage[0])?void 0:c.url,subtitle:"",title:null==f?void 0:f.title,children:(0,n.jsx)(B(),{href:g,legacyBehavior:!0,passHref:!0,children:(0,n.jsx)(H.$,{onClick:()=>{(0,b.d)({event:"cta_click",cta_name:d.elements.buttonText,cta_category:"CTA_Button"})},children:d.elements.buttonText})})})})},filter_bar:e=>{var t,l;let{block:r}=e,i=(0,s.useContext)(sZ),{locale:c="",...d}=(0,a.useRouter)(),[u,h]=(0,s.useState)(!1),[p,x]=(0,s.useState)(!1),[f,g]=(0,s.useState)(!1),[v,y]=(0,s.useState)({}),[j,w]=(0,s.useState)({}),N="".concat(null==(t=r.elements.listerOnPage[0])?void 0:t.codename,"FilterOptions");(0,s.useEffect)(()=>{let e=()=>{h(window.innerWidth>=1280)};return window.addEventListener("resize",e),e(),()=>{window.removeEventListener("resize",e)}},[]),(0,s.useEffect)(()=>{let e=r.elements.filterBarOptions.reduce((e,t)=>s8(e,t,d.asPath),{}),t=r.elements.additionalFilterBarOptions.reduce((e,t)=>s8(e,t,d.asPath),{});y(e),w(t),null==i||i[1]({...i[0],[N]:{...e,...t}})},[d.asPath]);let _=function(e,t){let l=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=((e,t,l)=>{let n=new URL("".concat(o._.NEXT_PUBLIC_APP_URL,"/").concat(c).concat(d.asPath)).searchParams;n.delete("page");let a=n.get(t);if(!e)return n.delete(t),n;if(l||!a)return n.set(t,e),n;if(a.includes(e)){let l=a.replaceAll(e,"").split(",");1===l.length?n.delete(t):n.set(t,l.filter(t=>t!==e&&0!==t.length).join(","))}else n.set(t,"".concat(a,",").concat(e));return n})(e,t,l),a={};if(n.forEach((e,t)=>{a[t]=e}),!l){let l=(null==i?void 0:i[0][N][t]).checkboxOptions.map(t=>{let{value:l,codename:n,checked:a}=t;return e===l?((0,b.d)({event:a?"filter_clear":"filter_selected",filter_name:l}),{value:l,codename:n,checked:!a}):{value:l,codename:n,checked:a}}),n={...null==i?void 0:i[0],[N]:{...null==i?void 0:i[0][N],[t]:{checkboxOptions:l}}};null==i||i[1](n)}d.replace({pathname:"".concat(c).concat(d.asPath.split("?")[0]),query:{...a}},void 0,{shallow:!0})},k=e=>(Object.keys(e).forEach(t=>{let l=e[t];if(l)if("label"in l)e[t]={...l,value:""};else{let n=l.checkboxOptions.map(e=>({...e,checked:!1}));e[t]={...l,checkboxOptions:n}}}),e),C=function(e){return e&&Object.keys(m).includes(e)?m[e]:m.none}(null==(l=r.elements.snippetSpacingSpacing[0])?void 0:l.codename),S=r.elements.additionalFilterBarOptions.length>0,L={additionalFilterBarOptions:r.elements.additionalFilterBarOptions,additionalFilterTitle:r.elements.additionalFilterTitle,closeButtonTitle:r.elements.closeButtonTitle,filterBarOptions:r.elements.filterBarOptions,resetButtonTitle:r.elements.resetButtonTitle,title:r.elements.title,checkShowAdditionalFilters:S,filterBarKey:N,globalState:null==i?void 0:i[0],renderFilterOptions:(e,t)=>{var l,a,s;let r=null!=(a=null==(l=e.elements.type[0])?void 0:l.codename)?a:"dropdown",o=e.elements.taxonomy[
10],d=o.system.type.replace("taxonomy_",""),m=d.toLowerCase().replace(/(?:_\w)/g,e=>{var t,l;return null!=(l=null==(t=e[1])?void 0:t.toUpperCase())?l:""});if("dropdown"===r){let l=function(e,t){var l;let n=null==(l=s9[null!=t?t:""])?void 0:l.find(t=>t.some(t=>e.some(e=>e.value===t)));if(!n)return e.toSorted((e,l)=>sp(e.text,l.text,t));let a=new Map(n.map((e,t)=>[e,t]));return e.toSorted((e,l)=>{let n=a.get(e.value),s=a.get(l.value);return void 0!==n&&void 0!==s?n-s:void 0!==n?-1:void 0!==s?1:sp(e.text,l.text,t)})}(o.elements[m].map(e=>({text:e.name,value:e.codename})),c),a=[{text:e.elements.allItemsTitle,value:""},...l];return(0,n.jsxs)("div",{className:"".concat("productsFilterOptions"===N?"xl:w-auto":"md:pr-1"," w-full"),children:[(0,n.jsx)("label",{className:"mb-2 text-[16px] font-bold text-black",htmlFor:e.elements.label+t,children:e.elements.label}),(0,n.jsx)("select",{className:"xl rounded bg-white text-black",id:e.elements.label+t,onChange:e=>{var t;_(e.target.value,d,!0),(0,b.d)({event:e.target.value?"filter_selected":"filter_clear",filter_name:null==(t=a.filter(t=>t.value===e.target.value)[0])?void 0:t.text})},value:null==i||null==(s=i[0][N][d])?void 0:s.value,children:a.map(e=>(0,n.jsx)("option",{value:e.value,children:e.text},"".concat(e.value).concat("string"==typeof e.text?e.text:"")))})]},e.system.id)}if("multiselect"===r){let t=o.elements[m].map(e=>{let t=null==i?void 0:i[0][N][d];if(t&&"checkboxOptions"in t&&t.checkboxOptions.length>0){let l=t.checkboxOptions.find(t=>e.name===t.value&&e.codename===t.codename);if(l)return l}return{value:"",codename:"",checked:!1}});return(0,n.jsx)(s6,{checkboxData:t,checkboxesClassName:"grid grid-rows-3 grid-flow-col gap-x-5 gap-y-3",identifier:d,title:e.elements.label,updateFilterValue:(e,t)=>{_(e,t)}},e.system.id)}},resetAllFilters:()=>{d.asPath.includes("?")&&d.replace(c+d.asPath.split("?")[0],void 0,{shallow:!0}),y(k(v)),w(k(j)),null==i||i[1]({...i[0],[N]:{...v,...j}})},setShowMobileFilters:x,showAdditionalFilters:f,showMobileFilters:p,toggleAdditionalFilters:()=>{g(!f)}};return(0,n.jsxs)("div",{className:C,children:[u?(0,n.jsx)("div",{className:"xl:overflow-auto",children:(0,n.jsx)(s5,{...L})}):null,!u&&(0,n.jsx)(s7,{className:f?"xl:block":"xl:hidden",...L}),(0,n.jsx)("hr",{className:"mx-auto mb-8 mt-4 max-w-screen-xl border-gray-200 px-3"})]})},filter_block:e=>{let{block:t,...l}=e,a=new aA.A(t.elements.filterBlockCards,{threshold:0,keys:["authorName","summary","topic"]}),{authors:r,regions:i,topics:o}=function(e){let t=new Set(e.map(e=>e.elements.topic));return{topics:t,regions:new Set(e.map(e=>e.elements.region)),authors:new Set(e.map(e=>e.elements.authorName))}}(t.elements.filterBlockCards),[c,m]=(0,s.useState)(t.elements.filterBlockCards),[u,h]=(0,s.useState)(""),[p,x]=(0,s.useState)(""),[f,g]=(0,s.useState)(""),[v,b]=(0,s.useState)("");function y(){let e=t.elements.filterBlockCards;v&&(e=a.search(v).map(e=>e.item)),u&&(e=c.filter(e=>u===e.elements.authorName)),p&&(e=c.filter(e=>p===e.elements.region)),f&&(e=c.filter(e=>f===e.elements.topic)),m(e)}return(0,n.jsxs)("div",{className:"".concat(d," container-wide"),children:[(0,n.jsxs)("div",{className:"flex flex-col",children:[(0,n.jsxs)("div",{className:"mx-8 flex flex-col bg-white md:flex-row lg:flex-row",children:[(0,n.jsx)(aF,{handleChange:e=>{h(e.target.value),y()},name:"Author",options:r,selectedOption:u}),(0,n.jsx)(aF,{handleChange:e=>{x(e.target.value),y()},name:"Region",options:i,selectedOption:p}),(0,n.jsx)(aF,{handleChange:e=>{g(e.target.value),y()},name:"Topic",options:o,selectedOption:f})]}),(0,n.jsxs)("div",{className:"my-4 flex flex-col items-center md:flex-row lg:flex-row",children:[(0,n.jsxs)("div",{className:"mx-10 flex h-full items-center",children:[(0,n.jsx)("input",{"data-clarity-mask":"true",onChange:function(e){b(e.target.value)},placeholder:"Search",value:v}),(0,n.jsx)(w,{as:"button",className:"ml-2",icon:P.v.Search,iconSize:"w-5 h-5",onClick:function(){y()},title:"search",variant:"primary",children:"Search"})]}),(0,n.jsx)("div",{children:(0,n.jsx)(H.$,{className:"mt-2 md:ml-2 lg:ml-2",icon:P.v.
1Load,onClick:function(){m(t.elements.filterBlockCards),b(""),h(""),x(""),g("")},children:"Reset"})})]})]}),(0,n.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4",children:c.map(e=>{var t,a;return(0,n.jsx)("div",{className:"m-10",children:(0,n.jsxs)(et,{className:"h-full",title:e.elements.topic,children:[(0,n.jsx)("p",{children:e.elements.summary}),(0,n.jsx)(ee,{alt:"",src:null!=(a=null==(t=e.elements.cardImage[0])?void 0:t.url)?a:""}),(0,n.jsx)(el,{children:(0,n.jsx)(n.Fragment,{children:e.elements.filterableCardButtons.map(e=>(0,n.jsx)(J,{block:e,className:"m-auto mr-6 mt-6",...l},e.system.id))})})]})},e.system.id)})})]})},filter_side_selector:e=>{var t,l,r,o,c,d,m;let{block:u}=e,{locale:h=""}=(0,a.useRouter)(),p=u.elements.links.map(e=>({...e.elements,url:$(e.elements.url,h)})),[x,g]=(0,s.useState)(!0),[v,b]=(0,s.useState)(null);function y(){return g(!x),null}(0,s.useEffect)(()=>{document.querySelectorAll(".sidefilters a").forEach(e=>{e.addEventListener("click",()=>{b(e.getAttribute("href"))})})}),(0,s.useEffect)(()=>{let e=0;document.querySelectorAll(".sidefilters a").forEach(t=>{let l=t.getAttribute("href"),n=null!==l?l.split("/").filter(e=>""!==e):[];n.every(e=>window.location.href.includes(e))&&""!==t.getAttribute("href")&&"/"!==t.getAttribute("href")&&n.length>e&&(e=n.length,b(t.getAttribute("href")))})},[]);let j=null!=(d=u.elements.maxLinks)?d:0,w=x&&p.length>j&&(null==(t=u.elements.hideLinks[0])?void 0:t.codename)==="yes",N=!x&&p.length>j&&(null==(l=u.elements.hideLinks[0])?void 0:l.codename)==="yes",_=w?p.slice(0,j):p;return(0,n.jsxs)("div",{className:"hidden md:block",children:[(0,n.jsxs)("div",{className:"align-center mb-4 flex",children:[(null==(r=u.elements.icon[0])?void 0:r.url)?(0,n.jsx)(f(),{alt:null!=(m=null==(o=u.elements.icon[0])?void 0:o.description)?m:"",className:"h-fit max-w-[30px] self-center",height:30,src:null==(c=u.elements.icon[0])?void 0:c.url,width:30}):null,(0,n.jsx)("h2",{className:"ml-1",children:u.elements.heading})]}),u.elements.subHeading?(0,n.jsx)("h3",{className:"pb-4",children:u.elements.subHeading}):null,(0,n.jsxs)("ul",{className:"sidefilters border-bottom-1 relative mb-4 list-none border-b border-gray-500 pb-4",children:[_.map(e=>(0,n.jsx)("li",{className:"mb-4 text-pet-green",children:(0,n.jsx)("a",{className:(0,i.$)("hover:underline",v===e.url&&"border-4 border-b-0 border-r-0 border-t-0 border-green-600 pl-2 font-bold text-black"),href:e.url,children:e.text})},u.elements.heading)),w?(0,n.jsx)("li",{className:"absolute bg-white pr-2",children:(0,n.jsx)("button",{className:"font-bold text-pet-green",onClick:y,type:"button",children:u.elements.showMore})}):null,N?(0,n.jsx)("li",{className:"absolute bg-white pr-2",children:(0,n.jsx)("button",{className:"font-bold text-pet-green",onClick:y,type:"button",children:u.elements.showLess})}):null]})]})},find_a_business:e=>{var t,l,r,i;let{block:c,page:d}=e,{query:m}=(0,a.useRouter)(),{colorId:u}=G({blockColor:c.elements.areaAccentColourCustom,blockColorLegacy:c.elements.areaAccentColour,pageConfig:d.elements.config[0],fallbackHexColor:"#ffffff"}),h=null!=(r=c.elements.radius)?r:50,p=[],x=null==(t=m.filter)?void 0:t.toString(),f=x?c.elements.tags.map(e=>({...e,preselected_filter:e.elements.displayName===x?{boolean:!0,choice:"yes"}:{boolean:!1,choice:"no"}})):c.elements.tags,g=null==(l=m.businessType)?void 0:l.toString(),v=(g?c.elements.businessType.map(e=>({...e,preselected_filter:e.elements.displayName===g?{boolean:!0,choice:"yes"}:{boolean:!1,choice:"no"}})):c.elements.businessType).map(e=>{var t,l;return{display_name:e.elements.displayName,preselected_filter:(null==(t=e.elements.preselectedFilter[0])?void 0:t.codename)==="yes",type_id:{choice:(null==(l=e.elements.typeId[0])?void 0:l.name)||""},icons:e.elements.icons}}),b=f.map(e=>{var t;return{preselected_filter:{boolean:(null==(t=e.elements.preselectedFilter[0])?void 0:t.codename)==="yes"},pal_id:e.elements.palId,display_name:e.elements.displayName}}),y=c.elements.businessType.map(e=>{var t,l,n;let a=null==(t=e.elements.typeId[0])?void 0:t.name;if(!a)return null;p.push(a);let s=a2.get(a);return s?{...e,elements:{...e.elements,typeId:[{codename:s,name:null!=(n=null==(l=e.elements.typeId[0])?void 0:l.name)?n:""}]}}:e}
1).filter(Boolean),[j,w]=(0,s.useState)({permission:"prompt",enableSearch:!1}),N=c.elements.enterLocationPrompt.value,_="granted"!==j.permission&&N?N&&"<p><br></p>"!==N?N:"<p>Please enter your location in the search box to see clinics near you</p>":"",[k,C]=(0,s.useState)({searchName:"",lat:0,lng:0}),[S,L]=(0,s.useState)({businessTypes:v,tags:b}),T=p.join(),I=c.elements.tags.filter(e=>e.elements.palId&&e.elements.palId.length>0).map(e=>e.elements.palId).join(),E=k.lat,A=k.lng;(0,s.useEffect)(()=>{(async()=>{try{let e=await navigator.permissions.query({name:"geolocation"});"granted"===e.state?navigator.geolocation.getCurrentPosition(e=>{let{latitude:t,longitude:l}=e.coords;C({searchName:"Current Location",lat:t,lng:l}),w({permission:"granted",enableSearch:!0})},e=>{(0,eF.vV)(Error("Error getting current position:",{cause:e})),w({permission:"denied",enableSearch:!1})},{timeout:1e4,enableHighAccuracy:!0}):"denied"===e.state&&w({permission:"denied",enableSearch:!1})}catch(e){(0,eF.vV)(Error("Error checking geolocation permission:",{cause:e}))}})()},[]),(0,s.useEffect)(()=>{(0,eF.$s)({name:"FIND_A_BUSINESS_CONFIGURED",properties:{title:c.elements.mapTitle,businessType:y,kontentCodename:c.system.codename,allowedCountries:c.elements.allowedCountries.map(e=>a4[e.codename])}})},[c.elements.allowedCountries,c.elements.mapTitle,c.system.codename,y]);let{data:F,error:B,isFetching:M}=(0,eB.useQuery)(["businessMap",{tagIdsString:I,typeIdsString:T,lat:E,lon:A,radius:h}],a1,{refetchOnWindowFocus:!1,cacheTime:9e5,enabled:j.enableSearch}),P=[];return(F&&F.length>0&&(P=(e=>{let t=(e=>{let t={};return e.forEach(e=>{let l=e.elements.typeId[0],n=e.elements.icons;if(l)if(n.length>0){let e=n[0],a=null==e?void 0:e.elements.icon[0];a&&(t[l.name]=a.url)}else t[l.name]=""}),t})(y);return e.filter(e=>{var t;return(null==(t=e.location)?void 0:t.latitude)&&e.location.longitude&&e.location.latitude>-90&&e.location.latitude<90&&e.location.longitude>-180&&e.location.longitude<180}).map(e=>{let{location:l,accountClassification:n,accountId:a,accountPhone:s,tags:r,websiteUrl:i,name:o}=e,c=l?(e=>{let t="";return t+(e.address?e.address:"")+(e.address?"\n":"")+(e.address2?e.address2:"")+(e.address2?"\n":"")+(e.city?e.city:"")+(e.city?"\n":"")+(e.postalCode?e.postalCode:"")+(e.postalCode?"\n":"")+(e.state?e.state:"")+(e.state?"\n":"")+(e.countryCode?e.countryCode:"")+(e.countryCode?"\n":"")})(l):"",d="";if(n){let e=t[n];e&&(d=e)}return{accountClassification:n,accountId:a,accountPhone:s,tags:r,lat:null==l?void 0:l.latitude,lng:null==l?void 0:l.longitude,address:c,websiteUrl:i,name:o,image:d}})})(F)),B)?((0,eF.vV)(Error("Error occurred in Find-a-business api, ".concat((0,eM.d)(B)?B.message:""))),(0,n.jsxs)("div",{"data-kontent-element-codename":"api_error",children:[(0,n.jsx)("h1",{children:c.elements.apiError}),";"]})):(0,n.jsxs)("div",{"data-kontent-element-codename":"find_a_business",children:[M?(0,n.jsx)("div",{className:"flex h-[800px] w-full animate-pulse items-center justify-center rounded bg-elanco-blue bg-opacity-20 p-5",children:(0,n.jsx)(eA,{theme:"blue"})}):null,(0,n.jsx)("div",{style:{display:M?"none":"block"},children:(0,n.jsx)(a0,{apiKey:o._.NEXT_PUBLIC_MAP_API_KEY,businessFilterTitle:c.elements.businessFilterTitle,businessTypes:v,countries:c.elements.allowedCountries.map(e=>a4[e.codename]),currentLocationText:c.elements.locationText,defaultEastBound:c.elements.eastBoundPoint||0,defaultNorthBound:c.elements.northBoundPoint||0,defaultSouthBound:c.elements.southBoundPoint||0,defaultWestBound:c.elements.westBoundPoint||0,description:c.elements.mapDescription,directionsText:c.elements.directionsText,enableSearch:j.enableSearch,enterLocationPrompt:_,filterButtonText:c.elements.filterButtonText,filterResetText:c.elements.filterResetText,filterState:S,handleFilterUpdate:e=>{L(e)},label:c.elements.label,locationState:j,markers:P,permission:j.permission,placeholderText:c.elements.placeholderText,radius:h,searchAreaAccentColour:(0,eT.UK)(null!=(i=(0,eT.f3)(null!=u?u:""))?i:"","#ffffff"),searchAreaOpacity:c.elements.areaOpacity,searchLocationLatLong:k,setLocationState:w,setSearchLocationLatLong:C,tags:b,tagsFilterTitle:c.elements.tagsFilterTitle,title:c.elements.mapTitle})})]})},find_your_rep:e=>{let{block:{elements:{reps:t}}}=e,l=t.map(e=>{var t,l;let{elements:n}=e;return{name:n.name,jobTitle:n.jobTitle,phoneNumber:n.phoneNumber,email:n.email,thumbnailUrl:null!=(l=null==(t=n.thumbnailUrl[0])?void 0:t.url)?l:void 0}});return(0,n.jsx)("div",{className:d,"data-kontent-element-codename":"reps",children:(0,n.jsx)(tF,{className:"m-2 mx-auto",desc:"Select a rep from the dropdown to display their details",reps:l,title:"Find Your Representative"})})},floating_component:e=>{var t,l,a,s;let{block:r,BlockMapper:o,page:c,...d}=e,u=r.elements.item[0],h=(null==(t=r.elements.position[0])?void 0:t.codename)==="right"?"md:flex-row-reverse":null,{bgClass:p,hexCode:x}=G({blockColor:r.elements.itemBgColorPicker,blockColorLegacy:r.elements.itemBgColor,pageConfig:c.elements.config[0]}
1),f=!x||"transparent"===x,g=p&&!f?p:"bg-transparent",v=p||!x||f?void 0:{backgroundColor:x},b=null!=(a=r.elements.mobileImage[0])?a:null,y=null!=(s=r.elements.image[0])?s:b,j={"--img-ar":(null==y?void 0:y.width)&&y.height?"".concat(y.width," / ").concat(y.height):void 0},w=m[null==(l=r.elements.snippetSpacingSpacing[0])?void 0:l.codename]||m.default;return(0,n.jsxs)("div",{className:(0,i.$)("relative flex w-full items-center justify-center p-3 md:justify-start md:p-10",(null==y?void 0:y.width)&&y.height&&"md:[aspect-ratio:var(--img-ar)]",h,w),style:j,children:[y?(0,n.jsx)(A.m,{className:"h-full w-full object-cover",desktopAsset:y,fallbackHeight:600,fallbackWidth:1920,mobileAsset:b,pictureClassName:"absolute inset-0 h-full w-full",quality:100,sizes:"100vw"}):null,u&&y?(0,n.jsx)("div",{className:(0,i.$)(g,"z-10 max-h-[100%] flex-shrink overflow-auto p-8 md:max-w-[70%] md:flex-none lg:max-w-[45%]"),style:v,children:(0,n.jsx)(o,{blocks:r.elements.item,page:c,...d})}):null]})},form_selector:aL,full_tabbed_block:e=>{var t,l,a;let{block:s,...r}=e,i=m[null!=(a=null==(l=s.elements.snippetSpacingSpacing)||null==(t=l[0])?void 0:t.codename)?a:"none"];return(0,n.jsx)("div",{className:i,children:(0,n.jsx)(tq,{"aria-label":"Footer tabs",name:"fullTabs",children:s.elements.tabs.map(e=>{var t;let{elements:{heading:l,body:a,pinned:s},system:{id:i}}=e;return(0,n.jsx)(tz,{"data-kontent-item-id":i,pinned:(null==(t=s[0])?void 0:t.codename)==="yes",title:l,children:(0,n.jsx)(c.rM,{className:"flex-g break-words","data-kontent-element-codename":"body",element:a,...r})},i)})})})},full_width_carousel:e=>{var t,l;let{block:a}=e,s=null!=(t=a.elements.mobileImage[0])?t:null,r=null!=(l=a.elements.images[0])?l:s;return(0,n.jsx)("div",{"data-kontent-element-codename":a.system.codename,children:(0,n.jsx)(eo,{children:(0,n.jsx)(A.m,{className:"max-h-screen w-full object-cover",desktopAsset:r,fetchPriority:"high",mobileAsset:s,quality:100,sizes:"100vw"})})})},governance_block:e=>{let{block:{elements:{title:t,description:l,featuresTitle:a,features:s,cardTitle:r,card:o}},...d}=e;return(0,n.jsxs)("div",{className:"md:flex",children:[(0,n.jsxs)("div",{className:(0,i.$)("pb-6, md:pb-0",o[0]?"md:w-1/2 lg:w-3/5":null,"md:border-r-2 md:pr-8"),children:[(0,n.jsxs)("div",{className:"content",children:[(0,n.jsx)("h3",{"data-kontent-element-codename":"title",children:t}),(0,n.jsx)(c.rM,{"data-kontent-element-codename":"content",element:l,...d})]}),(0,n.jsx)("h4",{className:"mb-2 mt-8 text-lg","data-kontent-element-codename":"features_title",children:a}),(0,n.jsx)(tU,{children:s.map(e=>{var t;let{title:l,description:a,image:s}=e.elements;return(0,n.jsx)(tO,{jobRole:a,name:l,showFullWidth:!0,showLargeIcon:!0,thumbnailUrl:(null==(t=s[0])?void 0:t.url)||""},e.system.id)})})]}),o[0]?(0,n.jsx)("div",{className:"lg:2/5 md:w-1/2 md:pl-8",children:(0,n.jsxs)("div",{className:"mx-auto pb-2 md:max-w-sm",children:[(0,n.jsx)("h4",{className:"mb-4 text-lg","data-kontent-element-codename":"card_title",children:r}),(0,n.jsx)(eK,{block:o[0],...d})]})}):null]})},header_block_carousel:e=>{var t;let l,{block:s,...r}=e,{locale:i}=(0,a.useRouter)(),o=(0,es.As)(),c=(null==(t=s.elements.autoScroll[0])?void 0:t.codename)==="yes";c&&(l=s.elements.autoScrollDuration&&s.elements.autoScrollDuration>0?1e3*s.elements.autoScrollDuration:3e3);let d=s.elements.headerBlockCarouselSlides.filter(e=>o.checkUserRoleForBlock(e)&&o.isBlockVisible(e));return 0===d.length?null:(0,n.jsx)(em,{autoScrollDuration:l,autoScrollEnabled:c,children:d.map((e,t)=>{var l,a;let s=(null==(l=e.elements.isContentOnTopOfImage[0])?void 0:l.codename)==="yes",o=e.elements.button[0],c=e.elements.mobileImage[0],d=null!=(a=e.elements.image[0])?a:c,m=null;return d&&(m=(0,n.jsx)(A.m,{className:"w-full object-cover",desktopAsset:d,fallbackHeight:552,fallbackWidth:1988,fetchPriority:0===t?"high":"auto",mobileAsset:c,priority:0===t,quality:65,sizes:"100vw"})),(0,n.jsx)(eu,{button:o?(0,n.jsx)(X,{block:o,className:s?"w-max lg:w-2/3":void 0,...r},o.system.id):null,heading:e.elements.heading,headingUrl:$(e.elements.headingUrl||"/",null!=i?i:""),image:m,isContentOnTopOfImage:s,subheading:e.elements.subheading,url:$(e.elements.imgUrl||"/",null!=i?i:"")},e.system.id)})})},header_block_with_copy:e=>{let{block:{elements:{heading:t,subheading:l,image:[a]}}}=e;return(0,n.jsxs)(tV,{noTheme:!0,children:[(0,n.jsx)("h1",{"data-kontent-element-codename":"heading",children:t}),(0,n.jsx)("p",{className:"pt-6","data-kontent-element-codename":"subheading",children:l}),a?(0,n.jsx)(t$,{alt:a.description,src:a.url}):null]})},heading_actions_wrapper:e=>{let{block:{elements:{ctaButton:t,heading:l}},...a}=e;return(0,n.jsx)("div",{className:"container-wide my-6",children:(0,n.jsxs)("div",{className:"flex items-center justify-between",children:[(0,n.jsx)("div",{children:(0,n.jsx)("h2",{className:"mb-2 text-2xl font-semibold text-midnight-blue",children:l})}),(0,n.jsx)("div",{className:"flex",children:t.map(e=>(0,n.jsx)("div",{className:"mx-2",children:(0,n.jsx)(nE,{block:e,...a})},e.system.id))})]})})},hero_section:e=>{var t,l;let{block:{elements:{imageLeftOrRight:a,image:s,mobileImage:r,subtitle:o,title:d}},...m}=e,u=(0,es.As)(),h=(null==(t=a[0])?void 0:t.codename)==="left",p=(0,n.jsx)(A.m,{className:"max-h-[285px] w-full object-contain md:max-h-[380px]",desktopAsset:null!=(l=s[0])?l:r[0],fallbackHeight:380,fallbackWidth:380,fetchPriority:"high",mobileAsset:r[0],priority:!0,qual
1ity:65,sizes:"(max-width: 768px) 100vw, 50vw"});return(0,n.jsxs)("div",{className:(0,i.$)("flex",h?"flex-col-reverse md:flex-row-reverse":"flex-col md:flex-row","container-wide relative z-[-1] py-4 md:py-0 lg:-mb-10 lg:-mt-16"),children:[(0,n.jsx)("div",{className:(0,i.$)("flex",h?"md:justify-end":null,"md:basis-1/2 md:items-center md:justify-center"),children:(0,n.jsxs)("div",{className:(0,i.$)("w-full py-4 md:max-w-md",h?"md:px-4":null),children:[d?(0,n.jsx)("h1",{className:"mb-2 text-4xl font-semibold text-midnight-blue",children:d.replaceAll(/{{petOwner}}/gi,u.userDetails.firstName)}):null,(0,n.jsx)(c.rM,{className:"text-lg text-charcoal lg:text-xl",element:o,...m})]})}),(0,n.jsx)("div",{className:(0,i.$)(h?"justify-end":null,"md:basis-1/2"),children:p})]})},history_timeline:e=>{let{block:{elements:{sections:t}}}=e;return(0,s.useEffect)(()=>{let e=document.querySelector(".InPageNav-module_InPageNavShowDropdown__1cJRe");e&&(e.style.display="none")},[]),(0,n.jsx)("div",{className:d,children:(0,n.jsx)(tG,{"data-kontent-element-codename":"history_timeline",children:t.map((e,t)=>{var l;return(0,n.jsx)(tW,{"data-kontent-element-codename":"history_timeline_section",id:"history-timeline-section-".concat(t),title:e.elements.heading,children:(0,n.jsxs)(tK,{circleText:e.elements.circleText,"data-kontent-element-codename":"history_timeline_item",hasLargeCircle:(null==(l=e.elements.hasLargeCircle[0])?void 0:l.codename)==="yes",children:[(0,n.jsx)("div",{className:"content content--no-width-restriction content--remove-bottom-margin"}),(0,n.jsx)("h2",{className:"mb-4","data-kontent-element-codename":"heading",children:e.elements.heading}),(0,n.jsx)("p",{"data-kontent-element-codename":"content",children:e.elements.content})]},e.system.id)},e.system.id)})})})},home_page_header_block:e=>{var t,l,a,r,i,o,d;let{block:m,...u}=e,h=ty(),p=m.elements.titleTag,x=null==p||null==(t=p[0])?void 0:t.codename,f=tX.includes(x)?x:"h1",g=null!=(a=null!=(l=m.elements.backgroundImages[0])?l:m.elements.mobileImage[0])?a:null,v=null!=(r=m.elements.mobileImage[0])?r:g,b=(0,s.useMemo)(()=>(0,n.jsx)(tQ.RK,{components:{block:{normal:t7,h1:t7,h2:t7,h3:t7,h4:t7,h5:t7,h6:t7},types:{image:()=>null,component:()=>null,table:()=>null},marks:{sub:c.qy,sup:c.w0,link:c.VZ,internalLink:c.di}},value:(0,tY.sU)((0,tY.uS)(m.elements.title.value))}),[m.elements.title.value]);return(0,n.jsx)("div",{children:(0,n.jsx)(t5,{backgroundColor:m.elements.backgroundColour,controls:1,id:"header",mobilePosterFrameImageUrl:null!=(i=null==v?void 0:v.url)?i:"",posterFrameAlignment:"top",posterFrameImageAltText:null!=(o=null==g?void 0:g.description)?o:"",posterFrameImageUrl:null!=(d=null==g?void 0:g.url)?d:"",priority:!0,videoId:"hide"==("0:"===h?"hide":"")?"":m.elements.videoId,children:(0,n.jsxs)(tJ,{title:b,titleTag:f,children:[(0,n.jsx)(c.rM,{className:"mb-4 mt-3",element:m.elements.text,removeEmptyLines:!0,...u}),m.elements.buttons[0]?(0,n.jsx)("div",{className:"mt-10",children:m.elements.buttons.map(e=>(0,n.jsx)(X,{block:e,className:"mr-6 mt-6",...u},e.system.id))}):null]},m.elements.videoId)})})},home_video_banner:e=>{var t,l;let{block:{elements:{backgroundColour:a,buttons:[s],displayText:r,headerTitle:i,posterUrl:[o],videoId:c}},...d}=e,m=ty();return(0,n.jsx)(t5,{backgroundColor:a,controls:1,id:"header",posterFrameAlignment:"top",posterFrameImageAltText:null!=(t=null==o?void 0:o.description)?t:"",posterFrameImageUrl:null!=(l=null==o?void 0:o.url)?l:"",priority:!0,videoId:"hide"==("0:"===m?"hide":"")?"":c,children:(0,n.jsxs)(tJ,{className:"bg-blue-900 text-white",title:i,children:[(0,n.jsx)("p",{className:"mb-4 mt-3","data-kontent-element-codename":"display_text",children:r}),s?(0,n.jsx)(X,{block:s,...d}):null]})})},icon:e=>{var t,l;let{block:a,page:s}=e,{hexCode:r}=G({blockColor:a.elements.brandColor,blockColorLegacy:a.elements.brand,pageConfig:s.elements.config[0],fallbackColorId:"primary"});return(0,n.jsx)("div",{className:"flex justify-center py-4",children:(0,n.jsx)(S,{borderHexColor:null!=r?r:void 0,size:(null==(t=a.elements.size[0])?void 0:t.codename)||"lg",children:(0,n.jsx)("div",{className:"relative h-full w-full",children:a.elements.icon[0]?(0,n.jsx)(f(),{alt:null!=(l=a.elements.icon[0].description)?l:"",fill:!0,loader:v.L,src:a.elements.icon[0].url}):null})})})},icon_list:tb,icon_with_text:e=>{var t,l,a;let{block:s,page:r,...i}=e,{hexCode:o}=G({blockColor:s.elements.brandColor,blockColorLegacy:s.elements.brand,pageConfig:r.elements.config[0],fallbackColorId:"primary"});return(0,n.jsxs)("div",{className:"flex items-start py-4",children:[(0,n.jsx)(S,{borderHexColor:null!=o?o:void 0,className:"flex-shrink-0",size:(null==(t=s.elements.iconSize[0])?void 0:t.codename)||"lg",children:(0,n.jsx)("div",{className:"relative h-full w-full",children:s.elements.icon[0]?(0,n.jsx)(f(),{alt:null!=(a=s.elements.icon[0].description)?a:"",f
1ill:!0,loader:v.L,src:s.elements.icon[0].url}):null})}),(0,n.jsxs)("div",{className:"ml-4",children:[s.elements.title?(0,n.jsx)("strong",{className:(null==(l=s.elements.boldTitle[0])?void 0:l.codename)==="bold"?"font-bold":"font-normal",children:s.elements.title}):null,(0,n.jsx)(c.rM,{element:s.elements.description,page:r,...i})]})]})},icon_with_text_and_cta:e=>{var t,l,a;let{block:s,page:r,...i}=e,{hexCode:o}=G({blockColor:s.elements.brandColor,blockColorLegacy:s.elements.brand,pageConfig:r.elements.config[0],fallbackColorId:"primary"});return(0,n.jsxs)("div",{className:"flex flex-col items-center py-4 text-center",children:[(0,n.jsx)(S,{borderHexColor:null!=o?o:void 0,size:(null==(t=s.elements.size[0])?void 0:t.codename)||"lg",children:(0,n.jsx)("div",{className:"relative h-full w-full",children:s.elements.icon[0]?(0,n.jsx)(f(),{alt:null!=(a=s.elements.icon[0].description)?a:"",fill:!0,loader:v.L,src:s.elements.icon[0].url}):null})}),s.elements.title?(0,n.jsx)("strong",{className:(null==(l=s.elements.boldTitle[0])?void 0:l.codename)==="bold"?"mt-4 block w-full text-center font-bold":"mt-4 block w-full text-center font-normal",children:s.elements.title}):null,(0,n.jsx)("div",{className:"w-full text-center",children:(0,n.jsx)(c.rM,{element:s.elements.content,page:r,...i})}),s.elements.buttons.length>0?(0,n.jsx)("div",{className:"mt-4 flex gap-2",children:s.elements.buttons.map(e=>(0,n.jsx)(X,{block:e,page:r,...i},e.system.id))}):null]})},image_gallery:e=>{var t,l;let{block:a}=e,s=u[null!=(l=null==(t=a.elements.snippetSpacingSpacing[0])?void 0:t.codename)?l:"none"],r=a.elements.images.filter((e,t)=>t<5);return(0,n.jsx)("div",{className:s,children:(0,n.jsx)(ll,{children:r.map(e=>{var t;return(0,n.jsx)(f(),{alt:null!=(t=e.description)?t:"",className:"thumbnail object-contain",height:e.height||80,loader:v.L,role:"presentation",src:e.url,width:e.width||140},e.url)})})})},image:eq.D,image_comparison:e=>{var t,l,a,r;let{block:{elements:{initialExposure:i,leftImage:o,rightImage:d,leftLegendText:u,rightLegendText:h,snippetSpacingSpacing:p,hideLabels:x},system:{codename:g}},...y}=e,j=null!=i?i:50,[w,N]=(0,s.useState)(j),[_,k]=(0,s.useState)(j),C=(0,s.useRef)(null),S=m[null==(t=p[0])?void 0:t.codename]||m.none,L=(null==(l=x[0])?void 0:l.codename)==="yes";return(0,n.jsxs)("div",{className:S,children:[(0,n.jsxs)("div",{className:"flex w-full justify-between",children:[L?null:(0,n.jsx)(c.rM,{className:"max-w-[30%] break-all bg-primary px-6 py-2 text-white *:*:!mb-0","data-kontent-element-codename":"left_legend_text",element:u,...y}),L?null:(0,n.jsx)(c.rM,{className:"max-w-[30%] break-all bg-primary px-6 py-2 text-right text-white *:*:!mb-0","data-kontent-element-codename":"right_legend_text",element:h,...y})]}),(0,n.jsxs)("div",{className:"relative overflow-hidden",children:[o[0]?(0,n.jsx)(f(),{alt:null!=(a=o[0].description)?a:"",className:"h-auto w-full","data-kontent-element-codename":"left_image",height:o[0].height||100,loader:v.L,src:o[0].url,width:o[0].width||100}):null,d[0]?(0,n.jsx)(f(),{alt:null!=(r=d[0].description)?r:"",className:"absolute top-0 h-full w-full","data-kontent-element-codename":"right_image",fill:!0,loader:v.L,src:d[0].url,style:{clipPath:"polygon(".concat(w,"% 0, 100% 0, 100% 100%, ").concat(w,"% 100%)")}}):null,(0,n.jsxs)("label",{className:"absolute bottom-0 left-0 right-0 top-0 flex items-stretch",children:[(0,n.jsx)("span",{className:"sr-only",children:"Adjust the visibility of two overlaid images. A value of 0 makes the first image completely shown and the second image fully hidden. A value of 100 makes the first image fully hidden and the second image fully shown. A value of 50 results in both images being equally visible at 50% opacity."}),(0,n.jsx)("input",{className:"image-comparison m-0 w-full cursor-col-resize appearance-none border-0 !bg-transparent p-0 hover:!bg-transparent active:!bg-transparent",max:100,min:0,onChange:e=>{let t=parseInt(e.target.value,10);if(N(t),Math.abs(t-_)>=5){let e=5*Math.ceil(t/5);(0,b.d)({event:"slider_percentage",percentage:e,slider_codename:g}),k(e)}},ref:C,step:.01,type:"range",value:w})]})]})]})},interactive_list:e=>{let{block:t,BlockMapper:l,...a}=e,r=t.elements.interactiveListItems.map(e=>{var t,s,r,i,o;if(e.elements.videoImage[0]&&((null==(t=e.elements.videoImage[0])?void 0:t.system.type)==="video_block"||(null==(s=e.elements.videoImage[0])?void 0:s.system.type)==="wistia")){let t;return{item_title:e.elements.itemTitle,videoComponent:(t=e.elements.videoImage[0],(0,n.jsx)("div",{children:(0,n.jsx)(l,{blocks:[t],className:"*:w-full",...a})}))}}let c=e.elements.videoImage[0];return{imageUrl:null==c||null==(r=c.elements.image[0])?void 0:r.url,altText:null==c||null==(i=c.elements.image[0])?void 0:i.description,height:334,width:600,item_title:e.elements.itemTitle,overLay:(null==(o=e.elements.imageOverlay[0])?void 0:o.codename)==="yes"}}
1),[i,o]=(0,s.useState)(null),[c,d]=(0,s.useState)(null),m=(0,s.useRef)(null),u=(0,s.useRef)(null);(0,s.useEffect)(()=>{m.current&&u.current&&(o(m.current),d(u.current))},[]);let h=r.length,{headingDescription:p,footerDescription:x,title:g}=t.elements;return(0,n.jsx)("div",{className:"pt-4 md:pb-8 md:pt-8 lg:pt-16",children:(0,n.jsx)("div",{className:"container-wide","data-kontent-element-codename":"interactive_list",children:(0,n.jsxs)("div",{className:"py-8",children:[g?(0,n.jsx)("h2",{children:g}):null,p?(0,n.jsx)("p",{children:p}):null,(0,n.jsxs)("div",{className:"my-6 md:flex",children:[(0,n.jsx)("div",{className:"md:w-1/2 md:pr-6",children:(0,n.jsx)("div",{className:"md:mr-2",children:(0,n.jsx)(er.default,{asNavFor:i||void 0,className:"mb-4 bg-gray-100 md:mb-[88px] ".concat(az().NavCarousel),ref:u,...{dots:!1,infinite:!0,speed:500,slidesToScroll:1,vertical:!0,autoHeight:!0},slidesToShow:h,swipeToSlide:!0,children:r.map((e,t)=>(0,n.jsx)("div",{children:(0,n.jsx)("button",{onClick:()=>{var e;null==(e=m.current)||e.slickGoTo(t)},type:"button",children:e.item_title})},e.item_title))})})}),(0,n.jsx)("div",{className:"relative md:w-1/2",children:(0,n.jsx)(er.default,{className:"".concat(az().MainSlider),...{dots:!0,infinite:!1,speed:500,slidesToShow:1,slidesToScroll:1,arrows:!0},asNavFor:c||void 0,ref:m,children:r.map(e=>{var t,l;return(0,n.jsxs)("div",{className:"relative",children:[e.videoComponent?e.videoComponent:(0,n.jsx)(f(),{alt:null!=(t=e.altText)?t:"",height:e.height,loader:v.L,src:null!=(l=e.imageUrl)?l:"",width:e.width}),!e.videoComponent&&e.overLay?(0,n.jsx)("div",{className:"absolute inset-x-0 bottom-0 mx-auto mb-2 w-11/12 rounded bg-black bg-opacity-[0.34] py-4 text-center text-white backdrop-blur-[21.6703px]",children:e.item_title}):null]},e.item_title)})})})]}),x?(0,n.jsx)("p",{children:x}):null]})})})},jotform:e=>{let{block:t,page:l}=e,[a,r]=(0,s.useState)(!1),o=(e=>{if(!e||!e.endsWith("px"))return"800px";let t=parseInt(e,10);return isNaN(t)||t<=0?"800px":"".concat(t,"px")})(t.elements.height),c=(0,V.K_)("elanco-dark-navy"),{hexCode:d}=G({blockColor:t.elements.loaderColor,pageConfig:l.elements.config[0],fallbackHexColor:c}),m=null!=d?d:c;return(0,n.jsxs)("div",{"data-clarity-mask":"true",children:[!a&&(0,n.jsx)("div",{className:"flex w-full justify-center py-6",children:(0,n.jsx)(la(),{color:m,height:40,loading:!0,margin:5,width:4})}),(0,n.jsx)("iframe",{allow:"geolocation; microphone; camera",allowFullScreen:!0,className:(0,i.$)(!a&&"hidden"),"data-testid":"jotform-iframe",frameBorder:"0",id:"JotFormIFrame-".concat(t.elements.jotformId),onLoad:()=>{r(!0)},src:"https://elancoah.jotform.com/".concat(t.elements.jotformId),style:{minWidth:"100%",maxHeight:"100%",height:o,border:"none",overflow:"scroll"},title:"JotForm IFrame ".concat(t.elements.jotformId)})]})},key_info_module_columns:e=>{let{block:t,page:l,...a}=e;return(0,n.jsxs)("div",{children:[t.elements.title?(0,n.jsx)("h2",{className:"text-center","data-kontent-element-codename":"title",children:t.elements.title}):null,(0,n.jsx)(lf,{className:"bg-white py-6 text-black lg:px-14 lg:py-12",children:t.elements.iconsWithText.map(e=>(0,n.jsx)(lg,{block:e,page:l,...a},e.system.id))})]})},key_info_module:e=>{var t,l,a,s,r;let{block:i,...o}=e,{title:d,image:m,description:u,medicationinfo:h,keyFeatures:p,additionalTabWeight:x,additionalTabsDosage:g}=i.elements,b=x.map(e=>{var t,l;let{title:a,image:s,lowWeight:r,highWeight:i}=e.elements;return(0,n.jsxs)(lv,{className:"md:pr-6",title:"Weight",children:[(0,n.jsx)("p",{children:a}),(0,n.jsx)("div",{className:"relative mb-2 flex aspect-square max-w-[112px] items-center md:ml-7 md:justify-around ",children:(0,n.jsx)(f(),{alt:"Weight icon",className:"mb-0 object-contain",fill:!0,loader:v.L,src:null!=(l=null==(t=s[0])?void 0:t.url)?l:""})}),(0,n.jsxs)("div",{className:"flex md:justify-around",children:[(0,n.jsx)("p",{className:"pr-4",children:r}),(0,n.jsx)("p",{className:"px-4",children:i})]})]},e.system.id)}),y=g.map(e=>{let{elements:t,system:l}=e,{title:a,keyInfoIcons:s}=t;return(0,n.jsxs)(lb,{className:"lg:border-l lg:pl-6",title:"Dosage",children:[(0,n.jsx)("p",{children:a}),(0,n.jsx)("div",{className:"mb-2 flex md:justify-around",children:s.map(e=>{let t=e.elements.image[0];return t?(0,n.jsx)(f(),{alt:t.description||"Dosage Icon",className:"mb-0 h-16 w-16",height:64,loader:v.L,src:t.url,width:64},"".concat(e.system.id,"-icon")):null})}),(0,n.jsx)("div",{className:"flex text-center md:justify-around",children:s.map(e=>(0,n.jsx)("p",{className:"mb-0 pr-4",children:e.elements.doseInfo},"".concat(e.system.id,"-text")))})]},l.id)}),j=b.concat(y).slice(0,2),w=(null!=(a=null==(t=o.page.elements.headerConfig[0])?void 0:t.elements.secondaryHeaderConfig)?a:[]).length>0,N=(null!=(s=null==(l=o.globalConfig.elements.headerConfig[0])?void 0:l.elements.secondaryHeaderConfig)?s:[]).length>0,_=null==h?void 0:h.split(/\s+/).filter(e=>""!==e);return(0,n.jsxs)(lw,{className:w||N?"mt-16 md:mt-0":"",expandFirst:!0,
1children:[m[0]?(0,n.jsx)(f(),{alt:null!=(r=m[0].description)?r:"",height:m[0].height||400,loader:v.L,src:m[0].url,width:m[0].width||400}):null,(0,n.jsx)("h1",{children:d}),(0,n.jsxs)("div",{children:[(0,n.jsx)("p",{className:"mr-0 md:mr-8",children:u}),(0,n.jsx)("p",{className:"flex flex-wrap",children:null==_?void 0:_.map((e,t)=>(0,n.jsx)("span",{className:"m-1 border-2 border-black p-1",children:e},"".concat(e,"-").concat(t)))})]}),(0,n.jsx)("section",{children:(0,n.jsx)(c.rM,{element:p,...o})}),j.length>0&&j[0],j.length>1&&j[1]]})},large_benefits_block:e=>{var t,l;let{block:a,page:s,...r}=e;return(0,n.jsx)("div",{className:(0,i.$)("container-wide text-blue-900",d),children:(0,n.jsx)(eC,{className:"px-2",col:Number(null!=(l=null==(t=a.elements.columns[0])?void 0:t.name)?l:2),children:a.elements.icons.map(e=>(0,n.jsx)(eS,{block:e,borderOption:a.elements.borderOption,page:s,...r},e.system.id))})})},link:lp,list_section:sK,lister_block_with_bullets:e=>{let{block:t,...l}=e;return(0,n.jsxs)(tr,{children:[(0,n.jsx)("h3",{children:t.elements.title}),(0,n.jsx)(c.rM,{className:"pt-6","data-kontent-element-codename":"description",element:t.elements.description,...l}),(0,n.jsx)(tl,{className:"max-w-md pt-4",children:t.elements.bullets.map(e=>{let{elements:t,system:l}=e;return(0,n.jsx)("li",{children:t.item},l.id)})}),(0,n.jsx)(c.rM,{className:"pb-6","data-kontent-element-codename":"second_description",element:t.elements.secondDescription,...l}),t.elements.button.map(e=>(0,n.jsx)(X,{block:e,...l},e.system.id)),t.elements.image[0]?(0,n.jsx)(f(),{alt:t.elements.image[0].description||"","data-kontent-element-codename":"image",height:t.elements.image[0].height||600,loader:v.L,src:t.elements.image[0].url,width:t.elements.image[0].width||400}):null]})},media_card:e=>{var t,l,a;let{block:s,page:r,...i}=e,o="0:"===ty()?"hide":"",{colorId:d}=G({blockColor:s.elements.brandColor,blockColorLegacy:s.elements.variant,pageConfig:r.elements.config[0],fallbackColorId:"primary"});return(0,n.jsxs)(lh,{className:"h-full w-84 flex-none text-black","data-kontent-element-codename":"media_card",hasPlayVideoButton:!0,title:(0,n.jsx)("span",{"data-kontent-element-codename":"title",children:s.elements.title}),videoId:"hide"===o?"":s.elements.videoid,videoPosterFrameUrl:"hide"===o?"":null==(t=s.elements.image[0])?void 0:t.url,videoType:null==(l=s.elements.videotype[0])?void 0:l.codename,children:["hide"===o&&(s.elements.cookieFallbackImage[0]?(0,n.jsx)(f(),{alt:null!=(a=s.elements.cookieFallbackImage[0].description)?a:"",className:"mb-4 h-48 w-full flex-shrink-0 object-contain",fill:!0,loader:v.L,src:s.elements.cookieFallbackImage[0].url}):(0,n.jsx)("div",{className:"order-first mb-4 h-[192px] w-full bg-blue-900"})),(0,n.jsx)(c.rM,{"data-kontent-element-codename":"text",element:s.elements.content,page:r,...i}),"hide"===o?"":(0,n.jsx)(H.$,{as:"button",className:"mt-auto w-full",variant:null!=d?d:"primary",children:s.elements.buttontext||"Play video"},s.system.id)]})},mikmak_button:e6,mikmak_in_page:lx,mikmak_wtb_widget:e=>{var t;let{block:l}=e,a=m[null==(t=l.elements.snippetSpacingSpacing[0])?void 0:t.codename]||m.default;return(0,eF.$s)({name:"WTB_WIDGET",properties:{wtbId:l.elements.wtbId,productIds:l.elements.productIds.map(e=>e.elements.dataEan.trim()).join(",")}}),(0,n.jsx)("div",{className:a,"data-kontent-element-codename":l.system.codename,"data-mm-ids":l.elements.productIds.map(e=>e.elements.dataEan.trim()).join(","),"data-mm-wtbid":l.elements.wtbId})},module_article_lister:e=>{var t,l,r,i,o,c,d,m,u,h,p,x,f,v;let{block:y,page:j,globalConfig:w}=e,N=(0,a.useRouter)(),_=(0,s.useContext)(sZ),k=(0,es.As)(),{page:C}=N.query,S=y.initialItems,[L,T]=(0,s.useState)(),I=function(e){var t,l;return"filterByTaxonomy"in e.elements?null==(l=e.elements.filterByTaxonomy[0])||null==(t=l.elements.species[0])?void 0:t.codename:void 0}(j),[E,A]=(0,s.useState)(rr(I,null!=(o=null==_||null==(t=_[0])?void 0:t.articlesFilterOptions)?o:{})),{buttonText:F}=y.elements,M=y.elements.nextButtonText||"Next",P=y.elements.prevButtonText||"Prev",D=null!=(c=y.elements.subsequentArticlesNumber)?c:6,R=null!=(d=y.elements.initialArt
1iclesNumber)?d:6,[q,z]=(0,s.useState)(R),[O,U]=(0,s.useState)(Number(C)||1);(0,s.useEffect)(()=>{var e,t;A(rr(I,null!=(t=null==_||null==(e=_[0])?void 0:e.articlesFilterOptions)?t:{})),z(R)},[_,R,I]),(0,s.useEffect)(()=>{U(Number(C)||1)},[C]);let $=(null==(l=y.elements.usePagination[0])?void 0:l.codename)==="yes",V=null!=(m=k.userDetails.userRoles)?m:[],{isLoading:Z,isFetching:G,fetchNextPage:W,data:K}=(0,eB.useInfiniteQuery)({queryKey:["moduleArticleLister",{codename:"config_article",locale:null!=(u=N.locale)?u:"",filters:JSON.stringify(E),orderBy:null!=(h=null==(r=y.elements.itemsOrderingOptions[0])?void 0:r.codename)?h:void 0,hideElementCodename:"hide_from_lister",skip:(Number(null!=(p=null==C?void 0:C.toString())?p:1)-1)*R,limit:q,roles:V.join(",")}],queryFn:e=>tu(e),staleTime:6e5,cacheTime:9e5,enabled:!w.elements.cdcKey||k.ready&&!k.authenticated||k.ready&&k.authenticated&&!!k.userDetails.id}),Y=(0,s.useMemo)(()=>null==K?void 0:K.pages.flatMap(e=>e.items),[K]),Q=(0,s.useMemo)(()=>{var e;return rl([...null!=(e=null!=Y?Y:S)?e:[]],L,N.locale)},[Y,N.locale,S,L]),X=null!=(f=null!=(x=null==K||null==(i=K.pages[0])?void 0:i.pagination.totalCount)?x:y.initialTotalCount)?f:0,J=O+1,el=!K&&0===Q.length,en=k.authenticated&&(!k.ready||!k.userDetails.id||G)&&!K&&(null!=(v=null==S?void 0:S.length)?v:0)>0,ea=G&&!!K&&Q.length>0,er=(!Z&&K||Q.length>0)&&!en,ei=y.elements.moduleArticleListerSorting[0],eo=!!ei,ec=!$&&!!F&&Q.length<X,ed=e=>(0,n.jsx)("div",{className:"mx-auto my-2 grid max-w-screen-xl grid-cols-1 gap-10 px-3 sm:grid-cols-2 sm:px-0 md:grid-cols-3",children:(0,n.jsx)(th,{amount:e})}),em=async e=>{!function(e){return"button"in e&&(0!==e.button||e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}(e)&&(e.preventDefault(),function(e){let t=new URL(window.location.href);t.searchParams.set("page",e.toString()),window.history.replaceState(null,"",t)}(J),U(J),z(q+D),await W(),(0,b.d)({event:"cta_click",cta_name:F,cta_category:"button"}))};return(0,n.jsxs)("div",{children:[el||en?ed(R):null,er?(0,n.jsxs)(n.Fragment,{children:[eo&&ei?(0,n.jsx)("div",{className:"mx-auto flex max-w-screen-xl flex-wrap justify-end",children:(0,n.jsx)(rt,{className:"w-full px-4 sm:w-auto",codename:ei.system.codename,dropDownData:rn(ei),id:ei.system.id||"sorting_article_listers",label:g(ei.elements.defaultSortingText.value||"","Sort By"),onChange:e=>{T(e.target.value)}})}):null,(0,n.jsx)("div",{className:"mx-auto flex max-w-screen-xl flex-wrap justify-center",children:Q.filter(k.checkUserRoleForBlock).map(e=>(0,n.jsx)("div",{className:"my-2 flex w-full flex-wrap justify-center sm:w-1/2 md:w-1/3",children:(0,n.jsx)(et,{href:e.elements.articleSlug,title:e.elements.articleSlug?(0,n.jsx)(B(),{href:e.elements.articleSlug,onClick:()=>{(0,b.d)({event:"card_click",element_text:e.elements.title,link_url:e.elements.articleSlug})},prefetch:!1,rel:"noreferrer",children:e.elements.title}):null,children:e.elements.thumbnailImage[0]?(0,n.jsx)(ee,{alt:e.elements.thumbnailImage[0].description,className:"h-44 object-cover",src:e.elements.thumbnailImage[0].url}):null})},e.system.id))})]}):null,ea?ed(D):null,$&&X>0?(0,n.jsx)(aO.d,{activeIndex:Number(C)||1,amountOfPages:Math.ceil(X/R),nextButtonText:(0,n.jsx)("span",{children:M}),onPageChange:e=>{var t;let l=new URLSearchParams(N.asPath.split("?")[1]||"");l.set("page",e.toString()),N.push({pathname:"".concat(null!=(t=N.locale)?t:"").concat(N.asPath.split("?")[0]),query:l.toString()})},pagesToShow:3,prevButtonText:(0,n.jsx)("span",{children:P}),showLastPage:!0}):ec?(0,n.jsx)("div",{className:"my-10 text-center","data-kontent-element-codename":"button_text",children:(0,n.jsx)(H.$,{href:"?page=".concat(J),onClick:em,type:"button",children:F})}):null]})},module_block:e=>{var t;let{block:l,...a}=e,s=l.elements.image[0];return(0,n.jsxs)(ez,{image:s?(0,n.jsx)(f(),{alt:"","data-kontent-element-codename":"image",height:510,loader:v.L,src:s.url,width:510}):null,reversed:(null==(t=l.elements.reversed[0])?void 0:t.codename)==="yes",children:[(0,n.jsx)("h3",{"data-kontent-element-codename":"title",children:l.elements.title}),(0,n.jsx)(c.rM,{className:"py-6","data-kontent-element-codename":"description",element:l.elements.description,...a}),l.elements.button.map(e=>(0,n.jsx)(X,{block:e,...a},e.system.id))]})},module_cdc_tab_block:e=>{var t,l;let{block:a,...r}
1=e,[o,c]=(0,s.useState)(0),d=m[null!=(l=null==(t=a.elements.snippetSpacingSpacing[0])?void 0:t.codename)?l:"default"];return(0,n.jsxs)("div",{className:(0,i.$)("".concat(d," container-wide")),children:[(0,n.jsx)("div",{className:"relative flex flex-row rounded-t-lg bg-gray-100",children:a.elements.tabbedComponents.map((e,t)=>{let l=0===t?"rounded-tl-lg":"",s=t+1===a.elements.tabbedComponents.length?"rounded-tr-lg":"";return(0,n.jsx)("div",{className:(0,i.$)("flex flex-1 ".concat(l," ").concat(s," ").concat(o===t?"bg-pet-green":"hover:bg-gray-200")),children:(0,n.jsx)("button",{className:(0,i.$)("flex w-full justify-start p-4 font-semibold ".concat(o===t?"text-white":"text-midnight-blue")),onClick:()=>{c(t)},type:"button",children:e.elements.tabTitle})},e.system.id)})}),(0,n.jsx)("div",{className:"mx-4 my-10 flex",children:a.elements.tabbedComponents.map((e,t)=>(0,n.jsx)("div",{className:o===t?"block":"hidden",children:(0,n.jsx)(aP,{block:e,...r})},e.system.id))})]})},module_coupon_lister:e=>{var t,l,s,r,o,c;let{BlockMapper:d,block:u,globalConfig:h,page:p}=e,{locale:x=""}=(0,a.useRouter)(),{data:f,isFetching:g,isLoading:v}=(0,eB.useQuery)({queryKey:["coupons",{codename:"coupon",locale:x}],queryFn:e=>tu(e)}),b=m[null!=(l=null==(t=u.elements.snippetSpacingSpacing[0])?void 0:t.codename)?l:"none"],y=u.elements.paginationString.replace(/{{X}}/,(null!=(r=null!=(s=null==f?void 0:f.items)?s:u.initialItems)?r:[]).length.toString()),j=null!=(c=null!=(o=null==f?void 0:f.items)?o:u.initialItems)?c:[],w=!f&&0===j.length,N=(!v&&f||j.length>0)&&j.length>0;return(0,n.jsx)("div",{className:(0,i.$)("mx-auto max-w-screen-xl",b),children:(0,n.jsxs)("div",{className:"flex flex-col items-center",children:[(0,n.jsx)("h3",{children:y}),w||g&&f?(0,n.jsx)("div",{className:"mt-20 w-full max-w-[764px] space-y-20 px-3 sm:w-3/4 sm:px-0",children:(0,n.jsx)(th,{amount:7})}):null,N?j.map(e=>(0,n.jsx)("div",{className:"my-2 flex w-full flex-wrap px-3 sm:w-3/4 sm:px-0",children:(0,n.jsx)(d,{blocks:[e],globalConfig:h,page:p})},e.system.id)):null]})})},module_dashboard_pet_cards:e=>{let{block:{elements:{createPetCtaCardParent:t,profilePetCardSnippetParent:l,viewMorePetsText:r}},globalConfig:i,...o}=e,[c,d]=(0,s.useState)(!1),{locale:m=""}=(0,a.useRouter)(),{isLoading:u,data:h=[],isError:p}=(0,eB.useQuery)({queryKey:["pets"],queryFn:()=>nj(m),staleTime:1/0,cacheTime:9e5}),{isLoading:x,data:f,isError:g}=(0,eB.useQuery)({queryKey:["reminders"],queryFn:()=>nk(m),staleTime:1/0,cacheTime:9e5});return u?(0,n.jsx)("div",{className:"container-wide md:min-h-[400px]",children:(0,n.jsx)("div",{className:"my-4 flex flex-col space-y-4 lg:flex-row lg:space-x-4 lg:space-y-0",children:[,,,].fill(1).map((e,t)=>(0,n.jsxs)("div",{className:"relative flex shrink animate-pulse flex-col rounded border border-light-grey bg-white p-8 md:basis-1/3",children:[(0,n.jsxs)("div",{className:"flex flex-row items-center gap-8",children:[(0,n.jsx)("div",{className:"mb-4 h-16 w-16 animate-pulse rounded-full bg-gray-200"}),(0,n.jsx)("div",{className:"mb-4 h-6 w-24 animate-pulse rounded bg-gray-200"})]}),(0,n.jsx)("div",{className:"mb-4 h-10 w-2/3 animate-pulse rounded bg-gray-200"}),(0,n.jsx)("div",{className:"h-14 w-full animate-pulse rounded bg-gray-200"}),(0,n.jsx)("span",{"aria-busy":"true","aria-live":"polite",className:"sr-only",role:"alert",children:"Loading..."})]},"loading-pet-card-".concat(t)))})}):p||g?(0,n.jsx)("div",{className:"container-wide",children:(0,n.jsx)(nC,{message:i.elements.petApiError,type:"error"})}):(0,n.jsx)("div",{className:"container-wide md:min-h-[400px]",children:h.length>0?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("div",{className:"grid grid-cols-1 gap-4 lg:grid-cols-3",children:(()=>{let e=[...h].map(e=>{var t;let a;return(0,n.jsx)(n.Fragment,{children:l[0]?(0,n.jsx)(nT,{block:l[0],globalConfig:i,isLoading:x,petData:e,remindersData:null!==(a=e.id,t=null==f?void 0:f.filter(e=>Array(e).find(e=>{var t;return(null==(t=e.pet)?void 0:t.id)===a})))&&void 0!==t?t:[],...o},e.id):null})});return c?e:e.slice(0,3)})()}),r?(0,n.jsx)("div",{className:"my-4 text-center",children:(0,n.jsx)(H.$,{className:c||h.length<=3?"hidden":"block",onClick:()=>{d(!0)},type:"button",variant:"pet_primary_green",children:r})}):null]}):(0,n.jsx)(n.Fragment,{children:t[0]?(0,n.jsx)(nI,{block:t[0],globalConfig:i,...o}):null})})},module_medication_reminder_modal:n0,module_my_reminders:e=>{let{block:t,globalConfig:l,...r}=e,{locale:i=""}=(0,a.useRouter)(),{title:o,calendarHeading:c,reminderHeading:d,editIcon:m,reminderForText:u,doseText:h,getRemindedHeading:p,getRemindedText:x,createReminderHeading:g,createReminderText:y,addAPetButton:j,addAReminderButton:w,petsDropdownText:N,viewAllRemindersLink:_,addReminderPetButtonIcon:k}=t.elements,{isLoading:C,data:L}=(0,eB.useQuery)({queryKey:["reminders"],queryFn:()=>nk(i),staleTime:1/0}),{isLoading:T,data:I}=(0,eB.useQuery)({queryKey:["pets"],queryFn:()=>nj(i),staleTime:1/0,cacheTime:9e5}
1),[E,A]=(0,s.useState)(""),[F,M]=(0,s.useState)({}),P=(0,a.useRouter)();return(0,s.useEffect)(()=>{if(!L)return;let e=L;E&&(e=L.filter(e=>{let{pet:t}=e;return(null==t?void 0:t.id)===E}));let t=nB(e),l=new Date,n=new Date(l.setDate(l.getDate()+30)),a=t.filter(e=>{var t;return(null==(t=e.recurringDates)?void 0:t[0])&&new Date(e.recurringDates[0])<n});a.sort((e,t)=>{var l,n,a,s,r,i;let o=null!=(r=null==(n=e.recurringDates)||null==(l=n[0])?void 0:l.split("/"))?r:[],c=null!=(i=null==(s=t.recurringDates)||null==(a=s[0])?void 0:a.split("/"))?i:[];return o[2]-c[2]||o[0]-c[0]||o[1]-c[1]}),M(a.reduce((e,t)=>{var l;if(!(null==(l=t.recurringDates)?void 0:l[0]))return e;let n=new Date(t.recurringDates[0]).toLocaleDateString("en-US",{year:"numeric",month:"long",day:"numeric"});return e[n]=[...e[n]||[],t],e},{}))},[L,E]),(0,n.jsxs)("div",{className:"container-wide my-8 flex flex-col","data-clarity-mask":"true",children:[(0,n.jsx)("h2",{className:"mb-2 text-2xl font-semibold text-midnight-blue",children:o}),(0,n.jsxs)("div",{className:"mb-3 flex flex-col md:flex-row md:justify-between",children:[(0,n.jsx)("div",{className:"my-2 flex flex-col justify-between gap-2",children:(0,n.jsxs)("div",{className:"relative md:w-[200px]",children:[(0,n.jsxs)("select",{className:"mb-0 w-full appearance-none rounded border border-pet-midnight !bg-white py-1 pl-4 pr-8 text-sm font-semibold text-pet-primary md:w-[200px]",disabled:T,name:"pets-dropdown",onChange:e=>{A(e.target.value)},value:E,children:[(0,n.jsx)("option",{value:"",children:N}),(null!=I?I:[]).map(e=>(0,n.jsx)("option",{value:e.id,children:e.name},e.id))]}),(0,n.jsx)("svg",{"aria-hidden":"true",className:"mr-[7px] mt-[5px] !fill-pet-midnight",focusable:"false",height:"20",viewBox:"0 0 20 20",width:"20",children:(0,n.jsx)("path",{d:"M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z"})})]})}),k.length>0?(0,n.jsx)("div",{className:"order-first mb-3 flex justify-start space-x-4 md:order-last md:items-end",children:k.map(e=>(0,n.jsx)(nE,{block:e,globalConfig:l,...r},e.system.id))}):null]}),(0,n.jsxs)("div",{className:"relative flex flex-col md:flex-row",children:[(0,n.jsx)(nD,{activePet:E,defaultDate:"storybook-custom-heading"===c?new Date("2024-09-09"):new Date,heading:c,reminders:null!=L?L:[]}),(0,n.jsxs)("div",{className:"flex-1 rounded rounded-t-none border border-t-0 border-pet-midnight bg-[#EBEBEB]/50 pl-8 pr-8 md:rounded-l-none md:rounded-tr md:border-l-0 md:border-t",children:[(0,n.jsx)("h4",{className:"pb-4 pt-4 text-left font-semibold text-pet-midnight",children:d}),C||T?(0,n.jsx)(n.Fragment,{children:[,,].fill(1).map((e,t)=>(0,n.jsxs)("div",{className:"mb-6 w-full animate-pulse rounded bg-white p-6",children:[(0,n.jsx)("div",{className:"mb-4 h-6 w-6/12 animate-pulse rounded bg-gray-200"}),(0,n.jsx)("div",{className:"mb-4 h-14 w-full animate-pulse rounded bg-gray-200"}),(0,n.jsx)("span",{"aria-busy":"true","aria-live":"polite",className:"sr-only",role:"alert",children:"Loading..."})]},"module-my-reminders-".concat(t)))}):(0,n.jsxs)("div",{className:"h-[420px] overflow-y-scroll",children:[Object.entries(F).map(e=>{let[t,a]=e;return(0,n.jsxs)("div",{className:"mb-6 flex flex-col rounded bg-white p-6",children:[(0,n.jsx)("span",{className:"font-semibold text-pet-midnight",children:t}),a.map(e=>{var t,a,s,r,o,c,d,p,x;return(0,n.jsxs)("div",{className:"mb-4 mt-2 flex flex-col odd:border-t odd:pt-4",children:[(0,n.jsxs)("div",{className:"flex",children:[(0,n.jsxs)("div",{className:"flex basis-10/12 flex-col md:basis-6/12",children:[(0,n.jsx)("span",{className:"text-md",children:u.replace("{{petName}}",null!=(d=null==(t=e.pet)?void 0:t.name)?d:"")}),(0,n.jsxs)("span",{className:"text-xs italic",children:[h.replace("{{petName}}",null!=(p=null==(a=e.pet)?void 0:a.name)?p:""),(0,n.jsxs)("span",{className:"font-semibold",children:[" ",null==(s=e.marketingBrand)?void 0:s.name]})]})]}),(0,n.jsxs)("div",{className:"flex basis-2/12 items-center justify-end gap-4 md:basis-6/12",children:[(0,n.jsx)(S,{className:"h-6 w-6",noBackgroun
1d:!0,noBorder:!0,children:(0,n.jsx)("button",{className:"flex justify-center",onClick:()=>{P.push({pathname:"/".concat(i).concat(P.asPath),query:{edit:!0,reminder:e.id}},void 0,{shallow:!0})},type:"button",children:(null==(r=m[0])?void 0:r.elements.icon[0])?(0,n.jsx)(f(),{alt:null!=(x=m[0].elements.icon[0].description)?x:"",className:"h-6 w-6",height:24,loader:v.L,src:m[0].elements.icon[0].url,width:24}):null})}),(0,n.jsx)("div",{className:"hidden md:block",children:(0,n.jsx)(nA,{className:"m-2 text-sm uppercase",globalConfig:l,id:null==(o=e.marketingBrand)?void 0:o.id})})]})]}),(0,n.jsx)("div",{className:"mt-4 block md:hidden",children:(0,n.jsx)(nA,{className:"text-sm uppercase",globalConfig:l,id:null==(c=e.marketingBrand)?void 0:c.id})})]},e.id)})]},t)}),0===Object.keys(F).length&&(null==I?void 0:I.length)===0&&(0,n.jsxs)("div",{className:"mb-6 flex flex-col rounded bg-white p-6 md:flex-row",children:[(0,n.jsxs)("div",{className:"flex basis-6/12 flex-col md:justify-center",children:[(0,n.jsx)("span",{className:"font-semibold text-pet-midnight",children:p}),(0,n.jsx)("span",{className:"text-xs",children:x})]}),j.length?(0,n.jsx)("div",{className:"flex basis-6/12 items-center gap-4 md:justify-end",children:j[0]?(0,n.jsx)(H.$,{className:"mt-4 text-sm uppercase md:m-2",href:$(j[0].elements.url,i),onClick:()=>{var e,t;(0,b.d)({event:"cta_click",cta_name:null==(e=j[0])?void 0:e.elements.text,cta_category:null==(t=j[0])?void 0:t.system.type})},type:"button",variant:"pet_primary_green",children:j[0].elements.text}):null}):null]}),0===Object.keys(F).length&&(null==I?void 0:I.length)!==0&&(0,n.jsxs)("div",{className:"mb-6 flex flex-col rounded bg-white p-6 md:flex-row",children:[(0,n.jsxs)("div",{className:"flex basis-6/12 flex-col md:justify-center",children:[(0,n.jsx)("span",{className:"font-semibold text-pet-midnight",children:g}),(0,n.jsx)("span",{className:"text-xs",children:y})]}),w.length?(0,n.jsx)("div",{className:"flex basis-6/12 items-center gap-4 md:justify-end",children:w[0]?(0,n.jsx)(H.$,{className:"mt-4 text-sm uppercase md:m-2",onClick:()=>{var e,t;(0,b.d)({event:"cta_click",cta_name:null==(e=w[0])?void 0:e.elements.text,cta_category:null==(t=w[0])?void 0:t.system.type}),P.push({pathname:$(P.asPath,i),query:{reminder:""}},void 0,{shallow:!0})},type:"button",variant:"pet_primary_green",children:w[0].elements.text}):null}):null]})]})]})]}),_.map(e=>{var t;return(0,n.jsxs)(B(),{className:"mt-2 text-sm uppercase text-green-600",href:$(e.elements.url,i),passHref:!0,rel:"noreferrer",target:(null==(t=e.elements.openInNewTab[0])?void 0:t.codename)==="yes"?"_blank":"_self",children:[e.elements.text,(0,n.jsx)("span",{className:"ml-1 text-xl",children:"›"})]},e.system.id)})]})},module_pet_profile_card:e=>{var t,l,r,i,o,c,d,m,u,h,p,x,g,b,y,j,w,N,_,k,C,S;let{block:{elements:{petSpecies:L,dateOfBirth:T,petWeight:I,petSex:E,petBreed:A,adoptionDay:F,petAcquisition:B,associatedReminders:M,selectedClinic:P,selectedShelter:D,editPetProfile:R,addReminder:q,yearText:z,yearsText:O,monthText:U,monthsText:$,deletePetButtonText:H,icon:V,addButtonIcon:Z,petIconForm:G,addPet:W,addPetIcon:K,petProfileHeading:Y,editReminderIcon:Q,reminderModalUrl:X,doseDay:J,noReminders:ee,noGotchaDayText:et,petDeleteModal:el,petForm:en}},globalConfig:ea,...es}=e,{defaultCatIcon:[er],defaultDogIcon:[ei]}=ea.elements,{locale:eo=""}=(0,a.useRouter)(),[ec,ed]=(0,s.useState)(!1),[em,eu]=(0,s.useState)(!1),[eh,ep]=(0,s.use
1State)(!1),[ex,ef]=(0,s.useState)(!1),eg=(0,a.useRouter)(),ev=null==(t=eg.query.id)?void 0:t.toString(),{data:eb,isLoading:ey,isError:ej}=(0,eB.useQuery)({queryKey:["petData",{id:ev}],queryFn:e=>nw(e,eo),staleTime:1/0,cacheTime:9e5}),{data:ew,isError:eN}=(0,eB.useQuery)({queryKey:["remindersData",{id:ev}],queryFn:()=>nk(eo),staleTime:1/0,cacheTime:9e5}),e_=null==eb||null==(l=eb.weight)?void 0:l.value,ek=(0,eB.useQueryClient)(),eC=e=>{var t,l;return{id:e.system.id,species:null==(t=e.elements.species[0])?void 0:t.codename,imageUrl:null==(l=e.elements.image[0])?void 0:l.url}},eS=ea.elements.petIcons.map(eC).filter(e=>{var t,l;return(null==(l=e.species)||null==(t=l[0])?void 0:t.toLowerCase())===(null==eb?void 0:eb.species.toLowerCase())}),eL=er&&ei?eC((null==eb?void 0:eb.species)==="dog"?ei:er):null,[eT,eI]=(0,s.useState)(eL);(0,s.useEffect)(()=>{if(!eb)return;let e=eS.find(e=>e.id===eb.imageReference);e&&eI(e)},[eb,eS]);let{mutate:eA,isLoading:eF}=(0,eB.useMutation)({mutationFn:e=>n1(e,eo),mutationKey:"petProfile/update",onSuccess:()=>ek.invalidateQueries(["petData",{id:ev}])}),eM=nS((null==ew?void 0:ew.filter(e=>Array(e).find(e=>{var t;return(null==(t=e.pet)?void 0:t.id)===ev})))||[]);return ej||eN?(0,n.jsx)("div",{className:"container-wide relative mt-8 flex flex-col sm:items-start",children:(0,n.jsxs)("div",{className:"ml-10 flex w-5/6 flex-col justify-between sm:ml-4 md:w-large-card-width",children:[(0,n.jsx)("h1",{className:"font-semibold",children:Y}),(0,n.jsx)("div",{className:"mt-8",children:(0,n.jsx)(nC,{message:ea.elements.petApiError,type:"error"})})]})}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("div",{className:"container-wide relative mt-8 flex flex-col sm:items-start","data-clarity-mask":"true",children:[(0,n.jsxs)("div",{className:"ml-10 flex w-5/6 items-center justify-between sm:ml-4 md:w-large-card-width",children:[(0,n.jsx)("h1",{className:"font-semibold",children:Y}),(0,n.jsxs)("div",{className:"mr-1 flex items-center sm:mr-4",children:[(0,n.jsx)("p",{className:"mr-2 text-xs text-charcoal",children:W}),(0,n.jsx)(f(),{alt:null!=(y=null==(o=K[0])||null==(i=o.elements.icon[0])||null==(r=i.elements.icon[0])?void 0:r.description)?y:"",className:"cursor-pointer",height:32,loader:v.L,onClick:()=>{var e,t;
1eg.push("/".concat(eo).concat(null==(t=K[0])||null==(e=t.elements.ctaButton[0])?void 0:e.elements.url))},src:null!=(j=null==(m=K[0])||null==(d=m.elements.icon[0])||null==(c=d.elements.icon[0])?void 0:c.url)?j:"",width:32})]})]}),(0,n.jsxs)("div",{className:"h-small-card-height sm:h-large-card-height relative mx-auto my-0 mb-20 mt-10 flex w-5/6 flex-col rounded border border-light-grey px-4 pb-5 pt-6 sm:mx-2 sm:pb-20 sm:pl-20 sm:pr-20 md:w-large-card-width",children:[ey?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("div",{className:"mb-6 h-48 w-48 animate-pulse rounded-full bg-gray-200"}),(0,n.jsx)("div",{className:"mb-6 h-14 w-full animate-pulse rounded bg-gray-200"}),(0,n.jsxs)("div",{className:"mb-6 flex flex-row gap-8 md:gap-24",children:[(0,n.jsx)("div",{className:"h-6 w-1/3 animate-pulse rounded bg-gray-200"}),(0,n.jsx)("div",{className:"h-6 w-1/3 animate-pulse rounded bg-gray-200"})]}),(0,n.jsxs)("div",{className:"mb-6 flex flex-row gap-8 md:gap-24",children:[(0,n.jsx)("div",{className:"h-6 w-1/3 animate-pulse rounded bg-gray-200"}),(0,n.jsx)("div",{className:"h-6 w-1/3 animate-pulse rounded bg-gray-200"})]}),(0,n.jsxs)("div",{className:"mb-6 flex flex-row gap-8 md:gap-24",children:[(0,n.jsx)("div",{className:"h-6 w-1/3 animate-pulse rounded bg-gray-200"}),(0,n.jsx)("div",{className:"h-6 w-1/3 animate-pulse rounded bg-gray-200"})]}),(0,n.jsx)("div",{className:"mb-6 h-6 w-3/4 animate-pulse rounded bg-gray-200"}),(0,n.jsx)("div",{className:"mb-6 h-6 w-3/4 animate-pulse rounded bg-gray-200"}),(0,n.jsx)("div",{className:"mb-6 h-14 w-full animate-pulse rounded bg-gray-200"}),(0,n.jsx)("div",{className:"mb-6 h-10 w-full animate-pulse rounded bg-gray-200"}),(0,n.jsx)("div",{className:"mb-6 h-10 w-full animate-pulse rounded bg-gray-200"}),(0,n.jsx)("div",{className:"m-auto mb-4 h-6 w-24 animate-pulse rounded bg-gray-200"})]}):null,!ey&&eb?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("div",{className:"flex flex-col items-center sm:items-start sm:justify-start",children:[(0,n.jsx)("div",{className:"mb-4 flex w-full items-center justify-center sm:justify-start",children:(0,n.jsxs)("div",{className:"ml-6 flex sm:ml-0",children:[(null==eT?void 0:eT.imageUrl)||(null==eL?void 0:eL.imageUrl)?(0,n.jsx)(f(),{alt:null!=(w=null==eL?void 0:eL.species)?w:"",className:"h-48 w-48 rounded-full border-4 border-pet-green",height:192,loader:v.L,src:null!=(N=null==eT?void 0:eT.imageUrl)?N:null==eL?void 0:eL.imageUrl,width:192}):null,(0,n.jsx)("div",{className:"ml-2 flex cursor-pointer items-center justify-center",children:(null==(u=V[0])?void 0:u.elements.icon[0])?(0,n.jsx)(f(),{alt:null!=(_=V[0].elements.icon[0].description)?_:"",height:32,loader:v.L,onClick:()=>{ep(!0)},src:V[0].elements.icon[0].url,width:32}):null})]})}),(0,n.jsxs)("div",{className:"line-medium relative flex w-full flex-col items-center sm:flex-row",children:[(0,n.jsxs)("div",{className:"flex flex-col leading-5 text-pet-primary sm:items-start",children:[(0,n.jsx)("h1",{className:"text-center text-2xl font-bold uppercase sm:text-start",children:eb.name}),(0,n.jsx)("h3",{className:"text-center text-sm font-normal sm:text-start",children:eb.birthDate?(e=>{let t=new Date(e),l=new Date,n=Math.ceil(Math.abs(t.valueOf()-l.valueOf())/864e5),a=Math.floor(n/365),s=Math.floor(n%365/30);return"".concat(a," ").concat(a&&1===a?z:O,", ").concat(s," ").concat(s&&1===s?U:$)})(eb.birthDate):null})]}),(0,n.jsx)("div",{className:"absolute -right-6 top-4 mr-7 sm:-right-3",children:(0,n.jsx)("div",{className:"cursor-pointer",children:(null==(h=V[0])?void 0:h.elements.icon[0])?(0,n.jsx)(f(),{alt:null!=(k=V[0].elements.icon[0].description)?k:"",height:32,loader:v.L,onClick:()=>{ed(!0)},src:V[0].elements.icon[0].url,width:32}):null})})]})]}),(0,n.jsx)("hr",{className:"border-1 border-midGrey mt-5"}),(0,n.jsxs)("div",{className:"leading-medium mt-4 flex w-full",children:[(0,n.jsxs)("div",{className:"w-1/2",children:[(0,n.jsx)("div",{className:"text-sm italic text-charcoal",children:(0,n.jsx)("p",{children:T})}),(0,n.jsx)("div",{className:"text-base text-pet-primary",children:(0,n.jsx)("p",{children:nY(eb.birthDate)})})]}),(0,n.jsxs)("div",{className:"w-1/2",children:[(0,n.jsx)("div",{className:"text-sm italic text-charcoal",children:(0,n.jsx)("p",{children:F})}),(0,n.jsx)("div",{className:"text-base text-pet-primary",children:(0,n.jsx)("p",{children:eb.adoptionDate?nY(eb.adoptionDate):et})})]})]}
1),(0,n.jsxs)("div",{className:"leading-medium mt-4 flex w-full",children:[(0,n.jsxs)("div",{className:"w-1/2",children:[(0,n.jsx)("div",{className:"text-sm italic text-charcoal",children:(0,n.jsx)("p",{children:L})}),(0,n.jsx)("div",{className:"text-base text-pet-primary",children:(0,n.jsx)("p",{className:"first-letter:capitalize",children:eb.species})})]}),(0,n.jsxs)("div",{className:"w-1/2",children:[(0,n.jsx)("div",{className:"text-sm italic text-charcoal",children:(0,n.jsx)("p",{children:E})}),(0,n.jsx)("div",{className:"text-base text-pet-primary",children:(0,n.jsx)("p",{className:"first-letter:capitalize",children:eb.gender})})]})]}),(0,n.jsxs)("div",{className:"leading-medium mt-4 flex w-full",children:[(0,n.jsxs)("div",{className:"w-1/2",children:[(0,n.jsx)("div",{className:"text-sm italic text-charcoal",children:(0,n.jsx)("p",{children:I})}),(0,n.jsx)("div",{className:"text-base text-pet-primary",children:(0,n.jsx)("p",{children:Number.isFinite(e_)?"".concat(e_," lbs"):""})})]}),(0,n.jsxs)("div",{className:"w-1/2",children:[(0,n.jsx)("div",{className:"text-sm italic text-charcoal",children:(0,n.jsx)("p",{children:A})}),(0,n.jsx)("div",{className:"text-base text-pet-primary",children:(0,n.jsx)("p",{children:eb.breed})})]})]}),(0,n.jsx)("div",{className:"leading-medium mt-4 flex w-full flex-col",children:(0,n.jsxs)("div",{className:"",children:[(0,n.jsx)("div",{className:"text-sm italic text-charcoal",children:(0,n.jsx)("p",{children:B})}),(0,n.jsx)("div",{className:"text-base text-pet-primary",children:(0,n.jsx)("p",{children:eb.acquisitionSource})})]})}),(0,n.jsxs)("div",{className:"leading-medium mt-4 flex w-full",children:[(0,n.jsxs)("div",{className:"w-1/2",children:[(0,n.jsx)("div",{className:"text-sm italic text-charcoal",children:(0,n.jsx)("p",{children:P})}),(0,n.jsx)("div",{className:"text-base text-pet-primary",children:(0,n.jsx)("p",{children:null==(p=eb.vetClinic)?void 0:p.name})})]}),(0,n.jsxs)("div",{className:"w-1/2",children:[(0,n.jsx)("div",{className:"text-sm italic text-charcoal",children:(0,n.jsx)("p",{children:D})}),(0,n.jsx)("div",{className:"text-base text-pet-primary",children:(0,n.jsx)("p",{children:null==(x=eb.acquisitionDetail)?void 0:x.name})})]})]}),(0,n.jsxs)("div",{className:"mt-8 flex w-full pb-2",children:[(0,n.jsx)("div",{className:"flex w-2/3 items-center justify-start text-sm font-bold leading-5 text-pet-primary",children:(0,n.jsxs)("p",{children:[eb.name,M]})}),(0,n.jsxs)("div",{className:"leading-medium mr-0 flex w-1/3 cursor-pointer items-center justify-end sm:mr-5",children:[(0,n.jsx)("p",{className:"mr-2 text-xs text-charcoal",children:q}),(null==(b=Z[0])||null==(g=b.elements.icon[0])?void 0:g.elements.icon[0])?(0,n.jsx)(f(),{alt:null!=(C=Z[0].elements.icon[0].elements.icon[0].description)?C:"",height:32,loader:v.L,onClick:()=>{eg.push({pathname:"/".concat(eo).concat(X),query:{id:ev,reminder:ev}},void 0,{shallow:!0})},src:Z[0].elements.icon[0].elements.icon[0].url,width:32}):null]})]}),(0,n.jsx)("hr",{className:"border-1 border-midGrey mt-4"}),(0,n.jsx)("div",{className:"w-full items-center py-4",children:eM.length>0?eM.map(e=>{var t,l,a,r;return(0,n.jsxs)(s.Fragment,{children:[(0,n.jsxs)("div",{className:"flex w-full justify-between",children:[(0,n.jsx)("div",{className:"flex flex-col",children:(0,n.jsxs)("div",{className:"",children:[(0,n.jsx)("div",{children:(0,n.jsx)("p",{children:null==(t=e.marketingBrand)?void 0:t.name})}),(0,n.jsxs)("div",{className:"flex w-full flex-row items-center",children:[(0,n.jsx)("p",{className:"text-sm italic",children:J}),(0,n.jsx)("span",{className:"ml-1 text-sm text-[#333]",children:null==(l=e.recurringDates)?void 0:l[0]})]})]})}),(0,n.jsx)("div",{className:"mr-0 flex w-20 cursor-pointer items-center justify-end sm:mr-6",children:(null==(a=Q[0])?void 0:a.elements.icon[0])?(0,n.jsx)(f(),{alt:null!=(r=Q[0].elements.icon[0].description)?r:"",height:32,loader:v.L,onClick:()=>{eg.push({pathname:"/".concat(eo).concat(X),query:{id:ev,edit:!0,reminder:e.id}},void 0,{shallow:!0}),window.scrollTo(0,0)},src:Q[0].elements.icon[0].url,width:32}):null})]}),(0,n.jsx)("hr",{className:"border-1 border-midGrey my-2"})]},e.id)}):(0,n.jsx)("div",{className:"flex items-center",children:(0,n.jsx)("p",{children:ee})})}),(0,n.jsx)("div",{className:"mt-4 flex justify-center",children:(0,n.jsx)("a",{className:"cursor-pointer text-green-600 underline",onClick:()=>{eu(!0),window.scrollTo(0,0)},type:"button",children:H})}),em&&el[0]?(0,n.jsx)(s4,{block:el[0],globalConfig:ea,hideModal:()=>{eu(!1)},petData:eb,showModal:em,...es}):null]}):null]})]}),ec&&eb?(0,n.jsx)(eE,{onClose:()=>{ed(!1)},size:"lg",title:R,children:en[0]?(0,n.jsx)(n8,{block:en[0],data:eb,globalConfig:ea,hideHeading:!0,isEdit:!0,onSubmit:()=>{ed(!1)},...es}):null}):null,(eh||eF)&&G[0]?(0,n.jsx)(eE,{onClose:()=>{ep(!1)},size:"lg",children:eT||eL?(0,n.jsx)(n9,{block:G[0],error:ex?(0,n.jsx)(nC,{message:ea.elements.petApiError,type:"error"}):null,icon:null!=eT?eT:eL,icons:eS,isEdit:!0,isLoading:eF,onSubmit:e=>{if(ef(!1),eb)try{eA(((e,t,l)=>{var n,a,s,r,i,o;return{id:e,petName:l.name,petSex:l.gender,breed:l.breed,petSpecies:l.species,petDateOfBirth:l.birthDate,petWeight:Number(null!=(r=null==(n=l.weight)?void 0:n.value)?r:0),petAcquisitionDate:l.adoptionDate,petAcquisitionType:l.acquisitionSource,petShelter:null!=(i=null==(a=l.acquisitionDetail)?void 0:a.name)?i:"",vetClinic:null!=(o=null==(s=l.vetClinic)?void 0:s.name)?o:"",imageReference:t}})(eb.id,e,eb)),ep(!1)}catch(e){ef(!0)}},petName:null!=(S=null==eb?void 0:eb.name)?S:""}):null}):null]})},module_table_layout:e=>{let{block:t,globalConfig:l}=e,{locale:s="",asPath:r,...i}=(0,a.useRouter)(),{isLoading:o,data:c}=(0,eB.useQuery)({queryKey:["reminders"],queryFn:()=>nk(s),staleTime:1/0,cacheTime:9e5});if(o)return(0,n.jsx)("div",{className:"text-center",children:(0,n.jsx)(eA,{theme:"green"})});let d={1:t.elements.frequencyDailyText,30:t.elements.frequencyMonthlyText,60:t.elements.frequencyBimonthlyText,240:t.elements.frequency8MonthsText},m=nS(c||[]).sort((e,t)=>
1{var l,n,a,s;return null!=(s=null==(n=e.pet)?void 0:n.name.localeCompare(null!=(a=null==(l=t.pet)?void 0:l.name)?a:""))?s:0});return(0,n.jsxs)("div",{className:"container-wide",children:[t.elements.heading?(0,n.jsx)("h2",{className:"mb-2 text-2xl font-semibold text-midnight-blue",children:t.elements.heading}):null,(0,n.jsxs)("table",{className:"block w-full md:table",children:[(0,n.jsx)("thead",{children:(0,n.jsx)("tr",{className:"absolute left-[-9999px] top-[-9999px] block border-light-grey md:static md:left-auto md:top-auto md:table-row md:border-b",children:t.elements.columnHeadings.map(e=>(0,n.jsx)("th",{className:"border-0 px-4 py-3 text-left italic first-of-type:pl-0",children:e.elements.content},e.system.id))})}),(0,n.jsx)("tbody",{className:"block border-t-2 border-light-grey md:table-row-group md:border-0",children:m.length>0?(0,n.jsx)(n.Fragment,{children:m.map(e=>{var a,o,c,m,u,h,p,x,g,b,y,j;return(0,n.jsxs)("tr",{className:"relative block border-b border-light-grey !bg-white px-4 py-2 md:table-row",children:[(0,n.jsxs)("td",{className:"grid border-r-0 px-4 py-2 text-left first-letter:uppercase md:table-cell md:pl-0",children:[(0,n.jsx)("span",{className:"font-bold italic text-midnight-blue  md:hidden",children:null==(a=t.elements.columnHeadings[0])?void 0:a.elements.content}),(0,n.jsx)("span",{className:"text-[#333]",children:null==(o=e.pet)?void 0:o.name})]}),(0,n.jsxs)("td",{className:"grid border-r-0 px-4 py-2 text-left md:table-cell",children:[(0,n.jsx)("span",{className:"font-bold italic text-midnight-blue  md:hidden",children:null==(c=t.elements.columnHeadings[1])?void 0:c.elements.content}),(0,n.jsx)("span",{className:"text-[#333]",children:null==(m=e.marketingBrand)?void 0:m.name})]}),(0,n.jsxs)("td",{className:"grid border-r-0 px-4 py-2 text-left md:table-cell",children:[(0,n.jsx)("span",{className:"font-bold italic text-midnight-blue  md:hidden",children:null==(u=t.elements.columnHeadings[2])?void 0:u.elements.content}),(0,n.jsx)("span",{className:"text-[#333]",children:d[null!=(j=null==(h=e.marketingBrand)?void 0:h.dosingFrequency)?j:-1]})]}),(0,n.jsxs)("td",{className:"grid border-r-0 px-4 py-2 text-left md:table-cell",children:[(0,n.jsx)("span",{className:"font-bold italic text-midnight-blue  md:hidden",children:null==(p=t.elements.columnHeadings[3])?void 0:p.elements.content}),(0,n.jsx)("span",{className:"text-[#333]",children:null==(x=e.recurringDates)?void 0:x[0]})]}),(0,n.jsx)("td",{className:"absolute right-0 top-0 border-r-0 p-4 md:static md:table-cell",children:(0,n.jsx)("button",{className:"flex items-center justify-end space-x-2",type:"button",children:t.elements.editIcon[0]?(0,n.jsx)(S,{className:"h-6 w-6",noBackground:!0,noBorder:!0,children:(0,n.jsx)(f(),{alt:(null==(g=t.elements.editIcon[0].elements.icon[0])?void 0:g.description)||"",className:"h-6 w-6 object-contain",height:24,loader:v.L,onClick:()=>{i.push({pathname:r,query:{edit:!0,reminder:e.id}},void 0,{locale:s,shallow:!0}),window.scrollTo(0,0)},src:(null==(b=t.elements.editIcon[0].elements.icon[0])?void 0:b.url)||"",width:24})}):null})}),(0,n.jsx)("td",{className:"inline-flex border-r-0 px-4 py-2 md:table-cell",children:(0,n.jsx)(nA,{className:"text-sm uppercase",globalConfig:l,id:null==(y=e.marketingBrand)?void 0:y.id})})]},e.id)})}):(0,n.jsx)("tr",{className:"block bg-white px-4 py-2 md:table-row",children:(0,n.jsx)("td",{className:"py-10 text-center",colSpan:4,children:t.elements.noRemindersText})})})]})]})},ms_forms:e=>{var t;let{block:l}=e;return(0,n.jsx)("div",{className:"container-narrow flex justify-center py-2","data-kontent-element-id":l.system.id,children:(0,n.jsx)("iframe",{allowFullScreen:!0,frameBorder:"0",height:"".concat(null!=(t=l.elements.formHeight)?t:800,"px"),marginHeight:0,marginWidth:0,src:"https://forms.office.com/Pages/ResponsePage.aspx?id=".concat(l.elements.formId),style:{border:"none",maxWidth:"100%",maxHeight:"100vh"},title:"Data collection for this campaign",width:"100%"})})},nadis_widget:()=>(0,n.jsx)("div",{className:"-mb-24 mt-6 flex justify-around md:mt-8",children:(0,n.jsx)("iframe",{height:"650",src:"https://alerts.nadis.org.uk/alertservice?iframe=dontbreakout",title:"NADIS Widget",width:"630"})}),office_location:e=>{var t;let{block:l}=e,{marker:a,title:s,description:r,showCountryFilter:i}=l.elements,c={title:s,description:r,markers:a.map((e,t)=>{var l,n;let a={key:t+1,lat:null!=(l=e.elements.lat)?l:0,lng:null!=(n=e.elements.lng)?n:0,country:e.elements.country,title:e.elements.title,de
1scription:e.elements.description,marker_description:e.elements.markerDescription.value};return e.elements.primaryContactNumber&&(a.primaryContactNumber=e.elements.primaryContactNumber),e.elements.secondaryContactNumber&&(a.secondaryContactNumber=e.elements.secondaryContactNumber),e.elements.emailAddress&&(a.emailAddress=e.elements.emailAddress),e.elements.ctaTitle&&(a.ctaTitle=e.elements.ctaTitle),e.elements.button.length&&e.elements.button.forEach((e,t)=>{var l;a[0===t?"primaryCta":"secondaryCta"]={url:e.elements.url,text:e.elements.text,isExternal:(null==(l=e.elements.openLinkInNewTab[0])?void 0:l.codename)==="yes"}}),a}),showCountryFilter:(null==(t=i[0])?void 0:t.codename)==="yes",apiKey:o._.NEXT_PUBLIC_MAP_API_KEY};return(0,n.jsx)(lT,{...c})},outgrow_widget:e=>{let{block:t}=e,l=t.elements.outgrowId||"",a=(0,tN.w)();return l?(0,n.jsxs)("div",{"data-kontent-element-codename":"outgrow_id",children:[(0,n.jsx)("div",{className:"op-interactive","data-title":"Outgrow Interactive Content","data-url":"https://elanco588.outgrow.us/".concat(l),"data-width":"100%",id:l}),"ALL_COOKIES"===a||"ADVERTISE_COOKIES"===a?(0,n.jsx)(rm(),{dangerouslySetInnerHTML:{__html:"\n						var og_temp=document.createElement('script');\n						og_temp.async=true;\n						og_temp.defer=true;\n						og_temp.src='//dyv6f9ner1ir9.cloudfront.net/assets/js/nloader.js';\n						og_temp.onload=function(){\n							var origHref = window.location.href;\n							var cleanUrl = window.location.origin + window.location.pathname + window.location.hash;\n							try {\n								window.history.replaceState(null, '', cleanUrl);\n								initIframe('".concat(l,"');\n							} finally {\n								window.history.replaceState(null, '', origHref);\n							}\n						};\n						document.querySelector('head').appendChild(og_temp);\n					")},id:"outgrow-loader-".concat(l),strategy:"afterInteractive"}):null]}):null},parasite_selector_cta_carousel:e=>{var t;let{block:l}=e,r=(0,a.useRouter)(),[o,c]=(0,s.useState)(0),d=(0,s.useRef)(null),u=(null==(t=l.elements.snippetSpacingSpacing[0])?void 0:t.codename)?m[l.elements.snippetSpacingSpacing[0].codename]:m.none;return(0,s.useEffect)(()=>{var e;let t=l.elements.carouselCtas.findIndex(e=>e.elements.link===r.asPath);c(t),null==(e=d.current)||e.slickGoTo(t)},[l.elements.carouselCtas,r.asPath]),(0,n.jsxs)("div",{className:"container-wide pb-16 ".concat(u),children:[l.elements.title?(0,n.jsx)("h3",{className:"mb-8 text-center text-xl font-normal text-black",children:l.elements.title}):null,l.elements.carouselCtas.length>0&&(0,n.jsx)(eo,{hasHrBelow:!0,ref:d,stylesClass:"verticalyCenteredArrowsBlack",children:l.elements.carouselCtas.map((e,t)=>{var l,a,s;return(0,n.jsx)("div",{children:(0,n.jsxs)(B(),{className:"group flex flex-col items-center",href:$(e.elements.link,null!=(a=r.locale)?a:""),passHref:!0,children:[(0,n.jsx)(aR.A,{className:(0,i.$)(o===t?"text-pet-green":"text-elanco-beige group-hover:text-pet-green","mb-2 h-14 w-14"),preProcessor:e=>
1e.replace(/fill=".*?"/g,'fill="currentColor"').replace(/stroke=".*?"/g,'stroke="currentColor"'),src:null!=(s=null==(l=e.elements.icon[0])?void 0:l.url)?s:""}),(0,n.jsx)("p",{className:"truncate text-center text-sm font-bold text-black",children:e.elements.title})]})},e.system.id)})})]})},parasite_tracker_module:e=>{let{block:{elements:{parasiteTrackerMap:[t],parasiteTrackerSidePanel:[l]}},...a}=e,[r,i]=(0,s.useState)(!1),[o,c]=(0,s.useState)(!1),[d,m]=(0,s.useState)(""),[u,h]=(0,s.useState)("the selected area");return t&&l?(0,n.jsxs)("div",{className:"flex flex-col md:flex-row",children:[(0,n.jsx)("div",{className:"w-full md:w-2/3 md:flex-1",children:(0,n.jsx)(aj,{block:t,error:r,setError:i,setLocationName:h,setReportedCases:m,setShowSummaryText:c,theme:l.elements.themeHexcode||"#2772ce",...a})}),(0,n.jsx)("div",{className:"w-full md:w-1/3",children:(0,n.jsx)(aE,{block:{...l},locationName:u,radius:t.elements.radius,reportedCases:d,setLocationName:h,setReportedCases:m,setShowSummaryText:c,showSummaryText:o,...a})})]}):(0,n.jsx)(n.Fragment,{})},pdp_header_accordion:rp,pdp_header_block:rS,pdp_popup_with_rich_text:rx,pdp_popup_rebates:re,pdp_slider:rk,pear_commerce_widget:ro,pear_commerce_store_locator:()=>(0,n.jsx)("div",{"data-kontent-element-codename":"pear_commerce_store_locator_guidelines",id:"pear-map-target"}),pet_creation_wizard:e=>{var t,l,r,o;let c,d,{block:m,globalConfig:u,page:h,BlockMapper:p}=e,x=(0,eB.useQueryClient)(),{locale:g=""}=(0,a.useRouter)(),{isLoading:y,mutate:j}=(0,eB.useMutation)({mutationFn:e=>n1(e,g),mutationKey:"petProfile/update",onSuccess:()=>x.invalidateQueries({queryKey:["pets"]})}),[w,N]=(0,s.useState)(),[_,k]=(0,s.useState)(),[C,S]=(0,s.useState)(!1),L=e=>{var t,l;return{id:e.system.id,species:null==(t=e.elements.species[0])?void 0:t.codename,imageUrl:null==(l=e.elements.image[0])?void 0:l.url}},T=u.elements.petIcons.map(L).filter(e=>{var t;return(null==(t=e.species)?void 0:t.toLowerCase())===(null==w?void 0:w.petSpecies.toLowerCase())}),I=L((null==w?void 0:w.petSpecies)==="dog"&&u.elements.defaultDogIcon[0]&&u.elements.defaultCatIcon[0]?u.elements.defaultDogIcon[0]:u.elements.defaultCatIcon[0]),[E,A]=(0,s.useState)(1);switch(E){case 3:c=m.elements.titlePetReminderForm,d=m.elements.descriptionPetReminderForm;break;case 2:c=m.elements.titlePetIconForm,d=m.elements.descriptionPetIconForm;break;default:c=m.elements.titlePetProfileForm,d=m.elements.descriptionPetProfileForm}let F=m.elements.petProfileForm[0];return(0,n.jsxs)("div",{children:[(0,n.jsxs)("div",{className:"container-wide relative flex flex-col md:h-[450px] md:flex-row md:justify-between",children:[(0,n.jsx)("div",{className:"absolute -left-44 top-8 z-0 hidden h-[270px] w-[270px] rounded-full bg-[#CFEAC640] md:block"}),(0,n.jsxs)("div",{className:"relative z-20 mt-6 flex flex-col md:mt-20 md:max-w-xs lg:max-w-lg",children:[(0,n.jsx)("h1",{className:"mb-5 text-4xl font-semibold",children:c}),(0,n.jsx)("h2",{className:"text-sm font-normal",children:d})]}),m.elements.backgroundImage[0]?(0,n.jsxs)("div",{className:"flex justify-center md:absolute md:right-0",children:[(0,n.jsx)("div",{className:"absolute -right-4 top-16 z-[-1] hidden h-[140px] w-[140px] rounded-full bg-[#258821AA]/[0.4] md:block"}),(0,n.jsx)("div",{className:"block max-w-[180px] md:max-w-[450px]",children:(0,n.jsx)(f(),{alt:null!=(r=m.elements.backgroundImage[0].description)?r:"",className:"relative",height:(null==(t=m.elements.backgroundImage[0])?void 0:t.height)||450,loader:v.L,priority:!0,src:m.elements.backgroundImage[0].url,width:(null==(l=m.elements.backgroundImage[0])?void 0:l.width)||450})}),(0,n.jsx)("div",{className:"absolute -left-16 bottom-0 z-[-1] hidden h-[270px] w-[270px] rounded-full bg-[#CFEAC640] md:block"})]}):null]}),(0,n.jsx)("section",{className:"container-wide relative z-auto mb-10 md:-mt-44",children:(0,n.jsxs)("div",{className:"relative my-6 mt-2 max-w-xl rounded border border-light-grey bg-white p-8",children:[(0,n.jsxs)("div",{className:"relative mb-6 flex justify-center gap-8",children:[(0,n.jsx)("div",{className:"absolute top-[11px] h-[2px] w-[130px] bg-pet-green"}),[...Array.from([,,,].keys())].map(e=>{let t=e+1;return(0,n.jsx)("span",{className:(0,i.$)("relative h-6 w-6 rounded-full border-2 text-center text-sm font-semibold text-white",t<=E?"border-pet-green bg-pet-green":"border-pet-green bg-white"),children:t},e)})]}),(0,n.jsx)("div",{className:1===E?"block":"hidden",children:F?(0,n.jsx)(n8,{BlockMapper:p,block:F,data:_,globalConfig:u,onSubmit:(e,t)=>
1{(0,b.d)({event:"pet_profile",step_completed:E,step_name:F.elements.heading}),N(e),k(t),A(2),window.scrollTo(0,0)},page:h}):null}),(0,n.jsx)("div",{className:2===E?"block":"hidden",children:m.elements.petIconForm[0]?(0,n.jsx)(n9,{BlockMapper:p,block:m.elements.petIconForm[0],error:C?(0,n.jsx)(nC,{message:u.elements.genericApiError,type:"error"}):null,globalConfig:u,icon:I,icons:T,isEdit:!1,isLoading:y,onBack:()=>{A(1)},onSubmit:e=>{(e=>{if(S(!1),w)try{var t;j({...w,id:null==_?void 0:_.id,imageReference:e}),(0,b.d)({event:"pet_profile",step_completed:E,step_name:null==(t=m.elements.petIconForm[0])?void 0:t.elements.title}),A(3),window.scrollTo(0,0)}catch(e){S(!0)}})(e)},page:h,petName:null!=(o=null==w?void 0:w.petName)?o:""}):null}),(0,n.jsx)("div",{className:3===E?"block":"hidden",children:m.elements.petReminderForm[0]?(0,n.jsx)(n0,{BlockMapper:p,block:m.elements.petReminderForm[0],globalConfig:u,page:h,redirectUrl:m.elements.successUrl,selectedPet:_}):null})]})})]})},pet_name_form:e=>{let{block:t,...l}=e,r=(0,a.useRouter)(),{toggleTrait:i,reset:o,activeTraitGroups:c,selectedTraitsByGroup:d,isButtonDisabled:m}=function(e){let t={};e.forEach(e=>{var l;t[e.elements.displayTitle]=null,null==(l=e.elements.traitBlocks[0])||l.elements.nestedTraitGroups.forEach(e=>{t[e.elements.displayTitle]=null})});let[l,n]=(0,s.useState)(t),a=e[0],r=[...e],i=null==a?void 0:a.elements.traitBlocks.find(e=>{var t;return(null==(t=l[a.elements.displayTitle])?void 0:t.elements.displayName)===e.elements.displayName});if(i)r.push(...i.elements.nestedTraitGroups);else{let e=null==a?void 0:a.elements.traitBlocks[0];e&&r.push(...e.elements.nestedTraitGroups)}let o=!Object.keys(l).some(e=>null!==l[e]);return{activeTraitGroups:r,selectedTraitsByGroup:l,toggleTrait:(e,t)=>{var a;(null==(a=l[t])?void 0:a.elements.displayName)===e.elements.displayName?n(e=>({...e,[t]:null})):n(l=>({...l,[t]:e}))},reset:function(){var e;n(t),null==(e=document.getElementById("PetNameForm"))||e.scrollIntoView({behavior:"smooth",block:"start"})},isButtonDisabled:o}}(t.elements.traitGroups),{isLoading:u,otherNames:h,topNames:x,searchNames:f,shuffle:g,resetResults:v,error:b}=function(e,t,l){let{locale:n=""}=(0,a.useRouter)(),[r,i]=(0,s.useState)([]),[o,c]=(0,s.useState)([]),[d,m]=(0,s.useState)([]),[u,h]=(0,s.useState)(!1),[p,x]=(0,s.useState)(null),f=(0,s.useCallback)(()=>{let e=document.getElementById("PetNameForm");if(e){let t=e.getBoundingClientRect().top+window.pageYOffset-100;window.scrollTo({top:t,behavior:"smooth"})}},[]);return{searchNames:async function l(){h(!0),x(null);try{if(!n)throw Error("Locale is required");let l={};if(Object.keys(e).filter(t=>!!e[t]).forEach(t=>{var a;l[function(e,t){switch(e){case"at":case"de":if("ich habe einen/eine..."===t)return"species";if("mein tier ist..."===t)return"gender";if("...und ist k\xf6rperlich..."===t)return"appearance";if("die pers\xf6nlichkeit meines tieres w\xfcrde ich beschreiben als..."===t)return"personality";return t;case"fr":if("j'ai un..."===t)return"species";if("m\xe2le ou femelle?"===t)return"gender";if("et il est physiquement..."===t)return"appearance";if("qui a pour personnalit\xe9 d’\xeatre..."===t)return"personality";return t;case"es":if("tengo un.."===t)return"species";if("es..."===t)return"gender";if("y f\xedsicamente es..."===t)return"appearance";if("su personalidad es"===t)return"personality";return t;case"it":if("io ho un..."===t)return"species";if("genere"===t)return"gender";if("aspetto"===t)return"appearance";if("personalit\xe0"===t)return"personality";return t;case"ro":if("am un/o..."===t)return"species";if("blănosul meu este..."===t)return"gender";if("...și este din punct de vedere fizic..."===t)return"appearance";if("aș descrie personalitatea lui, ca fiind..."===t)return"personality";return t;default:return t}}(n,t.toLocaleLowerCase().trim().replace(/\s+/g," "))]=null==(a=e[t])?void 0:a.elements.displayName}),0===Object.keys(l).length)throw Error("At least one trait must be selected");let a=(await lB({data:l,locale:n})).flatMap(e=>"string"==typeof e?[e]:"names"in e&&Array.isArray(e.names)?e.names:[]);if(0===a.length)return void t();let s=lE(a).slice(0,25);c(s.slice(5)),m(s.slice(0,5)),i(s.sort()),f()}catch(e){x(e instanceof Error?e.message:"Failed to search names")}finally{h(!1)}},shuffle:function(){if(0===o.length&&d.length>0)m([]),c([]);else if(0===o.length){let e=lE(r);m(e.slice(0,5)),c(e.slice(5))}else m(o.slice(0,5)),c(e=>e.slice(5));f()},topNames:d,otherNames:r,resetResults:function(){m([]),c([]),i([]),x(null)},isLoading:u,error:p}}(d,()=>{let e=t.elements.viewAllLink[0];if(!e)return;let l=e.elements.url;l&&r.push(l)}),y=!u&&(x.length>0||h.length>0)?(0,n.jsx)(lq,{block:t,otherNames:h,resetResults:v,selectedTraitsByGroup:d,shuffle:g,topNames:x,...l}):(0,n.jsx)(lO,{activeTraitGroups:c,block:t,isButtonDisabled:m,reset:o,searchNames:f,selectedTraitsByGroup:d,toggleTrait:i,...l});return(0,n.jsxs)("div",{className:"container-narrow mx-auto mb-10 flex scroll-mt-[100px] flex-col items-center justify-center md:w-2/3",id:"PetNameForm",children:[t.elements.loadingModalContent[0]&&u?(0,n.jsx)(p,{block:t.elements.loadingModalContent[0],className:"fixed left-[50%] top-[50%] z-[1] ml-[-250px] mt-[-200px] flex h-[400px] w-[500px] flex-col justify-between rounded-[54px] bg-white p-12 shadow-[0px_3px_6px_#00000029]",...l}):null,b?(0,n.jsx)("div",{className:"bg-red-50 mb-4 rounded-md p-4",children:(0,n.jsxs)("div",{className:"flex",children:[(0,n.jsx)("div",{className:"flex-shrink-0",children:(0,n.jsx)("svg",{className:"text-red-400 h-5 w-5",fill:"currentColor",viewBox:"0 0 20 20",children:(0,n.jsx)("path",{clipRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z",fillRule:"evenodd"})})}),(0,n.jsx)("div",{className:"ml-3",children:(0,n.jsx)("p",{className:"text-red-700 text-sm",children:b})})]})}):null,y]})},pet_view_all_names:e=>{let{block:t,...l}=e,{names:r,filterPetNames:i,filterBySpecie:o,loadMoreNames:c,loading:d,loadMore:m,showLoadMoreText:u,selected:h,displayAllNames:p}=function(){let{locale:e=""}=(0,a.useRouter)(),t=(0,s.useRef)(null),l=(0,s.useRef)(0),[n,r]=(0,s.use
1State)([]),[i,o]=(0,s.useState)(!1),[c,d]=(0,s.useState)(!1),[m,u]=(0,s.useState)(!0),[h,p]=(0,s.useState)(),[x,f]=(0,s.useState)(["A","B","C","D"]),g=(0,s.useCallback)(async()=>{if(t.current===e){l.current+=1,o(!1);return}let n=++l.current;o(!0),t.current=null,r([]);try{let a=await lM({locale:e});if(n!==l.current)return;t.current=e,r(a)}catch(e){if(n!==l.current)return;t.current=null,r([])}finally{n===l.current&&o(!1)}},[e]);async function v(a){if(n.length>0&&t.current===e){l.current+=1,o(!1);return}let s=++l.current;o(!0);try{let n=await lM({type:a,locale:e});if(s!==l.current)return;t.current=e,r(n)}catch(e){if(s!==l.current)return;t.current=null,r([])}finally{s===l.current&&o(!1)}}return(0,s.useEffect)(()=>{g()},[g]),{filterPetNames:(e,t)=>{d(!1),u(!0);let l=["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"],n=l.indexOf(e),a=l.indexOf(t);f(l.slice(n,a+1))},filterBySpecie:e=>{p(e),v(e)},loadMoreNames:e=>{p(e),g()},loading:i,loadMore:c,showLoadMoreText:m,selected:null!=h?h:"",names:n.filter(e=>x.includes(e.charAt(0).toUpperCase())),displayAllNames:()=>{d(!0),u(!1)}}}();return(0,n.jsxs)("div",{className:"mt-8","data-kontent-element-codename":"pet_view_all_names",children:[(0,n.jsxs)("div",{className:"mx-6 flex justify-center gap-4",children:[t.elements.bothTrait[0]?(0,n.jsx)(lR,{block:t.elements.bothTrait[0],isActive:!h||h===t.elements.bothTrait[0].elements.displayName,onClick:e=>{c(e.elements.displayName)},unselected:!1,...l}):null,t.elements.dogTrait[0]?(0,n.jsx)(lR,{block:t.elements.dogTrait[0],isActive:h===t.elements.dogTrait[0].elements.displayName,onClick:e=>{o(e.elements.displayName)},unselected:!1,...l}):null,t.elements.catTrait[0]?(0,n.jsx)(lR,{block:t.elements.catTrait[0],isActive:h===t.elements.catTrait[0].elements.displayName,onClick:e=>{o(e.elements.displayName)},unselected:!1,...l}):null]}),(0,n.jsxs)("div",{className:"mb-4 mt-4",children:[(0,n.jsx)("hr",{}),(0,n.jsxs)("div",{className:"flex justify-center pb-2 pt-2 font-bold",children:[(0,n.jsx)("button",{className:"mr-6 cursor-pointer",onClick:()=>{i("A","D")},type:"button",children:(0,n.jsx)("h4",{children:"A-D"})}),(0,n.jsx)("button",{className:"mr-6 cursor-pointer",onClick:()=>{i("E","H")},type:"button",children:(0,n.jsx)("h4",{children:"E-H"})}),(0,n.jsx)("button",{className:"mr-6 cursor-pointer",onClick:()=>{i("I","L")},type:"button",children:(0,n.jsx)("h4",{children:"I-L"})}),(0,n.jsx)("button",{className:"mr-6 cursor-pointer",onClick:()=>{i("M","P")},type:"button",children:(0,n.jsx)("h4",{children:"M-P"})}),(0,n.jsx)("button",{className:"mr-6 cursor-pointer",onClick:()=>{i("Q","T")},type:"button",children:(0,n.jsx)("h4",{children:"Q-T"})}),(0,n.jsx)("button",{className:"mr-6 cursor-pointer",onClick:()=>{i("U","Z")},type:"button",children:(0,n.jsx)("h4",{children:"U-Z"})})]}),(0,n.jsx)("hr",{})]}),d?(0,n.jsx)("div",{className:"flex w-full justify-center py-6",children:(0,n.jsx)(l$(),{color:(0,V.K_)("elanco-dark-navy"),height:15,loading:!0,margin:2,radius:2,width:5})}):null,(0,n.jsxs)("div",{children:[!d&&(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("div",{className:"container-narrow mx-auto my-10",children:(0,n.jsx)(lP,{loadMore:m,moreThanFortyNames:r.length>40,petResultsList:r})}),(0,n.jsx)("div",{className:"mt-8",children:r.length>40&&u?(0,n.jsx)("div",{className:"flex cursor-pointer justify-center",children:(0,n.jsx)("button",{className:"font-bold text-pet-green",onClick:()=>{p()},type:"button",children:t.elements.loadMoreText})}):null})]}),(0,n.jsx)("div",{className:"mb-10 mt-10 flex justify-center",children:t.elements.petNameGenerator[0]?(0,n.jsx)(H.$,{className:"font-bold text-white",href:t.elements.petNameGenerator[0].elements.url,variant:"pet_primary_green",children:t.elements.petNameGenerator[0].elements.text}):null})]})]})},playable_widget:e=>{var t,l;let{block:a}=e,s=["allow_same_origin","allow_scripts",...a.elements.parameters.map(e=>{let{codename:t}=e;return t})].join(" ").replaceAll("_","-"),r=ty();return(0,n.jsx)("div",{className:"flex justify-around ".concat(m.default),children:"1:"===r||"0:"===r?(0,n.jsx)(tj,{}):(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("script",{src:"https://files.cdn.leadfamly.com/campaign/sdk/utilities.responsive_iframe.min.js"}),(0,n.jsx)("iframe",{allow:"autoplay; fullscreen",className:"w-full border-none","data-no-scroll-into-view":!0,sandbox:s,scrolling:null==(t=a.elements.scrolling[0])?void 0:t.codename,src:"".concat((null==(l=a.elements.urlDomain[0])?void 0:l.name)||"https://elanco.leadfamly.com","/").concat(a.elements.urlAlias,"?onlyflow=1&iframe=dontbreakout"),style:{height:"500px"},title:"Playable Widget"})]})})},product_directory_card:e=>{let{block:t,...l}=e;return(0,n.jsx)("div",{"data-kontent-element-codename":t.system.codename,children:(0,n.jsxs)(et,{className:"relative m-8",title:(0,n.jsx)("span",{"data-kontent-element-codename":"title",children:t.elements.title}),children:[t.elements.image[0]?(0,n.jsx)(ee,{alt:t.elements.image[0].description,src:t.elements.image[0].url}):null,(0,n.jsx)(lI,{name:t.system.codename,children:t.elements.tabs.map(e=>(0,n.jsx)(tz,{hideCloseBtn:!0,tabPaddingClasses:"p-4",title:e.elements.tabTitle,children:(0,n.jsxs)("div",{"data-kontent-item-id":e.system.id,children:[(0,n.jsx)(c.rM,{element:e.elements.content,...l}),e.elements.buttonLink?(0,n.jsx)(B(),{href:e.elements.buttonLink,legacyBehavior:!0,passHref:!0,children:(0,n.jsx)(H.$,{className:"w-full","data-kontent-element-codename":"button_text",children:e.elements.buttonText})}):null]})},e.system.codename))}),(0,n.jsxs)("div",{className:"mt-6 flex items-center justify-between",children:[(0,n.jsx)(H.$,{className:"mr-2 flex-shrink-0 text-sm",href:t.elements.whereToBuyUrl,children:"Where to Buy"}),(0,n.jsx)(D,{className:"ml-2 text-center",href:t.elements.productLabelUrl,children:(0,n.jsx)("span",{children:"Product Label"})})]})]})})},product_directory_lister:e=>
1{var t,l,r,i,o,c,d,m,u,h,p,x,f,v,y,j,w;let{block:N,page:_,globalConfig:k,...C}=e,S=(0,a.useRouter)(),L=(0,s.useContext)(sZ),T=(0,es.As)(),{page:I}=S.query,E=N.initialItems,[A,F]=(0,s.useState)(),{buttonText:B}=N.elements,M="nextButtonText"in N.elements&&N.elements.nextButtonText?N.elements.nextButtonText:"Next",P="prevButtonText"in N.elements&&N.elements.prevButtonText?N.elements.prevButtonText:"Prev",D=null!=(m=N.elements.subsequentItemsNumber)?m:6,R=null!=(u=N.elements.initialItemsNumber)?u:6,[q,z]=(0,s.useState)(R),O=(0,s.useMemo)(()=>"filterByTaxonomy"in _.elements?_.elements.filterByTaxonomy.flatMap(e=>e.elements.species.map(e=>e.codename)):[],[_.elements]),[U,$]=(0,s.useState)(ra(O,null!=(h=null==L||null==(t=L[0])?void 0:t.productsFilterOptions)?h:{}));(0,s.useEffect)(()=>{var e,t;$(ra(O,null!=(t=null==L||null==(e=L[0])?void 0:e.productsFilterOptions)?t:{})),z(R)},[L,R,O]);let V=(null==(l=N.elements.usePagination[0])?void 0:l.codename)==="yes",Z=null!=(p=T.userDetails.userRoles)?p:[],{isLoading:G,isFetching:W,fetchNextPage:K,data:Y}=(0,eB.useInfiniteQuery)({queryKey:["productDirectoryLister",{codename:"enhanced_product_directory_card",locale:null!=(x=S.locale)?x:"",filters:JSON.stringify(U),orderBy:null!=(f=null==(r=N.elements.itemsOrderingOptions[0])?void 0:r.codename)?f:void 0,hideElementCodename:"hide_from_lister",skip:(Number(null!=(v=null==I?void 0:I.toString())?v:1)-1)*R,limit:q,roles:Z.join(",")}],queryFn:e=>tu(e),staleTime:6e5,cacheTime:9e5,enabled:!k.elements.cdcKey||T.ready&&!T.authenticated||T.ready&&T.authenticated&&!!T.userDetails.id}),Q=(0,s.useMemo)(()=>null==Y?void 0:Y.pages.flatMap(e=>e.items),[Y]),X=(0,s.useMemo)(()=>{var e;
1return rl([...null!=(e=null!=Q?Q:E)?e:[]],A,S.locale)},[Q,S.locale,E,A]),J=null!=(y=null==Y||null==(i=Y.pages[0])?void 0:i.pagination.totalCount)?y:N.initialTotalCount,ee=null!=(j=null!=J?J:null==E?void 0:E.length)?j:0,et=(Number(I)||1)+1,el=void 0===J&&X.length>=R?et:Math.ceil(ee/R),en=!Y&&0===X.length,ea=T.authenticated&&(!T.ready||!T.userDetails.id||W)&&!Y&&(null!=(w=null==E?void 0:E.length)?w:0)>0,er=W&&!!Y&&X.length>0,ei=(!G&&Y||X.length>0)&&!ea;return(0,n.jsxs)("div",{children:[en||ea?(0,n.jsx)("div",{className:"mx-auto my-2 grid max-w-screen-xl grid-cols-1 gap-10 px-3 sm:grid-cols-2 sm:px-0 md:grid-cols-3",children:(0,n.jsx)(th,{amount:R})}):null,ei?(0,n.jsxs)("div",{className:"mx-auto flex max-w-screen-xl flex-wrap items-center justify-between",children:[(0,n.jsx)("p",{className:"mb-4 px-4 text-center font-bold sm:text-left","data-kontent-element-codename":"pagination_string",children:N.elements.paginationString.replaceAll("{{X}}",X.length.toString()).replaceAll("{{Y}}",ee.toString())}),N.elements.productDirectoryListerSorting[0]?(0,n.jsx)(rt,{className:"w-full px-4 sm:w-auto",codename:null==(o=N.elements.productDirectoryListerSorting[0])?void 0:o.system.codename,dropDownData:rn(N.elements.productDirectoryListerSorting[0]),id:(null==(c=N.elements.productDirectoryListerSorting[0])?void 0:c.system.id)||"sorting_product_listers",label:g((null==(d=N.elements.productDirectoryListerSorting[0])?void 0:d.elements.defaultSortingText.value)||"","Sort By"),onChange:e=>{F(e.target.value)}}):null]}):null,ei?(0,n.jsx)("div",{className:"mx-auto flex max-w-screen-xl flex-wrap justify-center",children:X.filter(T.checkUserRoleForBlock).map(e=>(0,n.jsx)("div",{className:"my-2 flex w-full flex-wrap justify-center sm:w-1/2 md:w-1/3",children:(0,n.jsx)(sW,{block:e,globalConfig:k,page:_,...C})},e.system.id))}):null,er?(0,n.jsx)("div",{className:"mx-auto my-2 grid max-w-screen-xl grid-cols-1 gap-10 px-3 sm:grid-cols-2 sm:px-0 md:grid-cols-3",children:(0,n.jsx)(th,{amount:D})}):null,V&&el>0?(0,n.jsx)(aO.d,{activeIndex:Number(I)||1,amountOfPages:el,nextButtonText:(0,n.jsx)("span",{children:M}),onPageChange:e=>{var t;let l=new URLSearchParams(S.asPath.split("?")[1]||"");l.set("page",e.toString()),S.push({pathname:"".concat(null!=(t=S.locale)?t:"").concat(S.asPath.split("?")[0]),query:l.toString()})},pagesToShow:3,prevButtonText:(0,n.jsx)("span",{children:P}),showLastPage:!0}):B&&function(){let e=X.length;return void 0===J?e>=R:e<J}()&&(0,n.jsx)("div",{className:"my-10 text-center","data-kontent-element-codename":"button_text",children:(0,n.jsx)(H.$,{href:"?page=".concat(et),onClick:async e=>{!function(e){return"button"in e&&(0!==e.button||e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}(e)&&(e.preventDefault(),z(q+D),await K(),(0,b.d)({event:"cta_click",cta_name:B,cta_category:"button"}))},type:"button",children:B})})]})},product_directory:e=>{let{BlockMapper:t,block:l,page:a,globalConfig:s}=e;return(0,n.jsx)("div",{className:"container-wide grid auto-cols-fr auto-rows-max grid-cols-1 md:grid-cols-3",children:l.elements.products.map(e=>(0,n.jsx)("div",{"data-kontent-item-id":e.system.id,children:t({blocks:[e],globalConfig:s,page:a})},e.system.id))})},product_portfolio:e=>{let{block:t,...l}=e;return(0,n.jsx)("div",{className:"container-wide mx-auto mt-32",children:(0,n.jsxs)(sX,{children:[(0,n.jsx)(sY,{children:t.elements.cardRichText[0]?(0,n.jsx)(p,{block:t.elements.cardRichText[0],...l}):null}),t.elements.infoButton[0]?(0,n.jsx)("div",{className:"px-8 py-4",children:(0,n.jsx)(X,{block:t.elements.infoButton[0],...l})}):null,(0,n.jsx)(sQ,{children:(0,n.jsxs)("div",{className:"relative content-center",children:[t.elements.headerImage[0]?(0,n.jsx)(f(),{alt:t.elements.headerImage[0].description||"",className:"p-4",fill:!0,loader:v.L,src:t.elements.headerImage[0].url}):(0,n.jsx)("div",{className:"m-5 p-10"}),t.elements.listSection.length>0?t.elements.listSection.map(e=>(0,n.jsx)(sK,{block:e,...l},e.system.id)):null]})})]})})},product_section_mod:e=>{var t;let{block:l,...a}=e;return(0,n.jsx)("div",{className:"py-10",children:(0,n.jsxs)(lH,{className:"container-wide border-1 rounded-lg bg-gray-200 p-10 shadow-inner",imageSrc:(null==(t=l.elements.imageBanner[0])?void 0:t.url)||"",children:[(0,n.jsx)("h4",{className:"mb-4","data-kontent-element-codename":"title_text",children:l.elements.titleText}),(0,n.jsx)("p",{className:"mb-4",children:l.elements.paragraphText}),l.elements.list[0]?(0,n.jsx)(tb,{block:l.elements.list[0],...a}):null,l.elements.button[0]?(0,n.jsx)(X,{block:l.elements.button[0],...a}):null]})})},promo_module:e=>{var t;let{block:l}=e;(0,s.useEffect)(()=>{let e=document.querySelector(".container-narrow");e&&e.classList.remove("container-narrow")},[]);let a="";switch(null==(t=l.elements.horizontalAlignment[0])?void 0:t.codename){case"left":a="justify-start";break;case"center":a="justify-center";break;case"right":a="justify-end";break;case"full_width":a="";break;default:throw RangeError("horizontal_alignment received an invali
1d option")}return(0,n.jsx)("div",{className:(0,i.$)("container-wide flex ".concat(a," ").concat(d)),children:(0,n.jsx)(lV,{className:""===a?"w-full":"w-4/5",endDate:l.elements.endDate,promoButton:(0,n.jsx)(H.$,{href:l.elements.buttonsLink,onClick:()=>{(0,b.d)({event:"cta_click",cta_name:"Save and buy now",cta_category:"CTA_Button"})},children:"Save and buy now"}),termsLink:l.elements.termsLink,termsText:l.elements.termsConditions,text:l.elements.headerText,title:l.elements.titleText})})},promotion_card_group:e=>{var t;let{block:l,...a}=e,s=(e=>{switch(e){case"left":return"text-left";case"center":default:return"text-center";case"right":return"text-right"}})(null==(t=l.elements.textAlignment[0])?void 0:t.codename);return(0,n.jsxs)("div",{className:"my-4",children:[(0,n.jsxs)("div",{className:(0,i.$)("px-4",s),children:[(0,n.jsx)("h2",{children:l.elements.brandName}),(0,n.jsx)("h4",{children:l.elements.brandDescription})]}),(0,n.jsx)("div",{className:"flex-wrap md:flex",children:l.elements.productPromotionCards.map(e=>(0,n.jsx)("div",{className:"flex justify-center p-4 md:w-1/3",children:(0,n.jsx)(tp,{block:e,...a})},e.system.id))})]})},quiz:e=>{var t,l,a;let{block:s,...r}=e,i=s.elements.questions.length>0?s.elements.questions.map(e=>({id:e.system.id,questionText:(0,n.jsx)("span",{"data-kontent-element-codename":"text","data-kontent-item-id":e.system.id,children:e.elements.text}),options:e.elements.answerOptions.map(e=>{var t;return{optionText:e.elements.text,isCorrect:(null==(t=e.elements.correct[0])?void 0:t.codename)==="yes"}}),feedback:(0,n.jsx)(c.rM,{"data-kontent-element-codename":"feedback_text",element:e.elements.feedbackText,...r})})):[];return(0,n.jsx)("div",{className:d,children:(0,n.jsx)(l0,{className:"container-wide",correctOptionFeedbackTitle:s.elements.correctFeedbackTitle,facebookShareUrl:s.elements.facebookShareUrl||void 0,failedResult:(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(c.rM,{"data-kontent-element-codename":"failed_result_text",element:s.elements.failedResultText,...r}),(0,n.jsx)("div",{className:"mt-4",children:s.elements.failedResultButtons.map(e=>(0,n.jsx)(X,{block:e,className:"m-2",...r},e.system.id))})]}),hideProgressBar:(null==(t=s.elements.hideProgressBar[0])?void 0:t.codename)==="yes",linkedinShareUrl:s.elements.linkedinShareUrl||void 0,nextButtonText:s.elements.nextButtonText||void 0,passPercent:null!=(a=s.elements.passPercentage)?a:0,prevButtonText:s.elements.previousButtonText||void 0,questions:i,result:(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(c.rM,{"data-kontent-element-codename":"result_text",element:s.elements.resultText,...r}),(0,n.jsx)("div",{className:"mt-4",children:s.elements.resultButtons.map(e=>(0,n.jsx)(X,{block:e,className:"m-2",...r},e.system.id))})]}),shareNotes:s.elements.shareNotes.length>0?(0,n.jsx)("span",{"data-kontent-element-codename":"share_notes",children:s.elements.shareNotes}):null,showUserScore:!0,twitterShareUrl:s.elements.twitterShareUrl||void 0,userCorrectAnswersCountText:(null==(l=s.elements.hideCorrectAnswerCount[0])?void 0:l.codename)==="yes"?"":void 0,wrongOptionFeedbackTitle:s.elements.wrongFeedbackTitle})})},quote_slider:e=>{var t,l;let a,{block:s,...r}=e,i=(null==(t=s.elements.autoScroll[0])?void 0:t.codename)==="yes";return i&&(a=s.elements.autoScrollDuration&&s.elements.autoScrollDuration>0?1e3*s.elements.autoScrollDuration:1e3),(0,n.jsx)("div",{className:"pt-4 md:pb-8 md:pt-8 lg:pt-16",children:(0,n.jsx)("div",{className:"container-wide","data-kontent-element-codename":"quote_slider",children:(0,n.jsx)(l7,{autoPlay:i,autoPlaySpeed:a,isLargeMode:(null==(l=s.elements.showSliderArrowsInCenter[0])?void 0:l.codename)==="yes",children:s.elements.quotes.map(e=>(0,n.jsx)("div",{children:(0,n.jsx)(l6,{block:e,...r})},e.system.id))})})})},quote:l6,rebate_history:e=>{var t,l,s;let{block:r,globalConfig:i}=e,{locale:c="us"}=(0,a.useRouter)(),{data:d,isLoading:m}=(0,eB.useQuery)({queryFn:()=>ni(c),staleTime:1/0,refetchOnWindowFocus:!1}),{authenticated:u,userDetails:h}=(0,es.As)(),p=null!=(l=null==(t=(0,nr.getCookie)("cdc_user"))?void 0:t.toString())?l:"",x=no.from(p,"base64").toString(),f=""===x?"{}":JSON.parse(x).token;if(!u)return(0,n.jsx)("div",{className:"m-8",children:r.elements.notLoggedInText||"Please log in to view Rebate History"});let g={rebateHistoryKontentProps:{elements:{currency_symbol:r.elements.currencySymbol,current_year_in_text:r.elements.currentYearInText,my_rebates_toggle_text:r.elements.myRebatesToggleText,my_programs_toggle_text:r.elements.myProgramsToggleText,program_detailer:r.elements.programDetailer,rebate_history_title:r.elements.rebateHistoryTitle,enable_learn_more:r.elements.enableLearnMore,rebates_year_tooltip_text_in_text:r.elements.rebatesYearTooltipTextInText,rebates_quarter_tooltip_text_in_text:r.elements.rebatesQuarterTooltipTextInText,learn_more_image:r.elements.learnMoreImage,previous_quater_in_text:r.elements.previousQuaterInText,learn_more_url:r.elements.learnMoreUrl},system:r.system}};if(m||null===h.id)return(0,n.jsx)("div",{className:"mx-auto w-full text-center",children:(0,n.jsx)(eA,{theme:"blue"})});if(!h.crmId)return(0,n.jsx)("div",{className:"m-8",children:r.elements.noCrmIdText||"Your account is not configured for the Rebate History page.	Please contact your Rep for more information"});let v="en_gb"===c?ns.K4.UK:ns.K4.US,b=null!=f?f:null==d?void 0:d.cdcToken;return(0,n.jsx)("div",{"data-clarity-mask":"true",children:b?(0,n.jsx)(ns.ut,{apiUrl:null!=(s=o._.NEXT_PUBLIC_REBATES_API_URL)?s:"",cdcApiKey:i.elements.cdcKey,clinicId:h.crmId,config:g,earliestPaymentHistoryYear:void 0,locale:v,userAccessToken:b}):null})},rebates_block:e=>{let{block:{elements:{heading:t,redeemRebateCta:l,trackRebateCta:s,viewAllRebatesLink:r}}}=e,{locale:i=""}=(0,a.useRouter)();return(0,n.jsx)("div",{className:"w-full bg-[#ebebeb] py-8",children:(0,n.jsxs)("div",{className:"container-wide",children:[t?(0,n.jsx)("h2",{className:"text-2xl font-semibold text-midnight-blue",children:t}):null,(0,n.jsxs)("div",{className:"my-4 flex flex-col space-y-4 uppercase md:flex-row md:space-x-4 md:space-y-0",children:[(0,n.jsx)("div",{className:"relative flex h-[111px] w-full flex-col items-center justify-center rounded border border-green-600 bg-white md:max-w-[373px] md:basis-1/3",children:l.map(e=>{var t,l,a;return(0,n.jsx)(B(),{href:$(e.elements.url,i),legacyBehavior:!0,children:(0,n.jsx)(H.$,{as:"a",className:"flex h-full w-full items-center justify-center !bg-white text-center font-semibold !text-green-600",rel:"noreferrer",target:(null==(t=e.elements.openLinkInNewTab[0])?void 0:t.codename)==="yes"?"_blank":"_self",variant:null!=(a=null==(l=e.elements.variant[0])?void 0:l.codename)?a:"primary",children:e.elements.text})},e.system.id)})}),(0,n.jsx)("div",{className:"relative flex h-[111px] w-full flex-col items-center justify-center rounded border border-green-600 bg-white md:max-w-[373px] md:basis-1/3",children:s.map(e=>{var t,l,a;return(0,n.jsx)(B(),{href:$(e.elements.url,i),legacyBehavior:!0,children:(0,n.jsx)(H.$,{as:"a",className:"flex h-full w-full items-center justify-center !bg-white text-center font-semibold !text-green-600",rel:"noreferrer",target:(null==(t=e.elements.openLinkInNewTab[0])?void 0:t.codename)==="yes"?"_blank":"_self",variant:null!=(a=null==(l=e.elements.variant[0])?void 0:l.codename)?a:"primary",children:e.elements.text})},e.system.id)})})]}),r.map(e=>{var t;return(0,n.jsxs)(B(),{className:"text-sm uppercase text-green-600",href:$(e.elements.url,i),passHref:!0,rel:"noreferrer",target:(null==(t=e.elements.openInNewTab[0])?void 0:t.codename)==="yes"?"_blank":"_self",children:[e.elements.text,(0,n.jsx)("span",{className:"ml-1 text-xl",children:"›"})]},e.system.id)})]})})},rebates_table_and_filter:e=>{var t,l;let{block:{elements:{rebatesFilter:a,rebatesHeaderContent:r,rebatesHeaderSearch:i,rebatesTableParent:o}},...c}
1=e,[d,m]=(0,s.useState)(""),[u,h]=(0,s.useState)(ng.ALL),[p,x]=(0,s.useState)(""),[f,g]=(0,s.useState)([...null!=(l=null==(t=o[0])?void 0:t.elements.rebatesTableData)?l:[]]),v=e=>{let t=e;if(u!==ng.ALL&&(t=t.filter(e=>e.elements.type.map(e=>{let{codename:t}=e;return t}).includes(u))),p&&(t=t.filter(e=>e.elements.brand.some(e=>{let{codename:t}=e;return t===p}))),d){let e=d.toUpperCase();t=t.filter(t=>t.elements.offerCode.includes(e))}return t};return(0,s.useEffect)(()=>{var e,t;g(v(null!=(t=null==(e=o[0])?void 0:e.elements.rebatesTableData)?t:[]))},[u,p]),(0,n.jsxs)("div",{className:"container-wide",children:[(0,n.jsxs)("div",{className:"grid grid-cols-1 place-content-center place-items-center md:grid-cols-2",children:[r[0]?(0,n.jsx)(ny,{block:r[0],...c}):null,i[0]?(0,n.jsx)(nb,{block:i[0],onSearch:()=>{(()=>{var e,t;g(v(null!=(t=null==(e=o[0])?void 0:e.elements.rebatesTableData)?t:[]));let l=document.getElementById("rebates-table");l&&l.scrollIntoView({behavior:"smooth"})})()},searchTerm:d,setSearchTerm:m,...c}):null]}
1),a[0]?(0,n.jsx)(nv,{activeBrand:p,activeType:u,block:a[0],setActiveBrand:x,setActiveType:h,...c}):null,o[0]?(0,n.jsx)(nx,{block:o[0],rebates:f,...c}):null]})},resource_card:ne,resource_card_lister:e=>{var t,l,r,i,o,c,d,m,u,h,p,x,f,v,y,j;let{block:w,page:N,globalConfig:_,...k}=e,C=(0,a.useRouter)(),S=(0,s.useContext)(sZ),L=(0,es.As)(),{page:T}=C.query,[I,E]=(0,s.useState)(0),A=w.initialItems,[F,B]=(0,s.useState)(),{buttonText:M}=w.elements,P="nextButtonText"in w.elements&&w.elements.nextButtonText?w.elements.nextButtonText:"Next",D="prevButtonText"in w.elements&&w.elements.prevButtonText?w.elements.prevButtonText:"Prev",R=null!=(u=w.elements.subsequentItemsNumber)?u:6,q=null!=(h=w.elements.initialItemsNumber)?h:6,[z,O]=(0,s.useState)(q),U=[{taxonomy:"species",terms:["filterByTaxonomy"in N.elements?null==(l=N.elements.filterByTaxonomy[0])||null==(t=l.elements.species[0])?void 0:t.codename:void 0]}].map(e=>({...e,terms:e.terms.filter(Boolean)})).filter(e=>e.terms.length>0),[$,V]=(0,s.useState)();(0,s.useEffect)(()=>{var e;V([...U,...Object.entries(null!=(e=null==S?void 0:S[0].resourcesFilterOptions)?e:{}).map(e=>{let[t,l]=e;return{taxonomy:t,terms:"checkboxOptions"in l?l.checkboxOptions.filter(e=>e.checked).map(e=>e.codename):[l.value]}})]),O(q)},[S]);let Z=(null==(r=w.elements.usePagination[0])?void 0:r.codename)==="yes",G=null!=(p=L.userDetails.userRoles)?p:[],{isLoading:W,isFetching:K,fetchNextPage:Y,data:Q}=(0,eB.useInfiniteQuery)({queryKey:["resourceLister",{codename:"resource_card",locale:null!=(x=C.locale)?x:"",filters:JSON.stringify($),orderBy:null!=(f=null==(i=w.elements.itemsOrderingOptions[0])?void 0:i.codename)?f:void 0,hideElementCodename:"hide_from_lister",skip:(Number(null!=(v=null==T?void 0:T.toString())?v:1)-1)*q,limit:z,roles:G.join(",")}],queryFn:e=>tu(e),getNextPageParam:()=>I,staleTime:6e5,cacheTime:9e5,enabled:!_.elements.cdcKey||L.ready&&!L.authenticated||L.ready&&L.authenticated&&!!L.userDetails.id}),X=(0,s.useMemo)(()=>null==Q?void 0:Q.pages.flatMap(e=>e.items),[Q]),J=(0,s.useMemo)(()=>{var e;return rl([...null!=(e=null!=X?X:A)?e:[]],F,C.locale)},[X,C.locale,A,F]),ee=null!=(j=null!=(y=null==Q||null==(o=Q.pages[0])?void 0:o.pagination.totalCount)?y:w.initialTotalCount)?j:0,et=!Q&&0===J.length,el=(!W&&Q||J.length>0)&&J.length>0;return(0,n.jsxs)("div",{children:[et?(0,n.jsx)("div",{className:"mx-auto my-2 grid max-w-screen-xl grid-cols-1 gap-10 px-3 sm:grid-cols-2 sm:px-0 md:grid-cols-3",children:(0,n.jsx)(th,{amount:q})}):null,el?(0,n.jsxs)("div",{className:"mx-auto flex max-w-screen-xl flex-wrap items-center justify-between",children:[(0,n.jsx)("p",{className:"mb-4 px-4 text-center font-bold sm:text-left","data-kontent-element-codename":"pagination_string",children:w.elements.paginationString.replaceAll("{{X}}",J.length.toString()).replaceAll("{{Y}}",ee.toString())}),w.elements.resourceCardListerSorting[0]?(0,n.jsx)(rt,{className:"w-full px-4 sm:w-auto",codename:null==(c=w.elements.resourceCardListerSorting[0])?void 0:c.system.codename,dropDownData:rn(w.elements.resourceCardListerSorting[0]),id:(null==(d=w.elements.resourceCardListerSorting[0])?void 0:d.system.id)||"sorting_resource_listers",label:g((null==(m=w.elements.resourceCardListerSorting[0])?void 0:m.elements.defaultSortingText.value)||"","Sort By"),onChange:e=>{B(e.target.value)}}):null]}):null,el?(0,n.jsx)("div",{className:"mx-auto flex max-w-screen-xl flex-wrap justify-center",children:J.filter(L.checkUserRoleForBlock).map(e=>(0,n.jsx)("div",{className:"my-2 flex w-full flex-wrap justify-center sm:w-1/2 md:w-1/3",children:(0,n.jsx)(ne,{block:e,globalConfig:_,page:N,...k})},e.system.id))}):null,K&&Q?(0,n.jsx)("div",{className:"mx-auto my-2 grid max-w-screen-xl grid-cols-1 gap-10 px-3 sm:grid-cols-2 sm:px-0 md:grid-cols-3",children:(0,n.jsx)(th,{amount:R})}):null,Z?(0,n.jsx)(aO.d,{activeIndex:Number(T)||1,amountOfPages:Math.ceil(ee/q),nextButtonText:(0,n.jsx)("span",{children:P}),onPageChange:e=>{var t;let l=new URLSearchParams(C.asPath.split("?")[1]||"");l.set("page",e.toString()),C.push({pathname:"".concat(null!=(t=C.locale)?t:"").concat(C.asPath.split("?")[0]),query:l.toString()})},pagesToShow:3,prevButtonText:(0,n.jsx)("span",{children:D}),showLastPage:!0}):M&&J.length<ee&&(0,n.jsx)("div",{className:"my-10 text-center","data-kontent-element-codename":"button_text",children:(0,n.jsx)(H.$,{onClick:async()=>{O(z+R),await Y(),E(e=>e+1),(0,b.d)({event:"cta_click",cta_name:M,cta_category:"button"})},type:"button",children:M})})]})},responsive_link_with_icon:nl,rich_card:e=>{var t,l,a,s;let{block:r,...o}=e,c=m[null==(t=r.elements.snippetSpacingSpacing[0])?void 0:t.codename]||m.none,d=r.elements.image[0],u=r.elements.titleIcon[0];return(0,n.jsxs)(et,{className:(0,i.$)("h-full flex-none p-4",c),title:u?(0,n.jsxs)("div",{className:"flex items-center justify-start gap-2 text-left text-lg leading-tight",children:[(0,n.jsx)(eG,{alt:null!=(l=u.description)?l:"",className:"shrink-0",height:null!=(a=u.height)?a:32,src:u.url,width:null!=(s=u.width)?s:32}),(0,n.jsx)("span",{"data-kontent-element-codename":"title",children:r.elements.title})]}):(0,n.jsx)("span",{"data-kontent-element-codename":"title",children:r.elements.title}),children:[d?(0,n.jsx)(ee,{alt:d.description,"data-kontent-element-codename":"image",src:d.url}):null,r.elements.richText[0]?(0,n.jsx)(p,{block:r.elements.richText[0],...o}):null,(()=>{let e=r.elements.button[0];return e?(0,n.jsx)(el,{children:"cta_button"===e.system.type?(0,n.jsx)(X,{block:e,className:"w-full",...o}):(0,n.jsx)(eZ,{block:e,...o})}):null})()]})},rich_text_with_cta:e=>{var t,l,a;let{block:s,page:r,...o}=e,d=m[null==(t=s.elements.snippetSpacingSpacing[0])?void 0:t.codename]||m.none,{colorId:u,bgClass:h}=G({blockColor:s.elements.brandColor,pageConfig:r.elements.config[0]}),p="bg-grey",x=!!h,f=x&&u?null!=(a=null==(l=(0,V.oU)(u))?void 0:l.textContrast)?a:"light":"dark";return(0,n.jsxs)("div",{className:(0,i.$)(null!=h?h:"bg-white","py-12",d),children:[(0,n.jsx)(c.rM,{className:(0,i.$)(x&&u?"".concat("light"===f?"text-white":"text-black fill-black"," brandtext-").concat(u):"","container-narrow px-8","text-center","content"),"data-kontent-element-codename":"content",element:s.elements.content,page:r,...o}),(0,n.jsx)(tn,{className:"text-center",children:(0,n.jsx)("div",{className:"justify-center sm:flex md:flex-row",children:s.elements.ctaButton.map((e,t,l)=>{var a;return"cta_button"===e.system.type?(0,n.jsx)(X,{block:e,className:(0,i.$)(p,"mt-6 w-full max-w-xs",l.length>1&&t!==l.length-1?"sm:mr-6":""),ctaButtonOrigin:s.system.type,page:r,variant:u?"none":(null==(a=e.elements.variant[0])?void 0:a.codename)||"primary",...o},e.system.id):(0,n.jsx)("div",{className:(0,i.$)(p,"mx-auto mt-6 w-full max-w-xs sm:mx-0",l.length>1&&t!==l.length-1?"sm:mr-6":"","[&>div]:my-0 [&_.swn-tag-wtb-btn]:mt-0 [&_.swn-tag-wtb-btn]:w-full"),"data-kontent-item-id":e.system.id,children:(0,n.jsx)(e6,{block:e,page:r,...o})},e.system.id)})})})]})},rich_text:p,row:e=>{var t,l,a,s;let{block:r,BlockMapper:o,page:c,...d}=e,m=(()=>{var e;switch(null==(e=r.elements.rowType[0])?void 0:e.codename){case"full_width":default:return"full-width";case"n50_50_split":return"fifty-fifty";case"n70_30_split":return"seventy-thirty";case"n30_70_split":return"thirty-seventy"}})(),p=(0,h.As)(null!=(s=null==(t=r.elements.snippetContainerResize[0])?void 0:t.codename)?s:""),x=(()=>{var e;switch(null==(e=r.elements.snippetSpacingSpacing[0])?void 0:e.codename){case"default":return u.default;case"top":return u.top;case"bottom":return u.bottom;default:return u.none}})(),{colorId:f}
1=G({blockColor:r.elements.snippetLayoutBackgroundColorBrandColor||void 0,pageConfig:c.elements.config[0],fallbackColorId:"primary"}),g=(()=>{var e;let t=null==(e=r.elements.snippetLayoutBackgroundColorColor[0])?void 0:e.codename;return t||"none"})(),v=!!r.elements.snippetLayoutBackgroundColorBrandColor,b=v&&f?(0,V.wj)(f):"",y=v?"none":g,j="brand"!==g||v?"":" !bg-".concat(f,"-light bg-default-light-background"),w=(()=>{var e;let t=null==(e=r.elements.mobileStackOrder[0])?void 0:e.codename;return t||"default"})(),N=(null==(a=r.elements.fiftyFiftyRowGap)||null==(l=a[0])?void 0:l.codename)==="yes";return(0,n.jsx)(e_,{bgColor:y,className:(0,i.$)(x,j,b),containerClassName:p,fiftyFiftyRowGap:N,mobileStackOrder:w,rowWidthType:m,children:r.elements.items.map((e,t)=>(0,n.jsx)("div",{className:(0,i.$)(m.split("-")[t],"w-full"),children:(0,n.jsx)(o,{blocks:[e],className:"not-italic",page:c,...d})},e.system.id))})},scrolling_images:e=>{var t,l,a,r,o;let{block:c,...d}=e,{isMobile:m,width:u}=(0,T.l)(),h={grayscale:"hover:grayscale",grayscale_inverted:"grayscale hover:grayscale-0"},p=c.elements.effects.map(e=>h[e.codename]).filter(Boolean).join(" "),[x,g]=(0,s.useState)(p);return(0,s.useEffect)(()=>{var e;if(!m||(null==(e=c.elements.effectsOnMobile[0])?void 0:e.codename)==="yes")return void g(p);g("")},[c.elements.effectsOnMobile,p,m]),(0,n.jsx)(ej,{autoplay:(null==(t=c.elements.autoplay[0])?void 0:t.codename)==="yes",autoplaySpeed:null!=(r=c.elements.autoplaySpeed)?r:2e3,columns:null!=(o=m?c.elements.mobileColumns:c.elements.columns)?o:5,showAsSlider:!0,snippetContainerResize:null==(l=c.elements.snippetContainerResize[0])?void 0:l.codename,children:Array((null==(a=c.elements.autoplay[0])?void 0:a.codename)==="yes"?Math.floor(Math.max((null!=u?u:1)/320,1)):1).fill(c.elements.images).flat().map(e=>{var t,l,a,s;let r=(null==(t=c.elements.removeHyperlink[0])?void 0:t.codename)==="yes";if("url"in e.elements){let t=e.elements.image[0];if(!t)return null;let o=(0,n.jsx)("div",{className:"flex h-full","data-kontent-element-codename":"images",children:(0,n.jsx)(f(),{alt:null!=(a=t.description)?a:"",className:(0,i.$)("my-auto w-60 transition-all",x),height:null!=(s=t.height)?s:100,loader:v.L,priority:!0,src:t.url,width:400})});return r?(0,n.jsx)("div",{children:o},e.system.id):(0,n.jsx)(B(),{href:e.elements.url,target:(null==(l=e.elements.openInNewTab[0])?void 0:l.codename)==="yes"?"_blank":"_self",children:o},e.system.id)}let o={...e,elements:{...e.elements,removeHyperlink:r,effectCls:x}};return(0,n.jsx)(eq.D,{BlockMapper:d.BlockMapper,block:o,globalConfig:d.globalConfig,page:d.page},e.system.id)})})},search_header_block:nc,search_module:e=>{let{block:t,...l}=e;return(0,n.jsxs)("div",{children:[t.elements.searchHeaderBlock[0]?(0,n.jsx)(nc,{block:t.elements.searchHeaderBlock[0],...l}):null,t.elements.showSearchResults[0]?(0,n.jsx)(nm,{block:t.elements.showSearchResults[0],...l}):null]})},secondary_header:e=>{var t,l,a,s,r;let{block:i,page:o}=e,c=!!(null==(t=i.elements.theme[0])?void 0:t.codename)&&!i.elements.brandColor,{bgClass:d,colorId:m}=G({blockColor:i.elements.brandColor,pageConfig:c?void 0:o.elements.config[0]}),u=!!d,h=m?(null!=(s=null==(l=(0,V.oU)(m))?void 0:l.textContrast)?s:"light")==="dark":(null!=(r=null==(a=i.elements.theme[0])?void 0:a.codename)?r:"light")==="light",p=u&&!h?"text-white":void 0,x=p?"pt-6 ".concat(p):"pt-6";return(0,n.jsx)("div",{"data-kontent-element-codename":"secondary_header",children:(0,n.jsxs)(tV,{bgColor:null!=d?d:void 0,light:h,noTheme:u,children:[(0,n.jsx)("h1",{className:p,children:i.elements.title}),(0,n.jsx)("p",{className:x,children:i.elements.content}),i.elements.image[0]?(0,n.jsx)(t$,{alt:i.elements.image[0].description||"",src:i.elements.image[0].url}):null]})})},section_header_block:e=>{var t,l,a,r,o,d,u,h,p,x,f,g,v,b,y;let{block:j,page:w,...N}=e,_=w.elements.config[0],k=(null==(t=j.elements.fullBackgroundImage[0])?void 0:t.codename)==="yes",C=m[null==(l=j.elements.snippetSpacingSpacing[0])?void 0:l.codename]||m.none,{colorId:S}=G({pageConfig:_}),L=(null==(a=j.elements.snippetLayoutBackgroundColorColor[0])?void 0:a.codename)||"none",I=!!j.elements.snippetLayoutBackgroun
1dColorBrandColor,E="brand"!==L||I?"":" !bg-".concat(S,"-light bg-default-light-background"),A=(null==(r=j.elements.mediaAlignRight[0])?void 0:r.codename)==="yes",F=(null==(o=j.elements.mikmakInPageAlignment[0])?void 0:o.codename)||"left",B=Math.min(Math.max(j.elements.mikmakInPageTopPadding||0,0),380),{colorId:M}=G({blockColor:j.elements.snippetLayoutBackgroundColorBrandColor}),P=I?(0,V.Th)(M||"")||"bg-white":(0,V.Th)(I?"none":L)||"bg-white",[D,R]=(0,s.useState)(null),q=(0,T.l)();(0,s.useEffect)(()=>{k&&q.isMobile&&j.elements.mobileImage[0]?R(j.elements.mobileImage[0]||null):q.isMobile&&!j.elements.mobileImage.length&&j.elements.packshotImage.length?R(null):R(j.elements.image[0]||null)},[j.elements.image.length,j.elements.mobileImage.length,j.elements.packshotImage.length,k,q.isMobile]);let z=null==(d=j.elements.ctaButton[0])?void 0:d.elements,O="primary";(null==z?void 0:z.brandColor)?O=z.brandColor:(null==z||null==(u=z.variant[0])?void 0:u.codename)?O=null==(y=z.variant[0])?void 0:y.codename:S&&(O=S);let U=(null==(h=j.elements.hasWhiteBackground[0])?void 0:h.codename)==="yes",$=j.elements.clickToBuySingleProduct[0]||j.elements.multiProductClickToBuy[0]||j.elements.clickToCart.length>0?"flex flex-wrap":"",H=j.elements.mikmakInPage[0]?(0,n.jsx)("div",{"data-kontent-item-id":j.elements.mikmakInPage[0].system.id,children:(0,n.jsx)(lx,{block:j.elements.mikmakInPage[0],page:w,...N})}):null,Z=j.elements.ctaButton[0],W=null==(p=j.elements.mikmakButton)?void 0:p[0],K=1===j.elements.ctaButton.length&&!!Z&&!!W;return(0,n.jsxs)(tV,{bgColor:P,className:(0,i.$)(C,E),contain:!k,containerSize:k?"lg":"",fixedInfoWidth:!D,fullBackgroundImage:k,hasWhiteInfoContainerBg:U,infoSectionTopStack:"left"===F,logoImgAlt:null==(x=j.elements.logo[0])?void 0:x.description,logoImgSrc:null==(f=j.elements.logo[0])?void 0:f.url,noTheme:!0,reversedMobile:!0,widget:"right"===F?H:null,children:[j.elements.title?(0,n.jsx)("h1",{className:(0,i.$)((null==(g=j.elements.hasWhiteText[0])?void 0:g.codename)==="yes"?"text-white":"","break-words"),"data-kontent-element-codename":"title",children:j.elements.title}):null,"<p><br></p>"!==j.elements.content.value&&(0,n.jsx)(c.rM,{className:(0,i.$)((null==(v=j.elements.hasWhiteText[0])?void 0:v.codename)==="yes"?"text-white":null,"break-words pb-2 pt-6 *:*:!mb-0"),"data-kontent-element-codename":"content",element:j.elements.content,page:w,...N}),K&&Z&&W?(0,n.jsxs)("div",{className:"mt-6 grid grid-cols-[repeat(auto-fit,minmax(min(100%,10rem),1fr))] gap-2","data-kontent-element-codename":"cta_button",children:[(0,n.jsx)("div",{"data-kontent-item-id":Z.system.id,children:(0,n.jsx)(X,{block:Z,className:"h-full w-full",ctaButtonOrigin:j.system.type,customPrecedence:!0,page:w,variant:O,...N})}),(0,n.jsx)("div",{className:"[&>div]:!m-0 [&>div]:h-full [&_.btn]:!mt-0 [&_.btn]:h-full [&_.btn]:w-full","data-kontent-item-id":W.system.id,children:(0,n.jsx)(e6,{block:W,page:w,...N})})]}):null,!K&&j.elements.ctaButton[0]?(0,n.jsx)("div",{className:"flex flex-wrap ","data-kontent-element-codename":"cta_button",children:j.elements.ctaButton.map((e,t)=>(0,n.jsx)("div",{className:(0,i.$)("flex",j.elements.ctaButton.length>=2?"w-1/2":"w-fit"),children:(0,n.jsx)("div",{className:(0,i.$)("mt-6 flex flex-1 flex-col justify-center",0===t?"mr-1":"ml-1"),"data-kontent-item-id":e.system.id,children:(0,n.jsx)(X,{block:e,className:(0,i.$)("mb-2 h-full"),ctaButtonOrigin:j.system.type,customPrecedence:!0,page:w,variant:O,...N})})},e.system.id))}):null,(0,n.jsxs)("div",{className:$,children:[j.elements.clickToBuySingleProduct[0]?(0,n.jsx)("div",{className:"flex w-full flex-col",children:(0,n.jsx)("div",{className:"flex flex-1 justify-start","data-kontent-item-id":j.elements.clickToBuySingleProduct[0].system.id,children:(0,n.jsx)(e1,{block:j.elements.clickToBuySingleProduct[0],page:w,...N})})}):null,j.elements.multiProductClickToBuy[0]?(0,n.jsx)("div",{className:"flex w-full flex-col",children:(0,n.jsx)("div",{className:"flex flex-1 justify-start","data-kontent-item-id":j.elements.multiProductClickToBuy[0].system.id,children:(0,n.jsx)(eJ,{block:j.elements.multiProductClickToBuy[0],page:w,...N})})}):null,j.elements.clickToCart.map((e,t)=>(0,n.jsx)("div",{className:"flex min-h-[294px] w-1/2",children:(0,n.jsx)("div",{className:(0,i.$)("mt-6 flex flex-1 flex-col justify-center",0===t?"mr-1":"ml-1"),"data-kontent-item-id":e.system.id,children:(0,n.jsx)(e4,{block:e,page:w,...N})})}
1,e.elements.dataSourceId))]}),W&&!K?(0,n.jsx)("div",{className:"flex flex-wrap",children:(0,n.jsx)("div",{className:"flex w-full flex-col",children:(0,n.jsx)("div",{className:"flex flex-1 justify-start","data-kontent-item-id":W.system.id,children:(0,n.jsx)(e6,{block:W,page:w,...N})})})}):null,"left"===F?(0,n.jsx)("div",{style:{paddingTop:B},children:H}):null,!!j.elements.textLink[0]&&(0,n.jsx)("div",{className:"mt-4 flex flex-wrap",children:j.elements.textLink.map((e,t)=>{var l;return(0,n.jsx)("div",{className:"flex w-1/2",children:(0,n.jsx)("div",{className:(0,i.$)("flex flex-1 flex-col justify-center",0===t?"mr-1":"ml-1"),children:(0,n.jsx)(lp,{block:e,className:"".concat((null==(l=j.elements.hasWhiteText[0])?void 0:l.codename)==="yes"?"text-white":""," text-btn cursor-pointer text-xs underline hover:no-underline focus:text-secondary focus:no-underline focus:outline-none"),page:w,...N})})},e.system.id)})}),(0,n.jsx)(t$,{alt:null==D?void 0:D.description,contain:!k,isMobile:q.isMobile,mediaAlignRight:A,mediaLeftPosition:j.elements.mediaLeftPosition,mediaTopPosition:j.elements.mediaTopPosition,packshotImage:j.elements.packshotImage[0]?(0,n.jsx)(tH,{alt:j.elements.packshotImage[0].description,hasMobileImage:j.elements.mobileImage.length>0,mediaAlign:(null==(b=j.elements.packshotAlign[0])?void 0:b.codename)==="yes",mediaRightPosition:j.elements.packshotRightPosition,mediaTopPosition:j.elements.packshotTopPosition,src:j.elements.packshotImage[0].url}):null,src:null==D?void 0:D.url})]})},share_block_static:e=>{var t,l,a,r;let{block:i}=e,{emailSubject:o,emailBody:c,urlToShare:d,title:m}=i.elements,u=(null==(t=i.elements.showFacebook[0])?void 0:t.codename)==="yes",h=(null==(l=i.elements.showTwitter[0])?void 0:l.codename)==="yes",p=(null==(a=i.elements.showLinkedIn[0])?void 0:a.codename)==="yes",x=(null==(r=i.elements.showEmail[0])?void 0:r.codename)==="yes",f={target:"_blank",rel:"noreferrer"},[g,v]=(0,s.useState)(""),[b,y]=(0,s.useState)("");return(0,s.useEffect)(()=>{let e=d||window.location.href,t=c.replace(/{{url}}/g,e);v(e),y(t)},[c,d]),(0,n.jsx)("div",{children:(0,n.jsxs)("div",{className:"flex items-center",children:[(0,n.jsx)("p",{className:"text-md mr-2",children:m||"Share on"}),(0,n.jsxs)("ul",{className:"flex p-0 text-primary",children:[u?(0,n.jsx)("li",{className:"mr-1 shrink-0",children:(0,n.jsx)("a",{href:"https://www.facebook.com/sharer/sharer.php?kid_directed_site=0&u=".concat(g,"&display=popup&ref=plugin&src=share_button"),title:"Share on Facebook",...f,children:(0,n.jsx)("svg",{className:"m-auto h-5 fill-current",height:"32.748",viewBox:"0 0 15.115 32.748",width:"15.115",children:(0,n.jsx)("path",{d:"M60.73,87.464H57.161c-1.26,0-1.523.516-1.523,1.819v3.149H60.73l-.49,5.528h-4.6v16.514H49.044V98.031H45.615v-5.6h3.429V88.025c0-4.137,2.213-6.3,7.119-6.3H60.73v5.738Z",transform:"translate(-45.615 -81.727)"})})})}):null,h?(0,n.jsx)("li",{className:"mx-1 shrink-0",children:(0,n.jsx)("a",{href:"https://twitter.com/share?url=".concat(g),title:"Share on Twitter",...f,children:(0,n.jsx)("svg",{className:"m-auto h-5 fill-current",height:"24.612",viewBox:"0 0 1200 1227",width:"30.285",children:(0,n.jsx)("path",{d:"M714.163 519.284L1160.89 0H1055.03L667.137 450.887L357.328 0H0L468.492 681.821L0 1226.37H105.866L515.491 750.218L842.672 1226.37H1200L714.137 519.284H714.163ZM569.165 687.828L521.697 619.934L144.011 79.6944H306.615L611.412 515.685L658.88 583.579L1055.08 1150.3H892.476L569.165 687.854V687.828Z"})})})}):null,p?(0,n.jsx)("li",{className:"mx-1 shrink-0",children:(0,n.jsx)("a",{href:"https://www.linkedin.com/sharing/share-offsite/?url=".concat(g),title:"Share on LinkedIn",...f,children:(0,n.jsx)("svg",{className:"m-auto h-5 fill-current",height:"26.464",viewBox:"0 0 26.452 26.464",width:"26.452",children:(0,n.jsx)("path",{d:"M421.615,96.922h5.461v17.643h-5.461Zm2.7-2.31a3.255,3.255,0,1,0-3.229-3.255A3.243,3.243,0,0,0,424.319,94.612ZM435.806,105.3c0-2.481,1.142-3.958,3.327-3.958,2.009,0,2.974,1.417,2.974,3.958v9.261h5.435V103.394c0-4.725-2.678-7.01-6.419-7.01a6.153,6.153,0,0,0-5.317,2.915V96.922h-5.238v17.643h5.238Z",transform:"translate(-421.09 -88.101)"})})})}):null,x?(0,n.jsx)("li",{className:"ml-2 shrink-0",children:(0,n.jsx)("a",{href:"mailto:?subject=".concat(o||"subject","&body=").concat(b||g),title:"Share via Email",...f,children:(0,n.jsx)("svg",{className:"m-auto h-5 fill-current",viewBox:"0 0 1792 1792",xmlns:"http://www.w3.org/2000/svg",children:(0,n.jsx)("path",{d:"M1792 710v794q0 66-47 113t-113 47h-1472q-66 0-113-47t-47-113v-794q44 49 101 87 362 246 497 345 57 42 92.5 65.5t94.5 48 110 24.5h2q51 0 110-24.5t94.5-48 92.5-65.5q170-123 498-345 57-39 100-87zm0-294q0 79-49 151t-122 123q-376 261-468 325-10 7-42.5 30.5t-54 38-52 32.5-57.5 27-50 9h-2q-23 0-50-9t-57.5-27-52-32.5-54-38-42.5-30.5q-91-64-262-182.5t-205-142.5q-62-42-117-115.5t-55-136.5q0-78 41.5-130t118.5-52h1472q65 0 112.5 47t47.5 113z"})})})}):null]})]})})},share_block:e=>{let{block:t}
1=e,[l,a]=(0,s.useState)("");return(0,s.useEffect)(()=>{a(window.location.href)},[]),(0,n.jsx)(k,{"data-kontent-element-codename":"share_block",facebookShareUrl:t.elements.facebookShareUrl,linkedinShareUrl:t.elements.linkedinShareUrl,mailBody:"".concat(t.elements.emailShareBody,"\n").concat(l),mailLink:"",mailSubject:t.elements.emailShareSubject,title:t.elements.shareTitle,twitterShareUrl:t.elements.twitterShareUrl})},show_search_results:nm,simple_content_block_with_icon:e=>{let{block:t,page:l,...a}=e,{colorId:s,hexCode:r}=G({blockColor:t.elements.brandColor,blockColorLegacy:t.elements.borderColor,pageConfig:l.elements.config[0],fallbackColorId:"gray"}),o=!!(s&&"none"!==s);return(0,n.jsx)("div",{className:(0,i.$)("p-4 md:p-8",o&&"border"),style:o&&r?{borderColor:r}:void 0,children:(0,n.jsxs)("div",{className:"flex",children:[(0,n.jsx)(S,{borderHexColor:null!=r?r:void 0,size:t.elements.title?"lg":"md",children:t.elements.image[0]?(0,n.jsx)(f(),{alt:t.elements.image[0].description||"",height:t.elements.image[0].height||107,loader:v.L,src:t.elements.image[0].url,width:t.elements.image[0].width||107}):(0,n.jsx)("div",{})}),(0,n.jsxs)("div",{className:(0,i.$)(t.elements.image[0]&&"ml-4 md:ml-6","flex-1"),children:[(0,n.jsx)("h3",{className:"text-xl md:text-2xl",children:(0,n.jsx)("div",{className:"mt-4 md:mt-0",children:t.elements.title})}),(0,n.jsx)("div",{className:"mt-4",children:(0,n.jsx)(c.rM,{className:"mb-4",element:t.elements.description,page:l,...a})}),(0,n.jsxs)("div",{className:"flex flex-wrap items-center",children:[t.elements.iconHeading?(0,n.jsx)("span",{className:"mr-4 font-bold",children:t.elements.iconHeading}):null,(0,n.jsx)("div",{className:"my-2 flex",children:t.elements.icons.map(e=>(0,n.jsx)(nh,{borderHexColor:null!=r?r:void 0,icon:e},e.system.id))})]})]})]})})},simple_lister_block:e=>{var t,l;let{block:a,...s}=e,r=(null==(t=a.elements.textAlignment[0])?void 0:t.codename)==="center";return(0,n.jsx)(tm,{buttonSection:a.elements.button[0]?(0,n.jsx)("div",{className:"flex flex-wrap",children:a.elements.button.map((e,t)=>(0,n.jsx)("div",{className:"flex",children:(0,n.jsx)("div",{className:(0,i.$)("mb-2 flex flex-shrink flex-col justify-center lg:mb-0",0===t?"mr-1":"lg:ml-1"),children:"cta_button"===e.system.type?(0,n.jsx)(X,{block:e,...s}):(0,n.jsx)("div",{className:"[&>div]:my-0 [&_.swn-tag-wtb-btn]:mt-0",children:(0,n.jsx)(e6,{block:e,...s})})})},e.system.id))}):(0,n.jsx)(n.Fragment,{}),image:a.elements.image[0]?(0,n.jsx)(f(),{alt:a.elements.image[0].description||"",height:a.elements.image[0].height||300,loader:v.L,src:a.elements.image[0].url,width:a.elements.image[0].width||500}):null,infoSection:(0,n.jsx)(c.rM,{className:(0,i.$)("content m-0 py-6",r&&"md:pb-0 md:pt-6"),"data-kontent-element-codename":"description",element:a.elements.description,...s}),reversed:(null==(l=a.elements.imageAlignment[0])?void 0:l.codename)==="left",textAlignmentCenter:r,title:(0,n.jsx)("h3",{children:a.elements.title})})},sku_provider:rc,small_benefits_block:e=>{var t;let{block:l,page:a,...s}=e,r=m[null==(t=l.elements.snippetSpacingSpacing[0])?void 0:t.codename]||m.default;return(0,n.jsx)("div",{className:"container-wide ".concat(r),children:(0,n.jsx)(eC,{className:"px-2",col:2,grayBG:!1,hasNoFlexWrap:!0,children:l.elements.iconWithTextAndCta.map(e=>(0,n.jsx)(eO,{backgroundOption:l.elements.backgroundOption,block:e,borderOption:l.elements.borderOption,page:a,...s},e.system.id))})})},small_benefits_module:e=>{var t,l,a;let{block:s,page:r,...i}=e,o=m[null==(t=s.elements.snippetSpacingSpacing[0])?void 0:t.codename]||m.none;return(0,n.jsxs)("div",{className:"container-wide ".concat(o),children:[(0,n.jsx)(e$.Icons,{col:Number(null!=(a=null==(l=s.elements.columns[0])?void 0:l.name)?a:4),children:s.elements.iconsWithText.map(e=>(0,n.jsx)(eH,{block:e,borderOption:s.elements.borderOption,page:r,squareIcon:s.elements.squareIcon,...i},e.system.id))}),s.elements.ctaButton.map(e=>(0,n.jsx)("div",{className:"flex justify-center",children:(0,n.jsx)(X,{block:e,className:"mt-6",page:r,...i})},e.system.id))]})},small_text:e=>{let{block:{elements:{content:t}}}=e;return(0,n.jsx)("p",{className:"container-narrow text-center ".concat(d),"data-kontent-element-codename":"content",children:t})},steps:e=>{let{block:t,...l}=e;return(0,n.jsxs)(n.Fragment,{children:[!!t.elements.stepsTitle&&(0,n.jsx)("h1",{className:"container-wide text-center","data-kontent-element-codename":"steps_title",children:t.elements.stepsTitle}),(0,n.jsx)("div",{className:"container-wide justify-center md:flex md:flex-wrap",children:t.elements.stepsName.map((e,t)=>(0,n.jsxs)(li,{"data-kontent-item-id":e.system.id,step:"".concat(t+1),title:e.elements.title,children:[e.elements.stepImg[0]?(0,n.jsx)(f(),{alt:e.elements.stepImg[0].description||"",className:"absolute inset-0 m-auto","data-kontent-element-codename":"step_img",height:150,loader:v.L,src:e.elements.stepImg[0].url,width:150}):null,(0,n.jsx)("p",{"data-kontent-element-codename":"paragraph",children:e.elements.paragraph})]},e.system.id))}),!!t.elements.stepsDescription&&(0,n.jsx)("p",{className:"content mt-6","data-kontent-element-codename":"steps_description",children:t.elements.stepsDescription}),t.elements.ctaButton.length>0?(0,n.jsx)("div",{className:"justify-center text-center sm:flex md:flex-row",children:t.elements.ctaButton.map(e=>(0,n.jsx)(X,{block:e,className:"mt-6 w-2/3 max-w-xs md:w-1/2",...l},e.system.id))}):null]})},sticky_bar:e=>{let{block:t,page:l}
1=e,[a,r]=(0,s.useState)(0),i=(0,T.l)();(0,s.useEffect)(()=>{let e=document.querySelector("[data-secondary-header]"),t=e&&e instanceof HTMLElement&&!i.isMobile?48+e.scrollHeight:48;t!==a&&r(t)},[i.isMobile,a]);let{colorId:o}=G({blockColor:t.elements.brandColor,blockColorLegacy:t.elements.brand,pageConfig:l.elements.config[0],fallbackColorId:"primary"}),c=null!=o?o:"primary";return(0,n.jsx)("div",{"data-kontent-element-codename":t.system.codename,children:(0,n.jsx)(tP.A,{bottomBoundary:"#bottom-bar",innerZ:"1",top:a,children:e=>{let{status:t}=e;return(0,n.jsx)(na,{brand:c,fixed:t===tP.A.STATUS_FIXED})}})})},tabbed_block:e=>{var t,l;let{block:a,...s}=e,r=m[null!=(l=null==(t=a.elements.snippetSpacingSpacing[0])?void 0:t.codename)?l:"default"];return(0,n.jsx)("div",{className:(0,i.$)(r,"rounded-lg shadow-md"),children:(0,n.jsx)(aa,{children:a.elements.tabbedComponents.map(e=>(0,n.jsx)(an,{"data-kontent-item-id":e.system.id,title:e.elements.tabTitle,children:s.BlockMapper({blocks:[e],globalConfig:s.globalConfig,page:s.page})},e.system.id))})})},tabbed_content_block:e=>{var t,l,a;let{block:s,BlockMapper:r,...i}=e,o=m[null==(t=s.elements.snippetSpacingSpacing[0])?void 0:t.codename]||m.none;return(0,n.jsx)("div",{className:"".concat(o," rounded-lg shadow-md"),children:(0,n.jsx)(aa,{onChange:e=>{let t=Number(e),l=s.elements.tabs[t];if(!l)return;let n=l.elements.title;(0,b.d)({event:"cta_click",cta_name:n,cta_category:"CTA_Button"})},tabColorStyles:eT.tW,tabMobileView:null!=(a=null==(l=s.elements.tabStyle[0])?void 0:l.codename)?a:"stack",children:s.elements.tabs.map(e=>{var t,l;let a=(null==(t=e.elements.enableScrollbar[0])?void 0:t.name)==="No";if("body"in e.elements){let{colorId:t}=G({blockColor:e.elements.brandColor,blockColorLegacy:e.elements.tabColor,pageConfig:i.page.elements.config[0],fallbackColorId:"black"});return(0,n.jsx)(an,{color:{choice:null!=t?t:void 0},disableOverflow:!0,title:(0,n.jsx)("span",{"data-kontent-element-codename":"title","data-kontent-item-id":e.system.id,children:e.elements.title}),children:e.elements.image[0]?(0,n.jsxs)("div",{className:"md:flex","data-kontent-item-id":e.system.id,children:[(0,n.jsx)("div",{className:"pb-6 md:w-1/2 md:pb-0 md:pr-8",children:(0,n.jsx)(c.rM,{BlockMapper:r,className:"content break-words","data-kontent-element-codename":"body",element:e.elements.body,...i})}),(0,n.jsx)("div",{className:"pb-2 md:w-1/2 md:pl-8",children:(0,n.jsx)(f(),{alt:null!=(l=e.elements.image[0].description)?l:"","data-kontent-element-codename":"image",height:e.elements.image[0].height||334,loader:v.L,src:e.elements.image[0].url,width:e.elements.image[0].width||502})})]}):null},e.system.id)}let{colorId:s}=G({blockColor:e.elements.brandColor,blockColorLegacy:e.elements.tabColor,pageConfig:i.page.elements.config[0],fallbackColorId:"black"});return(0,n.jsx)(an,{color:{choice:null!=s?s:void 0},disableOverflow:a,title:(0,n.jsx)("span",{"data-kontent-element-codename":"title","data-kontent-item-id":e.system.id,children:e.elements.title}),children:(0,n.jsx)(r,{blocks:e.elements.tabBlocks,...i})},e.system.id)})})})},table_block_with_icons:e=>{let{block:{elements:{title:t,rowData:l,description:a}}}=e;return(0,n.jsxs)("div",{children:[(0,n.jsx)("h3",{className:"mb-4","data-kontent-element-codename":"title",children:t}),(0,n.jsx)(e3,{table:{rows:l.map(e=>{var t,l,a,s,r;return{id:e.system.id,data:[{content:(0,n.jsx)(e5,{text:e.elements.rowTitle}),id:e.system.id},e.elements.rowItemTextTwo&&{content:(0,n.jsx)(e7,{iconUrl:null==(t=e.elements.rowItemIconTwo[0])?void 0:t.url,text:e.elements.rowItemTextTwo}),id:"".concat(e.system.id,"-item-two")},e.elements.rowItemTextThree&&{content:(0,n.jsx)(e7,{iconUrl:null==(l=e.elements.rowItemIconThree[0])?void 0:l.url,text:e.elements.rowItemTextThree}),id:"".concat(e.system.id,"-item-three")},e.elements.rowItemTextFour&&{content:(0,n.jsx)(e7,{iconUrl:null==(a=e.elements.rowItemIconFour[0])?void 0:a.url,text:e.elements.rowItemTextFour}),id:"".concat(e.system.id,"-item-four")},e.elements.rowItemTextFive&&{content:(0,n.jsx)(e7,{iconUrl:null==(s=e.elements.rowItemIconFive[0])?void 0:s.url,text:e.elements.rowItemTextFive}),id:"".concat(e.system.id,"-item-five")},e.elements.rowItemTextSix&&{content:(0,n.jsx)(e7,{iconUrl:null==(r=e.elements.rowItemIconSix[0])?void 0:r.url,text:e.elements.rowItemTextSix}),id:"".concat(e.system.id,"-item-six")}
1].filter(Boolean)}})}}),(0,n.jsx)("p",{className:"mx-8 my-10","data-kontent-element-codename":"description",children:a})]})},table:e=>{var t,l;let{block:a}=e;return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(e8,{table:{headers:[{columns:[...(null!=(l=null==(t=a.elements.tableHeader[0])?void 0:t.elements.rowData)?l:[]).map(e=>({title:e.elements.title,id:e.system.id}))]}],rows:[...a.elements.tableRow.map(e=>({id:e.system.id,data:e.elements.rowData.map((e,t)=>({id:e.system.id,content:0===t?(0,n.jsx)("strong",{"data-kontent-element-codename":"title","data-kontent-item-id":e.system.id,children:e.elements.title}):(0,n.jsx)("p",{className:"whitespace-pre-line","data-kontent-element-codename":"title","data-kontent-item-id":e.system.id,children:e.elements.title})}))}))]}}),(0,n.jsx)("div",{className:"my-2 flex flex-row-reverse","data-kontent-element-codename":"disclaimer",children:a.elements.disclaimer})]})},tag_block:e=>{var t;let{block:l,page:s}=e,{locale:r}=(0,a.useRouter)(),i=s.elements.config[0],c=i?function(e){if(!("articleListerCategory"in e.elements))return[];let t=[];return"concerns"in e.elements&&t.push(...e.elements.concerns),"speciesTaxonomy"in e.elements&&"farm"!==o._.NEXT_PUBLIC_TOWER&&t.push(...e.elements.speciesTaxonomy),"tags"in e.elements&&t.push(...e.elements.tags),t}(i):[],d=(()=>{var e;switch(null==(e=l.elements.snippetSpacingSpacing[0])?void 0:e.codename){case"default":return u.default;case"top":return u.top;case"bottom":return u.bottom;default:return u.none}})(),m=null==(t=s.elements.config[0])?void 0:t.system.type;return(0,n.jsx)(ek,{as:"config_article"===m?"a":"p",className:d,headerText:l.elements.title,tagUrlPrefix:"config_article"===m?"".concat(r,"/taxonomy/term"):"",tags:c,titleAboveTags:!!l.elements.title,titleBorder:!!l.elements.title})},tag_single:e=>{let{block:t}=e,l=t.elements.snippetCategoryColorCategoryColor,{locale:s}=(0,a.useRouter)(),r=(0,n.jsx)(ek,{as:"p",className:"container w-full",headerText:t.elements.title,tags:[t.elements.tag],titleAboveTags:!!t.elements.title,titleBorder:!!t.elements.title,variant:("string"==typeof l&&l?l:null)||"primary"});return t.elements.link?(0,n.jsx)(B(),{href:$(t.elements.link,null!=s?s:""),rel:"noreferrer",children:r}):r},tile_container:e=>{let{block:t,...l}=e;return(0,n.jsx)("section",{className:"container-wide my-6",children:(0,n.jsxs)("div",{className:"flex flex-col",children:[(0,n.jsx)("h2",{className:"mb-4 text-left text-2xl font-semibold text-midnight-blue",children:t.elements.heading}),(0,n.jsx)("ul",{className:"grid w-full grid-cols-2 gap-4 lg:grid-cols-3",children:t.elements.tiles.map(e=>(0,n.jsx)(aB,{block:e,...l},t.system.id))})]})})},tile_with_icon:aB,trustcode_widget:e=>{let{block:t,BlockMapper:l,...s}=e,{deviceId:r}=(()=>{let e=localStorage.getItem(eD);if(e)return{deviceId:e};let t="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{let t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)});return localStorage.setItem(eD,t),{deviceId:t}})(),{query:{code:i}}=(0,a.useRouter)(),o=t.elements.brandLogo[0],c="string"==typeof i?i:(null!=i?i:[]).join(","),{status:d,data:u}=(0,eB.useQuery)("trustcode",()=>eP(c,r),{retry:3,refetchOnWindowFocus:!1,refetchOnMount:!1,refetchOnReconnect:!1,staleTime:864e5});if(!i)return(0,eF.OG)("No code found for seresto trust code"),(0,n.jsx)(eR,{alt:null==o?void 0:o.description,height:null==o?void 0:o.height,src:null==o?void 0:o.url,text:t.elements.brandText,width:null==o?void 0:o.width,children:(0,n.jsx)("p",{className:"text-center",children:"No code found"})});if("loading"===d||"idle"===d||!u)return(0,n.jsx)(eR,{alt:null==o?void 0:o.description,height:null==o?void 0:o.height,src:null==o?void 0:o.url,text:t.elements.brandText,width:null==o?void 0:o.width,children:(0,n.jsxs)("section",{className:"container-wide mx-auto w-fit text-center ".concat(m.default),children:[(0,n.jsx)(eA,{theme:"green"}),(0,n.jsx)("h2",{dangerouslySetInnerHTML:{__html:t.elements.loadingMessage.value}})]})});if("error"===d){let e=c.replace(/[\r\n]/g,"");return(0,eF.vV)("Error Validating the seresto trust code: ".concat(e)),(0,n.jsx)(eR,{alt:null==o?void 0:o.description,height:null==o?void 0:o.height,src:null==o?void 0:o.url,text:t.elements.brandText,width:null==o?void 0:o.width,children:(0,n.jsx)("section",{className:"container-wide mx-auto w-fit ".concat(m.default),children:(0,n.jsx)("h2",{dangerouslySetInnerHTML:{__html:t.elements.errorMessage}})})})}if(u.counterfeited)return(0,eF.OG)("Counterfeit product detected for seresto trust c
1ode, parsedCode: ".concat(c)),(0,n.jsx)(eR,{alt:null==o?void 0:o.description,height:null==o?void 0:o.height,src:null==o?void 0:o.url,text:t.elements.brandText,width:null==o?void 0:o.width,children:(0,n.jsx)("section",{className:"bg-[#FD8A8A] p-4",children:(0,n.jsx)(l,{blocks:t.elements.counterfeitBlocks,...s})})});if("VALID"===u.status){var h;return u.aggregateData.differentDevicesCheckCount>(null!=(h=s.globalConfig.elements.serestoTrustcodeMaximumThreshold)?h:0)?((0,eF.OG)("Seresto trust code product with code: ".concat(c,", has reached to maximum threshold value: ").concat(u.aggregateData.differentDevicesCheckCount)),(0,n.jsx)(eR,{alt:null==o?void 0:o.description,height:null==o?void 0:o.height,src:null==o?void 0:o.url,text:t.elements.brandText,width:null==o?void 0:o.width,children:(0,n.jsx)("section",{className:"bg-[#FDF7C3] p-4",children:(0,n.jsx)(l,{blocks:t.elements.scannedMoreThanThresholdBlocks,...s})})})):(0,n.jsx)(eR,{alt:null==o?void 0:o.description,height:null==o?void 0:o.height,src:null==o?void 0:o.url,text:t.elements.brandText,width:null==o?void 0:o.width,children:(0,n.jsx)("section",{className:"bg-[#CEEDC7] p-4",children:(0,n.jsx)(l,{blocks:t.elements.validBlocks,...s})})})}return(0,eF.OG)("Unknown or deactivated seresto trust code product, ".concat(c)),(0,n.jsx)(eR,{alt:null==o?void 0:o.description,height:null==o?void 0:o.height,src:null==o?void 0:o.url,text:t.elements.brandText,width:null==o?void 0:o.width,children:(0,n.jsx)("section",{className:"bg-[#FDF7C3] p-4",children:(0,n.jsx)(l,{blocks:t.elements.deactivatedUnknownBlocks,...s})})})},vet_rebate_no_crm_id_found:e=>{var t,l;let{block:s}=e,{locale:r=""}=(0,a.useRouter)();return(0,n.jsx)("div",{className:"flex h-screen items-center justify-center ",children:(0,n.jsxs)("div",{className:"ml-4 mr-4 w-full pb-52 text-center lg:w-[60%]",children:[(0,n.jsx)(f(),{alt:"danger_image",className:"relative mx-auto my-8 h-1/3 w-1/3 lg:top-8 lg:h-[12%] lg:w-[12%]",height:90,loader:v.L,src:null!=(l=null==(t=s.elements.image[0])?void 0:t.url)?l:"",width:20}),(0,n.jsx)("div",{children:(0,n.jsx)("h1",{children:s.elements.formTitlee})}),(0,n.jsx)("div",{children:(0,n.jsx)("p",{className:"mt-2 text-gray-600",children:s.elements.formSubTitle})}),(0,n.jsx)("a",{href:"/".concat(r),children:(0,n.jsx)(H.$,{className:"mt-4 rounded-[0.3rem] pl-[3.25rem] pr-[3.25rem]",variant:"primary",children:s.elements.linkToHomepage})}),(0,n.jsx)("div",{className:"pt-5",children:(0,n.jsx)("a",{className:"mr-6 mt-auto text-primary",href:s.elements.textlinkToSupportPage,children:s.elements.linkToSupportPage})})]})})},vet_rebate_permission:e=>{var t;let{block:l}=e,{userDetails:r}=(0,es.As)(),{locale:i="",...o}=(0,a.useRouter)(),[c,d]=(0,s.useState)(""),[m,u]=(0,s.useState)(null),[h,p]=(0,s.use
1State)(!1),[x,g]=(0,s.useState)(!1),[b,y]=(0,s.useState)(""),[j,w]=(0,s.useState)(!1),N=l.elements.vrpDistributorList.map(e=>({text:e.name,value:e.codename})),_=async()=>{let e={CRM_ID:r.crmId,INVC_NBR:c,ELA_DVSN:i,UID:r.id,DISTRIBUTOR_CODE:b,EMAIL:r.emailAddress};try{await eM.L.post("/api/vet/rebate",e),g(!1),u(l.elements.vrpSubmitSuccessMessage),p(!1),setTimeout(()=>void o.push(l.elements.successPageUrl),2e3)}catch(e){var t;g(!1),rs.A.isAxiosError(e)&&(null==(t=e.response)?void 0:t.status)===406?u(l.elements.vrpInvoiceNumberExceeded):u(l.elements.vrpSubmitSfailureMessage),p(!0)}};return(0,s.useEffect)(()=>{r.id&&(r.crmId?w(!0):o.push(l.elements.errorPageUrl))},[r.id,r.crmId,o,l.elements.errorPageUrl]),(0,n.jsx)("div",{children:j?(0,n.jsx)("div",{className:"flex h-screen items-center justify-center",children:(0,n.jsxs)("div",{className:"ml-4 mr-4 w-full p-4 text-center lg:w-[60%]",children:[(0,n.jsx)(f(),{alt:"Icon",className:"relative mx-auto mb-8 mt-2 h-1/3 w-1/3 p-1 lg:top-8  lg:h-[12%] lg:w-[12%]",height:20,loader:v.L,src:(null==(t=l.elements.image[0])?void 0:t.url)||"",width:20}),(0,n.jsx)("h2",{children:l.elements.vrpFormTitle}),(0,n.jsx)("p",{className:"mt-2 text-gray-600",children:l.elements.vrpFormSubTitle}),(0,n.jsxs)(n$,{action:"",className:"mt-2",children:[(0,n.jsx)("label",{className:"pb-1 text-left text-base font-semibold ",htmlFor:"label",children:l.elements.vrpDropdownText}),(0,n.jsx)(lS,{dropdownData:[{text:l.elements.vrpDropdownPlaceholder,value:""},...N],label:l.elements.vrpDropdownText,showLabel:!1,updateFilterValue:function(e){y(e)},value:b}),(0,n.jsx)("label",{className:"text-left text-base font-semibold ",htmlFor:"label",children:l.elements.vrpInvoicefieldText}),(0,n.jsx)("input",{className:"mt-1 w-full rounded-md border border-gray-500 p-4",disabled:!b,maxLength:40,onChange:function(e){let t=e.target.value.toUpperCase();/[*;<>&=]/.test(t)?(d(t),u(l.elements.vrpInvalidInvoiceNumberMessage),p(!0)):(d(t),u(null),p(!1))},placeholder:l.elements.vrpInvoiceIdPlaceholder,style:{textTransform:"uppercase"},type:"text",value:c}),x?(0,n.jsx)("div",{children:(0,n.jsx)(eA,{theme:"blue"})}):"",(0,n.jsx)("div",{className:"mt-2 text-sm ".concat(h?"text-red-500":"text-green-400"),children:m}),(0,n.jsx)(H.$,{as:"button",className:"mt-4 rounded-[0.3rem] pl-[7.25rem] pr-[7.25rem]",disabled:h||!b,onClick:e=>{e.preventDefault(),""===c?(u(l.elements.vrpInvalidInputText),p(!0)):(g(!0),_())},type:"submit",variant:"primary",children:l.elements.vrpSubmitButtonText})]}),(0,n.jsx)("p",{className:"pb-14 pt-3",children:(0,n.jsx)("a",{className:"font-bold text-blue-400",href:"mailto: [email protected]?subject=Rebate%20Access%20Support",children:"Contact Support"})})]})}):(0,n.jsx)("div",{className:"mx-auto w-full text-center",children:(0,n.jsx)(eA,{theme:"blue"})})})},video_block:tA,video_with_rich_text:e=>{var t;let{block:l}=e,a=ty();return(0,n.jsx)(tm,{image:"0:"===a?(0,n.jsx)(as,{cookieFallbackImage:l.elements.cookieFallbackImage}):(0,n.jsx)(tE,{posterFrameImageUrl:null==(t=l.elements.image[0])?void 0:t.url,videoId:l.elements.videoId}),imgPosOnMobileSameAsDesktop:!0,infoSection:(0,n.jsx)("p",{className:"mb-4",children:l.elements.description}),title:(0,n.jsx)("h3",{className:"mb-4",children:l.elements.title})})},wistia:tC,youtube_video_header_block:e=>{var t,l;let{block:a}=e,s="0:"===ty()?"hide":"";return(0,n.jsx)("div",{children:(0,n.jsx)(t5,{backgroundColor:a.elements.backgroundColor,posterFrameImageAltText:a.elements.thumbnailAltText,posterFrameImageUrl:null!=(l=null==(t=a.elements.thumbnailUrl[0])?void 0:t.url)?l:"",thumbnailImage:"hide"!==s,videoId:"hide"===s?"":a.elements.videoId,children:(0,n.jsx)(tJ,{backgroundColor:"bg-transparent",className:"mt-6 md:mt-0",title:a.elements.title,children:(0,n.jsx)("p",{className:"mt-5","data-kontent-element-codename":"description",children:a.elements.description})})})})},countdown_clock:e=>{var t,l;let{block:a}=e,r=a.elements.targetDate||"",i=(a.elements.eventName||"").trim(),o=null==(l=a.elements.backgroundImage)||null==(t=l[0])?void 0:t.url,c=a.elements.fontColor||"",d=!r||Number.isNaN(new Date(r).getTime()),m=d?null:r8(new Date(r)),u=m?new Date(m):null;u&&u.setHours(23,59,59,999);let h=(0,s.useCallback)(()=>
1{if(!m)return{days:0,hours:0,minutes:0,seconds:0};let e=r9(),t=m.getTime()-e.getTime();return t<=0?{days:0,hours:0,minutes:0,seconds:0}:{days:Math.floor(t/864e5),hours:Math.floor(t/36e5%24),minutes:Math.floor(t/6e4%60),seconds:Math.floor(t/1e3%60)}},[m]),[p,x]=(0,s.useState)(h());if((0,s.useEffect)(()=>{x(h());let e=setInterval(()=>{x(h())},1e3);return()=>{clearInterval(e)}},[h]),d)return(0,n.jsx)("div",{className:"w-full rounded-md bg-red-600 p-4 text-center text-white",children:"Invalid or missing target date."});if(u&&r9()>u)return null;let f=0===p.days&&0===p.hours&&0===p.minutes&&0===p.seconds;if(f&&!i)return null;let g=c?"":"text-white";return(0,n.jsxs)("div",{className:o?"relative flex min-h-[200px] w-full items-center justify-center bg-cover bg-center":"relative flex min-h-[200px] w-full items-center justify-center bg-gradient-to-b from-blue-900 to-cyan-700",style:o?{backgroundImage:"url(".concat(o,")")}:void 0,children:[(0,n.jsx)("div",{className:"absolute inset-0 z-10 bg-black/40"}),(0,n.jsx)("div",{className:"relative z-20 flex flex-col items-center justify-center text-center ".concat(g),style:c?{color:c}:void 0,children:f?(0,n.jsx)("div",{className:"text-[clamp(2rem,6vw,4rem)] font-bold",children:i}):(0,n.jsxs)("div",{className:"flex flex-wrap items-start justify-center gap-2",children:[(0,n.jsxs)("div",{className:"m-1 flex min-w-[50px] flex-col items-center",children:[(0,n.jsx)("div",{className:"text-[clamp(2rem,8vw,5rem)] font-bold",children:ie(p.days)}),(0,n.jsx)("div",{className:"text-[clamp(0.8rem,2vw,1rem)]",children:"DAYS"})]}),(0,n.jsx)("div",{className:"m-1 text-[clamp(2rem,8vw,5rem)] font-bold",children:":"}),(0,n.jsxs)("div",{className:"m-1 flex min-w-[50px] flex-col items-center",children:[(0,n.jsx)("div",{className:"text-[clamp(2rem,8vw,5rem)] font-bold",children:ie(p.hours)}),(0,n.jsx)("div",{className:"text-[clamp(0.8rem,2vw,1rem)]",children:"HOURS"})]}),(0,n.jsx)("div",{className:"m-1 text-[clamp(2rem,8vw,5rem)] font-bold",children:":"}),(0,n.jsxs)("div",{className:"m-1 flex min-w-[50px] flex-col items-center",children:[(0,n.jsx)("div",{className:"text-[clamp(2rem,8vw,5rem)] font-bold",children:ie(p.minutes)}),(0,n.jsx)("div",{className:"text-[clamp(0.8rem,2vw,1rem)]",children:"MINUTES"})]}),(0,n.jsx)("div",{className:"m-1 text-[clamp(2rem,8vw,5rem)] font-bold",children:":"}),(0,n.jsxs)("div",{className:"m-1 flex min-w-[50px] flex-col items-center",children:[(0,n.jsx)("div",{className:"text-[clamp(2rem,8vw,5rem)] font-bold",children:ie(p.seconds)}),(0,n.jsx)("div",{className:"text-[clamp(0.8rem,2vw,1rem)]",children:"SECONDS"})]})]})})]})}}));function il(e){let{blocks:t,page:l,globalConfig:a,className:s="",isComponent:r=!1}=e,c=(0,es.As)(),d=t.map(e=>{if("archived"===e.system.workflowStep||!c.checkUserRoleForBlock(e)||!c.isBlockVisible(e))return null;let{system:{type:t}}=e,d=it.get(t);return d?(0,n.jsx)("div",{className:(0,i.$)(s,"h-[inherit]"),"data-kontent-component-id":r?e.system.id:void 0,"data-kontent-item-id":r?void 0:e.system.id,children:(0,n.jsx)(d,{BlockMapper:il,block:e,globalConfig:a,page:l})},e.system.id):"production"!==o._.NEXT_PUBLIC_NODE_ENV?(0,n.jsxs)("h2",{className:"w-full break-words bg-red-500 p-3 text-center text-sm text-white sm:p-4 sm:text-base md:text-lg","data-kontent-component-id":r?e.system.id:void 0,"data-kontent-item-id":r?void 0:e.system.id,children:["Unrecognized block - ",e.system.type]},e.system.id):null});return(0,n.jsx)(n.Fragment,{children:d})}let ia=async e=>{try{let{pageId:t,locale:l,pageUrl:n}=e.queryKey[1];if(n.includes("taxonomy/term"))return null;let a="/api/breadcrumbs?pageId=".concat(t,"&locale=").concat(l,"&pageUrl=").concat(n),{data:s}=await (0,eM.L)(a);return s.data}catch(e){var t;return{error:(0,eM.d)(e)&&e.response&&null!=(t=e.response.data.error)?t:"Failed to fetch breadcrumbs"}}},is=e=>{let{page:t}=e,l=t.system.id,{locale:s="",asPath:r}=(0,a.useRouter)(),{isLoading:i,data:o}=(0,eB.useQuery)({queryKey:["breadcrumbs",{pageId:l,locale:s,pageUrl:r.split("?",1)[0]}],queryFn:ia,cacheTime:9e5,staleTime:1/0});return i||!Array.isArray(o)?(0,n.jsx)("div",{}):(0,n.jsx)("div",{className:"border-b border-solid bg-white",children:(0,n.jsx)("div",{className:"container-wide",children:(0,n.jsx)(tg,{children:o.map(e=>(0,n.jsx)(B(),{className:"mr-2 cursor-pointer",href:"/".concat(s).concat("/"===e.url?"":e.url),children:e.breadcrumbText||e.title},e.id))})})})},ir=(0,s.memo)(e=>{var t,l,r,o;
1let{block:{elements:{content:d,icon:[m],snippetLayoutBackgroundColorColor:u,bannerRedirect:h,openNewTab:p,canClose:x},system:{id:f}},className:g,...v}=e,[b,y]=(0,s.useState)(!0),j=null==m?void 0:m.name,N=null!=(o=null==(t=u[0])?void 0:t.codename)?o:"",_=V.TE.get(N),{locale:k}=(0,a.useRouter)(),C=(null==(l=p[0])?void 0:l.codename)==="yes"?{target:"_blank",rel:"noopener noreferrer"}:{},S=(0,i.$)(g,b?null:"hidden",_,"flex items-center p-4 pr-2 md:pr-4"),L=(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("div",{className:(0,i.$)(j?"mr-8 md:mr-4":null),"data-kontent-element-codename":"icon",children:j?P.v[j].icon:null}),(0,n.jsx)(c.rM,{className:"rich-content notification-banner-richtext content--remove-bottom-margin mx-0 flex-grow break-words text-sm md:mx-4","data-kontent-element-codename":"content",element:d,...v})]});return(0,n.jsxs)("div",{className:S,"data-kontent-item-id":f,children:[h?(0,n.jsx)(B(),{className:"flex flex-grow items-center",href:$(h,null!=k?k:""),...C,children:L}):(0,n.jsx)("div",{className:"flex flex-grow items-center",children:L}),(null==(r=x[0])?void 0:r.codename)!=="no"&&(0,n.jsx)(w,{as:"button",className:"place-self-start p-4 md:place-self-center",icon:P.v.Close,onClick:e=>{e.preventDefault(),e.stopPropagation(),y(!1)},size:"sm",type:"button"})]},f)}),ii=(0,s.memo)(e=>{let{globalConfig:t,page:l,className:a,position:r,...i}=e,o=[...t.elements.notificationBanners,...l.elements.snippetPageSeoNotificationBanners].filter(e=>{var t,l;return(null!=(l=null==(t=e.elements.position[0])?void 0:t.codename)?l:"top")===r}),c=(0,es.As)().checkUserRoleForBlock;return(0,n.jsx)(n.Fragment,{children:o.filter(e=>c(e)).map(e=>(0,s.createElement)(ir,{...i,block:e,className:a,globalConfig:t,key:e.system.id,page:l}))})}),io=e=>{let{children:t}
1=e,[l,a]=(0,s.useState)(!1);return(0,n.jsx)("div",{children:t(function(){a(!l)},l)})};io.Modal=e=>{let{togglePopup:t,action:l,searchPlaceholderText:a="Search",searchBtnText:s="Search",closeBtnText:r="Close"}=e;return(0,n.jsx)(lc.FocusTrap,{children:(0,n.jsxs)("div",{className:"transition-out fixed flex h-full w-full items-center bg-blue-transparent p-4",onClick:t,style:{zIndex:100},children:[(0,n.jsx)("form",{action:l,className:"mx-auto w-full max-w-md",children:(0,n.jsxs)("div",{className:"relative",onClick:e=>{e.stopPropagation()},children:[(0,n.jsxs)("label",{htmlFor:"search",children:[(0,n.jsx)("span",{className:"visuallyhidden",children:a}),(0,n.jsx)("input",{className:"mb-0 pr-16 text-black","data-clarity-mask":"true",id:"search",name:"q",placeholder:a,type:"text"})]}),(0,n.jsx)(w,{as:"button",className:"absolute inset-y-0 right-0 my-auto mr-2",icon:(0,n.jsx)("svg",{height:"14.14",viewBox:"0 0 14.137 14.14",width:"14.137",children:(0,n.jsx)("path",{d:"M13.945,12.225,11.192,9.472a.662.662,0,0,0-.469-.193h-.45a5.741,5.741,0,1,0-.994.994v.45a.662.662,0,0,0,.193.469l2.753,2.753a.66.66,0,0,0,.936,0l.781-.781A.666.666,0,0,0,13.945,12.225Zm-8.2-2.946A3.535,3.535,0,1,1,9.278,5.744,3.533,3.533,0,0,1,5.744,9.278Z"})}),iconSize:"w-6 h-6",type:"submit",children:s})]})}),(0,n.jsx)(H.$,{as:"button",className:"absolute right-0 top-0 z-10 mr-4 mt-4 bg-blue-800 text-white hover:bg-blue-900",icon:(0,n.jsx)("svg",{height:"21.5",viewBox:"0 0 21.499 21.5",width:"21.499",children:(0,n.jsx)("path",{d:"M-45.484,39.457l-1.973-1.973a1,1,0,0,1,0-1.415l7.07-7.07-7.069-7.07a1,1,0,0,1,0-1.414l1.973-1.973a1,1,0,0,1,1.414,0L-37,25.612l7.069-7.069a1,1,0,0,1,1.414,0l1.973,1.973a1,1,0,0,1,0,1.414L-33.613,29l7.07,7.07a1,1,0,0,1,0,1.414l-1.973,1.973a1,1,0,0,1-1.414,0L-37,32.386l-7.07,7.071a1,1,0,0,1-.707.293A1,1,0,0,1-45.484,39.457Z",transform:"translate(47.75 -18.25)"})}),onClick:t,reversed:!0,variant:"",children:r})]})})};var ic=l(55153),id=l(48768),im=l.n(id);let iu=e=>{var t;let{children:l,offset:a=0}=e,[r,i]=(0,s.useState)(!1),o=(0,s.useRef)(null),[c,d]=(0,s.useState)(null),[m,u]=(0,s.useState)(!1);return(0,s.useEffect)(()=>{var e;i(!!document.querySelector("#theme"));let t=()=>{if(o.current){let e=o.current.getBoundingClientRect(),t=window.innerHeight;e.bottom>t&&e.top>200?d(t-e.bottom):d(null)}};return window.addEventListener("resize",t),t(),(null==(e=o.current)?void 0:e.querySelector("ul"))||u(!0),()=>{window.removeEventListener("resize",t)}},[]),(0,n.jsx)("ul",{className:"subnav ".concat(r?"bg-main":"bg-white"," ").concat(m?"max-h-96 overflow-y-auto":""),ref:o,style:{transform:"translateX(".concat(a,"px)"),...c&&(null==(t=o.current)?void 0:t.children)&&o.current.children.length>1?{position:"absolute",top:"".concat(c,"px")}:{}},children:l})},ih=e=>{var t;let{activeEl:l,setActiveEl:a,allowScrollingNav:r,brandColor:o,handleClick:c,isMobileMenu:d,isSubNav:m=!1,item:u,parentOffsetX:h=0,openByDefault:p=!1,openSubNavOnLinkClick:x=!1}=e,f=(0,s.useRef)(null),[g,v]=(0,s.useState)(!1),[b,y]=(0,s.useState)(!1),j=d?p||b:g||f.current&&l===f.current;(0,s.useEffect)(()=>{l&&f.current&&!f.current.contains(l)&&d&&y(!1)},[l,d]);let w=e=>{d&&(e.preventDefault(),e.stopPropagation(),c&&f.current&&c(e),y(!b))},N=Array.isArray(u.props.children)?u.props.children:[u.props.children],_=N.find(e=>(0,s.isValidElement)(e)&&((0,ic.A)(e)===iu.name||e.type===iu)),k=!!_,C={};k&&c&&(C={onClick:e=>{c(e)}});let S=0;if(f.current&&!d){let e=f.current.offsetWidth-parseFloat(window.getComputedStyle(f.current).paddingLeft),t=f.current.querySelector("ul");null!==t&&(S=-(t.offsetWidth-e)-h),f.current.offsetLeft+S<=0&&(S=0)}let L=k?N.find(e=>(0,s.isValidElement)(e)&&((0,ic.A)(e)!==iu.name||e.type===iu)):null,T=L?(0,s.cloneElement)(L,{"aria-haspopup":!0,"aria-expanded":!!j}):null,I=L?(0,n.jsx)("button",{"aria-expanded":!!j,"aria-haspopup":!0,className:"".concat(null!=(t=L.props.className)?t:""," p-4 text-left ").concat(j?"":"text-blue-900"),onClick:w,style:L.props.style?{...L.props.style}:{},type:"button",children:L.props.children}):null,E=[];k&&(0,s.isValidElement)(_)&&(E=s.Children.toArray(_.props.children).filter(s.isValidElement).map(e=>(0,n.jsx)("div",{className:m&&!d?"w-64":"",children:(0,s.isValidElement)(e)&&(0,n.jsx)(ih,{activeEl:l,brandColor:o,handleClick:c,isMobileMenu:d,isSubNav:!0,item:e,openByDefault:p,openSubNavOnLinkClick:x,parentOffsetX:h,setActiveEl:a})},e.key)));let A=o?"[&>a]:hover:!text-".concat(o," [&>a]:after:hover:!bg-").concat(o):"",F=o?"[&>a]:!text-".concat(o," [&>a]:after:!bg-").concat(o):"";return(0,s.createElement)("li",{...u.props,...C,className:(0,i.$)(u.props.className,j&&"".concat(im().open," ").concat(A),r?"shrink-0 whitespace-nowrap":"",m?im().subNavListItem:"lg:mr-4",u.props.selected&&"".concat(im().selected," text-gray-600 ").concat(F)),key:u.key,onClick:w,onKeyDown:e=>
1{("Enter"===e.key||" "===e.key)&&(e.preventDefault(),d&&(y(!b),c&&f.current&&c({...e,target:e.currentTarget,currentTarget:e.currentTarget})))},onMouseEnter:()=>{!d&&(v(!0),f.current&&a(f.current))},onMouseLeave:e=>{if(!d){var t;let l=e.relatedTarget;(null==(t=f.current)?void 0:t.contains(l))||(v(!1),a(null))}},ref:f,role:"menuitem",tabIndex:0},k?(0,n.jsx)(tM.Ph,{children:(e,t)=>(0,n.jsxs)(s.Fragment,{children:[d&&x?I:T,(0,n.jsx)("button",{"aria-expanded":!!j,className:"".concat(m?im().subNavChevron:""," ").concat(im().subNavButton),onClick:w,type:"button",children:(0,n.jsx)("span",{className:"visuallyhidden",children:"Show submenu for ".concat(null==L?void 0:L.props.children)})}),(0,n.jsx)(iu,{offset:m?0:S,children:E})]},t(_))}):N)},ip=e=>{let t,l,{brandColor:a,children:r,className:i="",isGlobalNav:o=!1,label:c="Main Navigation",scrollable:d=!1}=e,{isMobile:m,isTablet:u}=(0,T.l)(),[,h]=(0,s.useState)(!1),[p,x]=(0,s.useState)({activeEl:null,offset:0,showNavArrows:!1,leftArrowDisabled:!1,rightArrowDisabled:!1,ulWidth:0}),f=(0,s.useRef)(p.activeEl),g=(0,s.useCallback)(e=>{f.current=e,x(t=>({...t,activeEl:e}))}
1,[]),[v,b]=(0,s.useState)(!1),y=d&&!o,j=(0,s.useRef)(null),w=(0,s.useRef)(null),N=!1;function _(){let e=j.current;if(e){let t=p.ulWidth===e.offsetWidth+e.scrollLeft;x(l=>({...l,leftArrowDisabled:0===e.scrollLeft,rightArrowDisabled:t}))}}function k(){let e=j.current;e&&(e.scrollLeft-=100,_())}function C(){let e=j.current;e&&(e.scrollLeft+=100,_())}function S(e){let t=e.target.closest("li");if(!t||f.current===t)return void g(null);g(t)}(0,s.useEffect)(()=>{function e(){if(!y)return;let e=j.current,t=w.current;if(e&&t){let l=0;Array.from(e.children).forEach(e=>{l+=e.offsetWidth}),x(n=>({...n,ulWidth:l,showNavArrows:l>t.offsetWidth,leftArrowDisabled:0===e.scrollLeft,rightArrowDisabled:l===e.offsetWidth+e.scrollLeft}))}}return e(),window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}},[j,w,y]);let L=s.Children.toArray(r).map(e=>{var t;let l;if((0,s.isValidElement)(e)){let{id:t}=e.props;l=e.key||(t?String(t):Math.random().toString(36))}else l=Math.random().toString(36);return(0,n.jsx)(ih,{activeEl:p.activeEl,brandColor:a,handleClick:S,isMobileMenu:m||u,item:e,openByDefault:!1,openSubNavOnLinkClick:!1,parentOffsetX:null==(t=j.current)?void 0:t.scrollLeft,setActiveEl:g,setIsMobileNavOpen:h},l)}),I=(0,s.useCallback)(e=>{if(m||u)return;let t=e.target,l=w.current;l&&!l.contains(t)&&(b(!1),g(null),window.removeEventListener("mousemove",I))},[m,u,g]);return(0,n.jsxs)("nav",{"aria-label":c,className:"".concat(im().nav," ").concat(i," container-wide ").concat("Main Navigation"===c?"h-max max-h-3/4 overflow-y-scroll pb-20 pt-4":""," lg:h-auto lg:max-h-screen lg:overflow-y-auto lg:pb-0 lg:pt-0 ").concat(y?"items-center lg:flex":""),onBlur:()=>{b(!1),g(null),window.removeEventListener("mousemove",I)},onFocus:()=>{m||u&&o||v||(b(!0),window.addEventListener("mousemove",I))},onMouseLeave:()=>{m||u||(b(!1),g(null))},onMouseOver:()=>{m||u&&o||v||(b(!0),window.addEventListener("mousemove",I))},ref:w,children:[(0,n.jsx)("ul",{className:"text-sm font-medium text-blue-900 lg:flex ".concat(y?"no-scrollbar overflow-x-auto":""),onMouseDown:function(e){j.current&&(N=!0,t=e.pageX-j.current.offsetLeft,l=j.current.scrollLeft)},onMouseLeave:function(){N=!1,_()},onMouseMove:function(e){if(!N)return;e.preventDefault();let n=j.current;if(n){let a=e.pageX-n.offsetLeft-t;n.scrollLeft=l-a}},onMouseUp:function(){N=!1,_()},ref:j,role:"presentation",children:L}),y&&p.showNavArrows?(0,n.jsxs)("div",{className:"ml-6 hidden shrink-0 lg:flex",children:[(0,n.jsx)("button",{"aria-label":"Scroll Left",className:"mr-2 ".concat(p.leftArrowDisabled?"pointer-events-none text-gray-400":"cursor-pointer text-gray-600 hover:text-theme-main"),onClick:k,onKeyUp:e=>{"Enter"===e.key&&k()},type:"button",children:(0,n.jsx)("svg",{className:"w-3 fill-current",viewBox:"0 0 8 16",children:(0,n.jsx)("path",{d:"M8,16,0,8,8,0Z"})})}),(0,n.jsx)("button",{"aria-label":"Scroll Right",className:p.rightArrowDisabled?"pointer-events-none text-gray-400":"cursor-pointer text-gray-600 hover:text-theme-main",onClick:C,onKeyUp:e=>{"Enter"===e.key&&C()},type:"button",children:(0,n.jsx)("svg",{className:"w-3 fill-current",viewBox:"0 0 8 16",children:(0,n.jsx)("path",{d:"M0,0,8,8,0,16Z"})})})]}):null]})};ip.SubNav=iu;let ix=e=>{let t,{className:l="",navItems:a=[],children:r=null,logoSrc:o,logoAlt:c,logoUrl:d,logoClick:m,brandColor:u="",locale:h=""}=e,[p,x]=(0,s.useState)(null),[g,b]=(0,s.useState)(!1),y=()=>{b(e=>!e)};return(0,s.useEffect)(()=>{var e;if(0===a.length)return;let t=(null==(e=document.querySelector("#sticky-nav"))?void 0:e.offsetHeight)||0,l=e=>{e.preventDefault();let l=e.currentTarget;if(!l)return;let n=l.getAttribute("href");if(n){let l=n.startsWith("#"),a=n.startsWith("/");l&&e.preventDefault();let s=document.querySelector("#sticky-nav a[href]");s&&im().active&&s.classList.remove(im().active);let r=l?n.substring(1):null,i=l&&r?document.getElementById(r):null;i&&(x(r),window.scroll({behavior:"smooth",top:i.offsetTop-(t||0)+1})),a&&(window.location.href=n),y()}};document.querySelectorAll('#sticky-nav a[href^="#"], #sticky-nav a[href^="/"]').forEach(e=>{e.addEventListener("click",l)});let n=[a.filter(e=>e.id.startsWith("#")).map(e=>e.id).join(","),a.filter(e=>e.id.startsWith("/")).map(e=>
1'[href="'.concat(e.id,'"]')).join(",")].filter(Boolean).join(",");if(n){let e=[...document.querySelectorAll(n)].map(e=>({sectionHeight:e.offsetHeight,sectionId:e.getAttribute("id"),sectionTop:e.getBoundingClientRect().top+window.pageYOffset-t})),l=()=>{let l=window.pageYOffset;e.forEach(e=>{l>=e.sectionTop-1.25*t&&x(e.sectionId)})};return window.addEventListener("scroll",l,{passive:!0}),()=>{window.removeEventListener("scroll",l)}}},[a]),(0,s.useEffect)(()=>{let e=()=>{b(g&&!1)};return window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}},[g]),(0,s.useEffect)(()=>{x(null)},[]),t=h?"#"===d?"":"/".concat(h).concat(d):"#"===d?"":d,(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("div",{className:"md:flex md:items-center",children:(0,n.jsxs)("div",{className:"md:flex md:items-center",children:[(0,n.jsxs)("div",{className:"flex shrink-0 justify-between py-2 md:mr-2 md:p-0",children:[o?(0,n.jsx)("a",{className:"shrink-0 md:inline ",href:t,onClick:m,children:(0,n.jsx)("div",{className:"h-8 w-auto max-w-[200px] overflow-hidden",children:(0,n.jsx)(f(),{alt:c||"Logo",className:"h-full w-auto object-contain",height:200,loader:v.L,src:o,width:200})})}):null,(0,n.jsxs)("div",{className:"flex items-center md:invisible md:hidden",children:[(0,n.jsx)("div",{className:"mx-2 text-sm",children:(()=>{var e,t;return p&&null!=(t=null==(e=a.find(e=>e.id===p))?void 0:e.title)?t:""})()}),(0,n.jsx)("button",{"aria-expanded":g,onClick:y,type:"button",children:(0,n.jsx)("div",{className:"flex items-center",children:(0,n.jsx)("svg",{className:(0,i.$)("shrink-0","stroke-current",im().onPageNavStyles,g?"rotate-180":""),height:"20",viewBox:"0 0 17.1 10.7",width:"20",children:(0,n.jsx)("path",{d:"M1.9,1.9l6.6,6.2l6.7-6.2",fill:"none",strokeLinecap:"round",strokeWidth:"4"})})})})]})]}),(0,n.jsx)("div",{className:(0,i.$)(g?"":"invisible hidden md:visible md:!flex"),children:(0,n.jsx)(ip,{brandColor:u,className:(0,i.$)("navigation flex-1",l),label:"Secondary Navigation",children:a.map(e=>(0,n.jsx)("li",{...{selected:e.id===p},children:(0,n.jsx)("a",{href:e.id.startsWith("/")?"/".concat(h).concat(e.id):"#".concat(e.id.toLowerCase()),target:"_self",children:e.title})},e.id))})})]})}),(0,n.jsx)("div",{className:(0,i.$)(g?"":"invisible hidden md:visible md:!flex"),children:r})]})},ig=e=>{var t,l;let{secondaryHeaderConfig:r,pageConfigColor:i,className:o,...c}=e,{locale:d="",push:m}=(0,a.useRouter)(),u=null==(t=r.elements.image[0])?void 0:t.description;return(0,n.jsx)("header",{className:"transition-out fixed max-h-3/4 w-full overflow-y-auto bg-white md:static md:py-2","data-kontent-item-id":r.system.id,"data-secondary-header":!0,children:(0,n.jsx)("div",{className:"container-wide md:flex md:items-center md:justify-between",children:(0,n.jsx)(ix,{brandColor:i,className:o||"","data-kontent-element-codename":"on_page_nav",locale:d,logoAlt:u,logoClick:()=>{m(r.elements.imageClickUrl||"#")},logoSrc:null==(l=r.elements.image[0])?void 0:l.url,logoUrl:r.elements.imageClickUrl||"#",navItems:r.elements.links.map(e=>({id:e.elements.url,title:e.elements.text})),children:(0,n.jsxs)("div",{className:"flex flex-shrink flex-row gap-[5px] md:flex-shrink-0 md:items-center lg:gap-0",children:[r.elements.buttons.map(e=>"cta_button"===e.system.type?(0,s.createElement)(X,{...c,block:e,className:"mx-1 my-2 flex !px-6 !py-2 text-sm md:my-0 md:ml-4 md:flex-shrink-0",ctaButtonOrigin:r.system.type,key:e.system.id,variant:i}):(0,n.jsx)("div",{className:"mx-1 my-2 flex items-center md:my-0 md:ml-4 md:flex-shrink-0 [&>div]:my-0 md:[&>div]:my-0 [&_.swn-tag-wtb-btn]:mt-0","data-kontent-item-id":e.system.id,children:(0,n.jsx)(e6,{...c,block:e})},e.system.id)),r.elements.clickToBuySingleProduct[0]?(0,n.jsx)(e1,{...c,block:r.elements.clickToBuySingleProduct[0]}):null,r.elements.multiProductClickToBuy[0]?(0,n.jsx)(eJ,{...c,block:r.elements.multiProductClickToBuy[0]}):null]})})})})},iv=e=>{let{accountIcon:t,greetingText:l,navLinks:s}=e,r=(0,es.As)(),i=(0,a.useRouter)(),{firstName:o,lastName:c,salutation:d}=r.userDetails,m=function(e){let{greetingMsg:t,firstname:n,lastname:a,praisalution:s}=e;return l?t.includes("{{lastName}}")&&d&&c?t.replace(/{{firstname}}/gi,"").replace(/{{lastName}}/gi,"".concat(s," ").concat(a)):t.replace(/{{firstname}}/gi,null!=n?n:"").replace(/{{lastname}}/gi,null!=a?a:""):""}({greetingMsg:l,firstname:o,lastname:c,praisalution:d});return(0,n.jsxs)("div",{className:"account-dropdown","data-clarity-mask":"true",children:[(0,n.jsxs)("button",{type:"button",children:[t[0]?t.map(e=>{var t,l,a;
1return(0,n.jsx)(S,{className:"h-8 w-8",noBackground:!0,noBorder:!0,children:(0,n.jsx)(f(),{alt:null!=(a=null==(t=e.elements.icon[0])?void 0:t.description)?a:"",className:"h-8 w-8",height:32,loader:v.L,src:(null==(l=e.elements.icon[0])?void 0:l.url)||"",width:32})},e.system.id)}):null,(0,n.jsx)("span",{children:m})]}),(0,n.jsx)("div",{className:"nav-link-container",children:(0,n.jsx)("ul",{children:s.map(e=>(0,n.jsx)("li",{children:(0,n.jsx)(B(),{className:"inline-block w-full cursor-pointer py-3",href:e.elements.url,onClick:()=>{var t;(null==(t=e.elements.logoutUser[0])?void 0:t.codename)==="yes"&&(0,es.ri)(i,e.elements.url||"/")},passHref:!0,children:e.elements.text})},e.system.id))})})]})},ib=(e,t)=>e.filter(e=>{let l=t.checkAppPermission(e),n=t.checkUserRole(e);return l||n}).map(e=>({...e,elements:{...e.elements,sublinks:e.elements.sublinks.length>0?ib(e.elements.sublinks,t):[]}}));function iy(e,t){return e.map(e=>{var l;return{...e,elements:{...e.elements,url:null!=(l=((e,t)=>{if(e)return $(e,t)})(e.elements.url||"",t))?l:"",sublinks:iy(e.elements.sublinks,t)}}})}let ij=e=>{var t,l,s,r;let i=(0,es.As)(),{locale:o=""}=(0,a.useRouter)(),c=iy(null!=(r=null==(l=ib(null!=(s=null==(t=e.myAccountWrapper)?void 0:t.elements.accountNavLinks)?s:[],i)[0])?void 0:l.elements.sublinks)?r:[],o);return i.authenticated?(0,n.jsx)(n.Fragment,{children:e.myAccountWrapper?(0,n.jsx)(iv,{accountIcon:e.myAccountWrapper.elements.accountIcon,greetingText:e.myAccountWrapper.elements.greetingText,navLinks:c}):null}):(0,n.jsx)(n.Fragment,{children:e.buttonLinks.length>0&&e.buttonLinks.map(t=>{var l,a;return(0,n.jsx)("div",{className:"flex-1 md:flex-none","data-kontent-item-id":t.system.id,children:(0,n.jsx)(B(),{href:$(t.elements.url,o),legacyBehavior:!0,passHref:!0,children:(0,n.jsx)(H.$,{as:"a",className:"w-full text-sm","data-kontent-element-codename":"text",icon:t.elements.url.includes("http")?P.v.External:null,onClick:()=>{(0,b.d)({event:"cta_click",cta_name:t.elements.text,cta_category:"CTA_Button"})},padding:null!=(l=e.className)?l:"py-1 px-6",variant:null!=(a=e.variant)?a:"primary",children:t.elements.text})})},t.system.id)})})},iw=e=>{let{showSearch:t,toggleSearchPopup:l,searchAccessibilityText:a}=e;return(0,n.jsx)(n.Fragment,{children:t?(0,n.jsx)(w,{as:"button",className:"ml-4 border border-white",icon:P.v.Search,onClick:l,size:"sm",title:a,variant:"primary"}):void 0})},iN=e=>{var t,l;let{globalConfig:a,headerState:r,setHeaderState:i,toggleSearchPopup:o}=e,c=a.elements.headerConfig[0];if((0,s.useEffect)(()=>{if(!r.navVisible||window.matchMedia("(min-width: 1024px)").matches)return;let e=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=e}},[r.navVisible]),(0,s.useEffect)(()=>{let e=window.matchMedia("(min-width: 1024px)"),t=e=>{e.matches&&i(e=>({...e,navVisible:!1}))};return e.addEventListener("change",t),()=>{e.removeEventListener("change",t)}},[i]),!c)return(0,n.jsx)(n.Fragment,{});let d=!!c.elements.links.length,m=c.elements.secondaryHeaderConfig[0],u=!!(null==m?void 0:m.elements.links.length);return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsxs)("div",{className:"flex flex-row lg:!invisible lg:!hidden","data-testid":"search-button",children:[(0,n.jsx)(iw,{searchAccessibilityText:c.elements.searchAccessibilityText,showSearch:(null==(t=c.elements.showSearch[0])?void 0:t.codename)==="yes",toggleSearchPopup:o}),d||u?(0,n.jsx)(w,{as:"button",className:"ml-4 border border-white",icon:r.navVisible?P.v.Close:P.v.Nav,onClick:()=>{i(e=>({...e,navVisible:!e.navVisible}))},size:"sm"}):null]}),(0,n.jsxs)("div",{className:"invisible hidden lg:!visible lg:!flex","data-testid":"search-button",children:[(0,n.jsx)("div",{className:"flex gap-4",children:(0,n.jsx)(ij,{buttonLinks:c.elements.buttonLinks,loginUrl:a.elements.loginUrl,myAccountWrapper:c.elements.myAccountWrapperParent[0],variant:"inverted"})}),(0,n.jsx)(iw,{searchAccessibilityText:c.elements.searchAccessibilityText,showSearch:(null==(l=c.elements.showSearch[0])?void 0:l.codename)==="yes",toggleSearchPopup:o})]})]})};var i_=l(5058);let ik=e=>{let{className:t="",pinned:l=!1,brandLogo:a=null,logoHrefUrl:r="https://www.elanco.com/",logoHrefInNewWindow:o=!1,logo:c=null,mobileLogo:d=null,mainBorderColor:m="black",extraLogoContent:u=null,nonNavItems:h=null,navItems:p=null}=e,{isMobile:x,isTablet:f}=(0,T.l)(),g=l&&(!(x||f)||0===s.Children.count(p)),v=(0,n.jsxs)("svg",{className:"mr-4 w-16 fill-current text-primary",height:"31.73",viewBox:"0 0 637.38 316.17",width:"64",children:[(0,n.jsx)("title",{children:"Elanco Logo"}),(0,n.jsxs)("g",{children:[(0,n.jsx)("polygon",{points:"617.07 226.46 620.37 226.46 620.37 235.29 621.86 235.29 621.86 226.46 625.15 226.46 625.15 225.11 617.07 225.11 617.07 226.46"}),(0,n.jsx)("polygon",{points:"628.83 235.29 628.83 226.09 628.9 226.09 631.7 235.29 632.91 235.29 635.79 226.09 635.85 226.09 635.85 235.29 637.35 235.29 637.35 225.11 634.66 225.11 632.42 232.67 632.35 232.67 629.94 225.11 627.33 225.11 627.33 235.29 628.83 235.29"}),(0,n.jsx)("path",{d:"M422.66,164.28c-11.55,0-16.36,34.64-16.36,40.42,0,5.14,1.77,7.54,6.25,7.54,11.56,0,16.37-34.81,16.37-40.42S426.84,164.28,422.66,164.28Z"}),(0,n.jsx)("path",{d:"M0,111.88,36.6,316.17l600.78-106.3V0ZM106.51,229.72H39.46L63.2,117.91h65l-7.06,23.58H86.94l-4,18.77h27.92L106,183H78.12l-4.81,22.79h38.34Zm29.68,2.09c-23.58,0-21.5-12.18-18-28.71l12-56.47c4.16-19.25,4.49-25.34,4.33-30l29-4.81c.32,4-.64,12.51-2.4,20.69L148.07,194c-3.06,14.6-3.38,18.46,2.88,18.46a10.85,10.85,0,0,0,3-.49l.81,17.33C150.79,230.69,143.89,231.81,136.19,231.81Zm71.91,1.13c-3.37-1.77-5.7
17-6.74-6.25-9.79-3.7,3.85-11.88,9.15-21.5,9.15-16.85,0-23.91-10.6-23.91-28.24s7.06-35.93,17.81-46.68c9.47-9.47,19.58-12.52,34.17-12.52,11.39,0,25.51,1.93,31.6,5-2.4,5.77-4.81,15.71-6.25,22.62l-6.25,29.84c-.65,2.72-.49,8.5,3.2,12.51ZM276,229.72l11.23-52.93c1.44-6.42.64-9.31-4-9.31-4.49,0-8,2.25-11.55,7.71l-11.71,54.53H232l11.07-52.13c2.57-12.51,3.53-19.89,2.25-28.08l24.7-4.65a47.23,47.23,0,0,1,1.45,9c6.41-5.6,16-9,25.18-9,20.69,0,22.79,11.72,20.22,23.75l-13,61.11Zm68.66,2.09c-23.1,0-34.33-14.76-28.39-42.67,5.93-28.08,22.94-44.28,47.32-44.28,11.87,0,18.29,3,25,9.79l-16.37,16.84c-2.4-3.36-6.58-6.09-10.42-6.09-6.42,0-11.23,5.13-14.76,22s-3.21,23.74,4.81,23.74c6.25,0,12-3.05,16.69-7.38l8.34,16.36A49.84,49.84,0,0,1,344.62,231.81Zm63.12,0c-19.57,0-30.64-10.75-30.64-29.84,0-21.33,11.56-57.1,50.7-57.1,17.32,0,30.64,8.5,30.64,29.35C458.44,195.88,446.41,231.81,407.74,231.81Z"}),(0,n.jsx)("path",{d:"M194,170.06c-5.93,6.89-9.46,23.09-9.46,33.36,0,5.61,1.6,8,5.45,8,3.37,0,9.15-5.77,9.79-8.49l7.7-36.26a5.68,5.68,0,0,0-3.37-1.13A11.77,11.77,0,0,0,194,170.06Z"})]})]}),b=null!=c?c:v,y=null!=d?d:v;return(0,n.jsxs)("div",{className:(0,i.$)(t,"bg-main text-black",!g&&"border-b border-gray-400 lg:border-b-0 lg:pb-0 lg:pt-3","relative z-100 transition-all duration-200 ease-out"),children:[(0,n.jsxs)("div",{className:(0,i.$)("mx-auto mt-2 flex items-center justify-between border-b-6 px-4 pb-2 lg:mt-0 lg:px-8",i_.b[m]),children:[(0,n.jsxs)("div",{className:"items-top flex",children:[(0,n.jsx)(B(),{href:r,rel:"noopener",target:o?"_blank":void 0,children:x||f?y:b}),x?a:null,u]}),(0,n.jsx)("div",{className:"flex flex-grow justify-end",children:h})]}),p]})},iC=e=>{let{className:t="",children:l}=e;return(0,n.jsx)("div",{className:(0,i.$)("fixed h-[calc(100vh-138px)] w-full border-b bg-white transition-all duration-200 ease-out lg:static lg:h-auto lg:max-h-3/4 lg:overflow-y-auto",t),children:l})},iS=e=>{let{children:t=null,className:l="",horizontal:a=!1,isMobile:r=!1,title:i=null}=e;return(0,n.jsxs)("div",{className:l,children:[i?(0,s.cloneElement)(i,{className:"".concat(i.props.className||""," subhead")}):null,(0,n.jsx)("ul",{className:"text-sm  ".concat(i&&"mt-3"," ").concat(a?"md:flex":""," ").concat(r&&"grid grid-cols-2"),style:{gap:"6px"},children:null==t?void 0:t.map((e,t)=>{var l;return(0,n.jsx)("li",{className:a?"mr-6":"mb-2",children:e},null!=(l=e.key)?l:t)})})]})},iL=e=>{var t;let{kProps:l,isTopLevel:s=!1}=e,r=(0,a.useRouter)(),i=(null==(t=l.elements.logoutUser[0])?void 0:t.codename)==="yes",o=(0,n.jsxs)("a",{className:"".concat(s?"md:w-full w-11/12":"w-full"," ").concat(l.elements.icon.length?"items-center justify-between":""," ").concat(l.elements.url?"":"cursor-default"),"data-kontent-element-codename":"text","data-kontent-item-id":l.system.id,onClick:e=>{(e=>{if(i)return(0,es.ri)(r,l.elements.url||"/");(t=>{var l;(0,b.d)({event:s?"header_nav_click":"menu_nav_click",element_text:t.elements.text,element_id:t.system.id}),(null==(l=t.elements.openInNewTab[0])?void 0:l.codename)==="yes"?(null==e||e.preventDefault(),window.open(t.elements.url,"_blank")):r.push(t.elements.url)})(l)})(e)},style:{display:l.elements.icon.length?"flex":"inline-block",paddingTop:"12px",paddingBottom:"12px"},children:[l.elements.text,!!l.elements.icon.length&&l.elements.icon.map(e=>{var t,l,a;let s=null==(t=e.elements.icon[0])?void 0:t.url;return s?(0,n.jsx)(S,{noBorder:!0,size:"xs",children:(0,n.jsx)("div",{className:"relative w-full",children:(0,n.jsx)(f(),{alt:null!=(a=null==(l=e.elements.icon[0])?void 0:l.description)?a:"",className:"w-full object-contain","data-kontent-element-codename":"icon",height:17,loader:v.L,src:s,width:50})})},s):null})]});return(0,n.jsx)("div",{children:l.elements.url?(0,n.jsx)(B(),{href:l.elements.url,legacyBehavior:!0,prefetch:!1,children:o}):(0,n.jsx)("span",{children:o})})},iT=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return e.concat(t).map((e,t)=>{var l;return(0,n.jsxs)("li",{className:"flex flex-col lg:flex-row","data-open-by-default":(null==(l=e.elements.openByDefault[0])?void 0:l.codename)==="yes",style:{paddingLeft:t?void 0:"0",paddingTop:"0",paddingBottom:"0"}
1,children:[iL({kProps:e,isTopLevel:!0}),e.elements.sublinks.length>0&&(0,n.jsx)(ip.SubNav,{children:e.elements.sublinks.map(e=>{let t=!!e.elements.icon.length;return(0,n.jsxs)("li",{className:t?"space-between flex flex-row":void 0,children:[iL({kProps:e}),e.elements.sublinks.length>0&&(0,n.jsx)(ip.SubNav,{children:e.elements.sublinks.map(e=>{let t=!!e.elements.icon.length;return(0,n.jsxs)("li",{className:t?"space-between flex flex-row":void 0,children:[iL({kProps:e}),!!e.elements.sublinks.length&&(0,n.jsx)(ip.SubNav,{children:e.elements.sublinks.map(e=>(0,n.jsx)("li",{children:iL({kProps:e})},e.system.id))})]},e.system.id)})})]},e.system.id)})})]},e.system.id)})},iI=e=>{let{src:t,alt:l="",href:a,kItemId:s,kCodename:r,className:i}=e,o=()=>(0,n.jsx)(f(),{alt:l,className:"h-8 ".concat(null!=i?i:""),"data-kontent-element-codename":null!=r?r:"image",height:32,loader:v.L,src:t,width:32});return a?(0,n.jsx)("a",{"data-kontent-item-id":null!=s?s:"",href:a,children:(0,n.jsx)(o,{})}):(0,n.jsx)("a",{"aria-label":l,href:"#",children:(0,n.jsx)(o,{})})},iE=e=>{let{className:t="",buttonClassName:l="",itemClassName:a="",listContainerClassName:r="",customDropdownIcon:i="",itemTitleClassName:o="",dropdownLabel:c="Product Selector",defaultSelectText:d="Select a product",dropdownData:m,onChange:u=()=>{}}=e,h=0,p=(0,s.createRef)(),x=(0,s.createRef)(),f=(0,s.createRef)(),[g,v]=(0,s.useState)({text:d,option:null}),b=e=>{let t=p.current,l=m.find(t=>t.id===e);l&&(v({text:l.title,option:l}),u(l)),null==t||t.classList.remove("block"),null==t||t.classList.add("hidden")},y=()=>{clearTimeout(h)},j=()=>{h=setTimeout(()=>{let e=p.current;null!==e&&e.classList.contains("block")&&(e.contains(document.activeElement)||(e.classList.remove("block"),e.classList.add("hidden")))},0)},w=e=>{if("Escape"===e.key){var t;let e=p.current;null!==e&&e.classList.contains("block")&&(e.classList.remove("block"),e.classList.add("hidden"),null==(t=x.current)||t.focus())}};return(0,s.useEffect)(()=>{let e=f.current;if(null!==e)return document.addEventListener("keydown",w),e.addEventListener("focus",y,!0),e.addEventListener("blur",j,!0),()=>{e.removeEventListener("focus",y,!0),e.removeEventListener("blur",j,!0),document.removeEventListener("keydown",w)}}),(0,n.jsxs)("div",{className:"relative ".concat(t),ref:f,children:[(0,n.jsx)("span",{className:"label-text top",children:c}),(0,n.jsx)("button",{className:"dropdown dropdown-blue-icon ".concat(l),onClick:()=>{let e=p.current;e&&(e.classList.contains("block")?(e.classList.remove("block"),e.classList.add("hidden")):(e.classList.remove("hidden"),e.classList.add("block"),e.focus()))},ref:x,type:"button",children:g.text}),i||(0,n.jsxs)("svg",{"aria-hidden":"true",className:"pointer-events-none",focusable:"false",height:"46",viewBox:"0 0 48 48",width:"46",xmlns:"http://www.w3.org/2000/svg",children:[(0,n.jsx)("rect",{fill:"",height:"48",rx:"24",width:"48"}),(0,n.jsx)("path",{d:"M7,10,18.426,21.426,29.853,10Z",fill:"#fff",fillRule:"evenodd",transform:"translate(5.574 10.287)"})]}),(0,n.jsx)("ul",{className:"absolute left-0 hidden max-h-3/4 w-full overflow-y-auto border border-gray-500 [&>li]:overflow-hidden [&>li]:border-b [&>li]:border-gray-500 [&>li]:bg-white [&>li]:last:border-0 ".concat(r),onFocus:function(){let e=p.current,t=null==e?void 0:e.querySelector('[role="option"]'),l=null==e?void 0:e.querySelector('[aria-selected="true"]');l?l.focus():(null==t||t.setAttribute("aria-selected","true"),null==t||t.focus())},ref:p,role:"listbox",tabIndex:-1,children:m.map(e=>{var t,l;return(0,n.jsxs)("li",{"aria-selected":e.id===(null==(t=g.option)?void 0:t.id),className:"flex cursor-pointer items-center p-4 hover:bg-gray-300 focus:bg-gray-300 ".concat(a),"data-id":e.id,onClick:()=>{b(e.id)},onKeyDown:t=>{((e,t)=>{let l=p.current,n=null==l?void 0:l.querySelector('[aria-selected="true"]'),a=null==n?void 0:n.previousElementSibling,s=null==n?void 0:n.nextElementSibling;switch(e.key){case"ArrowUp":n&&a&&(n.setAttribute("aria-selected","false"),a.setAttribute("aria-selected","true"),a.focus());break;case"ArrowDown":n&&s&&(n.setAttribute("aria-selected","false"),s.setAttribute("aria-selected","true"),s.focus());break;case"Enter":b(t)}})(t,e.id)}
1,role:"option",tabIndex:-1,children:[(0,s.cloneElement)(e.image,{className:null!=(l=e.image.props.className)?l:"w-16"}),(0,n.jsx)("span",{className:o||"pl-6 text-xl",children:e.title})]},e.id)})})]})},iA=e=>{var t,l,r,o,c,d,m,u,h,p,x,g;let{page:b,headerState:y,globalConfig:j,setHeaderState:w,toggleSearchPopup:N}=e,_=b.elements.headerConfig[0]?b.elements.headerConfig[0]:j.elements.headerConfig[0],{colorId:k}=G({pageConfig:_,fallbackColorId:"black"}),C=(0,es.As)(),S=(0,a.useRouter)();(0,s.useEffect)(()=>{let e=()=>{w({...y,navVisible:!1})};return S.events.on("routeChangeStart",e),()=>{S.events.off("routeChangeStart",e)}},[y,S.events,w]);let{isMobile:L,isTablet:I}=(0,T.l)();if(!_)return(0,n.jsx)(n.Fragment,{});let E=_.elements.secondaryHeaderConfig[0],{navFixed:A,navVisible:F}=y,B=!!_.elements.links.length,M=!!(null==E?void 0:E.elements.links.length),D=!!_.elements.dropdownHeaderMenu.length,R=!!_.elements.optionalHeaderLinks.length,q=B||L&&M||I&&M,z=C.authenticated?_.elements.loggedInCtaButton:_.elements.buttonLinks,O=_.elements.dropdownHeaderMenu.map(e=>{var t,l,a;return{id:e.system.id,title:e.elements.text,url:e.elements.url,image:(null==(t=e.elements.icon[0])?void 0:t.elements.icon[0])?(0,n.jsx)(f(),{alt:e.elements.text,className:"ml-4 h-8 w-8",height:32,loader:v.L,src:null==(a=e.elements.icon[0])||null==(l=a.elements.icon[0])?void 0:l.url,width:32}):(0,n.jsx)("span",{})}}),U=O.find(e=>e.url===S.asPath),$=(null!=(o=null==U?void 0:U.title.length)?o:0)>=12,H=(e,t,l)=>(0,s.cloneElement)(e,{key:t,className:(0,i.$)(l,"block fill-current overflow-visible"),focusable:!1}),V=ib(null!=(c=null==(t=_.elements.myAccountWrapperParent[0])?void 0:t.elements.accountNavLinks)?c:[],C),Z=ib(_.elements.authenticatedLinks,C),W=iy(V,null!=(d=S.locale)?d:""),K=iy(Z.filter(e=>C.checkUserRoleForBlock(e)),null!=(m=S.locale)?m:""),Y=C.authenticated&&(L||I)&&W,Q=!!E;return(0,n.jsx)(ik,{brandLogo:!Q&&(null==E?void 0:E.elements.image[0])?(0,n.jsx)(iI,{alt:null!=(u=E.elements.image[0].description)?u:void 0,href:E.elements.imageClickUrl,kItemId:E.system.id,src:E.elements.image[0].url}):null,extraLogoContent:(0,n.jsxs)(n.Fragment,{children:[D?(0,n.jsx)(iE,{buttonClassName:"p-1 pr-16 border-primary pl-2",className:(0,i.$)($?"":"w-44","z-10 mx-6 hidden md:block"),customDropdownIcon:(0,n.jsx)("svg",{className:"bottom-0 right-0 top-[8px] w-[10px]",clipRule:"evenodd",fillRule:"evenodd",imageRendering:"optimizeQuality",shapeRendering:"geometricPrecision",style:{width:10,top:8,bottom:0,right:0},textRendering:"geometricPrecision",viewBox:"0 0 512 336.36",xmlns:"http://www.w3.org/2000/svg",children:(0,n.jsx)("path",{d:"M42.47.01 469.5 0C492.96 0 512 19.04 512 42.5c0 11.07-4.23 21.15-11.17 28.72L294.18 320.97c-14.93 18.06-41.7 20.58-59.76 5.65-1.8-1.49-3.46-3.12-4.97-4.83L10.43 70.39C-4.97 52.71-3.1 25.86 14.58 10.47 22.63 3.46 32.57.02 42.47.01z",fill:"black",fillRule:"nonzero"})}),defaultSelectText:null!=(h=null==U?void 0:U.title)?h:null==(l=_.elements.dropdownHeaderMenu[0])?void 0:l.elements.text,dropdownData:O,dropdownLabel:"",itemClassName:"w-full flex-row-reverse justify-between py-1 px-2",itemTitleClassName:"text-base",listContainerClassName:"",onChange:e=>{var t;window.location.href="/".concat(null!=(t=S.locale)?t:"").concat(e.url)}}):null,R?(0,n.jsx)(iS,{className:"hidden items-center capitalize underline md:flex ".concat(D||"lg:pl-6"),horizontal:!0,children:_.elements.optionalHeaderLinks.map((e,t)=>{var l;return(0,n.jsxs)("div",{className:"w-content flex flex-row items-center justify-center",children:[(0,n.jsx)(lp,{block:e}),(0,n.jsx)("div",{className:"pl-2 text-black",children:H(P.v[null==(l=e.elements.icon[0])?void 0:l.name].icon,t,"w-3 h-3")})]},e.system.id)})}):null]}),logo:_.elements.image[0]?(0,n.jsx)(f(),{alt:null!=(p=_.elements.image[0].description)?p:"",className:"h-8",height:32,loader:v.L,src:_.elements.image[0].url,style:{width:"auto"},width:212}):null,logoHrefUrl:_.elements.imageClickUrl,mainBorderColor:k&&k in i_.b?k:"black",mobileLogo:_.elements.mobileImage[0]?(0,n.jsx)(f(),{alt:null!=(x=_.elements.mobileImage[0].description)?x:"",className:"mr-2 h-8",height:32,loader:v.L,src:_.elements.mobileImage[0].url,style:{width:"auto"},width:200}):null,navItems:q?(0,n.jsx)(iC,{className:(0,i.$)({"invisible hidden":!F,"lg:!visible lg:!block":!0}),children:(0,n.jsxs)("div",{className:"h-screen w-full border-b border-solid bg-gray-100 lg:flex lg:h-auto lg:items-center lg:justify-start lg:bg-transparent",children:[(0,n.jsx)("div",{className:"container-wide flex justify-between gap-4 lg:!invisible lg:!hidden",children:(0,n.jsx)(ij,{buttonLinks:z,className:"my-2 flex-shrink-0 px-6 py-2",loginUrl:j.elements.loginUrl})}),D?(0,n.jsx)(iE,{buttonClassName:(0,i.$)("p-2 pr-16 pl-2 border-primary",C.authenticated?"my-2":"mb-2"),className:"container-wide z-10 block lg:!invisible lg:!hidden",customDropdownIcon:(0,n.jsx)("svg",{className:"!bottom-0 !right-0 !top-[14px] !w-[10px]",clipRule:"evenodd",fillRule:"evenodd",imageRendering:"optimizeQuality",shapeRendering:"geometricPrecision",style:{width:10,top:14,bottom:0,right:0},textRendering:"geometricPrecision",viewBox:"0 0 512 336.36",xmlns:"http://www.w3.org/2000/svg",children:(0,n.jsx)("path",{d:"M42.47.01 469.5 0C492.96 0 512 19.04 512 42.5c0 11.07-4.23 21.15-11.17 28.72L294.18 320.97c-14.93 18.06-41.7 20.58-59.76 5.65-1.8-1.49-3.46-3.12-4.97-4.83L10.43 70.39C-4.97 52.71-3.1 25.86 14.58 10.47 22.63 3.46 32.57.02 42.47.01z",fill:"black",fillRule:"nonzero"})}),defaultSelectText:null!=(g=null==U?void 0:U.title)?g:null==(r=_.elements.dropdownHeaderMenu[0])?void 0:r.elements.text,dropdownData:O,dropdownLabel:"",itemClassName:"w-full flex-row-reverse justify-between py-1 px-2",itemTitleClassName:"text-base",listContainerClassName:"",onChange:e=>{window.location.href="/".concat(S.locale,"/").concat(e.url)}}):null,(0,n.jsx)(ip,{isGlobalNav:!0,children:iT(C.authenticated&&_.elements.authenticatedLinks.length>0?K:_.elements.links,Y||[])}),(0,n.jsxs)("div",{className:"lg:!invisible lg:!hidden",children:[!Q&&(null==E?void 0:E.elements.links)?(0,n.jsx)(ip,{className:"mt-4",isGlobalNav:!0,label:"Product Navigation",children:iT(E.elements.links)}):null,(0,n.jsx)("div",{className:Q?"flex flex-shrink flex-col":"hidden",children:R?(0,n.jsx)("ul",{className:"container-wide flex flex-col items-center justify-between gap-1 capitalize",children:_.elements.optionalHeaderLinks.map((e,t)=>{var l;
1return(0,n.jsxs)("div",{className:"w-content btn my-2 inline-flex w-full flex-shrink-0 cursor-pointer flex-row items-center justify-center rounded-sm bg-theme-main px-6 py-2 align-middle text-sm hover:bg-theme-highlight focus:bg-secondary",children:[(0,n.jsx)(lp,{block:e,className:"font-bold text-white",globalConfig:j}),(0,n.jsx)("div",{className:"pl-2 text-white",children:H(P.v[null==(l=e.elements.icon[0])?void 0:l.name].icon,t,"w-4 h-4")})]},e.system.id)})}):null})]})]})}):null,nonNavItems:(0,n.jsx)(iN,{globalConfig:j,headerState:y,setHeaderState:w,toggleSearchPopup:N}),pinned:A})},iF=e=>{let{children:t,isSearchModalOpen:l,searchModal:a,hId:s}=e;return(0,n.jsxs)("div",{children:[l?a():null,(0,n.jsx)("header",{"data-kontent-item-id":s,children:t})]})},iB=e=>{let{globalConfig:t,page:l,...r}=e,i=t.elements.headerConfig[0],o=l.elements.headerConfig[0],c=null!=o?o:i,d=(0,T.l)(),[m,u]=(0,s.useState)({navFixed:!1,navVisible:!1}),[p,x]=(0,s.useState)(!0),{locale:f=""}=(0,a.useRouter)(),g=e=>{u(t=>({...t,navFixed:e.status>0}))};if((0,s.useEffect)(()=>{document.querySelector(".h-full.mt-12")?x(!1):x(!0)},[]),!c)return(0,n.jsx)(n.Fragment,{});let v=l.elements.config[0],b=c.elements.secondaryHeaderConfig[0],y=v&&"secondaryConfig"in v.elements?v.elements.secondaryConfig[0]:null,j=null!=y?y:b,w=v?(0,h.pP)(v):null;return(0,n.jsx)(io,{children:(e,a)=>{let{isMobile:s}=d,i=()=>(0,n.jsx)(iA,{globalConfig:t,headerState:m,page:l,setHeaderState:u,toggleSearchPopup:e}),o=()=>{var e,a;return(0,n.jsx)(n.Fragment,{children:(null==(e=t.elements.showBreadcrumbs[0])?void 0:e.codename)==="show"&&(null==(a=l.elements.snippetPageSeoHideBreadcrumbs[0])?void 0:a.codename)!=="hide"&&(0,n.jsx)(is,{page:l})})},h=()=>(0,n.jsx)(io.Modal,{action:"/".concat(f).concat(c.elements.searchUrl||"/search"),closeBtnText:c.elements.searchCloseText,searchPlaceholderText:c.elements.searchPlaceholder,togglePopup:e});return m.navVisible&&j&&s?(0,n.jsxs)(iF,{hId:c.system.id,isSearchModalOpen:a,searchModal:h,children:[(0,n.jsx)(tP.A,{innerZ:99,onStateChange:g,top:0,children:(0,n.jsxs)("div",{id:"sticky-nav",children:[i(),(0,n.jsx)(ii,{globalConfig:t,page:l,position:"top",...r})]})}),o(),(0,n.jsx)(ig,{...r,block:{elements:{authenticationGateComponentUserRoles:[]},system:j.system},className:"product-navigation",globalConfig:t,page:l,pageConfigColor:null!=w?w:void 0,secondaryHeaderConfig:j})]}):j?(0,n.jsxs)(iF,{hId:c.system.id,isSearchModalOpen:a,searchModal:h,children:[(0,n.jsxs)("div",{className:"h-auto",children:[i(),o()]}),(0,n.jsx)(tP.A,{innerZ:99,onStateChange:g,top:0,children:(0,n.jsxs)("div",{className:p?"pb-20 md:pb-0":"md:pb-0",id:"sticky-nav",children:[(0,n.jsx)(ii,{globalConfig:t,page:l,position:"top",...r}),(0,n.jsx)(ig,{...r,className:"product-navigation !w-full",globalConfig:t,page:l,pageConfigColor:null!=w?w:void 0,secondaryHeaderConfig:j})]})})]}):(0,n.jsxs)(iF,{hId:c.system.id,isSearchModalOpen:a,searchModal:h,children:[(0,n.jsx)(tP.A,{innerZ:99,top:0,children:(0,n.jsxs)("div",{id:"sticky-nav",children:[i(),(0,n.jsx)(ii,{globalConfig:t,page:l,position:"top",...r})]})}),o()]})}})},iM=e=>{var t;let{countryFlagIcon:l=[],countrySelectionPageUrl:a="",countryName:s="",isMobile:r=!1}=e;return(0,n.jsx)(n.Fragment,{children:l.length>0&&""!==a&&""!==s?(0,n.jsx)("div",{className:"".concat(r?"flex flex-row items-center justify-center pb-4":""," bg-white"),children:(0,n.jsxs)(B(),{className:"hover:text-blue-500",href:a,locale:!1,children:[(0,n.jsx)(f(),{alt:s,className:"inline",height:28,loader:v.L,src:(null==(t=l[0])?void 0:t.url)||"",width:28}),(0,n.jsx)("span",{className:"ml-2 text-sm underline",children:s})]})}):""})},iP=e=>(0,n.jsxs)("div",{children:[(0,n.jsx)("p",{className:"mt-4 pb-3 font-bold leading-tight",children:e.title}),(0,n.jsxs)("form",{action:"",className:"relative",children:[(0,n.jsxs)("label",{htmlFor:"sign-up",children:[(0,n.jsx)("span",{className:"visuallyhidden",children:e.title}),(0,n.jsx)("input",{className:"mb-0 border border-gray-500","data-clarity-mask":"true",id:"sign-up",pattern:"[a-z0-9._%+-]+@[a-z0-9.-]+\\.[a-z]{2,}$",placeholder:e.placeholder,type:"email"})]}),(0,n.jsx)(w,{as:"button",className:"absolute inset-y-0 right-0 my-auto mr-2",icon:P.v.Plane,iconSize:"w-6 h-6",type:"submit",children:e.buttonText})]})]});var iD=l(5840),iR=l.n(iD);let iq=e=>{let{activeCountryOption:t="",defaultSelectedValue:l="Select a country",dropdownLabel:a="Country selector",dropdownMenuClasses:r="",dropdownCountryData:i,onChange:o=null,children:c=null,className:d="",dropdownYOffset:m=58,showNextBtnText:u="Show next menu",showPrevBtnText:h="Show previous menu"}
1=e,p=(0,s.useRef)(!1),x=0,[f,g]=(0,s.useState)(0),[v,b]=(0,s.useState)("down"),[y,j]=(0,s.useState)(l),w=(0,s.createRef)(),N=(0,s.createRef)(),_=(0,s.createRef)(),k=e=>(0,s.cloneElement)(e,{className:"".concat(iR().CountryDropdownMenuFlag)||""}),C=(e,t)=>{j((0,n.jsxs)("span",{className:"flex items-center",children:[k(t)," ",e]}))},S=e=>{let t=w.current;if(null!==t&&iR().Open&&t.classList.contains(iR().Open)&&(e||!t.contains(document.activeElement))){iR().Open&&t.classList.remove(iR().Open);let e=iR()[v];e&&t.classList.remove(e)}},L=()=>{clearTimeout(x)},T=()=>{x=setTimeout(()=>{S(!1)},0)},I=e=>{let t=e.target.closest("li");t&&iR().CountryDropdownMenuItemActive&&(t.classList.add(iR().CountryDropdownMenuItemActive),setTimeout(()=>{var e,l;null==(l=t.querySelector(".".concat(iR().CountryDropdownMenuSecondLevel||"")))||null==(e=l.querySelector("button, a"))||e.focus()},400))},E=e=>{var t,l;let n=e.target.closest("li");n&&iR().CountryDropdownMenuItemActive&&(n.classList.remove(iR().CountryDropdownMenuItemActive),null==(l=n.querySelector(".".concat(iR().CountryDropdownMenuFirstLevel||"")))||null==(t=l.querySelector("button, a"))||t.focus())},A=e=>{if(27===e.keyCode){var t;let e=w.current;if(null===e||!iR().Open||!e.classList.contains(iR().Open))return;iR().Open&&e.classList.remove(iR().Open);let l=iR()[v];l&&e.classList.remove(l),null==(t=N.current)||t.focus()}};(0,s.useEffect)(()=>{if(!p.current&&t){p.current=!0;let e=null==i?void 0:i.data.find(e=>e.name.toLowerCase()===t.toLowerCase());void 0!==e&&C(t,e.flag)}let e=_.current;if(null!==e)return document.addEventListener("keydown",A),e.addEventListener("focus",L,!0),e.addEventListener("blur",T,!0),()=>{e.removeEventListener("focus",L,!0),e.removeEventListener("blur",T,!0),document.removeEventListener("keydown",A)}});let F=(e,t)=>{S(!0),C(e.name,e.flag),o&&o(e,t)};return(0,n.jsxs)("div",{className:"relative ".concat(d),ref:_,children:[a?(0,n.jsx)("span",{className:"label-text top",children:a}):null,(0,n.jsxs)("button",{className:c?"":"dropdown dropdown-blue-icon",onClick:()=>{let e=w.current;if(e)if(iR().Open&&e.classList.contains(iR().Open)){iR().Open&&e.classList.remove(iR().Open);let t=iR()[v];t&&e.classList.remove(t)}else{iR().Open&&e.classList.add(iR().Open);let t=iR()[(()=>{let e=_.current,t=w.current;return t&&document.body.clientHeight<t.offsetHeight?(b("down"),"down"):e&&t&&e.offsetTop+t.offsetHeight>document.body.clientHeight?(b("up"),"up"):(b("down"),"down")})()];t&&e.classList.add(t),(()=>{let e=w.current;if(!e)return;if(document.body.clientWidth<e.offsetWidth){e.classList.add("fixed"),g(0);return}e.classList.remove("fixed");let t=_.current;if(t&&N.current&&t.offsetLeft+e.offsetWidth>document.body.clientWidth){let t=N.current;g(-(e.offsetWidth-t.offsetWidth));return}g(0)})(),e.focus()}},ref:N,type:"button",children:[c||null,!c&&y]}),!c&&(0,n.jsxs)("svg",{"aria-hidden":"true",className:"pointer-events-none",focusable:"false",height:"46",viewBox:"0 0 48 48",width:"46",xmlns:"http://www.w3.org/2000/svg",children:[(0,n.jsx)("rect",{fill:"",height:"48",rx:"24",width:"48"}),(0,n.jsx)("path",{d:"M7,10,18.426,21.426,29.853,10Z",fill:"#fff",fillRule:"evenodd",transform:"translate(5.574 10.287)"})]}),(0,n.jsx)("ul",{className:"absolute left-0 hidden max-h-[300px] w-full min-w-[300px] overflow-y-auto border border-gray-500 md:min-w-[400px] ".concat(iR().CountryDropdownMenu||""," ").concat(r),ref:w,style:{bottom:"up"===v?"".concat(m,"px"):"auto",left:"".concat(f,"px"),top:"down"===v?"".concat(m,"px"):"auto"},tabIndex:-1,children:null==i?void 0:i.data.map(e=>(0,n.jsxs)("li",{className:"relative",children:[(0,n.jsxs)("span",{className:iR().CountryDropdownMenuFirstLevel||"",children:[(0,n.jsxs)("button",{className:"flex w-4/5 items-center p-4 hover:underline focus:underline md:w-full",onClick:()=>{F(e,e.mainUrl)},type:"button",children:[k(e.flag),(0,n.jsx)("span",{children:e.name})]}),(0,n.jsx)("button",{"aria-label":u,className:"flex w-1/5 items-center justify-center bg-gray-200 md:hidden",onClick:I,type:"button",children:(0,n.jsx)("svg",{"aria-hidden":"true",className:"pointer-events-none h-5 w-5",focusable:"false",height:"47.24",viewBox:"0 0 48.46 47.24",width:"48.46",children:(0,n.jsx)("path",{d:"M20.61,3.16,23,.76a2.59,2.59,0,0,1,3.65,0h0l21,21a2.59,2.59,0,0,1,0,3.66h0l-21,21a2.6,2.6,0,0,1-3.66,0h0l-2.4-2.4a2.6,2.6,0,0,1,0-3.68l0,0L33.69,28H2.6A2.6,2.6,0,0,1,0,25.37V21.89a2.58,2.58,0,0,1,2.58-2.6H33.69l-13-12.41a2.59,2.59,0,0,1-.11-3.65A.46.46,0,0,0,20.61,3.16Z",style:{fill:"#02253E"},transform:"translate(0 0)"})})})]}
1),(0,n.jsxs)("span",{className:iR().CountryDropdownMenuSecondLevel||"",children:[(0,n.jsx)("span",{className:iR().CountryDropdownMenuSecondLevelLinksContainer||"",children:e.secondaryUrls.map(t=>{var l;return(0,n.jsxs)("button",{className:iR().CountryDropdownMenuSecondaryLink||"",onClick:()=>{F(e,t.url)},type:"button",children:[(0,n.jsx)("span",{children:t.label}),(0,n.jsx)("svg",{"aria-hidden":"true",focusable:"false",height:"10.927",width:"10.932",xmlns:"http://www.w3.org/2000/svg",children:(0,n.jsxs)("g",{fill:null!=(l=(0,V.f3)("elanco-dark-navy"))?l:"#02253e",children:[(0,n.jsx)("path",{d:"M5.791 5.511a.419.419 0 00.3-.123l3.954-3.954v2.044a.42.42 0 10.84 0V.42a.42.42 0 00-.42-.42H7.404a.42.42 0 100 .84h2.044L5.463 4.794a.42.42 0 00.3.717z"}),(0,n.jsx)("path",{d:"M10.507 5.914a.42.42 0 00-.42.42v3.472a.274.274 0 01-.274.274H1.12a.274.274 0 01-.274-.274V1.115A.274.274 0 011.12.84h3.288a.42.42 0 000-.84H1.12A1.12 1.12 0 000 1.12v8.687a1.12 1.12 0 001.12 1.12h8.692a1.12 1.12 0 001.12-1.12V6.334a.42.42 0 00-.42-.42z"})]})})]},t.label)})}),(0,n.jsx)("button",{"aria-label":h,className:"flex w-1/5 items-center justify-center bg-gray-200 md:hidden",onClick:E,type:"button",children:(0,n.jsx)("svg",{"aria-hidden":"true",className:"pointer-events-none h-5 w-5",focusable:"false",height:"21.5",viewBox:"0 0 21.5 21.5",width:"21.5",xmlns:"http://www.w3.org/2000/svg",children:(0,n.jsx)("path",{d:"M2.27,21.21l-2-2a1,1,0,0,1,0-1.41h0l7.07-7.07L.29,3.68a1,1,0,0,1,0-1.41l2-2a1,1,0,0,1,1.41,0l7.07,7.07L17.82.29a1,1,0,0,1,1.41,0l2,2a1,1,0,0,1,0,1.41l-7.07,7.07,7.07,7.07a1,1,0,0,1,0,1.41h0l-2,2a1,1,0,0,1-1.41,0l-7.07-7.07L3.68,21.21a1,1,0,0,1-1.41,0Z",style:{fill:"#02253E"},transform:"translate(0 0)"})})})]})]},e.name))})]})},iz=e=>{let{brand:t="Elanco",children:l=null,className:a="",connectWithCompanyText:s="Connect with Elanco",connectWithText:r="Connect with",countryDropdownActiveCountry:o="",countryDropdownCountryData:c=null,countryDropdownDefaultValue:d="Select a country",countryDropdownLabel:m="Country selector",countryOnChangeEvent:u=null,emailSubscriptionForm:h=null,facebookElancoUrl:p="https://www.facebook.com/elancoanimalhealth/",hasBorderTop:x=!1,hideCountryDropdown:f=!0,linkedInElancoUrl:g="https://www.linkedin.com/company/elanco",instagramElancoUrl:v="https://www.instagram.com/weareelanco/",socialIconColorClasses:b="",twitterElancoUrl:y="https://twitter.com/Elanco",twitterToggle:j,linkedInToggle:N,instagramToggle:_,facebookToggle:k,youtubeToggle:C,youtubeElancoUrl:S="https://www.youtube.com/@ElancoAnimalHealthGlobal"}=e,L=t.replace(/(?:[A-Z])/g," $&"),T=(L.charAt(0).toUpperCase()+L.slice(1)).trim(),I=!h;return(0,n.jsx)("div",{className:(0,i.$)("mx-auto border-b bg-main px-8",x?"border-t":null,"md:pl-24 md:pr-16",a),children:(0,n.jsxs)("div",{className:"flex flex-wrap items-start",children:[(0,n.jsxs)("div",{className:"flex flex-grow flex-wrap",children:[(0,n.jsxs)("div",{className:(0,i.$)("mr-8",l?"":"hidden"),children:[(0,n.jsx)("p",{className:"mt-4 font-bold",children:"".concat(r," ").concat(T)}),(0,n.jsx)("div",{className:"mb-1 flex items-center py-4 md:mr-10",children:l})]}),(0,n.jsxs)("div",{className:"md:mr-10",children:[(0,n.jsx)("p",{className:"mt-4 font-bold",children:s}),(0,n.jsxs)("div",{className:"mb-1 flex items-center py-4",children:[k?(0,n.jsx)(w,{as:"a",className:(0,i.$)(b,"mr-4"),href:p,icon:P.v.Facebook,iconSize:"h-8 w-8",noVariant:!!b,target:"_blank",children:"Elanco's Facebook"}):null,j?(0,n.jsx)(w,{as:"a",className:(0,i.$)(b,"mr-4"),href:y,icon:P.v.Twitter,iconSize:"h-7 w-7",noVariant:!!b,target:"_blank",children:"Elanco's Twitter"}):null,_?(0,n.jsx)(w,{as:"a",className:(0,i.$)(b,"mr-4"),href:v,icon:P.v.Instagram,iconSize:"h-6 w-6",noVariant:!!b,target:"_blank",children:"Elanco's Instagram"}):null,N?(0,n.jsx)(w,{as:"a",className:(0,i.$)(b,"mr-4"),href:g,icon:P.v.
1LinkedIn,iconSize:"h-6 w-6",noVariant:!!b,target:"_blank",children:"Elanco's Linkedin"}):null,C?(0,n.jsx)(w,{as:"a",className:(0,i.$)(b,"mr-4"),href:S,icon:P.v.YouTube,iconSize:"h-8 w-8",noVariant:!!b,target:"_blank",children:"Elanco's YouTube"}):null]})]}),!I&&(0,n.jsx)("div",{className:(0,i.$)("w-full max-w-sm pb-4",f?"md:w-3/5 lg:w-2/5":"lg:w-1/2 xl:w-2/5"),children:h})]}),!f&&(0,n.jsx)("div",{className:(0,i.$)("mt-12 w-full pb-4",I?"md:w-3/5 lg:w-2/5":"lg:w-1/3 xl:w-2/5","max-w-sm"),children:(0,n.jsx)(iq,{activeCountryOption:o,defaultSelectedValue:d,dropdownCountryData:c,dropdownLabel:m,onChange:u})})]})})},iO=e=>{let{children:t,className:l,hasLogoOnLegalFooter:a=!0,isDesktopView:s=!1}=e;return(0,n.jsxs)("div",{className:(0,i.$)("flex items-center justify-between overflow-hidden bg-main px-4 py-8 text-center  md:text-left",l),children:[a?(0,n.jsxs)("svg",{className:"fill-current text-primary",height:61.742,viewBox:"0 0 637.38 316.17",width:124.47,children:[(0,n.jsx)("title",{children:"Elanco Logo"}),(0,n.jsxs)("g",{children:[(0,n.jsx)("polygon",{points:"617.07 226.46 620.37 226.46 620.37 235.29 621.86 235.29 621.86 226.46 625.15 226.46 625.15 225.11 617.07 225.11 617.07 226.46"}),(0,n.jsx)("polygon",{points:"628.83 235.29 628.83 226.09 628.9 226.09 631.7 235.29 632.91 235.29 635.79 226.09 635.85 226.09 635.85 235.29 637.35 235.29 637.35 225.11 634.66 225.11 632.42 232.67 632.35 232.67 629.94 225.11 627.33 225.11 627.33 235.29 628.83 235.29"}),(0,n.jsx)("path",{d:"M422.66,164.28c-11.55,0-16.36,34.64-16.36,40.42,0,5.14,1.77,7.54,6.25,7.54,11.56,0,16.37-34.81,16.37-40.42S426.84,164.28,422.66,164.28Z"}),(0,n.jsx)("path",{d:"M0,111.88,36.6,316.17l600.78-106.3V0ZM106.51,229.72H39.46L63.2,117.91h65l-7.06,23.58H86.94l-4,18.77h27.92L106,183H78.12l-4.81,22.79h38.34Zm29.68,2.09c-23.58,0-21.5-12.18-18-28.71l12-56.47c4.16-19.25,4.49-25.34,4.33-30l29-4.81c.32,4-.64,12.51-2.4,20.69L148.07,194c-3.06,14.6-3.38,18.46,2.88,18.46a10.85,10.85,0,0,0,3-.49l.81,17.33C150.79,230.69,143.89,231.81,136.19,231.81Zm71.91,1.13c-3.37-1.77-5.77-6.74-6.25-9.79-3.7,3.85-11.88,9.15-21.5,9.15-16.85,0-23.91-10.6-23.91-28.24s7.06-35.93,17.81-46.68c9.47-9.47,19.58-12.52,34.17-12.52,11.39,0,25.51,1.93,31.6,5-2.4,5.77-4.81,15.71-6.25,22.62l-6.25,29.84c-.65,2.72-.49,8.5,3.2,12.51ZM276,229.72l11.23-52.93c1.44-6.42.64-9.31-4-9.31-4.49,0-8,2.25-11.55,7.71l-11.71,54.53H232l11.07-52.13c2.57-12.51,3.53-19.89,2.25-28.08l24.7-4.65a47.23,47.23,0,0,1,1.45,9c6.41-5.6,16-9,25.18-9,20.69,0,22.79,11.72,20.22,23.75l-13,61.11Zm68.66,2.09c-23.1,0-34.33-14.76-28.39-42.67,5.93-28.08,22.94-44.28,47.32-44.28,11.87,0,18.29,3,25,9.79l-16.37,16.84c-2.4-3.36-6.58-6.09-10.42-6.09-6.42,0-11.23,5.13-14.76,22s-3.21,23.74,4.81,23.74c6.25,0,12-3.05,16.69-7.38l8.34,16.36A49.84,49.84,0,0,1,344.62,231.81Zm63.12,0c-19.57,0-30.64-10.75-30.64-29.84,0-21.33,11.56-57.1,50.7-57.1,17.32,0,30.64,8.5,30.64,29.35C458.44,195.88,446.41,231.81,407.74,231.81Z"}),(0,n.jsx)("path",{d:"M194,170.06c-5.93,6.89-9.46,23.09-9.46,33.36,0,5.61,1.6,8,5.45,8,3.37,0,9.15-5.77,9.79-8.49l7.7-36.26a5.68,5.68,0,0,0-3.37-1.13A11.77,11.77,0,0,0,194,170.06Z"})]})]}):"",(0,n.jsx)("div",{className:s?"md:w-full":"md:w-5/6",children:t})]})},iU=e=>{let{children:t,hideTitle:l=!1,title:a=""}=e;return(0,n.jsxs)(n.Fragment,{children:[!l&&(0,n.jsx)("h2",{children:a}),t]})},i$=e=>{let{children:t,className:l="",expanded:a=!1,title:r=""}=e,[o,c]=(0,s.useState)(null),[d,m]=(0,s.useState)(!1),u=s.Children.toArray(t);return(0,s.useEffect)(()=>{m(null!==document.querySelector("#theme"))},[]),(0,n.jsx)(n.Fragment,{children:u.map((e,t)=>{if((0,s.isValidElement)(e)&&e.type===iU){let a=e.props;return(0,n.jsxs)("dl",{className:"mb-0.5",children:[(0,n.jsx)("dt",{children:(0,n.jsx)("button",{"aria-expanded":o===t,className:"w-full bg-gray-100 px-5 py-5 text-left text-blue-800",onClick:()=>{(e=>{c(o===e?null:e)})(t)},type:"button",children:(0,n.jsxs)("div",{className:"flex items-center justify-between",children:[(0,n.jsx)("h2",{className:(0,i.$)("text-lg","font-semibold",{"text-main":d,"text-blue-900":!d}),children:a.title}),(0,n.jsx)("svg",{className:"shrink-0 stroke-current",height:"20",viewBox:"0 0 17.1 10.7",width:"20",children:(0,n.jsx)("path",{d:"M1.9,1.9l6.6,6.2l6.7-6.2",fill:"none",strokeLinecap:"round",strokeWidth:"4"})})]})})}),(0,n.jsx)("dd",{className:(0,i.$)("content--no-width-restriction","p-5","transition-all","duration-200","ease-out",l,{block:o===t,hidden:o!==t}),children:e})]},e.key)}return null})})},iH=(e,t)=>{let l=new Date(e),n=sh(t,"en-US");return l.toLocaleDateString(n,{year:"numeric",month:"long"})},iV=e=>{let{page:t,globalConfig:l,...r}=e,d=l.elements.footerConfig[0],m=t.elements.footerConfig[0],u=null!=m?m:d,h=t.elements.snippetPageSeoDate,{locale:p=""}
1=(0,a.useRouter)(),[x,f]=(0,s.useState)(!1),g=(0,T.l)(),v=(0,s.useRef)(null),y=e=>{let t=e.target;t instanceof HTMLAnchorElement&&(0,b.d)({event:"footer_nav_click",element_text:t.innerText,element_id:t.getAttribute("data-kontent-item-id")})};if((0,s.useEffect)(()=>{var e;f(!0);let t=null==(e=v.current)?void 0:e.querySelectorAll("a");return null==t||t.forEach(e=>{e.addEventListener("click",y)}),()=>{null==t||t.forEach(e=>{e.removeEventListener("click",y)})}},[]),!u)return(0,n.jsx)(n.Fragment,{});let j=[...u.elements.qualityLinks,{elements:{authenticationGateComponentUserRoles:[],icon:[],logoutUser:[],openByDefault:[],openInNewTab:[],openSubnavOnLinkClick:[],sublinks:[],text:"",url:""},system:{codename:"cookie_banner",id:"cookie_banner",type:"cookie_banner",name:"Cookie Banner"}}],N=u.elements.connectWithText,_=(()=>{var e;return N?(null==(e=u.elements.connectWithTextHasElanco[0])?void 0:e.codename)!=="no"?"".concat(N," Elanco"):N:"Connect with Elanco"})(),k=()=>{var e,t,l,a,s,r;return(0,n.jsx)("div",{"data-kontent-element-codename":"show_social_icons",children:(0,n.jsx)(iz,{brand:u.elements.brand,className:"flex justify-center md:block",connectWithCompanyText:_,connectWithText:N,emailSubscriptionForm:(null==(e=u.elements.showSignup[0])?void 0:e.codename)==="yes"?(0,n.jsx)(iP,{buttonText:u.elements.signupButtonText,placeholder:u.elements.signupPlaceholder,title:u.elements.signupTitle}):null,facebookElancoUrl:u.elements.elancoFacebook,facebookToggle:"no"!==(null==(t=u.elements.elancoFacebookToggle[0])?void 0:t.codename),hasBorderTop:!0,instagramElancoUrl:u.elements.elancoInstagram,instagramToggle:"no"!==(null==(l=u.elements.elancoInstagramToggle[0])?void 0:l.codename),linkedInElancoUrl:u.elements.elancoLinkedin,linkedInToggle:"no"!==(null==(a=u.elements.elancoLinkedinToggle[0])?void 0:a.codename),twitterElancoUrl:u.elements.elancoTwitter,twitterToggle:"no"!==(null==(s=u.elements.elancoTwitterToggle[0])?void 0:s.codename),youtubeElancoUrl:u.elements.elancoYoutube,youtubeToggle:"no"!==(null==(r=u.elements.elancoYoutubeToggle[0])?void 0:r.codename),children:!!u.elements.brand&&(0,n.jsxs)(n.Fragment,{children:[u.elements.brandFacebook?(0,n.jsx)("div",{"data-kontent-element-codename":"brand_facebook",children:(0,n.jsx)(w,{className:"mr-4 bg-blue-900 hover:bg-blue-800",href:u.elements.brandFacebook,icon:P.v.Facebook,iconSize:"h-8 w-8",target:"_blank",children:"".concat(u.elements.brandFacebook,"'s Facebook")})}):null,u.elements.brandTwitter?(0,n.jsx)("div",{"data-kontent-element-codename":"brand_twitter",children:(0,n.jsx)(w,{className:"mr-4 bg-blue-900 hover:bg-blue-800",href:u.elements.brandTwitter,icon:P.v.Twitter,iconSize:"h-8 w-8",target:"_blank",children:"".concat(u.elements.brand,"'s Twitter")})}):null,u.elements.brandInstagram?(0,n.jsx)("div",{"data-kontent-element-codename":"brand_instagram",children:(0,n.jsx)(w,{className:"mr-4 bg-blue-900 hover:bg-blue-800",href:u.elements.brandInstagram,icon:P.v.Instagram,iconSize:"h-8 w-8",target:"_blank",children:"".concat(u.elements.brand,"'s Instagram")})}):null,u.elements.brandYoutube?(0,n.jsx)("div",{"data-kontent-element-codename":"brand_youtube",children:(0,n.jsx)(w,{className:"mr-4 bg-blue-900 hover:bg-blue-800",href:u.elements.brandYoutube,icon:P.v.YouTube,iconSize:"h-8 w-8",target:"_blank",children:"".concat(u.elements.brand,"'s YouTube")})}):null]})})})};return(0,n.jsxs)("div",{className:"mt-auto","data-kontent-item-id":u.system.id,ref:v,children:[(()=>{var e;return(0,n.jsxs)(n.Fragment,{children:[u.elements.footerCard[0]?(0,n.jsx)("div",{className:"block pb-4 pt-6 md:hidden",children:(0,n.jsxs)(et,{className:"z-10 text-center",hasFooterCardOnMobile:!0,isFooterCard:!0,removeBorders:!0,title:(0,n.jsx)("span",{"data-kontent-element-codename":"card_title",children:u.elements.footerCard[0].elements.title}),children:[(0,n.jsx)(c.rM,{className:"my-2 px-2 text-sm *:*:!mb-0",element:u.elements.footerCard[0].elements.content,globalConfig:l,page:t,...r,"data-kontent-element-codename":"text"}),u.elements.footerCard[0].elements.button[0]?(0,n.jsx)(el,{className:"!pt-1",children:"cta_button"===u.elements.footerCard[0].elements.button[0].system.type?(0,n.jsx)(X,{...r,block:u.elements.footerCard[0].elements.button[0],className:"w-72 text-center",globalConfig:l,page:t}):(0,n.jsx)("div",{className:"mx-auto w-72 [&>div]:my-0 [&_.swn-tag-wtb-btn]:mt-0 [&_.swn-tag-wtb-btn]:w-full",children:(0,n.jsx)(e6,{...r,block:u.elements.footerCard[0].elements.button[0],globalConfig:l,page:t})})}):null]})}):null,(0,n.jsxs)("div",{className:(0,i.$)("block md:hidden",u.elements.footerCard[0]?"bg-gray-100":null),children:[(0,n.jsx)(i$,{children:u.elements.linksGroup.map(e=>(0,n.jsx)(iU,{hideTitle:!0,title:e.elements.title,children:e.elements.links.map(e=>(0,n.jsx)("div",{className:"py-3",children:(0,n.jsx)(lp,{...r,block:e,className:"block w-full hover:underline",globalConfig:l,page:t})},e.system.id))},e.system.id))}),(null==(e=u.elements.showSocialIcons[0])?void 0:e.codename)==="yes"&&k(),(0,n.jsx)(iO,{className:"flex-col",children:(0,n.jsx)("div",{className:"w-full py-5 md:p-
15","data-testid":"quality-links-mobile",children:(0,n.jsx)(iS,{className:"underline",horizontal:!0,isMobile:!0,children:j.map(e=>"cookie_banner"===e.system.codename&&g.isMobile&&x?(0,n.jsx)("div",{id:"teconsent"},e.system.id):(0,s.createElement)(lp,{...r,block:e,className:"hover:text-primary",globalConfig:l,key:e.system.id,page:t}))})})}),"true"===o._.NEXT_PUBLIC_FEATURE_FLAG_COUNTRY_SELECTOR&&(0,n.jsx)(iM,{countryFlagIcon:u.elements.countryFlagIcon,countryName:u.elements.countryName,countrySelectionPageUrl:u.elements.countrySelectionPageUrl,isMobile:!0}),(0,n.jsxs)("div",{className:"flex w-full flex-col justify-between bg-white px-2 pb-4 text-left text-xs","data-testid":"snippet-seo-code",children:[(0,n.jsxs)("div",{children:[(0,n.jsx)("p",{children:t.elements.snippetPageSeoCode}),h?(0,n.jsxs)("p",{children:[t.elements.snippetPageSeoDateLabel," ",(0,n.jsx)("span",{className:"capitalize",children:iH(h,p)})]}):null]}),(0,n.jsx)("p",{"data-kontent-element-codename":"copyright_text",children:u.elements.copyrightText||"\xa9 ".concat(new Date().getFullYear()," Elanco or its affiliates.")})]})]})]})})(),(()=>{var e,a,d,m,f,v;return(0,n.jsxs)("div",{className:(0,i.$)("hidden w-full md:block",(null==(e=u.elements.footerDivider[0])?void 0:e.codename)==="yes"?"border-t":null),children:[(0,n.jsx)(iO,{className:"mx-auto md:pl-24 md:pr-16",hasLogoOnLegalFooter:!1,isDesktopView:!0,children:(0,n.jsxs)("div",{className:"flex w-full",children:[(0,n.jsx)("div",{className:(0,i.$)("w-full",u.elements.footerCard[0]?"md:w-3/5 lg:w-1/2":null,"flex"),children:u.elements.linksGroup.map(e=>(0,n.jsx)("div",{className:(0,i.$)("w-1/3",u.elements.footerCard[0]?"lg:w-1/4":"md:w-1/4 lg:w-1/5"),"data-kontent-item-id":e.system.id,children:(0,n.jsx)(iS,{className:"w-auto pr-6",title:(0,n.jsx)("h2",{className:"subhead h-14 pb-2","data-kontent-element-codename":"title",children:e.elements.title}),children:e.elements.links.map(e=>(0,s.createElement)(lp,{...r,block:e,className:"hover:underline",globalConfig:l,key:e.system.id,page:t}))})},e.system.id))}),u.elements.footerCard[0]?(0,n.jsxs)(et,{className:"ml-auto w-1/3 flex-grow lg:w-full",imageOnLeft:!0,isFooterCard:!0,removeBorders:!0,title:(0,n.jsx)("span",{"data-kontent-element-codename":"title","data-kontent-item-id":u.elements.footerCard[0].system.id,children:u.elements.footerCard[0].elements.title}),children:[(0,n.jsx)(c.rM,{...r,className:"p-2 text-sm","data-kontent-element-codename":"content",element:u.elements.footerCard[0].elements.content,globalConfig:l,page:t}),(0,n.jsx)(ee,{alt:null!=(f=null==(a=u.elements.footerCard[0].elements.image[0])?void 0:a.description)?f:"","data-kontent-element-codename":"image",isFooterCardImage:!0,src:null!=(v=null==(d=u.elements.footerCard[0].elements.image[0])?void 0:d.url)?v:""}),u.elements.footerCard[0].elements.button[0]?(0,n.jsx)(el,{className:"w-content mx-2",isFooterCard:!0,children:"cta_button"===u.elements.footerCard[0].elements.button[0].system.type?(0,n.jsx)(X,{...r,block:u.elements.footerCard[0].elements.button[0],className:"mx-auto w-full py-2 text-center",globalConfig:l,page:t}):(0,n.jsx)("div",{className:"mx-auto w-full [&>div]:my-0 [&_.swn-tag-wtb-btn]:mt-0 [&_.swn-tag-wtb-btn]:w-full",children:(0,n.jsx)(e6,{...r,block:u.elements.footerCard[0].elements.button[0],globalConfig:l,page:t})})}):null]}):null]})}),(null==(m=u.elements.showSocialIcons[0])?void 0:m.codename)==="yes"&&k(),(0,n.jsxs)("div",{className:"mx-auto flex w-full items-center justify-between border-t px-8 pb-4 md:pl-24 md:pr-16",children:[(0,n.jsxs)("div",{"data-testid":"quality-links-desktop",children:[(0,n.jsx)(iS,{className:"mb-4 mt-8 break-words underline",horizontal:!0,children:j.map(e=>"cookie_banner"===e.system.codename&&x&&!g.isMobile?(0,n.jsx)("div",{id:"teconsent"},e.system.id):(0,s.createElement)(lp,{...r,block:e,className:"hover:text-primary",globalConfig:l,key:e.system.id,page:t}))}),"true"===o._.NEXT_PUBLIC_FEATURE_FLAG_COUNTRY_SELECTOR&&(0,n.jsx)(iM,{countryFlagIcon:u.elements.countryFlagIcon,countryName:u.elements.countryName,countrySelectionPageUrl:u.elements.countrySelectionPageUrl,isMobile:!1}),(0,n.jsx)("p",{className:"mt-4","data-kontent-element-codename":"copyright_text",children:u.elements.copyrightText||"\xa9 ".concat(new Date().getFullYear()," Elanco or its affiliates.")}),(0,n.jsx)("div",{className:"w-full","data-testid":"snippet-seo-code",children:(0,n.jsxs)("div",{children:[(0,n.jsx)("p",{children:t.elements.snippetPageSeoCode}),h?(0,n.jsxs)("p",{children:[t.elements.snippetPageSeoDateLabel," ",(0,n.jsx)("span",{className:"capitalize",children:iH(h,p)})]}):null]})})]}),(0,n.jsxs)("svg",{className:"fill-current text-primary",height:"61.742",viewBox:"0 0 637.38 316.17",width:"124.47",children:[(0,n.jsx)("title",{children:"Elanco Logo"}),(0,n.jsxs)("g",{children:[(0,n.jsx)("polygon",{points:"617.07 226.46 620.37 226.46 620.37 235.29 621.86 235.29 621.86 226.46 625.15 226.46 625.15 225.11 617.07 225.11 617.07 226.46"}),(0,n.jsx)("polygon",{points:"628.83 235.29 628.83 226.09 628.9 226.09 631.7 235.29 632.91 235.29 635.79 226.09 635.85 226.09 635.85 235.29 637.35 235.29 637.35 225.11 634.66 225.11 632.42 232.67 632.35 232.67 629.94 225.11 627.33 225.11 627.33 235.29 628.83 235.29"}),(0,n.jsx)("path",{d:"M422.66,164.28c-11.55,0-16.36,34.64-16.36,40.42,0,5.14,1.77,7.54,6.25,7.54,11.56,0,16.37-34.81,16.37-40.42S426.84,164.28,422.66,164.28Z"}),(0,n.jsx)("path",{d:"M0,111.88,36.6,316.17l600.78-106.3V0ZM106.51,229.72H39.46L63.2,117.91h65l-7.06,23.58H86.94l-4,18.77h27.92L106,183H78.12l-4.81,22.79h38.34Zm29.68,2.09c-23.58,0-21.5-12.18-18-28.71l12-56.47c4.16-19.25,4.49-25.34,4.33-30l29-4.81c.32,4-.64,12.51-2.4,20.69L148.07,194c-3.06,14.6-3.38,18.46,2.88,18.46a10.85,10.85,0,0,0,3-.49l.81,17.33C150.79,230.69,143.89,231.81,136.19,231.81Zm71.91,1.13c-3.37-1.77-5.7
17-6.74-6.25-9.79-3.7,3.85-11.88,9.15-21.5,9.15-16.85,0-23.91-10.6-23.91-28.24s7.06-35.93,17.81-46.68c9.47-9.47,19.58-12.52,34.17-12.52,11.39,0,25.51,1.93,31.6,5-2.4,5.77-4.81,15.71-6.25,22.62l-6.25,29.84c-.65,2.72-.49,8.5,3.2,12.51ZM276,229.72l11.23-52.93c1.44-6.42.64-9.31-4-9.31-4.49,0-8,2.25-11.55,7.71l-11.71,54.53H232l11.07-52.13c2.57-12.51,3.53-19.89,2.25-28.08l24.7-4.65a47.23,47.23,0,0,1,1.45,9c6.41-5.6,16-9,25.18-9,20.69,0,22.79,11.72,20.22,23.75l-13,61.11Zm68.66,2.09c-23.1,0-34.33-14.76-28.39-42.67,5.93-28.08,22.94-44.28,47.32-44.28,11.87,0,18.29,3,25,9.79l-16.37,16.84c-2.4-3.36-6.58-6.09-10.42-6.09-6.42,0-11.23,5.13-14.76,22s-3.21,23.74,4.81,23.74c6.25,0,12-3.05,16.69-7.38l8.34,16.36A49.84,49.84,0,0,1,344.62,231.81Zm63.12,0c-19.57,0-30.64-10.75-30.64-29.84,0-21.33,11.56-57.1,50.7-57.1,17.32,0,30.64,8.5,30.64,29.35C458.44,195.88,446.41,231.81,407.74,231.81Z"}),(0,n.jsx)("path",{d:"M194,170.06c-5.93,6.89-9.46,23.09-9.46,33.36,0,5.61,1.6,8,5.45,8,3.37,0,9.15-5.77,9.79-8.49l7.7-36.26a5.68,5.68,0,0,0-3.37-1.13A11.77,11.77,0,0,0,194,170.06Z"})]})]})]})]})})()]})};function iZ(){let[e,t]=(0,s.useState)({width:0,height:0}),l=(0,s.useRef)(null);return{ref:(0,s.useCallback)(e=>{if(l.current&&(l.current.disconnect(),l.current=null),(null==e?void 0:e.nodeType)===Node.ELEMENT_NODE){let n=new ResizeObserver(e=>{let[l]=e;if(null==l?void 0:l.borderBoxSize[0]){let{inlineSize:e,blockSize:n}=l.borderBoxSize[0];t({width:e,height:n})}});n.observe(e),l.current=n}},[]),dimensions:e}}let iG=e=>{var t,l;let{block:a,...s}=e,r=(0,es.As)(),i=(null==(t=s.page.elements.snippetPageSeoHideStickyBottomNav)?void 0:t.length)>0&&(null==(l=s.page.elements.snippetPageSeoHideStickyBottomNav[0])?void 0:l.codename)==="hide",o=r.authenticated&&s.globalConfig.elements.stickyBottomNavAuthenticated[0]?s.globalConfig.elements.stickyBottomNavAuthenticated:s.globalConfig.elements.stickyBottomNav,{ref:c,dimensions:{height:d}}=iZ(),{ref:m,dimensions:{height:u}}=iZ();return(0,n.jsxs)("div",{"data-kontent-element-codename":a.system.codename,id:"our_sticky_bottom_nav_spacer",style:{height:"".concat(d+u,"px")},children:[(0,n.jsx)("div",{className:"fixed z-[99] w-full md:bottom-16",ref:c,style:{bottom:"".concat(u,"px")},children:(0,n.jsx)(ii,{block:a,position:"bottom",...s})}),o.length>0&&!i?(0,n.jsx)("nav",{className:"fixed bottom-0 z-[99] flex w-full items-center justify-around bg-white p-0 shadow-[0px_0px_5px_DarkGrey] md:p-4 [&>*]:scale-75 md:[&>*]:scale-100",ref:m,children:o.slice(0,4).map(e=>(0,n.jsx)(nl,{block:e,className:"w-1/4",...s},e.system.id))}):null]})};var iW=l(20550);let iK=()=>(0,n.jsx)("div",{className:"mb-4 flex justify-center",children:(0,n.jsx)("div",{className:"flex animate-pulse items-center gap-3",children:(0,n.jsx)("div",{className:"h-[50px] w-[50px] rounded bg-gray-300"})})}),iY=()=>(0,n.jsx)("div",{className:"animate-pulse",children:(0,n.jsx)("div",{className:"mx-auto h-8 w-3/4 rounded bg-gray-300"})}),iQ=()=>(0,n.jsx)("div",{className:"animate-pulse px-5",children:(0,n.jsxs)("div",{className:"space-y-3",children:[(0,n.jsx)("div",{className:"mx-auto h-4 w-full rounded bg-gray-300"}),(0,n.jsx)("div",{className:"mx-auto h-4 w-5/6 rounded bg-gray-300"}),(0,n.jsx)("div",{className:"mx-auto h-4 w-4/5 rounded bg-gray-300"})]})}),iX=()=>(0,n.jsx)("div",{className:"animate-pulse",children:(0,n.jsx)("div",{className:"mb-3 h-12 w-48 rounded bg-gray-300 sm:mb-0"})}),iJ=()=>(0,n.jsx)("div",{className:"animate-pulse",children:(0,n.jsx)("div",{className:"mx-auto h-4 w-32 rounded bg-gray-300"})}),i0=e=>{var t,l,r;let{globalConfig:i,page:o,BlockMapper:d}=e,m=(0,a.useRouter)(),[u,h]=(0,s.useState)(!1),[p,x]=(0,s.useState)(null),[g,y]=(0,s.useState)(!1),j=(0,nr.getCookie)("X-Origin-Country"),[w,N]=(0,s.useState)(()=>"string"==typeof j?j:""),_=(0,iW.G)("geoLocationPopup",i),k=(0,V.K_)("panel-grey"),C=(e,t)=>{sessionStorage.setItem(e,t.toString())},S=(0,s.useCallback)(async e=>{y(!0);try{let{data:t}=await eM.L.post("/api/geo-location/info",{originCountry:e,locale:m.locale});t.success&&x(t.data)}catch(e){console.error("GeoLocation fetch error:",e)}finally{y(!1)}},[m.locale]);(0,s.useEffect)(()=>{let e=(0,nr.getCookie)("X-Origin-Country");e&&e!==w&&N("string"==typeof e?e.toLowerCase():"")},[]);let L=null==p?void 0:p.origin.countries,{title:T,linkText:I,defaultImage:E,defaultContent:A,defaultButton:F}=null!=(r=null==(t=i.elements.geolocationPopup[0])?void 0:t.elements)?r:{};(0,s.useEffect)(()=>{var e;let t=m.locale;(null==t?void 0:t.includes("_"))&&(t=null==(e=m.locale)?void 0:e.split("_")[1]);let l=_&&i.elements.geolocationPopup[0]&&w&&t!==w&&"global"!==m.locale&&"true"!==sessionStorage.getItem("isGeolocationPromptHandled");l&&(S(w),h(l),(0,b.d)({event:"geolocation_popup_shown",user_country:w.toLowerCase(),page_url:window.location.href}))},[S,i.elements.geolocationPopup,_,w,m.locale]);let M=async(e,t)=>{let l="";l=tc(function(e,t){var l,n,a,s,r;let i,o=RegExp('<link\\s+rel="alternate"\\s+href="(?<href>[^"]+)"\\s+hreflang="(?<hreflang>[^"]+)"\\s*\\/?>',"g"),c=[],d=null==(l=sh(t))?void 0:l.toLowerCase();if(!d)return c;for(;null!==(i=o.exec(e));){let e=null!=(r=null==(n=i.groups)?void 0:n.href)?r:"";(null==(s=i.groups)||null==(a=s.hreflang)?void 0:a.toLowerCase())===d&&c.push(e)}return c}(o.elements.snippetPageSeoPageHreflangs,t)[0]||e),C("isGeolocationPromptHandled",!0),h(!1);let n=new Promise(e=>{(0,b.d)({event:"geolocation_popup_confirmed",user_country:w.toLowerCase(),page_url:window.location.href,redirect_url:l}),e()});try{await n,window.location.href=l}catch(e){console.error("Redirect failed, falling back to location.href",e),window.location.href=l}},P=(0,s.useMemo)(()=>{var e,t;return(null==p||null==(e=p.origin.flagImage)?void 0:e[0])?(0,n.jsx)("div",{className:"mb-4 flex justify-center",children:(0,n.jsx)("div",{className:"flex items-center gap-3",children:(0,n.jsx)(f(),{alt:(null==(t=p.origin.countries[0])?void 0:t.name)||"Country flag",className:"flex-shrink-0 rounded",height:50,loader:v.L,src:p.origin.flagImage[0].url,width:50})})}):(null==E?void 0:E[0])?(0,n.jsx)("div",{className:"mb-4 flex justify-center",children:(0,n.jsx)("div",{className:"flex items-center gap-3",children:E[0]?(0,n.jsx)(eq.D,{BlockMapper:d,block:E[0],globalConfig:i,page:o},E[0].system.id):null})}):null},[p,d,i,o,E]);return g&&u?(0,n.jsx)("div",{className:"fixed inset-y-0 z-[9999] w-full backdrop-blur-[5px] backdrop-filter","data-testid":"geo-popup",children:(0,n.jsx)("div",{className:"m-auto h-screen bg-[rgba(28,28,28,0.76)] px-4 pb-4 pt-20 xxs:overflow-x-scroll xxs:overflow-y-scroll",children:(0,n.jsxs)("div",{className:"mx-auto my-0 min-h-[331px] max-w-2xl xxs:min-h-[400px] xxs:w-[100%] xs:min-h-[400px] xs:w-[100%]",style:{border:"thick solid ".concat(k),backgroundColor:k,borderRadius:"10px",minWidth:"300px"},children:[(0,n.jsx)("div",{className:"bg-panel-grey pb-5 pt-[30px]",children:(0,n.jsx)("div",{className:"pl-5 pr-5 text-center text-dark-charcoal",children:(0,n.jsx)("div",{className:"text-2xl font-extrabold leading-[1.18]",children:(0,n.jsx)(iY,{})})})}),(0,n.jsxs)("div",{className:"overflow-y-auto overflow-x-hidden border-t-[1px] border-[lightgrey] bg-panel-grey pb-[15px] pt-[15px]",children:[(0,n.jsx)(iK,{}),(0,n.jsx)(iQ,{})]}),(0,n.jsxs)("div",{className:"mx-auto my-4 flex w-full flex-col items-center justify-center bg-panel-grey px-4",children:[(0,n.jsx)("div",{className:"mb-3 flex w-full flex-col items-center justify-center sm:flex-row sm:gap-3",children:(0,n.jsx)(iX,{})}),(0,n.jsx)(iJ,{})]})]})})}):u?(0,n.jsx)("div",{className:"fixed inset-y-0 z-[9999] w-full backdrop-blur-[5px] backdrop-filter","data-testid":"geo-popup",children:(0,n.jsx)("div",{className:"m-auto h-screen bg-[rgba(28,28,28,0.76)] px-4 pb-4 pt-20 xxs:overflow-y-scroll",children:(0,n.jsxs)("div",{className:"mx-auto my-0 min-h-[331px] max-w-2xl xxs:min-h-[400px] xxs:w-[100%] xs:min-h-[400px] xs:w-[100%]",style:{border:"thick solid ".concat(k),backgroundColor:k,borderRadius:"10px",minWidth:"300px"},children:[(0,n.jsx)("div",{className:"bg-panel-grey pb-5 pt-[30px]",children:(0,n.jsx)("div",{className:"pl-5 pr-5 text-center text-dark-charcoal",children:(0,n.jsx)("div",{className:"text-2xl font-extrabold leading-[1.18]",children:(null==L?void 0:L.length)?L.map(e=>{var t,l,a,s;return(0,n.jsx)("p",{children:null==(l=e.globalConfig)||null==(t=l[0])?void 0:t.elements.title},null==(s=e.globalConfig)||null==(a=s[0])?void 0:a.system.id)}):T})})}),(0,n.jsxs)("div",{className:" overflow-y-auto overflow-x-hidden border-t-[1px] border-[lightgrey] bg-panel-grey pb-[15px] pt-[15px]",children:[P,(null==L?void 0:L.length)?L.map(e=>{var t,l,a;return(null==(l=e.globalConfig)||null==(t=l[0])?void 0:t.elements.content)?(0,n.jsx)(c.rM,{BlockMapper:d,className:"justify-left pl-5 pr-5 text-center text-dark-charcoal","data-kontent-element-codename":"content","data-testid":"geo-popup-content-".concat(e.locale),element:e.globalConfig[0].elements.content,globalConfig:i,page:o},null==(a=e.globalConfig[0])?void 0:a.system.id):null}):A&&(0,n.jsx)(c.rM,{BlockMapper:d,className:"justify-left pl-5 pr-5 text-center text-dark-charcoal","data-kontent-element-codename":"default_content","data-testid":"geo-popup-content-default",element:A,globalConfig:i,page:o})]}),(0,n.jsxs)("div",{className:"mx-auto my-4 flex w-full flex-col items-center justify-center bg-panel-grey px-4",children:[(0,n.jsx)("div",{className:"mb-3 flex w-full flex-col items-center justify-center sm:flex-row sm:gap-3",children:(null==L?void 0:L.length)?L.map(e=>{var t,l,a;return(0,n.jsx)(H.$,{className:"ml-2 mr-2 w-auto max-w-[calc(100%-2rem)] xxs:mb-2 xxs:ml-0 xxs:w-full xxs:last:mb-0 xs:mb-2 xs:w-full xs:last:mb-0","data-testid":"geo-popup-cta-".concat(e.locale),onClick:async()=>{await M(e.homePage,e.locale)},children:null==(a=e.globalConfig)||null==(l=a[0])||null==(t=l.elements.button[0])?void 0:t.elements.text},e.name)}):(0,n.jsx)(B(),{className:"btn mb-3 inline-flex w-auto max-w-[calc(100%-2rem)] cursor-pointer  items-center justify-center overflow-hidden rounded-sm border-2 border-primary bg-theme-main px-4  py-3 text-center align-middle font-bold text-white hover:bg-theme-highlight focus:bg-secondary sm:mb-0","data-testid":"geo-popup-cta-default",href:"/country-selector?redirected=true",locale:!1,onClick:()=>{h(!1),C("isGeolocationPromptHandled",!0),(0,b.d)({event:"geolocation_popup_confirmed",user_country:w.toLowerCase(),page_url:window.location.href,redirect_url:"/country-selector?redirected=true"})},children:null==F||null==(l=F[0])?void 0:l.elements.text})}),(0,n.jsx)(B(),{className:"text-center text-sm hover:underline","data-testid":"geo-popup-continue in current country",href:m.asPath,onClick:()=>{h(!1),C("isGeolocationPromptHandled",!0),(0,b.d)({event:"geolocation_popup_confirmed",user_country:w.toLowerCase(),page_url:window.location.href,redirect_url:window.location.href})},children:I})]})]})})}):(0,n.jsx)(n.Fragment,{})};var i1=l(15060),i2=l.n(i1);let i4=e=>{let{mainContentId:t="main-content",text:l="Skip to main content"}=e,a=(0,s.useRef)(null);return(0,n.jsx)("a",{"aria-label":l,className:i2().skipToMainContent,href:"#".concat(t),onBlur:()=>{a.current&&(a.current.style.position="absolute",a.current.style.left="-9999px")},onClick:e=>{e.preventDefault();
1let l=document.getElementById(t);l&&(l.hasAttribute("tabindex")||l.setAttribute("tabindex","-1"),l.focus(),l.scrollIntoView()),a.current&&(a.current.style.position="absolute",a.current.style.left="-9999px")},onFocus:()=>{a.current&&(a.current.style.position="static",a.current.style.left="auto")},onKeyDown:e=>{if("Enter"===e.key){e.preventDefault();let l=document.getElementById(t);l&&(l.hasAttribute("tabindex")||l.setAttribute("tabindex","-1"),l.focus(),l.scrollIntoView()),a.current&&(a.current.style.position="absolute",a.current.style.left="-9999px")}else"Tab"===e.key&&a.current&&(a.current.style.position="absolute",a.current.style.left="-9999px")},ref:a,style:{position:"absolute",left:"-9999px"},tabIndex:0,children:l})};var i6=l(12584);function i3(){let e=(0,i6._)(["<"],["\\u003c"]);return i3=function(){return e},e}function i5(e){let{graph:t}=e,l=JSON.stringify(t).replaceAll("<",String.raw(i3()));return(0,n.jsx)("script",{dangerouslySetInnerHTML:{__html:l},type:"application/ld+json"})}var i7=!0;let i8=e=>{var t,l;let{globalConfig:s,page:i,isInPreviewMode:o,previewData:c,jsonLd:d}=e,m=(0,a.useRouter)();if((0,b.st)(i,s),"null"===m.locale)return(0,n.jsx)("p",{children:"404 - Not found"});let u={page:i,globalConfig:s};return(0,n.jsxs)(n.Fragment,{children:[d?(0,n.jsx)(i5,{graph:d}):null,(0,n.jsx)(i4,{mainContentId:"main-content",text:s.elements.skipToMainContent||"Skip to main content"}),(0,n.jsxs)(sG,{initialGlobalState:{articlesFilterOptions:{},couponsFilterOptions:{},productsFilterOptions:{},resourcesFilterOptions:{},faqSearchQuery:""},children:[(0,n.jsx)(r,{isInPreviewMode:o,previewData:c}),(0,n.jsx)(i0,{...u,BlockMapper:il}),(0,n.jsx)(iB,{...u,BlockMapper:il,block:{elements:{authenticationGateComponentUserRoles:[]},system:s.system}}),(0,n.jsx)("main",{id:"main-content",children:(0,n.jsx)(il,{blocks:i.elements.pageBlocks,...u})}),(0,n.jsx)(iV,{...u,BlockMapper:il,block:{elements:{authenticationGateComponentUserRoles:[]},system:s.system}}),(0,n.jsx)(iG,{...u,BlockMapper:il,block:{elements:{authenticationGateComponentUserRoles:[]},system:null!=(l=null==(t=s.elements.stickyBottomNav[0])?void 0:t.system)?l:s.system}})]})]})}},97324:e=>{e.exports={scrollBar:"tabs_scrollBar__Qwp1b"}}},e=>{e.O(0,[34,307,762,410,728,636,988,792],()=>e(e.s=21272)),_N_E=e.O()}]);
2//# sourceMappingURL=[[...slug]]-2cf892c574cceee3.js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.