1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/maplibre-gl-BlAng63n.js","assets/maplibre-gl-Bvgxi16K.js"])))=>i.map(i=>d[i]); 2import{f as I,l as _}from"./@mui/material-BGWR8rST.js";import{a as s}from"./victory-BL4CueXK.js";import{_ as B}from"./react-code-blocks-BLfH040E.js";import{a3 as V,a4 as q}from"./index-CuWiMPH9.js";import"./datepicking-3wdsZi_U.js";import"./maplibre-gl-Bvgxi16K.js";import"./mui-styles-BL5qk3zX.js";import"./react-mentions-CZ4dq0P5.js";import"./fp-ts-NIRysFLM.js";import"./formik-DMZ3n809.js";import"./sentry-BXadQjoQ.js";import"./yup-Dihmxy46.js";import"./@pubnub/chat-R-tk_ewC.js";import"./pubnub-B_t0C9qn.js";import"./@dnd-kit-BWw6YNqt.js";import"./tanstack-table-nlYifGVZ.js";import"./effect-BKu2Pq4m.js";const W=s.createContext(null);function $(e,t){const o=Array.isArray(e)?e[0]:e?e.x:0,r=Array.isArray(e)?e[1]:e?e.y:0,n=Array.isArray(t)?t[0]:t?t.x:0,i=Array.isArray(t)?t[1]:t?t.y:0;return o===n&&r===i}function p(e,t){if(e===t)return!0;if(!e||!t)return!1;if(Array.isArray(e)){if(!Array.isArray(t)||e.length!==t.length)return!1;for(let o=0;o<e.length;o++)if(!p(e[o],t[o]))return!1;return!0}else if(Array.isArray(t))return!1;if(typeof e=="object"&&typeof t=="object"){const o=Object.keys(e),r=Object.keys(t);if(o.length!==r.length)return!1;for(const n of o)if(!t.hasOwnProperty(n)||!p(e[n],t[n]))return!1;return!0}return!1}function G(e){const t=e.clone();return t.pixelsToGLUnits=e.pixelsToGLUnits,t}function z(e,t){if(!e.getProjection)return;const o=e.getProjection(),r=t.getProjection();p(o,r)||t.setProjection(o)}function k(e){return{longitude:e.center.lng,latitude:e.center.lat,zoom:e.zoom,pitch:e.pitch,bearing:e.bearing,padding:e.padding}}function A(e,t){const o=t.viewState||t;let r=!1;if("longitude"in o&&"latitude"in o){const n=e.center;e.center=new n.constructor(o.longitude,o.latitude),r=r||n!==e.center}if("zoom"in o){const n=e.zoom;e.zoom=o.zoom,r=r||n!==e.zoom}if("bearing"in o){const n=e.bearing;e.bearing=o.bearing,r=r||n!==e.bearing}if("pitch"in o){const n=e.pitch;e.pitch=o.pitch,r=r||n!==e.pitch}return o.padding&&!e.isPaddingEqual(o.padding)&&(r=!0,e.padding=o.padding),r}const K=["type","source","source-layer","minzoom","maxzoom","filter","layout"];function j(e){if(!e)return null;if(typeof e=="string"||("toJS"in e&&(e=e.toJS()),!e.layers))return e;const t={};for(const r of e.layers)t[r.id]=r;const o=e.layers.map(r=>{let n=null;"interactive"in r&&(n=Object.assign({},r),delete n.interactive);const i=t[r.ref];if(i){n=n||Object.assign({},r),delete n.ref;for(const a of K)a in i&&(n[a]=i[a])}return n||r});return{...e,layers:o}}var P={NODE_ENV:"production"};const N={version:8,sources:{},layers:[]},O={mousedown:"onMouseDown",mouseup:"onMouseUp",mouseover:"onMouseOver",mousemove:"onMouseMove",click:"onClick",dblclick:"onDblClick",mouseenter:"onMouseEnter",mouseleave:"onMouseLeave",mouseout:"onMouseOut",contextmenu:"onContextMenu",touchstart:"onTouchStart",touchend:"onTouchEnd",touchmove:"onTouchMove",touchcancel:"onTouchCancel"},R={movestart:"onMoveStart",move:"onMove",moveend:"onMoveEnd",dragstart:"onDragStart",drag:"onDrag",dragend:"onDragEnd",zoomstart:"onZoomStart",zoom:"onZoom",zoomend:"onZoomEnd",rotatestart:"onRotateStart",rotate:"onRotate",rotateend:"onRotateEnd",pitchstart:"onPitchStart",pitch:"onPitch",pitchend:"onPitchEnd"},F={wheel:"onWheel",boxzoomstart:"onBoxZoomStart",boxzoomend:"onBoxZoomEnd",boxzoomcancel:"onBoxZoomCancel",resize:"onResize",load:"onLoad",render:"onRender",idle:"onIdle",remove:"onRemove",data:"onData",styledata:"onStyleData",sourcedata:"onSourceData",error:"onError"},Q=["minZoom","maxZoom","minPitch","maxPitch","maxBounds","projection","renderWorldCopies"],J=["scrollZoom","boxZoom","dragRotate","dragPan","keyboard","doubleClickZoom","touchZoomRotate","touchPitch"];class L{constructor(t,o,r){this._map=null,this._internalUpdate=!1,this._inRender=!1,this._hoveredFeatures=null,this._deferredEvents={move:!1,zoom:!1,pitch:!1,rotate:!1},this._onEvent=n=>{const i=this.props[F[n.type]];i?i(n):n.type==="error"&&console.error(n.error)},this._onPointerEvent=n=>{(n.type==="mousemove"||n.type==="mouseout")&&this._updateHover(n);const i=this.props[O[n.type]];i&&(this.props.interactiveLayerIds&&n.type!=="mouseover"&&n.type!=="mouseout"&&(n.features=this._hoveredFeatures||this._queryRenderedFeatures(n.point)),i(n),delete n.features)},this._onCameraEvent=n=>{if(!this._internalUpdate){const i=this.props[R[n.type]];i&&i(n)}n.type in this._deferredEvents&&(this._deferredEvents[n.type]=!1)},this._MapClass=t,this.props=o,this._initialize(r)}get map(){return this._map}get transform(){return this._renderTransform}setProps(t){const o=this.props;this.props=t;const r=this._updateSettings(t,o);r&&this._createShadowTransform(this._map);const n=this._updateSize(t),i=this._updateViewState(t,!0);this._updateStyle(t,o),this._updateStyleComponents(t,o),this._updateHandlers(t,o),(r||n||i&&!this._map.isMoving())&&this.redraw()}static reuse(t,o){const r=L.savedMaps.pop();if(!r)return null;const n=r.map,i=n.getContainer();for(o.className=i.className;i.childNodes.length>0;)o.appendChild(i.childNodes[0]);n._container=o;const a=n._resizeObserver;a&&(a.disconnect(),a.observe(o)),r.setProps({...t,styleDiffing:!1}),n.resize();const{initialViewState:c}=t;return c&&(c.bounds?n.fitBounds(c.bounds,{...c.fitBoundsOptions,duration:0}):r._updateViewState(c,!1)),n.isStyleLoaded()?n.fire("load"):n.once("styledata",()=>n.fire("load")),n._update(),r}_initialize(t){const{props:o}=this,{mapStyle:r=N}=o,n={...o,...o.initialViewState,accessToken:o.mapboxAccessToken||Y()||null,container:t,style:j(r)},i=n.initialViewState||n.viewState||n;if(Object.assign(n,{center:[i.longitude||0,i.latitude||0],zoom:i.zoom||0,pitch:i.pitch||0,bearing:i.bearing||0}),o.gl){const f=HTMLCanvasElement.prototype.getContext;HTMLCanvasElement.prototype.getContext=()=>(HTMLCanvasElement.prototype.getContext=f,o.gl)}const a=new this._MapClass(n);
2i.padding&&a.setPadding(i.padding),o.cursor&&(a.getCanvas().style.cursor=o.cursor),this._createShadowTransform(a);const c=a._render;a._render=f=>{this._inRender=!0,c.call(a,f),this._inRender=!1};const u=a._renderTaskQueue.run;a._renderTaskQueue.run=f=>{u.call(a._renderTaskQueue,f),this._onBeforeRepaint()},a.on("render",()=>this._onAfterRepaint());const l=a.fire;a.fire=this._fireEvent.bind(this,l),a.on("resize",()=>{this._renderTransform.resize(a.transform.width,a.transform.height)}),a.on("styledata",()=>{this._updateStyleComponents(this.props,{}),z(a.transform,this._renderTransform)}),a.on("sourcedata",()=>this._updateStyleComponents(this.props,{}));for(const f in O)a.on(f,this._onPointerEvent);for(const f in R)a.on(f,this._onCameraEvent);for(const f in F)a.on(f,this._onEvent);this._map=a}recycle(){const o=this.map.getContainer().querySelector("[mapboxgl-children]");o?.remove(),L.savedMaps.push(this)}destroy(){this._map.remove()}redraw(){const t=this._map;!this._inRender&&t.style&&(t._frame&&(t._frame.cancel(),t._frame=null),t._render())}_createShadowTransform(t){const o=G(t.transform);t.painter.transform=o,this._renderTransform=o}_updateSize(t){const{viewState:o}=t;if(o){const r=this._map;if(o.width!==r.transform.width||o.height!==r.transform.height)return r.resize(),!0}return!1}_updateViewState(t,o){if(this._internalUpdate)return!1;const r=this._map,n=this._renderTransform,{zoom:i,pitch:a,bearing:c}=n,u=r.isMoving();u&&(n.cameraElevationReference="sea");const l=A(n,{...k(r.transform),...t});if(u&&(n.cameraElevationReference="ground"),l&&o){const f=this._deferredEvents;f.move=!0,f.zoom||(f.zoom=i!==n.zoom),f.rotate||(f.rotate=c!==n.bearing),f.pitch||(f.pitch=a!==n.pitch)}return u||A(r.transform,t),l}_updateSettings(t,o){const r=this._map;let n=!1;for(const i of Q)if(i in t&&!p(t[i],o[i])){n=!0;const a=r[`set${i[0].toUpperCase()}${i.slice(1)}`];a?.call(r,t[i])}return n}_updateStyle(t,o){if(t.cursor!==o.cursor&&(this._map.getCanvas().style.cursor=t.cursor||""),t.mapStyle!==o.mapStyle){const{mapStyle:r=N,styleDiffing:n=!0}=t,i={diff:n};return"localIdeographFontFamily"in t&&(i.localIdeographFontFamily=t.localIdeographFontFamily),this._map.setStyle(j(r),i),!0}return!1}_updateStyleComponents(t,o){const r=this._map;let n=!1;return r.isStyleLoaded()&&("light"in t&&r.setLight&&!p(t.light,o.light)&&(n=!0,r.setLight(t.light)),"fog"in t&&r.setFog&&!p(t.fog,o.fog)&&(n=!0,r.setFog(t.fog)),"terrain"in t&&r.setTerrain&&!p(t.terrain,o.terrain)&&(!t.terrain||r.getSource(t.terrain.source))&&(n=!0,r.setTerrain(t.terrain))),n}_updateHandlers(t,o){var r,n;const i=this._map;let a=!1;for(const c of J){const u=(r=t[c])!==null&&r!==void 0?r:!0,l=(n=o[c])!==null&&n!==void 0?n:!0;p(u,l)||(a=!0,u?i[c].enable(u):i[c].disable())}return a}_queryRenderedFeatures(t){const o=this._map,r=o.transform,{interactiveLayerIds:n=[]}=this.props;try{return o.transform=this._renderTransform,o.queryRenderedFeatures(t,{layers:n.filter(o.getLayer.bind(o))})}catch{return[]}finally{o.transform=r}}_updateHover(t){var o;const{props:r}=this;if(r.interactiveLayerIds&&(r.onMouseMove||r.onMouseEnter||r.onMouseLeave)){const i=t.type,a=((o=this._hoveredFeatures)===null||o===void 0?void 0:o.length)>0,c=this._queryRenderedFeatures(t.point),u=c.length>0;!u&&a&&(t.type="mouseleave",this._onPointerEvent(t)),this._hoveredFeatures=c,u&&!a&&(t.type="mouseenter",this._onPointerEvent(t)),t.type=i}else this._hoveredFeatures=null}_fireEvent(t,o,r){const n=this._map,i=n.transform,a=typeof o=="string"?o:o.type;return a==="move"&&this._updateViewState(this.props,!1),a in R&&(typeof o=="object"&&(o.viewState=k(i)),this._map.isMoving())?(n.transform=this._renderTransform,t.call(n,o,r),n.transform=i,n):(t.call(n,o,r),n)}_onBeforeRepaint(){const t=this._map;this._internalUpdate=!0;for(const r in this._deferredEvents)this._deferredEvents[r]&&t.fire(r);this._internalUpdate=!1;const o=this._map.transform;t.transform=this._renderTransform,this._onAfterRepaint=()=>{z(this._renderTransform,o),t.transform=o}}}L.savedMaps=[];function Y(){let e=null;if(typeof location<"u"){const t=/access_token=([^&\/]*)/.exec(location.search);e=t&&t[1]}try{e=e||P.MapboxAccessToken}catch{}try{e=e||P.REACT_APP_MAPBOX_ACCESS_TOKEN}catch{}return e}
2const X=["setMaxBounds","setMinZoom","setMaxZoom","setMinPitch","setMaxPitch","setRenderWorldCopies","setProjection","setStyle","addSource","removeSource","addLayer","removeLayer","setLayerZoomRange","setFilter","setPaintProperty","setLayoutProperty","setLight","setTerrain","setFog","remove"];function ee(e){if(!e)return null;const t=e.map,o={getMap:()=>t,getCenter:()=>e.transform.center,getZoom:()=>e.transform.zoom,getBearing:()=>e.transform.bearing,getPitch:()=>e.transform.pitch,getPadding:()=>e.transform.padding,getBounds:()=>e.transform.getBounds(),project:r=>{const n=t.transform;t.transform=e.transform;const i=t.project(r);return t.transform=n,i},unproject:r=>{const n=t.transform;t.transform=e.transform;const i=t.unproject(r);return t.transform=n,i},queryTerrainElevation:(r,n)=>{const i=t.transform;t.transform=e.transform;const a=t.queryTerrainElevation(r,n);return t.transform=i,a},queryRenderedFeatures:(r,n)=>{const i=t.transform;t.transform=e.transform;const a=t.queryRenderedFeatures(r,n);return t.transform=i,a}};for(const r of te(t))!(r in o)&&!X.includes(r)&&(o[r]=t[r].bind(t));return o}function te(e){const t=new Set;let o=e;for(;o;
2){for(const r of Object.getOwnPropertyNames(o))r[0]!=="_"&&typeof e[r]=="function"&&r!=="fire"&&r!=="setEventedParent"&&t.add(r);o=Object.getPrototypeOf(o)}return Array.from(t)}const ne=typeof document<"u"?s.useLayoutEffect:s.useEffect,oe=["baseApiUrl","maxParallelImageRequests","workerClass","workerCount","workerUrl"];function re(e,t){for(const r of oe)r in t&&(e[r]=t[r]);const{RTLTextPlugin:o="https://api.mapbox.com/mapbox-gl-js/plugins/mapbox-gl-rtl-text/v0.2.3/mapbox-gl-rtl-text.js"}=t;o&&e.getRTLTextPluginStatus&&e.getRTLTextPluginStatus()==="unavailable"&&e.setRTLTextPlugin(o,r=>{r&&console.error(r)},!0)}const x=s.createContext(null);function ie(e,t,o){const r=s.useContext(W),[n,i]=s.useState(null),a=s.useRef(),{current:c}=s.useRef({mapLib:null,map:null});s.useEffect(()=>{const f=e.mapLib;let d=!0,m;return Promise.resolve(f||o).then(h=>{if(!d)return;if(!h)throw new Error("Invalid mapLib");const y="Map"in h?h:h.default;if(!y.Map)throw new Error("Invalid mapLib");if(re(y,e),!y.supported||y.supported(e))e.reuseMaps&&(m=L.reuse(e,a.current)),m||(m=new L(y.Map,e,a.current)),c.map=ee(m),c.mapLib=y,i(m),r?.onMapMount(c.map,e.id);else throw new Error("Map is not supported by this browser")}).catch(h=>{const{onError:y}=e;y?y({type:"error",target:null,originalEvent:null,error:h}):console.error(h)}),()=>{d=!1,m&&(r?.onMapUnmount(e.id),e.reuseMaps?m.recycle():m.destroy())}},[]),ne(()=>{n&&n.setProps(e)}),s.useImperativeHandle(t,()=>c.map,[n]);const u=s.useMemo(()=>({position:"relative",width:"100%",height:"100%",...e.style}),[e.style]),l={height:"100%"};return s.createElement("div",{id:e.id,ref:a,style:u},n&&s.createElement(x.Provider,{value:c},s.createElement("div",{"mapboxgl-children":"",style:l},e.children)))}const ae=/box|flex|grid|column|lineHeight|fontWeight|opacity|order|tabSize|zIndex/;function b(e,t){if(!e||!t)return;const o=e.style;for(const r in t){const n=t[r];Number.isFinite(n)&&!ae.test(r)?o[r]=`${n}px`:o[r]=n}}function se(e,t){const{map:o,mapLib:r}=s.useContext(x),n=s.useRef({props:e});n.current.props=e;const i=s.useMemo(()=>{let w=!1;s.Children.forEach(e.children,E=>{E&&(w=!0)});const Z={...e,element:w?document.createElement("div"):null},S=new r.Marker(Z);return S.setLngLat([e.longitude,e.latitude]),S.getElement().addEventListener("click",E=>{var v,g;(g=(v=n.current.props).onClick)===null||g===void 0||g.call(v,{type:"click",target:S,originalEvent:E})}),S.on("dragstart",E=>{var v,g;const C=E;C.lngLat=i.getLngLat(),(g=(v=n.current.props).onDragStart)===null||g===void 0||g.call(v,C)}),S.on("drag",E=>{var v,g;const C=E;C.lngLat=i.getLngLat(),(g=(v=n.current.props).onDrag)===null||g===void 0||g.call(v,C)}),S.on("dragend",E=>{var v,g;const C=E;C.lngLat=i.getLngLat(),(g=(v=n.current.props).onDragEnd)===null||g===void 0||g.call(v,C)}),S},[]);s.useEffect(()=>(i.addTo(o.getMap()),()=>{i.remove()}),[]);const{longitude:a,latitude:c,offset:u,style:l,draggable:f=!1,popup:d=null,rotation:m=0,rotationAlignment:h="auto",pitchAlignment:y="auto"}=e;return s.useEffect(()=>{b(i.getElement(),l)},[l]),s.useImperativeHandle(t,()=>i,[]),(i.getLngLat().lng!==a||i.getLngLat().lat!==c)&&i.setLngLat([a,c]),u&&!$(i.getOffset(),u)&&i.setOffset(u),i.isDraggable()!==f&&i.setDraggable(f),i.getRotation()!==m&&i.setRotation(m),i.getRotationAlignment()!==h&&i.setRotationAlignment(h),i.getPitchAlignment()!==y&&i.setPitchAlignment(y),i.getPopup()!==d&&i.setPopup(d),I.createPortal(e.children,i.getElement())}s.memo(s.forwardRef(se));function D(e){return new Set(e?e.trim().split(/\s+/):[])}function ce(e,t){const{map:o,mapLib:r}=s.useContext(x),n=s.useMemo(()=>document.createElement("div"),[]),i=s.useRef({props:e});i.current.props=e;const a=s.useMemo(()=>{const c={...e},u=new r.Popup(c);return u.setLngLat([e.longitude,e.latitude]),u.once("open",l=>{var f,d;(d=(f=i.current.props).onOpen)===null||d===void 0||d.call(f,l)}),u},[]);if(s.useEffect(()=>{const c=u=>{var l,f;(f=(l=i.current.props).onClose)===null||f===void 0||f.call(l,u)};return a.on("close",c),a.setDOMContent(n).addTo(o.getMap()),()=>{a.off("close",c),a.isOpen()&&a.remove()}},[]),s.useEffect(()=>{b(a.getElement(),e.style)},[e.style]),s.useImperativeHandle(t,()=>a,[]),a.isOpen()&&((a.getLngLat().lng!==e.longitude||a.getLngLat().lat!==e.latitude)&&a.setLngLat([e.longitude,e.latitude]),e.offset&&!p(a.options.offset,e.offset)&&a.setOffset(e.offset),(a.options.anchor!==e.anchor||a.options.maxWidth!==e.maxWidth)&&(a.options.anchor=e.anchor,a.setMaxWidth(e.maxWidth)),a.options.className!==e.className)){const c=D(a.options.className),u=D(e.className);for(const l of c)u.has(l)||a.removeClassName(l);for(const l of u)c.has(l)||a.addClassName(l);a.options.className=e.className}return I.createPortal(e.children,n)}const le=s.memo(s.forwardRef(ce));function M(e,t,o,r){const n=s.useContext(x),i=s.useMemo(()=>e(n),[]);return s.useEffect(()=>{const a=t,c=null,u=typeof t=="function"?t:null,{map:l}=n;return l.hasControl(i)||(l.addControl(i,a?.position),c&&c(n)),()=>{u&&u(n),l.hasControl(i)&&l.removeControl(i)}},[]),i}function ue(e){const t=M(({mapLib:o})=>new o.AttributionControl(e),{position:e.position});return s.useEffect(()=>{b(t._container,e.style)},[e.style]),null}s.memo(ue);function fe(e){const t=M(({mapLib:o})=>new o.FullscreenControl({container:e.containerId&&document.getElementById(e.containerId)}),{position:e.position});return s.useEffect(()=>{b(t._controlContainer,e.style)},[e.style]),null}s.memo(fe);function de(e,t){const o=s.useRef({props:e}),r=M(({mapLib:n})=>{const i=new n.GeolocateControl(e),a=i._setupUI;return i._setupUI=c=>{i._container.hasChildNodes()||a(c)},i.on("geolocate",c=>{var u,l;(l=(u=o.current.props).onGeolocate)===null||l===void 0||l.call(u,c)}),i.on("error",c=>{var u,l;(l=(u=o.current.props).onError)===null||l===void 0||l.call(u,c)}),i.on("outofmaxbounds",c=>{var u,l;(l=(u=o.current.props).onOutOfMaxBounds)===null||l===void 0||l.call(u,c)}),i.on("trackuserlocationstart",c=>{var u,l;(l=(u=o.current.props).onTrackUserLocationStart)===null||l===void 0||l.call(u,c)}),i.on("trackuserlocationend",c=>{var u,l;(l=(u=o.current.props).onTrackUserLocationEnd)===null||l===void 0||l.call(u,c)}),i},{position:e.position});return o.current.props=e,s.useImperativeHandle(t,()=>r,[]),s.useEffect(()=>{b(r._container,e.style)},[e.style]),null}s.memo(s.forwardRef(de));function me(e){const t=M(({mapLib:o})=>new o.NavigationControl(e),{position:e.position});return s.useEffect(()=>{b(t._container,e.style)},[e.style]),null}const he=s.memo(me);function ge(e){const t=M(({mapLib:i})=>new i.ScaleControl(e),{position:e.position}),o=s.useRef(e),r=o.current;o.current=e;const{style:n}=e;return e.maxWidth!==void 0&&e.maxWidth!==r.maxWidth&&(t.options.maxWidth=e.maxWidth),e.unit!==void 0&&e.unit!==r.unit&&t.setUnit(e.unit),s.useEffect(()=>{b(t._container,n)},[n]),null}s.memo(ge);function T(e,t){if(!e)throw new Error(t)}function ye(e,t,o,r){if(T(o.id===r.id,"layer id changed"),T(o.type===r.type,"layer type changed"),o.type==="custom"||r.type==="custom")return;const{layout:n={},paint:i={},filter:a,minzoom:c,maxzoom:u,beforeId:l}=o;if(l!==r.beforeId&&e.moveLayer(t,l),n!==r.layout){const f=r.layout||{};for(const d in n)p(n[d],f[d])||e.setLayoutProperty(t,d,n[d]);for(const d in f)n.hasOwnProperty(d)||e.setLayoutProperty(t,d,void 0)}if(i!==r.paint){const f=r.paint||{};for(const d in i)p(i[d],f[d])||e.setPaintProperty(t,d,i[d]);for(const d in f)i.hasOwnProperty(d)||e.setPaintProperty(t,d,void 0)}p(a,r.filter)||e.setFilter(t,a),(c!==r.minzoom||u!==r.maxzoom)&&e.setLayerZoomRange(t,c,u)}function pe(e,t,o){if(e.style&&e.style._loaded&&(!("source"in o)||e.getSource(o.source))){const r={...o,id:t};delete r.beforeId,e.addLayer(r,o.beforeId)}}let ve=0;function _e(e){const t=s.useContext(x).map.getMap(),o=s.useRef(e),[,r]=s.useState(0),n=s.useMemo(()=>e.id||`jsx-layer-${ve++}`,[]);if(s.useEffect(()=>{if(t){const a=()=>r(c=>c+1);return t.on("styledata",a),a(),()=>{t.off("styledata",a),t.style&&t.style._loaded&&t.getLayer(n)&&t.removeLayer(n)}}},[t]),t&&t.style&&t.getLayer(n))try{ye(t,n,e,o.current)}catch(a){console.warn(a)}else pe(t,n,e);return o.current=e,null}let Ee=0;function Ce(e,t,o){if(e.style&&e.style._loaded){const r={...o};return delete r.id,delete r.children,e.addSource(t,r),e.getSource(t)}return null}function Se(e,t,o){T(t.id===o.id,"source id changed"),T(t.type===o.type,"source type changed");let r="",n=0;for(const a in t)a!=="children"&&a!=="id"&&!p(o[a],t[a])&&(r=a,n++);if(!n)return;const i=t.type;if(i==="geojson")e.setData(t.data);else if(i==="image")e.updateImage({url:t.url,coordinates:t.coordinates});else if("setCoordinates"in e&&n===1&&r==="coordinates")e.setCoordinates(t.coordinates);else if("setUrl"in e)switch(r){case"url":e.setUrl(t.url);break;case"tiles":e.setTiles(t.tiles);break}else console.warn(`Unable to update <Source> prop: ${r}`)}function be(e){const t=s.useContext(x).map.getMap(),o=s.useRef(e),[,r]=s.useState(0),n=s.useMemo(()=>e.id||`jsx-source-${Ee++}`,[]);s.useEffect(()=>{if(t){const a=()=>setTimeout(()=>r(c=>c+1),0);return t.on("styledata",a),a(),()=>{var c;if(t.off("styledata",a),t.style&&t.style._loaded&&t.getSource(n)){const u=(c=t.getStyle())===null||c===void 0?void 0:c.layers;if(u)for(const l of u)l.source===n&&t.removeLayer(l.id);t.removeSource(n)}}}},[t]);let i=t&&t.style&&t.getSource(n);return i?Se(i,e,o.current):i=Ce(t,n,e),o.current=e,i&&s.Children.map(e.children,a=>a&&s.cloneElement(a,{source:n}))||null}const Le=B(()=>import("./maplibre-gl-BlAng63n.js").then(e=>e.m),__vite__mapDeps([0,1])),xe=s.forwardRef(function(t,o){return ie(t,o,Le)}),Me=le,we=he,Te=_e,Re=be,ze={version:8,name:"No Color OSM",sources:{osm:{type:"raster",tiles:["https://a.tile.openstreetmap.org/{z}/{x}/{y}.png","https://b.tile.openstreetmap.org/{z}/{x}/{y}.png","https://c.tile.openstreetmap.org/{z}/{x}/{y}.png"],tileSize:256,attribution:'© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'}},layers:[{id:"osm-tiles",type:"raster",source:"osm",minzoom:0,maxzoom:21,paint:{"raster-opacity":1,"raster-saturation":-1}}]},U="map-data-source",H="location-data-points",ke={id:H,type:"circle",s
2ource:U,paint:{"circle-color":"#B45309","circle-radius":["interpolate",["linear"],["get","data"],0,3,1e4,20,5e4,30],"circle-opacity":["step",["get","data"],1,1e3,.6]}},Ke=({data:e,popupLabel:t,isLoading:o})=>{const r=s.useRef(null),[n,i]=s.useState(),[a,c]=s.useState("grab"),u=s.useCallback(m=>{const h=m.features&&m.features[0];c(h?"pointer":"grab"),i({longitude:m.lngLat.lng,latitude:m.lngLat.lat,location:h&&h.properties.location,data:h&&h.properties.data})},[]),l=m=>{if(!r.current||!m.features||m.features.length===0)return;const h=m.features[0];if(h.geometry.type!=="Point")return;const[y,w]=h.geometry.coordinates;r.current.easeTo({center:[y,w],zoom:10,duration:500})},f=n&&n.location||"",d=n&&n.data||"";return _.jsxs(xe,{ref:r,initialViewState:{longitude:7.311134207782175,latitude:25.75096966789131,zoom:.23493685642941425},maxZoom:20,mapStyle:ze,interactiveLayerIds:[H],cursor:a,style:{width:"100%",height:"500px"},onClick:l,onMouseDown:()=>c("grabbing"),onMouseMove:u,children:[o&&_.jsx("div",{className:"h-full bg-black/60 flex justify-center items-center w-full relative transition-colors",children:_.jsx(V,{})}),_.jsx(we,{position:"top-right"}),_.jsx(Re,{id:U,type:"geojson",data:{type:"FeatureCollection",features:e||[]},children:_.jsx(Te,{...ke})}),d&&n&&_.jsxs(Me,{longitude:n.longitude,latitude:n.latitude,offset:[0,-5],closeButton:!1,children:[_.jsxs("p",{children:[_.jsx("span",{className:"font-bold",children:"Location:"})," ",f]}),_.jsxs("p",{children:[_.jsxs("span",{className:"font-bold",children:[t,":"]})," ",q(d)]})]})]})};export{Ke as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.