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]="03386f0c-41ae-52ad-8940-dc6d3c1cdd70")}catch(e){}}(); 3import {S}from'./chunk-DqAeyG2j.js';import {V,r as re,O,$,a as g$1,u}from'./motors.module-zP7amvE2.js';import {W}from'./chunk-B6cFA4pf.js';import {s}from'./chunk-CO7Ngy1f.js';import {y}from'./chunk-DHSmCeoX.js';import {O as O$1}from'./chunk-BhRfpHQp.js';import {g,c}from'./chunk-BinUDUXm.js';import {R,u as ut}from'./chunk-D56l0ire.js';import {h}from'./chunk-DJpSq96g.js';import {L,D}from'./chunk-D8yHsLT5.js';import {J}from'./chunk-B6NfVuVK.js';import {a,d}from'./chunk-4e65qauR.js';import {a0 as Za,a1 as _o,bE as Ar,bJ as pb,bS as Rb,aC as Cb,az as br,w as we,a2 as VO,c as He,eZ as Zo,jc as Eb,bR as X_,bM as Ob,as as mc,lb as Gb,a3 as eu,cG as Bt,cH as rn,cb as G,bj as L$1,a5 as R$1,a6 as Re,a8 as ce,j as jM,b$ as rn$1,S as zc,W as zo,Y as Hc,d1 as Fb,d2 as Ab,aL as Gm,ej as Um,ek as qm,aV as Vi,el as ss,A as Ai$1,aM as Bm,E as Eo,aO as Ri$1,aP as K_,n as nn,aX as Eh,aY as Fh,em as Ss,en as xb,aZ as Bh,cg as YI,aU as mO,b_ as IO,T as Tr,fH as I0,lc as zb,ld as Af,ad as bO,I as Ia,q as _D,b1 as iD,p as bf,Q as Qx,ae as yA,b3 as Tx,C as X_$1,D as TD,af as DA,aI as h$1,bC as R$2,b0 as Mf,b2 as Ja,N as Af$1,ag as W$1,ah as Fe,ak as Xp,aQ as Xt,uu as su,c9 as Jp,z,y as y$1,bh as Tf,bl as SD,bi as _f,d7 as ub,i9 as xf,cx as Q_,eA as Zr,cd as wA,c8 as zD,O as rE,s as yx,cf as ND,h as dx,an as cE,o as kD,K as KS,ap as aE,F as XS,bw as Be,c_ as o,bp as th,i3 as e,e0 as Xa,cq as fA,b4 as pA,ba as rA,R as Ry,r as Xh,ao as eA,t as eg}from'./main-CAjEjBVh.js';import {l}from'./chunk-XApU2rQR.js';import'./chunk-EAxg33-T.js';import'./chunk-CmrFuVZd.js';import'./chunk-BUgE3PqS.js';import'./chunk-BsB3pJ-D.js';import'./chunk-BpIbrwhg.js';import'./chunk-jolbqQx5.js';import'./chunk-YA-QRxSh.js';import'./chunk-D3GcKAzz.js';import'./chunk-BczQQ3HJ.js';import'./chunk-i014EtwU.js';import'./chunk-D0m7Qljd.js';import'./chunk-B2Gk006u.js';import'./chunk-DhT1TtSm.js';import'./not-found.component-BSjQEB_S.js';import'./chunk-NwJ5fwVJ.js';import'./chunk-Bhd3g0be.js';import'./chunk-TV9Wo-_X.js';import'./chunk-d9NReqDu.js';import'./chunk-VwqPgL9v.js';import'./chunk-VyNqhh2Q.js';import'./chunk-Y8ySxWR_.js';function Jt(t,i){if(t&1&&_D(0,"tg-aspect-ratio",8),t&2){let o=yx();Xa("background-color","#"+(o.dealership.showroom?.backgroundColour||"FFFFFF")),TD("imageUrl",o.dealership.showroom.banner);}}function Gt(t,i){if(t&1&&_D(0,"tg-aspect-ratio",9),t&2){let o=yx();TD("imageUrl",o.defaultBanner);}}function Zt(t,i){if(t&1&&(Ia(0,"span",12)(1,"a",13),yA(2,"tmPhoneNumberLink"),Qx(3),bf()()),t&2){let o=i.$implicit;X_$1(),TD("href",rA(DA(2,3,o)),Ry),X_$1(2),Af$1(" ",o," ");}}function Kt(t,i){if(t&1&&(Ia(0,"li"),_D(1,"tg-icon",10),iD(2,Zt,4,5,"span",11),bf()),t&2){let o=yx();X_$1(2),TD("ngForOf",o.phoneNumbers);}}function Yt(t,i){if(t&1&&(Ia(0,"div",14)(1,"tg-flag",15),Qx(2),bf(),Ia(3,"small"),Qx(4,"in stock"),bf()()),t&2){let o=yx();X_$1(2),Af$1(" ",o.dealership.listingCounts.total," ");}}var ne=(()=>{let i=class i{constructor(r){this._dealershipService=r,this.defaultBanner=O$1.NO_PHOTO_PLACEHOLDER;}ngOnChanges(r){r.dealership&&this.dealership&&(this.fullAddress=[this.dealership.address,this.dealership.suburb,this.dealership.city].filter(e=>!!e).join(", "),this.phoneNumbers=(this.dealership.phoneNumber||"").split("or").map(e=>e.trim()).filter(e=>!!e));}getMoreListingsLink(r){return this._dealershipService.getMoreListingsLink(r)}};i.\u0275fac=function(e){return new(e||i)(R$1(s))},i.\u0275cmp=jM({type:i,selectors:[["tm-motors-dealership-card"]],inputs:{dealership:"dealership"},standalone:false,features:[Zr],decls:16,vars:9,consts:[["noBanner",""],[3,"routerLink"],["class","mt-dealership-card--with-logo","alt","Dealer banner","ratio","16x9",3,"imageUrl","background-color",4,"ngIf","ngIfElse"],[1,"mt-dealership-card__body"],[1,"mt-dealership-card__body-name"],["tgList2","",1,"mt-dealership-card-contact"],[4,"ngIf"],["class","h-text-align-right",4,"ngIf"],["alt","Dealer banner","ratio","16x9",1,"mt-dealership-card--with-logo",3,"imageUrl"],["alt","Dealer banner","ratio","16x9",1,"mt-dealership-card--without-logo",3,"imageUrl"],["alt","phone","name","phone","size","small"],["class","mt-dealership-card__contact-phone",4,"ngFor","ngForOf"],[1,"mt-dealership-card__contact-phone"],[3,"href"],[1,"h-text-align-right"],["compact","",1,"mt-dealership-card__listing-total"]],template:function(e,n){if(e&1&&(I
3a(0,"tg-card")(1,"a",1)(2,"div"),iD(3,Jt,1,3,"tg-aspect-ratio",2)(4,Gt,1,1,"ng-template",null,0,wA),bf(),Ia(6,"div",3)(7,"div")(8,"h6",4),Qx(9),bf(),Ia(10,"div")(11,"ul",5)(12,"li"),Qx(13),bf(),iD(14,Kt,3,1,"li",6),bf()()(),iD(15,Yt,5,1,"div",7),bf()()()),e&2){let c=Tx(5);X_$1(),TD("routerLink",n.getMoreListingsLink(n.dealership)),X_$1(2),TD("ngIf",n.dealership.showroom?.banner)("ngIfElse",c),X_$1(3),zD("mt-dealership-card__body--ghost",!n.dealership?.name),X_$1(3),Af$1(" ",n.dealership?.name," "),X_$1(4),rE(n.fullAddress),X_$1(),TD("ngIf",n.phoneNumbers?.length),X_$1(),TD("ngIf",n.dealership.listingCounts?.total);}},dependencies:[rn$1,ub,nn,we,YI,mO,xf,Q_,Ob,c],styles:[`.mt-dealership-card--with-logo.o-aspect-ratio{background-size:contain}.mt-dealership-card--without-logo{opacity:.5}.mt-dealership-card-contact{font-size:12px;line-height:1.5em}.mt-dealership-card__body{display:flex;flex-direction:column;justify-content:space-between;padding:12px}.mt-dealership-card__listing-total.o-flag{border:1px solid #00bc82;background-color:transparent;color:#00bc82}.mt-dealership-card__contact-phone:not(:last-of-type):after{content:"/"}.mt-dealership-card__body--ghost .mt-dealership-card__body-name{background-color:#e6e9ef;white-space:pre-line} 4`],encapsulation:2});let t=i;return t})();var $t=(()=>{let i=class i{constructor(r){this.dealershipFacade=r;}getLinks(){return this.dealershipFacade.getDealershipSeoLinks({rows:u.DEALERSHIPS_PAGE_ROWS})}};i.\u0275fac=function(e){return new(e||i)(G(g$1))},i.\u0275prov=L$1({token:i,factory:i.\u0275fac});let t=i;return t})();var ae=(()=>{let i=class i{};i.\u0275fac=function(e){return new(e||i)},i.\u0275cmp=jM({type:i,selectors:[["tm-motors-dealership-ghost-card"]],decls:7,vars:0,consts:[["tgCard","",1,"tm-motors-dealership-ghost-card__card--ghost"],[1,"tm-motors-dealership-ghost-card__image--ghost"],[1,"tm-motors-dealership-ghost-card_content--ghost"],[1,"tm-motors-dealership-ghost-card_title--ghost"],[1,"tm-motors-dealership-ghost-card_description--ghost"]],template:function(e,n){e&1&&(Tf(0,"div",0),SD(1,"div",1),Tf(2,"div",2),SD(3,"div",3)(4,"div",4)(5,"div",4)(6,"div",4),_f()());},styles:["tm-motors-dealership-ghost-card[_nghost-%COMP%]{display:block;width:100%;min-height:400px}tm-motors-dealership-ghost-card[_nghost-%COMP%] .tm-motors-dealership-ghost-card__card--ghost[_ngcontent-%COMP%]{overflow:hidden;height:95%;background-color:#fff}tm-motors-dealership-ghost-card[_nghost-%COMP%] .tm-motors-dealership-ghost-card__image--ghost[_ngcontent-%COMP%]{height:175px;background-color:#e8e6e3}tm-motors-dealership-ghost-card[_nghost-%COMP%] .tm-motors-dealership-ghost-card_content--ghost[_ngcontent-%COMP%]{min-height:160px}tm-motors-dealership-ghost-card[_nghost-%COMP%] .tm-motors-dealership-ghost-card_title--ghost[_ngcontent-%COMP%]{width:60%;height:16px;margin-top:20px;margin-bottom:37px;margin-left:16px;background-color:#e8e6e3}tm-motors-dealership-ghost-card[_nghost-%COMP%] .tm-motors-dealership-ghost-card_description--ghost[_ngcontent-%COMP%]{width:70%;height:16px;margin-bottom:8px;margin-left:16px;background-color:#e8e6e3}tm-motors-dealership-ghost-card[_nghost-%COMP%] .tm-motors-dealership-ghost-card_description--%NS%ghost[_ngcontent-%COMP%]:nth-child(2){width:90%}tm-motors-dealership-ghost-card[_nghost-%COMP%] .tm-motors-dealership-ghost-card_description--%NS%ghost[_ngcontent-%COMP%]:nth-child(3){width:80%}"]});let t=i;return t})();var ii=()=>[],ri=t=>({page:t});function ni(t,i){if(t&1&&_D(0,"tm-meta-json-ld-inline",16),t&2){let o=i.ngIf;TD("json",o);}}function ai(t,i){t&1&&ND(0);}function oi(t,i){if(t&1&&(Ia(0,"div",17)(1,"div",18),Qx(2),bf(),Ia(3,"div"),Qx(4,"Dealers found"),bf()()),t&2){let o=i.ngIf;X_$1(2),Af$1(" ",o," ");}}function si(t,i){if(t&1&&_D(0,"tm-meta-json-ld-inline",16),t&2){let o=i.ngIf;TD("json",o);}}function li(t,i){t&1&&ND(0);}function mi(t,i){if(t&1&&(Ia(0,"div"),_D(1,"tm-motors-dealership-card",27),bf()),t&2){let o=i.$implicit;X_$1(),TD("dealership",o);}}function pi(t,i){if(t&1&&iD(0,mi,2,1,"div",26),t&2){let o=yx().ngIf,r=yx();TD("ngForOf",o.list)("ngForTrackBy",r.trackByDealershipId);}}function di(t,i){t&1&&(Ia(0,"div"),_D(1,"tm-motors-dealership-ghost-card"),bf());}function ci(t,i){t&1&&iD(0,di,2,0,"div",28),t&2&&TD("ngForOf",fA(1,ii).constructor(12));}function hi(t,i){t&1&&(Ia(0,"section",29),_D(1,"img",30),Ia(2,"h3"),Qx(3,"No dealers found"),bf(),Ia(4,"p"),Qx(5," Dang! We couldn't find any dealers that match your keywords! Make sure all words are spelt correctly or try a more general search. "),bf()());}function gi(t,i){if(t&1&&(Ia(0,"a",31),Qx(1),bf()),t&2){let o=i.page,r=i.label;TD("queryParams",pA(2,ri,o)),X_$1(),Af$1(" ",r," ");}}function _i(t,i){t&1&&ND(0);}function ui(t,i){if(t&1&&(Ia(0,"div",3)(1,"div",19)(2,"section")(3,"div",20),iD(4,li,1,0,"ng-container",21),yA(5,"async"),iD(6,pi,1,2,"ng-template",null,1,wA)(8,ci,1,2,"ng-template",null,2,wA),bf()(),iD(10,hi,6,0,"section",22),Ia(11,"tg-pagination",23),yA(12,"async"),yA(13,"async"),iD(14,gi,2,4,"a",24),bf(),Ia(15,"div",25),iD(16,_i,1,0,"ng-container",10),bf()()()),t&2){let o=i.ngIf,r=Tx(7),e=Tx(9),n=yx(),c=Tx(29);
4X_$1(4),TD("ngIf",!DA(5,8,n.searchIsLoading$))("ngIfThen",r)("ngIfElse",e),X_$1(6),TD("ngIf",o.totalCount===0),X_$1(),TD("currentPage",DA(12,10,n.currentPage$))("totalPages",DA(13,12,n.totalPages$))("itemsToShow",7),X_$1(5),TD("ngTemplateOutlet",c);}}function fi(t,i){t&1&&(Ia(0,"a",32),Qx(1," All Dealers "),bf(),Qx(2," | "),Ia(3,"a",33),Qx(4," Dealer Types "),bf());}function xi(t,i){if(t&1&&_D(0,"tm-meta-json-ld-inline",16),t&2){let o=i.ngIf;TD("json",o);}}var zt="DealershipSearchPageNotFound",Ut={title:"Vehicle Dealer Directory | New & Used",description:"Find vehicle dealers on Trade Me Motors, NZ's largest range of dealership vehicles. View listings and make an enquiry, or explore a range of locations."},Ht=(()=>{let i=class i{constructor(r,e,n,c,S,k){this._dealershipsFacade=r,this._platformService=e,this._router=n,this._metaDataFacade=c,this._dealershipJsonLdMapperService=S,this._serverResponse=k,this._destroyed$=new W$1,this.pageSize=u.DEALERSHIPS_PAGE_ROWS,this.breadcrumbs$=Be;}ngOnInit(){let r=this._dealershipsFacade.search({rows:u.DEALERSHIPS_PAGE_ROWS}).pipe(o());this.searchIsLoading$=r.pipe(Fe(e=>!!e.isLoading)),this.dealerships$=r.pipe(th(e=>this.dealership404NotFound(e)),Xt(e=>!!e.item&&!e.isLoading),Fe(e=>y$1({},e.item))),this.dealershipMetadata$=r.pipe(Xt(e=>!e.isLoading&&!!e.item?.metadata),th(e=>{let n={title:e.item.metadata?.title?e.item.metadata.title+" | New & Used":Ut.title,description:e.item.metadata?.metaDescription??Ut.description,blockRobotIndexAndFollow:e.item.metadata?.blockRobotsIndexing};this._metaDataFacade.updateMetaData(n);}),Fe(e=>({description:e.item.metadata.description,header:e.item.metadata.header??"Dealer Directory"}))),this.breadcrumbs$=r.pipe(Xt(e=>!e.isLoading&&!!e.item&&!!e.item.breadCrumbs),Fe(e=>e.item.breadCrumbs.map((n,c,S)=>{let k=n.displayName,Wt=c===S.length-1,qt=n.canonicalPath;return {name:n.name,value:n.value,displayName:k,shouldDisplayAsTextOnly:Wt,canonicalPath:qt}}))),this.breadcrumbSchema$=this.breadcrumbs$.pipe(Fe(e=>this._dealershipJsonLdMapperService.mapBreadcrumbs(e)?.jsonLd)),this.currentPage$=this.dealerships$.pipe(Xt(e=>!!e.page),Fe(e=>e.page),Jp(1)),this.totalPages$=this.dealerships$.pipe(Fe(e=>i.mapTotalPages(this.pageSize,e))),this.dealershipsSchema$=this.dealerships$.pipe(Fe(e=>e.list.map(n=>this._dealershipJsonLdMapperService.mapDealership(n)))),this.internalLinksSchema$=this._dealershipsFacade.getDealershipSeoLinks({rows:u.DEALERSHIPS_PAGE_ROWS}).pipe(Xt(e=>!!e),Fe(e=>this._dealershipJsonLdMapperService.mapDirectoryLinks(e)));}trackByDealershipId(r,e){return e.id}dealership404NotFound(r){if(r.error){let e$1=r?.error?.data?.error;if(this._platformService.isServer&&e$1?.code===zt)this._serverResponse.httpStatus=404;else if(e$1?.code===zt)this._router.navigate(["/404"],{skipLocationChange:true});else throw new e("This dealership search URL is not valid")}}static mapTotalPages(r,e){return e.totalCount?Math.ceil(e.totalCount/r):0}ngOnDestroy(){this._destroyed$.next();}};i.\u0275fac=function(e){return new(e||i)(R$1(g$1),R$1(h$1),R$1(ce),R$1(l),R$1(S),R$1(R$2,8))},i.\u0275cmp=jM({type:i,selectors:[["tm-dealerships-url-search"]],standalone:false,decls:32,vars:27,consts:[["directoryPagesLinks",""],["searchContent",""],["ghostSearchContent",""],[1,"h-spacing-page-bottom","l-container"],[3,"breadcrumbs"],[3,"json",4,"ngIf"],[1,"tm-motors-dealerships-url-search__header-grid"],[1,"tm-motors-dealerships-url-search__header-primary"],[1,"tm-motors-dealerships-url-search__h1"],[1,"tm-motors-dealerships-url-search__link-block"],[4,"ngTemplateOutlet"],[1,"tm-motors-dealerships-url-search__description"],["class","tm-motors-dealerships-url-search__count-block",4,"ngIf"],[3,"showCount","showHeader"],[1,"tm-dealerships-url-search__results"],["class","h-spacing-page-bottom l-container",4,"ngIf"],[3,"json"],[1,"tm-motors-dealerships-url-search__count-block"],[1,"tm-motors-dealerships-url-search__count"],[1,"tm-dealerships-url-search__search-results-container"],[1,"tm-dealerships-url-search__search-card-container"],[4,"ngIf","ngIfThen","ngIfElse"],["class","tm-dealerships-url-search__search--no-results",4,"ngIf"],["autoCompact","",3,"currentPage","totalPages","itemsToShow"],["routerLink",".","queryParamsHandling","merge",3,"queryParams",4,"tgPaginationItem"],[1,"tm-motors-dealerships-url-search__link-block--mobile"],[4,"ngFor","ngForOf","ngForTrackBy"],[1,"tm-dealerships-url-search__search-card",3,"dealership"],[4,"ngFor","ngForOf"],[1,"tm-dealerships-url-search__search--no-results"],["alt","No dealers found","src","/images/frend/search-no-results.png",1,"tm-dealerships-url-search__search-no-results-placeholder"],["routerLink",".","queryParamsHandling","merge",3,"queryParams"],["routerLink","/motors/dealerships/all-dealers"],["routerLink","/motors/dealerships/all-categories"]],template:function(e,n){if(e&1&&(I
4a(0,"div",3)(1,"tg-rack")(2,"tg-rack-item")(3,"tg-rack-item-primary"),_D(4,"tm-breadcrumbs",4),yA(5,"async"),iD(6,ni,1,1,"tm-meta-json-ld-inline",5),yA(7,"async"),bf()(),Ia(8,"div",6)(9,"div",7)(10,"h1",8),Qx(11),yA(12,"async"),bf()(),Ia(13,"div",9),iD(14,ai,1,0,"ng-container",10),bf(),Mf(15),Ia(16,"div",7)(17,"div",11),Qx(18),yA(19,"async"),bf()(),iD(20,oi,5,1,"div",12),yA(21,"async"),Ja(),bf()(),_D(22,"tm-search-result-pages-subcategory-links-block",13),iD(23,si,1,1,"tm-meta-json-ld-inline",5),yA(24,"async"),bf(),Ia(25,"div",14),iD(26,ui,17,14,"div",15),yA(27,"async"),bf(),iD(28,fi,5,0,"ng-template",null,0,wA)(30,xi,1,1,"tm-meta-json-ld-inline",5),yA(31,"async")),e&2){let c=Tx(29);X_$1(4),TD("breadcrumbs",DA(5,11,n.breadcrumbs$)),X_$1(2),TD("ngIf",DA(7,13,n.breadcrumbSchema$)),X_$1(5),Af$1(" ",DA(12,15,n.dealershipMetadata$)?.header," "),X_$1(3),TD("ngTemplateOutlet",c),X_$1(4),Af$1(" ",DA(19,17,n.dealershipMetadata$)?.description," "),X_$1(2),TD("ngIf",DA(21,19,n.dealerships$)?.totalCount),X_$1(2),TD("showCount",false)("showHeader",false),X_$1(),TD("ngIf",DA(24,21,n.internalLinksSchema$)),X_$1(3),TD("ngIf",DA(27,23,n.dealerships$)),X_$1(4),TD("ngIf",DA(31,25,n.dealershipsSchema$));}},dependencies:[rn$1,zc,zo,Hc,YI,mO,IO,ut,D,ae,zb,Af,d,ne,bO],styles:["tm-dealerships-url-search[_nghost-%COMP%]{display:block}.tm-motors-dealerships-url-search__h1[_ngcontent-%COMP%]{margin-bottom:0}@media(max-width:767px){.tm-motors-dealerships-url-search__h1[_ngcontent-%COMP%]{color:var(--%NS%tg-text-heading);font-weight:700;font-size:1.375rem;line-height:28px;text-transform:none;margin-bottom:0}}@media(max-width:767px)and (min-width:768px){.tm-motors-dealerships-url-search__h1[_ngcontent-%COMP%]{font-size:1.5rem;line-height:32px}}.tm-dealerships-url-search__results[_ngcontent-%COMP%]{padding-top:16px;background:#f6f5f4}.tm-dealerships-url-search__results-container[_ngcontent-%COMP%]{display:flex;flex-direction:column}.tm-dealerships-url-search__search-card[_ngcontent-%COMP%] tg-card a div.mt-dealership-card__body{height:178px}.tm-dealerships-url-search__search-card[_ngcontent-%COMP%] tg-card a div.mt-dealership-card__body div div{margin-bottom:-35px}.tm-dealerships-url-search__search-card-container[_ngcontent-%COMP%]{display:grid;grid-template-columns:repeat(auto-fit,312px);gap:24px;row-gap:0}@media(max-width:767px){.tm-dealerships-url-search__search-card-container[_ngcontent-%COMP%]{grid-template-columns:repeat(auto-fit,minmax(312px,1fr))}}.tm-dealerships-url-search__count--none.o-flag[_ngcontent-%COMP%]{border:1px solid #00bc82;background-color:transparent;color:#00bc82}.tm-dealerships-url-search__search--no-results[_ngcontent-%COMP%]{margin-top:32px;text-align:center}.tm-dealerships-url-search__search-no-results-placeholder[_ngcontent-%COMP%]{margin:auto}.tm-motors-dealerships-url-search__header-grid[_ngcontent-%COMP%]{display:grid;align-items:center;row-gap:8px}@media(min-width:768px){.tm-motors-dealerships-url-search__header-grid[_ngcontent-%COMP%]{grid-template-columns:1fr 184px;row-gap:24px}}.tm-motors-dealerships-url-search__header-primary[_ngcontent-%COMP%]{align-self:start;margin-right:8px}@media(max-width:767px){.tm-motors-dealerships-url-search__link-block[_ngcontent-%COMP%]{display:none}}.tm-motors-dealerships-url-search__link-block--mobile[_ngcontent-%COMP%]{font-size:1rem;margin:48px 0}@media(min-width:768px){.tm-motors-dealerships-url-search__link-block--mobile[_ngcontent-%COMP%]{display:none}}.tm-motors-dealerships-url-search__description[_ngcontent-%COMP%]{font-size:.875rem}@media(min-width:768px){.tm-motors-dealerships-url-search__description[_ngcontent-%COMP%]{color:#65605d;font-size:1rem;width:50%}}.tm-motors-dealerships-url-search__count-block[_ngcontent-%COMP%]{display:flex;align-items:center;width:fit-content;background:#f6f5f4;border-radius:6px;padding:8px;color:#44413d;font-size:.75rem;margin-top:8px}@media(min-width:768px){.tm-motors-dealerships-url-search__count-block[_ngcontent-%COMP%]{align-self:start;flex-direction:column;margin-left:auto;margin-top:0;font-size:.875rem;padding:16px}}.tm-motors-dealerships-url-search__count[_ngcontent-%COMP%]{margin-right:8px;color:#76716d;font-size:1rem;font-weight:500}@media(min-width:768px){.tm-motors-dealerships-url-search__count[_ngcontent-%COMP%]{color:var(--%NS%tg-text-heading);font-size:1.125rem;font-weight:500;line-height:24px;margin-bottom:0}}"]});let t=i;return t})();var yi=()=>[],Ci=t=>({page:t});function vi(t,i){if(t&1&&_D(0,"tm-meta-json-ld-inline",19),t&2){let o=yx();TD("json",o.breadcrumbSchema);}}function Si(t,i){t&1&&ND(0);}function bi(t,i){t&1&&ND(0);}function Ti(t,i){if(t&1&&(Ia(0,"div",20)(1,"div",21),Qx(2),bf(),Ia(3,"div"),Qx(4,"Dealers found"),bf()()),t&2){let o=i.ngIf;X_$1(2),Af$1(" ",o," ");}}function ki(t,i){t&1&&ND(0);}function Pi(t,i){if(t&1&&(Ia(0,"option",36),Qx(1),bf()),t&2){let o=i.$implicit;TD("value",o.regionId),X_$1(),Af$1(" ",o.regionName," ");}}function Di(t,i){if(t&1){let o=dx();Ia(0,"div",22),Qx(1,"Search for a dealership location or keyword"),bf(),Ia(2,"div",23)(3,"div",24)(4,"tg-select-container",25)(5,"select",26),cE("ngModelChange",function(e){Xh(o);let n=yx();return eA(n.searchParams.region_id,e)||(n.searchParams.region_id=e),eg(e)}),kD("change",function(){Xh(o);let e=yx();
4return eg(e.onRegionChange())}),Ia(6,"option",27),Qx(7,"All locations"),bf(),iD(8,Pi,2,2,"option",28),yA(9,"async"),bf(),KS(),bf()(),Ia(10,"div",29)(11,"form",30),kD("ngSubmit",function(){Xh(o);let e=yx();return eg(e.search())}),Ia(12,"div",31)(13,"tg-input-container",32),_D(14,"tg-icon-left",33),Ia(15,"input",34),cE("ngModelChange",function(e){Xh(o);let n=yx();return eA(n.searchParams.search_string,e)||(n.searchParams.search_string=e),eg(e)}),bf(),KS(),bf()(),Ia(16,"button",35),Qx(17," Search "),bf()()()();}if(t&2){let o=yx();X_$1(5),aE("ngModel",o.searchParams.region_id),XS(),X_$1(3),TD("ngForOf",DA(9,4,o.regionalCounts$))("ngForTrackBy",o.trackByRegionId),X_$1(7),aE("ngModel",o.searchParams.search_string),XS();}}function Ii(t,i){t&1&&ND(0);}function wi(t,i){if(t&1&&(Ia(0,"tg-col",46),_D(1,"tm-motors-dealership-card",47),bf()),t&2){let o=i.$implicit;X_$1(),TD("dealership",o);}}function Ei(t,i){if(t&1&&iD(0,wi,2,1,"tg-col",45),t&2){let o=yx().ngIf,r=yx();TD("ngForOf",o.list)("ngForTrackBy",r.trackByDealershipId);}}function Mi(t,i){t&1&&(Ia(0,"tg-col",46),_D(1,"tm-motors-dealership-ghost-card"),bf());}function Oi(t,i){if(t&1&&iD(0,Mi,2,0,"tg-col",45),t&2){let o=yx(2);TD("ngForOf",fA(2,yi).constructor(12))("ngForTrackBy",o.trackByDealershipId);}}function Li(t,i){t&1&&(Ia(0,"section",48),_D(1,"img",49),Ia(2,"h3"),Qx(3,"No dealers found"),bf(),Ia(4,"p"),Qx(5," Dang! We couldn't find any dealers that match your keywords! Make sure all words are spelt correctly or try a more general search. "),bf()());}function Fi(t,i){if(t&1&&(Ia(0,"a",50),Qx(1),bf()),t&2){let o=i.page,r=i.label;TD("queryParams",pA(2,Ci,o)),X_$1(),Af$1(" ",r," ");}}function Ri(t,i){t&1&&ND(0);}function Ni(t,i){if(t&1&&(Ia(0,"div",37)(1,"div",38)(2,"section")(3,"tg-row",39),iD(4,Ii,1,0,"ng-container",40),yA(5,"async"),iD(6,Ei,1,2,"ng-template",null,2,wA)(8,Oi,1,3,"ng-template",null,3,wA),bf()(),iD(10,Li,6,0,"section",41),Ia(11,"tg-pagination",42),yA(12,"async"),yA(13,"async"),iD(14,Fi,2,4,"a",43),bf(),Ia(15,"div",44),iD(16,Ri,1,0,"ng-container",11),bf()()()),t&2){let o=i.ngIf,r=Tx(7),e=Tx(9),n=yx(),c=Tx(28);X_$1(4),TD("ngIf",!DA(5,8,n.searchIsLoading$))("ngIfThen",r)("ngIfElse",e),X_$1(6),TD("ngIf",o.totalCount===0),X_$1(),TD("currentPage",DA(12,10,n.currentPage$))("totalPages",DA(13,12,n.totalPages$))("itemsToShow",7),X_$1(5),TD("ngTemplateOutlet",c);}}function Bi(t,i){if(t&1&&(Mf(0),_D(1,"tm-findability-internal-linking-tabs",51),Ja()),t&2){let o=i.ngIf;X_$1(),TD("data",o.links)("isLoading",o.isLoading);}}function Ai(t,i){t&1&&(Ia(0,"a",52),Qx(1," All Dealers "),bf(),Qx(2," | "),Ia(3,"a",53),Qx(4," Dealer Types "),bf());}var $i={title:"Vehicle Dealer Directory | New & Used",description:"Find motor vehicle dealers on Trade Me Motors, NZ\u2019s largest range of dealership vehicles. View listings and make an enquiry, or explore a range of locations."},Vt=(()=>{let i=class i{constructor(r,e,n,c,S){this._activatedRoute=r,this._dealershipsFacade=e,this._router=n,this._metaDataFacade=c,this._dealershipJsonLdMapperService=S,this.pageSize=u.DEALERSHIPS_PAGE_ROWS,this.searchParams={},this.breadcrumbs=[{displayName:"Motors",canonicalPath:"/motors"},{displayName:"Dealer Directory",shouldDisplayAsTextOnly:true,canonicalPath:"/motors/dealerships"}],this._destroyed$=new W$1,this.trackByRegionId=k=>k.regionId,this.trackByDealershipId=k=>k.id;}ngOnInit(){this._activatedRoute.queryParams.pipe(Fe(e=>({rows:this.pageSize,search_string:e.keyword,region_id:+e.regionId||0,page:+e.page||1})),Xp(this._destroyed$)).subscribe(e=>this.searchParams=e);let r=this._dealershipsFacade.search({rows:u.DEALERSHIPS_PAGE_ROWS});this.searchIsLoading$=r.pipe(Fe(e=>!!e.isLoading)),this.dealerships$=r.pipe(Xt(e=>!!e.item&&!e.isLoading),Fe(e=>y$1({},e.item))),this.regionalCounts$=this._dealershipsFacade.getRegionalCounts().pipe(su()),this._metaDataFacade.updateMetaData($i),this.currentPage$=this.dealerships$.pipe(Xt(e=>!!e.page),Fe(e=>e.page),Jp(1)),this.totalPages$=this.dealerships$.pipe(Fe(e=>i.mapTotalPages(this.pageSize,e))),this.dealershipsFindabilityLinks$=this._dealershipsFacade.searchDirectory().pipe(Xt(e=>!!e.item),Fe(e=>({links:this.groupToFindabilityLinks(e?.item?.list??[]),isLoading:e.isLoading}
4))),this.breadcrumbSchema=this._dealershipJsonLdMapperService.mapBreadcrumbs(this.breadcrumbs)?.jsonLd;}groupToFindabilityLinks(r){return r.reduce((e,n)=>{let c=e.find(k=>k.title===n.urlTypeName),S={link:`/a${n.canonicalPath}`,description:n.name};return c?c.links.push(S):e.push({title:n.urlTypeName,links:[S]}),e},[])}search(){let r={regionId:+this.searchParams.region_id,keyword:this.searchParams.search_string},e=i.sanitizeParams(r);this._router.navigate([],{queryParams:e});}onRegionChange(){this.searchParams.page=void 0,this.search();}ngOnDestroy(){this._destroyed$.next();}static sanitizeParams(r){return Object.keys(r).reduce((n,c)=>r[c]?z(y$1({},n),{[c]:r[c]}):n,{})}static mapTotalPages(r,e){return e.totalCount?Math.ceil(e.totalCount/r):0}};i.\u0275fac=function(e){return new(e||i)(R$1(Re),R$1(g$1),R$1(ce),R$1(l),R$1(S))},i.\u0275cmp=jM({type:i,selectors:[["ng-component"]],hostAttrs:["ngSkipHydration","true"],standalone:false,decls:29,vars:14,consts:[["searchRefineHeader",""],["directoryPagesLinks",""],["searchContent",""],["ghostSearchContent",""],[1,"h-spacing-page-bottom","l-container"],[3,"breadcrumbs"],[3,"json",4,"ngIf"],[1,"tm-motors-dealerships__header-grid"],[1,"tm-motors-dealerships__header-primary"],[1,"tm-motors-dealerships__h1"],[1,"tm-motors-dealerships__link-block"],[4,"ngTemplateOutlet"],[1,"tm-motors-dealerships__search-refine"],["class","tm-motors-dealerships__count-block",4,"ngIf"],[1,"tm-motors-dealerships__search-refine--mobile"],[1,"tm-motors-dealerships__results"],["class","tm-motors-dealerships__results-container h-spacing-page-bottom l-container",4,"ngIf"],[1,"tm-motors-dealerships__findability-tabs-links"],[4,"ngIf"],[3,"json"],[1,"tm-motors-dealerships__count-block"],[1,"tm-motors-dealerships__count"],[1,"tm-motors-dealerships__search-refine-label"],[1,"tm-motors-dealerships__search-refine-header"],[1,"tm-motors-dealerships__region-search-dropdown"],["label","region","showLabel","false"],["name","currentRegionId","tgMarginBottom","","tgMarginBottomSize","none","tgSelect","",1,"h-flex",3,"ngModelChange","change","ngModel"],["value","0"],[3,"value",4,"ngFor","ngForOf","ngForTrackBy"],[1,"tm-motors-dealerships__keyword-search-bar-container"],["autocomplete","off","method","POST","role","search",1,"tm-motors-dealerships__keyword-search-bar",3,"ngSubmit"],[1,"tm-motors-dealerships__keyword-search-input"],["clearable","","label","Search for a dealer","showLabel","false"],["name","search","role","presentation"],["name","keyword","placeholder","Search for a dealer","tgTextInput","","type","search",3,"ngModelChange","ngModel"],["tgButton2","","tgStyle","primary","type","submit",1,"tm-motors-dealerships__search-button"],[3,"value"],[1,"tm-motors-dealerships__results-container","h-spacing-page-bottom","l-container"],[1,"tm-motors-dealerships__search-results-container"],["flexContents",""],[4,"ngIf","ngIfThen","ngIfElse"],["class","tm-motors-dealerships__search--no-results",4,"ngIf"],["autoCompact","",3,"currentPage","totalPages","itemsToShow"],["routerLink",".","queryParamsHandling","merge",3,"queryParams",4,"tgPaginationItem"],[1,"tm-motors-dealerships__link-block--mobile"],["flexContents","","sm","12","sd","6","lg","4","xl","3",4,"ngFor","ngForOf","ngForTrackBy"],["flexContents","","sm","12","sd","6","lg","4","xl","3"],[1,"h-flex",3,"dealership"],[1,"tm-motors-dealerships__search--no-results"],["alt","No dealers found","src","/images/frend/search-no-results.png",1,"tm-motors-dealerships__search-no-results-placeholder"],["routerLink",".","queryParamsHandling","merge",3,"queryParams"],["limitRow","15","limitRowInMd","15","title","Similar Searches",3,"data","isLoading"],["routerLink","/motors/dealerships/all-dealers"],["routerLink","/motors/dealerships/all-categories"]],template:function(e,n){if(e&1&&(Ia(0,"div",4)(1,"tg-rack")(2,"tg-rack-item")(3,"tg-rack-item-primary"),_D(4,"tm-breadcrumbs",5),iD(5,vi,1,1,"tm-meta-json-ld-inline",6),bf()(),Ia(6,"div",7)(7,"div",8)(8,"h1",9),Qx(9,"Vehicle Dealer Directory"),bf()(),Ia(10,"div",10),iD(11,Si,1,0,"ng-container",11),bf(),Ia(12,"div",8)(13,"div",12),iD(14,bi,1,0,"ng-container",11),bf()(),iD(15,Ti,5,1,"div",13),yA(16,"async"),bf()(),Ia(17,"div",14),iD(18,ki,1,0,"ng-container",11),bf()(),iD(19,Di,18,6,"ng-template",null,0,wA),Ia(21,"div",15),iD(22,Ni,17,14,"div",16),yA(23,"async"),bf(),Ia(24,"div",17),iD(25,Bi,2,2,"ng-container",18),yA(26,"async"),bf(),iD(27,Ai,5,0,"ng-template",null,1,wA)),e&2){let c=Tx(20),S=Tx(28);X_$1(4),TD("breadcrumbs",n.breadcrumbs),X_$1(),TD("ngIf",n.breadcrumbSchema),X_$1(6),TD("ngTemplateOutlet",S),X_$1(3),TD("ngTemplateOutlet",c),X_$1(),TD("ngIf",DA(16,8,n.dealerships$)?.totalCount),X_$1(3),TD("ngTemplateOutlet",c),X_$1(4),TD("ngIf",DA(23,10,n.dealerships$)),X_$1(3),TD("ngIf",DA(26,12,n.dealershipsFindabilityLinks$));}},dependencies:[rn$1,zc,zo,Hc,Fb,Ab,Gm,Um,qm,Vi,ss,Ai$1,Bm,Eo,Ri$1,K_,nn,Eh,Fh,Ss,xb,Bh,we,YI,mO,IO,He,Tr,I0,ut,ae,zb,Af,J,d,ne,bO],styles:[`:host{display:block}.tm-motors-dealerships__h1{margin-bottom:0}@media(max-width:767px){.tm-motors-dealerships__h1{color:var(--%NS%tg-text-heading);font-weight:700;font-size:1.375rem;line-height:28px;text-transform:none;margin-bottom:0}}@media(max-width:767px)and (min-width:768px){.tm-motors-dealerships__h1{font-size:1.5rem;line-height:32px}}.tm-motors-dealerships__results{padding-top:16px;background:#f6f5f4}.tm-motors-dealerships__results-container{display:flex;flex-direction:column}.tm-motors-dealerships__count--none.o-flag{border:1px solid #00bc82;background-color:transparent;color:#00bc82}@media(min-width:768px){.tm-motors-dealerships__search-button{margin-left:24px;width:25%}}@media(max-width:767px){.tm-motors-dealerships__search-button{margin-top:32px}}@media(min-width:768px){.tm-motors-dealerships__keyword-search-bar{display:flex}}.tm-motors-dealerships__keyword-search-bar .o-input--search{width:100%;margin-bottom:0}.tm-motors-dealerships__search--no-results{text-align:center}.tm-motors-dealerships__search-no-results-placeholder{margin:auto}.tm-motors-dealerships_load-more{margin-bottom:24px}.tm-motors-dealerships__search-refine-label{font-weight:500;margin-bottom:8px}.tm-motors-dealerships__search-refine-header{margin-bottom:16px}@media(min-width:768px){.tm-motors-dealerships__search-refine-header{display:flex}}@media(max-width:767px){.tm-motors-dealerships__search-refine{display:none}}@media(min-width:768px){.tm-motors-dealerships__search-refine--mobile{display:none}}@media(min-width:768px){.tm-motors-dealerships__keyword-search-bar-container{width:80%;margin-left:24px}}@media(min-width:768px){.tm-motors-dealerships__keyword-search-input{width:50%}}@media(min-width:768px){.tm-motors-dealerships__region-search-dropdown{display:flex}}.tm-motors-dealerships__search-results-container{order:1;flex:0 0 auto}.tm-motors-dealerships__header-grid{display:grid;align-items:center;row-gap:8px}@media(min-width:768px){.tm-motors-dealerships__header-grid{grid-template-columns:1fr 184px;row-gap:24px}}.tm-motors-dealerships__header-primary{align-self:start;margin-right:8px}@media(max-width:767px){.tm-motors-dealerships__link-block{display:none}}.tm-motors-dealerships__link-block--mobile{font-size:1rem;margin:48px 0}@media(min-width:768px){.tm-motors-dealerships__link-block--mobile{display:none}}.tm-motors-dealerships__count-block{display:flex;align-items:center;width:fit-content;background:#f6f5f4;border-radius:6px;padding:8px;color:#44413d;font-size:.75rem}@media(min-width:768px){.tm-motors-dealerships__count-block{align-self:start;flex-direction:column;margin-left:auto;font-size:.875rem;padding:16px}}.tm-motors-dealerships__count{margin-right:8px;color:#76716d;font-size:1rem;font-weight:500}@media(min-width:768px){.tm-motors-dealerships__count{color:var(--%NS%tg-text-heading);font-size:1.125rem;font-weight:500;line-height:24px;margin-bottom:0}}.tm-motors-dealerships__findability-tabs-links{margin-top:32px;margin-bottom:48px} 5`],encapsulation:2});let t=i;return t})();var ji=[{path:"",component:Vt},{path:"**",component:Ht,pathMatch:"full"}],Mr=(()=>{let i=class i{};i.\u0275fac=function(e){return new(e||i)},i.\u0275mod=Za({type:i}),i.\u0275inj=_o({providers:[{provide:L,useClass:$t},{provide:re,useClass:V}
5],imports:[eu.forChild(ji),Bt.forFeature([W]),rn.forFeature(O,$),Ar,pb,Rb,Cb,br,we,VO,He,Zo,Eb,X_,Ob,we,mc,g,R,y,Gb,h,a]});let t=i;return t})();export{Mr as DealershipsModule};//# sourceMappingURL=dealerships.module-CVcfSZpp.js.map 6 7//# debugId=03386f0c-41ae-52ad-8940-dc6d3c1cdd70
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.