1"use strict";(self.webpackChunktimma_marketplace=self.webpackChunktimma_marketplace||[]).push([[363],{39363:(t,e,o)=>{o.d(e,{zB:()=>O,Jx:()=>w,Pv:()=>N,GI:()=>z,ZP:()=>x,Sx:()=>s});var n=o(47313);const r=n.createContext(null);function s(){var t;const e=null===(t=(0,n.useContext)(r))||void 0===t?void 0:t.maps,o=(0,n.useContext)(C);return(0,n.useMemo)((()=>({...e,current:null===o||void 0===o?void 0:o.map})),[e,o])}function i(t){return{longitude:t.center.lng,latitude:t.center.lat,zoom:t.zoom,pitch:t.pitch,bearing:t.bearing,padding:t.padding}}function a(t,e){const o=e.viewState||e;let n=!1;if("longitude"in o&&"latitude"in o){const e=t.center;t.center=new e.constructor(o.longitude,o.latitude),n=n||e!==t.center}if("zoom"in o){const e=t.zoom;t.zoom=o.zoom,n=n||e!==t.zoom}if("bearing"in o){const e=t.bearing;t.bearing=o.bearing,n=n||e!==t.bearing}if("pitch"in o){const e=t.pitch;t.pitch=o.pitch,n=n||e!==t.pitch}return o.padding&&!t.isPaddingEqual(o.padding)&&(n=!0,t.padding=o.padding),n}const l=["type","source","source-layer","minzoom","maxzoom","filter","layout"];function c(t){if(!t)return null;if("string"===typeof t)return t;if("toJS"in t&&(t=t.toJS()),!t.layers)return t;const e={};for(const n of t.layers)e[n.id]=n;const o=t.layers.map((t=>{const o=e[t.ref];let n=null;if("interactive"in t&&(n={...t},delete n.interactive),o){n=n||{...t},delete n.ref;for(const t of l)t in o&&(n[t]=o[t])}return n||t}));return{...t,layers:o}}function u(t,e){if(t===e)return!0;if(!t||!e)return!1;if(Array.isArray(t)){if(!Array.isArray(e)||t.length!==e.length)return!1;for(let o=0;o<t.length;o++)if(!u(t[o],e[o]))return!1;return!0}if(Array.isArray(e))return!1;if("object"===typeof t&&"object"===typeof e){const o=Object.keys(t),n=Object.keys(e);if(o.length!==n.length)return!1;for(const r of o){if(!e.hasOwnProperty(r))return!1;if(!u(t[r],e[r]))return!1}return!0}return!1}const p={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"},d={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"},m={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"},f=["minZoom","maxZoom","minPitch","maxPitch","maxBounds","projection","renderWorldCopies"],h=["scrollZoom","boxZoom","dragRotate","dragPan","keyboard","doubleClickZoom","touchZoomRotate","touchPitch"];class g{constructor(t,e,o){this._map=null,this._internalUpdate=!1,this._inRender=!1,this._hoveredFeatures=null,this._deferredEvents={move:!1,zoom:!1,pitch:!1,rotate:!1},this._onEvent=t=>{const e=this.props[m[t.type]];e&&e(t)},this._onPointerEvent=t=>{"mousemove"!==t.type&&"mouseout"!==t.type||this._updateHover(t);const e=this.props[p[t.type]];if(e){if(this.props.interactiveLayerIds&&"mouseover"!==t.type&&"mouseout"!==t.type){const e=this._hoveredFeatures||this._map.queryRenderedFeatures(t.point,{layers:this.props.interactiveLayerIds});t.features=e}e(t),delete t.features}},this._onCameraEvent=t=>{if(!this._internalUpdate){const e=this.props[d[t.type]];e&&e(t)}t.type in this._deferredEvents&&(this._deferredEvents[t.type]=!1)},this._MapClass=t,this.props=e,this._initialize(o)}get map(){return this._map}get transform(){return this._renderTransform}setProps(t){const e=this.props;this.props=t;const o=this._updateSettings(t,e);o&&this._createShadowTransform(this._map);const n=this._updateSize(t),r=this._updateViewState(t,!0);this._updateStyle(t,e),this._updateStyleComponents(t,e),this._updateHandlers(t,e),(o||n||r&&!this._map.isMoving())&&this.redraw()}static reuse(t,e){const o=g.savedMaps.pop();if(!o)return null;const n=o.map,r=n.getContainer();for(e.className=r.className;r.childNodes.length>0;)e.appendChild(r.childNodes[0]);n._container=e,o.setProps({...t,styleDiffing:!1}),n.resize();const{initialViewState:s}=t;return s&&(s.bounds?n.fitBounds(s.bounds,{...s.fitBoundsOptions,duration:0}):o._updateViewState(s,!1)),n.isStyleLoaded()?n.fire("load"):n.once("styledata",(()=>n.fire("load"))),o}_initialize(t){const{props:e}=this,o={...e,...e.initialViewState,accessToken:e.mapboxAccessToken||v()||null,container:t,style:c(e.mapStyle)},n=o.initialViewState||o.viewState||o;if(Object.assign(o,{center:[n.longitude||0,n.latitude||0],zoom:n.zoom||0,pitch:n.pitch||0,bearing:n.bearing||0}),e.gl){const t=HTMLCanvasElement.prototype.getContext;HTMLCanvasElement.prototype.getContext=()=>(HTMLCanvasElement.prototype.getContext=t,e.gl)}const r=new this._MapClass(o);n.padding&&r.setPadding(n.padding),e.cursor&&(r.getCanvas().style.cursor=e.cursor),this._createShadowTransform(r);const s=r._render;r._render=t=>{this._inRender=!0,s.call(r,t),this._inRender=!1};const i=r._renderTaskQueue.run;r._renderTaskQueue.run=t=>{i.call(r._renderTaskQueue,t),this._onBeforeRepaint()},r.on("render",(()=>this._onAfterRepaint()));const a=r.fire;r.fire=this._fireEvent.bind(this,a),r.on("resize",(()=>{this._renderTransform.resize(r.transform.width,r.transform.height)})),r.on("styledata",(()=>this._updateStyleComponents(this.props,{}))),r.on("sourcedata",(()=>this._updateStyleComponents(this.props,{})));for(const l in p)r.on(l,this._onPointerEvent);for(const l in d)r.on(l,this._onCameraEvent);for(const l in m)r.on(l,this._onEvent);this._map=r}recycle(){const t=this.map.getContainer().querySelector("[mapboxgl-children]");null===t||void 0===t||t.remove(),g.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 e=function(t){const e=t.clone();return e.pixelsToGLUnits=t.pixelsToGLUnits,e}(t.transform);t.painter.transform=e,this._renderTransform=e}_updateSize(t){const{viewState:e}=t;if(e){const t=this._map;if(e.width!==t.transform.width||e.height!==t.transform.height)return t.resize(),!0}return!1}_updateViewState(t,e){if(this._internalUpdate)return!1;const o=this._map,n=this._renderTransform,{zoom:r,pitch:s,bearing:l}=n,c=o.isMoving();c&&(n.cameraElevationReference="sea");const u=a(n,{...i(o.transform),...t});if(c&&(n.cameraElevationReference="ground"),u&&e){const t=this._deferredEvents;t.move=!0,t.zoom||(t.zoom=r!==n.zoom),t.rotate||(t.rotate=l!==n.bearing),t.pitch||(t.pitch=s!==n.pitch)}return c||a(o.transform,t),u}_updateSettings(t,e){const o=this._map;let n=!1;for(const r of f)r in t&&!u(t[r],e[r])&&(n=!0,o["set".concat(r[0].toUpperCase()).concat(r.slice(1))](t[r]));return n}
1_updateStyle(t,e){if(t.cursor!==e.cursor&&(this._map.getCanvas().style.cursor=t.cursor),t.mapStyle!==e.mapStyle){const e={diff:t.styleDiffing};return"localIdeographFontFamily"in t&&(e.localIdeographFontFamily=t.localIdeographFontFamily),this._map.setStyle(c(t.mapStyle),e),!0}return!1}_updateStyleComponents(t,e){const o=this._map;let n=!1;return o.style.loaded()&&("light"in t&&!u(t.light,e.light)&&(n=!0,o.setLight(t.light)),"fog"in t&&!u(t.fog,e.fog)&&(n=!0,o.setFog(t.fog)),"terrain"in t&&!u(t.terrain,e.terrain)&&(t.terrain&&!o.getSource(t.terrain.source)||(n=!0,o.setTerrain(t.terrain)))),n}_updateHandlers(t,e){const o=this._map;let n=!1;for(const r of h){const s=t[r];u(s,e[r])||(n=!0,s?o[r].enable(s):o[r].disable())}return n}_updateHover(t){var e;const{props:o}=this;if(o.interactiveLayerIds&&(o.onMouseMove||o.onMouseEnter||o.onMouseLeave)){const r=t.type,s=(null===(e=this._hoveredFeatures)||void 0===e?void 0:e.length)>0;let i;if("mousemove"===r)try{i=this._map.queryRenderedFeatures(t.point,{layers:o.interactiveLayerIds})}catch(n){i=[]}else i=[];const a=i.length>0;!a&&s&&(t.type="mouseleave",this._onPointerEvent(t)),this._hoveredFeatures=i,a&&!s&&(t.type="mouseenter",this._onPointerEvent(t)),t.type=r}else this._hoveredFeatures=null}_fireEvent(t,e,o){const n=this._map,r=n.transform,s="string"===typeof e?e:e.type;return"move"===s&&this._updateViewState(this.props,!1),s in d&&("object"===typeof e&&(e.viewState=i(r)),this._map.isMoving())?(n.transform=this._renderTransform,t.call(n,e,o),n.transform=r,n):(t.call(n,e,o),n)}_onBeforeRepaint(){const t=this._map;this._internalUpdate=!0;for(const o in this._deferredEvents)this._deferredEvents[o]&&t.fire(o);this._internalUpdate=!1;const e=this._map.transform;this._map.transform=this._renderTransform,this._onAfterRepaint=()=>{this._map.transform=e}}}function v(){let t=null;if("undefined"!==typeof location){const e=/access_token=([^&\/]*)/.exec(location.search);t=e&&e[1]}try{t=t||{NODE_ENV:"production",PUBLIC_URL:"",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0,REACT_APP_BUILD_ENV:"production"}.MapboxAccessToken}catch(e){}try{t=t||{NODE_ENV:"production",PUBLIC_URL:"",WDS_SOCKET_HOST:void 0,WDS_SOCKET_PATH:void 0,WDS_SOCKET_PORT:void 0,FAST_REFRESH:!0,REACT_APP_BUILD_ENV:"production"}.REACT_APP_MAPBOX_ACCESS_TOKEN}catch(o){}return t}g.savedMaps=[];const y=["setMaxBounds","setMinZoom","setMaxZoom","setMinPitch","setMaxPitch","setRenderWorldCopies","setProjection","setStyle","addSource","removeSource","addLayer","removeLayer","setLayerZoomRange","setFilter","setPaintProperty","setLayoutProperty","setLight","setTerrain","setFog","remove"];function _(t,e){if(!t)return null;const o=t.map,n={getMap:()=>o,getCenter:()=>t.transform.center,getZoom:()=>t.transform.zoom,getBearing:()=>t.transform.bearing,getPitch:()=>t.transform.pitch,getPadding:()=>t.transform.padding,getBounds:()=>t.transform.getBounds(),project:o=>t.transform.locationPoint(e.LngLat.convert(o)),unproject:o=>t.transform.pointLocation(e.Point.convert(o)),queryTerrainElevation:(e,n)=>{const r=o.transform;o.transform=t.transform;const s=o.queryTerrainElevation(e,n);return o.transform=r,s}};for(const r of function(t){const e=new Set;let o=t;for(;o;
1){for(const n of Object.getOwnPropertyNames(o))"_"!==n[0]&&"function"===typeof t[n]&&"fire"!==n&&"setEventedParent"!==n&&e.add(n);o=Object.getPrototypeOf(o)}return Array.from(e)}(o))r in n||y.includes(r)||(n[r]=o[r].bind(o));return n}const E="undefined"!==typeof document?n.useLayoutEffect:n.useEffect,S=["baseApiUrl","maxParallelImageRequests","workerClass","workerCount","workerUrl"];const C=n.createContext(null),L={minZoom:0,maxZoom:22,minPitch:0,maxPitch:60,scrollZoom:!0,boxZoom:!0,dragRotate:!0,dragPan:!0,keyboard:!0,doubleClickZoom:!0,touchZoomRotate:!0,touchPitch:!0,mapStyle:{version:8,sources:{},layers:[]},styleDiffing:!0,projection:"mercator",renderWorldCopies:!0,onError:t=>console.error(t.error),RTLTextPlugin:"https://api.mapbox.com/mapbox-gl-js/plugins/mapbox-gl-rtl-text/v0.2.3/mapbox-gl-rtl-text.js"},b=(0,n.forwardRef)(((t,e)=>{const s=(0,n.useContext)(r),[i,a]=(0,n.useState)(null),l=(0,n.useRef)(),{current:c}=(0,n.useRef)({mapLib:null,map:null});(0,n.useEffect)((()=>{const e=t.mapLib;let n,r=!0;return Promise.resolve(e||o.e(310).then(o.t.bind(o,64310,19))).then((e=>{if(r){if(e.Map||(e=e.default),!e||!e.Map)throw new Error("Invalid mapLib");if(!e.supported(t))throw new Error("Map is not supported by this browser");!function(t,e){for(const o of S)o in e&&(t[o]=e[o]);e.RTLTextPlugin&&t.getRTLTextPluginStatus&&"unavailable"===t.getRTLTextPluginStatus()&&t.setRTLTextPlugin(e.RTLTextPlugin,(t=>{t&&console.error(t)}),!1)}(e,t),t.reuseMaps&&(n=g.reuse(t,l.current)),n||(n=new g(e.Map,t,l.current)),c.map=_(n,e),c.mapLib=e,a(n),null===s||void 0===s||s.onMapMount(c.map,t.id)}})).catch((e=>{t.onError({type:"error",target:null,originalEvent:null,error:e})})),()=>{r=!1,n&&(null===s||void 0===s||s.onMapUnmount(t.id),t.reuseMaps?n.recycle():n.destroy())}}),[]),E((()=>{i&&i.setProps(t)})),(0,n.useImperativeHandle)(e,(()=>c.map),[i]);const u=(0,n.useMemo)((()=>({position:"relative",width:"100%",height:"100%",...t.style})),[t.style]);return n.createElement("div",{id:t.id,ref:l,style:u},i&&n.createElement(C.Provider,{value:c},n.createElement("div",{"mapboxgl-children":""},t.children)))}));b.displayName="Map",b.defaultProps=L;const x=b;var P=o(1168);const T=/box|flex|grid|column|lineHeight|fontWeight|opacity|order|tabSize|zIndex/;function M(t,e){if(!t||!e)return;const o=t.style;for(const n in e){const t=e[n];Number.isFinite(t)&&!T.test(n)?o[n]="".concat(t,"px"):o[n]=t}}function R(t){const{map:e,mapLib:o}=(0,n.useContext)(C),r=(0,n.useRef)({props:t});r.current.props=t;const s=(0,n.useMemo)((()=>{let e=!1;n.Children.forEach(t.children,(t=>{t&&(e=!0)}));const i={...t,element:e?document.createElement("div"):null},a=new o.Marker(i).setLngLat([t.longitude,t.latitude]);return a.getElement().addEventListener("click",(t=>{var e,o;null===(o=(e=r.current.props).onClick)||void 0===o||o.call(e,{type:"click",target:a,originalEvent:t})})),a.on("dragstart",(t=>{var e,o;const n=t;n.lngLat=s.getLngLat(),null===(o=(e=r.current.props).onDragStart)||void 0===o||o.call(e,n)})),a.on("drag",(t=>{var e,o;const n=t;n.lngLat=s.getLngLat(),null===(o=(e=r.current.props).onDrag)||void 0===o||o.call(e,n)})),a.on("dragend",(t=>{var e,o;const n=t;n.lngLat=s.getLngLat(),null===(o=(e=r.current.props).onDragEnd)||void 0===o||o.call(e,n)})),a}),[]);return(0,n.useEffect)((()=>(s.addTo(e.getMap()),()=>{s.remove()})),[]),(0,n.useEffect)((()=>{M(s.getElement(),t.style)}),[t.style]),s.getLngLat().lng===t.longitude&&s.getLngLat().lat===t.latitude||s.setLngLat([t.longitude,t.latitude]),t.offset&&!function(t,e){const o=Array.isArray(t)?t[0]:t?t.x:0,n=Array.isArray(t)?t[1]:t?t.y:0,r=Array.isArray(e)?e[0]:e?e.x:0,s=Array.isArray(e)?e[1]:e?e.y:0;return o===r&&n===s}(s.getOffset(),t.offset)&&s.setOffset(t.offset),s.isDraggable()!==t.draggable&&s.setDraggable(t.draggable),s.getRotation()!==t.rotation&&s.setRotation(t.rotation),s.getRotationAlignment()!==t.rotationAlignment&&s.setRotationAlignment(t.rotationAlignment),s.getPitchAlignment()!==t.pitchAlignment&&s.setPitchAlignment(t.pitchAlignment),s.getPopup()!==t.popup&&s.setPopup(t.popup),(0,P.createPortal)(t.children,s.getElement())}R.defaultProps={draggable:!1,popup:null,rotation:0,rotationAlignment:"auto",pitchAlignment:"auto"};const w=n.memo(R);function A(t){return new Set(t?t.trim().split(/\s+/):[])}const z=n.memo((function(t){const{map:e,mapLib:o}=(0,n.useContext)(C),r=(0,n.useMemo)((()=>document.createElement("div")),[]),s=(0,n.useRef)({props:t});s.current.props=t;const i=(0,n.useMemo)((()=>{const e={...t},n=new o.Popup(e).setLngLat([t.longitude,t.latitude]);return n.once("open",(t=>{var e,o;null===(o=(e=s.current.props).onOpen)||void 0===o||o.call(e,t)})),n}),[]);if((0,n.useEffect)((()=>{const t=t=>{var e,o;null===(o=(e=s.current.props).onClose)||void 0===o||o.call(e,t)};return i.on("close",t),i.setDOMContent(r).addTo(e.getMap()),()=>{i.off("close",t),i.isOpen()&&i.remove()}}),[]),(0,n.useEffect)((()=>{M(i.getElement(),t.style)}
1),[t.style]),i.isOpen()&&(i.getLngLat().lng===t.longitude&&i.getLngLat().lat===t.latitude||i.setLngLat([t.longitude,t.latitude]),t.offset&&!u(i.options.offset,t.offset)&&i.setOffset(t.offset),i.options.anchor===t.anchor&&i.options.maxWidth===t.maxWidth||(i.options.anchor=t.anchor,i.setMaxWidth(t.maxWidth)),i.options.className!==t.className)){const e=A(i.options.className),o=A(t.className);for(const t of e)o.has(t)||i.removeClassName(t);for(const t of o)e.has(t)||i.addClassName(t);i.options.className=t.className}return(0,P.createPortal)(t.children,r)}));const k=function(t,e,o,r){const s=(0,n.useContext)(C),i=(0,n.useMemo)((()=>t(s)),[]);return(0,n.useEffect)((()=>{const t=r||o||e,n="function"===typeof e&&"function"===typeof o?e:null,a="function"===typeof o?o:"function"===typeof e?e:null,{map:l}=s;return l.hasControl(i)||(l.addControl(i,null===t||void 0===t?void 0:t.position),n&&n(s)),()=>{a&&a(s),l.hasControl(i)&&l.removeControl(i)}}),[]),i};const O=n.memo((function(t){const e=k((e=>{let{mapLib:o}=e;return new o.AttributionControl(t)}),{position:t.position});return(0,n.useEffect)((()=>{M(e._container,t.style)}),[t.style]),null}));n.memo((function(t){const e=k((e=>{let{mapLib:o}=e;return new o.FullscreenControl({container:t.containerId&&document.getElementById(t.containerId)})}),{position:t.position});return(0,n.useEffect)((()=>{M(e._controlContainer,t.style)}),[t.style]),null}));const D=(0,n.forwardRef)(((t,e)=>{const o=(0,n.useRef)({props:t}),r=k((e=>{let{mapLib:n}=e;const r=new n.GeolocateControl(t),s=r._setupUI;return r._setupUI=t=>{r._container.hasChildNodes()||s(t)},r.on("geolocate",(t=>{var e,n;null===(n=(e=o.current.props).onGeolocate)||void 0===n||n.call(e,t)})),r.on("error",(t=>{var e,n;null===(n=(e=o.current.props).onError)||void 0===n||n.call(e,t)})),r.on("outofmaxbounds",(t=>{var e,n;null===(n=(e=o.current.props).onOutOfMaxBounds)||void 0===n||n.call(e,t)})),r.on("trackuserlocationstart",(t=>{var e,n;null===(n=(e=o.current.props).onTrackUserLocationStart)||void 0===n||n.call(e,t)})),r.on("trackuserlocationend",(t=>{var e,n;null===(n=(e=o.current.props).onTrackUserLocationEnd)||void 0===n||n.call(e,t)})),r}),{position:t.position});return o.current.props=t,(0,n.useImperativeHandle)(e,(()=>({trigger:()=>r.trigger()})),[]),(0,n.useEffect)((()=>{M(r._container,t.style)}),[t.style]),null}));D.displayName="GeolocateControl";n.memo(D);const N=n.memo((function(t){const e=k((e=>{let{mapLib:o}=e;return new o.NavigationControl(t)}),{position:t.position});return(0,n.useEffect)((()=>{M(e._container,t.style)}),[t.style]),null}));function I(t){const e=k((e=>{let{mapLib:o}=e;return new o.ScaleControl(t)}),{position:t.position});return e.options.unit===t.unit&&e.options.maxWidth===t.maxWidth||(e.options.maxWidth=t.maxWidth,e.setUnit(t.unit)),(0,n.useEffect)((()=>{M(e._container,t.style)}),[t.style]),null}I.defaultProps={unit:"metric",maxWidth:100};n.memo(I)}}]);
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.