!function(){function t(t){return t.split("").reverse().join("")}function e(t,e,n){if((t[e]||t[n])&&t[e]===t[n])throw Error(e)}function n(e,n,r,i,o,s,a,u,l,c,p,f){a=f;var d,h=p="";return s&&(f=s(f)),!("number"!=typeof f||!isFinite(f))&&(e&&0===parseFloat(f.toFixed(e))&&(f=0),0>f&&(d=!0,f=Math.abs(f)),e&&(s=Math.pow(10,e),f=(Math.round(f*s)/s).toFixed(e)),-1!==(f=f.toString()).indexOf(".")&&(e=f.split("."),f=e[0],r&&(p=r+e[1])),n&&(f=t(f).match(/.{1,3}/g),f=t(f.join(t(n)))),d&&u&&(h+=u),i&&(h+=i),d&&l&&(h+=l),h=h+f+p,o&&(h+=o),c&&(h=c(h,a)),h)}function r(t,e,n,r,i,o,s,a,u,l,c,p){var f;return t="",c&&(p=c(p)),!(!p||"string"!=typeof p)&&(a&&p.substring(0,a.length)===a&&(p=p.replace(a,""),f=!0),r&&p.substring(0,r.length)===r&&(p=p.replace(r,"")),u&&p.substring(0,u.length)===u&&(p=p.replace(u,""),f=!0),i&&p.slice(-1*i.length)===i&&(p=p.slice(0,-1*i.length)),e&&(p=p.split(e).join("")),n&&(p=p.replace(n,".")),f&&(t+="-"),t=Number((t+p).replace(/[^0-9\.\-.]/g,"")),s&&(t=s(t)),!("number"!=typeof t||!isFinite(t))&&t)}function i(t,e,n){var r,i=[];for(r=0;ri&&(s[r]=i):"encoder"===r||"decoder"===r||"edit"===r||"undo"===r?"function"==typeof i&&(s[r]=i):"string"==typeof i&&(s[r]=i);return e(s,"mark","thousand"),e(s,"prefix","negative"),e(s,"prefix","negativeBefore"),s}(s),this.to=function(t){return i(s,n,t)},this.from=function(t){return i(s,r,t)})}}(),function(t){"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?module.exports=t():window.noUiSlider=t()}(function(){"use strict";function t(t,e){var n=document.createElement("div");return o(n,e),t.appendChild(n),n}function e(t){return"number"==typeof t&&!isNaN(t)&&isFinite(t)}function n(t,e,n){n>0&&(o(t,e),setTimeout(function(){s(t,e)},n))}function r(t){return Array.isArray(t)?t:[t]}function i(t){var e=(t=String(t)).split(".");return e.length>1?e[1].length:0}function o(t,e){t.classList?t.classList.add(e):t.className+=" "+e}function s(t,e){t.classList?t.classList.remove(e):t.className=t.className.replace(new RegExp("(^|\\b)"+e.split(" ").join("|")+"(\\b|$)","gi")," ")}function a(){var t=void 0!==window.pageXOffset,e="CSS1Compat"===(document.compatMode||"");return{x:t?window.pageXOffset:e?document.documentElement.scrollLeft:document.body.scrollLeft,y:t?window.pageYOffset:e?document.documentElement.scrollTop:document.body.scrollTop}}function u(t,e){return 100/(e-t)}function l(t,e){return 100*e/(t[1]-t[0])}function c(t,e){for(var n=1;t>=e[n];)n+=1;return n}function p(t,e,n){if(n>=t.slice(-1)[0])return 100;var r,i,o,s,a=c(n,t);return r=t[a-1],i=t[a],o=e[a-1],s=e[a],o+(p=[r,i],f=n,l(p,p[0]<0?f+Math.abs(p[0]):f-p[0])/u(o,s));var p,f}function f(t,e,n,r){if(100===r)return r;var i,o,s=c(r,t);return n?r-(i=t[s-1])>((o=t[s])-i)/2?o:i:e[s-1]?t[s-1]+(a=r-t[s-1],u=e[s-1],Math.round(a/u)*u):r;var a,u}function d(t,n,r){var i;if("number"==typeof n&&(n=[n]),"[object Array]"!==Object.prototype.toString.call(n))throw new Error("noUiSlider: 'range' contains invalid value.");if(!e(i="min"===t?0:"max"===t?100:parseFloat(t))||!e(n[0]))throw new Error("noUiSlider: 'range' value isn't numeric.");r.xPct.push(i),r.xVal.push(n[0]),i?r.xSteps.push(!isNaN(n[1])&&n[1]):isNaN(n[1])||(r.xSteps[0]=n[1]),r.xHighestCompleteStep.push(0)}function h(t,e,n){if(!e)return!0;n.xSteps[t]=l([n.xVal[t],n.xVal[t+1]],e)/u(n.xPct[t],n.xPct[t+1]);var r=(n.xVal[t+1]-n.xVal[t])/n.xNumSteps[t],i=Math.ceil(Number(r.toFixed(3))-1),o=n.xVal[t]+n.xNumSteps[t]*i;n.xHighestCompleteStep[t]=o}function m(t,e,n,r){this.xPct=[],this.xVal=[],this.xSteps=[r||!1],this.xNumSteps=[!1],this.xHighestCompleteStep=[],this.snap=e,this.direction=n;var i,o=[];for(i in t)t.hasOwnProperty(i)&&o.push([t[i],i]);for(o.length&&"object"==typeof o[0][0]?o.sort(function(t,e){return t[0][0]-e[0][0]}):o.sort(function(t,e){return t[0]-e[0]}),i=0;i=100)return t.slice(-1)[0];var r,i,o,s,a=c(n,e);return r=t[a-1],i=t[a],o=e[a-1],s=e[a],l=[r,i],(n-o)*u(o,s)*(l[1]-l[0])/100+l[0];var l}(this.xVal,this.xPct,t)},m.prototype.getStep=function(t){return t=f(this.xPct,this.xSteps,this.snap,t)},m.prototype.getNearbySteps=function(t){var e=c(t,this.xPct);return{stepBefore:{startValue:this.xVal[e-2],step:this.xNumSteps[e-2],highestStep:this.xHighestCompleteStep[e-2]},thisStep:{startValue:this.xVal[e-1],step:this.xNumSteps[e-1],highestStep:this.xHighestCompleteStep[e-1]},stepAfter:{startValue:this.xVal[e-0],step:this.xNumSteps[e-0],highestStep:this.xHighestCompleteStep[e-0]}}},m.prototype.countStepDecimals=function(){var t=this.xNumSteps.map(i);return Math.max.apply(null,t)},m.prototype.convert=function(t){return this.getStep(this.toStepping(t))};var g={to:function(t){return void 0!==t&&t.toFixed(2)},from:Number};function v(t,n){if(!e(n))throw new Error("noUiSlider: 'step' is not numeric.");t.singleStep=n}function b(t,e){if("object"!=typeof e||Array.isArray(e))throw new Error("noUiSlider: 'range' is not an object.");if(void 0===e.min||void 0===e.max)throw new Error("noUiSlider: Missing 'min' or 'max' in 'range'.");if(e.min===e.max)throw new Error("noUiSlider: 'range' 'min' and 'max' cannot be equal.");t.spectrum=new m(e,t.snap,t.dir,t.singleStep)}function w(t,e){if(e=r(e),!Array.isArray(e)||!e.length)throw new Error("noUiSlider: 'start' option is incorrect.");t.handles=e.length,t.start=e}function S(t,e){if(t.snap=e,"boolean"!=typeof e)throw new Error("noUiSlider: 'snap' option must be a boolean.")}function x(t,e){if(t.animate=e,"boolean"!=typeof e)throw new Error("noUiSlider: 'animate' option must be a boolean.")}function y(t,e){if(t.animationDuration=e,"number"!=typeof e)throw new Error("noUiSlider: 'animationDuration' option must be a number.")}function E(t,e){var n,r=[!1];if("lower"===e?e=[!0,!1]:"upper"===e&&(e=[!1,!0]),!0===e||!1===e){for(n=1;n=50)throw new Error("noUiSlider: 'padding' option must be less than half the range.")}}function P(t,e){switch(e){case"ltr":t.dir=0;break;case"rtl":t.dir=1;break;default:throw new Error("noUiSlider: 'direction' option was not recognized.")}}function k(t,e){if("string"!=typeof e)throw new Error("noUiSlider: 'behaviour' must be a string containing options.");var n=e.indexOf("tap")>=0,r=e.indexOf("drag")>=0,i=e.indexOf("fixed")>=0,o=e.indexOf("snap")>=0,s=e.indexOf("hover")>=0;if(i){if(2!==t.handles)throw new Error("noUiSlider: 'fixed' behaviour must be used with 2 handles");N(t,t.start[1]-t.start[0])}t.events={tap:n||o,drag:r,fixed:i,snap:o,hover:s}}function O(t,e){if(!1!==e)if(!0===e){t.tooltips=[];for(var n=0;n",a[1]&&(s+="
"+n.to(a[0])+"
");var o,a}),r.innerHTML=s,r}function N(t){var e=t.mode,n=t.density||1,r=t.filter||!1,i=function(t,e,n){var r={},i=b.xVal[0],o=b.xVal[b.xVal.length-1],s=!1,a=!1,u=0;l=n.slice().sort(function(t,e){return t-e});var l;return(n=l.filter(function(t){return!this[t]&&(this[t]=!0)},{}))[0]!==i&&(n.unshift(i),s=!0),n[n.length-1]!==o&&(n.push(o),a=!0),n.forEach(function(i,o){var l,c,p,f,d,h,m,g,v,w=i,S=n[o+1];if("steps"===e&&(l=b.xNumSteps[o]),l||(l=S-w),!1!==w&&void 0!==S){for(l=Math.max(l,1e-7),c=w;c<=S;x=c,y=l,c=(x+y).toFixed(7)/1){for(m=(d=(f=b.toStepping(c))-u)/t,v=d/(g=Math.round(m)),p=1;p<=g;p+=1)r[(u+p*v).toFixed(5)]=["x",0];h=n.indexOf(c)>-1?1:"steps"===e?2:0,!o&&s&&(h=0),c===S&&a||(r[f.toFixed(5)]=[c,h]),u=f}var x,y}}),r}(n,e,function(t,e,n){if("range"===t||"steps"===t)return b.xVal;if("count"===t){var r,i=100/(e-1),o=0;for(e=[];(r=o++*i)<=100;)e.push(r);t="positions"}return"positions"===t?e.map(function(t){return b.fromStepping(n?b.getStep(t):t)}):"values"===t?n?e.map(function(t){return b.fromStepping(b.getStep(b.toStepping(t)))}):e:void 0}(e,t.values||!1,t.stepped||!1)),o=t.format||{to:Math.round};return h.appendChild(C(i,r,o))}function U(){var t=l.getBoundingClientRect(),e="offset"+["Width","Height"][i.ort];return 0===i.ort?t.width||l[e]:t.height||l[e]}function M(t,e,n,r){var o=function(e){if(h.hasAttribute("disabled"))return!1;if(o=h,s=i.cssClasses.tap,o.classList?o.classList.contains(s):new RegExp("\\b"+s+"\\b").test(o.className))return!1;var o,s;return!!(e=function(t,e){t.preventDefault();var n,r,i=0===t.type.indexOf("touch"),o=0===t.type.indexOf("mouse"),s=0===t.type.indexOf("pointer");0===t.type.indexOf("MSPointer")&&(s=!0);if(i){if(t.touches.length>1)return!1;n=t.changedTouches[0].pageX,r=t.changedTouches[0].pageY}e=e||a(),(o||s)&&(n=t.clientX+e.x,r=t.clientY+e.y);return t.pageOffset=e,t.points=[n,r],t.cursor=o||s,t}(e,r.pageOffset))&&(!(t===d.start&&void 0!==e.buttons&&e.buttons>1)&&((!r.hover||!e.buttons)&&(e.calcPoint=e.points[i.ort],void n(e,r))))},s=[];return t.split(" ").forEach(function(t){e.addEventListener(t,o,!1),s.push([t,o])}),s}function P(t){var e=100*(t-function(t,e){var n=t.getBoundingClientRect(),r=t.ownerDocument.documentElement,i=a();return/webkit.*Chrome.*Mobile/i.test(navigator.userAgent)&&(i.x=0),e?n.top+i.y-r.clientTop:n.left+i.x-r.clientLeft}(l,i.ort))/U();return i.dir?100-e:e}function k(t,e,n,r){var i=n.slice(),o=[!t,t],s=[t,!t];r=r.slice(),t&&r.reverse(),r.length>1?r.forEach(function(t,n){var r=D(i,t,i[t]+e,o[n],s[n]);!1===r?e=0:(e=r-i[t],i[t]=r)}):o=s=[!0];var a=!1;r.forEach(function(t,r){a=R(t,n[t]+e,o[r],s[r])||a}),a&&r.forEach(function(t){O("update",t),O("slide",t)})}function O(t,e,n){Object.keys(S).forEach(function(r){var o=r.split(".")[0];t===o&&S[r].forEach(function(t){t.call(f,w.map(i.format.to),e,w.slice(),n||!1,m.slice())})})}function V(t,e){"mouseout"===t.type&&"HTML"===t.target.nodeName&&null===t.relatedTarget&&L(t,e)}function A(t,e){if(-1===navigator.appVersion.indexOf("MSIE 9")&&0===t.buttons&&0!==e.buttonsProperty)return L(t,e);var n=(i.dir?-1:1)*(t.calcPoint-e.startCalcPoint);k(n>0,100*n/e.baseSize,e.locations,e.handleNumbers)}function L(t,e){v&&(s(v,i.cssClasses.active),v=!1),t.cursor&&(document.body.style.cursor="",document.body.removeEventListener("selectstart",document.body.noUiListener)),document.documentElement.noUiListeners.forEach(function(t){document.documentElement.removeEventListener(t[0],t[1])}),s(h,i.cssClasses.drag),q(),e.handleNumbers.forEach(function(t){O("set",t),O("change",t),O("end",t)})}function F(t,e){if(1===e.handleNumbers.length){var n=c[e.handleNumbers[0]];if(n.hasAttribute("disabled"))return!1;o(v=n.children[0],i.cssClasses.active)}t.preventDefault(),t.stopPropagation();var r=M(d.move,document.documentElement,A,{startCalcPoint:t.calcPoint,baseSize:U(),pageOffset:t.pageOffset,handleNumbers:e.handleNumbers,buttonsProperty:t.buttons,locations:m.slice()}),s=M(d.end,document.documentElement,L,{handleNumbers:e.handleNumbers}),a=M("mouseout",document.documentElement,V,{handleNumbers:e.handleNumbers});if(document.documentElement.noUiListeners=r.concat(s,a),t.cursor){document.body.style.cursor=getComputedStyle(t.target).cursor,c.length>1&&o(h,i.cssClasses.drag);var u=function(){return!1};document.body.noUiListener=u,document.body.addEventListener("selectstart",u,!1)}e.handleNumbers.forEach(function(t){O("start",t)})}function z(t){t.stopPropagation();var e=P(t.calcPoint),r=function(t){var e=100,n=!1;return c.forEach(function(r,i){if(!r.hasAttribute("disabled")){var o=Math.abs(m[i]-t);o1&&(r&&e>0&&(n=Math.max(n,t[e-1]+i.margin)),o&&e1&&i.limit&&(r&&e>0&&(n=Math.min(n,t[e-1]+i.limit)),o&&e50?-1:1,n=3+(c.length+e*t);c[t].childNodes[0].style.zIndex=n})}function R(t,e,n,r){return!1!==(e=D(m,t,e,n,r))&&(function(t,e){m[t]=e,w[t]=b.fromStepping(e);var n=function(){c[t].style[i.style]=T(e),B(t),B(t+1)};window.requestAnimationFrame&&i.useRequestAnimationFrame?window.requestAnimationFrame(n):n()}(t,e),!0)}function B(t){if(p[t]){var e=0,n=100;0!==t&&(e=m[t-1]),t!==p.length-1&&(n=m[t]),p[t].style[i.style]=T(e),p[t].style[i.styleOposite]=T(100-n)}}function X(t,e){null!==t&&!1!==t&&("number"==typeof t&&(t=String(t)),!1===(t=i.format.from(t))||isNaN(t)||R(e,b.toStepping(t),!1,!1))}function Y(t,e){var o=r(t),s=void 0===m[0];e=void 0===e||!!e,o.forEach(X),i.animate&&!s&&n(h,i.cssClasses.tap,i.animationDuration),g.forEach(function(t){R(t,m[t],!0,!1)}),q(),g.forEach(function(t){O("update",t),null!==o[t]&&e&&O("set",t)})}function I(){var t=w.map(i.format.to);return 1===t.length?t[0]:t}function _(t,e){S[t]=S[t]||[],S[t].push(e),"update"===t.split(".")[0]&&c.forEach(function(t,e){O("update",e)})}if(h.noUiSlider)throw new Error("Slider was already initialized.");o(W=h,i.cssClasses.target),0===i.dir?o(W,i.cssClasses.ltr):o(W,i.cssClasses.rtl),0===i.ort?o(W,i.cssClasses.horizontal):o(W,i.cssClasses.vertical),l=t(W,i.cssClasses.base);var W;!function(t,e){c=[],(p=[]).push(y(e,t[0]));for(var n=0;nn.stepAfter.startValue&&(i=n.stepAfter.startValue-r),o=r>n.thisStep.startValue?n.thisStep.step:!1!==n.stepBefore.step&&r-n.stepBefore.highestStep,100===t?i=null:0===t&&(o=null);var s=b.countStepDecimals();return null!==i&&!1!==i&&(i=Number(i.toFixed(s))),null!==o&&!1!==o&&(o=Number(o.toFixed(s))),[o,i]})},on:_,off:function(t){var e=t&&t.split(".")[0],n=e&&t.substring(e.length);Object.keys(S).forEach(function(t){var r=t.split(".")[0],i=t.substring(r.length);e&&e!==r||n&&n!==i||delete S[t]})},get:I,set:Y,reset:function(t){Y(i.start,t)},__moveHandles:function(t,e,n){k(t,e,m,n)},options:u,updateOptions:function(t,e){var n=I(),r=["margin","limit","padding","range","animate","snap","step","format"];r.forEach(function(e){void 0!==t[e]&&(u[e]=t[e])});var o=j(u);r.forEach(function(e){void 0!==t[e]&&(i[e]=o[e])}),o.spectrum.direction=b.direction,b=o.spectrum,i.margin=o.margin,i.limit=o.limit,i.padding=o.padding,m=[],Y(t.start||n,e)},target:h,pips:N},($=i.events).fixed||c.forEach(function(t,e){M(d.start,t.children[0],F,{handleNumbers:[e]})}),$.tap&&M(d.start,l,z,{}),$.hover&&M(d.move,l,H,{hover:!0}),$.drag&&p.forEach(function(t,e){if(!1!==t&&0!==e&&e!==p.length-1){var n=c[e-1],r=c[e],s=[t];o(t,i.cssClasses.draggable),$.fixed&&(s.push(n.children[0]),s.push(r.children[0])),s.forEach(function(t){M(d.start,t,F,{handles:[n,r],handleNumbers:[e-1,e]})})}});var $;return Y(i.start),i.pips&&N(i.pips),i.tooltips&&function(){var t=c.map(E);_("update",function(e,n,r){if(t[n]){var o=e[n];!0!==i.tooltips[n]&&(o=i.tooltips[n].to(r[n])),t[n].innerHTML=""+o+""}})}(),f}return{create:function(t,e){if(!t.nodeName)throw new Error("noUiSlider.create requires a single element.");void 0===e.tooltips&&(e.tooltips=!0);var n=z(t,j(e),e);return t.noUiSlider=n,n}}});