PageSourceSearch

https://fieldcalc.app/_next/static/chunks/8156.79255d78a830d013.js

js fieldcalc.app collected 2026-10-02 00:27:10 UTC 34,461 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8156],{68156:function(t,e,n){n.r(e),n.d(e,{default:function(){return tp}});var l=n(57437),o=n(68369),i=n(32679),a=n(81726),r=n(74401),s=n(17727),c=n(20755),u=n(60759),d=n.n(u);n(35046);{let t=window;t.L||(t.L=d());let e=d().Map.TouchZoom;n(8543);let l=d().Renderer,o=l.prototype.getEvents;l.include({getEvents:function(){let t=o.apply(this,arguments);return t.rotate=this._reset,t}});let i=d().Map.Drag,a=i.prototype._onDragStart,r=i.prototype._onPreDragLimit;i.include({_onDragStart:function(){let t=a.apply(this,arguments),e=this._map;if(this._rotatedLimit=null,!e._rotate||!e._bearing||!this._offsetLimit)return t;let n=d().latLngBounds(e.options.maxBounds),l=d().bounds(e.latLngToLayerPoint(n.getNorthWest()),e.latLngToLayerPoint(n.getSouthEast())),o=e.getSize(),i=d().bounds([[0,0],[o.x,0],[0,o.y],[o.x,o.y]].map(t=>e.containerPointToLayerPoint(t)));return this._rotatedLimit={bearing:e._bearing,lo:i.max.subtract(l.max),hi:i.min.subtract(l.min)},t},_onPreDragLimit:function(){let t=this._rotatedLimit;if(!this._viscosity||!t)return r.apply(this,arguments);let e=this._draggable._newPos.subtract(this._draggable._startPos).rotate(-t.bearing);for(let n of["x","y"])!(t.lo[n]>t.hi[n])&&(e[n]<t.lo[n]?e[n]=this._viscousLimit(e[n],t.lo[n]):e[n]>t.hi[n]&&(e[n]=this._viscousLimit(e[n],t.hi[n])));this._draggable._newPos=this._draggable._startPos.add(e.rotate(t.bearing))}}),e&&d().Map.addInitHook(function(){for(let t of this._handlers)t!==this.touchZoom&&t instanceof e&&t.disable()}),d().Map.TouchGestures.include({_onTouchEnd:function(){let t=this._moved&&(this._zooming||this._rotating);this._zooming=!1,this._rotating=!1,d().Util.cancelAnimFrame(this._animRequest);let e=document;if(d().DomEvent.off(e,"touchmove",this._onTouchMove,this).off(e,"touchend touchcancel",this._onTouchEnd,this),!t||!this.zoom)return;let n=this._map;n.options.zoomAnimation?n._animateZoom(this._center,n._limitZoom(this._zoom),!0,n.options.zoomSnap):n._resetView(this._center,n._limitZoom(this._zoom))}})}var g=n(2265),p=n(73479),h=n(56346);function m(t){let{mapType:e}=t;return(0,l.jsx)(p.I,{attribution:h.FU,url:h.WV[e],subdomains:h.Xf,maxNativeZoom:h.Vh,maxZoom:h.py,noWrap:!0,detectRetina:!0},e)}function f(){let t=(0,i.Sx)();return(0,g.useEffect)(()=>{let e=d().latLngBounds(h.FB),n=()=>{let n=t.getBoundsZoom(e,!0);Number.isFinite(n)&&(t.setMinZoom(n),t.getZoom()<n&&t.setZoom(n))};n();let l=new ResizeObserver(n);return l.observe(t.getContainer()),()=>l.disconnect()},[t]),null}var x=n(24989),v=n(6861),y=n(1081),b=n(1592);function j(t){return t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")}function L(t,e){let n=j(t);return'<span class="map-measurement-icon-glyph" style="width:'.concat(e,"px;height:").concat(e,"px;--map-icon-url:url(&quot;").concat(n,'&quot;)"></span>')}var k=n(13553);let w=function(t,e){let n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],l=String(e),o=n?26:22,i=l.length<=2?o:7*l.length+12,a=i+18,r=o+18,s=(0,x.B5)(t);return d().divIcon({className:"",html:'<div style="width:'.concat(a,"px;height:").concat(r,'px;display:flex;align-items:center;justify-content:center;"><div style="background:').concat(t,";width:").concat(i,"px;height:").concat(o,"px;border:2.5px solid #fff;border-radius:").concat(o/2,"px;box-shadow:").concat(n?"0 0 0 3px #456efe,0 2px 8px rgba(0,0,0,.45)":"0 1px 3px rgba(0,0,0,.4)",";display:grid;place-items:center;color:").concat(s,";font-size:").concat(n?11:10,'px;font-weight:700;line-height:1;cursor:grab">').concat(l,"</div></div>"),iconSize:[a,r],iconAnchor:[a/2,r/2]})},M=()=>d().divIcon({className:"",html:'<div style="width:'.concat(30,"px;height:").concat(30,'px;display:flex;align-items:center;justify-content:center;"><div style="background:#ffffff;width:').concat(12,"px;height:").concat(12,'px;border:2px solid #e11d1d;border-radius:50%;box-shadow:0 0 0 1px rgba(255,255,255,.9),0 1px 3px rgba(0,0,0,.5);cursor:copy"></div></div>'),iconSize:[30,30],iconAnchor:[15,15]});function C(t,e){if(!e||"poi"===e||t.length<2)return[];let n=[],l="area"===e&&t.length>=3?t.length:t.length-1;for(let e=0;e<l;e++){let l=t[e],o=t[(e+1)%t.length];n.push({pos:[(l.lat+o.lat)/2,(l.lng+o.lng)/2],insertAfter:e})}return n}let E=[24,32],_=[12,32],S=(t,e)=>'<circle cx="12" cy="12" r="6.5" fill="#fff" stroke="'.concat(j(e),'" stroke-width="1.3"/>')+'<foreignObject x="6.5" y="6.5" width="11" height="11">'+'<div xmlns="http://www.w3.org/1999/xhtml" style="--map-icon-color:'.concat(j(e),'">').concat(L(t,11),"</div>")+"</foreignObject>",z=(t,e)=>t?S(t,e):'<circle cx="12" cy="12" r="4" fill="rgba(0,0,0,.28)"/>',T=(t,e,n)=>'<svg width="24" height="32" viewBox="0 0 24 32" xmlns="http://www.w3.org/2000/svg" style="filter:drop-shadow(0 1px 2px rgba(0,0,0,.5))'.concat(e?";cursor:".concat(e):"",'"><path d="M12 0C5.373 0 0 5.373 0 12c0 9 12 20 12 20s12-11 12-20c0-6.627-5.373-12-12-12z" fill="').concat(t,'"/>').concat(z(n,t),"</svg>"),O=new Map,P=(t,e)=>{let n="".concat(t,"|").concat(null!=e?e:""),l=O.get(n);return l||(l=d().divIcon({className:"",html:T(t,void 0,e),iconSize:E,iconAnchor:_}),O.set(n,l)),l},I=new Map,A=(t,e)=>{let n="".concat(t,"|").concat(null!=e?e:""),l=I.get(n);return l||(l=d().divIcon({className:"",html:T(t,"grab",e),iconSize:E,iconAnchor:_}),I.set(n,l)),l},B=new Map,N=(t,e)=>{let n="".concat(t,"|").concat(null!=e?e:""),l=B.get(n);if(!l){let o=e?S(e,t):'<circle cx="12" cy="12" r="4.5" fill="#fff"/>';l=d().divIcon({className:"",html:'<svg width="32" height="43" viewBox="0 0 24 32" xmlns="http://www.w3.org/2000/svg" style="filter:drop-shadow(0 2px 4px rgba(0,0,0,.6))"><path d="M12 0C5.373 0 0 5.373 0 12c0 9 12 20 12 20s12-11 12-20c0-6.627-5.373-12-12-12z" fill="'.concat(t,'"/>').concat(o,"</svg>"),iconSize:[32,43],iconAnchor:[16,43]}),B.set(n,l)}return l},D=new Map,R=t=>{let e=D.get(t);return e||(e=d().divIcon({className:"",html:'<div style="width:30px;height:30px;position:relative;pointer-events:none">'+'<div style="position:absolute;inset:0;border-radius:9999px;background:'.concat(t,';opacity:.28"></div>')+'<div style="position:absolute;inset:9px;border-radius:9999px;background:'.concat(t,';border:2px solid #fff;box-shadow:0 1px 3px rgba(0,0,0,.5)"></div>')+"</div>",iconSize:[30,30],iconAnchor:[15,15]}),D.set(t,e)),e},Z=new Map,W=function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,l=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,o="".concat(t,"|").concat(e,"|").concat(n,"|").concat(l),i=Z.get(o);
1return i||(i=d().divIcon({className:"",html:'<div class="map-edge-label" style="transform:translate(calc(-50% + '.concat(e,"px),calc(-50% + ").concat(n,"px)) rotate(").concat(l,'deg)">').concat(t,"</div>"),iconSize:[0,0],iconAnchor:[0,0]}),Z.size>300&&Z.clear(),Z.set(o,i)),i};function J(t,e,n,l,o,i){var a;t.setLatLng([e.lat,e.lng]);let r=null===(a=t.getElement())||void 0===a?void 0:a.firstElementChild;r&&(r.style.transform="translate(calc(-50% + ".concat(l,"px),calc(-50% + ").concat(o,"px)) rotate(").concat(i,"deg)"),r.textContent!==n&&(r.textContent=n))}let F=new Map,U=(t,e,n,l)=>{var o,i,a,r;let s="".concat(t,"|").concat(e,"|").concat(null!=n?n:"","|").concat(null!=l?l:""),c=F.get(s);return c||(c=d().divIcon({className:"",html:(o=t,i=e,a=n,r=l,'<div class="map-measurement-badge" style="transform:translate(-50%,-50%)">'+(a?'<span class="map-measurement-badge-icon" style="--map-icon-color:'.concat(j(r||x.nS),'">').concat(L(a,18),"</span>"):"")+(o?(()=>{let t=j(o);return'<div class="map-measurement-badge-name" data-text="'.concat(t,'">').concat(t,"</div>")})():"")+(i?(()=>{let t=j(i);return'<div class="map-measurement-badge-value" data-text="'.concat(t,'">').concat(t,"</div>")})():"")+"</div>"),iconSize:[0,0],iconAnchor:[0,0]}),F.size>300&&F.clear(),F.set(s,c)),c},V=d().divIcon({className:"",html:'<div class="user-location-dot"><div class="user-location-ring"></div><div class="user-location-core"></div></div>',iconSize:[20,20],iconAnchor:[10,10]});function H(t,e,n,l,o){let i=Math.min(0,.28*o);return{dx:15*t+n*i,dy:15*e+l*i}}function q(t){let e=((t+180)%360+360)%360-180;return e>90?e-=180:e<=-90&&(e+=180),e}function X(t,e,n){if(!n)return{dx:t,dy:e};let l=n*Math.PI/180,o=Math.cos(l),i=Math.sin(l);return{dx:t*o-e*i,dy:t*i+e*o}}function Y(t,e,n,l){let o=Math.cos(n.lat*Math.PI/180),i=(e.lng-t.lng)*o,a=-(e.lat-t.lat),r=Math.hypot(i,a)||1,s=-a/r,c=i/r;return l?(n.lng-l.lng)*o*s+-(c*(n.lat-l.lat))<0&&(s=-s,c=-c):c>0&&(s=-s,c=-c),{px:s,py:c,ux:i/r,uy:a/r,rawAngle:180*Math.atan2(a,i)/Math.PI}}function G(t,e,n,l){if("poi"===e||t.length<2)return[];let o=[];for(let e=0;e<t.length-1;e++)o.push([t[e],t[e+1]]);"area"===e&&t.length>=3&&o.push([t[t.length-1],t[0]]);let i="area"===e&&t.length>=3?{lat:t.reduce((t,e)=>t+e.lat,0)/t.length,lng:t.reduce((t,e)=>t+e.lng,0)/t.length}:null;return o.map((t,e)=>{let[o,a]=t,r={lat:(o.lat+a.lat)/2,lng:(o.lng+a.lng)/2},s=(0,v.cu)([o,a]),{px:c,py:u,ux:d,uy:g,rawAngle:p}=Y(o,a,r,i);return{edgeIndex:e,a:o,b:a,mid:r,text:l.distanceShort(s,n),px:c,py:u,ux:d,uy:g,rawAngle:p}})}function K(t,e,n,l,o,i,a){let r=t.length,s={lat:t[e][0],lng:t[e][1]},c={lat:t[(e+1)%r][0],lng:t[(e+1)%r][1]},u={lat:(s.lat+c.lat)/2,lng:(s.lng+c.lng)/2},d=l?{lat:t.reduce((t,e)=>t+e[0],0)/r,lng:t.reduce((t,e)=>t+e[1],0)/r}:null,g=(0,v.cu)([s,c]),{px:p,py:h,ux:m,uy:f,rawAngle:x}=Y(s,c,u,d),{dx:y,dy:b}=H(p,h,m,f,a?a.latLngToContainerPoint([s.lat,s.lng]).distanceTo(a.latLngToContainerPoint([c.lat,c.lng])):1/0),{dx:j,dy:L}=X(y,b,i);return{mid:u,text:o.distanceShort(g,n),dx:j,dy:L,angle:q(x+i)}}function Q(t,e,n){let l=n?e:e-1,o=new Set;return t-1>=0&&t-1<l&&o.add(t-1),t<l&&o.add(t),n&&0===t&&o.add(l-1),Array.from(o)}function $(t,e){return Math.abs(t[0]-e[0])<t[2]+e[2]&&Math.abs(t[1]-e[1])<t[3]+e[3]}function tt(t,e){(0,g.useEffect)(()=>(t.on("rotate",e),()=>{t.off("rotate",e)}),[t,e])}function te(t,e){let n=[],l=e.getBearing?e.getBearing():0,o=[];for(let i of t){let t=e.latLngToContainerPoint([i.a.lat,i.a.lng]),a=e.latLngToContainerPoint([i.b.lat,i.b.lng]),r=Math.hypot(t.x-a.x,t.y-a.y);if(r<60)continue;let s=e.latLngToContainerPoint([i.mid.lat,i.mid.lng]),c=q(i.rawAngle+l),u=H(i.px,i.py,i.ux,i.uy,r),{dx:d,dy:g}=X(u.dx,u.dy,l),p=s.x+d,h=s.y+g,[m,f]=function(t,e,n){let l=n*Math.PI/180,o=Math.abs(Math.cos(l)),i=Math.abs(Math.sin(l));return[46*o+15*i,46*i+15*o]}(0,0,c),x=[p,h,m,f];n.some(t=>$(t,x))||(n.push(x),o.push({edgeIndex:i.edgeIndex,mid:i.mid,text:i.text,dx:d,dy:g,angle:c}))}return o}function tn(t,e,n){return t.map(t=>(0,l.jsx)(o.J,{ref:n?e=>{n.current[t.edgeIndex]=e}:void 0,position:[t.mid.lat,t.mid.lng],icon:W(t.text,t.dx,t.dy,t.angle),interactive:!1,zIndexOffset:700},"".concat(e,"-").concat(t.edgeIndex)))}function tl(t){let{editPts:e,selectedType:n,selectedPerimUnit:o,selectedDistUnit:a,labelRefs:r}=t,s=(0,i.Sx)(),{t:c,locale:u}=(0,b.NT)(),d=(0,g.useMemo)(()=>(0,y.SW)(c,u),[c,u]),[p,h]=(0,g.useState)(0),m=(0,g.useRef)(0),f=(0,g.useCallback)(()=>{m.current+=1,h(m.current)},[]);(0,i.zV)({zoomend:f,moveend:f}),tt(s,f),(0,g.useEffect)(()=>{f()},[f]);let x=(0,g.useMemo)(()=>
1{if(!e||!n||"poi"===n||(0,v.D0)(n,e))return[];let t="area"===n?o:a;return G(e,n,t,d)},[e,n,o,a,d]),j=(0,g.useMemo)(()=>s&&0!==x.length?te(x,s):[],[x,s,p]);return(0,l.jsx)(l.Fragment,{children:tn(j,"sel-edge",r)})}function to(t){let{points:e,type:n,unit:o,labelRefs:a}=t,r=(0,i.Sx)(),{t:s,locale:c}=(0,b.NT)(),u=(0,g.useMemo)(()=>(0,y.SW)(s,c),[s,c]),[d,p]=(0,g.useState)(0),h=(0,g.useRef)(0),m=(0,g.useCallback)(()=>{h.current+=1,p(h.current)},[]);(0,i.zV)({zoomend:m,moveend:m}),tt(r,m),(0,g.useEffect)(()=>{m()},[m]);let f=(0,g.useMemo)(()=>G(e,n,o,u),[e,n,o,u]),x=(0,g.useMemo)(()=>r&&0!==f.length?te(f,r):[],[f,r,d]);return(0,l.jsx)(l.Fragment,{children:tn(x,"edge",a)})}function ti(t){let{measurements:e,groups:n,selectedSavedId:a,selectedEditPts:r,isEditingSelected:s}=t,c=(0,i.Sx)(),{t:u,locale:d}=(0,b.NT)(),p=(0,g.useMemo)(()=>(0,y.SW)(u,d),[u,d]),[h,m]=(0,g.useState)(0),f=(0,g.useRef)(0),j=(0,g.useCallback)(()=>{f.current+=1,m(f.current)},[]);(0,i.zV)({zoom:j,zoomend:j,move:j,moveend:j}),tt(c,j),(0,g.useEffect)(()=>{j()},[j]);let L=(0,g.useMemo)(()=>e.filter(t=>"area"===t.type?t.points.length>=2:"distance"===t.type&&t.points.length>=2&&!!(0,k.EZ)(t.icon)),[e]),w=(0,g.useMemo)(()=>{if(!c||0===L.length)return[];let t=[];for(let e of L){let l=e.id===a&&r?r:e.points,o=(0,k.EZ)(e.icon),i=(0,x.MJ)(n.find(t=>t.id===e.groupId));if("area"===e.type){if(l.length<2)continue;let n=(0,v.D0)(e.type,l),s=n?l[0].lat:l.reduce((t,e)=>t+e.lat,0)/l.length,d=n?l[0].lng:l.reduce((t,e)=>t+e.lng,0)/l.length,g=n?(0,v.WL)(l):l;if(g.length<3)continue;let h=g.map(t=>c.latLngToContainerPoint([t.lat,t.lng])),m=h.map(t=>t.x),f=h.map(t=>t.y),x=Math.max(...m)-Math.min(...m),y=Math.max(...f)-Math.min(...f);if(x<96||y<44)continue;let b=c.latLngToContainerPoint([s,d]),j=p.areaShort(e.id===a&&r?(0,v.q8)(r).areaSqMeters:e.areaSqMeters,e.areaUnit);t.push({id:e.id,position:[s,d],name:e.name||u("measure.list.untitled"),value:j,iconUrl:o,color:i,cx:b.x,cy:b.y,area:x*y,iconOnly:!1})}else{if(e.id===a&&s||l.length<2)continue;let n=l[0],r=c.latLngToContainerPoint([n.lat,n.lng]);t.push({id:e.id,position:[n.lat,n.lng],name:"",value:"",iconUrl:o,color:i,cx:r.x,cy:r.y,area:1/0,iconOnly:!0})}}t.sort((t,e)=>t.id===a?-1:e.id===a?1:e.area-t.area);let e=[],l=[];for(let n of t){let t=n.iconOnly?15:n.iconUrl?30:16,o=n.iconOnly?15:56,i=[n.cx,n.cy,o,t];e.some(t=>$(t,i))||(e.push(i),l.push({id:n.id,position:n.position,name:n.name,value:n.value,iconUrl:n.iconUrl,color:n.color}))}return l},[L,n,c,a,r,s,h]);return(0,l.jsx)(l.Fragment,{children:w.map(t=>(0,l.jsx)(o.J,{position:t.position,icon:U(t.name,t.value,t.iconUrl,t.color),interactive:!1,zIndexOffset:t.id===a?960:950},"badge-".concat(t.id)))})}function ta(t){let{measurements:e,groups:n}=t,a=(0,i.Sx)(),[r,s]=(0,g.useState)(0),c=(0,g.useRef)(0),u=(0,g.useCallback)(()=>{c.current+=1,s(c.current)},[]);(0,i.zV)({zoomend:u,moveend:u}),tt(a,u),(0,g.useEffect)(()=>{u()},[u]);let d=(0,g.useMemo)(()=>{if(!a)return[];let t=[];for(let l of e){if("poi"===l.type||l.points.length<2)continue;let e=l.points.map(t=>a.latLngToContainerPoint([t.lat,t.lng])),o=e.map(t=>t.x),i=e.map(t=>t.y);if(Math.max(Math.max(...o)-Math.min(...o),Math.max(...i)-Math.min(...i))>=44)continue;let r=l.points.reduce((t,e)=>t+e.lat,0)/l.points.length,s=l.points.reduce((t,e)=>t+e.lng,0)/l.points.length,c=(0,x.MJ)(n.find(t=>t.id===l.groupId));t.push({id:l.id,position:[r,s],color:c})}return t},[a,e,n,r]);return(0,l.jsx)(l.Fragment,{children:d.map(t=>(0,l.jsx)(o.J,{position:t.position,icon:R(t.color),interactive:!1,zIndexOffset:985},"beacon-".concat(t.id)))})}function tr(t){let{measurements:e,onLocate:n,locationStatus:o,userLocation:a,onMapTypeClick:r,onHelp:s,onDetails:c,onFit:u,onSearch:p,panelOpen:m}=t,f=(0,i.Sx)(),{t:x}=(0,b.NT)(),v=(0,g.useRef)(null);(0,g.useEffect)(()=>{if(!v.current)return;let t=v.current;d().DomEvent.disableClickPropagation(t),d().DomEvent.disableScrollPropagation(t);let e=t=>t.preventDefault();return t.addEventListener("wheel",e,{passive:!1}),()=>t.removeEventListener("wheel",e)},[]);let y=(0,g.useRef)(!1),j=(0,g.useCallback)(()=>{if(y.current)return;let t=[];for(let n of e)for(let e of n.points)t.push([e.lat,e.lng]);if(0===t.length)return;null==u||u(),y.current=!0;let n=()=>{y.current=!1,f.off("moveend",n)};f.once("moveend",n),setTimeout(n,1200);let l=d().latLngBounds(t);
1if(!l.isValid()||l.getNorthEast().equals(l.getSouthWest())){f.flyTo(l.getCenter(),18,{animate:!0,duration:.8});return}let o=f.getSize(),i=(t,e)=>Math.min(t,Math.round(.3*e));f.flyToBounds(l,{paddingTopLeft:[i(300,o.x),i(24,o.y)],paddingBottomRight:[i(96,o.x),i(120,o.y)],animate:!0,duration:.9,maxZoom:h.Vh})},[f,e,u]),L="locating"===o,k="denied"===o||"unsupported"===o,[w,M]=(0,g.useState)(0);return(0,g.useEffect)(()=>{let t=()=>M(f.getBearing?f.getBearing():0);return t(),f.on("rotate",t),()=>{f.off("rotate",t)}},[f]),(0,l.jsx)("div",{className:"leaflet-top leaflet-right flex flex-col items-end gap-2 ".concat(m?"measure-controls-panel-shift":""),style:{pointerEvents:"none"},children:(0,l.jsxs)("div",{ref:v,"data-tour":"map-controls",className:"map-control-stack",style:{pointerEvents:"auto"},children:[0!==w&&(0,l.jsx)("button",{type:"button",onClick:()=>f.setBearing(0),className:"map-control-btn",title:x("measure.mapControls.resetBearing"),"aria-label":x("measure.mapControls.resetBearingAria"),"data-track-cat":"map_control","data-track-label":"Reset North",children:(0,l.jsxs)("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",style:{transform:"rotate(".concat(-w,"deg)")},children:[(0,l.jsx)("circle",{cx:"12",cy:"12",r:"10"}),(0,l.jsx)("polygon",{points:"12 3 15 12 12 10 9 12",fill:"rgb(var(--danger))",stroke:"none"}),(0,l.jsx)("polygon",{points:"12 21 15 12 12 14 9 12",fill:"currentColor",opacity:"0.35",stroke:"none"})]})}),p&&(0,l.jsx)("button",{type:"button",onClick:p,className:"map-control-btn",title:x("measure.mapControls.search"),"aria-label":x("measure.mapControls.searchAria"),"data-track-cat":"map_control","data-track-label":"Search Measurements",children:(0,l.jsxs)("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,l.jsx)("circle",{cx:"11",cy:"11",r:"8"}),(0,l.jsx)("line",{x1:"21",y1:"21",x2:"16.65",y2:"16.65"})]})}),e.length>0&&(0,l.jsxs)("button",{type:"button",onClick:j,className:"map-control-btn map-control-btn--no-press",title:x("measure.mapControls.fitAllTitle"),"aria-label":x("measure.mapControls.fitAllAria"),"data-track-cat":"map_control","data-track-label":"Fit All Measurements",children:[(0,l.jsxs)("svg",{className:"map-icon-desktop",width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,l.jsx)("polyline",{points:"15 3 21 3 21 9"}),(0,l.jsx)("polyline",{points:"9 21 3 21 3 15"}),(0,l.jsx)("line",{x1:"21",y1:"3",x2:"14",y2:"10"}),(0,l.jsx)("line",{x1:"3",y1:"21",x2:"10",y2:"14"})]}),(0,l.jsxs)("svg",{className:"map-icon-phone",width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,l.jsx)("polyline",{points:"15 3 21 3 21 9"}),(0,l.jsx)("polyline",{points:"9 3 3 3 3 9"}),(0,l.jsx)("polyline",{points:"15 21 21 21 21 15"}),(0,l.jsx)("polyline",{points:"9 21 3 21 3 15"}),(0,l.jsx)("line",{x1:"21",y1:"3",x2:"14.5",y2:"9.5"}),(0,l.jsx)("line",{x1:"3",y1:"3",x2:"9.5",y2:"9.5"}),(0,l.jsx)("line",{x1:"21",y1:"21",x2:"14.5",y2:"14.5"}),(0,l.jsx)("line",{x1:"3",y1:"21",x2:"9.5",y2:"14.5"})]})]}),(0,l.jsx)("button",{type:"button",onClick:n,disabled:L,className:"map-control-btn",title:x(k?"measure.mapControls.locationDenied":"measure.mapControls.locate"),"aria-label":x("measure.mapControls.locate"),"data-track-cat":"map_control","data-track-label":"My Location",children:L?(0,l.jsx)("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",className:"animate-spin",children:(0,l.jsx)("circle",{cx:"12",cy:"12",r:"10",strokeDasharray:"31.4 31.4",strokeDashoffset:"10"})}):(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("svg",{className:"map-icon-desktop",width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",stroke:k?"rgb(var(--danger))":a?"#456EFE":"currentColor",children:[(0,l.jsx)("circle",{cx:"12",cy:"12",r:"4"}),(0,l.jsx)("line",{x1:"12",y1:"2",x2:"12",y2:"6"}),(0,l.jsx)("line",{x1:"12",y1:"18",x2:"12",y2:"22"}),(0,l.jsx)("line",{x1:"2",y1:"12",x2:"6",y2:"12"}),(0,l.jsx)("line",{x1:"18",y1:"12",x2:"22",y2:"12"})]}),(0,l.jsxs)("svg",{className:"map-icon-phone",width:"21",height:"21",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",children:[(0,l.jsx)("circle",{cx:"12",cy:"12",r:"6.5"}
1),(0,l.jsx)("circle",{cx:"12",cy:"12",r:"2.3",fill:"currentColor",stroke:"none"}),(0,l.jsx)("line",{x1:"12",y1:"2.5",x2:"12",y2:"5.5"}),(0,l.jsx)("line",{x1:"12",y1:"18.5",x2:"12",y2:"21.5"}),(0,l.jsx)("line",{x1:"2.5",y1:"12",x2:"5.5",y2:"12"}),(0,l.jsx)("line",{x1:"18.5",y1:"12",x2:"21.5",y2:"12"})]})]})}),(0,l.jsx)("button",{type:"button",onClick:r,className:"map-control-btn",title:x("measure.mapControls.layers"),"aria-label":x("measure.mapControls.layers"),"data-track-cat":"map_control","data-track-label":"Change Map Type",children:(0,l.jsxs)("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,l.jsx)("polygon",{points:"12 2 2 7 12 12 22 7 12 2"}),(0,l.jsx)("polyline",{points:"2 17 12 22 22 17"}),(0,l.jsx)("polyline",{points:"2 12 12 17 22 12"})]})}),s&&(0,l.jsx)("button",{type:"button",onClick:s,className:"map-control-btn map-control-btn--help",title:x("measure.mapControls.showTour"),"aria-label":x("measure.mapControls.showTour"),"data-track-cat":"map_control","data-track-label":"Replay Tour",children:(0,l.jsxs)("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,l.jsx)("circle",{cx:"12",cy:"12",r:"10"}),(0,l.jsx)("path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3"}),(0,l.jsx)("line",{x1:"12",y1:"17",x2:"12.01",y2:"17"})]})}),c&&(0,l.jsx)("button",{type:"button",onClick:c,className:"map-control-btn",title:x("measure.mapControls.details"),"aria-label":x("measure.mapControls.detailsAria"),"data-track-cat":"map_control","data-track-label":"Tool Details",children:(0,l.jsxs)("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,l.jsx)("path",{d:"M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"}),(0,l.jsx)("polyline",{points:"14 2 14 8 20 8"}),(0,l.jsx)("line",{x1:"16",y1:"13",x2:"8",y2:"13"}),(0,l.jsx)("line",{x1:"16",y1:"17",x2:"8",y2:"17"}),(0,l.jsx)("line",{x1:"10",y1:"9",x2:"8",y2:"9"})]})})]})})}function ts(t){let{onAdd:e,onPickSaved:n,selectionEnabled:l,measurements:o,suppressClickUntilRef:a}=t,r=(0,i.zV)({click:t=>{if(Date.now()<a.current)return;if(l){let e=function(t,e,n){var l;let o=t.containerPoint,i=null;for(let t of n){if("distance"!==t.type||t.points.length<2)continue;let n=1/0;for(let l=0;l<t.points.length-1;l++){let i=function(t,e,n){let l=n.x-e.x,o=n.y-e.y,i=l*l+o*o;if(0===i)return t.distanceTo(e);let a=((t.x-e.x)*l+(t.y-e.y)*o)/i;return a=Math.max(0,Math.min(1,a)),t.distanceTo(d().point(e.x+a*l,e.y+a*o))}(o,e.latLngToContainerPoint([t.points[l].lat,t.points[l].lng]),e.latLngToContainerPoint([t.points[l+1].lat,t.points[l+1].lng]));i<n&&(n=i)}n<=12&&(!i||n<i.d)&&(i={m:t,d:n})}if(i)return i.m;let a=null;for(let e of n){if("area"!==e.type||e.points.length<2)continue;let n=(0,v.D0)(e.type,e.points)?(0,v.WL)(e.points):e.points;if(n.length<3||!function(t,e){let n=!1;for(let l=0,o=e.length-1;l<e.length;o=l++){let i=e[l].lng,a=e[l].lat,r=e[o].lng,s=e[o].lat;a>t.lat!=s>t.lat&&t.lng<(r-i)*(t.lat-a)/(s-a)+i&&(n=!n)}return n}({lat:t.latlng.lat,lng:t.latlng.lng},n))continue;let l=(0,v.L9)(n);(!a||l<a.area)&&(a={m:e,area:l})}return null!==(l=null==a?void 0:a.m)&&void 0!==l?l:null}(t,r,o);if(e){null==n||n(e);return}}let i=r.wrapLatLng(t.latlng);e({lat:i.lat,lng:i.lng})}});return null}function tc(t){let{onReady:e}=t,n=(0,i.Sx)();return(0,g.useEffect)(()=>{null==e||e(n)},[n,e]),null}function tu(t){let{center:e}=t,n=(0,i.Sx)();return(0,g.useEffect)(()=>{e&&n.setView([e.lat,e.lng],Math.max(n.getZoom(),16))},[e,n]),null}function td(t){let{view:e}=t,n=(0,i.Sx)();return(0,g.useEffect)(()=>{e&&n.setView([e.center.lat,e.center.lng],e.zoom)},[e,n]),null}function tg(t){let{maxZoom:e}=t,n=(0,i.Sx)();return(0,g.useEffect)(()=>{n.setMaxZoom(e),n.getZoom()>e&&n.setZoom(e)},[n,e]),null}function tp(t){var e,n;let{type:i,points:u,color:p,mapType:j,flyTo:L,restoreView:E=null,userLocation:_,onAddPoint:S,onMovePoint:z,onAddPointAt:T,onMoveCirclePoints:O,savedMeasurements:I=[],groups:B=[],onSelectSaved:D,selectionEnabled:R=!0,selectedSavedId:Z=null,edgeUnit:W="Meter",editablePoints:F=null,onMoveEditablePoint:U,onMoveCircleEditablePoints:H,onAddEditablePointAt:q,onDeleteEditablePoint:X,onLocate:Y,locationStatus:G="idle",onMapTypeClick:$,onMapReady:tt,onHelp:te,onDetails:tn,onSearch:tp,panelOpen:th,selectedVertex:tm=null,onSelectVertex:tf}=t,{t:tx,locale:tv}=(0,b.NT)(),ty=(0,g.useRef)(null),tb=(0,g.useMemo)(()=>(0,y.SW)(tx,tv),[tx,tv]),tj=u.map(t=>[t.lat,t.lng]),tL=(0,g.useMemo)(()=>
1{if("circle"!==i||u.length<2)return[];let[t,e]=u;return(0,v.Hv)(t,(0,v.cu)([t,e])).map(t=>[t.lat,t.lng])},[i,u]),tk=(0,g.useMemo)(()=>new Set(B.filter(t=>!t.visible).map(t=>t.id)),[B]),tw=(0,g.useMemo)(()=>I.filter(t=>!(t.groupId&&tk.has(t.groupId))),[I,tk]),tM=null!==(e=tw.find(t=>t.id===Z))&&void 0!==e?e:null,[tC,tE]=(0,g.useState)(!1),t_=(0,g.useRef)(null),tS=(0,g.useCallback)(()=>{null!=t_.current&&clearTimeout(t_.current),tE(!0),t_.current=setTimeout(()=>{tE(!1),t_.current=null},5e3)},[]);(0,g.useEffect)(()=>()=>{null!=t_.current&&clearTimeout(t_.current)},[]);let tz=null!==(n=null!=F?F:null==tM?void 0:tM.points)&&void 0!==n?n:null,tT=null!=F,tO=tM?(0,x.MJ)(B.find(t=>t.id===tM.groupId)):x.nS,tP=t=>e=>{R&&(d().DomEvent.stopPropagation(e),null==D||D(t))},tI=(0,g.useRef)(null),tA=(0,g.useRef)({}),tB=(0,g.useRef)(0),tN=(0,g.useRef)(null),tD=(0,g.useRef)([]),tR=(0,g.useRef)([]),tZ=(0,g.useRef)([]),tW=(0,g.useRef)([]),tJ=(0,g.useRef)({}),tF=(0,g.useRef)({}),tU=(0,g.useMemo)(()=>tw.map(t=>{if(t.id===Z&&tT)return null;let e=(0,x.MJ)(B.find(e=>e.id===t.groupId)),n=t.points.map(t=>[t.lat,t.lng]),i=t.id===Z;if("area"===t.type&&n.length>=2){let o=(0,v.D0)(t.type,t.points)?(0,v.WL)(t.points).map(t=>[t.lat,t.lng]):n;return o.length<3?null:(0,l.jsx)(a.m,{positions:o,pathOptions:tC?{color:e,fillColor:e,fillOpacity:.5,weight:8,opacity:1,interactive:!1}:i?{color:e,fillOpacity:.38,weight:3,interactive:!1}:{color:e,fillOpacity:.3,weight:2.5,interactive:!1}},t.id)}if("distance"===t.type&&n.length>=2)return(0,l.jsx)(r.a,{positions:n,pathOptions:tC?{color:e,weight:9,opacity:1,interactive:!1}:i?{color:e,weight:4,interactive:!1}:{color:e,weight:3,interactive:!1}},t.id);if("poi"===t.type&&n.length>=1){let a=(0,k.EZ)(t.icon);return(0,l.jsx)(o.J,{position:n[0],icon:tC?N(e,a):P(e,a),zIndexOffset:tC?900:i?500:0,eventHandlers:{click:tP(t)}},t.id)}return null}),[tw,B,Z,tT,R,tC]),tV=(0,g.useMemo)(()=>tC?tw.map(t=>{if(t.id===Z&&tT)return null;let e=(0,x.MJ)(B.find(e=>e.id===t.groupId)),n=t.points.map(t=>[t.lat,t.lng]);if("area"===t.type&&n.length>=2){let o=(0,v.D0)(t.type,t.points)?(0,v.WL)(t.points).map(t=>[t.lat,t.lng]):n;return o.length<3?null:(0,l.jsx)(a.m,{positions:o,pathOptions:{color:e,fill:!1,weight:24,opacity:.3,lineCap:"round",lineJoin:"round",interactive:!1}},"halo-".concat(t.id))}return"distance"===t.type&&n.length>=2?(0,l.jsx)(r.a,{positions:n,pathOptions:{color:e,weight:24,opacity:.3,lineCap:"round",lineJoin:"round",interactive:!1}},"halo-".concat(t.id)):"poi"===t.type&&n.length>=1?(0,l.jsx)(s.c,{center:n[0],radius:26,pathOptions:{color:e,fillColor:e,fillOpacity:.3,weight:0,interactive:!1}},"halo-".concat(t.id)):null}):null,[tw,B,Z,tT,tC]),tH=(()=>{if(!tT||!tM||!tz||0===tz.length)return null;if("poi"===tM.type){let t=tz[0],e=(0,k.EZ)(tM.icon);return(0,l.jsx)(o.J,{position:[t.lat,t.lng],draggable:!!U,icon:U?A(tO,e):P(tO,e),zIndexOffset:800,eventHandlers:{dragend:t=>{let e=t.target.getLatLng();null==U||U(0,{lat:e.lat,lng:e.lng})},click:t=>d().DomEvent.stopPropagation(t)}})}let t=tz.map(t=>[t.lat,t.lng]),e=t=>{tI.current=t},n=(0,v.D0)(tM.type,tz),i=n?[]:C(tz,tM.type),s="area"===tM.type&&t.length>=3,c="area"===tM.type?tM.perimeterUnit:tM.distanceUnit,u=e=>l=>{var o,a,r,u,d;let g=l.target.getLatLng();if(n){if(2===t.length){let n,l;if(0===e){let e=g.lat-t[0][0],o=g.lng-t[0][1];n=[g.lat,g.lng],l=[t[1][0]+e,t[1][1]+o],null===(u=tW.current[1])||void 0===u||u.setLatLng(l)}else n=t[0],l=[g.lat,g.lng];let o=(0,v.Hv)({lat:n[0],lng:n[1]},(0,v.cu)([{lat:n[0],lng:n[1]},{lat:l[0],lng:l[1]}])).map(t=>[t.lat,t.lng]);null===(r=tI.current)||void 0===r||r.setLatLngs(o)}return}let p=t.map((t,n)=>n===e?[g.lat,g.lng]:t);for(let t of(null===(o=tI.current)||void 0===o||o.setLatLngs(p),i)){let e=p[t.insertAfter],n=p[(t.insertAfter+1)%p.length];e&&n&&(null===(d=tR.current[t.insertAfter])||void 0===d||d.setLatLng([(e[0]+n[0])/2,(e[1]+n[1])/2]))}let h=(null===(a=ty.current)||void 0===a?void 0:a.getBearing)?ty.current.getBearing():0;for(let t of Q(e,p.length,s)){let e=tF.current[t];if(!e)continue;let n=K(p,t,c,s,tb,h,ty.current);J(e,n.mid,n.text,n.dx,n.dy,n.angle)}},g=t=>e=>{let l=e.target.getLatLng();if(n&&0===t&&2===tz.length){let t=l.lat-tz[0].lat,e=l.lng-tz[0].lng;null==H||H([{lat:l.lat,lng:l.lng},{lat:tz[1].lat+t,lng:tz[1].lng+e}]);return}null==U||U(t,{lat:l.lat,lng:l.lng})},p=t=>e=>{var n,l;if(tW.current[t]=e,null===(n=(l=tA.current)[t])||void 0===n||n.call(l),delete tA.current[t],!e||!X)return;let o=e.getElement();o&&(tA.current[t]=function(t,e){let n=null,l=0,o=0,i=!1,a=()=>{null!=n&&(clearTimeout(n),n=null)},r=t=>{if(1!==t.touches.length){a();return}i=!1,l=t.touches[0].clientX,o=t.touches[0].clientY,a(),n=setTimeout(()=>{i=!0,n=null,e()},550)},s=t=>{let e=t.touches[0];e&&Math.hypot(e.clientX-l,e.clientY-o)>10&&a()},c=t=>{i&&t.cancelable&&t.preventDefault(),a()},u=()=>a();return t.addEventListener("touchstart",r,{passive:!0}),t.addEventListener("touchmove",s,{passive:!0}),t.addEventListener("touchend",c,{passive:!1}),t.addEventListener("touchcancel",u,{passive:!0}),()=>{a(),t.removeEventListener("touchstart",r),t.removeEventListener("touchmove",s),t.removeEventListener("touchend",c),t.removeEventListener("touchcancel",u)}}(o,()=>{tB.current=Date.now()+400,X(t)}))};return(0,l.jsxs)(l.Fragment,{children:["area"===tM.type&&t.length>=3&&(0,l.jsx)(a.m,{ref:e,positions:t,pathOptions:{color:tO,fillOpacity:.25,weight:3}}),n&&(0,l.jsx)(a.m,{ref:e,positions:(0,v.WL)(tz).map(t=>[t.lat,t.lng]),pathOptions:{color:tO,fillOpacity:.25,weight:3}}),"distance"===tM.type&&t.length>=2&&(0,l.jsx)(r.a,{ref:e,positions:t,pathOptions:{color:tO,weight:4}}),q&&i.map(t=>(0,l.jsx)(o.J,{ref:e=>{tR.current[t.insertAfter]=e},position:t.pos,icon:M(),zIndexOffset:750,eventHandlers:{click:e=>{d().DomEvent.stopPropagation(e);let n=e.target.getLatLng();q(t.insertAfter+1,{lat:n.lat,lng:n.lng})}}},"edit-mid-".concat(t.insertAfter))),tz.map((t,e)=>(0,l.jsx)(o.J,{ref:p(e),position:[t.lat,t.lng],draggable:!!U,icon:w(tO,e+1,tm===e),zIndexOffset:tm===e?850:800,eventHandlers:{drag:u(e),dragend:t=>{g(e)(t),null==tf||tf(e)},click:t=>{d().DomEvent.stopPropagation(t),null==tf||tf(e)},contextmenu:t=>{d().DomEvent.stopPropagation(t.originalEvent),null==X||X(e)}}},"edit-vertex-".concat(e)))]})})(),tq=t=>{tN.current=t},tX=t=>e=>{var n,l,o,a,r;let s=e.target.getLatLng();if("circle"===i){if(2===tj.length){let e,n;if(0===t){let t=s.lat-tj[0][0],l=s.lng-tj[0][1];e=[s.lat,s.lng],n=[tj[1][0]+t,tj[1][1]+l],null===(o=tZ.current[1])||void 0===o||o.setLatLng(n)}else e=tj[0],n=[s.lat,s.lng];let i=(0,v.Hv)({lat:e[0],lng:e[1]},(0,v.cu)([{lat:e[0],lng:e[1]},{lat:n[0],lng:n[1]}])).map(t=>[t.lat,t.lng]);null===(l=tN.current)||void 0===l||l.setLatLngs(i)}return}let c=tj.map((e,n)=>n===t?[s.lat,s.lng]:e);for(let t of(null===(n=tN.current)||void 0===n||n.setLatLngs(c),tY)){let e=c[t.insertAfter],n=c[(t.insertAfter+1)%c.length];e&&n&&(null===(a=tD.current[t.insertAfter])||void 0===a||a.setLatLng([(e[0]+n[0])/2,(e[1]+n[1])/2]))}if(i&&"poi"!==i){let e="area"===i&&c.length>=3,n=(null===(r=ty.current)||void 0===r?void 0:r.getBearing)?ty.current.getBearing():0;for(let l of Q(t,c.length,e)){let t=tJ.current[l];if(!t)continue;let o=K(c,l,W,e,tb,n,ty.current);J(t,o.mid,o.text,o.dx,o.dy,o.angle)}}},tY="circle"===i?[]:C(u,i);return(0,l.jsxs)(c.h,{center:[20.5937,78.9629],zoom:5,maxZoom:h.J0,maxBounds:h.FB,maxBoundsViscosity:h.Bc,className:"measure-map h-full w-full",scrollWheelZoom:!0,zoomControl:!1,attributionControl:!1,bounceAtZoomLimits:!1,preferCanvas:!0,rotate:!0,touchRotate:!0,rotateControl:!1,touchZoom:"center",children:[(0,l.jsx)(m,{mapType:j}),(0,l.jsx)(tc,{onReady:t=>{ty.current=t,null==tt||tt(t)}}),(0,l.jsx)(tg,{maxZoom:h.J0}),(0,l.jsx)(f,{}),(0,l.jsx)(ts,{onAdd:S,onPickSaved:D,selectionEnabled:R,measurements:tw,suppressClickUntilRef
1:tB}),(0,l.jsx)(tu,{center:L}),(0,l.jsx)(td,{view:E}),_&&(0,l.jsx)(o.J,{position:[_.lat,_.lng],icon:V,zIndexOffset:1e3}),tV,tU,tC&&(0,l.jsx)(ta,{measurements:tw,groups:B}),tH,tM&&(0,l.jsx)(tl,{editPts:tz,selectedType:tM.type,selectedPerimUnit:tM.perimeterUnit,selectedDistUnit:tM.distanceUnit,labelRefs:tF}),(0,l.jsx)(ti,{measurements:tw,groups:B,selectedSavedId:Z,selectedEditPts:tz,isEditingSelected:tT}),Y&&$&&(0,l.jsx)(tr,{measurements:tw,onLocate:Y,locationStatus:G,userLocation:_,onMapTypeClick:$,onHelp:te,onDetails:tn,onFit:tS,onSearch:tp,panelOpen:th}),"area"===i&&2===tj.length&&(0,l.jsx)(r.a,{ref:tq,positions:tj,pathOptions:{color:p,weight:4}}),"area"===i&&tj.length>=3&&(0,l.jsx)(a.m,{ref:tq,positions:tj,pathOptions:{color:p,fillOpacity:.25}}),"distance"===i&&tj.length>=2&&(0,l.jsx)(r.a,{ref:tq,positions:tj,pathOptions:{color:p,weight:4}}),"circle"===i&&tL.length>=3&&(0,l.jsx)(a.m,{ref:tq,positions:tL,pathOptions:{color:p,fillOpacity:.25}}),null!==i&&"poi"!==i&&"circle"!==i&&u.length>=2&&(0,l.jsx)(to,{points:u,type:i,unit:W,labelRefs:tJ}),T&&tY.map(t=>(0,l.jsx)(o.J,{ref:e=>{tD.current[t.insertAfter]=e},position:t.pos,icon:M(),zIndexOffset:750,eventHandlers:{click:e=>{d().DomEvent.stopPropagation(e);let n=e.target.getLatLng();T(t.insertAfter+1,{lat:n.lat,lng:n.lng})}}},"active-mid-".concat(t.insertAfter))),"poi"===i?u[0]&&(0,l.jsx)(o.J,{position:[u[0].lat,u[0].lng],draggable:!0,icon:A(p),zIndexOffset:800,eventHandlers:{dragend:t=>{let e=t.target.getLatLng();z(0,{lat:e.lat,lng:e.lng})}}}):u.map((t,e)=>(0,l.jsx)(o.J,{ref:t=>{tZ.current[e]=t},position:[t.lat,t.lng],draggable:!0,icon:w(p,e+1,tm===e),zIndexOffset:tm===e?850:800,eventHandlers:{click:t=>{d().DomEvent.stopPropagation(t),null==tf||tf(e)},drag:tX(e),dragend:t=>{let n=t.target.getLatLng();if(null==tf||tf(e),"circle"===i&&0===e&&2===u.length){let t=n.lat-u[0].lat,e=n.lng-u[0].lng;null==O||O([{lat:n.lat,lng:n.lng},{lat:u[1].lat+t,lng:u[1].lng+e}]);return}z(e,{lat:n.lat,lng:n.lng})}}},e))]})}}}]);

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.