From 0caa5731548add6dd79ef7e7180922df81845bd7 Mon Sep 17 00:00:00 2001 From: Huijie Wei Date: Tue, 9 Oct 2018 11:50:52 +0800 Subject: [PATCH 1/6] grid_scale options --- .gitignore | 3 +- bower.json | 2 +- js/ion.rangeSlider.js | 78 +++++++++++++++++++------------------ js/ion.rangeSlider.min.js | 82 +-------------------------------------- package.json | 2 +- 5 files changed, 46 insertions(+), 121 deletions(-) diff --git a/.gitignore b/.gitignore index 723ef36..597a84e 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ -.idea \ No newline at end of file +.idea +/node_modules \ No newline at end of file diff --git a/bower.json b/bower.json index e84800f..494084c 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "ion.rangeSlider", - "version": "2.2.0", + "version": "2.2.1", "homepage": "https://github.com/IonDen/ion.rangeSlider", "authors": [ { diff --git a/js/ion.rangeSlider.js b/js/ion.rangeSlider.js index 2fe2c8d..94fd1f2 100644 --- a/js/ion.rangeSlider.js +++ b/js/ion.rangeSlider.js @@ -10,7 +10,7 @@ // http://ionden.com/a/plugins/licence-en.html // ===================================================================================================================== -;(function(factory) { +;(function (factory) { if (typeof define === "function" && define.amd) { define(["jquery"], function (jQuery) { return factory(jQuery, document, window, navigator); @@ -20,7 +20,7 @@ } else { factory(jQuery, document, window, navigator); } -} (function ($, document, window, navigator, undefined) { +}(function ($, document, window, navigator, undefined) { "use strict"; // ================================================================================================================= @@ -42,7 +42,7 @@ } } return false; - } ()); + }()); if (!Function.prototype.bind) { Function.prototype.bind = function bind(that) { @@ -58,7 +58,8 @@ if (this instanceof bound) { - var F = function(){}; + var F = function () { + }; F.prototype = target.prototype; var self = new F(); @@ -86,7 +87,7 @@ }; } if (!Array.prototype.indexOf) { - Array.prototype.indexOf = function(searchElement, fromIndex) { + Array.prototype.indexOf = function (searchElement, fromIndex) { var k; if (this == null) { throw new TypeError('"this" is null or not defined'); @@ -115,7 +116,6 @@ } - // ================================================================================================================= // Template @@ -143,7 +143,6 @@ ''; - // ================================================================================================================= // Core @@ -262,7 +261,6 @@ }; - /** * get and validate config */ @@ -309,6 +307,7 @@ grid_margin: true, grid_num: 4, grid_snap: false, + grid_scale: [], hide_min_max: false, hide_from_to: false, @@ -377,6 +376,7 @@ grid_margin: $inp.data("gridMargin"), grid_num: $inp.data("gridNum"), grid_snap: $inp.data("gridSnap"), + grid_scale: $inp.data("gridScale"), hide_min_max: $inp.data("hideMinMax"), hide_from_to: $inp.data("hideFromTo"), @@ -426,7 +426,6 @@ } - // js config extends default config $.extend(config, options); @@ -436,13 +435,11 @@ this.options = config; - // validate config, to be sure that all data types are correct this.update_check = {}; this.validate(); - // default result object, returned to callbacks this.result = { input: this.$cache.input, @@ -461,7 +458,6 @@ }; - this.init(); }; @@ -750,7 +746,10 @@ x = $handle.offset().left; x += ($handle.width() / 2) - 1; - this.pointerClick("single", {preventDefault: function () {}, pageX: x}); + this.pointerClick("single", { + preventDefault: function () { + }, pageX: x + }); } }, @@ -803,7 +802,7 @@ if ($.contains(this.$cache.cont[0], e.target) || this.dragging) { this.callOnFinish(); } - + this.dragging = false; }, @@ -989,7 +988,6 @@ }, - // ============================================================================================================= // Calculations @@ -1204,7 +1202,7 @@ return; } - if (this.coords.x_pointer < 0 || isNaN(this.coords.x_pointer) ) { + if (this.coords.x_pointer < 0 || isNaN(this.coords.x_pointer)) { this.coords.x_pointer = 0; } else if (this.coords.x_pointer > this.coords.w_rs) { this.coords.x_pointer = this.coords.w_rs; @@ -1316,7 +1314,6 @@ }, - // ============================================================================================================= // Drawings @@ -1636,7 +1633,6 @@ }, - /** * Write values to input element */ @@ -1660,7 +1656,6 @@ }, - // ============================================================================================================= // Callbacks @@ -1710,8 +1705,6 @@ }, - - // ============================================================================================================= // Service methods @@ -2185,7 +2178,6 @@ html = ''; - this.calcGridMargin(); if (o.grid_snap) { @@ -2251,7 +2243,6 @@ this.coords.big_num = Math.ceil(big_num + 1); - this.$cache.cont.addClass("irs-with-grid"); this.$cache.grid.html(html); this.cacheGridLabels(); @@ -2298,8 +2289,21 @@ } } - this.calcGridCollision(2, start, finish); - this.calcGridCollision(4, start, finish); + + if (this.options.grid_scale.length > 0) { + for (i = 0; i < num; i++) { + label = this.$cache.grid_labels[i][0]; + + if ($.inArray($(label).html(), this.options.grid_scale)) { + label.style.visibility = "visible"; + } else { + label.style.visibility = "hidden"; + } + } + } else { + this.calcGridCollision(2, start, finish); + this.calcGridCollision(4, start, finish); + } for (i = 0; i < num; i++) { label = this.$cache.grid_labels[i][0]; @@ -2347,7 +2351,7 @@ } else { this.coords.w_handle = this.$cache.s_from.outerWidth(false); } - this.coords.p_handle = this.toFixed(this.coords.w_handle / this.coords.w_rs * 100); + this.coords.p_handle = this.toFixed(this.coords.w_handle / this.coords.w_rs * 100); this.coords.grid_gap = this.toFixed((this.coords.p_handle / 2) - 0.1); this.$cache.grid[0].style.width = this.toFixed(100 - this.coords.p_handle) + "%"; @@ -2355,7 +2359,6 @@ }, - // ============================================================================================================= // Public methods @@ -2405,7 +2408,7 @@ }; $.fn.ionRangeSlider = function (options) { - return this.each(function() { + return this.each(function () { if (!$.data(this, "ionRangeSlider")) { $.data(this, "ionRangeSlider", new IonRangeSlider(this, options, plugin_count++)); } @@ -2413,7 +2416,6 @@ }; - // ================================================================================================================= // http://paulirish.com/2011/requestanimationframe-for-smart-animating/ // http://my.opera.com/emoller/blog/2011/12/20/requestanimationframe-for-smart-er-animating @@ -2422,27 +2424,29 @@ // MIT license - (function() { + (function () { var lastTime = 0; var vendors = ['ms', 'moz', 'webkit', 'o']; - for(var x = 0; x < vendors.length && !window.requestAnimationFrame; ++x) { - window.requestAnimationFrame = window[vendors[x]+'RequestAnimationFrame']; - window.cancelAnimationFrame = window[vendors[x]+'CancelAnimationFrame'] - || window[vendors[x]+'CancelRequestAnimationFrame']; + for (var x = 0; x < vendors.length && !window.requestAnimationFrame; ++x) { + window.requestAnimationFrame = window[vendors[x] + 'RequestAnimationFrame']; + window.cancelAnimationFrame = window[vendors[x] + 'CancelAnimationFrame'] + || window[vendors[x] + 'CancelRequestAnimationFrame']; } if (!window.requestAnimationFrame) - window.requestAnimationFrame = function(callback, element) { + window.requestAnimationFrame = function (callback, element) { var currTime = new Date().getTime(); var timeToCall = Math.max(0, 16 - (currTime - lastTime)); - var id = window.setTimeout(function() { callback(currTime + timeToCall); }, + var id = window.setTimeout(function () { + callback(currTime + timeToCall); + }, timeToCall); lastTime = currTime + timeToCall; return id; }; if (!window.cancelAnimationFrame) - window.cancelAnimationFrame = function(id) { + window.cancelAnimationFrame = function (id) { clearTimeout(id); }; }()); diff --git a/js/ion.rangeSlider.min.js b/js/ion.rangeSlider.min.js index 0f05850..7b2d144 100644 --- a/js/ion.rangeSlider.min.js +++ b/js/ion.rangeSlider.min.js @@ -1,81 +1 @@ -// Ion.RangeSlider | version 2.2.0 | https://github.com/IonDen/ion.rangeSlider -;(function(f){"function"===typeof define&&define.amd?define(["jquery"],function(n){return f(n,document,window,navigator)}):"object"===typeof exports?f(require("jquery"),document,window,navigator):f(jQuery,document,window,navigator)})(function(f,n,k,r,p){var t=0,m=function(){var a=r.userAgent,b=/msie\s\d+/i;return 0a)?(f("html").addClass("lt-ie9"),!0):!1}();Function.prototype.bind||(Function.prototype.bind=function(a){var b=this,d=[].slice;if("function"!= -typeof b)throw new TypeError;var c=d.call(arguments,1),e=function(){if(this instanceof e){var g=function(){};g.prototype=b.prototype;var g=new g,l=b.apply(g,c.concat(d.call(arguments)));return Object(l)===l?l:g}return b.apply(a,c.concat(d.call(arguments)))};return e});Array.prototype.indexOf||(Array.prototype.indexOf=function(a,b){if(null==this)throw new TypeError('"this" is null or not defined');var d=Object(this),c=d.length>>>0;if(0===c)return-1;var e=+b||0;Infinity===Math.abs(e)&&(e=0);if(e>=c)return-1; -for(e=Math.max(0<=e?e:c-Math.abs(e),0);e!",c[0]);c={type:c.data("type"),min:c.data("min"),max:c.data("max"),from:c.data("from"),to:c.data("to"),step:c.data("step"), -min_interval:c.data("minInterval"),max_interval:c.data("maxInterval"),drag_interval:c.data("dragInterval"),values:c.data("values"),from_fixed:c.data("fromFixed"),from_min:c.data("fromMin"),from_max:c.data("fromMax"),from_shadow:c.data("fromShadow"),to_fixed:c.data("toFixed"),to_min:c.data("toMin"),to_max:c.data("toMax"),to_shadow:c.data("toShadow"),prettify_enabled:c.data("prettifyEnabled"),prettify_separator:c.data("prettifySeparator"),force_edges:c.data("forceEdges"),keyboard:c.data("keyboard"), -grid:c.data("grid"),grid_margin:c.data("gridMargin"),grid_num:c.data("gridNum"),grid_snap:c.data("gridSnap"),hide_min_max:c.data("hideMinMax"),hide_from_to:c.data("hideFromTo"),prefix:c.data("prefix"),postfix:c.data("postfix"),max_postfix:c.data("maxPostfix"),decorate_both:c.data("decorateBoth"),values_separator:c.data("valuesSeparator"),input_values_separator:c.data("inputValuesSeparator"),disable:c.data("disable"),block:c.data("block"),extra_classes:c.data("extraClasses")};c.values=c.values&&c.values.split(","); -for(e in c)c.hasOwnProperty(e)&&(c[e]!==p&&""!==c[e]||delete c[e]);a!==p&&""!==a&&(a=a.split(c.input_values_separator||b.input_values_separator||";"),a[0]&&a[0]==+a[0]&&(a[0]=+a[0]),a[1]&&a[1]==+a[1]&&(a[1]=+a[1]),b&&b.values&&b.values.length?(d.from=a[0]&&b.values.indexOf(a[0]),d.to=a[1]&&b.values.indexOf(a[1])):(d.from=a[0]&&+a[0],d.to=a[1]&&+a[1]));f.extend(d,b);f.extend(d,c);this.options=d;this.update_check={};this.validate();this.result={input:this.$cache.input,slider:null,min:this.options.min, -max:this.options.max,from:this.options.from,from_percent:0,from_value:null,to:this.options.to,to_percent:0,to_value:null};this.init()};q.prototype={init:function(a){this.no_diapason=!1;this.coords.p_step=this.convertToPercent(this.options.step,!0);this.target="base";this.toggleInput();this.append();this.setMinMax();a?(this.force_redraw=!0,this.calc(!0),this.callOnUpdate()):(this.force_redraw=!0,this.calc(!0),this.callOnStart());this.updateScene()},append:function(){this.$cache.input.before('');this.$cache.input.prop("readonly",!0);this.$cache.cont=this.$cache.input.prev();this.result.slider=this.$cache.cont;this.$cache.cont.html('01000'); -this.$cache.rs=this.$cache.cont.find(".irs");this.$cache.min=this.$cache.cont.find(".irs-min");this.$cache.max=this.$cache.cont.find(".irs-max");this.$cache.from=this.$cache.cont.find(".irs-from");this.$cache.to=this.$cache.cont.find(".irs-to");this.$cache.single=this.$cache.cont.find(".irs-single");this.$cache.bar=this.$cache.cont.find(".irs-bar");this.$cache.line=this.$cache.cont.find(".irs-line");this.$cache.grid=this.$cache.cont.find(".irs-grid");"single"===this.options.type?(this.$cache.cont.append(''), -this.$cache.edge=this.$cache.cont.find(".irs-bar-edge"),this.$cache.s_single=this.$cache.cont.find(".single"),this.$cache.from[0].style.visibility="hidden",this.$cache.to[0].style.visibility="hidden",this.$cache.shad_single=this.$cache.cont.find(".shadow-single")):(this.$cache.cont.append(''),this.$cache.s_from=this.$cache.cont.find(".from"), -this.$cache.s_to=this.$cache.cont.find(".to"),this.$cache.shad_from=this.$cache.cont.find(".shadow-from"),this.$cache.shad_to=this.$cache.cont.find(".shadow-to"),this.setTopHandler());this.options.hide_from_to&&(this.$cache.from[0].style.display="none",this.$cache.to[0].style.display="none",this.$cache.single[0].style.display="none");this.appendGrid();this.options.disable?(this.appendDisableMask(),this.$cache.input[0].disabled=!0):(this.$cache.input[0].disabled=!1,this.removeDisableMask(),this.bindEvents()); -this.options.disable||(this.options.block?this.appendDisableMask():this.removeDisableMask());this.options.drag_interval&&(this.$cache.bar[0].style.cursor="ew-resize")},setTopHandler:function(){var a=this.options.max,b=this.options.to;this.options.from>this.options.min&&b===a?this.$cache.s_from.addClass("type_last"):b');this.$cache.cont.addClass("irs-disabled")},removeDisableMask:function(){this.$cache.cont.remove(".irs-disable-mask");this.$cache.cont.removeClass("irs-disabled")},remove:function(){this.$cache.cont.remove();this.$cache.cont= -null;this.$cache.line.off("keydown.irs_"+this.plugin_count);this.$cache.body.off("touchmove.irs_"+this.plugin_count);this.$cache.body.off("mousemove.irs_"+this.plugin_count);this.$cache.win.off("touchend.irs_"+this.plugin_count);this.$cache.win.off("mouseup.irs_"+this.plugin_count);m&&(this.$cache.body.off("mouseup.irs_"+this.plugin_count),this.$cache.body.off("mouseleave.irs_"+this.plugin_count));this.$cache.grid_labels=[];this.coords.big=[];this.coords.big_w=[];this.coords.big_p=[];this.coords.big_x= -[];cancelAnimationFrame(this.raf_id)},bindEvents:function(){if(!this.no_diapason){this.$cache.body.on("touchmove.irs_"+this.plugin_count,this.pointerMove.bind(this));this.$cache.body.on("mousemove.irs_"+this.plugin_count,this.pointerMove.bind(this));this.$cache.win.on("touchend.irs_"+this.plugin_count,this.pointerUp.bind(this));this.$cache.win.on("mouseup.irs_"+this.plugin_count,this.pointerUp.bind(this));this.$cache.line.on("touchstart.irs_"+this.plugin_count,this.pointerClick.bind(this,"click")); -this.$cache.line.on("mousedown.irs_"+this.plugin_count,this.pointerClick.bind(this,"click"));this.$cache.line.on("focus.irs_"+this.plugin_count,this.pointerFocus.bind(this));this.options.drag_interval&&"double"===this.options.type?(this.$cache.bar.on("touchstart.irs_"+this.plugin_count,this.pointerDown.bind(this,"both")),this.$cache.bar.on("mousedown.irs_"+this.plugin_count,this.pointerDown.bind(this,"both"))):(this.$cache.bar.on("touchstart.irs_"+this.plugin_count,this.pointerClick.bind(this,"click")), -this.$cache.bar.on("mousedown.irs_"+this.plugin_count,this.pointerClick.bind(this,"click")));"single"===this.options.type?(this.$cache.single.on("touchstart.irs_"+this.plugin_count,this.pointerDown.bind(this,"single")),this.$cache.s_single.on("touchstart.irs_"+this.plugin_count,this.pointerDown.bind(this,"single")),this.$cache.shad_single.on("touchstart.irs_"+this.plugin_count,this.pointerClick.bind(this,"click")),this.$cache.single.on("mousedown.irs_"+this.plugin_count,this.pointerDown.bind(this, -"single")),this.$cache.s_single.on("mousedown.irs_"+this.plugin_count,this.pointerDown.bind(this,"single")),this.$cache.edge.on("mousedown.irs_"+this.plugin_count,this.pointerClick.bind(this,"click")),this.$cache.shad_single.on("mousedown.irs_"+this.plugin_count,this.pointerClick.bind(this,"click"))):(this.$cache.single.on("touchstart.irs_"+this.plugin_count,this.pointerDown.bind(this,null)),this.$cache.single.on("mousedown.irs_"+this.plugin_count,this.pointerDown.bind(this,null)),this.$cache.from.on("touchstart.irs_"+ -this.plugin_count,this.pointerDown.bind(this,"from")),this.$cache.s_from.on("touchstart.irs_"+this.plugin_count,this.pointerDown.bind(this,"from")),this.$cache.to.on("touchstart.irs_"+this.plugin_count,this.pointerDown.bind(this,"to")),this.$cache.s_to.on("touchstart.irs_"+this.plugin_count,this.pointerDown.bind(this,"to")),this.$cache.shad_from.on("touchstart.irs_"+this.plugin_count,this.pointerClick.bind(this,"click")),this.$cache.shad_to.on("touchstart.irs_"+this.plugin_count,this.pointerClick.bind(this, -"click")),this.$cache.from.on("mousedown.irs_"+this.plugin_count,this.pointerDown.bind(this,"from")),this.$cache.s_from.on("mousedown.irs_"+this.plugin_count,this.pointerDown.bind(this,"from")),this.$cache.to.on("mousedown.irs_"+this.plugin_count,this.pointerDown.bind(this,"to")),this.$cache.s_to.on("mousedown.irs_"+this.plugin_count,this.pointerDown.bind(this,"to")),this.$cache.shad_from.on("mousedown.irs_"+this.plugin_count,this.pointerClick.bind(this,"click")),this.$cache.shad_to.on("mousedown.irs_"+ -this.plugin_count,this.pointerClick.bind(this,"click")));if(this.options.keyboard)this.$cache.line.on("keydown.irs_"+this.plugin_count,this.key.bind(this,"keyboard"));m&&(this.$cache.body.on("mouseup.irs_"+this.plugin_count,this.pointerUp.bind(this)),this.$cache.body.on("mouseleave.irs_"+this.plugin_count,this.pointerUp.bind(this)))}},pointerFocus:function(a){if(!this.target){var b="single"===this.options.type?this.$cache.single:this.$cache.from;a=b.offset().left;a+=b.width()/2-1;this.pointerClick("single", -{preventDefault:function(){},pageX:a})}},pointerMove:function(a){this.dragging&&(this.coords.x_pointer=(a.pageX||a.originalEvent.touches&&a.originalEvent.touches[0].pageX)-this.coords.x_gap,this.calc())},pointerUp:function(a){this.current_plugin===this.plugin_count&&this.is_active&&(this.is_active=!1,this.$cache.cont.find(".state_hover").removeClass("state_hover"),this.force_redraw=!0,m&&f("*").prop("unselectable",!1),this.updateScene(),this.restoreOriginalMinInterval(),(f.contains(this.$cache.cont[0], -a.target)||this.dragging)&&this.callOnFinish(),this.dragging=!1)},pointerDown:function(a,b){b.preventDefault();var d=b.pageX||b.originalEvent.touches&&b.originalEvent.touches[0].pageX;2!==b.button&&("both"===a&&this.setTempMinInterval(),a||(a=this.target||"from"),this.current_plugin=this.plugin_count,this.target=a,this.dragging=this.is_active=!0,this.coords.x_gap=this.$cache.rs.offset().left,this.coords.x_pointer=d-this.coords.x_gap,this.calcPointerPercent(),this.changeLevel(a),m&&f("*").prop("unselectable", -!0),this.$cache.line.trigger("focus"),this.updateScene())},pointerClick:function(a,b){b.preventDefault();var d=b.pageX||b.originalEvent.touches&&b.originalEvent.touches[0].pageX;2!==b.button&&(this.current_plugin=this.plugin_count,this.target=a,this.is_click=!0,this.coords.x_gap=this.$cache.rs.offset().left,this.coords.x_pointer=+(d-this.coords.x_gap).toFixed(),this.force_redraw=!0,this.calc(),this.$cache.line.trigger("focus"))},key:function(a,b){if(!(this.current_plugin!==this.plugin_count||b.altKey|| -b.ctrlKey||b.shiftKey||b.metaKey)){switch(b.which){case 83:case 65:case 40:case 37:b.preventDefault();this.moveByKey(!1);break;case 87:case 68:case 38:case 39:b.preventDefault(),this.moveByKey(!0)}return!0}},moveByKey:function(a){var b=this.coords.p_pointer,d=(this.options.max-this.options.min)/100,d=this.options.step/d;this.coords.x_pointer=this.toFixed(this.coords.w_rs/100*(a?b+d:b-d));this.is_key=!0;this.calc()},setMinMax:function(){if(this.options)if(this.options.hide_min_max)this.$cache.min[0].style.display= -"none",this.$cache.max[0].style.display="none";else{if(this.options.values.length)this.$cache.min.html(this.decorate(this.options.p_values[this.options.min])),this.$cache.max.html(this.decorate(this.options.p_values[this.options.max]));else{var a=this._prettify(this.options.min),b=this._prettify(this.options.max);this.result.min_pretty=a;this.result.max_pretty=b;this.$cache.min.html(this.decorate(a,this.options.min));this.$cache.max.html(this.decorate(b,this.options.max))}this.labels.w_min=this.$cache.min.outerWidth(!1); -this.labels.w_max=this.$cache.max.outerWidth(!1)}},setTempMinInterval:function(){var a=this.result.to-this.result.from;null===this.old_min_interval&&(this.old_min_interval=this.options.min_interval);this.options.min_interval=a},restoreOriginalMinInterval:function(){null!==this.old_min_interval&&(this.options.min_interval=this.old_min_interval,this.old_min_interval=null)},calc:function(a){if(this.options){this.calc_count++;if(10===this.calc_count||a)this.calc_count=0,this.coords.w_rs=this.$cache.rs.outerWidth(!1), -this.calcHandlePercent();if(this.coords.w_rs){this.calcPointerPercent();a=this.getHandleX();"both"===this.target&&(this.coords.p_gap=0,a=this.getHandleX());"click"===this.target&&(this.coords.p_gap=this.coords.p_handle/2,a=this.getHandleX(),this.target=this.options.drag_interval?"both_one":this.chooseHandle(a));switch(this.target){case "base":var b=(this.options.max-this.options.min)/100;a=(this.result.from-this.options.min)/b;b=(this.result.to-this.options.min)/b;this.coords.p_single_real=this.toFixed(a); -this.coords.p_from_real=this.toFixed(a);this.coords.p_to_real=this.toFixed(b);this.coords.p_single_real=this.checkDiapason(this.coords.p_single_real,this.options.from_min,this.options.from_max);this.coords.p_from_real=this.checkDiapason(this.coords.p_from_real,this.options.from_min,this.options.from_max);this.coords.p_to_real=this.checkDiapason(this.coords.p_to_real,this.options.to_min,this.options.to_max);this.coords.p_single_fake=this.convertToFakePercent(this.coords.p_single_real);this.coords.p_from_fake= -this.convertToFakePercent(this.coords.p_from_real);this.coords.p_to_fake=this.convertToFakePercent(this.coords.p_to_real);this.target=null;break;case "single":if(this.options.from_fixed)break;this.coords.p_single_real=this.convertToRealPercent(a);this.coords.p_single_real=this.calcWithStep(this.coords.p_single_real);this.coords.p_single_real=this.checkDiapason(this.coords.p_single_real,this.options.from_min,this.options.from_max);this.coords.p_single_fake=this.convertToFakePercent(this.coords.p_single_real); -break;case "from":if(this.options.from_fixed)break;this.coords.p_from_real=this.convertToRealPercent(a);this.coords.p_from_real=this.calcWithStep(this.coords.p_from_real);this.coords.p_from_real>this.coords.p_to_real&&(this.coords.p_from_real=this.coords.p_to_real);this.coords.p_from_real=this.checkDiapason(this.coords.p_from_real,this.options.from_min,this.options.from_max);this.coords.p_from_real=this.checkMinInterval(this.coords.p_from_real,this.coords.p_to_real,"from");this.coords.p_from_real= -this.checkMaxInterval(this.coords.p_from_real,this.coords.p_to_real,"from");this.coords.p_from_fake=this.convertToFakePercent(this.coords.p_from_real);break;case "to":if(this.options.to_fixed)break;this.coords.p_to_real=this.convertToRealPercent(a);this.coords.p_to_real=this.calcWithStep(this.coords.p_to_real);this.coords.p_to_realb&&(b=0,d=b+a);100this.coords.x_pointer||isNaN(this.coords.x_pointer)?this.coords.x_pointer= -0:this.coords.x_pointer>this.coords.w_rs&&(this.coords.x_pointer=this.coords.w_rs),this.coords.p_pointer=this.toFixed(this.coords.x_pointer/this.coords.w_rs*100)):this.coords.p_pointer=0},convertToRealPercent:function(a){return a/(100-this.coords.p_handle)*100},convertToFakePercent:function(a){return a/100*(100-this.coords.p_handle)},getHandleX:function(){var a=100-this.coords.p_handle,b=this.toFixed(this.coords.p_pointer-this.coords.p_gap);0>b?b=0:b>a&&(b=a);return b},calcHandlePercent:function(){this.coords.w_handle= -"single"===this.options.type?this.$cache.s_single.outerWidth(!1):this.$cache.s_from.outerWidth(!1);this.coords.p_handle=this.toFixed(this.coords.w_handle/this.coords.w_rs*100)},chooseHandle:function(a){return"single"===this.options.type?"single":a>=this.coords.p_from_real+(this.coords.p_to_real-this.coords.p_from_real)/2?this.options.to_fixed?"from":"to":this.options.from_fixed?"to":"from"},calcMinMax:function(){this.coords.w_rs&&(this.labels.p_min=this.labels.w_min/this.coords.w_rs*100,this.labels.p_max= -this.labels.w_max/this.coords.w_rs*100)},calcLabels:function(){this.coords.w_rs&&!this.options.hide_from_to&&("single"===this.options.type?(this.labels.w_single=this.$cache.single.outerWidth(!1),this.labels.p_single_fake=this.labels.w_single/this.coords.w_rs*100,this.labels.p_single_left=this.coords.p_single_fake+this.coords.p_handle/2-this.labels.p_single_fake/2):(this.labels.w_from=this.$cache.from.outerWidth(!1),this.labels.p_from_fake=this.labels.w_from/this.coords.w_rs*100,this.labels.p_from_left= -this.coords.p_from_fake+this.coords.p_handle/2-this.labels.p_from_fake/2,this.labels.p_from_left=this.toFixed(this.labels.p_from_left),this.labels.p_from_left=this.checkEdges(this.labels.p_from_left,this.labels.p_from_fake),this.labels.w_to=this.$cache.to.outerWidth(!1),this.labels.p_to_fake=this.labels.w_to/this.coords.w_rs*100,this.labels.p_to_left=this.coords.p_to_fake+this.coords.p_handle/2-this.labels.p_to_fake/2,this.labels.p_to_left=this.toFixed(this.labels.p_to_left),this.labels.p_to_left= -this.checkEdges(this.labels.p_to_left,this.labels.p_to_fake),this.labels.w_single=this.$cache.single.outerWidth(!1),this.labels.p_single_fake=this.labels.w_single/this.coords.w_rs*100,this.labels.p_single_left=(this.labels.p_from_left+this.labels.p_to_left+this.labels.p_to_fake)/2-this.labels.p_single_fake/2,this.labels.p_single_left=this.toFixed(this.labels.p_single_left)),this.labels.p_single_left=this.checkEdges(this.labels.p_single_left,this.labels.p_single_fake))},updateScene:function(){this.raf_id&& -(cancelAnimationFrame(this.raf_id),this.raf_id=null);clearTimeout(this.update_tm);this.update_tm=null;this.options&&(this.drawHandles(),this.is_active?this.raf_id=requestAnimationFrame(this.updateScene.bind(this)):this.update_tm=setTimeout(this.updateScene.bind(this),300))},drawHandles:function(){this.coords.w_rs=this.$cache.rs.outerWidth(!1);if(this.coords.w_rs){this.coords.w_rs!==this.coords.w_rs_old&&(this.target="base",this.is_resize=!0);if(this.coords.w_rs!==this.coords.w_rs_old||this.force_redraw)this.setMinMax(), -this.calc(!0),this.drawLabels(),this.options.grid&&(this.calcGridMargin(),this.calcGridLabels()),this.force_redraw=!0,this.coords.w_rs_old=this.coords.w_rs,this.drawShadow();if(this.coords.w_rs&&(this.dragging||this.force_redraw||this.is_key)){if(this.old_from!==this.result.from||this.old_to!==this.result.to||this.force_redraw||this.is_key){this.drawLabels();this.$cache.bar[0].style.left=this.coords.p_bar_x+"%";this.$cache.bar[0].style.width=this.coords.p_bar_w+"%";if("single"===this.options.type)this.$cache.s_single[0].style.left= -this.coords.p_single_fake+"%";else{this.$cache.s_from[0].style.left=this.coords.p_from_fake+"%";this.$cache.s_to[0].style.left=this.coords.p_to_fake+"%";if(this.old_from!==this.result.from||this.force_redraw)this.$cache.from[0].style.left=this.labels.p_from_left+"%";if(this.old_to!==this.result.to||this.force_redraw)this.$cache.to[0].style.left=this.labels.p_to_left+"%"}this.$cache.single[0].style.left=this.labels.p_single_left+"%";this.writeToInput();this.old_from===this.result.from&&this.old_to=== -this.result.to||this.is_start||(this.$cache.input.trigger("change"),this.$cache.input.trigger("input"));this.old_from=this.result.from;this.old_to=this.result.to;this.is_resize||this.is_update||this.is_start||this.is_finish||this.callOnChange();if(this.is_key||this.is_click)this.is_click=this.is_key=!1,this.callOnFinish();this.is_finish=this.is_resize=this.is_update=!1}this.force_redraw=this.is_click=this.is_key=this.is_start=!1}}},drawLabels:function(){if(this.options){var a=this.options.values.length, -b=this.options.p_values;if(!this.options.hide_from_to)if("single"===this.options.type){if(a)a=this.decorate(b[this.result.from]);else{var d=this._prettify(this.result.from);a=this.decorate(d,this.result.from)}this.$cache.single.html(a);this.calcLabels();this.$cache.min[0].style.visibility=this.labels.p_single_left100-this.labels.p_max-1?"hidden":"visible"}else{a?(this.options.decorate_both? -(a=this.decorate(b[this.result.from]),a+=this.options.values_separator,a+=this.decorate(b[this.result.to])):a=this.decorate(b[this.result.from]+this.options.values_separator+b[this.result.to]),d=this.decorate(b[this.result.from]),b=this.decorate(b[this.result.to])):(d=this._prettify(this.result.from),b=this._prettify(this.result.to),this.options.decorate_both?(a=this.decorate(d,this.result.from),a+=this.options.values_separator,a+=this.decorate(b,this.result.to)):a=this.decorate(d+this.options.values_separator+ -b,this.result.to),d=this.decorate(d,this.result.from),b=this.decorate(b,this.result.to));this.$cache.single.html(a);this.$cache.from.html(d);this.$cache.to.html(b);this.calcLabels();a=Math.min(this.labels.p_single_left,this.labels.p_from_left);d=this.labels.p_single_left+this.labels.p_single_fake;var b=this.labels.p_to_left+this.labels.p_to_fake,c=Math.max(d,b);this.labels.p_from_left+this.labels.p_from_fake>=this.labels.p_to_left?(this.$cache.from[0].style.visibility="hidden",this.$cache.to[0].style.visibility= -"hidden",this.$cache.single[0].style.visibility="visible",this.result.from===this.result.to?("from"===this.target?this.$cache.from[0].style.visibility="visible":"to"===this.target?this.$cache.to[0].style.visibility="visible":this.target||(this.$cache.from[0].style.visibility="visible"),this.$cache.single[0].style.visibility="hidden",c=b):(this.$cache.from[0].style.visibility="hidden",this.$cache.to[0].style.visibility="hidden",this.$cache.single[0].style.visibility="visible",c=Math.max(d,b))):(this.$cache.from[0].style.visibility= -"visible",this.$cache.to[0].style.visibility="visible",this.$cache.single[0].style.visibility="hidden");this.$cache.min[0].style.visibility=a100-this.labels.p_max-1?"hidden":"visible"}}},drawShadow:function(){var a=this.options,b=this.$cache,d="number"===typeof a.from_min&&!isNaN(a.from_min),c="number"===typeof a.from_max&&!isNaN(a.from_max),e="number"===typeof a.to_min&&!isNaN(a.to_min),g="number"===typeof a.to_max&&!isNaN(a.to_max); -"single"===a.type?a.from_shadow&&(d||c)?(d=this.convertToPercent(d?a.from_min:a.min),c=this.convertToPercent(c?a.from_max:a.max)-d,d=this.toFixed(d-this.coords.p_handle/100*d),c=this.toFixed(c-this.coords.p_handle/100*c),d+=this.coords.p_handle/2,b.shad_single[0].style.display="block",b.shad_single[0].style.left=d+"%",b.shad_single[0].style.width=c+"%"):b.shad_single[0].style.display="none":(a.from_shadow&&(d||c)?(d=this.convertToPercent(d?a.from_min:a.min),c=this.convertToPercent(c?a.from_max:a.max)- -d,d=this.toFixed(d-this.coords.p_handle/100*d),c=this.toFixed(c-this.coords.p_handle/100*c),d+=this.coords.p_handle/2,b.shad_from[0].style.display="block",b.shad_from[0].style.left=d+"%",b.shad_from[0].style.width=c+"%"):b.shad_from[0].style.display="none",a.to_shadow&&(e||g)?(e=this.convertToPercent(e?a.to_min:a.min),a=this.convertToPercent(g?a.to_max:a.max)-e,e=this.toFixed(e-this.coords.p_handle/100*e),a=this.toFixed(a-this.coords.p_handle/100*a),e+=this.coords.p_handle/2,b.shad_to[0].style.display= -"block",b.shad_to[0].style.left=e+"%",b.shad_to[0].style.width=a+"%"):b.shad_to[0].style.display="none")},writeToInput:function(){"single"===this.options.type?(this.options.values.length?this.$cache.input.prop("value",this.result.from_value):this.$cache.input.prop("value",this.result.from),this.$cache.input.data("from",this.result.from)):(this.options.values.length?this.$cache.input.prop("value",this.result.from_value+this.options.input_values_separator+this.result.to_value):this.$cache.input.prop("value", -this.result.from+this.options.input_values_separator+this.result.to),this.$cache.input.data("from",this.result.from),this.$cache.input.data("to",this.result.to))},callOnStart:function(){this.writeToInput();if(this.options.onStart&&"function"===typeof this.options.onStart)if(this.options.scope)this.options.onStart.call(this.options.scope,this.result);else this.options.onStart(this.result)},callOnChange:function(){this.writeToInput();if(this.options.onChange&&"function"===typeof this.options.onChange)if(this.options.scope)this.options.onChange.call(this.options.scope, -this.result);else this.options.onChange(this.result)},callOnFinish:function(){this.writeToInput();if(this.options.onFinish&&"function"===typeof this.options.onFinish)if(this.options.scope)this.options.onFinish.call(this.options.scope,this.result);else this.options.onFinish(this.result)},callOnUpdate:function(){this.writeToInput();if(this.options.onUpdate&&"function"===typeof this.options.onUpdate)if(this.options.scope)this.options.onUpdate.call(this.options.scope,this.result);else this.options.onUpdate(this.result)}, -toggleInput:function(){this.$cache.input.toggleClass("irs-hidden-input");this.has_tab_index?this.$cache.input.prop("tabindex",-1):this.$cache.input.removeProp("tabindex");this.has_tab_index=!this.has_tab_index},convertToPercent:function(a,b){var d=this.options.max-this.options.min;return d?this.toFixed((b?a:a-this.options.min)/(d/100)):(this.no_diapason=!0,0)},convertToValue:function(a){var b=this.options.min,d=this.options.max,c=b.toString().split(".")[1],e=d.toString().split(".")[1],g,l,f=0,h=0; -if(0===a)return this.options.min;if(100===a)return this.options.max;c&&(f=g=c.length);e&&(f=l=e.length);g&&l&&(f=g>=l?g:l);0>b&&(h=Math.abs(b),b=+(b+h).toFixed(f),d=+(d+h).toFixed(f));a=(d-b)/100*a+b;(b=this.options.step.toString().split(".")[1])?a=+a.toFixed(b.length):(a/=this.options.step,a*=this.options.step,a=+a.toFixed(0));h&&(a-=h);h=b?+a.toFixed(b.length):this.toFixed(a);hthis.options.max&&(h=this.options.max);return h},calcWithStep:function(a){var b= -Math.round(a/this.coords.p_step)*this.coords.p_step;100c.max_interval&&(a=b-c.max_interval):a-b>c.max_interval&&(a=b+c.max_interval);return this.convertToPercent(a)},checkDiapason:function(a,b,d){a=this.convertToValue(a);var c=this.options;"number"!==typeof b&&(b=c.min);"number"!==typeof d&&(d=c.max);ad&&(a=d);return this.convertToPercent(a)},toFixed:function(a){a=a.toFixed(20);return+a},_prettify:function(a){return this.options.prettify_enabled?this.options.prettify&&"function"===typeof this.options.prettify?this.options.prettify(a): -this.prettify(a):a},prettify:function(a){return a.toString().replace(/(\d{1,3}(?=(?:\d\d\d)+(?!\d)))/g,"$1"+this.options.prettify_separator)},checkEdges:function(a,b){if(!this.options.force_edges)return this.toFixed(a);0>a?a=0:a>100-b&&(a=100-b);return this.toFixed(a)},validate:function(){var a=this.options,b=this.result,d=a.values,c=d.length,e;"string"===typeof a.min&&(a.min=+a.min);"string"===typeof a.max&&(a.max=+a.max);"string"===typeof a.from&&(a.from=+a.from);"string"===typeof a.to&&(a.to=+a.to); -"string"===typeof a.step&&(a.step=+a.step);"string"===typeof a.from_min&&(a.from_min=+a.from_min);"string"===typeof a.from_max&&(a.from_max=+a.from_max);"string"===typeof a.to_min&&(a.to_min=+a.to_min);"string"===typeof a.to_max&&(a.to_max=+a.to_max);"string"===typeof a.grid_num&&(a.grid_num=+a.grid_num);a.maxa.max&&(a.from=a.max)):(a.froma.max&&(a.from=a.max),a.toa.max&&(a.to=a.max),this.update_check.from&&(this.update_check.from!==a.from&&a.from>a.to&&(a.from=a.to),this.update_check.to!==a.to&&a.toa.to&&(a.from=a.to),a.toa.step)a.step=1;"number"===typeof a.from_min&&a.froma.from_max&&(a.from=a.from_max);"number"===typeof a.to_min&&a.toa.to_max&&(a.to=a.to_max);if(b){b.min!==a.min&&(b.min=a.min);b.max!==a.max&&(b.max=a.max);if(b.fromb.max)b.from=a.from;if(b.tob.max)b.to=a.to}if("number"!==typeof a.min_interval||isNaN(a.min_interval)|| -!a.min_interval||0>a.min_interval)a.min_interval=0;if("number"!==typeof a.max_interval||isNaN(a.max_interval)||!a.max_interval||0>a.max_interval)a.max_interval=0;a.min_interval&&a.min_interval>a.max-a.min&&(a.min_interval=a.max-a.min);a.max_interval&&a.max_interval>a.max-a.min&&(a.max_interval=a.max-a.min)},decorate:function(a,b){var d="",c=this.options;c.prefix&&(d+=c.prefix);d+=a;c.max_postfix&&(c.values.length&&a===c.p_values[c.max]?(d+=c.max_postfix,c.postfix&&(d+=" ")):b===c.max&&(d+=c.max_postfix, -c.postfix&&(d+=" ")));c.postfix&&(d+=c.postfix);return d},updateFrom:function(){this.result.from=this.options.from;this.result.from_percent=this.convertToPercent(this.result.from);this.result.from_pretty=this._prettify(this.result.from);this.options.values&&(this.result.from_value=this.options.values[this.result.from])},updateTo:function(){this.result.to=this.options.to;this.result.to_percent=this.convertToPercent(this.result.to);this.result.to_pretty=this._prettify(this.result.to);this.options.values&& -(this.result.to_value=this.options.values[this.result.to])},updateResult:function(){this.result.min=this.options.min;this.result.max=this.options.max;this.updateFrom();this.updateTo()},appendGrid:function(){if(this.options.grid){var a=this.options,b;var d=a.max-a.min;var c=a.grid_num,e=4,g="";this.calcGridMargin();if(a.grid_snap)if(50'}g+='';b=this.convertToValue(h);b=a.values.length?a.p_values[b]:this._prettify(b);g+=''+b+""}this.coords.big_num=Math.ceil(c+1);this.$cache.cont.addClass("irs-with-grid"); -this.$cache.grid.html(g);this.cacheGridLabels()}},cacheGridLabels:function(){var a,b=this.coords.big_num;for(a=0;a100+this.coords.grid_gap&&(d[c-1]=100+this.coords.grid_gap,b[c-1]=this.toFixed(d[c-1]-this.coords.big_p[c-1]),this.coords.big_x[c-1]=this.toFixed(this.coords.big_p[c-1]-this.coords.grid_gap)));this.calcGridCollision(2, -b,d);this.calcGridCollision(4,b,d);for(a=0;a=e)break;var f=this.$cache.grid_labels[g][0];f.style.visibility=d[c]<=b[g]?"visible":"hidden"}},calcGridMargin:function(){this.options.grid_margin&&(this.coords.w_rs=this.$cache.rs.outerWidth(!1),this.coords.w_rs&&(this.coords.w_handle= -"single"===this.options.type?this.$cache.s_single.outerWidth(!1):this.$cache.s_from.outerWidth(!1),this.coords.p_handle=this.toFixed(this.coords.w_handle/this.coords.w_rs*100),this.coords.grid_gap=this.toFixed(this.coords.p_handle/2-.1),this.$cache.grid[0].style.width=this.toFixed(100-this.coords.p_handle)+"%",this.$cache.grid[0].style.left=this.coords.grid_gap+"%"))},update:function(a){this.input&&(this.is_update=!0,this.options.from=this.result.from,this.options.to=this.result.to,this.update_check.from= -this.result.from,this.update_check.to=this.result.to,this.options=f.extend(this.options,a),this.validate(),this.updateResult(a),this.toggleInput(),this.remove(),this.init(!0))},reset:function(){this.input&&(this.updateResult(),this.update())},destroy:function(){this.input&&(this.toggleInput(),this.$cache.input.prop("readonly",!1),f.data(this.input,"ionRangeSlider",null),this.remove(),this.options=this.input=null)}};f.fn.ionRangeSlider=function(a){return this.each(function(){f.data(this,"ionRangeSlider")|| -f.data(this,"ionRangeSlider",new q(this,a,t++))})};(function(){for(var a=0,b=["ms","moz","webkit","o"],d=0;d0&&r.exec(h).toString().split(" ")[1]<9&&(t("html").addClass("lt-ie9"),!0));Function.prototype.bind||(Function.prototype.bind=function(t){var i=this,s=[].slice;if("function"!=typeof i)throw new TypeError;var o=s.call(arguments,1),e=function(){if(this instanceof e){var h=function(){};h.prototype=i.prototype;var r=new h,n=i.apply(r,o.concat(s.call(arguments)));return Object(n)===n?n:r}return i.apply(t,o.concat(s.call(arguments)))};return e}),Array.prototype.indexOf||(Array.prototype.indexOf=function(t,i){var s;if(null==this)throw new TypeError('"this" is null or not defined');var o=Object(this),e=o.length>>>0;if(0===e)return-1;var h=+i||0;if(Math.abs(h)===1/0&&(h=0),h>=e)return-1;for(s=Math.max(h>=0?h:e-Math.abs(h),0);s!",l[0]),(a={type:l.data("type"),min:l.data("min"),max:l.data("max"),from:l.data("from"),to:l.data("to"),step:l.data("step"),min_interval:l.data("minInterval"),max_interval:l.data("maxInterval"),drag_interval:l.data("dragInterval"),values:l.data("values"),from_fixed:l.data("fromFixed"),from_min:l.data("fromMin"),from_max:l.data("fromMax"),from_shadow:l.data("fromShadow"),to_fixed:l.data("toFixed"),to_min:l.data("toMin"),to_max:l.data("toMax"),to_shadow:l.data("toShadow"),prettify_enabled:l.data("prettifyEnabled"),prettify_separator:l.data("prettifySeparator"),force_edges:l.data("forceEdges"),keyboard:l.data("keyboard"),grid:l.data("grid"),grid_margin:l.data("gridMargin"),grid_num:l.data("gridNum"),grid_snap:l.data("gridSnap"),grid_scale:l.data("gridScale"),hide_min_max:l.data("hideMinMax"),hide_from_to:l.data("hideFromTo"),prefix:l.data("prefix"),postfix:l.data("postfix"),max_postfix:l.data("maxPostfix"),decorate_both:l.data("decorateBoth"),values_separator:l.data("valuesSeparator"),input_values_separator:l.data("inputValuesSeparator"),disable:l.data("disable"),block:l.data("block"),extra_classes:l.data("extraClasses")}).values=a.values&&a.values.split(",");for(c in a)a.hasOwnProperty(c)&&(a[c]!==e&&""!==a[c]||delete a[c]);_!==e&&""!==_&&((_=_.split(a.input_values_separator||h.input_values_separator||";"))[0]&&_[0]==+_[0]&&(_[0]=+_[0]),_[1]&&_[1]==+_[1]&&(_[1]=+_[1]),h&&h.values&&h.values.length?(n.from=_[0]&&h.values.indexOf(_[0]),n.to=_[1]&&h.values.indexOf(_[1])):(n.from=_[0]&&+_[0],n.to=_[1]&&+_[1])),t.extend(n,h),t.extend(n,a),this.options=n,this.update_check={},this.validate(),this.result={input:this.$cache.input,slider:null,min:this.options.min,max:this.options.max,from:this.options.from,from_percent:0,from_value:null,to:this.options.to,to_percent:0,to_value:null},this.init()};c.prototype={init:function(t){this.no_diapason=!1,this.coords.p_step=this.convertToPercent(this.options.step,!0),this.target="base",this.toggleInput(),this.append(),this.setMinMax(),t?(this.force_redraw=!0,this.calc(!0),this.callOnUpdate()):(this.force_redraw=!0,this.calc(!0),this.callOnStart()),this.updateScene()},append:function(){var t='';this.$cache.input.before(t),this.$cache.input.prop("readonly",!0),this.$cache.cont=this.$cache.input.prev(),this.result.slider=this.$cache.cont,this.$cache.cont.html('01000'),this.$cache.rs=this.$cache.cont.find(".irs"),this.$cache.min=this.$cache.cont.find(".irs-min"),this.$cache.max=this.$cache.cont.find(".irs-max"),this.$cache.from=this.$cache.cont.find(".irs-from"),this.$cache.to=this.$cache.cont.find(".irs-to"),this.$cache.single=this.$cache.cont.find(".irs-single"),this.$cache.bar=this.$cache.cont.find(".irs-bar"),this.$cache.line=this.$cache.cont.find(".irs-line"),this.$cache.grid=this.$cache.cont.find(".irs-grid"),"single"===this.options.type?(this.$cache.cont.append(''),this.$cache.edge=this.$cache.cont.find(".irs-bar-edge"),this.$cache.s_single=this.$cache.cont.find(".single"),this.$cache.from[0].style.visibility="hidden",this.$cache.to[0].style.visibility="hidden",this.$cache.shad_single=this.$cache.cont.find(".shadow-single")):(this.$cache.cont.append(''),this.$cache.s_from=this.$cache.cont.find(".from"),this.$cache.s_to=this.$cache.cont.find(".to"),this.$cache.shad_from=this.$cache.cont.find(".shadow-from"),this.$cache.shad_to=this.$cache.cont.find(".shadow-to"),this.setTopHandler()),this.options.hide_from_to&&(this.$cache.from[0].style.display="none",this.$cache.to[0].style.display="none",this.$cache.single[0].style.display="none"),this.appendGrid(),this.options.disable?(this.appendDisableMask(),this.$cache.input[0].disabled=!0):(this.$cache.input[0].disabled=!1,this.removeDisableMask(),this.bindEvents()),this.options.disable||(this.options.block?this.appendDisableMask():this.removeDisableMask()),this.options.drag_interval&&(this.$cache.bar[0].style.cursor="ew-resize")},setTopHandler:function(){var t=this.options.min,i=this.options.max,s=this.options.from,o=this.options.to;s>t&&o===i?this.$cache.s_from.addClass("type_last"):o'),this.$cache.cont.addClass("irs-disabled")},removeDisableMask:function(){this.$cache.cont.remove(".irs-disable-mask"),this.$cache.cont.removeClass("irs-disabled")},remove:function(){this.$cache.cont.remove(),this.$cache.cont=null,this.$cache.line.off("keydown.irs_"+this.plugin_count),this.$cache.body.off("touchmove.irs_"+this.plugin_count),this.$cache.body.off("mousemove.irs_"+this.plugin_count),this.$cache.win.off("touchend.irs_"+this.plugin_count),this.$cache.win.off("mouseup.irs_"+this.plugin_count),a&&(this.$cache.body.off("mouseup.irs_"+this.plugin_count),this.$cache.body.off("mouseleave.irs_"+this.plugin_count)),this.$cache.grid_labels=[],this.coords.big=[],this.coords.big_w=[],this.coords.big_p=[],this.coords.big_x=[],cancelAnimationFrame(this.raf_id)},bindEvents:function(){this.no_diapason||(this.$cache.body.on("touchmove.irs_"+this.plugin_count,this.pointerMove.bind(this)),this.$cache.body.on("mousemove.irs_"+this.plugin_count,this.pointerMove.bind(this)),this.$cache.win.on("touchend.irs_"+this.plugin_count,this.pointerUp.bind(this)),this.$cache.win.on("mouseup.irs_"+this.plugin_count,this.pointerUp.bind(this)),this.$cache.line.on("touchstart.irs_"+this.plugin_count,this.pointerClick.bind(this,"click")),this.$cache.line.on("mousedown.irs_"+this.plugin_count,this.pointerClick.bind(this,"click")),this.$cache.line.on("focus.irs_"+this.plugin_count,this.pointerFocus.bind(this)),this.options.drag_interval&&"double"===this.options.type?(this.$cache.bar.on("touchstart.irs_"+this.plugin_count,this.pointerDown.bind(this,"both")),this.$cache.bar.on("mousedown.irs_"+this.plugin_count,this.pointerDown.bind(this,"both"))):(this.$cache.bar.on("touchstart.irs_"+this.plugin_count,this.pointerClick.bind(this,"click")),this.$cache.bar.on("mousedown.irs_"+this.plugin_count,this.pointerClick.bind(this,"click"))),"single"===this.options.type?(this.$cache.single.on("touchstart.irs_"+this.plugin_count,this.pointerDown.bind(this,"single")),this.$cache.s_single.on("touchstart.irs_"+this.plugin_count,this.pointerDown.bind(this,"single")),this.$cache.shad_single.on("touchstart.irs_"+this.plugin_count,this.pointerClick.bind(this,"click")),this.$cache.single.on("mousedown.irs_"+this.plugin_count,this.pointerDown.bind(this,"single")),this.$cache.s_single.on("mousedown.irs_"+this.plugin_count,this.pointerDown.bind(this,"single")),this.$cache.edge.on("mousedown.irs_"+this.plugin_count,this.pointerClick.bind(this,"click")),this.$cache.shad_single.on("mousedown.irs_"+this.plugin_count,this.pointerClick.bind(this,"click"))):(this.$cache.single.on("touchstart.irs_"+this.plugin_count,this.pointerDown.bind(this,null)),this.$cache.single.on("mousedown.irs_"+this.plugin_count,this.pointerDown.bind(this,null)),this.$cache.from.on("touchstart.irs_"+this.plugin_count,this.pointerDown.bind(this,"from")),this.$cache.s_from.on("touchstart.irs_"+this.plugin_count,this.pointerDown.bind(this,"from")),this.$cache.to.on("touchstart.irs_"+this.plugin_count,this.pointerDown.bind(this,"to")),this.$cache.s_to.on("touchstart.irs_"+this.plugin_count,this.pointerDown.bind(this,"to")),this.$cache.shad_from.on("touchstart.irs_"+this.plugin_count,this.pointerClick.bind(this,"click")),this.$cache.shad_to.on("touchstart.irs_"+this.plugin_count,this.pointerClick.bind(this,"click")),this.$cache.from.on("mousedown.irs_"+this.plugin_count,this.pointerDown.bind(this,"from")),this.$cache.s_from.on("mousedown.irs_"+this.plugin_count,this.pointerDown.bind(this,"from")),this.$cache.to.on("mousedown.irs_"+this.plugin_count,this.pointerDown.bind(this,"to")),this.$cache.s_to.on("mousedown.irs_"+this.plugin_count,this.pointerDown.bind(this,"to")),this.$cache.shad_from.on("mousedown.irs_"+this.plugin_count,this.pointerClick.bind(this,"click")),this.$cache.shad_to.on("mousedown.irs_"+this.plugin_count,this.pointerClick.bind(this,"click"))),this.options.keyboard&&this.$cache.line.on("keydown.irs_"+this.plugin_count,this.key.bind(this,"keyboard")),a&&(this.$cache.body.on("mouseup.irs_"+this.plugin_count,this.pointerUp.bind(this)),this.$cache.body.on("mouseleave.irs_"+this.plugin_count,this.pointerUp.bind(this))))},pointerFocus:function(t){var i,s;this.target||(i=(s="single"===this.options.type?this.$cache.single:this.$cache.from).offset().left,i+=s.width()/2-1,this.pointerClick("single",{preventDefault:function(){},pageX:i}))},pointerMove:function(t){if(this.dragging){var i=t.pageX||t.originalEvent.touches&&t.originalEvent.touches[0].pageX;this.coords.x_pointer=i-this.coords.x_gap,this.calc()}},pointerUp:function(i){this.current_plugin===this.plugin_count&&this.is_active&&(this.is_active=!1,this.$cache.cont.find(".state_hover").removeClass("state_hover"),this.force_redraw=!0,a&&t("*").prop("unselectable",!1),this.updateScene(),this.restoreOriginalMinInterval(),(t.contains(this.$cache.cont[0],i.target)||this.dragging)&&this.callOnFinish(),this.dragging=!1)},pointerDown:function(i,s){s.preventDefault();var o=s.pageX||s.originalEvent.touches&&s.originalEvent.touches[0].pageX;2!==s.button&&("both"===i&&this.setTempMinInterval(),i||(i=this.target||"from"),this.current_plugin=this.plugin_count,this.target=i,this.is_active=!0,this.dragging=!0,this.coords.x_gap=this.$cache.rs.offset().left,this.coords.x_pointer=o-this.coords.x_gap,this.calcPointerPercent(),this.changeLevel(i),a&&t("*").prop("unselectable",!0),this.$cache.line.trigger("focus"),this.updateScene())},pointerClick:function(t,i){i.preventDefault();var s=i.pageX||i.originalEvent.touches&&i.originalEvent.touches[0].pageX;2!==i.button&&(this.current_plugin=this.plugin_count,this.target=t,this.is_click=!0,this.coords.x_gap=this.$cache.rs.offset().left,this.coords.x_pointer=+(s-this.coords.x_gap).toFixed(),this.force_redraw=!0,this.calc(),this.$cache.line.trigger("focus"))},key:function(t,i){if(!(this.current_plugin!==this.plugin_count||i.altKey||i.ctrlKey||i.shiftKey||i.metaKey)){switch(i.which){case 83:case 65:case 40:case 37:i.preventDefault(),this.moveByKey(!1);break;case 87:case 68:case 38:case 39:i.preventDefault(),this.moveByKey(!0)}return!0}},moveByKey:function(t){var i=this.coords.p_pointer,s=(this.options.max-this.options.min)/100;s=this.options.step/s,t?i+=s:i-=s,this.coords.x_pointer=this.toFixed(this.coords.w_rs/100*i),this.is_key=!0,this.calc()},setMinMax:function(){if(this.options){if(this.options.hide_min_max)return this.$cache.min[0].style.display="none",void(this.$cache.max[0].style.display="none");if(this.options.values.length)this.$cache.min.html(this.decorate(this.options.p_values[this.options.min])),this.$cache.max.html(this.decorate(this.options.p_values[this.options.max]));else{var t=this._prettify(this.options.min),i=this._prettify(this.options.max);this.result.min_pretty=t,this.result.max_pretty=i,this.$cache.min.html(this.decorate(t,this.options.min)),this.$cache.max.html(this.decorate(i,this.options.max))}this.labels.w_min=this.$cache.min.outerWidth(!1),this.labels.w_max=this.$cache.max.outerWidth(!1)}},setTempMinInterval:function(){var t=this.result.to-this.result.from;null===this.old_min_interval&&(this.old_min_interval=this.options.min_interval),this.options.min_interval=t},restoreOriginalMinInterval:function(){null!==this.old_min_interval&&(this.options.min_interval=this.old_min_interval,this.old_min_interval=null)},calc:function(t){if(this.options&&(this.calc_count++,(10===this.calc_count||t)&&(this.calc_count=0,this.coords.w_rs=this.$cache.rs.outerWidth(!1),this.calcHandlePercent()),this.coords.w_rs)){this.calcPointerPercent();var i=this.getHandleX();switch("both"===this.target&&(this.coords.p_gap=0,i=this.getHandleX()),"click"===this.target&&(this.coords.p_gap=this.coords.p_handle/2,i=this.getHandleX(),this.options.drag_interval?this.target="both_one":this.target=this.chooseHandle(i)),this.target){case"base":var s=(this.options.max-this.options.min)/100,o=(this.result.from-this.options.min)/s,e=(this.result.to-this.options.min)/s;this.coords.p_single_real=this.toFixed(o),this.coords.p_from_real=this.toFixed(o),this.coords.p_to_real=this.toFixed(e),this.coords.p_single_real=this.checkDiapason(this.coords.p_single_real,this.options.from_min,this.options.from_max),this.coords.p_from_real=this.checkDiapason(this.coords.p_from_real,this.options.from_min,this.options.from_max),this.coords.p_to_real=this.checkDiapason(this.coords.p_to_real,this.options.to_min,this.options.to_max),this.coords.p_single_fake=this.convertToFakePercent(this.coords.p_single_real),this.coords.p_from_fake=this.convertToFakePercent(this.coords.p_from_real),this.coords.p_to_fake=this.convertToFakePercent(this.coords.p_to_real),this.target=null;break;case"single":if(this.options.from_fixed)break;this.coords.p_single_real=this.convertToRealPercent(i),this.coords.p_single_real=this.calcWithStep(this.coords.p_single_real),this.coords.p_single_real=this.checkDiapason(this.coords.p_single_real,this.options.from_min,this.options.from_max),this.coords.p_single_fake=this.convertToFakePercent(this.coords.p_single_real);break;case"from":if(this.options.from_fixed)break;this.coords.p_from_real=this.convertToRealPercent(i),this.coords.p_from_real=this.calcWithStep(this.coords.p_from_real),this.coords.p_from_real>this.coords.p_to_real&&(this.coords.p_from_real=this.coords.p_to_real),this.coords.p_from_real=this.checkDiapason(this.coords.p_from_real,this.options.from_min,this.options.from_max),this.coords.p_from_real=this.checkMinInterval(this.coords.p_from_real,this.coords.p_to_real,"from"),this.coords.p_from_real=this.checkMaxInterval(this.coords.p_from_real,this.coords.p_to_real,"from"),this.coords.p_from_fake=this.convertToFakePercent(this.coords.p_from_real);break;case"to":if(this.options.to_fixed)break;this.coords.p_to_real=this.convertToRealPercent(i),this.coords.p_to_real=this.calcWithStep(this.coords.p_to_real),this.coords.p_to_real100&&(c=(l=100)-n),this.coords.p_from_real=this.calcWithStep(c),this.coords.p_from_real=this.checkDiapason(this.coords.p_from_real,this.options.from_min,this.options.from_max),this.coords.p_from_fake=this.convertToFakePercent(this.coords.p_from_real),this.coords.p_to_real=this.calcWithStep(l),this.coords.p_to_real=this.checkDiapason(this.coords.p_to_real,this.options.to_min,this.options.to_max),this.coords.p_to_fake=this.convertToFakePercent(this.coords.p_to_real)}"single"===this.options.type?(this.coords.p_bar_x=this.coords.p_handle/2,this.coords.p_bar_w=this.coords.p_single_fake,this.result.from_percent=this.coords.p_single_real,this.result.from=this.convertToValue(this.coords.p_single_real),this.result.from_pretty=this._prettify(this.result.from),this.options.values.length&&(this.result.from_value=this.options.values[this.result.from])):(this.coords.p_bar_x=this.toFixed(this.coords.p_from_fake+this.coords.p_handle/2),this.coords.p_bar_w=this.toFixed(this.coords.p_to_fake-this.coords.p_from_fake),this.result.from_percent=this.coords.p_from_real,this.result.from=this.convertToValue(this.coords.p_from_real),this.result.from_pretty=this._prettify(this.result.from),this.result.to_percent=this.coords.p_to_real,this.result.to=this.convertToValue(this.coords.p_to_real),this.result.to_pretty=this._prettify(this.result.to),this.options.values.length&&(this.result.from_value=this.options.values[this.result.from],this.result.to_value=this.options.values[this.result.to])),this.calcMinMax(),this.calcLabels()}},calcPointerPercent:function(){this.coords.w_rs?(this.coords.x_pointer<0||isNaN(this.coords.x_pointer)?this.coords.x_pointer=0:this.coords.x_pointer>this.coords.w_rs&&(this.coords.x_pointer=this.coords.w_rs),this.coords.p_pointer=this.toFixed(this.coords.x_pointer/this.coords.w_rs*100)):this.coords.p_pointer=0},convertToRealPercent:function(t){return t/(100-this.coords.p_handle)*100},convertToFakePercent:function(t){return t/100*(100-this.coords.p_handle)},getHandleX:function(){var t=100-this.coords.p_handle,i=this.toFixed(this.coords.p_pointer-this.coords.p_gap);return i<0?i=0:i>t&&(i=t),i},calcHandlePercent:function(){"single"===this.options.type?this.coords.w_handle=this.$cache.s_single.outerWidth(!1):this.coords.w_handle=this.$cache.s_from.outerWidth(!1),this.coords.p_handle=this.toFixed(this.coords.w_handle/this.coords.w_rs*100)},chooseHandle:function(t){return"single"===this.options.type?"single":t>=this.coords.p_from_real+(this.coords.p_to_real-this.coords.p_from_real)/2?this.options.to_fixed?"from":"to":this.options.from_fixed?"to":"from"},calcMinMax:function(){this.coords.w_rs&&(this.labels.p_min=this.labels.w_min/this.coords.w_rs*100,this.labels.p_max=this.labels.w_max/this.coords.w_rs*100)},calcLabels:function(){this.coords.w_rs&&!this.options.hide_from_to&&("single"===this.options.type?(this.labels.w_single=this.$cache.single.outerWidth(!1),this.labels.p_single_fake=this.labels.w_single/this.coords.w_rs*100,this.labels.p_single_left=this.coords.p_single_fake+this.coords.p_handle/2-this.labels.p_single_fake/2,this.labels.p_single_left=this.checkEdges(this.labels.p_single_left,this.labels.p_single_fake)):(this.labels.w_from=this.$cache.from.outerWidth(!1),this.labels.p_from_fake=this.labels.w_from/this.coords.w_rs*100,this.labels.p_from_left=this.coords.p_from_fake+this.coords.p_handle/2-this.labels.p_from_fake/2,this.labels.p_from_left=this.toFixed(this.labels.p_from_left),this.labels.p_from_left=this.checkEdges(this.labels.p_from_left,this.labels.p_from_fake),this.labels.w_to=this.$cache.to.outerWidth(!1),this.labels.p_to_fake=this.labels.w_to/this.coords.w_rs*100,this.labels.p_to_left=this.coords.p_to_fake+this.coords.p_handle/2-this.labels.p_to_fake/2,this.labels.p_to_left=this.toFixed(this.labels.p_to_left),this.labels.p_to_left=this.checkEdges(this.labels.p_to_left,this.labels.p_to_fake),this.labels.w_single=this.$cache.single.outerWidth(!1),this.labels.p_single_fake=this.labels.w_single/this.coords.w_rs*100,this.labels.p_single_left=(this.labels.p_from_left+this.labels.p_to_left+this.labels.p_to_fake)/2-this.labels.p_single_fake/2,this.labels.p_single_left=this.toFixed(this.labels.p_single_left),this.labels.p_single_left=this.checkEdges(this.labels.p_single_left,this.labels.p_single_fake)))},updateScene:function(){this.raf_id&&(cancelAnimationFrame(this.raf_id),this.raf_id=null),clearTimeout(this.update_tm),this.update_tm=null,this.options&&(this.drawHandles(),this.is_active?this.raf_id=requestAnimationFrame(this.updateScene.bind(this)):this.update_tm=setTimeout(this.updateScene.bind(this),300))},drawHandles:function(){this.coords.w_rs=this.$cache.rs.outerWidth(!1),this.coords.w_rs&&(this.coords.w_rs!==this.coords.w_rs_old&&(this.target="base",this.is_resize=!0),(this.coords.w_rs!==this.coords.w_rs_old||this.force_redraw)&&(this.setMinMax(),this.calc(!0),this.drawLabels(),this.options.grid&&(this.calcGridMargin(),this.calcGridLabels()),this.force_redraw=!0,this.coords.w_rs_old=this.coords.w_rs,this.drawShadow()),this.coords.w_rs&&(this.dragging||this.force_redraw||this.is_key)&&((this.old_from!==this.result.from||this.old_to!==this.result.to||this.force_redraw||this.is_key)&&(this.drawLabels(),this.$cache.bar[0].style.left=this.coords.p_bar_x+"%",this.$cache.bar[0].style.width=this.coords.p_bar_w+"%","single"===this.options.type?(this.$cache.s_single[0].style.left=this.coords.p_single_fake+"%",this.$cache.single[0].style.left=this.labels.p_single_left+"%"):(this.$cache.s_from[0].style.left=this.coords.p_from_fake+"%",this.$cache.s_to[0].style.left=this.coords.p_to_fake+"%",(this.old_from!==this.result.from||this.force_redraw)&&(this.$cache.from[0].style.left=this.labels.p_from_left+"%"),(this.old_to!==this.result.to||this.force_redraw)&&(this.$cache.to[0].style.left=this.labels.p_to_left+"%"),this.$cache.single[0].style.left=this.labels.p_single_left+"%"),this.writeToInput(),this.old_from===this.result.from&&this.old_to===this.result.to||this.is_start||(this.$cache.input.trigger("change"),this.$cache.input.trigger("input")),this.old_from=this.result.from,this.old_to=this.result.to,this.is_resize||this.is_update||this.is_start||this.is_finish||this.callOnChange(),(this.is_key||this.is_click)&&(this.is_key=!1,this.is_click=!1,this.callOnFinish()),this.is_update=!1,this.is_resize=!1,this.is_finish=!1),this.is_start=!1,this.is_key=!1,this.is_click=!1,this.force_redraw=!1))},drawLabels:function(){if(this.options){var t,i,s,o,e,h=this.options.values.length,r=this.options.p_values;if(!this.options.hide_from_to)if("single"===this.options.type)h?(t=this.decorate(r[this.result.from]),this.$cache.single.html(t)):(o=this._prettify(this.result.from),t=this.decorate(o,this.result.from),this.$cache.single.html(t)),this.calcLabels(),this.labels.p_single_left100-this.labels.p_max-1?this.$cache.max[0].style.visibility="hidden":this.$cache.max[0].style.visibility="visible";else{h?(this.options.decorate_both?(t=this.decorate(r[this.result.from]),t+=this.options.values_separator,t+=this.decorate(r[this.result.to])):t=this.decorate(r[this.result.from]+this.options.values_separator+r[this.result.to]),i=this.decorate(r[this.result.from]),s=this.decorate(r[this.result.to]),this.$cache.single.html(t),this.$cache.from.html(i),this.$cache.to.html(s)):(o=this._prettify(this.result.from),e=this._prettify(this.result.to),this.options.decorate_both?(t=this.decorate(o,this.result.from),t+=this.options.values_separator,t+=this.decorate(e,this.result.to)):t=this.decorate(o+this.options.values_separator+e,this.result.to),i=this.decorate(o,this.result.from),s=this.decorate(e,this.result.to),this.$cache.single.html(t),this.$cache.from.html(i),this.$cache.to.html(s)),this.calcLabels();var n=Math.min(this.labels.p_single_left,this.labels.p_from_left),a=this.labels.p_single_left+this.labels.p_single_fake,c=this.labels.p_to_left+this.labels.p_to_fake,l=Math.max(a,c);this.labels.p_from_left+this.labels.p_from_fake>=this.labels.p_to_left?(this.$cache.from[0].style.visibility="hidden",this.$cache.to[0].style.visibility="hidden",this.$cache.single[0].style.visibility="visible",this.result.from===this.result.to?("from"===this.target?this.$cache.from[0].style.visibility="visible":"to"===this.target?this.$cache.to[0].style.visibility="visible":this.target||(this.$cache.from[0].style.visibility="visible"),this.$cache.single[0].style.visibility="hidden",l=c):(this.$cache.from[0].style.visibility="hidden",this.$cache.to[0].style.visibility="hidden",this.$cache.single[0].style.visibility="visible",l=Math.max(a,c))):(this.$cache.from[0].style.visibility="visible",this.$cache.to[0].style.visibility="visible",this.$cache.single[0].style.visibility="hidden"),n100-this.labels.p_max-1?this.$cache.max[0].style.visibility="hidden":this.$cache.max[0].style.visibility="visible"}}},drawShadow:function(){var t,i,s,o,e=this.options,h=this.$cache,r="number"==typeof e.from_min&&!isNaN(e.from_min),n="number"==typeof e.from_max&&!isNaN(e.from_max),a="number"==typeof e.to_min&&!isNaN(e.to_min),c="number"==typeof e.to_max&&!isNaN(e.to_max);"single"===e.type?e.from_shadow&&(r||n)?(t=this.convertToPercent(r?e.from_min:e.min),i=this.convertToPercent(n?e.from_max:e.max)-t,t=this.toFixed(t-this.coords.p_handle/100*t),i=this.toFixed(i-this.coords.p_handle/100*i),t+=this.coords.p_handle/2,h.shad_single[0].style.display="block",h.shad_single[0].style.left=t+"%",h.shad_single[0].style.width=i+"%"):h.shad_single[0].style.display="none":(e.from_shadow&&(r||n)?(t=this.convertToPercent(r?e.from_min:e.min),i=this.convertToPercent(n?e.from_max:e.max)-t,t=this.toFixed(t-this.coords.p_handle/100*t),i=this.toFixed(i-this.coords.p_handle/100*i),t+=this.coords.p_handle/2,h.shad_from[0].style.display="block",h.shad_from[0].style.left=t+"%",h.shad_from[0].style.width=i+"%"):h.shad_from[0].style.display="none",e.to_shadow&&(a||c)?(s=this.convertToPercent(a?e.to_min:e.min),o=this.convertToPercent(c?e.to_max:e.max)-s,s=this.toFixed(s-this.coords.p_handle/100*s),o=this.toFixed(o-this.coords.p_handle/100*o),s+=this.coords.p_handle/2,h.shad_to[0].style.display="block",h.shad_to[0].style.left=s+"%",h.shad_to[0].style.width=o+"%"):h.shad_to[0].style.display="none")},writeToInput:function(){"single"===this.options.type?(this.options.values.length?this.$cache.input.prop("value",this.result.from_value):this.$cache.input.prop("value",this.result.from),this.$cache.input.data("from",this.result.from)):(this.options.values.length?this.$cache.input.prop("value",this.result.from_value+this.options.input_values_separator+this.result.to_value):this.$cache.input.prop("value",this.result.from+this.options.input_values_separator+this.result.to),this.$cache.input.data("from",this.result.from),this.$cache.input.data("to",this.result.to))},callOnStart:function(){this.writeToInput(),this.options.onStart&&"function"==typeof this.options.onStart&&(this.options.scope?this.options.onStart.call(this.options.scope,this.result):this.options.onStart(this.result))},callOnChange:function(){this.writeToInput(),this.options.onChange&&"function"==typeof this.options.onChange&&(this.options.scope?this.options.onChange.call(this.options.scope,this.result):this.options.onChange(this.result))},callOnFinish:function(){this.writeToInput(),this.options.onFinish&&"function"==typeof this.options.onFinish&&(this.options.scope?this.options.onFinish.call(this.options.scope,this.result):this.options.onFinish(this.result))},callOnUpdate:function(){this.writeToInput(),this.options.onUpdate&&"function"==typeof this.options.onUpdate&&(this.options.scope?this.options.onUpdate.call(this.options.scope,this.result):this.options.onUpdate(this.result))},toggleInput:function(){this.$cache.input.toggleClass("irs-hidden-input"),this.has_tab_index?this.$cache.input.prop("tabindex",-1):this.$cache.input.removeProp("tabindex"),this.has_tab_index=!this.has_tab_index},convertToPercent:function(t,i){var s,o=this.options.max-this.options.min,e=o/100;return o?(s=(i?t:t-this.options.min)/e,this.toFixed(s)):(this.no_diapason=!0,0)},convertToValue:function(t){var i,s,o=this.options.min,e=this.options.max,h=o.toString().split(".")[1],r=e.toString().split(".")[1],n=0,a=0;if(0===t)return this.options.min;if(100===t)return this.options.max;h&&(n=i=h.length),r&&(n=s=r.length),i&&s&&(n=i>=s?i:s),o<0&&(o=+(o+(a=Math.abs(o))).toFixed(n),e=+(e+a).toFixed(n));var c,l=(e-o)/100*t+o,_=this.options.step.toString().split(".")[1];return _?l=+l.toFixed(_.length):(l/=this.options.step,l=+(l*=this.options.step).toFixed(0)),a&&(l-=a),(c=_?+l.toFixed(_.length):this.toFixed(l))this.options.max&&(c=this.options.max),c},calcWithStep:function(t){var i=Math.round(t/this.coords.p_step)*this.coords.p_step;return i>100&&(i=100),100===t&&(i=100),this.toFixed(i)},checkMinInterval:function(t,i,s){var o,e,h=this.options;return h.min_interval?(o=this.convertToValue(t),e=this.convertToValue(i),"from"===s?e-oh.max_interval&&(o=e-h.max_interval):o-e>h.max_interval&&(o=e+h.max_interval),this.convertToPercent(o)):t},checkDiapason:function(t,i,s){var o=this.convertToValue(t),e=this.options;return"number"!=typeof i&&(i=e.min),"number"!=typeof s&&(s=e.max),os&&(o=s),this.convertToPercent(o)},toFixed:function(t){return+(t=t.toFixed(20))},_prettify:function(t){return this.options.prettify_enabled?this.options.prettify&&"function"==typeof this.options.prettify?this.options.prettify(t):this.prettify(t):t},prettify:function(t){return t.toString().replace(/(\d{1,3}(?=(?:\d\d\d)+(?!\d)))/g,"$1"+this.options.prettify_separator)},checkEdges:function(t,i){return this.options.force_edges?(t<0?t=0:t>100-i&&(t=100-i),this.toFixed(t)):this.toFixed(t)},validate:function(){var t,i,s=this.options,o=this.result,e=s.values,h=e.length;if("string"==typeof s.min&&(s.min=+s.min),"string"==typeof s.max&&(s.max=+s.max),"string"==typeof s.from&&(s.from=+s.from),"string"==typeof s.to&&(s.to=+s.to),"string"==typeof s.step&&(s.step=+s.step),"string"==typeof s.from_min&&(s.from_min=+s.from_min),"string"==typeof s.from_max&&(s.from_max=+s.from_max),"string"==typeof s.to_min&&(s.to_min=+s.to_min),"string"==typeof s.to_max&&(s.to_max=+s.to_max),"string"==typeof s.grid_num&&(s.grid_num=+s.grid_num),s.maxs.max&&(s.from=s.max)):(s.froms.max&&(s.from=s.max),s.tos.max&&(s.to=s.max),this.update_check.from&&(this.update_check.from!==s.from&&s.from>s.to&&(s.from=s.to),this.update_check.to!==s.to&&s.tos.to&&(s.from=s.to),s.tos.from_max&&(s.from=s.from_max),"number"==typeof s.to_min&&s.tos.to_max&&(s.to=s.to_max),o&&(o.min!==s.min&&(o.min=s.min),o.max!==s.max&&(o.max=s.max),(o.fromo.max)&&(o.from=s.from),(o.too.max)&&(o.to=s.to)),("number"!=typeof s.min_interval||isNaN(s.min_interval)||!s.min_interval||s.min_interval<0)&&(s.min_interval=0),("number"!=typeof s.max_interval||isNaN(s.max_interval)||!s.max_interval||s.max_interval<0)&&(s.max_interval=0),s.min_interval&&s.min_interval>s.max-s.min&&(s.min_interval=s.max-s.min),s.max_interval&&s.max_interval>s.max-s.min&&(s.max_interval=s.max-s.min)},decorate:function(t,i){var s="",o=this.options;return o.prefix&&(s+=o.prefix),s+=t,o.max_postfix&&(o.values.length&&t===o.p_values[o.max]?(s+=o.max_postfix,o.postfix&&(s+=" ")):i===o.max&&(s+=o.max_postfix,o.postfix&&(s+=" "))),o.postfix&&(s+=o.postfix),s},updateFrom:function(){this.result.from=this.options.from,this.result.from_percent=this.convertToPercent(this.result.from),this.result.from_pretty=this._prettify(this.result.from),this.options.values&&(this.result.from_value=this.options.values[this.result.from])},updateTo:function(){this.result.to=this.options.to,this.result.to_percent=this.convertToPercent(this.result.to),this.result.to_pretty=this._prettify(this.result.to),this.options.values&&(this.result.to_value=this.options.values[this.result.to])},updateResult:function(){this.result.min=this.options.min,this.result.max=this.options.max,this.updateFrom(),this.updateTo()},appendGrid:function(){if(this.options.grid){var t,i,s,o,e,h=this.options,r=h.max-h.min,n=h.grid_num,a=0,c=0,l=4,_="";for(this.calcGridMargin(),h.grid_snap?r>50?(n=50/h.step,a=this.toFixed(h.step/.5)):(n=r/h.step,a=this.toFixed(h.step/(r/100))):a=this.toFixed(100/n),n>4&&(l=3),n>7&&(l=2),n>14&&(l=1),n>28&&(l=0),t=0;t100&&(c=100),this.coords.big[t]=c,o=(c-a*(t-1))/(s+1),i=1;i<=s&&0!==c;i++)_+='';_+='',e=this.convertToValue(c),_+=''+(e=h.values.length?h.p_values[e]:this._prettify(e))+""}this.coords.big_num=Math.ceil(n+1),this.$cache.cont.addClass("irs-with-grid"),this.$cache.grid.html(_),this.cacheGridLabels()}},cacheGridLabels:function(){var t,i,s=this.coords.big_num;for(i=0;i100+this.coords.grid_gap&&(e[h-1]=100+this.coords.grid_gap,o[h-1]=this.toFixed(e[h-1]-this.coords.big_p[h-1]),this.coords.big_x[h-1]=this.toFixed(this.coords.big_p[h-1]-this.coords.grid_gap))),this.options.grid_scale.length>0)for(i=0;i=r);o+=t)h=this.$cache.grid_labels[e][0],s[o]<=i[e]?h.style.visibility="visible":h.style.visibility="hidden"},calcGridMargin:function(){this.options.grid_margin&&(this.coords.w_rs=this.$cache.rs.outerWidth(!1),this.coords.w_rs&&("single"===this.options.type?this.coords.w_handle=this.$cache.s_single.outerWidth(!1):this.coords.w_handle=this.$cache.s_from.outerWidth(!1),this.coords.p_handle=this.toFixed(this.coords.w_handle/this.coords.w_rs*100),this.coords.grid_gap=this.toFixed(this.coords.p_handle/2-.1),this.$cache.grid[0].style.width=this.toFixed(100-this.coords.p_handle)+"%",this.$cache.grid[0].style.left=this.coords.grid_gap+"%"))},update:function(i){this.input&&(this.is_update=!0,this.options.from=this.result.from,this.options.to=this.result.to,this.update_check.from=this.result.from,this.update_check.to=this.result.to,this.options=t.extend(this.options,i),this.validate(),this.updateResult(i),this.toggleInput(),this.remove(),this.init(!0))},reset:function(){this.input&&(this.updateResult(),this.update())},destroy:function(){this.input&&(this.toggleInput(),this.$cache.input.prop("readonly",!1),t.data(this.input,"ionRangeSlider",null),this.remove(),this.input=null,this.options=null)}},t.fn.ionRangeSlider=function(i){return this.each(function(){t.data(this,"ionRangeSlider")||t.data(this,"ionRangeSlider",new c(this,i,n++))})},function(){for(var t=0,i=["ms","moz","webkit","o"],o=0;o Date: Tue, 9 Oct 2018 11:58:39 +0800 Subject: [PATCH 2/6] update package name --- package.json | 113 +++++++++++++++++++++++++-------------------------- 1 file changed, 56 insertions(+), 57 deletions(-) diff --git a/package.json b/package.json index 6f13920..5d160cc 100644 --- a/package.json +++ b/package.json @@ -1,62 +1,61 @@ { - "name": "ion-rangeslider", - "version": "2.2.1", - "description": "Cool, comfortable and easily customizable range slider with many options and skin support", - "homepage": "http://ionden.com/a/plugins/ion.rangeSlider/en.html", - "author": { - "name": "Denis Ineshin (IonDen)", - "email": "ionden.tech@gmail.com", - "url": "https://github.com/IonDen" - }, - "keywords": [ - "jquery-plugin", - "ecosystem:jquery", - "jquery", - "form", - "input", - "range", - "slider", - "rangeslider", - "interface", - "diapason", - "ui", - "noui", - "skins" - ], - "main": "./js/ion.rangeSlider.js", - "directories": { - "lib": "js" - }, - "repository": { - "type": "git", - "url": "git://github.com/IonDen/ion.rangeSlider.git" - }, - "bugs": { - "url": "https://github.com/IonDen/ion.rangeSlider/issues" - }, - "license": "MIT", + "name": "huijiewei-ion-rangeslider", + "version": "2.2.1", + "description": "Cool, comfortable and easily customizable range slider with many options and skin support", + "homepage": "http://ionden.com/a/plugins/ion.rangeSlider/en.html", + "author": { + "name": "Denis Ineshin (IonDen)", + "email": "ionden.tech@gmail.com", + "url": "https://github.com/IonDen" + }, + "keywords": [ + "jquery-plugin", + "ecosystem:jquery", + "jquery", + "form", + "input", + "range", + "slider", + "rangeslider", + "interface", + "diapason", + "ui", + "noui", + "skins" + ], + "main": "./js/ion.rangeSlider.js", + "directories": { + "lib": "js" + }, + "repository": { + "type": "git", + "url": "git://github.com/huijiewei/ion.rangeSlider.git" + }, + "bugs": { + "url": "https://github.com/IonDen/ion.rangeSlider/issues" + }, + "license": "MIT", + "dependencies": { + "jquery": ">=1.8" + }, + "ignore": [ + ".idea", + "PSD", + "bower.json", + "ion-rangeSlider.jquery.json", + "readme.ru.md" + ], + "spm": { + "main": "js/ion.rangeSlider.js", "dependencies": { - "jquery": ">=1.8" + "jquery": "1.11.2" }, "ignore": [ - ".idea", - "PSD", - "bower.json", - "ion-rangeSlider.jquery.json", - "readme.ru.md" - ], - - "spm": { - "main": "js/ion.rangeSlider.js", - "dependencies": { - "jquery": "1.11.2" - }, - "ignore": [ - ".idea", - "PSD", - "bower.json", - "ion-rangeSlider.jquery.json", - "readme.ru.md" - ] - } + ".idea", + "PSD", + "bower.json", + "ion-rangeSlider.jquery.json", + "readme.ru.md" + ] + } } \ No newline at end of file From 9f058fcf0b46f78b9b7a942fa3998742907f52be Mon Sep 17 00:00:00 2001 From: Huijie Wei Date: Tue, 9 Oct 2018 12:18:43 +0800 Subject: [PATCH 3/6] 2.2.2 --- bower.json | 2 +- js/ion.rangeSlider.js | 25 +++--- js/ion.rangeSlider.min.js | 171 +++++++++++++++++++++++++++++++++++++- package.json | 2 +- 4 files changed, 186 insertions(+), 14 deletions(-) diff --git a/bower.json b/bower.json index 494084c..b12dd4a 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "ion.rangeSlider", - "version": "2.2.1", + "version": "2.2.2", "homepage": "https://github.com/IonDen/ion.rangeSlider", "authors": [ { diff --git a/js/ion.rangeSlider.js b/js/ion.rangeSlider.js index 94fd1f2..39cbecf 100644 --- a/js/ion.rangeSlider.js +++ b/js/ion.rangeSlider.js @@ -1,5 +1,5 @@ // Ion.RangeSlider -// version 2.2.0 Build: 380 +// version 2.2.1 Build: 380 // © Denis Ineshin, 2017 // https://github.com/IonDen // @@ -2181,15 +2181,8 @@ this.calcGridMargin(); if (o.grid_snap) { - - if (total > 50) { - big_num = 50 / o.step; - big_p = this.toFixed(o.step / 0.5); - } else { - big_num = total / o.step; - big_p = this.toFixed(o.step / (total / 100)); - } - + big_num = total / o.step; + big_p = this.toFixed(o.step / (total / 100)); } else { big_p = this.toFixed(100 / big_num); } @@ -2293,8 +2286,18 @@ if (this.options.grid_scale.length > 0) { for (i = 0; i < num; i++) { label = this.$cache.grid_labels[i][0]; + var scale = $(label).html(); + + var inArray = false; + + $.each(this.options.grid_scale, function () { + if (this == scale) { + inArray = true; + return false; + } + }); - if ($.inArray($(label).html(), this.options.grid_scale)) { + if (inArray) { label.style.visibility = "visible"; } else { label.style.visibility = "hidden"; diff --git a/js/ion.rangeSlider.min.js b/js/ion.rangeSlider.min.js index 7b2d144..775c0a4 100644 --- a/js/ion.rangeSlider.min.js +++ b/js/ion.rangeSlider.min.js @@ -1 +1,170 @@ -!function(t){"function"==typeof define&&define.amd?define(["jquery"],function(i){return t(i,document,window,navigator)}):"object"==typeof exports?t(require("jquery"),document,window,navigator):t(jQuery,document,window,navigator)}(function(t,i,s,o,e){"use strict";var h,r,n=0,a=(h=o.userAgent,r=/msie\s\d+/i,h.search(r)>0&&r.exec(h).toString().split(" ")[1]<9&&(t("html").addClass("lt-ie9"),!0));Function.prototype.bind||(Function.prototype.bind=function(t){var i=this,s=[].slice;if("function"!=typeof i)throw new TypeError;var o=s.call(arguments,1),e=function(){if(this instanceof e){var h=function(){};h.prototype=i.prototype;var r=new h,n=i.apply(r,o.concat(s.call(arguments)));return Object(n)===n?n:r}return i.apply(t,o.concat(s.call(arguments)))};return e}),Array.prototype.indexOf||(Array.prototype.indexOf=function(t,i){var s;if(null==this)throw new TypeError('"this" is null or not defined');var o=Object(this),e=o.length>>>0;if(0===e)return-1;var h=+i||0;if(Math.abs(h)===1/0&&(h=0),h>=e)return-1;for(s=Math.max(h>=0?h:e-Math.abs(h),0);s!",l[0]),(a={type:l.data("type"),min:l.data("min"),max:l.data("max"),from:l.data("from"),to:l.data("to"),step:l.data("step"),min_interval:l.data("minInterval"),max_interval:l.data("maxInterval"),drag_interval:l.data("dragInterval"),values:l.data("values"),from_fixed:l.data("fromFixed"),from_min:l.data("fromMin"),from_max:l.data("fromMax"),from_shadow:l.data("fromShadow"),to_fixed:l.data("toFixed"),to_min:l.data("toMin"),to_max:l.data("toMax"),to_shadow:l.data("toShadow"),prettify_enabled:l.data("prettifyEnabled"),prettify_separator:l.data("prettifySeparator"),force_edges:l.data("forceEdges"),keyboard:l.data("keyboard"),grid:l.data("grid"),grid_margin:l.data("gridMargin"),grid_num:l.data("gridNum"),grid_snap:l.data("gridSnap"),grid_scale:l.data("gridScale"),hide_min_max:l.data("hideMinMax"),hide_from_to:l.data("hideFromTo"),prefix:l.data("prefix"),postfix:l.data("postfix"),max_postfix:l.data("maxPostfix"),decorate_both:l.data("decorateBoth"),values_separator:l.data("valuesSeparator"),input_values_separator:l.data("inputValuesSeparator"),disable:l.data("disable"),block:l.data("block"),extra_classes:l.data("extraClasses")}).values=a.values&&a.values.split(",");for(c in a)a.hasOwnProperty(c)&&(a[c]!==e&&""!==a[c]||delete a[c]);_!==e&&""!==_&&((_=_.split(a.input_values_separator||h.input_values_separator||";"))[0]&&_[0]==+_[0]&&(_[0]=+_[0]),_[1]&&_[1]==+_[1]&&(_[1]=+_[1]),h&&h.values&&h.values.length?(n.from=_[0]&&h.values.indexOf(_[0]),n.to=_[1]&&h.values.indexOf(_[1])):(n.from=_[0]&&+_[0],n.to=_[1]&&+_[1])),t.extend(n,h),t.extend(n,a),this.options=n,this.update_check={},this.validate(),this.result={input:this.$cache.input,slider:null,min:this.options.min,max:this.options.max,from:this.options.from,from_percent:0,from_value:null,to:this.options.to,to_percent:0,to_value:null},this.init()};c.prototype={init:function(t){this.no_diapason=!1,this.coords.p_step=this.convertToPercent(this.options.step,!0),this.target="base",this.toggleInput(),this.append(),this.setMinMax(),t?(this.force_redraw=!0,this.calc(!0),this.callOnUpdate()):(this.force_redraw=!0,this.calc(!0),this.callOnStart()),this.updateScene()},append:function(){var t='';this.$cache.input.before(t),this.$cache.input.prop("readonly",!0),this.$cache.cont=this.$cache.input.prev(),this.result.slider=this.$cache.cont,this.$cache.cont.html('01000'),this.$cache.rs=this.$cache.cont.find(".irs"),this.$cache.min=this.$cache.cont.find(".irs-min"),this.$cache.max=this.$cache.cont.find(".irs-max"),this.$cache.from=this.$cache.cont.find(".irs-from"),this.$cache.to=this.$cache.cont.find(".irs-to"),this.$cache.single=this.$cache.cont.find(".irs-single"),this.$cache.bar=this.$cache.cont.find(".irs-bar"),this.$cache.line=this.$cache.cont.find(".irs-line"),this.$cache.grid=this.$cache.cont.find(".irs-grid"),"single"===this.options.type?(this.$cache.cont.append(''),this.$cache.edge=this.$cache.cont.find(".irs-bar-edge"),this.$cache.s_single=this.$cache.cont.find(".single"),this.$cache.from[0].style.visibility="hidden",this.$cache.to[0].style.visibility="hidden",this.$cache.shad_single=this.$cache.cont.find(".shadow-single")):(this.$cache.cont.append(''),this.$cache.s_from=this.$cache.cont.find(".from"),this.$cache.s_to=this.$cache.cont.find(".to"),this.$cache.shad_from=this.$cache.cont.find(".shadow-from"),this.$cache.shad_to=this.$cache.cont.find(".shadow-to"),this.setTopHandler()),this.options.hide_from_to&&(this.$cache.from[0].style.display="none",this.$cache.to[0].style.display="none",this.$cache.single[0].style.display="none"),this.appendGrid(),this.options.disable?(this.appendDisableMask(),this.$cache.input[0].disabled=!0):(this.$cache.input[0].disabled=!1,this.removeDisableMask(),this.bindEvents()),this.options.disable||(this.options.block?this.appendDisableMask():this.removeDisableMask()),this.options.drag_interval&&(this.$cache.bar[0].style.cursor="ew-resize")},setTopHandler:function(){var t=this.options.min,i=this.options.max,s=this.options.from,o=this.options.to;s>t&&o===i?this.$cache.s_from.addClass("type_last"):o'),this.$cache.cont.addClass("irs-disabled")},removeDisableMask:function(){this.$cache.cont.remove(".irs-disable-mask"),this.$cache.cont.removeClass("irs-disabled")},remove:function(){this.$cache.cont.remove(),this.$cache.cont=null,this.$cache.line.off("keydown.irs_"+this.plugin_count),this.$cache.body.off("touchmove.irs_"+this.plugin_count),this.$cache.body.off("mousemove.irs_"+this.plugin_count),this.$cache.win.off("touchend.irs_"+this.plugin_count),this.$cache.win.off("mouseup.irs_"+this.plugin_count),a&&(this.$cache.body.off("mouseup.irs_"+this.plugin_count),this.$cache.body.off("mouseleave.irs_"+this.plugin_count)),this.$cache.grid_labels=[],this.coords.big=[],this.coords.big_w=[],this.coords.big_p=[],this.coords.big_x=[],cancelAnimationFrame(this.raf_id)},bindEvents:function(){this.no_diapason||(this.$cache.body.on("touchmove.irs_"+this.plugin_count,this.pointerMove.bind(this)),this.$cache.body.on("mousemove.irs_"+this.plugin_count,this.pointerMove.bind(this)),this.$cache.win.on("touchend.irs_"+this.plugin_count,this.pointerUp.bind(this)),this.$cache.win.on("mouseup.irs_"+this.plugin_count,this.pointerUp.bind(this)),this.$cache.line.on("touchstart.irs_"+this.plugin_count,this.pointerClick.bind(this,"click")),this.$cache.line.on("mousedown.irs_"+this.plugin_count,this.pointerClick.bind(this,"click")),this.$cache.line.on("focus.irs_"+this.plugin_count,this.pointerFocus.bind(this)),this.options.drag_interval&&"double"===this.options.type?(this.$cache.bar.on("touchstart.irs_"+this.plugin_count,this.pointerDown.bind(this,"both")),this.$cache.bar.on("mousedown.irs_"+this.plugin_count,this.pointerDown.bind(this,"both"))):(this.$cache.bar.on("touchstart.irs_"+this.plugin_count,this.pointerClick.bind(this,"click")),this.$cache.bar.on("mousedown.irs_"+this.plugin_count,this.pointerClick.bind(this,"click"))),"single"===this.options.type?(this.$cache.single.on("touchstart.irs_"+this.plugin_count,this.pointerDown.bind(this,"single")),this.$cache.s_single.on("touchstart.irs_"+this.plugin_count,this.pointerDown.bind(this,"single")),this.$cache.shad_single.on("touchstart.irs_"+this.plugin_count,this.pointerClick.bind(this,"click")),this.$cache.single.on("mousedown.irs_"+this.plugin_count,this.pointerDown.bind(this,"single")),this.$cache.s_single.on("mousedown.irs_"+this.plugin_count,this.pointerDown.bind(this,"single")),this.$cache.edge.on("mousedown.irs_"+this.plugin_count,this.pointerClick.bind(this,"click")),this.$cache.shad_single.on("mousedown.irs_"+this.plugin_count,this.pointerClick.bind(this,"click"))):(this.$cache.single.on("touchstart.irs_"+this.plugin_count,this.pointerDown.bind(this,null)),this.$cache.single.on("mousedown.irs_"+this.plugin_count,this.pointerDown.bind(this,null)),this.$cache.from.on("touchstart.irs_"+this.plugin_count,this.pointerDown.bind(this,"from")),this.$cache.s_from.on("touchstart.irs_"+this.plugin_count,this.pointerDown.bind(this,"from")),this.$cache.to.on("touchstart.irs_"+this.plugin_count,this.pointerDown.bind(this,"to")),this.$cache.s_to.on("touchstart.irs_"+this.plugin_count,this.pointerDown.bind(this,"to")),this.$cache.shad_from.on("touchstart.irs_"+this.plugin_count,this.pointerClick.bind(this,"click")),this.$cache.shad_to.on("touchstart.irs_"+this.plugin_count,this.pointerClick.bind(this,"click")),this.$cache.from.on("mousedown.irs_"+this.plugin_count,this.pointerDown.bind(this,"from")),this.$cache.s_from.on("mousedown.irs_"+this.plugin_count,this.pointerDown.bind(this,"from")),this.$cache.to.on("mousedown.irs_"+this.plugin_count,this.pointerDown.bind(this,"to")),this.$cache.s_to.on("mousedown.irs_"+this.plugin_count,this.pointerDown.bind(this,"to")),this.$cache.shad_from.on("mousedown.irs_"+this.plugin_count,this.pointerClick.bind(this,"click")),this.$cache.shad_to.on("mousedown.irs_"+this.plugin_count,this.pointerClick.bind(this,"click"))),this.options.keyboard&&this.$cache.line.on("keydown.irs_"+this.plugin_count,this.key.bind(this,"keyboard")),a&&(this.$cache.body.on("mouseup.irs_"+this.plugin_count,this.pointerUp.bind(this)),this.$cache.body.on("mouseleave.irs_"+this.plugin_count,this.pointerUp.bind(this))))},pointerFocus:function(t){var i,s;this.target||(i=(s="single"===this.options.type?this.$cache.single:this.$cache.from).offset().left,i+=s.width()/2-1,this.pointerClick("single",{preventDefault:function(){},pageX:i}))},pointerMove:function(t){if(this.dragging){var i=t.pageX||t.originalEvent.touches&&t.originalEvent.touches[0].pageX;this.coords.x_pointer=i-this.coords.x_gap,this.calc()}},pointerUp:function(i){this.current_plugin===this.plugin_count&&this.is_active&&(this.is_active=!1,this.$cache.cont.find(".state_hover").removeClass("state_hover"),this.force_redraw=!0,a&&t("*").prop("unselectable",!1),this.updateScene(),this.restoreOriginalMinInterval(),(t.contains(this.$cache.cont[0],i.target)||this.dragging)&&this.callOnFinish(),this.dragging=!1)},pointerDown:function(i,s){s.preventDefault();var o=s.pageX||s.originalEvent.touches&&s.originalEvent.touches[0].pageX;2!==s.button&&("both"===i&&this.setTempMinInterval(),i||(i=this.target||"from"),this.current_plugin=this.plugin_count,this.target=i,this.is_active=!0,this.dragging=!0,this.coords.x_gap=this.$cache.rs.offset().left,this.coords.x_pointer=o-this.coords.x_gap,this.calcPointerPercent(),this.changeLevel(i),a&&t("*").prop("unselectable",!0),this.$cache.line.trigger("focus"),this.updateScene())},pointerClick:function(t,i){i.preventDefault();var s=i.pageX||i.originalEvent.touches&&i.originalEvent.touches[0].pageX;2!==i.button&&(this.current_plugin=this.plugin_count,this.target=t,this.is_click=!0,this.coords.x_gap=this.$cache.rs.offset().left,this.coords.x_pointer=+(s-this.coords.x_gap).toFixed(),this.force_redraw=!0,this.calc(),this.$cache.line.trigger("focus"))},key:function(t,i){if(!(this.current_plugin!==this.plugin_count||i.altKey||i.ctrlKey||i.shiftKey||i.metaKey)){switch(i.which){case 83:case 65:case 40:case 37:i.preventDefault(),this.moveByKey(!1);break;case 87:case 68:case 38:case 39:i.preventDefault(),this.moveByKey(!0)}return!0}},moveByKey:function(t){var i=this.coords.p_pointer,s=(this.options.max-this.options.min)/100;s=this.options.step/s,t?i+=s:i-=s,this.coords.x_pointer=this.toFixed(this.coords.w_rs/100*i),this.is_key=!0,this.calc()},setMinMax:function(){if(this.options){if(this.options.hide_min_max)return this.$cache.min[0].style.display="none",void(this.$cache.max[0].style.display="none");if(this.options.values.length)this.$cache.min.html(this.decorate(this.options.p_values[this.options.min])),this.$cache.max.html(this.decorate(this.options.p_values[this.options.max]));else{var t=this._prettify(this.options.min),i=this._prettify(this.options.max);this.result.min_pretty=t,this.result.max_pretty=i,this.$cache.min.html(this.decorate(t,this.options.min)),this.$cache.max.html(this.decorate(i,this.options.max))}this.labels.w_min=this.$cache.min.outerWidth(!1),this.labels.w_max=this.$cache.max.outerWidth(!1)}},setTempMinInterval:function(){var t=this.result.to-this.result.from;null===this.old_min_interval&&(this.old_min_interval=this.options.min_interval),this.options.min_interval=t},restoreOriginalMinInterval:function(){null!==this.old_min_interval&&(this.options.min_interval=this.old_min_interval,this.old_min_interval=null)},calc:function(t){if(this.options&&(this.calc_count++,(10===this.calc_count||t)&&(this.calc_count=0,this.coords.w_rs=this.$cache.rs.outerWidth(!1),this.calcHandlePercent()),this.coords.w_rs)){this.calcPointerPercent();var i=this.getHandleX();switch("both"===this.target&&(this.coords.p_gap=0,i=this.getHandleX()),"click"===this.target&&(this.coords.p_gap=this.coords.p_handle/2,i=this.getHandleX(),this.options.drag_interval?this.target="both_one":this.target=this.chooseHandle(i)),this.target){case"base":var s=(this.options.max-this.options.min)/100,o=(this.result.from-this.options.min)/s,e=(this.result.to-this.options.min)/s;this.coords.p_single_real=this.toFixed(o),this.coords.p_from_real=this.toFixed(o),this.coords.p_to_real=this.toFixed(e),this.coords.p_single_real=this.checkDiapason(this.coords.p_single_real,this.options.from_min,this.options.from_max),this.coords.p_from_real=this.checkDiapason(this.coords.p_from_real,this.options.from_min,this.options.from_max),this.coords.p_to_real=this.checkDiapason(this.coords.p_to_real,this.options.to_min,this.options.to_max),this.coords.p_single_fake=this.convertToFakePercent(this.coords.p_single_real),this.coords.p_from_fake=this.convertToFakePercent(this.coords.p_from_real),this.coords.p_to_fake=this.convertToFakePercent(this.coords.p_to_real),this.target=null;break;case"single":if(this.options.from_fixed)break;this.coords.p_single_real=this.convertToRealPercent(i),this.coords.p_single_real=this.calcWithStep(this.coords.p_single_real),this.coords.p_single_real=this.checkDiapason(this.coords.p_single_real,this.options.from_min,this.options.from_max),this.coords.p_single_fake=this.convertToFakePercent(this.coords.p_single_real);break;case"from":if(this.options.from_fixed)break;this.coords.p_from_real=this.convertToRealPercent(i),this.coords.p_from_real=this.calcWithStep(this.coords.p_from_real),this.coords.p_from_real>this.coords.p_to_real&&(this.coords.p_from_real=this.coords.p_to_real),this.coords.p_from_real=this.checkDiapason(this.coords.p_from_real,this.options.from_min,this.options.from_max),this.coords.p_from_real=this.checkMinInterval(this.coords.p_from_real,this.coords.p_to_real,"from"),this.coords.p_from_real=this.checkMaxInterval(this.coords.p_from_real,this.coords.p_to_real,"from"),this.coords.p_from_fake=this.convertToFakePercent(this.coords.p_from_real);break;case"to":if(this.options.to_fixed)break;this.coords.p_to_real=this.convertToRealPercent(i),this.coords.p_to_real=this.calcWithStep(this.coords.p_to_real),this.coords.p_to_real100&&(c=(l=100)-n),this.coords.p_from_real=this.calcWithStep(c),this.coords.p_from_real=this.checkDiapason(this.coords.p_from_real,this.options.from_min,this.options.from_max),this.coords.p_from_fake=this.convertToFakePercent(this.coords.p_from_real),this.coords.p_to_real=this.calcWithStep(l),this.coords.p_to_real=this.checkDiapason(this.coords.p_to_real,this.options.to_min,this.options.to_max),this.coords.p_to_fake=this.convertToFakePercent(this.coords.p_to_real)}"single"===this.options.type?(this.coords.p_bar_x=this.coords.p_handle/2,this.coords.p_bar_w=this.coords.p_single_fake,this.result.from_percent=this.coords.p_single_real,this.result.from=this.convertToValue(this.coords.p_single_real),this.result.from_pretty=this._prettify(this.result.from),this.options.values.length&&(this.result.from_value=this.options.values[this.result.from])):(this.coords.p_bar_x=this.toFixed(this.coords.p_from_fake+this.coords.p_handle/2),this.coords.p_bar_w=this.toFixed(this.coords.p_to_fake-this.coords.p_from_fake),this.result.from_percent=this.coords.p_from_real,this.result.from=this.convertToValue(this.coords.p_from_real),this.result.from_pretty=this._prettify(this.result.from),this.result.to_percent=this.coords.p_to_real,this.result.to=this.convertToValue(this.coords.p_to_real),this.result.to_pretty=this._prettify(this.result.to),this.options.values.length&&(this.result.from_value=this.options.values[this.result.from],this.result.to_value=this.options.values[this.result.to])),this.calcMinMax(),this.calcLabels()}},calcPointerPercent:function(){this.coords.w_rs?(this.coords.x_pointer<0||isNaN(this.coords.x_pointer)?this.coords.x_pointer=0:this.coords.x_pointer>this.coords.w_rs&&(this.coords.x_pointer=this.coords.w_rs),this.coords.p_pointer=this.toFixed(this.coords.x_pointer/this.coords.w_rs*100)):this.coords.p_pointer=0},convertToRealPercent:function(t){return t/(100-this.coords.p_handle)*100},convertToFakePercent:function(t){return t/100*(100-this.coords.p_handle)},getHandleX:function(){var t=100-this.coords.p_handle,i=this.toFixed(this.coords.p_pointer-this.coords.p_gap);return i<0?i=0:i>t&&(i=t),i},calcHandlePercent:function(){"single"===this.options.type?this.coords.w_handle=this.$cache.s_single.outerWidth(!1):this.coords.w_handle=this.$cache.s_from.outerWidth(!1),this.coords.p_handle=this.toFixed(this.coords.w_handle/this.coords.w_rs*100)},chooseHandle:function(t){return"single"===this.options.type?"single":t>=this.coords.p_from_real+(this.coords.p_to_real-this.coords.p_from_real)/2?this.options.to_fixed?"from":"to":this.options.from_fixed?"to":"from"},calcMinMax:function(){this.coords.w_rs&&(this.labels.p_min=this.labels.w_min/this.coords.w_rs*100,this.labels.p_max=this.labels.w_max/this.coords.w_rs*100)},calcLabels:function(){this.coords.w_rs&&!this.options.hide_from_to&&("single"===this.options.type?(this.labels.w_single=this.$cache.single.outerWidth(!1),this.labels.p_single_fake=this.labels.w_single/this.coords.w_rs*100,this.labels.p_single_left=this.coords.p_single_fake+this.coords.p_handle/2-this.labels.p_single_fake/2,this.labels.p_single_left=this.checkEdges(this.labels.p_single_left,this.labels.p_single_fake)):(this.labels.w_from=this.$cache.from.outerWidth(!1),this.labels.p_from_fake=this.labels.w_from/this.coords.w_rs*100,this.labels.p_from_left=this.coords.p_from_fake+this.coords.p_handle/2-this.labels.p_from_fake/2,this.labels.p_from_left=this.toFixed(this.labels.p_from_left),this.labels.p_from_left=this.checkEdges(this.labels.p_from_left,this.labels.p_from_fake),this.labels.w_to=this.$cache.to.outerWidth(!1),this.labels.p_to_fake=this.labels.w_to/this.coords.w_rs*100,this.labels.p_to_left=this.coords.p_to_fake+this.coords.p_handle/2-this.labels.p_to_fake/2,this.labels.p_to_left=this.toFixed(this.labels.p_to_left),this.labels.p_to_left=this.checkEdges(this.labels.p_to_left,this.labels.p_to_fake),this.labels.w_single=this.$cache.single.outerWidth(!1),this.labels.p_single_fake=this.labels.w_single/this.coords.w_rs*100,this.labels.p_single_left=(this.labels.p_from_left+this.labels.p_to_left+this.labels.p_to_fake)/2-this.labels.p_single_fake/2,this.labels.p_single_left=this.toFixed(this.labels.p_single_left),this.labels.p_single_left=this.checkEdges(this.labels.p_single_left,this.labels.p_single_fake)))},updateScene:function(){this.raf_id&&(cancelAnimationFrame(this.raf_id),this.raf_id=null),clearTimeout(this.update_tm),this.update_tm=null,this.options&&(this.drawHandles(),this.is_active?this.raf_id=requestAnimationFrame(this.updateScene.bind(this)):this.update_tm=setTimeout(this.updateScene.bind(this),300))},drawHandles:function(){this.coords.w_rs=this.$cache.rs.outerWidth(!1),this.coords.w_rs&&(this.coords.w_rs!==this.coords.w_rs_old&&(this.target="base",this.is_resize=!0),(this.coords.w_rs!==this.coords.w_rs_old||this.force_redraw)&&(this.setMinMax(),this.calc(!0),this.drawLabels(),this.options.grid&&(this.calcGridMargin(),this.calcGridLabels()),this.force_redraw=!0,this.coords.w_rs_old=this.coords.w_rs,this.drawShadow()),this.coords.w_rs&&(this.dragging||this.force_redraw||this.is_key)&&((this.old_from!==this.result.from||this.old_to!==this.result.to||this.force_redraw||this.is_key)&&(this.drawLabels(),this.$cache.bar[0].style.left=this.coords.p_bar_x+"%",this.$cache.bar[0].style.width=this.coords.p_bar_w+"%","single"===this.options.type?(this.$cache.s_single[0].style.left=this.coords.p_single_fake+"%",this.$cache.single[0].style.left=this.labels.p_single_left+"%"):(this.$cache.s_from[0].style.left=this.coords.p_from_fake+"%",this.$cache.s_to[0].style.left=this.coords.p_to_fake+"%",(this.old_from!==this.result.from||this.force_redraw)&&(this.$cache.from[0].style.left=this.labels.p_from_left+"%"),(this.old_to!==this.result.to||this.force_redraw)&&(this.$cache.to[0].style.left=this.labels.p_to_left+"%"),this.$cache.single[0].style.left=this.labels.p_single_left+"%"),this.writeToInput(),this.old_from===this.result.from&&this.old_to===this.result.to||this.is_start||(this.$cache.input.trigger("change"),this.$cache.input.trigger("input")),this.old_from=this.result.from,this.old_to=this.result.to,this.is_resize||this.is_update||this.is_start||this.is_finish||this.callOnChange(),(this.is_key||this.is_click)&&(this.is_key=!1,this.is_click=!1,this.callOnFinish()),this.is_update=!1,this.is_resize=!1,this.is_finish=!1),this.is_start=!1,this.is_key=!1,this.is_click=!1,this.force_redraw=!1))},drawLabels:function(){if(this.options){var t,i,s,o,e,h=this.options.values.length,r=this.options.p_values;if(!this.options.hide_from_to)if("single"===this.options.type)h?(t=this.decorate(r[this.result.from]),this.$cache.single.html(t)):(o=this._prettify(this.result.from),t=this.decorate(o,this.result.from),this.$cache.single.html(t)),this.calcLabels(),this.labels.p_single_left100-this.labels.p_max-1?this.$cache.max[0].style.visibility="hidden":this.$cache.max[0].style.visibility="visible";else{h?(this.options.decorate_both?(t=this.decorate(r[this.result.from]),t+=this.options.values_separator,t+=this.decorate(r[this.result.to])):t=this.decorate(r[this.result.from]+this.options.values_separator+r[this.result.to]),i=this.decorate(r[this.result.from]),s=this.decorate(r[this.result.to]),this.$cache.single.html(t),this.$cache.from.html(i),this.$cache.to.html(s)):(o=this._prettify(this.result.from),e=this._prettify(this.result.to),this.options.decorate_both?(t=this.decorate(o,this.result.from),t+=this.options.values_separator,t+=this.decorate(e,this.result.to)):t=this.decorate(o+this.options.values_separator+e,this.result.to),i=this.decorate(o,this.result.from),s=this.decorate(e,this.result.to),this.$cache.single.html(t),this.$cache.from.html(i),this.$cache.to.html(s)),this.calcLabels();var n=Math.min(this.labels.p_single_left,this.labels.p_from_left),a=this.labels.p_single_left+this.labels.p_single_fake,c=this.labels.p_to_left+this.labels.p_to_fake,l=Math.max(a,c);this.labels.p_from_left+this.labels.p_from_fake>=this.labels.p_to_left?(this.$cache.from[0].style.visibility="hidden",this.$cache.to[0].style.visibility="hidden",this.$cache.single[0].style.visibility="visible",this.result.from===this.result.to?("from"===this.target?this.$cache.from[0].style.visibility="visible":"to"===this.target?this.$cache.to[0].style.visibility="visible":this.target||(this.$cache.from[0].style.visibility="visible"),this.$cache.single[0].style.visibility="hidden",l=c):(this.$cache.from[0].style.visibility="hidden",this.$cache.to[0].style.visibility="hidden",this.$cache.single[0].style.visibility="visible",l=Math.max(a,c))):(this.$cache.from[0].style.visibility="visible",this.$cache.to[0].style.visibility="visible",this.$cache.single[0].style.visibility="hidden"),n100-this.labels.p_max-1?this.$cache.max[0].style.visibility="hidden":this.$cache.max[0].style.visibility="visible"}}},drawShadow:function(){var t,i,s,o,e=this.options,h=this.$cache,r="number"==typeof e.from_min&&!isNaN(e.from_min),n="number"==typeof e.from_max&&!isNaN(e.from_max),a="number"==typeof e.to_min&&!isNaN(e.to_min),c="number"==typeof e.to_max&&!isNaN(e.to_max);"single"===e.type?e.from_shadow&&(r||n)?(t=this.convertToPercent(r?e.from_min:e.min),i=this.convertToPercent(n?e.from_max:e.max)-t,t=this.toFixed(t-this.coords.p_handle/100*t),i=this.toFixed(i-this.coords.p_handle/100*i),t+=this.coords.p_handle/2,h.shad_single[0].style.display="block",h.shad_single[0].style.left=t+"%",h.shad_single[0].style.width=i+"%"):h.shad_single[0].style.display="none":(e.from_shadow&&(r||n)?(t=this.convertToPercent(r?e.from_min:e.min),i=this.convertToPercent(n?e.from_max:e.max)-t,t=this.toFixed(t-this.coords.p_handle/100*t),i=this.toFixed(i-this.coords.p_handle/100*i),t+=this.coords.p_handle/2,h.shad_from[0].style.display="block",h.shad_from[0].style.left=t+"%",h.shad_from[0].style.width=i+"%"):h.shad_from[0].style.display="none",e.to_shadow&&(a||c)?(s=this.convertToPercent(a?e.to_min:e.min),o=this.convertToPercent(c?e.to_max:e.max)-s,s=this.toFixed(s-this.coords.p_handle/100*s),o=this.toFixed(o-this.coords.p_handle/100*o),s+=this.coords.p_handle/2,h.shad_to[0].style.display="block",h.shad_to[0].style.left=s+"%",h.shad_to[0].style.width=o+"%"):h.shad_to[0].style.display="none")},writeToInput:function(){"single"===this.options.type?(this.options.values.length?this.$cache.input.prop("value",this.result.from_value):this.$cache.input.prop("value",this.result.from),this.$cache.input.data("from",this.result.from)):(this.options.values.length?this.$cache.input.prop("value",this.result.from_value+this.options.input_values_separator+this.result.to_value):this.$cache.input.prop("value",this.result.from+this.options.input_values_separator+this.result.to),this.$cache.input.data("from",this.result.from),this.$cache.input.data("to",this.result.to))},callOnStart:function(){this.writeToInput(),this.options.onStart&&"function"==typeof this.options.onStart&&(this.options.scope?this.options.onStart.call(this.options.scope,this.result):this.options.onStart(this.result))},callOnChange:function(){this.writeToInput(),this.options.onChange&&"function"==typeof this.options.onChange&&(this.options.scope?this.options.onChange.call(this.options.scope,this.result):this.options.onChange(this.result))},callOnFinish:function(){this.writeToInput(),this.options.onFinish&&"function"==typeof this.options.onFinish&&(this.options.scope?this.options.onFinish.call(this.options.scope,this.result):this.options.onFinish(this.result))},callOnUpdate:function(){this.writeToInput(),this.options.onUpdate&&"function"==typeof this.options.onUpdate&&(this.options.scope?this.options.onUpdate.call(this.options.scope,this.result):this.options.onUpdate(this.result))},toggleInput:function(){this.$cache.input.toggleClass("irs-hidden-input"),this.has_tab_index?this.$cache.input.prop("tabindex",-1):this.$cache.input.removeProp("tabindex"),this.has_tab_index=!this.has_tab_index},convertToPercent:function(t,i){var s,o=this.options.max-this.options.min,e=o/100;return o?(s=(i?t:t-this.options.min)/e,this.toFixed(s)):(this.no_diapason=!0,0)},convertToValue:function(t){var i,s,o=this.options.min,e=this.options.max,h=o.toString().split(".")[1],r=e.toString().split(".")[1],n=0,a=0;if(0===t)return this.options.min;if(100===t)return this.options.max;h&&(n=i=h.length),r&&(n=s=r.length),i&&s&&(n=i>=s?i:s),o<0&&(o=+(o+(a=Math.abs(o))).toFixed(n),e=+(e+a).toFixed(n));var c,l=(e-o)/100*t+o,_=this.options.step.toString().split(".")[1];return _?l=+l.toFixed(_.length):(l/=this.options.step,l=+(l*=this.options.step).toFixed(0)),a&&(l-=a),(c=_?+l.toFixed(_.length):this.toFixed(l))this.options.max&&(c=this.options.max),c},calcWithStep:function(t){var i=Math.round(t/this.coords.p_step)*this.coords.p_step;return i>100&&(i=100),100===t&&(i=100),this.toFixed(i)},checkMinInterval:function(t,i,s){var o,e,h=this.options;return h.min_interval?(o=this.convertToValue(t),e=this.convertToValue(i),"from"===s?e-oh.max_interval&&(o=e-h.max_interval):o-e>h.max_interval&&(o=e+h.max_interval),this.convertToPercent(o)):t},checkDiapason:function(t,i,s){var o=this.convertToValue(t),e=this.options;return"number"!=typeof i&&(i=e.min),"number"!=typeof s&&(s=e.max),os&&(o=s),this.convertToPercent(o)},toFixed:function(t){return+(t=t.toFixed(20))},_prettify:function(t){return this.options.prettify_enabled?this.options.prettify&&"function"==typeof this.options.prettify?this.options.prettify(t):this.prettify(t):t},prettify:function(t){return t.toString().replace(/(\d{1,3}(?=(?:\d\d\d)+(?!\d)))/g,"$1"+this.options.prettify_separator)},checkEdges:function(t,i){return this.options.force_edges?(t<0?t=0:t>100-i&&(t=100-i),this.toFixed(t)):this.toFixed(t)},validate:function(){var t,i,s=this.options,o=this.result,e=s.values,h=e.length;if("string"==typeof s.min&&(s.min=+s.min),"string"==typeof s.max&&(s.max=+s.max),"string"==typeof s.from&&(s.from=+s.from),"string"==typeof s.to&&(s.to=+s.to),"string"==typeof s.step&&(s.step=+s.step),"string"==typeof s.from_min&&(s.from_min=+s.from_min),"string"==typeof s.from_max&&(s.from_max=+s.from_max),"string"==typeof s.to_min&&(s.to_min=+s.to_min),"string"==typeof s.to_max&&(s.to_max=+s.to_max),"string"==typeof s.grid_num&&(s.grid_num=+s.grid_num),s.maxs.max&&(s.from=s.max)):(s.froms.max&&(s.from=s.max),s.tos.max&&(s.to=s.max),this.update_check.from&&(this.update_check.from!==s.from&&s.from>s.to&&(s.from=s.to),this.update_check.to!==s.to&&s.tos.to&&(s.from=s.to),s.tos.from_max&&(s.from=s.from_max),"number"==typeof s.to_min&&s.tos.to_max&&(s.to=s.to_max),o&&(o.min!==s.min&&(o.min=s.min),o.max!==s.max&&(o.max=s.max),(o.fromo.max)&&(o.from=s.from),(o.too.max)&&(o.to=s.to)),("number"!=typeof s.min_interval||isNaN(s.min_interval)||!s.min_interval||s.min_interval<0)&&(s.min_interval=0),("number"!=typeof s.max_interval||isNaN(s.max_interval)||!s.max_interval||s.max_interval<0)&&(s.max_interval=0),s.min_interval&&s.min_interval>s.max-s.min&&(s.min_interval=s.max-s.min),s.max_interval&&s.max_interval>s.max-s.min&&(s.max_interval=s.max-s.min)},decorate:function(t,i){var s="",o=this.options;return o.prefix&&(s+=o.prefix),s+=t,o.max_postfix&&(o.values.length&&t===o.p_values[o.max]?(s+=o.max_postfix,o.postfix&&(s+=" ")):i===o.max&&(s+=o.max_postfix,o.postfix&&(s+=" "))),o.postfix&&(s+=o.postfix),s},updateFrom:function(){this.result.from=this.options.from,this.result.from_percent=this.convertToPercent(this.result.from),this.result.from_pretty=this._prettify(this.result.from),this.options.values&&(this.result.from_value=this.options.values[this.result.from])},updateTo:function(){this.result.to=this.options.to,this.result.to_percent=this.convertToPercent(this.result.to),this.result.to_pretty=this._prettify(this.result.to),this.options.values&&(this.result.to_value=this.options.values[this.result.to])},updateResult:function(){this.result.min=this.options.min,this.result.max=this.options.max,this.updateFrom(),this.updateTo()},appendGrid:function(){if(this.options.grid){var t,i,s,o,e,h=this.options,r=h.max-h.min,n=h.grid_num,a=0,c=0,l=4,_="";for(this.calcGridMargin(),h.grid_snap?r>50?(n=50/h.step,a=this.toFixed(h.step/.5)):(n=r/h.step,a=this.toFixed(h.step/(r/100))):a=this.toFixed(100/n),n>4&&(l=3),n>7&&(l=2),n>14&&(l=1),n>28&&(l=0),t=0;t100&&(c=100),this.coords.big[t]=c,o=(c-a*(t-1))/(s+1),i=1;i<=s&&0!==c;i++)_+='';_+='',e=this.convertToValue(c),_+=''+(e=h.values.length?h.p_values[e]:this._prettify(e))+""}this.coords.big_num=Math.ceil(n+1),this.$cache.cont.addClass("irs-with-grid"),this.$cache.grid.html(_),this.cacheGridLabels()}},cacheGridLabels:function(){var t,i,s=this.coords.big_num;for(i=0;i100+this.coords.grid_gap&&(e[h-1]=100+this.coords.grid_gap,o[h-1]=this.toFixed(e[h-1]-this.coords.big_p[h-1]),this.coords.big_x[h-1]=this.toFixed(this.coords.big_p[h-1]-this.coords.grid_gap))),this.options.grid_scale.length>0)for(i=0;i=r);o+=t)h=this.$cache.grid_labels[e][0],s[o]<=i[e]?h.style.visibility="visible":h.style.visibility="hidden"},calcGridMargin:function(){this.options.grid_margin&&(this.coords.w_rs=this.$cache.rs.outerWidth(!1),this.coords.w_rs&&("single"===this.options.type?this.coords.w_handle=this.$cache.s_single.outerWidth(!1):this.coords.w_handle=this.$cache.s_from.outerWidth(!1),this.coords.p_handle=this.toFixed(this.coords.w_handle/this.coords.w_rs*100),this.coords.grid_gap=this.toFixed(this.coords.p_handle/2-.1),this.$cache.grid[0].style.width=this.toFixed(100-this.coords.p_handle)+"%",this.$cache.grid[0].style.left=this.coords.grid_gap+"%"))},update:function(i){this.input&&(this.is_update=!0,this.options.from=this.result.from,this.options.to=this.result.to,this.update_check.from=this.result.from,this.update_check.to=this.result.to,this.options=t.extend(this.options,i),this.validate(),this.updateResult(i),this.toggleInput(),this.remove(),this.init(!0))},reset:function(){this.input&&(this.updateResult(),this.update())},destroy:function(){this.input&&(this.toggleInput(),this.$cache.input.prop("readonly",!1),t.data(this.input,"ionRangeSlider",null),this.remove(),this.input=null,this.options=null)}},t.fn.ionRangeSlider=function(i){return this.each(function(){t.data(this,"ionRangeSlider")||t.data(this,"ionRangeSlider",new c(this,i,n++))})},function(){for(var t=0,i=["ms","moz","webkit","o"],o=0;o0){v=r.exec(n).toString();v=v.split(" ")[1];if(v<9){$("html").addClass("lt-ie9");return!0}} + return!1}());if(!Function.prototype.bind){Function.prototype.bind=function bind(that){var target=this;var slice=[].slice;if(typeof target!="function"){throw new TypeError()} + var args=slice.call(arguments,1),bound=function(){if(this instanceof bound){var F=function(){};F.prototype=target.prototype;var self=new F();var result=target.apply(self,args.concat(slice.call(arguments)));if(Object(result)===result){return result} + return self}else{return target.apply(that,args.concat(slice.call(arguments)))}};return bound}} + if(!Array.prototype.indexOf){Array.prototype.indexOf=function(searchElement,fromIndex){var k;if(this==null){throw new TypeError('"this" is null or not defined')} + var O=Object(this);var len=O.length>>>0;if(len===0){return-1} + var n=+fromIndex||0;if(Math.abs(n)===Infinity){n=0} + if(n>=len){return-1} + k=Math.max(n>=0?n:len-Math.abs(n),0);while(k'+'01'+'000'+''+''+'';var single_html=''+''+'';var double_html=''+''+''+'';var disable_html='';var IonRangeSlider=function(input,options,plugin_count){this.VERSION="2.2.0";this.input=input;this.plugin_count=plugin_count;this.current_plugin=0;this.calc_count=0;this.update_tm=0;this.old_from=0;this.old_to=0;this.old_min_interval=null;this.raf_id=null;this.dragging=!1;this.force_redraw=!1;this.no_diapason=!1;this.has_tab_index=!0;this.is_key=!1;this.is_update=!1;this.is_start=!0;this.is_finish=!1;this.is_active=!1;this.is_resize=!1;this.is_click=!1;options=options||{};this.$cache={win:$(window),body:$(document.body),input:$(input),cont:null,rs:null,min:null,max:null,from:null,to:null,single:null,bar:null,line:null,s_single:null,s_from:null,s_to:null,shad_single:null,shad_from:null,shad_to:null,edge:null,grid:null,grid_labels:[]};this.coords={x_gap:0,x_pointer:0,w_rs:0,w_rs_old:0,w_handle:0,p_gap:0,p_gap_left:0,p_gap_right:0,p_step:0,p_pointer:0,p_handle:0,p_single_fake:0,p_single_real:0,p_from_fake:0,p_from_real:0,p_to_fake:0,p_to_real:0,p_bar_x:0,p_bar_w:0,grid_gap:0,big_num:0,big:[],big_w:[],big_p:[],big_x:[]};this.labels={w_min:0,w_max:0,w_from:0,w_to:0,w_single:0,p_min:0,p_max:0,p_from_fake:0,p_from_left:0,p_to_fake:0,p_to_left:0,p_single_fake:0,p_single_left:0};var $inp=this.$cache.input,val=$inp.prop("value"),config,config_from_data,prop;config={type:"single",min:10,max:100,from:null,to:null,step:1,min_interval:0,max_interval:0,drag_interval:!1,values:[],p_values:[],from_fixed:!1,from_min:null,from_max:null,from_shadow:!1,to_fixed:!1,to_min:null,to_max:null,to_shadow:!1,prettify_enabled:!0,prettify_separator:" ",prettify:null,force_edges:!1,keyboard:!0,grid:!1,grid_margin:!0,grid_num:4,grid_snap:!1,grid_scale:[],hide_min_max:!1,hide_from_to:!1,prefix:"",postfix:"",max_postfix:"",decorate_both:!0,values_separator:" — ",input_values_separator:";",disable:!1,block:!1,extra_classes:"",scope:null,onStart:null,onChange:null,onFinish:null,onUpdate:null};if($inp[0].nodeName!=="INPUT"){console&&console.warn&&console.warn("Base element should be !",$inp[0])} + config_from_data={type:$inp.data("type"),min:$inp.data("min"),max:$inp.data("max"),from:$inp.data("from"),to:$inp.data("to"),step:$inp.data("step"),min_interval:$inp.data("minInterval"),max_interval:$inp.data("maxInterval"),drag_interval:$inp.data("dragInterval"),values:$inp.data("values"),from_fixed:$inp.data("fromFixed"),from_min:$inp.data("fromMin"),from_max:$inp.data("fromMax"),from_shadow:$inp.data("fromShadow"),to_fixed:$inp.data("toFixed"),to_min:$inp.data("toMin"),to_max:$inp.data("toMax"),to_shadow:$inp.data("toShadow"),prettify_enabled:$inp.data("prettifyEnabled"),prettify_separator:$inp.data("prettifySeparator"),force_edges:$inp.data("forceEdges"),keyboard:$inp.data("keyboard"),grid:$inp.data("grid"),grid_margin:$inp.data("gridMargin"),grid_num:$inp.data("gridNum"),grid_snap:$inp.data("gridSnap"),grid_scale:$inp.data("gridScale"),hide_min_max:$inp.data("hideMinMax"),hide_from_to:$inp.data("hideFromTo"),prefix:$inp.data("prefix"),postfix:$inp.data("postfix"),max_postfix:$inp.data("maxPostfix"),decorate_both:$inp.data("decorateBoth"),values_separator:$inp.data("valuesSeparator"),input_values_separator:$inp.data("inputValuesSeparator"),disable:$inp.data("disable"),block:$inp.data("block"),extra_classes:$inp.data("extraClasses"),};config_from_data.values=config_from_data.values&&config_from_data.values.split(",");for(prop in config_from_data){if(config_from_data.hasOwnProperty(prop)){if(config_from_data[prop]===undefined||config_from_data[prop]===""){delete config_from_data[prop]}}} + if(val!==undefined&&val!==""){val=val.split(config_from_data.input_values_separator||options.input_values_separator||";");if(val[0]&&val[0]==+val[0]){val[0]=+val[0]} + if(val[1]&&val[1]==+val[1]){val[1]=+val[1]} + if(options&&options.values&&options.values.length){config.from=val[0]&&options.values.indexOf(val[0]);config.to=val[1]&&options.values.indexOf(val[1])}else{config.from=val[0]&&+val[0];config.to=val[1]&&+val[1]}} + $.extend(config,options);$.extend(config,config_from_data);this.options=config;this.update_check={};this.validate();this.result={input:this.$cache.input,slider:null,min:this.options.min,max:this.options.max,from:this.options.from,from_percent:0,from_value:null,to:this.options.to,to_percent:0,to_value:null};this.init()};IonRangeSlider.prototype={init:function(is_update){this.no_diapason=!1;this.coords.p_step=this.convertToPercent(this.options.step,!0);this.target="base";this.toggleInput();this.append();this.setMinMax();if(is_update){this.force_redraw=!0;this.calc(!0);this.callOnUpdate()}else{this.force_redraw=!0;this.calc(!0);this.callOnStart()} + this.updateScene()},append:function(){var container_html='';this.$cache.input.before(container_html);this.$cache.input.prop("readonly",!0);this.$cache.cont=this.$cache.input.prev();this.result.slider=this.$cache.cont;this.$cache.cont.html(base_html);this.$cache.rs=this.$cache.cont.find(".irs");this.$cache.min=this.$cache.cont.find(".irs-min");this.$cache.max=this.$cache.cont.find(".irs-max");this.$cache.from=this.$cache.cont.find(".irs-from");this.$cache.to=this.$cache.cont.find(".irs-to");this.$cache.single=this.$cache.cont.find(".irs-single");this.$cache.bar=this.$cache.cont.find(".irs-bar");this.$cache.line=this.$cache.cont.find(".irs-line");this.$cache.grid=this.$cache.cont.find(".irs-grid");if(this.options.type==="single"){this.$cache.cont.append(single_html);this.$cache.edge=this.$cache.cont.find(".irs-bar-edge");this.$cache.s_single=this.$cache.cont.find(".single");this.$cache.from[0].style.visibility="hidden";this.$cache.to[0].style.visibility="hidden";this.$cache.shad_single=this.$cache.cont.find(".shadow-single")}else{this.$cache.cont.append(double_html);this.$cache.s_from=this.$cache.cont.find(".from");this.$cache.s_to=this.$cache.cont.find(".to");this.$cache.shad_from=this.$cache.cont.find(".shadow-from");this.$cache.shad_to=this.$cache.cont.find(".shadow-to");this.setTopHandler()} + if(this.options.hide_from_to){this.$cache.from[0].style.display="none";this.$cache.to[0].style.display="none";this.$cache.single[0].style.display="none"} + this.appendGrid();if(this.options.disable){this.appendDisableMask();this.$cache.input[0].disabled=!0}else{this.$cache.input[0].disabled=!1;this.removeDisableMask();this.bindEvents()} + if(!this.options.disable){if(this.options.block){this.appendDisableMask()}else{this.removeDisableMask()}} + if(this.options.drag_interval){this.$cache.bar[0].style.cursor="ew-resize"}},setTopHandler:function(){var min=this.options.min,max=this.options.max,from=this.options.from,to=this.options.to;if(from>min&&to===max){this.$cache.s_from.addClass("type_last")}else if(tothis.coords.p_to_real){this.coords.p_from_real=this.coords.p_to_real} + this.coords.p_from_real=this.checkDiapason(this.coords.p_from_real,this.options.from_min,this.options.from_max);this.coords.p_from_real=this.checkMinInterval(this.coords.p_from_real,this.coords.p_to_real,"from");this.coords.p_from_real=this.checkMaxInterval(this.coords.p_from_real,this.coords.p_to_real,"from");this.coords.p_from_fake=this.convertToFakePercent(this.coords.p_from_real);break;case "to":if(this.options.to_fixed){break} + this.coords.p_to_real=this.convertToRealPercent(handle_x);this.coords.p_to_real=this.calcWithStep(this.coords.p_to_real);if(this.coords.p_to_real100){new_to=100;new_from=new_to-full} + this.coords.p_from_real=this.calcWithStep(new_from);this.coords.p_from_real=this.checkDiapason(this.coords.p_from_real,this.options.from_min,this.options.from_max);this.coords.p_from_fake=this.convertToFakePercent(this.coords.p_from_real);this.coords.p_to_real=this.calcWithStep(new_to);this.coords.p_to_real=this.checkDiapason(this.coords.p_to_real,this.options.to_min,this.options.to_max);this.coords.p_to_fake=this.convertToFakePercent(this.coords.p_to_real);break} + if(this.options.type==="single"){this.coords.p_bar_x=(this.coords.p_handle/2);this.coords.p_bar_w=this.coords.p_single_fake;this.result.from_percent=this.coords.p_single_real;this.result.from=this.convertToValue(this.coords.p_single_real);this.result.from_pretty=this._prettify(this.result.from);if(this.options.values.length){this.result.from_value=this.options.values[this.result.from]}}else{this.coords.p_bar_x=this.toFixed(this.coords.p_from_fake+(this.coords.p_handle/2));this.coords.p_bar_w=this.toFixed(this.coords.p_to_fake-this.coords.p_from_fake);this.result.from_percent=this.coords.p_from_real;this.result.from=this.convertToValue(this.coords.p_from_real);this.result.from_pretty=this._prettify(this.result.from);this.result.to_percent=this.coords.p_to_real;this.result.to=this.convertToValue(this.coords.p_to_real);this.result.to_pretty=this._prettify(this.result.to);if(this.options.values.length){this.result.from_value=this.options.values[this.result.from];this.result.to_value=this.options.values[this.result.to]}} + this.calcMinMax();this.calcLabels()},calcPointerPercent:function(){if(!this.coords.w_rs){this.coords.p_pointer=0;return} + if(this.coords.x_pointer<0||isNaN(this.coords.x_pointer)){this.coords.x_pointer=0}else if(this.coords.x_pointer>this.coords.w_rs){this.coords.x_pointer=this.coords.w_rs} + this.coords.p_pointer=this.toFixed(this.coords.x_pointer/this.coords.w_rs*100)},convertToRealPercent:function(fake){var full=100-this.coords.p_handle;return fake/full*100},convertToFakePercent:function(real){var full=100-this.coords.p_handle;return real/100*full},getHandleX:function(){var max=100-this.coords.p_handle,x=this.toFixed(this.coords.p_pointer-this.coords.p_gap);if(x<0){x=0}else if(x>max){x=max} + return x},calcHandlePercent:function(){if(this.options.type==="single"){this.coords.w_handle=this.$cache.s_single.outerWidth(!1)}else{this.coords.w_handle=this.$cache.s_from.outerWidth(!1)} + this.coords.p_handle=this.toFixed(this.coords.w_handle/this.coords.w_rs*100)},chooseHandle:function(real_x){if(this.options.type==="single"){return"single"}else{var m_point=this.coords.p_from_real+((this.coords.p_to_real-this.coords.p_from_real)/2);if(real_x>=m_point){return this.options.to_fixed?"from":"to"}else{return this.options.from_fixed?"to":"from"}}},calcMinMax:function(){if(!this.coords.w_rs){return} + this.labels.p_min=this.labels.w_min/this.coords.w_rs*100;this.labels.p_max=this.labels.w_max/this.coords.w_rs*100},calcLabels:function(){if(!this.coords.w_rs||this.options.hide_from_to){return} + if(this.options.type==="single"){this.labels.w_single=this.$cache.single.outerWidth(!1);this.labels.p_single_fake=this.labels.w_single/this.coords.w_rs*100;this.labels.p_single_left=this.coords.p_single_fake+(this.coords.p_handle/2)-(this.labels.p_single_fake/2);this.labels.p_single_left=this.checkEdges(this.labels.p_single_left,this.labels.p_single_fake)}else{this.labels.w_from=this.$cache.from.outerWidth(!1);this.labels.p_from_fake=this.labels.w_from/this.coords.w_rs*100;this.labels.p_from_left=this.coords.p_from_fake+(this.coords.p_handle/2)-(this.labels.p_from_fake/2);this.labels.p_from_left=this.toFixed(this.labels.p_from_left);this.labels.p_from_left=this.checkEdges(this.labels.p_from_left,this.labels.p_from_fake);this.labels.w_to=this.$cache.to.outerWidth(!1);this.labels.p_to_fake=this.labels.w_to/this.coords.w_rs*100;this.labels.p_to_left=this.coords.p_to_fake+(this.coords.p_handle/2)-(this.labels.p_to_fake/2);this.labels.p_to_left=this.toFixed(this.labels.p_to_left);this.labels.p_to_left=this.checkEdges(this.labels.p_to_left,this.labels.p_to_fake);this.labels.w_single=this.$cache.single.outerWidth(!1);this.labels.p_single_fake=this.labels.w_single/this.coords.w_rs*100;this.labels.p_single_left=((this.labels.p_from_left+this.labels.p_to_left+this.labels.p_to_fake)/2)-(this.labels.p_single_fake/2);this.labels.p_single_left=this.toFixed(this.labels.p_single_left);this.labels.p_single_left=this.checkEdges(this.labels.p_single_left,this.labels.p_single_fake)}},updateScene:function(){if(this.raf_id){cancelAnimationFrame(this.raf_id);this.raf_id=null} + clearTimeout(this.update_tm);this.update_tm=null;if(!this.options){return} + this.drawHandles();if(this.is_active){this.raf_id=requestAnimationFrame(this.updateScene.bind(this))}else{this.update_tm=setTimeout(this.updateScene.bind(this),300)}},drawHandles:function(){this.coords.w_rs=this.$cache.rs.outerWidth(!1);if(!this.coords.w_rs){return} + if(this.coords.w_rs!==this.coords.w_rs_old){this.target="base";this.is_resize=!0} + if(this.coords.w_rs!==this.coords.w_rs_old||this.force_redraw){this.setMinMax();this.calc(!0);this.drawLabels();if(this.options.grid){this.calcGridMargin();this.calcGridLabels()} + this.force_redraw=!0;this.coords.w_rs_old=this.coords.w_rs;this.drawShadow()} + if(!this.coords.w_rs){return} + if(!this.dragging&&!this.force_redraw&&!this.is_key){return} + if(this.old_from!==this.result.from||this.old_to!==this.result.to||this.force_redraw||this.is_key){this.drawLabels();this.$cache.bar[0].style.left=this.coords.p_bar_x+"%";this.$cache.bar[0].style.width=this.coords.p_bar_w+"%";if(this.options.type==="single"){this.$cache.s_single[0].style.left=this.coords.p_single_fake+"%";this.$cache.single[0].style.left=this.labels.p_single_left+"%"}else{this.$cache.s_from[0].style.left=this.coords.p_from_fake+"%";this.$cache.s_to[0].style.left=this.coords.p_to_fake+"%";if(this.old_from!==this.result.from||this.force_redraw){this.$cache.from[0].style.left=this.labels.p_from_left+"%"} + if(this.old_to!==this.result.to||this.force_redraw){this.$cache.to[0].style.left=this.labels.p_to_left+"%"} + this.$cache.single[0].style.left=this.labels.p_single_left+"%"} + this.writeToInput();if((this.old_from!==this.result.from||this.old_to!==this.result.to)&&!this.is_start){this.$cache.input.trigger("change");this.$cache.input.trigger("input")} + this.old_from=this.result.from;this.old_to=this.result.to;if(!this.is_resize&&!this.is_update&&!this.is_start&&!this.is_finish){this.callOnChange()} + if(this.is_key||this.is_click){this.is_key=!1;this.is_click=!1;this.callOnFinish()} + this.is_update=!1;this.is_resize=!1;this.is_finish=!1} + this.is_start=!1;this.is_key=!1;this.is_click=!1;this.force_redraw=!1},drawLabels:function(){if(!this.options){return} + var values_num=this.options.values.length;var p_values=this.options.p_values;var text_single;var text_from;var text_to;var from_pretty;var to_pretty;if(this.options.hide_from_to){return} + if(this.options.type==="single"){if(values_num){text_single=this.decorate(p_values[this.result.from]);this.$cache.single.html(text_single)}else{from_pretty=this._prettify(this.result.from);text_single=this.decorate(from_pretty,this.result.from);this.$cache.single.html(text_single)} + this.calcLabels();if(this.labels.p_single_left100-this.labels.p_max-1){this.$cache.max[0].style.visibility="hidden"}else{this.$cache.max[0].style.visibility="visible"}}else{if(values_num){if(this.options.decorate_both){text_single=this.decorate(p_values[this.result.from]);text_single+=this.options.values_separator;text_single+=this.decorate(p_values[this.result.to])}else{text_single=this.decorate(p_values[this.result.from]+this.options.values_separator+p_values[this.result.to])} + text_from=this.decorate(p_values[this.result.from]);text_to=this.decorate(p_values[this.result.to]);this.$cache.single.html(text_single);this.$cache.from.html(text_from);this.$cache.to.html(text_to)}else{from_pretty=this._prettify(this.result.from);to_pretty=this._prettify(this.result.to);if(this.options.decorate_both){text_single=this.decorate(from_pretty,this.result.from);text_single+=this.options.values_separator;text_single+=this.decorate(to_pretty,this.result.to)}else{text_single=this.decorate(from_pretty+this.options.values_separator+to_pretty,this.result.to)} + text_from=this.decorate(from_pretty,this.result.from);text_to=this.decorate(to_pretty,this.result.to);this.$cache.single.html(text_single);this.$cache.from.html(text_from);this.$cache.to.html(text_to)} + this.calcLabels();var min=Math.min(this.labels.p_single_left,this.labels.p_from_left),single_left=this.labels.p_single_left+this.labels.p_single_fake,to_left=this.labels.p_to_left+this.labels.p_to_fake,max=Math.max(single_left,to_left);if(this.labels.p_from_left+this.labels.p_from_fake>=this.labels.p_to_left){this.$cache.from[0].style.visibility="hidden";this.$cache.to[0].style.visibility="hidden";this.$cache.single[0].style.visibility="visible";if(this.result.from===this.result.to){if(this.target==="from"){this.$cache.from[0].style.visibility="visible"}else if(this.target==="to"){this.$cache.to[0].style.visibility="visible"}else if(!this.target){this.$cache.from[0].style.visibility="visible"} + this.$cache.single[0].style.visibility="hidden";max=to_left}else{this.$cache.from[0].style.visibility="hidden";this.$cache.to[0].style.visibility="hidden";this.$cache.single[0].style.visibility="visible";max=Math.max(single_left,to_left)}}else{this.$cache.from[0].style.visibility="visible";this.$cache.to[0].style.visibility="visible";this.$cache.single[0].style.visibility="hidden"} + if(min100-this.labels.p_max-1){this.$cache.max[0].style.visibility="hidden"}else{this.$cache.max[0].style.visibility="visible"}}},drawShadow:function(){var o=this.options,c=this.$cache,is_from_min=typeof o.from_min==="number"&&!isNaN(o.from_min),is_from_max=typeof o.from_max==="number"&&!isNaN(o.from_max),is_to_min=typeof o.to_min==="number"&&!isNaN(o.to_min),is_to_max=typeof o.to_max==="number"&&!isNaN(o.to_max),from_min,from_max,to_min,to_max;if(o.type==="single"){if(o.from_shadow&&(is_from_min||is_from_max)){from_min=this.convertToPercent(is_from_min?o.from_min:o.min);from_max=this.convertToPercent(is_from_max?o.from_max:o.max)-from_min;from_min=this.toFixed(from_min-(this.coords.p_handle/100*from_min));from_max=this.toFixed(from_max-(this.coords.p_handle/100*from_max));from_min=from_min+(this.coords.p_handle/2);c.shad_single[0].style.display="block";c.shad_single[0].style.left=from_min+"%";c.shad_single[0].style.width=from_max+"%"}else{c.shad_single[0].style.display="none"}}else{if(o.from_shadow&&(is_from_min||is_from_max)){from_min=this.convertToPercent(is_from_min?o.from_min:o.min);from_max=this.convertToPercent(is_from_max?o.from_max:o.max)-from_min;from_min=this.toFixed(from_min-(this.coords.p_handle/100*from_min));from_max=this.toFixed(from_max-(this.coords.p_handle/100*from_max));from_min=from_min+(this.coords.p_handle/2);c.shad_from[0].style.display="block";c.shad_from[0].style.left=from_min+"%";c.shad_from[0].style.width=from_max+"%"}else{c.shad_from[0].style.display="none"} + if(o.to_shadow&&(is_to_min||is_to_max)){to_min=this.convertToPercent(is_to_min?o.to_min:o.min);to_max=this.convertToPercent(is_to_max?o.to_max:o.max)-to_min;to_min=this.toFixed(to_min-(this.coords.p_handle/100*to_min));to_max=this.toFixed(to_max-(this.coords.p_handle/100*to_max));to_min=to_min+(this.coords.p_handle/2);c.shad_to[0].style.display="block";c.shad_to[0].style.left=to_min+"%";c.shad_to[0].style.width=to_max+"%"}else{c.shad_to[0].style.display="none"}}},writeToInput:function(){if(this.options.type==="single"){if(this.options.values.length){this.$cache.input.prop("value",this.result.from_value)}else{this.$cache.input.prop("value",this.result.from)} + this.$cache.input.data("from",this.result.from)}else{if(this.options.values.length){this.$cache.input.prop("value",this.result.from_value+this.options.input_values_separator+this.result.to_value)}else{this.$cache.input.prop("value",this.result.from+this.options.input_values_separator+this.result.to)} + this.$cache.input.data("from",this.result.from);this.$cache.input.data("to",this.result.to)}},callOnStart:function(){this.writeToInput();if(this.options.onStart&&typeof this.options.onStart==="function"){if(this.options.scope){this.options.onStart.call(this.options.scope,this.result)}else{this.options.onStart(this.result)}}},callOnChange:function(){this.writeToInput();if(this.options.onChange&&typeof this.options.onChange==="function"){if(this.options.scope){this.options.onChange.call(this.options.scope,this.result)}else{this.options.onChange(this.result)}}},callOnFinish:function(){this.writeToInput();if(this.options.onFinish&&typeof this.options.onFinish==="function"){if(this.options.scope){this.options.onFinish.call(this.options.scope,this.result)}else{this.options.onFinish(this.result)}}},callOnUpdate:function(){this.writeToInput();if(this.options.onUpdate&&typeof this.options.onUpdate==="function"){if(this.options.scope){this.options.onUpdate.call(this.options.scope,this.result)}else{this.options.onUpdate(this.result)}}},toggleInput:function(){this.$cache.input.toggleClass("irs-hidden-input");if(this.has_tab_index){this.$cache.input.prop("tabindex",-1)}else{this.$cache.input.removeProp("tabindex")} + this.has_tab_index=!this.has_tab_index},convertToPercent:function(value,no_min){var diapason=this.options.max-this.options.min,one_percent=diapason/100,val,percent;if(!diapason){this.no_diapason=!0;return 0} + if(no_min){val=value}else{val=value-this.options.min} + percent=val/one_percent;return this.toFixed(percent)},convertToValue:function(percent){var min=this.options.min,max=this.options.max,min_decimals=min.toString().split(".")[1],max_decimals=max.toString().split(".")[1],min_length,max_length,avg_decimals=0,abs=0;if(percent===0){return this.options.min} + if(percent===100){return this.options.max} + if(min_decimals){min_length=min_decimals.length;avg_decimals=min_length} + if(max_decimals){max_length=max_decimals.length;avg_decimals=max_length} + if(min_length&&max_length){avg_decimals=(min_length>=max_length)?min_length:max_length} + if(min<0){abs=Math.abs(min);min=+(min+abs).toFixed(avg_decimals);max=+(max+abs).toFixed(avg_decimals)} + var number=((max-min)/100*percent)+min,string=this.options.step.toString().split(".")[1],result;if(string){number=+number.toFixed(string.length)}else{number=number/this.options.step;number=number*this.options.step;number=+number.toFixed(0)} + if(abs){number-=abs} + if(string){result=+number.toFixed(string.length)}else{result=this.toFixed(number)} + if(resultthis.options.max){result=this.options.max} + return result},calcWithStep:function(percent){var rounded=Math.round(percent/this.coords.p_step)*this.coords.p_step;if(rounded>100){rounded=100} + if(percent===100){rounded=100} + return this.toFixed(rounded)},checkMinInterval:function(p_current,p_next,type){var o=this.options,current,next;if(!o.min_interval){return p_current} + current=this.convertToValue(p_current);next=this.convertToValue(p_next);if(type==="from"){if(next-currento.max_interval){current=next-o.max_interval}}else{if(current-next>o.max_interval){current=next+o.max_interval}} + return this.convertToPercent(current)},checkDiapason:function(p_num,min,max){var num=this.convertToValue(p_num),o=this.options;if(typeof min!=="number"){min=o.min} + if(typeof max!=="number"){max=o.max} + if(nummax){num=max} + return this.convertToPercent(num)},toFixed:function(num){num=num.toFixed(20);return+num},_prettify:function(num){if(!this.options.prettify_enabled){return num} + if(this.options.prettify&&typeof this.options.prettify==="function"){return this.options.prettify(num)}else{return this.prettify(num)}},prettify:function(num){var n=num.toString();return n.replace(/(\d{1,3}(?=(?:\d\d\d)+(?!\d)))/g,"$1"+this.options.prettify_separator)},checkEdges:function(left,width){if(!this.options.force_edges){return this.toFixed(left)} + if(left<0){left=0}else if(left>100-width){left=100-width} + return this.toFixed(left)},validate:function(){var o=this.options,r=this.result,v=o.values,vl=v.length,value,i;if(typeof o.min==="string")o.min=+o.min;if(typeof o.max==="string")o.max=+o.max;if(typeof o.from==="string")o.from=+o.from;if(typeof o.to==="string")o.to=+o.to;if(typeof o.step==="string")o.step=+o.step;if(typeof o.from_min==="string")o.from_min=+o.from_min;if(typeof o.from_max==="string")o.from_max=+o.from_max;if(typeof o.to_min==="string")o.to_min=+o.to_min;if(typeof o.to_max==="string")o.to_max=+o.to_max;if(typeof o.grid_num==="string")o.grid_num=+o.grid_num;if(o.maxo.max)o.from=o.max}else{if(o.fromo.max)o.from=o.max;if(o.too.max)o.to=o.max;if(this.update_check.from){if(this.update_check.from!==o.from){if(o.from>o.to)o.from=o.to} + if(this.update_check.to!==o.to){if(o.too.to)o.from=o.to;if(o.too.from_max){o.from=o.from_max} + if(typeof o.to_min==="number"&&o.too.to_max){o.to=o.to_max} + if(r){if(r.min!==o.min){r.min=o.min} + if(r.max!==o.max){r.max=o.max} + if(r.fromr.max){r.from=o.from} + if(r.tor.max){r.to=o.to}} + if(typeof o.min_interval!=="number"||isNaN(o.min_interval)||!o.min_interval||o.min_interval<0){o.min_interval=0} + if(typeof o.max_interval!=="number"||isNaN(o.max_interval)||!o.max_interval||o.max_interval<0){o.max_interval=0} + if(o.min_interval&&o.min_interval>o.max-o.min){o.min_interval=o.max-o.min} + if(o.max_interval&&o.max_interval>o.max-o.min){o.max_interval=o.max-o.min}},decorate:function(num,original){var decorated="",o=this.options;if(o.prefix){decorated+=o.prefix} + decorated+=num;if(o.max_postfix){if(o.values.length&&num===o.p_values[o.max]){decorated+=o.max_postfix;if(o.postfix){decorated+=" "}}else if(original===o.max){decorated+=o.max_postfix;if(o.postfix){decorated+=" "}}} + if(o.postfix){decorated+=o.postfix} + return decorated},updateFrom:function(){this.result.from=this.options.from;this.result.from_percent=this.convertToPercent(this.result.from);this.result.from_pretty=this._prettify(this.result.from);if(this.options.values){this.result.from_value=this.options.values[this.result.from]}},updateTo:function(){this.result.to=this.options.to;this.result.to_percent=this.convertToPercent(this.result.to);this.result.to_pretty=this._prettify(this.result.to);if(this.options.values){this.result.to_value=this.options.values[this.result.to]}},updateResult:function(){this.result.min=this.options.min;this.result.max=this.options.max;this.updateFrom();this.updateTo()},appendGrid:function(){if(!this.options.grid){return} + var o=this.options,i,z,total=o.max-o.min,big_num=o.grid_num,big_p=0,big_w=0,small_max=4,local_small_max,small_p,small_w=0,result,html='';this.calcGridMargin();if(o.grid_snap){big_num=total/o.step;big_p=this.toFixed(o.step/(total/100))}else{big_p=this.toFixed(100/big_num)} + if(big_num>4){small_max=3} + if(big_num>7){small_max=2} + if(big_num>14){small_max=1} + if(big_num>28){small_max=0} + for(i=0;i100){big_w=100} + this.coords.big[i]=big_w;small_p=(big_w-(big_p*(i-1)))/(local_small_max+1);for(z=1;z<=local_small_max;z++){if(big_w===0){break} + small_w=this.toFixed(big_w-(small_p*z));html+=''} + html+='';result=this.convertToValue(big_w);if(o.values.length){result=o.p_values[result]}else{result=this._prettify(result)} + html+=''+result+''} + this.coords.big_num=Math.ceil(big_num+1);this.$cache.cont.addClass("irs-with-grid");this.$cache.grid.html(html);this.cacheGridLabels()},cacheGridLabels:function(){var $label,i,num=this.coords.big_num;for(i=0;i100+this.coords.grid_gap){finish[num-1]=100+this.coords.grid_gap;start[num-1]=this.toFixed(finish[num-1]-this.coords.big_p[num-1]);this.coords.big_x[num-1]=this.toFixed(this.coords.big_p[num-1]-this.coords.grid_gap)}} + if(this.options.grid_scale.length>0){for(i=0;i=num){break} + label=this.$cache.grid_labels[next_i][0];if(finish[i]<=start[next_i]){label.style.visibility="visible"}else{label.style.visibility="hidden"}}},calcGridMargin:function(){if(!this.options.grid_margin){return} + this.coords.w_rs=this.$cache.rs.outerWidth(!1);if(!this.coords.w_rs){return} + if(this.options.type==="single"){this.coords.w_handle=this.$cache.s_single.outerWidth(!1)}else{this.coords.w_handle=this.$cache.s_from.outerWidth(!1)} + this.coords.p_handle=this.toFixed(this.coords.w_handle/this.coords.w_rs*100);this.coords.grid_gap=this.toFixed((this.coords.p_handle/2)-0.1);this.$cache.grid[0].style.width=this.toFixed(100-this.coords.p_handle)+"%";this.$cache.grid[0].style.left=this.coords.grid_gap+"%"},update:function(options){if(!this.input){return} + this.is_update=!0;this.options.from=this.result.from;this.options.to=this.result.to;this.update_check.from=this.result.from;this.update_check.to=this.result.to;this.options=$.extend(this.options,options);this.validate();this.updateResult(options);this.toggleInput();this.remove();this.init(!0)},reset:function(){if(!this.input){return} + this.updateResult();this.update()},destroy:function(){if(!this.input){return} + this.toggleInput();this.$cache.input.prop("readonly",!1);$.data(this.input,"ionRangeSlider",null);this.remove();this.input=null;this.options=null}};$.fn.ionRangeSlider=function(options){return this.each(function(){if(!$.data(this,"ionRangeSlider")){$.data(this,"ionRangeSlider",new IonRangeSlider(this,options,plugin_count++))}})};(function(){var lastTime=0;var vendors=['ms','moz','webkit','o'];for(var x=0;x Date: Wed, 24 Apr 2019 11:10:16 +0800 Subject: [PATCH 4/6] Merge branch 'master' of https://github.com/IonDen/ion.rangeSlider into IonDen-master # Conflicts: # bower.json # js/ion.rangeSlider.js # js/ion.rangeSlider.min.js # package.json --- .editorconfig | 2 +- .npmignore | 2 - CONTRIBUTING.md | 6 +- License.md | 2 +- PSD/sprite-skin.psd | Bin 164259 -> 0 bytes bower.json | 4 +- css/ion.rangeSlider.css | 801 ++++++++++++++++++++++++----- css/ion.rangeSlider.min.css | 1 + css/ion.rangeSlider.skinFlat.css | 106 ---- css/ion.rangeSlider.skinHTML5.css | 124 ----- css/ion.rangeSlider.skinModern.css | 116 ----- css/ion.rangeSlider.skinNice.css | 102 ---- css/ion.rangeSlider.skinRound.css | 108 ---- css/ion.rangeSlider.skinSimple.css | 102 ---- css/ion.rangeSlider.skinSquare.css | 87 ---- css/normalize.css | 427 --------------- history.md | 9 +- img/sprite-skin-flat.png | Bin 304 -> 0 bytes img/sprite-skin-modern.png | Bin 505 -> 0 bytes img/sprite-skin-nice.png | Bin 694 -> 0 bytes img/sprite-skin-simple.png | Bin 358 -> 0 bytes index.md | 2 +- ion-rangeSlider.jquery.json | 37 -- js/ion.rangeSlider.js | 128 +++-- js/ion.rangeSlider.min.js | 172 +------ less/_base.less | 145 ++++++ less/_mixins.less | 17 + less/irs.less | 10 + less/skins/big.less | 109 ++++ less/skins/flat.less | 125 +++++ less/skins/modern.less | 165 ++++++ less/skins/round.less | 120 +++++ less/skins/sharp.less | 132 +++++ less/skins/square.less | 100 ++++ package.json | 95 ++-- readme.md | 110 ++-- readme.ru.md | 283 ---------- 37 files changed, 1763 insertions(+), 1986 deletions(-) delete mode 100755 PSD/sprite-skin.psd create mode 100644 css/ion.rangeSlider.min.css delete mode 100644 css/ion.rangeSlider.skinFlat.css delete mode 100644 css/ion.rangeSlider.skinHTML5.css delete mode 100644 css/ion.rangeSlider.skinModern.css delete mode 100644 css/ion.rangeSlider.skinNice.css delete mode 100644 css/ion.rangeSlider.skinRound.css delete mode 100644 css/ion.rangeSlider.skinSimple.css delete mode 100644 css/ion.rangeSlider.skinSquare.css delete mode 100644 css/normalize.css delete mode 100644 img/sprite-skin-flat.png delete mode 100644 img/sprite-skin-modern.png delete mode 100644 img/sprite-skin-nice.png delete mode 100644 img/sprite-skin-simple.png delete mode 100644 ion-rangeSlider.jquery.json create mode 100644 less/_base.less create mode 100644 less/_mixins.less create mode 100644 less/irs.less create mode 100644 less/skins/big.less create mode 100644 less/skins/flat.less create mode 100644 less/skins/modern.less create mode 100644 less/skins/round.less create mode 100644 less/skins/sharp.less create mode 100644 less/skins/square.less delete mode 100644 readme.ru.md diff --git a/.editorconfig b/.editorconfig index d175020..cdd3a58 100644 --- a/.editorconfig +++ b/.editorconfig @@ -1,6 +1,6 @@ root = true -[*.{js,css,html}] +[*.{js,css,less,html}] indent_style = space indent_size = 4 charset = utf-8 diff --git a/.npmignore b/.npmignore index aac6bdc..f92157b 100644 --- a/.npmignore +++ b/.npmignore @@ -2,6 +2,4 @@ _tmp PSD bower.json -ion-rangeSlider.jquery.json -readme.ru.md .npmignore diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 2e57021..a89385d 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -12,15 +12,15 @@ 1. Only 1 bugfix per Pull Request 2. Should have bug description 3. Should have bug screenshots (if possible) -4. Should have working demo. Use JSFIDDLE: http://jsfiddle.net/IonDen/qv6yrjrv/ +4. Should have working demo. Use JSFIDDLE: https://jsfiddle.net/IonDen/b79q0vnm/ -### Guide for Pull Requests with new feaures +### Guide for Pull Requests with new features 1. Only 1 feature per Pull Request 2. Should have statement, why feature is important and should be included in to plugin 3. Should have feature description 4. Should have feature screenshots (if possible) -5. Should have working demo. Use JSFIDDLE: http://jsfiddle.net/IonDen/qv6yrjrv/ +5. Should have working demo. Use JSFIDDLE: https://jsfiddle.net/IonDen/b79q0vnm/ ### Guide for Pull Requests with grammar fixes diff --git a/License.md b/License.md index 5c4da30..3a86651 100644 --- a/License.md +++ b/License.md @@ -1,6 +1,6 @@ ## The MIT License -Copyright © 2016 by Denis Ineshin (http://ionden.com) +Copyright © 2018 by Denis Ineshin (http://ionden.com) Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: diff --git a/PSD/sprite-skin.psd b/PSD/sprite-skin.psd deleted file mode 100755 index 0b539392da51197d9a6bb50fffcafd5be25d4556..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 164259 zcmeD^31Cx2)0?D}-cT+PQ9|WZY0{=AXD^Nlh1wQG@k-OQjigCUQVM>bA4bLdL`4x1 z1-ww?^8%!mTLI}u1wmA(a)^LJp~&5)@1NOsCQaLvqJaNe*4PYf zMscdK&@}3Pn=$+Tu{nnOCmRy;B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b/bower.json index b12dd4a..4499421 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { - "name": "ion.rangeSlider", - "version": "2.2.2", + "name": "ion-rangeslider", + "version": "2.3.0", "homepage": "https://github.com/IonDen/ion.rangeSlider", "authors": [ { diff --git a/css/ion.rangeSlider.css b/css/ion.rangeSlider.css index 68fd119..b2c110c 100644 --- a/css/ion.rangeSlider.css +++ b/css/ion.rangeSlider.css @@ -1,150 +1,675 @@ -/* Ion.RangeSlider -// css version 2.0.3 -// © 2013-2014 Denis Ineshin | IonDen.com -// ===================================================================================================================*/ - -/* ===================================================================================================================== -// RangeSlider */ - +/** +Ion.RangeSlider, 2.3.0 +© Denis Ineshin, 2010 - 2018, IonDen.com +Build date: 2018-12-12 00:07:25 +*/ .irs { - position: relative; display: block; - -webkit-touch-callout: none; - -webkit-user-select: none; - -khtml-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; -} - .irs-line { - position: relative; display: block; - overflow: hidden; - outline: none !important; - } - .irs-line-left, .irs-line-mid, .irs-line-right { - position: absolute; display: block; - top: 0; - } - .irs-line-left { - left: 0; width: 11%; - } - .irs-line-mid { - left: 9%; width: 82%; - } - .irs-line-right { - right: 0; width: 11%; - } - - .irs-bar { - position: absolute; display: block; - left: 0; width: 0; - } - .irs-bar-edge { - position: absolute; display: block; - top: 0; left: 0; - } - - .irs-shadow { - position: absolute; display: none; - left: 0; width: 0; - } - - .irs-slider { - position: absolute; display: block; - cursor: default; - z-index: 1; - } - .irs-slider.single { - - } - .irs-slider.from { - - } - .irs-slider.to { - - } - .irs-slider.type_last { - z-index: 2; - } - - .irs-min { - position: absolute; display: block; - left: 0; - cursor: default; - } - .irs-max { - position: absolute; display: block; - right: 0; - cursor: default; - } - - .irs-from, .irs-to, .irs-single { - position: absolute; display: block; - top: 0; left: 0; - cursor: default; - white-space: nowrap; - } - + position: relative; + display: block; + -webkit-touch-callout: none; + -webkit-user-select: none; + -khtml-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; + font-size: 12px; + font-family: Arial, sans-serif; +} +.irs-line { + position: relative; + display: block; + overflow: hidden; + outline: none !important; +} +.irs-bar { + position: absolute; + display: block; + left: 0; + width: 0; +} +.irs-shadow { + position: absolute; + display: none; + left: 0; + width: 0; +} +.irs-handle { + position: absolute; + display: block; + box-sizing: border-box; + cursor: default; + z-index: 1; +} +.irs-handle.type_last { + z-index: 2; +} +.irs-min, +.irs-max { + position: absolute; + display: block; + cursor: default; +} +.irs-min { + left: 0; +} +.irs-max { + right: 0; +} +.irs-from, +.irs-to, +.irs-single { + position: absolute; + display: block; + top: 0; + left: 0; + cursor: default; + white-space: nowrap; +} .irs-grid { - position: absolute; display: none; - bottom: 0; left: 0; - width: 100%; height: 20px; + position: absolute; + display: none; + bottom: 0; + left: 0; + width: 100%; + height: 20px; } .irs-with-grid .irs-grid { - display: block; -} - .irs-grid-pol { - position: absolute; - top: 0; left: 0; - width: 1px; height: 8px; - background: #000; - } - .irs-grid-pol.small { - height: 4px; - } - .irs-grid-text { - position: absolute; - bottom: 0; left: 0; - white-space: nowrap; - text-align: center; - font-size: 9px; line-height: 9px; - padding: 0 3px; - color: #000; - } - + display: block; +} +.irs-grid-pol { + position: absolute; + top: 0; + left: 0; + width: 1px; + height: 8px; + background: #000; +} +.irs-grid-pol.small { + height: 4px; +} +.irs-grid-text { + position: absolute; + bottom: 0; + left: 0; + white-space: nowrap; + text-align: center; + font-size: 9px; + line-height: 9px; + padding: 0 3px; + color: #000; +} .irs-disable-mask { - position: absolute; display: block; - top: 0; left: -1%; - width: 102%; height: 100%; - cursor: default; - background: rgba(0,0,0,0.0); - z-index: 2; + position: absolute; + display: block; + top: 0; + left: -1%; + width: 102%; + height: 100%; + cursor: default; + background: rgba(0, 0, 0, 0); + z-index: 2; } .lt-ie9 .irs-disable-mask { - background: #000; - filter: alpha(opacity=0); - cursor: not-allowed; + background: #000; + filter: alpha(opacity=0); + cursor: not-allowed; } - .irs-disabled { - opacity: 0.4; + opacity: 0.4; } - - .irs-hidden-input { - position: absolute !important; - display: block !important; - top: 0 !important; - left: 0 !important; - width: 0 !important; - height: 0 !important; - font-size: 0 !important; - line-height: 0 !important; - padding: 0 !important; - margin: 0 !important; - overflow: hidden; - outline: none !important; - z-index: -9999 !important; - background: none !important; - border-style: solid !important; - border-color: transparent !important; + position: absolute !important; + display: block !important; + top: 0 !important; + left: 0 !important; + width: 0 !important; + height: 0 !important; + font-size: 0 !important; + line-height: 0 !important; + padding: 0 !important; + margin: 0 !important; + overflow: hidden; + outline: none !important; + z-index: -9999 !important; + background: none !important; + border-style: solid !important; + border-color: transparent !important; +} +.irs--flat { + height: 40px; +} +.irs--flat.irs-with-grid { + height: 60px; +} +.irs--flat .irs-line { + top: 25px; + height: 12px; + background-color: #e1e4e9; + border-radius: 4px; +} +.irs--flat .irs-bar { + top: 25px; + height: 12px; + background-color: #ed5565; +} +.irs--flat .irs-bar--single { + border-radius: 4px 0 0 4px; +} +.irs--flat .irs-shadow { + height: 1px; + bottom: 16px; + background-color: #e1e4e9; +} +.irs--flat .irs-handle { + top: 22px; + width: 16px; + height: 18px; + background-color: transparent; +} +.irs--flat .irs-handle > i:first-child { + position: absolute; + display: block; + top: 0; + left: 50%; + width: 2px; + height: 100%; + margin-left: -1px; + background-color: #da4453; +} +.irs--flat .irs-handle.state_hover > i:first-child, +.irs--flat .irs-handle:hover > i:first-child { + background-color: #a43540; +} +.irs--flat .irs-min, +.irs--flat .irs-max { + top: 0; + padding: 1px 3px; + color: #999; + font-size: 10px; + line-height: 1.333; + text-shadow: none; + background-color: #e1e4e9; + border-radius: 4px; +} +.irs--flat .irs-from, +.irs--flat .irs-to, +.irs--flat .irs-single { + color: white; + font-size: 10px; + line-height: 1.333; + text-shadow: none; + padding: 1px 5px; + background-color: #ed5565; + border-radius: 4px; +} +.irs--flat .irs-from:before, +.irs--flat .irs-to:before, +.irs--flat .irs-single:before { + position: absolute; + display: block; + content: ""; + bottom: -6px; + left: 50%; + width: 0; + height: 0; + margin-left: -3px; + overflow: hidden; + border: 3px solid transparent; + border-top-color: #ed5565; +} +.irs--flat .irs-grid-pol { + background-color: #e1e4e9; +} +.irs--flat .irs-grid-text { + color: #999; +} +.irs--big { + height: 55px; +} +.irs--big.irs-with-grid { + height: 70px; +} +.irs--big .irs-line { + top: 33px; + height: 12px; + background-color: white; + background: linear-gradient(to bottom, #ddd -50%, white 150%); + border: 1px solid #ccc; + border-radius: 12px; +} +.irs--big .irs-bar { + top: 33px; + height: 12px; + background-color: #92bce0; + border: 1px solid #428bca; + background: linear-gradient(to bottom, #ffffff 0%, #428bca 30%, #b9d4ec 100%); + box-shadow: inset 0 0 1px 1px rgba(255, 255, 255, 0.5); +} +.irs--big .irs-bar--single { + border-radius: 12px 0 0 12px; +} +.irs--big .irs-shadow { + height: 1px; + bottom: 16px; + background-color: rgba(66, 139, 202, 0.5); +} +.irs--big .irs-handle { + top: 25px; + width: 30px; + height: 30px; + border: 1px solid rgba(0, 0, 0, 0.3); + background-color: #cbcfd5; + background: linear-gradient(to bottom, white 0%, #B4B9BE 30%, white 100%); + box-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2), inset 0 0 3px 1px white; + border-radius: 30px; +} +.irs--big .irs-handle.state_hover, +.irs--big .irs-handle:hover { + border-color: rgba(0, 0, 0, 0.45); + background-color: #939ba7; + background: linear-gradient(to bottom, white 0%, #919BA5 30%, white 100%); +} +.irs--big .irs-min, +.irs--big .irs-max { + top: 0; + padding: 1px 5px; + color: white; + text-shadow: none; + background-color: #9f9f9f; + border-radius: 3px; +} +.irs--big .irs-from, +.irs--big .irs-to, +.irs--big .irs-single { + color: white; + text-shadow: none; + padding: 1px 5px; + background-color: #428bca; + background: linear-gradient(to bottom, #428bca 0%, #3071a9 100%); + border-radius: 3px; +} +.irs--big .irs-grid-pol { + background-color: #428bca; +} +.irs--big .irs-grid-text { + color: #428bca; +} +.irs--modern { + height: 55px; +} +.irs--modern.irs-with-grid { + height: 55px; +} +.irs--modern .irs-line { + top: 25px; + height: 5px; + background-color: #d1d6e0; + background: linear-gradient(to bottom, #e0e4ea 0%, #d1d6e0 100%); + border: 1px solid #a3adc1; + border-bottom-width: 0; + border-radius: 5px; +} +.irs--modern .irs-bar { + top: 25px; + height: 5px; + background: #20b426; + background: linear-gradient(to bottom, #20b426 0%, #18891d 100%); +} +.irs--modern .irs-bar--single { + border-radius: 5px 0 0 5px; +} +.irs--modern .irs-shadow { + height: 1px; + bottom: 21px; + background-color: rgba(209, 214, 224, 0.5); +} +.irs--modern .irs-handle { + top: 37px; + width: 12px; + height: 13px; + border: 1px solid #a3adc1; + border-top-width: 0; + box-shadow: 1px 1px 1px rgba(0, 0, 0, 0.1); + border-radius: 0 0 3px 3px; +} +.irs--modern .irs-handle > i:nth-child(1) { + position: absolute; + display: block; + top: -4px; + left: 1px; + width: 6px; + height: 6px; + border: 1px solid #a3adc1; + background: white; + transform: rotate(45deg); +} +.irs--modern .irs-handle > i:nth-child(2) { + position: absolute; + display: block; + box-sizing: border-box; + top: 0; + left: 0; + width: 10px; + height: 12px; + background: #e9e6e6; + background: linear-gradient(to bottom, white 0%, #e9e6e6 100%); + border-radius: 0 0 3px 3px; +} +.irs--modern .irs-handle > i:nth-child(3) { + position: absolute; + display: block; + box-sizing: border-box; + top: 3px; + left: 3px; + width: 4px; + height: 5px; + border-left: 1px solid #a3adc1; + border-right: 1px solid #a3adc1; +} +.irs--modern .irs-handle.state_hover, +.irs--modern .irs-handle:hover { + border-color: #7685a2; + background: #c3c7cd; + background: linear-gradient(to bottom, #ffffff 0%, #919ba5 30%, #ffffff 100%); +} +.irs--modern .irs-handle.state_hover > i:nth-child(1), +.irs--modern .irs-handle:hover > i:nth-child(1) { + border-color: #7685a2; +} +.irs--modern .irs-handle.state_hover > i:nth-child(3), +.irs--modern .irs-handle:hover > i:nth-child(3) { + border-color: #48536a; +} +.irs--modern .irs-min, +.irs--modern .irs-max { + top: 0; + font-size: 10px; + line-height: 1.333; + text-shadow: none; + padding: 1px 5px; + color: white; + background-color: #d1d6e0; + border-radius: 5px; +} +.irs--modern .irs-from, +.irs--modern .irs-to, +.irs--modern .irs-single { + font-size: 10px; + line-height: 1.333; + text-shadow: none; + padding: 1px 5px; + background-color: #20b426; + color: white; + border-radius: 5px; +} +.irs--modern .irs-from:before, +.irs--modern .irs-to:before, +.irs--modern .irs-single:before { + position: absolute; + display: block; + content: ""; + bottom: -6px; + left: 50%; + width: 0; + height: 0; + margin-left: -3px; + overflow: hidden; + border: 3px solid transparent; + border-top-color: #20b426; +} +.irs--modern .irs-grid { + height: 25px; +} +.irs--modern .irs-grid-pol { + background-color: #dedede; +} +.irs--modern .irs-grid-text { + color: silver; + font-size: 13px; +} +.irs--sharp { + height: 50px; + font-size: 12px; + line-height: 1; +} +.irs--sharp.irs-with-grid { + height: 57px; +} +.irs--sharp .irs-line { + top: 30px; + height: 2px; + background-color: black; + border-radius: 2px; +} +.irs--sharp .irs-bar { + top: 30px; + height: 2px; + background-color: #ee22fa; +} +.irs--sharp .irs-bar--single { + border-radius: 2px 0 0 2px; +} +.irs--sharp .irs-shadow { + height: 1px; + bottom: 21px; + background-color: rgba(0, 0, 0, 0.5); +} +.irs--sharp .irs-handle { + top: 25px; + width: 10px; + height: 10px; + background-color: #a804b2; +} +.irs--sharp .irs-handle > i:first-child { + position: absolute; + display: block; + top: 100%; + left: 0; + width: 0; + height: 0; + border: 5px solid transparent; + border-top-color: #a804b2; +} +.irs--sharp .irs-handle.state_hover, +.irs--sharp .irs-handle:hover { + background-color: black; +} +.irs--sharp .irs-handle.state_hover > i:first-child, +.irs--sharp .irs-handle:hover > i:first-child { + border-top-color: black; +} +.irs--sharp .irs-min, +.irs--sharp .irs-max { + color: white; + font-size: 14px; + line-height: 1; + top: 0; + padding: 3px 4px; + opacity: 0.4; + background-color: #a804b2; + border-radius: 2px; +} +.irs--sharp .irs-from, +.irs--sharp .irs-to, +.irs--sharp .irs-single { + font-size: 14px; + line-height: 1; + text-shadow: none; + padding: 3px 4px; + background-color: #a804b2; + color: white; + border-radius: 2px; +} +.irs--sharp .irs-from:before, +.irs--sharp .irs-to:before, +.irs--sharp .irs-single:before { + position: absolute; + display: block; + content: ""; + bottom: -6px; + left: 50%; + width: 0; + height: 0; + margin-left: -3px; + overflow: hidden; + border: 3px solid transparent; + border-top-color: #a804b2; +} +.irs--sharp .irs-grid { + height: 25px; +} +.irs--sharp .irs-grid-pol { + background-color: #dedede; +} +.irs--sharp .irs-grid-text { + color: silver; + font-size: 13px; +} +.irs--round { + height: 50px; +} +.irs--round.irs-with-grid { + height: 65px; +} +.irs--round .irs-line { + top: 36px; + height: 4px; + background-color: #dee4ec; + border-radius: 4px; +} +.irs--round .irs-bar { + top: 36px; + height: 4px; + background-color: #006cfa; +} +.irs--round .irs-bar--single { + border-radius: 4px 0 0 4px; +} +.irs--round .irs-shadow { + height: 4px; + bottom: 21px; + background-color: rgba(222, 228, 236, 0.5); +} +.irs--round .irs-handle { + top: 26px; + width: 24px; + height: 24px; + border: 4px solid #006cfa; + background-color: white; + border-radius: 24px; + box-shadow: 0 1px 3px rgba(0, 0, 255, 0.3); +} +.irs--round .irs-handle.state_hover, +.irs--round .irs-handle:hover { + background-color: #f0f6ff; +} +.irs--round .irs-min, +.irs--round .irs-max { + color: #333; + font-size: 14px; + line-height: 1; + top: 0; + padding: 3px 5px; + background-color: rgba(0, 0, 0, 0.1); + border-radius: 4px; +} +.irs--round .irs-from, +.irs--round .irs-to, +.irs--round .irs-single { + font-size: 14px; + line-height: 1; + text-shadow: none; + padding: 3px 5px; + background-color: #006cfa; + color: white; + border-radius: 4px; +} +.irs--round .irs-from:before, +.irs--round .irs-to:before, +.irs--round .irs-single:before { + position: absolute; + display: block; + content: ""; + bottom: -6px; + left: 50%; + width: 0; + height: 0; + margin-left: -3px; + overflow: hidden; + border: 3px solid transparent; + border-top-color: #006cfa; +} +.irs--round .irs-grid { + height: 25px; +} +.irs--round .irs-grid-pol { + background-color: #dedede; +} +.irs--round .irs-grid-text { + color: silver; + font-size: 13px; +} +.irs--square { + height: 50px; +} +.irs--square.irs-with-grid { + height: 60px; +} +.irs--square .irs-line { + top: 31px; + height: 4px; + background-color: #dedede; +} +.irs--square .irs-bar { + top: 31px; + height: 4px; + background-color: black; +} +.irs--square .irs-shadow { + height: 2px; + bottom: 21px; + background-color: #dedede; +} +.irs--square .irs-handle { + top: 25px; + width: 16px; + height: 16px; + border: 3px solid black; + background-color: white; + -webkit-transform: rotate(45deg); + -ms-transform: rotate(45deg); + transform: rotate(45deg); +} +.irs--square .irs-handle.state_hover, +.irs--square .irs-handle:hover { + background-color: #f0f6ff; +} +.irs--square .irs-min, +.irs--square .irs-max { + color: #333; + font-size: 14px; + line-height: 1; + top: 0; + padding: 3px 5px; + background-color: rgba(0, 0, 0, 0.1); +} +.irs--square .irs-from, +.irs--square .irs-to, +.irs--square .irs-single { + font-size: 14px; + line-height: 1; + text-shadow: none; + padding: 3px 5px; + background-color: black; + color: white; +} +.irs--square .irs-grid { + height: 25px; +} +.irs--square .irs-grid-pol { + background-color: #dedede; +} +.irs--square .irs-grid-text { + color: silver; + font-size: 11px; } diff --git a/css/ion.rangeSlider.min.css b/css/ion.rangeSlider.min.css new file mode 100644 index 0000000..210d30b --- /dev/null +++ b/css/ion.rangeSlider.min.css @@ -0,0 +1 @@ +/*!Ion.RangeSlider, 2.3.0, © Denis Ineshin, 2010 - 2018, IonDen.com, Build date: 2018-12-12 00:07:25*/.irs{position:relative;display:block;-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;font-size:12px;font-family:Arial,sans-serif}.irs-line{position:relative;display:block;overflow:hidden;outline:none !important}.irs-bar{position:absolute;display:block;left:0;width:0}.irs-shadow{position:absolute;display:none;left:0;width:0}.irs-handle{position:absolute;display:block;box-sizing:border-box;cursor:default;z-index:1}.irs-handle.type_last{z-index:2}.irs-min,.irs-max{position:absolute;display:block;cursor:default}.irs-min{left:0}.irs-max{right:0}.irs-from,.irs-to,.irs-single{position:absolute;display:block;top:0;left:0;cursor:default;white-space:nowrap}.irs-grid{position:absolute;display:none;bottom:0;left:0;width:100%;height:20px}.irs-with-grid .irs-grid{display:block}.irs-grid-pol{position:absolute;top:0;left:0;width:1px;height:8px;background:#000}.irs-grid-pol.small{height:4px}.irs-grid-text{position:absolute;bottom:0;left:0;white-space:nowrap;text-align:center;font-size:9px;line-height:9px;padding:0 3px;color:#000}.irs-disable-mask{position:absolute;display:block;top:0;left:-1%;width:102%;height:100%;cursor:default;background:rgba(0,0,0,0);z-index:2}.lt-ie9 .irs-disable-mask{background:#000;filter:alpha(opacity=0);cursor:not-allowed}.irs-disabled{opacity:.4}.irs-hidden-input{position:absolute !important;display:block !important;top:0 !important;left:0 !important;width:0 !important;height:0 !important;font-size:0 !important;line-height:0 !important;padding:0 !important;margin:0 !important;overflow:hidden;outline:none !important;z-index:-9999 !important;background:none !important;border-style:solid !important;border-color:transparent !important}.irs--flat{height:40px}.irs--flat.irs-with-grid{height:60px}.irs--flat .irs-line{top:25px;height:12px;background-color:#e1e4e9;border-radius:4px}.irs--flat .irs-bar{top:25px;height:12px;background-color:#ed5565}.irs--flat .irs-bar--single{border-radius:4px 0 0 4px}.irs--flat .irs-shadow{height:1px;bottom:16px;background-color:#e1e4e9}.irs--flat .irs-handle{top:22px;width:16px;height:18px;background-color:transparent}.irs--flat .irs-handle>i:first-child{position:absolute;display:block;top:0;left:50%;width:2px;height:100%;margin-left:-1px;background-color:#da4453}.irs--flat .irs-handle.state_hover>i:first-child,.irs--flat .irs-handle:hover>i:first-child{background-color:#a43540}.irs--flat .irs-min,.irs--flat .irs-max{top:0;padding:1px 3px;color:#999;font-size:10px;line-height:1.333;text-shadow:none;background-color:#e1e4e9;border-radius:4px}.irs--flat .irs-from,.irs--flat .irs-to,.irs--flat .irs-single{color:white;font-size:10px;line-height:1.333;text-shadow:none;padding:1px 5px;background-color:#ed5565;border-radius:4px}.irs--flat .irs-from:before,.irs--flat .irs-to:before,.irs--flat .irs-single:before{position:absolute;display:block;content:"";bottom:-6px;left:50%;width:0;height:0;margin-left:-3px;overflow:hidden;border:3px solid transparent;border-top-color:#ed5565}.irs--flat .irs-grid-pol{background-color:#e1e4e9}.irs--flat .irs-grid-text{color:#999}.irs--big{height:55px}.irs--big.irs-with-grid{height:70px}.irs--big .irs-line{top:33px;height:12px;background-color:white;background:linear-gradient(to bottom, #ddd -50%, white 150%);border:1px solid #ccc;border-radius:12px}.irs--big .irs-bar{top:33px;height:12px;background-color:#92bce0;border:1px solid #428bca;background:linear-gradient(to bottom, #ffffff 0%, #428bca 30%, #b9d4ec 100%);box-shadow:inset 0 0 1px 1px rgba(255,255,255,0.5)}.irs--big .irs-bar--single{border-radius:12px 0 0 12px}.irs--big .irs-shadow{height:1px;bottom:16px;background-color:rgba(66,139,202,0.5)}.irs--big .irs-handle{top:25px;width:30px;height:30px;border:1px solid rgba(0,0,0,0.3);background-color:#cbcfd5;background:linear-gradient(to bottom, white 0%, #B4B9BE 30%, white 100%);box-shadow:1px 1px 2px rgba(0,0,0,0.2),inset 0 0 3px 1px white;border-radius:30px}.irs--big .irs-handle.state_hover,.irs--big .irs-handle:hover{border-color:rgba(0,0,0,0.45);background-color:#939ba7;background:linear-gradient(to bottom, white 0%, #919BA5 30%, white 100%)}.irs--big .irs-min,.irs--big .irs-max{top:0;padding:1px 5px;color:white;text-shadow:none;background-color:#9f9f9f;border-radius:3px}.irs--big .irs-from,.irs--big .irs-to,.irs--big .irs-single{color:white;text-shadow:none;padding:1px 5px;background-color:#428bca;background:linear-gradient(to bottom, #428bca 0%, #3071a9 100%);border-radius:3px}.irs--big .irs-grid-pol{background-color:#428bca}.irs--big .irs-grid-text{color:#428bca}.irs--modern{height:55px}.irs--modern.irs-with-grid{height:55px}.irs--modern .irs-line{top:25px;height:5px;background-color:#d1d6e0;background:linear-gradient(to bottom, #e0e4ea 0%, #d1d6e0 100%);border:1px solid #a3adc1;border-bottom-width:0;border-radius:5px}.irs--modern .irs-bar{top:25px;height:5px;background:#20b426;background:linear-gradient(to bottom, #20b426 0%, #18891d 100%)}.irs--modern .irs-bar--single{border-radius:5px 0 0 5px}.irs--modern .irs-shadow{height:1px;bottom:21px;background-color:rgba(209,214,224,0.5)}.irs--modern .irs-handle{top:37px;width:12px;height:13px;border:1px solid #a3adc1;border-top-width:0;box-shadow:1px 1px 1px rgba(0,0,0,0.1);border-radius:0 0 3px 3px}.irs--modern .irs-handle>i:nth-child(1){position:absolute;display:block;top:-4px;left:1px;width:6px;height:6px;border:1px solid #a3adc1;background:white;transform:rotate(45deg)}.irs--modern .irs-handle>i:nth-child(2){position:absolute;display:block;box-sizing:border-box;top:0;left:0;width:10px;height:12px;background:#e9e6e6;background:linear-gradient(to bottom, white 0%, #e9e6e6 100%);border-radius:0 0 3px 3px}.irs--modern .irs-handle>i:nth-child(3){position:absolute;display:block;box-sizing:border-box;top:3px;left:3px;width:4px;height:5px;border-left:1px solid #a3adc1;border-right:1px solid #a3adc1}.irs--modern .irs-handle.state_hover,.irs--modern .irs-handle:hover{border-color:#7685a2;background:#c3c7cd;background:linear-gradient(to bottom, #ffffff 0%, #919ba5 30%, #ffffff 100%)}.irs--modern .irs-handle.state_hover>i:nth-child(1),.irs--modern .irs-handle:hover>i:nth-child(1){border-color:#7685a2}.irs--modern .irs-handle.state_hover>i:nth-child(3),.irs--modern .irs-handle:hover>i:nth-child(3){border-color:#48536a}.irs--modern .irs-min,.irs--modern .irs-max{top:0;font-size:10px;line-height:1.333;text-shadow:none;padding:1px 5px;color:white;background-color:#d1d6e0;border-radius:5px}.irs--modern .irs-from,.irs--modern .irs-to,.irs--modern .irs-single{font-size:10px;line-height:1.333;text-shadow:none;padding:1px 5px;background-color:#20b426;color:white;border-radius:5px}.irs--modern .irs-from:before,.irs--modern .irs-to:before,.irs--modern .irs-single:before{position:absolute;display:block;content:"";bottom:-6px;left:50%;width:0;height:0;margin-left:-3px;overflow:hidden;border:3px solid transparent;border-top-color:#20b426}.irs--modern .irs-grid{height:25px}.irs--modern .irs-grid-pol{background-color:#dedede}.irs--modern .irs-grid-text{color:silver;font-size:13px}.irs--sharp{height:50px;font-size:12px;line-height:1}.irs--sharp.irs-with-grid{height:57px}.irs--sharp .irs-line{top:30px;height:2px;background-color:black;border-radius:2px}.irs--sharp .irs-bar{top:30px;height:2px;background-color:#ee22fa}.irs--sharp .irs-bar--single{border-radius:2px 0 0 2px}.irs--sharp .irs-shadow{height:1px;bottom:21px;background-color:rgba(0,0,0,0.5)}.irs--sharp .irs-handle{top:25px;width:10px;height:10px;background-color:#a804b2}.irs--sharp .irs-handle>i:first-child{position:absolute;display:block;top:100%;left:0;width:0;height:0;border:5px solid transparent;border-top-color:#a804b2}.irs--sharp .irs-handle.state_hover,.irs--sharp .irs-handle:hover{background-color:black}.irs--sharp .irs-handle.state_hover>i:first-child,.irs--sharp .irs-handle:hover>i:first-child{border-top-color:black}.irs--sharp .irs-min,.irs--sharp .irs-max{color:white;font-size:14px;line-height:1;top:0;padding:3px 4px;opacity:.4;background-color:#a804b2;border-radius:2px}.irs--sharp .irs-from,.irs--sharp .irs-to,.irs--sharp .irs-single{font-size:14px;line-height:1;text-shadow:none;padding:3px 4px;background-color:#a804b2;color:white;border-radius:2px}.irs--sharp .irs-from:before,.irs--sharp .irs-to:before,.irs--sharp .irs-single:before{position:absolute;display:block;content:"";bottom:-6px;left:50%;width:0;height:0;margin-left:-3px;overflow:hidden;border:3px solid transparent;border-top-color:#a804b2}.irs--sharp .irs-grid{height:25px}.irs--sharp .irs-grid-pol{background-color:#dedede}.irs--sharp .irs-grid-text{color:silver;font-size:13px}.irs--round{height:50px}.irs--round.irs-with-grid{height:65px}.irs--round .irs-line{top:36px;height:4px;background-color:#dee4ec;border-radius:4px}.irs--round .irs-bar{top:36px;height:4px;background-color:#006cfa}.irs--round .irs-bar--single{border-radius:4px 0 0 4px}.irs--round .irs-shadow{height:4px;bottom:21px;background-color:rgba(222,228,236,0.5)}.irs--round .irs-handle{top:26px;width:24px;height:24px;border:4px solid #006cfa;background-color:white;border-radius:24px;box-shadow:0 1px 3px rgba(0,0,255,0.3)}.irs--round .irs-handle.state_hover,.irs--round .irs-handle:hover{background-color:#f0f6ff}.irs--round .irs-min,.irs--round .irs-max{color:#333;font-size:14px;line-height:1;top:0;padding:3px 5px;background-color:rgba(0,0,0,0.1);border-radius:4px}.irs--round .irs-from,.irs--round .irs-to,.irs--round .irs-single{font-size:14px;line-height:1;text-shadow:none;padding:3px 5px;background-color:#006cfa;color:white;border-radius:4px}.irs--round .irs-from:before,.irs--round .irs-to:before,.irs--round .irs-single:before{position:absolute;display:block;content:"";bottom:-6px;left:50%;width:0;height:0;margin-left:-3px;overflow:hidden;border:3px solid transparent;border-top-color:#006cfa}.irs--round .irs-grid{height:25px}.irs--round .irs-grid-pol{background-color:#dedede}.irs--round .irs-grid-text{color:silver;font-size:13px}.irs--square{height:50px}.irs--square.irs-with-grid{height:60px}.irs--square .irs-line{top:31px;height:4px;background-color:#dedede}.irs--square .irs-bar{top:31px;height:4px;background-color:black}.irs--square .irs-shadow{height:2px;bottom:21px;background-color:#dedede}.irs--square .irs-handle{top:25px;width:16px;height:16px;border:3px solid black;background-color:white;-webkit-transform:rotate(45deg);-ms-transform:rotate(45deg);transform:rotate(45deg)}.irs--square .irs-handle.state_hover,.irs--square .irs-handle:hover{background-color:#f0f6ff}.irs--square .irs-min,.irs--square .irs-max{color:#333;font-size:14px;line-height:1;top:0;padding:3px 5px;background-color:rgba(0,0,0,0.1)}.irs--square .irs-from,.irs--square .irs-to,.irs--square .irs-single{font-size:14px;line-height:1;text-shadow:none;padding:3px 5px;background-color:black;color:white}.irs--square .irs-grid{height:25px}.irs--square .irs-grid-pol{background-color:#dedede}.irs--square .irs-grid-text{color:silver;font-size:11px} \ No newline at end of file diff --git a/css/ion.rangeSlider.skinFlat.css b/css/ion.rangeSlider.skinFlat.css deleted file mode 100644 index 166314e..0000000 --- a/css/ion.rangeSlider.skinFlat.css +++ /dev/null @@ -1,106 +0,0 @@ -/* Ion.RangeSlider, Flat UI Skin -// css version 2.0.3 -// © Denis Ineshin, 2014 https://github.com/IonDen -// ===================================================================================================================*/ - -/* ===================================================================================================================== -// Skin details */ - -.irs-line-mid, -.irs-line-left, -.irs-line-right, -.irs-bar, -.irs-bar-edge, -.irs-slider { - background: url(../img/sprite-skin-flat.png) repeat-x; -} - -.irs { - height: 40px; -} -.irs-with-grid { - height: 60px; -} -.irs-line { - height: 12px; top: 25px; -} - .irs-line-left { - height: 12px; - background-position: 0 -30px; - } - .irs-line-mid { - height: 12px; - background-position: 0 0; - } - .irs-line-right { - height: 12px; - background-position: 100% -30px; - } - -.irs-bar { - height: 12px; top: 25px; - background-position: 0 -60px; -} - .irs-bar-edge { - top: 25px; - height: 12px; width: 9px; - background-position: 0 -90px; - } - -.irs-shadow { - height: 3px; top: 34px; - background: #000; - opacity: 0.25; -} -.lt-ie9 .irs-shadow { - filter: alpha(opacity=25); -} - -.irs-slider { - width: 16px; height: 18px; - top: 22px; - background-position: 0 -120px; -} -.irs-slider.state_hover, .irs-slider:hover { - background-position: 0 -150px; -} - -.irs-min, .irs-max { - color: #999; - font-size: 10px; line-height: 1.333; - text-shadow: none; - top: 0; padding: 1px 3px; - background: #e1e4e9; - -moz-border-radius: 4px; - border-radius: 4px; -} - -.irs-from, .irs-to, .irs-single { - color: #fff; - font-size: 10px; line-height: 1.333; - text-shadow: none; - padding: 1px 5px; - background: #ed5565; - -moz-border-radius: 4px; - border-radius: 4px; -} -.irs-from:after, .irs-to:after, .irs-single:after { - position: absolute; display: block; content: ""; - bottom: -6px; left: 50%; - width: 0; height: 0; - margin-left: -3px; - overflow: hidden; - border: 3px solid transparent; - border-top-color: #ed5565; -} - - -.irs-grid-pol { - background: #e1e4e9; -} -.irs-grid-text { - color: #999; -} - -.irs-disabled { -} diff --git a/css/ion.rangeSlider.skinHTML5.css b/css/ion.rangeSlider.skinHTML5.css deleted file mode 100644 index 740d429..0000000 --- a/css/ion.rangeSlider.skinHTML5.css +++ /dev/null @@ -1,124 +0,0 @@ -/* Ion.RangeSlider, Simple Skin -// css version 2.0.3 -// © Denis Ineshin, 2014 https://github.com/IonDen -// © guybowden, 2014 https://github.com/guybowden -// ===================================================================================================================*/ - -/* ===================================================================================================================== -// Skin details */ - -.irs { - height: 55px; -} -.irs-with-grid { - height: 75px; -} -.irs-line { - height: 10px; top: 33px; - background: #EEE; - background: linear-gradient(to bottom, #DDD -50%, #FFF 150%); /* W3C */ - border: 1px solid #CCC; - border-radius: 16px; - -moz-border-radius: 16px; -} - .irs-line-left { - height: 8px; - } - .irs-line-mid { - height: 8px; - } - .irs-line-right { - height: 8px; - } - -.irs-bar { - height: 10px; top: 33px; - border-top: 1px solid #428bca; - border-bottom: 1px solid #428bca; - background: #428bca; - background: linear-gradient(to top, rgba(66,139,202,1) 0%,rgba(127,195,232,1) 100%); /* W3C */ -} - .irs-bar-edge { - height: 10px; top: 33px; - width: 14px; - border: 1px solid #428bca; - border-right: 0; - background: #428bca; - background: linear-gradient(to top, rgba(66,139,202,1) 0%,rgba(127,195,232,1) 100%); /* W3C */ - border-radius: 16px 0 0 16px; - -moz-border-radius: 16px 0 0 16px; - } - -.irs-shadow { - height: 2px; top: 38px; - background: #000; - opacity: 0.3; - border-radius: 5px; - -moz-border-radius: 5px; -} -.lt-ie9 .irs-shadow { - filter: alpha(opacity=30); -} - -.irs-slider { - top: 25px; - width: 27px; height: 27px; - border: 1px solid #AAA; - background: #DDD; - background: linear-gradient(to bottom, rgba(255,255,255,1) 0%,rgba(220,220,220,1) 20%,rgba(255,255,255,1) 100%); /* W3C */ - border-radius: 27px; - -moz-border-radius: 27px; - box-shadow: 1px 1px 3px rgba(0,0,0,0.3); - cursor: pointer; -} - -.irs-slider.state_hover, .irs-slider:hover { - background: #FFF; -} - -.irs-min, .irs-max { - color: #333; - font-size: 12px; line-height: 1.333; - text-shadow: none; - top: 0; - padding: 1px 5px; - background: rgba(0,0,0,0.1); - border-radius: 3px; - -moz-border-radius: 3px; -} - -.lt-ie9 .irs-min, .lt-ie9 .irs-max { - background: #ccc; -} - -.irs-from, .irs-to, .irs-single { - color: #fff; - font-size: 14px; line-height: 1.333; - text-shadow: none; - padding: 1px 5px; - background: #428bca; - border-radius: 3px; - -moz-border-radius: 3px; -} -.lt-ie9 .irs-from, .lt-ie9 .irs-to, .lt-ie9 .irs-single { - background: #999; -} - -.irs-grid { - height: 27px; -} -.irs-grid-pol { - opacity: 0.5; - background: #428bca; -} -.irs-grid-pol.small { - background: #999; -} - -.irs-grid-text { - bottom: 5px; - color: #99a4ac; -} - -.irs-disabled { -} diff --git a/css/ion.rangeSlider.skinModern.css b/css/ion.rangeSlider.skinModern.css deleted file mode 100644 index 13009c1..0000000 --- a/css/ion.rangeSlider.skinModern.css +++ /dev/null @@ -1,116 +0,0 @@ -/* Ion.RangeSlider, Modern Skin -// css version 2.0.3 -// © Denis Ineshin, 2014 https://github.com/IonDen -// ===================================================================================================================*/ - -/* ===================================================================================================================== -// Skin details */ - -.irs-line-mid, -.irs-line-left, -.irs-line-right, -.irs-bar, -.irs-bar-edge, -.irs-slider { - background: url(../img/sprite-skin-modern.png) repeat-x; -} - -.irs { - height: 50px; -} -.irs-with-grid { - height: 70px; -} -.irs-line { - height: 6px; top: 25px; -} - .irs-line-left { - height: 6px; - background-position: 0 -30px; - } - .irs-line-mid { - height: 6px; - background-position: 0 0; - } - .irs-line-right { - height: 6px; - background-position: 100% -30px; - } - -.irs-bar { - height: 6px; top: 25px; - background-position: 0 -60px; -} - .irs-bar-edge { - top: 25px; - height: 6px; width: 6px; - background-position: 0 -90px; - } - -.irs-shadow { - height: 5px; top: 25px; - background: #000; - opacity: 0.25; -} -.lt-ie9 .irs-shadow { - filter: alpha(opacity=25); -} - -.irs-slider { - width: 11px; height: 18px; - top: 31px; - background-position: 0 -120px; -} -.irs-slider.state_hover, .irs-slider:hover { - background-position: 0 -150px; -} - -.irs-min, .irs-max { - color: #999; - font-size: 10px; line-height: 1.333; - text-shadow: none; - top: 0; padding: 1px 3px; - background: #e1e4e9; - -moz-border-radius: 4px; - border-radius: 4px; -} - -.irs-from, .irs-to, .irs-single { - color: #fff; - font-size: 10px; line-height: 1.333; - text-shadow: none; - padding: 1px 5px; - background: #20b426; - -moz-border-radius: 4px; - border-radius: 4px; -} -.irs-from:after, .irs-to:after, .irs-single:after { - position: absolute; display: block; content: ""; - bottom: -6px; left: 50%; - width: 0; height: 0; - margin-left: -3px; - overflow: hidden; - border: 3px solid transparent; - border-top-color: #20b426; -} - -.irs-grid { - height: 34px; -} -.irs-grid-pol { - background: #c0c0c0; -} -.irs-grid-text { - bottom: 12px; - color: #c0c0c0; -} - -.irs-disable-mask { - -} -.irs-disabled { - -} -.lt-ie9 .irs-disabled { - -} diff --git a/css/ion.rangeSlider.skinNice.css b/css/ion.rangeSlider.skinNice.css deleted file mode 100644 index 57b20d1..0000000 --- a/css/ion.rangeSlider.skinNice.css +++ /dev/null @@ -1,102 +0,0 @@ -/* Ion.RangeSlider, Nice Skin -// css version 2.0.3 -// © Denis Ineshin, 2014 https://github.com/IonDen -// ===================================================================================================================*/ - -/* ===================================================================================================================== -// Skin details */ - -.irs-line-mid, -.irs-line-left, -.irs-line-right, -.irs-bar, -.irs-bar-edge, -.irs-slider { - background: url(../img/sprite-skin-nice.png) repeat-x; -} - -.irs { - height: 40px; -} -.irs-with-grid { - height: 60px; -} -.irs-line { - height: 8px; top: 25px; -} - .irs-line-left { - height: 8px; - background-position: 0 -30px; - } - .irs-line-mid { - height: 8px; - background-position: 0 0; - } - .irs-line-right { - height: 8px; - background-position: 100% -30px; - } - -.irs-bar { - height: 8px; top: 25px; - background-position: 0 -60px; -} - .irs-bar-edge { - top: 25px; - height: 8px; width: 11px; - background-position: 0 -90px; - } - -.irs-shadow { - height: 1px; top: 34px; - background: #000; - opacity: 0.15; -} -.lt-ie9 .irs-shadow { - filter: alpha(opacity=15); -} - -.irs-slider { - width: 22px; height: 22px; - top: 17px; - background-position: 0 -120px; -} -.irs-slider.state_hover, .irs-slider:hover { - background-position: 0 -150px; -} - -.irs-min, .irs-max { - color: #999; - font-size: 10px; line-height: 1.333; - text-shadow: none; - top: 0; padding: 1px 3px; - background: rgba(0,0,0,0.1); - -moz-border-radius: 3px; - border-radius: 3px; -} -.lt-ie9 .irs-min, .lt-ie9 .irs-max { - background: #ccc; -} - -.irs-from, .irs-to, .irs-single { - color: #fff; - font-size: 10px; line-height: 1.333; - text-shadow: none; - padding: 1px 5px; - background: rgba(0,0,0,0.3); - -moz-border-radius: 3px; - border-radius: 3px; -} -.lt-ie9 .irs-from, .lt-ie9 .irs-to, .lt-ie9 .irs-single { - background: #999; -} - -.irs-grid-pol { - background: #99a4ac; -} -.irs-grid-text { - color: #99a4ac; -} - -.irs-disabled { -} diff --git a/css/ion.rangeSlider.skinRound.css b/css/ion.rangeSlider.skinRound.css deleted file mode 100644 index be5ab70..0000000 --- a/css/ion.rangeSlider.skinRound.css +++ /dev/null @@ -1,108 +0,0 @@ -/* Ion.RangeSlider, Round Skin -// css version 2.2.0 -// © Denis Ineshin, 2014 https://github.com/IonDen -// © Veaceslav Grimalschi, 2018 https://github.com/grimalschi -// ===================================================================================================================*/ - -/* ===================================================================================================================== -// Skin details */ - -.irs { - height: 50px; - font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; -} - -.irs-with-grid { - height: 67px; -} - -.irs-line { - top: 36px; - height: 4px; - background: #DEE4EC; - border-radius: 16px; -} - -.irs-bar, .irs-bar-edge { - top: 36px; - height: 4px; - background: #006CFA; -} -.irs-bar-edge { - width: 12px; -} - -.irs-shadow { - height: 4px; - top: 40px; - background: #DEE4EC; - opacity: 0.5; -} - -.lt-ie9 .irs-shadow { - filter: alpha(opacity=25); -} - -.irs-slider { - top: 35px; - width: 16px; - height: 16px; - margin-top: -10px; - border: 4px solid #006CFA; - background: white; - border-radius: 27px; - box-shadow: 0 1px 3px rgba(0,0,255,0.3); - cursor: pointer; - box-sizing: content-box; -} - -.irs-slider.state_hover, .irs-slider:hover { - background: #f0f6ff; -} - -.irs-min, .irs-max { - color: #333; - font-size: 14px; - top: 0; - padding: 3px 5px; - background: rgba(0,0,0,0.1); - border-radius: 3px; - line-height: 1; -} - -.irs-from, .irs-to, .irs-single { - color: #fff; - font-size: 14px; - text-shadow: none; - padding: 3px 5px; - background: #006CFA; - border-radius: 3px; - line-height: 1; -} -.irs-from:after, .irs-to:after, .irs-single:after { - position: absolute; - display: block; - content: ""; - bottom: -6px; - left: 50%; - width: 0; - height: 0; - margin-left: -3px; - overflow: hidden; - border: 3px solid transparent; - border-top-color: #006CFA; -} - -.irs-grid { - height: 27px; -} -.irs-grid-pol { - background: #DEE4EC; -} - -.irs-grid-text { - bottom: 4px; - color: silver; - font-size: 12px; -} - diff --git a/css/ion.rangeSlider.skinSimple.css b/css/ion.rangeSlider.skinSimple.css deleted file mode 100644 index 34fc7e2..0000000 --- a/css/ion.rangeSlider.skinSimple.css +++ /dev/null @@ -1,102 +0,0 @@ -/* Ion.RangeSlider, Simple Skin -// css version 2.0.3 -// © Denis Ineshin, 2014 https://github.com/IonDen -// ===================================================================================================================*/ - -/* ===================================================================================================================== -// Skin details */ - -.irs-line-mid, -.irs-line-left, -.irs-line-right, -.irs-bar, -.irs-bar-edge, -.irs-slider { - background: url(../img/sprite-skin-simple.png) repeat-x; -} - -.irs { - height: 40px; -} -.irs-with-grid { - height: 60px; -} -.irs-line { - height: 6px; top: 25px; -} - .irs-line-left { - height: 6px; - background-position: 0 -30px; - } - .irs-line-mid { - height: 6px; - background-position: 0 0; - } - .irs-line-right { - height: 6px; - background-position: 100% -30px; - } - -.irs-bar { - height: 6px; top: 25px; - background-position: 0 -60px; -} - .irs-bar-edge { - top: 25px; - height: 6px; width: 7px; - background-position: 0 -90px; - } - -.irs-shadow { - height: 1px; top: 34px; - background: #000; - opacity: 0.75; -} -.lt-ie9 .irs-shadow { - filter: alpha(opacity=75); -} - -.irs-slider { - width: 8px; height: 15px; - top: 21px; - background-position: 0 -120px; -} -.irs-slider.state_hover, .irs-slider:hover { - background-position: 0 -150px; -} - -.irs-min, .irs-max { - color: #c0c0c0; - font-size: 10px; line-height: 1.333; - text-shadow: none; - top: 0; padding: 1px 3px; - background: rgba(0,0,0,0.1); - -moz-border-radius: 3px; - border-radius: 3px; -} -.lt-ie9 .irs-min, .lt-ie9 .irs-max { - background: #3654b0; -} - -.irs-from, .irs-to, .irs-single { - color: #000; - font-size: 10px; line-height: 1.333; - text-shadow: none; - padding: 1px 5px; - background: rgba(255,255,255,0.8); - -moz-border-radius: 3px; - border-radius: 3px; -} -.lt-ie9 .irs-from, .lt-ie9 .irs-to, .lt-ie9 .irs-single { - background: #d8dff3; -} - -.irs-grid-pol { - background: #777; -} -.irs-grid-text { - color: #e0e0e0; -} - -.irs-disabled { -} diff --git a/css/ion.rangeSlider.skinSquare.css b/css/ion.rangeSlider.skinSquare.css deleted file mode 100644 index 323921c..0000000 --- a/css/ion.rangeSlider.skinSquare.css +++ /dev/null @@ -1,87 +0,0 @@ -/* Ion.RangeSlider, Square Skin -// css version 2.2.0 -// © Denis Ineshin, 2014 https://github.com/IonDen -// © Veaceslav Grimalschi, 2018 https://github.com/grimalschi -// ===================================================================================================================*/ - -/* ===================================================================================================================== -// Skin details */ - -.irs { - height: 45px; - font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; -} - -.irs-with-grid { - height: 62px; -} - -.irs-line { - top: 31px; - height: 4px; - background: #DEDEDE; -} - -.irs-bar, .irs-bar-edge { - top: 31px; - height: 4px; - background: black; -} -.irs-bar-edge { - width: 8px; -} - -.irs-shadow { - height: 2px; - top: 37px; - background: #DEDEDE; -} - -.irs-slider { - top: 30px; - width: 10px; - height: 10px; - margin-top: -5px; - border: 3px solid black; - background: white; - cursor: pointer; - box-sizing: content-box; - -webkit-transform: rotate(45deg); - -ms-transform: rotate(45deg); - transform: rotate(45deg); -} - -.irs-slider.state_hover, .irs-slider:hover { - background: #f0f0f0; -} - -.irs-min, .irs-max { - color: #333; - font-size: 13px; - top: 0; - padding: 3px 4px; - background: rgba(0,0,0,0.1); - line-height: 1; -} - -.irs-from, .irs-to, .irs-single { - color: #fff; - font-size: 13px; - text-shadow: none; - padding: 3px 4px; - background: black; - line-height: 1; -} - -.irs-grid { - height: 27px; -} -.irs-grid-pol { - background: #DEDEDE; -} - -.irs-grid-text { - bottom: 4px; - color: silver; - font-size: 11px; -} diff --git a/css/normalize.css b/css/normalize.css deleted file mode 100644 index 46f646a..0000000 --- a/css/normalize.css +++ /dev/null @@ -1,427 +0,0 @@ -/*! normalize.css v3.0.2 | MIT License | git.io/normalize */ - -/** - * 1. Set default font family to sans-serif. - * 2. Prevent iOS text size adjust after orientation change, without disabling - * user zoom. - */ - -html { - font-family: sans-serif; /* 1 */ - -ms-text-size-adjust: 100%; /* 2 */ - -webkit-text-size-adjust: 100%; /* 2 */ -} - -/** - * Remove default margin. - */ - -body { - margin: 0; -} - -/* HTML5 display definitions - ========================================================================== */ - -/** - * Correct `block` display not defined for any HTML5 element in IE 8/9. - * Correct `block` display not defined for `details` or `summary` in IE 10/11 - * and Firefox. - * Correct `block` display not defined for `main` in IE 11. - */ - -article, -aside, -details, -figcaption, -figure, -footer, -header, -hgroup, -main, -menu, -nav, -section, -summary { - display: block; -} - -/** - * 1. Correct `inline-block` display not defined in IE 8/9. - * 2. Normalize vertical alignment of `progress` in Chrome, Firefox, and Opera. - */ - -audio, -canvas, -progress, -video { - display: inline-block; /* 1 */ - vertical-align: baseline; /* 2 */ -} - -/** - * Prevent modern browsers from displaying `audio` without controls. - * Remove excess height in iOS 5 devices. - */ - -audio:not([controls]) { - display: none; - height: 0; -} - -/** - * Address `[hidden]` styling not present in IE 8/9/10. - * Hide the `template` element in IE 8/9/11, Safari, and Firefox < 22. - */ - -[hidden], -template { - display: none; -} - -/* Links - ========================================================================== */ - -/** - * Remove the gray background color from active links in IE 10. - */ - -a { - background-color: transparent; -} - -/** - * Improve readability when focused and also mouse hovered in all browsers. - */ - -a:active, -a:hover { - outline: 0; -} - -/* Text-level semantics - ========================================================================== */ - -/** - * Address styling not present in IE 8/9/10/11, Safari, and Chrome. - */ - -abbr[title] { - border-bottom: 1px dotted; -} - -/** - * Address style set to `bolder` in Firefox 4+, Safari, and Chrome. - */ - -b, -strong { - font-weight: bold; -} - -/** - * Address styling not present in Safari and Chrome. - */ - -dfn { - font-style: italic; -} - -/** - * Address variable `h1` font-size and margin within `section` and `article` - * contexts in Firefox 4+, Safari, and Chrome. - */ - -h1 { - font-size: 2em; - margin: 0.67em 0; -} - -/** - * Address styling not present in IE 8/9. - */ - -mark { - background: #ff0; - color: #000; -} - -/** - * Address inconsistent and variable font size in all browsers. - */ - -small { - font-size: 80%; -} - -/** - * Prevent `sub` and `sup` affecting `line-height` in all browsers. - */ - -sub, -sup { - font-size: 75%; - line-height: 0; - position: relative; - vertical-align: baseline; -} - -sup { - top: -0.5em; -} - -sub { - bottom: -0.25em; -} - -/* Embedded content - ========================================================================== */ - -/** - * Remove border when inside `a` element in IE 8/9/10. - */ - -img { - border: 0; -} - -/** - * Correct overflow not hidden in IE 9/10/11. - */ - -svg:not(:root) { - overflow: hidden; -} - -/* Grouping content - ========================================================================== */ - -/** - * Address margin not present in IE 8/9 and Safari. - */ - -figure { - margin: 1em 40px; -} - -/** - * Address differences between Firefox and other browsers. - */ - -hr { - -moz-box-sizing: content-box; - box-sizing: content-box; - height: 0; -} - -/** - * Contain overflow in all browsers. - */ - -pre { - overflow: auto; -} - -/** - * Address odd `em`-unit font size rendering in all browsers. - */ - -code, -kbd, -pre, -samp { - font-family: monospace, monospace; - font-size: 1em; -} - -/* Forms - ========================================================================== */ - -/** - * Known limitation: by default, Chrome and Safari on OS X allow very limited - * styling of `select`, unless a `border` property is set. - */ - -/** - * 1. Correct color not being inherited. - * Known issue: affects color of disabled elements. - * 2. Correct font properties not being inherited. - * 3. Address margins set differently in Firefox 4+, Safari, and Chrome. - */ - -button, -input, -optgroup, -select, -textarea { - color: inherit; /* 1 */ - font: inherit; /* 2 */ - margin: 0; /* 3 */ -} - -/** - * Address `overflow` set to `hidden` in IE 8/9/10/11. - */ - -button { - overflow: visible; -} - -/** - * Address inconsistent `text-transform` inheritance for `button` and `select`. - * All other form control elements do not inherit `text-transform` values. - * Correct `button` style inheritance in Firefox, IE 8/9/10/11, and Opera. - * Correct `select` style inheritance in Firefox. - */ - -button, -select { - text-transform: none; -} - -/** - * 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio` - * and `video` controls. - * 2. Correct inability to style clickable `input` types in iOS. - * 3. Improve usability and consistency of cursor style between image-type - * `input` and others. - */ - -button, -html input[type="button"], /* 1 */ -input[type="reset"], -input[type="submit"] { - -webkit-appearance: button; /* 2 */ - cursor: pointer; /* 3 */ -} - -/** - * Re-set default cursor for disabled elements. - */ - -button[disabled], -html input[disabled] { - cursor: default; -} - -/** - * Remove inner padding and border in Firefox 4+. - */ - -button::-moz-focus-inner, -input::-moz-focus-inner { - border: 0; - padding: 0; -} - -/** - * Address Firefox 4+ setting `line-height` on `input` using `!important` in - * the UA stylesheet. - */ - -input { - line-height: normal; -} - -/** - * It's recommended that you don't attempt to style these elements. - * Firefox's implementation doesn't respect box-sizing, padding, or width. - * - * 1. Address box sizing set to `content-box` in IE 8/9/10. - * 2. Remove excess padding in IE 8/9/10. - */ - -input[type="checkbox"], -input[type="radio"] { - box-sizing: border-box; /* 1 */ - padding: 0; /* 2 */ -} - -/** - * Fix the cursor style for Chrome's increment/decrement buttons. For certain - * `font-size` values of the `input`, it causes the cursor style of the - * decrement button to change from `default` to `text`. - */ - -input[type="number"]::-webkit-inner-spin-button, -input[type="number"]::-webkit-outer-spin-button { - height: auto; -} - -/** - * 1. Address `appearance` set to `searchfield` in Safari and Chrome. - * 2. Address `box-sizing` set to `border-box` in Safari and Chrome - * (include `-moz` to future-proof). - */ - -input[type="search"] { - -webkit-appearance: textfield; /* 1 */ - -moz-box-sizing: content-box; - -webkit-box-sizing: content-box; /* 2 */ - box-sizing: content-box; -} - -/** - * Remove inner padding and search cancel button in Safari and Chrome on OS X. - * Safari (but not Chrome) clips the cancel button when the search input has - * padding (and `textfield` appearance). - */ - -input[type="search"]::-webkit-search-cancel-button, -input[type="search"]::-webkit-search-decoration { - -webkit-appearance: none; -} - -/** - * Define consistent border, margin, and padding. - */ - -fieldset { - border: 1px solid #c0c0c0; - margin: 0 2px; - padding: 0.35em 0.625em 0.75em; -} - -/** - * 1. Correct `color` not being inherited in IE 8/9/10/11. - * 2. Remove padding so people aren't caught out if they zero out fieldsets. - */ - -legend { - border: 0; /* 1 */ - padding: 0; /* 2 */ -} - -/** - * Remove default vertical scrollbar in IE 8/9/10/11. - */ - -textarea { - overflow: auto; -} - -/** - * Don't inherit the `font-weight` (applied by a rule above). - * NOTE: the default cannot safely be changed in Chrome and Safari on OS X. - */ - -optgroup { - font-weight: bold; -} - -/* Tables - ========================================================================== */ - -/** - * Remove most spacing between table cells. - */ - -table { - border-collapse: collapse; - border-spacing: 0; -} - -td, -th { - padding: 0; -} diff --git a/history.md b/history.md index 6e4f505..2db4309 100644 --- a/history.md +++ b/history.md @@ -2,6 +2,11 @@ # Update History +### Version 2.3.0. December 11, 2018 +* Website update +* Big skins update +* Minor bugfixes + ### Version 2.2.0. June 21, 2017 * Slider has `TabIndex` support now. Issue #321 * `keyboard_step` option removed as confusing. @@ -155,6 +160,4 @@ *** -Support the plugin: - -[![](https://pledgie.com/campaigns/25694.png?skin_name=chrome)](https://pledgie.com/campaigns/25694) \ No newline at end of file +[Support the plugin on Patreon](https://www.patreon.com/IonDen) \ No newline at end of file diff --git a/img/sprite-skin-flat.png b/img/sprite-skin-flat.png deleted file mode 100644 index 0f11c7cb5dfa4ad54ac603fd2fc6afadea63efa3..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 304 zcmeAS@N?(olHy`uVBq!ia0y~yU}OQZx3Dk+$%fhfKY)~UfKP}kkbd~&<1;B28oYe>W)n;oI`zYCXKPqETZOo4PBATCd7zPvA>qQao15O+Dl{7F68_KdWFH$)z4*}Q$iB}OjLBA diff --git a/img/sprite-skin-modern.png b/img/sprite-skin-modern.png deleted file mode 100644 index c9060f2756791db4fcfebaa02bf1ca6b55ea7b5c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 505 zcmeAS@N?(olHy`uVBq!ia0y~yU}OQZw{S26N!RQ}KY^5efKP}kkbeF4!|8KZ4jewE zutn{{)&t1GKBslo~gD1;ZZ#p(z z@*vO%&XOR%UgJ#RdWmfsBPlU3IxN|2Okl z%v*U%k30S9`_hAq`-Gw{tPBcP>sDyu_`lT26KEO`tS`E0mz5!ZTQyht__jXXwU&Dn zoz7)z6`$YuRyEeEVmin(3=AK%=GSxq^(obKgZT^xxc^pGZ=YScd4bo3XgDmXZa&C;#!PXXKZ5R^|-!BiE#{LB!T6-}Z;+jJ(cfKP}kkbVgR=gyzMa^=c} z3m49V0YrG$!DA5arX71`FI(F?eIAh8Gi~mQ^;>5yS@Zw@e;{}2f)#x;=Kp75`SSJa zojZ5_{Q2|t?c3|uug_n(@&C=6|AT@i&s%Dl)WQn1Or#{pFPLHfrBgqeVsFnma`2a% zGwbhn`zP+xl6dwE=*kzKE{-7;x8B|kEM8h&6`r!?w)(| z=C@_G?~9-6-k0#3lrP}oF7vdZIb;P#qX0*uT3V90a(3*z+48#Q=hjw784CjK1cMK% zr~bZMaWgNz>rMal*N&TCXKU_$z3@`*>|+92Pq(>!yXAaC%t)Z4ZdrZyivoot7|ah}EXME8(c-|-@}c9UKxd`Fw{6DRYm0w=|6gKd*HrxN z<;6KOKdv=_Du0lj;`!I`qGERQ{~0ePu=sOqRcHCfY2H@ulrn=aFing*{oeyI?q5+* z%~q#Q(g~Nos9l};`$6rC+tYofc=;c^-x{o?wKVs6dhBYW);CvvvfuT5+_j>) zUj4<(Md`E4s=g#ibZPd5-S3I`YWJ#LOKRDD?TcxWH6bC354k65-ctFOw!*D>zo*OW zCCV-Pb=v*z7d<#Cv39xO&HHXC_Pr;zt~i|5nQP3h(Rayz)2_GH_gnX^4PDo|`)kSG zWd(X5$8EW^<&w_vM&#yP{tf8(V4X#xIk4cd18jRrJeeewm81 zOIki`kqOy;=~R5r>*Io++G{H|AK5mOS;Rdv3J8IQ{aGEax%~0%^L+sYAhSJP{an^L HB{Ts52LD$c diff --git a/img/sprite-skin-simple.png b/img/sprite-skin-simple.png deleted file mode 100644 index 0dc5e68ed807c752c81445f37409790dd71ecfae..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 358 zcmeAS@N?(olHy`uVBq!ia0y~yU}OQZx3Dk+$%fhfKY)~0fKP}kkoKB4SF^13UXKBv zfrFrxx2S8hxO?KXT$f)fyp#9r30S_=Va9T^zU33DHGF`o8B2ovf*Bm1-ADs+UU|AW zhE&{od&5xZV1P*L!_BP5S|M%=w==Z`waac`jo!ezG;EQFc348tDxXc_TQYrC6;J-T zU-Zx2>gQQG%a_jGR%UhMWybP(bAe_tELg~Kx@wb2bjGGzQMqDOZ~4N0Z~e7<@zuI> zo7jNT7u=Gq=e{-B+&!USQ*tE89~p~(oiUwpEp6SwE!zzLzfN(=eI{j4%m|d(a^b6Y zoaemzS2;NC=lYy5DnGQeg6GN9zOLnaE;X@e>Ym=dCok01silQMUzLG@L+?Pn;(_&@ zEgHdXEfSpK|2vgWw*O=KzqS*|V~q1+U=X;?KEL|E`m9XW>p;^PJYD@<);T3K0RX|3 BjfnsN diff --git a/index.md b/index.md index abdea3c..bede8a8 100644 --- a/index.md +++ b/index.md @@ -60,4 +60,4 @@ Ion.RangeSlider. Is an easy, flexible and responsive range slider with tons of o Support the plugin: -[![](https://pledgie.com/campaigns/25694.png?skin_name=chrome)](https://pledgie.com/campaigns/25694) +[Support the plugin on Patreon](https://www.patreon.com/IonDen) diff --git a/ion-rangeSlider.jquery.json b/ion-rangeSlider.jquery.json deleted file mode 100644 index 1d370ba..0000000 --- a/ion-rangeSlider.jquery.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "name": "ion-rangeSlider", - "version": "2.2.0", - "title": "Ion.RangeSlider", - "description": "Cool, comfortable and easily customizable range slider with many options and skin support", - "keywords": [ - "jquery", - "form", - "input", - "range", - "slider", - "rangeslider", - "interface", - "diapason", - "ui", - "noui", - "skins" - ], - "author": { - "name": "IonDen", - "url": "https://github.com/IonDen", - "email": "denis.ineshin@gmail.com" - }, - "licenses": [ - { - "type": "MIT", - "url": "http://ionden.com/a/plugins/licence-en.html" - } - ], - "homepage": "https://github.com/IonDen/ion.rangeSlider", - "docs": "https://github.com/IonDen/ion.rangeSlider/blob/master/readme.md", - "demo": "http://ionden.com/a/plugins/ion.rangeSlider/en.html", - "download": "http://ionden.com/a/plugins/ion.rangeSlider/ion.rangeSlider-2.2.0.zip", - "dependencies": { - "jquery": ">=1.8" - } -} \ No newline at end of file diff --git a/js/ion.rangeSlider.js b/js/ion.rangeSlider.js index 39cbecf..1d6bd03 100644 --- a/js/ion.rangeSlider.js +++ b/js/ion.rangeSlider.js @@ -1,6 +1,6 @@ // Ion.RangeSlider -// version 2.2.1 Build: 380 -// © Denis Ineshin, 2017 +// version 2.3.0 Build: 381 +// © Denis Ineshin, 2018 // https://github.com/IonDen // // Project page: http://ionden.com/a/plugins/ion.rangeSlider/en.html @@ -10,17 +10,17 @@ // http://ionden.com/a/plugins/licence-en.html // ===================================================================================================================== -;(function (factory) { - if (typeof define === "function" && define.amd) { +;(function(factory) { + if (!jQuery && typeof define === "function" && define.amd) { define(["jquery"], function (jQuery) { return factory(jQuery, document, window, navigator); }); - } else if (typeof exports === "object") { + } else if (!jQuery && typeof exports === "object") { factory(require("jquery"), document, window, navigator); } else { factory(jQuery, document, window, navigator); } -}(function ($, document, window, navigator, undefined) { +} (function ($, document, window, navigator, undefined) { "use strict"; // ================================================================================================================= @@ -42,7 +42,7 @@ } } return false; - }()); + } ()); if (!Function.prototype.bind) { Function.prototype.bind = function bind(that) { @@ -58,8 +58,7 @@ if (this instanceof bound) { - var F = function () { - }; + var F = function(){}; F.prototype = target.prototype; var self = new F(); @@ -87,7 +86,7 @@ }; } if (!Array.prototype.indexOf) { - Array.prototype.indexOf = function (searchElement, fromIndex) { + Array.prototype.indexOf = function(searchElement, fromIndex) { var k; if (this == null) { throw new TypeError('"this" is null or not defined'); @@ -116,33 +115,35 @@ } + // ================================================================================================================= // Template var base_html = '' + - '' + + '' + '01' + '000' + '' + - '' + - ''; + ''; var single_html = - '' + + '' + '' + - ''; + ''; var double_html = + '' + '' + '' + - '' + - ''; + '' + + ''; var disable_html = ''; + // ================================================================================================================= // Core @@ -155,7 +156,7 @@ * @constructor */ var IonRangeSlider = function (input, options, plugin_count) { - this.VERSION = "2.2.0"; + this.VERSION = "2.3.0"; this.input = input; this.plugin_count = plugin_count; this.current_plugin = 0; @@ -261,6 +262,7 @@ }; + /** * get and validate config */ @@ -270,6 +272,7 @@ // default config config = { + skin: "flat", type: "single", min: 10, @@ -307,7 +310,6 @@ grid_margin: true, grid_num: 4, grid_snap: false, - grid_scale: [], hide_min_max: false, hide_from_to: false, @@ -341,6 +343,7 @@ // config from data-attributes extends js config config_from_data = { + skin: $inp.data("skin"), type: $inp.data("type"), min: $inp.data("min"), @@ -376,7 +379,6 @@ grid_margin: $inp.data("gridMargin"), grid_num: $inp.data("gridNum"), grid_snap: $inp.data("gridSnap"), - grid_scale: $inp.data("gridScale"), hide_min_max: $inp.data("hideMinMax"), hide_from_to: $inp.data("hideFromTo"), @@ -426,6 +428,7 @@ } + // js config extends default config $.extend(config, options); @@ -435,11 +438,13 @@ this.options = config; + // validate config, to be sure that all data types are correct this.update_check = {}; this.validate(); + // default result object, returned to callbacks this.result = { input: this.$cache.input, @@ -458,6 +463,7 @@ }; + this.init(); }; @@ -499,7 +505,7 @@ * Appends slider template to a DOM */ append: function () { - var container_html = ''; + var container_html = ''; this.$cache.input.before(container_html); this.$cache.input.prop("readonly", true); this.$cache.cont = this.$cache.input.prev(); @@ -512,12 +518,12 @@ this.$cache.from = this.$cache.cont.find(".irs-from"); this.$cache.to = this.$cache.cont.find(".irs-to"); this.$cache.single = this.$cache.cont.find(".irs-single"); - this.$cache.bar = this.$cache.cont.find(".irs-bar"); this.$cache.line = this.$cache.cont.find(".irs-line"); this.$cache.grid = this.$cache.cont.find(".irs-grid"); if (this.options.type === "single") { this.$cache.cont.append(single_html); + this.$cache.bar = this.$cache.cont.find(".irs-bar"); this.$cache.edge = this.$cache.cont.find(".irs-bar-edge"); this.$cache.s_single = this.$cache.cont.find(".single"); this.$cache.from[0].style.visibility = "hidden"; @@ -525,6 +531,7 @@ this.$cache.shad_single = this.$cache.cont.find(".shadow-single"); } else { this.$cache.cont.append(double_html); + this.$cache.bar = this.$cache.cont.find(".irs-bar"); this.$cache.s_from = this.$cache.cont.find(".from"); this.$cache.s_to = this.$cache.cont.find(".to"); this.$cache.shad_from = this.$cache.cont.find(".shadow-from"); @@ -746,10 +753,7 @@ x = $handle.offset().left; x += ($handle.width() / 2) - 1; - this.pointerClick("single", { - preventDefault: function () { - }, pageX: x - }); + this.pointerClick("single", {preventDefault: function () {}, pageX: x}); } }, @@ -802,7 +806,7 @@ if ($.contains(this.$cache.cont[0], e.target) || this.dragging) { this.callOnFinish(); } - + this.dragging = false; }, @@ -988,6 +992,7 @@ }, + // ============================================================================================================= // Calculations @@ -1202,7 +1207,7 @@ return; } - if (this.coords.x_pointer < 0 || isNaN(this.coords.x_pointer)) { + if (this.coords.x_pointer < 0 || isNaN(this.coords.x_pointer) ) { this.coords.x_pointer = 0; } else if (this.coords.x_pointer > this.coords.w_rs) { this.coords.x_pointer = this.coords.w_rs; @@ -1314,6 +1319,7 @@ }, + // ============================================================================================================= // Drawings @@ -1387,6 +1393,9 @@ this.$cache.bar[0].style.width = this.coords.p_bar_w + "%"; if (this.options.type === "single") { + this.$cache.bar[0].style.left = 0; + this.$cache.bar[0].style.width = this.coords.p_bar_w + this.coords.p_bar_x + "%"; + this.$cache.s_single[0].style.left = this.coords.p_single_fake + "%"; this.$cache.single[0].style.left = this.labels.p_single_left + "%"; @@ -1633,6 +1642,7 @@ }, + /** * Write values to input element */ @@ -1656,6 +1666,7 @@ }, + // ============================================================================================================= // Callbacks @@ -1705,6 +1716,8 @@ }, + + // ============================================================================================================= // Service methods @@ -2178,15 +2191,16 @@ html = ''; + this.calcGridMargin(); if (o.grid_snap) { big_num = total / o.step; - big_p = this.toFixed(o.step / (total / 100)); - } else { - big_p = this.toFixed(100 / big_num); } + if (big_num > 50) big_num = 50; + big_p = this.toFixed(100 / big_num); + if (big_num > 4) { small_max = 3; } @@ -2236,6 +2250,7 @@ this.coords.big_num = Math.ceil(big_num + 1); + this.$cache.cont.addClass("irs-with-grid"); this.$cache.grid.html(html); this.cacheGridLabels(); @@ -2282,31 +2297,8 @@ } } - - if (this.options.grid_scale.length > 0) { - for (i = 0; i < num; i++) { - label = this.$cache.grid_labels[i][0]; - var scale = $(label).html(); - - var inArray = false; - - $.each(this.options.grid_scale, function () { - if (this == scale) { - inArray = true; - return false; - } - }); - - if (inArray) { - label.style.visibility = "visible"; - } else { - label.style.visibility = "hidden"; - } - } - } else { - this.calcGridCollision(2, start, finish); - this.calcGridCollision(4, start, finish); - } + this.calcGridCollision(2, start, finish); + this.calcGridCollision(4, start, finish); for (i = 0; i < num; i++) { label = this.$cache.grid_labels[i][0]; @@ -2354,7 +2346,7 @@ } else { this.coords.w_handle = this.$cache.s_from.outerWidth(false); } - this.coords.p_handle = this.toFixed(this.coords.w_handle / this.coords.w_rs * 100); + this.coords.p_handle = this.toFixed(this.coords.w_handle / this.coords.w_rs * 100); this.coords.grid_gap = this.toFixed((this.coords.p_handle / 2) - 0.1); this.$cache.grid[0].style.width = this.toFixed(100 - this.coords.p_handle) + "%"; @@ -2362,6 +2354,7 @@ }, + // ============================================================================================================= // Public methods @@ -2411,7 +2404,7 @@ }; $.fn.ionRangeSlider = function (options) { - return this.each(function () { + return this.each(function() { if (!$.data(this, "ionRangeSlider")) { $.data(this, "ionRangeSlider", new IonRangeSlider(this, options, plugin_count++)); } @@ -2419,6 +2412,7 @@ }; + // ================================================================================================================= // http://paulirish.com/2011/requestanimationframe-for-smart-animating/ // http://my.opera.com/emoller/blog/2011/12/20/requestanimationframe-for-smart-er-animating @@ -2427,29 +2421,27 @@ // MIT license - (function () { + (function() { var lastTime = 0; var vendors = ['ms', 'moz', 'webkit', 'o']; - for (var x = 0; x < vendors.length && !window.requestAnimationFrame; ++x) { - window.requestAnimationFrame = window[vendors[x] + 'RequestAnimationFrame']; - window.cancelAnimationFrame = window[vendors[x] + 'CancelAnimationFrame'] - || window[vendors[x] + 'CancelRequestAnimationFrame']; + for(var x = 0; x < vendors.length && !window.requestAnimationFrame; ++x) { + window.requestAnimationFrame = window[vendors[x]+'RequestAnimationFrame']; + window.cancelAnimationFrame = window[vendors[x]+'CancelAnimationFrame'] + || window[vendors[x]+'CancelRequestAnimationFrame']; } if (!window.requestAnimationFrame) - window.requestAnimationFrame = function (callback, element) { + window.requestAnimationFrame = function(callback, element) { var currTime = new Date().getTime(); var timeToCall = Math.max(0, 16 - (currTime - lastTime)); - var id = window.setTimeout(function () { - callback(currTime + timeToCall); - }, + var id = window.setTimeout(function() { callback(currTime + timeToCall); }, timeToCall); lastTime = currTime + timeToCall; return id; }; if (!window.cancelAnimationFrame) - window.cancelAnimationFrame = function (id) { + window.cancelAnimationFrame = function(id) { clearTimeout(id); }; }()); diff --git a/js/ion.rangeSlider.min.js b/js/ion.rangeSlider.min.js index 775c0a4..b2c2515 100644 --- a/js/ion.rangeSlider.min.js +++ b/js/ion.rangeSlider.min.js @@ -1,170 +1,2 @@ -(function(factory){if(typeof define==="function"&&define.amd){define(["jquery"],function(jQuery){return factory(jQuery,document,window,navigator)})}else if(typeof exports==="object"){factory(require("jquery"),document,window,navigator)}else{factory(jQuery,document,window,navigator)}}(function($,document,window,navigator,undefined){"use strict";var plugin_count=0;var is_old_ie=(function(){var n=navigator.userAgent,r=/msie\s\d+/i,v;if(n.search(r)>0){v=r.exec(n).toString();v=v.split(" ")[1];if(v<9){$("html").addClass("lt-ie9");return!0}} - return!1}());if(!Function.prototype.bind){Function.prototype.bind=function bind(that){var target=this;var slice=[].slice;if(typeof target!="function"){throw new TypeError()} - var args=slice.call(arguments,1),bound=function(){if(this instanceof bound){var F=function(){};F.prototype=target.prototype;var self=new F();var result=target.apply(self,args.concat(slice.call(arguments)));if(Object(result)===result){return result} - return self}else{return target.apply(that,args.concat(slice.call(arguments)))}};return bound}} - if(!Array.prototype.indexOf){Array.prototype.indexOf=function(searchElement,fromIndex){var k;if(this==null){throw new TypeError('"this" is null or not defined')} - var O=Object(this);var len=O.length>>>0;if(len===0){return-1} - var n=+fromIndex||0;if(Math.abs(n)===Infinity){n=0} - if(n>=len){return-1} - k=Math.max(n>=0?n:len-Math.abs(n),0);while(k'+'01'+'000'+''+''+'';var single_html=''+''+'';var double_html=''+''+''+'';var disable_html='';var IonRangeSlider=function(input,options,plugin_count){this.VERSION="2.2.0";this.input=input;this.plugin_count=plugin_count;this.current_plugin=0;this.calc_count=0;this.update_tm=0;this.old_from=0;this.old_to=0;this.old_min_interval=null;this.raf_id=null;this.dragging=!1;this.force_redraw=!1;this.no_diapason=!1;this.has_tab_index=!0;this.is_key=!1;this.is_update=!1;this.is_start=!0;this.is_finish=!1;this.is_active=!1;this.is_resize=!1;this.is_click=!1;options=options||{};this.$cache={win:$(window),body:$(document.body),input:$(input),cont:null,rs:null,min:null,max:null,from:null,to:null,single:null,bar:null,line:null,s_single:null,s_from:null,s_to:null,shad_single:null,shad_from:null,shad_to:null,edge:null,grid:null,grid_labels:[]};this.coords={x_gap:0,x_pointer:0,w_rs:0,w_rs_old:0,w_handle:0,p_gap:0,p_gap_left:0,p_gap_right:0,p_step:0,p_pointer:0,p_handle:0,p_single_fake:0,p_single_real:0,p_from_fake:0,p_from_real:0,p_to_fake:0,p_to_real:0,p_bar_x:0,p_bar_w:0,grid_gap:0,big_num:0,big:[],big_w:[],big_p:[],big_x:[]};this.labels={w_min:0,w_max:0,w_from:0,w_to:0,w_single:0,p_min:0,p_max:0,p_from_fake:0,p_from_left:0,p_to_fake:0,p_to_left:0,p_single_fake:0,p_single_left:0};var $inp=this.$cache.input,val=$inp.prop("value"),config,config_from_data,prop;config={type:"single",min:10,max:100,from:null,to:null,step:1,min_interval:0,max_interval:0,drag_interval:!1,values:[],p_values:[],from_fixed:!1,from_min:null,from_max:null,from_shadow:!1,to_fixed:!1,to_min:null,to_max:null,to_shadow:!1,prettify_enabled:!0,prettify_separator:" ",prettify:null,force_edges:!1,keyboard:!0,grid:!1,grid_margin:!0,grid_num:4,grid_snap:!1,grid_scale:[],hide_min_max:!1,hide_from_to:!1,prefix:"",postfix:"",max_postfix:"",decorate_both:!0,values_separator:" — ",input_values_separator:";",disable:!1,block:!1,extra_classes:"",scope:null,onStart:null,onChange:null,onFinish:null,onUpdate:null};if($inp[0].nodeName!=="INPUT"){console&&console.warn&&console.warn("Base element should be !",$inp[0])} - config_from_data={type:$inp.data("type"),min:$inp.data("min"),max:$inp.data("max"),from:$inp.data("from"),to:$inp.data("to"),step:$inp.data("step"),min_interval:$inp.data("minInterval"),max_interval:$inp.data("maxInterval"),drag_interval:$inp.data("dragInterval"),values:$inp.data("values"),from_fixed:$inp.data("fromFixed"),from_min:$inp.data("fromMin"),from_max:$inp.data("fromMax"),from_shadow:$inp.data("fromShadow"),to_fixed:$inp.data("toFixed"),to_min:$inp.data("toMin"),to_max:$inp.data("toMax"),to_shadow:$inp.data("toShadow"),prettify_enabled:$inp.data("prettifyEnabled"),prettify_separator:$inp.data("prettifySeparator"),force_edges:$inp.data("forceEdges"),keyboard:$inp.data("keyboard"),grid:$inp.data("grid"),grid_margin:$inp.data("gridMargin"),grid_num:$inp.data("gridNum"),grid_snap:$inp.data("gridSnap"),grid_scale:$inp.data("gridScale"),hide_min_max:$inp.data("hideMinMax"),hide_from_to:$inp.data("hideFromTo"),prefix:$inp.data("prefix"),postfix:$inp.data("postfix"),max_postfix:$inp.data("maxPostfix"),decorate_both:$inp.data("decorateBoth"),values_separator:$inp.data("valuesSeparator"),input_values_separator:$inp.data("inputValuesSeparator"),disable:$inp.data("disable"),block:$inp.data("block"),extra_classes:$inp.data("extraClasses"),};config_from_data.values=config_from_data.values&&config_from_data.values.split(",");for(prop in config_from_data){if(config_from_data.hasOwnProperty(prop)){if(config_from_data[prop]===undefined||config_from_data[prop]===""){delete config_from_data[prop]}}} - if(val!==undefined&&val!==""){val=val.split(config_from_data.input_values_separator||options.input_values_separator||";");if(val[0]&&val[0]==+val[0]){val[0]=+val[0]} - if(val[1]&&val[1]==+val[1]){val[1]=+val[1]} - if(options&&options.values&&options.values.length){config.from=val[0]&&options.values.indexOf(val[0]);config.to=val[1]&&options.values.indexOf(val[1])}else{config.from=val[0]&&+val[0];config.to=val[1]&&+val[1]}} - $.extend(config,options);$.extend(config,config_from_data);this.options=config;this.update_check={};this.validate();this.result={input:this.$cache.input,slider:null,min:this.options.min,max:this.options.max,from:this.options.from,from_percent:0,from_value:null,to:this.options.to,to_percent:0,to_value:null};this.init()};IonRangeSlider.prototype={init:function(is_update){this.no_diapason=!1;this.coords.p_step=this.convertToPercent(this.options.step,!0);this.target="base";this.toggleInput();this.append();this.setMinMax();if(is_update){this.force_redraw=!0;this.calc(!0);this.callOnUpdate()}else{this.force_redraw=!0;this.calc(!0);this.callOnStart()} - this.updateScene()},append:function(){var container_html='';this.$cache.input.before(container_html);this.$cache.input.prop("readonly",!0);this.$cache.cont=this.$cache.input.prev();this.result.slider=this.$cache.cont;this.$cache.cont.html(base_html);this.$cache.rs=this.$cache.cont.find(".irs");this.$cache.min=this.$cache.cont.find(".irs-min");this.$cache.max=this.$cache.cont.find(".irs-max");this.$cache.from=this.$cache.cont.find(".irs-from");this.$cache.to=this.$cache.cont.find(".irs-to");this.$cache.single=this.$cache.cont.find(".irs-single");this.$cache.bar=this.$cache.cont.find(".irs-bar");this.$cache.line=this.$cache.cont.find(".irs-line");this.$cache.grid=this.$cache.cont.find(".irs-grid");if(this.options.type==="single"){this.$cache.cont.append(single_html);this.$cache.edge=this.$cache.cont.find(".irs-bar-edge");this.$cache.s_single=this.$cache.cont.find(".single");this.$cache.from[0].style.visibility="hidden";this.$cache.to[0].style.visibility="hidden";this.$cache.shad_single=this.$cache.cont.find(".shadow-single")}else{this.$cache.cont.append(double_html);this.$cache.s_from=this.$cache.cont.find(".from");this.$cache.s_to=this.$cache.cont.find(".to");this.$cache.shad_from=this.$cache.cont.find(".shadow-from");this.$cache.shad_to=this.$cache.cont.find(".shadow-to");this.setTopHandler()} - if(this.options.hide_from_to){this.$cache.from[0].style.display="none";this.$cache.to[0].style.display="none";this.$cache.single[0].style.display="none"} - this.appendGrid();if(this.options.disable){this.appendDisableMask();this.$cache.input[0].disabled=!0}else{this.$cache.input[0].disabled=!1;this.removeDisableMask();this.bindEvents()} - if(!this.options.disable){if(this.options.block){this.appendDisableMask()}else{this.removeDisableMask()}} - if(this.options.drag_interval){this.$cache.bar[0].style.cursor="ew-resize"}},setTopHandler:function(){var min=this.options.min,max=this.options.max,from=this.options.from,to=this.options.to;if(from>min&&to===max){this.$cache.s_from.addClass("type_last")}else if(tothis.coords.p_to_real){this.coords.p_from_real=this.coords.p_to_real} - this.coords.p_from_real=this.checkDiapason(this.coords.p_from_real,this.options.from_min,this.options.from_max);this.coords.p_from_real=this.checkMinInterval(this.coords.p_from_real,this.coords.p_to_real,"from");this.coords.p_from_real=this.checkMaxInterval(this.coords.p_from_real,this.coords.p_to_real,"from");this.coords.p_from_fake=this.convertToFakePercent(this.coords.p_from_real);break;case "to":if(this.options.to_fixed){break} - this.coords.p_to_real=this.convertToRealPercent(handle_x);this.coords.p_to_real=this.calcWithStep(this.coords.p_to_real);if(this.coords.p_to_real100){new_to=100;new_from=new_to-full} - this.coords.p_from_real=this.calcWithStep(new_from);this.coords.p_from_real=this.checkDiapason(this.coords.p_from_real,this.options.from_min,this.options.from_max);this.coords.p_from_fake=this.convertToFakePercent(this.coords.p_from_real);this.coords.p_to_real=this.calcWithStep(new_to);this.coords.p_to_real=this.checkDiapason(this.coords.p_to_real,this.options.to_min,this.options.to_max);this.coords.p_to_fake=this.convertToFakePercent(this.coords.p_to_real);break} - if(this.options.type==="single"){this.coords.p_bar_x=(this.coords.p_handle/2);this.coords.p_bar_w=this.coords.p_single_fake;this.result.from_percent=this.coords.p_single_real;this.result.from=this.convertToValue(this.coords.p_single_real);this.result.from_pretty=this._prettify(this.result.from);if(this.options.values.length){this.result.from_value=this.options.values[this.result.from]}}else{this.coords.p_bar_x=this.toFixed(this.coords.p_from_fake+(this.coords.p_handle/2));this.coords.p_bar_w=this.toFixed(this.coords.p_to_fake-this.coords.p_from_fake);this.result.from_percent=this.coords.p_from_real;this.result.from=this.convertToValue(this.coords.p_from_real);this.result.from_pretty=this._prettify(this.result.from);this.result.to_percent=this.coords.p_to_real;this.result.to=this.convertToValue(this.coords.p_to_real);this.result.to_pretty=this._prettify(this.result.to);if(this.options.values.length){this.result.from_value=this.options.values[this.result.from];this.result.to_value=this.options.values[this.result.to]}} - this.calcMinMax();this.calcLabels()},calcPointerPercent:function(){if(!this.coords.w_rs){this.coords.p_pointer=0;return} - if(this.coords.x_pointer<0||isNaN(this.coords.x_pointer)){this.coords.x_pointer=0}else if(this.coords.x_pointer>this.coords.w_rs){this.coords.x_pointer=this.coords.w_rs} - this.coords.p_pointer=this.toFixed(this.coords.x_pointer/this.coords.w_rs*100)},convertToRealPercent:function(fake){var full=100-this.coords.p_handle;return fake/full*100},convertToFakePercent:function(real){var full=100-this.coords.p_handle;return real/100*full},getHandleX:function(){var max=100-this.coords.p_handle,x=this.toFixed(this.coords.p_pointer-this.coords.p_gap);if(x<0){x=0}else if(x>max){x=max} - return x},calcHandlePercent:function(){if(this.options.type==="single"){this.coords.w_handle=this.$cache.s_single.outerWidth(!1)}else{this.coords.w_handle=this.$cache.s_from.outerWidth(!1)} - this.coords.p_handle=this.toFixed(this.coords.w_handle/this.coords.w_rs*100)},chooseHandle:function(real_x){if(this.options.type==="single"){return"single"}else{var m_point=this.coords.p_from_real+((this.coords.p_to_real-this.coords.p_from_real)/2);if(real_x>=m_point){return this.options.to_fixed?"from":"to"}else{return this.options.from_fixed?"to":"from"}}},calcMinMax:function(){if(!this.coords.w_rs){return} - this.labels.p_min=this.labels.w_min/this.coords.w_rs*100;this.labels.p_max=this.labels.w_max/this.coords.w_rs*100},calcLabels:function(){if(!this.coords.w_rs||this.options.hide_from_to){return} - if(this.options.type==="single"){this.labels.w_single=this.$cache.single.outerWidth(!1);this.labels.p_single_fake=this.labels.w_single/this.coords.w_rs*100;this.labels.p_single_left=this.coords.p_single_fake+(this.coords.p_handle/2)-(this.labels.p_single_fake/2);this.labels.p_single_left=this.checkEdges(this.labels.p_single_left,this.labels.p_single_fake)}else{this.labels.w_from=this.$cache.from.outerWidth(!1);this.labels.p_from_fake=this.labels.w_from/this.coords.w_rs*100;this.labels.p_from_left=this.coords.p_from_fake+(this.coords.p_handle/2)-(this.labels.p_from_fake/2);this.labels.p_from_left=this.toFixed(this.labels.p_from_left);this.labels.p_from_left=this.checkEdges(this.labels.p_from_left,this.labels.p_from_fake);this.labels.w_to=this.$cache.to.outerWidth(!1);this.labels.p_to_fake=this.labels.w_to/this.coords.w_rs*100;this.labels.p_to_left=this.coords.p_to_fake+(this.coords.p_handle/2)-(this.labels.p_to_fake/2);this.labels.p_to_left=this.toFixed(this.labels.p_to_left);this.labels.p_to_left=this.checkEdges(this.labels.p_to_left,this.labels.p_to_fake);this.labels.w_single=this.$cache.single.outerWidth(!1);this.labels.p_single_fake=this.labels.w_single/this.coords.w_rs*100;this.labels.p_single_left=((this.labels.p_from_left+this.labels.p_to_left+this.labels.p_to_fake)/2)-(this.labels.p_single_fake/2);this.labels.p_single_left=this.toFixed(this.labels.p_single_left);this.labels.p_single_left=this.checkEdges(this.labels.p_single_left,this.labels.p_single_fake)}},updateScene:function(){if(this.raf_id){cancelAnimationFrame(this.raf_id);this.raf_id=null} - clearTimeout(this.update_tm);this.update_tm=null;if(!this.options){return} - this.drawHandles();if(this.is_active){this.raf_id=requestAnimationFrame(this.updateScene.bind(this))}else{this.update_tm=setTimeout(this.updateScene.bind(this),300)}},drawHandles:function(){this.coords.w_rs=this.$cache.rs.outerWidth(!1);if(!this.coords.w_rs){return} - if(this.coords.w_rs!==this.coords.w_rs_old){this.target="base";this.is_resize=!0} - if(this.coords.w_rs!==this.coords.w_rs_old||this.force_redraw){this.setMinMax();this.calc(!0);this.drawLabels();if(this.options.grid){this.calcGridMargin();this.calcGridLabels()} - this.force_redraw=!0;this.coords.w_rs_old=this.coords.w_rs;this.drawShadow()} - if(!this.coords.w_rs){return} - if(!this.dragging&&!this.force_redraw&&!this.is_key){return} - if(this.old_from!==this.result.from||this.old_to!==this.result.to||this.force_redraw||this.is_key){this.drawLabels();this.$cache.bar[0].style.left=this.coords.p_bar_x+"%";this.$cache.bar[0].style.width=this.coords.p_bar_w+"%";if(this.options.type==="single"){this.$cache.s_single[0].style.left=this.coords.p_single_fake+"%";this.$cache.single[0].style.left=this.labels.p_single_left+"%"}else{this.$cache.s_from[0].style.left=this.coords.p_from_fake+"%";this.$cache.s_to[0].style.left=this.coords.p_to_fake+"%";if(this.old_from!==this.result.from||this.force_redraw){this.$cache.from[0].style.left=this.labels.p_from_left+"%"} - if(this.old_to!==this.result.to||this.force_redraw){this.$cache.to[0].style.left=this.labels.p_to_left+"%"} - this.$cache.single[0].style.left=this.labels.p_single_left+"%"} - this.writeToInput();if((this.old_from!==this.result.from||this.old_to!==this.result.to)&&!this.is_start){this.$cache.input.trigger("change");this.$cache.input.trigger("input")} - this.old_from=this.result.from;this.old_to=this.result.to;if(!this.is_resize&&!this.is_update&&!this.is_start&&!this.is_finish){this.callOnChange()} - if(this.is_key||this.is_click){this.is_key=!1;this.is_click=!1;this.callOnFinish()} - this.is_update=!1;this.is_resize=!1;this.is_finish=!1} - this.is_start=!1;this.is_key=!1;this.is_click=!1;this.force_redraw=!1},drawLabels:function(){if(!this.options){return} - var values_num=this.options.values.length;var p_values=this.options.p_values;var text_single;var text_from;var text_to;var from_pretty;var to_pretty;if(this.options.hide_from_to){return} - if(this.options.type==="single"){if(values_num){text_single=this.decorate(p_values[this.result.from]);this.$cache.single.html(text_single)}else{from_pretty=this._prettify(this.result.from);text_single=this.decorate(from_pretty,this.result.from);this.$cache.single.html(text_single)} - this.calcLabels();if(this.labels.p_single_left100-this.labels.p_max-1){this.$cache.max[0].style.visibility="hidden"}else{this.$cache.max[0].style.visibility="visible"}}else{if(values_num){if(this.options.decorate_both){text_single=this.decorate(p_values[this.result.from]);text_single+=this.options.values_separator;text_single+=this.decorate(p_values[this.result.to])}else{text_single=this.decorate(p_values[this.result.from]+this.options.values_separator+p_values[this.result.to])} - text_from=this.decorate(p_values[this.result.from]);text_to=this.decorate(p_values[this.result.to]);this.$cache.single.html(text_single);this.$cache.from.html(text_from);this.$cache.to.html(text_to)}else{from_pretty=this._prettify(this.result.from);to_pretty=this._prettify(this.result.to);if(this.options.decorate_both){text_single=this.decorate(from_pretty,this.result.from);text_single+=this.options.values_separator;text_single+=this.decorate(to_pretty,this.result.to)}else{text_single=this.decorate(from_pretty+this.options.values_separator+to_pretty,this.result.to)} - text_from=this.decorate(from_pretty,this.result.from);text_to=this.decorate(to_pretty,this.result.to);this.$cache.single.html(text_single);this.$cache.from.html(text_from);this.$cache.to.html(text_to)} - this.calcLabels();var min=Math.min(this.labels.p_single_left,this.labels.p_from_left),single_left=this.labels.p_single_left+this.labels.p_single_fake,to_left=this.labels.p_to_left+this.labels.p_to_fake,max=Math.max(single_left,to_left);if(this.labels.p_from_left+this.labels.p_from_fake>=this.labels.p_to_left){this.$cache.from[0].style.visibility="hidden";this.$cache.to[0].style.visibility="hidden";this.$cache.single[0].style.visibility="visible";if(this.result.from===this.result.to){if(this.target==="from"){this.$cache.from[0].style.visibility="visible"}else if(this.target==="to"){this.$cache.to[0].style.visibility="visible"}else if(!this.target){this.$cache.from[0].style.visibility="visible"} - this.$cache.single[0].style.visibility="hidden";max=to_left}else{this.$cache.from[0].style.visibility="hidden";this.$cache.to[0].style.visibility="hidden";this.$cache.single[0].style.visibility="visible";max=Math.max(single_left,to_left)}}else{this.$cache.from[0].style.visibility="visible";this.$cache.to[0].style.visibility="visible";this.$cache.single[0].style.visibility="hidden"} - if(min100-this.labels.p_max-1){this.$cache.max[0].style.visibility="hidden"}else{this.$cache.max[0].style.visibility="visible"}}},drawShadow:function(){var o=this.options,c=this.$cache,is_from_min=typeof o.from_min==="number"&&!isNaN(o.from_min),is_from_max=typeof o.from_max==="number"&&!isNaN(o.from_max),is_to_min=typeof o.to_min==="number"&&!isNaN(o.to_min),is_to_max=typeof o.to_max==="number"&&!isNaN(o.to_max),from_min,from_max,to_min,to_max;if(o.type==="single"){if(o.from_shadow&&(is_from_min||is_from_max)){from_min=this.convertToPercent(is_from_min?o.from_min:o.min);from_max=this.convertToPercent(is_from_max?o.from_max:o.max)-from_min;from_min=this.toFixed(from_min-(this.coords.p_handle/100*from_min));from_max=this.toFixed(from_max-(this.coords.p_handle/100*from_max));from_min=from_min+(this.coords.p_handle/2);c.shad_single[0].style.display="block";c.shad_single[0].style.left=from_min+"%";c.shad_single[0].style.width=from_max+"%"}else{c.shad_single[0].style.display="none"}}else{if(o.from_shadow&&(is_from_min||is_from_max)){from_min=this.convertToPercent(is_from_min?o.from_min:o.min);from_max=this.convertToPercent(is_from_max?o.from_max:o.max)-from_min;from_min=this.toFixed(from_min-(this.coords.p_handle/100*from_min));from_max=this.toFixed(from_max-(this.coords.p_handle/100*from_max));from_min=from_min+(this.coords.p_handle/2);c.shad_from[0].style.display="block";c.shad_from[0].style.left=from_min+"%";c.shad_from[0].style.width=from_max+"%"}else{c.shad_from[0].style.display="none"} - if(o.to_shadow&&(is_to_min||is_to_max)){to_min=this.convertToPercent(is_to_min?o.to_min:o.min);to_max=this.convertToPercent(is_to_max?o.to_max:o.max)-to_min;to_min=this.toFixed(to_min-(this.coords.p_handle/100*to_min));to_max=this.toFixed(to_max-(this.coords.p_handle/100*to_max));to_min=to_min+(this.coords.p_handle/2);c.shad_to[0].style.display="block";c.shad_to[0].style.left=to_min+"%";c.shad_to[0].style.width=to_max+"%"}else{c.shad_to[0].style.display="none"}}},writeToInput:function(){if(this.options.type==="single"){if(this.options.values.length){this.$cache.input.prop("value",this.result.from_value)}else{this.$cache.input.prop("value",this.result.from)} - this.$cache.input.data("from",this.result.from)}else{if(this.options.values.length){this.$cache.input.prop("value",this.result.from_value+this.options.input_values_separator+this.result.to_value)}else{this.$cache.input.prop("value",this.result.from+this.options.input_values_separator+this.result.to)} - this.$cache.input.data("from",this.result.from);this.$cache.input.data("to",this.result.to)}},callOnStart:function(){this.writeToInput();if(this.options.onStart&&typeof this.options.onStart==="function"){if(this.options.scope){this.options.onStart.call(this.options.scope,this.result)}else{this.options.onStart(this.result)}}},callOnChange:function(){this.writeToInput();if(this.options.onChange&&typeof this.options.onChange==="function"){if(this.options.scope){this.options.onChange.call(this.options.scope,this.result)}else{this.options.onChange(this.result)}}},callOnFinish:function(){this.writeToInput();if(this.options.onFinish&&typeof this.options.onFinish==="function"){if(this.options.scope){this.options.onFinish.call(this.options.scope,this.result)}else{this.options.onFinish(this.result)}}},callOnUpdate:function(){this.writeToInput();if(this.options.onUpdate&&typeof this.options.onUpdate==="function"){if(this.options.scope){this.options.onUpdate.call(this.options.scope,this.result)}else{this.options.onUpdate(this.result)}}},toggleInput:function(){this.$cache.input.toggleClass("irs-hidden-input");if(this.has_tab_index){this.$cache.input.prop("tabindex",-1)}else{this.$cache.input.removeProp("tabindex")} - this.has_tab_index=!this.has_tab_index},convertToPercent:function(value,no_min){var diapason=this.options.max-this.options.min,one_percent=diapason/100,val,percent;if(!diapason){this.no_diapason=!0;return 0} - if(no_min){val=value}else{val=value-this.options.min} - percent=val/one_percent;return this.toFixed(percent)},convertToValue:function(percent){var min=this.options.min,max=this.options.max,min_decimals=min.toString().split(".")[1],max_decimals=max.toString().split(".")[1],min_length,max_length,avg_decimals=0,abs=0;if(percent===0){return this.options.min} - if(percent===100){return this.options.max} - if(min_decimals){min_length=min_decimals.length;avg_decimals=min_length} - if(max_decimals){max_length=max_decimals.length;avg_decimals=max_length} - if(min_length&&max_length){avg_decimals=(min_length>=max_length)?min_length:max_length} - if(min<0){abs=Math.abs(min);min=+(min+abs).toFixed(avg_decimals);max=+(max+abs).toFixed(avg_decimals)} - var number=((max-min)/100*percent)+min,string=this.options.step.toString().split(".")[1],result;if(string){number=+number.toFixed(string.length)}else{number=number/this.options.step;number=number*this.options.step;number=+number.toFixed(0)} - if(abs){number-=abs} - if(string){result=+number.toFixed(string.length)}else{result=this.toFixed(number)} - if(resultthis.options.max){result=this.options.max} - return result},calcWithStep:function(percent){var rounded=Math.round(percent/this.coords.p_step)*this.coords.p_step;if(rounded>100){rounded=100} - if(percent===100){rounded=100} - return this.toFixed(rounded)},checkMinInterval:function(p_current,p_next,type){var o=this.options,current,next;if(!o.min_interval){return p_current} - current=this.convertToValue(p_current);next=this.convertToValue(p_next);if(type==="from"){if(next-currento.max_interval){current=next-o.max_interval}}else{if(current-next>o.max_interval){current=next+o.max_interval}} - return this.convertToPercent(current)},checkDiapason:function(p_num,min,max){var num=this.convertToValue(p_num),o=this.options;if(typeof min!=="number"){min=o.min} - if(typeof max!=="number"){max=o.max} - if(nummax){num=max} - return this.convertToPercent(num)},toFixed:function(num){num=num.toFixed(20);return+num},_prettify:function(num){if(!this.options.prettify_enabled){return num} - if(this.options.prettify&&typeof this.options.prettify==="function"){return this.options.prettify(num)}else{return this.prettify(num)}},prettify:function(num){var n=num.toString();return n.replace(/(\d{1,3}(?=(?:\d\d\d)+(?!\d)))/g,"$1"+this.options.prettify_separator)},checkEdges:function(left,width){if(!this.options.force_edges){return this.toFixed(left)} - if(left<0){left=0}else if(left>100-width){left=100-width} - return this.toFixed(left)},validate:function(){var o=this.options,r=this.result,v=o.values,vl=v.length,value,i;if(typeof o.min==="string")o.min=+o.min;if(typeof o.max==="string")o.max=+o.max;if(typeof o.from==="string")o.from=+o.from;if(typeof o.to==="string")o.to=+o.to;if(typeof o.step==="string")o.step=+o.step;if(typeof o.from_min==="string")o.from_min=+o.from_min;if(typeof o.from_max==="string")o.from_max=+o.from_max;if(typeof o.to_min==="string")o.to_min=+o.to_min;if(typeof o.to_max==="string")o.to_max=+o.to_max;if(typeof o.grid_num==="string")o.grid_num=+o.grid_num;if(o.maxo.max)o.from=o.max}else{if(o.fromo.max)o.from=o.max;if(o.too.max)o.to=o.max;if(this.update_check.from){if(this.update_check.from!==o.from){if(o.from>o.to)o.from=o.to} - if(this.update_check.to!==o.to){if(o.too.to)o.from=o.to;if(o.too.from_max){o.from=o.from_max} - if(typeof o.to_min==="number"&&o.too.to_max){o.to=o.to_max} - if(r){if(r.min!==o.min){r.min=o.min} - if(r.max!==o.max){r.max=o.max} - if(r.fromr.max){r.from=o.from} - if(r.tor.max){r.to=o.to}} - if(typeof o.min_interval!=="number"||isNaN(o.min_interval)||!o.min_interval||o.min_interval<0){o.min_interval=0} - if(typeof o.max_interval!=="number"||isNaN(o.max_interval)||!o.max_interval||o.max_interval<0){o.max_interval=0} - if(o.min_interval&&o.min_interval>o.max-o.min){o.min_interval=o.max-o.min} - if(o.max_interval&&o.max_interval>o.max-o.min){o.max_interval=o.max-o.min}},decorate:function(num,original){var decorated="",o=this.options;if(o.prefix){decorated+=o.prefix} - decorated+=num;if(o.max_postfix){if(o.values.length&&num===o.p_values[o.max]){decorated+=o.max_postfix;if(o.postfix){decorated+=" "}}else if(original===o.max){decorated+=o.max_postfix;if(o.postfix){decorated+=" "}}} - if(o.postfix){decorated+=o.postfix} - return decorated},updateFrom:function(){this.result.from=this.options.from;this.result.from_percent=this.convertToPercent(this.result.from);this.result.from_pretty=this._prettify(this.result.from);if(this.options.values){this.result.from_value=this.options.values[this.result.from]}},updateTo:function(){this.result.to=this.options.to;this.result.to_percent=this.convertToPercent(this.result.to);this.result.to_pretty=this._prettify(this.result.to);if(this.options.values){this.result.to_value=this.options.values[this.result.to]}},updateResult:function(){this.result.min=this.options.min;this.result.max=this.options.max;this.updateFrom();this.updateTo()},appendGrid:function(){if(!this.options.grid){return} - var o=this.options,i,z,total=o.max-o.min,big_num=o.grid_num,big_p=0,big_w=0,small_max=4,local_small_max,small_p,small_w=0,result,html='';this.calcGridMargin();if(o.grid_snap){big_num=total/o.step;big_p=this.toFixed(o.step/(total/100))}else{big_p=this.toFixed(100/big_num)} - if(big_num>4){small_max=3} - if(big_num>7){small_max=2} - if(big_num>14){small_max=1} - if(big_num>28){small_max=0} - for(i=0;i100){big_w=100} - this.coords.big[i]=big_w;small_p=(big_w-(big_p*(i-1)))/(local_small_max+1);for(z=1;z<=local_small_max;z++){if(big_w===0){break} - small_w=this.toFixed(big_w-(small_p*z));html+=''} - html+='';result=this.convertToValue(big_w);if(o.values.length){result=o.p_values[result]}else{result=this._prettify(result)} - html+=''+result+''} - this.coords.big_num=Math.ceil(big_num+1);this.$cache.cont.addClass("irs-with-grid");this.$cache.grid.html(html);this.cacheGridLabels()},cacheGridLabels:function(){var $label,i,num=this.coords.big_num;for(i=0;i100+this.coords.grid_gap){finish[num-1]=100+this.coords.grid_gap;start[num-1]=this.toFixed(finish[num-1]-this.coords.big_p[num-1]);this.coords.big_x[num-1]=this.toFixed(this.coords.big_p[num-1]-this.coords.grid_gap)}} - if(this.options.grid_scale.length>0){for(i=0;i=num){break} - label=this.$cache.grid_labels[next_i][0];if(finish[i]<=start[next_i]){label.style.visibility="visible"}else{label.style.visibility="hidden"}}},calcGridMargin:function(){if(!this.options.grid_margin){return} - this.coords.w_rs=this.$cache.rs.outerWidth(!1);if(!this.coords.w_rs){return} - if(this.options.type==="single"){this.coords.w_handle=this.$cache.s_single.outerWidth(!1)}else{this.coords.w_handle=this.$cache.s_from.outerWidth(!1)} - this.coords.p_handle=this.toFixed(this.coords.w_handle/this.coords.w_rs*100);this.coords.grid_gap=this.toFixed((this.coords.p_handle/2)-0.1);this.$cache.grid[0].style.width=this.toFixed(100-this.coords.p_handle)+"%";this.$cache.grid[0].style.left=this.coords.grid_gap+"%"},update:function(options){if(!this.input){return} - this.is_update=!0;this.options.from=this.result.from;this.options.to=this.result.to;this.update_check.from=this.result.from;this.update_check.to=this.result.to;this.options=$.extend(this.options,options);this.validate();this.updateResult(options);this.toggleInput();this.remove();this.init(!0)},reset:function(){if(!this.input){return} - this.updateResult();this.update()},destroy:function(){if(!this.input){return} - this.toggleInput();this.$cache.input.prop("readonly",!1);$.data(this.input,"ionRangeSlider",null);this.remove();this.input=null;this.options=null}};$.fn.ionRangeSlider=function(options){return this.each(function(){if(!$.data(this,"ionRangeSlider")){$.data(this,"ionRangeSlider",new IonRangeSlider(this,options,plugin_count++))}})};(function(){var lastTime=0;var vendors=['ms','moz','webkit','o'];for(var x=0;x>>0;if(0===e)return-1;var h=+i||0;if(Math.abs(h)===1/0&&(h=0),e<=h)return-1;for(s=Math.max(0<=h?h:e-Math.abs(h),0);s!",r[0]),(e={skin:r.data("skin"),type:r.data("type"),min:r.data("min"),max:r.data("max"),from:r.data("from"),to:r.data("to"),step:r.data("step"),min_interval:r.data("minInterval"),max_interval:r.data("maxInterval"),drag_interval:r.data("dragInterval"),values:r.data("values"),from_fixed:r.data("fromFixed"),from_min:r.data("fromMin"),from_max:r.data("fromMax"),from_shadow:r.data("fromShadow"),to_fixed:r.data("toFixed"),to_min:r.data("toMin"),to_max:r.data("toMax"),to_shadow:r.data("toShadow"),prettify_enabled:r.data("prettifyEnabled"),prettify_separator:r.data("prettifySeparator"),force_edges:r.data("forceEdges"),keyboard:r.data("keyboard"),grid:r.data("grid"),grid_margin:r.data("gridMargin"),grid_num:r.data("gridNum"),grid_snap:r.data("gridSnap"),hide_min_max:r.data("hideMinMax"),hide_from_to:r.data("hideFromTo"),prefix:r.data("prefix"),postfix:r.data("postfix"),max_postfix:r.data("maxPostfix"),decorate_both:r.data("decorateBoth"),values_separator:r.data("valuesSeparator"),input_values_separator:r.data("inputValuesSeparator"),disable:r.data("disable"),block:r.data("block"),extra_classes:r.data("extraClasses")}).values=e.values&&e.values.split(","),e)e.hasOwnProperty(h)&&(e[h]!==_&&""!==e[h]||delete e[h]);n!==_&&""!==n&&((n=n.split(e.input_values_separator||i.input_values_separator||";"))[0]&&n[0]==+n[0]&&(n[0]=+n[0]),n[1]&&n[1]==+n[1]&&(n[1]=+n[1]),i&&i.values&&i.values.length?(o.from=n[0]&&i.values.indexOf(n[0]),o.to=n[1]&&i.values.indexOf(n[1])):(o.from=n[0]&&+n[0],o.to=n[1]&&+n[1])),a.extend(o,i),a.extend(o,e),this.options=o,this.update_check={},this.validate(),this.result={input:this.$cache.input,slider:null,min:this.options.min,max:this.options.max,from:this.options.from,from_percent:0,from_value:null,to:this.options.to,to_percent:0,to_value:null},this.init()};h.prototype={init:function(t){this.no_diapason=!1,this.coords.p_step=this.convertToPercent(this.options.step,!0),this.target="base",this.toggleInput(),this.append(),this.setMinMax(),t?(this.force_redraw=!0,this.calc(!0),this.callOnUpdate()):(this.force_redraw=!0,this.calc(!0),this.callOnStart()),this.updateScene()},append:function(){var t='';this.$cache.input.before(t),this.$cache.input.prop("readonly",!0),this.$cache.cont=this.$cache.input.prev(),this.result.slider=this.$cache.cont,this.$cache.cont.html('01000'),this.$cache.rs=this.$cache.cont.find(".irs"),this.$cache.min=this.$cache.cont.find(".irs-min"),this.$cache.max=this.$cache.cont.find(".irs-max"),this.$cache.from=this.$cache.cont.find(".irs-from"),this.$cache.to=this.$cache.cont.find(".irs-to"),this.$cache.single=this.$cache.cont.find(".irs-single"),this.$cache.line=this.$cache.cont.find(".irs-line"),this.$cache.grid=this.$cache.cont.find(".irs-grid"),"single"===this.options.type?(this.$cache.cont.append(''),this.$cache.bar=this.$cache.cont.find(".irs-bar"),this.$cache.edge=this.$cache.cont.find(".irs-bar-edge"),this.$cache.s_single=this.$cache.cont.find(".single"),this.$cache.from[0].style.visibility="hidden",this.$cache.to[0].style.visibility="hidden",this.$cache.shad_single=this.$cache.cont.find(".shadow-single")):(this.$cache.cont.append(''),this.$cache.bar=this.$cache.cont.find(".irs-bar"),this.$cache.s_from=this.$cache.cont.find(".from"),this.$cache.s_to=this.$cache.cont.find(".to"),this.$cache.shad_from=this.$cache.cont.find(".shadow-from"),this.$cache.shad_to=this.$cache.cont.find(".shadow-to"),this.setTopHandler()),this.options.hide_from_to&&(this.$cache.from[0].style.display="none",this.$cache.to[0].style.display="none",this.$cache.single[0].style.display="none"),this.appendGrid(),this.options.disable?(this.appendDisableMask(),this.$cache.input[0].disabled=!0):(this.$cache.input[0].disabled=!1,this.removeDisableMask(),this.bindEvents()),this.options.disable||(this.options.block?this.appendDisableMask():this.removeDisableMask()),this.options.drag_interval&&(this.$cache.bar[0].style.cursor="ew-resize")},setTopHandler:function(){var t=this.options.min,i=this.options.max,s=this.options.from,o=this.options.to;t'),this.$cache.cont.addClass("irs-disabled")},removeDisableMask:function(){this.$cache.cont.remove(".irs-disable-mask"),this.$cache.cont.removeClass("irs-disabled")},remove:function(){this.$cache.cont.remove(),this.$cache.cont=null,this.$cache.line.off("keydown.irs_"+this.plugin_count),this.$cache.body.off("touchmove.irs_"+this.plugin_count),this.$cache.body.off("mousemove.irs_"+this.plugin_count),this.$cache.win.off("touchend.irs_"+this.plugin_count),this.$cache.win.off("mouseup.irs_"+this.plugin_count),e&&(this.$cache.body.off("mouseup.irs_"+this.plugin_count),this.$cache.body.off("mouseleave.irs_"+this.plugin_count)),this.$cache.grid_labels=[],this.coords.big=[],this.coords.big_w=[],this.coords.big_p=[],this.coords.big_x=[],cancelAnimationFrame(this.raf_id)},bindEvents:function(){this.no_diapason||(this.$cache.body.on("touchmove.irs_"+this.plugin_count,this.pointerMove.bind(this)),this.$cache.body.on("mousemove.irs_"+this.plugin_count,this.pointerMove.bind(this)),this.$cache.win.on("touchend.irs_"+this.plugin_count,this.pointerUp.bind(this)),this.$cache.win.on("mouseup.irs_"+this.plugin_count,this.pointerUp.bind(this)),this.$cache.line.on("touchstart.irs_"+this.plugin_count,this.pointerClick.bind(this,"click")),this.$cache.line.on("mousedown.irs_"+this.plugin_count,this.pointerClick.bind(this,"click")),this.$cache.line.on("focus.irs_"+this.plugin_count,this.pointerFocus.bind(this)),this.options.drag_interval&&"double"===this.options.type?(this.$cache.bar.on("touchstart.irs_"+this.plugin_count,this.pointerDown.bind(this,"both")),this.$cache.bar.on("mousedown.irs_"+this.plugin_count,this.pointerDown.bind(this,"both"))):(this.$cache.bar.on("touchstart.irs_"+this.plugin_count,this.pointerClick.bind(this,"click")),this.$cache.bar.on("mousedown.irs_"+this.plugin_count,this.pointerClick.bind(this,"click"))),"single"===this.options.type?(this.$cache.single.on("touchstart.irs_"+this.plugin_count,this.pointerDown.bind(this,"single")),this.$cache.s_single.on("touchstart.irs_"+this.plugin_count,this.pointerDown.bind(this,"single")),this.$cache.shad_single.on("touchstart.irs_"+this.plugin_count,this.pointerClick.bind(this,"click")),this.$cache.single.on("mousedown.irs_"+this.plugin_count,this.pointerDown.bind(this,"single")),this.$cache.s_single.on("mousedown.irs_"+this.plugin_count,this.pointerDown.bind(this,"single")),this.$cache.edge.on("mousedown.irs_"+this.plugin_count,this.pointerClick.bind(this,"click")),this.$cache.shad_single.on("mousedown.irs_"+this.plugin_count,this.pointerClick.bind(this,"click"))):(this.$cache.single.on("touchstart.irs_"+this.plugin_count,this.pointerDown.bind(this,null)),this.$cache.single.on("mousedown.irs_"+this.plugin_count,this.pointerDown.bind(this,null)),this.$cache.from.on("touchstart.irs_"+this.plugin_count,this.pointerDown.bind(this,"from")),this.$cache.s_from.on("touchstart.irs_"+this.plugin_count,this.pointerDown.bind(this,"from")),this.$cache.to.on("touchstart.irs_"+this.plugin_count,this.pointerDown.bind(this,"to")),this.$cache.s_to.on("touchstart.irs_"+this.plugin_count,this.pointerDown.bind(this,"to")),this.$cache.shad_from.on("touchstart.irs_"+this.plugin_count,this.pointerClick.bind(this,"click")),this.$cache.shad_to.on("touchstart.irs_"+this.plugin_count,this.pointerClick.bind(this,"click")),this.$cache.from.on("mousedown.irs_"+this.plugin_count,this.pointerDown.bind(this,"from")),this.$cache.s_from.on("mousedown.irs_"+this.plugin_count,this.pointerDown.bind(this,"from")),this.$cache.to.on("mousedown.irs_"+this.plugin_count,this.pointerDown.bind(this,"to")),this.$cache.s_to.on("mousedown.irs_"+this.plugin_count,this.pointerDown.bind(this,"to")),this.$cache.shad_from.on("mousedown.irs_"+this.plugin_count,this.pointerClick.bind(this,"click")),this.$cache.shad_to.on("mousedown.irs_"+this.plugin_count,this.pointerClick.bind(this,"click"))),this.options.keyboard&&this.$cache.line.on("keydown.irs_"+this.plugin_count,this.key.bind(this,"keyboard")),e&&(this.$cache.body.on("mouseup.irs_"+this.plugin_count,this.pointerUp.bind(this)),this.$cache.body.on("mouseleave.irs_"+this.plugin_count,this.pointerUp.bind(this))))},pointerFocus:function(t){var i,s;this.target||(i=(s="single"===this.options.type?this.$cache.single:this.$cache.from).offset().left,i+=s.width()/2-1,this.pointerClick("single",{preventDefault:function(){},pageX:i}))},pointerMove:function(t){if(this.dragging){var i=t.pageX||t.originalEvent.touches&&t.originalEvent.touches[0].pageX;this.coords.x_pointer=i-this.coords.x_gap,this.calc()}},pointerUp:function(t){this.current_plugin===this.plugin_count&&this.is_active&&(this.is_active=!1,this.$cache.cont.find(".state_hover").removeClass("state_hover"),this.force_redraw=!0,e&&a("*").prop("unselectable",!1),this.updateScene(),this.restoreOriginalMinInterval(),(a.contains(this.$cache.cont[0],t.target)||this.dragging)&&this.callOnFinish(),this.dragging=!1)},pointerDown:function(t,i){i.preventDefault();var s=i.pageX||i.originalEvent.touches&&i.originalEvent.touches[0].pageX;2!==i.button&&("both"===t&&this.setTempMinInterval(),t||(t=this.target||"from"),this.current_plugin=this.plugin_count,this.target=t,this.is_active=!0,this.dragging=!0,this.coords.x_gap=this.$cache.rs.offset().left,this.coords.x_pointer=s-this.coords.x_gap,this.calcPointerPercent(),this.changeLevel(t),e&&a("*").prop("unselectable",!0),this.$cache.line.trigger("focus"),this.updateScene())},pointerClick:function(t,i){i.preventDefault();var s=i.pageX||i.originalEvent.touches&&i.originalEvent.touches[0].pageX;2!==i.button&&(this.current_plugin=this.plugin_count,this.target=t,this.is_click=!0,this.coords.x_gap=this.$cache.rs.offset().left,this.coords.x_pointer=+(s-this.coords.x_gap).toFixed(),this.force_redraw=!0,this.calc(),this.$cache.line.trigger("focus"))},key:function(t,i){if(!(this.current_plugin!==this.plugin_count||i.altKey||i.ctrlKey||i.shiftKey||i.metaKey)){switch(i.which){case 83:case 65:case 40:case 37:i.preventDefault(),this.moveByKey(!1);break;case 87:case 68:case 38:case 39:i.preventDefault(),this.moveByKey(!0)}return!0}},moveByKey:function(t){var i=this.coords.p_pointer,s=(this.options.max-this.options.min)/100;s=this.options.step/s,t?i+=s:i-=s,this.coords.x_pointer=this.toFixed(this.coords.w_rs/100*i),this.is_key=!0,this.calc()},setMinMax:function(){if(this.options){if(this.options.hide_min_max)return this.$cache.min[0].style.display="none",void(this.$cache.max[0].style.display="none");if(this.options.values.length)this.$cache.min.html(this.decorate(this.options.p_values[this.options.min])),this.$cache.max.html(this.decorate(this.options.p_values[this.options.max]));else{var t=this._prettify(this.options.min),i=this._prettify(this.options.max);this.result.min_pretty=t,this.result.max_pretty=i,this.$cache.min.html(this.decorate(t,this.options.min)),this.$cache.max.html(this.decorate(i,this.options.max))}this.labels.w_min=this.$cache.min.outerWidth(!1),this.labels.w_max=this.$cache.max.outerWidth(!1)}},setTempMinInterval:function(){var t=this.result.to-this.result.from;null===this.old_min_interval&&(this.old_min_interval=this.options.min_interval),this.options.min_interval=t},restoreOriginalMinInterval:function(){null!==this.old_min_interval&&(this.options.min_interval=this.old_min_interval,this.old_min_interval=null)},calc:function(t){if(this.options&&(this.calc_count++,(10===this.calc_count||t)&&(this.calc_count=0,this.coords.w_rs=this.$cache.rs.outerWidth(!1),this.calcHandlePercent()),this.coords.w_rs)){this.calcPointerPercent();var i=this.getHandleX();switch("both"===this.target&&(this.coords.p_gap=0,i=this.getHandleX()),"click"===this.target&&(this.coords.p_gap=this.coords.p_handle/2,i=this.getHandleX(),this.options.drag_interval?this.target="both_one":this.target=this.chooseHandle(i)),this.target){case"base":var s=(this.options.max-this.options.min)/100,o=(this.result.from-this.options.min)/s,e=(this.result.to-this.options.min)/s;this.coords.p_single_real=this.toFixed(o),this.coords.p_from_real=this.toFixed(o),this.coords.p_to_real=this.toFixed(e),this.coords.p_single_real=this.checkDiapason(this.coords.p_single_real,this.options.from_min,this.options.from_max),this.coords.p_from_real=this.checkDiapason(this.coords.p_from_real,this.options.from_min,this.options.from_max),this.coords.p_to_real=this.checkDiapason(this.coords.p_to_real,this.options.to_min,this.options.to_max),this.coords.p_single_fake=this.convertToFakePercent(this.coords.p_single_real),this.coords.p_from_fake=this.convertToFakePercent(this.coords.p_from_real),this.coords.p_to_fake=this.convertToFakePercent(this.coords.p_to_real),this.target=null;break;case"single":if(this.options.from_fixed)break;this.coords.p_single_real=this.convertToRealPercent(i),this.coords.p_single_real=this.calcWithStep(this.coords.p_single_real),this.coords.p_single_real=this.checkDiapason(this.coords.p_single_real,this.options.from_min,this.options.from_max),this.coords.p_single_fake=this.convertToFakePercent(this.coords.p_single_real);break;case"from":if(this.options.from_fixed)break;this.coords.p_from_real=this.convertToRealPercent(i),this.coords.p_from_real=this.calcWithStep(this.coords.p_from_real),this.coords.p_from_real>this.coords.p_to_real&&(this.coords.p_from_real=this.coords.p_to_real),this.coords.p_from_real=this.checkDiapason(this.coords.p_from_real,this.options.from_min,this.options.from_max),this.coords.p_from_real=this.checkMinInterval(this.coords.p_from_real,this.coords.p_to_real,"from"),this.coords.p_from_real=this.checkMaxInterval(this.coords.p_from_real,this.coords.p_to_real,"from"),this.coords.p_from_fake=this.convertToFakePercent(this.coords.p_from_real);break;case"to":if(this.options.to_fixed)break;this.coords.p_to_real=this.convertToRealPercent(i),this.coords.p_to_real=this.calcWithStep(this.coords.p_to_real),this.coords.p_to_realthis.coords.w_rs&&(this.coords.x_pointer=this.coords.w_rs),this.coords.p_pointer=this.toFixed(this.coords.x_pointer/this.coords.w_rs*100)):this.coords.p_pointer=0},convertToRealPercent:function(t){return t/(100-this.coords.p_handle)*100},convertToFakePercent:function(t){return t/100*(100-this.coords.p_handle)},getHandleX:function(){var t=100-this.coords.p_handle,i=this.toFixed(this.coords.p_pointer-this.coords.p_gap);return i<0?i=0:t100-this.labels.p_max-1?this.$cache.max[0].style.visibility="hidden":this.$cache.max[0].style.visibility="visible";else{s=h?(this.options.decorate_both?(t=this.decorate(r[this.result.from]),t+=this.options.values_separator,t+=this.decorate(r[this.result.to])):t=this.decorate(r[this.result.from]+this.options.values_separator+r[this.result.to]),i=this.decorate(r[this.result.from]),this.decorate(r[this.result.to])):(o=this._prettify(this.result.from),e=this._prettify(this.result.to),this.options.decorate_both?(t=this.decorate(o,this.result.from),t+=this.options.values_separator,t+=this.decorate(e,this.result.to)):t=this.decorate(o+this.options.values_separator+e,this.result.to),i=this.decorate(o,this.result.from),this.decorate(e,this.result.to)),this.$cache.single.html(t),this.$cache.from.html(i),this.$cache.to.html(s),this.calcLabels();var n=Math.min(this.labels.p_single_left,this.labels.p_from_left),a=this.labels.p_single_left+this.labels.p_single_fake,c=this.labels.p_to_left+this.labels.p_to_fake,l=Math.max(a,c);this.labels.p_from_left+this.labels.p_from_fake>=this.labels.p_to_left?(this.$cache.from[0].style.visibility="hidden",this.$cache.to[0].style.visibility="hidden",this.$cache.single[0].style.visibility="visible",l=this.result.from===this.result.to?("from"===this.target?this.$cache.from[0].style.visibility="visible":"to"===this.target?this.$cache.to[0].style.visibility="visible":this.target||(this.$cache.from[0].style.visibility="visible"),this.$cache.single[0].style.visibility="hidden",c):(this.$cache.from[0].style.visibility="hidden",this.$cache.to[0].style.visibility="hidden",this.$cache.single[0].style.visibility="visible",Math.max(a,c))):(this.$cache.from[0].style.visibility="visible",this.$cache.to[0].style.visibility="visible",this.$cache.single[0].style.visibility="hidden"),n100-this.labels.p_max-1?this.$cache.max[0].style.visibility="hidden":this.$cache.max[0].style.visibility="visible"}}},drawShadow:function(){var t,i,s,o,e=this.options,h=this.$cache,r="number"==typeof e.from_min&&!isNaN(e.from_min),n="number"==typeof e.from_max&&!isNaN(e.from_max),a="number"==typeof e.to_min&&!isNaN(e.to_min),c="number"==typeof e.to_max&&!isNaN(e.to_max);"single"===e.type?e.from_shadow&&(r||n)?(t=this.convertToPercent(r?e.from_min:e.min),i=this.convertToPercent(n?e.from_max:e.max)-t,t=this.toFixed(t-this.coords.p_handle/100*t),i=this.toFixed(i-this.coords.p_handle/100*i),t+=this.coords.p_handle/2,h.shad_single[0].style.display="block",h.shad_single[0].style.left=t+"%",h.shad_single[0].style.width=i+"%"):h.shad_single[0].style.display="none":(e.from_shadow&&(r||n)?(t=this.convertToPercent(r?e.from_min:e.min),i=this.convertToPercent(n?e.from_max:e.max)-t,t=this.toFixed(t-this.coords.p_handle/100*t),i=this.toFixed(i-this.coords.p_handle/100*i),t+=this.coords.p_handle/2,h.shad_from[0].style.display="block",h.shad_from[0].style.left=t+"%",h.shad_from[0].style.width=i+"%"):h.shad_from[0].style.display="none",e.to_shadow&&(a||c)?(s=this.convertToPercent(a?e.to_min:e.min),o=this.convertToPercent(c?e.to_max:e.max)-s,s=this.toFixed(s-this.coords.p_handle/100*s),o=this.toFixed(o-this.coords.p_handle/100*o),s+=this.coords.p_handle/2,h.shad_to[0].style.display="block",h.shad_to[0].style.left=s+"%",h.shad_to[0].style.width=o+"%"):h.shad_to[0].style.display="none")},writeToInput:function(){"single"===this.options.type?(this.options.values.length?this.$cache.input.prop("value",this.result.from_value):this.$cache.input.prop("value",this.result.from),this.$cache.input.data("from",this.result.from)):(this.options.values.length?this.$cache.input.prop("value",this.result.from_value+this.options.input_values_separator+this.result.to_value):this.$cache.input.prop("value",this.result.from+this.options.input_values_separator+this.result.to),this.$cache.input.data("from",this.result.from),this.$cache.input.data("to",this.result.to))},callOnStart:function(){this.writeToInput(),this.options.onStart&&"function"==typeof this.options.onStart&&(this.options.scope?this.options.onStart.call(this.options.scope,this.result):this.options.onStart(this.result))},callOnChange:function(){this.writeToInput(),this.options.onChange&&"function"==typeof this.options.onChange&&(this.options.scope?this.options.onChange.call(this.options.scope,this.result):this.options.onChange(this.result))},callOnFinish:function(){this.writeToInput(),this.options.onFinish&&"function"==typeof this.options.onFinish&&(this.options.scope?this.options.onFinish.call(this.options.scope,this.result):this.options.onFinish(this.result))},callOnUpdate:function(){this.writeToInput(),this.options.onUpdate&&"function"==typeof this.options.onUpdate&&(this.options.scope?this.options.onUpdate.call(this.options.scope,this.result):this.options.onUpdate(this.result))},toggleInput:function(){this.$cache.input.toggleClass("irs-hidden-input"),this.has_tab_index?this.$cache.input.prop("tabindex",-1):this.$cache.input.removeProp("tabindex"),this.has_tab_index=!this.has_tab_index},convertToPercent:function(t,i){var s,o=this.options.max-this.options.min,e=o/100;return o?(s=(i?t:t-this.options.min)/e,this.toFixed(s)):(this.no_diapason=!0,0)},convertToValue:function(t){var i,s,o=this.options.min,e=this.options.max,h=o.toString().split(".")[1],r=e.toString().split(".")[1],n=0,a=0;if(0===t)return this.options.min;if(100===t)return this.options.max;h&&(n=i=h.length),r&&(n=s=r.length),i&&s&&(n=s<=i?i:s),o<0&&(o=+(o+(a=Math.abs(o))).toFixed(n),e=+(e+a).toFixed(n));var c,l=(e-o)/100*t+o,_=this.options.step.toString().split(".")[1];return l=_?+l.toFixed(_.length):(l/=this.options.step,+(l*=this.options.step).toFixed(0)),a&&(l-=a),(c=_?+l.toFixed(_.length):this.toFixed(l))this.options.max&&(c=this.options.max),c},calcWithStep:function(t){var i=Math.round(t/this.coords.p_step)*this.coords.p_step;return 100h.max_interval&&(o=e-h.max_interval):o-e>h.max_interval&&(o=e+h.max_interval),this.convertToPercent(o)):t},checkDiapason:function(t,i,s){var o=this.convertToValue(t),e=this.options;return"number"!=typeof i&&(i=e.min),"number"!=typeof s&&(s=e.max),os.max&&(s.from=s.max)):(s.froms.max&&(s.from=s.max),s.tos.max&&(s.to=s.max),this.update_check.from&&(this.update_check.from!==s.from&&s.from>s.to&&(s.from=s.to),this.update_check.to!==s.to&&s.tos.to&&(s.from=s.to),s.tos.from_max&&(s.from=s.from_max),"number"==typeof s.to_min&&s.tos.to_max&&(s.to=s.to_max),o&&(o.min!==s.min&&(o.min=s.min),o.max!==s.max&&(o.max=s.max),(o.fromo.max)&&(o.from=s.from),(o.too.max)&&(o.to=s.to)),("number"!=typeof s.min_interval||isNaN(s.min_interval)||!s.min_interval||s.min_interval<0)&&(s.min_interval=0),("number"!=typeof s.max_interval||isNaN(s.max_interval)||!s.max_interval||s.max_interval<0)&&(s.max_interval=0),s.min_interval&&s.min_interval>s.max-s.min&&(s.min_interval=s.max-s.min),s.max_interval&&s.max_interval>s.max-s.min&&(s.max_interval=s.max-s.min)},decorate:function(t,i){var s="",o=this.options;return o.prefix&&(s+=o.prefix),s+=t,o.max_postfix&&(o.values.length&&t===o.p_values[o.max]?(s+=o.max_postfix,o.postfix&&(s+=" ")):i===o.max&&(s+=o.max_postfix,o.postfix&&(s+=" "))),o.postfix&&(s+=o.postfix),s},updateFrom:function(){this.result.from=this.options.from,this.result.from_percent=this.convertToPercent(this.result.from),this.result.from_pretty=this._prettify(this.result.from),this.options.values&&(this.result.from_value=this.options.values[this.result.from])},updateTo:function(){this.result.to=this.options.to,this.result.to_percent=this.convertToPercent(this.result.to),this.result.to_pretty=this._prettify(this.result.to),this.options.values&&(this.result.to_value=this.options.values[this.result.to])},updateResult:function(){this.result.min=this.options.min,this.result.max=this.options.max,this.updateFrom(),this.updateTo()},appendGrid:function(){if(this.options.grid){var t,i,s,o,e,h,r=this.options,n=r.max-r.min,a=r.grid_num,c=0,l=4,_="";for(this.calcGridMargin(),r.grid_snap&&(a=n/r.step),50';_+='',h=this.convertToValue(c),_+=''+(h=r.values.length?r.p_values[h]:this._prettify(h))+""}this.coords.big_num=Math.ceil(a+1),this.$cache.cont.addClass("irs-with-grid"),this.$cache.grid.html(_),this.cacheGridLabels()}},cacheGridLabels:function(){var t,i,s=this.coords.big_num;for(i=0;i100+this.coords.grid_gap&&(o[e-1]=100+this.coords.grid_gap,s[e-1]=this.toFixed(o[e-1]-this.coords.big_p[e-1]),this.coords.big_x[e-1]=this.toFixed(this.coords.big_p[e-1]-this.coords.grid_gap))),this.calcGridCollision(2,s,o),this.calcGridCollision(4,s,o),t=0;t i:first-child { + position: absolute; + display: block; + top: 0; + left: 50%; + width: 2px; + height: 100%; + margin-left: -1px; + background-color: @handle_color_1; + } + + &.state_hover, + &:hover { + & > i:first-child { + background-color: @handle_color_2; + } + } + } + + .@{name}-min, + .@{name}-max { + top: 0; + padding: 1px 3px; + color: @minmax_text_color; + font-size: 10px; + line-height: 1.333; + text-shadow: none; + background-color: @minmax_bg_color; + border-radius: @custom_radius; + } + + .@{name}-from, + .@{name}-to, + .@{name}-single { + color: @label_color_2; + font-size: 10px; + line-height: 1.333; + text-shadow: none; + padding: 1px 5px; + background-color: @label_color_1; + border-radius: @custom_radius; + + &:before { + position: absolute; + display: block; + content: ""; + bottom: -6px; + left: 50%; + width: 0; + height: 0; + margin-left: -3px; + overflow: hidden; + border: 3px solid transparent; + border-top-color: @label_color_1; + } + } + + .@{name}-grid { + &-pol { + background-color: @grid_color_1; + } + + &-text { + color: @grid_color_2; + } + } +} diff --git a/less/skins/modern.less b/less/skins/modern.less new file mode 100644 index 0000000..0bc5748 --- /dev/null +++ b/less/skins/modern.less @@ -0,0 +1,165 @@ +.irs--modern { + @name: irs; + + @top: 25px; + @bottom: 21px; + @line_height: 5px; + @handle_width: 12px; + @handle_height: 13px; + + @line_color: #d1d6e0; + @bar_color: #20b426; + @handle_color_1: #e9e6e6; + @handle_color_2: white; + @handle_color_3: black; + @minmax_text_color: white; + @minmax_bg_color: #d1d6e0; + @label_color_1: #20b426; + @label_color_2: white; + @grid_color_1: #dedede; + @grid_color_2: silver; + + + + height: 55px; + + &.irs-with-grid { + height: 55px; + } + + .@{name}-line { + top: @top; + height: @line_height; + background-color: @line_color; + background: linear-gradient(to bottom, lighten(@line_color, 5%) 0%, @line_color 100%); + border: 1px solid darken(@line_color, 15%); + border-bottom-width: 0; + border-radius: @line_height; + } + + .@{name}-bar { + top: @top; + height: @line_height; + background: @bar_color; + background: linear-gradient(to bottom, @bar_color 0%, darken(@bar_color, 10%) 100%); + + &--single { + border-radius: @line_height 0 0 @line_height; + } + } + + .@{name}-shadow { + height: 1px; + bottom: @bottom; + background-color: fade(@line_color, 50%); + } + + .@{name}-handle { + top: 37px; + width: @handle_width; + height: @handle_height; + border: 1px solid darken(@line_color, 15%); + border-top-width: 0; + box-shadow: 1px 1px 1px rgba(0,0,0,0.1); + border-radius: 0 0 3px 3px; + + & > i:nth-child(1) { + position: absolute; + display: block; + top: -4px; left: 1px; + width: (@handle_width - 6px); + height: (@handle_width - 6px); + border: 1px solid darken(@line_color, 15%); + background: @handle_color_2; + transform: rotate(45deg); + } + + & > i:nth-child(2) { + position: absolute; + display: block; + box-sizing: border-box; + top: 0; left: 0; + width: (@handle_width - 2); + height: (@handle_height - 1); + background: @handle_color_1; + background: linear-gradient(to bottom, @handle_color_2 0%, @handle_color_1 100%); + border-radius: 0 0 3px 3px; + } + + & > i:nth-child(3) { + position: absolute; + display: block; + box-sizing: border-box; + top: 3px; left: 3px; + width: 4px; height: 5px; + border-left: 1px solid darken(@line_color, 15%); + border-right: 1px solid darken(@line_color, 15%); + } + + &.state_hover, + &:hover { + border-color: darken(@line_color, 30%); + background: #c3c7cd; + background: linear-gradient(to bottom, rgba(255,255,255,1) 0%,rgba(145,155,165,1) 30%,rgba(255,255,255,1) 100%); + + & > i:nth-child(1) { + border-color: darken(@line_color, 30%); + } + + & > i:nth-child(3) { + border-color: darken(@line_color, 50%); + } + } + } + + .@{name}-min, + .@{name}-max { + top: 0; + font-size: 10px; + line-height: 1.333; + text-shadow: none; + padding: 1px 5px; + color: @minmax_text_color; + background-color: @minmax_bg_color; + border-radius: @line_height; + } + + .@{name}-from, + .@{name}-to, + .@{name}-single { + font-size: 10px; + line-height: 1.333; + text-shadow: none; + padding: 1px 5px; + background-color: @label_color_1; + color: @label_color_2; + border-radius: @line_height; + + &:before { + position: absolute; + display: block; + content: ""; + bottom: -6px; + left: 50%; + width: 0; + height: 0; + margin-left: -3px; + overflow: hidden; + border: 3px solid transparent; + border-top-color: @label_color_1; + } + } + + .@{name}-grid { + height: 25px; + + &-pol { + background-color: @grid_color_1; + } + + &-text { + color: @grid_color_2; + font-size: 13px; + } + } +} diff --git a/less/skins/round.less b/less/skins/round.less new file mode 100644 index 0000000..deb547c --- /dev/null +++ b/less/skins/round.less @@ -0,0 +1,120 @@ +// Skin design by Veaceslav Grimalschi +// https://github.com/grimalschi + +.irs--round { + @name: irs; + + @top: 36px; + @bottom: 21px; + @line_height: 4px; + @handle_width: 24px; + @handle_height: 24px; + + @line_color: #dee4ec; + @bar_color: #006cfa; + @handle_color_1: #006cfa; + @handle_color_2: white; + @handle_color_3: #f0f6ff; + @minmax_text_color: #333; + @minmax_bg_color: rgba(0,0,0,0.1); + @label_color_1: #006cfa; + @label_color_2: white; + @grid_color_1: #dedede; + @grid_color_2: silver; + + + + height: 50px; + + &.irs-with-grid { + height: 65px; + } + + .@{name}-line { + top: @top; + height: @line_height; + background-color: @line_color; + border-radius: @line_height; + } + + .@{name}-bar { + top: @top; + height: @line_height; + background-color: @bar_color; + + &--single { + border-radius: @line_height 0 0 @line_height; + } + } + + .@{name}-shadow { + height: 4px; + bottom: @bottom; + background-color: fade(@line_color, 50%); + } + + .@{name}-handle { + top: 26px; + width: @handle_width; + height: @handle_height; + border: 4px solid @handle_color_1; + background-color: @handle_color_2; + border-radius: @handle_width; + box-shadow: 0 1px 3px rgba(0, 0, 255, 0.3); + + &.state_hover, + &:hover { + background-color: @handle_color_3; + } + } + + .@{name}-min, + .@{name}-max { + color: @minmax_text_color; + font-size: 14px; + line-height: 1; + top: 0; + padding: 3px 5px; + background-color: @minmax_bg_color; + border-radius: @line_height; + } + + .@{name}-from, + .@{name}-to, + .@{name}-single { + font-size: 14px; + line-height: 1; + text-shadow: none; + padding: 3px 5px; + background-color: @label_color_1; + color: @label_color_2; + border-radius: @line_height; + + &:before { + position: absolute; + display: block; + content: ""; + bottom: -6px; + left: 50%; + width: 0; + height: 0; + margin-left: -3px; + overflow: hidden; + border: 3px solid transparent; + border-top-color: @label_color_1; + } + } + + .@{name}-grid { + height: 25px; + + &-pol { + background-color: @grid_color_1; + } + + &-text { + color: @grid_color_2; + font-size: 13px; + } + } +} diff --git a/less/skins/sharp.less b/less/skins/sharp.less new file mode 100644 index 0000000..57fdde9 --- /dev/null +++ b/less/skins/sharp.less @@ -0,0 +1,132 @@ +.irs--sharp { + @name: irs; + + @top: 30px; + @bottom: 21px; + @line_height: 2px; + @handle_width: 10px; + @handle_height: 10px; + + @line_color: black; + @bar_color: #ee22fa; + @handle_color_1: darken(#ee22fa, 20%); + @handle_color_2: white; + @handle_color_3: black; + @minmax_text_color: white; + @minmax_bg_color: darken(#ee22fa, 20%); + @label_color_1: darken(#ee22fa, 20%); + @label_color_2: white; + @grid_color_1: #dedede; + @grid_color_2: silver; + + + + height: 50px; + font-size: 12px; + line-height: 1; + + &.irs-with-grid { + height: 57px; + } + + .@{name}-line { + top: @top; + height: @line_height; + background-color: @line_color; + border-radius: @line_height; + } + + .@{name}-bar { + top: @top; + height: @line_height; + background-color: @bar_color; + + &--single { + border-radius: @line_height 0 0 @line_height; + } + } + + .@{name}-shadow { + height: 1px; + bottom: @bottom; + background-color: fade(@line_color, 50%); + } + + .@{name}-handle { + top: (@top - 5px); + width: @handle_width; + height: @handle_height; + background-color: @handle_color_1; + + & > i:first-child { + position: absolute; + display: block; + top: 100%; + left: 0; + width: 0; + height: 0; + border: 5px solid transparent; + border-top-color: @handle_color_1; + } + + &.state_hover, + &:hover { + background-color: @handle_color_3; + + & > i:first-child { + border-top-color: @handle_color_3; + } + } + } + + .@{name}-min, + .@{name}-max { + color: @minmax_text_color; + font-size: 14px; + line-height: 1; + top: 0; + padding: 3px 4px; + opacity: 0.4; + background-color: @minmax_bg_color; + border-radius: @line_height; + } + + .@{name}-from, + .@{name}-to, + .@{name}-single { + font-size: 14px; + line-height: 1; + text-shadow: none; + padding: 3px 4px; + background-color: @label_color_1; + color: @label_color_2; + border-radius: @line_height; + + &:before { + position: absolute; + display: block; + content: ""; + bottom: -6px; + left: 50%; + width: 0; + height: 0; + margin-left: -3px; + overflow: hidden; + border: 3px solid transparent; + border-top-color: @label_color_1; + } + } + + .@{name}-grid { + height: 25px; + + &-pol { + background-color: @grid_color_1; + } + + &-text { + color: @grid_color_2; + font-size: 13px; + } + } +} diff --git a/less/skins/square.less b/less/skins/square.less new file mode 100644 index 0000000..957f957 --- /dev/null +++ b/less/skins/square.less @@ -0,0 +1,100 @@ +// Skin design by Veaceslav Grimalschi +// https://github.com/grimalschi + +.irs--square { + @name: irs; + + @top: 31px; + @bottom: 21px; + @line_height: 4px; + @handle_width: 16px; + @handle_height: 16px; + + @line_color: #dedede; + @bar_color: black; + @handle_color_1: black; + @handle_color_2: white; + @handle_color_3: #f0f6ff; + @minmax_text_color: #333; + @minmax_bg_color: rgba(0,0,0,0.1); + @label_color_1: black; + @label_color_2: white; + @grid_color_1: #dedede; + @grid_color_2: silver; + + + + height: 50px; + + &.irs-with-grid { + height: 60px; + } + + .@{name}-line { + top: @top; + height: @line_height; + background-color: @line_color; + } + + .@{name}-bar { + top: @top; + height: @line_height; + background-color: @bar_color; + } + + .@{name}-shadow { + height: 2px; + bottom: @bottom; + background-color: @line_color; + } + + .@{name}-handle { + top: (@top - 6px); + width: @handle_width; + height: @handle_height; + border: 3px solid @handle_color_1; + background-color: @handle_color_2; + -webkit-transform: rotate(45deg); + -ms-transform: rotate(45deg); + transform: rotate(45deg); + + &.state_hover, + &:hover { + background-color: @handle_color_3; + } + } + + .@{name}-min, + .@{name}-max { + color: @minmax_text_color; + font-size: 14px; + line-height: 1; + top: 0; + padding: 3px 5px; + background-color: @minmax_bg_color; + } + + .@{name}-from, + .@{name}-to, + .@{name}-single { + font-size: 14px; + line-height: 1; + text-shadow: none; + padding: 3px 5px; + background-color: @label_color_1; + color: @label_color_2; + } + + .@{name}-grid { + height: 25px; + + &-pol { + background-color: @grid_color_1; + } + + &-text { + color: @grid_color_2; + font-size: 11px; + } + } +} diff --git a/package.json b/package.json index 2694489..b50358e 100644 --- a/package.json +++ b/package.json @@ -1,61 +1,46 @@ { - "name": "huijiewei-ion-rangeslider", - "version": "2.2.2", - "description": "Cool, comfortable and easily customizable range slider with many options and skin support", - "homepage": "http://ionden.com/a/plugins/ion.rangeSlider/en.html", - "author": { - "name": "Denis Ineshin (IonDen)", - "email": "ionden.tech@gmail.com", - "url": "https://github.com/IonDen" - }, - "keywords": [ - "jquery-plugin", - "ecosystem:jquery", - "jquery", - "form", - "input", - "range", - "slider", - "rangeslider", - "interface", - "diapason", - "ui", - "noui", - "skins" - ], - "main": "./js/ion.rangeSlider.js", - "directories": { - "lib": "js" - }, - "repository": { - "type": "git", - "url": "git://github.com/huijiewei/ion.rangeSlider.git" - }, - "bugs": { - "url": "https://github.com/IonDen/ion.rangeSlider/issues" - }, - "license": "MIT", - "dependencies": { - "jquery": ">=1.8" - }, - "ignore": [ - ".idea", - "PSD", - "bower.json", - "ion-rangeSlider.jquery.json", - "readme.ru.md" - ], - "spm": { - "main": "js/ion.rangeSlider.js", + "name": "ion-rangeslider", + "version": "2.3.0", + "description": "Cool, comfortable and easily customizable range slider with many options and skin support", + "homepage": "http://ionden.com/a/plugins/ion.rangeSlider/en.html", + "author": { + "name": "Denis Ineshin (IonDen)", + "email": "ionden.tech@gmail.com", + "url": "https://github.com/IonDen" + }, + "keywords": [ + "jquery-plugin", + "ecosystem:jquery", + "jquery", + "form", + "input", + "range", + "slider", + "rangeslider", + "interface", + "diapason", + "ui", + "noui", + "skins" + ], + "main": "./js/ion.rangeSlider.js", + "directories": { + "lib": "js" + }, + "repository": { + "type": "git", + "url": "git://github.com/IonDen/ion.rangeSlider.git" + }, + "bugs": { + "url": "https://github.com/IonDen/ion.rangeSlider/issues" + }, + "license": "MIT", "dependencies": { - "jquery": "1.11.2" + "jquery": ">=1.8" }, "ignore": [ - ".idea", - "PSD", - "bower.json", - "ion-rangeSlider.jquery.json", - "readme.ru.md" + ".idea", + "PSD", + "bower.json" ] - } } \ No newline at end of file diff --git a/readme.md b/readme.md index 2627e37..a73b003 100644 --- a/readme.md +++ b/readme.md @@ -1,14 +1,12 @@ ![ion.rangeSlider](_tmp/logo-ion-range-slider.png) -> English description | Описание на русском - Ion.RangeSlider. Is an easy, flexible and responsive range slider with tons of options. *** -* Version: 2.2.0 | *Version 3.x is under development now* -* Project page and demos -* Download ZIP +* Version: 2.3.0 | *Version 3.x is under development now* +* Project page and demos +* Download ZIP ## Description * Ion.RangeSlider — cool, comfortable, responsive and easily customizable range slider @@ -21,7 +19,7 @@ Ion.RangeSlider. Is an easy, flexible and responsive range slider with tons of o ![ion.rangeSlider](http://ionden.com/a/plugins/ion.rangeSlider/static/img/ion-range-slider.png) ## Key features -* Skin support. (5 skins included and PSD for skin creation) +* Skin support. (6 skins included) * Any number of sliders at one page without conflicts and big performance problems * Two slider types single (1 slider) and double (2 sliders) * Support of negative and fractional values @@ -59,29 +57,49 @@ Add the following libraries to the page: * ion.rangeSlider.min.js Add the following stylesheets to the page: -* normalize.css (optional) -* ion.rangeSlider.css +* ion.rangeSlider.min.css + + -Plus, a skin for the slider. 5 skins are included. Choose one: -* ion.rangeSlider.skinFlat.css + sprite-skin-flat.png -* ion.rangeSlider.skinHTML5.css + no images -* ion.rangeSlider.skinModern.css + sprite-skin-modern.png -* ion.rangeSlider.skinNice.css + sprite-skin-nice.png -* ion.rangeSlider.skinSimple.css + sprite-skin-simple.png +## CDN + +Use [CDNjs](https://cdnjs.com/libraries/ion-rangeslider) or [JSdelivr](https://www.jsdelivr.com/package/npm/ion-rangeslider) to get latest version of plugin and jQuery. +```html + + -Or use the included PSD file and design a custom skin. + + + + +``` -## Install with bower -* bower install ionrangeslider +## Install with NPM -## Install with npm +Use [NPM](https://www.npmjs.com/package/ion-rangeslider) to download latest version of a plugin and install it directly in to your project. * npm install ion-rangeslider + +## Install with Bower + +Use [Bower](https://bower.io/) to download latest version of a plugin and install it directly in to your project. + +* bower install ion-rangeslider + + + +## Install with Yarn + +Use [Yarn](https://yarnpkg.com/en/package/ion-rangeslider) to download latest version of a plugin and install it directly in to your project. + +* yarn add ion-rangeslider + + ## Initialisation The slider overrides a native text input element. @@ -95,35 +113,27 @@ $("#example_id").ionRangeSlider(); ``` -## Demo for juniors - -If your are new in web development and you are not sure how to correctly install the plugin to your web-page, please download -this demo example - - -## Experiments playground - -Here you can find bunch of advanced JSFIDDLE demos with different, non-standart use cases: -* [Reverse or RTL](http://jsfiddle.net/IonDen/gbmszmp4/) -* [1 handle bind to 1 input](http://jsfiddle.net/IonDen/mvrfg2vc/) -* [2 handles bind to 2 inputs](http://jsfiddle.net/IonDen/r5aox84v/) -* [2 sliders connected to each other](http://jsfiddle.net/IonDen/4k3d4y3s/) -* [1st slider disables/enables 2nd slider](http://jsfiddle.net/IonDen/ctkouh69/) -* [Non-linear slider](http://jsfiddle.net/IonDen/pzjaoxe7/) -* [Plus and Minus buttons](http://jsfiddle.net/IonDen/wsk7y08a/) -* [Calculating sum](http://codepen.io/anon/pen/QyzwJZ) -* [Adding one more diapazon on 1 slider](http://jsfiddle.net/IonDen/st9eotpy/) -* [Live editing of Min and Max values](http://jsfiddle.net/IonDen/wL8gq4py/) -* [Prettify and transform values at the same time](http://jsfiddle.net/IonDen/j0tLzgq1/) -* [Custom marks on slider](http://jsfiddle.net/IonDen/spez12kt/) -* [Rendering money value n.nn](http://jsfiddle.net/IonDen/vrqqL2Lw/) -* [Rendering Dates with Moment.js](http://jsfiddle.net/tvn2ckj2/) -* [Changing step live](http://jsfiddle.net/IonDen/ca6ykae6/) -* [Toggle slider](http://jsfiddle.net/IonDen/t936wtjv/) -* [Using different skin color at the same time](http://jsfiddle.net/IonDen/2sruxk4e/) -* [2 dependant sliders](http://jsfiddle.net/IonDen/n2sxswv2/) -* [Skip some values](http://jsfiddle.net/IonDen/4qgq9bto/) -* [Good Prettify example](http://jsfiddle.net/IonDen/bvbvr0xs/) +## Experiments playground + +Here you can find bunch of advanced JSFIDDLE demos with different, non-standard use cases: +* [Custom marks on slider](https://jsfiddle.net/IonDen/tdvxs3zL/) +* [Reverse or RTL](https://jsfiddle.net/IonDen/65rq31a7/) +* [1 handle bind to 1 input](https://jsfiddle.net/IonDen/khngpw3m/) +* [2 handles bind to 2 inputs](https://jsfiddle.net/IonDen/avcm6wpj/) +* [2 sliders connected to each other](https://jsfiddle.net/IonDen/1hnvxsg5/) +* [2 dependant sliders](https://jsfiddle.net/IonDen/f1t6qpx0/) +* [1st slider disables/enables 2nd slider](https://jsfiddle.net/IonDen/kqwm1294/) +* [Non-linear slider](https://jsfiddle.net/IonDen/5f2730ds/) +* [Plus and Minus buttons](https://jsfiddle.net/IonDen/e9as5k2m/) +* [Calculating sum](https://jsfiddle.net/IonDen/dfcmryn2/) +* [Adding one more diapazon on 1 slider](https://jsfiddle.net/IonDen/ckwrqv75/) +* [Live editing of Min and Max values](https://jsfiddle.net/IonDen/wgfv76je/) +* [Prettify and transform values at the same time](https://jsfiddle.net/IonDen/kc0tzreu/) +* [Rendering money value n.nn](https://jsfiddle.net/IonDen/a0rghmd7/) +* [Changing step live](https://jsfiddle.net/IonDen/5ptjgm6h/) +* [Toggle slider](https://jsfiddle.net/IonDen/7m4otxwp/) +* [Skip some values](https://jsfiddle.net/IonDen/bqyw1e7k/) +* [Values array + prettify](https://jsfiddle.net/IonDen/p9gu71sL/) ## Settings @@ -131,6 +141,7 @@ Here you can find bunch of advanced JSFIDDLE demos with different, non-standart | Option | Data-Attr | Defaults | Type | Description | | --- | --- | --- | --- | --- | +| `skin` | `data-skin` | `flat` | string | Choose UI skin to use (flat, big, modern, round, sharp, square) | | `type` | `data-type` | `single` | string | Choose slider type, could be `single` - for one handle, or `double` for two handles | | `min` | `data-min` | `10` | number | Set slider minimum value | | `max` | `data-max` | `100` | number | Set slider maximum value | @@ -202,6 +213,7 @@ Obj: { An example of a customised slider: ```javascript $("#example").ionRangeSlider({ + skin: "big", min: 0, max: 10000, from: 1000, @@ -277,8 +289,6 @@ All plugins options are covered in demos. #### Support Ion-series plugins development: -* Donate through Pledgie service: [![](https://pledgie.com/campaigns/25694.png?skin_name=chrome)](https://pledgie.com/campaigns/25694) +* [Support the plugin on Patreon](https://www.patreon.com/IonDen) * Donate direct to my Paypal account: https://www.paypal.me/IonDen - -* Donate direct to my Yandex.Money account: http://yasobe.ru/na/razrabotku diff --git a/readme.ru.md b/readme.ru.md deleted file mode 100644 index 6723203..0000000 --- a/readme.ru.md +++ /dev/null @@ -1,283 +0,0 @@ -![ion.rangeSlider](_tmp/logo-ion-range-slider.png) - -> English description | Описание на русском - -Удобный, гибкий и отзывчивый слайдер диапазонов - -*** - -* Версия: 2.2.0 -* Страница проекта и демо -* Загрузить ZIP-архив - -## Описание -* Ion.RangeSlider — классный, удобный, отзывчивый и легко настраиваемый слайдер диапазонов -* Слайдер поддерживает события и публичные методы, имеет гибкие настройки, может быть полностью видоизменен через CSS -* Кроссбраузерная поддержка: Google Chrome, Mozilla Firefox 3.6+, Opera 12+, Safari 5+, Internet Explorer 8+ -* Плагин поддерживает устройства с touch-экраном (iPhone, iPad, Nexus, etc.) -* Репозиторий на GitHub -* Плагин свободно распространяется на условиях лицензии MIT -* Используюя этот плагин, вы сможете создавать крутейшие слайдеры диапазонов, такие как этот: - -![ion.rangeSlider](http://ionden.com/a/plugins/ion.rangeSlider/static/img/ion-range-slider.png) - -## Ключевые особенности -* Поддержка скинов. (5 скина в комплекте и PSD для изготовления собственных) -* Неограниченное кол-во слайдеров на одной странице без существенных потерь производительности и конфликтов между ними -* Два режима работы с 1 или 2 ползунками -* Поддержка отрицательных и дробных значений -* Возможность редактировать шаг и привязывать сетку к шагу -* Можно использовать собственный массив значений для слайдера -* Настраиваемая сетка значений -* Отключаемые элементы интерфейса (мин. и макс. значение, текущие значение, сетка) -* Постфиксы и префиксы для указания единиц измерения ($20, 20 € и т.п.) -* Дополнительный постфикс для максимального значения (например $0 — $100+) -* Воможнось улучшить читабельность больших цифр (например 10000000 -> 10 000 000 или 10.000.000) -* Слайдер пишет свое значение прямо в value исходного поля input, что позволяет вставить сладер прямо внутрь любой формы -* Любой параметр слайдера можно так же задать через data-атрибут (например data-min="10") -* Слайдер поддерживает параметр disabled, позволяет делать слайдер неактивным -* Слайдер поддерживает внешние методы (update, reset и remove), позволяющие управлять слайдером уже после создания -* Для продвинутых пользователей есть поддержка колбэков (onStart, onChange, onFinish, onUpdate). Слайдер передает свои значения в эти функции первым аргументом в виде объекта -* Слайдер поддерживает работу с датой и временем - - -## Демо - -* Базовые настройки -* Расширенные настройки -* Взаимодействия - - -## Зависимости - -* jQuery 1.8.x+ - - -## Использование - -Подключаем библиотеки: -* jQuery -* ion.rangeSlider.min.js - -Подключаем стили: -* normalize.css (желательно, если он у вас еще не подключен) -* ion.rangeSlider.css - -Не забываем про скин. 5 скинов включены в архив. Выберите один: -* ion.rangeSlider.skinFlat.css + sprite-skin-flat.png -* ion.rangeSlider.skinHTML5.css + без картинок -* ion.rangeSlider.skinModern.css + sprite-skin-modern.png -* ion.rangeSlider.skinNice.css + sprite-skin-nice.png -* ion.rangeSlider.skinSimple.css + sprite-skin-simple.png - -Либо воспользуйтесь вложенным в архив PSD файлом, и нарисуйте собственный скин (не забудьте модифицировать размеры элементов в CSS файле) - - -## Устанавливаем с помощью bower - -* bower install ionrangeslider - - -## Устанавливаем с помощью npm - -* npm install ion-rangeslider - - -## Инициализация - -Создаем базовое поле input type="text": -```html - -``` - -Чтобы запустить слайдер, вызовите ionRangeSlider для нужного элемента: -```javascript -$("#example_id").ionRangeSlider(); -``` - -## Демо для новичков -Если вы новичок в веб разработке и не уверены как правильно подключить этот плагин на вашу страницу, то скачайте вот -этот демо пример - - -## Площадка для эксперементов с плагином - -Здесь вы найдете несколько полезных JSFIDDLE-демо, по нестандартному использованию плагина: -* [Reverse or RTL](http://jsfiddle.net/IonDen/gbmszmp4/) -* [1 handle bind to 1 input](http://jsfiddle.net/IonDen/mvrfg2vc/) -* [2 handles bind to 2 inputs](http://jsfiddle.net/IonDen/r5aox84v/) -* [2 sliders connected to each other](http://jsfiddle.net/IonDen/4k3d4y3s/) -* [1st slider disables/enables 2nd slider](http://jsfiddle.net/IonDen/ctkouh69/) -* [Non-linear slider](http://jsfiddle.net/IonDen/pzjaoxe7/) -* [Plus and Minus buttons](http://jsfiddle.net/IonDen/wsk7y08a/) -* [Calculating sum](http://codepen.io/anon/pen/QyzwJZ) -* [Adding one more diapazon on 1 slider](http://jsfiddle.net/IonDen/st9eotpy/) -* [Live editing of Min and Max values](http://jsfiddle.net/IonDen/wL8gq4py/) -* [Prettify and transform values at the same time](http://jsfiddle.net/IonDen/j0tLzgq1/) -* [Custom marks on slider](http://jsfiddle.net/IonDen/spez12kt/) -* [Rendering money value n.nn](http://jsfiddle.net/IonDen/vrqqL2Lw/) -* [Rendering Dates with Moment.js](http://jsfiddle.net/tvn2ckj2/) -* [Changing step live](http://jsfiddle.net/IonDen/ca6ykae6/) -* [Toggle slider](http://jsfiddle.net/IonDen/t936wtjv/) -* [Using different skin color at the same time](http://jsfiddle.net/IonDen/2sruxk4e/) -* [2 dependant sliders](http://jsfiddle.net/IonDen/n2sxswv2/) -* [Skip some values](http://jsfiddle.net/IonDen/4qgq9bto/) -* [Good Prettify example](http://jsfiddle.net/IonDen/bvbvr0xs/) - - -## Настройка - -| Option | Data-Attr | Defaults | Type | Description | -| --- | --- | --- | --- | --- | -| `type` | `data-type` | `single` | string | Choose slider type, could be `single` - for one handle, or `double` for two handles | -| `min` | `data-min` | `10` | number | Set slider minimum value | -| `max` | `data-max` | `100` | number | Set slider maximum value | -| `from` | `data-from` | `min` | number | Set start position for left handle (or for single handle) | -| `to` | `data-to` | `max` | number | Set start position for right handle | -| `step` | `data-step` | `1` | number | Set sliders step. Always > 0. Could be fractional | -| `min_interval` | `data-min-interval` | `-` | number | Set minimum diapason between sliders. Only for **double** type | -| `max_interval` | `data-max-interval` | `-` | number | Set minimum maximum between sliders. Only for **double** type | -| `max_drag_interval` | `data-drag-interval` | `false` | boolean | Allow user to drag whole range. Only for **double** type | -| `values` | `data-values` | `[]` | array | Set up your own array of possible slider values. They could be numbers or strings. If the values array is set up, min, max and step param, can no longer be changed | -| `from_fixed` | `data-from-fixed` | `false` | boolean | Fix position of left (or single) handle | -| `from_min` | `data-from-min` | `min` | number | Set minimum limit for left (or single) handle | -| `from_max` | `data-from-max` | `max` | number | Set maximum limit for left (or single) handle | -| `from_shadow` | `data-from-shadow` | `false` | boolean | Highlight the limits for left handle | -| `to_fixed` | `data-to-fixed` | `false` | boolean | Fix position of right handle | -| `to_min` | `data-to-min` | `min` | number | Set minimum limit for right handle | -| `to_max` | `data-to-max` | `max` | number | Set maximum limit for right handle | -| `to_shadow` | `data-to-shadow` | `false` | boolean | Highlight the right handle | -| `prettify_enabled` | `data-prettify-enabled` | `true` | boolean | Improve readability of long numbers: 10000000 → 10 000 000 | -| `prettify_separator` | `data-prettify-separator` | ` ` | string | Set up your own separator for long numbers: 10000000 → 10,000,000 etc. | -| `prettify` | `-` | `null` | function | Set up your own prettify function. Can be anything. For example, you can set up unix time as slider values and than transform them to cool looking dates | -| `force_edges` | `data-force-edges` | `false` | boolean | Sliders handles and tooltips will be always inside it's container | -| `keyboard` | `data-keyboard` | `true` | boolean | Activates keyboard controls. Move left: ←, ↓, A, S. Move right: →, ↑, W, D. | -| `grid` | `data-grid` | `false` | boolean | Enables grid of values above the slider | -| `grid_margin` | `data-grid-margin` | `true` | boolean | Set left and right grid gaps | -| `grid_num` | `data-grid-num` | `4` | number | Number of grid units | -| `grid_snap` | `data-grid-snap` | `false` | boolean | Snap grid to sliders step (step param). If activated, grid_num will not be used. Max steps = 50 | -| `hide_min_max` | `data-hide-min-max` | `false` | boolean | Hides **min** and **max** labels | -| `hide_from_to` | `data-hide-from-to` | `false` | boolean | Hides **from** and **to** labels | -| `prefix` | `data-prefix` | `` | string | Set prefix for values. Will be set up right before the number: **$**100 | -| `postfix` | `data-postfix` | `` | string | Set postfix for values. Will be set up right after the number: 100**k** | -| `max_postfix` | `data-max-postfix` | `` | string | Special postfix, used only for maximum value. Will be showed after handle will reach maximum right position. For example **0 — 100+** | -| `decorate_both` | `data-decorate-both` | `true` | boolean | Used for **double** type and only if prefix or postfix was set up. Determine how to decorate close values. For example: **$10k — $100k** or **$10 — 100k** | -| `values_separator` | `data-decorate-both` | ` - ` | string | Set your own separator for close values. Used for **double** type. Default: **10 — 100**. Or you may set: **10 to 100, 10 + 100, 10 → 100** etc. | -| `input_values_separator` | `data-input-values-separator` | ` ; ` | string | Separator for **double** values in input value property. `` | -| `disable` | `data-disable` | `false` | boolean | Locks slider and makes it inactive. Input is disabled too. Invisible to forms | -| `block` | `data-blokc` | `false` | boolean | Locks slider and makes it inactive. Input is NOT disabled. Can be send with forms | -| `extra_classes` | `data-extra-classes` | `—` | string | Traverse extra CSS-classes to sliders container | -| `scope` | `-` | `null` | object | Scope for callbacks. Pass any object | -| `onStart` | `-` | `null` | function | Callback. Is called on slider start. Gets all slider data as a 1st attribute | -| `onChange` | `-` | `null` | function | Callback. IS called on each values change. Gets all slider data as a 1st attribute | -| `onFinish` | `-` | `null` | function | Callback. Is called than user releases handle. Gets all slider data as a 1st attribute | -| `onUpdate` | `-` | `null` | function | Callback. Is called than slider is modified by external methods `update` or `reset` | - - - -## Описание данных передаваемых в колбэки (onChange и т.д): - -Результат имеет тип object и передается коллбэк первым аргументом: -```javascript -Obj: { - "input": object, // jQuery-link to input - "slider": object, // jQuery-link to sliders container - "min": 1000, // MIN value - "max": 100000, // MAX values - "from": 10000, // FROM value - "from_percent": 10, // FROM value in percents - "from_value": 0, // FROM index in values array (if used) - "to": 90000, // TO value - "to_percent": 90, // TO value in percents - "to_value": 0, // TO index in values array (if used) - "min_pretty": "1 000", // MIN prettified (if used) - "max_pretty": "100 000", // MAX prettified (if used) - "from_pretty": "10 000", // FROM prettified (if used) - "to_pretty": "90 000" // TO prettified (if used) -} -``` - -## Создание слайдера c параметрами - -Пример -```javascript -$("#example").ionRangeSlider({ - min: 0, - max: 10000, - from: 1000, - to: 9000, - type: 'double', - prefix: "$", - grid: true, - grid_num: 10 -}); -``` - -Слайдер с параметрами можно также инициализировать используя атрибуты data-* у тэга input: -```html -data-min="0" -data-max="10000" -data-from="1000" -data-to="9000" -data-type="double" -data-prefix="$" -data-grid="true" -data-grid-num="10" -``` - -## Публичные методы - -Для того чтобы использовать публичные методы, вначале нужно записать значение слайдера в переменную:: -```javascript -// Запускаем слайдер -$("#range").ionRangeSlider({ - type: "double", - min: 0, - max: 1000, - from: 200, - to: 500, - grid: true -}); - -// Записываем инстанс в переменную -var slider = $("#range").data("ionRangeSlider"); - -// Запускаем публичный метод -slider.reset(); -``` - -Всего существует 3 публичных метода: -```javascript -// UPDATE - обновляет значения слайдера (можно менять любые значения) -slider.update({ - from: 300, - to: 400 -}); - -// RESET - сбрасывает слайдер к исходным значениям -slider.reset(); - -// DESTROY - убивает слайдер и восстанавливает исходный input -slider.destroy(); -``` - -## Еще раз взглянем на демо - -* Базовые настройки -* Расширенные настройки -* Взаимодействия - -В демках есть примеры использования всех опций слайдера - - -### История обновлений - -*** - -#### Поддержите разработку плагинов серии Ion: - -* Пожертвовать через сервис Pledgie: [![](https://pledgie.com/campaigns/25694.png?skin_name=chrome)](https://pledgie.com/campaigns/25694) - -* Пожертвовать напрямую через Paypal: https://www.paypal.me/IonDen - -* Пожертвовать напрямую через Яндекс.Деньги: http://yasobe.ru/na/razrabotku From 4530fce14e45c1cbc4105572da5240e37f1b6654 Mon Sep 17 00:00:00 2001 From: Huijie Wei Date: Wed, 24 Apr 2019 11:41:53 +0800 Subject: [PATCH 5/6] add grid_scale option --- js/ion.rangeSlider.js | 30 +++++++++++++++++++++++++++--- js/ion.rangeSlider.min.js | 2 +- 2 files changed, 28 insertions(+), 4 deletions(-) diff --git a/js/ion.rangeSlider.js b/js/ion.rangeSlider.js index 1d6bd03..9936f1c 100644 --- a/js/ion.rangeSlider.js +++ b/js/ion.rangeSlider.js @@ -310,6 +310,7 @@ grid_margin: true, grid_num: 4, grid_snap: false, + grid_scale: [], hide_min_max: false, hide_from_to: false, @@ -379,6 +380,7 @@ grid_margin: $inp.data("gridMargin"), grid_num: $inp.data("gridNum"), grid_snap: $inp.data("gridSnap"), + grid_scale: $inp.data("gridScale"), hide_min_max: $inp.data("hideMinMax"), hide_from_to: $inp.data("hideFromTo"), @@ -806,7 +808,7 @@ if ($.contains(this.$cache.cont[0], e.target) || this.dragging) { this.callOnFinish(); } - + this.dragging = false; }, @@ -2297,8 +2299,30 @@ } } - this.calcGridCollision(2, start, finish); - this.calcGridCollision(4, start, finish); + if (this.options.grid_scale.length > 0) { + for (i = 0; i < num; i++) { + label = this.$cache.grid_labels[i][0]; + var scale = $(label).html(); + + var inArray = false; + + $.each(this.options.grid_scale, function () { + if (this == scale) { + inArray = true; + return false; + } + }); + + if (inArray) { + label.style.visibility = "visible"; + } else { + label.style.visibility = "hidden"; + } + } + } else { + this.calcGridCollision(2, start, finish); + this.calcGridCollision(4, start, finish); + } for (i = 0; i < num; i++) { label = this.$cache.grid_labels[i][0]; diff --git a/js/ion.rangeSlider.min.js b/js/ion.rangeSlider.min.js index b2c2515..c7013b9 100644 --- a/js/ion.rangeSlider.min.js +++ b/js/ion.rangeSlider.min.js @@ -1,2 +1,2 @@ // Ion.RangeSlider, 2.3.0, © Denis Ineshin, 2010 - 2018, IonDen.com, Build date: 2018-12-12 00:00:37 -!function(i){!jQuery&&"function"==typeof define&&define.amd?define(["jquery"],function(t){return i(t,document,window,navigator)}):jQuery||"object"!=typeof exports?i(jQuery,document,window,navigator):i(require("jquery"),document,window,navigator)}(function(a,c,l,t,_){"use strict";var i,s,o=0,e=(i=t.userAgent,s=/msie\s\d+/i,0>>0;if(0===e)return-1;var h=+i||0;if(Math.abs(h)===1/0&&(h=0),e<=h)return-1;for(s=Math.max(0<=h?h:e-Math.abs(h),0);s!",r[0]),(e={skin:r.data("skin"),type:r.data("type"),min:r.data("min"),max:r.data("max"),from:r.data("from"),to:r.data("to"),step:r.data("step"),min_interval:r.data("minInterval"),max_interval:r.data("maxInterval"),drag_interval:r.data("dragInterval"),values:r.data("values"),from_fixed:r.data("fromFixed"),from_min:r.data("fromMin"),from_max:r.data("fromMax"),from_shadow:r.data("fromShadow"),to_fixed:r.data("toFixed"),to_min:r.data("toMin"),to_max:r.data("toMax"),to_shadow:r.data("toShadow"),prettify_enabled:r.data("prettifyEnabled"),prettify_separator:r.data("prettifySeparator"),force_edges:r.data("forceEdges"),keyboard:r.data("keyboard"),grid:r.data("grid"),grid_margin:r.data("gridMargin"),grid_num:r.data("gridNum"),grid_snap:r.data("gridSnap"),hide_min_max:r.data("hideMinMax"),hide_from_to:r.data("hideFromTo"),prefix:r.data("prefix"),postfix:r.data("postfix"),max_postfix:r.data("maxPostfix"),decorate_both:r.data("decorateBoth"),values_separator:r.data("valuesSeparator"),input_values_separator:r.data("inputValuesSeparator"),disable:r.data("disable"),block:r.data("block"),extra_classes:r.data("extraClasses")}).values=e.values&&e.values.split(","),e)e.hasOwnProperty(h)&&(e[h]!==_&&""!==e[h]||delete e[h]);n!==_&&""!==n&&((n=n.split(e.input_values_separator||i.input_values_separator||";"))[0]&&n[0]==+n[0]&&(n[0]=+n[0]),n[1]&&n[1]==+n[1]&&(n[1]=+n[1]),i&&i.values&&i.values.length?(o.from=n[0]&&i.values.indexOf(n[0]),o.to=n[1]&&i.values.indexOf(n[1])):(o.from=n[0]&&+n[0],o.to=n[1]&&+n[1])),a.extend(o,i),a.extend(o,e),this.options=o,this.update_check={},this.validate(),this.result={input:this.$cache.input,slider:null,min:this.options.min,max:this.options.max,from:this.options.from,from_percent:0,from_value:null,to:this.options.to,to_percent:0,to_value:null},this.init()};h.prototype={init:function(t){this.no_diapason=!1,this.coords.p_step=this.convertToPercent(this.options.step,!0),this.target="base",this.toggleInput(),this.append(),this.setMinMax(),t?(this.force_redraw=!0,this.calc(!0),this.callOnUpdate()):(this.force_redraw=!0,this.calc(!0),this.callOnStart()),this.updateScene()},append:function(){var t='';this.$cache.input.before(t),this.$cache.input.prop("readonly",!0),this.$cache.cont=this.$cache.input.prev(),this.result.slider=this.$cache.cont,this.$cache.cont.html('01000'),this.$cache.rs=this.$cache.cont.find(".irs"),this.$cache.min=this.$cache.cont.find(".irs-min"),this.$cache.max=this.$cache.cont.find(".irs-max"),this.$cache.from=this.$cache.cont.find(".irs-from"),this.$cache.to=this.$cache.cont.find(".irs-to"),this.$cache.single=this.$cache.cont.find(".irs-single"),this.$cache.line=this.$cache.cont.find(".irs-line"),this.$cache.grid=this.$cache.cont.find(".irs-grid"),"single"===this.options.type?(this.$cache.cont.append(''),this.$cache.bar=this.$cache.cont.find(".irs-bar"),this.$cache.edge=this.$cache.cont.find(".irs-bar-edge"),this.$cache.s_single=this.$cache.cont.find(".single"),this.$cache.from[0].style.visibility="hidden",this.$cache.to[0].style.visibility="hidden",this.$cache.shad_single=this.$cache.cont.find(".shadow-single")):(this.$cache.cont.append(''),this.$cache.bar=this.$cache.cont.find(".irs-bar"),this.$cache.s_from=this.$cache.cont.find(".from"),this.$cache.s_to=this.$cache.cont.find(".to"),this.$cache.shad_from=this.$cache.cont.find(".shadow-from"),this.$cache.shad_to=this.$cache.cont.find(".shadow-to"),this.setTopHandler()),this.options.hide_from_to&&(this.$cache.from[0].style.display="none",this.$cache.to[0].style.display="none",this.$cache.single[0].style.display="none"),this.appendGrid(),this.options.disable?(this.appendDisableMask(),this.$cache.input[0].disabled=!0):(this.$cache.input[0].disabled=!1,this.removeDisableMask(),this.bindEvents()),this.options.disable||(this.options.block?this.appendDisableMask():this.removeDisableMask()),this.options.drag_interval&&(this.$cache.bar[0].style.cursor="ew-resize")},setTopHandler:function(){var t=this.options.min,i=this.options.max,s=this.options.from,o=this.options.to;t'),this.$cache.cont.addClass("irs-disabled")},removeDisableMask:function(){this.$cache.cont.remove(".irs-disable-mask"),this.$cache.cont.removeClass("irs-disabled")},remove:function(){this.$cache.cont.remove(),this.$cache.cont=null,this.$cache.line.off("keydown.irs_"+this.plugin_count),this.$cache.body.off("touchmove.irs_"+this.plugin_count),this.$cache.body.off("mousemove.irs_"+this.plugin_count),this.$cache.win.off("touchend.irs_"+this.plugin_count),this.$cache.win.off("mouseup.irs_"+this.plugin_count),e&&(this.$cache.body.off("mouseup.irs_"+this.plugin_count),this.$cache.body.off("mouseleave.irs_"+this.plugin_count)),this.$cache.grid_labels=[],this.coords.big=[],this.coords.big_w=[],this.coords.big_p=[],this.coords.big_x=[],cancelAnimationFrame(this.raf_id)},bindEvents:function(){this.no_diapason||(this.$cache.body.on("touchmove.irs_"+this.plugin_count,this.pointerMove.bind(this)),this.$cache.body.on("mousemove.irs_"+this.plugin_count,this.pointerMove.bind(this)),this.$cache.win.on("touchend.irs_"+this.plugin_count,this.pointerUp.bind(this)),this.$cache.win.on("mouseup.irs_"+this.plugin_count,this.pointerUp.bind(this)),this.$cache.line.on("touchstart.irs_"+this.plugin_count,this.pointerClick.bind(this,"click")),this.$cache.line.on("mousedown.irs_"+this.plugin_count,this.pointerClick.bind(this,"click")),this.$cache.line.on("focus.irs_"+this.plugin_count,this.pointerFocus.bind(this)),this.options.drag_interval&&"double"===this.options.type?(this.$cache.bar.on("touchstart.irs_"+this.plugin_count,this.pointerDown.bind(this,"both")),this.$cache.bar.on("mousedown.irs_"+this.plugin_count,this.pointerDown.bind(this,"both"))):(this.$cache.bar.on("touchstart.irs_"+this.plugin_count,this.pointerClick.bind(this,"click")),this.$cache.bar.on("mousedown.irs_"+this.plugin_count,this.pointerClick.bind(this,"click"))),"single"===this.options.type?(this.$cache.single.on("touchstart.irs_"+this.plugin_count,this.pointerDown.bind(this,"single")),this.$cache.s_single.on("touchstart.irs_"+this.plugin_count,this.pointerDown.bind(this,"single")),this.$cache.shad_single.on("touchstart.irs_"+this.plugin_count,this.pointerClick.bind(this,"click")),this.$cache.single.on("mousedown.irs_"+this.plugin_count,this.pointerDown.bind(this,"single")),this.$cache.s_single.on("mousedown.irs_"+this.plugin_count,this.pointerDown.bind(this,"single")),this.$cache.edge.on("mousedown.irs_"+this.plugin_count,this.pointerClick.bind(this,"click")),this.$cache.shad_single.on("mousedown.irs_"+this.plugin_count,this.pointerClick.bind(this,"click"))):(this.$cache.single.on("touchstart.irs_"+this.plugin_count,this.pointerDown.bind(this,null)),this.$cache.single.on("mousedown.irs_"+this.plugin_count,this.pointerDown.bind(this,null)),this.$cache.from.on("touchstart.irs_"+this.plugin_count,this.pointerDown.bind(this,"from")),this.$cache.s_from.on("touchstart.irs_"+this.plugin_count,this.pointerDown.bind(this,"from")),this.$cache.to.on("touchstart.irs_"+this.plugin_count,this.pointerDown.bind(this,"to")),this.$cache.s_to.on("touchstart.irs_"+this.plugin_count,this.pointerDown.bind(this,"to")),this.$cache.shad_from.on("touchstart.irs_"+this.plugin_count,this.pointerClick.bind(this,"click")),this.$cache.shad_to.on("touchstart.irs_"+this.plugin_count,this.pointerClick.bind(this,"click")),this.$cache.from.on("mousedown.irs_"+this.plugin_count,this.pointerDown.bind(this,"from")),this.$cache.s_from.on("mousedown.irs_"+this.plugin_count,this.pointerDown.bind(this,"from")),this.$cache.to.on("mousedown.irs_"+this.plugin_count,this.pointerDown.bind(this,"to")),this.$cache.s_to.on("mousedown.irs_"+this.plugin_count,this.pointerDown.bind(this,"to")),this.$cache.shad_from.on("mousedown.irs_"+this.plugin_count,this.pointerClick.bind(this,"click")),this.$cache.shad_to.on("mousedown.irs_"+this.plugin_count,this.pointerClick.bind(this,"click"))),this.options.keyboard&&this.$cache.line.on("keydown.irs_"+this.plugin_count,this.key.bind(this,"keyboard")),e&&(this.$cache.body.on("mouseup.irs_"+this.plugin_count,this.pointerUp.bind(this)),this.$cache.body.on("mouseleave.irs_"+this.plugin_count,this.pointerUp.bind(this))))},pointerFocus:function(t){var i,s;this.target||(i=(s="single"===this.options.type?this.$cache.single:this.$cache.from).offset().left,i+=s.width()/2-1,this.pointerClick("single",{preventDefault:function(){},pageX:i}))},pointerMove:function(t){if(this.dragging){var i=t.pageX||t.originalEvent.touches&&t.originalEvent.touches[0].pageX;this.coords.x_pointer=i-this.coords.x_gap,this.calc()}},pointerUp:function(t){this.current_plugin===this.plugin_count&&this.is_active&&(this.is_active=!1,this.$cache.cont.find(".state_hover").removeClass("state_hover"),this.force_redraw=!0,e&&a("*").prop("unselectable",!1),this.updateScene(),this.restoreOriginalMinInterval(),(a.contains(this.$cache.cont[0],t.target)||this.dragging)&&this.callOnFinish(),this.dragging=!1)},pointerDown:function(t,i){i.preventDefault();var s=i.pageX||i.originalEvent.touches&&i.originalEvent.touches[0].pageX;2!==i.button&&("both"===t&&this.setTempMinInterval(),t||(t=this.target||"from"),this.current_plugin=this.plugin_count,this.target=t,this.is_active=!0,this.dragging=!0,this.coords.x_gap=this.$cache.rs.offset().left,this.coords.x_pointer=s-this.coords.x_gap,this.calcPointerPercent(),this.changeLevel(t),e&&a("*").prop("unselectable",!0),this.$cache.line.trigger("focus"),this.updateScene())},pointerClick:function(t,i){i.preventDefault();var s=i.pageX||i.originalEvent.touches&&i.originalEvent.touches[0].pageX;2!==i.button&&(this.current_plugin=this.plugin_count,this.target=t,this.is_click=!0,this.coords.x_gap=this.$cache.rs.offset().left,this.coords.x_pointer=+(s-this.coords.x_gap).toFixed(),this.force_redraw=!0,this.calc(),this.$cache.line.trigger("focus"))},key:function(t,i){if(!(this.current_plugin!==this.plugin_count||i.altKey||i.ctrlKey||i.shiftKey||i.metaKey)){switch(i.which){case 83:case 65:case 40:case 37:i.preventDefault(),this.moveByKey(!1);break;case 87:case 68:case 38:case 39:i.preventDefault(),this.moveByKey(!0)}return!0}},moveByKey:function(t){var i=this.coords.p_pointer,s=(this.options.max-this.options.min)/100;s=this.options.step/s,t?i+=s:i-=s,this.coords.x_pointer=this.toFixed(this.coords.w_rs/100*i),this.is_key=!0,this.calc()},setMinMax:function(){if(this.options){if(this.options.hide_min_max)return this.$cache.min[0].style.display="none",void(this.$cache.max[0].style.display="none");if(this.options.values.length)this.$cache.min.html(this.decorate(this.options.p_values[this.options.min])),this.$cache.max.html(this.decorate(this.options.p_values[this.options.max]));else{var t=this._prettify(this.options.min),i=this._prettify(this.options.max);this.result.min_pretty=t,this.result.max_pretty=i,this.$cache.min.html(this.decorate(t,this.options.min)),this.$cache.max.html(this.decorate(i,this.options.max))}this.labels.w_min=this.$cache.min.outerWidth(!1),this.labels.w_max=this.$cache.max.outerWidth(!1)}},setTempMinInterval:function(){var t=this.result.to-this.result.from;null===this.old_min_interval&&(this.old_min_interval=this.options.min_interval),this.options.min_interval=t},restoreOriginalMinInterval:function(){null!==this.old_min_interval&&(this.options.min_interval=this.old_min_interval,this.old_min_interval=null)},calc:function(t){if(this.options&&(this.calc_count++,(10===this.calc_count||t)&&(this.calc_count=0,this.coords.w_rs=this.$cache.rs.outerWidth(!1),this.calcHandlePercent()),this.coords.w_rs)){this.calcPointerPercent();var i=this.getHandleX();switch("both"===this.target&&(this.coords.p_gap=0,i=this.getHandleX()),"click"===this.target&&(this.coords.p_gap=this.coords.p_handle/2,i=this.getHandleX(),this.options.drag_interval?this.target="both_one":this.target=this.chooseHandle(i)),this.target){case"base":var s=(this.options.max-this.options.min)/100,o=(this.result.from-this.options.min)/s,e=(this.result.to-this.options.min)/s;this.coords.p_single_real=this.toFixed(o),this.coords.p_from_real=this.toFixed(o),this.coords.p_to_real=this.toFixed(e),this.coords.p_single_real=this.checkDiapason(this.coords.p_single_real,this.options.from_min,this.options.from_max),this.coords.p_from_real=this.checkDiapason(this.coords.p_from_real,this.options.from_min,this.options.from_max),this.coords.p_to_real=this.checkDiapason(this.coords.p_to_real,this.options.to_min,this.options.to_max),this.coords.p_single_fake=this.convertToFakePercent(this.coords.p_single_real),this.coords.p_from_fake=this.convertToFakePercent(this.coords.p_from_real),this.coords.p_to_fake=this.convertToFakePercent(this.coords.p_to_real),this.target=null;break;case"single":if(this.options.from_fixed)break;this.coords.p_single_real=this.convertToRealPercent(i),this.coords.p_single_real=this.calcWithStep(this.coords.p_single_real),this.coords.p_single_real=this.checkDiapason(this.coords.p_single_real,this.options.from_min,this.options.from_max),this.coords.p_single_fake=this.convertToFakePercent(this.coords.p_single_real);break;case"from":if(this.options.from_fixed)break;this.coords.p_from_real=this.convertToRealPercent(i),this.coords.p_from_real=this.calcWithStep(this.coords.p_from_real),this.coords.p_from_real>this.coords.p_to_real&&(this.coords.p_from_real=this.coords.p_to_real),this.coords.p_from_real=this.checkDiapason(this.coords.p_from_real,this.options.from_min,this.options.from_max),this.coords.p_from_real=this.checkMinInterval(this.coords.p_from_real,this.coords.p_to_real,"from"),this.coords.p_from_real=this.checkMaxInterval(this.coords.p_from_real,this.coords.p_to_real,"from"),this.coords.p_from_fake=this.convertToFakePercent(this.coords.p_from_real);break;case"to":if(this.options.to_fixed)break;this.coords.p_to_real=this.convertToRealPercent(i),this.coords.p_to_real=this.calcWithStep(this.coords.p_to_real),this.coords.p_to_realthis.coords.w_rs&&(this.coords.x_pointer=this.coords.w_rs),this.coords.p_pointer=this.toFixed(this.coords.x_pointer/this.coords.w_rs*100)):this.coords.p_pointer=0},convertToRealPercent:function(t){return t/(100-this.coords.p_handle)*100},convertToFakePercent:function(t){return t/100*(100-this.coords.p_handle)},getHandleX:function(){var t=100-this.coords.p_handle,i=this.toFixed(this.coords.p_pointer-this.coords.p_gap);return i<0?i=0:t100-this.labels.p_max-1?this.$cache.max[0].style.visibility="hidden":this.$cache.max[0].style.visibility="visible";else{s=h?(this.options.decorate_both?(t=this.decorate(r[this.result.from]),t+=this.options.values_separator,t+=this.decorate(r[this.result.to])):t=this.decorate(r[this.result.from]+this.options.values_separator+r[this.result.to]),i=this.decorate(r[this.result.from]),this.decorate(r[this.result.to])):(o=this._prettify(this.result.from),e=this._prettify(this.result.to),this.options.decorate_both?(t=this.decorate(o,this.result.from),t+=this.options.values_separator,t+=this.decorate(e,this.result.to)):t=this.decorate(o+this.options.values_separator+e,this.result.to),i=this.decorate(o,this.result.from),this.decorate(e,this.result.to)),this.$cache.single.html(t),this.$cache.from.html(i),this.$cache.to.html(s),this.calcLabels();var n=Math.min(this.labels.p_single_left,this.labels.p_from_left),a=this.labels.p_single_left+this.labels.p_single_fake,c=this.labels.p_to_left+this.labels.p_to_fake,l=Math.max(a,c);this.labels.p_from_left+this.labels.p_from_fake>=this.labels.p_to_left?(this.$cache.from[0].style.visibility="hidden",this.$cache.to[0].style.visibility="hidden",this.$cache.single[0].style.visibility="visible",l=this.result.from===this.result.to?("from"===this.target?this.$cache.from[0].style.visibility="visible":"to"===this.target?this.$cache.to[0].style.visibility="visible":this.target||(this.$cache.from[0].style.visibility="visible"),this.$cache.single[0].style.visibility="hidden",c):(this.$cache.from[0].style.visibility="hidden",this.$cache.to[0].style.visibility="hidden",this.$cache.single[0].style.visibility="visible",Math.max(a,c))):(this.$cache.from[0].style.visibility="visible",this.$cache.to[0].style.visibility="visible",this.$cache.single[0].style.visibility="hidden"),n100-this.labels.p_max-1?this.$cache.max[0].style.visibility="hidden":this.$cache.max[0].style.visibility="visible"}}},drawShadow:function(){var t,i,s,o,e=this.options,h=this.$cache,r="number"==typeof e.from_min&&!isNaN(e.from_min),n="number"==typeof e.from_max&&!isNaN(e.from_max),a="number"==typeof e.to_min&&!isNaN(e.to_min),c="number"==typeof e.to_max&&!isNaN(e.to_max);"single"===e.type?e.from_shadow&&(r||n)?(t=this.convertToPercent(r?e.from_min:e.min),i=this.convertToPercent(n?e.from_max:e.max)-t,t=this.toFixed(t-this.coords.p_handle/100*t),i=this.toFixed(i-this.coords.p_handle/100*i),t+=this.coords.p_handle/2,h.shad_single[0].style.display="block",h.shad_single[0].style.left=t+"%",h.shad_single[0].style.width=i+"%"):h.shad_single[0].style.display="none":(e.from_shadow&&(r||n)?(t=this.convertToPercent(r?e.from_min:e.min),i=this.convertToPercent(n?e.from_max:e.max)-t,t=this.toFixed(t-this.coords.p_handle/100*t),i=this.toFixed(i-this.coords.p_handle/100*i),t+=this.coords.p_handle/2,h.shad_from[0].style.display="block",h.shad_from[0].style.left=t+"%",h.shad_from[0].style.width=i+"%"):h.shad_from[0].style.display="none",e.to_shadow&&(a||c)?(s=this.convertToPercent(a?e.to_min:e.min),o=this.convertToPercent(c?e.to_max:e.max)-s,s=this.toFixed(s-this.coords.p_handle/100*s),o=this.toFixed(o-this.coords.p_handle/100*o),s+=this.coords.p_handle/2,h.shad_to[0].style.display="block",h.shad_to[0].style.left=s+"%",h.shad_to[0].style.width=o+"%"):h.shad_to[0].style.display="none")},writeToInput:function(){"single"===this.options.type?(this.options.values.length?this.$cache.input.prop("value",this.result.from_value):this.$cache.input.prop("value",this.result.from),this.$cache.input.data("from",this.result.from)):(this.options.values.length?this.$cache.input.prop("value",this.result.from_value+this.options.input_values_separator+this.result.to_value):this.$cache.input.prop("value",this.result.from+this.options.input_values_separator+this.result.to),this.$cache.input.data("from",this.result.from),this.$cache.input.data("to",this.result.to))},callOnStart:function(){this.writeToInput(),this.options.onStart&&"function"==typeof this.options.onStart&&(this.options.scope?this.options.onStart.call(this.options.scope,this.result):this.options.onStart(this.result))},callOnChange:function(){this.writeToInput(),this.options.onChange&&"function"==typeof this.options.onChange&&(this.options.scope?this.options.onChange.call(this.options.scope,this.result):this.options.onChange(this.result))},callOnFinish:function(){this.writeToInput(),this.options.onFinish&&"function"==typeof this.options.onFinish&&(this.options.scope?this.options.onFinish.call(this.options.scope,this.result):this.options.onFinish(this.result))},callOnUpdate:function(){this.writeToInput(),this.options.onUpdate&&"function"==typeof this.options.onUpdate&&(this.options.scope?this.options.onUpdate.call(this.options.scope,this.result):this.options.onUpdate(this.result))},toggleInput:function(){this.$cache.input.toggleClass("irs-hidden-input"),this.has_tab_index?this.$cache.input.prop("tabindex",-1):this.$cache.input.removeProp("tabindex"),this.has_tab_index=!this.has_tab_index},convertToPercent:function(t,i){var s,o=this.options.max-this.options.min,e=o/100;return o?(s=(i?t:t-this.options.min)/e,this.toFixed(s)):(this.no_diapason=!0,0)},convertToValue:function(t){var i,s,o=this.options.min,e=this.options.max,h=o.toString().split(".")[1],r=e.toString().split(".")[1],n=0,a=0;if(0===t)return this.options.min;if(100===t)return this.options.max;h&&(n=i=h.length),r&&(n=s=r.length),i&&s&&(n=s<=i?i:s),o<0&&(o=+(o+(a=Math.abs(o))).toFixed(n),e=+(e+a).toFixed(n));var c,l=(e-o)/100*t+o,_=this.options.step.toString().split(".")[1];return l=_?+l.toFixed(_.length):(l/=this.options.step,+(l*=this.options.step).toFixed(0)),a&&(l-=a),(c=_?+l.toFixed(_.length):this.toFixed(l))this.options.max&&(c=this.options.max),c},calcWithStep:function(t){var i=Math.round(t/this.coords.p_step)*this.coords.p_step;return 100h.max_interval&&(o=e-h.max_interval):o-e>h.max_interval&&(o=e+h.max_interval),this.convertToPercent(o)):t},checkDiapason:function(t,i,s){var o=this.convertToValue(t),e=this.options;return"number"!=typeof i&&(i=e.min),"number"!=typeof s&&(s=e.max),os.max&&(s.from=s.max)):(s.froms.max&&(s.from=s.max),s.tos.max&&(s.to=s.max),this.update_check.from&&(this.update_check.from!==s.from&&s.from>s.to&&(s.from=s.to),this.update_check.to!==s.to&&s.tos.to&&(s.from=s.to),s.tos.from_max&&(s.from=s.from_max),"number"==typeof s.to_min&&s.tos.to_max&&(s.to=s.to_max),o&&(o.min!==s.min&&(o.min=s.min),o.max!==s.max&&(o.max=s.max),(o.fromo.max)&&(o.from=s.from),(o.too.max)&&(o.to=s.to)),("number"!=typeof s.min_interval||isNaN(s.min_interval)||!s.min_interval||s.min_interval<0)&&(s.min_interval=0),("number"!=typeof s.max_interval||isNaN(s.max_interval)||!s.max_interval||s.max_interval<0)&&(s.max_interval=0),s.min_interval&&s.min_interval>s.max-s.min&&(s.min_interval=s.max-s.min),s.max_interval&&s.max_interval>s.max-s.min&&(s.max_interval=s.max-s.min)},decorate:function(t,i){var s="",o=this.options;return o.prefix&&(s+=o.prefix),s+=t,o.max_postfix&&(o.values.length&&t===o.p_values[o.max]?(s+=o.max_postfix,o.postfix&&(s+=" ")):i===o.max&&(s+=o.max_postfix,o.postfix&&(s+=" "))),o.postfix&&(s+=o.postfix),s},updateFrom:function(){this.result.from=this.options.from,this.result.from_percent=this.convertToPercent(this.result.from),this.result.from_pretty=this._prettify(this.result.from),this.options.values&&(this.result.from_value=this.options.values[this.result.from])},updateTo:function(){this.result.to=this.options.to,this.result.to_percent=this.convertToPercent(this.result.to),this.result.to_pretty=this._prettify(this.result.to),this.options.values&&(this.result.to_value=this.options.values[this.result.to])},updateResult:function(){this.result.min=this.options.min,this.result.max=this.options.max,this.updateFrom(),this.updateTo()},appendGrid:function(){if(this.options.grid){var t,i,s,o,e,h,r=this.options,n=r.max-r.min,a=r.grid_num,c=0,l=4,_="";for(this.calcGridMargin(),r.grid_snap&&(a=n/r.step),50';_+='',h=this.convertToValue(c),_+=''+(h=r.values.length?r.p_values[h]:this._prettify(h))+""}this.coords.big_num=Math.ceil(a+1),this.$cache.cont.addClass("irs-with-grid"),this.$cache.grid.html(_),this.cacheGridLabels()}},cacheGridLabels:function(){var t,i,s=this.coords.big_num;for(i=0;i100+this.coords.grid_gap&&(o[e-1]=100+this.coords.grid_gap,s[e-1]=this.toFixed(o[e-1]-this.coords.big_p[e-1]),this.coords.big_x[e-1]=this.toFixed(this.coords.big_p[e-1]-this.coords.grid_gap))),this.calcGridCollision(2,s,o),this.calcGridCollision(4,s,o),t=0;t>>0;if(0===e)return-1;var h=+i||0;if(Math.abs(h)===1/0&&(h=0),e<=h)return-1;for(s=Math.max(0<=h?h:e-Math.abs(h),0);s!",r[0]),(e={skin:r.data("skin"),type:r.data("type"),min:r.data("min"),max:r.data("max"),from:r.data("from"),to:r.data("to"),step:r.data("step"),min_interval:r.data("minInterval"),max_interval:r.data("maxInterval"),drag_interval:r.data("dragInterval"),values:r.data("values"),from_fixed:r.data("fromFixed"),from_min:r.data("fromMin"),from_max:r.data("fromMax"),from_shadow:r.data("fromShadow"),to_fixed:r.data("toFixed"),to_min:r.data("toMin"),to_max:r.data("toMax"),to_shadow:r.data("toShadow"),prettify_enabled:r.data("prettifyEnabled"),prettify_separator:r.data("prettifySeparator"),force_edges:r.data("forceEdges"),keyboard:r.data("keyboard"),grid:r.data("grid"),grid_margin:r.data("gridMargin"),grid_num:r.data("gridNum"),grid_snap:r.data("gridSnap"),grid_scale:r.data("gridScale"),hide_min_max:r.data("hideMinMax"),hide_from_to:r.data("hideFromTo"),prefix:r.data("prefix"),postfix:r.data("postfix"),max_postfix:r.data("maxPostfix"),decorate_both:r.data("decorateBoth"),values_separator:r.data("valuesSeparator"),input_values_separator:r.data("inputValuesSeparator"),disable:r.data("disable"),block:r.data("block"),extra_classes:r.data("extraClasses")}).values=e.values&&e.values.split(","),e)e.hasOwnProperty(h)&&(e[h]!==_&&""!==e[h]||delete e[h]);n!==_&&""!==n&&((n=n.split(e.input_values_separator||i.input_values_separator||";"))[0]&&n[0]==+n[0]&&(n[0]=+n[0]),n[1]&&n[1]==+n[1]&&(n[1]=+n[1]),i&&i.values&&i.values.length?(o.from=n[0]&&i.values.indexOf(n[0]),o.to=n[1]&&i.values.indexOf(n[1])):(o.from=n[0]&&+n[0],o.to=n[1]&&+n[1])),a.extend(o,i),a.extend(o,e),this.options=o,this.update_check={},this.validate(),this.result={input:this.$cache.input,slider:null,min:this.options.min,max:this.options.max,from:this.options.from,from_percent:0,from_value:null,to:this.options.to,to_percent:0,to_value:null},this.init()};h.prototype={init:function(t){this.no_diapason=!1,this.coords.p_step=this.convertToPercent(this.options.step,!0),this.target="base",this.toggleInput(),this.append(),this.setMinMax(),t?(this.force_redraw=!0,this.calc(!0),this.callOnUpdate()):(this.force_redraw=!0,this.calc(!0),this.callOnStart()),this.updateScene()},append:function(){var t='';this.$cache.input.before(t),this.$cache.input.prop("readonly",!0),this.$cache.cont=this.$cache.input.prev(),this.result.slider=this.$cache.cont,this.$cache.cont.html('01000'),this.$cache.rs=this.$cache.cont.find(".irs"),this.$cache.min=this.$cache.cont.find(".irs-min"),this.$cache.max=this.$cache.cont.find(".irs-max"),this.$cache.from=this.$cache.cont.find(".irs-from"),this.$cache.to=this.$cache.cont.find(".irs-to"),this.$cache.single=this.$cache.cont.find(".irs-single"),this.$cache.line=this.$cache.cont.find(".irs-line"),this.$cache.grid=this.$cache.cont.find(".irs-grid"),"single"===this.options.type?(this.$cache.cont.append(''),this.$cache.bar=this.$cache.cont.find(".irs-bar"),this.$cache.edge=this.$cache.cont.find(".irs-bar-edge"),this.$cache.s_single=this.$cache.cont.find(".single"),this.$cache.from[0].style.visibility="hidden",this.$cache.to[0].style.visibility="hidden",this.$cache.shad_single=this.$cache.cont.find(".shadow-single")):(this.$cache.cont.append(''),this.$cache.bar=this.$cache.cont.find(".irs-bar"),this.$cache.s_from=this.$cache.cont.find(".from"),this.$cache.s_to=this.$cache.cont.find(".to"),this.$cache.shad_from=this.$cache.cont.find(".shadow-from"),this.$cache.shad_to=this.$cache.cont.find(".shadow-to"),this.setTopHandler()),this.options.hide_from_to&&(this.$cache.from[0].style.display="none",this.$cache.to[0].style.display="none",this.$cache.single[0].style.display="none"),this.appendGrid(),this.options.disable?(this.appendDisableMask(),this.$cache.input[0].disabled=!0):(this.$cache.input[0].disabled=!1,this.removeDisableMask(),this.bindEvents()),this.options.disable||(this.options.block?this.appendDisableMask():this.removeDisableMask()),this.options.drag_interval&&(this.$cache.bar[0].style.cursor="ew-resize")},setTopHandler:function(){var t=this.options.min,i=this.options.max,s=this.options.from,o=this.options.to;t'),this.$cache.cont.addClass("irs-disabled")},removeDisableMask:function(){this.$cache.cont.remove(".irs-disable-mask"),this.$cache.cont.removeClass("irs-disabled")},remove:function(){this.$cache.cont.remove(),this.$cache.cont=null,this.$cache.line.off("keydown.irs_"+this.plugin_count),this.$cache.body.off("touchmove.irs_"+this.plugin_count),this.$cache.body.off("mousemove.irs_"+this.plugin_count),this.$cache.win.off("touchend.irs_"+this.plugin_count),this.$cache.win.off("mouseup.irs_"+this.plugin_count),e&&(this.$cache.body.off("mouseup.irs_"+this.plugin_count),this.$cache.body.off("mouseleave.irs_"+this.plugin_count)),this.$cache.grid_labels=[],this.coords.big=[],this.coords.big_w=[],this.coords.big_p=[],this.coords.big_x=[],cancelAnimationFrame(this.raf_id)},bindEvents:function(){this.no_diapason||(this.$cache.body.on("touchmove.irs_"+this.plugin_count,this.pointerMove.bind(this)),this.$cache.body.on("mousemove.irs_"+this.plugin_count,this.pointerMove.bind(this)),this.$cache.win.on("touchend.irs_"+this.plugin_count,this.pointerUp.bind(this)),this.$cache.win.on("mouseup.irs_"+this.plugin_count,this.pointerUp.bind(this)),this.$cache.line.on("touchstart.irs_"+this.plugin_count,this.pointerClick.bind(this,"click")),this.$cache.line.on("mousedown.irs_"+this.plugin_count,this.pointerClick.bind(this,"click")),this.$cache.line.on("focus.irs_"+this.plugin_count,this.pointerFocus.bind(this)),this.options.drag_interval&&"double"===this.options.type?(this.$cache.bar.on("touchstart.irs_"+this.plugin_count,this.pointerDown.bind(this,"both")),this.$cache.bar.on("mousedown.irs_"+this.plugin_count,this.pointerDown.bind(this,"both"))):(this.$cache.bar.on("touchstart.irs_"+this.plugin_count,this.pointerClick.bind(this,"click")),this.$cache.bar.on("mousedown.irs_"+this.plugin_count,this.pointerClick.bind(this,"click"))),"single"===this.options.type?(this.$cache.single.on("touchstart.irs_"+this.plugin_count,this.pointerDown.bind(this,"single")),this.$cache.s_single.on("touchstart.irs_"+this.plugin_count,this.pointerDown.bind(this,"single")),this.$cache.shad_single.on("touchstart.irs_"+this.plugin_count,this.pointerClick.bind(this,"click")),this.$cache.single.on("mousedown.irs_"+this.plugin_count,this.pointerDown.bind(this,"single")),this.$cache.s_single.on("mousedown.irs_"+this.plugin_count,this.pointerDown.bind(this,"single")),this.$cache.edge.on("mousedown.irs_"+this.plugin_count,this.pointerClick.bind(this,"click")),this.$cache.shad_single.on("mousedown.irs_"+this.plugin_count,this.pointerClick.bind(this,"click"))):(this.$cache.single.on("touchstart.irs_"+this.plugin_count,this.pointerDown.bind(this,null)),this.$cache.single.on("mousedown.irs_"+this.plugin_count,this.pointerDown.bind(this,null)),this.$cache.from.on("touchstart.irs_"+this.plugin_count,this.pointerDown.bind(this,"from")),this.$cache.s_from.on("touchstart.irs_"+this.plugin_count,this.pointerDown.bind(this,"from")),this.$cache.to.on("touchstart.irs_"+this.plugin_count,this.pointerDown.bind(this,"to")),this.$cache.s_to.on("touchstart.irs_"+this.plugin_count,this.pointerDown.bind(this,"to")),this.$cache.shad_from.on("touchstart.irs_"+this.plugin_count,this.pointerClick.bind(this,"click")),this.$cache.shad_to.on("touchstart.irs_"+this.plugin_count,this.pointerClick.bind(this,"click")),this.$cache.from.on("mousedown.irs_"+this.plugin_count,this.pointerDown.bind(this,"from")),this.$cache.s_from.on("mousedown.irs_"+this.plugin_count,this.pointerDown.bind(this,"from")),this.$cache.to.on("mousedown.irs_"+this.plugin_count,this.pointerDown.bind(this,"to")),this.$cache.s_to.on("mousedown.irs_"+this.plugin_count,this.pointerDown.bind(this,"to")),this.$cache.shad_from.on("mousedown.irs_"+this.plugin_count,this.pointerClick.bind(this,"click")),this.$cache.shad_to.on("mousedown.irs_"+this.plugin_count,this.pointerClick.bind(this,"click"))),this.options.keyboard&&this.$cache.line.on("keydown.irs_"+this.plugin_count,this.key.bind(this,"keyboard")),e&&(this.$cache.body.on("mouseup.irs_"+this.plugin_count,this.pointerUp.bind(this)),this.$cache.body.on("mouseleave.irs_"+this.plugin_count,this.pointerUp.bind(this))))},pointerFocus:function(t){var i,s;this.target||(i=(s="single"===this.options.type?this.$cache.single:this.$cache.from).offset().left,i+=s.width()/2-1,this.pointerClick("single",{preventDefault:function(){},pageX:i}))},pointerMove:function(t){if(this.dragging){var i=t.pageX||t.originalEvent.touches&&t.originalEvent.touches[0].pageX;this.coords.x_pointer=i-this.coords.x_gap,this.calc()}},pointerUp:function(t){this.current_plugin===this.plugin_count&&this.is_active&&(this.is_active=!1,this.$cache.cont.find(".state_hover").removeClass("state_hover"),this.force_redraw=!0,e&&a("*").prop("unselectable",!1),this.updateScene(),this.restoreOriginalMinInterval(),(a.contains(this.$cache.cont[0],t.target)||this.dragging)&&this.callOnFinish(),this.dragging=!1)},pointerDown:function(t,i){i.preventDefault();var s=i.pageX||i.originalEvent.touches&&i.originalEvent.touches[0].pageX;2!==i.button&&("both"===t&&this.setTempMinInterval(),t||(t=this.target||"from"),this.current_plugin=this.plugin_count,this.target=t,this.is_active=!0,this.dragging=!0,this.coords.x_gap=this.$cache.rs.offset().left,this.coords.x_pointer=s-this.coords.x_gap,this.calcPointerPercent(),this.changeLevel(t),e&&a("*").prop("unselectable",!0),this.$cache.line.trigger("focus"),this.updateScene())},pointerClick:function(t,i){i.preventDefault();var s=i.pageX||i.originalEvent.touches&&i.originalEvent.touches[0].pageX;2!==i.button&&(this.current_plugin=this.plugin_count,this.target=t,this.is_click=!0,this.coords.x_gap=this.$cache.rs.offset().left,this.coords.x_pointer=+(s-this.coords.x_gap).toFixed(),this.force_redraw=!0,this.calc(),this.$cache.line.trigger("focus"))},key:function(t,i){if(!(this.current_plugin!==this.plugin_count||i.altKey||i.ctrlKey||i.shiftKey||i.metaKey)){switch(i.which){case 83:case 65:case 40:case 37:i.preventDefault(),this.moveByKey(!1);break;case 87:case 68:case 38:case 39:i.preventDefault(),this.moveByKey(!0)}return!0}},moveByKey:function(t){var i=this.coords.p_pointer,s=(this.options.max-this.options.min)/100;s=this.options.step/s,t?i+=s:i-=s,this.coords.x_pointer=this.toFixed(this.coords.w_rs/100*i),this.is_key=!0,this.calc()},setMinMax:function(){if(this.options){if(this.options.hide_min_max)return this.$cache.min[0].style.display="none",void(this.$cache.max[0].style.display="none");if(this.options.values.length)this.$cache.min.html(this.decorate(this.options.p_values[this.options.min])),this.$cache.max.html(this.decorate(this.options.p_values[this.options.max]));else{var t=this._prettify(this.options.min),i=this._prettify(this.options.max);this.result.min_pretty=t,this.result.max_pretty=i,this.$cache.min.html(this.decorate(t,this.options.min)),this.$cache.max.html(this.decorate(i,this.options.max))}this.labels.w_min=this.$cache.min.outerWidth(!1),this.labels.w_max=this.$cache.max.outerWidth(!1)}},setTempMinInterval:function(){var t=this.result.to-this.result.from;null===this.old_min_interval&&(this.old_min_interval=this.options.min_interval),this.options.min_interval=t},restoreOriginalMinInterval:function(){null!==this.old_min_interval&&(this.options.min_interval=this.old_min_interval,this.old_min_interval=null)},calc:function(t){if(this.options&&(this.calc_count++,(10===this.calc_count||t)&&(this.calc_count=0,this.coords.w_rs=this.$cache.rs.outerWidth(!1),this.calcHandlePercent()),this.coords.w_rs)){this.calcPointerPercent();var i=this.getHandleX();switch("both"===this.target&&(this.coords.p_gap=0,i=this.getHandleX()),"click"===this.target&&(this.coords.p_gap=this.coords.p_handle/2,i=this.getHandleX(),this.options.drag_interval?this.target="both_one":this.target=this.chooseHandle(i)),this.target){case"base":var s=(this.options.max-this.options.min)/100,o=(this.result.from-this.options.min)/s,e=(this.result.to-this.options.min)/s;this.coords.p_single_real=this.toFixed(o),this.coords.p_from_real=this.toFixed(o),this.coords.p_to_real=this.toFixed(e),this.coords.p_single_real=this.checkDiapason(this.coords.p_single_real,this.options.from_min,this.options.from_max),this.coords.p_from_real=this.checkDiapason(this.coords.p_from_real,this.options.from_min,this.options.from_max),this.coords.p_to_real=this.checkDiapason(this.coords.p_to_real,this.options.to_min,this.options.to_max),this.coords.p_single_fake=this.convertToFakePercent(this.coords.p_single_real),this.coords.p_from_fake=this.convertToFakePercent(this.coords.p_from_real),this.coords.p_to_fake=this.convertToFakePercent(this.coords.p_to_real),this.target=null;break;case"single":if(this.options.from_fixed)break;this.coords.p_single_real=this.convertToRealPercent(i),this.coords.p_single_real=this.calcWithStep(this.coords.p_single_real),this.coords.p_single_real=this.checkDiapason(this.coords.p_single_real,this.options.from_min,this.options.from_max),this.coords.p_single_fake=this.convertToFakePercent(this.coords.p_single_real);break;case"from":if(this.options.from_fixed)break;this.coords.p_from_real=this.convertToRealPercent(i),this.coords.p_from_real=this.calcWithStep(this.coords.p_from_real),this.coords.p_from_real>this.coords.p_to_real&&(this.coords.p_from_real=this.coords.p_to_real),this.coords.p_from_real=this.checkDiapason(this.coords.p_from_real,this.options.from_min,this.options.from_max),this.coords.p_from_real=this.checkMinInterval(this.coords.p_from_real,this.coords.p_to_real,"from"),this.coords.p_from_real=this.checkMaxInterval(this.coords.p_from_real,this.coords.p_to_real,"from"),this.coords.p_from_fake=this.convertToFakePercent(this.coords.p_from_real);break;case"to":if(this.options.to_fixed)break;this.coords.p_to_real=this.convertToRealPercent(i),this.coords.p_to_real=this.calcWithStep(this.coords.p_to_real),this.coords.p_to_realthis.coords.w_rs&&(this.coords.x_pointer=this.coords.w_rs),this.coords.p_pointer=this.toFixed(this.coords.x_pointer/this.coords.w_rs*100)):this.coords.p_pointer=0},convertToRealPercent:function(t){return t/(100-this.coords.p_handle)*100},convertToFakePercent:function(t){return t/100*(100-this.coords.p_handle)},getHandleX:function(){var t=100-this.coords.p_handle,i=this.toFixed(this.coords.p_pointer-this.coords.p_gap);return i<0?i=0:t100-this.labels.p_max-1?this.$cache.max[0].style.visibility="hidden":this.$cache.max[0].style.visibility="visible";else{s=h?(this.options.decorate_both?(t=this.decorate(r[this.result.from]),t+=this.options.values_separator,t+=this.decorate(r[this.result.to])):t=this.decorate(r[this.result.from]+this.options.values_separator+r[this.result.to]),i=this.decorate(r[this.result.from]),this.decorate(r[this.result.to])):(o=this._prettify(this.result.from),e=this._prettify(this.result.to),this.options.decorate_both?(t=this.decorate(o,this.result.from),t+=this.options.values_separator,t+=this.decorate(e,this.result.to)):t=this.decorate(o+this.options.values_separator+e,this.result.to),i=this.decorate(o,this.result.from),this.decorate(e,this.result.to)),this.$cache.single.html(t),this.$cache.from.html(i),this.$cache.to.html(s),this.calcLabels();var n=Math.min(this.labels.p_single_left,this.labels.p_from_left),a=this.labels.p_single_left+this.labels.p_single_fake,c=this.labels.p_to_left+this.labels.p_to_fake,l=Math.max(a,c);this.labels.p_from_left+this.labels.p_from_fake>=this.labels.p_to_left?(this.$cache.from[0].style.visibility="hidden",this.$cache.to[0].style.visibility="hidden",this.$cache.single[0].style.visibility="visible",l=this.result.from===this.result.to?("from"===this.target?this.$cache.from[0].style.visibility="visible":"to"===this.target?this.$cache.to[0].style.visibility="visible":this.target||(this.$cache.from[0].style.visibility="visible"),this.$cache.single[0].style.visibility="hidden",c):(this.$cache.from[0].style.visibility="hidden",this.$cache.to[0].style.visibility="hidden",this.$cache.single[0].style.visibility="visible",Math.max(a,c))):(this.$cache.from[0].style.visibility="visible",this.$cache.to[0].style.visibility="visible",this.$cache.single[0].style.visibility="hidden"),n100-this.labels.p_max-1?this.$cache.max[0].style.visibility="hidden":this.$cache.max[0].style.visibility="visible"}}},drawShadow:function(){var t,i,s,o,e=this.options,h=this.$cache,r="number"==typeof e.from_min&&!isNaN(e.from_min),n="number"==typeof e.from_max&&!isNaN(e.from_max),a="number"==typeof e.to_min&&!isNaN(e.to_min),c="number"==typeof e.to_max&&!isNaN(e.to_max);"single"===e.type?e.from_shadow&&(r||n)?(t=this.convertToPercent(r?e.from_min:e.min),i=this.convertToPercent(n?e.from_max:e.max)-t,t=this.toFixed(t-this.coords.p_handle/100*t),i=this.toFixed(i-this.coords.p_handle/100*i),t+=this.coords.p_handle/2,h.shad_single[0].style.display="block",h.shad_single[0].style.left=t+"%",h.shad_single[0].style.width=i+"%"):h.shad_single[0].style.display="none":(e.from_shadow&&(r||n)?(t=this.convertToPercent(r?e.from_min:e.min),i=this.convertToPercent(n?e.from_max:e.max)-t,t=this.toFixed(t-this.coords.p_handle/100*t),i=this.toFixed(i-this.coords.p_handle/100*i),t+=this.coords.p_handle/2,h.shad_from[0].style.display="block",h.shad_from[0].style.left=t+"%",h.shad_from[0].style.width=i+"%"):h.shad_from[0].style.display="none",e.to_shadow&&(a||c)?(s=this.convertToPercent(a?e.to_min:e.min),o=this.convertToPercent(c?e.to_max:e.max)-s,s=this.toFixed(s-this.coords.p_handle/100*s),o=this.toFixed(o-this.coords.p_handle/100*o),s+=this.coords.p_handle/2,h.shad_to[0].style.display="block",h.shad_to[0].style.left=s+"%",h.shad_to[0].style.width=o+"%"):h.shad_to[0].style.display="none")},writeToInput:function(){"single"===this.options.type?(this.options.values.length?this.$cache.input.prop("value",this.result.from_value):this.$cache.input.prop("value",this.result.from),this.$cache.input.data("from",this.result.from)):(this.options.values.length?this.$cache.input.prop("value",this.result.from_value+this.options.input_values_separator+this.result.to_value):this.$cache.input.prop("value",this.result.from+this.options.input_values_separator+this.result.to),this.$cache.input.data("from",this.result.from),this.$cache.input.data("to",this.result.to))},callOnStart:function(){this.writeToInput(),this.options.onStart&&"function"==typeof this.options.onStart&&(this.options.scope?this.options.onStart.call(this.options.scope,this.result):this.options.onStart(this.result))},callOnChange:function(){this.writeToInput(),this.options.onChange&&"function"==typeof this.options.onChange&&(this.options.scope?this.options.onChange.call(this.options.scope,this.result):this.options.onChange(this.result))},callOnFinish:function(){this.writeToInput(),this.options.onFinish&&"function"==typeof this.options.onFinish&&(this.options.scope?this.options.onFinish.call(this.options.scope,this.result):this.options.onFinish(this.result))},callOnUpdate:function(){this.writeToInput(),this.options.onUpdate&&"function"==typeof this.options.onUpdate&&(this.options.scope?this.options.onUpdate.call(this.options.scope,this.result):this.options.onUpdate(this.result))},toggleInput:function(){this.$cache.input.toggleClass("irs-hidden-input"),this.has_tab_index?this.$cache.input.prop("tabindex",-1):this.$cache.input.removeProp("tabindex"),this.has_tab_index=!this.has_tab_index},convertToPercent:function(t,i){var s,o=this.options.max-this.options.min,e=o/100;return o?(s=(i?t:t-this.options.min)/e,this.toFixed(s)):(this.no_diapason=!0,0)},convertToValue:function(t){var i,s,o=this.options.min,e=this.options.max,h=o.toString().split(".")[1],r=e.toString().split(".")[1],n=0,a=0;if(0===t)return this.options.min;if(100===t)return this.options.max;h&&(n=i=h.length),r&&(n=s=r.length),i&&s&&(n=s<=i?i:s),o<0&&(o=+(o+(a=Math.abs(o))).toFixed(n),e=+(e+a).toFixed(n));var c,l=(e-o)/100*t+o,_=this.options.step.toString().split(".")[1];return l=_?+l.toFixed(_.length):(l/=this.options.step,+(l*=this.options.step).toFixed(0)),a&&(l-=a),(c=_?+l.toFixed(_.length):this.toFixed(l))this.options.max&&(c=this.options.max),c},calcWithStep:function(t){var i=Math.round(t/this.coords.p_step)*this.coords.p_step;return 100h.max_interval&&(o=e-h.max_interval):o-e>h.max_interval&&(o=e+h.max_interval),this.convertToPercent(o)):t},checkDiapason:function(t,i,s){var o=this.convertToValue(t),e=this.options;return"number"!=typeof i&&(i=e.min),"number"!=typeof s&&(s=e.max),os.max&&(s.from=s.max)):(s.froms.max&&(s.from=s.max),s.tos.max&&(s.to=s.max),this.update_check.from&&(this.update_check.from!==s.from&&s.from>s.to&&(s.from=s.to),this.update_check.to!==s.to&&s.tos.to&&(s.from=s.to),s.tos.from_max&&(s.from=s.from_max),"number"==typeof s.to_min&&s.tos.to_max&&(s.to=s.to_max),o&&(o.min!==s.min&&(o.min=s.min),o.max!==s.max&&(o.max=s.max),(o.fromo.max)&&(o.from=s.from),(o.too.max)&&(o.to=s.to)),("number"!=typeof s.min_interval||isNaN(s.min_interval)||!s.min_interval||s.min_interval<0)&&(s.min_interval=0),("number"!=typeof s.max_interval||isNaN(s.max_interval)||!s.max_interval||s.max_interval<0)&&(s.max_interval=0),s.min_interval&&s.min_interval>s.max-s.min&&(s.min_interval=s.max-s.min),s.max_interval&&s.max_interval>s.max-s.min&&(s.max_interval=s.max-s.min)},decorate:function(t,i){var s="",o=this.options;return o.prefix&&(s+=o.prefix),s+=t,o.max_postfix&&(o.values.length&&t===o.p_values[o.max]?(s+=o.max_postfix,o.postfix&&(s+=" ")):i===o.max&&(s+=o.max_postfix,o.postfix&&(s+=" "))),o.postfix&&(s+=o.postfix),s},updateFrom:function(){this.result.from=this.options.from,this.result.from_percent=this.convertToPercent(this.result.from),this.result.from_pretty=this._prettify(this.result.from),this.options.values&&(this.result.from_value=this.options.values[this.result.from])},updateTo:function(){this.result.to=this.options.to,this.result.to_percent=this.convertToPercent(this.result.to),this.result.to_pretty=this._prettify(this.result.to),this.options.values&&(this.result.to_value=this.options.values[this.result.to])},updateResult:function(){this.result.min=this.options.min,this.result.max=this.options.max,this.updateFrom(),this.updateTo()},appendGrid:function(){if(this.options.grid){var t,i,s,o,e,h,r=this.options,n=r.max-r.min,a=r.grid_num,c=0,l=4,_="";for(this.calcGridMargin(),r.grid_snap&&(a=n/r.step),50';_+='',h=this.convertToValue(c),_+=''+(h=r.values.length?r.p_values[h]:this._prettify(h))+""}this.coords.big_num=Math.ceil(a+1),this.$cache.cont.addClass("irs-with-grid"),this.$cache.grid.html(_),this.cacheGridLabels()}},cacheGridLabels:function(){var t,i,s=this.coords.big_num;for(i=0;i100+this.coords.grid_gap&&(o[e-1]=100+this.coords.grid_gap,s[e-1]=this.toFixed(o[e-1]-this.coords.big_p[e-1]),this.coords.big_x[e-1]=this.toFixed(this.coords.big_p[e-1]-this.coords.grid_gap))),0 Date: Wed, 24 Apr 2019 11:46:21 +0800 Subject: [PATCH 6/6] update version --- bower.json | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/bower.json b/bower.json index 4499421..95d9d54 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "ion-rangeslider", - "version": "2.3.0", + "version": "2.3.1", "homepage": "https://github.com/IonDen/ion.rangeSlider", "authors": [ { diff --git a/package.json b/package.json index b50358e..8974371 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ion-rangeslider", - "version": "2.3.0", + "version": "2.3.1", "description": "Cool, comfortable and easily customizable range slider with many options and skin support", "homepage": "http://ionden.com/a/plugins/ion.rangeSlider/en.html", "author": {