PageSourceSearch

https://www.trademe.co.nz/a/static/agency.module-C7xCz7jq.js

js trademe.co.nz collected 2026-10-01 09:06:09 UTC 51,627 bytes, 7 lines download raw bytes

1
2!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="1b533745-5733-5438-817f-4d01073610f7")}catch(e){}}();
3import {E,z}from'./chunk-C0cqIPWg.js';import {a as a$1}from'./chunk-CP6YuHlx.js';import {U as Ut,V as Ve$1,h as he,o as ot,$ as $e,y,X as Xe,l as le$2,f as fe,q as qe,E as E$2,g as ge$1,u as ue,A as Ae}from'./chunk-DBQCgFmd.js';import {b as bt,m as mt,n as nt}from'./chunk-CXJofu-G.js';import {H as Ht,b as bt$1,O as Ot,y as yt,w,d as dt$1,m as mt$1}from'./chunk-yZaXpHLi.js';import {a0 as Bv,a1 as Oc,a3 as eu,a2 as ti,c as ze,I as Ie,d_ as U_,cN as Bt,cO as rn,a5 as Lo$1,z as z_,hL as Hg,hM as $_,bW as rn$1,ad as Un$1,l as lM,ae as NN,d as uM,af as AN,bM as X_,bN as Rb,bH as Ob,ks as Xi,mO as k,kc as t,c6 as pe,bh as G,pg as T,gw as Mr,ag as q,aQ as Nt,ah as be,bk as Bf,ch as NI,ak as Vf,eF as Uf,ce as o,ph as vt,aJ as G$1,a6 as Re,cE as Q_,T as TM,n as Bs,q as _d,p as cN,o as _y,s as gy,D as aC,O as Od,G as my,c3 as jy,aV as On$1,ec as Nn$1,iW as B_,b1 as Qv,b4 as CN,bc as Ky,M as Zy,k3 as ae,bU as Ln,aB as ee,ar as Hb,aC as Cb,j5 as fc,e as I,bf as F,cf as Ga,cg as Ba,Z as Zt,N as NM,jC as f,dI as c$1,gh as P,jj as d$1,bl as kr,aj as nn,i as z$1,y as y$1,jn as m,dJ as e,jR as I$1,d5 as Gt,d6 as kt,ln as Pf,iQ as Ff,pi as Xt,bo as nm,aS as CW,aG as E$3,cp as Wt,aL as Gm,en as Um,eo as qm,aW as Ei,ep as ss,R as Ri,aM as Bm,aN as Qn$1,eQ as Xn$1,E as Eo$1,aO as Oi,a as zr,j as jb,aK as Bb,L as Lb,aP as K_,r as rn$2,aY as Eh,aZ as Fh,j0 as Nh,ev as Ss,ew as xb,a_ as Bh,d2 as Fb,d3 as Ab,du as $g,e0 as Fy,C as pM,dn as fM,J as hM,bC as a$2,pj as Je,an as tE,A as i_,ap as eE,H as a_,P as Ig,dl as Ve$2,me as R,ea as d$2,dK as q$1,cB as p,hG as _,jp as e$1,aq as k$1,js as X,jr as D,pk as as,F as Fp,ao as fN,t as jp,b3 as FM,db as Ht$1,a9 as Vv,dc as b,cy as wN,dH as ON}from'./main-BUIS7oZx.js';import {l as l_,A as Au}from'./chunk-B087vxf5.js';import'./chunk-CYTVx48C.js';import'./chunk-C6ojD7cK.js';import'./chunk-g76ewEw3.js';import'./chunk-DsXcB1Ll.js';import {o as o$2}from'./chunk-Mfouf8iO.js';import {o as oe,u,m as me$1,l as le$1,d as de,n as ne$1,R as Re$1,h as he$1}from'./chunk-BVY9Yx9K.js';import'./chunk-i1qYLWxF.js';import'./chunk-8i4MWpS_.js';import'./chunk-Dxj9McUj.js';import'./chunk-BkDaTlNZ.js';import'./chunk-CNB9Jgn_.js';import {P as P$1}from'./chunk-D1zbpi4R.js';import'./chunk-Buf8b3iw.js';import {o as o$1}from'./chunk-O9IORHlX.js';import'./chunk-CS9-BIza.js';import'./chunk-DsBfLX3G.js';import'./chunk-Dwntf7pH.js';import {s as st$1,g as ge}from'./chunk-DYr3KAns.js';import'./chunk-C18PlPQd.js';import'./chunk-DBWN8QE1.js';import'./chunk-DK83pH0J.js';import'./chunk-v8D93Ocx.js';import'./search-card.component-BYY5s9_U.js';import'./chunk-DkFmrlJj.js';import'./chunk-Cf1lr20K.js';import'./chunk-SSr0DL-s.js';import'./chunk-CxM66EUF.js';import'./property-watchlist-card.component-FHn1WX-e.js';import'./chunk-tkytJA3_.js';import'./chunk-DpRLUklG.js';import'./chunk-hIlN2yWw.js';import'./chunk-C3_8CVuB.js';import'./chunk-CfO6k3c3.js';import {g,E as E$1,c}from'./chunk-JnARZitB.js';import {n as ne}from'./chunk-BZHgJOwg.js';import {s as st}from'./chunk-DnebSQXG.js';import'./chunk-CIWRT5SR.js';import {x as xi}from'./chunk-DT8LQHuH.js';import {M as Mt}from'./chunk-CNiGt3ZI.js';import {l as le,c as ct,Q as Qe}from'./chunk-aHQXdIF9.js';import'./chunk-wNPq1hog.js';import'./chunk-9CSWIYGT.js';import'./chunk-hjAdSj8t.js';import'./chunk-CVLRqv1s.js';import'./chunk-BJPQis20.js';import'./chunk-BGsFdgjH.js';import {V as Ve}from'./youtube-player-CRNJPRuC.js';import'./chunk-BSs3XFBV.js';import'./chunk-DDCEIKIc.js';import'./chunk-BUadSL6U.js';import'./chunk-B4yMwIab.js';import'./chunk-uHqv7Ayi.js';import'./chunk-B0-g9x93.js';import {v as vi,s as si,a as vn$1,d as dt,h as hi,X as Xi$1}from'./chunk-DaExeHup.js';import'./chunk-q0J7ZuwM.js';import'./chunk-DTzhZBLY.js';import'./chunk-BfLU09Fd.js';import'./chunk-k1FcUghv.js';import'./chunk-BelTXWsv.js';import'./chunk-DtysQoPG.js';import'./chunk-B3UNxIbL.js';import'./chunk-DV21NdVW.js';import {B}from'./chunk-DjHdWoc0.js';import'./chunk-BVWyTSnh.js';import'./chunk-C9hAHm-Z.js';import'./chunk-DinLItTe.js';import'./chunk-hWHWpsmg.js';import'./chunk-BJGfri_p.js';import'./chunk-ClLZSEVi.js';import'./chunk-ChrgMKgL.js';import'./chunk-DGz8Ztd-.js';import {a,d}from'./chunk-BPqqJG4a.js';import'./chunk-VxNvkdDP.js';import'./chunk-C49UCyLd.js';import'./chunk-COe3A54M.js';import'./chunk-DcQB5gsr.js';import {n}from'./chunk-yA24kvZF.js';import'./toggle-watchlist-button.component-baNRg3ad.js';import'./chunk-uXbN2U43.js';import'./chunk-BHQ9xQUT.js';import'./chunk-BhLb2ICz.js';import'./chunk-JQsNNJzS.js';import'./chunk-ihD-o_OC.js';import'./chunk-BZ9BafGD.js';import'./listing-note-proxy.component-C5ryfnSO.js';import'./chunk-D_OZFbN8.js';import'./chunk-fQA4wCFY.js';import'./chunk-CZlpgy4h.js';import'./chunk-xkKSAonf.js';import'./chunk-CQaibnAp.js';import'./chunk-UMETQaKT.js';import'./chunk-DU0DqKuY.js';import'./chunk-Dz9ZuKhO.js';import'./chunk-DIKoGax0.js';import'./chunk-BeZRphC5.js';import'./chunk-CYZDN4Lv.js';import'./chunk-DxS2mc0e.js';import'./chunk-Bf5REvV-.js';import'./chunk-C0PRzcma.js';import {l}from'./chunk-BV_-mNOs.js';import'./chunk-BGdC6nvN.js';import'./chunk-CQt_xlFv.js';import'./chunk-Bd3dz38N.js';import'./chunk-IvZAbTBV.js';import'./chunk-bdt0VCJX.js';import'./chunk-DC9dXk8X.js';import'./chunk-BC_3mrgX.js';import'./chunk-CcCQiCjA.js';import'./chunk-BrH5nTg6.js';import'./chunk-D1GLxRCn.js';import'./chunk-CELI5J2N.js';import'./chunk-QRx6OYM9.js';import'./chunk-BIJz1oAh.js';import'./chunk-Cyrl9HPf.js';import'./chunk-D-lnnDRR.js';import'./chunk-Yqyhpf9S.js';import'./chunk-BjctBGip.js';import'./chunk-DeZWLrVZ.js';import'./chunk-Cfhwhg0K.js';var un=[{name:"category",orderIndex:1e3},{name:"location",nameRegExp:/^region$|^user_region/i,orderIndex:2e3},{name:"category_specific",nameRegExp:/.*/,orderIndex:3e3}];var se;
3(function(i){i.currentOptions=Ve$2(P.currentParams,P.currentQueryParams,(n,r)=>{let e=n.urlSlug,t=r?r.category:null,o="/property";if(t){let h=Re$1.find(d=>d.categoryId.toString()===t);h&&(o+=h.path);}let m=e?parseInt(e,10):void 0;return {canonicalPath:o,queryParams:y$1(y$1({},r),m!==void 0&&!Number.isNaN(m)?{member_listing:m}:{})}}),i.currentAgencyListingSearch=Ve$2(i.currentOptions,q$1.currentSearchCache,d$2.cachedSearchResults,(n,r,e)=>R.mapToSearchResults(n,r,e)),i.currentSearchBreadcrumbs=Ve$2(i.currentAgencyListingSearch,n=>n.item?n.item.breadcrumbs||[]:null);})(se||(se={}));var Be=(()=>{let n=class n{constructor(e,t,o,m){this._store=e,this._mediaSizeFacade=t,this._parameterViewModelService=o,this._searchFacadeService=m;}getSearchResults(){return this._store.select(se.currentOptions).pipe(Nt(e=>e.queryParams?.member_listing!=null),f(e=>this._store.dispatch(new c$1(e,oe(Re$1,e))),this._store.select(se.currentAgencyListingSearch)),be(e=>this.addDefaultParametersToResults(e)),Uf(this._store.select(y.currentOptions)),be(([e,t])=>this.overrideCanonicalPathInResultsWithUrlSlug(e,t)),be(this.removeInvalidFoundCategories),o())}getCurrentSearchParams(){return NI([this.getSearchResults(),this._store.select(P.currentQueryParams)]).pipe(be(([e,t])=>this._searchFacadeService.getSearchResultQueryParams(e,t)))}getRefineViewModels(){if(!this._parameterViewModels$){let e=this.getSearchResults().pipe(d$1(),be(t=>t.item||{}));this._parameterViewModels$=NI(e,this.getCurrentSearchParams(),this.getSchema()).pipe(kr(([t,o,m])=>this.getRefineParameterViewModels(t,o,m)),o());}return this._parameterViewModels$}getSearchMetadata(){return this._store.select(u.currentSearchRouterState).pipe(nn(1)).subscribe(e=>this._store.dispatch(new P$1({canonical_path:e.canonicalPath}))),this._store.select(u.currentSearchMetadata).pipe(Nt(e=>!e.isLoading&&!!e.item),be(e=>e))}getKeywordSearchPlaceholder(){return this._store.select(se.currentSearchBreadcrumbs).pipe(Nt(e=>!!e),be(e=>{let t=e.filter(o=>o.name==="category");return t[t.length-1]}),Nt(e=>e&&e.value!=null),be(e=>{switch(p(e.value)){case _.RESIDENTIAL_FOR_SALE_ID:return "Add keywords e.g. pool, garage, income";case _.RESIDENTIAL_FOR_RENT_ID:return "Add keywords e.g. garage, parking, rural";case _.COMMERCIAL_PROPERTY_ID:case _.COMMERCIAL_FOR_SALE_ID:case _.COMMERCIAL_FOR_LEASE_ID:return "Add keywords e.g. yard, storage, workshop";case _.RURAL_ID:return "Add keywords e.g. farm, coastal, forestry";case _.NEW_HOMES_ID:return "Add keywords e.g. new house, new apartment";default:return "Add keywords"}}))}getSchema(){return this._mediaSizeFacade.getMediaSize().pipe(be(e=>e.isSm),be(e=>e?e$1:un))}addDefaultParametersToResults(e){let{item:t}=e;if(!t)return e;let{sortOrders:o,parameters:m}=t,h=this.getDefaultParameters(o);return z$1(y$1({},e),{item:z$1(y$1({},t),{parameters:[...m||[],...h]})})}getDefaultParameters(e=[]){return [...me$1,m(e)]}getRefineParameterViewModels(e,t,o){let m=e.parameters||[...this.getDefaultParameters([le$1])],h=e.breadcrumbs||[];return this._parameterViewModelService.getRefineViewModels(m,h,t,o,de,null,ne$1).pipe(be(d=>{if(d&&d.length){let v=d.find(Ge=>he$1.some(He=>Ge.name===He));v&&(v.allowSelectAllOptions=true);}return d}))}overrideCanonicalPathInResultsWithUrlSlug(e,t){let{item:o}=e;if(o&&o.foundCategories&&o.breadcrumbs&&t){let m=o.breadcrumbs.map(d=>z$1(y$1({},d),{canonicalPath:`/property/office/${t}`})),h=o.foundCategories.filter(d=>!!d.count).map(d=>{let v=d.name.replace("Trade Me ","");return z$1(y$1({},d),{canonicalPath:`/property/office/${t}`,name:v})});return z$1(y$1({},e),{item:z$1(y$1({},o),{breadcrumbs:m,foundCategories:h})})}return e}removeInvalidFoundCategories(e$1){let{endpoint:t,item:o}=e$1,m=t===e.propertyResidential||t===e.propertyCommercial;return o&&m?z$1(y$1({},e$1),{item:z$1(y$1({},o),{foundCategories:o.foundCategories.filter(h=>!I$1.includes(h.categoryId))})}):e$1}};n.\u0275fac=function(t){return new(t||n)(pe(k$1),pe(G$1),pe(X),pe(D))},n.\u0275prov=G({token:n,factory:n.\u0275fac,providedIn:"root"});let i=n;return i})();var Rn=i=>({"l-container":i});function Nn(i,n){if(i&1&&(Bs(0,"h2"),cN(1),_d()),i&2){let r=NM();aC(),Od("",r.agencyName," properties");}}var hn=(()=>{let n$1=class n{constructor(e,t,o){this._searchFacade=e,this._cardViewModeService=t,this.mediaSizeFacade=o,this.viewMode$=Ba(a$2.list);}ngOnInit(){this.results$=this._searchFacade.getSearchResults(),this.viewMode$=this._cardViewModeService.viewM
3odeChange$;}};n$1.\u0275fac=function(t){return new(t||n$1)(Lo$1(n),Lo$1(ae),Lo$1(G$1))},n$1.\u0275cmp=z_({type:n$1,selectors:[["tm-agency-listings"]],inputs:{agencyName:"agencyName"},standalone:false,decls:8,vars:12,consts:[[1,"l-container"],[4,"ngIf"],[3,"results$"],[3,"results"],[1,"tm-property-search-container"],[3,"ngClass","results$","viewMode$"]],template:function(t,o){t&1&&(Bs(0,"div",0),Qv(1,Nn,2,1,"h2",1),gy(2,"tm-refine-header",2)(3,"tm-category-suggestions",3),NN(4,"async"),_d(),Bs(5,"div",4),gy(6,"tm-property-search-results",5),NN(7,"async"),_d()),t&2&&(aC(),my("ngIf",o.agencyName),aC(),my("results$",o.results$),aC(),my("results",AN(4,6,o.results$)),aC(3),my("ngClass",CN(10,Rn,AN(7,8,o.mediaSizeFacade.is.sd$.or.greater$)))("results$",o.results$)("viewMode$",o.viewMode$));},dependencies:[Ln,On$1,Au,hi,Xi$1,Un$1],styles:["tm-agency-listings[_nghost-%COMP%]{display:block}.tm-property-search-container[_ngcontent-%COMP%]{background-color:#f6f5f4}"]});let i=n$1;return i})();var Cn=(()=>{let n$1=class n{};n$1.\u0275fac=function(t){return new(t||n$1)},n$1.\u0275mod=Bv({type:n$1}),n$1.\u0275inj=Oc({providers:[{provide:n,useClass:Be},k],imports:[ti,l_,vi,st.matchTypes([t.category]),xi.matchTypes([t.location]),ne.matchTypes([t.checkbox]),st$1.matchTypes([t.multipleOptions]),le.matchTypes([t.range]),ct.matchTypes([t.options]),ge.matchTypes([t.colour]),Qe.matchTypes([t.mutuallyExclusiveRange]),dt.matchTypes([t.sort]),Mt,si,vn$1]});let i=n$1;return i})();var me=(()=>{let n=class n{constructor(e,t,o){this._store=e,this._mediaSizeFacade=t,this._propertyAgencyService=o;}getCurrentAgencyProfile(){return this._store.select(y.currentOptions).pipe(f(e=>this._store.dispatch(new Xe(e)),this._store.select(y.currentAgencyProfile)))}getAgentsToDisplay(){return this._store.select(E$2.currentAgentSearchForAgencyProfile).pipe(be(e=>e.item&&e.item.list),Nt(e=>e&&!!e.length),Pf((e,t)=>e.concat(t),[]))}getAgentTotalCount(){return this._store.select(E$2.currentAgentSearchForAgencyProfile).pipe(Nt(e=>!!e.item),be(e=>e.item.totalCount))}getInitialAgents(){this._store.dispatch(new qe);}loadMoreAgents(){this._store.dispatch(new ge$1),this._store.dispatch(new qe);}getHeroImageUrl(){return NI(this._mediaSizeFacade.getMediaSize(),this._store.select(y.currentAgencyProfile)).pipe(Nt(e=>{let[t,o]=e;return !!o.item&&!!o.item.branding&&!!o.item.branding.heroImages}),be(e=>{let[t,o]=e;return t.isSm?o.item.branding.heroImages.small:o.item.branding.heroImages.original}))}sendEnquiry(e){return this._propertyAgencyService.enquire(e).pipe(Ff())}};n.\u0275fac=function(t){return new(t||n)(pe(k$1),pe(G$1),pe(as))},n.\u0275prov=G({token:n,factory:n.\u0275fac,providedIn:"root"});let i=n;return i})();function $n(i,n){if(i&1&&(Bs(0,"option",19),cN(1),_d()),i&2){let r=n.$implicit;my("ngValue",r.type),aC(),Od(" ",r.description," ");}}function jn(i,n){if(i&1){let r=TM();Bs(0,"tg-select-container",16)(1,"select",17),tE("ngModelChange",function(t){Fp(r);let o=NM(2);return fN(o.enquiryType,t)||(o.enquiryType=t),jp(t)}),Qv(2,$n,2,2,"option",18),_d(),i_(),_d();}if(i&2){let r=NM(2);aC(),eE("ngModel",r.enquiryType),a_(),aC(),my("ngForOf",r.enquiryOptions);}}function Vn(i,n){if(i&1){let r=TM();Bs(0,"tg-modal",2),_y("close",function(){Fp(r);let t=NM();return jp(t.close())}),Bs(1,"tg-modal-header")(2,"h2"),cN(3),_d()(),Bs(4,"form",3,0),_y("ngSubmit",function(){Fp(r);let t=FM(5),o=NM();return jp(t.valid&&o.sendEnquiry())}),Bs(6,"tg-modal-body")(7,"tg-input-container",4)(8,"input",5),tE("ngModelChange",function(t){Fp(r);let o=NM();return fN(o.enquirerName,t)||(o.enquirerName=t),jp(t)}),_d(),i_(),_d(),Bs(9,"tg-input-container",6)(10,"input",7),tE("ngModelChange",function(t){Fp(r);let o=NM();return fN(o.enquirerEmail,t)||(o.enquirerEmail=t),jp(t)}),_d(),i_(),_d(),Bs(11,"tg-input-container",8)(12,"input",9),tE("ngModelChange",function(t){Fp(r);let o=NM();return fN(o.enquirerPhone,t)||(o.enquirerPhone=t),jp(t)}),_d(),i_(),_d(),Qv(13,jn,3,2,"tg-select-container",10),Bs(14,"tg-input-container",11)(15,"textarea",12),tE("ngModelChange",function(t){Fp(r);let o=NM();return fN(o.message,t)||(o.message=t),jp(t)}),cN(16,"                "),_d(),i_(),_d()(),Bs(17,"tg-modal-footer")(18,"tg-row")(19,"tg-col",13)(20,"button",14),_y("click",function(){Fp(r);let t=NM();return jp(t.close())}),cN(21," Cancel "),_d()(),Bs(22,"tg-col",13)(23,"button",15),cN(24," Send enquiry "),_d()()()()()();}if(i&2){let r=NM();aC(3),Od(" ",r.title," "),aC(5),eE("ngModel",r.enquirerName),a_(),aC(2),eE("ngModel",r.enquirerEmail),a_(),aC(2),eE("ngModel",r.enquirerPhone),a_(),aC(),my("ngIf",r.enquiryOptions.length),aC(2),eE("ngModel",r.message),a_(),aC(8),my("tgLoading",r.loading$);}}var Mn=(()=>{let n=class n{constructor(e,t,o,m,h){this._agencyPartnerModalService=e,this._notificationService=t,this._cdr=o,this._currentMemberFacade=m,this._agencyProfileFacade=h,this.isModalVisible=false,this._destroyed$=new q,this.title=null,this.enquirerName=null,this.enquirerEmail=null,this.enquirerPhone=null,this.enquiryType=null,this.message=null,this.enquirerWantsACopy=true,this.enquiryOptions=[],this.allEnquiryOptions=[{type:null,description:"Please select an option"},{type:Je.sell,description:"I have a property to sell"},{type:Je.buy,description:"I am looking to buy"},{type:Je.invest,description:"I am an investor"},{type:Je.rentOut,description:"I have a property to rent"},{type:Je.other,description:"General enquiry"}];}ngOnInit(){this._currentMemberFacade.getCurrentMember().pipe(Vf(this._destroyed$),Nt(e=>!!e)).subscribe(e=>{this.enquirerEmail=e.email,this.enquirerPhone=e.mobilePhoneNumber,this.enquirerName=[e.firstName,e.lastName].join(" "),this._cdr.markForCheck();}),this._agencyPartnerModalService.getClickEvent().pipe(Nt(e=>!!e),Vf(this._destroyed$)).subscribe(e=>{e===dt$1&&this.showAppraisalModal(),e===mt$1&&this.showEnquiryModal();});}
3ngOnDestroy(){this._destroyed$.next(),this._destroyed$.complete();}showEnquiryModal(){this.title="Make an enquiry",this.enquiryOptions=this.allEnquiryOptions,this.showModal();}showAppraisalModal(){this.title="Request a free appraisal",this.enquiryOptions=[],this.enquiryType=Je.sell,this.message=`Hi there,
4I am interested in getting a free appraisal for my property.`,this.showModal();}sendEnquiry(){let e={officeMemberId:this.agencyMemberId,enquirerEmail:this.enquirerEmail,enquirerName:this.enquirerName,enquirerPhone:this.enquirerPhone?this.enquirerPhone.split(" ").join(""):null,enquirerWantsACopy:this.enquirerWantsACopy,message:this.message,type:this.enquiryType};this.loading$=this._agencyProfileFacade.sendEnquiry(e),this.loading$.pipe(nn(1),Vf(this._destroyed$)).subscribe({next:t=>{t.success?(this._notificationService.success(nt),this.close()):(this._notificationService.error(t.description),this.loading$=null);},error:t=>{this._notificationService.error(t.toString()),this.loading$=null;}});}close(){this.isModalVisible=false,this.loading$=null,this.resetForm(),this._cdr.markForCheck();}resetForm(){this.message=null,this.enquiryType=null,this.enquirerWantsACopy=true;}showModal(){return this._currentMemberFacade.ensureLoggedIn().then(()=>{this.isModalVisible=true,this._cdr.markForCheck();}).catch(()=>{})}};n.\u0275fac=function(t){return new(t||n)(Lo$1(w),Lo$1(nm),Lo$1(CW),Lo$1(E$3),Lo$1(me))},n.\u0275cmp=z_({type:n,selectors:[["tm-agency-profile-enquiry-modal"]],inputs:{agencyMemberId:"agencyMemberId"},standalone:false,decls:1,vars:1,consts:[["enquiryForm","ngForm"],["size","wide",3,"close",4,"ngIf"],["size","wide",3,"close"],["novalidate","","method","POST",3,"ngSubmit"],["label","Your name"],["maxlength","50","name","enquirerName","required","","tgTextInput","","type","text",3,"ngModelChange","ngModel"],["label","Email address"],["maxlength","100","name","enquirerEmail","required","","tgTextInput","","type","email",3,"ngModelChange","ngModel"],["label","Phone"],["maxlength","20","name","enquirerPhone","tgTextInput","","type","text",3,"ngModelChange","ngModel"],["label","Enquiry type",4,"ngIf"],["label","Message"],["maxlength","2000","name","message","required","","tgTextInput","",3,"ngModelChange","ngModel"],["sm","6"],["fullWidth","","tgButton2","","type","button",3,"click"],["fullWidth","","tgButton2","","tgStyle","primary","type","submit",3,"tgLoading"],["label","Enquiry type"],["name","enquiryType","required","","tgSelect","",3,"ngModelChange","ngModel"],[3,"ngValue",4,"ngFor","ngForOf"],[3,"ngValue"]],template:function(t,o){t&1&&Qv(0,Vn,25,7,"tg-modal",1),t&2&&my("ngIf",o.isModalVisible);},dependencies:[Wt,On$1,Gm,Um,qm,Ei,ss,Ri,Bm,Qn$1,Xn$1,Eo$1,Oi,zr,jb,Bb,Lb,K_,rn$2,Eh,Fh,Nh,Ss,xb,Bh,Fb,Ab,ze,$g],styles:[".tm-agent-enquiry-form__row[_ngcontent-%COMP%]{display:table;width:100%;margin-bottom:4px}.tm-agent-enquiry-form__label[_ngcontent-%COMP%]{margin-bottom:2.6666666667px}.tm-agent-enquiry-form__button_container[_ngcontent-%COMP%]{display:flex;flex-flow:row-reverse wrap;justify-content:center;margin:8px 0 0 -8px}.tm-agent-enquiry-form__button[_ngcontent-%COMP%]{min-width:80px;flex-grow:1;margin:4px auto auto 4px}.tm-agent-enquiry-form__button_submit[_ngcontent-%COMP%]{order:1}.tm-agent-enquiry-form__button_cancel[_ngcontent-%COMP%]{order:2}"]});let i=n;return i})();function zn(i,n){if(i&1&&gy(0,"img",22),i&2){let r=NM(2);my("alt",r.agencyProfile?.displayName)("src",r.logoImage,Ig);}}function Wn(i,n){if(i&1&&(Bs(0,"div",21),lM(1,zn,1,2,"img",22),_d()),i&2){let r=NM();Fy("background-color",r.agencyProfile?.branding?.brandingColour),aC(),uM(r.logoImage?1:-1);}}function Un(i,n){if(i&1&&(Bs(0,"div",4),cN(1),_d()),i&2){let r=NM();aC(),Od(" ",r.agencyProfile?.displayName," ");}}function Gn(i,n){i&1&&(Bs(0,"div",5),cN(1,"(Licensed: REAA 2008)"),_d());}function Hn(i,n){if(i&1&&(Bs(0,"div",6),cN(1),_d()),i&2){let r=NM();aC(),Od(" ",r.agencyProfile?.displayAddress," ");}}function Yn(i,n){i&1&&gy(0,"tm-agency-partner-accreditation");}function Jn(i,n){if(i&1){let r=TM();Bs(0,"button",23),_y("click",function(){Fp(r);let t=NM();return jp(t.onPhoneReview())}),Bs(1,"span"),gy(2,"tg-icon-left",24),cN(3),NN(4,"async"),_d()();}if(i&2){let r=NM();aC(3),Od(" ",AN(4,1,r.isMdOrGreater$)?"Contact details":"Call"," ");}}
4function Kn(i,n){if(i&1&&(Bs(0,"li",25),gy(1,"tg-icon",26),Bs(2,"a",27),NN(3,"tmPhoneNumberLink"),cN(4),NN(5,"tmPhoneNumber"),_d()()),i&2){let r=NM(2);aC(2),my("href",AN(3,2,r.agencyProfile?.contactDetails?.mobilePhoneNumber),Ig),aC(2),Od(" ",ON(5,4,r.agencyProfile?.contactDetails?.mobilePhoneNumber,"mobile")," ");}}function Qn(i,n){if(i&1&&(Bs(0,"li",25),gy(1,"tg-icon",28),Bs(2,"a",27),NN(3,"tmPhoneNumberLink"),cN(4),NN(5,"tmPhoneNumber"),_d()()),i&2){let r=NM(2);aC(2),my("href",AN(3,2,r.agencyProfile?.contactDetails?.officePhoneNumber),Ig),aC(2),Od(" ",AN(5,4,r.agencyProfile?.contactDetails?.officePhoneNumber)," ");}}function Xn(i,n){if(i&1&&(Bs(0,"ul"),lM(1,Kn,6,7,"li",25),lM(2,Qn,6,6,"li",25),_d()),i&2){let r=NM();aC(),uM(r.agencyProfile?.contactDetails?.mobilePhoneNumber?1:-1),aC(),uM(r.agencyProfile?.contactDetails?.officePhoneNumber?2:-1);}}function Zn(i,n){i&1&&gy(0,"tg-icon",30);}function eo(i,n){i&1&&gy(0,"tg-icon",31);}function to(i,n){i&1&&gy(0,"tg-icon",32);}function io(i,n){i&1&&gy(0,"tg-icon",33);}function no(i,n){i&1&&gy(0,"tg-icon",34);}function oo(i,n){if(i&1&&(Bs(0,"a",29),lM(1,Zn,1,0,"tg-icon",30),lM(2,eo,1,0,"tg-icon",31),lM(3,to,1,0,"tg-icon",32),lM(4,io,1,0,"tg-icon",33),lM(5,no,1,0,"tg-icon",34),_d()),i&2){let r=NM().$implicit,e=NM(2);my("href",r?.linkFullUrl,Ig),aC(),uM(r.linkType===e.webLinkAccountTypeEnum.facebook?1:-1),aC(),uM(r.linkType===e.webLinkAccountTypeEnum.twitter?2:-1),aC(),uM(r.linkType===e.webLinkAccountTypeEnum.linkedIn?3:-1),aC(),uM(r.linkType===e.webLinkAccountTypeEnum.instagram?4:-1),aC(),uM(r.linkType===e.webLinkAccountTypeEnum.other?5:-1);}}function ro(i,n){if(i&1&&(Bs(0,"li"),lM(1,oo,6,6,"a",29),_d()),i&2){let r=n.$implicit;aC(),uM(r?.linkFullUrl?1:-1);}}function ao(i,n){if(i&1&&(Bs(0,"ul",17),pM(1,ro,2,1,"li",null,fM),_d()),i&2){let r=NM();aC(),hM(r.agencyProfile?.socialLinks);}}function co(i,n){if(i&1){let r=TM();Bs(0,"div",18)(1,"div",13)(2,"button",15),_y("click",function(){Fp(r),NM();let t=FM(27);return jp(t.showAppraisalModal())}),gy(3,"tg-icon-left",16),cN(4," Request a free appraisal "),_d()()();}}var bn=(()=>{let n=class n{get logoImage(){return this.agencyProfile&&this.agencyProfile.branding?this.agencyProfile.branding.largeLogoImage||this.agencyProfile.branding.logoImage:null}constructor(e,t){this._mediaSizeFacade=e,this._route=t,this.bumped=false,this.webLinkAccountTypeEnum=Xt,this.officeProfileMembershipTypeEnum=vt;}ngOnInit(){this.isMdOrGreater$=this._mediaSizeFacade.is.md$.or.greater$,this.agencyMemberId=this._route.snapshot.params.urlSlug;}onPhoneReview(){this.phoneReviewed=true;}};n.\u0275fac=function(t){return new(t||n)(Lo$1(G$1),Lo$1(Re))},n.\u0275cmp=z_({type:n,selectors:[["tm-agency-profile-card"]],hostVars:2,hostBindings:function(t,o){t&2&&jy("agency-profile-card--bumped",o.bumped);},inputs:{agencyProfile:"agencyProfile",bumped:"bumped"},standalone:false,decls:28,vars:12,consts:[["enquiryModal",""],[1,"agency-profile-card__box"],[1,"agency-profile-card__agency-branding",3,"background-color"],[1,"agency-profile-card__agency-detail"],[1,"agency-profile-card__agency-name"],[1,"agency-profile-card__agency-licensing"],[1,"agency-profile-card__agency-address"],[1,"agency-profile-card__agency-other-detail"],[1,"agency-profile-card__listing-count-section"],[1,"agency-profile-card__listing-count-item"],[1,"agency-profile-card__listing-count-value"],[1,"agency-profile-card__listing-count-label"],[1,"agency-profile-card__contact-button-group"],[1,"agency-profile-card__contact-button-wrapper"],["fullWidth","","tgButton2","",1,"agency-profile-card__contact-button"],["fullWidth","","tgButton2","","tgStyle","primary",1,"agency-profile-card__contact-button",3,"click"],["name","mail","alt","mail"],["compact","","tgList2","","type","inline",1,"agency-profile-card__social-links-section"],[1,"agency-profile-card__contact-button-group","agency-profile-card__contact-button-group--footer"],[3,"agencyProfile"],[3,"agencyMemberId"],[1,"agency-profile-card__agency-branding"],[1,"agency-profile-card__office-logo",3,"alt","src"],["fullWidth","","tgButton2","",1,"agency-profile-card__contact-button",3,"click"],["name","phone","alt","phone"],[1,"agency-profile-card__phone-number"],["alt","Mobile Phone","name","device-mobile",1,"agency-profile-card__phone-number-icon"],[3,"href"],["alt","Work Phone","name","phone",1,"agency-profile-card__phone-number-icon"],["rel","noopener noreferrer nofollow","target","_blank",1,"agency-profile-card__social-link",3,"href"],["alt","Facebook","size","small","name","social-facebook"],["alt","X","size","small","name","social-x"],["alt","Linked In","size","small","name","social-linkedin"],["alt","Instagram","size","small","name","social-instagram"],["alt","Website","size","small","name","link"]],template:function(t,o){if(t&1){let m=TM();Bs(0,"tg-card",1),lM(1,Wn,2,3,"div",2),Bs(2,"div",3),lM(3,Un,2,1,"div",4),lM(4,Gn,2,0,"div",5),lM(5,Hn,2,1,"div",6),lM(6,Yn,1,0,"tm-agency-partner-accreditation"),_d(),Bs(7,"div",7)(8,"div",8)(9,"div",9)(10,"span",10),cN(11),_d(),Bs(12,"span",11),cN(13," Listings "),_d()()(),Bs(14,"div",12)(15,"div",13),lM(16,Jn,5,3,"button",14),lM(17,Xn,3,2,"ul"),_d(),Bs(18,"div",13)(19,"button",15),_y("click",function(){Fp(m);let d=FM(27);return jp(d.showEnquiryModal())}),Bs(20,"span"),gy(21,"tg-icon-left",16),cN(22," Enquiry "),_d()()()(),lM(23,ao,3,0,"ul",17),_d(),lM(24,co,5,0,"div",18),_d(),gy(25,"tm-agency-partner-modal",19)(26,"tm-agency-profile-enquiry-modal",20,0);}t&2&&(aC(),uM(o.agencyProfile.isGoldMembership?1:-1),aC(2),uM(o.agencyProfile?.displayName?3:-1),aC(),uM(o.agencyProfile?.isLicensed?4:-1),aC(),uM(o.agencyProfile.isGoldMembership&&o.agencyProfile?.displayAddress?5:-1),aC(),uM(o.agencyProfile?.isPartnerAccreditationEnabled&&o.agencyProfile?.membershipType!==o.officeProfileMembershipTypeEnum.basic?6:-1),aC(5),Od(" ",o.agencyProfile?.currentListingCount," "),aC(5),uM(o.phoneReviewed?-1:16),aC(),uM(o.phoneReviewed?17:-1),aC(6),uM(o.agencyProfile.isGoldMembership?23:-1),aC(),uM(o.agencyProfile.isPlatinumMembership&&o.agencyProfile.isLicensed?24:-1),aC(),my("agencyProfile",o.agencyProfile),aC(),my("agencyMemberId",o.agencyMemberId));},dependencies:[Ie,Q_,ze,Ob,Mn,Ot,yt,Un$1,E$1,c],styles:["[_nghost-%COMP%]{display:block}@media(max-width:767px){[_nghost-%COMP%]{margin-right:-16px;margin-left:-16px}}@media(min-width:480px)and (max-width:767px){[_nghost-%COMP%]{margin-right:-24px;margin-left:-24px}}.agency-profile-card--bumped[_nghost-%COMP%]{margin-top:auto}@media(min-width:768px){.agency-profile-card--bumped[_nghost-%COMP%]{margin-top:-120px}}.agency-profile-card__box.o-card[_ngcontent-%COMP%]{overflow:hidden;height:100%;
4transition:box-shadow .2s ease-out}@media(min-width:768px){.agency-profile-card__box.o-card[_ngcontent-%COMP%]{border-radius:8px}.agency-profile-card__box.o-card[_ngcontent-%COMP%]:hover{box-shadow:0 4px 8px #0000001a}}@media(max-width:767px){.agency-profile-card__box.o-card[_ngcontent-%COMP%]{border-bottom:solid 1px #e8e6e3;margin-bottom:16px;box-shadow:none}}.agency-profile-card__agency-branding[_ngcontent-%COMP%]{height:auto;padding:8px 0;background-color:#e8e6e3}@media(min-width:768px){.agency-profile-card__agency-branding[_ngcontent-%COMP%]{height:88px;padding-top:24px}}.agency-profile-card__agency-branding[_ngcontent-%COMP%] > .agency-profile-card__office-logo[_ngcontent-%COMP%]{position:relative;max-width:200px;height:40px;margin:auto}.agency-profile-card__agency-detail[_ngcontent-%COMP%]{padding:16px 24px 8px;text-align:center}@media(min-width:768px){.agency-profile-card__agency-detail[_ngcontent-%COMP%]{padding:24px}}.agency-profile-card__agency-detail[_ngcontent-%COMP%] > .agency-profile-card__agency-name[_ngcontent-%COMP%]{color:#44413d;font-size:18px;font-weight:500}.agency-profile-card__agency-detail[_ngcontent-%COMP%] > .agency-profile-card__agency-licensing[_ngcontent-%COMP%]{color:#76716d;font-size:.75rem;font-weight:400}.agency-profile-card__agency-detail[_ngcontent-%COMP%] > .agency-profile-card__agency-address[_ngcontent-%COMP%]{padding-top:8px;color:#65605d;font-size:.875rem;font-weight:400}.agency-profile-card__agency-other-detail[_ngcontent-%COMP%]{display:flex;flex-flow:column}.agency-profile-card__listing-count-section[_ngcontent-%COMP%]{display:flex;height:76px;border-top:solid 1px #e8e6e3;border-bottom:solid 1px #e8e6e3;text-align:center}.agency-profile-card__listing-count-item[_ngcontent-%COMP%]{width:100%;padding-top:24px}.agency-profile-card__listing-count-item[_ngcontent-%COMP%] > .agency-profile-card__listing-count-label[_ngcontent-%COMP%]{margin-left:4px;color:#9b9591;font-size:.875rem;font-weight:500;vertical-align:middle}.agency-profile-card__listing-count-item[_ngcontent-%COMP%] > .agency-profile-card__listing-count-value[_ngcontent-%COMP%]{color:#5a5653;font-size:1.125rem;font-weight:700;vertical-align:middle}.agency-profile-card__listing-count-item[_ngcontent-%COMP%] > .agency-profile-card__sold-disclaimer[_ngcontent-%COMP%]{color:#9b9591;font-size:.75rem;line-height:16px}.agency-profile-card-contact-link-section[_ngcontent-%COMP%]{display:flex;flex-flow:column}.agency-profile-card__contact-button-group[_ngcontent-%COMP%]{display:flex;flex-flow:row nowrap;margin:24px;text-align:center}@media(min-width:768px){.agency-profile-card__contact-button-group[_ngcontent-%COMP%]{flex-direction:column}}.agency-profile-card__contact-button-group[_ngcontent-%COMP%] > .agency-profile-card__contact-button-wrapper[_ngcontent-%COMP%]{flex:1 0 0}@media(min-width:768px){.agency-profile-card__contact-button-group[_ngcontent-%COMP%] > .agency-profile-card__contact-button-wrapper[_ngcontent-%COMP%]{flex-basis:auto}}.agency-profile-card__contact-button-group[_ngcontent-%COMP%] > .agency-profile-card__contact-button-wrapper[_ngcontent-%COMP%]:not(:last-child){margin:0 24px 0 0}@media(min-width:768px){.agency-profile-card__contact-button-group[_ngcontent-%COMP%] > .agency-profile-card__contact-button-wrapper[_ngcontent-%COMP%]:not(:last-child){margin:0 0 24px}}.agency-profile-card__contact-button-group[_ngcontent-%COMP%]   .agency-profile-card__contact-button[_ngcontent-%COMP%]{padding-right:16px;padding-left:16px;margin:0}.agency-profile-card__contact-button-group[_ngcontent-%COMP%]   .agency-profile-card__phone-number[_ngcontent-%COMP%]{margin-bottom:8px}@media(max-width:479px){.agency-profile-card__contact-button-group[_ngcontent-%COMP%]   .agency-profile-card__phone-number[_ngcontent-%COMP%] > .agency-profile-card__phone-number-icon[_ngcontent-%COMP%]{display:none}}.agency-profile-card__contact-button-group--footer[_ngcontent-%COMP%]{position:fixed;z-index:7000;bottom:0;display:block;width:100%;margin:0;background-color:#f6f5f4;box-shadow:0 -4px 4px #dadada}@media(min-width:768px){.agency-profile-card__contact-button-group--footer[_ngcontent-%COMP%]{position:static;width:auto;padding:24px;box-shadow:none}}@media(max-width:767px){.agency-profile-card__contact-button-group--footer[_ngcontent-%COMP%]   .agency-profile-card__contact-button[_ngcontent-%COMP%]{border-radius:0}}.agency-profile-card__social-links-section[_ngcontent-%COMP%]{order:-1;margin:0 0 8px;text-align:center}@media(min-width:768px){.agency-profile-card__social-links-section[_ngcontent-%COMP%]{order:1;margin-top:-16px;margin-bottom:8px}}.agency-profile-card__social-links-section[_ngcontent-%COMP%]   .agency-profile-card__social-link[_ngcontent-%COMP%]{padding:8px;
4color:#65605d}"]});let i=n;return i})();var Sn=(()=>{let n=class n{};n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=Bv({type:n}),n.\u0275inj=Oc({imports:[ti,ee,Hb,Cb,Rb,ze,fc]});let i=n;return i})();var vn=(()=>{let n=class n{};n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=Bv({type:n}),n.\u0275inj=Oc({imports:[ti,Ie,X_,Rb,ze,Ie,Ie,Ie,Ie,Ie,Ie,Ob,Ie,g,Sn,Ht,bt$1]});let i=n;return i})();var so=i=>["/property/agent",i],mo=i=>({"background-color":i});function po(i,n){if(i&1&&(Bs(0,"div",9),gy(1,"img",10),_d()),i&2){let r=NM();my("ngStyle",CN(3,mo,r.agentProfile.brandingBackgroundColor)),aC(),my("src",r.agentProfile.agencyBannerImageUrl,Ig)("alt",r.agentProfile.agencyName);}}var wn=(()=>{let n=class n{constructor(){this.showBranding=false;}ngOnInit(){this.placeholderAgentImageUrl=o$1;}};n.\u0275fac=function(t){return new(t||n)},n.\u0275cmp=z_({type:n,selectors:[["tm-agency-profile-agent-card"]],inputs:{agentProfile:"agentProfile",showBranding:"showBranding"},standalone:false,decls:17,vars:10,consts:[["tgCard","",3,"routerLink"],["class","agency-profile-agent-card__branding",3,"ngStyle",4,"ngIf"],[1,"agency-profile-agent-card__agent-information"],["tgCircleImage","",1,"agency-profile-agent-card__profile-photo",3,"src","alt"],[1,"agency-profile-agent-card__agent-name"],[1,"agency-profile-agent-card__listing-count-container"],[1,"agency-profile-agent-card__listing-count-item"],[1,"p-h3","agency-profile-agent-card__listing-count"],[1,"agency-profile-agent-card__listing-count-suffix"],[1,"agency-profile-agent-card__branding",3,"ngStyle"],[1,"agency-profile-agent-card__banner-image",3,"src","alt"]],template:function(t,o){t&1&&(Bs(0,"a",0),Qv(1,po,2,5,"div",1),Bs(2,"div",2),gy(3,"img",3),Bs(4,"h3",4),cN(5),_d()(),Bs(6,"div",5)(7,"div",6)(8,"span",7),cN(9),_d(),Bs(10,"span",8),cN(11,"Sold"),_d()(),Bs(12,"div",6)(13,"span",7),cN(14),_d(),Bs(15,"span",8),cN(16,"Listings"),_d()()()()),t&2&&(my("routerLink",CN(8,so,o.agentProfile.urlSlug)),aC(),my("ngIf",o.showBranding),aC(2),my("src",o.agentProfile.profilePhotoUrl||o.placeholderAgentImageUrl,Ig)("alt",o.agentProfile.firstName+" "+o.agentProfile.lastName),aC(2),Ky("",o.agentProfile.firstName," ",o.agentProfile.lastName),aC(4),Zy(o.agentProfile.soldListings),aC(5),Zy(o.agentProfile.liveListings));},dependencies:[On$1,Nn$1,Q_,B_,rn$1],styles:["tm-agency-profile-agent-card[_nghost-%COMP%]{display:block}.agency-profile-agent-card__branding[_ngcontent-%COMP%]{display:flex;height:56px;flex-flow:row nowrap;align-items:center;padding:8px 0 8px 24px;background-color:#e8e6e3}.agency-profile-agent-card__branding[_ngcontent-%COMP%] > .agency-profile-agent-card__banner-image[_ngcontent-%COMP%]{height:30px}.agency-profile-agent-card__agent-information[_ngcontent-%COMP%]{display:flex;flex-flow:row nowrap;padding:16px}.agency-profile-agent-card__agent-information[_ngcontent-%COMP%] > .agency-profile-agent-card__profile-photo[_ngcontent-%COMP%]{width:64px;min-width:64px;height:64px;margin-right:16px}.agency-profile-agent-card__agent-information[_ngcontent-%COMP%] > .agency-profile-agent-card__agent-name[_ngcontent-%COMP%]{display:flex;align-items:center;margin-bottom:0}.agency-profile-agent-card__listing-count-container[_ngcontent-%COMP%]{display:flex;width:100%;flex-flow:row nowrap;padding:8px;white-space:nowrap}.agency-profile-agent-card__listing-count-item[_ngcontent-%COMP%]{display:flex;flex:1;flex-flow:row nowrap;align-items:center;justify-content:center;line-height:16px;text-align:center}.agency-profile-agent-card__listing-count-item[_ngcontent-%COMP%]:not(:last-child){height:36px;border-right:1px solid #d7d5d2}.agency-profile-agent-card__listing-count-item[_ngcontent-%COMP%] > .agency-profile-agent-card__listing-count[_ngcontent-%COMP%]{margin-right:8px;margin-bottom:0;font-weight:700}.agency-profile-agent-card__listing-count-item[_ngcontent-%COMP%] > .agency-profile-agent-card__listing-count-suffix[_ngcontent-%COMP%]{color:#9b9591;font-size:.875rem;font-weight:500}"]});let i=n;return i})();var fo=5,_o="latest listings on Trade Me",Tn=(()=>{let n=class n{constructor(){this.type="ProfilePage";}map(e){let t=e.agencyProfile;if(!t.hasOfficeProfile||!t.displayName)return {id:null,jsonLd:null};let o="agencyProfile",m=this.mapAgencyListings(e.listings??[]),h=this.mapMakesOffer(m,t.displayName),d={"@type":"RealEstateAgent",name:`${t.displayName}`,url:`https://www.trademe.co.nz/a/property/office/${t.memberId}`};return t.branding?.logoImage&&(d.image=t.branding.logoImage),t.contactDetails?.officePhoneNumber&&(d.telephone=t.contactDetails.officePhoneNumber),t.displayAddress&&(d.address={"@type":"PostalAddress",streetAddress:t.displayAddress,addressCountry:"NZ"}),h&&(d.makesOffer=h),{id:o,jsonLd:{"@context":"https://schema.org","@type":"ProfilePage",mainEntity:d}}}mapAgencyListings(e){return e.filter(t=>t.title&&t.canonicalPath).slice(0,fo).map(t=>{let o=t.canonicalPath.startsWith("/")?t.canonicalPath.substring(1):t.canonicalPath;return {"@type":"RealEstateListing",name:t.title,url:`https://www.trademe.co.nz/a/${o}`}})}mapMakesOffer(e,t){if(e.length!==0)return {"@type":"Offer",name:`${t}'s ${_o}`,category:{"@type":"ListItem",item:e}}}};n.\u0275fac=function(t){return new(t||n)},n.\u0275prov=G({token:n,factory:n.\u0275fac,providedIn:"root"});let i=n;return i})();function yo(i,n){if(i&1&&gy(0,"tm-meta-json-ld-inline",0),i&2){let r=NM();my("json",r.agencyProfileSchema());}}var Ue=(()=>
4{let n$1=class n$1{constructor(){this.agencyProfileFacade=I(me),this.searchFacade=I(n),this.agencyProfileJsonLdMapperService=I(Tn),this.agencyProfileData=F(NI([this.agencyProfileFacade.getCurrentAgencyProfile(),this.searchFacade.getSearchResults()]).pipe(be(([e,t])=>{if(!this.isValidProfileData(e))return null;let o=this.extractLatestListings(t);return {agencyProfile:e.item,listings:o}}),Ga(()=>Ba(null)))),this.agencyProfileSchema=Zt(()=>{let e=this.agencyProfileData();return e?this.agencyProfileJsonLdMapperService.map(e)?.jsonLd:null});}isValidProfileData(e){return !!e?.item&&!!e.item.hasOfficeProfile}extractLatestListings(e){return e?.item?.list?[...e.item.list.filter(m=>m.title&&m.canonicalPath).map(m=>({title:m.title,canonicalPath:m.canonicalPath,startDate:m.startDate}))].sort((m,h)=>{if(!m.startDate||!h.startDate)return 0;let d=new Date(m.startDate).getTime();return new Date(h.startDate).getTime()-d}).map(m=>({title:m.title,canonicalPath:m.canonicalPath})):[]}};n$1.\u0275fac=function(t){return new(t||n$1)},n$1.\u0275cmp=z_({type:n$1,selectors:[["tm-agency-profile-json-ld"]],decls:1,vars:1,consts:[[3,"json"]],template:function(t,o){t&1&&lM(0,yo,1,1,"tm-meta-json-ld-inline",0),t&2&&uM(o.agencyProfileSchema()?0:-1);},dependencies:[a,d],encapsulation:2});let i=n$1;return i})();var Co=()=>["/"],Po=()=>["/property"];function Mo(i,n){if(i&1&&(Bs(0,"li",1)(1,"a",2),cN(2," Property "),_d()(),Bs(3,"li",1),cN(4),_d()),i&2){let r=NM();aC(),my("routerLink",wN(2,Po)),aC(3),Od(" ",r.displayName," ");}}function xo(i,n){i&1&&gy(0,"tm-meta-json-ld-inline",3),i&2&&my("json",n);}function bo(i,n){i&1&&gy(0,"div",7),i&2&&Fy("background-image","url("+n+")");}function So(i,n){if(i&1&&gy(0,"tm-collapsible-span",16),i&2){let r=NM(3),e=NM();my("text",r.description)("characterLimit",e.descriptionCharacterLimit);}}function vo(i,n){if(i&1&&gy(0,"tm-property-multi-media",18),i&2){let r=NM(4),e=NM();my("mediaKey",r.embeddedContent[0]==null?null:r.embeddedContent[0].key)("mediaType",e.propertyMediaTypes.youtube);}}function wo(i,n){if(i&1&&gy(0,"tm-property-multi-media",19),i&2){let r=NM(4),e=NM();my("mediaKey",r.embeddedContent[0]==null?null:r.embeddedContent[0].key)("mediaType",e.propertyMediaTypes.vimeo);}}function To(i,n){if(i&1&&(Bs(0,"div",17),lM(1,vo,1,2,"tm-property-multi-media",18)(2,wo,1,2,"tm-property-multi-media",19),_d()),i&2){let r,e=NM(3),t=NM();aC(),uM((r=t.getEmbeddedContentProvider(e.embeddedContent))===t.propertyMediaTypes.youtube?1:r===t.propertyMediaTypes.vimeo?2:-1);}}function Ao(i,n){if(i&1&&(Bs(0,"div",14),lM(1,So,1,2,"tm-collapsible-span",16),lM(2,To,3,1,"div",17),_d()),i&2){let r=NM(2),e=NM();aC(),uM(r.description?1:-1),aC(),uM(e.containsVideo(r.embeddedContent)?2:-1);}}function Eo(i,n){if(i&1&&gy(0,"tm-agency-profile-agent-card",23),i&2){let r=n.$implicit,e=NM(3);my("agentProfile",r)("showBranding",e.isGoldMembership);}}function Oo(i,n){if(i&1){let r=TM();Bs(0,"button",25),_y("click",function(){Fp(r);let t=NM(4);return jp(t.showMoreAgents())}),cN(1," Show more agents "),gy(2,"tg-icon-right",26),_d();}}function Io(i,n){if(i&1&&(Bs(0,"div",15)(1,"h2",20),cN(2),NN(3,"async"),_d(),Bs(4,"p",21),cN(5),NN(6,"async"),_d(),Bs(7,"div",22),pM(8,Eo,1,2,"tm-agency-profile-agent-card",23,fM),_d(),lM(10,Oo,3,0,"button",24),NN(11,"async"),_d()),i&2){let r=NM(2),e=NM();aC(2),Od(" Meet our agents (",AN(3,4,e.agentProfileTotalCount$),") "),aC(3),Ky(" ",r.displayName," has ",AN(6,6,e.agentProfileTotalCount$)," real estate agents. Results based on information provided by agents for properties sold in last 12 months. "),aC(3),hM(n),aC(2),uM(AN(11,8,e.showMoreAgentsButtonVisible$)?10:-1);}}function Fo(i,n){if(i&1&&(Bs(0,"div",5)(1,"div",8)(2,"div",9),gy(3,"tm-agency-profile-card",10),NN(4,"async"),_d(),Bs(5,"div",11)(6,"div",12)(7,"h1",13),cN(8),_d(),lM(9,Ao,3,2,"div",14),_d(),lM(10,Io,12,10,"div",15),NN(11,"async"),_d()()()),i&2){let r,e=NM(),t=NM();aC(3),my("agencyProfile",e)("bumped",e.isGoldMembership&&!!AN(4,5,t.heroImageUrl$)),aC(5),Od("About ",e.displayName),aC(),uM(e.description||t.containsVideo(e.embeddedContent)?9:-1),aC(),uM((r=AN(11,7,t.agentProfilesToDisplay$))?10:-1,r);}}function ko(i,n){if(i&1&&(Bs(0,"tm-property-breadcrumbs")(1,"ol",0)(2,"li",1)(3,"a",2),cN(4," Home "),_d()(),lM(5,Mo,5,3),_d()(),lM(6,xo,1,1,"tm-meta-json-ld-inline",3),NN(7,"async"),gy(8,"tm-agency-profile-json-ld"),lM(9,bo,1,2,"div",4),NN(10,"async"),lM(11,Fo,12,9,"div",5),gy(12,"tm-agency-listings",6)),i&2){let r,e,t=n,o=NM();aC(3),my("routerLink",wN(10,Co)),aC(2),uM(t?5:-1),aC(),uM((r=AN(7,6,o.breadcrumbsSchema$))?6:-1,r),aC(3),uM((e=t&&t.isGoldMembership&&AN(10,8,o.heroImageUrl$))?9:-1,e),aC(2),uM(t&&t.isGoldMembership?11:-1),aC(),my("agencyName",t.displayName);}}var An=(()=>{let n=class n{constructor(e,t,o){this._metaDataFacade=e,this._agencyProfileFacade=t,this._breadcrumbListJsonLdMapperService=o,this.propertyMediaTypes=a$1,this.embeddedContentProvider=T,this.breadcrumbs$=new Mr([]),this.descriptionCharacterLimit=300,this.destroy$=new q;}ngOnInit(){this.agencyProfile$=this._agencyProfileFacade.getCurrentAgencyProfile().pipe(Nt(e=>!!e&&!!e.item&&!e.isLoading),be(e=>e.item),Bf(e=>{e&&(this._agencyProfileFacade.getInitialAgents(),this.updateBreadcrumbs(e.displayName,e.memberId));})),this.agentProfilesToDisplay$=this._agencyProfileFacade.getAgentsToDisplay(),this.agentProfileTotalCount$=this._agencyProfileFacade.getAgentTotalCount(),this.heroImageUrl$=this._agencyProfileFacade.getHeroImageUrl(),NI([this.agencyProfile$,this.agentProfileTotalCount$]).pipe(Nt(([e,t])=>!!e&&t!==void 0),Vf(this.destroy$)).subscribe(([e,t])=>{this.updateMetadata(e,t);}),this.showMoreAgentsButtonVisible$=this.agentProfilesToDisplay$.pipe(Uf(this.agentProfileTotalCount$),be(e=>{let[t,o]=e;return t.length<o})),this.breadcrumbsSchema$=this.breadcrumbs$.pipe(Nt(e=>!!e),be(e=>this._breadcrumbListJsonLdMapperService.map(e)?.jsonLd),o());}showMoreAgents(){this._agencyProfileFacade.loadMoreAgents();}ngOnDestroy(){this.destroy$.next(),this.destroy$.complete();}updateBreadcrumbs(e,t){let o=new Array({displayName:"Property",canonicalPath:"/property"});e&&o.push({displayName:e,canonicalPath:"/property/office/"+t}),this.breadcrumbs$.next(o);}updateMetadata(e,t){let o=this.generateMetaDescription(e,t);this.pageMetadata={title:`About ${e.displayName}`,description:o,blockRobotIndexAndFollow:false},this._metaDataFacade.updateMetaData(this.pageMetadata);}generateMetaDescription(e,t){if(e.isPartnerAccreditationEnabled&&e.membershipType!==vt.basic){let m=this.extractLocationFromAddress(e.displayAddress),h=t===1?"1 agent":`${t} agents`,d=e.currentListingCount===1?"1 property":`${e.currentListingCount} properties`;return `${e.displayName} is our Property Partner. This real estate agency from ${m} has ${h}, and currently lists ${d} on Trade Me.`}return `View ${e.displayName} properties on Trade Me.`}extractLocationFromAddress(e){return e?e.split(",").map(o=>o.trim())[0]||e:"New Zealand"}getEmbeddedContentProvider(e){return e&&e.length&&e.find(t=>t.provider===T.youtube)?a$1.youtube:a$1.vimeo}containsVideo(e){return !!(e&&e.length&&e.find(t=>t.provider===T.youtube||T.vimeo))}};n.\u0275fac=function(t){return new(t||n)(Lo$1(l),Lo$1(me),Lo$1(B))},n.\u0275cmp=z_({type:n,selectors:[["tm-agency-profile"]],hostAttrs:["ngSkipHydration","true"],standalone:false,decls:2,vars:3,consts:[["tgBreadcrumbs","",1,"tm-agency-profile__breadcrumbs"],["tgBreadcrumbsItem",""],[3,"routerLink"],[3,"json"],[1,"agency-profile-hero-image",3,"background-image"],[1,"l-container","agency-profile__information-container"],[3,"agencyName"],[1,"agency-profile-hero-image"],[1,"agency-profile__layout"],[1,"agency-profile__sidebar"],[3,"agencyProfile","bumped"],[1,"agency-profile__main"],[1,"agency-profile__information"],[1,"agency-profile__title"],[1,"agency-profile__information-body"],[1,"agency-profile__agents"],[3,"text","characterLimit"],[1,"tm-agency-profile__video-container"],["frameName","youtubeVideo",1,"tm-agency-profile__video",3,"mediaKey","mediaType"],["frameName","vimeoVideo",1,"tm-agency-profile__video",3,"mediaKey","mediaType"],[1,"agency-profile__agents-title"],[1,"agency-profile__agents-description"],[1,"agency-profile__agents-grid"],[1,"agency-profile__agent-card",3,"agentProfile","showBranding"],["tgButton2","","linkStyle","","type","button",1,"agency-profile__show-more"],["tgButton2","","linkStyle","","type","button",1,"agency-profile__show-more",3,"click"],["name","basic-plus","alt","basic-plus"]],template:function(t,o){if(t&1&&(lM(0,ko,13,11),NN(1,"async")),t&2){let m;uM((m=AN(1,1,o.agencyProfile$))?0:-1,m);}},dependencies:[bn,wn,ze,Ie,Hg,$_,$e,hn,z,mt,rn$1,d,Ue,Un$1],styles:["tm-agency-profile[_nghost-%COMP%]{display:block}.agency-profile-hero-image[_ngcontent-%COMP%]{position:relative;display:block;width:100%;height:165px;min-height:160px;max-height:336px;background-position:center;background-size:cover}@media(min-width:768px){.agency-profile-hero-image[_ngcontent-%COMP%]{height:30vh;margin-bottom:32px}}.agency-profile__information-container[_ngcontent-%COMP%]{border-bottom:1px solid #e8e6e3;margin-bottom:32px}.agency-profile__layout[_ngcontent-%COMP%]{display:flex;flex-wrap:wrap;column-gap:16px}@media(min-width:480px){.agency-profile__layout[_ngcontent-%COMP%]{column-gap:24px}}.agency-profile__sidebar[_ngcontent-%COMP%], .agency-profile__main[_ngcontent-%COMP%]{width:100%}@media(min-width:768px){.agency-profile__sidebar[_ngcontent-%COMP%]{flex:1}}@media(min-width:768px){.agency-profile__main[_ngcontent-%COMP%]{flex:2}}@media(min-width:1440px){.agency-profile__main[_ngcontent-%COMP%]{flex:3}}.agency-profile__agents-grid[_ngcontent-%COMP%]{display:grid;grid-template-columns:1fr;column-gap:16px}@media(min-width:480px){.agency-profile__agents-grid[_ngcontent-%COMP%]{column-gap:24px}}@media(min-width:768px){.agency-profile__agents-grid[_ngcontent-%COMP%]{grid-template-columns:1fr 1fr}}@media(min-width:1024px){.agency-profile__agents-grid[_ngcontent-%COMP%]{grid-template-columns:1fr 1fr 1fr}}.agency-profile__information[_ngcontent-%COMP%] > .agency-profile__title[_ngcontent-%COMP%]{margin-bottom:16px}@media(min-width:1024px){.agency-profile__information[_ngcontent-%COMP%] > .agency-profile__title[_ngcontent-%COMP%]{margin-bottom:24px}}.agency-profile__information[_ngcontent-%COMP%] > .agency-profile__information-body[_ngcontent-%COMP%]{border-bottom:1px solid #e8e6e3;margin-bottom:24px;white-space:pre-wrap}@media(min-width:768px){.agency-profile__information[_ngcontent-%COMP%] > .agency-profile__information-body[_ngcontent-%COMP%]{margin-bottom:32px}}.agency-profile__information[_ngcontent-%COMP%] > .agency-profile__information-body[_ngcontent-%COMP%] > .agency-profile__description[_ngcontent-%COMP%]{margin-bottom:24px;font-weight:400;line-height:24px}@media(min-width:1024px){.agency-profile__information[_ngcontent-%COMP%] > .agency-profile__information-body[_ngcontent-%COMP%] > .agency-profile__description[_ngcontent-%COMP%]{margin-bottom:32px}}.agency-profile__agents[_ngcontent-%COMP%]{margin-bottom:8px}@media(max-width:767px){.agency-profile__agents[_ngcontent-%COMP%] > .agency-profile__agents-title[_ngcontent-%COMP%], .agency-profile__agents[_ngcontent-%COMP%] > .agency-profile__agents-description[_ngcontent-%COMP%]{margin-bottom:16px}}.agency-profile__agents[_ngcontent-%COMP%] > .agency-profile__show-more[_ngcontent-%COMP%]{margin-bottom:24px}.tm-agency-profile__video[_ngcontent-%COMP%]{position:absolute;top:0;left:0;width:100%;height:100%}.tm-agency-profile__video-container[_ngcontent-%COMP%]{position:relative;height:0;padding-bottom:56.25%;margin-top:16px;margin-bottom:24px}@media(min-width:768px){.tm-agency-profile__video-container[_ngcontent-%COMP%]{margin-bottom:32px}}.tm-agency-profile__breadcrumbs[_ngcontent-%COMP%]{margin-bottom:0}"]});let i=n;return i})();var En=(()=>{let n=class n{};n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=Bv({type:n}),n.\u0275inj=Oc({imports:[ti,X_,Xi,eu]});let i=n;return i})();var On=(()=>{let n$1=class n{};n$1.\u0275fac=function(t){return new(t||n$1)},n$1.\u0275mod=Bv({type:n$1}),n$1.\u0275inj=Oc({providers:[{provide:n,useExisting:Be}],imports:[ti,vn,Ve,En,Ut,ze,Ie,U_,Ve$1,Cn,E,bt,eu,a,Ue]});let i=n$1;return i})();var Lo=60*2e3,In=(()=>{let n=class n{constructor(e,t,o,m,h){this._actions$=e,this._store=t,this._timeService=o,this._cacheService=m,this._propertyAgencyService=h,this.getAgencyProfileEffect$=Gt(()=>this._actions$.pipe(kt(Xe.TYPE),kr(d=>this._store.select(y.currentAgencyProfile).pipe(nn(1),Nt(v=>this._cacheService.shouldFetch(v,{expiryTime:Lo})),be(()=>new le$2(d.agencyIdentifier)))))),this.getAgencyProfileFromApiEffect$=Gt(()=>this._actions$.pipe(kt(le$2.TYPE),kr(d=>this._propertyAgencyService.getOfficeProfile(d.agencyIdentifier).pipe(be(v=>{let Ge=v.membershipType!==vt.basic,He=!!(v.partnershipAgreements??[]).find(Ln=>Ln.premiumPackageCode===o$2.platinum);return z$1(y$1({},v),{isGoldMembership:Ge,isPlatinumMembership:He})}),be(v=>
4new ue(d.agencyIdentifier,v,this._timeService.now)),Ga(v=>Ba(new fe(d.agencyIdentifier,v))))))),this.getAgentsEffect$=Gt(()=>this._actions$.pipe(kt(qe.TYPE),kr(()=>this._store.select(E$2.currentOptionsForAgencyProfile).pipe(nn(1),be(d=>new Ae(d))))));}};n.\u0275fac=function(t){return new(t||n)(pe(Ht$1),pe(k$1),pe(Vv),pe(b),pe(as))},n.\u0275prov=G({token:n,factory:n.\u0275fac});let i=n;return i})();var Fn=(()=>{let n=class n{};n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=Bv({type:n}),n.\u0275inj=Oc({imports:[Bt.forFeature([In]),rn.forFeature(he,ot)]});let i=n;return i})();var Ro=[{path:":urlSlug",data:{feature:{agencyProfileSearch:true,suffixlessSearch:true}},children:[{path:"",component:An},{path:"refine",loadChildren:()=>import('./refine.module-CRKPptXe.js').then(i=>i.RefineModule)}]},{path:"",redirectTo:"/property/agents",pathMatch:"full"}],kn=(()=>{let n=class n{};n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=Bv({type:n}),n.\u0275inj=Oc({imports:[eu.forChild(Ro),eu]});let i=n;return i})();var Vc=(()=>{let n=class n{};n.\u0275fac=function(t){return new(t||n)},n.\u0275mod=Bv({type:n}),n.\u0275inj=Oc({imports:[kn,On,Fn]});let i=n;return i})();
5export{Vc as AgencyModule};//# sourceMappingURL=agency.module-C7xCz7jq.js.map
6
7//# debugId=1b533745-5733-5438-817f-4d01073610f7

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.