@mappedin/mappedin-js 6.0.1-beta.50 → 6.0.1-beta.51
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/THIRD_PARTY_LICENSES.txt +159 -0
- package/lib/esm/{GLTFExporter-NSCWM6JS.js → GLTFExporter-R2ET7WQG.js} +2 -2
- package/lib/esm/{GLTFLoader-P7OIN6GY.js → GLTFLoader-YK3BK6G2.js} +2 -2
- package/lib/esm/{browser-6V77MKQS.js → browser-5ZOTAHOY.js} +2 -2
- package/lib/esm/chunk-E636Y5SM.js +3 -0
- package/lib/esm/chunk-E636Y5SM.js.map +7 -0
- package/lib/esm/{chunk-3JJZGEB7.js → chunk-HXV5XXM2.js} +41 -41
- package/lib/esm/{chunk-3JJZGEB7.js.map → chunk-HXV5XXM2.js.map} +4 -4
- package/lib/esm/chunk-IXLHZFPI.js +2 -0
- package/lib/esm/{chunk-JEQGUEFF.js.map → chunk-IXLHZFPI.js.map} +1 -1
- package/lib/esm/{chunk-YDKOKGLT.js → chunk-L6FORGRK.js} +2 -2
- package/lib/esm/{chunk-I5GOIM6Y.js → chunk-TMLH5LJF.js} +2 -2
- package/lib/esm/{chunk-I5GOIM6Y.js.map → chunk-TMLH5LJF.js.map} +1 -1
- package/lib/esm/{chunk-SPVBFPOK.js → chunk-WXL6KZXF.js} +2 -2
- package/lib/esm/index.d.ts +4401 -4202
- package/lib/esm/index.js +1 -1
- package/lib/esm/{inspector-GKTULNKY.js → inspector-WLLHTPSP.js} +2 -2
- package/lib/esm/{inspector-GKTULNKY.js.map → inspector-WLLHTPSP.js.map} +1 -1
- package/lib/esm/{internal-CE37LADZ.js → internal-IYNQNOK5.js} +2 -2
- package/lib/esm/{outdoor-context-v4-OHJPVR4U.js → outdoor-context-v4-TU6NAUSH.js} +2 -2
- package/lib/esm/{text3d-QUUOTI5N.js → text3d-SCTDIVNM.js} +2 -2
- package/lib/index-rn.js +56 -55
- package/package.json +4 -4
- package/lib/esm/chunk-DSSOZXRM.js +0 -2
- package/lib/esm/chunk-DSSOZXRM.js.map +0 -7
- package/lib/esm/chunk-JEQGUEFF.js +0 -2
- /package/lib/esm/{GLTFExporter-NSCWM6JS.js.map → GLTFExporter-R2ET7WQG.js.map} +0 -0
- /package/lib/esm/{GLTFLoader-P7OIN6GY.js.map → GLTFLoader-YK3BK6G2.js.map} +0 -0
- /package/lib/esm/{browser-6V77MKQS.js.map → browser-5ZOTAHOY.js.map} +0 -0
- /package/lib/esm/{chunk-YDKOKGLT.js.map → chunk-L6FORGRK.js.map} +0 -0
- /package/lib/esm/{chunk-SPVBFPOK.js.map → chunk-WXL6KZXF.js.map} +0 -0
- /package/lib/esm/{internal-CE37LADZ.js.map → internal-IYNQNOK5.js.map} +0 -0
- /package/lib/esm/{outdoor-context-v4-OHJPVR4U.js.map → outdoor-context-v4-TU6NAUSH.js.map} +0 -0
- /package/lib/esm/{text3d-QUUOTI5N.js.map → text3d-SCTDIVNM.js.map} +0 -0
package/lib/esm/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{A,C as B,D as C,E as D,F as E,G as F,H as G,I as H,J as I,K as J,L as K,M as L,N as M,O as N,a as c,b as d,c as e,d as f,e as g,f as h,g as i,h as j,i as k,j as l,k as m,l as n,m as o,n as p,o as q,p as r,q as s,r as t,s as u,t as v,u as w,w as x,x as y,z}from"./chunk-
|
|
1
|
+
import{A,C as B,D as C,E as D,F as E,G as F,H as G,I as H,J as I,K as J,L as K,M as L,N as M,O as N,P as O,a as c,b as d,c as e,d as f,e as g,f as h,g as i,h as j,i as k,j as l,k as m,l as n,m as o,n as p,o as q,p as r,q as s,r as t,s as u,t as v,u as w,w as x,x as y,z}from"./chunk-HXV5XXM2.js";import{b as a,c as b}from"./chunk-E636Y5SM.js";import"./chunk-TMLH5LJF.js";import"./chunk-L6FORGRK.js";import"./chunk-WXL6KZXF.js";import"./chunk-IXLHZFPI.js";import"./chunk-AHC6OWNT.js";export{o as Annotation,g as Area,l as Connection,c as Coordinate,C as DOORS,w as Directions,h as Door,a as E_SDK_LOG_LEVEL,s as EnterpriseCategory,r as EnterpriseLocation,t as EnterpriseVenue,q as Facade,j as Floor,p as FloorStack,e as Hyperlink,f as ImageMetaData,y as LocationCategory,x as LocationProfile,k as MAPPEDIN_COLORS,m as MapObject,d as Node,n as PointOfInterest,i as Space,B as WALLS,H as __setWatermarkOnClickFn,M as createMapLibreOverlay,D as disableText3DWorker,z as enableTestMode,G as findPreferredLanguageInVenue,K as getMapData,L as getMapDataEnterprise,F as hydrateMapData,I as hydrateMapDataFromMVF,u as parseMVF,A as preloadFont,b as setLoggerLevel,J as setUseEnterpriseAPI,E as setWorkersUrl,N as show3dMap,O as show3dMapGeojson,v as unzipMVF};
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{B as ut,a as ht,g as j,p as T,q as X}from"./chunk-3JJZGEB7.js";import{r as H}from"./chunk-DSSOZXRM.js";import"./chunk-I5GOIM6Y.js";import"./chunk-YDKOKGLT.js";import{W as ct}from"./chunk-SPVBFPOK.js";import{a as v}from"./chunk-JEQGUEFF.js";import{f as O,g as y,h as D,i as dt,j as B}from"./chunk-AHC6OWNT.js";v();v();v();v();var S=class i{constructor(t,o,e,n,r="div"){this.parent=t,this.object=o,this.property=e,this._disabled=!1,this._hidden=!1,this.initialValue=this.getValue(),this.domElement=document.createElement(r),this.domElement.classList.add("controller"),this.domElement.classList.add(n),this.$name=document.createElement("div"),this.$name.classList.add("name"),i.nextNameID=i.nextNameID||0,this.$name.id=`lil-gui-name-${++i.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",s=>s.stopPropagation()),this.domElement.addEventListener("keyup",s=>s.stopPropagation()),this.parent.children.push(this),this.parent.controllers.push(this),this.parent.$children.appendChild(this.domElement),this._listenCallback=this._listenCallback.bind(this),this.name(e)}name(t){return this._name=t,this.$name.textContent=t,this}onChange(t){return this._onChange=t,this}_callOnChange(){this.parent._callOnChange(this),this._onChange!==void 0&&this._onChange.call(this,this.getValue()),this._changed=!0}onFinishChange(t){return this._onFinishChange=t,this}_callOnFinishChange(){this._changed&&(this.parent._callOnFinishChange(this),this._onFinishChange!==void 0&&this._onFinishChange.call(this,this.getValue())),this._changed=!1}reset(){return this.setValue(this.initialValue),this._callOnFinishChange(),this}enable(t=!0){return this.disable(!t)}disable(t=!0){return t===this._disabled?this:(this._disabled=t,this.domElement.classList.toggle("disabled",t),this.$disable.toggleAttribute("disabled",t),this)}show(t=!0){return this._hidden=!t,this.domElement.style.display=this._hidden?"none":"",this}hide(){return this.show(!1)}options(t){let o=this.parent.add(this.object,this.property,t);return o.name(this._name),this.destroy(),o}min(t){return this}max(t){return this}step(t){return this}decimals(t){return this}listen(t=!0){return this._listening=t,this._listenCallbackID!==void 0&&(cancelAnimationFrame(this._listenCallbackID),this._listenCallbackID=void 0),this._listening&&this._listenCallback(),this}_listenCallback(){this._listenCallbackID=requestAnimationFrame(this._listenCallback);let t=this.save();t!==this._listenPrevValue&&this.updateDisplay(),this._listenPrevValue=t}getValue(){return this.object[this.property]}setValue(t){return this.getValue()!==t&&(this.object[this.property]=t,this._callOnChange(),this.updateDisplay()),this}updateDisplay(){return this}load(t){return this.setValue(t),this._callOnFinishChange(),this}save(){return this.getValue()}destroy(){this.listen(!1),this.parent.children.splice(this.parent.children.indexOf(this),1),this.parent.controllers.splice(this.parent.controllers.indexOf(this),1),this.parent.$children.removeChild(this.domElement)}},Z=class extends S{constructor(t,o,e){super(t,o,e,"boolean","label"),this.$input=document.createElement("input"),this.$input.setAttribute("type","checkbox"),this.$input.setAttribute("aria-labelledby",this.$name.id),this.$widget.appendChild(this.$input),this.$input.addEventListener("change",()=>{this.setValue(this.$input.checked),this._callOnFinishChange()}),this.$disable=this.$input,this.updateDisplay()}updateDisplay(){return this.$input.checked=this.getValue(),this}};function Q(i){let t,o;return(t=i.match(/(#|0x)?([a-f0-9]{6})/i))?o=t[2]:(t=i.match(/rgb\(\s*(\d*)\s*,\s*(\d*)\s*,\s*(\d*)\s*\)/))?o=parseInt(t[1]).toString(16).padStart(2,0)+parseInt(t[2]).toString(16).padStart(2,0)+parseInt(t[3]).toString(16).padStart(2,0):(t=i.match(/^#?([a-f0-9])([a-f0-9])([a-f0-9])$/i))&&(o=t[1]+t[1]+t[2]+t[2]+t[3]+t[3]),o?"#"+o:!1}var Ot={isPrimitive:!0,match:i=>typeof i=="string",fromHexString:Q,toHexString:Q},z={isPrimitive:!0,match:i=>typeof i=="number",fromHexString:i=>parseInt(i.substring(1),16),toHexString:i=>"#"+i.toString(16).padStart(6,0)},Dt={isPrimitive:!1,match:i=>Array.isArray(i),fromHexString(i,t,o=1){let e=z.fromHexString(i);t[0]=(e>>16&255)/255*o,t[1]=(e>>8&255)/255*o,t[2]=(e&255)/255*o},toHexString([i,t,o],e=1){e=255/e;let n=i*e<<16^t*e<<8^o*e<<0;return z.toHexString(n)}},Tt={isPrimitive:!1,match:i=>Object(i)===i,fromHexString(i,t,o=1){let e=z.fromHexString(i);t.r=(e>>16&255)/255*o,t.g=(e>>8&255)/255*o,t.b=(e&255)/255*o},toHexString({r:i,g:t,b:o},e=1){e=255/e;let n=i*e<<16^t*e<<8^o*e<<0;return z.toHexString(n)}},Gt=[Ot,z,Dt,Tt];function Bt(i){return Gt.find(t=>t.match(i))}var K=class extends S{constructor(t,o,e,n){super(t,o,e,"color"),this.$input=document.createElement("input"),this.$input.setAttribute("type","color"),this.$input.setAttribute("tabindex",-1),this.$input.setAttribute("aria-labelledby",this.$name.id),this.$text=document.createElement("input"),this.$text.setAttribute("type","text"),this.$text.setAttribute("spellcheck","false"),this.$text.setAttribute("aria-labelledby",this.$name.id),this.$display=document.createElement("div"),this.$display.classList.add("display"),this.$display.appendChild(this.$input),this.$widget.appendChild(this.$display),this.$widget.appendChild(this.$text),this._format=Bt(this.initialValue),this._rgbScale=n,this._initialValueHexString=this.save(),this._textFocused=!1,this.$input.addEventListener("input",()=>{this._setValueFromHexString(this.$input.value)}),this.$input.addEventListener("blur",()=>{this._callOnFinishChange()}),this.$text.addEventListener("input",()=>{let r=Q(this.$text.value);r&&this._setValueFromHexString(r)}),this.$text.addEventListener("focus",()=>{this._textFocused=!0,this.$text.select()}),this.$text.addEventListener("blur",()=>{this._textFocused=!1,this.updateDisplay(),this._callOnFinishChange()}),this.$disable=this.$text,this.updateDisplay()}reset(){return this._setValueFromHexString(this._initialValueHexString),this}_setValueFromHexString(t){if(this._format.isPrimitive){let o=this._format.fromHexString(t);this.setValue(o)}else this._format.fromHexString(t,this.getValue(),this._rgbScale),this._callOnChange(),this.updateDisplay()}save(){return this._format.toHexString(this.getValue(),this._rgbScale)}load(t){return this._setValueFromHexString(t),this._callOnFinishChange(),this}updateDisplay(){return this.$input.value=this._format.toHexString(this.getValue(),this._rgbScale),this._textFocused||(this.$text.value=this.$input.value.substring(1)),this.$display.style.backgroundColor=this.$input.value,this}},U=class extends S{constructor(t,o,e){super(t,o,e,"function"),this.$button=document.createElement("button"),this.$button.appendChild(this.$name),this.$widget.appendChild(this.$button),this.$button.addEventListener("click",n=>{n.preventDefault(),this.getValue().call(this.object),this._callOnChange()}),this.$button.addEventListener("touchstart",()=>{},{passive:!0}),this.$disable=this.$button}},q=class extends S{constructor(t,o,e,n,r,s){super(t,o,e,"number"),this._initInput(),this.min(n),this.max(r);let a=s!==void 0;this.step(a?s:this._getImplicitStep(),a),this.updateDisplay()}decimals(t){return this._decimals=t,this.updateDisplay(),this}min(t){return this._min=t,this._onUpdateMinMax(),this}max(t){return this._max=t,this._onUpdateMinMax(),this}step(t,o=!0){return this._step=t,this._stepExplicit=o,this}updateDisplay(){let t=this.getValue();if(this._hasSlider){let o=(t-this._min)/(this._max-this._min);o=Math.max(0,Math.min(o,1)),this.$fill.style.width=o*100+"%"}return this._inputFocused||(this.$input.value=this._decimals===void 0?t:t.toFixed(this._decimals)),this}_initInput(){this.$input=document.createElement("input"),this.$input.setAttribute("type","text"),this.$input.setAttribute("aria-labelledby",this.$name.id),window.matchMedia("(pointer: coarse)").matches&&(this.$input.setAttribute("type","number"),this.$input.setAttribute("step","any")),this.$widget.appendChild(this.$input),this.$disable=this.$input;let o=()=>{let b=parseFloat(this.$input.value);isNaN(b)||(this._stepExplicit&&(b=this._snap(b)),this.setValue(this._clamp(b)))},e=b=>{let A=parseFloat(this.$input.value);isNaN(A)||(this._snapClampSetValue(A+b),this.$input.value=this.getValue())},n=b=>{b.key==="Enter"&&this.$input.blur(),b.code==="ArrowUp"&&(b.preventDefault(),e(this._step*this._arrowKeyMultiplier(b))),b.code==="ArrowDown"&&(b.preventDefault(),e(this._step*this._arrowKeyMultiplier(b)*-1))},r=b=>{this._inputFocused&&(b.preventDefault(),e(this._step*this._normalizeMouseWheel(b)))},s=!1,a,d,g,c,u,p=5,l=b=>{a=b.clientX,d=g=b.clientY,s=!0,c=this.getValue(),u=0,window.addEventListener("mousemove",h),window.addEventListener("mouseup",m)},h=b=>{if(s){let A=b.clientX-a,I=b.clientY-d;Math.abs(I)>p?(b.preventDefault(),this.$input.blur(),s=!1,this._setDraggingStyle(!0,"vertical")):Math.abs(A)>p&&m()}if(!s){let A=b.clientY-g;u-=A*this._step*this._arrowKeyMultiplier(b),c+u>this._max?u=this._max-c:c+u<this._min&&(u=this._min-c),this._snapClampSetValue(c+u)}g=b.clientY},m=()=>{this._setDraggingStyle(!1,"vertical"),this._callOnFinishChange(),window.removeEventListener("mousemove",h),window.removeEventListener("mouseup",m)},C=()=>{this._inputFocused=!0},f=()=>{this._inputFocused=!1,this.updateDisplay(),this._callOnFinishChange()};this.$input.addEventListener("input",o),this.$input.addEventListener("keydown",n),this.$input.addEventListener("wheel",r,{passive:!1}),this.$input.addEventListener("mousedown",l),this.$input.addEventListener("focus",C),this.$input.addEventListener("blur",f)}_initSlider(){this._hasSlider=!0,this.$slider=document.createElement("div"),this.$slider.classList.add("slider"),this.$fill=document.createElement("div"),this.$fill.classList.add("fill"),this.$slider.appendChild(this.$fill),this.$widget.insertBefore(this.$slider,this.$input),this.domElement.classList.add("hasSlider");let t=(f,b,A,I,x)=>(f-b)/(A-b)*(x-I)+I,o=f=>{let b=this.$slider.getBoundingClientRect(),A=t(f,b.left,b.right,this._min,this._max);this._snapClampSetValue(A)},e=f=>{this._setDraggingStyle(!0),o(f.clientX),window.addEventListener("mousemove",n),window.addEventListener("mouseup",r)},n=f=>{o(f.clientX)},r=()=>{this._callOnFinishChange(),this._setDraggingStyle(!1),window.removeEventListener("mousemove",n),window.removeEventListener("mouseup",r)},s=!1,a,d,g=f=>{f.preventDefault(),this._setDraggingStyle(!0),o(f.touches[0].clientX),s=!1},c=f=>{f.touches.length>1||(this._hasScrollBar?(a=f.touches[0].clientX,d=f.touches[0].clientY,s=!0):g(f),window.addEventListener("touchmove",u,{passive:!1}),window.addEventListener("touchend",p))},u=f=>{if(s){let b=f.touches[0].clientX-a,A=f.touches[0].clientY-d;Math.abs(b)>Math.abs(A)?g(f):(window.removeEventListener("touchmove",u),window.removeEventListener("touchend",p))}else f.preventDefault(),o(f.touches[0].clientX)},p=()=>{this._callOnFinishChange(),this._setDraggingStyle(!1),window.removeEventListener("touchmove",u),window.removeEventListener("touchend",p)},l=this._callOnFinishChange.bind(this),h=400,m,C=f=>{if(Math.abs(f.deltaX)<Math.abs(f.deltaY)&&this._hasScrollBar)return;f.preventDefault();let A=this._normalizeMouseWheel(f)*this._step;this._snapClampSetValue(this.getValue()+A),this.$input.value=this.getValue(),clearTimeout(m),m=setTimeout(l,h)};this.$slider.addEventListener("mousedown",e),this.$slider.addEventListener("touchstart",c,{passive:!1}),this.$slider.addEventListener("wheel",C,{passive:!1})}_setDraggingStyle(t,o="horizontal"){this.$slider&&this.$slider.classList.toggle("active",t),document.body.classList.toggle("lil-gui-dragging",t),document.body.classList.toggle(`lil-gui-${o}`,t)}_getImplicitStep(){return this._hasMin&&this._hasMax?(this._max-this._min)/1e3:.1}_onUpdateMinMax(){!this._hasSlider&&this._hasMin&&this._hasMax&&(this._stepExplicit||this.step(this._getImplicitStep(),!1),this._initSlider(),this.updateDisplay())}_normalizeMouseWheel(t){let{deltaX:o,deltaY:e}=t;return Math.floor(t.deltaY)!==t.deltaY&&t.wheelDelta&&(o=0,e=-t.wheelDelta/120,e*=this._stepExplicit?1:10),o+-e}_arrowKeyMultiplier(t){let o=this._stepExplicit?1:10;return t.shiftKey?o*=10:t.altKey&&(o/=10),o}_snap(t){let o=Math.round(t/this._step)*this._step;return parseFloat(o.toPrecision(15))}_clamp(t){return t<this._min&&(t=this._min),t>this._max&&(t=this._max),t}_snapClampSetValue(t){this.setValue(this._clamp(this._snap(t)))}get _hasScrollBar(){let t=this.parent.root.$children;return t.scrollHeight>t.clientHeight}get _hasMin(){return this._min!==void 0}get _hasMax(){return this._max!==void 0}},V=class extends S{constructor(t,o,e,n){super(t,o,e,"option"),this.$select=document.createElement("select"),this.$select.setAttribute("aria-labelledby",this.$name.id),this.$display=document.createElement("div"),this.$display.classList.add("display"),this.$select.addEventListener("change",()=>{this.setValue(this._values[this.$select.selectedIndex]),this._callOnFinishChange()}),this.$select.addEventListener("focus",()=>{this.$display.classList.add("focus")}),this.$select.addEventListener("blur",()=>{this.$display.classList.remove("focus")}),this.$widget.appendChild(this.$select),this.$widget.appendChild(this.$display),this.$disable=this.$select,this.options(n)}options(t){return this._values=Array.isArray(t)?t:Object.values(t),this._names=Array.isArray(t)?t:Object.keys(t),this.$select.replaceChildren(),this._names.forEach(o=>{let e=document.createElement("option");e.textContent=o,this.$select.appendChild(e)}),this.updateDisplay(),this}updateDisplay(){let t=this.getValue(),o=this._values.indexOf(t);return this.$select.selectedIndex=o,this.$display.textContent=o===-1?t:this._names[o],this}},tt=class extends S{constructor(t,o,e){super(t,o,e,"string"),this.$input=document.createElement("input"),this.$input.setAttribute("type","text"),this.$input.setAttribute("spellcheck","false"),this.$input.setAttribute("aria-labelledby",this.$name.id),this.$input.addEventListener("input",()=>{this.setValue(this.$input.value)}),this.$input.addEventListener("keydown",n=>{n.code==="Enter"&&this.$input.blur()}),this.$input.addEventListener("blur",()=>{this._callOnFinishChange()}),this.$widget.appendChild(this.$input),this.$disable=this.$input,this.updateDisplay()}updateDisplay(){return this.$input.value=this.getValue(),this}},Ht=`.lil-gui {
|
|
1
|
+
import{B as ut,a as ht,g as j,p as T,q as X}from"./chunk-HXV5XXM2.js";import{s as H}from"./chunk-E636Y5SM.js";import"./chunk-TMLH5LJF.js";import"./chunk-L6FORGRK.js";import{W as ct}from"./chunk-WXL6KZXF.js";import{a as v}from"./chunk-IXLHZFPI.js";import{f as O,g as y,h as D,i as dt,j as B}from"./chunk-AHC6OWNT.js";v();v();v();v();var S=class i{constructor(t,o,e,n,r="div"){this.parent=t,this.object=o,this.property=e,this._disabled=!1,this._hidden=!1,this.initialValue=this.getValue(),this.domElement=document.createElement(r),this.domElement.classList.add("controller"),this.domElement.classList.add(n),this.$name=document.createElement("div"),this.$name.classList.add("name"),i.nextNameID=i.nextNameID||0,this.$name.id=`lil-gui-name-${++i.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",s=>s.stopPropagation()),this.domElement.addEventListener("keyup",s=>s.stopPropagation()),this.parent.children.push(this),this.parent.controllers.push(this),this.parent.$children.appendChild(this.domElement),this._listenCallback=this._listenCallback.bind(this),this.name(e)}name(t){return this._name=t,this.$name.textContent=t,this}onChange(t){return this._onChange=t,this}_callOnChange(){this.parent._callOnChange(this),this._onChange!==void 0&&this._onChange.call(this,this.getValue()),this._changed=!0}onFinishChange(t){return this._onFinishChange=t,this}_callOnFinishChange(){this._changed&&(this.parent._callOnFinishChange(this),this._onFinishChange!==void 0&&this._onFinishChange.call(this,this.getValue())),this._changed=!1}reset(){return this.setValue(this.initialValue),this._callOnFinishChange(),this}enable(t=!0){return this.disable(!t)}disable(t=!0){return t===this._disabled?this:(this._disabled=t,this.domElement.classList.toggle("disabled",t),this.$disable.toggleAttribute("disabled",t),this)}show(t=!0){return this._hidden=!t,this.domElement.style.display=this._hidden?"none":"",this}hide(){return this.show(!1)}options(t){let o=this.parent.add(this.object,this.property,t);return o.name(this._name),this.destroy(),o}min(t){return this}max(t){return this}step(t){return this}decimals(t){return this}listen(t=!0){return this._listening=t,this._listenCallbackID!==void 0&&(cancelAnimationFrame(this._listenCallbackID),this._listenCallbackID=void 0),this._listening&&this._listenCallback(),this}_listenCallback(){this._listenCallbackID=requestAnimationFrame(this._listenCallback);let t=this.save();t!==this._listenPrevValue&&this.updateDisplay(),this._listenPrevValue=t}getValue(){return this.object[this.property]}setValue(t){return this.getValue()!==t&&(this.object[this.property]=t,this._callOnChange(),this.updateDisplay()),this}updateDisplay(){return this}load(t){return this.setValue(t),this._callOnFinishChange(),this}save(){return this.getValue()}destroy(){this.listen(!1),this.parent.children.splice(this.parent.children.indexOf(this),1),this.parent.controllers.splice(this.parent.controllers.indexOf(this),1),this.parent.$children.removeChild(this.domElement)}},Z=class extends S{constructor(t,o,e){super(t,o,e,"boolean","label"),this.$input=document.createElement("input"),this.$input.setAttribute("type","checkbox"),this.$input.setAttribute("aria-labelledby",this.$name.id),this.$widget.appendChild(this.$input),this.$input.addEventListener("change",()=>{this.setValue(this.$input.checked),this._callOnFinishChange()}),this.$disable=this.$input,this.updateDisplay()}updateDisplay(){return this.$input.checked=this.getValue(),this}};function Q(i){let t,o;return(t=i.match(/(#|0x)?([a-f0-9]{6})/i))?o=t[2]:(t=i.match(/rgb\(\s*(\d*)\s*,\s*(\d*)\s*,\s*(\d*)\s*\)/))?o=parseInt(t[1]).toString(16).padStart(2,0)+parseInt(t[2]).toString(16).padStart(2,0)+parseInt(t[3]).toString(16).padStart(2,0):(t=i.match(/^#?([a-f0-9])([a-f0-9])([a-f0-9])$/i))&&(o=t[1]+t[1]+t[2]+t[2]+t[3]+t[3]),o?"#"+o:!1}var Ot={isPrimitive:!0,match:i=>typeof i=="string",fromHexString:Q,toHexString:Q},z={isPrimitive:!0,match:i=>typeof i=="number",fromHexString:i=>parseInt(i.substring(1),16),toHexString:i=>"#"+i.toString(16).padStart(6,0)},Dt={isPrimitive:!1,match:i=>Array.isArray(i),fromHexString(i,t,o=1){let e=z.fromHexString(i);t[0]=(e>>16&255)/255*o,t[1]=(e>>8&255)/255*o,t[2]=(e&255)/255*o},toHexString([i,t,o],e=1){e=255/e;let n=i*e<<16^t*e<<8^o*e<<0;return z.toHexString(n)}},Tt={isPrimitive:!1,match:i=>Object(i)===i,fromHexString(i,t,o=1){let e=z.fromHexString(i);t.r=(e>>16&255)/255*o,t.g=(e>>8&255)/255*o,t.b=(e&255)/255*o},toHexString({r:i,g:t,b:o},e=1){e=255/e;let n=i*e<<16^t*e<<8^o*e<<0;return z.toHexString(n)}},Gt=[Ot,z,Dt,Tt];function Bt(i){return Gt.find(t=>t.match(i))}var K=class extends S{constructor(t,o,e,n){super(t,o,e,"color"),this.$input=document.createElement("input"),this.$input.setAttribute("type","color"),this.$input.setAttribute("tabindex",-1),this.$input.setAttribute("aria-labelledby",this.$name.id),this.$text=document.createElement("input"),this.$text.setAttribute("type","text"),this.$text.setAttribute("spellcheck","false"),this.$text.setAttribute("aria-labelledby",this.$name.id),this.$display=document.createElement("div"),this.$display.classList.add("display"),this.$display.appendChild(this.$input),this.$widget.appendChild(this.$display),this.$widget.appendChild(this.$text),this._format=Bt(this.initialValue),this._rgbScale=n,this._initialValueHexString=this.save(),this._textFocused=!1,this.$input.addEventListener("input",()=>{this._setValueFromHexString(this.$input.value)}),this.$input.addEventListener("blur",()=>{this._callOnFinishChange()}),this.$text.addEventListener("input",()=>{let r=Q(this.$text.value);r&&this._setValueFromHexString(r)}),this.$text.addEventListener("focus",()=>{this._textFocused=!0,this.$text.select()}),this.$text.addEventListener("blur",()=>{this._textFocused=!1,this.updateDisplay(),this._callOnFinishChange()}),this.$disable=this.$text,this.updateDisplay()}reset(){return this._setValueFromHexString(this._initialValueHexString),this}_setValueFromHexString(t){if(this._format.isPrimitive){let o=this._format.fromHexString(t);this.setValue(o)}else this._format.fromHexString(t,this.getValue(),this._rgbScale),this._callOnChange(),this.updateDisplay()}save(){return this._format.toHexString(this.getValue(),this._rgbScale)}load(t){return this._setValueFromHexString(t),this._callOnFinishChange(),this}updateDisplay(){return this.$input.value=this._format.toHexString(this.getValue(),this._rgbScale),this._textFocused||(this.$text.value=this.$input.value.substring(1)),this.$display.style.backgroundColor=this.$input.value,this}},U=class extends S{constructor(t,o,e){super(t,o,e,"function"),this.$button=document.createElement("button"),this.$button.appendChild(this.$name),this.$widget.appendChild(this.$button),this.$button.addEventListener("click",n=>{n.preventDefault(),this.getValue().call(this.object),this._callOnChange()}),this.$button.addEventListener("touchstart",()=>{},{passive:!0}),this.$disable=this.$button}},q=class extends S{constructor(t,o,e,n,r,s){super(t,o,e,"number"),this._initInput(),this.min(n),this.max(r);let a=s!==void 0;this.step(a?s:this._getImplicitStep(),a),this.updateDisplay()}decimals(t){return this._decimals=t,this.updateDisplay(),this}min(t){return this._min=t,this._onUpdateMinMax(),this}max(t){return this._max=t,this._onUpdateMinMax(),this}step(t,o=!0){return this._step=t,this._stepExplicit=o,this}updateDisplay(){let t=this.getValue();if(this._hasSlider){let o=(t-this._min)/(this._max-this._min);o=Math.max(0,Math.min(o,1)),this.$fill.style.width=o*100+"%"}return this._inputFocused||(this.$input.value=this._decimals===void 0?t:t.toFixed(this._decimals)),this}_initInput(){this.$input=document.createElement("input"),this.$input.setAttribute("type","text"),this.$input.setAttribute("aria-labelledby",this.$name.id),window.matchMedia("(pointer: coarse)").matches&&(this.$input.setAttribute("type","number"),this.$input.setAttribute("step","any")),this.$widget.appendChild(this.$input),this.$disable=this.$input;let o=()=>{let b=parseFloat(this.$input.value);isNaN(b)||(this._stepExplicit&&(b=this._snap(b)),this.setValue(this._clamp(b)))},e=b=>{let A=parseFloat(this.$input.value);isNaN(A)||(this._snapClampSetValue(A+b),this.$input.value=this.getValue())},n=b=>{b.key==="Enter"&&this.$input.blur(),b.code==="ArrowUp"&&(b.preventDefault(),e(this._step*this._arrowKeyMultiplier(b))),b.code==="ArrowDown"&&(b.preventDefault(),e(this._step*this._arrowKeyMultiplier(b)*-1))},r=b=>{this._inputFocused&&(b.preventDefault(),e(this._step*this._normalizeMouseWheel(b)))},s=!1,a,d,g,c,u,p=5,l=b=>{a=b.clientX,d=g=b.clientY,s=!0,c=this.getValue(),u=0,window.addEventListener("mousemove",h),window.addEventListener("mouseup",m)},h=b=>{if(s){let A=b.clientX-a,I=b.clientY-d;Math.abs(I)>p?(b.preventDefault(),this.$input.blur(),s=!1,this._setDraggingStyle(!0,"vertical")):Math.abs(A)>p&&m()}if(!s){let A=b.clientY-g;u-=A*this._step*this._arrowKeyMultiplier(b),c+u>this._max?u=this._max-c:c+u<this._min&&(u=this._min-c),this._snapClampSetValue(c+u)}g=b.clientY},m=()=>{this._setDraggingStyle(!1,"vertical"),this._callOnFinishChange(),window.removeEventListener("mousemove",h),window.removeEventListener("mouseup",m)},C=()=>{this._inputFocused=!0},f=()=>{this._inputFocused=!1,this.updateDisplay(),this._callOnFinishChange()};this.$input.addEventListener("input",o),this.$input.addEventListener("keydown",n),this.$input.addEventListener("wheel",r,{passive:!1}),this.$input.addEventListener("mousedown",l),this.$input.addEventListener("focus",C),this.$input.addEventListener("blur",f)}_initSlider(){this._hasSlider=!0,this.$slider=document.createElement("div"),this.$slider.classList.add("slider"),this.$fill=document.createElement("div"),this.$fill.classList.add("fill"),this.$slider.appendChild(this.$fill),this.$widget.insertBefore(this.$slider,this.$input),this.domElement.classList.add("hasSlider");let t=(f,b,A,I,x)=>(f-b)/(A-b)*(x-I)+I,o=f=>{let b=this.$slider.getBoundingClientRect(),A=t(f,b.left,b.right,this._min,this._max);this._snapClampSetValue(A)},e=f=>{this._setDraggingStyle(!0),o(f.clientX),window.addEventListener("mousemove",n),window.addEventListener("mouseup",r)},n=f=>{o(f.clientX)},r=()=>{this._callOnFinishChange(),this._setDraggingStyle(!1),window.removeEventListener("mousemove",n),window.removeEventListener("mouseup",r)},s=!1,a,d,g=f=>{f.preventDefault(),this._setDraggingStyle(!0),o(f.touches[0].clientX),s=!1},c=f=>{f.touches.length>1||(this._hasScrollBar?(a=f.touches[0].clientX,d=f.touches[0].clientY,s=!0):g(f),window.addEventListener("touchmove",u,{passive:!1}),window.addEventListener("touchend",p))},u=f=>{if(s){let b=f.touches[0].clientX-a,A=f.touches[0].clientY-d;Math.abs(b)>Math.abs(A)?g(f):(window.removeEventListener("touchmove",u),window.removeEventListener("touchend",p))}else f.preventDefault(),o(f.touches[0].clientX)},p=()=>{this._callOnFinishChange(),this._setDraggingStyle(!1),window.removeEventListener("touchmove",u),window.removeEventListener("touchend",p)},l=this._callOnFinishChange.bind(this),h=400,m,C=f=>{if(Math.abs(f.deltaX)<Math.abs(f.deltaY)&&this._hasScrollBar)return;f.preventDefault();let A=this._normalizeMouseWheel(f)*this._step;this._snapClampSetValue(this.getValue()+A),this.$input.value=this.getValue(),clearTimeout(m),m=setTimeout(l,h)};this.$slider.addEventListener("mousedown",e),this.$slider.addEventListener("touchstart",c,{passive:!1}),this.$slider.addEventListener("wheel",C,{passive:!1})}_setDraggingStyle(t,o="horizontal"){this.$slider&&this.$slider.classList.toggle("active",t),document.body.classList.toggle("lil-gui-dragging",t),document.body.classList.toggle(`lil-gui-${o}`,t)}_getImplicitStep(){return this._hasMin&&this._hasMax?(this._max-this._min)/1e3:.1}_onUpdateMinMax(){!this._hasSlider&&this._hasMin&&this._hasMax&&(this._stepExplicit||this.step(this._getImplicitStep(),!1),this._initSlider(),this.updateDisplay())}_normalizeMouseWheel(t){let{deltaX:o,deltaY:e}=t;return Math.floor(t.deltaY)!==t.deltaY&&t.wheelDelta&&(o=0,e=-t.wheelDelta/120,e*=this._stepExplicit?1:10),o+-e}_arrowKeyMultiplier(t){let o=this._stepExplicit?1:10;return t.shiftKey?o*=10:t.altKey&&(o/=10),o}_snap(t){let o=Math.round(t/this._step)*this._step;return parseFloat(o.toPrecision(15))}_clamp(t){return t<this._min&&(t=this._min),t>this._max&&(t=this._max),t}_snapClampSetValue(t){this.setValue(this._clamp(this._snap(t)))}get _hasScrollBar(){let t=this.parent.root.$children;return t.scrollHeight>t.clientHeight}get _hasMin(){return this._min!==void 0}get _hasMax(){return this._max!==void 0}},V=class extends S{constructor(t,o,e,n){super(t,o,e,"option"),this.$select=document.createElement("select"),this.$select.setAttribute("aria-labelledby",this.$name.id),this.$display=document.createElement("div"),this.$display.classList.add("display"),this.$select.addEventListener("change",()=>{this.setValue(this._values[this.$select.selectedIndex]),this._callOnFinishChange()}),this.$select.addEventListener("focus",()=>{this.$display.classList.add("focus")}),this.$select.addEventListener("blur",()=>{this.$display.classList.remove("focus")}),this.$widget.appendChild(this.$select),this.$widget.appendChild(this.$display),this.$disable=this.$select,this.options(n)}options(t){return this._values=Array.isArray(t)?t:Object.values(t),this._names=Array.isArray(t)?t:Object.keys(t),this.$select.replaceChildren(),this._names.forEach(o=>{let e=document.createElement("option");e.textContent=o,this.$select.appendChild(e)}),this.updateDisplay(),this}updateDisplay(){let t=this.getValue(),o=this._values.indexOf(t);return this.$select.selectedIndex=o,this.$display.textContent=o===-1?t:this._names[o],this}},tt=class extends S{constructor(t,o,e){super(t,o,e,"string"),this.$input=document.createElement("input"),this.$input.setAttribute("type","text"),this.$input.setAttribute("spellcheck","false"),this.$input.setAttribute("aria-labelledby",this.$name.id),this.$input.addEventListener("input",()=>{this.setValue(this.$input.value)}),this.$input.addEventListener("keydown",n=>{n.code==="Enter"&&this.$input.blur()}),this.$input.addEventListener("blur",()=>{this._callOnFinishChange()}),this.$widget.appendChild(this.$input),this.$disable=this.$input,this.updateDisplay()}updateDisplay(){return this.$input.value=this.getValue(),this}},Ht=`.lil-gui {
|
|
2
2
|
font-family: var(--font-family);
|
|
3
3
|
font-size: var(--font-size);
|
|
4
4
|
line-height: 1;
|
|
@@ -480,4 +480,4 @@ import{B as ut,a as ht,g as j,p as T,q as X}from"./chunk-3JJZGEB7.js";import{r a
|
|
|
480
480
|
<br>
|
|
481
481
|
<span style="color: #FFFFFF; font-size: 12px; font-weight: 400;">Node</span>
|
|
482
482
|
</div>`,{rank:"always-visible"});g.add(p),i.push(l)}})})}return()=>{i.forEach(d=>n.Markers.remove(d))}}}}var P={duration:300,easing:"ease-in-out"},W=Pt();v();var E={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 Rt(i){i.add(E.options.places.fields,"name").name("Places: Name"),i.add(E.options.places.fields,"description").name("Places: Description"),i.add(E.options.places.fields,"link").name("Places: Link"),i.add(E.options.places.fields,"category").name("Places: Category"),i.add(E.options.places,"limit"),i.add(E.options.locations.fields,"name").name("Locations: Name"),i.add(E.options.locations.fields,"tag").name("Locations: Tag"),i.add(E.options.locations.fields,"description").name("Locations: Description"),i.add(E.options.places,"limit"),i.add(E.options.categories.fields,"name").name("Categories: Name")}function ft(i,t,o){let e=new H,n=o.addFolder("Search");n.open();let r=n.add(E,"search").onChange(async c=>{let u=await t.Search.query(c,E.options);u&&(E.results=u,a(u,e))}),s=document.createElement("div");s.style.marginLeft="10px",r.domElement.parentElement?.appendChild(s);let{renderSearch:a,close:d}=jt(i,t,s,r.$input),g=n.addFolder("Advanced");return g.close(),Rt(g),document.addEventListener("keydown",c=>{(c.metaKey||c.ctrlKey)&&c.key==="k"?(c.preventDefault(),n._closed&&n.open(),r.$input.focus()):c.key==="Escape"&&(d(),e.publish("highlight",void 0))}),{pubsub:e}}function jt(i,t,o,e){let n,r;e.addEventListener("input",async a=>{a instanceof InputEvent&&(a.inputType==="insertText"||a.inputType==="insertCompositionText")&&(clearTimeout(n),n=setTimeout(async()=>{let d=await t.Search.suggest(e.value);d&&d.length>0&&s(d[0]?.suggestion)},100))});function s(a){if(!a){e.placeholder="";return}let d=e.value;e.value=a,e.setSelectionRange(d.length,a.length)}return{renderSearch(a,d){if(a.places.length===0&&a.enterpriseCategories?.length===0&&a.enterpriseLocations?.length===0){o.textContent="No results found.";return}r=Xt(o,a,i,d)},close(){r.destroy()}}}function Xt(i,t,o,e){i.innerHTML="";let n=document.createElement("div");Object.assign(n.style,J.dropdownContainer);let r=document.createElement("ul");r.className="options-list",Object.assign(r.style,J.optionsList),r.style.display="block";let s=[],a=(p,l)=>{if(l&&l.length>0){let h=document.createElement("li");h.textContent=p,Object.assign(h.style,J.sectionHeader),r.appendChild(h),l.forEach((m,C)=>{let f=document.createElement("li");f.textContent=`${"name"in m.item?m.item.name:""} (${m.type})`,Object.assign(f.style,J.option),f.tabIndex=0,f.addEventListener("focus",()=>{g(s.indexOf(f))}),f.addEventListener("mouseover",()=>{f.style.backgroundColor="#f0f0f0"}),f.addEventListener("mouseout",()=>{f.style.backgroundColor=""}),f.addEventListener("click",()=>{}),f.setAttribute("data-type",p),f.setAttribute("data-index",C.toString()),r.appendChild(f),s.push(f)})}};a("enterpriseLocations",t.enterpriseLocations),a("enterpriseCategories",t.enterpriseCategories),a("Places",t.places),n.appendChild(r),i.appendChild(n);let d=[],g=p=>{d.forEach(f=>f()),d=[],s.forEach((f,b)=>{b===p?f.style.backgroundColor="#e0e0e0":f.style.backgroundColor=""});let l=s[p],h=l.getAttribute("data-type"),m=parseInt(l.getAttribute("data-index")||"0",10);if(!h)return;let{item:C}=t[h.toLowerCase()][m];e.publish("highlight",C)},c=p=>{!n.contains(p.target)&&p.target!==i&&u()};document.addEventListener("click",c);let u=()=>{i.innerHTML="",document.removeEventListener("click",c)};return{destroy(){i.innerHTML="",e.publish("highlight",void 0)}}}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 mt(i,t,o){o.domElement.id="interactionPanel";let e=[],{pubsub:n}=ft(i,t,o);n.on("highlight",c=>{if(c){e.forEach(p=>p()),e=[];let u=c instanceof T?c.spaces[0]:c;if(i.Camera.focusOn(c),u&&!j.is(u))return;e.push(W.highlightCard(i,u,{focus:!0}))}else e.forEach(u=>u()),e=[]});let r=o.addFolder("Click \u{1F447}").close(),{sub:s}=Yt(i,r);s.on("click",c=>{e.forEach(u=>u()),e=[],c.spaces[0]&&(e=[W.highlightCard(i,c.spaces[0])])});let a=o.addFolder("Hover \u{1F681}").close(),{sub:d}=Nt(i,a),g;d.on("hover",c=>{c.spaces[0]?(g?.(),e.length===0&&(g=W.highlightCard(i,c.spaces[0]))):(g?.(),g=void 0)})}function Yt(i,t){let o=new H,e={position:"",hoverColor:w(i.getHoverColor())},n=t.add(e,"position").disable(),r=[];function s(){r.forEach(d=>d()),r.length=0}let a=0;return i.on("click",d=>{let{labels:g,markers:c,coordinate:u}=d;s(),o.publish("click",d),clearInterval(a),n.load(JSON.stringify([u.longitude,u.latitude]));let p=g[0]||c[0];if(p){let h=nt(i,p,t);if(!h)return;r.push(h.destroy),h.labelItemFolder.openAnimated()}let l=d.spaces[0]??d.objects[0];if(l){let h={id:l.id,...i.getState(l.id),type:l.type,isInView:!1,isInViewCheck:ot(i,l.id)},{cleanup:m}=N(i,h,t);a=setInterval(()=>{h.isInView=i.isInView(p||l)},500),r.push(m)}}),{sub:o}}function Nt(i,t){let o=new H;i.setHoverColor("#1f3a7a");let e={position:"",hoverColor:w(i.getHoverColor()),intersected:"",type:"",id:""},n=t.add(e,"position").disable();t.add(e,"id").disable().listen(),t.add(e,"type").disable().listen(),t.addColor(e,"hoverColor").onChange(a=>{i.setHoverColor(a)});let r=[];function s(){r.forEach(a=>a()),r.length=0}return i.on("hover",a=>{let{coordinate:d,spaces:g,objects:c,markers:u,labels:p}=a;s(),o.publish("hover",a),n.load(JSON.stringify([d.longitude,d.latitude]));let l=g[0]??c[0]??u[0]??p[0];if(!l)return;let h=i.getState(l);h&&(e.type=h.type,e.id=l.id)}),{sub:o}}function ot(i,t){return function(){console.log("isInView",i.isInView(t))}}function bt(i,t,o){let e={labels:{},all(){o.Labels.all().forEach(l=>{this.labels[l.id]=l}),d()},removeAllLabels(){o.Labels.removeAll().forEach(l=>{delete this.labels[l.id]}),d()}},{addLabel:n,destroy:r}=Wt(i,o);i.add(e,"all"),i.add(e,"removeAllLabels");let s=i.addFolder("Label List");i.close();let a=new Map,{rerender:d}=g();function g(){function p(m){delete e.labels[m.id],a.get(m.id)?.destroy()}function l(m){let C=nt(o,m,s,{onRemove:b=>{p(b)}});if(!C)return;let{labelItemFolder:f}=C;a.set(m.id,f)}function h(){s.destroy(),s=i.addFolder("Label");for(let m in e.labels){let C=e.labels[m];l(C)}}return{rerender:h,add:l,remove:p}}i.domElement.classList.add("list-items");let c;o.on("click",({labels:p,coordinate:l})=>{if(!i._closed)if(p[0]){c?.close();let h=a.get(p[0].id);if(i.open(),!h)return;h?.open(),h?.domElement.scrollIntoView({block:"start"}),h?.domElement.focus(),c=h}else n(l)});function u(p){for(let l of p)e.labels[l.id]=l;d()}return{populatelabels:u,destroy(){r()}}}function nt(i,t,o,{onRemove:e}={}){let n=o.addFolder(`${t.text?.substring(0,12)}`);n.onChange(g=>{i.updateState(t,{appearance:d.appearance,interactive:d.interactive})}),n.close();let r=i.getState(t);if(r?.type!=="label")throw new Error(`error getting state for label: ${t.id}`);let{appearance:s,interactive:a}=r;if(!s||s.margin==null||a==null)throw new Error("incomplte label state");let d={text:t.text,interactive:a,appearance:{...s,margin:s.margin||0,marker:{foregroundColor:s.marker?.foregroundColor?.active?w(s.marker.foregroundColor?.active):"black"},text:{foregroundColor:w(s.text.foregroundColor)}},remove(){i.Labels.remove(t),e?.(t),n.destroy()},isInView:ot(i,t.id)};return n.add(d.appearance,"margin",0,20).name("margin"),n.add(d,"text"),n.add(d,"interactive"),n.addColor(d.appearance.marker,"foregroundColor").name("marker foreground"),n.addColor(d.appearance.text,"foregroundColor").name("text forground"),n.add(d,"isInView"),n.add(d,"remove"),{labelItemFolder:n,destroy(){n.destroy()}}}function Wt(i,t){let o=i.addFolder("Add"),e={onClick:!1,margin:0,text:"New Label!",interactive:!0,marginForegroundColor:w("skyblue"),marginBackgroundColor:w("coral"),textForegroundColor:w("slategray"),textBackgroundColor:w("white")};return o.add(e,"onClick"),o.add(e,"margin"),o.add(e,"interactive"),o.add(e,"text"),o.addColor(e,"marginForegroundColor"),o.addColor(e,"marginBackgroundColor"),o.addColor(e,"textForegroundColor"),o.addColor(e,"textBackgroundColor"),{destroy(){o.destroy()},addLabel(n){return o._closed||!e.onClick?void 0:t.Labels.add(n,e.text,{appearance:{margin:e.margin,marker:{foregroundColor:{active:e.marginForegroundColor,inactive:e.marginForegroundColor},backgroundColor:{active:e.marginBackgroundColor,inactive:e.marginBackgroundColor}},text:{foregroundColor:e.textForegroundColor,backgroundColor:e.marginBackgroundColor}},interactive:e.interactive})}}}var vt={};v();var yt="camera-ui";function Ct(i,t,o){let e=i.addFolder("Camera \u{1F4F7}").onOpenClose(x=>{et({opened:!x._closed},yt)}),{params:n}=it(yt);n.opened||e.close();let r=t.Camera.center.toJSON(),s=document.createElement("div");Object.assign(s.style,{display:"none",position:"absolute",left:"0px",zIndex:999,top:"0px",bottom:"0px",right:"0px",backgroundColor:"aqua",pointerEvents:"none",opacity:.5}),t.__core.container.appendChild(s);let{innerHeight:a,innerWidth:d}=window,[g,c,u,p]=o?.padding??[t.Camera.screenOffsets.top,t.Camera.screenOffsets.right,t.Camera.screenOffsets.bottom,t.Camera.screenOffsets.left],l={center_lat:r.latitude,center_lon:r.longitude,zoomLevel:t.Camera.zoomLevel,pitch:t.Camera.pitch,bearing:t.Camera.bearing,minZoomLevel:t.Camera.minZoomLevel,maxZoomLevel:t.Camera.maxZoomLevel,inset_type:o?.padding?"pixel":t.Camera.screenOffsets.type,inset_top:g??0,inset_left:p??0,inset_right:c??0,inset_bottom:u??0,animateOnLoad:!0,persist:()=>{et(e.save().controllers,"camera"),navigator.clipboard.writeText(window.location.href)},visualizeInset:!!(g||c||u||p),"Focus on click":o?.focusOnClick??!0,"Focus on current floor":()=>{t.Camera.focusOn([t.currentFloor],{screenOffsets:{top:20,left:20,right:20,bottom:20}})}};function h(){l.inset_type=t.Camera.screenOffsets.type,l.inset_left=t.Camera.screenOffsets.left,l.inset_top=t.Camera.screenOffsets.top,l.inset_right=t.Camera.screenOffsets.right,l.inset_bottom=t.Camera.screenOffsets.bottom,l.inset_type==="portion"?Object.assign(s.style,{left:l.inset_left*d+"px",top:l.inset_top*a+"px",bottom:l.inset_bottom*a+"px",right:l.inset_right*d+"px"}):Object.assign(s.style,{left:l.inset_left+"px",top:l.inset_top+"px",bottom:l.inset_bottom+"px",right:l.inset_right+"px"})}e.add(l,"center_lat").listen().disable(),e.add(l,"center_lon").listen().disable(),e.add(l,"zoomLevel",16,22,.5).listen().disable(),e.add(l,"pitch").listen().disable(),e.add(l,"bearing").listen().disable(),e.add(l,"minZoomLevel",5,22,.5).onChange(x=>{t.Camera.setMinZoomLevel(x)}),e.add(l,"maxZoomLevel",10,22,.5).onChange(x=>{t.Camera.setMaxZoomLevel(x)}),e.add(l,"animateOnLoad"),e.add(l,"visualizeInset").onChange(I),I(l.visualizeInset),e.add(l,"inset_type",["pixel","portion"]).onChange(A),e.add(l,"inset_top",0,a).onChange(A),e.add(l,"inset_bottom",0,a).onChange(A),e.add(l,"inset_left",0,d).onChange(A),e.add(l,"inset_right",0,d).onChange(A);let m=Zt(t);e.add(l,"Focus on click").onChange(x=>{x?t.on("click",m):t.off("click",m)}),l["Focus on click"]&&t.on("click",m),e.add(l,"persist"),e.add(l,"Focus on current floor");let C=x=>{e._closed||(l.center_lat=x.center.latitude,l.center_lon=x.center.longitude,l.zoomLevel=x.zoomLevel,l.bearing=x.bearing,l.pitch=x.pitch)};t.on("camera-change",C);let{params:f}=it("camera",l);if(Object.keys(f).length>0){let x=f;t.Camera.setScreenOffsets({top:x.inset_top,left:x.inset_left,right:x.inset_right,bottom:x.inset_bottom,type:x.inset_type});let lt={pitch:x.pitch,center:new ht(x.center_lat,x.center_lon),bearing:x.bearing,zoomLevel:x.zoomLevel};x.animateOnLoad?t.Camera.animateTo(lt):t.Camera.set(lt),e.load({controllers:x,folders:{}}),h()}let b=[()=>{t.off("camera-change",C)}];function A(){t.Camera.setScreenOffsets({top:l.inset_top,left:l.inset_left,right:l.inset_right,bottom:l.inset_bottom,type:l.inset_type}),h()}(l.inset_top||l.inset_right||l.inset_bottom||l.inset_left)&&A();function I(x){h(),x?s.style.display="block":s.style.display="none"}return()=>({destroy(){e.destroy(),gt(b)}})}function Zt(i){return function(o){let{spaces:e,objects:n}=o,r=e[0]??n[0];r&&i.Camera.focusOn(r)}}v();function xt(i,t,o){let e={markers:{},removeAllMarkers(){o.Markers.removeAll().forEach(l=>{delete this.markers[l.id]}),d()}},{addMarker:n,destroy:r}=Kt(i,o);i.add(e,"removeAllMarkers");let s=i.addFolder("Marker List");i.close();let a=new Map,{rerender:d}=g();function g(){function p(m){delete e.markers[m.id],a.get(m.id)?.destroy()}function l(m){let C=Qt(o,m,s,{onRemove:b=>{p(b)}});if(!C)return;let{markerItemFolder:f}=C;a.set(m.id,f)}function h(){s.destroy(),s=i.addFolder("marker");for(let m in e.markers){let C=e.markers[m];l(C)}}return{rerender:h,add:l,remove:p}}i.domElement.classList.add("list-items");let c;o.on("click",({markers:p,coordinate:l})=>{if(!i._closed)if(p[0]){c?.close();let h=a.get(p[0].id);if(i.open(),!h)return;h?.open(),h?.domElement.scrollIntoView({block:"start"}),h?.domElement.focus(),c=h}else n(l)});function u(p){for(let l of p)e.markers[l.id]=l;d()}return{populateMarkers:u,destroy(){r()}}}function Qt(i,t,o,{onRemove:e}={}){let n=o.addFolder(`${t.id.toString().substring(0,8)}`);n.onChange(d=>{i.updateState(t,{interactive:a.interactive})}),n.close();let r=i.getState(t);if(r?.type!=="marker")throw new Error(`error getting state for marker: ${t.id}`);let{interactive:s}=r;if(s==null)throw new Error("incomplte label state");let a={interactive:s,remove(){i.Markers.remove(t),e?.(t),n.destroy()}};return n.add(a,"interactive"),n.add(a,"remove"),{markerItemFolder:n,destroy(){n.destroy()}}}function Kt(i,t){let o=i.addFolder("Add"),e={onClick:!1,interactive:!0};return o.add(e,"onClick"),o.add(e,"interactive"),{destroy(){o.destroy()},addMarker(n){return o._closed||!e.onClick?void 0:t.Markers.add(n,"<div>New Marker</div>",{interactive:e.interactive})}}}v();function At(i,t){let o=i.addFolder("Walls").close(),e={visible:!0,topColor:"#b1fa87",color:"#e8e8e8",texture:{url:""},topTexture:{url:""}};o.add(e,"visible").onChange(s=>{t.updateState("walls",{visible:s})}),o.addColor(e,"topColor").onChange(s=>{t.updateState("walls",{topColor:s})}),o.addColor(e,"color").onChange(s=>{t.updateState("walls",{color:s})}),o.addFolder("Texture - side").add(e.texture,"url").onFinishChange(s=>{t.updateState("walls",{texture:{url:s}})}),o.addFolder("Texture - top").add(e.topTexture,"url").onFinishChange(s=>{t.updateState("walls",{topTexture:{url:s}})}),t.updateState("walls",{topColor:e.topColor}),t.updateState("walls",{color:e.color})}v();function kt(i,t,o){i.close();let e={language:o.currentLanguage?.code??"en"},n=o.getByType("enterprise-venue");i.add(e,"language",n?.languages.map(r=>r.code)).onChange(r=>{o.changeLanguage(r)})}v();function Mt(i,t,o){let e=i.addFolder("Debug");e.close();let n=t.Debug.state,r={showPolygonLabelTextAreaMesh:n.showPolygonLabelTextAreaMesh,showCollisionBoxes:n.showCollisionBoxes,showEnvMap:n.showEnvMap};e.add(r,"showPolygonLabelTextAreaMesh").onChange(s=>{t.Debug.update({showPolygonLabelTextAreaMesh:s})}).name("Show Flat Label Text Area Mesh"),e.add(r,"showCollisionBoxes").onChange(s=>{t.Debug.update({showCollisionBoxes:s})}).name("Show Collision Boxes"),e.add(r,"showEnvMap").onChange(s=>{t.Debug.update({showEnvMap:s})}).name("Show Environment Map"),t.Debug.update(r)}v();function Et(i,t,o){let e=i.addFolder("Text3D").close(),n={all:()=>{t.Text3D.labelAll()},removeAll:()=>{t.Text3D.removeAll()}};e.add(n,"all").name("Show All"),e.add(n,"removeAll").name("Remove All")}v();v();v();var _,R,L,k,$,F,wt,st,_t,rt=class{constructor(t=new G({autoPlace:!0})){D(this,F);D(this,_);D(this,R,[]);D(this,L,{});D(this,k,{});D(this,$,{});dt(this,_,t),y(this,_).domElement.style.left="0"}add(t,o,e){if(y(this,k)[t])throw new Error(`Control ${t} already exists`);y(this,L)[t]=o,y(this,$)[t]=o.default,B(this,F,wt).call(this,t,o,e),this.show()}addColor(t,o,e){if(y(this,k)[t])throw new Error(`Control ${t} already exists`);y(this,L)[t]=o,y(this,$)[t]=o.default,B(this,F,_t).call(this,t,o,e),this.show()}update(t,o){if(!y(this,k)[t])throw new Error(`Control ${t} does not exist`);y(this,k)[t].setValue(o),y(this,L)[t].onChange&&y(this,L)[t].onChange(o,t)}replace(t,o,e){if(!y(this,k)[t]){this.add(t,o,e);return}o.args&&y(this,k)[t].options(o.args),o.default&&y(this,k)[t].setValue(o.default),o.onChange&&y(this,k)[t].onChange(n=>{o.onChange(n,t)})}remove(t){if(!y(this,k)[t])throw new Error(`Control ${t} does not exist`);y(this,k)[t].destroy(),y(this,k)[t].parent.children.length===0&&y(this,k)[t].parent.hide(),delete y(this,k)[t],delete y(this,L)[t],delete y(this,$)[t]}show(){y(this,_).show()}hide(){y(this,_).hide()}removeAll(){for(let t in y(this,k))this.remove(t)}destroy(){y(this,_).destroy()}};_=new WeakMap,R=new WeakMap,L=new WeakMap,k=new WeakMap,$=new WeakMap,F=new WeakSet,wt=function(t,o,e){let r=B(this,F,st).call(this,e).add(y(this,$),t,o.args,o.max,o.step);o.onChange&&r.onChange(s=>{o.onChange(s,t)}),o.onAdd&&o.onAdd(o.default,t),y(this,k)[t]=r},st=function(t){if(!t)return y(this,_);let o=y(this,R).find(e=>e._title===t);return o?(o.show(),o):(o=y(this,_).addFolder(t),y(this,R).push(o),o)},_t=function(t,o,e){let r=B(this,F,st).call(this,e).addColor(y(this,$),t);o.onChange&&r.onChange(s=>{o.onChange(s,t)}),y(this,k)[t]=r};function qt(i,t,o){let e={},n=i.getByType("floor"),r=i.getByType("floor-stack");r.length>1&&(e.FloorStack={default:t.currentFloorStack.id,args:r.reduce((a,{id:d,name:g})=>({...a,[g]:d}),{}),onChange:a=>{a!==t.currentFloorStack.id&&(t.setFloorStack(a),o.replace("Floor",{default:t.currentFloor.id,args:t.currentFloorStack.floors.reduce((d,{id:g,name:c})=>({...d,[c]:g}),{})}))}}),n.length>1&&(e.Floor={default:t.currentFloor.id,args:[...t.currentFloorStack.floors.sort((a,d)=>d.elevation-a.elevation)].reduce((a,{id:d,name:g})=>({...a,[g]:d}),{}),onChange:a=>{a!==t.currentFloor.id&&t.setFloor(a)},onAdd:()=>{t.on("floor-change",a=>{a?.floor.id&&(r.length>1&&o.replace("FloorStack",{default:t.currentFloorStack.id}),o.replace("Floor",{default:t.currentFloor.id,args:t.currentFloorStack.floors.reduce((g,{id:c,name:u})=>({...g,[u]:c}),{})}))})}});let s=i.getByType("enterprise-venue");return s&&s.languages.length>1&&(e.Language={default:i.currentLanguage?.code||s.languages[0].code,args:s.languages.reduce((a,{code:d,name:g})=>({...a,[g]:d}),{}),onChange:a=>{i.changeLanguage(a)}}),e}function Ft(i,t,o=new G){let e=new rt(o),n=qt(i,t,e);Object.keys(n).length||e.hide();for(let r in n)e.add(r,n[r]);return e}async function St(i,t,{initialfloorsInStack:o,root:e,floorsInDirections:n,showLabelsPerFloor:r=!0}){async function s(h){i.StackedMaps.changeFloorOnElevationChanges(!1),i.Outdoor.setOpacity(.15),i.StackedMaps.setFloorVisiblityMode("only-current-floor"),i.Camera.setPanMode("default"),await i.Camera.focusOn(h,{pitch:10})}async function a(){i.Outdoor.setOpacity(.25),i.StackedMaps.changeFloorOnElevationChanges(!0),i.Camera.setPanMode("elevation"),i.StackedMaps.setFloorVisiblityMode("all-floors"),await i.Camera.focusOn(i.currentFloor,{axisAlignedPadding:{vertical:i.StackedMaps.distanceBetweenFloors},pitch:90})}async function d(h){await i.Camera.animateElevation(h.elevation*i.StackedMaps.distanceBetweenFloors)}let g=i.currentFloor;i.on("floor-change",async h=>{i.StackedMaps.expanded&&h.reason!=="stacked-maps-elevation-change"&&(i.StackedMaps.changeFloorOnElevationChanges(!1),i.StackedMaps.setFloorVisiblityMode("all-floors"),await i.Camera.focusOn(g,{axisAlignedPadding:{vertical:i.StackedMaps.distanceBetweenFloors},pitch:90,duration:500}),i.StackedMaps.changeFloorOnElevationChanges(!0),await d(i.currentFloor),await s(i.currentFloor),i.StackedMaps.setFloorVisiblityMode("only-current-floor")),g=i.currentFloor}),i.on("stacked-maps-state-change",({state:h})=>{console.log("stacked-maps-state-change",h)});let c=t.getByType("space");if(r){let h=c.reduce((m,C)=>(m.has(C.floor)||m.set(C.floor,[]),C.name&&C.name!==""&&m.get(C.floor).push(i.Labels.add(C,C.name)),m),new Map);i.on("floor-change",()=>{h.forEach((m,C)=>{m.forEach(f=>{i.updateState(f,{enabled:i.currentFloor===C})})})})}let u=Ft(t,i,e),p=o??[];async function l(){i.Outdoor.setOpacity(.25),p=t.getByType("floor"),await i.Camera.animateTo({pitch:90}),await i.StackedMaps.collapse(),i.StackedMaps.clearCachedFloorSeparationDistance(),await i.StackedMaps.expand({distanceBetweenFloors:"auto"})}return u.add("Expand - All",{default:async()=>{await l()}},"Stack Maps"),n&&u.add("Expand - Only Navigation",{default:async()=>{i.Outdoor.setOpacity(.25),p=n,await i.StackedMaps.collapse(),i.setFloor(n[0]),await i.StackedMaps.expand({includedFloors:n,distanceBetweenFloors:"auto"})}},"Stack Maps"),u.add("Show All Floors",{default:async()=>{p=t.getByType("floor"),i.Outdoor.setOpacity(.25),i.StackedMaps.setFloorVisiblityMode("all-floors"),i.StackedMaps.changeFloorOnElevationChanges(!1),i.Camera.setPanMode("elevation"),i.Camera.focusOn(p,{pitch:90})}},"Stack Maps"),u.add("Show Current Floor with padding",{default:async()=>{await a()}},"Stack Maps"),u.add("Zoom to Current Floor",{default:async()=>{s(i.currentFloor)}},"Stack Maps"),u.add("Collapse",{default:()=>{i.Outdoor.setOpacity("initial"),i.StackedMaps.collapse()}},"Stack Maps"),u.add("Default",{default:async()=>{i.Camera.setPanMode("default")}},"Camera Pan Mode"),u.add("Elevation",{default:async()=>{i.Camera.setPanMode("elevation")}},"Camera Pan Mode"),u.add("zoom in to floor 2",{default:async()=>{i.Outdoor.setOpacity(.25),console.log(i.currentFloor.name),await i.Camera.focusOn(i.currentFloor,{axisAlignedPadding:{vertical:i.StackedMaps.distanceBetweenFloors},pitch:90}),i.StackedMaps.expanded||await i.StackedMaps.expand({distanceBetweenFloors:i.StackedMaps.distanceBetweenFloors});let h=i.StackedMaps.includedFloors[2],m=p.findIndex(C=>C.id===h.id);i.StackedMaps.changeFloorOnElevationChanges(!0),i.Camera.setPanMode("elevation"),i.StackedMaps.setFloorVisiblityMode("all-floors"),await i.Camera.animateElevation(m*i.StackedMaps.distanceBetweenFloors),i.Outdoor.setOpacity(.15),console.log("focusing on",h.name),await i.Camera.focusOn(h,{pitch:10}),i.StackedMaps.setFloorVisiblityMode("only-current-floor"),i.Camera.setPanMode("default"),i.StackedMaps.changeFloorOnElevationChanges(!1)}},"Camera Pan Mode"),u.add("All Floors",{default:async()=>{i.StackedMaps.setFloorVisiblityMode("all-floors")}},"Visibility Mode"),u.add("Only Active Floor",{default:async()=>{i.StackedMaps.setFloorVisiblityMode("only-current-floor")}},"Visibility Mode"),u.add("Up",{default:async()=>{let h=p.find(m=>m.elevation===i.currentFloor.elevation+1);h&&await d(h)}},"Floors Up/Down"),u.add("Down",{default:async()=>{let h=p.find(m=>m.elevation===i.currentFloor.elevation-1);h&&await d(h)}},"Floors Up/Down"),{zoomToFloor:s,expandAll:l}}function Lt(i,t,o){let e=i.addFolder("StackedMaps");e.close(),St(t,o,{root:e,showLabelsPerFloor:!1})}function It(i,t,o){Vt();let e=new Y({title:"SDK Controls"});e.domElement.classList.add("mappedin-js-inspector"),mt(t,i,e),Ct(e,t,o?.camera);let n=e.addFolder("Levels").close(),r=e.addFolder("Scene Controls");r.close();let s=e.addFolder("Labels");Et(e,t,i);let a=e.addFolder("Markers");At(e,t),Lt(e,t,i);let d=e.addFolder("misc");Mt(e,t,i),kt(d,t,i);let g={level:t.currentFloor.id},{populatelabels:c}=bt(s,i,t),{populateMarkers:u}=xt(a,i,t),p=i.getByType("floor").reduce((h,m)=>(h[m.name]=m.id,h),{}),l=n.add(g,"level",p).onChange(h=>{t.setFloor(h),g.level=t.currentFloor.id,l.updateDisplay()});return t.on("floor-change-start",h=>{n.controllers[0].setValue(h.floor.id)}),i.getByType("space").forEach(h=>{t.updateState(h,{interactive:!0})}),i.getByType("object").forEach(h=>{t.updateState(h,{interactive:!0})}),i.getByType("object").forEach(h=>{t.updateState(h,{interactive:!0})}),t.setHoverColor("#a2b7e6"),t.Camera.setMaxZoomLevel(20),{populatelabels:c,sceneFolder:r,populateMarkers:u}}var $t="mappedin-sdk-debug-css";function Vt(){if(document.getElementById($t))return;let i=document.createElement("style");i.id=$t,i.textContent=vt,document.head.appendChild(i)}var at=class{constructor(t,o){O(this,"_enabled",!1);O(this,"mv");O(this,"api");O(this,"mapData");O(this,"scenegraphVisualizerMounted",!1);O(this,"storeStateToLocalStorageEnabled",!1);this.mv=t,this.api=o,this.mapData=this.api.getMapData()}setMapData(t){this.mapData=t}async enable(t={}){if(this._enabled)return;if(this._enabled=!0,!this.mapData)throw new Error("Please set mapData before enable debug.");let{sceneFolder:o}=It(this.mapData,this.mv,t);o.onOpenClose(e=>{e===o&&!e._closed&&!this.scenegraphVisualizerMounted&&(this.scenegraphVisualizerMounted=!0,ut(this.api.core,o))}),this.api.getMapDataInternal()?.spaces.forEach(e=>{this.mv.updateState(e.id,{interactive:!0})})}get enabled(){return this._enabled}};export{at as Inspector};
|
|
483
|
-
//# sourceMappingURL=inspector-
|
|
483
|
+
//# sourceMappingURL=inspector-WLLHTPSP.js.map
|