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AiB,GACR,GAAO,SAAS,mBAAqB,EAAE,SAAS,cAIrD,EAAe,WAEnB,KAAK,GAAG,MAAO,KAAK,eACxB,EAEQ,EAAS,EAAE,SAAS,QAAU,EAAE,SAAS,OAAS,EAAE,SAAS,MAE/D,EAAE,WACJ,EAAE,SAAS,QAAQ,GACnB,EAAE,SAAS,QAAQ,GACnB,EAAE,SAAS,YAAY,IAErB,EAAE,UACJ,EAAE,QAAQ,QAAQ,GAClB,EAAE,QAAQ,QAAQ,IAEhB,EAAE,SACJ,EAAE,OAAO,QAAQ,GACjB,EAAE,OAAO,QAAQ,GACjB,EAAE,OAAO,YAAY,IAEnB,EAAE,eACJ,EAAE,aAAa,QAAQ,GACvB,EAAE,aAAa,QAAQ,GACvB,EAAE,aAAa,YAAY,IAEzB,EAAE,YACJ,EAAE,UAAU,QAAQ,GACpB,EAAE,UAAU,QAAQ,IAElB,EAAE,SACJ,EAAE,OAAO,QAAQ,GACjB,EAAE,OAAO,QAAQ,IAGnB,EAAE,OAAO,UAAU,OAAS,SAAU,GACpC,EAAS,EAAE,OAAO,GAClB,KAAK,IAAM,EAAO,IAClB,KAAK,IAAM,EAAO,GACtB,IACG,Q","file":"/npm/leaflet-editable@1.3.0/src/Leaflet.Editable.js/+esm","sourceRoot":"","sourcesContent":["/**\n * Bundled by jsDelivr using Rollup v2.79.2 and Terser v5.39.0.\n * Original file: /npm/leaflet-editable@1.3.0/src/Leaflet.Editable.js\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n",";((factory, window) => {\n  /*globals define, module, require*/\n\n  // define an AMD module that relies on 'leaflet'\n  if (typeof define === 'function' && define.amd) {\n    define(['leaflet'], factory)\n\n    // define a Common JS module that relies on 'leaflet'\n  } else if (typeof exports === 'object') {\n    module.exports = factory(require('leaflet'))\n  }\n\n  // attach your plugin to the global 'L' variable\n  if (typeof window !== 'undefined' && window.L) {\n    factory(window.L)\n  }\n})((L) => {\n  // 🍂miniclass CancelableEvent (Event objects)\n  // 🍂method cancel()\n  // Cancel any subsequent action.\n\n  // 🍂miniclass VertexEvent (Event objects)\n  // 🍂property vertex: VertexMarker\n  // The vertex that fires the event.\n\n  // 🍂miniclass ShapeEvent (Event objects)\n  // 🍂property shape: Array\n  // The shape (LatLngs array) subject of the action.\n\n  // 🍂miniclass CancelableVertexEvent (Event objects)\n  // 🍂inherits VertexEvent\n  // 🍂inherits CancelableEvent\n\n  // 🍂miniclass CancelableShapeEvent (Event objects)\n  // 🍂inherits ShapeEvent\n  // 🍂inherits CancelableEvent\n\n  // 🍂miniclass LayerEvent (Event objects)\n  // 🍂property layer: object\n  // The Layer (Marker, Polyline…) subject of the action.\n\n  // 🍂namespace Editable; 🍂class Editable; 🍂aka L.Editable\n  // Main edition handler. By default, it is attached to the map\n  // as `map.editTools` property.\n  // Leaflet.Editable is made to be fully extendable. You have three ways to customize\n  // the behaviour: using options, listening to events, or extending.\n  L.Editable = L.Evented.extend({\n    statics: {\n      FORWARD: 1,\n      BACKWARD: -1,\n    },\n\n    options: {\n      // You can pass them when creating a map using the `editOptions` key.\n      // 🍂option zIndex: int = 1000\n      // The default zIndex of the editing tools.\n      zIndex: 1000,\n\n      // 🍂option polygonClass: class = L.Polygon\n      // Class to be used when creating a new Polygon.\n      polygonClass: L.Polygon,\n\n      // 🍂option polylineClass: class = L.Polyline\n      // Class to be used when creating a new Polyline.\n      polylineClass: L.Polyline,\n\n      // 🍂option markerClass: class = L.Marker\n      // Class to be used when creating a new Marker.\n      markerClass: L.Marker,\n\n      // 🍂option circleMarkerClass: class = L.CircleMarker\n      // Class to be used when creating a new CircleMarker.\n      circleMarkerClass: L.CircleMarker,\n\n      // 🍂option rectangleClass: class = L.Rectangle\n      // Class to be used when creating a new Rectangle.\n      rectangleClass: L.Rectangle,\n\n      // 🍂option circleClass: class = L.Circle\n      // Class to be used when creating a new Circle.\n      circleClass: L.Circle,\n\n      // 🍂option drawingCSSClass: string = 'leaflet-editable-drawing'\n      // CSS class to be added to the map container while drawing.\n      drawingCSSClass: 'leaflet-editable-drawing',\n\n      // 🍂option drawingCursor: const = 'crosshair'\n      // Cursor mode set to the map while drawing.\n      drawingCursor: 'crosshair',\n\n      // 🍂option editLayer: Layer = new L.LayerGroup()\n      // Layer used to store edit tools (vertex, line guide…).\n      editLayer: undefined,\n\n      // 🍂option featuresLayer: Layer = new L.LayerGroup()\n      // Default layer used to store drawn features (Marker, Polyline…).\n      featuresLayer: undefined,\n\n      // 🍂option polylineEditorClass: class = PolylineEditor\n      // Class to be used as Polyline editor.\n      polylineEditorClass: undefined,\n\n      // 🍂option polygonEditorClass: class = PolygonEditor\n      // Class to be used as Polygon editor.\n      polygonEditorClass: undefined,\n\n      // 🍂option markerEditorClass: class = MarkerEditor\n      // Class to be used as Marker editor.\n      markerEditorClass: undefined,\n\n      // 🍂option circleMarkerEditorClass: class = CircleMarkerEditor\n      // Class to be used as CircleMarker editor.\n      circleMarkerEditorClass: undefined,\n\n      // 🍂option rectangleEditorClass: class = RectangleEditor\n      // Class to be used as Rectangle editor.\n      rectangleEditorClass: undefined,\n\n      // 🍂option circleEditorClass: class = CircleEditor\n      // Class to be used as Circle editor.\n      circleEditorClass: undefined,\n\n      // 🍂option lineGuideOptions: hash = {}\n      // Options to be passed to the line guides.\n      lineGuideOptions: {},\n\n      // 🍂option skipMiddleMarkers: boolean = false\n      // Set this to true if you don't want middle markers.\n      skipMiddleMarkers: false,\n    },\n\n    initialize: function (map, options) {\n      L.setOptions(this, options)\n      this._lastZIndex = this.options.zIndex\n      this.map = map\n      this.editLayer = this.createEditLayer()\n      this.featuresLayer = this.createFeaturesLayer()\n      this.forwardLineGuide = this.createLineGuide()\n      this.backwardLineGuide = this.createLineGuide()\n    },\n\n    fireAndForward: function (type, e) {\n      e = e || {}\n      e.editTools = this\n      this.fire(type, e)\n      this.map.fire(type, e)\n    },\n\n    createLineGuide: function () {\n      const options = L.extend(\n        { dashArray: '5,10', weight: 1, interactive: false },\n        this.options.lineGuideOptions\n      )\n      return L.polyline([], options)\n    },\n\n    createVertexIcon: (options) =>\n      L.Browser.mobile && L.Browser.touch\n        ? new L.Editable.TouchVertexIcon(options)\n        : new L.Editable.VertexIcon(options),\n\n    createEditLayer: function () {\n      return this.options.editLayer || new L.LayerGroup().addTo(this.map)\n    },\n\n    createFeaturesLayer: function () {\n      return this.options.featuresLayer || new L.LayerGroup().addTo(this.map)\n    },\n\n    moveForwardLineGuide: function (latlng) {\n      if (this.forwardLineGuide._latlngs.length) {\n        this.forwardLineGuide._latlngs[1] = latlng\n        this.forwardLineGuide._bounds.extend(latlng)\n        this.forwardLineGuide.redraw()\n      }\n    },\n\n    moveBackwardLineGuide: function (latlng) {\n      if (this.backwardLineGuide._latlngs.length) {\n        this.backwardLineGuide._latlngs[1] = latlng\n        this.backwardLineGuide._bounds.extend(latlng)\n        this.backwardLineGuide.redraw()\n      }\n    },\n\n    anchorForwardLineGuide: function (latlng) {\n      this.forwardLineGuide._latlngs[0] = latlng\n      this.forwardLineGuide._bounds.extend(latlng)\n      this.forwardLineGuide.redraw()\n    },\n\n    anchorBackwardLineGuide: function (latlng) {\n      this.backwardLineGuide._latlngs[0] = latlng\n      this.backwardLineGuide._bounds.extend(latlng)\n      this.backwardLineGuide.redraw()\n    },\n\n    attachForwardLineGuide: function () {\n      this.editLayer.addLayer(this.forwardLineGuide)\n    },\n\n    attachBackwardLineGuide: function () {\n      this.editLayer.addLayer(this.backwardLineGuide)\n    },\n\n    detachForwardLineGuide: function () {\n      this.forwardLineGuide.setLatLngs([])\n      this.editLayer.removeLayer(this.forwardLineGuide)\n    },\n\n    detachBackwardLineGuide: function () {\n      this.backwardLineGuide.setLatLngs([])\n      this.editLayer.removeLayer(this.backwardLineGuide)\n    },\n\n    blockEvents: function () {\n      // Hack: force map not to listen to other layers events while drawing.\n      if (!this._oldTargets) {\n        this._oldTargets = this.map._targets\n        this.map._targets = {}\n      }\n    },\n\n    unblockEvents: function () {\n      if (this._oldTargets) {\n        // Reset, but keep targets created while drawing.\n        this.map._targets = L.extend(this.map._targets, this._oldTargets)\n        delete this._oldTargets\n      }\n    },\n\n    registerForDrawing: function (editor) {\n      if (this._drawingEditor) this.unregisterForDrawing(this._drawingEditor)\n      this.blockEvents()\n      editor.reset() // Make sure editor tools still receive events.\n      this._drawingEditor = editor\n      this.map.on('mousemove touchmove', editor.onDrawingMouseMove, editor)\n      this.map.on('mousedown', this.onMousedown, this)\n      this.map.on('mouseup', this.onMouseup, this)\n      L.DomUtil.addClass(this.map._container, this.options.drawingCSSClass)\n      this.defaultMapCursor = this.map._container.style.cursor\n      this.map._container.style.cursor = this.options.drawingCursor\n    },\n\n    unregisterForDrawing: function (editor) {\n      this.unblockEvents()\n      L.DomUtil.removeClass(this.map._container, this.options.drawingCSSClass)\n      this.map._container.style.cursor = this.defaultMapCursor\n      editor = editor || this._drawingEditor\n      if (!editor) return\n      this.map.off('mousemove touchmove', editor.onDrawingMouseMove, editor)\n      this.map.off('mousedown', this.onMousedown, this)\n      this.map.off('mouseup', this.onMouseup, this)\n      if (editor !== this._drawingEditor) return\n      delete this._drawingEditor\n      if (editor._drawing) editor.cancelDrawing()\n    },\n\n    onMousedown: function (e) {\n      if (e.originalEvent.which != 1) return\n      this._mouseDown = e\n      this._drawingEditor.onDrawingMouseDown(e)\n    },\n\n    onMouseup: function (e) {\n      if (this._mouseDown) {\n        const editor = this._drawingEditor\n        const mouseDown = this._mouseDown\n        this._mouseDown = null\n        editor.onDrawingMouseUp(e)\n        if (this._drawingEditor !== editor) return // onDrawingMouseUp may call unregisterFromDrawing.\n        const origin = L.point(\n          mouseDown.originalEvent.clientX,\n          mouseDown.originalEvent.clientY\n        )\n        const distance = L.point(\n          e.originalEvent.clientX,\n          e.originalEvent.clientY\n        ).distanceTo(origin)\n        if (Math.abs(distance) < 9 * (window.devicePixelRatio || 1))\n          this._drawingEditor.onDrawingClick(e)\n      }\n    },\n\n    // 🍂section Public methods\n    // You will generally access them by the `map.editTools`\n    // instance:\n    //\n    // `map.editTools.startPolyline();`\n\n    // 🍂method drawing(): boolean\n    // Return true if any drawing action is ongoing.\n    drawing: function () {\n      return this._drawingEditor?.drawing()\n    },\n\n    // 🍂method stopDrawing()\n    // When you need to stop any ongoing drawing, without needing to know which editor is active.\n    stopDrawing: function () {\n      this.unregisterForDrawing()\n    },\n\n    // 🍂method commitDrawing()\n    // When you need to commit any ongoing drawing, without needing to know which editor is active.\n    commitDrawing: function (e) {\n      if (!this._drawingEditor) return\n      this._drawingEditor.commitDrawing(e)\n    },\n\n    connectCreatedToMap: function (layer) {\n      return this.featuresLayer.addLayer(layer)\n    },\n\n    // 🍂method startPolyline(latlng: L.LatLng, options: hash): L.Polyline\n    // Start drawing a Polyline. If `latlng` is given, a first point will be added. In any case, continuing on user click.\n    // If `options` is given, it will be passed to the Polyline class constructor.\n    startPolyline: function (latlng, options) {\n      const line = this.createPolyline([], options)\n      line.enableEdit(this.map).newShape(latlng)\n      return line\n    },\n\n    // 🍂method startPolygon(latlng: L.LatLng, options: hash): L.Polygon\n    // Start drawing a Polygon. If `latlng` is given, a first point will be added. In any case, continuing on user click.\n    // If `options` is given, it will be passed to the Polygon class constructor.\n    startPolygon: function (latlng, options) {\n      const polygon = this.createPolygon([], options)\n      polygon.enableEdit(this.map).newShape(latlng)\n      return polygon\n    },\n\n    // 🍂method startMarker(latlng: L.LatLng, options: hash): L.Marker\n    // Start adding a Marker. If `latlng` is given, the Marker will be shown first at this point.\n    // In any case, it will follow the user mouse, and will have a final `latlng` on next click (or touch).\n    // If `options` is given, it will be passed to the Marker class constructor.\n    startMarker: function (latlng, options) {\n      latlng = latlng || this.map.getCenter().clone()\n      const marker = this.createMarker(latlng, options)\n      marker.enableEdit(this.map).startDrawing()\n      return marker\n    },\n\n    // 🍂method startCircleMarker(latlng: L.LatLng, options: hash): L.CircleMarker\n    // Start adding a CircleMarker. If `latlng` is given, the CircleMarker will be shown first at this point.\n    // In any case, it will follow the user mouse, and will have a final `latlng` on next click (or touch).\n    // If `options` is given, it will be passed to the CircleMarker class constructor.\n    startCircleMarker: function (latlng, options) {\n      latlng = latlng || this.map.getCenter().clone()\n      const marker = this.createCircleMarker(latlng, options)\n      marker.enableEdit(this.map).startDrawing()\n      return marker\n    },\n\n    // 🍂method startRectangle(latlng: L.LatLng, options: hash): L.Rectangle\n    // Start drawing a Rectangle. If `latlng` is given, the Rectangle anchor will be added. In any case, continuing on user drag.\n    // If `options` is given, it will be passed to the Rectangle class constructor.\n    startRectangle: function (latlng, options) {\n      const corner = latlng || L.latLng([0, 0])\n      const bounds = new L.LatLngBounds(corner, corner)\n      const rectangle = this.createRectangle(bounds, options)\n      rectangle.enableEdit(this.map).startDrawing()\n      return rectangle\n    },\n\n    // 🍂method startCircle(latlng: L.LatLng, options: hash): L.Circle\n    // Start drawing a Circle. If `latlng` is given, the Circle anchor will be added. In any case, continuing on user drag.\n    // If `options` is given, it will be passed to the Circle class constructor.\n    startCircle: function (latlng, options) {\n      latlng = latlng || this.map.getCenter().clone()\n      const circle = this.createCircle(latlng, options)\n      circle.enableEdit(this.map).startDrawing()\n      return circle\n    },\n\n    startHole: (editor, latlng) => {\n      editor.newHole(latlng)\n    },\n\n    createLayer: function (klass, latlngs, options) {\n      options = L.Util.extend({ editOptions: { editTools: this } }, options)\n      const layer = new klass(latlngs, options)\n      // 🍂namespace Editable\n      // 🍂event editable:created: LayerEvent\n      // Fired when a new feature (Marker, Polyline…) is created.\n      this.fireAndForward('editable:created', { layer: layer })\n      return layer\n    },\n\n    createPolyline: function (latlngs, options) {\n      return this.createLayer(\n        options?.polylineClass || this.options.polylineClass,\n        latlngs,\n        options\n      )\n    },\n\n    createPolygon: function (latlngs, options) {\n      return this.createLayer(\n        options?.polygonClass || this.options.polygonClass,\n        latlngs,\n        options\n      )\n    },\n\n    createMarker: function (latlng, options) {\n      return this.createLayer(\n        options?.markerClass || this.options.markerClass,\n        latlng,\n        options\n      )\n    },\n\n    createCircleMarker: function (latlng, options) {\n      return this.createLayer(\n        options?.circleMarkerClass || this.options.circleMarkerClass,\n        latlng,\n        options\n      )\n    },\n\n    createRectangle: function (bounds, options) {\n      return this.createLayer(\n        options?.rectangleClass || this.options.rectangleClass,\n        bounds,\n        options\n      )\n    },\n\n    createCircle: function (latlng, options) {\n      return this.createLayer(\n        options?.circleClass || this.options.circleClass,\n        latlng,\n        options\n      )\n    },\n  })\n\n  L.extend(L.Editable, {\n    makeCancellable: (e) => {\n      e.cancel = () => {\n        e._cancelled = true\n      }\n    },\n  })\n\n  // 🍂namespace Map; 🍂class Map\n  // Leaflet.Editable add options and events to the `L.Map` object.\n  // See `Editable` events for the list of events fired on the Map.\n  // 🍂example\n  //\n  // ```js\n  // var map = L.map('map', {\n  //  editable: true,\n  //  editOptions: {\n  //    …\n  // }\n  // });\n  // ```\n  // 🍂section Editable Map Options\n  L.Map.mergeOptions({\n    // 🍂namespace Map\n    // 🍂section Map Options\n    // 🍂option editToolsClass: class = L.Editable\n    // Class to be used as vertex, for path editing.\n    editToolsClass: L.Editable,\n\n    // 🍂option editable: boolean = false\n    // Whether to create a L.Editable instance at map init.\n    editable: false,\n\n    // 🍂option editOptions: hash = {}\n    // Options to pass to L.Editable when instantiating.\n    editOptions: {},\n  })\n\n  L.Map.addInitHook(function () {\n    this.whenReady(function () {\n      if (this.options.editable) {\n        this.editTools = new this.options.editToolsClass(this, this.options.editOptions)\n      }\n    })\n  })\n\n  L.Editable.VertexIcon = L.DivIcon.extend({\n    options: {\n      iconSize: new L.Point(8, 8),\n    },\n  })\n\n  L.Editable.TouchVertexIcon = L.Editable.VertexIcon.extend({\n    options: {\n      iconSize: new L.Point(20, 20),\n    },\n  })\n\n  // 🍂namespace Editable; 🍂class VertexMarker; Handler for dragging path vertices.\n  L.Editable.VertexMarker = L.Marker.extend({\n    options: {\n      draggable: true,\n      className: 'leaflet-div-icon leaflet-vertex-icon',\n    },\n\n    // 🍂section Public methods\n    // The marker used to handle path vertex. You will usually interact with a `VertexMarker`\n    // instance when listening for events like `editable:vertex:ctrlclick`.\n\n    initialize: function (latlng, latlngs, editor, options) {\n      // We don't use this._latlng, because on drag Leaflet replace it while\n      // we want to keep reference.\n      this.latlng = latlng\n      this.latlngs = latlngs\n      this.editor = editor\n      L.Marker.prototype.initialize.call(this, latlng, options)\n      this.options.icon = this.editor.tools.createVertexIcon({\n        className: this.options.className,\n      })\n      this.latlng.__vertex = this\n      this.connect()\n      this.setZIndexOffset(editor.tools._lastZIndex + 1)\n    },\n\n    connect: function () {\n      this.editor.editLayer.addLayer(this)\n    },\n\n    onAdd: function (map) {\n      L.Marker.prototype.onAdd.call(this, map)\n      this.on('drag', this.onDrag)\n      this.on('dragstart', this.onDragStart)\n      this.on('dragend', this.onDragEnd)\n      this.on('mouseup', this.onMouseup)\n      this.on('click', this.onClick)\n      this.on('contextmenu', this.onContextMenu)\n      this.on('mousedown touchstart', this.onMouseDown)\n      this.on('mouseover', this.onMouseOver)\n      this.on('mouseout', this.onMouseOut)\n      this.addMiddleMarkers()\n    },\n\n    onRemove: function (map) {\n      if (this.middleMarker) this.middleMarker.delete()\n      delete this.latlng.__vertex\n      this.off('drag', this.onDrag)\n      this.off('dragstart', this.onDragStart)\n      this.off('dragend', this.onDragEnd)\n      this.off('mouseup', this.onMouseup)\n      this.off('click', this.onClick)\n      this.off('contextmenu', this.onContextMenu)\n      this.off('mousedown touchstart', this.onMouseDown)\n      this.off('mouseover', this.onMouseOver)\n      this.off('mouseout', this.onMouseOut)\n      L.Marker.prototype.onRemove.call(this, map)\n    },\n\n    onDrag: function (e) {\n      e.vertex = this\n      this.editor.onVertexMarkerDrag(e)\n      const iconPos = L.DomUtil.getPosition(this._icon)\n      const latlng = this._map.layerPointToLatLng(iconPos)\n      this.latlng.update(latlng)\n      this._latlng = this.latlng // Push back to Leaflet our reference.\n      this.editor.refresh()\n      if (this.middleMarker) this.middleMarker.updateLatLng()\n      const next = this.getNext()\n      if (next?.middleMarker) next.middleMarker.updateLatLng()\n    },\n\n    onDragStart: function (e) {\n      e.vertex = this\n      this.editor.onVertexMarkerDragStart(e)\n    },\n\n    onDragEnd: function (e) {\n      e.vertex = this\n      this.editor.onVertexMarkerDragEnd(e)\n    },\n\n    onClick: function (e) {\n      e.vertex = this\n      this.editor.onVertexMarkerClick(e)\n    },\n\n    onMouseup: function (e) {\n      L.DomEvent.stop(e)\n      e.vertex = this\n      this.editor.map.fire('mouseup', e)\n    },\n\n    onContextMenu: function (e) {\n      e.vertex = this\n      this.editor.onVertexMarkerContextMenu(e)\n    },\n\n    onMouseDown: function (e) {\n      e.vertex = this\n      this.editor.onVertexMarkerMouseDown(e)\n    },\n\n    onMouseOver: function (e) {\n      e.vertex = this\n      this.editor.onVertexMarkerMouseOver(e)\n    },\n\n    onMouseOut: function (e) {\n      e.vertex = this\n      this.editor.onVertexMarkerMouseOut(e)\n    },\n\n    // 🍂method delete()\n    // Delete a vertex and the related LatLng.\n    delete: function () {\n      const next = this.getNext() // Compute before changing latlng\n      this.latlngs.splice(this.getIndex(), 1)\n      this.editor.editLayer.removeLayer(this)\n      this.editor.onVertexDeleted({ latlng: this.latlng, vertex: this })\n      if (!this.latlngs.length) this.editor.deleteShape(this.latlngs)\n      if (next) next.resetMiddleMarker()\n      this.editor.refresh()\n    },\n\n    // 🍂method getIndex(): int\n    // Get the index of the current vertex among others of the same LatLngs group.\n    getIndex: function () {\n      return this.latlngs.indexOf(this.latlng)\n    },\n\n    // 🍂method getLastIndex(): int\n    // Get last vertex index of the LatLngs group of the current vertex.\n    getLastIndex: function () {\n      return this.latlngs.length - 1\n    },\n\n    // 🍂method getPrevious(): VertexMarker\n    // Get the previous VertexMarker in the same LatLngs group.\n    getPrevious: function () {\n      if (this.latlngs.length < 2) return\n      const index = this.getIndex()\n      let previousIndex = index - 1\n      if (index === 0 && this.editor.CLOSED) previousIndex = this.getLastIndex()\n      const previous = this.latlngs[previousIndex]\n      if (previous) return previous.__vertex\n    },\n\n    // 🍂method getNext(): VertexMarker\n    // Get the next VertexMarker in the same LatLngs group.\n    getNext: function () {\n      if (this.latlngs.length < 2) return\n      const index = this.getIndex()\n      let nextIndex = index + 1\n      if (index === this.getLastIndex() && this.editor.CLOSED) nextIndex = 0\n      const next = this.latlngs[nextIndex]\n      if (next) return next.__vertex\n    },\n\n    addMiddleMarker: function (previous) {\n      if (!this.editor.hasMiddleMarkers()) return\n      previous = previous || this.getPrevious()\n      if (previous && !this.middleMarker)\n        this.middleMarker = this.editor.addMiddleMarker(\n          previous,\n          this,\n          this.latlngs,\n          this.editor\n        )\n    },\n\n    addMiddleMarkers: function () {\n      if (!this.editor.hasMiddleMarkers()) return\n      const previous = this.getPrevious()\n      if (previous) this.addMiddleMarker(previous)\n      const next = this.getNext()\n      if (next) next.resetMiddleMarker()\n    },\n\n    resetMiddleMarker: function () {\n      if (this.middleMarker) this.middleMarker.delete()\n      this.addMiddleMarker()\n    },\n\n    // 🍂method split()\n    // Split the vertex LatLngs group at its index, if possible.\n    split: function () {\n      if (!this.editor.splitShape) return // Only for PolylineEditor\n      this.editor.splitShape(this.latlngs, this.getIndex())\n    },\n\n    // 🍂method continue()\n    // Continue the vertex LatLngs from this vertex. Only active for first and last vertices of a Polyline.\n    continue: function () {\n      if (!this.editor.continueBackward) return // Only for PolylineEditor\n      const index = this.getIndex()\n      if (index === 0) this.editor.continueBackward(this.latlngs)\n      else if (index === this.getLastIndex()) this.editor.continueForward(this.latlngs)\n    },\n  })\n\n  L.Editable.mergeOptions({\n    // 🍂namespace Editable\n    // 🍂option vertexMarkerClass: class = VertexMarker\n    // Class to be used as vertex, for path editing.\n    vertexMarkerClass: L.Editable.VertexMarker,\n  })\n\n  L.Editable.MiddleMarker = L.Marker.extend({\n    options: {\n      opacity: 0.5,\n      className: 'leaflet-div-icon leaflet-middle-icon',\n      draggable: true,\n    },\n\n    initialize: function (left, right, latlngs, editor, options) {\n      this.left = left\n      this.right = right\n      this.editor = editor\n      this.latlngs = latlngs\n      L.Marker.prototype.initialize.call(this, this.computeLatLng(), options)\n      this._opacity = this.options.opacity\n      this.options.icon = this.editor.tools.createVertexIcon({\n        className: this.options.className,\n      })\n      this.editor.editLayer.addLayer(this)\n      this.setVisibility()\n    },\n\n    setVisibility: function () {\n      const leftPoint = this._map.latLngToContainerPoint(this.left.latlng)\n      const rightPoint = this._map.latLngToContainerPoint(this.right.latlng)\n      const size = L.point(this.options.icon.options.iconSize)\n      if (leftPoint.distanceTo(rightPoint) < size.x * 3) this.hide()\n      else this.show()\n    },\n\n    show: function () {\n      this.setOpacity(this._opacity)\n    },\n\n    hide: function () {\n      this.setOpacity(0)\n    },\n\n    updateLatLng: function () {\n      this.setLatLng(this.computeLatLng())\n      this.setVisibility()\n    },\n\n    computeLatLng: function () {\n      const leftPoint = this.editor.map.latLngToContainerPoint(this.left.latlng)\n      const rightPoint = this.editor.map.latLngToContainerPoint(this.right.latlng)\n      const y = (leftPoint.y + rightPoint.y) / 2\n      const x = (leftPoint.x + rightPoint.x) / 2\n      return this.editor.map.containerPointToLatLng([x, y])\n    },\n\n    onAdd: function (map) {\n      L.Marker.prototype.onAdd.call(this, map)\n      L.DomEvent.on(this._icon, 'mousedown touchstart', this.onMouseDown, this)\n      map.on('zoomend', this.setVisibility, this)\n    },\n\n    onRemove: function (map) {\n      delete this.right.middleMarker\n      L.DomEvent.off(this._icon, 'mousedown touchstart', this.onMouseDown, this)\n      map.off('zoomend', this.setVisibility, this)\n      L.Marker.prototype.onRemove.call(this, map)\n    },\n\n    onMouseDown: function (e) {\n      const iconPos = L.DomUtil.getPosition(this._icon)\n      const latlng = this.editor.map.layerPointToLatLng(iconPos)\n      e = {\n        originalEvent: e,\n        latlng: latlng,\n      }\n      if (this.options.opacity === 0) return\n      L.Editable.makeCancellable(e)\n      this.editor.onMiddleMarkerMouseDown(e)\n      if (e._cancelled) return\n      this.latlngs.splice(this.index(), 0, e.latlng)\n      this.editor.refresh()\n      const icon = this._icon\n      const marker = this.editor.addVertexMarker(e.latlng, this.latlngs)\n      this.editor.onNewVertex(marker)\n      /* Hack to workaround browser not firing touchend when element is no more on DOM */\n      const parent = marker._icon.parentNode\n      parent.removeChild(marker._icon)\n      marker._icon = icon\n      parent.appendChild(marker._icon)\n      marker._initIcon()\n      marker._initInteraction()\n      marker.setOpacity(1)\n      /* End hack */\n      // Transfer ongoing dragging to real marker\n      L.Draggable._dragging = false\n      marker.dragging._draggable._onDown(e.originalEvent)\n      this.delete()\n    },\n\n    delete: function () {\n      this.editor.editLayer.removeLayer(this)\n    },\n\n    index: function () {\n      return this.latlngs.indexOf(this.right.latlng)\n    },\n  })\n\n  L.Editable.mergeOptions({\n    // 🍂namespace Editable\n    // 🍂option middleMarkerClass: class = VertexMarker\n    // Class to be used as middle vertex, pulled by the user to create a new point in the middle of a path.\n    middleMarkerClass: L.Editable.MiddleMarker,\n  })\n\n  // 🍂namespace Editable; 🍂class BaseEditor; 🍂aka L.Editable.BaseEditor\n  // When editing a feature (Marker, Polyline…), an editor is attached to it. This\n  // editor basically knows how to handle the edition.\n  L.Editable.BaseEditor = L.Handler.extend({\n    initialize: function (map, feature, options) {\n      L.setOptions(this, options)\n      this.map = map\n      this.feature = feature\n      this.feature.editor = this\n      this.editLayer = new L.LayerGroup()\n      this.tools = this.options.editTools || map.editTools\n    },\n\n    // 🍂method enable(): this\n    // Set up the drawing tools for the feature to be editable.\n    addHooks: function () {\n      if (this.isConnected()) this.onFeatureAdd()\n      else this.feature.once('add', this.onFeatureAdd, this)\n      this.onEnable()\n      this.feature.on(this._getEvents(), this)\n    },\n\n    // 🍂method disable(): this\n    // Remove the drawing tools for the feature.\n    removeHooks: function () {\n      this.feature.off(this._getEvents(), this)\n      if (this.feature.dragging) this.feature.dragging.disable()\n      this.editLayer.clearLayers()\n      this.tools.editLayer.removeLayer(this.editLayer)\n      this.onDisable()\n      if (this._drawing) this.cancelDrawing()\n    },\n\n    // 🍂method drawing(): boolean\n    // Return true if any drawing action is ongoing with this editor.\n    drawing: function () {\n      return !!this._drawing\n    },\n\n    reset: () => {},\n\n    onFeatureAdd: function () {\n      this.tools.editLayer.addLayer(this.editLayer)\n      if (this.feature.dragging) this.feature.dragging.enable()\n    },\n\n    hasMiddleMarkers: function () {\n      return !this.options.skipMiddleMarkers && !this.tools.options.skipMiddleMarkers\n    },\n\n    fireAndForward: function (type, e) {\n      e = e || {}\n      e.layer = this.feature\n      this.feature.fire(type, e)\n      this.tools.fireAndForward(type, e)\n    },\n\n    onEnable: function () {\n      // 🍂namespace Editable\n      // 🍂event editable:enable: Event\n      // Fired when an existing feature is ready to be edited.\n      this.fireAndForward('editable:enable')\n    },\n\n    onDisable: function () {\n      // 🍂namespace Editable\n      // 🍂event editable:disable: Event\n      // Fired when an existing feature is not ready anymore to be edited.\n      this.fireAndForward('editable:disable')\n    },\n\n    onEditing: function () {\n      // 🍂namespace Editable\n      // 🍂event editable:editing: Event\n      // Fired as soon as any change is made to the feature geometry.\n      this.fireAndForward('editable:editing')\n    },\n\n    onEdited: function () {\n      // 🍂namespace Editable\n      // 🍂event editable:edited: Event\n      // Fired after any change is made to the feature geometry.\n      this.fireAndForward('editable:edited')\n    },\n\n    onStartDrawing: function () {\n      // 🍂namespace Editable\n      // 🍂section Drawing events\n      // 🍂event editable:drawing:start: Event\n      // Fired when a feature is to be drawn.\n      this.fireAndForward('editable:drawing:start')\n    },\n\n    onEndDrawing: function () {\n      // 🍂namespace Editable\n      // 🍂section Drawing events\n      // 🍂event editable:drawing:end: Event\n      // Fired when a feature is not drawn anymore.\n      this.fireAndForward('editable:drawing:end')\n    },\n\n    onCancelDrawing: function () {\n      // 🍂namespace Editable\n      // 🍂section Drawing events\n      // 🍂event editable:drawing:cancel: Event\n      // Fired when user cancel drawing while a feature is being drawn.\n      this.fireAndForward('editable:drawing:cancel')\n    },\n\n    onCommitDrawing: function (e) {\n      // 🍂namespace Editable\n      // 🍂section Drawing events\n      // 🍂event editable:drawing:commit: Event\n      // Fired when user finish drawing a feature.\n      this.fireAndForward('editable:drawing:commit', e)\n      this.onEdited()\n    },\n\n    onDrawingMouseDown: function (e) {\n      // 🍂namespace Editable\n      // 🍂section Drawing events\n      // 🍂event editable:drawing:mousedown: Event\n      // Fired when user `mousedown` while drawing.\n      this.fireAndForward('editable:drawing:mousedown', e)\n    },\n\n    onDrawingMouseUp: function (e) {\n      // 🍂namespace Editable\n      // 🍂section Drawing events\n      // 🍂event editable:drawing:mouseup: Event\n      // Fired when user `mouseup` while drawing.\n      this.fireAndForward('editable:drawing:mouseup', e)\n    },\n\n    startDrawing: function () {\n      if (!this._drawing) this._drawing = L.Editable.FORWARD\n      this.tools.registerForDrawing(this)\n      this.onStartDrawing()\n    },\n\n    commitDrawing: function (e) {\n      this.onCommitDrawing(e)\n      this.endDrawing()\n    },\n\n    cancelDrawing: function () {\n      // If called during a vertex drag, the vertex will be removed before\n      // the mouseup fires on it. This is a workaround. Maybe better fix is\n      // To have L.Draggable reset it's status on disable (Leaflet side).\n      L.Draggable._dragging = false\n      this.onCancelDrawing()\n      this.endDrawing()\n    },\n\n    endDrawing: function () {\n      this._drawing = false\n      this.tools.unregisterForDrawing(this)\n      this.onEndDrawing()\n    },\n\n    onDrawingClick: function (e) {\n      if (!this.drawing()) return\n      L.Editable.makeCancellable(e)\n      // 🍂namespace Editable\n      // 🍂section Drawing events\n      // 🍂event editable:drawing:click: CancelableEvent\n      // Fired when user `click` while drawing, before any internal action is being processed.\n      this.fireAndForward('editable:drawing:click', e)\n      if (e._cancelled) return\n      if (!this.isConnected()) this.connect(e)\n      this.processDrawingClick(e)\n    },\n\n    isConnected: function () {\n      return this.map.hasLayer(this.feature)\n    },\n\n    connect: function () {\n      this.tools.connectCreatedToMap(this.feature)\n      this.tools.editLayer.addLayer(this.editLayer)\n    },\n\n    onMove: function (e) {\n      // 🍂namespace Editable\n      // 🍂section Drawing events\n      // 🍂event editable:drawing:move: Event\n      // Fired when `move` mouse while drawing, while dragging a marker, and while dragging a vertex.\n      this.fireAndForward('editable:drawing:move', e)\n    },\n\n    onDrawingMouseMove: function (e) {\n      this.onMove(e)\n    },\n\n    _getEvents: function () {\n      return {\n        dragstart: this.onDragStart,\n        drag: this.onDrag,\n        dragend: this.onDragEnd,\n        remove: this.disable,\n      }\n    },\n\n    onDragStart: function (e) {\n      this.onEditing()\n      // 🍂namespace Editable\n      // 🍂event editable:dragstart: Event\n      // Fired before a path feature is dragged.\n      this.fireAndForward('editable:dragstart', e)\n    },\n\n    onDrag: function (e) {\n      this.onMove(e)\n      // 🍂namespace Editable\n      // 🍂event editable:drag: Event\n      // Fired when a path feature is being dragged.\n      this.fireAndForward('editable:drag', e)\n    },\n\n    onDragEnd: function (e) {\n      // 🍂namespace Editable\n      // 🍂event editable:dragend: Event\n      // Fired after a path feature has been dragged.\n      this.fireAndForward('editable:dragend', e)\n      this.onEdited()\n    },\n  })\n\n  // 🍂namespace Editable; 🍂class MarkerEditor; 🍂aka L.Editable.MarkerEditor\n  // 🍂inherits BaseEditor\n  // Editor for Marker.\n  L.Editable.MarkerEditor = L.Editable.BaseEditor.extend({\n    onDrawingMouseMove: function (e) {\n      L.Editable.BaseEditor.prototype.onDrawingMouseMove.call(this, e)\n      if (this._drawing) this.feature.setLatLng(e.latlng)\n    },\n\n    processDrawingClick: function (e) {\n      // 🍂namespace Editable\n      // 🍂section Drawing events\n      // 🍂event editable:drawing:clicked: Event\n      // Fired when user `click` while drawing, after all internal actions.\n      this.fireAndForward('editable:drawing:clicked', e)\n      this.commitDrawing(e)\n    },\n\n    connect: function (e) {\n      // On touch, the latlng has not been updated because there is\n      // no mousemove.\n      if (e) this.feature._latlng = e.latlng\n      L.Editable.BaseEditor.prototype.connect.call(this, e)\n    },\n  })\n\n  // 🍂namespace Editable; 🍂class CircleMarkerEditor; 🍂aka L.Editable.CircleMarkerEditor\n  // 🍂inherits BaseEditor\n  // Editor for CircleMarker.\n  L.Editable.CircleMarkerEditor = L.Editable.BaseEditor.extend({\n    onDrawingMouseMove: function (e) {\n      L.Editable.BaseEditor.prototype.onDrawingMouseMove.call(this, e)\n      if (this._drawing) this.feature.setLatLng(e.latlng)\n    },\n\n    processDrawingClick: function (e) {\n      // 🍂namespace Editable\n      // 🍂section Drawing events\n      // 🍂event editable:drawing:clicked: Event\n      // Fired when user `click` while drawing, after all internal actions.\n      this.fireAndForward('editable:drawing:clicked', e)\n      this.commitDrawing(e)\n    },\n\n    connect: function (e) {\n      // On touch, the latlng has not been updated because there is\n      // no mousemove.\n      if (e) this.feature._latlng = e.latlng\n      L.Editable.BaseEditor.prototype.connect.call(this, e)\n    },\n  })\n\n  // 🍂namespace Editable; 🍂class PathEditor; 🍂aka L.Editable.PathEditor\n  // 🍂inherits BaseEditor\n  // Base class for all path editors.\n  L.Editable.PathEditor = L.Editable.BaseEditor.extend({\n    CLOSED: false,\n    MIN_VERTEX: 2,\n\n    addHooks: function () {\n      L.Editable.BaseEditor.prototype.addHooks.call(this)\n      if (this.feature) {\n        this.initVertexMarkers()\n        this.map.on('moveend', this.onMoveEnd, this)\n      }\n      return this\n    },\n\n    removeHooks: function () {\n      L.Editable.BaseEditor.prototype.removeHooks.call(this)\n      if (this.feature) {\n        this.map.off('moveend', this.onMoveEnd, this)\n      }\n    },\n\n    onMoveEnd: function () {\n      this.initVertexMarkers()\n    },\n\n    initVertexMarkers: function (latlngs) {\n      if (!this.enabled()) return\n      latlngs = latlngs || this.getLatLngs()\n      if (isFlat(latlngs)) {\n        this.addVertexMarkers(latlngs)\n      } else {\n        for (const member of latlngs) {\n          this.initVertexMarkers(member)\n        }\n      }\n    },\n\n    getLatLngs: function () {\n      return this.feature.getLatLngs()\n    },\n\n    // 🍂method reset()\n    // Rebuild edit elements (Vertex, MiddleMarker, etc.).\n    reset: function () {\n      this.editLayer.clearLayers()\n      this.initVertexMarkers()\n    },\n\n    addVertexMarker: function (latlng, latlngs) {\n      if (latlng.__vertex) {\n        latlng.__vertex.connect()\n        return latlng.__vertex\n      }\n      return new this.tools.options.vertexMarkerClass(latlng, latlngs, this)\n    },\n\n    onNewVertex: function (vertex) {\n      // 🍂namespace Editable\n      // 🍂section Vertex events\n      // 🍂event editable:vertex:new: VertexEvent\n      // Fired when a new vertex is created.\n      this.fireAndForward('editable:vertex:new', {\n        latlng: vertex.latlng,\n        vertex: vertex,\n      })\n    },\n\n    addVertexMarkers: function (latlngs) {\n      const bounds = this.map.getBounds()\n      for (const latlng of latlngs) {\n        if (!bounds.contains(latlng)) continue\n        this.addVertexMarker(latlng, latlngs)\n      }\n    },\n\n    refreshVertexMarkers: function (latlngs) {\n      latlngs = latlngs || this.getDefaultLatLngs()\n      for (const latlng of latlngs) {\n        latlng.__vertex.update()\n      }\n    },\n\n    addMiddleMarker: function (left, right, latlngs) {\n      return new this.tools.options.middleMarkerClass(left, right, latlngs, this)\n    },\n\n    onVertexMarkerClick: function (e) {\n      L.Editable.makeCancellable(e)\n      // 🍂namespace Editable\n      // 🍂section Vertex events\n      // 🍂event editable:vertex:click: CancelableVertexEvent\n      // Fired when a `click` is issued on a vertex, before any internal action is being processed.\n      this.fireAndForward('editable:vertex:click', e)\n      if (e._cancelled) return\n      if (this.tools.drawing() && this.tools._drawingEditor !== this) return\n      const index = e.vertex.getIndex()\n      let commit\n      if (e.originalEvent.ctrlKey) {\n        this.onVertexMarkerCtrlClick(e)\n      } else if (e.originalEvent.altKey) {\n        this.onVertexMarkerAltClick(e)\n      } else if (e.originalEvent.shiftKey) {\n        this.onVertexMarkerShiftClick(e)\n      } else if (e.originalEvent.metaKey) {\n        this.onVertexMarkerMetaKeyClick(e)\n      } else if (\n        index === e.vertex.getLastIndex() &&\n        this._drawing === L.Editable.FORWARD\n      ) {\n        if (index >= this.MIN_VERTEX - 1) commit = true\n      } else if (\n        index === 0 &&\n        this._drawing === L.Editable.BACKWARD &&\n        this._drawnLatLngs.length >= this.MIN_VERTEX\n      ) {\n        commit = true\n      } else if (\n        index === 0 &&\n        this._drawing === L.Editable.FORWARD &&\n        this._drawnLatLngs.length >= this.MIN_VERTEX &&\n        this.CLOSED\n      ) {\n        commit = true // Allow to close on first point also for polygons\n      } else {\n        this.onVertexRawMarkerClick(e)\n      }\n      // 🍂namespace Editable\n      // 🍂section Vertex events\n      // 🍂event editable:vertex:clicked: VertexEvent\n      // Fired when a `click` is issued on a vertex, after all internal actions.\n      this.fireAndForward('editable:vertex:clicked', e)\n      if (commit) this.commitDrawing(e)\n    },\n\n    onVertexRawMarkerClick: function (e) {\n      // 🍂namespace Editable\n      // 🍂section Vertex events\n      // 🍂event editable:vertex:rawclick: CancelableVertexEvent\n      // Fired when a `click` is issued on a vertex without any special key and without being in drawing mode.\n      this.fireAndForward('editable:vertex:rawclick', e)\n      if (e._cancelled) return\n      if (!this.vertexCanBeDeleted(e.vertex)) return\n      e.vertex.delete()\n    },\n\n    vertexCanBeDeleted: function (vertex) {\n      return vertex.latlngs.length > this.MIN_VERTEX\n    },\n\n    onVertexDeleted: function (e) {\n      // 🍂namespace Editable\n      // 🍂section Vertex events\n      // 🍂event editable:vertex:deleted: VertexEvent\n      // Fired after a vertex has been deleted by user.\n      this.fireAndForward('editable:vertex:deleted', e)\n    },\n\n    onVertexMarkerCtrlClick: function (e) {\n      // 🍂namespace Editable\n      // 🍂section Vertex events\n      // 🍂event editable:vertex:ctrlclick: VertexEvent\n      // Fired when a `click` with `ctrlKey` is issued on a vertex.\n      this.fireAndForward('editable:vertex:ctrlclick', e)\n    },\n\n    onVertexMarkerShiftClick: function (e) {\n      // 🍂namespace Editable\n      // 🍂section Vertex events\n      // 🍂event editable:vertex:shiftclick: VertexEvent\n      // Fired when a `click` with `shiftKey` is issued on a vertex.\n      this.fireAndForward('editable:vertex:shiftclick', e)\n    },\n\n    onVertexMarkerMetaKeyClick: function (e) {\n      // 🍂namespace Editable\n      // 🍂section Vertex events\n      // 🍂event editable:vertex:metakeyclick: VertexEvent\n      // Fired when a `click` with `metaKey` is issued on a vertex.\n      this.fireAndForward('editable:vertex:metakeyclick', e)\n    },\n\n    onVertexMarkerAltClick: function (e) {\n      // 🍂namespace Editable\n      // 🍂section Vertex events\n      // 🍂event editable:vertex:altclick: VertexEvent\n      // Fired when a `click` with `altKey` is issued on a vertex.\n      this.fireAndForward('editable:vertex:altclick', e)\n    },\n\n    onVertexMarkerContextMenu: function (e) {\n      // 🍂namespace Editable\n      // 🍂section Vertex events\n      // 🍂event editable:vertex:contextmenu: VertexEvent\n      // Fired when a `contextmenu` is issued on a vertex.\n      this.fireAndForward('editable:vertex:contextmenu', e)\n    },\n\n    onVertexMarkerMouseDown: function (e) {\n      // 🍂namespace Editable\n      // 🍂section Vertex events\n      // 🍂event editable:vertex:mousedown: VertexEvent\n      // Fired when user `mousedown` a vertex.\n      this.fireAndForward('editable:vertex:mousedown', e)\n    },\n\n    onVertexMarkerMouseOver: function (e) {\n      // 🍂namespace Editable\n      // 🍂section Vertex events\n      // 🍂event editable:vertex:mouseover: VertexEvent\n      // Fired when a user's mouse enters the vertex\n      this.fireAndForward('editable:vertex:mouseover', e)\n    },\n\n    onVertexMarkerMouseOut: function (e) {\n      // 🍂namespace Editable\n      // 🍂section Vertex events\n      // 🍂event editable:vertex:mouseout: VertexEvent\n      // Fired when a user's mouse leaves the vertex\n      this.fireAndForward('editable:vertex:mouseout', e)\n    },\n\n    onMiddleMarkerMouseDown: function (e) {\n      // 🍂namespace Editable\n      // 🍂section MiddleMarker events\n      // 🍂event editable:middlemarker:mousedown: VertexEvent\n      // Fired when user `mousedown` a middle marker.\n      this.fireAndForward('editable:middlemarker:mousedown', e)\n    },\n\n    onVertexMarkerDrag: function (e) {\n      this.onMove(e)\n      if (this.feature._bounds) this.extendBounds(e)\n      // 🍂namespace Editable\n      // 🍂section Vertex events\n      // 🍂event editable:vertex:drag: VertexEvent\n      // Fired when a vertex is dragged by user.\n      this.fireAndForward('editable:vertex:drag', e)\n    },\n\n    onVertexMarkerDragStart: function (e) {\n      // 🍂namespace Editable\n      // 🍂section Vertex events\n      // 🍂event editable:vertex:dragstart: VertexEvent\n      // Fired before a vertex is dragged by user.\n      this.fireAndForward('editable:vertex:dragstart', e)\n    },\n\n    onVertexMarkerDragEnd: function (e) {\n      // 🍂namespace Editable\n      // 🍂section Vertex events\n      // 🍂event editable:vertex:dragend: VertexEvent\n      // Fired after a vertex is dragged by user.\n      this.fireAndForward('editable:vertex:dragend', e)\n      this.onEdited()\n    },\n\n    setDrawnLatLngs: function (latlngs) {\n      this._drawnLatLngs = latlngs || this.getDefaultLatLngs()\n    },\n\n    startDrawing: function () {\n      if (!this._drawnLatLngs) this.setDrawnLatLngs()\n      L.Editable.BaseEditor.prototype.startDrawing.call(this)\n    },\n\n    startDrawingForward: function () {\n      this.startDrawing()\n    },\n\n    endDrawing: function () {\n      this.tools.detachForwardLineGuide()\n      this.tools.detachBackwardLineGuide()\n      if (this._drawnLatLngs && this._drawnLatLngs.length < this.MIN_VERTEX)\n        this.deleteShape(this._drawnLatLngs)\n      L.Editable.BaseEditor.prototype.endDrawing.call(this)\n      delete this._drawnLatLngs\n    },\n\n    addLatLng: function (latlng) {\n      if (this._drawing === L.Editable.FORWARD) this._drawnLatLngs.push(latlng)\n      else this._drawnLatLngs.unshift(latlng)\n      this.feature._bounds.extend(latlng)\n      const vertex = this.addVertexMarker(latlng, this._drawnLatLngs)\n      this.onNewVertex(vertex)\n      this.refresh()\n    },\n\n    newPointForward: function (latlng) {\n      this.addLatLng(latlng)\n      this.tools.attachForwardLineGuide()\n      this.tools.anchorForwardLineGuide(latlng)\n    },\n\n    newPointBackward: function (latlng) {\n      this.addLatLng(latlng)\n      this.tools.anchorBackwardLineGuide(latlng)\n    },\n\n    // 🍂namespace PathEditor\n    // 🍂method push()\n    // Programmatically add a point while drawing.\n    push: function (latlng) {\n      if (!latlng)\n        return console.error(\n          'L.Editable.PathEditor.push expect a valid latlng as parameter'\n        )\n      if (this._drawing === L.Editable.FORWARD) this.newPointForward(latlng)\n      else this.newPointBackward(latlng)\n    },\n\n    removeLatLng: function (latlng) {\n      latlng.__vertex.delete()\n      this.refresh()\n    },\n\n    // 🍂method pop(): L.LatLng or null\n    // Programmatically remove last point (if any) while drawing.\n    pop: function () {\n      if (this._drawnLatLngs.length <= 1) return\n      let latlng\n      if (this._drawing === L.Editable.FORWARD) {\n        latlng = this._drawnLatLngs[this._drawnLatLngs.length - 1]\n      } else {\n        latlng = this._drawnLatLngs[0]\n      }\n      this.removeLatLng(latlng)\n      if (this._drawing === L.Editable.FORWARD) {\n        this.tools.anchorForwardLineGuide(\n          this._drawnLatLngs[this._drawnLatLngs.length - 1]\n        )\n      } else {\n        this.tools.anchorForwardLineGuide(this._drawnLatLngs[0])\n      }\n      return latlng\n    },\n\n    processDrawingClick: function (e) {\n      if (e.vertex && e.vertex.editor === this) return\n      if (this._drawing === L.Editable.FORWARD) this.newPointForward(e.latlng)\n      else this.newPointBackward(e.latlng)\n      this.fireAndForward('editable:drawing:clicked', e)\n    },\n\n    onDrawingMouseMove: function (e) {\n      L.Editable.BaseEditor.prototype.onDrawingMouseMove.call(this, e)\n      if (this._drawing) {\n        this.tools.moveForwardLineGuide(e.latlng)\n        this.tools.moveBackwardLineGuide(e.latlng)\n      }\n    },\n\n    refresh: function () {\n      this.feature.redraw()\n      this.onEditing()\n    },\n\n    // 🍂namespace PathEditor\n    // 🍂method newShape(latlng?: L.LatLng)\n    // Add a new shape (Polyline, Polygon) in a multi, and setup up drawing tools to draw it;\n    // if optional `latlng` is given, start a path at this point.\n    newShape: function (latlng) {\n      const shape = this.addNewEmptyShape()\n      if (!shape) return\n      this.setDrawnLatLngs(shape[0] || shape) // Polygon or polyline\n      this.startDrawingForward()\n      // 🍂namespace Editable\n      // 🍂section Shape events\n      // 🍂event editable:shape:new: ShapeEvent\n      // Fired when a new shape is created in a multi (Polygon or Polyline).\n      this.fireAndForward('editable:shape:new', { shape: shape })\n      if (latlng) this.newPointForward(latlng)\n    },\n\n    deleteShape: function (shape, latlngs) {\n      const e = { shape: shape }\n      L.Editable.makeCancellable(e)\n      // 🍂namespace Editable\n      // 🍂section Shape events\n      // 🍂event editable:shape:delete: CancelableShapeEvent\n      // Fired before a new shape is deleted in a multi (Polygon or Polyline).\n      this.fireAndForward('editable:shape:delete', e)\n      if (e._cancelled) return\n      shape = this._deleteShape(shape, latlngs)\n      if (this.ensureNotFlat) this.ensureNotFlat() // Polygon.\n      this.feature.setLatLngs(this.getLatLngs()) // Force bounds reset.\n      this.refresh()\n      this.reset()\n      // 🍂namespace Editable\n      // 🍂section Shape events\n      // 🍂event editable:shape:deleted: ShapeEvent\n      // Fired after a new shape is deleted in a multi (Polygon or Polyline).\n      this.fireAndForward('editable:shape:deleted', { shape: shape })\n      this.onEdited()\n      return shape\n    },\n\n    _deleteShape: function (shape, latlngs) {\n      latlngs = latlngs || this.getLatLngs()\n      if (!latlngs.length) return\n      const inplaceDelete = (latlngs, shape) => {\n        // Called when deleting a flat latlngs\n        return latlngs.splice(0, Number.MAX_VALUE)\n      }\n      const spliceDelete = (latlngs, shape) => {\n        // Called when removing a latlngs inside an array\n        latlngs.splice(latlngs.indexOf(shape), 1)\n        if (!latlngs.length) this._deleteShape(latlngs)\n        return shape\n      }\n      if (latlngs === shape) return inplaceDelete(latlngs, shape)\n      for (const member of latlngs) {\n        if (member === shape) return spliceDelete(latlngs, shape)\n        if (member.indexOf(shape) !== -1) return spliceDelete(member, shape)\n      }\n    },\n\n    // 🍂namespace PathEditor\n    // 🍂method deleteShapeAt(latlng: L.LatLng): Array\n    // Remove a path shape at the given `latlng`.\n    deleteShapeAt: function (latlng) {\n      const shape = this.feature.shapeAt(latlng)\n      if (shape) return this.deleteShape(shape)\n    },\n\n    // 🍂method appendShape(shape: Array)\n    // Append a new shape to the Polygon or Polyline.\n    appendShape: function (shape) {\n      this.insertShape(shape)\n    },\n\n    // 🍂method prependShape(shape: Array)\n    // Prepend a new shape to the Polygon or Polyline.\n    prependShape: function (shape) {\n      this.insertShape(shape, 0)\n    },\n\n    // 🍂method insertShape(shape: Array, index: int)\n    // Insert a new shape to the Polygon or Polyline at given index (default is to append).\n    insertShape: function (shape, index) {\n      this.ensureMulti()\n      shape = this.formatShape(shape)\n      if (index === undefined) index = this.feature._latlngs.length\n      this.feature._latlngs.splice(index, 0, shape)\n      this.feature.redraw()\n      if (this._enabled) this.reset()\n    },\n\n    extendBounds: function (e) {\n      this.feature._bounds.extend(e.vertex.latlng)\n    },\n\n    onDragStart: function (e) {\n      this.editLayer.clearLayers()\n      L.Editable.BaseEditor.prototype.onDragStart.call(this, e)\n    },\n\n    onDragEnd: function (e) {\n      this.initVertexMarkers()\n      L.Editable.BaseEditor.prototype.onDragEnd.call(this, e)\n    },\n  })\n\n  // 🍂namespace Editable; 🍂class PolylineEditor; 🍂aka L.Editable.PolylineEditor\n  // 🍂inherits PathEditor\n  L.Editable.PolylineEditor = L.Editable.PathEditor.extend({\n    startDrawingBackward: function () {\n      this._drawing = L.Editable.BACKWARD\n      this.startDrawing()\n    },\n\n    // 🍂method continueBackward(latlngs?: Array)\n    // Set up drawing tools to continue the line backward.\n    continueBackward: function (latlngs) {\n      if (this.drawing()) return\n      latlngs = latlngs || this.getDefaultLatLngs()\n      this.setDrawnLatLngs(latlngs)\n      if (latlngs.length > 0) {\n        this.tools.attachBackwardLineGuide()\n        this.tools.anchorBackwardLineGuide(latlngs[0])\n      }\n      this.startDrawingBackward()\n    },\n\n    // 🍂method continueForward(latlngs?: Array)\n    // Set up drawing tools to continue the line forward.\n    continueForward: function (latlngs) {\n      if (this.drawing()) return\n      latlngs = latlngs || this.getDefaultLatLngs()\n      this.setDrawnLatLngs(latlngs)\n      if (latlngs.length > 0) {\n        this.tools.attachForwardLineGuide()\n        this.tools.anchorForwardLineGuide(latlngs[latlngs.length - 1])\n      }\n      this.startDrawingForward()\n    },\n\n    getDefaultLatLngs: function (latlngs) {\n      latlngs = latlngs || this.feature._latlngs\n      if (!latlngs.length || latlngs[0] instanceof L.LatLng) return latlngs\n      return this.getDefaultLatLngs(latlngs[0])\n    },\n\n    ensureMulti: function () {\n      if (this.feature._latlngs.length && isFlat(this.feature._latlngs)) {\n        this.feature._latlngs = [this.feature._latlngs]\n      }\n    },\n\n    addNewEmptyShape: function () {\n      if (this.feature._latlngs.length) {\n        const shape = []\n        this.appendShape(shape)\n        return shape\n      }\n      return this.feature._latlngs\n    },\n\n    formatShape: function (shape) {\n      if (isFlat(shape)) return shape\n      if (shape[0]) return this.formatShape(shape[0])\n    },\n\n    // 🍂method splitShape(latlngs?: Array, index: int)\n    // Split the given `latlngs` shape at index `index` and integrate new shape in instance `latlngs`.\n    splitShape: function (shape, index) {\n      if (!index || index >= shape.length - 1) return\n      this.ensureMulti()\n      const shapeIndex = this.feature._latlngs.indexOf(shape)\n      if (shapeIndex === -1) return\n      const first = shape.slice(0, index + 1)\n      const second = shape.slice(index)\n      // We deal with reference, we don't want twice the same latlng around.\n      second[0] = L.latLng(second[0].lat, second[0].lng, second[0].alt)\n      this.feature._latlngs.splice(shapeIndex, 1, first, second)\n      this.refresh()\n      this.reset()\n      this.onEdited()\n    },\n  })\n\n  // 🍂namespace Editable; 🍂class PolygonEditor; 🍂aka L.Editable.PolygonEditor\n  // 🍂inherits PathEditor\n  L.Editable.PolygonEditor = L.Editable.PathEditor.extend({\n    CLOSED: true,\n    MIN_VERTEX: 3,\n\n    newPointForward: function (latlng) {\n      L.Editable.PathEditor.prototype.newPointForward.call(this, latlng)\n      if (!this.tools.backwardLineGuide._latlngs.length)\n        this.tools.anchorBackwardLineGuide(latlng)\n      if (this._drawnLatLngs.length === 2) this.tools.attachBackwardLineGuide()\n    },\n\n    addNewEmptyHole: function (latlng) {\n      this.ensureNotFlat()\n      const latlngs = this.feature.shapeAt(latlng)\n      if (!latlngs) return\n      const holes = []\n      latlngs.push(holes)\n      return holes\n    },\n\n    // 🍂method newHole(latlng?: L.LatLng, index: int)\n    // Set up drawing tools for creating a new hole on the Polygon. If the `latlng` param is given, a first point is created.\n    newHole: function (latlng) {\n      const holes = this.addNewEmptyHole(latlng)\n      if (!holes) return\n      this.setDrawnLatLngs(holes)\n      this.startDrawingForward()\n      if (latlng) this.newPointForward(latlng)\n    },\n\n    addNewEmptyShape: function () {\n      if (this.feature._latlngs.length && this.feature._latlngs[0].length) {\n        const shape = []\n        this.appendShape(shape)\n        return shape\n      }\n      return this.feature._latlngs\n    },\n\n    ensureMulti: function () {\n      if (this.feature._latlngs.length && isFlat(this.feature._latlngs[0])) {\n        this.feature._latlngs = [this.feature._latlngs]\n      }\n    },\n\n    ensureNotFlat: function () {\n      if (!this.feature._latlngs.length || isFlat(this.feature._latlngs))\n        this.feature._latlngs = [this.feature._latlngs]\n    },\n\n    vertexCanBeDeleted: function (vertex) {\n      const parent = this.feature.parentShape(vertex.latlngs)\n      const idx = L.Util.indexOf(parent, vertex.latlngs)\n      if (idx > 0) return true // Holes can be totally deleted without removing the layer itself.\n      return L.Editable.PathEditor.prototype.vertexCanBeDeleted.call(this, vertex)\n    },\n\n    getDefaultLatLngs: function () {\n      if (!this.feature._latlngs.length) this.feature._latlngs.push([])\n      return this.feature._latlngs[0]\n    },\n\n    formatShape: (shape) => {\n      // [[1, 2], [3, 4]] => must be nested\n      // [] => must be nested\n      // [[]] => is already nested\n      if (isFlat(shape) && (!shape[0] || shape[0].length !== 0)) return [shape]\n      return shape\n    },\n  })\n\n  // 🍂namespace Editable; 🍂class RectangleEditor; 🍂aka L.Editable.RectangleEditor\n  // 🍂inherits PathEditor\n  L.Editable.RectangleEditor = L.Editable.PathEditor.extend({\n    CLOSED: true,\n    MIN_VERTEX: 4,\n\n    options: {\n      skipMiddleMarkers: true,\n    },\n\n    extendBounds: function (e) {\n      const index = e.vertex.getIndex()\n      const next = e.vertex.getNext()\n      const previous = e.vertex.getPrevious()\n      const oppositeIndex = (index + 2) % 4\n      const opposite = e.vertex.latlngs[oppositeIndex]\n      const bounds = new L.LatLngBounds(e.latlng, opposite)\n      // Update latlngs by hand to preserve order.\n      previous.latlng.update([e.latlng.lat, opposite.lng])\n      next.latlng.update([opposite.lat, e.latlng.lng])\n      this.updateBounds(bounds)\n      this.refreshVertexMarkers()\n    },\n\n    onDrawingMouseDown: function (e) {\n      L.Editable.PathEditor.prototype.onDrawingMouseDown.call(this, e)\n      this.connect()\n      const latlngs = this.getDefaultLatLngs()\n      // L.Polygon._convertLatLngs removes last latlng if it equals first point,\n      // which is the case here as all latlngs are [0, 0]\n      if (latlngs.length === 3) latlngs.push(e.latlng)\n      const bounds = new L.LatLngBounds(e.latlng, e.latlng)\n      this.updateBounds(bounds)\n      this.updateLatLngs(bounds)\n      this.refresh()\n      this.reset()\n      // Stop dragging map.\n      // L.Draggable has two workflows:\n      // - mousedown => mousemove => mouseup\n      // - touchstart => touchmove => touchend\n      // Problem: L.Map.Tap does not allow us to listen to touchstart, so we only\n      // can deal with mousedown, but then when in a touch device, we are dealing with\n      // simulated events (actually simulated by L.Map.Tap), which are no more taken\n      // into account by L.Draggable.\n      // Ref.: https://github.com/Leaflet/Leaflet.Editable/issues/103\n      e.originalEvent._simulated = false\n      this.map.dragging._draggable._onUp(e.originalEvent)\n      // Now transfer ongoing drag action to the bottom right corner.\n      // Should we refine which corner will handle the drag according to\n      // drag direction?\n      latlngs[3].__vertex.dragging._draggable._onDown(e.originalEvent)\n    },\n\n    onDrawingMouseUp: function (e) {\n      this.commitDrawing(e)\n      e.originalEvent._simulated = false\n      L.Editable.PathEditor.prototype.onDrawingMouseUp.call(this, e)\n    },\n\n    onDrawingMouseMove: function (e) {\n      e.originalEvent._simulated = false\n      L.Editable.PathEditor.prototype.onDrawingMouseMove.call(this, e)\n    },\n\n    getDefaultLatLngs: function (latlngs) {\n      return latlngs || this.feature._latlngs[0]\n    },\n\n    updateBounds: function (bounds) {\n      this.feature._bounds = bounds\n    },\n\n    updateLatLngs: function (bounds) {\n      const latlngs = this.getDefaultLatLngs()\n      const newLatlngs = this.feature._boundsToLatLngs(bounds)\n      // Keep references.\n      for (let i = 0; i < latlngs.length; i++) {\n        latlngs[i].update(newLatlngs[i])\n      }\n    },\n  })\n\n  // 🍂namespace Editable; 🍂class CircleEditor; 🍂aka L.Editable.CircleEditor\n  // 🍂inherits PathEditor\n  L.Editable.CircleEditor = L.Editable.PathEditor.extend({\n    MIN_VERTEX: 2,\n\n    options: {\n      skipMiddleMarkers: true,\n    },\n\n    initialize: function (map, feature, options) {\n      L.Editable.PathEditor.prototype.initialize.call(this, map, feature, options)\n      this._resizeLatLng = this.computeResizeLatLng()\n    },\n\n    computeResizeLatLng: function () {\n      // While circle is not added to the map, _radius is not set.\n      const delta =\n        (this.feature._radius || this.feature._mRadius) * Math.cos(Math.PI / 4)\n      const point = this.map.project(this.feature._latlng)\n      return this.map.unproject([point.x + delta, point.y - delta])\n    },\n\n    updateResizeLatLng: function () {\n      this._resizeLatLng.update(this.computeResizeLatLng())\n      this._resizeLatLng.__vertex.update()\n    },\n\n    getLatLngs: function () {\n      return [this.feature._latlng, this._resizeLatLng]\n    },\n\n    getDefaultLatLngs: function () {\n      return this.getLatLngs()\n    },\n\n    onVertexMarkerDrag: function (e) {\n      if (e.vertex.getIndex() === 1) this.resize(e)\n      else this.updateResizeLatLng(e)\n      L.Editable.PathEditor.prototype.onVertexMarkerDrag.call(this, e)\n    },\n\n    resize: function (e) {\n      let radius\n      if (this.map.options.crs) {\n        radius = this.map.options.crs.distance(this.feature._latlng, e.latlng)\n      } else {\n        radius = this.feature._latlng.distanceTo(e.latlng)\n      }\n      this.feature.setRadius(radius)\n    },\n\n    onDrawingMouseDown: function (e) {\n      L.Editable.PathEditor.prototype.onDrawingMouseDown.call(this, e)\n      this._resizeLatLng.update(e.latlng)\n      this.feature._latlng.update(e.latlng)\n      this.connect()\n      // Stop dragging map.\n      e.originalEvent._simulated = false\n      this.map.dragging._draggable._onUp(e.originalEvent)\n      // Now transfer ongoing drag action to the radius handler.\n      this._resizeLatLng.__vertex.dragging._draggable._onDown(e.originalEvent)\n    },\n\n    onDrawingMouseUp: function (e) {\n      this.commitDrawing(e)\n      e.originalEvent._simulated = false\n      L.Editable.PathEditor.prototype.onDrawingMouseUp.call(this, e)\n    },\n\n    onDrawingMouseMove: function (e) {\n      e.originalEvent._simulated = false\n      L.Editable.PathEditor.prototype.onDrawingMouseMove.call(this, e)\n    },\n\n    onDrag: function (e) {\n      L.Editable.PathEditor.prototype.onDrag.call(this, e)\n      this.feature.dragging.updateLatLng(this._resizeLatLng)\n    },\n  })\n\n  // 🍂namespace Editable; 🍂class EditableMixin\n  // `EditableMixin` is included to `L.Polyline`, `L.Polygon`, `L.Rectangle`, `L.Circle`\n  // and `L.Marker`. It adds some methods to them.\n  // *When editing is enabled, the editor is accessible on the instance with the\n  // `editor` property.*\n  const EditableMixin = {\n    createEditor: function (map) {\n      map = map || this._map\n      const tools = this.options.editOptions?.editTools || map.editTools\n      if (!tools) throw Error('Unable to detect Editable instance.')\n      const Klass = this.options.editorClass || this.getEditorClass(tools)\n      return new Klass(map, this, this.options.editOptions)\n    },\n\n    // 🍂method enableEdit(map?: L.Map): this.editor\n    // Enable editing, by creating an editor if not existing, and then calling `enable` on it.\n    enableEdit: function (map) {\n      if (!this.editor) this.createEditor(map)\n      this.editor.enable()\n      return this.editor\n    },\n\n    // 🍂method editEnabled(): boolean\n    // Return true if current instance has an editor attached, and this editor is enabled.\n    editEnabled: function () {\n      return this.editor?.enabled()\n    },\n\n    // 🍂method disableEdit()\n    // Disable editing, also remove the editor property reference.\n    disableEdit: function () {\n      if (this.editor) {\n        this.editor.disable()\n        delete this.editor\n      }\n    },\n\n    // 🍂method toggleEdit()\n    // Enable or disable editing, according to current status.\n    toggleEdit: function () {\n      if (this.editEnabled()) this.disableEdit()\n      else this.enableEdit()\n    },\n\n    _onEditableAdd: function () {\n      if (this.editor) this.enableEdit()\n    },\n  }\n\n  const PolylineMixin = {\n    getEditorClass: (tools) => {\n      return tools?.options?.polylineEditorClass || L.Editable.PolylineEditor\n    },\n\n    shapeAt: function (latlng, latlngs) {\n      // We can have those cases:\n      // - latlngs are just a flat array of latlngs, use this\n      // - latlngs is an array of arrays of latlngs, loop over\n      let shape = null\n      latlngs = latlngs || this._latlngs\n      if (!latlngs.length) return shape\n      if (isFlat(latlngs) && this.isInLatLngs(latlng, latlngs)) shape = latlngs\n      else {\n        for (const member of latlngs) {\n          if (this.isInLatLngs(latlng, member)) return member\n        }\n      }\n      return shape\n    },\n\n    isInLatLngs: function (l, latlngs) {\n      if (!latlngs) return false\n      let i\n      let k\n      let len\n      let part = []\n      let p\n      const w = this._clickTolerance()\n      this._projectLatlngs(latlngs, part, this._pxBounds)\n      part = part[0]\n      p = this._map.latLngToLayerPoint(l)\n\n      if (!this._pxBounds.contains(p)) {\n        return false\n      }\n      for (i = 1, len = part.length, k = 0; i < len; k = i++) {\n        if (L.LineUtil.pointToSegmentDistance(p, part[k], part[i]) <= w) {\n          return true\n        }\n      }\n      return false\n    },\n  }\n\n  const PolygonMixin = {\n    getEditorClass: (tools) => {\n      return tools?.options?.polygonEditorClass || L.Editable.PolygonEditor\n    },\n\n    shapeAt: function (latlng, latlngs) {\n      // We can have those cases:\n      // - latlngs are just a flat array of latlngs, use this\n      // - latlngs is an array of arrays of latlngs, this is a simple polygon (maybe with holes), use the first\n      // - latlngs is an array of arrays of arrays, this is a multi, loop over\n      let shape = null\n      latlngs = latlngs || this._latlngs\n      if (!latlngs.length) return shape\n      if (isFlat(latlngs) && this.isInLatLngs(latlng, latlngs)) shape = latlngs\n      if (isFlat(latlngs[0]) && this.isInLatLngs(latlng, latlngs[0])) {\n        shape = latlngs\n      } else {\n        for (const member of latlngs) {\n          if (this.isInLatLngs(latlng, member[0])) return member\n        }\n      }\n      return shape\n    },\n\n    isInLatLngs: (l, latlngs) => {\n      let inside = false\n      let l1\n      let l2\n      let j\n      let k\n      let len2\n\n      for (j = 0, len2 = latlngs.length, k = len2 - 1; j < len2; k = j++) {\n        l1 = latlngs[j]\n        l2 = latlngs[k]\n\n        if (\n          l1.lat > l.lat !== l2.lat > l.lat &&\n          l.lng < ((l2.lng - l1.lng) * (l.lat - l1.lat)) / (l2.lat - l1.lat) + l1.lng\n        ) {\n          inside = !inside\n        }\n      }\n\n      return inside\n    },\n\n    parentShape: function (shape, latlngs) {\n      latlngs = latlngs || this._latlngs\n      if (!latlngs) return\n      let idx = L.Util.indexOf(latlngs, shape)\n      if (idx !== -1) return latlngs\n      for (const member of latlngs) {\n        idx = L.Util.indexOf(member, shape)\n        if (idx !== -1) return member\n      }\n    },\n  }\n\n  const MarkerMixin = {\n    getEditorClass: (tools) => {\n      return tools?.options?.markerEditorClass || L.Editable.MarkerEditor\n    },\n  }\n\n  const CircleMarkerMixin = {\n    getEditorClass: (tools) => {\n      return tools?.options?.circleMarkerEditorClass || L.Editable.CircleMarkerEditor\n    },\n  }\n\n  const RectangleMixin = {\n    getEditorClass: (tools) => {\n      return tools?.options?.rectangleEditorClass || L.Editable.RectangleEditor\n    },\n  }\n\n  const CircleMixin = {\n    getEditorClass: (tools) => {\n      return tools?.options?.circleEditorClass || L.Editable.CircleEditor\n    },\n  }\n\n  const keepEditable = function () {\n    // Make sure you can remove/readd an editable layer.\n    this.on('add', this._onEditableAdd)\n  }\n\n  const isFlat = L.LineUtil.isFlat || L.LineUtil._flat || L.Polyline._flat // <=> 1.1 compat.\n\n  if (L.Polyline) {\n    L.Polyline.include(EditableMixin)\n    L.Polyline.include(PolylineMixin)\n    L.Polyline.addInitHook(keepEditable)\n  }\n  if (L.Polygon) {\n    L.Polygon.include(EditableMixin)\n    L.Polygon.include(PolygonMixin)\n  }\n  if (L.Marker) {\n    L.Marker.include(EditableMixin)\n    L.Marker.include(MarkerMixin)\n    L.Marker.addInitHook(keepEditable)\n  }\n  if (L.CircleMarker) {\n    L.CircleMarker.include(EditableMixin)\n    L.CircleMarker.include(CircleMarkerMixin)\n    L.CircleMarker.addInitHook(keepEditable)\n  }\n  if (L.Rectangle) {\n    L.Rectangle.include(EditableMixin)\n    L.Rectangle.include(RectangleMixin)\n  }\n  if (L.Circle) {\n    L.Circle.include(EditableMixin)\n    L.Circle.include(CircleMixin)\n  }\n\n  L.LatLng.prototype.update = function (latlng) {\n    latlng = L.latLng(latlng)\n    this.lat = latlng.lat\n    this.lng = latlng.lng\n  }\n}, window)\n"]}