@mappedin/react-sdk 6.0.1-beta.17 → 6.0.1-beta.19

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 +1 @@
1
- import{c as I,e as ce,g as H,i as M,j as P,m as ue}from"./chunk-TTBNS32H.js";import"./chunk-KUVUAM5C.js";import"./chunk-S5HIMMDM.js";import{J as he}from"./chunk-5T2PAGNC.js";import{a as d,e as L,j as C}from"./chunk-OANQFXHV.js";C();C();C();C();var S=class S{constructor(e,i,t,o,l="div"){this.parent=e,this.object=i,this.property=t,this._disabled=!1,this._hidden=!1,this.initialValue=this.getValue(),this.domElement=document.createElement(l),this.domElement.classList.add("controller"),this.domElement.classList.add(o),this.$name=document.createElement("div"),this.$name.classList.add("name"),S.nextNameID=S.nextNameID||0,this.$name.id="lil-gui-name-".concat(++S.nextNameID),this.$widget=document.createElement("div"),this.$widget.classList.add("widget"),this.$disable=this.$widget,this.domElement.appendChild(this.$name),this.domElement.appendChild(this.$widget),this.domElement.addEventListener("keydown",r=>r.stopPropagation()),this.domElement.addEventListener("keyup",r=>r.stopPropagation()),this.parent.children.push(this),this.parent.controllers.push(this),this.parent.$children.appendChild(this.domElement),this._listenCallback=this._listenCallback.bind(this),this.name(t)}name(e){return this._name=e,this.$name.textContent=e,this}onChange(e){return this._onChange=e,this}_callOnChange(){this.parent._callOnChange(this),this._onChange!==void 0&&this._onChange.call(this,this.getValue()),this._changed=!0}onFinishChange(e){return this._onFinishChange=e,this}_callOnFinishChange(){this._changed&&(this.parent._callOnFinishChange(this),this._onFinishChange!==void 0&&this._onFinishChange.call(this,this.getValue())),this._changed=!1}reset(){return this.setValue(this.initialValue),this._callOnFinishChange(),this}enable(e=!0){return this.disable(!e)}disable(e=!0){return e===this._disabled?this:(this._disabled=e,this.domElement.classList.toggle("disabled",e),this.$disable.toggleAttribute("disabled",e),this)}show(e=!0){return this._hidden=!e,this.domElement.style.display=this._hidden?"none":"",this}hide(){return this.show(!1)}options(e){let i=this.parent.add(this.object,this.property,e);return i.name(this._name),this.destroy(),i}min(e){return this}max(e){return this}step(e){return this}decimals(e){return this}listen(e=!0){return this._listening=e,this._listenCallbackID!==void 0&&(cancelAnimationFrame(this._listenCallbackID),this._listenCallbackID=void 0),this._listening&&this._listenCallback(),this}_listenCallback(){this._listenCallbackID=requestAnimationFrame(this._listenCallback);let e=this.save();e!==this._listenPrevValue&&this.updateDisplay(),this._listenPrevValue=e}getValue(){return this.object[this.property]}setValue(e){return this.getValue()!==e&&(this.object[this.property]=e,this._callOnChange(),this.updateDisplay()),this}updateDisplay(){return this}load(e){return this.setValue(e),this._callOnFinishChange(),this}save(){return this.getValue()}destroy(){this.listen(!1),this.parent.children.splice(this.parent.children.indexOf(this),1),this.parent.controllers.splice(this.parent.controllers.indexOf(this),1),this.parent.$children.removeChild(this.domElement)}};d(S,"Controller");var k=S,K=class K extends k{constructor(e,i,t){super(e,i,t,"boolean","label"),this.$input=document.createElement("input"),this.$input.setAttribute("type","checkbox"),this.$input.setAttribute("aria-labelledby",this.$name.id),this.$widget.appendChild(this.$input),this.$input.addEventListener("change",()=>{this.setValue(this.$input.checked),this._callOnFinishChange()}),this.$disable=this.$input,this.updateDisplay()}updateDisplay(){return this.$input.checked=this.getValue(),this}};d(K,"BooleanController");var V=K;function Y(n){let e,i;return(e=n.match(/(#|0x)?([a-f0-9]{6})/i))?i=e[2]:(e=n.match(/rgb\(\s*(\d*)\s*,\s*(\d*)\s*,\s*(\d*)\s*\)/))?i=parseInt(e[1]).toString(16).padStart(2,0)+parseInt(e[2]).toString(16).padStart(2,0)+parseInt(e[3]).toString(16).padStart(2,0):(e=n.match(/^#?([a-f0-9])([a-f0-9])([a-f0-9])$/i))&&(i=e[1]+e[1]+e[2]+e[2]+e[3]+e[3]),i?"#"+i:!1}d(Y,"normalizeColorString");var ke={isPrimitive:!0,match:n=>typeof n=="string",fromHexString:Y,toHexString:Y},T={isPrimitive:!0,match:n=>typeof n=="number",fromHexString:n=>parseInt(n.substring(1),16),toHexString:n=>"#"+n.toString(16).padStart(6,0)},$e={isPrimitive:!1,match:n=>Array.isArray(n),fromHexString(n,e,i=1){let t=T.fromHexString(n);e[0]=(t>>16&255)/255*i,e[1]=(t>>8&255)/255*i,e[2]=(t&255)/255*i},toHexString([n,e,i],t=1){t=255/t;let o=n*t<<16^e*t<<8^i*t<<0;return T.toHexString(o)}},Le={isPrimitive:!1,match:n=>Object(n)===n,fromHexString(n,e,i=1){let t=T.fromHexString(n);e.r=(t>>16&255)/255*i,e.g=(t>>8&255)/255*i,e.b=(t&255)/255*i},toHexString({r:n,g:e,b:i},t=1){t=255/t;let o=n*t<<16^e*t<<8^i*t<<0;return T.toHexString(o)}},Me=[ke,T,$e,Le];function Se(n){return Me.find(e=>e.match(n))}d(Se,"getColorFormat");var Z=class Z extends k{constructor(e,i,t,o){super(e,i,t,"color"),this.$input=document.createElement("input"),this.$input.setAttribute("type","color"),this.$input.setAttribute("tabindex",-1),this.$input.setAttribute("aria-labelledby",this.$name.id),this.$text=document.createElement("input"),this.$text.setAttribute("type","text"),this.$text.setAttribute("spellcheck","false"),this.$text.setAttribute("aria-labelledby",this.$name.id),this.$display=document.createElement("div"),this.$display.classList.add("display"),this.$display.appendChild(this.$input),this.$widget.appendChild(this.$display),this.$widget.appendChild(this.$text),this._format=Se(this.initialValue),this._rgbScale=o,this._initialValueHexString=this.save(),this._textFocused=!1,this.$input.addEventListener("input",()=>{this._setValueFromHexString(this.$input.value)}),this.$input.addEventListener("blur",()=>{this._callOnFinishChange()}),this.$text.addEventListener("input",()=>{let l=Y(this.$text.value);l&&this._setValueFromHexString(l)}),this.$text.addEventListener("focus",()=>{this._textFocused=!0,this.$text.select()}),this.$text.addEventListener("blur",()=>{this._textFocused=!1,this.updateDisplay(),this._callOnFinishChange()}),this.$disable=this.$text,this.updateDisplay()}reset(){return this._setValueFromHexString(this._initialValueHexString),this}_setValueFromHexString(e){if(this._format.isPrimitive){let i=this._format.fromHexString(e);this.setValue(i)}else this._format.fromHexString(e,this.getValue(),this._rgbScale),this._callOnChange(),this.updateDisplay()}save(){return this._format.toHexString(this.getValue(),this._rgbScale)}load(e){return this._setValueFromHexString(e),this._callOnFinishChange(),this}updateDisplay(){return this.$input.value=this._format.toHexString(this.getValue(),this._rgbScale),this._textFocused||(this.$text.value=this.$input.value.substring(1)),this.$display.style.backgroundColor=this.$input.value,this}};d(Z,"ColorController");var N=Z,Q=class Q extends k{constructor(e,i,t){super(e,i,t,"function"),this.$button=document.createElement("button"),this.$button.appendChild(this.$name),this.$widget.appendChild(this.$button),this.$button.addEventListener("click",o=>{o.preventDefault(),this.getValue().call(this.object),this._callOnChange()}),this.$button.addEventListener("touchstart",()=>{},{passive:!0}),this.$disable=this.$button}};d(Q,"FunctionController");var D=Q,q=class q extends k{constructor(e,i,t,o,l,r){super(e,i,t,"number"),this._initInput(),this.min(o),this.max(l);let s=r!==void 0;this.step(s?r:this._getImplicitStep(),s),this.updateDisplay()}decimals(e){return this._decimals=e,this.updateDisplay(),this}min(e){return this._min=e,this._onUpdateMinMax(),this}max(e){return this._max=e,this._onUpdateMinMax(),this}step(e,i=!0){return this._step=e,this._stepExplicit=i,this}updateDisplay(){let e=this.getValue();if(this._hasSlider){let i=(e-this._min)/(this._max-this._min);i=Math.max(0,Math.min(i,1)),this.$fill.style.width=i*100+"%"}return this._inputFocused||(this.$input.value=this._decimals===void 0?e:e.toFixed(this._decimals)),this}_initInput(){this.$input=document.createElement("input"),this.$input.setAttribute("type","text"),this.$input.setAttribute("aria-labelledby",this.$name.id),window.matchMedia("(pointer: coarse)").matches&&(this.$input.setAttribute("type","number"),this.$input.setAttribute("step","any")),this.$widget.appendChild(this.$input),this.$disable=this.$input;let i=d(()=>{let v=parseFloat(this.$input.value);isNaN(v)||(this._stepExplicit&&(v=this._snap(v)),this.setValue(this._clamp(v)))},"onInput"),t=d(v=>{let A=parseFloat(this.$input.value);isNaN(A)||(this._snapClampSetValue(A+v),this.$input.value=this.getValue())},"increment"),o=d(v=>{v.key==="Enter"&&this.$input.blur(),v.code==="ArrowUp"&&(v.preventDefault(),t(this._step*this._arrowKeyMultiplier(v))),v.code==="ArrowDown"&&(v.preventDefault(),t(this._step*this._arrowKeyMultiplier(v)*-1))},"onKeyDown"),l=d(v=>{this._inputFocused&&(v.preventDefault(),t(this._step*this._normalizeMouseWheel(v)))},"onWheel"),r=!1,s,c,p,h,a,g=5,f=d(v=>{s=v.clientX,c=p=v.clientY,r=!0,h=this.getValue(),a=0,window.addEventListener("mousemove",u),window.addEventListener("mouseup",b)},"onMouseDown"),u=d(v=>{if(r){let A=v.clientX-s,$=v.clientY-c;Math.abs($)>g?(v.preventDefault(),this.$input.blur(),r=!1,this._setDraggingStyle(!0,"vertical")):Math.abs(A)>g&&b()}if(!r){let A=v.clientY-p;a-=A*this._step*this._arrowKeyMultiplier(v),h+a>this._max?a=this._max-h:h+a<this._min&&(a=this._min-h),this._snapClampSetValue(h+a)}p=v.clientY},"onMouseMove"),b=d(()=>{this._setDraggingStyle(!1,"vertical"),this._callOnFinishChange(),window.removeEventListener("mousemove",u),window.removeEventListener("mouseup",b)},"onMouseUp"),y=d(()=>{this._inputFocused=!0},"onFocus"),m=d(()=>{this._inputFocused=!1,this.updateDisplay(),this._callOnFinishChange()},"onBlur");this.$input.addEventListener("input",i),this.$input.addEventListener("keydown",o),this.$input.addEventListener("wheel",l,{passive:!1}),this.$input.addEventListener("mousedown",f),this.$input.addEventListener("focus",y),this.$input.addEventListener("blur",m)}_initSlider(){this._hasSlider=!0,this.$slider=document.createElement("div"),this.$slider.classList.add("slider"),this.$fill=document.createElement("div"),this.$fill.classList.add("fill"),this.$slider.appendChild(this.$fill),this.$widget.insertBefore(this.$slider,this.$input),this.domElement.classList.add("hasSlider");let e=d((m,v,A,$,z)=>(m-v)/(A-v)*(z-$)+$,"map"),i=d(m=>{let v=this.$slider.getBoundingClientRect(),A=e(m,v.left,v.right,this._min,this._max);this._snapClampSetValue(A)},"setValueFromX"),t=d(m=>{this._setDraggingStyle(!0),i(m.clientX),window.addEventListener("mousemove",o),window.addEventListener("mouseup",l)},"mouseDown"),o=d(m=>{i(m.clientX)},"mouseMove"),l=d(()=>{this._callOnFinishChange(),this._setDraggingStyle(!1),window.removeEventListener("mousemove",o),window.removeEventListener("mouseup",l)},"mouseUp"),r=!1,s,c,p=d(m=>{m.preventDefault(),this._setDraggingStyle(!0),i(m.touches[0].clientX),r=!1},"beginTouchDrag"),h=d(m=>{m.touches.length>1||(this._hasScrollBar?(s=m.touches[0].clientX,c=m.touches[0].clientY,r=!0):p(m),window.addEventListener("touchmove",a,{passive:!1}),window.addEventListener("touchend",g))},"onTouchStart"),a=d(m=>{if(r){let v=m.touches[0].clientX-s,A=m.touches[0].clientY-c;Math.abs(v)>Math.abs(A)?p(m):(window.removeEventListener("touchmove",a),window.removeEventListener("touchend",g))}else m.preventDefault(),i(m.touches[0].clientX)},"onTouchMove"),g=d(()=>{this._callOnFinishChange(),this._setDraggingStyle(!1),window.removeEventListener("touchmove",a),window.removeEventListener("touchend",g)},"onTouchEnd"),f=this._callOnFinishChange.bind(this),u=400,b,y=d(m=>{if(Math.abs(m.deltaX)<Math.abs(m.deltaY)&&this._hasScrollBar)return;m.preventDefault();let A=this._normalizeMouseWheel(m)*this._step;this._snapClampSetValue(this.getValue()+A),this.$input.value=this.getValue(),clearTimeout(b),b=setTimeout(f,u)},"onWheel");this.$slider.addEventListener("mousedown",t),this.$slider.addEventListener("touchstart",h,{passive:!1}),this.$slider.addEventListener("wheel",y,{passive:!1})}_setDraggingStyle(e,i="horizontal"){this.$slider&&this.$slider.classList.toggle("active",e),document.body.classList.toggle("lil-gui-dragging",e),document.body.classList.toggle("lil-gui-".concat(i),e)}_getImplicitStep(){return this._hasMin&&this._hasMax?(this._max-this._min)/1e3:.1}_onUpdateMinMax(){!this._hasSlider&&this._hasMin&&this._hasMax&&(this._stepExplicit||this.step(this._getImplicitStep(),!1),this._initSlider(),this.updateDisplay())}_normalizeMouseWheel(e){let{deltaX:i,deltaY:t}=e;return Math.floor(e.deltaY)!==e.deltaY&&e.wheelDelta&&(i=0,t=-e.wheelDelta/120,t*=this._stepExplicit?1:10),i+-t}_arrowKeyMultiplier(e){let i=this._stepExplicit?1:10;return e.shiftKey?i*=10:e.altKey&&(i/=10),i}_snap(e){let i=Math.round(e/this._step)*this._step;return parseFloat(i.toPrecision(15))}_clamp(e){return e<this._min&&(e=this._min),e>this._max&&(e=this._max),e}_snapClampSetValue(e){this.setValue(this._clamp(this._snap(e)))}get _hasScrollBar(){let e=this.parent.root.$children;return e.scrollHeight>e.clientHeight}get _hasMin(){return this._min!==void 0}get _hasMax(){return this._max!==void 0}};d(q,"NumberController");var R=q,ee=class ee extends k{constructor(e,i,t,o){super(e,i,t,"option"),this.$select=document.createElement("select"),this.$select.setAttribute("aria-labelledby",this.$name.id),this.$display=document.createElement("div"),this.$display.classList.add("display"),this.$select.addEventListener("change",()=>{this.setValue(this._values[this.$select.selectedIndex]),this._callOnFinishChange()}),this.$select.addEventListener("focus",()=>{this.$display.classList.add("focus")}),this.$select.addEventListener("blur",()=>{this.$display.classList.remove("focus")}),this.$widget.appendChild(this.$select),this.$widget.appendChild(this.$display),this.$disable=this.$select,this.options(o)}options(e){return this._values=Array.isArray(e)?e:Object.values(e),this._names=Array.isArray(e)?e:Object.keys(e),this.$select.replaceChildren(),this._names.forEach(i=>{let t=document.createElement("option");t.textContent=i,this.$select.appendChild(t)}),this.updateDisplay(),this}updateDisplay(){let e=this.getValue(),i=this._values.indexOf(e);return this.$select.selectedIndex=i,this.$display.textContent=i===-1?e:this._names[i],this}};d(ee,"OptionController");var J=ee,te=class te extends k{constructor(e,i,t){super(e,i,t,"string"),this.$input=document.createElement("input"),this.$input.setAttribute("type","text"),this.$input.setAttribute("spellcheck","false"),this.$input.setAttribute("aria-labelledby",this.$name.id),this.$input.addEventListener("input",()=>{this.setValue(this.$input.value)}),this.$input.addEventListener("keydown",o=>{o.code==="Enter"&&this.$input.blur()}),this.$input.addEventListener("blur",()=>{this._callOnFinishChange()}),this.$widget.appendChild(this.$input),this.$disable=this.$input,this.updateDisplay()}updateDisplay(){return this.$input.value=this.getValue(),this}};d(te,"StringController");var W=te,Fe='.lil-gui {\n font-family: var(--font-family);\n font-size: var(--font-size);\n line-height: 1;\n font-weight: normal;\n font-style: normal;\n text-align: left;\n color: var(--text-color);\n user-select: none;\n -webkit-user-select: none;\n touch-action: manipulation;\n --background-color: #1f1f1f;\n --text-color: #ebebeb;\n --title-background-color: #111111;\n --title-text-color: #ebebeb;\n --widget-color: #424242;\n --hover-color: #4f4f4f;\n --focus-color: #595959;\n --number-color: #2cc9ff;\n --string-color: #a2db3c;\n --font-size: 11px;\n --input-font-size: 11px;\n --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;\n --font-family-mono: Menlo, Monaco, Consolas, "Droid Sans Mono", monospace;\n --padding: 4px;\n --spacing: 4px;\n --widget-height: 20px;\n --title-height: calc(var(--widget-height) + var(--spacing) * 1.25);\n --name-width: 45%;\n --slider-knob-width: 2px;\n --slider-input-width: 27%;\n --color-input-width: 27%;\n --slider-input-min-width: 45px;\n --color-input-min-width: 45px;\n --folder-indent: 7px;\n --widget-padding: 0 0 0 3px;\n --widget-border-radius: 2px;\n --checkbox-size: calc(0.75 * var(--widget-height));\n --scrollbar-width: 5px;\n}\n.lil-gui, .lil-gui * {\n box-sizing: border-box;\n margin: 0;\n padding: 0;\n}\n.lil-gui.root {\n width: var(--width, 245px);\n display: flex;\n flex-direction: column;\n background: var(--background-color);\n}\n.lil-gui.root > .title {\n background: var(--title-background-color);\n color: var(--title-text-color);\n}\n.lil-gui.root > .children {\n overflow-x: hidden;\n overflow-y: auto;\n}\n.lil-gui.root > .children::-webkit-scrollbar {\n width: var(--scrollbar-width);\n height: var(--scrollbar-width);\n background: var(--background-color);\n}\n.lil-gui.root > .children::-webkit-scrollbar-thumb {\n border-radius: var(--scrollbar-width);\n background: var(--focus-color);\n}\n@media (pointer: coarse) {\n .lil-gui.allow-touch-styles, .lil-gui.allow-touch-styles .lil-gui {\n --widget-height: 28px;\n --padding: 6px;\n --spacing: 6px;\n --font-size: 13px;\n --input-font-size: 16px;\n --folder-indent: 10px;\n --scrollbar-width: 7px;\n --slider-input-min-width: 50px;\n --color-input-min-width: 65px;\n }\n}\n.lil-gui.force-touch-styles, .lil-gui.force-touch-styles .lil-gui {\n --widget-height: 28px;\n --padding: 6px;\n --spacing: 6px;\n --font-size: 13px;\n --input-font-size: 16px;\n --folder-indent: 10px;\n --scrollbar-width: 7px;\n --slider-input-min-width: 50px;\n --color-input-min-width: 65px;\n}\n.lil-gui.autoPlace {\n max-height: 100%;\n position: fixed;\n top: 0;\n right: 15px;\n z-index: 1001;\n}\n\n.lil-gui .controller {\n display: flex;\n align-items: center;\n padding: 0 var(--padding);\n margin: var(--spacing) 0;\n}\n.lil-gui .controller.disabled {\n opacity: 0.5;\n}\n.lil-gui .controller.disabled, .lil-gui .controller.disabled * {\n pointer-events: none !important;\n}\n.lil-gui .controller > .name {\n min-width: var(--name-width);\n flex-shrink: 0;\n white-space: pre;\n padding-right: var(--spacing);\n line-height: var(--widget-height);\n}\n.lil-gui .controller .widget {\n position: relative;\n display: flex;\n align-items: center;\n width: 100%;\n min-height: var(--widget-height);\n}\n.lil-gui .controller.string input {\n color: var(--string-color);\n}\n.lil-gui .controller.boolean {\n cursor: pointer;\n}\n.lil-gui .controller.color .display {\n width: 100%;\n height: var(--widget-height);\n border-radius: var(--widget-border-radius);\n position: relative;\n}\n@media (hover: hover) {\n .lil-gui .controller.color .display:hover:before {\n content: " ";\n display: block;\n position: absolute;\n border-radius: var(--widget-border-radius);\n border: 1px solid #fff9;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n }\n}\n.lil-gui .controller.color input[type=color] {\n opacity: 0;\n width: 100%;\n height: 100%;\n cursor: pointer;\n}\n.lil-gui .controller.color input[type=text] {\n margin-left: var(--spacing);\n font-family: var(--font-family-mono);\n min-width: var(--color-input-min-width);\n width: var(--color-input-width);\n flex-shrink: 0;\n}\n.lil-gui .controller.option select {\n opacity: 0;\n position: absolute;\n width: 100%;\n max-width: 100%;\n}\n.lil-gui .controller.option .display {\n position: relative;\n pointer-events: none;\n border-radius: var(--widget-border-radius);\n height: var(--widget-height);\n line-height: var(--widget-height);\n max-width: 100%;\n overflow: hidden;\n word-break: break-all;\n padding-left: 0.55em;\n padding-right: 1.75em;\n background: var(--widget-color);\n}\n@media (hover: hover) {\n .lil-gui .controller.option .display.focus {\n background: var(--focus-color);\n }\n}\n.lil-gui .controller.option .display.active {\n background: var(--focus-color);\n}\n.lil-gui .controller.option .display:after {\n font-family: "lil-gui";\n content: "\u2195";\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n padding-right: 0.375em;\n}\n.lil-gui .controller.option .widget,\n.lil-gui .controller.option select {\n cursor: pointer;\n}\n@media (hover: hover) {\n .lil-gui .controller.option .widget:hover .display {\n background: var(--hover-color);\n }\n}\n.lil-gui .controller.number input {\n color: var(--number-color);\n}\n.lil-gui .controller.number.hasSlider input {\n margin-left: var(--spacing);\n width: var(--slider-input-width);\n min-width: var(--slider-input-min-width);\n flex-shrink: 0;\n}\n.lil-gui .controller.number .slider {\n width: 100%;\n height: var(--widget-height);\n background: var(--widget-color);\n border-radius: var(--widget-border-radius);\n padding-right: var(--slider-knob-width);\n overflow: hidden;\n cursor: ew-resize;\n touch-action: pan-y;\n}\n@media (hover: hover) {\n .lil-gui .controller.number .slider:hover {\n background: var(--hover-color);\n }\n}\n.lil-gui .controller.number .slider.active {\n background: var(--focus-color);\n}\n.lil-gui .controller.number .slider.active .fill {\n opacity: 0.95;\n}\n.lil-gui .controller.number .fill {\n height: 100%;\n border-right: var(--slider-knob-width) solid var(--number-color);\n box-sizing: content-box;\n}\n\n.lil-gui-dragging .lil-gui {\n --hover-color: var(--widget-color);\n}\n.lil-gui-dragging * {\n cursor: ew-resize !important;\n}\n\n.lil-gui-dragging.lil-gui-vertical * {\n cursor: ns-resize !important;\n}\n\n.lil-gui .title {\n height: var(--title-height);\n line-height: calc(var(--title-height) - 4px);\n font-weight: 600;\n padding: 0 var(--padding);\n -webkit-tap-highlight-color: transparent;\n cursor: pointer;\n outline: none;\n text-decoration-skip: objects;\n}\n.lil-gui .title:before {\n font-family: "lil-gui";\n content: "\u25BE";\n padding-right: 2px;\n display: inline-block;\n}\n.lil-gui .title:active {\n background: var(--title-background-color);\n opacity: 0.75;\n}\n@media (hover: hover) {\n body:not(.lil-gui-dragging) .lil-gui .title:hover {\n background: var(--title-background-color);\n opacity: 0.85;\n }\n .lil-gui .title:focus {\n text-decoration: underline var(--focus-color);\n }\n}\n.lil-gui.root > .title:focus {\n text-decoration: none !important;\n}\n.lil-gui.closed > .title:before {\n content: "\u25B8";\n}\n.lil-gui.closed > .children {\n transform: translateY(-7px);\n opacity: 0;\n}\n.lil-gui.closed:not(.transition) > .children {\n display: none;\n}\n.lil-gui.transition > .children {\n transition-duration: 300ms;\n transition-property: height, opacity, transform;\n transition-timing-function: cubic-bezier(0.2, 0.6, 0.35, 1);\n overflow: hidden;\n pointer-events: none;\n}\n.lil-gui .children:empty:before {\n content: "Empty";\n padding: 0 var(--padding);\n margin: var(--spacing) 0;\n display: block;\n height: var(--widget-height);\n font-style: italic;\n line-height: var(--widget-height);\n opacity: 0.5;\n}\n.lil-gui.root > .children > .lil-gui > .title {\n border: 0 solid var(--widget-color);\n border-width: 1px 0;\n transition: border-color 300ms;\n}\n.lil-gui.root > .children > .lil-gui.closed > .title {\n border-bottom-color: transparent;\n}\n.lil-gui + .controller {\n border-top: 1px solid var(--widget-color);\n margin-top: 0;\n padding-top: var(--spacing);\n}\n.lil-gui .lil-gui .lil-gui > .title {\n border: none;\n}\n.lil-gui .lil-gui .lil-gui > .children {\n border: none;\n margin-left: var(--folder-indent);\n border-left: 2px solid var(--widget-color);\n}\n.lil-gui .lil-gui .controller {\n border: none;\n}\n\n.lil-gui label, .lil-gui input, .lil-gui button {\n -webkit-tap-highlight-color: transparent;\n}\n.lil-gui input {\n border: 0;\n outline: none;\n font-family: var(--font-family);\n font-size: var(--input-font-size);\n border-radius: var(--widget-border-radius);\n height: var(--widget-height);\n background: var(--widget-color);\n color: var(--text-color);\n width: 100%;\n}\n@media (hover: hover) {\n .lil-gui input:hover {\n background: var(--hover-color);\n }\n .lil-gui input:active {\n background: var(--focus-color);\n }\n}\n.lil-gui input:disabled {\n opacity: 1;\n}\n.lil-gui input[type=text],\n.lil-gui input[type=number] {\n padding: var(--widget-padding);\n -moz-appearance: textfield;\n}\n.lil-gui input[type=text]:focus,\n.lil-gui input[type=number]:focus {\n background: var(--focus-color);\n}\n.lil-gui input[type=checkbox] {\n appearance: none;\n width: var(--checkbox-size);\n height: var(--checkbox-size);\n border-radius: var(--widget-border-radius);\n text-align: center;\n cursor: pointer;\n}\n.lil-gui input[type=checkbox]:checked:before {\n font-family: "lil-gui";\n content: "\u2713";\n font-size: var(--checkbox-size);\n line-height: var(--checkbox-size);\n}\n@media (hover: hover) {\n .lil-gui input[type=checkbox]:focus {\n box-shadow: inset 0 0 0 1px var(--focus-color);\n }\n}\n.lil-gui button {\n outline: none;\n cursor: pointer;\n font-family: var(--font-family);\n font-size: var(--font-size);\n color: var(--text-color);\n width: 100%;\n height: var(--widget-height);\n text-transform: none;\n background: var(--widget-color);\n border-radius: var(--widget-border-radius);\n border: none;\n}\n@media (hover: hover) {\n .lil-gui button:hover {\n background: var(--hover-color);\n }\n .lil-gui button:focus {\n box-shadow: inset 0 0 0 1px var(--focus-color);\n }\n}\n.lil-gui button:active {\n background: var(--focus-color);\n}\n\n@font-face {\n font-family: "lil-gui";\n src: url("data:application/font-woff;charset=utf-8;base64,d09GRgABAAAAAAUsAAsAAAAACJwAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABHU1VCAAABCAAAAH4AAADAImwmYE9TLzIAAAGIAAAAPwAAAGBKqH5SY21hcAAAAcgAAAD0AAACrukyyJBnbHlmAAACvAAAAF8AAACEIZpWH2hlYWQAAAMcAAAAJwAAADZfcj2zaGhlYQAAA0QAAAAYAAAAJAC5AHhobXR4AAADXAAAABAAAABMAZAAAGxvY2EAAANsAAAAFAAAACgCEgIybWF4cAAAA4AAAAAeAAAAIAEfABJuYW1lAAADoAAAASIAAAIK9SUU/XBvc3QAAATEAAAAZgAAAJCTcMc2eJxVjbEOgjAURU+hFRBK1dGRL+ALnAiToyMLEzFpnPz/eAshwSa97517c/MwwJmeB9kwPl+0cf5+uGPZXsqPu4nvZabcSZldZ6kfyWnomFY/eScKqZNWupKJO6kXN3K9uCVoL7iInPr1X5baXs3tjuMqCtzEuagm/AAlzQgPAAB4nGNgYRBlnMDAysDAYM/gBiT5oLQBAwuDJAMDEwMrMwNWEJDmmsJwgCFeXZghBcjlZMgFCzOiKOIFAB71Bb8AeJy1kjFuwkAQRZ+DwRAwBtNQRUGKQ8OdKCAWUhAgKLhIuAsVSpWz5Bbkj3dEgYiUIszqWdpZe+Z7/wB1oCYmIoboiwiLT2WjKl/jscrHfGg/pKdMkyklC5Zs2LEfHYpjcRoPzme9MWWmk3dWbK9ObkWkikOetJ554fWyoEsmdSlt+uR0pCJR34b6t/TVg1SY3sYvdf8vuiKrpyaDXDISiegp17p7579Gp3p++y7HPAiY9pmTibljrr85qSidtlg4+l25GLCaS8e6rRxNBmsnERunKbaOObRz7N72ju5vdAjYpBXHgJylOAVsMseDAPEP8LYoUHicY2BiAAEfhiAGJgZWBgZ7RnFRdnVJELCQlBSRlATJMoLV2DK4glSYs6ubq5vbKrJLSbGrgEmovDuDJVhe3VzcXFwNLCOILB/C4IuQ1xTn5FPilBTj5FPmBAB4WwoqAHicY2BkYGAA4sk1sR/j+W2+MnAzpDBgAyEMQUCSg4EJxAEAwUgFHgB4nGNgZGBgSGFggJMhDIwMqEAYAByHATJ4nGNgAIIUNEwmAABl3AGReJxjYAACIQYlBiMGJ3wQAEcQBEV4nGNgZGBgEGZgY2BiAAEQyQWEDAz/wXwGAAsPATIAAHicXdBNSsNAHAXwl35iA0UQXYnMShfS9GPZA7T7LgIu03SSpkwzYTIt1BN4Ak/gKTyAeCxfw39jZkjymzcvAwmAW/wgwHUEGDb36+jQQ3GXGot79L24jxCP4gHzF/EIr4jEIe7wxhOC3g2TMYy4Q7+Lu/SHuEd/ivt4wJd4wPxbPEKMX3GI5+DJFGaSn4qNzk8mcbKSR6xdXdhSzaOZJGtdapd4vVPbi6rP+cL7TGXOHtXKll4bY1Xl7EGnPtp7Xy2n00zyKLVHfkHBa4IcJ2oD3cgggWvt/V/FbDrUlEUJhTn/0azVWbNTNr0Ens8de1tceK9xZmfB1CPjOmPH4kitmvOubcNpmVTN3oFJyjzCvnmrwhJTzqzVj9jiSX911FjeAAB4nG3HMRKCMBBA0f0giiKi4DU8k0V2GWbIZDOh4PoWWvq6J5V8If9NVNQcaDhyouXMhY4rPTcG7jwYmXhKq8Wz+p762aNaeYXom2n3m2dLTVgsrCgFJ7OTmIkYbwIbC6vIB7WmFfAAAA==") format("woff");\n}';function Ie(n){let e=document.createElement("style");e.innerHTML=n;let i=document.querySelector("head link[rel=stylesheet], head style");i?document.head.insertBefore(e,i):document.head.appendChild(e)}d(Ie,"_injectStyles");var pe=!1,G=class G{constructor({parent:e,autoPlace:i=e===void 0,container:t,width:o,title:l="Controls",closeFolders:r=!1,injectStyles:s=!0,touchStyles:c=!0}={}){if(this.parent=e,this.root=e?e.root:this,this.children=[],this.controllers=[],this.folders=[],this._closed=!1,this._hidden=!1,this.domElement=document.createElement("div"),this.domElement.classList.add("lil-gui"),this.$title=document.createElement("div"),this.$title.classList.add("title"),this.$title.setAttribute("role","button"),this.$title.setAttribute("aria-expanded",!0),this.$title.setAttribute("tabindex",0),this.$title.addEventListener("click",()=>this.openAnimated(this._closed)),this.$title.addEventListener("keydown",p=>{(p.code==="Enter"||p.code==="Space")&&(p.preventDefault(),this.$title.click())}),this.$title.addEventListener("touchstart",()=>{},{passive:!0}),this.$children=document.createElement("div"),this.$children.classList.add("children"),this.domElement.appendChild(this.$title),this.domElement.appendChild(this.$children),this.title(l),this.parent){this.parent.children.push(this),this.parent.folders.push(this),this.parent.$children.appendChild(this.domElement);return}this.domElement.classList.add("root"),c&&this.domElement.classList.add("allow-touch-styles"),!pe&&s&&(Ie(Fe),pe=!0),t?t.appendChild(this.domElement):i&&(this.domElement.classList.add("autoPlace"),document.body.appendChild(this.domElement)),o&&this.domElement.style.setProperty("--width",o+"px"),this._closeFolders=r}add(e,i,t,o,l){if(Object(t)===t)return new J(this,e,i,t);let r=e[i];switch(typeof r){case"number":return new R(this,e,i,t,o,l);case"boolean":return new V(this,e,i);case"string":return new W(this,e,i);case"function":return new D(this,e,i)}console.error("gui.add failed\n property:",i,"\n object:",e,"\n value:",r)}addColor(e,i,t=1){return new N(this,e,i,t)}addFolder(e){let i=new G({parent:this,title:e});return this.root._closeFolders&&i.close(),i}load(e,i=!0){return e.controllers&&this.controllers.forEach(t=>{t instanceof D||t._name in e.controllers&&t.load(e.controllers[t._name])}),i&&e.folders&&this.folders.forEach(t=>{t._title in e.folders&&t.load(e.folders[t._title])}),this}save(e=!0){let i={controllers:{},folders:{}};return this.controllers.forEach(t=>{if(!(t instanceof D)){if(t._name in i.controllers)throw new Error('Cannot save GUI with duplicate property "'.concat(t._name,'"'));i.controllers[t._name]=t.save()}}),e&&this.folders.forEach(t=>{if(t._title in i.folders)throw new Error('Cannot save GUI with duplicate folder "'.concat(t._title,'"'));i.folders[t._title]=t.save()}),i}open(e=!0){return this._setClosed(!e),this.$title.setAttribute("aria-expanded",!this._closed),this.domElement.classList.toggle("closed",this._closed),this}close(){return this.open(!1)}_setClosed(e){this._closed!==e&&(this._closed=e,this._callOnOpenClose(this))}show(e=!0){return this._hidden=!e,this.domElement.style.display=this._hidden?"none":"",this}hide(){return this.show(!1)}openAnimated(e=!0){return this._setClosed(!e),this.$title.setAttribute("aria-expanded",!this._closed),requestAnimationFrame(()=>{let i=this.$children.clientHeight;this.$children.style.height=i+"px",this.domElement.classList.add("transition");let t=d(l=>{l.target===this.$children&&(this.$children.style.height="",this.domElement.classList.remove("transition"),this.$children.removeEventListener("transitionend",t))},"onTransitionEnd");this.$children.addEventListener("transitionend",t);let o=e?this.$children.scrollHeight:0;this.domElement.classList.toggle("closed",!e),requestAnimationFrame(()=>{this.$children.style.height=o+"px"})}),this}title(e){return this._title=e,this.$title.textContent=e,this}reset(e=!0){return(e?this.controllersRecursive():this.controllers).forEach(t=>t.reset()),this}onChange(e){return this._onChange=e,this}_callOnChange(e){this.parent&&this.parent._callOnChange(e),this._onChange!==void 0&&this._onChange.call(this,{object:e.object,property:e.property,value:e.getValue(),controller:e})}onFinishChange(e){return this._onFinishChange=e,this}_callOnFinishChange(e){this.parent&&this.parent._callOnFinishChange(e),this._onFinishChange!==void 0&&this._onFinishChange.call(this,{object:e.object,property:e.property,value:e.getValue(),controller:e})}onOpenClose(e){return this._onOpenClose=e,this}_callOnOpenClose(e){this.parent&&this.parent._callOnOpenClose(e),this._onOpenClose!==void 0&&this._onOpenClose.call(this,e)}destroy(){this.parent&&(this.parent.children.splice(this.parent.children.indexOf(this),1),this.parent.folders.splice(this.parent.folders.indexOf(this),1)),this.domElement.parentElement&&this.domElement.parentElement.removeChild(this.domElement),Array.from(this.children).forEach(e=>e.destroy())}controllersRecursive(){let e=Array.from(this.controllers);return this.folders.forEach(i=>{e=e.concat(i.controllersRecursive())}),e}foldersRecursive(){let e=Array.from(this.folders);return this.folders.forEach(i=>{e=e.concat(i.foldersRecursive())}),e}};d(G,"GUI");var X=G,B=X;C();C();var E=(()=>{let n=new he;return d(function(i){return n.set(i),"#".concat(n.getHexString())},"normalize")})();function ge(n){let e;for(e of n)e()}d(ge,"runAll");function ie(n,e){let i=window.location.href,t=new URL(i),o=new URLSearchParams(t.search);for(let l in n)if(n.hasOwnProperty(l)){let r="".concat(e,".").concat(l);o.set(r,n[l])}t.search=o.toString(),history.pushState({path:t.toString()},"",t.toString())}d(ie,"updateCurrentUrlParamsWithNamespace");function ne(n,e){let i=new URLSearchParams(window.location.search),t={};for(let[o,l]of i)if(o.startsWith("".concat(n,"."))){let r=o.slice(n.length+1);l==="true"||l==="false"?t[r]=l==="true":typeof(e==null?void 0:e[r])=="number"?t[r]=Number(l):t[r]=l}return{namespace:n,params:t}}d(ne,"getUrlParamsWithNamespace");var De=["interactive"];function U(n,e,i){var o,l;let t=i.addFolder("".concat(e.type,"-").concat(e.id));for(let r in e){if(r==="visible"&&t.add(e,r).onChange(s=>{n.updateState(e.id,{[r]:s})}),r==="color"||r==="hoverColor"){e[r]=E(e[r]),t.addColor(e,r).onChange(s=>{n.updateState(e.id,{[r]:s})});continue}if(r==="height"){t.add(e,r,0,20,1).onChange(s=>{n.updateState(e.id,{[r]:s})});continue}if(r==="texture"&&e.texture){(o=t.addFolder("Texture - side").add(e,"texture"))==null||o.onChange(c=>{n.updateState(e.id,{texture:{url:c}})});continue}if(r==="topTexture"&&e.topTexture){(l=t.addFolder("Texture - top").add(e,"topTexture"))==null||l.onChange(c=>{n.updateState(e.id,{topTexture:{url:c}})});continue}if(r==="opacity"){t.add(e,r,0,1,.1).onChange(s=>{n.updateState(e.id,{[r]:s})});continue}De.includes(r)&&t.add(e,r).onChange(s=>{n.updateState(e.id,{[r]:s})})}return e.isInView&&(t.add(e,"isInView").listen().disable(),t.add(e,"isInViewCheck")),{cleanup(){t.destroy()}}}d(U,"renderByProp");C();C();function Te(){let n=[];function e(o,l){var c;let r=Object.values(o.getMapData())[0],s=l;if(s&&H.is(s)){let p=(c=r.getByType("enterprise-location"))==null?void 0:c.find(h=>h.spaces.some(a=>a.id===s.id));p&&(s=p)}return s}d(e,"getHighlightTarget");async function i(o,l){return l instanceof P?o.Camera.focusOn(l.locations.flatMap(r=>r.spaces),O):l instanceof M?o.Camera.focusOn(l.spaces,O):o.Camera.focusOn(l,O)}d(i,"focusOn");function t(o,l,{focus:r=!1}={}){if(!window.enableHighlightCard)return()=>{};let s=e(o,l),c=document.createElement("div");if(c.style.cssText="\n position: absolute;\n top: 20px;\n left: 20px;\n background-color: rgba(30, 30, 30, 0.95);\n box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);\n border-radius: 12px;\n padding: 24px;\n max-width: 320px;\n z-index: 1000;\n font-family: 'Arial', sans-serif;\n transition: all 0.3s ease;\n color: #e0e0e0;\n ","name"in s){let h=document.createElement("h3");h.textContent=s.name,h.style.cssText="\n margin: 0 0 16px;\n font-size: 22px;\n font-weight: 600;\n color: #ffffff;\n letter-spacing: -0.5px;\n ",c.appendChild(h)}if(s instanceof M){if(s.description){let h=document.createElement("p");h.textContent=s.description,h.style.cssText="\n margin: 0 0 16px;\n font-size: 14px;\n color: #b0b0b0;\n line-height: 1.5;\n ",c.appendChild(h)}if(s.tags&&s.tags.length>0){let h=document.createElement("div");h.style.cssText="\n display: flex;\n flex-wrap: nowrap;\n gap: 8px;\n margin-bottom: 16px;\n overflow-x: hidden;\n max-height: 30px; /* Adjust this value based on your font size and padding */\n ",s.tags.forEach(a=>{let g=document.createElement("span");g.textContent=a,g.style.cssText="\n background-color: #3a3a3a;\n color: #e0e0e0;\n padding: 6px 12px;\n border-radius: 16px;\n font-size: 12px;\n font-weight: 500;\n text-transform: uppercase;\n white-space: nowrap;\n ",h.appendChild(g)}),c.appendChild(h)}}let p;if(!(l instanceof P)){let h=new B({autoPlace:!1});h.domElement.style.cssText="\n position: relative;\n overflow-y: auto;\n margin-top: 16px;\n border-top: 1px solid #444;\n padding-top: 16px;\n ";let a=o.getState(l);a&&(U(o,{id:l.id,...a},h),c.appendChild(h.domElement)),p=h}return document.body.appendChild(c),r&&i(o,s),()=>{c.style.opacity="0",c.style.transform="translateY(-10px)",setTimeout(()=>c.remove(),300),p==null||p.destroy()}}return d(t,"highlightCard"),{highlightCard:t,highlight:(o,l,{focus:r=!0}={})=>{n.length>0&&n.forEach(c=>o.Markers.remove(c));let s=e(o,l);if(s instanceof M)r&&o.Camera.focusOn(s.spaces,O),n.push(...s.spaces.map(c=>o.Markers.add(c,'<div style="padding: 15px; background-color: #ffffff; border-radius: 8px; box-shadow: 0 4px 6px rgba(0,0,0,0.1); max-width: 250px; position: relative;">\n <h3 style="margin: 0 0 10px; color: #333; font-size: 16px; font-weight: 600;">'.concat(s.name,"</h3>\n ").concat(s.description?'<p style="margin: 0 0 10px; color: #666; font-size: 14px; font-weight: 400;">'.concat(s.description,"</p>"):"","\n ").concat(s.tags?s.tags.map(p=>'<span style="display: inline-block; padding: 3px 8px; background-color: #e0f2f1; color: #00796b; border-radius: 12px; font-size: 12px;">'.concat(p,"</span>")).join(" "):"",'\n <div style="position: absolute; bottom: -10px; left: 50%; transform: translateX(-50%); width: 0; height: 0; border-left: 10px solid transparent; border-right: 10px solid transparent; border-top: 10px solid #ffffff;"></div>\n </div>'),{rank:"always-visible",anchor:"top"})));else if(s instanceof P){r&&o.Camera.focusOn(s.locations.flatMap(h=>h.spaces),O);let c=new Map,p=new Set;s.locations.forEach(h=>{c.has(h.name)||(h.spaces.forEach(a=>{n.push(o.Markers.add(a,'<div style="padding: 12px; background-color: rgba(0, 153, 51, 0.95); border-radius: 8px; box-shadow: 0 4px 8px rgba(0,0,0,0.3); transform: translateY(-4px); transition: all 0.3s ease;">\n <span style="font-weight: 600; color: #FFFFFF; font-size: 16px; text-shadow: 1px 1px 2px rgba(0,0,0,0.2);">'.concat(h.name,"</span>\n </div>"),{rank:"always-visible"}))}),c.set(h.name,!0))}),s.locations.forEach(h=>{h.coordinates.forEach(a=>{let g="".concat(a.latitude,",").concat(a.longitude);if(!p.has(g)&&!c.has(h.name)){let f=o.Markers.add(a,'<div style="padding: 10px; background-color: rgba(51, 102, 204, 0.9); border-radius: 6px; box-shadow: 0 3px 6px rgba(0,0,0,0.2);">\n <span style="font-weight: 500; color: #FFFFFF; font-size: 16px;">'.concat(h.name,'</span>\n <br>\n <span style="color: #FFFFFF; font-size: 12px; font-weight: 400;">Node</span>\n </div>'),{rank:"always-visible"});p.add(g),n.push(f)}})})}}}}d(Te,"createHighlightControl");var O={duration:300,easing:"ease-in-out"},F=Te();C();var w={search:"",results:void 0,options:{places:{fields:{name:!0,description:!0,link:!0,category:!0},limit:5},locations:{fields:{name:!0,tag:!0,description:!0},limit:5},categories:{fields:{name:!0},limit:5}}};function Oe(n){n.add(w.options.places.fields,"name").name("Places: Name"),n.add(w.options.places.fields,"description").name("Places: Description"),n.add(w.options.places.fields,"link").name("Places: Link"),n.add(w.options.places.fields,"category").name("Places: Category"),n.add(w.options.places,"limit"),n.add(w.options.locations.fields,"name").name("Locations: Name"),n.add(w.options.locations.fields,"tag").name("Locations: Tag"),n.add(w.options.locations.fields,"description").name("Locations: Description"),n.add(w.options.places,"limit"),n.add(w.options.categories.fields,"name").name("Categories: Name")}d(Oe,"createAdvancedSettings");function me(n,e,i){var h;let t=new I,o=i.addFolder("Search");o.open();let l=o.add(w,"search").onChange(async a=>{let g=await e.Search.query(a,w.options);g&&(w.results=g,s(g,t))}),r=document.createElement("div");r.style.marginLeft="10px",(h=l.domElement.parentElement)==null||h.appendChild(r);let{renderSearch:s,close:c}=ze(n,e,r,l.$input),p=o.addFolder("Advanced");return p.close(),Oe(p),document.addEventListener("keydown",a=>{(a.metaKey||a.ctrlKey)&&a.key==="k"?(a.preventDefault(),o._closed&&o.open(),l.$input.focus()):a.key==="Escape"&&(c(),t.publish("highlight",void 0))}),{pubsub:t}}d(me,"createSearchControl");function ze(n,e,i,t){let o,l;t.addEventListener("input",async s=>{s instanceof InputEvent&&(s.inputType==="insertText"||s.inputType==="insertCompositionText")&&(clearTimeout(o),o=setTimeout(async()=>{var p;let c=await e.Search.suggest(t.value);c&&c.length>0&&r((p=c[0])==null?void 0:p.suggestion)},100))});function r(s){if(!s){t.placeholder="";return}let c=t.value;t.value=s,t.setSelectionRange(c.length,s.length)}return d(r,"renderSuggestion"),{renderSearch(s,c){var p,h;if(s.places.length===0&&((p=s.enterpriseCategories)==null?void 0:p.length)===0&&((h=s.enterpriseLocations)==null?void 0:h.length)===0){i.textContent="No results found.";return}l=He(i,s,n,c)},close(){l.destroy()}}}d(ze,"mount");function He(n,e,i,t){n.innerHTML="";let o=document.createElement("div");Object.assign(o.style,j.dropdownContainer);let l=document.createElement("ul");l.className="options-list",Object.assign(l.style,j.optionsList),l.style.display="block";let r=[],s=d((g,f)=>{if(f&&f.length>0){let u=document.createElement("li");u.textContent=g,Object.assign(u.style,j.sectionHeader),l.appendChild(u),f.forEach((b,y)=>{let m=document.createElement("li");m.textContent="".concat("name"in b.item?b.item.name:""," (").concat(b.type,")"),Object.assign(m.style,j.option),m.tabIndex=0,m.addEventListener("focus",()=>{p(r.indexOf(m))}),m.addEventListener("mouseover",()=>{m.style.backgroundColor="#f0f0f0"}),m.addEventListener("mouseout",()=>{m.style.backgroundColor=""}),m.addEventListener("click",()=>{}),m.setAttribute("data-type",g),m.setAttribute("data-index",y.toString()),l.appendChild(m),r.push(m)})}},"addSection");s("enterpriseLocations",e.enterpriseLocations),s("enterpriseCategories",e.enterpriseCategories),s("Places",e.places),o.appendChild(l),n.appendChild(o);let c=[],p=d(g=>{c.forEach(m=>m()),c=[],r.forEach((m,v)=>{v===g?m.style.backgroundColor="#e0e0e0":m.style.backgroundColor=""});let f=r[g],u=f.getAttribute("data-type"),b=parseInt(f.getAttribute("data-index")||"0",10);if(!u)return;let{item:y}=e[u][b];F.highlight(i,y),t.publish("highlight",y)},"highlightOption"),h=d(g=>{!o.contains(g.target)&&g.target!==n&&a()},"handleClickOutside");document.addEventListener("click",h);let a=d(()=>{n.innerHTML="",document.removeEventListener("click",h)},"destroy");return{destroy(){n.innerHTML="",t.publish("highlight",void 0)}}}d(He,"createCustomDropdown");var j={dropdownContainer:{position:"absolute",color:"#202020"},optionsList:{display:"block",zIndex:"1002",position:"relative",maxHeight:"200px",overflowY:"auto",border:"1px solid #ccc",backgroundColor:"#fff",listStyleType:"none",margin:"0",padding:"0"},sectionHeader:{fontWeight:"bold",padding:"5px",backgroundColor:"#f0f0f0"},option:{padding:"5px",cursor:"pointer"}};function fe(n,e,i){i.domElement.id="interactionPanel";let t=[],{pubsub:o}=me(n,e,i);o.on("highlight",h=>{if(h){t.forEach(g=>g()),t=[];let a=h instanceof M?h.spaces[0]:h;if(a&&!H.is(a))return;t.push(F.highlightCard(n,a,{focus:!0}))}else t.forEach(a=>a()),t=[]});let l=i.addFolder("Click \u{1F447}").close(),{sub:r}=Pe(n,l);r.on("click",h=>{t.forEach(a=>a()),t=[],h.spaces[0]&&(t=[F.highlightCard(n,h.spaces[0])])});let s=i.addFolder("Hover \u{1F681}").close(),{sub:c}=Ge(n,s),p;c.on("hover",h=>{h.spaces[0]?(p==null||p(),t.length===0&&(p=F.highlightCard(n,h.spaces[0]))):(p==null||p(),p=void 0)})}d(fe,"createInteractionControls");function Pe(n,e){let i=new I,t={position:"",hoverColor:E(n.getHoverColor())},o=e.add(t,"position").disable(),l=[];function r(){l.forEach(c=>c()),l.length=0}d(r,"reset");let s=0;return n.on("click",c=>{var u;let{labels:p,markers:h,coordinate:a}=c;r(),i.publish("click",c),clearInterval(s),o.load(JSON.stringify([a.longitude,a.latitude]));let g=p[0]||h[0];if(g){let b=re(n,g,e);if(!b)return;l.push(b.destroy),b.labelItemFolder.openAnimated()}let f=(u=c.spaces[0])!=null?u:c.objects[0];if(f){let b={id:f.id,...n.getState(f.id),type:f.type,isInView:!1,isInViewCheck:oe(n,f.id)},{cleanup:y}=U(n,b,e);s=setInterval(()=>{b.isInView=n.isInView(g||f)},500),l.push(y)}}),{sub:i}}d(Pe,"createClickControls");function Ge(n,e){let i=new I;n.setHoverColor("#1f3a7a");let t={position:"",hoverColor:E(n.getHoverColor()),intersected:"",type:"",id:""},o=e.add(t,"position").disable();e.add(t,"id").disable().listen(),e.add(t,"type").disable().listen(),e.addColor(t,"hoverColor").onChange(s=>{n.setHoverColor(s)});let l=[];function r(){l.forEach(s=>s()),l.length=0}return d(r,"reset"),n.on("hover",s=>{var b,y,m;let{coordinate:c,spaces:p,objects:h,markers:a,labels:g}=s;r(),i.publish("hover",s),o.load(JSON.stringify([c.longitude,c.latitude]));let f=(m=(y=(b=p[0])!=null?b:h[0])!=null?y:a[0])!=null?m:g[0];if(!f)return;let u=n.getState(f);u&&(t.type=u.type,t.id=f.id)}),{sub:i}}d(Ge,"createHoverControls");function oe(n,e){return d(function(){console.log("isInView",n.isInView(e))},"isInView")}d(oe,"createIsInViewHandler");function be(n,e,i){let t={labels:{},all(){i.Labels.all().forEach(f=>{this.labels[f.id]=f}),c()},removeAllLabels(){i.Labels.removeAll().forEach(f=>{delete this.labels[f.id]}),c()}},{addLabel:o,destroy:l}=Be(n,i);n.add(t,"all"),n.add(t,"removeAllLabels");let r=n.addFolder("Label List");n.close();let s=new Map,{rerender:c}=p();function p(){function g(b){var y;delete t.labels[b.id],(y=s.get(b.id))==null||y.destroy()}d(g,"remove");function f(b){let y=re(i,b,r,{onRemove:v=>{g(v)}});if(!y)return;let{labelItemFolder:m}=y;s.set(b.id,m)}d(f,"add");function u(){r.destroy(),r=n.addFolder("Label");for(let b in t.labels){let y=t.labels[b];f(y)}}return d(u,"rerender"),{rerender:u,add:f,remove:g}}d(p,"createLabelControls"),n.domElement.classList.add("list-items");let h;i.on("click",({labels:g,coordinate:f})=>{if(!n._closed)if(g[0]){h==null||h.close();let u=s.get(g[0].id);if(n.open(),!u)return;u==null||u.open(),u==null||u.domElement.scrollIntoView({block:"start"}),u==null||u.domElement.focus(),h=u}else o(f)});function a(g){for(let f of g)t.labels[f.id]=f;c()}return d(a,"populatelabels"),{populatelabels:a,destroy(){l()}}}d(be,"createLabelControls");function re(n,e,i,{onRemove:t}={}){var p,h,a,g;let o=i.addFolder("".concat((p=e.text)==null?void 0:p.substring(0,12)));o.onChange(f=>{n.updateState(e,{appearance:c.appearance,interactive:c.interactive})}),o.close();let l=n.getState(e);if((l==null?void 0:l.type)!=="label")throw new Error("error getting state for label: ".concat(e.id));let{appearance:r,interactive:s}=l;if(!r||r.margin==null||s==null)throw new Error("incomplte label state");let c={text:e.text,interactive:s,appearance:{...r,margin:r.margin||0,marker:{foregroundColor:(a=(h=r.marker)==null?void 0:h.foregroundColor)!=null&&a.active?E((g=r.marker.foregroundColor)==null?void 0:g.active):"black"},text:{foregroundColor:E(r.text.foregroundColor)}},remove(){n.Labels.remove(e),t==null||t(e),o.destroy()},isInView:oe(n,e.id)};return o.add(c.appearance,"margin",0,20).name("margin"),o.add(c,"text"),o.add(c,"interactive"),o.addColor(c.appearance.marker,"foregroundColor").name("marker foreground"),o.addColor(c.appearance.text,"foregroundColor").name("text forground"),o.add(c,"isInView"),o.add(c,"remove"),{labelItemFolder:o,destroy(){o.destroy()}}}d(re,"addLabelControlToFolder");function Be(n,e){let i=n.addFolder("Add"),t={onClick:!1,margin:0,text:"New Label!",interactive:!0,marginForegroundColor:E("skyblue"),marginBackgroundColor:E("coral"),textForegroundColor:E("slategray"),textBackgroundColor:E("white")};return i.add(t,"onClick"),i.add(t,"margin"),i.add(t,"interactive"),i.add(t,"text"),i.addColor(t,"marginForegroundColor"),i.addColor(t,"marginBackgroundColor"),i.addColor(t,"textForegroundColor"),i.addColor(t,"textBackgroundColor"),{destroy(){i.destroy()},addLabel(o){return i._closed||!t.onClick?void 0:e.Labels.add(o,t.text,{appearance:{margin:t.margin,marker:{foregroundColor:{active:t.marginForegroundColor,inactive:t.marginForegroundColor},backgroundColor:{active:t.marginBackgroundColor,inactive:t.marginBackgroundColor}},text:{foregroundColor:t.textForegroundColor,backgroundColor:t.marginBackgroundColor}},interactive:t.interactive})}}}d(Be,"createAddControl");var ve={};C();var ye="camera-ui";function xe(n,e,i){var z,le;let t=n.addFolder("Camera \u{1F4F7}").onOpenClose(x=>{ie({opened:!x._closed},ye)}),{params:o}=ne(ye);o.opened||t.close();let l=e.Camera.center.toJSON(),r=document.createElement("div");Object.assign(r.style,{display:"none",position:"absolute",left:"0px",top:"0px",bottom:"0px",right:"0px",backgroundColor:"aqua",pointerEvents:"none",opacity:.5}),document.body.appendChild(r);let[s,c,p,h]=(z=i==null?void 0:i.padding)!=null?z:[],a={center_lat:l.latitude,center_lon:l.longitude,zoomLevel:e.Camera.zoomLevel,pitch:e.Camera.pitch,bearing:e.Camera.bearing,minZoomLevel:e.Camera.minZoomLevel,maxZoomLevel:e.Camera.maxZoomLevel,inset_type:"pixel",inset_top:s!=null?s:0,inset_left:h!=null?h:0,inset_right:c!=null?c:0,inset_bottom:p!=null?p:0,animateOnLoad:!0,persist:()=>{ie(t.save().controllers,"camera"),navigator.clipboard.writeText(window.location.href)},visualizeInset:!!(s||c||p||h),"Focus on click":(le=i==null?void 0:i.focusOnClick)!=null?le:!0,"Focus on current floor":()=>{e.Camera.focusOn([e.currentFloor],{screenOffsets:{top:20,left:20,right:20,bottom:20}})}};function g(){a.inset_type==="portion"?Object.assign(r.style,{left:a.inset_left*u+"px",top:a.inset_top*f+"px",bottom:a.inset_bottom*f+"px",right:a.inset_right*u+"px"}):Object.assign(r.style,{left:a.inset_left+"px",top:a.inset_top+"px",bottom:a.inset_bottom+"px",right:a.inset_right+"px"})}d(g,"updateInsetVisualizer"),t.add(a,"center_lat").listen().disable(),t.add(a,"center_lon").listen().disable(),t.add(a,"zoomLevel",16,22,.5).listen().disable(),t.add(a,"pitch").listen().disable(),t.add(a,"bearing").listen().disable(),t.add(a,"minZoomLevel",5,22,.5).onChange(x=>{e.Camera.setMinZoomLevel(x)}),t.add(a,"maxZoomLevel",10,22,.5).onChange(x=>{e.Camera.setMaxZoomLevel(x)}),t.add(a,"animateOnLoad"),t.add(a,"visualizeInset").onChange($),$(a.visualizeInset);let{innerHeight:f,innerWidth:u}=window;t.add(a,"inset_type",["pixel","portion"]).onChange(A),t.add(a,"inset_top",0,f).onChange(A),t.add(a,"inset_bottom",0,f).onChange(A),t.add(a,"inset_left",0,u).onChange(A),t.add(a,"inset_right",0,u).onChange(A);let b=je(e);t.add(a,"Focus on click").onChange(x=>{x?e.on("click",b):e.off("click",b)}),a["Focus on click"]&&e.on("click",b),t.add(a,"persist"),t.add(a,"Focus on current floor");let y=d(x=>{t._closed||(a.center_lat=x.center.latitude,a.center_lon=x.center.longitude,a.zoomLevel=x.zoomLevel,a.bearing=x.bearing,a.pitch=x.pitch)},"onCameraChanged");e.on("camera-change",y);let{params:m}=ne("camera",a);if(Object.keys(m).length>0){let x=m;e.Camera.setScreenOffsets({top:x.inset_top,left:x.inset_left,right:x.inset_right,bottom:x.inset_bottom,type:x.inset_type});let de={pitch:x.pitch,center:new ce(x.center_lat,x.center_lon),bearing:x.bearing,zoomLevel:x.zoomLevel};x.animateOnLoad?e.Camera.animateTo(de):e.Camera.set(de),t.load({controllers:x,folders:{}}),g()}let v=[()=>{e.off("camera-change",y)}];function A(){e.Camera.setScreenOffsets({top:a.inset_top,left:a.inset_left,right:a.inset_right,bottom:a.inset_bottom,type:a.inset_type}),g()}d(A,"updateInset"),(a.inset_top||a.inset_right||a.inset_bottom||a.inset_left)&&A();function $(x){x?r.style.display="block":r.style.display="none"}return d($,"visualizeInsetUpdated"),()=>({destroy(){t.destroy(),ge(v)}})}d(xe,"createCameraControls");function je(n){return d(function(i){var r;let{spaces:t,objects:o}=i,l=(r=t[0])!=null?r:o[0];l&&n.Camera.focusOn(l,{bearing:300,pitch:65})},"handler")}d(je,"createHandler");C();function Ce(n,e,i){let t={markers:{},removeAllMarkers(){i.Markers.removeAll().forEach(f=>{delete this.markers[f.id]}),c()}},{addMarker:o,destroy:l}=Ye(n,i);n.add(t,"removeAllMarkers");let r=n.addFolder("Marker List");n.close();let s=new Map,{rerender:c}=p();function p(){function g(b){var y;delete t.markers[b.id],(y=s.get(b.id))==null||y.destroy()}d(g,"remove");function f(b){let y=Ve(i,b,r,{onRemove:v=>{g(v)}});if(!y)return;let{markerItemFolder:m}=y;s.set(b.id,m)}d(f,"add");function u(){r.destroy(),r=n.addFolder("marker");for(let b in t.markers){let y=t.markers[b];f(y)}}return d(u,"rerender"),{rerender:u,add:f,remove:g}}d(p,"createMarkerControls"),n.domElement.classList.add("list-items");let h;i.on("click",({markers:g,coordinate:f})=>{if(!n._closed)if(g[0]){h==null||h.close();let u=s.get(g[0].id);if(n.open(),!u)return;u==null||u.open(),u==null||u.domElement.scrollIntoView({block:"start"}),u==null||u.domElement.focus(),h=u}else o(f)});function a(g){for(let f of g)t.markers[f.id]=f;c()}return d(a,"populateMarkers"),{populateMarkers:a,destroy(){l()}}}d(Ce,"createMarkerControls");function Ve(n,e,i,{onRemove:t}={}){let o=i.addFolder("".concat(e.id.toString().substring(0,8)));o.onChange(c=>{n.updateState(e,{interactive:s.interactive})}),o.close();let l=n.getState(e);if((l==null?void 0:l.type)!=="marker")throw new Error("error getting state for marker: ".concat(e.id));let{interactive:r}=l;if(r==null)throw new Error("incomplte label state");let s={interactive:r,remove(){n.Markers.remove(e),t==null||t(e),o.destroy()}};return o.add(s,"interactive"),o.add(s,"remove"),{markerItemFolder:o,destroy(){o.destroy()}}}d(Ve,"addMarkerControlToFolder");function Ye(n,e){let i=n.addFolder("Add"),t={onClick:!1,interactive:!0};return i.add(t,"onClick"),i.add(t,"interactive"),{destroy(){i.destroy()},addMarker(o){return i._closed||!t.onClick?void 0:e.Markers.add(o,"<div>New Marker</div>",{interactive:t.interactive})}}}d(Ye,"createAddControl");C();function Ae(n,e){let i=n.addFolder("Walls").close(),t={visible:!0,topColor:"#b1fa87",color:"#e8e8e8",texture:{url:""},topTexture:{url:""}};i.add(t,"visible").onChange(r=>{e.updateState("walls",{visible:r})}),i.addColor(t,"topColor").onChange(r=>{e.updateState("walls",{topColor:r})}),i.addColor(t,"color").onChange(r=>{e.updateState("walls",{color:r})}),i.addFolder("Texture - side").add(t.texture,"url").onFinishChange(r=>{e.updateState("walls",{texture:{url:r}})}),i.addFolder("Texture - top").add(t.topTexture,"url").onFinishChange(r=>{e.updateState("walls",{topTexture:{url:r}})}),e.updateState("walls",{topColor:t.topColor}),e.updateState("walls",{color:t.color})}d(Ae,"createGeometryControl");C();function we(n,e,i){var l,r;n.close();let t={language:(r=(l=i.currentLanguage)==null?void 0:l.code)!=null?r:"en"},o=i.getByType("enterprise-venue");n.add(t,"language",o==null?void 0:o.languages.map(s=>s.code)).onChange(s=>{i.changeLanguage(s)})}d(we,"createMiscControl");function Ee(n,e,i){Ne();let t=new B({title:"SDK Controls"});t.domElement.classList.add("mappedin-js-inspector"),fe(e,n,t),xe(t,e,i==null?void 0:i.camera);let o=t.addFolder("Levels").close(),l=t.addFolder("Scene Controls");l.close();let r=t.addFolder("Labels"),s=t.addFolder("Markers");Ae(t,e);let c=t.addFolder("misc");we(c,e,n);let p={level:e.currentFloor.id},{populatelabels:h}=be(r,n,e),{populateMarkers:a}=Ce(s,n,e),g=n.getByType("floor").reduce((u,b)=>(u[b.name]=b.id,u),{}),f=o.add(p,"level",g).onChange(u=>{e.setFloor(u),p.level=e.currentFloor.id,f.updateDisplay()});return e.on("floor-change-start",u=>{o.controllers[0].setValue(u.floor.id)}),n.getByType("space").forEach(u=>{e.updateState(u,{interactive:!0})}),n.getByType("object").forEach(u=>{e.updateState(u,{interactive:!0})}),n.getByType("object").forEach(u=>{e.updateState(u,{interactive:!0})}),e.setHoverColor("#a2b7e6"),e.Camera.setMaxZoomLevel(20),{populatelabels:h,sceneFolder:l,populateMarkers:a}}d(Ee,"createUi");var _e="mappedin-sdk-debug-css";function Ne(){if(document.getElementById(_e))return;let n=document.createElement("style");n.id=_e,n.textContent=ve,document.head.appendChild(n)}d(Ne,"injectCss");var ae=class ae{constructor(e,i){L(this,"_enabled",!1);L(this,"mv");L(this,"api");L(this,"mapData");L(this,"scenegraphVisualizerMounted",!1);L(this,"storeStateToLocalStorageEnabled",!1);this.mv=e,this.api=i,this.mapData=this.api.getMapData()}setMapData(e){this.mapData=e}async enable(e={}){var t;if(this._enabled)return;if(this._enabled=!0,!this.mapData)throw new Error("Please set mapData before enable debug.");let{sceneFolder:i}=Ee(this.mapData,this.mv,e);i.onOpenClose(o=>{o===i&&!o._closed&&!this.scenegraphVisualizerMounted&&(this.scenegraphVisualizerMounted=!0,ue(this.api.core,i))}),(t=this.api.getMapDataInternal())==null||t.spaces.forEach(o=>{this.mv.updateState(o.id,{interactive:!0})})}get enabled(){return this._enabled}};d(ae,"Inspector");var se=ae;export{se as Inspector};
1
+ import{c as I,e as ce,g as H,i as M,j as P,m as ue}from"./chunk-NPRXXUN6.js";import"./chunk-QQ53JNBN.js";import"./chunk-Z7MNFX3S.js";import{J as he}from"./chunk-VT2X5G75.js";import{a as d,e as L,j as C}from"./chunk-OQLRRFPP.js";C();C();C();C();var S=class S{constructor(e,i,t,o,l="div"){this.parent=e,this.object=i,this.property=t,this._disabled=!1,this._hidden=!1,this.initialValue=this.getValue(),this.domElement=document.createElement(l),this.domElement.classList.add("controller"),this.domElement.classList.add(o),this.$name=document.createElement("div"),this.$name.classList.add("name"),S.nextNameID=S.nextNameID||0,this.$name.id="lil-gui-name-".concat(++S.nextNameID),this.$widget=document.createElement("div"),this.$widget.classList.add("widget"),this.$disable=this.$widget,this.domElement.appendChild(this.$name),this.domElement.appendChild(this.$widget),this.domElement.addEventListener("keydown",r=>r.stopPropagation()),this.domElement.addEventListener("keyup",r=>r.stopPropagation()),this.parent.children.push(this),this.parent.controllers.push(this),this.parent.$children.appendChild(this.domElement),this._listenCallback=this._listenCallback.bind(this),this.name(t)}name(e){return this._name=e,this.$name.textContent=e,this}onChange(e){return this._onChange=e,this}_callOnChange(){this.parent._callOnChange(this),this._onChange!==void 0&&this._onChange.call(this,this.getValue()),this._changed=!0}onFinishChange(e){return this._onFinishChange=e,this}_callOnFinishChange(){this._changed&&(this.parent._callOnFinishChange(this),this._onFinishChange!==void 0&&this._onFinishChange.call(this,this.getValue())),this._changed=!1}reset(){return this.setValue(this.initialValue),this._callOnFinishChange(),this}enable(e=!0){return this.disable(!e)}disable(e=!0){return e===this._disabled?this:(this._disabled=e,this.domElement.classList.toggle("disabled",e),this.$disable.toggleAttribute("disabled",e),this)}show(e=!0){return this._hidden=!e,this.domElement.style.display=this._hidden?"none":"",this}hide(){return this.show(!1)}options(e){let i=this.parent.add(this.object,this.property,e);return i.name(this._name),this.destroy(),i}min(e){return this}max(e){return this}step(e){return this}decimals(e){return this}listen(e=!0){return this._listening=e,this._listenCallbackID!==void 0&&(cancelAnimationFrame(this._listenCallbackID),this._listenCallbackID=void 0),this._listening&&this._listenCallback(),this}_listenCallback(){this._listenCallbackID=requestAnimationFrame(this._listenCallback);let e=this.save();e!==this._listenPrevValue&&this.updateDisplay(),this._listenPrevValue=e}getValue(){return this.object[this.property]}setValue(e){return this.getValue()!==e&&(this.object[this.property]=e,this._callOnChange(),this.updateDisplay()),this}updateDisplay(){return this}load(e){return this.setValue(e),this._callOnFinishChange(),this}save(){return this.getValue()}destroy(){this.listen(!1),this.parent.children.splice(this.parent.children.indexOf(this),1),this.parent.controllers.splice(this.parent.controllers.indexOf(this),1),this.parent.$children.removeChild(this.domElement)}};d(S,"Controller");var k=S,K=class K extends k{constructor(e,i,t){super(e,i,t,"boolean","label"),this.$input=document.createElement("input"),this.$input.setAttribute("type","checkbox"),this.$input.setAttribute("aria-labelledby",this.$name.id),this.$widget.appendChild(this.$input),this.$input.addEventListener("change",()=>{this.setValue(this.$input.checked),this._callOnFinishChange()}),this.$disable=this.$input,this.updateDisplay()}updateDisplay(){return this.$input.checked=this.getValue(),this}};d(K,"BooleanController");var V=K;function Y(n){let e,i;return(e=n.match(/(#|0x)?([a-f0-9]{6})/i))?i=e[2]:(e=n.match(/rgb\(\s*(\d*)\s*,\s*(\d*)\s*,\s*(\d*)\s*\)/))?i=parseInt(e[1]).toString(16).padStart(2,0)+parseInt(e[2]).toString(16).padStart(2,0)+parseInt(e[3]).toString(16).padStart(2,0):(e=n.match(/^#?([a-f0-9])([a-f0-9])([a-f0-9])$/i))&&(i=e[1]+e[1]+e[2]+e[2]+e[3]+e[3]),i?"#"+i:!1}d(Y,"normalizeColorString");var ke={isPrimitive:!0,match:n=>typeof n=="string",fromHexString:Y,toHexString:Y},T={isPrimitive:!0,match:n=>typeof n=="number",fromHexString:n=>parseInt(n.substring(1),16),toHexString:n=>"#"+n.toString(16).padStart(6,0)},$e={isPrimitive:!1,match:n=>Array.isArray(n),fromHexString(n,e,i=1){let t=T.fromHexString(n);e[0]=(t>>16&255)/255*i,e[1]=(t>>8&255)/255*i,e[2]=(t&255)/255*i},toHexString([n,e,i],t=1){t=255/t;let o=n*t<<16^e*t<<8^i*t<<0;return T.toHexString(o)}},Le={isPrimitive:!1,match:n=>Object(n)===n,fromHexString(n,e,i=1){let t=T.fromHexString(n);e.r=(t>>16&255)/255*i,e.g=(t>>8&255)/255*i,e.b=(t&255)/255*i},toHexString({r:n,g:e,b:i},t=1){t=255/t;let o=n*t<<16^e*t<<8^i*t<<0;return T.toHexString(o)}},Me=[ke,T,$e,Le];function Se(n){return Me.find(e=>e.match(n))}d(Se,"getColorFormat");var Z=class Z extends k{constructor(e,i,t,o){super(e,i,t,"color"),this.$input=document.createElement("input"),this.$input.setAttribute("type","color"),this.$input.setAttribute("tabindex",-1),this.$input.setAttribute("aria-labelledby",this.$name.id),this.$text=document.createElement("input"),this.$text.setAttribute("type","text"),this.$text.setAttribute("spellcheck","false"),this.$text.setAttribute("aria-labelledby",this.$name.id),this.$display=document.createElement("div"),this.$display.classList.add("display"),this.$display.appendChild(this.$input),this.$widget.appendChild(this.$display),this.$widget.appendChild(this.$text),this._format=Se(this.initialValue),this._rgbScale=o,this._initialValueHexString=this.save(),this._textFocused=!1,this.$input.addEventListener("input",()=>{this._setValueFromHexString(this.$input.value)}),this.$input.addEventListener("blur",()=>{this._callOnFinishChange()}),this.$text.addEventListener("input",()=>{let l=Y(this.$text.value);l&&this._setValueFromHexString(l)}),this.$text.addEventListener("focus",()=>{this._textFocused=!0,this.$text.select()}),this.$text.addEventListener("blur",()=>{this._textFocused=!1,this.updateDisplay(),this._callOnFinishChange()}),this.$disable=this.$text,this.updateDisplay()}reset(){return this._setValueFromHexString(this._initialValueHexString),this}_setValueFromHexString(e){if(this._format.isPrimitive){let i=this._format.fromHexString(e);this.setValue(i)}else this._format.fromHexString(e,this.getValue(),this._rgbScale),this._callOnChange(),this.updateDisplay()}save(){return this._format.toHexString(this.getValue(),this._rgbScale)}load(e){return this._setValueFromHexString(e),this._callOnFinishChange(),this}updateDisplay(){return this.$input.value=this._format.toHexString(this.getValue(),this._rgbScale),this._textFocused||(this.$text.value=this.$input.value.substring(1)),this.$display.style.backgroundColor=this.$input.value,this}};d(Z,"ColorController");var N=Z,Q=class Q extends k{constructor(e,i,t){super(e,i,t,"function"),this.$button=document.createElement("button"),this.$button.appendChild(this.$name),this.$widget.appendChild(this.$button),this.$button.addEventListener("click",o=>{o.preventDefault(),this.getValue().call(this.object),this._callOnChange()}),this.$button.addEventListener("touchstart",()=>{},{passive:!0}),this.$disable=this.$button}};d(Q,"FunctionController");var D=Q,q=class q extends k{constructor(e,i,t,o,l,r){super(e,i,t,"number"),this._initInput(),this.min(o),this.max(l);let s=r!==void 0;this.step(s?r:this._getImplicitStep(),s),this.updateDisplay()}decimals(e){return this._decimals=e,this.updateDisplay(),this}min(e){return this._min=e,this._onUpdateMinMax(),this}max(e){return this._max=e,this._onUpdateMinMax(),this}step(e,i=!0){return this._step=e,this._stepExplicit=i,this}updateDisplay(){let e=this.getValue();if(this._hasSlider){let i=(e-this._min)/(this._max-this._min);i=Math.max(0,Math.min(i,1)),this.$fill.style.width=i*100+"%"}return this._inputFocused||(this.$input.value=this._decimals===void 0?e:e.toFixed(this._decimals)),this}_initInput(){this.$input=document.createElement("input"),this.$input.setAttribute("type","text"),this.$input.setAttribute("aria-labelledby",this.$name.id),window.matchMedia("(pointer: coarse)").matches&&(this.$input.setAttribute("type","number"),this.$input.setAttribute("step","any")),this.$widget.appendChild(this.$input),this.$disable=this.$input;let i=d(()=>{let v=parseFloat(this.$input.value);isNaN(v)||(this._stepExplicit&&(v=this._snap(v)),this.setValue(this._clamp(v)))},"onInput"),t=d(v=>{let A=parseFloat(this.$input.value);isNaN(A)||(this._snapClampSetValue(A+v),this.$input.value=this.getValue())},"increment"),o=d(v=>{v.key==="Enter"&&this.$input.blur(),v.code==="ArrowUp"&&(v.preventDefault(),t(this._step*this._arrowKeyMultiplier(v))),v.code==="ArrowDown"&&(v.preventDefault(),t(this._step*this._arrowKeyMultiplier(v)*-1))},"onKeyDown"),l=d(v=>{this._inputFocused&&(v.preventDefault(),t(this._step*this._normalizeMouseWheel(v)))},"onWheel"),r=!1,s,c,p,h,a,g=5,f=d(v=>{s=v.clientX,c=p=v.clientY,r=!0,h=this.getValue(),a=0,window.addEventListener("mousemove",u),window.addEventListener("mouseup",b)},"onMouseDown"),u=d(v=>{if(r){let A=v.clientX-s,$=v.clientY-c;Math.abs($)>g?(v.preventDefault(),this.$input.blur(),r=!1,this._setDraggingStyle(!0,"vertical")):Math.abs(A)>g&&b()}if(!r){let A=v.clientY-p;a-=A*this._step*this._arrowKeyMultiplier(v),h+a>this._max?a=this._max-h:h+a<this._min&&(a=this._min-h),this._snapClampSetValue(h+a)}p=v.clientY},"onMouseMove"),b=d(()=>{this._setDraggingStyle(!1,"vertical"),this._callOnFinishChange(),window.removeEventListener("mousemove",u),window.removeEventListener("mouseup",b)},"onMouseUp"),y=d(()=>{this._inputFocused=!0},"onFocus"),m=d(()=>{this._inputFocused=!1,this.updateDisplay(),this._callOnFinishChange()},"onBlur");this.$input.addEventListener("input",i),this.$input.addEventListener("keydown",o),this.$input.addEventListener("wheel",l,{passive:!1}),this.$input.addEventListener("mousedown",f),this.$input.addEventListener("focus",y),this.$input.addEventListener("blur",m)}_initSlider(){this._hasSlider=!0,this.$slider=document.createElement("div"),this.$slider.classList.add("slider"),this.$fill=document.createElement("div"),this.$fill.classList.add("fill"),this.$slider.appendChild(this.$fill),this.$widget.insertBefore(this.$slider,this.$input),this.domElement.classList.add("hasSlider");let e=d((m,v,A,$,z)=>(m-v)/(A-v)*(z-$)+$,"map"),i=d(m=>{let v=this.$slider.getBoundingClientRect(),A=e(m,v.left,v.right,this._min,this._max);this._snapClampSetValue(A)},"setValueFromX"),t=d(m=>{this._setDraggingStyle(!0),i(m.clientX),window.addEventListener("mousemove",o),window.addEventListener("mouseup",l)},"mouseDown"),o=d(m=>{i(m.clientX)},"mouseMove"),l=d(()=>{this._callOnFinishChange(),this._setDraggingStyle(!1),window.removeEventListener("mousemove",o),window.removeEventListener("mouseup",l)},"mouseUp"),r=!1,s,c,p=d(m=>{m.preventDefault(),this._setDraggingStyle(!0),i(m.touches[0].clientX),r=!1},"beginTouchDrag"),h=d(m=>{m.touches.length>1||(this._hasScrollBar?(s=m.touches[0].clientX,c=m.touches[0].clientY,r=!0):p(m),window.addEventListener("touchmove",a,{passive:!1}),window.addEventListener("touchend",g))},"onTouchStart"),a=d(m=>{if(r){let v=m.touches[0].clientX-s,A=m.touches[0].clientY-c;Math.abs(v)>Math.abs(A)?p(m):(window.removeEventListener("touchmove",a),window.removeEventListener("touchend",g))}else m.preventDefault(),i(m.touches[0].clientX)},"onTouchMove"),g=d(()=>{this._callOnFinishChange(),this._setDraggingStyle(!1),window.removeEventListener("touchmove",a),window.removeEventListener("touchend",g)},"onTouchEnd"),f=this._callOnFinishChange.bind(this),u=400,b,y=d(m=>{if(Math.abs(m.deltaX)<Math.abs(m.deltaY)&&this._hasScrollBar)return;m.preventDefault();let A=this._normalizeMouseWheel(m)*this._step;this._snapClampSetValue(this.getValue()+A),this.$input.value=this.getValue(),clearTimeout(b),b=setTimeout(f,u)},"onWheel");this.$slider.addEventListener("mousedown",t),this.$slider.addEventListener("touchstart",h,{passive:!1}),this.$slider.addEventListener("wheel",y,{passive:!1})}_setDraggingStyle(e,i="horizontal"){this.$slider&&this.$slider.classList.toggle("active",e),document.body.classList.toggle("lil-gui-dragging",e),document.body.classList.toggle("lil-gui-".concat(i),e)}_getImplicitStep(){return this._hasMin&&this._hasMax?(this._max-this._min)/1e3:.1}_onUpdateMinMax(){!this._hasSlider&&this._hasMin&&this._hasMax&&(this._stepExplicit||this.step(this._getImplicitStep(),!1),this._initSlider(),this.updateDisplay())}_normalizeMouseWheel(e){let{deltaX:i,deltaY:t}=e;return Math.floor(e.deltaY)!==e.deltaY&&e.wheelDelta&&(i=0,t=-e.wheelDelta/120,t*=this._stepExplicit?1:10),i+-t}_arrowKeyMultiplier(e){let i=this._stepExplicit?1:10;return e.shiftKey?i*=10:e.altKey&&(i/=10),i}_snap(e){let i=Math.round(e/this._step)*this._step;return parseFloat(i.toPrecision(15))}_clamp(e){return e<this._min&&(e=this._min),e>this._max&&(e=this._max),e}_snapClampSetValue(e){this.setValue(this._clamp(this._snap(e)))}get _hasScrollBar(){let e=this.parent.root.$children;return e.scrollHeight>e.clientHeight}get _hasMin(){return this._min!==void 0}get _hasMax(){return this._max!==void 0}};d(q,"NumberController");var R=q,ee=class ee extends k{constructor(e,i,t,o){super(e,i,t,"option"),this.$select=document.createElement("select"),this.$select.setAttribute("aria-labelledby",this.$name.id),this.$display=document.createElement("div"),this.$display.classList.add("display"),this.$select.addEventListener("change",()=>{this.setValue(this._values[this.$select.selectedIndex]),this._callOnFinishChange()}),this.$select.addEventListener("focus",()=>{this.$display.classList.add("focus")}),this.$select.addEventListener("blur",()=>{this.$display.classList.remove("focus")}),this.$widget.appendChild(this.$select),this.$widget.appendChild(this.$display),this.$disable=this.$select,this.options(o)}options(e){return this._values=Array.isArray(e)?e:Object.values(e),this._names=Array.isArray(e)?e:Object.keys(e),this.$select.replaceChildren(),this._names.forEach(i=>{let t=document.createElement("option");t.textContent=i,this.$select.appendChild(t)}),this.updateDisplay(),this}updateDisplay(){let e=this.getValue(),i=this._values.indexOf(e);return this.$select.selectedIndex=i,this.$display.textContent=i===-1?e:this._names[i],this}};d(ee,"OptionController");var J=ee,te=class te extends k{constructor(e,i,t){super(e,i,t,"string"),this.$input=document.createElement("input"),this.$input.setAttribute("type","text"),this.$input.setAttribute("spellcheck","false"),this.$input.setAttribute("aria-labelledby",this.$name.id),this.$input.addEventListener("input",()=>{this.setValue(this.$input.value)}),this.$input.addEventListener("keydown",o=>{o.code==="Enter"&&this.$input.blur()}),this.$input.addEventListener("blur",()=>{this._callOnFinishChange()}),this.$widget.appendChild(this.$input),this.$disable=this.$input,this.updateDisplay()}updateDisplay(){return this.$input.value=this.getValue(),this}};d(te,"StringController");var W=te,Fe='.lil-gui {\n font-family: var(--font-family);\n font-size: var(--font-size);\n line-height: 1;\n font-weight: normal;\n font-style: normal;\n text-align: left;\n color: var(--text-color);\n user-select: none;\n -webkit-user-select: none;\n touch-action: manipulation;\n --background-color: #1f1f1f;\n --text-color: #ebebeb;\n --title-background-color: #111111;\n --title-text-color: #ebebeb;\n --widget-color: #424242;\n --hover-color: #4f4f4f;\n --focus-color: #595959;\n --number-color: #2cc9ff;\n --string-color: #a2db3c;\n --font-size: 11px;\n --input-font-size: 11px;\n --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;\n --font-family-mono: Menlo, Monaco, Consolas, "Droid Sans Mono", monospace;\n --padding: 4px;\n --spacing: 4px;\n --widget-height: 20px;\n --title-height: calc(var(--widget-height) + var(--spacing) * 1.25);\n --name-width: 45%;\n --slider-knob-width: 2px;\n --slider-input-width: 27%;\n --color-input-width: 27%;\n --slider-input-min-width: 45px;\n --color-input-min-width: 45px;\n --folder-indent: 7px;\n --widget-padding: 0 0 0 3px;\n --widget-border-radius: 2px;\n --checkbox-size: calc(0.75 * var(--widget-height));\n --scrollbar-width: 5px;\n}\n.lil-gui, .lil-gui * {\n box-sizing: border-box;\n margin: 0;\n padding: 0;\n}\n.lil-gui.root {\n width: var(--width, 245px);\n display: flex;\n flex-direction: column;\n background: var(--background-color);\n}\n.lil-gui.root > .title {\n background: var(--title-background-color);\n color: var(--title-text-color);\n}\n.lil-gui.root > .children {\n overflow-x: hidden;\n overflow-y: auto;\n}\n.lil-gui.root > .children::-webkit-scrollbar {\n width: var(--scrollbar-width);\n height: var(--scrollbar-width);\n background: var(--background-color);\n}\n.lil-gui.root > .children::-webkit-scrollbar-thumb {\n border-radius: var(--scrollbar-width);\n background: var(--focus-color);\n}\n@media (pointer: coarse) {\n .lil-gui.allow-touch-styles, .lil-gui.allow-touch-styles .lil-gui {\n --widget-height: 28px;\n --padding: 6px;\n --spacing: 6px;\n --font-size: 13px;\n --input-font-size: 16px;\n --folder-indent: 10px;\n --scrollbar-width: 7px;\n --slider-input-min-width: 50px;\n --color-input-min-width: 65px;\n }\n}\n.lil-gui.force-touch-styles, .lil-gui.force-touch-styles .lil-gui {\n --widget-height: 28px;\n --padding: 6px;\n --spacing: 6px;\n --font-size: 13px;\n --input-font-size: 16px;\n --folder-indent: 10px;\n --scrollbar-width: 7px;\n --slider-input-min-width: 50px;\n --color-input-min-width: 65px;\n}\n.lil-gui.autoPlace {\n max-height: 100%;\n position: fixed;\n top: 0;\n right: 15px;\n z-index: 1001;\n}\n\n.lil-gui .controller {\n display: flex;\n align-items: center;\n padding: 0 var(--padding);\n margin: var(--spacing) 0;\n}\n.lil-gui .controller.disabled {\n opacity: 0.5;\n}\n.lil-gui .controller.disabled, .lil-gui .controller.disabled * {\n pointer-events: none !important;\n}\n.lil-gui .controller > .name {\n min-width: var(--name-width);\n flex-shrink: 0;\n white-space: pre;\n padding-right: var(--spacing);\n line-height: var(--widget-height);\n}\n.lil-gui .controller .widget {\n position: relative;\n display: flex;\n align-items: center;\n width: 100%;\n min-height: var(--widget-height);\n}\n.lil-gui .controller.string input {\n color: var(--string-color);\n}\n.lil-gui .controller.boolean {\n cursor: pointer;\n}\n.lil-gui .controller.color .display {\n width: 100%;\n height: var(--widget-height);\n border-radius: var(--widget-border-radius);\n position: relative;\n}\n@media (hover: hover) {\n .lil-gui .controller.color .display:hover:before {\n content: " ";\n display: block;\n position: absolute;\n border-radius: var(--widget-border-radius);\n border: 1px solid #fff9;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n }\n}\n.lil-gui .controller.color input[type=color] {\n opacity: 0;\n width: 100%;\n height: 100%;\n cursor: pointer;\n}\n.lil-gui .controller.color input[type=text] {\n margin-left: var(--spacing);\n font-family: var(--font-family-mono);\n min-width: var(--color-input-min-width);\n width: var(--color-input-width);\n flex-shrink: 0;\n}\n.lil-gui .controller.option select {\n opacity: 0;\n position: absolute;\n width: 100%;\n max-width: 100%;\n}\n.lil-gui .controller.option .display {\n position: relative;\n pointer-events: none;\n border-radius: var(--widget-border-radius);\n height: var(--widget-height);\n line-height: var(--widget-height);\n max-width: 100%;\n overflow: hidden;\n word-break: break-all;\n padding-left: 0.55em;\n padding-right: 1.75em;\n background: var(--widget-color);\n}\n@media (hover: hover) {\n .lil-gui .controller.option .display.focus {\n background: var(--focus-color);\n }\n}\n.lil-gui .controller.option .display.active {\n background: var(--focus-color);\n}\n.lil-gui .controller.option .display:after {\n font-family: "lil-gui";\n content: "\u2195";\n position: absolute;\n top: 0;\n right: 0;\n bottom: 0;\n padding-right: 0.375em;\n}\n.lil-gui .controller.option .widget,\n.lil-gui .controller.option select {\n cursor: pointer;\n}\n@media (hover: hover) {\n .lil-gui .controller.option .widget:hover .display {\n background: var(--hover-color);\n }\n}\n.lil-gui .controller.number input {\n color: var(--number-color);\n}\n.lil-gui .controller.number.hasSlider input {\n margin-left: var(--spacing);\n width: var(--slider-input-width);\n min-width: var(--slider-input-min-width);\n flex-shrink: 0;\n}\n.lil-gui .controller.number .slider {\n width: 100%;\n height: var(--widget-height);\n background: var(--widget-color);\n border-radius: var(--widget-border-radius);\n padding-right: var(--slider-knob-width);\n overflow: hidden;\n cursor: ew-resize;\n touch-action: pan-y;\n}\n@media (hover: hover) {\n .lil-gui .controller.number .slider:hover {\n background: var(--hover-color);\n }\n}\n.lil-gui .controller.number .slider.active {\n background: var(--focus-color);\n}\n.lil-gui .controller.number .slider.active .fill {\n opacity: 0.95;\n}\n.lil-gui .controller.number .fill {\n height: 100%;\n border-right: var(--slider-knob-width) solid var(--number-color);\n box-sizing: content-box;\n}\n\n.lil-gui-dragging .lil-gui {\n --hover-color: var(--widget-color);\n}\n.lil-gui-dragging * {\n cursor: ew-resize !important;\n}\n\n.lil-gui-dragging.lil-gui-vertical * {\n cursor: ns-resize !important;\n}\n\n.lil-gui .title {\n height: var(--title-height);\n line-height: calc(var(--title-height) - 4px);\n font-weight: 600;\n padding: 0 var(--padding);\n -webkit-tap-highlight-color: transparent;\n cursor: pointer;\n outline: none;\n text-decoration-skip: objects;\n}\n.lil-gui .title:before {\n font-family: "lil-gui";\n content: "\u25BE";\n padding-right: 2px;\n display: inline-block;\n}\n.lil-gui .title:active {\n background: var(--title-background-color);\n opacity: 0.75;\n}\n@media (hover: hover) {\n body:not(.lil-gui-dragging) .lil-gui .title:hover {\n background: var(--title-background-color);\n opacity: 0.85;\n }\n .lil-gui .title:focus {\n text-decoration: underline var(--focus-color);\n }\n}\n.lil-gui.root > .title:focus {\n text-decoration: none !important;\n}\n.lil-gui.closed > .title:before {\n content: "\u25B8";\n}\n.lil-gui.closed > .children {\n transform: translateY(-7px);\n opacity: 0;\n}\n.lil-gui.closed:not(.transition) > .children {\n display: none;\n}\n.lil-gui.transition > .children {\n transition-duration: 300ms;\n transition-property: height, opacity, transform;\n transition-timing-function: cubic-bezier(0.2, 0.6, 0.35, 1);\n overflow: hidden;\n pointer-events: none;\n}\n.lil-gui .children:empty:before {\n content: "Empty";\n padding: 0 var(--padding);\n margin: var(--spacing) 0;\n display: block;\n height: var(--widget-height);\n font-style: italic;\n line-height: var(--widget-height);\n opacity: 0.5;\n}\n.lil-gui.root > .children > .lil-gui > .title {\n border: 0 solid var(--widget-color);\n border-width: 1px 0;\n transition: border-color 300ms;\n}\n.lil-gui.root > .children > .lil-gui.closed > .title {\n border-bottom-color: transparent;\n}\n.lil-gui + .controller {\n border-top: 1px solid var(--widget-color);\n margin-top: 0;\n padding-top: var(--spacing);\n}\n.lil-gui .lil-gui .lil-gui > .title {\n border: none;\n}\n.lil-gui .lil-gui .lil-gui > .children {\n border: none;\n margin-left: var(--folder-indent);\n border-left: 2px solid var(--widget-color);\n}\n.lil-gui .lil-gui .controller {\n border: none;\n}\n\n.lil-gui label, .lil-gui input, .lil-gui button {\n -webkit-tap-highlight-color: transparent;\n}\n.lil-gui input {\n border: 0;\n outline: none;\n font-family: var(--font-family);\n font-size: var(--input-font-size);\n border-radius: var(--widget-border-radius);\n height: var(--widget-height);\n background: var(--widget-color);\n color: var(--text-color);\n width: 100%;\n}\n@media (hover: hover) {\n .lil-gui input:hover {\n background: var(--hover-color);\n }\n .lil-gui input:active {\n background: var(--focus-color);\n }\n}\n.lil-gui input:disabled {\n opacity: 1;\n}\n.lil-gui input[type=text],\n.lil-gui input[type=number] {\n padding: var(--widget-padding);\n -moz-appearance: textfield;\n}\n.lil-gui input[type=text]:focus,\n.lil-gui input[type=number]:focus {\n background: var(--focus-color);\n}\n.lil-gui input[type=checkbox] {\n appearance: none;\n width: var(--checkbox-size);\n height: var(--checkbox-size);\n border-radius: var(--widget-border-radius);\n text-align: center;\n cursor: pointer;\n}\n.lil-gui input[type=checkbox]:checked:before {\n font-family: "lil-gui";\n content: "\u2713";\n font-size: var(--checkbox-size);\n line-height: var(--checkbox-size);\n}\n@media (hover: hover) {\n .lil-gui input[type=checkbox]:focus {\n box-shadow: inset 0 0 0 1px var(--focus-color);\n }\n}\n.lil-gui button {\n outline: none;\n cursor: pointer;\n font-family: var(--font-family);\n font-size: var(--font-size);\n color: var(--text-color);\n width: 100%;\n height: var(--widget-height);\n text-transform: none;\n background: var(--widget-color);\n border-radius: var(--widget-border-radius);\n border: none;\n}\n@media (hover: hover) {\n .lil-gui button:hover {\n background: var(--hover-color);\n }\n .lil-gui button:focus {\n box-shadow: inset 0 0 0 1px var(--focus-color);\n }\n}\n.lil-gui button:active {\n background: var(--focus-color);\n}\n\n@font-face {\n font-family: "lil-gui";\n src: url("data:application/font-woff;charset=utf-8;base64,d09GRgABAAAAAAUsAAsAAAAACJwAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAABHU1VCAAABCAAAAH4AAADAImwmYE9TLzIAAAGIAAAAPwAAAGBKqH5SY21hcAAAAcgAAAD0AAACrukyyJBnbHlmAAACvAAAAF8AAACEIZpWH2hlYWQAAAMcAAAAJwAAADZfcj2zaGhlYQAAA0QAAAAYAAAAJAC5AHhobXR4AAADXAAAABAAAABMAZAAAGxvY2EAAANsAAAAFAAAACgCEgIybWF4cAAAA4AAAAAeAAAAIAEfABJuYW1lAAADoAAAASIAAAIK9SUU/XBvc3QAAATEAAAAZgAAAJCTcMc2eJxVjbEOgjAURU+hFRBK1dGRL+ALnAiToyMLEzFpnPz/eAshwSa97517c/MwwJmeB9kwPl+0cf5+uGPZXsqPu4nvZabcSZldZ6kfyWnomFY/eScKqZNWupKJO6kXN3K9uCVoL7iInPr1X5baXs3tjuMqCtzEuagm/AAlzQgPAAB4nGNgYRBlnMDAysDAYM/gBiT5oLQBAwuDJAMDEwMrMwNWEJDmmsJwgCFeXZghBcjlZMgFCzOiKOIFAB71Bb8AeJy1kjFuwkAQRZ+DwRAwBtNQRUGKQ8OdKCAWUhAgKLhIuAsVSpWz5Bbkj3dEgYiUIszqWdpZe+Z7/wB1oCYmIoboiwiLT2WjKl/jscrHfGg/pKdMkyklC5Zs2LEfHYpjcRoPzme9MWWmk3dWbK9ObkWkikOetJ554fWyoEsmdSlt+uR0pCJR34b6t/TVg1SY3sYvdf8vuiKrpyaDXDISiegp17p7579Gp3p++y7HPAiY9pmTibljrr85qSidtlg4+l25GLCaS8e6rRxNBmsnERunKbaOObRz7N72ju5vdAjYpBXHgJylOAVsMseDAPEP8LYoUHicY2BiAAEfhiAGJgZWBgZ7RnFRdnVJELCQlBSRlATJMoLV2DK4glSYs6ubq5vbKrJLSbGrgEmovDuDJVhe3VzcXFwNLCOILB/C4IuQ1xTn5FPilBTj5FPmBAB4WwoqAHicY2BkYGAA4sk1sR/j+W2+MnAzpDBgAyEMQUCSg4EJxAEAwUgFHgB4nGNgZGBgSGFggJMhDIwMqEAYAByHATJ4nGNgAIIUNEwmAABl3AGReJxjYAACIQYlBiMGJ3wQAEcQBEV4nGNgZGBgEGZgY2BiAAEQyQWEDAz/wXwGAAsPATIAAHicXdBNSsNAHAXwl35iA0UQXYnMShfS9GPZA7T7LgIu03SSpkwzYTIt1BN4Ak/gKTyAeCxfw39jZkjymzcvAwmAW/wgwHUEGDb36+jQQ3GXGot79L24jxCP4gHzF/EIr4jEIe7wxhOC3g2TMYy4Q7+Lu/SHuEd/ivt4wJd4wPxbPEKMX3GI5+DJFGaSn4qNzk8mcbKSR6xdXdhSzaOZJGtdapd4vVPbi6rP+cL7TGXOHtXKll4bY1Xl7EGnPtp7Xy2n00zyKLVHfkHBa4IcJ2oD3cgggWvt/V/FbDrUlEUJhTn/0azVWbNTNr0Ens8de1tceK9xZmfB1CPjOmPH4kitmvOubcNpmVTN3oFJyjzCvnmrwhJTzqzVj9jiSX911FjeAAB4nG3HMRKCMBBA0f0giiKi4DU8k0V2GWbIZDOh4PoWWvq6J5V8If9NVNQcaDhyouXMhY4rPTcG7jwYmXhKq8Wz+p762aNaeYXom2n3m2dLTVgsrCgFJ7OTmIkYbwIbC6vIB7WmFfAAAA==") format("woff");\n}';function Ie(n){let e=document.createElement("style");e.innerHTML=n;let i=document.querySelector("head link[rel=stylesheet], head style");i?document.head.insertBefore(e,i):document.head.appendChild(e)}d(Ie,"_injectStyles");var pe=!1,G=class G{constructor({parent:e,autoPlace:i=e===void 0,container:t,width:o,title:l="Controls",closeFolders:r=!1,injectStyles:s=!0,touchStyles:c=!0}={}){if(this.parent=e,this.root=e?e.root:this,this.children=[],this.controllers=[],this.folders=[],this._closed=!1,this._hidden=!1,this.domElement=document.createElement("div"),this.domElement.classList.add("lil-gui"),this.$title=document.createElement("div"),this.$title.classList.add("title"),this.$title.setAttribute("role","button"),this.$title.setAttribute("aria-expanded",!0),this.$title.setAttribute("tabindex",0),this.$title.addEventListener("click",()=>this.openAnimated(this._closed)),this.$title.addEventListener("keydown",p=>{(p.code==="Enter"||p.code==="Space")&&(p.preventDefault(),this.$title.click())}),this.$title.addEventListener("touchstart",()=>{},{passive:!0}),this.$children=document.createElement("div"),this.$children.classList.add("children"),this.domElement.appendChild(this.$title),this.domElement.appendChild(this.$children),this.title(l),this.parent){this.parent.children.push(this),this.parent.folders.push(this),this.parent.$children.appendChild(this.domElement);return}this.domElement.classList.add("root"),c&&this.domElement.classList.add("allow-touch-styles"),!pe&&s&&(Ie(Fe),pe=!0),t?t.appendChild(this.domElement):i&&(this.domElement.classList.add("autoPlace"),document.body.appendChild(this.domElement)),o&&this.domElement.style.setProperty("--width",o+"px"),this._closeFolders=r}add(e,i,t,o,l){if(Object(t)===t)return new J(this,e,i,t);let r=e[i];switch(typeof r){case"number":return new R(this,e,i,t,o,l);case"boolean":return new V(this,e,i);case"string":return new W(this,e,i);case"function":return new D(this,e,i)}console.error("gui.add failed\n property:",i,"\n object:",e,"\n value:",r)}addColor(e,i,t=1){return new N(this,e,i,t)}addFolder(e){let i=new G({parent:this,title:e});return this.root._closeFolders&&i.close(),i}load(e,i=!0){return e.controllers&&this.controllers.forEach(t=>{t instanceof D||t._name in e.controllers&&t.load(e.controllers[t._name])}),i&&e.folders&&this.folders.forEach(t=>{t._title in e.folders&&t.load(e.folders[t._title])}),this}save(e=!0){let i={controllers:{},folders:{}};return this.controllers.forEach(t=>{if(!(t instanceof D)){if(t._name in i.controllers)throw new Error('Cannot save GUI with duplicate property "'.concat(t._name,'"'));i.controllers[t._name]=t.save()}}),e&&this.folders.forEach(t=>{if(t._title in i.folders)throw new Error('Cannot save GUI with duplicate folder "'.concat(t._title,'"'));i.folders[t._title]=t.save()}),i}open(e=!0){return this._setClosed(!e),this.$title.setAttribute("aria-expanded",!this._closed),this.domElement.classList.toggle("closed",this._closed),this}close(){return this.open(!1)}_setClosed(e){this._closed!==e&&(this._closed=e,this._callOnOpenClose(this))}show(e=!0){return this._hidden=!e,this.domElement.style.display=this._hidden?"none":"",this}hide(){return this.show(!1)}openAnimated(e=!0){return this._setClosed(!e),this.$title.setAttribute("aria-expanded",!this._closed),requestAnimationFrame(()=>{let i=this.$children.clientHeight;this.$children.style.height=i+"px",this.domElement.classList.add("transition");let t=d(l=>{l.target===this.$children&&(this.$children.style.height="",this.domElement.classList.remove("transition"),this.$children.removeEventListener("transitionend",t))},"onTransitionEnd");this.$children.addEventListener("transitionend",t);let o=e?this.$children.scrollHeight:0;this.domElement.classList.toggle("closed",!e),requestAnimationFrame(()=>{this.$children.style.height=o+"px"})}),this}title(e){return this._title=e,this.$title.textContent=e,this}reset(e=!0){return(e?this.controllersRecursive():this.controllers).forEach(t=>t.reset()),this}onChange(e){return this._onChange=e,this}_callOnChange(e){this.parent&&this.parent._callOnChange(e),this._onChange!==void 0&&this._onChange.call(this,{object:e.object,property:e.property,value:e.getValue(),controller:e})}onFinishChange(e){return this._onFinishChange=e,this}_callOnFinishChange(e){this.parent&&this.parent._callOnFinishChange(e),this._onFinishChange!==void 0&&this._onFinishChange.call(this,{object:e.object,property:e.property,value:e.getValue(),controller:e})}onOpenClose(e){return this._onOpenClose=e,this}_callOnOpenClose(e){this.parent&&this.parent._callOnOpenClose(e),this._onOpenClose!==void 0&&this._onOpenClose.call(this,e)}destroy(){this.parent&&(this.parent.children.splice(this.parent.children.indexOf(this),1),this.parent.folders.splice(this.parent.folders.indexOf(this),1)),this.domElement.parentElement&&this.domElement.parentElement.removeChild(this.domElement),Array.from(this.children).forEach(e=>e.destroy())}controllersRecursive(){let e=Array.from(this.controllers);return this.folders.forEach(i=>{e=e.concat(i.controllersRecursive())}),e}foldersRecursive(){let e=Array.from(this.folders);return this.folders.forEach(i=>{e=e.concat(i.foldersRecursive())}),e}};d(G,"GUI");var X=G,B=X;C();C();var E=(()=>{let n=new he;return d(function(i){return n.set(i),"#".concat(n.getHexString())},"normalize")})();function ge(n){let e;for(e of n)e()}d(ge,"runAll");function ie(n,e){let i=window.location.href,t=new URL(i),o=new URLSearchParams(t.search);for(let l in n)if(n.hasOwnProperty(l)){let r="".concat(e,".").concat(l);o.set(r,n[l])}t.search=o.toString(),history.pushState({path:t.toString()},"",t.toString())}d(ie,"updateCurrentUrlParamsWithNamespace");function ne(n,e){let i=new URLSearchParams(window.location.search),t={};for(let[o,l]of i)if(o.startsWith("".concat(n,"."))){let r=o.slice(n.length+1);l==="true"||l==="false"?t[r]=l==="true":typeof(e==null?void 0:e[r])=="number"?t[r]=Number(l):t[r]=l}return{namespace:n,params:t}}d(ne,"getUrlParamsWithNamespace");var De=["interactive"];function U(n,e,i){var o,l;let t=i.addFolder("".concat(e.type,"-").concat(e.id));for(let r in e){if(r==="visible"&&t.add(e,r).onChange(s=>{n.updateState(e.id,{[r]:s})}),r==="color"||r==="hoverColor"){e[r]=E(e[r]),t.addColor(e,r).onChange(s=>{n.updateState(e.id,{[r]:s})});continue}if(r==="height"){t.add(e,r,0,20,1).onChange(s=>{n.updateState(e.id,{[r]:s})});continue}if(r==="texture"&&e.texture){(o=t.addFolder("Texture - side").add(e,"texture"))==null||o.onChange(c=>{n.updateState(e.id,{texture:{url:c}})});continue}if(r==="topTexture"&&e.topTexture){(l=t.addFolder("Texture - top").add(e,"topTexture"))==null||l.onChange(c=>{n.updateState(e.id,{topTexture:{url:c}})});continue}if(r==="opacity"){t.add(e,r,0,1,.1).onChange(s=>{n.updateState(e.id,{[r]:s})});continue}De.includes(r)&&t.add(e,r).onChange(s=>{n.updateState(e.id,{[r]:s})})}return e.isInView&&(t.add(e,"isInView").listen().disable(),t.add(e,"isInViewCheck")),{cleanup(){t.destroy()}}}d(U,"renderByProp");C();C();function Te(){let n=[];function e(o,l){var c;let r=Object.values(o.getMapData())[0],s=l;if(s&&H.is(s)){let p=(c=r.getByType("enterprise-location"))==null?void 0:c.find(h=>h.spaces.some(a=>a.id===s.id));p&&(s=p)}return s}d(e,"getHighlightTarget");async function i(o,l){return l instanceof P?o.Camera.focusOn(l.locations.flatMap(r=>r.spaces),O):l instanceof M?o.Camera.focusOn(l.spaces,O):o.Camera.focusOn(l,O)}d(i,"focusOn");function t(o,l,{focus:r=!1}={}){if(!window.enableHighlightCard)return()=>{};let s=e(o,l),c=document.createElement("div");if(c.style.cssText="\n position: absolute;\n top: 20px;\n left: 20px;\n background-color: rgba(30, 30, 30, 0.95);\n box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);\n border-radius: 12px;\n padding: 24px;\n max-width: 320px;\n z-index: 1000;\n font-family: 'Arial', sans-serif;\n transition: all 0.3s ease;\n color: #e0e0e0;\n ","name"in s){let h=document.createElement("h3");h.textContent=s.name,h.style.cssText="\n margin: 0 0 16px;\n font-size: 22px;\n font-weight: 600;\n color: #ffffff;\n letter-spacing: -0.5px;\n ",c.appendChild(h)}if(s instanceof M){if(s.description){let h=document.createElement("p");h.textContent=s.description,h.style.cssText="\n margin: 0 0 16px;\n font-size: 14px;\n color: #b0b0b0;\n line-height: 1.5;\n ",c.appendChild(h)}if(s.tags&&s.tags.length>0){let h=document.createElement("div");h.style.cssText="\n display: flex;\n flex-wrap: nowrap;\n gap: 8px;\n margin-bottom: 16px;\n overflow-x: hidden;\n max-height: 30px; /* Adjust this value based on your font size and padding */\n ",s.tags.forEach(a=>{let g=document.createElement("span");g.textContent=a,g.style.cssText="\n background-color: #3a3a3a;\n color: #e0e0e0;\n padding: 6px 12px;\n border-radius: 16px;\n font-size: 12px;\n font-weight: 500;\n text-transform: uppercase;\n white-space: nowrap;\n ",h.appendChild(g)}),c.appendChild(h)}}let p;if(!(l instanceof P)){let h=new B({autoPlace:!1});h.domElement.style.cssText="\n position: relative;\n overflow-y: auto;\n margin-top: 16px;\n border-top: 1px solid #444;\n padding-top: 16px;\n ";let a=o.getState(l);a&&(U(o,{id:l.id,...a},h),c.appendChild(h.domElement)),p=h}return document.body.appendChild(c),r&&i(o,s),()=>{c.style.opacity="0",c.style.transform="translateY(-10px)",setTimeout(()=>c.remove(),300),p==null||p.destroy()}}return d(t,"highlightCard"),{highlightCard:t,highlight:(o,l,{focus:r=!0}={})=>{n.length>0&&n.forEach(c=>o.Markers.remove(c));let s=e(o,l);if(s instanceof M)r&&o.Camera.focusOn(s.spaces,O),n.push(...s.spaces.map(c=>o.Markers.add(c,'<div style="padding: 15px; background-color: #ffffff; border-radius: 8px; box-shadow: 0 4px 6px rgba(0,0,0,0.1); max-width: 250px; position: relative;">\n <h3 style="margin: 0 0 10px; color: #333; font-size: 16px; font-weight: 600;">'.concat(s.name,"</h3>\n ").concat(s.description?'<p style="margin: 0 0 10px; color: #666; font-size: 14px; font-weight: 400;">'.concat(s.description,"</p>"):"","\n ").concat(s.tags?s.tags.map(p=>'<span style="display: inline-block; padding: 3px 8px; background-color: #e0f2f1; color: #00796b; border-radius: 12px; font-size: 12px;">'.concat(p,"</span>")).join(" "):"",'\n <div style="position: absolute; bottom: -10px; left: 50%; transform: translateX(-50%); width: 0; height: 0; border-left: 10px solid transparent; border-right: 10px solid transparent; border-top: 10px solid #ffffff;"></div>\n </div>'),{rank:"always-visible",anchor:"top"})));else if(s instanceof P){r&&o.Camera.focusOn(s.locations.flatMap(h=>h.spaces),O);let c=new Map,p=new Set;s.locations.forEach(h=>{c.has(h.name)||(h.spaces.forEach(a=>{n.push(o.Markers.add(a,'<div style="padding: 12px; background-color: rgba(0, 153, 51, 0.95); border-radius: 8px; box-shadow: 0 4px 8px rgba(0,0,0,0.3); transform: translateY(-4px); transition: all 0.3s ease;">\n <span style="font-weight: 600; color: #FFFFFF; font-size: 16px; text-shadow: 1px 1px 2px rgba(0,0,0,0.2);">'.concat(h.name,"</span>\n </div>"),{rank:"always-visible"}))}),c.set(h.name,!0))}),s.locations.forEach(h=>{h.coordinates.forEach(a=>{let g="".concat(a.latitude,",").concat(a.longitude);if(!p.has(g)&&!c.has(h.name)){let f=o.Markers.add(a,'<div style="padding: 10px; background-color: rgba(51, 102, 204, 0.9); border-radius: 6px; box-shadow: 0 3px 6px rgba(0,0,0,0.2);">\n <span style="font-weight: 500; color: #FFFFFF; font-size: 16px;">'.concat(h.name,'</span>\n <br>\n <span style="color: #FFFFFF; font-size: 12px; font-weight: 400;">Node</span>\n </div>'),{rank:"always-visible"});p.add(g),n.push(f)}})})}}}}d(Te,"createHighlightControl");var O={duration:300,easing:"ease-in-out"},F=Te();C();var w={search:"",results:void 0,options:{places:{fields:{name:!0,description:!0,link:!0,category:!0},limit:5},locations:{fields:{name:!0,tag:!0,description:!0},limit:5},categories:{fields:{name:!0},limit:5}}};function Oe(n){n.add(w.options.places.fields,"name").name("Places: Name"),n.add(w.options.places.fields,"description").name("Places: Description"),n.add(w.options.places.fields,"link").name("Places: Link"),n.add(w.options.places.fields,"category").name("Places: Category"),n.add(w.options.places,"limit"),n.add(w.options.locations.fields,"name").name("Locations: Name"),n.add(w.options.locations.fields,"tag").name("Locations: Tag"),n.add(w.options.locations.fields,"description").name("Locations: Description"),n.add(w.options.places,"limit"),n.add(w.options.categories.fields,"name").name("Categories: Name")}d(Oe,"createAdvancedSettings");function me(n,e,i){var h;let t=new I,o=i.addFolder("Search");o.open();let l=o.add(w,"search").onChange(async a=>{let g=await e.Search.query(a,w.options);g&&(w.results=g,s(g,t))}),r=document.createElement("div");r.style.marginLeft="10px",(h=l.domElement.parentElement)==null||h.appendChild(r);let{renderSearch:s,close:c}=ze(n,e,r,l.$input),p=o.addFolder("Advanced");return p.close(),Oe(p),document.addEventListener("keydown",a=>{(a.metaKey||a.ctrlKey)&&a.key==="k"?(a.preventDefault(),o._closed&&o.open(),l.$input.focus()):a.key==="Escape"&&(c(),t.publish("highlight",void 0))}),{pubsub:t}}d(me,"createSearchControl");function ze(n,e,i,t){let o,l;t.addEventListener("input",async s=>{s instanceof InputEvent&&(s.inputType==="insertText"||s.inputType==="insertCompositionText")&&(clearTimeout(o),o=setTimeout(async()=>{var p;let c=await e.Search.suggest(t.value);c&&c.length>0&&r((p=c[0])==null?void 0:p.suggestion)},100))});function r(s){if(!s){t.placeholder="";return}let c=t.value;t.value=s,t.setSelectionRange(c.length,s.length)}return d(r,"renderSuggestion"),{renderSearch(s,c){var p,h;if(s.places.length===0&&((p=s.enterpriseCategories)==null?void 0:p.length)===0&&((h=s.enterpriseLocations)==null?void 0:h.length)===0){i.textContent="No results found.";return}l=He(i,s,n,c)},close(){l.destroy()}}}d(ze,"mount");function He(n,e,i,t){n.innerHTML="";let o=document.createElement("div");Object.assign(o.style,j.dropdownContainer);let l=document.createElement("ul");l.className="options-list",Object.assign(l.style,j.optionsList),l.style.display="block";let r=[],s=d((g,f)=>{if(f&&f.length>0){let u=document.createElement("li");u.textContent=g,Object.assign(u.style,j.sectionHeader),l.appendChild(u),f.forEach((b,y)=>{let m=document.createElement("li");m.textContent="".concat("name"in b.item?b.item.name:""," (").concat(b.type,")"),Object.assign(m.style,j.option),m.tabIndex=0,m.addEventListener("focus",()=>{p(r.indexOf(m))}),m.addEventListener("mouseover",()=>{m.style.backgroundColor="#f0f0f0"}),m.addEventListener("mouseout",()=>{m.style.backgroundColor=""}),m.addEventListener("click",()=>{}),m.setAttribute("data-type",g),m.setAttribute("data-index",y.toString()),l.appendChild(m),r.push(m)})}},"addSection");s("enterpriseLocations",e.enterpriseLocations),s("enterpriseCategories",e.enterpriseCategories),s("Places",e.places),o.appendChild(l),n.appendChild(o);let c=[],p=d(g=>{c.forEach(m=>m()),c=[],r.forEach((m,v)=>{v===g?m.style.backgroundColor="#e0e0e0":m.style.backgroundColor=""});let f=r[g],u=f.getAttribute("data-type"),b=parseInt(f.getAttribute("data-index")||"0",10);if(!u)return;let{item:y}=e[u][b];F.highlight(i,y),t.publish("highlight",y)},"highlightOption"),h=d(g=>{!o.contains(g.target)&&g.target!==n&&a()},"handleClickOutside");document.addEventListener("click",h);let a=d(()=>{n.innerHTML="",document.removeEventListener("click",h)},"destroy");return{destroy(){n.innerHTML="",t.publish("highlight",void 0)}}}d(He,"createCustomDropdown");var j={dropdownContainer:{position:"absolute",color:"#202020"},optionsList:{display:"block",zIndex:"1002",position:"relative",maxHeight:"200px",overflowY:"auto",border:"1px solid #ccc",backgroundColor:"#fff",listStyleType:"none",margin:"0",padding:"0"},sectionHeader:{fontWeight:"bold",padding:"5px",backgroundColor:"#f0f0f0"},option:{padding:"5px",cursor:"pointer"}};function fe(n,e,i){i.domElement.id="interactionPanel";let t=[],{pubsub:o}=me(n,e,i);o.on("highlight",h=>{if(h){t.forEach(g=>g()),t=[];let a=h instanceof M?h.spaces[0]:h;if(a&&!H.is(a))return;t.push(F.highlightCard(n,a,{focus:!0}))}else t.forEach(a=>a()),t=[]});let l=i.addFolder("Click \u{1F447}").close(),{sub:r}=Pe(n,l);r.on("click",h=>{t.forEach(a=>a()),t=[],h.spaces[0]&&(t=[F.highlightCard(n,h.spaces[0])])});let s=i.addFolder("Hover \u{1F681}").close(),{sub:c}=Ge(n,s),p;c.on("hover",h=>{h.spaces[0]?(p==null||p(),t.length===0&&(p=F.highlightCard(n,h.spaces[0]))):(p==null||p(),p=void 0)})}d(fe,"createInteractionControls");function Pe(n,e){let i=new I,t={position:"",hoverColor:E(n.getHoverColor())},o=e.add(t,"position").disable(),l=[];function r(){l.forEach(c=>c()),l.length=0}d(r,"reset");let s=0;return n.on("click",c=>{var u;let{labels:p,markers:h,coordinate:a}=c;r(),i.publish("click",c),clearInterval(s),o.load(JSON.stringify([a.longitude,a.latitude]));let g=p[0]||h[0];if(g){let b=re(n,g,e);if(!b)return;l.push(b.destroy),b.labelItemFolder.openAnimated()}let f=(u=c.spaces[0])!=null?u:c.objects[0];if(f){let b={id:f.id,...n.getState(f.id),type:f.type,isInView:!1,isInViewCheck:oe(n,f.id)},{cleanup:y}=U(n,b,e);s=setInterval(()=>{b.isInView=n.isInView(g||f)},500),l.push(y)}}),{sub:i}}d(Pe,"createClickControls");function Ge(n,e){let i=new I;n.setHoverColor("#1f3a7a");let t={position:"",hoverColor:E(n.getHoverColor()),intersected:"",type:"",id:""},o=e.add(t,"position").disable();e.add(t,"id").disable().listen(),e.add(t,"type").disable().listen(),e.addColor(t,"hoverColor").onChange(s=>{n.setHoverColor(s)});let l=[];function r(){l.forEach(s=>s()),l.length=0}return d(r,"reset"),n.on("hover",s=>{var b,y,m;let{coordinate:c,spaces:p,objects:h,markers:a,labels:g}=s;r(),i.publish("hover",s),o.load(JSON.stringify([c.longitude,c.latitude]));let f=(m=(y=(b=p[0])!=null?b:h[0])!=null?y:a[0])!=null?m:g[0];if(!f)return;let u=n.getState(f);u&&(t.type=u.type,t.id=f.id)}),{sub:i}}d(Ge,"createHoverControls");function oe(n,e){return d(function(){console.log("isInView",n.isInView(e))},"isInView")}d(oe,"createIsInViewHandler");function be(n,e,i){let t={labels:{},all(){i.Labels.all().forEach(f=>{this.labels[f.id]=f}),c()},removeAllLabels(){i.Labels.removeAll().forEach(f=>{delete this.labels[f.id]}),c()}},{addLabel:o,destroy:l}=Be(n,i);n.add(t,"all"),n.add(t,"removeAllLabels");let r=n.addFolder("Label List");n.close();let s=new Map,{rerender:c}=p();function p(){function g(b){var y;delete t.labels[b.id],(y=s.get(b.id))==null||y.destroy()}d(g,"remove");function f(b){let y=re(i,b,r,{onRemove:v=>{g(v)}});if(!y)return;let{labelItemFolder:m}=y;s.set(b.id,m)}d(f,"add");function u(){r.destroy(),r=n.addFolder("Label");for(let b in t.labels){let y=t.labels[b];f(y)}}return d(u,"rerender"),{rerender:u,add:f,remove:g}}d(p,"createLabelControls"),n.domElement.classList.add("list-items");let h;i.on("click",({labels:g,coordinate:f})=>{if(!n._closed)if(g[0]){h==null||h.close();let u=s.get(g[0].id);if(n.open(),!u)return;u==null||u.open(),u==null||u.domElement.scrollIntoView({block:"start"}),u==null||u.domElement.focus(),h=u}else o(f)});function a(g){for(let f of g)t.labels[f.id]=f;c()}return d(a,"populatelabels"),{populatelabels:a,destroy(){l()}}}d(be,"createLabelControls");function re(n,e,i,{onRemove:t}={}){var p,h,a,g;let o=i.addFolder("".concat((p=e.text)==null?void 0:p.substring(0,12)));o.onChange(f=>{n.updateState(e,{appearance:c.appearance,interactive:c.interactive})}),o.close();let l=n.getState(e);if((l==null?void 0:l.type)!=="label")throw new Error("error getting state for label: ".concat(e.id));let{appearance:r,interactive:s}=l;if(!r||r.margin==null||s==null)throw new Error("incomplte label state");let c={text:e.text,interactive:s,appearance:{...r,margin:r.margin||0,marker:{foregroundColor:(a=(h=r.marker)==null?void 0:h.foregroundColor)!=null&&a.active?E((g=r.marker.foregroundColor)==null?void 0:g.active):"black"},text:{foregroundColor:E(r.text.foregroundColor)}},remove(){n.Labels.remove(e),t==null||t(e),o.destroy()},isInView:oe(n,e.id)};return o.add(c.appearance,"margin",0,20).name("margin"),o.add(c,"text"),o.add(c,"interactive"),o.addColor(c.appearance.marker,"foregroundColor").name("marker foreground"),o.addColor(c.appearance.text,"foregroundColor").name("text forground"),o.add(c,"isInView"),o.add(c,"remove"),{labelItemFolder:o,destroy(){o.destroy()}}}d(re,"addLabelControlToFolder");function Be(n,e){let i=n.addFolder("Add"),t={onClick:!1,margin:0,text:"New Label!",interactive:!0,marginForegroundColor:E("skyblue"),marginBackgroundColor:E("coral"),textForegroundColor:E("slategray"),textBackgroundColor:E("white")};return i.add(t,"onClick"),i.add(t,"margin"),i.add(t,"interactive"),i.add(t,"text"),i.addColor(t,"marginForegroundColor"),i.addColor(t,"marginBackgroundColor"),i.addColor(t,"textForegroundColor"),i.addColor(t,"textBackgroundColor"),{destroy(){i.destroy()},addLabel(o){return i._closed||!t.onClick?void 0:e.Labels.add(o,t.text,{appearance:{margin:t.margin,marker:{foregroundColor:{active:t.marginForegroundColor,inactive:t.marginForegroundColor},backgroundColor:{active:t.marginBackgroundColor,inactive:t.marginBackgroundColor}},text:{foregroundColor:t.textForegroundColor,backgroundColor:t.marginBackgroundColor}},interactive:t.interactive})}}}d(Be,"createAddControl");var ve={};C();var ye="camera-ui";function xe(n,e,i){var z,le;let t=n.addFolder("Camera \u{1F4F7}").onOpenClose(x=>{ie({opened:!x._closed},ye)}),{params:o}=ne(ye);o.opened||t.close();let l=e.Camera.center.toJSON(),r=document.createElement("div");Object.assign(r.style,{display:"none",position:"absolute",left:"0px",top:"0px",bottom:"0px",right:"0px",backgroundColor:"aqua",pointerEvents:"none",opacity:.5}),document.body.appendChild(r);let[s,c,p,h]=(z=i==null?void 0:i.padding)!=null?z:[],a={center_lat:l.latitude,center_lon:l.longitude,zoomLevel:e.Camera.zoomLevel,pitch:e.Camera.pitch,bearing:e.Camera.bearing,minZoomLevel:e.Camera.minZoomLevel,maxZoomLevel:e.Camera.maxZoomLevel,inset_type:"pixel",inset_top:s!=null?s:0,inset_left:h!=null?h:0,inset_right:c!=null?c:0,inset_bottom:p!=null?p:0,animateOnLoad:!0,persist:()=>{ie(t.save().controllers,"camera"),navigator.clipboard.writeText(window.location.href)},visualizeInset:!!(s||c||p||h),"Focus on click":(le=i==null?void 0:i.focusOnClick)!=null?le:!0,"Focus on current floor":()=>{e.Camera.focusOn([e.currentFloor],{screenOffsets:{top:20,left:20,right:20,bottom:20}})}};function g(){a.inset_type==="portion"?Object.assign(r.style,{left:a.inset_left*u+"px",top:a.inset_top*f+"px",bottom:a.inset_bottom*f+"px",right:a.inset_right*u+"px"}):Object.assign(r.style,{left:a.inset_left+"px",top:a.inset_top+"px",bottom:a.inset_bottom+"px",right:a.inset_right+"px"})}d(g,"updateInsetVisualizer"),t.add(a,"center_lat").listen().disable(),t.add(a,"center_lon").listen().disable(),t.add(a,"zoomLevel",16,22,.5).listen().disable(),t.add(a,"pitch").listen().disable(),t.add(a,"bearing").listen().disable(),t.add(a,"minZoomLevel",5,22,.5).onChange(x=>{e.Camera.setMinZoomLevel(x)}),t.add(a,"maxZoomLevel",10,22,.5).onChange(x=>{e.Camera.setMaxZoomLevel(x)}),t.add(a,"animateOnLoad"),t.add(a,"visualizeInset").onChange($),$(a.visualizeInset);let{innerHeight:f,innerWidth:u}=window;t.add(a,"inset_type",["pixel","portion"]).onChange(A),t.add(a,"inset_top",0,f).onChange(A),t.add(a,"inset_bottom",0,f).onChange(A),t.add(a,"inset_left",0,u).onChange(A),t.add(a,"inset_right",0,u).onChange(A);let b=je(e);t.add(a,"Focus on click").onChange(x=>{x?e.on("click",b):e.off("click",b)}),a["Focus on click"]&&e.on("click",b),t.add(a,"persist"),t.add(a,"Focus on current floor");let y=d(x=>{t._closed||(a.center_lat=x.center.latitude,a.center_lon=x.center.longitude,a.zoomLevel=x.zoomLevel,a.bearing=x.bearing,a.pitch=x.pitch)},"onCameraChanged");e.on("camera-change",y);let{params:m}=ne("camera",a);if(Object.keys(m).length>0){let x=m;e.Camera.setScreenOffsets({top:x.inset_top,left:x.inset_left,right:x.inset_right,bottom:x.inset_bottom,type:x.inset_type});let de={pitch:x.pitch,center:new ce(x.center_lat,x.center_lon),bearing:x.bearing,zoomLevel:x.zoomLevel};x.animateOnLoad?e.Camera.animateTo(de):e.Camera.set(de),t.load({controllers:x,folders:{}}),g()}let v=[()=>{e.off("camera-change",y)}];function A(){e.Camera.setScreenOffsets({top:a.inset_top,left:a.inset_left,right:a.inset_right,bottom:a.inset_bottom,type:a.inset_type}),g()}d(A,"updateInset"),(a.inset_top||a.inset_right||a.inset_bottom||a.inset_left)&&A();function $(x){x?r.style.display="block":r.style.display="none"}return d($,"visualizeInsetUpdated"),()=>({destroy(){t.destroy(),ge(v)}})}d(xe,"createCameraControls");function je(n){return d(function(i){var r;let{spaces:t,objects:o}=i,l=(r=t[0])!=null?r:o[0];l&&n.Camera.focusOn(l,{bearing:300,pitch:65})},"handler")}d(je,"createHandler");C();function Ce(n,e,i){let t={markers:{},removeAllMarkers(){i.Markers.removeAll().forEach(f=>{delete this.markers[f.id]}),c()}},{addMarker:o,destroy:l}=Ye(n,i);n.add(t,"removeAllMarkers");let r=n.addFolder("Marker List");n.close();let s=new Map,{rerender:c}=p();function p(){function g(b){var y;delete t.markers[b.id],(y=s.get(b.id))==null||y.destroy()}d(g,"remove");function f(b){let y=Ve(i,b,r,{onRemove:v=>{g(v)}});if(!y)return;let{markerItemFolder:m}=y;s.set(b.id,m)}d(f,"add");function u(){r.destroy(),r=n.addFolder("marker");for(let b in t.markers){let y=t.markers[b];f(y)}}return d(u,"rerender"),{rerender:u,add:f,remove:g}}d(p,"createMarkerControls"),n.domElement.classList.add("list-items");let h;i.on("click",({markers:g,coordinate:f})=>{if(!n._closed)if(g[0]){h==null||h.close();let u=s.get(g[0].id);if(n.open(),!u)return;u==null||u.open(),u==null||u.domElement.scrollIntoView({block:"start"}),u==null||u.domElement.focus(),h=u}else o(f)});function a(g){for(let f of g)t.markers[f.id]=f;c()}return d(a,"populateMarkers"),{populateMarkers:a,destroy(){l()}}}d(Ce,"createMarkerControls");function Ve(n,e,i,{onRemove:t}={}){let o=i.addFolder("".concat(e.id.toString().substring(0,8)));o.onChange(c=>{n.updateState(e,{interactive:s.interactive})}),o.close();let l=n.getState(e);if((l==null?void 0:l.type)!=="marker")throw new Error("error getting state for marker: ".concat(e.id));let{interactive:r}=l;if(r==null)throw new Error("incomplte label state");let s={interactive:r,remove(){n.Markers.remove(e),t==null||t(e),o.destroy()}};return o.add(s,"interactive"),o.add(s,"remove"),{markerItemFolder:o,destroy(){o.destroy()}}}d(Ve,"addMarkerControlToFolder");function Ye(n,e){let i=n.addFolder("Add"),t={onClick:!1,interactive:!0};return i.add(t,"onClick"),i.add(t,"interactive"),{destroy(){i.destroy()},addMarker(o){return i._closed||!t.onClick?void 0:e.Markers.add(o,"<div>New Marker</div>",{interactive:t.interactive})}}}d(Ye,"createAddControl");C();function Ae(n,e){let i=n.addFolder("Walls").close(),t={visible:!0,topColor:"#b1fa87",color:"#e8e8e8",texture:{url:""},topTexture:{url:""}};i.add(t,"visible").onChange(r=>{e.updateState("walls",{visible:r})}),i.addColor(t,"topColor").onChange(r=>{e.updateState("walls",{topColor:r})}),i.addColor(t,"color").onChange(r=>{e.updateState("walls",{color:r})}),i.addFolder("Texture - side").add(t.texture,"url").onFinishChange(r=>{e.updateState("walls",{texture:{url:r}})}),i.addFolder("Texture - top").add(t.topTexture,"url").onFinishChange(r=>{e.updateState("walls",{topTexture:{url:r}})}),e.updateState("walls",{topColor:t.topColor}),e.updateState("walls",{color:t.color})}d(Ae,"createGeometryControl");C();function we(n,e,i){var l,r;n.close();let t={language:(r=(l=i.currentLanguage)==null?void 0:l.code)!=null?r:"en"},o=i.getByType("enterprise-venue");n.add(t,"language",o==null?void 0:o.languages.map(s=>s.code)).onChange(s=>{i.changeLanguage(s)})}d(we,"createMiscControl");function Ee(n,e,i){Ne();let t=new B({title:"SDK Controls"});t.domElement.classList.add("mappedin-js-inspector"),fe(e,n,t),xe(t,e,i==null?void 0:i.camera);let o=t.addFolder("Levels").close(),l=t.addFolder("Scene Controls");l.close();let r=t.addFolder("Labels"),s=t.addFolder("Markers");Ae(t,e);let c=t.addFolder("misc");we(c,e,n);let p={level:e.currentFloor.id},{populatelabels:h}=be(r,n,e),{populateMarkers:a}=Ce(s,n,e),g=n.getByType("floor").reduce((u,b)=>(u[b.name]=b.id,u),{}),f=o.add(p,"level",g).onChange(u=>{e.setFloor(u),p.level=e.currentFloor.id,f.updateDisplay()});return e.on("floor-change-start",u=>{o.controllers[0].setValue(u.floor.id)}),n.getByType("space").forEach(u=>{e.updateState(u,{interactive:!0})}),n.getByType("object").forEach(u=>{e.updateState(u,{interactive:!0})}),n.getByType("object").forEach(u=>{e.updateState(u,{interactive:!0})}),e.setHoverColor("#a2b7e6"),e.Camera.setMaxZoomLevel(20),{populatelabels:h,sceneFolder:l,populateMarkers:a}}d(Ee,"createUi");var _e="mappedin-sdk-debug-css";function Ne(){if(document.getElementById(_e))return;let n=document.createElement("style");n.id=_e,n.textContent=ve,document.head.appendChild(n)}d(Ne,"injectCss");var ae=class ae{constructor(e,i){L(this,"_enabled",!1);L(this,"mv");L(this,"api");L(this,"mapData");L(this,"scenegraphVisualizerMounted",!1);L(this,"storeStateToLocalStorageEnabled",!1);this.mv=e,this.api=i,this.mapData=this.api.getMapData()}setMapData(e){this.mapData=e}async enable(e={}){var t;if(this._enabled)return;if(this._enabled=!0,!this.mapData)throw new Error("Please set mapData before enable debug.");let{sceneFolder:i}=Ee(this.mapData,this.mv,e);i.onOpenClose(o=>{o===i&&!o._closed&&!this.scenegraphVisualizerMounted&&(this.scenegraphVisualizerMounted=!0,ue(this.api.core,i))}),(t=this.api.getMapDataInternal())==null||t.spaces.forEach(o=>{this.mv.updateState(o.id,{interactive:!0})})}get enabled(){return this._enabled}};d(ae,"Inspector");var se=ae;export{se as Inspector};
@@ -1 +1 @@
1
- import{b as ie,f as ne,h as oe,i as re,j as ce,k as Oe,l as _}from"./chunk-TTBNS32H.js";import"./chunk-KUVUAM5C.js";import"./chunk-S5HIMMDM.js";import"./chunk-5T2PAGNC.js";import{a as h,d as ze,e as E,f as ee,g as B,h as te,i as se,j}from"./chunk-OANQFXHV.js";j();j();function V(r,e,t,s){function i(n){return n instanceof t?n:new t(function(o){o(n)})}return h(i,"adopt"),new(t||(t=Promise))(function(n,o){function c(u){try{d(s.next(u))}catch(f){o(f)}}h(c,"fulfilled");function a(u){try{d(s.throw(u))}catch(f){o(f)}}h(a,"rejected");function d(u){u.done?n(u.value):i(u.value).then(c,a)}h(d,"step"),d((s=s.apply(r,e||[])).next())})}h(V,"__awaiter");var Ie="ENTRIES",he="KEYS",fe="VALUES",b="",Z=class Z{constructor(e,t){let s=e._tree,i=Array.from(s.keys());this.set=e,this._type=t,this._path=i.length>0?[{node:s,keys:i}]:[]}next(){let e=this.dive();return this.backtrack(),e}dive(){if(this._path.length===0)return{done:!0,value:void 0};let{node:e,keys:t}=v(this._path);if(v(t)===b)return{done:!1,value:this.result()};let s=e.get(v(t));return this._path.push({node:s,keys:Array.from(s.keys())}),this.dive()}backtrack(){if(this._path.length===0)return;let e=v(this._path).keys;e.pop(),!(e.length>0)&&(this._path.pop(),this.backtrack())}key(){return this.set._prefix+this._path.map(({keys:e})=>v(e)).filter(e=>e!==b).join("")}value(){return v(this._path).node.get(b)}result(){switch(this._type){case fe:return this.value();case he:return this.key();default:return[this.key(),this.value()]}}[Symbol.iterator](){return this}};h(Z,"TreeIterator");var M=Z,v=h(r=>r[r.length-1],"last$1"),Fe=h((r,e,t)=>{let s=new Map;if(e===void 0)return s;let i=e.length+1,n=i+t,o=new Uint8Array(n*i).fill(t+1);for(let c=0;c<i;++c)o[c]=c;for(let c=1;c<n;++c)o[c*i]=c;return pe(r,e,t,s,o,1,i,""),s},"fuzzySearch"),pe=h((r,e,t,s,i,n,o,c)=>{let a=n*o;e:for(let d of r.keys())if(d===b){let u=i[a-1];u<=t&&s.set(c,[r.get(d),u])}else{let u=n;for(let f=0;f<d.length;++f,++u){let l=d[f],m=o*u,y=m-o,p=i[m],g=Math.max(0,u-t-1),w=Math.min(o-1,u+t);for(let S=g;S<w;++S){let P=l!==e[S],W=i[y+S]+ +P,k=i[y+S+1]+1,x=i[m+S]+1,F=i[m+S+1]=Math.min(W,k,x);F<p&&(p=F)}if(p>t)continue e}pe(r.get(d),e,t,s,i,u,o,c+d)}},"recurse"),z=class z{constructor(e=new Map,t=""){this._size=void 0,this._tree=e,this._prefix=t}atPrefix(e){if(!e.startsWith(this._prefix))throw new Error("Mismatched prefix");let[t,s]=R(this._tree,e.slice(this._prefix.length));if(t===void 0){let[i,n]=K(s);for(let o of i.keys())if(o!==b&&o.startsWith(n)){let c=new Map;return c.set(o.slice(n.length),i.get(o)),new z(c,e)}}return new z(t,e)}clear(){this._size=void 0,this._tree.clear()}delete(e){return this._size=void 0,Me(this._tree,e)}entries(){return new M(this,Ie)}forEach(e){for(let[t,s]of this)e(t,s,this)}fuzzyGet(e,t){return Fe(this._tree,e,t)}get(e){let t=Q(this._tree,e);return t!==void 0?t.get(b):void 0}has(e){let t=Q(this._tree,e);return t!==void 0&&t.has(b)}keys(){return new M(this,he)}set(e,t){if(typeof e!="string")throw new Error("key must be a string");return this._size=void 0,N(this._tree,e).set(b,t),this}get size(){if(this._size)return this._size;this._size=0;let e=this.entries();for(;!e.next().done;)this._size+=1;return this._size}update(e,t){if(typeof e!="string")throw new Error("key must be a string");this._size=void 0;let s=N(this._tree,e);return s.set(b,t(s.get(b))),this}fetch(e,t){if(typeof e!="string")throw new Error("key must be a string");this._size=void 0;let s=N(this._tree,e),i=s.get(b);return i===void 0&&s.set(b,i=t()),i}values(){return new M(this,fe)}[Symbol.iterator](){return this.entries()}static from(e){let t=new z;for(let[s,i]of e)t.set(s,i);return t}static fromObject(e){return z.from(Object.entries(e))}};h(z,"SearchableMap");var C=z,R=h((r,e,t=[])=>{if(e.length===0||r==null)return[r,t];for(let s of r.keys())if(s!==b&&e.startsWith(s))return t.push([r,s]),R(r.get(s),e.slice(s.length),t);return t.push([r,e]),R(void 0,"",t)},"trackDown"),Q=h((r,e)=>{if(e.length===0||r==null)return r;for(let t of r.keys())if(t!==b&&e.startsWith(t))return Q(r.get(t),e.slice(t.length))},"lookup"),N=h((r,e)=>{let t=e.length;e:for(let s=0;r&&s<t;){for(let n of r.keys())if(n!==b&&e[s]===n[0]){let o=Math.min(t-s,n.length),c=1;for(;c<o&&e[s+c]===n[c];)++c;let a=r.get(n);if(c===n.length)r=a;else{let d=new Map;d.set(n.slice(c),a),r.set(e.slice(s,s+c),d),r.delete(n),r=d}s+=c;continue e}let i=new Map;return r.set(e.slice(s),i),i}return r},"createPath"),Me=h((r,e)=>{let[t,s]=R(r,e);if(t!==void 0){if(t.delete(b),t.size===0)me(s);else if(t.size===1){let[i,n]=t.entries().next().value;ge(s,i,n)}}},"remove"),me=h(r=>{if(r.length===0)return;let[e,t]=K(r);if(e.delete(t),e.size===0)me(r.slice(0,-1));else if(e.size===1){let[s,i]=e.entries().next().value;s!==b&&ge(r.slice(0,-1),s,i)}},"cleanup"),ge=h((r,e,t)=>{if(r.length===0)return;let[s,i]=K(r);s.set(i+e,t),s.delete(i)},"merge"),K=h(r=>r[r.length-1],"last"),Y="or",_e="and",Ce="and_not",I=class I{constructor(e){if((e==null?void 0:e.fields)==null)throw new Error('MiniSearch: option "fields" must be provided');let t=e.autoVacuum==null||e.autoVacuum===!0?q:e.autoVacuum;this._options=Object.assign(Object.assign(Object.assign({},J),e),{autoVacuum:t,searchOptions:Object.assign(Object.assign({},ae),e.searchOptions||{}),autoSuggestOptions:Object.assign(Object.assign({},Ae),e.autoSuggestOptions||{})}),this._index=new C,this._documentCount=0,this._documentIds=new Map,this._idToShortId=new Map,this._fieldIds={},this._fieldLength=new Map,this._avgFieldLength=[],this._nextId=0,this._storedFields=new Map,this._dirtCount=0,this._currentVacuum=null,this._enqueuedVacuum=null,this._enqueuedVacuumConditions=G,this.addFields(this._options.fields)}add(e){let{extractField:t,tokenize:s,processTerm:i,fields:n,idField:o}=this._options,c=t(e,o);if(c==null)throw new Error('MiniSearch: document does not have ID field "'.concat(o,'"'));if(this._idToShortId.has(c))throw new Error("MiniSearch: duplicate ID ".concat(c));let a=this.addDocumentId(c);this.saveStoredFields(a,e);for(let d of n){let u=t(e,d);if(u==null)continue;let f=s(u.toString(),d),l=this._fieldIds[d],m=new Set(f).size;this.addFieldLength(a,l,this._documentCount-1,m);for(let y of f){let p=i(y,d);if(Array.isArray(p))for(let g of p)this.addTerm(l,a,g);else p&&this.addTerm(l,a,p)}}}addAll(e){for(let t of e)this.add(t)}addAllAsync(e,t={}){let{chunkSize:s=10}=t,i={chunk:[],promise:Promise.resolve()},{chunk:n,promise:o}=e.reduce(({chunk:c,promise:a},d,u)=>(c.push(d),(u+1)%s===0?{chunk:[],promise:a.then(()=>new Promise(f=>setTimeout(f,0))).then(()=>this.addAll(c))}:{chunk:c,promise:a}),i);return o.then(()=>this.addAll(n))}remove(e){let{tokenize:t,processTerm:s,extractField:i,fields:n,idField:o}=this._options,c=i(e,o);if(c==null)throw new Error('MiniSearch: document does not have ID field "'.concat(o,'"'));let a=this._idToShortId.get(c);if(a==null)throw new Error("MiniSearch: cannot remove document with ID ".concat(c,": it is not in the index"));for(let d of n){let u=i(e,d);if(u==null)continue;let f=t(u.toString(),d),l=this._fieldIds[d],m=new Set(f).size;this.removeFieldLength(a,l,this._documentCount,m);for(let y of f){let p=s(y,d);if(Array.isArray(p))for(let g of p)this.removeTerm(l,a,g);else p&&this.removeTerm(l,a,p)}}this._storedFields.delete(a),this._documentIds.delete(a),this._idToShortId.delete(c),this._fieldLength.delete(a),this._documentCount-=1}removeAll(e){if(e)for(let t of e)this.remove(t);else{if(arguments.length>0)throw new Error("Expected documents to be present. Omit the argument to remove all documents.");this._index=new C,this._documentCount=0,this._documentIds=new Map,this._idToShortId=new Map,this._fieldLength=new Map,this._avgFieldLength=[],this._storedFields=new Map,this._nextId=0}}discard(e){let t=this._idToShortId.get(e);if(t==null)throw new Error("MiniSearch: cannot discard document with ID ".concat(e,": it is not in the index"));this._idToShortId.delete(e),this._documentIds.delete(t),this._storedFields.delete(t),(this._fieldLength.get(t)||[]).forEach((s,i)=>{this.removeFieldLength(t,i,this._documentCount,s)}),this._fieldLength.delete(t),this._documentCount-=1,this._dirtCount+=1,this.maybeAutoVacuum()}maybeAutoVacuum(){if(this._options.autoVacuum===!1)return;let{minDirtFactor:e,minDirtCount:t,batchSize:s,batchWait:i}=this._options.autoVacuum;this.conditionalVacuum({batchSize:s,batchWait:i},{minDirtCount:t,minDirtFactor:e})}discardAll(e){let t=this._options.autoVacuum;try{this._options.autoVacuum=!1;for(let s of e)this.discard(s)}finally{this._options.autoVacuum=t}this.maybeAutoVacuum()}replace(e){let{idField:t,extractField:s}=this._options,i=s(e,t);this.discard(i),this.add(e)}vacuum(e={}){return this.conditionalVacuum(e)}conditionalVacuum(e,t){return this._currentVacuum?(this._enqueuedVacuumConditions=this._enqueuedVacuumConditions&&t,this._enqueuedVacuum!=null?this._enqueuedVacuum:(this._enqueuedVacuum=this._currentVacuum.then(()=>{let s=this._enqueuedVacuumConditions;return this._enqueuedVacuumConditions=G,this.performVacuuming(e,s)}),this._enqueuedVacuum)):this.vacuumConditionsMet(t)===!1?Promise.resolve():(this._currentVacuum=this.performVacuuming(e),this._currentVacuum)}performVacuuming(e,t){return V(this,void 0,void 0,function*(){let s=this._dirtCount;if(this.vacuumConditionsMet(t)){let i=e.batchSize||U.batchSize,n=e.batchWait||U.batchWait,o=1;for(let[c,a]of this._index){for(let[d,u]of a)for(let[f]of u)this._documentIds.has(f)||(u.size<=1?a.delete(d):u.delete(f));this._index.get(c).size===0&&this._index.delete(c),o%i===0&&(yield new Promise(d=>setTimeout(d,n))),o+=1}this._dirtCount-=s}yield null,this._currentVacuum=this._enqueuedVacuum,this._enqueuedVacuum=null})}vacuumConditionsMet(e){if(e==null)return!0;let{minDirtCount:t,minDirtFactor:s}=e;return t=t||q.minDirtCount,s=s||q.minDirtFactor,this.dirtCount>=t&&this.dirtFactor>=s}get isVacuuming(){return this._currentVacuum!=null}get dirtCount(){return this._dirtCount}get dirtFactor(){return this._dirtCount/(1+this._documentCount+this._dirtCount)}has(e){return this._idToShortId.has(e)}getStoredFields(e){let t=this._idToShortId.get(e);if(t!=null)return this._storedFields.get(t)}search(e,t={}){let s=this.executeQuery(e,t),i=[];for(let[n,{score:o,terms:c,match:a}]of s){let d=c.length||1,u={id:this._documentIds.get(n),score:o*d,terms:Object.keys(a),queryTerms:c,match:a};Object.assign(u,this._storedFields.get(n)),(t.filter==null||t.filter(u))&&i.push(u)}return e===I.wildcard&&t.boostDocument==null&&this._options.searchOptions.boostDocument==null||i.sort(de),i}autoSuggest(e,t={}){t=Object.assign(Object.assign({},this._options.autoSuggestOptions),t);let s=new Map;for(let{score:n,terms:o}of this.search(e,t)){let c=o.join(" "),a=s.get(c);a!=null?(a.score+=n,a.count+=1):s.set(c,{score:n,terms:o,count:1})}let i=[];for(let[n,{score:o,terms:c,count:a}]of s)i.push({suggestion:n,terms:c,score:o/a});return i.sort(de),i}get documentCount(){return this._documentCount}get termCount(){return this._index.size}static loadJSON(e,t){if(t==null)throw new Error("MiniSearch: loadJSON should be given the same options used when serializing the index");return this.loadJS(JSON.parse(e),t)}static loadJSONAsync(e,t){return V(this,void 0,void 0,function*(){if(t==null)throw new Error("MiniSearch: loadJSON should be given the same options used when serializing the index");return this.loadJSAsync(JSON.parse(e),t)})}static getDefault(e){if(J.hasOwnProperty(e))return $(J,e);throw new Error('MiniSearch: unknown option "'.concat(e,'"'))}static loadJS(e,t){let{index:s,documentIds:i,fieldLength:n,storedFields:o,serializationVersion:c}=e,a=this.instantiateMiniSearch(e,t);a._documentIds=A(i),a._fieldLength=A(n),a._storedFields=A(o);for(let[d,u]of a._documentIds)a._idToShortId.set(u,d);for(let[d,u]of s){let f=new Map;for(let l of Object.keys(u)){let m=u[l];c===1&&(m=m.ds),f.set(parseInt(l,10),A(m))}a._index.set(d,f)}return a}static loadJSAsync(e,t){return V(this,void 0,void 0,function*(){let{index:s,documentIds:i,fieldLength:n,storedFields:o,serializationVersion:c}=e,a=this.instantiateMiniSearch(e,t);a._documentIds=yield T(i),a._fieldLength=yield T(n),a._storedFields=yield T(o);for(let[u,f]of a._documentIds)a._idToShortId.set(f,u);let d=0;for(let[u,f]of s){let l=new Map;for(let m of Object.keys(f)){let y=f[m];c===1&&(y=y.ds),l.set(parseInt(m,10),yield T(y))}++d%1e3===0&&(yield ye(0)),a._index.set(u,l)}return a})}static instantiateMiniSearch(e,t){let{documentCount:s,nextId:i,fieldIds:n,averageFieldLength:o,dirtCount:c,serializationVersion:a}=e;if(a!==1&&a!==2)throw new Error("MiniSearch: cannot deserialize an index created with an incompatible version");let d=new I(t);return d._documentCount=s,d._nextId=i,d._idToShortId=new Map,d._fieldIds=n,d._avgFieldLength=o,d._dirtCount=c||0,d._index=new C,d}executeQuery(e,t={}){if(e===I.wildcard)return this.executeWildcardQuery(t);if(typeof e!="string"){let l=Object.assign(Object.assign(Object.assign({},t),e),{queries:void 0}),m=e.queries.map(y=>this.executeQuery(y,l));return this.combineResults(m,l.combineWith)}let{tokenize:s,processTerm:i,searchOptions:n}=this._options,o=Object.assign(Object.assign({tokenize:s,processTerm:i},n),t),{tokenize:c,processTerm:a}=o,f=c(e).flatMap(l=>a(l)).filter(l=>!!l).map(je(o)).map(l=>this.executeQuerySpec(l,o));return this.combineResults(f,o.combineWith)}executeQuerySpec(e,t){let s=Object.assign(Object.assign({},this._options.searchOptions),t),i=(s.fields||this._options.fields).reduce((p,g)=>Object.assign(Object.assign({},p),{[g]:$(s.boost,g)||1}),{}),{boostDocument:n,weights:o,maxFuzzy:c,bm25:a}=s,{fuzzy:d,prefix:u}=Object.assign(Object.assign({},ae.weights),o),f=this._index.get(e.term),l=this.termResults(e.term,e.term,1,e.termBoost,f,i,n,a),m,y;if(e.prefix&&(m=this._index.atPrefix(e.term)),e.fuzzy){let p=e.fuzzy===!0?.2:e.fuzzy,g=p<1?Math.min(c,Math.round(e.term.length*p)):p;g&&(y=this._index.fuzzyGet(e.term,g))}if(m)for(let[p,g]of m){let w=p.length-e.term.length;if(!w)continue;y==null||y.delete(p);let S=u*p.length/(p.length+.3*w);this.termResults(e.term,p,S,e.termBoost,g,i,n,a,l)}if(y)for(let p of y.keys()){let[g,w]=y.get(p);if(!w)continue;let S=d*p.length/(p.length+w);this.termResults(e.term,p,S,e.termBoost,g,i,n,a,l)}return l}executeWildcardQuery(e){let t=new Map,s=Object.assign(Object.assign({},this._options.searchOptions),e);for(let[i,n]of this._documentIds){let o=s.boostDocument?s.boostDocument(n,"",this._storedFields.get(i)):1;t.set(i,{score:o,terms:[],match:{}})}return t}combineResults(e,t=Y){if(e.length===0)return new Map;let s=t.toLowerCase(),i=Le[s];if(!i)throw new Error("Invalid combination operator: ".concat(t));return e.reduce(i)||new Map}toJSON(){let e=[];for(let[t,s]of this._index){let i={};for(let[n,o]of s)i[n]=Object.fromEntries(o);e.push([t,i])}return{documentCount:this._documentCount,nextId:this._nextId,documentIds:Object.fromEntries(this._documentIds),fieldIds:this._fieldIds,fieldLength:Object.fromEntries(this._fieldLength),averageFieldLength:this._avgFieldLength,storedFields:Object.fromEntries(this._storedFields),dirtCount:this._dirtCount,index:e,serializationVersion:2}}termResults(e,t,s,i,n,o,c,a,d=new Map){if(n==null)return d;for(let u of Object.keys(o)){let f=o[u],l=this._fieldIds[u],m=n.get(l);if(m==null)continue;let y=m.size,p=this._avgFieldLength[l];for(let g of m.keys()){if(!this._documentIds.has(g)){this.removeTerm(l,g,t),y-=1;continue}let w=c?c(this._documentIds.get(g),t,this._storedFields.get(g)):1;if(!w)continue;let S=m.get(g),P=this._fieldLength.get(g)[l],W=Ee(S,y,this._documentCount,P,p,a),k=s*i*f*w*W,x=d.get(g);if(x){x.score+=k,Te(x.terms,e);let F=$(x.match,t);F?F.push(u):x.match[t]=[u]}else d.set(g,{score:k,terms:[e],match:{[t]:[u]}})}}return d}addTerm(e,t,s){let i=this._index.fetch(s,le),n=i.get(e);if(n==null)n=new Map,n.set(t,1),i.set(e,n);else{let o=n.get(t);n.set(t,(o||0)+1)}}removeTerm(e,t,s){if(!this._index.has(s)){this.warnDocumentChanged(t,e,s);return}let i=this._index.fetch(s,le),n=i.get(e);n==null||n.get(t)==null?this.warnDocumentChanged(t,e,s):n.get(t)<=1?n.size<=1?i.delete(e):n.delete(t):n.set(t,n.get(t)-1),this._index.get(s).size===0&&this._index.delete(s)}warnDocumentChanged(e,t,s){for(let i of Object.keys(this._fieldIds))if(this._fieldIds[i]===t){this._options.logger("warn","MiniSearch: document with ID ".concat(this._documentIds.get(e),' has changed before removal: term "').concat(s,'" was not present in field "').concat(i,'". Removing a document after it has changed can corrupt the index!'),"version_conflict");return}}addDocumentId(e){let t=this._nextId;return this._idToShortId.set(e,t),this._documentIds.set(t,e),this._documentCount+=1,this._nextId+=1,t}addFields(e){for(let t=0;t<e.length;t++)this._fieldIds[e[t]]=t}addFieldLength(e,t,s,i){let n=this._fieldLength.get(e);n==null&&this._fieldLength.set(e,n=[]),n[t]=i;let c=(this._avgFieldLength[t]||0)*s+i;this._avgFieldLength[t]=c/(s+1)}removeFieldLength(e,t,s,i){if(s===1){this._avgFieldLength[t]=0;return}let n=this._avgFieldLength[t]*s-i;this._avgFieldLength[t]=n/(s-1)}saveStoredFields(e,t){let{storeFields:s,extractField:i}=this._options;if(s==null||s.length===0)return;let n=this._storedFields.get(e);n==null&&this._storedFields.set(e,n={});for(let o of s){let c=i(t,o);c!==void 0&&(n[o]=c)}}};h(I,"MiniSearch");var O=I;O.wildcard=Symbol("*");var $=h((r,e)=>Object.prototype.hasOwnProperty.call(r,e)?r[e]:void 0,"getOwnProperty"),Le={[Y]:(r,e)=>{for(let t of e.keys()){let s=r.get(t);if(s==null)r.set(t,e.get(t));else{let{score:i,terms:n,match:o}=e.get(t);s.score=s.score+i,s.match=Object.assign(s.match,o),ue(s.terms,n)}}return r},[_e]:(r,e)=>{let t=new Map;for(let s of e.keys()){let i=r.get(s);if(i==null)continue;let{score:n,terms:o,match:c}=e.get(s);ue(i.terms,o),t.set(s,{score:i.score+n,terms:i.terms,match:Object.assign(i.match,c)})}return t},[Ce]:(r,e)=>{for(let t of e.keys())r.delete(t);return r}},ke={k:1.2,b:.7,d:.5},Ee=h((r,e,t,s,i,n)=>{let{k:o,b:c,d:a}=n;return Math.log(1+(t-e+.5)/(e+.5))*(a+r*(o+1)/(r+o*(1-c+c*s/i)))},"calcBM25Score"),je=h(r=>(e,t,s)=>{let i=typeof r.fuzzy=="function"?r.fuzzy(e,t,s):r.fuzzy||!1,n=typeof r.prefix=="function"?r.prefix(e,t,s):r.prefix===!0,o=typeof r.boostTerm=="function"?r.boostTerm(e,t,s):1;return{term:e,fuzzy:i,prefix:n,termBoost:o}},"termToQuerySpec"),J={idField:"id",extractField:(r,e)=>r[e],tokenize:r=>r.split(Ve),processTerm:r=>r.toLowerCase(),fields:void 0,searchOptions:void 0,storeFields:[],logger:(r,e)=>{typeof(console==null?void 0:console[r])=="function"&&console[r](e)},autoVacuum:!0},ae={combineWith:Y,prefix:!1,fuzzy:!1,maxFuzzy:6,boost:{},weights:{fuzzy:.45,prefix:.375},bm25:ke},Ae={combineWith:_e,prefix:(r,e,t)=>e===t.length-1},U={batchSize:1e3,batchWait:10},G={minDirtFactor:.1,minDirtCount:20},q=Object.assign(Object.assign({},U),G),Te=h((r,e)=>{r.includes(e)||r.push(e)},"assignUniqueTerm"),ue=h((r,e)=>{for(let t of e)r.includes(t)||r.push(t)},"assignUniqueTerms"),de=h(({score:r},{score:e})=>e-r,"byScore"),le=h(()=>new Map,"createMap"),A=h(r=>{let e=new Map;for(let t of Object.keys(r))e.set(parseInt(t,10),r[t]);return e},"objectToNumericMap"),T=h(r=>V(void 0,void 0,void 0,function*(){let e=new Map,t=0;for(let s of Object.keys(r))e.set(parseInt(s,10),r[s]),++t%1e3===0&&(yield ye(0));return e}),"objectToNumericMapAsync"),ye=h(r=>new Promise(e=>setTimeout(e,r)),"wait"),Ve=/[\n\r\p{Z}\p{P}]+/u;var we=ze(Oe());var L,D,xe,X=class X{constructor(e){B(this,D);E(this,"mapData");E(this,"indexes");E(this,"ready");B(this,L,void 0);this.mapData=e,this.indexes=Pe(e),this.ready=this.populate(),te(this,L,ie(se(this,D,xe).bind(this),2e3))}async populate(){let{places:e,enterpriseLocations:t,enterpriseCategories:s}=this.indexes,i=this.mapData,n=[];return e.removeAll(),n.concat([e.addAllAsync(i.getByType("space")),e.addAllAsync(i.getByType("point-of-interest")),e.addAllAsync(i.getByType("connection")),e.addAllAsync(i.getByType("floor")),e.addAllAsync(i.getByType("door")),e.addAllAsync(i.getByType("annotation"))]),t&&(t==null||t.removeAll(),n.push(t.addAllAsync(i.getByType("enterprise-location")))),s&&(s==null||s.removeAll(),n.push(s.addAllAsync(i.getByType("enterprise-category")))),Promise.all(n)}async search(e,t={}){var a,d;await this.ready,We.parse(t);let s=(0,we.default)({},t,De),i=this.indexes.places.search(e,{fields:Object.keys(s.places.fields).filter(u=>s.places.fields[u])}).slice(0,s.places.limit),n=(a=this.indexes.enterpriseLocations)==null?void 0:a.search(e,{fields:Object.keys(s.enterpriseLocations.fields).filter(u=>s.enterpriseLocations.fields[u])}).slice(0,s.enterpriseLocations.limit),o=(d=this.indexes.enterpriseCategories)==null?void 0:d.search(e,{fields:Object.keys(s.enterpriseCategories.fields).filter(u=>s.enterpriseCategories.fields[u])}).slice(0,s.enterpriseCategories.limit),c=Re(this.mapData,{placesResult:i,locationsResult:n,categoriesResult:o});return ee(this,L).call(this,e),c}async suggest(e,t={}){await this.ready,Be.parse(t);let s=[],{places:{enabled:i=!0}={},enterpriseLocations:{enabled:n=!0}={}}=t;return n&&this.indexes.enterpriseLocations&&this.indexes.enterpriseLocations.autoSuggest(e,{fields:["name","tags"],combineWith:"AND",prefix:!0,boost:{name:2,tags:1}}).forEach(o=>s.push(o)),i&&this.indexes.places.autoSuggest(e,{fields:["name"],combineWith:"AND",prefix:!0}).forEach(o=>s.push(o)),s.sort((o,c)=>c.score-o.score),this.mapData.Analytics.capture("$query-suggest",{query:e,suggestions:s.map(o=>o.suggestion)}),s}};L=new WeakMap,D=new WeakSet,xe=h(function(e){this.mapData.Analytics.capture("$query-search",{query:e})},"#trackSearch"),h(X,"InternalSearch");var be=X;function Re(r,{placesResult:e,locationsResult:t,categoriesResult:s}){let i=e.reduce((c,{id:a,match:d,score:u,__type:f})=>{let l=r.getById(f,a);return l!=null&&!ne.is(l)&&!oe.is(l)&&!re.is(l)&&!ce.is(l)&&c.push({type:l.__type,match:d,score:u,item:l}),c},[]),n;if(t){n=[];for(let{id:c,match:a,score:d}of t){let u=r.getById("enterprise-location",c);u&&n.push({type:u.__type,match:a,score:d,item:u})}}let o;if(s){o=[];for(let{id:c,match:a,score:d}of s){let u=r.getById("enterprise-category",c);u&&o.push({type:u.__type,match:a,score:d,item:u})}}return{places:i,enterpriseLocations:n,enterpriseCategories:o}}h(Re,"processSearchResult");var De={places:{fields:{name:!0,description:!0},limit:5},enterpriseCategories:{fields:{name:!0,description:!1,"locations.name":!0},limit:5},enterpriseLocations:{fields:{name:!0,tags:!0,description:!0},limit:5}};function H(r){return r.normalize("NFD").replace(/[\u0300-\u036f|\u2019|\u0027|\']/g,"").toLowerCase()}h(H,"removeAccents");function Pe(r){let e=new O({fields:["name","description"],storeFields:["id","__type"],searchOptions:{fuzzy:.2,prefix:!0,boost:{name:2},combineWith:"AND"},extractField:(o,c)=>{let a=o[c];return typeof a=="string"?H(a):o[c]},processTerm:o=>Ne.has(o)?"":o.toLowerCase()}),t=r.getByType("enterprise-location"),s;t&&(s=new O({fields:["name","tags","description"],storeFields:["id","__type"],searchOptions:{combineWith:"OR",prefix:!0,fuzzy:.2,boost:{name:3,tags:2,description:1}},extractField:(o,c)=>Array.isArray(o[c])?o[c].join(" "):typeof o[c]=="string"?H(o[c]):o[c]}));let i=r.getByType("enterprise-category"),n;return i&&(n=new O({fields:["name","description","locations.name"],storeFields:["id","__type"],extractField(o,c){return c==="locations.name"?o.locations.reduce((d,u)=>d+" ".concat(Se," ")+u.name,"")+" ".concat(Se):typeof o[c]=="string"?H(o[c]):o[c]},searchOptions:{combineWith:"OR",prefix:!0,fuzzy:.2,boost:{name:2,"locations.name":2}}})),{enterpriseCategories:n,enterpriseLocations:s,places:e}}h(Pe,"buildIndexes");var We=_.object({places:_.object({fields:_.object({name:_.boolean().optional(),description:_.boolean().optional()}).optional(),limit:_.number().positive().optional()}).optional(),enterpriseCategories:_.object({fields:_.object({name:_.boolean().optional(),description:_.boolean().optional(),"locations.name":_.boolean().optional()}).optional(),limit:_.number().positive().optional()}).optional(),enterpriseLocations:_.object({fields:_.object({name:_.boolean().optional(),tags:_.boolean().optional(),description:_.boolean().optional()}).optional(),limit:_.number().positive().optional()}).optional()}),Be=_.object({places:_.object({enabled:_.boolean().optional()}).optional(),enterpriseLocations:_.object({enabled:_.boolean().optional()}).optional()}),Ne=new Set(["the","an","and","or","of","in","on","at","to","from","with","by","for"]),Se="";export{be as InternalSearch,H as removeAccents};
1
+ import{b as ie,f as ne,h as oe,i as re,j as ce,k as Oe,l as _}from"./chunk-NPRXXUN6.js";import"./chunk-QQ53JNBN.js";import"./chunk-Z7MNFX3S.js";import"./chunk-VT2X5G75.js";import{a as h,d as ze,e as E,f as ee,g as B,h as te,i as se,j}from"./chunk-OQLRRFPP.js";j();j();function V(r,e,t,s){function i(n){return n instanceof t?n:new t(function(o){o(n)})}return h(i,"adopt"),new(t||(t=Promise))(function(n,o){function c(u){try{d(s.next(u))}catch(f){o(f)}}h(c,"fulfilled");function a(u){try{d(s.throw(u))}catch(f){o(f)}}h(a,"rejected");function d(u){u.done?n(u.value):i(u.value).then(c,a)}h(d,"step"),d((s=s.apply(r,e||[])).next())})}h(V,"__awaiter");var Ie="ENTRIES",he="KEYS",fe="VALUES",b="",Z=class Z{constructor(e,t){let s=e._tree,i=Array.from(s.keys());this.set=e,this._type=t,this._path=i.length>0?[{node:s,keys:i}]:[]}next(){let e=this.dive();return this.backtrack(),e}dive(){if(this._path.length===0)return{done:!0,value:void 0};let{node:e,keys:t}=v(this._path);if(v(t)===b)return{done:!1,value:this.result()};let s=e.get(v(t));return this._path.push({node:s,keys:Array.from(s.keys())}),this.dive()}backtrack(){if(this._path.length===0)return;let e=v(this._path).keys;e.pop(),!(e.length>0)&&(this._path.pop(),this.backtrack())}key(){return this.set._prefix+this._path.map(({keys:e})=>v(e)).filter(e=>e!==b).join("")}value(){return v(this._path).node.get(b)}result(){switch(this._type){case fe:return this.value();case he:return this.key();default:return[this.key(),this.value()]}}[Symbol.iterator](){return this}};h(Z,"TreeIterator");var M=Z,v=h(r=>r[r.length-1],"last$1"),Fe=h((r,e,t)=>{let s=new Map;if(e===void 0)return s;let i=e.length+1,n=i+t,o=new Uint8Array(n*i).fill(t+1);for(let c=0;c<i;++c)o[c]=c;for(let c=1;c<n;++c)o[c*i]=c;return pe(r,e,t,s,o,1,i,""),s},"fuzzySearch"),pe=h((r,e,t,s,i,n,o,c)=>{let a=n*o;e:for(let d of r.keys())if(d===b){let u=i[a-1];u<=t&&s.set(c,[r.get(d),u])}else{let u=n;for(let f=0;f<d.length;++f,++u){let l=d[f],m=o*u,y=m-o,p=i[m],g=Math.max(0,u-t-1),w=Math.min(o-1,u+t);for(let S=g;S<w;++S){let P=l!==e[S],W=i[y+S]+ +P,k=i[y+S+1]+1,x=i[m+S]+1,F=i[m+S+1]=Math.min(W,k,x);F<p&&(p=F)}if(p>t)continue e}pe(r.get(d),e,t,s,i,u,o,c+d)}},"recurse"),z=class z{constructor(e=new Map,t=""){this._size=void 0,this._tree=e,this._prefix=t}atPrefix(e){if(!e.startsWith(this._prefix))throw new Error("Mismatched prefix");let[t,s]=R(this._tree,e.slice(this._prefix.length));if(t===void 0){let[i,n]=K(s);for(let o of i.keys())if(o!==b&&o.startsWith(n)){let c=new Map;return c.set(o.slice(n.length),i.get(o)),new z(c,e)}}return new z(t,e)}clear(){this._size=void 0,this._tree.clear()}delete(e){return this._size=void 0,Me(this._tree,e)}entries(){return new M(this,Ie)}forEach(e){for(let[t,s]of this)e(t,s,this)}fuzzyGet(e,t){return Fe(this._tree,e,t)}get(e){let t=Q(this._tree,e);return t!==void 0?t.get(b):void 0}has(e){let t=Q(this._tree,e);return t!==void 0&&t.has(b)}keys(){return new M(this,he)}set(e,t){if(typeof e!="string")throw new Error("key must be a string");return this._size=void 0,N(this._tree,e).set(b,t),this}get size(){if(this._size)return this._size;this._size=0;let e=this.entries();for(;!e.next().done;)this._size+=1;return this._size}update(e,t){if(typeof e!="string")throw new Error("key must be a string");this._size=void 0;let s=N(this._tree,e);return s.set(b,t(s.get(b))),this}fetch(e,t){if(typeof e!="string")throw new Error("key must be a string");this._size=void 0;let s=N(this._tree,e),i=s.get(b);return i===void 0&&s.set(b,i=t()),i}values(){return new M(this,fe)}[Symbol.iterator](){return this.entries()}static from(e){let t=new z;for(let[s,i]of e)t.set(s,i);return t}static fromObject(e){return z.from(Object.entries(e))}};h(z,"SearchableMap");var C=z,R=h((r,e,t=[])=>{if(e.length===0||r==null)return[r,t];for(let s of r.keys())if(s!==b&&e.startsWith(s))return t.push([r,s]),R(r.get(s),e.slice(s.length),t);return t.push([r,e]),R(void 0,"",t)},"trackDown"),Q=h((r,e)=>{if(e.length===0||r==null)return r;for(let t of r.keys())if(t!==b&&e.startsWith(t))return Q(r.get(t),e.slice(t.length))},"lookup"),N=h((r,e)=>{let t=e.length;e:for(let s=0;r&&s<t;){for(let n of r.keys())if(n!==b&&e[s]===n[0]){let o=Math.min(t-s,n.length),c=1;for(;c<o&&e[s+c]===n[c];)++c;let a=r.get(n);if(c===n.length)r=a;else{let d=new Map;d.set(n.slice(c),a),r.set(e.slice(s,s+c),d),r.delete(n),r=d}s+=c;continue e}let i=new Map;return r.set(e.slice(s),i),i}return r},"createPath"),Me=h((r,e)=>{let[t,s]=R(r,e);if(t!==void 0){if(t.delete(b),t.size===0)me(s);else if(t.size===1){let[i,n]=t.entries().next().value;ge(s,i,n)}}},"remove"),me=h(r=>{if(r.length===0)return;let[e,t]=K(r);if(e.delete(t),e.size===0)me(r.slice(0,-1));else if(e.size===1){let[s,i]=e.entries().next().value;s!==b&&ge(r.slice(0,-1),s,i)}},"cleanup"),ge=h((r,e,t)=>{if(r.length===0)return;let[s,i]=K(r);s.set(i+e,t),s.delete(i)},"merge"),K=h(r=>r[r.length-1],"last"),Y="or",_e="and",Ce="and_not",I=class I{constructor(e){if((e==null?void 0:e.fields)==null)throw new Error('MiniSearch: option "fields" must be provided');let t=e.autoVacuum==null||e.autoVacuum===!0?q:e.autoVacuum;this._options=Object.assign(Object.assign(Object.assign({},J),e),{autoVacuum:t,searchOptions:Object.assign(Object.assign({},ae),e.searchOptions||{}),autoSuggestOptions:Object.assign(Object.assign({},Ae),e.autoSuggestOptions||{})}),this._index=new C,this._documentCount=0,this._documentIds=new Map,this._idToShortId=new Map,this._fieldIds={},this._fieldLength=new Map,this._avgFieldLength=[],this._nextId=0,this._storedFields=new Map,this._dirtCount=0,this._currentVacuum=null,this._enqueuedVacuum=null,this._enqueuedVacuumConditions=G,this.addFields(this._options.fields)}add(e){let{extractField:t,tokenize:s,processTerm:i,fields:n,idField:o}=this._options,c=t(e,o);if(c==null)throw new Error('MiniSearch: document does not have ID field "'.concat(o,'"'));if(this._idToShortId.has(c))throw new Error("MiniSearch: duplicate ID ".concat(c));let a=this.addDocumentId(c);this.saveStoredFields(a,e);for(let d of n){let u=t(e,d);if(u==null)continue;let f=s(u.toString(),d),l=this._fieldIds[d],m=new Set(f).size;this.addFieldLength(a,l,this._documentCount-1,m);for(let y of f){let p=i(y,d);if(Array.isArray(p))for(let g of p)this.addTerm(l,a,g);else p&&this.addTerm(l,a,p)}}}addAll(e){for(let t of e)this.add(t)}addAllAsync(e,t={}){let{chunkSize:s=10}=t,i={chunk:[],promise:Promise.resolve()},{chunk:n,promise:o}=e.reduce(({chunk:c,promise:a},d,u)=>(c.push(d),(u+1)%s===0?{chunk:[],promise:a.then(()=>new Promise(f=>setTimeout(f,0))).then(()=>this.addAll(c))}:{chunk:c,promise:a}),i);return o.then(()=>this.addAll(n))}remove(e){let{tokenize:t,processTerm:s,extractField:i,fields:n,idField:o}=this._options,c=i(e,o);if(c==null)throw new Error('MiniSearch: document does not have ID field "'.concat(o,'"'));let a=this._idToShortId.get(c);if(a==null)throw new Error("MiniSearch: cannot remove document with ID ".concat(c,": it is not in the index"));for(let d of n){let u=i(e,d);if(u==null)continue;let f=t(u.toString(),d),l=this._fieldIds[d],m=new Set(f).size;this.removeFieldLength(a,l,this._documentCount,m);for(let y of f){let p=s(y,d);if(Array.isArray(p))for(let g of p)this.removeTerm(l,a,g);else p&&this.removeTerm(l,a,p)}}this._storedFields.delete(a),this._documentIds.delete(a),this._idToShortId.delete(c),this._fieldLength.delete(a),this._documentCount-=1}removeAll(e){if(e)for(let t of e)this.remove(t);else{if(arguments.length>0)throw new Error("Expected documents to be present. Omit the argument to remove all documents.");this._index=new C,this._documentCount=0,this._documentIds=new Map,this._idToShortId=new Map,this._fieldLength=new Map,this._avgFieldLength=[],this._storedFields=new Map,this._nextId=0}}discard(e){let t=this._idToShortId.get(e);if(t==null)throw new Error("MiniSearch: cannot discard document with ID ".concat(e,": it is not in the index"));this._idToShortId.delete(e),this._documentIds.delete(t),this._storedFields.delete(t),(this._fieldLength.get(t)||[]).forEach((s,i)=>{this.removeFieldLength(t,i,this._documentCount,s)}),this._fieldLength.delete(t),this._documentCount-=1,this._dirtCount+=1,this.maybeAutoVacuum()}maybeAutoVacuum(){if(this._options.autoVacuum===!1)return;let{minDirtFactor:e,minDirtCount:t,batchSize:s,batchWait:i}=this._options.autoVacuum;this.conditionalVacuum({batchSize:s,batchWait:i},{minDirtCount:t,minDirtFactor:e})}discardAll(e){let t=this._options.autoVacuum;try{this._options.autoVacuum=!1;for(let s of e)this.discard(s)}finally{this._options.autoVacuum=t}this.maybeAutoVacuum()}replace(e){let{idField:t,extractField:s}=this._options,i=s(e,t);this.discard(i),this.add(e)}vacuum(e={}){return this.conditionalVacuum(e)}conditionalVacuum(e,t){return this._currentVacuum?(this._enqueuedVacuumConditions=this._enqueuedVacuumConditions&&t,this._enqueuedVacuum!=null?this._enqueuedVacuum:(this._enqueuedVacuum=this._currentVacuum.then(()=>{let s=this._enqueuedVacuumConditions;return this._enqueuedVacuumConditions=G,this.performVacuuming(e,s)}),this._enqueuedVacuum)):this.vacuumConditionsMet(t)===!1?Promise.resolve():(this._currentVacuum=this.performVacuuming(e),this._currentVacuum)}performVacuuming(e,t){return V(this,void 0,void 0,function*(){let s=this._dirtCount;if(this.vacuumConditionsMet(t)){let i=e.batchSize||U.batchSize,n=e.batchWait||U.batchWait,o=1;for(let[c,a]of this._index){for(let[d,u]of a)for(let[f]of u)this._documentIds.has(f)||(u.size<=1?a.delete(d):u.delete(f));this._index.get(c).size===0&&this._index.delete(c),o%i===0&&(yield new Promise(d=>setTimeout(d,n))),o+=1}this._dirtCount-=s}yield null,this._currentVacuum=this._enqueuedVacuum,this._enqueuedVacuum=null})}vacuumConditionsMet(e){if(e==null)return!0;let{minDirtCount:t,minDirtFactor:s}=e;return t=t||q.minDirtCount,s=s||q.minDirtFactor,this.dirtCount>=t&&this.dirtFactor>=s}get isVacuuming(){return this._currentVacuum!=null}get dirtCount(){return this._dirtCount}get dirtFactor(){return this._dirtCount/(1+this._documentCount+this._dirtCount)}has(e){return this._idToShortId.has(e)}getStoredFields(e){let t=this._idToShortId.get(e);if(t!=null)return this._storedFields.get(t)}search(e,t={}){let s=this.executeQuery(e,t),i=[];for(let[n,{score:o,terms:c,match:a}]of s){let d=c.length||1,u={id:this._documentIds.get(n),score:o*d,terms:Object.keys(a),queryTerms:c,match:a};Object.assign(u,this._storedFields.get(n)),(t.filter==null||t.filter(u))&&i.push(u)}return e===I.wildcard&&t.boostDocument==null&&this._options.searchOptions.boostDocument==null||i.sort(de),i}autoSuggest(e,t={}){t=Object.assign(Object.assign({},this._options.autoSuggestOptions),t);let s=new Map;for(let{score:n,terms:o}of this.search(e,t)){let c=o.join(" "),a=s.get(c);a!=null?(a.score+=n,a.count+=1):s.set(c,{score:n,terms:o,count:1})}let i=[];for(let[n,{score:o,terms:c,count:a}]of s)i.push({suggestion:n,terms:c,score:o/a});return i.sort(de),i}get documentCount(){return this._documentCount}get termCount(){return this._index.size}static loadJSON(e,t){if(t==null)throw new Error("MiniSearch: loadJSON should be given the same options used when serializing the index");return this.loadJS(JSON.parse(e),t)}static loadJSONAsync(e,t){return V(this,void 0,void 0,function*(){if(t==null)throw new Error("MiniSearch: loadJSON should be given the same options used when serializing the index");return this.loadJSAsync(JSON.parse(e),t)})}static getDefault(e){if(J.hasOwnProperty(e))return $(J,e);throw new Error('MiniSearch: unknown option "'.concat(e,'"'))}static loadJS(e,t){let{index:s,documentIds:i,fieldLength:n,storedFields:o,serializationVersion:c}=e,a=this.instantiateMiniSearch(e,t);a._documentIds=A(i),a._fieldLength=A(n),a._storedFields=A(o);for(let[d,u]of a._documentIds)a._idToShortId.set(u,d);for(let[d,u]of s){let f=new Map;for(let l of Object.keys(u)){let m=u[l];c===1&&(m=m.ds),f.set(parseInt(l,10),A(m))}a._index.set(d,f)}return a}static loadJSAsync(e,t){return V(this,void 0,void 0,function*(){let{index:s,documentIds:i,fieldLength:n,storedFields:o,serializationVersion:c}=e,a=this.instantiateMiniSearch(e,t);a._documentIds=yield T(i),a._fieldLength=yield T(n),a._storedFields=yield T(o);for(let[u,f]of a._documentIds)a._idToShortId.set(f,u);let d=0;for(let[u,f]of s){let l=new Map;for(let m of Object.keys(f)){let y=f[m];c===1&&(y=y.ds),l.set(parseInt(m,10),yield T(y))}++d%1e3===0&&(yield ye(0)),a._index.set(u,l)}return a})}static instantiateMiniSearch(e,t){let{documentCount:s,nextId:i,fieldIds:n,averageFieldLength:o,dirtCount:c,serializationVersion:a}=e;if(a!==1&&a!==2)throw new Error("MiniSearch: cannot deserialize an index created with an incompatible version");let d=new I(t);return d._documentCount=s,d._nextId=i,d._idToShortId=new Map,d._fieldIds=n,d._avgFieldLength=o,d._dirtCount=c||0,d._index=new C,d}executeQuery(e,t={}){if(e===I.wildcard)return this.executeWildcardQuery(t);if(typeof e!="string"){let l=Object.assign(Object.assign(Object.assign({},t),e),{queries:void 0}),m=e.queries.map(y=>this.executeQuery(y,l));return this.combineResults(m,l.combineWith)}let{tokenize:s,processTerm:i,searchOptions:n}=this._options,o=Object.assign(Object.assign({tokenize:s,processTerm:i},n),t),{tokenize:c,processTerm:a}=o,f=c(e).flatMap(l=>a(l)).filter(l=>!!l).map(je(o)).map(l=>this.executeQuerySpec(l,o));return this.combineResults(f,o.combineWith)}executeQuerySpec(e,t){let s=Object.assign(Object.assign({},this._options.searchOptions),t),i=(s.fields||this._options.fields).reduce((p,g)=>Object.assign(Object.assign({},p),{[g]:$(s.boost,g)||1}),{}),{boostDocument:n,weights:o,maxFuzzy:c,bm25:a}=s,{fuzzy:d,prefix:u}=Object.assign(Object.assign({},ae.weights),o),f=this._index.get(e.term),l=this.termResults(e.term,e.term,1,e.termBoost,f,i,n,a),m,y;if(e.prefix&&(m=this._index.atPrefix(e.term)),e.fuzzy){let p=e.fuzzy===!0?.2:e.fuzzy,g=p<1?Math.min(c,Math.round(e.term.length*p)):p;g&&(y=this._index.fuzzyGet(e.term,g))}if(m)for(let[p,g]of m){let w=p.length-e.term.length;if(!w)continue;y==null||y.delete(p);let S=u*p.length/(p.length+.3*w);this.termResults(e.term,p,S,e.termBoost,g,i,n,a,l)}if(y)for(let p of y.keys()){let[g,w]=y.get(p);if(!w)continue;let S=d*p.length/(p.length+w);this.termResults(e.term,p,S,e.termBoost,g,i,n,a,l)}return l}executeWildcardQuery(e){let t=new Map,s=Object.assign(Object.assign({},this._options.searchOptions),e);for(let[i,n]of this._documentIds){let o=s.boostDocument?s.boostDocument(n,"",this._storedFields.get(i)):1;t.set(i,{score:o,terms:[],match:{}})}return t}combineResults(e,t=Y){if(e.length===0)return new Map;let s=t.toLowerCase(),i=Le[s];if(!i)throw new Error("Invalid combination operator: ".concat(t));return e.reduce(i)||new Map}toJSON(){let e=[];for(let[t,s]of this._index){let i={};for(let[n,o]of s)i[n]=Object.fromEntries(o);e.push([t,i])}return{documentCount:this._documentCount,nextId:this._nextId,documentIds:Object.fromEntries(this._documentIds),fieldIds:this._fieldIds,fieldLength:Object.fromEntries(this._fieldLength),averageFieldLength:this._avgFieldLength,storedFields:Object.fromEntries(this._storedFields),dirtCount:this._dirtCount,index:e,serializationVersion:2}}termResults(e,t,s,i,n,o,c,a,d=new Map){if(n==null)return d;for(let u of Object.keys(o)){let f=o[u],l=this._fieldIds[u],m=n.get(l);if(m==null)continue;let y=m.size,p=this._avgFieldLength[l];for(let g of m.keys()){if(!this._documentIds.has(g)){this.removeTerm(l,g,t),y-=1;continue}let w=c?c(this._documentIds.get(g),t,this._storedFields.get(g)):1;if(!w)continue;let S=m.get(g),P=this._fieldLength.get(g)[l],W=Ee(S,y,this._documentCount,P,p,a),k=s*i*f*w*W,x=d.get(g);if(x){x.score+=k,Te(x.terms,e);let F=$(x.match,t);F?F.push(u):x.match[t]=[u]}else d.set(g,{score:k,terms:[e],match:{[t]:[u]}})}}return d}addTerm(e,t,s){let i=this._index.fetch(s,le),n=i.get(e);if(n==null)n=new Map,n.set(t,1),i.set(e,n);else{let o=n.get(t);n.set(t,(o||0)+1)}}removeTerm(e,t,s){if(!this._index.has(s)){this.warnDocumentChanged(t,e,s);return}let i=this._index.fetch(s,le),n=i.get(e);n==null||n.get(t)==null?this.warnDocumentChanged(t,e,s):n.get(t)<=1?n.size<=1?i.delete(e):n.delete(t):n.set(t,n.get(t)-1),this._index.get(s).size===0&&this._index.delete(s)}warnDocumentChanged(e,t,s){for(let i of Object.keys(this._fieldIds))if(this._fieldIds[i]===t){this._options.logger("warn","MiniSearch: document with ID ".concat(this._documentIds.get(e),' has changed before removal: term "').concat(s,'" was not present in field "').concat(i,'". Removing a document after it has changed can corrupt the index!'),"version_conflict");return}}addDocumentId(e){let t=this._nextId;return this._idToShortId.set(e,t),this._documentIds.set(t,e),this._documentCount+=1,this._nextId+=1,t}addFields(e){for(let t=0;t<e.length;t++)this._fieldIds[e[t]]=t}addFieldLength(e,t,s,i){let n=this._fieldLength.get(e);n==null&&this._fieldLength.set(e,n=[]),n[t]=i;let c=(this._avgFieldLength[t]||0)*s+i;this._avgFieldLength[t]=c/(s+1)}removeFieldLength(e,t,s,i){if(s===1){this._avgFieldLength[t]=0;return}let n=this._avgFieldLength[t]*s-i;this._avgFieldLength[t]=n/(s-1)}saveStoredFields(e,t){let{storeFields:s,extractField:i}=this._options;if(s==null||s.length===0)return;let n=this._storedFields.get(e);n==null&&this._storedFields.set(e,n={});for(let o of s){let c=i(t,o);c!==void 0&&(n[o]=c)}}};h(I,"MiniSearch");var O=I;O.wildcard=Symbol("*");var $=h((r,e)=>Object.prototype.hasOwnProperty.call(r,e)?r[e]:void 0,"getOwnProperty"),Le={[Y]:(r,e)=>{for(let t of e.keys()){let s=r.get(t);if(s==null)r.set(t,e.get(t));else{let{score:i,terms:n,match:o}=e.get(t);s.score=s.score+i,s.match=Object.assign(s.match,o),ue(s.terms,n)}}return r},[_e]:(r,e)=>{let t=new Map;for(let s of e.keys()){let i=r.get(s);if(i==null)continue;let{score:n,terms:o,match:c}=e.get(s);ue(i.terms,o),t.set(s,{score:i.score+n,terms:i.terms,match:Object.assign(i.match,c)})}return t},[Ce]:(r,e)=>{for(let t of e.keys())r.delete(t);return r}},ke={k:1.2,b:.7,d:.5},Ee=h((r,e,t,s,i,n)=>{let{k:o,b:c,d:a}=n;return Math.log(1+(t-e+.5)/(e+.5))*(a+r*(o+1)/(r+o*(1-c+c*s/i)))},"calcBM25Score"),je=h(r=>(e,t,s)=>{let i=typeof r.fuzzy=="function"?r.fuzzy(e,t,s):r.fuzzy||!1,n=typeof r.prefix=="function"?r.prefix(e,t,s):r.prefix===!0,o=typeof r.boostTerm=="function"?r.boostTerm(e,t,s):1;return{term:e,fuzzy:i,prefix:n,termBoost:o}},"termToQuerySpec"),J={idField:"id",extractField:(r,e)=>r[e],tokenize:r=>r.split(Ve),processTerm:r=>r.toLowerCase(),fields:void 0,searchOptions:void 0,storeFields:[],logger:(r,e)=>{typeof(console==null?void 0:console[r])=="function"&&console[r](e)},autoVacuum:!0},ae={combineWith:Y,prefix:!1,fuzzy:!1,maxFuzzy:6,boost:{},weights:{fuzzy:.45,prefix:.375},bm25:ke},Ae={combineWith:_e,prefix:(r,e,t)=>e===t.length-1},U={batchSize:1e3,batchWait:10},G={minDirtFactor:.1,minDirtCount:20},q=Object.assign(Object.assign({},U),G),Te=h((r,e)=>{r.includes(e)||r.push(e)},"assignUniqueTerm"),ue=h((r,e)=>{for(let t of e)r.includes(t)||r.push(t)},"assignUniqueTerms"),de=h(({score:r},{score:e})=>e-r,"byScore"),le=h(()=>new Map,"createMap"),A=h(r=>{let e=new Map;for(let t of Object.keys(r))e.set(parseInt(t,10),r[t]);return e},"objectToNumericMap"),T=h(r=>V(void 0,void 0,void 0,function*(){let e=new Map,t=0;for(let s of Object.keys(r))e.set(parseInt(s,10),r[s]),++t%1e3===0&&(yield ye(0));return e}),"objectToNumericMapAsync"),ye=h(r=>new Promise(e=>setTimeout(e,r)),"wait"),Ve=/[\n\r\p{Z}\p{P}]+/u;var we=ze(Oe(),1);var L,D,xe,X=class X{constructor(e){B(this,D);E(this,"mapData");E(this,"indexes");E(this,"ready");B(this,L,void 0);this.mapData=e,this.indexes=Pe(e),this.ready=this.populate(),te(this,L,ie(se(this,D,xe).bind(this),2e3))}async populate(){let{places:e,enterpriseLocations:t,enterpriseCategories:s}=this.indexes,i=this.mapData,n=[];return e.removeAll(),n.concat([e.addAllAsync(i.getByType("space")),e.addAllAsync(i.getByType("point-of-interest")),e.addAllAsync(i.getByType("connection")),e.addAllAsync(i.getByType("floor")),e.addAllAsync(i.getByType("door")),e.addAllAsync(i.getByType("annotation"))]),t&&(t==null||t.removeAll(),n.push(t.addAllAsync(i.getByType("enterprise-location")))),s&&(s==null||s.removeAll(),n.push(s.addAllAsync(i.getByType("enterprise-category")))),Promise.all(n)}async search(e,t={}){var a,d;await this.ready,We.parse(t);let s=(0,we.default)({},t,De),i=this.indexes.places.search(e,{fields:Object.keys(s.places.fields).filter(u=>s.places.fields[u])}).slice(0,s.places.limit),n=(a=this.indexes.enterpriseLocations)==null?void 0:a.search(e,{fields:Object.keys(s.enterpriseLocations.fields).filter(u=>s.enterpriseLocations.fields[u])}).slice(0,s.enterpriseLocations.limit),o=(d=this.indexes.enterpriseCategories)==null?void 0:d.search(e,{fields:Object.keys(s.enterpriseCategories.fields).filter(u=>s.enterpriseCategories.fields[u])}).slice(0,s.enterpriseCategories.limit),c=Re(this.mapData,{placesResult:i,locationsResult:n,categoriesResult:o});return ee(this,L).call(this,e),c}async suggest(e,t={}){await this.ready,Be.parse(t);let s=[],{places:{enabled:i=!0}={},enterpriseLocations:{enabled:n=!0}={}}=t;return n&&this.indexes.enterpriseLocations&&this.indexes.enterpriseLocations.autoSuggest(e,{fields:["name","tags"],combineWith:"AND",prefix:!0,boost:{name:2,tags:1}}).forEach(o=>s.push(o)),i&&this.indexes.places.autoSuggest(e,{fields:["name"],combineWith:"AND",prefix:!0}).forEach(o=>s.push(o)),s.sort((o,c)=>c.score-o.score),this.mapData.Analytics.capture("$query-suggest",{query:e,suggestions:s.map(o=>o.suggestion)}),s}};L=new WeakMap,D=new WeakSet,xe=h(function(e){this.mapData.Analytics.capture("$query-search",{query:e})},"#trackSearch"),h(X,"InternalSearch");var be=X;function Re(r,{placesResult:e,locationsResult:t,categoriesResult:s}){let i=e.reduce((c,{id:a,match:d,score:u,__type:f})=>{let l=r.getById(f,a);return l!=null&&!ne.is(l)&&!oe.is(l)&&!re.is(l)&&!ce.is(l)&&c.push({type:l.__type,match:d,score:u,item:l}),c},[]),n;if(t){n=[];for(let{id:c,match:a,score:d}of t){let u=r.getById("enterprise-location",c);u&&n.push({type:u.__type,match:a,score:d,item:u})}}let o;if(s){o=[];for(let{id:c,match:a,score:d}of s){let u=r.getById("enterprise-category",c);u&&o.push({type:u.__type,match:a,score:d,item:u})}}return{places:i,enterpriseLocations:n,enterpriseCategories:o}}h(Re,"processSearchResult");var De={places:{fields:{name:!0,description:!0},limit:5},enterpriseCategories:{fields:{name:!0,description:!1,"locations.name":!0},limit:5},enterpriseLocations:{fields:{name:!0,tags:!0,description:!0},limit:5}};function H(r){return r.normalize("NFD").replace(/[\u0300-\u036f|\u2019|\u0027|\']/g,"").toLowerCase()}h(H,"removeAccents");function Pe(r){let e=new O({fields:["name","description"],storeFields:["id","__type"],searchOptions:{fuzzy:.2,prefix:!0,boost:{name:2},combineWith:"AND"},extractField:(o,c)=>{let a=o[c];return typeof a=="string"?H(a):o[c]},processTerm:o=>Ne.has(o)?"":o.toLowerCase()}),t=r.getByType("enterprise-location"),s;t&&(s=new O({fields:["name","tags","description"],storeFields:["id","__type"],searchOptions:{combineWith:"OR",prefix:!0,fuzzy:.2,boost:{name:3,tags:2,description:1}},extractField:(o,c)=>Array.isArray(o[c])?o[c].join(" "):typeof o[c]=="string"?H(o[c]):o[c]}));let i=r.getByType("enterprise-category"),n;return i&&(n=new O({fields:["name","description","locations.name"],storeFields:["id","__type"],extractField(o,c){return c==="locations.name"?o.locations.reduce((d,u)=>d+" ".concat(Se," ")+u.name,"")+" ".concat(Se):typeof o[c]=="string"?H(o[c]):o[c]},searchOptions:{combineWith:"OR",prefix:!0,fuzzy:.2,boost:{name:2,"locations.name":2}}})),{enterpriseCategories:n,enterpriseLocations:s,places:e}}h(Pe,"buildIndexes");var We=_.object({places:_.object({fields:_.object({name:_.boolean().optional(),description:_.boolean().optional()}).optional(),limit:_.number().positive().optional()}).optional(),enterpriseCategories:_.object({fields:_.object({name:_.boolean().optional(),description:_.boolean().optional(),"locations.name":_.boolean().optional()}).optional(),limit:_.number().positive().optional()}).optional(),enterpriseLocations:_.object({fields:_.object({name:_.boolean().optional(),tags:_.boolean().optional(),description:_.boolean().optional()}).optional(),limit:_.number().positive().optional()}).optional()}),Be=_.object({places:_.object({enabled:_.boolean().optional()}).optional(),enterpriseLocations:_.object({enabled:_.boolean().optional()}).optional()}),Ne=new Set(["the","an","and","or","of","in","on","at","to","from","with","by","for"]),Se="";export{be as InternalSearch,H as removeAccents};
@@ -1 +1 @@
1
- import{$,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z,_,a,aa,b,ba,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z}from"./chunk-KUVUAM5C.js";import"./chunk-OANQFXHV.js";var export_Point=T.default;export{d as AJAXError,J as AttributionControl,y as BoxZoomHandler,q as CanvasSource,I as CooperativeGesturesHandler,E as DoubleClickZoomHandler,F as DragPanHandler,G as DragRotateHandler,t as EdgeInsets,e as Evented,Q as FullscreenControl,n as GeoJSONSource,O as GeolocateControl,u as Hash,o as ImageSource,C as KeyboardHandler,h as LngLat,i as LngLatBounds,K as LogoControl,L as Map,v as MapMouseEvent,w as MapTouchEvent,x as MapWheelEvent,N as Marker,j as MercatorCoordinate,M as NavigationControl,export_Point as Point,S as Popup,m as RasterDEMTileSource,l as RasterTileSource,P as ScaleControl,D as ScrollZoomHandler,s as Style,R as TerrainControl,B as TwoFingersTouchPitchHandler,A as TwoFingersTouchRotateHandler,z as TwoFingersTouchZoomHandler,H as TwoFingersTouchZoomRotateHandler,k as VectorTileSource,p as VideoSource,b as addProtocol,r as addSourceType,g as clearPrewarmedResources,a as config,Z as getMaxParallelImageRequests,V as getRTLTextPluginStatus,W as getVersion,X as getWorkerCount,$ as getWorkerUrl,ba as importScriptInWorkers,f as prewarm,c as removeProtocol,_ as setMaxParallelImageRequests,U as setRTLTextPlugin,Y as setWorkerCount,aa as setWorkerUrl};
1
+ import{$,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z,_,a,aa,b,ba,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z}from"./chunk-QQ53JNBN.js";import"./chunk-OQLRRFPP.js";var export_Point=T.default;export{d as AJAXError,J as AttributionControl,y as BoxZoomHandler,q as CanvasSource,I as CooperativeGesturesHandler,E as DoubleClickZoomHandler,F as DragPanHandler,G as DragRotateHandler,t as EdgeInsets,e as Evented,Q as FullscreenControl,n as GeoJSONSource,O as GeolocateControl,u as Hash,o as ImageSource,C as KeyboardHandler,h as LngLat,i as LngLatBounds,K as LogoControl,L as Map,v as MapMouseEvent,w as MapTouchEvent,x as MapWheelEvent,N as Marker,j as MercatorCoordinate,M as NavigationControl,export_Point as Point,S as Popup,m as RasterDEMTileSource,l as RasterTileSource,P as ScaleControl,D as ScrollZoomHandler,s as Style,R as TerrainControl,B as TwoFingersTouchPitchHandler,A as TwoFingersTouchRotateHandler,z as TwoFingersTouchZoomHandler,H as TwoFingersTouchZoomRotateHandler,k as VectorTileSource,p as VideoSource,b as addProtocol,r as addSourceType,g as clearPrewarmedResources,a as config,Z as getMaxParallelImageRequests,V as getRTLTextPluginStatus,W as getVersion,X as getWorkerCount,$ as getWorkerUrl,ba as importScriptInWorkers,f as prewarm,c as removeProtocol,_ as setMaxParallelImageRequests,U as setRTLTextPlugin,Y as setWorkerCount,aa as setWorkerUrl};
package/package.json CHANGED
@@ -1,6 +1,7 @@
1
1
  {
2
2
  "name": "@mappedin/react-sdk",
3
- "version": "6.0.1-beta.17",
3
+ "version": "6.0.1-beta.19",
4
+ "homepage": "https://developer.mappedin.com/",
4
5
  "private": false,
5
6
  "main": "lib/esm/index.js",
6
7
  "module": "lib/esm/index.js",
@@ -13,10 +14,6 @@
13
14
  "THIRD_PARTY_LICENSES.txt"
14
15
  ],
15
16
  "license": "SEE LICENSE IN LICENSE.txt",
16
- "repository": {
17
- "type": "git",
18
- "url": "git+https://github.com/MappedIn/sdk.git"
19
- },
20
17
  "scripts": {
21
18
  "start": "yarn build && concurrently \"node scripts/build.mjs --watchChanges\" \"node scripts/start.mjs\"",
22
19
  "build": "yarn clean && tsc -b && node scripts/build.mjs",
@@ -34,5 +31,5 @@
34
31
  "volta": {
35
32
  "extends": "../../package.json"
36
33
  },
37
- "gitHead": "39a9f811d1d8bd4d0192ab21667c898b384f8f33"
34
+ "gitHead": "2b8cada573b72b4b49879317a60aa8b73991e46c"
38
35
  }