String.prototype.toDate=function(){return new Date(moment(this.trim()).valueOf())};Number.prototype.formatPrice=function(){return"$"+this.toLocaleString()};Number.prototype.format=function(n,t,i,r){var f="\\d(?=(\\d{"+(t||3)+"})+"+(n>0?"\\D":"$")+")",u=this.toFixed(Math.max(0,~~n));return(r?u.replace(".",r):u).replace(new RegExp(f,"g"),"$&"+(i||","))};Number.prototype.formatShortPrice=function(){var t=parseInt(this),n=String(t);return t>=1e3&&t<=999999?"$"+n.substr(0,n.length-3)+"k":t>=1e6?"$"+n.substr(0,n.length-6)+"."+n.substr(n.length-6,1)+"M":"$"+t};String.prototype.parseInt=function(){try{return parseInt(String(this).replace(/[^0-9-.]/g,"")||0)}catch(n){}return 0};String.prototype.htmlEncode=function(){return String(this).replace(/&/g,"&amp;").replace(/"/g,"&quot;").replace(/'/g,"&#39;").replace(/</g,"&lt;").replace(/>/g,"&gt;")};String.prototype.repeat||function(){var n=function(){try{var n={},t=Object.defineProperty,i=t(n,n,n)&&t}catch(r){}return i}(),t=function(n){var i,t,r;if(this==null)throw TypeError();if(i=String(this),t=n?Number(n):0,t!=t&&(t=0),t<0||t==Infinity)throw RangeError();for(r="";t;)t%2==1&&(r+=i),t>1&&(i+=i),t>>=1;return r};n?n(String.prototype,"repeat",{value:t,configurable:!0,writable:!0}):String.prototype.repeat=t}();String.prototype.censorDirty=function(){for(var u,t=this,i=["motherfucker","fuck","bitch","ass","shit","bastard","bullshit","asshole","nigger","faggot","cocksucker","cunt","pussy"],e,f,r,n=0;n<i.length;n++)if(f="*".repeat(i[n].length),i[n].length<=3)for(r=t.split(" "),u=0;u<r.length;u++)r[u].toLowerCase()===i[n]&&(r[u]=f),t=r.join(" ");else e=new RegExp(i[n],"gi"),t=t.replace(e,f);return t};String.prototype.urlEncode=function(){return encodeURIComponent(String(this))};String.prototype.toProperCase=function(n){var u,t,r,i;for(n===undefined&&(n=!1),u="",r=this.split(" "),i=0;i<r.length;i++)n&&r[i]!=r[i].toUpperCase()&&r[i].toLowerCase()?(t=r[i],u.length>0&&(u+=" ")):n&&r[i]==r[i].toUpperCase()?(t=r[i],u.length>0&&(u+=" ")):(t=r[i].replace(/\w*/g,function(n){return n.charAt(0).toUpperCase()+n.substr(1).toLowerCase()}),t.length>2&&t[0]==="M"&&t[1]==="c"?t="Mc"+t[2].toUpperCase()+t.substr(3):t==="Defries"?t="DeFries":t==="Ditaranto"?t="DiTaranto":t==="Dubose"?t="DuBose":t==="Csd"?t="CSD":t==="Ta'mara"?t="Ta'Mara":t==="Shel-Lee"?t="Shel-lee":t==="Lagalbo"?t="LaGalbo":t==="O'donnell"?t="O'Donnell":t==="Renita"&&(t="ReNita"),u.length>0&&(u+=" ")),u+=t;return u};String.prototype.format=function(){var n=arguments;return this.replace(/{(\d+)}/g,function(t,i){return typeof n[i]!="undefined"?n[i]:t})};Number.prototype.between=function(n,t,i){i=i===undefined||i===null||i===!0?!0:!1;var r=Math.min.apply(Math,[n,t]),u=Math.max.apply(Math,[n,t]);return i?this>=r&&this<=u:this>r&&this<u};Array.prototype.last||(Array.prototype.last=function(){return this[this.length-1]})