@mappedin/mappedin-js 6.1.2 → 6.3.0

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.
Files changed (49) hide show
  1. package/THIRD_PARTY_LICENSES.txt +19 -17
  2. package/lib/esm/GLTFExporter-ZVF3Y5DX.js +1 -0
  3. package/lib/esm/{GLTFLoader-TLLNLQ5Y.js → GLTFLoader-3QTALUTA.js} +1 -2
  4. package/lib/esm/chunk-2DEFE4C2.js +1 -0
  5. package/lib/esm/chunk-5W2UDR4H.js +1 -0
  6. package/lib/esm/chunk-66DYOCZO.js +1 -0
  7. package/lib/esm/chunk-Q56Y72HB.js +1 -0
  8. package/lib/esm/{chunk-MLCPE7I2.js → chunk-YB4VFXKF.js} +1 -2
  9. package/lib/esm/index.css +1 -2
  10. package/lib/esm/index.d.ts +180 -54
  11. package/lib/esm/index.js +1 -2
  12. package/lib/esm/inspector-B32KFAD4.js +1 -0
  13. package/lib/esm/inspector-Z5ATF4CD.css +1 -0
  14. package/lib/esm/internal-OFWBS2NI.css +1 -0
  15. package/lib/esm/internal-RK6SZERV.js +1 -0
  16. package/lib/esm/{roboto-regular-R5KXKW73.js → roboto-regular-ERMR6E6W.js} +1 -2
  17. package/lib/esm/text3d-DIUCQLOC.js +1 -0
  18. package/lib/esm/{text3d-AXM5ZHCS.css → text3d-M57DIX3E.css} +0 -1
  19. package/lib/esm/workers/collision-worker.csp.js +1 -23
  20. package/lib/esm/workers/maplibre-worker.csp.js +1 -2
  21. package/lib/index.css +1 -2
  22. package/package.json +6 -4
  23. package/lib/esm/GLTFExporter-O4OUZTHE.js +0 -2
  24. package/lib/esm/GLTFExporter-O4OUZTHE.js.map +0 -7
  25. package/lib/esm/GLTFLoader-TLLNLQ5Y.js.map +0 -7
  26. package/lib/esm/chunk-3PM6GKGK.js +0 -2048
  27. package/lib/esm/chunk-3PM6GKGK.js.map +0 -7
  28. package/lib/esm/chunk-3U5JJXJA.js +0 -3820
  29. package/lib/esm/chunk-3U5JJXJA.js.map +0 -7
  30. package/lib/esm/chunk-MLCPE7I2.js.map +0 -7
  31. package/lib/esm/chunk-ROCNZJLL.js +0 -2
  32. package/lib/esm/chunk-ROCNZJLL.js.map +0 -7
  33. package/lib/esm/chunk-UOCWYBVK.js +0 -938
  34. package/lib/esm/chunk-UOCWYBVK.js.map +0 -7
  35. package/lib/esm/index.css.map +0 -7
  36. package/lib/esm/index.js.map +0 -7
  37. package/lib/esm/inspector-2XETNHYZ.css +0 -2
  38. package/lib/esm/inspector-2XETNHYZ.css.map +0 -7
  39. package/lib/esm/inspector-66PSYVJU.js +0 -483
  40. package/lib/esm/inspector-66PSYVJU.js.map +0 -7
  41. package/lib/esm/internal-R5XTRV7Q.css +0 -2
  42. package/lib/esm/internal-R5XTRV7Q.css.map +0 -7
  43. package/lib/esm/internal-WJZVXVL6.js +0 -2
  44. package/lib/esm/internal-WJZVXVL6.js.map +0 -7
  45. package/lib/esm/roboto-regular-R5KXKW73.js.map +0 -7
  46. package/lib/esm/text3d-AXM5ZHCS.css.map +0 -7
  47. package/lib/esm/text3d-EZBY7L7A.js +0 -253
  48. package/lib/esm/text3d-EZBY7L7A.js.map +0 -7
  49. package/lib/index-rn.js +0 -4306
@@ -1,483 +0,0 @@
1
- import{F as se,I as N,J as ae,a as re,g as P,p as S,q as H}from"./chunk-3PM6GKGK.js";import{u as I}from"./chunk-UOCWYBVK.js";import"./chunk-MLCPE7I2.js";import{_ as oe,a as y}from"./chunk-3U5JJXJA.js";import{e as $}from"./chunk-ROCNZJLL.js";y();y();y();y();var M=class n{constructor(e,i,t,s,o="div"){this.parent=e,this.object=i,this.property=t,this._disabled=!1,this._hidden=!1,this.initialValue=this.getValue(),this.domElement=document.createElement(o),this.domElement.classList.add("controller"),this.domElement.classList.add(s),this.$name=document.createElement("div"),this.$name.classList.add("name"),n.nextNameID=n.nextNameID||0,this.$name.id=`lil-gui-name-${++n.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",a=>a.stopPropagation()),this.domElement.addEventListener("keyup",a=>a.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)}},W=class extends M{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}};function V(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}var _e={isPrimitive:!0,match:n=>typeof n=="string",fromHexString:V,toHexString:V},D={isPrimitive:!0,match:n=>typeof n=="number",fromHexString:n=>parseInt(n.substring(1),16),toHexString:n=>"#"+n.toString(16).padStart(6,0)},Ee={isPrimitive:!1,match:n=>Array.isArray(n),fromHexString(n,e,i=1){let t=D.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 s=n*t<<16^e*t<<8^i*t<<0;return D.toHexString(s)}},ke={isPrimitive:!1,match:n=>Object(n)===n,fromHexString(n,e,i=1){let t=D.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 s=n*t<<16^e*t<<8^i*t<<0;return D.toHexString(s)}},Me=[_e,D,Ee,ke];function Le(n){return Me.find(e=>e.match(n))}var J=class extends M{constructor(e,i,t,s){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=Le(this.initialValue),this._rgbScale=s,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 o=V(this.$text.value);o&&this._setValueFromHexString(o)}),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}},F=class extends M{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",s=>{s.preventDefault(),this.getValue().call(this.object),this._callOnChange()}),this.$button.addEventListener("touchstart",()=>{},{passive:!0}),this.$disable=this.$button}},Z=class extends M{constructor(e,i,t,s,o,a){super(e,i,t,"number"),this._initInput(),this.min(s),this.max(o);let l=a!==void 0;this.step(l?a:this._getImplicitStep(),l),this.updateDisplay()}decimals(e){return this._decimals=e,this.updateDisplay(),this}min(e){return this._min=e,this._onUpdateMinMax(),this}max(e){return this._max=e,this._onUpdateMinMax(),this}step(e,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=()=>{let f=parseFloat(this.$input.value);isNaN(f)||(this._stepExplicit&&(f=this._snap(f)),this.setValue(this._clamp(f)))},t=f=>{let C=parseFloat(this.$input.value);isNaN(C)||(this._snapClampSetValue(C+f),this.$input.value=this.getValue())},s=f=>{f.key==="Enter"&&this.$input.blur(),f.code==="ArrowUp"&&(f.preventDefault(),t(this._step*this._arrowKeyMultiplier(f))),f.code==="ArrowDown"&&(f.preventDefault(),t(this._step*this._arrowKeyMultiplier(f)*-1))},o=f=>{this._inputFocused&&(f.preventDefault(),t(this._step*this._normalizeMouseWheel(f)))},a=!1,l,h,m,d,g,r=5,c=f=>{l=f.clientX,h=m=f.clientY,a=!0,d=this.getValue(),g=0,window.addEventListener("mousemove",p),window.addEventListener("mouseup",v)},p=f=>{if(a){let C=f.clientX-l,L=f.clientY-h;Math.abs(L)>r?(f.preventDefault(),this.$input.blur(),a=!1,this._setDraggingStyle(!0,"vertical")):Math.abs(C)>r&&v()}if(!a){let C=f.clientY-m;g-=C*this._step*this._arrowKeyMultiplier(f),d+g>this._max?g=this._max-d:d+g<this._min&&(g=this._min-d),this._snapClampSetValue(d+g)}m=f.clientY},v=()=>{this._setDraggingStyle(!1,"vertical"),this._callOnFinishChange(),window.removeEventListener("mousemove",p),window.removeEventListener("mouseup",v)},x=()=>{this._inputFocused=!0},u=()=>{this._inputFocused=!1,this.updateDisplay(),this._callOnFinishChange()};this.$input.addEventListener("input",i),this.$input.addEventListener("keydown",s),this.$input.addEventListener("wheel",o,{passive:!1}),this.$input.addEventListener("mousedown",c),this.$input.addEventListener("focus",x),this.$input.addEventListener("blur",u)}_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=(u,f,C,L,z)=>(u-f)/(C-f)*(z-L)+L,i=u=>{let f=this.$slider.getBoundingClientRect(),C=e(u,f.left,f.right,this._min,this._max);this._snapClampSetValue(C)},t=u=>{this._setDraggingStyle(!0),i(u.clientX),window.addEventListener("mousemove",s),window.addEventListener("mouseup",o)},s=u=>{i(u.clientX)},o=()=>{this._callOnFinishChange(),this._setDraggingStyle(!1),window.removeEventListener("mousemove",s),window.removeEventListener("mouseup",o)},a=!1,l,h,m=u=>{u.preventDefault(),this._setDraggingStyle(!0),i(u.touches[0].clientX),a=!1},d=u=>{u.touches.length>1||(this._hasScrollBar?(l=u.touches[0].clientX,h=u.touches[0].clientY,a=!0):m(u),window.addEventListener("touchmove",g,{passive:!1}),window.addEventListener("touchend",r))},g=u=>{if(a){let f=u.touches[0].clientX-l,C=u.touches[0].clientY-h;Math.abs(f)>Math.abs(C)?m(u):(window.removeEventListener("touchmove",g),window.removeEventListener("touchend",r))}else u.preventDefault(),i(u.touches[0].clientX)},r=()=>{this._callOnFinishChange(),this._setDraggingStyle(!1),window.removeEventListener("touchmove",g),window.removeEventListener("touchend",r)},c=this._callOnFinishChange.bind(this),p=400,v,x=u=>{if(Math.abs(u.deltaX)<Math.abs(u.deltaY)&&this._hasScrollBar)return;u.preventDefault();let C=this._normalizeMouseWheel(u)*this._step;this._snapClampSetValue(this.getValue()+C),this.$input.value=this.getValue(),clearTimeout(v),v=setTimeout(c,p)};this.$slider.addEventListener("mousedown",t),this.$slider.addEventListener("touchstart",d,{passive:!1}),this.$slider.addEventListener("wheel",x,{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-${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}},Q=class extends M{constructor(e,i,t,s){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(s)}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}},K=class extends M{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",s=>{s.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}},$e=`.lil-gui {
2
- font-family: var(--font-family);
3
- font-size: var(--font-size);
4
- line-height: 1;
5
- font-weight: normal;
6
- font-style: normal;
7
- text-align: left;
8
- color: var(--text-color);
9
- user-select: none;
10
- -webkit-user-select: none;
11
- touch-action: manipulation;
12
- --background-color: #1f1f1f;
13
- --text-color: #ebebeb;
14
- --title-background-color: #111111;
15
- --title-text-color: #ebebeb;
16
- --widget-color: #424242;
17
- --hover-color: #4f4f4f;
18
- --focus-color: #595959;
19
- --number-color: #2cc9ff;
20
- --string-color: #a2db3c;
21
- --font-size: 11px;
22
- --input-font-size: 11px;
23
- --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
24
- --font-family-mono: Menlo, Monaco, Consolas, "Droid Sans Mono", monospace;
25
- --padding: 4px;
26
- --spacing: 4px;
27
- --widget-height: 20px;
28
- --title-height: calc(var(--widget-height) + var(--spacing) * 1.25);
29
- --name-width: 45%;
30
- --slider-knob-width: 2px;
31
- --slider-input-width: 27%;
32
- --color-input-width: 27%;
33
- --slider-input-min-width: 45px;
34
- --color-input-min-width: 45px;
35
- --folder-indent: 7px;
36
- --widget-padding: 0 0 0 3px;
37
- --widget-border-radius: 2px;
38
- --checkbox-size: calc(0.75 * var(--widget-height));
39
- --scrollbar-width: 5px;
40
- }
41
- .lil-gui, .lil-gui * {
42
- box-sizing: border-box;
43
- margin: 0;
44
- padding: 0;
45
- }
46
- .lil-gui.root {
47
- width: var(--width, 245px);
48
- display: flex;
49
- flex-direction: column;
50
- background: var(--background-color);
51
- }
52
- .lil-gui.root > .title {
53
- background: var(--title-background-color);
54
- color: var(--title-text-color);
55
- }
56
- .lil-gui.root > .children {
57
- overflow-x: hidden;
58
- overflow-y: auto;
59
- }
60
- .lil-gui.root > .children::-webkit-scrollbar {
61
- width: var(--scrollbar-width);
62
- height: var(--scrollbar-width);
63
- background: var(--background-color);
64
- }
65
- .lil-gui.root > .children::-webkit-scrollbar-thumb {
66
- border-radius: var(--scrollbar-width);
67
- background: var(--focus-color);
68
- }
69
- @media (pointer: coarse) {
70
- .lil-gui.allow-touch-styles, .lil-gui.allow-touch-styles .lil-gui {
71
- --widget-height: 28px;
72
- --padding: 6px;
73
- --spacing: 6px;
74
- --font-size: 13px;
75
- --input-font-size: 16px;
76
- --folder-indent: 10px;
77
- --scrollbar-width: 7px;
78
- --slider-input-min-width: 50px;
79
- --color-input-min-width: 65px;
80
- }
81
- }
82
- .lil-gui.force-touch-styles, .lil-gui.force-touch-styles .lil-gui {
83
- --widget-height: 28px;
84
- --padding: 6px;
85
- --spacing: 6px;
86
- --font-size: 13px;
87
- --input-font-size: 16px;
88
- --folder-indent: 10px;
89
- --scrollbar-width: 7px;
90
- --slider-input-min-width: 50px;
91
- --color-input-min-width: 65px;
92
- }
93
- .lil-gui.autoPlace {
94
- max-height: 100%;
95
- position: fixed;
96
- top: 0;
97
- right: 15px;
98
- z-index: 1001;
99
- }
100
-
101
- .lil-gui .controller {
102
- display: flex;
103
- align-items: center;
104
- padding: 0 var(--padding);
105
- margin: var(--spacing) 0;
106
- }
107
- .lil-gui .controller.disabled {
108
- opacity: 0.5;
109
- }
110
- .lil-gui .controller.disabled, .lil-gui .controller.disabled * {
111
- pointer-events: none !important;
112
- }
113
- .lil-gui .controller > .name {
114
- min-width: var(--name-width);
115
- flex-shrink: 0;
116
- white-space: pre;
117
- padding-right: var(--spacing);
118
- line-height: var(--widget-height);
119
- }
120
- .lil-gui .controller .widget {
121
- position: relative;
122
- display: flex;
123
- align-items: center;
124
- width: 100%;
125
- min-height: var(--widget-height);
126
- }
127
- .lil-gui .controller.string input {
128
- color: var(--string-color);
129
- }
130
- .lil-gui .controller.boolean {
131
- cursor: pointer;
132
- }
133
- .lil-gui .controller.color .display {
134
- width: 100%;
135
- height: var(--widget-height);
136
- border-radius: var(--widget-border-radius);
137
- position: relative;
138
- }
139
- @media (hover: hover) {
140
- .lil-gui .controller.color .display:hover:before {
141
- content: " ";
142
- display: block;
143
- position: absolute;
144
- border-radius: var(--widget-border-radius);
145
- border: 1px solid #fff9;
146
- top: 0;
147
- right: 0;
148
- bottom: 0;
149
- left: 0;
150
- }
151
- }
152
- .lil-gui .controller.color input[type=color] {
153
- opacity: 0;
154
- width: 100%;
155
- height: 100%;
156
- cursor: pointer;
157
- }
158
- .lil-gui .controller.color input[type=text] {
159
- margin-left: var(--spacing);
160
- font-family: var(--font-family-mono);
161
- min-width: var(--color-input-min-width);
162
- width: var(--color-input-width);
163
- flex-shrink: 0;
164
- }
165
- .lil-gui .controller.option select {
166
- opacity: 0;
167
- position: absolute;
168
- width: 100%;
169
- max-width: 100%;
170
- }
171
- .lil-gui .controller.option .display {
172
- position: relative;
173
- pointer-events: none;
174
- border-radius: var(--widget-border-radius);
175
- height: var(--widget-height);
176
- line-height: var(--widget-height);
177
- max-width: 100%;
178
- overflow: hidden;
179
- word-break: break-all;
180
- padding-left: 0.55em;
181
- padding-right: 1.75em;
182
- background: var(--widget-color);
183
- }
184
- @media (hover: hover) {
185
- .lil-gui .controller.option .display.focus {
186
- background: var(--focus-color);
187
- }
188
- }
189
- .lil-gui .controller.option .display.active {
190
- background: var(--focus-color);
191
- }
192
- .lil-gui .controller.option .display:after {
193
- font-family: "lil-gui";
194
- content: "\u2195";
195
- position: absolute;
196
- top: 0;
197
- right: 0;
198
- bottom: 0;
199
- padding-right: 0.375em;
200
- }
201
- .lil-gui .controller.option .widget,
202
- .lil-gui .controller.option select {
203
- cursor: pointer;
204
- }
205
- @media (hover: hover) {
206
- .lil-gui .controller.option .widget:hover .display {
207
- background: var(--hover-color);
208
- }
209
- }
210
- .lil-gui .controller.number input {
211
- color: var(--number-color);
212
- }
213
- .lil-gui .controller.number.hasSlider input {
214
- margin-left: var(--spacing);
215
- width: var(--slider-input-width);
216
- min-width: var(--slider-input-min-width);
217
- flex-shrink: 0;
218
- }
219
- .lil-gui .controller.number .slider {
220
- width: 100%;
221
- height: var(--widget-height);
222
- background: var(--widget-color);
223
- border-radius: var(--widget-border-radius);
224
- padding-right: var(--slider-knob-width);
225
- overflow: hidden;
226
- cursor: ew-resize;
227
- touch-action: pan-y;
228
- }
229
- @media (hover: hover) {
230
- .lil-gui .controller.number .slider:hover {
231
- background: var(--hover-color);
232
- }
233
- }
234
- .lil-gui .controller.number .slider.active {
235
- background: var(--focus-color);
236
- }
237
- .lil-gui .controller.number .slider.active .fill {
238
- opacity: 0.95;
239
- }
240
- .lil-gui .controller.number .fill {
241
- height: 100%;
242
- border-right: var(--slider-knob-width) solid var(--number-color);
243
- box-sizing: content-box;
244
- }
245
-
246
- .lil-gui-dragging .lil-gui {
247
- --hover-color: var(--widget-color);
248
- }
249
- .lil-gui-dragging * {
250
- cursor: ew-resize !important;
251
- }
252
-
253
- .lil-gui-dragging.lil-gui-vertical * {
254
- cursor: ns-resize !important;
255
- }
256
-
257
- .lil-gui .title {
258
- height: var(--title-height);
259
- line-height: calc(var(--title-height) - 4px);
260
- font-weight: 600;
261
- padding: 0 var(--padding);
262
- -webkit-tap-highlight-color: transparent;
263
- cursor: pointer;
264
- outline: none;
265
- text-decoration-skip: objects;
266
- }
267
- .lil-gui .title:before {
268
- font-family: "lil-gui";
269
- content: "\u25BE";
270
- padding-right: 2px;
271
- display: inline-block;
272
- }
273
- .lil-gui .title:active {
274
- background: var(--title-background-color);
275
- opacity: 0.75;
276
- }
277
- @media (hover: hover) {
278
- body:not(.lil-gui-dragging) .lil-gui .title:hover {
279
- background: var(--title-background-color);
280
- opacity: 0.85;
281
- }
282
- .lil-gui .title:focus {
283
- text-decoration: underline var(--focus-color);
284
- }
285
- }
286
- .lil-gui.root > .title:focus {
287
- text-decoration: none !important;
288
- }
289
- .lil-gui.closed > .title:before {
290
- content: "\u25B8";
291
- }
292
- .lil-gui.closed > .children {
293
- transform: translateY(-7px);
294
- opacity: 0;
295
- }
296
- .lil-gui.closed:not(.transition) > .children {
297
- display: none;
298
- }
299
- .lil-gui.transition > .children {
300
- transition-duration: 300ms;
301
- transition-property: height, opacity, transform;
302
- transition-timing-function: cubic-bezier(0.2, 0.6, 0.35, 1);
303
- overflow: hidden;
304
- pointer-events: none;
305
- }
306
- .lil-gui .children:empty:before {
307
- content: "Empty";
308
- padding: 0 var(--padding);
309
- margin: var(--spacing) 0;
310
- display: block;
311
- height: var(--widget-height);
312
- font-style: italic;
313
- line-height: var(--widget-height);
314
- opacity: 0.5;
315
- }
316
- .lil-gui.root > .children > .lil-gui > .title {
317
- border: 0 solid var(--widget-color);
318
- border-width: 1px 0;
319
- transition: border-color 300ms;
320
- }
321
- .lil-gui.root > .children > .lil-gui.closed > .title {
322
- border-bottom-color: transparent;
323
- }
324
- .lil-gui + .controller {
325
- border-top: 1px solid var(--widget-color);
326
- margin-top: 0;
327
- padding-top: var(--spacing);
328
- }
329
- .lil-gui .lil-gui .lil-gui > .title {
330
- border: none;
331
- }
332
- .lil-gui .lil-gui .lil-gui > .children {
333
- border: none;
334
- margin-left: var(--folder-indent);
335
- border-left: 2px solid var(--widget-color);
336
- }
337
- .lil-gui .lil-gui .controller {
338
- border: none;
339
- }
340
-
341
- .lil-gui label, .lil-gui input, .lil-gui button {
342
- -webkit-tap-highlight-color: transparent;
343
- }
344
- .lil-gui input {
345
- border: 0;
346
- outline: none;
347
- font-family: var(--font-family);
348
- font-size: var(--input-font-size);
349
- border-radius: var(--widget-border-radius);
350
- height: var(--widget-height);
351
- background: var(--widget-color);
352
- color: var(--text-color);
353
- width: 100%;
354
- }
355
- @media (hover: hover) {
356
- .lil-gui input:hover {
357
- background: var(--hover-color);
358
- }
359
- .lil-gui input:active {
360
- background: var(--focus-color);
361
- }
362
- }
363
- .lil-gui input:disabled {
364
- opacity: 1;
365
- }
366
- .lil-gui input[type=text],
367
- .lil-gui input[type=number] {
368
- padding: var(--widget-padding);
369
- -moz-appearance: textfield;
370
- }
371
- .lil-gui input[type=text]:focus,
372
- .lil-gui input[type=number]:focus {
373
- background: var(--focus-color);
374
- }
375
- .lil-gui input[type=checkbox] {
376
- appearance: none;
377
- width: var(--checkbox-size);
378
- height: var(--checkbox-size);
379
- border-radius: var(--widget-border-radius);
380
- text-align: center;
381
- cursor: pointer;
382
- }
383
- .lil-gui input[type=checkbox]:checked:before {
384
- font-family: "lil-gui";
385
- content: "\u2713";
386
- font-size: var(--checkbox-size);
387
- line-height: var(--checkbox-size);
388
- }
389
- @media (hover: hover) {
390
- .lil-gui input[type=checkbox]:focus {
391
- box-shadow: inset 0 0 0 1px var(--focus-color);
392
- }
393
- }
394
- .lil-gui button {
395
- outline: none;
396
- cursor: pointer;
397
- font-family: var(--font-family);
398
- font-size: var(--font-size);
399
- color: var(--text-color);
400
- width: 100%;
401
- height: var(--widget-height);
402
- text-transform: none;
403
- background: var(--widget-color);
404
- border-radius: var(--widget-border-radius);
405
- border: none;
406
- }
407
- @media (hover: hover) {
408
- .lil-gui button:hover {
409
- background: var(--hover-color);
410
- }
411
- .lil-gui button:focus {
412
- box-shadow: inset 0 0 0 1px var(--focus-color);
413
- }
414
- }
415
- .lil-gui button:active {
416
- background: var(--focus-color);
417
- }
418
-
419
- @font-face {
420
- font-family: "lil-gui";
421
- 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");
422
- }`;function Se(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)}var le=!1,q=class n{constructor({parent:e,autoPlace:i=e===void 0,container:t,width:s,title:o="Controls",closeFolders:a=!1,injectStyles:l=!0,touchStyles:h=!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",m=>{(m.code==="Enter"||m.code==="Space")&&(m.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(o),this.parent){this.parent.children.push(this),this.parent.folders.push(this),this.parent.$children.appendChild(this.domElement);return}this.domElement.classList.add("root"),h&&this.domElement.classList.add("allow-touch-styles"),!le&&l&&(Se($e),le=!0),t?t.appendChild(this.domElement):i&&(this.domElement.classList.add("autoPlace"),document.body.appendChild(this.domElement)),s&&this.domElement.style.setProperty("--width",s+"px"),this._closeFolders=a}add(e,i,t,s,o){if(Object(t)===t)return new Q(this,e,i,t);let a=e[i];switch(typeof a){case"number":return new Z(this,e,i,t,s,o);case"boolean":return new W(this,e,i);case"string":return new K(this,e,i);case"function":return new F(this,e,i)}console.error(`gui.add failed
423
- property:`,i,`
424
- object:`,e,`
425
- value:`,a)}addColor(e,i,t=1){return new J(this,e,i,t)}addFolder(e){let i=new n({parent:this,title:e});return this.root._closeFolders&&i.close(),i}load(e,i=!0){return e.controllers&&this.controllers.forEach(t=>{t instanceof F||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 F)){if(t._name in i.controllers)throw new Error(`Cannot save GUI with duplicate property "${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 "${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=o=>{o.target===this.$children&&(this.$children.style.height="",this.domElement.classList.remove("transition"),this.$children.removeEventListener("transitionend",t))};this.$children.addEventListener("transitionend",t);let s=e?this.$children.scrollHeight:0;this.domElement.classList.toggle("closed",!e),requestAnimationFrame(()=>{this.$children.style.height=s+"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}},G=q;y();y();var E=(()=>{let n=new oe;return function(i){return n.set(i),`#${n.getHexString()}`}})();function de(n){let e;for(e of n)e()}function ee(n,e){let i=window.location.href,t=new URL(i),s=new URLSearchParams(t.search);for(let o in n)if(n.hasOwnProperty(o)){let a=`${e}.${o}`;s.set(a,n[o])}t.search=s.toString(),history.pushState({path:t.toString()},"",t.toString())}function te(n,e){let i=new URLSearchParams(window.location.search),t={};for(let[s,o]of i)if(s.startsWith(`${n}.`)){let a=s.slice(n.length+1);o==="true"||o==="false"?t[a]=o==="true":typeof e?.[a]=="number"?t[a]=Number(o):t[a]=o}return{namespace:n,params:t}}var Ie=["interactive"];function B(n,e,i){let t={id:e.id,__type:e.__type},s=i.addFolder(`${e.type}-${e.id}`);for(let o in e){if(o==="visible"&&s.add(e,o).onChange(a=>{n.updateState(t,{[o]:a})}),o==="color"||o==="hoverColor"){e[o]=E(e[o]),s.addColor(e,o).onChange(a=>{n.updateState(t,{[o]:a})});continue}if(o==="height"){s.add(e,o,0,20,1).onChange(a=>{n.updateState(t,{[o]:a})});continue}if(o==="texture"&&e.texture){s.addFolder("Texture - side").add(e,"texture")?.onChange(l=>{n.updateState(t,{texture:{url:l}})});continue}if(o==="topTexture"&&e.topTexture){s.addFolder("Texture - top").add(e,"topTexture")?.onChange(l=>{n.updateState(t,{topTexture:{url:l}})});continue}if(o==="opacity"){s.add(e,o,0,1,.1).onChange(a=>{n.updateState(t,{[o]:a})});continue}if(o==="altitude"){s.add(e,o,0,100,1).onChange(a=>{n.updateState(t,{[o]:a})});continue}Ie.includes(o)&&s.add(e,o).onChange(a=>{n.updateState(t,{[o]:a})})}return e.isInView&&(s.add(e,"isInView").listen().disable(),s.add(e,"isInViewCheck")),{cleanup(){s.destroy()}}}y();y();function Fe(){let n=[];function e(s,o){let a=Object.values(s.getMapData())[0],l=o;if(l&&P.is(l)){let h=a.getByType("enterprise-location")?.find(m=>m.spaces.some(d=>d.id===l.id));h&&(l=h)}return l}async function i(s,o){return o instanceof H?s.Camera.focusOn(o.locations.flatMap(a=>a.spaces),T):o instanceof S?s.Camera.focusOn(o.spaces,T):s.Camera.focusOn(o,T)}function t(s,o,{focus:a=!1}={}){if(!window.enableHighlightCard)return()=>{};let l=e(s,o),h=document.createElement("div");if(h.style.cssText=`
426
- position: absolute;
427
- top: 20px;
428
- left: 20px;
429
- background-color: rgba(30, 30, 30, 0.95);
430
- box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
431
- border-radius: 12px;
432
- padding: 24px;
433
- max-width: 320px;
434
- z-index: 1000;
435
- font-family: 'Arial', sans-serif;
436
- transition: all 0.3s ease;
437
- color: #e0e0e0;
438
- `,"name"in l){let d=document.createElement("h3");d.textContent=l.name,d.style.cssText=`
439
- margin: 0 0 16px;
440
- font-size: 22px;
441
- font-weight: 600;
442
- color: #ffffff;
443
- letter-spacing: -0.5px;
444
- `,h.appendChild(d)}if(l instanceof S){if(l.description){let d=document.createElement("p");d.textContent=l.description,d.style.cssText=`
445
- margin: 0 0 16px;
446
- font-size: 14px;
447
- color: #b0b0b0;
448
- line-height: 1.5;
449
- `,h.appendChild(d)}if(l.tags&&l.tags.length>0){let d=document.createElement("div");d.style.cssText=`
450
- display: flex;
451
- flex-wrap: nowrap;
452
- gap: 8px;
453
- margin-bottom: 16px;
454
- overflow-x: hidden;
455
- max-height: 30px; /* Adjust this value based on your font size and padding */
456
- `,l.tags.forEach(g=>{let r=document.createElement("span");r.textContent=g,r.style.cssText=`
457
- background-color: #3a3a3a;
458
- color: #e0e0e0;
459
- padding: 6px 12px;
460
- border-radius: 16px;
461
- font-size: 12px;
462
- font-weight: 500;
463
- text-transform: uppercase;
464
- white-space: nowrap;
465
- `,d.appendChild(r)}),h.appendChild(d)}}let m;if(!(o instanceof H)){let d=new G({autoPlace:!1});d.domElement.style.cssText=`
466
- position: relative;
467
- overflow-y: auto;
468
- margin-top: 16px;
469
- border-top: 1px solid #444;
470
- padding-top: 16px;
471
- `;let g=s.getState(o);g&&(B(s,{id:o.id,...g},d),h.appendChild(d.domElement)),m=d}return document.body.appendChild(h),a&&i(s,l),()=>{h.style.opacity="0",h.style.transform="translateY(-10px)",setTimeout(()=>h.remove(),300),m?.destroy()}}return{highlightCard:t,highlight:(s,o,{focus:a=!0}={})=>{n.length>0&&n.forEach(h=>s.Markers.remove(h));let l=e(s,o);if(l instanceof S)a&&s.Camera.focusOn(l.spaces,T),n.push(...l.spaces.map(h=>s.Markers.add(h,`<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;">
472
- <h3 style="margin: 0 0 10px; color: #333; font-size: 16px; font-weight: 600;">${l.name}</h3>
473
- ${l.description?`<p style="margin: 0 0 10px; color: #666; font-size: 14px; font-weight: 400;">${l.description}</p>`:""}
474
- ${l.tags?l.tags.map(m=>`<span style="display: inline-block; padding: 3px 8px; background-color: #e0f2f1; color: #00796b; border-radius: 12px; font-size: 12px;">${m}</span>`).join(" "):""}
475
- <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>
476
- </div>`,{rank:"always-visible",placement:"top"})));else if(l instanceof H){a&&s.Camera.focusOn(l.locations.flatMap(d=>d.spaces),T);let h=new Map,m=new Set;l.locations.forEach(d=>{h.has(d.name)||(d.spaces.forEach(g=>{n.push(s.Markers.add(g,`<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;">
477
- <span style="font-weight: 600; color: #FFFFFF; font-size: 16px; text-shadow: 1px 1px 2px rgba(0,0,0,0.2);">${d.name}</span>
478
- </div>`,{rank:"always-visible"}))}),h.set(d.name,!0))}),l.locations.forEach(d=>{d.coordinates.forEach(g=>{let r=`${g.latitude},${g.longitude}`;if(!m.has(r)&&!h.has(d.name)){let c=s.Markers.add(g,`<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);">
479
- <span style="font-weight: 500; color: #FFFFFF; font-size: 16px;">${d.name}</span>
480
- <br>
481
- <span style="color: #FFFFFF; font-size: 12px; font-weight: 400;">Node</span>
482
- </div>`,{rank:"always-visible"});m.add(r),n.push(c)}})})}return()=>{n.forEach(h=>s.Markers.remove(h))}}}}var T={duration:300,easing:"ease-in-out"},R=Fe();y();var _={search:"",results:void 0,options:{places:{fields:{name:!0,description:!0,link:!0,category:!0},limit:5},locations:{fields:{name:!0,tag:!0,description:!0},limit:5},categories:{fields:{name:!0},limit:5}}};function De(n){n.add(_.options.places.fields,"name").name("Places: Name"),n.add(_.options.places.fields,"description").name("Places: Description"),n.add(_.options.places.fields,"link").name("Places: Link"),n.add(_.options.places.fields,"category").name("Places: Category"),n.add(_.options.places,"limit"),n.add(_.options.locations.fields,"name").name("Locations: Name"),n.add(_.options.locations.fields,"tag").name("Locations: Tag"),n.add(_.options.locations.fields,"description").name("Locations: Description"),n.add(_.options.places,"limit"),n.add(_.options.categories.fields,"name").name("Categories: Name")}function ce(n,e,i){let t=new I,s=i.addFolder("Search");s.open();let o=s.add(_,"search").onChange(async d=>{let g=await e.Search.query(d,_.options);g&&(_.results=g,l(g,t))}),a=document.createElement("div");a.style.marginLeft="10px",o.domElement.parentElement?.appendChild(a);let{renderSearch:l,close:h}=Te(n,e,a,o.$input),m=s.addFolder("Advanced");return m.close(),De(m),document.addEventListener("keydown",d=>{(d.metaKey||d.ctrlKey)&&d.key==="k"?(d.preventDefault(),s._closed&&s.open(),o.$input.focus()):d.key==="Escape"&&(h(),t.publish("highlight",void 0))}),{pubsub:t}}function Te(n,e,i,t){let s,o;t.addEventListener("input",async l=>{l instanceof InputEvent&&(l.inputType==="insertText"||l.inputType==="insertCompositionText")&&(clearTimeout(s),s=setTimeout(async()=>{let h=await e.Search.suggest(t.value);h&&h.length>0&&a(h[0]?.suggestion)},100))});function a(l){if(!l){t.placeholder="";return}let h=t.value;t.value=l,t.setSelectionRange(h.length,l.length)}return{renderSearch(l,h){if(l.places.length===0&&l.enterpriseCategories?.length===0&&l.enterpriseLocations?.length===0){i.textContent="No results found.";return}o=Oe(i,l,n,h)},close(){o.destroy()}}}function Oe(n,e,i,t){n.innerHTML="";let s=document.createElement("div");Object.assign(s.style,U.dropdownContainer);let o=document.createElement("ul");o.className="options-list",Object.assign(o.style,U.optionsList),o.style.display="block";let a=[],l=(r,c)=>{if(c&&c.length>0){let p=document.createElement("li");p.textContent=r,Object.assign(p.style,U.sectionHeader),o.appendChild(p),c.forEach((v,x)=>{let u=document.createElement("li");u.textContent=`${"name"in v.item?v.item.name:""} (${v.type})`,Object.assign(u.style,U.option),u.tabIndex=0,u.addEventListener("focus",()=>{m(a.indexOf(u))}),u.addEventListener("mouseover",()=>{u.style.backgroundColor="#f0f0f0"}),u.addEventListener("mouseout",()=>{u.style.backgroundColor=""}),u.addEventListener("click",()=>{}),u.setAttribute("data-type",r),u.setAttribute("data-index",x.toString()),o.appendChild(u),a.push(u)})}};l("enterpriseLocations",e.enterpriseLocations),l("enterpriseCategories",e.enterpriseCategories),l("Places",e.places),s.appendChild(o),n.appendChild(s);let h=[],m=r=>{h.forEach(u=>u()),h=[],a.forEach((u,f)=>{f===r?u.style.backgroundColor="#e0e0e0":u.style.backgroundColor=""});let c=a[r],p=c.getAttribute("data-type"),v=parseInt(c.getAttribute("data-index")||"0",10);if(!p)return;let{item:x}=e[p.toLowerCase()][v];t.publish("highlight",x)},d=r=>{!s.contains(r.target)&&r.target!==n&&g()};document.addEventListener("click",d);let g=()=>{n.innerHTML="",document.removeEventListener("click",d)};return{destroy(){n.innerHTML="",t.publish("highlight",void 0)}}}var U={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 he(n,e,i){i.domElement.id="interactionPanel";let t=[],{pubsub:s}=ce(n,e,i);s.on("highlight",d=>{if(d){t.forEach(r=>r()),t=[];let g=d instanceof S?d.spaces[0]:d;if(n.Camera.focusOn(d),g&&!P.is(g))return;t.push(R.highlightCard(n,g,{focus:!0}))}else t.forEach(g=>g()),t=[]});let o=i.addFolder("Click \u{1F447}").close(),{sub:a}=ze(n,o);a.on("click",d=>{t.forEach(g=>g()),t=[],d.spaces?.[0]&&(t=[R.highlightCard(n,d.spaces[0])])});let l=i.addFolder("Hover \u{1F681}").close(),{sub:h}=Pe(n,l),m;h.on("hover",d=>{d.spaces?.[0]?(m?.(),t.length===0&&(m=R.highlightCard(n,d.spaces[0]))):(m?.(),m=void 0)})}function ze(n,e){let i=new I,t={position:"",hoverColor:E(n.getHoverColor())},s=e.add(t,"position").disable(),o=[];function a(){o.forEach(h=>h()),o.length=0}let l=0;return n.on("click",h=>{let{labels:m,coordinate:d}=h;a(),i.publish("click",h),clearInterval(l),s.load(JSON.stringify([d.longitude,d.latitude]));let g=m?.[0];if(g!=null){let c=O(n,g,e);if(!c)return;o.push(c.destroy),c.labelItemFolder.openAnimated()}let r=h.spaces?.[0]??h.objects?.[0];if(r){let c={...r,...n.getState(r),isInView:!1,isInViewCheck:j(n,r.id)},{cleanup:p}=B(n,c,e);l=setInterval(()=>{c.isInView=n.isInView(g||r)},500),o.push(p)}}),{sub:i}}function Pe(n,e){let i=new I;n.setHoverColor("#1f3a7a");let t={position:"",hoverColor:E(n.getHoverColor()),intersected:"",type:"",id:""},s=e.add(t,"position").disable();e.add(t,"id").disable().listen(),e.add(t,"type").disable().listen(),e.addColor(t,"hoverColor").onChange(l=>{n.setHoverColor(l)});let o=[];function a(){o.forEach(l=>l()),o.length=0}return n.on("hover",l=>{let{coordinate:h,spaces:m,objects:d,markers:g,labels:r}=l;a(),i.publish("hover",l),s.load(JSON.stringify([h.longitude,h.latitude]));let c=m?.[0]??d?.[0]??g?.[0]??r?.[0];if(!c)return;let p=n.getState(c);p&&(t.type=p.type,t.id=c.id)}),{sub:i}}function j(n,e){return function(){console.log("isInView",n.isInView(e))}}function ue(n,e,i){let t={labels:{},all(){i.Labels.__EXPERIMENTAL__all().forEach(c=>{this.labels[c.id]=c}),h()},removeAllLabels(){i.Labels.removeAll().forEach(c=>{delete this.labels[c.id]}),h()}},{addLabel:s,destroy:o}=Be(n,i);n.add(t,"all"),n.add(t,"removeAllLabels");let a=n.addFolder("Label List");n.close();let l=new Map,{rerender:h}=m();function m(){function r(v){delete t.labels[v.id],l.get(v.id)?.destroy()}function c(v){let x=O(i,v,a,{onRemove:f=>{r(f)}});if(!x)return;let{labelItemFolder:u}=x;l.set(v.id,u)}function p(){a.destroy(),a=n.addFolder("Label");for(let v in t.labels){let x=t.labels[v];c(x)}}return{rerender:p,add:c,remove:r}}n.domElement.classList.add("list-items");let d;i.on("click",({labels:r,coordinate:c})=>{if(!n._closed)if(r?.[0]){d?.close();let p=l.get(r[0].id);if(n.open(),!p)return;p?.open(),p?.domElement.scrollIntoView({block:"start"}),p?.domElement.focus(),d=p}else s(c)});function g(r){for(let c of r)t.labels[c.id]=c;h()}return{populatelabels:g,destroy(){o()}}}function He(n,e,i,t,s){let{interactive:o,enabled:a,rank:l,anchor:h,dynamicResize:m,zIndex:d,contentHTML:g,lowPriorityPin:r}=t;if(o==null||a==null)throw new Error("incomplete marker state");let c={interactive:o,enabled:a,rank:l||"medium",anchor:Array.isArray(h)?h.join(", "):h||"center",dynamicResize:m||!1,zIndex:d||0,contentHTML:g||"",lowPriorityPin:{enabled:r?.enabled??!0,size:r?.size??8,color:E(r?.color??"#666")},remove(){n.Markers.remove(e),s?.(e),i.destroy()},isInView:j(n,e.id)};i.onChange(v=>{let x={interactive:c.interactive,enabled:c.enabled,rank:c.rank,dynamicResize:c.dynamicResize,contentHTML:c.contentHTML,lowPriorityPin:{enabled:c.lowPriorityPin.enabled,size:c.lowPriorityPin.size,color:c.lowPriorityPin.color}};c.rank==="always-visible"&&(x.zIndex=c.zIndex),n.updateState(e,x)}),i.add(c,"interactive"),i.add(c,"enabled"),i.add(c,"rank",["medium","high","always-visible","initial"]).name("rank"),i.add(c,"anchor").name("anchor (read-only)").disable(),i.add(c,"dynamicResize").name("dynamic resize"),c.rank==="always-visible"&&i.add(c,"zIndex",0,1e3,1).name("z-index"),i.add(c,"contentHTML").name("content HTML");let p=i.addFolder("Low Priority Pin");p.add(c.lowPriorityPin,"enabled"),p.add(c.lowPriorityPin,"size",1,20,1),p.addColor(c.lowPriorityPin,"color"),p.close(),i.add(c,"isInView"),i.add(c,"remove")}function Ge(n,e,i,t,s){let{appearance:o,interactive:a}=t;if(!o||o.margin==null||a==null)throw new Error("incomplte label state");let l={text:e.text,interactive:a,appearance:{...o,margin:o.margin||0,pinColor:o.pinColor?E(o.pinColor):"black",textColor:o.textColor?E(o.textColor):"black"},remove(){n.Labels.remove(e),s?.(e),i.destroy()},isInView:j(n,e.id)};i.onChange(h=>{n.updateState(e,{appearance:l.appearance,interactive:l.interactive})}),i.add(l.appearance,"margin",0,20).name("margin"),i.add(l,"text"),i.add(l,"interactive"),i.addColor(l.appearance,"pinColor").name("pin color"),i.addColor(l.appearance,"pinOutlineColor").name("pin outline color"),i.addColor(l.appearance,"textColor").name("text color"),i.addColor(l.appearance,"textOutlineColor").name("text outline color"),i.add(l,"isInView"),i.add(l,"remove")}function O(n,e,i,{onRemove:t}={}){let s=n.getState(e);if(!s)throw new Error(`error getting state for entity: ${e.id}`);let o=s.type===N?e.text?.substring(0,12)||"Label":`Marker ${e.id.toString().substring(0,8)}`,a=i.addFolder(o);if(a.close(),s.type===N)Ge(n,e,a,s,t);else if(s.type===ae)He(n,e,a,s,t);else throw new Error(`unsupported entity type: ${s.type}`);return{labelItemFolder:a,destroy(){a.destroy()}}}function Be(n,e){let i=n.addFolder("Add"),t={onClick:!1,margin:6,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"),{destroy(){i.destroy()},addLabel(s){return i._closed||!t.onClick?void 0:e.Labels.add(s,t.text,{appearance:{margin:t.margin,pinColor:t.marginForegroundColor,pinOutlineColor:t.marginBackgroundColor,textColor:t.textForegroundColor,textOutlineColor:t.textBackgroundColor},interactive:t.interactive})}}}var pe={};y();var ge="camera-ui";function me(n,e,i){let t=n.addFolder("Camera \u{1F4F7}").onOpenClose(b=>{ee({opened:!b._closed},ge)}),{params:s}=te(ge);s.opened||t.close();let o=e.Camera.center.toJSON(),a=document.createElement("div");Object.assign(a.style,{display:"none",position:"absolute",left:"0px",zIndex:999,top:"0px",bottom:"0px",right:"0px",backgroundColor:"aqua",pointerEvents:"none",opacity:.5}),e.container.appendChild(a);let l=()=>e.getDimensions(),[h,m,d,g]=i?.padding??[e.Camera.screenOffsets.top,e.Camera.screenOffsets.right,e.Camera.screenOffsets.bottom,e.Camera.screenOffsets.left],r={center_lat:o.latitude,center_lon:o.longitude,zoomLevel:e.Camera.zoomLevel,pitch:e.Camera.pitch,bearing:e.Camera.bearing,minZoomLevel:e.Camera.minZoomLevel,maxZoomLevel:e.Camera.maxZoomLevel,inset_type:i?.padding?"pixel":e.Camera.screenOffsets.type,inset_top:h,inset_left:g,inset_right:m,inset_bottom:d,animateOnLoad:!0,persist:()=>{ee(t.save().controllers,"camera"),navigator.clipboard.writeText(window.location.href)},visualizeInset:!!(h||m||d||g),"Focus on click":i?.focusOnClick??!0,"Focus on current floor":()=>{e.Camera.focusOn([e.currentFloor],{screenOffsets:{top:20,left:20,right:20,bottom:20}})}};function c(){r.inset_type=e.Camera.screenOffsets.type,r.inset_left=e.Camera.screenOffsets.left,r.inset_top=e.Camera.screenOffsets.top,r.inset_right=e.Camera.screenOffsets.right,r.inset_bottom=e.Camera.screenOffsets.bottom;let{width:b,height:A}=l();r.inset_type==="portion"?Object.assign(a.style,{left:r.inset_left*b+"px",top:r.inset_top*A+"px",bottom:r.inset_bottom*A+"px",right:r.inset_right*b+"px"}):Object.assign(a.style,{left:r.inset_left+"px",top:r.inset_top+"px",bottom:r.inset_bottom+"px",right:r.inset_right+"px"})}t.add(r,"center_lat").listen().disable(),t.add(r,"center_lon").listen().disable(),t.add(r,"zoomLevel",16,22,.5).listen().disable(),t.add(r,"pitch").listen().disable(),t.add(r,"bearing").listen().disable(),t.add(r,"minZoomLevel",5,22,.5).onChange(b=>{e.Camera.setMinZoomLevel(b)}),t.add(r,"maxZoomLevel",10,22,.5).onChange(b=>{e.Camera.setMaxZoomLevel(b)}),t.add(r,"animateOnLoad"),t.add(r,"visualizeInset").onChange(ne),ne(r.visualizeInset);let p,v,x,u;function f(){let{width:b,height:A}=l(),X=e.Camera.screenOffsets.type,Y=r.inset_type;X!==Y&&(Y==="portion"&&X==="pixel"?(r.inset_top=b>0?Math.min(r.inset_top/A,1):0,r.inset_bottom=b>0?Math.min(r.inset_bottom/A,1):0,r.inset_left=A>0?Math.min(r.inset_left/b,1):0,r.inset_right=A>0?Math.min(r.inset_right/b,1):0):Y==="pixel"&&X==="portion"&&(r.inset_top=Math.round(r.inset_top*A),r.inset_bottom=Math.round(r.inset_bottom*A),r.inset_left=Math.round(r.inset_left*b),r.inset_right=Math.round(r.inset_right*b))),p&&p.destroy(),v&&v.destroy(),x&&x.destroy(),u&&u.destroy(),r.inset_type==="portion"?(p=t.add(r,"inset_top",0,1,.01).onChange(k),v=t.add(r,"inset_bottom",0,1,.01).onChange(k),x=t.add(r,"inset_left",0,1,.01).onChange(k),u=t.add(r,"inset_right",0,1,.01).onChange(k)):(p=t.add(r,"inset_top",0,A,1).onChange(k),v=t.add(r,"inset_bottom",0,A,1).onChange(k),x=t.add(r,"inset_left",0,b,1).onChange(k),u=t.add(r,"inset_right",0,b,1).onChange(k))}t.add(r,"inset_type",["pixel","portion"]).onChange(()=>{f(),k()}),f();let C=Ue(e);t.add(r,"Focus on click").onChange(b=>{b?e.on("click",C):e.off("click",C)}),r["Focus on click"]&&e.on("click",C),t.add(r,"persist"),t.add(r,"Focus on current floor");let L=b=>{t._closed||(r.center_lat=b.center.latitude,r.center_lon=b.center.longitude,r.zoomLevel=b.zoomLevel,r.bearing=b.bearing,r.pitch=b.pitch)};e.on("camera-change",L);let{params:z}=te("camera",r);if(Object.keys(z).length>0){let b=z;e.Camera.setScreenOffsets({top:b.inset_top,left:b.inset_left,right:b.inset_right,bottom:b.inset_bottom,type:b.inset_type});let A={pitch:b.pitch,center:new re(b.center_lat,b.center_lon),bearing:b.bearing,zoomLevel:b.zoomLevel};b.animateOnLoad?e.Camera.animateTo(A):e.Camera.set(A),t.load({controllers:b,folders:{}}),c()}let we=[()=>{e.off("camera-change",L)}];function k(){e.Camera.setScreenOffsets({top:r.inset_top,left:r.inset_left,right:r.inset_right,bottom:r.inset_bottom,type:r.inset_type}),c()}(r.inset_top||r.inset_right||r.inset_bottom||r.inset_left)&&k();function ne(b){c(),b?a.style.display="block":a.style.display="none"}return()=>({destroy(){t.destroy(),de(we)}})}function Ue(n){return function(i){let{spaces:t,objects:s}=i,o=t?.[0]??s?.[0];o&&n.Camera.focusOn(o)}}y();function fe(n,e,i){let t={markers:{},removeAllMarkers(){i.Markers.removeAll().forEach(c=>{delete this.markers[c.id]}),h()}},{addMarker:s,destroy:o}=je(n,i);n.add(t,"removeAllMarkers");let a=n.addFolder("Marker List");n.close();let l=new Map,{rerender:h}=m();function m(){function r(v){delete t.markers[v.id],l.get(v.id)?.destroy()}function c(v){let x=O(i,v,a,{onRemove:f=>{r(f)}});if(!x)return;let{labelItemFolder:u}=x;l.set(v.id,u)}function p(){a.destroy(),a=n.addFolder("marker");for(let v in t.markers){let x=t.markers[v];c(x)}}return{rerender:p,add:c,remove:r}}n.domElement.classList.add("list-items");let d;i.on("click",({markers:r,coordinate:c})=>{if(!n._closed)if(r?.[0]){d?.close();let p=l.get(r[0].id);if(n.open(),!p)return;p?.open(),p?.domElement.scrollIntoView({block:"start"}),p?.domElement.focus(),d=p}else s(c)});function g(r){for(let c of r)t.markers[c.id]=c;h()}return{populateMarkers:g,destroy(){o()}}}function je(n,e){let i=n.addFolder("Add"),t={onClick:!1,interactive:!0,rank:"medium",anchor:"center",dynamicResize:!1,enabled:!0,zIndex:0,lowPriorityPin:{enabled:!0,size:8,color:"#666"},contentHTML:'<div style="padding: 8px; background: white; border: 2px solid #333; border-radius: 4px;">New Marker</div>'};i.add(t,"onClick"),i.add(t,"interactive"),i.add(t,"enabled"),i.add(t,"rank",["medium","high","always-visible","initial"]).name("rank"),i.add(t,"anchor",["center","top","bottom","left","right","top-left","top-right","bottom-left","bottom-right"]).name("anchor"),i.add(t,"dynamicResize").name("dynamic resize"),i.add(t,"zIndex",0,1e3,1).name("z-index (always-visible only)"),i.add(t,"contentHTML").name("content HTML");let s=i.addFolder("Low Priority Pin");return s.add(t.lowPriorityPin,"enabled"),s.add(t.lowPriorityPin,"size",1,20,1),s.addColor(t.lowPriorityPin,"color"),s.close(),{destroy(){i.destroy()},addMarker(o){if(i._closed||!t.onClick)return;let a={interactive:t.interactive,enabled:t.enabled,rank:t.rank,anchor:t.anchor,dynamicResize:t.dynamicResize,lowPriorityPin:{enabled:t.lowPriorityPin.enabled,size:t.lowPriorityPin.size,color:t.lowPriorityPin.color}};return t.rank==="always-visible"&&(a.zIndex=t.zIndex),e.Markers.add(o,t.contentHTML,a)}}}y();function be(n,e){let i=n.addFolder("Walls").close(),t={visible:!0,topColor:"#b1fa87",color:"#e8e8e8",texture:{url:""},topTexture:{url:""}};i.add(t,"visible").onChange(a=>{e.updateState("exterior-walls",{visible:a})}),i.addColor(t,"topColor").onChange(a=>{e.updateState("exterior-walls",{topColor:a})}),i.addColor(t,"color").onChange(a=>{e.updateState("exterior-walls",{color:a})}),i.addFolder("Texture - side").add(t.texture,"url").onFinishChange(a=>{e.updateState("exterior-walls",{texture:{url:a}})}),i.addFolder("Texture - top").add(t.topTexture,"url").onFinishChange(a=>{e.updateState("exterior-walls",{topTexture:{url:a}})}),e.updateState("exterior-walls",{topColor:t.topColor}),e.updateState("exterior-walls",{color:t.color})}y();function ve(n,e,i){n.close();let t={language:i.currentLanguage?.code??"en"},s=i.getByType("enterprise-venue");n.add(t,"language",s?.languages.map(o=>o.code)).onChange(o=>{i.changeLanguage(o)})}y();function ye(n,e,i){let t=n.addFolder("Debug");t.close();let s=e.Debug.state,o={showPolygonLabelTextAreaMesh:s.showPolygonLabelTextAreaMesh,showCollisionBoxes:s.showCollisionBoxes,showEnvMap:s.showEnvMap};t.add(o,"showPolygonLabelTextAreaMesh").onChange(a=>{e.Debug.update({showPolygonLabelTextAreaMesh:a})}).name("Show Flat Label Text Area Mesh"),t.add(o,"showCollisionBoxes").onChange(a=>{e.Debug.update({showCollisionBoxes:a})}).name("Show Collision Boxes"),t.add(o,"showEnvMap").onChange(a=>{e.Debug.update({showEnvMap:a})}).name("Show Environment Map"),e.Debug.update(o)}y();function xe(n,e,i){let t=n.addFolder("Text3D").close(),s={all:()=>{e.Text3D.labelAll()},removeAll:()=>{e.Text3D.removeAll()}};t.add(s,"all").name("Show All"),t.add(s,"removeAll").name("Remove All")}function Ae(n,e,i){Xe();let t=new G({title:"SDK Controls"});t.domElement.classList.add("mappedin-js-inspector"),he(e,n,t),me(t,e,i?.camera);let s=t.addFolder("Levels").close(),o=t.addFolder("Scene Controls");o.close();let a=t.addFolder("Labels");xe(t,e,n);let l=t.addFolder("Markers");be(t,e);let h=t.addFolder("misc");ye(t,e,n),ve(h,e,n);let m={level:e.currentFloor.id},{populatelabels:d}=ue(a,n,e),{populateMarkers:g}=fe(l,n,e),r=n.getByType("floor").reduce((p,v)=>(p[v.name]=v.id,p),{}),c=s.add(m,"level",r).onChange(p=>{e.setFloor(p),m.level=e.currentFloor.id,c.updateDisplay()});return e.on("floor-change-start",p=>{s.controllers[0].setValue(p.floor.id)}),n.getByType("space").forEach(p=>{e.updateState(p,{interactive:!0})}),n.getByType("object").forEach(p=>{e.updateState(p,{interactive:!0})}),n.getByType("object").forEach(p=>{e.updateState(p,{interactive:!0})}),e.setHoverColor("#a2b7e6"),e.Camera.setMaxZoomLevel(20),{populatelabels:d,sceneFolder:o,populateMarkers:g}}var Ce="mappedin-sdk-debug-css";function Xe(){if(document.getElementById(Ce))return;let n=document.createElement("style");n.id=Ce,n.textContent=pe,document.head.appendChild(n)}var ie=class{constructor(e,i){$(this,"_enabled",!1);$(this,"mv");$(this,"api");$(this,"mapData");$(this,"scenegraphVisualizerMounted",!1);$(this,"storeStateToLocalStorageEnabled",!1);this.mv=e,this.api=i,this.mapData=this.api.getMapData()}setMapData(e){this.mapData=e}async enable(e={}){if(this._enabled)return;if(this._enabled=!0,!this.mapData)throw new Error("Please set mapData before enable debug.");let{sceneFolder:i}=Ae(this.mapData,this.mv,e);i.onOpenClose(t=>{t===i&&!t._closed&&!this.scenegraphVisualizerMounted&&(this.scenegraphVisualizerMounted=!0,se(this.api.core,i))}),this.api.getMapDataInternal()?.spaces.forEach(t=>{this.mv.updateState(t,{interactive:!0})})}get enabled(){return this._enabled}};export{ie as Inspector};
483
- //# sourceMappingURL=inspector-66PSYVJU.js.map