leaflet-lasso
Advanced tools
Comparing version 2.2.12 to 2.2.13
# Changelog | ||
## 2.2.13 | ||
- update dependencies | ||
## 2.2.12 | ||
@@ -4,0 +8,0 @@ |
'use strict'; | ||
Object.defineProperty(exports, '__esModule', { value: true }); | ||
var L = require('leaflet'); | ||
var spatial = require('@terraformer/spatial'); | ||
function _interopNamespace(e) { | ||
if (e && e.__esModule) return e; | ||
function _interopNamespaceDefault(e) { | ||
var n = Object.create(null); | ||
@@ -22,7 +19,7 @@ if (e) { | ||
} | ||
n["default"] = e; | ||
n.default = e; | ||
return Object.freeze(n); | ||
} | ||
var L__namespace = /*#__PURE__*/_interopNamespace(L); | ||
var L__namespace = /*#__PURE__*/_interopNamespaceDefault(L); | ||
@@ -43,3 +40,3 @@ /****************************************************************************** | ||
***************************************************************************** */ | ||
/* global Reflect, Promise */ | ||
/* global Reflect, Promise, SuppressedError, Symbol */ | ||
@@ -82,2 +79,7 @@ var extendStatics = function(d, b) { | ||
typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) { | ||
var e = new Error(message); | ||
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e; | ||
}; | ||
var LassoPolygon = /** @class */ (function (_super) { | ||
@@ -84,0 +86,0 @@ __extends(LassoPolygon, _super); |
@@ -12,3 +12,3 @@ import * as L from 'leaflet'; | ||
} | ||
declare type LassoHandlerFinishedEvent = L.LeafletEvent & LassoHandlerFinishedEventData; | ||
type LassoHandlerFinishedEvent = L.LeafletEvent & LassoHandlerFinishedEventData; | ||
declare const ENABLED_EVENT = "lasso.enabled"; | ||
@@ -40,3 +40,3 @@ declare const DISABLED_EVENT = "lasso.disabled"; | ||
} | ||
declare type LassoControlOptions = L.ControlOptions & LassoControlOptionsData & LassoHandlerOptions; | ||
type LassoControlOptions = L.ControlOptions & LassoControlOptionsData & LassoHandlerOptions; | ||
declare class LassoControl extends L.Control { | ||
@@ -67,2 +67,2 @@ options: LassoControlOptions; | ||
export { ACTIVE_CLASS, DISABLED_EVENT, ENABLED_EVENT, FINISHED_EVENT, LassoControl, LassoControlOptions, LassoControlOptionsData, LassoHandler, LassoHandlerFinishedEvent, LassoHandlerOptions }; | ||
export { ACTIVE_CLASS, DISABLED_EVENT, ENABLED_EVENT, FINISHED_EVENT, LassoControl, type LassoControlOptions, type LassoControlOptionsData, LassoHandler, type LassoHandlerFinishedEvent, type LassoHandlerOptions }; |
@@ -18,3 +18,3 @@ import * as L from 'leaflet'; | ||
***************************************************************************** */ | ||
/* global Reflect, Promise */ | ||
/* global Reflect, Promise, SuppressedError, Symbol */ | ||
@@ -57,2 +57,7 @@ var extendStatics = function(d, b) { | ||
typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) { | ||
var e = new Error(message); | ||
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e; | ||
}; | ||
var LassoPolygon = /** @class */ (function (_super) { | ||
@@ -59,0 +64,0 @@ __extends(LassoPolygon, _super); |
@@ -7,4 +7,3 @@ (function (global, factory) { | ||
function _interopNamespace(e) { | ||
if (e && e.__esModule) return e; | ||
function _interopNamespaceDefault(e) { | ||
var n = Object.create(null); | ||
@@ -22,7 +21,7 @@ if (e) { | ||
} | ||
n["default"] = e; | ||
n.default = e; | ||
return Object.freeze(n); | ||
} | ||
var L__namespace = /*#__PURE__*/_interopNamespace(L); | ||
var L__namespace = /*#__PURE__*/_interopNamespaceDefault(L); | ||
@@ -43,3 +42,3 @@ /****************************************************************************** | ||
***************************************************************************** */ | ||
/* global Reflect, Promise */ | ||
/* global Reflect, Promise, SuppressedError, Symbol */ | ||
@@ -82,2 +81,7 @@ var extendStatics = function(d, b) { | ||
typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) { | ||
var e = new Error(message); | ||
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e; | ||
}; | ||
var LassoPolygon = /** @class */ (function (_super) { | ||
@@ -1204,5 +1208,3 @@ __extends(LassoPolygon, _super); | ||
Object.defineProperty(exports, '__esModule', { value: true }); | ||
})); | ||
//# sourceMappingURL=leaflet-lasso.umd.js.map |
@@ -1,2 +0,2 @@ | ||
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("leaflet")):"function"==typeof define&&define.amd?define(["exports","leaflet"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).LeafletLasso={},t.L)}(this,(function(t,e){"use strict";function o(t){if(t&&t.__esModule)return t;var e=Object.create(null);return t&&Object.keys(t).forEach((function(o){if("default"!==o){var n=Object.getOwnPropertyDescriptor(t,o);Object.defineProperty(e,o,n.get?n:{enumerable:!0,get:function(){return t[o]}})}})),e.default=t,Object.freeze(e)}var n=o(e),r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])})(t,e)};function i(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}var s=function(){return(s=Object.assign||function(t){for(var e,o=1,n=arguments.length;o<n;o++)for(var r in e=arguments[o])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)};function a(t,e,o){if(o||2===arguments.length)for(var n,r=0,i=e.length;r<i;r++)!n&&r in e||(n||(n=Array.prototype.slice.call(e,0,r)),n[r]=e[r]);return t.concat(n||Array.prototype.slice.call(e))}var l=function(t){function e(e,o){var r=t.call(this)||this;return r.polyline=n.polyline(e,o),r.polygon=n.polygon(e,s(s({},o),{weight:0})),r}return i(e,t),e.prototype.onAdd=function(t){return this.polyline.addTo(t),this.polygon.addTo(t),this},e.prototype.onRemove=function(){return this.polyline.remove(),this.polygon.remove(),this},e.prototype.addLatLng=function(t){return this.polyline.addLatLng(t),this.polygon.addLatLng(t),this},e.prototype.getLatLngs=function(){return this.polygon.getLatLngs()[0]},e.prototype.toGeoJSON=function(){return this.polygon.toGeoJSON()},e}(n.Layer),u=function(t){for(var e=null,o=null,n=null,r=null,i=0;i<t.length;i++)for(var s=t[i],a=0;a<s.length;a++){var l=s[a],u=l[0],c=l[1];(null===e||u<e)&&(e=u),(null===o||u>o)&&(o=u),(null===n||c<n)&&(n=c),(null===r||c>r)&&(r=c)}return[e,n,o,r]},c=function(t){for(var e=null,o=null,n=null,r=null,i=0;i<t.length;i++){var s=t[i],a=s[0],l=s[1];(null===e||a<e)&&(e=a),(null===o||a>o)&&(o=a),(null===n||l<n)&&(n=l),(null===r||l>r)&&(r=l)}return[e,n,o,r]},p=function(t){for(var e=[],o=t.features.length-1;o>=0;o--){var n=d(t.features[o].geometry);e.push([n[0],n[1]]),e.push([n[2],n[3]])}return c(e)},f=function(t){for(var e=[],o=t.geometries.length-1;o>=0;o--){var n=d(t.geometries[o]);e.push([n[0],n[1]]),e.push([n[2],n[3]])}return c(e)},d=function t(e){if(e.type)switch(e.type){case"Point":return[e.coordinates[0],e.coordinates[1],e.coordinates[0],e.coordinates[1]];case"MultiPoint":case"LineString":return c(e.coordinates);case"MultiLineString":case"Polygon":return u(e.coordinates);case"MultiPolygon":return function(t){for(var e=null,o=null,n=null,r=null,i=0;i<t.length;i++)for(var s=t[i],a=0;a<s.length;a++)for(var l=s[a],u=0;u<l.length;u++){var c=l[u],p=c[0],f=c[1];(null===e||p<e)&&(e=p),(null===o||p>o)&&(o=p),(null===n||f<n)&&(n=f),(null===r||f>r)&&(r=f)}return[e,n,o,r]}(e.coordinates);case"Feature":return e.geometry?t(e.geometry):null;case"FeatureCollection":return p(e);case"GeometryCollection":return f(e);default:throw new Error("Unknown type: "+e.type)}return null},h=function(t){return!isNaN(parseFloat(t))&&isFinite(t)},g=function(t,e,o,n){var r=(n[0]-o[0])*(t[1]-o[1])-(n[1]-o[1])*(t[0]-o[0]),i=(e[0]-t[0])*(t[1]-o[1])-(e[1]-t[1])*(t[0]-o[0]),s=(n[1]-o[1])*(e[0]-t[0])-(n[0]-o[0])*(e[1]-t[1]);if(0!==s){var a=r/s,l=i/s;if(a>=0&&a<=1&&l>=0&&l<=1)return!0}return!1},y=function t(e,o){if(h(e[0][0])){if(h(o[0][0])){for(var n=0;n<e.length-1;n++)for(var r=0;r<o.length-1;r++)if(g(e[n],e[n+1],o[r],o[r+1]))return!0}else for(var i=0;i<o.length;i++)if(t(e,o[i]))return!0}else for(var s=0;s<e.length;s++)if(t(e[s],o))return!0;return!1},v=function(t,e){for(var o=!1,n=-1,r=t.length,i=r-1;++n<r;i=n)(t[n][1]<=e[1]&&e[1]<t[i][1]||t[i][1]<=e[1]&&e[1]<t[n][1])&&e[0]<(t[i][0]-t[n][0])*(e[1]-t[n][1])/(t[i][1]-t[n][1])+t[n][0]&&(o=!o);return o},m=function(t,e){for(var o=0;o<t.length;o++)if(t[o]!==e[o])return!1;return!0},M=function(t,e){return t[0]>e[0]?-1:t[0]<e[0]?1:t[1]>e[1]?-1:t[1]<e[1]?1:0},L=function(t){for(var e=[],o=0;o<t.length;o++){var n=t[o].slice();!1===m(n[0],n[n.length-1])&&n.push(n[0]),e.push(n)}return e}; | ||
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("leaflet")):"function"==typeof define&&define.amd?define(["exports","leaflet"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).LeafletLasso={},t.L)}(this,(function(t,e){"use strict";function o(t){var e=Object.create(null);return t&&Object.keys(t).forEach((function(o){if("default"!==o){var n=Object.getOwnPropertyDescriptor(t,o);Object.defineProperty(e,o,n.get?n:{enumerable:!0,get:function(){return t[o]}})}})),e.default=t,Object.freeze(e)}var n=o(e),r=function(t,e){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o])},r(t,e)};function i(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function o(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(o.prototype=e.prototype,new o)}var s=function(){return s=Object.assign||function(t){for(var e,o=1,n=arguments.length;o<n;o++)for(var r in e=arguments[o])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t},s.apply(this,arguments)};function a(t,e,o){if(o||2===arguments.length)for(var n,r=0,i=e.length;r<i;r++)!n&&r in e||(n||(n=Array.prototype.slice.call(e,0,r)),n[r]=e[r]);return t.concat(n||Array.prototype.slice.call(e))}"function"==typeof SuppressedError&&SuppressedError;var l=function(t){function e(e,o){var r=t.call(this)||this;return r.polyline=n.polyline(e,o),r.polygon=n.polygon(e,s(s({},o),{weight:0})),r}return i(e,t),e.prototype.onAdd=function(t){return this.polyline.addTo(t),this.polygon.addTo(t),this},e.prototype.onRemove=function(){return this.polyline.remove(),this.polygon.remove(),this},e.prototype.addLatLng=function(t){return this.polyline.addLatLng(t),this.polygon.addLatLng(t),this},e.prototype.getLatLngs=function(){return this.polygon.getLatLngs()[0]},e.prototype.toGeoJSON=function(){return this.polygon.toGeoJSON()},e}(n.Layer),u=function(t){for(var e=null,o=null,n=null,r=null,i=0;i<t.length;i++)for(var s=t[i],a=0;a<s.length;a++){var l=s[a],u=l[0],c=l[1];(null===e||u<e)&&(e=u),(null===o||u>o)&&(o=u),(null===n||c<n)&&(n=c),(null===r||c>r)&&(r=c)}return[e,n,o,r]},c=function(t){for(var e=null,o=null,n=null,r=null,i=0;i<t.length;i++){var s=t[i],a=s[0],l=s[1];(null===e||a<e)&&(e=a),(null===o||a>o)&&(o=a),(null===n||l<n)&&(n=l),(null===r||l>r)&&(r=l)}return[e,n,o,r]},p=function(t){for(var e=[],o=t.features.length-1;o>=0;o--){var n=d(t.features[o].geometry);e.push([n[0],n[1]]),e.push([n[2],n[3]])}return c(e)},f=function(t){for(var e=[],o=t.geometries.length-1;o>=0;o--){var n=d(t.geometries[o]);e.push([n[0],n[1]]),e.push([n[2],n[3]])}return c(e)},d=function t(e){if(e.type)switch(e.type){case"Point":return[e.coordinates[0],e.coordinates[1],e.coordinates[0],e.coordinates[1]];case"MultiPoint":case"LineString":return c(e.coordinates);case"MultiLineString":case"Polygon":return u(e.coordinates);case"MultiPolygon":return function(t){for(var e=null,o=null,n=null,r=null,i=0;i<t.length;i++)for(var s=t[i],a=0;a<s.length;a++)for(var l=s[a],u=0;u<l.length;u++){var c=l[u],p=c[0],f=c[1];(null===e||p<e)&&(e=p),(null===o||p>o)&&(o=p),(null===n||f<n)&&(n=f),(null===r||f>r)&&(r=f)}return[e,n,o,r]}(e.coordinates);case"Feature":return e.geometry?t(e.geometry):null;case"FeatureCollection":return p(e);case"GeometryCollection":return f(e);default:throw new Error("Unknown type: "+e.type)}return null},h=function(t){return!isNaN(parseFloat(t))&&isFinite(t)},g=function(t,e,o,n){var r=(n[0]-o[0])*(t[1]-o[1])-(n[1]-o[1])*(t[0]-o[0]),i=(e[0]-t[0])*(t[1]-o[1])-(e[1]-t[1])*(t[0]-o[0]),s=(n[1]-o[1])*(e[0]-t[0])-(n[0]-o[0])*(e[1]-t[1]);if(0!==s){var a=r/s,l=i/s;if(a>=0&&a<=1&&l>=0&&l<=1)return!0}return!1},y=function t(e,o){if(h(e[0][0])){if(h(o[0][0])){for(var n=0;n<e.length-1;n++)for(var r=0;r<o.length-1;r++)if(g(e[n],e[n+1],o[r],o[r+1]))return!0}else for(var i=0;i<o.length;i++)if(t(e,o[i]))return!0}else for(var s=0;s<e.length;s++)if(t(e[s],o))return!0;return!1},v=function(t,e){for(var o=!1,n=-1,r=t.length,i=r-1;++n<r;i=n)(t[n][1]<=e[1]&&e[1]<t[i][1]||t[i][1]<=e[1]&&e[1]<t[n][1])&&e[0]<(t[i][0]-t[n][0])*(e[1]-t[n][1])/(t[i][1]-t[n][1])+t[n][0]&&(o=!o);return o},m=function(t,e){for(var o=0;o<t.length;o++)if(t[o]!==e[o])return!1;return!0},M=function(t,e){return t[0]>e[0]?-1:t[0]<e[0]?1:t[1]>e[1]?-1:t[1]<e[1]?1:0},L=function(t){for(var e=[],o=0;o<t.length;o++){var n=t[o].slice();!1===m(n[0],n[n.length-1])&&n.push(n[0]),e.push(n)}return e}; | ||
/* @preserve | ||
@@ -6,3 +6,3 @@ * @terraformer/spatial - v2.1.1 - MIT | ||
* Tue Aug 02 2022 14:23:50 GMT-0700 (Pacific Daylight Time) | ||
*/var A=function(t,e){if(t.length!==e.length)return!1;for(var o=t.slice().sort(M),n=e.slice().sort(M),r=0;r<o.length;r++){if(o[r].length!==n[r].length)return!1;for(var i=0;i<o.length;i++)if(o[r][i]!==n[r][i])return!1}return!0},b=function(t,e){if(t&&t.length){if(1===t.length)return v(t[0],e);if(v(t[0],e)){for(var o=1;o<t.length;o++)if(v(t[o],e))return!1;return!0}return!1}return!1},E=function t(e,o){var n,r,i;if("Feature"===o.type&&(o=o.geometry),"Point"===o.type&&"Point"===e.type)return m(e.coordinates,o.coordinates);if("MultiLineString"===o.type&&"Point"===e.type)for(r=0;r<e.coordinates.length;r++){if(t(e,{type:"LineString",coordinates:o.coordinates[r]}))return!0}if(("LineString"===o.type||"MultiPoint"===o.type)&&"Point"===e.type)for(r=0;r<o.coordinates.length;r++){if(e.coordinates.length!==o.coordinates[r].length)return!1;if(m(e.coordinates,o.coordinates[r]))return!0}if("Polygon"===o.type){if("Polygon"===e.type){if(o.coordinates.length===e.coordinates.length)for(r=0;r<e.coordinates.length;r++)if(A(e.coordinates[r],o.coordinates[r]))return!0;return!(!e.coordinates.length||!b(o.coordinates,e.coordinates[0][0]))&&!y(L(e.coordinates),L(o.coordinates))}if("Point"===e.type)return b(o.coordinates,e.coordinates);if("LineString"===e.type||"MultiPoint"===e.type){if(!e.coordinates||0===e.coordinates.length)return!1;for(r=0;r<e.coordinates.length;r++)if(!1===b(o.coordinates,e.coordinates[r]))return!1;return!0}if("MultiLineString"===e.type){for(r=0;r<e.coordinates.length;r++){if(!1===t({type:"LineString",coordinates:e.coordinates[r]},o))return i++,!1}return!0}if("MultiPolygon"===e.type){for(r=0;r<e.coordinates.length;r++){if(!1===t({type:"Polygon",coordinates:e.coordinates[r]},o))return!1}return!0}}if("MultiPolygon"===o.type){if("Point"===e.type){if(o.coordinates.length)for(r=0;r<o.coordinates.length;r++)if(n=o.coordinates[r],b(n,e.coordinates)&&!1===y([e.coordinates],o.coordinates))return!0;return!1}if("Polygon"===e.type){for(r=0;r<e.coordinates.length;r++)if(o.coordinates[r].length===e.coordinates.length)for(var s=0;s<e.coordinates.length;s++)if(A(e.coordinates[s],o.coordinates[r][s]))return!0;if(!1===y(e.coordinates,o.coordinates)&&o.coordinates.length){for(r=0;r<o.coordinates.length;r++)n=o.coordinates[r],i=!1!==b(n,e.coordinates[0][0]);return i}}else if("LineString"===e.type||"MultiPoint"===e.type)for(r=0;r<o.coordinates.length;r++){return!!t(e,{type:"Polygon",coordinates:o.coordinates[r]})}else{if("MultiLineString"===e.type){for(r=0;r<e.coordinates.length;r++){if(!1===t({type:"LineString",coordinates:e.coordinates[r]},o))return!1}return!0}if("MultiPolygon"===e.type){for(r=0;r<o.coordinates.length;r++){if(!1===t(e,{type:"Polygon",coordinates:o.coordinates[r]}))return!1}return!0}}}return!1},P=function(t,e){return E(e,t)},S=function t(e,o){return"Feature"===o.type&&(o=o.geometry),!(!E(e,o)&&!E(o,e))||(!("MultiPolygon"!==e.type||!function(t,e){return t.coordinates.some((function(t){var o={type:"Polygon",coordinates:t};return E(o,e)||E(e,o)}))}(e,o))||("Point"!==e.type&&"MultiPoint"!==e.type&&"Point"!==o.type&&"MultiPoint"!==o.type?y(e.coordinates,o.coordinates):"Feature"===e.type?t(e.geometry,o):(function(){var t=Array.prototype.slice.apply(arguments);"undefined"!=typeof console&&console.warn&&console.warn.apply(console,t)}("Type "+e.type+" to "+o.type+" intersection is not supported by intersects"),!1)))};var w=6378137,D=6356752.3142,C=1/298.257223563,B=function(t,e,o){for(var n,r=o||64,i={type:"Polygon",coordinates:[[]]},s=0;s<r;s++)n=360*s/r,i.coordinates[0].push(O(t,n,e));return i.coordinates=L(i.coordinates),i},O=function(t,e,o){for(var n,r,i,s=w,a=D,l=C,u=t[0],c=t[1],p=o,f=Math.PI,d=e*f/180,h=Math.sin(d),g=Math.cos(d),y=(1-l)*Math.tan(c*f/180),v=1/Math.sqrt(1+y*y),m=y*v,M=Math.atan2(y,g),L=v*h,A=1-L*L,b=A*(s*s-a*a)/(a*a),E=1+b/16384*(4096+b*(b*(320-175*b)-768)),P=b/1024*(256+b*(b*(74-47*b)-128)),S=p/(a*E),B=2*Math.PI;Math.abs(S-B)>1e-12;)n=Math.cos(2*M+S),B=S,S=p/(a*E)+P*(r=Math.sin(S))*(n+P/4*((i=Math.cos(S))*(2*n*n-1)-P/6*n*(4*r*r-3)*(4*n*n-3)));var O=m*r-v*i*g,T=Math.atan2(m*i+v*r*g,(1-l)*Math.sqrt(L*L+O*O)),I=l/16*A*(4+l*(4-3*A));return[u+180*(Math.atan2(r*h,v*i-m*r*g)-(1-I)*l*L*(S+I*r*(n+I*i*(2*n*n-1))))/f,180*T/f]};function T(t,e){return function(t,e,o){var n=o||64,r=e||250;if(!t||t.length<2||!r||!n)throw new Error("Terraformer: missing parameter for Terraformer.Circle");return{type:"Feature",geometry:B(t,r,n),properties:{radius:r,center:t,steps:n}}}(n.GeoJSON.latLngToCoords(t),e).geometry}function I(t,e){return void 0===e&&(e={}),t instanceof n.Circle?T(t.getLatLng(),t.getRadius()):t instanceof n.CircleMarker?null!=e.zoom&&null!=e.crs?T(t.getLatLng(),function(t,e,o){var r=t.getLatLng(),i=e.latLngToPoint(r,o),s=t.getRadius()/Math.SQRT2,a=n.point([i.x-s,i.y-s]),l=e.pointToLatLng(a,o);return e.distance(r,l)}(t,e.crs,e.zoom)):(console.warn("Zoom and CRS is required for calculating CircleMarker polygon, falling back to center point only"),t.toGeoJSON().geometry):t instanceof n.Marker||t instanceof n.Polyline?t.toGeoJSON().geometry:void console.warn("Layer GeoJSON geometry is not available",t)}function U(t,e,o){void 0===o&&(o={});var r=t.toGeoJSON().geometry,i=t.getBounds();return e.filter((function(t){var e,s,a;return t instanceof n.Polyline?s=t.getBounds():(e=I(t,o))&&(a=d(e),s=n.latLngBounds([a[1],a[0]],[a[3],a[2]])),!(!s||!s.isValid())&&(!!(o.intersect?i.intersects(s):i.contains(s))&&(e||(e=I(t,o)),!!e&&(o.intersect?function(t,e){return"Point"===e.type?P(t,e):S(t,e)}(r,e):function(t,e){return P(t,e)}(r,e))))}))}function k(t,e){void 0===e&&(e={});var o=e.insertAt;if(t&&"undefined"!=typeof document){var n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css","top"===o&&n.firstChild?n.insertBefore(r,n.firstChild):n.appendChild(r),r.styleSheet?r.styleSheet.cssText=t:r.appendChild(document.createTextNode(t))}}k(".leaflet-lasso-active {\n cursor: crosshair;\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n}\n\n.leaflet-lasso-active .leaflet-interactive {\n cursor: crosshair;\n pointer-events: none;\n}");var R="lasso.enabled",N="lasso.disabled",F="lasso.finished",G="leaflet-lasso-active",H=function(t){function e(e,o){void 0===o&&(o={});var r=t.call(this,e)||this;return r.options={polygon:{color:"#00C3FF",weight:2},intersect:!1},r.onMapMouseDownBound=r.onMapMouseDown.bind(r),r.onDocumentMouseMoveBound=r.onDocumentMouseMove.bind(r),r.onDocumentMouseUpBound=r.onDocumentMouseUp.bind(r),r.map=e,n.Util.setOptions(r,o),r}return i(e,t),e.prototype.setOptions=function(t){this.options=s(s({},this.options),t)},e.prototype.toggle=function(){this.enabled()?this.disable():this.enable()},e.prototype.addHooks=function(){this.map.getPane("mapPane"),this.map.getContainer().addEventListener("mousedown",this.onMapMouseDownBound),this.map.getContainer().addEventListener("touchstart",this.onMapMouseDownBound),this.map.getContainer().classList.add(G),this.map.dragging.disable(),this.map.fire(R)},e.prototype.removeHooks=function(){this.polygon&&(this.map.removeLayer(this.polygon),this.polygon=void 0),this.map.getContainer().removeEventListener("mousedown",this.onMapMouseDownBound),this.map.getContainer().removeEventListener("touchstart",this.onMapMouseDownBound),document.removeEventListener("mousemove",this.onDocumentMouseMoveBound),document.removeEventListener("touchmove",this.onDocumentMouseMoveBound),document.removeEventListener("mouseup",this.onDocumentMouseUpBound),document.removeEventListener("touchend",this.onDocumentMouseUpBound),this.map.getContainer().classList.remove(G),document.body.classList.remove(G),this.map.dragging.enable(),this.map.fire(N)},e.prototype.onMapMouseDown=function(t){t.stopPropagation();var e=this.eventToMouseEvent("down",t);if(e)if(t instanceof MouseEvent&&!t._simulated&&1!==t.buttons)this.disable();else if(!t.target.closest(".leaflet-control-container")){var o=this.map.mouseEventToLatLng(e);this.polygon=new l([o],this.options.polygon).addTo(this.map),document.body.classList.add(G),document.addEventListener("mousemove",this.onDocumentMouseMoveBound),document.addEventListener("touchmove",this.onDocumentMouseMoveBound),document.addEventListener("mouseup",this.onDocumentMouseUpBound),document.addEventListener("touchend",this.onDocumentMouseUpBound),t.preventDefault()}},e.prototype.onDocumentMouseMove=function(t){t.stopPropagation();var e=this.eventToMouseEvent("move",t);if(e&&this.polygon)if(t instanceof MouseEvent&&!t._simulated&&1!==t.buttons)this.finish(t);else{var o=this.map.mouseEventToLatLng(e);this.polygon.addLatLng(o),t.preventDefault()}},e.prototype.onDocumentMouseUp=function(t){this.finish(t),t.stopPropagation(),t.preventDefault()},e.prototype.eventToMouseEvent=function(t,e){return e instanceof MouseEvent?e:e instanceof TouchEvent&&1===e.touches.length?new MouseEvent(t,{screenX:e.touches[0].screenX,screenY:e.touches[0].screenY,clientX:e.touches[0].clientX,clientY:e.touches[0].clientY,buttons:1}):void 0},e.prototype.finish=function(t){var e=this;if(this.polygon){var o=[];this.map.eachLayer((function(t){t!==e.polygon&&t!==e.polygon.polyline&&t!==e.polygon.polygon&&(n.MarkerCluster&&t instanceof n.MarkerCluster?o.push.apply(o,t.getAllChildMarkers()):(t instanceof n.Marker||t instanceof n.Path)&&o.push(t))}));var r=U(this.polygon.polygon,o,{zoom:this.map.getZoom(),crs:this.map.options.crs,intersect:this.options.intersect});this.map.fire(F,{originalEvent:t,latLngs:this.polygon.getLatLngs(),layers:r}),this.disable()}},e}(n.Handler);k(".leaflet-control-lasso {\n background: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAACXBIWXMAAAsSAAALEgHS3X78AAAD6UlEQVR4nO1b7XHbMAwFfP0fdYKqE8QbRJ0gGUEjaAR3A4/gbuBOUHWCKhs4E1SegD06jzmYpWhJpiRKNu58Tix+AA8gCQIQK6Xolml109LfAbgDcAfg5gH4NPQEzJwSkf4kRLR2NKmJqNLfSqlqaH7+4y/0McjML0SUQdinHkO8ApCSiPZKqToogxYFAQBC50T03NDkN74raFzSGtahreSLo+9PALG7mlEXaQD6fMD0BgIp8TkQ0ZaINChpl7ExZoZxK2vcGr8nfXl2ztm5g1twI/Q6KHPvVlFg/DMgJgEAWpWCay3lIYX2zJ1bQFQhAO+i9b2l8VEEd/BSWEooBgUAm5REPvg67AGCrZDdIABgQ6qF1oOu8QBAbK4FwTd4bq23SbXeks/OIPg0f7V5TQRCpz3BNdhamH30wgu+CwFC66VqD5IIByRas/eAYDbGqi8AW+FszEp4ocC6y1KQneW6z+YmvJDDLIVDVwBKdNzPVXghi/FbLjprp4AIM2fi6loMcusal8zN8eXirOp885jNrn/BAlKxnL17GWPj+As8viqlDguwAG3V+hR7JKJvSqmyqd1KmMnrUoQHGaEzX6OVaLAfg6sRyUSeUt+UKxGobDSTmZKR5yIAj/h79IhsDPSRFxg6+ho9AAukpI1IgydGxiY4dSRON+/SXgwAyE1sHbkF79JmeEuaPs91H4DWf+Ffk1nSgDwQ0RH5iUbZqgXcAI0MG/FbKn7f+i5DZo14PabISR/lb0qpjWETXq252LmSsidaCYfh8s0pbnKZuFHuEzNvmNl5MiR9YmmRLYHaxb8VJ3SG+UzD3ZyvwyI/UEPozMoZFE2xTjOADId1yuhGBMLO0raSUSE74HsGgDoPiZULsIISPkFqtUlEuOx0YsiHadeIakTC57bGPW0zAVRiP+yVXJhY+M6JHLFcCtfDvUAoahCseoXW0Wz0Oy1310O5WUQLgmX2ZddEzkffhoc2CJMUQ3h4kzt+v7S4ke/CRKWYaBtBYURmF2tcMda7bC0absWEk5TG4ISyS3Suury1BqAB+XIMIDCv7eAEsUTvHtDQoak8bhPSexSlcXadYBlqHu8p0BMIZRVIti9QeD/Hc/S1hVawgKDuufQDriqVZeYcAjeVyL4BGBc1lcaSKY8dolaYmTXgf0ykKFStcCIKpM33Q8vuR1EcXeEuMkhoDnyWCKB81wGUQV+aEhFaJ/mSlgPwYvyHZ8QN9SlS38RbY3hnYQ/NHyH8KVq0+DdGdCgMS+sRe1ImX8xYvAUw8wGb7Q9c88/2l1sAIEPBlPM0ur85GgEPk9IdgAh4mJTuAETAw3RERP8Ab2Uzgrad13wAAAAASUVORK5CYII=');\n background-size: 22px;\n}");var Q=function(t){function e(e){void 0===e&&(e={});var o=t.call(this)||this;return o.options={position:"topright",title:"Toggle Lasso"},n.Util.setOptions(o,e),o}return i(e,t),e.prototype.setOptions=function(t){this.options=s(s({},this.options),t),this.lasso&&this.lasso.setOptions(this.options)},e.prototype.onAdd=function(t){this.lasso=new H(t,this.options);var e=n.DomUtil.create("div","leaflet-bar leaflet-control"),o=n.DomUtil.create("a","leaflet-control-lasso",e);return o.href="javascript:void(0)",o.title=this.options.title,o.setAttribute("role","button"),o.setAttribute("aria-label",o.title),n.DomEvent.addListener(o,"click",this.toggle,this),n.DomEvent.disableClickPropagation(o),e},e.prototype.enabled=function(){return!!this.lasso&&this.lasso.enabled()},e.prototype.enable=function(){this.lasso&&this.lasso.enable()},e.prototype.disable=function(){this.lasso&&this.lasso.disable()},e.prototype.toggle=function(){this.lasso&&this.lasso.toggle()},e}(n.Control);void 0!==window.L&&(window.L.Lasso=H,window.L.lasso=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return new(H.bind.apply(H,a([void 0],t,!1)))},window.L.Control.Lasso=Q,window.L.control.lasso=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return new(Q.bind.apply(Q,a([void 0],t,!1)))}),t.ACTIVE_CLASS=G,t.DISABLED_EVENT=N,t.ENABLED_EVENT=R,t.FINISHED_EVENT=F,t.LassoControl=Q,t.LassoHandler=H,Object.defineProperty(t,"__esModule",{value:!0})})); | ||
*/var A=function(t,e){if(t.length!==e.length)return!1;for(var o=t.slice().sort(M),n=e.slice().sort(M),r=0;r<o.length;r++){if(o[r].length!==n[r].length)return!1;for(var i=0;i<o.length;i++)if(o[r][i]!==n[r][i])return!1}return!0},b=function(t,e){if(t&&t.length){if(1===t.length)return v(t[0],e);if(v(t[0],e)){for(var o=1;o<t.length;o++)if(v(t[o],e))return!1;return!0}return!1}return!1},E=function t(e,o){var n,r,i;if("Feature"===o.type&&(o=o.geometry),"Point"===o.type&&"Point"===e.type)return m(e.coordinates,o.coordinates);if("MultiLineString"===o.type&&"Point"===e.type)for(r=0;r<e.coordinates.length;r++){if(t(e,{type:"LineString",coordinates:o.coordinates[r]}))return!0}if(("LineString"===o.type||"MultiPoint"===o.type)&&"Point"===e.type)for(r=0;r<o.coordinates.length;r++){if(e.coordinates.length!==o.coordinates[r].length)return!1;if(m(e.coordinates,o.coordinates[r]))return!0}if("Polygon"===o.type){if("Polygon"===e.type){if(o.coordinates.length===e.coordinates.length)for(r=0;r<e.coordinates.length;r++)if(A(e.coordinates[r],o.coordinates[r]))return!0;return!(!e.coordinates.length||!b(o.coordinates,e.coordinates[0][0]))&&!y(L(e.coordinates),L(o.coordinates))}if("Point"===e.type)return b(o.coordinates,e.coordinates);if("LineString"===e.type||"MultiPoint"===e.type){if(!e.coordinates||0===e.coordinates.length)return!1;for(r=0;r<e.coordinates.length;r++)if(!1===b(o.coordinates,e.coordinates[r]))return!1;return!0}if("MultiLineString"===e.type){for(r=0;r<e.coordinates.length;r++){if(!1===t({type:"LineString",coordinates:e.coordinates[r]},o))return i++,!1}return!0}if("MultiPolygon"===e.type){for(r=0;r<e.coordinates.length;r++){if(!1===t({type:"Polygon",coordinates:e.coordinates[r]},o))return!1}return!0}}if("MultiPolygon"===o.type){if("Point"===e.type){if(o.coordinates.length)for(r=0;r<o.coordinates.length;r++)if(n=o.coordinates[r],b(n,e.coordinates)&&!1===y([e.coordinates],o.coordinates))return!0;return!1}if("Polygon"===e.type){for(r=0;r<e.coordinates.length;r++)if(o.coordinates[r].length===e.coordinates.length)for(var s=0;s<e.coordinates.length;s++)if(A(e.coordinates[s],o.coordinates[r][s]))return!0;if(!1===y(e.coordinates,o.coordinates)&&o.coordinates.length){for(r=0;r<o.coordinates.length;r++)n=o.coordinates[r],i=!1!==b(n,e.coordinates[0][0]);return i}}else if("LineString"===e.type||"MultiPoint"===e.type)for(r=0;r<o.coordinates.length;r++){return!!t(e,{type:"Polygon",coordinates:o.coordinates[r]})}else{if("MultiLineString"===e.type){for(r=0;r<e.coordinates.length;r++){if(!1===t({type:"LineString",coordinates:e.coordinates[r]},o))return!1}return!0}if("MultiPolygon"===e.type){for(r=0;r<o.coordinates.length;r++){if(!1===t(e,{type:"Polygon",coordinates:o.coordinates[r]}))return!1}return!0}}}return!1},P=function(t,e){return E(e,t)},S=function t(e,o){return"Feature"===o.type&&(o=o.geometry),!(!E(e,o)&&!E(o,e))||(!("MultiPolygon"!==e.type||!function(t,e){return t.coordinates.some((function(t){var o={type:"Polygon",coordinates:t};return E(o,e)||E(e,o)}))}(e,o))||("Point"!==e.type&&"MultiPoint"!==e.type&&"Point"!==o.type&&"MultiPoint"!==o.type?y(e.coordinates,o.coordinates):"Feature"===e.type?t(e.geometry,o):(function(){var t=Array.prototype.slice.apply(arguments);"undefined"!=typeof console&&console.warn&&console.warn.apply(console,t)}("Type "+e.type+" to "+o.type+" intersection is not supported by intersects"),!1)))};var w=6378137,D=6356752.3142,C=1/298.257223563,B=function(t,e,o){var n=o||64,r=e||250;if(!t||t.length<2||!r||!n)throw new Error("Terraformer: missing parameter for Terraformer.Circle");return{type:"Feature",geometry:O(t,r,n),properties:{radius:r,center:t,steps:n}}},O=function(t,e,o){for(var n,r=o||64,i={type:"Polygon",coordinates:[[]]},s=0;s<r;s++)n=360*s/r,i.coordinates[0].push(T(t,n,e));return i.coordinates=L(i.coordinates),i},T=function(t,e,o){for(var n,r,i,s=w,a=D,l=C,u=t[0],c=t[1],p=o,f=Math.PI,d=e*f/180,h=Math.sin(d),g=Math.cos(d),y=(1-l)*Math.tan(c*f/180),v=1/Math.sqrt(1+y*y),m=y*v,M=Math.atan2(y,g),L=v*h,A=1-L*L,b=A*(s*s-a*a)/(a*a),E=1+b/16384*(4096+b*(b*(320-175*b)-768)),P=b/1024*(256+b*(b*(74-47*b)-128)),S=p/(a*E),B=2*Math.PI;Math.abs(S-B)>1e-12;)n=Math.cos(2*M+S),B=S,S=p/(a*E)+P*(r=Math.sin(S))*(n+P/4*((i=Math.cos(S))*(2*n*n-1)-P/6*n*(4*r*r-3)*(4*n*n-3)));var O=m*r-v*i*g,T=Math.atan2(m*i+v*r*g,(1-l)*Math.sqrt(L*L+O*O)),I=l/16*A*(4+l*(4-3*A));return[u+180*(Math.atan2(r*h,v*i-m*r*g)-(1-I)*l*L*(S+I*r*(n+I*i*(2*n*n-1))))/f,180*T/f]};function I(t,e){return B(n.GeoJSON.latLngToCoords(t),e).geometry}function U(t,e){if(void 0===e&&(e={}),t instanceof n.Circle)return I(o=t.getLatLng(),r=t.getRadius());if(t instanceof n.CircleMarker){if(null!=e.zoom&&null!=e.crs){var o=t.getLatLng(),r=function(t,e,o){var r=t.getLatLng(),i=e.latLngToPoint(r,o),s=t.getRadius()/Math.SQRT2,a=n.point([i.x-s,i.y-s]),l=e.pointToLatLng(a,o);return e.distance(r,l)}(t,e.crs,e.zoom);return I(o,r)}return console.warn("Zoom and CRS is required for calculating CircleMarker polygon, falling back to center point only"),t.toGeoJSON().geometry}return t instanceof n.Marker||t instanceof n.Polyline?t.toGeoJSON().geometry:void console.warn("Layer GeoJSON geometry is not available",t)}function k(t,e,o){void 0===o&&(o={});var r=t.toGeoJSON().geometry,i=t.getBounds(),s=e.filter((function(t){var e,s,a;if(t instanceof n.Polyline?s=t.getBounds():(e=U(t,o))&&(a=d(e),s=n.latLngBounds([a[1],a[0]],[a[3],a[2]])),!s||!s.isValid())return!1;if(!(o.intersect?i.intersects(s):i.contains(s)))return!1;if(e||(e=U(t,o)),!e)return!1;var l=o.intersect?function(t,e){return"Point"===e.type?P(t,e):S(t,e)}(r,e):function(t,e){return P(t,e)}(r,e);return l}));return s}function R(t,e){void 0===e&&(e={});var o=e.insertAt;if(t&&"undefined"!=typeof document){var n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css","top"===o&&n.firstChild?n.insertBefore(r,n.firstChild):n.appendChild(r),r.styleSheet?r.styleSheet.cssText=t:r.appendChild(document.createTextNode(t))}}R(".leaflet-lasso-active {\n cursor: crosshair;\n -webkit-user-select: none;\n -moz-user-select: none;\n user-select: none;\n}\n\n.leaflet-lasso-active .leaflet-interactive {\n cursor: crosshair;\n pointer-events: none;\n}");var N="lasso.enabled",F="lasso.disabled",G="lasso.finished",H="leaflet-lasso-active",Q=function(t){function e(e,o){void 0===o&&(o={});var r=t.call(this,e)||this;return r.options={polygon:{color:"#00C3FF",weight:2},intersect:!1},r.onMapMouseDownBound=r.onMapMouseDown.bind(r),r.onDocumentMouseMoveBound=r.onDocumentMouseMove.bind(r),r.onDocumentMouseUpBound=r.onDocumentMouseUp.bind(r),r.map=e,n.Util.setOptions(r,o),r}return i(e,t),e.prototype.setOptions=function(t){this.options=s(s({},this.options),t)},e.prototype.toggle=function(){this.enabled()?this.disable():this.enable()},e.prototype.addHooks=function(){this.map.getPane("mapPane"),this.map.getContainer().addEventListener("mousedown",this.onMapMouseDownBound),this.map.getContainer().addEventListener("touchstart",this.onMapMouseDownBound),this.map.getContainer().classList.add(H),this.map.dragging.disable(),this.map.fire(N)},e.prototype.removeHooks=function(){this.polygon&&(this.map.removeLayer(this.polygon),this.polygon=void 0),this.map.getContainer().removeEventListener("mousedown",this.onMapMouseDownBound),this.map.getContainer().removeEventListener("touchstart",this.onMapMouseDownBound),document.removeEventListener("mousemove",this.onDocumentMouseMoveBound),document.removeEventListener("touchmove",this.onDocumentMouseMoveBound),document.removeEventListener("mouseup",this.onDocumentMouseUpBound),document.removeEventListener("touchend",this.onDocumentMouseUpBound),this.map.getContainer().classList.remove(H),document.body.classList.remove(H),this.map.dragging.enable(),this.map.fire(F)},e.prototype.onMapMouseDown=function(t){t.stopPropagation();var e=this.eventToMouseEvent("down",t);if(e)if(t instanceof MouseEvent&&!t._simulated&&1!==t.buttons)this.disable();else if(!t.target.closest(".leaflet-control-container")){var o=this.map.mouseEventToLatLng(e);this.polygon=new l([o],this.options.polygon).addTo(this.map),document.body.classList.add(H),document.addEventListener("mousemove",this.onDocumentMouseMoveBound),document.addEventListener("touchmove",this.onDocumentMouseMoveBound),document.addEventListener("mouseup",this.onDocumentMouseUpBound),document.addEventListener("touchend",this.onDocumentMouseUpBound),t.preventDefault()}},e.prototype.onDocumentMouseMove=function(t){t.stopPropagation();var e=this.eventToMouseEvent("move",t);if(e&&this.polygon)if(t instanceof MouseEvent&&!t._simulated&&1!==t.buttons)this.finish(t);else{var o=this.map.mouseEventToLatLng(e);this.polygon.addLatLng(o),t.preventDefault()}},e.prototype.onDocumentMouseUp=function(t){this.finish(t),t.stopPropagation(),t.preventDefault()},e.prototype.eventToMouseEvent=function(t,e){return e instanceof MouseEvent?e:e instanceof TouchEvent&&1===e.touches.length?new MouseEvent(t,{screenX:e.touches[0].screenX,screenY:e.touches[0].screenY,clientX:e.touches[0].clientX,clientY:e.touches[0].clientY,buttons:1}):void 0},e.prototype.finish=function(t){var e=this;if(this.polygon){var o=[];this.map.eachLayer((function(t){t!==e.polygon&&t!==e.polygon.polyline&&t!==e.polygon.polygon&&(n.MarkerCluster&&t instanceof n.MarkerCluster?o.push.apply(o,t.getAllChildMarkers()):(t instanceof n.Marker||t instanceof n.Path)&&o.push(t))}));var r=k(this.polygon.polygon,o,{zoom:this.map.getZoom(),crs:this.map.options.crs,intersect:this.options.intersect});this.map.fire(G,{originalEvent:t,latLngs:this.polygon.getLatLngs(),layers:r}),this.disable()}},e}(n.Handler);R(".leaflet-control-lasso {\n background: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAACXBIWXMAAAsSAAALEgHS3X78AAAD6UlEQVR4nO1b7XHbMAwFfP0fdYKqE8QbRJ0gGUEjaAR3A4/gbuBOUHWCKhs4E1SegD06jzmYpWhJpiRKNu58Tix+AA8gCQIQK6Xolml109LfAbgDcAfg5gH4NPQEzJwSkf4kRLR2NKmJqNLfSqlqaH7+4y/0McjML0SUQdinHkO8ApCSiPZKqToogxYFAQBC50T03NDkN74raFzSGtahreSLo+9PALG7mlEXaQD6fMD0BgIp8TkQ0ZaINChpl7ExZoZxK2vcGr8nfXl2ztm5g1twI/Q6KHPvVlFg/DMgJgEAWpWCay3lIYX2zJ1bQFQhAO+i9b2l8VEEd/BSWEooBgUAm5REPvg67AGCrZDdIABgQ6qF1oOu8QBAbK4FwTd4bq23SbXeks/OIPg0f7V5TQRCpz3BNdhamH30wgu+CwFC66VqD5IIByRas/eAYDbGqi8AW+FszEp4ocC6y1KQneW6z+YmvJDDLIVDVwBKdNzPVXghi/FbLjprp4AIM2fi6loMcusal8zN8eXirOp885jNrn/BAlKxnL17GWPj+As8viqlDguwAG3V+hR7JKJvSqmyqd1KmMnrUoQHGaEzX6OVaLAfg6sRyUSeUt+UKxGobDSTmZKR5yIAj/h79IhsDPSRFxg6+ho9AAukpI1IgydGxiY4dSRON+/SXgwAyE1sHbkF79JmeEuaPs91H4DWf+Ffk1nSgDwQ0RH5iUbZqgXcAI0MG/FbKn7f+i5DZo14PabISR/lb0qpjWETXq252LmSsidaCYfh8s0pbnKZuFHuEzNvmNl5MiR9YmmRLYHaxb8VJ3SG+UzD3ZyvwyI/UEPozMoZFE2xTjOADId1yuhGBMLO0raSUSE74HsGgDoPiZULsIISPkFqtUlEuOx0YsiHadeIakTC57bGPW0zAVRiP+yVXJhY+M6JHLFcCtfDvUAoahCseoXW0Wz0Oy1310O5WUQLgmX2ZddEzkffhoc2CJMUQ3h4kzt+v7S4ke/CRKWYaBtBYURmF2tcMda7bC0absWEk5TG4ISyS3Suury1BqAB+XIMIDCv7eAEsUTvHtDQoak8bhPSexSlcXadYBlqHu8p0BMIZRVIti9QeD/Hc/S1hVawgKDuufQDriqVZeYcAjeVyL4BGBc1lcaSKY8dolaYmTXgf0ykKFStcCIKpM33Q8vuR1EcXeEuMkhoDnyWCKB81wGUQV+aEhFaJ/mSlgPwYvyHZ8QN9SlS38RbY3hnYQ/NHyH8KVq0+DdGdCgMS+sRe1ImX8xYvAUw8wGb7Q9c88/2l1sAIEPBlPM0ur85GgEPk9IdgAh4mJTuAETAw3RERP8Ab2Uzgrad13wAAAAASUVORK5CYII=');\n background-size: 22px;\n}");var X=function(t){function e(e){void 0===e&&(e={});var o=t.call(this)||this;return o.options={position:"topright",title:"Toggle Lasso"},n.Util.setOptions(o,e),o}return i(e,t),e.prototype.setOptions=function(t){this.options=s(s({},this.options),t),this.lasso&&this.lasso.setOptions(this.options)},e.prototype.onAdd=function(t){this.lasso=new Q(t,this.options);var e=n.DomUtil.create("div","leaflet-bar leaflet-control"),o=n.DomUtil.create("a","leaflet-control-lasso",e);return o.href="javascript:void(0)",o.title=this.options.title,o.setAttribute("role","button"),o.setAttribute("aria-label",o.title),n.DomEvent.addListener(o,"click",this.toggle,this),n.DomEvent.disableClickPropagation(o),e},e.prototype.enabled=function(){return!!this.lasso&&this.lasso.enabled()},e.prototype.enable=function(){this.lasso&&this.lasso.enable()},e.prototype.disable=function(){this.lasso&&this.lasso.disable()},e.prototype.toggle=function(){this.lasso&&this.lasso.toggle()},e}(n.Control);void 0!==window.L&&(window.L.Lasso=Q,window.L.lasso=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return new(Q.bind.apply(Q,a([void 0],t,!1)))},window.L.Control.Lasso=X,window.L.control.lasso=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return new(X.bind.apply(X,a([void 0],t,!1)))}),t.ACTIVE_CLASS=H,t.DISABLED_EVENT=F,t.ENABLED_EVENT=N,t.FINISHED_EVENT=G,t.LassoControl=X,t.LassoHandler=Q})); | ||
//# sourceMappingURL=leaflet-lasso.umd.min.js.map |
@@ -1,2 +0,2 @@ | ||
module.exports = { | ||
export default { | ||
preset: 'ts-jest', | ||
@@ -3,0 +3,0 @@ testEnvironment: 'jsdom', |
{ | ||
"name": "leaflet-lasso", | ||
"version": "2.2.12", | ||
"version": "2.2.13", | ||
"description": "Lasso selection plugin for Leaflet", | ||
@@ -12,2 +12,3 @@ "keywords": [ | ||
"repository": "github:zakjan/leaflet-lasso", | ||
"type": "module", | ||
"main": "dist/leaflet-lasso.cjs.js", | ||
@@ -24,28 +25,28 @@ "module": "dist/leaflet-lasso.esm.js", | ||
"devDependencies": { | ||
"@rollup/plugin-commonjs": "^22.0.1", | ||
"@rollup/plugin-node-resolve": "^13.3.0", | ||
"@types/geojson": "^7946.0.10", | ||
"@types/jest": "^28.1.6", | ||
"@types/leaflet": "^1.7.11", | ||
"@types/leaflet.markercluster": "^1.5.1", | ||
"@types/terraformer__spatial": "^2.0.1", | ||
"autoprefixer": "^10.4.8", | ||
"@rollup/plugin-commonjs": "^25.0.4", | ||
"@rollup/plugin-node-resolve": "^15.2.1", | ||
"@rollup/plugin-terser": "^0.4.3", | ||
"@types/geojson": "^7946.0.11", | ||
"@types/jest": "^29.5.5", | ||
"@types/leaflet": "^1.9.6", | ||
"@types/leaflet.markercluster": "^1.5.3", | ||
"@types/terraformer__spatial": "^2.0.2", | ||
"autoprefixer": "^10.4.16", | ||
"identity-obj-proxy": "^3.0.0", | ||
"jest": "^28.1.3", | ||
"jest-environment-jsdom": "^28.1.3", | ||
"jest": "^29.7.0", | ||
"jest-environment-jsdom": "^29.7.0", | ||
"jest-simple-summary": "^1.0.2", | ||
"leaflet": "^1.8.0", | ||
"leaflet": "^1.9.4", | ||
"leaflet.markercluster": "^1.5.3", | ||
"postcss": "^8.4.14", | ||
"postcss": "^8.4.31", | ||
"postcss-assets": "^6.0.0", | ||
"rimraf": "^3.0.2", | ||
"rollup": "^2.77.2", | ||
"rollup-plugin-dts": "^4.2.2", | ||
"rimraf": "^5.0.5", | ||
"rollup": "^3.29.4", | ||
"rollup-plugin-dts": "^6.0.2", | ||
"rollup-plugin-postcss": "^4.0.2", | ||
"rollup-plugin-terser": "^7.0.2", | ||
"rollup-plugin-typescript2": "^0.32.1", | ||
"rollup-plugin-visualizer": "^5.7.1", | ||
"ts-jest": "^28.0.7", | ||
"tslib": "^2.4.0", | ||
"typescript": "^4.7.4" | ||
"rollup-plugin-typescript2": "^0.36.0", | ||
"rollup-plugin-visualizer": "^5.9.2", | ||
"ts-jest": "^29.1.1", | ||
"tslib": "^2.6.2", | ||
"typescript": "^5.2.2" | ||
}, | ||
@@ -52,0 +53,0 @@ "peerDependencies": { |
@@ -41,3 +41,3 @@ # leaflet-lasso | ||
``` | ||
<script src="https://unpkg.com/leaflet-lasso@2.2.12/dist/leaflet-lasso.umd.min.js"></script> | ||
<script src="https://unpkg.com/leaflet-lasso@2.2.13/dist/leaflet-lasso.umd.min.js"></script> | ||
``` | ||
@@ -44,0 +44,0 @@ |
@@ -1,2 +0,2 @@ | ||
import pkg from './package.json'; | ||
import pkg from './package.json' assert { type: 'json' }; | ||
import commonjs from '@rollup/plugin-commonjs'; | ||
@@ -6,37 +6,40 @@ import resolve from '@rollup/plugin-node-resolve'; | ||
import postcss from 'rollup-plugin-postcss'; | ||
import visualizer from 'rollup-plugin-visualizer'; | ||
import { terser } from 'rollup-plugin-terser'; | ||
import { visualizer } from 'rollup-plugin-visualizer'; | ||
import terser from '@rollup/plugin-terser'; | ||
import autoprefixer from 'autoprefixer'; | ||
import assets from 'postcss-assets'; | ||
import dts from 'rollup-plugin-dts'; | ||
import tsc from 'typescript'; | ||
const bundle = (format, filename, options = {}) => ({ | ||
input: 'src/index.ts', | ||
output: { | ||
file: filename, | ||
format: format, | ||
name: 'LeafletLasso', | ||
sourcemap: true, | ||
globals: { | ||
leaflet: 'L', | ||
function bundle(format, filename, options = {}) { | ||
return { | ||
input: 'src/index.ts', | ||
output: { | ||
file: filename, | ||
format: format, | ||
name: 'LeafletLasso', | ||
sourcemap: true, | ||
globals: { | ||
leaflet: 'L', | ||
}, | ||
}, | ||
}, | ||
external: [ | ||
...Object.keys(pkg.peerDependencies), | ||
...(!options.resolve ? Object.keys(pkg.dependencies) : []), | ||
], | ||
plugins: [ | ||
...(options.resolve ? [resolve()] : []), | ||
commonjs(), | ||
typescript({ | ||
typescript: require('typescript'), | ||
clean: options.stats, | ||
}), | ||
postcss({ plugins: [autoprefixer(), assets()] }), | ||
...(options.minimize ? [terser()] : []), | ||
...(options.stats ? [visualizer({ | ||
filename: filename + '.stats.html', | ||
})] : []), | ||
], | ||
}); | ||
external: [ | ||
...Object.keys(pkg.peerDependencies), | ||
...(!options.resolve ? Object.keys(pkg.dependencies) : []), | ||
], | ||
plugins: [ | ||
...(options.resolve ? [resolve()] : []), | ||
commonjs(), | ||
typescript({ | ||
typescript: tsc, | ||
clean: options.stats, | ||
}), | ||
postcss({ plugins: [autoprefixer(), assets()] }), | ||
...(options.minimize ? [terser()] : []), | ||
...(options.stats ? [visualizer({ | ||
filename: filename + '.stats.html', | ||
})] : []), | ||
], | ||
}; | ||
} | ||
@@ -43,0 +46,0 @@ export default [ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
3068
Yes
959593