{"version":3,"sources":["webpack://line_heatmap/webpack/universalModuleDefinition","webpack://line_heatmap/webpack/bootstrap","webpack://line_heatmap/./src/lineHeatmap.js","webpack://line_heatmap/./src/heatContainer.js","webpack://line_heatmap/./node_modules/nouislider/distribute/nouislider.js","webpack://line_heatmap/./node_modules/heatmap.js/build/heatmap.js","webpack://line_heatmap/./src/index.js"],"names":["root","factory","exports","module","define","amd","window","installedModules","__webpack_require__","moduleId","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","LineHeatmap","elementID","_classCallCheck","this","ID","heatmap","config","arguments","length","undefined","myConfig","container","document","getElementById","assign","Heatmap","console","log","data","setData","max","Number","MAX_SAFE_INTEGER","min","noUiSlider","_lineHeatmap__WEBPACK_IMPORTED_MODULE_0__","template","stateObject","logTransform","logString","split","filter","v","map","JSON","parse","x","y","__webpack_exports__","init","elementId","el","innerHTML","logData","setTrackData","html5Slider","start","connect","margin","step","range","on","values","handle","logValues","newData","slice","updateLogString","updateOptions","__WEBPACK_AMD_DEFINE_FACTORY__","__WEBPACK_AMD_DEFINE_ARRAY__","__WEBPACK_AMD_DEFINE_RESULT__","VERSION","isSet","preventDefault","e","isNumeric","a","isNaN","isFinite","addClassFor","element","className","duration","addClass","setTimeout","removeClass","limit","Math","asArray","Array","isArray","countDecimals","numStr","pieces","String","classList","add","remove","replace","RegExp","join","getPageOffset","doc","supportPageOffset","pageXOffset","isCSS1Compat","compatMode","documentElement","scrollLeft","body","pageYOffset","scrollTop","subRangeRatio","pa","pb","fromPercentage","getJ","arr","j","toStepping","xVal","xPct","va","vb","abs","toPercentage","getStep","xSteps","snap","b","to","round","closest","handleEntryPoint","index","that","percentage","Error","parseFloat","push","xHighestCompleteStep","handleStepPoint","totalSteps","xNumSteps","highestStep","ceil","toFixed","Spectrum","entry","singleStep","ordered","sort","getMargin","fromStepping","isPercentage","getNearbySteps","stepBefore","startValue","thisStep","stepAfter","countStepDecimals","stepDecimals","apply","convert","defaultFormatter","from","validateFormat","isValidFormatter","testStep","parsed","testRange","spectrum","testStart","handles","testSnap","testAnimate","animate","testAnimationDuration","animationDuration","testConnect","testOrientation","ort","testMargin","testLimit","testPadding","padding","testDirection","dir","testBehaviour","tap","indexOf","drag","fixed","hover","unconstrained","events","testTooltips","tooltips","forEach","formatter","testAriaFormat","ariaFormat","testFormat","format","testKeyboardSupport","keyboardSupport","testDocumentElement","testCssPrefix","cssPrefix","testCssClasses","cssClasses","testOptions","options","tests","direction","orientation","behaviour","defaults","target","base","origin","handleLower","handleUpper","horizontal","vertical","background","connects","ltr","rtl","draggable","active","tooltip","pips","pipsHorizontal","pipsVertical","marker","markerHorizontal","markerVertical","markerNormal","markerLarge","markerSub","valueHorizontal","valueVertical","valueNormal","valueLarge","valueSub","keys","createElement","msPrefix","style","msTransform","noPrefix","transform","transformRule","scope","originalOptions","scope_Base","scope_Handles","scope_Connects","scope_Self","scope_Pips","tips","addTarget","actions","navigator","pointerEnabled","move","end","msPointerEnabled","supportsTouchActionNone","CSS","supports","supportsPassive","opts","addEventListener","getSupportsPassive","scope_Target","scope_Locations","scope_HandleNumbers","scope_ActiveHandlesCount","scope_Spectrum","scope_Values","scope_Events","scope_Document","ownerDocument","scope_DocumentElement","scope_Body","PIPS_NONE","PIPS_NO_VALUE","PIPS_LARGE_VALUE","PIPS_SMALL_VALUE","scope_DirOffset","addNodeTo","div","appendChild","addOrigin","handleNumber","setAttribute","addConnect","addTooltip","firstChild","addMarking","spread","filterFunc","valueSizeClasses","markerSizeClasses","valueOrientationClasses","markerOrientationClasses","getClasses","type","source","orientationClasses","sizeClasses","offset","node","addSpread","removePips","parentElement","removeChild","grid","density","stepped","group","interval","getGroup","array","indexes","firstInRange","lastInRange","ignoreFirst","ignoreLast","prevPct","unshift","current","q","newPct","pctDifference","pctPos","steps","realSteps","stepSize","low","high","isSteps","generateSpread","baseSize","rect","getBoundingClientRect","alt","width","height","attachEvent","callback","method","pageOffset","eventTarget","touch","mouse","pointer","isTouchOnTarget","checkTouch","contains","targetTouches","touches","pageX","pageY","targetTouch","find","changedTouches","clientX","clientY","points","cursor","fixEvent","hasAttribute","doNotReject","test","buttons","calcPoint","methods","eventName","passive","calcPointToPercentage","elem","docElem","location","userAgent","top","clientTop","left","clientLeft","proposal","documentLeave","event","nodeName","relatedTarget","eventEnd","eventMove","appVersion","buttonsProperty","movement","startCalcPoint","moveHandles","locations","handleNumbers","listeners","removeEventListener","setZindex","fireEvent","eventStart","handleOrigin","children","stopPropagation","moveEvent","endEvent","outEvent","concat","getComputedStyle","eventTap","pos","getClosestHandle","setHandle","eventHover","targetEvent","bindEvent","namespacedEvent","eventType","toPct","pct","checkHandlePosition","reference","lookBackward","lookForward","getValue","inRuleOrder","upward","proposals","f","reverse","state","transformDirection","zIndex","rule","updateConnect","updateHandlePosition","h","connectWidth","translateRule","scaleRule","valueSet","input","fireSetEvent","isInit","resolveToValue","valueGet","connectOptions","connectBase","addElements","handleBefore","handleAfter","eventHolders","eventHolder","destroy","nearbySteps","increment","decrement","off","namespace","substring","tEvent","tNamespace","set","reset","__moveHandles","optionsToUpdate","updateAble","newOptions","unencoded","formattedValue","positions","now","text","__spectrum","version","api","rendererFn","HeatmapConfig","defaultRadius","defaultRenderer","defaultGradient","0.25","0.55","0.85","1","defaultMaxOpacity","defaultMinOpacity","defaultBlur","defaultXField","defaultYField","defaultValueField","plugins","Store","_coordinator","_data","_radi","_min","_max","_xField","_yField","_valueField","_cfgRadius","_organiseData","dataPoint","forceRender","radi","store","radius","storedVal","setDataMax","setDataMin","_unOrganizeData","unorganizedData","_onExtremaChange","emit","addData","dataArr","dataLen","organisedEntry","dataPoints","pointsLen","_getInternalData","removeData","setCoordinator","coordinator","getData","Canvas2dRenderer","_getColorPalette","gradientConfig","gradient","paletteCanvas","paletteCtx","getContext","createLinearGradient","addColorStop","fillStyle","fillRect","getImageData","_getPointTemplate","blurFactor","tplCanvas","tplCtx","beginPath","arc","PI","fill","createRadialGradient","shadowCanvas","canvas","computed","_renderBoundaries","_width","_height","shadowCtx","ctx","cssText","position","_palette","_templates","_setStyles","renderPartial","_drawAlpha","_colorize","renderAll","_clear","renderData","xValues","xValuesLen","xValue","yValues","yValuesLen","yValue","_prepareData","_updateGradient","updateConfig","setDimensions","clearRect","_blur","blur","backgroundColor","_opacity","opacity","_maxOpacity","maxOpacity","_minOpacity","minOpacity","_useGradientOpacity","useGradientOpacity","tpl","point","rectX","rectY","templateAlpha","globalAlpha","drawImage","maxWidth","maxHeight","img","imgData","len","palette","finalAlpha","alpha","putImageData","getValueAt","getDataURL","toDataURL","Renderer","Util","merge","merged","argsLen","obj","Coordinator","cStore","evtName","_connect","renderer","_renderer","_store","_config","onExtremaChange","pluginToLoad","plugin","configure","repaint","register","pluginKey","_heatContainer__WEBPACK_IMPORTED_MODULE_0__","_lineHeatmap__WEBPACK_IMPORTED_MODULE_1__"],"mappings":"CAAA,SAAAA,EAAAC,GACA,iBAAAC,SAAA,iBAAAC,OACAA,OAAAD,QAAAD,IACA,mBAAAG,eAAAC,IACAD,OAAA,GAAAH,GACA,iBAAAC,QACAA,QAAA,aAAAD,IAEAD,EAAA,aAAAC,IARA,CASCK,OAAA,WACD,mBCTA,IAAAC,EAAA,GAGA,SAAAC,EAAAC,GAGA,GAAAF,EAAAE,GACA,OAAAF,EAAAE,GAAAP,QAGA,IAAAC,EAAAI,EAAAE,GAAA,CACAC,EAAAD,EACAE,GAAA,EACAT,QAAA,IAUA,OANAU,EAAAH,GAAAI,KAAAV,EAAAD,QAAAC,IAAAD,QAAAM,GAGAL,EAAAQ,GAAA,EAGAR,EAAAD,QA0DA,OArDAM,EAAAM,EAAAF,EAGAJ,EAAAO,EAAAR,EAGAC,EAAAQ,EAAA,SAAAd,EAAAe,EAAAC,GACAV,EAAAW,EAAAjB,EAAAe,IACAG,OAAAC,eAAAnB,EAAAe,EAAA,CAA0CK,YAAA,EAAAC,IAAAL,KA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AJ,KAjsBmCtpB,EAAAD,QACnCC,EAAAD,QAAAD,SAEkBkD,KAAAoD,EAAA,mBAAdF,EAAA,GAAcA,EAAAxF,KAAAX,EAAAM,EAAAN,EAAAC,GAAAkG,KAAAlG,EAAAD,QAAAqG,iCCdlB/F,EAAAgB,EAAAwD,GAAA,IAAA8kB,EAAAtpB,EAAA,GAAAA,EAAAQ,EAAAgE,EAAA,8BAAA8kB,EAAA,QAAAC,EAAAvpB,EAAA,GAAAA,EAAAQ,EAAAgE,EAAA,gCAAA+kB,EAAA","file":"line_heatmap.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"line_heatmap\"] = factory();\n\telse\n\t\troot[\"line_heatmap\"] = factory();\n})(window, function() {\nreturn "," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 4);\n","import Heatmap from \"heatmap.js\";\n\nexport default class LineHeatmap {\n\n constructor (elementID) {\n this.ID = elementID;\n this.heatmap = null;\n }\n\n create (config = {}) {\n let myConfig = {\n container: document.getElementById(this.ID)\n }\n myConfig = Object.assign(myConfig, config);\n this.heatmap = Heatmap.create(myConfig);\n console.log(this.heatmap);\n }\n\n setTrackData (data) {\n this.heatmap.setData({\n max: Number.MAX_SAFE_INTEGER,\n min: 0,\n data: data\n });\n }\n}\n","import LineHeatmap from \"./lineHeatmap\";\nimport \"nouislider\";\n\nconst template = `
\n
\n
\n
\n
\n
\n
\n`;\n\nconst stateObject = {};\n\nfunction init (elementId, logString) {\n const el = document.getElementById(elementId);\n el.innerHTML = template;\n const logData = logTransform(logString);\n // create container\n const heatmap = new LineHeatmap('line-heatmap-canvas');\n heatmap.create();\n heatmap.setTrackData(logData);\n\n const html5Slider = document.getElementById('line-heatmap-slider');\n noUiSlider.create(html5Slider, {\n start: [1, logData.length],\n connect: true,\n margin: 1,\n step: 1,\n range: {\n 'min': 1,\n 'max': logData.length\n }\n });\n \n stateObject['container'] = el;\n stateObject['heatmap'] = heatmap;\n stateObject['data'] = logData;\n stateObject['slider'] = html5Slider;\n\n html5Slider.noUiSlider.on('update', function (values, handle) {\n const logValues = this.get();\n console.log(logValues);\n const newData = stateObject['data'].slice(+logValues[0]-1, +logValues[1] + 1);\n console.log(newData);\n stateObject['heatmap'].setTrackData(newData);\n });\n}\n\nfunction updateLogString (logString) {\n const logData = logTransform(logString);\n stateObject['data'] = logData;\n stateObject['slider'].noUiSlider.updateOptions({\n range: {\n 'min': 1,\n 'max': logData.length\n }\n });\n stateObject['heatmap'].setTrackData(logData); \n}\n\nfunction logTransform (logString) {\n const data = logString.split(\"\\n\")\n .filter(v => v.split(',').length > 3)\n .map(v => {\n const o = JSON.parse('[' + v + ']');\n return {\n x: o[0],\n y: o[1],\n value: 1\n };\n });\n return data;\n}\n\nexport default {\n init,\n updateLogString\n}","/*! nouislider - 12.1.0 - 10/25/2018 */\n(function(factory) {\r\n if (typeof define === \"function\" && define.amd) {\r\n // AMD. Register as an anonymous module.\r\n define([], factory);\r\n } else if (typeof exports === \"object\") {\r\n // Node/CommonJS\r\n module.exports = factory();\r\n } else {\r\n // Browser globals\r\n window.noUiSlider = factory();\r\n }\r\n})(function() {\r\n \"use strict\";\r\n\r\n var VERSION = \"12.1.0\";\r\n\r\n function isValidFormatter(entry) {\r\n return typeof entry === \"object\" && typeof entry.to === \"function\" && typeof entry.from === \"function\";\r\n }\r\n\r\n function removeElement(el) {\r\n el.parentElement.removeChild(el);\r\n }\r\n\r\n function isSet(value) {\r\n return value !== null && value !== undefined;\r\n }\r\n\r\n // Bindable version\r\n function preventDefault(e) {\r\n e.preventDefault();\r\n }\r\n\r\n // Removes duplicates from an array.\r\n function unique(array) {\r\n return array.filter(function(a) {\r\n return !this[a] ? (this[a] = true) : false;\r\n }, {});\r\n }\r\n\r\n // Round a value to the closest 'to'.\r\n function closest(value, to) {\r\n return Math.round(value / to) * to;\r\n }\r\n\r\n // Current position of an element relative to the document.\r\n function offset(elem, orientation) {\r\n var rect = elem.getBoundingClientRect();\r\n var doc = elem.ownerDocument;\r\n var docElem = doc.documentElement;\r\n var pageOffset = getPageOffset(doc);\r\n\r\n // getBoundingClientRect contains left scroll in Chrome on Android.\r\n // I haven't found a feature detection that proves this. Worst case\r\n // scenario on mis-match: the 'tap' feature on horizontal sliders breaks.\r\n if (/webkit.*Chrome.*Mobile/i.test(navigator.userAgent)) {\r\n pageOffset.x = 0;\r\n }\r\n\r\n return orientation\r\n ? rect.top + pageOffset.y - docElem.clientTop\r\n : rect.left + pageOffset.x - docElem.clientLeft;\r\n }\r\n\r\n // Checks whether a value is numerical.\r\n function isNumeric(a) {\r\n return typeof a === \"number\" && !isNaN(a) && isFinite(a);\r\n }\r\n\r\n // Sets a class and removes it after [duration] ms.\r\n function addClassFor(element, className, duration) {\r\n if (duration > 0) {\r\n addClass(element, className);\r\n setTimeout(function() {\r\n removeClass(element, className);\r\n }, duration);\r\n }\r\n }\r\n\r\n // Limits a value to 0 - 100\r\n function limit(a) {\r\n return Math.max(Math.min(a, 100), 0);\r\n }\r\n\r\n // Wraps a variable as an array, if it isn't one yet.\r\n // Note that an input array is returned by reference!\r\n function asArray(a) {\r\n return Array.isArray(a) ? a : [a];\r\n }\r\n\r\n // Counts decimals\r\n function countDecimals(numStr) {\r\n numStr = String(numStr);\r\n var pieces = numStr.split(\".\");\r\n return pieces.length > 1 ? pieces[1].length : 0;\r\n }\r\n\r\n // http://youmightnotneedjquery.com/#add_class\r\n function addClass(el, className) {\r\n if (el.classList) {\r\n el.classList.add(className);\r\n } else {\r\n el.className += \" \" + className;\r\n }\r\n }\r\n\r\n // http://youmightnotneedjquery.com/#remove_class\r\n function removeClass(el, className) {\r\n if (el.classList) {\r\n el.classList.remove(className);\r\n } else {\r\n el.className = el.className.replace(\r\n new RegExp(\"(^|\\\\b)\" + className.split(\" \").join(\"|\") + \"(\\\\b|$)\", \"gi\"),\r\n \" \"\r\n );\r\n }\r\n }\r\n\r\n // https://plainjs.com/javascript/attributes/adding-removing-and-testing-for-classes-9/\r\n function hasClass(el, className) {\r\n return el.classList\r\n ? el.classList.contains(className)\r\n : new RegExp(\"\\\\b\" + className + \"\\\\b\").test(el.className);\r\n }\r\n\r\n // https://developer.mozilla.org/en-US/docs/Web/API/Window/scrollY#Notes\r\n function getPageOffset(doc) {\r\n var supportPageOffset = window.pageXOffset !== undefined;\r\n var isCSS1Compat = (doc.compatMode || \"\") === \"CSS1Compat\";\r\n var x = supportPageOffset\r\n ? window.pageXOffset\r\n : isCSS1Compat\r\n ? doc.documentElement.scrollLeft\r\n : doc.body.scrollLeft;\r\n var y = supportPageOffset\r\n ? window.pageYOffset\r\n : isCSS1Compat\r\n ? doc.documentElement.scrollTop\r\n : doc.body.scrollTop;\r\n\r\n return {\r\n x: x,\r\n y: y\r\n };\r\n }\r\n\r\n // we provide a function to compute constants instead\r\n // of accessing window.* as soon as the module needs it\r\n // so that we do not compute anything if not needed\r\n function getActions() {\r\n // Determine the events to bind. IE11 implements pointerEvents without\r\n // a prefix, which breaks compatibility with the IE10 implementation.\r\n return window.navigator.pointerEnabled\r\n ? {\r\n start: \"pointerdown\",\r\n move: \"pointermove\",\r\n end: \"pointerup\"\r\n }\r\n : window.navigator.msPointerEnabled\r\n ? {\r\n start: \"MSPointerDown\",\r\n move: \"MSPointerMove\",\r\n end: \"MSPointerUp\"\r\n }\r\n : {\r\n start: \"mousedown touchstart\",\r\n move: \"mousemove touchmove\",\r\n end: \"mouseup touchend\"\r\n };\r\n }\r\n\r\n // https://github.com/WICG/EventListenerOptions/blob/gh-pages/explainer.md\r\n // Issue #785\r\n function getSupportsPassive() {\r\n var supportsPassive = false;\r\n\r\n /* eslint-disable */\r\n try {\r\n var opts = Object.defineProperty({}, \"passive\", {\r\n get: function() {\r\n supportsPassive = true;\r\n }\r\n });\r\n\r\n window.addEventListener(\"test\", null, opts);\r\n } catch (e) {}\r\n /* eslint-enable */\r\n\r\n return supportsPassive;\r\n }\r\n\r\n function getSupportsTouchActionNone() {\r\n return window.CSS && CSS.supports && CSS.supports(\"touch-action\", \"none\");\r\n }\r\n\r\n // Value calculation\r\n\r\n // Determine the size of a sub-range in relation to a full range.\r\n function subRangeRatio(pa, pb) {\r\n return 100 / (pb - pa);\r\n }\r\n\r\n // (percentage) How many percent is this value of this range?\r\n function fromPercentage(range, value) {\r\n return (value * 100) / (range[1] - range[0]);\r\n }\r\n\r\n // (percentage) Where is this value on this range?\r\n function toPercentage(range, value) {\r\n return fromPercentage(range, range[0] < 0 ? value + Math.abs(range[0]) : value - range[0]);\r\n }\r\n\r\n // (value) How much is this percentage on this range?\r\n function isPercentage(range, value) {\r\n return (value * (range[1] - range[0])) / 100 + range[0];\r\n }\r\n\r\n // Range conversion\r\n\r\n function getJ(value, arr) {\r\n var j = 1;\r\n\r\n while (value >= arr[j]) {\r\n j += 1;\r\n }\r\n\r\n return j;\r\n }\r\n\r\n // (percentage) Input a value, find where, on a scale of 0-100, it applies.\r\n function toStepping(xVal, xPct, value) {\r\n if (value >= xVal.slice(-1)[0]) {\r\n return 100;\r\n }\r\n\r\n var j = getJ(value, xVal);\r\n var va = xVal[j - 1];\r\n var vb = xVal[j];\r\n var pa = xPct[j - 1];\r\n var pb = xPct[j];\r\n\r\n return pa + toPercentage([va, vb], value) / subRangeRatio(pa, pb);\r\n }\r\n\r\n // (value) Input a percentage, find where it is on the specified range.\r\n function fromStepping(xVal, xPct, value) {\r\n // There is no range group that fits 100\r\n if (value >= 100) {\r\n return xVal.slice(-1)[0];\r\n }\r\n\r\n var j = getJ(value, xPct);\r\n var va = xVal[j - 1];\r\n var vb = xVal[j];\r\n var pa = xPct[j - 1];\r\n var pb = xPct[j];\r\n\r\n return isPercentage([va, vb], (value - pa) * subRangeRatio(pa, pb));\r\n }\r\n\r\n // (percentage) Get the step that applies at a certain value.\r\n function getStep(xPct, xSteps, snap, value) {\r\n if (value === 100) {\r\n return value;\r\n }\r\n\r\n var j = getJ(value, xPct);\r\n var a = xPct[j - 1];\r\n var b = xPct[j];\r\n\r\n // If 'snap' is set, steps are used as fixed points on the slider.\r\n if (snap) {\r\n // Find the closest position, a or b.\r\n if (value - a > (b - a) / 2) {\r\n return b;\r\n }\r\n\r\n return a;\r\n }\r\n\r\n if (!xSteps[j - 1]) {\r\n return value;\r\n }\r\n\r\n return xPct[j - 1] + closest(value - xPct[j - 1], xSteps[j - 1]);\r\n }\r\n\r\n // Entry parsing\r\n\r\n function handleEntryPoint(index, value, that) {\r\n var percentage;\r\n\r\n // Wrap numerical input in an array.\r\n if (typeof value === \"number\") {\r\n value = [value];\r\n }\r\n\r\n // Reject any invalid input, by testing whether value is an array.\r\n if (!Array.isArray(value)) {\r\n throw new Error(\"noUiSlider (\" + VERSION + \"): 'range' contains invalid value.\");\r\n }\r\n\r\n // Covert min/max syntax to 0 and 100.\r\n if (index === \"min\") {\r\n percentage = 0;\r\n } else if (index === \"max\") {\r\n percentage = 100;\r\n } else {\r\n percentage = parseFloat(index);\r\n }\r\n\r\n // Check for correct input.\r\n if (!isNumeric(percentage) || !isNumeric(value[0])) {\r\n throw new Error(\"noUiSlider (\" + VERSION + \"): 'range' value isn't numeric.\");\r\n }\r\n\r\n // Store values.\r\n that.xPct.push(percentage);\r\n that.xVal.push(value[0]);\r\n\r\n // NaN will evaluate to false too, but to keep\r\n // logging clear, set step explicitly. Make sure\r\n // not to override the 'step' setting with false.\r\n if (!percentage) {\r\n if (!isNaN(value[1])) {\r\n that.xSteps[0] = value[1];\r\n }\r\n } else {\r\n that.xSteps.push(isNaN(value[1]) ? false : value[1]);\r\n }\r\n\r\n that.xHighestCompleteStep.push(0);\r\n }\r\n\r\n function handleStepPoint(i, n, that) {\r\n // Ignore 'false' stepping.\r\n if (!n) {\r\n return true;\r\n }\r\n\r\n // Factor to range ratio\r\n that.xSteps[i] =\r\n fromPercentage([that.xVal[i], that.xVal[i + 1]], n) / subRangeRatio(that.xPct[i], that.xPct[i + 1]);\r\n\r\n var totalSteps = (that.xVal[i + 1] - that.xVal[i]) / that.xNumSteps[i];\r\n var highestStep = Math.ceil(Number(totalSteps.toFixed(3)) - 1);\r\n var step = that.xVal[i] + that.xNumSteps[i] * highestStep;\r\n\r\n that.xHighestCompleteStep[i] = step;\r\n }\r\n\r\n // Interface\r\n\r\n function Spectrum(entry, snap, singleStep) {\r\n this.xPct = [];\r\n this.xVal = [];\r\n this.xSteps = [singleStep || false];\r\n this.xNumSteps = [false];\r\n this.xHighestCompleteStep = [];\r\n\r\n this.snap = snap;\r\n\r\n var index;\r\n var ordered = []; // [0, 'min'], [1, '50%'], [2, 'max']\r\n\r\n // Map the object keys to an array.\r\n for (index in entry) {\r\n if (entry.hasOwnProperty(index)) {\r\n ordered.push([entry[index], index]);\r\n }\r\n }\r\n\r\n // Sort all entries by value (numeric sort).\r\n if (ordered.length && typeof ordered[0][0] === \"object\") {\r\n ordered.sort(function(a, b) {\r\n return a[0][0] - b[0][0];\r\n });\r\n } else {\r\n ordered.sort(function(a, b) {\r\n return a[0] - b[0];\r\n });\r\n }\r\n\r\n // Convert all entries to subranges.\r\n for (index = 0; index < ordered.length; index++) {\r\n handleEntryPoint(ordered[index][1], ordered[index][0], this);\r\n }\r\n\r\n // Store the actual step values.\r\n // xSteps is sorted in the same order as xPct and xVal.\r\n this.xNumSteps = this.xSteps.slice(0);\r\n\r\n // Convert all numeric steps to the percentage of the subrange they represent.\r\n for (index = 0; index < this.xNumSteps.length; index++) {\r\n handleStepPoint(index, this.xNumSteps[index], this);\r\n }\r\n }\r\n\r\n Spectrum.prototype.getMargin = function(value) {\r\n var step = this.xNumSteps[0];\r\n\r\n if (step && (value / step) % 1 !== 0) {\r\n throw new Error(\"noUiSlider (\" + VERSION + \"): 'limit', 'margin' and 'padding' must be divisible by step.\");\r\n }\r\n\r\n return this.xPct.length === 2 ? fromPercentage(this.xVal, value) : false;\r\n };\r\n\r\n Spectrum.prototype.toStepping = function(value) {\r\n value = toStepping(this.xVal, this.xPct, value);\r\n\r\n return value;\r\n };\r\n\r\n Spectrum.prototype.fromStepping = function(value) {\r\n return fromStepping(this.xVal, this.xPct, value);\r\n };\r\n\r\n Spectrum.prototype.getStep = function(value) {\r\n value = getStep(this.xPct, this.xSteps, this.snap, value);\r\n\r\n return value;\r\n };\r\n\r\n Spectrum.prototype.getNearbySteps = function(value) {\r\n var j = getJ(value, this.xPct);\r\n\r\n return {\r\n stepBefore: {\r\n startValue: this.xVal[j - 2],\r\n step: this.xNumSteps[j - 2],\r\n highestStep: this.xHighestCompleteStep[j - 2]\r\n },\r\n thisStep: {\r\n startValue: this.xVal[j - 1],\r\n step: this.xNumSteps[j - 1],\r\n highestStep: this.xHighestCompleteStep[j - 1]\r\n },\r\n stepAfter: {\r\n startValue: this.xVal[j],\r\n step: this.xNumSteps[j],\r\n highestStep: this.xHighestCompleteStep[j]\r\n }\r\n };\r\n };\r\n\r\n Spectrum.prototype.countStepDecimals = function() {\r\n var stepDecimals = this.xNumSteps.map(countDecimals);\r\n return Math.max.apply(null, stepDecimals);\r\n };\r\n\r\n // Outside testing\r\n Spectrum.prototype.convert = function(value) {\r\n return this.getStep(this.toStepping(value));\r\n };\r\n\r\n /*\tEvery input option is tested and parsed. This'll prevent\r\n endless validation in internal methods. These tests are\r\n structured with an item for every option available. An\r\n option can be marked as required by setting the 'r' flag.\r\n The testing function is provided with three arguments:\r\n - The provided value for the option;\r\n - A reference to the options object;\r\n - The name for the option;\r\n\r\n The testing function returns false when an error is detected,\r\n or true when everything is OK. It can also modify the option\r\n object, to make sure all values can be correctly looped elsewhere. */\r\n\r\n var defaultFormatter = {\r\n to: function(value) {\r\n return value !== undefined && value.toFixed(2);\r\n },\r\n from: Number\r\n };\r\n\r\n function validateFormat(entry) {\r\n // Any object with a to and from method is supported.\r\n if (isValidFormatter(entry)) {\r\n return true;\r\n }\r\n\r\n throw new Error(\"noUiSlider (\" + VERSION + \"): 'format' requires 'to' and 'from' methods.\");\r\n }\r\n\r\n function testStep(parsed, entry) {\r\n if (!isNumeric(entry)) {\r\n throw new Error(\"noUiSlider (\" + VERSION + \"): 'step' is not numeric.\");\r\n }\r\n\r\n // The step option can still be used to set stepping\r\n // for linear sliders. Overwritten if set in 'range'.\r\n parsed.singleStep = entry;\r\n }\r\n\r\n function testRange(parsed, entry) {\r\n // Filter incorrect input.\r\n if (typeof entry !== \"object\" || Array.isArray(entry)) {\r\n throw new Error(\"noUiSlider (\" + VERSION + \"): 'range' is not an object.\");\r\n }\r\n\r\n // Catch missing start or end.\r\n if (entry.min === undefined || entry.max === undefined) {\r\n throw new Error(\"noUiSlider (\" + VERSION + \"): Missing 'min' or 'max' in 'range'.\");\r\n }\r\n\r\n // Catch equal start or end.\r\n if (entry.min === entry.max) {\r\n throw new Error(\"noUiSlider (\" + VERSION + \"): 'range' 'min' and 'max' cannot be equal.\");\r\n }\r\n\r\n parsed.spectrum = new Spectrum(entry, parsed.snap, parsed.singleStep);\r\n }\r\n\r\n function testStart(parsed, entry) {\r\n entry = asArray(entry);\r\n\r\n // Validate input. Values aren't tested, as the public .val method\r\n // will always provide a valid location.\r\n if (!Array.isArray(entry) || !entry.length) {\r\n throw new Error(\"noUiSlider (\" + VERSION + \"): 'start' option is incorrect.\");\r\n }\r\n\r\n // Store the number of handles.\r\n parsed.handles = entry.length;\r\n\r\n // When the slider is initialized, the .val method will\r\n // be called with the start options.\r\n parsed.start = entry;\r\n }\r\n\r\n function testSnap(parsed, entry) {\r\n // Enforce 100% stepping within subranges.\r\n parsed.snap = entry;\r\n\r\n if (typeof entry !== \"boolean\") {\r\n throw new Error(\"noUiSlider (\" + VERSION + \"): 'snap' option must be a boolean.\");\r\n }\r\n }\r\n\r\n function testAnimate(parsed, entry) {\r\n // Enforce 100% stepping within subranges.\r\n parsed.animate = entry;\r\n\r\n if (typeof entry !== \"boolean\") {\r\n throw new Error(\"noUiSlider (\" + VERSION + \"): 'animate' option must be a boolean.\");\r\n }\r\n }\r\n\r\n function testAnimationDuration(parsed, entry) {\r\n parsed.animationDuration = entry;\r\n\r\n if (typeof entry !== \"number\") {\r\n throw new Error(\"noUiSlider (\" + VERSION + \"): 'animationDuration' option must be a number.\");\r\n }\r\n }\r\n\r\n function testConnect(parsed, entry) {\r\n var connect = [false];\r\n var i;\r\n\r\n // Map legacy options\r\n if (entry === \"lower\") {\r\n entry = [true, false];\r\n } else if (entry === \"upper\") {\r\n entry = [false, true];\r\n }\r\n\r\n // Handle boolean options\r\n if (entry === true || entry === false) {\r\n for (i = 1; i < parsed.handles; i++) {\r\n connect.push(entry);\r\n }\r\n\r\n connect.push(false);\r\n }\r\n\r\n // Reject invalid input\r\n else if (!Array.isArray(entry) || !entry.length || entry.length !== parsed.handles + 1) {\r\n throw new Error(\"noUiSlider (\" + VERSION + \"): 'connect' option doesn't match handle count.\");\r\n } else {\r\n connect = entry;\r\n }\r\n\r\n parsed.connect = connect;\r\n }\r\n\r\n function testOrientation(parsed, entry) {\r\n // Set orientation to an a numerical value for easy\r\n // array selection.\r\n switch (entry) {\r\n case \"horizontal\":\r\n parsed.ort = 0;\r\n break;\r\n case \"vertical\":\r\n parsed.ort = 1;\r\n break;\r\n default:\r\n throw new Error(\"noUiSlider (\" + VERSION + \"): 'orientation' option is invalid.\");\r\n }\r\n }\r\n\r\n function testMargin(parsed, entry) {\r\n if (!isNumeric(entry)) {\r\n throw new Error(\"noUiSlider (\" + VERSION + \"): 'margin' option must be numeric.\");\r\n }\r\n\r\n // Issue #582\r\n if (entry === 0) {\r\n return;\r\n }\r\n\r\n parsed.margin = parsed.spectrum.getMargin(entry);\r\n\r\n if (!parsed.margin) {\r\n throw new Error(\"noUiSlider (\" + VERSION + \"): 'margin' option is only supported on linear sliders.\");\r\n }\r\n }\r\n\r\n function testLimit(parsed, entry) {\r\n if (!isNumeric(entry)) {\r\n throw new Error(\"noUiSlider (\" + VERSION + \"): 'limit' option must be numeric.\");\r\n }\r\n\r\n parsed.limit = parsed.spectrum.getMargin(entry);\r\n\r\n if (!parsed.limit || parsed.handles < 2) {\r\n throw new Error(\r\n \"noUiSlider (\" +\r\n VERSION +\r\n \"): 'limit' option is only supported on linear sliders with 2 or more handles.\"\r\n );\r\n }\r\n }\r\n\r\n function testPadding(parsed, entry) {\r\n if (!isNumeric(entry) && !Array.isArray(entry)) {\r\n throw new Error(\r\n \"noUiSlider (\" + VERSION + \"): 'padding' option must be numeric or array of exactly 2 numbers.\"\r\n );\r\n }\r\n\r\n if (Array.isArray(entry) && !(entry.length === 2 || isNumeric(entry[0]) || isNumeric(entry[1]))) {\r\n throw new Error(\r\n \"noUiSlider (\" + VERSION + \"): 'padding' option must be numeric or array of exactly 2 numbers.\"\r\n );\r\n }\r\n\r\n if (entry === 0) {\r\n return;\r\n }\r\n\r\n if (!Array.isArray(entry)) {\r\n entry = [entry, entry];\r\n }\r\n\r\n // 'getMargin' returns false for invalid values.\r\n parsed.padding = [parsed.spectrum.getMargin(entry[0]), parsed.spectrum.getMargin(entry[1])];\r\n\r\n if (parsed.padding[0] === false || parsed.padding[1] === false) {\r\n throw new Error(\"noUiSlider (\" + VERSION + \"): 'padding' option is only supported on linear sliders.\");\r\n }\r\n\r\n if (parsed.padding[0] < 0 || parsed.padding[1] < 0) {\r\n throw new Error(\"noUiSlider (\" + VERSION + \"): 'padding' option must be a positive number(s).\");\r\n }\r\n\r\n if (parsed.padding[0] + parsed.padding[1] >= 100) {\r\n throw new Error(\"noUiSlider (\" + VERSION + \"): 'padding' option must not exceed 100% of the range.\");\r\n }\r\n }\r\n\r\n function testDirection(parsed, entry) {\r\n // Set direction as a numerical value for easy parsing.\r\n // Invert connection for RTL sliders, so that the proper\r\n // handles get the connect/background classes.\r\n switch (entry) {\r\n case \"ltr\":\r\n parsed.dir = 0;\r\n break;\r\n case \"rtl\":\r\n parsed.dir = 1;\r\n break;\r\n default:\r\n throw new Error(\"noUiSlider (\" + VERSION + \"): 'direction' option was not recognized.\");\r\n }\r\n }\r\n\r\n function testBehaviour(parsed, entry) {\r\n // Make sure the input is a string.\r\n if (typeof entry !== \"string\") {\r\n throw new Error(\"noUiSlider (\" + VERSION + \"): 'behaviour' must be a string containing options.\");\r\n }\r\n\r\n // Check if the string contains any keywords.\r\n // None are required.\r\n var tap = entry.indexOf(\"tap\") >= 0;\r\n var drag = entry.indexOf(\"drag\") >= 0;\r\n var fixed = entry.indexOf(\"fixed\") >= 0;\r\n var snap = entry.indexOf(\"snap\") >= 0;\r\n var hover = entry.indexOf(\"hover\") >= 0;\r\n var unconstrained = entry.indexOf(\"unconstrained\") >= 0;\r\n\r\n if (fixed) {\r\n if (parsed.handles !== 2) {\r\n throw new Error(\"noUiSlider (\" + VERSION + \"): 'fixed' behaviour must be used with 2 handles\");\r\n }\r\n\r\n // Use margin to enforce fixed state\r\n testMargin(parsed, parsed.start[1] - parsed.start[0]);\r\n }\r\n\r\n if (unconstrained && (parsed.margin || parsed.limit)) {\r\n throw new Error(\r\n \"noUiSlider (\" + VERSION + \"): 'unconstrained' behaviour cannot be used with margin or limit\"\r\n );\r\n }\r\n\r\n parsed.events = {\r\n tap: tap || snap,\r\n drag: drag,\r\n fixed: fixed,\r\n snap: snap,\r\n hover: hover,\r\n unconstrained: unconstrained\r\n };\r\n }\r\n\r\n function testTooltips(parsed, entry) {\r\n if (entry === false) {\r\n return;\r\n }\r\n\r\n if (entry === true) {\r\n parsed.tooltips = [];\r\n\r\n for (var i = 0; i < parsed.handles; i++) {\r\n parsed.tooltips.push(true);\r\n }\r\n } else {\r\n parsed.tooltips = asArray(entry);\r\n\r\n if (parsed.tooltips.length !== parsed.handles) {\r\n throw new Error(\"noUiSlider (\" + VERSION + \"): must pass a formatter for all handles.\");\r\n }\r\n\r\n parsed.tooltips.forEach(function(formatter) {\r\n if (\r\n typeof formatter !== \"boolean\" &&\r\n (typeof formatter !== \"object\" || typeof formatter.to !== \"function\")\r\n ) {\r\n throw new Error(\"noUiSlider (\" + VERSION + \"): 'tooltips' must be passed a formatter or 'false'.\");\r\n }\r\n });\r\n }\r\n }\r\n\r\n function testAriaFormat(parsed, entry) {\r\n parsed.ariaFormat = entry;\r\n validateFormat(entry);\r\n }\r\n\r\n function testFormat(parsed, entry) {\r\n parsed.format = entry;\r\n validateFormat(entry);\r\n }\r\n\r\n function testKeyboardSupport(parsed, entry) {\r\n parsed.keyboardSupport = entry;\r\n\r\n if (typeof entry !== \"boolean\") {\r\n throw new Error(\"noUiSlider (\" + VERSION + \"): 'keyboardSupport' option must be a boolean.\");\r\n }\r\n }\r\n\r\n function testDocumentElement(parsed, entry) {\r\n // This is an advanced option. Passed values are used without validation.\r\n parsed.documentElement = entry;\r\n }\r\n\r\n function testCssPrefix(parsed, entry) {\r\n if (typeof entry !== \"string\" && entry !== false) {\r\n throw new Error(\"noUiSlider (\" + VERSION + \"): 'cssPrefix' must be a string or `false`.\");\r\n }\r\n\r\n parsed.cssPrefix = entry;\r\n }\r\n\r\n function testCssClasses(parsed, entry) {\r\n if (typeof entry !== \"object\") {\r\n throw new Error(\"noUiSlider (\" + VERSION + \"): 'cssClasses' must be an object.\");\r\n }\r\n\r\n if (typeof parsed.cssPrefix === \"string\") {\r\n parsed.cssClasses = {};\r\n\r\n for (var key in entry) {\r\n if (!entry.hasOwnProperty(key)) {\r\n continue;\r\n }\r\n\r\n parsed.cssClasses[key] = parsed.cssPrefix + entry[key];\r\n }\r\n } else {\r\n parsed.cssClasses = entry;\r\n }\r\n }\r\n\r\n // Test all developer settings and parse to assumption-safe values.\r\n function testOptions(options) {\r\n // To prove a fix for #537, freeze options here.\r\n // If the object is modified, an error will be thrown.\r\n // Object.freeze(options);\r\n\r\n var parsed = {\r\n margin: 0,\r\n limit: 0,\r\n padding: 0,\r\n animate: true,\r\n animationDuration: 300,\r\n ariaFormat: defaultFormatter,\r\n format: defaultFormatter\r\n };\r\n\r\n // Tests are executed in the order they are presented here.\r\n var tests = {\r\n step: { r: false, t: testStep },\r\n start: { r: true, t: testStart },\r\n connect: { r: true, t: testConnect },\r\n direction: { r: true, t: testDirection },\r\n snap: { r: false, t: testSnap },\r\n animate: { r: false, t: testAnimate },\r\n animationDuration: { r: false, t: testAnimationDuration },\r\n range: { r: true, t: testRange },\r\n orientation: { r: false, t: testOrientation },\r\n margin: { r: false, t: testMargin },\r\n limit: { r: false, t: testLimit },\r\n padding: { r: false, t: testPadding },\r\n behaviour: { r: true, t: testBehaviour },\r\n ariaFormat: { r: false, t: testAriaFormat },\r\n format: { r: false, t: testFormat },\r\n tooltips: { r: false, t: testTooltips },\r\n keyboardSupport: { r: true, t: testKeyboardSupport },\r\n documentElement: { r: false, t: testDocumentElement },\r\n cssPrefix: { r: true, t: testCssPrefix },\r\n cssClasses: { r: true, t: testCssClasses }\r\n };\r\n\r\n var defaults = {\r\n connect: false,\r\n direction: \"ltr\",\r\n behaviour: \"tap\",\r\n orientation: \"horizontal\",\r\n keyboardSupport: true,\r\n cssPrefix: \"noUi-\",\r\n cssClasses: {\r\n target: \"target\",\r\n base: \"base\",\r\n origin: \"origin\",\r\n handle: \"handle\",\r\n handleLower: \"handle-lower\",\r\n handleUpper: \"handle-upper\",\r\n horizontal: \"horizontal\",\r\n vertical: \"vertical\",\r\n background: \"background\",\r\n connect: \"connect\",\r\n connects: \"connects\",\r\n ltr: \"ltr\",\r\n rtl: \"rtl\",\r\n draggable: \"draggable\",\r\n drag: \"state-drag\",\r\n tap: \"state-tap\",\r\n active: \"active\",\r\n tooltip: \"tooltip\",\r\n pips: \"pips\",\r\n pipsHorizontal: \"pips-horizontal\",\r\n pipsVertical: \"pips-vertical\",\r\n marker: \"marker\",\r\n markerHorizontal: \"marker-horizontal\",\r\n markerVertical: \"marker-vertical\",\r\n markerNormal: \"marker-normal\",\r\n markerLarge: \"marker-large\",\r\n markerSub: \"marker-sub\",\r\n value: \"value\",\r\n valueHorizontal: \"value-horizontal\",\r\n valueVertical: \"value-vertical\",\r\n valueNormal: \"value-normal\",\r\n valueLarge: \"value-large\",\r\n valueSub: \"value-sub\"\r\n }\r\n };\r\n\r\n // AriaFormat defaults to regular format, if any.\r\n if (options.format && !options.ariaFormat) {\r\n options.ariaFormat = options.format;\r\n }\r\n\r\n // Run all options through a testing mechanism to ensure correct\r\n // input. It should be noted that options might get modified to\r\n // be handled properly. E.g. wrapping integers in arrays.\r\n Object.keys(tests).forEach(function(name) {\r\n // If the option isn't set, but it is required, throw an error.\r\n if (!isSet(options[name]) && defaults[name] === undefined) {\r\n if (tests[name].r) {\r\n throw new Error(\"noUiSlider (\" + VERSION + \"): '\" + name + \"' is required.\");\r\n }\r\n\r\n return true;\r\n }\r\n\r\n tests[name].t(parsed, !isSet(options[name]) ? defaults[name] : options[name]);\r\n });\r\n\r\n // Forward pips options\r\n parsed.pips = options.pips;\r\n\r\n // All recent browsers accept unprefixed transform.\r\n // We need -ms- for IE9 and -webkit- for older Android;\r\n // Assume use of -webkit- if unprefixed and -ms- are not supported.\r\n // https://caniuse.com/#feat=transforms2d\r\n var d = document.createElement(\"div\");\r\n var msPrefix = d.style.msTransform !== undefined;\r\n var noPrefix = d.style.transform !== undefined;\r\n\r\n parsed.transformRule = noPrefix ? \"transform\" : msPrefix ? \"msTransform\" : \"webkitTransform\";\r\n\r\n // Pips don't move, so we can place them using left/top.\r\n var styles = [[\"left\", \"top\"], [\"right\", \"bottom\"]];\r\n\r\n parsed.style = styles[parsed.dir][parsed.ort];\r\n\r\n return parsed;\r\n }\r\n\r\n function scope(target, options, originalOptions) {\r\n var actions = getActions();\r\n var supportsTouchActionNone = getSupportsTouchActionNone();\r\n var supportsPassive = supportsTouchActionNone && getSupportsPassive();\r\n\r\n // All variables local to 'scope' are prefixed with 'scope_'\r\n var scope_Target = target;\r\n var scope_Locations = [];\r\n var scope_Base;\r\n var scope_Handles;\r\n var scope_HandleNumbers = [];\r\n var scope_ActiveHandlesCount = 0;\r\n var scope_Connects;\r\n var scope_Spectrum = options.spectrum;\r\n var scope_Values = [];\r\n var scope_Events = {};\r\n var scope_Self;\r\n var scope_Pips;\r\n var scope_Document = target.ownerDocument;\r\n var scope_DocumentElement = options.documentElement || scope_Document.documentElement;\r\n var scope_Body = scope_Document.body;\r\n\r\n // Pips constants\r\n var PIPS_NONE = -1;\r\n var PIPS_NO_VALUE = 0;\r\n var PIPS_LARGE_VALUE = 1;\r\n var PIPS_SMALL_VALUE = 2;\r\n\r\n // For horizontal sliders in standard ltr documents,\r\n // make .noUi-origin overflow to the left so the document doesn't scroll.\r\n var scope_DirOffset = scope_Document.dir === \"rtl\" || options.ort === 1 ? 0 : 100;\r\n\r\n // Creates a node, adds it to target, returns the new node.\r\n function addNodeTo(addTarget, className) {\r\n var div = scope_Document.createElement(\"div\");\r\n\r\n if (className) {\r\n addClass(div, className);\r\n }\r\n\r\n addTarget.appendChild(div);\r\n\r\n return div;\r\n }\r\n\r\n // Append a origin to the base\r\n function addOrigin(base, handleNumber) {\r\n var origin = addNodeTo(base, options.cssClasses.origin);\r\n var handle = addNodeTo(origin, options.cssClasses.handle);\r\n\r\n handle.setAttribute(\"data-handle\", handleNumber);\r\n\r\n if (options.keyboardSupport) {\r\n // https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/tabindex\r\n // 0 = focusable and reachable\r\n handle.setAttribute(\"tabindex\", \"0\");\r\n }\r\n\r\n handle.setAttribute(\"role\", \"slider\");\r\n handle.setAttribute(\"aria-orientation\", options.ort ? \"vertical\" : \"horizontal\");\r\n\r\n if (handleNumber === 0) {\r\n addClass(handle, options.cssClasses.handleLower);\r\n } else if (handleNumber === options.handles - 1) {\r\n addClass(handle, options.cssClasses.handleUpper);\r\n }\r\n\r\n return origin;\r\n }\r\n\r\n // Insert nodes for connect elements\r\n function addConnect(base, add) {\r\n if (!add) {\r\n return false;\r\n }\r\n\r\n return addNodeTo(base, options.cssClasses.connect);\r\n }\r\n\r\n // Add handles to the slider base.\r\n function addElements(connectOptions, base) {\r\n var connectBase = addNodeTo(base, options.cssClasses.connects);\r\n\r\n scope_Handles = [];\r\n scope_Connects = [];\r\n\r\n scope_Connects.push(addConnect(connectBase, connectOptions[0]));\r\n\r\n // [::::O====O====O====]\r\n // connectOptions = [0, 1, 1, 1]\r\n\r\n for (var i = 0; i < options.handles; i++) {\r\n // Keep a list of all added handles.\r\n scope_Handles.push(addOrigin(base, i));\r\n scope_HandleNumbers[i] = i;\r\n scope_Connects.push(addConnect(connectBase, connectOptions[i + 1]));\r\n }\r\n }\r\n\r\n // Initialize a single slider.\r\n function addSlider(addTarget) {\r\n // Apply classes and data to the target.\r\n addClass(addTarget, options.cssClasses.target);\r\n\r\n if (options.dir === 0) {\r\n addClass(addTarget, options.cssClasses.ltr);\r\n } else {\r\n addClass(addTarget, options.cssClasses.rtl);\r\n }\r\n\r\n if (options.ort === 0) {\r\n addClass(addTarget, options.cssClasses.horizontal);\r\n } else {\r\n addClass(addTarget, options.cssClasses.vertical);\r\n }\r\n\r\n return addNodeTo(addTarget, options.cssClasses.base);\r\n }\r\n\r\n function addTooltip(handle, handleNumber) {\r\n if (!options.tooltips[handleNumber]) {\r\n return false;\r\n }\r\n\r\n return addNodeTo(handle.firstChild, options.cssClasses.tooltip);\r\n }\r\n\r\n // The tooltips option is a shorthand for using the 'update' event.\r\n function tooltips() {\r\n // Tooltips are added with options.tooltips in original order.\r\n var tips = scope_Handles.map(addTooltip);\r\n\r\n bindEvent(\"update\", function(values, handleNumber, unencoded) {\r\n if (!tips[handleNumber]) {\r\n return;\r\n }\r\n\r\n var formattedValue = values[handleNumber];\r\n\r\n if (options.tooltips[handleNumber] !== true) {\r\n formattedValue = options.tooltips[handleNumber].to(unencoded[handleNumber]);\r\n }\r\n\r\n tips[handleNumber].innerHTML = formattedValue;\r\n });\r\n }\r\n\r\n function aria() {\r\n bindEvent(\"update\", function(values, handleNumber, unencoded, tap, positions) {\r\n // Update Aria Values for all handles, as a change in one changes min and max values for the next.\r\n scope_HandleNumbers.forEach(function(index) {\r\n var handle = scope_Handles[index];\r\n\r\n var min = checkHandlePosition(scope_Locations, index, 0, true, true, true);\r\n var max = checkHandlePosition(scope_Locations, index, 100, true, true, true);\r\n\r\n var now = positions[index];\r\n\r\n // Formatted value for display\r\n var text = options.ariaFormat.to(unencoded[index]);\r\n\r\n // Map to slider range values\r\n min = scope_Spectrum.fromStepping(min).toFixed(1);\r\n max = scope_Spectrum.fromStepping(max).toFixed(1);\r\n now = scope_Spectrum.fromStepping(now).toFixed(1);\r\n\r\n handle.children[0].setAttribute(\"aria-valuemin\", min);\r\n handle.children[0].setAttribute(\"aria-valuemax\", max);\r\n handle.children[0].setAttribute(\"aria-valuenow\", now);\r\n handle.children[0].setAttribute(\"aria-valuetext\", text);\r\n });\r\n });\r\n }\r\n\r\n function getGroup(mode, values, stepped) {\r\n // Use the range.\r\n if (mode === \"range\" || mode === \"steps\") {\r\n return scope_Spectrum.xVal;\r\n }\r\n\r\n if (mode === \"count\") {\r\n if (values < 2) {\r\n throw new Error(\"noUiSlider (\" + VERSION + \"): 'values' (>= 2) required for mode 'count'.\");\r\n }\r\n\r\n // Divide 0 - 100 in 'count' parts.\r\n var interval = values - 1;\r\n var spread = 100 / interval;\r\n\r\n values = [];\r\n\r\n // List these parts and have them handled as 'positions'.\r\n while (interval--) {\r\n values[interval] = interval * spread;\r\n }\r\n\r\n values.push(100);\r\n\r\n mode = \"positions\";\r\n }\r\n\r\n if (mode === \"positions\") {\r\n // Map all percentages to on-range values.\r\n return values.map(function(value) {\r\n return scope_Spectrum.fromStepping(stepped ? scope_Spectrum.getStep(value) : value);\r\n });\r\n }\r\n\r\n if (mode === \"values\") {\r\n // If the value must be stepped, it needs to be converted to a percentage first.\r\n if (stepped) {\r\n return values.map(function(value) {\r\n // Convert to percentage, apply step, return to value.\r\n return scope_Spectrum.fromStepping(scope_Spectrum.getStep(scope_Spectrum.toStepping(value)));\r\n });\r\n }\r\n\r\n // Otherwise, we can simply use the values.\r\n return values;\r\n }\r\n }\r\n\r\n function generateSpread(density, mode, group) {\r\n function safeIncrement(value, increment) {\r\n // Avoid floating point variance by dropping the smallest decimal places.\r\n return (value + increment).toFixed(7) / 1;\r\n }\r\n\r\n var indexes = {};\r\n var firstInRange = scope_Spectrum.xVal[0];\r\n var lastInRange = scope_Spectrum.xVal[scope_Spectrum.xVal.length - 1];\r\n var ignoreFirst = false;\r\n var ignoreLast = false;\r\n var prevPct = 0;\r\n\r\n // Create a copy of the group, sort it and filter away all duplicates.\r\n group = unique(\r\n group.slice().sort(function(a, b) {\r\n return a - b;\r\n })\r\n );\r\n\r\n // Make sure the range starts with the first element.\r\n if (group[0] !== firstInRange) {\r\n group.unshift(firstInRange);\r\n ignoreFirst = true;\r\n }\r\n\r\n // Likewise for the last one.\r\n if (group[group.length - 1] !== lastInRange) {\r\n group.push(lastInRange);\r\n ignoreLast = true;\r\n }\r\n\r\n group.forEach(function(current, index) {\r\n // Get the current step and the lower + upper positions.\r\n var step;\r\n var i;\r\n var q;\r\n var low = current;\r\n var high = group[index + 1];\r\n var newPct;\r\n var pctDifference;\r\n var pctPos;\r\n var type;\r\n var steps;\r\n var realSteps;\r\n var stepSize;\r\n var isSteps = mode === \"steps\";\r\n\r\n // When using 'steps' mode, use the provided steps.\r\n // Otherwise, we'll step on to the next subrange.\r\n if (isSteps) {\r\n step = scope_Spectrum.xNumSteps[index];\r\n }\r\n\r\n // Default to a 'full' step.\r\n if (!step) {\r\n step = high - low;\r\n }\r\n\r\n // Low can be 0, so test for false. If high is undefined,\r\n // we are at the last subrange. Index 0 is already handled.\r\n if (low === false || high === undefined) {\r\n return;\r\n }\r\n\r\n // Make sure step isn't 0, which would cause an infinite loop (#654)\r\n step = Math.max(step, 0.0000001);\r\n\r\n // Find all steps in the subrange.\r\n for (i = low; i <= high; i = safeIncrement(i, step)) {\r\n // Get the percentage value for the current step,\r\n // calculate the size for the subrange.\r\n newPct = scope_Spectrum.toStepping(i);\r\n pctDifference = newPct - prevPct;\r\n\r\n steps = pctDifference / density;\r\n realSteps = Math.round(steps);\r\n\r\n // This ratio represents the amount of percentage-space a point indicates.\r\n // For a density 1 the points/percentage = 1. For density 2, that percentage needs to be re-divided.\r\n // Round the percentage offset to an even number, then divide by two\r\n // to spread the offset on both sides of the range.\r\n stepSize = pctDifference / realSteps;\r\n\r\n // Divide all points evenly, adding the correct number to this subrange.\r\n // Run up to <= so that 100% gets a point, event if ignoreLast is set.\r\n for (q = 1; q <= realSteps; q += 1) {\r\n // The ratio between the rounded value and the actual size might be ~1% off.\r\n // Correct the percentage offset by the number of points\r\n // per subrange. density = 1 will result in 100 points on the\r\n // full range, 2 for 50, 4 for 25, etc.\r\n pctPos = prevPct + q * stepSize;\r\n indexes[pctPos.toFixed(5)] = [scope_Spectrum.fromStepping(pctPos), 0];\r\n }\r\n\r\n // Determine the point type.\r\n type = group.indexOf(i) > -1 ? PIPS_LARGE_VALUE : isSteps ? PIPS_SMALL_VALUE : PIPS_NO_VALUE;\r\n\r\n // Enforce the 'ignoreFirst' option by overwriting the type for 0.\r\n if (!index && ignoreFirst) {\r\n type = 0;\r\n }\r\n\r\n if (!(i === high && ignoreLast)) {\r\n // Mark the 'type' of this point. 0 = plain, 1 = real value, 2 = step value.\r\n indexes[newPct.toFixed(5)] = [i, type];\r\n }\r\n\r\n // Update the percentage count.\r\n prevPct = newPct;\r\n }\r\n });\r\n\r\n return indexes;\r\n }\r\n\r\n function addMarking(spread, filterFunc, formatter) {\r\n var element = scope_Document.createElement(\"div\");\r\n\r\n var valueSizeClasses = [];\r\n valueSizeClasses[PIPS_NO_VALUE] = options.cssClasses.valueNormal;\r\n valueSizeClasses[PIPS_LARGE_VALUE] = options.cssClasses.valueLarge;\r\n valueSizeClasses[PIPS_SMALL_VALUE] = options.cssClasses.valueSub;\r\n\r\n var markerSizeClasses = [];\r\n markerSizeClasses[PIPS_NO_VALUE] = options.cssClasses.markerNormal;\r\n markerSizeClasses[PIPS_LARGE_VALUE] = options.cssClasses.markerLarge;\r\n markerSizeClasses[PIPS_SMALL_VALUE] = options.cssClasses.markerSub;\r\n\r\n var valueOrientationClasses = [options.cssClasses.valueHorizontal, options.cssClasses.valueVertical];\r\n var markerOrientationClasses = [options.cssClasses.markerHorizontal, options.cssClasses.markerVertical];\r\n\r\n addClass(element, options.cssClasses.pips);\r\n addClass(element, options.ort === 0 ? options.cssClasses.pipsHorizontal : options.cssClasses.pipsVertical);\r\n\r\n function getClasses(type, source) {\r\n var a = source === options.cssClasses.value;\r\n var orientationClasses = a ? valueOrientationClasses : markerOrientationClasses;\r\n var sizeClasses = a ? valueSizeClasses : markerSizeClasses;\r\n\r\n return source + \" \" + orientationClasses[options.ort] + \" \" + sizeClasses[type];\r\n }\r\n\r\n function addSpread(offset, value, type) {\r\n // Apply the filter function, if it is set.\r\n type = filterFunc ? filterFunc(value, type) : type;\r\n\r\n if (type === PIPS_NONE) {\r\n return;\r\n }\r\n\r\n // Add a marker for every point\r\n var node = addNodeTo(element, false);\r\n node.className = getClasses(type, options.cssClasses.marker);\r\n node.style[options.style] = offset + \"%\";\r\n\r\n // Values are only appended for points marked '1' or '2'.\r\n if (type > PIPS_NO_VALUE) {\r\n node = addNodeTo(element, false);\r\n node.className = getClasses(type, options.cssClasses.value);\r\n node.setAttribute(\"data-value\", value);\r\n node.style[options.style] = offset + \"%\";\r\n node.innerHTML = formatter.to(value);\r\n }\r\n }\r\n\r\n // Append all points.\r\n Object.keys(spread).forEach(function(offset) {\r\n addSpread(offset, spread[offset][0], spread[offset][1]);\r\n });\r\n\r\n return element;\r\n }\r\n\r\n function removePips() {\r\n if (scope_Pips) {\r\n removeElement(scope_Pips);\r\n scope_Pips = null;\r\n }\r\n }\r\n\r\n function pips(grid) {\r\n // Fix #669\r\n removePips();\r\n\r\n var mode = grid.mode;\r\n var density = grid.density || 1;\r\n var filter = grid.filter || false;\r\n var values = grid.values || false;\r\n var stepped = grid.stepped || false;\r\n var group = getGroup(mode, values, stepped);\r\n var spread = generateSpread(density, mode, group);\r\n var format = grid.format || {\r\n to: Math.round\r\n };\r\n\r\n scope_Pips = scope_Target.appendChild(addMarking(spread, filter, format));\r\n\r\n return scope_Pips;\r\n }\r\n\r\n // Shorthand for base dimensions.\r\n function baseSize() {\r\n var rect = scope_Base.getBoundingClientRect();\r\n var alt = \"offset\" + [\"Width\", \"Height\"][options.ort];\r\n return options.ort === 0 ? rect.width || scope_Base[alt] : rect.height || scope_Base[alt];\r\n }\r\n\r\n // Handler for attaching events trough a proxy.\r\n function attachEvent(events, element, callback, data) {\r\n // This function can be used to 'filter' events to the slider.\r\n // element is a node, not a nodeList\r\n\r\n var method = function(e) {\r\n e = fixEvent(e, data.pageOffset, data.target || element);\r\n\r\n // fixEvent returns false if this event has a different target\r\n // when handling (multi-) touch events;\r\n if (!e) {\r\n return false;\r\n }\r\n\r\n // doNotReject is passed by all end events to make sure released touches\r\n // are not rejected, leaving the slider \"stuck\" to the cursor;\r\n if (scope_Target.hasAttribute(\"disabled\") && !data.doNotReject) {\r\n return false;\r\n }\r\n\r\n // Stop if an active 'tap' transition is taking place.\r\n if (hasClass(scope_Target, options.cssClasses.tap) && !data.doNotReject) {\r\n return false;\r\n }\r\n\r\n // Ignore right or middle clicks on start #454\r\n if (events === actions.start && e.buttons !== undefined && e.buttons > 1) {\r\n return false;\r\n }\r\n\r\n // Ignore right or middle clicks on start #454\r\n if (data.hover && e.buttons) {\r\n return false;\r\n }\r\n\r\n // 'supportsPassive' is only true if a browser also supports touch-action: none in CSS.\r\n // iOS safari does not, so it doesn't get to benefit from passive scrolling. iOS does support\r\n // touch-action: manipulation, but that allows panning, which breaks\r\n // sliders after zooming/on non-responsive pages.\r\n // See: https://bugs.webkit.org/show_bug.cgi?id=133112\r\n if (!supportsPassive) {\r\n e.preventDefault();\r\n }\r\n\r\n e.calcPoint = e.points[options.ort];\r\n\r\n // Call the event handler with the event [ and additional data ].\r\n callback(e, data);\r\n };\r\n\r\n var methods = [];\r\n\r\n // Bind a closure on the target for every event type.\r\n events.split(\" \").forEach(function(eventName) {\r\n element.addEventListener(eventName, method, supportsPassive ? { passive: true } : false);\r\n methods.push([eventName, method]);\r\n });\r\n\r\n return methods;\r\n }\r\n\r\n // Provide a clean event with standardized offset values.\r\n function fixEvent(e, pageOffset, eventTarget) {\r\n // Filter the event to register the type, which can be\r\n // touch, mouse or pointer. Offset changes need to be\r\n // made on an event specific basis.\r\n var touch = e.type.indexOf(\"touch\") === 0;\r\n var mouse = e.type.indexOf(\"mouse\") === 0;\r\n var pointer = e.type.indexOf(\"pointer\") === 0;\r\n\r\n var x;\r\n var y;\r\n\r\n // IE10 implemented pointer events with a prefix;\r\n if (e.type.indexOf(\"MSPointer\") === 0) {\r\n pointer = true;\r\n }\r\n\r\n // The only thing one handle should be concerned about is the touches that originated on top of it.\r\n if (touch) {\r\n // Returns true if a touch originated on the target.\r\n var isTouchOnTarget = function(checkTouch) {\r\n return checkTouch.target === eventTarget || eventTarget.contains(checkTouch.target);\r\n };\r\n\r\n // In the case of touchstart events, we need to make sure there is still no more than one\r\n // touch on the target so we look amongst all touches.\r\n if (e.type === \"touchstart\") {\r\n var targetTouches = Array.prototype.filter.call(e.touches, isTouchOnTarget);\r\n\r\n // Do not support more than one touch per handle.\r\n if (targetTouches.length > 1) {\r\n return false;\r\n }\r\n\r\n x = targetTouches[0].pageX;\r\n y = targetTouches[0].pageY;\r\n } else {\r\n // In the other cases, find on changedTouches is enough.\r\n var targetTouch = Array.prototype.find.call(e.changedTouches, isTouchOnTarget);\r\n\r\n // Cancel if the target touch has not moved.\r\n if (!targetTouch) {\r\n return false;\r\n }\r\n\r\n x = targetTouch.pageX;\r\n y = targetTouch.pageY;\r\n }\r\n }\r\n\r\n pageOffset = pageOffset || getPageOffset(scope_Document);\r\n\r\n if (mouse || pointer) {\r\n x = e.clientX + pageOffset.x;\r\n y = e.clientY + pageOffset.y;\r\n }\r\n\r\n e.pageOffset = pageOffset;\r\n e.points = [x, y];\r\n e.cursor = mouse || pointer; // Fix #435\r\n\r\n return e;\r\n }\r\n\r\n // Translate a coordinate in the document to a percentage on the slider\r\n function calcPointToPercentage(calcPoint) {\r\n var location = calcPoint - offset(scope_Base, options.ort);\r\n var proposal = (location * 100) / baseSize();\r\n\r\n // Clamp proposal between 0% and 100%\r\n // Out-of-bound coordinates may occur when .noUi-base pseudo-elements\r\n // are used (e.g. contained handles feature)\r\n proposal = limit(proposal);\r\n\r\n return options.dir ? 100 - proposal : proposal;\r\n }\r\n\r\n // Find handle closest to a certain percentage on the slider\r\n function getClosestHandle(proposal) {\r\n var closest = 100;\r\n var handleNumber = false;\r\n\r\n scope_Handles.forEach(function(handle, index) {\r\n // Disabled handles are ignored\r\n if (handle.hasAttribute(\"disabled\")) {\r\n return;\r\n }\r\n\r\n var pos = Math.abs(scope_Locations[index] - proposal);\r\n\r\n if (pos < closest || (pos === 100 && closest === 100)) {\r\n handleNumber = index;\r\n closest = pos;\r\n }\r\n });\r\n\r\n return handleNumber;\r\n }\r\n\r\n // Fire 'end' when a mouse or pen leaves the document.\r\n function documentLeave(event, data) {\r\n if (event.type === \"mouseout\" && event.target.nodeName === \"HTML\" && event.relatedTarget === null) {\r\n eventEnd(event, data);\r\n }\r\n }\r\n\r\n // Handle movement on document for handle and range drag.\r\n function eventMove(event, data) {\r\n // Fix #498\r\n // Check value of .buttons in 'start' to work around a bug in IE10 mobile (data.buttonsProperty).\r\n // https://connect.microsoft.com/IE/feedback/details/927005/mobile-ie10-windows-phone-buttons-property-of-pointermove-event-always-zero\r\n // IE9 has .buttons and .which zero on mousemove.\r\n // Firefox breaks the spec MDN defines.\r\n if (navigator.appVersion.indexOf(\"MSIE 9\") === -1 && event.buttons === 0 && data.buttonsProperty !== 0) {\r\n return eventEnd(event, data);\r\n }\r\n\r\n // Check if we are moving up or down\r\n var movement = (options.dir ? -1 : 1) * (event.calcPoint - data.startCalcPoint);\r\n\r\n // Convert the movement into a percentage of the slider width/height\r\n var proposal = (movement * 100) / data.baseSize;\r\n\r\n moveHandles(movement > 0, proposal, data.locations, data.handleNumbers);\r\n }\r\n\r\n // Unbind move events on document, call callbacks.\r\n function eventEnd(event, data) {\r\n // The handle is no longer active, so remove the class.\r\n if (data.handle) {\r\n removeClass(data.handle, options.cssClasses.active);\r\n scope_ActiveHandlesCount -= 1;\r\n }\r\n\r\n // Unbind the move and end events, which are added on 'start'.\r\n data.listeners.forEach(function(c) {\r\n scope_DocumentElement.removeEventListener(c[0], c[1]);\r\n });\r\n\r\n if (scope_ActiveHandlesCount === 0) {\r\n // Remove dragging class.\r\n removeClass(scope_Target, options.cssClasses.drag);\r\n setZindex();\r\n\r\n // Remove cursor styles and text-selection events bound to the body.\r\n if (event.cursor) {\r\n scope_Body.style.cursor = \"\";\r\n scope_Body.removeEventListener(\"selectstart\", preventDefault);\r\n }\r\n }\r\n\r\n data.handleNumbers.forEach(function(handleNumber) {\r\n fireEvent(\"change\", handleNumber);\r\n fireEvent(\"set\", handleNumber);\r\n fireEvent(\"end\", handleNumber);\r\n });\r\n }\r\n\r\n // Bind move events on document.\r\n function eventStart(event, data) {\r\n var handle;\r\n if (data.handleNumbers.length === 1) {\r\n var handleOrigin = scope_Handles[data.handleNumbers[0]];\r\n\r\n // Ignore 'disabled' handles\r\n if (handleOrigin.hasAttribute(\"disabled\")) {\r\n return false;\r\n }\r\n\r\n handle = handleOrigin.children[0];\r\n scope_ActiveHandlesCount += 1;\r\n\r\n // Mark the handle as 'active' so it can be styled.\r\n addClass(handle, options.cssClasses.active);\r\n }\r\n\r\n // A drag should never propagate up to the 'tap' event.\r\n event.stopPropagation();\r\n\r\n // Record the event listeners.\r\n var listeners = [];\r\n\r\n // Attach the move and end events.\r\n var moveEvent = attachEvent(actions.move, scope_DocumentElement, eventMove, {\r\n // The event target has changed so we need to propagate the original one so that we keep\r\n // relying on it to extract target touches.\r\n target: event.target,\r\n handle: handle,\r\n listeners: listeners,\r\n startCalcPoint: event.calcPoint,\r\n baseSize: baseSize(),\r\n pageOffset: event.pageOffset,\r\n handleNumbers: data.handleNumbers,\r\n buttonsProperty: event.buttons,\r\n locations: scope_Locations.slice()\r\n });\r\n\r\n var endEvent = attachEvent(actions.end, scope_DocumentElement, eventEnd, {\r\n target: event.target,\r\n handle: handle,\r\n listeners: listeners,\r\n doNotReject: true,\r\n handleNumbers: data.handleNumbers\r\n });\r\n\r\n var outEvent = attachEvent(\"mouseout\", scope_DocumentElement, documentLeave, {\r\n target: event.target,\r\n handle: handle,\r\n listeners: listeners,\r\n doNotReject: true,\r\n handleNumbers: data.handleNumbers\r\n });\r\n\r\n // We want to make sure we pushed the listeners in the listener list rather than creating\r\n // a new one as it has already been passed to the event handlers.\r\n listeners.push.apply(listeners, moveEvent.concat(endEvent, outEvent));\r\n\r\n // Text selection isn't an issue on touch devices,\r\n // so adding cursor styles can be skipped.\r\n if (event.cursor) {\r\n // Prevent the 'I' cursor and extend the range-drag cursor.\r\n scope_Body.style.cursor = getComputedStyle(event.target).cursor;\r\n\r\n // Mark the target with a dragging state.\r\n if (scope_Handles.length > 1) {\r\n addClass(scope_Target, options.cssClasses.drag);\r\n }\r\n\r\n // Prevent text selection when dragging the handles.\r\n // In noUiSlider <= 9.2.0, this was handled by calling preventDefault on mouse/touch start/move,\r\n // which is scroll blocking. The selectstart event is supported by FireFox starting from version 52,\r\n // meaning the only holdout is iOS Safari. This doesn't matter: text selection isn't triggered there.\r\n // The 'cursor' flag is false.\r\n // See: http://caniuse.com/#search=selectstart\r\n scope_Body.addEventListener(\"selectstart\", preventDefault, false);\r\n }\r\n\r\n data.handleNumbers.forEach(function(handleNumber) {\r\n fireEvent(\"start\", handleNumber);\r\n });\r\n }\r\n\r\n // Move closest handle to tapped location.\r\n function eventTap(event) {\r\n // The tap event shouldn't propagate up\r\n event.stopPropagation();\r\n\r\n var proposal = calcPointToPercentage(event.calcPoint);\r\n var handleNumber = getClosestHandle(proposal);\r\n\r\n // Tackle the case that all handles are 'disabled'.\r\n if (handleNumber === false) {\r\n return false;\r\n }\r\n\r\n // Flag the slider as it is now in a transitional state.\r\n // Transition takes a configurable amount of ms (default 300). Re-enable the slider after that.\r\n if (!options.events.snap) {\r\n addClassFor(scope_Target, options.cssClasses.tap, options.animationDuration);\r\n }\r\n\r\n setHandle(handleNumber, proposal, true, true);\r\n\r\n setZindex();\r\n\r\n fireEvent(\"slide\", handleNumber, true);\r\n fireEvent(\"update\", handleNumber, true);\r\n fireEvent(\"change\", handleNumber, true);\r\n fireEvent(\"set\", handleNumber, true);\r\n\r\n if (options.events.snap) {\r\n eventStart(event, { handleNumbers: [handleNumber] });\r\n }\r\n }\r\n\r\n // Fires a 'hover' event for a hovered mouse/pen position.\r\n function eventHover(event) {\r\n var proposal = calcPointToPercentage(event.calcPoint);\r\n\r\n var to = scope_Spectrum.getStep(proposal);\r\n var value = scope_Spectrum.fromStepping(to);\r\n\r\n Object.keys(scope_Events).forEach(function(targetEvent) {\r\n if (\"hover\" === targetEvent.split(\".\")[0]) {\r\n scope_Events[targetEvent].forEach(function(callback) {\r\n callback.call(scope_Self, value);\r\n });\r\n }\r\n });\r\n }\r\n\r\n // Attach events to several slider parts.\r\n function bindSliderEvents(behaviour) {\r\n // Attach the standard drag event to the handles.\r\n if (!behaviour.fixed) {\r\n scope_Handles.forEach(function(handle, index) {\r\n // These events are only bound to the visual handle\r\n // element, not the 'real' origin element.\r\n attachEvent(actions.start, handle.children[0], eventStart, {\r\n handleNumbers: [index]\r\n });\r\n });\r\n }\r\n\r\n // Attach the tap event to the slider base.\r\n if (behaviour.tap) {\r\n attachEvent(actions.start, scope_Base, eventTap, {});\r\n }\r\n\r\n // Fire hover events\r\n if (behaviour.hover) {\r\n attachEvent(actions.move, scope_Base, eventHover, {\r\n hover: true\r\n });\r\n }\r\n\r\n // Make the range draggable.\r\n if (behaviour.drag) {\r\n scope_Connects.forEach(function(connect, index) {\r\n if (connect === false || index === 0 || index === scope_Connects.length - 1) {\r\n return;\r\n }\r\n\r\n var handleBefore = scope_Handles[index - 1];\r\n var handleAfter = scope_Handles[index];\r\n var eventHolders = [connect];\r\n\r\n addClass(connect, options.cssClasses.draggable);\r\n\r\n // When the range is fixed, the entire range can\r\n // be dragged by the handles. The handle in the first\r\n // origin will propagate the start event upward,\r\n // but it needs to be bound manually on the other.\r\n if (behaviour.fixed) {\r\n eventHolders.push(handleBefore.children[0]);\r\n eventHolders.push(handleAfter.children[0]);\r\n }\r\n\r\n eventHolders.forEach(function(eventHolder) {\r\n attachEvent(actions.start, eventHolder, eventStart, {\r\n handles: [handleBefore, handleAfter],\r\n handleNumbers: [index - 1, index]\r\n });\r\n });\r\n });\r\n }\r\n }\r\n\r\n // Attach an event to this slider, possibly including a namespace\r\n function bindEvent(namespacedEvent, callback) {\r\n scope_Events[namespacedEvent] = scope_Events[namespacedEvent] || [];\r\n scope_Events[namespacedEvent].push(callback);\r\n\r\n // If the event bound is 'update,' fire it immediately for all handles.\r\n if (namespacedEvent.split(\".\")[0] === \"update\") {\r\n scope_Handles.forEach(function(a, index) {\r\n fireEvent(\"update\", index);\r\n });\r\n }\r\n }\r\n\r\n // Undo attachment of event\r\n function removeEvent(namespacedEvent) {\r\n var event = namespacedEvent && namespacedEvent.split(\".\")[0];\r\n var namespace = event && namespacedEvent.substring(event.length);\r\n\r\n Object.keys(scope_Events).forEach(function(bind) {\r\n var tEvent = bind.split(\".\")[0];\r\n var tNamespace = bind.substring(tEvent.length);\r\n\r\n if ((!event || event === tEvent) && (!namespace || namespace === tNamespace)) {\r\n delete scope_Events[bind];\r\n }\r\n });\r\n }\r\n\r\n // External event handling\r\n function fireEvent(eventName, handleNumber, tap) {\r\n Object.keys(scope_Events).forEach(function(targetEvent) {\r\n var eventType = targetEvent.split(\".\")[0];\r\n\r\n if (eventName === eventType) {\r\n scope_Events[targetEvent].forEach(function(callback) {\r\n callback.call(\r\n // Use the slider public API as the scope ('this')\r\n scope_Self,\r\n // Return values as array, so arg_1[arg_2] is always valid.\r\n scope_Values.map(options.format.to),\r\n // Handle index, 0 or 1\r\n handleNumber,\r\n // Un-formatted slider values\r\n scope_Values.slice(),\r\n // Event is fired by tap, true or false\r\n tap || false,\r\n // Left offset of the handle, in relation to the slider\r\n scope_Locations.slice()\r\n );\r\n });\r\n }\r\n });\r\n }\r\n\r\n function toPct(pct) {\r\n return pct + \"%\";\r\n }\r\n\r\n // Split out the handle positioning logic so the Move event can use it, too\r\n function checkHandlePosition(reference, handleNumber, to, lookBackward, lookForward, getValue) {\r\n // For sliders with multiple handles, limit movement to the other handle.\r\n // Apply the margin option by adding it to the handle positions.\r\n if (scope_Handles.length > 1 && !options.events.unconstrained) {\r\n if (lookBackward && handleNumber > 0) {\r\n to = Math.max(to, reference[handleNumber - 1] + options.margin);\r\n }\r\n\r\n if (lookForward && handleNumber < scope_Handles.length - 1) {\r\n to = Math.min(to, reference[handleNumber + 1] - options.margin);\r\n }\r\n }\r\n\r\n // The limit option has the opposite effect, limiting handles to a\r\n // maximum distance from another. Limit must be > 0, as otherwise\r\n // handles would be unmovable.\r\n if (scope_Handles.length > 1 && options.limit) {\r\n if (lookBackward && handleNumber > 0) {\r\n to = Math.min(to, reference[handleNumber - 1] + options.limit);\r\n }\r\n\r\n if (lookForward && handleNumber < scope_Handles.length - 1) {\r\n to = Math.max(to, reference[handleNumber + 1] - options.limit);\r\n }\r\n }\r\n\r\n // The padding option keeps the handles a certain distance from the\r\n // edges of the slider. Padding must be > 0.\r\n if (options.padding) {\r\n if (handleNumber === 0) {\r\n to = Math.max(to, options.padding[0]);\r\n }\r\n\r\n if (handleNumber === scope_Handles.length - 1) {\r\n to = Math.min(to, 100 - options.padding[1]);\r\n }\r\n }\r\n\r\n to = scope_Spectrum.getStep(to);\r\n\r\n // Limit percentage to the 0 - 100 range\r\n to = limit(to);\r\n\r\n // Return false if handle can't move\r\n if (to === reference[handleNumber] && !getValue) {\r\n return false;\r\n }\r\n\r\n return to;\r\n }\r\n\r\n // Uses slider orientation to create CSS rules. a = base value;\r\n function inRuleOrder(v, a) {\r\n var o = options.ort;\r\n return (o ? a : v) + \", \" + (o ? v : a);\r\n }\r\n\r\n // Moves handle(s) by a percentage\r\n // (bool, % to move, [% where handle started, ...], [index in scope_Handles, ...])\r\n function moveHandles(upward, proposal, locations, handleNumbers) {\r\n var proposals = locations.slice();\r\n\r\n var b = [!upward, upward];\r\n var f = [upward, !upward];\r\n\r\n // Copy handleNumbers so we don't change the dataset\r\n handleNumbers = handleNumbers.slice();\r\n\r\n // Check to see which handle is 'leading'.\r\n // If that one can't move the second can't either.\r\n if (upward) {\r\n handleNumbers.reverse();\r\n }\r\n\r\n // Step 1: get the maximum percentage that any of the handles can move\r\n if (handleNumbers.length > 1) {\r\n handleNumbers.forEach(function(handleNumber, o) {\r\n var to = checkHandlePosition(\r\n proposals,\r\n handleNumber,\r\n proposals[handleNumber] + proposal,\r\n b[o],\r\n f[o],\r\n false\r\n );\r\n\r\n // Stop if one of the handles can't move.\r\n if (to === false) {\r\n proposal = 0;\r\n } else {\r\n proposal = to - proposals[handleNumber];\r\n proposals[handleNumber] = to;\r\n }\r\n });\r\n }\r\n\r\n // If using one handle, check backward AND forward\r\n else {\r\n b = f = [true];\r\n }\r\n\r\n var state = false;\r\n\r\n // Step 2: Try to set the handles with the found percentage\r\n handleNumbers.forEach(function(handleNumber, o) {\r\n state = setHandle(handleNumber, locations[handleNumber] + proposal, b[o], f[o]) || state;\r\n });\r\n\r\n // Step 3: If a handle moved, fire events\r\n if (state) {\r\n handleNumbers.forEach(function(handleNumber) {\r\n fireEvent(\"update\", handleNumber);\r\n fireEvent(\"slide\", handleNumber);\r\n });\r\n }\r\n }\r\n\r\n // Takes a base value and an offset. This offset is used for the connect bar size.\r\n // In the initial design for this feature, the origin element was 1% wide.\r\n // Unfortunately, a rounding bug in Chrome makes it impossible to implement this feature\r\n // in this manner: https://bugs.chromium.org/p/chromium/issues/detail?id=798223\r\n function transformDirection(a, b) {\r\n return options.dir ? 100 - a - b : a;\r\n }\r\n\r\n // Updates scope_Locations and scope_Values, updates visual state\r\n function updateHandlePosition(handleNumber, to) {\r\n // Update locations.\r\n scope_Locations[handleNumber] = to;\r\n\r\n // Convert the value to the slider stepping/range.\r\n scope_Values[handleNumber] = scope_Spectrum.fromStepping(to);\r\n\r\n var rule = \"translate(\" + inRuleOrder(toPct(transformDirection(to, 0) - scope_DirOffset), \"0\") + \")\";\r\n scope_Handles[handleNumber].style[options.transformRule] = rule;\r\n\r\n updateConnect(handleNumber);\r\n updateConnect(handleNumber + 1);\r\n }\r\n\r\n // Handles before the slider middle are stacked later = higher,\r\n // Handles after the middle later is lower\r\n // [[7] [8] .......... | .......... [5] [4]\r\n function setZindex() {\r\n scope_HandleNumbers.forEach(function(handleNumber) {\r\n var dir = scope_Locations[handleNumber] > 50 ? -1 : 1;\r\n var zIndex = 3 + (scope_Handles.length + dir * handleNumber);\r\n scope_Handles[handleNumber].style.zIndex = zIndex;\r\n });\r\n }\r\n\r\n // Test suggested values and apply margin, step.\r\n function setHandle(handleNumber, to, lookBackward, lookForward) {\r\n to = checkHandlePosition(scope_Locations, handleNumber, to, lookBackward, lookForward, false);\r\n\r\n if (to === false) {\r\n return false;\r\n }\r\n\r\n updateHandlePosition(handleNumber, to);\r\n\r\n return true;\r\n }\r\n\r\n // Updates style attribute for connect nodes\r\n function updateConnect(index) {\r\n // Skip connects set to false\r\n if (!scope_Connects[index]) {\r\n return;\r\n }\r\n\r\n var l = 0;\r\n var h = 100;\r\n\r\n if (index !== 0) {\r\n l = scope_Locations[index - 1];\r\n }\r\n\r\n if (index !== scope_Connects.length - 1) {\r\n h = scope_Locations[index];\r\n }\r\n\r\n // We use two rules:\r\n // 'translate' to change the left/top offset;\r\n // 'scale' to change the width of the element;\r\n // As the element has a width of 100%, a translation of 100% is equal to 100% of the parent (.noUi-base)\r\n var connectWidth = h - l;\r\n var translateRule = \"translate(\" + inRuleOrder(toPct(transformDirection(l, connectWidth)), \"0\") + \")\";\r\n var scaleRule = \"scale(\" + inRuleOrder(connectWidth / 100, \"1\") + \")\";\r\n\r\n scope_Connects[index].style[options.transformRule] = translateRule + \" \" + scaleRule;\r\n }\r\n\r\n // Parses value passed to .set method. Returns current value if not parse-able.\r\n function resolveToValue(to, handleNumber) {\r\n // Setting with null indicates an 'ignore'.\r\n // Inputting 'false' is invalid.\r\n if (to === null || to === false || to === undefined) {\r\n return scope_Locations[handleNumber];\r\n }\r\n\r\n // If a formatted number was passed, attempt to decode it.\r\n if (typeof to === \"number\") {\r\n to = String(to);\r\n }\r\n\r\n to = options.format.from(to);\r\n to = scope_Spectrum.toStepping(to);\r\n\r\n // If parsing the number failed, use the current value.\r\n if (to === false || isNaN(to)) {\r\n return scope_Locations[handleNumber];\r\n }\r\n\r\n return to;\r\n }\r\n\r\n // Set the slider value.\r\n function valueSet(input, fireSetEvent) {\r\n var values = asArray(input);\r\n var isInit = scope_Locations[0] === undefined;\r\n\r\n // Event fires by default\r\n fireSetEvent = fireSetEvent === undefined ? true : !!fireSetEvent;\r\n\r\n // Animation is optional.\r\n // Make sure the initial values were set before using animated placement.\r\n if (options.animate && !isInit) {\r\n addClassFor(scope_Target, options.cssClasses.tap, options.animationDuration);\r\n }\r\n\r\n // First pass, without lookAhead but with lookBackward. Values are set from left to right.\r\n scope_HandleNumbers.forEach(function(handleNumber) {\r\n setHandle(handleNumber, resolveToValue(values[handleNumber], handleNumber), true, false);\r\n });\r\n\r\n // Second pass. Now that all base values are set, apply constraints\r\n scope_HandleNumbers.forEach(function(handleNumber) {\r\n setHandle(handleNumber, scope_Locations[handleNumber], true, true);\r\n });\r\n\r\n setZindex();\r\n\r\n scope_HandleNumbers.forEach(function(handleNumber) {\r\n fireEvent(\"update\", handleNumber);\r\n\r\n // Fire the event only for handles that received a new value, as per #579\r\n if (values[handleNumber] !== null && fireSetEvent) {\r\n fireEvent(\"set\", handleNumber);\r\n }\r\n });\r\n }\r\n\r\n // Reset slider to initial values\r\n function valueReset(fireSetEvent) {\r\n valueSet(options.start, fireSetEvent);\r\n }\r\n\r\n // Set value for a single handle\r\n function valueSetHandle(handleNumber, value, fireSetEvent) {\r\n var values = [];\r\n\r\n // Ensure numeric input\r\n handleNumber = Number(handleNumber);\r\n\r\n if (!(handleNumber >= 0 && handleNumber < scope_HandleNumbers.length)) {\r\n throw new Error(\"noUiSlider (\" + VERSION + \"): invalid handle number, got: \" + handleNumber);\r\n }\r\n\r\n for (var i = 0; i < scope_HandleNumbers.length; i++) {\r\n values[i] = null;\r\n }\r\n\r\n values[handleNumber] = value;\r\n\r\n valueSet(values, fireSetEvent);\r\n }\r\n\r\n // Get the slider value.\r\n function valueGet() {\r\n var values = scope_Values.map(options.format.to);\r\n\r\n // If only one handle is used, return a single value.\r\n if (values.length === 1) {\r\n return values[0];\r\n }\r\n\r\n return values;\r\n }\r\n\r\n // Removes classes from the root and empties it.\r\n function destroy() {\r\n for (var key in options.cssClasses) {\r\n if (!options.cssClasses.hasOwnProperty(key)) {\r\n continue;\r\n }\r\n removeClass(scope_Target, options.cssClasses[key]);\r\n }\r\n\r\n while (scope_Target.firstChild) {\r\n scope_Target.removeChild(scope_Target.firstChild);\r\n }\r\n\r\n delete scope_Target.noUiSlider;\r\n }\r\n\r\n // Get the current step size for the slider.\r\n function getCurrentStep() {\r\n // Check all locations, map them to their stepping point.\r\n // Get the step point, then find it in the input list.\r\n return scope_Locations.map(function(location, index) {\r\n var nearbySteps = scope_Spectrum.getNearbySteps(location);\r\n var value = scope_Values[index];\r\n var increment = nearbySteps.thisStep.step;\r\n var decrement = null;\r\n\r\n // If the next value in this step moves into the next step,\r\n // the increment is the start of the next step - the current value\r\n if (increment !== false) {\r\n if (value + increment > nearbySteps.stepAfter.startValue) {\r\n increment = nearbySteps.stepAfter.startValue - value;\r\n }\r\n }\r\n\r\n // If the value is beyond the starting point\r\n if (value > nearbySteps.thisStep.startValue) {\r\n decrement = nearbySteps.thisStep.step;\r\n } else if (nearbySteps.stepBefore.step === false) {\r\n decrement = false;\r\n }\r\n\r\n // If a handle is at the start of a step, it always steps back into the previous step first\r\n else {\r\n decrement = value - nearbySteps.stepBefore.highestStep;\r\n }\r\n\r\n // Now, if at the slider edges, there is not in/decrement\r\n if (location === 100) {\r\n increment = null;\r\n } else if (location === 0) {\r\n decrement = null;\r\n }\r\n\r\n // As per #391, the comparison for the decrement step can have some rounding issues.\r\n var stepDecimals = scope_Spectrum.countStepDecimals();\r\n\r\n // Round per #391\r\n if (increment !== null && increment !== false) {\r\n increment = Number(increment.toFixed(stepDecimals));\r\n }\r\n\r\n if (decrement !== null && decrement !== false) {\r\n decrement = Number(decrement.toFixed(stepDecimals));\r\n }\r\n\r\n return [decrement, increment];\r\n });\r\n }\r\n\r\n // Updateable: margin, limit, padding, step, range, animate, snap\r\n function updateOptions(optionsToUpdate, fireSetEvent) {\r\n // Spectrum is created using the range, snap, direction and step options.\r\n // 'snap' and 'step' can be updated.\r\n // If 'snap' and 'step' are not passed, they should remain unchanged.\r\n var v = valueGet();\r\n\r\n var updateAble = [\"margin\", \"limit\", \"padding\", \"range\", \"animate\", \"snap\", \"step\", \"format\"];\r\n\r\n // Only change options that we're actually passed to update.\r\n updateAble.forEach(function(name) {\r\n if (optionsToUpdate[name] !== undefined) {\r\n originalOptions[name] = optionsToUpdate[name];\r\n }\r\n });\r\n\r\n var newOptions = testOptions(originalOptions);\r\n\r\n // Load new options into the slider state\r\n updateAble.forEach(function(name) {\r\n if (optionsToUpdate[name] !== undefined) {\r\n options[name] = newOptions[name];\r\n }\r\n });\r\n\r\n scope_Spectrum = newOptions.spectrum;\r\n\r\n // Limit, margin and padding depend on the spectrum but are stored outside of it. (#677)\r\n options.margin = newOptions.margin;\r\n options.limit = newOptions.limit;\r\n options.padding = newOptions.padding;\r\n\r\n // Update pips, removes existing.\r\n if (options.pips) {\r\n pips(options.pips);\r\n }\r\n\r\n // Invalidate the current positioning so valueSet forces an update.\r\n scope_Locations = [];\r\n valueSet(optionsToUpdate.start || v, fireSetEvent);\r\n }\r\n\r\n // Create the base element, initialize HTML and set classes.\r\n // Add handles and connect elements.\r\n scope_Base = addSlider(scope_Target);\r\n addElements(options.connect, scope_Base);\r\n\r\n // Attach user events.\r\n bindSliderEvents(options.events);\r\n\r\n // Use the public value method to set the start values.\r\n valueSet(options.start);\r\n\r\n // noinspection JSUnusedGlobalSymbols\r\n scope_Self = {\r\n destroy: destroy,\r\n steps: getCurrentStep,\r\n on: bindEvent,\r\n off: removeEvent,\r\n get: valueGet,\r\n set: valueSet,\r\n setHandle: valueSetHandle,\r\n reset: valueReset,\r\n // Exposed for unit testing, don't use this in your application.\r\n __moveHandles: function(a, b, c) {\r\n moveHandles(a, b, scope_Locations, c);\r\n },\r\n options: originalOptions, // Issue #600, #678\r\n updateOptions: updateOptions,\r\n target: scope_Target, // Issue #597\r\n removePips: removePips,\r\n pips: pips // Issue #594\r\n };\r\n\r\n if (options.pips) {\r\n pips(options.pips);\r\n }\r\n\r\n if (options.tooltips) {\r\n tooltips();\r\n }\r\n\r\n aria();\r\n\r\n return scope_Self;\r\n }\r\n\r\n // Run the standard initializer\r\n function initialize(target, originalOptions) {\r\n if (!target || !target.nodeName) {\r\n throw new Error(\"noUiSlider (\" + VERSION + \"): create requires a single element, got: \" + target);\r\n }\r\n\r\n // Throw an error if the slider was already initialized.\r\n if (target.noUiSlider) {\r\n throw new Error(\"noUiSlider (\" + VERSION + \"): Slider was already initialized.\");\r\n }\r\n\r\n // Test the options and create the slider environment;\r\n var options = testOptions(originalOptions, target);\r\n var api = scope(target, options, originalOptions);\r\n\r\n target.noUiSlider = api;\r\n\r\n return api;\r\n }\r\n\r\n // Use an object instead of a function for future expandability;\r\n return {\r\n // Exposed for unit testing, don't use this in your application.\r\n __spectrum: Spectrum,\r\n version: VERSION,\r\n create: initialize\r\n };\r\n});\r\n","/*\n * heatmap.js v2.0.5 | JavaScript Heatmap Library\n *\n * Copyright 2008-2016 Patrick Wied - All rights reserved.\n * Dual licensed under MIT and Beerware license \n *\n * :: 2016-09-05 01:16\n */\n;(function (name, context, factory) {\n\n // Supports UMD. AMD, CommonJS/Node.js and browser context\n if (typeof module !== \"undefined\" && module.exports) {\n module.exports = factory();\n } else if (typeof define === \"function\" && define.amd) {\n define(factory);\n } else {\n context[name] = factory();\n }\n\n})(\"h337\", this, function () {\n\n// Heatmap Config stores default values and will be merged with instance config\nvar HeatmapConfig = {\n defaultRadius: 40,\n defaultRenderer: 'canvas2d',\n defaultGradient: { 0.25: \"rgb(0,0,255)\", 0.55: \"rgb(0,255,0)\", 0.85: \"yellow\", 1.0: \"rgb(255,0,0)\"},\n defaultMaxOpacity: 1,\n defaultMinOpacity: 0,\n defaultBlur: .85,\n defaultXField: 'x',\n defaultYField: 'y',\n defaultValueField: 'value', \n plugins: {}\n};\nvar Store = (function StoreClosure() {\n\n var Store = function Store(config) {\n this._coordinator = {};\n this._data = [];\n this._radi = [];\n this._min = 10;\n this._max = 1;\n this._xField = config['xField'] || config.defaultXField;\n this._yField = config['yField'] || config.defaultYField;\n this._valueField = config['valueField'] || config.defaultValueField;\n\n if (config[\"radius\"]) {\n this._cfgRadius = config[\"radius\"];\n }\n };\n\n var defaultRadius = HeatmapConfig.defaultRadius;\n\n Store.prototype = {\n // when forceRender = false -> called from setData, omits renderall event\n _organiseData: function(dataPoint, forceRender) {\n var x = dataPoint[this._xField];\n var y = dataPoint[this._yField];\n var radi = this._radi;\n var store = this._data;\n var max = this._max;\n var min = this._min;\n var value = dataPoint[this._valueField] || 1;\n var radius = dataPoint.radius || this._cfgRadius || defaultRadius;\n\n if (!store[x]) {\n store[x] = [];\n radi[x] = [];\n }\n\n if (!store[x][y]) {\n store[x][y] = value;\n radi[x][y] = radius;\n } else {\n store[x][y] += value;\n }\n var storedVal = store[x][y];\n\n if (storedVal > max) {\n if (!forceRender) {\n this._max = storedVal;\n } else {\n this.setDataMax(storedVal);\n }\n return false;\n } else if (storedVal < min) {\n if (!forceRender) {\n this._min = storedVal;\n } else {\n this.setDataMin(storedVal);\n }\n return false;\n } else {\n return { \n x: x, \n y: y,\n value: value, \n radius: radius,\n min: min,\n max: max \n };\n }\n },\n _unOrganizeData: function() {\n var unorganizedData = [];\n var data = this._data;\n var radi = this._radi;\n\n for (var x in data) {\n for (var y in data[x]) {\n\n unorganizedData.push({\n x: x,\n y: y,\n radius: radi[x][y],\n value: data[x][y]\n });\n\n }\n }\n return {\n min: this._min,\n max: this._max,\n data: unorganizedData\n };\n },\n _onExtremaChange: function() {\n this._coordinator.emit('extremachange', {\n min: this._min,\n max: this._max\n });\n },\n addData: function() {\n if (arguments[0].length > 0) {\n var dataArr = arguments[0];\n var dataLen = dataArr.length;\n while (dataLen--) {\n this.addData.call(this, dataArr[dataLen]);\n }\n } else {\n // add to store \n var organisedEntry = this._organiseData(arguments[0], true);\n if (organisedEntry) {\n // if it's the first datapoint initialize the extremas with it\n if (this._data.length === 0) {\n this._min = this._max = organisedEntry.value;\n }\n this._coordinator.emit('renderpartial', {\n min: this._min,\n max: this._max,\n data: [organisedEntry]\n });\n }\n }\n return this;\n },\n setData: function(data) {\n var dataPoints = data.data;\n var pointsLen = dataPoints.length;\n\n\n // reset data arrays\n this._data = [];\n this._radi = [];\n\n for(var i = 0; i < pointsLen; i++) {\n this._organiseData(dataPoints[i], false);\n }\n this._max = data.max;\n this._min = data.min || 0;\n \n this._onExtremaChange();\n this._coordinator.emit('renderall', this._getInternalData());\n return this;\n },\n removeData: function() {\n // TODO: implement\n },\n setDataMax: function(max) {\n this._max = max;\n this._onExtremaChange();\n this._coordinator.emit('renderall', this._getInternalData());\n return this;\n },\n setDataMin: function(min) {\n this._min = min;\n this._onExtremaChange();\n this._coordinator.emit('renderall', this._getInternalData());\n return this;\n },\n setCoordinator: function(coordinator) {\n this._coordinator = coordinator;\n },\n _getInternalData: function() {\n return { \n max: this._max,\n min: this._min, \n data: this._data,\n radi: this._radi \n };\n },\n getData: function() {\n return this._unOrganizeData();\n }/*,\n\n TODO: rethink.\n\n getValueAt: function(point) {\n var value;\n var radius = 100;\n var x = point.x;\n var y = point.y;\n var data = this._data;\n\n if (data[x] && data[x][y]) {\n return data[x][y];\n } else {\n var values = [];\n // radial search for datapoints based on default radius\n for(var distance = 1; distance < radius; distance++) {\n var neighbors = distance * 2 +1;\n var startX = x - distance;\n var startY = y - distance;\n\n for(var i = 0; i < neighbors; i++) {\n for (var o = 0; o < neighbors; o++) {\n if ((i == 0 || i == neighbors-1) || (o == 0 || o == neighbors-1)) {\n if (data[startY+i] && data[startY+i][startX+o]) {\n values.push(data[startY+i][startX+o]);\n }\n } else {\n continue;\n } \n }\n }\n }\n if (values.length > 0) {\n return Math.max.apply(Math, values);\n }\n }\n return false;\n }*/\n };\n\n\n return Store;\n})();\n\nvar Canvas2dRenderer = (function Canvas2dRendererClosure() {\n\n var _getColorPalette = function(config) {\n var gradientConfig = config.gradient || config.defaultGradient;\n var paletteCanvas = document.createElement('canvas');\n var paletteCtx = paletteCanvas.getContext('2d');\n\n paletteCanvas.width = 256;\n paletteCanvas.height = 1;\n\n var gradient = paletteCtx.createLinearGradient(0, 0, 256, 1);\n for (var key in gradientConfig) {\n gradient.addColorStop(key, gradientConfig[key]);\n }\n\n paletteCtx.fillStyle = gradient;\n paletteCtx.fillRect(0, 0, 256, 1);\n\n return paletteCtx.getImageData(0, 0, 256, 1).data;\n };\n\n var _getPointTemplate = function(radius, blurFactor) {\n var tplCanvas = document.createElement('canvas');\n var tplCtx = tplCanvas.getContext('2d');\n var x = radius;\n var y = radius;\n tplCanvas.width = tplCanvas.height = radius*2;\n\n if (blurFactor == 1) {\n tplCtx.beginPath();\n tplCtx.arc(x, y, radius, 0, 2 * Math.PI, false);\n tplCtx.fillStyle = 'rgba(0,0,0,1)';\n tplCtx.fill();\n } else {\n var gradient = tplCtx.createRadialGradient(x, y, radius*blurFactor, x, y, radius);\n gradient.addColorStop(0, 'rgba(0,0,0,1)');\n gradient.addColorStop(1, 'rgba(0,0,0,0)');\n tplCtx.fillStyle = gradient;\n tplCtx.fillRect(0, 0, 2*radius, 2*radius);\n }\n\n\n\n return tplCanvas;\n };\n\n var _prepareData = function(data) {\n var renderData = [];\n var min = data.min;\n var max = data.max;\n var radi = data.radi;\n var data = data.data;\n\n var xValues = Object.keys(data);\n var xValuesLen = xValues.length;\n\n while(xValuesLen--) {\n var xValue = xValues[xValuesLen];\n var yValues = Object.keys(data[xValue]);\n var yValuesLen = yValues.length;\n while(yValuesLen--) {\n var yValue = yValues[yValuesLen];\n var value = data[xValue][yValue];\n var radius = radi[xValue][yValue];\n renderData.push({\n x: xValue,\n y: yValue,\n value: value,\n radius: radius\n });\n }\n }\n\n return {\n min: min,\n max: max,\n data: renderData\n };\n };\n\n\n function Canvas2dRenderer(config) {\n var container = config.container;\n var shadowCanvas = this.shadowCanvas = document.createElement('canvas');\n var canvas = this.canvas = config.canvas || document.createElement('canvas');\n var renderBoundaries = this._renderBoundaries = [10000, 10000, 0, 0];\n\n var computed = getComputedStyle(config.container) || {};\n\n canvas.className = 'heatmap-canvas';\n\n this._width = canvas.width = shadowCanvas.width = config.width || +(computed.width.replace(/px/,''));\n this._height = canvas.height = shadowCanvas.height = config.height || +(computed.height.replace(/px/,''));\n\n this.shadowCtx = shadowCanvas.getContext('2d');\n this.ctx = canvas.getContext('2d');\n\n // @TODO:\n // conditional wrapper\n\n canvas.style.cssText = shadowCanvas.style.cssText = 'position:absolute;left:0;top:0;';\n\n container.style.position = 'relative';\n container.appendChild(canvas);\n\n this._palette = _getColorPalette(config);\n this._templates = {};\n\n this._setStyles(config);\n };\n\n Canvas2dRenderer.prototype = {\n renderPartial: function(data) {\n if (data.data.length > 0) {\n this._drawAlpha(data);\n this._colorize();\n }\n },\n renderAll: function(data) {\n // reset render boundaries\n this._clear();\n if (data.data.length > 0) {\n this._drawAlpha(_prepareData(data));\n this._colorize();\n }\n },\n _updateGradient: function(config) {\n this._palette = _getColorPalette(config);\n },\n updateConfig: function(config) {\n if (config['gradient']) {\n this._updateGradient(config);\n }\n this._setStyles(config);\n },\n setDimensions: function(width, height) {\n this._width = width;\n this._height = height;\n this.canvas.width = this.shadowCanvas.width = width;\n this.canvas.height = this.shadowCanvas.height = height;\n },\n _clear: function() {\n this.shadowCtx.clearRect(0, 0, this._width, this._height);\n this.ctx.clearRect(0, 0, this._width, this._height);\n },\n _setStyles: function(config) {\n this._blur = (config.blur == 0)?0:(config.blur || config.defaultBlur);\n\n if (config.backgroundColor) {\n this.canvas.style.backgroundColor = config.backgroundColor;\n }\n\n this._width = this.canvas.width = this.shadowCanvas.width = config.width || this._width;\n this._height = this.canvas.height = this.shadowCanvas.height = config.height || this._height;\n\n\n this._opacity = (config.opacity || 0) * 255;\n this._maxOpacity = (config.maxOpacity || config.defaultMaxOpacity) * 255;\n this._minOpacity = (config.minOpacity || config.defaultMinOpacity) * 255;\n this._useGradientOpacity = !!config.useGradientOpacity;\n },\n _drawAlpha: function(data) {\n var min = this._min = data.min;\n var max = this._max = data.max;\n var data = data.data || [];\n var dataLen = data.length;\n // on a point basis?\n var blur = 1 - this._blur;\n\n while(dataLen--) {\n\n var point = data[dataLen];\n\n var x = point.x;\n var y = point.y;\n var radius = point.radius;\n // if value is bigger than max\n // use max as value\n var value = Math.min(point.value, max);\n var rectX = x - radius;\n var rectY = y - radius;\n var shadowCtx = this.shadowCtx;\n\n\n\n\n var tpl;\n if (!this._templates[radius]) {\n this._templates[radius] = tpl = _getPointTemplate(radius, blur);\n } else {\n tpl = this._templates[radius];\n }\n // value from minimum / value range\n // => [0, 1]\n var templateAlpha = (value-min)/(max-min);\n // this fixes #176: small values are not visible because globalAlpha < .01 cannot be read from imageData\n shadowCtx.globalAlpha = templateAlpha < .01 ? .01 : templateAlpha;\n\n shadowCtx.drawImage(tpl, rectX, rectY);\n\n // update renderBoundaries\n if (rectX < this._renderBoundaries[0]) {\n this._renderBoundaries[0] = rectX;\n }\n if (rectY < this._renderBoundaries[1]) {\n this._renderBoundaries[1] = rectY;\n }\n if (rectX + 2*radius > this._renderBoundaries[2]) {\n this._renderBoundaries[2] = rectX + 2*radius;\n }\n if (rectY + 2*radius > this._renderBoundaries[3]) {\n this._renderBoundaries[3] = rectY + 2*radius;\n }\n\n }\n },\n _colorize: function() {\n var x = this._renderBoundaries[0];\n var y = this._renderBoundaries[1];\n var width = this._renderBoundaries[2] - x;\n var height = this._renderBoundaries[3] - y;\n var maxWidth = this._width;\n var maxHeight = this._height;\n var opacity = this._opacity;\n var maxOpacity = this._maxOpacity;\n var minOpacity = this._minOpacity;\n var useGradientOpacity = this._useGradientOpacity;\n\n if (x < 0) {\n x = 0;\n }\n if (y < 0) {\n y = 0;\n }\n if (x + width > maxWidth) {\n width = maxWidth - x;\n }\n if (y + height > maxHeight) {\n height = maxHeight - y;\n }\n\n var img = this.shadowCtx.getImageData(x, y, width, height);\n var imgData = img.data;\n var len = imgData.length;\n var palette = this._palette;\n\n\n for (var i = 3; i < len; i+= 4) {\n var alpha = imgData[i];\n var offset = alpha * 4;\n\n\n if (!offset) {\n continue;\n }\n\n var finalAlpha;\n if (opacity > 0) {\n finalAlpha = opacity;\n } else {\n if (alpha < maxOpacity) {\n if (alpha < minOpacity) {\n finalAlpha = minOpacity;\n } else {\n finalAlpha = alpha;\n }\n } else {\n finalAlpha = maxOpacity;\n }\n }\n\n imgData[i-3] = palette[offset];\n imgData[i-2] = palette[offset + 1];\n imgData[i-1] = palette[offset + 2];\n imgData[i] = useGradientOpacity ? palette[offset + 3] : finalAlpha;\n\n }\n\n img.data = imgData;\n this.ctx.putImageData(img, x, y);\n\n this._renderBoundaries = [1000, 1000, 0, 0];\n\n },\n getValueAt: function(point) {\n var value;\n var shadowCtx = this.shadowCtx;\n var img = shadowCtx.getImageData(point.x, point.y, 1, 1);\n var data = img.data[3];\n var max = this._max;\n var min = this._min;\n\n value = (Math.abs(max-min) * (data/255)) >> 0;\n\n return value;\n },\n getDataURL: function() {\n return this.canvas.toDataURL();\n }\n };\n\n\n return Canvas2dRenderer;\n})();\n\n\nvar Renderer = (function RendererClosure() {\n\n var rendererFn = false;\n\n if (HeatmapConfig['defaultRenderer'] === 'canvas2d') {\n rendererFn = Canvas2dRenderer;\n }\n\n return rendererFn;\n})();\n\n\nvar Util = {\n merge: function() {\n var merged = {};\n var argsLen = arguments.length;\n for (var i = 0; i < argsLen; i++) {\n var obj = arguments[i]\n for (var key in obj) {\n merged[key] = obj[key];\n }\n }\n return merged;\n }\n};\n// Heatmap Constructor\nvar Heatmap = (function HeatmapClosure() {\n\n var Coordinator = (function CoordinatorClosure() {\n\n function Coordinator() {\n this.cStore = {};\n };\n\n Coordinator.prototype = {\n on: function(evtName, callback, scope) {\n var cStore = this.cStore;\n\n if (!cStore[evtName]) {\n cStore[evtName] = [];\n }\n cStore[evtName].push((function(data) {\n return callback.call(scope, data);\n }));\n },\n emit: function(evtName, data) {\n var cStore = this.cStore;\n if (cStore[evtName]) {\n var len = cStore[evtName].length;\n for (var i=0; i