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
@@ -1 +0,0 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,76103,e=>{"use strict";var t=e.i(43476),s=e.i(71645),a=e.i(67561),o=e.i(85709),n=e.i(49721),l=e.i(68757),i=e.i(83402),r=e.i(48390),d=e.i(46932),c=e.i(88653);e.i(85269);var u=e.i(22831);e.s(["default",0,()=>{let e,x,m,h,b,g,p,f,N,j,k,{t:v}=(0,u.useTranslation)(),{nightMode:y,states:w,toggleState:C}=(0,a.useOcearoContext)(),S=w?.racing??!1,[A,T]=(0,s.useState)("logbook"),B=(0,s.useMemo)(()=>["navigation.position","navigation.courseOverGroundTrue","navigation.headingTrue","navigation.speedOverGround","environment.wind.speedTrue","environment.wind.angleTrueWater","environment.outside.pressure","environment.outside.temperature","navigation.log","propulsion.main.runTime"],[]),O=(0,o.useSignalKPaths)(B),[G,I]=(0,s.useState)([]),[E,R]=(0,s.useState)(!1),[F,$]=(0,s.useState)(null),[L,P]=(0,s.useState)("UTC"),[D,M]=(0,s.useState)(null),[Y,W]=(0,s.useState)(!1),[z,J]=(0,s.useState)({text:"",author:"manual"}),[U,K]=(0,s.useState)(!1),[H,V]=(0,s.useState)(null),[Z,q]=(0,s.useState)(null),[Q,X]=(0,s.useState)(!1);i.default.getAll();let _=(0,r.isOcearoCoreEnabled)(),ee=(0,s.useCallback)(async()=>{R(!0),$(null);try{let e=(await (0,r.fetchLogbookEntries)()).map(e=>({...e,date:new Date(e.datetime||e.date),point:e.point?{...e.point,toString:()=>"number"==typeof e.point.latitude&&"number"==typeof e.point.longitude?`${e.point.latitude.toFixed(6)}, ${e.point.longitude.toFixed(6)}`:"Invalid coordinates"}:null}));I(e)}catch(e){"NetworkError"!==e.name&&"TimeoutError"!==e.name&&console.warn("Error fetching logbook entries:",e),$((0,r.handleOcearoCoreError)(e,"Logbook fetch")),i.default.get("debugMode")?I(et()):I([])}finally{R(!1)}},[]),et=()=>[{datetime:new Date().toISOString(),date:new Date,course:45,speed:{sog:6.5},wind:{speed:12,direction:180},observations:{seaState:2,cloudCoverage:3,visibility:7},barometer:1013.2,point:{latitude:46.1591,longitude:-1.1522,toString:()=>"46.159100, -1.152200"},position:{source:"GPS",latitude:46.1591,longitude:-1.1522},log:125.5,engine:{hours:245.2},author:"Captain",text:"Departing La Rochelle, good conditions"},{datetime:new Date(Date.now()-36e5).toISOString(),date:new Date(Date.now()-36e5),heading:42,speed:{sog:7.2},wind:{speed:15,direction:200},observations:{seaState:3,cloudCoverage:2,visibility:8},barometer:1012.8,point:{latitude:46.2591,longitude:-1.2522,toString:()=>"46.259100, -1.252200"},position:{source:"GPS",latitude:46.2591,longitude:-1.2522},log:132.1,engine:{hours:245.8},author:"auto",text:"Wind picking up, adjusting course"}],es=(0,s.useCallback)(()=>{M(null),J({text:"",author:"manual"}),W(!0)},[]),ea=(0,s.useCallback)(async()=>{try{let e;if(D)e={...D,author:z.author||D.author||"manual",text:z.text||D.text||"Manual entry"},delete e.date,delete e.point;else{let t=O["navigation.position"]||{};e={datetime:new Date().toISOString(),position:{latitude:t.latitude||46.1591,longitude:t.longitude||-1.1522,source:"GPS"},course:O["navigation.courseOverGroundTrue"]||O["navigation.headingTrue"],speed:{sog:O["navigation.speedOverGround"]||0},wind:{speed:O["environment.wind.speedTrue"]||0,direction:O["environment.wind.angleTrueWater"]||0},barometer:O["environment.outside.pressure"]?O["environment.outside.pressure"]/100:1013,log:O["navigation.log"]||0,engine:{hours:O["propulsion.main.runTime"]?O["propulsion.main.runTime"]/3600:0},author:z.author||"manual",text:z.text||"Manual entry"}}await (0,r.addLogbookEntry)(e),W(!1),M(null),ee()}catch(e){console.warn("Error saving entry:",e),$((0,r.handleOcearoCoreError)(e,"Save logbook entry"))}},[O,ee,z,D]),eo=(0,s.useCallback)(async()=>{if(!_)return void $(v("logbook.ocearoCoreNotEnabled"));try{X(!0),$(null);let e={position:O["navigation.position"],course:O["navigation.courseOverGroundTrue"]||O["navigation.headingTrue"],speed:O["navigation.speedOverGround"],wind:{speed:O["environment.wind.speedTrue"],direction:O["environment.wind.angleTrueWater"]},weather:{pressure:O["environment.outside.pressure"],temperature:O["environment.outside.temperature"]},engine:{hours:O["propulsion.main.runTime"]},log:O["navigation.log"]},t=await (0,r.generateOcearoCoreLogbookEntry)(e);await ee(),t&&t.analysis&&(V(t.analysis),q("auto-entry"),T("analysis"))}catch(e){$((0,r.handleOcearoCoreError)(e,"OcearoCore entry generation"))}finally{X(!1)}},[_,O,ee]),en=(0,s.useCallback)(async e=>{if(!_)return void $(v("logbook.ocearoCoreNotEnabled"));try{K(!0),V(null),q(e),$(null),T("analysis");let t=await (0,r.requestAnalysis)(e);V(t),console.log("OcearoCore Analysis:",t)}catch(e){$((0,r.handleOcearoCoreError)(e,"OcearoCore analysis"))}finally{K(!1)}},[_]),el=(0,s.useCallback)(async()=>{if(!_)return void $(v("logbook.ocearoCoreNotEnabled"));try{K(!0),V(null),q("logbook"),$(null),T("analysis");let e=await (0,r.analyzeLogbookWithOcearoCore)();V(e),console.log("Logbook Analysis:",e)}catch(e){$((0,r.handleOcearoCoreError)(e,"Logbook analysis"))}finally{K(!1)}},[_]),ei=(0,s.useCallback)(e=>{M(e),J({text:e.text||"",author:e.author||"manual"}),W(!0)},[]),er=e=>{let t=[];if(e.wind){let s=[];Number.isNaN(Number(e.wind.speed))||s.push(`${e.wind.speed}kt`),Number.isNaN(Number(e.wind.direction))||s.push(`${e.wind.direction}\xb0`),s.length&&t.push(`Wind ${s.join(" ")}`)}return e.observations&&(Number.isNaN(Number(e.observations.seaState))||t.push(`Sea state ${e.observations.seaState}`),Number.isNaN(Number(e.observations.cloudCoverage))||t.push(`Clouds ${e.observations.cloudCoverage}/8`),Number.isNaN(Number(e.observations.visibility))||t.push(`Visibility ${e.observations.visibility+1}`)),t.join(", ")},ed=e=>Number.isNaN(Number(e.course))?Number.isNaN(Number(e.heading))?"":`HDT ${e.heading}\xb0`:`${e.course}\xb0`;return(0,s.useEffect)(()=>{ee()},[ee]),(0,t.jsxs)("div",{className:"flex flex-col h-full bg-rightPaneBg overflow-hidden",children:[_&&(0,t.jsxs)("div",{className:`flex items-center justify-between px-4 py-2 border-b transition-all duration-500 ${S?"bg-oYellow/10 border-oYellow/30":"bg-hud-bg border-hud"}`,children:[(0,t.jsxs)("div",{className:"flex items-center space-x-2",children:[(0,t.jsx)(n.FontAwesomeIcon,{icon:l.faTrophy,className:`text-xs transition-colors duration-300 ${S?"text-oYellow animate-soft-pulse":"text-hud-muted"}`}),(0,t.jsx)("span",{className:"text-xs font-black uppercase tracking-widest text-hud-main",children:S?v("logbook.racingModeActive"):v("logbook.racingMode")}),S&&(0,t.jsxs)("span",{className:"text-xs font-black uppercase tracking-widest text-oYellow opacity-70",children:["— ",v("logbook.racingModeAISInfo")]})]}),(0,t.jsx)("button",{onClick:()=>C("racing"),className:`relative inline-flex h-5 w-10 items-center rounded-full transition-colors duration-300 focus:outline-none ${S?"bg-oYellow":"bg-hud-elevated border border-hud"}`,"aria-label":v("logbook.racingMode"),children:(0,t.jsx)("span",{className:`inline-block h-3.5 w-3.5 transform rounded-full bg-hud-main shadow transition-transform duration-300 ${S?"translate-x-5":"translate-x-1"}`})})]}),(0,t.jsx)("div",{className:"flex border-b border-hud bg-hud-bg",children:[{id:"timeline",label:v("logbook.missionTimeline"),icon:l.faTimeline},{id:"logbook",label:v("logbook.tacticalLog"),icon:l.faBook},{id:"analysis",label:v("logbook.fleetIntelligence"),icon:l.faChartLine}].map(e=>(0,t.jsxs)("button",{onClick:()=>T(e.id),className:`flex-1 py-3 px-2 text-xs font-black uppercase flex items-center justify-center transition-all duration-500 ${A===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)(n.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.jsx)(c.AnimatePresence,{mode:"wait",children:(0,t.jsxs)(d.motion.div,{initial:{opacity:0,x:10},animate:{opacity:1,x:0},exit:{opacity:0,x:-10},transition:{duration:.4,ease:"easeOut"},className:"h-full overflow-auto scrollbar-hide",children:["logbook"===A&&(0,t.jsxs)("div",{className:"p-4 flex flex-col h-full overflow-hidden",children:[(0,t.jsxs)("div",{className:"flex justify-between items-center mb-6",children:[(0,t.jsxs)("h3",{className:"text-xs font-black text-hud-main uppercase tracking-widest flex items-center",children:[(0,t.jsx)(n.FontAwesomeIcon,{icon:l.faBook,className:"mr-2 text-oBlue text-xs"}),v("logbook.logbookEntries")]}),(0,t.jsxs)("div",{className:"flex space-x-3",children:[_&&(0,t.jsxs)("button",{className:"bg-oGreen/10 text-oGreen hover:bg-oGreen/20 px-3 py-1.5 rounded text-xs font-black uppercase transition-all duration-300 flex items-center shadow-soft border border-oGreen/20 disabled:opacity-50",onClick:eo,disabled:Q||E,children:[(0,t.jsx)(n.FontAwesomeIcon,{icon:l.faRobot,className:`mr-2 ${Q?"animate-spin":""}`}),Q?v("logbook.aiEntryGenerating"):v("logbook.aiEntry")]}),(0,t.jsxs)("button",{className:"bg-oBlue hover:bg-oBlue/80 text-hud-main px-3 py-1.5 rounded text-xs font-black uppercase transition-all duration-300 flex items-center shadow-soft",onClick:es,disabled:E,children:[(0,t.jsx)(n.FontAwesomeIcon,{icon:l.faPlus,className:"mr-2"}),v("logbook.add")]})]})]}),F&&(0,t.jsx)("div",{className:"bg-oRed/10 text-oRed p-3 rounded text-xs font-black uppercase mb-4 animate-soft-pulse border border-oRed/20",children:F}),(0,t.jsx)("div",{className:"tesla-card flex-1 overflow-auto bg-hud-bg",children:(0,t.jsxs)("table",{className:"w-full text-xs font-black uppercase tracking-tight",children:[(0,t.jsx)("thead",{className:"sticky top-0 bg-hud-bg backdrop-blur-md z-10",children:(0,t.jsxs)("tr",{className:"text-hud-secondary border-b border-hud",children:[(0,t.jsx)("th",{className:"p-3 text-left",children:v("logbook.time")}),(0,t.jsx)("th",{className:"p-3 text-left",children:v("logbook.courseCol")}),(0,t.jsx)("th",{className:"p-3 text-left",children:v("logbook.sog")}),(0,t.jsx)("th",{className:"p-3 text-left",children:v("logbook.weatherCol")}),(0,t.jsx)("th",{className:"p-3 text-left",children:v("logbook.baro")}),(0,t.jsx)("th",{className:"p-3 text-left",children:v("logbook.position")}),(0,t.jsx)("th",{className:"p-3 text-left",children:v("logbook.log")}),(0,t.jsx)("th",{className:"p-3 text-left",children:v("logbook.eng")}),(0,t.jsx)("th",{className:"p-3 text-left",children:v("logbook.by")}),(0,t.jsx)("th",{className:"p-3 text-left",children:v("logbook.noteCol")})]})}),(0,t.jsx)("tbody",{className:"divide-y divide-hud",children:G.map((e,s)=>(0,t.jsxs)("tr",{onClick:()=>ei(e),className:"tesla-hover cursor-pointer text-hud-main",children:[(0,t.jsx)("td",{className:"p-3 whitespace-nowrap opacity-60",children:e.date.toLocaleString("en-GB",{day:"2-digit",month:"2-digit",hour:"2-digit",minute:"2-digit",timeZone:L})}),(0,t.jsx)("td",{className:"p-3 gliding-value",children:ed(e)}),(0,t.jsx)("td",{className:"p-3 gliding-value",children:e.speed&&!Number.isNaN(Number(e.speed.sog))?`${e.speed.sog}kt`:""}),(0,t.jsx)("td",{className:"p-3 text-hud-secondary font-bold lowercase normal-case",children:er(e)}),(0,t.jsx)("td",{className:"p-3 gliding-value opacity-60",children:e.barometer}),(0,t.jsx)("td",{className:"p-3 text-xs text-hud-muted font-mono tracking-tighter",children:e.point?e.point.toString():"n/a"}),(0,t.jsx)("td",{className:"p-3 gliding-value",children:Number.isNaN(Number(e.log))?"":`${e.log}NM`}),(0,t.jsx)("td",{className:"p-3 gliding-value",children:e.engine&&!Number.isNaN(Number(e.engine.hours))?`${e.engine.hours}h`:""}),(0,t.jsx)("td",{className:"p-3 text-oBlue opacity-80",children:e.author||"auto"}),(0,t.jsx)("td",{className:"p-3 normal-case font-bold text-hud-secondary truncate max-w-xs",children:e.text})]},e.datetime||s))})]})})]}),"timeline"===A&&(e=[...G].reverse(),(0,t.jsxs)("div",{className:"p-4 space-y-6",children:[(0,t.jsxs)("div",{className:"flex justify-between items-center mb-6",children:[(0,t.jsxs)("h3",{className:"text-xs font-black text-hud-main uppercase tracking-widest flex items-center",children:[(0,t.jsx)(n.FontAwesomeIcon,{icon:l.faTimeline,className:"mr-2 text-oGreen text-xs"}),v("logbook.cruiseTimeline")]}),(0,t.jsxs)("div",{className:"flex space-x-3",children:[_&&(0,t.jsxs)("button",{className:"bg-oGreen/10 text-oGreen hover:bg-oGreen/20 px-3 py-1.5 rounded text-xs font-black uppercase transition-all duration-300 flex items-center shadow-soft border border-oGreen/20 disabled:opacity-50",onClick:eo,disabled:Q||E,children:[(0,t.jsx)(n.FontAwesomeIcon,{icon:l.faRobot,className:`mr-2 ${Q?"animate-spin":""}`}),Q?v("logbook.aiEntryGenerating"):v("logbook.aiAuto")]}),(0,t.jsxs)("button",{className:"bg-oBlue hover:bg-oBlue/80 text-hud-main px-3 py-1.5 rounded text-xs font-black uppercase transition-all duration-300 flex items-center shadow-soft",onClick:es,disabled:E,children:[(0,t.jsx)(n.FontAwesomeIcon,{icon:l.faPlus,className:"mr-2"}),v("logbook.add")]})]})]}),F&&(0,t.jsx)("div",{className:"bg-oRed/10 text-oRed p-3 rounded text-xs font-black uppercase mb-4 animate-soft-pulse border border-oRed/20",children:F}),(0,t.jsx)("div",{className:"space-y-4",children:e.map((e,s)=>(0,t.jsxs)("div",{onClick:()=>ei(e),className:"tesla-card tesla-hover cursor-pointer group",children:[(0,t.jsxs)("div",{className:"bg-hud-elevated px-4 py-2 flex justify-between items-center border-b border-hud",children:[(0,t.jsx)("div",{className:"text-xs font-black text-oBlue uppercase tracking-widest group-hover:text-oBlue transition-colors",children:e.author||"system"}),(0,t.jsx)("div",{className:"text-xs font-black text-hud-secondary uppercase tracking-tighter",children:e.date.toLocaleString("en-GB",{day:"2-digit",month:"short",hour:"2-digit",minute:"2-digit",timeZone:L})})]}),(0,t.jsxs)("div",{className:"p-4",children:[(0,t.jsxs)("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4 text-xs font-black uppercase mb-4 tracking-tight text-hud-secondary",children:[(0,t.jsxs)("div",{className:"flex flex-col",children:[(0,t.jsx)("span",{className:"text-xs text-hud-dim mb-1",children:v("logbook.courseCol")}),(0,t.jsx)("span",{className:"text-hud-main gliding-value",children:ed(e)})]}),(0,t.jsxs)("div",{className:"flex flex-col",children:[(0,t.jsx)("span",{className:"text-xs text-hud-dim mb-1",children:v("logbook.speed")}),(0,t.jsx)("span",{className:"text-hud-main gliding-value",children:e.speed&&!Number.isNaN(Number(e.speed.sog))?`${e.speed.sog}kt`:"N/A"})]}),(0,t.jsxs)("div",{className:"flex flex-col",children:[(0,t.jsx)("span",{className:"text-xs text-hud-dim mb-1",children:v("logbook.log")}),(0,t.jsx)("span",{className:"text-hud-main gliding-value",children:Number.isNaN(Number(e.log))?"N/A":`${e.log}NM`})]}),(0,t.jsxs)("div",{className:"flex flex-col",children:[(0,t.jsx)("span",{className:"text-xs text-hud-dim mb-1",children:v("logbook.coord")}),(0,t.jsx)("span",{className:"text-hud-main text-xs font-mono truncate",children:e.point?e.point.toString():"N/A"})]})]}),e.text&&(0,t.jsx)("div",{className:"p-3 bg-hud-elevated rounded-sm border-l-2 border-oBlue/30 text-xs font-bold text-hud-secondary normal-case leading-relaxed italic",children:e.text}),er(e)&&(0,t.jsxs)("div",{className:"mt-3 flex items-center text-xs font-black text-hud-secondary uppercase tracking-widest",children:[(0,t.jsx)(n.FontAwesomeIcon,{icon:l.faCloudSun,className:"mr-2 text-oYellow opacity-50"}),er(e)]})]})]},e.datetime||s))})]})),"analysis"===A&&(0,t.jsxs)("div",{className:"p-4 space-y-6",children:[(0,t.jsxs)("div",{className:"mb-6",children:[(0,t.jsxs)("h3",{className:"text-xs font-black text-hud-main uppercase tracking-widest flex items-center mb-2",children:[(0,t.jsx)(n.FontAwesomeIcon,{icon:l.faChartLine,className:"mr-2 text-oBlue text-xs"}),v("logbook.fleetIntelligence")]}),(0,t.jsx)("p",{className:"text-hud-secondary text-xs font-black uppercase tracking-tighter",children:v("logbook.aiPoweredAnalysis")})]}),_&&(0,t.jsxs)("div",{className:"tesla-card p-4 mb-6 bg-hud-bg",children:[(0,t.jsx)("h4",{className:"text-xs font-black text-hud-secondary mb-4 uppercase tracking-widest",children:v("logbook.selectOperation")}),(0,t.jsx)("div",{className:"grid grid-cols-2 md:grid-cols-3 gap-3",children:[{id:"logbook",label:"LOGBOOK",icon:l.faBook,color:"bg-oBlue",action:el},{id:"weather",label:"WEATHER",icon:l.faCloudSun,color:"bg-oBlue",action:()=>en("weather")},{id:"sail",label:"SAIL",icon:l.faCompass,color:"bg-oGreen",action:()=>en("sail")},{id:"alerts",label:"ALERTS",icon:l.faRobot,color:"bg-oRed",action:()=>en("alerts")},{id:"status",label:"STATUS",icon:l.faTachometerAlt,color:"bg-hud-muted",action:()=>en("status")},{id:"racing",label:v("logbook.racingAdvice"),icon:l.faTrophy,color:S?"bg-oYellow":"bg-oYellow/40",action:()=>en("racing")}].map(e=>(0,t.jsxs)("button",{className:"tesla-card tesla-hover p-4 flex flex-col items-center justify-center space-y-3 shadow-soft group border border-hud",onClick:e.action,disabled:U,children:[(0,t.jsx)("div",{className:`${e.color} w-10 h-10 rounded-full flex items-center justify-center shadow-lg group-hover:scale-110 transition-transform duration-500`,children:(0,t.jsx)(n.FontAwesomeIcon,{icon:e.icon,className:"text-hud-main text-sm"})}),(0,t.jsx)("span",{className:"text-xs font-black text-hud-main tracking-widest",children:e.label})]},e.id))})]}),F&&(0,t.jsx)("div",{className:"bg-oRed/10 text-oRed p-3 rounded text-xs font-black uppercase mb-4 animate-soft-pulse border border-oRed/20",children:F}),U&&(0,t.jsxs)("div",{className:"tesla-card p-10 text-center bg-hud-bg",children:[(0,t.jsx)(n.FontAwesomeIcon,{icon:l.faRobot,className:"text-4xl text-oGreen mb-6 animate-soft-pulse"}),(0,t.jsx)("h4",{className:"text-xs font-black text-hud-main uppercase tracking-widest mb-4",children:v("logbook.neuralProcessing")}),(0,t.jsx)("div",{className:"w-48 mx-auto bg-hud-elevated h-1 rounded-full overflow-hidden",children:(0,t.jsx)("div",{className:"bg-oGreen h-full animate-progress-indefinite rounded-full",style:{width:"40%"}})}),(0,t.jsxs)("p",{className:"text-hud-muted text-xs font-black uppercase mt-4 tracking-tighter italic",children:[v("logbook.processNode")," ",Z]})]}),H&&!U&&(x=H.analysis&&"object"==typeof H.analysis?H.analysis:null,m="string"==typeof H.analysis?H.analysis:null,h=void 0!==H.settings&&!H.analysis,b=m||x?.text||x?.summary||H.aiAnalysis||("string"==typeof H.summary?H.summary:null)||h&&(H.settings?.analysis?.speech||H.course?.analysis?.speech)||null,g=H.speechText||("string"==typeof H.speech?H.speech:null)||x?.speech||(h?H.settings?.analysis?.speech||H.course?.analysis?.speech:null),f=Array.isArray(p=H.recommendations||x?.recommendations||(h&&H.settings?.adjustments?.length>0?H.settings.adjustments.map(e=>e.action||e.message||JSON.stringify(e)):null))?p:null,j=Array.isArray(N=H.insights||x?.expertAdvice)?N:null,k=H.data||H.weatherData||H.assessment||(h?{course:H.course,settings:H.settings}:null),(0,t.jsxs)("div",{className:"tesla-card p-6 shadow-xl animate-fade-in",children:[(0,t.jsxs)("div",{className:"flex items-center mb-6 border-b border-hud pb-4",children:[(0,t.jsx)(n.FontAwesomeIcon,{icon:l.faChartLine,className:"text-oGreen mr-3 text-sm"}),(0,t.jsxs)("h4",{className:"text-xs font-black text-hud-main uppercase tracking-widest",children:[v("logbook.operationReport")," ",Z]})]}),(0,t.jsxs)("div",{className:"space-y-6",children:[b&&(0,t.jsxs)("div",{className:"tesla-card bg-hud-bg p-4 border-l-2 border-oBlue/30 shadow-subtle",children:[(0,t.jsx)("h5",{className:"text-xs font-black text-oBlue mb-3 uppercase tracking-widest",children:v("logbook.executiveSummary")}),(0,t.jsx)("p",{className:"text-hud-secondary text-xs font-bold leading-relaxed italic normal-case",children:b})]}),(j||f)&&(0,t.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[j&&(0,t.jsxs)("div",{className:"tesla-card bg-hud-bg p-4 shadow-subtle",children:[(0,t.jsxs)("h5",{className:"text-xs font-black text-oBlue mb-3 uppercase tracking-widest flex items-center",children:[(0,t.jsx)(n.FontAwesomeIcon,{icon:l.faRobot,className:"mr-2 text-xs"}),v("logbook.strategicInsights")]}),(0,t.jsx)("ul",{className:"space-y-2",children:j.map((e,s)=>{let a="string"==typeof e?e:e&&"object"==typeof e?e.text||e.message||e.insight||JSON.stringify(e):String(e);return(0,t.jsxs)("li",{className:"text-xs font-bold text-hud-secondary normal-case flex items-start",children:[(0,t.jsx)("span",{className:"text-oBlue mr-2 opacity-50",children:"›"}),a]},s)})})]}),f&&(0,t.jsxs)("div",{className:"tesla-card bg-hud-bg p-4 shadow-subtle",children:[(0,t.jsxs)("h5",{className:"text-xs font-black text-oGreen mb-3 uppercase tracking-widest flex items-center",children:[(0,t.jsx)(n.FontAwesomeIcon,{icon:l.faChartLine,className:"mr-2 text-xs"}),v("logbook.operationalAdvice")]}),(0,t.jsx)("ul",{className:"space-y-2",children:f.map((e,s)=>{let a;return a="string"==typeof e?e:e&&"object"==typeof e?"string"==typeof e.message?e.message:e.message&&"object"==typeof e.message?e.message.message||e.text||e.action||JSON.stringify(e.message):e.text||e.action||JSON.stringify(e):String(e),(0,t.jsxs)("li",{className:"text-xs font-bold text-hud-secondary normal-case flex items-start",children:[(0,t.jsx)("span",{className:"text-oGreen mr-2 opacity-50",children:"✓"}),a]},s)})})]})]}),g&&(0,t.jsxs)("div",{className:"bg-oBlue/5 p-4 rounded-sm border border-oBlue/10 shadow-soft",children:[(0,t.jsxs)("h5",{className:"text-xs font-black text-oBlue mb-2 uppercase tracking-widest flex items-center",children:[(0,t.jsx)(n.FontAwesomeIcon,{icon:l.faRobot,className:"mr-2 animate-soft-pulse"}),v("logbook.voiceTelemetry")]}),(0,t.jsx)("p",{className:"text-hud-secondary text-xs font-bold leading-relaxed italic normal-case",children:g})]}),k&&(0,t.jsxs)("div",{className:"tesla-card bg-hud-bg p-4 border border-hud",children:[(0,t.jsx)("h5",{className:"text-xs font-black text-hud-secondary mb-3 uppercase tracking-widest",children:v("logbook.rawTelemetryData")}),(0,t.jsx)("pre",{className:"text-oGreen/70 text-xs font-mono overflow-auto max-h-40 font-bold scrollbar-thin",children:JSON.stringify(k,null,2)})]}),H.timestamp&&(0,t.jsxs)("div",{className:"text-hud-dim text-xs font-black text-right uppercase tracking-tighter",children:[v("logbook.generated")," ",new Date(H.timestamp).toLocaleString()," ","// OCEAROCORE V2.4"]})]})]})),!H&&!U&&(0,t.jsx)("div",{className:"tesla-card p-12 text-center bg-hud-bg shadow-inner border border-hud",children:(0,t.jsxs)("div",{className:"text-hud-muted",children:[(0,t.jsx)(n.FontAwesomeIcon,{icon:l.faRobot,size:"3x",className:"mb-6 opacity-20"}),(0,t.jsx)("h4",{className:"text-xs font-black text-hud-main uppercase tracking-widest mb-3",children:v("logbook.diagnosticReady")}),(0,t.jsx)("p",{className:"text-xs font-black uppercase tracking-tight max-w-xs mx-auto leading-relaxed",children:v("logbook.diagnosticReadyDesc")})]})})]})]},A)})}),Y&&(0,t.jsx)("div",{className:"fixed inset-0 bg-black/60 backdrop-blur-sm flex items-center justify-center z-50",onClick:()=>W(!1),children:(0,t.jsxs)("div",{className:"bg-hud-bg backdrop-blur-xl rounded-3xl p-6 sm:p-8 max-w-md w-full mx-4 shadow-2xl border border-hud max-h-[90vh] overflow-y-auto",onClick:e=>e.stopPropagation(),children:[(0,t.jsxs)("div",{className:"flex justify-between items-center mb-8",children:[(0,t.jsxs)("h3",{className:"text-xl font-black text-hud-main flex items-center tracking-tight",children:[(0,t.jsx)(n.FontAwesomeIcon,{icon:l.faBook,className:"mr-3 text-oBlue"}),D?v("logbook.editEntry"):v("logbook.manualEntry")]}),(0,t.jsx)("button",{onClick:()=>W(!1),className:"w-10 h-10 rounded-full flex items-center justify-center text-hud-secondary hover:text-hud-main hover:bg-hud-elevated transition-all duration-300",children:(0,t.jsx)(n.FontAwesomeIcon,{icon:l.faTimes,size:"lg"})})]}),(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsxs)("div",{children:[(0,t.jsxs)("label",{className:"block text-xs font-black uppercase tracking-widest text-hud-secondary mb-2 flex items-center",children:[(0,t.jsx)(n.FontAwesomeIcon,{icon:l.faUser,className:"mr-2 text-oBlue"}),v("logbook.author")]}),(0,t.jsx)("input",{type:"text",value:z.author,onChange:e=>J({...z,author:e.target.value}),className:"w-full bg-hud-elevated text-hud-main px-4 py-3 rounded-xl border border-hud focus:border-oBlue focus:outline-none transition-all duration-300 font-bold",placeholder:v("logbook.authorPlaceholder")})]}),(0,t.jsxs)("div",{children:[(0,t.jsxs)("label",{className:"block text-xs font-black uppercase tracking-widest text-hud-secondary mb-2 flex items-center",children:[(0,t.jsx)(n.FontAwesomeIcon,{icon:l.faStickyNote,className:"mr-2 text-oYellow"}),v("logbook.note")]}),(0,t.jsx)("textarea",{value:z.text,onChange:e=>J({...z,text:e.target.value}),className:"w-full bg-hud-elevated text-hud-main px-4 py-3 rounded-xl border border-hud focus:border-oBlue focus:outline-none transition-all duration-300 font-bold min-h-[120px]",placeholder:v("logbook.notePlaceholder")})]}),(0,t.jsxs)("div",{className:"flex justify-end space-x-4 pt-6 border-t border-hud",children:[(0,t.jsx)("button",{onClick:()=>W(!1),className:"px-6 py-3 bg-hud-elevated hover:bg-hud-bg text-hud-main font-bold rounded-xl transition-all duration-300",children:v("logbook.cancel")}),(0,t.jsxs)("button",{onClick:ea,className:"px-8 py-3 bg-oBlue hover:bg-oBlue/80 text-hud-main font-bold rounded-xl transition-all duration-300 flex items-center shadow-lg shadow-oBlue/20",children:[(0,t.jsx)(n.FontAwesomeIcon,{icon:l.faPlus,className:"mr-2"}),v("logbook.saveEntry")]})]})]})]})})]})}])},70127,e=>{e.n(e.i(76103))}]);
@@ -1 +0,0 @@
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(25949),p=e.i(33369),h=["axis"],x=(0,a.forwardRef)((e,t)=>a.createElement(p.CartesianChart,{chartName:"LineChart",defaultTooltipEventType:"axis",validateTooltipEventTypes:h,tooltipPayloadSearcher:m.arrayTooltipSearcher,categoricalChartProps:e,ref:t})),f=a,b=e.i(7670),y=e.i(97865),v=e.i(72733),g=["animationElapsedTime","isAnimating","isEntrance","visibleLength","strokeDasharray","connectNulls"];function j(){return(j=Object.assign.bind()).apply(null,arguments)}function N(e,t){return"".concat(t,"px ").concat(e,"px")}var w=e.i(36536),k=e.i(69212),A=e.i(86031),C=e.i(94395),O=e.i(81977),E=e.i(79812),I=e.i(41818),P=e.i(844),S=["children"],$=(0,a.createContext)({data:[],xAxisId:"xAxis-0",yAxisId:"yAxis-0",dataPointFormatter:()=>({x:0,y:0,value:0}),errorBarOffset:0});function R(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,S);return a.createElement($.Provider,{value:i},t)}var D=e.i(59798),L=e.i(46710),T=e.i(75337),B=e.i(61849),F=e.i(92860),G=e.i(61764),K=(e,t,a,i)=>(0,G.selectAxisWithScale)(e,"xAxis",t,i),_=(e,t,a,i)=>(0,G.selectTicksOfGraphicalItem)(e,"xAxis",t,i),M=(e,t,a,i)=>(0,G.selectAxisWithScale)(e,"yAxis",a,i),W=(e,t,a,i)=>(0,G.selectTicksOfGraphicalItem)(e,"yAxis",a,i),z=(0,B.createSelector)([L.selectChartLayout,K,M,_,W],(e,t,a,i,r)=>(0,E.isCategoricalAxis)(e,"xAxis")?(0,E.getBandSizeOfAxis)(t,i,!1):(0,E.getBandSizeOfAxis)(a,r,!1));function H(e){return"line"===e.type}var V=(0,B.createSelector)([G.selectUnfilteredCartesianItems,(e,t,a,i,r)=>r],(e,t)=>e.filter(H).find(e=>e.id===t)),U=(0,B.createSelector)([L.selectChartLayout,K,M,_,W,V,z,F.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,h,x,f,b,y,v,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,h=m.xAxis,x=m.yAxis,f=m.xAxisTicks,b=m.yAxisTicks,y=m.dataKey,v=m.bandSize,m.displayedData.map((e,t)=>{var a=(0,E.getValueByDataKey)(e,y);if("horizontal"===p){var i=(0,E.getCateCoordinateOfLine)({axis:h,ticks:f,bandSize:v,entry:e,index:t}),r=(0,C.isNullish)(a)?null:x.scale.map(a);return{x:i,y:null!=r?r:null,value:a,payload:e}}var l=(0,C.isNullish)(a)?null:h.scale.map(a),n=(0,E.getCateCoordinateOfLine)({axis:x,ticks:b,bandSize:v,entry:e,index:t});return null==l||null==n?null:{x:l,y:n,value:a,payload:e}}).filter(Boolean)}}}),Y=e.i(27241),q=e.i(95146),X=e.i(30174),Z=e.i(8436),J=e.i(51883),Q=e.i(52734),ee=e.i(15549),et=e.i(91187),ea=e.i(57999),ei=e.i(43404),er=e.i(81583),el=e.i(18519),en=e.i(29601),es=e.i(18457),eo=e.i(20135),ec=["id"],ed=["type","layout","connectNulls","needClip","shape","strokeDasharray"],eu=["activeDot","animateNewValues","animationBegin","animationDuration","animationEasing","connectNulls","dot","hide","isAnimationActive","label","legendType","xAxisId","yAxisId","id"];function em(){return(em=Object.assign.bind()).apply(null,arguments)}function ep(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 eh(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 ex(e){for(var t=1;t<arguments.length;t++){var a=null!=arguments[t]?arguments[t]:{};t%2?eh(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)):eh(Object(a)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(a,t))})}return e}var ef={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(ex(ex({},r.next),{},{x:(0,C.interpolate)(r.prev.x,r.next.x,t),y:(0,C.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(ex(ex({},r.next),{},{x:(0,C.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(ex(ex({},r.prev),{},{x:(0,C.interpolate)(r.prev.x,n,t),y:r.prev.y}))}return i},animationMatchBy:Z.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,g);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 N(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))):N(c,t)}else null!=i&&(n=String(i));return a.createElement(v.Curve,j({},l,{connectNulls:null!=r&&r,strokeDasharray:n}))},stroke:"#3182bd",strokeWidth:1,xAxisId:0,yAxisId:0,zIndex:es.DefaultZIndexes.line,type:"linear"},eb=f.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:C.noop,settings:{stroke:i,strokeWidth:r,fill:l,dataKey:t,nameKey:void 0,name:(0,E.getTooltipNameProp)(n,t),hide:s,type:d,color:i,unit:o,formatter:c,graphicalItemId:u}};return f.createElement(P.SetTooltipEntrySettings,{tooltipEntrySettings:m})});function ey(e){var t=e.clipPathId,a=e.points,i=e.props,r=i.dot,l=i.dataKey,n=i.needClip;i.id;var s=ep(i,ec),o=(0,ea.svgPropertiesNoEvents)(s);return f.createElement(A.Dots,{points:a,dot:r,className:"recharts-line-dots",dotClassName:"recharts-line-dot",dataKey:l,baseProps:o,needClip:n,clipPathId:t})}function ev(e){var t=e.showLabels,a=e.children,i=e.points,r=(0,f.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 ex(ex({},i),{},{value:e.value,payload:e.payload,viewBox:i,parentViewBox:void 0,fill:void 0})}),[i]);return f.createElement(k.CartesianLabelListContextProvider,{value:t?r:void 0},a)}function eg(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,h=r.strokeDasharray,x=ep(r,ed),b=ex(ex({},(0,ei.svgPropertiesAndEvents)(x)),{},{fill:"none",className:"recharts-line-curve",clipPath:m?"url(#clipPath-".concat(t,")"):void 0,points:i,type:c,layout:d,connectNulls:u,strokeDasharray:null!=h?h:r.strokeDasharray,pathRef:a,animationElapsedTime:l,isAnimating:n,isEntrance:!!r.animateNewValues&&s,visibleLength:o});return f.createElement(f.Fragment,null,(null==i?void 0:i.length)>1&&f.createElement(el.Shape,{option:p,DefaultShape:ef.shape,shapeProps:b}),f.createElement(ey,{points:i,clipPathId:t,props:r}))}function ej(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,h=s.animationEasing,x=s.animationMatchBy,b=s.animationInterpolateFn,y=s.layout,v=function(e){try{return e&&e.getTotalLength&&e.getTotalLength()||0}catch(e){return 0}}(o.current),g=(0,X.useAnimationCallbacks)(s.onAnimationStart,s.onAnimationEnd),j=g.isAnimating,N=g.handleAnimationStart,A=g.handleAnimationEnd,C=(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,w.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},[])),O=(0,f.useCallback)(e=>e>0&&v>0,[v]);return f.createElement(ev,{points:d,showLabels:!j},s.children,f.createElement(X.AnimatedItems,{animationInput:d,animationIdPrefix:"recharts-line-",items:d,previousItemsRef:c,isAnimationActive:u,animationBegin:m,animationDuration:p,animationEasing:h,onAnimationStart:N,onAnimationEnd:A,animationInterpolateFn:b,animationMatchBy:x,shouldUpdatePreviousRef:O,layout:y},(e,t,a)=>{var i=j||t<1,r=i?C(t,v):null;return f.createElement(eg,{props:s,points:e,clipPathId:n,pathRef:o,animationElapsedTime:t,isAnimating:i,isEntrance:a,visibleLength:r})}),f.createElement(k.LabelListFromLabelProp,{label:s.label}))}function eN(e){var t=e.clipPathId,a=e.props,i=(0,f.useRef)(null),r=(0,f.useRef)(null);return f.createElement(ej,{props:a,clipPathId:t,previousPointsRef:i,pathRef:r})}var ew=(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,E.getValueByDataKey)(e.payload,t)}};class ek extends f.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 h=(0,b.clsx)("recharts-line",r),x=(0,er.getRadiusAndStrokeWidthFromDot)(a),v=x.r,g=x.strokeWidth,j=(0,O.isClipDot)(a),N=2*v+g,w=m?"url(#clipPath-".concat(j?"":"dots-").concat(u,")"):void 0;return f.createElement(en.ZIndexLayer,{zIndex:p},f.createElement(y.Layer,{className:h},m&&f.createElement("defs",null,f.createElement(D.GraphicalItemClipPath,{clipPathId:u,xAxisId:l,yAxisId:n}),!j&&f.createElement("clipPath",{id:"clipPath-dots-".concat(u)},f.createElement("rect",{x:o-N/2,y:s-N/2,width:c+N,height:d+N}))),f.createElement(R,{xAxisId:l,yAxisId:n,data:i,dataPointFormatter:ew,errorBarOffset:0},f.createElement(eN,{props:this.props,clipPathId:u}))),f.createElement(I.ActivePoints,{activeDot:this.props.activeDot,points:i,mainColor:this.props.stroke,itemDataKey:this.props.dataKey,clipPath:w}))}}function eA(e){var t=(0,J.resolveDefaultProps)(e,ef),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,h=t.yAxisId,x=t.id,b=ep(t,eu),y=(0,D.useNeedsClip)(p,h).needClip,v=(0,Q.usePlotArea)(),g=(0,L.useChartLayout)(),j=(0,T.useIsPanorama)(),N=(0,Y.useAppSelector)(e=>U(e,p,h,j,x));if("horizontal"!==g&&"vertical"!==g||null==N||null==v)return null;var w=v.height,k=v.width,A=v.x,C=v.y;return f.createElement(ek,em({},b,{id:x,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:h,points:N,layout:g,height:w,width:k,left:A,top:C,needClip:y}))}var eC=f.memo(function(e){var t=(0,J.resolveDefaultProps)(e,ef),a=(0,T.useIsPanorama)();return f.createElement(ee.RegisterGraphicalItemId,{id:t.id,type:"line"},e=>{var i,r,l,n;return f.createElement(f.Fragment,null,f.createElement(q.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,E.getTooltipNameProp)(r,i),payload:t}])}),f.createElement(eb,{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}),f.createElement(et.SetCartesianGraphicalItem,{type:"line",id:e,data:t.data,xAxisId:t.xAxisId,yAxisId:t.yAxisId,zAxisId:0,dataKey:t.dataKey,hide:t.hide,isPanorama:a}),f.createElement(eA,em({},t,{id:e})))})},eo.propsAreEqual);eC.displayName="Line";var eO=e.i(85183),eE=e.i(93230),eI=e.i(72526),eP=e.i(34239),eS=e.i(31195),e$=e.i(237),eR=e.i(1725);let eD=({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"],h=({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)(eS.ResponsiveContainer,{width:"100%",height:"100%",minWidth:0,minHeight:0,children:d?(0,t.jsxs)(eR.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)(eI.CartesianGrid,{strokeDasharray:"3 3",stroke:"var(--hud-border)",vertical:!1}),(0,t.jsx)(eO.XAxis,{dataKey:"time",tickFormatter:m,tick:{fill:"var(--hud-text-muted)",fontSize:12},axisLine:!1,tickLine:!1,interval:"preserveStartEnd",minTickGap:30}),(0,t.jsx)(eE.YAxis,{domain:p,tick:{fill:"var(--hud-text-muted)",fontSize:12},axisLine:!1,tickLine:!1,unit:s}),(0,t.jsx)(eP.Tooltip,{content:(0,t.jsx)(h,{})}),(0,t.jsx)(e$.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)(x,{data:e,margin:{top:10,right:10,left:-20,bottom:0},children:[(0,t.jsx)(eI.CartesianGrid,{strokeDasharray:"3 3",stroke:"var(--hud-border)",vertical:!1}),(0,t.jsx)(eO.XAxis,{dataKey:"time",tickFormatter:m,tick:{fill:"var(--hud-text-muted)",fontSize:12},axisLine:!1,tickLine:!1,interval:"preserveStartEnd",minTickGap:30}),(0,t.jsx)(eE.YAxis,{domain:p,tick:{fill:"var(--hud-text-muted)",fontSize:12},axisLine:!1,tickLine:!1,unit:s}),(0,t.jsx)(eP.Tooltip,{content:(0,t.jsx)(h,{})}),(0,t.jsx)(eC,{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,h]=(0,a.useState)("battery"),[x,f]=(0,a.useState)("voltage"),[b,y]=(0,a.useState)("fps"),[v,g]=(0,a.useState)("1"),[j,N]=(0,a.useState)(!1),w=(0,a.useMemo)(()=>[`electrical.batteries.${v}.voltage`,`electrical.batteries.${v}.capacity.stateOfCharge`,`electrical.batteries.${v}.current`,`electrical.batteries.${v}.temperature`,`electrical.batteries.${v}.chemistry`,`electrical.batteries.${v}.name`,`electrical.batteries.${v}.location`,`electrical.batteries.${v}.dateInstalled`,`electrical.batteries.${v}.manufacturer.name`,`electrical.batteries.${v}.manufacturer.model`,`electrical.batteries.${v}.manufacturer.URL`,`electrical.batteries.${v}.associatedBus`,`electrical.batteries.${v}.voltage.ripple`,`electrical.batteries.${v}.capacity.nominal`,`electrical.batteries.${v}.capacity.actual`,`electrical.batteries.${v}.capacity.remaining`,`electrical.batteries.${v}.capacity.dischargeLimit`,`electrical.batteries.${v}.capacity.stateOfHealth`,`electrical.batteries.${v}.capacity.dischargeSinceFull`,`electrical.batteries.${v}.capacity.timeRemaining`,`electrical.batteries.${v}.lifetimeDischarge`,`electrical.batteries.${v}.lifetimeRecharge`,"steering.autopilot.state","navigation.lights"],[v]),k=(0,l.useSignalKPaths)(w),A=(0,a.useMemo)(()=>{let e=k[`electrical.batteries.${v}.voltage`]??null,t=k[`electrical.batteries.${v}.current`]??0,a=k[`electrical.batteries.${v}.capacity.stateOfCharge`],i=k[`electrical.batteries.${v}.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:k[`electrical.batteries.${v}.chemistry`],name:k[`electrical.batteries.${v}.name`],location:k[`electrical.batteries.${v}.location`],dateInstalled:k[`electrical.batteries.${v}.dateInstalled`],manufacturer:k[`electrical.batteries.${v}.manufacturer.name`],model:k[`electrical.batteries.${v}.manufacturer.model`],manufacturerURL:k[`electrical.batteries.${v}.manufacturer.URL`],associatedBus:k[`electrical.batteries.${v}.associatedBus`],voltageRipple:k[`electrical.batteries.${v}.voltage.ripple`],nominalCapacity:k[`electrical.batteries.${v}.capacity.nominal`],actualCapacity:k[`electrical.batteries.${v}.capacity.actual`],remainingCapacity:k[`electrical.batteries.${v}.capacity.remaining`],dischargeLimit:k[`electrical.batteries.${v}.capacity.dischargeLimit`],stateOfHealth:k[`electrical.batteries.${v}.capacity.stateOfHealth`],dischargeSinceFull:k[`electrical.batteries.${v}.capacity.dischargeSinceFull`],timeRemaining:k[`electrical.batteries.${v}.capacity.timeRemaining`],lifetimeDischarge:k[`electrical.batteries.${v}.lifetimeDischarge`],lifetimeRecharge:k[`electrical.batteries.${v}.lifetimeRecharge`],autopilotState:"auto"===k["steering.autopilot.state"],navigationLightsOn:k["navigation.lights"]||!1}},[k,v]),C=(0,a.useRef)(performance.now()),O=(0,a.useRef)(0),E=(0,a.useRef)(null),I=(0,a.useRef)(null),[P,S]=(0,a.useState)(()=>Array(60).fill(null).map(()=>({voltage:12,current:0,stateOfCharge:100,temperature:null,time:new Date().toLocaleTimeString()}))),[$,R]=(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=A,(0,a.useEffect)(()=>{let e,t,a=()=>{O.current++,e=requestAnimationFrame(a)};return e=requestAnimationFrame(a),t=setInterval(()=>{let e=performance.now(),t=e-C.current,a=t>0?1e3*O.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),R(e=>[...e.slice(1),{time:r,fps:a,ms:i,drawCalls:l,triangles:n,geometries:s,textures:o,memory:c}]),S(e=>[...e.slice(1),{...I.current,time:r}]),C.current=e,O.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)(A.voltage);return A.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}].map(e=>(0,t.jsxs)("button",{onClick:()=>h(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:()=>N(!j),"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:v,onChange:e=>g(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:j&&(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:()=>N(!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:A.name},{label:e("battery.chemistry"),value:A.chemistry},{label:e("battery.manufacturer"),value:A.manufacturer},{label:e("battery.position"),value:A.location},{label:e("battery.busLink"),value:A.associatedBus},{label:e("battery.condition"),value:A.stateOfHealth?`${(100*A.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))}),(A.nominalCapacity||A.actualCapacity||A.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:A.nominalCapacity},{label:e("battery.actual"),value:A.actualCapacity},{label:e("battery.remaining"),value:A.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:`${A.stateOfCharge}%`}})]}),(0,t.jsxs)("div",{className:"absolute top-0 flex flex-col items-center transition-all duration-1000",style:{left:`clamp(10%, ${A.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:[A.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"):A.timeRemaining?e("battery.depletionIn",{hours:(A.timeRemaining/3600).toFixed(1)}):A.voltage>0&&Math.abs(A.current)>0?e("battery.endurance",{hours:(A.stateOfCharge/(Math.abs(A.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:A.autopilotState?.4*Math.abs(A.current):0,state:A.autopilotState},{id:"telemetry",icon:o.faGaugeHigh,label:e("battery.telemetryArray"),color:"bg-oGreen",value:.3*Math.abs(A.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:`${A.voltage.toFixed(1)}V`,color:"text-oBlue"},{label:e("battery.amperageLoad"),value:`${A.current.toFixed(1)}A`,color:"text-oYellow"},{label:e("battery.gridOutput"),value:`${(A.voltage*A.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:()=>f(e),className:`px-4 py-1 rounded-sm text-xs font-black uppercase transition-all duration-500 ${x===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)(eD,{data:P,dataKey:x,color:"voltage"===x?"var(--color-oBlue)":"current"===x?"var(--color-oYellow)":"var(--color-oGreen)",unit:"voltage"===x?"V":"current"===x?"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}}[x]})})]},"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 ${b===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)(eD,{data:$,dataKey:b,color:"var(--color-oBlue)",unit:"fps"===b?"":"ms"===b?"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}}[b]})}),(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:$[$.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:[($[$.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:[$[$.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:[$[$.length-1].textures," units"]})]})]})]})]},"performance")]})})]})}],39896)},65862,e=>{e.n(e.i(39896))}]);