ocearo-ui 0.1.19 → 0.1.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (51) hide show
  1. package/404.html +1 -1
  2. package/__next.__PAGE__.txt +2 -2
  3. package/__next._full.txt +3 -3
  4. package/__next._head.txt +1 -1
  5. package/__next._index.txt +2 -2
  6. package/__next._tree.txt +2 -2
  7. package/_next/static/chunks/{0s7ev9xt6xz5c.js → 009rlietvsaq2.js} +1 -1
  8. package/_next/static/chunks/08gn5_gd6amkq.js +1 -0
  9. package/_next/static/chunks/{1g21fvp1vxlol.js → 0jzbiie0nzar2.js} +1 -1
  10. package/_next/static/chunks/0utifqhyv2cuc.js +1 -0
  11. package/_next/static/chunks/0wzr1__so6xme.js +1 -0
  12. package/_next/static/chunks/{00b24tu3xognr.js → 11ln9lzzbo35q.js} +1 -1
  13. package/_next/static/chunks/1wv5e5qomv-7g.css +3 -0
  14. package/_next/static/chunks/{1phpmupk6twat.js → 29-ag86gvlc40.js} +2 -2
  15. package/_next/static/chunks/2a0yjir_3mk1m.js +1 -0
  16. package/_next/static/chunks/{1v9sx2zvvfu7m.js → 2baz6j1q913qw.js} +1 -1
  17. package/_next/static/chunks/{0vwsugj7n9_96.js → 2lez3uww9j4t0.js} +4 -4
  18. package/_next/static/chunks/{1i35u7m1a-aq5.js → 2nxsyowmuwpjy.js} +1 -1
  19. package/_next/static/chunks/2pwmb4pkqygy_.js +1 -0
  20. package/_next/static/chunks/{20srrp2o3xsog.js → 2yghvponatk1x.js} +4 -4
  21. package/_next/static/chunks/{36gcdml-8hccp.js → 31i14-jemhnic.js} +4 -4
  22. package/_next/static/chunks/3rhgquok36e79.js +1 -0
  23. package/_not-found/__next._full.txt +2 -2
  24. package/_not-found/__next._head.txt +1 -1
  25. package/_not-found/__next._index.txt +2 -2
  26. package/_not-found/__next._not-found.__PAGE__.txt +1 -1
  27. package/_not-found/__next._not-found.txt +1 -1
  28. package/_not-found/__next._tree.txt +2 -2
  29. package/_not-found.html +1 -1
  30. package/_not-found.txt +2 -2
  31. package/index.html +1 -1
  32. package/index.txt +3 -3
  33. package/package.json +1 -1
  34. package/settings/__next._full.txt +2 -2
  35. package/settings/__next._head.txt +1 -1
  36. package/settings/__next._index.txt +2 -2
  37. package/settings/__next._tree.txt +2 -2
  38. package/settings/__next.settings.__PAGE__.txt +1 -1
  39. package/settings/__next.settings.txt +1 -1
  40. package/settings.html +1 -1
  41. package/settings.txt +2 -2
  42. package/_next/static/chunks/04lomm-6r6u_y.js +0 -1
  43. package/_next/static/chunks/0wo1zlwo1g8cn.js +0 -1
  44. package/_next/static/chunks/1g27qus1wjpzi.js +0 -1
  45. package/_next/static/chunks/1o473gsiw2s6h.js +0 -1
  46. package/_next/static/chunks/29vh6vtwjqpju.js +0 -1
  47. package/_next/static/chunks/2jrvtsuq91xny.js +0 -1
  48. package/_next/static/chunks/3v7kbzxs8nq6c.css +0 -3
  49. /package/_next/static/{lbW36T5aysKW1OT6h1JDF → hlKDicTyNGfd7dmHqo5m5}/_buildManifest.js +0 -0
  50. /package/_next/static/{lbW36T5aysKW1OT6h1JDF → hlKDicTyNGfd7dmHqo5m5}/_clientMiddlewareManifest.js +0 -0
  51. /package/_next/static/{lbW36T5aysKW1OT6h1JDF → hlKDicTyNGfd7dmHqo5m5}/_ssgManifest.js +0 -0
@@ -439,7 +439,7 @@
439
439
 
440
440
  #include <tonemapping_fragment>
441
441
  #include <${R>=154?"colorspace_fragment":"encodings_fragment"}>
442
- }`})}}let L=e=>new z.Vector3().setFromSpherical(new z.Spherical(e,Math.acos(1-2*Math.random()),2*Math.random()*Math.PI)),U=s.forwardRef(({radius:e=100,depth:t=50,count:r=5e3,saturation:n=0,factor:i=4,fade:o=!1,speed:a=1},l)=>{let c=s.useRef(null),[u,d,f]=s.useMemo(()=>{let o=[],a=[],l=Array.from({length:r},()=>(.5+.5*Math.random())*i),s=new z.Color,c=e+t,u=t/r;for(let e=0;e<r;e++)c-=u*Math.random(),o.push(...L(c).toArray()),s.setHSL(e/r,n,.9),a.push(s.r,s.g,s.b);return[new Float32Array(o),new Float32Array(a),new Float32Array(l)]},[r,t,i,e,n]);(0,p.useFrame)(e=>c.current&&(c.current.uniforms.time.value=e.clock.elapsedTime*a));let[m]=s.useState(()=>new D);return s.createElement("points",{ref:l},s.createElement("bufferGeometry",null,s.createElement("bufferAttribute",{attach:"attributes-position",args:[u,3]}),s.createElement("bufferAttribute",{attach:"attributes-color",args:[d,3]}),s.createElement("bufferAttribute",{attach:"attributes-size",args:[f,1]})),s.createElement("primitive",{ref:c,object:m,attach:"material",blending:z.AdditiveBlending,"uniforms-fade-value":o,depthWrite:!1,transparent:!0,vertexColors:!0}))});var O=e.i(83402);(0,h.extend)({Water:E,Sky:_});let I=new v.Color(17510),B=new v.Color(517),V=new v.Color,G=new v.Color,F=function({lite:e=!1}){let{nightMode:t,setNightMode:r}=(0,g.useOcearoContext)(),{getWindData:n,getCurrentWeather:i}=(0,A.useWeather)(),o=(0,s.useRef)(),a=(0,s.useRef)(),c=(0,s.useRef)(),u=(0,s.useRef)(),d=(0,s.useRef)(null),f=(0,x.useSignalKPath)("navigation.position"),m=(0,s.useRef)(null);(0,s.useEffect)(()=>{m.current=f},[f]);let h=(0,s.useRef)(0),y=(0,s.useRef)(1),w=(0,M.useThree)(e=>e.gl),b=(0,M.useThree)(e=>e.scene),C=(0,s.useMemo)(()=>new v.Vector3,[]),P=j("assets/moon.jpg"),_=(0,S.useLoader)(v.TextureLoader,"assets/waternormals.jpg");(0,s.useMemo)(()=>{_.wrapS=_.wrapT=v.RepeatWrapping},[_]);let T=(0,s.useMemo)(()=>new v.PlaneGeometry(4e3,4e3,144,144),[]),z=(0,s.useMemo)(()=>new v.MeshBasicMaterial({color:73776}),[]),R=(0,s.useRef)({waveAmp:{value:0},waveTime:{value:0}}),D=(0,s.useRef)(),L=(0,s.useRef)(),F=(0,s.useRef)(!1),N=(0,s.useMemo)(()=>{let e=document.createElement("canvas");e.width=e.height=128;let t=e.getContext("2d"),r=t.createRadialGradient(64,64,8,64,64,62);return r.addColorStop(0,"rgba(255,255,255,0.85)"),r.addColorStop(.55,"rgba(255,255,255,0.35)"),r.addColorStop(1,"rgba(255,255,255,0)"),t.fillStyle=r,t.fillRect(0,0,128,128),new v.CanvasTexture(e)},[]),k=(0,s.useMemo)(()=>{let e=[];for(let t=0;t<16;t++){let r=t/16*Math.PI*2+.6*Math.random(),n=500+1200*Math.random();e.push({position:[Math.cos(r)*n,260+180*Math.random(),Math.sin(r)*n],scale:[420+380*Math.random(),150+120*Math.random(),1]})}return e},[]),W=(0,s.useMemo)(()=>new v.SpriteMaterial({map:N,transparent:!0,opacity:0,depthWrite:!1,color:0xffffff}),[N]),H=(0,s.useMemo)(()=>{let e=new Float32Array(3600);for(let t=0;t<1200;t++)e[3*t]=(2*Math.random()-1)*240,e[3*t+1]=220*Math.random(),e[3*t+2]=(2*Math.random()-1)*240;let t=new v.BufferGeometry;return t.setAttribute("position",new v.BufferAttribute(e,3)),t},[]),$=(0,s.useMemo)(()=>new v.PointsMaterial({color:0x9fc4d8,size:1.6,transparent:!0,opacity:.55,depthWrite:!1,sizeAttenuation:!0}),[]),Z=(0,s.useMemo)(()=>({textureWidth:256,textureHeight:256,waterNormals:_,sunDirection:new v.Vector3,sunColor:0xffffff,waterColor:7695,distortionScale:3.7,fog:void 0!==b.fog,format:w.outputColorSpace}),[_,w.outputColorSpace,b.fog]),K=(0,s.useMemo)(()=>{if(e)return null;let t=new E(T,Z),r=R.current;return t.material.onBeforeCompile=e=>{e.uniforms.waveAmp=r.waveAmp,e.uniforms.waveTime=r.waveTime,e.vertexShader=e.vertexShader.replace("void main() {",`
442
+ }`})}}let L=e=>new z.Vector3().setFromSpherical(new z.Spherical(e,Math.acos(1-2*Math.random()),2*Math.random()*Math.PI)),U=s.forwardRef(({radius:e=100,depth:t=50,count:r=5e3,saturation:n=0,factor:i=4,fade:o=!1,speed:a=1},l)=>{let c=s.useRef(null),[u,d,f]=s.useMemo(()=>{let o=[],a=[],l=Array.from({length:r},()=>(.5+.5*Math.random())*i),s=new z.Color,c=e+t,u=t/r;for(let e=0;e<r;e++)c-=u*Math.random(),o.push(...L(c).toArray()),s.setHSL(e/r,n,.9),a.push(s.r,s.g,s.b);return[new Float32Array(o),new Float32Array(a),new Float32Array(l)]},[r,t,i,e,n]);(0,p.useFrame)(e=>c.current&&(c.current.uniforms.time.value=e.clock.elapsedTime*a));let[m]=s.useState(()=>new D);return s.createElement("points",{ref:l},s.createElement("bufferGeometry",null,s.createElement("bufferAttribute",{attach:"attributes-position",args:[u,3]}),s.createElement("bufferAttribute",{attach:"attributes-color",args:[d,3]}),s.createElement("bufferAttribute",{attach:"attributes-size",args:[f,1]})),s.createElement("primitive",{ref:c,object:m,attach:"material",blending:z.AdditiveBlending,"uniforms-fade-value":o,depthWrite:!1,transparent:!0,vertexColors:!0}))});var O=e.i(83402);(0,h.extend)({Water:E,Sky:_});let I=new v.Color(17510),B=new v.Color(517),V=new v.Color(0xb4cbd1),G=new v.Color,F=new v.Color,N=function({lite:e=!1}){let{nightMode:t,setNightMode:r}=(0,g.useOcearoContext)(),{getWindData:n,getCurrentWeather:i}=(0,A.useWeather)(),o=(0,s.useRef)(),a=(0,s.useRef)(),c=(0,s.useRef)(),u=(0,s.useRef)(),d=(0,s.useRef)(null),f=(0,x.useSignalKPath)("navigation.position"),m=(0,s.useRef)(null);(0,s.useEffect)(()=>{m.current=f},[f]);let h=(0,s.useRef)(0),y=(0,s.useRef)(1),w=(0,M.useThree)(e=>e.gl),b=(0,M.useThree)(e=>e.scene),C=(0,s.useMemo)(()=>new v.Vector3,[]),P=j("assets/moon.jpg"),_=(0,S.useLoader)(v.TextureLoader,"assets/waternormals.jpg");(0,s.useMemo)(()=>{_.wrapS=_.wrapT=v.RepeatWrapping},[_]);let T=(0,s.useMemo)(()=>new v.PlaneGeometry(4e3,4e3,144,144),[]),z=(0,s.useMemo)(()=>new v.MeshBasicMaterial({color:0xb4cbd1}),[]),R=(0,s.useRef)({waveAmp:{value:0},waveTime:{value:0}}),D=(0,s.useRef)(),L=(0,s.useRef)(),N=(0,s.useRef)(!1),k=(0,s.useMemo)(()=>{let e=document.createElement("canvas");e.width=e.height=128;let t=e.getContext("2d"),r=t.createRadialGradient(64,64,8,64,64,62);return r.addColorStop(0,"rgba(255,255,255,0.85)"),r.addColorStop(.55,"rgba(255,255,255,0.35)"),r.addColorStop(1,"rgba(255,255,255,0)"),t.fillStyle=r,t.fillRect(0,0,128,128),new v.CanvasTexture(e)},[]),W=(0,s.useMemo)(()=>{let e=[];for(let t=0;t<16;t++){let r=t/16*Math.PI*2+.6*Math.random(),n=500+1200*Math.random();e.push({position:[Math.cos(r)*n,260+180*Math.random(),Math.sin(r)*n],scale:[420+380*Math.random(),150+120*Math.random(),1]})}return e},[]),H=(0,s.useMemo)(()=>new v.SpriteMaterial({map:k,transparent:!0,opacity:0,depthWrite:!1,color:0xffffff}),[k]),$=(0,s.useMemo)(()=>{let e=new Float32Array(3600);for(let t=0;t<1200;t++)e[3*t]=(2*Math.random()-1)*240,e[3*t+1]=220*Math.random(),e[3*t+2]=(2*Math.random()-1)*240;let t=new v.BufferGeometry;return t.setAttribute("position",new v.BufferAttribute(e,3)),t},[]),Z=(0,s.useMemo)(()=>new v.PointsMaterial({color:0x9fc4d8,size:1.6,transparent:!0,opacity:.55,depthWrite:!1,sizeAttenuation:!0}),[]),K=(0,s.useMemo)(()=>({textureWidth:256,textureHeight:256,waterNormals:_,sunDirection:new v.Vector3,sunColor:0xffffff,waterColor:7695,distortionScale:3.7,fog:void 0!==b.fog,format:w.outputColorSpace}),[_,w.outputColorSpace,b.fog]),X=(0,s.useMemo)(()=>{if(e)return null;let t=new E(T,K),r=R.current;return t.material.onBeforeCompile=e=>{e.uniforms.waveAmp=r.waveAmp,e.uniforms.waveTime=r.waveTime,e.vertexShader=e.vertexShader.replace("void main() {",`
443
443
  uniform float waveAmp;
444
444
  uniform float waveTime;
445
445
  vec3 swellDisplace(vec3 p) {
@@ -452,7 +452,7 @@
452
452
  }
453
453
  void main() {
454
454
  vec3 wavePos = swellDisplace(position);
455
- `).replace(/vec4\( position, 1.0 \)/g,"vec4( wavePos, 1.0 )")},t},[T,Z,e]);return(0,p.useFrame)((r,l)=>{if(o.current&&(o.current.material.uniforms.time.value+=.5*l),R.current.waveTime.value+=l,D.current&&D.current.visible&&(D.current.rotation.y+=.004*l),L.current&&F.current){let e=L.current.geometry.attributes.position,t=e.array,r=160*l;for(let e=1;e<t.length;e+=3)t[e]-=r,t[e]<0&&(t[e]+=220);e.needsUpdate=!0}if(y.current+=l,y.current<1)return;let s=y.current;y.current=0;let f=m.current,p=f&&"number"==typeof f.latitude?f.latitude:46.15,g=f&&"number"==typeof f.longitude?f.longitude:-1.15,x=new Date,w=O.default.get("debugMode"),M=x;if(w){null===d.current&&(d.current=Date.now());let e=(Date.now()-d.current)/1e3*720%86400,t=Math.floor(e/3600),r=Math.floor(e%3600/60),n=new Date(x.getTime());n.setHours(t,r,0,0),M=n}let S=new Date(M.getFullYear(),0,0),b=M-S+(S.getTimezoneOffset()-M.getTimezoneOffset())*6e4,E=Math.PI/180,P=180/Math.PI,_=M.getHours(),A=M.getMinutes(),T=2*Math.PI/365*(b/864e5-1+(_-12)/24),j=229.18*(75e-6+.001868*Math.cos(T)-.032077*Math.sin(T)-.014615*Math.cos(2*T)-.040849*Math.sin(2*T)),U=.006918-.399912*Math.cos(T)+.070257*Math.sin(T)-.006758*Math.cos(2*T)+907e-6*Math.sin(2*T)-.002697*Math.cos(3*T)+.00148*Math.sin(3*T),N=((60*_+A+(j+4*g- -M.getTimezoneOffset())+1440)%1440/4-180)*E,k=p*E,H=90-Math.acos(Math.min(Math.max(Math.sin(k)*Math.sin(U)+Math.cos(k)*Math.cos(U)*Math.cos(N),-1),1))*P,Z=(Math.atan2(Math.sin(N),Math.cos(N)*Math.sin(k)-Math.tan(U)*Math.cos(k))*P+360)%360,K=0;K=H<=-10?1:H>=5?0:(5-H)/15;let X=t||H<=-5,q=X?Math.max(H,20):Math.max(H,5),Y=v.MathUtils.degToRad(90-q),Q=v.MathUtils.degToRad(Z);if(C.setFromSphericalCoords(1,Y,Q),o.current){let e=n()?.speed??5;h.current+=(e-h.current)*Math.min(.5*s,1);let t=Math.min(Math.max(.5*h.current,0),8),r=o.current.material.uniforms;r.distortionScale.value=t,r.sunDirection.value.copy(C).normalize();let i=O.default.get("aisLengthScalingFactor")||.7,a=Math.min(.21*h.current**2/9.81,6);R.current.waveAmp.value=a/2*i,V.copy(I).lerp(B,K),r.sunColor.value.setHex(X?4491519:0xffffff),r.waterColor.value.copy(V)}e&&(V.copy(I).lerp(B,K),z.color.copy(V).multiplyScalar(1.6));let J=i(),ee=Math.min(Math.max(J?.cloudCover??0,0),1),et=Math.max(J?.rain??0,0),er=et>.05;if(D.current){D.current.visible=ee>.08;let e=(1-.7*K)*(er?.55:1);G.setScalar(e),W.color.copy(G),W.opacity=.15+.55*ee}if(F.current=er,L.current&&(L.current.visible=er,$.opacity=Math.min(.3+.15*et,.75)),a.current){let e=a.current.material.uniforms,t={turbidity:.5+.5*(J?.humidity??.6)+9*ee+4*!!er,rayleigh:1.2*(1-.5*ee),mieCoefficient:.005+.02*ee,mieDirectionalG:.8},r={turbidity:.05,rayleigh:.1,mieCoefficient:5e-4,mieDirectionalG:.95},n=e=>t[e]+(r[e]-t[e])*K;e.turbidity.value=n("turbidity"),e.rayleigh.value=n("rayleigh"),e.mieCoefficient.value=n("mieCoefficient"),e.mieDirectionalG.value=n("mieDirectionalG"),e.sunPosition.value.copy(C)}u.current&&(u.current.position.copy(C).multiplyScalar(4e3),u.current.visible=!X),c.current&&(c.current.position.copy(C).multiplyScalar(4e3),c.current.visible=X,c.current.lookAt(0,0,0))}),(0,s.useEffect)(()=>{let e=new v.Color(t?517:6694);return b.background=e,b.fog=new v.FogExp2(e,35e-5),w.outputColorSpace=v.SRGBColorSpace,()=>{b.background=null,b.fog=null}},[b,t,w]),(0,l.jsxs)(l.Fragment,{children:[t&&(0,l.jsx)(U,{radius:5e3,depth:50,count:1500,factor:4,saturation:0,fade:!0,speed:1}),(0,l.jsx)("sky",{ref:a,scale:45e4}),t&&(0,l.jsxs)("mesh",{ref:c,position:[600,200,-1500],children:[(0,l.jsx)("sphereGeometry",{args:[80,32,32]}),(0,l.jsx)("meshStandardMaterial",{map:P,emissive:0xffffff,emissiveIntensity:.8})]}),(0,l.jsxs)("mesh",{ref:u,children:[(0,l.jsx)("sphereGeometry",{args:[200,32,32]}),(0,l.jsx)("meshBasicMaterial",{color:0xffffff})]}),(0,l.jsx)("group",{ref:D,visible:!1,children:k.map((e,t)=>(0,l.jsx)("sprite",{position:e.position,scale:e.scale,material:W},t))}),(0,l.jsx)("points",{ref:L,geometry:H,material:$,visible:!1}),e?(0,l.jsx)("mesh",{geometry:T,material:z,"rotation-x":-Math.PI/2,position:[0,-.3,0]}):(0,l.jsx)("primitive",{ref:o,object:K,"rotation-x":-Math.PI/2,position:[0,-.3,0]})]})},N="https://tile.openstreetmap.org/{z}/{x}/{y}.png",k="https://tiles.openseamap.org/seamark/{z}/{x}/{y}.png",W="https://tiles.windy.com/tiles/v10.0/wind/{z}/{x}/{y}.png",H="saturate(1.8) contrast(1.35)",$="brightness(0.72) saturate(1.15) contrast(1.05)";function Z(e,t,r,n){return e.replace("{z}",t).replace("{x}",r).replace("{y}",n)}function K(e,t){return 156543.03*Math.cos(e*Math.PI/180)/Math.pow(2,t)}let X=new Map;function q(e){if(X.has(e))return X.get(e);let t=new Promise(t=>{let r=new Image;r.crossOrigin="anonymous",r.onload=()=>t(r),r.onerror=()=>t(null),r.src=e});return X.set(e,t),t}async function Y(e,t,r,n){let i=await q(Z(e,t,r,n));if(i)return{img:i,sx:0,sy:0,sSize:256};for(let o=1;o<=3&&t-o>=1;o++){let a=t-o,l=r>>o,s=n>>o;if(i=await q(Z(e,a,l,s))){let e=256/Math.pow(2,o);return{img:i,sx:(r-(l<<o))*e,sy:(n-(s<<o))*e,sSize:e}}}return null}async function Q(e,t,r,n,i=1,o="none"){let a,{latitude:l,longitude:s}=t,c=256*i;e.filter=o;let u=(s+180)/360*Math.pow(2,r),d=(1-Math.log(Math.tan(a=l*Math.PI/180)+1/Math.cos(a))/Math.PI)/2*Math.pow(2,r),f=u*c-512,m=d*c-512,p=Math.floor(f/c),h=Math.floor(m/c),v=Math.ceil(1024/c)+2,g=Math.pow(2,r),x=[];for(let e=0;e<v;e++)for(let t=0;t<v;t++){let n=p+t,i=h+e;if(i<0||i>=g)continue;let o=(n%g+g)%g,a=Math.round(n*c-f),l=Math.round(i*c-m);x.push({z:r,x:o,y:i,screenLeft:a,screenTop:l})}let y=await Promise.all(x.map(e=>Y(n,e.z,e.x,e.y)));for(let t=0;t<x.length;t++){let r=y[t];if(!r)continue;let{screenLeft:n,screenTop:i}=x[t];e.drawImage(r.img,r.sx,r.sy,r.sSize,r.sSize,n,i,c,c)}e.filter="none"}async function J(e,t,r,n){let i=e.getContext("2d");for(let e of(i.clearRect(0,0,1024,1024),n)){if(!e?.template)continue;let n=Math.min(r,e.maxZoom??r),o=Math.pow(2,r-n);await Q(i,t,n,e.template,o,e.filter||"none")}}function ee({mode:e="chart"}){let t=(0,s.useRef)(),r=(0,s.useRef)(null),n=(0,s.useRef)(null),i=(0,s.useRef)(!1),o=(0,s.useRef)({position:null,zoom:null}),a=(0,s.useRef)(0),c=(0,s.useRef)("meteo"===e?[{template:N,maxZoom:19,filter:$},{template:W,maxZoom:11,filter:H}]:[{template:N,maxZoom:19,filter:$},{template:k,maxZoom:18}]),{gl:u}=(0,M.useThree)(),d=O.default.get("aisLengthScalingFactor")||.7,[f,m]=(0,s.useState)(16),[h,g]=(0,s.useState)(500),y=(0,x.useSignalKPath)("navigation.position"),w=(0,s.useRef)(null);(0,s.useEffect)(()=>{w.current=y},[y]);let S=y?.latitude!=null&&y?.longitude!=null;(0,p.useFrame)(({camera:t})=>{if(a.current++,a.current%15!=0)return;let r=w.current;if(r?.latitude==null)return;let n=Math.min(Math.max(4*(t.position.length()/d),"meteo"===e?4e4:500),6e4),i=Math.max(3,Math.min("meteo"===e?11:c.current[0]?.template===N?19:18,Math.round(Math.log2(156543.03*Math.cos(r.latitude*Math.PI/180)/(n/1024)))));i!==f&&m(i)});let b=(0,s.useCallback)((e=!1)=>{if(i.current)return;let t=w.current;if(t?.latitude==null||t?.longitude==null)return;let a=o.current;if(!e&&a.position&&a.zoom===f){let e=48*K(t.latitude,f)/111320,r=Math.abs(t.latitude-a.position.latitude),n=Math.abs(t.longitude-a.position.longitude);if(r<e&&n<e)return}let l=r.current,s=n.current;l&&s&&(i.current=!0,o.current={position:t,zoom:f},g(1024*K(t.latitude,f)/2*d),J(l,t,f,c.current).then(()=>{s.needsUpdate=!0,i.current=!1}))},[f,d]);(0,s.useEffect)(()=>{let e=document.createElement("canvas");e.width=1024,e.height=1024,r.current=e;let i=new v.CanvasTexture(e);return i.minFilter=v.LinearMipmapLinearFilter,i.magFilter=v.LinearFilter,i.anisotropy=u.capabilities.getMaxAnisotropy(),i.generateMipmaps=!0,n.current=i,t.current&&(t.current.material.map=i,t.current.material.needsUpdate=!0),()=>{i.dispose()}},[u]),(0,s.useEffect)(()=>{if("meteo"===e){c.current=[{template:N,maxZoom:19,filter:$},{template:W,maxZoom:11,filter:H}],b(!0),fetch("https://api.rainviewer.com/public/weather-maps.json").then(e=>e.json()).then(e=>{let t=e?.radar?.past,r=t?.[t.length-1]?.path;r&&(c.current=[...c.current,{template:`https://tilecache.rainviewer.com${r}/256/{z}/{x}/{y}/2/1_1.png`,maxZoom:12}],b(!0))}).catch(()=>{});return}let t=O.default.getAll().signalkUrl||"http://localhost:3000";fetch(`${t}/signalk/v1/api/resources/charts`).then(e=>e.json()).then(e=>{if(!e||"object"!=typeof e)return;let t=Object.values(e),r=t.find(e=>"openstreetmap"!==e.identifier&&e.tilemapUrl)||t.find(e=>e.tilemapUrl);r?.tilemapUrl&&(c.current=[{template:r.tilemapUrl.includes("{z}")?r.tilemapUrl:`${r.tilemapUrl}/{z}/{x}/{y}.png`,maxZoom:18}]),b(!0)}).catch(()=>{c.current=[{template:N,maxZoom:19,filter:$},{template:k,maxZoom:18}],b(!0)})},[e,b]),(0,s.useEffect)(()=>{b()},[y,e,f]),(0,s.useEffect)(()=>{t.current&&n.current&&(t.current.material.map=n.current,t.current.material.needsUpdate=!0)});let C=(0,s.useMemo)(()=>new v.PlaneGeometry(2*h,2*h),[h]),E=(0,s.useMemo)(()=>new v.MeshBasicMaterial({side:v.DoubleSide,transparent:!1}),[]);return S?(0,l.jsx)("mesh",{ref:t,geometry:C,material:E,rotation:[-Math.PI/2,0,0],position:[0,-.1,0]}):null}var et=e.i(46991),er=e.i(62588),en=e.i(47167),ei=e.i(78140);let eo=en.default.env.ASSET_PREFIX||"./",ea={},el={30:.1,36:.15,37:.1},es=`${eo}/draco/`;function ec({code:e,scaleFactor:t}){let{scene:r}=(0,ei.useGLTF)(`${eo}/boats/ais/ais-${e}.glb`,es),n=(0,s.useMemo)(()=>{let t=r.clone(!0);t.traverse(e=>{e.isMesh&&(e.material=new v.MeshStandardMaterial({color:0xeef2f5,roughness:.7,metalness:.1}),e.castShadow=!1,e.receiveShadow=!1)});let n=new v.Box3().setFromObject(t),i=new v.Vector3,o=new v.Vector3;n.getSize(i),n.getCenter(o);let a=i.x>=i.z,l=Math.max(i.x,i.z)||1,s=l*(el[e]??.06);t.position.set(-o.x,-n.min.y-s,-o.z);let c=new v.Group;return c.add(t),c.scale.setScalar(10/l),c.rotation.y=(a?Math.PI/2:0)+(ea[e]||0),c},[r,e]);return(0,l.jsx)("group",{scale:t,children:(0,l.jsx)("primitive",{object:n})})}let eu=({position:e,visible:t,boatData:r,onClick:n,ref:i})=>{let o,a=Number.isFinite(o=Number(r.shipType))?30===o?30:o>=31&&o<=32?31:o>=33&&o<=35?35:36===o?36:37===o?37:o>=40&&o<=49?40:o>=50&&o<=59?50:o>=60&&o<=69?60:o>=70&&o<=79?70:o>=80&&o<=89?80:70:70,c=Math.max(r.length||10,4);return(0,l.jsx)("group",{ref:i,position:e,visible:t,onClick:e=>{e.stopPropagation(),n&&n(r)},children:(0,l.jsx)(s.Suspense,{fallback:null,children:(0,l.jsx)(ec,{code:a,scaleFactor:c/10})})})},ed=new v.Vector3,ef=new v.Quaternion,em=new v.Quaternion,ep=new v.Euler,eh=e=>{if(e.isMesh&&e.material)return e;if(e.children?.length)for(let t of e.children){let e=eh(t);if(e)return e}return null},ev=({onUpdateInfoPanel:e})=>{let{aisData:t,vesselIds:r}=(0,er.useAIS)(),n=(0,s.useRef)({}),i=(0,s.useRef)({}),o=(0,s.useRef)({}),[a,c]=(0,s.useState)(null),u=(0,s.useMemo)(()=>["navigation.headingTrue","navigation.headingMagnetic","navigation.courseOverGroundTrue","navigation.courseOverGroundMagnetic"],[]),d=(0,x.useSignalKPaths)(u),f=(0,s.useMemo)(()=>{let e=d["navigation.headingTrue"]||d["navigation.headingMagnetic"],t=d["navigation.courseOverGroundTrue"]||d["navigation.courseOverGroundMagnetic"];return e||t||0},[d]),m=(0,s.useRef)(0);(0,s.useEffect)(()=>{m.current=f},[f]),(0,p.useFrame)(()=>{t&&0!==Object.keys(n.current).length&&Object.entries(n.current).forEach(([e,r])=>{if(!r)return;let n=t[e];if(!n){r.visible=!1;return}if(((e,t,r=!0)=>{let n=-t.rotationAngleY;r?(ed.set(t.sceneX,e.position.y,t.sceneZ),e.position.lerp(ed,.1),ef.setFromEuler(e.rotation),ep.set(0,n,0),em.setFromEuler(ep),ef.slerp(em,.1),e.rotation.setFromQuaternion(ef)):(e.position.set(t.sceneX,0,t.sceneZ),e.rotation.set(0,n,0))})(r,n,!0),r.visible=n.visible,r.visible){let t=o.current[e];if(!t){if(!(t=eh(r)))return;o.current[e]=t}if(!i.current[e]){let r=t.material;if(!r)return;i.current[e]={white:r.clone(),red:r.clone(),originalColor:r.color.clone()},i.current[e].white.color.copy(i.current[e].originalColor),i.current[e].red.color.set(g.oRed)}let a=i.current[e],l=r.userData.proximityColor||"white",s=l;"red"===l&&n.distanceMeters>550?s="white":"white"===l&&n.distanceMeters<500&&(s="red"),s!==l?(t.material="red"===s?a.red:a.white,r.userData.proximityColor=s):t.material&&(t.material===a.red||t.material===a.white)||(t.material="red"===l?a.red:a.white)}})});let h=(0,s.useCallback)(e=>{e&&c(t=>t&&t.mmsi===e.mmsi?null:e)},[]),v=(0,s.useMemo)(()=>r.filter(Boolean).slice().sort((e,t)=>(e.distanceMeters??1/0)-(t.distanceMeters??1/0)).slice(0,50).map(e=>(0,l.jsx)(eu,{ref:t=>{t?(t.userData={...t.userData,mmsi:e.mmsi},n.current[e.mmsi]=t):(delete n.current[e.mmsi],delete i.current[e.mmsi],delete o.current[e.mmsi])},rotation:[0,-e.rotationAngleY,0],position:[e.sceneX,0,e.sceneZ],visible:e.visible,boatData:e,onClick:h},e.mmsi)),[r,h]),y=(e,t,r="",n=!1,i=!1)=>null==t||""===t||"string"==typeof t&&0===t.trim().length?null:(n&&null!==t&&(t=(0,et.toDegrees)(t)),i&&null!==t&&(t=(0,et.toKnots)(t)),`${e}: ${t}${r}`),w=a?[y("Vessel",a.name),y("MMSI",(e=>{if(!e)return null;let t=String(e);for(let e of["urn:mrn:imo:mmsi:","urn:mrn:signalk:uuid:"])if(t.startsWith(e)){t=t.substring(e.length);break}return t})(a.mmsi)),y("RNG",a.distanceMeters?a.distanceMeters.toFixed(0):0," m"),y("LOA",a.length," m"),y("Type",a.shipType),y("SOG",a.sog," kn",!1,!0),y("COG",a.cog,"°",!0),y("HDG",a.heading,"°",!0),y("Beam",a.beam," m"),y("Draft",a.draft," m"),y("Call",a.callsign),y("Dest",a.destination)].filter(e=>null!==e).join("\n"):"";return(0,s.useEffect)(()=>{e&&e(w)},[w,e]),(0,l.jsx)(l.Fragment,{children:(0,l.jsx)("group",{rotation:[0,m.current,0],children:v})})};var eg=e.i(32615),ex=e.i(13035),ey=e.i(66799);let ew=({start:e,end:t,color:r,width:n=.2,height:i=.1,dashed:o=!1})=>{let a=(0,s.useMemo)(()=>e&&t&&e.isVector3&&t.isVector3?new v.Vector3().addVectors(e,t).multiplyScalar(.5):new v.Vector3,[e,t]),c=(0,s.useMemo)(()=>e&&t&&e.isVector3&&t.isVector3?new v.Vector3().subVectors(t,e).normalize():new v.Vector3(0,0,1),[e,t]),u=(0,s.useMemo)(()=>e&&t&&e.isVector3&&t.isVector3?e.distanceTo(t):0,[e,t]),d=(0,s.useMemo)(()=>[0,Math.atan2(c.x,c.z),0],[c]);if(!e||!t||!e.isVector3||!t.isVector3)return null;if(o){let t=Math.floor(u/.7);if(t<=0)return null;let o=[];for(let a=0;a<t;a++){let t=.7*a,s=new v.Vector3().copy(e).add(new v.Vector3().copy(c).multiplyScalar(t+.2));o.push((0,l.jsxs)("mesh",{position:s.toArray(),rotation:d,scale:[n,i,.4],children:[(0,l.jsx)("boxGeometry",{}),(0,l.jsx)("meshStandardMaterial",{color:r})]},a))}return(0,l.jsx)(l.Fragment,{children:o})}return(0,l.jsxs)("mesh",{position:a.toArray(),rotation:d,scale:[n,i,u],children:[(0,l.jsx)("boxGeometry",{}),(0,l.jsx)("meshBasicMaterial",{color:r,transparent:!0,opacity:.6,depthWrite:!1})]})},eM=({outerRadius:e=10})=>{let{convertLatLonToXY:t}=(0,g.useOcearoContext)(),r=O.default.get("debugMode"),n=(0,s.useMemo)(()=>["navigation.courseGreatCircle.nextPoint.bearingTrue","navigation.courseGreatCircle.nextPoint.distance","navigation.position"],[]),i=(0,x.useSignalKPaths)(n),[o,a]=(0,s.useState)([]),[c,u]=(0,s.useState)(null);(0,s.useEffect)(()=>{if(r)return;let e=async()=>{try{let e=await ey.default.getWaypoints();if(e){let t=Object.entries(e).map(([e,t])=>{let r=ey.default.parseWaypointPosition(t);return{id:e,name:t.name||"Waypoint",...r}}).filter(e=>e.latitude&&e.longitude);a(t)}let t=await ey.default.getCourse();u(t)}catch(e){console.warn("LayLines3D: Could not fetch navigation data:",e.message)}};e();let t=setInterval(e,3e4);return()=>clearInterval(t)},[r]);let d=i["navigation.courseGreatCircle.nextPoint.bearingTrue"]??v.MathUtils.degToRad(30),f=i["navigation.courseGreatCircle.nextPoint.distance"]??20,m=i["navigation.position"],p=(0,s.useMemo)(()=>new v.Vector3(0,0,0),[]),h=(0,s.useMemo)(()=>{if(r)return new v.Vector3(3,0,-5);if(c?.nextPoint?.position){let e=c.nextPoint.position;if(m?.latitude&&m?.longitude&&e.latitude&&e.longitude){let{x:r,y:n}=t({lat:e.latitude,lon:e.longitude},{lat:m.latitude,lon:m.longitude});return new v.Vector3(.01*r,0,-(.01*n))}}return void 0!==d&&void 0!==f?function(e,t,r=1){return new v.Vector3(e*Math.sin(t)*r,0,-e*Math.cos(t)*r)}(Math.min(.001*f,2*e),d,1):new v.Vector3(0,0,-5)},[r,c,m,d,f,t,e]),y=(0,s.useMemo)(()=>{let e=h.x,t=h.z;return{port:new v.Vector3(0,0,t),starboard:new v.Vector3(e,0,0)}},[h]);return(0,l.jsx)("group",{children:(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(ex.Sphere,{position:h.toArray(),args:[.5,16,16],"material-color":g.oYellow,children:[(0,l.jsxs)("mesh",{position:[0,0,0],rotation:[0,Math.PI/2,0],children:[(0,l.jsx)("cylinderGeometry",{args:[.05,.05,1,8]}),(0,l.jsx)("meshStandardMaterial",{color:"black"})]}),(0,l.jsxs)("mesh",{position:[0,0,0],rotation:[Math.PI/2,0,0],children:[(0,l.jsx)("cylinderGeometry",{args:[.05,.05,1,8]}),(0,l.jsx)("meshStandardMaterial",{color:"black"})]})]}),(0,l.jsx)(ew,{start:p,end:y.port,color:g.oGreen,width:.2,height:.1}),(0,l.jsx)(ew,{start:y.port,end:h,color:g.oGreen,width:.2,height:.1}),(0,l.jsx)(ew,{start:p,end:y.starboard,color:g.oRed,width:.2,height:.1}),(0,l.jsx)(ew,{start:y.starboard,end:h,color:g.oRed,width:.2,height:.1})]})})};var eS=e.i(31067),eb=v,eC=v;let eE=new eC.Box3,eP=new eC.Vector3;class e_ extends eC.InstancedBufferGeometry{constructor(){super(),this.isLineSegmentsGeometry=!0,this.type="LineSegmentsGeometry",this.setIndex([0,2,1,2,3,1,2,4,3,4,5,3,4,6,5,6,7,5]),this.setAttribute("position",new eC.Float32BufferAttribute([-1,2,0,1,2,0,-1,1,0,1,1,0,-1,0,0,1,0,0,-1,-1,0,1,-1,0],3)),this.setAttribute("uv",new eC.Float32BufferAttribute([-1,2,1,2,-1,1,1,1,-1,-1,1,-1,-1,-2,1,-2],2))}applyMatrix4(e){let t=this.attributes.instanceStart,r=this.attributes.instanceEnd;return void 0!==t&&(t.applyMatrix4(e),r.applyMatrix4(e),t.needsUpdate=!0),null!==this.boundingBox&&this.computeBoundingBox(),null!==this.boundingSphere&&this.computeBoundingSphere(),this}setPositions(e){let t;e instanceof Float32Array?t=e:Array.isArray(e)&&(t=new Float32Array(e));let r=new eC.InstancedInterleavedBuffer(t,6,1);return this.setAttribute("instanceStart",new eC.InterleavedBufferAttribute(r,3,0)),this.setAttribute("instanceEnd",new eC.InterleavedBufferAttribute(r,3,3)),this.computeBoundingBox(),this.computeBoundingSphere(),this}setColors(e,t=3){let r;e instanceof Float32Array?r=e:Array.isArray(e)&&(r=new Float32Array(e));let n=new eC.InstancedInterleavedBuffer(r,2*t,1);return this.setAttribute("instanceColorStart",new eC.InterleavedBufferAttribute(n,t,0)),this.setAttribute("instanceColorEnd",new eC.InterleavedBufferAttribute(n,t,t)),this}fromWireframeGeometry(e){return this.setPositions(e.attributes.position.array),this}fromEdgesGeometry(e){return this.setPositions(e.attributes.position.array),this}fromMesh(e){return this.fromWireframeGeometry(new eC.WireframeGeometry(e.geometry)),this}fromLineSegments(e){let t=e.geometry;return this.setPositions(t.attributes.position.array),this}computeBoundingBox(){null===this.boundingBox&&(this.boundingBox=new eC.Box3);let e=this.attributes.instanceStart,t=this.attributes.instanceEnd;void 0!==e&&void 0!==t&&(this.boundingBox.setFromBufferAttribute(e),eE.setFromBufferAttribute(t),this.boundingBox.union(eE))}computeBoundingSphere(){null===this.boundingSphere&&(this.boundingSphere=new eC.Sphere),null===this.boundingBox&&this.computeBoundingBox();let e=this.attributes.instanceStart,t=this.attributes.instanceEnd;if(void 0!==e&&void 0!==t){let r=this.boundingSphere.center;this.boundingBox.getCenter(r);let n=0;for(let i=0,o=e.count;i<o;i++)eP.fromBufferAttribute(e,i),n=Math.max(n,r.distanceToSquared(eP)),eP.fromBufferAttribute(t,i),n=Math.max(n,r.distanceToSquared(eP));this.boundingSphere.radius=Math.sqrt(n),isNaN(this.boundingSphere.radius)&&console.error("THREE.LineSegmentsGeometry.computeBoundingSphere(): Computed radius is NaN. The instanced position data is likely to have NaN values.",this)}}toJSON(){}applyMatrix(e){return console.warn("THREE.LineSegmentsGeometry: applyMatrix() has been renamed to applyMatrix4()."),this.applyMatrix4(e)}}var eA=v,eT=e.i(31497);class ej extends eA.ShaderMaterial{constructor(e){super({type:"LineMaterial",uniforms:eA.UniformsUtils.clone(eA.UniformsUtils.merge([C.UniformsLib.common,C.UniformsLib.fog,{worldUnits:{value:1},linewidth:{value:1},resolution:{value:new eA.Vector2(1,1)},dashOffset:{value:0},dashScale:{value:1},dashSize:{value:1},gapSize:{value:1}}])),vertexShader:`
455
+ `).replace(/vec4\( position, 1.0 \)/g,"vec4( wavePos, 1.0 )")},t},[T,K,e]);return(0,p.useFrame)((r,l)=>{if(o.current&&(o.current.material.uniforms.time.value+=.5*l),R.current.waveTime.value+=l,D.current&&D.current.visible&&(D.current.rotation.y+=.004*l),L.current&&N.current){let e=L.current.geometry.attributes.position,t=e.array,r=160*l;for(let e=1;e<t.length;e+=3)t[e]-=r,t[e]<0&&(t[e]+=220);e.needsUpdate=!0}if(y.current+=l,y.current<1)return;let s=y.current;y.current=0;let f=m.current,p=f&&"number"==typeof f.latitude?f.latitude:46.15,g=f&&"number"==typeof f.longitude?f.longitude:-1.15,x=new Date,w=O.default.get("debugMode"),M=x;if(w){null===d.current&&(d.current=Date.now());let e=(Date.now()-d.current)/1e3*720%86400,t=Math.floor(e/3600),r=Math.floor(e%3600/60),n=new Date(x.getTime());n.setHours(t,r,0,0),M=n}let S=new Date(M.getFullYear(),0,0),b=M-S+(S.getTimezoneOffset()-M.getTimezoneOffset())*6e4,E=Math.PI/180,P=180/Math.PI,_=M.getHours(),A=M.getMinutes(),T=2*Math.PI/365*(b/864e5-1+(_-12)/24),j=229.18*(75e-6+.001868*Math.cos(T)-.032077*Math.sin(T)-.014615*Math.cos(2*T)-.040849*Math.sin(2*T)),U=.006918-.399912*Math.cos(T)+.070257*Math.sin(T)-.006758*Math.cos(2*T)+907e-6*Math.sin(2*T)-.002697*Math.cos(3*T)+.00148*Math.sin(3*T),k=((60*_+A+(j+4*g- -M.getTimezoneOffset())+1440)%1440/4-180)*E,W=p*E,$=90-Math.acos(Math.min(Math.max(Math.sin(W)*Math.sin(U)+Math.cos(W)*Math.cos(U)*Math.cos(k),-1),1))*P,K=(Math.atan2(Math.sin(k),Math.cos(k)*Math.sin(W)-Math.tan(U)*Math.cos(W))*P+360)%360,X=0;X=$<=-10?1:$>=5?0:(5-$)/15;let q=t||$<=-5,Y=q?Math.max($,20):Math.max($,5),Q=v.MathUtils.degToRad(90-Y),J=v.MathUtils.degToRad(K);if(C.setFromSphericalCoords(1,Q,J),o.current){let e=n()?.speed??5;h.current+=(e-h.current)*Math.min(.5*s,1);let t=Math.min(Math.max(.5*h.current,0),8),r=o.current.material.uniforms;r.distortionScale.value=t,r.sunDirection.value.copy(C).normalize();let i=O.default.get("aisLengthScalingFactor")||.7,a=Math.min(.21*h.current**2/9.81,6);R.current.waveAmp.value=a/2*i,G.copy(I).lerp(B,X),r.sunColor.value.setHex(q?4491519:0xffffff),r.waterColor.value.copy(G)}e&&(G.copy(V).lerp(B,X),z.color.copy(G));let ee=i(),et=Math.min(Math.max(ee?.cloudCover??0,0),1),er=Math.max(ee?.rain??0,0),en=er>.05;if(D.current){D.current.visible=et>.08;let e=(1-.7*X)*(en?.55:1);F.setScalar(e),H.color.copy(F),H.opacity=.15+.55*et}if(N.current=en,L.current&&(L.current.visible=en,Z.opacity=Math.min(.3+.15*er,.75)),a.current){let t=a.current.material.uniforms,r=.5+.5*(ee?.humidity??.6)+9*et+4*!!en,n={turbidity:e?Math.min(r,2.5):r,rayleigh:1.2*(1-.5*et),mieCoefficient:.005+.02*et,mieDirectionalG:.8},i={turbidity:.05,rayleigh:.1,mieCoefficient:5e-4,mieDirectionalG:.95},o=e=>n[e]+(i[e]-n[e])*X;t.turbidity.value=o("turbidity"),t.rayleigh.value=o("rayleigh"),t.mieCoefficient.value=o("mieCoefficient"),t.mieDirectionalG.value=o("mieDirectionalG"),t.sunPosition.value.copy(C)}u.current&&(u.current.position.copy(C).multiplyScalar(4e3),u.current.visible=!q),c.current&&(c.current.position.copy(C).multiplyScalar(4e3),c.current.visible=q,c.current.lookAt(0,0,0))}),(0,s.useEffect)(()=>{let e=new v.Color(t?517:6694);return b.background=e,b.fog=new v.FogExp2(e,35e-5),w.outputColorSpace=v.SRGBColorSpace,()=>{b.background=null,b.fog=null}},[b,t,w]),(0,l.jsxs)(l.Fragment,{children:[t&&(0,l.jsx)(U,{radius:5e3,depth:50,count:1500,factor:4,saturation:0,fade:!0,speed:1}),(0,l.jsx)("sky",{ref:a,scale:45e4}),t&&(0,l.jsxs)("mesh",{ref:c,position:[600,200,-1500],children:[(0,l.jsx)("sphereGeometry",{args:[80,32,32]}),(0,l.jsx)("meshStandardMaterial",{map:P,emissive:0xffffff,emissiveIntensity:.8})]}),(0,l.jsxs)("mesh",{ref:u,children:[(0,l.jsx)("sphereGeometry",{args:[200,32,32]}),(0,l.jsx)("meshBasicMaterial",{color:0xffffff})]}),(0,l.jsx)("group",{ref:D,visible:!1,children:W.map((e,t)=>(0,l.jsx)("sprite",{position:e.position,scale:e.scale,material:H},t))}),(0,l.jsx)("points",{ref:L,geometry:$,material:Z,visible:!1}),e?(0,l.jsx)("mesh",{geometry:T,material:z,"rotation-x":-Math.PI/2,position:[0,-.3,0]}):(0,l.jsx)("primitive",{ref:o,object:X,"rotation-x":-Math.PI/2,position:[0,-.3,0]})]})},k="https://tile.openstreetmap.org/{z}/{x}/{y}.png",W="https://tiles.openseamap.org/seamark/{z}/{x}/{y}.png",H="https://tiles.windy.com/tiles/v10.0/wind/{z}/{x}/{y}.png",$="saturate(1.8) contrast(1.35)",Z="brightness(0.72) saturate(1.15) contrast(1.05)";function K(e,t,r,n){return e.replace("{z}",t).replace("{x}",r).replace("{y}",n)}function X(e,t){return 156543.03*Math.cos(e*Math.PI/180)/Math.pow(2,t)}let q=new Map;function Y(e){if(q.has(e))return q.get(e);let t=new Promise(t=>{let r=new Image;r.crossOrigin="anonymous",r.onload=()=>t(r),r.onerror=()=>t(null),r.src=e});return q.set(e,t),t}async function Q(e,t,r,n){let i=await Y(K(e,t,r,n));if(i)return{img:i,sx:0,sy:0,sSize:256};for(let o=1;o<=3&&t-o>=1;o++){let a=t-o,l=r>>o,s=n>>o;if(i=await Y(K(e,a,l,s))){let e=256/Math.pow(2,o);return{img:i,sx:(r-(l<<o))*e,sy:(n-(s<<o))*e,sSize:e}}}return null}async function J(e,t,r,n,i=1,o="none"){let a,{latitude:l,longitude:s}=t,c=256*i;e.filter=o;let u=(s+180)/360*Math.pow(2,r),d=(1-Math.log(Math.tan(a=l*Math.PI/180)+1/Math.cos(a))/Math.PI)/2*Math.pow(2,r),f=u*c-512,m=d*c-512,p=Math.floor(f/c),h=Math.floor(m/c),v=Math.ceil(1024/c)+2,g=Math.pow(2,r),x=[];for(let e=0;e<v;e++)for(let t=0;t<v;t++){let n=p+t,i=h+e;if(i<0||i>=g)continue;let o=(n%g+g)%g,a=Math.round(n*c-f),l=Math.round(i*c-m);x.push({z:r,x:o,y:i,screenLeft:a,screenTop:l})}let y=await Promise.all(x.map(e=>Q(n,e.z,e.x,e.y)));for(let t=0;t<x.length;t++){let r=y[t];if(!r)continue;let{screenLeft:n,screenTop:i}=x[t];e.drawImage(r.img,r.sx,r.sy,r.sSize,r.sSize,n,i,c,c)}e.filter="none"}async function ee(e,t,r,n){let i=e.getContext("2d");for(let e of(i.clearRect(0,0,1024,1024),n)){if(!e?.template)continue;let n=Math.min(r,e.maxZoom??r),o=Math.pow(2,r-n);await J(i,t,n,e.template,o,e.filter||"none")}}function et({mode:e="chart"}){let t=(0,s.useRef)(),r=(0,s.useRef)(null),n=(0,s.useRef)(null),i=(0,s.useRef)(!1),o=(0,s.useRef)({position:null,zoom:null}),a=(0,s.useRef)(0),c=(0,s.useRef)("meteo"===e?[{template:k,maxZoom:19,filter:Z},{template:H,maxZoom:11,filter:$}]:[{template:k,maxZoom:19,filter:Z},{template:W,maxZoom:18}]),{gl:u}=(0,M.useThree)(),d=O.default.get("aisLengthScalingFactor")||.7,[f,m]=(0,s.useState)(16),[h,g]=(0,s.useState)(500),y=(0,x.useSignalKPath)("navigation.position"),w=(0,s.useRef)(null);(0,s.useEffect)(()=>{w.current=y},[y]);let S=y?.latitude!=null&&y?.longitude!=null;(0,p.useFrame)(({camera:t})=>{if(a.current++,a.current%15!=0)return;let r=w.current;if(r?.latitude==null)return;let n=Math.min(Math.max(4*(t.position.length()/d),"meteo"===e?4e4:500),6e4),i=Math.max(3,Math.min("meteo"===e?11:c.current[0]?.template===k?19:18,Math.round(Math.log2(156543.03*Math.cos(r.latitude*Math.PI/180)/(n/1024)))));i!==f&&m(i)});let b=(0,s.useCallback)((e=!1)=>{if(i.current)return;let t=w.current;if(t?.latitude==null||t?.longitude==null)return;let a=o.current;if(!e&&a.position&&a.zoom===f){let e=48*X(t.latitude,f)/111320,r=Math.abs(t.latitude-a.position.latitude),n=Math.abs(t.longitude-a.position.longitude);if(r<e&&n<e)return}let l=r.current,s=n.current;l&&s&&(i.current=!0,o.current={position:t,zoom:f},g(1024*X(t.latitude,f)/2*d),ee(l,t,f,c.current).then(()=>{s.needsUpdate=!0,i.current=!1}))},[f,d]);(0,s.useEffect)(()=>{let e=document.createElement("canvas");e.width=1024,e.height=1024,r.current=e;let i=new v.CanvasTexture(e);return i.minFilter=v.LinearMipmapLinearFilter,i.magFilter=v.LinearFilter,i.anisotropy=u.capabilities.getMaxAnisotropy(),i.generateMipmaps=!0,n.current=i,t.current&&(t.current.material.map=i,t.current.material.needsUpdate=!0),()=>{i.dispose()}},[u]),(0,s.useEffect)(()=>{if("meteo"===e){c.current=[{template:k,maxZoom:19,filter:Z},{template:H,maxZoom:11,filter:$}],b(!0),fetch("https://api.rainviewer.com/public/weather-maps.json").then(e=>e.json()).then(e=>{let t=e?.radar?.past,r=t?.[t.length-1]?.path;r&&(c.current=[...c.current,{template:`https://tilecache.rainviewer.com${r}/256/{z}/{x}/{y}/2/1_1.png`,maxZoom:12}],b(!0))}).catch(()=>{});return}let t=O.default.getAll().signalkUrl||"http://localhost:3000";fetch(`${t}/signalk/v1/api/resources/charts`).then(e=>e.json()).then(e=>{if(!e||"object"!=typeof e)return;let t=Object.values(e),r=t.find(e=>"openstreetmap"!==e.identifier&&e.tilemapUrl)||t.find(e=>e.tilemapUrl);r?.tilemapUrl&&(c.current=[{template:r.tilemapUrl.includes("{z}")?r.tilemapUrl:`${r.tilemapUrl}/{z}/{x}/{y}.png`,maxZoom:18}]),b(!0)}).catch(()=>{c.current=[{template:k,maxZoom:19,filter:Z},{template:W,maxZoom:18}],b(!0)})},[e,b]),(0,s.useEffect)(()=>{b()},[y,e,f]),(0,s.useEffect)(()=>{t.current&&n.current&&(t.current.material.map=n.current,t.current.material.needsUpdate=!0)});let C=(0,s.useMemo)(()=>new v.PlaneGeometry(2*h,2*h),[h]),E=(0,s.useMemo)(()=>new v.MeshBasicMaterial({side:v.DoubleSide,transparent:!1}),[]);return S?(0,l.jsx)("mesh",{ref:t,geometry:C,material:E,rotation:[-Math.PI/2,0,0],position:[0,-.1,0]}):null}var er=e.i(46991),en=e.i(62588),ei=e.i(47167),eo=e.i(78140);let ea=ei.default.env.ASSET_PREFIX||"./",el={},es={30:.1,31:.14,36:.23,37:.07,50:.03,70:.1,80:.12},ec=`${ea}/draco/`;function eu({code:e,scaleFactor:t}){let{scene:r}=(0,eo.useGLTF)(`${ea}/boats/ais/ais-${e}.glb`,ec),n=(0,s.useMemo)(()=>{let t=r.clone(!0);t.traverse(e=>{e.isMesh&&(e.material=new v.MeshStandardMaterial({color:0xeef2f5,roughness:.7,metalness:.1}),e.castShadow=!1,e.receiveShadow=!1)});let n=new v.Box3().setFromObject(t),i=new v.Vector3,o=new v.Vector3;n.getSize(i),n.getCenter(o);let a=i.x>=i.z,l=Math.max(i.x,i.z)||1,s=l*(es[e]??.06);t.position.set(-o.x,-n.min.y-s,-o.z);let c=new v.Group;return c.add(t),c.scale.setScalar(10/l),c.rotation.y=(a?Math.PI/2:0)+(el[e]||0),c},[r,e]);return(0,l.jsx)("group",{scale:t,children:(0,l.jsx)("primitive",{object:n})})}let ed=({position:e,visible:t,boatData:r,onClick:n,ref:i})=>{let o,a=Number.isFinite(o=Number(r.shipType))?30===o?30:o>=31&&o<=32?31:o>=33&&o<=35?35:36===o?36:37===o?37:o>=40&&o<=49?40:o>=50&&o<=59?50:o>=60&&o<=69?60:o>=70&&o<=79?70:o>=80&&o<=89?80:70:70,c=Math.max(r.length||10,4),u=O.default.get("aisLengthScalingFactor")||.7;return(0,l.jsx)("group",{ref:i,position:e,visible:t,onClick:e=>{e.stopPropagation(),n&&n(r)},children:(0,l.jsx)(s.Suspense,{fallback:null,children:(0,l.jsx)(eu,{code:a,scaleFactor:c*u/10})})})},ef=new v.Vector3,em=new v.Quaternion,ep=new v.Quaternion,eh=new v.Euler,ev=e=>{if(e.isMesh&&e.material)return e;if(e.children?.length)for(let t of e.children){let e=ev(t);if(e)return e}return null},eg=({onUpdateInfoPanel:e})=>{let{aisData:t,vesselIds:r}=(0,en.useAIS)(),n=(0,s.useRef)({}),i=(0,s.useRef)({}),o=(0,s.useRef)({}),[a,c]=(0,s.useState)(null),u=(0,s.useMemo)(()=>["navigation.headingTrue","navigation.headingMagnetic","navigation.courseOverGroundTrue","navigation.courseOverGroundMagnetic"],[]),d=(0,x.useSignalKPaths)(u),f=(0,s.useMemo)(()=>{let e=d["navigation.headingTrue"]||d["navigation.headingMagnetic"],t=d["navigation.courseOverGroundTrue"]||d["navigation.courseOverGroundMagnetic"];return e||t||0},[d]),m=(0,s.useRef)(0);(0,s.useEffect)(()=>{m.current=f},[f]),(0,p.useFrame)(()=>{t&&0!==Object.keys(n.current).length&&Object.entries(n.current).forEach(([e,r])=>{if(!r)return;let n=t[e];if(!n){r.visible=!1;return}if(((e,t,r=!0)=>{let n=-t.rotationAngleY;r?(ef.set(t.sceneX,e.position.y,t.sceneZ),e.position.lerp(ef,.1),em.setFromEuler(e.rotation),eh.set(0,n,0),ep.setFromEuler(eh),em.slerp(ep,.1),e.rotation.setFromQuaternion(em)):(e.position.set(t.sceneX,0,t.sceneZ),e.rotation.set(0,n,0))})(r,n,!0),r.visible=n.visible,r.visible){let t=o.current[e];if(!t){if(!(t=ev(r)))return;o.current[e]=t}if(!i.current[e]){let r=t.material;if(!r)return;i.current[e]={white:r.clone(),red:r.clone(),originalColor:r.color.clone()},i.current[e].white.color.copy(i.current[e].originalColor),i.current[e].red.color.set(g.oRed)}let a=i.current[e],l=r.userData.proximityColor||"white",s=l;"red"===l&&n.distanceMeters>550?s="white":"white"===l&&n.distanceMeters<500&&(s="red"),s!==l?(t.material="red"===s?a.red:a.white,r.userData.proximityColor=s):t.material&&(t.material===a.red||t.material===a.white)||(t.material="red"===l?a.red:a.white)}})});let h=(0,s.useCallback)(e=>{e&&c(t=>t&&t.mmsi===e.mmsi?null:e)},[]),v=(0,s.useMemo)(()=>r.filter(Boolean).slice().sort((e,t)=>(e.distanceMeters??1/0)-(t.distanceMeters??1/0)).slice(0,50).map(e=>(0,l.jsx)(ed,{ref:t=>{t?(t.userData={...t.userData,mmsi:e.mmsi},n.current[e.mmsi]=t):(delete n.current[e.mmsi],delete i.current[e.mmsi],delete o.current[e.mmsi])},rotation:[0,-e.rotationAngleY,0],position:[e.sceneX,0,e.sceneZ],visible:e.visible,boatData:e,onClick:h},e.mmsi)),[r,h]),y=(e,t,r="",n=!1,i=!1)=>null==t||""===t||"string"==typeof t&&0===t.trim().length?null:(n&&null!==t&&(t=(0,er.toDegrees)(t)),i&&null!==t&&(t=(0,er.toKnots)(t)),`${e}: ${t}${r}`),w=a?[y("Vessel",a.name),y("MMSI",(e=>{if(!e)return null;let t=String(e);for(let e of["urn:mrn:imo:mmsi:","urn:mrn:signalk:uuid:"])if(t.startsWith(e)){t=t.substring(e.length);break}return t})(a.mmsi)),y("RNG",a.distanceMeters?a.distanceMeters.toFixed(0):0," m"),y("LOA",a.length," m"),y("Type",a.shipType),y("SOG",a.sog," kn",!1,!0),y("COG",a.cog,"°",!0),y("HDG",a.heading,"°",!0),y("Beam",a.beam," m"),y("Draft",a.draft," m"),y("Call",a.callsign),y("Dest",a.destination)].filter(e=>null!==e).join("\n"):"";return(0,s.useEffect)(()=>{e&&e(w)},[w,e]),(0,l.jsx)(l.Fragment,{children:(0,l.jsx)("group",{rotation:[0,m.current,0],children:v})})};var ex=e.i(32615),ey=e.i(13035),ew=e.i(66799);let eM=({start:e,end:t,color:r,width:n=.2,height:i=.1,dashed:o=!1})=>{let a=(0,s.useMemo)(()=>e&&t&&e.isVector3&&t.isVector3?new v.Vector3().addVectors(e,t).multiplyScalar(.5):new v.Vector3,[e,t]),c=(0,s.useMemo)(()=>e&&t&&e.isVector3&&t.isVector3?new v.Vector3().subVectors(t,e).normalize():new v.Vector3(0,0,1),[e,t]),u=(0,s.useMemo)(()=>e&&t&&e.isVector3&&t.isVector3?e.distanceTo(t):0,[e,t]),d=(0,s.useMemo)(()=>[0,Math.atan2(c.x,c.z),0],[c]);if(!e||!t||!e.isVector3||!t.isVector3)return null;if(o){let t=Math.floor(u/.7);if(t<=0)return null;let o=[];for(let a=0;a<t;a++){let t=.7*a,s=new v.Vector3().copy(e).add(new v.Vector3().copy(c).multiplyScalar(t+.2));o.push((0,l.jsxs)("mesh",{position:s.toArray(),rotation:d,scale:[n,i,.4],children:[(0,l.jsx)("boxGeometry",{}),(0,l.jsx)("meshStandardMaterial",{color:r})]},a))}return(0,l.jsx)(l.Fragment,{children:o})}return(0,l.jsxs)("mesh",{position:a.toArray(),rotation:d,scale:[n,i,u],children:[(0,l.jsx)("boxGeometry",{}),(0,l.jsx)("meshBasicMaterial",{color:r,transparent:!0,opacity:.6,depthWrite:!1})]})},eS=({outerRadius:e=10})=>{let{convertLatLonToXY:t}=(0,g.useOcearoContext)(),r=O.default.get("debugMode"),n=(0,s.useMemo)(()=>["navigation.courseGreatCircle.nextPoint.bearingTrue","navigation.courseGreatCircle.nextPoint.distance","navigation.position"],[]),i=(0,x.useSignalKPaths)(n),[o,a]=(0,s.useState)([]),[c,u]=(0,s.useState)(null);(0,s.useEffect)(()=>{if(r)return;let e=async()=>{try{let e=await ew.default.getWaypoints();if(e){let t=Object.entries(e).map(([e,t])=>{let r=ew.default.parseWaypointPosition(t);return{id:e,name:t.name||"Waypoint",...r}}).filter(e=>e.latitude&&e.longitude);a(t)}let t=await ew.default.getCourse();u(t)}catch(e){console.warn("LayLines3D: Could not fetch navigation data:",e.message)}};e();let t=setInterval(e,3e4);return()=>clearInterval(t)},[r]);let d=i["navigation.courseGreatCircle.nextPoint.bearingTrue"]??v.MathUtils.degToRad(30),f=i["navigation.courseGreatCircle.nextPoint.distance"]??20,m=i["navigation.position"],p=(0,s.useMemo)(()=>new v.Vector3(0,0,0),[]),h=(0,s.useMemo)(()=>{if(r)return new v.Vector3(3,0,-5);if(c?.nextPoint?.position){let e=c.nextPoint.position;if(m?.latitude&&m?.longitude&&e.latitude&&e.longitude){let{x:r,y:n}=t({lat:e.latitude,lon:e.longitude},{lat:m.latitude,lon:m.longitude});return new v.Vector3(.01*r,0,-(.01*n))}}return void 0!==d&&void 0!==f?function(e,t,r=1){return new v.Vector3(e*Math.sin(t)*r,0,-e*Math.cos(t)*r)}(Math.min(.001*f,2*e),d,1):new v.Vector3(0,0,-5)},[r,c,m,d,f,t,e]),y=(0,s.useMemo)(()=>{let e=h.x,t=h.z;return{port:new v.Vector3(0,0,t),starboard:new v.Vector3(e,0,0)}},[h]);return(0,l.jsx)("group",{children:(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(ey.Sphere,{position:h.toArray(),args:[.5,16,16],"material-color":g.oYellow,children:[(0,l.jsxs)("mesh",{position:[0,0,0],rotation:[0,Math.PI/2,0],children:[(0,l.jsx)("cylinderGeometry",{args:[.05,.05,1,8]}),(0,l.jsx)("meshStandardMaterial",{color:"black"})]}),(0,l.jsxs)("mesh",{position:[0,0,0],rotation:[Math.PI/2,0,0],children:[(0,l.jsx)("cylinderGeometry",{args:[.05,.05,1,8]}),(0,l.jsx)("meshStandardMaterial",{color:"black"})]})]}),(0,l.jsx)(eM,{start:p,end:y.port,color:g.oGreen,width:.2,height:.1}),(0,l.jsx)(eM,{start:y.port,end:h,color:g.oGreen,width:.2,height:.1}),(0,l.jsx)(eM,{start:p,end:y.starboard,color:g.oRed,width:.2,height:.1}),(0,l.jsx)(eM,{start:y.starboard,end:h,color:g.oRed,width:.2,height:.1})]})})};var eb=e.i(31067),eC=v,eE=v;let eP=new eE.Box3,e_=new eE.Vector3;class eA extends eE.InstancedBufferGeometry{constructor(){super(),this.isLineSegmentsGeometry=!0,this.type="LineSegmentsGeometry",this.setIndex([0,2,1,2,3,1,2,4,3,4,5,3,4,6,5,6,7,5]),this.setAttribute("position",new eE.Float32BufferAttribute([-1,2,0,1,2,0,-1,1,0,1,1,0,-1,0,0,1,0,0,-1,-1,0,1,-1,0],3)),this.setAttribute("uv",new eE.Float32BufferAttribute([-1,2,1,2,-1,1,1,1,-1,-1,1,-1,-1,-2,1,-2],2))}applyMatrix4(e){let t=this.attributes.instanceStart,r=this.attributes.instanceEnd;return void 0!==t&&(t.applyMatrix4(e),r.applyMatrix4(e),t.needsUpdate=!0),null!==this.boundingBox&&this.computeBoundingBox(),null!==this.boundingSphere&&this.computeBoundingSphere(),this}setPositions(e){let t;e instanceof Float32Array?t=e:Array.isArray(e)&&(t=new Float32Array(e));let r=new eE.InstancedInterleavedBuffer(t,6,1);return this.setAttribute("instanceStart",new eE.InterleavedBufferAttribute(r,3,0)),this.setAttribute("instanceEnd",new eE.InterleavedBufferAttribute(r,3,3)),this.computeBoundingBox(),this.computeBoundingSphere(),this}setColors(e,t=3){let r;e instanceof Float32Array?r=e:Array.isArray(e)&&(r=new Float32Array(e));let n=new eE.InstancedInterleavedBuffer(r,2*t,1);return this.setAttribute("instanceColorStart",new eE.InterleavedBufferAttribute(n,t,0)),this.setAttribute("instanceColorEnd",new eE.InterleavedBufferAttribute(n,t,t)),this}fromWireframeGeometry(e){return this.setPositions(e.attributes.position.array),this}fromEdgesGeometry(e){return this.setPositions(e.attributes.position.array),this}fromMesh(e){return this.fromWireframeGeometry(new eE.WireframeGeometry(e.geometry)),this}fromLineSegments(e){let t=e.geometry;return this.setPositions(t.attributes.position.array),this}computeBoundingBox(){null===this.boundingBox&&(this.boundingBox=new eE.Box3);let e=this.attributes.instanceStart,t=this.attributes.instanceEnd;void 0!==e&&void 0!==t&&(this.boundingBox.setFromBufferAttribute(e),eP.setFromBufferAttribute(t),this.boundingBox.union(eP))}computeBoundingSphere(){null===this.boundingSphere&&(this.boundingSphere=new eE.Sphere),null===this.boundingBox&&this.computeBoundingBox();let e=this.attributes.instanceStart,t=this.attributes.instanceEnd;if(void 0!==e&&void 0!==t){let r=this.boundingSphere.center;this.boundingBox.getCenter(r);let n=0;for(let i=0,o=e.count;i<o;i++)e_.fromBufferAttribute(e,i),n=Math.max(n,r.distanceToSquared(e_)),e_.fromBufferAttribute(t,i),n=Math.max(n,r.distanceToSquared(e_));this.boundingSphere.radius=Math.sqrt(n),isNaN(this.boundingSphere.radius)&&console.error("THREE.LineSegmentsGeometry.computeBoundingSphere(): Computed radius is NaN. The instanced position data is likely to have NaN values.",this)}}toJSON(){}applyMatrix(e){return console.warn("THREE.LineSegmentsGeometry: applyMatrix() has been renamed to applyMatrix4()."),this.applyMatrix4(e)}}var eT=v,ej=e.i(31497);class ez extends eT.ShaderMaterial{constructor(e){super({type:"LineMaterial",uniforms:eT.UniformsUtils.clone(eT.UniformsUtils.merge([C.UniformsLib.common,C.UniformsLib.fog,{worldUnits:{value:1},linewidth:{value:1},resolution:{value:new eT.Vector2(1,1)},dashOffset:{value:0},dashScale:{value:1},dashSize:{value:1},gapSize:{value:1}}])),vertexShader:`
456
456
  #include <common>
457
457
  #include <fog_pars_vertex>
458
458
  #include <logdepthbuf_pars_vertex>
@@ -855,9 +855,9 @@
855
855
  gl_FragColor = diffuseColor;
856
856
 
857
857
  #include <tonemapping_fragment>
858
- #include <${eT.version>=154?"colorspace_fragment":"encodings_fragment"}>
858
+ #include <${ej.version>=154?"colorspace_fragment":"encodings_fragment"}>
859
859
  #include <fog_fragment>
860
860
  #include <premultiplied_alpha_fragment>
861
861
 
862
862
  }
863
- `,clipping:!0}),this.isLineMaterial=!0,this.onBeforeCompile=function(){this.transparent?this.defines.USE_LINE_COLOR_ALPHA="1":delete this.defines.USE_LINE_COLOR_ALPHA},Object.defineProperties(this,{color:{enumerable:!0,get:function(){return this.uniforms.diffuse.value},set:function(e){this.uniforms.diffuse.value=e}},worldUnits:{enumerable:!0,get:function(){return"WORLD_UNITS"in this.defines},set:function(e){!0===e?this.defines.WORLD_UNITS="":delete this.defines.WORLD_UNITS}},linewidth:{enumerable:!0,get:function(){return this.uniforms.linewidth.value},set:function(e){this.uniforms.linewidth.value=e}},dashed:{enumerable:!0,get:function(){return"USE_DASH"in this.defines},set(e){!!e!="USE_DASH"in this.defines&&(this.needsUpdate=!0),!0===e?this.defines.USE_DASH="":delete this.defines.USE_DASH}},dashScale:{enumerable:!0,get:function(){return this.uniforms.dashScale.value},set:function(e){this.uniforms.dashScale.value=e}},dashSize:{enumerable:!0,get:function(){return this.uniforms.dashSize.value},set:function(e){this.uniforms.dashSize.value=e}},dashOffset:{enumerable:!0,get:function(){return this.uniforms.dashOffset.value},set:function(e){this.uniforms.dashOffset.value=e}},gapSize:{enumerable:!0,get:function(){return this.uniforms.gapSize.value},set:function(e){this.uniforms.gapSize.value=e}},opacity:{enumerable:!0,get:function(){return this.uniforms.opacity.value},set:function(e){this.uniforms.opacity.value=e}},resolution:{enumerable:!0,get:function(){return this.uniforms.resolution.value},set:function(e){this.uniforms.resolution.value.copy(e)}},alphaToCoverage:{enumerable:!0,get:function(){return"USE_ALPHA_TO_COVERAGE"in this.defines},set:function(e){!!e!="USE_ALPHA_TO_COVERAGE"in this.defines&&(this.needsUpdate=!0),!0===e?(this.defines.USE_ALPHA_TO_COVERAGE="",this.extensions.derivatives=!0):(delete this.defines.USE_ALPHA_TO_COVERAGE,this.extensions.derivatives=!1)}}}),this.setValues(e)}}let ez=eT.version>=125?"uv1":"uv2",eR=new eb.Vector4,eD=new eb.Vector3,eL=new eb.Vector3,eU=new eb.Vector4,eO=new eb.Vector4,eI=new eb.Vector4,eB=new eb.Vector3,eV=new eb.Matrix4,eG=new eb.Line3,eF=new eb.Vector3,eN=new eb.Box3,ek=new eb.Sphere,eW=new eb.Vector4;function eH(e,t,n){return eW.set(0,0,-t,1).applyMatrix4(e.projectionMatrix),eW.multiplyScalar(1/eW.w),eW.x=r/n.width,eW.y=r/n.height,eW.applyMatrix4(e.projectionMatrixInverse),eW.multiplyScalar(1/eW.w),Math.abs(Math.max(eW.x,eW.y))}class e$ extends eb.Mesh{constructor(e=new e_,t=new ej({color:0xffffff*Math.random()})){super(e,t),this.isLineSegments2=!0,this.type="LineSegments2"}computeLineDistances(){let e=this.geometry,t=e.attributes.instanceStart,r=e.attributes.instanceEnd,n=new Float32Array(2*t.count);for(let e=0,i=0,o=t.count;e<o;e++,i+=2)eD.fromBufferAttribute(t,e),eL.fromBufferAttribute(r,e),n[i]=0===i?0:n[i-1],n[i+1]=n[i]+eD.distanceTo(eL);let i=new eb.InstancedInterleavedBuffer(n,2,1);return e.setAttribute("instanceDistanceStart",new eb.InterleavedBufferAttribute(i,1,0)),e.setAttribute("instanceDistanceEnd",new eb.InterleavedBufferAttribute(i,1,1)),this}raycast(e,n){let i,o,a=this.material.worldUnits,l=e.camera;null!==l||a||console.error('LineSegments2: "Raycaster.camera" needs to be set in order to raycast against LineSegments2 while worldUnits is set to false.');let s=void 0!==e.params.Line2&&e.params.Line2.threshold||0;t=e.ray;let c=this.matrixWorld,u=this.geometry,d=this.material;if(r=d.linewidth+s,null===u.boundingSphere&&u.computeBoundingSphere(),ek.copy(u.boundingSphere).applyMatrix4(c),a)i=.5*r;else{let e=Math.max(l.near,ek.distanceToPoint(t.origin));i=eH(l,e,d.resolution)}if(ek.radius+=i,!1!==t.intersectsSphere(ek)){if(null===u.boundingBox&&u.computeBoundingBox(),eN.copy(u.boundingBox).applyMatrix4(c),a)o=.5*r;else{let e=Math.max(l.near,eN.distanceToPoint(t.origin));o=eH(l,e,d.resolution)}eN.expandByScalar(o),!1!==t.intersectsBox(eN)&&(a?function(e,n){let i=e.matrixWorld,o=e.geometry,a=o.attributes.instanceStart,l=o.attributes.instanceEnd,s=Math.min(o.instanceCount,a.count);for(let o=0;o<s;o++){eG.start.fromBufferAttribute(a,o),eG.end.fromBufferAttribute(l,o),eG.applyMatrix4(i);let s=new eb.Vector3,c=new eb.Vector3;t.distanceSqToSegment(eG.start,eG.end,c,s),c.distanceTo(s)<.5*r&&n.push({point:c,pointOnLine:s,distance:t.origin.distanceTo(c),object:e,face:null,faceIndex:o,uv:null,[ez]:null})}}(this,n):function(e,n,i){let o=n.projectionMatrix,a=e.material.resolution,l=e.matrixWorld,s=e.geometry,c=s.attributes.instanceStart,u=s.attributes.instanceEnd,d=Math.min(s.instanceCount,c.count),f=-n.near;t.at(1,eI),eI.w=1,eI.applyMatrix4(n.matrixWorldInverse),eI.applyMatrix4(o),eI.multiplyScalar(1/eI.w),eI.x*=a.x/2,eI.y*=a.y/2,eI.z=0,eB.copy(eI),eV.multiplyMatrices(n.matrixWorldInverse,l);for(let n=0;n<d;n++){if(eU.fromBufferAttribute(c,n),eO.fromBufferAttribute(u,n),eU.w=1,eO.w=1,eU.applyMatrix4(eV),eO.applyMatrix4(eV),eU.z>f&&eO.z>f)continue;if(eU.z>f){let e=eU.z-eO.z,t=(eU.z-f)/e;eU.lerp(eO,t)}else if(eO.z>f){let e=eO.z-eU.z,t=(eO.z-f)/e;eO.lerp(eU,t)}eU.applyMatrix4(o),eO.applyMatrix4(o),eU.multiplyScalar(1/eU.w),eO.multiplyScalar(1/eO.w),eU.x*=a.x/2,eU.y*=a.y/2,eO.x*=a.x/2,eO.y*=a.y/2,eG.start.copy(eU),eG.start.z=0,eG.end.copy(eO),eG.end.z=0;let s=eG.closestPointToPointParameter(eB,!0);eG.at(s,eF);let d=eb.MathUtils.lerp(eU.z,eO.z,s),m=d>=-1&&d<=1,p=eB.distanceTo(eF)<.5*r;if(m&&p){eG.start.fromBufferAttribute(c,n),eG.end.fromBufferAttribute(u,n),eG.start.applyMatrix4(l),eG.end.applyMatrix4(l);let r=new eb.Vector3,o=new eb.Vector3;t.distanceSqToSegment(eG.start,eG.end,o,r),i.push({point:o,pointOnLine:r,distance:t.origin.distanceTo(o),object:e,face:null,faceIndex:n,uv:null,[ez]:null})}}}(this,l,n))}}onBeforeRender(e){let t=this.material.uniforms;t&&t.resolution&&(e.getViewport(eR),this.material.uniforms.resolution.value.set(eR.z,eR.w))}}class eZ extends e_{constructor(){super(),this.isLineGeometry=!0,this.type="LineGeometry"}setPositions(e){let t=e.length-3,r=new Float32Array(2*t);for(let n=0;n<t;n+=3)r[2*n]=e[n],r[2*n+1]=e[n+1],r[2*n+2]=e[n+2],r[2*n+3]=e[n+3],r[2*n+4]=e[n+4],r[2*n+5]=e[n+5];return super.setPositions(r),this}setColors(e,t=3){let r=e.length-t,n=new Float32Array(2*r);if(3===t)for(let i=0;i<r;i+=t)n[2*i]=e[i],n[2*i+1]=e[i+1],n[2*i+2]=e[i+2],n[2*i+3]=e[i+3],n[2*i+4]=e[i+4],n[2*i+5]=e[i+5];else for(let i=0;i<r;i+=t)n[2*i]=e[i],n[2*i+1]=e[i+1],n[2*i+2]=e[i+2],n[2*i+3]=e[i+3],n[2*i+4]=e[i+4],n[2*i+5]=e[i+5],n[2*i+6]=e[i+6],n[2*i+7]=e[i+7];return super.setColors(n,t),this}fromLine(e){let t=e.geometry;return this.setPositions(t.attributes.position.array),this}}class eK extends e${constructor(e=new eZ,t=new ej({color:0xffffff*Math.random()})){super(e,t),this.isLine2=!0,this.type="Line2"}}let eX=s.forwardRef(function({points:e,color:t=0xffffff,vertexColors:r,linewidth:n,lineWidth:i,segments:o,dashed:a,...l},c){var u,d;let f=(0,M.useThree)(e=>e.size),m=s.useMemo(()=>o?new e$:new eK,[o]),[p]=s.useState(()=>new ej),h=(null==r||null==(u=r[0])?void 0:u.length)===4?4:3,g=s.useMemo(()=>{let n=o?new e_:new eZ,i=e.map(e=>{let t=Array.isArray(e);return e instanceof v.Vector3||e instanceof v.Vector4?[e.x,e.y,e.z]:e instanceof v.Vector2?[e.x,e.y,0]:t&&3===e.length?[e[0],e[1],e[2]]:t&&2===e.length?[e[0],e[1],0]:e});if(n.setPositions(i.flat()),r){t=0xffffff;let e=r.map(e=>e instanceof v.Color?e.toArray():e);n.setColors(e.flat(),h)}return n},[e,o,r,h]);return s.useLayoutEffect(()=>{m.computeLineDistances()},[e,m]),s.useLayoutEffect(()=>{a?p.defines.USE_DASH="":delete p.defines.USE_DASH,p.needsUpdate=!0},[a,p]),s.useEffect(()=>()=>{g.dispose(),p.dispose()},[g]),s.createElement("primitive",(0,eS.default)({object:m,ref:c},l),s.createElement("primitive",{object:g,attach:"geometry"}),s.createElement("primitive",(0,eS.default)({object:p,attach:"material",color:t,vertexColors:!!r,resolution:[f.width,f.height],linewidth:null!=(d=null!=n?n:i)?d:1,dashed:a,transparent:4===h},l)))});var eq=e.i(74452);let eY={DEG2RAD:Math.PI/180,ROTATION_INTERPOLATION_FACTOR:.05,SOG_SMOOTHING_FACTOR:.1,DEFAULT_SOG:3,ANGLE_INCREMENT:10,SPHERE_SIZE:.4,SPHERE_SEGMENTS:32,PLOTS_COUNT:5,FRAME_TO_MINUTE_RATIO:3600},eQ=(e,t)=>.44704*e*60*t*.1,eJ=(e,t,r)=>{if(!e||!t)return new v.Vector3(0,0,0);let n=e*eY.DEG2RAD,i=eQ(t,r);return new v.Vector3(i*Math.sin(n),0,-i*Math.cos(n))},e0=({position:e,color:t})=>e?(0,l.jsxs)("mesh",{position:e,children:[(0,l.jsx)("sphereGeometry",{args:[eY.SPHERE_SIZE,eY.SPHERE_SEGMENTS,eY.SPHERE_SEGMENTS]}),(0,l.jsx)("meshBasicMaterial",{color:t,transparent:!0,opacity:.8})]}):null,e1=({points:e,color:t})=>e?.length?(0,l.jsx)(eX,{points:e,color:t,lineWidth:2,transparent:!0,opacity:.5}):null,e2=s.default.memo(({timeInMinute:e,windSpeed:t})=>{let r=(0,s.useRef)(eq.default.vpp),n=(0,s.useCallback)((e,t,r,n)=>{if(!e?.length||!t?.length||e.length<=r||t.length<=r)return console.warn("Invalid angle or VMG data"),null;let i=e[r],o=t[r],a=i*eY.DEG2RAD,l=eQ(o,n);return new v.Vector3(l*Math.sin(a),0,-l*Math.cos(a))},[]),i=(0,s.useCallback)((e,t)=>{let{speeds:n,angles:i,beat_angle:o,beat_vmg:a,run_angle:l,run_vmg:s}=r.current;if(!n?.length||!i?.length)return console.warn("Invalid polar data"),null;let c=[],u=(e,r,n)=>{for(let i=e;i<=r;i+=eY.ANGLE_INCREMENT)c.push(eJ(i,n(i),t))};u(0,o[e]-eY.ANGLE_INCREMENT,t=>{let r;return r=a[e],0+t/o[e]*(r-0)});let d=eJ(o[e],a[e],t);c.push(d),i.forEach(n=>{if(n>o[e]&&n<l[e]){let i=r.current[Math.floor(n)]?.[e]||0;c.push(eJ(n,i,t))}});let f=eJ(l[e],s[e],t);return c.push(f),u(l[e]+eY.ANGLE_INCREMENT,180,()=>s[e]),new v.CatmullRomCurve3(c,!0)},[]),o=(0,s.useMemo)(()=>{let o=r.current;if(!o?.speeds?.length)return console.warn("Invalid polar data structure"),{curve:null,beat:null,run:null};let a=((e,t)=>{if(!e?.length)return 0;let r=0,n=e.length-1;for(;r<n;){let i=Math.floor((r+n)/2);e[i]<t?r=i+1:n=i}return r})(o.speeds,t);return{curve:i(a,e),beat:n(o.beat_angle,o.beat_vmg,a,e),run:n(o.run_angle,o.run_vmg,a,e)}},[e,t,n,i]),a=[0,-Math.PI];return(0,l.jsx)(l.Fragment,{children:a.map((e,t)=>(0,l.jsxs)("group",{position:[0,-.7,0],rotation:[0,0,e],children:[o.curve&&(0,l.jsx)(e1,{points:o.curve.getPoints(100),color:g.oBlue}),(0,l.jsx)(e0,{position:o.beat,color:g.oGreen}),(0,l.jsx)(e0,{position:o.run,color:g.oRed})]},t))})});e2.displayName="PolarPlot";let e3=function(){let e=(0,s.useRef)([]),[t,r]=(0,s.useState)([]),n=(0,s.useRef)(0),i=(0,s.useRef)([]),o=(0,s.useRef)(eY.DEFAULT_SOG),a=O.default.get("preferredWindSpeedPath")||"speedTrue",c=O.default.get("preferredWindDirectionPath")||"angleTrueWater",u=(0,s.useMemo)(()=>[`environment.wind.${c}`,`environment.wind.${a}`,"environment.wind.angleTrueWater","environment.wind.angleTrueGround","environment.wind.speedTrue","environment.wind.speedOverGround","environment.wind.angleApparent","environment.wind.speedApparent","navigation.speedOverGround","navigation.headingTrue","navigation.courseOverGroundTrue"],[c,a]),d=(0,x.useSignalKPaths)(u),f=(0,s.useMemo)(()=>{let e=d["environment.wind.angleApparent"],t=d["environment.wind.speedApparent"];if(null!=e&&null!=t&&t>0)return-e;if("directionTrue"===c){let e=d["environment.wind.directionTrue"];if(null!=e)return-(e-(d["navigation.headingTrue"]??d["navigation.courseOverGroundTrue"]??0));let t=d["environment.wind.angleTrueGround"]??d["environment.wind.angleTrueWater"];return null!=t?-t:0}let r=d[`environment.wind.${c}`]??d["environment.wind.angleTrueWater"]??d["environment.wind.angleTrueGround"];return null!=r?-r:0},[d,c]),m=(0,s.useMemo)(()=>{let e=d[`environment.wind.${a}`]??d["environment.wind.speedTrue"]??d["environment.wind.speedOverGround"];return(0,et.convertWindSpeed)(e)||0},[d,a]),h=d["navigation.speedOverGround"]||eY.DEFAULT_SOG,g=(0,s.useRef)(m),[y,w]=(0,s.useState)(Date.now()),M=(0,s.useRef)(null);return(0,s.useEffect)(()=>{let t=Array.from({length:eY.PLOTS_COUNT},(e,t)=>({id:t,timeInMinute:5*(t+1)}));return r(t),e.current=t.map(()=>new v.Group),i.current=Array(eY.PLOTS_COUNT).fill(0),M.current=setInterval(()=>{w(Date.now()),n.current=0},12e4),()=>{M.current&&clearInterval(M.current)}},[]),(0,s.useEffect)(()=>{Math.abs(g.current-m)>5&&(w(Date.now()),n.current=0,g.current=m)},[m]),(0,p.useFrame)(()=>{n.current+=1,o.current=v.MathUtils.lerp(o.current,h,eY.SOG_SMOOTHING_FACTOR),t.forEach((t,r)=>{let o=e.current[r];if(o&&t.timeInMinute-n.current/eY.FRAME_TO_MINUTE_RATIO>0){let e=i.current[r],t=v.MathUtils.lerp(e,f,eY.ROTATION_INTERPOLATION_FACTOR);o.rotation.set(0,t,0),i.current[r]=t}})}),(0,l.jsx)(l.Fragment,{children:t.map((t,r)=>(0,l.jsx)("group",{ref:t=>{t&&(e.current[r]=t)},children:(0,l.jsx)(e2,{timeInMinute:t.timeInMinute,windSpeed:m},`plot-${y}-${r}`)},`${t.id}-${y}`))})},e5=()=>{let{states:e,nightMode:t}=(0,g.useOcearoContext)(),r=t?.3:.5;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("ambientLight",{intensity:t?.2:.4}),(0,l.jsx)("directionalLight",{position:[0,70,-100],intensity:t?.6:1.2,castShadow:!1,color:t?"#b0d8ff":"#ffffff"}),(0,l.jsx)("spotLight",{position:[0,50,100],intensity:2*r,angle:.6,penumbra:1,color:t?"#4080ff":"#ffffff"}),(0,l.jsx)("pointLight",{position:[0,40,-80],intensity:2.5*r,distance:150,decay:2}),(0,l.jsx)("pointLight",{position:[0,30,100],intensity:.8*r,distance:120,decay:2})]})},e4={mainCar:.5,jibCar:.5,tension:.5,reefLevel:0};var e6=e.i(5941),e7=e.i(16196);let e9="#333333",e8="#222222",te=[{label:"GV",centerDeg:180,color:"#09bfff",key:"mainCar",mode:"position"},{label:"FP",centerDeg:260,color:"#15bd6f",key:"jibCar",side:"port",mode:"fill"},{label:"FS",centerDeg:100,color:"#bf1515",key:"jibCar",side:"starboard",mode:"fill"}];function tt(e,t){let r=v.MathUtils.degToRad(e-90);return[t*Math.cos(r),t*Math.sin(r)]}let tr=({label:e,value:t,centerDeg:r,color:n})=>{let i=Math.max(0,Math.min(1,t)),o=(0,s.useMemo)(()=>{let e=[],t=r-15;for(let r=0;r<=12;r++){let o=r/12,[a,s]=tt(t+30*o,4.2),c=Math.abs(o-i),u=c<=.041666666666666664,d=c<=.125,f=.041666666666666664>=Math.abs(o-.5),m=e9,p=.09,h=.3;u?(m=n,p=.16,h=1):d?(m=n,p=.09,h=.5):f&&(h=.5),e.push((0,l.jsx)(ex.Sphere,{args:[p,8,8],position:[a,0,s],children:(0,l.jsx)("meshBasicMaterial",{color:m,transparent:!0,opacity:h})},r))}return e},[i,r,n]),a=v.MathUtils.degToRad(r-90),c=3.6*Math.cos(a),u=3.6*Math.sin(a);return(0,l.jsxs)("group",{children:[o,(0,l.jsx)(e7.Text,{position:[c,-.4,u],color:n,fontSize:.3,rotation:[-Math.PI/2,0,Math.PI/2-a],font:"fonts/Roboto-Bold.ttf",anchorY:"middle",fillOpacity:.9,children:e})]})},tn=({label:e,value:t,centerDeg:r,color:n,active:i})=>{let o=Math.max(0,Math.min(1,t)),a=(0,s.useMemo)(()=>{let e=[],t=r-15;for(let r=0;r<=12;r++){let a=r/12,[s,c]=tt(t+30*a,4.2),u=e8,d=.09,f=.15;if(i){let e=a<=o;.041666666666666664>=Math.abs(a-o)?(u=n,d=.16,f=1):e?(u=n,f=.7):(u=e9,f=.3)}e.push((0,l.jsx)(ex.Sphere,{args:[d,8,8],position:[s,0,c],children:(0,l.jsx)("meshBasicMaterial",{color:u,transparent:!0,opacity:f})},r))}return e},[o,r,n,i]),c=v.MathUtils.degToRad(r-90),u=3.6*Math.cos(c),d=3.6*Math.sin(c);return(0,l.jsxs)("group",{children:[a,(0,l.jsx)(e7.Text,{position:[u,-.4,d],color:i?n:e8,fontSize:.3,rotation:[-Math.PI/2,0,Math.PI/2-c],font:"fonts/Roboto-Bold.ttf",anchorY:"middle",fillOpacity:i?.9:.2,children:e})]})},ti=()=>{let e=(0,x.useSignalKPath)("environment.wind.angleApparent",0),t=(0,x.useSignalKPath)("environment.wind.speedApparent",0),r=(0,s.useMemo)(()=>{let t=e;for(;t<0;)t+=2*Math.PI;for(;t>=2*Math.PI;)t-=2*Math.PI;return t>Math.PI},[e]),{mainCar:n,jibCar:i}=(0,s.useMemo)(()=>(function(e,t){let r=e;for(;r<0;)r+=2*Math.PI;for(;r>=2*Math.PI;)r-=2*Math.PI;let n=r>Math.PI,i=Math.max(0,1-(n?2*Math.PI-r:r)/(.75*Math.PI)),o=Math.min(1,Math.abs(t)/15),a=(1-i)*.4*o;return{mainCar:n?.5-a:.5+a,jibCar:Math.max(.05,Math.min(1,(1-i)*.7+.2*o+.1))}})(e,t),[e,t]);return(0,l.jsx)("group",{children:te.map(e=>{let t="mainCar"===e.key?n:i,o=!0;return("port"===e.side&&(o=!r),"starboard"===e.side&&(o=r),"position"===e.mode)?(0,l.jsx)(tr,{label:e.label,value:t,centerDeg:e.centerDeg,color:e.color},e.label):(0,l.jsx)(tn,{label:e.label,value:t,centerDeg:e.centerDeg,color:e.color,active:o},e.label)})})};e.s(["default",0,({onUpdateInfoPanel:e})=>{let{states:t}=(0,g.useOcearoContext)(),r=(0,s.useRef)(),n=O.default.get("debugShowAxes"),i=(()=>{let[e,t]=(0,s.useState)(e4),r=O.default.get("preferredWindSpeedPath")||"speedTrue",n=O.default.get("preferredWindDirectionPath")||"angleTrueWater",i=(0,s.useMemo)(()=>[`environment.wind.${r}`,`environment.wind.${n}`,"environment.wind.speedTrue","environment.wind.angleTrueWater","environment.wind.angleApparent","environment.wind.speedApparent"],[r,n]),o=(0,x.useSignalKPaths)(i),a=o[`environment.wind.${r}`]??o["environment.wind.speedTrue"]??0,l=o[`environment.wind.${n}`]??o["environment.wind.angleTrueWater"]??0,c=o["environment.wind.angleApparent"]??0,u=o["environment.wind.speedApparent"]??0,d=(0,s.useCallback)((e,r)=>{t(t=>({...t,[e]:r}))},[]),f=(0,s.useCallback)(e=>{d("mainCar",e)},[d]),m=(0,s.useCallback)(e=>{d("jibCar",e)},[d]),p=(0,s.useCallback)(e=>{d("tension",e)},[d]),h=(0,s.useCallback)(e=>{let t=1.9438444924574*e;return t>25?2:+(t>18)},[]),v=(0,s.useMemo)(()=>h(a),[a,h]),g=(0,s.useMemo)(()=>({tws:a,twa:l,awa:c,aws:u}),[a,l,c,u]),y=(0,s.useMemo)(()=>({...e,reefLevel:v,...g}),[e,v,g]);return{trimState:e,windData:g,reefLevel:v,sailTrimParams:y,setMainCar:f,setJibCar:m,setTension:p,setTrimValue:d}})(),o=(0,s.useMemo)(()=>({...(0,e6.updateSailTrim)({tws:i.windData.tws,twa:i.windData.twa,awa:i.windData.awa,mainCar:i.trimState.mainCar,jibCar:i.trimState.jibCar,tension:i.trimState.tension}),trimState:i.trimState}),[i.windData,i.trimState]);return(0,l.jsxs)(s.Suspense,{fallback:(0,l.jsx)(d.Html,{children:"Loading..."}),children:[(0,l.jsx)(u.PerspectiveCamera,{makeDefault:!0,fov:60,near:5,far:2500,position:[0,5,20]}),(0,l.jsx)(c.OrbitControls,{enableZoom:!0,enableRotate:!0,maxPolarAngle:Math.PI/2,minPolarAngle:Math.PI/4,enableDamping:!1,zoomSpeed:.5,rotateSpeed:.5}),(0,l.jsx)(f.Environment,{files:"./assets/ocearo_env.hdr",background:!1,intensity:.8,resolution:256}),(0,l.jsx)(e5,{}),(0,l.jsxs)("group",{position:[0,-3,0],children:[(0,l.jsx)(m.default,{position:[0,0,0],scale:[.7,.7,.7],ref:r,showSail:!0,onUpdateInfoPanel:e,sailTrimData:o}),"black"!==t.oceanMode&&(0,l.jsx)(F,{lite:"water"!==t.oceanMode}),"chart"===t.oceanMode&&(0,l.jsx)(ee,{mode:"chart"}),"meteo"===t.oceanMode&&(0,l.jsx)(ee,{mode:"meteo"}),(0,l.jsx)(w,{}),t.showLaylines3D&&(0,l.jsx)(eM,{outerRadius:5.6}),t.showPolar&&"black"===t.oceanMode&&(0,l.jsx)(e3,{}),t.ais&&(0,l.jsx)(er.AISProvider,{children:(0,l.jsx)(ev,{onUpdateInfoPanel:e})}),(0,l.jsx)(eg.default,{visible:!0}),!1!==O.default.get("showSailTrimSliders")&&(0,l.jsx)(ti,{})]}),n&&(0,l.jsx)("axesHelper",{args:[100]})]})}],67225)},59465,e=>{e.n(e.i(67225))}]);
863
+ `,clipping:!0}),this.isLineMaterial=!0,this.onBeforeCompile=function(){this.transparent?this.defines.USE_LINE_COLOR_ALPHA="1":delete this.defines.USE_LINE_COLOR_ALPHA},Object.defineProperties(this,{color:{enumerable:!0,get:function(){return this.uniforms.diffuse.value},set:function(e){this.uniforms.diffuse.value=e}},worldUnits:{enumerable:!0,get:function(){return"WORLD_UNITS"in this.defines},set:function(e){!0===e?this.defines.WORLD_UNITS="":delete this.defines.WORLD_UNITS}},linewidth:{enumerable:!0,get:function(){return this.uniforms.linewidth.value},set:function(e){this.uniforms.linewidth.value=e}},dashed:{enumerable:!0,get:function(){return"USE_DASH"in this.defines},set(e){!!e!="USE_DASH"in this.defines&&(this.needsUpdate=!0),!0===e?this.defines.USE_DASH="":delete this.defines.USE_DASH}},dashScale:{enumerable:!0,get:function(){return this.uniforms.dashScale.value},set:function(e){this.uniforms.dashScale.value=e}},dashSize:{enumerable:!0,get:function(){return this.uniforms.dashSize.value},set:function(e){this.uniforms.dashSize.value=e}},dashOffset:{enumerable:!0,get:function(){return this.uniforms.dashOffset.value},set:function(e){this.uniforms.dashOffset.value=e}},gapSize:{enumerable:!0,get:function(){return this.uniforms.gapSize.value},set:function(e){this.uniforms.gapSize.value=e}},opacity:{enumerable:!0,get:function(){return this.uniforms.opacity.value},set:function(e){this.uniforms.opacity.value=e}},resolution:{enumerable:!0,get:function(){return this.uniforms.resolution.value},set:function(e){this.uniforms.resolution.value.copy(e)}},alphaToCoverage:{enumerable:!0,get:function(){return"USE_ALPHA_TO_COVERAGE"in this.defines},set:function(e){!!e!="USE_ALPHA_TO_COVERAGE"in this.defines&&(this.needsUpdate=!0),!0===e?(this.defines.USE_ALPHA_TO_COVERAGE="",this.extensions.derivatives=!0):(delete this.defines.USE_ALPHA_TO_COVERAGE,this.extensions.derivatives=!1)}}}),this.setValues(e)}}let eR=ej.version>=125?"uv1":"uv2",eD=new eC.Vector4,eL=new eC.Vector3,eU=new eC.Vector3,eO=new eC.Vector4,eI=new eC.Vector4,eB=new eC.Vector4,eV=new eC.Vector3,eG=new eC.Matrix4,eF=new eC.Line3,eN=new eC.Vector3,ek=new eC.Box3,eW=new eC.Sphere,eH=new eC.Vector4;function e$(e,t,n){return eH.set(0,0,-t,1).applyMatrix4(e.projectionMatrix),eH.multiplyScalar(1/eH.w),eH.x=r/n.width,eH.y=r/n.height,eH.applyMatrix4(e.projectionMatrixInverse),eH.multiplyScalar(1/eH.w),Math.abs(Math.max(eH.x,eH.y))}class eZ extends eC.Mesh{constructor(e=new eA,t=new ez({color:0xffffff*Math.random()})){super(e,t),this.isLineSegments2=!0,this.type="LineSegments2"}computeLineDistances(){let e=this.geometry,t=e.attributes.instanceStart,r=e.attributes.instanceEnd,n=new Float32Array(2*t.count);for(let e=0,i=0,o=t.count;e<o;e++,i+=2)eL.fromBufferAttribute(t,e),eU.fromBufferAttribute(r,e),n[i]=0===i?0:n[i-1],n[i+1]=n[i]+eL.distanceTo(eU);let i=new eC.InstancedInterleavedBuffer(n,2,1);return e.setAttribute("instanceDistanceStart",new eC.InterleavedBufferAttribute(i,1,0)),e.setAttribute("instanceDistanceEnd",new eC.InterleavedBufferAttribute(i,1,1)),this}raycast(e,n){let i,o,a=this.material.worldUnits,l=e.camera;null!==l||a||console.error('LineSegments2: "Raycaster.camera" needs to be set in order to raycast against LineSegments2 while worldUnits is set to false.');let s=void 0!==e.params.Line2&&e.params.Line2.threshold||0;t=e.ray;let c=this.matrixWorld,u=this.geometry,d=this.material;if(r=d.linewidth+s,null===u.boundingSphere&&u.computeBoundingSphere(),eW.copy(u.boundingSphere).applyMatrix4(c),a)i=.5*r;else{let e=Math.max(l.near,eW.distanceToPoint(t.origin));i=e$(l,e,d.resolution)}if(eW.radius+=i,!1!==t.intersectsSphere(eW)){if(null===u.boundingBox&&u.computeBoundingBox(),ek.copy(u.boundingBox).applyMatrix4(c),a)o=.5*r;else{let e=Math.max(l.near,ek.distanceToPoint(t.origin));o=e$(l,e,d.resolution)}ek.expandByScalar(o),!1!==t.intersectsBox(ek)&&(a?function(e,n){let i=e.matrixWorld,o=e.geometry,a=o.attributes.instanceStart,l=o.attributes.instanceEnd,s=Math.min(o.instanceCount,a.count);for(let o=0;o<s;o++){eF.start.fromBufferAttribute(a,o),eF.end.fromBufferAttribute(l,o),eF.applyMatrix4(i);let s=new eC.Vector3,c=new eC.Vector3;t.distanceSqToSegment(eF.start,eF.end,c,s),c.distanceTo(s)<.5*r&&n.push({point:c,pointOnLine:s,distance:t.origin.distanceTo(c),object:e,face:null,faceIndex:o,uv:null,[eR]:null})}}(this,n):function(e,n,i){let o=n.projectionMatrix,a=e.material.resolution,l=e.matrixWorld,s=e.geometry,c=s.attributes.instanceStart,u=s.attributes.instanceEnd,d=Math.min(s.instanceCount,c.count),f=-n.near;t.at(1,eB),eB.w=1,eB.applyMatrix4(n.matrixWorldInverse),eB.applyMatrix4(o),eB.multiplyScalar(1/eB.w),eB.x*=a.x/2,eB.y*=a.y/2,eB.z=0,eV.copy(eB),eG.multiplyMatrices(n.matrixWorldInverse,l);for(let n=0;n<d;n++){if(eO.fromBufferAttribute(c,n),eI.fromBufferAttribute(u,n),eO.w=1,eI.w=1,eO.applyMatrix4(eG),eI.applyMatrix4(eG),eO.z>f&&eI.z>f)continue;if(eO.z>f){let e=eO.z-eI.z,t=(eO.z-f)/e;eO.lerp(eI,t)}else if(eI.z>f){let e=eI.z-eO.z,t=(eI.z-f)/e;eI.lerp(eO,t)}eO.applyMatrix4(o),eI.applyMatrix4(o),eO.multiplyScalar(1/eO.w),eI.multiplyScalar(1/eI.w),eO.x*=a.x/2,eO.y*=a.y/2,eI.x*=a.x/2,eI.y*=a.y/2,eF.start.copy(eO),eF.start.z=0,eF.end.copy(eI),eF.end.z=0;let s=eF.closestPointToPointParameter(eV,!0);eF.at(s,eN);let d=eC.MathUtils.lerp(eO.z,eI.z,s),m=d>=-1&&d<=1,p=eV.distanceTo(eN)<.5*r;if(m&&p){eF.start.fromBufferAttribute(c,n),eF.end.fromBufferAttribute(u,n),eF.start.applyMatrix4(l),eF.end.applyMatrix4(l);let r=new eC.Vector3,o=new eC.Vector3;t.distanceSqToSegment(eF.start,eF.end,o,r),i.push({point:o,pointOnLine:r,distance:t.origin.distanceTo(o),object:e,face:null,faceIndex:n,uv:null,[eR]:null})}}}(this,l,n))}}onBeforeRender(e){let t=this.material.uniforms;t&&t.resolution&&(e.getViewport(eD),this.material.uniforms.resolution.value.set(eD.z,eD.w))}}class eK extends eA{constructor(){super(),this.isLineGeometry=!0,this.type="LineGeometry"}setPositions(e){let t=e.length-3,r=new Float32Array(2*t);for(let n=0;n<t;n+=3)r[2*n]=e[n],r[2*n+1]=e[n+1],r[2*n+2]=e[n+2],r[2*n+3]=e[n+3],r[2*n+4]=e[n+4],r[2*n+5]=e[n+5];return super.setPositions(r),this}setColors(e,t=3){let r=e.length-t,n=new Float32Array(2*r);if(3===t)for(let i=0;i<r;i+=t)n[2*i]=e[i],n[2*i+1]=e[i+1],n[2*i+2]=e[i+2],n[2*i+3]=e[i+3],n[2*i+4]=e[i+4],n[2*i+5]=e[i+5];else for(let i=0;i<r;i+=t)n[2*i]=e[i],n[2*i+1]=e[i+1],n[2*i+2]=e[i+2],n[2*i+3]=e[i+3],n[2*i+4]=e[i+4],n[2*i+5]=e[i+5],n[2*i+6]=e[i+6],n[2*i+7]=e[i+7];return super.setColors(n,t),this}fromLine(e){let t=e.geometry;return this.setPositions(t.attributes.position.array),this}}class eX extends eZ{constructor(e=new eK,t=new ez({color:0xffffff*Math.random()})){super(e,t),this.isLine2=!0,this.type="Line2"}}let eq=s.forwardRef(function({points:e,color:t=0xffffff,vertexColors:r,linewidth:n,lineWidth:i,segments:o,dashed:a,...l},c){var u,d;let f=(0,M.useThree)(e=>e.size),m=s.useMemo(()=>o?new eZ:new eX,[o]),[p]=s.useState(()=>new ez),h=(null==r||null==(u=r[0])?void 0:u.length)===4?4:3,g=s.useMemo(()=>{let n=o?new eA:new eK,i=e.map(e=>{let t=Array.isArray(e);return e instanceof v.Vector3||e instanceof v.Vector4?[e.x,e.y,e.z]:e instanceof v.Vector2?[e.x,e.y,0]:t&&3===e.length?[e[0],e[1],e[2]]:t&&2===e.length?[e[0],e[1],0]:e});if(n.setPositions(i.flat()),r){t=0xffffff;let e=r.map(e=>e instanceof v.Color?e.toArray():e);n.setColors(e.flat(),h)}return n},[e,o,r,h]);return s.useLayoutEffect(()=>{m.computeLineDistances()},[e,m]),s.useLayoutEffect(()=>{a?p.defines.USE_DASH="":delete p.defines.USE_DASH,p.needsUpdate=!0},[a,p]),s.useEffect(()=>()=>{g.dispose(),p.dispose()},[g]),s.createElement("primitive",(0,eb.default)({object:m,ref:c},l),s.createElement("primitive",{object:g,attach:"geometry"}),s.createElement("primitive",(0,eb.default)({object:p,attach:"material",color:t,vertexColors:!!r,resolution:[f.width,f.height],linewidth:null!=(d=null!=n?n:i)?d:1,dashed:a,transparent:4===h},l)))});var eY=e.i(74452);let eQ={DEG2RAD:Math.PI/180,ROTATION_INTERPOLATION_FACTOR:.05,SOG_SMOOTHING_FACTOR:.1,DEFAULT_SOG:3,ANGLE_INCREMENT:10,SPHERE_SIZE:.4,SPHERE_SEGMENTS:32,PLOTS_COUNT:5,FRAME_TO_MINUTE_RATIO:3600},eJ=(e,t)=>.44704*e*60*t*.1,e0=(e,t,r)=>{if(!e||!t)return new v.Vector3(0,0,0);let n=e*eQ.DEG2RAD,i=eJ(t,r);return new v.Vector3(i*Math.sin(n),0,-i*Math.cos(n))},e1=({position:e,color:t})=>e?(0,l.jsxs)("mesh",{position:e,children:[(0,l.jsx)("sphereGeometry",{args:[eQ.SPHERE_SIZE,eQ.SPHERE_SEGMENTS,eQ.SPHERE_SEGMENTS]}),(0,l.jsx)("meshBasicMaterial",{color:t,transparent:!0,opacity:.8})]}):null,e2=({points:e,color:t})=>e?.length?(0,l.jsx)(eq,{points:e,color:t,lineWidth:2,transparent:!0,opacity:.5}):null,e3=s.default.memo(({timeInMinute:e,windSpeed:t})=>{let r=(0,s.useRef)(eY.default.vpp),n=(0,s.useCallback)((e,t,r,n)=>{if(!e?.length||!t?.length||e.length<=r||t.length<=r)return console.warn("Invalid angle or VMG data"),null;let i=e[r],o=t[r],a=i*eQ.DEG2RAD,l=eJ(o,n);return new v.Vector3(l*Math.sin(a),0,-l*Math.cos(a))},[]),i=(0,s.useCallback)((e,t)=>{let{speeds:n,angles:i,beat_angle:o,beat_vmg:a,run_angle:l,run_vmg:s}=r.current;if(!n?.length||!i?.length)return console.warn("Invalid polar data"),null;let c=[],u=(e,r,n)=>{for(let i=e;i<=r;i+=eQ.ANGLE_INCREMENT)c.push(e0(i,n(i),t))};u(0,o[e]-eQ.ANGLE_INCREMENT,t=>{let r;return r=a[e],0+t/o[e]*(r-0)});let d=e0(o[e],a[e],t);c.push(d),i.forEach(n=>{if(n>o[e]&&n<l[e]){let i=r.current[Math.floor(n)]?.[e]||0;c.push(e0(n,i,t))}});let f=e0(l[e],s[e],t);return c.push(f),u(l[e]+eQ.ANGLE_INCREMENT,180,()=>s[e]),new v.CatmullRomCurve3(c,!0)},[]),o=(0,s.useMemo)(()=>{let o=r.current;if(!o?.speeds?.length)return console.warn("Invalid polar data structure"),{curve:null,beat:null,run:null};let a=((e,t)=>{if(!e?.length)return 0;let r=0,n=e.length-1;for(;r<n;){let i=Math.floor((r+n)/2);e[i]<t?r=i+1:n=i}return r})(o.speeds,t);return{curve:i(a,e),beat:n(o.beat_angle,o.beat_vmg,a,e),run:n(o.run_angle,o.run_vmg,a,e)}},[e,t,n,i]),a=[0,-Math.PI];return(0,l.jsx)(l.Fragment,{children:a.map((e,t)=>(0,l.jsxs)("group",{position:[0,-.7,0],rotation:[0,0,e],children:[o.curve&&(0,l.jsx)(e2,{points:o.curve.getPoints(100),color:g.oBlue}),(0,l.jsx)(e1,{position:o.beat,color:g.oGreen}),(0,l.jsx)(e1,{position:o.run,color:g.oRed})]},t))})});e3.displayName="PolarPlot";let e5=function(){let e=(0,s.useRef)([]),[t,r]=(0,s.useState)([]),n=(0,s.useRef)(0),i=(0,s.useRef)([]),o=(0,s.useRef)(eQ.DEFAULT_SOG),a=O.default.get("preferredWindSpeedPath")||"speedTrue",c=O.default.get("preferredWindDirectionPath")||"angleTrueWater",u=(0,s.useMemo)(()=>[`environment.wind.${c}`,`environment.wind.${a}`,"environment.wind.angleTrueWater","environment.wind.angleTrueGround","environment.wind.speedTrue","environment.wind.speedOverGround","environment.wind.angleApparent","environment.wind.speedApparent","navigation.speedOverGround","navigation.headingTrue","navigation.courseOverGroundTrue"],[c,a]),d=(0,x.useSignalKPaths)(u),f=(0,s.useMemo)(()=>{let e=d["environment.wind.angleApparent"],t=d["environment.wind.speedApparent"];if(null!=e&&null!=t&&t>0)return-e;if("directionTrue"===c){let e=d["environment.wind.directionTrue"];if(null!=e)return-(e-(d["navigation.headingTrue"]??d["navigation.courseOverGroundTrue"]??0));let t=d["environment.wind.angleTrueGround"]??d["environment.wind.angleTrueWater"];return null!=t?-t:0}let r=d[`environment.wind.${c}`]??d["environment.wind.angleTrueWater"]??d["environment.wind.angleTrueGround"];return null!=r?-r:0},[d,c]),m=(0,s.useMemo)(()=>{let e=d[`environment.wind.${a}`]??d["environment.wind.speedTrue"]??d["environment.wind.speedOverGround"];return(0,er.convertWindSpeed)(e)||0},[d,a]),h=d["navigation.speedOverGround"]||eQ.DEFAULT_SOG,g=(0,s.useRef)(m),[y,w]=(0,s.useState)(Date.now()),M=(0,s.useRef)(null);return(0,s.useEffect)(()=>{let t=Array.from({length:eQ.PLOTS_COUNT},(e,t)=>({id:t,timeInMinute:5*(t+1)}));return r(t),e.current=t.map(()=>new v.Group),i.current=Array(eQ.PLOTS_COUNT).fill(0),M.current=setInterval(()=>{w(Date.now()),n.current=0},12e4),()=>{M.current&&clearInterval(M.current)}},[]),(0,s.useEffect)(()=>{Math.abs(g.current-m)>5&&(w(Date.now()),n.current=0,g.current=m)},[m]),(0,p.useFrame)(()=>{n.current+=1,o.current=v.MathUtils.lerp(o.current,h,eQ.SOG_SMOOTHING_FACTOR),t.forEach((t,r)=>{let o=e.current[r];if(o&&t.timeInMinute-n.current/eQ.FRAME_TO_MINUTE_RATIO>0){let e=i.current[r],t=v.MathUtils.lerp(e,f,eQ.ROTATION_INTERPOLATION_FACTOR);o.rotation.set(0,t,0),i.current[r]=t}})}),(0,l.jsx)(l.Fragment,{children:t.map((t,r)=>(0,l.jsx)("group",{ref:t=>{t&&(e.current[r]=t)},children:(0,l.jsx)(e3,{timeInMinute:t.timeInMinute,windSpeed:m},`plot-${y}-${r}`)},`${t.id}-${y}`))})},e4=()=>{let{states:e,nightMode:t}=(0,g.useOcearoContext)(),r=t?.3:.5;return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("ambientLight",{intensity:t?.2:.4}),(0,l.jsx)("directionalLight",{position:[0,70,-100],intensity:t?.6:1.2,castShadow:!1,color:t?"#b0d8ff":"#ffffff"}),(0,l.jsx)("spotLight",{position:[0,50,100],intensity:2*r,angle:.6,penumbra:1,color:t?"#4080ff":"#ffffff"}),(0,l.jsx)("pointLight",{position:[0,40,-80],intensity:2.5*r,distance:150,decay:2}),(0,l.jsx)("pointLight",{position:[0,30,100],intensity:.8*r,distance:120,decay:2})]})},e6={mainCar:.5,jibCar:.5,tension:.5,reefLevel:0};var e7=e.i(5941),e9=e.i(16196);let e8="#333333",te="#222222",tt=[{label:"GV",centerDeg:180,color:"#09bfff",key:"mainCar",mode:"position"},{label:"FP",centerDeg:260,color:"#15bd6f",key:"jibCar",side:"port",mode:"fill"},{label:"FS",centerDeg:100,color:"#bf1515",key:"jibCar",side:"starboard",mode:"fill"}];function tr(e,t){let r=v.MathUtils.degToRad(e-90);return[t*Math.cos(r),t*Math.sin(r)]}let tn=({label:e,value:t,centerDeg:r,color:n})=>{let i=Math.max(0,Math.min(1,t)),o=(0,s.useMemo)(()=>{let e=[],t=r-15;for(let r=0;r<=12;r++){let o=r/12,[a,s]=tr(t+30*o,4.2),c=Math.abs(o-i),u=c<=.041666666666666664,d=c<=.125,f=.041666666666666664>=Math.abs(o-.5),m=e8,p=.09,h=.3;u?(m=n,p=.16,h=1):d?(m=n,p=.09,h=.5):f&&(h=.5),e.push((0,l.jsx)(ey.Sphere,{args:[p,8,8],position:[a,0,s],children:(0,l.jsx)("meshBasicMaterial",{color:m,transparent:!0,opacity:h})},r))}return e},[i,r,n]),a=v.MathUtils.degToRad(r-90),c=3.6*Math.cos(a),u=3.6*Math.sin(a);return(0,l.jsxs)("group",{children:[o,(0,l.jsx)(e9.Text,{position:[c,-.4,u],color:n,fontSize:.3,rotation:[-Math.PI/2,0,Math.PI/2-a],font:"fonts/Roboto-Bold.ttf",anchorY:"middle",fillOpacity:.9,children:e})]})},ti=({label:e,value:t,centerDeg:r,color:n,active:i})=>{let o=Math.max(0,Math.min(1,t)),a=(0,s.useMemo)(()=>{let e=[],t=r-15;for(let r=0;r<=12;r++){let a=r/12,[s,c]=tr(t+30*a,4.2),u=te,d=.09,f=.15;if(i){let e=a<=o;.041666666666666664>=Math.abs(a-o)?(u=n,d=.16,f=1):e?(u=n,f=.7):(u=e8,f=.3)}e.push((0,l.jsx)(ey.Sphere,{args:[d,8,8],position:[s,0,c],children:(0,l.jsx)("meshBasicMaterial",{color:u,transparent:!0,opacity:f})},r))}return e},[o,r,n,i]),c=v.MathUtils.degToRad(r-90),u=3.6*Math.cos(c),d=3.6*Math.sin(c);return(0,l.jsxs)("group",{children:[a,(0,l.jsx)(e9.Text,{position:[u,-.4,d],color:i?n:te,fontSize:.3,rotation:[-Math.PI/2,0,Math.PI/2-c],font:"fonts/Roboto-Bold.ttf",anchorY:"middle",fillOpacity:i?.9:.2,children:e})]})},to=()=>{let e=(0,x.useSignalKPath)("environment.wind.angleApparent",0),t=(0,x.useSignalKPath)("environment.wind.speedApparent",0),r=(0,s.useMemo)(()=>{let t=e;for(;t<0;)t+=2*Math.PI;for(;t>=2*Math.PI;)t-=2*Math.PI;return t>Math.PI},[e]),{mainCar:n,jibCar:i}=(0,s.useMemo)(()=>(function(e,t){let r=e;for(;r<0;)r+=2*Math.PI;for(;r>=2*Math.PI;)r-=2*Math.PI;let n=r>Math.PI,i=Math.max(0,1-(n?2*Math.PI-r:r)/(.75*Math.PI)),o=Math.min(1,Math.abs(t)/15),a=(1-i)*.4*o;return{mainCar:n?.5-a:.5+a,jibCar:Math.max(.05,Math.min(1,(1-i)*.7+.2*o+.1))}})(e,t),[e,t]);return(0,l.jsx)("group",{children:tt.map(e=>{let t="mainCar"===e.key?n:i,o=!0;return("port"===e.side&&(o=!r),"starboard"===e.side&&(o=r),"position"===e.mode)?(0,l.jsx)(tn,{label:e.label,value:t,centerDeg:e.centerDeg,color:e.color},e.label):(0,l.jsx)(ti,{label:e.label,value:t,centerDeg:e.centerDeg,color:e.color,active:o},e.label)})})};e.s(["default",0,({onUpdateInfoPanel:e})=>{let{states:t}=(0,g.useOcearoContext)(),r=(0,s.useRef)(),n=O.default.get("debugShowAxes"),i=(()=>{let[e,t]=(0,s.useState)(e6),r=O.default.get("preferredWindSpeedPath")||"speedTrue",n=O.default.get("preferredWindDirectionPath")||"angleTrueWater",i=(0,s.useMemo)(()=>[`environment.wind.${r}`,`environment.wind.${n}`,"environment.wind.speedTrue","environment.wind.angleTrueWater","environment.wind.angleApparent","environment.wind.speedApparent"],[r,n]),o=(0,x.useSignalKPaths)(i),a=o[`environment.wind.${r}`]??o["environment.wind.speedTrue"]??0,l=o[`environment.wind.${n}`]??o["environment.wind.angleTrueWater"]??0,c=o["environment.wind.angleApparent"]??0,u=o["environment.wind.speedApparent"]??0,d=(0,s.useCallback)((e,r)=>{t(t=>({...t,[e]:r}))},[]),f=(0,s.useCallback)(e=>{d("mainCar",e)},[d]),m=(0,s.useCallback)(e=>{d("jibCar",e)},[d]),p=(0,s.useCallback)(e=>{d("tension",e)},[d]),h=(0,s.useCallback)(e=>{let t=1.9438444924574*e;return t>25?2:+(t>18)},[]),v=(0,s.useMemo)(()=>h(a),[a,h]),g=(0,s.useMemo)(()=>({tws:a,twa:l,awa:c,aws:u}),[a,l,c,u]),y=(0,s.useMemo)(()=>({...e,reefLevel:v,...g}),[e,v,g]);return{trimState:e,windData:g,reefLevel:v,sailTrimParams:y,setMainCar:f,setJibCar:m,setTension:p,setTrimValue:d}})(),o=(0,s.useMemo)(()=>({...(0,e7.updateSailTrim)({tws:i.windData.tws,twa:i.windData.twa,awa:i.windData.awa,mainCar:i.trimState.mainCar,jibCar:i.trimState.jibCar,tension:i.trimState.tension}),trimState:i.trimState}),[i.windData,i.trimState]);return(0,l.jsxs)(s.Suspense,{fallback:(0,l.jsx)(d.Html,{children:"Loading..."}),children:[(0,l.jsx)(u.PerspectiveCamera,{makeDefault:!0,fov:60,near:5,far:2500,position:[0,5,20]}),(0,l.jsx)(c.OrbitControls,{enableZoom:!0,enableRotate:!0,maxPolarAngle:Math.PI/2,minPolarAngle:Math.PI/4,enableDamping:!1,zoomSpeed:.5,rotateSpeed:.5}),(0,l.jsx)(f.Environment,{files:"./assets/ocearo_env.hdr",background:!1,intensity:.8,resolution:256}),(0,l.jsx)(e4,{}),(0,l.jsxs)("group",{position:[0,-3,0],children:[(0,l.jsx)(m.default,{position:[0,.2*("chart"===t.oceanMode||"meteo"===t.oceanMode),0],scale:[.7,.7,.7],ref:r,showSail:!0,onUpdateInfoPanel:e,sailTrimData:o}),"black"!==t.oceanMode&&(0,l.jsx)(N,{lite:"water"!==t.oceanMode}),"chart"===t.oceanMode&&(0,l.jsx)(et,{mode:"chart"}),"meteo"===t.oceanMode&&(0,l.jsx)(et,{mode:"meteo"}),(0,l.jsx)(w,{}),t.showLaylines3D&&(0,l.jsx)(eS,{outerRadius:5.6}),t.showPolar&&"black"===t.oceanMode&&(0,l.jsx)(e5,{}),t.ais&&(0,l.jsx)(en.AISProvider,{children:(0,l.jsx)(eg,{onUpdateInfoPanel:e})}),(0,l.jsx)(ex.default,{visible:!0}),!1!==O.default.get("showSailTrimSliders")&&(0,l.jsx)(to,{})]}),n&&(0,l.jsx)("axesHelper",{args:[100]})]})}],67225)},59465,e=>{e.n(e.i(67225))}]);
@@ -0,0 +1 @@
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,39896,e=>{"use strict";var t=e.i(43476),a=e.i(71645),i=e.i(67561),r=e.i(46991),l=e.i(85709),n=e.i(72466),s=e.i(49721),o=e.i(68757),c=e.i(88653),d=e.i(46932);e.i(85269);var u=e.i(22831),m=e.i(48390);let p=e=>Number.isFinite(e)?`${(e/1e9).toFixed(1)} GB`:"--",x=(e,t,a)=>Number.isFinite(e)?e>=a?"text-oRed":e>=t?"text-oYellow":"text-oGreen":"text-hud-muted",h=({label:e,value:a,unit:i,percent:r,warn:l,critical:n,icon:o})=>{let c=x(r??a,l,n);return(0,t.jsxs)("div",{className:"tesla-card p-4 bg-hud-elevated rounded-sm border border-hud",children:[(0,t.jsx)("div",{className:"flex items-center justify-between mb-2",children:(0,t.jsxs)("span",{className:"text-hud-secondary text-xs font-black uppercase tracking-widest",children:[(0,t.jsx)(s.FontAwesomeIcon,{icon:o,className:"mr-2 opacity-60"}),e]})}),(0,t.jsxs)("div",{className:`text-3xl font-black gliding-value ${c}`,children:[Number.isFinite(a)?a:"--",(0,t.jsx)("span",{className:"text-sm ml-1 opacity-60",children:i})]}),Number.isFinite(r)&&(0,t.jsx)("div",{className:"mt-3 h-1 bg-hud rounded-full overflow-hidden",children:(0,t.jsx)("div",{className:`h-full transition-all duration-700 ${c.replace("text-","bg-")}`,style:{width:`${Math.min(Math.max(r,0),100)}%`}})})]})},f=()=>{let{t:e}=(0,u.useTranslation)(),[i,r]=(0,a.useState)(null),[l,n]=(0,a.useState)(null),c=(0,a.useCallback)(async()=>{try{let e=await (0,m.makeOcearoCoreApiCall)("/system/metrics?top=8");r(e),n(null)}catch(e){n(e.message)}},[]);if((0,a.useEffect)(()=>{c();let e=setInterval(c,5e3);return()=>clearInterval(e)},[c]),l&&!i)return(0,t.jsx)("div",{className:"flex-1 flex items-center justify-center text-hud-muted text-sm font-black uppercase tracking-widest",children:e("battery.rpiUnavailable")});let d=i?.cpu??{},f=i?.memory??{},b=i?.disk??{},v=d.throttling,y=v&&(v.underVoltageNow||v.throttledNow||v.softTempLimitNow||v.frequencyCappedNow),g=v&&(v.underVoltageSinceBoot||v.throttledSinceBoot||v.softTempLimitSinceBoot||v.frequencyCappedSinceBoot);return(0,t.jsxs)("div",{className:"flex-1 overflow-auto p-4 space-y-4",children:[(0,t.jsxs)("div",{className:"flex items-baseline justify-between",children:[(0,t.jsx)("span",{className:"text-hud-main text-sm font-black uppercase tracking-widest",children:i?.hostname??"--"}),(0,t.jsxs)("span",{className:"text-hud-muted text-xs font-black uppercase tracking-widest",children:[e("battery.rpiUptime")," ",(e=>{if(!Number.isFinite(e))return"--";let t=Math.floor(e/86400),a=Math.floor(e%86400/3600),i=Math.floor(e%3600/60);return[t&&`${t}d`,(t||a)&&`${a}h`,`${i}m`].filter(Boolean).join(" ")})(i?.uptimeSeconds)]})]}),y&&(0,t.jsxs)("div",{className:"flex items-center p-3 rounded-sm border border-oRed/40 bg-oRed/10 text-oRed text-xs font-black uppercase tracking-widest",children:[(0,t.jsx)(s.FontAwesomeIcon,{icon:o.faTriangleExclamation,className:"mr-2"}),e(v.softTempLimitNow||v.throttledNow?"battery.rpiThrottlingHeat":"battery.rpiThrottlingPower")]}),!y&&g&&(0,t.jsxs)("div",{className:"flex items-center p-3 rounded-sm border border-oYellow/40 bg-oYellow/10 text-oYellow text-xs font-black uppercase tracking-widest",children:[(0,t.jsx)(s.FontAwesomeIcon,{icon:o.faTriangleExclamation,className:"mr-2"}),e("battery.rpiThrottlingPast")]}),(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-3",children:[(0,t.jsx)(h,{label:e("battery.rpiTemperature"),icon:o.faTemperatureHalf,value:d.temperature,unit:"°C",percent:d.temperature,warn:70,critical:80}),(0,t.jsx)(h,{label:e("battery.rpiCpu"),icon:o.faMicrochip,value:d.percent,unit:"%",percent:d.percent,warn:70,critical:90}),(0,t.jsx)(h,{label:e("battery.rpiMemory"),icon:o.faMemory,value:f.usedPercent,unit:"%",percent:f.usedPercent,warn:75,critical:90}),(0,t.jsx)(h,{label:e("battery.rpiDisk"),icon:o.faHardDrive,value:b.usedPercent,unit:"%",percent:b.usedPercent,warn:80,critical:92})]}),(0,t.jsx)("div",{className:"grid grid-cols-3 gap-3 text-center",children:[{label:e("battery.rpiLoad"),value:d.loadAverage?d.loadAverage.join(" "):"--"},{label:e("battery.rpiRam"),value:`${p(f.used)} / ${p(f.total)}`},{label:e("battery.rpiSwap"),value:p(f.swapUsed)}].map(e=>(0,t.jsxs)("div",{className:"tesla-card p-3 bg-hud-elevated rounded-sm border border-hud",children:[(0,t.jsx)("div",{className:"text-hud-muted text-[10px] font-black uppercase tracking-widest",children:e.label}),(0,t.jsx)("div",{className:"text-hud-main text-sm font-black gliding-value mt-1",children:e.value})]},e.label))}),(0,t.jsxs)("div",{className:"tesla-card bg-hud-elevated rounded-sm border border-hud overflow-hidden",children:[(0,t.jsx)("div",{className:"px-4 py-2 border-b border-hud text-hud-secondary text-xs font-black uppercase tracking-widest",children:e("battery.rpiTopProcesses")}),(0,t.jsx)("table",{className:"w-full text-xs font-black",children:(0,t.jsx)("tbody",{className:"divide-y divide-hud",children:(i?.processes??[]).map(e=>{let a;return(0,t.jsxs)("tr",{className:"text-hud-main",children:[(0,t.jsx)("td",{className:"px-4 py-2 truncate max-w-[10rem] normal-case",children:e.name}),(0,t.jsx)("td",{className:"px-2 py-2 text-hud-muted font-mono",children:e.pid}),(0,t.jsx)("td",{className:`px-2 py-2 text-right gliding-value ${x(e.cpuPercent,50,100)}`,children:Number.isFinite(e.cpuPercent)?`${e.cpuPercent}%`:"--"}),(0,t.jsx)("td",{className:"px-4 py-2 text-right text-hud-secondary gliding-value",children:Number.isFinite(a=e.memoryBytes)?`${Math.round(a/1e6)} MB`:"--"})]},e.pid)})})})]})]})};var b=e.i(25949),v=e.i(33369),y=["axis"],g=(0,a.forwardRef)((e,t)=>a.createElement(v.CartesianChart,{chartName:"LineChart",defaultTooltipEventType:"axis",validateTooltipEventTypes:y,tooltipPayloadSearcher:b.arrayTooltipSearcher,categoricalChartProps:e,ref:t})),j=a,N=e.i(7670),w=e.i(97865),k=e.i(72733),A=["animationElapsedTime","isAnimating","isEntrance","visibleLength","strokeDasharray","connectNulls"];function C(){return(C=Object.assign.bind()).apply(null,arguments)}function O(e,t){return"".concat(t,"px ").concat(e,"px")}var P=e.i(36536),E=e.i(69212),I=e.i(86031),S=e.i(94395),$=e.i(81977),R=e.i(79812),T=e.i(41818),D=e.i(844),L=["children"],B=(0,a.createContext)({data:[],xAxisId:"xAxis-0",yAxisId:"yAxis-0",dataPointFormatter:()=>({x:0,y:0,value:0}),errorBarOffset:0});function F(e){var t=e.children,i=function(e,t){if(null==e)return{};var a,i,r=function(e,t){if(null==e)return{};var a={};for(var i in e)if(({}).hasOwnProperty.call(e,i)){if(-1!==t.indexOf(i))continue;a[i]=e[i]}return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(i=0;i<l.length;i++)a=l[i],-1===t.indexOf(a)&&({}).propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}(e,L);return a.createElement(B.Provider,{value:i},t)}var G=e.i(59798),M=e.i(46710),K=e.i(75337),_=e.i(61849),W=e.i(92860),z=e.i(61764),H=(e,t,a,i)=>(0,z.selectAxisWithScale)(e,"xAxis",t,i),V=(e,t,a,i)=>(0,z.selectTicksOfGraphicalItem)(e,"xAxis",t,i),U=(e,t,a,i)=>(0,z.selectAxisWithScale)(e,"yAxis",a,i),Y=(e,t,a,i)=>(0,z.selectTicksOfGraphicalItem)(e,"yAxis",a,i),q=(0,_.createSelector)([M.selectChartLayout,H,U,V,Y],(e,t,a,i,r)=>(0,R.isCategoricalAxis)(e,"xAxis")?(0,R.getBandSizeOfAxis)(t,i,!1):(0,R.getBandSizeOfAxis)(a,r,!1));function X(e){return"line"===e.type}var Z=(0,_.createSelector)([z.selectUnfilteredCartesianItems,(e,t,a,i,r)=>r],(e,t)=>e.filter(X).find(e=>e.id===t)),J=(0,_.createSelector)([M.selectChartLayout,H,U,V,Y,Z,q,W.selectChartDataWithIndexesIfNotInPanoramaPosition4],(e,t,a,i,r,l,n,s)=>{var o,c=s.chartData,d=s.dataStartIndex,u=s.dataEndIndex;if(null!=l&&null!=t&&null!=a&&null!=i&&null!=r&&0!==i.length&&0!==r.length&&null!=n&&("horizontal"===e||"vertical"===e)){var m,p,x,h,f,b,v,y,g=l.dataKey,j=l.data;if(null!=(o=null!=j&&j.length>0?j:null==c?void 0:c.slice(d,u+1))){return p=(m={layout:e,xAxis:t,yAxis:a,xAxisTicks:i,yAxisTicks:r,dataKey:g,bandSize:n,displayedData:o}).layout,x=m.xAxis,h=m.yAxis,f=m.xAxisTicks,b=m.yAxisTicks,v=m.dataKey,y=m.bandSize,m.displayedData.map((e,t)=>{var a=(0,R.getValueByDataKey)(e,v);if("horizontal"===p){var i=(0,R.getCateCoordinateOfLine)({axis:x,ticks:f,bandSize:y,entry:e,index:t}),r=(0,S.isNullish)(a)?null:h.scale.map(a);return{x:i,y:null!=r?r:null,value:a,payload:e}}var l=(0,S.isNullish)(a)?null:x.scale.map(a),n=(0,R.getCateCoordinateOfLine)({axis:h,ticks:b,bandSize:y,entry:e,index:t});return null==l||null==n?null:{x:l,y:n,value:a,payload:e}}).filter(Boolean)}}}),Q=e.i(27241),ee=e.i(95146),et=e.i(30174),ea=e.i(8436),ei=e.i(51883),er=e.i(52734),el=e.i(15549),en=e.i(91187),es=e.i(57999),eo=e.i(43404),ec=e.i(81583),ed=e.i(18519),eu=e.i(29601),em=e.i(18457),ep=e.i(20135),ex=["id"],eh=["type","layout","connectNulls","needClip","shape","strokeDasharray"],ef=["activeDot","animateNewValues","animationBegin","animationDuration","animationEasing","connectNulls","dot","hide","isAnimationActive","label","legendType","xAxisId","yAxisId","id"];function eb(){return(eb=Object.assign.bind()).apply(null,arguments)}function ev(e,t){if(null==e)return{};var a,i,r=function(e,t){if(null==e)return{};var a={};for(var i in e)if(({}).hasOwnProperty.call(e,i)){if(-1!==t.indexOf(i))continue;a[i]=e[i]}return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(i=0;i<l.length;i++)a=l[i],-1===t.indexOf(a)&&({}).propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}function ey(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),a.push.apply(a,i)}return a}function eg(e){for(var t=1;t<arguments.length;t++){var a=null!=arguments[t]?arguments[t]:{};t%2?ey(Object(a),!0).forEach(function(t){var i,r,l;i=e,r=t,l=a[t],(r=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var a=e[Symbol.toPrimitive];if(void 0!==a){var i=a.call(e,t||"default");if("object"!=typeof i)return i;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(r))in i?Object.defineProperty(i,r,{value:l,enumerable:!0,configurable:!0,writable:!0}):i[r]=l}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):ey(Object(a)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(a,t))})}return e}var ej={activeDot:!0,animateNewValues:!0,animationBegin:0,animationDuration:1500,animationEasing:"ease",animationInterpolateFn:(e,t)=>{if(null==e)return[];if(1===t)return e.flatMap(e=>"removed"===e.status?[]:[e.next]);var a=function(e){var t=0,a=0;for(var i of e)"matched"===i.status&&null!=i.prev.x&&null!=i.next.x&&(t+=i.next.x-i.prev.x,a++);return a>0?t/a:0}(e),i=[];for(var r of e)if("matched"===r.status)i.push(eg(eg({},r.next),{},{x:(0,S.interpolate)(r.prev.x,r.next.x,t),y:(0,S.interpolate)(r.prev.y,r.next.y,t)}));else if("added"===r.status)if(null!=r.next.x){var l=r.next.x-a;i.push(eg(eg({},r.next),{},{x:(0,S.interpolate)(l,r.next.x,t),y:r.next.y}))}else i.push(r.next);else if("removed"===r.status&&null!=r.prev.x){var n=r.prev.x+a;i.push(eg(eg({},r.prev),{},{x:(0,S.interpolate)(r.prev.x,n,t),y:r.prev.y}))}return i},animationMatchBy:ea.matchByIndex,connectNulls:!1,dot:!0,fill:"#fff",hide:!1,isAnimationActive:"auto",label:!1,legendType:"line",shape:function(e){e.animationElapsedTime,e.isAnimating,e.isEntrance;var t=e.visibleLength,i=e.strokeDasharray,r=e.connectNulls,l=function(e,t){if(null==e)return{};var a,i,r=function(e,t){if(null==e)return{};var a={};for(var i in e)if(({}).hasOwnProperty.call(e,i)){if(-1!==t.indexOf(i))continue;a[i]=e[i]}return a}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(i=0;i<l.length;i++)a=l[i],-1===t.indexOf(a)&&({}).propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}(e,A);if(null!=t){var n,s,o=l.pathRef,c=function(e){try{return e&&e.getTotalLength&&e.getTotalLength()||0}catch(e){return 0}}(null!=(s=null==o?void 0:o.current)?s:null);n=i?function(e,t,a){var i=a.length%2!=0?[...a,...a]:a,r=i.reduce((e,t)=>e+t,0);if(!r)return O(t,e);for(var l=Math.floor(e/r),n=e%r,s=[],o=0,c=0;o<i.length;c+=null!=(d=i[o])?d:0,++o){var d,u=i[o];if(null!=u&&c+u>n){s=[...i.slice(0,o),n-c];break}}var m=s.length%2==0?[0,t]:[t];return[...function(e,t){for(var a=[],i=0;i<t;++i)a.push(...e);return a}(i,l),...s,...m].map(e=>"".concat(e,"px")).join(", ")}(t,c,"".concat(i).split(/[,\s]+/gim).map(e=>parseFloat(e))):O(c,t)}else null!=i&&(n=String(i));return a.createElement(k.Curve,C({},l,{connectNulls:null!=r&&r,strokeDasharray:n}))},stroke:"#3182bd",strokeWidth:1,xAxisId:0,yAxisId:0,zIndex:em.DefaultZIndexes.line,type:"linear"},eN=j.memo(e=>{var t=e.dataKey,a=e.data,i=e.stroke,r=e.strokeWidth,l=e.fill,n=e.name,s=e.hide,o=e.unit,c=e.formatter,d=e.tooltipType,u=e.id,m={dataDefinedOnItem:a,getPosition:S.noop,settings:{stroke:i,strokeWidth:r,fill:l,dataKey:t,nameKey:void 0,name:(0,R.getTooltipNameProp)(n,t),hide:s,type:d,color:i,unit:o,formatter:c,graphicalItemId:u}};return j.createElement(D.SetTooltipEntrySettings,{tooltipEntrySettings:m})});function ew(e){var t=e.clipPathId,a=e.points,i=e.props,r=i.dot,l=i.dataKey,n=i.needClip;i.id;var s=ev(i,ex),o=(0,es.svgPropertiesNoEvents)(s);return j.createElement(I.Dots,{points:a,dot:r,className:"recharts-line-dots",dotClassName:"recharts-line-dot",dataKey:l,baseProps:o,needClip:n,clipPathId:t})}function ek(e){var t=e.showLabels,a=e.children,i=e.points,r=(0,j.useMemo)(()=>null==i?void 0:i.map(e=>{var t,a,i={x:null!=(t=e.x)?t:0,y:null!=(a=e.y)?a:0,width:0,lowerWidth:0,upperWidth:0,height:0};return eg(eg({},i),{},{value:e.value,payload:e.payload,viewBox:i,parentViewBox:void 0,fill:void 0})}),[i]);return j.createElement(E.CartesianLabelListContextProvider,{value:t?r:void 0},a)}function eA(e){var t=e.clipPathId,a=e.pathRef,i=e.points,r=e.props,l=e.animationElapsedTime,n=e.isAnimating,s=e.isEntrance,o=e.visibleLength,c=r.type,d=r.layout,u=r.connectNulls,m=r.needClip,p=r.shape,x=r.strokeDasharray,h=ev(r,eh),f=eg(eg({},(0,eo.svgPropertiesAndEvents)(h)),{},{fill:"none",className:"recharts-line-curve",clipPath:m?"url(#clipPath-".concat(t,")"):void 0,points:i,type:c,layout:d,connectNulls:u,strokeDasharray:null!=x?x:r.strokeDasharray,pathRef:a,animationElapsedTime:l,isAnimating:n,isEntrance:!!r.animateNewValues&&s,visibleLength:o});return j.createElement(j.Fragment,null,(null==i?void 0:i.length)>1&&j.createElement(ed.Shape,{option:p,DefaultShape:ej.shape,shapeProps:f}),j.createElement(ew,{points:i,clipPathId:t,props:r}))}function eC(e){var t,i,r,l,n=e.clipPathId,s=e.props,o=e.pathRef,c=e.previousPointsRef,d=s.points,u=s.isAnimationActive,m=s.animationBegin,p=s.animationDuration,x=s.animationEasing,h=s.animationMatchBy,f=s.animationInterpolateFn,b=s.layout,v=function(e){try{return e&&e.getTotalLength&&e.getTotalLength()||0}catch(e){return 0}}(o.current),y=(0,et.useAnimationCallbacks)(s.onAnimationStart,s.onAnimationEnd),g=y.isAnimating,N=y.handleAnimationStart,w=y.handleAnimationEnd,k=(t=(0,a.useRef)(0),i=(0,a.useRef)(0),r=(0,a.useRef)(!1),(l=(0,a.useRef)(d)).current!==d&&(t.current=i.current,l.current=d),(0,a.useCallback)((e,a)=>{if(r.current)return null;var l=Math.min((0,P.round)(t.current+e*a),a);return e>0&&a>0&&(i.current=Math.max(i.current,l),l>=a)?(r.current=!0,null):l},[])),A=(0,j.useCallback)(e=>e>0&&v>0,[v]);return j.createElement(ek,{points:d,showLabels:!g},s.children,j.createElement(et.AnimatedItems,{animationInput:d,animationIdPrefix:"recharts-line-",items:d,previousItemsRef:c,isAnimationActive:u,animationBegin:m,animationDuration:p,animationEasing:x,onAnimationStart:N,onAnimationEnd:w,animationInterpolateFn:f,animationMatchBy:h,shouldUpdatePreviousRef:A,layout:b},(e,t,a)=>{var i=g||t<1,r=i?k(t,v):null;return j.createElement(eA,{props:s,points:e,clipPathId:n,pathRef:o,animationElapsedTime:t,isAnimating:i,isEntrance:a,visibleLength:r})}),j.createElement(E.LabelListFromLabelProp,{label:s.label}))}function eO(e){var t=e.clipPathId,a=e.props,i=(0,j.useRef)(null),r=(0,j.useRef)(null);return j.createElement(eC,{props:a,clipPathId:t,previousPointsRef:i,pathRef:r})}var eP=(e,t)=>{var a,i;return{x:null!=(a=e.x)?a:void 0,y:null!=(i=e.y)?i:void 0,value:e.value,errorVal:(0,R.getValueByDataKey)(e.payload,t)}};class eE extends j.Component{render(){var e=this.props,t=e.hide,a=e.dot,i=e.points,r=e.className,l=e.xAxisId,n=e.yAxisId,s=e.top,o=e.left,c=e.width,d=e.height,u=e.id,m=e.needClip,p=e.zIndex;if(t)return null;var x=(0,N.clsx)("recharts-line",r),h=(0,ec.getRadiusAndStrokeWidthFromDot)(a),f=h.r,b=h.strokeWidth,v=(0,$.isClipDot)(a),y=2*f+b,g=m?"url(#clipPath-".concat(v?"":"dots-").concat(u,")"):void 0;return j.createElement(eu.ZIndexLayer,{zIndex:p},j.createElement(w.Layer,{className:x},m&&j.createElement("defs",null,j.createElement(G.GraphicalItemClipPath,{clipPathId:u,xAxisId:l,yAxisId:n}),!v&&j.createElement("clipPath",{id:"clipPath-dots-".concat(u)},j.createElement("rect",{x:o-y/2,y:s-y/2,width:c+y,height:d+y}))),j.createElement(F,{xAxisId:l,yAxisId:n,data:i,dataPointFormatter:eP,errorBarOffset:0},j.createElement(eO,{props:this.props,clipPathId:u}))),j.createElement(T.ActivePoints,{activeDot:this.props.activeDot,points:i,mainColor:this.props.stroke,itemDataKey:this.props.dataKey,clipPath:g}))}}function eI(e){var t=(0,ei.resolveDefaultProps)(e,ej),a=t.activeDot,i=t.animateNewValues,r=t.animationBegin,l=t.animationDuration,n=t.animationEasing,s=t.connectNulls,o=t.dot,c=t.hide,d=t.isAnimationActive,u=t.label,m=t.legendType,p=t.xAxisId,x=t.yAxisId,h=t.id,f=ev(t,ef),b=(0,G.useNeedsClip)(p,x).needClip,v=(0,er.usePlotArea)(),y=(0,M.useChartLayout)(),g=(0,K.useIsPanorama)(),N=(0,Q.useAppSelector)(e=>J(e,p,x,g,h));if("horizontal"!==y&&"vertical"!==y||null==N||null==v)return null;var w=v.height,k=v.width,A=v.x,C=v.y;return j.createElement(eE,eb({},f,{id:h,connectNulls:s,dot:o,activeDot:a,animateNewValues:i,animationBegin:r,animationDuration:l,animationEasing:n,isAnimationActive:d,hide:c,label:u,legendType:m,xAxisId:p,yAxisId:x,points:N,layout:y,height:w,width:k,left:A,top:C,needClip:b}))}var eS=j.memo(function(e){var t=(0,ei.resolveDefaultProps)(e,ej),a=(0,K.useIsPanorama)();return j.createElement(el.RegisterGraphicalItemId,{id:t.id,type:"line"},e=>{var i,r,l,n;return j.createElement(j.Fragment,null,j.createElement(ee.SetLegendPayload,{legendPayload:(i=t.dataKey,r=t.name,l=t.stroke,n=t.legendType,[{inactive:t.hide,dataKey:i,type:n,color:l,value:(0,R.getTooltipNameProp)(r,i),payload:t}])}),j.createElement(eN,{dataKey:t.dataKey,data:t.data,stroke:t.stroke,strokeWidth:t.strokeWidth,fill:t.fill,name:t.name,hide:t.hide,unit:t.unit,formatter:t.formatter,tooltipType:t.tooltipType,id:e}),j.createElement(en.SetCartesianGraphicalItem,{type:"line",id:e,data:t.data,xAxisId:t.xAxisId,yAxisId:t.yAxisId,zAxisId:0,dataKey:t.dataKey,hide:t.hide,isPanorama:a}),j.createElement(eI,eb({},t,{id:e})))})},ep.propsAreEqual);eS.displayName="Line";var e$=e.i(85183),eR=e.i(93230),eT=e.i(72526),eD=e.i(34239),eL=e.i(31195),eB=e.i(237),eF=e.i(1725);let eG=({data:e,dataKey:a,color:r,scale:l,label:n,unit:s,showPoints:o=!1,lineWidth:c=2,fillGradient:d=!1})=>{let{nightMode:u}=(0,i.useOcearoContext)();if(0===(e||[]).filter(e=>null!==e[a]&&void 0!==e[a]).length)return(0,t.jsx)("div",{className:"flex items-center justify-center h-full text-hud-muted text-sm",children:"No data available"});let m=e=>{if(!e)return"";let t=e.split(":");return t.length>=3?`${t[1]}:${t[2]}`:e},p=[l?.min!==void 0?l.min:"auto",l?.max!==void 0?l.max:"auto"],x=({active:e,payload:a,label:i})=>e&&a&&a.length?(0,t.jsxs)("div",{className:"bg-hud-bg backdrop-blur-md border border-hud p-3 rounded-lg shadow-lg",children:[(0,t.jsx)("p",{className:"text-hud-secondary text-xs uppercase mb-1",children:i}),(0,t.jsxs)("p",{className:"text-hud-main font-bold text-sm",children:[a[0].value.toFixed(2),s]})]}):null;return(0,t.jsx)("div",{className:"h-full w-full",children:(0,t.jsx)(eL.ResponsiveContainer,{width:"100%",height:"100%",minWidth:0,minHeight:0,children:d?(0,t.jsxs)(eF.AreaChart,{data:e,margin:{top:10,right:10,left:-20,bottom:0},children:[(0,t.jsx)("defs",{children:(0,t.jsxs)("linearGradient",{id:`color-${a}`,x1:"0",y1:"0",x2:"0",y2:"1",children:[(0,t.jsx)("stop",{offset:"5%",stopColor:r,stopOpacity:.3}),(0,t.jsx)("stop",{offset:"95%",stopColor:r,stopOpacity:0})]})}),(0,t.jsx)(eT.CartesianGrid,{strokeDasharray:"3 3",stroke:"var(--hud-border)",vertical:!1}),(0,t.jsx)(e$.XAxis,{dataKey:"time",tickFormatter:m,tick:{fill:"var(--hud-text-muted)",fontSize:12},axisLine:!1,tickLine:!1,interval:"preserveStartEnd",minTickGap:30}),(0,t.jsx)(eR.YAxis,{domain:p,tick:{fill:"var(--hud-text-muted)",fontSize:12},axisLine:!1,tickLine:!1,unit:s}),(0,t.jsx)(eD.Tooltip,{content:(0,t.jsx)(x,{})}),(0,t.jsx)(eB.Area,{type:"monotone",dataKey:a,stroke:r,strokeWidth:c,fillOpacity:1,fill:`url(#color-${a})`,isAnimationActive:!1,dot:!!o&&{r:2,fill:r,strokeWidth:0}})]}):(0,t.jsxs)(g,{data:e,margin:{top:10,right:10,left:-20,bottom:0},children:[(0,t.jsx)(eT.CartesianGrid,{strokeDasharray:"3 3",stroke:"var(--hud-border)",vertical:!1}),(0,t.jsx)(e$.XAxis,{dataKey:"time",tickFormatter:m,tick:{fill:"var(--hud-text-muted)",fontSize:12},axisLine:!1,tickLine:!1,interval:"preserveStartEnd",minTickGap:30}),(0,t.jsx)(eR.YAxis,{domain:p,tick:{fill:"var(--hud-text-muted)",fontSize:12},axisLine:!1,tickLine:!1,unit:s}),(0,t.jsx)(eD.Tooltip,{content:(0,t.jsx)(x,{})}),(0,t.jsx)(eS,{type:"monotone",dataKey:a,stroke:r,strokeWidth:c,dot:!!o&&{r:2,fill:r,strokeWidth:0},isAnimationActive:!1})]})})})};e.s(["default",0,()=>{let{t:e}=(0,u.useTranslation)(),{nightMode:m}=(0,i.useOcearoContext)(),[p,x]=(0,a.useState)("battery"),[h,b]=(0,a.useState)("voltage"),[v,y]=(0,a.useState)("fps"),[g,j]=(0,a.useState)("1"),[N,w]=(0,a.useState)(!1),k=(0,a.useMemo)(()=>[`electrical.batteries.${g}.voltage`,`electrical.batteries.${g}.capacity.stateOfCharge`,`electrical.batteries.${g}.current`,`electrical.batteries.${g}.temperature`,`electrical.batteries.${g}.chemistry`,`electrical.batteries.${g}.name`,`electrical.batteries.${g}.location`,`electrical.batteries.${g}.dateInstalled`,`electrical.batteries.${g}.manufacturer.name`,`electrical.batteries.${g}.manufacturer.model`,`electrical.batteries.${g}.manufacturer.URL`,`electrical.batteries.${g}.associatedBus`,`electrical.batteries.${g}.voltage.ripple`,`electrical.batteries.${g}.capacity.nominal`,`electrical.batteries.${g}.capacity.actual`,`electrical.batteries.${g}.capacity.remaining`,`electrical.batteries.${g}.capacity.dischargeLimit`,`electrical.batteries.${g}.capacity.stateOfHealth`,`electrical.batteries.${g}.capacity.dischargeSinceFull`,`electrical.batteries.${g}.capacity.timeRemaining`,`electrical.batteries.${g}.lifetimeDischarge`,`electrical.batteries.${g}.lifetimeRecharge`,"steering.autopilot.state","navigation.lights"],[g]),A=(0,l.useSignalKPaths)(k),C=(0,a.useMemo)(()=>{let e=A[`electrical.batteries.${g}.voltage`]??null,t=A[`electrical.batteries.${g}.current`]??0,a=A[`electrical.batteries.${g}.capacity.stateOfCharge`],i=A[`electrical.batteries.${g}.temperature`];return{voltage:e??0,current:t,stateOfCharge:null!=a?100*a:null!==e?(0,n.estimateStateOfCharge)(e):0,power:(e??0)*t,temperature:null!==i?(0,r.convertTemperature)(i):null,chemistry:A[`electrical.batteries.${g}.chemistry`],name:A[`electrical.batteries.${g}.name`],location:A[`electrical.batteries.${g}.location`],dateInstalled:A[`electrical.batteries.${g}.dateInstalled`],manufacturer:A[`electrical.batteries.${g}.manufacturer.name`],model:A[`electrical.batteries.${g}.manufacturer.model`],manufacturerURL:A[`electrical.batteries.${g}.manufacturer.URL`],associatedBus:A[`electrical.batteries.${g}.associatedBus`],voltageRipple:A[`electrical.batteries.${g}.voltage.ripple`],nominalCapacity:A[`electrical.batteries.${g}.capacity.nominal`],actualCapacity:A[`electrical.batteries.${g}.capacity.actual`],remainingCapacity:A[`electrical.batteries.${g}.capacity.remaining`],dischargeLimit:A[`electrical.batteries.${g}.capacity.dischargeLimit`],stateOfHealth:A[`electrical.batteries.${g}.capacity.stateOfHealth`],dischargeSinceFull:A[`electrical.batteries.${g}.capacity.dischargeSinceFull`],timeRemaining:A[`electrical.batteries.${g}.capacity.timeRemaining`],lifetimeDischarge:A[`electrical.batteries.${g}.lifetimeDischarge`],lifetimeRecharge:A[`electrical.batteries.${g}.lifetimeRecharge`],autopilotState:"auto"===A["steering.autopilot.state"],navigationLightsOn:A["navigation.lights"]||!1}},[A,g]),O=(0,a.useRef)(performance.now()),P=(0,a.useRef)(0),E=(0,a.useRef)(null),I=(0,a.useRef)(null),[S,$]=(0,a.useState)(()=>Array(60).fill(null).map(()=>({voltage:12,current:0,stateOfCharge:100,temperature:null,time:new Date().toLocaleTimeString()}))),[R,T]=(0,a.useState)(()=>{let e=new Date().toLocaleTimeString();return Array(60).fill({time:e,fps:60,ms:16.67,drawCalls:0,triangles:0,geometries:0,textures:0,memory:0})});(0,a.useEffect)(()=>{window.__OCEARO_RENDERER&&(E.current=window.__OCEARO_RENDERER)},[]),I.current=C,(0,a.useEffect)(()=>{let e,t,a=()=>{P.current++,e=requestAnimationFrame(a)};return e=requestAnimationFrame(a),t=setInterval(()=>{let e=performance.now(),t=e-O.current,a=t>0?1e3*P.current/t:0,i=a>0?1e3/a:0,r=new Date().toLocaleTimeString(),l=0,n=0,s=0,o=0,c=0;window.performance&&window.performance.memory&&(c=Math.round(window.performance.memory.usedJSHeapSize/1048576));let d=E.current?.info||window.__OCEARO_RENDER_INFO;d&&(l=d.render?.calls||0,n=d.render?.triangles||0,s=d.memory?.geometries||0,o=d.memory?.textures||0),T(e=>[...e.slice(1),{time:r,fps:a,ms:i,drawCalls:l,triangles:n,geometries:s,textures:o,memory:c}]),$(e=>[...e.slice(1),{...I.current,time:r}]),O.current=e,P.current=0},1e3),()=>{cancelAnimationFrame(e),clearInterval(t)}},[]);let[D]=(0,a.useState)([{id:"1",nameKey:"battery.houseBattery"},{id:"0",nameKey:"battery.starterBattery"}]),L=(0,n.isBatteryCharging)(C.voltage);return C.temperature,(0,t.jsxs)("div",{className:"flex flex-col h-full bg-rightPaneBg overflow-hidden",children:[(0,t.jsx)("div",{className:"flex border-b border-hud bg-hud-bg",children:[{id:"battery",label:e("battery.energy"),icon:o.faLeaf},{id:"graph",label:e("battery.usage"),icon:o.faChartLine},{id:"performance",label:e("battery.perf"),icon:o.faGaugeHigh},{id:"rpi",label:e("battery.rpi"),icon:o.faMicrochip}].map(e=>(0,t.jsxs)("button",{onClick:()=>x(e.id),className:`flex-1 py-3 px-2 text-xs font-black uppercase flex items-center justify-center transition-all duration-500 ${p===e.id?"text-oGreen border-b-2 border-oGreen bg-hud-bg":"text-hud-secondary hover:text-hud-main tesla-hover"}`,children:[(0,t.jsx)(s.FontAwesomeIcon,{icon:e.icon,className:"mr-2"}),e.label]},e.id))}),(0,t.jsx)("div",{className:"flex-1 flex flex-col min-h-0",children:(0,t.jsxs)(c.AnimatePresence,{mode:"wait",children:["battery"===p&&(0,t.jsxs)(d.motion.div,{initial:{opacity:0,x:20},animate:{opacity:1,x:0},exit:{opacity:0,x:-20},transition:{duration:.4,ease:"easeOut"},className:"p-4 flex flex-col flex-1 min-h-0 overflow-auto scrollbar-hide",children:[(0,t.jsxs)("div",{className:"flex justify-between items-center mb-6",children:[(0,t.jsxs)("h2",{className:"text-sm font-black text-hud-main uppercase tracking-[0.2em] flex items-center",children:[(0,t.jsx)("div",{className:"w-2 h-2 rounded-full bg-oGreen mr-3 animate-soft-pulse"}),e("battery.powerGridStatus"),(0,t.jsx)("button",{className:"ml-4 bg-hud-elevated rounded-full w-7 h-7 flex items-center justify-center text-hud-secondary tesla-hover focus:outline-none border border-hud shadow-soft",onClick:()=>w(!N),"aria-label":e("battery.batteryDetails"),children:(0,t.jsx)(s.FontAwesomeIcon,{icon:o.faQuestionCircle,className:"text-xs"})})]}),(0,t.jsx)("select",{className:"bg-hud-elevated px-4 py-1.5 rounded-sm text-hud-main text-xs font-black uppercase border border-hud focus:outline-none tesla-hover transition-all duration-500 shadow-soft",value:g,onChange:e=>j(e.target.value),children:D.map(a=>(0,t.jsx)("option",{value:a.id,className:"bg-leftPaneBg text-hud-main",children:e(a.nameKey)},a.id))})]}),(0,t.jsx)(c.AnimatePresence,{children:N&&(0,t.jsxs)(d.motion.div,{initial:{opacity:0,height:0},animate:{opacity:1,height:"auto"},exit:{opacity:0,height:0},className:"tesla-card p-4 mb-4 relative overflow-hidden bg-hud-elevated",children:[(0,t.jsx)("button",{className:"absolute top-2 right-3 text-hud-secondary hover:text-hud-main font-black text-xl",onClick:()=>w(!1),"aria-label":"Close details",children:"×"}),(0,t.jsx)("div",{className:"text-hud-secondary text-xs font-black mb-4 uppercase tracking-widest",children:e("battery.batterySpecs")}),(0,t.jsx)("div",{className:"grid grid-cols-2 gap-4",children:[{label:e("battery.identifier"),value:C.name},{label:e("battery.chemistry"),value:C.chemistry},{label:e("battery.manufacturer"),value:C.manufacturer},{label:e("battery.position"),value:C.location},{label:e("battery.busLink"),value:C.associatedBus},{label:e("battery.condition"),value:C.stateOfHealth?`${(100*C.stateOfHealth).toFixed(0)}%`:null}].map((e,a)=>(0,t.jsxs)("div",{className:"flex flex-col",children:[(0,t.jsx)("div",{className:"text-xs text-hud-muted uppercase font-black tracking-widest mb-0.5",children:e.label}),(0,t.jsx)("div",{className:"text-xs text-hud-main font-black truncate uppercase gliding-value",children:e.value||"N/A"})]},a))}),(C.nominalCapacity||C.actualCapacity||C.remainingCapacity)&&(0,t.jsxs)("div",{className:"mt-4 pt-3 border-t border-hud",children:[(0,t.jsx)("div",{className:"text-hud-muted text-xs font-black mb-2 uppercase tracking-widest",children:e("battery.energyCapacity")}),(0,t.jsx)("div",{className:"grid grid-cols-3 gap-3",children:[{label:e("battery.nominal"),value:C.nominalCapacity},{label:e("battery.actual"),value:C.actualCapacity},{label:e("battery.remaining"),value:C.remainingCapacity}].map((e,a)=>(0,t.jsxs)("div",{className:"bg-hud-bg p-2 rounded text-center tesla-hover",children:[(0,t.jsx)("div",{className:"text-xs text-hud-secondary uppercase font-black mb-1",children:e.label}),(0,t.jsx)("div",{className:"text-xs text-hud-main font-black gliding-value",children:e.value?`${(e.value/3600).toFixed(1)} Wh`:"N/A"})]},a))})]})]})}),(0,t.jsxs)("div",{className:"flex-1 flex flex-col space-y-4",children:[(0,t.jsxs)("div",{className:"relative tesla-card p-6 bg-hud-bg border border-hud",children:[(0,t.jsxs)("div",{className:"mb-6 flex justify-between items-center",children:[(0,t.jsx)("span",{className:"text-hud-secondary text-xs font-black uppercase tracking-[0.2em] opacity-60",children:e("battery.gridNodeStatus")}),(0,t.jsx)("div",{className:`px-3 py-1 rounded-sm text-xs font-black uppercase tracking-widest shadow-soft ${L?"bg-oGreen/10 text-oGreen border border-oGreen/20 animate-soft-pulse":"bg-oRed/10 text-oRed border border-oRed/20"}`,children:L?e("battery.systemInflow"):e("battery.systemOutflow")})]}),(0,t.jsxs)("div",{className:"h-24 relative mt-8 flex flex-col justify-between",children:[(0,t.jsxs)("div",{className:"h-2 bg-hud-elevated relative rounded-full overflow-hidden shadow-inner",children:[(0,t.jsx)("div",{className:"absolute inset-0 bg-gradient-to-r from-oRed/10 via-oYellow/10 to-oGreen/10 opacity-30"}),(0,t.jsx)("div",{className:`h-full transition-all duration-1000 ${L?"bg-gradient-to-r from-oGreen/60 to-oGreen shadow-[0_0_12px_var(--color-oGreen)]":"bg-gradient-to-r from-oRed/60 via-oYellow/60 to-oGreen/60 shadow-[0_0_12px_var(--color-oGreen)]"}`,style:{width:`${C.stateOfCharge}%`}})]}),(0,t.jsxs)("div",{className:"absolute top-0 flex flex-col items-center transition-all duration-1000",style:{left:`clamp(10%, ${C.stateOfCharge}%, 90%)`,transform:"translateX(-50%)",top:"-12px"},children:[(0,t.jsx)("div",{className:"w-1 h-6 bg-hud-main shadow-[0_0_15px_var(--hud-text-main)] shadow-opacity-80 rounded-full"}),(0,t.jsxs)("div",{className:"mt-8 text-lg font-black text-hud-main gliding-value tracking-tighter",children:[C.stateOfCharge.toFixed(0),"%"]})]}),(0,t.jsxs)("div",{className:"flex justify-between mt-12 text-xs font-black uppercase tracking-[0.2em]",children:[(0,t.jsx)("div",{className:"text-oRed opacity-40",children:e("battery.criticalNode")}),(0,t.jsxs)("div",{className:"text-hud-main bg-hud-elevated px-4 py-1.5 rounded-sm flex items-center shadow-soft border border-hud",children:[(0,t.jsx)(s.FontAwesomeIcon,{icon:L?o.faChargingStation:o.faClock,className:"mr-3 text-xs text-oBlue opacity-60"}),(0,t.jsx)("span",{className:"gliding-value opacity-80 tracking-widest",children:L?e("battery.acquiringFullCharge"):C.timeRemaining?e("battery.depletionIn",{hours:(C.timeRemaining/3600).toFixed(1)}):C.voltage>0&&Math.abs(C.current)>0?e("battery.endurance",{hours:(C.stateOfCharge/(Math.abs(C.current)/100)).toFixed(1)}):e("common.na")})]}),(0,t.jsx)("div",{className:"text-oGreen opacity-40",children:e("battery.nominalGrid")})]})]})]}),(0,t.jsxs)("div",{className:"tesla-card p-6 flex-1 bg-hud-bg border border-hud",children:[(0,t.jsxs)("div",{className:"text-hud-secondary text-xs font-black uppercase tracking-[0.2em] mb-8 flex items-center opacity-60",children:[(0,t.jsx)("div",{className:"w-1.5 h-1.5 rounded-full bg-oBlue mr-3"}),e("battery.loadDistribution")]}),(0,t.jsx)("div",{className:"space-y-6",children:[{id:"autopilot",icon:o.faMicrochip,label:e("battery.autopilotNode"),color:"bg-oBlue",value:C.autopilotState?.4*Math.abs(C.current):0,state:C.autopilotState},{id:"telemetry",icon:o.faGaugeHigh,label:e("battery.telemetryArray"),color:"bg-oGreen",value:.3*Math.abs(C.current),state:!0}].map((e,a)=>(0,t.jsxs)("div",{className:"tesla-hover p-2 rounded-sm transition-all group",children:[(0,t.jsxs)("div",{className:"flex justify-between items-center mb-3",children:[(0,t.jsxs)("div",{className:"flex items-center",children:[(0,t.jsx)(s.FontAwesomeIcon,{icon:e.icon,className:"text-hud-muted mr-3 text-xs opacity-50 group-hover:opacity-100 transition-opacity"}),(0,t.jsx)("span",{className:"text-hud-main text-xs font-black uppercase tracking-widest",children:e.label}),"autopilot"===e.id&&e.state&&(0,t.jsx)("span",{className:"ml-3 px-2 py-0.5 bg-oGreen/10 text-oGreen text-xs font-black uppercase rounded-sm animate-soft-pulse border border-oGreen/20",children:"Sync"})]}),(0,t.jsxs)("div",{className:"text-xs text-hud-main font-black gliding-value tracking-tighter",children:[e.value.toFixed(1),"%"]})]}),(0,t.jsx)("div",{className:"h-1 bg-hud-elevated rounded-full overflow-hidden shadow-inner",children:(0,t.jsx)("div",{className:`h-full ${e.color} gliding-value opacity-60 group-hover:opacity-100 transition-all duration-700`,style:{width:`${Math.min(100,2.5*e.value)}%`}})})]},a))}),(0,t.jsx)("div",{className:"grid grid-cols-3 gap-4 mt-10",children:[{label:e("battery.voltageNode"),value:`${C.voltage.toFixed(1)}V`,color:"text-oBlue"},{label:e("battery.amperageLoad"),value:`${C.current.toFixed(1)}A`,color:"text-oYellow"},{label:e("battery.gridOutput"),value:`${(C.voltage*C.current).toFixed(0)}W`,color:"text-hud-main"}].map((e,a)=>(0,t.jsxs)("div",{className:"bg-hud-elevated p-4 rounded-sm tesla-hover text-center border border-hud",children:[(0,t.jsx)("div",{className:"text-xs text-hud-muted uppercase font-black tracking-widest mb-2 opacity-60",children:e.label}),(0,t.jsx)("div",{className:`text-xl font-black gliding-value tracking-tighter ${e.color}`,children:e.value})]},a))})]})]})]},"battery"),"graph"===p&&(0,t.jsxs)(d.motion.div,{initial:{opacity:0,x:20},animate:{opacity:1,x:0},exit:{opacity:0,x:-20},transition:{duration:.4,ease:"easeOut"},className:"p-4 flex flex-col flex-1 min-h-0",children:[(0,t.jsxs)("div",{className:"flex justify-between items-center mb-6",children:[(0,t.jsxs)("h2",{className:"text-sm font-black text-hud-main uppercase tracking-[0.2em] flex items-center",children:[(0,t.jsx)("div",{className:"w-2 h-2 rounded-full bg-oBlue mr-3 animate-soft-pulse"}),e("battery.telemetryHistory")]}),(0,t.jsx)("div",{className:"flex bg-hud-elevated rounded-sm p-1 border border-hud shadow-soft",children:["voltage","current","soc"].map(e=>(0,t.jsx)("button",{onClick:()=>b(e),className:`px-4 py-1 rounded-sm text-xs font-black uppercase transition-all duration-500 ${h===e?"bg-oBlue text-hud-main shadow-lg shadow-oBlue/20":"text-hud-secondary hover:text-hud-main tesla-hover"}`,children:"soc"===e?"SOC %":e},e))})]}),(0,t.jsx)("div",{className:"flex-1 tesla-card p-6 min-h-[220px] bg-hud-bg border border-hud",children:(0,t.jsx)(eG,{data:S,dataKey:h,color:"voltage"===h?"var(--color-oBlue)":"current"===h?"var(--color-oYellow)":"var(--color-oGreen)",unit:"voltage"===h?"V":"current"===h?"A":"%",scale:{voltage:{min:10.5,max:15,step:1},current:{min:-5,max:50,step:5},soc:{min:0,max:100,step:25},power:{min:-60,max:240,step:60},temperature:{min:10,max:60,step:10}}[h]})})]},"graph"),"performance"===p&&(0,t.jsxs)(d.motion.div,{initial:{opacity:0,x:20},animate:{opacity:1,x:0},exit:{opacity:0,x:-20},transition:{duration:.4,ease:"easeOut"},className:"p-4 flex flex-col flex-1 min-h-0 overflow-auto scrollbar-hide",children:[(0,t.jsxs)("div",{className:"flex justify-between items-center mb-6",children:[(0,t.jsxs)("h2",{className:"text-sm font-black text-hud-main uppercase tracking-[0.2em] flex items-center",children:[(0,t.jsx)("div",{className:"w-2 h-2 rounded-full bg-oGreen mr-3 animate-soft-pulse"}),e("battery.systemDiagnostic")]}),(0,t.jsx)("div",{className:"flex bg-hud-elevated rounded-sm p-1 border border-hud shadow-soft",children:["fps","ms","memory"].map(e=>(0,t.jsx)("button",{onClick:()=>y(e),className:`px-4 py-1 rounded-sm text-xs font-black uppercase transition-all duration-500 ${v===e?"bg-oBlue text-hud-main shadow-lg shadow-oBlue/20":"text-hud-secondary hover:text-hud-main tesla-hover"}`,children:e},e))})]}),(0,t.jsx)("div",{className:"flex-1 tesla-card p-6 min-h-[200px] mb-6 bg-hud-bg border border-hud",children:(0,t.jsx)(eG,{data:R,dataKey:v,color:"var(--color-oBlue)",unit:"fps"===v?"":"ms"===v?"ms":"MB",scale:{fps:{min:0,max:60,step:15},ms:{min:0,max:33.33,step:10},drawCalls:{min:0,max:500,step:100},triangles:{min:0,max:5e5,step:1e5},memory:{min:0,max:500,step:100}}[v]})}),(0,t.jsxs)("div",{className:"grid grid-cols-2 gap-4",children:[(0,t.jsxs)("div",{className:"tesla-card p-6 bg-hud-bg tesla-hover border border-hud",children:[(0,t.jsx)("div",{className:"text-xs text-hud-muted font-black uppercase mb-4 tracking-[0.2em] opacity-60",children:e("battery.graphicsEngine")}),(0,t.jsxs)("div",{className:"flex justify-between items-center text-xs font-black text-hud-main uppercase mb-3",children:[(0,t.jsx)("span",{className:"text-hud-secondary tracking-widest",children:e("battery.drawCalls")}),(0,t.jsx)("span",{className:"gliding-value",children:R[R.length-1].drawCalls})]}),(0,t.jsxs)("div",{className:"flex justify-between items-center text-xs font-black text-hud-main uppercase",children:[(0,t.jsx)("span",{className:"text-hud-secondary tracking-widest",children:e("battery.geometry")}),(0,t.jsxs)("span",{className:"gliding-value",children:[(R[R.length-1].triangles/1e3).toFixed(1),"k poly"]})]})]}),(0,t.jsxs)("div",{className:"tesla-card p-6 bg-hud-bg tesla-hover border border-hud",children:[(0,t.jsx)("div",{className:"text-xs text-hud-muted font-black uppercase mb-4 tracking-[0.2em] opacity-60",children:e("battery.memoryManagement")}),(0,t.jsxs)("div",{className:"flex justify-between items-center text-xs font-black text-hud-main uppercase mb-3",children:[(0,t.jsx)("span",{className:"text-hud-secondary tracking-widest",children:e("battery.jsHeap")}),(0,t.jsxs)("span",{className:"gliding-value",children:[R[R.length-1].memory," MB"]})]}),(0,t.jsxs)("div",{className:"flex justify-between items-center text-xs font-black text-hud-main uppercase",children:[(0,t.jsx)("span",{className:"text-hud-secondary tracking-widest",children:e("battery.vramTextures")}),(0,t.jsxs)("span",{className:"gliding-value",children:[R[R.length-1].textures," units"]})]})]})]})]},"performance"),"rpi"===p&&(0,t.jsx)(d.motion.div,{initial:{opacity:0,x:20},animate:{opacity:1,x:0},exit:{opacity:0,x:-20},transition:{duration:.3},className:"flex-1 flex flex-col min-h-0",children:(0,t.jsx)(f,{})},"rpi")]})})]})}],39896)},65862,e=>{e.n(e.i(39896))}]);
@@ -6,8 +6,8 @@
6
6
  8:I[97367,["/ocearo-ui/_next/static/chunks/1d4h-sglyo8ft.js","/ocearo-ui/_next/static/chunks/3jupxlga7r_do.js"],"ViewportBoundary"]
7
7
  a:I[97367,["/ocearo-ui/_next/static/chunks/1d4h-sglyo8ft.js","/ocearo-ui/_next/static/chunks/3jupxlga7r_do.js"],"MetadataBoundary"]
8
8
  c:I[68027,["/ocearo-ui/_next/static/chunks/1d4h-sglyo8ft.js","/ocearo-ui/_next/static/chunks/3jupxlga7r_do.js"],"default",1]
9
- :HL["/ocearo-ui/_next/static/chunks/3v7kbzxs8nq6c.css","style"]
10
- 0:{"P":null,"c":["","_not-found"],"q":"","i":false,"f":[[["",{"children":["/_not-found",{"children":["__PAGE__",{}]}]},"$undefined","$undefined",16],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/ocearo-ui/_next/static/chunks/3v7kbzxs8nq6c.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/ocearo-ui/_next/static/chunks/1d4h-sglyo8ft.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/ocearo-ui/_next/static/chunks/3jupxlga7r_do.js","async":true,"nonce":"$undefined"}]],["$","html",null,{"lang":"en","children":[["$","head",null,{"children":["$","meta",null,{"name":"description","content":"Sailing made smarter with Ocearo: touchscreen-first sailing dashboard with navigation, weather, and instrumentation."}]}],["$","body",null,{"className":"geistsans_fce11f57-module__b_bU6G__variable geistmono_ed61a5f9-module__6fgesq__variable antialiased","children":["$","$L2",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L3",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":404}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]}]]}]]}],{"children":[["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L3",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":[["$","$1","c",{"children":[[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":"$0:f:0:1:0:props:children:1:props:children:1:props:children:props:notFound:0:1:props:style","children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":"$0:f:0:1:0:props:children:1:props:children:1:props:children:props:notFound:0:1:props:children:props:children:1:props:style","children":404}],["$","div",null,{"style":"$0:f:0:1:0:props:children:1:props:children:1:props:children:props:notFound:0:1:props:children:props:children:2:props:style","children":["$","h2",null,{"style":"$0:f:0:1:0:props:children:1:props:children:1:props:children:props:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],null,["$","$L4",null,{"children":["$","$5",null,{"name":"Next.MetadataOutlet","children":"$@6"}]}]]}],{},null,false,null]},null,false,"$@7"]},null,false,null],["$","$1","h",{"children":[["$","meta",null,{"name":"robots","content":"noindex"}],["$","$L8",null,{"children":"$L9"}],["$","div",null,{"hidden":true,"children":["$","$La",null,{"children":["$","$5",null,{"name":"Next.Metadata","children":"$Lb"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],false]],"m":"$undefined","G":["$c",[["$","link","0",{"rel":"stylesheet","href":"/ocearo-ui/_next/static/chunks/3v7kbzxs8nq6c.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}]]],"S":true,"h":null,"s":"$undefined","l":"$undefined","p":"$undefined","d":"$undefined","b":"lbW36T5aysKW1OT6h1JDF"}
9
+ :HL["/ocearo-ui/_next/static/chunks/1wv5e5qomv-7g.css","style"]
10
+ 0:{"P":null,"c":["","_not-found"],"q":"","i":false,"f":[[["",{"children":["/_not-found",{"children":["__PAGE__",{}]}]},"$undefined","$undefined",16],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/ocearo-ui/_next/static/chunks/1wv5e5qomv-7g.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","script","script-0",{"src":"/ocearo-ui/_next/static/chunks/1d4h-sglyo8ft.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/ocearo-ui/_next/static/chunks/3jupxlga7r_do.js","async":true,"nonce":"$undefined"}]],["$","html",null,{"lang":"en","children":[["$","head",null,{"children":["$","meta",null,{"name":"description","content":"Sailing made smarter with Ocearo: touchscreen-first sailing dashboard with navigation, weather, and instrumentation."}]}],["$","body",null,{"className":"geistsans_fce11f57-module__b_bU6G__variable geistmono_ed61a5f9-module__6fgesq__variable antialiased","children":["$","$L2",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L3",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":404}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]}]]}]]}],{"children":[["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L3",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":[["$","$1","c",{"children":[[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":"$0:f:0:1:0:props:children:1:props:children:1:props:children:props:notFound:0:1:props:style","children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":"$0:f:0:1:0:props:children:1:props:children:1:props:children:props:notFound:0:1:props:children:props:children:1:props:style","children":404}],["$","div",null,{"style":"$0:f:0:1:0:props:children:1:props:children:1:props:children:props:notFound:0:1:props:children:props:children:2:props:style","children":["$","h2",null,{"style":"$0:f:0:1:0:props:children:1:props:children:1:props:children:props:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],null,["$","$L4",null,{"children":["$","$5",null,{"name":"Next.MetadataOutlet","children":"$@6"}]}]]}],{},null,false,null]},null,false,"$@7"]},null,false,null],["$","$1","h",{"children":[["$","meta",null,{"name":"robots","content":"noindex"}],["$","$L8",null,{"children":"$L9"}],["$","div",null,{"hidden":true,"children":["$","$La",null,{"children":["$","$5",null,{"name":"Next.Metadata","children":"$Lb"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],false]],"m":"$undefined","G":["$c",[["$","link","0",{"rel":"stylesheet","href":"/ocearo-ui/_next/static/chunks/1wv5e5qomv-7g.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}]]],"S":true,"h":null,"s":"$undefined","l":"$undefined","p":"$undefined","d":"$undefined","b":"hlKDicTyNGfd7dmHqo5m5"}
11
11
  d:[]
12
12
  7:"$Wd"
13
13
  9:[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"}],["$","meta","2",{"name":"theme-color","content":"#4bbcd8","media":"(prefers-color-scheme: light)"}],["$","meta","3",{"name":"theme-color","content":"#0a2e3d","media":"(prefers-color-scheme: dark)"}]]
@@ -3,4 +3,4 @@
3
3
  3:I[97367,["/ocearo-ui/_next/static/chunks/1d4h-sglyo8ft.js","/ocearo-ui/_next/static/chunks/3jupxlga7r_do.js"],"MetadataBoundary"]
4
4
  4:"$Sreact.suspense"
5
5
  5:I[27201,["/ocearo-ui/_next/static/chunks/1d4h-sglyo8ft.js","/ocearo-ui/_next/static/chunks/3jupxlga7r_do.js"],"IconMark"]
6
- 0:{"rsc":["$","$1","h",{"children":[["$","meta",null,{"name":"robots","content":"noindex"}],["$","$L2",null,{"children":[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"}],["$","meta","2",{"name":"theme-color","content":"#4bbcd8","media":"(prefers-color-scheme: light)"}],["$","meta","3",{"name":"theme-color","content":"#0a2e3d","media":"(prefers-color-scheme: dark)"}]]}],["$","div",null,{"hidden":true,"children":["$","$L3",null,{"children":["$","$4",null,{"name":"Next.Metadata","children":[["$","title","0",{"children":"Ocearo"}],["$","meta","1",{"name":"description","content":"Sailing made smarter"}],["$","link","2",{"rel":"manifest","href":"./manifest.json"}],["$","meta","3",{"name":"format-detection","content":"telephone=no"}],["$","meta","4",{"name":"mobile-web-app-capable","content":"yes"}],["$","meta","5",{"name":"apple-mobile-web-app-title","content":"Ocearo"}],["$","meta","6",{"name":"apple-mobile-web-app-status-bar-style","content":"black-translucent"}],["$","link","7",{"rel":"shortcut icon","href":"./favicon.ico"}],["$","link","8",{"rel":"icon","href":"./favicon.ico","type":"image/x-icon"}],["$","link","9",{"rel":"icon","href":"./favicon.svg","type":"image/svg+xml","sizes":"any"}],["$","link","10",{"rel":"icon","href":"./favicon-96x96.png","type":"image/png","sizes":"96x96"}],["$","link","11",{"rel":"apple-touch-icon","href":"./apple-touch-icon.png"}],["$","$L5","12",{}]]}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],"isPartial":false,"staleTime":300,"varyParams":null,"buildId":"lbW36T5aysKW1OT6h1JDF"}
6
+ 0:{"rsc":["$","$1","h",{"children":[["$","meta",null,{"name":"robots","content":"noindex"}],["$","$L2",null,{"children":[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"}],["$","meta","2",{"name":"theme-color","content":"#4bbcd8","media":"(prefers-color-scheme: light)"}],["$","meta","3",{"name":"theme-color","content":"#0a2e3d","media":"(prefers-color-scheme: dark)"}]]}],["$","div",null,{"hidden":true,"children":["$","$L3",null,{"children":["$","$4",null,{"name":"Next.Metadata","children":[["$","title","0",{"children":"Ocearo"}],["$","meta","1",{"name":"description","content":"Sailing made smarter"}],["$","link","2",{"rel":"manifest","href":"./manifest.json"}],["$","meta","3",{"name":"format-detection","content":"telephone=no"}],["$","meta","4",{"name":"mobile-web-app-capable","content":"yes"}],["$","meta","5",{"name":"apple-mobile-web-app-title","content":"Ocearo"}],["$","meta","6",{"name":"apple-mobile-web-app-status-bar-style","content":"black-translucent"}],["$","link","7",{"rel":"shortcut icon","href":"./favicon.ico"}],["$","link","8",{"rel":"icon","href":"./favicon.ico","type":"image/x-icon"}],["$","link","9",{"rel":"icon","href":"./favicon.svg","type":"image/svg+xml","sizes":"any"}],["$","link","10",{"rel":"icon","href":"./favicon-96x96.png","type":"image/png","sizes":"96x96"}],["$","link","11",{"rel":"apple-touch-icon","href":"./apple-touch-icon.png"}],["$","$L5","12",{}]]}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],"isPartial":false,"staleTime":300,"varyParams":null,"buildId":"hlKDicTyNGfd7dmHqo5m5"}
@@ -1,5 +1,5 @@
1
1
  1:"$Sreact.fragment"
2
2
  2:I[39756,["/ocearo-ui/_next/static/chunks/1d4h-sglyo8ft.js","/ocearo-ui/_next/static/chunks/3jupxlga7r_do.js"],"default"]
3
3
  3:I[37457,["/ocearo-ui/_next/static/chunks/1d4h-sglyo8ft.js","/ocearo-ui/_next/static/chunks/3jupxlga7r_do.js"],"default"]
4
- :HL["/ocearo-ui/_next/static/chunks/3v7kbzxs8nq6c.css","style"]
5
- 0:{"rsc":["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/ocearo-ui/_next/static/chunks/3v7kbzxs8nq6c.css","precedence":"next"}],["$","script","script-0",{"src":"/ocearo-ui/_next/static/chunks/1d4h-sglyo8ft.js","async":true}],["$","script","script-1",{"src":"/ocearo-ui/_next/static/chunks/3jupxlga7r_do.js","async":true}]],["$","html",null,{"lang":"en","children":[["$","head",null,{"children":["$","meta",null,{"name":"description","content":"Sailing made smarter with Ocearo: touchscreen-first sailing dashboard with navigation, weather, and instrumentation."}]}],["$","body",null,{"className":"geistsans_fce11f57-module__b_bU6G__variable geistmono_ed61a5f9-module__6fgesq__variable antialiased","children":["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}],"notFound":[[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":404}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],[]]}]}]]}]]}],"isPartial":false,"staleTime":300,"varyParams":null,"buildId":"lbW36T5aysKW1OT6h1JDF"}
4
+ :HL["/ocearo-ui/_next/static/chunks/1wv5e5qomv-7g.css","style"]
5
+ 0:{"rsc":["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/ocearo-ui/_next/static/chunks/1wv5e5qomv-7g.css","precedence":"next"}],["$","script","script-0",{"src":"/ocearo-ui/_next/static/chunks/1d4h-sglyo8ft.js","async":true}],["$","script","script-1",{"src":"/ocearo-ui/_next/static/chunks/3jupxlga7r_do.js","async":true}]],["$","html",null,{"lang":"en","children":[["$","head",null,{"children":["$","meta",null,{"name":"description","content":"Sailing made smarter with Ocearo: touchscreen-first sailing dashboard with navigation, weather, and instrumentation."}]}],["$","body",null,{"className":"geistsans_fce11f57-module__b_bU6G__variable geistmono_ed61a5f9-module__6fgesq__variable antialiased","children":["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}],"notFound":[[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":404}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],[]]}]}]]}]]}],"isPartial":false,"staleTime":300,"varyParams":null,"buildId":"hlKDicTyNGfd7dmHqo5m5"}
@@ -1,5 +1,5 @@
1
1
  1:"$Sreact.fragment"
2
2
  2:I[97367,["/ocearo-ui/_next/static/chunks/1d4h-sglyo8ft.js","/ocearo-ui/_next/static/chunks/3jupxlga7r_do.js"],"OutletBoundary"]
3
3
  3:"$Sreact.suspense"
4
- 0:{"rsc":["$","$1","c",{"children":[[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":404}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],null,["$","$L2",null,{"children":["$","$3",null,{"name":"Next.MetadataOutlet","children":"$@4"}]}]]}],"isPartial":false,"staleTime":300,"varyParams":null,"buildId":"lbW36T5aysKW1OT6h1JDF"}
4
+ 0:{"rsc":["$","$1","c",{"children":[[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":404}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],null,["$","$L2",null,{"children":["$","$3",null,{"name":"Next.MetadataOutlet","children":"$@4"}]}]]}],"isPartial":false,"staleTime":300,"varyParams":null,"buildId":"hlKDicTyNGfd7dmHqo5m5"}
5
5
  4:null
@@ -2,4 +2,4 @@
2
2
  2:I[39756,["/ocearo-ui/_next/static/chunks/1d4h-sglyo8ft.js","/ocearo-ui/_next/static/chunks/3jupxlga7r_do.js"],"default"]
3
3
  3:I[37457,["/ocearo-ui/_next/static/chunks/1d4h-sglyo8ft.js","/ocearo-ui/_next/static/chunks/3jupxlga7r_do.js"],"default"]
4
4
  4:[]
5
- 0:{"rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"isPartial":false,"staleTime":300,"varyParams":"$W4","buildId":"lbW36T5aysKW1OT6h1JDF"}
5
+ 0:{"rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"isPartial":false,"staleTime":300,"varyParams":"$W4","buildId":"hlKDicTyNGfd7dmHqo5m5"}
@@ -1,2 +1,2 @@
1
- :HL["/ocearo-ui/_next/static/chunks/3v7kbzxs8nq6c.css","style"]
2
- 0:{"tree":{"name":"","param":null,"prefetchHints":16,"slots":{"children":{"name":"/_not-found","param":null,"prefetchHints":0,"slots":{"children":{"name":"__PAGE__","param":null,"prefetchHints":0,"slots":null}}}}},"staleTime":300,"buildId":"lbW36T5aysKW1OT6h1JDF"}
1
+ :HL["/ocearo-ui/_next/static/chunks/1wv5e5qomv-7g.css","style"]
2
+ 0:{"tree":{"name":"","param":null,"prefetchHints":16,"slots":{"children":{"name":"/_not-found","param":null,"prefetchHints":0,"slots":{"children":{"name":"__PAGE__","param":null,"prefetchHints":0,"slots":null}}}}},"staleTime":300,"buildId":"hlKDicTyNGfd7dmHqo5m5"}
package/_not-found.html CHANGED
@@ -1 +1 @@
1
- <!DOCTYPE html><html lang="en"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"/><link rel="stylesheet" href="/ocearo-ui/_next/static/chunks/3v7kbzxs8nq6c.css" data-precedence="next"/><link rel="preload" as="script" fetchPriority="low" href="/ocearo-ui/_next/static/chunks/1gizigk3w6q7j.js"/><script src="/ocearo-ui/_next/static/chunks/2lvvt2f1l5sfu.js" async=""></script><script src="/ocearo-ui/_next/static/chunks/3jh1u-s3k0bkk.js" async=""></script><script src="/ocearo-ui/_next/static/chunks/2atijj_pkc4uc.js" async=""></script><script src="/ocearo-ui/_next/static/chunks/1ptwltjb3h6jf.js" async=""></script><script src="/ocearo-ui/_next/static/chunks/turbopack-0pirmko-w-775.js" async=""></script><script src="/ocearo-ui/_next/static/chunks/1d4h-sglyo8ft.js" async=""></script><script src="/ocearo-ui/_next/static/chunks/3jupxlga7r_do.js" async=""></script><meta name="robots" content="noindex"/><meta name="next-size-adjust" content=""/><meta name="description" content="Sailing made smarter with Ocearo: touchscreen-first sailing dashboard with navigation, weather, and instrumentation."/><title>404: This page could not be found.</title><meta name="theme-color" content="#4bbcd8" media="(prefers-color-scheme: light)"/><meta name="theme-color" content="#0a2e3d" media="(prefers-color-scheme: dark)"/><title>Ocearo</title><meta name="description" content="Sailing made smarter"/><link rel="manifest" href="./manifest.json"/><meta name="format-detection" content="telephone=no"/><meta name="mobile-web-app-capable" content="yes"/><meta name="apple-mobile-web-app-title" content="Ocearo"/><meta name="apple-mobile-web-app-status-bar-style" content="black-translucent"/><link rel="shortcut icon" href="./favicon.ico"/><link rel="icon" href="./favicon.ico" type="image/x-icon"/><link rel="icon" href="./favicon.svg" type="image/svg+xml" sizes="any"/><link rel="icon" href="./favicon-96x96.png" type="image/png" sizes="96x96"/><link rel="apple-touch-icon" href="./apple-touch-icon.png"/><script src="/ocearo-ui/_next/static/chunks/0cz1d0mv5g_q7.js" noModule=""></script></head><body class="geistsans_fce11f57-module__b_bU6G__variable geistmono_ed61a5f9-module__6fgesq__variable antialiased"><div hidden=""><!--$--><!--/$--></div><div style="font-family:system-ui,&quot;Segoe UI&quot;,Roboto,Helvetica,Arial,sans-serif,&quot;Apple Color Emoji&quot;,&quot;Segoe UI Emoji&quot;;height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div><style>body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}</style><h1 class="next-error-h1" style="display:inline-block;margin:0 20px 0 0;padding:0 23px 0 0;font-size:24px;font-weight:500;vertical-align:top;line-height:49px">404</h1><div style="display:inline-block"><h2 style="font-size:14px;font-weight:400;line-height:49px;margin:0">This page could not be found.</h2></div></div></div><!--$--><!--/$--><script src="/ocearo-ui/_next/static/chunks/1gizigk3w6q7j.js" id="_R_" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0])</script><script>self.__next_f.push([1,"1:\"$Sreact.fragment\"\n2:I[39756,[\"/ocearo-ui/_next/static/chunks/1d4h-sglyo8ft.js\",\"/ocearo-ui/_next/static/chunks/3jupxlga7r_do.js\"],\"default\"]\n3:I[37457,[\"/ocearo-ui/_next/static/chunks/1d4h-sglyo8ft.js\",\"/ocearo-ui/_next/static/chunks/3jupxlga7r_do.js\"],\"default\"]\n4:I[97367,[\"/ocearo-ui/_next/static/chunks/1d4h-sglyo8ft.js\",\"/ocearo-ui/_next/static/chunks/3jupxlga7r_do.js\"],\"OutletBoundary\"]\n5:\"$Sreact.suspense\"\n8:I[97367,[\"/ocearo-ui/_next/static/chunks/1d4h-sglyo8ft.js\",\"/ocearo-ui/_next/static/chunks/3jupxlga7r_do.js\"],\"ViewportBoundary\"]\na:I[97367,[\"/ocearo-ui/_next/static/chunks/1d4h-sglyo8ft.js\",\"/ocearo-ui/_next/static/chunks/3jupxlga7r_do.js\"],\"MetadataBoundary\"]\nc:I[68027,[\"/ocearo-ui/_next/static/chunks/1d4h-sglyo8ft.js\",\"/ocearo-ui/_next/static/chunks/3jupxlga7r_do.js\"],\"default\",1]\n:HL[\"/ocearo-ui/_next/static/chunks/3v7kbzxs8nq6c.css\",\"style\"]\n"])</script><script>self.__next_f.push([1,"0:{\"P\":null,\"c\":[\"\",\"_not-found\"],\"q\":\"\",\"i\":false,\"f\":[[[\"\",{\"children\":[\"/_not-found\",{\"children\":[\"__PAGE__\",{}]}]},\"$undefined\",\"$undefined\",16],[[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/ocearo-ui/_next/static/chunks/3v7kbzxs8nq6c.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\",\"nonce\":\"$undefined\"}],[\"$\",\"script\",\"script-0\",{\"src\":\"/ocearo-ui/_next/static/chunks/1d4h-sglyo8ft.js\",\"async\":true,\"nonce\":\"$undefined\"}],[\"$\",\"script\",\"script-1\",{\"src\":\"/ocearo-ui/_next/static/chunks/3jupxlga7r_do.js\",\"async\":true,\"nonce\":\"$undefined\"}]],[\"$\",\"html\",null,{\"lang\":\"en\",\"children\":[[\"$\",\"head\",null,{\"children\":[\"$\",\"meta\",null,{\"name\":\"description\",\"content\":\"Sailing made smarter with Ocearo: touchscreen-first sailing dashboard with navigation, weather, and instrumentation.\"}]}],[\"$\",\"body\",null,{\"className\":\"geistsans_fce11f57-module__b_bU6G__variable geistmono_ed61a5f9-module__6fgesq__variable antialiased\",\"children\":[\"$\",\"$L2\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L3\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":[[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"},\"children\":404}],[\"$\",\"div\",null,{\"style\":{\"display\":\"inline-block\"},\"children\":[\"$\",\"h2\",null,{\"style\":{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0},\"children\":\"This page could not be found.\"}]}]]}]}]],[]],\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]}]]}]]}],{\"children\":[[\"$\",\"$1\",\"c\",{\"children\":[null,[\"$\",\"$L2\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L3\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}],{\"children\":[[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":\"$0:f:0:1:0:props:children:1:props:children:1:props:children:props:notFound:0:1:props:style\",\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":\"$0:f:0:1:0:props:children:1:props:children:1:props:children:props:notFound:0:1:props:children:props:children:1:props:style\",\"children\":404}],[\"$\",\"div\",null,{\"style\":\"$0:f:0:1:0:props:children:1:props:children:1:props:children:props:notFound:0:1:props:children:props:children:2:props:style\",\"children\":[\"$\",\"h2\",null,{\"style\":\"$0:f:0:1:0:props:children:1:props:children:1:props:children:props:notFound:0:1:props:children:props:children:2:props:children:props:style\",\"children\":\"This page could not be found.\"}]}]]}]}]],null,[\"$\",\"$L4\",null,{\"children\":[\"$\",\"$5\",null,{\"name\":\"Next.MetadataOutlet\",\"children\":\"$@6\"}]}]]}],{},null,false,null]},null,false,\"$@7\"]},null,false,null],[\"$\",\"$1\",\"h\",{\"children\":[[\"$\",\"meta\",null,{\"name\":\"robots\",\"content\":\"noindex\"}],[\"$\",\"$L8\",null,{\"children\":\"$L9\"}],[\"$\",\"div\",null,{\"hidden\":true,\"children\":[\"$\",\"$La\",null,{\"children\":[\"$\",\"$5\",null,{\"name\":\"Next.Metadata\",\"children\":\"$Lb\"}]}]}],[\"$\",\"meta\",null,{\"name\":\"next-size-adjust\",\"content\":\"\"}]]}],false]],\"m\":\"$undefined\",\"G\":[\"$c\",[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/ocearo-ui/_next/static/chunks/3v7kbzxs8nq6c.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\",\"nonce\":\"$undefined\"}]]],\"S\":true,\"h\":null,\"s\":\"$undefined\",\"l\":\"$undefined\",\"p\":\"$undefined\",\"d\":\"$undefined\",\"b\":\"lbW36T5aysKW1OT6h1JDF\"}\n"])</script><script>self.__next_f.push([1,"d:[]\n7:\"$Wd\"\n"])</script><script>self.__next_f.push([1,"9:[[\"$\",\"meta\",\"0\",{\"charSet\":\"utf-8\"}],[\"$\",\"meta\",\"1\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no\"}],[\"$\",\"meta\",\"2\",{\"name\":\"theme-color\",\"content\":\"#4bbcd8\",\"media\":\"(prefers-color-scheme: light)\"}],[\"$\",\"meta\",\"3\",{\"name\":\"theme-color\",\"content\":\"#0a2e3d\",\"media\":\"(prefers-color-scheme: dark)\"}]]\n"])</script><script>self.__next_f.push([1,"e:I[27201,[\"/ocearo-ui/_next/static/chunks/1d4h-sglyo8ft.js\",\"/ocearo-ui/_next/static/chunks/3jupxlga7r_do.js\"],\"IconMark\"]\n6:null\nb:[[\"$\",\"title\",\"0\",{\"children\":\"Ocearo\"}],[\"$\",\"meta\",\"1\",{\"name\":\"description\",\"content\":\"Sailing made smarter\"}],[\"$\",\"link\",\"2\",{\"rel\":\"manifest\",\"href\":\"./manifest.json\",\"crossOrigin\":\"$undefined\"}],[\"$\",\"meta\",\"3\",{\"name\":\"format-detection\",\"content\":\"telephone=no\"}],[\"$\",\"meta\",\"4\",{\"name\":\"mobile-web-app-capable\",\"content\":\"yes\"}],[\"$\",\"meta\",\"5\",{\"name\":\"apple-mobile-web-app-title\",\"content\":\"Ocearo\"}],[\"$\",\"meta\",\"6\",{\"name\":\"apple-mobile-web-app-status-bar-style\",\"content\":\"black-translucent\"}],[\"$\",\"link\",\"7\",{\"rel\":\"shortcut icon\",\"href\":\"./favicon.ico\"}],[\"$\",\"link\",\"8\",{\"rel\":\"icon\",\"href\":\"./favicon.ico\",\"type\":\"image/x-icon\"}],[\"$\",\"link\",\"9\",{\"rel\":\"icon\",\"href\":\"./favicon.svg\",\"type\":\"image/svg+xml\",\"sizes\":\"any\"}],[\"$\",\"link\",\"10\",{\"rel\":\"icon\",\"href\":\"./favicon-96x96.png\",\"type\":\"image/png\",\"sizes\":\"96x96\"}],[\"$\",\"link\",\"11\",{\"rel\":\"apple-touch-icon\",\"href\":\"./apple-touch-icon.png\"}],[\"$\",\"$Le\",\"12\",{}]]\n"])</script></body></html>
1
+ <!DOCTYPE html><html lang="en"><head><meta charSet="utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"/><link rel="stylesheet" href="/ocearo-ui/_next/static/chunks/1wv5e5qomv-7g.css" data-precedence="next"/><link rel="preload" as="script" fetchPriority="low" href="/ocearo-ui/_next/static/chunks/1gizigk3w6q7j.js"/><script src="/ocearo-ui/_next/static/chunks/2lvvt2f1l5sfu.js" async=""></script><script src="/ocearo-ui/_next/static/chunks/3jh1u-s3k0bkk.js" async=""></script><script src="/ocearo-ui/_next/static/chunks/2atijj_pkc4uc.js" async=""></script><script src="/ocearo-ui/_next/static/chunks/1ptwltjb3h6jf.js" async=""></script><script src="/ocearo-ui/_next/static/chunks/turbopack-0pirmko-w-775.js" async=""></script><script src="/ocearo-ui/_next/static/chunks/1d4h-sglyo8ft.js" async=""></script><script src="/ocearo-ui/_next/static/chunks/3jupxlga7r_do.js" async=""></script><meta name="robots" content="noindex"/><meta name="next-size-adjust" content=""/><meta name="description" content="Sailing made smarter with Ocearo: touchscreen-first sailing dashboard with navigation, weather, and instrumentation."/><title>404: This page could not be found.</title><meta name="theme-color" content="#4bbcd8" media="(prefers-color-scheme: light)"/><meta name="theme-color" content="#0a2e3d" media="(prefers-color-scheme: dark)"/><title>Ocearo</title><meta name="description" content="Sailing made smarter"/><link rel="manifest" href="./manifest.json"/><meta name="format-detection" content="telephone=no"/><meta name="mobile-web-app-capable" content="yes"/><meta name="apple-mobile-web-app-title" content="Ocearo"/><meta name="apple-mobile-web-app-status-bar-style" content="black-translucent"/><link rel="shortcut icon" href="./favicon.ico"/><link rel="icon" href="./favicon.ico" type="image/x-icon"/><link rel="icon" href="./favicon.svg" type="image/svg+xml" sizes="any"/><link rel="icon" href="./favicon-96x96.png" type="image/png" sizes="96x96"/><link rel="apple-touch-icon" href="./apple-touch-icon.png"/><script src="/ocearo-ui/_next/static/chunks/0cz1d0mv5g_q7.js" noModule=""></script></head><body class="geistsans_fce11f57-module__b_bU6G__variable geistmono_ed61a5f9-module__6fgesq__variable antialiased"><div hidden=""><!--$--><!--/$--></div><div style="font-family:system-ui,&quot;Segoe UI&quot;,Roboto,Helvetica,Arial,sans-serif,&quot;Apple Color Emoji&quot;,&quot;Segoe UI Emoji&quot;;height:100vh;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center"><div><style>body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}</style><h1 class="next-error-h1" style="display:inline-block;margin:0 20px 0 0;padding:0 23px 0 0;font-size:24px;font-weight:500;vertical-align:top;line-height:49px">404</h1><div style="display:inline-block"><h2 style="font-size:14px;font-weight:400;line-height:49px;margin:0">This page could not be found.</h2></div></div></div><!--$--><!--/$--><script src="/ocearo-ui/_next/static/chunks/1gizigk3w6q7j.js" id="_R_" async=""></script><script>(self.__next_f=self.__next_f||[]).push([0])</script><script>self.__next_f.push([1,"1:\"$Sreact.fragment\"\n2:I[39756,[\"/ocearo-ui/_next/static/chunks/1d4h-sglyo8ft.js\",\"/ocearo-ui/_next/static/chunks/3jupxlga7r_do.js\"],\"default\"]\n3:I[37457,[\"/ocearo-ui/_next/static/chunks/1d4h-sglyo8ft.js\",\"/ocearo-ui/_next/static/chunks/3jupxlga7r_do.js\"],\"default\"]\n4:I[97367,[\"/ocearo-ui/_next/static/chunks/1d4h-sglyo8ft.js\",\"/ocearo-ui/_next/static/chunks/3jupxlga7r_do.js\"],\"OutletBoundary\"]\n5:\"$Sreact.suspense\"\n8:I[97367,[\"/ocearo-ui/_next/static/chunks/1d4h-sglyo8ft.js\",\"/ocearo-ui/_next/static/chunks/3jupxlga7r_do.js\"],\"ViewportBoundary\"]\na:I[97367,[\"/ocearo-ui/_next/static/chunks/1d4h-sglyo8ft.js\",\"/ocearo-ui/_next/static/chunks/3jupxlga7r_do.js\"],\"MetadataBoundary\"]\nc:I[68027,[\"/ocearo-ui/_next/static/chunks/1d4h-sglyo8ft.js\",\"/ocearo-ui/_next/static/chunks/3jupxlga7r_do.js\"],\"default\",1]\n:HL[\"/ocearo-ui/_next/static/chunks/1wv5e5qomv-7g.css\",\"style\"]\n"])</script><script>self.__next_f.push([1,"0:{\"P\":null,\"c\":[\"\",\"_not-found\"],\"q\":\"\",\"i\":false,\"f\":[[[\"\",{\"children\":[\"/_not-found\",{\"children\":[\"__PAGE__\",{}]}]},\"$undefined\",\"$undefined\",16],[[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/ocearo-ui/_next/static/chunks/1wv5e5qomv-7g.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\",\"nonce\":\"$undefined\"}],[\"$\",\"script\",\"script-0\",{\"src\":\"/ocearo-ui/_next/static/chunks/1d4h-sglyo8ft.js\",\"async\":true,\"nonce\":\"$undefined\"}],[\"$\",\"script\",\"script-1\",{\"src\":\"/ocearo-ui/_next/static/chunks/3jupxlga7r_do.js\",\"async\":true,\"nonce\":\"$undefined\"}]],[\"$\",\"html\",null,{\"lang\":\"en\",\"children\":[[\"$\",\"head\",null,{\"children\":[\"$\",\"meta\",null,{\"name\":\"description\",\"content\":\"Sailing made smarter with Ocearo: touchscreen-first sailing dashboard with navigation, weather, and instrumentation.\"}]}],[\"$\",\"body\",null,{\"className\":\"geistsans_fce11f57-module__b_bU6G__variable geistmono_ed61a5f9-module__6fgesq__variable antialiased\",\"children\":[\"$\",\"$L2\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L3\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":[[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":{\"fontFamily\":\"system-ui,\\\"Segoe UI\\\",Roboto,Helvetica,Arial,sans-serif,\\\"Apple Color Emoji\\\",\\\"Segoe UI Emoji\\\"\",\"height\":\"100vh\",\"textAlign\":\"center\",\"display\":\"flex\",\"flexDirection\":\"column\",\"alignItems\":\"center\",\"justifyContent\":\"center\"},\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":{\"display\":\"inline-block\",\"margin\":\"0 20px 0 0\",\"padding\":\"0 23px 0 0\",\"fontSize\":24,\"fontWeight\":500,\"verticalAlign\":\"top\",\"lineHeight\":\"49px\"},\"children\":404}],[\"$\",\"div\",null,{\"style\":{\"display\":\"inline-block\"},\"children\":[\"$\",\"h2\",null,{\"style\":{\"fontSize\":14,\"fontWeight\":400,\"lineHeight\":\"49px\",\"margin\":0},\"children\":\"This page could not be found.\"}]}]]}]}]],[]],\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]}]]}]]}],{\"children\":[[\"$\",\"$1\",\"c\",{\"children\":[null,[\"$\",\"$L2\",null,{\"parallelRouterKey\":\"children\",\"error\":\"$undefined\",\"errorStyles\":\"$undefined\",\"errorScripts\":\"$undefined\",\"template\":[\"$\",\"$L3\",null,{}],\"templateStyles\":\"$undefined\",\"templateScripts\":\"$undefined\",\"notFound\":\"$undefined\",\"forbidden\":\"$undefined\",\"unauthorized\":\"$undefined\"}]]}],{\"children\":[[\"$\",\"$1\",\"c\",{\"children\":[[[\"$\",\"title\",null,{\"children\":\"404: This page could not be found.\"}],[\"$\",\"div\",null,{\"style\":\"$0:f:0:1:0:props:children:1:props:children:1:props:children:props:notFound:0:1:props:style\",\"children\":[\"$\",\"div\",null,{\"children\":[[\"$\",\"style\",null,{\"dangerouslySetInnerHTML\":{\"__html\":\"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}\"}}],[\"$\",\"h1\",null,{\"className\":\"next-error-h1\",\"style\":\"$0:f:0:1:0:props:children:1:props:children:1:props:children:props:notFound:0:1:props:children:props:children:1:props:style\",\"children\":404}],[\"$\",\"div\",null,{\"style\":\"$0:f:0:1:0:props:children:1:props:children:1:props:children:props:notFound:0:1:props:children:props:children:2:props:style\",\"children\":[\"$\",\"h2\",null,{\"style\":\"$0:f:0:1:0:props:children:1:props:children:1:props:children:props:notFound:0:1:props:children:props:children:2:props:children:props:style\",\"children\":\"This page could not be found.\"}]}]]}]}]],null,[\"$\",\"$L4\",null,{\"children\":[\"$\",\"$5\",null,{\"name\":\"Next.MetadataOutlet\",\"children\":\"$@6\"}]}]]}],{},null,false,null]},null,false,\"$@7\"]},null,false,null],[\"$\",\"$1\",\"h\",{\"children\":[[\"$\",\"meta\",null,{\"name\":\"robots\",\"content\":\"noindex\"}],[\"$\",\"$L8\",null,{\"children\":\"$L9\"}],[\"$\",\"div\",null,{\"hidden\":true,\"children\":[\"$\",\"$La\",null,{\"children\":[\"$\",\"$5\",null,{\"name\":\"Next.Metadata\",\"children\":\"$Lb\"}]}]}],[\"$\",\"meta\",null,{\"name\":\"next-size-adjust\",\"content\":\"\"}]]}],false]],\"m\":\"$undefined\",\"G\":[\"$c\",[[\"$\",\"link\",\"0\",{\"rel\":\"stylesheet\",\"href\":\"/ocearo-ui/_next/static/chunks/1wv5e5qomv-7g.css\",\"precedence\":\"next\",\"crossOrigin\":\"$undefined\",\"nonce\":\"$undefined\"}]]],\"S\":true,\"h\":null,\"s\":\"$undefined\",\"l\":\"$undefined\",\"p\":\"$undefined\",\"d\":\"$undefined\",\"b\":\"hlKDicTyNGfd7dmHqo5m5\"}\n"])</script><script>self.__next_f.push([1,"d:[]\n7:\"$Wd\"\n"])</script><script>self.__next_f.push([1,"9:[[\"$\",\"meta\",\"0\",{\"charSet\":\"utf-8\"}],[\"$\",\"meta\",\"1\",{\"name\":\"viewport\",\"content\":\"width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no\"}],[\"$\",\"meta\",\"2\",{\"name\":\"theme-color\",\"content\":\"#4bbcd8\",\"media\":\"(prefers-color-scheme: light)\"}],[\"$\",\"meta\",\"3\",{\"name\":\"theme-color\",\"content\":\"#0a2e3d\",\"media\":\"(prefers-color-scheme: dark)\"}]]\n"])</script><script>self.__next_f.push([1,"e:I[27201,[\"/ocearo-ui/_next/static/chunks/1d4h-sglyo8ft.js\",\"/ocearo-ui/_next/static/chunks/3jupxlga7r_do.js\"],\"IconMark\"]\n6:null\nb:[[\"$\",\"title\",\"0\",{\"children\":\"Ocearo\"}],[\"$\",\"meta\",\"1\",{\"name\":\"description\",\"content\":\"Sailing made smarter\"}],[\"$\",\"link\",\"2\",{\"rel\":\"manifest\",\"href\":\"./manifest.json\",\"crossOrigin\":\"$undefined\"}],[\"$\",\"meta\",\"3\",{\"name\":\"format-detection\",\"content\":\"telephone=no\"}],[\"$\",\"meta\",\"4\",{\"name\":\"mobile-web-app-capable\",\"content\":\"yes\"}],[\"$\",\"meta\",\"5\",{\"name\":\"apple-mobile-web-app-title\",\"content\":\"Ocearo\"}],[\"$\",\"meta\",\"6\",{\"name\":\"apple-mobile-web-app-status-bar-style\",\"content\":\"black-translucent\"}],[\"$\",\"link\",\"7\",{\"rel\":\"shortcut icon\",\"href\":\"./favicon.ico\"}],[\"$\",\"link\",\"8\",{\"rel\":\"icon\",\"href\":\"./favicon.ico\",\"type\":\"image/x-icon\"}],[\"$\",\"link\",\"9\",{\"rel\":\"icon\",\"href\":\"./favicon.svg\",\"type\":\"image/svg+xml\",\"sizes\":\"any\"}],[\"$\",\"link\",\"10\",{\"rel\":\"icon\",\"href\":\"./favicon-96x96.png\",\"type\":\"image/png\",\"sizes\":\"96x96\"}],[\"$\",\"link\",\"11\",{\"rel\":\"apple-touch-icon\",\"href\":\"./apple-touch-icon.png\"}],[\"$\",\"$Le\",\"12\",{}]]\n"])</script></body></html>