@rainbow-robotics/preview-host 1.2.1 → 1.3.2

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 (38) hide show
  1. package/dist/assets/AmrCapabilityControl.Chcof_MA.js +1 -0
  2. package/dist/assets/{MapInfo.BRSi53tx.js → MapInfo.BlAKvTxe.js} +3 -3
  3. package/dist/assets/RbLocalizationProvider.8QfUcjTn.js +311 -0
  4. package/dist/assets/{__federation_expose_App.DIk25Rgb.js → __federation_expose_App.BAbbsoQK.js} +285 -264
  5. package/dist/assets/__federation_fn_import.ByOnqCI5.js +2 -2
  6. package/dist/assets/{cssMode._j_NX3lN.js → cssMode.DQwGnRga.js} +1 -1
  7. package/dist/assets/{freemarker2.e0gdno-Q.js → freemarker2.nQ8Dv9NE.js} +1 -1
  8. package/dist/assets/{handlebars.Chu_cPzA.js → handlebars.4ljVOLBH.js} +1 -1
  9. package/dist/assets/{html.CshfLfCA.js → html.wI8i2xe8.js} +1 -1
  10. package/dist/assets/{htmlMode.DN7b6_e5.js → htmlMode.CcrHwGdx.js} +1 -1
  11. package/dist/assets/{index.CiEcqJMW.js → index.BXkM7QZC.js} +1 -1
  12. package/dist/assets/index.CZd6_2oG.js +1 -0
  13. package/dist/assets/index.jViA39qW.js +1 -0
  14. package/dist/assets/{javascript.BnpjX_Xu.js → javascript.sybawtc7.js} +1 -1
  15. package/dist/assets/{jsonMode.C9FU0l6F.js → jsonMode.D72YMDk_.js} +1 -1
  16. package/dist/assets/{liquid.DXgMtcgb.js → liquid.DBl3RsVx.js} +1 -1
  17. package/dist/assets/{lspLanguageFeatures.CAZ7dR1a.js → lspLanguageFeatures.DndgAwww.js} +1 -1
  18. package/dist/assets/{mdx.DpwNc1EL.js → mdx.CAHSwZsT.js} +1 -1
  19. package/dist/assets/{python.C-b03Dzy.js → python.Q769__q0.js} +1 -1
  20. package/dist/assets/{razor.3d91s3Ea.js → razor.D0s7Ui7s.js} +1 -1
  21. package/dist/assets/remoteEntry.js +1 -1
  22. package/dist/assets/{tsMode.CC68na3J.js → tsMode.6IYga6qb.js} +1 -1
  23. package/dist/assets/{typescript.DBglff5C.js → typescript.Bjzf5Bnp.js} +1 -1
  24. package/dist/assets/useJsonFileDownload.C6bSXY2i.js +4779 -0
  25. package/dist/assets/{xml.CYPQHUER.js → xml.DNUQoxsD.js} +1 -1
  26. package/dist/assets/{yaml.MSYh2xPr.js → yaml.CBZ64O9X.js} +1 -1
  27. package/dist/imgs/nexus/forms/gripper/gripper_23.png +0 -0
  28. package/dist/index.html +5 -5
  29. package/dist/plugin-shared/plugin-ui_react.js +1 -1
  30. package/package.json +1 -1
  31. package/dist/assets/AmrCapabilityControl.DRoAHzZG.js +0 -1
  32. package/dist/assets/RbLocalizationProvider.DW8fvKpP.js +0 -3230
  33. package/dist/assets/goalIconAtlas.B2lkzTN6.svg +0 -39
  34. package/dist/assets/goalIconAtlasReal.BcQvnHD9.svg +0 -34
  35. package/dist/assets/index.CL9BouW3.js +0 -1
  36. package/dist/assets/index.HCpvvIgz.js +0 -1
  37. package/dist/assets/keymapTileIndex.worker-Bmd4Ukaf.js +0 -1
  38. package/dist/assets/useBottomStatusBar.B_NReCDH.js +0 -4773
@@ -0,0 +1 @@
1
+ import{importShared as f}from"./__federation_fn_import.ByOnqCI5.js";import{cx as g,H as s,j as t,X as v,U as p,x as b,c1 as c,bI as O,aW as E,a$ as F,V as B,bs as P,bF as _,_ as T,fG as w,gC as R}from"./RbLocalizationProvider.8QfUcjTn.js";import{b as D}from"./index.CZd6_2oG.js";const{useQuery:L}=await f("@tanstack/react-query"),M={skipErrorToast:!0},C=[{key:"dock",endpoint:"/{robot_model}/capability/dock",labelKey:"move.amr.rightPanel.capability.dock"},{key:"io",endpoint:"/{robot_model}/capability/Io",labelKey:"move.amr.rightPanel.capability.io"},{key:"camera",endpoint:"/{robot_model}/capability/camera",labelKey:"move.amr.rightPanel.capability.camera"},{key:"lidar2d",endpoint:"/{robot_model}/capability/lidar2d",labelKey:"move.amr.rightPanel.capability.lidar2d"},{key:"lidar3d",endpoint:"/{robot_model}/capability/lidar3d",labelKey:"move.amr.rightPanel.capability.lidar3d"},{key:"imu",endpoint:"/{robot_model}/capability/imu",labelKey:"move.amr.rightPanel.capability.imu"},{key:"safetyBumper",endpoint:"/{robot_model}/capability/safetyBumper",labelKey:"move.amr.rightPanel.capability.safetyBumper"},{key:"safetyInterlock",endpoint:"/{robot_model}/capability/safetyInterlock",labelKey:"move.amr.rightPanel.capability.safetyInterlock"},{key:"safetyObstacle",endpoint:"/{robot_model}/capability/safetyObstacle",labelKey:"move.amr.rightPanel.capability.safetyObstacle"},{key:"safetyOperationStop",endpoint:"/{robot_model}/capability/safetyOperationStop",labelKey:"move.amr.rightPanel.capability.safetyOperationStop"},{key:"safetySpeedControl",endpoint:"/{robot_model}/capability/safetySpeedControl",labelKey:"move.amr.rightPanel.capability.safetySpeedControl"},{key:"tabos",endpoint:"/{robot_model}/capability/tabos",labelKey:"move.amr.rightPanel.capability.tabos"}],K=e=>typeof e=="object"&&e!==null&&"enabled"in e&&e.enabled===!1,q=e=>{if(e instanceof Error)return e.message;if(typeof e=="object"&&e!==null&&"message"in e){const a=e.message;if(typeof a=="string")return a}},U=async({robot_model:e})=>{const a=await Promise.allSettled(C.map(l=>{const r=l.endpoint.replace("{robot_model}",e);return D.get(r,M)}));return C.map((l,r)=>{const n=a[r];return n.status==="fulfilled"?{...l,supported:!K(n.value),data:n.value}:{...l,supported:!1,data:null,errorMessage:q(n.reason)}})},$=({robot_model:e,enabled:a=!0})=>L({queryKey:["amrCapabilities",e],queryFn:()=>U({robot_model:e}),enabled:!!e&&a,staleTime:5*1e3,gcTime:60*1e3}),{useMutation:V}=await f("@tanstack/react-query"),j=()=>V({mutationFn:({robot_model:e,target:a,frequency:l})=>D.post(`/${e}/control/streamFrequency`,{target:a,frequency:Math.min(10,Math.max(0,l))})}),{useState:k}=await f("react"),G=4294967295,x=e=>{if(!(e==null||e===G))return`${e} ms`},Y={0:"NONE",1:"CHARGING",2:"COMPLETE",3:"FAIL",4:"CANCEL"},z={0:"DEFAULT",1:"TABOS"},H={0:"CABLE",1:"CONTACT",2:"INDUCTIVE"},Q={0:"RPLIDAR",1:"SICK",2:"LAKI",3:"LIVOX",4:"HOKUYO"},X={0:"ORBBEC"},i=({label:e,children:a})=>s(p,{className:"items-center justify-between gap-3",children:[t("span",{className:"typo-compact-xs-normal text-fg-subtle shrink-0",children:e}),t("span",{className:b("typo-compact-xs-normal text-right",a!=null?"text-fg-default":"text-fg-subtler"),children:a??"—"})]}),W={default:"gray",success:"green",warning:"orange",danger:"red"},y=({label:e,variant:a="default"})=>t(T,{type:"soft",color:W[a],children:e}),h=({label:e,value:a})=>t(i,{label:e,children:t(y,{label:a?"ON":"OFF",variant:a?"success":"default"})}),u=({label:e,bits:a})=>s(c,{className:"gap-1",children:[t("span",{className:"typo-compact-xs-normal text-fg-subtle",children:e}),a?.length?t(p,{className:"gap-1",children:a.map((l,r)=>t("div",{className:b("size-4 rounded-sm border text-center leading-4",l?"border-fg-success bg-fill-success-subtlest":"border-border-subtler bg-fill-disabled"),children:t("span",{className:b("typo-compact-2xs-normal",l?"text-fg-success":"text-fg-subtler"),children:r})},r))}):t("span",{className:"typo-compact-xs-normal text-fg-subtler",children:"—"})]}),N=({label:e,connection:a,rows:l,children:r})=>{const{t:n}=g();return s(c,{className:"bg-fill-disabled gap-1.5 rounded-md p-2.5",children:[s(p,{className:"items-center justify-between gap-3",children:[t("span",{className:"typo-compact-xs-semibold text-fg-default min-w-0 break-words",children:e}),t("span",{className:b("typo-compact-2xs-medium shrink-0",a?"text-fg-success":"text-fg-subtler"),children:n(a?"settings.amr.frs.status.connected":"settings.amr.frs.status.disconnected")})]}),l.map(({key:o,value:d})=>t(i,{label:o,children:d},o)),r]})},J=({label:e,value:a})=>t(T,{type:"soft",color:a?"green":"gray",children:s(p,{className:"items-center gap-1",children:[a?t(w,{className:"size-3"}):t(R,{className:"size-3"}),t("span",{children:e}),t("span",{className:"font-semibold",children:a?"On":"Off"})]})}),I=({flags:e})=>t(p,{className:"flex-wrap gap-1.5",children:e.map(({label:a,value:l})=>t(J,{label:a,value:l},a))}),Z=({streams:e})=>e.length?s(c,{className:"border-subtle mt-0.5 gap-1 border-t pt-1.5",children:[t("span",{className:"typo-compact-xs-normal text-fg-subtle",children:"Streams"}),t(p,{className:"flex-wrap gap-1",children:e.map(a=>s(p,{className:"border-subtle bg-alt-1 items-center gap-1 rounded px-1.5 py-1",children:[t("span",{className:"typo-compact-2xs-semibold text-fg-default",children:a.quality}),s("span",{className:"typo-compact-2xs-normal text-fg-subtle",children:[a.width,"x",a.height]}),s("span",{className:"typo-compact-2xs-normal text-fg-subtler",children:[a.fps,"fps"]})]},`${a.camId}-${a.quality}`))})]}):null,ee=({data:e})=>{const a=Y[e.chargeState??-1]??String(e.chargeState),l=e.chargeState===1?"success":e.chargeState===3?"danger":e.chargeState===4?"warning":"default";return s(c,{className:"gap-2",children:[s(c,{className:"bg-fill-disabled gap-2 rounded-md p-2.5",children:[t(h,{label:"Dock State",value:e.dockState}),t(i,{label:"Charge State",children:t(y,{label:a,variant:l})}),s(i,{label:"Battery",children:[e.batteryPercent?.toFixed(1)," %"]}),s(i,{label:"Charge Current",children:[e.chargeCurrent?.toFixed(2)," A"]}),s(i,{label:"Contact Voltage",children:[e.contactVoltage?.toFixed(2)," V"]}),t(i,{label:"Battery Type",children:t(y,{label:z[e.batteryType??0]??"—"})})]}),s(p,{className:"items-center gap-1.5 px-0.5",children:[t("span",{className:"typo-compact-xs-normal text-fg-subtle shrink-0",children:"Charge Type"}),e.chargeType?.length?t(p,{className:"flex-wrap gap-1.5",children:e.chargeType.map(r=>t(y,{label:H[r]??String(r),variant:"default"},r))}):t("span",{className:"typo-compact-xs-normal text-fg-subtler",children:"—"})]})]})},ae=({data:e})=>s(c,{className:"gap-3 p-0.5",children:[t(u,{label:"MCU0 DIO",bits:e.mcu0Dio}),t(u,{label:"MCU1 DIO",bits:e.mcu1Dio}),t(u,{label:"MCU0 DIN",bits:e.mcu0Din}),t(u,{label:"MCU1 DIN",bits:e.mcu1Din})]}),te=({data:e})=>s(c,{className:"gap-2",children:[t(I,{flags:[{label:"Obstacle",value:e.enabledObs},{label:"Depth",value:e.enabledDepth},{label:"Filter",value:e.enabledFilter}]}),e.info?.length?e.info.map((a,l)=>{const r=typeof a.type=="number"?X[a.type]??String(a.type):a.type??"—",n=a.camId??a.index??l,o=e.rtspInfo?.filter(d=>d.camId===n)??[];return t(N,{label:`Camera ${n}${a.serial?` · ${a.serial}`:""}`,connection:a.connection,rows:[{key:"Type",value:r},{key:"TF",value:a.tf?.length?a.tf.map(d=>d.toFixed(2)).join(", "):void 0},{key:"Data Age",value:x(a.dataAgeMs)}],children:t(Z,{streams:o})},l)}):t("span",{className:"typo-compact-xs-normal text-fg-subtler px-0.5",children:"—"})]}),A=({data:e,is3d:a=!1})=>s(c,{className:"gap-2",children:[t(I,{flags:[{label:"Obstacle",value:e.enabledObs}]}),e.info?.length?e.info.map((l,r)=>t(N,{label:`Lidar ${l.index??r}${l.serial?` · ${l.serial}`:""}`,connection:l.connection,rows:[{key:"Type",value:Q[l.type]??String(l.type??"—")},...a?[]:[{key:"IP",value:l.ip}],{key:"Safety",value:l.safety!==void 0?l.safety?"Safety":"Normal":void 0},{key:"TF",value:l.tf?.length?l.tf.map(n=>n.toFixed(2)).join(", "):void 0},{key:"Data Age",value:x(l.dataAgeMs)}]},r)):t("span",{className:"typo-compact-xs-normal text-fg-subtler px-0.5",children:"—"})]}),le=({data:e})=>t(c,{className:"gap-2",children:e.info?.length?e.info.map((a,l)=>t(N,{label:`IMU ${a.index??l}${a.serial?` · ${a.serial}`:""}`,connection:a.connection,rows:[{key:"Type",value:a.type===1?"IMU":"DEFAULT"},{key:"Data Age",value:x(a.dataAgeMs)}]},l)):t("span",{className:"typo-compact-xs-normal text-fg-subtler px-0.5",children:"—"})}),se=({data:e})=>{const a=[{label:"Bumper State",value:e.bumperState},{label:"Interlock State",value:e.interlockState},{label:"Obstacle Detect",value:e.obsDetect},{label:"Operation Stop",value:e.operationStopState},{label:"Speed Control",value:e.speedControlState}].filter(l=>l.value!==void 0);return s(c,{className:"bg-fill-disabled gap-2 rounded-md p-2.5",children:[t(h,{label:"Enabled",value:e.enabled}),a.map(l=>t(h,{label:l.label,value:l.value},l.label))]})},re=({data:e})=>s(c,{className:"bg-fill-disabled gap-2 rounded-md p-2.5",children:[s(i,{label:"Voltage",children:[e.tabosVoltage?.toFixed(2)," V"]}),s(i,{label:"Current",children:[e.tabosCurrent?.toFixed(2)," A"]}),s(i,{label:"SOC",children:[e.tabosSoc?.toFixed(1)," %"]}),s(i,{label:"SOH",children:[e.tabosSoh?.toFixed(1)," %"]}),s(i,{label:"Temp",children:[e.tabosTemp?.toFixed(1)," °C"]})]}),ne=({capKey:e,data:a})=>{switch(e){case"dock":return t(ee,{data:a});case"io":return t(ae,{data:a});case"camera":return t(te,{data:a});case"lidar2d":return t(A,{data:a});case"lidar3d":return t(A,{data:a,is3d:!0});case"imu":return t(le,{data:a});case"tabos":return t(re,{data:a});default:return t(se,{data:a})}},ce=[{label:"LiDAR 2D",value:"lidar2d"},{label:"LiDAR 3D",value:"lidar3d"},{label:"OBS Map",value:"obsMap"}],oe=({robotModel:e})=>{const[a,l]=k("lidar2d"),[r,n]=k("1"),{mutate:o,isPending:d}=j();return s(c,{className:"gap-2 pb-1",children:[s(p,{className:"items-center justify-between gap-2",children:[t("span",{className:"typo-compact-xs-normal text-fg-subtle",children:"Target"}),t(F,{size:"2xs",variant:"brand",disabled:d,onClick:()=>{const m=Math.min(10,Math.max(0,Number(r)));o({robot_model:e,target:a,frequency:m})},children:"Set"})]}),t(P,{size:"sm",value:a,handleChange:m=>l(m),children:ce.map(({label:m,value:S})=>t(B,{value:S,children:m},S))}),t(p,{className:"items-center gap-2",children:t(_,{className:"flex-1",size:"sm",value:r,step:1,digit:0,fixedDigit:0,min:"0",max:"10",handleChange:m=>n(m)})})]})},ie=({item:e})=>{const{t:a}=g();return e.supported?e.data?t("div",{className:"pb-1",children:t(ne,{capKey:e.key,data:e.data})}):null:t("p",{className:"typo-compact-xs-normal text-fg-disabled px-1 py-2",children:a("move.amr.rightPanel.capability.status.notSupported")})},pe=()=>{const{t:e}=g();return t(E,{className:"flex-1 [&_[data-slot='empty-view-section']]:h-full",type:"icon",icon:t(O,{size:20}),message:e("move.amr.rightPanel.capability.status.loading")})},ye=({className:e,robotModel:a})=>{const{t:l}=g(),{data:r,isLoading:n}=$({robot_model:a});return s(c,{className:b("AmrCapabilityControl h-full min-h-0",e),children:[n&&t(pe,{}),(r??[]).map(o=>t("div",{className:"border-subtler border-b px-1 py-1",children:t(v,{disabled:!o.supported,title:t(p,{className:"w-full items-center justify-between gap-2",children:t("span",{className:b("typo-compact-sm2-semibold min-w-0 truncate",o.supported?"text-fg-default":"text-fg-disabled"),children:l(o.labelKey)})}),children:t(ie,{item:o})})},o.key)),t("div",{className:"border-subtler border-b px-1 py-1",children:t(v,{title:t("span",{className:"typo-compact-sm2-semibold text-fg-default",children:l("move.amr.rightPanel.capability.streamFrequency")}),children:t(oe,{robotModel:a})})})]})};export{ye as default};
@@ -1,4 +1,4 @@
1
- import{b as h,I as a,j as e,cR as _,cO as A,c7 as c,gg as O,gh as I,Z as r,gi as q,gj as F,b4 as u,eU as G,gk as U,gl as V,gm as Y,gn as H}from"./RbLocalizationProvider.DW8fvKpP.js";import{a7 as k,ap as X}from"./useBottomStatusBar.B_NReCDH.js";/**
1
+ import{c as h,H as a,j as e,cB as _,cx as A,c1 as c,g8 as O,g9 as I,U as r,ga as q,gb as F,a$ as u,eN as G,gc as H,gd as U,ge as V,gf as Y}from"./RbLocalizationProvider.8QfUcjTn.js";import{am as k,aE as X}from"./useJsonFileDownload.C6bSXY2i.js";/**
2
2
  * @license lucide-react v0.486.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -8,7 +8,7 @@ import{b as h,I as a,j as e,cR as _,cO as A,c7 as c,gg as O,gh as I,Z as r,gi as
8
8
  *
9
9
  * This source code is licensed under the ISC license.
10
10
  * See the LICENSE file in the root directory of this source tree.
11
- */const J=[["rect",{width:"16",height:"16",x:"4",y:"4",rx:"2",key:"14l7u7"}],["rect",{width:"6",height:"6",x:"9",y:"9",rx:"1",key:"5aljv4"}],["path",{d:"M15 2v2",key:"13l42r"}],["path",{d:"M15 20v2",key:"15mkzm"}],["path",{d:"M2 15h2",key:"1gxd5l"}],["path",{d:"M2 9h2",key:"1bbxkp"}],["path",{d:"M20 15h2",key:"19e6y8"}],["path",{d:"M20 9h2",key:"19tzq7"}],["path",{d:"M9 2v2",key:"165o2o"}],["path",{d:"M9 20v2",key:"i2bqo8"}]],$=h("cpu",J);/**
11
+ */const J=[["rect",{width:"16",height:"16",x:"4",y:"4",rx:"2",key:"14l7u7"}],["rect",{width:"6",height:"6",x:"9",y:"9",rx:"1",key:"5aljv4"}],["path",{d:"M15 2v2",key:"13l42r"}],["path",{d:"M15 20v2",key:"15mkzm"}],["path",{d:"M2 15h2",key:"1gxd5l"}],["path",{d:"M2 9h2",key:"1bbxkp"}],["path",{d:"M20 15h2",key:"19e6y8"}],["path",{d:"M20 9h2",key:"19tzq7"}],["path",{d:"M9 2v2",key:"165o2o"}],["path",{d:"M9 20v2",key:"i2bqo8"}]],j=h("cpu",J);/**
12
12
  * @license lucide-react v0.486.0 - ISC
13
13
  *
14
14
  * This source code is licensed under the ISC license.
@@ -28,4 +28,4 @@ import{b as h,I as a,j as e,cR as _,cO as A,c7 as c,gg as O,gh as I,Z as r,gi as
28
28
  *
29
29
  * This source code is licensed under the ISC license.
30
30
  * See the LICENSE file in the root directory of this source tree.
31
- */const ae=[["path",{d:"m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5",key:"ftymec"}],["rect",{x:"2",y:"6",width:"14",height:"12",rx:"2",key:"158x01"}]],R=h("video",ae),ce=({systemStatus:t,expandedSections:n,toggleSection:o})=>a("div",{className:"h-full space-y-3 overflow-y-auto",children:[e("h3",{className:"mb-4 text-sm font-semibold tracking-wide text-gray-400 uppercase",children:"Sensor Information"}),a("div",{className:"space-y-2 pb-4",children:[a("div",{className:"overflow-hidden rounded-lg border border-gray-800",children:[a("button",{onClick:()=>o("lidar2d"),className:"flex w-full items-center justify-between bg-gray-900/50 px-3 py-2 transition-colors hover:bg-gray-900",children:[a("div",{className:"flex items-center gap-2",children:[e(v,{className:"h-4 w-4 text-blue-400"}),e("span",{className:"text-xs font-medium text-gray-300",children:"2D LiDAR"})]}),e(k,{className:`h-4 w-4 text-gray-500 transition-transform ${n.lidar2d?"rotate-180":""}`})]}),n.lidar2d&&e("div",{className:"space-y-1.5 border-t border-gray-800 p-2",children:t.lidar.map(s=>e("div",{className:"rounded bg-gray-900 px-3 py-2",children:a("div",{className:"flex items-center justify-between text-xs",children:[a("div",{className:"flex items-center gap-2",children:[e(v,{className:"h-3.5 w-3.5 text-blue-400"}),a("span",{className:"text-gray-400",children:["LiDAR ",s.index]})]}),a("div",{className:"flex items-center gap-3",children:[a("span",{className:"font-mono text-gray-400",children:[s.pts," pts"]}),a("div",{className:`flex items-center gap-1 ${s.connection?"text-green-400":"text-red-400"}`,children:[e("div",{className:`h-1.5 w-1.5 rounded-full ${s.connection?"bg-green-400":"bg-red-400"}`}),e("span",{children:s.connection?"Online":"Offline"})]})]})]})},s.index))})]}),a("div",{className:"overflow-hidden rounded-lg border border-gray-800",children:[a("button",{onClick:()=>o("lidar3d"),className:"flex w-full items-center justify-between bg-gray-900/50 px-3 py-2 transition-colors hover:bg-gray-900",children:[a("div",{className:"flex items-center gap-2",children:[e(v,{className:"h-4 w-4 text-purple-400"}),e("span",{className:"text-xs font-medium text-gray-300",children:"3D LiDAR"})]}),e(k,{className:`h-4 w-4 text-gray-500 transition-transform ${n.lidar3d?"rotate-180":""}`})]}),n.lidar3d&&e("div",{className:"space-y-1.5 border-t border-gray-800 p-2",children:t.lidar3D.map(s=>e("div",{className:"rounded bg-gray-900 px-3 py-2",children:a("div",{className:"flex items-center justify-between text-xs",children:[a("div",{className:"flex items-center gap-2",children:[e(v,{className:"h-3.5 w-3.5 text-purple-400"}),a("span",{className:"text-gray-400",children:["3D LiDAR ",s.index]})]}),a("div",{className:"flex items-center gap-3",children:[a("span",{className:"font-mono text-gray-400",children:[s.pts," pts"]}),a("div",{className:`flex items-center gap-1 ${s.connection?"text-green-400":"text-red-400"}`,children:[e("div",{className:`h-1.5 w-1.5 rounded-full ${s.connection?"bg-green-400":"bg-red-400"}`}),e("span",{children:s.connection?"Online":"Offline"})]})]})]})},s.index))})]}),a("div",{className:"overflow-hidden rounded-lg border border-gray-800",children:[a("button",{onClick:()=>o("cameras"),className:"flex w-full items-center justify-between bg-gray-900/50 px-3 py-2 transition-colors hover:bg-gray-900",children:[a("div",{className:"flex items-center gap-2",children:[e(R,{className:"h-4 w-4 text-cyan-400"}),e("span",{className:"text-xs font-medium text-gray-300",children:"Cameras"})]}),e(k,{className:`h-4 w-4 text-gray-500 transition-transform ${n.cameras?"rotate-180":""}`})]}),n.cameras&&e("div",{className:"space-y-1.5 border-t border-gray-800 p-2",children:t.cam.map(s=>a("div",{className:"rounded bg-gray-900 px-3 py-2",children:[a("div",{className:"mb-1.5 flex items-center justify-between text-xs",children:[a("div",{className:"flex items-center gap-2",children:[e(R,{className:"h-3.5 w-3.5 text-cyan-400"}),a("span",{className:"text-gray-400",children:["Camera ",s.index]})]}),a("div",{className:`flex items-center gap-1 ${s.connection?"text-green-400":"text-red-400"}`,children:[e("div",{className:`h-1.5 w-1.5 rounded-full ${s.connection?"bg-green-400":"bg-red-400"}`}),e("span",{children:s.connection?"Online":"Offline"})]})]}),a("div",{className:"grid grid-cols-2 gap-2 text-xs text-gray-500",children:[a("div",{children:["RGB: ",s.rgb_w,"×",s.rgb_h]}),a("div",{children:["Depth: ",s.depth_w,"×",s.depth_h]})]})]},s.index))})]})]})]}),ne=({systemStatus:t,expandedSections:n,toggleSection:o})=>{const s=(i,x,f)=>i>=f?"text-red-400":i>=x?"text-yellow-400":"text-green-400";return a("div",{className:"overflow-hidden rounded-lg border border-gray-800",children:[a("button",{onClick:()=>o("systemResources"),className:"flex w-full items-center justify-between bg-gray-900/50 px-3 py-2 transition-colors hover:bg-gray-900",children:[a("div",{className:"flex items-center gap-2",children:[e($,{className:"h-4 w-4 text-blue-400"}),e("span",{className:"text-xs font-medium text-gray-300",children:"System Resources"})]}),e(k,{className:`h-4 w-4 text-gray-500 transition-transform ${n.systemResources?"rotate-180":""}`})]}),n.systemResources&&a("div",{className:"space-y-3 border-t border-gray-800 bg-gray-900 px-3 py-3",children:[a("div",{children:[a("div",{className:"mb-1.5 flex items-center justify-between",children:[a("div",{className:"flex items-center gap-2",children:[e($,{className:"h-3.5 w-3.5 text-blue-400"}),e("span",{className:"text-xs text-gray-400",children:"CPU"})]}),a("span",{className:`font-mono text-sm font-medium ${s(t.cpu,70,85)}`,children:[t.cpu,"%"]})]}),e("div",{className:"h-1.5 w-full rounded-full bg-gray-800",children:e("div",{className:`h-1.5 rounded-full transition-all ${t.cpu>=85?"bg-red-500":t.cpu>=70?"bg-yellow-500":"bg-green-500"}`,style:{width:`${t.cpu}%`}})})]}),a("div",{children:[a("div",{className:"mb-1.5 flex items-center justify-between",children:[a("div",{className:"flex items-center gap-2",children:[e(Z,{className:"h-3.5 w-3.5 text-purple-400"}),e("span",{className:"text-xs text-gray-400",children:"RAM"})]}),a("span",{className:`font-mono text-sm font-medium ${s(t.memory,75,90)}`,children:[t.memory,"%"]})]}),e("div",{className:"h-1.5 w-full rounded-full bg-gray-800",children:e("div",{className:`h-1.5 rounded-full transition-all ${t.memory>=90?"bg-red-500":t.memory>=75?"bg-yellow-500":"bg-green-500"}`,style:{width:`${t.memory}%`}})})]}),a("div",{children:[a("div",{className:"mb-1.5 flex items-center justify-between",children:[a("div",{className:"flex items-center gap-2",children:[e(Q,{className:"h-3.5 w-3.5 text-cyan-400"}),e("span",{className:"text-xs text-gray-400",children:"Storage"})]}),a("span",{className:`font-mono text-sm font-medium ${s(t.disk,80,95)}`,children:[t.disk,"%"]})]}),e("div",{className:"h-1.5 w-full rounded-full bg-gray-800",children:e("div",{className:`h-1.5 rounded-full transition-all ${t.disk>=95?"bg-red-500":t.disk>=80?"bg-yellow-500":"bg-green-500"}`,style:{width:`${t.disk}%`}})})]}),e("div",{children:a("div",{className:"flex items-center justify-between",children:[a("div",{className:"flex items-center gap-2",children:[e(ee,{className:"h-3.5 w-3.5 text-orange-400"}),e("span",{className:"text-xs text-gray-400",children:"CPU Temp"})]}),a("span",{className:`font-mono text-sm font-medium ${s(t.temperature,60,75)}`,children:[t.temperature,"°C"]})]})})]})]})},z=t=>{const n=Math.floor(t/3600).toString().padStart(2,"0"),o=Math.floor(t%3600/60).toString().padStart(2,"0"),s=Math.floor(t%60).toString().padStart(2,"0");return`${n}:${o}:${s}`},ie=({mappingStatus:t="idle",elapsedSeconds:n=0,completedKeyframeCount:o=0,totalKeyframePoints:s=0,onStartMapping:i,onStopMapping:x,onSaveMapping:f,onDiscard:m,mapList:P})=>{const{modal:M}=_(),{t:l}=A(),g=t==="recording",p=t==="stopped"||t==="saving"||t==="discarding",N=t==="saving"||t==="discarding",d=o>0,j=l(d?"move.amr.rightPanel.map.mapping.readyToSave":"move.amr.rightPanel.map.mapping.cannotSaveYet"),b=d?null:l("move.amr.rightPanel.map.mapping.noKeyframeReceived"),C=async()=>{try{await i?.()}catch(y){console.error(y)}},D=async()=>{try{await x?.()}catch(y){console.error(y)}},L=async()=>{await m?.()},S=async y=>f?.(y)??{ok:!1,reason:"save-failed"},T=()=>{M({component:X,props:{onSaveMapping:S,completedKeyframeCount:o,totalKeyframePoints:s,durationSeconds:n,existingMapNames:P}})};return a(c,{className:"h-full overflow-y-auto p-3",children:[!g&&!p&&a(c,{className:"flex-1 items-center gap-1 pt-[4rem]",children:[e(O,{className:"text-fg-brand size-8"}),e("p",{className:"typo-compact-xs-semibold text-fg-brand",children:l("move.amr.rightPanel.map.mapping.readyToMap")}),a("p",{className:"typo-title-02-bold text-fg-default text-center",children:[l("move.amr.rightPanel.map.mapping.clickStartMapping"),e("br",{}),l("move.amr.rightPanel.map.mapping.toBegin")]})]}),g&&a(c,{className:"flex-1 pt-[4rem]",children:[a(c,{className:"items-center gap-1",children:[e(I,{className:"text-fg-danger size-8"}),e("p",{className:"typo-compact-xs-semibold text-fg-danger",children:l("move.amr.rightPanel.map.mapping.recordingActive")}),e("p",{className:"typo-title-02-bold text-fg-default text-center",children:l("move.amr.rightPanel.map.mapping.buildingKeyframes")})]}),a(c,{className:"gap-2 p-3",children:[e("p",{className:"typo-compact-xs2-semibold text-fg-default",children:l("move.amr.rightPanel.map.mapping.captureStatus")}),a(c,{className:"bg-bg-alt-1 gap-1 rounded-md p-2.5",children:[a(r,{className:"items-center justify-between gap-3",children:[e("p",{className:"typo-compact-xs-normal text-fg-subtler",children:l("move.amr.rightPanel.map.mapping.saveStatus")}),e("p",{className:`typo-compact-xs-semibold text-right ${d?"text-fg-success":"text-fg-danger"}`,children:j})]}),b&&e("p",{className:"typo-compact-2xs-normal text-fg-subtler text-right",children:b}),a(r,{className:"items-center justify-between gap-3",children:[e("p",{className:"typo-compact-xs-normal text-fg-subtler",children:l("move.amr.rightPanel.map.mapping.keyframesReceived")}),e("p",{className:"typo-compact-xs-semibold text-fg-default text-right",children:o.toLocaleString()})]}),a(r,{className:"items-center justify-between gap-3",children:[e("p",{className:"typo-compact-xs-normal text-fg-subtler",children:l("move.amr.rightPanel.map.mapping.keyframePoints")}),e("p",{className:"typo-compact-xs-semibold text-fg-default text-right",children:l("move.amr.rightPanel.map.mapping.points",{count:s.toLocaleString()})})]}),a(r,{className:"items-center justify-between gap-3",children:[e("p",{className:"typo-compact-xs-normal text-fg-subtler",children:l("move.amr.rightPanel.task.duration")}),e("p",{className:"typo-compact-xs-semibold text-fg-default text-right",children:z(n)})]})]})]})]}),p&&a(c,{className:"flex-1 pt-[4rem]",children:[a(c,{className:"items-center gap-1",children:[e(q,{className:`${d?"text-fg-success":"text-fg-danger"} size-8`}),e("p",{className:`typo-compact-xs-semibold ${d?"text-fg-success":"text-fg-danger"}`,children:l(d?"move.amr.rightPanel.map.mapping.readyToSaveTitle":"move.amr.rightPanel.map.mapping.noKeyframeCaptured")}),e("p",{className:"typo-title-02-bold text-fg-default text-center",children:l(d?"move.amr.rightPanel.map.mapping.mapReadyToSave":"move.amr.rightPanel.map.mapping.cannotSaveRecording")}),e("p",{className:"typo-compact-xs-normal text-fg-subtler text-center",children:l(d?"move.amr.rightPanel.map.mapping.canSaveAsNewMap":"move.amr.rightPanel.map.mapping.keyframeRequired")})]}),a(c,{className:"gap-2 p-3",children:[e("p",{className:"typo-compact-xs2-semibold text-fg-default",children:l("move.amr.rightPanel.map.mapping.result")}),a(c,{className:"bg-bg-alt-1 gap-1 rounded-md p-2.5",children:[a(r,{className:"items-center justify-between gap-3",children:[e("p",{className:"typo-compact-xs-normal text-fg-subtler",children:l("move.amr.rightPanel.map.mapping.saveStatus")}),e("p",{className:`typo-compact-xs-semibold text-right ${d?"text-fg-success":"text-fg-danger"}`,children:j})]}),b&&e("p",{className:"typo-compact-2xs-normal text-fg-subtler text-right",children:b}),a(r,{className:"items-center justify-between gap-3",children:[e("p",{className:"typo-compact-xs-normal text-fg-subtler",children:l("move.amr.rightPanel.map.mapping.keyframesReceived")}),e("p",{className:"typo-compact-xs-semibold text-fg-default text-right",children:o.toLocaleString()})]}),a(r,{className:"items-center justify-between gap-3",children:[e("p",{className:"typo-compact-xs-normal text-fg-subtler",children:l("move.amr.rightPanel.map.mapping.keyframePoints")}),e("p",{className:"typo-compact-xs-semibold text-fg-default text-right",children:l("move.amr.rightPanel.map.mapping.points",{count:s.toLocaleString()})})]}),a(r,{className:"items-center justify-between gap-3",children:[e("p",{className:"typo-compact-xs-normal text-fg-subtler",children:l("move.amr.rightPanel.task.duration")}),e("p",{className:"typo-compact-xs-semibold text-fg-default text-right",children:z(n)})]})]})]})]}),!p&&a(r,{className:"shrink-0 justify-between gap-2",children:[e(u,{onClick:D,disabled:!g||N,className:"gap-1 px-3.5",leadingIcon:e(F,{}),variant:"danger",children:l("move.amr.rightPanel.common.stop")}),e(u,{onClick:C,disabled:g||N,className:"flex-1 gap-1 px-3.5",variant:"brand",children:l("move.amr.rightPanel.map.mapping.startMapping")})]}),p&&a(c,{className:"shrink-0 gap-2",children:[!d&&e(c,{className:"items-center",children:e("p",{className:"typo-compact-2xs-normal text-fg-danger",children:l("move.amr.rightPanel.map.mapping.keyframeRequired")})}),a(r,{className:"justify-between gap-2",children:[e(u,{onClick:L,disabled:N,className:"gap-1 px-3.5",children:l(t==="discarding"?"move.amr.rightPanel.map.mapping.discarding":"move.amr.rightPanel.common.discard")}),e(u,{onClick:T,disabled:!d||N,className:"flex-1 gap-1 px-3.5",variant:"brand",children:l(t==="saving"?"move.amr.rightPanel.common.saving":"move.amr.rightPanel.common.save")})]})]})]})},te=()=>({GOAL:0,ROUTE:0,ALIGN:0}),se=t=>t>=1e6?`${(t/1e6).toFixed(1)}M`:t>=1e3?`${(t/1e3).toFixed(1)}K`:`${t}`,w=t=>`${t<0?"-":"+"}${Math.abs(t).toFixed(1)}m`,me=({currentMapName:t,createdAt:n,lastModified:o,mapCloudCount:s,mapBounds:i,topologyCount:x,nodeTypeCounts:f})=>{const{t:m}=A(),P=i?`${w(i.minX)} ~ ${w(i.maxX)}`:"--",M=i?`${w(i.minY)} ~ ${w(i.maxY)}`:"--",l=i?Math.abs(i.maxX-i.minX)*Math.abs(i.maxY-i.minY):null,g=l===null?"--":`${l.toFixed(1)} m²`,p=f??te();return a(c,{className:"items-start overflow-y-auto",children:[a(c,{className:"border-border-subtler w-full gap-1.5 border-b-[1px] p-3",children:[a(c,{className:"gap-0.5 self-stretch",children:[e("p",{className:"typo-compact-xs2-normal text-fg-subtle",children:m("move.amr.rightPanel.map.info.mapName")}),e("p",{className:"typo-compact-md-semibold text-fg-default",children:t})]}),a(c,{className:"items-start gap-1 self-stretch",children:[a(r,{className:"items-center justify-between self-stretch",children:[e("p",{className:"typo-compact-xs-normal text-fg-subtler",children:m("move.amr.rightPanel.common.created")}),e("p",{className:"typo-compact-xs-normal text-fg-subtle",children:n??"--"})]}),a(r,{className:"items-center justify-between self-stretch",children:[e("p",{className:"typo-compact-xs-normal text-fg-subtler",children:m("move.amr.rightPanel.map.info.lastModified")}),e("p",{className:"typo-compact-xs-normal text-fg-subtle",children:o??"--"})]})]})]}),a(c,{className:"border-border-subtler w-full gap-2 border-b-[1px] p-3",children:[e("p",{className:"typo-compact-md-semibold text-fg-default",children:m("move.amr.rightPanel.map.info.statistics")}),a(r,{className:"items-center justify-between self-stretch",children:[a(r,{className:"items-center gap-[6px]",children:[e("div",{className:"bg-fill-subtler flex size-6 items-center justify-center rounded-full",children:e(G,{className:"text-fg-subtle size-4"})}),e("p",{className:"typo-compact-xs2-normal text-fg-subtle",children:m("move.amr.rightPanel.map.info.nodes")})]}),e("p",{className:"typo-compact-xs2-normal text-fg-default",children:x})]}),a(r,{className:"items-center justify-between self-stretch",children:[e(r,{children:a(r,{className:"items-center gap-[6px]",children:[e("div",{className:"bg-fill-subtler flex size-6 items-center justify-center rounded-full",children:e(U,{className:"text-fg-subtle size-4"})}),e("p",{className:"typo-compact-xs2-normal text-fg-subtle",children:m("move.amr.rightPanel.map.info.pointCloud")})]})}),a("p",{className:"typo-compact-xs2-normal text-fg-default",children:[se(s)," pts"]})]})]}),a(c,{className:"border-border-subtler w-full gap-2 border-b-[1px] p-3",children:[e("p",{className:"typo-compact-md-semibold text-fg-default",children:m("move.amr.rightPanel.map.info.mapBoundaries")}),a(r,{className:"items-center justify-between self-stretch",children:[e(r,{className:"items-center gap-[6px]",children:e("p",{className:"typo-compact-xs2-normal text-fg-subtle",children:m("move.amr.rightPanel.map.info.xRange")})}),e("p",{className:"typo-compact-xs2-normal text-fg-default",children:P})]}),a(r,{className:"items-center justify-between self-stretch",children:[e(r,{children:e(r,{className:"items-center gap-[6px]",children:e("p",{className:"typo-compact-xs2-normal text-fg-subtle",children:m("move.amr.rightPanel.map.info.yRange")})})}),e("p",{className:"typo-compact-xs2-normal text-fg-default",children:M})]}),a(r,{className:"items-center justify-between self-stretch",children:[e(r,{className:"items-center gap-[6px]",children:e("p",{className:"typo-compact-xs2-normal text-fg-subtle",children:m("move.amr.rightPanel.map.info.totalArea")})}),e("p",{className:"typo-compact-xs2-normal text-fg-default",children:g})]})]}),a(c,{className:"border-border-subtler w-full gap-2 border-b-[1px] p-3",children:[e("p",{className:"typo-compact-md-semibold text-fg-default",children:m("move.amr.rightPanel.menu.topology")}),a(r,{className:"items-center justify-between self-stretch",children:[a(r,{className:"items-center gap-[6px]",children:[e("div",{className:"bg-fill-warning-subtler flex size-6 items-center justify-center rounded-full",children:e(V,{className:"text-fg-warning size-4"})}),e("p",{className:"typo-compact-xs2-normal text-fg-subtle",children:m("move.amr.rightPanel.topology.nodeType.goal")})]}),e("p",{className:"typo-compact-xs2-normal text-fg-default",children:p.GOAL})]}),a(r,{className:"items-center justify-between self-stretch",children:[e(r,{children:a(r,{className:"items-center gap-[6px]",children:[e("div",{className:"bg-fill-brand-subtler flex size-6 items-center justify-center rounded-full",children:e(Y,{className:"text-fg-brand size-4"})}),e("p",{className:"typo-compact-xs2-normal text-fg-subtle",children:m("move.amr.rightPanel.topology.nodeType.route")})]})}),e("p",{className:"typo-compact-xs2-normal text-fg-default",children:p.ROUTE})]}),a(r,{className:"items-center justify-between self-stretch",children:[a(r,{className:"items-center gap-[6px]",children:[e("div",{className:"bg-fill-success-subtler flex size-6 items-center justify-center rounded-full",children:e(H,{className:"text-fg-success size-4"})}),e("p",{className:"typo-compact-xs2-normal text-fg-subtle",children:m("move.amr.rightPanel.topology.nodeType.align")})]}),e("p",{className:"typo-compact-xs2-normal text-fg-default",children:p.ALIGN})]})]})]})};export{me as M,ne as S,ie as a,ce as b};
31
+ */const ae=[["path",{d:"m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5",key:"ftymec"}],["rect",{x:"2",y:"6",width:"14",height:"12",rx:"2",key:"158x01"}]],R=h("video",ae),ce=({systemStatus:t,expandedSections:n,toggleSection:o})=>a("div",{className:"h-full space-y-3 overflow-y-auto",children:[e("h3",{className:"mb-4 text-sm font-semibold tracking-wide text-gray-400 uppercase",children:"Sensor Information"}),a("div",{className:"space-y-2 pb-4",children:[a("div",{className:"overflow-hidden rounded-lg border border-gray-800",children:[a("button",{onClick:()=>o("lidar2d"),className:"flex w-full items-center justify-between bg-gray-900/50 px-3 py-2 transition-colors hover:bg-gray-900",children:[a("div",{className:"flex items-center gap-2",children:[e(v,{className:"h-4 w-4 text-blue-400"}),e("span",{className:"text-xs font-medium text-gray-300",children:"2D LiDAR"})]}),e(k,{className:`h-4 w-4 text-gray-500 transition-transform ${n.lidar2d?"rotate-180":""}`})]}),n.lidar2d&&e("div",{className:"space-y-1.5 border-t border-gray-800 p-2",children:t.lidar.map(s=>e("div",{className:"rounded bg-gray-900 px-3 py-2",children:a("div",{className:"flex items-center justify-between text-xs",children:[a("div",{className:"flex items-center gap-2",children:[e(v,{className:"h-3.5 w-3.5 text-blue-400"}),a("span",{className:"text-gray-400",children:["LiDAR ",s.index]})]}),a("div",{className:"flex items-center gap-3",children:[a("span",{className:"font-mono text-gray-400",children:[s.pts," pts"]}),a("div",{className:`flex items-center gap-1 ${s.connection?"text-green-400":"text-red-400"}`,children:[e("div",{className:`h-1.5 w-1.5 rounded-full ${s.connection?"bg-green-400":"bg-red-400"}`}),e("span",{children:s.connection?"Online":"Offline"})]})]})]})},s.index))})]}),a("div",{className:"overflow-hidden rounded-lg border border-gray-800",children:[a("button",{onClick:()=>o("lidar3d"),className:"flex w-full items-center justify-between bg-gray-900/50 px-3 py-2 transition-colors hover:bg-gray-900",children:[a("div",{className:"flex items-center gap-2",children:[e(v,{className:"h-4 w-4 text-purple-400"}),e("span",{className:"text-xs font-medium text-gray-300",children:"3D LiDAR"})]}),e(k,{className:`h-4 w-4 text-gray-500 transition-transform ${n.lidar3d?"rotate-180":""}`})]}),n.lidar3d&&e("div",{className:"space-y-1.5 border-t border-gray-800 p-2",children:t.lidar3D.map(s=>e("div",{className:"rounded bg-gray-900 px-3 py-2",children:a("div",{className:"flex items-center justify-between text-xs",children:[a("div",{className:"flex items-center gap-2",children:[e(v,{className:"h-3.5 w-3.5 text-purple-400"}),a("span",{className:"text-gray-400",children:["3D LiDAR ",s.index]})]}),a("div",{className:"flex items-center gap-3",children:[a("span",{className:"font-mono text-gray-400",children:[s.pts," pts"]}),a("div",{className:`flex items-center gap-1 ${s.connection?"text-green-400":"text-red-400"}`,children:[e("div",{className:`h-1.5 w-1.5 rounded-full ${s.connection?"bg-green-400":"bg-red-400"}`}),e("span",{children:s.connection?"Online":"Offline"})]})]})]})},s.index))})]}),a("div",{className:"overflow-hidden rounded-lg border border-gray-800",children:[a("button",{onClick:()=>o("cameras"),className:"flex w-full items-center justify-between bg-gray-900/50 px-3 py-2 transition-colors hover:bg-gray-900",children:[a("div",{className:"flex items-center gap-2",children:[e(R,{className:"h-4 w-4 text-cyan-400"}),e("span",{className:"text-xs font-medium text-gray-300",children:"Cameras"})]}),e(k,{className:`h-4 w-4 text-gray-500 transition-transform ${n.cameras?"rotate-180":""}`})]}),n.cameras&&e("div",{className:"space-y-1.5 border-t border-gray-800 p-2",children:t.cam.map(s=>a("div",{className:"rounded bg-gray-900 px-3 py-2",children:[a("div",{className:"mb-1.5 flex items-center justify-between text-xs",children:[a("div",{className:"flex items-center gap-2",children:[e(R,{className:"h-3.5 w-3.5 text-cyan-400"}),a("span",{className:"text-gray-400",children:["Camera ",s.index]})]}),a("div",{className:`flex items-center gap-1 ${s.connection?"text-green-400":"text-red-400"}`,children:[e("div",{className:`h-1.5 w-1.5 rounded-full ${s.connection?"bg-green-400":"bg-red-400"}`}),e("span",{children:s.connection?"Online":"Offline"})]})]}),a("div",{className:"grid grid-cols-2 gap-2 text-xs text-gray-500",children:[a("div",{children:["RGB: ",s.rgb_w,"×",s.rgb_h]}),a("div",{children:["Depth: ",s.depth_w,"×",s.depth_h]})]})]},s.index))})]})]})]}),ne=({systemStatus:t,expandedSections:n,toggleSection:o})=>{const s=(i,x,f)=>i>=f?"text-red-400":i>=x?"text-yellow-400":"text-green-400";return a("div",{className:"overflow-hidden rounded-lg border border-gray-800",children:[a("button",{onClick:()=>o("systemResources"),className:"flex w-full items-center justify-between bg-gray-900/50 px-3 py-2 transition-colors hover:bg-gray-900",children:[a("div",{className:"flex items-center gap-2",children:[e(j,{className:"h-4 w-4 text-blue-400"}),e("span",{className:"text-xs font-medium text-gray-300",children:"System Resources"})]}),e(k,{className:`h-4 w-4 text-gray-500 transition-transform ${n.systemResources?"rotate-180":""}`})]}),n.systemResources&&a("div",{className:"space-y-3 border-t border-gray-800 bg-gray-900 px-3 py-3",children:[a("div",{children:[a("div",{className:"mb-1.5 flex items-center justify-between",children:[a("div",{className:"flex items-center gap-2",children:[e(j,{className:"h-3.5 w-3.5 text-blue-400"}),e("span",{className:"text-xs text-gray-400",children:"CPU"})]}),a("span",{className:`font-mono text-sm font-medium ${s(t.cpu,70,85)}`,children:[t.cpu,"%"]})]}),e("div",{className:"h-1.5 w-full rounded-full bg-gray-800",children:e("div",{className:`h-1.5 rounded-full transition-all ${t.cpu>=85?"bg-red-500":t.cpu>=70?"bg-yellow-500":"bg-green-500"}`,style:{width:`${t.cpu}%`}})})]}),a("div",{children:[a("div",{className:"mb-1.5 flex items-center justify-between",children:[a("div",{className:"flex items-center gap-2",children:[e(Z,{className:"h-3.5 w-3.5 text-purple-400"}),e("span",{className:"text-xs text-gray-400",children:"RAM"})]}),a("span",{className:`font-mono text-sm font-medium ${s(t.memory,75,90)}`,children:[t.memory,"%"]})]}),e("div",{className:"h-1.5 w-full rounded-full bg-gray-800",children:e("div",{className:`h-1.5 rounded-full transition-all ${t.memory>=90?"bg-red-500":t.memory>=75?"bg-yellow-500":"bg-green-500"}`,style:{width:`${t.memory}%`}})})]}),a("div",{children:[a("div",{className:"mb-1.5 flex items-center justify-between",children:[a("div",{className:"flex items-center gap-2",children:[e(Q,{className:"h-3.5 w-3.5 text-cyan-400"}),e("span",{className:"text-xs text-gray-400",children:"Storage"})]}),a("span",{className:`font-mono text-sm font-medium ${s(t.disk,80,95)}`,children:[t.disk,"%"]})]}),e("div",{className:"h-1.5 w-full rounded-full bg-gray-800",children:e("div",{className:`h-1.5 rounded-full transition-all ${t.disk>=95?"bg-red-500":t.disk>=80?"bg-yellow-500":"bg-green-500"}`,style:{width:`${t.disk}%`}})})]}),e("div",{children:a("div",{className:"flex items-center justify-between",children:[a("div",{className:"flex items-center gap-2",children:[e(ee,{className:"h-3.5 w-3.5 text-orange-400"}),e("span",{className:"text-xs text-gray-400",children:"CPU Temp"})]}),a("span",{className:`font-mono text-sm font-medium ${s(t.temperature,60,75)}`,children:[t.temperature,"°C"]})]})})]})]})},z=t=>{const n=Math.floor(t/3600).toString().padStart(2,"0"),o=Math.floor(t%3600/60).toString().padStart(2,"0"),s=Math.floor(t%60).toString().padStart(2,"0");return`${n}:${o}:${s}`},ie=({mappingStatus:t="idle",elapsedSeconds:n=0,completedKeyframeCount:o=0,totalKeyframePoints:s=0,onStartMapping:i,onStopMapping:x,onSaveMapping:f,onDiscard:m,mapList:P})=>{const{modal:M}=_(),{t:l}=A(),g=t==="recording",p=t==="stopped"||t==="saving"||t==="discarding",N=t==="saving"||t==="discarding",d=o>0,$=l(d?"move.amr.rightPanel.map.mapping.readyToSave":"move.amr.rightPanel.map.mapping.cannotSaveYet"),b=d?null:l("move.amr.rightPanel.map.mapping.noKeyframeReceived"),C=async()=>{try{await i?.()}catch(y){console.error(y)}},D=async()=>{try{await x?.()}catch(y){console.error(y)}},L=async()=>{await m?.()},S=async y=>f?.(y)??{ok:!1,reason:"save-failed"},T=()=>{M({component:X,props:{onSaveMapping:S,completedKeyframeCount:o,totalKeyframePoints:s,durationSeconds:n,existingMapNames:P}})};return a(c,{className:"h-full overflow-y-auto p-3",children:[!g&&!p&&a(c,{className:"flex-1 items-center gap-1 pt-[4rem]",children:[e(O,{className:"text-fg-brand size-8"}),e("p",{className:"typo-compact-xs-semibold text-fg-brand",children:l("move.amr.rightPanel.map.mapping.readyToMap")}),a("p",{className:"typo-title-02-bold text-fg-default text-center",children:[l("move.amr.rightPanel.map.mapping.clickStartMapping"),e("br",{}),l("move.amr.rightPanel.map.mapping.toBegin")]})]}),g&&a(c,{className:"flex-1 pt-[4rem]",children:[a(c,{className:"items-center gap-1",children:[e(I,{className:"text-fg-danger size-8"}),e("p",{className:"typo-compact-xs-semibold text-fg-danger",children:l("move.amr.rightPanel.map.mapping.recordingActive")}),e("p",{className:"typo-title-02-bold text-fg-default text-center",children:l("move.amr.rightPanel.map.mapping.buildingKeyframes")})]}),a(c,{className:"gap-2 p-3",children:[e("p",{className:"typo-compact-xs2-semibold text-fg-default",children:l("move.amr.rightPanel.map.mapping.captureStatus")}),a(c,{className:"bg-bg-alt-1 gap-1 rounded-md p-2.5",children:[a(r,{className:"items-center justify-between gap-3",children:[e("p",{className:"typo-compact-xs-normal text-fg-subtler",children:l("move.amr.rightPanel.map.mapping.saveStatus")}),e("p",{className:`typo-compact-xs-semibold text-right ${d?"text-fg-success":"text-fg-danger"}`,children:$})]}),b&&e("p",{className:"typo-compact-2xs-normal text-fg-subtler text-right",children:b}),a(r,{className:"items-center justify-between gap-3",children:[e("p",{className:"typo-compact-xs-normal text-fg-subtler",children:l("move.amr.rightPanel.map.mapping.keyframesReceived")}),e("p",{className:"typo-compact-xs-semibold text-fg-default text-right",children:o.toLocaleString()})]}),a(r,{className:"items-center justify-between gap-3",children:[e("p",{className:"typo-compact-xs-normal text-fg-subtler",children:l("move.amr.rightPanel.map.mapping.keyframePoints")}),e("p",{className:"typo-compact-xs-semibold text-fg-default text-right",children:l("move.amr.rightPanel.map.mapping.points",{count:s.toLocaleString()})})]}),a(r,{className:"items-center justify-between gap-3",children:[e("p",{className:"typo-compact-xs-normal text-fg-subtler",children:l("move.amr.rightPanel.task.duration")}),e("p",{className:"typo-compact-xs-semibold text-fg-default text-right",children:z(n)})]})]})]})]}),p&&a(c,{className:"flex-1 pt-[4rem]",children:[a(c,{className:"items-center gap-1",children:[e(q,{className:`${d?"text-fg-success":"text-fg-danger"} size-8`}),e("p",{className:`typo-compact-xs-semibold ${d?"text-fg-success":"text-fg-danger"}`,children:l(d?"move.amr.rightPanel.map.mapping.readyToSaveTitle":"move.amr.rightPanel.map.mapping.noKeyframeCaptured")}),e("p",{className:"typo-title-02-bold text-fg-default text-center",children:l(d?"move.amr.rightPanel.map.mapping.mapReadyToSave":"move.amr.rightPanel.map.mapping.cannotSaveRecording")}),e("p",{className:"typo-compact-xs-normal text-fg-subtler text-center",children:l(d?"move.amr.rightPanel.map.mapping.canSaveAsNewMap":"move.amr.rightPanel.map.mapping.keyframeRequired")})]}),a(c,{className:"gap-2 p-3",children:[e("p",{className:"typo-compact-xs2-semibold text-fg-default",children:l("move.amr.rightPanel.map.mapping.result")}),a(c,{className:"bg-bg-alt-1 gap-1 rounded-md p-2.5",children:[a(r,{className:"items-center justify-between gap-3",children:[e("p",{className:"typo-compact-xs-normal text-fg-subtler",children:l("move.amr.rightPanel.map.mapping.saveStatus")}),e("p",{className:`typo-compact-xs-semibold text-right ${d?"text-fg-success":"text-fg-danger"}`,children:$})]}),b&&e("p",{className:"typo-compact-2xs-normal text-fg-subtler text-right",children:b}),a(r,{className:"items-center justify-between gap-3",children:[e("p",{className:"typo-compact-xs-normal text-fg-subtler",children:l("move.amr.rightPanel.map.mapping.keyframesReceived")}),e("p",{className:"typo-compact-xs-semibold text-fg-default text-right",children:o.toLocaleString()})]}),a(r,{className:"items-center justify-between gap-3",children:[e("p",{className:"typo-compact-xs-normal text-fg-subtler",children:l("move.amr.rightPanel.map.mapping.keyframePoints")}),e("p",{className:"typo-compact-xs-semibold text-fg-default text-right",children:l("move.amr.rightPanel.map.mapping.points",{count:s.toLocaleString()})})]}),a(r,{className:"items-center justify-between gap-3",children:[e("p",{className:"typo-compact-xs-normal text-fg-subtler",children:l("move.amr.rightPanel.task.duration")}),e("p",{className:"typo-compact-xs-semibold text-fg-default text-right",children:z(n)})]})]})]})]}),!p&&a(r,{className:"shrink-0 justify-between gap-2",children:[e(u,{onClick:D,disabled:!g||N,className:"gap-1 px-3.5",leadingIcon:e(F,{}),variant:"danger",children:l("move.amr.rightPanel.common.stop")}),e(u,{onClick:C,disabled:g||N,className:"flex-1 gap-1 px-3.5",variant:"brand",children:l("move.amr.rightPanel.map.mapping.startMapping")})]}),p&&a(c,{className:"shrink-0 gap-2",children:[!d&&e(c,{className:"items-center",children:e("p",{className:"typo-compact-2xs-normal text-fg-danger",children:l("move.amr.rightPanel.map.mapping.keyframeRequired")})}),a(r,{className:"justify-between gap-2",children:[e(u,{onClick:L,disabled:N,className:"gap-1 px-3.5",children:l(t==="discarding"?"move.amr.rightPanel.map.mapping.discarding":"move.amr.rightPanel.common.discard")}),e(u,{onClick:T,disabled:!d||N,className:"flex-1 gap-1 px-3.5",variant:"brand",children:l(t==="saving"?"move.amr.rightPanel.common.saving":"move.amr.rightPanel.common.save")})]})]})]})},te=()=>({GOAL:0,ROUTE:0,ALIGN:0}),se=t=>t>=1e6?`${(t/1e6).toFixed(1)}M`:t>=1e3?`${(t/1e3).toFixed(1)}K`:`${t}`,w=t=>`${t<0?"-":"+"}${Math.abs(t).toFixed(1)}m`,me=({currentMapName:t,createdAt:n,lastModified:o,mapCloudCount:s,mapBounds:i,topologyCount:x,nodeTypeCounts:f})=>{const{t:m}=A(),P=i?`${w(i.minX)} ~ ${w(i.maxX)}`:"--",M=i?`${w(i.minY)} ~ ${w(i.maxY)}`:"--",l=i?Math.abs(i.maxX-i.minX)*Math.abs(i.maxY-i.minY):null,g=l===null?"--":`${l.toFixed(1)} m²`,p=f??te();return a(c,{className:"items-start overflow-y-auto",children:[a(c,{className:"border-border-subtler w-full gap-1.5 border-b-[1px] p-3",children:[a(c,{className:"gap-0.5 self-stretch",children:[e("p",{className:"typo-compact-xs2-normal text-fg-subtle",children:m("move.amr.rightPanel.map.info.mapName")}),e("p",{className:"typo-compact-md-semibold text-fg-default",children:t})]}),a(c,{className:"items-start gap-1 self-stretch",children:[a(r,{className:"items-center justify-between self-stretch",children:[e("p",{className:"typo-compact-xs-normal text-fg-subtler",children:m("move.amr.rightPanel.common.created")}),e("p",{className:"typo-compact-xs-normal text-fg-subtle",children:n??"--"})]}),a(r,{className:"items-center justify-between self-stretch",children:[e("p",{className:"typo-compact-xs-normal text-fg-subtler",children:m("move.amr.rightPanel.map.info.lastModified")}),e("p",{className:"typo-compact-xs-normal text-fg-subtle",children:o??"--"})]})]})]}),a(c,{className:"border-border-subtler w-full gap-2 border-b-[1px] p-3",children:[e("p",{className:"typo-compact-md-semibold text-fg-default",children:m("move.amr.rightPanel.map.info.statistics")}),a(r,{className:"items-center justify-between self-stretch",children:[a(r,{className:"items-center gap-[6px]",children:[e("div",{className:"bg-fill-subtler flex size-6 items-center justify-center rounded-full",children:e(G,{className:"text-fg-subtle size-4"})}),e("p",{className:"typo-compact-xs2-normal text-fg-subtle",children:m("move.amr.rightPanel.map.info.nodes")})]}),e("p",{className:"typo-compact-xs2-normal text-fg-default",children:x})]}),a(r,{className:"items-center justify-between self-stretch",children:[e(r,{children:a(r,{className:"items-center gap-[6px]",children:[e("div",{className:"bg-fill-subtler flex size-6 items-center justify-center rounded-full",children:e(H,{className:"text-fg-subtle size-4"})}),e("p",{className:"typo-compact-xs2-normal text-fg-subtle",children:m("move.amr.rightPanel.map.info.pointCloud")})]})}),a("p",{className:"typo-compact-xs2-normal text-fg-default",children:[se(s)," pts"]})]})]}),a(c,{className:"border-border-subtler w-full gap-2 border-b-[1px] p-3",children:[e("p",{className:"typo-compact-md-semibold text-fg-default",children:m("move.amr.rightPanel.map.info.mapBoundaries")}),a(r,{className:"items-center justify-between self-stretch",children:[e(r,{className:"items-center gap-[6px]",children:e("p",{className:"typo-compact-xs2-normal text-fg-subtle",children:m("move.amr.rightPanel.map.info.xRange")})}),e("p",{className:"typo-compact-xs2-normal text-fg-default",children:P})]}),a(r,{className:"items-center justify-between self-stretch",children:[e(r,{children:e(r,{className:"items-center gap-[6px]",children:e("p",{className:"typo-compact-xs2-normal text-fg-subtle",children:m("move.amr.rightPanel.map.info.yRange")})})}),e("p",{className:"typo-compact-xs2-normal text-fg-default",children:M})]}),a(r,{className:"items-center justify-between self-stretch",children:[e(r,{className:"items-center gap-[6px]",children:e("p",{className:"typo-compact-xs2-normal text-fg-subtle",children:m("move.amr.rightPanel.map.info.totalArea")})}),e("p",{className:"typo-compact-xs2-normal text-fg-default",children:g})]})]}),a(c,{className:"border-border-subtler w-full gap-2 border-b-[1px] p-3",children:[e("p",{className:"typo-compact-md-semibold text-fg-default",children:m("move.amr.rightPanel.menu.topology")}),a(r,{className:"items-center justify-between self-stretch",children:[a(r,{className:"items-center gap-[6px]",children:[e("div",{className:"bg-fill-warning-subtler flex size-6 items-center justify-center rounded-full",children:e(U,{className:"text-fg-warning size-4"})}),e("p",{className:"typo-compact-xs2-normal text-fg-subtle",children:m("move.amr.rightPanel.topology.nodeType.goal")})]}),e("p",{className:"typo-compact-xs2-normal text-fg-default",children:p.GOAL})]}),a(r,{className:"items-center justify-between self-stretch",children:[e(r,{children:a(r,{className:"items-center gap-[6px]",children:[e("div",{className:"bg-fill-brand-subtler flex size-6 items-center justify-center rounded-full",children:e(V,{className:"text-fg-brand size-4"})}),e("p",{className:"typo-compact-xs2-normal text-fg-subtle",children:m("move.amr.rightPanel.topology.nodeType.route")})]})}),e("p",{className:"typo-compact-xs2-normal text-fg-default",children:p.ROUTE})]}),a(r,{className:"items-center justify-between self-stretch",children:[a(r,{className:"items-center gap-[6px]",children:[e("div",{className:"bg-fill-success-subtler flex size-6 items-center justify-center rounded-full",children:e(Y,{className:"text-fg-success size-4"})}),e("p",{className:"typo-compact-xs2-normal text-fg-subtle",children:m("move.amr.rightPanel.topology.nodeType.align")})]}),e("p",{className:"typo-compact-xs2-normal text-fg-default",children:p.ALIGN})]})]})]})};export{me as M,ne as S,ie as a,ce as b};