(self["webpackChunk_vaadin_bundles"] = self["webpackChunk_vaadin_bundles"] || []).push([["vendors-node_modules_vaadin_map_node_modules_ol_interaction_js"],{

/***/ "./node_modules/@vaadin/map/node_modules/ol/interaction.js":
/*!*****************************************************************!*\
  !*** ./node_modules/@vaadin/map/node_modules/ol/interaction.js ***!
  \*****************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "DblClickDragZoom": () => (/* reexport safe */ _interaction_DblClickDragZoom_js__WEBPACK_IMPORTED_MODULE_1__["default"]),
/* harmony export */   "DoubleClickZoom": () => (/* reexport safe */ _interaction_DoubleClickZoom_js__WEBPACK_IMPORTED_MODULE_0__["default"]),
/* harmony export */   "DragAndDrop": () => (/* reexport safe */ _interaction_DragAndDrop_js__WEBPACK_IMPORTED_MODULE_2__["default"]),
/* harmony export */   "DragBox": () => (/* reexport safe */ _interaction_DragBox_js__WEBPACK_IMPORTED_MODULE_3__["default"]),
/* harmony export */   "DragPan": () => (/* reexport safe */ _interaction_DragPan_js__WEBPACK_IMPORTED_MODULE_4__["default"]),
/* harmony export */   "DragRotate": () => (/* reexport safe */ _interaction_DragRotate_js__WEBPACK_IMPORTED_MODULE_5__["default"]),
/* harmony export */   "DragRotateAndZoom": () => (/* reexport safe */ _interaction_DragRotateAndZoom_js__WEBPACK_IMPORTED_MODULE_6__["default"]),
/* harmony export */   "DragZoom": () => (/* reexport safe */ _interaction_DragZoom_js__WEBPACK_IMPORTED_MODULE_7__["default"]),
/* harmony export */   "Draw": () => (/* reexport safe */ _interaction_Draw_js__WEBPACK_IMPORTED_MODULE_8__["default"]),
/* harmony export */   "Extent": () => (/* reexport safe */ _interaction_Extent_js__WEBPACK_IMPORTED_MODULE_9__["default"]),
/* harmony export */   "Interaction": () => (/* reexport safe */ _interaction_Interaction_js__WEBPACK_IMPORTED_MODULE_10__["default"]),
/* harmony export */   "KeyboardPan": () => (/* reexport safe */ _interaction_KeyboardPan_js__WEBPACK_IMPORTED_MODULE_11__["default"]),
/* harmony export */   "KeyboardZoom": () => (/* reexport safe */ _interaction_KeyboardZoom_js__WEBPACK_IMPORTED_MODULE_12__["default"]),
/* harmony export */   "Link": () => (/* reexport safe */ _interaction_Link_js__WEBPACK_IMPORTED_MODULE_13__["default"]),
/* harmony export */   "Modify": () => (/* reexport safe */ _interaction_Modify_js__WEBPACK_IMPORTED_MODULE_14__["default"]),
/* harmony export */   "MouseWheelZoom": () => (/* reexport safe */ _interaction_MouseWheelZoom_js__WEBPACK_IMPORTED_MODULE_15__["default"]),
/* harmony export */   "PinchRotate": () => (/* reexport safe */ _interaction_PinchRotate_js__WEBPACK_IMPORTED_MODULE_16__["default"]),
/* harmony export */   "PinchZoom": () => (/* reexport safe */ _interaction_PinchZoom_js__WEBPACK_IMPORTED_MODULE_17__["default"]),
/* harmony export */   "Pointer": () => (/* reexport safe */ _interaction_Pointer_js__WEBPACK_IMPORTED_MODULE_18__["default"]),
/* harmony export */   "Select": () => (/* reexport safe */ _interaction_Select_js__WEBPACK_IMPORTED_MODULE_19__["default"]),
/* harmony export */   "Snap": () => (/* reexport safe */ _interaction_Snap_js__WEBPACK_IMPORTED_MODULE_20__["default"]),
/* harmony export */   "Translate": () => (/* reexport safe */ _interaction_Translate_js__WEBPACK_IMPORTED_MODULE_21__["default"]),
/* harmony export */   "defaults": () => (/* reexport safe */ _interaction_defaults_js__WEBPACK_IMPORTED_MODULE_22__.defaults)
/* harmony export */ });
/* harmony import */ var _interaction_DoubleClickZoom_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./interaction/DoubleClickZoom.js */ "./node_modules/@vaadin/map/node_modules/ol/interaction/DoubleClickZoom.js");
/* harmony import */ var _interaction_DblClickDragZoom_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./interaction/DblClickDragZoom.js */ "./node_modules/@vaadin/map/node_modules/ol/interaction/DblClickDragZoom.js");
/* harmony import */ var _interaction_DragAndDrop_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./interaction/DragAndDrop.js */ "./node_modules/@vaadin/map/node_modules/ol/interaction/DragAndDrop.js");
/* harmony import */ var _interaction_DragBox_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./interaction/DragBox.js */ "./node_modules/@vaadin/map/node_modules/ol/interaction/DragBox.js");
/* harmony import */ var _interaction_DragPan_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./interaction/DragPan.js */ "./node_modules/@vaadin/map/node_modules/ol/interaction/DragPan.js");
/* harmony import */ var _interaction_DragRotate_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./interaction/DragRotate.js */ "./node_modules/@vaadin/map/node_modules/ol/interaction/DragRotate.js");
/* harmony import */ var _interaction_DragRotateAndZoom_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./interaction/DragRotateAndZoom.js */ "./node_modules/@vaadin/map/node_modules/ol/interaction/DragRotateAndZoom.js");
/* harmony import */ var _interaction_DragZoom_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./interaction/DragZoom.js */ "./node_modules/@vaadin/map/node_modules/ol/interaction/DragZoom.js");
/* harmony import */ var _interaction_Draw_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./interaction/Draw.js */ "./node_modules/@vaadin/map/node_modules/ol/interaction/Draw.js");
/* harmony import */ var _interaction_Extent_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./interaction/Extent.js */ "./node_modules/@vaadin/map/node_modules/ol/interaction/Extent.js");
/* harmony import */ var _interaction_Interaction_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./interaction/Interaction.js */ "./node_modules/@vaadin/map/node_modules/ol/interaction/Interaction.js");
/* harmony import */ var _interaction_KeyboardPan_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./interaction/KeyboardPan.js */ "./node_modules/@vaadin/map/node_modules/ol/interaction/KeyboardPan.js");
/* harmony import */ var _interaction_KeyboardZoom_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./interaction/KeyboardZoom.js */ "./node_modules/@vaadin/map/node_modules/ol/interaction/KeyboardZoom.js");
/* harmony import */ var _interaction_Link_js__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./interaction/Link.js */ "./node_modules/@vaadin/map/node_modules/ol/interaction/Link.js");
/* harmony import */ var _interaction_Modify_js__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./interaction/Modify.js */ "./node_modules/@vaadin/map/node_modules/ol/interaction/Modify.js");
/* harmony import */ var _interaction_MouseWheelZoom_js__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./interaction/MouseWheelZoom.js */ "./node_modules/@vaadin/map/node_modules/ol/interaction/MouseWheelZoom.js");
/* harmony import */ var _interaction_PinchRotate_js__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./interaction/PinchRotate.js */ "./node_modules/@vaadin/map/node_modules/ol/interaction/PinchRotate.js");
/* harmony import */ var _interaction_PinchZoom_js__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./interaction/PinchZoom.js */ "./node_modules/@vaadin/map/node_modules/ol/interaction/PinchZoom.js");
/* harmony import */ var _interaction_Pointer_js__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./interaction/Pointer.js */ "./node_modules/@vaadin/map/node_modules/ol/interaction/Pointer.js");
/* harmony import */ var _interaction_Select_js__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./interaction/Select.js */ "./node_modules/@vaadin/map/node_modules/ol/interaction/Select.js");
/* harmony import */ var _interaction_Snap_js__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./interaction/Snap.js */ "./node_modules/@vaadin/map/node_modules/ol/interaction/Snap.js");
/* harmony import */ var _interaction_Translate_js__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./interaction/Translate.js */ "./node_modules/@vaadin/map/node_modules/ol/interaction/Translate.js");
/* harmony import */ var _interaction_defaults_js__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ./interaction/defaults.js */ "./node_modules/@vaadin/map/node_modules/ol/interaction/defaults.js");
/**
 * @module ol/interaction
 */

























/***/ }),

/***/ "./node_modules/@vaadin/map/node_modules/ol/interaction/DblClickDragZoom.js":
/*!**********************************************************************************!*\
  !*** ./node_modules/@vaadin/map/node_modules/ol/interaction/DblClickDragZoom.js ***!
  \**********************************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _MapBrowserEventType_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../MapBrowserEventType.js */ "./node_modules/@vaadin/map/node_modules/ol/MapBrowserEventType.js");
/* harmony import */ var _Interaction_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Interaction.js */ "./node_modules/@vaadin/map/node_modules/ol/interaction/Interaction.js");
/**
 * @module ol/interaction/DblClickDragZoom
 */



/**
 * @typedef {Object} Options
 * @property {number} [duration=400] Animation duration in milliseconds. *
 * @property {number} [delta=1] The zoom delta applied on move of one pixel. *
 * @property {function(boolean):boolean} [stopDown]
 * Should the down event be propagated to other interactions, or should be
 * stopped?
 */

/**
 * @classdesc
 * Allows the user to zoom the map by double tap/click then drag up/down
 * with one finger/left mouse.
 * @api
 */
class DblClickDragZoom extends _Interaction_js__WEBPACK_IMPORTED_MODULE_0__["default"] {
  /**
   * @param {Options} [opt_options] Options.
   */
  constructor(opt_options) {
    const options = opt_options ? opt_options : {};

    super(
      /** @type {import("./Interaction.js").InteractionOptions} */ (options),
    );

    if (options.stopDown) {
      this.stopDown = options.stopDown;
    }

    /**
     * @private
     * @type {number}
     */
    this.scaleDeltaByPixel_ = options.delta ? options.delta : 0.01;

    /**
     * @private
     * @type {number}
     */
    this.duration_ = options.duration !== undefined ? options.duration : 250;

    /**
     * @type {boolean}
     * @private
     */
    this.handlingDownUpSequence_ = false;

    /**
     * @type {boolean}
     * @private
     */
    this.handlingDoubleDownSequence_ = false;

    /**
     * @type {ReturnType<typeof setTimeout>}
     * @private
     */
    this.doubleTapTimeoutId_ = undefined;

    /**
     * @type {!Object<string, PointerEvent>}
     * @private
     */
    this.trackedPointers_ = {};

    /**
     * @type {PointerEvent|null}
     * @private
     */
    this.down_ = null;

    /**
     * @type {Array<PointerEvent>}
     * @protected
     */
    this.targetPointers = [];
  }

  /**
   * Handles the {@link module:ol/MapBrowserEvent~MapBrowserEvent  map browser event} and may call into
   * other functions, if event sequences like e.g. 'drag' or 'down-up' etc. are
   * detected.
   * @param {import("../MapBrowserEvent.js").default<PointerEvent>} mapBrowserEvent Map browser event.
   * @return {boolean} `false` to stop event propagation.
   * @api
   * @override
   */
  handleEvent(mapBrowserEvent) {
    if (!mapBrowserEvent.originalEvent) {
      return true;
    }

    let stopEvent = false;
    this.updateTrackedPointers_(mapBrowserEvent);
    if (this.handlingDownUpSequence_) {
      if (mapBrowserEvent.type == _MapBrowserEventType_js__WEBPACK_IMPORTED_MODULE_1__["default"].POINTERDRAG) {
        this.handleDragEvent(mapBrowserEvent);
        // prevent page scrolling during dragging
        mapBrowserEvent.originalEvent.preventDefault();
      } else if (mapBrowserEvent.type == _MapBrowserEventType_js__WEBPACK_IMPORTED_MODULE_1__["default"].POINTERUP) {
        const handledUp = this.handleUpEvent(mapBrowserEvent);
        this.handlingDownUpSequence_ = handledUp;
      }
    } else {
      if (mapBrowserEvent.type == _MapBrowserEventType_js__WEBPACK_IMPORTED_MODULE_1__["default"].POINTERDOWN) {
        if (this.handlingDoubleDownSequence_) {
          this.handlingDoubleDownSequence_ = false;
          const handled = this.handleDownEvent(mapBrowserEvent);
          this.handlingDownUpSequence_ = handled;
          stopEvent = this.stopDown(handled);
        } else {
          stopEvent = this.stopDown(false);
          this.waitForDblTap_();
        }
      }
    }
    return !stopEvent;
  }

  /**
   * Handle pointer drag events.
   * @param {import("../MapBrowserEvent.js").default<PointerEvent>} mapBrowserEvent Event.
   */
  handleDragEvent(mapBrowserEvent) {
    let scaleDelta = 1.0;

    const touch0 = this.targetPointers[0];
    const touch1 = this.down_;
    const distance = touch0.clientY - touch1.clientY;

    if (this.lastDistance_ !== undefined) {
      scaleDelta =
        1 - (this.lastDistance_ - distance) * this.scaleDeltaByPixel_;
    }
    this.lastDistance_ = distance;

    if (scaleDelta != 1.0) {
      this.lastScaleDelta_ = scaleDelta;
    }

    // scale, bypass the resolution constraint
    const map = mapBrowserEvent.map;
    const view = map.getView();
    map.render();
    view.adjustResolutionInternal(scaleDelta);
  }

  /**
   * Handle pointer down events.
   * @param {import("../MapBrowserEvent.js").default<PointerEvent>} mapBrowserEvent Event.
   * @return {boolean} If the event was consumed.
   */
  handleDownEvent(mapBrowserEvent) {
    if (this.targetPointers.length == 1) {
      const map = mapBrowserEvent.map;
      this.anchor_ = null;
      this.lastDistance_ = undefined;
      this.lastScaleDelta_ = 1;
      this.down_ = mapBrowserEvent.originalEvent;
      if (!this.handlingDownUpSequence_) {
        map.getView().beginInteraction();
      }
      return true;
    }
    return false;
  }

  /**
   * Handle pointer up events zooming out.
   * @param {import("../MapBrowserEvent.js").default} mapBrowserEvent Event.
   * @return {boolean} If the event was consumed.
   */
  handleUpEvent(mapBrowserEvent) {
    if (this.targetPointers.length == 0) {
      const map = mapBrowserEvent.map;
      const view = map.getView();
      const direction = this.lastScaleDelta_ > 1 ? 1 : -1;
      view.endInteraction(this.duration_, direction);
      this.handlingDownUpSequence_ = false;
      this.handlingDoubleDownSequence_ = false;
      return false;
    }
    return true;
  }

  /**
   * This function is used to determine if "down" events should be propagated
   * to other interactions or should be stopped.
   * @param {boolean} handled Was the event handled by the interaction?
   * @return {boolean} Should the `down` event be stopped?
   */
  stopDown(handled) {
    return handled;
  }

  /**
   * @param {import("../MapBrowserEvent.js").default<PointerEvent>} mapBrowserEvent Event.
   * @private
   */
  updateTrackedPointers_(mapBrowserEvent) {
    if (isPointerDraggingEvent(mapBrowserEvent)) {
      const event = mapBrowserEvent.originalEvent;

      const id = event.pointerId.toString();
      if (mapBrowserEvent.type == _MapBrowserEventType_js__WEBPACK_IMPORTED_MODULE_1__["default"].POINTERUP) {
        delete this.trackedPointers_[id];
      } else if (mapBrowserEvent.type == _MapBrowserEventType_js__WEBPACK_IMPORTED_MODULE_1__["default"].POINTERDOWN) {
        this.trackedPointers_[id] = event;
      } else if (id in this.trackedPointers_) {
        // update only when there was a pointerdown event for this pointer
        this.trackedPointers_[id] = event;
      }
      this.targetPointers = Object.values(this.trackedPointers_);
    }
  }

  /**
   * Wait the second double finger tap.
   * @private
   */
  waitForDblTap_() {
    if (this.doubleTapTimeoutId_ !== undefined) {
      // double-click
      clearTimeout(this.doubleTapTimeoutId_);
      this.doubleTapTimeoutId_ = undefined;
    } else {
      this.handlingDoubleDownSequence_ = true;
      this.doubleTapTimeoutId_ = setTimeout(
        this.endInteraction_.bind(this),
        250,
      );
    }
  }

  /**
   * @private
   */
  endInteraction_() {
    this.handlingDoubleDownSequence_ = false;
    this.doubleTapTimeoutId_ = undefined;
  }
}

/**
 * @param {import("../MapBrowserEvent.js").default} mapBrowserEvent Event.
 * @return {boolean} Whether the event is a pointerdown, pointerdrag
 *     or pointerup event.
 */
function isPointerDraggingEvent(mapBrowserEvent) {
  const type = mapBrowserEvent.type;
  return (
    type === _MapBrowserEventType_js__WEBPACK_IMPORTED_MODULE_1__["default"].POINTERDOWN ||
    type === _MapBrowserEventType_js__WEBPACK_IMPORTED_MODULE_1__["default"].POINTERDRAG ||
    type === _MapBrowserEventType_js__WEBPACK_IMPORTED_MODULE_1__["default"].POINTERUP
  );
}

/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (DblClickDragZoom);


/***/ }),

/***/ "./node_modules/@vaadin/map/node_modules/ol/interaction/DragAndDrop.js":
/*!*****************************************************************************!*\
  !*** ./node_modules/@vaadin/map/node_modules/ol/interaction/DragAndDrop.js ***!
  \*****************************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "DragAndDropEvent": () => (/* binding */ DragAndDropEvent),
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _events_Event_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../events/Event.js */ "./node_modules/@vaadin/map/node_modules/ol/events/Event.js");
/* harmony import */ var _events_EventType_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../events/EventType.js */ "./node_modules/@vaadin/map/node_modules/ol/events/EventType.js");
/* harmony import */ var _events_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../events.js */ "./node_modules/@vaadin/map/node_modules/ol/events.js");
/* harmony import */ var _functions_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../functions.js */ "./node_modules/@vaadin/map/node_modules/ol/functions.js");
/* harmony import */ var _proj_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../proj.js */ "./node_modules/@vaadin/map/node_modules/ol/proj.js");
/* harmony import */ var _Interaction_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Interaction.js */ "./node_modules/@vaadin/map/node_modules/ol/interaction/Interaction.js");
/**
 * @module ol/interaction/DragAndDrop
 */
// FIXME should handle all geo-referenced data, not just vector data








/**
 * @typedef {Object} Options
 * @property {Array<typeof import("../format/Feature.js").default|import("../format/Feature.js").default>} [formatConstructors] Format constructors
 * (and/or formats pre-constructed with options).
 * @property {import("../source/Vector.js").default} [source] Optional vector source where features will be added.  If a source is provided
 * all existing features will be removed and new features will be added when
 * they are dropped on the target.  If you want to add features to a vector
 * source without removing the existing features (append only), instead of
 * providing the source option listen for the "addfeatures" event.
 * @property {import("../proj.js").ProjectionLike} [projection] Target projection. By default, the map's view's projection is used.
 * @property {HTMLElement} [target] The element that is used as the drop target, default is the viewport element.
 */

/**
 * @enum {string}
 */
const DragAndDropEventType = {
  /**
   * Triggered when features are added
   * @event DragAndDropEvent#addfeatures
   * @api
   */
  ADD_FEATURES: 'addfeatures',
};

/**
 * @classdesc
 * Events emitted by {@link module:ol/interaction/DragAndDrop~DragAndDrop} instances are instances
 * of this type.
 */
class DragAndDropEvent extends _events_Event_js__WEBPACK_IMPORTED_MODULE_1__["default"] {
  /**
   * @param {DragAndDropEventType} type Type.
   * @param {File} file File.
   * @param {Array<import("../Feature.js").default>} [features] Features.
   * @param {import("../proj/Projection.js").default} [projection] Projection.
   */
  constructor(type, file, features, projection) {
    super(type);

    /**
     * The features parsed from dropped data.
     * @type {Array<import("../Feature.js").FeatureLike>|undefined}
     * @api
     */
    this.features = features;

    /**
     * The dropped file.
     * @type {File}
     * @api
     */
    this.file = file;

    /**
     * The feature projection.
     * @type {import("../proj/Projection.js").default|undefined}
     * @api
     */
    this.projection = projection;
  }
}

/***
 * @template Return
 * @typedef {import("../Observable").OnSignature<import("../Observable").EventTypes, import("../events/Event.js").default, Return> &
 *   import("../Observable").OnSignature<import("../ObjectEventType").Types|
 *     'change:active', import("../Object").ObjectEvent, Return> &
 *   import("../Observable").OnSignature<'addfeatures', DragAndDropEvent, Return> &
 *   import("../Observable").CombinedOnSignature<import("../Observable").EventTypes|import("../ObjectEventType").Types|
 *     'change:active'|'addfeatures', Return>} DragAndDropOnSignature
 */

/**
 * @classdesc
 * Handles input of vector data by drag and drop.
 *
 * @api
 *
 * @fires DragAndDropEvent
 */
class DragAndDrop extends _Interaction_js__WEBPACK_IMPORTED_MODULE_2__["default"] {
  /**
   * @param {Options} [options] Options.
   */
  constructor(options) {
    options = options ? options : {};

    super({
      handleEvent: _functions_js__WEBPACK_IMPORTED_MODULE_3__.TRUE,
    });

    /***
     * @type {DragAndDropOnSignature<import("../events").EventsKey>}
     */
    this.on;

    /***
     * @type {DragAndDropOnSignature<import("../events").EventsKey>}
     */
    this.once;

    /***
     * @type {DragAndDropOnSignature<void>}
     */
    this.un;

    /**
     * @private
     * @type {boolean}
     */
    this.readAsBuffer_ = false;

    /**
     * @private
     * @type {Array<import("../format/Feature.js").default>}
     */
    this.formats_ = [];
    const formatConstructors = options.formatConstructors
      ? options.formatConstructors
      : [];
    for (let i = 0, ii = formatConstructors.length; i < ii; ++i) {
      let format = formatConstructors[i];
      if (typeof format === 'function') {
        format = new format();
      }
      this.formats_.push(format);
      this.readAsBuffer_ =
        this.readAsBuffer_ || format.getType() === 'arraybuffer';
    }

    /**
     * @private
     * @type {import("../proj/Projection.js").default}
     */
    this.projection_ = options.projection
      ? (0,_proj_js__WEBPACK_IMPORTED_MODULE_0__.get)(options.projection)
      : null;

    /**
     * @private
     * @type {?Array<import("../events.js").EventsKey>}
     */
    this.dropListenKeys_ = null;

    /**
     * @private
     * @type {import("../source/Vector.js").default}
     */
    this.source_ = options.source || null;

    /**
     * @private
     * @type {HTMLElement|null}
     */
    this.target = options.target ? options.target : null;
  }

  /**
   * @param {File} file File.
   * @param {Event} event Load event.
   * @private
   */
  handleResult_(file, event) {
    const result = event.target.result;
    const map = this.getMap();
    let projection = this.projection_;
    if (!projection) {
      projection = (0,_proj_js__WEBPACK_IMPORTED_MODULE_0__.getUserProjection)();
      if (!projection) {
        const view = map.getView();
        projection = view.getProjection();
      }
    }

    let text;
    const formats = this.formats_;
    for (let i = 0, ii = formats.length; i < ii; ++i) {
      const format = formats[i];
      let input = result;
      if (this.readAsBuffer_ && format.getType() !== 'arraybuffer') {
        if (text === undefined) {
          text = new TextDecoder().decode(result);
        }
        input = text;
      }
      const features = this.tryReadFeatures_(format, input, {
        featureProjection: projection,
      });
      if (features && features.length > 0) {
        if (this.source_) {
          this.source_.clear();
          this.source_.addFeatures(features);
        }
        this.dispatchEvent(
          new DragAndDropEvent(
            DragAndDropEventType.ADD_FEATURES,
            file,
            features,
            projection,
          ),
        );
        break;
      }
    }
  }

  /**
   * @private
   */
  registerListeners_() {
    const map = this.getMap();
    if (map) {
      const dropArea = this.target ? this.target : map.getViewport();
      this.dropListenKeys_ = [
        (0,_events_js__WEBPACK_IMPORTED_MODULE_4__.listen)(dropArea, _events_EventType_js__WEBPACK_IMPORTED_MODULE_5__["default"].DROP, this.handleDrop, this),
        (0,_events_js__WEBPACK_IMPORTED_MODULE_4__.listen)(dropArea, _events_EventType_js__WEBPACK_IMPORTED_MODULE_5__["default"].DRAGENTER, this.handleStop, this),
        (0,_events_js__WEBPACK_IMPORTED_MODULE_4__.listen)(dropArea, _events_EventType_js__WEBPACK_IMPORTED_MODULE_5__["default"].DRAGOVER, this.handleStop, this),
        (0,_events_js__WEBPACK_IMPORTED_MODULE_4__.listen)(dropArea, _events_EventType_js__WEBPACK_IMPORTED_MODULE_5__["default"].DROP, this.handleStop, this),
      ];
    }
  }

  /**
   * Activate or deactivate the interaction.
   * @param {boolean} active Active.
   * @observable
   * @api
   * @override
   */
  setActive(active) {
    if (!this.getActive() && active) {
      this.registerListeners_();
    }
    if (this.getActive() && !active) {
      this.unregisterListeners_();
    }
    super.setActive(active);
  }

  /**
   * Remove the interaction from its current map and attach it to the new map.
   * Subclasses may set up event handlers to get notified about changes to
   * the map here.
   * @param {import("../Map.js").default} map Map.
   * @override
   */
  setMap(map) {
    this.unregisterListeners_();
    super.setMap(map);
    if (this.getActive()) {
      this.registerListeners_();
    }
  }

  /**
   * @param {import("../format/Feature.js").default} format Format.
   * @param {string} text Text.
   * @param {import("../format/Feature.js").ReadOptions} options Read options.
   * @private
   * @return {Array<import("../Feature.js").default>} Features.
   */
  tryReadFeatures_(format, text, options) {
    try {
      return (
        /** @type {Array<import("../Feature.js").default>} */
        (format.readFeatures(text, options))
      );
    } catch {
      return null;
    }
  }

  /**
   * @private
   */
  unregisterListeners_() {
    if (this.dropListenKeys_) {
      this.dropListenKeys_.forEach(_events_js__WEBPACK_IMPORTED_MODULE_4__.unlistenByKey);
      this.dropListenKeys_ = null;
    }
  }

  /**
   * @param {DragEvent} event Event.
   */
  handleDrop(event) {
    const files = event.dataTransfer.files;
    for (let i = 0, ii = files.length; i < ii; ++i) {
      const file = files.item(i);
      const reader = new FileReader();
      reader.addEventListener(
        _events_EventType_js__WEBPACK_IMPORTED_MODULE_5__["default"].LOAD,
        this.handleResult_.bind(this, file),
      );
      if (this.readAsBuffer_) {
        reader.readAsArrayBuffer(file);
      } else {
        reader.readAsText(file);
      }
    }
  }

  /**
   * @param {DragEvent} event Event.
   */
  handleStop(event) {
    event.stopPropagation();
    event.preventDefault();
    event.dataTransfer.dropEffect = 'copy';
  }
}

/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (DragAndDrop);


/***/ }),

/***/ "./node_modules/@vaadin/map/node_modules/ol/interaction/DragRotateAndZoom.js":
/*!***********************************************************************************!*\
  !*** ./node_modules/@vaadin/map/node_modules/ol/interaction/DragRotateAndZoom.js ***!
  \***********************************************************************************/
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {

__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */   "default": () => (__WEBPACK_DEFAULT_EXPORT__)
/* harmony export */ });
/* harmony import */ var _events_condition_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../events/condition.js */ "./node_modules/@vaadin/map/node_modules/ol/events/condition.js");
/* harmony import */ var _Pointer_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Pointer.js */ "./node_modules/@vaadin/map/node_modules/ol/interaction/Pointer.js");
/**
 * @module ol/interaction/DragRotateAndZoom
 */



/**
 * @typedef {Object} Options
 * @property {import("../events/condition.js").Condition} [condition] A function that
 * takes a {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a
 * boolean to indicate whether that event should be handled.
 * Default is {@link module:ol/events/condition.shiftKeyOnly}.
 * @property {number} [duration=400] Animation duration in milliseconds.
 */

/**
 * @classdesc
 * Allows the user to zoom and rotate the map by clicking and dragging
 * on the map.  By default, this interaction is limited to when the shift
 * key is held down.
 *
 * This interaction is only supported for mouse devices.
 *
 * And this interaction is not included in the default interactions.
 * @api
 */
class DragRotateAndZoom extends _Pointer_js__WEBPACK_IMPORTED_MODULE_0__["default"] {
  /**
   * @param {Options} [options] Options.
   */
  constructor(options) {
    options = options ? options : {};

    super(/** @type {import("./Pointer.js").Options} */ (options));

    /**
     * @private
     * @type {import("../events/condition.js").Condition}
     */
    this.condition_ = options.condition ? options.condition : _events_condition_js__WEBPACK_IMPORTED_MODULE_1__.shiftKeyOnly;

    /**
     * @private
     * @type {number|undefined}
     */
    this.lastAngle_ = undefined;

    /**
     * @private
     * @type {number|undefined}
     */
    this.lastMagnitude_ = undefined;

    /**
     * @private
     * @type {number}
     */
    this.lastScaleDelta_ = 0;

    /**
     * @private
     * @type {number}
     */
    this.duration_ = options.duration !== undefined ? options.duration : 400;
  }

  /**
   * Handle pointer drag events.
   * @param {import("../MapBrowserEvent.js").default} mapBrowserEvent Event.
   * @override
   */
  handleDragEvent(mapBrowserEvent) {
    if (!(0,_events_condition_js__WEBPACK_IMPORTED_MODULE_1__.mouseOnly)(mapBrowserEvent)) {
      return;
    }

    const map = mapBrowserEvent.map;
    const size = map.getSize();
    const offset = mapBrowserEvent.pixel;
    const deltaX = offset[0] - size[0] / 2;
    const deltaY = size[1] / 2 - offset[1];
    const theta = Math.atan2(deltaY, deltaX);
    const magnitude = Math.sqrt(deltaX * deltaX + deltaY * deltaY);
    const view = map.getView();
    if (this.lastAngle_ !== undefined) {
      const angleDelta = this.lastAngle_ - theta;
      view.adjustRotationInternal(angleDelta);
    }
    this.lastAngle_ = theta;
    if (this.lastMagnitude_ !== undefined) {
      view.adjustResolutionInternal(this.lastMagnitude_ / magnitude);
    }
    if (this.lastMagnitude_ !== undefined) {
      this.lastScaleDelta_ = this.lastMagnitude_ / magnitude;
    }
    this.lastMagnitude_ = magnitude;
  }

  /**
   * Handle pointer up events.
   * @param {import("../MapBrowserEvent.js").default} mapBrowserEvent Event.
   * @return {boolean} If the event was consumed.
   * @override
   */
  handleUpEvent(mapBrowserEvent) {
    if (!(0,_events_condition_js__WEBPACK_IMPORTED_MODULE_1__.mouseOnly)(mapBrowserEvent)) {
      return true;
    }

    const map = mapBrowserEvent.map;
    const view = map.getView();
    const direction = this.lastScaleDelta_ > 1 ? 1 : -1;
    view.endInteraction(this.duration_, direction);
    this.lastScaleDelta_ = 0;
    return false;
  }

  /**
   * Handle pointer down events.
   * @param {import("../MapBrowserEvent.js").default} mapBrowserEvent Event.
   * @return {boolean} If the event was consumed.
   * @override
   */
  handleDownEvent(mapBrowserEvent) {
    if (!(0,_events_condition_js__WEBPACK_IMPORTED_MODULE_1__.mouseOnly)(mapBrowserEvent)) {
      return false;
    }

    if (this.condition_(mapBrowserEvent)) {
      mapBrowserEvent.map.getView().beginInteraction();
      this.lastAngle_ = undefined;
      this.lastMagnitude_ = undefined;
      return true;
    }
    return false;
  }
}

/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (DragRotateAndZoom);


/***/ })

}])
//# sourceMappingURL=vendors-node_modules_vaadin_map_node_modules_ol_interaction_js.js.map