@rainbow-robotics/preview-host 1.3.7 → 1.3.8-dev.1

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 (31) hide show
  1. package/dist/assets/{AmrCapabilityControl.BrB4gWci.js → AmrCapabilityControl.BAps9Fut.js} +1 -1
  2. package/dist/assets/{RbLocalizationProvider.CMEaJz_8.js → RbLocalizationProvider.B7Bh14fV.js} +57 -57
  3. package/dist/assets/{__federation_expose_App.BtK24QCB.js → __federation_expose_App.Ma7jWSMa.js} +279 -278
  4. package/dist/assets/__federation_fn_import.DdkEuT6t.js +2 -2
  5. package/dist/assets/{cssMode.EEbNlNtF.js → cssMode.Bx1AS1ki.js} +1 -1
  6. package/dist/assets/{freemarker2.CnBD5I4p.js → freemarker2.yPNd4iXD.js} +1 -1
  7. package/dist/assets/{handlebars.COGiavr-.js → handlebars.j6UqHXBb.js} +1 -1
  8. package/dist/assets/{html.BigkG63T.js → html.JqCJygQK.js} +1 -1
  9. package/dist/assets/{htmlMode.BFqQcR9K.js → htmlMode.C3UsLoMz.js} +1 -1
  10. package/dist/assets/{index.1gxtOcyM.js → index.BJrUsx1S.js} +1 -1
  11. package/dist/assets/index.CW3oseNp.js +26 -0
  12. package/dist/assets/index.D4h_0ByO.js +1 -0
  13. package/dist/assets/{javascript.CmJH3eOS.js → javascript.CxhBIqcn.js} +1 -1
  14. package/dist/assets/{jsonMode.XZLue_kY.js → jsonMode.BvFn5PJt.js} +1 -1
  15. package/dist/assets/{liquid.kUSJggwm.js → liquid.Cm5RhUFb.js} +1 -1
  16. package/dist/assets/{lspLanguageFeatures.DgJgA_Mi.js → lspLanguageFeatures.DWBW8ds6.js} +1 -1
  17. package/dist/assets/{mdx.DuUa6LG4.js → mdx.CCb8QbhY.js} +1 -1
  18. package/dist/assets/{python.4mFHFFoP.js → python.DqHGQzec.js} +1 -1
  19. package/dist/assets/{razor.CVLwv3TS.js → razor.DtP5tMgs.js} +1 -1
  20. package/dist/assets/remoteEntry.js +1 -1
  21. package/dist/assets/{tsMode.CXJykgGy.js → tsMode.B9KwTenp.js} +1 -1
  22. package/dist/assets/{typescript.DgyEkW4L.js → typescript.DGs-FHa-.js} +1 -1
  23. package/dist/assets/useFileDownload.VuLHDihC.js +4753 -0
  24. package/dist/assets/{xml.BEm17y6w.js → xml.SZDzlcdE.js} +1 -1
  25. package/dist/assets/{yaml.CEKLGBGL.js → yaml.CALYbTTW.js} +1 -1
  26. package/dist/index.html +5 -5
  27. package/package.json +1 -1
  28. package/serve.mjs +8 -2
  29. package/dist/assets/index.BFyW4OKK.js +0 -1
  30. package/dist/assets/index.D7QGPpBS.js +0 -26
  31. package/dist/assets/useFileDownload.BFL8lywd.js +0 -4753
@@ -1 +1 @@
1
- import{l as e}from"./__federation_expose_App.BtK24QCB.js";const n={comments:{blockComment:["<!--","-->"]},brackets:[["<",">"]],autoClosingPairs:[{open:"<",close:">"},{open:"'",close:"'"},{open:'"',close:'"'}],surroundingPairs:[{open:"<",close:">"},{open:"'",close:"'"},{open:'"',close:'"'}],onEnterRules:[{beforeText:new RegExp("<([_:\\w][_:\\w-.\\d]*)([^/>]*(?!/)>)[^<]*$","i"),afterText:/^<\/([_:\w][_:\w-.\d]*)\s*>$/i,action:{indentAction:e.IndentAction.IndentOutdent}},{beforeText:new RegExp("<(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$","i"),action:{indentAction:e.IndentAction.Indent}}]},o={defaultToken:"",tokenPostfix:".xml",ignoreCase:!0,qualifiedName:/(?:[\w\.\-]+:)?[\w\.\-]+/,tokenizer:{root:[[/[^<&]+/,""],{include:"@whitespace"},[/(<)(@qualifiedName)/,[{token:"delimiter"},{token:"tag",next:"@tag"}]],[/(<\/)(@qualifiedName)(\s*)(>)/,[{token:"delimiter"},{token:"tag"},"",{token:"delimiter"}]],[/(<\?)(@qualifiedName)/,[{token:"delimiter"},{token:"metatag",next:"@tag"}]],[/(<\!)(@qualifiedName)/,[{token:"delimiter"},{token:"metatag",next:"@tag"}]],[/<\!\[CDATA\[/,{token:"delimiter.cdata",next:"@cdata"}],[/&\w+;/,"string.escape"]],cdata:[[/[^\]]+/,""],[/\]\]>/,{token:"delimiter.cdata",next:"@pop"}],[/\]/,""]],tag:[[/[ \t\r\n]+/,""],[/(@qualifiedName)(\s*=\s*)("[^"]*"|'[^']*')/,["attribute.name","","attribute.value"]],[/(@qualifiedName)(\s*=\s*)("[^">?\/]*|'[^'>?\/]*)(?=[\?\/]\>)/,["attribute.name","","attribute.value"]],[/(@qualifiedName)(\s*=\s*)("[^">]*|'[^'>]*)/,["attribute.name","","attribute.value"]],[/@qualifiedName/,"attribute.name"],[/\?>/,{token:"delimiter",next:"@pop"}],[/(\/)(>)/,[{token:"tag"},{token:"delimiter",next:"@pop"}]],[/>/,{token:"delimiter",next:"@pop"}]],whitespace:[[/[ \t\r\n]+/,""],[/<!--/,{token:"comment",next:"@comment"}]],comment:[[/[^<\-]+/,"comment.content"],[/-->/,{token:"comment",next:"@pop"}],[/<!--/,"comment.content.invalid"],[/[<\-]/,"comment.content"]]}};export{n as conf,o as language};
1
+ import{l as e}from"./__federation_expose_App.Ma7jWSMa.js";const n={comments:{blockComment:["<!--","-->"]},brackets:[["<",">"]],autoClosingPairs:[{open:"<",close:">"},{open:"'",close:"'"},{open:'"',close:'"'}],surroundingPairs:[{open:"<",close:">"},{open:"'",close:"'"},{open:'"',close:'"'}],onEnterRules:[{beforeText:new RegExp("<([_:\\w][_:\\w-.\\d]*)([^/>]*(?!/)>)[^<]*$","i"),afterText:/^<\/([_:\w][_:\w-.\d]*)\s*>$/i,action:{indentAction:e.IndentAction.IndentOutdent}},{beforeText:new RegExp("<(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$","i"),action:{indentAction:e.IndentAction.Indent}}]},o={defaultToken:"",tokenPostfix:".xml",ignoreCase:!0,qualifiedName:/(?:[\w\.\-]+:)?[\w\.\-]+/,tokenizer:{root:[[/[^<&]+/,""],{include:"@whitespace"},[/(<)(@qualifiedName)/,[{token:"delimiter"},{token:"tag",next:"@tag"}]],[/(<\/)(@qualifiedName)(\s*)(>)/,[{token:"delimiter"},{token:"tag"},"",{token:"delimiter"}]],[/(<\?)(@qualifiedName)/,[{token:"delimiter"},{token:"metatag",next:"@tag"}]],[/(<\!)(@qualifiedName)/,[{token:"delimiter"},{token:"metatag",next:"@tag"}]],[/<\!\[CDATA\[/,{token:"delimiter.cdata",next:"@cdata"}],[/&\w+;/,"string.escape"]],cdata:[[/[^\]]+/,""],[/\]\]>/,{token:"delimiter.cdata",next:"@pop"}],[/\]/,""]],tag:[[/[ \t\r\n]+/,""],[/(@qualifiedName)(\s*=\s*)("[^"]*"|'[^']*')/,["attribute.name","","attribute.value"]],[/(@qualifiedName)(\s*=\s*)("[^">?\/]*|'[^'>?\/]*)(?=[\?\/]\>)/,["attribute.name","","attribute.value"]],[/(@qualifiedName)(\s*=\s*)("[^">]*|'[^'>]*)/,["attribute.name","","attribute.value"]],[/@qualifiedName/,"attribute.name"],[/\?>/,{token:"delimiter",next:"@pop"}],[/(\/)(>)/,[{token:"tag"},{token:"delimiter",next:"@pop"}]],[/>/,{token:"delimiter",next:"@pop"}]],whitespace:[[/[ \t\r\n]+/,""],[/<!--/,{token:"comment",next:"@comment"}]],comment:[[/[^<\-]+/,"comment.content"],[/-->/,{token:"comment",next:"@pop"}],[/<!--/,"comment.content.invalid"],[/[<\-]/,"comment.content"]]}};export{n as conf,o as language};
@@ -1 +1 @@
1
- import{l as e}from"./__federation_expose_App.BtK24QCB.js";const t={comments:{lineComment:"#"},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],folding:{offSide:!0},onEnterRules:[{beforeText:/:\s*$/,action:{indentAction:e.IndentAction.Indent}}]},o={tokenPostfix:".yaml",brackets:[{token:"delimiter.bracket",open:"{",close:"}"},{token:"delimiter.square",open:"[",close:"]"}],keywords:["true","True","TRUE","false","False","FALSE","null","Null","Null","~"],numberInteger:/(?:0|[+-]?[0-9]+)/,numberFloat:/(?:0|[+-]?[0-9]+)(?:\.[0-9]+)?(?:e[-+][1-9][0-9]*)?/,numberOctal:/0o[0-7]+/,numberHex:/0x[0-9a-fA-F]+/,numberInfinity:/[+-]?\.(?:inf|Inf|INF)/,numberNaN:/\.(?:nan|Nan|NAN)/,numberDate:/\d{4}-\d\d-\d\d([Tt ]\d\d:\d\d:\d\d(\.\d+)?(( ?[+-]\d\d?(:\d\d)?)|Z)?)?/,escapes:/\\(?:[btnfr\\"']|[0-7][0-7]?|[0-3][0-7]{2})/,tokenizer:{root:[{include:"@whitespace"},{include:"@comment"},[/%[^ ]+.*$/,"meta.directive"],[/---/,"operators.directivesEnd"],[/\.{3}/,"operators.documentEnd"],[/[-?:](?= )/,"operators"],{include:"@anchor"},{include:"@tagHandle"},{include:"@flowCollections"},{include:"@blockStyle"},[/@numberInteger(?![ \t]*\S+)/,"number"],[/@numberFloat(?![ \t]*\S+)/,"number.float"],[/@numberOctal(?![ \t]*\S+)/,"number.octal"],[/@numberHex(?![ \t]*\S+)/,"number.hex"],[/@numberInfinity(?![ \t]*\S+)/,"number.infinity"],[/@numberNaN(?![ \t]*\S+)/,"number.nan"],[/@numberDate(?![ \t]*\S+)/,"number.date"],[/(".*?"|'.*?'|[^#'"]*?)([ \t]*)(:)( |$)/,["type","white","operators","white"]],{include:"@flowScalars"},[/.+?(?=(\s+#|$))/,{cases:{"@keywords":"keyword","@default":"string"}}]],object:[{include:"@whitespace"},{include:"@comment"},[/\}/,"@brackets","@pop"],[/,/,"delimiter.comma"],[/:(?= )/,"operators"],[/(?:".*?"|'.*?'|[^,\{\[]+?)(?=: )/,"type"],{include:"@flowCollections"},{include:"@flowScalars"},{include:"@tagHandle"},{include:"@anchor"},{include:"@flowNumber"},[/[^\},]+/,{cases:{"@keywords":"keyword","@default":"string"}}]],array:[{include:"@whitespace"},{include:"@comment"},[/\]/,"@brackets","@pop"],[/,/,"delimiter.comma"],{include:"@flowCollections"},{include:"@flowScalars"},{include:"@tagHandle"},{include:"@anchor"},{include:"@flowNumber"},[/[^\],]+/,{cases:{"@keywords":"keyword","@default":"string"}}]],multiString:[[/^( +).+$/,"string","@multiStringContinued.$1"]],multiStringContinued:[[/^( *).+$/,{cases:{"$1==$S2":"string","@default":{token:"@rematch",next:"@popall"}}}]],whitespace:[[/[ \t\r\n]+/,"white"]],comment:[[/#.*$/,"comment"]],flowCollections:[[/\[/,"@brackets","@array"],[/\{/,"@brackets","@object"]],flowScalars:[[/"([^"\\]|\\.)*$/,"string.invalid"],[/'([^'\\]|\\.)*$/,"string.invalid"],[/'[^']*'/,"string"],[/"/,"string","@doubleQuotedString"]],doubleQuotedString:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,"string","@pop"]],blockStyle:[[/[>|][0-9]*[+-]?$/,"operators","@multiString"]],flowNumber:[[/@numberInteger(?=[ \t]*[,\]\}])/,"number"],[/@numberFloat(?=[ \t]*[,\]\}])/,"number.float"],[/@numberOctal(?=[ \t]*[,\]\}])/,"number.octal"],[/@numberHex(?=[ \t]*[,\]\}])/,"number.hex"],[/@numberInfinity(?=[ \t]*[,\]\}])/,"number.infinity"],[/@numberNaN(?=[ \t]*[,\]\}])/,"number.nan"],[/@numberDate(?=[ \t]*[,\]\}])/,"number.date"]],tagHandle:[[/\![^ ]*/,"tag"]],anchor:[[/[&*][^ ]+/,"namespace"]]}};export{t as conf,o as language};
1
+ import{l as e}from"./__federation_expose_App.Ma7jWSMa.js";const t={comments:{lineComment:"#"},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],folding:{offSide:!0},onEnterRules:[{beforeText:/:\s*$/,action:{indentAction:e.IndentAction.Indent}}]},o={tokenPostfix:".yaml",brackets:[{token:"delimiter.bracket",open:"{",close:"}"},{token:"delimiter.square",open:"[",close:"]"}],keywords:["true","True","TRUE","false","False","FALSE","null","Null","Null","~"],numberInteger:/(?:0|[+-]?[0-9]+)/,numberFloat:/(?:0|[+-]?[0-9]+)(?:\.[0-9]+)?(?:e[-+][1-9][0-9]*)?/,numberOctal:/0o[0-7]+/,numberHex:/0x[0-9a-fA-F]+/,numberInfinity:/[+-]?\.(?:inf|Inf|INF)/,numberNaN:/\.(?:nan|Nan|NAN)/,numberDate:/\d{4}-\d\d-\d\d([Tt ]\d\d:\d\d:\d\d(\.\d+)?(( ?[+-]\d\d?(:\d\d)?)|Z)?)?/,escapes:/\\(?:[btnfr\\"']|[0-7][0-7]?|[0-3][0-7]{2})/,tokenizer:{root:[{include:"@whitespace"},{include:"@comment"},[/%[^ ]+.*$/,"meta.directive"],[/---/,"operators.directivesEnd"],[/\.{3}/,"operators.documentEnd"],[/[-?:](?= )/,"operators"],{include:"@anchor"},{include:"@tagHandle"},{include:"@flowCollections"},{include:"@blockStyle"},[/@numberInteger(?![ \t]*\S+)/,"number"],[/@numberFloat(?![ \t]*\S+)/,"number.float"],[/@numberOctal(?![ \t]*\S+)/,"number.octal"],[/@numberHex(?![ \t]*\S+)/,"number.hex"],[/@numberInfinity(?![ \t]*\S+)/,"number.infinity"],[/@numberNaN(?![ \t]*\S+)/,"number.nan"],[/@numberDate(?![ \t]*\S+)/,"number.date"],[/(".*?"|'.*?'|[^#'"]*?)([ \t]*)(:)( |$)/,["type","white","operators","white"]],{include:"@flowScalars"},[/.+?(?=(\s+#|$))/,{cases:{"@keywords":"keyword","@default":"string"}}]],object:[{include:"@whitespace"},{include:"@comment"},[/\}/,"@brackets","@pop"],[/,/,"delimiter.comma"],[/:(?= )/,"operators"],[/(?:".*?"|'.*?'|[^,\{\[]+?)(?=: )/,"type"],{include:"@flowCollections"},{include:"@flowScalars"},{include:"@tagHandle"},{include:"@anchor"},{include:"@flowNumber"},[/[^\},]+/,{cases:{"@keywords":"keyword","@default":"string"}}]],array:[{include:"@whitespace"},{include:"@comment"},[/\]/,"@brackets","@pop"],[/,/,"delimiter.comma"],{include:"@flowCollections"},{include:"@flowScalars"},{include:"@tagHandle"},{include:"@anchor"},{include:"@flowNumber"},[/[^\],]+/,{cases:{"@keywords":"keyword","@default":"string"}}]],multiString:[[/^( +).+$/,"string","@multiStringContinued.$1"]],multiStringContinued:[[/^( *).+$/,{cases:{"$1==$S2":"string","@default":{token:"@rematch",next:"@popall"}}}]],whitespace:[[/[ \t\r\n]+/,"white"]],comment:[[/#.*$/,"comment"]],flowCollections:[[/\[/,"@brackets","@array"],[/\{/,"@brackets","@object"]],flowScalars:[[/"([^"\\]|\\.)*$/,"string.invalid"],[/'([^'\\]|\\.)*$/,"string.invalid"],[/'[^']*'/,"string"],[/"/,"string","@doubleQuotedString"]],doubleQuotedString:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,"string","@pop"]],blockStyle:[[/[>|][0-9]*[+-]?$/,"operators","@multiString"]],flowNumber:[[/@numberInteger(?=[ \t]*[,\]\}])/,"number"],[/@numberFloat(?=[ \t]*[,\]\}])/,"number.float"],[/@numberOctal(?=[ \t]*[,\]\}])/,"number.octal"],[/@numberHex(?=[ \t]*[,\]\}])/,"number.hex"],[/@numberInfinity(?=[ \t]*[,\]\}])/,"number.infinity"],[/@numberNaN(?=[ \t]*[,\]\}])/,"number.nan"],[/@numberDate(?=[ \t]*[,\]\}])/,"number.date"]],tagHandle:[[/\![^ ]*/,"tag"]],anchor:[[/[&*][^ ]+/,"namespace"]]}};export{t as conf,o as language};
package/dist/index.html CHANGED
@@ -6,16 +6,16 @@
6
6
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
7
7
  <title>Rainbow Robotics System</title>
8
8
  <script type="importmap">{"imports":{"react":"/plugin-shared/react.js","react/jsx-runtime":"/plugin-shared/react_jsx-runtime.js","react/jsx-dev-runtime":"/plugin-shared/react_jsx-dev-runtime.js","react-dom":"/plugin-shared/react-dom.js","react-dom/client":"/plugin-shared/react-dom_client.js","@rainbow-robotics/plugin-ui/react":"/plugin-shared/plugin-ui_react.js","@rainbow-robotics/plugin-ui/sdk":"/plugin-shared/plugin-ui_sdk.js","@rainbow-robotics/plugin-ui/host-ui":"/plugin-shared/plugin-ui_host-ui.js","@rainbow-robotics/plugin-ui/ws":"/plugin-shared/plugin-ui_ws.js"}}</script>
9
- <script type="module" crossorigin src="/assets/index.1gxtOcyM.js"></script>
9
+ <script type="module" crossorigin src="/assets/index.BJrUsx1S.js"></script>
10
10
  <link rel="modulepreload" crossorigin href="/assets/__federation_fn_import.DdkEuT6t.js">
11
11
  <link rel="modulepreload" crossorigin href="/assets/index.P6snMalu.js">
12
12
  <link rel="modulepreload" crossorigin href="/assets/jsx-runtime.CBqCNPYB.js">
13
13
  <link rel="modulepreload" crossorigin href="/assets/emotion-styled-base.browser.esm.BIcjgOzg.js">
14
- <link rel="modulepreload" crossorigin href="/assets/RbLocalizationProvider.CMEaJz_8.js">
14
+ <link rel="modulepreload" crossorigin href="/assets/RbLocalizationProvider.B7Bh14fV.js">
15
15
  <link rel="modulepreload" crossorigin href="/assets/index.B3zY1kf7.js">
16
- <link rel="modulepreload" crossorigin href="/assets/useFileDownload.BFL8lywd.js">
17
- <link rel="modulepreload" crossorigin href="/assets/index.BFyW4OKK.js">
18
- <link rel="modulepreload" crossorigin href="/assets/__federation_expose_App.BtK24QCB.js">
16
+ <link rel="modulepreload" crossorigin href="/assets/useFileDownload.VuLHDihC.js">
17
+ <link rel="modulepreload" crossorigin href="/assets/index.D4h_0ByO.js">
18
+ <link rel="modulepreload" crossorigin href="/assets/__federation_expose_App.Ma7jWSMa.js">
19
19
 
20
20
 
21
21
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rainbow-robotics/preview-host",
3
- "version": "1.3.7",
3
+ "version": "1.3.8-dev.1",
4
4
  "type": "module",
5
5
  "engines": {
6
6
  "node": ">=20"
package/serve.mjs CHANGED
@@ -52,10 +52,15 @@ if (!existsSync(distDir)) {
52
52
 
53
53
 
54
54
  let previewPluginId = "";
55
+ // Core SW category the preview program pretends to run on (command forms are keyed by it).
56
+ let previewBeService = "manipulate";
55
57
  if (pluginDir) {
56
58
  try {
57
- previewPluginId =
58
- JSON.parse(readFileSync(resolve(pluginDir, "manifest.json"), "utf8")).id || "";
59
+ const manifest = JSON.parse(readFileSync(resolve(pluginDir, "manifest.json"), "utf8"));
60
+ previewPluginId = manifest.id || "";
61
+ if (Array.isArray(manifest.targetCategorys) && manifest.targetCategorys[0]) {
62
+ previewBeService = manifest.targetCategorys[0];
63
+ }
59
64
  } catch {
60
65
  /* manifest missing/unreadable — no preview id */
61
66
  }
@@ -70,6 +75,7 @@ const injectedLines = [
70
75
  if (previewPluginId) {
71
76
  injectedLines.push(` window.__RB_PREVIEW_PLUGIN_ID__ = ${JSON.stringify(previewPluginId)};`);
72
77
  }
78
+ injectedLines.push(` window.__RB_PREVIEW_BE_SERVICE__ = ${JSON.stringify(previewBeService)};`);
73
79
  if (devServerUrl) {
74
80
  injectedLines.push(` window.__RB_PLUGIN_DEV_SERVER_URL__ = ${JSON.stringify(devServerUrl)};`);
75
81
  }
@@ -1 +0,0 @@
1
- import{j as g,cx as z,U as F,a$ as K,x as _,bg as Q,cV as Y,eo as E,g7 as X,dg as P,el as U,cQ as Z,gI as u}from"./RbLocalizationProvider.CMEaJz_8.js";import{importShared as k}from"./__federation_fn_import.DdkEuT6t.js";const x=()=>!0,L=()=>typeof window<"u"&&window.__RB_ROBOT_HOST__||void 0||void 0,ke=()=>x()&&!!L(),J=()=>x()&&!L(),Le=(e,t)=>e?.find(s=>s.point===t),ye=(e,t)=>{if(typeof e=="string")return e;const s=String(t);return e?.[s]},_e=(e,t)=>{if(typeof e=="string")return e;const s=String(t);return e?.[s]||e?.en},Pe=e=>e.toLocaleLowerCase()==="rainbowrobotics";var y=(e=>(e[e.SUPERVISOR=0]="SUPERVISOR",e[e.ADMIN=1]="ADMIN",e[e.MANAGER=2]="MANAGER",e[e.OPERATOR=3]="OPERATOR",e[e.USER=4]="USER",e[e.GUEST=999999]="GUEST",e))(y||{});const Ue={SUPERVISOR:0,ADMIN:1,MANAGER:2,OPERATOR:3,USER:4,GUEST:999999};function v(e){try{const t=e.split(".")[1].replace(/-/g,"+").replace(/_/g,"/");return JSON.parse(atob(t))}catch{return null}}function w(e){if(!e)return null;const t=v(e);return t?t.exp*1e3:null}function O(){const e=c();return e?v(e)?.sid??"":""}const o={isAutoLogin:"isAutoLogin",accessToken:"access_token",refreshToken:"refresh_token"};function A(){localStorage.removeItem(o.accessToken),localStorage.removeItem(o.refreshToken),sessionStorage.removeItem(o.accessToken),sessionStorage.removeItem(o.refreshToken)}function h(){return localStorage.getItem(o.isAutoLogin)==="true"}function we(e){localStorage.setItem(o.isAutoLogin,e?"true":"false")}function c(){return h()?localStorage.getItem(o.accessToken):sessionStorage.getItem(o.accessToken)}function p(){return h()?localStorage.getItem(o.refreshToken):sessionStorage.getItem(o.refreshToken)}function ee(e,t,s){s?(localStorage.setItem(o.isAutoLogin,"true"),localStorage.setItem(o.accessToken,e),localStorage.setItem(o.refreshToken,t)):(localStorage.setItem(o.isAutoLogin,"false"),sessionStorage.setItem(o.accessToken,e),sessionStorage.setItem(o.refreshToken,t))}const{useQuery:te}=await k("@tanstack/react-query"),N="/auth/me",se=[N],ne=()=>V.get(N,{}),oe=({enabled:e})=>te({queryKey:se,queryFn:ne,enabled:e}),{createContext:re,useCallback:ae,useContext:ie,useEffect:C,useState:ce}=await k("react"),ue={id:"GUEST",username:"게스트",role:y.SUPERVISOR,sid:""},G=re({isLoggedIn:!1,setLoggedIn:()=>{}});let R=null;function $(e){R?.(e)}function be({children:e}){const[t,s]=ce(!!c()),n=ae(r=>{s(r)},[]);return C(()=>(R=n,()=>{R=null}),[n]),g(G.Provider,{value:{isLoggedIn:t,setLoggedIn:n},children:e})}function le(){const{isLoggedIn:e,setLoggedIn:t}=ie(G),s=c(),n=p(),r=h(),{data:a}=oe({enabled:e}),i=a?{id:a.user_id,username:a.username??a.user_id,role:a.role??y.GUEST,sid:O()}:ue;return C(()=>{const d=!!s&&!!n;e!==d&&t(d)},[e,s,n,t]),{isLoggedIn:e,setLoggedIn:t,user:i,accessToken:s,refreshToken:n,isAutoLogin:r,isAtLeast:d=>i.role<=d,hasRole:d=>i.role===d}}const fe=({className:e,open:t,onOpenChange:s,onConfirm:n})=>{const{t:r}=z(),a=()=>{s(!1),n()};return g(Q,{className:_(e,"w-100 max-w-full border-none p-0"),enableDimClose:!1,hideCloseButton:!0,open:t,onOpenChange:s,header:{title:r("login.modal.title.sessionExpired")},footer:g(F,{className:_("w-full gap-1","[&_button]:h-8 [&_button]:w-20"),justifyContent:"end",children:g(K,{variant:"brand",size:"sm",onClick:a,children:r("login.modal.button.sessionExpiredConfirm")})}),children:g("div",{className:"px-4 pt-3 pb-0",children:g("span",{className:"text-fg-default typo-compact-sm-normal",children:r("login.modal.desc.sessionExpired")})})})},Me="/muscat/app/log",T="/muscat/app/login",{useMutation:de}=await k("@tanstack/react-query"),ge="/logout",D=async e=>V.post(ge,{sid:e}),xe=()=>{const{setLoggedIn:e,user:t}=le(),s=Y();return de({mutationFn:async()=>{if(t?.sid)return D(t.sid)},onSettled:()=>{A(),e(!1),s(T)}})},me=`http://${window.location.hostname}:undefined`,he=1e4,pe=1e4,b=5e3;let j=null,H=null;function ve(e){j=e}function Oe(e){H=e}let I=!1,W=0;function Se(){return!!(I||Date.now()-W<he)}const M=()=>{if(window.location.pathname===T)return;const e=async()=>{const t=O();if(t)try{await D(t)}catch{}A(),$(!1),H?.(T)};X.openModal({component:fe,props:{onConfirm:e,onClose:e},options:{componentName:"SessionExpiredModal"}})};async function B(){if(Se())return null;const e=p();if(!e)return M(),null;I=!0;try{const t=await E.post(`${me}/common/refresh`,{refresh_token:e}),{access_token:s,refresh_token:n}=t.data;return ee(s,n,h()),$(!0),j?.("auth",{token:s,autoLogin:h()?"true":"false"}),W=Date.now(),S(),s}catch(t){console.log("Token refresh failed:",t);const s=E.isAxiosError(t)?t.response?.status:null;if(s===403||s===401||s===409)return A(),M(),null;throw t}finally{I=!1}}let m=null;function q(){m&&(clearTimeout(m),m=null)}function S(){q();const e=w(c());if(!e)return;const t=Math.max(e-Date.now(),0),s=Math.min(Math.max(e-Date.now()-pe,b),t);m=setTimeout(async()=>{try{if(!p())return;!await B()&&p()&&S()}catch{if(c()){const n=w(c());if(n&&n>Date.now()){const r=Math.min(b*2,n-Date.now());r>0&&(m=setTimeout(S,r))}}}},s)}window.addEventListener("storage",e=>{e.key!==o.accessToken&&e.key!==o.refreshToken||(c()&&p()?S():q())});const l={onRequest({config:e}){if(e.url?.endsWith("/login")||e.url?.endsWith("/logout")||e.url?.endsWith("/refresh")||/^https?:\/\//i.test(e.url??"")&&!e.url?.startsWith(e.baseURL??""))return e;const n=c();return n&&e.headers&&(e.headers.Authorization=`Bearer ${n}`),e},onResponse({response:e}){return e?.data},async onResponseError({error:e}){const t=e.config;if(!t)return Promise.reject(e);if(t.url?.endsWith("/login")||t.url?.endsWith("/logout")||t.url?.endsWith("/refresh"))return A(),Promise.reject(e);if(e.response?.status===401&&!t._retry){t._retry=!0;try{const i=await B();return i?(t.headers.Authorization=`Bearer ${i}`,E(t)):Promise.reject(e)}catch(i){return Promise.reject(i)}}const n=e?.response?.data;P("useSimulator")!=="false"&&P("useSimulator");const r=typeof n=="object"&&"message"in n&&typeof n.message=="string"?n.message:U("common.toast.apiError.content"),a=e.status??e.response?.status;return[502,504].includes(a)||e.code==="ERR_NETWORK"||J()||t.skipErrorToast||Z.openToast({title:e.config.url?`[API Error] ${e.config.url}`:U("common.toast.apiError.title"),content:r,type:"basic",variant:"warning"}),Promise.reject(e)}},Ae=3e3,f=`http://${L()||window.location.hostname}:${Ae}`,V=u({baseURL:`${f}/common`},l),Ne=u({baseURL:`${f}/manipulate`},l),Ce=u({baseURL:`${f}/log`},l),Ge=u({baseURL:`${f}/amr`},l),$e=u({baseURL:`${f}/rby1`},l);u({baseURL:`${f}/deploy`},l);const De=u({baseURL:`${f}/host`},l);export{De as A,be as B,c as C,y as J,Me as L,f as M,Ue as R,ye as a,Ge as b,V as c,_e as d,T as e,Le as f,L as g,xe as h,x as i,ve as j,B as k,Ce as l,Ne as m,q as n,Oe as o,se as p,ke as q,$e as r,Pe as s,ee as t,le as u,S as v,h as w,we as x,A as y,D as z};
@@ -1,26 +0,0 @@
1
- import{av as T,aW as j,aY as C}from"./useFileDownload.BFL8lywd.js";import{aA as pe,aZ as ge,aP as he,aM as xe,a_ as fe,a$ as be,b0 as ye,aw as Ne,aB as ue,b1 as ve,az as we,b2 as Pe,b3 as Te,b4 as ke,b5 as Me,b6 as je,aK as Re,aC as $e,aJ as Ae,aL as Oe,b7 as Se,b8 as De,b9 as Le,aN as _e,ba as Ce,bb as Ee,bc as ze,bd as Ie,aO as Fe,be as Ue,aR as He,aT as Ge,aS as Ve,bf as Ye,bg as Be,bh as qe,bi as Ze,aQ as Xe,bj as Ke,bk as We,bl as Je,bm as Qe,bn as ea,bo as aa,bp as ta,bq as sa,br as la,bs as ra,bt as ca,bu as na,ay as ia,aI as oa,aH as ma,ax as da,aF as pa,aG as ga,aE as ha,aD as xa}from"./useFileDownload.BFL8lywd.js";import{c as N,H as a,j as e,cB as E,cx as A,c1 as c,gd as z,ge as I,U as r,gf as F,gg as U,a$ as y,ey as H,eR as G,gh as V,gi as Y,gj as B,gk as q}from"./RbLocalizationProvider.CMEaJz_8.js";/**
2
- * @license lucide-react v0.486.0 - ISC
3
- *
4
- * This source code is licensed under the ISC license.
5
- * See the LICENSE file in the root directory of this source tree.
6
- */const Z=[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]],X=N("activity",Z);/**
7
- * @license lucide-react v0.486.0 - ISC
8
- *
9
- * This source code is licensed under the ISC license.
10
- * See the LICENSE file in the root directory of this source tree.
11
- */const K=[["line",{x1:"22",x2:"2",y1:"12",y2:"12",key:"1y58io"}],["path",{d:"M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z",key:"oot6mr"}],["line",{x1:"6",x2:"6.01",y1:"16",y2:"16",key:"sgf278"}],["line",{x1:"10",x2:"10.01",y1:"16",y2:"16",key:"1l4acy"}]],W=N("hard-drive",K);/**
12
- * @license lucide-react v0.486.0 - ISC
13
- *
14
- * This source code is licensed under the ISC license.
15
- * See the LICENSE file in the root directory of this source tree.
16
- */const J=[["path",{d:"M19.07 4.93A10 10 0 0 0 6.99 3.34",key:"z3du51"}],["path",{d:"M4 6h.01",key:"oypzma"}],["path",{d:"M2.29 9.62A10 10 0 1 0 21.31 8.35",key:"qzzz0"}],["path",{d:"M16.24 7.76A6 6 0 1 0 8.23 16.67",key:"1yjesh"}],["path",{d:"M12 18h.01",key:"mhygvu"}],["path",{d:"M17.99 11.66A6 6 0 0 1 15.77 16.67",key:"1u2y91"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}],["path",{d:"m13.41 10.59 5.66-5.66",key:"mhq4k0"}]],w=N("radar",J);/**
17
- * @license lucide-react v0.486.0 - ISC
18
- *
19
- * This source code is licensed under the ISC license.
20
- * See the LICENSE file in the root directory of this source tree.
21
- */const Q=[["path",{d:"M14 4v10.54a4 4 0 1 1-4 0V4a2 2 0 0 1 4 0Z",key:"17jzev"}]],ee=N("thermometer",Q);/**
22
- * @license lucide-react v0.486.0 - ISC
23
- *
24
- * This source code is licensed under the ISC license.
25
- * See the LICENSE file in the root directory of this source tree.
26
- */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=N("video",ae),ce=({systemStatus:t,expandedSections:n,toggleSection:d})=>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:()=>d("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(w,{className:"h-4 w-4 text-blue-400"}),e("span",{className:"text-xs font-medium text-gray-300",children:"2D LiDAR"})]}),e(T,{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(w,{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:()=>d("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(w,{className:"h-4 w-4 text-purple-400"}),e("span",{className:"text-xs font-medium text-gray-300",children:"3D LiDAR"})]}),e(T,{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(w,{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:()=>d("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(T,{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:d})=>{const s=(o,x,f)=>o>=f?"text-red-400":o>=x?"text-yellow-400":"text-green-400";return a("div",{className:"overflow-hidden rounded-lg border border-gray-800",children:[a("button",{onClick:()=>d("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(T,{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(X,{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(W,{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"]})]})})]})]})},$=t=>{const n=Math.floor(t/3600).toString().padStart(2,"0"),d=Math.floor(t%3600/60).toString().padStart(2,"0"),s=Math.floor(t%60).toString().padStart(2,"0");return`${n}:${d}:${s}`},ie=({mappingStatus:t="idle",elapsedSeconds:n=0,completedKeyframeCount:d=0,totalKeyframePoints:s=0,onStartMapping:o,onStopMapping:x,onSaveMapping:f,onDiscard:u,mapList:k})=>{const{modal:i}=E(),{t:l}=A(),g=t==="recording",p=t==="stopped"||t==="saving"||t==="discarding",h=t==="saving"||t==="discarding",m=d>0,M=l(m?"move.amr.rightPanel.map.mapping.readyToSave":"move.amr.rightPanel.map.mapping.cannotSaveYet"),v=m?null:l("move.amr.rightPanel.map.mapping.noKeyframeReceived"),O=async()=>{try{await o?.()}catch(b){console.error(b)}},S=async()=>{try{await x?.()}catch(b){console.error(b)}},D=async()=>{await u?.()},L=async b=>f?.(b)??{ok:!1,reason:"save-failed"},_=()=>{i({component:C,props:{onSaveMapping:L,completedKeyframeCount:d,totalKeyframePoints:s,durationSeconds:n,existingMapNames:k}})};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(z,{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 ${m?"text-fg-success":"text-fg-danger"}`,children:M})]}),v&&e("p",{className:"typo-compact-2xs-normal text-fg-subtler text-right",children:v}),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:d.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:$(n)})]})]})]})]}),p&&a(c,{className:"flex-1 pt-[4rem]",children:[a(c,{className:"items-center gap-1",children:[e(F,{className:`${m?"text-fg-success":"text-fg-danger"} size-8`}),e("p",{className:`typo-compact-xs-semibold ${m?"text-fg-success":"text-fg-danger"}`,children:l(m?"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(m?"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(m?"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 ${m?"text-fg-success":"text-fg-danger"}`,children:M})]}),v&&e("p",{className:"typo-compact-2xs-normal text-fg-subtler text-right",children:v}),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:d.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:$(n)})]})]})]})]}),!p&&a(r,{className:"shrink-0 justify-between gap-2",children:[e(y,{onClick:S,disabled:!g||h,className:"gap-1 px-3.5",leadingIcon:e(U,{}),variant:"danger",children:l("move.amr.rightPanel.common.stop")}),e(y,{onClick:O,disabled:g||h,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:[!m&&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(y,{onClick:D,disabled:h,className:"gap-1 px-3.5",children:l(t==="discarding"?"move.amr.rightPanel.map.mapping.discarding":"move.amr.rightPanel.common.discard")}),e(y,{onClick:_,disabled:!m||h,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}`,P=t=>`${t<0?"-":"+"}${Math.abs(t).toFixed(1)}m`,oe=({currentMapName:t,createdAt:n,lastModified:d,mapCloudCount:s,mapBounds:o,topologyCount:x,nodeTypeCounts:f,onDownloadMap:u,downloadMapDisabled:k})=>{const{t:i}=A(),l=o?`${P(o.minX)} ~ ${P(o.maxX)}`:"--",g=o?`${P(o.minY)} ~ ${P(o.maxY)}`:"--",p=o?Math.abs(o.maxX-o.minX)*Math.abs(o.maxY-o.minY):null,h=p===null?"--":`${p.toFixed(1)} m²`,m=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:i("move.amr.rightPanel.map.info.mapName")}),e("p",{className:"typo-compact-md-semibold text-fg-default",children:t})]}),u?e(y,{className:"w-full",size:"xs",variant:"soft",leadingIcon:e(H,{}),disabled:k,onClick:u,children:i("move.amr.rightPanel.map.info.downloadMap")}):null,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:i("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:i("move.amr.rightPanel.map.info.lastModified")}),e("p",{className:"typo-compact-xs-normal text-fg-subtle",children:d??"--"})]})]})]}),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:i("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:i("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(V,{className:"text-fg-subtle size-4"})}),e("p",{className:"typo-compact-xs2-normal text-fg-subtle",children:i("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:i("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:i("move.amr.rightPanel.map.info.xRange")})}),e("p",{className:"typo-compact-xs2-normal text-fg-default",children:l})]}),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:i("move.amr.rightPanel.map.info.yRange")})})}),e("p",{className:"typo-compact-xs2-normal text-fg-default",children:g})]}),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:i("move.amr.rightPanel.map.info.totalArea")})}),e("p",{className:"typo-compact-xs2-normal text-fg-default",children:h})]})]}),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:i("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(Y,{className:"text-fg-warning size-4"})}),e("p",{className:"typo-compact-xs2-normal text-fg-subtle",children:i("move.amr.rightPanel.topology.nodeType.goal")})]}),e("p",{className:"typo-compact-xs2-normal text-fg-default",children:m.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(B,{className:"text-fg-brand size-4"})}),e("p",{className:"typo-compact-xs2-normal text-fg-subtle",children:i("move.amr.rightPanel.topology.nodeType.route")})]})}),e("p",{className:"typo-compact-xs2-normal text-fg-default",children:m.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(q,{className:"text-fg-success size-4"})}),e("p",{className:"typo-compact-xs2-normal text-fg-subtle",children:i("move.amr.rightPanel.topology.nodeType.align")})]}),e("p",{className:"typo-compact-xs2-normal text-fg-default",children:m.ALIGN})]})]})]})};export{pe as AMRNodeFromTo,ge as ArrowHelper2,he as BottomStatusBar,xe as CameraStreamsPanel,fe as DEFAULT_EDITOR_CAMERA,be as DEFAULT_NAVIGATION_TOOLS,ye as DEFAULT_TOOL_GROUPS,Ne as DEFAULT_TOPOLOGY_FORMAT_VERSION,ue as DEFAULT_TRANSFORM_TOOLS,ve as DockControl,we as EDITOR_CAMERA_POSITION_KEY,Pe as EDITOR_MODE,Te as Editor,ke as Eraser,Me as EraserTab,je as EventHandler,Re as HUDStatusPanel,$e as LeftToolBar,oe as MapInfo,Ae as MapLoadDialog,Oe as MapNameHUD,ie as MappingTab,Se as MarkerControl,ce as MonitorSensorsTab,De as NODE_TYPE,Le as NodeManager,_e as ObstacleMapPanel,Ce as Overview,Ee as PathDrawer,ze as PduInfo,Ie as RightToolBar,Fe as RobotControlPanel,Ue as RobotManager,He as SelectedLinkOverlay,Ge as SelectedNodeOverlay,Ve as SelectedZoneOverlay,Ye as Selector,ne as SystemResources,Be as TaskInformation,qe as TopologyActionFooter,Ze as TopologyAdd,Xe as TopologyControl,Ke as TopologyEdit,We as TopologyLink,Je as TopologyLinkTabPanel,Qe as TopologyNodeAddSection,ea as TopologyNodeEditSection,aa as TopologyNodeTabPanel,ta as TopologyNodes,sa as TopologyOverviewTabPanel,la as TopologyZone,ra as TopologyZoneTabPanel,ca as TrajectoryDrawer,na as Viewport,ia as WorldStudio,oa as useBottomStatusBar,ma as useEditorKeyboardShortcut,da as useEditorState,pa as useEditorTool,ga as useEditorViewportOptions,ha as useFileDownload,xa as useOverlayPosition};