@camstack/addon-admin-ui 1.2.641 → 1.2.642

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 (128) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/dist/assets/Addons-CWndl9XT.js +5 -0
  3. package/dist/assets/{AdminPage-CUqIQD-H.js → AdminPage-BZvFoK-C.js} +1 -1
  4. package/dist/assets/{AdminSectionedPage-CsDB11-C.js → AdminSectionedPage-BNsx61E4.js} +1 -1
  5. package/dist/assets/AiProfiles-CfmaO1o5.js +3 -0
  6. package/dist/assets/{BootstrapSettingsForm-DO8UZJ6u.js → BootstrapSettingsForm-CkiwOoo0.js} +1 -1
  7. package/dist/assets/Build-DcfjQ5XX.js +39 -0
  8. package/dist/assets/{Calendars-DnXBynF2.js → Calendars-DtHYKG5I.js} +1 -1
  9. package/dist/assets/{CameraGrids-CGGMwc_i.js → CameraGrids-Cx67r4Df.js} +1 -1
  10. package/dist/assets/Cluster-BlmFWuTu.js +1 -0
  11. package/dist/assets/CompositionBlockEditor-kfpX5tHd.js +2 -0
  12. package/dist/assets/CompositionEditorPage-DgQY61Sl.js +1 -0
  13. package/dist/assets/Data-Dz-A8tUL.js +2 -0
  14. package/dist/assets/DeviceDetail-qgkGjG5-.js +2 -0
  15. package/dist/assets/{Devices-CT2RYNZk.js → Devices-BrW5bSBu.js} +1 -1
  16. package/dist/assets/{EmbedDevicePage-BoOEbiYf.js → EmbedDevicePage-BeF3FBg6.js} +1 -1
  17. package/dist/assets/{EmbedPlayerPage-Bt34Uq_S.js → EmbedPlayerPage-Dw6ZuDJq.js} +1 -1
  18. package/dist/assets/History-Bso_JvSZ.js +1 -0
  19. package/dist/assets/Identity-BGsRk3P5.js +1 -0
  20. package/dist/assets/InstancesTable-CebcSa4W.js +1 -0
  21. package/dist/assets/IntegrationDetail-BzGmbnVv.js +1 -0
  22. package/dist/assets/IntegrationWizard-ClEvGA8I.js +1 -0
  23. package/dist/assets/Integrations-CPsDqMeh.js +1 -0
  24. package/dist/assets/{Integrations-CHWKUBxG.js → Integrations-j4mEGq7T.js} +2 -2
  25. package/dist/assets/Library-DIEraCix.js +1 -0
  26. package/dist/assets/Locations-B3Hqll41.js +3 -0
  27. package/dist/assets/{Logs-BD98dxlx.js → Logs-C7-7A0fI.js} +1 -1
  28. package/dist/assets/{MaskShapeCanvas-ecduqbHc.js → MaskShapeCanvas-dpTYLn-I.js} +1 -1
  29. package/dist/assets/{MotionZonesSettings-E2CBduzM.js → MotionZonesSettings-BeZ8c48s.js} +1 -1
  30. package/dist/assets/MyAccess-Bo1ZsFv7.js +2 -0
  31. package/dist/assets/Network-BwvJ0Qbh.js +1 -0
  32. package/dist/assets/NodeAddonsSettingsPanel-BWTKJlYh.js +2 -0
  33. package/dist/assets/Notifications-Drs7V7HZ.js +1 -0
  34. package/dist/assets/Pipeline-C8Anqyk1.js +1 -0
  35. package/dist/assets/{PrivacyMaskSettings-D3lFTl9V.js → PrivacyMaskSettings-ufaM81lx.js} +1 -1
  36. package/dist/assets/Recordings-ChIuKrFQ.js +1 -0
  37. package/dist/assets/{RemoteGrid-CwPXjc2r.js → RemoteGrid-mhCQPrw4.js} +1 -1
  38. package/dist/assets/{ScanSubnetEditor-BFSiRhsy.js → ScanSubnetEditor-ByUeuUPH.js} +1 -1
  39. package/dist/assets/{SceneMonitorEditor-CM6T_d7q.js → SceneMonitorEditor-_WrCw9Qm.js} +1 -1
  40. package/dist/assets/SessionsList-IXq42auR.js +2 -0
  41. package/dist/assets/Showroom-JdOKuaQ4.js +1 -0
  42. package/dist/assets/StorageLocationsTable-CM-mBdqU.js +1 -0
  43. package/dist/assets/{System-B5FQsWY5.js → System-BHtMqcXN.js} +1 -1
  44. package/dist/assets/{Templates-XciXSq1V.js → Templates-BH4pm3Du.js} +1 -1
  45. package/dist/assets/{Terminal-CaA2dzaa.js → Terminal-C_8sHhI0.js} +4 -4
  46. package/dist/assets/{TrainingProviders-CQLRm8lA.js → TrainingProviders-Czk4fPXW.js} +1 -1
  47. package/dist/assets/{Viewer-VvBaSRSV.js → Viewer-g8Ina8Au.js} +1 -1
  48. package/dist/assets/{_virtual_mf-localSharedImportMap___mfe_internal__admin_ui_host-CkmvkSwb.js → _virtual_mf-localSharedImportMap___mfe_internal__admin_ui_host-DP55Xu7L.js} +1 -1
  49. package/dist/assets/{action-draft-BvciWW8C.js → action-draft-B8uc37EO.js} +1 -1
  50. package/dist/assets/{ai-page.helpers-C5XS4FxE.js → ai-page.helpers-wT_pU6RH.js} +1 -1
  51. package/dist/assets/assignment-candidates-CcPnvJbz.js +1 -0
  52. package/dist/assets/{authed-media-Cf4Trged.js → authed-media-C3W-vMO8.js} +1 -1
  53. package/dist/assets/{board-model-I4EfA-2s.js → board-model-CTJyPV2E.js} +1 -1
  54. package/dist/assets/client-BsGn43se.js +921 -0
  55. package/dist/assets/create-composition-zb2jPO3-.js +2 -0
  56. package/dist/assets/device-detail-DJnsgqNb.js +1 -0
  57. package/dist/assets/{device-integration-icon-BRzOqB1P.js → device-integration-icon-C_Binc-A.js} +1 -1
  58. package/dist/assets/device-picker-model-ChgpoWnb.js +1 -0
  59. package/dist/assets/{dist-DmSEyYE1.js → dist-DZjvZVe0.js} +1 -1
  60. package/dist/assets/{format-BdxfvhCK.js → format-Bg7MmBWg.js} +1 -1
  61. package/dist/assets/{hostInit-D3mJDyZx.js → hostInit-CgEEuJPE.js} +1 -1
  62. package/dist/assets/i18n-DkvVOm9n.js +1 -0
  63. package/dist/assets/icons-pVM3dlwn.js +1 -0
  64. package/dist/assets/index-0ukvsxX5.css +2 -0
  65. package/dist/assets/index-qwEfJCr_.js +4 -0
  66. package/dist/assets/{linked-devices-model-BVzABEa3.js → linked-devices-model-BClISpye.js} +1 -1
  67. package/dist/assets/{mf-entry-bootstrap-0-8284270c.js → mf-entry-bootstrap-0-5b022514.js} +2 -2
  68. package/dist/assets/mount-ChgpoWnb.js +1 -0
  69. package/dist/assets/{notification-rule-status-C-VLcvtU.js → notification-rule-status-BzjC2WhB.js} +1 -1
  70. package/dist/assets/player-overlays-BHFWIcWp.js +1 -0
  71. package/dist/assets/remoteEntry-x4q7yukG.js +1 -0
  72. package/dist/assets/scan-eye-DQQVMuam.js +1 -0
  73. package/dist/assets/src-5RckhTPX.js +230 -0
  74. package/dist/assets/step-inspector-model-C-JrVwID.js +1 -0
  75. package/dist/assets/{use-scenes-feed-DfkADx4C.js → use-scenes-feed-Cr8kNEzV.js} +1 -1
  76. package/dist/assets/{use-stationary-objects-DDhWabTo.js → use-stationary-objects-Befc4ui9.js} +1 -1
  77. package/dist/assets/{useAdminDeviceRemoval-BmLGEMw1.js → useAdminDeviceRemoval-zLWwXi-O.js} +1 -1
  78. package/dist/assets/useEventInvalidation-ChgpoWnb.js +1 -0
  79. package/dist/assets/useNodeUrlSelection-C3gvoDWa.js +1 -0
  80. package/dist/assets/useTemplateSave-B5WJqsrS.js +1 -0
  81. package/dist/assets/{virtual_mf-REMOTE_ENTRY_ID___mfe_internal__admin_ui_host__remoteEntry-_hash_-C2sHdE8n.js → virtual_mf-REMOTE_ENTRY_ID___mfe_internal__admin_ui_host__remoteEntry-_hash_-CqjtgsPE.js} +2 -2
  82. package/dist/index.html +8 -10
  83. package/dist/server/addon.js +1 -1
  84. package/package.json +2 -2
  85. package/dist/assets/Addons-BVqayv5f.js +0 -5
  86. package/dist/assets/AiProfiles-D9UMfb1B.js +0 -3
  87. package/dist/assets/Build-Ckpeo8-S.js +0 -39
  88. package/dist/assets/Cluster-BG8K_aky.js +0 -1
  89. package/dist/assets/CompositionBlockEditor-DL8s4LrK.js +0 -2
  90. package/dist/assets/CompositionEditorPage-BJqhDbGk.js +0 -1
  91. package/dist/assets/Data-C1ylm7VT.js +0 -2
  92. package/dist/assets/DeviceDetail-B-wMTWvM.js +0 -2
  93. package/dist/assets/History-iymgWNLR.js +0 -1
  94. package/dist/assets/Identity-WMgYhTV1.js +0 -1
  95. package/dist/assets/InstancesTable-BYkr96OT.js +0 -1
  96. package/dist/assets/IntegrationDetail-CipUe4-o.js +0 -1
  97. package/dist/assets/Integrations-uDoGgugZ.js +0 -1
  98. package/dist/assets/Library-BMcErQK1.js +0 -1
  99. package/dist/assets/Locations-CG7gsBbp.js +0 -3
  100. package/dist/assets/MyAccess-Ck92wEjS.js +0 -2
  101. package/dist/assets/Network-DiN1tCRR.js +0 -1
  102. package/dist/assets/NodeAddonsSettingsPanel-hC4ug7ZM.js +0 -2
  103. package/dist/assets/Notifications-CD5rw3iH.js +0 -1
  104. package/dist/assets/Pipeline-CRn_2ImO.js +0 -1
  105. package/dist/assets/Recordings-DaqpAM_Q.js +0 -1
  106. package/dist/assets/SessionsList-D3Ql3UPO.js +0 -2
  107. package/dist/assets/Showroom-Dw45hf8c.js +0 -1
  108. package/dist/assets/StorageLocationsTable-DLf3dgQ7.js +0 -1
  109. package/dist/assets/addon-icons-context-CJC7KJun.js +0 -1
  110. package/dist/assets/assignment-candidates-BNsiRx4s.js +0 -1
  111. package/dist/assets/client-BpjZC14K.js +0 -921
  112. package/dist/assets/create-composition-ZWJssibt.js +0 -2
  113. package/dist/assets/device-detail-BNCr3hme.js +0 -1
  114. package/dist/assets/device-picker-model-j6jrW5Zc.js +0 -1
  115. package/dist/assets/i18n-XxenOoax.js +0 -1
  116. package/dist/assets/icons-4uPpfl8u.js +0 -1
  117. package/dist/assets/index-Cy-qb6UR.css +0 -2
  118. package/dist/assets/index-DntC4HNI.js +0 -4
  119. package/dist/assets/mount-j6jrW5Zc.js +0 -1
  120. package/dist/assets/player-overlays-Br5iMMD4.js +0 -1
  121. package/dist/assets/remoteEntry-D-Jq9W59.js +0 -1
  122. package/dist/assets/scan-eye-B0eLch9E.js +0 -1
  123. package/dist/assets/src-RJGsvxnp.js +0 -169
  124. package/dist/assets/sso-popup-Dw_S_LL7.js +0 -1
  125. package/dist/assets/step-inspector-model-CFHqajQG.js +0 -1
  126. package/dist/assets/useEventInvalidation-j6jrW5Zc.js +0 -1
  127. package/dist/assets/useNodeUrlSelection-BKu7pui0.js +0 -1
  128. package/dist/assets/useTemplateSave-jni5tkrj.js +0 -1
@@ -1 +0,0 @@
1
- import{C as e,S as t,Y as n,et as r}from"./_virtual_mf___mfe_internal__admin_ui_host__loadShare___mf_0_tanstack_mf_1_react_mf_2_query__loadShare__.js-CEyXHAdg.js";import{Ea as i,Ta as a,ut as o}from"./player-overlays-Br5iMMD4.js";import{Ai as s,dr as c,tf as l,v as u,xt as d}from"./src-RJGsvxnp.js";import{G as f,W as p,ut as m}from"./index-DntC4HNI.js";r();function h({title:n,children:r}){return e(`div`,{className:`rounded-lg border border-border bg-surface overflow-hidden`,children:[t(`div`,{className:`border-b border-border px-4 py-2.5`,children:t(`h2`,{className:`text-xs font-semibold text-foreground uppercase tracking-wider`,children:n})}),t(`div`,{className:`p-4`,children:r})]})}function g({name:n,cssVar:r,hex:i}){return e(`div`,{className:`flex flex-col items-center gap-1.5`,children:[t(`div`,{className:`h-10 w-10 rounded-lg border border-border shadow-inner`,style:{backgroundColor:r?`var(${r})`:i}}),t(`span`,{className:`text-[10px] text-foreground-subtle text-center leading-tight`,children:n})]})}var _={sections:[{id:`demo`,title:`Demo Fields`,columns:2,fields:[{key:`name`,type:`text`,label:`Name`,placeholder:`Enter name`},{key:`count`,type:`number`,label:`Count`,min:0,max:100,unit:`items`},{key:`enabled`,type:`boolean`,label:`Enabled`},{key:`mode`,type:`select`,label:`Mode`,options:[{value:`a`,label:`Alpha`},{value:`b`,label:`Beta`}]},{key:`tags`,type:`tags`,label:`Tags`,span:2,suggestions:[`camera`,`zone`,`alert`]},{key:`confidence`,type:`slider`,label:`Confidence`,min:0,max:100,step:5,unit:`%`,span:2},{key:`info`,type:`info`,label:`Note`,content:`This is an informational message for the user.`,variant:`info`}]}]};function v(){let[r,v]=n(!1),[b,x]=n(null),[S,C]=n({name:`Example`,count:10,enabled:!0,mode:`a`,tags:[`camera`],confidence:60});return e(`div`,{className:`p-6 space-y-6 max-w-5xl mx-auto`,children:[e(`div`,{className:`mb-6`,children:[t(`h1`,{className:`text-xl font-bold text-foreground`,children:`Component Showroom`}),t(`p`,{className:`text-sm text-foreground-subtle mt-1`,children:`All UI components at a glance`})]}),t(h,{title:`Typography`,children:e(`div`,{className:`space-y-3`,children:[t(`h1`,{className:`text-2xl font-bold text-foreground`,children:`Heading 1 — Display title`}),t(`h2`,{className:`text-xl font-semibold text-foreground`,children:`Heading 2 — Section title`}),t(`h3`,{className:`text-base font-semibold text-foreground`,children:`Heading 3 — Card title`}),t(`h4`,{className:`text-sm font-semibold text-foreground`,children:`Heading 4 — Sub-section`}),t(`p`,{className:`text-sm text-foreground`,children:`Body text — Regular paragraph content goes here. It uses the foreground color.`}),t(`p`,{className:`text-sm text-foreground-subtle`,children:`Subtle text — Secondary/descriptive text with reduced emphasis.`}),t(`p`,{className:`text-xs text-foreground-subtle uppercase tracking-wider font-semibold`,children:`Label / Caption`}),t(`p`,{className:`text-xs text-foreground-disabled`,children:`Disabled / placeholder text`})]})}),t(h,{title:`Colors`,children:e(`div`,{className:`flex flex-wrap gap-4`,children:[t(g,{name:`primary`,cssVar:`--color-primary`}),t(g,{name:`background`,cssVar:`--color-background`}),t(g,{name:`surface`,cssVar:`--color-surface`}),t(g,{name:`foreground`,cssVar:`--color-foreground`}),t(g,{name:`success`,cssVar:`--color-success`}),t(g,{name:`warning`,cssVar:`--color-warning`}),t(g,{name:`danger`,cssVar:`--color-danger`}),t(g,{name:`info`,cssVar:`--color-info`}),t(g,{name:`border`,cssVar:`--color-border`}),t(`div`,{className:`w-px`}),t(g,{name:`onvif`,hex:`#3b82f6`}),t(g,{name:`hikvision`,hex:`#a855f7`}),t(g,{name:`reolink`,hex:`#06b6d4`}),t(g,{name:`ha`,hex:`#22d3ee`}),t(g,{name:`rtsp`,hex:`#78716c`})]})}),t(h,{title:`Buttons`,children:e(`div`,{className:`flex flex-wrap gap-3`,children:[t(s,{variant:`unstyled`,className:`inline-flex items-center gap-1.5 rounded-md bg-primary px-4 py-2 text-sm font-medium text-white hover:opacity-90 transition-opacity`,children:`Primary`}),t(s,{variant:`unstyled`,className:`inline-flex items-center gap-1.5 rounded-md border border-border bg-surface px-4 py-2 text-sm font-medium text-foreground hover:bg-surface-hover transition-colors`,children:`Secondary`}),t(s,{variant:`unstyled`,className:`inline-flex items-center gap-1.5 rounded-md border border-danger/40 bg-danger/10 px-4 py-2 text-sm font-medium text-danger hover:bg-danger/20 transition-colors`,children:`Danger`}),t(s,{variant:`unstyled`,disabled:!0,className:`inline-flex items-center gap-1.5 rounded-md bg-primary px-4 py-2 text-sm font-medium text-white opacity-40 cursor-not-allowed`,children:`Disabled`}),t(s,{variant:`unstyled`,className:`inline-flex items-center gap-1.5 rounded-md border border-warning/40 bg-warning/10 px-4 py-2 text-sm font-medium text-warning hover:bg-warning/20 transition-colors`,children:`Warning`}),t(s,{variant:`unstyled`,className:`inline-flex items-center gap-1.5 rounded-md border border-success/40 bg-success/10 px-4 py-2 text-sm font-medium text-success hover:bg-success/20 transition-colors`,children:`Success`})]})}),t(h,{title:`Inputs`,children:e(`div`,{className:`grid grid-cols-1 md:grid-cols-2 gap-4`,children:[e(`div`,{children:[t(`label`,{className:`block text-xs font-medium text-foreground mb-1`,children:`Text input`}),t(l,{type:`text`,className:`w-full rounded-md border border-border bg-background px-3 py-2 text-sm text-foreground outline-none focus:border-primary focus:ring-1 focus:ring-primary/30`,placeholder:`Type something...`})]}),e(`div`,{children:[t(`label`,{className:`block text-xs font-medium text-foreground mb-1`,children:`Number input`}),t(l,{type:`number`,className:`w-full rounded-md border border-border bg-background px-3 py-2 text-sm text-foreground outline-none focus:border-primary focus:ring-1 focus:ring-primary/30`,placeholder:`0`})]}),e(`div`,{children:[t(`label`,{className:`block text-xs font-medium text-foreground mb-1`,children:`Password input`}),t(l,{type:`password`,className:`w-full rounded-md border border-border bg-background px-3 py-2 text-sm text-foreground outline-none focus:border-primary focus:ring-1 focus:ring-primary/30`,placeholder:`••••••••`})]}),e(`div`,{children:[t(`label`,{className:`block text-xs font-medium text-foreground mb-1`,children:`Select`}),e(o,{className:`w-full`,children:[t(`option`,{children:`Option A`}),t(`option`,{children:`Option B`}),t(`option`,{children:`Option C`})]})]}),e(`div`,{className:`md:col-span-2`,children:[t(`label`,{className:`block text-xs font-medium text-foreground mb-1`,children:`Textarea`}),t(c,{className:`w-full rounded-md border border-border bg-background px-3 py-2 text-sm text-foreground outline-none focus:border-primary focus:ring-1 focus:ring-primary/30 resize-y min-h-[60px]`,placeholder:`Enter multi-line text...`,rows:3})]}),t(`div`,{children:e(`label`,{className:`flex items-center gap-2 cursor-pointer select-none`,children:[t(a,{className:`h-3.5 w-3.5 rounded border-border accent-primary`,defaultChecked:!0}),t(`span`,{className:`text-xs font-medium text-foreground`,children:`Checkbox (checked)`})]})}),t(`div`,{children:e(`div`,{className:`flex items-center justify-between`,children:[t(`span`,{className:`text-xs font-medium text-foreground`,children:`Toggle switch`}),t(y,{})]})}),e(`div`,{children:[t(`label`,{className:`block text-xs font-medium text-foreground mb-1`,children:`Slider`}),t(i,{className:`w-full h-1 accent-primary cursor-pointer`,min:0,max:100,defaultValue:60})]}),e(`div`,{children:[t(`label`,{className:`block text-xs font-medium text-foreground mb-1`,children:`Tags example`}),t(`div`,{className:`flex flex-wrap gap-1.5 rounded-md border border-border bg-background px-2 py-1.5 min-h-[38px]`,children:[`camera`,`zone`,`alert`].map(e=>t(`span`,{className:`inline-flex items-center gap-1 rounded-md bg-primary/10 px-1.5 py-0.5 text-xs text-primary`,children:e},e))})]})]})}),e(h,{title:`ConditionKindPicker`,children:[e(`div`,{className:`flex flex-wrap items-center gap-3`,children:[t(s,{variant:`outline`,onClick:()=>v(!0),children:`Add a condition`}),t(`span`,{className:`text-xs text-foreground-subtle`,children:b??`Nothing picked`})]}),t(u,{open:r,onOpenChange:v,title:`Add a condition`,context:`trigger`,underNot:!1,treeFull:!1,recentKey:`showroom`,textsOf:e=>({label:e,description:`A ${e} row`,example:e}),categoryLabelOf:e=>e,reasonOf:e=>e,onPick:e=>{x(e),v(!1)}})]}),t(h,{title:`Badges`,children:e(`div`,{className:`space-y-3`,children:[e(`div`,{children:[t(`p`,{className:`text-xs text-foreground-subtle mb-2`,children:`StatusBadge`}),t(`div`,{className:`flex flex-wrap gap-2`,children:[`running`,`stopped`,`error`,`online`,`offline`,`idle`].map(e=>t(d,{status:e},e))})]}),e(`div`,{children:[t(`p`,{className:`text-xs text-foreground-subtle mb-2`,children:`CapabilityBadges`}),t(f,{capabilities:[`streaming`,`detection`,`recording`,`audio`]})]})]})}),t(h,{title:`Cards`,children:e(`div`,{className:`grid grid-cols-1 md:grid-cols-2 gap-4`,children:[e(`div`,{className:`rounded-lg bg-surface p-4`,children:[t(`h3`,{className:`text-sm font-semibold text-foreground mb-1`,children:`Surface card`}),t(`p`,{className:`text-xs text-foreground-subtle`,children:"Uses `bg-surface`. Default card background."})]}),e(`div`,{className:`rounded-lg border border-border bg-surface p-4`,children:[t(`h3`,{className:`text-sm font-semibold text-foreground mb-1`,children:`Bordered card`}),t(`p`,{className:`text-xs text-foreground-subtle`,children:"Uses `border border-border bg-surface`."})]}),e(`div`,{className:`rounded-lg border border-primary/30 bg-primary/5 p-4`,children:[t(`h3`,{className:`text-sm font-semibold text-primary mb-1`,children:`Accent card`}),t(`p`,{className:`text-xs text-foreground-subtle`,children:`Highlighted with primary color.`})]}),e(`div`,{className:`rounded-lg bg-background p-4`,children:[t(`h3`,{className:`text-sm font-semibold text-foreground mb-1`,children:`Background card`}),t(`p`,{className:`text-xs text-foreground-subtle`,children:"Uses `bg-background`. Inset card."})]})]})}),t(h,{title:`Provider Icons`,children:t(`div`,{className:`flex flex-wrap gap-4`,children:[`onvif`,`hikvision`,`reolink`,`homeassistant`,`rtsp`,`onvif`].map(e=>t(p,{type:e,size:`lg`,showLabel:!0},e))})}),e(h,{title:`Form Builder Demo`,children:[t(m,{schema:_,values:S,onChange:C}),e(`details`,{className:`mt-3`,children:[t(`summary`,{className:`text-[10px] text-foreground-subtle cursor-pointer hover:text-foreground`,children:`View current values`}),t(`pre`,{className:`mt-2 rounded-md bg-background p-3 text-[10px] text-foreground-subtle overflow-auto`,children:JSON.stringify(S,null,2)})]})]}),t(h,{title:`Info Boxes`,children:t(`div`,{className:`space-y-2`,children:[{variant:`info`,label:`Info`,content:`This is an informational message. Use it for tips and hints.`},{variant:`warning`,label:`Warning`,content:`This action may have side effects. Proceed with caution.`},{variant:`success`,label:`Success`,content:`Operation completed successfully. All systems are green.`},{variant:`danger`,label:`Danger`,content:`This operation is irreversible. Data will be permanently deleted.`}].map(({variant:n,label:r,content:i})=>{let a={info:{border:`border-info`,bg:`bg-info/5`,text:`text-info`},warning:{border:`border-warning`,bg:`bg-warning/5`,text:`text-warning`},success:{border:`border-success`,bg:`bg-success/5`,text:`text-success`},danger:{border:`border-danger`,bg:`bg-danger/5`,text:`text-danger`}}[n];return e(`div`,{className:`rounded-md border-l-4 px-3 py-2.5 ${a.border} ${a.bg}`,children:[t(`p`,{className:`text-xs font-semibold mb-0.5 ${a.text}`,children:r}),t(`p`,{className:`text-xs text-foreground-subtle leading-relaxed`,children:i})]},n)})})})]})}function y(){let[e,r]=n(!0);return t(s,{variant:`unstyled`,type:`button`,role:`switch`,"aria-checked":e,onClick:()=>r(e=>!e),className:[`relative inline-flex h-4 w-8 shrink-0 items-center rounded-full transition-colors duration-150 cursor-pointer`,e?`bg-primary`:`bg-foreground-subtle/30`].join(` `),children:t(`span`,{className:[`inline-block h-3 w-3 rounded-full bg-white shadow transition-transform duration-150`,e?`translate-x-4`:`translate-x-0.5`].join(` `)})})}export{v as ShowroomPage};
@@ -1 +0,0 @@
1
- import{C as e,K as t,S as n,V as r,Y as i,et as a,o}from"./_virtual_mf___mfe_internal__admin_ui_host__loadShare___mf_0_tanstack_mf_1_react_mf_2_query__loadShare__.js-CEyXHAdg.js";import{Dr as s,St as c,Ur as l,ct as u,oi as d,qn as f,wn as p}from"./player-overlays-Br5iMMD4.js";import{ws as m}from"./client-BpjZC14K.js";import{t as h}from"./chevron-down-CBb-F8DT.js";import{t as g}from"./archive-ChKlYFY2.js";import{t as _}from"./eraser-B3lnG9yK.js";import{t as v}from"./hard-drive-download-C6N6tovA.js";import{Ai as y,Qi as b,Qu as x,Xu as S,Zu as C,nf as w,qs as T,wi as ee,xu as te}from"./src-RJGsvxnp.js";import{t as E}from"./i18n-XxenOoax.js";import{t as D}from"./useTranslation-BJr-n0es.js";import{Y as O,st as k}from"./index-DntC4HNI.js";import{t as A}from"./format-size-DIxKXxtj.js";import{t as ne}from"./InstancesTable-BYkr96OT.js";a();var re=`forceDeleteLocation`;function ie({row:e}){let{t}=D(),r=u(),i=o(),a=b(),s=async()=>{if(await r({title:t(`system.storage.forceDeleteTitle`,`Force delete "{{name}}"?`,{name:e.name}),message:t(`system.storage.forceDeleteNote`,`Removes the record only, without checking what is on the location. Anything still stored there becomes unreachable — index rows naming it stop resolving, and playback of those segments goes silently black rather than erroring.`),confirmLabel:t(`system.storage.forceDelete`,`Force delete`),variant:`danger`}))try{await a.mutateAsync({addonId:e.addonId,action:re,input:{id:e.id}}),await i.invalidateQueries({queryKey:[O]}),await i.invalidateQueries({queryKey:[[`storage`,`listLocations`]]})}catch(n){k({title:t(`providerInstances.deleteFailed`,`Could not delete`),message:`${e.name}: ${n instanceof Error?n.message:String(n)}`,severity:`critical`})}};return n(w,{icon:p,variant:`ghost`,size:`sm`,disabled:a.isPending,"aria-label":t(`system.storage.forceDeleteRow`,`Force delete {{name}}`,{name:e.name}),onClick:()=>void s()})}function ae(e){return`${(e/1024**3).toFixed(e>=100*1024**3?0:1)} GB`}function oe(e){return new Date(e).toLocaleString(void 0,{dateStyle:`medium`,timeStyle:`short`})}function j({drain:t}){let{t:r}=D();if(t.kind===`idle`)return null;if(t.kind===`unreported`)return n(`span`,{"data-testid":`drain-unreported`,className:`text-[10px] text-foreground-subtle`,title:r(`storage.drainProgressLine.thisLocationIsDrainingThe`,`This location is draining. The hub has not reported how much is left yet — either the drain has just been set, or this hub predates the drain-progress report.`),children:r(`storage.drainProgressLine.drainingRemainingNotReportedYet`,`Draining · remaining not reported yet`)});if(t.kind===`drained`)return n(`span`,{"data-testid":`drain-done`,className:`text-[10px] text-success`,title:r(`storage.drainProgressLine.everythingThatWasHereHas`,`Everything that was here has been moved. The location is still in drain mode — it receives no new writes until you change that.`),children:r(`storage.drainProgressLine.drainedNothingLeftToMove`,`Drained · nothing left to move`)});let i=t.drainedFraction===null?null:Math.round(t.drainedFraction*100);return e(`span`,{"data-testid":`drain-progress`,className:`flex items-center gap-1.5 text-[10px] text-foreground-subtle tabular-nums`,children:[i!==null&&n(`span`,{"data-testid":`drain-bar`,className:`inline-block h-1 w-10 rounded-full bg-border overflow-hidden`,role:`progressbar`,"aria-label":r(`storage.drainProgressLine.drainProgress`,`Drain progress`),"aria-valuenow":i,"aria-valuemin":0,"aria-valuemax":100,children:n(`span`,{className:`block h-full bg-warning`,style:{width:`${i}%`}})}),e(`span`,{children:[r(`storage.drainProgressLine.left`,{size:ae(t.bytesRemaining)}),i!==null&&` · ${r(`storage.drainProgressLine.moved`,{percent:i})}`]}),t.estimatedEmptyAtMs===null?n(`span`,{"data-testid":`drain-eta-absent`,title:r(`storage.drainProgressLine.theDrainIsPacedBy`,`The drain is paced by how fast this class of data is still growing, and that has not been observed yet. There is no date to give.`),children:r(`storage.drainProgressLine.emptyTimeNotKnownYet`,`· empty time not known yet`)}):e(`span`,{"data-testid":`drain-eta`,children:[`·`,` `,r(`storage.drainProgressLine.empty`,{when:oe(t.estimatedEmptyAtMs)})]})]})}var M=[`ok`,`warn`,`critical`];function N(e){return e>=.95?`critical`:e>=.85?`warn`:`ok`}function P(e){return Math.min(1,Math.max(0,e))}function F(e){let{availableBytes:t,totalBytes:n}=e;if(n===null||n<=0||t===null)return null;let r=P((n-t)/n);return{fraction:r,severity:N(r),recordingsFraction:P(e.usedBytes/n),freeBytes:t,totalBytes:n}}function se(e){if(e.length===0)return null;let t=0,n=0,r=0,i=0,a=null;for(let o of e){let e=F(o);if(e===null){n+=1;continue}t+=1,r+=e.totalBytes,i+=e.freeBytes,(a===null||M.indexOf(e.severity)>M.indexOf(a))&&(a=e.severity)}return{knownVolumes:t,unknownVolumes:n,totalBytes:r,freeBytes:i,severity:a}}function I(e){return Math.min(1,Math.max(0,e))}function L(e){return Math.round(I(e)*1e3)/10}function R(e){return`${String(Math.round(I(e)*100))}%`}function ce(e,t,n={}){let{totalBytes:r,availableBytes:i}=e;if(r===null||r<=0||i===null){let e=n.ownedBytes===void 0||n.ownedBytes===null||!Number.isFinite(n.ownedBytes)||n.ownedBytes<0?null:A(n.ownedBytes);return{kind:`unknown`,owned:e,summary:e===null?E.t(`helpers.locationCapacityBar.unknownSummary`):E.t(`helpers.locationCapacityBar.unknownSummaryOwned`,{size:e})}}let a=Math.min(Math.max(i,0),r),o=r-a,s=t===null||t<=0?0:t,c=Math.min(s,a),l=s>a,u=a-c,d=n.ownedBytes,f=d==null||!Number.isFinite(d)||d<0?null:Math.min(d,o),p=o-(f??0),m=F({usedBytes:f??o,availableBytes:a,totalBytes:r}),h=m===null?I(o/r):m.fraction,g=m===null?N(h):m.severity,_=f===null?null:m===null?I(f/r):m.recordingsFraction,v=n.cap??null,y=v===null?null:I((c+v.bytes)/r),b=v!==null&&f!==null&&f>v.bytes,x={total:A(r),freeTotal:A(a),freeTotalPercent:R(a/r),used:A(p),usedPercent:R(p/r),free:A(u),freePercent:R(u/r),reserve:s===0?null:E.t(`helpers.locationCapacityBar.reserveKept`,{size:A(s)}),owned:f===null||_===null?null:E.t(`helpers.locationCapacityBar.ownedOfRecordings`,{size:A(f),percent:R(_)}),cap:v===null?null:v.reason===`drain`?E.t(`helpers.locationCapacityBar.capDrain`,{size:A(v.bytes)}):E.t(`helpers.locationCapacityBar.capCap`,{size:A(v.bytes)})},S=[E.t(`helpers.locationCapacityBar.summaryFree`,{free:x.freeTotal,total:x.total,percent:x.freeTotalPercent}),x.owned===null?null:E.t(`helpers.locationCapacityBar.summaryOwned`,{owned:x.owned}),x.reserve===null?null:l?E.t(`helpers.locationCapacityBar.summaryReserveShort`,{reserve:x.reserve}):x.reserve,x.cap===null?null:b?E.t(`helpers.locationCapacityBar.summaryCapBelow`,{cap:x.cap}):x.cap].filter(e=>e!==null).join(` · `),C=[];return c>0&&C.push({segment:`reserve`,label:E.t(`helpers.locationCapacityBar.legendKeptFree`),value:A(s),alarming:l}),x.owned!==null&&C.push({segment:`owned`,label:E.t(`helpers.locationCapacityBar.legendCamstack`),value:x.owned,alarming:!1}),C.push({segment:`used`,label:f===null?E.t(`helpers.locationCapacityBar.legendUsed`):E.t(`helpers.locationCapacityBar.legendOtherData`),value:`${x.used} (${x.usedPercent})`,alarming:g===`critical`}),C.push({segment:`free`,label:E.t(`helpers.locationCapacityBar.legendFree`),value:`${x.free} (${x.freePercent})`,alarming:l}),v!==null&&C.push({segment:`cap`,label:v.reason===`drain`?E.t(`helpers.locationCapacityBar.legendDrainTarget`):E.t(`helpers.locationCapacityBar.legendCap`),value:E.t(`helpers.locationCapacityBar.legendCapValue`,{size:A(v.bytes)}),alarming:b}),{kind:`known`,severity:g,legend:C,segments:{reservePercent:L(c/r),ownedPercent:f===null?null:L(f/r),usedPercent:L(p/r),freePercent:L(u/r),capPercent:y===null?null:L(y)},labels:x,reserveExceedsFree:l,capBelowOwned:b,summary:S}}function z(e){return m(e)}function B(e){return e===`active`}var V=[{mode:`active`,get label(){return E.t(`helpers.locationMode.activeLabel`)},get consequence(){return E.t(`helpers.locationMode.activeConsequence`)},requiresConfirmation:!1},{mode:`readonly`,get label(){return E.t(`helpers.locationMode.readonlyLabel`)},get consequence(){return E.t(`helpers.locationMode.readonlyConsequence`)},requiresConfirmation:!1},{mode:`drain`,get label(){return E.t(`helpers.locationMode.drainLabel`)},get consequence(){return E.t(`helpers.locationMode.drainConsequence`)},requiresConfirmation:!1},{mode:`disabled`,get label(){return E.t(`helpers.locationMode.disabledLabel`)},get consequence(){return E.t(`helpers.locationMode.disabledConsequence`)},requiresConfirmation:!0}];function H(e){return V.find(t=>t.mode===e)??V[0]}function le(e){return H(e).requiresConfirmation}var ue=`Blocked: this is the last location of its type still accepting writes — new data would have nowhere to go.`;function U(e,t,n){return B(n)||!B(z(e))||t.some(t=>t.id!==e.id&&B(z(t)))?{blocked:!1,reason:``}:{blocked:!0,reason:ue}}function de(e,t){return{active:U(e,t,`active`).reason,readonly:U(e,t,`readonly`).reason,drain:U(e,t,`drain`).reason,disabled:U(e,t,`disabled`).reason}}var W=1024**3;function G(e){return typeof e==`number`&&Number.isFinite(e)?e:null}function fe(e){let t=G(e.minFreeGb);if(t!==null)return{unit:`gb`,value:t};let n=G(e.minFreePercent);return n===null?{unit:`percent`,value:null}:{unit:`percent`,value:n}}function pe(e,t,n=10){if(e.unit===`gb`&&e.value!==null)return e.value*W;let r=e.value??n;return t===null||t<=0?null:t*Math.min(100,Math.max(0,r))/100}function me(e,t){let n=G(e.maxUsedGb);return n===null||n<0?null:{bytes:n*W,reason:t===`drain`?`drain`:`legacy`}}var K={ok:`bg-primary`,warn:`bg-warning`,critical:`bg-danger`},q={reserve:`bg-danger/40`,owned:`bg-foreground/50`,free:`bg-border`,cap:`bg-foreground`};function he(e,t){return e===`used`?K[t]:q[e]}function J({location:t,ownedBytes:r}){let{t:i}=D(),a=t.capacity??null,o=pe(fe(t.config),a?.totalBytes??null),s=ce({totalBytes:a?.totalBytes??null,availableBytes:a?.availableBytes??null},o,{ownedBytes:r??null,cap:me(t.config,z(t))});return s.kind===`unknown`?n(`div`,{className:`text-[10px] text-foreground-subtle italic`,title:s.summary,children:s.owned===null?i(`storage.locationCapacityBar.capacityUnknown`,`Capacity unknown`):i(`storage.locationCapacityBar.capacityUnknownCamstackHolds`,`Capacity unknown · CamStack holds {{owned}}`,{owned:s.owned})}):e(`div`,{className:`mt-1 space-y-1`,title:s.summary,children:[e(`div`,{className:`relative flex h-2 w-full max-w-md overflow-hidden rounded-full bg-border`,children:[s.segments.reservePercent>0&&n(`div`,{className:q.reserve,style:{width:`${String(s.segments.reservePercent)}%`}}),s.segments.ownedPercent!==null&&n(`div`,{className:q.owned,style:{width:`${String(s.segments.ownedPercent)}%`}}),n(`div`,{className:K[s.severity],style:{width:`${String(s.segments.usedPercent)}%`}}),n(`div`,{className:q.free,style:{width:`${String(s.segments.freePercent)}%`}}),s.segments.capPercent!==null&&n(`div`,{className:`absolute inset-y-0 w-px ${s.capBelowOwned?`bg-danger`:q.cap}`,style:{left:`${String(s.segments.capPercent)}%`}})]}),n(`ul`,{className:`flex flex-wrap items-center gap-x-3 gap-y-0.5`,children:s.legend.map(t=>e(`li`,{className:`flex items-center gap-1`,children:[n(`span`,{"aria-hidden":`true`,className:`inline-block h-2 w-2 shrink-0 rounded-sm ${he(t.segment,s.severity)}`}),e(`span`,{className:`text-[10px] tabular-nums ${t.alarming?`text-danger`:`text-foreground-subtle`}`,children:[t.label,` `,t.value]})]},t.segment))})]})}var ge={eventMedia:[`events`],recordingsLow:[`low`],recordings:[`high`,`mid`]},_e={eventMedia:`pipeline-analytics`,recordingsLow:`recorder`,recordings:`recorder`},ve=`storage.discardLocation`,Y=`storage.discardLocationStatus`,ye=`storage.discardLocationCancel`;function be(e){return ge[e]??null}function xe(e){return _e[e]??null}function Se(e){return!B(z(e))}function Ce(e,t){return be(e.type)===null||!Se(e)?!1:t.some(t=>t.id!==e.id&&B(z(t)))}var we=new Set([`idle`,`scanning`,`wiping-fs`,`wiping-db`,`cascading`,`complete`,`cancelled`,`error`]);function X(e){return typeof e==`number`&&Number.isFinite(e)?e:null}function Z(e){return typeof e==`string`?e:null}function Te(e){if(typeof e!=`object`||!e)return null;let t=e;if(typeof t.running!=`boolean`)return null;let n=t.phase;if(typeof n!=`string`||!we.has(n))return null;let r=X(t.camerasTotal),i=X(t.camerasDone),a=X(t.foldersRemoved),o=X(t.dbRowsDeleted),s=X(t.ownersCascaded);return r===null||i===null||a===null||o===null||s===null?null:{running:t.running,locationId:Z(t.locationId),jobId:Z(t.jobId),phase:n,camerasTotal:r,camerasDone:i,foldersRemoved:a,dbRowsDeleted:o,ownersCascaded:s,detail:Z(t.detail)??``,startedAtMs:X(t.startedAtMs),finishedAtMs:X(t.finishedAtMs),error:Z(t.error)}}function Ee(e){if(e.phase===`complete`)return 100;if(e.phase===`cancelled`||e.phase===`error`||e.phase===`idle`)return e.camerasTotal>0?Math.min(99,Math.round(e.camerasDone/e.camerasTotal*100)):0;if(e.camerasTotal>0){let t=e.camerasDone/e.camerasTotal*85;return e.phase===`wiping-db`?Math.min(95,Math.round(t+8)):e.phase===`cascading`?Math.min(99,Math.round(t+12)):Math.min(85,Math.round(t))}return e.phase===`scanning`?2:5}var De=2e3;function Oe({location:e,siblings:t}){return Ce(e,t)?n(ke,{location:e}):null}function ke({location:t}){let{t:a}=D(),o=u(),l=b(),d=xe(t.type),[f,p]=i(null),[m,h]=i(null),[g,v]=i(!1);if(r(()=>{if(d===null)return;let e=!1,t=async()=>{try{let t=await l.mutateAsync({addonId:d,action:Y,input:{}});if(e)return;p(Te(t))}catch{}};t();let n=setInterval(()=>void t(),De);return()=>{e=!0,clearInterval(n)}},[d,t.id]),d===null)return null;let x=f!==null&&f.locationId===t.id,S=x&&f.running,C=x&&f.phase!==`idle`,w=async()=>{if(await o({title:a(`storage.locationDiscardControl.discardLeftoversOn`,`Discard leftovers on "{{displayName}}"?`,{displayName:t.displayName}),message:a(`storage.locationDiscardControl.permanentlyDeletesLeftoverFilesAnd`,`Permanently deletes leftover files and records on this location. Other locations are not affected. This cannot be undone and may take hours.`),confirmLabel:a(`storage.locationDiscardControl.discardLeftovers`,`Discard leftovers`),variant:`danger`})){h(null),v(!0);try{await l.mutateAsync({addonId:d,action:ve,input:{locationId:t.id}}),p(Te(await l.mutateAsync({addonId:d,action:Y,input:{}})))}catch(e){h(e instanceof Error?e.message:String(e))}finally{v(!1)}}},T=async()=>{try{await l.mutateAsync({addonId:d,action:ye,input:{}})}catch(e){h(e instanceof Error?e.message:String(e))}};return e(`div`,{className:`flex flex-col gap-1 min-w-[9rem] max-w-[16rem]`,children:[S?e(y,{variant:`unstyled`,type:`button`,onClick:()=>void T(),className:`inline-flex items-center gap-1 rounded px-2 py-1 text-[10px] font-medium text-danger border border-danger/40 hover:bg-danger/10`,children:[n(c,{className:`h-3 w-3`}),a(`common.cancel`,`Cancel`)]}):e(y,{variant:`unstyled`,type:`button`,onClick:()=>void w(),disabled:g,title:a(`storage.locationDiscardControl.permanentlyDeleteLeftoverFilesOn`,`Permanently delete leftover files on this location. Other locations are not affected.`),className:`inline-flex items-center gap-1 rounded px-2 py-1 text-[10px] font-medium text-danger border border-danger/40 hover:bg-danger/10 disabled:opacity-50`,children:[g?n(s,{className:`h-3 w-3 animate-spin`}):n(_,{className:`h-3 w-3`}),a(`storage.locationDiscardControl.discardLeftovers`,`Discard leftovers`)]}),C&&f!==null&&e(`div`,{className:`space-y-0.5`,children:[n(`div`,{className:`h-1 rounded bg-border overflow-hidden`,children:n(`div`,{className:`h-full bg-primary transition-[width] duration-300`,style:{width:`${Ee(f)}%`}})}),e(`p`,{className:`text-[10px] text-foreground-subtle leading-tight`,children:[f.phase,f.camerasTotal>0?` · ${a(`storage.locationDiscardControl.camsProgress`,{done:f.camerasDone,total:f.camerasTotal})}`:``,f.dbRowsDeleted>0?` · ${a(`storage.locationDiscardControl.rowsDeleted`,{count:f.dbRowsDeleted})}`:``,f.detail?` · ${f.detail}`:``]})]}),(m||x&&f?.error)&&n(`p`,{className:`text-[10px] text-danger leading-tight`,children:m??f?.error})]})}a();var Ae={active:f,readonly:g,drain:v,disabled:d},je={active:`border-success/30 text-success hover:bg-success/10`,readonly:`border-border text-foreground-subtle hover:text-foreground hover:bg-primary/10`,drain:`border-warning/40 text-warning hover:bg-warning/10`,disabled:`border-danger/40 text-danger hover:bg-danger/10`};function Me({mode:t,open:r,onToggle:i}){let{t:a}=D(),o=H(t),s=Ae[t];return e(y,{variant:`unstyled`,type:`button`,"aria-expanded":r,"aria-label":a(`storage.locationModeSelector.locationState`,`Location state`),onClick:i,title:o.consequence,className:`inline-flex items-center gap-1 rounded px-2 py-1 text-[10px] font-medium border ${je[t]}`,children:[n(s,{className:`h-3 w-3`}),o.label,n(h,{className:`h-3 w-3 ${r?`rotate-180`:``}`})]})}function Ne({mode:t,blockedReasons:i,onSelect:a,onDismiss:o}){let{t:s}=D();return r(()=>{let e=e=>{e.key===`Escape`&&o()};return window.addEventListener(`keydown`,e),()=>{window.removeEventListener(`keydown`,e)}},[o]),e(`div`,{className:`w-full basis-full rounded-lg border border-border bg-background p-1`,role:`group`,"aria-label":s(`storage.locationModeSelector.locationStateChoices`,`Location state choices`),children:[e(`div`,{className:`flex items-center justify-between px-2 py-1`,children:[n(`span`,{className:`text-[10px] uppercase tracking-wide text-foreground-subtle`,children:s(`storage.locationModeSelector.locationState`,`Location state`)}),n(y,{variant:`unstyled`,type:`button`,"aria-label":s(`storage.locationModeSelector.closeLocationStateChoices`,`Close location state choices`),onClick:o,className:`text-foreground-subtle hover:text-foreground`,children:n(c,{className:`h-3 w-3`})})]}),V.map(r=>{let c=i[r.mode],l=c!==``,u=Ae[r.mode],d=r.mode===t;return e(y,{variant:`unstyled`,type:`button`,role:`radio`,"aria-checked":d,"aria-label":r.label,disabled:l,onClick:()=>{l||(o(),d||a(r.mode))},className:`flex w-full flex-col items-start gap-0.5 rounded px-2 py-1.5 text-left ${l?`cursor-not-allowed opacity-60`:d?`bg-primary/10`:`hover:bg-primary/5`}`,children:[e(`span`,{className:`flex items-center gap-1.5 text-[11px] font-medium text-foreground`,children:[n(u,{className:`h-3 w-3`}),r.label,d&&n(`span`,{className:`text-[9px] uppercase text-primary`,children:s(`common.current`)})]}),n(`span`,{className:`text-[10px] leading-snug text-foreground-subtle`,children:r.consequence}),l&&n(`span`,{className:`text-[10px] leading-snug text-warning`,children:c})]},r.mode)})]})}function Pe(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function Q(e){return typeof e==`number`&&Number.isFinite(e)?e:null}function Fe(e){if(!Pe(e))return null;let t=e.locationId;if(typeof t!=`string`||t.length===0)return null;let n=Q(e.startedAtMs),r=Q(e.startBytes),i=Q(e.bytesRemaining);return n===null||r===null||i===null||typeof e.drained!=`boolean`?null:{locationId:t,startedAtMs:n,startBytes:r,bytesRemaining:i,drained:e.drained,estimatedEmptyAtMs:Q(e.estimatedEmptyAtMs)}}function Ie(e){let t=new Map;if(!Array.isArray(e))return t;for(let n of e){let e=Fe(n);e!==null&&t.set(e.locationId,e)}return t}function Le(e){if(e.startBytes<=0||e.bytesRemaining>e.startBytes)return null;let t=e.startBytes-e.bytesRemaining;return Math.min(1,Math.max(0,t/e.startBytes))}function Re(e,t){return e?t===void 0?{kind:`unreported`}:t.drained||t.bytesRemaining<=0?{kind:`drained`}:{kind:`draining`,bytesRemaining:t.bytesRemaining,drainedFraction:Le(t),estimatedEmptyAtMs:t.estimatedEmptyAtMs}:{kind:`idle`}}function ze(e){return e.mode===`drain`?!0:e.config.readOnly===!0}var Be=[`recordings`,`recordingsLow`];function Ve(e){return e.locationIds!==void 0&&e.locationIds.length>0?e.locationIds:e.locationId===null?[]:[e.locationId]}function He(e,t){if(t===void 0||!Be.includes(e.type))return null;let n=t.find(t=>Ve(t).includes(e.id));return n===void 0||!Number.isFinite(n.usedBytes)||n.usedBytes<0?null:n.usedBytes}function Ue(e,t){let n=new Map;for(let r of e){let e=He(r,t);e!==null&&n.set(r.id,e)}return n}a();var We=[];function $(){let e=x({}),n=te({},{refetchOnWindowFocus:!1}),r=S({},{refetchOnWindowFocus:!1}),i=e.data??We,a=t(()=>Ue(i,n.data?.locations),[i,n.data?.locations]),o=t(()=>Ie(r.data),[r.data]);return t(()=>({locations:i,ownedBytesById:a,drainOf:e=>Re(ze(e),o.get(e.id))}),[i,a,o])}a();function Ge({row:t}){let{t:r}=D(),a=u(),s=o(),c=$(),[l,d]=i(!1),f=T({onSuccess:()=>{s.invalidateQueries({queryKey:[O]}),s.invalidateQueries({queryKey:[[`storage`,`listLocations`]]}),d(!1)},onError:e=>k({title:r(`system.storage.modeFailed`,`Could not change the state`),message:`${t.name}: ${e.message}`,severity:`critical`})}),p=c.locations.find(e=>e.id===t.id);if(p===void 0)return null;let m=c.locations.filter(e=>e.type===p.type),h=z(p),g=c.drainOf(p),_=async e=>{le(e)&&!await a({title:r(`system.storage.disable`,`Disable "{{displayName}}"?`,{displayName:p.displayName}),message:r(`system.storage.nothingIsDeletedSetThe`,`{{consequence}} Nothing is deleted — set the location back to Read-only or Active to bring its footage back.`,{consequence:H(e).consequence}),confirmLabel:r(`common.disable`,`Disable`),variant:`danger`})||f.mutate({addonId:t.addonId,id:t.id,values:{mode:e}})};return e(`div`,{className:`flex flex-wrap items-start gap-x-3 gap-y-2 rounded-lg border border-border bg-surface p-3`,children:[e(`div`,{className:`min-w-0 flex-1 basis-60`,children:[n(J,{location:p,ownedBytes:c.ownedBytesById.get(p.id)??null}),g.kind!==`idle`&&n(j,{drain:g})]}),e(`div`,{className:`flex flex-wrap items-center gap-1`,children:[n(Oe,{location:p,siblings:m}),n(Me,{mode:h,open:l,onToggle:()=>d(e=>!e)})]}),l&&n(Ne,{mode:h,blockedReasons:de(p,m),onSelect:e=>void _(e),onDismiss:()=>d(!1)})]})}function Ke({row:t}){let r=$();if(t.kind!==`instance`)return null;let i=r.locations.find(e=>e.id===t.id);if(i===void 0)return null;let a=r.drainOf(i);return e(`div`,{className:`min-w-48`,children:[n(J,{location:i,ownedBytes:r.ownedBytesById.get(i.id)??null}),a.kind!==`idle`&&n(j,{drain:a})]})}function qe({row:e}){let t=$();if(e.kind!==`instance`)return null;let r=t.locations.find(t=>t.id===e.id);if(r===void 0)return null;let i=z(r);return n(ee,{variant:i===`active`?`success`:i===`disabled`?`danger`:`default`,children:H(i).label})}function Je(e){return[{key:`capacity`,header:e.capacity,notSortableReason:e.capacity,render:e=>n(Ke,{row:e})},{key:`mode`,header:e.mode,nowrap:!0,notSortableReason:e.mode,render:e=>n(qe,{row:e})}]}function Ye(e,t,n){return!(n===`single`||t.length<=1||B(z(e))&&t.filter(e=>B(z(e))).length<=1)}a();var Xe=`storage`;function Ze({kinds:e}){let{t:r}=D(),{locations:i}=$(),a=C({}).data,o=e=>{let t=i.find(t=>t.id===e.id),n=a?.find(e=>e.id===t?.type);return t===void 0||n===void 0?!1:Ye(t,i.filter(e=>e.type===t.type),n.cardinality)},s=t(()=>Je({capacity:r(`system.storage.colCapacity`,`Capacity`),mode:r(`system.storage.colMode`,`State`)}),[r]),c=t(()=>e===void 0?void 0:t=>t.kind===`instance`&&t.kindId!==void 0&&e.includes(t.kindId),[e]);return n(ne,{functionCap:Xe,icon:l,title:r(`system.storage.title`,`Storage locations`),subtitle:r(`system.storage.subtitle`,`Where recordings, event media, artifacts and backups are kept. Each location is one kind on one provider; the state decides whether it takes writes, is only read, drains or is left alone.`),emptyTitle:r(`system.storage.emptyTitle`,`No storage locations yet`),emptyDescription:r(`system.storage.noStorageLocationsDeclaredBy`,`No storage locations declared by any installed addon.`),addLabel:r(`system.storage.addLocation`,`Add location`),extraColumns:s,lead:e=>n(Ge,{row:e}),canDelete:o,rowActions:e=>o(e)?n(ie,{row:e}):null,...c===void 0?{}:{rowFilter:c}})}export{F as n,se as r,Ze as t};
@@ -1 +0,0 @@
1
- import{K as e,S as t,et as n,k as r,z as i}from"./_virtual_mf___mfe_internal__admin_ui_host__loadShare___mf_0_tanstack_mf_1_react_mf_2_query__loadShare__.js-CEyXHAdg.js";import{Q as a}from"./player-overlays-Br5iMMD4.js";import{oa as o}from"./src-RJGsvxnp.js";import"./mount-j6jrW5Zc.js";n();var s=/\.(svg|png|jpe?g|webp)$/i,c=`provider-`;function l(e){return typeof e==`string`&&s.test(e)&&!e.includes(`..`)}function u(e){let t=[];for(let n of e??[]){let e=n,r=e?.manifest?.id;if(typeof r!=`string`||r.length===0)continue;let i=e?.declaration?.icon??e?.manifest?.icon;l(i)&&t.push([r,i])}return new Map(t)}function d(e,t){if(!t)return null;let n=t.startsWith(c)?[t]:[t,`${c}${t}`];for(let t of n){let n=e.get(t);if(n)return a(`/api/addon-assets/${encodeURIComponent(t)}/${n}`)}return null}var f=5*6e4,p=r(new Map);function m({children:n}){let{data:r}=o(void 0,{staleTime:f}),i=e(()=>u(r),[r]);return t(p.Provider,{value:i,children:n})}function h(e){return d(i(p),e)}export{h as n,m as t};
@@ -1 +0,0 @@
1
- import"./client-BpjZC14K.js";import{lt as e,ut as t}from"./src-RJGsvxnp.js";import{t as n}from"./i18n-XxenOoax.js";import"./device-picker-model-j6jrW5Zc.js";function r(e,t){let n=[e,t].filter(e=>e!==null&&e!==``);return n.length===0?null:n.join(` · `)}function i(n,r,i){let a=e(r);return n.filter(e=>{if(i!==null&&!e.caps.some(e=>i.caps.includes(e)))return!1;if(a.length===0)return!0;let n=t({id:e.deviceId,name:e.name,...e.detail===null?{}:{detail:e.detail},...e.meta===null?{}:{type:e.meta}});return a.every(e=>n.includes(e))})}function a(e){let t=e.find(e=>e.query.status===`error`);if(t!==void 0)return{kind:`unknown`,reason:t.query.error?.message??n.t(`helpers.customize.requestFailed`)};if(e.some(e=>e.query.status!==`success`||e.query.data===void 0))return{kind:`pending`};let r=new Map;for(let t of e)for(let e of t.query.data??[])r.set(e,[...r.get(e)??[],t.cap]);return{kind:`known`,value:r}}export{a as n,i as r,r as t};