@camstack/addon-admin-ui 1.2.672 → 1.2.674

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 (100) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/dist/assets/Addons-WMvBsvOk.js +5 -0
  3. package/dist/assets/{AdminPage-WKFHThAA.js → AdminPage-DehTB98c.js} +1 -1
  4. package/dist/assets/{AdminSectionedPage-aE2P4MNm.js → AdminSectionedPage-CYs3O4rx.js} +1 -1
  5. package/dist/assets/AiProfiles-zANvp6C7.js +3 -0
  6. package/dist/assets/{BootstrapSettingsForm-VkqZ4n9L.js → BootstrapSettingsForm-iu9cN56V.js} +1 -1
  7. package/dist/assets/{Build-DfuFTfOe.js → Build-CH8Jteos.js} +5 -5
  8. package/dist/assets/{Calendars-B5_Iw15u.js → Calendars-CG458gUz.js} +1 -1
  9. package/dist/assets/{CameraGrids-WRpTOdgM.js → CameraGrids-C9eCm8pP.js} +1 -1
  10. package/dist/assets/Cluster-kvsDgCgK.js +1 -0
  11. package/dist/assets/{CompositionBlockEditor-D_kgqFjy.js → CompositionBlockEditor-CAs5rsS4.js} +2 -2
  12. package/dist/assets/{CompositionEditorPage-CBnk6Oi4.js → CompositionEditorPage-BtUl4zjW.js} +1 -1
  13. package/dist/assets/{Data-Bmx_QZ5N.js → Data-C36JAFvC.js} +2 -2
  14. package/dist/assets/DeviceDetail-xBqlnA0-.js +2 -0
  15. package/dist/assets/{Devices-Bs2smCnE.js → Devices-C0mp1gTu.js} +1 -1
  16. package/dist/assets/{EmbedDevicePage-DtB3fTCS.js → EmbedDevicePage-D62p-Zwh.js} +1 -1
  17. package/dist/assets/{EmbedPlayerPage-BsiMBwWy.js → EmbedPlayerPage-xCU6XWiZ.js} +1 -1
  18. package/dist/assets/History-B44RiyKy.js +1 -0
  19. package/dist/assets/{Identity-BaQ05dRz.js → Identity-DbbKhxh3.js} +1 -1
  20. package/dist/assets/{InstancesTable-Bm6FGiwJ.js → InstancesTable-C0K85iGC.js} +1 -1
  21. package/dist/assets/IntegrationDetail-nq8eT4Rx.js +1 -0
  22. package/dist/assets/{Integrations-esSALn0z.js → Integrations-4XOMicYb.js} +2 -2
  23. package/dist/assets/{Integrations-DlQX63NB.js → Integrations-BKdCwZuR.js} +1 -1
  24. package/dist/assets/{Library-CWLw_sup.js → Library-C5ay31n5.js} +1 -1
  25. package/dist/assets/Locations-D6wRB0nm.js +3 -0
  26. package/dist/assets/Logs-uJBwN087.js +1 -0
  27. package/dist/assets/{MaskShapeCanvas-BXQi3-T2.js → MaskShapeCanvas-CFBpV69I.js} +1 -1
  28. package/dist/assets/{MotionZonesSettings-ucz7NSTu.js → MotionZonesSettings-DiSDXz6Y.js} +1 -1
  29. package/dist/assets/{MyAccess-CaEYIf0r.js → MyAccess-CIlYcBGS.js} +1 -1
  30. package/dist/assets/{Network-BvNO3Og4.js → Network-Dd0YsxUn.js} +1 -1
  31. package/dist/assets/{NodeAddonsSettingsPanel--3ZSd9Jd.js → NodeAddonsSettingsPanel-Dy-TKm1m.js} +1 -1
  32. package/dist/assets/{Notifications-C184vu19.js → Notifications-VK8H0w3p.js} +1 -1
  33. package/dist/assets/{Pipeline-BK7KRS_e.js → Pipeline-CpT4cIkd.js} +1 -1
  34. package/dist/assets/{PrivacyMaskSettings-BpKQjnTN.js → PrivacyMaskSettings-ivXhDvTd.js} +1 -1
  35. package/dist/assets/Recordings-BelCDd0K.js +1 -0
  36. package/dist/assets/{SceneMonitorEditor-B4x-j-jS.js → SceneMonitorEditor-DD9HUOxa.js} +1 -1
  37. package/dist/assets/ServerShell-BJ88JJQy.js +1 -0
  38. package/dist/assets/SessionsList-VpzJYCXO.js +2 -0
  39. package/dist/assets/{Showroom-BhyCOwGI.js → Showroom-DprVm7lJ.js} +1 -1
  40. package/dist/assets/{StorageLocationsTable-4_DOpVA_.js → StorageLocationsTable-YyNaWUFC.js} +1 -1
  41. package/dist/assets/{System-DQLuaJZ4.js → System-B8OfL298.js} +1 -1
  42. package/dist/assets/Terminal-B9DUjbO_.js +3 -0
  43. package/dist/assets/{Terminal-BPZfBJ19.js → TerminalPanel-C5GUokHS.js} +3 -5
  44. package/dist/assets/{TrainingProviders-Sb4yaWHO.js → TrainingProviders-Dgifcyme.js} +1 -1
  45. package/dist/assets/{Viewer-zk7q16mM.js → Viewer-CgYVNuka.js} +1 -1
  46. package/dist/assets/{_virtual_mf-localSharedImportMap___mfe_internal__admin_ui_host-NUohwQsx.js → _virtual_mf-localSharedImportMap___mfe_internal__admin_ui_host-BSOO0i6X.js} +1 -1
  47. package/dist/assets/{action-draft-DwvVnv-7.js → action-draft-TjsRaaWY.js} +1 -1
  48. package/dist/assets/{ai-page.helpers-C7D3n8iP.js → ai-page.helpers-B01d73HY.js} +1 -1
  49. package/dist/assets/{assignment-candidates-CQzBruHK.js → assignment-candidates-b1r8iss9.js} +1 -1
  50. package/dist/assets/{authed-media-CdhEKUeH.js → authed-media-C2ovg6GX.js} +1 -1
  51. package/dist/assets/{board-model-8UGMkm1I.js → board-model-C-1eQ0ae.js} +1 -1
  52. package/dist/assets/{client-CBrsD14Q.js → client-BHqWRcyk.js} +42 -42
  53. package/dist/assets/{command-vocab-DPH9ECZa.js → command-vocab-C7U9oyDW.js} +1 -1
  54. package/dist/assets/{device-detail-ZWsVTFVe.js → device-detail-B7BuTwl5.js} +1 -1
  55. package/dist/assets/{device-integration-icon-D5moECYy.js → device-integration-icon-D2MLKEPf.js} +1 -1
  56. package/dist/assets/device-picker-model-CVw4WHYD.js +1 -0
  57. package/dist/assets/{dist-Ch4acd_Z.js → dist-DVJk2a2H.js} +7 -7
  58. package/dist/assets/{dist-EQkuFJsn.js → dist-DuuRIDwa.js} +1 -1
  59. package/dist/assets/{format-CX-wK907.js → format-DfOVHXCT.js} +1 -1
  60. package/dist/assets/{hostInit-BwafpPpx.js → hostInit-rTXCJjRz.js} +1 -1
  61. package/dist/assets/i18n-1k63HMS1.js +1 -0
  62. package/dist/assets/{icons-2Ody3esI.js → icons-CWZ5ezxN.js} +1 -1
  63. package/dist/assets/index-CWyWRkhx.css +2 -0
  64. package/dist/assets/{index-DqWOkhIM.js → index-DrSk7mpa.js} +3 -3
  65. package/dist/assets/{linked-devices-model-BzwIpwEe.js → linked-devices-model-CSdyOaOL.js} +1 -1
  66. package/dist/assets/{mf-entry-bootstrap-0-bdd51718.js → mf-entry-bootstrap-0-c1456dc1.js} +2 -2
  67. package/dist/assets/mount-CVw4WHYD.js +1 -0
  68. package/dist/assets/{notification-rule-status-B61HDyRa.js → notification-rule-status-Nsg84Ad6.js} +1 -1
  69. package/dist/assets/{player-overlays-VrMHBBfa.js → player-overlays-ioSNjktV.js} +1 -1
  70. package/dist/assets/remoteEntry-L_UHhLDG.js +1 -0
  71. package/dist/assets/{src-PRnJiArs.js → src-BdsfPiRP.js} +15 -15
  72. package/dist/assets/{sso-popup-FSdroU2W.js → sso-popup-n86tgOtV.js} +1 -1
  73. package/dist/assets/{step-inspector-model-rUzV_fx8.js → step-inspector-model-DDQdb6QN.js} +1 -1
  74. package/dist/assets/{use-scenes-feed-CbvzDtoS.js → use-scenes-feed-CGfxNDwj.js} +1 -1
  75. package/dist/assets/{use-stationary-objects-BQoGLS7G.js → use-stationary-objects-CAqaioV8.js} +1 -1
  76. package/dist/assets/{useAdminDeviceRemoval-BIpZCMvj.js → useAdminDeviceRemoval-DVcdNDpy.js} +1 -1
  77. package/dist/assets/useEventInvalidation-CVw4WHYD.js +1 -0
  78. package/dist/assets/{useNodeUrlSelection-CLpo7d-J.js → useNodeUrlSelection-Bqv1g0bX.js} +1 -1
  79. package/dist/assets/{useTemplateSave-MOGGKDgw.js → useTemplateSave-Cp-jK8Nf.js} +1 -1
  80. package/dist/assets/{virtual_mf-REMOTE_ENTRY_ID___mfe_internal__admin_ui_host__remoteEntry-_hash_-DuSFc1uR.js → virtual_mf-REMOTE_ENTRY_ID___mfe_internal__admin_ui_host__remoteEntry-_hash_-CS-o-uvR.js} +2 -2
  81. package/dist/index.html +9 -9
  82. package/dist/server/addon.js +26 -4
  83. package/package.json +2 -2
  84. package/dist/assets/Addons-BEhl3aw7.js +0 -5
  85. package/dist/assets/AiProfiles-seGYRA1N.js +0 -3
  86. package/dist/assets/Cluster-H2SeggWn.js +0 -1
  87. package/dist/assets/DeviceDetail-DPtEEtEu.js +0 -2
  88. package/dist/assets/History-kgS1nMrV.js +0 -1
  89. package/dist/assets/IntegrationDetail-ByhHLh3L.js +0 -1
  90. package/dist/assets/Locations-Bo_gdnn6.js +0 -3
  91. package/dist/assets/Logs-DvXNPp-Y.js +0 -1
  92. package/dist/assets/Recordings-BDIDg5W6.js +0 -1
  93. package/dist/assets/SessionsList-Bf6Abb3S.js +0 -2
  94. package/dist/assets/device-picker-model-DugCLTjl.js +0 -1
  95. package/dist/assets/i18n-BFxrpjSx.js +0 -1
  96. package/dist/assets/index-CcsmeMTw.css +0 -2
  97. package/dist/assets/mount-DugCLTjl.js +0 -1
  98. package/dist/assets/remoteEntry-CKvAmLfb.js +0 -1
  99. package/dist/assets/useEventInvalidation-DugCLTjl.js +0 -1
  100. /package/dist/assets/{Terminal-kHJ-D0s7.css → TerminalPanel-kHJ-D0s7.css} +0 -0
@@ -1 +1 @@
1
- import"./client-CBrsD14Q.js";var e=`deviceId`;function t(e){let t=e.target;return t.kind===`devices`&&t.ids.length===1?t.ids[0]??null:null}var n=/(\{[A-Za-z0-9_]+\})/;function r(e){return e.toLowerCase().startsWith(`it`)?`it`:`en`}function i(e){if(typeof e!=`object`||!e)return!1;let t=Object.keys(e);return t.length===1&&t[0]===`$var`&&typeof Reflect.get(e,`$var`)==`string`}function a(e){let t=[];for(let r of e.split(n))r!==``&&(r.startsWith(`{`)&&r.endsWith(`}`)?t.push({kind:`slot`,key:r.slice(1,-1)}):t.push({kind:`text`,text:r}));return t}function o(e){let t=e.offer;switch(t.kind){case`number`:return{kind:`fixed`,value:t.min??0,...t.quantity===void 0||t.unit===void 0?{}:{unit:t.unit}};case`enum`:{let e=t.values[0];return{kind:`fixed`,value:e===void 0?``:e.value}}case`boolean`:return{kind:`fixed`,value:!1};default:return{kind:`fixed`,value:``}}}function s(e){return Object.fromEntries(e.openArgs.map(e=>[e.key,o(e)]))}function c(e,t,n){if(i(e))return{kind:`var`,name:e.$var};let r=l(t);return typeof e==`number`&&r!==void 0?{kind:`fixed`,value:e,unit:n??r.unit}:typeof e==`string`||typeof e==`number`||typeof e==`boolean`?{kind:`fixed`,value:e}:o(t)}function l(e){let t=e.offer;if(!(t.kind!==`number`||t.quantity===void 0||t.unit===void 0))return{quantity:t.quantity,unit:t.unit,min:t.min,max:t.max}}function u(e,t){let n=e.find(e=>e.id===t.actionId);if(n===void 0)return null;let r=t.args??{};return{action:n,values:Object.fromEntries(n.openArgs.map(e=>[e.key,c(r[e.key],e,t.argUnits?.[e.key])]))}}function d(e){return e.kind===`var`?{$var:e.name}:e.value}function f(e){return e.kind===`fixed`&&e.value===``}function p(e,t,n){let r={},i={};for(let t of e.openArgs){let e=n[t.key]??o(t);t.optional===!0&&f(e)||(r[t.key]=d(e),e.kind===`fixed`&&e.unit!==void 0&&l(t)!==void 0&&(i[t.key]=e.unit))}return{kind:`command`,target:t,actionId:e.id,...Object.keys(r).length===0?{}:{args:r},...Object.keys(i).length===0?{}:{argUnits:i}}}function m(e,t){if(t.kind===`var`)return null;let n=e.offer;return n.kind===`number`?typeof t.value!=`number`||!Number.isFinite(t.value)?`empty`:n.min!==void 0&&t.value<n.min?`below`:n.max!==void 0&&t.value>n.max?`above`:null:n.kind===`text`||n.kind===`dynamic`?e.optional===!0||t.value!==``?null:`empty`:null}function h(e,t){for(let n of e.openArgs){let e=t[n.key];if(e===void 0)continue;let r=m(n,e);if(r!==null)return{key:n.key,issue:r}}return null}export{s as a,u as c,a as d,r as f,o as i,l,m as n,h as o,p as r,i as s,e as t,t as u};
1
+ import"./client-BHqWRcyk.js";var e=`deviceId`;function t(e){let t=e.target;return t.kind===`devices`&&t.ids.length===1?t.ids[0]??null:null}var n=/(\{[A-Za-z0-9_]+\})/;function r(e){return e.toLowerCase().startsWith(`it`)?`it`:`en`}function i(e){if(typeof e!=`object`||!e)return!1;let t=Object.keys(e);return t.length===1&&t[0]===`$var`&&typeof Reflect.get(e,`$var`)==`string`}function a(e){let t=[];for(let r of e.split(n))r!==``&&(r.startsWith(`{`)&&r.endsWith(`}`)?t.push({kind:`slot`,key:r.slice(1,-1)}):t.push({kind:`text`,text:r}));return t}function o(e){let t=e.offer;switch(t.kind){case`number`:return{kind:`fixed`,value:t.min??0,...t.quantity===void 0||t.unit===void 0?{}:{unit:t.unit}};case`enum`:{let e=t.values[0];return{kind:`fixed`,value:e===void 0?``:e.value}}case`boolean`:return{kind:`fixed`,value:!1};default:return{kind:`fixed`,value:``}}}function s(e){return Object.fromEntries(e.openArgs.map(e=>[e.key,o(e)]))}function c(e,t,n){if(i(e))return{kind:`var`,name:e.$var};let r=l(t);return typeof e==`number`&&r!==void 0?{kind:`fixed`,value:e,unit:n??r.unit}:typeof e==`string`||typeof e==`number`||typeof e==`boolean`?{kind:`fixed`,value:e}:o(t)}function l(e){let t=e.offer;if(!(t.kind!==`number`||t.quantity===void 0||t.unit===void 0))return{quantity:t.quantity,unit:t.unit,min:t.min,max:t.max}}function u(e,t){let n=e.find(e=>e.id===t.actionId);if(n===void 0)return null;let r=t.args??{};return{action:n,values:Object.fromEntries(n.openArgs.map(e=>[e.key,c(r[e.key],e,t.argUnits?.[e.key])]))}}function d(e){return e.kind===`var`?{$var:e.name}:e.value}function f(e){return e.kind===`fixed`&&e.value===``}function p(e,t,n){let r={},i={};for(let t of e.openArgs){let e=n[t.key]??o(t);t.optional===!0&&f(e)||(r[t.key]=d(e),e.kind===`fixed`&&e.unit!==void 0&&l(t)!==void 0&&(i[t.key]=e.unit))}return{kind:`command`,target:t,actionId:e.id,...Object.keys(r).length===0?{}:{args:r},...Object.keys(i).length===0?{}:{argUnits:i}}}function m(e,t){if(t.kind===`var`)return null;let n=e.offer;return n.kind===`number`?typeof t.value!=`number`||!Number.isFinite(t.value)?`empty`:n.min!==void 0&&t.value<n.min?`below`:n.max!==void 0&&t.value>n.max?`above`:null:n.kind===`text`||n.kind===`dynamic`?e.optional===!0||t.value!==``?null:`empty`:null}function h(e,t){for(let n of e.openArgs){let e=t[n.key];if(e===void 0)continue;let r=m(n,e);if(r!==null)return{key:n.key,issue:r}}return null}export{s as a,u as c,a as d,r as f,o as i,l,m as n,h as o,p as r,i as s,e as t,t as u};
@@ -1 +1 @@
1
- import{A as e,C as t,K as n,R as r,S as i,V as a,Y as o,d as s,et as c,k as l,u,x as d}from"./_virtual_mf___mfe_internal__admin_ui_host__loadShare___mf_0_tanstack_mf_1_react_mf_2_query__loadShare__.js-CEyXHAdg.js";import{gt as f,it as p,qa as m}from"./player-overlays-VrMHBBfa.js";import{$t as h,Ai as g,An as _,Cd as v,Fi as y,Jt as b,Kt as x,Mt as S,Op as C,Pi as w,Sp as T,Un as E,Ut as D,Wf as O,bd as k,fa as A,ha as j,ji as M,ki as N,kn as P,mf as F,op as I,or as L,qt as R,rn as z,wd as B,xd as V}from"./src-PRnJiArs.js";import{t as H}from"./i18n-BFxrpjSx.js";import{n as U,t as W}from"./useTranslation-BJr-n0es.js";import{G,S as K}from"./index-DqWOkhIM.js";c();function q({i18n:t,defaultNS:r,children:i}){let a=n(()=>({i18n:t,defaultNS:r}),[t,r]);return e(U.Provider,{value:a},i)}c();function J({deviceId:e,deviceName:n}){let{t:r}=W(),a=T(`remote`),s=v({deviceId:e},{enabled:a===`present`}),[c,l]=o(!1);return a!==`present`||(s.data?.commands.length??0)===0&&(s.data?.sources.length??0)===0?null:t(`div`,{className:`flex flex-wrap items-center justify-center gap-1`,children:[t(O,{size:`sm`,variant:`outline`,onClick:()=>l(!0),"data-testid":`hero-remote`,children:[i(L,{className:`h-3.5 w-3.5`,"aria-hidden":!0}),r(`remote.hero.open`)]}),c&&i(Y,{deviceId:e,deviceName:n,onClose:()=>l(!1)})]})}function Y({deviceId:e,deviceName:n,onClose:r}){let{t:a}=W(),s=V({deviceId:e}),c=F({kind:`remote`}),l=v({deviceId:e}),u=B(),d=k({deviceId:e}),[f,p]=o(null),m=s.data?.layoutTemplateId??null,h=(c.data??[]).find(e=>e.id===m),b=h===void 0?null:E(h.payload),x=new Set((l.data?.commands??[]).map(e=>e.role)),S=async t=>{let n=b?.buttons.find(e=>e.id===t)?.role;if(!(n===void 0||!x.has(n))){p(null);try{let t=await u.mutateAsync({deviceId:e,role:n,repeat:1});t.status===`refused`&&p(a(`remote.test.refused.${t.reason}`,{detail:t.detail??``}))}catch(e){p(e instanceof Error?e.message:String(e))}}};return i(N,{open:!0,onOpenChange:e=>!e&&r(),children:t(M,{width:`md`,placement:`sheet-on-mobile`,scroll:`body`,children:[i(w,{children:i(y,{children:a(`remote.hero.title`,{name:n})})}),t(g,{className:`space-y-3`,children:[s.status===`error`?i(A,{title:a(`remote.dialog.unreadable`),message:s.error?.message??``,onRetry:()=>void s.refetch()}):b===null?i(`p`,{className:`text-xs text-foreground-muted`,children:a(`remote.hero.noLayout`)}):i(`div`,{className:`mx-auto w-full max-w-xs`,"data-testid":`remote-press`,children:i(_,{grid:b,label:a(`remote.hero.title`,{name:n}),boundRoles:x,onSelect:e=>void S(e),renderWidget:(t,n)=>i(P,{deviceId:e,button:t,sources:l.data?.sources??[],current:d.data?.source??``,placement:n})})}),f!==null&&i(`p`,{role:`alert`,className:`text-xs text-danger`,children:f})]})]})})}c();var X=l({});function Z({value:e,children:t}){return i(X.Provider,{value:e,children:t})}c();var Q={"off-while-running":{title:`Turn off while running?`,message:`The device is running. Cutting its power now interrupts what it is doing.`,confirm:`Turn off`},unlock:{title:`Unlock?`,message:`The lock will open.`,confirm:`Unlock`},install:{title:`Install the update?`,message:`The device may restart and be unavailable for a while.`,confirm:`Install`},press:{title:`Run it now?`,message:`The device acts as soon as you confirm.`,confirm:`Run`}},$=e=>e===`off-while-running`?`deviceHero.model.confirmOff`:`deviceHero.model.confirm.${e}`;function ee(){let{t:e,i18n:t}=W(),r=t.language;return n(()=>{let t=t=>({title:e(`${$(t)}.title`,Q[t].title),message:e(`${$(t)}.message`,Q[t].message),confirm:e(`${$(t)}.confirm`,Q[t].confirm)});return{noValue:e(`deviceHero.model.noValue`,`–`),callFailed:e(`deviceHero.model.callFailed`,`The device did not accept the command`),historyTooltip:e(`deviceHero.utility.history.tooltip`,`Opens the history of this device.`),consumables:{label:e(`deviceHero.utility.consumables.label`,`Consumables`),low:t=>e(`deviceHero.utility.consumables.low`,`{{count}} low`,{count:t}),ok:e(`deviceHero.utility.consumables.ok`,`OK`),tooltip:e(`deviceHero.utility.consumables.tooltip`,`Shows the level of each consumable and which ones need attention.`)},power:{label:e(`deviceHero.utility.power.label`,`Power source`),on:e(`deviceHero.utility.power.on`,`On`),off:e(`deviceHero.utility.power.off`,`Off`),tooltip:e(`deviceHero.utility.power.tooltip`,`Opens a menu to cut or restore the power feeding this device, or to restart it.`),tooltipReadOnly:e(`deviceHero.utility.power.tooltipReadOnly`,`Whether the power source feeding this device is on. Your session cannot change it.`)},confirm:{"off-while-running":t(`off-while-running`),unlock:t(`unlock`),install:t(`install`),press:t(`press`)}}},[e,r])}c();function te(e){let[t]=o(()=>new s({defaultOptions:{queries:{retry:!1,staleTime:5e3}}}));return e??t}function ne({deviceId:e,kind:t,canActuate:n,onDrawn:r,showName:o}){let s=I();return a(()=>{r?.(!0)},[r]),i(`div`,{className:`flex justify-center`,children:i(R,{kind:t,deviceId:e,canActuate:n,orientation:s?`vertical`:`horizontal`,showName:o!==!1})})}function re(e){let t=b(e.deviceId);return t===`pending`?i(j,{className:`h-72 w-full`}):t===null?i(ie,{...e}):i(ne,{deviceId:e.deviceId,kind:t,canActuate:e.canActuate,onDrawn:e.onDrawn,showName:e.showName})}function ie(e){let t=I();return i(`div`,{className:`flex justify-center`,children:i(D,{deviceId:e.deviceId,canActuate:e.canActuate,orientation:t?`vertical`:`horizontal`,showName:e.showName!==!1,placeholder:i(j,{className:`h-72 w-full`}),fallback:i(`div`,{className:`w-full`,children:i(ae,{...e})}),...e.onDrawn===void 0?{}:{onDrawn:e.onDrawn}})})}function ae({deviceId:e,canActuate:n,fallback:a,onDrawn:s,defaultHistoryOpen:c,showName:l}){let{t:u,i18n:f}=W(),p=ee(),[m,_]=o(c===!0),v=z(e),b=G(v.presence,v.list),C=r(()=>_(!0),[]);return t(d,{children:[i(S,{deviceId:e,canActuate:n,lang:x(f.language),labels:p,renderRemote:t=>i(J,{deviceId:e,deviceName:t}),fallback:a??null,showName:l!==!1,...b?{onOpenHistory:C}:{},...s===void 0?{}:{onDrawn:s}}),m?i(N,{open:!0,onOpenChange:e=>!e&&_(!1),children:t(M,{width:`xl`,scroll:`body`,children:[i(w,{children:i(y,{children:u(`deviceModule.history`,`History`)})}),i(g,{className:`mt-3`,children:i(h,{deviceId:e})})]})}):null]})}function oe({deviceId:e,trpcClient:t,theme:r,locale:a,canActuate:o=!1,defaultHistoryOpen:s,queryClient:c,fallback:l,onDrawn:d,onOpenDevice:h,onOpenCamera:g,onClose:_,onNavigate:v,showName:y}){let b=te(c),x=n(()=>H.cloneInstance({lng:a}),[a]),S=n(()=>K(x.t.bind(x)),[x]),w=n(()=>({onOpenDevice:h,onOpenCamera:g,onClose:_,onNavigate:v}),[h,g,_,v]);return i(`div`,{className:r,"data-theme":r,"data-testid":`device-detail-module`,children:i(q,{i18n:x,children:i(m,{t:S,children:i(f,{client:t,children:i(C.Provider,{client:t,queryClient:b,children:i(u,{client:b,children:i(p,{children:i(Z,{value:w,children:i(re,{deviceId:e,canActuate:o,fallback:l,onDrawn:d,defaultHistoryOpen:s,showName:y})})})})})})})})})}export{J as n,oe as t};
1
+ import{A as e,C as t,K as n,R as r,S as i,V as a,Y as o,d as s,et as c,k as l,u,x as d}from"./_virtual_mf___mfe_internal__admin_ui_host__loadShare___mf_0_tanstack_mf_1_react_mf_2_query__loadShare__.js-CEyXHAdg.js";import{gt as f,it as p,qa as m}from"./player-overlays-ioSNjktV.js";import{$t as h,Ai as g,An as _,Cd as v,Cp as y,Fi as b,Gf as x,Jt as S,Kt as C,Mt as w,Pi as T,Un as E,Ut as D,bd as O,fa as k,ha as A,ji as j,ki as M,kn as N,kp as P,mf as F,or as I,qt as L,rn as R,sp as z,wd as B,xd as V}from"./src-BdsfPiRP.js";import{t as H}from"./i18n-1k63HMS1.js";import{n as U,t as W}from"./useTranslation-BJr-n0es.js";import{G,S as K}from"./index-DrSk7mpa.js";c();function q({i18n:t,defaultNS:r,children:i}){let a=n(()=>({i18n:t,defaultNS:r}),[t,r]);return e(U.Provider,{value:a},i)}c();function J({deviceId:e,deviceName:n}){let{t:r}=W(),a=y(`remote`),s=v({deviceId:e},{enabled:a===`present`}),[c,l]=o(!1);return a!==`present`||(s.data?.commands.length??0)===0&&(s.data?.sources.length??0)===0?null:t(`div`,{className:`flex flex-wrap items-center justify-center gap-1`,children:[t(x,{size:`sm`,variant:`outline`,onClick:()=>l(!0),"data-testid":`hero-remote`,children:[i(I,{className:`h-3.5 w-3.5`,"aria-hidden":!0}),r(`remote.hero.open`)]}),c&&i(Y,{deviceId:e,deviceName:n,onClose:()=>l(!1)})]})}function Y({deviceId:e,deviceName:n,onClose:r}){let{t:a}=W(),s=V({deviceId:e}),c=F({kind:`remote`}),l=v({deviceId:e}),u=B(),d=O({deviceId:e}),[f,p]=o(null),m=s.data?.layoutTemplateId??null,h=(c.data??[]).find(e=>e.id===m),y=h===void 0?null:E(h.payload),x=new Set((l.data?.commands??[]).map(e=>e.role)),S=async t=>{let n=y?.buttons.find(e=>e.id===t)?.role;if(!(n===void 0||!x.has(n))){p(null);try{let t=await u.mutateAsync({deviceId:e,role:n,repeat:1});t.status===`refused`&&p(a(`remote.test.refused.${t.reason}`,{detail:t.detail??``}))}catch(e){p(e instanceof Error?e.message:String(e))}}};return i(M,{open:!0,onOpenChange:e=>!e&&r(),children:t(j,{width:`md`,placement:`sheet-on-mobile`,scroll:`body`,children:[i(T,{children:i(b,{children:a(`remote.hero.title`,{name:n})})}),t(g,{className:`space-y-3`,children:[s.status===`error`?i(k,{title:a(`remote.dialog.unreadable`),message:s.error?.message??``,onRetry:()=>void s.refetch()}):y===null?i(`p`,{className:`text-xs text-foreground-muted`,children:a(`remote.hero.noLayout`)}):i(`div`,{className:`mx-auto w-full max-w-xs`,"data-testid":`remote-press`,children:i(_,{grid:y,label:a(`remote.hero.title`,{name:n}),boundRoles:x,onSelect:e=>void S(e),renderWidget:(t,n)=>i(N,{deviceId:e,button:t,sources:l.data?.sources??[],current:d.data?.source??``,placement:n})})}),f!==null&&i(`p`,{role:`alert`,className:`text-xs text-danger`,children:f})]})]})})}c();var X=l({});function Z({value:e,children:t}){return i(X.Provider,{value:e,children:t})}c();var Q={"off-while-running":{title:`Turn off while running?`,message:`The device is running. Cutting its power now interrupts what it is doing.`,confirm:`Turn off`},unlock:{title:`Unlock?`,message:`The lock will open.`,confirm:`Unlock`},install:{title:`Install the update?`,message:`The device may restart and be unavailable for a while.`,confirm:`Install`},press:{title:`Run it now?`,message:`The device acts as soon as you confirm.`,confirm:`Run`}},$=e=>e===`off-while-running`?`deviceHero.model.confirmOff`:`deviceHero.model.confirm.${e}`;function ee(){let{t:e,i18n:t}=W(),r=t.language;return n(()=>{let t=t=>({title:e(`${$(t)}.title`,Q[t].title),message:e(`${$(t)}.message`,Q[t].message),confirm:e(`${$(t)}.confirm`,Q[t].confirm)});return{noValue:e(`deviceHero.model.noValue`,`–`),callFailed:e(`deviceHero.model.callFailed`,`The device did not accept the command`),historyTooltip:e(`deviceHero.utility.history.tooltip`,`Opens the history of this device.`),consumables:{label:e(`deviceHero.utility.consumables.label`,`Consumables`),low:t=>e(`deviceHero.utility.consumables.low`,`{{count}} low`,{count:t}),ok:e(`deviceHero.utility.consumables.ok`,`OK`),tooltip:e(`deviceHero.utility.consumables.tooltip`,`Shows the level of each consumable and which ones need attention.`)},power:{label:e(`deviceHero.utility.power.label`,`Power source`),on:e(`deviceHero.utility.power.on`,`On`),off:e(`deviceHero.utility.power.off`,`Off`),tooltip:e(`deviceHero.utility.power.tooltip`,`Opens a menu to cut or restore the power feeding this device, or to restart it.`),tooltipReadOnly:e(`deviceHero.utility.power.tooltipReadOnly`,`Whether the power source feeding this device is on. Your session cannot change it.`)},confirm:{"off-while-running":t(`off-while-running`),unlock:t(`unlock`),install:t(`install`),press:t(`press`)}}},[e,r])}c();function te(e){let[t]=o(()=>new s({defaultOptions:{queries:{retry:!1,staleTime:5e3}}}));return e??t}function ne({deviceId:e,kind:t,canActuate:n,onDrawn:r,showName:o}){let s=z();return a(()=>{r?.(!0)},[r]),i(`div`,{className:`flex justify-center`,children:i(L,{kind:t,deviceId:e,canActuate:n,orientation:s?`vertical`:`horizontal`,showName:o!==!1})})}function re(e){let t=S(e.deviceId);return t===`pending`?i(A,{className:`h-72 w-full`}):t===null?i(ie,{...e}):i(ne,{deviceId:e.deviceId,kind:t,canActuate:e.canActuate,onDrawn:e.onDrawn,showName:e.showName})}function ie(e){let t=z();return i(`div`,{className:`flex justify-center`,children:i(D,{deviceId:e.deviceId,canActuate:e.canActuate,orientation:t?`vertical`:`horizontal`,showName:e.showName!==!1,placeholder:i(A,{className:`h-72 w-full`}),fallback:i(`div`,{className:`w-full`,children:i(ae,{...e})}),...e.onDrawn===void 0?{}:{onDrawn:e.onDrawn}})})}function ae({deviceId:e,canActuate:n,fallback:a,onDrawn:s,defaultHistoryOpen:c,showName:l}){let{t:u,i18n:f}=W(),p=ee(),[m,_]=o(c===!0),v=R(e),y=G(v.presence,v.list),x=r(()=>_(!0),[]);return t(d,{children:[i(w,{deviceId:e,canActuate:n,lang:C(f.language),labels:p,renderRemote:t=>i(J,{deviceId:e,deviceName:t}),fallback:a??null,showName:l!==!1,...y?{onOpenHistory:x}:{},...s===void 0?{}:{onDrawn:s}}),m?i(M,{open:!0,onOpenChange:e=>!e&&_(!1),children:t(j,{width:`xl`,scroll:`body`,children:[i(T,{children:i(b,{children:u(`deviceModule.history`,`History`)})}),i(g,{className:`mt-3`,children:i(h,{deviceId:e})})]})}):null]})}function oe({deviceId:e,trpcClient:t,theme:r,locale:a,canActuate:o=!1,defaultHistoryOpen:s,queryClient:c,fallback:l,onDrawn:d,onOpenDevice:h,onOpenCamera:g,onClose:_,onNavigate:v,showName:y}){let b=te(c),x=n(()=>H.cloneInstance({lng:a}),[a]),S=n(()=>K(x.t.bind(x)),[x]),C=n(()=>({onOpenDevice:h,onOpenCamera:g,onClose:_,onNavigate:v}),[h,g,_,v]);return i(`div`,{className:r,"data-theme":r,"data-testid":`device-detail-module`,children:i(q,{i18n:x,children:i(m,{t:S,children:i(f,{client:t,children:i(P.Provider,{client:t,queryClient:b,children:i(u,{client:b,children:i(p,{children:i(Z,{value:C,children:i(re,{deviceId:e,canActuate:o,fallback:l,onDrawn:d,defaultHistoryOpen:s,showName:y})})})})})})})})})}export{J as n,oe as t};
@@ -1 +1 @@
1
- import{S as e}from"./_virtual_mf___mfe_internal__admin_ui_host__loadShare___mf_0_tanstack_mf_1_react_mf_2_query__loadShare__.js-CEyXHAdg.js";import{tt as t}from"./index-DqWOkhIM.js";function n(n,r){switch(r.kind){case`resolved`:return e(t,{type:r.integration.addonId,size:`sm`});case`orphan`:return e(t,{type:n.addonId,size:`sm`});case`unknown`:case`unlinked`:return null}}export{n as t};
1
+ import{S as e}from"./_virtual_mf___mfe_internal__admin_ui_host__loadShare___mf_0_tanstack_mf_1_react_mf_2_query__loadShare__.js-CEyXHAdg.js";import{tt as t}from"./index-DrSk7mpa.js";function n(n,r){switch(r.kind){case`resolved`:return e(t,{type:r.integration.addonId,size:`sm`});case`orphan`:return e(t,{type:n.addonId,size:`sm`});case`unknown`:case`unlinked`:return null}}export{n as t};
@@ -0,0 +1 @@
1
+ import"./src-BdsfPiRP.js";