@mappedin/react-sdk 6.0.1-beta.34 → 6.0.1-beta.36
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/THIRD_PARTY_LICENSES.txt +1 -1
- package/lib/esm/{GLTFExporter-DL6RP6ZQ.js → GLTFExporter-XWBVND6W.js} +1 -1
- package/lib/esm/{GLTFLoader-EHWXOP24.js → GLTFLoader-GNL6HQ53.js} +1 -1
- package/lib/esm/{browser-PBVKI75Y.js → browser-IG5TLLWG.js} +1 -1
- package/lib/esm/chunk-2EQDUMYU.js +1 -0
- package/lib/esm/{chunk-FBZOUVIR.js → chunk-B7B5GI4U.js} +1 -1
- package/lib/esm/chunk-LVTFVANX.js +1 -0
- package/lib/esm/{chunk-PU3YPNK6.js → chunk-OL3PKM5U.js} +1 -1
- package/lib/esm/{chunk-U67PM65J.js → chunk-VQGFL42S.js} +1 -1
- package/lib/esm/{chunk-UFHCKQ3M.js → chunk-YW4KFTPW.js} +1 -1
- package/lib/esm/index.d.ts +54 -6
- package/lib/esm/index.js +1 -1
- package/lib/esm/{inspector-EEJFPVDH.js → inspector-KXFOLZIV.js} +1 -1
- package/lib/esm/{internal-5PSRCXCU.js → internal-Y7HOO3QQ.js} +1 -1
- package/lib/esm/{outdoor-context-v4-YJQJSZTL.js → outdoor-context-v4-TCQXWWFU.js} +1 -1
- package/lib/esm/{text3d-2VNS2HCB.js → text3d-QA6EVBFB.js} +1 -1
- package/package.json +2 -2
- package/lib/esm/chunk-6XCA2ED4.js +0 -1
- package/lib/esm/chunk-DRDKJVYC.js +0 -1
package/lib/esm/index.d.ts
CHANGED
|
@@ -3706,11 +3706,12 @@ declare module '@mappedin/react-sdk/mappedin-js/src/api-geojson/directions' {
|
|
|
3706
3706
|
/**
|
|
3707
3707
|
* @hidden
|
|
3708
3708
|
*/
|
|
3709
|
-
constructor({ nodes, geojsonCollection, connections, groupBy, }: {
|
|
3709
|
+
constructor({ nodes, geojsonCollection, connections, groupBy, multiplicativeDistanceWeightScaling, }: {
|
|
3710
3710
|
nodes: ParsedMVF['node.geojson'];
|
|
3711
3711
|
geojsonCollection: ParsedMVF['obstruction'] | ParsedMVF['space'];
|
|
3712
3712
|
connections: ParsedMVF['connection.json'];
|
|
3713
3713
|
groupBy?: string;
|
|
3714
|
+
multiplicativeDistanceWeightScaling?: boolean;
|
|
3714
3715
|
});
|
|
3715
3716
|
/**
|
|
3716
3717
|
* Get directions between two navigation targets.
|
|
@@ -9516,7 +9517,7 @@ declare module '@mappedin/react-sdk/mappedin-js/src/api-geojson/map-object' {
|
|
|
9516
9517
|
import type { Position, AddLabelOptions, RendererCore, PathState, MarkerState, LineStyle, PaintStyle, EntityId } from '@mappedin/core-sdk';
|
|
9517
9518
|
import { FloorObject } from '@mappedin/react-sdk/mappedin-js/src/api-geojson/floor-object';
|
|
9518
9519
|
import type { Directions, Floor, TAddMarkerOptions, TAddPathOptions, TShow3DMapOptions } from '@mappedin/react-sdk/mappedin-js/src';
|
|
9519
|
-
import type { GLTFExportOptions, TAnimationOptions, TAddModelOptions, TAddModel, TAddImageOptions, TDirectionInstruction, TAddText3DOptions, IAnchorable } from '@mappedin/react-sdk/mappedin-js/src/types';
|
|
9520
|
+
import type { GLTFExportOptions, TAnimationOptions, TAddModelOptions, TAddModel, TAddImageOptions, TDirectionInstruction, TAddText3DOptions, IAnchorable, TAddLabelOptions } from '@mappedin/react-sdk/mappedin-js/src/types';
|
|
9520
9521
|
import { type AggregatedStyleMap } from '@mappedin/react-sdk/mappedin-js/src/api-geojson/utils';
|
|
9521
9522
|
import { StackedMaps } from '@mappedin/react-sdk/mappedin-js/src/api-geojson/stacked-maps/stacked-maps';
|
|
9522
9523
|
import type { TFloorChangeReason } from '@mappedin/react-sdk/mappedin-js/src/events';
|
|
@@ -9603,8 +9604,9 @@ declare module '@mappedin/react-sdk/mappedin-js/src/api-geojson/map-object' {
|
|
|
9603
9604
|
remove: (id: string) => string | undefined;
|
|
9604
9605
|
};
|
|
9605
9606
|
Labels: {
|
|
9606
|
-
all: ({ onCreate }: {
|
|
9607
|
+
all: ({ onCreate, labelOptions, }: {
|
|
9607
9608
|
onCreate: (labelId: string | number, text: string, target: IAnchorable) => void;
|
|
9609
|
+
labelOptions?: TAddLabelOptions;
|
|
9608
9610
|
}) => void;
|
|
9609
9611
|
add: (coordinate: Position, text: string, opts?: AddLabelOptions & {
|
|
9610
9612
|
floorId?: string;
|
|
@@ -10141,11 +10143,12 @@ declare module '@mappedin/react-sdk/mappedin-js/src/api-geojson/labels' {
|
|
|
10141
10143
|
*
|
|
10142
10144
|
* The text, appearance, priority, etc. of the labels will be automatically determined based on the external data.
|
|
10143
10145
|
*
|
|
10146
|
+
* @param options Optional additional options for the labels, similar to those in the `add` method.
|
|
10144
10147
|
* @example
|
|
10145
10148
|
* // Add all the labels to the map
|
|
10146
10149
|
* mapView.Labels.all();
|
|
10147
10150
|
*/
|
|
10148
|
-
all(): Label[];
|
|
10151
|
+
all(options?: TAddLabelOptions): Label[];
|
|
10149
10152
|
/**
|
|
10150
10153
|
* Removes a label ({@link Label}) from the map.
|
|
10151
10154
|
*
|
|
@@ -21890,10 +21893,11 @@ declare module '@mappedin/react-sdk/packages/geojson-navigator/src/navigator/nav
|
|
|
21890
21893
|
* @param {SpaceCollection} [spaces] - Optional collection of spaces that could block paths.
|
|
21891
21894
|
* @param {string} [groupBy] - Optional property name to group nodes and paths for differentiated processing.
|
|
21892
21895
|
*/
|
|
21893
|
-
constructor({ nodes, geojsonCollection, groupBy, }: {
|
|
21896
|
+
constructor({ nodes, geojsonCollection, groupBy, multiplicativeDistanceWeightScaling, }: {
|
|
21894
21897
|
nodes: NodeCollection;
|
|
21895
21898
|
geojsonCollection?: ObstructionCollection | SpaceCollection;
|
|
21896
21899
|
groupBy?: string;
|
|
21900
|
+
multiplicativeDistanceWeightScaling?: boolean;
|
|
21897
21901
|
});
|
|
21898
21902
|
/**
|
|
21899
21903
|
* Calculates and returns a set of directions from origin nodes to destination nodes, including detailed properties.
|
|
@@ -21905,12 +21909,13 @@ declare module '@mappedin/react-sdk/packages/geojson-navigator/src/navigator/nav
|
|
|
21905
21909
|
* @param {SimplifyDirectionsOptions} [simplify] - Options to simplify the pathfinding result.
|
|
21906
21910
|
* @returns {DirectionsCollection} A collection of directional features representing the path.
|
|
21907
21911
|
*/
|
|
21908
|
-
getDirections({ zones: directionsZones, originIds, destinationNodeIds, excludedNodeIds, simplify, }: {
|
|
21912
|
+
getDirections({ zones: directionsZones, originIds, destinationNodeIds, excludedNodeIds, simplify, multiplicativeDistanceWeightScaling, }: {
|
|
21909
21913
|
originIds: string[];
|
|
21910
21914
|
destinationNodeIds: string[];
|
|
21911
21915
|
zones?: DirectionsZone[];
|
|
21912
21916
|
excludedNodeIds?: string[];
|
|
21913
21917
|
simplify?: SimplifyDirectionsOptions;
|
|
21918
|
+
multiplicativeDistanceWeightScaling?: boolean;
|
|
21914
21919
|
}): DirectionsCollection;
|
|
21915
21920
|
/**
|
|
21916
21921
|
* Calculates the approximate distance between two geographic coordinates on Earth's surface.
|
|
@@ -21992,6 +21997,7 @@ declare module '@mappedin/react-sdk/packages/geojson-navigator/src/types/obstruc
|
|
|
21992
21997
|
|
|
21993
21998
|
declare module '@mappedin/react-sdk/packages/geojson-navigator/src/types/directions' {
|
|
21994
21999
|
import type { Feature, FeatureCollection, Point } from 'geojson';
|
|
22000
|
+
import type { Edge } from '@mappedin/react-sdk/packages/geojson-navigator/src/edge';
|
|
21995
22001
|
/**
|
|
21996
22002
|
* Properties specific to directional features in a navigation context.
|
|
21997
22003
|
* Includes an identifier, optional angle and distance, and allows for any additional properties.
|
|
@@ -22014,6 +22020,8 @@ declare module '@mappedin/react-sdk/packages/geojson-navigator/src/types/directi
|
|
|
22014
22020
|
* It's based on the groupBy property of the navigator.
|
|
22015
22021
|
*/
|
|
22016
22022
|
groupBy?: string;
|
|
22023
|
+
destination?: string;
|
|
22024
|
+
edges: Edge[];
|
|
22017
22025
|
};
|
|
22018
22026
|
/**
|
|
22019
22027
|
* A GeoJSON feature representing a point with properties tailored for navigation directions.
|
|
@@ -25634,6 +25642,10 @@ declare module '@mappedin/react-sdk/packages/geojson-navigator/src/types/space'
|
|
|
25634
25642
|
export { SpaceCollection, SpaceProperties };
|
|
25635
25643
|
}
|
|
25636
25644
|
|
|
25645
|
+
declare module '@mappedin/react-sdk/packages/geojson-navigator/src/edge' {
|
|
25646
|
+
export * from '@mappedin/react-sdk/packages/geojson-navigator/src/edge/edge';
|
|
25647
|
+
}
|
|
25648
|
+
|
|
25637
25649
|
declare module '@mappedin/react-sdk/geojson/src/systems/camera/helpers/input-set' {
|
|
25638
25650
|
import type { Vector2 } from 'three';
|
|
25639
25651
|
class InputSet {
|
|
@@ -28294,6 +28306,42 @@ declare module '@mappedin/react-sdk/packages/outdoor-context-v4/source/terrain_s
|
|
|
28294
28306
|
}
|
|
28295
28307
|
}
|
|
28296
28308
|
|
|
28309
|
+
declare module '@mappedin/react-sdk/packages/geojson-navigator/src/edge/edge' {
|
|
28310
|
+
import type { NodeFeature } from '@mappedin/react-sdk/packages/geojson-navigator/src/types/node';
|
|
28311
|
+
/**
|
|
28312
|
+
* Represents an edge in a graph, containing data about its endpoints and metrics like distance and angle.
|
|
28313
|
+
* @hidden
|
|
28314
|
+
*/
|
|
28315
|
+
export class Edge {
|
|
28316
|
+
/** The originating node of the edge */
|
|
28317
|
+
origin: NodeFeature;
|
|
28318
|
+
/** The destination node of the edge */
|
|
28319
|
+
destination: NodeFeature;
|
|
28320
|
+
/** The distance between the origin and the destination nodes */
|
|
28321
|
+
distance: number;
|
|
28322
|
+
/** The angle of the edge with respect to some reference, in degrees */
|
|
28323
|
+
angle: number;
|
|
28324
|
+
/** A composite weight of the edge, combining distance and a custom path weight */
|
|
28325
|
+
weight: number;
|
|
28326
|
+
/**
|
|
28327
|
+
* Constructs a new Edge instance.
|
|
28328
|
+
* @param {NodeFeature} origin - The originating node of the edge.
|
|
28329
|
+
* @param {NodeFeature} destination - The destination node of the edge.
|
|
28330
|
+
* @param {number} [distance=0] - The physical distance between the origin and destination.
|
|
28331
|
+
* @param {number} [angle=0] - The angle of the edge in degrees.
|
|
28332
|
+
* @param {number} [pathWeight=0] - An additional weight factor for the path.
|
|
28333
|
+
*/
|
|
28334
|
+
constructor({ origin, destination, distance, angle, pathWeight, multiplicativeDistanceWeightScaling, }: {
|
|
28335
|
+
origin: NodeFeature;
|
|
28336
|
+
destination: NodeFeature;
|
|
28337
|
+
distance?: number;
|
|
28338
|
+
angle?: number;
|
|
28339
|
+
pathWeight?: number;
|
|
28340
|
+
multiplicativeDistanceWeightScaling?: boolean;
|
|
28341
|
+
});
|
|
28342
|
+
}
|
|
28343
|
+
}
|
|
28344
|
+
|
|
28297
28345
|
declare module '@mappedin/react-sdk/packages/outdoor-context-v4/data/feature_position_map' {
|
|
28298
28346
|
type SerializedFeaturePositionMap = {
|
|
28299
28347
|
ids: Float64Array;
|
package/lib/esm/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{i as V,j as E,k}from"./chunk-
|
|
1
|
+
import{i as V,j as E,k}from"./chunk-LVTFVANX.js";import{c as x,n as A}from"./chunk-2EQDUMYU.js";import"./chunk-YW4KFTPW.js";import"./chunk-OL3PKM5U.js";import"./chunk-B7B5GI4U.js";import{a}from"./chunk-VQGFL42S.js";import{a as n}from"./chunk-J5IUISYU.js";a();a();import U,{useCallback as Y,useMemo as $}from"react";import{useContext as C,useEffect as T,useRef as S,useState as D}from"react";import{createPortal as q}from"react-dom";a();import{createContext as I,useContext as z}from"react";a();var L=class L extends Error{constructor(t){super("".concat(t," must be used within a MapView component."))}};n(L,"MapViewNullError");var m=L;var p=I({mapData:void 0,mapView:void 0});function F(){let{mapData:e,mapView:t}=z(p);if(!e||!t)throw new m("useMap");return{mapData:e,mapView:t}}n(F,"useMap");a();import{useEffect as G}from"react";function s(e,t){G(()=>{t!=null&&typeof e=="function"&&e(t)},[e,t])}n(s,"useOnLoad");function O(e){let{mapView:t}=C(p),r=S(),[o,i]=D(null);return T(()=>{if(t==null)throw new m("Marker");return r.current=t.Markers.add(e.target,"",{...e.options,dynamicResize:!0}),i(r.current),()=>{t==null||r.current==null||t.Markers.remove(r.current)}},[t,e.target]),T(()=>{o&&(t==null||t.updateState(o,{...e.options}))},[e.options]),s(e.onLoad,o),t==null||o==null?null:q(e.children,o.contentEl,o.id)}n(O,"Marker");function B(e){let{mapView:t}=C(p),[r,o]=D(null),i=S(A()),l=S(e.target),f=Y(u=>{var M;o(u),(M=e.onLoad)==null||M.call(e,u)},[e.onLoad]);T(()=>{if(t==null)throw new m("Marker");if(r&&r.target!==e.target){let{duration:u=300,easing:M="linear"}=e;t.Markers.animateTo(r,e.target,{duration:u,easing:M})}},[t,e.target,r]);let c=$(()=>({...e,duration:void 0,easing:void 0}),[e.duration,e.easing]);return U.createElement(O,{...c,key:i.current,target:l.current,onLoad:f})}n(B,"AnimatedMarker");a();import{useContext as J,useEffect as R,useRef as K,useState as Q}from"react";function X(e){let{mapView:t}=J(p),r=K(),[o,i]=Q(void 0);return R(()=>{if(t==null)throw new m("Label");return r.current=t.Labels.add(e.target,e.text,e.options),i(r.current),()=>{t==null||r.current==null||t.Labels.remove(r.current)}},[t,e.target]),R(()=>{r.current&&(t==null||t.updateState(r.current,{text:e.text,...e.options}))},[e.text,e.options]),s(e.onLoad,o),null}n(X,"Label");a();import{useCallback as Z,useContext as _,useEffect as ee}from"react";function te(e,t){let{mapView:r}=_(p),o=Z(i=>t(i),[t]);ee(()=>{if(r==null)throw new m("useEvent");return r.on(e,o),()=>{r!=null&&r.off(e,o)}},[r,e,t])}n(te,"useEvent");a();import{useContext as re,useEffect as ae,useRef as oe,useState as ne}from"react";function ie(e){let{mapView:t}=re(p),r=oe(),[o,i]=ne(void 0);return ae(()=>{if(t==null)throw new m("Path");let l=t.Paths.add(e.coordinate,e.options);return l.animation.then(()=>{var f;(f=e.onDrawComplete)==null||f.call(e)}),i(l),r.current=l,()=>{r.current&&t.Paths.remove(r.current)}},[t,e.coordinate,e.options]),s(e.onLoad,o),null}n(ie,"Path");a();import w,{useCallback as pe,useEffect as me,useMemo as se,useRef as j,useState as W}from"react";var de={width:"100%",height:"100%",position:"relative"};function ue(e){let{mapData:t,options:r,style:o,fallback:i,children:l,...f}=e,c=j(!1),[u,M]=W(void 0),[h,P]=W(!0),y=j(null),b=se(()=>r,[]),v=pe(()=>{if(t&&(y!=null&&y.current)){if(u)return;E(y.current,t,b).then(g=>{M(g)}).catch(g=>{x.error("Failed to render MapView",g)}).finally(()=>{P(!1)})}},[t,y.current,b]);return me(()=>{c.current||(c.current=!0,v())},[v]),s(e.onLoad,u),w.createElement(p.Provider,{value:{mapData:t,mapView:u}},w.createElement("div",{"data-testid":"mappedin-map",ref:y,style:{...de,...o},...f}),h?w.createElement(w.Fragment,null,i):l)}n(ue,"MapView");a();import{useContext as le,useEffect as H,useState as fe}from"react";function ce(e){let{mapView:t}=le(p),[r,o]=fe(!1);return H(()=>{if(t==null)throw new m("Navigation");return t.Navigation.draw(e.directions,e.options).then(()=>{var i;o(!0),(i=e.onDrawComplete)==null||i.call(e)}),()=>{t.Navigation.clear()}},[t,e.directions,e.options]),H(()=>{r!==!1&&typeof e.onLoad=="function"&&e.onLoad()},[e.onLoad,r]),null}n(ce,"Navigation");a();import{useContext as Me,useEffect as Pe,useRef as ye,useState as he}from"react";function xe(e){let{mapView:t}=Me(p),r=ye(),[o,i]=he(void 0);return Pe(()=>{if(t==null)throw new Error("MapView not initialized");return r.current=t.Shapes.add(e.geometry,e.style,e.floor),i(r.current),()=>{t==null||r.current==null||t.Shapes.remove(r.current)}},[t,e.geometry,e.style,e.floor]),s(e.onLoad,o),null}n(xe,"Shape");a();import{useContext as we,useEffect as ge,useRef as Le,useState as Te}from"react";function Se(e){let{mapView:t}=we(p),r=Le(),[o,i]=Te(void 0);return ge(()=>{if(t==null)throw new m("Model");return r.current=t.Models.add(e.models,e.options),i(r.current),()=>{t==null||r.current==null||t.Models.remove(r.current)}},[t,e.models,e.options]),s(e.onLoad,o),null}n(Se,"Model");a();import{useCallback as Ne,useEffect as be,useMemo as ve,useRef as Ae,useState as N}from"react";function Ve(e){let[t,r]=N(void 0),[o,i]=N(!0),[l,f]=N(void 0),c=Ae(0),u=ve(()=>e,[]),M=Ne(()=>{let h=++c.current;i(!0),f(void 0),V(u).then(P=>{c.current===h&&r(P)}).catch(P=>{c.current===h&&(x.error("Failed to fetch MapData",P),f(P))}).finally(()=>{c.current===h&&i(!1)})},[u]);return be(()=>{M()},[M]),{mapData:t,isLoading:o,error:l}}n(Ve,"useMapData");var Xt=k;export{B as AnimatedMarker,X as Label,ue as MapView,O as Marker,Se as Model,ce as Navigation,ie as Path,xe as Shape,Xt as default,te as useEvent,F as useMap,Ve as useMapData};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as Me,c as J,f as D,g as W,h as _e}from"./chunk-6XCA2ED4.js";import{m as B}from"./chunk-DRDKJVYC.js";import"./chunk-UFHCKQ3M.js";import"./chunk-PU3YPNK6.js";import{S as Ee}from"./chunk-FBZOUVIR.js";import{a as y}from"./chunk-U67PM65J.js";import{a as l,f as T,g as C,h as S,i as we,j as G}from"./chunk-J5IUISYU.js";y();y();y();y();var P=class P{constructor(e,o,t,n,a="div"){this.parent=e,this.object=o,this.property=t,this._disabled=!1,this._hidden=!1,this.initialValue=this.getValue(),this.domElement=document.createElement(a),this.domElement.classList.add("controller"),this.domElement.classList.add(n),this.$name=document.createElement("div"),this.$name.classList.add("name"),P.nextNameID=P.nextNameID||0,this.$name.id="lil-gui-name-".concat(++P.nextNameID),this.$widget=document.createElement("div"),this.$widget.classList.add("widget"),this.$disable=this.$widget,this.domElement.appendChild(this.$name),this.domElement.appendChild(this.$widget),this.domElement.addEventListener("keydown",r=>r.stopPropagation()),this.domElement.addEventListener("keyup",r=>r.stopPropagation()),this.parent.children.push(this),this.parent.controllers.push(this),this.parent.$children.appendChild(this.domElement),this._listenCallback=this._listenCallback.bind(this),this.name(t)}name(e){return this._name=e,this.$name.textContent=e,this}onChange(e){return this._onChange=e,this}_callOnChange(){this.parent._callOnChange(this),this._onChange!==void 0&&this._onChange.call(this,this.getValue()),this._changed=!0}onFinishChange(e){return this._onFinishChange=e,this}_callOnFinishChange(){this._changed&&(this.parent._callOnFinishChange(this),this._onFinishChange!==void 0&&this._onFinishChange.call(this,this.getValue())),this._changed=!1}reset(){return this.setValue(this.initialValue),this._callOnFinishChange(),this}enable(e=!0){return this.disable(!e)}disable(e=!0){return e===this._disabled?this:(this._disabled=e,this.domElement.classList.toggle("disabled",e),this.$disable.toggleAttribute("disabled",e),this)}show(e=!0){return this._hidden=!e,this.domElement.style.display=this._hidden?"none":"",this}hide(){return this.show(!1)}options(e){let o=this.parent.add(this.object,this.property,e);return o.name(this._name),this.destroy(),o}min(e){return this}max(e){return this}step(e){return this}decimals(e){return this}listen(e=!0){return this._listening=e,this._listenCallbackID!==void 0&&(cancelAnimationFrame(this._listenCallbackID),this._listenCallbackID=void 0),this._listening&&this._listenCallback(),this}_listenCallback(){this._listenCallbackID=requestAnimationFrame(this._listenCallback);let e=this.save();e!==this._listenPrevValue&&this.updateDisplay(),this._listenPrevValue=e}getValue(){return this.object[this.property]}setValue(e){return this.getValue()!==e&&(this.object[this.property]=e,this._callOnChange(),this.updateDisplay()),this}updateDisplay(){return this}load(e){return this.setValue(e),this._callOnFinishChange(),this}save(){return this.getValue()}destroy(){this.listen(!1),this.parent.children.splice(this.parent.children.indexOf(this),1),this.parent.controllers.splice(this.parent.controllers.indexOf(this),1),this.parent.$children.removeChild(this.domElement)}};l(P,"Controller");var L=P,ae=class ae extends L{constructor(e,o,t){super(e,o,t,"boolean","label"),this.$input=document.createElement("input"),this.$input.setAttribute("type","checkbox"),this.$input.setAttribute("aria-labelledby",this.$name.id),this.$widget.appendChild(this.$input),this.$input.addEventListener("change",()=>{this.setValue(this.$input.checked),this._callOnFinishChange()}),this.$disable=this.$input,this.updateDisplay()}updateDisplay(){return this.$input.checked=this.getValue(),this}};l(ae,"BooleanController");var te=ae;function ie(i){let e,o;return(e=i.match(/(#|0x)?([a-f0-9]{6})/i))?o=e[2]:(e=i.match(/rgb\(\s*(\d*)\s*,\s*(\d*)\s*,\s*(\d*)\s*\)/))?o=parseInt(e[1]).toString(16).padStart(2,0)+parseInt(e[2]).toString(16).padStart(2,0)+parseInt(e[3]).toString(16).padStart(2,0):(e=i.match(/^#?([a-f0-9])([a-f0-9])([a-f0-9])$/i))&&(o=e[1]+e[1]+e[2]+e[2]+e[3]+e[3]),o?"#"+o:!1}l(ie,"normalizeColorString");var Xe={isPrimitive:!0,match:i=>typeof i=="string",fromHexString:ie,toHexString:ie},H={isPrimitive:!0,match:i=>typeof i=="number",fromHexString:i=>parseInt(i.substring(1),16),toHexString:i=>"#"+i.toString(16).padStart(6,0)},Ke={isPrimitive:!1,match:i=>Array.isArray(i),fromHexString(i,e,o=1){let t=H.fromHexString(i);e[0]=(t>>16&255)/255*o,e[1]=(t>>8&255)/255*o,e[2]=(t&255)/255*o},toHexString([i,e,o],t=1){t=255/t;let n=i*t<<16^e*t<<8^o*t<<0;return H.toHexString(n)}},Ze={isPrimitive:!1,match:i=>Object(i)===i,fromHexString(i,e,o=1){let t=H.fromHexString(i);e.r=(t>>16&255)/255*o,e.g=(t>>8&255)/255*o,e.b=(t&255)/255*o},toHexString({r:i,g:e,b:o},t=1){t=255/t;let n=i*t<<16^e*t<<8^o*t<<0;return H.toHexString(n)}},Qe=[Xe,H,Ke,Ze];function qe(i){return Qe.find(e=>e.match(i))}l(qe,"getColorFormat");var le=class le extends L{constructor(e,o,t,n){super(e,o,t,"color"),this.$input=document.createElement("input"),this.$input.setAttribute("type","color"),this.$input.setAttribute("tabindex",-1),this.$input.setAttribute("aria-labelledby",this.$name.id),this.$text=document.createElement("input"),this.$text.setAttribute("type","text"),this.$text.setAttribute("spellcheck","false"),this.$text.setAttribute("aria-labelledby",this.$name.id),this.$display=document.createElement("div"),this.$display.classList.add("display"),this.$display.appendChild(this.$input),this.$widget.appendChild(this.$display),this.$widget.appendChild(this.$text),this._format=qe(this.initialValue),this._rgbScale=n,this._initialValueHexString=this.save(),this._textFocused=!1,this.$input.addEventListener("input",()=>{this._setValueFromHexString(this.$input.value)}),this.$input.addEventListener("blur",()=>{this._callOnFinishChange()}),this.$text.addEventListener("input",()=>{let a=ie(this.$text.value);a&&this._setValueFromHexString(a)}),this.$text.addEventListener("focus",()=>{this._textFocused=!0,this.$text.select()}),this.$text.addEventListener("blur",()=>{this._textFocused=!1,this.updateDisplay(),this._callOnFinishChange()}),this.$disable=this.$text,this.updateDisplay()}reset(){return this._setValueFromHexString(this._initialValueHexString),this}_setValueFromHexString(e){if(this._format.isPrimitive){let o=this._format.fromHexString(e);this.setValue(o)}else this._format.fromHexString(e,this.getValue(),this._rgbScale),this._callOnChange(),this.updateDisplay()}save(){return this._format.toHexString(this.getValue(),this._rgbScale)}load(e){return this._setValueFromHexString(e),this._callOnFinishChange(),this}updateDisplay(){return this.$input.value=this._format.toHexString(this.getValue(),this._rgbScale),this._textFocused||(this.$text.value=this.$input.value.substring(1)),this.$display.style.backgroundColor=this.$input.value,this}};l(le,"ColorController");var oe=le,de=class de extends L{constructor(e,o,t){super(e,o,t,"function"),this.$button=document.createElement("button"),this.$button.appendChild(this.$name),this.$widget.appendChild(this.$button),this.$button.addEventListener("click",n=>{n.preventDefault(),this.getValue().call(this.object),this._callOnChange()}),this.$button.addEventListener("touchstart",()=>{},{passive:!0}),this.$disable=this.$button}};l(de,"FunctionController");var U=de,ce=class ce extends L{constructor(e,o,t,n,a,r){super(e,o,t,"number"),this._initInput(),this.min(n),this.max(a);let d=r!==void 0;this.step(d?r:this._getImplicitStep(),d),this.updateDisplay()}decimals(e){return this._decimals=e,this.updateDisplay(),this}min(e){return this._min=e,this._onUpdateMinMax(),this}max(e){return this._max=e,this._onUpdateMinMax(),this}step(e,o=!0){return this._step=e,this._stepExplicit=o,this}updateDisplay(){let e=this.getValue();if(this._hasSlider){let o=(e-this._min)/(this._max-this._min);o=Math.max(0,Math.min(o,1)),this.$fill.style.width=o*100+"%"}return this._inputFocused||(this.$input.value=this._decimals===void 0?e:e.toFixed(this._decimals)),this}_initInput(){this.$input=document.createElement("input"),this.$input.setAttribute("type","text"),this.$input.setAttribute("aria-labelledby",this.$name.id),window.matchMedia("(pointer: coarse)").matches&&(this.$input.setAttribute("type","number"),this.$input.setAttribute("step","any")),this.$widget.appendChild(this.$input),this.$disable=this.$input;let o=l(()=>{let v=parseFloat(this.$input.value);isNaN(v)||(this._stepExplicit&&(v=this._snap(v)),this.setValue(this._clamp(v)))},"onInput"),t=l(v=>{let k=parseFloat(this.$input.value);isNaN(k)||(this._snapClampSetValue(k+v),this.$input.value=this.getValue())},"increment"),n=l(v=>{v.key==="Enter"&&this.$input.blur(),v.code==="ArrowUp"&&(v.preventDefault(),t(this._step*this._arrowKeyMultiplier(v))),v.code==="ArrowDown"&&(v.preventDefault(),t(this._step*this._arrowKeyMultiplier(v)*-1))},"onKeyDown"),a=l(v=>{this._inputFocused&&(v.preventDefault(),t(this._step*this._normalizeMouseWheel(v)))},"onWheel"),r=!1,d,c,p,h,s,f=5,g=l(v=>{d=v.clientX,c=p=v.clientY,r=!0,h=this.getValue(),s=0,window.addEventListener("mousemove",u),window.addEventListener("mouseup",b)},"onMouseDown"),u=l(v=>{if(r){let k=v.clientX-d,O=v.clientY-c;Math.abs(O)>f?(v.preventDefault(),this.$input.blur(),r=!1,this._setDraggingStyle(!0,"vertical")):Math.abs(k)>f&&b()}if(!r){let k=v.clientY-p;s-=k*this._step*this._arrowKeyMultiplier(v),h+s>this._max?s=this._max-h:h+s<this._min&&(s=this._min-h),this._snapClampSetValue(h+s)}p=v.clientY},"onMouseMove"),b=l(()=>{this._setDraggingStyle(!1,"vertical"),this._callOnFinishChange(),window.removeEventListener("mousemove",u),window.removeEventListener("mouseup",b)},"onMouseUp"),x=l(()=>{this._inputFocused=!0},"onFocus"),m=l(()=>{this._inputFocused=!1,this.updateDisplay(),this._callOnFinishChange()},"onBlur");this.$input.addEventListener("input",o),this.$input.addEventListener("keydown",n),this.$input.addEventListener("wheel",a,{passive:!1}),this.$input.addEventListener("mousedown",g),this.$input.addEventListener("focus",x),this.$input.addEventListener("blur",m)}_initSlider(){this._hasSlider=!0,this.$slider=document.createElement("div"),this.$slider.classList.add("slider"),this.$fill=document.createElement("div"),this.$fill.classList.add("fill"),this.$slider.appendChild(this.$fill),this.$widget.insertBefore(this.$slider,this.$input),this.domElement.classList.add("hasSlider");let e=l((m,v,k,O,R)=>(m-v)/(k-v)*(R-O)+O,"map"),o=l(m=>{let v=this.$slider.getBoundingClientRect(),k=e(m,v.left,v.right,this._min,this._max);this._snapClampSetValue(k)},"setValueFromX"),t=l(m=>{this._setDraggingStyle(!0),o(m.clientX),window.addEventListener("mousemove",n),window.addEventListener("mouseup",a)},"mouseDown"),n=l(m=>{o(m.clientX)},"mouseMove"),a=l(()=>{this._callOnFinishChange(),this._setDraggingStyle(!1),window.removeEventListener("mousemove",n),window.removeEventListener("mouseup",a)},"mouseUp"),r=!1,d,c,p=l(m=>{m.preventDefault(),this._setDraggingStyle(!0),o(m.touches[0].clientX),r=!1},"beginTouchDrag"),h=l(m=>{m.touches.length>1||(this._hasScrollBar?(d=m.touches[0].clientX,c=m.touches[0].clientY,r=!0):p(m),window.addEventListener("touchmove",s,{passive:!1}),window.addEventListener("touchend",f))},"onTouchStart"),s=l(m=>{if(r){let v=m.touches[0].clientX-d,k=m.touches[0].clientY-c;Math.abs(v)>Math.abs(k)?p(m):(window.removeEventListener("touchmove",s),window.removeEventListener("touchend",f))}else m.preventDefault(),o(m.touches[0].clientX)},"onTouchMove"),f=l(()=>{this._callOnFinishChange(),this._setDraggingStyle(!1),window.removeEventListener("touchmove",s),window.removeEventListener("touchend",f)},"onTouchEnd"),g=this._callOnFinishChange.bind(this),u=400,b,x=l(m=>{if(Math.abs(m.deltaX)<Math.abs(m.deltaY)&&this._hasScrollBar)return;m.preventDefault();let k=this._normalizeMouseWheel(m)*this._step;this._snapClampSetValue(this.getValue()+k),this.$input.value=this.getValue(),clearTimeout(b),b=setTimeout(g,u)},"onWheel");this.$slider.addEventListener("mousedown",t),this.$slider.addEventListener("touchstart",h,{passive:!1}),this.$slider.addEventListener("wheel",x,{passive:!1})}_setDraggingStyle(e,o="horizontal"){this.$slider&&this.$slider.classList.toggle("active",e),document.body.classList.toggle("lil-gui-dragging",e),document.body.classList.toggle("lil-gui-".concat(o),e)}_getImplicitStep(){return this._hasMin&&this._hasMax?(this._max-this._min)/1e3:.1}_onUpdateMinMax(){!this._hasSlider&&this._hasMin&&this._hasMax&&(this._stepExplicit||this.step(this._getImplicitStep(),!1),this._initSlider(),this.updateDisplay())}_normalizeMouseWheel(e){let{deltaX:o,deltaY:t}=e;return Math.floor(e.deltaY)!==e.deltaY&&e.wheelDelta&&(o=0,t=-e.wheelDelta/120,t*=this._stepExplicit?1:10),o+-t}_arrowKeyMultiplier(e){let o=this._stepExplicit?1:10;return e.shiftKey?o*=10:e.altKey&&(o/=10),o}_snap(e){let o=Math.round(e/this._step)*this._step;return parseFloat(o.toPrecision(15))}_clamp(e){return e<this._min&&(e=this._min),e>this._max&&(e=this._max),e}_snapClampSetValue(e){this.setValue(this._clamp(this._snap(e)))}get _hasScrollBar(){let e=this.parent.root.$children;return e.scrollHeight>e.clientHeight}get _hasMin(){return this._min!==void 0}get _hasMax(){return this._max!==void 0}};l(ce,"NumberController");var ne=ce,he=class he extends L{constructor(e,o,t,n){super(e,o,t,"option"),this.$select=document.createElement("select"),this.$select.setAttribute("aria-labelledby",this.$name.id),this.$display=document.createElement("div"),this.$display.classList.add("display"),this.$select.addEventListener("change",()=>{this.setValue(this._values[this.$select.selectedIndex]),this._callOnFinishChange()}),this.$select.addEventListener("focus",()=>{this.$display.classList.add("focus")}),this.$select.addEventListener("blur",()=>{this.$display.classList.remove("focus")}),this.$widget.appendChild(this.$select),this.$widget.appendChild(this.$display),this.$disable=this.$select,this.options(n)}options(e){return this._values=Array.isArray(e)?e:Object.values(e),this._names=Array.isArray(e)?e:Object.keys(e),this.$select.replaceChildren(),this._names.forEach(o=>{let t=document.createElement("option");t.textContent=o,this.$select.appendChild(t)}),this.updateDisplay(),this}updateDisplay(){let e=this.getValue(),o=this._values.indexOf(e);return this.$select.selectedIndex=o,this.$display.textContent=o===-1?e:this._names[o],this}};l(he,"OptionController");var re=he,ue=class ue extends L{constructor(e,o,t){super(e,o,t,"string"),this.$input=document.createElement("input"),this.$input.setAttribute("type","text"),this.$input.setAttribute("spellcheck","false"),this.$input.setAttribute("aria-labelledby",this.$name.id),this.$input.addEventListener("input",()=>{this.setValue(this.$input.value)}),this.$input.addEventListener("keydown",n=>{n.code==="Enter"&&this.$input.blur()}),this.$input.addEventListener("blur",()=>{this._callOnFinishChange()}),this.$widget.appendChild(this.$input),this.$disable=this.$input,this.updateDisplay()}updateDisplay(){return this.$input.value=this.getValue(),this}};l(ue,"StringController");var se=ue,Ve='.lil-gui {\n font-family: var(--font-family);\n font-size: var(--font-size);\n line-height: 1;\n font-weight: normal;\n font-style: normal;\n text-align: left;\n color: var(--text-color);\n user-select: none;\n -webkit-user-select: none;\n touch-action: manipulation;\n --background-color: #1f1f1f;\n --text-color: #ebebeb;\n --title-background-color: #111111;\n --title-text-color: #ebebeb;\n --widget-color: #424242;\n --hover-color: #4f4f4f;\n --focus-color: #595959;\n --number-color: #2cc9ff;\n --string-color: #a2db3c;\n --font-size: 11px;\n --input-font-size: 11px;\n --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;\n --font-family-mono: Menlo, Monaco, Consolas, "Droid Sans Mono", monospace;\n --padding: 4px;\n --spacing: 4px;\n --widget-height: 20px;\n --title-height: calc(var(--widget-height) + var(--spacing) * 1.25);\n --name-width: 45%;\n --slider-knob-width: 2px;\n --slider-input-width: 27%;\n --color-input-width: 27%;\n --slider-input-min-width: 45px;\n --color-input-min-width: 45px;\n --folder-indent: 7px;\n --widget-padding: 0 0 0 3px;\n --widget-border-radius: 2px;\n --checkbox-size: calc(0.75 * var(--widget-height));\n --scrollbar-width: 5px;\n}\n.lil-gui, .lil-gui * {\n box-sizing: border-box;\n margin: 0;\n padding: 0;\n}\n.lil-gui.root {\n width: var(--width, 245px);\n display: flex;\n flex-direction: column;\n background: var(--background-color);\n}\n.lil-gui.root > .title {\n background: var(--title-background-color);\n color: var(--title-text-color);\n}\n.lil-gui.root > .children {\n overflow-x: hidden;\n overflow-y: auto;\n}\n.lil-gui.root > .children::-webkit-scrollbar {\n width: var(--scrollbar-width);\n height: var(--scrollbar-width);\n background: var(--background-color);\n}\n.lil-gui.root > .children::-webkit-scrollbar-thumb {\n border-radius: var(--scrollbar-width);\n background: var(--focus-color);\n}\n@media (pointer: coarse) {\n .lil-gui.allow-touch-styles, .lil-gui.allow-touch-styles .lil-gui {\n --widget-height: 28px;\n --padding: 6px;\n --spacing: 6px;\n --font-size: 13px;\n --input-font-size: 16px;\n --folder-indent: 10px;\n --scrollbar-width: 7px;\n --slider-input-min-width: 50px;\n --color-input-min-width: 65px;\n }\n}\n.lil-gui.force-touch-styles, .lil-gui.force-touch-styles .lil-gui {\n --widget-height: 28px;\n --padding: 6px;\n --spacing: 6px;\n --font-size: 13px;\n --input-font-size: 16px;\n --folder-indent: 10px;\n --scrollbar-width: 7px;\n --slider-input-min-width: 50px;\n --color-input-min-width: 65px;\n}\n.lil-gui.autoPlace {\n max-height: 100%;\n position: fixed;\n top: 0;\n right: 15px;\n z-index: 1001;\n}\n\n.lil-gui .controller {\n display: flex;\n align-items: center;\n padding: 0 var(--padding);\n margin: var(--spacing) 0;\n}\n.lil-gui .controller.disabled {\n opacity: 0.5;\n}\n.lil-gui .controller.disabled, .lil-gui .controller.disabled * {\n pointer-events: none !important;\n}\n.lil-gui .controller > .name {\n min-width: var(--name-width);\n flex-shrink: 0;\n white-space: pre;\n padding-right: var(--spacing);\n line-height: var(--widget-height);\n}\n.lil-gui .controller .widget {\n position: relative;\n display: flex;\n align-items: center;\n width: 100%;\n min-height: var(--widget-height);\n}\n.lil-gui .controller.string input {\n color: var(--string-color);\n}\n.lil-gui .controller.boolean {\n cursor: pointer;\n}\n.lil-gui .controller.color .display {\n width: 100%;\n height: var(--widget-height);\n border-radius: var(--widget-border-radius);\n position: relative;\n}\n@media (hover: hover) {\n .lil-gui .controller.color .display:hover:before {\n content: " ";\n display: block;\n position: absolute;\n border-radius: var(--widget-border-radius);\n border: 1px solid #fff9;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n }\n}\n.lil-gui .controller.color input[type=color] {\n opacity: 0;\n width: 100%;\n height: 100%;\n cursor: pointer;\n}\n.lil-gui .controller.color input[type=text] {\n margin-left: var(--spacing);\n font-family: var(--font-family-mono);\n min-width: var(--color-input-min-width);\n width: var(--color-input-width);\n flex-shrink: 0;\n}\n.lil-gui .controller.option select {\n opacity: 0;\n position: absolute;\n width: 100%;\n max-width: 100%;\n}\n.lil-gui .controller.option .display {\n position: relative;\n pointer-events: none;\n border-radius: var(--widget-border-radius);\n height: var(--widget-height);\n line-height: var(--widget-height);\n max-width: 100%;\n overflow: hidden;\n word-break: break-all;\n padding-left: 0.55em;\n padding-right: 1.75em;\n background: var(--widget-color);\n}\n@media (hover: hover) {\n .lil-gui .controller.option .display.focus {\n background: var(--focus-color);\n }\n}\n.lil-gui .controller.option .display.active {\n background: var(--focus-color);\n}\n.lil-gui .controller.option .display:after {\n font-family: "lil-gui";\n content: "\u2195";\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n padding-right: 0.375em;\n}\n.lil-gui .controller.option .widget,\n.lil-gui .controller.option select {\n cursor: pointer;\n}\n@media (hover: hover) {\n .lil-gui .controller.option .widget:hover .display {\n background: var(--hover-color);\n }\n}\n.lil-gui .controller.number input {\n color: var(--number-color);\n}\n.lil-gui .controller.number.hasSlider input {\n margin-left: var(--spacing);\n width: var(--slider-input-width);\n min-width: var(--slider-input-min-width);\n flex-shrink: 0;\n}\n.lil-gui .controller.number .slider {\n width: 100%;\n height: var(--widget-height);\n background: var(--widget-color);\n border-radius: var(--widget-border-radius);\n padding-right: var(--slider-knob-width);\n overflow: hidden;\n cursor: ew-resize;\n touch-action: pan-y;\n}\n@media (hover: hover) {\n .lil-gui .controller.number .slider:hover {\n background: var(--hover-color);\n }\n}\n.lil-gui .controller.number .slider.active {\n background: var(--focus-color);\n}\n.lil-gui .controller.number .slider.active .fill {\n opacity: 0.95;\n}\n.lil-gui .controller.number .fill {\n height: 100%;\n border-right: var(--slider-knob-width) solid var(--number-color);\n box-sizing: content-box;\n}\n\n.lil-gui-dragging .lil-gui {\n --hover-color: var(--widget-color);\n}\n.lil-gui-dragging * {\n cursor: ew-resize !important;\n}\n\n.lil-gui-dragging.lil-gui-vertical * {\n cursor: ns-resize !important;\n}\n\n.lil-gui .title {\n height: var(--title-height);\n line-height: calc(var(--title-height) - 4px);\n font-weight: 600;\n padding: 0 var(--padding);\n -webkit-tap-highlight-color: transparent;\n cursor: pointer;\n outline: none;\n text-decoration-skip: objects;\n}\n.lil-gui .title:before {\n font-family: "lil-gui";\n content: "\u25BE";\n padding-right: 2px;\n display: inline-block;\n}\n.lil-gui .title:active {\n background: var(--title-background-color);\n opacity: 0.75;\n}\n@media (hover: hover) {\n body:not(.lil-gui-dragging) .lil-gui .title:hover {\n background: var(--title-background-color);\n opacity: 0.85;\n }\n .lil-gui .title:focus {\n text-decoration: underline var(--focus-color);\n }\n}\n.lil-gui.root > .title:focus {\n text-decoration: none !important;\n}\n.lil-gui.closed > .title:before {\n content: "\u25B8";\n}\n.lil-gui.closed > .children {\n transform: translateY(-7px);\n opacity: 0;\n}\n.lil-gui.closed:not(.transition) > .children {\n display: none;\n}\n.lil-gui.transition > .children {\n transition-duration: 300ms;\n transition-property: height, opacity, transform;\n transition-timing-function: cubic-bezier(0.2, 0.6, 0.35, 1);\n overflow: hidden;\n pointer-events: none;\n}\n.lil-gui .children:empty:before {\n content: "Empty";\n padding: 0 var(--padding);\n margin: var(--spacing) 0;\n display: block;\n height: var(--widget-height);\n font-style: italic;\n line-height: var(--widget-height);\n opacity: 0.5;\n}\n.lil-gui.root > .children > .lil-gui > .title {\n border: 0 solid var(--widget-color);\n border-width: 1px 0;\n transition: border-color 300ms;\n}\n.lil-gui.root > .children > .lil-gui.closed > .title {\n border-bottom-color: transparent;\n}\n.lil-gui + .controller {\n border-top: 1px solid var(--widget-color);\n margin-top: 0;\n padding-top: var(--spacing);\n}\n.lil-gui .lil-gui .lil-gui > .title {\n border: none;\n}\n.lil-gui .lil-gui .lil-gui > .children {\n border: none;\n margin-left: var(--folder-indent);\n border-left: 2px solid var(--widget-color);\n}\n.lil-gui .lil-gui .controller {\n border: none;\n}\n\n.lil-gui label, .lil-gui input, .lil-gui button {\n -webkit-tap-highlight-color: transparent;\n}\n.lil-gui input {\n border: 0;\n outline: none;\n font-family: var(--font-family);\n font-size: var(--input-font-size);\n border-radius: var(--widget-border-radius);\n height: var(--widget-height);\n background: var(--widget-color);\n color: var(--text-color);\n width: 100%;\n}\n@media (hover: hover) {\n .lil-gui input:hover {\n background: var(--hover-color);\n }\n .lil-gui input:active {\n background: var(--focus-color);\n }\n}\n.lil-gui input:disabled {\n opacity: 1;\n}\n.lil-gui input[type=text],\n.lil-gui input[type=number] {\n padding: var(--widget-padding);\n -moz-appearance: textfield;\n}\n.lil-gui input[type=text]:focus,\n.lil-gui input[type=number]:focus {\n background: var(--focus-color);\n}\n.lil-gui input[type=checkbox] {\n appearance: none;\n width: var(--checkbox-size);\n height: var(--checkbox-size);\n border-radius: var(--widget-border-radius);\n text-align: center;\n cursor: pointer;\n}\n.lil-gui input[type=checkbox]:checked:before {\n font-family: "lil-gui";\n content: "\u2713";\n font-size: var(--checkbox-size);\n line-height: var(--checkbox-size);\n}\n@media (hover: hover) {\n .lil-gui input[type=checkbox]:focus {\n box-shadow: inset 0 0 0 1px var(--focus-color);\n }\n}\n.lil-gui button {\n outline: none;\n cursor: pointer;\n font-family: var(--font-family);\n font-size: var(--font-size);\n color: var(--text-color);\n width: 100%;\n height: var(--widget-height);\n text-transform: none;\n background: var(--widget-color);\n border-radius: var(--widget-border-radius);\n border: none;\n}\n@media (hover: hover) {\n .lil-gui button:hover {\n background: var(--hover-color);\n }\n .lil-gui button:focus {\n box-shadow: inset 0 0 0 1px var(--focus-color);\n }\n}\n.lil-gui button:active {\n background: var(--focus-color);\n}\n\n@font-face {\n font-family: "lil-gui";\n src: url("data:application/font-woff;charset=utf-8;base64,d09GRgABAAAAAAUsAAsAAAAACJwAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABHU1VCAAABCAAAAH4AAADAImwmYE9TLzIAAAGIAAAAPwAAAGBKqH5SY21hcAAAAcgAAAD0AAACrukyyJBnbHlmAAACvAAAAF8AAACEIZpWH2hlYWQAAAMcAAAAJwAAADZfcj2zaGhlYQAAA0QAAAAYAAAAJAC5AHhobXR4AAADXAAAABAAAABMAZAAAGxvY2EAAANsAAAAFAAAACgCEgIybWF4cAAAA4AAAAAeAAAAIAEfABJuYW1lAAADoAAAASIAAAIK9SUU/XBvc3QAAATEAAAAZgAAAJCTcMc2eJxVjbEOgjAURU+hFRBK1dGRL+ALnAiToyMLEzFpnPz/eAshwSa97517c/MwwJmeB9kwPl+0cf5+uGPZXsqPu4nvZabcSZldZ6kfyWnomFY/eScKqZNWupKJO6kXN3K9uCVoL7iInPr1X5baXs3tjuMqCtzEuagm/AAlzQgPAAB4nGNgYRBlnMDAysDAYM/gBiT5oLQBAwuDJAMDEwMrMwNWEJDmmsJwgCFeXZghBcjlZMgFCzOiKOIFAB71Bb8AeJy1kjFuwkAQRZ+DwRAwBtNQRUGKQ8OdKCAWUhAgKLhIuAsVSpWz5Bbkj3dEgYiUIszqWdpZe+Z7/wB1oCYmIoboiwiLT2WjKl/jscrHfGg/pKdMkyklC5Zs2LEfHYpjcRoPzme9MWWmk3dWbK9ObkWkikOetJ554fWyoEsmdSlt+uR0pCJR34b6t/TVg1SY3sYvdf8vuiKrpyaDXDISiegp17p7579Gp3p++y7HPAiY9pmTibljrr85qSidtlg4+l25GLCaS8e6rRxNBmsnERunKbaOObRz7N72ju5vdAjYpBXHgJylOAVsMseDAPEP8LYoUHicY2BiAAEfhiAGJgZWBgZ7RnFRdnVJELCQlBSRlATJMoLV2DK4glSYs6ubq5vbKrJLSbGrgEmovDuDJVhe3VzcXFwNLCOILB/C4IuQ1xTn5FPilBTj5FPmBAB4WwoqAHicY2BkYGAA4sk1sR/j+W2+MnAzpDBgAyEMQUCSg4EJxAEAwUgFHgB4nGNgZGBgSGFggJMhDIwMqEAYAByHATJ4nGNgAIIUNEwmAABl3AGReJxjYAACIQYlBiMGJ3wQAEcQBEV4nGNgZGBgEGZgY2BiAAEQyQWEDAz/wXwGAAsPATIAAHicXdBNSsNAHAXwl35iA0UQXYnMShfS9GPZA7T7LgIu03SSpkwzYTIt1BN4Ak/gKTyAeCxfw39jZkjymzcvAwmAW/wgwHUEGDb36+jQQ3GXGot79L24jxCP4gHzF/EIr4jEIe7wxhOC3g2TMYy4Q7+Lu/SHuEd/ivt4wJd4wPxbPEKMX3GI5+DJFGaSn4qNzk8mcbKSR6xdXdhSzaOZJGtdapd4vVPbi6rP+cL7TGXOHtXKll4bY1Xl7EGnPtp7Xy2n00zyKLVHfkHBa4IcJ2oD3cgggWvt/V/FbDrUlEUJhTn/0azVWbNTNr0Ens8de1tceK9xZmfB1CPjOmPH4kitmvOubcNpmVTN3oFJyjzCvnmrwhJTzqzVj9jiSX911FjeAAB4nG3HMRKCMBBA0f0giiKi4DU8k0V2GWbIZDOh4PoWWvq6J5V8If9NVNQcaDhyouXMhY4rPTcG7jwYmXhKq8Wz+p762aNaeYXom2n3m2dLTVgsrCgFJ7OTmIkYbwIbC6vIB7WmFfAAAA==") format("woff");\n}';function et(i){let e=document.createElement("style");e.innerHTML=i;let o=document.querySelector("head link[rel=stylesheet], head style");o?document.head.insertBefore(e,o):document.head.appendChild(e)}l(et,"_injectStyles");var Fe=!1,X=class X{constructor({parent:e,autoPlace:o=e===void 0,container:t,width:n,title:a="Controls",closeFolders:r=!1,injectStyles:d=!0,touchStyles:c=!0}={}){if(this.parent=e,this.root=e?e.root:this,this.children=[],this.controllers=[],this.folders=[],this._closed=!1,this._hidden=!1,this.domElement=document.createElement("div"),this.domElement.classList.add("lil-gui"),this.$title=document.createElement("div"),this.$title.classList.add("title"),this.$title.setAttribute("role","button"),this.$title.setAttribute("aria-expanded",!0),this.$title.setAttribute("tabindex",0),this.$title.addEventListener("click",()=>this.openAnimated(this._closed)),this.$title.addEventListener("keydown",p=>{(p.code==="Enter"||p.code==="Space")&&(p.preventDefault(),this.$title.click())}),this.$title.addEventListener("touchstart",()=>{},{passive:!0}),this.$children=document.createElement("div"),this.$children.classList.add("children"),this.domElement.appendChild(this.$title),this.domElement.appendChild(this.$children),this.title(a),this.parent){this.parent.children.push(this),this.parent.folders.push(this),this.parent.$children.appendChild(this.domElement);return}this.domElement.classList.add("root"),c&&this.domElement.classList.add("allow-touch-styles"),!Fe&&d&&(et(Ve),Fe=!0),t?t.appendChild(this.domElement):o&&(this.domElement.classList.add("autoPlace"),document.body.appendChild(this.domElement)),n&&this.domElement.style.setProperty("--width",n+"px"),this._closeFolders=r}add(e,o,t,n,a){if(Object(t)===t)return new re(this,e,o,t);let r=e[o];switch(typeof r){case"number":return new ne(this,e,o,t,n,a);case"boolean":return new te(this,e,o);case"string":return new se(this,e,o);case"function":return new U(this,e,o)}console.error("gui.add failed\n property:",o,"\n object:",e,"\n value:",r)}addColor(e,o,t=1){return new oe(this,e,o,t)}addFolder(e){let o=new X({parent:this,title:e});return this.root._closeFolders&&o.close(),o}load(e,o=!0){return e.controllers&&this.controllers.forEach(t=>{t instanceof U||t._name in e.controllers&&t.load(e.controllers[t._name])}),o&&e.folders&&this.folders.forEach(t=>{t._title in e.folders&&t.load(e.folders[t._title])}),this}save(e=!0){let o={controllers:{},folders:{}};return this.controllers.forEach(t=>{if(!(t instanceof U)){if(t._name in o.controllers)throw new Error('Cannot save GUI with duplicate property "'.concat(t._name,'"'));o.controllers[t._name]=t.save()}}),e&&this.folders.forEach(t=>{if(t._title in o.folders)throw new Error('Cannot save GUI with duplicate folder "'.concat(t._title,'"'));o.folders[t._title]=t.save()}),o}open(e=!0){return this._setClosed(!e),this.$title.setAttribute("aria-expanded",!this._closed),this.domElement.classList.toggle("closed",this._closed),this}close(){return this.open(!1)}_setClosed(e){this._closed!==e&&(this._closed=e,this._callOnOpenClose(this))}show(e=!0){return this._hidden=!e,this.domElement.style.display=this._hidden?"none":"",this}hide(){return this.show(!1)}openAnimated(e=!0){return this._setClosed(!e),this.$title.setAttribute("aria-expanded",!this._closed),requestAnimationFrame(()=>{let o=this.$children.clientHeight;this.$children.style.height=o+"px",this.domElement.classList.add("transition");let t=l(a=>{a.target===this.$children&&(this.$children.style.height="",this.domElement.classList.remove("transition"),this.$children.removeEventListener("transitionend",t))},"onTransitionEnd");this.$children.addEventListener("transitionend",t);let n=e?this.$children.scrollHeight:0;this.domElement.classList.toggle("closed",!e),requestAnimationFrame(()=>{this.$children.style.height=n+"px"})}),this}title(e){return this._title=e,this.$title.textContent=e,this}reset(e=!0){return(e?this.controllersRecursive():this.controllers).forEach(t=>t.reset()),this}onChange(e){return this._onChange=e,this}_callOnChange(e){this.parent&&this.parent._callOnChange(e),this._onChange!==void 0&&this._onChange.call(this,{object:e.object,property:e.property,value:e.getValue(),controller:e})}onFinishChange(e){return this._onFinishChange=e,this}_callOnFinishChange(e){this.parent&&this.parent._callOnFinishChange(e),this._onFinishChange!==void 0&&this._onFinishChange.call(this,{object:e.object,property:e.property,value:e.getValue(),controller:e})}onOpenClose(e){return this._onOpenClose=e,this}_callOnOpenClose(e){this.parent&&this.parent._callOnOpenClose(e),this._onOpenClose!==void 0&&this._onOpenClose.call(this,e)}destroy(){this.parent&&(this.parent.children.splice(this.parent.children.indexOf(this),1),this.parent.folders.splice(this.parent.folders.indexOf(this),1)),this.domElement.parentElement&&this.domElement.parentElement.removeChild(this.domElement),Array.from(this.children).forEach(e=>e.destroy())}controllersRecursive(){let e=Array.from(this.controllers);return this.folders.forEach(o=>{e=e.concat(o.controllersRecursive())}),e}foldersRecursive(){let e=Array.from(this.folders);return this.folders.forEach(o=>{e=e.concat(o.foldersRecursive())}),e}};l(X,"GUI");var z=X,K=z;y();y();var _=(()=>{let i=new Ee;return l(function(o){return i.set(o),"#".concat(i.getHexString())},"normalize")})();function Se(i){let e;for(e of i)e()}l(Se,"runAll");function pe(i,e){let o=window.location.href,t=new URL(o),n=new URLSearchParams(t.search);for(let a in i)if(i.hasOwnProperty(a)){let r="".concat(e,".").concat(a);n.set(r,i[a])}t.search=n.toString(),history.pushState({path:t.toString()},"",t.toString())}l(pe,"updateCurrentUrlParamsWithNamespace");function ge(i,e){let o=new URLSearchParams(window.location.search),t={};for(let[n,a]of o)if(n.startsWith("".concat(i,"."))){let r=n.slice(i.length+1);a==="true"||a==="false"?t[r]=a==="true":typeof(e==null?void 0:e[r])=="number"?t[r]=Number(a):t[r]=a}return{namespace:i,params:t}}l(ge,"getUrlParamsWithNamespace");var tt=["interactive"];function Z(i,e,o){var n,a;let t=o.addFolder("".concat(e.type,"-").concat(e.id));for(let r in e){if(r==="visible"&&t.add(e,r).onChange(d=>{i.updateState(e.id,{[r]:d})}),r==="color"||r==="hoverColor"){e[r]=_(e[r]),t.addColor(e,r).onChange(d=>{i.updateState(e.id,{[r]:d})});continue}if(r==="height"){t.add(e,r,0,20,1).onChange(d=>{i.updateState(e.id,{[r]:d})});continue}if(r==="texture"&&e.texture){(n=t.addFolder("Texture - side").add(e,"texture"))==null||n.onChange(c=>{i.updateState(e.id,{texture:{url:c}})});continue}if(r==="topTexture"&&e.topTexture){(a=t.addFolder("Texture - top").add(e,"topTexture"))==null||a.onChange(c=>{i.updateState(e.id,{topTexture:{url:c}})});continue}if(r==="opacity"){t.add(e,r,0,1,.1).onChange(d=>{i.updateState(e.id,{[r]:d})});continue}tt.includes(r)&&t.add(e,r).onChange(d=>{i.updateState(e.id,{[r]:d})})}return e.isInView&&(t.add(e,"isInView").listen().disable(),t.add(e,"isInViewCheck")),{cleanup(){t.destroy()}}}l(Z,"renderByProp");y();y();function it(){let i=[];function e(n,a){var c;let r=Object.values(n.getMapData())[0],d=a;if(d&&J.is(d)){let p=(c=r.getByType("enterprise-location"))==null?void 0:c.find(h=>h.spaces.some(s=>s.id===d.id));p&&(d=p)}return d}l(e,"getHighlightTarget");async function o(n,a){return a instanceof W?n.Camera.focusOn(a.locations.flatMap(r=>r.spaces),j):a instanceof D?n.Camera.focusOn(a.spaces,j):n.Camera.focusOn(a,j)}l(o,"focusOn");function t(n,a,{focus:r=!1}={}){if(!window.enableHighlightCard)return()=>{};let d=e(n,a),c=document.createElement("div");if(c.style.cssText="\n position: absolute;\n top: 20px;\n left: 20px;\n background-color: rgba(30, 30, 30, 0.95);\n box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);\n border-radius: 12px;\n padding: 24px;\n max-width: 320px;\n z-index: 1000;\n font-family: 'Arial', sans-serif;\n transition: all 0.3s ease;\n color: #e0e0e0;\n ","name"in d){let h=document.createElement("h3");h.textContent=d.name,h.style.cssText="\n margin: 0 0 16px;\n font-size: 22px;\n font-weight: 600;\n color: #ffffff;\n letter-spacing: -0.5px;\n ",c.appendChild(h)}if(d instanceof D){if(d.description){let h=document.createElement("p");h.textContent=d.description,h.style.cssText="\n margin: 0 0 16px;\n font-size: 14px;\n color: #b0b0b0;\n line-height: 1.5;\n ",c.appendChild(h)}if(d.tags&&d.tags.length>0){let h=document.createElement("div");h.style.cssText="\n display: flex;\n flex-wrap: nowrap;\n gap: 8px;\n margin-bottom: 16px;\n overflow-x: hidden;\n max-height: 30px; /* Adjust this value based on your font size and padding */\n ",d.tags.forEach(s=>{let f=document.createElement("span");f.textContent=s,f.style.cssText="\n background-color: #3a3a3a;\n color: #e0e0e0;\n padding: 6px 12px;\n border-radius: 16px;\n font-size: 12px;\n font-weight: 500;\n text-transform: uppercase;\n white-space: nowrap;\n ",h.appendChild(f)}),c.appendChild(h)}}let p;if(!(a instanceof W)){let h=new K({autoPlace:!1});h.domElement.style.cssText="\n position: relative;\n overflow-y: auto;\n margin-top: 16px;\n border-top: 1px solid #444;\n padding-top: 16px;\n ";let s=n.getState(a);s&&(Z(n,{id:a.id,...s},h),c.appendChild(h.domElement)),p=h}return document.body.appendChild(c),r&&o(n,d),()=>{c.style.opacity="0",c.style.transform="translateY(-10px)",setTimeout(()=>c.remove(),300),p==null||p.destroy()}}return l(t,"highlightCard"),{highlightCard:t,highlight:(n,a,{focus:r=!0}={})=>{i.length>0&&i.forEach(c=>n.Markers.remove(c));let d=e(n,a);if(d instanceof D)r&&n.Camera.focusOn(d.spaces,j),i.push(...d.spaces.map(c=>n.Markers.add(c,'<div style="padding: 15px; background-color: #ffffff; border-radius: 8px; box-shadow: 0 4px 6px rgba(0,0,0,0.1); max-width: 250px; position: relative;">\n <h3 style="margin: 0 0 10px; color: #333; font-size: 16px; font-weight: 600;">'.concat(d.name,"</h3>\n ").concat(d.description?'<p style="margin: 0 0 10px; color: #666; font-size: 14px; font-weight: 400;">'.concat(d.description,"</p>"):"","\n ").concat(d.tags?d.tags.map(p=>'<span style="display: inline-block; padding: 3px 8px; background-color: #e0f2f1; color: #00796b; border-radius: 12px; font-size: 12px;">'.concat(p,"</span>")).join(" "):"",'\n <div style="position: absolute; bottom: -10px; left: 50%; transform: translateX(-50%); width: 0; height: 0; border-left: 10px solid transparent; border-right: 10px solid transparent; border-top: 10px solid #ffffff;"></div>\n </div>'),{rank:"always-visible",anchor:"top"})));else if(d instanceof W){r&&n.Camera.focusOn(d.locations.flatMap(h=>h.spaces),j);let c=new Map,p=new Set;d.locations.forEach(h=>{c.has(h.name)||(h.spaces.forEach(s=>{i.push(n.Markers.add(s,'<div style="padding: 12px; background-color: rgba(0, 153, 51, 0.95); border-radius: 8px; box-shadow: 0 4px 8px rgba(0,0,0,0.3); transform: translateY(-4px); transition: all 0.3s ease;">\n <span style="font-weight: 600; color: #FFFFFF; font-size: 16px; text-shadow: 1px 1px 2px rgba(0,0,0,0.2);">'.concat(h.name,"</span>\n </div>"),{rank:"always-visible"}))}),c.set(h.name,!0))}),d.locations.forEach(h=>{h.coordinates.forEach(s=>{let f="".concat(s.latitude,",").concat(s.longitude);if(!p.has(f)&&!c.has(h.name)){let g=n.Markers.add(s,'<div style="padding: 10px; background-color: rgba(51, 102, 204, 0.9); border-radius: 6px; box-shadow: 0 3px 6px rgba(0,0,0,0.2);">\n <span style="font-weight: 500; color: #FFFFFF; font-size: 16px;">'.concat(h.name,'</span>\n <br>\n <span style="color: #FFFFFF; font-size: 12px; font-weight: 400;">Node</span>\n </div>'),{rank:"always-visible"});p.add(f),i.push(g)}})})}return()=>{i.forEach(c=>n.Markers.remove(c))}}}}l(it,"createHighlightControl");var j={duration:300,easing:"ease-in-out"},Q=it();y();var E={search:"",results:void 0,options:{places:{fields:{name:!0,description:!0,link:!0,category:!0},limit:5},locations:{fields:{name:!0,tag:!0,description:!0},limit:5},categories:{fields:{name:!0},limit:5}}};function ot(i){i.add(E.options.places.fields,"name").name("Places: Name"),i.add(E.options.places.fields,"description").name("Places: Description"),i.add(E.options.places.fields,"link").name("Places: Link"),i.add(E.options.places.fields,"category").name("Places: Category"),i.add(E.options.places,"limit"),i.add(E.options.locations.fields,"name").name("Locations: Name"),i.add(E.options.locations.fields,"tag").name("Locations: Tag"),i.add(E.options.locations.fields,"description").name("Locations: Description"),i.add(E.options.places,"limit"),i.add(E.options.categories.fields,"name").name("Categories: Name")}l(ot,"createAdvancedSettings");function Le(i,e,o){var h;let t=new B,n=o.addFolder("Search");n.open();let a=n.add(E,"search").onChange(async s=>{let f=await e.Search.query(s,E.options);f&&(E.results=f,d(f,t))}),r=document.createElement("div");r.style.marginLeft="10px",(h=a.domElement.parentElement)==null||h.appendChild(r);let{renderSearch:d,close:c}=nt(i,e,r,a.$input),p=n.addFolder("Advanced");return p.close(),ot(p),document.addEventListener("keydown",s=>{(s.metaKey||s.ctrlKey)&&s.key==="k"?(s.preventDefault(),n._closed&&n.open(),a.$input.focus()):s.key==="Escape"&&(c(),t.publish("highlight",void 0))}),{pubsub:t}}l(Le,"createSearchControl");function nt(i,e,o,t){let n,a;t.addEventListener("input",async d=>{d instanceof InputEvent&&(d.inputType==="insertText"||d.inputType==="insertCompositionText")&&(clearTimeout(n),n=setTimeout(async()=>{var p;let c=await e.Search.suggest(t.value);c&&c.length>0&&r((p=c[0])==null?void 0:p.suggestion)},100))});function r(d){if(!d){t.placeholder="";return}let c=t.value;t.value=d,t.setSelectionRange(c.length,d.length)}return l(r,"renderSuggestion"),{renderSearch(d,c){var p,h;if(d.places.length===0&&((p=d.enterpriseCategories)==null?void 0:p.length)===0&&((h=d.enterpriseLocations)==null?void 0:h.length)===0){o.textContent="No results found.";return}a=rt(o,d,i,c)},close(){a.destroy()}}}l(nt,"mount");function rt(i,e,o,t){i.innerHTML="";let n=document.createElement("div");Object.assign(n.style,q.dropdownContainer);let a=document.createElement("ul");a.className="options-list",Object.assign(a.style,q.optionsList),a.style.display="block";let r=[],d=l((f,g)=>{if(g&&g.length>0){let u=document.createElement("li");u.textContent=f,Object.assign(u.style,q.sectionHeader),a.appendChild(u),g.forEach((b,x)=>{let m=document.createElement("li");m.textContent="".concat("name"in b.item?b.item.name:""," (").concat(b.type,")"),Object.assign(m.style,q.option),m.tabIndex=0,m.addEventListener("focus",()=>{p(r.indexOf(m))}),m.addEventListener("mouseover",()=>{m.style.backgroundColor="#f0f0f0"}),m.addEventListener("mouseout",()=>{m.style.backgroundColor=""}),m.addEventListener("click",()=>{}),m.setAttribute("data-type",f),m.setAttribute("data-index",x.toString()),a.appendChild(m),r.push(m)})}},"addSection");d("enterpriseLocations",e.enterpriseLocations),d("enterpriseCategories",e.enterpriseCategories),d("Places",e.places),n.appendChild(a),i.appendChild(n);let c=[],p=l(f=>{c.forEach(m=>m()),c=[],r.forEach((m,v)=>{v===f?m.style.backgroundColor="#e0e0e0":m.style.backgroundColor=""});let g=r[f],u=g.getAttribute("data-type"),b=parseInt(g.getAttribute("data-index")||"0",10);if(!u)return;let{item:x}=e[u.toLowerCase()][b];t.publish("highlight",x)},"highlightOption"),h=l(f=>{!n.contains(f.target)&&f.target!==i&&s()},"handleClickOutside");document.addEventListener("click",h);let s=l(()=>{i.innerHTML="",document.removeEventListener("click",h)},"destroy");return{destroy(){i.innerHTML="",t.publish("highlight",void 0)}}}l(rt,"createCustomDropdown");var q={dropdownContainer:{position:"absolute",color:"#202020"},optionsList:{display:"block",zIndex:"1002",position:"relative",maxHeight:"200px",overflowY:"auto",border:"1px solid #ccc",backgroundColor:"#fff",listStyleType:"none",margin:"0",padding:"0"},sectionHeader:{fontWeight:"bold",padding:"5px",backgroundColor:"#f0f0f0"},option:{padding:"5px",cursor:"pointer"}};function $e(i,e,o){o.domElement.id="interactionPanel";let t=[],{pubsub:n}=Le(i,e,o);n.on("highlight",h=>{if(h){t.forEach(f=>f()),t=[];let s=h instanceof D?h.spaces[0]:h;if(i.Camera.focusOn(h),s&&!J.is(s))return;t.push(Q.highlightCard(i,s,{focus:!0}))}else t.forEach(s=>s()),t=[]});let a=o.addFolder("Click \u{1F447}").close(),{sub:r}=st(i,a);r.on("click",h=>{t.forEach(s=>s()),t=[],h.spaces[0]&&(t=[Q.highlightCard(i,h.spaces[0])])});let d=o.addFolder("Hover \u{1F681}").close(),{sub:c}=at(i,d),p;c.on("hover",h=>{h.spaces[0]?(p==null||p(),t.length===0&&(p=Q.highlightCard(i,h.spaces[0]))):(p==null||p(),p=void 0)})}l($e,"createInteractionControls");function st(i,e){let o=new B,t={position:"",hoverColor:_(i.getHoverColor())},n=e.add(t,"position").disable(),a=[];function r(){a.forEach(c=>c()),a.length=0}l(r,"reset");let d=0;return i.on("click",c=>{var u;let{labels:p,markers:h,coordinate:s}=c;r(),o.publish("click",c),clearInterval(d),n.load(JSON.stringify([s.longitude,s.latitude]));let f=p[0]||h[0];if(f){let b=me(i,f,e);if(!b)return;a.push(b.destroy),b.labelItemFolder.openAnimated()}let g=(u=c.spaces[0])!=null?u:c.objects[0];if(g){let b={id:g.id,...i.getState(g.id),type:g.type,isInView:!1,isInViewCheck:fe(i,g.id)},{cleanup:x}=Z(i,b,e);d=setInterval(()=>{b.isInView=i.isInView(f||g)},500),a.push(x)}}),{sub:o}}l(st,"createClickControls");function at(i,e){let o=new B;i.setHoverColor("#1f3a7a");let t={position:"",hoverColor:_(i.getHoverColor()),intersected:"",type:"",id:""},n=e.add(t,"position").disable();e.add(t,"id").disable().listen(),e.add(t,"type").disable().listen(),e.addColor(t,"hoverColor").onChange(d=>{i.setHoverColor(d)});let a=[];function r(){a.forEach(d=>d()),a.length=0}return l(r,"reset"),i.on("hover",d=>{var b,x,m;let{coordinate:c,spaces:p,objects:h,markers:s,labels:f}=d;r(),o.publish("hover",d),n.load(JSON.stringify([c.longitude,c.latitude]));let g=(m=(x=(b=p[0])!=null?b:h[0])!=null?x:s[0])!=null?m:f[0];if(!g)return;let u=i.getState(g);u&&(t.type=u.type,t.id=g.id)}),{sub:o}}l(at,"createHoverControls");function fe(i,e){return l(function(){console.log("isInView",i.isInView(e))},"isInView")}l(fe,"createIsInViewHandler");function Ie(i,e,o){let t={labels:{},all(){o.Labels.all().forEach(g=>{this.labels[g.id]=g}),c()},removeAllLabels(){o.Labels.removeAll().forEach(g=>{delete this.labels[g.id]}),c()}},{addLabel:n,destroy:a}=lt(i,o);i.add(t,"all"),i.add(t,"removeAllLabels");let r=i.addFolder("Label List");i.close();let d=new Map,{rerender:c}=p();function p(){function f(b){var x;delete t.labels[b.id],(x=d.get(b.id))==null||x.destroy()}l(f,"remove");function g(b){let x=me(o,b,r,{onRemove:v=>{f(v)}});if(!x)return;let{labelItemFolder:m}=x;d.set(b.id,m)}l(g,"add");function u(){r.destroy(),r=i.addFolder("Label");for(let b in t.labels){let x=t.labels[b];g(x)}}return l(u,"rerender"),{rerender:u,add:g,remove:f}}l(p,"createLabelControls"),i.domElement.classList.add("list-items");let h;o.on("click",({labels:f,coordinate:g})=>{if(!i._closed)if(f[0]){h==null||h.close();let u=d.get(f[0].id);if(i.open(),!u)return;u==null||u.open(),u==null||u.domElement.scrollIntoView({block:"start"}),u==null||u.domElement.focus(),h=u}else n(g)});function s(f){for(let g of f)t.labels[g.id]=g;c()}return l(s,"populatelabels"),{populatelabels:s,destroy(){a()}}}l(Ie,"createLabelControls");function me(i,e,o,{onRemove:t}={}){var p,h,s,f;let n=o.addFolder("".concat((p=e.text)==null?void 0:p.substring(0,12)));n.onChange(g=>{i.updateState(e,{appearance:c.appearance,interactive:c.interactive})}),n.close();let a=i.getState(e);if((a==null?void 0:a.type)!=="label")throw new Error("error getting state for label: ".concat(e.id));let{appearance:r,interactive:d}=a;if(!r||r.margin==null||d==null)throw new Error("incomplte label state");let c={text:e.text,interactive:d,appearance:{...r,margin:r.margin||0,marker:{foregroundColor:(s=(h=r.marker)==null?void 0:h.foregroundColor)!=null&&s.active?_((f=r.marker.foregroundColor)==null?void 0:f.active):"black"},text:{foregroundColor:_(r.text.foregroundColor)}},remove(){i.Labels.remove(e),t==null||t(e),n.destroy()},isInView:fe(i,e.id)};return n.add(c.appearance,"margin",0,20).name("margin"),n.add(c,"text"),n.add(c,"interactive"),n.addColor(c.appearance.marker,"foregroundColor").name("marker foreground"),n.addColor(c.appearance.text,"foregroundColor").name("text forground"),n.add(c,"isInView"),n.add(c,"remove"),{labelItemFolder:n,destroy(){n.destroy()}}}l(me,"addLabelControlToFolder");function lt(i,e){let o=i.addFolder("Add"),t={onClick:!1,margin:0,text:"New Label!",interactive:!0,marginForegroundColor:_("skyblue"),marginBackgroundColor:_("coral"),textForegroundColor:_("slategray"),textBackgroundColor:_("white")};return o.add(t,"onClick"),o.add(t,"margin"),o.add(t,"interactive"),o.add(t,"text"),o.addColor(t,"marginForegroundColor"),o.addColor(t,"marginBackgroundColor"),o.addColor(t,"textForegroundColor"),o.addColor(t,"textBackgroundColor"),{destroy(){o.destroy()},addLabel(n){return o._closed||!t.onClick?void 0:e.Labels.add(n,t.text,{appearance:{margin:t.margin,marker:{foregroundColor:{active:t.marginForegroundColor,inactive:t.marginForegroundColor},backgroundColor:{active:t.marginBackgroundColor,inactive:t.marginBackgroundColor}},text:{foregroundColor:t.textForegroundColor,backgroundColor:t.marginBackgroundColor}},interactive:t.interactive})}}}l(lt,"createAddControl");var Oe={};y();var Te="camera-ui";function De(i,e,o){var R,Ae;let t=i.addFolder("Camera \u{1F4F7}").onOpenClose(A=>{pe({opened:!A._closed},Te)}),{params:n}=ge(Te);n.opened||t.close();let a=e.Camera.center.toJSON(),r=document.createElement("div");Object.assign(r.style,{display:"none",position:"absolute",left:"0px",top:"0px",bottom:"0px",right:"0px",backgroundColor:"aqua",pointerEvents:"none",opacity:.5}),document.body.appendChild(r);let[d,c,p,h]=(R=o==null?void 0:o.padding)!=null?R:[],s={center_lat:a.latitude,center_lon:a.longitude,zoomLevel:e.Camera.zoomLevel,pitch:e.Camera.pitch,bearing:e.Camera.bearing,minZoomLevel:e.Camera.minZoomLevel,maxZoomLevel:e.Camera.maxZoomLevel,inset_type:"pixel",inset_top:d!=null?d:0,inset_left:h!=null?h:0,inset_right:c!=null?c:0,inset_bottom:p!=null?p:0,animateOnLoad:!0,persist:()=>{pe(t.save().controllers,"camera"),navigator.clipboard.writeText(window.location.href)},visualizeInset:!!(d||c||p||h),"Focus on click":(Ae=o==null?void 0:o.focusOnClick)!=null?Ae:!0,"Focus on current floor":()=>{e.Camera.focusOn([e.currentFloor],{screenOffsets:{top:20,left:20,right:20,bottom:20}})}};function f(){s.inset_type==="portion"?Object.assign(r.style,{left:s.inset_left*u+"px",top:s.inset_top*g+"px",bottom:s.inset_bottom*g+"px",right:s.inset_right*u+"px"}):Object.assign(r.style,{left:s.inset_left+"px",top:s.inset_top+"px",bottom:s.inset_bottom+"px",right:s.inset_right+"px"})}l(f,"updateInsetVisualizer"),t.add(s,"center_lat").listen().disable(),t.add(s,"center_lon").listen().disable(),t.add(s,"zoomLevel",16,22,.5).listen().disable(),t.add(s,"pitch").listen().disable(),t.add(s,"bearing").listen().disable(),t.add(s,"minZoomLevel",5,22,.5).onChange(A=>{e.Camera.setMinZoomLevel(A)}),t.add(s,"maxZoomLevel",10,22,.5).onChange(A=>{e.Camera.setMaxZoomLevel(A)}),t.add(s,"animateOnLoad"),t.add(s,"visualizeInset").onChange(O),O(s.visualizeInset);let{innerHeight:g,innerWidth:u}=window;t.add(s,"inset_type",["pixel","portion"]).onChange(k),t.add(s,"inset_top",0,g).onChange(k),t.add(s,"inset_bottom",0,g).onChange(k),t.add(s,"inset_left",0,u).onChange(k),t.add(s,"inset_right",0,u).onChange(k);let b=ct(e);t.add(s,"Focus on click").onChange(A=>{A?e.on("click",b):e.off("click",b)}),s["Focus on click"]&&e.on("click",b),t.add(s,"persist"),t.add(s,"Focus on current floor");let x=l(A=>{t._closed||(s.center_lat=A.center.latitude,s.center_lon=A.center.longitude,s.zoomLevel=A.zoomLevel,s.bearing=A.bearing,s.pitch=A.pitch)},"onCameraChanged");e.on("camera-change",x);let{params:m}=ge("camera",s);if(Object.keys(m).length>0){let A=m;e.Camera.setScreenOffsets({top:A.inset_top,left:A.inset_left,right:A.inset_right,bottom:A.inset_bottom,type:A.inset_type});let ke={pitch:A.pitch,center:new Me(A.center_lat,A.center_lon),bearing:A.bearing,zoomLevel:A.zoomLevel};A.animateOnLoad?e.Camera.animateTo(ke):e.Camera.set(ke),t.load({controllers:A,folders:{}}),f()}let v=[()=>{e.off("camera-change",x)}];function k(){e.Camera.setScreenOffsets({top:s.inset_top,left:s.inset_left,right:s.inset_right,bottom:s.inset_bottom,type:s.inset_type}),f()}l(k,"updateInset"),(s.inset_top||s.inset_right||s.inset_bottom||s.inset_left)&&k();function O(A){A?r.style.display="block":r.style.display="none"}return l(O,"visualizeInsetUpdated"),()=>({destroy(){t.destroy(),Se(v)}})}l(De,"createCameraControls");function ct(i){return l(function(o){var r;let{spaces:t,objects:n}=o,a=(r=t[0])!=null?r:n[0];a&&i.Camera.focusOn(a)},"handler")}l(ct,"createHandler");y();function Pe(i,e,o){let t={markers:{},removeAllMarkers(){o.Markers.removeAll().forEach(g=>{delete this.markers[g.id]}),c()}},{addMarker:n,destroy:a}=ut(i,o);i.add(t,"removeAllMarkers");let r=i.addFolder("Marker List");i.close();let d=new Map,{rerender:c}=p();function p(){function f(b){var x;delete t.markers[b.id],(x=d.get(b.id))==null||x.destroy()}l(f,"remove");function g(b){let x=ht(o,b,r,{onRemove:v=>{f(v)}});if(!x)return;let{markerItemFolder:m}=x;d.set(b.id,m)}l(g,"add");function u(){r.destroy(),r=i.addFolder("marker");for(let b in t.markers){let x=t.markers[b];g(x)}}return l(u,"rerender"),{rerender:u,add:g,remove:f}}l(p,"createMarkerControls"),i.domElement.classList.add("list-items");let h;o.on("click",({markers:f,coordinate:g})=>{if(!i._closed)if(f[0]){h==null||h.close();let u=d.get(f[0].id);if(i.open(),!u)return;u==null||u.open(),u==null||u.domElement.scrollIntoView({block:"start"}),u==null||u.domElement.focus(),h=u}else n(g)});function s(f){for(let g of f)t.markers[g.id]=g;c()}return l(s,"populateMarkers"),{populateMarkers:s,destroy(){a()}}}l(Pe,"createMarkerControls");function ht(i,e,o,{onRemove:t}={}){let n=o.addFolder("".concat(e.id.toString().substring(0,8)));n.onChange(c=>{i.updateState(e,{interactive:d.interactive})}),n.close();let a=i.getState(e);if((a==null?void 0:a.type)!=="marker")throw new Error("error getting state for marker: ".concat(e.id));let{interactive:r}=a;if(r==null)throw new Error("incomplte label state");let d={interactive:r,remove(){i.Markers.remove(e),t==null||t(e),n.destroy()}};return n.add(d,"interactive"),n.add(d,"remove"),{markerItemFolder:n,destroy(){n.destroy()}}}l(ht,"addMarkerControlToFolder");function ut(i,e){let o=i.addFolder("Add"),t={onClick:!1,interactive:!0};return o.add(t,"onClick"),o.add(t,"interactive"),{destroy(){o.destroy()},addMarker(n){return o._closed||!t.onClick?void 0:e.Markers.add(n,"<div>New Marker</div>",{interactive:t.interactive})}}}l(ut,"createAddControl");y();function ze(i,e){let o=i.addFolder("Walls").close(),t={visible:!0,topColor:"#b1fa87",color:"#e8e8e8",texture:{url:""},topTexture:{url:""}};o.add(t,"visible").onChange(r=>{e.updateState("walls",{visible:r})}),o.addColor(t,"topColor").onChange(r=>{e.updateState("walls",{topColor:r})}),o.addColor(t,"color").onChange(r=>{e.updateState("walls",{color:r})}),o.addFolder("Texture - side").add(t.texture,"url").onFinishChange(r=>{e.updateState("walls",{texture:{url:r}})}),o.addFolder("Texture - top").add(t.topTexture,"url").onFinishChange(r=>{e.updateState("walls",{topTexture:{url:r}})}),e.updateState("walls",{topColor:t.topColor}),e.updateState("walls",{color:t.color})}l(ze,"createGeometryControl");y();function Ge(i,e,o){var a,r;i.close();let t={language:(r=(a=o.currentLanguage)==null?void 0:a.code)!=null?r:"en"},n=o.getByType("enterprise-venue");i.add(t,"language",n==null?void 0:n.languages.map(d=>d.code)).onChange(d=>{o.changeLanguage(d)})}l(Ge,"createMiscControl");y();function Be(i,e,o){let t=i.addFolder("Debug");t.close();let n={showPolygonLabelTextAreaMesh:!1};t.add(n,"showPolygonLabelTextAreaMesh").onChange(a=>{e.Debug.update({showPolygonLabelTextAreaMesh:a})}).name("Show Flat Label Text Area Mesh"),e.Debug.update(n)}l(Be,"createDebugControl");y();function Ue(i,e,o){let t=i.addFolder("Text3D").close(),n={all:()=>{e.Text3D.labelAll()},removeAll:()=>{e.Text3D.removeAll()}};t.add(n,"all").name("Show All"),t.add(n,"removeAll").name("Remove All")}l(Ue,"createText3DControl");y();y();y();var F,Y,$,w,I,V,He,N,ve,ee,je,ye=class ye{constructor(e=new z({autoPlace:!0})){S(this,V);S(this,N);S(this,ee);S(this,F,void 0);S(this,Y,[]);S(this,$,{});S(this,w,{});S(this,I,{});we(this,F,e),C(this,F).domElement.style.left="0"}add(e,o,t){if(C(this,w)[e])throw new Error("Control ".concat(e," already exists"));C(this,$)[e]=o,C(this,I)[e]=o.default,G(this,V,He).call(this,e,o,t),this.show()}addColor(e,o,t){if(C(this,w)[e])throw new Error("Control ".concat(e," already exists"));C(this,$)[e]=o,C(this,I)[e]=o.default,G(this,ee,je).call(this,e,o,t),this.show()}update(e,o){if(!C(this,w)[e])throw new Error("Control ".concat(e," does not exist"));C(this,w)[e].setValue(o),C(this,$)[e].onChange&&C(this,$)[e].onChange(o,e)}replace(e,o,t){if(!C(this,w)[e]){this.add(e,o,t);return}o.args&&C(this,w)[e].options(o.args),o.default&&C(this,w)[e].setValue(o.default),o.onChange&&C(this,w)[e].onChange(n=>{o.onChange(n,e)})}remove(e){if(!C(this,w)[e])throw new Error("Control ".concat(e," does not exist"));C(this,w)[e].destroy(),C(this,w)[e].parent.children.length===0&&C(this,w)[e].parent.hide(),delete C(this,w)[e],delete C(this,$)[e],delete C(this,I)[e]}show(){C(this,F).show()}hide(){C(this,F).hide()}removeAll(){for(let e in C(this,w))this.remove(e)}destroy(){C(this,F).destroy()}};F=new WeakMap,Y=new WeakMap,$=new WeakMap,w=new WeakMap,I=new WeakMap,V=new WeakSet,He=l(function(e,o,t){let a=G(this,N,ve).call(this,t).add(C(this,I),e,o.args,o.max,o.step);o.onChange&&a.onChange(r=>{o.onChange(r,e)}),o.onAdd&&o.onAdd(o.default,e),C(this,w)[e]=a},"#addControl"),N=new WeakSet,ve=l(function(e){if(!e)return C(this,F);let o=C(this,Y).find(t=>t._title===e);return o?(o.show(),o):(o=C(this,F).addFolder(e),C(this,Y).push(o),o)},"#getFolder"),ee=new WeakSet,je=l(function(e,o,t){let a=G(this,N,ve).call(this,t).addColor(C(this,I),e);o.onChange&&a.onChange(r=>{o.onChange(r,e)}),C(this,w)[e]=a},"#addColorControl"),l(ye,"GUI");var be=ye;function pt(i,e,o){var d;let t={},n=i.getByType("floor"),a=i.getByType("floor-stack");a.length>1&&(t.FloorStack={default:e.currentFloorStack.id,args:a.reduce((c,{id:p,name:h})=>({...c,[h]:p}),{}),onChange:c=>{c!==e.currentFloorStack.id&&(e.setFloorStack(c),o.replace("Floor",{default:e.currentFloor.id,args:e.currentFloorStack.floors.reduce((p,{id:h,name:s})=>({...p,[s]:h}),{})}))}}),n.length>1&&(t.Floor={default:e.currentFloor.id,args:e.currentFloorStack.floors.reduce((c,{id:p,name:h})=>({...c,[h]:p}),{}),onChange:c=>{c!==e.currentFloor.id&&e.setFloor(c)},onAdd:()=>{e.on("floor-change",c=>{c!=null&&c.floor.id&&(o.replace("FloorStack",{default:e.currentFloorStack.id}),o.replace("Floor",{default:e.currentFloor.id,args:e.currentFloorStack.floors.reduce((h,{id:s,name:f})=>({...h,[f]:s}),{})}))})}});let r=i.getByType("enterprise-venue");return r&&r.languages.length>1&&(t.Language={default:((d=i.currentLanguage)==null?void 0:d.code)||r.languages[0].code,args:r.languages.reduce((c,{code:p,name:h})=>({...c,[h]:p}),{}),onChange:c=>{i.changeLanguage(c)}}),t}l(pt,"createDefaultControls");function Ye(i,e,o=new z){let t=new be(o),n=pt(i,e,t);Object.keys(n).length||t.hide();for(let a in n)t.add(a,n[a]);return t}l(Ye,"createGUI");async function Ne(i,e,{initialfloorsInStack:o,root:t,floorsInDirections:n,showLabelsPerFloor:a=!0}){async function r(g){i.StackedMaps.changeFloorOnElevationChanges(!1),i.Outdoor.setOpacity(.15),i.StackedMaps.setFloorVisiblityMode("only-current-floor"),i.Camera.setPanMode("default"),await i.Camera.focusOn(g,{pitch:10})}l(r,"zoomToFloor");async function d(){i.Outdoor.setOpacity(.25),i.StackedMaps.changeFloorOnElevationChanges(!0),i.Camera.setPanMode("elevation"),i.StackedMaps.setFloorVisiblityMode("all-floors"),await i.Camera.focusOn(i.currentFloor,{axisAlignedPadding:{vertical:i.StackedMaps.distanceBetweenFloors},pitch:90})}l(d,"showCurrentFloorWithPadding");async function c(g){await i.Camera.animateElevation(g.elevation*i.StackedMaps.distanceBetweenFloors)}l(c,"scrollToFloor");let p=i.currentFloor;i.on("floor-change",async g=>{i.StackedMaps.expanded&&g.reason!=="stacked-maps-elevation-change"&&(i.StackedMaps.changeFloorOnElevationChanges(!1),i.StackedMaps.setFloorVisiblityMode("all-floors"),await i.Camera.focusOn(p,{axisAlignedPadding:{vertical:i.StackedMaps.distanceBetweenFloors},pitch:90,duration:500}),i.StackedMaps.changeFloorOnElevationChanges(!0),await c(i.currentFloor),await r(i.currentFloor),i.StackedMaps.setFloorVisiblityMode("only-current-floor")),p=i.currentFloor}),i.on("stacked-maps-state-change",({state:g})=>{console.log("stacked-maps-state-change",g)});let h=e.getByType("space");if(a){let g=h.reduce((u,b)=>(u.has(b.floor)||u.set(b.floor,[]),b.name&&b.name!==""&&u.get(b.floor).push(i.Labels.add(b,b.name)),u),new Map);i.on("floor-change",()=>{g.forEach((u,b)=>{u.forEach(x=>{i.updateState(x,{enabled:i.currentFloor===b})})})})}let s=Ye(e,i,t),f=o!=null?o:[];return s.add("Expand - All",{default:async()=>{i.Outdoor.setOpacity(.25),f=e.getByType("floor"),await i.Camera.animateTo({pitch:90}),await i.StackedMaps.collapse(),i.StackedMaps.clearCachedFloorSeparationDistance(),await i.StackedMaps.expand({distanceBetweenFloors:"auto"})}},"Stack Maps"),n&&s.add("Expand - Only Navigation",{default:async()=>{i.Outdoor.setOpacity(.25),f=n,await i.StackedMaps.collapse(),i.setFloor(n[0]),await i.StackedMaps.expand({includedFloors:n,distanceBetweenFloors:20})}},"Stack Maps"),s.add("Show All Floors",{default:async()=>{f=e.getByType("floor"),i.Outdoor.setOpacity(.25),i.StackedMaps.setFloorVisiblityMode("all-floors"),i.StackedMaps.changeFloorOnElevationChanges(!1),i.Camera.setPanMode("elevation"),i.Camera.focusOn(f,{pitch:90})}},"Stack Maps"),s.add("Show Current Floor with padding",{default:async()=>{await d()}},"Stack Maps"),s.add("Zoom to Current Floor",{default:async()=>{r(i.currentFloor)}},"Stack Maps"),s.add("Collapse",{default:()=>{i.Outdoor.setOpacity("initial"),i.StackedMaps.collapse()}},"Stack Maps"),s.add("Default",{default:async()=>{i.Camera.setPanMode("default")}},"Camera Pan Mode"),s.add("Elevation",{default:async()=>{i.Camera.setPanMode("elevation")}},"Camera Pan Mode"),s.add("zoom in to floor 2",{default:async()=>{i.Outdoor.setOpacity(.25),console.log(i.currentFloor.name),await i.Camera.focusOn(i.currentFloor,{axisAlignedPadding:{vertical:i.StackedMaps.distanceBetweenFloors},pitch:90}),i.StackedMaps.expanded||await i.StackedMaps.expand({distanceBetweenFloors:i.StackedMaps.distanceBetweenFloors});let g=i.StackedMaps.includedFloors[2],u=f.findIndex(b=>b.id===g.id);i.StackedMaps.changeFloorOnElevationChanges(!0),i.Camera.setPanMode("elevation"),i.StackedMaps.setFloorVisiblityMode("all-floors"),await i.Camera.animateElevation(u*i.StackedMaps.distanceBetweenFloors),i.Outdoor.setOpacity(.15),console.log("focusing on",g.name),await i.Camera.focusOn(g,{pitch:10}),i.StackedMaps.setFloorVisiblityMode("only-current-floor"),i.Camera.setPanMode("default"),i.StackedMaps.changeFloorOnElevationChanges(!1)}},"Camera Pan Mode"),s.add("All Floors",{default:async()=>{i.StackedMaps.setFloorVisiblityMode("all-floors")}},"Visibility Mode"),s.add("Only Active Floor",{default:async()=>{i.StackedMaps.setFloorVisiblityMode("only-current-floor")}},"Visibility Mode"),s.add("Up",{default:async()=>{let g=f.find(u=>u.elevation===i.currentFloor.elevation+1);g&&await c(g)}},"Floors Up/Down"),s.add("Down",{default:async()=>{let g=f.find(u=>u.elevation===i.currentFloor.elevation-1);g&&await c(g)}},"Floors Up/Down"),{zoomToFloor:r}}l(Ne,"createStackMapsControl");function Re(i,e,o){let t=i.addFolder("StackedMaps");t.close(),Ne(e,o,{root:t,showLabelsPerFloor:!1})}l(Re,"createStackmapsControl");function We(i,e,o){gt();let t=new K({title:"SDK Controls"});t.domElement.classList.add("mappedin-js-inspector"),$e(e,i,t),De(t,e,o==null?void 0:o.camera);let n=t.addFolder("Levels").close(),a=t.addFolder("Scene Controls");a.close();let r=t.addFolder("Labels");Ue(t,e,i);let d=t.addFolder("Markers");ze(t,e),Re(t,e,i);let c=t.addFolder("misc");Be(t,e,i),Ge(c,e,i);let p={level:e.currentFloor.id},{populatelabels:h}=Ie(r,i,e),{populateMarkers:s}=Pe(d,i,e),f=i.getByType("floor").reduce((u,b)=>(u[b.name]=b.id,u),{}),g=n.add(p,"level",f).onChange(u=>{e.setFloor(u),p.level=e.currentFloor.id,g.updateDisplay()});return e.on("floor-change-start",u=>{n.controllers[0].setValue(u.floor.id)}),i.getByType("space").forEach(u=>{e.updateState(u,{interactive:!0})}),i.getByType("object").forEach(u=>{e.updateState(u,{interactive:!0})}),i.getByType("object").forEach(u=>{e.updateState(u,{interactive:!0})}),e.setHoverColor("#a2b7e6"),e.Camera.setMaxZoomLevel(20),{populatelabels:h,sceneFolder:a,populateMarkers:s}}l(We,"createUi");var Je="mappedin-sdk-debug-css";function gt(){if(document.getElementById(Je))return;let i=document.createElement("style");i.id=Je,i.textContent=Oe,document.head.appendChild(i)}l(gt,"injectCss");var xe=class xe{constructor(e,o){T(this,"_enabled",!1);T(this,"mv");T(this,"api");T(this,"mapData");T(this,"scenegraphVisualizerMounted",!1);T(this,"storeStateToLocalStorageEnabled",!1);this.mv=e,this.api=o,this.mapData=this.api.getMapData()}setMapData(e){this.mapData=e}async enable(e={}){var t;if(this._enabled)return;if(this._enabled=!0,!this.mapData)throw new Error("Please set mapData before enable debug.");let{sceneFolder:o}=We(this.mapData,this.mv,e);o.onOpenClose(n=>{n===o&&!n._closed&&!this.scenegraphVisualizerMounted&&(this.scenegraphVisualizerMounted=!0,_e(this.api.core,o))}),(t=this.api.getMapDataInternal())==null||t.spaces.forEach(n=>{this.mv.updateState(n.id,{interactive:!0})})}get enabled(){return this._enabled}};l(xe,"Inspector");var Ce=xe;export{Ce as Inspector};
|
|
1
|
+
import{a as Me,c as J,f as D,g as W,h as _e}from"./chunk-LVTFVANX.js";import{m as B}from"./chunk-2EQDUMYU.js";import"./chunk-YW4KFTPW.js";import"./chunk-OL3PKM5U.js";import{S as Ee}from"./chunk-B7B5GI4U.js";import{a as y}from"./chunk-VQGFL42S.js";import{a as l,f as T,g as C,h as S,i as we,j as G}from"./chunk-J5IUISYU.js";y();y();y();y();var P=class P{constructor(e,o,t,n,a="div"){this.parent=e,this.object=o,this.property=t,this._disabled=!1,this._hidden=!1,this.initialValue=this.getValue(),this.domElement=document.createElement(a),this.domElement.classList.add("controller"),this.domElement.classList.add(n),this.$name=document.createElement("div"),this.$name.classList.add("name"),P.nextNameID=P.nextNameID||0,this.$name.id="lil-gui-name-".concat(++P.nextNameID),this.$widget=document.createElement("div"),this.$widget.classList.add("widget"),this.$disable=this.$widget,this.domElement.appendChild(this.$name),this.domElement.appendChild(this.$widget),this.domElement.addEventListener("keydown",r=>r.stopPropagation()),this.domElement.addEventListener("keyup",r=>r.stopPropagation()),this.parent.children.push(this),this.parent.controllers.push(this),this.parent.$children.appendChild(this.domElement),this._listenCallback=this._listenCallback.bind(this),this.name(t)}name(e){return this._name=e,this.$name.textContent=e,this}onChange(e){return this._onChange=e,this}_callOnChange(){this.parent._callOnChange(this),this._onChange!==void 0&&this._onChange.call(this,this.getValue()),this._changed=!0}onFinishChange(e){return this._onFinishChange=e,this}_callOnFinishChange(){this._changed&&(this.parent._callOnFinishChange(this),this._onFinishChange!==void 0&&this._onFinishChange.call(this,this.getValue())),this._changed=!1}reset(){return this.setValue(this.initialValue),this._callOnFinishChange(),this}enable(e=!0){return this.disable(!e)}disable(e=!0){return e===this._disabled?this:(this._disabled=e,this.domElement.classList.toggle("disabled",e),this.$disable.toggleAttribute("disabled",e),this)}show(e=!0){return this._hidden=!e,this.domElement.style.display=this._hidden?"none":"",this}hide(){return this.show(!1)}options(e){let o=this.parent.add(this.object,this.property,e);return o.name(this._name),this.destroy(),o}min(e){return this}max(e){return this}step(e){return this}decimals(e){return this}listen(e=!0){return this._listening=e,this._listenCallbackID!==void 0&&(cancelAnimationFrame(this._listenCallbackID),this._listenCallbackID=void 0),this._listening&&this._listenCallback(),this}_listenCallback(){this._listenCallbackID=requestAnimationFrame(this._listenCallback);let e=this.save();e!==this._listenPrevValue&&this.updateDisplay(),this._listenPrevValue=e}getValue(){return this.object[this.property]}setValue(e){return this.getValue()!==e&&(this.object[this.property]=e,this._callOnChange(),this.updateDisplay()),this}updateDisplay(){return this}load(e){return this.setValue(e),this._callOnFinishChange(),this}save(){return this.getValue()}destroy(){this.listen(!1),this.parent.children.splice(this.parent.children.indexOf(this),1),this.parent.controllers.splice(this.parent.controllers.indexOf(this),1),this.parent.$children.removeChild(this.domElement)}};l(P,"Controller");var L=P,ae=class ae extends L{constructor(e,o,t){super(e,o,t,"boolean","label"),this.$input=document.createElement("input"),this.$input.setAttribute("type","checkbox"),this.$input.setAttribute("aria-labelledby",this.$name.id),this.$widget.appendChild(this.$input),this.$input.addEventListener("change",()=>{this.setValue(this.$input.checked),this._callOnFinishChange()}),this.$disable=this.$input,this.updateDisplay()}updateDisplay(){return this.$input.checked=this.getValue(),this}};l(ae,"BooleanController");var te=ae;function ie(i){let e,o;return(e=i.match(/(#|0x)?([a-f0-9]{6})/i))?o=e[2]:(e=i.match(/rgb\(\s*(\d*)\s*,\s*(\d*)\s*,\s*(\d*)\s*\)/))?o=parseInt(e[1]).toString(16).padStart(2,0)+parseInt(e[2]).toString(16).padStart(2,0)+parseInt(e[3]).toString(16).padStart(2,0):(e=i.match(/^#?([a-f0-9])([a-f0-9])([a-f0-9])$/i))&&(o=e[1]+e[1]+e[2]+e[2]+e[3]+e[3]),o?"#"+o:!1}l(ie,"normalizeColorString");var Xe={isPrimitive:!0,match:i=>typeof i=="string",fromHexString:ie,toHexString:ie},H={isPrimitive:!0,match:i=>typeof i=="number",fromHexString:i=>parseInt(i.substring(1),16),toHexString:i=>"#"+i.toString(16).padStart(6,0)},Ke={isPrimitive:!1,match:i=>Array.isArray(i),fromHexString(i,e,o=1){let t=H.fromHexString(i);e[0]=(t>>16&255)/255*o,e[1]=(t>>8&255)/255*o,e[2]=(t&255)/255*o},toHexString([i,e,o],t=1){t=255/t;let n=i*t<<16^e*t<<8^o*t<<0;return H.toHexString(n)}},Ze={isPrimitive:!1,match:i=>Object(i)===i,fromHexString(i,e,o=1){let t=H.fromHexString(i);e.r=(t>>16&255)/255*o,e.g=(t>>8&255)/255*o,e.b=(t&255)/255*o},toHexString({r:i,g:e,b:o},t=1){t=255/t;let n=i*t<<16^e*t<<8^o*t<<0;return H.toHexString(n)}},Qe=[Xe,H,Ke,Ze];function qe(i){return Qe.find(e=>e.match(i))}l(qe,"getColorFormat");var le=class le extends L{constructor(e,o,t,n){super(e,o,t,"color"),this.$input=document.createElement("input"),this.$input.setAttribute("type","color"),this.$input.setAttribute("tabindex",-1),this.$input.setAttribute("aria-labelledby",this.$name.id),this.$text=document.createElement("input"),this.$text.setAttribute("type","text"),this.$text.setAttribute("spellcheck","false"),this.$text.setAttribute("aria-labelledby",this.$name.id),this.$display=document.createElement("div"),this.$display.classList.add("display"),this.$display.appendChild(this.$input),this.$widget.appendChild(this.$display),this.$widget.appendChild(this.$text),this._format=qe(this.initialValue),this._rgbScale=n,this._initialValueHexString=this.save(),this._textFocused=!1,this.$input.addEventListener("input",()=>{this._setValueFromHexString(this.$input.value)}),this.$input.addEventListener("blur",()=>{this._callOnFinishChange()}),this.$text.addEventListener("input",()=>{let a=ie(this.$text.value);a&&this._setValueFromHexString(a)}),this.$text.addEventListener("focus",()=>{this._textFocused=!0,this.$text.select()}),this.$text.addEventListener("blur",()=>{this._textFocused=!1,this.updateDisplay(),this._callOnFinishChange()}),this.$disable=this.$text,this.updateDisplay()}reset(){return this._setValueFromHexString(this._initialValueHexString),this}_setValueFromHexString(e){if(this._format.isPrimitive){let o=this._format.fromHexString(e);this.setValue(o)}else this._format.fromHexString(e,this.getValue(),this._rgbScale),this._callOnChange(),this.updateDisplay()}save(){return this._format.toHexString(this.getValue(),this._rgbScale)}load(e){return this._setValueFromHexString(e),this._callOnFinishChange(),this}updateDisplay(){return this.$input.value=this._format.toHexString(this.getValue(),this._rgbScale),this._textFocused||(this.$text.value=this.$input.value.substring(1)),this.$display.style.backgroundColor=this.$input.value,this}};l(le,"ColorController");var oe=le,de=class de extends L{constructor(e,o,t){super(e,o,t,"function"),this.$button=document.createElement("button"),this.$button.appendChild(this.$name),this.$widget.appendChild(this.$button),this.$button.addEventListener("click",n=>{n.preventDefault(),this.getValue().call(this.object),this._callOnChange()}),this.$button.addEventListener("touchstart",()=>{},{passive:!0}),this.$disable=this.$button}};l(de,"FunctionController");var U=de,ce=class ce extends L{constructor(e,o,t,n,a,r){super(e,o,t,"number"),this._initInput(),this.min(n),this.max(a);let d=r!==void 0;this.step(d?r:this._getImplicitStep(),d),this.updateDisplay()}decimals(e){return this._decimals=e,this.updateDisplay(),this}min(e){return this._min=e,this._onUpdateMinMax(),this}max(e){return this._max=e,this._onUpdateMinMax(),this}step(e,o=!0){return this._step=e,this._stepExplicit=o,this}updateDisplay(){let e=this.getValue();if(this._hasSlider){let o=(e-this._min)/(this._max-this._min);o=Math.max(0,Math.min(o,1)),this.$fill.style.width=o*100+"%"}return this._inputFocused||(this.$input.value=this._decimals===void 0?e:e.toFixed(this._decimals)),this}_initInput(){this.$input=document.createElement("input"),this.$input.setAttribute("type","text"),this.$input.setAttribute("aria-labelledby",this.$name.id),window.matchMedia("(pointer: coarse)").matches&&(this.$input.setAttribute("type","number"),this.$input.setAttribute("step","any")),this.$widget.appendChild(this.$input),this.$disable=this.$input;let o=l(()=>{let v=parseFloat(this.$input.value);isNaN(v)||(this._stepExplicit&&(v=this._snap(v)),this.setValue(this._clamp(v)))},"onInput"),t=l(v=>{let k=parseFloat(this.$input.value);isNaN(k)||(this._snapClampSetValue(k+v),this.$input.value=this.getValue())},"increment"),n=l(v=>{v.key==="Enter"&&this.$input.blur(),v.code==="ArrowUp"&&(v.preventDefault(),t(this._step*this._arrowKeyMultiplier(v))),v.code==="ArrowDown"&&(v.preventDefault(),t(this._step*this._arrowKeyMultiplier(v)*-1))},"onKeyDown"),a=l(v=>{this._inputFocused&&(v.preventDefault(),t(this._step*this._normalizeMouseWheel(v)))},"onWheel"),r=!1,d,c,p,h,s,f=5,g=l(v=>{d=v.clientX,c=p=v.clientY,r=!0,h=this.getValue(),s=0,window.addEventListener("mousemove",u),window.addEventListener("mouseup",b)},"onMouseDown"),u=l(v=>{if(r){let k=v.clientX-d,O=v.clientY-c;Math.abs(O)>f?(v.preventDefault(),this.$input.blur(),r=!1,this._setDraggingStyle(!0,"vertical")):Math.abs(k)>f&&b()}if(!r){let k=v.clientY-p;s-=k*this._step*this._arrowKeyMultiplier(v),h+s>this._max?s=this._max-h:h+s<this._min&&(s=this._min-h),this._snapClampSetValue(h+s)}p=v.clientY},"onMouseMove"),b=l(()=>{this._setDraggingStyle(!1,"vertical"),this._callOnFinishChange(),window.removeEventListener("mousemove",u),window.removeEventListener("mouseup",b)},"onMouseUp"),x=l(()=>{this._inputFocused=!0},"onFocus"),m=l(()=>{this._inputFocused=!1,this.updateDisplay(),this._callOnFinishChange()},"onBlur");this.$input.addEventListener("input",o),this.$input.addEventListener("keydown",n),this.$input.addEventListener("wheel",a,{passive:!1}),this.$input.addEventListener("mousedown",g),this.$input.addEventListener("focus",x),this.$input.addEventListener("blur",m)}_initSlider(){this._hasSlider=!0,this.$slider=document.createElement("div"),this.$slider.classList.add("slider"),this.$fill=document.createElement("div"),this.$fill.classList.add("fill"),this.$slider.appendChild(this.$fill),this.$widget.insertBefore(this.$slider,this.$input),this.domElement.classList.add("hasSlider");let e=l((m,v,k,O,R)=>(m-v)/(k-v)*(R-O)+O,"map"),o=l(m=>{let v=this.$slider.getBoundingClientRect(),k=e(m,v.left,v.right,this._min,this._max);this._snapClampSetValue(k)},"setValueFromX"),t=l(m=>{this._setDraggingStyle(!0),o(m.clientX),window.addEventListener("mousemove",n),window.addEventListener("mouseup",a)},"mouseDown"),n=l(m=>{o(m.clientX)},"mouseMove"),a=l(()=>{this._callOnFinishChange(),this._setDraggingStyle(!1),window.removeEventListener("mousemove",n),window.removeEventListener("mouseup",a)},"mouseUp"),r=!1,d,c,p=l(m=>{m.preventDefault(),this._setDraggingStyle(!0),o(m.touches[0].clientX),r=!1},"beginTouchDrag"),h=l(m=>{m.touches.length>1||(this._hasScrollBar?(d=m.touches[0].clientX,c=m.touches[0].clientY,r=!0):p(m),window.addEventListener("touchmove",s,{passive:!1}),window.addEventListener("touchend",f))},"onTouchStart"),s=l(m=>{if(r){let v=m.touches[0].clientX-d,k=m.touches[0].clientY-c;Math.abs(v)>Math.abs(k)?p(m):(window.removeEventListener("touchmove",s),window.removeEventListener("touchend",f))}else m.preventDefault(),o(m.touches[0].clientX)},"onTouchMove"),f=l(()=>{this._callOnFinishChange(),this._setDraggingStyle(!1),window.removeEventListener("touchmove",s),window.removeEventListener("touchend",f)},"onTouchEnd"),g=this._callOnFinishChange.bind(this),u=400,b,x=l(m=>{if(Math.abs(m.deltaX)<Math.abs(m.deltaY)&&this._hasScrollBar)return;m.preventDefault();let k=this._normalizeMouseWheel(m)*this._step;this._snapClampSetValue(this.getValue()+k),this.$input.value=this.getValue(),clearTimeout(b),b=setTimeout(g,u)},"onWheel");this.$slider.addEventListener("mousedown",t),this.$slider.addEventListener("touchstart",h,{passive:!1}),this.$slider.addEventListener("wheel",x,{passive:!1})}_setDraggingStyle(e,o="horizontal"){this.$slider&&this.$slider.classList.toggle("active",e),document.body.classList.toggle("lil-gui-dragging",e),document.body.classList.toggle("lil-gui-".concat(o),e)}_getImplicitStep(){return this._hasMin&&this._hasMax?(this._max-this._min)/1e3:.1}_onUpdateMinMax(){!this._hasSlider&&this._hasMin&&this._hasMax&&(this._stepExplicit||this.step(this._getImplicitStep(),!1),this._initSlider(),this.updateDisplay())}_normalizeMouseWheel(e){let{deltaX:o,deltaY:t}=e;return Math.floor(e.deltaY)!==e.deltaY&&e.wheelDelta&&(o=0,t=-e.wheelDelta/120,t*=this._stepExplicit?1:10),o+-t}_arrowKeyMultiplier(e){let o=this._stepExplicit?1:10;return e.shiftKey?o*=10:e.altKey&&(o/=10),o}_snap(e){let o=Math.round(e/this._step)*this._step;return parseFloat(o.toPrecision(15))}_clamp(e){return e<this._min&&(e=this._min),e>this._max&&(e=this._max),e}_snapClampSetValue(e){this.setValue(this._clamp(this._snap(e)))}get _hasScrollBar(){let e=this.parent.root.$children;return e.scrollHeight>e.clientHeight}get _hasMin(){return this._min!==void 0}get _hasMax(){return this._max!==void 0}};l(ce,"NumberController");var ne=ce,he=class he extends L{constructor(e,o,t,n){super(e,o,t,"option"),this.$select=document.createElement("select"),this.$select.setAttribute("aria-labelledby",this.$name.id),this.$display=document.createElement("div"),this.$display.classList.add("display"),this.$select.addEventListener("change",()=>{this.setValue(this._values[this.$select.selectedIndex]),this._callOnFinishChange()}),this.$select.addEventListener("focus",()=>{this.$display.classList.add("focus")}),this.$select.addEventListener("blur",()=>{this.$display.classList.remove("focus")}),this.$widget.appendChild(this.$select),this.$widget.appendChild(this.$display),this.$disable=this.$select,this.options(n)}options(e){return this._values=Array.isArray(e)?e:Object.values(e),this._names=Array.isArray(e)?e:Object.keys(e),this.$select.replaceChildren(),this._names.forEach(o=>{let t=document.createElement("option");t.textContent=o,this.$select.appendChild(t)}),this.updateDisplay(),this}updateDisplay(){let e=this.getValue(),o=this._values.indexOf(e);return this.$select.selectedIndex=o,this.$display.textContent=o===-1?e:this._names[o],this}};l(he,"OptionController");var re=he,ue=class ue extends L{constructor(e,o,t){super(e,o,t,"string"),this.$input=document.createElement("input"),this.$input.setAttribute("type","text"),this.$input.setAttribute("spellcheck","false"),this.$input.setAttribute("aria-labelledby",this.$name.id),this.$input.addEventListener("input",()=>{this.setValue(this.$input.value)}),this.$input.addEventListener("keydown",n=>{n.code==="Enter"&&this.$input.blur()}),this.$input.addEventListener("blur",()=>{this._callOnFinishChange()}),this.$widget.appendChild(this.$input),this.$disable=this.$input,this.updateDisplay()}updateDisplay(){return this.$input.value=this.getValue(),this}};l(ue,"StringController");var se=ue,Ve='.lil-gui {\n font-family: var(--font-family);\n font-size: var(--font-size);\n line-height: 1;\n font-weight: normal;\n font-style: normal;\n text-align: left;\n color: var(--text-color);\n user-select: none;\n -webkit-user-select: none;\n touch-action: manipulation;\n --background-color: #1f1f1f;\n --text-color: #ebebeb;\n --title-background-color: #111111;\n --title-text-color: #ebebeb;\n --widget-color: #424242;\n --hover-color: #4f4f4f;\n --focus-color: #595959;\n --number-color: #2cc9ff;\n --string-color: #a2db3c;\n --font-size: 11px;\n --input-font-size: 11px;\n --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;\n --font-family-mono: Menlo, Monaco, Consolas, "Droid Sans Mono", monospace;\n --padding: 4px;\n --spacing: 4px;\n --widget-height: 20px;\n --title-height: calc(var(--widget-height) + var(--spacing) * 1.25);\n --name-width: 45%;\n --slider-knob-width: 2px;\n --slider-input-width: 27%;\n --color-input-width: 27%;\n --slider-input-min-width: 45px;\n --color-input-min-width: 45px;\n --folder-indent: 7px;\n --widget-padding: 0 0 0 3px;\n --widget-border-radius: 2px;\n --checkbox-size: calc(0.75 * var(--widget-height));\n --scrollbar-width: 5px;\n}\n.lil-gui, .lil-gui * {\n box-sizing: border-box;\n margin: 0;\n padding: 0;\n}\n.lil-gui.root {\n width: var(--width, 245px);\n display: flex;\n flex-direction: column;\n background: var(--background-color);\n}\n.lil-gui.root > .title {\n background: var(--title-background-color);\n color: var(--title-text-color);\n}\n.lil-gui.root > .children {\n overflow-x: hidden;\n overflow-y: auto;\n}\n.lil-gui.root > .children::-webkit-scrollbar {\n width: var(--scrollbar-width);\n height: var(--scrollbar-width);\n background: var(--background-color);\n}\n.lil-gui.root > .children::-webkit-scrollbar-thumb {\n border-radius: var(--scrollbar-width);\n background: var(--focus-color);\n}\n@media (pointer: coarse) {\n .lil-gui.allow-touch-styles, .lil-gui.allow-touch-styles .lil-gui {\n --widget-height: 28px;\n --padding: 6px;\n --spacing: 6px;\n --font-size: 13px;\n --input-font-size: 16px;\n --folder-indent: 10px;\n --scrollbar-width: 7px;\n --slider-input-min-width: 50px;\n --color-input-min-width: 65px;\n }\n}\n.lil-gui.force-touch-styles, .lil-gui.force-touch-styles .lil-gui {\n --widget-height: 28px;\n --padding: 6px;\n --spacing: 6px;\n --font-size: 13px;\n --input-font-size: 16px;\n --folder-indent: 10px;\n --scrollbar-width: 7px;\n --slider-input-min-width: 50px;\n --color-input-min-width: 65px;\n}\n.lil-gui.autoPlace {\n max-height: 100%;\n position: fixed;\n top: 0;\n right: 15px;\n z-index: 1001;\n}\n\n.lil-gui .controller {\n display: flex;\n align-items: center;\n padding: 0 var(--padding);\n margin: var(--spacing) 0;\n}\n.lil-gui .controller.disabled {\n opacity: 0.5;\n}\n.lil-gui .controller.disabled, .lil-gui .controller.disabled * {\n pointer-events: none !important;\n}\n.lil-gui .controller > .name {\n min-width: var(--name-width);\n flex-shrink: 0;\n white-space: pre;\n padding-right: var(--spacing);\n line-height: var(--widget-height);\n}\n.lil-gui .controller .widget {\n position: relative;\n display: flex;\n align-items: center;\n width: 100%;\n min-height: var(--widget-height);\n}\n.lil-gui .controller.string input {\n color: var(--string-color);\n}\n.lil-gui .controller.boolean {\n cursor: pointer;\n}\n.lil-gui .controller.color .display {\n width: 100%;\n height: var(--widget-height);\n border-radius: var(--widget-border-radius);\n position: relative;\n}\n@media (hover: hover) {\n .lil-gui .controller.color .display:hover:before {\n content: " ";\n display: block;\n position: absolute;\n border-radius: var(--widget-border-radius);\n border: 1px solid #fff9;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n }\n}\n.lil-gui .controller.color input[type=color] {\n opacity: 0;\n width: 100%;\n height: 100%;\n cursor: pointer;\n}\n.lil-gui .controller.color input[type=text] {\n margin-left: var(--spacing);\n font-family: var(--font-family-mono);\n min-width: var(--color-input-min-width);\n width: var(--color-input-width);\n flex-shrink: 0;\n}\n.lil-gui .controller.option select {\n opacity: 0;\n position: absolute;\n width: 100%;\n max-width: 100%;\n}\n.lil-gui .controller.option .display {\n position: relative;\n pointer-events: none;\n border-radius: var(--widget-border-radius);\n height: var(--widget-height);\n line-height: var(--widget-height);\n max-width: 100%;\n overflow: hidden;\n word-break: break-all;\n padding-left: 0.55em;\n padding-right: 1.75em;\n background: var(--widget-color);\n}\n@media (hover: hover) {\n .lil-gui .controller.option .display.focus {\n background: var(--focus-color);\n }\n}\n.lil-gui .controller.option .display.active {\n background: var(--focus-color);\n}\n.lil-gui .controller.option .display:after {\n font-family: "lil-gui";\n content: "\u2195";\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n padding-right: 0.375em;\n}\n.lil-gui .controller.option .widget,\n.lil-gui .controller.option select {\n cursor: pointer;\n}\n@media (hover: hover) {\n .lil-gui .controller.option .widget:hover .display {\n background: var(--hover-color);\n }\n}\n.lil-gui .controller.number input {\n color: var(--number-color);\n}\n.lil-gui .controller.number.hasSlider input {\n margin-left: var(--spacing);\n width: var(--slider-input-width);\n min-width: var(--slider-input-min-width);\n flex-shrink: 0;\n}\n.lil-gui .controller.number .slider {\n width: 100%;\n height: var(--widget-height);\n background: var(--widget-color);\n border-radius: var(--widget-border-radius);\n padding-right: var(--slider-knob-width);\n overflow: hidden;\n cursor: ew-resize;\n touch-action: pan-y;\n}\n@media (hover: hover) {\n .lil-gui .controller.number .slider:hover {\n background: var(--hover-color);\n }\n}\n.lil-gui .controller.number .slider.active {\n background: var(--focus-color);\n}\n.lil-gui .controller.number .slider.active .fill {\n opacity: 0.95;\n}\n.lil-gui .controller.number .fill {\n height: 100%;\n border-right: var(--slider-knob-width) solid var(--number-color);\n box-sizing: content-box;\n}\n\n.lil-gui-dragging .lil-gui {\n --hover-color: var(--widget-color);\n}\n.lil-gui-dragging * {\n cursor: ew-resize !important;\n}\n\n.lil-gui-dragging.lil-gui-vertical * {\n cursor: ns-resize !important;\n}\n\n.lil-gui .title {\n height: var(--title-height);\n line-height: calc(var(--title-height) - 4px);\n font-weight: 600;\n padding: 0 var(--padding);\n -webkit-tap-highlight-color: transparent;\n cursor: pointer;\n outline: none;\n text-decoration-skip: objects;\n}\n.lil-gui .title:before {\n font-family: "lil-gui";\n content: "\u25BE";\n padding-right: 2px;\n display: inline-block;\n}\n.lil-gui .title:active {\n background: var(--title-background-color);\n opacity: 0.75;\n}\n@media (hover: hover) {\n body:not(.lil-gui-dragging) .lil-gui .title:hover {\n background: var(--title-background-color);\n opacity: 0.85;\n }\n .lil-gui .title:focus {\n text-decoration: underline var(--focus-color);\n }\n}\n.lil-gui.root > .title:focus {\n text-decoration: none !important;\n}\n.lil-gui.closed > .title:before {\n content: "\u25B8";\n}\n.lil-gui.closed > .children {\n transform: translateY(-7px);\n opacity: 0;\n}\n.lil-gui.closed:not(.transition) > .children {\n display: none;\n}\n.lil-gui.transition > .children {\n transition-duration: 300ms;\n transition-property: height, opacity, transform;\n transition-timing-function: cubic-bezier(0.2, 0.6, 0.35, 1);\n overflow: hidden;\n pointer-events: none;\n}\n.lil-gui .children:empty:before {\n content: "Empty";\n padding: 0 var(--padding);\n margin: var(--spacing) 0;\n display: block;\n height: var(--widget-height);\n font-style: italic;\n line-height: var(--widget-height);\n opacity: 0.5;\n}\n.lil-gui.root > .children > .lil-gui > .title {\n border: 0 solid var(--widget-color);\n border-width: 1px 0;\n transition: border-color 300ms;\n}\n.lil-gui.root > .children > .lil-gui.closed > .title {\n border-bottom-color: transparent;\n}\n.lil-gui + .controller {\n border-top: 1px solid var(--widget-color);\n margin-top: 0;\n padding-top: var(--spacing);\n}\n.lil-gui .lil-gui .lil-gui > .title {\n border: none;\n}\n.lil-gui .lil-gui .lil-gui > .children {\n border: none;\n margin-left: var(--folder-indent);\n border-left: 2px solid var(--widget-color);\n}\n.lil-gui .lil-gui .controller {\n border: none;\n}\n\n.lil-gui label, .lil-gui input, .lil-gui button {\n -webkit-tap-highlight-color: transparent;\n}\n.lil-gui input {\n border: 0;\n outline: none;\n font-family: var(--font-family);\n font-size: var(--input-font-size);\n border-radius: var(--widget-border-radius);\n height: var(--widget-height);\n background: var(--widget-color);\n color: var(--text-color);\n width: 100%;\n}\n@media (hover: hover) {\n .lil-gui input:hover {\n background: var(--hover-color);\n }\n .lil-gui input:active {\n background: var(--focus-color);\n }\n}\n.lil-gui input:disabled {\n opacity: 1;\n}\n.lil-gui input[type=text],\n.lil-gui input[type=number] {\n padding: var(--widget-padding);\n -moz-appearance: textfield;\n}\n.lil-gui input[type=text]:focus,\n.lil-gui input[type=number]:focus {\n background: var(--focus-color);\n}\n.lil-gui input[type=checkbox] {\n appearance: none;\n width: var(--checkbox-size);\n height: var(--checkbox-size);\n border-radius: var(--widget-border-radius);\n text-align: center;\n cursor: pointer;\n}\n.lil-gui input[type=checkbox]:checked:before {\n font-family: "lil-gui";\n content: "\u2713";\n font-size: var(--checkbox-size);\n line-height: var(--checkbox-size);\n}\n@media (hover: hover) {\n .lil-gui input[type=checkbox]:focus {\n box-shadow: inset 0 0 0 1px var(--focus-color);\n }\n}\n.lil-gui button {\n outline: none;\n cursor: pointer;\n font-family: var(--font-family);\n font-size: var(--font-size);\n color: var(--text-color);\n width: 100%;\n height: var(--widget-height);\n text-transform: none;\n background: var(--widget-color);\n border-radius: var(--widget-border-radius);\n border: none;\n}\n@media (hover: hover) {\n .lil-gui button:hover {\n background: var(--hover-color);\n }\n .lil-gui button:focus {\n box-shadow: inset 0 0 0 1px var(--focus-color);\n }\n}\n.lil-gui button:active {\n background: var(--focus-color);\n}\n\n@font-face {\n font-family: "lil-gui";\n src: url("data:application/font-woff;charset=utf-8;base64,d09GRgABAAAAAAUsAAsAAAAACJwAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABHU1VCAAABCAAAAH4AAADAImwmYE9TLzIAAAGIAAAAPwAAAGBKqH5SY21hcAAAAcgAAAD0AAACrukyyJBnbHlmAAACvAAAAF8AAACEIZpWH2hlYWQAAAMcAAAAJwAAADZfcj2zaGhlYQAAA0QAAAAYAAAAJAC5AHhobXR4AAADXAAAABAAAABMAZAAAGxvY2EAAANsAAAAFAAAACgCEgIybWF4cAAAA4AAAAAeAAAAIAEfABJuYW1lAAADoAAAASIAAAIK9SUU/XBvc3QAAATEAAAAZgAAAJCTcMc2eJxVjbEOgjAURU+hFRBK1dGRL+ALnAiToyMLEzFpnPz/eAshwSa97517c/MwwJmeB9kwPl+0cf5+uGPZXsqPu4nvZabcSZldZ6kfyWnomFY/eScKqZNWupKJO6kXN3K9uCVoL7iInPr1X5baXs3tjuMqCtzEuagm/AAlzQgPAAB4nGNgYRBlnMDAysDAYM/gBiT5oLQBAwuDJAMDEwMrMwNWEJDmmsJwgCFeXZghBcjlZMgFCzOiKOIFAB71Bb8AeJy1kjFuwkAQRZ+DwRAwBtNQRUGKQ8OdKCAWUhAgKLhIuAsVSpWz5Bbkj3dEgYiUIszqWdpZe+Z7/wB1oCYmIoboiwiLT2WjKl/jscrHfGg/pKdMkyklC5Zs2LEfHYpjcRoPzme9MWWmk3dWbK9ObkWkikOetJ554fWyoEsmdSlt+uR0pCJR34b6t/TVg1SY3sYvdf8vuiKrpyaDXDISiegp17p7579Gp3p++y7HPAiY9pmTibljrr85qSidtlg4+l25GLCaS8e6rRxNBmsnERunKbaOObRz7N72ju5vdAjYpBXHgJylOAVsMseDAPEP8LYoUHicY2BiAAEfhiAGJgZWBgZ7RnFRdnVJELCQlBSRlATJMoLV2DK4glSYs6ubq5vbKrJLSbGrgEmovDuDJVhe3VzcXFwNLCOILB/C4IuQ1xTn5FPilBTj5FPmBAB4WwoqAHicY2BkYGAA4sk1sR/j+W2+MnAzpDBgAyEMQUCSg4EJxAEAwUgFHgB4nGNgZGBgSGFggJMhDIwMqEAYAByHATJ4nGNgAIIUNEwmAABl3AGReJxjYAACIQYlBiMGJ3wQAEcQBEV4nGNgZGBgEGZgY2BiAAEQyQWEDAz/wXwGAAsPATIAAHicXdBNSsNAHAXwl35iA0UQXYnMShfS9GPZA7T7LgIu03SSpkwzYTIt1BN4Ak/gKTyAeCxfw39jZkjymzcvAwmAW/wgwHUEGDb36+jQQ3GXGot79L24jxCP4gHzF/EIr4jEIe7wxhOC3g2TMYy4Q7+Lu/SHuEd/ivt4wJd4wPxbPEKMX3GI5+DJFGaSn4qNzk8mcbKSR6xdXdhSzaOZJGtdapd4vVPbi6rP+cL7TGXOHtXKll4bY1Xl7EGnPtp7Xy2n00zyKLVHfkHBa4IcJ2oD3cgggWvt/V/FbDrUlEUJhTn/0azVWbNTNr0Ens8de1tceK9xZmfB1CPjOmPH4kitmvOubcNpmVTN3oFJyjzCvnmrwhJTzqzVj9jiSX911FjeAAB4nG3HMRKCMBBA0f0giiKi4DU8k0V2GWbIZDOh4PoWWvq6J5V8If9NVNQcaDhyouXMhY4rPTcG7jwYmXhKq8Wz+p762aNaeYXom2n3m2dLTVgsrCgFJ7OTmIkYbwIbC6vIB7WmFfAAAA==") format("woff");\n}';function et(i){let e=document.createElement("style");e.innerHTML=i;let o=document.querySelector("head link[rel=stylesheet], head style");o?document.head.insertBefore(e,o):document.head.appendChild(e)}l(et,"_injectStyles");var Fe=!1,X=class X{constructor({parent:e,autoPlace:o=e===void 0,container:t,width:n,title:a="Controls",closeFolders:r=!1,injectStyles:d=!0,touchStyles:c=!0}={}){if(this.parent=e,this.root=e?e.root:this,this.children=[],this.controllers=[],this.folders=[],this._closed=!1,this._hidden=!1,this.domElement=document.createElement("div"),this.domElement.classList.add("lil-gui"),this.$title=document.createElement("div"),this.$title.classList.add("title"),this.$title.setAttribute("role","button"),this.$title.setAttribute("aria-expanded",!0),this.$title.setAttribute("tabindex",0),this.$title.addEventListener("click",()=>this.openAnimated(this._closed)),this.$title.addEventListener("keydown",p=>{(p.code==="Enter"||p.code==="Space")&&(p.preventDefault(),this.$title.click())}),this.$title.addEventListener("touchstart",()=>{},{passive:!0}),this.$children=document.createElement("div"),this.$children.classList.add("children"),this.domElement.appendChild(this.$title),this.domElement.appendChild(this.$children),this.title(a),this.parent){this.parent.children.push(this),this.parent.folders.push(this),this.parent.$children.appendChild(this.domElement);return}this.domElement.classList.add("root"),c&&this.domElement.classList.add("allow-touch-styles"),!Fe&&d&&(et(Ve),Fe=!0),t?t.appendChild(this.domElement):o&&(this.domElement.classList.add("autoPlace"),document.body.appendChild(this.domElement)),n&&this.domElement.style.setProperty("--width",n+"px"),this._closeFolders=r}add(e,o,t,n,a){if(Object(t)===t)return new re(this,e,o,t);let r=e[o];switch(typeof r){case"number":return new ne(this,e,o,t,n,a);case"boolean":return new te(this,e,o);case"string":return new se(this,e,o);case"function":return new U(this,e,o)}console.error("gui.add failed\n property:",o,"\n object:",e,"\n value:",r)}addColor(e,o,t=1){return new oe(this,e,o,t)}addFolder(e){let o=new X({parent:this,title:e});return this.root._closeFolders&&o.close(),o}load(e,o=!0){return e.controllers&&this.controllers.forEach(t=>{t instanceof U||t._name in e.controllers&&t.load(e.controllers[t._name])}),o&&e.folders&&this.folders.forEach(t=>{t._title in e.folders&&t.load(e.folders[t._title])}),this}save(e=!0){let o={controllers:{},folders:{}};return this.controllers.forEach(t=>{if(!(t instanceof U)){if(t._name in o.controllers)throw new Error('Cannot save GUI with duplicate property "'.concat(t._name,'"'));o.controllers[t._name]=t.save()}}),e&&this.folders.forEach(t=>{if(t._title in o.folders)throw new Error('Cannot save GUI with duplicate folder "'.concat(t._title,'"'));o.folders[t._title]=t.save()}),o}open(e=!0){return this._setClosed(!e),this.$title.setAttribute("aria-expanded",!this._closed),this.domElement.classList.toggle("closed",this._closed),this}close(){return this.open(!1)}_setClosed(e){this._closed!==e&&(this._closed=e,this._callOnOpenClose(this))}show(e=!0){return this._hidden=!e,this.domElement.style.display=this._hidden?"none":"",this}hide(){return this.show(!1)}openAnimated(e=!0){return this._setClosed(!e),this.$title.setAttribute("aria-expanded",!this._closed),requestAnimationFrame(()=>{let o=this.$children.clientHeight;this.$children.style.height=o+"px",this.domElement.classList.add("transition");let t=l(a=>{a.target===this.$children&&(this.$children.style.height="",this.domElement.classList.remove("transition"),this.$children.removeEventListener("transitionend",t))},"onTransitionEnd");this.$children.addEventListener("transitionend",t);let n=e?this.$children.scrollHeight:0;this.domElement.classList.toggle("closed",!e),requestAnimationFrame(()=>{this.$children.style.height=n+"px"})}),this}title(e){return this._title=e,this.$title.textContent=e,this}reset(e=!0){return(e?this.controllersRecursive():this.controllers).forEach(t=>t.reset()),this}onChange(e){return this._onChange=e,this}_callOnChange(e){this.parent&&this.parent._callOnChange(e),this._onChange!==void 0&&this._onChange.call(this,{object:e.object,property:e.property,value:e.getValue(),controller:e})}onFinishChange(e){return this._onFinishChange=e,this}_callOnFinishChange(e){this.parent&&this.parent._callOnFinishChange(e),this._onFinishChange!==void 0&&this._onFinishChange.call(this,{object:e.object,property:e.property,value:e.getValue(),controller:e})}onOpenClose(e){return this._onOpenClose=e,this}_callOnOpenClose(e){this.parent&&this.parent._callOnOpenClose(e),this._onOpenClose!==void 0&&this._onOpenClose.call(this,e)}destroy(){this.parent&&(this.parent.children.splice(this.parent.children.indexOf(this),1),this.parent.folders.splice(this.parent.folders.indexOf(this),1)),this.domElement.parentElement&&this.domElement.parentElement.removeChild(this.domElement),Array.from(this.children).forEach(e=>e.destroy())}controllersRecursive(){let e=Array.from(this.controllers);return this.folders.forEach(o=>{e=e.concat(o.controllersRecursive())}),e}foldersRecursive(){let e=Array.from(this.folders);return this.folders.forEach(o=>{e=e.concat(o.foldersRecursive())}),e}};l(X,"GUI");var z=X,K=z;y();y();var _=(()=>{let i=new Ee;return l(function(o){return i.set(o),"#".concat(i.getHexString())},"normalize")})();function Se(i){let e;for(e of i)e()}l(Se,"runAll");function pe(i,e){let o=window.location.href,t=new URL(o),n=new URLSearchParams(t.search);for(let a in i)if(i.hasOwnProperty(a)){let r="".concat(e,".").concat(a);n.set(r,i[a])}t.search=n.toString(),history.pushState({path:t.toString()},"",t.toString())}l(pe,"updateCurrentUrlParamsWithNamespace");function ge(i,e){let o=new URLSearchParams(window.location.search),t={};for(let[n,a]of o)if(n.startsWith("".concat(i,"."))){let r=n.slice(i.length+1);a==="true"||a==="false"?t[r]=a==="true":typeof(e==null?void 0:e[r])=="number"?t[r]=Number(a):t[r]=a}return{namespace:i,params:t}}l(ge,"getUrlParamsWithNamespace");var tt=["interactive"];function Z(i,e,o){var n,a;let t=o.addFolder("".concat(e.type,"-").concat(e.id));for(let r in e){if(r==="visible"&&t.add(e,r).onChange(d=>{i.updateState(e.id,{[r]:d})}),r==="color"||r==="hoverColor"){e[r]=_(e[r]),t.addColor(e,r).onChange(d=>{i.updateState(e.id,{[r]:d})});continue}if(r==="height"){t.add(e,r,0,20,1).onChange(d=>{i.updateState(e.id,{[r]:d})});continue}if(r==="texture"&&e.texture){(n=t.addFolder("Texture - side").add(e,"texture"))==null||n.onChange(c=>{i.updateState(e.id,{texture:{url:c}})});continue}if(r==="topTexture"&&e.topTexture){(a=t.addFolder("Texture - top").add(e,"topTexture"))==null||a.onChange(c=>{i.updateState(e.id,{topTexture:{url:c}})});continue}if(r==="opacity"){t.add(e,r,0,1,.1).onChange(d=>{i.updateState(e.id,{[r]:d})});continue}tt.includes(r)&&t.add(e,r).onChange(d=>{i.updateState(e.id,{[r]:d})})}return e.isInView&&(t.add(e,"isInView").listen().disable(),t.add(e,"isInViewCheck")),{cleanup(){t.destroy()}}}l(Z,"renderByProp");y();y();function it(){let i=[];function e(n,a){var c;let r=Object.values(n.getMapData())[0],d=a;if(d&&J.is(d)){let p=(c=r.getByType("enterprise-location"))==null?void 0:c.find(h=>h.spaces.some(s=>s.id===d.id));p&&(d=p)}return d}l(e,"getHighlightTarget");async function o(n,a){return a instanceof W?n.Camera.focusOn(a.locations.flatMap(r=>r.spaces),j):a instanceof D?n.Camera.focusOn(a.spaces,j):n.Camera.focusOn(a,j)}l(o,"focusOn");function t(n,a,{focus:r=!1}={}){if(!window.enableHighlightCard)return()=>{};let d=e(n,a),c=document.createElement("div");if(c.style.cssText="\n position: absolute;\n top: 20px;\n left: 20px;\n background-color: rgba(30, 30, 30, 0.95);\n box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);\n border-radius: 12px;\n padding: 24px;\n max-width: 320px;\n z-index: 1000;\n font-family: 'Arial', sans-serif;\n transition: all 0.3s ease;\n color: #e0e0e0;\n ","name"in d){let h=document.createElement("h3");h.textContent=d.name,h.style.cssText="\n margin: 0 0 16px;\n font-size: 22px;\n font-weight: 600;\n color: #ffffff;\n letter-spacing: -0.5px;\n ",c.appendChild(h)}if(d instanceof D){if(d.description){let h=document.createElement("p");h.textContent=d.description,h.style.cssText="\n margin: 0 0 16px;\n font-size: 14px;\n color: #b0b0b0;\n line-height: 1.5;\n ",c.appendChild(h)}if(d.tags&&d.tags.length>0){let h=document.createElement("div");h.style.cssText="\n display: flex;\n flex-wrap: nowrap;\n gap: 8px;\n margin-bottom: 16px;\n overflow-x: hidden;\n max-height: 30px; /* Adjust this value based on your font size and padding */\n ",d.tags.forEach(s=>{let f=document.createElement("span");f.textContent=s,f.style.cssText="\n background-color: #3a3a3a;\n color: #e0e0e0;\n padding: 6px 12px;\n border-radius: 16px;\n font-size: 12px;\n font-weight: 500;\n text-transform: uppercase;\n white-space: nowrap;\n ",h.appendChild(f)}),c.appendChild(h)}}let p;if(!(a instanceof W)){let h=new K({autoPlace:!1});h.domElement.style.cssText="\n position: relative;\n overflow-y: auto;\n margin-top: 16px;\n border-top: 1px solid #444;\n padding-top: 16px;\n ";let s=n.getState(a);s&&(Z(n,{id:a.id,...s},h),c.appendChild(h.domElement)),p=h}return document.body.appendChild(c),r&&o(n,d),()=>{c.style.opacity="0",c.style.transform="translateY(-10px)",setTimeout(()=>c.remove(),300),p==null||p.destroy()}}return l(t,"highlightCard"),{highlightCard:t,highlight:(n,a,{focus:r=!0}={})=>{i.length>0&&i.forEach(c=>n.Markers.remove(c));let d=e(n,a);if(d instanceof D)r&&n.Camera.focusOn(d.spaces,j),i.push(...d.spaces.map(c=>n.Markers.add(c,'<div style="padding: 15px; background-color: #ffffff; border-radius: 8px; box-shadow: 0 4px 6px rgba(0,0,0,0.1); max-width: 250px; position: relative;">\n <h3 style="margin: 0 0 10px; color: #333; font-size: 16px; font-weight: 600;">'.concat(d.name,"</h3>\n ").concat(d.description?'<p style="margin: 0 0 10px; color: #666; font-size: 14px; font-weight: 400;">'.concat(d.description,"</p>"):"","\n ").concat(d.tags?d.tags.map(p=>'<span style="display: inline-block; padding: 3px 8px; background-color: #e0f2f1; color: #00796b; border-radius: 12px; font-size: 12px;">'.concat(p,"</span>")).join(" "):"",'\n <div style="position: absolute; bottom: -10px; left: 50%; transform: translateX(-50%); width: 0; height: 0; border-left: 10px solid transparent; border-right: 10px solid transparent; border-top: 10px solid #ffffff;"></div>\n </div>'),{rank:"always-visible",anchor:"top"})));else if(d instanceof W){r&&n.Camera.focusOn(d.locations.flatMap(h=>h.spaces),j);let c=new Map,p=new Set;d.locations.forEach(h=>{c.has(h.name)||(h.spaces.forEach(s=>{i.push(n.Markers.add(s,'<div style="padding: 12px; background-color: rgba(0, 153, 51, 0.95); border-radius: 8px; box-shadow: 0 4px 8px rgba(0,0,0,0.3); transform: translateY(-4px); transition: all 0.3s ease;">\n <span style="font-weight: 600; color: #FFFFFF; font-size: 16px; text-shadow: 1px 1px 2px rgba(0,0,0,0.2);">'.concat(h.name,"</span>\n </div>"),{rank:"always-visible"}))}),c.set(h.name,!0))}),d.locations.forEach(h=>{h.coordinates.forEach(s=>{let f="".concat(s.latitude,",").concat(s.longitude);if(!p.has(f)&&!c.has(h.name)){let g=n.Markers.add(s,'<div style="padding: 10px; background-color: rgba(51, 102, 204, 0.9); border-radius: 6px; box-shadow: 0 3px 6px rgba(0,0,0,0.2);">\n <span style="font-weight: 500; color: #FFFFFF; font-size: 16px;">'.concat(h.name,'</span>\n <br>\n <span style="color: #FFFFFF; font-size: 12px; font-weight: 400;">Node</span>\n </div>'),{rank:"always-visible"});p.add(f),i.push(g)}})})}return()=>{i.forEach(c=>n.Markers.remove(c))}}}}l(it,"createHighlightControl");var j={duration:300,easing:"ease-in-out"},Q=it();y();var E={search:"",results:void 0,options:{places:{fields:{name:!0,description:!0,link:!0,category:!0},limit:5},locations:{fields:{name:!0,tag:!0,description:!0},limit:5},categories:{fields:{name:!0},limit:5}}};function ot(i){i.add(E.options.places.fields,"name").name("Places: Name"),i.add(E.options.places.fields,"description").name("Places: Description"),i.add(E.options.places.fields,"link").name("Places: Link"),i.add(E.options.places.fields,"category").name("Places: Category"),i.add(E.options.places,"limit"),i.add(E.options.locations.fields,"name").name("Locations: Name"),i.add(E.options.locations.fields,"tag").name("Locations: Tag"),i.add(E.options.locations.fields,"description").name("Locations: Description"),i.add(E.options.places,"limit"),i.add(E.options.categories.fields,"name").name("Categories: Name")}l(ot,"createAdvancedSettings");function Le(i,e,o){var h;let t=new B,n=o.addFolder("Search");n.open();let a=n.add(E,"search").onChange(async s=>{let f=await e.Search.query(s,E.options);f&&(E.results=f,d(f,t))}),r=document.createElement("div");r.style.marginLeft="10px",(h=a.domElement.parentElement)==null||h.appendChild(r);let{renderSearch:d,close:c}=nt(i,e,r,a.$input),p=n.addFolder("Advanced");return p.close(),ot(p),document.addEventListener("keydown",s=>{(s.metaKey||s.ctrlKey)&&s.key==="k"?(s.preventDefault(),n._closed&&n.open(),a.$input.focus()):s.key==="Escape"&&(c(),t.publish("highlight",void 0))}),{pubsub:t}}l(Le,"createSearchControl");function nt(i,e,o,t){let n,a;t.addEventListener("input",async d=>{d instanceof InputEvent&&(d.inputType==="insertText"||d.inputType==="insertCompositionText")&&(clearTimeout(n),n=setTimeout(async()=>{var p;let c=await e.Search.suggest(t.value);c&&c.length>0&&r((p=c[0])==null?void 0:p.suggestion)},100))});function r(d){if(!d){t.placeholder="";return}let c=t.value;t.value=d,t.setSelectionRange(c.length,d.length)}return l(r,"renderSuggestion"),{renderSearch(d,c){var p,h;if(d.places.length===0&&((p=d.enterpriseCategories)==null?void 0:p.length)===0&&((h=d.enterpriseLocations)==null?void 0:h.length)===0){o.textContent="No results found.";return}a=rt(o,d,i,c)},close(){a.destroy()}}}l(nt,"mount");function rt(i,e,o,t){i.innerHTML="";let n=document.createElement("div");Object.assign(n.style,q.dropdownContainer);let a=document.createElement("ul");a.className="options-list",Object.assign(a.style,q.optionsList),a.style.display="block";let r=[],d=l((f,g)=>{if(g&&g.length>0){let u=document.createElement("li");u.textContent=f,Object.assign(u.style,q.sectionHeader),a.appendChild(u),g.forEach((b,x)=>{let m=document.createElement("li");m.textContent="".concat("name"in b.item?b.item.name:""," (").concat(b.type,")"),Object.assign(m.style,q.option),m.tabIndex=0,m.addEventListener("focus",()=>{p(r.indexOf(m))}),m.addEventListener("mouseover",()=>{m.style.backgroundColor="#f0f0f0"}),m.addEventListener("mouseout",()=>{m.style.backgroundColor=""}),m.addEventListener("click",()=>{}),m.setAttribute("data-type",f),m.setAttribute("data-index",x.toString()),a.appendChild(m),r.push(m)})}},"addSection");d("enterpriseLocations",e.enterpriseLocations),d("enterpriseCategories",e.enterpriseCategories),d("Places",e.places),n.appendChild(a),i.appendChild(n);let c=[],p=l(f=>{c.forEach(m=>m()),c=[],r.forEach((m,v)=>{v===f?m.style.backgroundColor="#e0e0e0":m.style.backgroundColor=""});let g=r[f],u=g.getAttribute("data-type"),b=parseInt(g.getAttribute("data-index")||"0",10);if(!u)return;let{item:x}=e[u.toLowerCase()][b];t.publish("highlight",x)},"highlightOption"),h=l(f=>{!n.contains(f.target)&&f.target!==i&&s()},"handleClickOutside");document.addEventListener("click",h);let s=l(()=>{i.innerHTML="",document.removeEventListener("click",h)},"destroy");return{destroy(){i.innerHTML="",t.publish("highlight",void 0)}}}l(rt,"createCustomDropdown");var q={dropdownContainer:{position:"absolute",color:"#202020"},optionsList:{display:"block",zIndex:"1002",position:"relative",maxHeight:"200px",overflowY:"auto",border:"1px solid #ccc",backgroundColor:"#fff",listStyleType:"none",margin:"0",padding:"0"},sectionHeader:{fontWeight:"bold",padding:"5px",backgroundColor:"#f0f0f0"},option:{padding:"5px",cursor:"pointer"}};function $e(i,e,o){o.domElement.id="interactionPanel";let t=[],{pubsub:n}=Le(i,e,o);n.on("highlight",h=>{if(h){t.forEach(f=>f()),t=[];let s=h instanceof D?h.spaces[0]:h;if(i.Camera.focusOn(h),s&&!J.is(s))return;t.push(Q.highlightCard(i,s,{focus:!0}))}else t.forEach(s=>s()),t=[]});let a=o.addFolder("Click \u{1F447}").close(),{sub:r}=st(i,a);r.on("click",h=>{t.forEach(s=>s()),t=[],h.spaces[0]&&(t=[Q.highlightCard(i,h.spaces[0])])});let d=o.addFolder("Hover \u{1F681}").close(),{sub:c}=at(i,d),p;c.on("hover",h=>{h.spaces[0]?(p==null||p(),t.length===0&&(p=Q.highlightCard(i,h.spaces[0]))):(p==null||p(),p=void 0)})}l($e,"createInteractionControls");function st(i,e){let o=new B,t={position:"",hoverColor:_(i.getHoverColor())},n=e.add(t,"position").disable(),a=[];function r(){a.forEach(c=>c()),a.length=0}l(r,"reset");let d=0;return i.on("click",c=>{var u;let{labels:p,markers:h,coordinate:s}=c;r(),o.publish("click",c),clearInterval(d),n.load(JSON.stringify([s.longitude,s.latitude]));let f=p[0]||h[0];if(f){let b=me(i,f,e);if(!b)return;a.push(b.destroy),b.labelItemFolder.openAnimated()}let g=(u=c.spaces[0])!=null?u:c.objects[0];if(g){let b={id:g.id,...i.getState(g.id),type:g.type,isInView:!1,isInViewCheck:fe(i,g.id)},{cleanup:x}=Z(i,b,e);d=setInterval(()=>{b.isInView=i.isInView(f||g)},500),a.push(x)}}),{sub:o}}l(st,"createClickControls");function at(i,e){let o=new B;i.setHoverColor("#1f3a7a");let t={position:"",hoverColor:_(i.getHoverColor()),intersected:"",type:"",id:""},n=e.add(t,"position").disable();e.add(t,"id").disable().listen(),e.add(t,"type").disable().listen(),e.addColor(t,"hoverColor").onChange(d=>{i.setHoverColor(d)});let a=[];function r(){a.forEach(d=>d()),a.length=0}return l(r,"reset"),i.on("hover",d=>{var b,x,m;let{coordinate:c,spaces:p,objects:h,markers:s,labels:f}=d;r(),o.publish("hover",d),n.load(JSON.stringify([c.longitude,c.latitude]));let g=(m=(x=(b=p[0])!=null?b:h[0])!=null?x:s[0])!=null?m:f[0];if(!g)return;let u=i.getState(g);u&&(t.type=u.type,t.id=g.id)}),{sub:o}}l(at,"createHoverControls");function fe(i,e){return l(function(){console.log("isInView",i.isInView(e))},"isInView")}l(fe,"createIsInViewHandler");function Ie(i,e,o){let t={labels:{},all(){o.Labels.all().forEach(g=>{this.labels[g.id]=g}),c()},removeAllLabels(){o.Labels.removeAll().forEach(g=>{delete this.labels[g.id]}),c()}},{addLabel:n,destroy:a}=lt(i,o);i.add(t,"all"),i.add(t,"removeAllLabels");let r=i.addFolder("Label List");i.close();let d=new Map,{rerender:c}=p();function p(){function f(b){var x;delete t.labels[b.id],(x=d.get(b.id))==null||x.destroy()}l(f,"remove");function g(b){let x=me(o,b,r,{onRemove:v=>{f(v)}});if(!x)return;let{labelItemFolder:m}=x;d.set(b.id,m)}l(g,"add");function u(){r.destroy(),r=i.addFolder("Label");for(let b in t.labels){let x=t.labels[b];g(x)}}return l(u,"rerender"),{rerender:u,add:g,remove:f}}l(p,"createLabelControls"),i.domElement.classList.add("list-items");let h;o.on("click",({labels:f,coordinate:g})=>{if(!i._closed)if(f[0]){h==null||h.close();let u=d.get(f[0].id);if(i.open(),!u)return;u==null||u.open(),u==null||u.domElement.scrollIntoView({block:"start"}),u==null||u.domElement.focus(),h=u}else n(g)});function s(f){for(let g of f)t.labels[g.id]=g;c()}return l(s,"populatelabels"),{populatelabels:s,destroy(){a()}}}l(Ie,"createLabelControls");function me(i,e,o,{onRemove:t}={}){var p,h,s,f;let n=o.addFolder("".concat((p=e.text)==null?void 0:p.substring(0,12)));n.onChange(g=>{i.updateState(e,{appearance:c.appearance,interactive:c.interactive})}),n.close();let a=i.getState(e);if((a==null?void 0:a.type)!=="label")throw new Error("error getting state for label: ".concat(e.id));let{appearance:r,interactive:d}=a;if(!r||r.margin==null||d==null)throw new Error("incomplte label state");let c={text:e.text,interactive:d,appearance:{...r,margin:r.margin||0,marker:{foregroundColor:(s=(h=r.marker)==null?void 0:h.foregroundColor)!=null&&s.active?_((f=r.marker.foregroundColor)==null?void 0:f.active):"black"},text:{foregroundColor:_(r.text.foregroundColor)}},remove(){i.Labels.remove(e),t==null||t(e),n.destroy()},isInView:fe(i,e.id)};return n.add(c.appearance,"margin",0,20).name("margin"),n.add(c,"text"),n.add(c,"interactive"),n.addColor(c.appearance.marker,"foregroundColor").name("marker foreground"),n.addColor(c.appearance.text,"foregroundColor").name("text forground"),n.add(c,"isInView"),n.add(c,"remove"),{labelItemFolder:n,destroy(){n.destroy()}}}l(me,"addLabelControlToFolder");function lt(i,e){let o=i.addFolder("Add"),t={onClick:!1,margin:0,text:"New Label!",interactive:!0,marginForegroundColor:_("skyblue"),marginBackgroundColor:_("coral"),textForegroundColor:_("slategray"),textBackgroundColor:_("white")};return o.add(t,"onClick"),o.add(t,"margin"),o.add(t,"interactive"),o.add(t,"text"),o.addColor(t,"marginForegroundColor"),o.addColor(t,"marginBackgroundColor"),o.addColor(t,"textForegroundColor"),o.addColor(t,"textBackgroundColor"),{destroy(){o.destroy()},addLabel(n){return o._closed||!t.onClick?void 0:e.Labels.add(n,t.text,{appearance:{margin:t.margin,marker:{foregroundColor:{active:t.marginForegroundColor,inactive:t.marginForegroundColor},backgroundColor:{active:t.marginBackgroundColor,inactive:t.marginBackgroundColor}},text:{foregroundColor:t.textForegroundColor,backgroundColor:t.marginBackgroundColor}},interactive:t.interactive})}}}l(lt,"createAddControl");var Oe={};y();var Te="camera-ui";function De(i,e,o){var R,Ae;let t=i.addFolder("Camera \u{1F4F7}").onOpenClose(A=>{pe({opened:!A._closed},Te)}),{params:n}=ge(Te);n.opened||t.close();let a=e.Camera.center.toJSON(),r=document.createElement("div");Object.assign(r.style,{display:"none",position:"absolute",left:"0px",top:"0px",bottom:"0px",right:"0px",backgroundColor:"aqua",pointerEvents:"none",opacity:.5}),document.body.appendChild(r);let[d,c,p,h]=(R=o==null?void 0:o.padding)!=null?R:[],s={center_lat:a.latitude,center_lon:a.longitude,zoomLevel:e.Camera.zoomLevel,pitch:e.Camera.pitch,bearing:e.Camera.bearing,minZoomLevel:e.Camera.minZoomLevel,maxZoomLevel:e.Camera.maxZoomLevel,inset_type:"pixel",inset_top:d!=null?d:0,inset_left:h!=null?h:0,inset_right:c!=null?c:0,inset_bottom:p!=null?p:0,animateOnLoad:!0,persist:()=>{pe(t.save().controllers,"camera"),navigator.clipboard.writeText(window.location.href)},visualizeInset:!!(d||c||p||h),"Focus on click":(Ae=o==null?void 0:o.focusOnClick)!=null?Ae:!0,"Focus on current floor":()=>{e.Camera.focusOn([e.currentFloor],{screenOffsets:{top:20,left:20,right:20,bottom:20}})}};function f(){s.inset_type==="portion"?Object.assign(r.style,{left:s.inset_left*u+"px",top:s.inset_top*g+"px",bottom:s.inset_bottom*g+"px",right:s.inset_right*u+"px"}):Object.assign(r.style,{left:s.inset_left+"px",top:s.inset_top+"px",bottom:s.inset_bottom+"px",right:s.inset_right+"px"})}l(f,"updateInsetVisualizer"),t.add(s,"center_lat").listen().disable(),t.add(s,"center_lon").listen().disable(),t.add(s,"zoomLevel",16,22,.5).listen().disable(),t.add(s,"pitch").listen().disable(),t.add(s,"bearing").listen().disable(),t.add(s,"minZoomLevel",5,22,.5).onChange(A=>{e.Camera.setMinZoomLevel(A)}),t.add(s,"maxZoomLevel",10,22,.5).onChange(A=>{e.Camera.setMaxZoomLevel(A)}),t.add(s,"animateOnLoad"),t.add(s,"visualizeInset").onChange(O),O(s.visualizeInset);let{innerHeight:g,innerWidth:u}=window;t.add(s,"inset_type",["pixel","portion"]).onChange(k),t.add(s,"inset_top",0,g).onChange(k),t.add(s,"inset_bottom",0,g).onChange(k),t.add(s,"inset_left",0,u).onChange(k),t.add(s,"inset_right",0,u).onChange(k);let b=ct(e);t.add(s,"Focus on click").onChange(A=>{A?e.on("click",b):e.off("click",b)}),s["Focus on click"]&&e.on("click",b),t.add(s,"persist"),t.add(s,"Focus on current floor");let x=l(A=>{t._closed||(s.center_lat=A.center.latitude,s.center_lon=A.center.longitude,s.zoomLevel=A.zoomLevel,s.bearing=A.bearing,s.pitch=A.pitch)},"onCameraChanged");e.on("camera-change",x);let{params:m}=ge("camera",s);if(Object.keys(m).length>0){let A=m;e.Camera.setScreenOffsets({top:A.inset_top,left:A.inset_left,right:A.inset_right,bottom:A.inset_bottom,type:A.inset_type});let ke={pitch:A.pitch,center:new Me(A.center_lat,A.center_lon),bearing:A.bearing,zoomLevel:A.zoomLevel};A.animateOnLoad?e.Camera.animateTo(ke):e.Camera.set(ke),t.load({controllers:A,folders:{}}),f()}let v=[()=>{e.off("camera-change",x)}];function k(){e.Camera.setScreenOffsets({top:s.inset_top,left:s.inset_left,right:s.inset_right,bottom:s.inset_bottom,type:s.inset_type}),f()}l(k,"updateInset"),(s.inset_top||s.inset_right||s.inset_bottom||s.inset_left)&&k();function O(A){A?r.style.display="block":r.style.display="none"}return l(O,"visualizeInsetUpdated"),()=>({destroy(){t.destroy(),Se(v)}})}l(De,"createCameraControls");function ct(i){return l(function(o){var r;let{spaces:t,objects:n}=o,a=(r=t[0])!=null?r:n[0];a&&i.Camera.focusOn(a)},"handler")}l(ct,"createHandler");y();function Pe(i,e,o){let t={markers:{},removeAllMarkers(){o.Markers.removeAll().forEach(g=>{delete this.markers[g.id]}),c()}},{addMarker:n,destroy:a}=ut(i,o);i.add(t,"removeAllMarkers");let r=i.addFolder("Marker List");i.close();let d=new Map,{rerender:c}=p();function p(){function f(b){var x;delete t.markers[b.id],(x=d.get(b.id))==null||x.destroy()}l(f,"remove");function g(b){let x=ht(o,b,r,{onRemove:v=>{f(v)}});if(!x)return;let{markerItemFolder:m}=x;d.set(b.id,m)}l(g,"add");function u(){r.destroy(),r=i.addFolder("marker");for(let b in t.markers){let x=t.markers[b];g(x)}}return l(u,"rerender"),{rerender:u,add:g,remove:f}}l(p,"createMarkerControls"),i.domElement.classList.add("list-items");let h;o.on("click",({markers:f,coordinate:g})=>{if(!i._closed)if(f[0]){h==null||h.close();let u=d.get(f[0].id);if(i.open(),!u)return;u==null||u.open(),u==null||u.domElement.scrollIntoView({block:"start"}),u==null||u.domElement.focus(),h=u}else n(g)});function s(f){for(let g of f)t.markers[g.id]=g;c()}return l(s,"populateMarkers"),{populateMarkers:s,destroy(){a()}}}l(Pe,"createMarkerControls");function ht(i,e,o,{onRemove:t}={}){let n=o.addFolder("".concat(e.id.toString().substring(0,8)));n.onChange(c=>{i.updateState(e,{interactive:d.interactive})}),n.close();let a=i.getState(e);if((a==null?void 0:a.type)!=="marker")throw new Error("error getting state for marker: ".concat(e.id));let{interactive:r}=a;if(r==null)throw new Error("incomplte label state");let d={interactive:r,remove(){i.Markers.remove(e),t==null||t(e),n.destroy()}};return n.add(d,"interactive"),n.add(d,"remove"),{markerItemFolder:n,destroy(){n.destroy()}}}l(ht,"addMarkerControlToFolder");function ut(i,e){let o=i.addFolder("Add"),t={onClick:!1,interactive:!0};return o.add(t,"onClick"),o.add(t,"interactive"),{destroy(){o.destroy()},addMarker(n){return o._closed||!t.onClick?void 0:e.Markers.add(n,"<div>New Marker</div>",{interactive:t.interactive})}}}l(ut,"createAddControl");y();function ze(i,e){let o=i.addFolder("Walls").close(),t={visible:!0,topColor:"#b1fa87",color:"#e8e8e8",texture:{url:""},topTexture:{url:""}};o.add(t,"visible").onChange(r=>{e.updateState("walls",{visible:r})}),o.addColor(t,"topColor").onChange(r=>{e.updateState("walls",{topColor:r})}),o.addColor(t,"color").onChange(r=>{e.updateState("walls",{color:r})}),o.addFolder("Texture - side").add(t.texture,"url").onFinishChange(r=>{e.updateState("walls",{texture:{url:r}})}),o.addFolder("Texture - top").add(t.topTexture,"url").onFinishChange(r=>{e.updateState("walls",{topTexture:{url:r}})}),e.updateState("walls",{topColor:t.topColor}),e.updateState("walls",{color:t.color})}l(ze,"createGeometryControl");y();function Ge(i,e,o){var a,r;i.close();let t={language:(r=(a=o.currentLanguage)==null?void 0:a.code)!=null?r:"en"},n=o.getByType("enterprise-venue");i.add(t,"language",n==null?void 0:n.languages.map(d=>d.code)).onChange(d=>{o.changeLanguage(d)})}l(Ge,"createMiscControl");y();function Be(i,e,o){let t=i.addFolder("Debug");t.close();let n={showPolygonLabelTextAreaMesh:!1};t.add(n,"showPolygonLabelTextAreaMesh").onChange(a=>{e.Debug.update({showPolygonLabelTextAreaMesh:a})}).name("Show Flat Label Text Area Mesh"),e.Debug.update(n)}l(Be,"createDebugControl");y();function Ue(i,e,o){let t=i.addFolder("Text3D").close(),n={all:()=>{e.Text3D.labelAll()},removeAll:()=>{e.Text3D.removeAll()}};t.add(n,"all").name("Show All"),t.add(n,"removeAll").name("Remove All")}l(Ue,"createText3DControl");y();y();y();var F,Y,$,w,I,V,He,N,ve,ee,je,ye=class ye{constructor(e=new z({autoPlace:!0})){S(this,V);S(this,N);S(this,ee);S(this,F,void 0);S(this,Y,[]);S(this,$,{});S(this,w,{});S(this,I,{});we(this,F,e),C(this,F).domElement.style.left="0"}add(e,o,t){if(C(this,w)[e])throw new Error("Control ".concat(e," already exists"));C(this,$)[e]=o,C(this,I)[e]=o.default,G(this,V,He).call(this,e,o,t),this.show()}addColor(e,o,t){if(C(this,w)[e])throw new Error("Control ".concat(e," already exists"));C(this,$)[e]=o,C(this,I)[e]=o.default,G(this,ee,je).call(this,e,o,t),this.show()}update(e,o){if(!C(this,w)[e])throw new Error("Control ".concat(e," does not exist"));C(this,w)[e].setValue(o),C(this,$)[e].onChange&&C(this,$)[e].onChange(o,e)}replace(e,o,t){if(!C(this,w)[e]){this.add(e,o,t);return}o.args&&C(this,w)[e].options(o.args),o.default&&C(this,w)[e].setValue(o.default),o.onChange&&C(this,w)[e].onChange(n=>{o.onChange(n,e)})}remove(e){if(!C(this,w)[e])throw new Error("Control ".concat(e," does not exist"));C(this,w)[e].destroy(),C(this,w)[e].parent.children.length===0&&C(this,w)[e].parent.hide(),delete C(this,w)[e],delete C(this,$)[e],delete C(this,I)[e]}show(){C(this,F).show()}hide(){C(this,F).hide()}removeAll(){for(let e in C(this,w))this.remove(e)}destroy(){C(this,F).destroy()}};F=new WeakMap,Y=new WeakMap,$=new WeakMap,w=new WeakMap,I=new WeakMap,V=new WeakSet,He=l(function(e,o,t){let a=G(this,N,ve).call(this,t).add(C(this,I),e,o.args,o.max,o.step);o.onChange&&a.onChange(r=>{o.onChange(r,e)}),o.onAdd&&o.onAdd(o.default,e),C(this,w)[e]=a},"#addControl"),N=new WeakSet,ve=l(function(e){if(!e)return C(this,F);let o=C(this,Y).find(t=>t._title===e);return o?(o.show(),o):(o=C(this,F).addFolder(e),C(this,Y).push(o),o)},"#getFolder"),ee=new WeakSet,je=l(function(e,o,t){let a=G(this,N,ve).call(this,t).addColor(C(this,I),e);o.onChange&&a.onChange(r=>{o.onChange(r,e)}),C(this,w)[e]=a},"#addColorControl"),l(ye,"GUI");var be=ye;function pt(i,e,o){var d;let t={},n=i.getByType("floor"),a=i.getByType("floor-stack");a.length>1&&(t.FloorStack={default:e.currentFloorStack.id,args:a.reduce((c,{id:p,name:h})=>({...c,[h]:p}),{}),onChange:c=>{c!==e.currentFloorStack.id&&(e.setFloorStack(c),o.replace("Floor",{default:e.currentFloor.id,args:e.currentFloorStack.floors.reduce((p,{id:h,name:s})=>({...p,[s]:h}),{})}))}}),n.length>1&&(t.Floor={default:e.currentFloor.id,args:e.currentFloorStack.floors.reduce((c,{id:p,name:h})=>({...c,[h]:p}),{}),onChange:c=>{c!==e.currentFloor.id&&e.setFloor(c)},onAdd:()=>{e.on("floor-change",c=>{c!=null&&c.floor.id&&(o.replace("FloorStack",{default:e.currentFloorStack.id}),o.replace("Floor",{default:e.currentFloor.id,args:e.currentFloorStack.floors.reduce((h,{id:s,name:f})=>({...h,[f]:s}),{})}))})}});let r=i.getByType("enterprise-venue");return r&&r.languages.length>1&&(t.Language={default:((d=i.currentLanguage)==null?void 0:d.code)||r.languages[0].code,args:r.languages.reduce((c,{code:p,name:h})=>({...c,[h]:p}),{}),onChange:c=>{i.changeLanguage(c)}}),t}l(pt,"createDefaultControls");function Ye(i,e,o=new z){let t=new be(o),n=pt(i,e,t);Object.keys(n).length||t.hide();for(let a in n)t.add(a,n[a]);return t}l(Ye,"createGUI");async function Ne(i,e,{initialfloorsInStack:o,root:t,floorsInDirections:n,showLabelsPerFloor:a=!0}){async function r(g){i.StackedMaps.changeFloorOnElevationChanges(!1),i.Outdoor.setOpacity(.15),i.StackedMaps.setFloorVisiblityMode("only-current-floor"),i.Camera.setPanMode("default"),await i.Camera.focusOn(g,{pitch:10})}l(r,"zoomToFloor");async function d(){i.Outdoor.setOpacity(.25),i.StackedMaps.changeFloorOnElevationChanges(!0),i.Camera.setPanMode("elevation"),i.StackedMaps.setFloorVisiblityMode("all-floors"),await i.Camera.focusOn(i.currentFloor,{axisAlignedPadding:{vertical:i.StackedMaps.distanceBetweenFloors},pitch:90})}l(d,"showCurrentFloorWithPadding");async function c(g){await i.Camera.animateElevation(g.elevation*i.StackedMaps.distanceBetweenFloors)}l(c,"scrollToFloor");let p=i.currentFloor;i.on("floor-change",async g=>{i.StackedMaps.expanded&&g.reason!=="stacked-maps-elevation-change"&&(i.StackedMaps.changeFloorOnElevationChanges(!1),i.StackedMaps.setFloorVisiblityMode("all-floors"),await i.Camera.focusOn(p,{axisAlignedPadding:{vertical:i.StackedMaps.distanceBetweenFloors},pitch:90,duration:500}),i.StackedMaps.changeFloorOnElevationChanges(!0),await c(i.currentFloor),await r(i.currentFloor),i.StackedMaps.setFloorVisiblityMode("only-current-floor")),p=i.currentFloor}),i.on("stacked-maps-state-change",({state:g})=>{console.log("stacked-maps-state-change",g)});let h=e.getByType("space");if(a){let g=h.reduce((u,b)=>(u.has(b.floor)||u.set(b.floor,[]),b.name&&b.name!==""&&u.get(b.floor).push(i.Labels.add(b,b.name)),u),new Map);i.on("floor-change",()=>{g.forEach((u,b)=>{u.forEach(x=>{i.updateState(x,{enabled:i.currentFloor===b})})})})}let s=Ye(e,i,t),f=o!=null?o:[];return s.add("Expand - All",{default:async()=>{i.Outdoor.setOpacity(.25),f=e.getByType("floor"),await i.Camera.animateTo({pitch:90}),await i.StackedMaps.collapse(),i.StackedMaps.clearCachedFloorSeparationDistance(),await i.StackedMaps.expand({distanceBetweenFloors:"auto"})}},"Stack Maps"),n&&s.add("Expand - Only Navigation",{default:async()=>{i.Outdoor.setOpacity(.25),f=n,await i.StackedMaps.collapse(),i.setFloor(n[0]),await i.StackedMaps.expand({includedFloors:n,distanceBetweenFloors:20})}},"Stack Maps"),s.add("Show All Floors",{default:async()=>{f=e.getByType("floor"),i.Outdoor.setOpacity(.25),i.StackedMaps.setFloorVisiblityMode("all-floors"),i.StackedMaps.changeFloorOnElevationChanges(!1),i.Camera.setPanMode("elevation"),i.Camera.focusOn(f,{pitch:90})}},"Stack Maps"),s.add("Show Current Floor with padding",{default:async()=>{await d()}},"Stack Maps"),s.add("Zoom to Current Floor",{default:async()=>{r(i.currentFloor)}},"Stack Maps"),s.add("Collapse",{default:()=>{i.Outdoor.setOpacity("initial"),i.StackedMaps.collapse()}},"Stack Maps"),s.add("Default",{default:async()=>{i.Camera.setPanMode("default")}},"Camera Pan Mode"),s.add("Elevation",{default:async()=>{i.Camera.setPanMode("elevation")}},"Camera Pan Mode"),s.add("zoom in to floor 2",{default:async()=>{i.Outdoor.setOpacity(.25),console.log(i.currentFloor.name),await i.Camera.focusOn(i.currentFloor,{axisAlignedPadding:{vertical:i.StackedMaps.distanceBetweenFloors},pitch:90}),i.StackedMaps.expanded||await i.StackedMaps.expand({distanceBetweenFloors:i.StackedMaps.distanceBetweenFloors});let g=i.StackedMaps.includedFloors[2],u=f.findIndex(b=>b.id===g.id);i.StackedMaps.changeFloorOnElevationChanges(!0),i.Camera.setPanMode("elevation"),i.StackedMaps.setFloorVisiblityMode("all-floors"),await i.Camera.animateElevation(u*i.StackedMaps.distanceBetweenFloors),i.Outdoor.setOpacity(.15),console.log("focusing on",g.name),await i.Camera.focusOn(g,{pitch:10}),i.StackedMaps.setFloorVisiblityMode("only-current-floor"),i.Camera.setPanMode("default"),i.StackedMaps.changeFloorOnElevationChanges(!1)}},"Camera Pan Mode"),s.add("All Floors",{default:async()=>{i.StackedMaps.setFloorVisiblityMode("all-floors")}},"Visibility Mode"),s.add("Only Active Floor",{default:async()=>{i.StackedMaps.setFloorVisiblityMode("only-current-floor")}},"Visibility Mode"),s.add("Up",{default:async()=>{let g=f.find(u=>u.elevation===i.currentFloor.elevation+1);g&&await c(g)}},"Floors Up/Down"),s.add("Down",{default:async()=>{let g=f.find(u=>u.elevation===i.currentFloor.elevation-1);g&&await c(g)}},"Floors Up/Down"),{zoomToFloor:r}}l(Ne,"createStackMapsControl");function Re(i,e,o){let t=i.addFolder("StackedMaps");t.close(),Ne(e,o,{root:t,showLabelsPerFloor:!1})}l(Re,"createStackmapsControl");function We(i,e,o){gt();let t=new K({title:"SDK Controls"});t.domElement.classList.add("mappedin-js-inspector"),$e(e,i,t),De(t,e,o==null?void 0:o.camera);let n=t.addFolder("Levels").close(),a=t.addFolder("Scene Controls");a.close();let r=t.addFolder("Labels");Ue(t,e,i);let d=t.addFolder("Markers");ze(t,e),Re(t,e,i);let c=t.addFolder("misc");Be(t,e,i),Ge(c,e,i);let p={level:e.currentFloor.id},{populatelabels:h}=Ie(r,i,e),{populateMarkers:s}=Pe(d,i,e),f=i.getByType("floor").reduce((u,b)=>(u[b.name]=b.id,u),{}),g=n.add(p,"level",f).onChange(u=>{e.setFloor(u),p.level=e.currentFloor.id,g.updateDisplay()});return e.on("floor-change-start",u=>{n.controllers[0].setValue(u.floor.id)}),i.getByType("space").forEach(u=>{e.updateState(u,{interactive:!0})}),i.getByType("object").forEach(u=>{e.updateState(u,{interactive:!0})}),i.getByType("object").forEach(u=>{e.updateState(u,{interactive:!0})}),e.setHoverColor("#a2b7e6"),e.Camera.setMaxZoomLevel(20),{populatelabels:h,sceneFolder:a,populateMarkers:s}}l(We,"createUi");var Je="mappedin-sdk-debug-css";function gt(){if(document.getElementById(Je))return;let i=document.createElement("style");i.id=Je,i.textContent=Oe,document.head.appendChild(i)}l(gt,"injectCss");var xe=class xe{constructor(e,o){T(this,"_enabled",!1);T(this,"mv");T(this,"api");T(this,"mapData");T(this,"scenegraphVisualizerMounted",!1);T(this,"storeStateToLocalStorageEnabled",!1);this.mv=e,this.api=o,this.mapData=this.api.getMapData()}setMapData(e){this.mapData=e}async enable(e={}){var t;if(this._enabled)return;if(this._enabled=!0,!this.mapData)throw new Error("Please set mapData before enable debug.");let{sceneFolder:o}=We(this.mapData,this.mv,e);o.onOpenClose(n=>{n===o&&!n._closed&&!this.scenegraphVisualizerMounted&&(this.scenegraphVisualizerMounted=!0,_e(this.api.core,o))}),(t=this.api.getMapDataInternal())==null||t.spaces.forEach(n=>{this.mv.updateState(n.id,{interactive:!0})})}get enabled(){return this._enabled}};l(xe,"Inspector");var Ce=xe;export{Ce as Inspector};
|