1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[538],{538:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>h});var n=r(95155),a=r(12115),s=r(70898),l=r(4755),o=r(5384),i=r(26264),c=r(65761),m=r(55027),d=r.n(m);r(35603);var u=r(14525),p=r(17054),x=r(20063);delete d().Icon.Default.prototype._getIconUrl,d().Icon.Default.mergeOptions({iconRetinaUrl:"https://cdnjs.cloudflare.com/ajax/libs/leaflet/1.7.1/images/marker-icon-2x.png",iconUrl:"https://cdnjs.cloudflare.com/ajax/libs/leaflet/1.7.1/images/marker-icon.png",shadowUrl:"https://cdnjs.cloudflare.com/ajax/libs/leaflet/1.7.1/images/marker-shadow.png"});let g=e=>{let{gpsData:t}=e,r=(0,p.ko)();return(0,a.useEffect)(()=>{if(t&&t.features&&t.features.length>0){let e=d().latLngBounds([]);t.features.forEach(t=>{"Point"===t.geometry.type?e.extend([t.geometry.coordinates[1],t.geometry.coordinates[0]]):"LineString"===t.geometry.type&&t.geometry.coordinates.forEach(t=>{e.extend([t[1],t[0]])})}),e.isValid()&&r.fitBounds(e,{padding:[20,20]})}},[t,r]),null},f=e=>{let{mode:t}=e,r=(0,x.useParams)(),m=r.locale,d=t||r.toolId,p=u.so[d],[f,h]=(0,a.useState)(null),[b,y]=(0,a.useState)(null),[v,j]=(0,a.useState)(null),[N,w]=(0,a.useState)(!1),[k,C]=(0,a.useState)(null),[S,F]=(0,a.useState)(null),[E,P]=(0,a.useState)(!1),[L,T]=(0,a.useState)(!1),[U,z]=(0,a.useState)({coordinateFormat:"decimal",includeElevation:!0,includeTimestamp:!0,simplifyTracks:!1}),D=(0,a.useRef)(null);if(!p)return(0,n.jsx)("div",{className:"w-full space-y-8",children:(0,n.jsxs)("div",{className:"text-center p-8",children:[(0,n.jsx)("div",{className:"text-2xl font-bold text-red-600 mb-4",children:"Conversion Tool Not Found"}),(0,n.jsxs)("p",{className:"text-gray-600",children:['The requested conversion tool "',d,'" is not available.']})]})});let O=(0,a.useCallback)(async e=>{C(null),F(null),w(!0);try{let t,r=await e.text();switch(p.inputFormat){case"gpx":t=I(r);break;case"kml":t=R(r);break;case"geojson":t=JSON.parse(r);break;case"csv":t=B(r);break;default:throw Error("Unsupported input format")}h(e),y(t),F("File uploaded and parsed successfully!");let n=M(t,p.outputFormat);j(n)}catch(e){C("Error processing file: ".concat(e instanceof Error?e.message:"Unknown error"))}finally{w(!1)}},[p]),I=e=>{let t=new DOMParser().parseFromString(e,"text/xml"),r=[],n=t.querySelectorAll("trkpt");if(n.length>0){let e=[];n.forEach(t=>{let r=parseFloat(t.getAttribute("lat")||"0"),n=parseFloat(t.getAttribute("lon")||"0");e.push([n,r])}),e.length>0&&r.push({type:"Feature",geometry:{type:"LineString",coordinates:e},properties:{name:"Track"}})}return{type:"FeatureCollection",features:r}},R=e=>{let t=new DOMParser().parseFromString(e,"text/xml"),r=[];return t.querySelectorAll("coordinates").forEach(e=>{var t;let n=null==(t=e.textContent)?void 0:t.trim();if(n){let e=n.split(/\s+/).map(e=>{let[t,r]=e.split(",").map(Number);return[t,r]}).filter(e=>!isNaN(e[0])&&!isNaN(e[1]));e.length>1?r.push({type:"Feature",geometry:{type:"LineString",coordinates:e},properties:{name:"Path"}}):1===e.length&&r.push({type:"Feature",geometry:{type:"Point",coordinates:e[0]},properties:{name:"Point"}})}}),{type:"FeatureCollection",features:r}},B=e=>{let t=e.split("\n").filter(e=>e.trim()),r=[];for(let e=1;e<t.length;e++){let[n,a,s]=t[e].split(","),l=parseFloat(n),o=parseFloat(a);isNaN(l)||isNaN(o)||r.push({type:"Feature",geometry:{type:"Point",coordinates:[o,l]},properties:{name:(null==s?void 0:s.trim())||"Point ".concat(e)}})}return{type:"FeatureCollection",features:r}},M=(e,t)=>{switch(t){case"kml":return _(e);case"gpx":return A(e);case"geojson":return JSON.stringify(e,null,2);case"csv":return K(e);default:throw Error("Unsupported output format")}},_=e=>{let t='<?xml version="1.0" encoding="UTF-8"?>\n<kml xmlns="http://www.opengis.net/kml/2.2">\n<Document>\n';return e.features.forEach((e,r)=>{var n;let a=(null==(n=e.properties)?void 0:n.name)||"Feature ".concat(r+1);if("Point"===e.geometry.type){let[r,n]=e.geometry.coordinates;t+=" <Placemark>\n <name>".concat(a,"</name>\n <Point>\n <coordinates>").concat(r,",").concat(n,"</coordinates>\n </Point>\n </Placemark>\n")}else if("LineString"===e.geometry.type){let r=e.geometry.coordinates.map(e=>e.join(",")).join(" ");t+=" <Placemark>\n <name>".concat(a,"</name>\n <LineString>\n <coordinates>").concat(r,"</coordinates>\n </LineString>\n </Placemark>\n")}}),t+="</Document>\n</kml>"},A=e=>{let t='<?xml version="1.0" encoding="UTF-8"?>\n<gpx version="1.1" creator="GPS Converter">\n';
1return e.features.forEach((e,r)=>{var n;let a=(null==(n=e.properties)?void 0:n.name)||"Feature ".concat(r+1);if("Point"===e.geometry.type){let[r,n]=e.geometry.coordinates;t+=' <wpt lat="'.concat(n,'" lon="').concat(r,'">\n <name>').concat(a,"</name>\n </wpt>\n")}else"LineString"===e.geometry.type&&(t+=" <trk>\n <name>".concat(a,"</name>\n <trkseg>\n"),e.geometry.coordinates.forEach(e=>{t+=' <trkpt lat="'.concat(e[1],'" lon="').concat(e[0],'"></trkpt>\n')}),t+=" </trkseg>\n </trk>\n")}),t+="</gpx>"},K=e=>{let t="lat,lon,name,type\n";return e.features.forEach((e,r)=>{var n;let a=(null==(n=e.properties)?void 0:n.name)||"Feature ".concat(r+1);if("Point"===e.geometry.type){let[r,n]=e.geometry.coordinates;t+="".concat(n,",").concat(r,',"').concat(a,'",point\n')}else"LineString"===e.geometry.type&&e.geometry.coordinates.forEach((e,r)=>{t+="".concat(e[1],",").concat(e[0],',"').concat(a,"_").concat(r+1,'",track\n')})}),t},H={primaryCard:"bg-white rounded-xl shadow-lg border border-gray-200 p-3 sm:p-6 hover:shadow-xl transition-shadow duration-300 mx-0 border-l-0 border-r-0 sm:border-l sm:border-r sm:mx-auto"},W=Object.values(u.so).filter(e=>e.id!==d);return(0,n.jsx)("div",{className:"w-full space-y-4 sm:space-y-6",children:(0,n.jsx)("div",{className:"mb-12",children:(0,n.jsxs)("div",{className:"w-full max-w-6xl mx-auto p-2 sm:p-0",children:[(0,n.jsx)("div",{className:"".concat(H.primaryCard," bg-gradient-to-br from-white to-green-50/50 rounded-2xl border border-green-100/50 mb-6 animate-fade-in"),children:(0,n.jsxs)("div",{className:"text-center",children:[W.length>0&&(0,n.jsx)("div",{className:"mb-4 sm:mb-6",children:(0,n.jsxs)("div",{className:"flex flex-col sm:flex-row items-center justify-center gap-3",children:[(0,n.jsxs)("span",{className:"text-sm font-medium text-gray-700 flex items-center gap-2",children:[(0,n.jsx)(s.yk7,{className:"text-green-600",size:16}),"Switch Converter:"]}),(0,n.jsxs)("select",{value:d,onChange:e=>{e.target.value!==d&&(window.location.href="/".concat(m,"/tools/").concat(e.target.value))},className:"px-3 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-green-500 focus:border-transparent bg-white text-sm font-medium min-w-[200px] cursor-pointer",children:[(0,n.jsxs)("option",{value:d,children:[p.inputFormat.toUpperCase()," â ",p.outputFormat.toUpperCase()]}),W.map(e=>(0,n.jsxs)("option",{value:e.id,children:[e.inputFormat.toUpperCase()," â ",e.outputFormat.toUpperCase()]},e.id))]})]})}),(0,n.jsx)("input",{ref:D,type:"file",accept:".".concat(p.inputFormat),onChange:e=>{var t;let r=null==(t=e.target.files)?void 0:t[0];r&&O(r)},className:"hidden"}),(0,n.jsxs)("div",{className:"border-2 border-dashed border-green-300 rounded-xl p-4 sm:p-8 cursor-pointer hover:border-green-400 hover:bg-green-50/30 transition-all duration-300 touch-manipulation",onClick:()=>{var e;return null==(e=D.current)?void 0:e.click()},children:[(0,n.jsx)(s.HVe,{className:"mx-auto text-green-500 mb-3 sm:mb-4",size:32}),(0,n.jsxs)("div",{className:"mb-3 sm:mb-4",children:[(0,n.jsx)("div",{className:"bg-green-50 rounded-lg p-2 sm:p-3 inline-block mb-2 sm:mb-3",children:(0,n.jsxs)("span",{className:"text-green-800 font-semibold text-sm sm:text-lg flex items-center gap-2",children:[p.inputFormat.toUpperCase(),(0,n.jsx)("span",{className:"text-green-600",children:"â"}),p.outputFormat.toUpperCase()]})}),(0,n.jsxs)("div",{className:"text-lg sm:text-xl font-semibold text-gray-800 mb-1 sm:mb-2",children:["Upload ",p.inputFormat.toUpperCase()," File"]})]}),(0,n.jsxs)("p",{className:"text-sm sm:text-base text-gray-600 mb-3 sm:mb-4",children:["Drag and drop or click to select a ",p.inputFormat.toUpperCase()," file"]}),(0,n.jsxs)("p",{className:"text-xs sm:text-sm text-gray-500 mb-3",children:["Will be converted to ",p.outputFormat.toUpperCase()," format"]}),"csv"===p.inputFormat&&(0,n.jsxs)("div",{className:"bg-blue-50 border border-blue-200 rounded-lg p-3 mt-4 text-left",children:[(0,n.jsxs)("div",{className:"flex items-start gap-2 mb-2",children:[(0,n.jsx)(s.__w,{className:"text-blue-600 flex-shrink-0 mt-0.5",size:14}),(0,n.jsx)("div",{className:"text-sm font-semibold text-blue-800",children:"CSV Format Requirements"})]}),(0,n.jsx)("p",{className:"text-xs text-blue-700 mb-2",children:"Your CSV file should contain latitude, longitude, and optional name columns:"}),(0,n.jsxs)("div",{className:"bg-white rounded border p-2 font-mono text-xs text-gray-800",children:[(0,n.jsx)("div",{className:"text-blue-600 font-semibold mb-1",children:"Example format:"}),(0,n.jsx)("div",{children:"lat,lon,name"}),(0,n.jsx)("div",{children:"40.7128,-74.0060,New York"}),(0,n.jsx)("div",{children:"34.0522,-118.2437,Los Angeles"}),(0,n.jsx)("div",{children:"41.8781,-87.6298,Chicago"})]})]}),"gpx"===p.inputFormat&&(0,n.jsxs)("div",{className:"bg-blue-50 border border-blue-200 rounded-lg p-3 mt-4 text-left",children:[(0,n.jsxs)("div",{className:"flex items-start gap-2 mb-2",children:[(0,n.jsx)(s.__w,{className:"text-blue-600 flex-shrink-0 mt-0.5",size:14}),(0,n.jsx)("div",{className:"text-sm font-semibold text-blue-800",children:"GPX Format Info"})]}),(0,n.jsx)("p",{className:"text-xs text-blue-700",children:"Standard GPS Exchange format with tracks, wayp
1oints, and routes. Supports elevation data and timestamps."})]}),"kml"===p.inputFormat&&(0,n.jsxs)("div",{className:"bg-blue-50 border border-blue-200 rounded-lg p-3 mt-4 text-left",children:[(0,n.jsxs)("div",{className:"flex items-start gap-2 mb-2",children:[(0,n.jsx)(s.__w,{className:"text-blue-600 flex-shrink-0 mt-0.5",size:14}),(0,n.jsx)("div",{className:"text-sm font-semibold text-blue-800",children:"KML Format Info"})]}),(0,n.jsx)("p",{className:"text-xs text-blue-700",children:"Google Earth format supporting placemarks, paths, and polygons. Both KML and KMZ (compressed) files are supported."})]}),"geojson"===p.inputFormat&&(0,n.jsxs)("div",{className:"bg-blue-50 border border-blue-200 rounded-lg p-3 mt-4 text-left",children:[(0,n.jsxs)("div",{className:"flex items-start gap-2 mb-2",children:[(0,n.jsx)(s.__w,{className:"text-blue-600 flex-shrink-0 mt-0.5",size:14}),(0,n.jsx)("div",{className:"text-sm font-semibold text-blue-800",children:"GeoJSON Format Info"})]}),(0,n.jsx)("p",{className:"text-xs text-blue-700",children:"Standard geographic JSON format with Point, LineString, and Polygon geometries. Widely used in web mapping applications."})]})]})]})}),k&&(0,n.jsxs)("div",{className:"bg-red-50 border border-red-200 rounded-lg p-3 sm:p-4 mb-6 flex items-start gap-2 sm:gap-3 animate-slide-down",children:[(0,n.jsx)(s.BS8,{className:"text-red-500 flex-shrink-0 mt-0.5",size:16}),(0,n.jsx)("span",{className:"text-sm sm:text-base text-red-700 break-words",children:k})]}),S&&(0,n.jsxs)("div",{className:"bg-green-50 border border-green-200 rounded-lg p-3 sm:p-4 mb-6 flex items-start gap-2 sm:gap-3 animate-slide-down",children:[(0,n.jsx)(s.CMH,{className:"text-green-500 flex-shrink-0 mt-0.5",size:16}),(0,n.jsx)("span",{className:"text-sm sm:text-base text-green-700 break-words",children:S})]}),f&&(0,n.jsxs)("div",{className:"".concat(H.primaryCard," bg-gradient-to-br from-white to-green-50/50 rounded-2xl border border-green-100/50 mb-6 animate-fade-in"),children:[(0,n.jsxs)("div",{className:"flex flex-col sm:flex-row sm:items-center sm:justify-between gap-4 mb-4",children:[(0,n.jsxs)("div",{className:"flex items-center gap-3",children:[(0,n.jsx)(s.t69,{className:"text-green-500 flex-shrink-0",size:20}),(0,n.jsxs)("div",{className:"min-w-0",children:[(0,n.jsx)("div",{className:"font-semibold text-sm sm:text-base text-gray-800 break-words",children:f.name}),(0,n.jsxs)("p",{className:"text-xs sm:text-sm text-gray-600",children:[(f.size/1024).toFixed(1)," KB ⢠",(null==b?void 0:b.features.length)||0," features"]})]})]}),(0,n.jsxs)("div",{className:"flex gap-2 flex-wrap",children:[(0,n.jsx)("button",{onClick:()=>P(!E),className:"p-2 text-gray-600 hover:text-green-600 hover:bg-green-50 rounded-lg transition-colors touch-manipulation min-h-[44px] min-w-[44px]",title:"Settings",children:(0,n.jsx)(s.Pcn,{size:18})}),(0,n.jsx)("button",{onClick:()=>{h(null),y(null),j(null),C(null),F(null),D.current&&(D.current.value="")},className:"p-2 text-gray-600 hover:text-red-600 hover:bg-red-50 rounded-lg transition-colors touch-manipulation min-h-[44px] min-w-[44px]",title:"Clear",children:(0,n.jsx)(s.qbC,{size:18})}),v&&(0,n.jsxs)("button",{onClick:()=>{if(!v)return;let e=new Blob([v],{type:"text/plain"}),t=URL.createObjectURL(e),r=document.createElement("a");r.href=t,r.download="converted.".concat(p.outputFormat),document.body.appendChild(r),r.click(),document.body.removeChild(r),URL.revokeObjectURL(t)},className:"px-3 sm:px-4 py-2 bg-green-600 text-white rounded-lg hover:bg-green-700 transition-colors flex items-center gap-2 touch-manipulation min-h-[44px] text-sm sm:text-base",children:[(0,n.jsx)(s.WCW,{size:16}),(0,n.jsx)("span",{className:"hidden sm:inline",children:"Download"})," ",p.outputFormat.toUpperCase()]})]})]}),E&&(0,n.jsxs)("div",{className:"border-t border-gray-200 pt-3 sm:pt-4 mt-3 sm:mt-4 animate-fade-in",children:[(0,n.jsx)("div",{className:"font-semibold text-sm sm:text-base text-gray-800 mb-3",children:"Advanced Settings"}),(0,n.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-3 sm:gap-4",children:[(0,n.jsxs)("div",{children:[(0,n.jsx)("label",{className:"block text-xs sm:text-sm font-medium text-gray-700 mb-1",children:"Coordinate Format"}),(0,n.jsxs)("select",{value:U.coordinateFormat,onChange:e=>z(t=>
1({...t,coordinateFormat:e.target.value})),className:"w-full p-2 sm:p-3 border border-gray-300 rounded-lg focus:ring-2 focus:ring-green-500 focus:border-transparent text-sm sm:text-base touch-manipulation min-h-[44px]",children:[(0,n.jsx)("option",{value:"decimal",children:"Decimal Degrees"}),(0,n.jsx)("option",{value:"dms",children:"Degrees, Minutes, Seconds"})]})]}),(0,n.jsxs)("div",{className:"flex items-center gap-2 sm:gap-3 p-2 hover:bg-gray-50 rounded-lg",children:[(0,n.jsx)("input",{type:"checkbox",id:"includeElevation",checked:U.includeElevation,onChange:e=>z(t=>({...t,includeElevation:e.target.checked})),className:"rounded border-gray-300 text-green-600 focus:ring-green-500 touch-manipulation min-h-[20px] min-w-[20px]"}),(0,n.jsx)("label",{htmlFor:"includeElevation",className:"text-xs sm:text-sm font-medium text-gray-700 cursor-pointer",children:"Include Elevation Data"})]}),(0,n.jsxs)("div",{className:"flex items-center gap-2 sm:gap-3 p-2 hover:bg-gray-50 rounded-lg",children:[(0,n.jsx)("input",{type:"checkbox",id:"includeTimestamp",checked:U.includeTimestamp,onChange:e=>z(t=>({...t,includeTimestamp:e.target.checked})),className:"rounded border-gray-300 text-green-600 focus:ring-green-500 touch-manipulation min-h-[20px] min-w-[20px]"}),(0,n.jsx)("label",{htmlFor:"includeTimestamp",className:"text-xs sm:text-sm font-medium text-gray-700 cursor-pointer",children:"Include Timestamp Data"})]}),(0,n.jsxs)("div",{className:"flex items-center gap-2 sm:gap-3 p-2 hover:bg-gray-50 rounded-lg",children:[(0,n.jsx)("input",{type:"checkbox",id:"simplifyTracks",checked:U.simplifyTracks,onChange:e=>z(t=>({...t,simplifyTracks:e.target.checked})),className:"rounded border-gray-300 text-green-600 focus:ring-green-500 touch-manipulation min-h-[20px] min-w-[20px]"}),(0,n.jsx)("label",{htmlFor:"simplifyTracks",className:"text-xs sm:text-sm font-medium text-gray-700 cursor-pointer",children:"Simplify Track Data"})]})]})]})]}),b&&(0,n.jsxs)("div",{className:"".concat(H.primaryCard," bg-gradient-to-br from-white to-green-50/50 rounded-2xl border border-green-100/50 mb-6 animate-fade-in"),children:[(0,n.jsxs)("div",{className:"flex items-center gap-2 sm:gap-3 mb-3 sm:mb-4",children:[(0,n.jsx)(s.A4L,{className:"text-green-500",size:20}),(0,n.jsx)("div",{className:"font-semibold text-sm sm:text-base text-gray-800",children:"Map Preview"})]}),(0,n.jsx)("div",{className:"h-64 sm:h-80 md:h-96 rounded-lg overflow-hidden",children:(0,n.jsxs)(l.W,{center:[0,0],zoom:2,style:{height:"100%",width:"100%"},className:"rounded-lg",children:[(0,n.jsx)(o.e,{url:"https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",attribution:'\xa9 <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'}),(0,n.jsx)(g,{gpsData:b}),b.features.map((e,t)=>{if("Point"===e.geometry.type){let[r,a]=e.geometry.coordinates;return(0,n.jsx)(i.p,{position:[a,r]},t)}if("LineString"===e.geometry.type){let r=e.geometry.coordinates.map(e=>[e[1],e[0]]);return(0,n.jsx)(c.R,{positions:r,color:"blue",weight:3},t)}return null})]})})]})]})})})},h=e=>{let{mode:t}=e;if(t&&u.so[t])return(0,n.jsx)(f,{mode:t});let[r,m]=(0,a.useState)(null),[p,x]=(0,a.useState)(null),[g,h]=(0,a.useState)(!1),[b,y]=(0,a.useState)(null),[v,j]=(0,a.useState)(null),[N,w]=(0,a.useState)(!1),[k,C]=(0,a.useState)({outputFormat:"gpx",coordinateFormat:"decimal",simplifyTracks:!1,simplificationTolerance:1e-4,includeElevation:!0,includeTimestamp:!0}),S=(0,a.useRef)(null),[F,E]=(0,a.useState)(null),[P,L]=(0,a.useState)([39.8283,-98.5795]),[T,U]=(0,a.useState)(4);(0,a.useEffect)(()=>{delete d().Icon.Default.prototype._getIconUrl,d().Icon.Default.mergeOptions({iconRetinaUrl:"https://cdnjs.cloudflare.com/ajax/libs/leaflet/1.7.1/images/marker-icon-2x.png",iconUrl:"https://cdnjs.cloudflare.com/ajax/libs/leaflet/1.7.1/images/marker-icon.png",shadowUrl:"https://cdnjs.cloudflare.com/ajax/libs/leaflet/1.7.1/images/marker-shadow.png"})},[]);let z=(0,a.useCallback)(async e=>{h(!0),y(null),j(null);try{var t;let r,n=null==(t=e.name.split(".").pop())?void 0:t.toLowerCase();if(!n||!u.SP.input.includes(n))throw Error("Unsupported file format. Supported formats: ".concat(u.SP.input.join(", ")));let a=await e.text();switch(n){case"kml":case"kmz":r=await O(a);break;case"gpx":r=await I(a);break;case"geojson":r=JSON.parse(a);break;case"csv":r=await R(a);break;default:throw Error("Unsupported file format")}if(m(e),x(r),E(r),j("Successfully loaded ".concat(e.name)),r.features.length>0){let e=D(r);e&&(L([e.center.lat,e.center.lng]),U(e.zoom))}}catch(e){y(e instanceof Error?e.message:"Failed to process file")}finally{h(!1)}},[]),D=e=>{if(!e.features.length)return null;let t=1/0,r=-1/0,n=1/0,a=-1/0;
1e.features.forEach(e=>{if("Point"===e.geometry.type){let[s,l]=e.geometry.coordinates;t=Math.min(t,l),r=Math.max(r,l),n=Math.min(n,s),a=Math.max(a,s)}else"LineString"===e.geometry.type&&e.geometry.coordinates.forEach(e=>{let[s,l]=e;t=Math.min(t,l),r=Math.max(r,l),n=Math.min(n,s),a=Math.max(a,s)})});let s=(t+r)/2,l=(n+a)/2,o=Math.max(r-t,a-n);return{center:{lat:s,lng:l},zoom:o>10?4:o>5?6:o>1?8:o>.1?12:14}},O=async e=>{var t,r,n,a,s,l,o;let i=new DOMParser().parseFromString(e,"text/xml"),c=[],m=i.getElementsByTagName("Placemark");for(let e=0;e<m.length;e++){let t=m[e],i=(null==(r=t.getElementsByTagName("name")[0])?void 0:r.textContent)||"",d=(null==(n=t.getElementsByTagName("description")[0])?void 0:n.textContent)||"",u=t.getElementsByTagName("Point")[0];if(u){let e=null==(s=u.getElementsByTagName("coordinates")[0])||null==(a=s.textContent)?void 0:a.trim();if(e){let[t,r,n]=e.split(",").map(Number);c.push({type:"Feature",properties:{name:i,description:d,elevation:n},geometry:{type:"Point",coordinates:[t,r,n||0]}})}}let p=t.getElementsByTagName("LineString")[0];if(p){let e=null==(o=p.getElementsByTagName("coordinates")[0])||null==(l=o.textContent)?void 0:l.trim();if(e){let t=e.split(/\s+/).map(e=>{let[t,r,n]=e.split(",").map(Number);return[t,r,n||0]});c.push({type:"Feature",properties:{name:i,description:d},geometry:{type:"LineString",coordinates:t}})}}}return{type:"FeatureCollection",features:c,metadata:{name:(null==(t=i.getElementsByTagName("name")[0])?void 0:t.textContent)||"KML Data"}}},I=async e=>{var t,r,n,a,s,l;let o=new DOMParser().parseFromString(e,"text/xml"),i=[],c=o.getElementsByTagName("wpt");for(let e=0;e<c.length;e++){let t=c[e],s=parseFloat(t.getAttribute("lat")||"0"),l=parseFloat(t.getAttribute("lon")||"0"),o=(null==(r=t.getElementsByTagName("name")[0])?void 0:r.textContent)||"",m=(null==(n=t.getElementsByTagName("desc")[0])?void 0:n.textContent)||"",d=parseFloat((null==(a=t.getElementsByTagName("ele")[0])?void 0:a.textContent)||"0");i.push({type:"Feature",properties:{name:o,description:m,elevation:d},geometry:{type:"Point",coordinates:[l,s,d]}})}let m=o.getElementsByTagName("trk");for(let e=0;e<m.length;e++){let t=m[e],r=(null==(s=t.getElementsByTagName("name")[0])?void 0:s.textContent)||"",n=t.getElementsByTagName("trkseg");for(let e=0;e<n.length;e++){let t=n[e].getElementsByTagName("trkpt"),a=[];for(let e=0;e<t.length;e++){let r=t[e],n=parseFloat(r.getAttribute("lat")||"0"),s=parseFloat(r.getAttribute("lon")||"0"),o=parseFloat((null==(l=r.getElementsByTagName("ele")[0])?void 0:l.textContent)||"0");a.push([s,n,o])}a.length>0&&i.push({type:"Feature",properties:{name:r,type:"track"},geometry:{type:"LineString",coordinates:a}})}}return{type:"FeatureCollection",features:i,metadata:{name:(null==(t=o.getElementsByTagName("name")[0])?void 0:t.textContent)||"GPX Data",creator:o.documentElement.getAttribute("creator")||void 0}}},R=async e=>{let t=e.trim().split("\n"),r=t[0].split(",").map(e=>e.trim().toLowerCase()),n=r.findIndex(e=>e.includes("lat")),a=r.findIndex(e=>e.includes("lon")||e.includes("lng")),s=r.findIndex(e=>e.includes("name")||e.includes("title")),l=r.findIndex(e=>e.includes("desc")||e.includes("description")),o=r.findIndex(e=>e.includes("ele")||e.includes("elevation")||e.includes("alt"));if(-1===n||-1===a)throw Error("CSV file must contain latitude and longitude columns");let i=[];for(let e=1;e<t.length;e++){let r=t[e].split(",").map(e=>e.trim()),c=parseFloat(r[n]),m=parseFloat(r[a]);if(!isNaN(c)&&!isNaN(m)){let e={};-1!==s&&(e.name=r[s]),-1!==l&&(e.description=r[l]),-1!==o&&(e.elevation=parseFloat(r[o])||0),i.push({type:"Feature",properties:e,geometry:{type:"Point",coordinates:[m,c,e.elevation||0]}})}}return{type:"FeatureCollection",features:i,metadata:{name:"CSV Data"}}},B=async()=>{if(p){h(!0),y(null);try{let e,t,r;switch(k.outputFormat){case"kml":e=M(p),t="converted_".concat(Date.now(),".kml"),r="application/vnd.google-earth.kml+xml";break;case"gpx":e=_(p),t="converted_".concat(Date.now(),".gpx"),r="application/gpx+xml";break;case"geojson":e=JSON.stringify(p,null,2),t="converted_".concat(Date.now(),".geojson"),r="application/geo+json";break;case"csv":e=A(p),t="converted_".concat(Date.now(),".csv"),r="text/csv";break;default:throw Error("Unsupported output format")}let n=new Blob([e],{type:r}),a=URL.createObjectURL(n),s=document.createElement("a");s.href=a,s.download=t,document.body.appendChild(s),s.click(),document.body.removeChild(s),URL.revokeObjectURL(a),j("Successfully converted to ".concat(k.outputFormat.toUpperCase()))}catch(e){y(e instanceof Error?e.message:"Conversion failed")}finally{h(!1)}}},M=e=>{var t;let r='<?xml version="1.0" encoding="UTF-8"?>\n';return r+='<kml xmlns="http://www.opengis.net/kml/2.2">\n',r+=" <Document>\n",r+=" <name>".concat((null==(t=e.metadata)?void 0:t.name)||"Converted Data","</name>
1\n"),e.features.forEach(e=>{if(r+=" <Placemark>\n",e.properties.name&&(r+=" <name>".concat(e.properties.name,"</name>\n")),e.properties.description&&(r+=" <description>".concat(e.properties.description,"</description>\n")),"Point"===e.geometry.type){let[t,n,a]=e.geometry.coordinates;r+=" <Point>\n",r+=" <coordinates>".concat(t,",").concat(n,",").concat(a||0,"</coordinates>\n"),r+=" </Point>\n"}else"LineString"===e.geometry.type&&(r+=" <LineString>\n",r+=" <coordinates>",e.geometry.coordinates.forEach((e,t)=>{t>0&&(r+=" "),r+="".concat(e[0],",").concat(e[1],",").concat(e[2]||0)}),r+="</coordinates>\n",r+=" </LineString>\n");r+=" </Placemark>\n"}),r+=" </Document>\n",r+="</kml>"},_=e=>{var t;let r='<?xml version="1.0" encoding="UTF-8"?>\n';return r+='<gpx version="1.1" creator="GPS File Converter" xmlns="http://www.topografix.com/GPX/1/1">\n',r+=" <metadata>\n",r+=" <name>".concat((null==(t=e.metadata)?void 0:t.name)||"Converted Data","</name>\n"),r+=" </metadata>\n",e.features.forEach(e=>{if("Point"===e.geometry.type){let[t,n,a]=e.geometry.coordinates;r+=' <wpt lat="'.concat(n,'" lon="').concat(t,'">\n'),e.properties.name&&(r+=" <name>".concat(e.properties.name,"</name>\n")),e.properties.description&&(r+=" <desc>".concat(e.properties.description,"</desc>\n")),a&&(r+=" <ele>".concat(a,"</ele>\n")),r+=" </wpt>\n"}}),e.features.forEach(e=>{"LineString"===e.geometry.type&&(r+=" <trk>\n",e.properties.name&&(r+=" <name>".concat(e.properties.name,"</name>\n")),r+=" <trkseg>\n",e.geometry.coordinates.forEach(e=>{let[t,n,a]=e;r+=' <trkpt lat="'.concat(n,'" lon="').concat(t,'">\n'),a&&(r+=" <ele>".concat(a,"</ele>\n")),r+=" </trkpt>\n"}),r+=" </trkseg>\n",r+=" </trk>\n")}),r+="</gpx>"},A=e=>{let t="name,description,latitude,longitude,elevation\n";return e.features.forEach(e=>{if("Point"===e.geometry.type){let[r,n,a]=e.geometry.coordinates,s=e.properties.name||"",l=e.properties.description||"";t+='"'.concat(s,'","').concat(l,'",').concat(n,",").concat(r,",").concat(a||0,"\n")}else"LineString"===e.geometry.type&&e.geometry.coordinates.forEach((r,n)=>{let[a,s,l]=r,o="".concat(e.properties.name||"Track"," Point ").concat(n+1);t+='"'.concat(o,'","",').concat(s,",").concat(a,",").concat(l||0,"\n")})}),t};return(0,n.jsxs)("div",{className:"w-full space-y-4 sm:space-y-6",children:[(0,n.jsx)("div",{className:"bg-white rounded-xl shadow-sm border border-gray-200 p-4 sm:p-6 mb-4 sm:mb-6",children:(0,n.jsxs)("div",{className:"text-center",children:[(0,n.jsx)("input",{ref:S,type:"file",accept:".kml,.kmz,.gpx,.geojson,.csv",onChange:e=>{var t;let r=null==(t=e.target.files)?void 0:t[0];r&&z(r)},className:"hidden"}),(0,n.jsxs)("div",{className:"border-2 border-dashed border-primary-300 rounded-xl p-6 sm:p-8 cursor-pointer hover:border-primary-400 hover:bg-primary-50/30 transition-all duration-200 touch-manipulation",onClick:()=>{var e;return null==(e=S.current)?void 0:e.click()},children:[(0,n.jsx)(s.HVe,{className:"mx-auto text-primary-600 mb-3 sm:mb-4",size:36}),(0,n.jsx)("div",{className:"text-lg sm:text-xl font-semibold text-gray-900 mb-2",children:"Upload GPS File"}),(0,n.jsx)("p",{className:"text-gray-600 mb-3 sm:mb-4 text-sm sm:text-base",children:"Drag and drop or click to select a file"}),(0,n.jsx)("p",{className:"text-xs sm:text-sm text-gray-500",children:"Supported formats: KML, KMZ, GPX, GeoJSON, CSV"})]})]})}),b&&(0,n.jsxs)("div",{className:"bg-red-50 border border-red-200 rounded-lg p-3 sm:p-4 mb-4 sm:mb-6 flex items-start gap-2 sm:gap-3",children:[(0,n.jsx)(s.BS8,{className:"text-red-500 mt-0.5 flex-shrink-0",size:14}),(0,n.jsx)("span",{className:"text-red-700 text-sm sm:text-base break-words",children:b})]}),v&&(0,n.jsxs)("div",{className:"bg-green-50 border border-green-200 rounded-lg p-3 sm:p-4 mb-4 sm:mb-6 flex items-start gap-2 sm:gap-3",children:[(0,n.jsx)(s.CMH,{className:"text-green-500 mt-0.5 flex-shrink-0",size:14}),(0,n.jsx)("span",{className:"text-green-700 text-sm sm:text-base break-words",children:v})]}),r&&(0,n.jsxs)("div",{className:"bg-white rounded-xl shadow-sm border border-gray-200 p-4 sm:p-6 mb-4 sm:mb-6",children:[(0,n.jsxs)("div",{className:"flex items-start sm:items-center justify-between mb-4 gap-3",children:[(0,n.jsxs)("div",{className:"flex items-start sm:items-center gap-2 sm:gap-3 min-w-0 flex-1",children:[(0,n.jsx)(s.t69,{className:"text-primary-600 mt-0.5 sm:mt-0 flex-shrink-0",size:20}),(0,n.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,n.jsx)("div",{className:"font-semibold text-gray-900 text-sm sm:text-base break-words",children:r.name}),(0,n.jsxs)("p",{className:"text-xs sm:text-sm text-gray-600",children:[(r.size/1024).toFixed(1)," KB ⢠",(null==p?void 0:p.features.length)||0," features"]})]})]}),(0,n.jsx)("button",{onClick:()=>{m(null),x(null),E(null),y(null),j(null),L([39.8283,-98.5795]),U(4)}
1,className:"p-2 text-gray-500 hover:text-red-500 hover:bg-red-50 rounded-lg transition-all duration-200 touch-manipulation min-h-[40px] min-w-[40px] flex items-center justify-center flex-shrink-0",children:(0,n.jsx)(s.qbC,{size:14})})]}),(0,n.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-3 sm:gap-4",children:[(0,n.jsxs)("div",{children:[(0,n.jsx)("label",{className:"block text-sm font-medium text-gray-700 mb-2",children:"Output Format"}),(0,n.jsx)("select",{value:k.outputFormat,onChange:e=>C(t=>({...t,outputFormat:e.target.value})),className:"w-full px-3 sm:px-4 py-2 sm:py-3 border border-gray-300 rounded-lg focus:ring-4 focus:ring-primary-200 focus:border-primary-500 text-sm sm:text-base",children:u.SP.output.map(e=>(0,n.jsx)("option",{value:e,children:e.toUpperCase()},e))})]}),(0,n.jsx)("div",{className:"flex items-end",children:(0,n.jsxs)("button",{onClick:()=>w(!N),className:"w-full px-4 sm:px-6 py-2 sm:py-3 bg-primary-100 hover:bg-primary-200 text-primary-700 rounded-lg font-medium border border-primary-300 transition-all duration-200 flex items-center justify-center gap-2 touch-manipulation min-h-[44px]",children:[(0,n.jsx)(s.Pcn,{size:14}),(0,n.jsx)("span",{className:"text-sm sm:text-base",children:"Settings"})]})}),(0,n.jsx)("div",{className:"flex items-end",children:(0,n.jsxs)("button",{onClick:B,disabled:g,className:"w-full px-4 sm:px-6 py-2 sm:py-3 bg-primary-600 hover:bg-primary-700 text-white rounded-lg font-medium transition-all duration-200 flex items-center justify-center gap-2 disabled:opacity-50 disabled:cursor-not-allowed touch-manipulation min-h-[44px]",children:[(0,n.jsx)(s.WCW,{size:14}),(0,n.jsx)("span",{className:"text-sm sm:text-base",children:g?"Converting...":"Convert & Download"})]})})]}),N&&(0,n.jsxs)("div",{className:"mt-4 sm:mt-6 pt-4 sm:pt-6 border-t border-gray-200",children:[(0,n.jsx)("div",{className:"font-semibold text-gray-900 mb-3 sm:mb-4 text-sm sm:text-base",children:"Advanced Settings"}),(0,n.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4 sm:gap-6",children:[(0,n.jsx)("div",{children:(0,n.jsxs)("label",{className:"flex items-center gap-2 touch-manipulation",children:[(0,n.jsx)("input",{type:"checkbox",checked:k.includeElevation,onChange:e=>C(t=>({...t,includeElevation:e.target.checked})),className:"rounded text-primary-600 focus:ring-primary-200 min-w-[16px] min-h-[16px]"}),(0,n.jsx)("span",{className:"text-xs sm:text-sm text-gray-700",children:"Include Elevation Data"})]})}),(0,n.jsx)("div",{children:(0,n.jsxs)("label",{className:"flex items-center gap-2 touch-manipulation",children:[(0,n.jsx)("input",{type:"checkbox",checked:k.includeTimestamp,onChange:e=>C(t=>({...t,includeTimestamp:e.target.checked})),className:"rounded text-primary-600 focus:ring-primary-200 min-w-[16px] min-h-[16px]"}),(0,n.jsx)("span",{className:"text-xs sm:text-sm text-gray-700",children:"Include Timestamps"})]})}),(0,n.jsx)("div",{children:(0,n.jsxs)("label",{className:"flex items-center gap-2 touch-manipulation",children:[(0,n.jsx)("input",{type:"checkbox",checked:k.simplifyTracks,onChange:e=>C(t=>({...t,simplifyTracks:e.target.checked})),className:"rounded text-primary-600 focus:ring-primary-200 min-w-[16px] min-h-[16px]"}),(0,n.jsx)("span",{className:"text-xs sm:text-sm text-gray-700",children:"Simplify Tracks"})]})}),(0,n.jsxs)("div",{children:[(0,n.jsx)("label",{className:"block text-xs sm:text-sm font-medium text-gray-700 mb-2",children:"Coordinate Format"}),(0,n.jsxs)("select",{value:k.coordinateFormat,onChange:e=>C(t=>({...t,coordinateFormat:e.target.value})),className:"w-full px-3 sm:px-4 py-2 border border-gray-300 rounded-lg focus:ring-4 focus:ring-primary-200 focus:border-primary-500 text-xs sm:text-sm",children:[(0,n.jsx)("option",{value:"decimal",children:"Decimal Degrees"}),(0,n.jsx)("option",{value:"dms",children:"Degrees, Minutes, Seconds"})]})]})]})]})]}),(0,n.jsxs)("div",{className:"bg-gradient-to-br from-white to-emerald-50/50 rounded-2xl shadow-lg border border-emerald-100/50 overflow-hidden animate-slide-down",style:{animationDelay:"0.2s"},children:[(0,n.jsxs)("div",{className:"p-3 sm:p-4 border-b border-gray-200 flex items-center gap-2 sm:gap-3",children:[(0,n.jsx)(s.A4L,{className:"text-emerald-500",size:16}),(0,n.jsx)("div",{className:"font-semibold text-gray-900 text-sm sm:text-base",children:"Map Preview"})]}),(0,n.jsx)("div",{className:"w-full h-64 sm:h-96",style:{minHeight:"256px"},children:(0,n.jsxs)(l.W,{center:P,zoom:T,style:{height:"100%",width:"100%"},className:"rounded-b-2xl",children:[(0,n.jsx)(o.e,{url:"https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",attribution:'\xa9 <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'}),F&&F.features.map((e,t)=>{if("Point"===e.geometry.type){let[r,a]=e.geometry.coordinates;return(0,n.jsx)(i.p,{position:[a,r]},"point-".concat(t))}if("LineString"===e.geometry.type){let r=e.geometry.coordinates.map(e=>[e[1],e[0]]);return(0,n.jsx)(c.R,{positions:r,pathOptions:{color:"#059669",weight:3}},"line-".concat(t))}return null})]})})]})]})}},4755:(e,t,r)=>{"use strict";r.d(t,{W:()=>l});var n=r(70309),a=r(55027),s=r(12115);let l=(0,s.forwardRef)(function({bounds:e,boundsOptions:t,center:r,children:l,className:o,id:i,placeholder:c,style:m,whenReady:d,zoom:u,...p}
1,x){let[g]=(0,s.useState)({className:o,id:i,style:m}),[f,h]=(0,s.useState)(null),b=(0,s.useRef)(void 0);(0,s.useImperativeHandle)(x,()=>f?.map??null,[f]);let y=(0,s.useCallback)(s=>{if(null!==s&&!b.current){let l=new a.Map(s,p);b.current=l,null!=r&&null!=u?l.setView(r,u):null!=e&&l.fitBounds(e,t),null!=d&&l.whenReady(d),h((0,n.fB)(l))}},[]);(0,s.useEffect)(()=>()=>{f?.map.remove()},[f]);let v=f?s.createElement(n.dk,{value:f},l):c??null;return s.createElement("div",{...g,ref:y},v)})},5384:(e,t,r)=>{"use strict";r.d(t,{e:()=>o});var n=r(70055),a=r(85452),s=r(80514),l=r(55027);let o=(0,n.X3)(function({url:e,...t},r){let n=new l.TileLayer(e,(0,a.P)(t,r));return(0,s.Q)(n,r)},function(e,t,r){let{opacity:n,zIndex:a}=t;null!=n&&n!==r.opacity&&e.setOpacity(n),null!=a&&a!==r.zIndex&&e.setZIndex(a);let{url:s}=t;null!=s&&s!==r.url&&e.setUrl(s)})},17054:(e,t,r)=>{"use strict";r.d(t,{Po:()=>l,ko:()=>s});var n=r(70309),a=r(12115);function s(){return(0,n.U$)().map}function l(e){let t=s();return(0,a.useEffect)(function(){return t.on(e),function(){t.off(e)}},[t,e]),t}},20063:(e,t,r)=>{"use strict";var n=r(47260);r.o(n,"useParams")&&r.d(t,{useParams:function(){return n.useParams}}),r.o(n,"usePathname")&&r.d(t,{usePathname:function(){return n.usePathname}}),r.o(n,"useRouter")&&r.d(t,{useRouter:function(){return n.useRouter}}),r.o(n,"useSearchParams")&&r.d(t,{useSearchParams:function(){return n.useSearchParams}})},26264:(e,t,r)=>{"use strict";r.d(t,{p:()=>o});var n=r(70055),a=r(80514),s=r(70309),l=r(55027);let o=(0,n.Nq)(function({position:e,...t},r){let n=new l.Marker(e,t);return(0,a.Q)(n,(0,s.W4)(r,{overlayContainer:n}))},function(e,t,r){t.position!==r.position&&e.setLatLng(t.position),null!=t.icon&&t.icon!==r.icon&&e.setIcon(t.icon),null!=t.zIndexOffset&&t.zIndexOffset!==r.zIndexOffset&&e.setZIndexOffset(t.zIndexOffset),null!=t.opacity&&t.opacity!==r.opacity&&e.setOpacity(t.opacity),null!=e.dragging&&t.draggable!==r.draggable&&(!0===t.draggable?e.dragging.enable():e.dragging.disable())})},35603:()=>{},65761:(e,t,r)=>{"use strict";r.d(t,{R:()=>o});var n=r(70055),a=r(80514),s=r(70309),l=r(55027);let o=(0,n.Lt)(function({positions:e,...t},r){let n=new l.Polyline(e,t);return(0,a.Q)(n,(0,s.W4)(r,{overlayContainer:n}))},function(e,t,r){t.positions!==r.positions&&e.setLatLngs(t.positions)})},70055:(e,t,r)=>{"use strict";r.d(t,{Nq:()=>p,wk:()=>x,Lt:()=>g,X3:()=>f});var n=r(12115),a=r(47650),s=r(70309);function l(e){return(0,n.forwardRef)(function(t,r){let{instance:a,context:l}=e(t).current;(0,n.useImperativeHandle)(r,()=>a);let{children:o}=t;return null==o?null:n.createElement(s.dk,{value:l},o)})}function o(e,t){let r=(0,n.useRef)(t);(0,n.useEffect)(function(){t!==r.current&&null!=e.attributionControl&&(null!=r.current&&e.attributionControl.removeAttribution(r.current),null!=t&&e.attributionControl.addAttribution(t)),r.current=t},[e,t])}function i(e,t){let r=(0,n.useRef)(void 0);(0,n.useEffect)(function(){return null!=t&&e.instance.on(t),r.current=t,function(){null!=r.current&&e.instance.off(r.current),r.current=null}},[e,t])}var c=r(85452),m=r(80514);function d(e,t){(0,n.useEffect)(function(){return(t.layerContainer??t.map).addLayer(e.instance),function(){t.layerContainer?.removeLayer(e.instance),t.map.removeLayer(e.instance)}},[t,e])}function u(e){return function(t){let r=(0,s.U$)(),n=e((0,c.P)(t,r),r);return o(r.map,t.attribution),i(n.current,t.eventHandlers),d(n.current,r),n}}function p(e,t){return l(u((0,m.K)(e,t)))}function x(e,t){var r,l;return r=(0,m.K)(e),l=function(e,n){let a=(0,s.U$)(),l=r((0,c.P)(e,a),a);return o(a.map,e.attribution),i(l.current,e.eventHandlers),t(l.current,a,e,n),l},(0,n.forwardRef)(function(e,t){let[r,s]=(0,n.useState)(!1),{instance:o}=l(e,s).current;(0,n.useImperativeHandle)(t,()=>o),(0,n.useEffect)(function(){r&&o.update()},[o,r,e.children]);let i=o._contentNode;return i?(0,a.createPortal)(e.children,i):null})}function g(e,t){var r;return l((r=(0,m.K)(e,t),function(e){let t=(0,s.U$)(),a=r((0,c.P)(e,t),t);i(a.current,e.eventHandlers),d(a.current,t);var l=a.current;let o=(0,n.useRef)(void 0);return(0,n.useEffect)(function(){if(e.pathOptions!==o.current){let t=e.pathOptions??{};l.instance.setStyle(t),o.current=t}},[l,e]),a}))}function f(e,t){var r;return r=u((0,m.K)(e,t)),(0,n.forwardRef)(function(e,t){let{instance:a}=r(e).current;return(0,n.useImperativeHandle)(t,()=>a),null})}}
1,70309:(e,t,r)=>{"use strict";r.d(t,{U$:()=>o,W4:()=>s,dk:()=>l,fB:()=>a});var n=r(12115);function a(e){return Object.freeze({__version:1,map:e})}function s(e,t){return Object.freeze({...e,...t})}let l=(0,n.createContext)(null);function o(){let e=(0,n.use)(l);if(null==e)throw Error("No context provided: useLeafletContext() can only be used in a descendant of <MapContainer>");return e}},80514:(e,t,r)=>{"use strict";r.d(t,{K:()=>s,Q:()=>a});var n=r(12115);function a(e,t,r){return Object.freeze({instance:e,context:t,container:r})}function s(e,t){return null==t?function(t,r){let a=(0,n.useRef)(void 0);return a.current||(a.current=e(t,r)),a}:function(r,a){let s=(0,n.useRef)(void 0);s.current||(s.current=e(r,a));let l=(0,n.useRef)(r),{instance:o}=s.current;return(0,n.useEffect)(function(){l.current!==r&&(t(o,r,l.current),l.current=r)},[o,r,t]),s}}},85452:(e,t,r)=>{"use strict";function n(e,t){let r=e.pane??t.pane;return r?{...e,pane:r}:e}r.d(t,{P:()=>n})}}]);
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.