function ClusterIcon(n,t){n.getMarkerClusterer().extend(ClusterIcon,google.maps.OverlayView);this.cluster_=n;this.className_=n.getMarkerClusterer().getClusterClass();this.styles_=t;this.center_=null;this.div_=null;this.sums_=null;this.visible_=!1;this.setMap(n.getMap())}function Cluster(n){this.markerClusterer_=n;this.map_=n.getMap();this.gridSize_=n.getGridSize();this.minClusterSize_=n.getMinimumClusterSize();this.averageCenter_=n.getAverageCenter();this.hideLabel_=n.getHideLabel();this.markers_=[];this.center_=null;this.bounds_=null;this.clusterIcon_=new ClusterIcon(this,n.getStyles())}function MarkerClusterer(n,t,i){this.extend(MarkerClusterer,google.maps.OverlayView);t=t||[];i=i||{};this.markers_=[];this.clusters_=[];this.listeners_=[];this.activeMap_=null;this.ready_=!1;this.gridSize_=i.gridSize||60;this.minClusterSize_=i.minimumClusterSize||2;this.maxZoom_=i.maxZoom||null;this.styles_=i.styles||[];this.title_=i.title||"";this.zoomOnClick_=!0;void 0!==i.zoomOnClick&&(this.zoomOnClick_=i.zoomOnClick);this.averageCenter_=!1;void 0!==i.averageCenter&&(this.averageCenter_=i.averageCenter);this.ignoreHidden_=!1;void 0!==i.ignoreHidden&&(this.ignoreHidden_=i.ignoreHidden);this.enableRetinaIcons_=!1;void 0!==i.enableRetinaIcons&&(this.enableRetinaIcons_=i.enableRetinaIcons);this.hideLabel_=!1;void 0!==i.hideLabel&&(this.hideLabel_=i.hideLabel);this.imagePath_=i.imagePath||MarkerClusterer.IMAGE_PATH;this.imageExtension_=i.imageExtension||MarkerClusterer.IMAGE_EXTENSION;this.imageSizes_=i.imageSizes||MarkerClusterer.IMAGE_SIZES;this.calculator_=i.calculator||MarkerClusterer.CALCULATOR;this.batchSize_=i.batchSize||MarkerClusterer.BATCH_SIZE;this.batchSizeIE_=i.batchSizeIE||MarkerClusterer.BATCH_SIZE_IE;this.clusterClass_=i.clusterClass||"cluster";-1!==navigator.userAgent.toLowerCase().indexOf("msie")&&(this.batchSize_=this.batchSizeIE_);this.setupStyles_();this.addMarkers(t,!0);this.setMap(n)}var Netguides,LittleKickers;(function(n){var t;(function(n){var t=43.6904395,i=-79.5368791,r=12,f=0,e=25,o="UK",s=545,h="en-GB",c=0,l=.1,a="#e31e27",v=.5,y=2,p=!0,w=!1,b="Images/map/icon-home.png",k="images/map/m",d=function(){function n(n){this._infoWindow=new google.maps.InfoWindow;this._geocoder=new google.maps.Geocoder;this._options={DefaultLatitude:n.DefaultLatitude||t,DefaultLongitude:n.DefaultLongitude||i,DefaultZoom:n.DefaultZoom||r,MinZoom:n.MinZoom||f,MaxZoom:n.MaxZoom||e,Country:n.Country||o,CountryID:n.CountryID||s,LanguageTag:n.LanguageTag||h,MinClusterSize:n.MinClusterSize||c,SearchAreaOptions:{fillOpacity:n.SearchAreaOptions&&n.SearchAreaOptions.fillOpacity||l,strokeColor:n.SearchAreaOptions&&n.SearchAreaOptions.strokeColor||a,strokeOpacity:n.SearchAreaOptions&&n.SearchAreaOptions.strokeOpacity||v,strokeWeight:n.SearchAreaOptions&&n.SearchAreaOptions.strokeWeight||y,showArea:n.SearchAreaOptions&&n.SearchAreaOptions.showArea||p,showMarker:n.SearchAreaOptions&&n.SearchAreaOptions.showMarker||w}}}return Object.defineProperty(n.prototype,"InfoWindow",{get:function(){return this._infoWindow},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"ZoomLevel",{get:function(){return this._map.getZoom()},set:function(n){this._map.setZoom(n)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"Center",{get:function(){return this._map.getCenter()},enumerable:!0,configurable:!0}),n.prototype.SetCenter=function(n,t){this._map.setCenter({lat:n,lng:t})},Object.defineProperty(n.prototype,"TotalVisibleMarkers",{get:function(){var n=this;return this._markerClusterer?this._markerClusterer.getMarkers().reduce(function(t,i){return t+(n.Bounds.contains(i.getPosition())?1:0)},0):0},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"Bounds",{get:function(){return this._map.getBounds()},enumerable:!0,configurable:!0}),n.prototype.BoundsContains=function(n,t){var i=new google.maps.LatLng(n,t);return this.Bounds?this.Bounds.contains(i):!0},n.prototype.OnIdle=function(n){return this._map.addListener("idle",n)},n.prototype.OnBoundsChanged=function(n){return this._map.addListener("bounds_changed",n)},n.prototype.OnDragEnd=function(n){return this._map.addListener("dragend",n)},n.prototype.OnZoomChanged=function(n){return this._map.addListener("zoom_changed",n)},n.prototype.OnMarkerClicked=function(n){this._onMarkerClicked=n},n.prototype.Load=function(n){var i={zoom:this._options.DefaultZoom,minZoom:this._options.MinZoom,maxZoom:this._options.MaxZoom,center:new google.maps.LatLng(this._options.DefaultLatitude,this._options.DefaultLongitude),mapTypeId:google.maps.MapTypeId.ROADMAP},t;this._map=new google.maps.Map(document.getElementById("map"),i);t={fillOpacity:this._options.SearchAreaOptions.fillOpacity,strokeColor:this._options.SearchAreaOptions.strokeColor,strokeWeight:this._options.SearchAreaOptions.strokeWeight,strokeOpacity:this._options.SearchAreaOptions.strokeOpacity,map:this._map,visible:!1};this._searchArea=new google.maps.Circle(t);n&&this.SetLocations(n)},n.prototype.SetSearchArea=function(n,t,i,r,u,f){var e=this,o,s,h;u===void 0&&(u=!1);f===void 0&&(f=!1);o=n;n!=""||f?n==this._lastLocation&&n!=""?(this._searchArea.setRadius(t*1e3),u||this._map.fitBounds(this._searchArea.getBounds()),r(!1)):o==""?(s=this._map.getCenter(),this._searchArea.setCenter(s),this._searchArea.setRadius(t*1e3),this._searchArea.setVisible(!0),this._map.fitBounds(this._searchArea.getBounds()),this.ToggleLocationMarker(s,this._options.SearchAreaOptions.showMarker),r(!0)):(o+=", "+this._options.Country,h={address:o},this._geocoder.geocode(h,function(n,i){if(i==google.maps.GeocoderStatus.OK){var f=new google.maps.LatLng(n[0].geometry.location.lat(),n[0].geometry.location.lng());e._searchArea.setCenter(f);e._searchArea.setRadius(t*1e3);e._searchArea.setVisible(e._options.SearchAreaOptions.showArea);e._map.setCenter(f);e._map.fitBounds(e._searchArea.getBounds());e.ToggleLocationMarker(f,e._options.SearchAreaOptions.showMarker);r(!0)}else e.ClearSearchArea(u),r(!1)})):(this.ClearSearchArea(u),r(!1));this._lastLocation=n},n.prototype.ClearSearchArea=function(n){n===void 0&&(n=!1);this._searchArea.setVisible(!1);this.ToggleLocationMarker(new google.maps.LatLng(0,0),!1);n||(this._map.setCenter(new google.maps.LatLng(t,i)),this._map.setZoom(r))},n.prototype.DistanceFromSearchArea=function(n,t){if(!this._searchArea.getVisible())return 0;var i=new google.maps.LatLng(n,t);return this._searchArea.getBounds().contains(i)?google.maps.geometry.spherical.computeDistanceBetween(this._searchArea.getCenter(),i)/1e3:-1},n.prototype.SetLocations=function(n,t){var u=this,r=n.map(function(n){var t=new google.maps.Marker({position:n.Position,title:n.Title,icon:n.Icon});return u.BindInfoWindow(t,n),t}),i;this._markerClusterer!=null?(t&&this._markerClusterer.setStyles(t.styles),this._markerClusterer.clearMarkers(),this._markerClusterer.addMarkers(r,!1)):(i={imagePath:k,maxZoom:10,minimumClusterSize:this._options.MinClusterSize},t&&(i=t),this._markerClusterer=new MarkerClusterer(this._map,r,i))},n.prototype.ShowMarker=function(n,t){var i=this,r,u;return t===void 0&&(t=!0),r=!1,u=this._markerClusterer.getMarkers().filter(function(t){return t.getPosition().equals(n)}).forEach(function(u){t&&(i._map.getZoom()!=14||!i._map.getCenter().equals(n))&&(i._map.setZoom(14),i._map.setCenter(u.getPosition()),r=!0);google.maps.event.trigger(u,"click")}),r},n.prototype.ToggleLocationMarker=function(n,t){t?this._locationMarker==null?this._locationMarker=new google.maps.Marker({position:n,map:this._map,icon:b,title:"Current location",visible:!0}):(this._locationMarker.setPosition(n),this._locationMarker.setVisible(!0)):this._locationMarker!=null&&this._locationMarker.setVisible(!1)},n.prototype.BindInfoWindow=function(n,t){var i=this,r=this._map;google.maps.event.addListener(n,"click",function(){i._infoWindow.setContent(t.SummaryHtml);i._infoWindow.setOptions({maxWidth:300});i._infoWindow.open(r,n);i._onMarkerClicked(t.ID)})},n}(),u;n.GoogleMap=d;u=function(){function n(n,t,i,r,u,f,e,o,s){this._id=n;this._lat=t;this._lng=i;this._distance=r;this._title=u;this._summaryHtml=f;this._detailHtml=e;this._icon=o;this._availabelClassesCount=s}return Object.defineProperty(n.prototype,"ID",{get:function(){return this._id},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"Lat",{get:function(){return this._lat},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"Lng",{get:function(){return this._lng},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"Distance",{get:function(){return this._distance},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"Position",{get:function(){return new google.maps.LatLng(this._lat,this._lng)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"Title",{get:function(){return this._title},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"SummaryHtml",{get:function(){return this._summaryHtml},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"DetailHtml",{get:function(){return this._detailHtml},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"Icon",{get:function(){return this._icon},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"AvailabelClassesCount",{get:function(){return this._availabelClassesCount},enumerable:!0,configurable:!0}),n}();n.MapLocation=u})(t=n.SharedComponents||(n.SharedComponents={}))})(Netguides||(Netguides={})),function(n){var t;(function(n){var f=function(){function f(n,t){this._terminology=n;this._currencyOptions=t}return f.prototype.MapLocationFromVenue=function(t,i,r,u){i===void 0&&(i=0);r===void 0&&(r=!1);u===void 0&&(u=n.CourseType.OurClasses);return new Netguides.SharedComponents.MapLocation(t.VenueID,t.Latitude,t.Longitude,i,t.Name,this.GetSummaryHtml(t,i,u),this.GetDetailHtml(t,i,r,u),t.AvailabelClassesCount>0?"images/map/pinAvailable.png":"images/map/pinWaitlist.png",t.AvailabelClassesCount)},f.prototype.GetDetailHtml=function(t,i,r,u){return u===void 0&&(u=n.CourseType.OurClasses),t.TimeTable&&!r?'<div data-venue-id="'+t.VenueID+'" class="map-venue">\n                            <div class="map-venue-header '+this.GetAvailableVenueCss(t)+'">\n                                <h3>'+t.Name+'<\/h3>\n                                <p class="map-address">'+t.FullAddress+' - <strong><a href="tel:'+t.Telephone+'" class="map-contact-info" onclick="fbq(\'trackCustom\',\'classInquiryPhone\')">'+this.GetTerminology("Call")+" "+t.Telephone+"<a><\/strong><\/p>\n                                "+this.GetDistanceHtml(i)+"\n                            <\/div>\n                            "+this.GetTimetableHtml(t)+"\n                        <\/div>":this.GetSummaryHtml(t,i,u,r)},f.prototype.GetAvailableVenueCss=function(n){return n.AvailabelClassesCount>0?"map-available":"map-waitlist"},f.prototype.GetAvailableClassCss=function(n){return n.ClassAvailability==i.Available?"map-available":"map-waitlist"},f.prototype.GetSummaryHtml=function(t,i,r,u){return r===void 0&&(r=n.CourseType.OurClasses),u===void 0&&(u=!1),'<div data-venue-id="'+t.VenueID+'" class="map-venue">\n                        <div class="map-timetable-entry-flex">\n                            <div class="map-venue-header '+this.GetAvailableVenueCss(t)+'">\n                                <h4>'+t.Name+'<\/h4>\n                                <p class="map-address">'+t.FullAddress+'<\/p><span class="map-venue-telephone-inline"> - <strong><a href="tel:'+t.Telephone+'" class="map-contact-info" onclick="fbq(\'trackCustom\',\'classInquiryPhone\')">'+this.GetTerminology("Call")+" "+t.Telephone+"<\/a><\/strong><\/span>\n                                "+(u?this.GetDistanceHtml(i):"")+"\n                                "+(u||r!=n.CourseType.BirthdayParties?"":"<h4>"+t.BirthdayPartyTitle+"<\/h4>")+"\n                                "+(u||r!=n.CourseType.BirthdayParties?"":"<p>"+t.BirthdayPartyNotes+"<\/p>")+'\n                                <p class="map-venue-telephone">\n                                    '+this.GetTelephoneHtml(t)+"\n                                    "+this.GetEmailHtml(t)+"\n                                <\/p>\n                            <\/div>\n                            "+(u?this.GetEnquiryLink(t,r):"")+"\n                        <\/div>\n                    <\/div>"},f.prototype.GetDistanceHtml=function(n){return n>0?'<p data-distance="'+n.toFixed(2)+'"><strong>'+this.GetTerminology("Distance")+": <\/strong>"+n.toFixed(2)+" "+this.GetTerminology("Units")+"<\/p>":""},f.prototype.GetTimetableHtml=function(n){for(var i,u,s=n.FullAddress,e='<table class="map-timetable">\n                                            <thead>\n                                                <tr>\n                                                    <th class="map-timetable-entry-header-day">'+this.GetTerminology("Day")+"<\/th>\n                                                    <th>"+this.GetTerminology("Time")+"<\/th>\n                                                    <th>"+this.GetTerminology("Course")+"<\/th>\n                                                    <th>"+this.GetTerminology("AgeGroup")+"<\/th>\n                                                    <th>"+this.GetTerminology("Date")+'<\/th>\n                                                    <th class="map-timetable-entry-header-controls"><\/th>\n                                                <\/tr>\n                                            <\/thead>\n                                            <tbody>',f=0,o=n.TimeTable;f<o.length;f++)i=o[f],u=this.GetAgeRange(n,i),e+='<tr class="map-timetable-entry '+this.GetAvailableClassCss(i)+'">\n                                        <td>'+this.GetTerminology(r[i.RunningDay])+"<\/td>\n                                        <td>"+this.GetTimeDisplay(i)+"<\/td>\n                                        <td>"+i.ProductName+"<\/td>\n                                        <td>"+u+"<\/td>\n                                        <td>"+this.GetClassDate(n,i)+'<\/td>\n                                        <td>\n                                            <a data-toggle="collapse" data-parent="#results" href="#class-'+i.ClassID+'" role="button" class="btn" aria-expanded="false" aria-controls="results">'+this.GetTerminology("Details")+'<\/a>\n                                        <\/td>\n                                    <\/tr>\n                                    <tr class="map-timetable-entry map-timetable-entry-mobile '+this.GetAvailableClassCss(i)+'">\n                                        <td colspan="6">\n                                            <h2>'+i.ProductName+"<\/h2>\n                                            <p>"+this.GetFullTimeDisplay(n,i)+" "+u+'<\/p>\n                                            <a data-toggle="collapse" data-parent="#results" href="#class-'+i.ClassID+'" role="button" class="btn" aria-expanded="false" aria-controls="results">'+this.GetTerminology("Details")+'<\/a>\n                                        <\/td>\n                                    <\/tr>\n                                    <tr id="class-'+i.ClassID+'" class="map-timetable-entry-details collapse" role="tabpanel">\n                                        <td colspan="6">\n                                            <div class="map-timetable-entry-flex">\n                                                <div>\n                                                    <div class="map-timetable-entry-venue">\n                                                        <h2>'+n.Name+"<\/h2>\n                                                        <span>"+s+'<\/span>\n                                                    <\/div>\n                                                    <div class="map-timetable-entry-time">\n                                                        <span>'+this.GetFullTimeDisplay(n,i)+" "+i.ProductName+", "+u+"<\/span>\n                                                    <\/div>\n                                                    "+this.GetNurseryAttendText(n,i)+"\n                                                    "+this.GetPriceText(n,i)+"\n                                                    "+this.GetMembershipFeeText(n)+'\n                                                    <div class="map-timetable-entry-notes">\n                                                        '+(i.ProductType!=t.HolidayCourse&&i.Notes.length>0?"<span>"+i.Notes+"<\/span><br />":"")+"\n                                                        <p><strong>"+this.GetTerminology("Questions")+"<\/strong>"+this.GetTelephoneHtml(n)+this.GetEmailHtml(n)+"<\/p>\n                                                        "+this.GetClassFAQLink(n)+"\n                                                        "+this.GetEnrolmentFormLink(n,i)+'\n                                                    <\/div>\n                                                <\/div>\n                                                <div class="map-timetable-entry-options">\n                                                    '+this.GetEntryOptionsHtml(n,i)+"\n                                                <\/div>\n                                            <\/div>\n                                        <\/td>\n                                    <\/tr>";return e+"<\/tbody><\/table>"},f.prototype.GetEntryOptionsHtml=function(n,r){var u="",f,e,o;if(n.IsSalesForce)r.ClassAvailability==i.LimitedAvailability?u='<div class="map-timetable-entry-option">\n                                    <p>'+this.GetTerminology("LimitedAvailability")+"<\/p>\n                                    <p>"+this.GetTerminology("CallToBook")+"<\/p>\n                                <\/div>":r.ClassAvailability==i.Available&&(u='<a role="button" class="btn btn-lg btn-register" href="booking/start?clid='+r.ClassID+"&vid="+n.VenueID+'&btid=1">'+this.GetTerminology("RegisterNow")+"<\/a>"),u+='<a role="button" class="btn btn-lg btn-waitlist" href="booking/start?clid='+r.ClassID+"&vid="+n.VenueID+'&btid=2">'+this.GetTerminology("Waitlist")+"<\/a>";else if(r.ProductType==t.HolidayCourse)u+=this.GetHolidayEnrolmentFormLink(n,r);else if(r.ProgrammeOptions.filter(function(n){return n.OnlineEnrol}).length>0){for(f=0,e=r.ProgrammeOptions;f<e.length;f++)o=e[f],u+=this.GetEntryOptionHtml(n,r,o);u+='<a role="button" class="btn" href="bookinglogin?venue='+n.VenueID+"&Fran="+n.CompanyID+"&clid="+r.ClassID+"&cno=1&wait=1&pid="+r.ProgrammeOptions[0].ProductID+"&pn="+encodeURIComponent(r.ProductName)+'">'+this.GetTerminology("waitlist")+"<\/a>"}return u},f.prototype.GetEntryOptionHtml=function(n,t,i){var r=""+this.GetTerminology("CultureCurrencySymbol")+(i.Price%1?i.Price.toFixed(2):i.Price.toFixed(0)),u="";return u=i.FixedTerm?this.GetTerminology("SetCourse")+" "+r:i.Sessions===1?i.Sessions+" "+this.GetTerminology("Session")+" "+r:i.Sessions+" "+this.GetTerminology("Sessions")+" "+r,t.Spaces<1||!i.OnlineEnrol?'<span class="map-timetable-entry-option">'+u+"*<\/span>":'<a role="button" class="btn" href="bookinglogin?venue='+n.VenueID+"&Fran="+n.CompanyID+"&clid="+t.ClassID+"&cno=1&wait=0&pid="+i.ProductID+"&pn="+encodeURIComponent(t.ProductName)+'">'+u+"*<\/a>"},f.prototype.GetTelephoneHtml=function(n){return n.Telephone.length>0?'<br/><strong class="map-timetable-entry-contact-info"><a href="tel:'+n.Telephone+'" class="map-contact-info" onclick="fbq(\'trackCustom\',\'classInquiryPhone\')">'+this.GetTerminology("Call")+" "+n.Telephone+"<\/a><\/strong>":""},f.prototype.GetEmailHtml=function(n){return n.Email&&n.Email.length>0?'<br/><strong class="map-timetable-entry-contact-info"><a href="mailto:'+n.Email+'" class="map-contact-info" onclick="fbq(\'trackCustom\',\'classInquiryEmail\')">'+this.GetTerminology("Email")+" "+n.Email+"<\/a><\/strong>":""},f.prototype.GetTimeDisplay=function(n){var t=moment.utc(n.StartTime).format("hh:mm"),i=moment.utc(n.EndTime).format("hh:mma");return t+" - "+i},f.prototype.GetFullTimeDisplay=function(t,i){var o=moment.utc(i.StartTime).format("hh:mm"),s=moment.utc(i.EndTime).format("hh:mma"),u="",f,e;return(i.ProgrammeOptions&&i.ProgrammeOptions.length>0&&i.ProgrammeOptions[0].FixedTerm||t.IsSalesForce&&(i.ClassType==n.ClassType.SetTerm||i.ClassType==n.ClassType.NurserySchool))&&(f=moment.utc(i.StartDate).format("L"),e=moment.utc(i.EndDate).format("L"),u=" "+f+" - "+e),"<strong>"+this.GetTerminology(r[i.RunningDay])+" "+o+" - "+s+u+"<\/strong>"},f.prototype.GetAgeRange=function(n,i){return n.IsSalesForce?i.AgeRange==null?"":i.AgeRange:i.ProductType==t.HolidayCourse?i.Notes:n.IsSalesForce?i.AgeRange:this.GetTerminology(i.ProductName+"Ages")},f.prototype.GetClassDate=function(i,r){return i.IsSalesForce?r.ClassType==n.ClassType.SetTerm||r.ClassType==n.ClassType.NurserySchool?this.GetTerminology("SetCourse"):this.GetTerminology("Rolling"):r.ProductType==t.HolidayCourse?moment.utc(r.StartDate).format("L"):r.ProgrammeOptions[0].FixedTerm?this.GetTerminology("SetCourse"):this.GetTerminology("Rolling")},f.prototype.GetNurseryAttendText=function(t,i){return t.IsSalesForce&&i.ClassType==n.ClassType.NurserySchool?'<div class="map-timetable-entry-nursery">'+this.GetTerminology("NurseryAttend")+"<\/div>":""},f.prototype.GetPriceText=function(t,i){var e,s,r,h,f,o;return t.IsSalesForce?(e="",i.NoticePeriodFee>0&&(s=n.Utils.FormatSalesforcePrice(this._currencyOptions.NumberCulture,i.ClassCurrency,this._currencyOptions.CurrencySymbol,this._currencyOptions.CurrencyPositivePattern,i.NoticePeriodFee),e=", "+this.GetTerminology("NoticePeriodNote")+" "+s),r="",i.RegistrationFee>0&&(h=n.Utils.FormatSalesforcePrice(this._currencyOptions.NumberCulture,i.ClassCurrency,this._currencyOptions.CurrencySymbol,this._currencyOptions.CurrencyPositivePattern,i.RegistrationFee),r="(*"+this.GetTerminology("NewMemberNote")+" "+h+e+")"),f="",i.ClassType==n.ClassType.NurserySchool&&i.ClassPaidBy==u.Nursery?f=""+r:(o=n.Utils.FormatSalesforcePrice(this._currencyOptions.NumberCulture,i.ClassCurrency,this._currencyOptions.CurrencySymbol,this._currencyOptions.CurrencyPositivePattern,i.ProgrammeOptions[0].Price),f=i.ClassType==n.ClassType.SetTerm||i.ClassType==n.ClassType.NurserySchool?this.GetTerminology("Price")+" "+o+" "+r:this.GetTerminology("PricePerMonth")+" "+o+" "+r),'<div class="map-timetable-entry-price">\n                            <span><strong>'+f+"<\/strong><\/span>\n                        <\/div>"):""},f.prototype.GetMembershipFeeText=function(n){return n.IsSalesForce?"":'<div class="map-timetable-entry-membership">\n                            <span>*'+this.GetTerminology("GemaNewMemberNote")+" "+this.GetTerminology("CultureCurrencySymbol")+n.RegistrationFee+"<\/span>\n                        <\/div>"},f.prototype.GetTerminology=function(n){var t=n.charAt(0).toLowerCase()+n.slice(1);return t=t.replace(" ",""),this._terminology[t]},f.prototype.GetSessionsDisplay=function(n,t,i){var r=moment(n).format("Do MMM"),u=moment(t).format("Do MMM");return r+" - "+u+" / "+i+" "+this.GetTerminology(i>1?"Sessions":"Session")},f.prototype.GetClassFAQLink=function(n){return n.IsSalesForce?"":'<br/><a href="javascript:void(0)" onclick="_mapLoader.ShowClassInfo('+n.CompanyID+')">'+this.GetTerminology("ClassFAQ")+"<\/a>"},f.prototype.GetEnrolmentFormLink=function(n,i){return n.ShowEnrolmentFormLink&&i.ProductType!=t.HolidayCourse?'<br/><a href="publicenrolmentform?companyID='+n.CompanyID+'&useNewProcess=1" target="_blank" onclick="fbq(\'trackCustom\',\'enrolmentFormDownload\')">'+this.GetTerminology("ClickHere")+"<\/a> "+this.GetTerminology("DownloadEnrolmentForm"):""},f.prototype.GetHolidayEnrolmentFormLink=function(n,i){return i.ProductType==t.HolidayCourse?'<br/><a role="button" class="btn" href="publicenrolmentform?companyID='+n.CompanyID+"&useNewProcess=1&IsHoliday=1&ProductID="+i.ProgrammeOptions[0].ProductID+'" target="_blank" onclick="fbq(\'trackCustom\',\'enrolmentFormDownload\')">'+this.GetTerminology("Enquire")+"<\/a>":""},f.prototype.GetEnquiryLink=function(t,i){if(i===void 0&&(i=n.CourseType.OurClasses),t.IsSalesForce)return"";switch(i){case n.CourseType.BirthdayParties:return'<a role="button" class="btn" href="BirthdayPartyEnquiry?venueID='+t.VenueID+"&FranchiseID="+t.CompanyID+'">'+this.GetTerminology("Enquire")+"<\/a>";case n.CourseType.NurseryClasses:return'<a role="button" class="btn" href="NurseryEnquiry?venueID='+t.VenueID+"&FranchiseID="+t.CompanyID+'">'+this.GetTerminology("Enquire")+"<\/a>";default:return""}},f.prototype.GetStyle=function(n){return n==null||n.length==0?"hideTrial":""},f}(),r,t,u,i;n.MapUtils=f,function(n){n[n.Sunday=0]="Sunday";n[n.Monday=1]="Monday";n[n.Tuesday=2]="Tuesday";n[n.Wednesday=3]="Wednesday";n[n.Thursday=4]="Thursday";n[n.Friday=5]="Friday";n[n.Saturday=6]="Saturday";n[n.Weekday=8]="Weekday";n[n.Weekend=9]="Weekend";n[n.All=10]="All"}(r=n.DayOfWeek||(n.DayOfWeek={})),function(n){n[n.JuniorKickers=1]="JuniorKickers";n[n.MightyKickers=2]="MightyKickers";n[n.LittleKicks=8]="LittleKicks";n[n.MegaKickers=9]="MegaKickers";n[n.HolidayCourse=14]="HolidayCourse"}(t=n.ProductType||(n.ProductType={})),function(n){n[n.Nursery=1]="Nursery";n[n.Customer=2]="Customer"}(u=n.ClassPaidBy||(n.ClassPaidBy={})),function(n){n[n.None=0]="None";n[n.Available=1]="Available";n[n.Ended=2]="Ended";n[n.Full=3]="Full";n[n.LimitedAvailability=4]="LimitedAvailability"}(i=n.ClassAvailability||(n.ClassAvailability={}))})(t=n.Public||(n.Public={}))}(LittleKickers||(LittleKickers={}));ClusterIcon.prototype.onAdd=function(){var t,i,n=this;this.div_=document.createElement("div");this.div_.className=this.className_;this.visible_&&this.show();this.getPanes().overlayMouseTarget.appendChild(this.div_);this.boundsChangedListener_=google.maps.event.addListener(this.getMap(),"bounds_changed",function(){i=t});google.maps.event.addDomListener(this.div_,"mousedown",function(){t=!0;i=!1});google.maps.event.addDomListener(this.div_,"click",function(r){if(t=!1,!i){var e,f,u=n.cluster_.getMarkerClusterer();google.maps.event.trigger(u,"click",n.cluster_);google.maps.event.trigger(u,"clusterclick",n.cluster_);u.getZoomOnClick()&&(f=u.getMaxZoom(),e=n.cluster_.getBounds(),u.getMap().fitBounds(e),setTimeout(function(){u.getMap().fitBounds(e);null!==f&&u.getMap().getZoom()>f&&u.getMap().setZoom(f+1)},100));r.cancelBubble=!0;r.stopPropagation&&r.stopPropagation()}});google.maps.event.addDomListener(this.div_,"mouseover",function(){var t=n.cluster_.getMarkerClusterer();google.maps.event.trigger(t,"mouseover",n.cluster_)});google.maps.event.addDomListener(this.div_,"mouseout",function(){var t=n.cluster_.getMarkerClusterer();google.maps.event.trigger(t,"mouseout",n.cluster_)})};ClusterIcon.prototype.onRemove=function(){this.div_&&this.div_.parentNode&&(this.hide(),google.maps.event.removeListener(this.boundsChangedListener_),google.maps.event.clearInstanceListeners(this.div_),this.div_.parentNode.removeChild(this.div_),this.div_=null)};ClusterIcon.prototype.draw=function(){if(this.visible_){var n=this.getPosFromLatLng_(this.center_);this.div_.style.top=n.y+"px";this.div_.style.left=n.x+"px"}};ClusterIcon.prototype.hide=function(){this.div_&&(this.div_.style.display="none");this.visible_=!1};ClusterIcon.prototype.show=function(){if(this.div_){var n="",r=this.backgroundPosition_.split(" "),t=parseInt(r[0].trim(),10),i=parseInt(r[1].trim(),10),u=this.getPosFromLatLng_(this.center_);this.div_.style.cssText=this.createCss(u);n="<img src='"+this.url_+"' style='position: absolute; top: "+i+"px; left: "+t+"px; ";n+=this.cluster_.getMarkerClusterer().enableRetinaIcons_?"width: "+this.width_+"px;height: "+this.height_+"px;":"clip: rect("+-1*i+"px, "+(-1*t+this.width_)+"px, "+(-1*i+this.height_)+"px, "+-1*t+"px);";n+="'>";this.div_.innerHTML=n+"<div style='position: absolute;top: "+this.anchorText_[0]+"px;left: "+this.anchorText_[1]+"px;color: "+this.textColor_+";font-size: "+this.textSize_+"px;font-family: "+this.fontFamily_+";font-weight: "+this.fontWeight_+";font-style: "+this.fontStyle_+";text-decoration: "+this.textDecoration_+";text-align: center;width: "+this.width_+"px;line-height:"+this.height_+"px;'>"+(this.cluster_.hideLabel_?" ":this.sums_.text)+"<\/div>";this.div_.title="undefined"==typeof this.sums_.title||""===this.sums_.title?this.cluster_.getMarkerClusterer().getTitle():this.sums_.title;this.div_.style.display=""}this.visible_=!0};ClusterIcon.prototype.useStyle=function(n){var i,t;this.sums_=n;i=Math.max(0,n.index-1);i=Math.min(this.styles_.length-1,i);t=this.styles_[i];this.url_=t.url;this.height_=t.height;this.width_=t.width;this.anchorText_=t.anchorText||[0,0];this.anchorIcon_=t.anchorIcon||[parseInt(this.height_/2,10),parseInt(this.width_/2,10)];this.textColor_=t.textColor||"black";this.textSize_=t.textSize||11;this.textDecoration_=t.textDecoration||"none";this.fontWeight_=t.fontWeight||"bold";this.fontStyle_=t.fontStyle||"normal";this.fontFamily_=t.fontFamily||"Arial,sans-serif";this.backgroundPosition_=t.backgroundPosition||"0 0"};ClusterIcon.prototype.setCenter=function(n){this.center_=n};ClusterIcon.prototype.createCss=function(n){var t=[];return t.push("cursor: pointer;"),t.push("position: absolute; top: "+n.y+"px; left: "+n.x+"px;"),t.push("width: "+this.width_+"px; height: "+this.height_+"px;"),t.join("")};ClusterIcon.prototype.getPosFromLatLng_=function(n){var t=this.getProjection().fromLatLngToDivPixel(n);return t.x-=this.anchorIcon_[1],t.y-=this.anchorIcon_[0],t.x=parseInt(t.x,10),t.y=parseInt(t.y,10),t};Cluster.prototype.getSize=function(){return this.markers_.length};Cluster.prototype.getMarkers=function(){return this.markers_};Cluster.prototype.getCenter=function(){return this.center_};Cluster.prototype.getMap=function(){return this.map_};Cluster.prototype.getMarkerClusterer=function(){return this.markerClusterer_};Cluster.prototype.getBounds=function(){for(var t=new google.maps.LatLngBounds(this.center_,this.center_),i=this.getMarkers(),n=0;n<i.length;n++)t.extend(i[n].getPosition());return t};Cluster.prototype.remove=function(){this.clusterIcon_.setMap(null);this.markers_=[];delete this.markers_};Cluster.prototype.addMarker=function(n){var t,i,u;if(this.isMarkerAlreadyAdded_(n))return!1;if(this.center_){if(this.averageCenter_){var r=this.markers_.length+1,f=(this.center_.lat()*(r-1)+n.getPosition().lat())/r,e=(this.center_.lng()*(r-1)+n.getPosition().lng())/r;this.center_=new google.maps.LatLng(f,e);this.calculateBounds_()}}else this.center_=n.getPosition(),this.calculateBounds_();if(n.isAdded=!0,this.markers_.push(n),i=this.markers_.length,u=this.markerClusterer_.getMaxZoom(),null!==u&&this.map_.getZoom()>u)n.getMap()!==this.map_&&n.setMap(this.map_);else if(i<this.minClusterSize_)n.getMap()!==this.map_&&n.setMap(this.map_);else if(i===this.minClusterSize_)for(t=0;i>t;t++)this.markers_[t].setMap(null);else n.setMap(null);return!0};Cluster.prototype.isMarkerInClusterBounds=function(n){return this.bounds_.contains(n.getPosition())};Cluster.prototype.calculateBounds_=function(){var n=new google.maps.LatLngBounds(this.center_,this.center_);this.bounds_=this.markerClusterer_.getExtendedBounds(n)};Cluster.prototype.updateIcon_=function(){var r=this.markers_.length,n=this.markerClusterer_.getMaxZoom(),t,i;if(null!==n&&this.map_.getZoom()>n||r<this.minClusterSize_)return void this.clusterIcon_.hide();t=this.markerClusterer_.getStyles().length;i=this.markerClusterer_.getCalculator()(this.markers_,t);this.clusterIcon_.setCenter(this.center_);this.clusterIcon_.useStyle(i);this.clusterIcon_.show()};Cluster.prototype.isMarkerAlreadyAdded_=function(n){for(var t=0,i=this.markers_.length;i>t;t++)if(n===this.markers_[t])return!0;return!1};MarkerClusterer.prototype.onAdd=function(){var n=this;this.activeMap_=this.getMap();this.ready_=!0;this.repaint();this.listeners_=[google.maps.event.addListener(this.getMap(),"zoom_changed",function(){n.resetViewport_(!1);(this.getZoom()===(this.get("minZoom")||0)||this.getZoom()===this.get("maxZoom"))&&google.maps.event.trigger(this,"idle")}),google.maps.event.addListener(this.getMap(),"idle",function(){n.redraw_()})]};MarkerClusterer.prototype.onRemove=function(){for(var n=0;n<this.markers_.length;n++)this.markers_[n].getMap()!==this.activeMap_&&this.markers_[n].setMap(this.activeMap_);for(n=0;n<this.clusters_.length;n++)this.clusters_[n].remove();for(this.clusters_=[],n=0;n<this.listeners_.length;n++)google.maps.event.removeListener(this.listeners_[n]);this.listeners_=[];this.activeMap_=null;this.ready_=!1};MarkerClusterer.prototype.draw=function(){};MarkerClusterer.prototype.setupStyles_=function(){var n,t;if(!(this.styles_.length>0))for(n=0;n<this.imageSizes_.length;n++)t=this.imageSizes_[n],this.styles_.push({url:this.imagePath_+(n+1)+"."+this.imageExtension_,height:t,width:t})};MarkerClusterer.prototype.fitMapToMarkers=function(){for(var t=this.getMarkers(),i=new google.maps.LatLngBounds,n=0;n<t.length;n++)i.extend(t[n].getPosition());this.getMap().fitBounds(i)};MarkerClusterer.prototype.getGridSize=function(){return this.gridSize_};MarkerClusterer.prototype.setGridSize=function(n){this.gridSize_=n};MarkerClusterer.prototype.getMinimumClusterSize=function(){return this.minClusterSize_};MarkerClusterer.prototype.setMinimumClusterSize=function(n){this.minClusterSize_=n};MarkerClusterer.prototype.getMaxZoom=function(){return this.maxZoom_};MarkerClusterer.prototype.setMaxZoom=function(n){this.maxZoom_=n};MarkerClusterer.prototype.getStyles=function(){return this.styles_};MarkerClusterer.prototype.setStyles=function(n){this.styles_=n};MarkerClusterer.prototype.getTitle=function(){return this.title_};MarkerClusterer.prototype.setTitle=function(n){this.title_=n};MarkerClusterer.prototype.getZoomOnClick=function(){return this.zoomOnClick_};MarkerClusterer.prototype.setZoomOnClick=function(n){this.zoomOnClick_=n};MarkerClusterer.prototype.getAverageCenter=function(){return this.averageCenter_};MarkerClusterer.prototype.setAverageCenter=function(n){this.averageCenter_=n};MarkerClusterer.prototype.getIgnoreHidden=function(){return this.ignoreHidden_};MarkerClusterer.prototype.setIgnoreHidden=function(n){this.ignoreHidden_=n};MarkerClusterer.prototype.getEnableRetinaIcons=function(){return this.enableRetinaIcons_};MarkerClusterer.prototype.setEnableRetinaIcons=function(n){this.enableRetinaIcons_=n};MarkerClusterer.prototype.getImageExtension=function(){return this.imageExtension_};MarkerClusterer.prototype.setImageExtension=function(n){this.imageExtension_=n};MarkerClusterer.prototype.getImagePath=function(){return this.imagePath_};MarkerClusterer.prototype.setImagePath=function(n){this.imagePath_=n};MarkerClusterer.prototype.getImageSizes=function(){return this.imageSizes_};MarkerClusterer.prototype.setImageSizes=function(n){this.imageSizes_=n};MarkerClusterer.prototype.getCalculator=function(){return this.calculator_};MarkerClusterer.prototype.setCalculator=function(n){this.calculator_=n};MarkerClusterer.prototype.setHideLabel=function(n){this.hideLabel_=n};MarkerClusterer.prototype.getHideLabel=function(){return this.hideLabel_};MarkerClusterer.prototype.getBatchSizeIE=function(){return this.batchSizeIE_};MarkerClusterer.prototype.setBatchSizeIE=function(n){this.batchSizeIE_=n};MarkerClusterer.prototype.getClusterClass=function(){return this.clusterClass_};MarkerClusterer.prototype.setClusterClass=function(n){this.clusterClass_=n};MarkerClusterer.prototype.getMarkers=function(){return this.markers_};MarkerClusterer.prototype.getTotalMarkers=function(){return this.markers_.length};MarkerClusterer.prototype.getClusters=function(){return this.clusters_};MarkerClusterer.prototype.getTotalClusters=function(){return this.clusters_.length};MarkerClusterer.prototype.addMarker=function(n,t){this.pushMarkerTo_(n);t||this.redraw_()};MarkerClusterer.prototype.addMarkers=function(n,t){for(var i in n)n.hasOwnProperty(i)&&this.pushMarkerTo_(n[i]);t||this.redraw_()};MarkerClusterer.prototype.pushMarkerTo_=function(n){if(n.getDraggable()){var t=this;google.maps.event.addListener(n,"dragend",function(){t.ready_&&(this.isAdded=!1,t.repaint())})}n.isAdded=!1;this.markers_.push(n)};MarkerClusterer.prototype.removeMarker=function(n,t,i){var u=!0&&!i,r=this.removeMarker_(n,u);return!t&&r&&this.repaint(),r};MarkerClusterer.prototype.removeMarkers=function(n,t,i){for(var f,u=!1,e=!0&&!i,r=0;r<n.length;r++)f=this.removeMarker_(n[r],e),u=u||f;return!t&&u&&this.repaint(),u};MarkerClusterer.prototype.removeMarker_=function(n,t){var i,r=-1;if(this.markers_.indexOf)r=this.markers_.indexOf(n);else for(i=0;i<this.markers_.length;i++)if(n===this.markers_[i]){r=i;break}return-1===r?!1:(t&&n.setMap(null),this.markers_.splice(r,1),!0)};MarkerClusterer.prototype.clearMarkers=function(){this.resetViewport_(!0);this.markers_=[]};MarkerClusterer.prototype.repaint=function(){var n=this.clusters_.slice();this.clusters_=[];this.resetViewport_(!1);this.redraw_();setTimeout(function(){for(var t=0;t<n.length;t++)n[t].remove()},0)};MarkerClusterer.prototype.getExtendedBounds=function(n){var t=this.getProjection(),e=new google.maps.LatLng(n.getNorthEast().lat(),n.getNorthEast().lng()),o=new google.maps.LatLng(n.getSouthWest().lat(),n.getSouthWest().lng()),r=t.fromLatLngToDivPixel(e),i,u,f;return r.x+=this.gridSize_,r.y-=this.gridSize_,i=t.fromLatLngToDivPixel(o),i.x-=this.gridSize_,i.y+=this.gridSize_,u=t.fromDivPixelToLatLng(r),f=t.fromDivPixelToLatLng(i),n.extend(u),n.extend(f),n};MarkerClusterer.prototype.redraw_=function(){this.createClusters_(0)};MarkerClusterer.prototype.resetViewport_=function(n){for(var i,t=0;t<this.clusters_.length;t++)this.clusters_[t].remove();for(this.clusters_=[],t=0;t<this.markers_.length;t++)i=this.markers_[t],i.isAdded=!1,n&&i.setMap(null)};MarkerClusterer.prototype.distanceBetweenPoints_=function(n,t){var i=(t.lat()-n.lat())*Math.PI/180,r=(t.lng()-n.lng())*Math.PI/180,u=Math.sin(i/2)*Math.sin(i/2)+Math.cos(n.lat()*Math.PI/180)*Math.cos(t.lat()*Math.PI/180)*Math.sin(r/2)*Math.sin(r/2),f=2*Math.atan2(Math.sqrt(u),Math.sqrt(1-u));return 6371*f};MarkerClusterer.prototype.isMarkerInBounds_=function(n,t){return t.contains(n.getPosition())};MarkerClusterer.prototype.addToClosestCluster_=function(n){for(var u,t,f,e=4e4,r=null,i=0;i<this.clusters_.length;i++)t=this.clusters_[i],f=t.getCenter(),f&&(u=this.distanceBetweenPoints_(f,n.getPosition()),e>u&&(e=u,r=t));r&&r.isMarkerInClusterBounds(n)?r.addMarker(n):(t=new Cluster(this),t.addMarker(n),this.clusters_.push(t))};MarkerClusterer.prototype.createClusters_=function(n){var t,i,u,e=this,f,r;if(this.ready_){for(0===n&&(google.maps.event.trigger(this,"clusteringbegin",this),"undefined"!=typeof this.timerRefStatic&&(clearTimeout(this.timerRefStatic),delete this.timerRefStatic)),u=this.getMap().getZoom()>3?new google.maps.LatLngBounds(this.getMap().getBounds().getSouthWest(),this.getMap().getBounds().getNorthEast()):new google.maps.LatLngBounds(new google.maps.LatLng(85.020707717434718,-178.48388434375),new google.maps.LatLng(-85.081364443845445,178.00048865625)),f=this.getExtendedBounds(u),r=Math.min(n+this.batchSize_,this.markers_.length),t=n;r>t;t++)i=this.markers_[t],!i.isAdded&&this.isMarkerInBounds_(i,f)&&(!this.ignoreHidden_||this.ignoreHidden_&&i.getVisible())&&this.addToClosestCluster_(i);if(r<this.markers_.length)this.timerRefStatic=setTimeout(function(){e.createClusters_(r)},0);else for(delete this.timerRefStatic,google.maps.event.trigger(this,"clusteringend",this),t=0;t<this.clusters_.length;t++)this.clusters_[t].updateIcon_()}};MarkerClusterer.prototype.extend=function(n,t){return function(n){for(var t in n.prototype)this.prototype[t]=n.prototype[t];return this}.apply(n,[t])};MarkerClusterer.CALCULATOR=function(n,t){for(var i=0,u=n.length.toString(),r=u;0!==r;)r=parseInt(r/10,10),i++;return i=Math.min(i,t),{text:u,index:i,title:""}};MarkerClusterer.BATCH_SIZE=2e3;MarkerClusterer.BATCH_SIZE_IE=500;MarkerClusterer.IMAGE_PATH="//cdn.rawgit.com/mahnunchik/markerclustererplus/master/images/m";MarkerClusterer.IMAGE_EXTENSION="png";MarkerClusterer.IMAGE_SIZES=[53,56,66,78,90];"function"!=typeof String.prototype.trim&&(String.prototype.trim=function(){return this.replace(/^\s+|\s+$/g,"")}),function(n){var t;(function(t){var r=function(){function t(t,i,r,u){this.KILOMETRES_TO_MILES=.62137119;this.MAX_VENUES_FOR_DETAILS=25;this.MAX_ZOOM_FOR_DETAILS=9;this.SEARCH_PARAMETERS_STORAGE_KEY="lkMapSearchParameters";this.HOLIDAY_COURSE_PRODUCT_ID=14;this._isShowingSummary=!0;this._isMarkerClick=!1;this._isZooming=!1;this._zoomChangedMapPosition=!1;this._setSearchArea=!1;this._mapOptions=i;this._mapControls=r;this._currencyOptions=u;this._terminology={loading:t.loading||"Loading...",error:t.error||"Unfortunately and error has occurred.",day:t.day||"DAY",time:t.time||"TIME",course:t.course||"COURSE",ageGroup:t.ageGroup||"AGE GROUP",date:t.date||"DATE",rolling:t.rolling||"Rolling",registerNow:t.registerNow||"Register Now",details:t.details||"Details",fullTerm:t.fullTerm||"Full Term",setCourse:t.setCourse||"Set Course",session:t.session||"session",sessions:t.sessions||"sessions",waitlist:t.waitlist||"Wailtlist",limitedAvailability:t.limitedAvailability||"Limited Availability",littleKicks:t.littleKicks||"Little Kicks",juniorKickers:t.juniorKickers||"Junior Kickers",mightyKickers:t.mightyKickers||"Mighty Kickers",megaKickers:t.megaKickers||"Mega Kickers",littleKicksAges:t.littleKicksAges||"18 mths - 2 yrs 3 mths",juniorKickersAges:t.juniorKickersAges||"2 yrs - 3 1/2 yrs",mightyKickersAges:t.mightyKickersAges||"3 1/2 yrs - 5th birthday",megaKickersAges:t.megaKickersAges||"5th - 7th birthday",membershipFee:t.membershipFee||"Membership Fee",newMemberNote:t.newMemberNote||"*New members will be charged a one of members fee and notice period",noticePeriodNote:t.noticePeriodNote||"a notice period fee of",gemaNewMemberNote:t.gemaNewMemberNote||"*New members will be charged a one of members fee of",pricePerMonth:t.pricePerMonth||"Price per Month",price:t.Price||"Price",enquire:t.enquire||"Enquire",questions:t.questions||"Questions?",call:t.call||"Call",email:t.email||"Email",classFAQ:t.classFAQ||"Class Infomation & FAQs",clickHere:t.clickHere||"Click here",downloadEnrolmentForm:t.downloadEnrolmentForm||"to download an enrolment form and view prices",cultureCurrencySymbol:t.cultureCurrencySymbol||"£",distance:t.distance||"Distance",units:t.units||"miles",monday:t.monday||"Monday",tuesday:t.tuesday||"Tuesday",wednesday:t.wednesday||"Wednesday",thursday:t.thursday||"Thursday",friday:t.friday||"Friday",saturday:t.saturday||"Saturday",sunday:t.sunday||"Sunday",nurseryAttend:t.nurseryAttend||"",callToBook:t.callToBook||"Call to book",noMapResults:t.noMapResults||"No Results"};this._mapUtils=new n.Public.MapUtils(this._terminology,this._currencyOptions)}return t.prototype.SetupMap=function(){var n=this;moment.locale(this._mapOptions.LanguageTag);this._map=new Netguides.SharedComponents.GoogleMap(this._mapOptions);this._map.Load();this._map.OnIdle(function(){return n.ReloadVenues(!1,!0)});this._map.OnMarkerClicked(function(t){n._isZooming||(n._isZooming=!0,n.ZoomToVenue(t));location.hash="#venue-"+t;var i=$(".map-results"),r=i.find("[data-venue-id='"+t+"']").position();i.scrollTop(i.scrollTop()+r.top);n._isMarkerClick=!0});this.LoadSearchParameters();document.getElementById("results").addEventListener("click",function(t){return n.$ResultsClicked(t)});this._mapControls.courseTypeSelector.change(function(t){n.SetCourseType(parseInt($(t.target).val().toString()));n.ReloadVenues(!1)});this._mapControls.ageRangeSelector.change(function(){return n.ReloadVenues(!1)});this._mapControls.daysSelector.add_itemChecked(function(){return n.ReloadVenues(!1)});this._mapControls.distanceSelector.change(function(){return n.ReloadVenues(!0)})},t.prototype.ReloadVenues=function(n,t){var r=this,i;if(t===void 0&&(t=!1),t&&this._setSearchArea){this._setSearchArea=!1;return}if(n){this._setSearchArea=n;i=this.SaveSearchParameters();this.ToggleLoadingSpinner(!0);this._map.SetSearchArea(i.location,i.distance,!1,function(){r.ReloadVenues(!1)},!1,!0);return}if(this._zoomChangedMapPosition){this._zoomChangedMapPosition=!1;return}if(this._isMarkerClick){this._isMarkerClick=!1;return}this._map.TotalVisibleMarkers<this.MAX_VENUES_FOR_DETAILS||this._map.ZoomLevel>=this.MAX_ZOOM_FOR_DETAILS?(this.ToggleLoadingSpinner(!0),this.IsEnquiry?this.FetchVenues():this.FetchVenuesWithTimetable()):(this.ToggleLoadingSpinner(!0),this.FetchVenues())},t.prototype.ShowClassInfo=function(n){var t=this;$("#class-info-modal .modal-content").text(this._terminology.loading);$("#class-info-modal .overlay").addClass("show");$("body").addClass("modal");$.getJSON("/api/v1/map/classInformation/"+n,function(n){$("#class-info-modal .modal-content").html(n)}).fail(function(){$("#class-info-modal .modal-content").text(t._terminology.error)})},t.prototype.HideClassInfo=function(){$("body").removeClass("modal");$("#class-info-modal .overlay").removeClass("show");this._isMarkerClick=!0},t.prototype.FetchVenues=function(){var n=this;this._request&&this._request.readyState!=4&&this._request.abort();this._request=$.ajax({type:"POST",url:"/api/v1/map/venues",contentType:"application/json; charset=utf-8",dataType:"json",data:this.GetMapQuery(!1),success:function(t){n._allVenues=t;n.ToggleSummaryView(!0);n.Search()}}).fail(function(t,i){i!="abort"&&(console.log(t.responseText),n.ToggleLoadingSpinner(!1))})},t.prototype.FetchVenuesWithTimetable=function(){var n=this;this._request&&this._request.readyState!=4&&this._request.abort();this._request=$.ajax({type:"POST",url:"/api/v1/map/venuesWithTimetable",contentType:"application/json; charset=utf-8",dataType:"json",data:this.GetMapQuery(!0),success:function(t){n._allVenues=t;n.ToggleSummaryView(t.length>n.MAX_VENUES_FOR_DETAILS);n.Search()}}).fail(function(t,i){i!="abort"&&(console.log(t.responseText),n.ToggleLoadingSpinner(!1))})},t.prototype.GetDays=function(){for(var r,t=[],n=0,i=this._mapControls.daysSelector.get_checkedItems();n<i.length;n++)r=i[n],t.push(parseInt(r.get_value()));return t},t.prototype.SetDays=function(n){for(var e,t,r,o,u=this._mapControls.daysSelector,i=0,f=u.get_items().toArray();i<f.length;i++)e=f[i],e.set_selected(!1);for(t=0,r=n;t<r.length;t++)o=r[t],u.findItemByValue(o.toString()).set_selected(!0)},t.prototype.GetMapQuery=function(n){var f=this._mapControls.daysSelector,r=this.GetDays(),t,u;r.length===0&&r.push(0,1,2,3,4,5,6);t=0;switch(this._courseType){case i.HolidayCourses:t=this.HOLIDAY_COURSE_PRODUCT_ID;break;case i.OurClasses:t=parseInt(this._mapControls.ageRangeSelector.val().toString())||0}return u={ProductType:t,Days:r,MapBounds:n&&this._map?this._map.Bounds:null,CountryID:this._mapOptions.CountryID,Country:this._mapOptions.Country,BirthdaysOnly:this._courseType==i.BirthdayParties,NurseriesOnly:this._courseType==i.NurseryClasses},JSON.stringify(u)},t.prototype.Search=function(){var n=this;this.SaveSearchParameters();this._currentVenues=this._allVenues.map(function(t){var i=n._map.DistanceFromSearchArea(t.Latitude,t.Longitude)*n.KILOMETRES_TO_MILES;return n._mapUtils.MapLocationFromVenue(t,i,n._isShowingSummary,n._courseType)});this._map.SetLocations(this._currentVenues);this.RefreshResults()},t.prototype.RefreshResults=function(){var n=this;setTimeout(function(){for(var i=document.getElementById("results"),r,e,o,t;i.firstChild;)i.removeChild(i.firstChild);var u=document.createDocumentFragment(),f=n._currentVenues.filter(function(t){return n._map.BoundsContains(t.Lat,t.Lng)}),f=f.sort(n.SortByDistance);for(r=0,e=f;r<e.length;r++)o=e[r],t=document.createElement("div"),t.innerHTML=o.DetailHtml,u.appendChild(t.firstChild);f.length===0&&(t=document.createElement("div"),t.innerHTML='<div class="map-no-results">'+n._terminology.noMapResults+"<\/div>",u.appendChild(t.firstChild));i.appendChild(u);n.ToggleLoadingSpinner(!1)},0)},t.prototype.$ResultsClicked=function(n){var t=$(n.srcElement).closest(".map-venue").data("venue-id").toString();this.ZoomToVenue(t)},t.prototype.ZoomToVenue=function(n){var t;n&&(t=this._currentVenues.find(function(t){return t.ID===n}));t&&(this._isZooming=!0,this._zoomChangedMapPosition=this._map.ShowMarker(t.Position,this._isShowingSummary));this._isShowingSummary&&t&&(this.IsEnquiry?this.RefreshResults():(this.ToggleLoadingSpinner(!0),this.FetchVenuesWithTimetable(),this._zoomChangedMapPosition=this._map.ShowMarker(t.Position,this._isShowingSummary)));this._isZooming=!1},t.prototype.SortByDistance=function(n,t){var i=n.AvailabelClassesCount>0,r=t.AvailabelClassesCount>0;return i===r&&n.Distance===t.Distance?0:i===r?t.Distance<0?-1:n.Distance<0?1:n.Distance>t.Distance?1:-1:i?-1:1},t.prototype.ToggleLoadingSpinner=function(n){$(".map-overlay").toggle(n)},t.prototype.ToggleSummaryView=function(n){this._isShowingSummary=n;$(".map-results").toggleClass("summary",n)},t.prototype.SaveSearchParameters=function(){var n=this._map?this._map.Center.toJSON():{lat:0,lng:0},i=this.GetDays(),t={mapZoom:this._map?this._map.ZoomLevel:0,mapLat:n.lat,mapLng:n.lng,courseTypeID:parseInt(this._mapControls.courseTypeSelector.val().toString()),days:i,productID:parseInt(this._mapControls.ageRangeSelector.val().toString()),location:this._mapControls.locationTextBox.val().toString(),distance:parseInt(this._mapControls.distanceSelector.val().toString())};return sessionStorage.setItem(this.SEARCH_PARAMETERS_STORAGE_KEY,JSON.stringify(t)),t},t.prototype.LoadSearchParameters=function(){var n=JSON.parse(sessionStorage.getItem(this.SEARCH_PARAMETERS_STORAGE_KEY));n==null&&(n=this.SaveSearchParameters());n.mapZoom&&(this._map.ZoomLevel=n.mapZoom);this._map.SetCenter(n.mapLat,n.mapLng);this.SetCourseType(n.courseTypeID);this._mapControls.courseTypeSelector.val(n.courseTypeID);this.SetDays(n.days);this._mapControls.ageRangeSelector.val(n.productID);this._mapControls.locationTextBox.val(n.location);this._mapControls.distanceSelector.val(n.distance)},t.prototype.SetCourseType=function(n){this._courseType=n;switch(n){case i.OurClasses:this._mapControls.daysPanel.show();this._mapControls.ageRangesPanel.show();break;case i.NurseryClasses:this._mapControls.daysPanel.show();this._mapControls.ageRangesPanel.hide();break;case i.BirthdayParties:this._mapControls.daysPanel.hide();this._mapControls.ageRangesPanel.hide();break;case i.HolidayCourses:this._mapControls.daysPanel.show();this._mapControls.ageRangesPanel.hide()}},Object.defineProperty(t.prototype,"IsEnquiry",{get:function(){return this._courseType==i.BirthdayParties},enumerable:!0,configurable:!0}),t}(),i;t.MapLoader=r,function(n){n[n.OurClasses=1]="OurClasses";n[n.NurseryClasses=2]="NurseryClasses";n[n.BirthdayParties=3]="BirthdayParties";n[n.HolidayCourses=4]="HolidayCourses"}(i=t.CourseType||(t.CourseType={}))})(t=n.Public||(n.Public={}))}(LittleKickers||(LittleKickers={})),function(n){var t;(function(n){var t=function(){function n(){}return n.FormatSalesforcePrice=function(n,t,i,r,u){var f=new Intl.NumberFormat(n,{style:"currency",currency:t}).format(u);return i&&t&&f.indexOf(t)>-1&&(r?(f=f.replace(t,""),f=r==0||r==2?i+f:f+i):f.replace(t,i)),f},n}(),i;n.Utils=t,function(n){n[n.None=0]="None";n[n.BirthdayParty=1]="BirthdayParty";n[n.HolidayCamp=2]="HolidayCamp";n[n.MonthlyRecurring=3]="MonthlyRecurring";n[n.NurserySchool=4]="NurserySchool";n[n.SetTerm=5]="SetTerm"}(i=n.ClassType||(n.ClassType={}))})(t=n.Public||(n.Public={}))}(LittleKickers||(LittleKickers={}))