1import{a as xe}from"./chunk-4GNJ3KVL.js";import{a as le,b as R,c as ce,e as de,f as pe,g as me,h as ue,i as he,j as _e,k as fe,m as ve,n as ge}from"./chunk-RXTHBJNJ.js";import{a as ke}from"./chunk-GZ5534H5.js";import{a as ae}from"./chunk-D5GVVTZ5.js";import"./chunk-OZC5JFZK.js";import"./chunk-JEL6HJ7P.js";import{L as K,U as X,V as ee,Xa as ie,Za as C,gb as se,lc as ne,oc as oe,sa as te,uc as re}from"./chunk-YQOD7X2Z.js";import"./chunk-563YFTIG.js";import"./chunk-36JN3LZY.js";import"./chunk-WPHW6CRH.js";import{J as $,e as H,i as Z,p as J,t as Y}from"./chunk-76O7YCWW.js";import{e as q}from"./chunk-YYIIKC2W.js";import{e as U}from"./chunk-3WYGUSDH.js";import"./chunk-LU7SZU5X.js";import{E as Q,u as G,v as N}from"./chunk-PO2RDVKE.js";import{Bc as b,Ec as T,Fc as F,Gc as k,Pb as h,Rb as _,Tb as y,Tc as A,Ub as w,Uc as W,Vb as E,Vc as j,Wb as d,Xb as r,Yb as a,Zb as g,_a as D,db as o,ec as x,jb as B,jc as v,lc as c,oa as p,pa as m,pb as u,ub as O,wc as z,zc as f}from"./chunk-3URBZWPM.js";import{a as M,b as P,g as Fe}from"./chunk-ODN5LVDJ.js";var Ce=Fe(ke());var be={heading:"Additional filters:",categories:[{accordionTitle:"Assessment time options",tooltip:`<div> 2 <p>Choose the times that work best for you.</p> 3 4 <p>We\u2019ll show assessment centres offering slots during your selected time(s).</p> 5 6 <p>Please note that exact times may vary depending on the venue.</p> 7 </div>`,tooltipPosition:C.RIGHT,options:[{label:"Morning assessments available",filterString:"morningAssessments",id:"morningAssessments"},{label:"Afternoon assessments available",filterString:"afternoonAssessments",id:"afternoonAssessments"},{label:"Evening assessments available",filterString:"eveningAssessments",id:"eveningAssessments"},{label:"Weekend assessments available",filterString:"weekendAssessments",id:"weekendAssessments"}]},{accordionTitle:"Remote invigilation (RI)",tooltip:"<div><p>Assessment venue offers remote invigilation scheduling on behalf of a student. Please note this may be at an additional charge.</p></div>",tooltipPosition:C.RIGHT,options:[{label:"Remote invigilation scheduling",filterString:"RIAvailable",id:"remoteInvigilation"}]},{accordionTitle:"Amenities",tooltip:"<div><p>Facilities and accessibility at the assessment-venue centre.</p></div>",tooltipPosition:C.RIGHT,options:[{label:"Disabled access",filterString:"Disabled access",id:"Disabled access"},{label:"Free parking",filterString:"Free parking",id:"Free parking"},{label:"Accessible by public transport",filterString:"Accessible by public transport",id:"Accessible by public transport"},{label:"Free WiFi",filterString:"Free WiFi",id:"Free WiFi"},{label:"Cafeteria",filterString:"Cafeteria",id:"Cafeteria"}]}]};function Ae(s,l){if(s&1){let t=x();r(0,"section",11)(1,"fab-qualification-picker",20),v("selected",function(i){p(t);let n=c(2);return m(n.onSelect(i))}),a()()}if(s&2){let t=c(2);o(),d("nodes",t.assessmentTypes)("preselectedId",t.selectedAssessment)}}function Le(s,l){s&1&&(r(0,"div")(1,"p",21),f(2,"Please select at least your location!"),a()())}function Ve(s,l){if(s&1&&(r(0,"div",15),g(1,"fab-button",22),a()),s&2){let t=c(2);o(),d("button",t.mobileFilterButton)}}function Ie(s,l){s&1&&g(0,"fab-loader")}function Me(s,l){if(s&1&&(r(0,"div"),g(1,"fab-notification",24),a()),s&2){let t=c(3);o(),d("notification",t.noResultsNotification)("isNotificationOpen",!0)}}function Pe(s,l){if(s&1){let t=x();r(0,"a",29),v("click",function(i){p(t);let n=c(4);return i.preventDefault(),m(n.switchView("map"))}),r(1,"strong"),f(2,"View on map"),a()()}}function De(s,l){if(s&1&&g(0,"search-result-panel",28),s&2){let t=l.$implicit,e=c(4);d("isFeatured",!0)("trainingProvider",t)("hasAssessment",e.form.value.centre_assessments)("assessmentCosts",e.assessmentCosts)("searchQualificationId",e.chosenAssessment)}}function Be(s,l){if(s&1&&g(0,"search-result-panel",28),s&2){let t=l.$implicit,e=c(4);d("isFeatured",!1)("trainingProvider",t)("hasAssessment",e.form.value.centre_assessments)("assessmentCosts",e.assessmentCosts)("searchQualificationId",e.chosenAssessment)}}function Oe(s,l){if(s&1&&(r(0,"div")(1,"h2",25),f(2),A(3,"i18nPlural"),a(),r(4,"p",26),h(5,Pe,3,0,"a",27),a(),w(6,De,1,5,"search-result-panel",28,y),w(8,Be,1,5,"search-result-panel",28,y),a()),s&2){let t=c(3);o(2),b(" ",j(3,2,t.totalResult,t.messageMapping)," "),o(3),_(t.results.length?5:-1),o(),E(t.featuredListing),o(2),E(t.standardListing)}}function ze(s,l){if(s&1&&(r(0,"div",23),g(1,"fab-button",22),a()),s&2){let t=c(3);o(),d("button",t.loadMoreButton)}}function We(s,l){if(s&1&&(r(0,"section")(1,"div"),h(2,Ie,1,0,"fab-loader"),h(3,Me,2,2,"div"),a(),h(4,Oe,10,5,"div"),h(5,ze,2,1,"div",23),a()),s&2){let t=c(2);o(2),_(t.isLoadingResult?2:-1),o(),_(!t.isLoadingResult&&t.results.length===0?3:-1),o(),_(t.results.length?4:-1),o(),_(t.getMoreResults?5:-1)}}function je(s,l){if(s&1){let t=x();r(0,"div",0)(1,"form",2)(2,"div",3)(3,"h1",4),f(4,"Assessment Centres"),a()(),r(5,"app-location-search-bar",5),k("locationChange",function(i){p(t);let n=c();return F(n.locationSearch,i)||(n.locationSearch=i),m(i)}),v("locationChange",function(i){p(t);let n=c();return m(n.updateLocation(i))}),a(),r(6,"div",6)(7,"section",7)(8,"div",8)(9,"span")(10,"strong"),f(11,"Set filters"),a()(),r(12,"a",9),v("click",function(i){p(t);let n=c();return m(n.reset(i))}),r(13,"strong"),f(14,"Reset filters"),a()()(),r(15,"fab-accordion",10),h(16,Ae,2,2,"section",11),A(17,"json"),a(),r(18,"fab-accordion",12)(19,"app-price-filter",13),k("priceChange",function(i){p(t);let n=c();return F(n.priceFilter,i)||(n.priceFilter=i),m(i)}),v("priceChange",function(i){p(t);let n=c();return m(n.updatePrice(i))}),a()()()(),h(20,Le,3,0,"div"),r(21,"fab-applied-filters",14),v("resetFilters",function(i){p(t);let n=c();return m(n.resetFilters(i))}),a(),h(22,Ve,2,1,"div",15),r(23,"div",16)(24,"section",17)(25,"div",18)(26,"fab-side-filter",19),v("selection",function(i){p(t);let n=c();return m(n.captureAdditionalFilter(i))})("overlayClosed",function(i){p(t);let n=c();return m(n.displayFilterOverlay(i))}),a()()(),g(27,"div"),h(28,We,6,4,"section"),a()()()}if(s&2){let t=c();o(),d("formGroup",t.form),o(4),T("location",t.locationSearch),d("showDistance",!1),o(11),_(t.assessmentTypes&&W(17,14,t.assessmentTypes)!="{}"?16:-1),o(3),T("price",t.priceFilter),d("priceTiles",t.priceTiles),o(),_(t.hasFormBeenSubmitted&&!t.form.valid?20:-1),o(),d("form",t.form)("mapper",t.mapper),o(),_(t.mobileView?22:-1),o(4),d("c
7ontent",t.filterContent)("isMobile",t.mobileView)("openOverlay",t.overlayOpen),o(2),_(t.results?28:-1)}}function Ge(s,l){if(s&1){let t=x();r(0,"div")(1,"div",39)(2,"google-map",40),v("mapInitialized",function(i){p(t);let n=c(2);return m(n.onMapReady(i))}),a()()()}if(s&2){let t=c(2);o(2),d("options",t.mapOptions)}}function Ne(s,l){if(s&1&&(r(0,"li")(1,"span",41),f(2),a(),r(3,"a",42),f(4),a(),r(5,"span"),f(6),a()()),s&2){let t=l.$implicit,e=l.$index,i=c(2);z("active",i.activeMarker===t.pathAlias),o(2),b("",e+1,". "),o(),d("href","/assessment-venues/"+t.pathAlias,D),o(),b(" ",t.name," "),o(2),b("- ",t.distance," miles")}}function Qe(s,l){if(s&1){let t=x();r(0,"div",1)(1,"div",30)(2,"h1"),f(3,"Map view"),a(),r(4,"div",31)(5,"div",32)(6,"h3"),f(7),a()(),r(8,"div",33)(9,"a",34),v("click",function(i){p(t);let n=c();return i.preventDefault(),m(n.switchView("list"))}),r(10,"strong"),f(11,"List view"),a()()()()(),r(12,"div")(13,"div",31),h(14,Ge,3,1,"div"),r(15,"div",35)(16,"ul",36),w(17,Ne,7,6,"li",37,y),a()()(),g(19,"div",38),a()()}if(s&2){let t=c();o(7),b("near ",t.displayedLocation),o(7),_(t.apiLoaded?14:-1),o(3),E(t.nearestResults)}}var ut=(()=>{let l=class l{constructor(e,i,n,S,Se,ye,we,L,Ee,Re,Te,V){this.formBuilder=e,this.router=i,this.centerSearchClient=n,this.priceFilterUpdater=S,this.mapper=Se,this.formDataRouter=ye,this.searchMapService=we,this.titleService=L,this.googleTagManager=Ee,this.searchApiClientService=Re,this.assessmentsService=Te,this.ngZone=V,this.featuredListing=[],this.standardListing=[],this.messageMapping={"=0":"No result","=1":"One result",other:"# results"},this.assessmentTypes=[],this.results=[],this.view="list",this.hasFormBeenSubmitted=!1,this.getMoreResults=!1,this.searchedLocation={},this.nearestResults=[],this.gmapAPI=null,this.isLoadingResult=!1,this.filterContent=be,this.selectedAmenities=[],this.selectedAssessmentTimes=[],this.selectedFeatures=[],this.priceTiles=[{gte:0,lte:51},{gte:50,lte:101},{gte:100,lte:151},{gte:150,lte:201},{gte:200}],this.amenities=["Free parking","Accessible by public transport","Free WiFi","Cafeteria","Recruitment service","Disabled access"],this.loadMoreButton={text:"Load more",type:"primary",action:{type:"callback",callback:()=>this.performSearch(!0)},aria:"Load more"},this.mobileFilterButton={text:"Additional filters",type:"primary",glyph:{icon:K.FILTERS},action:{type:"callback",callback:()=>this.displayFilterOverlay()},aria:"Additional filters"},this.noResultsNotification={type:"ghost",message:"<p>There are no results matching your criteria. You may want to try broadening your search: the assessment you\u2019ve selected may currently have no venues offering it within the maximum price you've chosen, and/or have no location near you.</p>",fullWidth:!0},this.apiLoaded=!1,this.form=this.formBuilder.group({location:[null,H.required],maxDistance:null,centre_assessments:null,price:null,amenities:null,features:null}),L.setTitle("External Assessment Venue Search"),setTimeout(()=>{window.onresize=I=>{V.run(()=>{this.mobileView=window.innerWidth<769,this.mobileView&&this.tooltipMobile()})}},1e3),this.searchMapService.loadGoogleMapsLibrary().subscribe(I=>{this.apiLoaded=I})}ngOnInit(){if(this.mobileView=window.innerWidth<769,this.mobileView&&this.tooltipMobile(),this.assessmentsService.readAllAssessmentTypes().subscribe(e=>{this.assessmentTypes=oe(e),this.assessmentCosts=Ce.default.groupBy(e,"keycode")},e=>console.log(e)),this.form.valueChanges.subscribe(e=>{if(e.location!=null){Array.isArray(this.form.value.centre_assessments)||this.form.patchValue({centre_assessments:[this.form.value.centre_assessments]},{onlySelf:!0,emitEvent:!1}),this.locationSearch=e,this.displayedLocation=this.searchApiClientService.currentFormattedLocation(e.location),this.locationSearch=e,this.displayedLocation=this.searchApiClientService.currentFormattedLocation(e.location),this.priceFilter=e.price,this.performSearch();let i=R.mapForQueryParams(e);this.formDataRouter.redirectWithFormValue("assessment-venues/search/results",i,!0)}}),this.formDataRouter.defaultFormFromQueryParams(this.form),this.form.controls.centre_assessments&&this.form.controls.centre_assessments.value&&(this.selectedAssessment=this.form.controls.centre_assessments.value[0]),this.filterContent.categories.forEac
7h(e=>{e.options.forEach(i=>{i.prechecked=!1})}),this.form.controls.amenities||this.form.controls.features){this.selectedFeatures=this.form.controls.features.value?.split(",")??[],this.selectedAmenities=this.form.controls.amenities.value?.split(",")??[],this.selectedAssessmentTimes=this.form.controls.assessmentTimes.value?.split(",")??[];let e=[...this.selectedFeatures,...this.selectedAmenities,...this.selectedAssessmentTimes];this.preSelectOnLoad(e)}}ngOnDestroy(){this.searchMapService.loadGoogleMapsLibrary()}performSearch(e=!1){this.hasFormBeenSubmitted=!0,this.isLoadingResult=!0,this.chosenAssessment=this.form.value.centre_assessments[0],this.form.valid&&this.centerSearchClient.search(this.form.value,e,!0).subscribe(i=>{this.featuredListing=i.featuredListing,this.standardListing=i.standardListing,this.results=[...this.featuredListing,...this.standardListing],this.getMoreResults=i.searchMore;let n=i.priceRange;this.searchedLocation=i.searchedLocation,this.nearestResults=this.searchMapService.getNearestCenters(this.results,5),this.totalResult=i.totalResult,this.priceFilterUpdater.updatePriceRange(n),this.isLoadingResult=!1,this.googleTagManager.trigger("{context}Search")},i=>{console.log(i,"error"),this.isLoadingResult=!1,this.results=[]})}reset(e){e.preventDefault(),this.resetFilters("price"),this.form.get("price").reset(),this.form.get("location").reset(),this.form.get("maxDistance").reset(),this.form.get("centre_assessments").reset(),this.form.get("amenities").reset(),this.form.get("features").reset(),this.priceFilterUpdater.resetRange(),this.results=[],this.getMoreResults=!1,this.router.navigate(["/assessment-venues/search"])}resetFilters(e){e==="price"&&(this.priceTiles=this.priceTiles.map(i=>P(M({},i),{checked:!1})))}updateLocation(e){this.updateLocationSearch(e),this.form.get("location").value!==e&&this.form.get("location").patchValue(e)}updateLocationSearch(e=null,i=null){this.locationSearch={location:e||this.locationSearch.location,maxDistance:i||this.locationSearch.maxDistance}}updatePrice(e){this.form.get("price").patchValue(e)}onSelect(e){this.form.get("centre_assessments").patchValue(e.keycode)}formatLocation(e){let i=Object.assign({},e);return i.location={latitude:e.location[1],longitude:e.location[0]},i}displayFilterOverlay(e){e===!1?this.overlayOpen=e:this.overlayOpen=!0}captureAdditionalFilter(e){this.amenities.includes(e.filter)?(e.selected?this.selectedAmenities.push(e.filter):this.selectedAmenities.splice(this.selectedAmenities.indexOf(e.filter),1),this.form.get("amenities").patchValue(this.selectedAmenities.toString())):(e.selected?this.selectedFeatures.push(e.filter):this.selectedFeatures.splice(this.selectedFeatures.indexOf(e.filter),1),this.form.get("features").patchValue(this.selectedFeatures.toString()))}tooltipMobile(){this.filterContent.categories.forEach(e=>{e.tooltipPosition=C.LEFT})}switchView(e){this.view=e,e==="map"&&Q&&window.scrollTo(0,0)}onMapReady(e){this.mapOptions={center:{lat:this.searchedLocation.lat,lng:this.searchedLocation.lng},zoom:9,scrollwheel:!1,streetViewControl:!1,disableDoubleClickZoom:!0,mapTypeControl:!1},this.searchMapService.createMap(e,this.results,!0)}preSelectOnLoad(e){e.forEach(i=>{this.filterContent.categories.forEach(n=>{n.options.forEach(S=>{i===S.filterString&&(S.prechecked=!0)})})})}};l.\u0275fac=function(i){return new(i||l)(u($),u(q),u(le),u(ce),u(me),u(R),u(ue),u(U),u(X),u(de),u(pe),u(B))},l.\u0275cmp=O({type:l,selectors:[["app-eav-search-results"]],decls:3,vars:2,consts:[[1,"eav-results","container"],[1,"results-map","eav-results","container"],["novalidate","",3,"formGroup"],[1,"eav-results__header"],[1,"eav-results__header--title"],[3,"locationChange","location","showDistance"],[1,"eav-results__filters-container"],[1,"eav-results__filters","rows"],[1,"eav-results__text"],[1,"reset",3,"click"],["title","Level and Assessment type"],["body","",1,"col-md-12"],["title","Maximum price"],["body","",3,"priceChange","price","priceTiles"],[3,"resetFilters","form","mapper"],[1,"filter-button"],["
7id","results-grid",1,"results-grid"],[1,"side-filters"],[1,"side-filters__sticky"],[3,"selection","overlayClosed","content","isMobile","openOverlay"],[3,"selected","nodes","preselectedId"],[1,"alert","alert-danger"],[3,"button"],[1,"eav-results__view-more"],[3,"notification","isNotificationOpen"],[1,"eav-results__container--title"],[1,"float-right","eav-results__map-view"],["href","#"],["isEAV","true","pathAlias","/assessment-venues/",3,"isFeatured","trainingProvider","hasAssessment","assessmentCosts","searchQualificationId"],["href","#",3,"click"],["id","list-anchor",1,"eav-results-content-block"],[1,"row"],["name","list",1,"results-header__description","col-sm-9","text-left"],["name","list",1,"results-header__description","col-sm-3","text-right"],["href","",3,"click"],[1,"col-sm-12","col-md-12","col-lg-3","order-2","order-lg-1"],[1,"results-map__list"],[3,"active"],[1,"compare__back-button","row"],[1,"google-map"],["width","100%","height","100%",3,"mapInitialized","options"],[1,"results-map__list--numbers"],[3,"href"]],template:function(i,n){i&1&&(r(0,"div"),h(1,je,29,16,"div",0),a(),h(2,Qe,20,2,"div",1)),i&2&&(o(),_(n.view==="list"&&n.assessmentCosts?1:-1),o(),_(n.view==="map"?2:-1))},dependencies:[ge,J,Z,Y,ee,ie,ne,re,fe,_e,he,ve,se,te,xe,ae,N,G],styles:[`:root{--aat-ui-grey-25: #bfbfbf;--aat-ui-grey-55: #737373;--aat-slate: #3a5066;--aat-ui-grey-05: #f2f2f2}.eav-results{max-width:90%;margin:0 auto;padding-top:30px}.eav-results__view-more{padding:15px 0 30px;color:#fff}.eav-results__text{margin-bottom:15px}.eav-results-content-block{padding:15px 0}.eav-results__map-view{margin-top:6px}.eav-results__header{display:inline-block;width:100%;margin-bottom:30px}.eav-results__header--title{font-size:28;font-weight:100}.eav-results__shortlist{float:right;position:relative;margin-bottom:15px}.eav-results__shortlist a{border:1px solid rgb(238.425,238.425,238.425);color:#000;display:block;white-space:nowrap}.eav-results__shortlist a:before{position:absolute;top:-6px;right:-6px;color:#fff;background:#00ab4e;border-radius:50%}.eav-results__shortlist a:hover{text-decoration:none}.eav-results__container{clear:both}.eav-results__container--title{display:inline-block;line-height:normal;margin-bottom:30px}.eav-results__filters .accordion{display:block;margin-bottom:15px}.eav-results__radio{position:absolute;opacity:0;cursor:pointer}.eav-results__radio:checked~.eav-results__selected{background-color:#00ab4e;border:solid #00ab4e 2px}.eav-results__radio:checked~.eav-results__selected:after{display:block;top:0;left:0}.eav-results__container_radio{display:block;position:relative;padding-left:36px;margin-bottom:8px;
7cursor:pointer;font-size:1rem;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.eav-results__selected{position:absolute;top:3px;left:0;height:20px;width:20px;border:solid #4a4a4a 2px;background-color:#fff;-webkit-border-radius:50%;-moz-border-radius:50%;-ms-border-radius:50%;border-radius:50%}.eav-results__selected:after{content:"";position:absolute;display:none;left:0;top:0;width:16px;height:16px;border:solid white 2px;-webkit-border-radius:50%;-moz-border-radius:50%;-ms-border-radius:50%;border-radius:50%}.eav-results__selected:before{content:"";position:absolute;display:none;top:-2px;left:-2px;width:20px;height:20px;border-radius:50%;background:transparent;outline:3px solid transparent;outline-offset:3px;-webkit-box-shadow:0 0 0 4px #ffd432;-moz-box-shadow:0 0 0 4px #ffd432;box-shadow:0 0 0 4px #ffd432}.eav-results .distance-text{font-size:14px;color:#4a4a4a}.eav-results .distance-text a{font-size:14px}.btn{border-radius:.25rem;padding:.375rem .75rem}.btn.btn-success,.btn.btn-success:hover{color:#000;width:100%}.reset{color:#00ab4e!important;float:right}.results-map__list li{font-size:13pt;font-weight:600;border-bottom-width:1px;border-bottom-color:#dce6f0;border-bottom-style:solid;text-indent:-30px;padding:20px 20px 10px 30px}.results-map__list li.active{background:#dce6f0;border-left:3px solid #00ab4e;padding-left:35px}.results-map__list li--numbers{margin-right:9px;color:#00ab4e}.results-map__list li p{padding-left:40px;font-size:13pt;font-weight:300}.results-map__map{margin-bottom:10px}.results-map__element{padding-bottom:75%;height:300px}.results-map .compare__back-button{padding:1em}.results-map .compare__back-button .btn-default{white-space:nowrap}.results-map .text-right{text-align:right}.isDisabled{cursor:not-allowed;opacity:.5}.isDisabled>a{color:currentColor;display:inline-block;pointer-events:none;text-decoration:none}.notification--full-width .notification__content{max-width:100%!important}.notification--full-width .notification__content .notification__message ul,.notification--full-width .notification__content .notification__message li{list-style:initial}.notification--full-width .notification__content .notification__message ul{margin-left:20px}.alert-danger{color:#e22b25}@media (min-width: 769px){.results-grid{display:grid;grid-template-columns:25% 5% 70%}.results-grid .side-filters{z-index:10;grid-column:1/1}.results-grid .side-filters__sticky{position:sticky;top:50px}}.page-grid{display:grid;grid-auto-rows:min-content}.filter-button{padding-top:15px}fab-side-filter fab-input-checkbox .checkbox input+label:before{left:2px}.google-map{width:350px;height:600px}@media (min-width: 768px){.google-map{width:1000px;height:600px}} 8`],encapsulation:2});let s=l;return s})();export{ut as EavSearchResultsComponent};
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.