@mappedin/react-sdk 6.0.1-beta.39 → 6.0.1-beta.40
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 +628 -57
- package/lib/esm/{GLTFExporter-LCJJ2XME.js → GLTFExporter-MJIEMDTL.js} +1 -1
- package/lib/esm/{GLTFLoader-EOECKSEX.js → GLTFLoader-JIG473HS.js} +1 -1
- package/lib/esm/{browser-LSWKTFI4.js → browser-SQ7KCI37.js} +1 -1
- package/lib/esm/{chunk-MNQRLYHZ.js → chunk-3P72EF44.js} +1 -1
- package/lib/esm/{chunk-3QBLXB2D.js → chunk-CMW7BW7B.js} +1 -1
- package/lib/esm/chunk-LFITSL3C.js +1 -0
- package/lib/esm/chunk-VV4S4DVY.js +1 -0
- package/lib/esm/{chunk-5IJAS5ZC.js → chunk-WJAP5OMF.js} +1 -1
- package/lib/esm/chunk-XLDX33Q3.js +1 -0
- package/lib/esm/index.d.ts +81 -36
- package/lib/esm/index.js +1 -1
- package/lib/esm/inspector-GILT6OLJ.js +1 -0
- package/lib/esm/{internal-IZKKNLJQ.js → internal-FGHN6SIB.js} +1 -1
- package/lib/esm/{outdoor-context-v4-PH7UY7HA.js → outdoor-context-v4-QKDCBTCX.js} +1 -1
- package/lib/esm/{text3d-D7RMMBLN.js → text3d-UKOTAC35.js} +1 -1
- package/package.json +2 -2
- package/lib/esm/chunk-BYBJJK7K.js +0 -1
- package/lib/esm/chunk-D44H7KGD.js +0 -1
- package/lib/esm/chunk-SBBKLBAA.js +0 -1
- package/lib/esm/inspector-MBXNQKQ4.js +0 -1
package/lib/esm/index.d.ts
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
// ../react/@mappedin/core-sdk
|
|
13
13
|
// ../react/@packages/internal/outdoor-context-v4
|
|
14
14
|
// ../react/@packages/internal/geojson-navigator
|
|
15
|
-
// ../react/@mappedin/mvf
|
|
15
|
+
// ../react/@mappedin/mvf-core
|
|
16
16
|
// ../react/three
|
|
17
17
|
// ../react/zod
|
|
18
18
|
// ../react/@packages/internal/shave-text/shave-text
|
|
@@ -664,21 +664,19 @@ declare module '@mappedin/react-sdk/react-sdk/src/Model' {
|
|
|
664
664
|
/**
|
|
665
665
|
* Model component.
|
|
666
666
|
*
|
|
667
|
-
* A Model is a 3D model in GLTF or GLB format anchored to a
|
|
667
|
+
* A Model is a 3D model in GLTF or GLB format anchored to a Coordinate on the map.
|
|
668
668
|
*
|
|
669
669
|
* @category Components
|
|
670
670
|
*
|
|
671
671
|
* @example
|
|
672
672
|
* ```tsx
|
|
673
673
|
* <Model
|
|
674
|
-
*
|
|
675
|
-
*
|
|
674
|
+
* target={coordinate}
|
|
675
|
+
* url={'/path/to/model.glb'}
|
|
676
|
+
* options={{
|
|
676
677
|
* scale: [0.01, 0.01, 0.01],
|
|
677
678
|
* rotation: [90, 0, 0],
|
|
678
679
|
* opacity: 0.5,
|
|
679
|
-
* }))}
|
|
680
|
-
* options={{
|
|
681
|
-
* url: '...',
|
|
682
680
|
* }}
|
|
683
681
|
* />
|
|
684
682
|
* ```
|
|
@@ -1196,6 +1194,10 @@ declare module '@mappedin/react-sdk/mappedin-js/src/events' {
|
|
|
1196
1194
|
* Emitted before the scene is drawn to the screen.
|
|
1197
1195
|
*/
|
|
1198
1196
|
'pre-render': undefined;
|
|
1197
|
+
/**
|
|
1198
|
+
* Emitted when resize happened.
|
|
1199
|
+
*/
|
|
1200
|
+
resize: undefined;
|
|
1199
1201
|
/**
|
|
1200
1202
|
* Emitted after the scene is drawn to the screen.
|
|
1201
1203
|
*/
|
|
@@ -2265,6 +2267,10 @@ declare module '@mappedin/react-sdk/mappedin-js/src/types' {
|
|
|
2265
2267
|
* sorting of markers and show certain markers always in front
|
|
2266
2268
|
*/
|
|
2267
2269
|
zIndex?: number;
|
|
2270
|
+
/**
|
|
2271
|
+
* Whether the Marker is enabled.
|
|
2272
|
+
*/
|
|
2273
|
+
enabled: boolean;
|
|
2268
2274
|
};
|
|
2269
2275
|
export type TPathState = {
|
|
2270
2276
|
type: 'path';
|
|
@@ -2282,7 +2288,7 @@ declare module '@mappedin/react-sdk/mappedin-js/src/types' {
|
|
|
2282
2288
|
*/
|
|
2283
2289
|
type: 'Shape';
|
|
2284
2290
|
/**
|
|
2285
|
-
* Whether
|
|
2291
|
+
* Whether Shape is visible
|
|
2286
2292
|
*/
|
|
2287
2293
|
visible: boolean;
|
|
2288
2294
|
/**
|
|
@@ -2737,7 +2743,7 @@ declare module '@mappedin/react-sdk/mappedin-js/src/types' {
|
|
|
2737
2743
|
/**
|
|
2738
2744
|
* Options for controlling the behavior of a {@link Model}.
|
|
2739
2745
|
*/
|
|
2740
|
-
export type TAddModelOptions = Omit<InitializeModelState, 'scale'> & {
|
|
2746
|
+
export type TAddModelOptions = Omit<InitializeModelState, 'scale' | 'url'> & {
|
|
2741
2747
|
scale?: number | [number, number, number];
|
|
2742
2748
|
};
|
|
2743
2749
|
/**
|
|
@@ -3845,7 +3851,7 @@ declare module '@mappedin/react-sdk/mappedin-js/src/map-data-objects/types' {
|
|
|
3845
3851
|
import type Connection from '@mappedin/react-sdk/mappedin-js/src/map-data-objects/connection';
|
|
3846
3852
|
import type MapObject from '@mappedin/react-sdk/mappedin-js/src/map-data-objects/object';
|
|
3847
3853
|
import type { EnterpriseLocation as MvfEnterpriseLocation, EnterpriseCategory as MvfEnterpriseCategory, ParsedMVFLocalePack, Feature, FloorStack as MvfFloorStack, FloorProperties as MvfFloor } from '@mappedin/mvf';
|
|
3848
|
-
import type { PartialExcept } from '@mappedin/mvf
|
|
3854
|
+
import type { PartialExcept } from '@mappedin/mvf-core';
|
|
3849
3855
|
import type { LocalePackUrls } from '@packages/internal/mvf-utils';
|
|
3850
3856
|
import type { LanguagePackHydrationItem } from '@mappedin/react-sdk/mappedin-js/src/types';
|
|
3851
3857
|
import type { EnvControl, TGetMapDataOptions } from '@packages/internal/mvf-utils/mvf-utils';
|
|
@@ -4369,7 +4375,7 @@ declare module '@mappedin/react-sdk/mappedin-js/src/map-data-objects/space' {
|
|
|
4369
4375
|
}
|
|
4370
4376
|
|
|
4371
4377
|
declare module '@mappedin/react-sdk/mappedin-js/src/map-data-objects/floor' {
|
|
4372
|
-
import type {
|
|
4378
|
+
import type { Feature, FloorCollection, MultiPolygon, Polygon } from '@mappedin/mvf';
|
|
4373
4379
|
import type { Annotation, Connection, Door, MapDataInternal, PointOfInterest, Space, MapObject, FloorStack } from '@mappedin/react-sdk/mappedin-js/src/map-data-objects';
|
|
4374
4380
|
import BaseMapData from '@mappedin/react-sdk/mappedin-js/src/map-data-objects/base-object';
|
|
4375
4381
|
import type { IFocusable } from '@mappedin/react-sdk/mappedin-js/src/types';
|
|
@@ -4399,7 +4405,7 @@ declare module '@mappedin/react-sdk/mappedin-js/src/map-data-objects/floor' {
|
|
|
4399
4405
|
* @internal
|
|
4400
4406
|
*/
|
|
4401
4407
|
constructor(data: MapDataInternal, options: {
|
|
4402
|
-
mvfData:
|
|
4408
|
+
mvfData: FloorCollection['features'][number];
|
|
4403
4409
|
});
|
|
4404
4410
|
/** @internal */
|
|
4405
4411
|
get focusTarget(): this;
|
|
@@ -4434,6 +4440,10 @@ declare module '@mappedin/react-sdk/mappedin-js/src/map-data-objects/floor' {
|
|
|
4434
4440
|
* @returns {Space[]} An array of Space objects on this floor.
|
|
4435
4441
|
*/
|
|
4436
4442
|
get spaces(): Space[];
|
|
4443
|
+
/**
|
|
4444
|
+
* Gets the underlying GeoJSON Feature representation of this Space.
|
|
4445
|
+
*/
|
|
4446
|
+
get geoJSON(): Feature<Polygon | MultiPolygon, null>;
|
|
4437
4447
|
/**
|
|
4438
4448
|
* Gets the objects ({@link MapObject}) located on this floor.
|
|
4439
4449
|
*
|
|
@@ -5829,6 +5839,12 @@ declare module '@mappedin/react-sdk/mappedin-js/src/map-data-objects/location-pr
|
|
|
5829
5839
|
* The location's website
|
|
5830
5840
|
*/
|
|
5831
5841
|
website?: Hyperlink;
|
|
5842
|
+
/**
|
|
5843
|
+
* The location's icon to display. Will be either a logo, category, or image
|
|
5844
|
+
*
|
|
5845
|
+
* @format uri
|
|
5846
|
+
*/
|
|
5847
|
+
icon?: string;
|
|
5832
5848
|
constructor(data: MapDataInternal, options: {
|
|
5833
5849
|
mvfData: MVFLocation;
|
|
5834
5850
|
});
|
|
@@ -6145,7 +6161,7 @@ declare module '@mappedin/react-sdk/geojson/src/components/marker' {
|
|
|
6145
6161
|
*/
|
|
6146
6162
|
enabled: boolean;
|
|
6147
6163
|
/**
|
|
6148
|
-
* Whether the
|
|
6164
|
+
* Whether the marker is visible IF is is enabled
|
|
6149
6165
|
* this can be used to have more granular control of whether the label shows up,
|
|
6150
6166
|
* for example, if someone implements a layer system that shows/hides
|
|
6151
6167
|
*/
|
|
@@ -7018,6 +7034,9 @@ declare module '@mappedin/react-sdk/geojson/src/components/label' {
|
|
|
7018
7034
|
_cache: {};
|
|
7019
7035
|
appearance: LabelAppearanceFillenIn;
|
|
7020
7036
|
options: LabelOptions;
|
|
7037
|
+
/**
|
|
7038
|
+
* Whether the anchored parent is visible.
|
|
7039
|
+
*/
|
|
7021
7040
|
visible: boolean;
|
|
7022
7041
|
enabled: boolean;
|
|
7023
7042
|
isOccluded: boolean;
|
|
@@ -7535,6 +7554,7 @@ declare module '@mappedin/react-sdk/geojson/src/types' {
|
|
|
7535
7554
|
* Fired when the synchronous tasks of the scene render are complete.
|
|
7536
7555
|
*/
|
|
7537
7556
|
'post-render': undefined;
|
|
7557
|
+
resize: undefined;
|
|
7538
7558
|
};
|
|
7539
7559
|
/**
|
|
7540
7560
|
* The payload of an event. See also {@link MapEvent}.
|
|
@@ -8569,10 +8589,12 @@ declare module '@mappedin/react-sdk/geojson/src/renderer' {
|
|
|
8569
8589
|
|
|
8570
8590
|
declare module '@mappedin/react-sdk/geojson/src/camera' {
|
|
8571
8591
|
import type { Mesh } from 'three';
|
|
8592
|
+
import { Vector3 } from 'three';
|
|
8572
8593
|
import type { RendererCore } from '@mappedin/react-sdk/geojson/src';
|
|
8573
8594
|
import type { Position as GeoJSONPosition } from 'geojson';
|
|
8574
|
-
import {
|
|
8595
|
+
import type { InsetPadding, Position, All3DTypes } from '@mappedin/react-sdk/geojson/src/types';
|
|
8575
8596
|
import type { InsetPaddingOption, RendererState, Systems } from '@mappedin/react-sdk/geojson/src/renderer';
|
|
8597
|
+
import { type LngLatBoundsLike } from '@packages/internal/outdoor-context-v4';
|
|
8576
8598
|
export type EasingCurve = 'ease-in' | 'ease-out' | 'ease-in-out' | 'linear';
|
|
8577
8599
|
export type AnimationOptions = {
|
|
8578
8600
|
duration?: number;
|
|
@@ -8588,6 +8610,7 @@ declare module '@mappedin/react-sdk/geojson/src/camera' {
|
|
|
8588
8610
|
minZoomLevel?: number;
|
|
8589
8611
|
maxZoomLevel?: number;
|
|
8590
8612
|
interruptible?: boolean;
|
|
8613
|
+
verticalPadding?: number;
|
|
8591
8614
|
};
|
|
8592
8615
|
export type AnimateToOptions = AnimationOptions & {
|
|
8593
8616
|
center?: Position;
|
|
@@ -8730,19 +8753,24 @@ declare module '@mappedin/react-sdk/geojson/src/camera' {
|
|
|
8730
8753
|
*/
|
|
8731
8754
|
setInsetPadding(padding: InsetPadding): void;
|
|
8732
8755
|
animateTo(options: AnimateToOptions): Promise<void>;
|
|
8733
|
-
getCameraFrameForCoordinates(coordinates: (GeoJSONPosition | Position)[], options?: FocusOnOptions): {
|
|
8756
|
+
getCameraFrameForCoordinates(coordinates: (GeoJSONPosition | Position | string)[], options?: FocusOnOptions): {
|
|
8734
8757
|
center: Position;
|
|
8735
8758
|
zoomLevel: number;
|
|
8736
8759
|
};
|
|
8737
8760
|
/**
|
|
8738
8761
|
* Focuses the camera on a set of coordinates, with optional animation
|
|
8739
8762
|
*
|
|
8740
|
-
* @param
|
|
8763
|
+
* @param target list of [longitude, latitude, altitude?] points
|
|
8741
8764
|
* @param options {FocusOnOptions}
|
|
8742
8765
|
* @returns Promise<void>
|
|
8743
8766
|
*/
|
|
8744
|
-
focusOn(
|
|
8767
|
+
focusOn(target: (GeoJSONPosition | Position | string)[], options?: FocusOnOptions): Promise<void>;
|
|
8745
8768
|
}
|
|
8769
|
+
export function processTargets(targets: (GeoJSONPosition | Position | string)[], core: RendererCore, geometry3DMap: Map<string | number, All3DTypes>): {
|
|
8770
|
+
pointCloud: Vector3[];
|
|
8771
|
+
geoBounds: LngLatBoundsLike;
|
|
8772
|
+
firstPosition: (Position | GeoJSONPosition) | null;
|
|
8773
|
+
};
|
|
8746
8774
|
}
|
|
8747
8775
|
|
|
8748
8776
|
declare module '@mappedin/react-sdk/geojson/examples/src/utils/scene-graph-visualizer' {
|
|
@@ -9205,7 +9233,7 @@ declare module '@mappedin/react-sdk/geojson/src/entities/utils' {
|
|
|
9205
9233
|
/** Sets a geometry to be in hovered state, until manually unset or the user interacts with it. */
|
|
9206
9234
|
export function updateHovered(entity: Geometry3D, update?: boolean): boolean;
|
|
9207
9235
|
export function updateFlipImageToFaceCamera(entity: EntityTypes, update?: boolean): void;
|
|
9208
|
-
export function updateVisibility(entity: EntityTypes, update?: boolean): boolean;
|
|
9236
|
+
export function updateVisibility(entity: EntityTypes, state: RendererState, update?: boolean): boolean;
|
|
9209
9237
|
export function updateOpacity(entity: Geometry3D | Geometry2D | GeometryGroupObject3D | GroupContainerObject3D, state: RendererState, update?: number): boolean;
|
|
9210
9238
|
export function updateGroupTexture(entity: Geometry3D | Geometry2D | GeometryGroupObject3D | GroupContainerObject3D, update?: Pick<GeometryGroupStyleComponent, 'texture' | 'topTexture'>): void;
|
|
9211
9239
|
export function updateIndividualGeometryTexture(entity: Geometry3D, update?: Pick<StyleComponent, 'texture' | 'topTexture'>): boolean;
|
|
@@ -9214,7 +9242,7 @@ declare module '@mappedin/react-sdk/geojson/src/entities/utils' {
|
|
|
9214
9242
|
export function updateOutline(entity: All3DTypes, update?: boolean): boolean;
|
|
9215
9243
|
export function updateFocusable(entity: Geometry3D, update?: boolean): boolean;
|
|
9216
9244
|
export function updateIndividualGeometryRenderOrder(entity: Geometry3D, update?: number): boolean;
|
|
9217
|
-
export function handlePathUpdate(geometry: Geometry3DTypes, update: PathUpdateState): void;
|
|
9245
|
+
export function handlePathUpdate(geometry: Geometry3DTypes, state: RendererState, update: PathUpdateState): void;
|
|
9218
9246
|
export function pickPathOptions(update: PathUpdateState): Partial<PathUpdateState>;
|
|
9219
9247
|
export function getEntityId(entityOrEntityId: Geometry2D | Geometry3DTypes | Geometry2DObject3D | Geometry3DObject3D | GeometryGroupObject3D | GroupContainerObject3D | string | number): any;
|
|
9220
9248
|
export function assetGeometryIsText3D(geometry: Geometry3DTypes): asserts geometry is TextGeometry3D;
|
|
@@ -9225,7 +9253,7 @@ declare module '@mappedin/react-sdk/geojson/src/entities/utils' {
|
|
|
9225
9253
|
/**
|
|
9226
9254
|
* Handle state update of the text3d geometry.
|
|
9227
9255
|
*/
|
|
9228
|
-
export function handleText3DUpdate(geometry: TextGeometry3D, update: Partial<Text3DState>): void;
|
|
9256
|
+
export function handleText3DUpdate(geometry: TextGeometry3D, state: RendererState, update: Partial<Text3DState>): void;
|
|
9229
9257
|
/**
|
|
9230
9258
|
* @internal
|
|
9231
9259
|
*/
|
|
@@ -9241,10 +9269,8 @@ declare module '@mappedin/react-sdk/geojson/src/utils' {
|
|
|
9241
9269
|
import type { Object3D, Camera as THREECamera } from 'three';
|
|
9242
9270
|
import { MercatorCoordinate } from '@mappedin/react-sdk/packages/outdoor-context-v4';
|
|
9243
9271
|
import type { CustomLayerInterface } from '@mappedin/react-sdk/packages/outdoor-context-v4';
|
|
9244
|
-
import type { GeometryGroupObject3D } from '@mappedin/react-sdk/geojson/src/entities/geometry-group';
|
|
9245
9272
|
import type { GroupContainerObject3D } from '@mappedin/react-sdk/geojson/src/entities/group-container';
|
|
9246
9273
|
import type { Geometry2D } from '@mappedin/react-sdk/geojson/src/entities/geometry2d';
|
|
9247
|
-
import type { Geometry3DTypes } from '@mappedin/react-sdk/geojson/src/entities/geometry3d';
|
|
9248
9274
|
import type { Position, RendererState } from '@mappedin/react-sdk/geojson/src/renderer';
|
|
9249
9275
|
import type { Camera } from '@mappedin/react-sdk/geojson/src/camera';
|
|
9250
9276
|
export { isFiniteBox } from '@packages/internal/common';
|
|
@@ -9312,9 +9338,9 @@ declare module '@mappedin/react-sdk/geojson/src/utils' {
|
|
|
9312
9338
|
* so OR = CO * tan(F/2)
|
|
9313
9339
|
*/
|
|
9314
9340
|
export function getProjectionScaleFactor(FOV: number, canvasHeight: number, zoom: number): number;
|
|
9315
|
-
export function getGeometryByGeometryId(state: RendererState, geometryOrGeometryId?: string | number | Record<string, any>): Geometry3DTypes | GeometryGroupObject3D | GroupContainerObject3D | Geometry2D | undefined;
|
|
9316
9341
|
export function getBoundingBoxCenter(bbox: Position[]): [number, number];
|
|
9317
9342
|
export { getCornersOfBoundingBox } from '@mappedin/react-sdk/geojson/src/utils/bounding-box';
|
|
9343
|
+
export { getGeometryByGeometryId } from '@mappedin/react-sdk/geojson/src/utils/ecs';
|
|
9318
9344
|
export { getPixelRatio } from '@mappedin/react-sdk/geojson/src/utils/get-pixel-ratio';
|
|
9319
9345
|
export { debounce } from '@mappedin/react-sdk/geojson/src/utils/async';
|
|
9320
9346
|
export { shouldDisableOffscreenCanvas } from '@mappedin/react-sdk/geojson/src/utils/browser';
|
|
@@ -9685,6 +9711,7 @@ declare module '@mappedin/react-sdk/mappedin-js/src/api-geojson/map-object' {
|
|
|
9685
9711
|
Models: {
|
|
9686
9712
|
add: (id: string, targets: Coordinate[], opts: TAddModelOptions & {
|
|
9687
9713
|
floorId?: string;
|
|
9714
|
+
url: string;
|
|
9688
9715
|
}) => (import("@mappedin/core-sdk").GeometryState | import("@mappedin/core-sdk").ModelState)[];
|
|
9689
9716
|
remove: (_id: string, _groupId: string) => void;
|
|
9690
9717
|
};
|
|
@@ -9823,6 +9850,7 @@ declare module '@mappedin/react-sdk/mappedin-js/src/map-view-objects/marker' {
|
|
|
9823
9850
|
*/
|
|
9824
9851
|
static readonly __type = "Marker";
|
|
9825
9852
|
get target(): IAnchorable;
|
|
9853
|
+
get coordinate(): import("..").Coordinate;
|
|
9826
9854
|
/**
|
|
9827
9855
|
* @internal
|
|
9828
9856
|
*/
|
|
@@ -10017,7 +10045,7 @@ declare module '@mappedin/react-sdk/mappedin-js/src/map-view-objects/text3d' {
|
|
|
10017
10045
|
|
|
10018
10046
|
declare module '@mappedin/react-sdk/mappedin-js/src/api-geojson/camera' {
|
|
10019
10047
|
import type { IFocusable, TCameraAnimationOptions, TCameraTarget, TFocusOnOptions, TCameraInteractionsSetOptions } from '@mappedin/react-sdk/mappedin-js/src/types';
|
|
10020
|
-
import {
|
|
10048
|
+
import type { InsetPadding } from '@mappedin/core-sdk';
|
|
10021
10049
|
import { Coordinate } from '@mappedin/react-sdk/mappedin-js/src/map-data-objects';
|
|
10022
10050
|
import type { GeoJsonApi } from '@mappedin/react-sdk/mappedin-js/src/api-geojson/api';
|
|
10023
10051
|
/**
|
|
@@ -10228,7 +10256,7 @@ declare module '@mappedin/react-sdk/mappedin-js/src/api-geojson/labels' {
|
|
|
10228
10256
|
/**
|
|
10229
10257
|
* Adds a label ({@link Label}) to the map.
|
|
10230
10258
|
*
|
|
10231
|
-
* @param target The target object ({@link
|
|
10259
|
+
* @param target The target object ({@link IAnchorable}) where the label should be added.
|
|
10232
10260
|
* @param text The text of the label.
|
|
10233
10261
|
* @param options Optional additional options for the label.
|
|
10234
10262
|
* @returns {Label | undefined} The created label, or undefined if creation failed.
|
|
@@ -10302,7 +10330,7 @@ declare module '@mappedin/react-sdk/mappedin-js/src/api-geojson/markers' {
|
|
|
10302
10330
|
/**
|
|
10303
10331
|
* Adds a marker to the map.
|
|
10304
10332
|
*
|
|
10305
|
-
* @param target The target object ({@link
|
|
10333
|
+
* @param target The target object ({@link IAnchorable}) for the marker.
|
|
10306
10334
|
* @param html The HTML content for the {@link Marker}.
|
|
10307
10335
|
* @param options Optional additional options for the {@link Marker}.
|
|
10308
10336
|
* @returns {Marker | undefined} The created {@link Marker}, or undefined if creation failed.
|
|
@@ -10407,7 +10435,7 @@ declare module '@mappedin/react-sdk/mappedin-js/src/api-geojson/models' {
|
|
|
10407
10435
|
* });
|
|
10408
10436
|
* ```
|
|
10409
10437
|
*/
|
|
10410
|
-
add(coordinate: Coordinate, url: string, options
|
|
10438
|
+
add(coordinate: Coordinate, url: string, options?: TAddModelOptions): Model;
|
|
10411
10439
|
/**
|
|
10412
10440
|
* Removes a model from the map.
|
|
10413
10441
|
*
|
|
@@ -10896,7 +10924,7 @@ declare module '@mappedin/react-sdk/mappedin-js/src/api-geojson/images' {
|
|
|
10896
10924
|
/**
|
|
10897
10925
|
* Adds an image to the map.
|
|
10898
10926
|
*
|
|
10899
|
-
* @param target The target object ({@link
|
|
10927
|
+
* @param target The target object ({@link IAnchorable}) for the image.
|
|
10900
10928
|
* @param url The URL of the image.
|
|
10901
10929
|
* @param options Optional additional options for the {@link Image}.
|
|
10902
10930
|
* @returns {Image | undefined} The created {@link Image}, or undefined if creation failed.
|
|
@@ -11574,6 +11602,7 @@ declare module '@mappedin/react-sdk/mappedin-js/src/map-data-objects/detailed-ma
|
|
|
11574
11602
|
}
|
|
11575
11603
|
|
|
11576
11604
|
declare module '@mappedin/react-sdk/mappedin-js/src/map-data-objects/base-object' {
|
|
11605
|
+
import type { BBox, Feature, LineString, MultiPolygon, Point, Polygon } from 'geojson';
|
|
11577
11606
|
import type { MapDataInternal } from '@mappedin/react-sdk/mappedin-js/src/map-data-objects';
|
|
11578
11607
|
export default abstract class BaseMapData {
|
|
11579
11608
|
#private;
|
|
@@ -11587,12 +11616,8 @@ declare module '@mappedin/react-sdk/mappedin-js/src/map-data-objects/base-object
|
|
|
11587
11616
|
*
|
|
11588
11617
|
* @returns {BBox} The bounding box of the geoJSON geometry
|
|
11589
11618
|
*/
|
|
11590
|
-
get geoJSONBoundingBox():
|
|
11591
|
-
get geoJSON():
|
|
11592
|
-
properties: null;
|
|
11593
|
-
type: string;
|
|
11594
|
-
geometry: {};
|
|
11595
|
-
};
|
|
11619
|
+
get geoJSONBoundingBox(): BBox | undefined;
|
|
11620
|
+
get geoJSON(): Feature<Polygon | MultiPolygon | LineString | Point, null>;
|
|
11596
11621
|
}
|
|
11597
11622
|
}
|
|
11598
11623
|
|
|
@@ -12767,7 +12792,7 @@ declare module '@mappedin/react-sdk/geojson/src/systems/geometry-in-focus/system
|
|
|
12767
12792
|
focusablesDirty: boolean;
|
|
12768
12793
|
constructor(state: RendererState, camera: PerspectiveCamera);
|
|
12769
12794
|
resize(): void;
|
|
12770
|
-
update: (cameraIsMoving?: boolean) => void;
|
|
12795
|
+
update: (cameraIsMoving?: boolean, cameraStoppedMovingTime?: number) => void;
|
|
12771
12796
|
updateRaf(): void;
|
|
12772
12797
|
showRaycasters(): void;
|
|
12773
12798
|
hideRaycasters(): void;
|
|
@@ -12915,6 +12940,17 @@ declare module '@mappedin/react-sdk/geojson/src/utils/bounding-box' {
|
|
|
12915
12940
|
export function getCornersOfBoundingBox(boundingBox: Box3): Vector3[];
|
|
12916
12941
|
}
|
|
12917
12942
|
|
|
12943
|
+
declare module '@mappedin/react-sdk/geojson/src/utils/ecs' {
|
|
12944
|
+
import type { Geometry2D, Geometry3DTypes } from '@mappedin/react-sdk/geojson/src/entities';
|
|
12945
|
+
import type { GroupContainerObject3D } from '@mappedin/react-sdk/geojson/src/entities/group-container';
|
|
12946
|
+
import type { GeometryGroupObject3D } from '@mappedin/react-sdk/geojson/src/entities/geometry-group';
|
|
12947
|
+
import type { EntityId, EntityState, RendererState } from '@mappedin/react-sdk/geojson/src/renderer';
|
|
12948
|
+
import { Box3, Vector3 } from 'three';
|
|
12949
|
+
import type RendererCore from '@mappedin/react-sdk/geojson/src/renderer';
|
|
12950
|
+
export function getGeometryByGeometryId(state: RendererState, geometryOrGeometryId?: string | number | Record<string, any>): Geometry3DTypes | GeometryGroupObject3D | GroupContainerObject3D | Geometry2D | undefined;
|
|
12951
|
+
export function getVerticesOfEntity(core: RendererCore, geometryOrGeometryId?: string | number | EntityId<EntityState>, vertices?: Vector3[], bounds?: Box3): Vector3[];
|
|
12952
|
+
}
|
|
12953
|
+
|
|
12918
12954
|
declare module '@mappedin/react-sdk/geojson/src/utils/get-pixel-ratio' {
|
|
12919
12955
|
export function getPixelRatio(): number;
|
|
12920
12956
|
}
|
|
@@ -13844,6 +13880,12 @@ declare module '@mappedin/react-sdk/geojson/src/systems/camera/system' {
|
|
|
13844
13880
|
* @return {Boolean} True if the camera is moving, false otherwise.
|
|
13845
13881
|
*/
|
|
13846
13882
|
isCameraMoving: () => boolean;
|
|
13883
|
+
/**
|
|
13884
|
+
* Returns the most recent time the camera stopped moving.
|
|
13885
|
+
*
|
|
13886
|
+
* @returns {Number} The time in ms the camera stopped moving.
|
|
13887
|
+
*/
|
|
13888
|
+
lastCameraStoppedMovingTime: () => number;
|
|
13847
13889
|
/**
|
|
13848
13890
|
* Sets the camera anchor to a specifc x/y positon, in the global reference frame. 0,0 will be roughly the middle of the map, and panBounds holds the min/max points.
|
|
13849
13891
|
*
|
|
@@ -14028,7 +14070,7 @@ declare module '@mappedin/react-sdk/geojson/src/systems/camera/system' {
|
|
|
14028
14070
|
resize(canvasWidth: number, canvasHeight: number): void;
|
|
14029
14071
|
}
|
|
14030
14072
|
export { CameraSystem };
|
|
14031
|
-
export function getCameraFrameForPoints(pointCloud: Vector3[], { canvasWidth, orbit, paddingOption, canvasHeight, minZoom, maxZoom, camera, position, }: {
|
|
14073
|
+
export function getCameraFrameForPoints(pointCloud: Vector3[], { canvasWidth, orbit, paddingOption, verticalPadding, canvasHeight, minZoom, maxZoom, camera, position, }: {
|
|
14032
14074
|
paddingOption: InsetPadding;
|
|
14033
14075
|
canvasWidth: number;
|
|
14034
14076
|
canvasHeight: number;
|
|
@@ -14037,6 +14079,7 @@ declare module '@mappedin/react-sdk/geojson/src/systems/camera/system' {
|
|
|
14037
14079
|
orbit: Object3D;
|
|
14038
14080
|
camera: PerspectiveCamera;
|
|
14039
14081
|
position: Vector3;
|
|
14082
|
+
verticalPadding?: number;
|
|
14040
14083
|
}): {
|
|
14041
14084
|
position: Vector3;
|
|
14042
14085
|
zoom: number;
|
|
@@ -14178,6 +14221,7 @@ declare module '@mappedin/react-sdk/geojson/src/systems/camera/types' {
|
|
|
14178
14221
|
callback?: () => void;
|
|
14179
14222
|
cancelledCallback?: () => void;
|
|
14180
14223
|
interruptible?: boolean;
|
|
14224
|
+
verticalPadding?: number;
|
|
14181
14225
|
};
|
|
14182
14226
|
}
|
|
14183
14227
|
|
|
@@ -14197,6 +14241,7 @@ declare module '@mappedin/react-sdk/geojson/src/systems/camera/constants' {
|
|
|
14197
14241
|
export const MAX_MERCATOR_ZOOM_LEVEL = 24;
|
|
14198
14242
|
export const BLOCK_MERCATOR_ZOOM_LEVEL = 17;
|
|
14199
14243
|
export const ROOM_MERCATOR_ZOOM_LEVEL = 20;
|
|
14244
|
+
export const DEFAULT_ANIMATION_DURATION = 200;
|
|
14200
14245
|
export const EVENTS: readonly ["change", "pan-start", "pan-end", "rotate-start", "rotate-end", "zoom-start", "zoom-end", "multi-start", "multi-end", "multi-cancel", "pedestal-start", "pedestal-change", "pedestal-end", "user-pan-start", "user-pedestal-start", "user-rotate-start", "user-dolly-start", "user-zoom-start", "user-tilt-start", "user-pan-end", "user-pedestal-end", "user-rotate-end", "user-dolly-end", "user-zoom-end", "user-tilt-end", "position-updated", "zoom-updated", "tilt-updated", "rotation-updated"];
|
|
14201
14246
|
export const DEFAULT_ZOOM_LEVEL = 18;
|
|
14202
14247
|
export const DEFAULT_MIN_ZOOM_LEVEL = 12;
|
package/lib/esm/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{i as E,j as V,k}from"./chunk-
|
|
1
|
+
import{i as E,j as V,k}from"./chunk-LFITSL3C.js";import{c as x,n as A}from"./chunk-VV4S4DVY.js";import"./chunk-3P72EF44.js";import"./chunk-CMW7BW7B.js";import"./chunk-XLDX33Q3.js";import{a}from"./chunk-WJAP5OMF.js";import{a as n}from"./chunk-BYMKRV3A.js";a();a();import Y,{useCallback as $,useMemo as q}from"react";import{useContext as C,useEffect as T,useRef as S,useState as D}from"react";import{createPortal as B}from"react-dom";a();import{createContext as z,useContext as F}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=z({mapData:void 0,mapView:void 0});function G(){let{mapData:e,mapView:t}=F(p);if(!e||!t)throw new m("useMap");return{mapData:e,mapView:t}}n(G,"useMap");a();import{useEffect as U}from"react";function u(e,t){U(()=>{t!=null&&typeof e=="function"&&e(t)},[e,t])}n(u,"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]),u(e.onLoad,o),t==null||o==null?null:B(e.children,o.contentEl,o.id)}n(O,"Marker");function J(e){let{mapView:t}=C(p),[r,o]=D(null),i=S(A()),l=S(e.target),f=$(s=>{var M;o(s),(M=e.onLoad)==null||M.call(e,s)},[e.onLoad]);T(()=>{if(t==null)throw new m("Marker");if(r&&r.target!==e.target){let{duration:s=300,easing:M="linear"}=e;t.Markers.animateTo(r,e.target,{duration:s,easing:M})}},[t,e.target,r]);let c=q(()=>({...e,duration:void 0,easing:void 0}),[e.duration,e.easing]);return Y.createElement(O,{...c,key:i.current,target:l.current,onLoad:f})}n(J,"AnimatedMarker");a();import{useContext as K,useEffect as R,useRef as Q,useState as X}from"react";function Z(e){let{mapView:t}=K(p),r=Q(),[o,i]=X(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]),u(e.onLoad,o),null}n(Z,"Label");a();import{useCallback as _,useContext as ee,useEffect as te}from"react";function re(e,t){let{mapView:r}=ee(p),o=_(i=>t(i),[t]);te(()=>{if(r==null)throw new m("useEvent");return r.on(e,o),()=>{r!=null&&r.off(e,o)}},[r,e,t])}n(re,"useEvent");a();import{useContext as ae,useEffect as oe,useRef as ne,useState as ie}from"react";function pe(e){let{mapView:t}=ae(p),r=ne(),[o,i]=ie(void 0);return oe(()=>{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]),u(e.onLoad,o),null}n(pe,"Path");a();import w,{useCallback as me,useEffect as ue,useMemo as de,useRef as j,useState as W}from"react";var se={width:"100%",height:"100%",position:"relative"};function le(e){let{mapData:t,options:r,style:o,fallback:i,children:l,...f}=e,c=j(!1),[s,M]=W(void 0),[h,P]=W(!0),y=j(null),b=de(()=>r,[]),v=me(()=>{if(t&&(y!=null&&y.current)){if(s)return;V(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 ue(()=>{c.current||(c.current=!0,v())},[v]),u(e.onLoad,s),w.createElement(p.Provider,{value:{mapData:t,mapView:s}},w.createElement("div",{"data-testid":"mappedin-map",ref:y,style:{...se,...o},...f}),h?w.createElement(w.Fragment,null,i):l)}n(le,"MapView");a();import{useContext as fe,useEffect as H,useState as ce}from"react";function Me(e){let{mapView:t}=fe(p),[r,o]=ce(!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(Me,"Navigation");a();import{useContext as Pe,useEffect as ye,useRef as he,useState as xe}from"react";function we(e){let{mapView:t}=Pe(p),r=he(),[o,i]=xe(void 0);return ye(()=>{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]),u(e.onLoad,o),null}n(we,"Shape");a();import{useContext as ge,useEffect as I,useRef as Le,useState as Te}from"react";function Se(e){let{mapView:t}=ge(p),r=Le(),[o,i]=Te(void 0);return I(()=>{if(t==null)throw new m("Model");return r.current=t.Models.add(e.target,e.url,e.options),i(r.current),()=>{t==null||r.current==null||t.Models.remove(r.current)}},[t,e.url]),I(()=>{r.current&&(t==null||t.updateState(r.current,{position:e.target,...e.options}))},[e.options,e.target]),u(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 Ee(e){let[t,r]=N(void 0),[o,i]=N(!0),[l,f]=N(void 0),c=Ae(0),s=ve(()=>e,[]),M=Ne(()=>{let h=++c.current;i(!0),f(void 0),E(s).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)})},[s]);return be(()=>{M()},[M]),{mapData:t,isLoading:o,error:l}}n(Ee,"useMapData");var Xt=k;export{J as AnimatedMarker,Z as Label,le as MapView,O as Marker,Se as Model,Me as Navigation,pe as Path,we as Shape,Xt as default,re as useEvent,G as useMap,Ee as useMapData};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as Me,c as J,f as P,g as W,h as Ee}from"./chunk-LFITSL3C.js";import{o as U}from"./chunk-VV4S4DVY.js";import"./chunk-3P72EF44.js";import"./chunk-CMW7BW7B.js";import{S as ke}from"./chunk-XLDX33Q3.js";import{a as C}from"./chunk-WJAP5OMF.js";import{a as n,f as T,g as x,h as D,i as Ae,j as B}from"./chunk-BYMKRV3A.js";C();C();C();C();var z=class z{constructor(e,o,t,r,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(r),this.$name=document.createElement("div"),this.$name.classList.add("name"),z.nextNameID=z.nextNameID||0,this.$name.id="lil-gui-name-".concat(++z.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",s=>s.stopPropagation()),this.domElement.addEventListener("keyup",s=>s.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)}};n(z,"Controller");var L=z,re=class re 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}};n(re,"BooleanController");var V=re;function ee(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}n(ee,"normalizeColorString");var Je={isPrimitive:!0,match:n(i=>typeof i=="string","match"),fromHexString:ee,toHexString:ee},j={isPrimitive:!0,match:n(i=>typeof i=="number","match"),fromHexString:n(i=>parseInt(i.substring(1),16),"fromHexString"),toHexString:n(i=>"#"+i.toString(16).padStart(6,0),"toHexString")},We={isPrimitive:!1,match:n(i=>Array.isArray(i),"match"),fromHexString(i,e,o=1){let t=j.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 r=i*t<<16^e*t<<8^o*t<<0;return j.toHexString(r)}},Xe={isPrimitive:!1,match:n(i=>Object(i)===i,"match"),fromHexString(i,e,o=1){let t=j.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 r=i*t<<16^e*t<<8^o*t<<0;return j.toHexString(r)}},Ke=[Je,j,We,Xe];function Ze(i){return Ke.find(e=>e.match(i))}n(Ze,"getColorFormat");var se=class se extends L{constructor(e,o,t,r){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=Ze(this.initialValue),this._rgbScale=r,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=ee(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}};n(se,"ColorController");var te=se,ae=class ae 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",r=>{r.preventDefault(),this.getValue().call(this.object),this._callOnChange()}),this.$button.addEventListener("touchstart",()=>{},{passive:!0}),this.$disable=this.$button}};n(ae,"FunctionController");var H=ae,le=class le extends L{constructor(e,o,t,r,a,s){super(e,o,t,"number"),this._initInput(),this.min(r),this.max(a);let l=s!==void 0;this.step(l?s:this._getImplicitStep(),l),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=n(()=>{let v=parseFloat(this.$input.value);isNaN(v)||(this._stepExplicit&&(v=this._snap(v)),this.setValue(this._clamp(v)))},"onInput"),t=n(v=>{let k=parseFloat(this.$input.value);isNaN(k)||(this._snapClampSetValue(k+v),this.$input.value=this.getValue())},"increment"),r=n(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=n(v=>{this._inputFocused&&(v.preventDefault(),t(this._step*this._normalizeMouseWheel(v)))},"onWheel"),s=!1,l,d,g,h,p,f=5,c=n(v=>{l=v.clientX,d=g=v.clientY,s=!0,h=this.getValue(),p=0,window.addEventListener("mousemove",u),window.addEventListener("mouseup",b)},"onMouseDown"),u=n(v=>{if(s){let k=v.clientX-l,O=v.clientY-d;Math.abs(O)>f?(v.preventDefault(),this.$input.blur(),s=!1,this._setDraggingStyle(!0,"vertical")):Math.abs(k)>f&&b()}if(!s){let k=v.clientY-g;p-=k*this._step*this._arrowKeyMultiplier(v),h+p>this._max?p=this._max-h:h+p<this._min&&(p=this._min-h),this._snapClampSetValue(h+p)}g=v.clientY},"onMouseMove"),b=n(()=>{this._setDraggingStyle(!1,"vertical"),this._callOnFinishChange(),window.removeEventListener("mousemove",u),window.removeEventListener("mouseup",b)},"onMouseUp"),y=n(()=>{this._inputFocused=!0},"onFocus"),m=n(()=>{this._inputFocused=!1,this.updateDisplay(),this._callOnFinishChange()},"onBlur");this.$input.addEventListener("input",o),this.$input.addEventListener("keydown",r),this.$input.addEventListener("wheel",a,{passive:!1}),this.$input.addEventListener("mousedown",c),this.$input.addEventListener("focus",y),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=n((m,v,k,O,R)=>(m-v)/(k-v)*(R-O)+O,"map"),o=n(m=>{let v=this.$slider.getBoundingClientRect(),k=e(m,v.left,v.right,this._min,this._max);this._snapClampSetValue(k)},"setValueFromX"),t=n(m=>{this._setDraggingStyle(!0),o(m.clientX),window.addEventListener("mousemove",r),window.addEventListener("mouseup",a)},"mouseDown"),r=n(m=>{o(m.clientX)},"mouseMove"),a=n(()=>{this._callOnFinishChange(),this._setDraggingStyle(!1),window.removeEventListener("mousemove",r),window.removeEventListener("mouseup",a)},"mouseUp"),s=!1,l,d,g=n(m=>{m.preventDefault(),this._setDraggingStyle(!0),o(m.touches[0].clientX),s=!1},"beginTouchDrag"),h=n(m=>{m.touches.length>1||(this._hasScrollBar?(l=m.touches[0].clientX,d=m.touches[0].clientY,s=!0):g(m),window.addEventListener("touchmove",p,{passive:!1}),window.addEventListener("touchend",f))},"onTouchStart"),p=n(m=>{if(s){let v=m.touches[0].clientX-l,k=m.touches[0].clientY-d;Math.abs(v)>Math.abs(k)?g(m):(window.removeEventListener("touchmove",p),window.removeEventListener("touchend",f))}else m.preventDefault(),o(m.touches[0].clientX)},"onTouchMove"),f=n(()=>{this._callOnFinishChange(),this._setDraggingStyle(!1),window.removeEventListener("touchmove",p),window.removeEventListener("touchend",f)},"onTouchEnd"),c=this._callOnFinishChange.bind(this),u=400,b,y=n(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(c,u)},"onWheel");this.$slider.addEventListener("mousedown",t),this.$slider.addEventListener("touchstart",h,{passive:!1}),this.$slider.addEventListener("wheel",y,{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}};n(le,"NumberController");var ie=le,de=class de extends L{constructor(e,o,t,r){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(r)}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}};n(de,"OptionController");var oe=de,ce=class ce 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",r=>{r.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}};n(ce,"StringController");var ne=ce,Qe='.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 qe(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)}n(qe,"_injectStyles");var _e=!1,X=class X{constructor({parent:e,autoPlace:o=e===void 0,container:t,width:r,title:a="Controls",closeFolders:s=!1,injectStyles:l=!0,touchStyles:d=!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",g=>{(g.code==="Enter"||g.code==="Space")&&(g.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"),d&&this.domElement.classList.add("allow-touch-styles"),!_e&&l&&(qe(Qe),_e=!0),t?t.appendChild(this.domElement):o&&(this.domElement.classList.add("autoPlace"),document.body.appendChild(this.domElement)),r&&this.domElement.style.setProperty("--width",r+"px"),this._closeFolders=s}add(e,o,t,r,a){if(Object(t)===t)return new oe(this,e,o,t);let s=e[o];switch(typeof s){case"number":return new ie(this,e,o,t,r,a);case"boolean":return new V(this,e,o);case"string":return new ne(this,e,o);case"function":return new H(this,e,o)}console.error("gui.add failed\n property:",o,"\n object:",e,"\n value:",s)}addColor(e,o,t=1){return new te(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 H||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 H)){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=n(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 r=e?this.$children.scrollHeight:0;this.domElement.classList.toggle("closed",!e),requestAnimationFrame(()=>{this.$children.style.height=r+"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}};n(X,"GUI");var G=X,K=G;C();C();var w=(()=>{let i=new ke;return n(function(o){return i.set(o),"#".concat(i.getHexString())},"normalize")})();function we(i){let e;for(e of i)e()}n(we,"runAll");function he(i,e){let o=window.location.href,t=new URL(o),r=new URLSearchParams(t.search);for(let a in i)if(i.hasOwnProperty(a)){let s="".concat(e,".").concat(a);r.set(s,i[a])}t.search=r.toString(),history.pushState({path:t.toString()},"",t.toString())}n(he,"updateCurrentUrlParamsWithNamespace");function ue(i,e){let o=new URLSearchParams(window.location.search),t={};for(let[r,a]of o)if(r.startsWith("".concat(i,"."))){let s=r.slice(i.length+1);a==="true"||a==="false"?t[s]=a==="true":typeof(e==null?void 0:e[s])=="number"?t[s]=Number(a):t[s]=a}return{namespace:i,params:t}}n(ue,"getUrlParamsWithNamespace");var Ve=["interactive"];function Z(i,e,o){var r,a;let t=o.addFolder("".concat(e.type,"-").concat(e.id));for(let s in e){if(s==="visible"&&t.add(e,s).onChange(l=>{i.updateState(e.id,{[s]:l})}),s==="color"||s==="hoverColor"){e[s]=w(e[s]),t.addColor(e,s).onChange(l=>{i.updateState(e.id,{[s]:l})});continue}if(s==="height"){t.add(e,s,0,20,1).onChange(l=>{i.updateState(e.id,{[s]:l})});continue}if(s==="texture"&&e.texture){(r=t.addFolder("Texture - side").add(e,"texture"))==null||r.onChange(d=>{i.updateState(e.id,{texture:{url:d}})});continue}if(s==="topTexture"&&e.topTexture){(a=t.addFolder("Texture - top").add(e,"topTexture"))==null||a.onChange(d=>{i.updateState(e.id,{topTexture:{url:d}})});continue}if(s==="opacity"){t.add(e,s,0,1,.1).onChange(l=>{i.updateState(e.id,{[s]:l})});continue}Ve.includes(s)&&t.add(e,s).onChange(l=>{i.updateState(e.id,{[s]:l})})}return e.isInView&&(t.add(e,"isInView").listen().disable(),t.add(e,"isInViewCheck")),{cleanup(){t.destroy()}}}n(Z,"renderByProp");C();C();function et(){let i=[];function e(r,a){var d;let s=Object.values(r.getMapData())[0],l=a;if(l&&J.is(l)){let g=(d=s.getByType("enterprise-location"))==null?void 0:d.find(h=>h.spaces.some(p=>p.id===l.id));g&&(l=g)}return l}n(e,"getHighlightTarget");async function o(r,a){return a instanceof W?r.Camera.focusOn(a.locations.flatMap(s=>s.spaces),Y):a instanceof P?r.Camera.focusOn(a.spaces,Y):r.Camera.focusOn(a,Y)}n(o,"focusOn");function t(r,a,{focus:s=!1}={}){if(!window.enableHighlightCard)return()=>{};let l=e(r,a),d=document.createElement("div");if(d.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 l){let h=document.createElement("h3");h.textContent=l.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 ",d.appendChild(h)}if(l instanceof P){if(l.description){let h=document.createElement("p");h.textContent=l.description,h.style.cssText="\n margin: 0 0 16px;\n font-size: 14px;\n color: #b0b0b0;\n line-height: 1.5;\n ",d.appendChild(h)}if(l.tags&&l.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 ",l.tags.forEach(p=>{let f=document.createElement("span");f.textContent=p,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)}),d.appendChild(h)}}let g;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 p=r.getState(a);p&&(Z(r,{id:a.id,...p},h),d.appendChild(h.domElement)),g=h}return document.body.appendChild(d),s&&o(r,l),()=>{d.style.opacity="0",d.style.transform="translateY(-10px)",setTimeout(()=>d.remove(),300),g==null||g.destroy()}}return n(t,"highlightCard"),{highlightCard:t,highlight:n((r,a,{focus:s=!0}={})=>{i.length>0&&i.forEach(d=>r.Markers.remove(d));let l=e(r,a);if(l instanceof P)s&&r.Camera.focusOn(l.spaces,Y),i.push(...l.spaces.map(d=>r.Markers.add(d,'<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(l.name,"</h3>\n ").concat(l.description?'<p style="margin: 0 0 10px; color: #666; font-size: 14px; font-weight: 400;">'.concat(l.description,"</p>"):"","\n ").concat(l.tags?l.tags.map(g=>'<span style="display: inline-block; padding: 3px 8px; background-color: #e0f2f1; color: #00796b; border-radius: 12px; font-size: 12px;">'.concat(g,"</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(l instanceof W){s&&r.Camera.focusOn(l.locations.flatMap(h=>h.spaces),Y);let d=new Map,g=new Set;l.locations.forEach(h=>{d.has(h.name)||(h.spaces.forEach(p=>{i.push(r.Markers.add(p,'<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"}))}),d.set(h.name,!0))}),l.locations.forEach(h=>{h.coordinates.forEach(p=>{let f="".concat(p.latitude,",").concat(p.longitude);if(!g.has(f)&&!d.has(h.name)){let c=r.Markers.add(p,'<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"});g.add(f),i.push(c)}})})}return()=>{i.forEach(d=>r.Markers.remove(d))}},"highlight")}}n(et,"createHighlightControl");var Y={duration:300,easing:"ease-in-out"},Q=et();C();var _={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 tt(i){i.add(_.options.places.fields,"name").name("Places: Name"),i.add(_.options.places.fields,"description").name("Places: Description"),i.add(_.options.places.fields,"link").name("Places: Link"),i.add(_.options.places.fields,"category").name("Places: Category"),i.add(_.options.places,"limit"),i.add(_.options.locations.fields,"name").name("Locations: Name"),i.add(_.options.locations.fields,"tag").name("Locations: Tag"),i.add(_.options.locations.fields,"description").name("Locations: Description"),i.add(_.options.places,"limit"),i.add(_.options.categories.fields,"name").name("Categories: Name")}n(tt,"createAdvancedSettings");function Fe(i,e,o){var h;let t=new U,r=o.addFolder("Search");r.open();let a=r.add(_,"search").onChange(async p=>{let f=await e.Search.query(p,_.options);f&&(_.results=f,l(f,t))}),s=document.createElement("div");s.style.marginLeft="10px",(h=a.domElement.parentElement)==null||h.appendChild(s);let{renderSearch:l,close:d}=it(i,e,s,a.$input),g=r.addFolder("Advanced");return g.close(),tt(g),document.addEventListener("keydown",p=>{(p.metaKey||p.ctrlKey)&&p.key==="k"?(p.preventDefault(),r._closed&&r.open(),a.$input.focus()):p.key==="Escape"&&(d(),t.publish("highlight",void 0))}),{pubsub:t}}n(Fe,"createSearchControl");function it(i,e,o,t){let r,a;t.addEventListener("input",async l=>{l instanceof InputEvent&&(l.inputType==="insertText"||l.inputType==="insertCompositionText")&&(clearTimeout(r),r=setTimeout(async()=>{var g;let d=await e.Search.suggest(t.value);d&&d.length>0&&s((g=d[0])==null?void 0:g.suggestion)},100))});function s(l){if(!l){t.placeholder="";return}let d=t.value;t.value=l,t.setSelectionRange(d.length,l.length)}return n(s,"renderSuggestion"),{renderSearch(l,d){var g,h;if(l.places.length===0&&((g=l.enterpriseCategories)==null?void 0:g.length)===0&&((h=l.enterpriseLocations)==null?void 0:h.length)===0){o.textContent="No results found.";return}a=ot(o,l,i,d)},close(){a.destroy()}}}n(it,"mount");function ot(i,e,o,t){i.innerHTML="";let r=document.createElement("div");Object.assign(r.style,q.dropdownContainer);let a=document.createElement("ul");a.className="options-list",Object.assign(a.style,q.optionsList),a.style.display="block";let s=[],l=n((f,c)=>{if(c&&c.length>0){let u=document.createElement("li");u.textContent=f,Object.assign(u.style,q.sectionHeader),a.appendChild(u),c.forEach((b,y)=>{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",()=>{g(s.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",y.toString()),a.appendChild(m),s.push(m)})}},"addSection");l("enterpriseLocations",e.enterpriseLocations),l("enterpriseCategories",e.enterpriseCategories),l("Places",e.places),r.appendChild(a),i.appendChild(r);let d=[],g=n(f=>{d.forEach(m=>m()),d=[],s.forEach((m,v)=>{v===f?m.style.backgroundColor="#e0e0e0":m.style.backgroundColor=""});let c=s[f],u=c.getAttribute("data-type"),b=parseInt(c.getAttribute("data-index")||"0",10);if(!u)return;let{item:y}=e[u.toLowerCase()][b];t.publish("highlight",y)},"highlightOption"),h=n(f=>{!r.contains(f.target)&&f.target!==i&&p()},"handleClickOutside");document.addEventListener("click",h);let p=n(()=>{i.innerHTML="",document.removeEventListener("click",h)},"destroy");return{destroy(){i.innerHTML="",t.publish("highlight",void 0)}}}n(ot,"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 Se(i,e,o){o.domElement.id="interactionPanel";let t=[],{pubsub:r}=Fe(i,e,o);r.on("highlight",h=>{if(h){t.forEach(f=>f()),t=[];let p=h instanceof P?h.spaces[0]:h;if(i.Camera.focusOn(h),p&&!J.is(p))return;t.push(Q.highlightCard(i,p,{focus:!0}))}else t.forEach(p=>p()),t=[]});let a=o.addFolder("Click \u{1F447}").close(),{sub:s}=nt(i,a);s.on("click",h=>{t.forEach(p=>p()),t=[],h.spaces[0]&&(t=[Q.highlightCard(i,h.spaces[0])])});let l=o.addFolder("Hover \u{1F681}").close(),{sub:d}=rt(i,l),g;d.on("hover",h=>{h.spaces[0]?(g==null||g(),t.length===0&&(g=Q.highlightCard(i,h.spaces[0]))):(g==null||g(),g=void 0)})}n(Se,"createInteractionControls");function nt(i,e){let o=new U,t={position:"",hoverColor:w(i.getHoverColor())},r=e.add(t,"position").disable(),a=[];function s(){a.forEach(d=>d()),a.length=0}n(s,"reset");let l=0;return i.on("click",d=>{var u;let{labels:g,markers:h,coordinate:p}=d;s(),o.publish("click",d),clearInterval(l),r.load(JSON.stringify([p.longitude,p.latitude]));let f=g[0]||h[0];if(f){let b=ge(i,f,e);if(!b)return;a.push(b.destroy),b.labelItemFolder.openAnimated()}let c=(u=d.spaces[0])!=null?u:d.objects[0];if(c){let b={id:c.id,...i.getState(c.id),type:c.type,isInView:!1,isInViewCheck:pe(i,c.id)},{cleanup:y}=Z(i,b,e);l=setInterval(()=>{b.isInView=i.isInView(f||c)},500),a.push(y)}}),{sub:o}}n(nt,"createClickControls");function rt(i,e){let o=new U;i.setHoverColor("#1f3a7a");let t={position:"",hoverColor:w(i.getHoverColor()),intersected:"",type:"",id:""},r=e.add(t,"position").disable();e.add(t,"id").disable().listen(),e.add(t,"type").disable().listen(),e.addColor(t,"hoverColor").onChange(l=>{i.setHoverColor(l)});let a=[];function s(){a.forEach(l=>l()),a.length=0}return n(s,"reset"),i.on("hover",l=>{var b,y,m;let{coordinate:d,spaces:g,objects:h,markers:p,labels:f}=l;s(),o.publish("hover",l),r.load(JSON.stringify([d.longitude,d.latitude]));let c=(m=(y=(b=g[0])!=null?b:h[0])!=null?y:p[0])!=null?m:f[0];if(!c)return;let u=i.getState(c);u&&(t.type=u.type,t.id=c.id)}),{sub:o}}n(rt,"createHoverControls");function pe(i,e){return n(function(){console.log("isInView",i.isInView(e))},"isInView")}n(pe,"createIsInViewHandler");function Le(i,e,o){let t={labels:{},all(){o.Labels.all().forEach(c=>{this.labels[c.id]=c}),d()},removeAllLabels(){o.Labels.removeAll().forEach(c=>{delete this.labels[c.id]}),d()}},{addLabel:r,destroy:a}=st(i,o);i.add(t,"all"),i.add(t,"removeAllLabels");let s=i.addFolder("Label List");i.close();let l=new Map,{rerender:d}=g();function g(){function f(b){var y;delete t.labels[b.id],(y=l.get(b.id))==null||y.destroy()}n(f,"remove");function c(b){let y=ge(o,b,s,{onRemove:n(v=>{f(v)},"onRemove")});if(!y)return;let{labelItemFolder:m}=y;l.set(b.id,m)}n(c,"add");function u(){s.destroy(),s=i.addFolder("Label");for(let b in t.labels){let y=t.labels[b];c(y)}}return n(u,"rerender"),{rerender:u,add:c,remove:f}}n(g,"createLabelControls"),i.domElement.classList.add("list-items");let h;o.on("click",({labels:f,coordinate:c})=>{if(!i._closed)if(f[0]){h==null||h.close();let u=l.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 r(c)});function p(f){for(let c of f)t.labels[c.id]=c;d()}return n(p,"populatelabels"),{populatelabels:p,destroy(){a()}}}n(Le,"createLabelControls");function ge(i,e,o,{onRemove:t}={}){var g,h,p,f;let r=o.addFolder("".concat((g=e.text)==null?void 0:g.substring(0,12)));r.onChange(c=>{i.updateState(e,{appearance:d.appearance,interactive:d.interactive})}),r.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:s,interactive:l}=a;if(!s||s.margin==null||l==null)throw new Error("incomplte label state");let d={text:e.text,interactive:l,appearance:{...s,margin:s.margin||0,marker:{foregroundColor:(p=(h=s.marker)==null?void 0:h.foregroundColor)!=null&&p.active?w((f=s.marker.foregroundColor)==null?void 0:f.active):"black"},text:{foregroundColor:w(s.text.foregroundColor)}},remove(){i.Labels.remove(e),t==null||t(e),r.destroy()},isInView:pe(i,e.id)};return r.add(d.appearance,"margin",0,20).name("margin"),r.add(d,"text"),r.add(d,"interactive"),r.addColor(d.appearance.marker,"foregroundColor").name("marker foreground"),r.addColor(d.appearance.text,"foregroundColor").name("text forground"),r.add(d,"isInView"),r.add(d,"remove"),{labelItemFolder:r,destroy(){r.destroy()}}}n(ge,"addLabelControlToFolder");function st(i,e){let o=i.addFolder("Add"),t={onClick:!1,margin:0,text:"New Label!",interactive:!0,marginForegroundColor:w("skyblue"),marginBackgroundColor:w("coral"),textForegroundColor:w("slategray"),textBackgroundColor:w("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(r){return o._closed||!t.onClick?void 0:e.Labels.add(r,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})}}}n(st,"createAddControl");var $e={};C();var Ie="camera-ui";function Oe(i,e,o){var R,Ce;let t=i.addFolder("Camera \u{1F4F7}").onOpenClose(A=>{he({opened:!A._closed},Ie)}),{params:r}=ue(Ie);r.opened||t.close();let a=e.Camera.center.toJSON(),s=document.createElement("div");Object.assign(s.style,{display:"none",position:"absolute",left:"0px",zIndex:999,top:"0px",bottom:"0px",right:"0px",backgroundColor:"aqua",pointerEvents:"none",opacity:.5}),e.__core.container.appendChild(s);let{innerHeight:l,innerWidth:d}=window,[g,h,p,f]=(R=o==null?void 0:o.padding)!=null?R:[e.Camera.screenOffsets.top,e.Camera.screenOffsets.right,e.Camera.screenOffsets.bottom,e.Camera.screenOffsets.left],c={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:o!=null&&o.padding?"pixel":e.Camera.screenOffsets.type,inset_top:g!=null?g:0,inset_left:f!=null?f:0,inset_right:h!=null?h:0,inset_bottom:p!=null?p:0,animateOnLoad:!0,persist:n(()=>{he(t.save().controllers,"camera"),navigator.clipboard.writeText(window.location.href)},"persist"),visualizeInset:!!(g||h||p||f),"Focus on click":(Ce=o==null?void 0:o.focusOnClick)!=null?Ce:!0,"Focus on current floor":n(()=>{e.Camera.focusOn([e.currentFloor],{screenOffsets:{top:20,left:20,right:20,bottom:20}})},"Focus on current floor")};function u(){c.inset_type=e.Camera.screenOffsets.type,c.inset_left=e.Camera.screenOffsets.left,c.inset_top=e.Camera.screenOffsets.top,c.inset_right=e.Camera.screenOffsets.right,c.inset_bottom=e.Camera.screenOffsets.bottom,c.inset_type==="portion"?Object.assign(s.style,{left:c.inset_left*d+"px",top:c.inset_top*l+"px",bottom:c.inset_bottom*l+"px",right:c.inset_right*d+"px"}):Object.assign(s.style,{left:c.inset_left+"px",top:c.inset_top+"px",bottom:c.inset_bottom+"px",right:c.inset_right+"px"})}n(u,"updateInsetVisualizer"),t.add(c,"center_lat").listen().disable(),t.add(c,"center_lon").listen().disable(),t.add(c,"zoomLevel",16,22,.5).listen().disable(),t.add(c,"pitch").listen().disable(),t.add(c,"bearing").listen().disable(),t.add(c,"minZoomLevel",5,22,.5).onChange(A=>{e.Camera.setMinZoomLevel(A)}),t.add(c,"maxZoomLevel",10,22,.5).onChange(A=>{e.Camera.setMaxZoomLevel(A)}),t.add(c,"animateOnLoad"),t.add(c,"visualizeInset").onChange(O),O(c.visualizeInset),t.add(c,"inset_type",["pixel","portion"]).onChange(k),t.add(c,"inset_top",0,l).onChange(k),t.add(c,"inset_bottom",0,l).onChange(k),t.add(c,"inset_left",0,d).onChange(k),t.add(c,"inset_right",0,d).onChange(k);let b=lt(e);t.add(c,"Focus on click").onChange(A=>{A?e.on("click",b):e.off("click",b)}),c["Focus on click"]&&e.on("click",b),t.add(c,"persist"),t.add(c,"Focus on current floor");let y=n(A=>{t._closed||(c.center_lat=A.center.latitude,c.center_lon=A.center.longitude,c.zoomLevel=A.zoomLevel,c.bearing=A.bearing,c.pitch=A.pitch)},"onCameraChanged");e.on("camera-change",y);let{params:m}=ue("camera",c);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 xe={pitch:A.pitch,center:new Me(A.center_lat,A.center_lon),bearing:A.bearing,zoomLevel:A.zoomLevel};A.animateOnLoad?e.Camera.animateTo(xe):e.Camera.set(xe),t.load({controllers:A,folders:{}}),u()}let v=[()=>{e.off("camera-change",y)}];function k(){e.Camera.setScreenOffsets({top:c.inset_top,left:c.inset_left,right:c.inset_right,bottom:c.inset_bottom,type:c.inset_type}),u()}n(k,"updateInset"),(c.inset_top||c.inset_right||c.inset_bottom||c.inset_left)&&k();function O(A){u(),A?s.style.display="block":s.style.display="none"}return n(O,"visualizeInsetUpdated"),()=>({destroy(){t.destroy(),we(v)}})}n(Oe,"createCameraControls");function lt(i){return n(function(o){var s;let{spaces:t,objects:r}=o,a=(s=t[0])!=null?s:r[0];a&&i.Camera.focusOn(a)},"handler")}n(lt,"createHandler");C();function Te(i,e,o){let t={markers:{},removeAllMarkers(){o.Markers.removeAll().forEach(c=>{delete this.markers[c.id]}),d()}},{addMarker:r,destroy:a}=ct(i,o);i.add(t,"removeAllMarkers");let s=i.addFolder("Marker List");i.close();let l=new Map,{rerender:d}=g();function g(){function f(b){var y;delete t.markers[b.id],(y=l.get(b.id))==null||y.destroy()}n(f,"remove");function c(b){let y=dt(o,b,s,{onRemove:n(v=>{f(v)},"onRemove")});if(!y)return;let{markerItemFolder:m}=y;l.set(b.id,m)}n(c,"add");function u(){s.destroy(),s=i.addFolder("marker");for(let b in t.markers){let y=t.markers[b];c(y)}}return n(u,"rerender"),{rerender:u,add:c,remove:f}}n(g,"createMarkerControls"),i.domElement.classList.add("list-items");let h;o.on("click",({markers:f,coordinate:c})=>{if(!i._closed)if(f[0]){h==null||h.close();let u=l.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 r(c)});function p(f){for(let c of f)t.markers[c.id]=c;d()}return n(p,"populateMarkers"),{populateMarkers:p,destroy(){a()}}}n(Te,"createMarkerControls");function dt(i,e,o,{onRemove:t}={}){let r=o.addFolder("".concat(e.id.toString().substring(0,8)));r.onChange(d=>{i.updateState(e,{interactive:l.interactive})}),r.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:s}=a;if(s==null)throw new Error("incomplte label state");let l={interactive:s,remove(){i.Markers.remove(e),t==null||t(e),r.destroy()}};return r.add(l,"interactive"),r.add(l,"remove"),{markerItemFolder:r,destroy(){r.destroy()}}}n(dt,"addMarkerControlToFolder");function ct(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(r){return o._closed||!t.onClick?void 0:e.Markers.add(r,"<div>New Marker</div>",{interactive:t.interactive})}}}n(ct,"createAddControl");C();function De(i,e){let o=i.addFolder("Walls").close(),t={visible:!0,topColor:"#b1fa87",color:"#e8e8e8",texture:{url:""},topTexture:{url:""}};o.add(t,"visible").onChange(s=>{e.updateState("walls",{visible:s})}),o.addColor(t,"topColor").onChange(s=>{e.updateState("walls",{topColor:s})}),o.addColor(t,"color").onChange(s=>{e.updateState("walls",{color:s})}),o.addFolder("Texture - side").add(t.texture,"url").onFinishChange(s=>{e.updateState("walls",{texture:{url:s}})}),o.addFolder("Texture - top").add(t.topTexture,"url").onFinishChange(s=>{e.updateState("walls",{topTexture:{url:s}})}),e.updateState("walls",{topColor:t.topColor}),e.updateState("walls",{color:t.color})}n(De,"createGeometryControl");C();function Pe(i,e,o){var a,s;i.close();let t={language:(s=(a=o.currentLanguage)==null?void 0:a.code)!=null?s:"en"},r=o.getByType("enterprise-venue");i.add(t,"language",r==null?void 0:r.languages.map(l=>l.code)).onChange(l=>{o.changeLanguage(l)})}n(Pe,"createMiscControl");C();function ze(i,e,o){let t=i.addFolder("Debug");t.close();let r={showPolygonLabelTextAreaMesh:!1};t.add(r,"showPolygonLabelTextAreaMesh").onChange(a=>{e.Debug.update({showPolygonLabelTextAreaMesh:a})}).name("Show Flat Label Text Area Mesh"),e.Debug.update(r)}n(ze,"createDebugControl");C();function Ge(i,e,o){let t=i.addFolder("Text3D").close(),r={all:n(()=>{e.Text3D.labelAll()},"all"),removeAll:n(()=>{e.Text3D.removeAll()},"removeAll")};t.add(r,"all").name("Show All"),t.add(r,"removeAll").name("Remove All")}n(Ge,"createText3DControl");C();C();C();var F,N,$,M,I,S,Be,me,Ue,be=class be{constructor(e=new G({autoPlace:!0})){D(this,S);D(this,F);D(this,N,[]);D(this,$,{});D(this,M,{});D(this,I,{});Ae(this,F,e),x(this,F).domElement.style.left="0"}add(e,o,t){if(x(this,M)[e])throw new Error("Control ".concat(e," already exists"));x(this,$)[e]=o,x(this,I)[e]=o.default,B(this,S,Be).call(this,e,o,t),this.show()}addColor(e,o,t){if(x(this,M)[e])throw new Error("Control ".concat(e," already exists"));x(this,$)[e]=o,x(this,I)[e]=o.default,B(this,S,Ue).call(this,e,o,t),this.show()}update(e,o){if(!x(this,M)[e])throw new Error("Control ".concat(e," does not exist"));x(this,M)[e].setValue(o),x(this,$)[e].onChange&&x(this,$)[e].onChange(o,e)}replace(e,o,t){if(!x(this,M)[e]){this.add(e,o,t);return}o.args&&x(this,M)[e].options(o.args),o.default&&x(this,M)[e].setValue(o.default),o.onChange&&x(this,M)[e].onChange(r=>{o.onChange(r,e)})}remove(e){if(!x(this,M)[e])throw new Error("Control ".concat(e," does not exist"));x(this,M)[e].destroy(),x(this,M)[e].parent.children.length===0&&x(this,M)[e].parent.hide(),delete x(this,M)[e],delete x(this,$)[e],delete x(this,I)[e]}show(){x(this,F).show()}hide(){x(this,F).hide()}removeAll(){for(let e in x(this,M))this.remove(e)}destroy(){x(this,F).destroy()}};F=new WeakMap,N=new WeakMap,$=new WeakMap,M=new WeakMap,I=new WeakMap,S=new WeakSet,Be=n(function(e,o,t){let a=B(this,S,me).call(this,t).add(x(this,I),e,o.args,o.max,o.step);o.onChange&&a.onChange(s=>{o.onChange(s,e)}),o.onAdd&&o.onAdd(o.default,e),x(this,M)[e]=a},"#addControl"),me=n(function(e){if(!e)return x(this,F);let o=x(this,N).find(t=>t._title===e);return o?(o.show(),o):(o=x(this,F).addFolder(e),x(this,N).push(o),o)},"#getFolder"),Ue=n(function(e,o,t){let a=B(this,S,me).call(this,t).addColor(x(this,I),e);o.onChange&&a.onChange(s=>{o.onChange(s,e)}),x(this,M)[e]=a},"#addColorControl"),n(be,"GUI");var fe=be;function ht(i,e,o){var l;let t={},r=i.getByType("floor"),a=i.getByType("floor-stack");a.length>1&&(t.FloorStack={default:e.currentFloorStack.id,args:a.reduce((d,{id:g,name:h})=>({...d,[h]:g}),{}),onChange:n(d=>{d!==e.currentFloorStack.id&&(e.setFloorStack(d),o.replace("Floor",{default:e.currentFloor.id,args:e.currentFloorStack.floors.reduce((g,{id:h,name:p})=>({...g,[p]:h}),{})}))},"onChange")}),r.length>1&&(t.Floor={default:e.currentFloor.id,args:e.currentFloorStack.floors.reduce((d,{id:g,name:h})=>({...d,[h]:g}),{}),onChange:n(d=>{d!==e.currentFloor.id&&e.setFloor(d)},"onChange"),onAdd:n(()=>{e.on("floor-change",d=>{d!=null&&d.floor.id&&(a.length>1&&o.replace("FloorStack",{default:e.currentFloorStack.id}),o.replace("Floor",{default:e.currentFloor.id,args:e.currentFloorStack.floors.reduce((h,{id:p,name:f})=>({...h,[f]:p}),{})}))})},"onAdd")});let s=i.getByType("enterprise-venue");return s&&s.languages.length>1&&(t.Language={default:((l=i.currentLanguage)==null?void 0:l.code)||s.languages[0].code,args:s.languages.reduce((d,{code:g,name:h})=>({...d,[h]:g}),{}),onChange:n(d=>{i.changeLanguage(d)},"onChange")}),t}n(ht,"createDefaultControls");function He(i,e,o=new G){let t=new fe(o),r=ht(i,e,t);Object.keys(r).length||t.hide();for(let a in r)t.add(a,r[a]);return t}n(He,"createGUI");async function je(i,e,{initialfloorsInStack:o,root:t,floorsInDirections:r,showLabelsPerFloor:a=!0}){async function s(u){i.StackedMaps.changeFloorOnElevationChanges(!1),i.Outdoor.setOpacity(.15),i.StackedMaps.setFloorVisiblityMode("only-current-floor"),i.Camera.setPanMode("default"),await i.Camera.focusOn(u,{pitch:10})}n(s,"zoomToFloor");async function l(){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})}n(l,"showCurrentFloorWithPadding");async function d(u){await i.Camera.animateElevation(u.elevation*i.StackedMaps.distanceBetweenFloors)}n(d,"scrollToFloor");let g=i.currentFloor;i.on("floor-change",async u=>{i.StackedMaps.expanded&&u.reason!=="stacked-maps-elevation-change"&&(i.StackedMaps.changeFloorOnElevationChanges(!1),i.StackedMaps.setFloorVisiblityMode("all-floors"),await i.Camera.focusOn(g,{axisAlignedPadding:{vertical:i.StackedMaps.distanceBetweenFloors},pitch:90,duration:500}),i.StackedMaps.changeFloorOnElevationChanges(!0),await d(i.currentFloor),await s(i.currentFloor),i.StackedMaps.setFloorVisiblityMode("only-current-floor")),g=i.currentFloor}),i.on("stacked-maps-state-change",({state:u})=>{console.log("stacked-maps-state-change",u)});let h=e.getByType("space");if(a){let u=h.reduce((b,y)=>(b.has(y.floor)||b.set(y.floor,[]),y.name&&y.name!==""&&b.get(y.floor).push(i.Labels.add(y,y.name)),b),new Map);i.on("floor-change",()=>{u.forEach((b,y)=>{b.forEach(m=>{i.updateState(m,{enabled:i.currentFloor===y})})})})}let p=He(e,i,t),f=o!=null?o:[];async function c(){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"})}return n(c,"expandAll"),p.add("Expand - All",{default:n(async()=>{await c()},"default")},"Stack Maps"),r&&p.add("Expand - Only Navigation",{default:n(async()=>{i.Outdoor.setOpacity(.25),f=r,await i.StackedMaps.collapse(),i.setFloor(r[0]),await i.StackedMaps.expand({includedFloors:r,distanceBetweenFloors:"auto"})},"default")},"Stack Maps"),p.add("Show All Floors",{default:n(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})},"default")},"Stack Maps"),p.add("Show Current Floor with padding",{default:n(async()=>{await l()},"default")},"Stack Maps"),p.add("Zoom to Current Floor",{default:n(async()=>{s(i.currentFloor)},"default")},"Stack Maps"),p.add("Collapse",{default:n(()=>{i.Outdoor.setOpacity("initial"),i.StackedMaps.collapse()},"default")},"Stack Maps"),p.add("Default",{default:n(async()=>{i.Camera.setPanMode("default")},"default")},"Camera Pan Mode"),p.add("Elevation",{default:n(async()=>{i.Camera.setPanMode("elevation")},"default")},"Camera Pan Mode"),p.add("zoom in to floor 2",{default:n(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 u=i.StackedMaps.includedFloors[2],b=f.findIndex(y=>y.id===u.id);i.StackedMaps.changeFloorOnElevationChanges(!0),i.Camera.setPanMode("elevation"),i.StackedMaps.setFloorVisiblityMode("all-floors"),await i.Camera.animateElevation(b*i.StackedMaps.distanceBetweenFloors),i.Outdoor.setOpacity(.15),console.log("focusing on",u.name),await i.Camera.focusOn(u,{pitch:10}),i.StackedMaps.setFloorVisiblityMode("only-current-floor"),i.Camera.setPanMode("default"),i.StackedMaps.changeFloorOnElevationChanges(!1)},"default")},"Camera Pan Mode"),p.add("All Floors",{default:n(async()=>{i.StackedMaps.setFloorVisiblityMode("all-floors")},"default")},"Visibility Mode"),p.add("Only Active Floor",{default:n(async()=>{i.StackedMaps.setFloorVisiblityMode("only-current-floor")},"default")},"Visibility Mode"),p.add("Up",{default:n(async()=>{let u=f.find(b=>b.elevation===i.currentFloor.elevation+1);u&&await d(u)},"default")},"Floors Up/Down"),p.add("Down",{default:n(async()=>{let u=f.find(b=>b.elevation===i.currentFloor.elevation-1);u&&await d(u)},"default")},"Floors Up/Down"),{zoomToFloor:s,expandAll:c}}n(je,"createStackMapsControl");function Ye(i,e,o){let t=i.addFolder("StackedMaps");t.close(),je(e,o,{root:t,showLabelsPerFloor:!1})}n(Ye,"createStackmapsControl");function Re(i,e,o){ut();let t=new K({title:"SDK Controls"});t.domElement.classList.add("mappedin-js-inspector"),Se(e,i,t),Oe(t,e,o==null?void 0:o.camera);let r=t.addFolder("Levels").close(),a=t.addFolder("Scene Controls");a.close();let s=t.addFolder("Labels");Ge(t,e,i);let l=t.addFolder("Markers");De(t,e),Ye(t,e,i);let d=t.addFolder("misc");ze(t,e,i),Pe(d,e,i);let g={level:e.currentFloor.id},{populatelabels:h}=Le(s,i,e),{populateMarkers:p}=Te(l,i,e),f=i.getByType("floor").reduce((u,b)=>(u[b.name]=b.id,u),{}),c=r.add(g,"level",f).onChange(u=>{e.setFloor(u),g.level=e.currentFloor.id,c.updateDisplay()});return e.on("floor-change-start",u=>{r.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:p}}n(Re,"createUi");var Ne="mappedin-sdk-debug-css";function ut(){if(document.getElementById(Ne))return;let i=document.createElement("style");i.id=Ne,i.textContent=$e,document.head.appendChild(i)}n(ut,"injectCss");var ye=class ye{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}=Re(this.mapData,this.mv,e);o.onOpenClose(r=>{r===o&&!r._closed&&!this.scenegraphVisualizerMounted&&(this.scenegraphVisualizerMounted=!0,Ee(this.api.core,o))}),(t=this.api.getMapDataInternal())==null||t.spaces.forEach(r=>{this.mv.updateState(r.id,{interactive:!0})})}get enabled(){return this._enabled}};n(ye,"Inspector");var ve=ye;export{ve as Inspector};
|