1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1429,6096],{4259:(e,t,n)=>{n.d(t,{A:()=>c});var a=n(12115),o=n(31306),i=n(56452),l=n(65539),r=n(74992),s=n(56600),d=n(10423);function c(){let[e,t]=(0,a.useState)(!1),{brand:n}=(0,s.A)(d.Z);return(0,a.useEffect)(()=>{let n=()=>{"visible"===document.visibilityState&&e&&t(!1)},a=()=>{e&&t(!1)};return document.addEventListener("visibilitychange",n),window.addEventListener("popstate",a),()=>{document.removeEventListener("visibilitychange",n),window.removeEventListener("popstate",a)}},[e]),{handleLogout:()=>{let e=n!==l.mz.Hotrod||window.location.hostname.includes("hotrod.com")?"":"/".concat(l.mz.Hotrod),t="".concat(window.location.origin).concat(e,"/cleanup-user-details"),a="".concat(i.LK.LogoutUrl,"?client_id=").concat((0,i.Gl)(n),"&logout_uri=").concat(encodeURIComponent(t));window.location.href=a},handleSignIn:async()=>{if(!i.LK.ApiUrl)return void r.Y.log({error:Error("Mylo API URL is not configured correctly"),level:"error",msg:"Sign-in attempted but Mylo API URL not configured correctly",path:window.location.pathname});try{t(!0);let{url:e}=await (0,o.OT)("/nwapi/auth/initiate",{body:{currentPath:window.location.pathname,mode:"signin"},method:"POST"});window.location.href=e}catch(e){r.Y.log({error:e,level:"error",msg:"Failed to initiate sign-in",path:window.location.pathname}),t(!1)}},handleSignUp:async()=>{if(!i.LK.ApiUrl)return void r.Y.log({error:Error("Mylo API URL is not configured correctly"),level:"error",msg:"Sign-up attempted but Mylo API URL not configured correctly",path:window.location.pathname});try{t(!0);let{url:e}=await (0,o.OT)("/nwapi/auth/initiate",{body:{currentPath:window.location.pathname,mode:"signup"},method:"POST"});window.location.href=e}catch(e){r.Y.log({error:e,level:"error",msg:"Failed to initiate sign-up",path:window.location.pathname}),t(!1)}},isSigningIn:e}}},6096:(e,t,n)=>{n.r(t),n.d(t,{SaveContentButtonContainer:()=>R});var a=n(95155),o=n(12115),i=n(88992),l=n(80946),r=n(65539),s=n(17670),d=n(74992);let c="mt-pending-saves",u="mt-pending-saves-version";function g(){if(s.fL)return[];try{let e=localStorage.getItem(c);if(!e)return[];let t=localStorage.getItem(u),n=JSON.parse(e);if("1"===t)return n;let a=n.map(e=>{var t;return"contentTitle"in e||"contentPath"in e||"authors"in e||"vehicleData"in e?(d.Y.log({context:{contentId:e.contentId},level:"info",msg:"Migrating legacy pending save to minimal format"}),{contentId:e.contentId,contentType:null!=(t=e.contentType)?t:"standardArticle",timestamp:e.timestamp}):e});return a.some((e,t)=>e!==n[t])&&(localStorage.setItem(c,JSON.stringify(a)),localStorage.setItem(u,"1")),a}catch(e){return d.Y.log({error:e,level:"error",msg:"Failed to read pending saves from localStorage"}),[]}}function m(e){if(s.fL)return[];let t=[];try{let n=(t=g()).filter(t=>t.contentId!==e);return localStorage.setItem(c,JSON.stringify(n)),n}catch(n){return d.Y.log({context:{contentId:e},error:n,level:"error",msg:"Failed to remove pending save from localStorage"}),t}}var h=n(84573),p=n(12004),v=n(99776),f=n(80549),b=n(31306),x=n(45361),w=n(20850),y=n(86535),S=n(49865),T=n(85409),A=n(89440),k=n.n(A),I=n(92062),E=n(2821),L=n(14e3);function N(e){let{ariaLabel:t,className:n,dataId:i,errorDisplayDurationMs:l=2e3,errorMessage:r,isLoading:s=!1,isSaved:d,onSave:c,onUnsave:u}=e,[g,m]=(0,o.useState)(!1);(0,o.useEffect)(()=>{if(void 0!==r){m(!0);let e=window.setTimeout(()=>{m(!1)},l);return()=>{window.clearTimeout(e)}}m(!1)},[r,l]);let h=d?T.XOT:T.LSy,p=s?d?L.Xb.button.unsaving:L.Xb.button.saving:d?L.Xb.button.saved:L.Xb.button.save,v=null!=r?r:void 0,f=s?(0,a.jsx)(I.P,{"aria-label":"Loading",className:"!h-[0.9rem] !w-[0.9rem]"}):(0,a.jsx)(k(),{className:"!text-white",path:h,size:.9});return(0,a.jsxs)("div",{className:(0,E.A)(n,"max-w-[300px]"),children:[(0,a.jsx)(I.$n,{"aria-busy":s,"aria-label":null!=t?t:d?"Unsave content":"Save content","aria-pressed":d,className:"!h-fit !min-h-0 !px-6 !py-3 !text-sm",colorScheme:"neutral-2","data-id":i,"data-parent":"save-content",disabled:s,onClick:()=>{if(!s){if(d)return void u();c()}},size:"medium",startIcon:f,type:"button",variant:"contained",children:p}),g&&v&&(0,a.jsx)("div",{"aria-live":"polite",className:"mt-1",role:"alert",children:(0,a.jsx)(I.Fc,{severity:"error",children:v})})]})}var C=n(63631);let R=(0,i.withErrorBoundary)(function(e){let{authors:t,className:n,contentId:i,contentPath:u,contentThumbn
1ailUrl:y,contentTitle:T,contentType:A="standardArticle",dataId:k,domain:I,publishFrom:E,vehicleData:R}=e,z="".concat(window.location.origin).concat(u),j=s.Cu||l.X.NEXT_PUBLIC_FEATURE_AUTH_ENABLED&&l.X.NEXT_PUBLIC_FEATURE_SAVE_CONTENT_BUTTON&&I===r.mz.Motortrend,{data:P}=(0,h.Q)(),F=!!(null==P?void 0:P.email),[U,B]=(0,o.useState)(!1),[_,M]=(0,o.useState)(!1);!function(){let{data:e,isLoading:t}=(0,h.Q)(),n=!!(null==e?void 0:e.email),a=(0,v.useQueryClient)(),[i,l]=(0,o.useState)([]),r=(0,o.useRef)(!1);(0,o.useEffect)(()=>{l(g())},[]);let{mutateAsync:s}=(0,p.xB)(),{addVehicle:d}=(0,x.I)(),c=(0,f.useMutation)({mutationFn:async e=>{let{contentId:t,contentType:n="standardArticle"}=e,a=await (0,b.OT)("/nwapi/mt-user-data/pending-save-data-fetch?contentId=".concat(t,"&contentType=").concat(n));if(!a.success||!a.data)throw m(t),Error("Content not found");let o=a.data;if("vehicle"===n&&o.vehicleData){var i,l;let e={...o.vehicleData,bodyStyle:null!=(i=o.vehicleData.bodyStyle)?i:null,contentId:t,imageUrl:null!=(l=o.contentThumbnailUrl)?l:null,mtScore:null,ownershipStatus:"interested",priceRange:null,slug:o.contentPath,title:o.contentTitle};await d(e)}else{let e="".concat(window.location.origin).concat(o.contentPath);await s({authors:o.authors,contentId:t,contentType:n,publishFrom:o.publishFrom,thumbnailUrl:o.contentThumbnailUrl,title:o.contentTitle,url:e})}return m(t),{contentId:t,success:!0}}}),u=(0,o.useCallback)(async()=>{let e=g();if(n&&!t&&0!==e.length&&!r.current){r.current=!0;try{(await Promise.allSettled(e.map(e=>c.mutateAsync(e)))).forEach((t,n)=>{if("rejected"===t.status){let a=e[n],o=t.reason;((null==o?void 0:o.statusCode)===404||(null==o?void 0:o.status)===404)&&m(a.contentId)}}),await a.invalidateQueries({predicate:e=>"mt-user-bookmarks"===e.queryKey[0]||"bookmark"===e.queryKey[0]||"savedVehicles"===e.queryKey[0]})}finally{l(g()),r.current=!1}}},[n,t,c,a]);(0,o.useEffect)(()=>{n&&!t&&i.length>0&&u()},[n,t,i.length,u]),i.length}();let{onSaveSuccess:D,onUnsaveSuccess:O}=(0,w.U)(i,A),{addVehicle:H,removeVehicle:Y,vehicles:G}=(0,x.I)(),J=(0,o.useMemo)(()=>R?{...R,contentId:i,imageUrl:null!=y?y:null,ownershipStatus:"interested",slug:u,title:T}:null,[R,i,T,u,y]),X=(0,o.useMemo)(()=>"vehicle"===A&&G.some(e=>e.contentId===i),[A,G,i]),{data:K,error:V,isPending:Q}=(0,p.io)(i,F),$=(0,p.xB)(),q=(0,p.kh)(),Z=$.isPending||q.isPending,W=$.error||q.error||V,ee="vehicle"===A?X:!Q&&null!=K;if(!j)return null;let et=async()=>{F?"vehicle"===A&&J?await H(J):(d.Y.log({context:{contentId:i},level:"info",msg:"Bookmark save clicked"}),$.mutate({authors:t,contentId:i,contentType:A,publishFrom:E,thumbnailUrl:y,title:T,url:z},{onError:e=>{d.Y.log({context:{contentId:i},error:e,level:"error",msg:"Bookmark save failed"})},onSuccess:()=>{d.Y.log({context:{contentId:i},level:"info",msg:"Bookmark save success"}),null==D||D()}})):(!function(e){if(!s.fL)try{let t=g(),n=t.findIndex(t=>t.contentId===e.contentId),a={...e,timestamp:Date.now()};n>=0?t[n]=a:t.push(a),localStorage.setItem(c,JSON.stringify(t))}catch(t){d.Y.log({context:{contentId:e.contentId},error:t,level:"error",msg:"Failed to add pending save to localStorage"})}}({contentId:i,contentType:null!=A?A:"standardArticle"}),B(!0))},en=(e=>{switch(e){case"vehicle":return L.JI.vehiclePage;case"video":return L.JI.video;case"comparison":return L.JI.comparison;default:return L.JI.standardArticle}})(A),ea="Failed to save ".concat(en,". Please try again."),eo="Failed to unsave ".concat(en,". Please try again."),ei=q.error instanceof Error?eo:void 0;return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(S.A,{contentType:A,isOpen:U,onClose:()=>B(!1)}),(0,a.jsx)(C.X,{contentType:A,errorMessage:ei,isLoading:q.isPending,isOpen:_,onCancel:()=>{M(!1)},onConfirm:()=>{"vehicle"===A&&J?Y(J.contentId):(d.Y.log({context:{contentId:i},level:"info",msg:"Bookmark remove clicked"}),q.mutate(i,{onError:e=>{d.Y.log({context:{contentId:i},error:e,level:"error",msg:"Bookmark remove failed"})},onSuccess:()=>{d.Y.log({context:{contentId:i},level:"info",msg:"Bookmark remove success"}),null==O||O()}})),M(!1)}}),(0,a.jsx)(N,{ariaLabel:ee?"".concat(L.JI.unsave," ").concat(en):"".concat(L.JI.save," ").concat(en),className:n,dataId:k,errorMessage:W instanceof Error?ea:void 0,isLoading:Z,isSaved:ee,onSave:et,onUnsave:()=>{M(!0)}})]})},{FallbackComponent:y.c})},20850:(e,t,n)=>{n.d(t,{U:()=>r});var a=n(12115);let o=(e,t)=>{var n;let a={custom_attributes:{content_id:t},event_name:"save"===e?"Saved Comparison":"Unsaved Comparison"};null==(n=window.Nitrous)||n.push(()=>{window.Nitrous.logEvent(a)})},i=(e,t)=>{var n;let a={custom_attributes:{content_id:t},event_name:"save"===e?"Saved Vehicle":"Unsaved Vehicle"};null==(n=window.Nitrous)||n.push(()=>{window.Nitrous.logEvent(a)})},l=(e,t)=>
1{var n;let a={custom_attributes:{content_id:t},event_name:"save"===e?"Saved Video":"Unsaved Video"};null==(n=window.Nitrous)||n.push(()=>{window.Nitrous.logEvent(a)})};function r(e,t){let n="video"===t,r="vehicle"===t,s="comparison"===t;return{onSaveSuccess:(0,a.useCallback)(()=>{n?l("save",e):r?i("save",e):s&&o("save",e)},[e,n,r,s]),onUnsaveSuccess:(0,a.useCallback)(()=>{n?l("unsave",e):r?i("unsave",e):s&&o("unsave",e)},[e,n,r,s])}}},39740:(e,t,n)=>{n.d(t,{default:()=>v});var a=n(95155),o=n(12115),i=n(92062),l=n(73420),r=n(2821);class s{constructor(){var e=this;this.ntvTargeting={native:"300x250",ntvPlacement:"1115836"},this.sponsoredRailTargeting=[[{...this.ntvTargeting,pos:["top","1"]}],[{...this.ntvTargeting,pos:["middle","2"]}],[{...this.ntvTargeting,pos:["bottom","3"]}]],this.certfiedRailTargeting=[[{...this.ntvTargeting,pos:["top","1"]}],[{...this.ntvTargeting,pos:["bottom","2"]}]],this.sponsoredRailSize={desktop:[[300,250],[300,600]],laptop:[[300,250],[300,600]],mobile:[],tablet:[[300,250],[300,600]]},this.firstAdFlowBlockSizes=[{desktop:[[300,250],[300,600]],laptop:[[300,250],[300,600]],mobile:[],tablet:[[300,250],[300,600]]},{desktop:[[300,250]],laptop:[[300,250]],mobile:[],tablet:[[300,250]]}],this.firstAdFlowTargeting=[[{position:["atf","dt-box-1-0"],slot:"dt-box-1"},{position:["atf","dt-box-2-0"],slot:"dt-box-2"}]],this.defaultRailTargeting=[[{pos:["top"]},{pos:["bottom"]}]],this.ymmRailTargeting=[[{pos:["top"]},{pos:["middle"]}],[{pos:["bottom"]}],[{pos:["carmatch"],sponsored:"true"}],[{pos:["newsletter"],sponsored:"true"}]],this.defaultRailSizes=[{desktop:[[300,250]],laptop:[[300,250]],mobile:[],tablet:[[300,250]]},{desktop:[[300,250],[300,600]],laptop:[[300,250],[300,600]],mobile:[],tablet:[[300,250],[300,600]]}],this.subRailSizes=[{desktop:[[300,250],[300,600]],laptop:[[300,250],[300,600]],mobile:[],tablet:[[300,250],[300,600]]}],this.extraLargeScreenRailSize=[{desktop:[[300,250]],laptop:[[300,250]],mobile:[],tablet:[[300,250]]},{desktop:[[300,250]],laptop:[[300,250]],mobile:[],tablet:[[300,250]]}],this.buildSponsoredAdLayout=e=>Array.from({length:e},(e,t)=>{let n=t%this.sponsoredRailTargeting.length;return{adSizes:[this.sponsoredRailSize],adTargeting:this.sponsoredRailTargeting[n]}}),this.buildCertifiedAdLayout=e=>Array.from({length:e},(e,t)=>{let n=t%this.certfiedRailTargeting.length;return{adSizes:[this.sponsoredRailSize],adTargeting:this.certfiedRailTargeting[n]}}),this.build2xlScreenAdLayout=e=>{let t=0;return Array.from({length:e},(e,n)=>{let a=n%this.defaultRailTargeting.length,o=this.defaultRailTargeting[a].map(e=>({...this.ntvTargeting,pos:["".concat(e.pos),"".concat(++t)]}));return{adSizes:this.extraLargeScreenRailSize,adTargeting:o}})},this.buildYMMAdLayout=e=>{let t=0;return Array.from({length:e},(e,n)=>{let a=n%this.ymmRailTargeting.length,o=this.ymmRailTargeting[a].map(e=>({...this.ntvTargeting,pos:(null==e?void 0:e.sponsored)==="true"?["".concat(e.pos)]:["".concat(e.pos),"".concat(++t)],sect:"buyersguide"}));return{adSizes:n<1?[this.sponsoredRailSize,this.sponsoredRailSize]:[this.sponsoredRailSize],adTargeting:o}})},this.buildStandardAdLayout=function(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return Array.from({length:t},(t,a)=>{let o=a%e.defaultRailTargeting.length,i=e.defaultRailTargeting[o].map(t=>({...e.ntvTargeting,pos:["".concat(t.pos),"".concat(++n)]}));return{adSizes:e.defaultRailSizes,adTargeting:i}})},this.buildContentAdLayout=function(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return Array.from({length:t},(t,a)=>{let o=a%e.defaultRailTargeting.length,i=e.defaultRailTargeting[o].map(t=>({...e.ntvTargeting,pos:["".concat(t.pos),"".concat(++n)]}));return{adSizes:e.subRailSizes,adTargeting:i}})},this.buildFirstAdFlowBlockLayout=e=>Array.from({length:e},(e,t)=>{let n=t%this.firstAdFlowTargeting.length;return{adSizes:this.firstAdFlowBlockSizes,adTargeting:this.firstAdFlowTargeting[n]}}),this.buildAdFlowLayout=function(t){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return Array.from({length:1},()=>({adSizes:[e.sponsoredRailSize],adTargeting:[{position:["breaker","dt-box-breaker-".concat(n)],slot:"dt-box-breaker"}]}))}}}var d=n(75593),c=n(65585),u=n(92883);let g=e=>{let{additionalTargeting:t,blockHeight:n,blockSizes:o,blockTargeting:l,children:r,index:s,isArticle:g=!1,pageTargeting:m}=e,h=(0,i.dv)(),p="lg"===h||"xl"===h||"2xl"===h,v=(null==t?void 0:t.column)==="leftrail"?"left-":"right-";return(0,a.jsx)("div",{"data-rr-ad-block":!0,style:{height:"".concat(n,"px")},children:(0,a.jsx)("div",{className:"sticky top-14 flex flex-col gap-6 lg:top-20",children:(0,a.jsxs)(a.Fragment,{children:[o.map((e,n)=>g?(0,a.jsx)(c.A,{className:"min-h-[250px]",noGenId:!0,pageTargeting:m,size:p&&e.desktop||[],sizeMapping:[[[1024,0],e.desktop||[]],[[768,0],e.tablet||[]],[[0,0],[]]],slotName:"".concat(v,"rail-").concat(s,"-").concat((0,d.e)({...l[n]})),targeting:{...l[n],...t}},n):(0,a.jsx)(u.default,{adContainerProps:{className:"min-h-[250px] min-w-[300px]"},adProps:{pageTargeting:m,sizes:e,slotIdPrefix:"".concat(v,"rail-").concat(s,"-").concat((0,d.e)({...l[n],...t})),targeting:{...l[n],...t}}},n)),r]})})})},m=function(e,t,n,a,o,i,l,r){let d=arguments.length>8&&void 0!==arguments[8]?arguments[8]:0,c=new s;return l?c.buildFirstAdFlowBlockLayout(1):r?c.buildAdFlowLayout(1,d-1):a?c.build2xlScreenAdLayout(i):o?c.buildCertifiedAdLayout(i):e?c.buildSponsoredAdLayout(i):n?c.buildYMMAdLayout(i):t?c.buildContentAdLayout(i):c.buildStandardAdLayout(i)}
1,h=e=>{let{ChildComponent:t,adBlocksCounter:n=1,adFlowBlocks:l=!1,additionalTargeting:s,bodyHeight:d,className:c,firstadFlowBlock:u=!1,isArticleSub:h=!1,isBuyersGuidePages:p,isCertified:v,noMinHeight:f=!1,overrideBlocksToInsert:b,pageTargeting:x,sponsored:w}=e,y="2xl"===(0,i.dv)("2xl")&&(null==s?void 0:s.column)==="rightrail",S=f?0:b?1500*b:0,T=b||Math.floor(d/1500)||1,A=Math.floor(d/T);b&&d<S&&(T=Math.floor(d/(A=1500))||2),u||l?A=d:w&&!b&&(T=Math.min(T=Math.floor(d/2e3)||1,3),A=Math.floor(d/T));let k=(0,o.useMemo)(()=>0===T?[]:m(w||!1,h||!1,p||!1,y||!1,v||!1,T,u||!1,l||!1,n).map((e,n)=>{let{adSizes:o,adTargeting:i}=e;return(0,a.jsx)(g,{additionalTargeting:s||{},blockHeight:A,blockSizes:o,blockTargeting:i,index:n,pageTargeting:x,children:0===n&&t&&1!==b?(0,a.jsx)(t,{}):null},n)}),[T,w,h,p,y,v,u,l,n,s,A,x,t,b]);return(0,a.jsx)("div",{className:(0,r.A)("flex flex-col gap-6",c),children:k})};var p=n(68460);let v=function(e){let{ChildComponent:t,adBlocksCounter:n=0,adFlowBlocks:r=!1,children:s,className:d,contributorAndShareSection:c,firstadFlowBlock:u=!1,headerContent:g,isArticleSub:m=!1,isBuyersGuidePages:v,isCertified:f,noMinHeight:b=!1,overrideBlocksToInsert:x,pageTargeting:w,rightRailClasses:y,shouldAddLeftRail:S=!1,sponsored:T}=e,A=(0,o.useId)(),k=(0,o.useRef)(null),[I,E]=(0,o.useState)(0),{currentPhotoIndex:L,currentTab:N}=(0,p.t)(),[C,R]=(0,o.useState)("".concat(L,"-").concat(N)),z=(0,i.dv)("2xl");return(0,o.useEffect)(()=>{let e=(0,l.zJ)("rail_");(0,l.iN)(e),R(e=>e+1),(0,l.t4)(e)},[]),(0,o.useEffect)(()=>{R("".concat(L,"-").concat(N,"-").concat(Date.now()))},[L,N]),(0,o.useLayoutEffect)(()=>{let e;if(!k.current)return;let t=0,n=!1,a=k.current.clientHeight;a>0&&(t=a,E(a));let o=new ResizeObserver(a=>{clearTimeout(e),e=setTimeout(()=>{let e=a[0];if(e){var o;o=e.contentRect.height,!n&&Math.abs(o-t)>100&&o>0&&(n=!0,t=o,E(o),setTimeout(()=>{n=!1},200))}},150)});return o.observe(k.current),()=>{clearTimeout(e),o.disconnect()}},[]),(0,a.jsxs)(i.D6,{className:"2xl:gap-16",children:[S?(0,a.jsx)(i.Ig,{children:(0,a.jsx)(h,{ChildComponent:t,adBlocksCounter:n,adFlowBlocks:r,additionalTargeting:{column:"leftrail"},bodyHeight:I,className:y,firstadFlowBlock:u,isBuyersGuidePages:v,isCertified:f,overrideBlocksToInsert:1,pageTargeting:w,sponsored:T},C||A)}):null,(0,a.jsxs)(i.Ow,{className:d,"data-nitrous-content-readable":!0,ref:k,children:[z&&S&&(0,a.jsx)(a.Fragment,{children:g}),s,z&&S&&(0,a.jsx)(a.Fragment,{children:c})]}),(0,a.jsx)(i.Ig,{className:"hidden lg:block",children:(0,a.jsx)(h,{ChildComponent:t,adBlocksCounter:n,adFlowBlocks:r,additionalTargeting:S?{column:"rightrail"}:{},bodyHeight:I,className:y,firstadFlowBlock:u,isArticleSub:m,isBuyersGuidePages:v,isCertified:f,noMinHeight:b,overrideBlocksToInsert:S?1:x,pageTargeting:w,sponsored:T},C||A)})]})}},49865:(e,t,n)=>{n.d(t,{A:()=>s});var a=n(95155),o=n(12115),i=n(92062),l=n(4259),r=n(14e3);let s=function(){let{contentType:e="standardArticle",isOpen:t,onClose:n,onSignIn:s,onSignUp:d}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},[c,u]=(0,o.useState)(!0),{handleSignIn:g,handleSignUp:m}=(0,l.A)(),h=(e=>{let t;switch(e){case"vehiclePage":case"vehicle":t=r.HG.modal.vehiclePage;break;case"video":t=r.HG.modal.video;break;default:t=r.HG.modal.standardArticle}return{...r.HG.modal.shared,...t}})(e),p="benefits"in h&&Array.isArray(h.benefits)?h.benefits:null,v=async()=>{d?d():await m()},f=async()=>{s?s():await g()};return(0,a.jsxs)(i.lG,{className:"mx-auto flex max-w-sm flex-col items-center p-8 text-center","data-id":"login-modal",onClose:()=>{n?n():u(!1)},open:void 0!==t?t:c,children:[(0,a.jsx)(i.L3,{className:"font-black text-black",variant:"h4",children:h.title}),(0,a.jsxs)(i.Cf,{className:"mx-auto flex max-w-sm flex-col items-center p-8 text-center",children:[(0,a.jsx)(i.o5,{className:"mb-8 text-base leading-6 text-gray-700",children:h.subtitle}),p&&(0,a.jsx)("ul",{className:"mb-8 list-inside list-disc text-left text-base leading-6 text-gray-700",children:p.map(e=>(0,a.jsx)("li",{children:e},e))}),(0,a.jsxs)("div",{className:"flex w-full flex-col gap-4",children:[(0,a.jsx)(i.$n,{className:"w-full rounded bg-black px-6 py-3 text-sm font-semibold text-white uppercase transition-colors hover:bg-gray-800",colorScheme:"neutral-2","data-id":"login-modal-signup-button",onClick:v,children:r.HG.modal.signUp}),(0,a.jsx)(i.$n,{className:"w-full rounded border border-black bg-transparent px-6 py-3 text-sm font-medium text-black transition-colors hover:bg-gray-50",colorScheme:"neutral-8","data-id":"login-modal-signin-button",onClick:f,children:r.HG.modal.signIn})]})]})]})}},65585:(e,t,n)=>{n.d(t,{A:()=>x});var a=n(95155),o=n(12115),i=n(20063),l=n(88992),r=n(86535),s=n(92062),d=n(81981),c=n(82411),u=n(37645),g=n(12881),m=n(57701),h=n.n(m);let p={"2xl":16*parseInt(h().screens["2xl"]),lg:16*parseInt(h().screens.lg),md:16*parseInt(h().screens.md),sm:16*parseInt(h().screens.sm),xl:16*parseInt(h().screens.xl)};var v=n(35818),f=n(20974),b=n(58553);let x=(0,l.withErrorBoundary)(e=>{let{className:t="",noBid:n=!1,noGenId:l=!1,onAdRendered:r,pageTargeting:m,size:h,sizeMapping:x=[],slotName:w="",targeting:y,...S}=e,T=(0,o.useId)(),A=(0,o.useMemo)(()=>{let e=l?"":"-".concat(T);
1return"ad-id-".concat(w).concat(e).toLowerCase()},[l,w,T]),k=(0,i.usePathname)(),[I,E]=(0,o.useState)(0);return(0,o.useEffect)(()=>{E(e=>e+1)},[k]),(0,o.useEffect)(()=>{(0,b.A)();let e=e=>{e.slot.getSlotElementId()===A&&r&&r(e.isEmpty)};return r&&googletag.cmd.push(function(){googletag.pubads().addEventListener("slotRenderEnded",e)}),()=>{r&&googletag.cmd.push(function(){googletag.pubads().removeEventListener("slotRenderEnded",e)})}},[r,A]),(e=>{var t;let{id:n,noBid:a=!1,path:i,size:l,sizeMapping:r,targeting:m}=e,h=(0,s.dv)(),b="lg"===h||"xl"===h||"2xl"===h,x=(null==m||null==(t=m.sponsored)?void 0:t.toString().toLowerCase())==="true",w=(0,o.useMemo)(()=>(function(e,t){if(!Array.isArray(e)||0===e.length)return[];let n=!!("string"==typeof t&&[!1,"sm","md","lg","xl","2xl"].includes(t))&&t,a=n&&p[n]?p[n]:0,o=[...e].sort((e,t)=>t[0][0]-e[0][0]);for(let[e,t]of o){let[n]=e;if(a>=n)return t}return o[o.length-1][1]||[]})(r||[],h),[r,h]),y=(0,o.useMemo)(()=>(0,f.A)({isDesktop:b,size:l[0],targeting:{...m,refresh:"false"}}),[b,l,m]);(0,o.useEffect)(()=>{let e=window.googletag||{};if(e.cmd=e.cmd||[],0===w.length)return;let t=!d.h.NEXT_PUBLIC_AD_HEADER_BIDDING||a||x?Promise.resolve():(0,g.i0)({sizes:w,slotID:n,slotName:i});return e.cmd.push(()=>{var a;let o=null==(a=(0,v.A)(i,w,n))?void 0:a.addService(e.pubads());if(o&&(null==r?void 0:r.length)){let t=e.sizeMapping();r.forEach(e=>{let[n,a]=e;return t.addSize(n,a)}),o.defineSizeMapping(t.build())}y&&Object.entries(y).forEach(e=>{let[t,n]=e;void 0!==n&&""!==n&&o.setTargeting(t,n)}),e.pubads().getTargeting(c.t.PhotoSlided).includes("true")&&o&&((0,u.S$)(o,u.IS.DestroyRefresh),(0,u.wU)(o)),e.enableServices(),e.display(n),d.h.NEXT_PUBLIC_AD_HEADER_BIDDING&&t.then(()=>{o&&e.pubads().refresh([o])})}),()=>{e.cmd.push(()=>{let t=e.pubads().getSlots().find(e=>e.getSlotElementId()===n);t&&e.destroySlots([t])})}},[n,i,w,r,a,x,y])})({id:A,noBid:n,path:(null==m?void 0:m.adPath)||"",size:h,sizeMapping:x,targeting:{...m.adTargeting,...y}}),(0,a.jsx)("div",{className:t,"data-ad":!0,id:A,...S},I)},{FallbackComponent:r.c})},68460:(e,t,n)=>{n.d(t,{Dz:()=>l,t:()=>r});var a=n(95155),o=n(12115);n(74992);let i=(0,o.createContext)({currentPhotoIndex:0,currentTab:"all",setCurrentPhotoIndex:()=>{},setCurrentTab:()=>{}}),l=e=>{let{children:t}=e,[n,l]=(0,o.useState)(0),[r,s]=(0,o.useState)("all");return(0,a.jsx)(i.Provider,{value:{currentPhotoIndex:n,currentTab:r,setCurrentPhotoIndex:l,setCurrentTab:s},children:t})},r=()=>(0,o.useContext)(i)},73420:(e,t,n)=>{function a(e){var t;return(null==(t=window.googletag)?void 0:t.pubads)?window.googletag.pubads().getSlots().filter(t=>t.getSlotElementId().includes(e)):[]}function o(e){var t,n;if(!(null==(t=window.googletag)?void 0:t.pubads))return[];e.length>0&&(null==(n=window.googletag)||n.destroySlots(e))}function i(e){var t,n;if(!(null==(t=window.googletag)?void 0:t.pubads))return[];e.length>0&&(null==(n=window.googletag)||n.cmd.push(()=>{window.googletag.pubads().refresh(e)}))}n.d(t,{iN:()=>o,t4:()=>i,zJ:()=>a})}}]); 2//# sourceMappingURL=1429-e80ba479f09b9d72.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.