@mapsindoors/map-template 1.96.4 → 1.96.5

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.
@@ -268,4 +268,3 @@ function U({ apiKey: n, onInitialized: e, center: t, zoom: r, bounds: s, heading
268
268
  export {
269
269
  U as default
270
270
  };
271
- //# sourceMappingURL=GoogleMapsMap-DrAndMwX.mjs.map
@@ -34729,4 +34729,3 @@ function sw({ accessToken: Qi, onInitialized: Mu, center: Nn, zoom: Vn, bounds:
34729
34729
  export {
34730
34730
  sw as default
34731
34731
  };
34732
- //# sourceMappingURL=MapboxMap-BnjSSnYk.mjs.map
@@ -3,4 +3,3 @@ import { M as f } from "./reactcomponent-BbCjFBSB.mjs";
3
3
  export {
4
4
  f as default
5
5
  };
6
- //# sourceMappingURL=mapsindoors-react.es.js.map
@@ -2914,4 +2914,3 @@ ${f.vertexSource}`,this.forceManualRenderingForInstanceIDShaders&&(G=G.replaceAl
2914
2914
  `}_calculateXYTransform(){const n=this._pos,l=this._map,f=this.getPitchAlignment();if(!l||!n||f!=="map")return"";if(!l._showingGlobe()){const N=l.getPitch();return N?`rotateX(${N}deg)`:""}const _=i.cW(i.eZ(l.transform,this._lngLat)),v=n.sub(i.e_(l.transform)),M=Math.abs(v.x)+Math.abs(v.y);if(M===0)return"";const T=_/M;return`rotateX(${-v.y*T}deg) rotateY(${v.x*T}deg)`}_calculateZTransform(){const n=this._pos,l=this._map;if(!l||!n)return"";let f=0;const _=this.getRotationAlignment();if(_==="map")if(l._showingGlobe()){const v=l.project(new i.aR(this._lngLat.lng,this._lngLat.lat+.001),this._altitude),M=l.project(new i.aR(this._lngLat.lng,this._lngLat.lat-.001),this._altitude).sub(v);f=i.cW(Math.atan2(M.y,M.x))-90}else f=-l.getBearing();else if(_==="horizon"){const v=i.ah(4,6,l.getZoom()),M=i.e_(l.transform);M.y+=v*l.transform.height;const T=n.sub(M),N=i.cW(Math.atan2(T.y,T.x));f=(N>90?N-270:N+90)*(1-v)}return f+=this._rotation,f?`rotateZ(${f}deg)`:""}_update(n){cancelAnimationFrame(this._updateFrameId);const l=this._map;l&&(l.transform.renderWorldCopies&&(this._lngLat=tp(this._lngLat,this._pos,l.transform)),this._pos=l.project(this._lngLat,this._altitude),n===!0?this._updateFrameId=requestAnimationFrame((()=>{this._element&&this._pos&&this._anchor&&(this._pos=this._pos.round(),this._updateDOM())})):this._pos=this._pos.round(),l._requestDomTask((()=>{this._map&&(this._element&&this._pos&&this._anchor&&this._updateDOM(),(l._showingGlobe()||l.getTerrain()||l.getFog())&&!this._fadeTimer&&(this._fadeTimer=window.setTimeout(this._evaluateOpacity.bind(this),60)))})))}getOffset(){return this._offset}setOffset(n){return this._offset=i.P.convert(n),this._update(),this}addClassName(n){return this._element.classList.add(n),this}removeClassName(n){return this._element.classList.remove(n),this}toggleClassName(n){return this._element.classList.toggle(n)}_onMove(n){const l=this._map;if(!l)return;const f=this._pointerdownPos,_=this._positionDelta;if(f&&_){if(!this._isDragging){const v=this._clickTolerance||l._clickTolerance;if(n.point.dist(f)<v)return;this._isDragging=!0}this._pos=n.point.sub(_),this._lngLat=l.unproject(this._pos,this._altitude),this.setLngLat(this._lngLat),this._element.style.pointerEvents="none",this._state==="pending"&&(this._state="active",this.fire(new i.z("dragstart"))),this.fire(new i.z("drag"))}}_onUp(){this._element.style.pointerEvents="auto",this._positionDelta=null,this._pointerdownPos=null,this._isDragging=!1;const n=this._map;n&&(n.off("mousemove",this._onMove),n.off("touchmove",this._onMove)),this._state==="active"&&this.fire(new i.z("dragend")),this._state="inactive"}_addDragHandler(n){const l=this._map,f=this._pos;l&&f&&this._element.contains(n.originalEvent.target)&&(n.preventDefault(),this._positionDelta=n.point.sub(f),this._pointerdownPos=n.point,this._state="pending",l.on("mousemove",this._onMove),l.on("touchmove",this._onMove),l.once("mouseup",this._onUp),l.once("touchend",this._onUp))}setDraggable(n){this._draggable=!!n;const l=this._map;return l&&(n?(l.on("mousedown",this._addDragHandler),l.on("touchstart",this._addDragHandler)):(l.off("mousedown",this._addDragHandler),l.off("touchstart",this._addDragHandler))),this}isDraggable(){return this._draggable}setRotation(n){return this._rotation=n||ba.rotation,this._update(),this}getRotation(){return this._rotation}setRotationAlignment(n){return this._rotationAlignment=n||ba.rotationAlignment,this._update(),this}getRotationAlignment(){return this._rotationAlignment==="auto"||this._rotationAlignment==="horizon"&&this._map&&!this._map._showingGlobe()?"viewport":this._rotationAlignment}setPitchAlignment(n){return this._pitchAlignment=n||ba.pitchAlignment,this._update(),this}getPitchAlignment(){return this._pitchAlignment==="auto"?this.getRotationAlignment():this._pitchAlignment}setOccludedOpacity(n){return this._occludedOpacity=n||ba.occludedOpacity,this._update(),this}getOccludedOpacity(){return this._occludedOpacity}}const Jl={positionOptions:{enableHighAccuracy:!1,maximumAge:0,timeout:6e3},fitBoundsOptions:{maxZoom:15},trackUserLocation:!1,showAccuracyCircle:!0,showUserLocation:!0,showUserHeading:!1},ec={maxWidth:100,unit:"metric"},tc={kilometer:"km",meter:"m",mile:"mi",foot:"ft","nautical-mile":"nm"},nc={closeButton:!0,closeOnClick:!0,focusAfterOpen:!0,className:"",maxWidth:"240px",altitude:0},sl=["a[href]","[tabindex]:not([tabindex='-1'])","[contenteditable]:not([contenteditable='false'])","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].join(", ");function zl(p=new i.P(0,0),n="bottom"){if(typeof p=="number"){const l=Math.round(Math.sqrt(.5*Math.pow(p,2)));switch(n){case"top":return new i.P(0,p);case"top-left":return new i.P(l,l);case"top-right":return new i.P(-l,l);case"bottom":return new i.P(0,-p);case"bottom-left":return new i.P(l,-l);case"bottom-right":return new i.P(-l,-l);case"left":return new i.P(p,0);case"right":return new i.P(-p,0)}return new i.P(0,0)}return p instanceof i.P||Array.isArray(p)?i.P.convert(p):i.P.convert(p[n]||[0,0])}return{version:C,supported:ee.supported,setRTLTextPlugin:i.f2,getRTLTextPluginStatus:i.f1,Map:class extends Ig{constructor(p){O.mark(E.create);const n=p;if((p=Object.assign({},Ud,p)).minZoom!=null&&p.maxZoom!=null&&p.minZoom>p.maxZoom)throw new Error("maxZoom must be greater than or equal to minZoom");if(p.minPitch!=null&&p.maxPitch!=null&&p.minPitch>p.maxPitch)throw new Error("maxPitch must be greater than or equal to minPitch");if(p.minPitch!=null&&p.minPitch<0)throw new Error("minPitch must be greater than or equal to 0");if(p.maxPitch!=null&&p.maxPitch>85)throw new Error("maxPitch must be less than or equal to 85");if(p.antialias&&i.eW(window)&&(p.antialias=!1,i.w("Antialiasing is disabled for this WebGL context to avoid browser bug: https://github.com/mapbox/mapbox-gl-js/issues/11609")),super(new Ms(p.minZoom,p.maxZoom,p.minPitch,p.maxPitch,p.renderWorldCopies,null,null),p),this._repaint=!!p.repaint,this._interactive=p.interactive,this._minTileCacheSize=p.minTileCacheSize,this._maxTileCacheSize=p.maxTileCacheSize,this._failIfMajorPerformanceCaveat=p.failIfMajorPerformanceCaveat,this._preserveDrawingBuffer=p.preserveDrawingBuffer,this._antialias=p.antialias,this._trackResize=p.trackResize,this._bearingSnap=p.bearingSnap,this._refreshExpiredTiles=p.refreshExpiredTiles,this._fadeDuration=p.fadeDuration,this._isInitialLoad=!0,this._crossSourceCollisions=p.crossSourceCollisions,this._collectResourceTiming=p.collectResourceTiming,this._language=this._parseLanguage(p.language),this._worldview=p.worldview,this._renderTaskQueue=new mo,this._domRenderTaskQueue=new mo,this._controls=[],this._markers=[],this._popups=[],this._mapId=i.b2(),this._locale=Object.assign({},Vh,p.locale),this._clickTolerance=p.clickTolerance,this._cooperativeGestures=p.cooperativeGestures,this._performanceMetricsCollection=p.performanceMetricsCollection,this._tessellationStep=p.tessellationStep,this._containerWidth=0,this._containerHeight=0,this._showParseStatus=!0,this._precompilePrograms=p.precompilePrograms,this._scaleFactorChanged=!1,this._averageElevationLastSampledAt=-1/0,this._averageElevationExaggeration=0,this._averageElevation=new Ll(0),this._interactionRange=[1/0,-1/0],this._visibilityHidden=0,this._useExplicitProjection=!1,this._frameId=0,this._scaleFactor=p.scaleFactor,this._requestManager=new st(p.transformRequest,p.accessToken,p.testMode),this._silenceAuthErrors=!!p.testMode,this._contextCreateOptions=p.contextCreateOptions?Object.assign({},p.contextCreateOptions):{},typeof p.container=="string"){const l=document.getElementById(p.container);if(!l)throw new Error(`Container '${p.container.toString()}' not found.`);this._container=l}else{if(!(p.container instanceof HTMLElement))throw new Error("Invalid type: 'container' must be a String or HTMLElement.");this._container=p.container}if(this._container.childNodes.length>0&&i.w("The map container element should be empty, otherwise the map's interactivity will be negatively impacted. If you want to display a message when WebGL is not supported, use the Mapbox GL Supported plugin instead."),p.maxBounds&&this.setMaxBounds(p.maxBounds),this._spriteFormat=p.spriteFormat,i.aY(["_onWindowOnline","_onWindowResize","_onVisibilityChange","_onMapScroll","_contextLost","_contextRestored"],this),this._setupContainer(),this._tp||(this._tp=new Ra),this._tp.registerParameter(this,["Debug"],"showOverdrawInspector"),this._tp.registerParameter(this,["Debug"],"showTileBoundaries"),this._tp.registerParameter(this,["Debug"],"showParseStatus"),this._tp.registerParameter(this,["Debug"],"repaint"),this._tp.registerParameter(this,["Debug"],"showTileAABBs"),this._tp.registerParameter(this,["Debug"],"showPadding"),this._tp.registerParameter(this,["Debug"],"showCollisionBoxes",{noSave:!0}),this._tp.registerParameter(this.transform,["Debug"],"freezeTileCoverage",{noSave:!0},(()=>{this._update()})),this._tp.registerParameter(this,["Debug","Wireframe"],"showTerrainWireframe"),this._tp.registerParameter(this,["Debug","Wireframe"],"showLayers2DWireframe"),this._tp.registerParameter(this,["Debug","Wireframe"],"showLayers3DWireframe"),this._tp.registerParameter(this,["Scaling"],"_scaleFactor",{min:.1,max:10,step:.1},(()=>{this.setScaleFactor(this._scaleFactor)})),this._setupPainter(),this.painter===void 0)throw new Error("Failed to initialize WebGL.");if(this.on("move",(()=>this._update(!1))),this.on("moveend",(()=>this._update(!1))),this.on("zoom",(()=>this._update(!0))),this._fullscreenchangeEvent="onfullscreenchange"in document?"fullscreenchange":"webkitfullscreenchange",window.addEventListener("online",this._onWindowOnline,!1),window.addEventListener("resize",this._onWindowResize,!1),window.addEventListener("orientationchange",this._onWindowResize,!1),window.addEventListener(this._fullscreenchangeEvent,this._onWindowResize,!1),window.addEventListener("visibilitychange",this._onVisibilityChange,!1),this.handlers=new Ss(this,p),this._localFontFamily=p.localFontFamily,this._localIdeographFontFamily=p.localIdeographFontFamily,(p.style||!p.testMode)&&this.setStyle(p.style||i.e.DEFAULT_STYLE,{config:p.config,localFontFamily:this._localFontFamily,localIdeographFontFamily:this._localIdeographFontFamily}),p.projection&&this.setProjection(p.projection),this.indoor=new xu(this),p.hash&&(this._hash=new Gf(typeof p.hash=="string"&&p.hash||void 0).addTo(this)),!this._hash||!this._hash._onHashChange()){n.center==null&&n.zoom==null||(this.transform._unmodified=!1),this.jumpTo({center:p.center,zoom:p.zoom,bearing:p.bearing,pitch:p.pitch});const l=p.bounds;l&&(this.resize(),this.fitBounds(l,Object.assign({},p.fitBoundsOptions,{duration:0})))}this.resize(),p.attributionControl&&this.addControl(new Bu({customAttribution:p.customAttribution})),this._logoControl=new Xl,this.addControl(this._logoControl,p.logoPosition),this.on("style.load",(()=>{this.transform.unmodified&&this.jumpTo(this.style.stylesheet),this._postStyleLoadEvent()})),this.on("data",(l=>{this._update(l.dataType==="style"),this.fire(new i.z(`${l.dataType}data`,l))})),this.on("dataloading",(l=>{this.fire(new i.z(`${l.dataType}dataloading`,l))})),this._interactions=new Jm(this)}_getMapId(){return this._mapId}addControl(p,n){if(n===void 0&&(n=p.getDefaultPosition?p.getDefaultPosition():"top-right"),!p||!p.onAdd)return this.fire(new i.y(new Error("Invalid argument to map.addControl(). Argument must be a control with onAdd and onRemove methods.")));const l=p.onAdd(this);this._controls.push(p);const f=this._controlPositions[n];return n.indexOf("bottom")!==-1?f.insertBefore(l,f.firstChild):f.appendChild(l),this}removeControl(p){if(!p||!p.onRemove)return this.fire(new i.y(new Error("Invalid argument to map.removeControl(). Argument must be a control with onAdd and onRemove methods.")));const n=this._controls.indexOf(p);return n>-1&&this._controls.splice(n,1),p.onRemove(this),this}hasControl(p){return this._controls.indexOf(p)>-1}getContainer(){return this._container}getCanvasContainer(){return this._canvasContainer}getCanvas(){return this._canvas}resize(p){if(this._updateContainerDimensions(),this._containerWidth===this.transform.width&&this._containerHeight===this.transform.height)return this;this._resizeCanvas(this._containerWidth,this._containerHeight),this.transform.resize(this._containerWidth,this._containerHeight),this.painter.resize(Math.ceil(this._containerWidth),Math.ceil(this._containerHeight));const n=!this._moving;return n&&this.fire(new i.z("movestart",p)).fire(new i.z("move",p)),this.fire(new i.z("resize",p)),n&&this.fire(new i.z("moveend",p)),this}getBounds(){return this.transform.getBounds()}getMaxBounds(){return this.transform.getMaxBounds()||null}setMaxBounds(p){return this.transform.setMaxBounds(i.aI.convert(p)),this._update()}setMinZoom(p){if((p=p??-2)>=-2&&p<=this.transform.maxZoom)return this.transform.minZoom=p,this._update(),this.getZoom()<p?this.setZoom(p):this.fire(new i.z("zoomstart")).fire(new i.z("zoom")).fire(new i.z("zoomend")),this;throw new Error("minZoom must be between -2 and the current maxZoom, inclusive")}getMinZoom(){return this.transform.minZoom}setMaxZoom(p){if((p=p??22)>=this.transform.minZoom)return this.transform.maxZoom=p,this._update(),this.getZoom()>p?this.setZoom(p):this.fire(new i.z("zoomstart")).fire(new i.z("zoom")).fire(new i.z("zoomend")),this;throw new Error("maxZoom must be greater than the current minZoom")}getMaxZoom(){return this.transform.maxZoom}setMinPitch(p){if((p=p??0)<0)throw new Error("minPitch must be greater than or equal to 0");if(p>=0&&p<=this.transform.maxPitch)return this.transform.minPitch=p,this._update(),this.getPitch()<p?this.setPitch(p):this.fire(new i.z("pitchstart")).fire(new i.z("pitch")).fire(new i.z("pitchend")),this;throw new Error("minPitch must be between 0 and the current maxPitch, inclusive")}getMinPitch(){return this.transform.minPitch}setMaxPitch(p){if((p=p??85)>85)throw new Error("maxPitch must be less than or equal to 85");if(p>=this.transform.minPitch)return this.transform.maxPitch=p,this._update(),this.getPitch()>p?this.setPitch(p):this.fire(new i.z("pitchstart")).fire(new i.z("pitch")).fire(new i.z("pitchend")),this;throw new Error("maxPitch must be greater than or equal to minPitch")}getMaxPitch(){return this.transform.maxPitch}getScaleFactor(){return this._scaleFactor}setScaleFactor(p){return this._scaleFactor=p,this.painter.scaleFactor=p,this._tp.refreshUI(),this._scaleFactorChanged=!0,this.style._updateFilteredLayers((n=>n.type==="symbol")),this._update(!0),this}getRenderWorldCopies(){return this.transform.renderWorldCopies}setRenderWorldCopies(p){return this.transform.renderWorldCopies=p,this.transform.renderWorldCopies||this._forceMarkerAndPopupUpdate(!0),this._update()}getLanguage(){return this._language}_parseLanguage(p){return p==="auto"?navigator.language:Array.isArray(p)?p.length===0?void 0:p.map((n=>n==="auto"?navigator.language:n)):p}setLanguage(p){const n=this._parseLanguage(p);if(!this.style||n===this._language)return this;this._language=n,this.style.reloadSources();for(const l of this._controls)l._setLanguage&&l._setLanguage(this._language);return this}getWorldview(){return this._worldview}setWorldview(p){return this.style&&p!==this._worldview?(this._worldview=p,this._styleDirty=!0,this.style.reloadSources(),this):this}getProjection(){return this.transform.mercatorFromTransition?{name:"globe",center:[0,0]}:this.transform.getProjection()}_showingGlobe(){return this.transform.projection.name==="globe"}setProjection(p){return this._lazyInitEmptyStyle(),p?typeof p=="string"&&(p={name:p}):p=null,this._useExplicitProjection=!!p,this._prioritizeAndUpdateProjection(p,this.style.projection)}_updateProjectionTransition(){if(this.getProjection().name!=="globe")return;const p=this.transform,n=p.projection.name;let l;n==="globe"&&p.zoom>=i.cK?(p.setMercatorFromTransition(),l=!0):n==="mercator"&&p.zoom<i.cK&&(p.setProjection({name:"globe"}),l=!0),l&&(this.style.applyProjectionUpdate(),this.style._forceSymbolLayerUpdate(),this._update(!0))}_prioritizeAndUpdateProjection(p,n){return this._updateProjection(p||n||{name:"mercator"})}_updateProjection(p){let n;return n=p.name==="globe"&&this.transform.zoom>=i.cK?this.transform.setMercatorFromTransition():this.transform.setProjection(p),this.style.applyProjectionUpdate(),n&&(this.painter.clearBackgroundTiles(),this.style.clearSources(),this._update(!0),this._forceMarkerAndPopupUpdate(!0)),this}project(p,n){return this.transform.locationPoint3D(i.aR.convert(p),n)}unproject(p,n){return this.transform.pointLocation3D(i.P.convert(p),n)}isMoving(){return this._moving||this.handlers&&this.handlers.isMoving()||!1}isZooming(){return this._zooming||this.handlers&&this.handlers.isZooming()||!1}isRotating(){return this._rotating||this.handlers&&this.handlers.isRotating()||!1}_isDragging(){return this.handlers&&this.handlers._isDragging()||!1}_createDelegatedListener(p,n,l){const f=_=>{let v=[];if(Array.isArray(n)){const M=n.filter((T=>this.getLayer(T)));v=M.length?this.queryRenderedFeatures(_,{layers:M}):[]}else v=this.queryRenderedFeatures(_,{target:n});return v};if(p==="mouseenter"||p==="mouseover"){let _=!1;return{listener:l,targets:n,delegates:{mousemove:M=>{const T=f(M.point);T.length?_||(_=!0,l.call(this,new Vo(p,this,M.originalEvent,{features:T}))):_=!1},mouseout:()=>{_=!1}}}}if(p==="mouseleave"||p==="mouseout"){let _=!1;return{listener:l,targets:n,delegates:{mousemove:T=>{f(T.point).length?_=!0:_&&(_=!1,l.call(this,new Vo(p,this,T.originalEvent)))},mouseout:T=>{_&&(_=!1,l.call(this,new Vo(p,this,T.originalEvent)))}}}}{const _=v=>{const M=f(v.point);M.length&&(v.features=M,l.call(this,v),delete v.features)};return{listener:l,targets:n,delegates:{[p]:_}}}}on(p,n,l){if(typeof n=="function"||l===void 0)return super.on(p,n);if(typeof n=="string"&&(n=[n]),!this._areTargetsValid(n))return this;const f=this._createDelegatedListener(p,n,l);this._delegatedListeners=this._delegatedListeners||{},this._delegatedListeners[p]=this._delegatedListeners[p]||[],this._delegatedListeners[p].push(f);for(const _ in f.delegates)this.on(_,f.delegates[_]);return this}once(p,n,l){if(typeof n=="function"||l===void 0)return super.once(p,n);if(typeof n=="string"&&(n=[n]),!this._areTargetsValid(n))return this;const f=this._createDelegatedListener(p,n,l);for(const _ in f.delegates)this.once(_,f.delegates[_]);return this}off(p,n,l){if(typeof n=="function"||l===void 0)return super.off(p,n);if(typeof n=="string"&&(n=[n]),!this._areTargetsValid(n))return this;const f=this._delegatedListeners?this._delegatedListeners[p]:void 0;return f&&(_=>{for(let v=0;v<_.length;v++){const M=_[v];if(M.listener===l&&K1(M.targets,n)){for(const T in M.delegates)this.off(T,M.delegates[T]);return _.splice(v,1),this}}})(f),this}queryRenderedFeatures(p,n){if(!this.style)return[];if(p===void 0||p instanceof i.P||Array.isArray(p)||n!==void 0||(n=p,p=void 0),p=p||[[0,0],[this.transform.width,this.transform.height]],!n){const v=this.style.queryRenderedFeatures(p,void 0,this.transform),M=this.style.queryRenderedFeatureset(p,void 0,this.transform);return v.concat(M)}let l=!0;if(n.target&&(l=this._isTargetValid(n.target),l&&!n.layers))return this.style.queryRenderedFeatureset(p,n,this.transform);let f=!0;if(n.layers&&Array.isArray(n.layers)){for(const v of n.layers)if(!this._isValidId(v)){f=!1;break}if(f&&!n.target)return this.style.queryRenderedFeatures(p,n,this.transform)}let _=[];return f&&(_=_.concat(this.style.queryRenderedFeatures(p,n,this.transform))),l&&(_=_.concat(this.style.queryRenderedFeatureset(p,n,this.transform))),_}querySourceFeatures(p,n){return!p||typeof p=="string"&&!this._isValidId(p)?[]:this.style.querySourceFeatures(p,n)}queryRasterValue(p,n,l){return this._isValidId(p)?this.style.queryRasterValue(p,n,l):Promise.resolve(null)}isPointOnSurface(p){const{name:n}=this.transform.projection;return n!=="globe"&&n!=="mercator"&&i.w(`${n} projection does not support isPointOnSurface, this API may behave unexpectedly.`),this.transform.isPointOnSurface(i.P.convert(p))}addInteraction(p,n){return this._interactions.add(p,n),this}removeInteraction(p){return this._interactions.remove(p),this}getCooperativeGestures(){return this._cooperativeGestures}setCooperativeGestures(p){return this._cooperativeGestures=p,this}setStyle(p,n){return n=Object.assign({},{localIdeographFontFamily:this._localIdeographFontFamily,localFontFamily:this._localFontFamily},n),this.style&&p&&n.diff!==!1&&n.localFontFamily===this._localFontFamily&&n.localIdeographFontFamily===this._localIdeographFontFamily&&!n.config?(this.style._diffStyle(p,((l,f)=>{if(l){const _=typeof l=="string"?l:l instanceof Error?l.message:l.error;i.w(`Unable to perform style diff: ${_}. Rebuilding the style from scratch.`),this._updateStyle(p,n)}else f&&this._update(!0)}),(()=>this._postStyleLoadEvent())),this):(this._localIdeographFontFamily=n.localIdeographFontFamily,this._localFontFamily=n.localFontFamily,this._updateStyle(p,n))}_getUIString(p){const n=this._locale[p];if(n==null)throw new Error(`Missing UI string '${p}'`);return n}_updateStyle(p,n){if(this.style&&(this.style.setEventedParent(null),this.style._remove(),this.style=void 0),p){const l=Object.assign({},n);n&&n.config&&(l.initialConfig=n.config,delete l.config),this.style=new _a(this,l).load(p),this.style.setEventedParent(this,{style:this.style})}return this._updateTerrain(),this}_lazyInitEmptyStyle(){this.style||(this.style=new _a(this,{}),this.style.setEventedParent(this,{style:this.style}),this.style.loadEmpty())}getStyle(){if(this.style)return this.style.serialize()}isStyleLoaded(){return this.style?this.style.loaded():(i.w("There is no style added to the map."),!1)}_isValidId(p){return p==null?(this.fire(new i.y(new Error("IDs can't be empty."))),!1):!i.dm(p)||(this.fire(new i.y(new Error(`IDs can't contain special symbols: "${p}".`))),!1)}_isTargetValid(p){return"featuresetId"in p?this._isValidId("importId"in p?p.importId:p.featuresetId):"layerId"in p&&this._isValidId(p.layerId)}_areTargetsValid(p){if(Array.isArray(p)){for(const n of p)if(!this._isValidId(n))return!1;return!0}return this._isTargetValid(p)}addSource(p,n){return this._isValidId(p)?(this._lazyInitEmptyStyle(),this.style.addSource(p,n),this._update(!0)):this}isSourceLoaded(p){return!!this._isValidId(p)&&!!this.style&&this.style._isSourceCacheLoaded(p)}areTilesLoaded(){return this.style.areTilesLoaded()}addSourceType(p,n,l){this._lazyInitEmptyStyle(),this.style.addSourceType(p,n,l)}removeSource(p){return this._isValidId(p)?(this.style.removeSource(p),this._updateTerrain(),this._update(!0)):this}getSource(p){return this._isValidId(p)?this.style.getOwnSource(p):null}addImage(p,n,{pixelRatio:l=1,sdf:f=!1,stretchX:_,stretchY:v,content:M}={}){this._lazyInitEmptyStyle();const T=i.I.from(p);if(n instanceof HTMLImageElement||ImageBitmap&&n instanceof ImageBitmap){const{width:N,height:j,data:R}=i.o.getImageData(n);this.style.addImage(T,{data:new i.q({width:N,height:j},R),pixelRatio:l,stretchX:_,stretchY:v,content:M,sdf:f,version:0,usvg:!1})}else if(n.width===void 0||n.height===void 0)this.fire(new i.y(new Error("Invalid arguments to map.addImage(). The second argument must be an `HTMLImageElement`, `ImageData`, `ImageBitmap`, or object with `width`, `height`, and `data` properties with the same format as `ImageData`")));else{const{width:N,height:j}=n,R=n;this.style.addImage(T,{data:new i.q({width:N,height:j},new Uint8Array(R.data)),pixelRatio:l,stretchX:_,stretchY:v,content:M,sdf:f,usvg:!1,version:0,userImage:R}),R.onAdd&&R.onAdd(this,p)}}updateImage(p,n){this._lazyInitEmptyStyle();const l=i.I.from(p),f=this.style.getImage(l);if(!f)return void this.fire(new i.y(new Error("The map has no image with that id. If you are adding a new image use `map.addImage(...)` instead.")));const _=n instanceof HTMLImageElement||ImageBitmap&&n instanceof ImageBitmap?i.o.getImageData(n):n,{width:v,height:M,data:T}=_;if(v===void 0||M===void 0)return void this.fire(new i.y(new Error("Invalid arguments to map.updateImage(). The second argument must be an `HTMLImageElement`, `ImageData`, `ImageBitmap`, or object with `width`, `height`, and `data` properties with the same format as `ImageData`")));if(v!==(f.usvg?f.icon.usvg_tree.width:f.data.width)||M!==(f.usvg?f.icon.usvg_tree.height:f.data.height))return void this.fire(new i.y(new Error(`The width and height of the updated image (${v}, ${M})
2915
2915
  must be that same as the previous version of the image
2916
2916
  (${f.data.width}, ${f.data.height})`)));const N=!(n instanceof HTMLImageElement||ImageBitmap&&n instanceof ImageBitmap);let j=!1;f.usvg?(f.data=new i.q({width:v,height:M},new Uint8Array(T)),f.usvg=!1,f.icon=void 0,j=!0):f.data.replace(T,N),this.style.updateImage(l,f,j)}hasImage(p){return p?!!this.style&&!!this.style.getImage(i.I.from(p)):(this.fire(new i.y(new Error("Missing required image id"))),!1)}removeImage(p){this.style.removeImage(i.I.from(p))}loadImage(p,n){i.n(this._requestManager.transformRequest(p,i.R.Image),((l,f)=>{n(l,f instanceof HTMLImageElement?i.o.getImageData(f):f)}))}listImages(){return this.style.listImages().map((p=>p.name))}addModel(p,n){this._lazyInitEmptyStyle(),this.style.addModel(p,n)}hasModel(p){return p?this.style.hasModel(p):(this.fire(new i.y(new Error("Missing required model id"))),!1)}removeModel(p){this.style.removeModel(p)}listModels(){return this.style.listModels()}addLayer(p,n){return this._isValidId(p.id)?(this._lazyInitEmptyStyle(),this.style.addLayer(p,n),this._update(!0)):this}getSlot(p){const n=this.getLayer(p);return n&&n.slot||null}setSlot(p,n){return this.style.setSlot(p,n),this.style.mergeLayers(),this._update(!0)}addImport(p,n){return this.style.addImport(p,n).catch((l=>this.fire(new i.y(new Error("Failed to add import",l))))),this}updateImport(p,n){return typeof n!="string"&&n.id!==p?(this.removeImport(p),this.addImport(n)):(this.style.updateImport(p,n),this._update(!0))}removeImport(p){return this.style.removeImport(p),this}moveImport(p,n){return this.style.moveImport(p,n),this._update(!0)}moveLayer(p,n){return this._isValidId(p)?(this.style.moveLayer(p,n),this._update(!0)):this}removeLayer(p){return this._isValidId(p)?(this.style.removeLayer(p),this._update(!0)):this}getLayer(p){if(!this._isValidId(p))return null;const n=this.style.getOwnLayer(p);return n?n.type==="custom"?n.implementation:n.serialize():void 0}getSlots(){return this.style.getSlots()}setLayerZoomRange(p,n,l){return this._isValidId(p)?(this.style.setLayerZoomRange(p,n,l),this._update(!0)):this}setFilter(p,n,l={}){return this._isValidId(p)?(this.style.setFilter(p,n,l),this._update(!0)):this}getFilter(p){return this._isValidId(p)?this.style.getFilter(p):null}setPaintProperty(p,n,l,f={}){return this._isValidId(p)?(this.style.setPaintProperty(p,n,l,f),this._update(!0)):this}getPaintProperty(p,n){return this._isValidId(p)?this.style.getPaintProperty(p,n):null}setLayoutProperty(p,n,l,f={}){return this._isValidId(p)?(this.style.setLayoutProperty(p,n,l,f),this._update(!0)):this}getLayoutProperty(p,n){return this._isValidId(p)?this.style.getLayoutProperty(p,n):null}getGlyphsUrl(){return this.style.getGlyphsUrl()}setGlyphsUrl(p){return this.style.setGlyphsUrl(p),this._update(!0)}getSchema(p){return this.style.getSchema(p)}setSchema(p,n){return this.style.setSchema(p,n),this._update(!0)}getConfig(p){return this.style.getConfig(p)}setConfig(p,n){return this.style.setConfig(p,n),this._update(!0)}getConfigProperty(p,n){return this.style.getConfigProperty(p,n)}setConfigProperty(p,n,l){return this.style.setConfigProperty(p,n,l),this._update(!0)}getFeaturesetDescriptors(p){return this.style.getFeaturesetDescriptors(p)}setLights(p){if(this._lazyInitEmptyStyle(),p&&p.length===1&&p[0].type==="flat"){const n=p[0];n.properties?this.style.setFlatLight(n.properties,n.id,{}):this.style.setFlatLight({},"flat")}else this.style.setLights(p),this.painter.terrain&&(this.painter.terrain.invalidateRenderCache=!0);return this._update(!0)}getLights(){const p=this.style.getLights()||[];return p.length===0&&p.push({id:this.style.light.id,type:"flat",properties:this.style.getFlatLight()}),p}setLight(p,n={}){return console.log("The `map.setLight` function is deprecated, prefer using `map.setLights` with `flat` light type instead."),this.setLights([{id:"flat",type:"flat",properties:p}])}getLight(){return console.log("The `map.getLight` function is deprecated, prefer using `map.getLights` instead."),this.style.getFlatLight()}setTerrain(p){return this._lazyInitEmptyStyle(),!p&&this.transform.projection.requiresDraping?this.style.setTerrainForDraping():this.style.setTerrain(p),this._averageElevationLastSampledAt=-1/0,this._update(!0)}getTerrain(){return this.style?this.style.getTerrain():null}setFog(p){return this._lazyInitEmptyStyle(),this.style.setFog(p),this._update(!0)}getFog(){return this.style?this.style.getFog():null}setSnow(p){return this._lazyInitEmptyStyle(),this.style.setSnow(p),this._update(!0)}getSnow(){return this.style?this.style.getSnow():null}setRain(p){return this._lazyInitEmptyStyle(),this.style.setRain(p),this._update(!0)}getRain(){return this.style?this.style.getRain():null}setColorTheme(p){return this._lazyInitEmptyStyle(),this.style.setColorTheme(p),this._update(!0)}setImportColorTheme(p,n){return this._lazyInitEmptyStyle(),this.style.setImportColorTheme(p,n),this._update(!0)}setCamera(p){return this.style.setCamera(p),this._triggerCameraUpdate(p)}_triggerCameraUpdate(p){return this._update(this.transform.setOrthographicProjectionAtLowPitch(p["camera-projection"]==="orthographic"))}getCamera(){return this.style.camera}_queryFogOpacity(p){return this.style&&this.style.fog?this.style.fog.getOpacityAtLatLng(i.aR.convert(p),this.transform):0}setFeatureState(p,n){return p.source&&!this._isValidId(p.source)?this:(this.style.setFeatureState(p,n),this._update())}removeFeatureState(p,n){return p.source&&!this._isValidId(p.source)?this:(this.style.removeFeatureState(p,n),this._update())}getFeatureState(p){return p.source&&!this._isValidId(p.source)?null:this.style.getFeatureState(p)}_selectIndoorFloor(p){this.indoor.selectFloor(p)}_addIndoorControl(){this._indoorControl||(this._indoorControl=new Bd),this.addControl(this._indoorControl,"right")}_removeIndoorControl(){this._indoorControl&&this.removeControl(this._indoorControl)}_updateContainerDimensions(){if(!this._container)return;const p=this._container.getBoundingClientRect().width||400,n=this._container.getBoundingClientRect().height||300;let l,f,_,v=this._container;for(;v&&(!f||!_);){const M=window.getComputedStyle(v).transform;M&&M!=="none"&&(l=M.match(/matrix.*\((.+)\)/)[1].split(", "),l[0]&&l[0]!=="0"&&l[0]!=="1"&&(f=l[0]),l[3]&&l[3]!=="0"&&l[3]!=="1"&&(_=l[3])),v=v.parentElement}this._containerWidth=f?Math.abs(p/f):p,this._containerHeight=_?Math.abs(n/_):n}_detectMissingCSS(){window.getComputedStyle(this._missingCSSCanary).getPropertyValue("background-color")!=="rgb(250, 128, 114)"&&i.w("This page appears to be missing CSS declarations for Mapbox GL JS, which may cause the map to display incorrectly. Please ensure your page includes mapbox-gl.css, as described in https://www.mapbox.com/mapbox-gl-js/api/.")}_setupContainer(){const p=this._container;p.classList.add("mapboxgl-map"),(this._missingCSSCanary=ge("div","mapboxgl-canary",p)).style.visibility="hidden",this._detectMissingCSS();const n=this._canvasContainer=ge("div","mapboxgl-canvas-container",p);this._canvas=ge("canvas","mapboxgl-canvas",n),this._interactive&&(n.classList.add("mapboxgl-interactive"),this._canvas.setAttribute("tabindex","0")),this._canvas.addEventListener("webglcontextlost",this._contextLost,!1),this._canvas.addEventListener("webglcontextrestored",this._contextRestored,!1),this._canvas.setAttribute("aria-label",this._getUIString("Map.Title")),this._canvas.setAttribute("role","region"),this._updateContainerDimensions(),this._resizeCanvas(this._containerWidth,this._containerHeight);const l=this._controlContainer=ge("div","mapboxgl-control-container",p),f=this._controlPositions={};["top-left","top","top-right","right","bottom-right","bottom","bottom-left","left"].forEach((_=>{f[_]=ge("div",`mapboxgl-ctrl-${_}`,l)})),this._container.addEventListener("scroll",this._onMapScroll,!1)}_resizeCanvas(p,n){const l=i.o.devicePixelRatio||1;this._canvas.width=l*Math.ceil(p),this._canvas.height=l*Math.ceil(n),this._canvas.style.width=`${p}px`,this._canvas.style.height=`${n}px`}_addMarker(p){this._markers.push(p)}_removeMarker(p){const n=this._markers.indexOf(p);n!==-1&&this._markers.splice(n,1)}_addPopup(p){this._popups.push(p)}_removePopup(p){const n=this._popups.indexOf(p);n!==-1&&this._popups.splice(n,1)}_setupPainter(){const p=Object.assign({},ee.supported.webGLContextAttributes,{failIfMajorPerformanceCaveat:this._failIfMajorPerformanceCaveat,preserveDrawingBuffer:this._preserveDrawingBuffer,antialias:this._antialias||!1}),n=this._canvas.getContext("webgl2",p);n?(We(n,!0),this.painter=new jh(n,this._contextCreateOptions,this.transform,this._scaleFactor,this._tp,this._worldview),this.on("data",(l=>{l.dataType==="source"&&this.painter.setTileLoadedFlag(!0)})),i.k.testSupport(n)):this.fire(new i.y(new Error("Failed to initialize WebGL")))}_contextLost(p){p.preventDefault(),this._frame&&(this._frame.cancel(),this._frame=null),this.fire(new i.z("webglcontextlost",{originalEvent:p}))}_contextRestored(p){this._setupPainter(),this.painter.resize(Math.ceil(this._containerWidth),Math.ceil(this._containerHeight)),this._updateTerrain(),this.style&&(this.style.clearLayers(),this.style.imageManager.destroyAtlasTextures(),this.style.reloadModels(),this.style.clearSources()),this._update(),this.fire(new i.z("webglcontextrestored",{originalEvent:p}))}_onMapScroll(p){if(p.target===this._container)return this._container.scrollTop=0,this._container.scrollLeft=0,!1}idle(){return!this.isMoving()&&this.loaded()}loaded(){return!this._styleDirty&&!this._sourcesDirty&&!!this.style&&this.style.loaded()}frameReady(){return this.loaded()&&!this._placementDirty}_update(p){return this.style?(this._styleDirty=this._styleDirty||p,this._sourcesDirty=!0,this.triggerRepaint(),this):this}_requestRenderFrame(p){return this._update(),this._renderTaskQueue.add(p)}_cancelRenderFrame(p){this._renderTaskQueue.remove(p)}_requestDomTask(p){!this.loaded()||this.loaded()&&!this.isMoving()?p():this._domRenderTaskQueue.add(p)}_render(p){let n;this.fire(new i.z("renderstart")),++this._frameId;const l=this.painter.context.extTimerQuery,f=i.o.now(),_=this.painter.context.gl;if(this.listens("gpu-timing-frame")&&(n=_.createQuery(),_.beginQuery(l.TIME_ELAPSED_EXT,n)),this.painter.context.setDirty(),this.painter.setBaseState(),(this.isMoving()||this.isRotating()||this.isZooming())&&(this._interactionRange[0]=Math.min(this._interactionRange[0],performance.now()),this._interactionRange[1]=Math.max(this._interactionRange[1],performance.now())),this._renderTaskQueue.run(p),this._domRenderTaskQueue.run(p),this._removed)return;this._updateProjectionTransition();const v=this._isInitialLoad?0:this._fadeDuration;if(this.style&&this._styleDirty){this._styleDirty=!1;const j=this.transform.zoom,R=this.transform.pitch,G=i.o.now(),F=new i.ac(j,{now:G,fadeDuration:v,pitch:R,transition:this.style.transition,worldview:this._worldview});this.style.update(F)}this.style&&this.style.hasFogTransition()&&(this.style._markersNeedUpdate=!0,this._sourcesDirty=!0);let M=!1;this.style&&this._sourcesDirty?(this._sourcesDirty=!1,this.painter._updateFog(this.style),this._updateTerrain(),M=this._updateAverageElevation(f),this.style.updateSources(this.transform),this.style.updateImageProviders(),this.isMoving()||this._forceMarkerAndPopupUpdate()):M=this._updateAverageElevation(f);const T=this.style&&this.style._updatePlacement(this.painter,this.painter.transform,this.showCollisionBoxes,v,this._crossSourceCollisions,this.painter.replacementSource,this._scaleFactorChanged);if(this._scaleFactorChanged&&(this._scaleFactorChanged=!1),T&&(this._placementDirty=T.needsRerender),this.style&&this.painter.render(this.style,{showTileBoundaries:this.showTileBoundaries,showParseStatus:this.showParseStatus,wireframe:{terrain:this.showTerrainWireframe,layers2D:this.showLayers2DWireframe,layers3D:this.showLayers3DWireframe},showOverdrawInspector:this._showOverdrawInspector,showQueryGeometry:!!this._showQueryGeometry,showTileAABBs:this.showTileAABBs,rotating:this.isRotating(),zooming:this.isZooming(),moving:this.isMoving(),fadeDuration:v,isInitialLoad:this._isInitialLoad,showPadding:this.showPadding,gpuTiming:!!this.listens("gpu-timing-layer"),gpuTimingDeferredRender:!!this.listens("gpu-timing-deferred-render"),speedIndexTiming:this.speedIndexTiming}),this.fire(new i.z("render")),this.loaded()&&!this._loaded&&(this._loaded=!0,O.mark(E.load),this.fire(new i.z("load"))),this.style&&this.style.hasTransitions()&&(this._styleDirty=!0),this.style&&(this.style.snow||this.style.rain)&&(this._styleDirty=!0),this.style&&this.style.imageManager.hasPatternsInFlight()&&(this._styleDirty=!0),this.style&&!this.style.modelManager.isLoaded()&&(this._styleDirty=!0),this.style&&!this._placementDirty&&this.style._releaseSymbolFadeTiles(),n){const j=i.o.now()-f;_.endQuery(l.TIME_ELAPSED_EXT),setTimeout((()=>{const R=_.getQueryParameter(n,_.QUERY_RESULT)/1e6;_.deleteQuery(n),this.fire(new i.z("gpu-timing-frame",{cpuTime:j,gpuTime:R}))}),50)}if(this.listens("gpu-timing-layer")){const j=this.painter.collectGpuTimers();setTimeout((()=>{const R=this.painter.queryGpuTimers(j);this.fire(new i.z("gpu-timing-layer",{layerTimes:R}))}),50)}if(this.listens("gpu-timing-deferred-render")){const j=this.painter.collectDeferredRenderGpuQueries();setTimeout((()=>{const R=this.painter.queryGpuTimeDeferredRender(j);this.fire(new i.z("gpu-timing-deferred-render",{gpuTime:R}))}),50)}const N=this._sourcesDirty||this._styleDirty||this._placementDirty||M;if(N||this._repaint)this.triggerRepaint();else{const j=this.idle();if(j&&(M=this._updateAverageElevation(f,!0)),M)this.triggerRepaint();else if(this._triggerFrame(!1),j&&(this.fire(new i.z("idle")),this._isInitialLoad=!1,this.speedIndexTiming)){const R=this._calculateSpeedIndex();this.fire(new i.z("speedindexcompleted",{speedIndex:R})),this.speedIndexTiming=!1}}!this._loaded||this._fullyLoaded||N||(this._fullyLoaded=!0,O.mark(E.fullLoad),this._performanceMetricsCollection&&De(this._requestManager._customAccessToken,{width:this.painter.width,height:this.painter.height,interactionRange:this._interactionRange,visibilityHidden:this._visibilityHidden,terrainEnabled:!!this.painter.style.getTerrain(),fogEnabled:!!this.painter.style.getFog(),projection:this.getProjection().name,zoom:this.transform.zoom,renderer:this.painter.context.renderer,vendor:this.painter.context.vendor}),this._authenticate())}_forceMarkerAndPopupUpdate(p){for(const n of this._markers)p&&!this.getRenderWorldCopies()&&(n._lngLat=n._lngLat.wrap()),n._update();for(const n of this._popups)!p||this.getRenderWorldCopies()||n._trackPointer||(n._lngLat=n._lngLat.wrap()),n._update()}_updateAverageElevation(p,n=!1){const l=_=>(this.transform.averageElevation=_,this._update(!1),!0);if(!this.painter.averageElevationNeedsEasing())return this.transform.averageElevation!==0&&l(0);const f=this.transform.elevation&&this.transform.elevation.exaggeration()!==this._averageElevationExaggeration;if(f||(n||p-this._averageElevationLastSampledAt>500)&&!this._averageElevation.isEasing(p)){const _=this.transform.averageElevation;let v=this.transform.sampleAverageElevation();this.transform.elevation!=null&&(this._averageElevationExaggeration=this.transform.elevation.exaggeration()),isNaN(v)?v=0:this._averageElevationLastSampledAt=p;const M=Math.abs(_-v);if(M>1){if(this._isInitialLoad||f)return this._averageElevation.jumpTo(v),l(v);this._averageElevation.easeTo(v,p,300)}else if(M>1e-4)return this._averageElevation.jumpTo(v),l(v)}return!!this._averageElevation.isEasing(p)&&l(this._averageElevation.getValue(p))}_authenticate(){Ue(this._getMapId(),this._requestManager._skuToken,this._requestManager._customAccessToken,(p=>{if(p&&(p.message===ze||p.status===401)){const n=this.painter.context.gl;We(n,!1),this._logoControl instanceof Xl&&this._logoControl._updateLogo(),n&&n.clear(n.DEPTH_BUFFER_BIT|n.COLOR_BUFFER_BIT|n.STENCIL_BUFFER_BIT),this._silenceAuthErrors||this.fire(new i.y(new Error("A valid Mapbox access token is required to use Mapbox GL JS. To create an account or a new access token, visit https://account.mapbox.com/")))}})),he(this._getMapId(),this._requestManager._skuToken,this._requestManager._customAccessToken,(()=>{}))}_postStyleLoadEvent(){this.style.globalId&&ie(this._requestManager._customAccessToken,{map:this,style:this.style.globalId,importedStyles:this.style.getImportGlobalIds()})}_updateTerrain(){const p=this._isDragging();this.painter.updateTerrain(this.style,p)}_calculateSpeedIndex(){const p=this.painter.canvasCopy(),n=this.painter.getCanvasCopiesAndTimestamps();n.timeStamps.push(performance.now());const l=this.painter.context.gl,f=l.createFramebuffer();function _(v){l.framebufferTexture2D(l.FRAMEBUFFER,l.COLOR_ATTACHMENT0,l.TEXTURE_2D,v,0);const M=new Uint8Array(l.drawingBufferWidth*l.drawingBufferHeight*4);return l.readPixels(0,0,l.drawingBufferWidth,l.drawingBufferHeight,l.RGBA,l.UNSIGNED_BYTE,M),M}return l.bindFramebuffer(l.FRAMEBUFFER,f),this._canvasPixelComparison(_(p),n.canvasCopies.map(_),n.timeStamps)}_canvasPixelComparison(p,n,l){let f=l[1]-l[0];const _=p.length/4;for(let v=0;v<n.length;v++){const M=n[v];let T=0;for(let N=0;N<M.length;N+=4)M[N]===p[N]&&M[N+1]===p[N+1]&&M[N+2]===p[N+2]&&M[N+3]===p[N+3]&&(T+=1);f+=(l[v+2]-l[v+1])*(1-T/_)}return f}remove(){this._hash&&this._hash.remove();for(const n of this._controls)n.onRemove(this);this._controls=[],this._frame&&(this._frame.cancel(),this._frame=null),this._renderTaskQueue.clear(),this._domRenderTaskQueue.clear(),this.style&&this.style.destroy(),this.indoor.destroy(),this.painter.destroy(),this.handlers&&this.handlers.destroy(),this.handlers=void 0,this.setStyle(null),window.removeEventListener("resize",this._onWindowResize,!1),window.removeEventListener("orientationchange",this._onWindowResize,!1),window.removeEventListener(this._fullscreenchangeEvent,this._onWindowResize,!1),window.removeEventListener("online",this._onWindowOnline,!1),window.removeEventListener("visibilitychange",this._onVisibilityChange,!1);const p=this.painter.context.gl.getExtension("WEBGL_lose_context");p&&p.loseContext(),this._canvas.removeEventListener("webglcontextlost",this._contextLost,!1),this._canvas.removeEventListener("webglcontextrestored",this._contextRestored,!1),this._canvasContainer.remove(),this._controlContainer.remove(),this._missingCSSCanary.remove(),this._canvas=void 0,this._canvasContainer=void 0,this._controlContainer=void 0,this._missingCSSCanary=void 0,this._container.classList.remove("mapboxgl-map"),this._container.removeEventListener("scroll",this._onMapScroll,!1),et.delete(this.painter.context.gl),qe.remove(),V.remove(),this._removed=!0,this.fire(new i.z("remove"))}triggerRepaint(){this._triggerFrame(!0)}_triggerFrame(p){this._renderNextFrame=this._renderNextFrame||p,this.style&&!this._frame&&(this._frame=i.o.frame((n=>{const l=!!this._renderNextFrame;this._frame=null,this._renderNextFrame=null,l&&this._render(n)})))}_preloadTiles(p){const n=this.style?this.style.getSourceCaches():[];return i.bw(n,((l,f)=>l._preloadTiles(p,f)),(()=>{this.triggerRepaint()})),this}_onWindowOnline(){this._update()}_onWindowResize(p){this._trackResize&&this.resize({originalEvent:p})._update()}_onVisibilityChange(){document.visibilityState==="hidden"&&this._visibilityHidden++}get showTileBoundaries(){return!!this._showTileBoundaries}set showTileBoundaries(p){this._showTileBoundaries!==p&&(this._showTileBoundaries=p,this._tp.refreshUI(),this._update())}get showParseStatus(){return!!this._showParseStatus}set showParseStatus(p){this._showParseStatus!==p&&(this._showParseStatus=p,this._tp.refreshUI(),this._update())}get showTerrainWireframe(){return!!this._showTerrainWireframe}set showTerrainWireframe(p){this._showTerrainWireframe!==p&&(this._showTerrainWireframe=p,this._tp.refreshUI(),this._update())}get showLayers2DWireframe(){return!!this._showLayers2DWireframe}set showLayers2DWireframe(p){this._showLayers2DWireframe!==p&&(this._showLayers2DWireframe=p,this._tp.refreshUI(),this._update())}get showLayers3DWireframe(){return!!this._showLayers3DWireframe}set showLayers3DWireframe(p){this._showLayers3DWireframe!==p&&(this._showLayers3DWireframe=p,this._tp.refreshUI(),this._update())}get speedIndexTiming(){return!!this._speedIndexTiming}set speedIndexTiming(p){this._speedIndexTiming!==p&&(this._speedIndexTiming=p,this._update())}get showPadding(){return!!this._showPadding}set showPadding(p){this._showPadding!==p&&(this._showPadding=p,this._tp.refreshUI(),this._update())}get showCollisionBoxes(){return!!this._showCollisionBoxes}set showCollisionBoxes(p){this._showCollisionBoxes!==p&&(this._showCollisionBoxes=p,this._tp.refreshUI(),p?this.style._generateCollisionBoxes():this._update())}get showOverdrawInspector(){return!!this._showOverdrawInspector}set showOverdrawInspector(p){this._showOverdrawInspector!==p&&(this._showOverdrawInspector=p,this._tp.refreshUI(),this._update())}get repaint(){return!!this._repaint}set repaint(p){this._repaint!==p&&(this._repaint=p,this._tp.refreshUI(),this.triggerRepaint())}get vertices(){return!!this._vertices}set vertices(p){this._vertices=p,this._update()}get showTileAABBs(){return!!this._showTileAABBs}set showTileAABBs(p){this._showTileAABBs!==p&&(this._showTileAABBs=p,this._tp.refreshUI(),p&&this._update())}_setCacheLimits(p,n){i.eX(p,n)}get version(){return C}},NavigationControl:class{constructor(p={}){this.options=Object.assign({},e0,p),this._container=ge("div","mapboxgl-ctrl mapboxgl-ctrl-group"),this._container.addEventListener("contextmenu",(n=>n.preventDefault())),this.options.showZoom&&(i.aY(["_setButtonTitle","_updateZoomButtons"],this),this._zoomInButton=this._createButton("mapboxgl-ctrl-zoom-in",(n=>{this._map&&this._map.zoomIn({},{originalEvent:n})})),ge("span","mapboxgl-ctrl-icon",this._zoomInButton).setAttribute("aria-hidden","true"),this._zoomOutButton=this._createButton("mapboxgl-ctrl-zoom-out",(n=>{this._map&&this._map.zoomOut({},{originalEvent:n})})),ge("span","mapboxgl-ctrl-icon",this._zoomOutButton).setAttribute("aria-hidden","true")),this.options.showCompass&&(i.aY(["_rotateCompassArrow"],this),this._compass=this._createButton("mapboxgl-ctrl-compass",(n=>{const l=this._map;l&&(this.options.visualizePitch?l.resetNorthPitch({},{originalEvent:n}):l.resetNorth({},{originalEvent:n}))})),this._compassIcon=ge("span","mapboxgl-ctrl-icon",this._compass),this._compassIcon.setAttribute("aria-hidden","true"))}_updateZoomButtons(){const p=this._map;if(!p)return;const n=p.getZoom(),l=n===p.getMaxZoom(),f=n===p.getMinZoom();this._zoomInButton.disabled=l,this._zoomOutButton.disabled=f,this._zoomInButton.setAttribute("aria-disabled",l.toString()),this._zoomOutButton.setAttribute("aria-disabled",f.toString())}_rotateCompassArrow(){const p=this._map;if(!p)return;const n=this.options.visualizePitch?`scale(${1/Math.pow(Math.cos(p.transform.pitch*(Math.PI/180)),.5)}) rotateX(${p.transform.pitch}deg) rotateZ(${p.transform.angle*(180/Math.PI)}deg)`:`rotate(${p.transform.angle*(180/Math.PI)}deg)`;p._requestDomTask((()=>{this._compassIcon&&(this._compassIcon.style.transform=n)}))}onAdd(p){return this._map=p,this.options.showZoom&&(this._setButtonTitle(this._zoomInButton,"ZoomIn"),this._setButtonTitle(this._zoomOutButton,"ZoomOut"),p.on("zoom",this._updateZoomButtons),this._updateZoomButtons()),this.options.showCompass&&(this._setButtonTitle(this._compass,"ResetBearing"),this.options.visualizePitch&&p.on("pitch",this._rotateCompassArrow),p.on("rotate",this._rotateCompassArrow),this._rotateCompassArrow(),this._handler=new t0(p,this._compass,this.options.visualizePitch)),this._container}onRemove(){const p=this._map;p&&(this._container.remove(),this.options.showZoom&&p.off("zoom",this._updateZoomButtons),this.options.showCompass&&(this.options.visualizePitch&&p.off("pitch",this._rotateCompassArrow),p.off("rotate",this._rotateCompassArrow),this._handler&&this._handler.off(),this._handler=void 0),this._map=void 0)}_createButton(p,n){const l=ge("button",p,this._container);return l.type="button",l.addEventListener("click",n),l}_setButtonTitle(p,n){if(!this._map)return;const l=this._map._getUIString(`NavigationControl.${n}`);p.setAttribute("aria-label",l),p.firstElementChild&&p.firstElementChild.setAttribute("title",l)}},GeolocateControl:class extends i.E{constructor(p={}){super();const n=navigator.geolocation;this.options=Object.assign({geolocation:n},Jl,p),i.aY(["_onSuccess","_onError","_onZoom","_finish","_setupUI","_updateCamera","_updateMarker","_updateMarkerRotation","_onDeviceOrientation"],this),this._updateMarkerRotationThrottled=Cc(this._updateMarkerRotation,20),this._numberOfWatches=0}onAdd(p){return this._map=p,this._container=ge("div","mapboxgl-ctrl mapboxgl-ctrl-group"),this._checkGeolocationSupport(this._setupUI),this._container}onRemove(){this._geolocationWatchID!==void 0&&(this.options.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0),this.options.showUserLocation&&this._userLocationDotMarker&&this._userLocationDotMarker.remove(),this.options.showAccuracyCircle&&this._accuracyCircleMarker&&this._accuracyCircleMarker.remove(),this._container.remove(),this._map.off("zoom",this._onZoom),this._map=void 0,this._numberOfWatches=0,this._noTimeout=!1}_checkGeolocationSupport(p){const n=(l=!!this.options.geolocation)=>{this._supportsGeolocation=l,p(l)};this._supportsGeolocation!==void 0?p(this._supportsGeolocation):navigator.permissions!==void 0?navigator.permissions.query({name:"geolocation"}).then((l=>n(l.state!=="denied"))).catch((()=>n())):n()}_isOutOfMapMaxBounds(p){const n=this._map.getMaxBounds(),l=p.coords;return!!n&&(l.longitude<n.getWest()||l.longitude>n.getEast()||l.latitude<n.getSouth()||l.latitude>n.getNorth())}_setErrorState(){switch(this._watchState){case"WAITING_ACTIVE":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active-error");break;case"ACTIVE_LOCK":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting");break;case"BACKGROUND":this._watchState="BACKGROUND_ERROR",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting")}}_onSuccess(p){if(this._map){if(this._isOutOfMapMaxBounds(p))return this._setErrorState(),this.fire(new i.z("outofmaxbounds",p)),this._updateMarker(),void this._finish();if(this.options.trackUserLocation)switch(this._lastKnownPosition=p,this._watchState){case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active");break;case"BACKGROUND":case"BACKGROUND_ERROR":this._watchState="BACKGROUND",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background")}this.options.showUserLocation&&this._watchState!=="OFF"&&this._updateMarker(p),this.options.trackUserLocation&&this._watchState!=="ACTIVE_LOCK"||this._updateCamera(p),this.options.showUserLocation&&this._userLocationDotMarker.removeClassName("mapboxgl-user-location-dot-stale"),this.fire(new i.z("geolocate",p)),this._finish()}}_updateCamera(p){const n=new i.aR(p.coords.longitude,p.coords.latitude),l=p.coords.accuracy,f=this._map.getBearing(),_=Object.assign({bearing:f},this.options.fitBoundsOptions);this._map.fitBounds(n.toBounds(l),_,{geolocateSource:!0})}_updateMarker(p){if(p){const n=new i.aR(p.coords.longitude,p.coords.latitude);this._accuracyCircleMarker.setLngLat(n).addTo(this._map),this._userLocationDotMarker.setLngLat(n).addTo(this._map),this._accuracy=p.coords.accuracy,this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()}else this._userLocationDotMarker.remove(),this._accuracyCircleMarker.remove()}_updateCircleRadius(){const p=this._map.transform,n=i.ce(1,p._center.lat)*p.worldSize,l=Math.ceil(2*this._accuracy*n);this._circleElement.style.width=`${l}px`,this._circleElement.style.height=`${l}px`}_onZoom(){this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()}_updateMarkerRotation(){this._userLocationDotMarker&&typeof this._heading=="number"?(this._userLocationDotMarker.setRotation(this._heading),this._userLocationDotMarker.addClassName("mapboxgl-user-location-show-heading")):(this._userLocationDotMarker.removeClassName("mapboxgl-user-location-show-heading"),this._userLocationDotMarker.setRotation(0))}_onError(p){if(this._map){if(this.options.trackUserLocation)if(p.code===1){this._watchState="OFF",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background-error"),this._geolocateButton.disabled=!0;const n=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.setAttribute("aria-label",n),this._geolocateButton.firstElementChild&&this._geolocateButton.firstElementChild.setAttribute("title",n),this._geolocationWatchID!==void 0&&this._clearWatch()}else{if(p.code===3&&this._noTimeout)return;this._setErrorState()}this._watchState!=="OFF"&&this.options.showUserLocation&&this._userLocationDotMarker.addClassName("mapboxgl-user-location-dot-stale"),this.fire(new i.z("error",p)),this._finish()}}_finish(){this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0}_setupUI(p){if(this._map!==void 0){if(this._container.addEventListener("contextmenu",(n=>n.preventDefault())),this._geolocateButton=ge("button","mapboxgl-ctrl-geolocate",this._container),ge("span","mapboxgl-ctrl-icon",this._geolocateButton).setAttribute("aria-hidden","true"),this._geolocateButton.type="button",p===!1){i.w("Geolocation support is not available so the GeolocateControl will be disabled.");const n=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.disabled=!0,this._geolocateButton.setAttribute("aria-label",n),this._geolocateButton.firstElementChild&&this._geolocateButton.firstElementChild.setAttribute("title",n)}else{const n=this._map._getUIString("GeolocateControl.FindMyLocation");this._geolocateButton.setAttribute("aria-label",n),this._geolocateButton.firstElementChild&&this._geolocateButton.firstElementChild.setAttribute("title",n)}this.options.trackUserLocation&&(this._geolocateButton.setAttribute("aria-pressed","false"),this._watchState="OFF"),this.options.showUserLocation&&(this._dotElement=ge("div","mapboxgl-user-location"),this._dotElement.appendChild(ge("div","mapboxgl-user-location-dot")),this._dotElement.appendChild(ge("div","mapboxgl-user-location-heading")),this._userLocationDotMarker=new kl({element:this._dotElement,rotationAlignment:"map",pitchAlignment:"map"}),this._circleElement=ge("div","mapboxgl-user-location-accuracy-circle"),this._accuracyCircleMarker=new kl({element:this._circleElement,pitchAlignment:"map"}),this.options.trackUserLocation&&(this._watchState="OFF"),this._map.on("zoom",this._onZoom)),this._geolocateButton.addEventListener("click",this.trigger.bind(this)),this._setup=!0,this.options.trackUserLocation&&this._map.on("movestart",(n=>{n.geolocateSource||this._watchState!=="ACTIVE_LOCK"||n.originalEvent&&n.originalEvent.type==="resize"||(this._watchState="BACKGROUND",this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this.fire(new i.z("trackuserlocationend")))}))}}_onDeviceOrientation(p){this._userLocationDotMarker&&(p.webkitCompassHeading?this._heading=p.webkitCompassHeading:p.absolute===!0&&(this._heading=-1*p.alpha),this._updateMarkerRotationThrottled())}trigger(){if(!this._setup)return i.w("Geolocate control triggered before added to a map"),!1;if(this.options.trackUserLocation){switch(this._watchState){case"OFF":this._watchState="WAITING_ACTIVE",this.fire(new i.z("trackuserlocationstart"));break;case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":case"BACKGROUND_ERROR":this._numberOfWatches--,this._noTimeout=!1,this._watchState="OFF",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background-error"),this.fire(new i.z("trackuserlocationend"));break;case"BACKGROUND":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._lastKnownPosition&&this._updateCamera(this._lastKnownPosition),this.fire(new i.z("trackuserlocationstart"))}switch(this._watchState){case"WAITING_ACTIVE":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active");break;case"ACTIVE_LOCK":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active");break;case"ACTIVE_ERROR":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active-error");break;case"BACKGROUND":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background");break;case"BACKGROUND_ERROR":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background-error")}if(this._watchState==="OFF"&&this._geolocationWatchID!==void 0)this._clearWatch();else if(this._geolocationWatchID===void 0){let p;this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","true"),this._numberOfWatches++,this._numberOfWatches>1?(p={maximumAge:6e5,timeout:0},this._noTimeout=!0):(p=this.options.positionOptions,this._noTimeout=!1),this._geolocationWatchID=this.options.geolocation.watchPosition(this._onSuccess,this._onError,p),this.options.showUserHeading&&this._addDeviceOrientationListener()}}else this.options.geolocation.getCurrentPosition(this._onSuccess,this._onError,this.options.positionOptions),this._timeoutId=window.setTimeout(this._finish,1e4);return!0}_addDeviceOrientationListener(){const p=()=>{"ondeviceorientationabsolute"in window?window.addEventListener("deviceorientationabsolute",this._onDeviceOrientation):window.addEventListener("deviceorientation",this._onDeviceOrientation)};typeof DeviceMotionEvent<"u"&&typeof DeviceMotionEvent.requestPermission=="function"?DeviceOrientationEvent.requestPermission().then((n=>{n==="granted"&&p()})).catch(console.error):p()}_clearWatch(){this.options.geolocation.clearWatch(this._geolocationWatchID),window.removeEventListener("deviceorientation",this._onDeviceOrientation),window.removeEventListener("deviceorientationabsolute",this._onDeviceOrientation),this._geolocationWatchID=void 0,this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","false"),this.options.showUserLocation&&this._updateMarker(null)}},AttributionControl:Bu,ScaleControl:class{constructor(p={}){this.options=Object.assign({},ec,p),this._isNumberFormatSupported=(function(){try{return new Intl.NumberFormat("en",{style:"unit",unitDisplay:"short",unit:"meter"}),!0}catch{return!1}})(),i.aY(["_update","_setScale","setUnit"],this)}getDefaultPosition(){return"bottom-left"}_update(){const p=this.options.maxWidth||100,n=this._map,l=n._containerHeight/2,f=n._containerWidth/2-p/2,_=n.unproject([f,l]),v=n.unproject([f+p,l]),M=_.distanceTo(v);if(this.options.unit==="imperial"){const T=3.2808*M;T>5280?this._setScale(p,T/5280,"mile"):this._setScale(p,T,"foot")}else this.options.unit==="nautical"?this._setScale(p,M/1852,"nautical-mile"):M>=1e3?this._setScale(p,M/1e3,"kilometer"):this._setScale(p,M,"meter")}_setScale(p,n,l){this._map._requestDomTask((()=>{const f=(function(v){const M=Math.pow(10,`${Math.floor(v)}`.length-1);let T=v/M;return T=T>=10?10:T>=5?5:T>=3?3:T>=2?2:T>=1?1:(function(N){const j=Math.pow(10,Math.ceil(-Math.log(N)/Math.LN10));return Math.round(N*j)/j})(T),M*T})(n),_=f/n;this._container.innerHTML=this._isNumberFormatSupported&&l!=="nautical-mile"?new Intl.NumberFormat(this._language,{style:"unit",unitDisplay:"short",unit:l}).format(f):`${f}&nbsp;${tc[l]}`,this._container.style.width=p*_+"px"}))}onAdd(p){return this._map=p,this._language=p.getLanguage(),this._container=ge("div","mapboxgl-ctrl mapboxgl-ctrl-scale",p.getContainer()),this._container.dir="auto",this._map.on("move",this._update),this._update(),this._container}onRemove(){this._container.remove(),this._map.off("move",this._update),this._map=void 0}_setLanguage(p){this._language=p,this._update()}setUnit(p){this.options.unit=p,this._update()}},FullscreenControl:class{constructor(p={}){this._fullscreen=!1,p&&p.container&&(p.container instanceof HTMLElement?this._container=p.container:i.w("Full screen control 'container' must be a DOM element.")),i.aY(["_onClickFullscreen","_changeIcon"],this),"onfullscreenchange"in document?this._fullscreenchange="fullscreenchange":"onwebkitfullscreenchange"in document&&(this._fullscreenchange="webkitfullscreenchange")}onAdd(p){return this._map=p,this._container||(this._container=this._map.getContainer()),this._controlContainer=ge("div","mapboxgl-ctrl mapboxgl-ctrl-group"),this._checkFullscreenSupport()?this._setupUI():(this._controlContainer.style.display="none",i.w("This device does not support fullscreen mode.")),this._controlContainer}onRemove(){this._controlContainer.remove(),this._map=null,document.removeEventListener(this._fullscreenchange,this._changeIcon)}_checkFullscreenSupport(){return!(!document.fullscreenEnabled&&!document.webkitFullscreenEnabled)}_setupUI(){const p=this._fullscreenButton=ge("button","mapboxgl-ctrl-fullscreen",this._controlContainer);ge("span","mapboxgl-ctrl-icon",p).setAttribute("aria-hidden","true"),p.type="button",this._updateTitle(),this._fullscreenButton.addEventListener("click",this._onClickFullscreen),document.addEventListener(this._fullscreenchange,this._changeIcon)}_updateTitle(){const p=this._getTitle();this._fullscreenButton.setAttribute("aria-label",p),this._fullscreenButton.firstElementChild&&this._fullscreenButton.firstElementChild.setAttribute("title",p)}_getTitle(){return this._map._getUIString(this._isFullscreen()?"FullscreenControl.Exit":"FullscreenControl.Enter")}_isFullscreen(){return this._fullscreen}_changeIcon(){(document.fullscreenElement||document.webkitFullscreenElement)===this._container!==this._fullscreen&&(this._fullscreen=!this._fullscreen,this._fullscreenButton.classList.toggle("mapboxgl-ctrl-shrink"),this._fullscreenButton.classList.toggle("mapboxgl-ctrl-fullscreen"),this._updateTitle())}_onClickFullscreen(){this._isFullscreen()?document.exitFullscreen?document.exitFullscreen():document.webkitCancelFullScreen&&document.webkitCancelFullScreen():this._container.requestFullscreen?this._container.requestFullscreen():this._container.webkitRequestFullscreen&&this._container.webkitRequestFullscreen()}},IndoorControl:Bd,Popup:class extends i.E{constructor(p){super(),this.options=Object.assign(Object.create(nc),p),this._altitude=this.options.altitude,i.aY(["_update","_onClose","remove","_onMouseEvent"],this),this._classList=new Set(p&&p.className?p.className.trim().split(/\s+/):[])}addTo(p){return this._map&&this.remove(),this._map=p,this.options.closeOnClick&&p.on("preclick",this._onClose),this.options.closeOnMove&&p.on("move",this._onClose),p.on("remove",this.remove),this._update(),p._addPopup(this),this._focusFirstElement(),this._trackPointer?(p.on("mousemove",this._onMouseEvent),p.on("mouseup",this._onMouseEvent),p._canvasContainer.classList.add("mapboxgl-track-pointer")):p.on("move",this._update),this.fire(new i.z("open")),this}isOpen(){return!!this._map}remove(){this._content&&this._content.remove(),this._container&&(this._container.remove(),this._container=void 0);const p=this._map;return p&&(p.off("move",this._update),p.off("move",this._onClose),p.off("preclick",this._onClose),p.off("click",this._onClose),p.off("remove",this.remove),p.off("mousemove",this._onMouseEvent),p.off("mouseup",this._onMouseEvent),p.off("drag",this._onMouseEvent),p._canvasContainer&&p._canvasContainer.classList.remove("mapboxgl-track-pointer"),p._removePopup(this),this._map=void 0),this.fire(new i.z("close")),this}getLngLat(){return this._lngLat}setLngLat(p){this._lngLat=i.aR.convert(p),this._pos=null,this._trackPointer=!1,this._update();const n=this._map;return n&&(n.on("move",this._update),n.off("mousemove",this._onMouseEvent),n._canvasContainer.classList.remove("mapboxgl-track-pointer")),this}getAltitude(){return this._altitude}setAltitude(p){return this._altitude=p,this._update(),this}trackPointer(){this._trackPointer=!0,this._pos=null,this._update();const p=this._map;return p&&(p.off("move",this._update),p.on("mousemove",this._onMouseEvent),p.on("drag",this._onMouseEvent),p._canvasContainer.classList.add("mapboxgl-track-pointer")),this}getElement(){return this._container}setText(p){return this.setDOMContent(document.createTextNode(p))}setHTML(p){const n=document.createDocumentFragment(),l=document.createElement("body");let f;for(l.innerHTML=p;f=l.firstChild,f;)n.appendChild(f);return this.setDOMContent(n)}getMaxWidth(){return this._container&&this._container.style.maxWidth}setMaxWidth(p){return this.options.maxWidth=p,this._update(),this}setDOMContent(p){let n=this._content;if(n)for(;n.hasChildNodes();)n.firstChild&&n.removeChild(n.firstChild);else n=this._content=ge("div","mapboxgl-popup-content",this._container||void 0);if(n.appendChild(p),this.options.closeButton){const l=this._closeButton=ge("button","mapboxgl-popup-close-button",n);l.type="button",l.setAttribute("aria-label","Close popup"),l.innerHTML='<span aria-hidden="true">&#215;</span>',l.addEventListener("click",this._onClose)}return this._update(),this._focusFirstElement(),this}addClassName(p){return this._classList.add(p),this._updateClassList(),this}removeClassName(p){return this._classList.delete(p),this._updateClassList(),this}setOffset(p){return this.options.offset=p,this._update(),this}toggleClassName(p){let n;return this._classList.delete(p)?n=!1:(this._classList.add(p),n=!0),this._updateClassList(),n}_onMouseEvent(p){this._update(p.point)}_getAnchor(p){if(this.options.anchor)return this.options.anchor;const n=this._map,l=this._container,f=this._pos;if(!n||!l||!f)return"bottom";const _=l.offsetWidth,v=l.offsetHeight,M=f.x<_/2,T=f.x>n.transform.width-_/2;if(f.y+p<v)return M?"top-left":T?"top-right":"top";if(f.y>n.transform.height-v){if(M)return"bottom-left";if(T)return"bottom-right"}return M?"left":T?"right":"bottom"}_updateClassList(){const p=this._container;if(!p)return;const n=[...this._classList];n.push("mapboxgl-popup"),this._anchor&&n.push(`mapboxgl-popup-anchor-${this._anchor}`),this._trackPointer&&n.push("mapboxgl-popup-track-pointer"),p.className=n.join(" ")}_update(p){const n=this._map,l=this._content;if(!n||!this._lngLat&&!this._trackPointer||!l)return;let f=this._container;if(f||(f=this._container=ge("div","mapboxgl-popup",n.getContainer()),this._tip=ge("div","mapboxgl-popup-tip",f),f.appendChild(l)),this.options.maxWidth&&f.style.maxWidth!==this.options.maxWidth&&(f.style.maxWidth=this.options.maxWidth),n.transform.renderWorldCopies&&!this._trackPointer&&(this._lngLat=tp(this._lngLat,this._pos,n.transform)),!this._trackPointer||p){const _=this._pos=this._trackPointer&&p instanceof i.P?p:n.project(this._lngLat,this._altitude),v=zl(this.options.offset),M=this._anchor=this._getAnchor(v.y),T=zl(this.options.offset,M),N=_.add(T).round();n._requestDomTask((()=>{this._container&&M&&(this._container.style.transform=`${Fu[M]} translate(${N.x}px,${N.y}px)`)}))}if(!this._marker&&n._showingGlobe()){const _=i.eY(n.transform,this._lngLat)?0:1;this._setOpacity(_)}this._updateClassList()}_focusFirstElement(){if(!this.options.focusAfterOpen||!this._container)return;const p=this._container.querySelector(sl);p&&p.focus()}_onClose(){this.remove()}_setOpacity(p){this._container&&(this._container.style.opacity=`${p}`),this._content&&(this._content.style.pointerEvents=p?"auto":"none")}},Marker:kl,Style:_a,LngLat:i.aR,LngLatBounds:i.aI,Point:i.P,MercatorCoordinate:i.ae,FreeCameraOptions:qp,Evented:i.E,config:i.e,prewarm:i.f0,clearPrewarmedResources:i.e$,get accessToken(){return i.e.ACCESS_TOKEN},set accessToken(p){i.e.ACCESS_TOKEN=p},get baseApiUrl(){return i.e.API_URL},set baseApiUrl(p){i.e.API_URL=p},get workerCount(){return i.f9.workerCount},set workerCount(p){i.f9.workerCount=p},get maxParallelImageRequests(){return i.e.MAX_PARALLEL_IMAGE_REQUESTS},set maxParallelImageRequests(p){i.e.MAX_PARALLEL_IMAGE_REQUESTS=p},clearStorage(p){i.f8(p)},get workerUrl(){return i.f7.workerUrl},set workerUrl(p){i.f7.workerUrl=p},get workerClass(){return i.f7.workerClass},set workerClass(p){i.f7.workerClass=p},get workerParams(){return i.f7.workerParams},set workerParams(p){i.f7.workerParams=p},get dracoUrl(){return i.f6()},set dracoUrl(p){i.f5(p)},get meshoptUrl(){return i.f4()},set meshoptUrl(p){i.f3(p)},setNow:i.o.setNow,restoreNow:i.o.restoreNow}}));var x=d;return x}))})(_x)),_x.exports}var cK=lK();const uK=Qg(cK),hK=t=>ai.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t},ai.createElement("path",{opacity:.12,d:"M12.3578 7.17895C12.2266 7.11336 12.161 7.08056 12.0922 7.06766C12.0313 7.05622 11.9687 7.05622 11.9078 7.06766C11.839 7.08056 11.7734 7.11336 11.6422 7.17895L2 12.0001L11.6422 16.8212C11.7734 16.8868 11.839 16.9196 11.9078 16.9325C11.9687 16.9439 12.0313 16.9439 12.0922 16.9325C12.161 16.9196 12.2266 16.8868 12.3578 16.8212L22 12.0001L12.3578 7.17895Z",fill:"white",style:{fill:"white",fillOpacity:1}}),ai.createElement("path",{d:"M12.3578 7.17895C12.2266 7.11336 12.161 7.08056 12.0922 7.06766C12.0313 7.05622 11.9687 7.05622 11.9078 7.06766C11.839 7.08056 11.7734 7.11336 11.6422 7.17895L2 12.0001L11.6422 16.8212C11.7734 16.8868 11.839 16.9196 11.9078 16.9325C11.9687 16.9439 12.0313 16.9439 12.0922 16.9325C12.161 16.9196 12.2266 16.8868 12.3578 16.8212L22 12.0001L12.3578 7.17895Z",stroke:"white",style:{stroke:"white",strokeOpacity:1},strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})),dK=t=>ai.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t},ai.createElement("path",{opacity:.12,d:"M12.3578 7.17895C12.2266 7.11336 12.161 7.08056 12.0922 7.06766C12.0313 7.05622 11.9687 7.05622 11.9078 7.06766C11.839 7.08056 11.7734 7.11336 11.6422 7.17895L2 12.0001L11.6422 16.8212C11.7734 16.8868 11.839 16.9196 11.9078 16.9325C11.9687 16.9439 12.0313 16.9439 12.0922 16.9325C12.161 16.9196 12.2266 16.8868 12.3578 16.8212L22 12.0001L12.3578 7.17895Z",fill:"#6B7280",style:{fill:"#6B7280",fill:"color(display-p3 0.4196 0.4471 0.5020)",fillOpacity:1}}),ai.createElement("path",{d:"M12.3578 7.17895C12.2266 7.11336 12.161 7.08056 12.0922 7.06766C12.0313 7.05622 11.9687 7.05622 11.9078 7.06766C11.839 7.08056 11.7734 7.11336 11.6422 7.17895L2 12.0001L11.6422 16.8212C11.7734 16.8868 11.839 16.9196 11.9078 16.9325C11.9687 16.9439 12.0313 16.9439 12.0922 16.9325C12.161 16.9196 12.2266 16.8868 12.3578 16.8212L22 12.0001L12.3578 7.17895Z",stroke:"#6B7280",style:{stroke:"#6B7280",stroke:"color(display-p3 0.4196 0.4471 0.5020)",strokeOpacity:1},strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})),fK=t=>ai.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t},ai.createElement("path",{opacity:.12,d:"M12 12L21 7V16.0586C21 16.4012 21 16.5725 20.9495 16.7253C20.9049 16.8605 20.8318 16.9846 20.7354 17.0893C20.6263 17.2076 20.4766 17.2908 20.177 17.4572L12.777 21.5683C12.4934 21.7259 12.3516 21.8047 12.2015 21.8355C12.0685 21.8629 11.9315 21.8629 11.7986 21.8355C11.6484 21.8047 11.5066 21.7259 11.223 21.5683L3.82297 17.4572C3.52345 17.2908 3.37369 17.2076 3.26463 17.0893C3.16816 16.9846 3.09515 16.8605 3.05048 16.7253C3 16.5725 3 16.4012 3 16.0586V7L12 12Z",fill:"white",style:{fill:"white",fillOpacity:1}}),ai.createElement("path",{d:"M20.5 7.27783L12 12.0001M12 12.0001L3.49997 7.27783M12 12.0001V21.5001M21 16.0586V7.94153C21 7.59889 21 7.42757 20.9495 7.27477C20.9049 7.13959 20.8318 7.01551 20.7354 6.91082C20.6263 6.79248 20.4766 6.70928 20.177 6.54288L12.777 2.43177C12.4934 2.27421 12.3516 2.19543 12.2015 2.16454C12.0685 2.13721 11.9315 2.13721 11.7986 2.16454C11.6484 2.19543 11.5066 2.27421 11.223 2.43177L3.82297 6.54288C3.52345 6.70928 3.37369 6.79248 3.26463 6.91082C3.16816 7.01551 3.09515 7.13959 3.05048 7.27477C3 7.42757 3 7.59889 3 7.94153V16.0586C3 16.4013 3 16.5726 3.05048 16.7254C3.09515 16.8606 3.16816 16.9847 3.26463 17.0893C3.37369 17.2077 3.52345 17.2909 3.82297 17.4573L11.223 21.5684C11.5066 21.726 11.6484 21.8047 11.7986 21.8356C11.9315 21.863 12.0685 21.863 12.2015 21.8356C12.3516 21.8047 12.4934 21.726 12.777 21.5684L20.177 17.4573C20.4766 17.2909 20.6263 17.2077 20.7354 17.0893C20.8318 16.9847 20.9049 16.8606 20.9495 16.7254C21 16.5726 21 16.4013 21 16.0586Z",stroke:"white",style:{stroke:"white",strokeOpacity:1},strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})),pK=t=>ai.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...t},ai.createElement("path",{opacity:.12,d:"M12 12L21 7V16.0586C21 16.4012 21 16.5725 20.9495 16.7253C20.9049 16.8605 20.8318 16.9846 20.7354 17.0893C20.6263 17.2076 20.4766 17.2908 20.177 17.4572L12.777 21.5683C12.4934 21.7259 12.3516 21.8047 12.2015 21.8355C12.0685 21.8629 11.9315 21.8629 11.7986 21.8355C11.6484 21.8047 11.5066 21.7259 11.223 21.5683L3.82297 17.4572C3.52345 17.2908 3.37369 17.2076 3.26463 17.0893C3.16816 16.9846 3.09515 16.8605 3.05048 16.7253C3 16.5725 3 16.4012 3 16.0586V7L12 12Z",fill:"#6B7280",style:{fill:"#6B7280",fill:"color(display-p3 0.4196 0.4471 0.5020)",fillOpacity:1}}),ai.createElement("path",{d:"M20.5 7.27783L12 12.0001M12 12.0001L3.49997 7.27783M12 12.0001V21.5001M21 16.0586V7.94153C21 7.59889 21 7.42757 20.9495 7.27477C20.9049 7.13959 20.8318 7.01551 20.7354 6.91082C20.6263 6.79248 20.4766 6.70928 20.177 6.54288L12.777 2.43177C12.4934 2.27421 12.3516 2.19543 12.2015 2.16454C12.0685 2.13721 11.9315 2.13721 11.7986 2.16454C11.6484 2.19543 11.5066 2.27421 11.223 2.43177L3.82297 6.54288C3.52345 6.70928 3.37369 6.79248 3.26463 6.91082C3.16816 7.01551 3.09515 7.13959 3.05048 7.27477C3 7.42757 3 7.59889 3 7.94153V16.0586C3 16.4013 3 16.5726 3.05048 16.7254C3.09515 16.8606 3.16816 16.9847 3.26463 17.0893C3.37369 17.2077 3.52345 17.2909 3.82297 17.4573L11.223 21.5684C11.5066 21.726 11.6484 21.8047 11.7986 21.8356C11.9315 21.863 12.0685 21.863 12.2015 21.8356C12.3516 21.8047 12.4934 21.726 12.777 21.5684L20.177 17.4573C20.4766 17.2909 20.6263 17.2077 20.7354 17.0893C20.8318 16.9847 20.9049 16.8606 20.9495 16.7254C21 16.5726 21 16.4013 21 16.0586Z",stroke:"#6B7280",style:{stroke:"#6B7280",stroke:"color(display-p3 0.4196 0.4471 0.5020)",strokeOpacity:1},strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"})),hc=Object.freeze({initial3D:"initial3D",clicked3D:"clicked3D",clicked2D:"clicked2D"});HN.propTypes={mapView:ct.object,pitch:ct.number,solution:ct.object,reset:ct.number,activeColor:ct.string,show2DModelsIn3D:ct.string};function HN({mapView:t,pitch:o,reset:s,activeColor:u="#005655",show2DModelsIn3D:d}){const[y,x]=je.useState(hc.initial3D),i=hm(".viewmode-switch-portal"),C=()=>d==="true";return je.useEffect(()=>{s&&x(hc.initial3D)},[s]),je.useEffect(()=>{t&&new Promise(O=>{t.isReady?O():t.on("ready",()=>{O()})}).then(()=>{switch(y){case hc.clicked2D:t.tilt(0,2e3),t.hideFeatures([t.FeatureType.MODEL3D,t.FeatureType.WALLS3D,t.FeatureType.EXTRUSION3D,t.FeatureType.EXTRUDEDBUILDINGS]);break;case hc.initial3D:t.tilt(To(o)?45:o,2e3),t.hideFeatures([...C()?[]:[t.FeatureType.MODEL2D],t.FeatureType.WALLS2D]);break;case hc.clicked3D:t.tilt(45,2e3),t.hideFeatures([...C()?[]:[t.FeatureType.MODEL2D],t.FeatureType.WALLS2D]);break}})},[y,t]),i?Ga.createPortal(Oe.jsxs("div",{className:"view-mode-switch",children:[Oe.jsx("button",{className:"view-mode-switch__button",onClick:()=>x(hc.clicked2D),style:{backgroundColor:y===hc.clicked2D?u:"white"},children:y===hc.clicked2D?Oe.jsx(hK,{}):Oe.jsx(dK,{})}),Oe.jsx("button",{className:"view-mode-switch__button",onClick:()=>x(hc.clicked3D),style:{backgroundColor:[hc.initial3D,hc.clicked3D].includes(y)?u:"white"},children:[hc.initial3D,hc.clicked3D].includes(y)?Oe.jsx(fK,{}):Oe.jsx(pK,{})})]}),i):null}QN.propTypes={accessToken:ct.string.isRequired,onInitialized:ct.func.isRequired,center:ct.object,zoom:ct.number,bounds:ct.object,bearing:ct.number,pitch:ct.number,resetViewMode:ct.number,mapsIndoorsInstance:ct.object,viewModeSwitchVisible:ct.bool,mapOptions:ct.object,appConfig:ct.object};function QN({accessToken:t,onInitialized:o,center:s,zoom:u,bounds:d,bearing:y,pitch:x,resetViewMode:i,viewModeSwitchVisible:C,mapOptions:E,appConfig:O}){const[B,H]=je.useState();return je.useEffect(()=>{B&&(To(d)?(To(s)||B.getMap().setCenter(s),To(u)||B.getMap().setZoom(u),To(y)||B.getMap().setBearing(y),To(x)||B.getMap().setPitch(x)):B.getMap().fitBounds([d.west,d.south,d.east,d.north],{pitch:x||0,bearing:y||0,animate:!1,padding:E?.fitBoundsPadding}))},[B,s,u,y,x,d,E]),je.useEffect(()=>{window.mapboxgl=uK;const W={accessToken:t,element:document.getElementById("map"),center:s??{lat:0,lng:0},zoom:u??15,bounds:d?[d.west,d.south,d.east,d.north]:void 0,bearing:y??0,pitch:x??0,useMapsIndoorsMapboxStyle:!E?.mapboxMapStyle,...E};E?.miTransitionLevel&&!isNaN(parseInt(E?.miTransitionLevel))&&(W.mapsIndoorsTransitionLevel=parseInt(E.miTransitionLevel)),To(E?.showRoadNames)||(W.showRoadNameLabels=E.showRoadNames),To(E?.showMapMarkers)||(W.showMapMarkers=E.showMapMarkers);const ee=new window.mapsindoors.mapView.MapboxV3View(W);H(ee),!To(E?.mapboxMapStyle)&&!W.useMapsIndoorsMapboxStyle&&ee?.getMap()?.setStyle(E.mapboxMapStyle),o(ee)},[]),Oe.jsx("div",{className:"mapsindoors-map mapbox-map-container",id:"map",children:C&&Oe.jsx(HN,{reset:i,mapView:B,pitch:x,activeColor:E?.brandingColor,show2DModelsIn3D:O?.appSettings?.show2DModelsIn3D})})}const gK=Object.freeze(Object.defineProperty({__proto__:null,default:QN},Symbol.toStringTag,{value:"Module"}));function mK(t,o,s,u){function d(y){return y instanceof s?y:new s(function(x){x(y)})}return new(s||(s=Promise))(function(y,x){function i(O){try{E(u.next(O))}catch(B){x(B)}}function C(O){try{E(u.throw(O))}catch(B){x(B)}}function E(O){O.done?y(O.value):d(O.value).then(i,C)}E((u=u.apply(t,[])).next())})}typeof SuppressedError=="function"&&SuppressedError;function yK(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var _K=function t(o,s){if(o===s)return!0;if(o&&s&&typeof o=="object"&&typeof s=="object"){if(o.constructor!==s.constructor)return!1;var u,d,y;if(Array.isArray(o)){if(u=o.length,u!=s.length)return!1;for(d=u;d--!==0;)if(!t(o[d],s[d]))return!1;return!0}if(o.constructor===RegExp)return o.source===s.source&&o.flags===s.flags;if(o.valueOf!==Object.prototype.valueOf)return o.valueOf()===s.valueOf();if(o.toString!==Object.prototype.toString)return o.toString()===s.toString();if(y=Object.keys(o),u=y.length,u!==Object.keys(s).length)return!1;for(d=u;d--!==0;)if(!Object.prototype.hasOwnProperty.call(s,y[d]))return!1;for(d=u;d--!==0;){var x=y[d];if(!t(o[x],s[x]))return!1}return!0}return o!==o&&s!==s},vK=yK(_K);const YN="__googleMapsScriptId";var Dm;(function(t){t[t.INITIALIZED=0]="INITIALIZED",t[t.LOADING=1]="LOADING",t[t.SUCCESS=2]="SUCCESS",t[t.FAILURE=3]="FAILURE"})(Dm||(Dm={}));class Up{constructor({apiKey:o,authReferrerPolicy:s,channel:u,client:d,id:y=YN,language:x,libraries:i=[],mapIds:C,nonce:E,region:O,retries:B=3,url:H="https://maps.googleapis.com/maps/api/js",version:W}){if(this.callbacks=[],this.done=!1,this.loading=!1,this.errors=[],this.apiKey=o,this.authReferrerPolicy=s,this.channel=u,this.client=d,this.id=y||YN,this.language=x,this.libraries=i,this.mapIds=C,this.nonce=E,this.region=O,this.retries=B,this.url=H,this.version=W,Up.instance){if(!vK(this.options,Up.instance.options))throw new Error(`Loader must not be called again with different options. ${JSON.stringify(this.options)} !== ${JSON.stringify(Up.instance.options)}`);return Up.instance}Up.instance=this}get options(){return{version:this.version,apiKey:this.apiKey,channel:this.channel,client:this.client,id:this.id,libraries:this.libraries,language:this.language,region:this.region,mapIds:this.mapIds,nonce:this.nonce,url:this.url,authReferrerPolicy:this.authReferrerPolicy}}get status(){return this.errors.length?Dm.FAILURE:this.done?Dm.SUCCESS:this.loading?Dm.LOADING:Dm.INITIALIZED}get failed(){return this.done&&!this.loading&&this.errors.length>=this.retries+1}createUrl(){let o=this.url;return o+="?callback=__googleMapsCallback&loading=async",this.apiKey&&(o+=`&key=${this.apiKey}`),this.channel&&(o+=`&channel=${this.channel}`),this.client&&(o+=`&client=${this.client}`),this.libraries.length>0&&(o+=`&libraries=${this.libraries.join(",")}`),this.language&&(o+=`&language=${this.language}`),this.region&&(o+=`&region=${this.region}`),this.version&&(o+=`&v=${this.version}`),this.mapIds&&(o+=`&map_ids=${this.mapIds.join(",")}`),this.authReferrerPolicy&&(o+=`&auth_referrer_policy=${this.authReferrerPolicy}`),o}deleteScript(){const o=document.getElementById(this.id);o&&o.remove()}load(){return this.loadPromise()}loadPromise(){return new Promise((o,s)=>{this.loadCallback(u=>{u?s(u.error):o(window.google)})})}importLibrary(o){return this.execute(),google.maps.importLibrary(o)}loadCallback(o){this.callbacks.push(o),this.execute()}setScript(){var o,s;if(document.getElementById(this.id)){this.callback();return}const u={key:this.apiKey,channel:this.channel,client:this.client,libraries:this.libraries.length&&this.libraries,v:this.version,mapIds:this.mapIds,language:this.language,region:this.region,authReferrerPolicy:this.authReferrerPolicy};Object.keys(u).forEach(y=>!u[y]&&delete u[y]),!((s=(o=window?.google)===null||o===void 0?void 0:o.maps)===null||s===void 0)&&s.importLibrary||(y=>{let x,i,C,E="The Google Maps JavaScript API",O="google",B="importLibrary",H="__ib__",W=document,ee=window;ee=ee[O]||(ee[O]={});const ge=ee.maps||(ee.maps={}),Me=new Set,de=new URLSearchParams,q=()=>x||(x=new Promise((te,ye)=>mK(this,void 0,void 0,function*(){var ve;yield i=W.createElement("script"),i.id=this.id,de.set("libraries",[...Me]+"");for(C in y)de.set(C.replace(/[A-Z]/g,re=>"_"+re[0].toLowerCase()),y[C]);de.set("callback",O+".maps."+H),i.src=this.url+"?"+de,ge[H]=te,i.onerror=()=>x=ye(Error(E+" could not load.")),i.nonce=this.nonce||((ve=W.querySelector("script[nonce]"))===null||ve===void 0?void 0:ve.nonce)||"",W.head.append(i)})));ge[B]?console.warn(E+" only loads once. Ignoring:",y):ge[B]=(te,...ye)=>Me.add(te)&&q().then(()=>ge[B](te,...ye))})(u);const d=this.libraries.map(y=>this.importLibrary(y));d.length||d.push(this.importLibrary("core")),Promise.all(d).then(()=>this.callback(),y=>{const x=new ErrorEvent("error",{error:y});this.loadErrorCallback(x)})}reset(){this.deleteScript(),this.done=!1,this.loading=!1,this.errors=[],this.onerrorEvent=null}resetIfRetryingFailed(){this.failed&&this.reset()}loadErrorCallback(o){if(this.errors.push(o),this.errors.length<=this.retries){const s=this.errors.length*Math.pow(2,this.errors.length);console.error(`Failed to load Google Maps script, retrying in ${s} ms.`),setTimeout(()=>{this.deleteScript(),this.setScript()},s)}else this.onerrorEvent=o,this.callback()}callback(){this.done=!0,this.loading=!1,this.callbacks.forEach(o=>{o(this.onerrorEvent)}),this.callbacks=[]}execute(){if(this.resetIfRetryingFailed(),!this.loading)if(this.done)this.callback();else{if(window.google&&window.google.maps&&window.google.maps.version){console.warn("Google Maps already loaded outside @googlemaps/js-api-loader. This may result in undesirable behavior as options and script parameters may not match."),this.callback();return}this.loading=!0,this.setScript()}}}$N.propTypes={apiKey:ct.string.isRequired,onInitialized:ct.func.isRequired,center:ct.object,zoom:ct.number,bounds:ct.object,heading:ct.number,tilt:ct.number,mapsIndoorsInstance:ct.object,mapOptions:ct.object,gmMapId:ct.string};function $N({apiKey:t,onInitialized:o,center:s,zoom:u,bounds:d,heading:y,tilt:x,mapsIndoorsInstance:i,mapOptions:C,gmMapId:E}){const[O,B]=je.useState();return je.useEffect(()=>{O&&(To(d)||i.getMapView().fitBounds(d,C?.fitBoundsPadding),!To(s)&&To(d)&&O.getMap().setCenter(s),!To(u)&&To(d)&&O.getMap().setZoom(u),To(y)||O.getMap().setHeading(y),To(x)||O.getMap().setTilt(x))},[O,s,u,y,x,d,C]),je.useEffect(()=>{new Up({apiKey:t,version:"quarterly",libraries:["geometry","places"]}).load().then(()=>{const W={element:document.getElementById("map"),disableDefaultUI:!0,center:s??{lat:0,lng:0},zoom:u??21,heading:y??0,tilt:x??0,mapId:E,gestureHandling:"greedy",...C};To(C?.showMapMarkers)||(W.showMapMarkers=C.showMapMarkers);const ee=new window.mapsindoors.mapView.GoogleMapsView(W);B(ee),o(ee)})},[]),Oe.jsx("div",{className:"mapsindoors-map google-maps-map-container",id:"map"})}const xK=Object.freeze(Object.defineProperty({__proto__:null,default:$N},Symbol.toStringTag,{value:"Module"}));return UN}));
2917
- //# sourceMappingURL=mapsindoors-react.umd.js.map
@@ -77054,4 +77054,3 @@ const iJ = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
77054
77054
  export {
77055
77055
  HX as default
77056
77056
  };
77057
- //# sourceMappingURL=mapsindoors-webcomponent.es.js.map
@@ -37888,4 +37888,3 @@ export {
37888
37888
  F as j,
37889
37889
  Ea as u
37890
37890
  };
37891
- //# sourceMappingURL=reactcomponent-BbCjFBSB.mjs.map
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@mapsindoors/map-template",
3
3
  "description": "Get a MapsIndoors map up and running in less than 10 mins.",
4
- "version": "1.96.4",
4
+ "version": "1.96.5",
5
5
  "private": false,
6
6
  "files": [
7
7
  "dist/**"
@@ -1 +0,0 @@
1
- {"version":3,"file":"GoogleMapsMap-DrAndMwX.mjs","sources":["../../../node_modules/@googlemaps/js-api-loader/dist/index.mjs","../src/components/MIMap/GoogleMapsMap/GoogleMapsMap.jsx"],"sourcesContent":["/******************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise, SuppressedError, Symbol */\r\n\r\n\r\nfunction __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\ntypeof SuppressedError === \"function\" ? SuppressedError : function (error, suppressed, message) {\r\n var e = new Error(message);\r\n return e.name = \"SuppressedError\", e.error = error, e.suppressed = suppressed, e;\r\n};\n\nfunction getDefaultExportFromCjs (x) {\n\treturn x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;\n}\n\n// do not edit .js files directly - edit src/index.jst\n\n\n\nvar fastDeepEqual = function equal(a, b) {\n if (a === b) return true;\n\n if (a && b && typeof a == 'object' && typeof b == 'object') {\n if (a.constructor !== b.constructor) return false;\n\n var length, i, keys;\n if (Array.isArray(a)) {\n length = a.length;\n if (length != b.length) return false;\n for (i = length; i-- !== 0;)\n if (!equal(a[i], b[i])) return false;\n return true;\n }\n\n\n\n if (a.constructor === RegExp) return a.source === b.source && a.flags === b.flags;\n if (a.valueOf !== Object.prototype.valueOf) return a.valueOf() === b.valueOf();\n if (a.toString !== Object.prototype.toString) return a.toString() === b.toString();\n\n keys = Object.keys(a);\n length = keys.length;\n if (length !== Object.keys(b).length) return false;\n\n for (i = length; i-- !== 0;)\n if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false;\n\n for (i = length; i-- !== 0;) {\n var key = keys[i];\n\n if (!equal(a[key], b[key])) return false;\n }\n\n return true;\n }\n\n // true if both NaN, false otherwise\n return a!==a && b!==b;\n};\n\nvar isEqual = /*@__PURE__*/getDefaultExportFromCjs(fastDeepEqual);\n\n/**\n * Copyright 2019 Google LLC. All Rights Reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at.\n *\n * Http://www.apache.org/licenses/LICENSE-2.0.\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nconst DEFAULT_ID = \"__googleMapsScriptId\";\n/**\n * The status of the [[Loader]].\n */\nvar LoaderStatus;\n(function (LoaderStatus) {\n LoaderStatus[LoaderStatus[\"INITIALIZED\"] = 0] = \"INITIALIZED\";\n LoaderStatus[LoaderStatus[\"LOADING\"] = 1] = \"LOADING\";\n LoaderStatus[LoaderStatus[\"SUCCESS\"] = 2] = \"SUCCESS\";\n LoaderStatus[LoaderStatus[\"FAILURE\"] = 3] = \"FAILURE\";\n})(LoaderStatus || (LoaderStatus = {}));\n/**\n * [[Loader]] makes it easier to add Google Maps JavaScript API to your application\n * dynamically using\n * [Promises](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise).\n * It works by dynamically creating and appending a script node to the the\n * document head and wrapping the callback function so as to return a promise.\n *\n * ```\n * const loader = new Loader({\n * apiKey: \"\",\n * version: \"weekly\",\n * libraries: [\"places\"]\n * });\n *\n * loader.load().then((google) => {\n * const map = new google.maps.Map(...)\n * })\n * ```\n */\nclass Loader {\n /**\n * Creates an instance of Loader using [[LoaderOptions]]. No defaults are set\n * using this library, instead the defaults are set by the Google Maps\n * JavaScript API server.\n *\n * ```\n * const loader = Loader({apiKey, version: 'weekly', libraries: ['places']});\n * ```\n */\n constructor({ apiKey, authReferrerPolicy, channel, client, id = DEFAULT_ID, language, libraries = [], mapIds, nonce, region, retries = 3, url = \"https://maps.googleapis.com/maps/api/js\", version, }) {\n this.callbacks = [];\n this.done = false;\n this.loading = false;\n this.errors = [];\n this.apiKey = apiKey;\n this.authReferrerPolicy = authReferrerPolicy;\n this.channel = channel;\n this.client = client;\n this.id = id || DEFAULT_ID; // Do not allow empty string\n this.language = language;\n this.libraries = libraries;\n this.mapIds = mapIds;\n this.nonce = nonce;\n this.region = region;\n this.retries = retries;\n this.url = url;\n this.version = version;\n if (Loader.instance) {\n if (!isEqual(this.options, Loader.instance.options)) {\n throw new Error(`Loader must not be called again with different options. ${JSON.stringify(this.options)} !== ${JSON.stringify(Loader.instance.options)}`);\n }\n return Loader.instance;\n }\n Loader.instance = this;\n }\n get options() {\n return {\n version: this.version,\n apiKey: this.apiKey,\n channel: this.channel,\n client: this.client,\n id: this.id,\n libraries: this.libraries,\n language: this.language,\n region: this.region,\n mapIds: this.mapIds,\n nonce: this.nonce,\n url: this.url,\n authReferrerPolicy: this.authReferrerPolicy,\n };\n }\n get status() {\n if (this.errors.length) {\n return LoaderStatus.FAILURE;\n }\n if (this.done) {\n return LoaderStatus.SUCCESS;\n }\n if (this.loading) {\n return LoaderStatus.LOADING;\n }\n return LoaderStatus.INITIALIZED;\n }\n get failed() {\n return this.done && !this.loading && this.errors.length >= this.retries + 1;\n }\n /**\n * CreateUrl returns the Google Maps JavaScript API script url given the [[LoaderOptions]].\n *\n * @ignore\n * @deprecated\n */\n createUrl() {\n let url = this.url;\n url += `?callback=__googleMapsCallback&loading=async`;\n if (this.apiKey) {\n url += `&key=${this.apiKey}`;\n }\n if (this.channel) {\n url += `&channel=${this.channel}`;\n }\n if (this.client) {\n url += `&client=${this.client}`;\n }\n if (this.libraries.length > 0) {\n url += `&libraries=${this.libraries.join(\",\")}`;\n }\n if (this.language) {\n url += `&language=${this.language}`;\n }\n if (this.region) {\n url += `&region=${this.region}`;\n }\n if (this.version) {\n url += `&v=${this.version}`;\n }\n if (this.mapIds) {\n url += `&map_ids=${this.mapIds.join(\",\")}`;\n }\n if (this.authReferrerPolicy) {\n url += `&auth_referrer_policy=${this.authReferrerPolicy}`;\n }\n return url;\n }\n deleteScript() {\n const script = document.getElementById(this.id);\n if (script) {\n script.remove();\n }\n }\n /**\n * Load the Google Maps JavaScript API script and return a Promise.\n * @deprecated, use importLibrary() instead.\n */\n load() {\n return this.loadPromise();\n }\n /**\n * Load the Google Maps JavaScript API script and return a Promise.\n *\n * @ignore\n * @deprecated, use importLibrary() instead.\n */\n loadPromise() {\n return new Promise((resolve, reject) => {\n this.loadCallback((err) => {\n if (!err) {\n resolve(window.google);\n }\n else {\n reject(err.error);\n }\n });\n });\n }\n importLibrary(name) {\n this.execute();\n return google.maps.importLibrary(name);\n }\n /**\n * Load the Google Maps JavaScript API script with a callback.\n * @deprecated, use importLibrary() instead.\n */\n loadCallback(fn) {\n this.callbacks.push(fn);\n this.execute();\n }\n /**\n * Set the script on document.\n */\n setScript() {\n var _a, _b;\n if (document.getElementById(this.id)) {\n // TODO wrap onerror callback for cases where the script was loaded elsewhere\n this.callback();\n return;\n }\n const params = {\n key: this.apiKey,\n channel: this.channel,\n client: this.client,\n libraries: this.libraries.length && this.libraries,\n v: this.version,\n mapIds: this.mapIds,\n language: this.language,\n region: this.region,\n authReferrerPolicy: this.authReferrerPolicy,\n };\n // keep the URL minimal:\n Object.keys(params).forEach(\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n (key) => !params[key] && delete params[key]);\n if (!((_b = (_a = window === null || window === void 0 ? void 0 : window.google) === null || _a === void 0 ? void 0 : _a.maps) === null || _b === void 0 ? void 0 : _b.importLibrary)) {\n // tweaked copy of https://developers.google.com/maps/documentation/javascript/load-maps-js-api#dynamic-library-import\n // which also sets the base url, the id, and the nonce\n /* eslint-disable */\n ((g) => {\n // @ts-ignore\n let h, a, k, p = \"The Google Maps JavaScript API\", c = \"google\", l = \"importLibrary\", q = \"__ib__\", m = document, b = window;\n // @ts-ignore\n b = b[c] || (b[c] = {});\n // @ts-ignore\n const d = b.maps || (b.maps = {}), r = new Set(), e = new URLSearchParams(), u = () => \n // @ts-ignore\n h || (h = new Promise((f, n) => __awaiter(this, void 0, void 0, function* () {\n var _a;\n yield (a = m.createElement(\"script\"));\n a.id = this.id;\n e.set(\"libraries\", [...r] + \"\");\n // @ts-ignore\n for (k in g)\n e.set(k.replace(/[A-Z]/g, (t) => \"_\" + t[0].toLowerCase()), g[k]);\n e.set(\"callback\", c + \".maps.\" + q);\n a.src = this.url + `?` + e;\n d[q] = f;\n a.onerror = () => (h = n(Error(p + \" could not load.\")));\n // @ts-ignore\n a.nonce = this.nonce || ((_a = m.querySelector(\"script[nonce]\")) === null || _a === void 0 ? void 0 : _a.nonce) || \"\";\n m.head.append(a);\n })));\n // @ts-ignore\n d[l] ? console.warn(p + \" only loads once. Ignoring:\", g) : (d[l] = (f, ...n) => r.add(f) && u().then(() => d[l](f, ...n)));\n })(params);\n /* eslint-enable */\n }\n // While most libraries populate the global namespace when loaded via bootstrap params,\n // this is not the case for \"marker\" when used with the inline bootstrap loader\n // (and maybe others in the future). So ensure there is an importLibrary for each:\n const libraryPromises = this.libraries.map((library) => this.importLibrary(library));\n // ensure at least one library, to kick off loading...\n if (!libraryPromises.length) {\n libraryPromises.push(this.importLibrary(\"core\"));\n }\n Promise.all(libraryPromises).then(() => this.callback(), (error) => {\n const event = new ErrorEvent(\"error\", { error }); // for backwards compat\n this.loadErrorCallback(event);\n });\n }\n /**\n * Reset the loader state.\n */\n reset() {\n this.deleteScript();\n this.done = false;\n this.loading = false;\n this.errors = [];\n this.onerrorEvent = null;\n }\n resetIfRetryingFailed() {\n if (this.failed) {\n this.reset();\n }\n }\n loadErrorCallback(e) {\n this.errors.push(e);\n if (this.errors.length <= this.retries) {\n const delay = this.errors.length * Math.pow(2, this.errors.length);\n console.error(`Failed to load Google Maps script, retrying in ${delay} ms.`);\n setTimeout(() => {\n this.deleteScript();\n this.setScript();\n }, delay);\n }\n else {\n this.onerrorEvent = e;\n this.callback();\n }\n }\n callback() {\n this.done = true;\n this.loading = false;\n this.callbacks.forEach((cb) => {\n cb(this.onerrorEvent);\n });\n this.callbacks = [];\n }\n execute() {\n this.resetIfRetryingFailed();\n if (this.loading) {\n // do nothing but wait\n return;\n }\n if (this.done) {\n this.callback();\n }\n else {\n // short circuit and warn if google.maps is already loaded\n if (window.google && window.google.maps && window.google.maps.version) {\n console.warn(\"Google Maps already loaded outside @googlemaps/js-api-loader. \" +\n \"This may result in undesirable behavior as options and script parameters may not match.\");\n this.callback();\n return;\n }\n this.loading = true;\n this.setScript();\n }\n }\n}\n\nexport { DEFAULT_ID, Loader, LoaderStatus };\n//# sourceMappingURL=index.mjs.map\n","import { useEffect, useState } from 'react';\nimport PropTypes from 'prop-types';\nimport { Loader as GoogleMapsApiLoader } from '@googlemaps/js-api-loader';\nimport './GoogleMapsMap.scss';\nimport isNullOrUndefined from '../../../helpers/isNullOrUndefined';\n\nGoogleMapsMap.propTypes = {\n apiKey: PropTypes.string.isRequired,\n onInitialized: PropTypes.func.isRequired,\n center: PropTypes.object,\n zoom: PropTypes.number,\n bounds: PropTypes.object,\n heading: PropTypes.number,\n tilt: PropTypes.number,\n mapsIndoorsInstance: PropTypes.object,\n mapOptions: PropTypes.object,\n gmMapId: PropTypes.string\n}\n/**\n * @param {Object} props\n * @param {string} props.apiKey - Google Maps API key.\n * @param {function} props.onInitialized - Function that is called when the map view is initialized.\n * @param {Object} [props.center] - Object with latitude and longitude on which the map will center. Example: { lat: 55, lng: 10 }\n * @param {number} [props.zoom] - Zoom level for the map.\n * @param {object} [props.bounds] - Map bounds. Will win over center+zoom if set. Use the format { south: number, west: number, north: number, east: number }\n * @param {number} [props.heading] - The heading of the map (rotation from north) as a number. Not recommended for maps with 2D Models.\n * @param {number} [props.tilt] - The tilt of the map as a number. Not recommended for maps with 2D Models.\n * @param {Object} [props.mapsIndoorsInstance] - Instance of MapsIndoors class: https://app.mapsindoors.com/mapsindoors/js/sdk/latest/docs/mapsindoors.MapsIndoors.html\n * @param {Object} [props.mapOptions] - Options for instantiating and styling the map as well as UI elements.\n * @param {string} [props.gmMapId] - The Google Maps Map ID for custom styling.\n */\nfunction GoogleMapsMap({ apiKey, onInitialized, center, zoom, bounds, heading, tilt, mapsIndoorsInstance, mapOptions, gmMapId }) {\n\n const [mapViewInstance, setMapViewInstance] = useState();\n\n /*\n * React on any props that are used to control the position of the map.\n *\n * If the bounds prop is set, it will win over center+zoom.\n */\n useEffect(() => {\n if (!mapViewInstance) return;\n\n if (!isNullOrUndefined(bounds)) {\n // Bounds will allways win over center+zoom.\n mapsIndoorsInstance.getMapView().fitBounds(bounds, mapOptions?.fitBoundsPadding);\n }\n\n if (!isNullOrUndefined(center) && isNullOrUndefined(bounds)) {\n mapViewInstance.getMap().setCenter(center);\n }\n\n if (!isNullOrUndefined(zoom) && isNullOrUndefined(bounds)) {\n mapViewInstance.getMap().setZoom(zoom);\n }\n\n if (!isNullOrUndefined(heading)) {\n mapViewInstance.getMap().setHeading(heading);\n }\n\n if (!isNullOrUndefined(tilt)) {\n mapViewInstance.getMap().setTilt(tilt);\n }\n }, [mapViewInstance, center, zoom, heading, tilt, bounds, mapOptions]);\n\n useEffect(() => {\n const loader = new GoogleMapsApiLoader({\n apiKey: apiKey,\n version: 'quarterly',\n libraries: ['geometry', 'places']\n });\n\n loader.load().then(() => {\n\n // Initialize Google Maps MapView\n const mapViewOptions = {\n element: document.getElementById('map'),\n disableDefaultUI: true, // Disable Map Type control, Street view control and Zoom controls.\n center: center ?? { lat: 0, lng: 0 }, // The MapsIndoors SDK needs a starting point and a zoom level to avoid timing issues when setting a venue.\n zoom: zoom ?? 21,\n heading: heading ?? 0,\n tilt: tilt ?? 0,\n mapId: gmMapId,\n gestureHandling: 'greedy',\n ...mapOptions\n };\n\n // If showMapMarkers is not null or undefined, set it as showMapMarkers in the mapViewOptions.\n if (!isNullOrUndefined(mapOptions?.showMapMarkers)) {\n mapViewOptions.showMapMarkers = mapOptions.showMapMarkers;\n }\n\n const mapView = new window.mapsindoors.mapView.GoogleMapsView(mapViewOptions);\n setMapViewInstance(mapView);\n\n onInitialized(mapView);\n });\n }, []);\n\n return <div className=\"mapsindoors-map google-maps-map-container\" id=\"map\"></div>\n}\n\nexport default GoogleMapsMap;\n"],"names":["__awaiter","thisArg","_arguments","P","generator","adopt","value","resolve","reject","fulfilled","step","e","rejected","result","getDefaultExportFromCjs","x","fastDeepEqual","equal","a","b","length","i","keys","key","isEqual","DEFAULT_ID","LoaderStatus","Loader","apiKey","authReferrerPolicy","channel","client","id","language","libraries","mapIds","nonce","region","retries","url","version","script","err","name","fn","_a","_b","params","g","h","k","c","l","q","m","d","r","u","f","n","t","libraryPromises","library","error","event","delay","cb","GoogleMapsMap","PropTypes","onInitialized","center","zoom","bounds","heading","tilt","mapsIndoorsInstance","mapOptions","gmMapId","mapViewInstance","setMapViewInstance","useState","useEffect","isNullOrUndefined","GoogleMapsApiLoader","mapViewOptions","mapView","jsx"],"mappings":";;AAiBA,SAASA,EAAUC,GAASC,GAAYC,GAAGC,GAAW;AAClD,WAASC,EAAMC,GAAO;AAAE,WAAOA,aAAiBH,IAAIG,IAAQ,IAAIH,EAAE,SAAUI,GAAS;AAAE,MAAAA,EAAQD,CAAK;AAAA,IAAG,CAAC;AAAA,EAAG;AAC3G,SAAO,KAAKH,MAAMA,IAAI,UAAU,SAAUI,GAASC,GAAQ;AACvD,aAASC,EAAUH,GAAO;AAAE,UAAI;AAAE,QAAAI,EAAKN,EAAU,KAAKE,CAAK,CAAC;AAAA,MAAG,SAASK,GAAG;AAAE,QAAAH,EAAOG,CAAC;AAAA,MAAG;AAAA,IAAE;AAC1F,aAASC,EAASN,GAAO;AAAE,UAAI;AAAE,QAAAI,EAAKN,EAAU,MAASE,CAAK,CAAC;AAAA,MAAG,SAASK,GAAG;AAAE,QAAAH,EAAOG,CAAC;AAAA,MAAG;AAAA,IAAE;AAC7F,aAASD,EAAKG,GAAQ;AAAE,MAAAA,EAAO,OAAON,EAAQM,EAAO,KAAK,IAAIR,EAAMQ,EAAO,KAAK,EAAE,KAAKJ,GAAWG,CAAQ;AAAA,IAAG;AAC7G,IAAAF,GAAMN,IAAYA,EAAU,MAAMH,GAAuB,CAAA,CAAE,GAAG,KAAI,CAAE;AAAA,EACxE,CAAC;AACL;AAOA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