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AK,IACpB,KAAK,gBAAgB,EAAQ,GAAI,EAAQ,EAG5C,EAKA,YAAa,WACZ,GAAI,KAAK,QAAQ,OAChB,KAAK,OAAS,KAAK,WADpB,CAKA,KAAK,OAAS,GAEd,IAEE,EAAG,EAAG,EAAG,EAAK,EAAM,EAAS,EAF3B,EAAQ,KAAK,OACf,EAAS,KAAK,UAAU,QAG1B,IAAK,EAAI,EAAG,EAAI,EAAG,EAAM,KAAK,OAAO,OAAQ,EAAI,EAAK,IAGrD,IAAK,EAAI,EAAG,GAFZ,EAAS,KAAK,OAAO,IAEK,OAAQ,EAAI,EAAO,EAAG,KAC/C,EAAU,EAAK,YAAY,EAAO,GAAI,EAAO,EAAI,GAAI,EAAQ,GAAG,MAIhE,EAAM,GAAK,EAAM,IAAM,GACvB,EAAM,GAAG,KAAK,EAAQ,IAGjB,EAAQ,KAAO,EAAO,EAAI,IAAQ,IAAM,EAAO,IACnD,EAAM,GAAG,KAAK,EAAQ,IACtB,KAtBH,CA0BD,EAEA,gBAAiB,WAChB,OAAO,KAAK,QAAQ,OAAS,EAAI,KAAK,QAAQ,cAAgB,EAAE,QAAQ,MAAQ,GAAK,EACtF,IAGD,EAAE,QAAU,SAAU,EAAS,GAC9B,OAAO,IAAI,EAAE,QAAQ,EAAS,EAC/B,EAGO,CACR","file":"/npm/leaflet-hotline@0.4.0/src/leaflet.hotline.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.37.0.\n * Original file: /npm/leaflet-hotline@0.4.0/src/leaflet.hotline.js\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n","/*\n (c) 2017, iosphere GmbH\n Leaflet.hotline, a Leaflet plugin for drawing gradients along polylines.\n https://github.com/iosphere/Leaflet.hotline/\n*/\n\n(function (root, plugin) {\n\t/**\n\t * UMD wrapper.\n\t * When used directly in the Browser it expects Leaflet to be globally\n\t * available as `L`. The plugin then adds itself to Leaflet.\n\t * When used as a CommonJS module (e.g. with browserify) only the plugin\n\t * factory gets exported, so one hast to call the factory manually and pass\n\t * Leaflet as the only parameter.\n\t * @see {@link https://github.com/umdjs/umd}\n\t */\n\tif (typeof define === 'function' && define.amd) {\n\t\tdefine(['leaflet'], plugin);\n\t} else if (typeof exports === 'object') {\n\t\tmodule.exports = plugin;\n\t} else {\n\t\tplugin(root.L);\n\t}\n}(this, function (L) {\n\t// Plugin is already added to Leaflet\n\tif (L.Hotline) {\n\t\treturn L;\n\t}\n\n\t/**\n\t * Core renderer.\n\t * @constructor\n\t * @param {HTMLElement | string} canvas - &lt;canvas> element or its id\n\t * to initialize the instance on.\n\t */\n\tvar Hotline = function (canvas) {\n\t\tif (!(this instanceof Hotline)) { return new Hotline(canvas); }\n\n\t\tvar defaultPalette = {\n\t\t\t0.0: 'green',\n\t\t\t0.5: 'yellow',\n\t\t\t1.0: 'red'\n\t\t};\n\n\t\tthis._canvas = canvas = typeof canvas === 'string'\n\t\t\t? document.getElementById(canvas)\n\t\t\t: canvas;\n\n\t\tthis._ctx = canvas.getContext('2d');\n\t\tthis._width = canvas.width;\n\t\tthis._height = canvas.height;\n\n\t\tthis._weight = 5;\n\t\tthis._outlineWidth = 1;\n\t\tthis._outlineColor = 'black';\n\n\t\tthis._min = 0;\n\t\tthis._max = 1;\n\n\t\tthis._data = [];\n\n\t\tthis.palette(defaultPalette);\n\t};\n\n\tHotline.prototype = {\n\t\t/**\n\t\t * Sets the width of the canvas. Used when clearing the canvas.\n\t\t * @param {number} width - Width of the canvas.\n\t\t */\n\t\twidth: function (width) {\n\t\t\tthis._width = width;\n\t\t\treturn this;\n\t\t},\n\n\t\t/**\n\t\t * Sets the height of the canvas. Used when clearing the canvas.\n\t\t * @param {number} height - Height of the canvas.\n\t\t */\n\t\theight: function (height) {\n\t\t\tthis._height = height;\n\t\t\treturn this;\n\t\t},\n\n\t\t/**\n\t\t * Sets the weight of the path.\n\t\t * @param {number} weight - Weight of the path in px.\n\t\t */\n\t\tweight: function (weight) {\n\t\t\tthis._weight = weight;\n\t\t\treturn this;\n\t\t},\n\n\t\t/**\n\t\t * Sets the width of the outline around the path.\n\t\t * @param {number} outlineWidth - Width of the outline in px.\n\t\t */\n\t\toutlineWidth: function (outlineWidth) {\n\t\t\tthis._outlineWidth = outlineWidth;\n\t\t\treturn this;\n\t\t},\n\n\t\t/**\n\t\t * Sets the color of the outline around the path.\n\t\t * @param {string} outlineColor - A CSS color value.\n\t\t */\n\t\toutlineColor: function (outlineColor) {\n\t\t\tthis._outlineColor = outlineColor;\n\t\t\treturn this;\n\t\t},\n\n\t\t/**\n\t\t * Sets the palette gradient.\n\t\t * @param {Object.<number, string>} palette  - Gradient definition.\n\t\t * e.g. { 0.0: 'white', 1.0: 'black' }\n\t\t */\n\t\tpalette: function (palette) {\n\t\t\tvar canvas = document.createElement('canvas'),\n\t\t\t\t\tctx = canvas.getContext('2d'),\n\t\t\t\t\tgradient = ctx.createLinearGradient(0, 0, 0, 256);\n\n\t\t\tcanvas.width = 1;\n\t\t\tcanvas.height = 256;\n\n\t\t\tfor (var i in palette) {\n\t\t\t\tgradient.addColorStop(i, palette[i]);\n\t\t\t}\n\n\t\t\tctx.fillStyle = gradient;\n\t\t\tctx.fillRect(0, 0, 1, 256);\n\n\t\t\tthis._palette = ctx.getImageData(0, 0, 1, 256).data;\n\n\t\t\treturn this;\n\t\t},\n\n\t\t/**\n\t\t * Sets the value used at the start of the palette gradient.\n\t\t * @param {number} min\n\t\t */\n\t\tmin: function (min) {\n\t\t\tthis._min = min;\n\t\t\treturn this;\n\t\t},\n\n\t\t/**\n\t\t * Sets the value used at the end of the palette gradient.\n\t\t * @param {number} max\n\t\t */\n\t\tmax: function (max) {\n\t\t\tthis._max = max;\n\t\t\treturn this;\n\t\t},\n\n\t\t/**\n\t\t * A path to rander as a hotline.\n\t\t * @typedef Array.<{x:number, y:number, z:number}> Path - Array of x, y and z coordinates.\n\t\t */\n\n\t\t/**\n\t\t * Sets the data that gets drawn on the canvas.\n\t\t * @param {(Path|Path[])} data - A single path or an array of paths.\n\t\t */\n\t\tdata: function (data) {\n\t\t\tthis._data = data;\n\t\t\treturn this;\n\t\t},\n\n\t\t/**\n\t\t * Adds a path to the list of paths.\n\t\t * @param {Path} path\n\t\t */\n\t\tadd: function (path) {\n\t\t\tthis._data.push(path);\n\t\t\treturn this;\n\t\t},\n\n\t\t/**\n\t\t * Draws the currently set paths.\n\t\t */\n\t\tdraw: function () {\n\t\t\tvar ctx = this._ctx;\n\n\t\t\tctx.globalCompositeOperation = 'source-over';\n\t\t\tctx.lineCap = 'round';\n\n\t\t\tthis._drawOutline(ctx);\n\t\t\tthis._drawHotline(ctx);\n\n\t\t\treturn this;\n\t\t},\n\n\t\t/**\n\t\t * Gets the RGB values of a given z value of the current palette.\n\t\t * @param {number} value - Value to get the color for, should be between min and max.\n\t\t * @returns {Array.<number>} The RGB values as an array [r, g, b]\n\t\t */\n\t\tgetRGBForValue: function (value) {\n\t\t\tvar valueRelative = Math.min(Math.max((value - this._min) / (this._max - this._min), 0), 0.999);\n\t\t\tvar paletteIndex = Math.floor(valueRelative * 256) * 4;\n\n\t\t\treturn [\n\t\t\t\tthis._palette[paletteIndex],\n\t\t\t\tthis._palette[paletteIndex + 1],\n\t\t\t\tthis._palette[paletteIndex + 2]\n\t\t\t];\n\t\t},\n\n\t\t/**\n\t\t * Draws the outline of the graphs.\n\t\t * @private\n\t\t */\n\t\t_drawOutline: function (ctx) {\n\t\t\tvar i, j, dataLength, path, pathLength, pointStart, pointEnd;\n\n\t\t\tif (this._outlineWidth) {\n\t\t\t\tfor (i = 0, dataLength = this._data.length; i < dataLength; i++) {\n\t\t\t\t\tpath = this._data[i];\n\t\t\t\t\tctx.lineWidth = this._weight + 2 * this._outlineWidth;\n\n\t\t\t\t\tfor (j = 1, pathLength = path.length; j < pathLength; j++) {\n\t\t\t\t\t\tpointStart = path[j - 1];\n\t\t\t\t\t\tpointEnd = path[j];\n\n\t\t\t\t\t\tctx.strokeStyle = this._outlineColor;\n\t\t\t\t\t\tctx.beginPath();\n\t\t\t\t\t\tctx.moveTo(pointStart.x, pointStart.y);\n\t\t\t\t\t\tctx.lineTo(pointEnd.x, pointEnd.y);\n\t\t\t\t\t\tctx.stroke();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Draws the color encoded hotline of the graphs.\n\t\t * @private\n\t\t */\n\t\t_drawHotline: function (ctx) {\n\t\t\tvar i, j, dataLength, path, pathLength, pointStart, pointEnd,\n\t\t\t\t\tgradient, gradientStartRGB, gradientEndRGB;\n\n\t\t\tctx.lineWidth = this._weight;\n\n\t\t\tfor (i = 0, dataLength = this._data.length; i < dataLength; i++) {\n\t\t\t\tpath = this._data[i];\n\n\t\t\t\tfor (j = 1, pathLength = path.length; j < pathLength; j++) {\n\t\t\t\t\tpointStart = path[j - 1];\n\t\t\t\t\tpointEnd = path[j];\n\n\t\t\t\t\t// Create a gradient for each segment, pick start end end colors from palette gradient\n\t\t\t\t\tgradient = ctx.createLinearGradient(pointStart.x, pointStart.y, pointEnd.x, pointEnd.y);\n\t\t\t\t\tgradientStartRGB = this.getRGBForValue(pointStart.z);\n\t\t\t\t\tgradientEndRGB = this.getRGBForValue(pointEnd.z);\n\t\t\t\t\tgradient.addColorStop(0, 'rgb(' + gradientStartRGB.join(',') + ')');\n\t\t\t\t\tgradient.addColorStop(1, 'rgb(' + gradientEndRGB.join(',') + ')');\n\n\t\t\t\t\tctx.strokeStyle = gradient;\n\t\t\t\t\tctx.beginPath();\n\t\t\t\t\tctx.moveTo(pointStart.x, pointStart.y);\n\t\t\t\t\tctx.lineTo(pointEnd.x, pointEnd.y);\n\t\t\t\t\tctx.stroke();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t};\n\n\n\tvar Renderer = L.Canvas.extend({\n\t\t_initContainer: function () {\n\t\t\tL.Canvas.prototype._initContainer.call(this);\n\t\t\tthis._hotline = new Hotline(this._container);\n\t\t},\n\n\t\t_update: function () {\n\t\t\tL.Canvas.prototype._update.call(this);\n\t\t\tthis._hotline.width(this._container.width);\n\t\t\tthis._hotline.height(this._container.height);\n\t\t},\n\n\t\t_updatePoly: function (layer) {\n\t\t\tif (!this._drawing) { return; }\n\n\t\t\tvar parts = layer._parts;\n\n\t\t\tif (!parts.length) { return; }\n\n\t\t\tthis._updateOptions(layer);\n\n\t\t\tthis._hotline\n\t\t\t\t.data(parts)\n\t\t\t\t.draw();\n\t\t},\n\n\t\t_updateOptions: function (layer) {\n\t\t\tif (layer.options.min != null) {\n\t\t\t\tthis._hotline.min(layer.options.min);\n\t\t\t}\n\t\t\tif (layer.options.max != null) {\n\t\t\t\tthis._hotline.max(layer.options.max);\n\t\t\t}\n\t\t\tif (layer.options.weight != null) {\n\t\t\t\tthis._hotline.weight(layer.options.weight);\n\t\t\t}\n\t\t\tif (layer.options.outlineWidth != null) {\n\t\t\t\tthis._hotline.outlineWidth(layer.options.outlineWidth);\n\t\t\t}\n\t\t\tif (layer.options.outlineColor != null) {\n\t\t\t\tthis._hotline.outlineColor(layer.options.outlineColor);\n\t\t\t}\n\t\t\tif (layer.options.palette) {\n\t\t\t\tthis._hotline.palette(layer.options.palette);\n\t\t\t}\n\t\t}\n\t});\n\n\tvar renderer = function (options) {\n\t\treturn L.Browser.canvas ? new Renderer(options) : null;\n\t};\n\n\n\tvar Util = {\n\t\t/**\n\t\t * This is just a copy of the original Leaflet version that support a third z coordinate.\n\t\t * @see {@link http://leafletjs.com/reference.html#lineutil-clipsegment|Leaflet}\n\t\t */\n\t\tclipSegment: function (a, b, bounds, useLastCode, round) {\n\t\t\tvar codeA = useLastCode ? this._lastCode : L.LineUtil._getBitCode(a, bounds),\n\t\t\t\t\tcodeB = L.LineUtil._getBitCode(b, bounds),\n\t\t\t\t\tcodeOut, p, newCode;\n\n\t\t\t// save 2nd code to avoid calculating it on the next segment\n\t\t\tthis._lastCode = codeB;\n\n\t\t\twhile (true) {\n\t\t\t\t// if a,b is inside the clip window (trivial accept)\n\t\t\t\tif (!(codeA | codeB)) {\n\t\t\t\t\treturn [a, b];\n\t\t\t\t// if a,b is outside the clip window (trivial reject)\n\t\t\t\t} else if (codeA & codeB) {\n\t\t\t\t\treturn false;\n\t\t\t\t// other cases\n\t\t\t\t} else {\n\t\t\t\t\tcodeOut = codeA || codeB;\n\t\t\t\t\tp = L.LineUtil._getEdgeIntersection(a, b, codeOut, bounds, round);\n\t\t\t\t\tnewCode = L.LineUtil._getBitCode(p, bounds);\n\n\t\t\t\t\tif (codeOut === codeA) {\n\t\t\t\t\t\tp.z = a.z;\n\t\t\t\t\t\ta = p;\n\t\t\t\t\t\tcodeA = newCode;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tp.z = b.z;\n\t\t\t\t\t\tb = p;\n\t\t\t\t\t\tcodeB = newCode;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t};\n\n\n\tL.Hotline = L.Polyline.extend({\n\t\tstatics: {\n\t\t\tRenderer: Renderer,\n\t\t\trenderer: renderer\n\t\t},\n\n\t\toptions: {\n\t\t\trenderer: renderer(),\n\t\t\tmin: 0,\n\t\t\tmax: 1,\n\t\t\tpalette: {\n\t\t\t\t0.0: 'green',\n\t\t\t\t0.5: 'yellow',\n\t\t\t\t1.0: 'red'\n\t\t\t},\n\t\t\tweight: 5,\n\t\t\toutlineColor: 'black',\n\t\t\toutlineWidth: 1\n\t\t},\n\n\t\tgetRGBForValue: function (value) {\n\t\t\treturn this._renderer._hotline.getRGBForValue(value);\n\t\t},\n\n\t\t/**\n\t\t * Just like the Leaflet version, but with support for a z coordinate.\n\t\t */\n\t\t_projectLatlngs: function (latlngs, result, projectedBounds) {\n\t\t\tvar flat = latlngs[0] instanceof L.LatLng,\n\t\t\t\t\tlen = latlngs.length,\n\t\t\t\t\ti, ring;\n\n\t\t\tif (flat) {\n\t\t\t\tring = [];\n\t\t\t\tfor (i = 0; i < len; i++) {\n\t\t\t\t\tring[i] = this._map.latLngToLayerPoint(latlngs[i]);\n\t\t\t\t\t// Add the altitude of the latLng as the z coordinate to the point\n\t\t\t\t\tring[i].z = latlngs[i].alt;\n\t\t\t\t\tprojectedBounds.extend(ring[i]);\n\t\t\t\t}\n\t\t\t\tresult.push(ring);\n\t\t\t} else {\n\t\t\t\tfor (i = 0; i < len; i++) {\n\t\t\t\t\tthis._projectLatlngs(latlngs[i], result, projectedBounds);\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\n\t\t/**\n\t\t * Just like the Leaflet version, but uses `Util.clipSegment()`.\n\t\t */\n\t\t_clipPoints: function () {\n\t\t\tif (this.options.noClip) {\n\t\t\t\tthis._parts = this._rings;\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tthis._parts = [];\n\n\t\t\tvar parts = this._parts,\n\t\t\t\t\tbounds = this._renderer._bounds,\n\t\t\t\t\ti, j, k, len, len2, segment, points;\n\n\t\t\tfor (i = 0, k = 0, len = this._rings.length; i < len; i++) {\n\t\t\t\tpoints = this._rings[i];\n\n\t\t\t\tfor (j = 0, len2 = points.length; j < len2 - 1; j++) {\n\t\t\t\t\tsegment = Util.clipSegment(points[j], points[j + 1], bounds, j, true);\n\n\t\t\t\t\tif (!segment) { continue; }\n\n\t\t\t\t\tparts[k] = parts[k] || [];\n\t\t\t\t\tparts[k].push(segment[0]);\n\n\t\t\t\t\t// if segment goes out of screen, or it's the last one, it's the end of the line part\n\t\t\t\t\tif ((segment[1] !== points[j + 1]) || (j === len2 - 2)) {\n\t\t\t\t\t\tparts[k].push(segment[1]);\n\t\t\t\t\t\tk++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\n\t\t_clickTolerance: function () {\n\t\t\treturn this.options.weight / 2 + this.options.outlineWidth + (L.Browser.touch ? 10 : 0);\n\t\t}\n\t});\n\n\tL.hotline = function (latlngs, options) {\n\t\treturn new L.Hotline(latlngs, options);\n\t};\n\n\n\treturn L;\n}));\n"]}