@mappedin/react-sdk 6.0.1-beta.32 → 6.0.1-beta.33

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.
@@ -1 +0,0 @@
1
- import{a as Et,c as J,f as D,g as W,h as _t}from"./chunk-NSQIJRR4.js";import{j as U}from"./chunk-IFBLXLIM.js";import"./chunk-4F56JD4R.js";import"./chunk-IXJQWNR3.js";import{S as Mt}from"./chunk-2UISP3K7.js";import{a as C}from"./chunk-7VUIGM34.js";import{a,f as T,g as x,h as S,i as kt,j as G}from"./chunk-J5IUISYU.js";C();C();C();C();var P=class P{constructor(t,o,e,n,s="div"){this.parent=t,this.object=o,this.property=e,this._disabled=!1,this._hidden=!1,this.initialValue=this.getValue(),this.domElement=document.createElement(s),this.domElement.classList.add("controller"),this.domElement.classList.add(n),this.$name=document.createElement("div"),this.$name.classList.add("name"),P.nextNameID=P.nextNameID||0,this.$name.id="lil-gui-name-".concat(++P.nextNameID),this.$widget=document.createElement("div"),this.$widget.classList.add("widget"),this.$disable=this.$widget,this.domElement.appendChild(this.$name),this.domElement.appendChild(this.$widget),this.domElement.addEventListener("keydown",r=>r.stopPropagation()),this.domElement.addEventListener("keyup",r=>r.stopPropagation()),this.parent.children.push(this),this.parent.controllers.push(this),this.parent.$children.appendChild(this.domElement),this._listenCallback=this._listenCallback.bind(this),this.name(e)}name(t){return this._name=t,this.$name.textContent=t,this}onChange(t){return this._onChange=t,this}_callOnChange(){this.parent._callOnChange(this),this._onChange!==void 0&&this._onChange.call(this,this.getValue()),this._changed=!0}onFinishChange(t){return this._onFinishChange=t,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(t=!0){return this.disable(!t)}disable(t=!0){return t===this._disabled?this:(this._disabled=t,this.domElement.classList.toggle("disabled",t),this.$disable.toggleAttribute("disabled",t),this)}show(t=!0){return this._hidden=!t,this.domElement.style.display=this._hidden?"none":"",this}hide(){return this.show(!1)}options(t){let o=this.parent.add(this.object,this.property,t);return o.name(this._name),this.destroy(),o}min(t){return this}max(t){return this}step(t){return this}decimals(t){return this}listen(t=!0){return this._listening=t,this._listenCallbackID!==void 0&&(cancelAnimationFrame(this._listenCallbackID),this._listenCallbackID=void 0),this._listening&&this._listenCallback(),this}_listenCallback(){this._listenCallbackID=requestAnimationFrame(this._listenCallback);let t=this.save();t!==this._listenPrevValue&&this.updateDisplay(),this._listenPrevValue=t}getValue(){return this.object[this.property]}setValue(t){return this.getValue()!==t&&(this.object[this.property]=t,this._callOnChange(),this.updateDisplay()),this}updateDisplay(){return this}load(t){return this.setValue(t),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)}};a(P,"Controller");var L=P,at=class at extends L{constructor(t,o,e){super(t,o,e,"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}};a(at,"BooleanController");var et=at;function it(i){let t,o;return(t=i.match(/(#|0x)?([a-f0-9]{6})/i))?o=t[2]:(t=i.match(/rgb\(\s*(\d*)\s*,\s*(\d*)\s*,\s*(\d*)\s*\)/))?o=parseInt(t[1]).toString(16).padStart(2,0)+parseInt(t[2]).toString(16).padStart(2,0)+parseInt(t[3]).toString(16).padStart(2,0):(t=i.match(/^#?([a-f0-9])([a-f0-9])([a-f0-9])$/i))&&(o=t[1]+t[1]+t[2]+t[2]+t[3]+t[3]),o?"#"+o:!1}a(it,"normalizeColorString");var Xt={isPrimitive:!0,match:i=>typeof i=="string",fromHexString:it,toHexString:it},H={isPrimitive:!0,match:i=>typeof i=="number",fromHexString:i=>parseInt(i.substring(1),16),toHexString:i=>"#"+i.toString(16).padStart(6,0)},Kt={isPrimitive:!1,match:i=>Array.isArray(i),fromHexString(i,t,o=1){let e=H.fromHexString(i);t[0]=(e>>16&255)/255*o,t[1]=(e>>8&255)/255*o,t[2]=(e&255)/255*o},toHexString([i,t,o],e=1){e=255/e;let n=i*e<<16^t*e<<8^o*e<<0;return H.toHexString(n)}},Zt={isPrimitive:!1,match:i=>Object(i)===i,fromHexString(i,t,o=1){let e=H.fromHexString(i);t.r=(e>>16&255)/255*o,t.g=(e>>8&255)/255*o,t.b=(e&255)/255*o},toHexString({r:i,g:t,b:o},e=1){e=255/e;let n=i*e<<16^t*e<<8^o*e<<0;return H.toHexString(n)}},Qt=[Xt,H,Kt,Zt];function qt(i){return Qt.find(t=>t.match(i))}a(qt,"getColorFormat");var lt=class lt extends L{constructor(t,o,e,n){super(t,o,e,"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=qt(this.initialValue),this._rgbScale=n,this._initialValueHexString=this.save(),this._textFocused=!1,this.$input.addEventListener("input",()=>{this._setValueFromHexString(this.$input.value)}),this.$input.addEventListener("blur",()=>{this._callOnFinishChange()}),this.$text.addEventListener("input",()=>{let s=it(this.$text.value);s&&this._setValueFromHexString(s)}),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(t){if(this._format.isPrimitive){let o=this._format.fromHexString(t);this.setValue(o)}else this._format.fromHexString(t,this.getValue(),this._rgbScale),this._callOnChange(),this.updateDisplay()}save(){return this._format.toHexString(this.getValue(),this._rgbScale)}load(t){return this._setValueFromHexString(t),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}};a(lt,"ColorController");var ot=lt,dt=class dt extends L{constructor(t,o,e){super(t,o,e,"function"),this.$button=document.createElement("button"),this.$button.appendChild(this.$name),this.$widget.appendChild(this.$button),this.$button.addEventListener("click",n=>{n.preventDefault(),this.getValue().call(this.object),this._callOnChange()}),this.$button.addEventListener("touchstart",()=>{},{passive:!0}),this.$disable=this.$button}};a(dt,"FunctionController");var B=dt,ct=class ct extends L{constructor(t,o,e,n,s,r){super(t,o,e,"number"),this._initInput(),this.min(n),this.max(s);let l=r!==void 0;this.step(l?r:this._getImplicitStep(),l),this.updateDisplay()}decimals(t){return this._decimals=t,this.updateDisplay(),this}min(t){return this._min=t,this._onUpdateMinMax(),this}max(t){return this._max=t,this._onUpdateMinMax(),this}step(t,o=!0){return this._step=t,this._stepExplicit=o,this}updateDisplay(){let t=this.getValue();if(this._hasSlider){let o=(t-this._min)/(this._max-this._min);o=Math.max(0,Math.min(o,1)),this.$fill.style.width=o*100+"%"}return this._inputFocused||(this.$input.value=this._decimals===void 0?t:t.toFixed(this._decimals)),this}_initInput(){this.$input=document.createElement("input"),this.$input.setAttribute("type","text"),this.$input.setAttribute("aria-labelledby",this.$name.id),window.matchMedia("(pointer: coarse)").matches&&(this.$input.setAttribute("type","number"),this.$input.setAttribute("step","any")),this.$widget.appendChild(this.$input),this.$disable=this.$input;let o=a(()=>{let v=parseFloat(this.$input.value);isNaN(v)||(this._stepExplicit&&(v=this._snap(v)),this.setValue(this._clamp(v)))},"onInput"),e=a(v=>{let w=parseFloat(this.$input.value);isNaN(w)||(this._snapClampSetValue(w+v),this.$input.value=this.getValue())},"increment"),n=a(v=>{v.key==="Enter"&&this.$input.blur(),v.code==="ArrowUp"&&(v.preventDefault(),e(this._step*this._arrowKeyMultiplier(v))),v.code==="ArrowDown"&&(v.preventDefault(),e(this._step*this._arrowKeyMultiplier(v)*-1))},"onKeyDown"),s=a(v=>{this._inputFocused&&(v.preventDefault(),e(this._step*this._normalizeMouseWheel(v)))},"onWheel"),r=!1,l,d,g,h,c,p=5,f=a(v=>{l=v.clientX,d=g=v.clientY,r=!0,h=this.getValue(),c=0,window.addEventListener("mousemove",u),window.addEventListener("mouseup",b)},"onMouseDown"),u=a(v=>{if(r){let w=v.clientX-l,O=v.clientY-d;Math.abs(O)>p?(v.preventDefault(),this.$input.blur(),r=!1,this._setDraggingStyle(!0,"vertical")):Math.abs(w)>p&&b()}if(!r){let w=v.clientY-g;c-=w*this._step*this._arrowKeyMultiplier(v),h+c>this._max?c=this._max-h:h+c<this._min&&(c=this._min-h),this._snapClampSetValue(h+c)}g=v.clientY},"onMouseMove"),b=a(()=>{this._setDraggingStyle(!1,"vertical"),this._callOnFinishChange(),window.removeEventListener("mousemove",u),window.removeEventListener("mouseup",b)},"onMouseUp"),y=a(()=>{this._inputFocused=!0},"onFocus"),m=a(()=>{this._inputFocused=!1,this.updateDisplay(),this._callOnFinishChange()},"onBlur");this.$input.addEventListener("input",o),this.$input.addEventListener("keydown",n),this.$input.addEventListener("wheel",s,{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 t=a((m,v,w,O,R)=>(m-v)/(w-v)*(R-O)+O,"map"),o=a(m=>{let v=this.$slider.getBoundingClientRect(),w=t(m,v.left,v.right,this._min,this._max);this._snapClampSetValue(w)},"setValueFromX"),e=a(m=>{this._setDraggingStyle(!0),o(m.clientX),window.addEventListener("mousemove",n),window.addEventListener("mouseup",s)},"mouseDown"),n=a(m=>{o(m.clientX)},"mouseMove"),s=a(()=>{this._callOnFinishChange(),this._setDraggingStyle(!1),window.removeEventListener("mousemove",n),window.removeEventListener("mouseup",s)},"mouseUp"),r=!1,l,d,g=a(m=>{m.preventDefault(),this._setDraggingStyle(!0),o(m.touches[0].clientX),r=!1},"beginTouchDrag"),h=a(m=>{m.touches.length>1||(this._hasScrollBar?(l=m.touches[0].clientX,d=m.touches[0].clientY,r=!0):g(m),window.addEventListener("touchmove",c,{passive:!1}),window.addEventListener("touchend",p))},"onTouchStart"),c=a(m=>{if(r){let v=m.touches[0].clientX-l,w=m.touches[0].clientY-d;Math.abs(v)>Math.abs(w)?g(m):(window.removeEventListener("touchmove",c),window.removeEventListener("touchend",p))}else m.preventDefault(),o(m.touches[0].clientX)},"onTouchMove"),p=a(()=>{this._callOnFinishChange(),this._setDraggingStyle(!1),window.removeEventListener("touchmove",c),window.removeEventListener("touchend",p)},"onTouchEnd"),f=this._callOnFinishChange.bind(this),u=400,b,y=a(m=>{if(Math.abs(m.deltaX)<Math.abs(m.deltaY)&&this._hasScrollBar)return;m.preventDefault();let w=this._normalizeMouseWheel(m)*this._step;this._snapClampSetValue(this.getValue()+w),this.$input.value=this.getValue(),clearTimeout(b),b=setTimeout(f,u)},"onWheel");this.$slider.addEventListener("mousedown",e),this.$slider.addEventListener("touchstart",h,{passive:!1}),this.$slider.addEventListener("wheel",y,{passive:!1})}_setDraggingStyle(t,o="horizontal"){this.$slider&&this.$slider.classList.toggle("active",t),document.body.classList.toggle("lil-gui-dragging",t),document.body.classList.toggle("lil-gui-".concat(o),t)}_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(t){let{deltaX:o,deltaY:e}=t;return Math.floor(t.deltaY)!==t.deltaY&&t.wheelDelta&&(o=0,e=-t.wheelDelta/120,e*=this._stepExplicit?1:10),o+-e}_arrowKeyMultiplier(t){let o=this._stepExplicit?1:10;return t.shiftKey?o*=10:t.altKey&&(o/=10),o}_snap(t){let o=Math.round(t/this._step)*this._step;return parseFloat(o.toPrecision(15))}_clamp(t){return t<this._min&&(t=this._min),t>this._max&&(t=this._max),t}_snapClampSetValue(t){this.setValue(this._clamp(this._snap(t)))}get _hasScrollBar(){let t=this.parent.root.$children;return t.scrollHeight>t.clientHeight}get _hasMin(){return this._min!==void 0}get _hasMax(){return this._max!==void 0}};a(ct,"NumberController");var nt=ct,ht=class ht extends L{constructor(t,o,e,n){super(t,o,e,"option"),this.$select=document.createElement("select"),this.$select.setAttribute("aria-labelledby",this.$name.id),this.$display=document.createElement("div"),this.$display.classList.add("display"),this.$select.addEventListener("change",()=>{this.setValue(this._values[this.$select.selectedIndex]),this._callOnFinishChange()}),this.$select.addEventListener("focus",()=>{this.$display.classList.add("focus")}),this.$select.addEventListener("blur",()=>{this.$display.classList.remove("focus")}),this.$widget.appendChild(this.$select),this.$widget.appendChild(this.$display),this.$disable=this.$select,this.options(n)}options(t){return this._values=Array.isArray(t)?t:Object.values(t),this._names=Array.isArray(t)?t:Object.keys(t),this.$select.replaceChildren(),this._names.forEach(o=>{let e=document.createElement("option");e.textContent=o,this.$select.appendChild(e)}),this.updateDisplay(),this}updateDisplay(){let t=this.getValue(),o=this._values.indexOf(t);return this.$select.selectedIndex=o,this.$display.textContent=o===-1?t:this._names[o],this}};a(ht,"OptionController");var rt=ht,ut=class ut extends L{constructor(t,o,e){super(t,o,e,"string"),this.$input=document.createElement("input"),this.$input.setAttribute("type","text"),this.$input.setAttribute("spellcheck","false"),this.$input.setAttribute("aria-labelledby",this.$name.id),this.$input.addEventListener("input",()=>{this.setValue(this.$input.value)}),this.$input.addEventListener("keydown",n=>{n.code==="Enter"&&this.$input.blur()}),this.$input.addEventListener("blur",()=>{this._callOnFinishChange()}),this.$widget.appendChild(this.$input),this.$disable=this.$input,this.updateDisplay()}updateDisplay(){return this.$input.value=this.getValue(),this}};a(ut,"StringController");var st=ut,Vt='.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 te(i){let t=document.createElement("style");t.innerHTML=i;let o=document.querySelector("head link[rel=stylesheet], head style");o?document.head.insertBefore(t,o):document.head.appendChild(t)}a(te,"_injectStyles");var Ft=!1,X=class X{constructor({parent:t,autoPlace:o=t===void 0,container:e,width:n,title:s="Controls",closeFolders:r=!1,injectStyles:l=!0,touchStyles:d=!0}={}){if(this.parent=t,this.root=t?t.root:this,this.children=[],this.controllers=[],this.folders=[],this._closed=!1,this._hidden=!1,this.domElement=document.createElement("div"),this.domElement.classList.add("lil-gui"),this.$title=document.createElement("div"),this.$title.classList.add("title"),this.$title.setAttribute("role","button"),this.$title.setAttribute("aria-expanded",!0),this.$title.setAttribute("tabindex",0),this.$title.addEventListener("click",()=>this.openAnimated(this._closed)),this.$title.addEventListener("keydown",g=>{(g.code==="Enter"||g.code==="Space")&&(g.preventDefault(),this.$title.click())}),this.$title.addEventListener("touchstart",()=>{},{passive:!0}),this.$children=document.createElement("div"),this.$children.classList.add("children"),this.domElement.appendChild(this.$title),this.domElement.appendChild(this.$children),this.title(s),this.parent){this.parent.children.push(this),this.parent.folders.push(this),this.parent.$children.appendChild(this.domElement);return}this.domElement.classList.add("root"),d&&this.domElement.classList.add("allow-touch-styles"),!Ft&&l&&(te(Vt),Ft=!0),e?e.appendChild(this.domElement):o&&(this.domElement.classList.add("autoPlace"),document.body.appendChild(this.domElement)),n&&this.domElement.style.setProperty("--width",n+"px"),this._closeFolders=r}add(t,o,e,n,s){if(Object(e)===e)return new rt(this,t,o,e);let r=t[o];switch(typeof r){case"number":return new nt(this,t,o,e,n,s);case"boolean":return new et(this,t,o);case"string":return new st(this,t,o);case"function":return new B(this,t,o)}console.error("gui.add failed\n property:",o,"\n object:",t,"\n value:",r)}addColor(t,o,e=1){return new ot(this,t,o,e)}addFolder(t){let o=new X({parent:this,title:t});return this.root._closeFolders&&o.close(),o}load(t,o=!0){return t.controllers&&this.controllers.forEach(e=>{e instanceof B||e._name in t.controllers&&e.load(t.controllers[e._name])}),o&&t.folders&&this.folders.forEach(e=>{e._title in t.folders&&e.load(t.folders[e._title])}),this}save(t=!0){let o={controllers:{},folders:{}};return this.controllers.forEach(e=>{if(!(e instanceof B)){if(e._name in o.controllers)throw new Error('Cannot save GUI with duplicate property "'.concat(e._name,'"'));o.controllers[e._name]=e.save()}}),t&&this.folders.forEach(e=>{if(e._title in o.folders)throw new Error('Cannot save GUI with duplicate folder "'.concat(e._title,'"'));o.folders[e._title]=e.save()}),o}open(t=!0){return this._setClosed(!t),this.$title.setAttribute("aria-expanded",!this._closed),this.domElement.classList.toggle("closed",this._closed),this}close(){return this.open(!1)}_setClosed(t){this._closed!==t&&(this._closed=t,this._callOnOpenClose(this))}show(t=!0){return this._hidden=!t,this.domElement.style.display=this._hidden?"none":"",this}hide(){return this.show(!1)}openAnimated(t=!0){return this._setClosed(!t),this.$title.setAttribute("aria-expanded",!this._closed),requestAnimationFrame(()=>{let o=this.$children.clientHeight;this.$children.style.height=o+"px",this.domElement.classList.add("transition");let e=a(s=>{s.target===this.$children&&(this.$children.style.height="",this.domElement.classList.remove("transition"),this.$children.removeEventListener("transitionend",e))},"onTransitionEnd");this.$children.addEventListener("transitionend",e);let n=t?this.$children.scrollHeight:0;this.domElement.classList.toggle("closed",!t),requestAnimationFrame(()=>{this.$children.style.height=n+"px"})}),this}title(t){return this._title=t,this.$title.textContent=t,this}reset(t=!0){return(t?this.controllersRecursive():this.controllers).forEach(e=>e.reset()),this}onChange(t){return this._onChange=t,this}_callOnChange(t){this.parent&&this.parent._callOnChange(t),this._onChange!==void 0&&this._onChange.call(this,{object:t.object,property:t.property,value:t.getValue(),controller:t})}onFinishChange(t){return this._onFinishChange=t,this}_callOnFinishChange(t){this.parent&&this.parent._callOnFinishChange(t),this._onFinishChange!==void 0&&this._onFinishChange.call(this,{object:t.object,property:t.property,value:t.getValue(),controller:t})}onOpenClose(t){return this._onOpenClose=t,this}_callOnOpenClose(t){this.parent&&this.parent._callOnOpenClose(t),this._onOpenClose!==void 0&&this._onOpenClose.call(this,t)}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(t=>t.destroy())}controllersRecursive(){let t=Array.from(this.controllers);return this.folders.forEach(o=>{t=t.concat(o.controllersRecursive())}),t}foldersRecursive(){let t=Array.from(this.folders);return this.folders.forEach(o=>{t=t.concat(o.foldersRecursive())}),t}};a(X,"GUI");var z=X,K=z;C();C();var _=(()=>{let i=new Mt;return a(function(o){return i.set(o),"#".concat(i.getHexString())},"normalize")})();function St(i){let t;for(t of i)t()}a(St,"runAll");function pt(i,t){let o=window.location.href,e=new URL(o),n=new URLSearchParams(e.search);for(let s in i)if(i.hasOwnProperty(s)){let r="".concat(t,".").concat(s);n.set(r,i[s])}e.search=n.toString(),history.pushState({path:e.toString()},"",e.toString())}a(pt,"updateCurrentUrlParamsWithNamespace");function gt(i,t){let o=new URLSearchParams(window.location.search),e={};for(let[n,s]of o)if(n.startsWith("".concat(i,"."))){let r=n.slice(i.length+1);s==="true"||s==="false"?e[r]=s==="true":typeof(t==null?void 0:t[r])=="number"?e[r]=Number(s):e[r]=s}return{namespace:i,params:e}}a(gt,"getUrlParamsWithNamespace");var ee=["interactive"];function Z(i,t,o){var n,s;let e=o.addFolder("".concat(t.type,"-").concat(t.id));for(let r in t){if(r==="visible"&&e.add(t,r).onChange(l=>{i.updateState(t.id,{[r]:l})}),r==="color"||r==="hoverColor"){t[r]=_(t[r]),e.addColor(t,r).onChange(l=>{i.updateState(t.id,{[r]:l})});continue}if(r==="height"){e.add(t,r,0,20,1).onChange(l=>{i.updateState(t.id,{[r]:l})});continue}if(r==="texture"&&t.texture){(n=e.addFolder("Texture - side").add(t,"texture"))==null||n.onChange(d=>{i.updateState(t.id,{texture:{url:d}})});continue}if(r==="topTexture"&&t.topTexture){(s=e.addFolder("Texture - top").add(t,"topTexture"))==null||s.onChange(d=>{i.updateState(t.id,{topTexture:{url:d}})});continue}if(r==="opacity"){e.add(t,r,0,1,.1).onChange(l=>{i.updateState(t.id,{[r]:l})});continue}ee.includes(r)&&e.add(t,r).onChange(l=>{i.updateState(t.id,{[r]:l})})}return t.isInView&&(e.add(t,"isInView").listen().disable(),e.add(t,"isInViewCheck")),{cleanup(){e.destroy()}}}a(Z,"renderByProp");C();C();function ie(){let i=[];function t(n,s){var d;let r=Object.values(n.getMapData())[0],l=s;if(l&&J.is(l)){let g=(d=r.getByType("enterprise-location"))==null?void 0:d.find(h=>h.spaces.some(c=>c.id===l.id));g&&(l=g)}return l}a(t,"getHighlightTarget");async function o(n,s){return s instanceof W?n.Camera.focusOn(s.locations.flatMap(r=>r.spaces),j):s instanceof D?n.Camera.focusOn(s.spaces,j):n.Camera.focusOn(s,j)}a(o,"focusOn");function e(n,s,{focus:r=!1}={}){if(!window.enableHighlightCard)return()=>{};let l=t(n,s),d=document.createElement("div");if(d.style.cssText="\n position: absolute;\n top: 20px;\n left: 20px;\n background-color: rgba(30, 30, 30, 0.95);\n box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);\n border-radius: 12px;\n padding: 24px;\n max-width: 320px;\n z-index: 1000;\n font-family: 'Arial', sans-serif;\n transition: all 0.3s ease;\n color: #e0e0e0;\n ","name"in l){let h=document.createElement("h3");h.textContent=l.name,h.style.cssText="\n margin: 0 0 16px;\n font-size: 22px;\n font-weight: 600;\n color: #ffffff;\n letter-spacing: -0.5px;\n ",d.appendChild(h)}if(l instanceof D){if(l.description){let h=document.createElement("p");h.textContent=l.description,h.style.cssText="\n margin: 0 0 16px;\n font-size: 14px;\n color: #b0b0b0;\n line-height: 1.5;\n ",d.appendChild(h)}if(l.tags&&l.tags.length>0){let h=document.createElement("div");h.style.cssText="\n display: flex;\n flex-wrap: nowrap;\n gap: 8px;\n margin-bottom: 16px;\n overflow-x: hidden;\n max-height: 30px; /* Adjust this value based on your font size and padding */\n ",l.tags.forEach(c=>{let p=document.createElement("span");p.textContent=c,p.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(p)}),d.appendChild(h)}}let g;if(!(s instanceof W)){let h=new K({autoPlace:!1});h.domElement.style.cssText="\n position: relative;\n overflow-y: auto;\n margin-top: 16px;\n border-top: 1px solid #444;\n padding-top: 16px;\n ";let c=n.getState(s);c&&(Z(n,{id:s.id,...c},h),d.appendChild(h.domElement)),g=h}return document.body.appendChild(d),r&&o(n,l),()=>{d.style.opacity="0",d.style.transform="translateY(-10px)",setTimeout(()=>d.remove(),300),g==null||g.destroy()}}return a(e,"highlightCard"),{highlightCard:e,highlight:(n,s,{focus:r=!0}={})=>{i.length>0&&i.forEach(d=>n.Markers.remove(d));let l=t(n,s);if(l instanceof D)r&&n.Camera.focusOn(l.spaces,j),i.push(...l.spaces.map(d=>n.Markers.add(d,'<div style="padding: 15px; background-color: #ffffff; border-radius: 8px; box-shadow: 0 4px 6px rgba(0,0,0,0.1); max-width: 250px; position: relative;">\n <h3 style="margin: 0 0 10px; color: #333; font-size: 16px; font-weight: 600;">'.concat(l.name,"</h3>\n ").concat(l.description?'<p style="margin: 0 0 10px; color: #666; font-size: 14px; font-weight: 400;">'.concat(l.description,"</p>"):"","\n ").concat(l.tags?l.tags.map(g=>'<span style="display: inline-block; padding: 3px 8px; background-color: #e0f2f1; color: #00796b; border-radius: 12px; font-size: 12px;">'.concat(g,"</span>")).join(" "):"",'\n <div style="position: absolute; bottom: -10px; left: 50%; transform: translateX(-50%); width: 0; height: 0; border-left: 10px solid transparent; border-right: 10px solid transparent; border-top: 10px solid #ffffff;"></div>\n </div>'),{rank:"always-visible",anchor:"top"})));else if(l instanceof W){r&&n.Camera.focusOn(l.locations.flatMap(h=>h.spaces),j);let d=new Map,g=new Set;l.locations.forEach(h=>{d.has(h.name)||(h.spaces.forEach(c=>{i.push(n.Markers.add(c,'<div style="padding: 12px; background-color: rgba(0, 153, 51, 0.95); border-radius: 8px; box-shadow: 0 4px 8px rgba(0,0,0,0.3); transform: translateY(-4px); transition: all 0.3s ease;">\n <span style="font-weight: 600; color: #FFFFFF; font-size: 16px; text-shadow: 1px 1px 2px rgba(0,0,0,0.2);">'.concat(h.name,"</span>\n </div>"),{rank:"always-visible"}))}),d.set(h.name,!0))}),l.locations.forEach(h=>{h.coordinates.forEach(c=>{let p="".concat(c.latitude,",").concat(c.longitude);if(!g.has(p)&&!d.has(h.name)){let f=n.Markers.add(c,'<div style="padding: 10px; background-color: rgba(51, 102, 204, 0.9); border-radius: 6px; box-shadow: 0 3px 6px rgba(0,0,0,0.2);">\n <span style="font-weight: 500; color: #FFFFFF; font-size: 16px;">'.concat(h.name,'</span>\n <br>\n <span style="color: #FFFFFF; font-size: 12px; font-weight: 400;">Node</span>\n </div>'),{rank:"always-visible"});g.add(p),i.push(f)}})})}return()=>{i.forEach(d=>n.Markers.remove(d))}}}}a(ie,"createHighlightControl");var j={duration:300,easing:"ease-in-out"},Q=ie();C();var M={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(i){i.add(M.options.places.fields,"name").name("Places: Name"),i.add(M.options.places.fields,"description").name("Places: Description"),i.add(M.options.places.fields,"link").name("Places: Link"),i.add(M.options.places.fields,"category").name("Places: Category"),i.add(M.options.places,"limit"),i.add(M.options.locations.fields,"name").name("Locations: Name"),i.add(M.options.locations.fields,"tag").name("Locations: Tag"),i.add(M.options.locations.fields,"description").name("Locations: Description"),i.add(M.options.places,"limit"),i.add(M.options.categories.fields,"name").name("Categories: Name")}a(oe,"createAdvancedSettings");function Lt(i,t,o){var h;let e=new U,n=o.addFolder("Search");n.open();let s=n.add(M,"search").onChange(async c=>{let p=await t.Search.query(c,M.options);p&&(M.results=p,l(p,e))}),r=document.createElement("div");r.style.marginLeft="10px",(h=s.domElement.parentElement)==null||h.appendChild(r);let{renderSearch:l,close:d}=ne(i,t,r,s.$input),g=n.addFolder("Advanced");return g.close(),oe(g),document.addEventListener("keydown",c=>{(c.metaKey||c.ctrlKey)&&c.key==="k"?(c.preventDefault(),n._closed&&n.open(),s.$input.focus()):c.key==="Escape"&&(d(),e.publish("highlight",void 0))}),{pubsub:e}}a(Lt,"createSearchControl");function ne(i,t,o,e){let n,s;e.addEventListener("input",async l=>{l instanceof InputEvent&&(l.inputType==="insertText"||l.inputType==="insertCompositionText")&&(clearTimeout(n),n=setTimeout(async()=>{var g;let d=await t.Search.suggest(e.value);d&&d.length>0&&r((g=d[0])==null?void 0:g.suggestion)},100))});function r(l){if(!l){e.placeholder="";return}let d=e.value;e.value=l,e.setSelectionRange(d.length,l.length)}return a(r,"renderSuggestion"),{renderSearch(l,d){var g,h;if(l.places.length===0&&((g=l.enterpriseCategories)==null?void 0:g.length)===0&&((h=l.enterpriseLocations)==null?void 0:h.length)===0){o.textContent="No results found.";return}s=re(o,l,i,d)},close(){s.destroy()}}}a(ne,"mount");function re(i,t,o,e){i.innerHTML="";let n=document.createElement("div");Object.assign(n.style,q.dropdownContainer);let s=document.createElement("ul");s.className="options-list",Object.assign(s.style,q.optionsList),s.style.display="block";let r=[],l=a((p,f)=>{if(f&&f.length>0){let u=document.createElement("li");u.textContent=p,Object.assign(u.style,q.sectionHeader),s.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,q.option),m.tabIndex=0,m.addEventListener("focus",()=>{g(r.indexOf(m))}),m.addEventListener("mouseover",()=>{m.style.backgroundColor="#f0f0f0"}),m.addEventListener("mouseout",()=>{m.style.backgroundColor=""}),m.addEventListener("click",()=>{}),m.setAttribute("data-type",p),m.setAttribute("data-index",y.toString()),s.appendChild(m),r.push(m)})}},"addSection");l("enterpriseLocations",t.enterpriseLocations),l("enterpriseCategories",t.enterpriseCategories),l("Places",t.places),n.appendChild(s),i.appendChild(n);let d=[],g=a(p=>{d.forEach(m=>m()),d=[],r.forEach((m,v)=>{v===p?m.style.backgroundColor="#e0e0e0":m.style.backgroundColor=""});let f=r[p],u=f.getAttribute("data-type"),b=parseInt(f.getAttribute("data-index")||"0",10);if(!u)return;let{item:y}=t[u][b];e.publish("highlight",y)},"highlightOption"),h=a(p=>{!n.contains(p.target)&&p.target!==i&&c()},"handleClickOutside");document.addEventListener("click",h);let c=a(()=>{i.innerHTML="",document.removeEventListener("click",h)},"destroy");return{destroy(){i.innerHTML="",e.publish("highlight",void 0)}}}a(re,"createCustomDropdown");var q={dropdownContainer:{position:"absolute",color:"#202020"},optionsList:{display:"block",zIndex:"1002",position:"relative",maxHeight:"200px",overflowY:"auto",border:"1px solid #ccc",backgroundColor:"#fff",listStyleType:"none",margin:"0",padding:"0"},sectionHeader:{fontWeight:"bold",padding:"5px",backgroundColor:"#f0f0f0"},option:{padding:"5px",cursor:"pointer"}};function $t(i,t,o){o.domElement.id="interactionPanel";let e=[],{pubsub:n}=Lt(i,t,o);n.on("highlight",h=>{if(h){e.forEach(p=>p()),e=[];let c=h instanceof D?h.spaces[0]:h;if(c&&!J.is(c))return;e.push(Q.highlightCard(i,c,{focus:!0}))}else e.forEach(c=>c()),e=[]});let s=o.addFolder("Click \u{1F447}").close(),{sub:r}=se(i,s);r.on("click",h=>{e.forEach(c=>c()),e=[],h.spaces[0]&&(e=[Q.highlightCard(i,h.spaces[0])])});let l=o.addFolder("Hover \u{1F681}").close(),{sub:d}=ae(i,l),g;d.on("hover",h=>{h.spaces[0]?(g==null||g(),e.length===0&&(g=Q.highlightCard(i,h.spaces[0]))):(g==null||g(),g=void 0)})}a($t,"createInteractionControls");function se(i,t){let o=new U,e={position:"",hoverColor:_(i.getHoverColor())},n=t.add(e,"position").disable(),s=[];function r(){s.forEach(d=>d()),s.length=0}a(r,"reset");let l=0;return i.on("click",d=>{var u;let{labels:g,markers:h,coordinate:c}=d;r(),o.publish("click",d),clearInterval(l),n.load(JSON.stringify([c.longitude,c.latitude]));let p=g[0]||h[0];if(p){let b=mt(i,p,t);if(!b)return;s.push(b.destroy),b.labelItemFolder.openAnimated()}let f=(u=d.spaces[0])!=null?u:d.objects[0];if(f){let b={id:f.id,...i.getState(f.id),type:f.type,isInView:!1,isInViewCheck:ft(i,f.id)},{cleanup:y}=Z(i,b,t);l=setInterval(()=>{b.isInView=i.isInView(p||f)},500),s.push(y)}}),{sub:o}}a(se,"createClickControls");function ae(i,t){let o=new U;i.setHoverColor("#1f3a7a");let e={position:"",hoverColor:_(i.getHoverColor()),intersected:"",type:"",id:""},n=t.add(e,"position").disable();t.add(e,"id").disable().listen(),t.add(e,"type").disable().listen(),t.addColor(e,"hoverColor").onChange(l=>{i.setHoverColor(l)});let s=[];function r(){s.forEach(l=>l()),s.length=0}return a(r,"reset"),i.on("hover",l=>{var b,y,m;let{coordinate:d,spaces:g,objects:h,markers:c,labels:p}=l;r(),o.publish("hover",l),n.load(JSON.stringify([d.longitude,d.latitude]));let f=(m=(y=(b=g[0])!=null?b:h[0])!=null?y:c[0])!=null?m:p[0];if(!f)return;let u=i.getState(f);u&&(e.type=u.type,e.id=f.id)}),{sub:o}}a(ae,"createHoverControls");function ft(i,t){return a(function(){console.log("isInView",i.isInView(t))},"isInView")}a(ft,"createIsInViewHandler");function It(i,t,o){let e={labels:{},all(){o.Labels.all().forEach(f=>{this.labels[f.id]=f}),d()},removeAllLabels(){o.Labels.removeAll().forEach(f=>{delete this.labels[f.id]}),d()}},{addLabel:n,destroy:s}=le(i,o);i.add(e,"all"),i.add(e,"removeAllLabels");let r=i.addFolder("Label List");i.close();let l=new Map,{rerender:d}=g();function g(){function p(b){var y;delete e.labels[b.id],(y=l.get(b.id))==null||y.destroy()}a(p,"remove");function f(b){let y=mt(o,b,r,{onRemove:v=>{p(v)}});if(!y)return;let{labelItemFolder:m}=y;l.set(b.id,m)}a(f,"add");function u(){r.destroy(),r=i.addFolder("Label");for(let b in e.labels){let y=e.labels[b];f(y)}}return a(u,"rerender"),{rerender:u,add:f,remove:p}}a(g,"createLabelControls"),i.domElement.classList.add("list-items");let h;o.on("click",({labels:p,coordinate:f})=>{if(!i._closed)if(p[0]){h==null||h.close();let u=l.get(p[0].id);if(i.open(),!u)return;u==null||u.open(),u==null||u.domElement.scrollIntoView({block:"start"}),u==null||u.domElement.focus(),h=u}else n(f)});function c(p){for(let f of p)e.labels[f.id]=f;d()}return a(c,"populatelabels"),{populatelabels:c,destroy(){s()}}}a(It,"createLabelControls");function mt(i,t,o,{onRemove:e}={}){var g,h,c,p;let n=o.addFolder("".concat((g=t.text)==null?void 0:g.substring(0,12)));n.onChange(f=>{i.updateState(t,{appearance:d.appearance,interactive:d.interactive})}),n.close();let s=i.getState(t);if((s==null?void 0:s.type)!=="label")throw new Error("error getting state for label: ".concat(t.id));let{appearance:r,interactive:l}=s;if(!r||r.margin==null||l==null)throw new Error("incomplte label state");let d={text:t.text,interactive:l,appearance:{...r,margin:r.margin||0,marker:{foregroundColor:(c=(h=r.marker)==null?void 0:h.foregroundColor)!=null&&c.active?_((p=r.marker.foregroundColor)==null?void 0:p.active):"black"},text:{foregroundColor:_(r.text.foregroundColor)}},remove(){i.Labels.remove(t),e==null||e(t),n.destroy()},isInView:ft(i,t.id)};return n.add(d.appearance,"margin",0,20).name("margin"),n.add(d,"text"),n.add(d,"interactive"),n.addColor(d.appearance.marker,"foregroundColor").name("marker foreground"),n.addColor(d.appearance.text,"foregroundColor").name("text forground"),n.add(d,"isInView"),n.add(d,"remove"),{labelItemFolder:n,destroy(){n.destroy()}}}a(mt,"addLabelControlToFolder");function le(i,t){let o=i.addFolder("Add"),e={onClick:!1,margin:0,text:"New Label!",interactive:!0,marginForegroundColor:_("skyblue"),marginBackgroundColor:_("coral"),textForegroundColor:_("slategray"),textBackgroundColor:_("white")};return o.add(e,"onClick"),o.add(e,"margin"),o.add(e,"interactive"),o.add(e,"text"),o.addColor(e,"marginForegroundColor"),o.addColor(e,"marginBackgroundColor"),o.addColor(e,"textForegroundColor"),o.addColor(e,"textBackgroundColor"),{destroy(){o.destroy()},addLabel(n){return o._closed||!e.onClick?void 0:t.Labels.add(n,e.text,{appearance:{margin:e.margin,marker:{foregroundColor:{active:e.marginForegroundColor,inactive:e.marginForegroundColor},backgroundColor:{active:e.marginBackgroundColor,inactive:e.marginBackgroundColor}},text:{foregroundColor:e.textForegroundColor,backgroundColor:e.marginBackgroundColor}},interactive:e.interactive})}}}a(le,"createAddControl");var Ot={};C();var Tt="camera-ui";function Dt(i,t,o){var R,At;let e=i.addFolder("Camera \u{1F4F7}").onOpenClose(A=>{pt({opened:!A._closed},Tt)}),{params:n}=gt(Tt);n.opened||e.close();let s=t.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[l,d,g,h]=(R=o==null?void 0:o.padding)!=null?R:[],c={center_lat:s.latitude,center_lon:s.longitude,zoomLevel:t.Camera.zoomLevel,pitch:t.Camera.pitch,bearing:t.Camera.bearing,minZoomLevel:t.Camera.minZoomLevel,maxZoomLevel:t.Camera.maxZoomLevel,inset_type:"pixel",inset_top:l!=null?l:0,inset_left:h!=null?h:0,inset_right:d!=null?d:0,inset_bottom:g!=null?g:0,animateOnLoad:!0,persist:()=>{pt(e.save().controllers,"camera"),navigator.clipboard.writeText(window.location.href)},visualizeInset:!!(l||d||g||h),"Focus on click":(At=o==null?void 0:o.focusOnClick)!=null?At:!0,"Focus on current floor":()=>{t.Camera.focusOn([t.currentFloor],{screenOffsets:{top:20,left:20,right:20,bottom:20}})}};function p(){c.inset_type==="portion"?Object.assign(r.style,{left:c.inset_left*u+"px",top:c.inset_top*f+"px",bottom:c.inset_bottom*f+"px",right:c.inset_right*u+"px"}):Object.assign(r.style,{left:c.inset_left+"px",top:c.inset_top+"px",bottom:c.inset_bottom+"px",right:c.inset_right+"px"})}a(p,"updateInsetVisualizer"),e.add(c,"center_lat").listen().disable(),e.add(c,"center_lon").listen().disable(),e.add(c,"zoomLevel",16,22,.5).listen().disable(),e.add(c,"pitch").listen().disable(),e.add(c,"bearing").listen().disable(),e.add(c,"minZoomLevel",5,22,.5).onChange(A=>{t.Camera.setMinZoomLevel(A)}),e.add(c,"maxZoomLevel",10,22,.5).onChange(A=>{t.Camera.setMaxZoomLevel(A)}),e.add(c,"animateOnLoad"),e.add(c,"visualizeInset").onChange(O),O(c.visualizeInset);let{innerHeight:f,innerWidth:u}=window;e.add(c,"inset_type",["pixel","portion"]).onChange(w),e.add(c,"inset_top",0,f).onChange(w),e.add(c,"inset_bottom",0,f).onChange(w),e.add(c,"inset_left",0,u).onChange(w),e.add(c,"inset_right",0,u).onChange(w);let b=ce(t);e.add(c,"Focus on click").onChange(A=>{A?t.on("click",b):t.off("click",b)}),c["Focus on click"]&&t.on("click",b),e.add(c,"persist"),e.add(c,"Focus on current floor");let y=a(A=>{e._closed||(c.center_lat=A.center.latitude,c.center_lon=A.center.longitude,c.zoomLevel=A.zoomLevel,c.bearing=A.bearing,c.pitch=A.pitch)},"onCameraChanged");t.on("camera-change",y);let{params:m}=gt("camera",c);if(Object.keys(m).length>0){let A=m;t.Camera.setScreenOffsets({top:A.inset_top,left:A.inset_left,right:A.inset_right,bottom:A.inset_bottom,type:A.inset_type});let wt={pitch:A.pitch,center:new Et(A.center_lat,A.center_lon),bearing:A.bearing,zoomLevel:A.zoomLevel};A.animateOnLoad?t.Camera.animateTo(wt):t.Camera.set(wt),e.load({controllers:A,folders:{}}),p()}let v=[()=>{t.off("camera-change",y)}];function w(){t.Camera.setScreenOffsets({top:c.inset_top,left:c.inset_left,right:c.inset_right,bottom:c.inset_bottom,type:c.inset_type}),p()}a(w,"updateInset"),(c.inset_top||c.inset_right||c.inset_bottom||c.inset_left)&&w();function O(A){A?r.style.display="block":r.style.display="none"}return a(O,"visualizeInsetUpdated"),()=>({destroy(){e.destroy(),St(v)}})}a(Dt,"createCameraControls");function ce(i){return a(function(o){var r;let{spaces:e,objects:n}=o,s=(r=e[0])!=null?r:n[0];s&&i.Camera.focusOn(s)},"handler")}a(ce,"createHandler");C();function Pt(i,t,o){let e={markers:{},removeAllMarkers(){o.Markers.removeAll().forEach(f=>{delete this.markers[f.id]}),d()}},{addMarker:n,destroy:s}=ue(i,o);i.add(e,"removeAllMarkers");let r=i.addFolder("Marker List");i.close();let l=new Map,{rerender:d}=g();function g(){function p(b){var y;delete e.markers[b.id],(y=l.get(b.id))==null||y.destroy()}a(p,"remove");function f(b){let y=he(o,b,r,{onRemove:v=>{p(v)}});if(!y)return;let{markerItemFolder:m}=y;l.set(b.id,m)}a(f,"add");function u(){r.destroy(),r=i.addFolder("marker");for(let b in e.markers){let y=e.markers[b];f(y)}}return a(u,"rerender"),{rerender:u,add:f,remove:p}}a(g,"createMarkerControls"),i.domElement.classList.add("list-items");let h;o.on("click",({markers:p,coordinate:f})=>{if(!i._closed)if(p[0]){h==null||h.close();let u=l.get(p[0].id);if(i.open(),!u)return;u==null||u.open(),u==null||u.domElement.scrollIntoView({block:"start"}),u==null||u.domElement.focus(),h=u}else n(f)});function c(p){for(let f of p)e.markers[f.id]=f;d()}return a(c,"populateMarkers"),{populateMarkers:c,destroy(){s()}}}a(Pt,"createMarkerControls");function he(i,t,o,{onRemove:e}={}){let n=o.addFolder("".concat(t.id.toString().substring(0,8)));n.onChange(d=>{i.updateState(t,{interactive:l.interactive})}),n.close();let s=i.getState(t);if((s==null?void 0:s.type)!=="marker")throw new Error("error getting state for marker: ".concat(t.id));let{interactive:r}=s;if(r==null)throw new Error("incomplte label state");let l={interactive:r,remove(){i.Markers.remove(t),e==null||e(t),n.destroy()}};return n.add(l,"interactive"),n.add(l,"remove"),{markerItemFolder:n,destroy(){n.destroy()}}}a(he,"addMarkerControlToFolder");function ue(i,t){let o=i.addFolder("Add"),e={onClick:!1,interactive:!0};return o.add(e,"onClick"),o.add(e,"interactive"),{destroy(){o.destroy()},addMarker(n){return o._closed||!e.onClick?void 0:t.Markers.add(n,"<div>New Marker</div>",{interactive:e.interactive})}}}a(ue,"createAddControl");C();function zt(i,t){let o=i.addFolder("Walls").close(),e={visible:!0,topColor:"#b1fa87",color:"#e8e8e8",texture:{url:""},topTexture:{url:""}};o.add(e,"visible").onChange(r=>{t.updateState("walls",{visible:r})}),o.addColor(e,"topColor").onChange(r=>{t.updateState("walls",{topColor:r})}),o.addColor(e,"color").onChange(r=>{t.updateState("walls",{color:r})}),o.addFolder("Texture - side").add(e.texture,"url").onFinishChange(r=>{t.updateState("walls",{texture:{url:r}})}),o.addFolder("Texture - top").add(e.topTexture,"url").onFinishChange(r=>{t.updateState("walls",{topTexture:{url:r}})}),t.updateState("walls",{topColor:e.topColor}),t.updateState("walls",{color:e.color})}a(zt,"createGeometryControl");C();function Gt(i,t,o){var s,r;i.close();let e={language:(r=(s=o.currentLanguage)==null?void 0:s.code)!=null?r:"en"},n=o.getByType("enterprise-venue");i.add(e,"language",n==null?void 0:n.languages.map(l=>l.code)).onChange(l=>{o.changeLanguage(l)})}a(Gt,"createMiscControl");C();function Ut(i,t,o){let e=i.addFolder("Debug");e.close();let n={showPolygonLabelTextAreaMesh:!1};e.add(n,"showPolygonLabelTextAreaMesh").onChange(s=>{t.Debug.update({showPolygonLabelTextAreaMesh:s})}).name("Show Flat Label Text Area Mesh"),t.Debug.update(n)}a(Ut,"createDebugControl");C();function Bt(i,t,o){let e=i.addFolder("Text3D").close(),n={all:()=>{t.Text3D.labelAll()},removeAll:()=>{t.Text3D.removeAll()}};e.add(n,"all").name("Show All"),e.add(n,"removeAll").name("Remove All")}a(Bt,"createText3DControl");C();C();C();var F,Y,$,k,I,V,Ht,N,vt,tt,jt,yt=class yt{constructor(t=new z({autoPlace:!0})){S(this,V);S(this,N);S(this,tt);S(this,F,void 0);S(this,Y,[]);S(this,$,{});S(this,k,{});S(this,I,{});kt(this,F,t),x(this,F).domElement.style.left="0"}add(t,o,e){if(x(this,k)[t])throw new Error("Control ".concat(t," already exists"));x(this,$)[t]=o,x(this,I)[t]=o.default,G(this,V,Ht).call(this,t,o,e),this.show()}addColor(t,o,e){if(x(this,k)[t])throw new Error("Control ".concat(t," already exists"));x(this,$)[t]=o,x(this,I)[t]=o.default,G(this,tt,jt).call(this,t,o,e),this.show()}update(t,o){if(!x(this,k)[t])throw new Error("Control ".concat(t," does not exist"));x(this,k)[t].setValue(o),x(this,$)[t].onChange&&x(this,$)[t].onChange(o,t)}replace(t,o,e){if(!x(this,k)[t]){this.add(t,o,e);return}o.args&&x(this,k)[t].options(o.args),o.default&&x(this,k)[t].setValue(o.default),o.onChange&&x(this,k)[t].onChange(n=>{o.onChange(n,t)})}remove(t){if(!x(this,k)[t])throw new Error("Control ".concat(t," does not exist"));x(this,k)[t].destroy(),x(this,k)[t].parent.children.length===0&&x(this,k)[t].parent.hide(),delete x(this,k)[t],delete x(this,$)[t],delete x(this,I)[t]}show(){x(this,F).show()}hide(){x(this,F).hide()}removeAll(){for(let t in x(this,k))this.remove(t)}destroy(){x(this,F).destroy()}};F=new WeakMap,Y=new WeakMap,$=new WeakMap,k=new WeakMap,I=new WeakMap,V=new WeakSet,Ht=a(function(t,o,e){let s=G(this,N,vt).call(this,e).add(x(this,I),t,o.args,o.max,o.step);o.onChange&&s.onChange(r=>{o.onChange(r,t)}),o.onAdd&&o.onAdd(o.default,t),x(this,k)[t]=s},"#addControl"),N=new WeakSet,vt=a(function(t){if(!t)return x(this,F);let o=x(this,Y).find(e=>e._title===t);return o?(o.show(),o):(o=x(this,F).addFolder(t),x(this,Y).push(o),o)},"#getFolder"),tt=new WeakSet,jt=a(function(t,o,e){let s=G(this,N,vt).call(this,e).addColor(x(this,I),t);o.onChange&&s.onChange(r=>{o.onChange(r,t)}),x(this,k)[t]=s},"#addColorControl"),a(yt,"GUI");var bt=yt;function pe(i,t,o){var l;let e={},n=i.getByType("floor"),s=i.getByType("floor-stack");s.length>1&&(e.FloorStack={default:t.currentFloorStack.id,args:s.reduce((d,{id:g,name:h})=>({...d,[h]:g}),{}),onChange:d=>{d!==t.currentFloorStack.id&&(t.setFloorStack(d),o.replace("Floor",{default:t.currentFloor.id,args:t.currentFloorStack.floors.reduce((g,{id:h,name:c})=>({...g,[c]:h}),{})}))}}),n.length>1&&(e.Floor={default:t.currentFloor.id,args:t.currentFloorStack.floors.reduce((d,{id:g,name:h})=>({...d,[h]:g}),{}),onChange:d=>{d!==t.currentFloor.id&&t.setFloor(d)},onAdd:()=>{t.on("floor-change",d=>{d!=null&&d.floor.id&&(o.replace("FloorStack",{default:t.currentFloorStack.id}),o.replace("Floor",{default:t.currentFloor.id,args:t.currentFloorStack.floors.reduce((h,{id:c,name:p})=>({...h,[p]:c}),{})}))})}});let r=i.getByType("enterprise-venue");return r&&r.languages.length>1&&(e.Language={default:((l=i.currentLanguage)==null?void 0:l.code)||r.languages[0].code,args:r.languages.reduce((d,{code:g,name:h})=>({...d,[h]:g}),{}),onChange:d=>{i.changeLanguage(d)}}),e}a(pe,"createDefaultControls");function Yt(i,t,o=new z){let e=new bt(o),n=pe(i,t,e);Object.keys(n).length||e.hide();for(let s in n)e.add(s,n[s]);return e}a(Yt,"createGUI");async function Nt(i,t,{initialfloorsInStack:o,root:e,floorsInDirections:n,showLabelsPerFloor:s=!0}){async function r(u){i.StackedMaps.changeFloorOnElevationChanges(!1),i.Outdoor.setOpacity(.15),i.StackedMaps.setFloorVisiblityMode("only-current-floor"),i.Camera.setPanMode("default"),await i.Camera.focusOn(u,{pitch:10})}a(r,"zoomToFloor");async function l(){i.Outdoor.setOpacity(.25),i.StackedMaps.changeFloorOnElevationChanges(!0),i.Camera.setPanMode("elevation"),i.StackedMaps.setFloorVisiblityMode("all-floors"),await i.Camera.focusOn(i.currentFloor,{axisAlignedPadding:{vertical:d},pitch:90})}a(l,"showCurrentFloorWithPadding");let d=50;async function g(u){await i.Camera.animateElevation(u.elevation*d)}a(g,"scrollToFloor");let h=i.currentFloor;i.on("floor-change",async u=>{i.StackedMaps.expanded&&u.reason!=="stacked-maps-elevation-change"&&(i.StackedMaps.changeFloorOnElevationChanges(!1),i.StackedMaps.setFloorVisiblityMode("all-floors"),await i.Camera.focusOn(h,{axisAlignedPadding:{vertical:d},pitch:90,duration:500}),i.StackedMaps.changeFloorOnElevationChanges(!0),await g(i.currentFloor),await r(i.currentFloor),i.StackedMaps.setFloorVisiblityMode("only-current-floor")),h=i.currentFloor}),i.on("stacked-maps-state-change",({state:u})=>{console.log("stacked-maps-state-change",u)});let c=t.getByType("space");if(s){let u=c.reduce((b,y)=>(b.has(y.floor)||b.set(y.floor,[]),y.name&&y.name!==""&&b.get(y.floor).push(i.Labels.add(y,y.name)),b),new Map);i.on("floor-change",()=>{u.forEach((b,y)=>{b.forEach(m=>{i.updateState(m,{enabled:i.currentFloor===y})})})})}let p=Yt(t,i,e),f=o!=null?o:[];return p.add("Expand - All",{default:async()=>{i.Outdoor.setOpacity(.25),f=t.getByType("floor"),await i.Camera.animateTo({pitch:90}),await i.StackedMaps.collapse(),await i.StackedMaps.expand({distanceBetweenFloors:d})}},"Stack Maps"),n&&p.add("Expand - Only Navigation",{default:async()=>{i.Outdoor.setOpacity(.25),f=n,await i.StackedMaps.collapse(),i.setFloor(n[0]),await i.StackedMaps.expand({includedFloors:n,distanceBetweenFloors:20})}},"Stack Maps"),p.add("Show All Floors",{default:async()=>{f=t.getByType("floor"),i.Outdoor.setOpacity(.25),i.StackedMaps.setFloorVisiblityMode("all-floors"),i.StackedMaps.changeFloorOnElevationChanges(!1),i.Camera.setPanMode("elevation"),i.Camera.focusOn(f,{pitch:90})}},"Stack Maps"),p.add("Show Current Floor with padding",{default:async()=>{await l()}},"Stack Maps"),p.add("Zoom to Current Floor",{default:async()=>{r(i.currentFloor)}},"Stack Maps"),p.add("Collapse",{default:()=>{i.Outdoor.setOpacity("initial"),i.StackedMaps.collapse()}},"Stack Maps"),p.add("Default",{default:async()=>{i.Camera.setPanMode("default")}},"Camera Pan Mode"),p.add("Elevation",{default:async()=>{i.Camera.setPanMode("elevation")}},"Camera Pan Mode"),p.add("zoom in to floor 2",{default:async()=>{i.Outdoor.setOpacity(.25),console.log(i.currentFloor.name),await i.Camera.focusOn(i.currentFloor,{axisAlignedPadding:{vertical:d},pitch:90}),i.StackedMaps.expanded||await i.StackedMaps.expand({distanceBetweenFloors:d});let u=i.StackedMaps.includedFloors[2],b=f.findIndex(y=>y.id===u.id);i.StackedMaps.changeFloorOnElevationChanges(!0),i.Camera.setPanMode("elevation"),i.StackedMaps.setFloorVisiblityMode("all-floors"),await i.Camera.animateElevation(b*d),i.Outdoor.setOpacity(.15),console.log("focusing on",u.name),await i.Camera.focusOn(u,{pitch:10}),i.StackedMaps.setFloorVisiblityMode("only-current-floor"),i.Camera.setPanMode("default"),i.StackedMaps.changeFloorOnElevationChanges(!1)}},"Camera Pan Mode"),p.add("All Floors",{default:async()=>{i.StackedMaps.setFloorVisiblityMode("all-floors")}},"Visibility Mode"),p.add("Only Active Floor",{default:async()=>{i.StackedMaps.setFloorVisiblityMode("only-current-floor")}},"Visibility Mode"),p.add("Up",{default:async()=>{let u=f.find(b=>b.elevation===i.currentFloor.elevation+1);u&&await g(u)}},"Floors Up/Down"),p.add("Down",{default:async()=>{let u=f.find(b=>b.elevation===i.currentFloor.elevation-1);u&&await g(u)}},"Floors Up/Down"),{zoomToFloor:r}}a(Nt,"createStackMapsControl");function Rt(i,t,o){let e=i.addFolder("StackedMaps");e.close(),Nt(t,o,{root:e,showLabelsPerFloor:!1})}a(Rt,"createStackmapsControl");function Wt(i,t,o){ge();let e=new K({title:"SDK Controls"});e.domElement.classList.add("mappedin-js-inspector"),$t(t,i,e),Dt(e,t,o==null?void 0:o.camera);let n=e.addFolder("Levels").close(),s=e.addFolder("Scene Controls");s.close();let r=e.addFolder("Labels");Bt(e,t,i);let l=e.addFolder("Markers");zt(e,t),Rt(e,t,i);let d=e.addFolder("misc");Ut(e,t,i),Gt(d,t,i);let g={level:t.currentFloor.id},{populatelabels:h}=It(r,i,t),{populateMarkers:c}=Pt(l,i,t),p=i.getByType("floor").reduce((u,b)=>(u[b.name]=b.id,u),{}),f=n.add(g,"level",p).onChange(u=>{t.setFloor(u),g.level=t.currentFloor.id,f.updateDisplay()});return t.on("floor-change-start",u=>{n.controllers[0].setValue(u.floor.id)}),i.getByType("space").forEach(u=>{t.updateState(u,{interactive:!0})}),i.getByType("object").forEach(u=>{t.updateState(u,{interactive:!0})}),i.getByType("object").forEach(u=>{t.updateState(u,{interactive:!0})}),t.setHoverColor("#a2b7e6"),t.Camera.setMaxZoomLevel(20),{populatelabels:h,sceneFolder:s,populateMarkers:c}}a(Wt,"createUi");var Jt="mappedin-sdk-debug-css";function ge(){if(document.getElementById(Jt))return;let i=document.createElement("style");i.id=Jt,i.textContent=Ot,document.head.appendChild(i)}a(ge,"injectCss");var xt=class xt{constructor(t,o){T(this,"_enabled",!1);T(this,"mv");T(this,"api");T(this,"mapData");T(this,"scenegraphVisualizerMounted",!1);T(this,"storeStateToLocalStorageEnabled",!1);this.mv=t,this.api=o,this.mapData=this.api.getMapData()}setMapData(t){this.mapData=t}async enable(t={}){var e;if(this._enabled)return;if(this._enabled=!0,!this.mapData)throw new Error("Please set mapData before enable debug.");let{sceneFolder:o}=Wt(this.mapData,this.mv,t);o.onOpenClose(n=>{n===o&&!n._closed&&!this.scenegraphVisualizerMounted&&(this.scenegraphVisualizerMounted=!0,_t(this.api.core,o))}),(e=this.api.getMapDataInternal())==null||e.spaces.forEach(n=>{this.mv.updateState(n.id,{interactive:!0})})}get enabled(){return this._enabled}};a(xt,"Inspector");var Ct=xt;export{Ct as Inspector};