1import{r as m,j as e,bL as Wt,g as o,S as M,s as N,G as Ke,B as x,Z as J,Y as ke,$ as Ne,bM as Gt,o as d,K as i,n as z,bN as tt,bO as Zt,aw as Re,V as p,W as u,ac as Te,ad as Me,ae as Ie,a0 as Yt,bD as Et,bE as Le,bP as qt,bQ as Qe,y as oe,bR as Xt,bF as Je,T as ve,d as ce,ab as Be,I as q,z as Rt,h as Q,bS as Kt,bT as Ye,bU as Qt,ay as Jt,ag as yt,aZ as wt,az as St,bV as ea,aI as xe,a$ as ta,bw as qe,bt as Ct,aT as jt,H as re,bI as aa,bW as At,m as De,bX as na,bY as ia,E as sa,F as ra,D as oa,bZ as la,b_ as ca,b$ as da,c0 as ha,c1 as ma,c2 as at,a2 as pa,a7 as ue,a4 as ua,a8 as ye,c3 as nt,c4 as ga,c5 as _a,c6 as Lt,p as et,c7 as Dt,c8 as fe,c9 as xa,ca as Ot,b0 as D,cb as kt,cc as ba,cd as le,ce as fa,cf as va,cg as Ta,ch as Ma,ci as Ia,cj as Ea,ck as Ra,cl as ya,_ as wa,cm as it,cn as st,co as rt,cp as ot,cq as lt,cr as ct,bs as Sa,cs as Ca,ct as ja,cu as Aa,cv as La,cw as Da,cx as Oa,cy as ka,cz as Na,cA as Ba,f as Xe,cB as Pa,cC as Va,b6 as Nt,b7 as Bt,ai as Ua,ak as Fa,cD as Ha,c as za,N as $a,cE as dt,cF as Wa,bf as Ga,bg as Za,cG as Ya,cH as qa,cI as ht}from"./index-_Xu3JWCz.js";import{M as ae,R as Xa}from"./Merchant-DLBEx2H3.js";import{i as Ka,c as Qa,T as mt,v as Ja,j as Pt,e as en,u as be}from"./index-Ci0otQSu.js";import{V as Vt}from"./VisuallyHiddenTitle-D0_uq-Jm.js";import{P as tn}from"./index-Dqw10AHI.js";import{M as Ut}from"./index-BIVpB0r7.js";import an from"./index-DxsAc8ap.js";import"./getFormErrorMaxLength-CR7golaH.js";import"./getFormErrorRequiredField-B6HGk5km.js";const nn=t=>{const n=m.useMemo(()=>{const r=[];return r.push({property:"og:url",content:window.location.href}),t.title&&r.push({property:"og:title",content:t.title}),t.description&&r.push({property:"og:description",content:t.description}),t.image&&r.push({property:"og:image",content:t.image}),t.imageAlt&&r.push({property:"og:image:alt",content:t.imageAlt}),t.siteName&&r.push({property:"og:site_name",content:t.siteName}),r},[t]),a=m.useMemo(()=>()=>e.jsx(Wt,{children:n.map(({property:l,content:c})=>e.jsx("meta",{property:l,content:c},l))}),[n]);return{metaTags:n,HelmetMeta:a}},Z={SUMMARY:"merchant_details__summary",OVERVIEW:"merchant_details__summary__overview",HIGHLIGHT:"merchant_details__summary__overview__highlight",NAME:"merchant_details__summary__overview__name",FAVORITE:"merchant_details__summary__overview__favorite",STAR_METER:"merchant_details__summary__overview__star_meter",INFO_LIST:"merchant_details__summary__overview__info_list",CUISINE:"merchant_details__summary__overview__info_list__cuisine",PRICE_METER:"merchant_details__summary__overview__info_list__price_meter",MENU:"merchant_details__summary__overview__info_list__menu",DAILY_SUMMARY:"merchant_details__summary__daily_summary",HOURS:"merchant_details__summary__daily_summary__hours",BENEFITS_CALENDAR:"merchant_details__summary__overview__benefits_calendar"},sn=o.section.withConfig({componentId:"sc-uix4g6-0"})(["padding-top:",";position:relative;text-align:center;width:100%;@media (min-width:","){padding-top:unset;text-align:left;}"],M.sm,t=>t.theme.breakpoints.desktop),rn=o(N).withConfig({componentId:"sc-uix4g6-1"})(["display:flex;flex-direction:column;gap:0.5rem;@media (min-width:","){align-items:flex-start;}"],t=>t.theme.breakpoints.desktop),on=o.div.withConfig({componentId:"sc-uix4g6-2"})(["border-bottom:",";display:grid;gap:10px 0;padding-bottom:",";"],t=>t.theme.border.DIVIDER_H,M.sm),ln=o.div.withConfig({componentId:"sc-uix4g6-3"})(["display:grid;gap:10px 0;padding-top:",";"],M.sm),Fe=o.div.withConfig({componentId:"sc-uix4g6-4"})(["display:inline-block;& + &{border-left:",";margin-left:",";padding-left:",";}"],t=>t.theme.border.DIVIDER_V,M.xxs,M.xxs),cn=o(N).withConfig({componentId:"sc-uix4g6-5"})(["display:flex;justify-content:center;gap:",";align-items:center;&:not(:has(*)){display:none;}@media (min-width:","){justify-content:start;}"],M.sm,t=>t.theme.breakpoints.desktop);o.div.withConfig({componentId:"sc-uix4g6-6"})(["display:grid;gap:20px;padding-top:",";@media (min-width:","){grid-template-columns:max-content max-content;}"],M.xs,t=>t.theme.breakpoints.desktop);o(Ke).withConfig({componentId:"sc-uix4g6-7"})(["& > svg{height:13px;width:13px;}"]);const dn=o(x).withConfig({componentId:"sc-uix4g6-8"})(["display:inline-flex;gap:0 5px;"]),hn=o.span.withConfig({componentId:"sc-uix4g6-9"})(["display:grid;gap:5px 0;"]),mn=7,He={CALENDAR:"merchant_benefits_calendar",DAY:"merchant_benefits_calendar__day",EARN_RATE:"merchant_benefits_calendar__earn_rate"},pn=o.div.withConfig({componentId:"sc-on8d75-0"})(["padding:",";display:grid;grid-template-columns:minmax(auto,375px);gap:",";justify-content:space-around;& .benefit_not_available{text-decoration:line-through;color:#808080;}"],M.sm,M.xs),un=o.div.withConfig({componentId:"sc-on8d75-1"})(["display:flex;align-items:center;justify-content:center;gap:",";"],M.sm),gn=o.ul.withConfig({componentId:"sc-on8d75-2"})(["display:flex;height:30px;width:100%;justify-content:space-evenly;padding-left:unset;"]),_n=o.div.withConfig({componentId:"sc-on8d75-3"})(["display:flex;background-color:#fff;min-width:75px;height:40px;align-items:center;justify-content:center;"]),xn=o.div.withConfig({componentId:"sc-on8d75-4"})(["cursor:pointer;display:flex;gap:",";svg{height:calc("," * 0.85);}"],M.xxs,M.sm),bn=o(x).withConfig({componentId:"sc-on8d75-5"})(["border-radius:50%;color:",";display:grid;height:30px;justify-content:center;line-height:unset;"],t=>t.color),fn=({benefits:t,benefitAvailability:n,isAcclaimed:a=!1,isComingSoon:r=!1})=>{const l=m.useContext(J),c=m.useContext(ke),{member:s,known:h}=m.useContext(Ne),_=Gt(),T=d(i.MemberCurrentEarning0Slug),b=d(i.MemberCurrentEarning2Slug),f=d(i.MemberCurrentEarning3Slug),R=d(i.MemberCurrentEarningUnknownSlug),I=d(i.MerchantDetailBenefitsMember),C=d(i.MerchantDetailBenefitsComingSoonMember),E=z(i.MerchantDetailBenefitsComingSoonUnauthed,{options:{target:"_self"}}),S=z(i.MerchantDetailBenefitsUnauthed,{options:{target:"_self"}}),A=z(i.MerchantDetailBenefitsNotActivated,{options:{target:"_self"}}),k=d(i.MerchantBenefitUnlockAccessLabel),y=d(i.MerchantBenefitMoreInfoLabel),$=d(i.MerchantBenefitComingSoon),v=d(i.MerchantBenefitDayAvailableLabel),L=d(i.MerchantBenefitDayNotAvailableLabel),[G,F]=m.useState(!1),[j,ne]=m.useState(),g=B=>{B.preventDefault(),B.stopPropagation(),F(W=>!W)};m.useEffect(()=>{ne(s?.tierLevel||h?.tierLevel)},[s?.tierLevel,h?.tierLevel]);const V=m.useMemo(()=>j?.length&&a&&c.partner.acclaimed2Enabled&&!tt(n?.campaignCodes||[],j)?Zt(n?.campaignCodes||[],j):[],[n,a,j,c.partner.acclaimed2Enabled]);let H="";const Y=()=>{switch(j){case Re.OptedOut:return T;case Re.OptedIn:return b;case Re.VIP:return f;default:return R}};if(j){if(tt(n?.campaignCodes||[],j||"")){const B=Y();
1H=r?C:j===Re.NonActivated?A:I.replace("EARN_RATE",B)}else if(a){const B=l?.bodyText.sizes[p.Md].fontSize;H=[e.jsxs(xn,{onClick:g,children:[e.jsx(x,{bodyTextVariant:p.Md,weight:u.B,children:k}),e.jsx(Te,{"aria-label":y,height:B,width:B,iconButtonVariant:Me.Contrast,children:e.jsx(Ie,{})})]})]}}else H=r?E:S;return e.jsxs(pn,{"data-testid":Z.BENEFITS_CALENDAR,children:[_?e.jsxs(un,{children:[c.partner.name===Yt.Delta?null:e.jsx(_n,{children:e.jsx(Et,{"aria-hidden":"true",src:l?.home.howItWorksIcons[2]||"",height:"32px",width:"auto"})}),e.jsxs(x,{as:"span",bodyTextVariant:p.Md,weight:u.A,"data-testid":He.EARN_RATE,children:[r?e.jsx(x,{as:"span",bodyTextVariant:p.Md,weight:u.B,children:$}):null,H]})]}):null,e.jsx(gn,{"data-testid":He.CALENDAR,children:t.map((B,W)=>{const ee=B.value&&B.value!=="0";return W<mn&&e.jsxs(bn,{as:"li","data-testid":He.DAY,bodyTextVariant:p.Lg,weight:ee?u.B:u.A,className:ee?void 0:"benefit_not_available",children:[e.jsx(Le,{children:`${B.dayOfWeek} ${B.monthDay}, ${ee?v:L}`}),e.jsx("span",{"aria-hidden":"true",children:B.dayOfWeek})]},W)})}),G?e.jsx(qt,{nextTier:V[0],onClose:()=>{F(!1)}}):null]})},vn=o(x).withConfig({componentId:"sc-rgl4ze-0"})(["",""],Qe),de=({bodyTextVariant:t=p.XL,children:n,headingLevel:a="h2",paddingBottom:r="xl",testId:l,title:c,showTitle:s=!0,isTitleHidden:h=!1,weight:_=u.B})=>e.jsxs(N,{as:a==="h2"?"section":"div",paddingBottom:r,"data-testid":l,"aria-label":a==="h2"?c:"",children:[c&&s&&e.jsx(N,{paddingBottom:a==="h2"&&!h?"xs":"none",children:h?e.jsx(vn,{as:a,bodyTextVariant:t,weight:_,children:c}):e.jsx(x,{as:a,bodyTextVariant:t,weight:_,children:c})}),n]}),Tn=o(oe).withConfig({componentId:"sc-1ut3pz9-0"})(["display:inline-block;padding-block-start:",";"],M.xxs),Mn=o.div.withConfig({componentId:"sc-1ut3pz9-1"})(["max-height:calc( 4 * "," );overflow:hidden;background-image:linear-gradient( 0deg,transparent,"," "," );background-clip:text;-webkit-background-clip:text;-webkit-text-fill-color:transparent;&.overflow-disabled{max-height:unset;background:unset;-webkit-text-fill-color:unset;}"],t=>t.theme.bodyText.sizes[p.Md].lineHeight,t=>t.theme.bodyText.weights[u.A].color,t=>t.theme.bodyText.sizes[p.Md].lineHeight),pt={ABOUT:"merchant_detail__about",SHOW_MORE:"merchant_detail__about__show_more"},ut=({description:t})=>{const n=d(i.PageMerchantDetailAboutTitle),a=d(i.PageMerchantDetailAboutShowMore),[r,l]=m.useState(!0),{ref:c,inView:s}=Xt({threshold:1,delay:100,triggerOnce:!0});return m.useEffect(()=>{s===!0&&l(s)},[s]),e.jsx(de,{testId:pt.ABOUT,title:n,children:e.jsxs(x,{as:"p",bodyTextVariant:p.Md,weight:u.A,children:[e.jsx(Mn,{className:r&&!s?"":"overflow-disabled",children:e.jsx(Je,{ref:c,html:t?.replace(/<a\s+[^>]*?href=\s+"([^"]*)".*>(.*?)<\/a>/g,"<a target='_blank' href='$1' aria-label='$2. Opens in a new tab'>$2</a>")})}),e.jsx(Tn,{"data-testid":pt.SHOW_MORE,"aria-hidden":!0,style:{display:s?"none":"block"},onClick:h=>{h.preventDefault(),h.stopPropagation(),l(!1)},children:a})]})})},In=o.div.withConfig({componentId:"sc-zhwic8-0"})(["margin-top:",";grid-column:1 / span 2;color:",";background-color:",";& > *:not(:first-child):not(:last-child){border-bottom:",";}"],M.md,t=>t.theme.merchantDetailBenefits?.color||"#333",t=>t.theme.merchantDetailBenefits?.backgroundColor||"#eee",t=>t.theme.border.DIVIDER_H),En=o(ve).withConfig({componentId:"sc-zhwic8-1"})(["font-size:20px;line-height:24px;padding:",";background-color:",";text-align:center;"],M.xs,t=>t.theme.merchantDetailBenefits?.title?.backgroundColor),Rn={COMPONENT:"MerchantDetailBenefits"},yn=({children:t})=>{const n=m.useContext(J),a=d(i.MerchantDetailBenefitsTitle);return e.jsxs(In,{"data-testid":Rn.COMPONENT,children:[e.jsx(En,{titleVariant:ce.Sm,isReverse:n?.merchantDetailBenefits?.title?.isReversed,children:a}),t]})},we={ROOT:"merchant_detail__events",TITLE:"merchant_detail__events__title",CONTENT:"merchant_detail__events__content",POPOVER:"merchant_detail__events__popover"},wn=o(x).withConfig({componentId:"sc-15krh0y-0"})(["display:inline;"]),gt=()=>{const{merchant:t,events:n}=m.useContext(ae),a=z(i.MerchantEventsLegalDisclosure),r=d(i.PageMerchantDetailEventsTitle),l=d(i.PageMerchantDetailEventsMoreInfoLabel),s=m.useContext(J)?.bodyText.sizes[p.Md].fontSize;return!t?.id||!n?.content?null:e.jsx(de,{testId:we.ROOT,title:r,showTitle:!1,children:e.jsxs(e.Fragment,{children:[e.jsxs(N,{paddingBottom:"xs",children:[e.jsx(wn,{as:"h2",bodyTextVariant:p.XL,weight:u.B,"data-testid":we.TITLE,children:"Events & Specials"}),e.jsx(Be,{popoverId:we.POPOVER,triggerContent:e.jsx(Te,{"aria-label":l,height:s,width:s,iconButtonVariant:Me.Primary,children:e.jsx(Ie,{})}),children:e.jsx(x,{bodyTextVariant:p.Md,weight:u.A,children:a})})]}),e.jsx(x,{as:"p",bodyTextVariant:p.Md,weight:u.A,"data-testid":we.CONTENT,children:e.jsx(Je,{html:n.content.replace(/<a\s+[^>]*?href=\s+"([^"]*)".*>(.*?)<\/a>/g,"<a target='_blank' href='$1' aria-label='$2. Opens in a new tab'>$2</a>")})})]})})},Se={ROOT:"merchant_offers",AMOUNT:"merchant_offers__amount",CONDITION:"merchant_offers__condition",TERMS_LINK:"merchant_offers__terms_link"},Sn=o.span.withConfig({componentId:"sc-17ahns1-0"})(["",""],Qe),Cn=o(ve).withConfig({componentId:"sc-17ahns1-1"})(["text-align:center;"]),jn=o.span.withConfig({componentId:"sc-17ahns1-2"})(['&:before{content:"\\272A";padding-right:',";}"],M.xxs),An=o(x).withConfig({componentId:"sc-17ahns1-3"})(["display:block;text-align:center;"]),Ln=o(Je).withConfig({componentId:"sc-17ahns1-4"})(["display:inline;"]),Dn=({merchantId:t,offers:n})=>{const a=m.useContext(J),r=d(i.PartnerDefaultCasing),l=z(i.MerchantOffersLegalDisclosure,{replacements:{OFFERS_SLUG:q("Special offer",r)}}),c=d(i.MerchantOffersMoreInfoLabel);if(!n||!t)return null;const{webMessageCondition:s,webMessageOfferAmount:h}=n,_=q("Special offer",r),T=p.Sm,b=a?.bodyText.sizes[T].fontSize;return e.jsxs(e.Fragment,{children:[e.jsxs(Cn,{as:"h3",titleVariant:ce.Sm,children:[e.jsx(Sn,{children:`${_}: `}),e.jsx(jn,{"data-testid":`${Se.AMOUNT}__${t}`,children:h})]}),e.jsxs(An,{as:"span",bodyTextVariant:T,weight:u.A,"data-testid":`${Se.CONDITION}__${t}`,children:[e.jsx(Ln,{html:s.replace(/<a\s+[^>]*?href=\s+"([^"]*)".*>(.*?)<\/a>/g,"<a target='_blank' href='$1' aria-label='$2. Opens in a new tab'>$2</a>")}),e.jsx(Be,{popoverId:`${Se.ROOT}__${t}`,triggerContent:e.jsx(Te,{"aria-label":c,height:b,width:b,iconButtonVariant:Me.Contrast,children:e.jsx(Ie,{})}),children:e.jsx(x,{as:"span",bodyTextVariant:p.Md,weight:u.A,"data-testid":`${Se.TERMS_LINK}__${t}`,children:l})})]})]})},On={ROOT:"merchant_detail_offers"},kn=()=>{const{isOffersLoading:t,offers:n,merchant:a}=m.useContext(ae),{partner:r}=m.useContext(ke);return t?e.jsx(Rt,{}):!r.hasFlexOffers||!n||!a?null:e.jsx("div",{"data-testid":On.ROOT,children:e.jsx(Dn,{offers:n,merchantId:a.id})})},Nn=()=>e.jsx("svg",{"aria-hidden":"true","data-testid":"icon_phone",focu
1sable:"false",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:e.jsx("path",{fill:"currentColor",d:"M23.128 1.154 18.253.029a1.125 1.125 0 0 0-1.287.653l-2.25 5.25c-.197.46-.066.996.322 1.314l2.841 2.325a17.387 17.387 0 0 1-8.308 8.308l-2.325-2.841a1.125 1.125 0 0 0-1.314-.322l-5.25 2.25c-.5.214-.775.756-.653 1.287l1.125 4.875c.117.507.569.872 1.096.872C14.254 24 24 14.272 24 2.25c0-.524-.362-.978-.872-1.096Z"})}),ze={HOURS:"merchant_hours",DAILY_HOURS:"merchant_hours__daily",DISCLAIMER:"merchant_hours__disclaimer"},Bn=o(N).withConfig({componentId:"sc-13kc5xl-0"})(["display:grid;gap:5px 0;padding-left:unset;"]),Pn=o(x).withConfig({componentId:"sc-13kc5xl-1"})(["display:grid;gap:10px;grid-template-columns:minmax(0,35px) 160px;padding-left:unset;"]),_t=o.span.withConfig({componentId:"sc-13kc5xl-2"})(["display:flex;gap:5px;& > span:first-of-type{text-align:right;}"]),$e=o.span.withConfig({componentId:"sc-13kc5xl-3"})(["flex:1;"]),Ft=o.span.withConfig({componentId:"sc-13kc5xl-4"})(["visibility:hidden;"]),Vn=o(Ft).withConfig({componentId:"sc-13kc5xl-5"})(["flex:1;"]),Un=({hours:t,name:n})=>{const a=d(i.MerchantHoursWeeklyLabel,{replacements:{MERCHANT_NAME:n}}),r=d(i.MerchantHoursClosedLabel),l=d(i.MerchantHoursDisclaimerText);return e.jsxs(e.Fragment,{children:[e.jsx(Bn,{as:"ul","aria-label":a,"data-testid":ze.HOURS,children:t.map((c,s)=>e.jsxs(Pn,{as:"li",bodyTextVariant:p.Md,weight:u.A,"data-testid":ze.DAILY_HOURS,children:[e.jsx("span",{children:c.dayOfWeek}),c.openForBusiness?e.jsx("span",{children:c.dayHours.map((h,_)=>e.jsxs(_t,{children:[e.jsx($e,{children:h.open}),e.jsxs("span",{children:[e.jsx(Le,{children:" to "}),e.jsx("span",{"aria-hidden":"true",children:"-"})]}),e.jsx($e,{children:h.close})]},_))}):e.jsxs(_t,{children:[e.jsx($e,{children:r}),e.jsx(Ft,{"aria-hidden":"true",children:"-"}),e.jsx(Vn,{})]})]},s))}),e.jsx(N,{paddingTop:"xs",children:e.jsx(x,{"data-testid":ze.DISCLAIMER,bodyTextVariant:p.Md,weight:u.A,children:l})})]})},Fn=()=>e.jsx("svg",{"aria-hidden":"true","data-testid":"icon_social_facebook",focusable:"false",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 31 30",children:e.jsx("path",{fill:"currentColor",d:"M12.88 30V19.821H8.661V15h4.22v-3.683c0-1.34.267-2.5.803-3.482.535-.982 1.26-1.719 2.176-2.21.915-.491 2.02-.737 3.315-.737 1.205 0 2.433.112 3.683.335v4.085h-2.076c-1.786 0-2.679.848-2.679 2.545V15h4.62l-.736 4.821h-3.884V30h9.174a3.1 3.1 0 0 0 2.277-.938 3.098 3.098 0 0 0 .938-2.276V3.214c0-.893-.313-1.651-.938-2.276C28.93.313 28.17 0 27.277 0H3.706a3.1 3.1 0 0 0-2.277.938C.804 1.563.492 2.32.492 3.213v23.572c0 .893.312 1.651.937 2.276a3.1 3.1 0 0 0 2.277.938h9.174z"})}),Hn=()=>e.jsx("svg",{"aria-hidden":"true","data-testid":"icon_social_instagram",focusable:"false",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 31 30",children:e.jsx("path",{fill:"currentColor",d:"M15.492 11.428a3.572 3.572 0 1 0 .002 7.144 3.572 3.572 0 0 0-.002-7.144zm8.35-2.745a3.616 3.616 0 0 0-2.036-2.037c-1.406-.555-4.754-.43-6.314-.43-1.56 0-4.905-.13-6.316.43A3.616 3.616 0 0 0 7.14 8.683c-.555 1.406-.43 4.757-.43 6.316 0 1.56-.125 4.907.433 6.318a3.616 3.616 0 0 0 2.036 2.036c1.406.555 4.754.43 6.315.43 1.561 0 4.905.13 6.315-.43a3.616 3.616 0 0 0 2.036-2.036c.56-1.407.431-4.758.431-6.317 0-1.559.129-4.906-.43-6.317h-.003zm-8.35 11.808A5.491 5.491 0 1 1 20.982 15a5.484 5.484 0 0 1-5.49 5.491zm5.717-9.93a1.282 1.282 0 1 1 1.281-1.282 1.28 1.28 0 0 1-1.278 1.284l-.003-.003zM27.277 0H3.706A3.214 3.214 0 0 0 .492 3.214v23.572A3.214 3.214 0 0 0 3.706 30h23.571a3.214 3.214 0 0 0 3.215-3.214V3.214A3.214 3.214 0 0 0 27.277 0zm-1.146 19.42c-.086 1.716-.478 3.237-1.731 4.486-1.253 1.25-2.772 1.65-4.487 1.731-1.768.1-7.07.1-8.839 0-1.716-.086-3.232-.479-4.487-1.73-1.254-1.253-1.649-2.774-1.73-4.487-.1-1.77-.1-7.072 0-8.84.086-1.716.473-3.237 1.73-4.486 1.258-1.25 2.777-1.645 4.487-1.727 1.769-.1 7.07-.1 8.84 0 1.716.087 3.236.48 4.486 1.731 1.25 1.253 1.65 2.774 1.731 4.49.1 1.763.1 7.061 0 8.832z"})}),zn=()=>{const t=d(i.IconSocialTwitterAriaLabel);return e.jsx("svg",{viewBox:"0 0 24 24","aria-label":t,role:"img",children:e.jsx("path",{d:"M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z",fill:"
1currentColor"})})},Ce={SOCIAL_MEDIA_LINKS:"social_media_links",FACEBOOK:"social_media_links__facebook",TWITTER:"social_media_links__twitter",INSTAGRAM:"social_media_links__instagram"},$n=o(N).withConfig({componentId:"sc-1e14i1-0"})(["display:grid;grid-auto-flow:column;grid-template-columns:repeat(auto-fit,30px);gap:30px;& > ","{& > svg{display:block;width:30px;}}"],Q),Wn=({facebookUrl:t,instagramUrl:n,twitterUrl:a,iconGroupingsFor:r})=>{const l=d(i.SocialMediaFacebookLabel),c=d(i.SocialMediaTwitterLabel),s=d(i.SocialMediaInstagramLabel);return!t&&!n&&!a?null:e.jsxs($n,{role:"group","aria-label":`social media${r?` for ${r}`:""}`,"data-testid":Ce.SOCIAL_MEDIA_LINKS,children:[t&&e.jsx(Q,{href:t,"aria-label":l,target:"_blank","data-testid":Ce.FACEBOOK,children:e.jsx(Fn,{})}),a&&e.jsx(Q,{href:a,"aria-label":c,target:"_blank","data-testid":Ce.TWITTER,children:e.jsx(zn,{})}),n&&e.jsx(Q,{href:n,"aria-label":s,target:"_blank","data-testid":Ce.INSTAGRAM,children:e.jsx(Hn,{})})]})},me={LOCAL_INFO:"merchant_details__local_info",LOCATION:"merchant_details__local_info__location",ADDRESS:"merchant_details__local_info__address",PHONE:"merchant_details__local_info__phone",DIRECTIONS:"merchant_details__local_info__directions",WEBSITE:"merchant_details__local_info__website",HOURS:"merchant_details__local_info__hours"},Ht="15px",je=o(N).withConfig({componentId:"sc-1okneqg-0"})(["padding-bottom:",";"],Ht),Gn=o(de).withConfig({componentId:"sc-1okneqg-1"})(["padding-bottom:",";"],Ht),Zn=o(x).withConfig({componentId:"sc-1okneqg-2"})(["& > span{display:block;}"]),Yn=({children:t})=>{const n=d(i.PartnerDefaultCasing),{merchant:a}=m.useContext(ae),r=d(i.MerchantCTAGetDirectionsLabel,{replacements:{MERCHANT_NAME:a?.name||""}}),l=d(i.PageMerchantDetailLocalInfoLocationTitle),c=d(i.PageMerchantDetailLocalInfoContactTitle),s=d(i.PageMerchantDetailLocalInfoHoursTitle),h=Ka({address:a?.location.address}),_=Kt({number:a?.details?.phone});if(!a)return null;const{details:T,name:b,location:f,media:R}=a,I=`${b},${h?.line1},${h?.line3}`,C=`https://www.google.com/maps/dir/?api=1&destination=${encodeURIComponent(I)}`;return e.jsxs("section",{"data-testid":me.LOCAL_INFO,"aria-label":`${b} local information`,children:[f&&h&&e.jsx(je,{children:e.jsx(Gn,{title:l,testId:me.LOCATION,paddingBottom:"none",children:e.jsxs(e.Fragment,{children:[e.jsx(N,{paddingBottom:"xs",role:"group","aria-label":`address for ${b}`,"data-testid":me.ADDRESS,children:e.jsxs(Zn,{bodyTextVariant:p.Md,weight:u.A,children:[e.jsx("span",{children:h.line1}),e.jsx("span",{children:h.line2}),e.jsx("span",{children:h.line3})]})}),e.jsx(je,{children:e.jsxs(Q,{"data-testid":me.DIRECTIONS,target:"_blank",href:C,"aria-label":r,svgMargin:"0 0 0 5px",children:[q("Get directions",n),e.jsx(Ye,{})]})})]})})}),e.jsx(de,{title:c,isTitleHidden:!0,testId:"contact",children:e.jsxs(e.Fragment,{children:[_&&e.jsx(je,{children:e.jsxs(Q,{href:_.href,"data-testid":me.PHONE,"aria-label":`Telephone number for ${b}: ${_.formatted}`,svgMargin:"0 0 0 5px",children:[_.formatted,e.jsx(Nn,{})]})}),R?.websiteUrl&&e.jsx(je,{children:e.jsxs(Q,{"data-testid":me.WEBSITE,target:"_blank",href:R.websiteUrl,"aria-label":`Website for ${b}. Opens in a new tab`,svgMargin:"0 0 0 5px",children:["Website",e.jsx(Ye,{})]})}),R&&e.jsx(Wn,{twitterUrl:R.twitterUrl,facebookUrl:R.facebookUrl,instagramUrl:R.instagramUrl,iconGroupingsFor:b})]})}),T?.hours&&e.jsx(de,{title:s,testId:me.HOURS,children:e.jsx(Un,{hours:T.hours,name:b})}),t]})},ge={BENEFIT_GUIDELINES:"merchant_details__local_info__details__benefit_guidelines",PAYMENT_OPTIONS:"merchant_details__local_info__details__payment_options",CUISINES:"merchant_details__local_info__details__cuisine",ESTABLISHMENT_TYPE:"merchant_details__local_info__details__establishment_type",FEATURES:"merchant_details__local_info__details__features",OPEN_FOR:"merchant_details__local_info__details__open_for"},Ae=({children:t,title:n,testId:a})=>e.jsx(de,{title:n,testId:a,bodyTextVariant:p.Md,headingLevel:"h3",paddingBottom:"sm",children:e.jsx(x,{as:"p",bodyTextVariant:p.Md,weight:u.A,children:t})}),qn=({details:t,rewards:n})=>{if(!t&&!n)return null;const a=m.useContext(J),r=d(i.PartnerDefaultCasing),l=d(i.MerchantLimitedVisits,{replacements:{MAX_SPEND:"$"+n?.monthlyLimits?.maximumSpend?.toString()||"--",MAX_VISITS:n?.monthlyLimits?.maximumVisits?.toString()||"--"}}),c=d(i.MerchantUnlimitedVisits,{replacements:{MAX_SPEND:"$"+n?.monthlyLimits?.maximumSpend?.toString()||"--",MAX_VISITS:n?.monthlyLimits?.maximumVisits?.toString()||"--"}}),{acceptedCards:s,cuisines:h,features:_}=t,T=A=>{const k=_?.filter(y=>y.category===A);return k?k[0]:void 0},b=T("Establishment Type"),f=T("Features"),R=T("Open For"),I=A=>A.map(y=>y.trim()).join(", "),C=(A,k)=>{const{category:y,types:$}=A;if(!y&&!$)return;const v=q(y?.toLowerCase(),r);return e.jsx(Ae,{title:v,testId:k,children:e.jsx(e.Fragment,{children:I($)})})},S=(()=>
1{if(!n||!n.monthlyLimits||!n.monthlyLimits.benefitType)return"";const{monthlyLimits:A}=n;let k=A.benefitType===Qt.Limited?l:c;return k=k.charAt(0).toUpperCase()+k.slice(1),Jt(a,k)})();return e.jsxs(e.Fragment,{children:[S&&e.jsx(Ae,{title:q("Benefit Guidelines",r),testId:ge.BENEFIT_GUIDELINES,children:e.jsx(e.Fragment,{children:S})}),s&&s.length>0&&e.jsx(Ae,{title:q("Payment Options",r),testId:ge.PAYMENT_OPTIONS,children:e.jsx(e.Fragment,{children:I(s)})}),h&&h.length>0&&e.jsx(Ae,{title:h.length===1?q("Cuisine",r):q("Cuisines",r),testId:ge.CUISINES,children:e.jsx(e.Fragment,{children:I(h)})}),_&&e.jsxs(e.Fragment,{children:[b&&C(b,ge.ESTABLISHMENT_TYPE),f&&C(f,ge.FEATURES),R&&C(R,ge.OPEN_FOR)]})]})},xt="SCARequired",Xn="EmailBlocked",Kn="OverlappingReservation",Qn=async({rid:t,date:n,time:a,partySize:r,rnMid:l})=>{const c=`api/openTable/restaurants/${t}/availability`,s={startDateTime:`${n}T${a}`,partySize:r,rnMid:l},h=await yt.get(c,{searchParams:s,...St,...wt});return h.ok?h.json():Promise.reject(h.status)},Jn=async({rid:t,rnMid:n,timesAvailable:{time:a,attribute:r},partySize:l,email:c,firstName:s,lastName:h,phoneNumber:_,special:T,creditCard:b})=>{const f=`api/openTable/reservations/${t}`,R={rnMid:parseInt(n),partySize:l,startDateTime:a,reservationAttribute:r,userDetails:{email:c,firstName:s,lastName:h,phoneNumber:Qa(_)},specialRequest:T,restaurantEmailMarketingOptIn:!1,creditCard:b||void 0},I=await yt.post(f,{json:R,...St,...wt});return I.ok?I.json():I.status===500?I.json().then(Promise.reject.bind(Promise)):Promise.reject(I.status)},ei=o(ea).withConfig({componentId:"sc-p7zkxt-0"})(["background-color:",";background-size:50% 50%;border:",";color:",";height:0;padding-bottom:72%;width:100%;"],t=>t.theme.merchantImage.defaultBackgroundColor,t=>t.theme.merchantImage.defaultBorder,t=>t.theme.merchantImage.defaultForegroundColor),ti=({src:t,name:n})=>{const a=m.useContext(J),r=d(i.MerchantImageAltText,{replacements:{MERCHANT_NAME:n}});return e.jsx(ei,{"data-testid":"merchant_image__default",path:a?.merchantImage.defaultPath||"",children:e.jsx(Et,{alt:r,"data-testid":"merchant_image__featured",onError:l=>l.currentTarget.style.display="none",src:t})})},bt=20,X={root:"merchant_detail_reservation_opentable",availability:{root:"merchant_detail_reservation_opentable_availability",form:"merchant_detail_reservation_opentable_availability_form",date:"merchant_detail_reservation_opentable_availability_form_date",time:"merchant_detail_reservation_opentable_availability_form_time",party:"merchant_detail_reservation_opentable_availability_form_party_size",fetching:"merchant_detail_reservation_opentable_availability_fetch",error:"merchant_detail_reservation_opentable_availability_fetch_error",slot:"merchant_detail_reservation_opentable_availability_time",more:"merchant_detail_reservation_opentable_availability_more"},logo:"merchant_detail_reservation_opentable_logo"},ai=o.svg.withConfig({componentId:"sc-y17ukv-0"}
1)(["height:100%;.cls-1{fill:#da3743;}.cls-2{fill:#333;}"]),ni=(t,n)=>{let a;switch(t){case"BelowMinPartySize":a=xe(i.MerchantReservationAvailabilityTooSmall,n);break;case"AboveMaxPartySize":a=xe(i.MerchantReservationAvailabilityTooBig,n);break;case"TooFarInAdvance":a=xe(i.MerchantReservationAvailabilityTooFar,n);break;case"NotFarEnoughInAdvance":a=xe(i.MerchantReservationAvailabilityTooClose,n);break;default:a=xe(i.MerchantReservationAvailabilityNone,n)}return a},O=(t,n,a)=>ta([{eventName:t,url:window.location.href,memberId:n?.publicId||qe(Ct.RN_PUBLIC_ID),merchantId:a?.id.length?parseInt(a.id):void 0}]).then(()=>{}),zt=()=>e.jsxs(ai,{"data-testid":X.logo,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 428 95",children:[e.jsx("path",{className:"cls-1",d:"M83.36 0a47.5 47.5 0 1 0 47.46 47.5A47.48 47.48 0 0 0 83.36 0Zm0 59.37A11.87 11.87 0 1 1 95.22 47.5a11.87 11.87 0 0 1-11.87 11.87ZM0 47.5a11.87 11.87 0 1 1 11.87 11.87A11.87 11.87 0 0 1 0 47.5"}),e.jsx("path",{className:"cls-2",d:"M243.82 38.41a12.14 12.14 0 0 1 12.42 12.54c0 .41-.06 1.35-.12 1.76a1.38 1.38 0 0 1-1.29 1.23h-17.34a6.5 6.5 0 0 0 6.74 6.27 9 9 0 0 0 5.8-2 1.13 1.13 0 0 1 1.76 0l2.28 3a1.14 1.14 0 0 1-.12 1.76 15.27 15.27 0 0 1-10.08 3.69c-8.08 0-13.71-6.45-13.71-14.19s5.64-14.06 13.66-14.06Zm5 10.73a5 5 0 0 0-5.21-4.69c-3.28 0-5.39 2-5.74 4.69h11Zm65.6-21.16H286.9a1.11 1.11 0 0 0-1.11 1.11v4.81a1.11 1.11 0 0 0 1.11 1.11h9.94v30a1.15 1.15 0 0 0 1.16 1.07h5.45a1.15 1.15 0 0 0 1.11-1.11v-30h9.94a1.11 1.11 0 0 0 1.11-1.11v-4.77a1.11 1.11 0 0 0-1.15-1.11Zm41.45 10.44a19.15 19.15 0 0 0-6.62 1.17V29.26a1.34 1.34 0 0 0-1.25-1.28h-4.75a1.39 1.39 0 0 0-1.25 1.28v35.53a1.34 1.34 0 0 0 1.29 1.29H346a1.3 1.3 0 0 0 1.3-1.29v-2.1a11.83 11.83 0 0 0 9 4c7.4.04 12.7-6.41 12.7-14.19 0-7.88-5.07-14.09-13.09-14.09Zm-.64 21.63a6.21 6.21 0 0 1-6-3.75v-9.68a10.7 10.7 0 0 1 5.62-1.52c4.45 0 6.74 3.63 6.74 7.45s-2.11 7.49-6.33 7.49Zm45.85-21.63a12.14 12.14 0 0 1 12.42 12.54c0 .41-.06 1.35-.12 1.76a1.38 1.38 0 0 1-1.29 1.23h-17.31a6.5 6.5 0 0 0 6.74 6.27 9 9 0 0 0 5.8-2 1.13 1.13 0 0 1 1.76 0l2.28 3a1.14 1.14 0 0 1-.12 1.76 15.27 15.27 0 0 1-10.08 3.69c-8.08 0-13.71-6.45-13.71-14.19s5.63-14.07 13.66-14.07Zm5 10.73a5 5 0 0 0-5.21-4.69c-3.28 0-5.39 2-5.74 4.69h11ZM212.95 38.41a11.69 11.69 0 0 0-8.84 4v-2.12a1.3 1.3 0 0 0-1.29-1.29h-2.88a1.3 1.3 0 0 0-1.29 1.29v35.52a1.34 1.34 0 0 0 1.29 1.29h4.75a1.39 1.39 0 0 0 1.31-1.29v-10.2a20.1 20.1 0 0 0 6.5 1.11c8.08 0 13.42-6.21 13.42-14.13-.02-8.2-5.59-14.18-12.97-14.18Zm-1.35 21.63a10.7 10.7 0 0 1-5.6-1.54v-9.65a6.21 6.21 0 0 1 6-3.75c4.22 0 6.39 3.69 6.39 7.5s-2.34 7.44-6.79 7.44Zm64.5-21.63a10.92 10.92 0 0 0-8.71 3.91v-2a1.3 1.3 0 0 0-1.29-1.29H263a1.3 1.3 0 0 0-1.29 1.29v24.5a1.34 1.34 0 0 0 1.29 1.26h4.34c1.29 0 1.7-.29 1.7-1.29V49.31a6 6 0 0 1 5.86-4.22c3.28 0 4.69 2.17 4.69 5.69v14a1.3 1.3 0 0 0 1.29 1.29h4.75a1.34 1.34 0 0 0 1.29-1.29v-14c.02-6.57-2.21-12.37-10.82-12.37Zm49.18 0a34.18 34.18 0 0 0-9.28 1.35 1.24 1.24 0 0 0-.88 1.64l.59 3a1.17 1.17 0 0 0 1.52 1.17 33.86 33.86 0 0 1 7.62-1c2.87 0 3.87 1.64 3.75 5.1a19.85 19.85 0 0 0-5.21-.76c-6.85 0-10.78 3.69-10.78 8.5 0 5.8 3.75 9.26 9.14 9.26a11.85 11.85 0 0 0 8.49-3.4v1.46a1.3 1.3 0 0 0 1.29 1.29h2.64a1.3 1.3 0 0 0 1.29-1.29V50.19c.02-7.38-1.74-11.78-10.17-11.78Zm3.16 20a5.81 5.81 0 0 1-4.86 2.87 3.57 3.57 0 0 1-3.92-3.78c0-2.4 1.7-3.87 4.8-3.87a10.79 10.79 0 0 1 4 .82v4ZM173.86 28a19.45 19.45 0 0 0-19.37 19.5 19.4 19.4 0 0 0 38.8 0A19.49 19.49 0 0 0 173.86 28Zm0 7.53a12.09 12.09 0 0 1 11.9 12 11.87 11.87 0 1 1-11.9-12.03Zm208.84 30.6a1.31 1.31 0 0 0 1.3-1.29v-4.77a1.3 1.3 0 0 0-1.29-1.29h-.21a1.25 1.25 0 0 1-1.16-1.16V29.36a1.39 1.39 0 0 0-1.34-1.29h-4.7a1.39 1.39 0 0 0-1.3 1.29V61.5a5 5 0 0 0 4.65 4.66h4Zm34.83-22.22a5.24 5.24 0 1 1 10.47 0 5.24 5.24 0 1 1-10.47 0Zm9.36 0a4.14 4.14 0 1 0-8.24 0 4.13 4.13 0 1 0 8.24 0Zm-6.13-2.89h2.11c1.17 0 2.17.47 2.17 1.81a1.64 1.64 0 0 1-1 1.53l1.28 2.31H424l-1-1.94h-1.14v1.94h-1.14v-5.65Zm1.86 2.81a1 1 0 0 0 1.19-.95.91.91 0 0 0-1.14-.92h-.78v1.86h.72Z"})]}),ft={login:"merchant_detail_reservation_modal_login",login_cta:"merchant_detail_reservation_modal_login_cta"};var P=(t=>
1(t.IN_PROGRESS="IN_PROGRESS",t.SUBMITTING="SUBMITTING",t.SUCCESS="SUCCESS",t.ERROR="ERROR",t.OVERLAPPING_RESERVATION_ERROR="OVERLAP",t.USER_FRAUD_ERROR="BLOCKED",t))(P||{});const Pe=o.div.withConfig({componentId:"sc-19f08sf-0"})(["border:",";border-radius:",";padding:",";"],t=>t.theme.border.OUTLINE,t=>t.theme.border.RADIUS,M.sm),ii=o.div.withConfig({componentId:"sc-19f08sf-1"})(["display:grid;grid-template-columns:minmax(auto,375px);gap:",";text-align:left;"],M.md),si=o.div.withConfig({componentId:"sc-19f08sf-2"})(["& > * + *{margin-top:",";}"],M.sm),ri=o(x).withConfig({componentId:"sc-19f08sf-3"})(["padding:",";background:",";color:white;display:grid;gap:",";grid-template-columns:30px auto;justify-content:center;"],M.md,t=>t.theme?.color.success,M.sm),oi=o.div.withConfig({componentId:"sc-19f08sf-4"})([""]),li=o.div.withConfig({componentId:"sc-19f08sf-5"})(["text-align:left;max-width:350px;& > * + *{margin-top:",";}"],M.sm);o(x).withConfig({componentId:"sc-19f08sf-6"})(["padding:",";border:",";border-radius:",";"],M.md,t=>t.theme.border.OUTLINE,t=>t.theme.border.RADIUS);const ci=o(Pe).withConfig({componentId:"sc-19f08sf-7"})(["& > * + *{margin-top:",";}"],M.sm),di=o.div.withConfig({componentId:"sc-19f08sf-8"})(["& > * + *{margin-top:",";}"],M.sm),hi=o(x).withConfig({componentId:"sc-19f08sf-9"})(["padding:",";background:",";color:white;display:grid;gap:",";grid-template-columns:30px auto;justify-content:center;","{color:inherit;}"],M.md,t=>t.theme?.color.error,M.sm,oe),mi=o.div.withConfig({componentId:"sc-19f08sf-10"})([""]),pi=o.div.withConfig({componentId:"sc-19f08sf-11"})(["text-align:left;max-width:350px;& > * + *{margin-top:",";}"],M.sm),ui=()=>{const{merchant:t}=m.useContext(ae),n=jt(),a=z(i.MerchantReservationModalLoginTitle),r=z(i.MerchantReservationModalLoginCopy),l=z(i.AuthLinksSignInText),c=s=>{s.preventDefault(),s.stopPropagation(),aa(Ct.RN_LOGIN_REDIRECT,`${De.MERCHANT_DETAIL}/${t?.id}`,At),n(De.LOGIN)};return e.jsxs(ii,{"data-testid":ft.login,children:[e.jsx(x,{bodyTextVariant:p.Md,weight:u.A,children:a}),e.jsx(x,{bodyTextVariant:p.Md,weight:u.A,children:r}),e.jsx(Ke,{"data-testid":ft.login_cta,onClick:s=>{c(s)},buttonVariant:re.Primary,children:l})]})},te={root:"merchant_detail_reservation_opentable_modal",title:"merchant_detail_reservation_opentable_modal_title",details:"merchant_detail_reservation_opentable_modal_details",modify:"merchant_detail_reservation_opentable_modal_modify_link",form:"merchant_detail_reservation_opentable_modal_form",submitting:"merchant_detail_reservation_opentable_modal_submitting",success:"merchant_detail_reservation_opentable_modal_success",success_cta:"merchant_detail_reservation_opentable_modal_success_cta",error:"merchant_detail_reservation_opentable_modal_error",partnership:"merchant_detail_reservation_opentable_modal_partnership"},vt=200,gi=o.div.withConfig({componentId:"sc-6y6c8b-0"})(["& > * + *{display:grid;margin-top:",";}"],M.sm),_i=o(ve).withConfig({componentId:"sc-6y6c8b-1"})(["display:flex;"]),xi=o(Pe).withConfig({componentId:"sc-6y6c8b-2"})(["display:grid;grid-template-columns:35% auto;gap:",";align-items:start;text-align:left;"],M.sm),bi=o.div.withConfig({componentId:"sc-6y6c8b-3"})(["align-content:center;"]),fi=o.div.withConfig({componentId:"sc-6y6c8b-4"})(["& > * + *{margin-top:",";}span{display:block;}"],M.sm),vi=o(Pe).withConfig({componentId:"sc-6y6c8b-5"})(["text-align:left;padding:",";& > * + *{margin-top:",";}form{display:grid;gap:0 ",';grid-template-areas:"instructions" "firstName" "lastName" "email" "phone" "creditCard" "special" "cta" "legal";align-items:start;.form_builder__required{grid-area:instructions;}.form_field__firstName{grid-area:firstName;}.form_field__lastName{grid-area:lastName;}.form_field__email{grid-area:email;}.form_field__phoneNumber{grid-area:phone;}.form_field__creditCard{grid-area:creditCard;}.form_field__special{grid-area:special;}.form_builder__actions{grid-area:cta;display:grid;}@media (min-width:','){grid-template-areas:"instructions instructions" "firstName lastName" "email email" "phone phone" "creditCard creditCard" "special special" "cta cta" "legal legal";}}'],M.sm,M.sm,M.xs,t=>t.theme.breakpoints.largeMobile),Ti=({status:t,onTryAgainClick:n})=>{const a=d(i.MerchantReservationModalOverlapErrorText),r=d(i.MerchantReservationModalOverlapErrorLink),l=d(i.MerchantReservationModalUserFraudErrorText),c=d(i.MerchantReservationModalUserFraudErrorLink),s=d(i.MerchantReservationModalGeneralErrorText),h=d(i.MerchantReservationModalGeneralErrorLink),_=T=>{T.preventDefault(),n(T)};return e.jsx(di,{"data-testid":te.error,children:e.jsxs(hi,{bodyTextVariant:p.Md,weight:u.A,children:[e.jsx(mi,{children:e.jsx(na,{})}),e.jsx(pi,{children:e.jsx("span",{children:t===P.OVERLAPPING_RESERVATION_ERROR?e.jsxs(e.Fragment,{children:[e.jsx("strong",{children:a})," ",e.jsx(oe,{onClick:_,children:r})]}):t===P.USER_FRAUD_ERROR?e.jsxs(e.Fragment,{children:[e.jsx("strong",{children:l})," ",e.jsx(oe,{onClick:_,children:c})]}):e.jsxs(e.Fragment,{children:[e.jsx("strong",{children:s})," ",h]})})})]})})},Mi=()=>{const t=z(i.MerchantReservationModalFormLegalOpenTableLoading);return e.jsx(Pe,{style:{textAlign:"center"},children:e.jsxs(x,{bodyTextVariant:p.Md,weight:u.A,"data-testid":te.submitting,children:[e.jsx(ia,{border:oa.md,size:ra.md,margin:sa.sm}),t]})})},Ii=({handleSuccess:t,handleError:n})=>{const a=la(),r=ca(),l=da(),[c,s]=m.useState(!1),h={base:{fontFamily:`${l.bodyText.fontFamily}`,fontWeight:l.bodyText.weights[u.A].fontWeight,color:l.bodyText.weights[u.A].color,"::placeholder":{fontFamily:`${l.bodyText.fontFamily}`,fontWeight:l.bodyText.weights[u.A].fontWeight,color:l.bodyText.weights[u.A].color}}},_=async()=>
1{if(!a||!r)return;const T=r.getElement(at);if(!T)return;const b=await a.createToken(T);b.token&&b.token.card?t({token:b.token.id,last4:b.token.card.last4}):b.error&&n(b.error)};return e.jsx(ha,{"data-testid":"stripe_card_input__wrapper",children:c?e.jsx(ma,{message:"Unable to load stripe"}):a?e.jsx(at,{onBlur:_,options:{style:h,hideIcon:!0},onLoadError:()=>s(!0)}):null})},Ei={STRIPE_LEGAL_DISCLAIMER:"stripe_legal_disclaimer"},Ri=()=>{const t=z(i.StripeLegalDisclaimerText);return e.jsx(x,{bodyTextVariant:p.Sm,weight:u.A,"data-testid":Ei.STRIPE_LEGAL_DISCLAIMER,children:t})},yi=({onSubmit:t,chosenAvailability:n,partySize:a})=>{const{merchant:r}=m.useContext(ae),{member:l}=m.useContext(Ne),c=z(i.MerchantReservationModalFormCTA),s=d(i.MemberFormFirstNameLabel),h=d(i.MemberFormLastNameLabel),_=d(i.MemberFormEmailLabel),T=m.useMemo(()=>({rid:r?.reservationProviders?.openTable?.rid||0,rnMid:r?.id||"",timesAvailable:n,partySize:parseInt(a),email:l?.email||"",firstName:l?.firstName||"",lastName:l?.lastName||"",phoneNumber:l?.phoneNumber||"",special:"",creditCard:null}),[n,l?.email,l?.firstName,l?.lastName,l?.phoneNumber,r?.id,r?.reservationProviders?.openTable?.rid,a]),b=pa({defaultValues:T,mode:"onBlur"}),{formState:{errors:f},watch:R}=b,I=R("special"),C={inputError:f.creditCard,inputLabel:"Credit Card Required",inputDescription:e.jsx(x,{bodyTextVariant:p.Sm,weight:u.A,children:"This restaurant requires a credit card to secure this reservation."}),inputName:"creditCard",inputType:ue.Controlled,registerOptions:{required:!0},render:({field:E})=>e.jsxs(e.Fragment,{children:[e.jsx(Ii,{handleSuccess:S=>{b.clearErrors(E.name),b.setValue(E.name,S)},handleError:S=>{b.setValue(E.name,null),b.setError(E.name,{type:S.type,message:S.message})}}),e.jsx(Ri,{})]})};return e.jsxs(vi,{"data-testid":te.form,children:[e.jsx(ua,{formHasLegalCheckbox:!0,formFields:[{inputError:f.firstName,inputLabel:s,inputName:"firstName",inputOptions:{autoComplete:ye.GivenName},inputType:ue.Text,registerOptions:{required:!0,setValueAs:E=>E.trim()}}
1,{inputError:f.lastName,inputLabel:h,inputName:"lastName",inputOptions:{autoComplete:ye.FamilyName},inputType:ue.Text,registerOptions:{required:!0,setValueAs:E=>E.trim()}},{inputError:f.email,inputLabel:_,inputName:"email",inputOptions:{inputMode:"email",autoComplete:ye.Email},inputType:ue.Email,registerOptions:{required:!0,setValueAs:E=>E.trim(),pattern:{value:nt,message:`Please enter a valid ${_.toLowerCase()}.`},validate:E=>!!E&&ga(E.toString(),nt)}},{inputError:f.phoneNumber,inputLabel:"Phone number",inputName:"phoneNumber",inputOptions:{inputMode:"tel",autoComplete:ye.Tel},inputType:ue.Tel,registerOptions:{required:!0,setValueAs:E=>E.trim(),pattern:{value:mt,message:"Please enter a valid phone number."},validate:E=>!!E&&Ja(E.toString(),mt)}},...n.creditCardRequired?[C]:[],{inputError:f.special,inputLabel:"Special requests (optional)",inputName:"special",inputType:ue.Text,registerOptions:{required:!1,maxLength:vt},inputDescription:e.jsxs(x,{bodyTextVariant:p.Sm,weight:u.A,children:[I?.length||0," / ",vt," ","character limit"]})}],formName:"Merchant Reservation with OpenTable",onSubmit:{fn:async E=>{t(E)},text:c},useFormReturn:b}),e.jsxs(x,{bodyTextVariant:p.Md,weight:u.A,children:['By clicking "',c,'" you also agree to the OpenTable'," ",e.jsx(oe,{target:"_blank",href:"https://www.opentable.com/legal/terms-and-conditions",children:"Terms of Use"})," ","and"," ",e.jsx(oe,{target:"_blank",href:"https://www.opentable.com/legal/privacy-policy",children:"Privacy Policy"})," ","and if you used a credit card for the booking then also the Stripe"," ",e.jsx(oe,{target:"_blank",href:"https://stripe.com/legal/consumer",children:"Terms of Use"})," ","and"," ",e.jsx(oe,{target:"_blank",href:"https://stripe.com/privacy",children:"Privacy Policy"}),"."]})]})},wi=({confirmationNumber:t})=>{const n=jt(),a=z(i.MerchantReservationModalSuccessCTADescription),r=z(i.MerchantReservationModalSuccessCTAText),l=()=>{n([De.ACCOUNT_CENTER,De.ACCOUNT_CENTER_MANAGE_CARDS].join(""))};return e.jsxs(si,{"data-testid":te.success,children:[e.jsxs(ri,{bodyTextVariant:p.Md,weight:u.A,children:[e.jsx(oi,{children:e.jsx(_a,{})}),e.jsxs(li,{children:[e.jsxs("span",{children:[e.jsx("strong",{children:"Your reservation is confirmed!"})," You'll receive email confirmation from OpenTable."]}),e.jsxs("p",{children:[e.jsx("strong",{children:"Confirmation number"}),":"," ",t||"xxxxxx"]}),e.jsx("p",{children:"To earn the bonus, make sure you complete your reservation by dining at the restaurant."})]})]}),e.jsxs(ci,{children:[e.jsx(x,{bodyTextVariant:p.Md,weight:u.A,children:a}),e.jsx(Ke,{onClick:()=>{l()},buttonVariant:re.Primary,"data-testid":te.success_cta,children:r})]})]})},Si=({handleClose:t,chosenAvailability:n,partySize:a,defaultSearchPerformed:r,overrideStatus:l})=>{const{member:c}=m.useContext(Ne),{merchant:s}=m.useContext(ae),[h,_]=m.useState(l!==void 0?l:P.IN_PROGRESS),T=z(i.MerchantReservationModalTitle),b=d(i.MerchantReservationProviderLegal),f=d(i.MerchantReservationModalModifyLinkText),R=Pt(s?.id||"",s?.origin||Lt.RN,s?.images),I=v=>new Date(Date.parse(v)).toLocaleDateString(["en-US"],{weekday:"long",year:"numeric",month:"long",day:"numeric"}),C=v=>new Date(Date.parse(v)).toLocaleTimeString(["en-US"],{timeStyle:"short"}),E=v=>{v.preventDefault(),t()},S=()=>{r?n.creditCardRequired?O(D.openTableResDefaultSearchCcBookingSuccess,c,s):O(D.openTableResDefaultSearchBookingSuccess,c,s):n.creditCardRequired?O(D.openTableResUserSearchCcBookingSuccess,c,s):O(D.openTableResUserSearchBookingSuccess,c,s)},A=v=>{v===xt&&O(D.openTableRes424StripeFailedDependency,c,s),r?n.creditCardRequired?O(D.openTableResDefaultSearchCcBookingFailure,c,s):O(D.openTableResDefaultSearchBookingFailure,c,s):n.creditCardRequired?O(D.openTableResUserSearchCcBookingFailure,c,s):O(D.openTableResUserSearchBookingFailure,c,s)},k=()=>{r?n.creditCardRequired?O(D.openTableResDefaultSearchCcUserSubmit,c,s):O(D.openTableResDefaultSearchUserSubmit,c,s):n.creditCardRequired?O(D.openTableResUserSearchCcUserSubmit,c,s):O(D.openTableResUserSearchUserSubmit,c,s)},y=et({mutationFn:Jn,mutationKey:[s?.id+"-reserve"],retry:!1,onSuccess:()=>S(),onError:v=>A(v)}),$=v=>{y.mutate({...v,phoneNumber:v.phoneNumber.replace(/[^\d]/g,"")}),k()};return m.useEffect(()=>
1{if(l===void 0)switch(y.status){case"pending":_(P.SUBMITTING),Dt(fe);break;case"success":_(P.SUCCESS);break;case"error":y.error===Kn?_(P.OVERLAPPING_RESERVATION_ERROR):y.error===Xn?_(P.USER_FRAUD_ERROR):(y.error,_(P.ERROR));break;default:_(P.IN_PROGRESS);break}},[y,l]),e.jsxs(gi,{"data-testid":te.root,children:[e.jsx(_i,{titleVariant:ce.Sm,"data-testid":te.title,children:T}),c?e.jsxs(e.Fragment,{children:[e.jsxs(xi,{children:[e.jsx(bi,{children:R?e.jsx(ti,{src:xa(s?.images?.imageBaseUrl,R),name:s?.name||""}):null}),e.jsxs(fi,{"data-testid":te.details,children:[e.jsx(x,{bodyTextVariant:p.Lg,weight:u.B,children:s?.name}),e.jsxs(x,{bodyTextVariant:p.Sm,weight:u.A,children:[e.jsx("span",{children:I(n.time)}),e.jsxs("span",{children:[C(n.time)," (",n.attribute.replace(/default/gi,"standard").toLocaleLowerCase(),")"]}),e.jsxs("span",{children:[a," guest",a!=="1"?"s":null]})]}),[P.IN_PROGRESS,P.OVERLAPPING_RESERVATION_ERROR,P.USER_FRAUD_ERROR,P.ERROR].includes(h)?e.jsx(x,{bodyTextVariant:p.Sm,weight:u.A,children:e.jsx(Q,{onClick:E,"data-testid":te.modify,children:f})}):null]})]}),h===P.SUBMITTING?e.jsx(Mi,{}):null,h===P.IN_PROGRESS?e.jsx(yi,{chosenAvailability:n,partySize:a,onSubmit:$}):null,h===P.SUCCESS?e.jsx(wi,{confirmationNumber:y.data?.confirmationNumber}):null,[P.OVERLAPPING_RESERVATION_ERROR,P.USER_FRAUD_ERROR,P.ERROR].includes(h)?e.jsx(Ti,{status:h,onTryAgainClick:t}):null]}):e.jsx(ui,{}),e.jsx(N,{paddingTop:"md",children:e.jsxs(Ot,{bodyTextVariant:p.Sm,weight:u.A,"data-testid":te.partnership,children:[e.jsx("span",{children:b}),e.jsx(zt,{})]})})]})},Ci=({showModal:t,handleClose:n,openTable:a,overrideStatus:r})=>{const l=d(i.MerchantReservationModalAriaLabel),c=()=>{n()};return t?e.jsx(kt,{handleClose:c,"aria-label":l,children:a?.chosenAvailability?e.jsx(Si,{handleClose:c,chosenAvailability:a.chosenAvailability,partySize:a.partySize,defaultSearchPerformed:a.defaultSearchPerformed,overrideStatus:r}):null}):null},ji=()=>{const t=m.useContext(J),n=d(i.MerchantReservationBonusAmount),a=d(i.MerchantReservationBonusType),r=d(i.MerchantReservationBonusCondition),l=d(i.MerchantReservationBonusConditionLegal),c=d(i.MerchantReservationBonusConditionLegalLinkUrl),s=d(i.MerchantReservationBonusConditionLegalLinkText),h=d(i.MerchantReservationBonusMoreInfoLabel),_=t?.bodyText.sizes[p.Md].fontSize;return e.jsxs(ba,{"data-testid":le.bonus.root,children:[e.jsx(fa,{titleVariant:ce.Sm,isReverse:!0,"data-testid":le.bonus.amount,children:n}),e.jsxs("div",{children:[e.jsx(x,{bodyTextVariant:p.XL,weight:u.B,"data-testid":le.bonus.type,children:a}),e.jsxs(x,{bodyTextVariant:p.Sm,weight:u.A,"data-testid":le.bonus.condition,className:"nowrap",children:[r,e.jsxs(Be,{triggerContent:e.jsx(Te,{"aria-label":h,height:_,width:_,iconButtonVariant:Me.Contrast,"data-testid":le.bonus.tooltip,children:e.jsx(Ie,{})}),popoverId:le.bonus.tooltip,children:[l," ",e.jsx(oe,{"data-testid":le.bonus.tooltip_link,to:c,children:s})]})]})]})]})},Ai=(t=new Date().toISOString().split("T")[0])=>{const n=new Date,a=n.toISOString().split("T")[0],r=n.getHours(),l=n.getMinutes();return Array.from({length:24},(s,h)=>h).filter(s=>t===a?s>=r:!0).map(s=>{const h=s.toString().padStart(2,"0"),_=s===0?"12":s>12?(s-12).toString():s.toString(),T=s<12?"AM":"PM";return e.jsxs(e.Fragment,{children:[r===parseInt(h)&&l>15?null:e.jsx("option",{value:`${h}:00`,children:`${_}:00 ${T}`},`${h}:00`),r===parseInt(h)&&l>45&&h!=="23"?null:e.jsx("option",{value:`${h}:30`,children:`${_}:30 ${T}`},`${h}:30`)]})})},Li=({children:t})=>e.jsxs(va,{children:[e.jsx(Ta,{children:e.jsx(Ma,{})}),t]}),Di=()=>e.jsxs("svg",{"aria-hidden":"true","data-testid":"icon_clock",focusable:"false",role:"img",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg",children:[e.jsx("path",{d:"M11 7.5a.5.5 0 0 1 .5-.5h1a.5.5 0 0 1 .5.5V11h1.5a.5.5 0 0 1 .5.5v1a.5.5 0 0 1-.5.5h-3a.5.5 0 0 1-.5-.5v-5Z",fill:"currentColor"}),e.jsx("path",{d:"M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Zm-2 0a7 7 0 1 0-14 0 7 7 0 0 0 14 0Z",fill:"currentColor"})]}),Oi=({children:t})=>e.jsxs(Ia,{children:[e.jsx(Ea,{children:e.jsx(Di,{})}),t]}),ki=({time:t,type:n,onClick:a})=>{const r=m.useContext(J);return e.jsxs(Ra,{buttonVariant:r?.merchantDetailReservation?.times?.variant||re.Primary,"data-testid":X.availability.slot,onClick:a,children:[e.jsx("span",{children:new Date(t).toLocaleTimeString([],{hour:"numeric",minute:"2-digit"})}),e.jsxs("span",{children:["(",ya(n.replace(/default/i,"standard").toLowerCase()),")"]})]})},Ni=()=>{const{merchant:t}=m.useContext(ae),{member:n}=m.useContext(Ne),a=m.useContext(J),r=m.useContext(wa),l=m.useContext(ke),c=d(i.MerchantReservationAvailabilityNoBonus),s=d(i.MerchantReservationAvailabilityLoading),h=d(i.MerchantReservationShowMoreLinkText),_=d(i.MerchantReservationProviderLegal),[T,b]=m.useState(0),f=m.useRef(!0),R=m.useRef(!1),I=qe(fe),C=I?JSON.parse(I).reservation:void 0,E=C?.chosenAvailability,[S,A]=m.useState(E),k=E?.time?.replace(/T.*/,""),[y,$]=m.useState(k||it),v=E?.time?.replace(/.*T/,""),[L,G]=m.useState(v||st),F=C?.partySize,[j,ne]=m.useState(F||rt),[g,V]=m.useState({date:"",time:"",partySize:""}),H=()=>f.current&&y===it&&L===st&&j===rt,Y=m.useMemo(()=>(y+"").trim().length>0&&Object.prototype.toString.call(new Date(y))==="[object Date]"&&y>=ot&&y<=lt,[y]),B=m.useMemo(()=>(L+"").trim().length>0&&Object.prototype.toString.call(new Date(Date.now().toString().replace(/T.*$/,L)))==="[object Date]",[L]),W=w=>{$(w.target.value)},ee=w=>{G(w.target.value)},Ee=w=>{ne(w.target.value.toString())},ie=w=>{w.noAvailabilityReasons.length&&(R.current?O(D.openTableResDefaultSearchNoAvailability,n,t):O(D.openTableResUserSearchNoAvailability,n,t))},_e=()=>{H()?(R.current=!0,O(D.openTableResDefaultSearch,n,t)):(R.current=!1,O(D.openTableResUserSearch,n,t))},Ve=w=>{R.current?w.creditCardRequired?O(D.openTableResDefaultSearchCcSlotSelected,n,t):O(D.openTableResDefaultSearchSlotSelected,n,t):w.creditCardRequired?O(D.openTableResUserSearchCcSlotSelected,n,t):O(D.openTableResUserSearchSlotSelected,n,t)},Ue=w=>{R.current?w.creditCardRequired?O(D.openTableResDefaultSearchCcLoginPrompt,n,t):O(D.openTableResDefaultSearchLoginPrompt,n,t):w.creditCardRequired?O(D.openTableResUserSearchCcLoginPrompt,n,t):O(D.openTableResUserSearchLoginPrompt,n,t)},he=et({mutationFn:Qn,mutationKey:["availability",t?.id],retry:!1,onSuccess:w=>ie(w)});m.useEffect(()=>{const w=setTimeout(()=>{V({date:y,time:L,partySize:j})},500);return()=>{clearTimeout(w)}},[y,L,j]),m.useEffect(()=>{g.time&&g.date&&g.partySize&&t?.reservationProviders?.openTable?.rid&&Y&&B&&(he.mutate({rid:t.reservationProviders.openTable.rid,...g,rnMid:t.id}),_e(),R.current=H(),f.current=!1,b(ct))},[g.date,g.time,g.partySize]),m.useEffect(()=>{if(t?.id&&t?.reservationProviders?.openTable?.rid&&S){const w={merchantID:t.id,reservation:{chosenAvailability:S,partySize:j,merchant:{id:t.
1id,rid:t.reservationProviders.openTable.rid}}};qe(fe)||Sa(fe,JSON.stringify(w),At)}},[S]);const $t=m.useMemo(()=>Ai(y),[y]);return e.jsxs("div",{"data-testid":X.root,children:[e.jsxs(Ca,{"data-testid":X.availability.root,children:[l.partner.hasReservationBonus?e.jsx(ji,{}):e.jsx(x,{bodyTextVariant:p.Md,weight:u.A,children:c}),e.jsxs(ja,{"data-testid":X.availability.form,children:[e.jsx(Aa,{"data-testid":X.availability.date,min:ot,max:lt,value:y,onChange:W,"aria-description":"Reservation date picker input","aria-invalid":!Y,"aria-required":!0,required:!0}),e.jsx(Oi,{children:e.jsx(La,{"data-testid":X.availability.time,value:L,onChange:ee,"aria-description":"Reservation time picker input",children:$t})}),e.jsx(Li,{children:e.jsx(Da,{"data-testid":X.availability.party,onChange:Ee,"aria-description":`Reservation party size input, valid numbers are 1 to ${bt}`,value:j,children:Array(bt).fill("").map((w,pe)=>e.jsx("option",{value:pe+1,children:pe+1}))})})]}),T===0||he.isPending?e.jsx(x,{bodyTextVariant:p.Md,weight:u.A,"data-testid":X.availability.fetching,children:s}):he.data?.timesAvailable?.length?e.jsxs(e.Fragment,{children:[e.jsx(Oa,{children:he.data?.timesAvailable.slice(0,T)?.sort((w,pe)=>w.time>pe.time?1:w.time<pe.time?-1:0).map(w=>e.jsx(ki,{time:w.time,type:w.attribute,onClick:()=>{A(w),Ve(w),n||Ue(w)}},`time-slot_${w.time}_${w.attribute}`))}),T<Math.min(he.data.timesAvailable.length,ka)?e.jsx(Q,{onClick:w=>{w.preventDefault(),b(T+ct)},isReverse:a?.merchantDetailReservation?.isLinkReversed,"data-testid":X.availability.more,children:h}):null]}):e.jsx(x,{"data-testid":X.availability.error,bodyTextVariant:p.Md,weight:u.A,style:{color:a?.color.error},children:ni(he.data?.noAvailabilityReasons[0]||"",r)}),e.jsxs(Ot,{bodyTextVariant:p.Sm,weight:u.A,children:[e.jsx("span",{children:_}),e.jsx(zt,{})]})]}),e.jsx(Ci,{handleClose:()=>{A(void 0),Dt(fe)},showModal:!!S,openTable:{chosenAvailability:S,partySize:j,defaultSearchPerformed:R.current}})]})},Bi=({hasOpenTable:t})=>e.jsx(Na,{"data-testid":le.root,children:t?e.jsx(Ni,{}):null}),Pi=()=>e.jsx("svg",{"aria-hidden":"true","data-testid":"icon_reply",focusable:"false",role:"img",viewBox:"0 0 512 512",xmlns:"http://www.w3.org/2000/svg",children:e.jsx("path",{fill:"currentColor",d:"m8.31 189.9 176-151.1C199.72 25.5 224 36.291 224 56.96v80.05c160.6.89 288 33.09 288 185.29 0 61.44-39.59 122.3-83.34 154.1-13.66 9.938-33.09-2.531-28.06-18.62 45.34-145-21.5-183.5-176.6-185.8v87.92c0 20.7-24.31 31.45-39.69 18.16l-176-151.1c-11.063-10.36-11.094-27.56 0-37.06z"})}),U={REVIEWS:"merchant_detail_reviews",HEADING:"merchant_detail_reviews__heading",OVERALL_RATING:"merchant_detail_reviews__overall_rating",OVERALL_RATING_BASIS:"merchant_detail_reviews__overall_rating__basis",DISCLAIMER:"merchant_detail_reviews__overall_rating__disclaimer",RATING:"merchant_detail_reviews__rating",RATING_BASIS:"merchant_detail_reviews__rating__basis",MEMBER_REVIEWS_HEADING:"merchant_detail_reviews__member_reviews_heading",PAGE_COUNT:"merchant_detail_reviews__page_count",REVIEWS_LIST:"merchant_detail_reviews__reviews_list",MEMBER_REVIEW:"merchant_detail_reviews__reviews_list__member_review",MEMBER_REVIEW_METER:"merchant_detail_reviews__reviews_list__member_review__meter",MEMBER_REVIEW_CONTENT:"merchant_detail_reviews__reviews_list__member_review__content",MEMBER_REVIEW_RESPONSE:"merchant_detail_reviews__reviews_list__member_review__response",MEMBER_REVIEW_AUTHOR:"merchant_detail_reviews__reviews_list__member_review__author",REVIEWS_PAGINATION:"merchant_detail_reviews__pagination"},Vi=o(x).withConfig({componentId:"sc-1lx43tu-0"})(["font-size:28px;"]),Ui=o(N).withConfig({componentId:"sc-1lx43tu-1"})(["border-bottom:",";"],t=>t.theme.border.DIVIDER_H),We=o(x).withConfig({componentId:"sc-1lx43tu-2"})(["display:inline;"]),Fi=o.p.withConfig({componentId:"sc-1lx43tu-3"})(["",""],Qe),Hi=o(N).withConfig({componentId:"sc-1lx43tu-4"})(["display:flex;gap:15px;span{display:block;}svg{height:",";}"],t=>t.theme.bodyText.sizes[p.Md].fontSize),zi=o(N).withConfig({componentId:"sc-1lx43tu-5"})(["display:grid;gap:15px;grid-template-columns:repeat(3,max-content);& > span + span{border-left:",";padding-left:15px;}"],t=>t.theme.border.DIVIDER_H),$i=o.ul.withConfig({componentId:"sc-1lx43tu-6"})(["border-bottom:",";list-style:none;padding-left:0;"],t=>t.theme.border.DIVIDER_H),Tt=()=>{const{merchant:t,reviews:n}=m.useContext(ae),[a,r]=m.useState(),l=m.useContext(J),c=z(i.MerchantReviewsLegalDisclosure),s=d(i.PageMerchantDetailReviewsTitle),h=d(i.PageMerchantDetailReviewsMoreInfoLabel),_=d(i.PageMerchantDetailReviewsMemberReviewLabel);m.useEffect(()=>{n&&r(n)},[n]);const{mutate:T}=et({mutationFn:Xa,mutationKey:[t?.id],onSuccess:v=>{r(v)},retry:!1});if(!t||!n)return null;const{id:b,details:f,name:R}=t,I=f?.rating,C=d(i.PartnerDefaultCasing),E=l?.bodyText.sizes[p.Md].fontSize;if(!b||!f||!I||!a)return null;const S=v=>{T({merchantId:t.id,currentPage:v,resultsPerPage:5});const L=document.getElementById(`member_reviews_${t.id}`);L?.focus(),L?.scrollIntoView({behavior:"auto",block:"center",inline:"center"})},A=v=>{let L=q((v.city||"").toLowerCase(),Ba.TITLE);return v.city&&v.state&&(L+=", "),L+=v.state||"",L},k=v=>
1new Date(v.reviewDate).toLocaleDateString("en-US",{month:"long",day:"2-digit",year:"numeric"}),y=v=>en(new Date(v.merchantResponse?.createDate||""),{month:"long",day:"2-digit",year:"numeric"}),{reviews:$}=a;return $.length<1?null:e.jsx(de,{showTitle:!1,title:s,testId:U.REVIEWS,children:e.jsxs(e.Fragment,{children:[e.jsx(N,{paddingBottom:"xs",children:e.jsx(We,{as:"h2",bodyTextVariant:p.XL,weight:u.B,"data-testid":U.HEADING,children:"Reviews"})}),I.overallRating>0&&e.jsxs(N,{paddingBottom:"sm",children:[e.jsxs(N,{paddingBottom:"xs",children:[e.jsx(We,{as:"h3",bodyTextVariant:p.Md,weight:u.B,"data-testid":U.OVERALL_RATING,children:q("Overall Rating",C)}),e.jsxs(We,{as:"span",bodyTextVariant:p.Md,weight:u.A,"data-testid":U.OVERALL_RATING_BASIS,children:[e.jsxs("span",{children:[" (based on ",I.numberOfRatings," responses)"]}),e.jsx(Be,{popoverId:U.DISCLAIMER,triggerContent:e.jsx(Te,{"aria-label":h,height:E,width:E,iconButtonVariant:Me.Primary,children:e.jsx(Ie,{})}),children:c})]})]}),e.jsx(Ui,{paddingBottom:"xs",children:e.jsxs(Vi,{as:"h4",bodyTextVariant:p.XL,weight:u.B,"data-testid":U.RATING,children:[I.overallRating.toFixed(1),e.jsx(x,{as:"span",bodyTextVariant:p.Md,weight:u.A,"data-testid":U.RATING_BASIS,children:e.jsx("span",{children:" (out of 5.0)"})})]})})]}),e.jsx(Vt,{as:"h3",titleVariant:ce.Sm,"data-testid":U.MEMBER_REVIEWS_HEADING,children:q("Member Reviews",C)}),e.jsx(Fi,{"aria-hidden":"true",id:"reviews_page_count","data-testid":U.PAGE_COUNT,children:`Page ${a.currentPage} of ${a.totalPages}`}),e.jsx(N,{paddingBottom:"xs",children:e.jsx($i,{id:`member_reviews_${t.id}`,tabIndex:0,"aria-label":`member reviews for ${R}`,"aria-describedby":"reviews_page_count","data-testid":U.REVIEWS_LIST,children:$.map((v,L)=>{const G=v.memberInitials.replace(/\s+/g,"").toUpperCase(),F=A(v),j=k(v);return e.jsx("li",{"aria-label":_,"data-testid":U.MEMBER_REVIEW,children:e.jsxs(N,{paddingBottom:$.length===L+1?"sm":"lg",children:[e.jsx(N,{paddingBottom:"xxs","data-testid":U.MEMBER_REVIEW_METER,children:e.jsx(Ut,{id:`member_review__${a.currentPage}_${L}`,name:R,value:v.overallRating,svgHeight:"21px"})}),e.jsx(N,{paddingBottom:"xs",children:e.jsx(x,{as:"p",bodyTextVariant:p.Md,weight:u.A,"data-testid":U.MEMBER_REVIEW_CONTENT,children:v.review})}),v.merchantResponse?.public&&e.jsxs(Hi,{"aria-labelledby":`${U.MEMBER_REVIEW_RESPONSE}_${L}_label`,"data-testid":U.MEMBER_REVIEW_RESPONSE,paddingBottom:"xs",role:"group",children:[e.jsx(x,{as:"span",bodyTextVariant:p.Md,weight:u.B,children:e.jsx(Pi,{})}),e.jsxs("span",{children:[e.jsxs(x,{as:"span",bodyTextVariant:p.Md,id:`${U.MEMBER_REVIEW_RESPONSE}_${L}_label`,weight:u.B,children:["The establishment replied to this review on"," ",y(v)]}),e.jsx(x,{as:"span",bodyTextVariant:p.Md,weight:u.A,children:v.merchantResponse.content})]})]}),e.jsxs(zi,{paddingBottom:"none",role:"group","aria-label":`Review by member ${G}, ${F?`located in ${F}, `:""}on ${j}`,"data-testid":U.MEMBER_REVIEW_AUTHOR,children:[e.jsx(x,{as:"span",bodyTextVariant:p.Md,weight:u.A,children:G}),F&&e.jsx(x,{as:"span",bodyTextVariant:p.Md,weight:u.A,children:F}),e.jsx(x,{as:"span",bodyTextVariant:p.Md,weight:u.A,children:j})]})]})},L)})})}),e.jsx(tn,{currentPage:a.currentPage,pageCount:a.totalPages,onPageChange:v=>S(v),bodyTextVariant:p.Lg,paginationForLabel:`${R} member reviews`,"data-testid":U.REVIEWS_PAGINATION})]})})},Ge=t=>Xe(["display:inline-block;max-width:",";overflow:hidden;text-overflow:ellipsis;vertical-align:top;white-space:nowrap;"],t),Wi=o.span.withConfig({shouldForwardProp:Pa(["maxWidth"])}).withConfig({componentId:"sc-7wkt1p-0"})([""," "," ",""],t=>t.maxWidth.all&&Ge(t.maxWidth.all),t=>t.maxWidth.mobileOnly&&Xe(["@media (max-width:","){","}"],t.theme.breakpoints.desktop,Ge(t.maxWidth.mobileOnly)),t=>t.maxWidth.desktopOnly&&Xe(["@media (min-width:","){","}"],t.theme.breakpoints.desktop,Ge(t.maxWidth.desktopOnly))),K={root:"merchant_menu_link",modal:{root:"merchant_menu_link_modal",thumbnails:{root:"merchant_menu_link_modal_thumbnails",
1image:"merchant_menu_link_modal_thumbnails_image"},previewWrapper:"merchant_menu_link_modal_preview_wrapper",preview:"merchant_menu_link_modal_preview",controls:{root:"merchant_menu_link_modal_controls",in:"merchant_menu_link_modal_controls_zoom_in",out:"merchant_menu_link_modal_controls_zoom_out",reset:"merchant_menu_link_modal_controls_zoom_reset"}}},Gi=8,Zi=o.div.withConfig({componentId:"sc-1bniy97-0"})(["touch-action:none;height:100%;display:grid;gap:1rem;grid-template-rows:100px 1fr;"]),Yi=o.div.withConfig({componentId:"sc-1bniy97-1"})(["width:100%;overflow:hidden;"]),qi=o.div.withConfig({componentId:"sc-1bniy97-2"})(["width:100px;height:80px;overflow:hidden;opacity:0.6;&.active{opacity:1;img{border-color:red;}}img{border:solid transparent 1px;width:100%;height:100%;object-fit:contain;}"]),Xi=o.div.withConfig({componentId:"sc-1bniy97-3"})(["touch-action:auto;position:relative;overflow:hidden;border:solid red 1px;border-color:",";img{--zoom:1;--translateX:0px;--translateY:0px;display:block;width:100%;height:100%;position:absolute;object-fit:contain;top:0px;left:0px;bottom:0px;right:0px;user-select:none;pointer-events:none;transform-origin:calc(50% - var(--translateX)) calc(50% - var(--translateY));scale:var(--zoom);}div{position:absolute;top:0px;left:0px;}@media (pointer:fine){img{transition:scale 180ms ease-in-out;}}@media (pointer:none){img{transition:scale 180ms ease-in-out;}}"],t=>t.theme.border.DIVIDER_H_COLOR),Ki=o.span.withConfig({componentId:"sc-1bniy97-4"})(["display:none;gap:10px;position:absolute;top:10px;right:10px;@media (min-width:","){display:flex;}"],t=>t.theme.breakpoints.largeMobile),Ze=o.button.withConfig({componentId:"sc-1bniy97-5"})(["cursor:pointer;width:30px;height:30px;border:none;background:none;padding:0;margin:0;user-select:none;font-size:",";color:#fff;-webkit-filter:drop-shadow(0px 0px 3px #000) drop-shadow(0px 0px 1px #000);filter:drop-shadow(0px 0px 3px #000) drop-shadow(0px 0px 1px #000);&:active{-webkit-filter:drop-shadow(0px 0px 3px #000) drop-shadow(0px 0px 1px #000) drop-shadow(0px 0px 1px #000);filter:drop-shadow(0px 0px 3px #000) drop-shadow(0px 0px 1px #000) drop-shadow(0px 0px 1px #000);}"],t=>t.theme.bodyText.sizes[p.Lg].fontSize),Qi=()=>e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",children:e.jsx("path",{d:"M416 208c0 45.9-14.9 88.3-40 122.7L502.6 457.4c12.5 12.5 12.5 32.8 0 45.3s-32.8 12.5-45.3 0L330.7 376c-34.4 25.2-76.8 40-122.7 40C93.1 416 0 322.9 0 208S93.1 0 208 0S416 93.1 416 208zM184 296c0 13.3 10.7 24 24 24s24-10.7 24-24l0-64 64 0c13.3 0 24-10.7 24-24s-10.7-24-24-24l-64 0 0-64c0-13.3-10.7-24-24-24s-24 10.7-24 24l0 64-64 0c-13.3 0-24 10.7-24 24s10.7 24 24 24l64 0 0 64z",fill:"currentColor"})}),Ji=()=>e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",children:e.jsx("path",{d:"M416 208c0 45.9-14.9 88.3-40 122.7L502.6 457.4c12.5 12.5 12.5 32.8 0 45.3s-32.8 12.5-45.3 0L330.7 376c-34.4 25.2-76.8 40-122.7 40C93.1 416 0 322.9 0 208S93.1 0 208 0S416 93.1 416 208zM136 184c-13.3 0-24 10.7-24 24s10.7 24 24 24l144 0c13.3 0 24-10.7 24-24s-10.7-24-24-24l-144 0z",fill:"currentColor"})}),es=()=>e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",children:e.jsx("path",{d:"M32 32C14.3 32 0 46.3 0 64l0 96c0 17.7 14.3 32 32 32s32-14.3 32-32l0-64 64 0c17.7 0 32-14.3 32-32s-14.3-32-32-32L32 32zM64 352c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 96c0 17.7 14.3 32 32 32l96 0c17.7 0 32-14.3 32-32s-14.3-32-32-32l-64 0 0-64zM320 32c-17.7 0-32 14.3-32 32s14.3 32 32 32l64 0 0 64c0 17.7 14.3 32 32 32s32-14.3 32-32l0-96c0-17.7-14.3-32-32-32l-96 0zM448 352c0-17.7-14.3-32-32-32s-32 14.3-32 32l0 64-64 0c-17.7 0-32 14.3-32 32s14.3 32 32 32l96 0c17.7 0 32-14.3 32-32l0-96z",fill:"currentColor"})}),ts=({updateZoomPan:t,zoomPan:n})=>e.jsxs(Ki,{"data-testid":K.modal.controls.root,children:[e.jsx(Ze,{"data-testid":K.modal.controls.in,onClick:a=>{a.preventDefault(),t({...n,zoom:n.zoom+.5})},children:e.jsx(Qi,{})}),e.jsx(Ze,{"data-testid":K.modal.controls.out,onClick:a=>{a.preventDefault(),t({...n,zoom:n.zoom-.5})},children:e.jsx(Ji,{})}),e.jsx(Ze,{"data-testid":K.modal.controls.reset,onClick:a=>{a.preventDefault(),t({x:0,y:0,zoom:1})},children:e.jsx(es,{})})]}),as=({id:t,menu:n,name:a})=>{const r=Va({name:`${t}_menu`,options:{isModal:!0}}),l=z(i.MerchantCTAMenu),c=d(i.MerchantCTAMenuLabelURL,{replacements:{MERCHANT_NAME:a}}),s=d(i.MerchantCTAMenuLabelImages,{replacements:{MERCHANT_NAME:a}}),h=d(i.MerchantMenuImagesLabel,{replacements:{MERCHANT_NAME:a}}),_=d(i.MerchantMenuImagesAltText,{replacements:{MERCHANT_NAME:a}}),[T,b]=m.useState(0),[f,R]=m.useState({x:0,y:0,zoom:1}),[I,C]=m.useState(),[E,S]=m.useState(),A=m.useRef(null),k=g=>{b(g),y({x:0,y:0,zoom:1}),C(void 0),S(void 0)},y=m.useCallback(({x:g,y:V,zoom:H})=>{const Y=Math.min(Math.max(1,H||f.zoom),Gi),B=Y===1?{x:0,y:0,zoom:Y}:{x:g!==void 0?g:f.x,y:V!==void 0?V:f.y,zoom:Y};R(B)},[f]),$=g=>{F(g.clientX,g.clientY)},v=g=>{I&&f.zoom>1&&j(g.clientX,g.clientY)},L=g=>{g.touches.length>1?S([{x:g.touches[0].clientX,y:g.touches[0].clientY},{x:g.touches[1].clientX,y:g.touches[1].clientY}]):(S(void 0),F(g.touches[0].clientX,g.touches[0].clientY))},G=g=>{if(E&&g.touches.length>1){const V=Math.sqrt(Math.pow(E[1].x-E[0].x,2)+Math.pow(E[1].y-E[0].y,2)),Y=Math.sqrt(Math.pow(g.touches[1].clientX-g.touches[0].clientX,2)+Math.pow(g.touches[1].clientY-g.touches[0].clientY,2))/V;S([{x:g.touches[0].clientX,y:g.touches[0].clientY},{x:g.touches[1].clientX,y:g.touches[1].clientY}]),y({zoom:f.zoom*Y})}else I&&f.zoom>1&&j(g.touches[0].clientX,g.touches[0].clientY)},F=(g,V)=>{C({x:g,y:V})},j=(g,V)=>{if(I){const H={x:f.x+(g-I.x)/f.zoom,y:f.y+(V-I.y)/f.zoom};f.zoom>1&&(C({x:g,y:V}),y(H))}},ne=()=>{C(void 0),S(void 0)};return m.useEffect(()=>{A.current&&(A.current.style.setProperty("--translateX",`${f.x}px`),A.current.style.setProperty("--translateY",`${f.y}px`),A.current.style.setProperty("--zoom",`${f.zoom}`))},[A,f]),m.useEffect(()=>{R({x:0,y:0,zoom:1})},[T]),typeof n=="string"?e.jsxs(Q,{"aria-label":c,"data-testid":K.root,href:n,onClick:g=>g.stopPropagation(),target:"_blank",svgMargin:"0 0 0 5px",children:[l,e.jsx(Ye,{})]}):e.jsxs(e.Fragment,{children:[e.jsx(Q,{"aria-label":s,as:"button","data-testid":K.root,...r.triggerProps,children:l}),r.getIsVisible()&&e.jsx(kt,{"data-testid":K.modal.root,"aria-label":h,handleClose:()=>{r.setIsVisible(!1),b(0)},enabled:r.getIsVisible(),...r.targetProps,isFullSize:!0,children:e.jsxs(Zi,{children:[e.jsx(Yi,{"data-testid":K.modal.thumbnails.root,children:e.jsx(Nt,{slideWidth:"100px",showIndicators:!0,children:n.map((g,V)=>e.jsx(Bt,{children:e.jsx(qi,{className:T===V?"active":void 0,children:e.jsx("img",{onClick:()=>k(V),alt:_,"data-testid":K.modal.thumbnails.image,src:g})})},g+V.toString()))})}),A?e.jsxs(Xi,{"data-testid":K.modal.previewWrapper,onMouseDown:$,onMouseMove:v,onMouseUp:ne,onTouchStart:L,onTouchMove:G,onTouchEnd:ne,onTouchCancel:ne,children:[e.jsx("img",{"data-testid":K.modal.preview,ref:A,src:n[T]}),e.jsx(ts,{zoomPan:f,updateZoomPan:y})]}):null]})})]})},ns=()=>{const t=d(i.PartnerDefaultCasing),{merchant:n}=m.useContext(ae),a=d(i.PageMerchantDetailSummaryOverviewLabel),r=d(i.PageMerchantDetailSummaryTodaysHoursLabel);
1if(!n)return null;const l=()=>{const I=n.rewards?.benefits?n.rewards?.benefits[0]:void 0;if(I)return I?.dayOfWeek},c=()=>{const I=l();if(!I)return;const C=Ha[I];if(n.details?.hours)return n.details.hours.filter(S=>S.dayOfWeek.toLowerCase()===C.toLowerCase())[0]},{id:s,name:h}=n,_=be.useMerchantHighlight({highlight:n.details?.highlight,acclaimedLevel:n.acclaimedLevel,designation:n.designation}),T=be.useMerchantRating(n.details?.rating),b=be.useMerchantPriceRange(n.details?.priceRange),[f]=be.useMerchantCuisines(n.details?.cuisines),R=be.useMerchantMenu(n.images?.imageBaseUrl,n.details?.menu);return e.jsxs(sn,{"data-merchant-id":s,"data-testid":Z.SUMMARY,"aria-label":`${h} Summary`,children:[e.jsxs(on,{as:"section","aria-label":a,"data-testid":Z.OVERVIEW,children:[_?e.jsx(N,{paddingBottom:"xxs",children:e.jsx(ve,{as:"h2",titleVariant:ce.Sm,"data-testid":Z.HIGHLIGHT,children:_})}):null,e.jsx(rn,{paddingBottom:"xxs",children:e.jsxs(ve,{as:"h2",titleVariant:ce.Md,"data-testid":Z.NAME,children:[h,e.jsx(Le,{children:" Summary"})]})}),e.jsxs(cn,{paddingBottom:T?.stars?"xxs":void 0,children:[T?.stars?e.jsx(x,{"data-testid":Z.STAR_METER,bodyTextVariant:p.Lg,weight:u.A,children:e.jsx(Ut,{id:s,name:h,...T.stars,svgHeight:"20px"})}):null,e.jsx(Ua,{"data-testid":Z.FAVORITE,merchantId:s,merchantName:h})]}),b||f||R?e.jsxs(N,{"data-testid":Z.INFO_LIST,children:[f&&e.jsx(Fe,{"data-testid":Z.CUISINE,children:e.jsx(x,{bodyTextVariant:p.Lg,weight:u.A,children:e.jsx(Wi,{maxWidth:{desktopOnly:"200px"},children:f})})}),b&&e.jsx(Fe,{"data-testid":Z.PRICE_METER,children:e.jsx(x,{bodyTextVariant:p.Lg,weight:u.A,children:e.jsx(Fa,{id:s,name:h,...b})})}),!!R&&e.jsx(Fe,{"data-testid":Z.MENU,children:e.jsx(x,{bodyTextVariant:p.Lg,weight:u.A,children:e.jsx(as,{id:s,name:h,menu:R})})})]}):null]}),e.jsx(ln,{as:"section","aria-label":r,"data-testid":Z.DAILY_SUMMARY,children:c()?e.jsx(N,{children:c()?.openForBusiness?e.jsxs(dn,{as:"h3",bodyTextVariant:p.Lg,"data-testid":Z.HOURS,weight:u.B,children:[e.jsx("span",{children:`${q("Open Today",t)}: `}),e.jsx(hn,{children:c()?.dayHours.map((I,C)=>e.jsxs("span",{children:[e.jsx("span",{children:I.open}),e.jsx(Le,{children:" to "}),e.jsx("span",{"aria-hidden":"true",children:" - "}),e.jsx("span",{children:I.close})]},C))})]}):e.jsx(x,{as:"h3",bodyTextVariant:p.Lg,"data-testid":Z.HOURS,weight:u.B,children:q("Closed Today",t)})}):null})]})},se={MERCHANT_DETAIL:"merchant_detail",MAIN:"merchant_detail__main",LOADING:"merchant_detail_loading",NOT_FOUND:"merchant_detail__not_found",HEADING:"merchant_detail__heading",IMAGES:{ROOT:"merchant_detail__images_root",IMAGE:"merchant_detail__images_image"},DETAILS:"merchant_detail__details"},Mt=o.div.withConfig({componentId:"sc-z2zdwr-0"})(["@media (max-width:","){display:none;}"],t=>t.theme.breakpoints.desktop),is=o.div.withConfig({componentId:"sc-z2zdwr-1"})(["@media (min-width:","){display:none;}"],t=>t.theme.breakpoints.desktop),Oe=o.div.withConfig({componentId:"sc-z2zdwr-2"})(["position:relative;--size:",";height:var(--size);width:var(--size);margin:",";color:",";background:",";border:",";border-radius:50%;box-shadow:#00000022 0 0 ",",#00000088 0 0 ",",#000000cc 0 0 1px;transition:all 180ms;&:hover{color:",";background:",";border:",";box-shadow:#00000088 0 0 ",",#000000bb 0 0 ",",#000000ff 0 0 1px;}svg{height:50%;position:absolute;top:50%;left:50%;translate:-50% -50%;}"],M.lg,M.xs,({theme:t})=>t.merchantDetail.carouselButtons?.color||t.merchantCarousel.buttons?.color||t.button[re.Primary].color,({theme:t})=>t.merchantDetail.carouselButtons?.background||t.merchantCarousel.buttons?.background||t.button[re.Primary].background,({theme:t})=>t.merchantDetail.carouselButtons?.border||t.merchantCarousel.buttons?.border||t.button[re.Primary].border,M.xs,M.xxs,({theme:t})=>t.merchantDetail.carouselButtons?.active?.color||t.merchantCarousel.buttons?.active?.color||t.button[re.Primary].hover.color,({theme:t})=>t.merchantDetail.carouselButtons?.active?.background||t.merchantCarousel.buttons?.active?.background||t.button[re.Primary].hover.background,({theme:t})=>t.merchantDetail.carouselButtons?.active?.border||t.merchantCarousel.buttons?.active?.border||t.button[re.Primary].hover.color,M.xs,M.xxs),ss=o.div.withConfig({componentId:"sc-z2zdwr-3"})(["",";padding-bottom:25px;padding-top:15px;@media (min-width:","){padding-top:12px;}"],za,t=>t.theme.breakpoints.desktop),rs=o.div.withConfig({componentId:"sc-z2zdwr-4"})(["border-bottom:",";padding-bottom:10px;","{display:none;}--carousel-slide-width:350px;@media (min-width:","){box-sizing:border-box;display:grid;gap:20px;grid-template-columns:minmax(0,1fr) minmax(0,1fr);padding-bottom:",";--carousel-slide-width:100%;}@media (min-width:","){","{display:block;}}"],t=>t.theme.border.DIVIDER_H,Oe,t=>t.theme.breakpoints.desktop,M.xs,t=>t.theme.breakpoints.largeMobile,Oe),It=o.div.withConfig({componentId:"sc-z2zdwr-5"})(["display:flex;justify-content:center;height:100%;align-items:center;overflow:hidden;object{pointer-events:none;object-fit:contain;max-width:var(--carousel-slide-width);max-height:400px;}object,img{display:block;aspect-ratio:1.4;padding:0;margin:0;}img{width:100%;scale:0.8;}&:only-of-type{margin-bottom:",";}"],M.xs),os=o.div.withConfig({componentId:"sc-z2zdwr-6"})(["padding:50px 0 0px;@media (min-width:","){display:grid;gap:0 8.38%;grid-template-columns:55.24% 36.38%;padding:20px 0 0;}"],t=>t.theme.breakpoints.desktop),xs=()=>{const t=m.useContext(J),{isLoading:n,merchant:a,reviews:r,isOffersLoading:l,isEventsLoading:c,isSuccess:s}=m.useContext(ae),h=m.useContext(ke),{partner:_}=h,T=z(i.MerchantNotFoundTagLine),b=d(i.PageMerchantDetailDocumentTitle),f=d(i.CurrentProperEarning3),R=d(i.MerchantNotFoundTitle),I=d(i.PageMerchantDetailDetailsTitle),C=r?.reviews&&r?.reviews.length>0;$a(a?.name||b),m.useEffect(()=>{s&&a&&window.dataLayer.push({event:"show_merchant",merchant:a,merchant_index:0,merchant_list:"detail"})},[s,a]);const E=m.useMemo(()=>!!(_.openTableReservationsEnabled&&a?.reservationProviders?.openTable?.rid),[_,a]),S=m.useMemo(()=>a?.details?.cuisines.length?a.details?.cuisines.join("/"):null,[a]),A={title:a&&`${a.name} - ${a.location?.address?.city}, ${a.location?.address?.state}`,description:a&&`${a.name} - ${S||"local eats"}. Visit today to earn up to ${f}`},k=Pt(a?.id||"",a?.origin||Lt.RN,a?.images),{metaTags:y,HelmetMeta:$}=nn(a?.images?.imageBaseUrl&&k&&a?.name?{...A,image:dt(a.images.imageBaseUrl,k),imageAlt:`${a.name}'s promo image`}:A),L=["og:title","og:description","og:image"].every(W=>y.some(ee=>ee.property===W));if(m.useEffect(()=>{!n&&!c&&!l&&a&&L&&(window.prerenderReady=!0)},[n,c,l,a,L]),n)return e.jsx("div",{"data-testid":se.LOADING,children:e.jsx(Rt,{message:"Do not refresh, loading merchant details"})});if(!a&&!n)return e.jsx(Wa,{"data-testid":se.NOT_FOUND,documentTitle:R,title:R,tagLine:T});if(!a)return e.jsx(an,{});const{images:G,description:F,name:j,rewards:ne,details:g,location:V}=a,H=()=>
1{if(G?.photos?.length){const W=G.photos.map(ie=>{const _e=ie===G.logoImage,Ve=_e?`Uploaded merchant gallery logo slide for ${j}.`:`Uploaded merchant gallery slide for ${j}.`,Ue=_e?dt(G.imageBaseUrl,ie):ht(G.imageBaseUrl,ie);return{alt:Ve,src:Ue,logoImage:_e}}),ee=W.find(ie=>ie.logoImage),Ee=W.filter(ie=>!ie.logoImage);return ee&&Ee.push(ee),Ee}else return[{alt:`Featured uploaded merchant gallery slide for ${j}.`,src:ht(G?.imageBaseUrl,k||"")}]},Y=()=>{if(g)return e.jsx(de,{title:I,testId:se.DETAILS,children:e.jsx(qn,{details:g,rewards:ne})})},B=(W=!0)=>{if(!(!g||!g?.hours&&!V))return e.jsx(Yn,{children:W?Y():null})};return e.jsxs(e.Fragment,{children:[e.jsx($,{}),e.jsxs(ss,{"data-testid":se.MERCHANT_DETAIL,children:[e.jsx(Vt,{as:"h1",titleVariant:ce.XL,"data-testid":se.HEADING,children:j}),e.jsxs(rs,{children:[e.jsxs("div",{children:[e.jsx("div",{"data-testid":se.IMAGES.ROOT,children:H().length===1?e.jsx(It,{children:e.jsx("object",{"data-testid":se.IMAGES.IMAGE,data:H()[0].src,type:"image/jpeg","aria-description":H()[0].alt,children:e.jsx("img",{src:t?.merchantImage.defaultPath||"",alt:`Icon of kitchenware utensils on an empty background. Placeholder merchant gallery for ${j}.`})})}):e.jsx(Nt,{showButtons:!0,prevButton:e.jsx(Oe,{children:e.jsx(Za,{})}),nextButton:e.jsx(Oe,{children:e.jsx(Ga,{})}),showIndicators:!0,slideWidth:"var(--carousel-slide-width)",options:{loop:!0,align:"center"},children:H().map(W=>e.jsx(Bt,{children:e.jsx(It,{children:e.jsx("object",{"data-testid":se.IMAGES.IMAGE,data:W.src,type:"image/jpeg","aria-description":W.alt,children:e.jsx("img",{src:t?.merchantImage.defaultPath||"",alt:`Icon of kitchenware utensils on an empty background. Placeholder merchant gallery for ${j}.`})})})}))})}),e.jsxs(Mt,{children:[c?null:e.jsx(gt,{}),F?e.jsx(ut,{description:F}):null,C?e.jsx(Tt,{}):null]})]}),e.jsxs("div",{children:[e.jsx(ns,{}),e.jsxs(yn,{children:[a?.rewards?.benefits?e.jsx(fn,{benefitAvailability:a?.benefitAvailability,benefits:a?.rewards.benefits,isAcclaimed:!!((a?.designation===qa.Acclaimed||a?.acclaimedLevel===1)&&_.acclaimed2Enabled),isComingSoon:a?.details?.highlight===Ya.COMING}):null,_.hasFlexOffers?e.jsx(kn,{}):null,E?e.jsx(Bi,{hasOpenTable:!!a.reservationProviders?.openTable?.rid}):null]}),e.jsx(Mt,{children:e.jsx("div",{style:{padding:M.sm},children:B()})})]})]}),e.jsx(is,{children:e.jsx(os,{children:e.jsxs("section",{"aria-label":`${j} main details`,"data-testid":se.MAIN,children:[c?null:e.jsx(gt,{}),F?e.jsx(ut,{description:F}):null,B(!1),C?e.jsx(Tt,{}):null,Y()]})})})]})]})};export{xs as default};
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.