').attr("href",e);n.append(a)}}"function"==typeof r&&r()})})}},o.ui={getWindowSize:function(e){return e>=1200?"lg":e>=992?"md":e>=768?"sm":"xs"},belowthefold:function(e,t,r,n){return(n&&n.offset()?n.offset().top+n.height():(t[0].innerHeight?t[0].innerHeight:t.height())+t.scrollTop())<=e.offset().top-(r||0)},rightoffold:function(e,t,r,n){return(n&&n.offset()?n.offset().left+n.width():t.width()+t.scrollLeft())<=e.offset().left-(r||0)},abovethetop:function(e,t,r,n){return(n&&n.offset()?n.offset().top:t.scrollTop())>=e.offset().top+(r||0)+e.height()},leftofbegin:function(e,t,r,n){return(n&&n.offset()?n.offset().left:t.scrollLeft())>=e.offset().left+(r||0)+e.width()},inviewport:function(e,t,r,n){return!(!e||!e.length)&&!(this.rightoffold(e,t,r,n)||this.leftofbegin(e,t,r,n)||this.belowthefold(e,t,r,n)||this.abovethetop(e,t,r,n))},findEdges:function(e){var t;if(e&&e.length){var r=e.offset();r&&(t={top:r.top,left:r.left,bottom:r.top+e.height(),right:r.left+e.width()})}return t}},o.string={reverse:function(e){for(var t=e.length-1,r="";t>=0;r+=e[t--]);return r},getPrice:function(e){return e||0===e?{raw:e,short:"$"+this.getShortNumber(e),dollars:"$"+parseInt(e).toLocaleString(),dollarsWithoutCommas:"$"+parseInt(e,10),dollarsWithCents:"$"+e.toLocaleString(void 0,{style:"decimal",maximumFractionDigits:2,minimumFractionDigits:2})}:null},getShortNumber:function(e){if(e||0===e){var t,r=!1;return e<0&&(r=!0,e*=-1),e<1e4?t=e.toLocaleString():e<999500?(t=Math.round(e/1e3).toString(),t+="K"):e<105e4?t="1M":e<9995e4?(t=(Math.round(e/1e5)/10).toFixed(1).toString(),t+="M"):(t=Math.round(e/1e6).toString(),t+="M"),r?"-".concat(t):t}return null},getNumber:function(e){return e||0===e?{raw:e,commas:e.toLocaleString(),short:this.getShortNumber(e),decimal0:e.toLocaleString(void 0,{style:"decimal",maximumFractionDigits:0}),decimal1:e.toLocaleString(void 0,{style:"decimal",maximumFractionDigits:1,minimumFractionDigits:1}),decimal2:e.toLocaleString(void 0,{style:"decimal",maximumFractionDigits:2,minimumFractionDigits:2}),decimal3:e.toLocaleString(void 0,{style:"decimal",maximumFractionDigits:3,minimumFractionDigits:3})}:null},getPercent:function(e,t){if(e||0===e){var r=t||1,n=this.getNumber(Math.abs(e*r));return{raw:e*r,abs:n.raw,commas:n.commas+"%",decimal0:n.decimal0+"%",decimal1:n.decimal1+"%",decimal2:n.decimal2+"%",decimal3:n.decimal3+"%",isPositive:e>0}}return null},getPhoneNumber:function(e){if(e){var t=e.replace(/\D/g,"").replace(/^1/,""),r=(t.substr(0,10),t.substr(10,100)),n="("+t.substr(0,3)+") "+t.substr(3,3)+"-"+t.substr(6,4),a=t.substr(0,3)+"-"+t.substr(3,3)+"-"+t.substr(6,4),o=t.substr(0,3)+"."+t.substr(3,3)+"."+t.substr(6,4),s=n;return r.length>0&&(s+=" x"+r),{raw:e,digits:t,withParentheses:n,withDashes:a,withDots:o,withExtension:s}}return null},getPercentChange:function(e,t){if(e&&t){var r=(e-t)/t*100;return this.getPercent(r)}},firstLetterToUpper:function(e){if(e)return e.toLowerCase().charAt(0).toUpperCase()+e.toLowerCase().slice(1)}},o.date={getDateInfo:function(e){if(e){var t=new Date(e),r={weekday:"long",year:"numeric",month:"long",day:"numeric"},n={weekday:"long",year:"numeric",month:"long",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"},a=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],s=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],i=["January","February","March","April","May","June","July","August","September","October","November","December"];return{raw:t.getTime(),date:t,month:t.getMonth()+1,day:t.getDate(),year:t.getFullYear(),monthDayYear:t.getMonth()+1+"/"+t.getDate()+"/"+t.getFullYear().toString().substr(2,2),formattedDate:t.toLocaleString("en-us",r),formattedDateTime:t.toLocaleString("en-us",n),shortMonth:s[t.getMonth()],longMonth:i[t.getMonth()],formattedTime:t.toLocaleTimeString("en-us",{hour:"2-digit",minute:"2-digit"}),ago:o.date.getAgo(t),shortDay:a[t.getDay()]}}return null},getAgo:function(e){var t=Date.now();if(e){var r=t-e.getTime(),n=Math.round(r/1e3),a=Math.round(n/60),o=Math.round(a/60),s=Math.round(o/24),i=Math.round(s/7),l=Math.round(s/30);return n<0?"now":n<60?n.toString()+"s":a<60?a.toString()+"m":o<24?o.toString()+"h":s<7?s.toString()+"d":i<5?i.toString()+"w":l.toString()+"mo"}},getTicks:function(e){if(e)return parseFloat(e.toString().replace(/\D/g,""))},getDuration:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=new Date(null);t.setSeconds(e);var r=t.toISOString().substr(11,8),n=r.split(":");return{raw:e,hours:+n[0],minutes:+n[1],seconds:+n[2],formatted:r,formattedTrimmed:r.replace(/^0(?:0:0?)?/,""),roundedMinutes:Math.round(e/60)}}},o.user={getFileID:function(e){return e.toString().split("").reverse().join("")},getProfileImage:function(e,t){var r="//s3.amazonaws.com/homesnap.users/"+o.string.reverse(e.toString())+"_",n="";return t&&(n="?"+t),{small:r+"50.jpg"+n,medium:r+"150.jpg"+n,large:r+"300.jpg"+n,photoVersion:t}},updateProfileImage:function(e,t){if(e)return e.status.raw+=1,e.status.hasPhoto=!0,e.photoVersion=t,e.profileImage=this.getProfileImage(e.userID,e.photoVersion),e},getName:function(e,t){if(!e&&!t)return null;var r,e=e?e.trim():null,t=t?t.trim():null;return r=e||(t||" "),{first:e,last:t,firstOrLast:r,full:e&&t?e+" "+t:r,initials:e&&t?e.charAt(0).toUpperCase()+t.charAt(0).toUpperCase():r.charAt(0).toUpperCase()}},getFriendlyName:function(e,t){return t?e.name&&e.name.full?e.name.full:"Homesnap User":e.name&&e.name.first?e.name.first:"Homesnap User"},getProfileURL:function(e,t,r){return e?"/"+e:"/entity/"+r+(t?"/"+t:"")},getBackgroundImageURL:function(e){var t="//s3.amazonaws.com/homesnap.backgrounds/";return t+=o.string.reverse(e.toString()),{listingAds:t+"_2064x1080.jpg",large:t+"_2000x640.jpg",medium:t+"_1000x320.jpg",small:t+"_500x160.jpg"}}},o.brand={getImage:function(e,t,r){var n="//s3.amazonaws.com/homesnap.brands/"+o.string.reverse(e.toString())+"_";return{aspectRatio:t,url:{default:n+"aspect.png",light:n+"light_aspect.png",dark:r?n+"dark_aspect.png":null}}}},o.conversation={getDate:function(t){if(t){var r=new Date,n=o.date.getDateInfo(t),a=new Date(t);if(r.getFullYear()===a.getFullYear()&&r.getMonth()===a.getMonth()&&r.getDate()===a.getDate())return n.conversationLong=n.formattedTime,n.conversationShort=n.formattedTime,n;if(r.setDate(r.getDate()-1),r.getFullYear()===a.getFullYear()&&r.getMonth()===a.getMonth()&&r.getDate()===a.getDate())return n.conversationLong="Yesterday "+n.formattedTime,n.conversationShort="Yesterday",n;return a>new Date(r.getFullYear(),r.getMonth(),r.getDate()-6)?(n.conversationLong=e[a.getDay()]+" "+n.formattedTime,n.conversationShort=e[a.getDay()],n):(n.conversationLong=n.monthDayYear+" "+n.formattedTime,n.conversationShort=n.monthDayYear,n)}return null},getSummary:function(e){var t="";return e.text&&(t=e.text),e.propertyAddress?(t.length&&(t+=" "),t+="["+e.propertyAddress.address.fullStreetAddress+", "+e.propertyAddress.address.cityStateZip+" ]"):e.image?(t.length&&(t+=" "),t+="[1 Image Attached]"):e.entity&&(t.length&&(t+=" "),t+="["+o.user.getFriendlyName(e.entity,!0)+" ]"),t},getTitle:function(e){var t="Me";return e&&e.members&&e.members.length&&(1===e.members.length?t=o.user.getFriendlyName(e.members[0],!0):2===e.members.length?t=o.user.getFriendlyName(e.members[0],!1)+" & "+o.user.getFriendlyName(e.members[1],!1):3===e.members.length?t=o.user.getFriendlyName(e.members[0],!1)+", "+o.user.getFriendlyName(e.members[1],!1)+" & "+o.user.getFriendlyName(e.members[2],!1):(t=o.user.getFriendlyName(e.members[0],!1)+", "+o.user.getFriendlyName(e.members[1],!1)+", "+o.user.getFriendlyName(e.members[2],!1),t+=" & "+(e.members.length-3).toString()+" more")),t},isEqual:function(e,t){if(e&&t&&e.type_&&t.type_&&e.type_===t.type_)switch(e.type_){case"HSConversationItem":if(e.id===t.id&&e.status.raw===t.status.raw&&e.recentMessage&&t.recentMessage&&e.recentMessage.id===t.recentMessage.id&&e.recentMessage.status.raw===t.recentMessage.status.raw&&(e.recentMessage.readTimestamp&&t.recentMessage.readTimestamp&&e.recentMessage.readTimestamp.raw===t.recentMessage.readTimestamp.raw||!e.recentMessage.readTimestamp&&!t.recentMessage.readTimestamp))return!0}return!1}},o.listing={getPrimaryImage:function(e){return r="https://s3.amazonaws.com/homesnap.listings/"+o.string.reverse(e.toString())+"-",{mini:r+"mini.jpg",listing:r+"listing.jpg",large:r+"large.jpg"}},getSecondaryImages:function(e,t){for(var r=[],n=0;n')}else if(a){var g;c.priority=20,c.color="purple",c.pinName="purple",c.primaryColor="purple",c.pinHex="6f459b",c.hueRotate="280deg",c.text="Open House",s&&(c.text="Open "+s),u&&null!==(g=u.method)&&void 0!==g&&g.virtual&&(c.text="Live ",o.listing.isOpenHouseNow(u)?c.text+="Now ":s&&(c.text+="".concat(s," ")),c.text+='')}else c.priority=30,c.color="green",c.pinName="green",c.primaryColor="green",c.pinHex="218c48",c.hueRotate="30deg",c.text=p?"For Rent":"For Sale";return c},getMonthlyPayment:function(e,t,r){return 0==r?e/t:e*r*Math.pow(1+r,t)/(Math.pow(1+r,t)-1)},getAffordabilityHomePrice:function(e){if(!e||"Object"==typeof e)return null;var t=+e.interestRate.toFixed(10),r=e.loanTerm,n=e.income/12*e.debtToIncome-e.monthlyDebts;n=n.toFixed(10);var a=+(e.annualPropertyTax/12).toFixed(10)+ +(e.annualHomeownersInsurance/12).toFixed(10)+ +(e.annualMortgageInsurance/12).toFixed(10)+e.hoaFees;a=parseInt(a,10);var o=Math.pow(1+t,r);o=+o.toFixed(10);var s=(o-1)/(t*o)||0;return s=+s.toFixed(10),e.downPayment+(n-a)*s},isOpenHouseNow:function(e){var t,r,n,a;if(!e||"object"!=typeof e)return!1;var o=(null===(t=e.startDateUtc)||void 0===t?void 0:t.raw)||e.startDate.raw,s=(null===(r=e.endDateUtc)||void 0===r?void 0:r.raw)||e.endDate.raw,i=new Date,l=i.getTime();null!==(n=e.startDateUtc)&&void 0!==n&&n.raw&&null!==(a=e.endDateUtc)&&void 0!==a&&a.raw&&(l+=6e4*i.getTimezoneOffset());var u=new Date(o).getTime(),c=new Date(s).getTime();return l>=u&&l<=c}},o.themes={_current:null,get current(){var e;return null!==(e=this._current)&&void 0!==e?e:this.preset},key:"data-theme",preset:"hswa",mapping:{none:"hswa",nyc:"empire"},set:function(e){var t,r=null!==(t=Object.keys(e).filter(function(t){return!0===e[t]})[0])&&void 0!==t?t:"none",n=this.mapping[r];this.load(n),this._current=n},load:function(e){$("html").attr("data-theme",e),e===this.preset||$("link[".concat(this.key,"='").concat(e,"']")).length||o.handlebars.loadCSS("themes/".concat(e,".css"),null,{key:this.key,value:e})},unload:function(e){$("html").attr("data-theme")===e&&($("html").attr("data-theme",this.preset),this._current=this.preset,$("link[".concat(this.key,"='").concat(e,"']")).remove())},paint:{load:function(e){o.handlebars.loadCSS(e?"".concat(e):"paint/paint.css")},set:function(e,t,r,n,a){var o=document.documentElement.style;e&&t&&o&&(o.setProperty("--".concat(e,"-hex"),t),"number"==typeof r&&"number"==typeof n&&"number"==typeof a&&(o.setProperty("--".concat(e,"-hue"),"".concat(r)),o.setProperty("--".concat(e,"-sat"),"".concat(n,"%")),o.setProperty("--".concat(e,"-lte"),"".concat(a,"%"))))}},converters:{rgb2hsl:function(e,t,r){var n=Math.max(e,t,r),a=n-Math.min(e,t,r),o=1-Math.abs(n+n-a-1),s=a&&(n===e?(t-r)/a:n===t?2+(r-e)/a:4+(e-t)/a);return[60*(s<0?s+6:s),o?a/o:0,(n+n-a)/2]}}},o.propertyAddress={getAddress:function(e,t,r,n,a){return{fullStreetAddress:e,fullStreetAddressWithoutUnit:this.getFullStreetAddressWithoutUnit(e,t),unitNumber:t?{raw:t,string:"#"+t}:null,city:r,state:n,zip:a,cityStateZip:(r?r+", ":"")+(n?n+" ":"")+(a||"")}},getFullStreetAddressWithoutUnit:function(e,t){return t&&t.toString().length>0?e.split(" #")[0]:e},getBeds:function(e){return e?{raw:e,string:e.toString(),label:1==e?"Bed":"Beds"}:null},getBaths:function(e,t){var r;return e&&(r={raw:{full:e,half:t||0},string:e.toString(),label:"Baths"},t&&t>0&&(r.string+=1==t?".5":".5+"),1!=e||t&&0!=t||(r.label="Bath")),r},getSqFt:function(e){return e?{raw:e,string:e.toLocaleString()}:null},getLotSize:function(e){return e?{raw:e,string:e.toLocaleString(),label:"Acres"}:null},getPrice:function(e,t){if(e){var r=Math.round(e),n="$"+r.toLocaleString();t&&2==t&&(n+="/mo");var a;return r<1e4?a=r.toLocaleString():r<999500?(a=Math.round(r/1e3).toString(),a+="K"):r<105e4?a="1M":r<9995e4?(a=(Math.round(r/1e5)/10).toFixed(1).toString(),a+="M"):(a=Math.round(r/1e6).toString(),a+="M"),t&&2==t&&(a+="/mo"),{raw:e,dollars:n,short:"$"+a}}return null},getPropertyStatus:function(e,t){return{color:"blue",pinName:"blue_pin",primaryColor:"blue",secondaryColor:null,text:t||"Estimated",pinHex:"4593ce",hueRotate:"175deg"}},getSPropertyType:function(e){if(e){var t;switch(e){case 1:t="Detached";break;case 2:t="Townhouse";break;case 4:t="Condo";break;case 16:t="Multi-Family";break;case 32:t="Lots/Land";break;case 64:t="Mobile/Manufactured";break;case 128:t="Commercial";break;case 256:t="Co-op";break;case 8:default:t="Other"}return{raw:e,string:t}}return null},getClusterColors:function(e,t,r){var n={fill:"#4392CE",stroke:"#3589CF"};return e&&(t?(n.fill="#F1CC39",n.stroke="#E5BE37"):2==(2&e)?(n.fill="#F37F21",n.stroke="#D76C25"):4==(4&e)?(n.fill="#E02844",n.stroke="#9A1B1E"):1==(1&e)&&(r?(n.fill="#6F459B",n.stroke="#5B2E91"):(n.fill="#71bf44",n.stroke="#538c32"))),n},getSingleEntityTypeAndID:function(e){if(e){var t,r;return e.listing?(t=7,r=e.listing.id):e.propertyID?(t=6,r=e.propertyID):e.id&&(t=5,r=e.id),{type:t,id:r}}},getPageTitle:function(e){var t=e.address?e.address.fullStreetAddress+", "+e.address.cityStateZip:"";return e.listing&&e.listing.sourceNumber&&(t+=" | MLS #"+e.listing.sourceNumber),t},getGraphImage:function(e){return{raw:e,large:e.replace("{w}","1000").replace("{h}","120")}},getPieChartImage:function(e,t){var r="";for(var n in t)t.hasOwnProperty(n)&&(r+=t[n].Value+" - "+t[n].Label,r+="|");return{raw:e,small:e.replace("{w}","320").replace("{h}","160").replace("{color0}","00A3E1").replace("{color1}","56BBE1").replace("{color2}","abddf0").replace("{color3}","cccccc")+"&chdl="+r.slice(0,-1)}},getStatusBadges:function(e){function t(e,t,r){this.text=e,this.color=t,this.secondaryColor=r}var r=[];if(e.listing){if(e.listing.specialFeatures.comingSoon){var n=new t("Coming Soon","#F1CC39","");r.push(n)}else{var a,s,i=2===e.transactionType.raw;e.listing.sListingStatus.active?(a=i?"For Rent":"For Sale",s="#218C48"):e.listing.sListingStatus.contract?(a=i?"Pending":"Contract",s="#F27F21"):e.listing.sListingStatus.sold?(a=i?"Rented":"Sold",s="#EE3223"):(e.listing.sListingStatus.inactive||e.listing.sListingStatus.removed)&&(a="Off Market",s="#4593CE");var l=new t(a,s,null);r.push(l)}if(e.listing.specialFeatures.brokerOpen||e.listing.specialFeatures.openHouse){var u,c=e.listing.openHouse&&e.listing.openHouse.times?"Open ".concat(e.listing.openHouse.times):"Open House";null!==(u=e.listing.openHouse.method)&&void 0!==u&&u.virtual&&(c="Live ",o.listing.isOpenHouseNow(e.listing.openHouse)?c+="Now ":e.listing.openHouse.times&&(c+="".concat(e.listing.openHouse.times," ")),c+=' ');var p=new t(c,"#6F459B",e.listing.specialFeatures.brokerOpen?"#EDB42B":null);r.push(p)}if(e.listing.specialFeatures.contingent){var h=new t("Contingent","#EDB42B",null);r.push(h)}else if(e.listing.specialFeatures.auction){var g=new t("Auction","#EE3223",null);r.push(g)}else if(e.listing.specialFeatures.shortSale){var d=new t("Short Sale","#EE3223\t",null);r.push(d)}else if(e.listing.specialFeatures.foreclosure){var m=new t("Bank Owned","#EE3223\t",null);r.push(m)}}else if(e&&e.propertyID){var f=new t("Estimated","#4593CE",null);r.push(f)}return r}},o.js={dedupeHashTables:function(e,t,r){var n={add:[],keep:[],remove:[]};return e&&0!=e.length?t&&0!=t.length?(e.each(function(e,a){t.hasItem(e)?r&&!r(a,t.getItem(e))?(n.remove.push(e),n.add.push(e)):n.keep.push(e):n.remove.push(e)}),t.each(function(t,r){e.hasItem(t)||n.add.push(t)})):n.remove=e.keys():t&&t.length>0&&(n.add=t.keys()),n},round:function(e,t){return Number(Math.round(e+"e"+t)+"e-"+t)}},o.map={getXYbyLatLng:function(e,t,r){var n=parseInt(256*Math.pow(2,r-1)+t*(256*Math.pow(2,r)/360)),a=Math.sin(e*Math.PI/180);return a<-.9999&&(a=-.9999),a>.9999&&(a=.9999),{x:n,y:parseInt(256*Math.pow(2,r-1)+.5*Math.log((1+a)/(1-a))*(-256*Math.pow(2,r)/(2*Math.PI)))}},getLatLngByPixel:function(e,t,r){var n=e*(360/(256*Math.pow(2,r)))-180,a=t*(2/(256*Math.pow(2,r)));return a=1-a,a*=Math.PI,a=o.map.getRadiansByDegrees(Math.atan(Math.sinh(a))),{lat:a,lng:n}},getRadiansByDegrees:function(e){return e*(180/Math.PI)},getDistance:function(e,t,r,n,a){var o=Math.PI*e/180,s=Math.PI*r/180,i=t-n,l=Math.PI*i/180,u=Math.sin(o)*Math.sin(s)+Math.cos(o)*Math.cos(s)*Math.cos(l);return u=Math.acos(u.toPrecision(14)),u=180*u/Math.PI,u=60*u*1.1515,"K"==a&&(u*=1.609344),"N"==a&&(u*=.8684),u},getDecodedPolygon:function(e){var t=function(e){for(var t=e.split("$"),r=[],n=0;n-1&&e.push(t+5e3);for(;t<1e6;)t+=25e3,e.push(t);for(;t<2e6;)t+=1e5,e.push(t);for(;t<3e6;)t+=25e4,e.push(t);for(;t<=5e6;)t+=5e5,e.push(t);for(var n=e.map(function(e){return{value:e,label:e<=1e6?"$".concat(o.string.getShortNumber(e)):"$".concat((e/1e6).toString(),"M")}}),a=[],s=0;s<=1e4;s+=100)a.push(s);a.push(1e8);var i=a.map(function(e){return{value:e,label:"$".concat(o.string.getShortNumber(e))}}),l={sale:{min:n.slice(0,-1),max:n.slice(1)},rent:{min:i.slice(0,-1),max:i.slice(1)}};return l.sale.max[l.sale.max.length-1]={label:"$5M+",value:1e8},l.rent.max[l.rent.max.length-1].label="$10K+",l},getYearBuiltOptions:function(){for(var e=new Date,t=e.getFullYear(),r=[];t>=2014;)r.push(t),t-=1;r=r.concat([2010,2005,2e3,1990,1980,1970,1960,1950,1925,1900]);var n=r.map(function(e){return{value:e,label:e}}),a={min:_toConsumableArray(n).reverse(),max:n};return a.max.unshift({label:"Any",value:3e3}),a.min.unshift({label:"Any",value:0}),a}},o.savedSearches={getSavedSearchUrl:function(e){var t=e.sd.getUrl(),r="",n="";if(e.boundaryEntity){switch(e.boundaryEntity.type_){case"HSAreaItem":n="/p_21,"+e.boundaryEntity.areaID;break;case"HSSchool":n="/p_26,"+e.boundaryEntity.id;break;case"HSStreetArea":n="/p_51,"+e.boundaryEntity.id}r=e.boundaryEntity.url}var a="";if(e.bounds&&e.bounds.center){var o=e.bounds.center();a="/c_"+o.lat.toString()+","+o.lng.toString()}var s="/b_"+e.bounds.north+","+e.bounds.east+"-"+e.bounds.south+","+e.bounds.west,i="";e.encodedPolygons&&void 0!==e.encodedPolygons&&(i="/cp_"+encodeURIComponent(e.encodedPolygons));var l="";if(e.commuteTimePlaces){l="/ct_";for(var u=0;u0?t.push(e.bedsMin.toString()+"+ Beds"):e.bedsMax===e.bedsMin?t.push(e.bedsMin.toString()+" Beds"):e.bedsMin>0&&e.bedsMax<100&&t.push(e.bedsMin.toString()+"-"+e.bedsMax.toString()+" Beds"),0===e.bathsMin&&1===e.bathsMax?t.push("0-1 Baths"):1===e.bathsMin&&2===e.bathsMax?t.push("1-2 Baths"):2===e.bathsMin&&3===e.bathsMax?t.push("2-3 Baths"):3===e.bathsMin&&4===e.bathsMax?t.push("3-4 Baths"):4===e.bathsMin&&5===e.bathsMax?t.push("4-5 Baths"):5===e.bathsMin&&50===e.bathsMax?t.push("5+ Baths"):0===e.bathsMin&&0===e.bathsMax?t.push("0 Baths"):50===e.bathsMax&&e.bathsMin>0?t.push(e.bathsMin.toString()+"+ Baths"):e.bathsMax===e.bathsMin?t.push(e.bathsMin.toString()+" Baths"):e.bathsMin>0&&e.bathsMax<50&&t.push(e.bathsMin.toString()+"-"+e.bathsMax.toString()+" Baths"),e.priceMin&&e.priceMin.raw>0&&e.priceMax&&e.priceMax.raw<1e8?t.push(e.priceMin.short+" - "+e.priceMax.short):e.priceMax&&e.priceMax.raw<1e8?t.push("<"+e.priceMax.short):e.priceMin&&e.priceMin.raw>0&&t.push(">"+e.priceMin.short),e&&e.dateRange)switch(e.dateRange){case 1:t.push("Today");break;case 2:t.push("Over 1 Week");break;case 3:t.push("Over 1 Month");break;case 4:t.push("Over 3 Months");break;case 5:t.push("Over 6 Months");break;case 6:t.push("Over a Year");break;case 7:t.push("Past Week");break;case 8:t.push("Past Month");break;case 9:t.push("Past 3 Months");break;case 10:t.push("Past 6 Months");break;case 11:t.push("Past Year");break;case 12:t.push("Tomorrow");break;case 13:t.push("This Week");break;case 14:t.push("Saturday");break;case 15:t.push("Sunday");break;case 16:t.push("This Weekend");break;case 17:t.push("This Week");break;case 18:t.push("Next Weekend")}return t=t.join(", "),e&&e.boundaryEntity?"HSAreaItem"==e.boundaryEntity.type_?t+=" in "+e.boundaryEntity.name:"HSSchool"==e.boundaryEntity.type_?t+=" near "+e.boundaryEntity.name:"HSStreetArea"==e.boundaryEntity.type_&&(t+=" on "+e.boundaryEntity.name):e&&e.encodedPolygons&&(t+=" in custom area "),t}},o.data={blob:function(e){if(!e||""===e)return{};var t=e,r=e.length||0;if("string"==typeof e&&r>0&&"{"===e.substring(0,1)&&"}"===e.substring(r-1,r))try{t=JSON.parse(e)}catch(e){}return t},deleteNullProperties:function(e){return e?(Object.keys(e).forEach(function(e){var t=this[e];t&&"object"==typeof t?(o.data.deleteNullProperties(t),0===Object.keys(t).length&&delete this[e]):null===t&&delete this[e]},e),e):{}},update:function(e,t,r){e&&Object.keys(e).forEach(function(n){var a="string"==typeof e[n]?e[n].replace(/^\s+|\s+$/g,""):e[n];"object"==typeof a?o.data.update(a,t,r):a===t&&(e[n]=r)})}},o.entityContent={getKeyFrameUrl:function(e,t){return"//s3.amazonaws.com/homesnap.entitycontents/"+o.string.reverse(e.toString())+"_"+t+".jpg"},getDataUrl:function(e,t){return"//s3.amazonaws.com/homesnap.entitycontents/"+o.string.reverse(e.toString())+"_"+t+".mp4"}},o.ads={getPlatformType:function(e){if(!e)return null;var t={raw:e};return 1===e?(t.facebook=!0,t.name="Facebook",t.color={text:"#3b5998",background:"#4b6dad",rgb:"75,109,173",gradient:"radial-gradient(at bottom right, #87BAFF 0%, #005EA8 100%)"},t.icon={color:o.path.getImageUrl("/listing-promos/fb-colored-256px.png"),colorSM:o.path.getImageUrl("/listing-promos/fb-colored-70px-2x.png"),white:o.path.getImageUrl("/listing-promos/fb-white-70px-2x.png"),grey:o.path.getImageUrl("/listing-promos/fb-grey-70px-2x.png")}):2===e?(t.instagram=!0,t.name="Instagram",t.color={text:"#c93a9b",background:"#c9399b",rgb:"201,57,155",gradient:"radial-gradient(at bottom right, #7D3CAF 0%, #B33393 100%)"},t.icon={color:o.path.getImageUrl("/listing-promos/ig-colored-256px.png"),colorSM:o.path.getImageUrl("/listing-promos/ig-colored-70px-2x.png"),white:o.path.getImageUrl("/listing-promos/ig-white-70px-2x.png"),grey:o.path.getImageUrl("/listing-promos/ig-grey-70px-2x.png")}):3===e?(t.google=!0,t.name="Google",t.color={text:"#db3236",background:"#ef5c42",rgb:"239,92,66",gradient:"radial-gradient(at bottom right, #E07C3D 0%, #E23A3A 100%)"},t.icon={color:o.path.getImageUrl("/listing-promos/google-colored-256px.png"),colorSM:o.path.getImageUrl("/listing-promos/google-colored-70px-2x.png"),white:o.path.getImageUrl("/listing-promos/google-white-70px-2x.png"),grey:o.path.getImageUrl("/listing-promos/google-grey-70px-2x.png")}):4===e&&(t.waze=!0,t.name="Waze",t.color={text:"#00b7d6",background:"#00b8d2",rgb:"0, 184, 210",gradient:"linear-gradient(313.13deg, #22E0FF 0%, #1CD6F6 15.8%, #15C9EA 35.86%, #15CAEB 36.43%, #15CAEB 36.44%, #15CAEB 36.44%, #15CAEB 37.2%, #15C9EA 37.36%, #15C9EA 37.52%, #15C9EA 38.16%, #14C8E9 39.89%, #14C8E9 39.89%, #13C6E7 43.86%, #10C0E2 53.61%, #00A4C8 100%)"},t.icon={color:o.path.getImageUrl("/listing-promos/waze-colored-256px-1.png"),colorSM:o.path.getImageUrl("/listing-promos/waze-colored-70px-2x-1.png"),white:o.path.getImageUrl("/listing-promos/waze-white-70px-2x.png"),grey:o.path.getImageUrl("/listing-promos/waze-grey-70px-2x.png")}),t.id=e,t},getPlatformIDByName:function(e){if(!e)return null;var t;switch(e.toLowerCase()){case"facebook":t=1;break;case"instagram":t=2;break;case"google":t=3;break;case"waze":t=4}return t}},o.application={parseQueryString:function(e){for(var t,r,n=/(?:\?|\&)([^=]+)\=([^&]+)/g;t=n.exec(e);)r=r||{},r[t[1].toLowerCase()]=decodeURIComponent(t[2]);return r},parseUrl:function(e){if(!e||"string"!=typeof e)return null;var t=/^(http:|https:)?(?:\/\/)?(([^\/\:]+)?(?:(?:\:)([\d]+))?)?(\/[^\s\?]*)(\?[^\#\s]+)?(\#\S+)?$/i,r=e.match(t);return r?{protocol:r[1]||location.protocol,host:r[2]||location.host,hostname:r[3]||location.hostname,port:r[4]||location.port,pathname:r[5],search:r[6],hash:r[7]}:null},isiOS:function(){return/iPad|iPhone|iPod/.test(navigator.userAgent||navigator.vendor||window.opera)&&!window.MSStream},isAndroid:function(){return/android/i.test(navigator.userAgent||navigator.vendor||window.opera)},isChromeiOS:function(){return/CriOS/i.test(navigator.userAgent||navigator.vendor||window.opera)},isWebView:function(){return/wv/i.test(navigator.userAgent||navigator.vendor||window.opera)}},o.path={getImageUrl:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return t.imageRootPath+e},getJSUrl:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return function(e){var e=e||"";return t.jsRootPath+e}(e)},getHandlebarUrl:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return t.handlebarRootPath+e},getDomain:function(e){var t=e.split(".");return t.slice(t.length-2).join(".").toLowerCase()}},o.coStarBrand={_current:window.Homesnap&&window.Homesnap.coStarBrand,_internalDictionary:function(){switch((arguments.length>0&&void 0!==arguments[0]?arguments[0]:"").toLowerCase()){case"citysnap":return 4;case"homesnap":default:return 2}},is:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";if(e){var t=this._internalDictionary(e);return t&&this._current===t}},getCurrent:function(e){var t=e?this._internalDictionary(e):this._current;switch(t){case 4:return{name:"Citysnap",supportEmail:"support@citysnap.com",listingService:"RLS",raw:t,appleApp:"",googlePlay:"",includedMLSIds:[511e3]};default:return{name:"Homesnap",supportEmail:"support@homesnap.com",listingService:"MLS",raw:t,appleApp:"",googlePlay:""}}}},o}),Object.assign&&"function"==typeof Object.assign||Object.defineProperty(Object,"assign",{value:function(e,t){"use strict";if(null===e)throw new TypeError("Cannot convert undefined or null to object");for(var r=Object(e),n=1;n>16),s((65280&r)>>8),s(255&r);return 2==o?s(255&(r=c(e.charAt(t))<<2|c(e.charAt(t+1))>>4)):1==o&&(s((r=c(e.charAt(t))<<10|c(e.charAt(t+1))<<4|c(e.charAt(t+2))>>2)>>8&255),s(255&r)),i},e.fromByteArray=function(e){var t,n,r,o,i=e.length%3,u="";function a(e){return"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(e)}for(t=0,r=e.length-i;t>18&63)+a(o>>12&63)+a(o>>6&63)+a(63&o);switch(i){case 1:u+=a((n=e[e.length-1])>>2),u+=a(n<<4&63),u+="==";break;case 2:u+=a((n=(e[e.length-2]<<8)+e[e.length-1])>>10),u+=a(n>>4&63),u+=a(n<<2&63),u+="="}return u}}(void 0===f?this.base64js={}:f)}).call(this,e("lYpoI2"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/base64-js/lib/b64.js","/node_modules/gulp-browserify/node_modules/base64-js/lib")},{buffer:3,lYpoI2:10}],3:[function(O,e,H){(function(e,t,h,n,r,o,i,u,a){var s=O("base64-js"),f=O("ieee754");function h(e,t,n){if(!(this instanceof h))return new h(e,t,n);var r,o,i,u,a,s=typeof e;if("base64"===t&&"string"==s)for(e=(r=e).trim?r.trim():r.replace(/^\s+|\s+$/g,"");e.length%4!=0;)e+="=";if("number"==s)o=x(e);else if("string"==s)o=h.byteLength(e,t);else{if("object"!=s)throw new Error("First argument needs to be a number, array or string.");o=x(e.length)}if(h._useTypedArrays?i=h._augment(new Uint8Array(o)):((i=this).length=o,i._isBuffer=!0),h._useTypedArrays&&"number"==typeof e.byteLength)i._set(e);else if(S(a=e)||h.isBuffer(a)||a&&"object"==typeof a&&"number"==typeof a.length)for(u=0;u>8,r=t%256,o.push(r),o.push(n);return o}(t),e,n,r)}function c(e,t,n){var r="";n=Math.min(e.length,n);for(var o=t;o>>0)):(t+1>>0),o}function y(e,t,n,r){if(r||(D("boolean"==typeof n,"missing or invalid endian"),D(null!=t,"missing offset"),D(t+1>>8*(r?u:1-u)}function _(e,t,n,r,o){o||(D(null!=t,"missing value"),D("boolean"==typeof r,"missing or invalid endian"),D(null!=n,"missing offset"),D(n+3>>8*(r?u:3-u)&255}function E(e,t,n,r,o){o||(D(null!=t,"missing value"),D("boolean"==typeof r,"missing or invalid endian"),D(null!=n,"missing offset"),D(n+1this.length&&(r=this.length),e.length-t=this.length))return this[e]},h.prototype.readUInt16LE=function(e,t){return l(this,e,!0,t)},h.prototype.readUInt16BE=function(e,t){return l(this,e,!1,t)},h.prototype.readUInt32LE=function(e,t){return d(this,e,!0,t)},h.prototype.readUInt32BE=function(e,t){return d(this,e,!1,t)},h.prototype.readInt8=function(e,t){if(t||(D(null!=e,"missing offset"),D(e=this.length))return 128&this[e]?-1*(255-this[e]+1):this[e]},h.prototype.readInt16LE=function(e,t){return y(this,e,!0,t)},h.prototype.readInt16BE=function(e,t){return y(this,e,!1,t)},h.prototype.readInt32LE=function(e,t){return w(this,e,!0,t)},h.prototype.readInt32BE=function(e,t){return w(this,e,!1,t)},h.prototype.readFloatLE=function(e,t){return b(this,e,!0,t)},h.prototype.readFloatBE=function(e,t){return b(this,e,!1,t)},h.prototype.readDoubleLE=function(e,t){return m(this,e,!0,t)},h.prototype.readDoubleBE=function(e,t){return m(this,e,!1,t)},h.prototype.writeUInt8=function(e,t,n){n||(D(null!=e,"missing value"),D(null!=t,"missing offset"),D(t=this.length||(this[t]=e)},h.prototype.writeUInt16LE=function(e,t,n){v(this,e,t,!0,n)},h.prototype.writeUInt16BE=function(e,t,n){v(this,e,t,!1,n)},h.prototype.writeUInt32LE=function(e,t,n){_(this,e,t,!0,n)},h.prototype.writeUInt32BE=function(e,t,n){_(this,e,t,!1,n)},h.prototype.writeInt8=function(e,t,n){n||(D(null!=e,"missing value"),D(null!=t,"missing offset"),D(t=this.length||(0<=e?this.writeUInt8(e,t,n):this.writeUInt8(255+e+1,t,n))},h.prototype.writeInt16LE=function(e,t,n){E(this,e,t,!0,n)},h.prototype.writeInt16BE=function(e,t,n){E(this,e,t,!1,n)},h.prototype.writeInt32LE=function(e,t,n){I(this,e,t,!0,n)},h.prototype.writeInt32BE=function(e,t,n){I(this,e,t,!1,n)},h.prototype.writeFloatLE=function(e,t,n){A(this,e,t,!0,n)},h.prototype.writeFloatBE=function(e,t,n){A(this,e,t,!1,n)},h.prototype.writeDoubleLE=function(e,t,n){B(this,e,t,!0,n)},h.prototype.writeDoubleBE=function(e,t,n){B(this,e,t,!1,n)},h.prototype.fill=function(e,t,n){if(e=e||0,t=t||0,n=n||this.length,"string"==typeof e&&(e=e.charCodeAt(0)),D("number"==typeof e&&!isNaN(e),"value is not a number"),D(t<=n,"end < start"),n!==t&&0!==this.length){D(0<=t&&t"},h.prototype.toArrayBuffer=function(){if("undefined"==typeof Uint8Array)throw new Error("Buffer.toArrayBuffer not supported in this browser");if(h._useTypedArrays)return new h(this).buffer;for(var e=new Uint8Array(this.length),t=0,n=e.length;t=t.length||o>=e.length);o++)t[o+n]=e[o];return o}function M(e){try{return decodeURIComponent(e)}catch(e){return String.fromCharCode(65533)}}function N(e,t){D("number"==typeof e,"cannot write a non-number as a number"),D(0<=e,"specified a negative value for writing an unsigned value"),D(e<=t,"value is larger than maximum value for type"),D(Math.floor(e)===e,"value has a fractional component")}function Y(e,t,n){D("number"==typeof e,"cannot write a non-number as a number"),D(e<=t,"value larger than maximum allowed value"),D(n<=e,"value smaller than minimum allowed value"),D(Math.floor(e)===e,"value has a fractional component")}function F(e,t,n){D("number"==typeof e,"cannot write a non-number as a number"),D(e<=t,"value larger than maximum allowed value"),D(n<=e,"value smaller than minimum allowed value")}function D(e,t){if(!e)throw new Error(t||"Failed assertion")}h._augment=function(e){return e._isBuffer=!0,e._get=e.get,e._set=e.set,e.get=L.get,e.set=L.set,e.write=L.write,e.toString=L.toString,e.toLocaleString=L.toString,e.toJSON=L.toJSON,e.copy=L.copy,e.slice=L.slice,e.readUInt8=L.readUInt8,e.readUInt16LE=L.readUInt16LE,e.readUInt16BE=L.readUInt16BE,e.readUInt32LE=L.readUInt32LE,e.readUInt32BE=L.readUInt32BE,e.readInt8=L.readInt8,e.readInt16LE=L.readInt16LE,e.readInt16BE=L.readInt16BE,e.readInt32LE=L.readInt32LE,e.readInt32BE=L.readInt32BE,e.readFloatLE=L.readFloatLE,e.readFloatBE=L.readFloatBE,e.readDoubleLE=L.readDoubleLE,e.readDoubleBE=L.readDoubleBE,e.writeUInt8=L.writeUInt8,e.writeUInt16LE=L.writeUInt16LE,e.writeUInt16BE=L.writeUInt16BE,e.writeUInt32LE=L.writeUInt32LE,e.writeUInt32BE=L.writeUInt32BE,e.writeInt8=L.writeInt8,e.writeInt16LE=L.writeInt16LE,e.writeInt16BE=L.writeInt16BE,e.writeInt32LE=L.writeInt32LE,e.writeInt32BE=L.writeInt32BE,e.writeFloatLE=L.writeFloatLE,e.writeFloatBE=L.writeFloatBE,e.writeDoubleLE=L.writeDoubleLE,e.writeDoubleBE=L.writeDoubleBE,e.fill=L.fill,e.inspect=L.inspect,e.toArrayBuffer=L.toArrayBuffer,e}}).call(this,O("lYpoI2"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},O("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/buffer/index.js","/node_modules/gulp-browserify/node_modules/buffer")},{"base64-js":2,buffer:3,ieee754:11,lYpoI2:10}],4:[function(l,d,e){(function(e,t,u,n,r,o,i,a,s){u=l("buffer").Buffer;var f=4,c=new u(f);c.fill(0);d.exports={hash:function(e,t,n,r){return u.isBuffer(e)||(e=new u(e)),function(e,t,n){for(var r=new u(t),o=n?r.writeInt32BE:r.writeInt32LE,i=0;ih?t=e(t):t.length>5]|=128<>>9<<4)]=t;for(var n=1732584193,r=-271733879,o=-1732584194,i=271733878,u=0;u>>32-a,n);var u,a}function d(e,t,n,r,o,i,u){return l(t&n|~t&r,e,t,o,i,u)}function h(e,t,n,r,o,i,u){return l(t&r|n&~r,e,t,o,i,u)}function p(e,t,n,r,o,i,u){return l(t^n^r,e,t,o,i,u)}function g(e,t,n,r,o,i,u){return l(n^(t|~r),e,t,o,i,u)}function y(e,t){var n=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(n>>16)<<16|65535&n}b.exports=function(e){return f.hash(e,c,16)}}).call(this,w("lYpoI2"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},w("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/crypto-browserify/md5.js","/node_modules/gulp-browserify/node_modules/crypto-browserify")},{"./helpers":4,buffer:3,lYpoI2:10}],7:[function(e,l,t){(function(e,t,n,r,o,i,u,a,s){var f,c;f=function(e){for(var t,n=new Array(e),r=0;r>>((3&r)<<3)&255;return n},l.exports=c||f}).call(this,e("lYpoI2"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/crypto-browserify/rng.js","/node_modules/gulp-browserify/node_modules/crypto-browserify")},{buffer:3,lYpoI2:10}],8:[function(l,d,e){(function(e,t,n,r,o,i,u,a,s){var f=l("./helpers");function c(e,t){e[t>>5]|=128<<24-t%32,e[15+(t+64>>9<<4)]=t;for(var n,r=Array(80),o=1732584193,i=-271733879,u=-1732584194,a=271733878,s=-1009589776,f=0;f>16)+(t>>16)+(n>>16)<<16|65535&n}function m(e,t){return e<>>32-t}d.exports=function(e){return f.hash(e,c,20,!0)}}).call(this,l("lYpoI2"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},l("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/crypto-browserify/sha.js","/node_modules/gulp-browserify/node_modules/crypto-browserify")},{"./helpers":4,buffer:3,lYpoI2:10}],9:[function(l,d,e){(function(e,t,n,r,o,i,u,a,s){function B(e,t){var n=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(n>>16)<<16|65535&n}function L(e,t){return e>>>t|e<<32-t}function U(e,t){return e>>>t}function f(e,t){var n,r,o,i,u,a,s,f,c,l,d,h,p,g,y,w,b,m,v=new Array(1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298),_=new Array(1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225),E=new Array(64);e[t>>5]|=128<<24-t%32,e[15+(t+64>>9<<4)]=t;for(var I=0;I>1,c=-7,l=n?o-1:0,d=n?-1:1,h=e[t+l];for(l+=d,i=h&(1<<-c)-1,h>>=-c,c+=a;0>=-c,c+=r;0>1,d=23===o?Math.pow(2,-24)-Math.pow(2,-77):0,h=r?0:i-1,p=r?1:-1,g=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,u=c):(u=Math.floor(Math.log(t)/Math.LN2),t*(s=Math.pow(2,-u))<1&&(u--,s*=2),2<=(t+=1<=u+l?d/s:d*Math.pow(2,1-l))*s&&(u++,s/=2),c<=u+l?(a=0,u=c):1<=u+l?(a=(t*s-1)*Math.pow(2,o),u+=l):(a=t*Math.pow(2,l-1)*Math.pow(2,o),u=0));8<=o;e[n+h]=255&a,h+=p,a/=256,o-=8);for(u=u<