1"use strict";(self.webpackChunkgatsby_starter_codedrips=self.webpackChunkgatsby_starter_codedrips||[]).push([[798],{2607:function(e,t,r){r.r(t);var a=r(4578),l=r(7294),n=r(5935),s=r(7234),o=r.n(s),i=r(1129),p=r.n(i),c=r(381),m=r.n(c),d=r(8183),u=r(9251),y=r(1488),E=r(8579),g=r(7140),h=r(8032),b=r(9470),_=r.n(b),v=r(7688);let f=function(e){function t(){return e.apply(this,arguments)||this}(0,a.Z)(t,e);var r=t.prototype;return r.shouldComponentUpdate=function(){return!1},r.render=function(){return l.createElement(l.Fragment,null,this.props.children)},t}(l.Component);function N(e,t){return e.filter((function(e){return Object.keys(e).some((function(r){return e[r].includes(t)}))}))}let k=function(e){function t(t){var r;return(r=e.call(this,t)||this).state={enquire:!1,videoLightbox:!1,floorplanLightbox:!1,imageLightbox:!1,showMore:!1},r.renderText=(e,t)=>{if(0!==e.length)return-1!==e.indexOf("â¢")?l.createElement("li",{key:t},e.replace(/â¢/gi,"")):l.createElement("p",{key:t},e)},r.slider=l.createRef(),r}return(0,a.Z)(t,e),t.prototype.render=function(){var e,t,r,a,s,i,c,b,k,D,L,A,x,w,Z,I;let C=this.props.data.wpRental,S=this.props.data.allWpTeam.nodes,P=this.props.data.allWpRental.nodes,M=[],{videoLightbox:$,floorplanLightbox:F,imageLightbox:T,showMore:q}=this.state,O="",R=(null===(e=C.propertyExternal)||void 0===e?void 0:e.length)&&N(C.propertyExternal,"Youtube Video Link");R&&R.length&&(O=-1!==R[0].url.indexOf(".be/")?`https://www.youtube.com/watch?v=${R[0].url.split(".be/")[1]}`:R[0].url),R=(null===(t=C.propertyExternal)||void 0===t?void 0:t.length)&&N(C.propertyExternal,"General Video Link"),R&&R.length&&(O=-1!==R[0].url.indexOf(".be/")?`https://www.youtube.com/watch?v=${R[0].url.split(".be/")[1]}`:R[0].url);let j="",V=(null===(r=C.propertyExternal)||void 0===r?void 0:r.length)&&N(C.propertyExternal,"Virtual Tour Link");V&&V.length&&(j=V[0].url);let Y=!1;(null===(a=C.propertyInspections)||void 0===a?void 0:a.length)>0&&C.propertyInspections.map(((e,t)=>{m()(e.startDate,"YYYY-MM-DD").isAfter(new Date)&&(Y=!0)}));let G=`${C.propertyAddress.streetAddress}<br />${C.propertyAddress.suburb}`;C.propertyAddress.hideAddress&&(G=C.propertyAddress.suburb);let B=!1;"Available"!==C.propertyListing.marketingStatus&&(B=!0);let W=[],z=null===(s=C.propertyStaff)||void 0===s?void 0:s.map(((e,t)=>{if(M.includes(e.staffMemberId))return null;if(!e.webDisplay)return null;M.push(e.staffMemberId);const r=S.find((t=>t.teamDetails.id===e.staffMemberId));if(!r)return null;let a={acf:r.acf,uri:r.uri,title:r.title,teamDetails:r.teamDetails};return W.push(r.teamDetails.email),a.mobile||(a.mobile=r.teamDetails.mobile),a})).filter((e=>e));return l.createElement(l.Fragment,null,l.createElement(d.Z,{bodyClass:C.slug,path:`/property/${C.slug}`,title:(0,n.ZP)(C.seo.title),description:C.seo.metaDesc,keywords:C.seo.metaKeywords,schema:C.seo.schema.raw,image:C.propertyImages.length>0?C.propertyImages[0].small:""}),l.createElement("article",{className:"property"},l.createElement(_(),{distance:"40px",bottom:!0},l.createElement("section",{className:"property__header"},l.createElement("div",{className:"property__inner property-archive__items"},l.createElement("div",{className:"card card--property"},(null===(i=C.propertyImages)||void 0===i?void 0:i.length)>0&&l.createElement("div",{className:"card__image",onClick:()=>this.setState({imageLightbox:!T})},l.createElement("img",{src:C.propertyImages[C.propertyImages.length>1?1:0].large}),B&&l.createElement("div",{className:"card__sold"},l.createElement("span",null,"Leased"))),l.createElement("div",{className:"card__meta"},G&&l.createElement("h1",null,(0,n.ZP)(G)),l.createElement("div",{className:"card__stats"},C.propertyData.bedrooms>0&&l.createElement("span",null,C.propertyData.bedrooms," Beds"),C.propertyData.bathrooms>0&&l.createElement("span",null,C.propertyData.bathrooms," Baths"),C.propertyData.totalParking>0&&l.createElement("span",null,C.propertyData.totalParking," Cars"),(null===(c=C.propertyLand)||void 0===c?void 0:c.landArea_value)&&l.createElement("span",null,C.propertyLand.landArea_value,"sqm"===C.propertyLand.landArea_unit?"ã¡":C.propertyLand.landArea_unit+"s"))))))),l.createElement("section",{className:"property__main"},l.createElement(_(),{distance:"40px",bottom:!0},l.createElement("div",{className:"property__inner"},l.createElement("div",{className:"property__content"},l.createElement("h2",null,(0,n.ZP)(C.propertyListing.mainHeadline)),"Sold"===C.propertyListing.marketingStatus&&l.createElement("h4",{className:"property__price"},"$",parseFloat(C.propertyListing.soldPrice).toFixed(2).replace(/\d(?=(\d{3})+\.)/g,"$&,").replace(/\.00/,"")),"Available"===C.propertyListing.marketingStatus&&l.createElement("h4",{className:"property__price"},C.propertyListing.displayPrice),l.createElement("ul",{className:"property__buttons"},l.createElement("li",null,l.createElement("button",{type:"button",onClick:()=>this.setState({imageLightbox:!T})},"Gallery")),j&&l.createElement("li",null,l.createElement(g.Z,{to:j},"3D Tour")),(null===(b=C.propertyFloorplan)||void 0===b?void 0:b.length)>0&&l.createElement("li",null,l.createElement("button",{type:"button",onClick:()=>this.setState({floorplanLightbox:!this.state.floorplanLightbox})},"Floorplan")),l.createElement("li",null,l.createElement(g.Z,{to:"#enquire"},"Enquire"))),l.createElement("div",{className:"property__description-wrap"},l.createElement("div",{className:`property__description ${q&&"active"}`},null===(k=C.propertyListing)||void 0===k?void 0:k.mainDescription.split("\n").map(this.renderText)),l.createElement("button",{type:"button",className:"btn btn-black property__more",onClick:()=>this.setState({showMore:!this.state.showMore})},q?"Read Less":"Read More"))),l.createElement("div",{className:"property__contact"},"Available"===C.propertyListing.marketingStatus&&(null===(D=C.propertyInspections)||void 0===D?void 0:D.length)>0&&Y&&l.createElement("div",{className:"property__important-dates"},l.createElement("h4",null,"Inspections"),C.propertyInspections.map(((e,t)=>{let r={name:C.propertyAddress.hideAddress?C.propertyAddress.addressSuburb:C.title,details:"Open For Inspection",location:C.propertyAddress.hideAddress?C.propertyAddress.addressSuburb:C.title,startsAt:m()(e.startDate),endsAt:m()(e.endDate)};return!m()(e.startDate).add(1,"days").isBefore(new Date)&&l.createElement("p",{key:t},l.createElement(o(),{event:r},l.createElement("u",null,m()(e.startDate).format("ddd D MMM")),l.createElement("br",null),m()(e.startDate).format("h:mmA")," - ",m()(e.endDate).format("h:mmA")))}))),l.createElement("div",{className:"property__agents"},null==z?void 0:z.map(((e,t)=>l.createElement("div",{className:"card card--agent"},l.createElement("div",{className:"card__image"},l.createElement(g.Z,{to:e.uri},l.createElement(h.G,{image:(0,h.c)(e.acf.profileImage.localFile),alt:(0,n.ZP)(e.title)}))),l.createElement("div",{className:"card__content"},l.createElement("div",{className:"card__title"},l.createElement("h4",null,(0,n.ZP)(e.title)),l.createElement("p",null,(0,n.ZP)(e.acf.jobTitle?e.acf.jobTitle:e.teamDetails.role))),l.createElement("div",{className:"card__contact"},e.teamDetails.email&&l.createElement("p",{className:"email"},l.createElement(g.Z,{to:`mailto:${e.teamDetails.email}`},"Email")),e.teamDetails.mobile&&l.createElement("p",{className:"phone"},l.createElement(g.Z,{to:`tel:${e.teamDetails.mobile}`},e.teamDetails.mobile)),l.createElement(g.Z,{className:"card__link btn",to:e.uri},"Profile"))))))))))),(null===(L=C.propertyImages)||void 0===L?void 0:L.length)>2&&l.createElement("section",{className:"property__gallery"},l.createElement("div",{className:"property__inner"},null===(A=C.propertyImages)||void 0===A?void 0:A.slice(2,5).map(((e,t)=>l.createElement("div",{className:"property__image",key:t},l.createElement(_(),{distance:"40px",bottom:!0},l.createElement("img",{src:e.large,alt:(0,n.ZP)(C.title),onClick:()=>this.setState({imageLightbox:!T})})),0===t&&O&&l.createElement("button",{type:"button",className:"property__play-video",onClick:()=>this.setState({videoLightbox:!0})},l.createElement(y.sh,null)))))),l.createElement("button",{className:"property__gallery-button btn btn-black",type:"button",onClick:()=>this.setState({imageLightbox:!T})},"View All")),l.createElement("section",{className:"property__enquire",id:"enquire"},l.createElement(_(),{distance:"40px",bottom:!0},l.createElement("div",{className:"property__inner"},l.createElement("div",{className:"property__form"},l.createElement("h4",null,"Interested?",l.createElement("br",null),"Get in touch with Chwyla & Co."),l.createElement(E.Z,{title:C.title,property:C.title,agent_emails:W.join(", ")})),!C.propertyAddress.hideAddress&&l.createElement("div",{className:"property__map"},l.createElement(f,null,l.createElement(u.Z,{lat:null===(x=C.propertyLocation)||void 0===x?void 0:x.lat,lng:null===(w=C.propertyLocation)||void 0===w?void 0:w.long,address:`${C.propertyAddress.streetAddress} ${C.propertyAddress.suburb}`,zoom:17})))))),(null==P?void 0:P.length)>0&&l.createElement("section",{className:"property__related"},l.createElement("div",{className:"property__inner"},l.createElement("div",{className:"featured-properties__header"},l.createElement("h3",null,"Related Properties"),l.createElement(g.Z,{className:"btn btn-black",to:"/lease/"},"View All")),l.createElement("div",{className:"property-archive__items"},P.map((e=>l.createElement(v.Z,Object.assign({key:e.id,rental:!1,sold:"Available"!==e.propertyListing.marketingStatus},e)))))))),O&&l.createElement(p(),{toggler:$,sources:[O]}),(null===(Z=C.propertyFloorplan)||void 0===Z?void 0:Z.length)>0&&l.createElement(p(),{toggler:F,sources:[l.createElement("img",{className:"property__floorplan-image",src:C.propertyFloorplan[0].url,alt:"Floorplan"})]}),(null===(I=C.propertyImages)||void 0===I?void 0:I.length)>0&&l.createElement(p(),{toggler:T,sources:C.propertyImages.map(((e,t)=>l.createElement("img",{className:"property__lightbox-image",key:t,src:e.large,alt:(0,n.ZP)(C.title)})))}))},t}(l.Component);t.default=k}}]); 2//# sourceMappingURL=component---src-templates-rental-js-c5236485a4bdf7476f30.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.