1"use strict";(self.webpackChunkmot_crm_react_theme_girardo=self.webpackChunkmot_crm_react_theme_girardo||[]).push([[1308],{74919:function(e,t,a){a.r(t),a.d(t,{default:function(){return T}});a(74423),a(98992),a(3949),a(81454);var l=a(96540),o=a(22405),i=a(62668),c=a(78990),n=a(10832),r=a(86196),s=a(30259),d=a(87174),p=a(14073),m=a(33251),u=a(44675),h=a(63562),g=a(55063),f=a.n(g),x=a(30703),b=a(1778),y=a(56525),w=a(38733);const v=(0,m.Ay)(d.A)(({theme:e})=>({position:"relative",width:"100%",".swiper-wrapper":{margin:"0",height:"100%",width:"100%"},".swiper-slide":{backgroundRepeat:"no-repeat",backgroundPosition:"center",backgroundSize:"cover",width:"auto"},".swiper-pagination":{".swiper-pagination-bullet":{backgroundColor:e.palette.black.main,borderRight:`1px solid ${e.palette.black.main}`,flexGrow:1,height:"6px",width:"100%","&.swiper-pagination-bullet-active":{backgroundColor:e.palette.black.main},"&:last-child ":{border:"none"}}},".swiper-button-next, .swiper-button-prev":{cursor:"pointer",outline:"none",position:"absolute",borderTop:"4px solid #afa99f",borderRight:"4px solid #afa99f",height:"25px",width:"25px",transition:"right .25s cubic-bezier(.785,.135,.15,.86),left .25s cubic-bezier(.785,.135,.15,.86)",top:"71%",zIndex:2,transformOrigin:"top center",transform:"rotate(45deg) translateY(-50%)"},".swiper-button-next":{right:"25px",top:"72%","&:hover":{right:"20px"}},".swiper-button-prev":{transform:"rotate(-135deg) translateY(-50%)",left:"25px",top:"72%","&:hover":{left:"20px"}},"@media (min-width: 992px)":{".swiper-button-next":{right:"-25px",top:"50%","&:hover":{right:"-30px"}},".swiper-button-prev":{left:"-25px",top:"50%","&:hover":{left:"-30px"}}},"&.carousel-default":{".swiper-container":{overflowX:"hidden"},".slide":{boxSizing:"border-box",display:"flex",flexWrap:"wrap",minHeight:"364px",padding:"0 10px"},".slide-col":{width:"100%"},".slide-col-desc":{order:1,paddingBottom:"18px"},".slide-col-image":{order:2},"@media (min-width: 992px)":{".slide-col":{flex:"0 0 50%",maxWidth:"50%"},".slide-col-desc":{paddingLeft:"36px",paddingBottom:"0",order:2},".slide-col-image":{paddingRight:"10px",order:1}},"@media (max-width: 1199.98px)":{".slide":{minHeight:"inherit"},".slide-col-image":{minHeight:"276px"}}},"&.carousel-featured":{".swiper-container":{overflow:"hidden"},".slide":{boxSizing:"border-box",display:"flex",flexWrap:"wrap",height:"490px"},".slide-col":{width:"100%"},".slide-col-desc":{padding:"18px 24px 18px 18px",backgroundColor:e.palette.grey.lite,position:"relative",zIndex:2},"@media (min-width: 992px)":{".slide-col-desc":{flex:"0 0 33.33333%",maxWidth:"33.33333%",padding:"36px 72px 36px 36px"},".slide-col-image":{flex:"0 0 66.66667%",maxWidth:"66.66667%"}},"@media (max-width: 1199.98px)":{".slide":{height:"auto",minHeight:"265px"},".slide-col-desc":{minHeight:"270px"},".slide-col-image":{minHeight:"276px"}},"@media (min-width: 1200px)":{".slide-col-desc:after":{background:`linear-gradient(to right top, ${e.palette.black.main} 49.5%, transparent 50%)`,content:'""',position:"absolute",left:0,bottom:0,width:"100%",height:"36px"}}},"&.carousel-centered":{".swiper-container":{overflowX:"hidden"},".slide":{boxSizing:"border-box",display:"flex",padding:"0 10px",width:"502px",height:"335px","@media (max-width: 490px)":{width:"100vw"}},".slide-col":{position:"relative",width:"100%",height:"100%"}}}));var E=function({set:e,autoplay:t,slider:a,type:o,lightbox:i}){const c=[],n=(0,u.A)(),r={buttons:{showDownloadButton:!1}};e&&e.length&&("centered"===o?Object.entries(e).map(([e,t])=>(c.push(l.createElement(x.e7,{key:t.id,condition:i,wrapper:e=>l.createElement(h.Ay,null,l.createElement(h.HU,{options:r},e))},l.createElement(d.A,{className:"slide"},l.createElement(d.A,{className:"slide-col"},l.createElement(y.A,{key:`${e}-${t.id}`,file:t.media&&t.media.set?t.media.set[0]:null,options:{backgroundImage:!1},alt:"",classes:"swiper-lazy"}),l.createElement(d.A,{maxWidth:"55%",sx:{position:"absolute",bottom:24,left:24}},l.createElement(p.A,{variant:"feed",color:"white.main"},t.title&&f()(t.title))))))),!0)):"featured"===o?Object.entries(e).map(([e,t])=>{var a,o,s,m,u;let g=`/car/${t.slug}`,w="";null!==(a=t.categories)&&void 0!==a&&a.includes("features")?(g=`/features/${t.slug}`,w="Featured Post"):null!==(o=t.categories)&&void 0!==o&&o.includes("films")?(g=`/films/${t.slug}`,w="Featured Film"):"pages"==(null==t?void 0:t.itemType)?(g=`/${t.slug}/`,w="Featured Page"):null!==(s=t.categories)&&void 0!==s&&s.includes("team")?g=`/team/${t.slug}`:w=null!==(m=t.categories)&&void 0!==m&&m.includes("recently-sold")?"Recently Sold":"Featured Car";let v=null!=t&&t.featuredImage?null==t?void 0:t.featuredImage:null!=t&&null!==(u=t.media)&&void 0!==u&&u.set?t.media.set[0]:null;return c.push(l.createElement(x.e7,{condition:i,wrapper:e=>l.createElement(h.Ay,null,l.createElement(h.HU,{options:r},e))},l.createElement(d.A,{className:"slide"},l.createElement(d.A,{className:"slide-col slide-col-desc",height:{xxxs:"260px",lg:"100%"}},l.createElement(p.A,{color:"grey.darkest",fontSize:"17px",fontWeight:"400"},w),l.createElement(p.A,{variant:"h2",color:"red.main",my:3},l.createElement(b.A,{fontSize:{xxxs:"20px",lg:"26px"},fontWeight:"400",letterSpacing:"0px",lineHeight:1,lowercase:"true",color:n.palette.red.main,to:g},t.title)),l.createElement(p.A,{component:"span",variant:"body1",sx:{lineHeight:{xxxs:"18px",lg:"25px"}}},t.content.excerpt&&f()(t.content.excerpt))),l.createElement(d.A,{className:"slide-col slide-col-image"},l.createElement(y.A,{key:e,file:v,options:{backgroundImage:!1},alt:"",classes:"swiper-lazy"}))))),!0}):Object.entries(e).map(([e,t])=>{var a,o,s;const m=null===(a=t.categories)||void 0===a?void 0:a.includes("team");let u=`/car/${t.slug}`;return null!==(o=t.categories)&&void 0!==o&&o.includes("features")?u=`/features/${t.slug}`:null!==(s=t.categories)&&void 0!==s&&s.includes("team")&&(u=`/team/${t.slug}`),c.push(l.createElement(x.e7,{condition:i,wrapper:e=>l.createElement(h.Ay,null,l.createElement(h.HU,{options:r},e))},l.createElement(d.A,{className:"slide"},l.createElement(d.A,{className:"slide-col slide-col-image"},l.createElement(y.A,{key:e,file:t.media&&t.media.set?t.media.set[0]:null,options:{backgroundImage:!1},alt:"",classes:"swiper-lazy"})),l.createElement(d.A,{className:"slide-col slide-col-desc"},l.createElement(p.A,{variant:"h2",color:"red.main",my:3},l.createElement(b.A,{fontSize:{xxxs:"20px",md:"26px"},fontWeight:"400",letterSpacing:"0px",lowercase:"true",color:n.palette.red.main,to:u},m?`Meet ${t.title}`:f()(t.title))),l.createElement(p.A,{component:"span",variant:"body1"},t.content.excerpt&&f()(t.content.excerpt)),l.createElement(d.A,{pt:3},l.createElement(b.A,{fontWeight:"800",letterSpacing:"1px",color:n.palette.black.main,to:u},"More on"," ",l.createElement("span",{style:{paddingBottom:"0px",borderBottom:"1px solid black"}},t.title.split(" ")[0])),l.createElement(p.A,{variant:"h2",color:"red.main",my:3},l.createElement(b.A,{fontSize:{xxxs:"20px",md:"26px"},fontWeight:"400",letterSpacing:"0px",lowercase:"true",color:n.palette.red.main,to:"/team/"},"The Girardo"," ",l.createElement("span",{style:{color:n.palette.black.main}},"& Co"," ")," ","Team"))))))),!0}));const s=c.length>1;return l.createElement(v,{className:`carousel-${o}`},l.createElement(w.A,{options:{style:{width:"100%",height:"100%",padding:null},allowTouchMove:s,autoHeight:!1,autoplay:t,direction:"horizontal",followFinger:!0,grabCursor:!1,longSwipes:!0,loop:s,navigation:"centered"!==o,pagination:{clickable:!0,el:".swiper-pagination",type:"bullets",renderBullet:(e,t)=>`<div class="${t}"></div>`},scrollbar:{el:".swiper-scrollbar",draggable:!0,dragSize:null,hide:!1,snapOnRelease:!0},roundLengths:!0,slidesPerView:"centered"===o?"auto":1,slides:c,centeredSlides:"centered"===o}}))};var S=({options:e,data:t})=>{const[a,o]=(0,l.useState)([]);(0,l.useEffect)(()=>{let a=[];e.media&&e.media.set&&e.media.set.length?a=e.media.set:t.media&&t.media.gallery&&t.media.gallery.images&&t.media.gallery.images.length?a=t.media.gallery.images:t.docs&&t.docs.length&&(t.docs.forEach(e
1=>e.collection=t.collection),a=t.docs),o(a)},[e,t]);const i=e.float?{float:"left"}:{},c=!(void 0===e.autoplay||"true"!==e.autoplay),n=!(void 0===e.slider||"true"!==e.slider);return a.length?l.createElement(r.A,{spacing:e&&e.spacing||{},sx:i},l.createElement(E,{set:a,autoplay:c,slider:n,lightbox:e.lightbox,type:e.feedType})):null},A=a(86462);async function P(e,t,a,l,o,i){return(0,c.A)({term:t,category:a,page:l,perPage:o}).then(c=>{var n;return{docs:null!==(n=null==c?void 0:c.list)&&void 0!==n?n:[],collection:e,term:t,categories:a,page:l,nbPages:c.nbPages,perPage:o,hasMore:c.page+1<c.nbPages,fetchMore:P,searchTime:i}})}const k=l.memo(s.A);var T=({options:e,data:t,inColumn:a=!1,auxData:s})=>{const d=(0,A.useLocation)(),[p,m]=(0,l.useState)(!1),[u,h]=(0,l.useState)(!1),[g,f]=(0,l.useState)(!1),[x,b]=(0,l.useState)(""),[y,w]=(0,l.useState)(!1),[v,E]=(0,l.useState)(!0),[T,M]=(0,l.useState)(0);let _=null;(0,l.useEffect)(()=>{!1===p&&m((0,n.jr)(e,s))},[]),(0,l.useEffect)(()=>{let t=!1;const a={collection:"",docs:[]};return async function(){if(e.data)if("curated"===e.data.collection){const t={collection:"",docs:[]};a.collection=e.data.collection,t.collection=e.data.collection;const l=e.data.categoryOptions.selected,c=[],n=[],r=[];l.forEach(e=>{const t=e.label.replace(/^\(.*?\)/,"Collection: ").split(":")[0];let l="";switch(t){case"Collection":l="collectionItemProfilesSearch";break;case"Post":l="posts";break;case"Page":l="pages"}if(e.value){const t=(0,o.P)((0,o.rJ)(i.db,l),(0,o._M)("slug","==",e.value));c.push((0,o.GG)(t).then(e=>{e.forEach(async e=>{const t=e.data();t.item_id&&(t.itemType="collectionItemProfilesSearch"),"pages"===l&&(t.itemType="pages"),a.docs.push(t)})}))}}),Promise.all(c).then(()=>{h(a);const l=e.data.limit-a.docs.length;if(l>0){const e=a.docs[0].categories&&a.docs[0].categories.length&&a.docs[0].categories[0],c=a.docs[0].itemType?a.docs[0].itemType:"posts";if(e){const a=(0,o.P)((0,o.rJ)(i.db,c),(0,o._M)("categories","array-contains",e),(0,o._M)("active","==",!0),(0,o._M)("visible","==","public"));n.push((0,o.GG)(a).then(e=>{e.forEach(async e=>{const a=e.data();if(!r.some(e=>a.item_id.includes(e)))for(let o=0;o<l;o++)t.docs.push(a)})}))}}}).then(()=>{e.data.limit-t.docs.length>0&&Promise.all(n).then(()=>f(t))})}else if("searchable"===(null==e?void 0:e.feedType));else if(Array.isArray(e.data)){const l=[];Object.entries(e.data).map(([e,t])=>{if("collectionSaleProfiles"===t.collection||"collectionWebProfiles"===t.collection||"collectionSearch"===t.collection||"collectionItemProfilesSearch"===t.collection)a.collection=t.collection,l.push((0,c.l)({category:t.categories||[],by:t.order.by,direction:t.order.direction,limitNumber:t.limit||1e3}).then(e=>{e.list.forEach(e=>{a.docs.push(e)})}));else{const e=[];t.categories&&(e.push((0,o._M)("categories","array-contains-any",t.categories)),e.push((0,o._M)("visibility","==","public"))),t.order&&e.push((0,o.My)(t.order.by,t.order.direction)),t.limit>0&&e.push((0,o.AB)(t.limit));const c="collectionWebProfiles"===t.collection||"collectionSaleProfiles"===t.collection||"collectionSearch"===t.collection||"collectionItemProfilesSearch"===t.collection?"collectionItemProfilesSearch":t.collection,n=(0,o.P)((0,o.rJ)(i.db,c),...e);a.collection=c,l.push((0,o.GG)(n).then(e=>{e.forEach(e=>{a.docs.push(e.data())})}))}}),Promise.all(l).then(()=>{t||h(a)})}else if("collectionSaleProfiles"===e.data.collection||"collectionSearch"===e.data.collection||"collectionItemProfilesSearch"===e.data.collection)(0,c.l)({category:e.data.categories||[],by:e.data.order.by,direction:e.data.order.direction,limitNumber:e.data.limit||1e3}).then(t=>{if(a.collection=e.data.collection,t.list.forEach(e=>{a.docs.push(e)}),"/"===d.pathname&&"Available Cars"===e.moduleTitle||"/available/"===d.pathname&&"Main Grid of cars"===e.moduleTitle){const e=1e4*(new Date).getFullYear()+100*(new Date).getMonth()+(new Date).getDate();a.docs=a.docs.sort((t,l)=>Math.sin(e+a.docs.indexOf(t))-Math.sin(e+a.docs.indexOf(l)))}h(a)});else{const l=[];a.collection=e.data.collection,e.data.type&&"curated"===e.data.type&&e.data.set.length?l.push((0,o._M)((0,o.Fs)(),"in",e.data.set)):(e.data.categories&&(l.push((0,o._M)("categories","array-contains-any",e.data.categories)),"collectionSaleProfiles"!==e.data.collection&&"collectionSearch"!==e.data.collection&&"collectionItemProfilesSearch"!==e.data.collection||l.push((0,o._M)("active","==",!0)),l.push((0,o._M)("visibility","==","public"))),e.data.order&&l.push((0,o.My)(e.data.order.by,e.data.order.direction)),e.data.limit>0&&l.push((0,o.AB)(e.data.limit)));const c="collectionWebProfiles"===e.data.collection||"collectionSaleProfiles"===e.data.collection||"collectionSearch"===e.data.collection||"collectionItemProfilesSearch"===e.data.collection?"collectionItemProfilesSearch":e.data.collection,n=(0,o.P)((0,o.rJ)(i.db,c),...l);(0,o.GG)(n).then(e=>
1{t||(e.forEach(e=>{const t=e.data();t.id=e.id,a.docs.push(t)}),h(a))}).catch(e=>{})}else{let l=null;if("related"===e.variation)a.collection="posts",l=(0,o.P)((0,o.rJ)(i.db,"posts"),(0,o.AB)(9)),(0,o.GG)(l).then(e=>{t||(e.forEach(e=>{a.docs.push(e.data())}),h(a))}).catch(e=>{});else a.collection="collectionItemProfilesSearch",a.docs=await(0,c.l)({category:["recently-sold"],limitNumber:9}),t||h(a)}}(),()=>{t=!0}},[e]),(0,l.useEffect)(()=>{"searchable"===e.feedType&&(w(!0),clearTimeout(_),_=setTimeout(()=>E(!0),500))},[e.feedType,x]),(0,l.useEffect)(()=>{if("searchable"===e.feedType&&!0===v){const t=Date.now();M(t),P(e.data.collection,x,e.data.categories||[],0,300,t).then(e=>{e.searchTime>=T&&(h({...e,docs:e.docs}),w(!1),E(!1))})}},[e.feedType,v]);let z=null;if("carousel"===e.type)z=l.createElement(r.A,{spacing:e.spacing},l.createElement(S,{options:e,data:u,pageData:t}));else z=l.createElement(r.A,{spacing:e.spacing,sx:{"& .loading-overlay":{display:y?"block":"none"}}},l.createElement(k,{options:e,data:u,initialFeed:p,pageData:t,inColumn:a,setData:h,setSearchTerm:b,secondaryFeed:g}));return z}}}]); 2//# sourceMappingURL=beca3262c01df199423cf6895b18a87670e26269-ac647d330aa55a261afc.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.