/*! cresa-ui - 1.0.39 */!function(e){function t(t){for(var n,i,s=t[0],l=t[1],c=t[2],p=0,d=[];p2&&void 0!==arguments[2]&&arguments[2];this.currentPageNumber=e;var a=this.calculatePages(e,{min:1,total:t});this.updateCurrentPageIndicator(e,t),this.domRef.innerHTML=this.getTemplate(e,a,t)},e.prototype.calculatePages=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},a=t.min,n=void 0===a?1:a,r=t.total,o=void 0===r?20:r,i=t.length,s=void 0===i?5:i;s>o&&(s=o);var l=e-Math.floor(s/2);return l=Math.max(l,n),l=Math.min(l,n+o-s),Array.from({length:s},function(e,t){return l+t})},e.prototype.getTemplate=function(e,t,a){return'
    \n \n
  1. ‹ Previous
  2. \n \n '+t.map(function(t,a){return'
  3. '+t+"
  4. "}).join("")+'\n \n
  5. Next ›
  6. \n
'},e.prototype.onPaginationClicked=function(e){e.preventDefault();var t=e.target.getAttribute("data-page");return t&&this.goto(t),!1},e.prototype.initCurrentPageIndicator=function(){var t=document.getElementsByClassName(e.CurrentPageIndicatorClassName);t&&(this.currentPageIndicators=t)},e.prototype.clearCurrentPageIndicators=function(){var e=this.currentPageIndicators,t=Array.isArray(e),a=0;for(e=t?e:e[Symbol.iterator]();;){var n;if(t){if(a>=e.length)break;n=e[a++]}else{if((a=e.next()).done)break;n=a.value}n.innerHTML=""}},e.prototype.updateCurrentPageIndicator=function(e,t){if(this.currentPageIndicators||this.initCurrentPageIndicator(),this.currentPageIndicators&&this.currentPageIndicators.length>0){var a=this.currentPageIndicators,n=Array.isArray(a),r=0;for(a=n?a:a[Symbol.iterator]();;){var o;if(n){if(r>=a.length)break;o=a[r++]}else{if((r=a.next()).done)break;o=r.value}o.innerHTML="Page "+e+" of "+t}}},e}(),s=a("./scripts/_environment.js"),l=a("../node_modules/gsap/TimelineLite.js"),c=function(){function e(e,t){for(var a=0;a=a.length)return"break";o=a[r++]}else{if((r=a.next()).done)return"break";o=r.value}var t=o,i=e.find(function(e){return e.key===t.key});if(i){var s=i.values.find(function(e){return e.id===t.value});s&&(s.selected=!!s)}},a=this.filterParams,n=Array.isArray(a),r=0;for(a=n?a:a[Symbol.iterator]();;){var o;if("break"===t())break}},e.prototype.initEvents=function(){var e=this;document.addEventListener(i.PaginationEvent,function(t){e.submitForm()})},e.prototype.showSearch=function(){var e=this;this.domRef.innerHTML=this.getSearchTemplate(),document.getElementById("form-submit").addEventListener("click",function(t){return e.onSubmitForm(t)},!1);var t=this;document.addEventListener("keydown",function(e){"Enter"===e.key&&t.onSubmitForm(e)}),document.getElementById("clear-all-btn").addEventListener("click",function(t){return e.onClearAll(t)},!1);var a=s.a.IS_PROD?0:1500;this.submitForm(a,this.filterParams)},e.prototype.onSubmitForm=function(e){e.preventDefault();var t=s.a.IS_PROD?0:1500;this.paginator&&this.paginator.reset(),this.submitForm(t)},e.prototype.submitForm=function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;console.log("submitForm"),this.onClearResults();var o=document.getElementById("search-form"),i=a||r.a.toKeyValueArray(o),s={skip:this.pageSize*this.paginator.currentPageIndex,take:this.pageSize,filters:i};console.log(s),n.a.postToApi(this.apiURL,s,t).then(function(t){return e.showResults(t)})},e.prototype.onClearResults=function(){var e=document.getElementById("loader");e?this.searchResults.innerHTML=e.innerHTML:console.warn("Missing loader template"),this.paginator&&this.paginator.hide()},e.prototype.onClearAll=function(){console.log("onClearAll");var e=document.getElementsByTagName("select"),t=Array.isArray(e),a=0;for(e=t?e:e[Symbol.iterator]();;){var n;if(t){if(a>=e.length)break;n=e[a++]}else{if((a=e.next()).done)break;n=a.value}n.selectedIndex=0}var r=document.getElementById("name");r&&(r.value=""),this.paginator&&this.paginator.reset(),this.submitForm()},e.prototype.showResults=function(e){var t=this;if(console.log("showResults"),console.log(e),e){var a=void 0;if(a=e.length>0?e:e.results,this.searchResults.innerHTML="",!a||a&&0===a.length)this.searchResults.innerHTML='
No matching results found
';else{if(this.cardTemplate){var n=this.cardTemplate.innerHTML;a.forEach(function(e){var a=r.a.renderTemplate(e,n);t.searchResults.innerHTML+=a})}this.paginator&&(this.paginator.update(e.skip,e.take,e.total),this.paginator.show());var o=document.getElementsByClassName("results-card");if(window.TimelineLite)(new l.a).staggerFrom(o,.5,{autoAlpha:0,y:50},.1);for(var i=document.querySelectorAll("[data-src]"),s=0;s\n\n
\n
\n

Filter By:

\n
\n
\n \n
\n
\n\n
\n \x3c!--Layout input fields --\x3e\n '+this._filters.map(function(t){return e.getInput(t)})+'\n
\n\n
\n \n
\n\n '},e.prototype.getInput=function(e){return"text"===e.type?this.getTextInput(e):"select"===e.type?this.getSelect(e):void console.error("SearchForm: filter type missing or unknown filter type: "+e.type)},e.prototype.getSelect=function(e){return'
\n
\n \n \n
\n
"},e.prototype.getTextInput=function(e){return'
\n
\n \n \n
\n
'},e}(),p=a("../node_modules/rxjs/Rx.js");var d=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.initSearch(t)}return e.prototype.initSearch=function(e){var t=this;if(this.typeAheadContainer=e,this.inputDomRef=document.getElementById("c-typeahead__input"),this.searchIconRef=document.getElementById("c-typeahead__search-btn"),this.closeBtnRef=document.getElementById("c-typeahead__close-btn"),!(this.inputDomRef&&this.typeAheadContainer&&this.searchIconRef&&this.closeBtnRef))return console.warn("TypeAhead missing a matching domElement"),console.warn("inputDomRef: "+this.inputDomRef),console.warn("typeAheadContainer: "+this.typeAheadContainer),console.warn("searchIconRef: "+this.searchIconRef),void console.warn("closeBtnRef: "+this.closeBtnRef);if(this.searchApiUrl=this.typeAheadContainer.getAttribute("data-api-url"),this.searchPageUrl=this.typeAheadContainer.getAttribute("data-search-page-url")||"./search",this.searchApiUrl&&this.searchPageUrl){this.isShowingTypeAhead="none"!==this.typeAheadContainer.style.display,this.searchIconRef.addEventListener("click",function(e){return t.toggleTypeAhead(e)},!1),this.closeBtnRef.addEventListener("click",function(e){return t.hideTypeAhead(e)},!1),this.results=document.getElementById("c-typeahead__results");var a=this.inputDomRef,n=(p.Observable.fromEvent(a,"input"),p.Observable.fromEvent(a,"blur")),r=p.Observable.fromEvent(a,"focus"),o=p.Observable.fromEvent(a,"keydown"),i=p.Observable.fromEvent(a,"keyup"),s=o.filter(function(e){return 27===e.which});i.skipUntil(p.Observable.merge(o,r)).takeUntil(n).takeUntil(s).map(function(e){return e.target.value}).filter(function(e){return e.length>=1}).debounceTime(400).distinctUntilChanged().catch(function(e){return console.log("Observable escaped: "+e),p.Observable.empty()}).mergeMap(function(e){return fetch(""+t.searchApiUrl+e)}).mergeMap(function(e){return e.json()}).map(function(e){return e.map(function(e){return new Object(e)})}).subscribe(function(e){t.results.innerHTML=""+e.map(function(e){return'
  • '+e.word+"
  • "}).join("")})}else console.warn("TypeAhead missing API or search page URLs")},e.prototype.toggleTypeAhead=function(e){return e.preventDefault(),e.stopImmediatePropagation(),this.isShowingTypeAhead=!this.isShowingTypeAhead,this.isShowingTypeAhead?this.showTypeAhead():this.hideTypeAhead(),!1},e.prototype.showTypeAhead=function(){this.inputDomRef.value="",this.results.innerHTML="",this.typeAheadContainer.style.display="block",this.isShowingTypeAhead=!0,this.inputDomRef.focus()},e.prototype.hideTypeAhead=function(){arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.typeAheadContainer.style.display="none",this.isShowingTypeAhead=!1},e}(),f=a("../node_modules/swiper/dist/js/swiper.js"),h=a.n(f);var m=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.initDefaults(),this.initCarousels()}return e.prototype.initDefaults=function(){this.defaults={loop:!0,autoplay:{delay:2500},parallax:!0,preloadImages:!1,containerModifierClass:"carousel--",slideClass:"carousel__slide",slideBlankClass:"carousel-invisible-blank-slide",slideActiveClass:"carousel__slide--active",slideDuplicateActiveClass:"carousel__slide--duplicate-active",slideVisibleClass:"carousel__slide--visible",slideDuplicateClass:"carousel__slide--duplicate",slideNextClass:"carousel__slide-next",slideDuplicateNextClass:"carousel__slide-duplicate-next",slidePrevClass:"carousel__slide-prev",slideDuplicatePrevClass:"carousel__slide-duplicate-prev",wrapperClass:"carousel__wrapper",pagination:{el:".carousel__pagination",bulletClass:"carousel__pagination-bullet",bulletActiveClass:"carousel__pagination-bullet--active",modifierClass:"carousel__pagination-",currentClass:"carousel__pagination--current",totalClass:"carousel__pagination--total",hiddenClass:"carousel__pagination--hidden",progressbarFillClass:"carousel__pagination-progressbar--fill",progressbarOppositeClass:"carousel__pagination-progressbar--opposite",clickableClass:"carousel__pagination-clickable",lockClass:"carousel__pagination-lock"},lazy:{enabled:!0,elementClass:"carousel__lazy",loadingClass:"carousel__lazy--loading",loadedClass:"carousel__lazy--loaded",preloaderClass:"carousel__lazy-preloader"}},this.peopleDefaults=this.defaults,this.peopleDefaults.autoplay=!1},e.prototype.initCarousels=function(){this.mySwiper=new h.a(".carousel",this.defaults),this.mySwiper2=new h.a(".carousel-people",this.peopleDefaults)},e}(),g=function(){function e(e,t){for(var a=0;a0&&void 0!==arguments[0]?arguments[0]:"Alert message";!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.message=t,this.initView(),this.initEvents()}return e.prototype.initEvents=function(){var e=this;document.getElementById("alert-panel-close").addEventListener("click",function(t){return e.onHide(t)},!1)},e.prototype.onHide=function(e){var t=this;document.getElementById("alert-panel-close").removeEventListener("click",function(e){return t.onHide(e)},!1);var a=document.querySelector("#alert-panel");a.parentNode.removeChild(a)},e.prototype.initView=function(){var e=document.createElement("div");e.innerHTML='
    \n '+this.message+'\n Close\n
    ',document.body.insertBefore(e,document.body.firstChild)},e}(),x="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_=function(){function e(e,t){for(var a=0;a=a.length)return"break";o=a[r++]}else{if((r=a.next()).done)return"break";o=r.value}var t=o,i=e.find(function(e){return e.key===t.key});if(i){var s=i.values.find(function(e){return e.id===t.value});s&&(s.selected=!!s)}},a=this.filterParams,n=Array.isArray(a),r=0;for(a=n?a:a[Symbol.iterator]();;){var o;if("break"===t())break}},e.prototype.initEvents=function(){var e=this;document.addEventListener(i.PaginationEvent,function(t){e.onSubmitValues()}),window.addEventListener("resize",function(t){return e.checkAccordionVisible(t)},!1),this.checkAccordionVisible()},e.prototype.initFilters=function(){var e=this,t=this.getFiltersTemplate();this.domRef.innerHTML=t;for(var a=this.domRef.getElementsByTagName("select"),n=0;n=o.length)return"break";l=o[s++]}else{if((s=o.next()).done)return"break";l=s.value}var e=l;e.addEventListener("click",function(t){return e.classList.toggle("active"),e.nextElementSibling.classList.toggle("u-hidden"),!1})},o=document.querySelectorAll(".multi-select-title"),i=Array.isArray(o),s=0;for(o=i?o:o[Symbol.iterator]();;){var l;if("break"===r())break}var c=document.querySelectorAll("input[type=checkbox]"),u=Array.isArray(c),p=0;for(c=u?c:c[Symbol.iterator]();;){var d;if(u){if(p>=c.length)break;d=c[p++]}else{if((p=c.next()).done)break;d=p.value}d.addEventListener("change",function(t){return e.onMultiSelect(t)},!1)}},e.prototype.initFilterAccordion=function(){var e=document.querySelector(".filters-toggle-btn");e&&e.addEventListener("click",function(e){document.getElementById("filters").classList.toggle("u-hidden")},!1)},e.prototype.checkAccordionVisible=function(e){var t=document.getElementById("filters-accordion"),a="none"!==getComputedStyle(t,null).display,n=document.getElementById("filters");a&&n?n.classList.add("u-hidden"):n.classList.remove("u-hidden")},e.prototype.initStateButtons=function(){var e=this;this.mapButton=document.getElementById(E),this.mapButton.addEventListener("click",function(t){return e.showMapOrGallery(t)},!1),this.galleryButton=document.getElementById(T),this.galleryButton.addEventListener("click",function(t){return e.showMapOrGallery(t)},!1)},e.prototype.initMap=function(){this.mapContainer=document.getElementById("map"),this.map=new google.maps.Map(this.mapContainer,{zoom:4,disableDefaultUI:!0,maxZoom:15}),this.map.setOptions({styles:S.silver})},e.prototype.initGallery=function(){this.galleryContainer=document.getElementById("gallery")},e.prototype.showMapOrGallery=function(e){var t=void 0;if(e?(e.preventDefault(),e.stopImmediatePropagation(),t=e.currentTarget.id,this.galleryButton.classList.remove("c-btn--outline"),this.mapButton.classList.remove("c-btn--outline"),e.currentTarget.classList.add("c-btn--outline")):(t=E,this.mapButton.classList.add("c-btn--outline")),t===E?(console.log("Show MAP"),this.viewType=E,this.mapContainer.style.display="block",this.galleryContainer.style.display="none",this.query.take=16384,this.paginator.hide()):t===T?(console.log("Show GALLERY"),this.viewType=T,this.mapContainer.style.display="none",this.galleryContainer.style.display="block",this.query.take=this.pageSize,this.paginator.show()):console.warn("Unknown view type"),!e&&this.filterParams?this.onSubmitValues(this.filterParams):this.onSubmitValues(),e)return!1},e.prototype.updatePropertyList=function(){var e=this;if(console.log("updatePropertyList: "+(this._properties?this._properties.length:this._properties)),!this._properties)return!1;if(console.log("updatePropertyList with "+this._properties.length+" properties"),this.viewType===E){if(this.markers)for(;this.markers[0];)this.markers.pop().setMap(null);if(this.overlays)for(;this.overlays[0];)this.overlays.pop().setMap(null);var t=[],a=[],n=new google.maps.LatLngBounds,o=1;this._properties.forEach(function(i){var s="No template defined",l=document.getElementById("property-map-infowindow");if(l){var c=l.innerHTML;s=r.a.renderTemplate(i,c)}var u=new google.maps.InfoWindow({content:s,maxWidth:374}),p=new google.maps.Marker({position:new google.maps.LatLng(i.latitude,i.longitude),map:e.map,icon:S.blueMarker,label:{text:""+o,color:"#fff",fontSize:"15px",fontWeight:"normal"}}),d=e;p.addListener("mouseover",function(){p.setIcon(S.yellowMarker)}),p.addListener("mouseout",function(){p!==d.selectedMarker&&p.setIcon(S.blueMarker)}),p.addListener("click",function(){d.resetAllMarkers(),p.setIcon(S.yellowMarker),d.selectedMarker=p,d.selectedOverlay&&d.selectedOverlay.close(),u.open(this.map,p),d.selectedOverlay=u,d.map.panTo(p.getPosition())}),t.push(p),google.maps.event.addListener(u,"closeclick",function(){d.selectedMarker=null,p.setIcon(S.blueMarker)}),n.extend(p.getPosition()),e.map.fitBounds(n),a.push(u),o++}),this.markers=t,this.overlays=a}if(this.viewType===T){console.log("Layout gallery"),this.galleryContainer.innerHTML="";var i=document.getElementById("property-template");if(i){var s=i.innerHTML;this._properties.forEach(function(t){var a=r.a.renderTemplate(t,s);e.galleryContainer.insertAdjacentHTML("beforeend",a)})}}},e.prototype.resetAllMarkers=function(){this.markers.forEach(function(e){e.setIcon(S.blueMarker)})},e.prototype.getFiltersTemplate=function(){var e=this;return'
    \n\n
    \n \x3c!--Layout drop downs --\x3e\n '+this._filters.map(function(t){return e.getSelect(t)}).join("")+"\n \n
    \n \n
    "},e.prototype.getSelect=function(e){return'
    \n
    \n '+("multiselect"===e.type?'
    '+e.label+'
    \n
    \n '+e.values.map(function(t){return''}).join("")+"\n
    ":'")+"\n
    \n
    "},e.prototype.getSelectValues=function(e){for(var t=[],a=e&&e.options,n=void 0,r=0,o=a.length;r3&&void 0!==arguments[3]&&arguments[3];console.log("updateQuery key:"+e+", value:"+t+", multiSelect:"+a+", remove: "+n);var r=this.query.filters.findIndex(function(t){return t.key===e}),o=-1===r?null:this.query.filters[r];if(a||(o?o.value=t:this.query.filters.push({key:e,value:t})),a)if(o)if(n&&"string"==typeof t){var i=o.value.indexOf(t);-1!==i&&o.value.splice(i,1)}else o.value.push(t);else"string"==typeof t&&(t=new Array(t)),this.query.filters.push({key:e,value:t})},e.prototype.updatePagination=function(e){this.paginator&&(this.paginator.update(e.skip,e.take,e.total),this.viewType===T?this.paginator.show():this.paginator.hide());var t=1===e.total?"1 listing":e.total+" listings";this.numberProperties.innerHTML=t},e.prototype.onSubmitValues=function(e){var t=this;e&&(this.query.filters=e);var a=JSON.parse(JSON.stringify(this.query));a.filters.map(function(e){"object"===x(e.value)&&(e.value=e.value.join("|"))}),a.skip=this.pageSize*this.paginator.currentPageIndex,console.log("Query"),console.log(a),n.a.postToApi(this.apiSearchUrl,a).then(function(e){t.properties=e.results,t.updatePagination(e)}).catch(function(e){new k(e)})},e.prototype.getInitialProperties=function(){var e=this;this.query.take=16384,n.a.getProperties(this.apiSearchUrl,this.query).then(function(t){e.properties=t.results,e.updatePagination(t)}).catch(function(e){new k(e+" (properties)")})},e.prototype.fetchFilters=function(){var e=this;n.a.getFilters(this.filtersApiUrl).then(function(t){e.filters=t.fields,e.initFilters(),e.getInitialProperties()}).catch(function(e){new k(e+" (filters)")})},e.prototype.hideMap=function(){var e=document.getElementById("btn-container");e&&(e.style.display="none");var t=document.createEvent("MouseEvents");t.initMouseEvent("click",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),this.galleryButton.dispatchEvent(t)},e}(),A=a("../node_modules/gsap/index.js");var P=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),t&&(this.loader=t),this.loaderBackgroundClassName="o-loader-background"}return e.prototype.hide=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:.5;window.TweenLite&&this.loader&&A.a.to(this.loader,e,{autoAlpha:0,onComplete:this.hideBackground,onCompleteScope:this})},e.prototype.hideBackground=function(){this.parentContainer&&this.parentContainer.classList.remove(this.loaderBackgroundClassName)},e.prototype.show=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;window.TweenLite&&this.loader&&A.a.to(this.loader,e,{autoAlpha:1,onStart:this.showBackground,onStartScope:this})},e.prototype.showBackground=function(){this.parentContainer&&this.parentContainer.classList.add(this.loaderBackgroundClassName)},e.prototype.initAtTarget=function(e){this.parentContainer=e,this.loader=this.getLoaderTemplate()},e.prototype.getLoaderTemplate=function(){var e=document.createElement("div");return e.style.visibility="hidden",e.style.opacity="0",e.innerHTML='
    \n
    \n
    \n
    \n
    \n
    ',this.parentContainer.appendChild(e)},e}();var M=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.apiKey=parseFloat(t.getAttribute("data-api-key"))||s.a.GOOGLE_MAPS_API_KEY,this.longitude=parseFloat(t.getAttribute("data-longitude"))||0,this.latitude=parseFloat(t.getAttribute("data-latitude"))||0,this.width=parseInt(t.getAttribute("data-map-width"))||1e3,this.height=parseInt(t.getAttribute("data-map-height"))||600,this.zoom=parseInt(t.getAttribute("data-map-zoom"))||12,this.altTitle=t.getAttribute("data-alt-title")||"Google Map",t.innerHTML=this.getTemplate()}return e.prototype.getTemplate=function(){return''+this.altTitle+'\n Get Directions'},e.prototype.getStaticGoogleMapUrl=function(){var e=this.width+"x"+this.height,t=window.location.origin,a=void 0;return t||(t=window.location.protocol+"//"+window.location.hostname+(window.location.port?":"+window.location.port:"")),a=t.indexOf("localhost")>-1?s.a.GOOGLE_MAPS_CUSTOM_MARKER_URL:window.location.origin+"/assets/map-icons/pin-goldenrod@2x.png",encodeURI("https://maps.googleapis.com/maps/api/staticmap?center="+this.latitude+","+this.longitude+"&zoom="+this.zoom+"&size="+e+"&scale=2&markers=scale:2|icon:"+a+"|"+this.latitude+","+this.longitude+"&"+S.silverStaticStyle+"&key="+this.apiKey)},e.prototype.getGoogleMapsDirectionsURL=function(){return"https://www.google.com/maps/dir/?api=1&destination="+this.latitude+","+this.longitude},e}(),L=function(){function e(e,t){for(var a=0;a\n \n '+e.map(function(e){return'
    '+e.id+". "+e.title+''+e.title+'
    '}).join("")+"\n \n "},e}();var j=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.accordionToggleBtn=t,this.init(),this.initEvents(),this.update()}return e.prototype.init=function(){this.showContent=!1;var e=this.accordionToggleBtn.getAttribute("data-target");console.log("Instantiate new accordion with target class or id of "+e),this.accordionToggleClassName=this.accordionToggleBtn.getAttribute("data-toggle-class")||"c-btn--active",this.accordionContainers=document.querySelectorAll(e);var t=this.accordionContainers,a=Array.isArray(t),n=0;for(t=a?t:t[Symbol.iterator]();;){var r;if(a){if(n>=t.length)break;r=t[n++]}else{if((n=t.next()).done)break;r=n.value}r.style.removeProperty("display")}if(!this.accordionContainers)throw new Error("Accordion: container "+e+" not found!")},e.prototype.update=function(){if(this.showContent){var e=this.accordionContainers,t=Array.isArray(e),a=0;for(e=t?e:e[Symbol.iterator]();;){var n;if(t){if(a>=e.length)break;n=e[a++]}else{if((a=e.next()).done)break;n=a.value}n.classList.remove("u-hidden")}this.accordionToggleBtn.classList.add(this.accordionToggleClassName)}else{var r=this.accordionContainers,o=Array.isArray(r),i=0;for(r=o?r:r[Symbol.iterator]();;){var s;if(o){if(i>=r.length)break;s=r[i++]}else{if((i=r.next()).done)break;s=i.value}s.classList.add("u-hidden")}this.accordionToggleBtn.classList.remove(this.accordionToggleClassName)}this.accordionToggleBtn.blur()},e.prototype.initEvents=function(){var e=this;this.accordionToggleBtn.addEventListener("click",function(t){return e.onToggle(t)},!1)},e.prototype.onToggle=function(e){this.showContent=!this.showContent,this.update()},e}(),N=a("./scripts/validate.polyfills.js"),F=a.n(N),D=function(){function e(e,t){for(var a=0;a'+e.name+""}).join("");this.marketsSelectBox.innerHTML=e},e.prototype.submitForm=function(e,t){var a=this;console.log("submitForm"),this.showLoader();var r=function(e){return[].reduce.call(e,function(e,t){if("submit"!==t.name.toLowerCase())if("markets"===t.name){var a=t.querySelectorAll("option:checked"),n=Array.from(a).map(function(e){return e.value});e[t.name]=n.toString()}else e[t.name]=t.value;return e},{})}(this.form.elements);this._csvData&&(r.attachment=this._csvData),console.log(r),n.a.formPost(this.formPostUrl,r).then(function(e){return a.showResults(e)}).catch(function(e){a.showErrorMessage(e)})},e.prototype.initLoader=function(){this.loader||(this.loader=new P,this.loader.initAtTarget(this.form))},e.prototype.showLoader=function(){this.loader&&this.loader.show(.75)},e.prototype.hideLoader=function(){this.loader&&this.loader.hide(.3)},e.prototype.showResults=function(e){console.log("showResults"),console.log(e),this.hideLoader(),this.hideAllFormElements(),this.form.style.display="none";var t=this.responseSuccessTemplate.innerHTML,a=r.a.renderTemplate(e,t);this.form.insertAdjacentHTML("afterend",a)},e.prototype.showErrorMessage=function(e){console.log("showErrorMessage"),console.log(e),this.hideLoader(),this.hideAllFormElements(),this.form.style.display="none";var t=this.responseErrorTemplate.innerHTML,a=r.a.renderTemplate(e,t);this.form.insertAdjacentHTML("afterend",a)},e.prototype.hideAllFormElements=function(){for(var e=0;e").attr("data-name","sub_"+t+e),l=$('').attr({"calc-size":i,id:"sub_"+t+e,name:"sub_"+t+e,readonly:"readonly"}),c=$('').attr({value:r,id:"name_"+t+e,name:"name_"+t+e}),u=$('').attr({value:o,id:"size_"+t+e,name:"size_"+t+e}),p=$('
  • '+r+"
  • "),d=$("");d.append(s).append(l).append(c).append(u),p=p.append(d),a.append(p)})})},t.prototype.oc_hookevents=function(){var e=this;$("#officecalc input.calcgroupitem-qty").each(function(){e.oc_addsubtotalingevents($(this))}),$("#input_circulation").bind("mouseup keypress keydown keyup change",function(){e.oc_updatetotals()}),$("#sel_lossfactor").bind("mouseup keypress keydown keyup change",function(){e.oc_updatetotals()}),$('input:radio[name="units"]').bind("change",function(){var t=!1;$(this).is(":checked")&&"metric"===$(this).val()&&(t=!0),e.oc_setalternateunits(t?2:1),e.oc_recalc()}).trigger("change"),$(".link-btn-save").bind("click",function(t){t.preventDefault(),t.stopImmediatePropagation(),e.downloadCSV()})},t.prototype.oc_addsubtotalingevents=function(e){var t=this;e.bind("mouseup keypress keydown keyup change",function(a){var n=e.val(),r=parseFloat(n,10);r||(r=0);var o="sub_"+e.attr("name").replace("qty_",""),i=$("#officecalc input[name="+o+"]"),s=$("#officecalc [data-name="+o+"]"),l=parseFloat(i.attr("calc-size"),10),c=Math.ceil(r*l);if(i.val(c),s.text(c),t.oc_updatetotals(),13==a.keyCode)return!1})},t.prototype.oc_updatetotals=function(){$("#officecalc div.calcgroup").each(function(){var e=$(this),t=(e.attr("calc-name"),0);e.find("div.calcgroupsubtotals input[calc-size]").each(function(){var e=parseFloat($(this).val(),10);e&&(t+=e)}),e.find("input.calcgrouptotalel").val(t),e.find("div.calcgrouptotal [data-name]").text(t)});var e=$("#total_subtotal"),t=0;$("#officecalc div.calcgrouptotal input").each(function(){t+=parseFloat($(this).val())}),e.val(t),$('[data-name="total_subtotal"]').text(t);var a=35,n=0,r=0,o=$("#total_circulation");try{a=parseFloat($("#input_circulation").val()),n=(a=Math.min(Math.max(0,a),99))/(100-a),n=Math.round(100*n)/100,r=t*n,r=Math.ceil(r),$('[data-name="input_circulation"]').text(a+"%")}catch(e){}o.val(r),$('[data-name="total_circulation"]').text(r);var i=t+r;$("#total_usable").val(i),$('[data-name="total_usable"]').text(i);var s=22,l=0,c=$("#total_lossfactor");try{s=parseFloat($("#sel_lossfactor").val()),l=i*(s=Math.min(Math.max(0,s),99))/(100-s),l=Math.ceil(l)}catch(e){}c.val(l);var u=i+l;if($("#total_rentable").val(u),$('[data-name="total_rentable"]').text(u),document.getElementById("linkBtnSave").disabled=0===i,i>0){var p=this.oc_exporttocsv();this.injectCSVData(p)}},t.prototype.oc_setalternateunits=function(e){$("#officecalc .ut-label").each(function(){var t=$(this).attr("data-ut-"+e);$(this).text(t)}),$("#officecalc .ut-calc").each(function(){var t=$(this).attr("data-ut-"+e);if(t&&""!=t){$(this).attr("calc-size",t);var a="sub_"+$("input.calcgroupitem-qty",$(this)).attr("name").replace("qty_",""),n=$("#officecalc input[name="+a+"]");n.attr("calc-size",t);var r=$("div.calcgroupitem-size",$(this)).text();n.siblings('input[name^="size_"]').val(r)}})},t.prototype.oc_exporttocsv=function(){var e={};if($.each($("#office-calculator").serializeArray(),function(t,a){e[a.name]=a.value}),console.log(e),0===parseInt(e.total_subtotal))return console.warn("No values"),window.alert("Please enter some values in order to download"),!1;var t=/^name/i,a="metric"==$("input[name=units]:checked").val(),n=a?[["Space Type","Size","Qty","Square Meters"]]:[["Space Type","Size","Qty","Square Feet"]];for(var r in e){if(e.hasOwnProperty(r))if(console.log(r+" -> "+e[r]),r.match(t)){var o=r.split("_").pop(),i=o.replace(/[0-9]/i,"");r.split("_").shift();if(e["qty_"+o]>0){var s=[],l="";"off"===i&&(l="Office: "),"svc"===i&&(l="Service: "),"ws"===i&&(l="WorkStation: "),"con"===i&&(l="Conference: ");var c=(l+e[r]).replace(/,/gm," +");s.push(c),s.push(e["size_"+o]),s.push(e["qty_"+o]),s.push(e["sub_"+o]),n.push(s)}}}n.push(["----","","","----"]),n.push(["Subtotal","","",e.total_subtotal]),n.push(["Circulation ("+e.input_circulation+"%)","","",e.total_circulation]),n.push(["Usable Space","","",e.total_usable]);var u=parseFloat($("#sel_lossfactor").val());n.push(["Loss Factor ("+u+"%)","","",e.total_lossfactor]),n.push(a?["Rentable Sq Meters","","",e.total_rentable]:["Rentable Sq Feet","","",e.total_rentable]),console.table(n);var p="data:text/csv;charset=utf-8,";return n.forEach(function(e){var t=e.join(",");p+=t+"\r\n"}),console.log(p),encodeURI(p)},t.prototype.downloadFile=function(e,t){var a=document.createElement("a");a.download=e,a.href=t;var n=new MouseEvent("click");a.dispatchEvent(n)},t.prototype.downloadCSV=function(){var e=this.oc_exporttocsv();e&&this.downloadFile("office-calculator.csv",e)},t.prototype.oc_recalc=function(){$("#officecalc input.calcgroupitem-qty").trigger("change"),this.oc_updatetotals()},t}(a("./scripts/calculator-base.js").a),O=a("./scripts/calculator-storage.js");var q=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.init()}return e.prototype.init=function(){this.initJSTestSite(),this.paginator=this.initPagination(),this.initDummyImages(),this.initSearch(),this.initTypeAhead(),this.initContactForm(),this.initPropertyExplorer(),this.initLoader(),this.initStaticMapCTAs(),this.initAccordions(),this.initCalculators()},e.prototype.initJSTestSite=function(){var e=document.getElementById("select-component");e&&(e.value="."+window.location.pathname,e.addEventListener("change",function(e){window.location.href=e.currentTarget.value},!1))},e.prototype.initSearch=function(){var e=document.getElementById("search-filter");e&&this.initSearchForm(e,e.getAttribute("data-api-options-url"),e.getAttribute("data-api-search-url"),e.getAttribute("data-page-size"),e.getAttribute("data-template-id"),e.getAttribute("data-query-filters"))},e.prototype.initSearchForm=function(e,t,a,r,o,i){var s=new u(e,a,r,o,i);s.paginator=this.paginator,n.a.getFilters(t).then(function(e){s.filters=e.fields})},e.prototype.initCarousels=function(){if(document.querySelector(".carousel"))new m},e.prototype.initPropertyExplorer=function(){var e=document.getElementById("property-explorer");if(e){var t=new C(e,e.getAttribute("data-api-search-url"),e.getAttribute("data-filters-api-url"),e.getAttribute("data-page-size"),e.getAttribute("data-query-filters"),this.paginator),a=e.getAttribute("data-hide-map");t&&"true"===a&&t.hideMap()}},e.prototype.initLoader=function(){var e=document.getElementsByClassName("o-loader-ring"),t=document.getElementById("hide-btn"),a=document.getElementById("show-btn");if(e&&t&&a){var n=new P(e[0]);t.addEventListener("click",function(e){n.hide(.5)},!1),a.addEventListener("click",function(e){n.show(1)},!1)}},e.prototype.initStaticMapCTAs=function(){var e=document.getElementsByClassName("o-google-map-static");if(e)for(var t=0;t0){var n=String(a);if(-1!=n.indexOf("e"))return n;if(-1!=n.indexOf("E"))return n;var r=n.split(".");if(r.length<2){var o="00000000000000".substring(0,t);return r[0].toString()+this.eedec+o}var i=(r[1].toString()+"00000000000000").substring(0,t);return r[0].toString()+this.eedec+i}return a},StorageSpaceCalculator.prototype.eedisplayPercent=function(e){return this.myIsNaN(e)?Number.NaN:this.eedisplayFloat(100*e)+"%"},StorageSpaceCalculator.prototype.eedisplayPercentND=function(e,t){return this.myIsNaN(e)?Number.NaN:this.eedisplayFloatND(100*e,t)+"%"},StorageSpaceCalculator.prototype.eeparseFloatTh=function(e){e=String(e).replace(this.eethreg,""),e=String(e).replace(this.eedecreg,".");var t=parseFloat(e);return isNaN(t)?0:t},StorageSpaceCalculator.prototype.eedisplayFloatNDTh=function(e,t){if(this.myIsNaN(e))return Number.NaN;var a=this.round(e,t);if(t>0){var n=String(a);if(-1!==n.indexOf("e"))return n;if(-1!==n.indexOf("E"))return n;var r=n.split("."),o=this.eeinsertThousand(r[0].toString());if(r.length<2){var i="00000000000000".substring(0,t);return o+this.eedec+i}var s=(r[1].toString()+"00000000000000").substring(0,t);return o+this.eedec+s}return this.eeinsertThousand(a.toString())},StorageSpaceCalculator.prototype.eedisplayPercentNDTh=function(e,t){return this.myIsNaN(e)?Number.NaN:this.eedisplayFloatNDTh(100*e,t)+"%"},StorageSpaceCalculator.prototype.eeinsertThousand=function(e){if(""===e||e.indexOf("e")>=0)return e;var t="";"-"==e.charAt(0)&&(t="-",e=e.substring(1));for(var a="",n=e.length-1,r=0;r<=n;r++)r>0&&r%3==0&&(a=this.eeth+a),a=e.charAt(n-r)+a;return t+a},StorageSpaceCalculator.prototype.eedatefmt=function(e,t){if(!isFinite(t))return Number.NaN;for(var a=0,n=0,r="",o=e.length,i=0;i31)r+=this.fmtstrings[e[i]-32];else switch(e[i]){case 2:r+=this.eemonth(t);break;case 3:(n=this.eemonth(t))<10&&(r+="0"),r+=n;break;case 4:r+=this.fmtmonthnamesshort[this.eemonth(t)-1];break;case 5:r+=fmtmonthnameslong[eemonth(t)-1];break;case 6:r+=eeday(t);break;case 7:(n=eeday(t))<10&&(r+="0"),r+=n;break;case 8:r+=fmtdaynamesshort[weekday(t,1)-1];break;case 9:r+=fmtdaynameslong[weekday(t,1)-1];break;case 10:(n=year(t)%100)<10&&(r+="0"),r+=n;break;case 11:r+=year(t);break;case 12:r+=hour(t);break;case 13:(n=hour(t))<10&&(r+="0"),r+=n;break;case 14:r+=0==(n=hour(t)%12)?"12":n%12;break;case 15:0==(n=hour(t)%12)?r+="12":(n<10&&(r+="0"),r+=n);break;case 16:r+=minute(t);break;case 17:(n=minute(t))<10&&(r+="0"),r+=n;break;case 18:r+=second(t);break;case 19:(n=second(t))<10&&(r+="0"),r+=n;break;case 21:case 22:hour(t)<12?r+="AM":r+="PM";break;case 23:r+=this.eedisplayFloat(t);break;case 24:n=e[++i],r+=this.eedisplayFloatND(t,n);break;case 25:n=e[++i],r+=this.eedisplayFloatNDTh(t,n);break;case 26:r+=this.eedisplayPercent(t);break;case 27:n=e[++i],r+=this.eedisplayPercentND(t,n);break;case 28:n=e[++i],r+=this.eedisplayPercentNDTh(t,n);break;case 29:n=e[++i],r+=this.eedisplayScientific(t,n);break;case 30:a=e[++i],(n=(n=hour(t)+24*Math.floor(t)).toString()).length=0?eval(rawhref):desiredbutton.click()}})}else $(".af-validationwarning").show()},StorageSpaceCalculator.prototype.exportToCsv=function(e,t){var a=new Blob([t],{type:"text/csv;charset=utf-8;"});if(navigator.msSaveBlob)navigator.msSaveBlob(a,e);else{var n=document.createElement("a");if(void 0!==n.download){var r=URL.createObjectURL(a);n.setAttribute("href",r),n.setAttribute("download",e),n.style.visibility="hidden",document.body.appendChild(n),n.click(),document.body.removeChild(n)}}},StorageSpaceCalculator.prototype.generateCSV=function(){var e=this.storage_getunits(),t=[];t[0]=[],t[0][0]="Forklift Type",t[0][1]=e.label_lensq+" Required",t[0][2]="Cost per Pallet Stored per Year",t[0][3]="Cost Per pallet Stored per Month",t[1]=[],t[1][0]=$("#satA14").val(),t[1][1]=$("#satB14").val(),t[1][2]=$("#satD14").val(),t[1][3]=$("#satF14").val(),t[2]=[],t[2][0]=$("#satA19").val(),t[2][1]=$("#satB19").val(),t[2][2]=$("#satD19").val(),t[2][3]=$("#satF19").val(),t[3]=[],t[3][0]=$("#satA24").val(),t[3][1]=$("#satB24").val(),t[3][2]=$("#satD24").val(),t[3][3]=$("#satF24").val(),t[4]=[],t[4][0]=$("#satA29").val(),t[4][1]=$("#satB29").val(),t[4][2]=$("#satD29").val(),t[4][3]=$("#satF29").val(),t[5]=[],t[5][0]=$("#satA35").val(),t[5][1]=$("#satB35").val(),t[5][2]=$("#satD35").val(),t[5][3]=$("#satF35").val(),t[6]=[],t[6][0]="",t[6][1]="",t[6][2]="",t[6][3]="",t[7]=[],t[7][0]="Forklift Type",t[7][1]="Convert to",t[7][2]="or",t[7][3]="or",t[8]=[],t[8][0]="SIT-DOWN FORKLIFT: "+$("#satA48").val(),t[8][1]="3-Wheel Stand-up and Save: "+$("#satB48").val()+" ("+$("#satB49").val()+")",t[8][2]="Reach and Save: "+$("#satD48").val()+" ("+$("#satD49").val()+")",t[8][3]="Swing Reach/Turret (VNA) and Save: "+$("#satF48").val()+" ("+$("#satF49").val()+")",t[9]=[],t[9][0]="",t[9][1]="",t[9][2]="",t[9][3]="",t[10]=[],t[10][0]="Forklift Type",t[10][1]="Convert to",t[10][2]="or",t[10][3]="or",t[11]=[],t[11][0]="STAND-UP 3-WHEEL: "+$("#satA55").val(),t[11][1]="Reach and Save: "+$("#satB55").val()+" ("+$("#satB56").val()+")",t[11][2]="Deep Reach and Save: "+$("#satD55").val()+" ("+$("#satD56").val()+")",t[11][3]="Swing Reach/Turret (VNA) and Save: "+$("#satF56").val()+" ("+$("#satF56").val()+")",t[12]=[],t[12][0]="",t[12][1]="",t[12][2]="",t[12][3]="",t[13]=[],t[13][0]="Forklift Type",t[13][1]="Convert to",t[13][2]="or",t[13][3]="",t[14]=[],t[14][0]="REACH: "+$("#satA62").val(),t[14][1]="Deep Reach and Save: "+$("#satB62").val()+" ("+$("#satB63").val()+")",t[14][2]="Swing Reach/Turret (VNA) and Save: "+$("#satD62").val()+" ("+$("#satD63").val()+")",t[14][3]="";for(var a=function(e){for(var t="",a=0;a=0&&(r='"'+r+'"'),a>0&&(t+=","),t+=r}return t+"\n"},n="",r=0;r-1){var a=new RegExp("https://","g");e=e.replace(a,"http://")}var n=JSON.stringify(t);return fetch(e,{method:"post",headers:{Accept:"application/json, text/plain, */*","Content-Type":"application/json"},body:n}).then(function(e){return e.text()}).then(function(e){try{return JSON.parse(e)}catch(t){Promise.reject({body:e,type:"unparsable"})}}).then(function(e){return e}).catch(function(e){if(!1==e instanceof Error&&e.type&&"unparsable"===e.type)return e.body;throw e})},e.prototype.postToApi=function(e,t){arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(window.location.href.indexOf("http://localhost:")>-1){var a=new RegExp("https://","g");e=e.replace(a,"http://")}var n=JSON.stringify(t);return fetch(e,{method:"post",headers:{Accept:"application/json, text/plain, */*","Content-Type":"application/json"},body:n}).then(this.handleErrors).then(function(e){return e.json()}).then(function(e){return e}).catch(function(e){return console.log(e)})},e.prototype.handleErrors=function(e){if(!e.ok)throw Error(e.statusText);return e},e}())},"./scripts/utils.js":function(e,t,a){"use strict";var n=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e)}return e.getURLParamByName=function(e,t){t||(t=window.location.href),e=e.replace(/[\[\]]/g,"\\$&");var a=new RegExp("[?&]"+e+"(=([^&#]*)|&|#|$)").exec(t);return a?a[2]?decodeURIComponent(a[2].replace(/\+/g," ")):"":null},e.getHashValue=function(e){var t=location.hash.match(new RegExp(e+"=([^&]*)"));return t?t[1]:null},e.shuffleArray=function(e){for(var t=e.length;t;t--){var a=Math.floor(Math.random()*t),n=[e[a],e[t-1]];e[t-1]=n[0],e[a]=n[1]}},e.validateEmail=function(e){return/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(e)},e.validatePhone=function(e){return/^\d+$/.test(e)},e.convertUTCToDate=function(e){var t=new Date(1e3*e),a=t.getUTCFullYear(),n=t.getUTCMonth()+1;return t.getUTCDate()+"/"+n+"/"+a},e.template=function(e){for(var t=arguments.length,a=Array(t>1?t-1:0),n=1;n/g,">")),e},"")},e.showDebug=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],a=document.getElementById("debug-only");a||((a=document.createElement("div")).id="debug-only",a.style.cssText="color:#0056da;font-size:10px;",document.body.appendChild(a)),a.innerHTML="
    "+JSON.stringify(e,null,"\t")+"
    ",t&&console.log(e)},e.getRandomArraySubset=function(e,t){for(var a=e.slice(0),n=e.length,r=void 0,o=void 0;n--;)r=a[o=Math.floor((n+1)*Math.random())],a[o]=a[n],a[n]=r;return a.slice(0,t)},e.getRandomIntBetween=function(e,t){return Math.floor(Math.random()*t)+e},e.delay=function(e){return function(t){return new Promise(function(a){return setTimeout(function(){return a(t)},e)})}},e.renderTemplate=function(e,t){return t.replace(/{{([^}]*)}}/g,function(t,a){return e[a]||console.warn('Error: Utils.renderTemplate, missing model field "'+a+'"'),e[a]})},e.toKeyValueArray=function(e){for(var t=[],a=e.querySelectorAll("input, select, textarea"),n=0;n0)for(var l=0;l0&&!/^[-+]?(?:\d+|\d*[.,]\d+)$/.test(e.value),patternMismatch:e.hasAttribute("pattern")&&o>0&&!1===new RegExp(e.getAttribute("pattern")).test(e.value),rangeOverflow:e.hasAttribute("max")&&r&&e.value>0&&Number(e.value)>Number(e.getAttribute("max")),rangeUnderflow:e.hasAttribute("min")&&r&&e.value>0&&Number(e.value)0&&o>parseInt(e.getAttribute("maxLength"),10),tooShort:e.hasAttribute("minLength")&&e.getAttribute("minLength")>0&&o>0&&o0&&("email"===a&&!/^([^\x00-\x20\x22\x28\x29\x2c\x2e\x3a-\x3c\x3e\x40\x5b-\x5d\x7f-\xff]+|\x22([^\x0d\x22\x5c\x80-\xff]|\x5c[\x00-\x7f])*\x22)(\x2e([^\x00-\x20\x22\x28\x29\x2c\x2e\x3a-\x3c\x3e\x40\x5b-\x5d\x7f-\xff]+|\x22([^\x0d\x22\x5c\x80-\xff]|\x5c[\x00-\x7f])*\x22))*\x40([^\x00-\x20\x22\x28\x29\x2c\x2e\x3a-\x3c\x3e\x40\x5b-\x5d\x7f-\xff]+|\x5b([^\x0d\x5b-\x5d\x80-\xff]|\x5c[\x00-\x7f])*\x5d)(\x2e([^\x00-\x20\x22\x28\x29\x2c\x2e\x3a-\x3c\x3e\x40\x5b-\x5d\x7f-\xff]+|\x5b([^\x0d\x5b-\x5d\x80-\xff]|\x5c[\x00-\x7f])*\x5d))*$/.test(e.value)||"url"===a&&!/^(?:(?:https?|HTTPS?|ftp|FTP):\/\/)(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-zA-Z\u00a1-\uffff0-9]-*)*[a-zA-Z\u00a1-\uffff0-9]+)(?:\.(?:[a-zA-Z\u00a1-\uffff0-9]-*)*[a-zA-Z\u00a1-\uffff0-9]+)*)(?::\d{2,5})?(?:[\/?#]\S*)?$/.test(e.value)),valueMissing:e.hasAttribute("required")&&(("checkbox"===a||"radio"===a)&&!e.hasAttribute("checked")||"select"===a&&(-1===e.selectedIndex||e.options[e.selectedIndex].value.length<1)||"checkbox"!==a&&"radio"!==a&&"select"!==a&&o<1)},u=e.tagName.toLowerCase(),p=u in n?n[u].call(e):{};for(var d in c)c.hasOwnProperty(d)&&(d in p&&p[d]&&(c[d]=!0),c[d]&&(i=!1));return c.valid=i,c};(function(){var e=t.createElement("input");return"validity"in e&&"badInput"in e.validity&&"patternMismatch"in e.validity&&"rangeOverflow"in e.validity&&"rangeUnderflow"in e.validity&&"stepMismatch"in e.validity&&"tooLong"in e.validity&&"tooShort"in e.validity&&"typeMismatch"in e.validity&&"valid"in e.validity&&"valueMissing"in e.validity})()||(Object.defineProperty(HTMLInputElement.prototype,"validity",{get:function(){return r(this)},configurable:!0}),Object.defineProperty(HTMLButtonElement.prototype,"validity",{get:function(){return r(this)},configurable:!0}),Object.defineProperty(HTMLSelectElement.prototype,"validity",{get:function(){return r(this)},configurable:!0}),Object.defineProperty(HTMLTextAreaElement.prototype,"validity",{get:function(){return r(this)},configurable:!0}))}(window,document),function(a,i){r=[],n=function(e){"use strict";var t,a={},n={selector:"[data-validate]",fieldClass:"error",errorClass:"error-message",messageValueMissing:"Please fill out this field.",messageValueMissingCheckbox:"This field is required.",messageValueMissingRadio:"Please select a value.",messageValueMissingSelect:"Please select a value.",messageValueMissingSelectMulti:"Please select at least one value.",messageTypeMismatchEmail:"Please enter an email address.",messageTypeMismatchURL:"Please enter a URL.",messageTooShort:"Please lengthen this text to {minLength} characters or more. You are currently using {length} characters.",messageTooLong:"Please shorten this text to no more than {maxLength} characters. You are currently using {length} characters.",messagePatternMismatch:"Please match the requested format.",messageBadInput:"Please enter a number.",messageStepMismatch:"Please select a valid value.",messageRangeOverflow:"Please select a value that is no more than {max}.",messageRangeUnderflow:"Please select a value that is no less than {min}.",messageGeneric:"The value you entered for this field is invalid.",disableSubmit:!1,onSubmit:function(){},beforeShowError:function(){},afterShowError:function(){},beforeRemoveError:function(){},afterRemoveError:function(){}};Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector);var r=function e(){var t={},a=!1,n=0,r=arguments.length;"[object Boolean]"===Object.prototype.toString.call(arguments[0])&&(a=arguments[0],n++);for(var o=function(n){for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(a&&"[object Object]"===Object.prototype.toString.call(n[r])?t[r]=e(!0,t[r],n[r]):t[r]=n[r])};n0){for(var l=0;l0){for(var s=0;s