You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1 line
1.2 MiB

2 years ago
{"ast":null,"code":"/* @preserve\n * Leaflet 1.8.0, a JS library for interactive maps. https://leafletjs.com\n * (c) 2010-2022 Vladimir Agafonkin, (c) 2010-2011 CloudMade\n */\n(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : typeof define === 'function' && define.amd ? define(['exports'], factory) : (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.leaflet = {}));\n})(this, function (exports) {\n 'use strict';\n\n var version = \"1.8.0\";\n /*\r\n * @namespace Util\r\n *\r\n * Various utility functions, used by Leaflet internally.\r\n */\n // @function extend(dest: Object, src?: Object): Object\n // Merges the properties of the `src` object (or multiple objects) into `dest` object and returns the latter. Has an `L.extend` shortcut.\n\n function extend(dest) {\n var i, j, len, src;\n\n for (j = 1, len = arguments.length; j < len; j++) {\n src = arguments[j];\n\n for (i in src) {\n dest[i] = src[i];\n }\n }\n\n return dest;\n } // @function create(proto: Object, properties?: Object): Object\n // Compatibility polyfill for [Object.create](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object/create)\n\n\n var create$2 = Object.create || function () {\n function F() {}\n\n return function (proto) {\n F.prototype = proto;\n return new F();\n };\n }(); // @function bind(fn: Function, …): Function\n // Returns a new function bound to the arguments passed, like [Function.prototype.bind](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Function/bind).\n // Has a `L.bind()` shortcut.\n\n\n function bind(fn, obj) {\n var slice = Array.prototype.slice;\n\n if (fn.bind) {\n return fn.bind.apply(fn, slice.call(arguments, 1));\n }\n\n var args = slice.call(arguments, 2);\n return function () {\n return fn.apply(obj, args.length ? args.concat(slice.call(arguments)) : arguments);\n };\n } // @property lastId: Number\n // Last unique ID used by [`stamp()`](#util-stamp)\n\n\n var lastId = 0; // @function stamp(obj: Object): Number\n // Returns the unique ID of an object, assigning it one if it doesn't have it.\n\n function stamp(obj) {\n if (!('_leaflet_id' in obj)) {\n obj['_leaflet_id'] = ++lastId;\n }\n\n return obj._leaflet_id;\n } // @function throttle(fn: Function, time: Number, context: Object): Function\n // Returns a function which executes function `fn` with the given scope `context`\n // (so that the `this` keyword refers to `context` inside `fn`'s code). The function\n // `fn` will be called no more than one time per given amount of `time`. The arguments\n // received by the bound function will be any arguments passed when binding the\n // function, followed by any arguments passed when invoking the bound function.\n // Has an `L.throttle` shortcut.\n\n\n function throttle(fn, time, context) {\n var lock, args, wrapperFn, later;\n\n later = function () {\n // reset lock and call if queued\n lock = false;\n\n if (args) {\n wrapperFn.apply(context, args);\n args = false;\n }\n };\n\n wrapperFn = function () {\n if (lock) {\n // called too soon, queue to call later\n args = arguments;\n } else {\n // call and lock until later\n fn.apply(context, arguments);\n setTimeout(later, time);\n lock = true;\n }\n };\n\n return wrapperFn;\n } // @function wrapNum(num: Number, range: Number[], includeMax?: Boolean): Number\n // Returns the number `num` modulo `range` in such a way so it lies within\n // `range[0]` and `range[1]`. The returned value will be always smaller than\n // `range[1]` unless `includeMax` is set to `true`.\n\n\n function wrapNum(x, range, includeMax) {\n var max = range[1],\n min = range[0],\n d = max - min;\n return x === max && includeMax ? x : ((x - min) % d + d) % d + min;\n } // @function false