@mappedin/mappedin-js 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-3ZAYAM73.js +1 -0
- 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-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-H3FZ2HUK.js → inspector-W4AYHBES.js} +1 -1
- package/lib/esm/{internal-422K3KWW.js → internal-ILFOL5NN.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-OI4MOZRT.js +0 -1
package/lib/esm/index.d.ts
CHANGED
|
@@ -837,6 +837,7 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/map-data-objects' {
|
|
|
837
837
|
*/
|
|
838
838
|
readonly obstructionIdByEntranceId: Record<string, string>;
|
|
839
839
|
readonly venue?: EnterpriseVenue;
|
|
840
|
+
readonly sasToken?: string;
|
|
840
841
|
directions: DirectionsInternal;
|
|
841
842
|
enterpriseMode: boolean;
|
|
842
843
|
nodesById: MapDataRecords['nodesById'];
|
|
@@ -2931,7 +2932,7 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/analytics' {
|
|
|
2931
2932
|
declare module '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/category' {
|
|
2932
2933
|
import type { EnterpriseCategory as MVFEnterpriseCategory } from '@mappedin/mvf';
|
|
2933
2934
|
import type { MapDataInternal, EnterpriseLocation } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
|
|
2934
|
-
import
|
|
2935
|
+
import BaseMetaData from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/base-metadata-object';
|
|
2935
2936
|
/**
|
|
2936
2937
|
* An EnterpriseCategory groups one or more EnterpriseLocation. These allow similar locations to be sorted in a logical fashion.
|
|
2937
2938
|
* 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.
|
|
@@ -2942,7 +2943,7 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/category'
|
|
|
2942
2943
|
*
|
|
2943
2944
|
* Refer to the [EnterpriseCategory Guide](https://developer.mappedin.com/web-sdk/enterprise-data#enterprise-categories) for more information and interactive examples.
|
|
2944
2945
|
*/
|
|
2945
|
-
class EnterpriseCategory extends
|
|
2946
|
+
class EnterpriseCategory extends BaseMetaData implements Omit<MVFEnterpriseCategory, 'children' | 'locations'> {
|
|
2946
2947
|
#private;
|
|
2947
2948
|
/**
|
|
2948
2949
|
* @internal
|
|
@@ -3023,8 +3024,8 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/category'
|
|
|
3023
3024
|
declare module '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/location' {
|
|
3024
3025
|
import type { EnterpriseLocation as MVFEnterpriseLocation, LocationState, OperationHours, SiblingGroup } from '@mappedin/mvf';
|
|
3025
3026
|
import type { Coordinate, EnterpriseCategory, MapDataInternal, Space } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
|
|
3026
|
-
import BaseMapData from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/base-object';
|
|
3027
3027
|
import type Node from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/node';
|
|
3028
|
+
import BaseMetaData from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/base-metadata-object';
|
|
3028
3029
|
/**
|
|
3029
3030
|
* An EnterpriseLocation contains metadata about a location, such as its name, description, logo, phone number, social medial links, hours of operation and more.
|
|
3030
3031
|
* They can be accessed using the {@link MapData.getByType()} method as shown below.
|
|
@@ -3035,7 +3036,7 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/location'
|
|
|
3035
3036
|
*
|
|
3036
3037
|
* Refer to the [EnterpriseLocation Guide](https://developer.mappedin.com/web-sdk/enterprise-data#enterprise-locations) for more information and interactive examples.
|
|
3037
3038
|
*/
|
|
3038
|
-
class EnterpriseLocation extends
|
|
3039
|
+
class EnterpriseLocation extends BaseMetaData implements Omit<MVFEnterpriseLocation, 'polygons' | 'nodes' | 'links'> {
|
|
3039
3040
|
#private;
|
|
3040
3041
|
/**
|
|
3041
3042
|
* @internal
|
|
@@ -3112,10 +3113,10 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/location'
|
|
|
3112
3113
|
* Example use cases:
|
|
3113
3114
|
* - 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
|
|
3114
3115
|
* 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.
|
|
3115
|
-
* - An
|
|
3116
|
+
* - 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.
|
|
3116
3117
|
* 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.
|
|
3117
3118
|
*
|
|
3118
|
-
* 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
|
|
3119
|
+
* 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
|
|
3119
3120
|
* 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.
|
|
3120
3121
|
*/
|
|
3121
3122
|
instances?: EnterpriseLocation[] | undefined;
|
|
@@ -3220,7 +3221,7 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/location'
|
|
|
3220
3221
|
declare module '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/venue' {
|
|
3221
3222
|
import type { EnterpriseVenue as MVFEnterpriseVenue, Language } from '@mappedin/mvf';
|
|
3222
3223
|
import type { Hyperlink, MapDataInternal } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
|
|
3223
|
-
import
|
|
3224
|
+
import BaseMetaData from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/base-metadata-object';
|
|
3224
3225
|
/**
|
|
3225
3226
|
* The EnterpriseVenue class holds metadata bout the map, which includes the map name, supported languages, default language, top locations and more.
|
|
3226
3227
|
* It can be accessed using the {@link MapData.getByType()} method as shown below.
|
|
@@ -3231,7 +3232,7 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/venue' {
|
|
|
3231
3232
|
*
|
|
3232
3233
|
* Refer to the [EnterpriseVenue Guide](https://developer.mappedin.com/web-sdk/enterprise-data#enterprise-venue) for more information.
|
|
3233
3234
|
*/
|
|
3234
|
-
class EnterpriseVenue extends
|
|
3235
|
+
class EnterpriseVenue extends BaseMetaData implements MVFEnterpriseVenue {
|
|
3235
3236
|
#private;
|
|
3236
3237
|
/**
|
|
3237
3238
|
* @internal
|
|
@@ -3801,14 +3802,14 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/node' {
|
|
|
3801
3802
|
import Coordinate from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/coordinate';
|
|
3802
3803
|
import type { EnterpriseLocation, MapDataInternal } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
|
|
3803
3804
|
import type Floor from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/floor';
|
|
3804
|
-
import
|
|
3805
|
+
import BaseMetaData from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/base-metadata-object';
|
|
3805
3806
|
/**
|
|
3806
3807
|
* A class representing {@link Path} node data within the map.
|
|
3807
3808
|
*
|
|
3808
3809
|
* Nodes are used to define points in the map's pathfinding graph.
|
|
3809
3810
|
*
|
|
3810
3811
|
*/
|
|
3811
|
-
class Node extends
|
|
3812
|
+
class Node extends BaseMetaData {
|
|
3812
3813
|
#private;
|
|
3813
3814
|
/**
|
|
3814
3815
|
* @internal
|
|
@@ -3884,7 +3885,7 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/node' {
|
|
|
3884
3885
|
}
|
|
3885
3886
|
|
|
3886
3887
|
declare module '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/door' {
|
|
3887
|
-
import type { EntranceCollection
|
|
3888
|
+
import type { EntranceCollection } from '@mappedin/mvf';
|
|
3888
3889
|
import Coordinate from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/coordinate';
|
|
3889
3890
|
import type Floor from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/floor';
|
|
3890
3891
|
import type { MapDataInternal } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
|
|
@@ -3959,12 +3960,6 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/door' {
|
|
|
3959
3960
|
* @returns {string} The description of the door.
|
|
3960
3961
|
*/
|
|
3961
3962
|
get description(): string;
|
|
3962
|
-
/**
|
|
3963
|
-
* Gets the images of the door.
|
|
3964
|
-
*
|
|
3965
|
-
* @returns {Image[]} The images of the door.
|
|
3966
|
-
*/
|
|
3967
|
-
get images(): Image[];
|
|
3968
3963
|
/**
|
|
3969
3964
|
* Gets the {@link Floor} object associated with the door.
|
|
3970
3965
|
*
|
|
@@ -4008,7 +4003,7 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/door' {
|
|
|
4008
4003
|
}
|
|
4009
4004
|
|
|
4010
4005
|
declare module '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/space' {
|
|
4011
|
-
import type {
|
|
4006
|
+
import type { SpaceCollection } from '@mappedin/mvf';
|
|
4012
4007
|
import Coordinate from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/coordinate';
|
|
4013
4008
|
import type { EnterpriseLocation, MapDataInternal } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
|
|
4014
4009
|
import type Floor from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/floor';
|
|
@@ -4073,12 +4068,6 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/space' {
|
|
|
4073
4068
|
* @returns {string} The description of the space, or an empty string if no description exists.
|
|
4074
4069
|
*/
|
|
4075
4070
|
get description(): string;
|
|
4076
|
-
/**
|
|
4077
|
-
* Gets the array of images associated with the space.
|
|
4078
|
-
*
|
|
4079
|
-
* @returns {Image[]} An array of Image objects, or an empty array if no images exist.
|
|
4080
|
-
*/
|
|
4081
|
-
get images(): Image[];
|
|
4082
4071
|
/**
|
|
4083
4072
|
* Gets the external identifier of the space.
|
|
4084
4073
|
*
|
|
@@ -4258,7 +4247,7 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/floor' {
|
|
|
4258
4247
|
}
|
|
4259
4248
|
|
|
4260
4249
|
declare module '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/connection' {
|
|
4261
|
-
import type { Feature, FeatureCollection,
|
|
4250
|
+
import type { Feature, FeatureCollection, Point, SpaceProperties, Connection as MVFConnection } from '@mappedin/mvf';
|
|
4262
4251
|
import Coordinate from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/coordinate';
|
|
4263
4252
|
import type Node from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/node';
|
|
4264
4253
|
import type { Floor, MapDataInternal } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
|
|
@@ -4299,7 +4288,6 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/connectio
|
|
|
4299
4288
|
*/
|
|
4300
4289
|
get name(): string;
|
|
4301
4290
|
get description(): string;
|
|
4302
|
-
get images(): Image[];
|
|
4303
4291
|
/**
|
|
4304
4292
|
* Whether the connection is accessible. For example elevators are accessible while stairs are not.
|
|
4305
4293
|
*
|
|
@@ -4363,7 +4351,7 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/connectio
|
|
|
4363
4351
|
}
|
|
4364
4352
|
|
|
4365
4353
|
declare module '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/object' {
|
|
4366
|
-
import type {
|
|
4354
|
+
import type { ObstructionCollection } from '@mappedin/mvf';
|
|
4367
4355
|
import Coordinate from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/coordinate';
|
|
4368
4356
|
import type { MapDataInternal } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
|
|
4369
4357
|
import type Floor from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/floor';
|
|
@@ -4418,7 +4406,6 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/object' {
|
|
|
4418
4406
|
* @returns {string} The description of the object.
|
|
4419
4407
|
*/
|
|
4420
4408
|
get description(): string;
|
|
4421
|
-
get images(): Image[];
|
|
4422
4409
|
/**
|
|
4423
4410
|
* Gets the type of the MapObject.
|
|
4424
4411
|
*
|
|
@@ -4540,7 +4527,6 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/poi' {
|
|
|
4540
4527
|
import type { Floor, MapDataInternal } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
|
|
4541
4528
|
import Coordinate from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/coordinate';
|
|
4542
4529
|
import BaseMapData from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/base-object';
|
|
4543
|
-
import Image from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/image';
|
|
4544
4530
|
/**
|
|
4545
4531
|
* A class representing point of interest data within the map.
|
|
4546
4532
|
*
|
|
@@ -4583,12 +4569,6 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/poi' {
|
|
|
4583
4569
|
* @returns {string} The description of the POI.
|
|
4584
4570
|
*/
|
|
4585
4571
|
get description(): string;
|
|
4586
|
-
/**
|
|
4587
|
-
* Gets the images associated with the POI.
|
|
4588
|
-
*
|
|
4589
|
-
* @returns {Image[]} The images associated with the POI.
|
|
4590
|
-
*/
|
|
4591
|
-
get images(): Image[];
|
|
4592
4572
|
/**
|
|
4593
4573
|
* Gets the {@link Floor} object associated with the POI.
|
|
4594
4574
|
*
|
|
@@ -4814,11 +4794,18 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/image' {
|
|
|
4814
4794
|
*/
|
|
4815
4795
|
get url(): string | undefined;
|
|
4816
4796
|
/**
|
|
4817
|
-
* Gets the
|
|
4797
|
+
* Gets the alt text of the image.
|
|
4818
4798
|
*
|
|
4819
|
-
* @returns {string | undefined } The
|
|
4799
|
+
* @returns {string | undefined } The alt text of the image.
|
|
4800
|
+
* @deprecated Use {@link altText} instead.
|
|
4820
4801
|
*/
|
|
4821
4802
|
get name(): string | undefined;
|
|
4803
|
+
/**
|
|
4804
|
+
* Gets the alt text of the image.
|
|
4805
|
+
*
|
|
4806
|
+
* @returns {string | undefined } The alt text of the image.
|
|
4807
|
+
*/
|
|
4808
|
+
get altText(): string | undefined;
|
|
4822
4809
|
/**
|
|
4823
4810
|
/**
|
|
4824
4811
|
* Serializes the image data to JSON.
|
|
@@ -5041,6 +5028,7 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/types' {
|
|
|
5041
5028
|
localePacksUrls?: LocalePackUrls;
|
|
5042
5029
|
languagePacks?: LanguagePackHydrationItem[];
|
|
5043
5030
|
binaryBundle?: Uint8Array;
|
|
5031
|
+
sasToken?: string;
|
|
5044
5032
|
};
|
|
5045
5033
|
}
|
|
5046
5034
|
|
|
@@ -9560,31 +9548,39 @@ declare module '@mappedin/mappedin-js/mappedin-js/src/analytics/customer' {
|
|
|
9560
9548
|
export {};
|
|
9561
9549
|
}
|
|
9562
9550
|
|
|
9551
|
+
declare module '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/base-metadata-object' {
|
|
9552
|
+
export default abstract class BaseMetaData {
|
|
9553
|
+
/**
|
|
9554
|
+
* The identity of the map metadata.
|
|
9555
|
+
*/
|
|
9556
|
+
readonly id: string;
|
|
9557
|
+
constructor(id: string);
|
|
9558
|
+
}
|
|
9559
|
+
}
|
|
9560
|
+
|
|
9563
9561
|
declare module '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/base-object' {
|
|
9562
|
+
import type { MapDataInternal } from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects';
|
|
9564
9563
|
import Hyperlink from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/hyperlink';
|
|
9564
|
+
import Image from '@mappedin/mappedin-js/mappedin-js/src/map-data-objects/image';
|
|
9565
9565
|
import type { Details } from '@mappedin/mvf';
|
|
9566
9566
|
export default abstract class BaseMapData {
|
|
9567
9567
|
/**
|
|
9568
|
-
* identity of the map
|
|
9568
|
+
* The identity of the map data.
|
|
9569
9569
|
*/
|
|
9570
9570
|
readonly id: string;
|
|
9571
|
-
constructor(id: string, details?: Details);
|
|
9571
|
+
constructor(id: string, data: MapDataInternal, details?: Details);
|
|
9572
9572
|
/**
|
|
9573
9573
|
* Gets the links associated with this data type.
|
|
9574
9574
|
*
|
|
9575
9575
|
* @returns {Hyperlink[]} The links associated with this data type
|
|
9576
9576
|
*/
|
|
9577
9577
|
links: Hyperlink[];
|
|
9578
|
-
|
|
9579
|
-
|
|
9580
|
-
|
|
9581
|
-
|
|
9582
|
-
|
|
9583
|
-
|
|
9584
|
-
* identity of the map object
|
|
9585
|
-
*/
|
|
9586
|
-
readonly id: string;
|
|
9587
|
-
constructor(id: string);
|
|
9578
|
+
/**
|
|
9579
|
+
* Gets the array of images associated with this data type.
|
|
9580
|
+
*
|
|
9581
|
+
* @returns {Image[]} An array of Image objects, or an empty array if no images exist.
|
|
9582
|
+
*/
|
|
9583
|
+
images: Image[];
|
|
9588
9584
|
}
|
|
9589
9585
|
}
|
|
9590
9586
|
|
package/lib/esm/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{B as w,C as x,D as y,E as z,F as A,G as B,H as C,I as D,a,b,e as c,f as d,g as e,h as f,i as g,j as h,k as i,l as j,m as k,n as l,o as m,p as n,q as o,r as p,s as q,t as r,u as s,x as t,y as u,z as v}from"./chunk-
|
|
1
|
+
import{B as w,C as x,D as y,E as z,F as A,G as B,H as C,I as D,a,b,e as c,f as d,g as e,h as f,i as g,j as h,k as i,l as j,m as k,n as l,o as m,p as n,q as o,r as p,s as q,t as r,u as s,x as t,y as u,z as v}from"./chunk-3ZAYAM73.js";import"./chunk-64LDGG53.js";import"./chunk-DPBLCZG6.js";import"./chunk-YRCDALUI.js";import"./chunk-QXQ4TTHH.js";export{m as Annotation,j as Connection,c as Coordinate,u as DOORS,g as Door,a as E_SDK_LOG_LEVEL,p as EnterpriseCategory,o as EnterpriseLocation,q as EnterpriseVenue,i as Floor,n as FloorStack,e as Hyperlink,f as ImageData,k as MapObject,d as Node,l as PointOfInterest,h as Space,t as WALLS,B as createMapLibreOverlay,v as enableTestMode,z as getMapData,A as getMapDataEnterprise,y as hydrateMapData,w as hydrateMapDataFromMVF,r as parseMVF,b as setLoggerLevel,x as setUseEnterpriseAPI,D as show3dMap,C as show3dMapGeojson,s as unzipMVF};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{A as ue,d as I,e as ce,i as H,q as M,r as P}from"./chunk-OI4MOZRT.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{A as ue,d as I,e as ce,j as H,q as M,r as P}from"./chunk-3ZAYAM73.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};
|