nouislider
Advanced tools
Comparing version 8.1.0 to 8.2.0
@@ -1,2 +0,2 @@ | ||
/*! nouislider - 8.1.0 - 2015-10-25 16:05:43 */ | ||
/*! nouislider - 8.2.0 - 2015-11-29 15:32:31 */ | ||
@@ -135,2 +135,7 @@ (function (factory) { | ||
// Shorthand for stopPropagation so we don't have to create a dynamic method | ||
function stopPropagation ( e ) { | ||
e.stopPropagation(); | ||
} | ||
// todo | ||
@@ -476,2 +481,7 @@ function addCssPrefix(cssPrefix) { | ||
// Catch equal start or end. | ||
if ( entry.min === entry.max ) { | ||
throw new Error("noUiSlider: 'range' 'min' and 'max' cannot be equal."); | ||
} | ||
parsed.spectrum = new Spectrum(entry, parsed.snap, parsed.dir, parsed.singleStep); | ||
@@ -605,3 +615,4 @@ } | ||
fixed = entry.indexOf('fixed') >= 0, | ||
snap = entry.indexOf('snap') >= 0; | ||
snap = entry.indexOf('snap') >= 0, | ||
hover = entry.indexOf('hover') >= 0; | ||
@@ -617,3 +628,4 @@ // Fix #472 | ||
fixed: fixed, | ||
snap: snap | ||
snap: snap, | ||
hover: hover | ||
}; | ||
@@ -624,15 +636,29 @@ } | ||
var i; | ||
if ( entry === true ) { | ||
parsed.tooltips = true; | ||
} | ||
if ( entry && entry.format ) { | ||
parsed.tooltips = []; | ||
if ( typeof entry.format !== 'function' ) { | ||
throw new Error("noUiSlider: 'tooltips.format' must be an object."); | ||
for ( i = 0; i < parsed.handles; i++ ) { | ||
parsed.tooltips.push(false); | ||
} | ||
parsed.tooltips = { | ||
format: entry.format | ||
}; | ||
} else { | ||
parsed.tooltips = asArray(entry); | ||
if ( parsed.dir ) { | ||
parsed.tooltips.reverse(); | ||
} | ||
if ( parsed.tooltips.length !== parsed.handles ) { | ||
throw new Error("noUiSlider: must pass a formatter for all handles."); | ||
} | ||
parsed.tooltips.forEach(function(formatter){ | ||
if ( formatter !== false && (typeof formatter !== 'object' || typeof formatter.to !== 'function') ) { | ||
throw new Error("noUiSlider: 'tooltips' must be passed a formatter or 'false'."); | ||
} | ||
}); | ||
} | ||
@@ -665,2 +691,6 @@ } | ||
// To prove a fix for #537, freeze options here. | ||
// If the object is modified, an error will be thrown. | ||
// Object.freeze(options); | ||
var parsed = { | ||
@@ -698,9 +728,2 @@ margin: 0, | ||
// Set defaults where applicable. | ||
Object.keys(defaults).forEach(function ( name ) { | ||
if ( options[name] === undefined ) { | ||
options[name] = defaults[name]; | ||
} | ||
}); | ||
// Run all options through a testing mechanism to ensure correct | ||
@@ -711,8 +734,6 @@ // input. It should be noted that options might get modified to | ||
var test = tests[name]; | ||
// If the option isn't set, but it is required, throw an error. | ||
if ( options[name] === undefined ) { | ||
if ( options[name] === undefined && defaults[name] === undefined ) { | ||
if ( test.r ) { | ||
if ( tests[name].r ) { | ||
throw new Error("noUiSlider: '" + name + "' is required."); | ||
@@ -724,3 +745,3 @@ } | ||
test.t( parsed, options[name] ); | ||
tests[name].t( parsed, options[name] === undefined ? defaults[name] : options[name] ); | ||
}); | ||
@@ -747,3 +768,4 @@ | ||
scope_Values = [], | ||
scope_Events = {}; | ||
scope_Events = {}, | ||
scope_Self; | ||
@@ -770,2 +792,6 @@ var cssClasses = [ | ||
/* 18 */ ,'tooltip' | ||
/* 19 */ ,'' | ||
/* 20 */ ,'pips' | ||
/* 21 */ ,'marker' | ||
/* 22 */ ,'value' | ||
].map(addCssPrefix(options.cssPrefix || defaultCssPrefix)); | ||
@@ -908,6 +934,2 @@ | ||
function defaultFormatTooltipValue ( formattedValue ) { | ||
return formattedValue; | ||
} | ||
function addTooltip ( handle ) { | ||
@@ -920,9 +942,12 @@ var element = document.createElement('div'); | ||
// The tooltips option is a shorthand for using the 'update' event. | ||
function tooltips ( tooltipsOptions ) { | ||
function tooltips ( ) { | ||
var formatTooltipValue = tooltipsOptions.format ? tooltipsOptions.format : defaultFormatTooltipValue, | ||
tips = scope_Handles.map(addTooltip); | ||
var tips = scope_Handles.map(addTooltip); | ||
if ( options.dir ) { | ||
tips.reverse(); | ||
} | ||
bindEvent('update', function(formattedValues, handleId, rawValues) { | ||
tips[handleId].innerHTML = formatTooltipValue(formattedValues[handleId], rawValues[handleId]); | ||
bindEvent('update', function(f, o, r) { | ||
tips[o].innerHTML = options.tooltips[o] ? options.tooltips[o].to(r[o]) : f[o]; | ||
}); | ||
@@ -1098,4 +1123,4 @@ } | ||
addClass(element, 'noUi-pips'); | ||
addClass(element, 'noUi-pips-' + style); | ||
addClass(element, cssClasses[20]); | ||
addClass(element, cssClasses[20] + '-' + style); | ||
@@ -1123,7 +1148,7 @@ function getSize( type ){ | ||
// Add a marker for every point | ||
element.innerHTML += '<div ' + getTags(offset, 'noUi-marker', values) + '></div>'; | ||
element.innerHTML += '<div ' + getTags(offset, cssClasses[21], values) + '></div>'; | ||
// Values are only appended for points marked '1' or '2'. | ||
if ( values[1] ) { | ||
element.innerHTML += '<div '+getTags(offset, 'noUi-value', values)+'>' + formatter.to(values[0]) + '</div>'; | ||
element.innerHTML += '<div '+getTags(offset, cssClasses[22], values)+'>' + formatter.to(values[0]) + '</div>'; | ||
} | ||
@@ -1167,3 +1192,3 @@ } | ||
// External event handling | ||
function fireEvent ( event, handleNumber ) { | ||
function fireEvent ( event, handleNumber, tap ) { | ||
@@ -1182,3 +1207,3 @@ if ( handleNumber !== undefined && options.handles !== 1 ) { | ||
// Return values as array, so arg_1[arg_2] is always valid. | ||
callback( asArray(valueGet()), handleNumber, inSliderOrder(Array.prototype.slice.call(scope_Values)) ); | ||
callback.call(scope_Self, asArray(valueGet()), handleNumber, asArray(inSliderOrder(Array.prototype.slice.call(scope_Values))), tap || false); | ||
}); | ||
@@ -1229,2 +1254,7 @@ } | ||
// Ignore right or middle clicks on start #454 | ||
if ( data.hover && e.buttons ) { | ||
return false; | ||
} | ||
e.calcPoint = e.points[ options.ort ]; | ||
@@ -1250,6 +1280,7 @@ | ||
// Fix #498 | ||
// Check value of .buttons in 'start' to work around a bug in IE10 mobile. | ||
// Check value of .buttons in 'start' to work around a bug in IE10 mobile (data.buttonsProperty). | ||
// https://connect.microsoft.com/IE/feedback/details/927005/mobile-ie10-windows-phone-buttons-property-of-pointermove-event-always-zero | ||
// IE9 has .buttons zero on mousemove. | ||
if ( event.buttons === 0 && event.which === 0 && data.buttonsProperty !== 0 ) { | ||
// IE9 has .buttons and .which zero on mousemove. | ||
// Firefox breaks the spec MDN defines. | ||
if ( navigator.appVersion.indexOf("MSIE 9") === -1 && event.buttons === 0 && data.buttonsProperty !== 0 ) { | ||
return end(event, data); | ||
@@ -1313,4 +1344,16 @@ } | ||
fireEvent('change', handleNumber); | ||
// If this is a standard handle movement, fire the end event. | ||
if ( data.handleNumber !== undefined ) { | ||
fireEvent('end', data.handleNumber); | ||
} | ||
} | ||
// Fire 'end' when a mouse or pen leaves the document. | ||
function documentLeave ( event, data ) { | ||
if ( event.type === "mouseout" && event.target.nodeName === "HTML" && event.relatedTarget === null ){ | ||
end ( event, data ); | ||
} | ||
} | ||
// Bind move events on document. | ||
@@ -1331,2 +1374,5 @@ function start ( event, data ) { | ||
// Fix #551, where a handle gets selected instead of dragged. | ||
event.preventDefault(); | ||
// A drag should never propagate up to the 'tap' event. | ||
@@ -1341,2 +1387,3 @@ event.stopPropagation(); | ||
handles: data.handles, | ||
handleNumber: data.handleNumber, | ||
buttonsProperty: event.buttons, | ||
@@ -1348,7 +1395,13 @@ positions: [ | ||
}), endEvent = attach(actions.end, d, end, { | ||
handles: data.handles | ||
handles: data.handles, | ||
handleNumber: data.handleNumber | ||
}); | ||
d.noUiListeners = moveEvent.concat(endEvent); | ||
var outEvent = attach("mouseout", d, documentLeave, { | ||
handles: data.handles, | ||
handleNumber: data.handleNumber | ||
}); | ||
d.noUiListeners = moveEvent.concat(endEvent, outEvent); | ||
// Text selection isn't an issue on touch devices, | ||
@@ -1375,2 +1428,6 @@ // so adding cursor styles can be skipped. | ||
} | ||
if ( data.handleNumber !== undefined ) { | ||
fireEvent('start', data.handleNumber); | ||
} | ||
} | ||
@@ -1414,5 +1471,5 @@ | ||
fireEvent('slide', handleNumber); | ||
fireEvent('set', handleNumber); | ||
fireEvent('change', handleNumber); | ||
fireEvent('slide', handleNumber, true); | ||
fireEvent('set', handleNumber, true); | ||
fireEvent('change', handleNumber, true); | ||
@@ -1424,2 +1481,18 @@ if ( options.events.snap ) { | ||
// Fires a 'hover' event for a hovered mouse/pen position. | ||
function hover ( event ) { | ||
var location = event.calcPoint - offset(scope_Base)[ options.style ], | ||
to = scope_Spectrum.getStep(( location * 100 ) / baseSize()), | ||
value = scope_Spectrum.fromStepping( to ); | ||
Object.keys(scope_Events).forEach(function( targetEvent ) { | ||
if ( 'hover' === targetEvent.split('.')[0] ) { | ||
scope_Events[targetEvent].forEach(function( callback ) { | ||
callback.call( scope_Self, value ); | ||
}); | ||
} | ||
}); | ||
} | ||
// Attach events to several slider parts. | ||
@@ -1438,3 +1511,4 @@ function events ( behaviour ) { | ||
attach ( actions.start, scope_Handles[i].children[0], start, { | ||
handles: [ scope_Handles[i] ] | ||
handles: [ scope_Handles[i] ], | ||
handleNumber: i | ||
}); | ||
@@ -1452,2 +1526,12 @@ } | ||
// Fire hover events | ||
if ( behaviour.hover ) { | ||
attach ( actions.move, scope_Base, hover, { hover: true } ); | ||
for ( i = 0; i < scope_Handles.length; i += 1 ) { | ||
['mousemove MSPointerMove pointermove'].forEach(function( eventName ){ | ||
scope_Handles[i].children[0].addEventListener(eventName, stopPropagation, false); | ||
}); | ||
} | ||
} | ||
// Make the range draggable. | ||
@@ -1483,4 +1567,3 @@ if ( behaviour.drag ){ | ||
lowerLimit = scope_Locations[0] + options.limit, | ||
upperLimit = scope_Locations[1] - options.limit, | ||
newScopeValue = scope_Spectrum.fromStepping( to ); | ||
upperLimit = scope_Locations[1] - options.limit; | ||
@@ -1509,4 +1592,4 @@ // For sliders with multiple handles, | ||
// Return false if handle can't move and ranges were not updated | ||
if ( to === scope_Locations[trigger] && newScopeValue === scope_Values[trigger]) { | ||
// Return false if handle can't move | ||
if ( to === scope_Locations[trigger] ) { | ||
return false; | ||
@@ -1706,3 +1789,33 @@ } | ||
// Updateable: margin, limit, step, range, animate, snap | ||
function updateOptions ( optionsToUpdate ) { | ||
var v = valueGet(), i, newOptions = testOptions({ | ||
start: [0, 0], | ||
margin: optionsToUpdate.margin, | ||
limit: optionsToUpdate.limit, | ||
step: optionsToUpdate.step, | ||
range: optionsToUpdate.range, | ||
animate: optionsToUpdate.animate, | ||
snap: optionsToUpdate.snap === undefined ? options.snap : optionsToUpdate.snap | ||
}); | ||
['margin', 'limit', 'step', 'range', 'animate'].forEach(function(name){ | ||
if ( optionsToUpdate[name] !== undefined ) { | ||
options[name] = optionsToUpdate[name]; | ||
} | ||
}); | ||
scope_Spectrum = newOptions.spectrum; | ||
// Invalidate the current positioning so valueSet forces an update. | ||
scope_Locations = [-1, -1]; | ||
valueSet(v); | ||
for ( i = 0; i < scope_Handles.length; i++ ) { | ||
fireEvent('update', i); | ||
} | ||
} | ||
// Throw an error if the slider was already initialized. | ||
@@ -1713,3 +1826,2 @@ if ( scope_Target.noUiSlider ) { | ||
// Create the base element, initialise HTML and set classes. | ||
@@ -1723,5 +1835,2 @@ // Add handles and links. | ||
// Attach user events. | ||
events( options.events ); | ||
if ( options.pips ) { | ||
@@ -1732,32 +1841,6 @@ pips(options.pips); | ||
if ( options.tooltips ) { | ||
tooltips(options.tooltips); | ||
tooltips(); | ||
} | ||
// can be updated: | ||
// margin | ||
// limit | ||
// step | ||
// range | ||
// animate | ||
function updateOptions ( optionsToUpdate ) { | ||
var newOptions = testOptions({ | ||
start: [0, 0], | ||
margin: optionsToUpdate.margin, | ||
limit: optionsToUpdate.limit, | ||
step: optionsToUpdate.step, | ||
range: optionsToUpdate.range, | ||
animate: optionsToUpdate.animate | ||
}); | ||
options.margin = newOptions.margin; | ||
options.limit = newOptions.limit; | ||
options.step = newOptions.step; | ||
options.range = newOptions.range; | ||
options.animate = newOptions.animate; | ||
scope_Spectrum = newOptions.spectrum; | ||
} | ||
return { | ||
scope_Self = { | ||
destroy: destroy, | ||
@@ -1772,2 +1855,7 @@ steps: getCurrentStep, | ||
// Attach user events. | ||
events( options.events ); | ||
return scope_Self; | ||
} | ||
@@ -1774,0 +1862,0 @@ |
@@ -1,3 +0,3 @@ | ||
/*! nouislider - 8.1.0 - 2015-10-25 16:05:43 */ | ||
/*! nouislider - 8.2.0 - 2015-11-29 15:32:31 */ | ||
!function(a){"function"==typeof define&&define.amd?define([],a):"object"==typeof exports?module.exports=a():window.noUiSlider=a()}(function(){"use strict";function a(a){return a.filter(function(a){return this[a]?!1:this[a]=!0},{})}function b(a,b){return Math.round(a/b)*b}function c(a){var b=a.getBoundingClientRect(),c=a.ownerDocument,d=c.documentElement,e=m();return/webkit.*Chrome.*Mobile/i.test(navigator.userAgent)&&(e.x=0),{top:b.top+e.y-d.clientTop,left:b.left+e.x-d.clientLeft}}function d(a){return"number"==typeof a&&!isNaN(a)&&isFinite(a)}function e(a){var b=Math.pow(10,7);return Number((Math.round(a*b)/b).toFixed(7))}function f(a,b,c){j(a,b),setTimeout(function(){k(a,b)},c)}function g(a){return Math.max(Math.min(a,100),0)}function h(a){return Array.isArray(a)?a:[a]}function i(a){var b=a.split(".");return b.length>1?b[1].length:0}function j(a,b){a.classList?a.classList.add(b):a.className+=" "+b}function k(a,b){a.classList?a.classList.remove(b):a.className=a.className.replace(new RegExp("(^|\\b)"+b.split(" ").join("|")+"(\\b|$)","gi")," ")}function l(a,b){a.classList?a.classList.contains(b):new RegExp("(^| )"+b+"( |$)","gi").test(a.className)}function m(){var a=void 0!==window.pageXOffset,b="CSS1Compat"===(document.compatMode||""),c=a?window.pageXOffset:b?document.documentElement.scrollLeft:document.body.scrollLeft,d=a?window.pageYOffset:b?document.documentElement.scrollTop:document.body.scrollTop;return{x:c,y:d}}function n(a){return function(b){return a+b}}function o(a,b){return 100/(b-a)}function p(a,b){return 100*b/(a[1]-a[0])}function q(a,b){return p(a,a[0]<0?b+Math.abs(a[0]):b-a[0])}function r(a,b){return b*(a[1]-a[0])/100+a[0]}function s(a,b){for(var c=1;a>=b[c];)c+=1;return c}function t(a,b,c){if(c>=a.slice(-1)[0])return 100;var d,e,f,g,h=s(c,a);return d=a[h-1],e=a[h],f=b[h-1],g=b[h],f+q([d,e],c)/o(f,g)}function u(a,b,c){if(c>=100)return a.slice(-1)[0];var d,e,f,g,h=s(c,b);return d=a[h-1],e=a[h],f=b[h-1],g=b[h],r([d,e],(c-f)*o(f,g))}function v(a,c,d,e){if(100===e)return e;var f,g,h=s(e,a);return d?(f=a[h-1],g=a[h],e-f>(g-f)/2?g:f):c[h-1]?a[h-1]+b(e-a[h-1],c[h-1]):e}function w(a,b,c){var e;if("number"==typeof b&&(b=[b]),"[object Array]"!==Object.prototype.toString.call(b))throw new Error("noUiSlider: 'range' contains invalid value.");if(e="min"===a?0:"max"===a?100:parseFloat(a),!d(e)||!d(b[0]))throw new Error("noUiSlider: 'range' value isn't numeric.");c.xPct.push(e),c.xVal.push(b[0]),e?c.xSteps.push(isNaN(b[1])?!1:b[1]):isNaN(b[1])||(c.xSteps[0]=b[1])}function x(a,b,c){return b?void(c.xSteps[a]=p([c.xVal[a],c.xVal[a+1]],b)/o(c.xPct[a],c.xPct[a+1])):!0}function y(a,b,c,d){this.xPct=[],this.xVal=[],this.xSteps=[d||!1],this.xNumSteps=[!1],this.snap=b,this.direction=c;var e,f=[];for(e in a)a.hasOwnProperty(e)&&f.push([a[e],e]);for(f.length&&"object"==typeof f[0][0]?f.sort(function(a,b){return a[0][0]-b[0][0]}):f.sort(function(a,b){return a[0]-b[0]}),e=0;e<f.length;e++)w(f[e][1],f[e][0],this);for(this.xNumSteps=this.xSteps.slice(0),e=0;e<this.xNumSteps.length;e++)x(e,this.xNumSteps[e],this)}function z(a,b){if(!d(b))throw new Error("noUiSlider: 'step' is not numeric.");a.singleStep=b}function A(a,b){if("object"!=typeof b||Array.isArray(b))throw new Error("noUiSlider: 'range' is not an object.");if(void 0===b.min||void 0===b.max)throw new Error("noUiSlider: Missing 'min' or 'max' in 'range'.");a.spectrum=new y(b,a.snap,a.dir,a.singleStep)}function B(a,b){if(b=h(b),!Array.isArray(b)||!b.length||b.length>2)throw new Error("noUiSlider: 'start' option is incorrect.");a.handles=b.length,a.start=b}function C(a,b){if(a.snap=b,"boolean"!=typeof b)throw new Error("noUiSlider: 'snap' option must be a boolean.")}function D(a,b){if(a.animate=b,"boolean"!=typeof b)throw new Error("noUiSlider: 'animate' option must be a boolean.")}function E(a,b){if("lower"===b&&1===a.handles)a.connect=1;else if("upper"===b&&1===a.handles)a.connect=2;else if(b===!0&&2===a.handles)a.connect=3;else{if(b!==!1)throw new Error("noUiSlider: 'connect' option doesn't match handle count.");a.connect=0}}function F(a,b){switch(b){case"horizontal":a.ort=0;break;case"vertical":a.ort=1;break;default:throw new Error("noUiSlider: 'orientation' option is invalid.")}}function G(a,b){if(!d(b))throw new Error("noUiSlider: 'margin' option must be numeric.");if(a.margin=a.spectrum.getMargin(b),!a.margin)throw new Error("noUiSlider: 'margin' option is only supported on linear sliders.")}function H(a,b){if(!d(b))throw new Error("noUiSlider: 'limit' option must be numeric.");if(a.limit=a.spectrum.getMargin(b),!a.limit)throw new Error("noUiSlider: 'limit' option is only supported on linear sliders.")}function I(a,b){switch(b){case"ltr":a.dir=0;break;case"rtl":a.dir=1,a.connect=[0,2,1,3][a.connect];break;default:throw new Error("noUiSlider: 'direction' option was not recognized.")}}function J(a,b){if("string"!=typeof b)throw new Error("noUiSlider: 'behaviour' must be a string containing options.");var c=b.indexOf("tap")>=0,d=b.indexOf("drag")>=0,e=b.indexOf("fixed")>=0,f=b.indexOf("snap")>=0;if(d&&!a.connect)throw new Error("noUiSlider: 'drag' behaviour must be used with 'connect': true.");a.events={tap:c||f,drag:d,fixed:e,snap:f}}function K(a,b){if(b===!0&&(a.tooltips=!0),b&&b.format){if("function"!=typeof b.format)throw new Error("noUiSlider: 'tooltips.format' must be an object.");a.tooltips={format:b.format}}}function L(a,b){if(a.format=b,"function"==typeof b.to&&"function"==typeof b.from)return!0;throw new Error("noUiSlider: 'format' requires 'to' and 'from' methods.")}function M(a,b){if(void 0!==b&&"string"!=typeof b)throw new Error("noUiSlider: 'cssPrefix' must be a string.");a.cssPrefix=b}function N(a){var b,c={margin:0,limit:0,animate:!0,format:S};b={step:{r:!1,t:z},start:{r:!0,t:B},connect:{r:!0,t:E},direction:{r:!0,t:I},snap:{r:!1,t:C},animate:{r:!1,t:D},range:{r:!0,t:A},orientation:{r:!1,t:F},margin:{r:!1,t:G},limit:{r:!1,t:H},behaviour:{r:!0,t:J},format:{r:!1,t:L},tooltips:{r:!1,t:K},cssPrefix:{r:!1,t:M}};var d={connect:!1,direction:"ltr",behaviour:"tap",orientation:"horizontal"};return Object.keys(d).forEach(function(b){void 0===a[b]&&(a[b]=d[b])}),Object.keys(b).forEach(function(d){var e=b[d];if(void 0===a[d]){if(e.r)throw new Error("noUiSlider: '"+d+"' is required.");return!0}e.t(c,a[d])}),c.pips=a.pips,c.style=c.ort?"top":"left",c}function O(b,d){function e(a,b,c){var d=a+b[0],e=a+b[1];return c?(0>d&&(e+=Math.abs(d)),e>100&&(d-=e-100),[g(d),g(e)]):[d,e]}function o(a,b){a.preventDefault();var c,d,e=0===a.type.indexOf("touch"),f=0===a.type.indexOf("mouse"),g=0===a.type.indexOf("pointer"),h=a;return 0===a.type.indexOf("MSPointer")&&(g=!0),e&&(c=a.changedTouches[0].pageX,d=a.changedTouches[0].pageY),b=b||m(),(f||g)&&(c=a.clientX+b.x,d=a.clientY+b.y),h.pageOffset=b,h.points=[c,d],h.cursor=f||g,h}function p(a,b){var c=document.createElement("div"),d=document.createElement("div"),e=["-lower","-upper"];return a&&e.reverse(),j(d,aa[3]),j(d,aa[3]+e[b]),j(c,aa[2]),c.appendChild(d),c}function q(a,b,c){switch(a){case 1:j(b,aa[7]),j(c[0],aa[6]);break;case 3:j(c[1],aa[6]);case 2:j(c[0],aa[7]);case 0:j(b,aa[6])}}function r(a,b,c){var d,e=[];for(d=0;a>d;d+=1)e.push(c.appendChild(p(b,d)));return e}function s(a,b,c){j(c,aa[0]),j(c,aa[8+a]),j(c,aa[4+b]);var d=document.createElement("div");return j(d,aa[1]),c.appendChild(d),d}function t(a){return a}function u(a){var b=document.createElement("div");return b.className=aa[18],a.firstChild.appendChild(b)}function v(a){var b=a.format?a.format:t,c=W.map(u);S("update",function(a,d,e){c[d].innerHTML=b(a[d],e[d])})}function w(a,b,c){if("range"===a||"steps"===a)return Z.xVal;if("count"===a){var d,e=100/(b-1),f=0;for(b=[];(d=f++*e)<=100;)b.push(d);a="positions"}return"positions"===a?b.map(function(a){return Z.fromStepping(c?Z.getStep(a):a)}):"values"===a?c?b.map(function(a){return Z.fromStepping(Z.getStep(Z.toStepping(a)))}):b:void 0}function x(b,c,d){function e(a,b){return(a+b).toFixed(7)/1}var f=Z.direction,g={},h=Z.xVal[0],i=Z.xVal[Z.xVal.length-1],j=!1,k=!1,l=0;return Z.direction=0,d=a(d.slice().sort(function(a,b){return a-b})),d[0]!==h&&(d.unshift(h),j=!0),d[d.length-1]!==i&&(d.push(i),k=!0),d.forEach(function(a,f){var h,i,m,n,o,p,q,r,s,t,u=a,v=d[f+1];if("steps"===c&&(h=Z.xNumSteps[f]),h||(h=v-u),u!==!1&&void 0!==v)for(i=u;v>=i;i=e(i,h)){for(n=Z.toStepping(i),o=n-l,r=o/b,s=Math.round(r),t=o/s,m=1;s>=m;m+=1)p=l+m*t,g[p.toFixed(5)]=["x",0];q=d.indexOf(i)>-1?1:"steps"===c?2:0,!f&&j&&(q=0),i===v&&k||(g[n.toFixed(5)]=[i,q]),l=n}}),Z.direction=f,g}function y(a,b,c){function e(a){return["-normal","-large","-sub"][a]}function f(a,b,c){return'class="'+b+" "+b+"-"+h+" "+b+e(c[1])+'" style="'+d.style+": "+a+'%"'}function g(a,d){Z.direction&&(a=100-a),d[1]=d[1]&&b?b(d[0],d[1]):d[1],i.innerHTML+="<div "+f(a,"noUi-marker",d)+"></div>",d[1]&&(i.innerHTML+="<div "+f(a,"noUi-value",d)+">"+c.to(d[0])+"</div>")}var h=["horizontal","vertical"][d.ort],i=document.createElement("div");return j(i,"noUi-pips"),j(i,"noUi-pips-"+h),Object.keys(a).forEach(function(b){g(b,a[b])}),i}function z(a){var b=a.mode,c=a.density||1,d=a.filter||!1,e=a.values||!1,f=a.stepped||!1,g=w(b,e,f),h=x(c,b,g),i=a.format||{to:Math.round};return X.appendChild(y(h,d,i))}function A(){return V["offset"+["Width","Height"][d.ort]]}function B(a,b){void 0!==b&&1!==d.handles&&(b=Math.abs(b-d.dir)),Object.keys(_).forEach(function(c){var d=c.split(".")[0];a===d&&_[c].forEach(function(a){a(h(M()),b,C(Array.prototype.slice.call($)))})})}function C(a){return 1===a.length?a[0]:d.dir?a.reverse():a}function D(a,b,c,e){var f=function(b){return X.hasAttribute("disabled")?!1:l(X,aa[14])?!1:(b=o(b,e.pageOffset),a===Q.start&&void 0!==b.buttons&&b.buttons>1?!1:(b.calcPoint=b.points[d.ort],void c(b,e)))},g=[];return a.split(" ").forEach(function(a){b.addEventListener(a,f,!1),g.push([a,f])}),g}function E(a,b){if(0===a.buttons&&0===a.which&&0!==b.buttonsProperty)return F(a,b);var c,d,f=b.handles||W,g=!1,h=100*(a.calcPoint-b.start)/b.baseSize,i=f[0]===W[0]?0:1;if(c=e(h,b.positions,f.length>1),g=J(f[0],c[i],1===f.length),f.length>1){if(g=J(f[1],c[i?0:1],!1)||g)for(d=0;d<b.handles.length;d++)B("slide",d)}else g&&B("slide",i)}function F(a,b){var c=V.querySelector("."+aa[15]),d=b.handles[0]===W[0]?0:1;null!==c&&k(c,aa[15]),a.cursor&&(document.body.style.cursor="",document.body.removeEventListener("selectstart",document.body.noUiListener));var e=document.documentElement;e.noUiListeners.forEach(function(a){e.removeEventListener(a[0],a[1])}),k(X,aa[12]),B("set",d),B("change",d)}function G(a,b){var c=document.documentElement;if(1===b.handles.length&&(j(b.handles[0].children[0],aa[15]),b.handles[0].hasAttribute("disabled")))return!1;a.stopPropagation();var d=D(Q.move,c,E,{start:a.calcPoint,baseSize:A(),pageOffset:a.pageOffset,handles:b.handles,buttonsProperty:a.buttons,positions:[Y[0],Y[W.length-1]]}),e=D(Q.end,c,F,{handles:b.handles});if(c.noUiListeners=d.concat(e),a.cursor){document.body.style.cursor=getComputedStyle(a.target).cursor,W.length>1&&j(X,aa[12]);var f=function(){return!1};document.body.noUiListener=f,document.body.addEventListener("selectstart",f,!1)}}function H(a){var b,e,g=a.calcPoint,h=0;return a.stopPropagation(),W.forEach(function(a){h+=c(a)[d.style]}),b=h/2>g||1===W.length?0:1,g-=c(V)[d.style],e=100*g/A(),d.events.snap||f(X,aa[14],300),W[b].hasAttribute("disabled")?!1:(J(W[b],e),B("slide",b),B("set",b),B("change",b),void(d.events.snap&&G(a,{handles:[W[b]]})))}function I(a){var b,c;if(!a.fixed)for(b=0;b<W.length;b+=1)D(Q.start,W[b].children[0],G,{handles:[W[b]]});a.tap&&D(Q.start,V,H,{handles:W}),a.drag&&(c=[V.querySelector("."+aa[7])],j(c[0],aa[10]),a.fixed&&c.push(W[c[0]===W[0]?1:0].children[0]),c.forEach(function(a){D(Q.start,a,G,{handles:W})}))}function J(a,b,c){var e=a!==W[0]?1:0,f=Y[0]+d.margin,h=Y[1]-d.margin,i=Y[0]+d.limit,l=Y[1]-d.limit,m=Z.fromStepping(b);return W.length>1&&(b=e?Math.max(b,f):Math.min(b,h)),c!==!1&&d.limit&&W.length>1&&(b=e?Math.min(b,i):Math.max(b,l)),b=Z.getStep(b),b=g(parseFloat(b.toFixed(7))),b===Y[e]&&m===$[e]?!1:(window.requestAnimationFrame?window.requestAnimationFrame(function(){a.style[d.style]=b+"%"}):a.style[d.style]=b+"%",a.previousSibling||(k(a,aa[17]),b>50&&j(a,aa[17])),Y[e]=b,$[e]=Z.fromStepping(b),B("update",e),!0)}function K(a,b){var c,e,f;for(d.limit&&(a+=1),c=0;a>c;c+=1)e=c%2,f=b[e],null!==f&&f!==!1&&("number"==typeof f&&(f=String(f)),f=d.format.from(f),(f===!1||isNaN(f)||J(W[e],Z.toStepping(f),c===3-d.dir)===!1)&&B("update",e))}function L(a){var b,c,e=h(a);for(d.dir&&d.handles>1&&e.reverse(),d.animate&&-1!==Y[0]&&f(X,aa[14],300),b=W.length>1?3:1,1===e.length&&(b=1),K(b,e),c=0;c<W.length;c++)B("set",c)}function M(){var a,b=[];for(a=0;a<d.handles;a+=1)b[a]=d.format.to($[a]);return C(b)}function O(){aa.forEach(function(a){a&&k(X,a)}),X.innerHTML="",delete X.noUiSlider}function P(){var a=Y.map(function(a,b){var c=Z.getApplicableStep(a),d=i(String(c[2])),e=$[b],f=100===a?null:c[2],g=Number((e-c[2]).toFixed(d)),h=0===a?null:g>=c[1]?c[2]:c[0]||!1;return[h,f]});return C(a)}function S(a,b){_[a]=_[a]||[],_[a].push(b),"update"===a.split(".")[0]&&W.forEach(function(a,b){B("update",b)})}function T(a){var b=a.split(".")[0],c=a.substring(b.length);Object.keys(_).forEach(function(a){var d=a.split(".")[0],e=a.substring(d.length);b&&b!==d||c&&c!==e||delete _[a]})}function U(a){var b=N({start:[0,0],margin:a.margin,limit:a.limit,step:a.step,range:a.range,animate:a.animate});d.margin=b.margin,d.limit=b.limit,d.step=b.step,d.range=b.range,d.animate=b.animate,Z=b.spectrum}var V,W,X=b,Y=[-1,-1],Z=d.spectrum,$=[],_={},aa=["target","base","origin","handle","horizontal","vertical","background","connect","ltr","rtl","draggable","","state-drag","","state-tap","active","","stacking","tooltip"].map(n(d.cssPrefix||R));if(X.noUiSlider)throw new Error("Slider was already initialized.");return V=s(d.dir,d.ort,X),W=r(d.handles,d.dir,V),q(d.connect,X,W),I(d.events),d.pips&&z(d.pips),d.tooltips&&v(d.tooltips),{destroy:O,steps:P,on:S,off:T,get:M,set:L,updateOptions:U}}function P(a,b){if(!a.nodeName)throw new Error("noUiSlider.create requires a single element.");var c=N(b,a),d=O(a,c);return d.set(c.start),a.noUiSlider=d,d}var Q=window.navigator.pointerEnabled?{start:"pointerdown",move:"pointermove",end:"pointerup"}:window.navigator.msPointerEnabled?{start:"MSPointerDown",move:"MSPointerMove",end:"MSPointerUp"}:{start:"mousedown touchstart",move:"mousemove touchmove",end:"mouseup touchend"},R="noUi-";y.prototype.getMargin=function(a){return 2===this.xPct.length?p(this.xVal,a):!1},y.prototype.toStepping=function(a){return a=t(this.xVal,this.xPct,a),this.direction&&(a=100-a),a},y.prototype.fromStepping=function(a){return this.direction&&(a=100-a),e(u(this.xVal,this.xPct,a))},y.prototype.getStep=function(a){return this.direction&&(a=100-a),a=v(this.xPct,this.xSteps,this.snap,a),this.direction&&(a=100-a),a},y.prototype.getApplicableStep=function(a){var b=s(a,this.xPct),c=100===a?2:1;return[this.xNumSteps[b-2],this.xVal[b-c],this.xNumSteps[b-c]]},y.prototype.convert=function(a){return this.getStep(this.toStepping(a))};var S={to:function(a){return void 0!==a&&a.toFixed(2)},from:Number};return{create:P}}); | ||
!function(a){"function"==typeof define&&define.amd?define([],a):"object"==typeof exports?module.exports=a():window.noUiSlider=a()}(function(){"use strict";function a(a){return a.filter(function(a){return this[a]?!1:this[a]=!0},{})}function b(a,b){return Math.round(a/b)*b}function c(a){var b=a.getBoundingClientRect(),c=a.ownerDocument,d=c.documentElement,e=m();return/webkit.*Chrome.*Mobile/i.test(navigator.userAgent)&&(e.x=0),{top:b.top+e.y-d.clientTop,left:b.left+e.x-d.clientLeft}}function d(a){return"number"==typeof a&&!isNaN(a)&&isFinite(a)}function e(a){var b=Math.pow(10,7);return Number((Math.round(a*b)/b).toFixed(7))}function f(a,b,c){j(a,b),setTimeout(function(){k(a,b)},c)}function g(a){return Math.max(Math.min(a,100),0)}function h(a){return Array.isArray(a)?a:[a]}function i(a){var b=a.split(".");return b.length>1?b[1].length:0}function j(a,b){a.classList?a.classList.add(b):a.className+=" "+b}function k(a,b){a.classList?a.classList.remove(b):a.className=a.className.replace(new RegExp("(^|\\b)"+b.split(" ").join("|")+"(\\b|$)","gi")," ")}function l(a,b){a.classList?a.classList.contains(b):new RegExp("(^| )"+b+"( |$)","gi").test(a.className)}function m(){var a=void 0!==window.pageXOffset,b="CSS1Compat"===(document.compatMode||""),c=a?window.pageXOffset:b?document.documentElement.scrollLeft:document.body.scrollLeft,d=a?window.pageYOffset:b?document.documentElement.scrollTop:document.body.scrollTop;return{x:c,y:d}}function n(a){a.stopPropagation()}function o(a){return function(b){return a+b}}function p(a,b){return 100/(b-a)}function q(a,b){return 100*b/(a[1]-a[0])}function r(a,b){return q(a,a[0]<0?b+Math.abs(a[0]):b-a[0])}function s(a,b){return b*(a[1]-a[0])/100+a[0]}function t(a,b){for(var c=1;a>=b[c];)c+=1;return c}function u(a,b,c){if(c>=a.slice(-1)[0])return 100;var d,e,f,g,h=t(c,a);return d=a[h-1],e=a[h],f=b[h-1],g=b[h],f+r([d,e],c)/p(f,g)}function v(a,b,c){if(c>=100)return a.slice(-1)[0];var d,e,f,g,h=t(c,b);return d=a[h-1],e=a[h],f=b[h-1],g=b[h],s([d,e],(c-f)*p(f,g))}function w(a,c,d,e){if(100===e)return e;var f,g,h=t(e,a);return d?(f=a[h-1],g=a[h],e-f>(g-f)/2?g:f):c[h-1]?a[h-1]+b(e-a[h-1],c[h-1]):e}function x(a,b,c){var e;if("number"==typeof b&&(b=[b]),"[object Array]"!==Object.prototype.toString.call(b))throw new Error("noUiSlider: 'range' contains invalid value.");if(e="min"===a?0:"max"===a?100:parseFloat(a),!d(e)||!d(b[0]))throw new Error("noUiSlider: 'range' value isn't numeric.");c.xPct.push(e),c.xVal.push(b[0]),e?c.xSteps.push(isNaN(b[1])?!1:b[1]):isNaN(b[1])||(c.xSteps[0]=b[1])}function y(a,b,c){return b?void(c.xSteps[a]=q([c.xVal[a],c.xVal[a+1]],b)/p(c.xPct[a],c.xPct[a+1])):!0}function z(a,b,c,d){this.xPct=[],this.xVal=[],this.xSteps=[d||!1],this.xNumSteps=[!1],this.snap=b,this.direction=c;var e,f=[];for(e in a)a.hasOwnProperty(e)&&f.push([a[e],e]);for(f.length&&"object"==typeof f[0][0]?f.sort(function(a,b){return a[0][0]-b[0][0]}):f.sort(function(a,b){return a[0]-b[0]}),e=0;e<f.length;e++)x(f[e][1],f[e][0],this);for(this.xNumSteps=this.xSteps.slice(0),e=0;e<this.xNumSteps.length;e++)y(e,this.xNumSteps[e],this)}function A(a,b){if(!d(b))throw new Error("noUiSlider: 'step' is not numeric.");a.singleStep=b}function B(a,b){if("object"!=typeof b||Array.isArray(b))throw new Error("noUiSlider: 'range' is not an object.");if(void 0===b.min||void 0===b.max)throw new Error("noUiSlider: Missing 'min' or 'max' in 'range'.");if(b.min===b.max)throw new Error("noUiSlider: 'range' 'min' and 'max' cannot be equal.");a.spectrum=new z(b,a.snap,a.dir,a.singleStep)}function C(a,b){if(b=h(b),!Array.isArray(b)||!b.length||b.length>2)throw new Error("noUiSlider: 'start' option is incorrect.");a.handles=b.length,a.start=b}function D(a,b){if(a.snap=b,"boolean"!=typeof b)throw new Error("noUiSlider: 'snap' option must be a boolean.")}function E(a,b){if(a.animate=b,"boolean"!=typeof b)throw new Error("noUiSlider: 'animate' option must be a boolean.")}function F(a,b){if("lower"===b&&1===a.handles)a.connect=1;else if("upper"===b&&1===a.handles)a.connect=2;else if(b===!0&&2===a.handles)a.connect=3;else{if(b!==!1)throw new Error("noUiSlider: 'connect' option doesn't match handle count.");a.connect=0}}function G(a,b){switch(b){case"horizontal":a.ort=0;break;case"vertical":a.ort=1;break;default:throw new Error("noUiSlider: 'orientation' option is invalid.")}}function H(a,b){if(!d(b))throw new Error("noUiSlider: 'margin' option must be numeric.");if(a.margin=a.spectrum.getMargin(b),!a.margin)throw new Error("noUiSlider: 'margin' option is only supported on linear sliders.")}function I(a,b){if(!d(b))throw new Error("noUiSlider: 'limit' option must be numeric.");if(a.limit=a.spectrum.getMargin(b),!a.limit)throw new Error("noUiSlider: 'limit' option is only supported on linear sliders.")}function J(a,b){switch(b){case"ltr":a.dir=0;break;case"rtl":a.dir=1,a.connect=[0,2,1,3][a.connect];break;default:throw new Error("noUiSlider: 'direction' option was not recognized.")}}function K(a,b){if("string"!=typeof b)throw new Error("noUiSlider: 'behaviour' must be a string containing options.");var c=b.indexOf("tap")>=0,d=b.indexOf("drag")>=0,e=b.indexOf("fixed")>=0,f=b.indexOf("snap")>=0,g=b.indexOf("hover")>=0;if(d&&!a.connect)throw new Error("noUiSlider: 'drag' behaviour must be used with 'connect': true.");a.events={tap:c||f,drag:d,fixed:e,snap:f,hover:g}}function L(a,b){var c;if(b===!0)for(a.tooltips=[],c=0;c<a.handles;c++)a.tooltips.push(!1);else{if(a.tooltips=h(b),a.dir&&a.tooltips.reverse(),a.tooltips.length!==a.handles)throw new Error("noUiSlider: must pass a formatter for all handles.");a.tooltips.forEach(function(a){if(a!==!1&&("object"!=typeof a||"function"!=typeof a.to))throw new Error("noUiSlider: 'tooltips' must be passed a formatter or 'false'.")})}}function M(a,b){if(a.format=b,"function"==typeof b.to&&"function"==typeof b.from)return!0;throw new Error("noUiSlider: 'format' requires 'to' and 'from' methods.")}function N(a,b){if(void 0!==b&&"string"!=typeof b)throw new Error("noUiSlider: 'cssPrefix' must be a string.");a.cssPrefix=b}function O(a){var b,c={margin:0,limit:0,animate:!0,format:T};b={step:{r:!1,t:A},start:{r:!0,t:C},connect:{r:!0,t:F},direction:{r:!0,t:J},snap:{r:!1,t:D},animate:{r:!1,t:E},range:{r:!0,t:B},orientation:{r:!1,t:G},margin:{r:!1,t:H},limit:{r:!1,t:I},behaviour:{r:!0,t:K},format:{r:!1,t:M},tooltips:{r:!1,t:L},cssPrefix:{r:!1,t:N}};var d={connect:!1,direction:"ltr",behaviour:"tap",orientation:"horizontal"};return Object.keys(b).forEach(function(e){if(void 0===a[e]&&void 0===d[e]){if(b[e].r)throw new Error("noUiSlider: '"+e+"' is required.");return!0}b[e].t(c,void 0===a[e]?d[e]:a[e])}),c.pips=a.pips,c.style=c.ort?"top":"left",c}function P(b,d){function e(a,b,c){var d=a+b[0],e=a+b[1];return c?(0>d&&(e+=Math.abs(d)),e>100&&(d-=e-100),[g(d),g(e)]):[d,e]}function p(a,b){a.preventDefault();var c,d,e=0===a.type.indexOf("touch"),f=0===a.type.indexOf("mouse"),g=0===a.type.indexOf("pointer"),h=a;return 0===a.type.indexOf("MSPointer")&&(g=!0),e&&(c=a.changedTouches[0].pageX,d=a.changedTouches[0].pageY),b=b||m(),(f||g)&&(c=a.clientX+b.x,d=a.clientY+b.y),h.pageOffset=b,h.points=[c,d],h.cursor=f||g,h}function q(a,b){var c=document.createElement("div"),d=document.createElement("div"),e=["-lower","-upper"];return a&&e.reverse(),j(d,da[3]),j(d,da[3]+e[b]),j(c,da[2]),c.appendChild(d),c}function r(a,b,c){switch(a){case 1:j(b,da[7]),j(c[0],da[6]);break;case 3:j(c[1],da[6]);case 2:j(c[0],da[7]);case 0:j(b,da[6])}}function s(a,b,c){var d,e=[];for(d=0;a>d;d+=1)e.push(c.appendChild(q(b,d)));return e}function t(a,b,c){j(c,da[0]),j(c,da[8+a]),j(c,da[4+b]);var d=document.createElement("div");return j(d,da[1]),c.appendChild(d),d}function u(a){var b=document.createElement("div");return b.className=da[18],a.firstChild.appendChild(b)}function v(){var a=Y.map(u);d.dir&&a.reverse(),U("update",function(b,c,e){a[c].innerHTML=d.tooltips[c]?d.tooltips[c].to(e[c]):b[c]})}function w(a,b,c){if("range"===a||"steps"===a)return aa.xVal;if("count"===a){var d,e=100/(b-1),f=0;for(b=[];(d=f++*e)<=100;)b.push(d);a="positions"}return"positions"===a?b.map(function(a){return aa.fromStepping(c?aa.getStep(a):a)}):"values"===a?c?b.map(function(a){return aa.fromStepping(aa.getStep(aa.toStepping(a)))}):b:void 0}function x(b,c,d){function e(a,b){return(a+b).toFixed(7)/1}var f=aa.direction,g={},h=aa.xVal[0],i=aa.xVal[aa.xVal.length-1],j=!1,k=!1,l=0;return aa.direction=0,d=a(d.slice().sort(function(a,b){return a-b})),d[0]!==h&&(d.unshift(h),j=!0),d[d.length-1]!==i&&(d.push(i),k=!0),d.forEach(function(a,f){var h,i,m,n,o,p,q,r,s,t,u=a,v=d[f+1];if("steps"===c&&(h=aa.xNumSteps[f]),h||(h=v-u),u!==!1&&void 0!==v)for(i=u;v>=i;i=e(i,h)){for(n=aa.toStepping(i),o=n-l,r=o/b,s=Math.round(r),t=o/s,m=1;s>=m;m+=1)p=l+m*t,g[p.toFixed(5)]=["x",0];q=d.indexOf(i)>-1?1:"steps"===c?2:0,!f&&j&&(q=0),i===v&&k||(g[n.toFixed(5)]=[i,q]),l=n}}),aa.direction=f,g}function y(a,b,c){function e(a){return["-normal","-large","-sub"][a]}function f(a,b,c){return'class="'+b+" "+b+"-"+h+" "+b+e(c[1])+'" style="'+d.style+": "+a+'%"'}function g(a,d){aa.direction&&(a=100-a),d[1]=d[1]&&b?b(d[0],d[1]):d[1],i.innerHTML+="<div "+f(a,da[21],d)+"></div>",d[1]&&(i.innerHTML+="<div "+f(a,da[22],d)+">"+c.to(d[0])+"</div>")}var h=["horizontal","vertical"][d.ort],i=document.createElement("div");return j(i,da[20]),j(i,da[20]+"-"+h),Object.keys(a).forEach(function(b){g(b,a[b])}),i}function z(a){var b=a.mode,c=a.density||1,d=a.filter||!1,e=a.values||!1,f=a.stepped||!1,g=w(b,e,f),h=x(c,b,g),i=a.format||{to:Math.round};return $.appendChild(y(h,d,i))}function A(){return X["offset"+["Width","Height"][d.ort]]}function B(a,b,c){void 0!==b&&1!==d.handles&&(b=Math.abs(b-d.dir)),Object.keys(ca).forEach(function(d){var e=d.split(".")[0];a===e&&ca[d].forEach(function(a){a.call(Z,h(P()),b,h(C(Array.prototype.slice.call(ba))),c||!1)})})}function C(a){return 1===a.length?a[0]:d.dir?a.reverse():a}function D(a,b,c,e){var f=function(b){return $.hasAttribute("disabled")?!1:l($,da[14])?!1:(b=p(b,e.pageOffset),a===R.start&&void 0!==b.buttons&&b.buttons>1?!1:e.hover&&b.buttons?!1:(b.calcPoint=b.points[d.ort],void c(b,e)))},g=[];return a.split(" ").forEach(function(a){b.addEventListener(a,f,!1),g.push([a,f])}),g}function E(a,b){if(-1===navigator.appVersion.indexOf("MSIE 9")&&0===a.buttons&&0!==b.buttonsProperty)return F(a,b);var c,d,f=b.handles||Y,g=!1,h=100*(a.calcPoint-b.start)/b.baseSize,i=f[0]===Y[0]?0:1;if(c=e(h,b.positions,f.length>1),g=L(f[0],c[i],1===f.length),f.length>1){if(g=L(f[1],c[i?0:1],!1)||g)for(d=0;d<b.handles.length;d++)B("slide",d)}else g&&B("slide",i)}function F(a,b){var c=X.querySelector("."+da[15]),d=b.handles[0]===Y[0]?0:1;null!==c&&k(c,da[15]),a.cursor&&(document.body.style.cursor="",document.body.removeEventListener("selectstart",document.body.noUiListener));var e=document.documentElement;e.noUiListeners.forEach(function(a){e.removeEventListener(a[0],a[1])}),k($,da[12]),B("set",d),B("change",d),void 0!==b.handleNumber&&B("end",b.handleNumber)}function G(a,b){"mouseout"===a.type&&"HTML"===a.target.nodeName&&null===a.relatedTarget&&F(a,b)}function H(a,b){var c=document.documentElement;if(1===b.handles.length&&(j(b.handles[0].children[0],da[15]),b.handles[0].hasAttribute("disabled")))return!1;a.preventDefault(),a.stopPropagation();var d=D(R.move,c,E,{start:a.calcPoint,baseSize:A(),pageOffset:a.pageOffset,handles:b.handles,handleNumber:b.handleNumber,buttonsProperty:a.buttons,positions:[_[0],_[Y.length-1]]}),e=D(R.end,c,F,{handles:b.handles,handleNumber:b.handleNumber}),f=D("mouseout",c,G,{handles:b.handles,handleNumber:b.handleNumber});if(c.noUiListeners=d.concat(e,f),a.cursor){document.body.style.cursor=getComputedStyle(a.target).cursor,Y.length>1&&j($,da[12]);var g=function(){return!1};document.body.noUiListener=g,document.body.addEventListener("selectstart",g,!1)}void 0!==b.handleNumber&&B("start",b.handleNumber)}function I(a){var b,e,g=a.calcPoint,h=0;return a.stopPropagation(),Y.forEach(function(a){h+=c(a)[d.style]}),b=h/2>g||1===Y.length?0:1,g-=c(X)[d.style],e=100*g/A(),d.events.snap||f($,da[14],300),Y[b].hasAttribute("disabled")?!1:(L(Y[b],e),B("slide",b,!0),B("set",b,!0),B("change",b,!0),void(d.events.snap&&H(a,{handles:[Y[b]]})))}function J(a){var b=a.calcPoint-c(X)[d.style],e=aa.getStep(100*b/A()),f=aa.fromStepping(e);Object.keys(ca).forEach(function(a){"hover"===a.split(".")[0]&&ca[a].forEach(function(a){a.call(Z,f)})})}function K(a){var b,c;if(!a.fixed)for(b=0;b<Y.length;b+=1)D(R.start,Y[b].children[0],H,{handles:[Y[b]],handleNumber:b});if(a.tap&&D(R.start,X,I,{handles:Y}),a.hover)for(D(R.move,X,J,{hover:!0}),b=0;b<Y.length;b+=1)["mousemove MSPointerMove pointermove"].forEach(function(a){Y[b].children[0].addEventListener(a,n,!1)});a.drag&&(c=[X.querySelector("."+da[7])],j(c[0],da[10]),a.fixed&&c.push(Y[c[0]===Y[0]?1:0].children[0]),c.forEach(function(a){D(R.start,a,H,{handles:Y})}))}function L(a,b,c){var e=a!==Y[0]?1:0,f=_[0]+d.margin,h=_[1]-d.margin,i=_[0]+d.limit,l=_[1]-d.limit;return Y.length>1&&(b=e?Math.max(b,f):Math.min(b,h)),c!==!1&&d.limit&&Y.length>1&&(b=e?Math.min(b,i):Math.max(b,l)),b=aa.getStep(b),b=g(parseFloat(b.toFixed(7))),b===_[e]?!1:(window.requestAnimationFrame?window.requestAnimationFrame(function(){a.style[d.style]=b+"%"}):a.style[d.style]=b+"%",a.previousSibling||(k(a,da[17]),b>50&&j(a,da[17])),_[e]=b,ba[e]=aa.fromStepping(b),B("update",e),!0)}function M(a,b){var c,e,f;for(d.limit&&(a+=1),c=0;a>c;c+=1)e=c%2,f=b[e],null!==f&&f!==!1&&("number"==typeof f&&(f=String(f)),f=d.format.from(f),(f===!1||isNaN(f)||L(Y[e],aa.toStepping(f),c===3-d.dir)===!1)&&B("update",e))}function N(a){var b,c,e=h(a);for(d.dir&&d.handles>1&&e.reverse(),d.animate&&-1!==_[0]&&f($,da[14],300),b=Y.length>1?3:1,1===e.length&&(b=1),M(b,e),c=0;c<Y.length;c++)B("set",c)}function P(){var a,b=[];for(a=0;a<d.handles;a+=1)b[a]=d.format.to(ba[a]);return C(b)}function Q(){da.forEach(function(a){a&&k($,a)}),$.innerHTML="",delete $.noUiSlider}function T(){var a=_.map(function(a,b){var c=aa.getApplicableStep(a),d=i(String(c[2])),e=ba[b],f=100===a?null:c[2],g=Number((e-c[2]).toFixed(d)),h=0===a?null:g>=c[1]?c[2]:c[0]||!1;return[h,f]});return C(a)}function U(a,b){ca[a]=ca[a]||[],ca[a].push(b),"update"===a.split(".")[0]&&Y.forEach(function(a,b){B("update",b)})}function V(a){var b=a.split(".")[0],c=a.substring(b.length);Object.keys(ca).forEach(function(a){var d=a.split(".")[0],e=a.substring(d.length);b&&b!==d||c&&c!==e||delete ca[a]})}function W(a){var b,c=P(),e=O({start:[0,0],margin:a.margin,limit:a.limit,step:a.step,range:a.range,animate:a.animate,snap:void 0===a.snap?d.snap:a.snap});for(["margin","limit","step","range","animate"].forEach(function(b){void 0!==a[b]&&(d[b]=a[b])}),aa=e.spectrum,_=[-1,-1],N(c),b=0;b<Y.length;b++)B("update",b)}var X,Y,Z,$=b,_=[-1,-1],aa=d.spectrum,ba=[],ca={},da=["target","base","origin","handle","horizontal","vertical","background","connect","ltr","rtl","draggable","","state-drag","","state-tap","active","","stacking","tooltip","","pips","marker","value"].map(o(d.cssPrefix||S));if($.noUiSlider)throw new Error("Slider was already initialized.");return X=t(d.dir,d.ort,$),Y=s(d.handles,d.dir,X),r(d.connect,$,Y),d.pips&&z(d.pips),d.tooltips&&v(),Z={destroy:Q,steps:T,on:U,off:V,get:P,set:N,updateOptions:W},K(d.events),Z}function Q(a,b){if(!a.nodeName)throw new Error("noUiSlider.create requires a single element.");var c=O(b,a),d=P(a,c);return d.set(c.start),a.noUiSlider=d,d}var R=window.navigator.pointerEnabled?{start:"pointerdown",move:"pointermove",end:"pointerup"}:window.navigator.msPointerEnabled?{start:"MSPointerDown",move:"MSPointerMove",end:"MSPointerUp"}:{start:"mousedown touchstart",move:"mousemove touchmove",end:"mouseup touchend"},S="noUi-";z.prototype.getMargin=function(a){return 2===this.xPct.length?q(this.xVal,a):!1},z.prototype.toStepping=function(a){return a=u(this.xVal,this.xPct,a),this.direction&&(a=100-a),a},z.prototype.fromStepping=function(a){return this.direction&&(a=100-a),e(v(this.xVal,this.xPct,a))},z.prototype.getStep=function(a){return this.direction&&(a=100-a),a=w(this.xPct,this.xSteps,this.snap,a),this.direction&&(a=100-a),a},z.prototype.getApplicableStep=function(a){var b=t(a,this.xPct),c=100===a?2:1;return[this.xNumSteps[b-2],this.xVal[b-c],this.xNumSteps[b-c]]},z.prototype.convert=function(a){return this.getStep(this.toStepping(a))};var T={to:function(a){return void 0!==a&&a.toFixed(2)},from:Number};return{create:Q}}); |
{ | ||
"name": "nouislider", | ||
"version": "8.1.0", | ||
"version": "8.2.0", | ||
"main": "distribute/nouislider", | ||
@@ -5,0 +5,0 @@ "style": "distribute/nouislider.min.css", |
@@ -19,3 +19,8 @@ # noUiSlider | ||
--------- | ||
### 8.1.0 (latest) | ||
### 8.2.0 (latest) | ||
- Added 'start', 'end' and 'hover' events | ||
- Added better tooltip formatting options | ||
- Bugfixes, including an issues where a mouseup would be missed | ||
### 8.1.0 | ||
- Fixed Microsoft Edge support | ||
@@ -22,0 +27,0 @@ - Merged several pull requests containing bug fixes |
@@ -111,2 +111,7 @@ | ||
// Shorthand for stopPropagation so we don't have to create a dynamic method | ||
function stopPropagation ( e ) { | ||
e.stopPropagation(); | ||
} | ||
// todo | ||
@@ -113,0 +118,0 @@ function addCssPrefix(cssPrefix) { |
@@ -41,2 +41,7 @@ /* Every input option is tested and parsed. This'll prevent | ||
// Catch equal start or end. | ||
if ( entry.min === entry.max ) { | ||
throw new Error("noUiSlider: 'range' 'min' and 'max' cannot be equal."); | ||
} | ||
parsed.spectrum = new Spectrum(entry, parsed.snap, parsed.dir, parsed.singleStep); | ||
@@ -170,3 +175,4 @@ } | ||
fixed = entry.indexOf('fixed') >= 0, | ||
snap = entry.indexOf('snap') >= 0; | ||
snap = entry.indexOf('snap') >= 0, | ||
hover = entry.indexOf('hover') >= 0; | ||
@@ -182,3 +188,4 @@ // Fix #472 | ||
fixed: fixed, | ||
snap: snap | ||
snap: snap, | ||
hover: hover | ||
}; | ||
@@ -189,15 +196,29 @@ } | ||
var i; | ||
if ( entry === true ) { | ||
parsed.tooltips = true; | ||
} | ||
if ( entry && entry.format ) { | ||
parsed.tooltips = []; | ||
if ( typeof entry.format !== 'function' ) { | ||
throw new Error("noUiSlider: 'tooltips.format' must be an object."); | ||
for ( i = 0; i < parsed.handles; i++ ) { | ||
parsed.tooltips.push(false); | ||
} | ||
parsed.tooltips = { | ||
format: entry.format | ||
}; | ||
} else { | ||
parsed.tooltips = asArray(entry); | ||
if ( parsed.dir ) { | ||
parsed.tooltips.reverse(); | ||
} | ||
if ( parsed.tooltips.length !== parsed.handles ) { | ||
throw new Error("noUiSlider: must pass a formatter for all handles."); | ||
} | ||
parsed.tooltips.forEach(function(formatter){ | ||
if ( formatter !== false && (typeof formatter !== 'object' || typeof formatter.to !== 'function') ) { | ||
throw new Error("noUiSlider: 'tooltips' must be passed a formatter or 'false'."); | ||
} | ||
}); | ||
} | ||
@@ -230,2 +251,6 @@ } | ||
// To prove a fix for #537, freeze options here. | ||
// If the object is modified, an error will be thrown. | ||
// Object.freeze(options); | ||
var parsed = { | ||
@@ -263,9 +288,2 @@ margin: 0, | ||
// Set defaults where applicable. | ||
Object.keys(defaults).forEach(function ( name ) { | ||
if ( options[name] === undefined ) { | ||
options[name] = defaults[name]; | ||
} | ||
}); | ||
// Run all options through a testing mechanism to ensure correct | ||
@@ -276,8 +294,6 @@ // input. It should be noted that options might get modified to | ||
var test = tests[name]; | ||
// If the option isn't set, but it is required, throw an error. | ||
if ( options[name] === undefined ) { | ||
if ( options[name] === undefined && defaults[name] === undefined ) { | ||
if ( test.r ) { | ||
if ( tests[name].r ) { | ||
throw new Error("noUiSlider: '" + name + "' is required."); | ||
@@ -289,3 +305,3 @@ } | ||
test.t( parsed, options[name] ); | ||
tests[name].t( parsed, options[name] === undefined ? defaults[name] : options[name] ); | ||
}); | ||
@@ -292,0 +308,0 @@ |
@@ -168,4 +168,4 @@ | ||
addClass(element, 'noUi-pips'); | ||
addClass(element, 'noUi-pips-' + style); | ||
addClass(element, cssClasses[20]); | ||
addClass(element, cssClasses[20] + '-' + style); | ||
@@ -193,7 +193,7 @@ function getSize( type ){ | ||
// Add a marker for every point | ||
element.innerHTML += '<div ' + getTags(offset, 'noUi-marker', values) + '></div>'; | ||
element.innerHTML += '<div ' + getTags(offset, cssClasses[21], values) + '></div>'; | ||
// Values are only appended for points marked '1' or '2'. | ||
if ( values[1] ) { | ||
element.innerHTML += '<div '+getTags(offset, 'noUi-value', values)+'>' + formatter.to(values[0]) + '</div>'; | ||
element.innerHTML += '<div '+getTags(offset, cssClasses[22], values)+'>' + formatter.to(values[0]) + '</div>'; | ||
} | ||
@@ -200,0 +200,0 @@ } |
@@ -26,2 +26,7 @@ | ||
// Ignore right or middle clicks on start #454 | ||
if ( data.hover && e.buttons ) { | ||
return false; | ||
} | ||
e.calcPoint = e.points[ options.ort ]; | ||
@@ -47,6 +52,7 @@ | ||
// Fix #498 | ||
// Check value of .buttons in 'start' to work around a bug in IE10 mobile. | ||
// Check value of .buttons in 'start' to work around a bug in IE10 mobile (data.buttonsProperty). | ||
// https://connect.microsoft.com/IE/feedback/details/927005/mobile-ie10-windows-phone-buttons-property-of-pointermove-event-always-zero | ||
// IE9 has .buttons zero on mousemove. | ||
if ( event.buttons === 0 && event.which === 0 && data.buttonsProperty !== 0 ) { | ||
// IE9 has .buttons and .which zero on mousemove. | ||
// Firefox breaks the spec MDN defines. | ||
if ( navigator.appVersion.indexOf("MSIE 9") === -1 && event.buttons === 0 && data.buttonsProperty !== 0 ) { | ||
return end(event, data); | ||
@@ -110,4 +116,16 @@ } | ||
fireEvent('change', handleNumber); | ||
// If this is a standard handle movement, fire the end event. | ||
if ( data.handleNumber !== undefined ) { | ||
fireEvent('end', data.handleNumber); | ||
} | ||
} | ||
// Fire 'end' when a mouse or pen leaves the document. | ||
function documentLeave ( event, data ) { | ||
if ( event.type === "mouseout" && event.target.nodeName === "HTML" && event.relatedTarget === null ){ | ||
end ( event, data ); | ||
} | ||
} | ||
// Bind move events on document. | ||
@@ -128,2 +146,5 @@ function start ( event, data ) { | ||
// Fix #551, where a handle gets selected instead of dragged. | ||
event.preventDefault(); | ||
// A drag should never propagate up to the 'tap' event. | ||
@@ -138,2 +159,3 @@ event.stopPropagation(); | ||
handles: data.handles, | ||
handleNumber: data.handleNumber, | ||
buttonsProperty: event.buttons, | ||
@@ -145,7 +167,13 @@ positions: [ | ||
}), endEvent = attach(actions.end, d, end, { | ||
handles: data.handles | ||
handles: data.handles, | ||
handleNumber: data.handleNumber | ||
}); | ||
d.noUiListeners = moveEvent.concat(endEvent); | ||
var outEvent = attach("mouseout", d, documentLeave, { | ||
handles: data.handles, | ||
handleNumber: data.handleNumber | ||
}); | ||
d.noUiListeners = moveEvent.concat(endEvent, outEvent); | ||
// Text selection isn't an issue on touch devices, | ||
@@ -172,2 +200,6 @@ // so adding cursor styles can be skipped. | ||
} | ||
if ( data.handleNumber !== undefined ) { | ||
fireEvent('start', data.handleNumber); | ||
} | ||
} | ||
@@ -211,5 +243,5 @@ | ||
fireEvent('slide', handleNumber); | ||
fireEvent('set', handleNumber); | ||
fireEvent('change', handleNumber); | ||
fireEvent('slide', handleNumber, true); | ||
fireEvent('set', handleNumber, true); | ||
fireEvent('change', handleNumber, true); | ||
@@ -221,2 +253,18 @@ if ( options.events.snap ) { | ||
// Fires a 'hover' event for a hovered mouse/pen position. | ||
function hover ( event ) { | ||
var location = event.calcPoint - offset(scope_Base)[ options.style ], | ||
to = scope_Spectrum.getStep(( location * 100 ) / baseSize()), | ||
value = scope_Spectrum.fromStepping( to ); | ||
Object.keys(scope_Events).forEach(function( targetEvent ) { | ||
if ( 'hover' === targetEvent.split('.')[0] ) { | ||
scope_Events[targetEvent].forEach(function( callback ) { | ||
callback.call( scope_Self, value ); | ||
}); | ||
} | ||
}); | ||
} | ||
// Attach events to several slider parts. | ||
@@ -235,3 +283,4 @@ function events ( behaviour ) { | ||
attach ( actions.start, scope_Handles[i].children[0], start, { | ||
handles: [ scope_Handles[i] ] | ||
handles: [ scope_Handles[i] ], | ||
handleNumber: i | ||
}); | ||
@@ -249,2 +298,12 @@ } | ||
// Fire hover events | ||
if ( behaviour.hover ) { | ||
attach ( actions.move, scope_Base, hover, { hover: true } ); | ||
for ( i = 0; i < scope_Handles.length; i += 1 ) { | ||
['mousemove MSPointerMove pointermove'].forEach(function( eventName ){ | ||
scope_Handles[i].children[0].addEventListener(eventName, stopPropagation, false); | ||
}); | ||
} | ||
} | ||
// Make the range draggable. | ||
@@ -251,0 +310,0 @@ if ( behaviour.drag ){ |
@@ -8,3 +8,3 @@ | ||
// External event handling | ||
function fireEvent ( event, handleNumber ) { | ||
function fireEvent ( event, handleNumber, tap ) { | ||
@@ -23,3 +23,3 @@ if ( handleNumber !== undefined && options.handles !== 1 ) { | ||
// Return values as array, so arg_1[arg_2] is always valid. | ||
callback( asArray(valueGet()), handleNumber, inSliderOrder(Array.prototype.slice.call(scope_Values)) ); | ||
callback.call(scope_Self, asArray(valueGet()), handleNumber, asArray(inSliderOrder(Array.prototype.slice.call(scope_Values))), tap || false); | ||
}); | ||
@@ -26,0 +26,0 @@ } |
@@ -11,3 +11,4 @@ | ||
scope_Values = [], | ||
scope_Events = {}; | ||
scope_Events = {}, | ||
scope_Self; | ||
@@ -34,2 +35,6 @@ var cssClasses = [ | ||
/* 18 */ ,'tooltip' | ||
/* 19 */ ,'' | ||
/* 20 */ ,'pips' | ||
/* 21 */ ,'marker' | ||
/* 22 */ ,'value' | ||
].map(addCssPrefix(options.cssPrefix || defaultCssPrefix)); |
@@ -9,4 +9,3 @@ | ||
lowerLimit = scope_Locations[0] + options.limit, | ||
upperLimit = scope_Locations[1] - options.limit, | ||
newScopeValue = scope_Spectrum.fromStepping( to ); | ||
upperLimit = scope_Locations[1] - options.limit; | ||
@@ -35,4 +34,4 @@ // For sliders with multiple handles, | ||
// Return false if handle can't move and ranges were not updated | ||
if ( to === scope_Locations[trigger] && newScopeValue === scope_Values[trigger]) { | ||
// Return false if handle can't move | ||
if ( to === scope_Locations[trigger] ) { | ||
return false; | ||
@@ -232,3 +231,33 @@ } | ||
// Updateable: margin, limit, step, range, animate, snap | ||
function updateOptions ( optionsToUpdate ) { | ||
var v = valueGet(), i, newOptions = testOptions({ | ||
start: [0, 0], | ||
margin: optionsToUpdate.margin, | ||
limit: optionsToUpdate.limit, | ||
step: optionsToUpdate.step, | ||
range: optionsToUpdate.range, | ||
animate: optionsToUpdate.animate, | ||
snap: optionsToUpdate.snap === undefined ? options.snap : optionsToUpdate.snap | ||
}); | ||
['margin', 'limit', 'step', 'range', 'animate'].forEach(function(name){ | ||
if ( optionsToUpdate[name] !== undefined ) { | ||
options[name] = optionsToUpdate[name]; | ||
} | ||
}); | ||
scope_Spectrum = newOptions.spectrum; | ||
// Invalidate the current positioning so valueSet forces an update. | ||
scope_Locations = [-1, -1]; | ||
valueSet(v); | ||
for ( i = 0; i < scope_Handles.length; i++ ) { | ||
fireEvent('update', i); | ||
} | ||
} | ||
// Throw an error if the slider was already initialized. | ||
@@ -239,3 +268,2 @@ if ( scope_Target.noUiSlider ) { | ||
// Create the base element, initialise HTML and set classes. | ||
@@ -249,5 +277,2 @@ // Add handles and links. | ||
// Attach user events. | ||
events( options.events ); | ||
if ( options.pips ) { | ||
@@ -258,32 +283,6 @@ pips(options.pips); | ||
if ( options.tooltips ) { | ||
tooltips(options.tooltips); | ||
tooltips(); | ||
} | ||
// can be updated: | ||
// margin | ||
// limit | ||
// step | ||
// range | ||
// animate | ||
function updateOptions ( optionsToUpdate ) { | ||
var newOptions = testOptions({ | ||
start: [0, 0], | ||
margin: optionsToUpdate.margin, | ||
limit: optionsToUpdate.limit, | ||
step: optionsToUpdate.step, | ||
range: optionsToUpdate.range, | ||
animate: optionsToUpdate.animate | ||
}); | ||
options.margin = newOptions.margin; | ||
options.limit = newOptions.limit; | ||
options.step = newOptions.step; | ||
options.range = newOptions.range; | ||
options.animate = newOptions.animate; | ||
scope_Spectrum = newOptions.spectrum; | ||
} | ||
return { | ||
scope_Self = { | ||
destroy: destroy, | ||
@@ -297,1 +296,6 @@ steps: getCurrentStep, | ||
}; | ||
// Attach user events. | ||
events( options.events ); | ||
return scope_Self; |
function defaultFormatTooltipValue ( formattedValue ) { | ||
return formattedValue; | ||
} | ||
function addTooltip ( handle ) { | ||
@@ -13,10 +9,13 @@ var element = document.createElement('div'); | ||
// The tooltips option is a shorthand for using the 'update' event. | ||
function tooltips ( tooltipsOptions ) { | ||
function tooltips ( ) { | ||
var formatTooltipValue = tooltipsOptions.format ? tooltipsOptions.format : defaultFormatTooltipValue, | ||
tips = scope_Handles.map(addTooltip); | ||
var tips = scope_Handles.map(addTooltip); | ||
if ( options.dir ) { | ||
tips.reverse(); | ||
} | ||
bindEvent('update', function(formattedValues, handleId, rawValues) { | ||
tips[handleId].innerHTML = formatTooltipValue(formattedValues[handleId], rawValues[handleId]); | ||
bindEvent('update', function(f, o, r) { | ||
tips[o].innerHTML = options.tooltips[o] ? options.tooltips[o].to(r[o]) : f[o]; | ||
}); | ||
} |
@@ -100,2 +100,12 @@ | ||
assert.throws(function(){ | ||
noUiSlider.create(slider, { | ||
start: 10, | ||
range: { | ||
'min': 10, | ||
'max': 10 | ||
} | ||
}); | ||
}); | ||
noUiSlider.create(slider, { | ||
@@ -102,0 +112,0 @@ start: 1, |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
161572
47
3927
97
0