@mappedin/react-sdk 6.0.1-beta.21 → 6.0.1-beta.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/THIRD_PARTY_LICENSES.txt +1 -1
- package/lib/esm/{GLTFExporter-7AAWGZK4.js → GLTFExporter-HTZSY6WT.js} +1 -1
- package/lib/esm/{GLTFLoader-S6X2V35B.js → GLTFLoader-XH5HM6OD.js} +1 -1
- package/lib/esm/{browser-644AOSQ2.js → browser-45YMPP3A.js} +1 -1
- package/lib/esm/{chunk-KHNMAHXS.js → chunk-64LDGG53.js} +1 -1
- package/lib/esm/{chunk-YLDMTX7X.js → chunk-DPBLCZG6.js} +1 -1
- package/lib/esm/{chunk-PLC5VOVX.js → chunk-QXQ4TTHH.js} +1 -1
- package/lib/esm/chunk-TDZC72ZP.js +1 -0
- package/lib/esm/{chunk-CHENVGKQ.js → chunk-YRCDALUI.js} +1 -1
- package/lib/esm/index.d.ts +45 -49
- package/lib/esm/index.js +1 -1
- package/lib/esm/{inspector-3IPQTBHT.js → inspector-VUSGG26V.js} +1 -1
- package/lib/esm/{internal-Z6QXK23J.js → internal-DLDM6YPV.js} +1 -1
- package/lib/esm/{outdoor-context-v4-KPYNV3QK.js → outdoor-context-v4-EYXVBRXB.js} +1 -1
- package/package.json +2 -2
- package/lib/esm/chunk-7AUQZIIA.js +0 -1
package/lib/esm/index.d.ts
CHANGED
|
@@ -1171,6 +1171,7 @@ declare module '@mappedin/react-sdk/mappedin-js/src/map-data-objects' {
|
|
|
1171
1171
|
*/
|
|
1172
1172
|
readonly obstructionIdByEntranceId: Record<string, string>;
|
|
1173
1173
|
readonly venue?: EnterpriseVenue;
|
|
1174
|
+
readonly sasToken?: string;
|
|
1174
1175
|
directions: DirectionsInternal;
|
|
1175
1176
|
enterpriseMode: boolean;
|
|
1176
1177
|
nodesById: MapDataRecords['nodesById'];
|
|
@@ -3297,7 +3298,7 @@ declare module '@mappedin/react-sdk/react-sdk/src' {
|
|
|
3297
3298
|
declare module '@mappedin/react-sdk/mappedin-js/src/map-data-objects/category' {
|
|
3298
3299
|
import type { EnterpriseCategory as MVFEnterpriseCategory } from '@mappedin/mvf';
|
|
3299
3300
|
import type { MapDataInternal, EnterpriseLocation } from '@mappedin/react-sdk/mappedin-js/src/map-data-objects';
|
|
3300
|
-
import
|
|
3301
|
+
import BaseMetaData from '@mappedin/react-sdk/mappedin-js/src/map-data-objects/base-metadata-object';
|
|
3301
3302
|
/**
|
|
3302
3303
|
* An EnterpriseCategory groups one or more EnterpriseLocation. These allow similar locations to be sorted in a logical fashion.
|
|
3303
3304
|
* For example a mall may group locations into Food Court, Footwear and Women's Fashion. They can be accessed using the {@link MapData.getByType()} method as shown below.
|
|
@@ -3308,7 +3309,7 @@ declare module '@mappedin/react-sdk/mappedin-js/src/map-data-objects/category' {
|
|
|
3308
3309
|
*
|
|
3309
3310
|
* Refer to the [EnterpriseCategory Guide](https://developer.mappedin.com/web-sdk/enterprise-data#enterprise-categories) for more information and interactive examples.
|
|
3310
3311
|
*/
|
|
3311
|
-
class EnterpriseCategory extends
|
|
3312
|
+
class EnterpriseCategory extends BaseMetaData implements Omit<MVFEnterpriseCategory, 'children' | 'locations'> {
|
|
3312
3313
|
#private;
|
|
3313
3314
|
/**
|
|
3314
3315
|
* @internal
|
|
@@ -3389,8 +3390,8 @@ declare module '@mappedin/react-sdk/mappedin-js/src/map-data-objects/category' {
|
|
|
3389
3390
|
declare module '@mappedin/react-sdk/mappedin-js/src/map-data-objects/location' {
|
|
3390
3391
|
import type { EnterpriseLocation as MVFEnterpriseLocation, LocationState, OperationHours, SiblingGroup } from '@mappedin/mvf';
|
|
3391
3392
|
import type { Coordinate, EnterpriseCategory, MapDataInternal, Space } from '@mappedin/react-sdk/mappedin-js/src/map-data-objects';
|
|
3392
|
-
import BaseMapData from '@mappedin/react-sdk/mappedin-js/src/map-data-objects/base-object';
|
|
3393
3393
|
import type Node from '@mappedin/react-sdk/mappedin-js/src/map-data-objects/node';
|
|
3394
|
+
import BaseMetaData from '@mappedin/react-sdk/mappedin-js/src/map-data-objects/base-metadata-object';
|
|
3394
3395
|
/**
|
|
3395
3396
|
* An EnterpriseLocation contains metadata about a location, such as its name, description, logo, phone number, social medial links, hours of operation and more.
|
|
3396
3397
|
* They can be accessed using the {@link MapData.getByType()} method as shown below.
|
|
@@ -3401,7 +3402,7 @@ declare module '@mappedin/react-sdk/mappedin-js/src/map-data-objects/location' {
|
|
|
3401
3402
|
*
|
|
3402
3403
|
* Refer to the [EnterpriseLocation Guide](https://developer.mappedin.com/web-sdk/enterprise-data#enterprise-locations) for more information and interactive examples.
|
|
3403
3404
|
*/
|
|
3404
|
-
class EnterpriseLocation extends
|
|
3405
|
+
class EnterpriseLocation extends BaseMetaData implements Omit<MVFEnterpriseLocation, 'polygons' | 'nodes' | 'links'> {
|
|
3405
3406
|
#private;
|
|
3406
3407
|
/**
|
|
3407
3408
|
* @internal
|
|
@@ -3478,10 +3479,10 @@ declare module '@mappedin/react-sdk/mappedin-js/src/map-data-objects/location' {
|
|
|
3478
3479
|
* Example use cases:
|
|
3479
3480
|
* - A Mall may have a location with two nodes and one polygon. It may then have an instance with one of the nodes, and operating hours
|
|
3480
3481
|
* that are different from the parent. This indicates that this instance is an entrance for the location that is accessible at different times, perhaps for an interior mall entrance, when the main location (and other, exterior entrance) is open later than the rest of the mall.
|
|
3481
|
-
* - An
|
|
3482
|
+
* - An airport may have a location with several polygons and nodes, and an instance for each node (and corresponding polygon, if any) with a different siblingGroup. The location in the sibling group may be the airport terminal, or airside vs landside.
|
|
3482
3483
|
* This would allow an application to show the location once in a search result, but offer UX to select the instance that is in the right terminal.
|
|
3483
3484
|
*
|
|
3484
|
-
* Note: Instances are actual EnterpriseLocations. This means they have all the properties of a normal EnterpriseLocation, including an `instances` property, that will always be undefined. They also do NOT have a parent
|
|
3485
|
+
* Note: Instances are actual EnterpriseLocations. This means they have all the properties of a normal EnterpriseLocation, including an `instances` property, that will always be undefined. They also do NOT have a parent property, or any other explicit reference to the parent location. These instances are
|
|
3485
3486
|
* only referenced from their parent location, and will not show up in other places in the map data. However, they should otherwise behave like normal EnterpriseLocations, being targetable for things like navigation and focus.
|
|
3486
3487
|
*/
|
|
3487
3488
|
instances?: EnterpriseLocation[] | undefined;
|
|
@@ -3586,7 +3587,7 @@ declare module '@mappedin/react-sdk/mappedin-js/src/map-data-objects/location' {
|
|
|
3586
3587
|
declare module '@mappedin/react-sdk/mappedin-js/src/map-data-objects/venue' {
|
|
3587
3588
|
import type { EnterpriseVenue as MVFEnterpriseVenue, Language } from '@mappedin/mvf';
|
|
3588
3589
|
import type { Hyperlink, MapDataInternal } from '@mappedin/react-sdk/mappedin-js/src/map-data-objects';
|
|
3589
|
-
import
|
|
3590
|
+
import BaseMetaData from '@mappedin/react-sdk/mappedin-js/src/map-data-objects/base-metadata-object';
|
|
3590
3591
|
/**
|
|
3591
3592
|
* The EnterpriseVenue class holds metadata bout the map, which includes the map name, supported languages, default language, top locations and more.
|
|
3592
3593
|
* It can be accessed using the {@link MapData.getByType()} method as shown below.
|
|
@@ -3597,7 +3598,7 @@ declare module '@mappedin/react-sdk/mappedin-js/src/map-data-objects/venue' {
|
|
|
3597
3598
|
*
|
|
3598
3599
|
* Refer to the [EnterpriseVenue Guide](https://developer.mappedin.com/web-sdk/enterprise-data#enterprise-venue) for more information.
|
|
3599
3600
|
*/
|
|
3600
|
-
class EnterpriseVenue extends
|
|
3601
|
+
class EnterpriseVenue extends BaseMetaData implements MVFEnterpriseVenue {
|
|
3601
3602
|
#private;
|
|
3602
3603
|
/**
|
|
3603
3604
|
* @internal
|
|
@@ -3818,14 +3819,14 @@ declare module '@mappedin/react-sdk/mappedin-js/src/map-data-objects/node' {
|
|
|
3818
3819
|
import Coordinate from '@mappedin/react-sdk/mappedin-js/src/map-data-objects/coordinate';
|
|
3819
3820
|
import type { EnterpriseLocation, MapDataInternal } from '@mappedin/react-sdk/mappedin-js/src/map-data-objects';
|
|
3820
3821
|
import type Floor from '@mappedin/react-sdk/mappedin-js/src/map-data-objects/floor';
|
|
3821
|
-
import
|
|
3822
|
+
import BaseMetaData from '@mappedin/react-sdk/mappedin-js/src/map-data-objects/base-metadata-object';
|
|
3822
3823
|
/**
|
|
3823
3824
|
* A class representing {@link Path} node data within the map.
|
|
3824
3825
|
*
|
|
3825
3826
|
* Nodes are used to define points in the map's pathfinding graph.
|
|
3826
3827
|
*
|
|
3827
3828
|
*/
|
|
3828
|
-
class Node extends
|
|
3829
|
+
class Node extends BaseMetaData {
|
|
3829
3830
|
#private;
|
|
3830
3831
|
/**
|
|
3831
3832
|
* @internal
|
|
@@ -3901,7 +3902,7 @@ declare module '@mappedin/react-sdk/mappedin-js/src/map-data-objects/node' {
|
|
|
3901
3902
|
}
|
|
3902
3903
|
|
|
3903
3904
|
declare module '@mappedin/react-sdk/mappedin-js/src/map-data-objects/door' {
|
|
3904
|
-
import type { EntranceCollection
|
|
3905
|
+
import type { EntranceCollection } from '@mappedin/mvf';
|
|
3905
3906
|
import Coordinate from '@mappedin/react-sdk/mappedin-js/src/map-data-objects/coordinate';
|
|
3906
3907
|
import type Floor from '@mappedin/react-sdk/mappedin-js/src/map-data-objects/floor';
|
|
3907
3908
|
import type { MapDataInternal } from '@mappedin/react-sdk/mappedin-js/src/map-data-objects';
|
|
@@ -3976,12 +3977,6 @@ declare module '@mappedin/react-sdk/mappedin-js/src/map-data-objects/door' {
|
|
|
3976
3977
|
* @returns {string} The description of the door.
|
|
3977
3978
|
*/
|
|
3978
3979
|
get description(): string;
|
|
3979
|
-
/**
|
|
3980
|
-
* Gets the images of the door.
|
|
3981
|
-
*
|
|
3982
|
-
* @returns {Image[]} The images of the door.
|
|
3983
|
-
*/
|
|
3984
|
-
get images(): Image[];
|
|
3985
3980
|
/**
|
|
3986
3981
|
* Gets the {@link Floor} object associated with the door.
|
|
3987
3982
|
*
|
|
@@ -4025,7 +4020,7 @@ declare module '@mappedin/react-sdk/mappedin-js/src/map-data-objects/door' {
|
|
|
4025
4020
|
}
|
|
4026
4021
|
|
|
4027
4022
|
declare module '@mappedin/react-sdk/mappedin-js/src/map-data-objects/space' {
|
|
4028
|
-
import type {
|
|
4023
|
+
import type { SpaceCollection } from '@mappedin/mvf';
|
|
4029
4024
|
import Coordinate from '@mappedin/react-sdk/mappedin-js/src/map-data-objects/coordinate';
|
|
4030
4025
|
import type { EnterpriseLocation, MapDataInternal } from '@mappedin/react-sdk/mappedin-js/src/map-data-objects';
|
|
4031
4026
|
import type Floor from '@mappedin/react-sdk/mappedin-js/src/map-data-objects/floor';
|
|
@@ -4090,12 +4085,6 @@ declare module '@mappedin/react-sdk/mappedin-js/src/map-data-objects/space' {
|
|
|
4090
4085
|
* @returns {string} The description of the space, or an empty string if no description exists.
|
|
4091
4086
|
*/
|
|
4092
4087
|
get description(): string;
|
|
4093
|
-
/**
|
|
4094
|
-
* Gets the array of images associated with the space.
|
|
4095
|
-
*
|
|
4096
|
-
* @returns {Image[]} An array of Image objects, or an empty array if no images exist.
|
|
4097
|
-
*/
|
|
4098
|
-
get images(): Image[];
|
|
4099
4088
|
/**
|
|
4100
4089
|
* Gets the external identifier of the space.
|
|
4101
4090
|
*
|
|
@@ -4275,7 +4264,7 @@ declare module '@mappedin/react-sdk/mappedin-js/src/map-data-objects/floor' {
|
|
|
4275
4264
|
}
|
|
4276
4265
|
|
|
4277
4266
|
declare module '@mappedin/react-sdk/mappedin-js/src/map-data-objects/connection' {
|
|
4278
|
-
import type { Feature, FeatureCollection,
|
|
4267
|
+
import type { Feature, FeatureCollection, Point, SpaceProperties, Connection as MVFConnection } from '@mappedin/mvf';
|
|
4279
4268
|
import Coordinate from '@mappedin/react-sdk/mappedin-js/src/map-data-objects/coordinate';
|
|
4280
4269
|
import type Node from '@mappedin/react-sdk/mappedin-js/src/map-data-objects/node';
|
|
4281
4270
|
import type { Floor, MapDataInternal } from '@mappedin/react-sdk/mappedin-js/src/map-data-objects';
|
|
@@ -4316,7 +4305,6 @@ declare module '@mappedin/react-sdk/mappedin-js/src/map-data-objects/connection'
|
|
|
4316
4305
|
*/
|
|
4317
4306
|
get name(): string;
|
|
4318
4307
|
get description(): string;
|
|
4319
|
-
get images(): Image[];
|
|
4320
4308
|
/**
|
|
4321
4309
|
* Whether the connection is accessible. For example elevators are accessible while stairs are not.
|
|
4322
4310
|
*
|
|
@@ -4380,7 +4368,7 @@ declare module '@mappedin/react-sdk/mappedin-js/src/map-data-objects/connection'
|
|
|
4380
4368
|
}
|
|
4381
4369
|
|
|
4382
4370
|
declare module '@mappedin/react-sdk/mappedin-js/src/map-data-objects/object' {
|
|
4383
|
-
import type {
|
|
4371
|
+
import type { ObstructionCollection } from '@mappedin/mvf';
|
|
4384
4372
|
import Coordinate from '@mappedin/react-sdk/mappedin-js/src/map-data-objects/coordinate';
|
|
4385
4373
|
import type { MapDataInternal } from '@mappedin/react-sdk/mappedin-js/src/map-data-objects';
|
|
4386
4374
|
import type Floor from '@mappedin/react-sdk/mappedin-js/src/map-data-objects/floor';
|
|
@@ -4435,7 +4423,6 @@ declare module '@mappedin/react-sdk/mappedin-js/src/map-data-objects/object' {
|
|
|
4435
4423
|
* @returns {string} The description of the object.
|
|
4436
4424
|
*/
|
|
4437
4425
|
get description(): string;
|
|
4438
|
-
get images(): Image[];
|
|
4439
4426
|
/**
|
|
4440
4427
|
* Gets the type of the MapObject.
|
|
4441
4428
|
*
|
|
@@ -4557,7 +4544,6 @@ declare module '@mappedin/react-sdk/mappedin-js/src/map-data-objects/poi' {
|
|
|
4557
4544
|
import type { Floor, MapDataInternal } from '@mappedin/react-sdk/mappedin-js/src/map-data-objects';
|
|
4558
4545
|
import Coordinate from '@mappedin/react-sdk/mappedin-js/src/map-data-objects/coordinate';
|
|
4559
4546
|
import BaseMapData from '@mappedin/react-sdk/mappedin-js/src/map-data-objects/base-object';
|
|
4560
|
-
import Image from '@mappedin/react-sdk/mappedin-js/src/map-data-objects/image';
|
|
4561
4547
|
/**
|
|
4562
4548
|
* A class representing point of interest data within the map.
|
|
4563
4549
|
*
|
|
@@ -4600,12 +4586,6 @@ declare module '@mappedin/react-sdk/mappedin-js/src/map-data-objects/poi' {
|
|
|
4600
4586
|
* @returns {string} The description of the POI.
|
|
4601
4587
|
*/
|
|
4602
4588
|
get description(): string;
|
|
4603
|
-
/**
|
|
4604
|
-
* Gets the images associated with the POI.
|
|
4605
|
-
*
|
|
4606
|
-
* @returns {Image[]} The images associated with the POI.
|
|
4607
|
-
*/
|
|
4608
|
-
get images(): Image[];
|
|
4609
4589
|
/**
|
|
4610
4590
|
* Gets the {@link Floor} object associated with the POI.
|
|
4611
4591
|
*
|
|
@@ -4831,11 +4811,18 @@ declare module '@mappedin/react-sdk/mappedin-js/src/map-data-objects/image' {
|
|
|
4831
4811
|
*/
|
|
4832
4812
|
get url(): string | undefined;
|
|
4833
4813
|
/**
|
|
4834
|
-
* Gets the
|
|
4814
|
+
* Gets the alt text of the image.
|
|
4835
4815
|
*
|
|
4836
|
-
* @returns {string | undefined } The
|
|
4816
|
+
* @returns {string | undefined } The alt text of the image.
|
|
4817
|
+
* @deprecated Use {@link altText} instead.
|
|
4837
4818
|
*/
|
|
4838
4819
|
get name(): string | undefined;
|
|
4820
|
+
/**
|
|
4821
|
+
* Gets the alt text of the image.
|
|
4822
|
+
*
|
|
4823
|
+
* @returns {string | undefined } The alt text of the image.
|
|
4824
|
+
*/
|
|
4825
|
+
get altText(): string | undefined;
|
|
4839
4826
|
/**
|
|
4840
4827
|
/**
|
|
4841
4828
|
* Serializes the image data to JSON.
|
|
@@ -5058,6 +5045,7 @@ declare module '@mappedin/react-sdk/mappedin-js/src/map-data-objects/types' {
|
|
|
5058
5045
|
localePacksUrls?: LocalePackUrls;
|
|
5059
5046
|
languagePacks?: LanguagePackHydrationItem[];
|
|
5060
5047
|
binaryBundle?: Uint8Array;
|
|
5048
|
+
sasToken?: string;
|
|
5061
5049
|
};
|
|
5062
5050
|
}
|
|
5063
5051
|
|
|
@@ -9577,31 +9565,39 @@ declare module '@mappedin/react-sdk/mappedin-js/src/analytics/customer' {
|
|
|
9577
9565
|
export {};
|
|
9578
9566
|
}
|
|
9579
9567
|
|
|
9568
|
+
declare module '@mappedin/react-sdk/mappedin-js/src/map-data-objects/base-metadata-object' {
|
|
9569
|
+
export default abstract class BaseMetaData {
|
|
9570
|
+
/**
|
|
9571
|
+
* The identity of the map metadata.
|
|
9572
|
+
*/
|
|
9573
|
+
readonly id: string;
|
|
9574
|
+
constructor(id: string);
|
|
9575
|
+
}
|
|
9576
|
+
}
|
|
9577
|
+
|
|
9580
9578
|
declare module '@mappedin/react-sdk/mappedin-js/src/map-data-objects/base-object' {
|
|
9579
|
+
import type { MapDataInternal } from '@mappedin/react-sdk/mappedin-js/src/map-data-objects';
|
|
9581
9580
|
import Hyperlink from '@mappedin/react-sdk/mappedin-js/src/map-data-objects/hyperlink';
|
|
9581
|
+
import Image from '@mappedin/react-sdk/mappedin-js/src/map-data-objects/image';
|
|
9582
9582
|
import type { Details } from '@mappedin/mvf';
|
|
9583
9583
|
export default abstract class BaseMapData {
|
|
9584
9584
|
/**
|
|
9585
|
-
* identity of the map
|
|
9585
|
+
* The identity of the map data.
|
|
9586
9586
|
*/
|
|
9587
9587
|
readonly id: string;
|
|
9588
|
-
constructor(id: string, details?: Details);
|
|
9588
|
+
constructor(id: string, data: MapDataInternal, details?: Details);
|
|
9589
9589
|
/**
|
|
9590
9590
|
* Gets the links associated with this data type.
|
|
9591
9591
|
*
|
|
9592
9592
|
* @returns {Hyperlink[]} The links associated with this data type
|
|
9593
9593
|
*/
|
|
9594
9594
|
links: Hyperlink[];
|
|
9595
|
-
|
|
9596
|
-
|
|
9597
|
-
|
|
9598
|
-
|
|
9599
|
-
|
|
9600
|
-
|
|
9601
|
-
* identity of the map object
|
|
9602
|
-
*/
|
|
9603
|
-
readonly id: string;
|
|
9604
|
-
constructor(id: string);
|
|
9595
|
+
/**
|
|
9596
|
+
* Gets the array of images associated with this data type.
|
|
9597
|
+
*
|
|
9598
|
+
* @returns {Image[]} An array of Image objects, or an empty array if no images exist.
|
|
9599
|
+
*/
|
|
9600
|
+
images: Image[];
|
|
9605
9601
|
}
|
|
9606
9602
|
}
|
|
9607
9603
|
|
package/lib/esm/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as x,d as A,n as V,o as E,p as k}from"./chunk-
|
|
1
|
+
import{a as x,d as A,n as V,o as E,p as k}from"./chunk-TDZC72ZP.js";import"./chunk-64LDGG53.js";import"./chunk-DPBLCZG6.js";import"./chunk-YRCDALUI.js";import{a as n,j as a}from"./chunk-QXQ4TTHH.js";a();a();import U,{useCallback as Y,useMemo as $}from"react";import{useContext as C,useEffect as T,useRef as S,useState as D}from"react";import{createPortal as q}from"react-dom";a();import{createContext as I,useContext as z}from"react";a();var L=class L extends Error{constructor(t){super("".concat(t," must be used within a MapView component."))}};n(L,"MapViewNullError");var m=L;var p=I({mapData:void 0,mapView:void 0});function F(){let{mapData:e,mapView:t}=z(p);if(!e||!t)throw new m("useMap");return{mapData:e,mapView:t}}n(F,"useMap");a();import{useEffect as G}from"react";function s(e,t){G(()=>{t!=null&&typeof e=="function"&&e(t)},[e,t])}n(s,"useOnLoad");function O(e){let{mapView:t}=C(p),r=S(),[o,i]=D(null);return T(()=>{if(t==null)throw new m("Marker");return r.current=t.Markers.add(e.target,"",{...e.options,dynamicResize:!0}),i(r.current),()=>{t==null||r.current==null||t.Markers.remove(r.current)}},[t,e.target]),T(()=>{o&&(t==null||t.updateState(o,{...e.options}))},[e.options]),s(e.onLoad,o),t==null||o==null?null:q(e.children,o.contentEl,o.id)}n(O,"Marker");function B(e){let{mapView:t}=C(p),[r,o]=D(null),i=S(A()),u=S(e.target),f=Y(l=>{var M;o(l),(M=e.onLoad)==null||M.call(e,l)},[e.onLoad]);T(()=>{if(t==null)throw new m("Marker");if(r&&r.target!==e.target){let{duration:l=300,easing:M="linear"}=e;t.Markers.animateTo(r,e.target,{duration:l,easing:M})}},[t,e.target,r]);let c=$(()=>({...e,duration:void 0,easing:void 0}),[e.duration,e.easing]);return U.createElement(O,{...c,key:i.current,target:u.current,onLoad:f})}n(B,"AnimatedMarker");a();import{useContext as J,useEffect as R,useRef as K,useState as Q}from"react";function X(e){let{mapView:t}=J(p),r=K(),[o,i]=Q(void 0);return R(()=>{if(t==null)throw new m("Label");return r.current=t.Labels.add(e.target,e.text,e.options),i(r.current),()=>{t==null||r.current==null||t.Labels.remove(r.current)}},[t,e.target]),R(()=>{r.current&&(t==null||t.updateState(r.current,{text:e.text,...e.options}))},[e.text,e.options]),s(e.onLoad,o),null}n(X,"Label");a();import{useCallback as Z,useContext as _,useEffect as ee}from"react";function te(e,t){let{mapView:r}=_(p),o=Z(i=>t(i),[t]);ee(()=>{if(r==null)throw new m("useEvent");return r.on(e,o),()=>{r!=null&&r.off(e,o)}},[r,e,t])}n(te,"useEvent");a();import{useContext as re,useEffect as ae,useRef as oe,useState as ne}from"react";function ie(e){let{mapView:t}=re(p),r=oe(),[o,i]=ne(void 0);return ae(()=>{if(t==null)throw new m("Path");let u=t.Paths.add(e.coordinate,e.options);return u.animation.then(()=>{var f;(f=e.onDrawComplete)==null||f.call(e)}),i(u),r.current=u,()=>{r.current&&t.Paths.remove(r.current)}},[t,e.coordinate,e.options]),s(e.onLoad,o),null}n(ie,"Path");a();import w,{useCallback as pe,useEffect as me,useMemo as se,useRef as j,useState as W}from"react";var de={width:"100%",height:"100%",position:"relative"};function ue(e){let{mapData:t,options:r,style:o,fallback:i,children:u,...f}=e,c=j(!1),[l,M]=W(void 0),[h,P]=W(!0),y=j(null),b=se(()=>r,[]),v=pe(()=>{if(t&&(y!=null&&y.current)){if(l)return;E(y.current,t,b).then(g=>{M(g)}).catch(g=>{x.error("Failed to render MapView",g)}).finally(()=>{P(!1)})}},[t,y.current,b]);return me(()=>{c.current||(c.current=!0,v())},[v]),s(e.onLoad,l),w.createElement(p.Provider,{value:{mapData:t,mapView:l}},w.createElement("div",{"data-testid":"mappedin-map",ref:y,style:{...de,...o},...f}),h?w.createElement(w.Fragment,null,i):u)}n(ue,"MapView");a();import{useContext as le,useEffect as H,useState as fe}from"react";function ce(e){let{mapView:t}=le(p),[r,o]=fe(!1);return H(()=>{if(t==null)throw new m("Navigation");return t.Navigation.draw(e.directions,e.options).then(()=>{var i;o(!0),(i=e.onDrawComplete)==null||i.call(e)}),()=>{t.Navigation.clear()}},[t,e.directions,e.options]),H(()=>{r!==!1&&typeof e.onLoad=="function"&&e.onLoad()},[e.onLoad,r]),null}n(ce,"Navigation");a();import{useContext as Me,useEffect as Pe,useRef as ye,useState as he}from"react";function xe(e){let{mapView:t}=Me(p),r=ye(),[o,i]=he(void 0);return Pe(()=>{if(t==null)throw new Error("MapView not initialized");return r.current=t.Shapes.add(e.geometry,e.style,e.floor),i(r.current),()=>{t==null||r.current==null||t.Shapes.remove(r.current)}},[t,e.geometry,e.style,e.floor]),s(e.onLoad,o),null}n(xe,"Shape");a();import{useContext as we,useEffect as ge,useRef as Le,useState as Te}from"react";function Se(e){let{mapView:t}=we(p),r=Le(),[o,i]=Te(void 0);return ge(()=>{if(t==null)throw new m("Model");return r.current=t.Models.add(e.models,e.options),i(r.current),()=>{if(!(t==null||r.current==null))for(let u of r.current)t.Models.remove(u)}},[t,e.models,e.options]),s(e.onLoad,o),null}n(Se,"Model");a();import{useCallback as Ne,useEffect as be,useMemo as ve,useRef as Ae,useState as N}from"react";function Ve(e){let[t,r]=N(void 0),[o,i]=N(!0),[u,f]=N(void 0),c=Ae(0),l=ve(()=>e,[]),M=Ne(()=>{let h=++c.current;i(!0),f(void 0),V(l).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)})},[l]);return be(()=>{M()},[M]),{mapData:t,isLoading:o,error:u}}n(Ve,"useMapData");var Xt=k;export{B as AnimatedMarker,X as Label,ue as MapView,O as Marker,Se as Model,ce as Navigation,ie as Path,xe as Shape,Xt as default,te as useEvent,F as useMap,Ve as useMapData};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as I,e as ce,g as H,i as M,j as P,m as ue}from"./chunk-7AUQZIIA.js";import"./chunk-KHNMAHXS.js";import"./chunk-YLDMTX7X.js";import{J as he}from"./chunk-CHENVGKQ.js";import{a as d,e as L,j as C}from"./chunk-PLC5VOVX.js";C();C();C();C();var S=class S{constructor(e,i,t,o,l="div"){this.parent=e,this.object=i,this.property=t,this._disabled=!1,this._hidden=!1,this.initialValue=this.getValue(),this.domElement=document.createElement(l),this.domElement.classList.add("controller"),this.domElement.classList.add(o),this.$name=document.createElement("div"),this.$name.classList.add("name"),S.nextNameID=S.nextNameID||0,this.$name.id="lil-gui-name-".concat(++S.nextNameID),this.$widget=document.createElement("div"),this.$widget.classList.add("widget"),this.$disable=this.$widget,this.domElement.appendChild(this.$name),this.domElement.appendChild(this.$widget),this.domElement.addEventListener("keydown",r=>r.stopPropagation()),this.domElement.addEventListener("keyup",r=>r.stopPropagation()),this.parent.children.push(this),this.parent.controllers.push(this),this.parent.$children.appendChild(this.domElement),this._listenCallback=this._listenCallback.bind(this),this.name(t)}name(e){return this._name=e,this.$name.textContent=e,this}onChange(e){return this._onChange=e,this}_callOnChange(){this.parent._callOnChange(this),this._onChange!==void 0&&this._onChange.call(this,this.getValue()),this._changed=!0}onFinishChange(e){return this._onFinishChange=e,this}_callOnFinishChange(){this._changed&&(this.parent._callOnFinishChange(this),this._onFinishChange!==void 0&&this._onFinishChange.call(this,this.getValue())),this._changed=!1}reset(){return this.setValue(this.initialValue),this._callOnFinishChange(),this}enable(e=!0){return this.disable(!e)}disable(e=!0){return e===this._disabled?this:(this._disabled=e,this.domElement.classList.toggle("disabled",e),this.$disable.toggleAttribute("disabled",e),this)}show(e=!0){return this._hidden=!e,this.domElement.style.display=this._hidden?"none":"",this}hide(){return this.show(!1)}options(e){let i=this.parent.add(this.object,this.property,e);return i.name(this._name),this.destroy(),i}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)}};d(S,"Controller");var k=S,K=class K extends k{constructor(e,i,t){super(e,i,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}};d(K,"BooleanController");var V=K;function Y(n){let e,i;return(e=n.match(/(#|0x)?([a-f0-9]{6})/i))?i=e[2]:(e=n.match(/rgb\(\s*(\d*)\s*,\s*(\d*)\s*,\s*(\d*)\s*\)/))?i=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=n.match(/^#?([a-f0-9])([a-f0-9])([a-f0-9])$/i))&&(i=e[1]+e[1]+e[2]+e[2]+e[3]+e[3]),i?"#"+i:!1}d(Y,"normalizeColorString");var ke={isPrimitive:!0,match:n=>typeof n=="string",fromHexString:Y,toHexString:Y},T={isPrimitive:!0,match:n=>typeof n=="number",fromHexString:n=>parseInt(n.substring(1),16),toHexString:n=>"#"+n.toString(16).padStart(6,0)},$e={isPrimitive:!1,match:n=>Array.isArray(n),fromHexString(n,e,i=1){let t=T.fromHexString(n);e[0]=(t>>16&255)/255*i,e[1]=(t>>8&255)/255*i,e[2]=(t&255)/255*i},toHexString([n,e,i],t=1){t=255/t;let o=n*t<<16^e*t<<8^i*t<<0;return T.toHexString(o)}},Le={isPrimitive:!1,match:n=>Object(n)===n,fromHexString(n,e,i=1){let t=T.fromHexString(n);e.r=(t>>16&255)/255*i,e.g=(t>>8&255)/255*i,e.b=(t&255)/255*i},toHexString({r:n,g:e,b:i},t=1){t=255/t;let o=n*t<<16^e*t<<8^i*t<<0;return T.toHexString(o)}},Me=[ke,T,$e,Le];function Se(n){return Me.find(e=>e.match(n))}d(Se,"getColorFormat");var Z=class Z extends k{constructor(e,i,t,o){super(e,i,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=Se(this.initialValue),this._rgbScale=o,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 l=Y(this.$text.value);l&&this._setValueFromHexString(l)}),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 i=this._format.fromHexString(e);this.setValue(i)}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}};d(Z,"ColorController");var N=Z,Q=class Q extends k{constructor(e,i,t){super(e,i,t,"function"),this.$button=document.createElement("button"),this.$button.appendChild(this.$name),this.$widget.appendChild(this.$button),this.$button.addEventListener("click",o=>{o.preventDefault(),this.getValue().call(this.object),this._callOnChange()}),this.$button.addEventListener("touchstart",()=>{},{passive:!0}),this.$disable=this.$button}};d(Q,"FunctionController");var D=Q,q=class q extends k{constructor(e,i,t,o,l,r){super(e,i,t,"number"),this._initInput(),this.min(o),this.max(l);let s=r!==void 0;this.step(s?r:this._getImplicitStep(),s),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,i=!0){return this._step=e,this._stepExplicit=i,this}updateDisplay(){let e=this.getValue();if(this._hasSlider){let i=(e-this._min)/(this._max-this._min);i=Math.max(0,Math.min(i,1)),this.$fill.style.width=i*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 i=d(()=>{let v=parseFloat(this.$input.value);isNaN(v)||(this._stepExplicit&&(v=this._snap(v)),this.setValue(this._clamp(v)))},"onInput"),t=d(v=>{let A=parseFloat(this.$input.value);isNaN(A)||(this._snapClampSetValue(A+v),this.$input.value=this.getValue())},"increment"),o=d(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"),l=d(v=>{this._inputFocused&&(v.preventDefault(),t(this._step*this._normalizeMouseWheel(v)))},"onWheel"),r=!1,s,c,p,h,a,g=5,f=d(v=>{s=v.clientX,c=p=v.clientY,r=!0,h=this.getValue(),a=0,window.addEventListener("mousemove",u),window.addEventListener("mouseup",b)},"onMouseDown"),u=d(v=>{if(r){let A=v.clientX-s,$=v.clientY-c;Math.abs($)>g?(v.preventDefault(),this.$input.blur(),r=!1,this._setDraggingStyle(!0,"vertical")):Math.abs(A)>g&&b()}if(!r){let A=v.clientY-p;a-=A*this._step*this._arrowKeyMultiplier(v),h+a>this._max?a=this._max-h:h+a<this._min&&(a=this._min-h),this._snapClampSetValue(h+a)}p=v.clientY},"onMouseMove"),b=d(()=>{this._setDraggingStyle(!1,"vertical"),this._callOnFinishChange(),window.removeEventListener("mousemove",u),window.removeEventListener("mouseup",b)},"onMouseUp"),y=d(()=>{this._inputFocused=!0},"onFocus"),m=d(()=>{this._inputFocused=!1,this.updateDisplay(),this._callOnFinishChange()},"onBlur");this.$input.addEventListener("input",i),this.$input.addEventListener("keydown",o),this.$input.addEventListener("wheel",l,{passive:!1}),this.$input.addEventListener("mousedown",f),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=d((m,v,A,$,z)=>(m-v)/(A-v)*(z-$)+$,"map"),i=d(m=>{let v=this.$slider.getBoundingClientRect(),A=e(m,v.left,v.right,this._min,this._max);this._snapClampSetValue(A)},"setValueFromX"),t=d(m=>{this._setDraggingStyle(!0),i(m.clientX),window.addEventListener("mousemove",o),window.addEventListener("mouseup",l)},"mouseDown"),o=d(m=>{i(m.clientX)},"mouseMove"),l=d(()=>{this._callOnFinishChange(),this._setDraggingStyle(!1),window.removeEventListener("mousemove",o),window.removeEventListener("mouseup",l)},"mouseUp"),r=!1,s,c,p=d(m=>{m.preventDefault(),this._setDraggingStyle(!0),i(m.touches[0].clientX),r=!1},"beginTouchDrag"),h=d(m=>{m.touches.length>1||(this._hasScrollBar?(s=m.touches[0].clientX,c=m.touches[0].clientY,r=!0):p(m),window.addEventListener("touchmove",a,{passive:!1}),window.addEventListener("touchend",g))},"onTouchStart"),a=d(m=>{if(r){let v=m.touches[0].clientX-s,A=m.touches[0].clientY-c;Math.abs(v)>Math.abs(A)?p(m):(window.removeEventListener("touchmove",a),window.removeEventListener("touchend",g))}else m.preventDefault(),i(m.touches[0].clientX)},"onTouchMove"),g=d(()=>{this._callOnFinishChange(),this._setDraggingStyle(!1),window.removeEventListener("touchmove",a),window.removeEventListener("touchend",g)},"onTouchEnd"),f=this._callOnFinishChange.bind(this),u=400,b,y=d(m=>{if(Math.abs(m.deltaX)<Math.abs(m.deltaY)&&this._hasScrollBar)return;m.preventDefault();let A=this._normalizeMouseWheel(m)*this._step;this._snapClampSetValue(this.getValue()+A),this.$input.value=this.getValue(),clearTimeout(b),b=setTimeout(f,u)},"onWheel");this.$slider.addEventListener("mousedown",t),this.$slider.addEventListener("touchstart",h,{passive:!1}),this.$slider.addEventListener("wheel",y,{passive:!1})}_setDraggingStyle(e,i="horizontal"){this.$slider&&this.$slider.classList.toggle("active",e),document.body.classList.toggle("lil-gui-dragging",e),document.body.classList.toggle("lil-gui-".concat(i),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:i,deltaY:t}=e;return Math.floor(e.deltaY)!==e.deltaY&&e.wheelDelta&&(i=0,t=-e.wheelDelta/120,t*=this._stepExplicit?1:10),i+-t}_arrowKeyMultiplier(e){let i=this._stepExplicit?1:10;return e.shiftKey?i*=10:e.altKey&&(i/=10),i}_snap(e){let i=Math.round(e/this._step)*this._step;return parseFloat(i.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}};d(q,"NumberController");var R=q,ee=class ee extends k{constructor(e,i,t,o){super(e,i,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(o)}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(i=>{let t=document.createElement("option");t.textContent=i,this.$select.appendChild(t)}),this.updateDisplay(),this}updateDisplay(){let e=this.getValue(),i=this._values.indexOf(e);return this.$select.selectedIndex=i,this.$display.textContent=i===-1?e:this._names[i],this}};d(ee,"OptionController");var J=ee,te=class te extends k{constructor(e,i,t){super(e,i,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",o=>{o.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}};d(te,"StringController");var W=te,Fe='.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 Ie(n){let e=document.createElement("style");e.innerHTML=n;let i=document.querySelector("head link[rel=stylesheet], head style");i?document.head.insertBefore(e,i):document.head.appendChild(e)}d(Ie,"_injectStyles");var pe=!1,G=class G{constructor({parent:e,autoPlace:i=e===void 0,container:t,width:o,title:l="Controls",closeFolders:r=!1,injectStyles:s=!0,touchStyles:c=!0}={}){if(this.parent=e,this.root=e?e.root:this,this.children=[],this.controllers=[],this.folders=[],this._closed=!1,this._hidden=!1,this.domElement=document.createElement("div"),this.domElement.classList.add("lil-gui"),this.$title=document.createElement("div"),this.$title.classList.add("title"),this.$title.setAttribute("role","button"),this.$title.setAttribute("aria-expanded",!0),this.$title.setAttribute("tabindex",0),this.$title.addEventListener("click",()=>this.openAnimated(this._closed)),this.$title.addEventListener("keydown",p=>{(p.code==="Enter"||p.code==="Space")&&(p.preventDefault(),this.$title.click())}),this.$title.addEventListener("touchstart",()=>{},{passive:!0}),this.$children=document.createElement("div"),this.$children.classList.add("children"),this.domElement.appendChild(this.$title),this.domElement.appendChild(this.$children),this.title(l),this.parent){this.parent.children.push(this),this.parent.folders.push(this),this.parent.$children.appendChild(this.domElement);return}this.domElement.classList.add("root"),c&&this.domElement.classList.add("allow-touch-styles"),!pe&&s&&(Ie(Fe),pe=!0),t?t.appendChild(this.domElement):i&&(this.domElement.classList.add("autoPlace"),document.body.appendChild(this.domElement)),o&&this.domElement.style.setProperty("--width",o+"px"),this._closeFolders=r}add(e,i,t,o,l){if(Object(t)===t)return new J(this,e,i,t);let r=e[i];switch(typeof r){case"number":return new R(this,e,i,t,o,l);case"boolean":return new V(this,e,i);case"string":return new W(this,e,i);case"function":return new D(this,e,i)}console.error("gui.add failed\n property:",i,"\n object:",e,"\n value:",r)}addColor(e,i,t=1){return new N(this,e,i,t)}addFolder(e){let i=new G({parent:this,title:e});return this.root._closeFolders&&i.close(),i}load(e,i=!0){return e.controllers&&this.controllers.forEach(t=>{t instanceof D||t._name in e.controllers&&t.load(e.controllers[t._name])}),i&&e.folders&&this.folders.forEach(t=>{t._title in e.folders&&t.load(e.folders[t._title])}),this}save(e=!0){let i={controllers:{},folders:{}};return this.controllers.forEach(t=>{if(!(t instanceof D)){if(t._name in i.controllers)throw new Error('Cannot save GUI with duplicate property "'.concat(t._name,'"'));i.controllers[t._name]=t.save()}}),e&&this.folders.forEach(t=>{if(t._title in i.folders)throw new Error('Cannot save GUI with duplicate folder "'.concat(t._title,'"'));i.folders[t._title]=t.save()}),i}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 i=this.$children.clientHeight;this.$children.style.height=i+"px",this.domElement.classList.add("transition");let t=d(l=>{l.target===this.$children&&(this.$children.style.height="",this.domElement.classList.remove("transition"),this.$children.removeEventListener("transitionend",t))},"onTransitionEnd");this.$children.addEventListener("transitionend",t);let o=e?this.$children.scrollHeight:0;this.domElement.classList.toggle("closed",!e),requestAnimationFrame(()=>{this.$children.style.height=o+"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(i=>{e=e.concat(i.controllersRecursive())}),e}foldersRecursive(){let e=Array.from(this.folders);return this.folders.forEach(i=>{e=e.concat(i.foldersRecursive())}),e}};d(G,"GUI");var X=G,B=X;C();C();var E=(()=>{let n=new he;return d(function(i){return n.set(i),"#".concat(n.getHexString())},"normalize")})();function ge(n){let e;for(e of n)e()}d(ge,"runAll");function ie(n,e){let i=window.location.href,t=new URL(i),o=new URLSearchParams(t.search);for(let l in n)if(n.hasOwnProperty(l)){let r="".concat(e,".").concat(l);o.set(r,n[l])}t.search=o.toString(),history.pushState({path:t.toString()},"",t.toString())}d(ie,"updateCurrentUrlParamsWithNamespace");function ne(n,e){let i=new URLSearchParams(window.location.search),t={};for(let[o,l]of i)if(o.startsWith("".concat(n,"."))){let r=o.slice(n.length+1);l==="true"||l==="false"?t[r]=l==="true":typeof(e==null?void 0:e[r])=="number"?t[r]=Number(l):t[r]=l}return{namespace:n,params:t}}d(ne,"getUrlParamsWithNamespace");var De=["interactive"];function U(n,e,i){var o,l;let t=i.addFolder("".concat(e.type,"-").concat(e.id));for(let r in e){if(r==="visible"&&t.add(e,r).onChange(s=>{n.updateState(e.id,{[r]:s})}),r==="color"||r==="hoverColor"){e[r]=E(e[r]),t.addColor(e,r).onChange(s=>{n.updateState(e.id,{[r]:s})});continue}if(r==="height"){t.add(e,r,0,20,1).onChange(s=>{n.updateState(e.id,{[r]:s})});continue}if(r==="texture"&&e.texture){(o=t.addFolder("Texture - side").add(e,"texture"))==null||o.onChange(c=>{n.updateState(e.id,{texture:{url:c}})});continue}if(r==="topTexture"&&e.topTexture){(l=t.addFolder("Texture - top").add(e,"topTexture"))==null||l.onChange(c=>{n.updateState(e.id,{topTexture:{url:c}})});continue}if(r==="opacity"){t.add(e,r,0,1,.1).onChange(s=>{n.updateState(e.id,{[r]:s})});continue}De.includes(r)&&t.add(e,r).onChange(s=>{n.updateState(e.id,{[r]:s})})}return e.isInView&&(t.add(e,"isInView").listen().disable(),t.add(e,"isInViewCheck")),{cleanup(){t.destroy()}}}d(U,"renderByProp");C();C();function Te(){let n=[];function e(o,l){var c;let r=Object.values(o.getMapData())[0],s=l;if(s&&H.is(s)){let p=(c=r.getByType("enterprise-location"))==null?void 0:c.find(h=>h.spaces.some(a=>a.id===s.id));p&&(s=p)}return s}d(e,"getHighlightTarget");async function i(o,l){return l instanceof P?o.Camera.focusOn(l.locations.flatMap(r=>r.spaces),O):l instanceof M?o.Camera.focusOn(l.spaces,O):o.Camera.focusOn(l,O)}d(i,"focusOn");function t(o,l,{focus:r=!1}={}){if(!window.enableHighlightCard)return()=>{};let s=e(o,l),c=document.createElement("div");if(c.style.cssText="\n position: absolute;\n top: 20px;\n left: 20px;\n background-color: rgba(30, 30, 30, 0.95);\n box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);\n border-radius: 12px;\n padding: 24px;\n max-width: 320px;\n z-index: 1000;\n font-family: 'Arial', sans-serif;\n transition: all 0.3s ease;\n color: #e0e0e0;\n ","name"in s){let h=document.createElement("h3");h.textContent=s.name,h.style.cssText="\n margin: 0 0 16px;\n font-size: 22px;\n font-weight: 600;\n color: #ffffff;\n letter-spacing: -0.5px;\n ",c.appendChild(h)}if(s instanceof M){if(s.description){let h=document.createElement("p");h.textContent=s.description,h.style.cssText="\n margin: 0 0 16px;\n font-size: 14px;\n color: #b0b0b0;\n line-height: 1.5;\n ",c.appendChild(h)}if(s.tags&&s.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 ",s.tags.forEach(a=>{let g=document.createElement("span");g.textContent=a,g.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(g)}),c.appendChild(h)}}let p;if(!(l instanceof P)){let h=new B({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 a=o.getState(l);a&&(U(o,{id:l.id,...a},h),c.appendChild(h.domElement)),p=h}return document.body.appendChild(c),r&&i(o,s),()=>{c.style.opacity="0",c.style.transform="translateY(-10px)",setTimeout(()=>c.remove(),300),p==null||p.destroy()}}return d(t,"highlightCard"),{highlightCard:t,highlight:(o,l,{focus:r=!0}={})=>{n.length>0&&n.forEach(c=>o.Markers.remove(c));let s=e(o,l);if(s instanceof M)r&&o.Camera.focusOn(s.spaces,O),n.push(...s.spaces.map(c=>o.Markers.add(c,'<div style="padding: 15px; background-color: #ffffff; border-radius: 8px; box-shadow: 0 4px 6px rgba(0,0,0,0.1); max-width: 250px; position: relative;">\n <h3 style="margin: 0 0 10px; color: #333; font-size: 16px; font-weight: 600;">'.concat(s.name,"</h3>\n ").concat(s.description?'<p style="margin: 0 0 10px; color: #666; font-size: 14px; font-weight: 400;">'.concat(s.description,"</p>"):"","\n ").concat(s.tags?s.tags.map(p=>'<span style="display: inline-block; padding: 3px 8px; background-color: #e0f2f1; color: #00796b; border-radius: 12px; font-size: 12px;">'.concat(p,"</span>")).join(" "):"",'\n <div style="position: absolute; bottom: -10px; left: 50%; transform: translateX(-50%); width: 0; height: 0; border-left: 10px solid transparent; border-right: 10px solid transparent; border-top: 10px solid #ffffff;"></div>\n </div>'),{rank:"always-visible",anchor:"top"})));else if(s instanceof P){r&&o.Camera.focusOn(s.locations.flatMap(h=>h.spaces),O);let c=new Map,p=new Set;s.locations.forEach(h=>{c.has(h.name)||(h.spaces.forEach(a=>{n.push(o.Markers.add(a,'<div style="padding: 12px; background-color: rgba(0, 153, 51, 0.95); border-radius: 8px; box-shadow: 0 4px 8px rgba(0,0,0,0.3); transform: translateY(-4px); transition: all 0.3s ease;">\n <span style="font-weight: 600; color: #FFFFFF; font-size: 16px; text-shadow: 1px 1px 2px rgba(0,0,0,0.2);">'.concat(h.name,"</span>\n </div>"),{rank:"always-visible"}))}),c.set(h.name,!0))}),s.locations.forEach(h=>{h.coordinates.forEach(a=>{let g="".concat(a.latitude,",").concat(a.longitude);if(!p.has(g)&&!c.has(h.name)){let f=o.Markers.add(a,'<div style="padding: 10px; background-color: rgba(51, 102, 204, 0.9); border-radius: 6px; box-shadow: 0 3px 6px rgba(0,0,0,0.2);">\n <span style="font-weight: 500; color: #FFFFFF; font-size: 16px;">'.concat(h.name,'</span>\n <br>\n <span style="color: #FFFFFF; font-size: 12px; font-weight: 400;">Node</span>\n </div>'),{rank:"always-visible"});p.add(g),n.push(f)}})})}}}}d(Te,"createHighlightControl");var O={duration:300,easing:"ease-in-out"},F=Te();C();var w={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 Oe(n){n.add(w.options.places.fields,"name").name("Places: Name"),n.add(w.options.places.fields,"description").name("Places: Description"),n.add(w.options.places.fields,"link").name("Places: Link"),n.add(w.options.places.fields,"category").name("Places: Category"),n.add(w.options.places,"limit"),n.add(w.options.locations.fields,"name").name("Locations: Name"),n.add(w.options.locations.fields,"tag").name("Locations: Tag"),n.add(w.options.locations.fields,"description").name("Locations: Description"),n.add(w.options.places,"limit"),n.add(w.options.categories.fields,"name").name("Categories: Name")}d(Oe,"createAdvancedSettings");function me(n,e,i){var h;let t=new I,o=i.addFolder("Search");o.open();let l=o.add(w,"search").onChange(async a=>{let g=await e.Search.query(a,w.options);g&&(w.results=g,s(g,t))}),r=document.createElement("div");r.style.marginLeft="10px",(h=l.domElement.parentElement)==null||h.appendChild(r);let{renderSearch:s,close:c}=ze(n,e,r,l.$input),p=o.addFolder("Advanced");return p.close(),Oe(p),document.addEventListener("keydown",a=>{(a.metaKey||a.ctrlKey)&&a.key==="k"?(a.preventDefault(),o._closed&&o.open(),l.$input.focus()):a.key==="Escape"&&(c(),t.publish("highlight",void 0))}),{pubsub:t}}d(me,"createSearchControl");function ze(n,e,i,t){let o,l;t.addEventListener("input",async s=>{s instanceof InputEvent&&(s.inputType==="insertText"||s.inputType==="insertCompositionText")&&(clearTimeout(o),o=setTimeout(async()=>{var p;let c=await e.Search.suggest(t.value);c&&c.length>0&&r((p=c[0])==null?void 0:p.suggestion)},100))});function r(s){if(!s){t.placeholder="";return}let c=t.value;t.value=s,t.setSelectionRange(c.length,s.length)}return d(r,"renderSuggestion"),{renderSearch(s,c){var p,h;if(s.places.length===0&&((p=s.enterpriseCategories)==null?void 0:p.length)===0&&((h=s.enterpriseLocations)==null?void 0:h.length)===0){i.textContent="No results found.";return}l=He(i,s,n,c)},close(){l.destroy()}}}d(ze,"mount");function He(n,e,i,t){n.innerHTML="";let o=document.createElement("div");Object.assign(o.style,j.dropdownContainer);let l=document.createElement("ul");l.className="options-list",Object.assign(l.style,j.optionsList),l.style.display="block";let r=[],s=d((g,f)=>{if(f&&f.length>0){let u=document.createElement("li");u.textContent=g,Object.assign(u.style,j.sectionHeader),l.appendChild(u),f.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,j.option),m.tabIndex=0,m.addEventListener("focus",()=>{p(r.indexOf(m))}),m.addEventListener("mouseover",()=>{m.style.backgroundColor="#f0f0f0"}),m.addEventListener("mouseout",()=>{m.style.backgroundColor=""}),m.addEventListener("click",()=>{}),m.setAttribute("data-type",g),m.setAttribute("data-index",y.toString()),l.appendChild(m),r.push(m)})}},"addSection");s("enterpriseLocations",e.enterpriseLocations),s("enterpriseCategories",e.enterpriseCategories),s("Places",e.places),o.appendChild(l),n.appendChild(o);let c=[],p=d(g=>{c.forEach(m=>m()),c=[],r.forEach((m,v)=>{v===g?m.style.backgroundColor="#e0e0e0":m.style.backgroundColor=""});let f=r[g],u=f.getAttribute("data-type"),b=parseInt(f.getAttribute("data-index")||"0",10);if(!u)return;let{item:y}=e[u][b];F.highlight(i,y),t.publish("highlight",y)},"highlightOption"),h=d(g=>{!o.contains(g.target)&&g.target!==n&&a()},"handleClickOutside");document.addEventListener("click",h);let a=d(()=>{n.innerHTML="",document.removeEventListener("click",h)},"destroy");return{destroy(){n.innerHTML="",t.publish("highlight",void 0)}}}d(He,"createCustomDropdown");var j={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 fe(n,e,i){i.domElement.id="interactionPanel";let t=[],{pubsub:o}=me(n,e,i);o.on("highlight",h=>{if(h){t.forEach(g=>g()),t=[];let a=h instanceof M?h.spaces[0]:h;if(a&&!H.is(a))return;t.push(F.highlightCard(n,a,{focus:!0}))}else t.forEach(a=>a()),t=[]});let l=i.addFolder("Click \u{1F447}").close(),{sub:r}=Pe(n,l);r.on("click",h=>{t.forEach(a=>a()),t=[],h.spaces[0]&&(t=[F.highlightCard(n,h.spaces[0])])});let s=i.addFolder("Hover \u{1F681}").close(),{sub:c}=Ge(n,s),p;c.on("hover",h=>{h.spaces[0]?(p==null||p(),t.length===0&&(p=F.highlightCard(n,h.spaces[0]))):(p==null||p(),p=void 0)})}d(fe,"createInteractionControls");function Pe(n,e){let i=new I,t={position:"",hoverColor:E(n.getHoverColor())},o=e.add(t,"position").disable(),l=[];function r(){l.forEach(c=>c()),l.length=0}d(r,"reset");let s=0;return n.on("click",c=>{var u;let{labels:p,markers:h,coordinate:a}=c;r(),i.publish("click",c),clearInterval(s),o.load(JSON.stringify([a.longitude,a.latitude]));let g=p[0]||h[0];if(g){let b=re(n,g,e);if(!b)return;l.push(b.destroy),b.labelItemFolder.openAnimated()}let f=(u=c.spaces[0])!=null?u:c.objects[0];if(f){let b={id:f.id,...n.getState(f.id),type:f.type,isInView:!1,isInViewCheck:oe(n,f.id)},{cleanup:y}=U(n,b,e);s=setInterval(()=>{b.isInView=n.isInView(g||f)},500),l.push(y)}}),{sub:i}}d(Pe,"createClickControls");function Ge(n,e){let i=new I;n.setHoverColor("#1f3a7a");let t={position:"",hoverColor:E(n.getHoverColor()),intersected:"",type:"",id:""},o=e.add(t,"position").disable();e.add(t,"id").disable().listen(),e.add(t,"type").disable().listen(),e.addColor(t,"hoverColor").onChange(s=>{n.setHoverColor(s)});let l=[];function r(){l.forEach(s=>s()),l.length=0}return d(r,"reset"),n.on("hover",s=>{var b,y,m;let{coordinate:c,spaces:p,objects:h,markers:a,labels:g}=s;r(),i.publish("hover",s),o.load(JSON.stringify([c.longitude,c.latitude]));let f=(m=(y=(b=p[0])!=null?b:h[0])!=null?y:a[0])!=null?m:g[0];if(!f)return;let u=n.getState(f);u&&(t.type=u.type,t.id=f.id)}),{sub:i}}d(Ge,"createHoverControls");function oe(n,e){return d(function(){console.log("isInView",n.isInView(e))},"isInView")}d(oe,"createIsInViewHandler");function be(n,e,i){let t={labels:{},all(){i.Labels.all().forEach(f=>{this.labels[f.id]=f}),c()},removeAllLabels(){i.Labels.removeAll().forEach(f=>{delete this.labels[f.id]}),c()}},{addLabel:o,destroy:l}=Be(n,i);n.add(t,"all"),n.add(t,"removeAllLabels");let r=n.addFolder("Label List");n.close();let s=new Map,{rerender:c}=p();function p(){function g(b){var y;delete t.labels[b.id],(y=s.get(b.id))==null||y.destroy()}d(g,"remove");function f(b){let y=re(i,b,r,{onRemove:v=>{g(v)}});if(!y)return;let{labelItemFolder:m}=y;s.set(b.id,m)}d(f,"add");function u(){r.destroy(),r=n.addFolder("Label");for(let b in t.labels){let y=t.labels[b];f(y)}}return d(u,"rerender"),{rerender:u,add:f,remove:g}}d(p,"createLabelControls"),n.domElement.classList.add("list-items");let h;i.on("click",({labels:g,coordinate:f})=>{if(!n._closed)if(g[0]){h==null||h.close();let u=s.get(g[0].id);if(n.open(),!u)return;u==null||u.open(),u==null||u.domElement.scrollIntoView({block:"start"}),u==null||u.domElement.focus(),h=u}else o(f)});function a(g){for(let f of g)t.labels[f.id]=f;c()}return d(a,"populatelabels"),{populatelabels:a,destroy(){l()}}}d(be,"createLabelControls");function re(n,e,i,{onRemove:t}={}){var p,h,a,g;let o=i.addFolder("".concat((p=e.text)==null?void 0:p.substring(0,12)));o.onChange(f=>{n.updateState(e,{appearance:c.appearance,interactive:c.interactive})}),o.close();let l=n.getState(e);if((l==null?void 0:l.type)!=="label")throw new Error("error getting state for label: ".concat(e.id));let{appearance:r,interactive:s}=l;if(!r||r.margin==null||s==null)throw new Error("incomplte label state");let c={text:e.text,interactive:s,appearance:{...r,margin:r.margin||0,marker:{foregroundColor:(a=(h=r.marker)==null?void 0:h.foregroundColor)!=null&&a.active?E((g=r.marker.foregroundColor)==null?void 0:g.active):"black"},text:{foregroundColor:E(r.text.foregroundColor)}},remove(){n.Labels.remove(e),t==null||t(e),o.destroy()},isInView:oe(n,e.id)};return o.add(c.appearance,"margin",0,20).name("margin"),o.add(c,"text"),o.add(c,"interactive"),o.addColor(c.appearance.marker,"foregroundColor").name("marker foreground"),o.addColor(c.appearance.text,"foregroundColor").name("text forground"),o.add(c,"isInView"),o.add(c,"remove"),{labelItemFolder:o,destroy(){o.destroy()}}}d(re,"addLabelControlToFolder");function Be(n,e){let i=n.addFolder("Add"),t={onClick:!1,margin:0,text:"New Label!",interactive:!0,marginForegroundColor:E("skyblue"),marginBackgroundColor:E("coral"),textForegroundColor:E("slategray"),textBackgroundColor:E("white")};return i.add(t,"onClick"),i.add(t,"margin"),i.add(t,"interactive"),i.add(t,"text"),i.addColor(t,"marginForegroundColor"),i.addColor(t,"marginBackgroundColor"),i.addColor(t,"textForegroundColor"),i.addColor(t,"textBackgroundColor"),{destroy(){i.destroy()},addLabel(o){return i._closed||!t.onClick?void 0:e.Labels.add(o,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})}}}d(Be,"createAddControl");var ve={};C();var ye="camera-ui";function xe(n,e,i){var z,le;let t=n.addFolder("Camera \u{1F4F7}").onOpenClose(x=>{ie({opened:!x._closed},ye)}),{params:o}=ne(ye);o.opened||t.close();let l=e.Camera.center.toJSON(),r=document.createElement("div");Object.assign(r.style,{display:"none",position:"absolute",left:"0px",top:"0px",bottom:"0px",right:"0px",backgroundColor:"aqua",pointerEvents:"none",opacity:.5}),document.body.appendChild(r);let[s,c,p,h]=(z=i==null?void 0:i.padding)!=null?z:[],a={center_lat:l.latitude,center_lon:l.longitude,zoomLevel:e.Camera.zoomLevel,pitch:e.Camera.pitch,bearing:e.Camera.bearing,minZoomLevel:e.Camera.minZoomLevel,maxZoomLevel:e.Camera.maxZoomLevel,inset_type:"pixel",inset_top:s!=null?s:0,inset_left:h!=null?h:0,inset_right:c!=null?c:0,inset_bottom:p!=null?p:0,animateOnLoad:!0,persist:()=>{ie(t.save().controllers,"camera"),navigator.clipboard.writeText(window.location.href)},visualizeInset:!!(s||c||p||h),"Focus on click":(le=i==null?void 0:i.focusOnClick)!=null?le:!0,"Focus on current floor":()=>{e.Camera.focusOn([e.currentFloor],{screenOffsets:{top:20,left:20,right:20,bottom:20}})}};function g(){a.inset_type==="portion"?Object.assign(r.style,{left:a.inset_left*u+"px",top:a.inset_top*f+"px",bottom:a.inset_bottom*f+"px",right:a.inset_right*u+"px"}):Object.assign(r.style,{left:a.inset_left+"px",top:a.inset_top+"px",bottom:a.inset_bottom+"px",right:a.inset_right+"px"})}d(g,"updateInsetVisualizer"),t.add(a,"center_lat").listen().disable(),t.add(a,"center_lon").listen().disable(),t.add(a,"zoomLevel",16,22,.5).listen().disable(),t.add(a,"pitch").listen().disable(),t.add(a,"bearing").listen().disable(),t.add(a,"minZoomLevel",5,22,.5).onChange(x=>{e.Camera.setMinZoomLevel(x)}),t.add(a,"maxZoomLevel",10,22,.5).onChange(x=>{e.Camera.setMaxZoomLevel(x)}),t.add(a,"animateOnLoad"),t.add(a,"visualizeInset").onChange($),$(a.visualizeInset);let{innerHeight:f,innerWidth:u}=window;t.add(a,"inset_type",["pixel","portion"]).onChange(A),t.add(a,"inset_top",0,f).onChange(A),t.add(a,"inset_bottom",0,f).onChange(A),t.add(a,"inset_left",0,u).onChange(A),t.add(a,"inset_right",0,u).onChange(A);let b=je(e);t.add(a,"Focus on click").onChange(x=>{x?e.on("click",b):e.off("click",b)}),a["Focus on click"]&&e.on("click",b),t.add(a,"persist"),t.add(a,"Focus on current floor");let y=d(x=>{t._closed||(a.center_lat=x.center.latitude,a.center_lon=x.center.longitude,a.zoomLevel=x.zoomLevel,a.bearing=x.bearing,a.pitch=x.pitch)},"onCameraChanged");e.on("camera-change",y);let{params:m}=ne("camera",a);if(Object.keys(m).length>0){let x=m;e.Camera.setScreenOffsets({top:x.inset_top,left:x.inset_left,right:x.inset_right,bottom:x.inset_bottom,type:x.inset_type});let de={pitch:x.pitch,center:new ce(x.center_lat,x.center_lon),bearing:x.bearing,zoomLevel:x.zoomLevel};x.animateOnLoad?e.Camera.animateTo(de):e.Camera.set(de),t.load({controllers:x,folders:{}}),g()}let v=[()=>{e.off("camera-change",y)}];function A(){e.Camera.setScreenOffsets({top:a.inset_top,left:a.inset_left,right:a.inset_right,bottom:a.inset_bottom,type:a.inset_type}),g()}d(A,"updateInset"),(a.inset_top||a.inset_right||a.inset_bottom||a.inset_left)&&A();function $(x){x?r.style.display="block":r.style.display="none"}return d($,"visualizeInsetUpdated"),()=>({destroy(){t.destroy(),ge(v)}})}d(xe,"createCameraControls");function je(n){return d(function(i){var r;let{spaces:t,objects:o}=i,l=(r=t[0])!=null?r:o[0];l&&n.Camera.focusOn(l,{bearing:300,pitch:65})},"handler")}d(je,"createHandler");C();function Ce(n,e,i){let t={markers:{},removeAllMarkers(){i.Markers.removeAll().forEach(f=>{delete this.markers[f.id]}),c()}},{addMarker:o,destroy:l}=Ye(n,i);n.add(t,"removeAllMarkers");let r=n.addFolder("Marker List");n.close();let s=new Map,{rerender:c}=p();function p(){function g(b){var y;delete t.markers[b.id],(y=s.get(b.id))==null||y.destroy()}d(g,"remove");function f(b){let y=Ve(i,b,r,{onRemove:v=>{g(v)}});if(!y)return;let{markerItemFolder:m}=y;s.set(b.id,m)}d(f,"add");function u(){r.destroy(),r=n.addFolder("marker");for(let b in t.markers){let y=t.markers[b];f(y)}}return d(u,"rerender"),{rerender:u,add:f,remove:g}}d(p,"createMarkerControls"),n.domElement.classList.add("list-items");let h;i.on("click",({markers:g,coordinate:f})=>{if(!n._closed)if(g[0]){h==null||h.close();let u=s.get(g[0].id);if(n.open(),!u)return;u==null||u.open(),u==null||u.domElement.scrollIntoView({block:"start"}),u==null||u.domElement.focus(),h=u}else o(f)});function a(g){for(let f of g)t.markers[f.id]=f;c()}return d(a,"populateMarkers"),{populateMarkers:a,destroy(){l()}}}d(Ce,"createMarkerControls");function Ve(n,e,i,{onRemove:t}={}){let o=i.addFolder("".concat(e.id.toString().substring(0,8)));o.onChange(c=>{n.updateState(e,{interactive:s.interactive})}),o.close();let l=n.getState(e);if((l==null?void 0:l.type)!=="marker")throw new Error("error getting state for marker: ".concat(e.id));let{interactive:r}=l;if(r==null)throw new Error("incomplte label state");let s={interactive:r,remove(){n.Markers.remove(e),t==null||t(e),o.destroy()}};return o.add(s,"interactive"),o.add(s,"remove"),{markerItemFolder:o,destroy(){o.destroy()}}}d(Ve,"addMarkerControlToFolder");function Ye(n,e){let i=n.addFolder("Add"),t={onClick:!1,interactive:!0};return i.add(t,"onClick"),i.add(t,"interactive"),{destroy(){i.destroy()},addMarker(o){return i._closed||!t.onClick?void 0:e.Markers.add(o,"<div>New Marker</div>",{interactive:t.interactive})}}}d(Ye,"createAddControl");C();function Ae(n,e){let i=n.addFolder("Walls").close(),t={visible:!0,topColor:"#b1fa87",color:"#e8e8e8",texture:{url:""},topTexture:{url:""}};i.add(t,"visible").onChange(r=>{e.updateState("walls",{visible:r})}),i.addColor(t,"topColor").onChange(r=>{e.updateState("walls",{topColor:r})}),i.addColor(t,"color").onChange(r=>{e.updateState("walls",{color:r})}),i.addFolder("Texture - side").add(t.texture,"url").onFinishChange(r=>{e.updateState("walls",{texture:{url:r}})}),i.addFolder("Texture - top").add(t.topTexture,"url").onFinishChange(r=>{e.updateState("walls",{topTexture:{url:r}})}),e.updateState("walls",{topColor:t.topColor}),e.updateState("walls",{color:t.color})}d(Ae,"createGeometryControl");C();function we(n,e,i){var l,r;n.close();let t={language:(r=(l=i.currentLanguage)==null?void 0:l.code)!=null?r:"en"},o=i.getByType("enterprise-venue");n.add(t,"language",o==null?void 0:o.languages.map(s=>s.code)).onChange(s=>{i.changeLanguage(s)})}d(we,"createMiscControl");function Ee(n,e,i){Ne();let t=new B({title:"SDK Controls"});t.domElement.classList.add("mappedin-js-inspector"),fe(e,n,t),xe(t,e,i==null?void 0:i.camera);let o=t.addFolder("Levels").close(),l=t.addFolder("Scene Controls");l.close();let r=t.addFolder("Labels"),s=t.addFolder("Markers");Ae(t,e);let c=t.addFolder("misc");we(c,e,n);let p={level:e.currentFloor.id},{populatelabels:h}=be(r,n,e),{populateMarkers:a}=Ce(s,n,e),g=n.getByType("floor").reduce((u,b)=>(u[b.name]=b.id,u),{}),f=o.add(p,"level",g).onChange(u=>{e.setFloor(u),p.level=e.currentFloor.id,f.updateDisplay()});return e.on("floor-change-start",u=>{o.controllers[0].setValue(u.floor.id)}),n.getByType("space").forEach(u=>{e.updateState(u,{interactive:!0})}),n.getByType("object").forEach(u=>{e.updateState(u,{interactive:!0})}),n.getByType("object").forEach(u=>{e.updateState(u,{interactive:!0})}),e.setHoverColor("#a2b7e6"),e.Camera.setMaxZoomLevel(20),{populatelabels:h,sceneFolder:l,populateMarkers:a}}d(Ee,"createUi");var _e="mappedin-sdk-debug-css";function Ne(){if(document.getElementById(_e))return;let n=document.createElement("style");n.id=_e,n.textContent=ve,document.head.appendChild(n)}d(Ne,"injectCss");var ae=class ae{constructor(e,i){L(this,"_enabled",!1);L(this,"mv");L(this,"api");L(this,"mapData");L(this,"scenegraphVisualizerMounted",!1);L(this,"storeStateToLocalStorageEnabled",!1);this.mv=e,this.api=i,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:i}=Ee(this.mapData,this.mv,e);i.onOpenClose(o=>{o===i&&!o._closed&&!this.scenegraphVisualizerMounted&&(this.scenegraphVisualizerMounted=!0,ue(this.api.core,i))}),(t=this.api.getMapDataInternal())==null||t.spaces.forEach(o=>{this.mv.updateState(o.id,{interactive:!0})})}get enabled(){return this._enabled}};d(ae,"Inspector");var se=ae;export{se as Inspector};
|
|
1
|
+
import{c as I,e as ce,g as H,i as M,j as P,m as ue}from"./chunk-TDZC72ZP.js";import"./chunk-64LDGG53.js";import"./chunk-DPBLCZG6.js";import{J as he}from"./chunk-YRCDALUI.js";import{a as d,e as L,j as C}from"./chunk-QXQ4TTHH.js";C();C();C();C();var S=class S{constructor(e,i,t,o,l="div"){this.parent=e,this.object=i,this.property=t,this._disabled=!1,this._hidden=!1,this.initialValue=this.getValue(),this.domElement=document.createElement(l),this.domElement.classList.add("controller"),this.domElement.classList.add(o),this.$name=document.createElement("div"),this.$name.classList.add("name"),S.nextNameID=S.nextNameID||0,this.$name.id="lil-gui-name-".concat(++S.nextNameID),this.$widget=document.createElement("div"),this.$widget.classList.add("widget"),this.$disable=this.$widget,this.domElement.appendChild(this.$name),this.domElement.appendChild(this.$widget),this.domElement.addEventListener("keydown",r=>r.stopPropagation()),this.domElement.addEventListener("keyup",r=>r.stopPropagation()),this.parent.children.push(this),this.parent.controllers.push(this),this.parent.$children.appendChild(this.domElement),this._listenCallback=this._listenCallback.bind(this),this.name(t)}name(e){return this._name=e,this.$name.textContent=e,this}onChange(e){return this._onChange=e,this}_callOnChange(){this.parent._callOnChange(this),this._onChange!==void 0&&this._onChange.call(this,this.getValue()),this._changed=!0}onFinishChange(e){return this._onFinishChange=e,this}_callOnFinishChange(){this._changed&&(this.parent._callOnFinishChange(this),this._onFinishChange!==void 0&&this._onFinishChange.call(this,this.getValue())),this._changed=!1}reset(){return this.setValue(this.initialValue),this._callOnFinishChange(),this}enable(e=!0){return this.disable(!e)}disable(e=!0){return e===this._disabled?this:(this._disabled=e,this.domElement.classList.toggle("disabled",e),this.$disable.toggleAttribute("disabled",e),this)}show(e=!0){return this._hidden=!e,this.domElement.style.display=this._hidden?"none":"",this}hide(){return this.show(!1)}options(e){let i=this.parent.add(this.object,this.property,e);return i.name(this._name),this.destroy(),i}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)}};d(S,"Controller");var k=S,K=class K extends k{constructor(e,i,t){super(e,i,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}};d(K,"BooleanController");var V=K;function Y(n){let e,i;return(e=n.match(/(#|0x)?([a-f0-9]{6})/i))?i=e[2]:(e=n.match(/rgb\(\s*(\d*)\s*,\s*(\d*)\s*,\s*(\d*)\s*\)/))?i=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=n.match(/^#?([a-f0-9])([a-f0-9])([a-f0-9])$/i))&&(i=e[1]+e[1]+e[2]+e[2]+e[3]+e[3]),i?"#"+i:!1}d(Y,"normalizeColorString");var ke={isPrimitive:!0,match:n=>typeof n=="string",fromHexString:Y,toHexString:Y},T={isPrimitive:!0,match:n=>typeof n=="number",fromHexString:n=>parseInt(n.substring(1),16),toHexString:n=>"#"+n.toString(16).padStart(6,0)},$e={isPrimitive:!1,match:n=>Array.isArray(n),fromHexString(n,e,i=1){let t=T.fromHexString(n);e[0]=(t>>16&255)/255*i,e[1]=(t>>8&255)/255*i,e[2]=(t&255)/255*i},toHexString([n,e,i],t=1){t=255/t;let o=n*t<<16^e*t<<8^i*t<<0;return T.toHexString(o)}},Le={isPrimitive:!1,match:n=>Object(n)===n,fromHexString(n,e,i=1){let t=T.fromHexString(n);e.r=(t>>16&255)/255*i,e.g=(t>>8&255)/255*i,e.b=(t&255)/255*i},toHexString({r:n,g:e,b:i},t=1){t=255/t;let o=n*t<<16^e*t<<8^i*t<<0;return T.toHexString(o)}},Me=[ke,T,$e,Le];function Se(n){return Me.find(e=>e.match(n))}d(Se,"getColorFormat");var Z=class Z extends k{constructor(e,i,t,o){super(e,i,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=Se(this.initialValue),this._rgbScale=o,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 l=Y(this.$text.value);l&&this._setValueFromHexString(l)}),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 i=this._format.fromHexString(e);this.setValue(i)}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}};d(Z,"ColorController");var N=Z,Q=class Q extends k{constructor(e,i,t){super(e,i,t,"function"),this.$button=document.createElement("button"),this.$button.appendChild(this.$name),this.$widget.appendChild(this.$button),this.$button.addEventListener("click",o=>{o.preventDefault(),this.getValue().call(this.object),this._callOnChange()}),this.$button.addEventListener("touchstart",()=>{},{passive:!0}),this.$disable=this.$button}};d(Q,"FunctionController");var D=Q,q=class q extends k{constructor(e,i,t,o,l,r){super(e,i,t,"number"),this._initInput(),this.min(o),this.max(l);let s=r!==void 0;this.step(s?r:this._getImplicitStep(),s),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,i=!0){return this._step=e,this._stepExplicit=i,this}updateDisplay(){let e=this.getValue();if(this._hasSlider){let i=(e-this._min)/(this._max-this._min);i=Math.max(0,Math.min(i,1)),this.$fill.style.width=i*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 i=d(()=>{let v=parseFloat(this.$input.value);isNaN(v)||(this._stepExplicit&&(v=this._snap(v)),this.setValue(this._clamp(v)))},"onInput"),t=d(v=>{let A=parseFloat(this.$input.value);isNaN(A)||(this._snapClampSetValue(A+v),this.$input.value=this.getValue())},"increment"),o=d(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"),l=d(v=>{this._inputFocused&&(v.preventDefault(),t(this._step*this._normalizeMouseWheel(v)))},"onWheel"),r=!1,s,c,p,h,a,g=5,f=d(v=>{s=v.clientX,c=p=v.clientY,r=!0,h=this.getValue(),a=0,window.addEventListener("mousemove",u),window.addEventListener("mouseup",b)},"onMouseDown"),u=d(v=>{if(r){let A=v.clientX-s,$=v.clientY-c;Math.abs($)>g?(v.preventDefault(),this.$input.blur(),r=!1,this._setDraggingStyle(!0,"vertical")):Math.abs(A)>g&&b()}if(!r){let A=v.clientY-p;a-=A*this._step*this._arrowKeyMultiplier(v),h+a>this._max?a=this._max-h:h+a<this._min&&(a=this._min-h),this._snapClampSetValue(h+a)}p=v.clientY},"onMouseMove"),b=d(()=>{this._setDraggingStyle(!1,"vertical"),this._callOnFinishChange(),window.removeEventListener("mousemove",u),window.removeEventListener("mouseup",b)},"onMouseUp"),y=d(()=>{this._inputFocused=!0},"onFocus"),m=d(()=>{this._inputFocused=!1,this.updateDisplay(),this._callOnFinishChange()},"onBlur");this.$input.addEventListener("input",i),this.$input.addEventListener("keydown",o),this.$input.addEventListener("wheel",l,{passive:!1}),this.$input.addEventListener("mousedown",f),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=d((m,v,A,$,z)=>(m-v)/(A-v)*(z-$)+$,"map"),i=d(m=>{let v=this.$slider.getBoundingClientRect(),A=e(m,v.left,v.right,this._min,this._max);this._snapClampSetValue(A)},"setValueFromX"),t=d(m=>{this._setDraggingStyle(!0),i(m.clientX),window.addEventListener("mousemove",o),window.addEventListener("mouseup",l)},"mouseDown"),o=d(m=>{i(m.clientX)},"mouseMove"),l=d(()=>{this._callOnFinishChange(),this._setDraggingStyle(!1),window.removeEventListener("mousemove",o),window.removeEventListener("mouseup",l)},"mouseUp"),r=!1,s,c,p=d(m=>{m.preventDefault(),this._setDraggingStyle(!0),i(m.touches[0].clientX),r=!1},"beginTouchDrag"),h=d(m=>{m.touches.length>1||(this._hasScrollBar?(s=m.touches[0].clientX,c=m.touches[0].clientY,r=!0):p(m),window.addEventListener("touchmove",a,{passive:!1}),window.addEventListener("touchend",g))},"onTouchStart"),a=d(m=>{if(r){let v=m.touches[0].clientX-s,A=m.touches[0].clientY-c;Math.abs(v)>Math.abs(A)?p(m):(window.removeEventListener("touchmove",a),window.removeEventListener("touchend",g))}else m.preventDefault(),i(m.touches[0].clientX)},"onTouchMove"),g=d(()=>{this._callOnFinishChange(),this._setDraggingStyle(!1),window.removeEventListener("touchmove",a),window.removeEventListener("touchend",g)},"onTouchEnd"),f=this._callOnFinishChange.bind(this),u=400,b,y=d(m=>{if(Math.abs(m.deltaX)<Math.abs(m.deltaY)&&this._hasScrollBar)return;m.preventDefault();let A=this._normalizeMouseWheel(m)*this._step;this._snapClampSetValue(this.getValue()+A),this.$input.value=this.getValue(),clearTimeout(b),b=setTimeout(f,u)},"onWheel");this.$slider.addEventListener("mousedown",t),this.$slider.addEventListener("touchstart",h,{passive:!1}),this.$slider.addEventListener("wheel",y,{passive:!1})}_setDraggingStyle(e,i="horizontal"){this.$slider&&this.$slider.classList.toggle("active",e),document.body.classList.toggle("lil-gui-dragging",e),document.body.classList.toggle("lil-gui-".concat(i),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:i,deltaY:t}=e;return Math.floor(e.deltaY)!==e.deltaY&&e.wheelDelta&&(i=0,t=-e.wheelDelta/120,t*=this._stepExplicit?1:10),i+-t}_arrowKeyMultiplier(e){let i=this._stepExplicit?1:10;return e.shiftKey?i*=10:e.altKey&&(i/=10),i}_snap(e){let i=Math.round(e/this._step)*this._step;return parseFloat(i.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}};d(q,"NumberController");var R=q,ee=class ee extends k{constructor(e,i,t,o){super(e,i,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(o)}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(i=>{let t=document.createElement("option");t.textContent=i,this.$select.appendChild(t)}),this.updateDisplay(),this}updateDisplay(){let e=this.getValue(),i=this._values.indexOf(e);return this.$select.selectedIndex=i,this.$display.textContent=i===-1?e:this._names[i],this}};d(ee,"OptionController");var J=ee,te=class te extends k{constructor(e,i,t){super(e,i,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",o=>{o.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}};d(te,"StringController");var W=te,Fe='.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 Ie(n){let e=document.createElement("style");e.innerHTML=n;let i=document.querySelector("head link[rel=stylesheet], head style");i?document.head.insertBefore(e,i):document.head.appendChild(e)}d(Ie,"_injectStyles");var pe=!1,G=class G{constructor({parent:e,autoPlace:i=e===void 0,container:t,width:o,title:l="Controls",closeFolders:r=!1,injectStyles:s=!0,touchStyles:c=!0}={}){if(this.parent=e,this.root=e?e.root:this,this.children=[],this.controllers=[],this.folders=[],this._closed=!1,this._hidden=!1,this.domElement=document.createElement("div"),this.domElement.classList.add("lil-gui"),this.$title=document.createElement("div"),this.$title.classList.add("title"),this.$title.setAttribute("role","button"),this.$title.setAttribute("aria-expanded",!0),this.$title.setAttribute("tabindex",0),this.$title.addEventListener("click",()=>this.openAnimated(this._closed)),this.$title.addEventListener("keydown",p=>{(p.code==="Enter"||p.code==="Space")&&(p.preventDefault(),this.$title.click())}),this.$title.addEventListener("touchstart",()=>{},{passive:!0}),this.$children=document.createElement("div"),this.$children.classList.add("children"),this.domElement.appendChild(this.$title),this.domElement.appendChild(this.$children),this.title(l),this.parent){this.parent.children.push(this),this.parent.folders.push(this),this.parent.$children.appendChild(this.domElement);return}this.domElement.classList.add("root"),c&&this.domElement.classList.add("allow-touch-styles"),!pe&&s&&(Ie(Fe),pe=!0),t?t.appendChild(this.domElement):i&&(this.domElement.classList.add("autoPlace"),document.body.appendChild(this.domElement)),o&&this.domElement.style.setProperty("--width",o+"px"),this._closeFolders=r}add(e,i,t,o,l){if(Object(t)===t)return new J(this,e,i,t);let r=e[i];switch(typeof r){case"number":return new R(this,e,i,t,o,l);case"boolean":return new V(this,e,i);case"string":return new W(this,e,i);case"function":return new D(this,e,i)}console.error("gui.add failed\n property:",i,"\n object:",e,"\n value:",r)}addColor(e,i,t=1){return new N(this,e,i,t)}addFolder(e){let i=new G({parent:this,title:e});return this.root._closeFolders&&i.close(),i}load(e,i=!0){return e.controllers&&this.controllers.forEach(t=>{t instanceof D||t._name in e.controllers&&t.load(e.controllers[t._name])}),i&&e.folders&&this.folders.forEach(t=>{t._title in e.folders&&t.load(e.folders[t._title])}),this}save(e=!0){let i={controllers:{},folders:{}};return this.controllers.forEach(t=>{if(!(t instanceof D)){if(t._name in i.controllers)throw new Error('Cannot save GUI with duplicate property "'.concat(t._name,'"'));i.controllers[t._name]=t.save()}}),e&&this.folders.forEach(t=>{if(t._title in i.folders)throw new Error('Cannot save GUI with duplicate folder "'.concat(t._title,'"'));i.folders[t._title]=t.save()}),i}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 i=this.$children.clientHeight;this.$children.style.height=i+"px",this.domElement.classList.add("transition");let t=d(l=>{l.target===this.$children&&(this.$children.style.height="",this.domElement.classList.remove("transition"),this.$children.removeEventListener("transitionend",t))},"onTransitionEnd");this.$children.addEventListener("transitionend",t);let o=e?this.$children.scrollHeight:0;this.domElement.classList.toggle("closed",!e),requestAnimationFrame(()=>{this.$children.style.height=o+"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(i=>{e=e.concat(i.controllersRecursive())}),e}foldersRecursive(){let e=Array.from(this.folders);return this.folders.forEach(i=>{e=e.concat(i.foldersRecursive())}),e}};d(G,"GUI");var X=G,B=X;C();C();var E=(()=>{let n=new he;return d(function(i){return n.set(i),"#".concat(n.getHexString())},"normalize")})();function ge(n){let e;for(e of n)e()}d(ge,"runAll");function ie(n,e){let i=window.location.href,t=new URL(i),o=new URLSearchParams(t.search);for(let l in n)if(n.hasOwnProperty(l)){let r="".concat(e,".").concat(l);o.set(r,n[l])}t.search=o.toString(),history.pushState({path:t.toString()},"",t.toString())}d(ie,"updateCurrentUrlParamsWithNamespace");function ne(n,e){let i=new URLSearchParams(window.location.search),t={};for(let[o,l]of i)if(o.startsWith("".concat(n,"."))){let r=o.slice(n.length+1);l==="true"||l==="false"?t[r]=l==="true":typeof(e==null?void 0:e[r])=="number"?t[r]=Number(l):t[r]=l}return{namespace:n,params:t}}d(ne,"getUrlParamsWithNamespace");var De=["interactive"];function U(n,e,i){var o,l;let t=i.addFolder("".concat(e.type,"-").concat(e.id));for(let r in e){if(r==="visible"&&t.add(e,r).onChange(s=>{n.updateState(e.id,{[r]:s})}),r==="color"||r==="hoverColor"){e[r]=E(e[r]),t.addColor(e,r).onChange(s=>{n.updateState(e.id,{[r]:s})});continue}if(r==="height"){t.add(e,r,0,20,1).onChange(s=>{n.updateState(e.id,{[r]:s})});continue}if(r==="texture"&&e.texture){(o=t.addFolder("Texture - side").add(e,"texture"))==null||o.onChange(c=>{n.updateState(e.id,{texture:{url:c}})});continue}if(r==="topTexture"&&e.topTexture){(l=t.addFolder("Texture - top").add(e,"topTexture"))==null||l.onChange(c=>{n.updateState(e.id,{topTexture:{url:c}})});continue}if(r==="opacity"){t.add(e,r,0,1,.1).onChange(s=>{n.updateState(e.id,{[r]:s})});continue}De.includes(r)&&t.add(e,r).onChange(s=>{n.updateState(e.id,{[r]:s})})}return e.isInView&&(t.add(e,"isInView").listen().disable(),t.add(e,"isInViewCheck")),{cleanup(){t.destroy()}}}d(U,"renderByProp");C();C();function Te(){let n=[];function e(o,l){var c;let r=Object.values(o.getMapData())[0],s=l;if(s&&H.is(s)){let p=(c=r.getByType("enterprise-location"))==null?void 0:c.find(h=>h.spaces.some(a=>a.id===s.id));p&&(s=p)}return s}d(e,"getHighlightTarget");async function i(o,l){return l instanceof P?o.Camera.focusOn(l.locations.flatMap(r=>r.spaces),O):l instanceof M?o.Camera.focusOn(l.spaces,O):o.Camera.focusOn(l,O)}d(i,"focusOn");function t(o,l,{focus:r=!1}={}){if(!window.enableHighlightCard)return()=>{};let s=e(o,l),c=document.createElement("div");if(c.style.cssText="\n position: absolute;\n top: 20px;\n left: 20px;\n background-color: rgba(30, 30, 30, 0.95);\n box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);\n border-radius: 12px;\n padding: 24px;\n max-width: 320px;\n z-index: 1000;\n font-family: 'Arial', sans-serif;\n transition: all 0.3s ease;\n color: #e0e0e0;\n ","name"in s){let h=document.createElement("h3");h.textContent=s.name,h.style.cssText="\n margin: 0 0 16px;\n font-size: 22px;\n font-weight: 600;\n color: #ffffff;\n letter-spacing: -0.5px;\n ",c.appendChild(h)}if(s instanceof M){if(s.description){let h=document.createElement("p");h.textContent=s.description,h.style.cssText="\n margin: 0 0 16px;\n font-size: 14px;\n color: #b0b0b0;\n line-height: 1.5;\n ",c.appendChild(h)}if(s.tags&&s.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 ",s.tags.forEach(a=>{let g=document.createElement("span");g.textContent=a,g.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(g)}),c.appendChild(h)}}let p;if(!(l instanceof P)){let h=new B({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 a=o.getState(l);a&&(U(o,{id:l.id,...a},h),c.appendChild(h.domElement)),p=h}return document.body.appendChild(c),r&&i(o,s),()=>{c.style.opacity="0",c.style.transform="translateY(-10px)",setTimeout(()=>c.remove(),300),p==null||p.destroy()}}return d(t,"highlightCard"),{highlightCard:t,highlight:(o,l,{focus:r=!0}={})=>{n.length>0&&n.forEach(c=>o.Markers.remove(c));let s=e(o,l);if(s instanceof M)r&&o.Camera.focusOn(s.spaces,O),n.push(...s.spaces.map(c=>o.Markers.add(c,'<div style="padding: 15px; background-color: #ffffff; border-radius: 8px; box-shadow: 0 4px 6px rgba(0,0,0,0.1); max-width: 250px; position: relative;">\n <h3 style="margin: 0 0 10px; color: #333; font-size: 16px; font-weight: 600;">'.concat(s.name,"</h3>\n ").concat(s.description?'<p style="margin: 0 0 10px; color: #666; font-size: 14px; font-weight: 400;">'.concat(s.description,"</p>"):"","\n ").concat(s.tags?s.tags.map(p=>'<span style="display: inline-block; padding: 3px 8px; background-color: #e0f2f1; color: #00796b; border-radius: 12px; font-size: 12px;">'.concat(p,"</span>")).join(" "):"",'\n <div style="position: absolute; bottom: -10px; left: 50%; transform: translateX(-50%); width: 0; height: 0; border-left: 10px solid transparent; border-right: 10px solid transparent; border-top: 10px solid #ffffff;"></div>\n </div>'),{rank:"always-visible",anchor:"top"})));else if(s instanceof P){r&&o.Camera.focusOn(s.locations.flatMap(h=>h.spaces),O);let c=new Map,p=new Set;s.locations.forEach(h=>{c.has(h.name)||(h.spaces.forEach(a=>{n.push(o.Markers.add(a,'<div style="padding: 12px; background-color: rgba(0, 153, 51, 0.95); border-radius: 8px; box-shadow: 0 4px 8px rgba(0,0,0,0.3); transform: translateY(-4px); transition: all 0.3s ease;">\n <span style="font-weight: 600; color: #FFFFFF; font-size: 16px; text-shadow: 1px 1px 2px rgba(0,0,0,0.2);">'.concat(h.name,"</span>\n </div>"),{rank:"always-visible"}))}),c.set(h.name,!0))}),s.locations.forEach(h=>{h.coordinates.forEach(a=>{let g="".concat(a.latitude,",").concat(a.longitude);if(!p.has(g)&&!c.has(h.name)){let f=o.Markers.add(a,'<div style="padding: 10px; background-color: rgba(51, 102, 204, 0.9); border-radius: 6px; box-shadow: 0 3px 6px rgba(0,0,0,0.2);">\n <span style="font-weight: 500; color: #FFFFFF; font-size: 16px;">'.concat(h.name,'</span>\n <br>\n <span style="color: #FFFFFF; font-size: 12px; font-weight: 400;">Node</span>\n </div>'),{rank:"always-visible"});p.add(g),n.push(f)}})})}}}}d(Te,"createHighlightControl");var O={duration:300,easing:"ease-in-out"},F=Te();C();var w={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 Oe(n){n.add(w.options.places.fields,"name").name("Places: Name"),n.add(w.options.places.fields,"description").name("Places: Description"),n.add(w.options.places.fields,"link").name("Places: Link"),n.add(w.options.places.fields,"category").name("Places: Category"),n.add(w.options.places,"limit"),n.add(w.options.locations.fields,"name").name("Locations: Name"),n.add(w.options.locations.fields,"tag").name("Locations: Tag"),n.add(w.options.locations.fields,"description").name("Locations: Description"),n.add(w.options.places,"limit"),n.add(w.options.categories.fields,"name").name("Categories: Name")}d(Oe,"createAdvancedSettings");function me(n,e,i){var h;let t=new I,o=i.addFolder("Search");o.open();let l=o.add(w,"search").onChange(async a=>{let g=await e.Search.query(a,w.options);g&&(w.results=g,s(g,t))}),r=document.createElement("div");r.style.marginLeft="10px",(h=l.domElement.parentElement)==null||h.appendChild(r);let{renderSearch:s,close:c}=ze(n,e,r,l.$input),p=o.addFolder("Advanced");return p.close(),Oe(p),document.addEventListener("keydown",a=>{(a.metaKey||a.ctrlKey)&&a.key==="k"?(a.preventDefault(),o._closed&&o.open(),l.$input.focus()):a.key==="Escape"&&(c(),t.publish("highlight",void 0))}),{pubsub:t}}d(me,"createSearchControl");function ze(n,e,i,t){let o,l;t.addEventListener("input",async s=>{s instanceof InputEvent&&(s.inputType==="insertText"||s.inputType==="insertCompositionText")&&(clearTimeout(o),o=setTimeout(async()=>{var p;let c=await e.Search.suggest(t.value);c&&c.length>0&&r((p=c[0])==null?void 0:p.suggestion)},100))});function r(s){if(!s){t.placeholder="";return}let c=t.value;t.value=s,t.setSelectionRange(c.length,s.length)}return d(r,"renderSuggestion"),{renderSearch(s,c){var p,h;if(s.places.length===0&&((p=s.enterpriseCategories)==null?void 0:p.length)===0&&((h=s.enterpriseLocations)==null?void 0:h.length)===0){i.textContent="No results found.";return}l=He(i,s,n,c)},close(){l.destroy()}}}d(ze,"mount");function He(n,e,i,t){n.innerHTML="";let o=document.createElement("div");Object.assign(o.style,j.dropdownContainer);let l=document.createElement("ul");l.className="options-list",Object.assign(l.style,j.optionsList),l.style.display="block";let r=[],s=d((g,f)=>{if(f&&f.length>0){let u=document.createElement("li");u.textContent=g,Object.assign(u.style,j.sectionHeader),l.appendChild(u),f.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,j.option),m.tabIndex=0,m.addEventListener("focus",()=>{p(r.indexOf(m))}),m.addEventListener("mouseover",()=>{m.style.backgroundColor="#f0f0f0"}),m.addEventListener("mouseout",()=>{m.style.backgroundColor=""}),m.addEventListener("click",()=>{}),m.setAttribute("data-type",g),m.setAttribute("data-index",y.toString()),l.appendChild(m),r.push(m)})}},"addSection");s("enterpriseLocations",e.enterpriseLocations),s("enterpriseCategories",e.enterpriseCategories),s("Places",e.places),o.appendChild(l),n.appendChild(o);let c=[],p=d(g=>{c.forEach(m=>m()),c=[],r.forEach((m,v)=>{v===g?m.style.backgroundColor="#e0e0e0":m.style.backgroundColor=""});let f=r[g],u=f.getAttribute("data-type"),b=parseInt(f.getAttribute("data-index")||"0",10);if(!u)return;let{item:y}=e[u][b];F.highlight(i,y),t.publish("highlight",y)},"highlightOption"),h=d(g=>{!o.contains(g.target)&&g.target!==n&&a()},"handleClickOutside");document.addEventListener("click",h);let a=d(()=>{n.innerHTML="",document.removeEventListener("click",h)},"destroy");return{destroy(){n.innerHTML="",t.publish("highlight",void 0)}}}d(He,"createCustomDropdown");var j={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 fe(n,e,i){i.domElement.id="interactionPanel";let t=[],{pubsub:o}=me(n,e,i);o.on("highlight",h=>{if(h){t.forEach(g=>g()),t=[];let a=h instanceof M?h.spaces[0]:h;if(a&&!H.is(a))return;t.push(F.highlightCard(n,a,{focus:!0}))}else t.forEach(a=>a()),t=[]});let l=i.addFolder("Click \u{1F447}").close(),{sub:r}=Pe(n,l);r.on("click",h=>{t.forEach(a=>a()),t=[],h.spaces[0]&&(t=[F.highlightCard(n,h.spaces[0])])});let s=i.addFolder("Hover \u{1F681}").close(),{sub:c}=Ge(n,s),p;c.on("hover",h=>{h.spaces[0]?(p==null||p(),t.length===0&&(p=F.highlightCard(n,h.spaces[0]))):(p==null||p(),p=void 0)})}d(fe,"createInteractionControls");function Pe(n,e){let i=new I,t={position:"",hoverColor:E(n.getHoverColor())},o=e.add(t,"position").disable(),l=[];function r(){l.forEach(c=>c()),l.length=0}d(r,"reset");let s=0;return n.on("click",c=>{var u;let{labels:p,markers:h,coordinate:a}=c;r(),i.publish("click",c),clearInterval(s),o.load(JSON.stringify([a.longitude,a.latitude]));let g=p[0]||h[0];if(g){let b=re(n,g,e);if(!b)return;l.push(b.destroy),b.labelItemFolder.openAnimated()}let f=(u=c.spaces[0])!=null?u:c.objects[0];if(f){let b={id:f.id,...n.getState(f.id),type:f.type,isInView:!1,isInViewCheck:oe(n,f.id)},{cleanup:y}=U(n,b,e);s=setInterval(()=>{b.isInView=n.isInView(g||f)},500),l.push(y)}}),{sub:i}}d(Pe,"createClickControls");function Ge(n,e){let i=new I;n.setHoverColor("#1f3a7a");let t={position:"",hoverColor:E(n.getHoverColor()),intersected:"",type:"",id:""},o=e.add(t,"position").disable();e.add(t,"id").disable().listen(),e.add(t,"type").disable().listen(),e.addColor(t,"hoverColor").onChange(s=>{n.setHoverColor(s)});let l=[];function r(){l.forEach(s=>s()),l.length=0}return d(r,"reset"),n.on("hover",s=>{var b,y,m;let{coordinate:c,spaces:p,objects:h,markers:a,labels:g}=s;r(),i.publish("hover",s),o.load(JSON.stringify([c.longitude,c.latitude]));let f=(m=(y=(b=p[0])!=null?b:h[0])!=null?y:a[0])!=null?m:g[0];if(!f)return;let u=n.getState(f);u&&(t.type=u.type,t.id=f.id)}),{sub:i}}d(Ge,"createHoverControls");function oe(n,e){return d(function(){console.log("isInView",n.isInView(e))},"isInView")}d(oe,"createIsInViewHandler");function be(n,e,i){let t={labels:{},all(){i.Labels.all().forEach(f=>{this.labels[f.id]=f}),c()},removeAllLabels(){i.Labels.removeAll().forEach(f=>{delete this.labels[f.id]}),c()}},{addLabel:o,destroy:l}=Be(n,i);n.add(t,"all"),n.add(t,"removeAllLabels");let r=n.addFolder("Label List");n.close();let s=new Map,{rerender:c}=p();function p(){function g(b){var y;delete t.labels[b.id],(y=s.get(b.id))==null||y.destroy()}d(g,"remove");function f(b){let y=re(i,b,r,{onRemove:v=>{g(v)}});if(!y)return;let{labelItemFolder:m}=y;s.set(b.id,m)}d(f,"add");function u(){r.destroy(),r=n.addFolder("Label");for(let b in t.labels){let y=t.labels[b];f(y)}}return d(u,"rerender"),{rerender:u,add:f,remove:g}}d(p,"createLabelControls"),n.domElement.classList.add("list-items");let h;i.on("click",({labels:g,coordinate:f})=>{if(!n._closed)if(g[0]){h==null||h.close();let u=s.get(g[0].id);if(n.open(),!u)return;u==null||u.open(),u==null||u.domElement.scrollIntoView({block:"start"}),u==null||u.domElement.focus(),h=u}else o(f)});function a(g){for(let f of g)t.labels[f.id]=f;c()}return d(a,"populatelabels"),{populatelabels:a,destroy(){l()}}}d(be,"createLabelControls");function re(n,e,i,{onRemove:t}={}){var p,h,a,g;let o=i.addFolder("".concat((p=e.text)==null?void 0:p.substring(0,12)));o.onChange(f=>{n.updateState(e,{appearance:c.appearance,interactive:c.interactive})}),o.close();let l=n.getState(e);if((l==null?void 0:l.type)!=="label")throw new Error("error getting state for label: ".concat(e.id));let{appearance:r,interactive:s}=l;if(!r||r.margin==null||s==null)throw new Error("incomplte label state");let c={text:e.text,interactive:s,appearance:{...r,margin:r.margin||0,marker:{foregroundColor:(a=(h=r.marker)==null?void 0:h.foregroundColor)!=null&&a.active?E((g=r.marker.foregroundColor)==null?void 0:g.active):"black"},text:{foregroundColor:E(r.text.foregroundColor)}},remove(){n.Labels.remove(e),t==null||t(e),o.destroy()},isInView:oe(n,e.id)};return o.add(c.appearance,"margin",0,20).name("margin"),o.add(c,"text"),o.add(c,"interactive"),o.addColor(c.appearance.marker,"foregroundColor").name("marker foreground"),o.addColor(c.appearance.text,"foregroundColor").name("text forground"),o.add(c,"isInView"),o.add(c,"remove"),{labelItemFolder:o,destroy(){o.destroy()}}}d(re,"addLabelControlToFolder");function Be(n,e){let i=n.addFolder("Add"),t={onClick:!1,margin:0,text:"New Label!",interactive:!0,marginForegroundColor:E("skyblue"),marginBackgroundColor:E("coral"),textForegroundColor:E("slategray"),textBackgroundColor:E("white")};return i.add(t,"onClick"),i.add(t,"margin"),i.add(t,"interactive"),i.add(t,"text"),i.addColor(t,"marginForegroundColor"),i.addColor(t,"marginBackgroundColor"),i.addColor(t,"textForegroundColor"),i.addColor(t,"textBackgroundColor"),{destroy(){i.destroy()},addLabel(o){return i._closed||!t.onClick?void 0:e.Labels.add(o,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})}}}d(Be,"createAddControl");var ve={};C();var ye="camera-ui";function xe(n,e,i){var z,le;let t=n.addFolder("Camera \u{1F4F7}").onOpenClose(x=>{ie({opened:!x._closed},ye)}),{params:o}=ne(ye);o.opened||t.close();let l=e.Camera.center.toJSON(),r=document.createElement("div");Object.assign(r.style,{display:"none",position:"absolute",left:"0px",top:"0px",bottom:"0px",right:"0px",backgroundColor:"aqua",pointerEvents:"none",opacity:.5}),document.body.appendChild(r);let[s,c,p,h]=(z=i==null?void 0:i.padding)!=null?z:[],a={center_lat:l.latitude,center_lon:l.longitude,zoomLevel:e.Camera.zoomLevel,pitch:e.Camera.pitch,bearing:e.Camera.bearing,minZoomLevel:e.Camera.minZoomLevel,maxZoomLevel:e.Camera.maxZoomLevel,inset_type:"pixel",inset_top:s!=null?s:0,inset_left:h!=null?h:0,inset_right:c!=null?c:0,inset_bottom:p!=null?p:0,animateOnLoad:!0,persist:()=>{ie(t.save().controllers,"camera"),navigator.clipboard.writeText(window.location.href)},visualizeInset:!!(s||c||p||h),"Focus on click":(le=i==null?void 0:i.focusOnClick)!=null?le:!0,"Focus on current floor":()=>{e.Camera.focusOn([e.currentFloor],{screenOffsets:{top:20,left:20,right:20,bottom:20}})}};function g(){a.inset_type==="portion"?Object.assign(r.style,{left:a.inset_left*u+"px",top:a.inset_top*f+"px",bottom:a.inset_bottom*f+"px",right:a.inset_right*u+"px"}):Object.assign(r.style,{left:a.inset_left+"px",top:a.inset_top+"px",bottom:a.inset_bottom+"px",right:a.inset_right+"px"})}d(g,"updateInsetVisualizer"),t.add(a,"center_lat").listen().disable(),t.add(a,"center_lon").listen().disable(),t.add(a,"zoomLevel",16,22,.5).listen().disable(),t.add(a,"pitch").listen().disable(),t.add(a,"bearing").listen().disable(),t.add(a,"minZoomLevel",5,22,.5).onChange(x=>{e.Camera.setMinZoomLevel(x)}),t.add(a,"maxZoomLevel",10,22,.5).onChange(x=>{e.Camera.setMaxZoomLevel(x)}),t.add(a,"animateOnLoad"),t.add(a,"visualizeInset").onChange($),$(a.visualizeInset);let{innerHeight:f,innerWidth:u}=window;t.add(a,"inset_type",["pixel","portion"]).onChange(A),t.add(a,"inset_top",0,f).onChange(A),t.add(a,"inset_bottom",0,f).onChange(A),t.add(a,"inset_left",0,u).onChange(A),t.add(a,"inset_right",0,u).onChange(A);let b=je(e);t.add(a,"Focus on click").onChange(x=>{x?e.on("click",b):e.off("click",b)}),a["Focus on click"]&&e.on("click",b),t.add(a,"persist"),t.add(a,"Focus on current floor");let y=d(x=>{t._closed||(a.center_lat=x.center.latitude,a.center_lon=x.center.longitude,a.zoomLevel=x.zoomLevel,a.bearing=x.bearing,a.pitch=x.pitch)},"onCameraChanged");e.on("camera-change",y);let{params:m}=ne("camera",a);if(Object.keys(m).length>0){let x=m;e.Camera.setScreenOffsets({top:x.inset_top,left:x.inset_left,right:x.inset_right,bottom:x.inset_bottom,type:x.inset_type});let de={pitch:x.pitch,center:new ce(x.center_lat,x.center_lon),bearing:x.bearing,zoomLevel:x.zoomLevel};x.animateOnLoad?e.Camera.animateTo(de):e.Camera.set(de),t.load({controllers:x,folders:{}}),g()}let v=[()=>{e.off("camera-change",y)}];function A(){e.Camera.setScreenOffsets({top:a.inset_top,left:a.inset_left,right:a.inset_right,bottom:a.inset_bottom,type:a.inset_type}),g()}d(A,"updateInset"),(a.inset_top||a.inset_right||a.inset_bottom||a.inset_left)&&A();function $(x){x?r.style.display="block":r.style.display="none"}return d($,"visualizeInsetUpdated"),()=>({destroy(){t.destroy(),ge(v)}})}d(xe,"createCameraControls");function je(n){return d(function(i){var r;let{spaces:t,objects:o}=i,l=(r=t[0])!=null?r:o[0];l&&n.Camera.focusOn(l,{bearing:300,pitch:65})},"handler")}d(je,"createHandler");C();function Ce(n,e,i){let t={markers:{},removeAllMarkers(){i.Markers.removeAll().forEach(f=>{delete this.markers[f.id]}),c()}},{addMarker:o,destroy:l}=Ye(n,i);n.add(t,"removeAllMarkers");let r=n.addFolder("Marker List");n.close();let s=new Map,{rerender:c}=p();function p(){function g(b){var y;delete t.markers[b.id],(y=s.get(b.id))==null||y.destroy()}d(g,"remove");function f(b){let y=Ve(i,b,r,{onRemove:v=>{g(v)}});if(!y)return;let{markerItemFolder:m}=y;s.set(b.id,m)}d(f,"add");function u(){r.destroy(),r=n.addFolder("marker");for(let b in t.markers){let y=t.markers[b];f(y)}}return d(u,"rerender"),{rerender:u,add:f,remove:g}}d(p,"createMarkerControls"),n.domElement.classList.add("list-items");let h;i.on("click",({markers:g,coordinate:f})=>{if(!n._closed)if(g[0]){h==null||h.close();let u=s.get(g[0].id);if(n.open(),!u)return;u==null||u.open(),u==null||u.domElement.scrollIntoView({block:"start"}),u==null||u.domElement.focus(),h=u}else o(f)});function a(g){for(let f of g)t.markers[f.id]=f;c()}return d(a,"populateMarkers"),{populateMarkers:a,destroy(){l()}}}d(Ce,"createMarkerControls");function Ve(n,e,i,{onRemove:t}={}){let o=i.addFolder("".concat(e.id.toString().substring(0,8)));o.onChange(c=>{n.updateState(e,{interactive:s.interactive})}),o.close();let l=n.getState(e);if((l==null?void 0:l.type)!=="marker")throw new Error("error getting state for marker: ".concat(e.id));let{interactive:r}=l;if(r==null)throw new Error("incomplte label state");let s={interactive:r,remove(){n.Markers.remove(e),t==null||t(e),o.destroy()}};return o.add(s,"interactive"),o.add(s,"remove"),{markerItemFolder:o,destroy(){o.destroy()}}}d(Ve,"addMarkerControlToFolder");function Ye(n,e){let i=n.addFolder("Add"),t={onClick:!1,interactive:!0};return i.add(t,"onClick"),i.add(t,"interactive"),{destroy(){i.destroy()},addMarker(o){return i._closed||!t.onClick?void 0:e.Markers.add(o,"<div>New Marker</div>",{interactive:t.interactive})}}}d(Ye,"createAddControl");C();function Ae(n,e){let i=n.addFolder("Walls").close(),t={visible:!0,topColor:"#b1fa87",color:"#e8e8e8",texture:{url:""},topTexture:{url:""}};i.add(t,"visible").onChange(r=>{e.updateState("walls",{visible:r})}),i.addColor(t,"topColor").onChange(r=>{e.updateState("walls",{topColor:r})}),i.addColor(t,"color").onChange(r=>{e.updateState("walls",{color:r})}),i.addFolder("Texture - side").add(t.texture,"url").onFinishChange(r=>{e.updateState("walls",{texture:{url:r}})}),i.addFolder("Texture - top").add(t.topTexture,"url").onFinishChange(r=>{e.updateState("walls",{topTexture:{url:r}})}),e.updateState("walls",{topColor:t.topColor}),e.updateState("walls",{color:t.color})}d(Ae,"createGeometryControl");C();function we(n,e,i){var l,r;n.close();let t={language:(r=(l=i.currentLanguage)==null?void 0:l.code)!=null?r:"en"},o=i.getByType("enterprise-venue");n.add(t,"language",o==null?void 0:o.languages.map(s=>s.code)).onChange(s=>{i.changeLanguage(s)})}d(we,"createMiscControl");function Ee(n,e,i){Ne();let t=new B({title:"SDK Controls"});t.domElement.classList.add("mappedin-js-inspector"),fe(e,n,t),xe(t,e,i==null?void 0:i.camera);let o=t.addFolder("Levels").close(),l=t.addFolder("Scene Controls");l.close();let r=t.addFolder("Labels"),s=t.addFolder("Markers");Ae(t,e);let c=t.addFolder("misc");we(c,e,n);let p={level:e.currentFloor.id},{populatelabels:h}=be(r,n,e),{populateMarkers:a}=Ce(s,n,e),g=n.getByType("floor").reduce((u,b)=>(u[b.name]=b.id,u),{}),f=o.add(p,"level",g).onChange(u=>{e.setFloor(u),p.level=e.currentFloor.id,f.updateDisplay()});return e.on("floor-change-start",u=>{o.controllers[0].setValue(u.floor.id)}),n.getByType("space").forEach(u=>{e.updateState(u,{interactive:!0})}),n.getByType("object").forEach(u=>{e.updateState(u,{interactive:!0})}),n.getByType("object").forEach(u=>{e.updateState(u,{interactive:!0})}),e.setHoverColor("#a2b7e6"),e.Camera.setMaxZoomLevel(20),{populatelabels:h,sceneFolder:l,populateMarkers:a}}d(Ee,"createUi");var _e="mappedin-sdk-debug-css";function Ne(){if(document.getElementById(_e))return;let n=document.createElement("style");n.id=_e,n.textContent=ve,document.head.appendChild(n)}d(Ne,"injectCss");var ae=class ae{constructor(e,i){L(this,"_enabled",!1);L(this,"mv");L(this,"api");L(this,"mapData");L(this,"scenegraphVisualizerMounted",!1);L(this,"storeStateToLocalStorageEnabled",!1);this.mv=e,this.api=i,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:i}=Ee(this.mapData,this.mv,e);i.onOpenClose(o=>{o===i&&!o._closed&&!this.scenegraphVisualizerMounted&&(this.scenegraphVisualizerMounted=!0,ue(this.api.core,i))}),(t=this.api.getMapDataInternal())==null||t.spaces.forEach(o=>{this.mv.updateState(o.id,{interactive:!0})})}get enabled(){return this._enabled}};d(ae,"Inspector");var se=ae;export{se as Inspector};
|