/*!
* Photo Sphere Viewer / Plan Plugin 5.11.1
* @copyright 2015-2024 Damien "Mistic" Sorel
* @licence MIT (https://opensource.org/licenses/MIT)
*/
"use strict";
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
}
return to;
};
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// src/index.ts
var src_exports = {};
__export(src_exports, {
PlanPlugin: () => PlanPlugin,
events: () => events_exports
});
module.exports = __toCommonJS(src_exports);
var import_core6 = require("@photo-sphere-viewer/core");
// src/events.ts
var events_exports = {};
__export(events_exports, {
SelectHotspot: () => SelectHotspot,
ViewChanged: () => ViewChanged
});
var import_core = require("@photo-sphere-viewer/core");
var _SelectHotspot = class _SelectHotspot extends import_core.TypedEvent {
/** @internal */
constructor(hotspotId) {
super(_SelectHotspot.type);
this.hotspotId = hotspotId;
}
};
_SelectHotspot.type = "select-hotspot";
var SelectHotspot = _SelectHotspot;
var _ViewChanged = class _ViewChanged extends import_core.TypedEvent {
/** @internal */
constructor(view) {
super(_ViewChanged.type);
this.view = view;
}
};
_ViewChanged.type = "view-changed";
var ViewChanged = _ViewChanged;
// src/PlanPlugin.ts
var import_core5 = require("@photo-sphere-viewer/core");
// src/components/PlanComponent.ts
var import_core4 = require("@photo-sphere-viewer/core");
var import_leaflet2 = require("leaflet");
var import_three = require("three");
// src/constants.ts
var OSM_LABEL = "OpenStreetMap";
var OSM_URL = "https://tile.openstreetmap.org/{z}/{x}/{y}.png";
var OSM_ATTRIBUTION = '© OpenStreetMap';
var MARKER_DATA_KEY = "plan";
var HOTSPOT_GENERATED_ID = "__generated__";
var HOTSPOT_MARKER_ID = "__marker__";
// src/utils.ts
var import_leaflet = require("leaflet");
function gpsToLeaflet(gps) {
return { lng: gps[0], lat: gps[1], alt: gps[2] };
}
function createLeafletIcon(src, size, className) {
return new import_leaflet.DivIcon({
html: src && !src.includes("