@camstack/addon-admin-ui 1.2.315 → 1.2.316
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.
- package/dist/assets/{AddonCollectionPage-pS-uTKIv.js → AddonCollectionPage-6OmoDonK.js} +1 -1
- package/dist/assets/Addons-BIIMXj2l.js +1 -0
- package/dist/assets/{AdminTabs-jHFlbFwy.js → AdminTabs-lpBkRiaY.js} +1 -1
- package/dist/assets/AiProfiles-K_cBnHmI.js +3 -0
- package/dist/assets/{BrokerForm-DgGM0_0c.js → BrokerForm-nGWEzsTU.js} +1 -1
- package/dist/assets/{Build-CUET0Iyz.js → Build-BcU4hwAg.js} +5 -5
- package/dist/assets/Calendars-BAEmavGo.js +1 -0
- package/dist/assets/{Capabilities-C3B2Cg8b.js → Capabilities-kIunpjC-.js} +1 -1
- package/dist/assets/{CapabilityBadges-B4tAQqGd.js → CapabilityBadges-Dp803WzH.js} +1 -1
- package/dist/assets/Cluster-BD5ug_it.js +11 -0
- package/dist/assets/{CompositionEditor-BPm2kx9Q.js → CompositionEditor-Dwkfevta.js} +1 -1
- package/dist/assets/{CompositionEditorPage-VsLdAptk.js → CompositionEditorPage-CvD5LaIB.js} +1 -1
- package/dist/assets/Data-DsLW3Agy.js +1 -0
- package/dist/assets/DetectionIntelligence-L5gfBmuW.js +1 -0
- package/dist/assets/{DeviceAggregateSection-CbiGOvpd.js → DeviceAggregateSection-Civ8W7DB.js} +1 -1
- package/dist/assets/DeviceDetail-DliW3yCK.js +2 -0
- package/dist/assets/{Devices-BUSj9XZS.js → Devices-R_WwzkQv.js} +1 -1
- package/dist/assets/{EmbedPlayerPage-HBoWc3RB.js → EmbedPlayerPage-UuSLDm-L.js} +1 -1
- package/dist/assets/Events-ypLCpQyL.js +1 -0
- package/dist/assets/{FormBuilder-Bsir_-sl.js → FormBuilder-B-ZLPfiu.js} +1 -1
- package/dist/assets/{Identity-Dybyl5R-.js → Identity-CxK06qmH.js} +1 -1
- package/dist/assets/IntegrationDetail-CooCm_h9.js +1 -0
- package/dist/assets/Integrations-C6u4EgW8.js +1 -0
- package/dist/assets/{Integrations-CM0m1Zef.js → Integrations-Cs1kg3x0.js} +1 -1
- package/dist/assets/Locations-Do-T_nWo.js +3 -0
- package/dist/assets/{Logs-D0IImY2Y.js → Logs-CuHaX2cL.js} +1 -1
- package/dist/assets/{ModelLicenses-q_i_PA1X.js → ModelLicenses-BH0t7XzG.js} +1 -1
- package/dist/assets/{MotionZonesSettings-CVxyo9hA.js → MotionZonesSettings-BXuS3yQG.js} +1 -1
- package/dist/assets/{MyAccess-FbdsZp4I.js → MyAccess-CdkTrtxL.js} +1 -1
- package/dist/assets/Network-4ks2Q-lc.js +1 -0
- package/dist/assets/{NodeAddonsSettingsPanel-DssU1eLJ.js → NodeAddonsSettingsPanel-CeuDHblr.js} +1 -1
- package/dist/assets/{NodeInferenceDevices-4JgJwMA2.js → NodeInferenceDevices-BUEqBPiK.js} +1 -1
- package/dist/assets/Notifications-C8F1LO0t.js +1 -0
- package/dist/assets/Pipeline-Bc9l1Z9m.js +1 -0
- package/dist/assets/Plates-BTSmXK2N.js +1 -0
- package/dist/assets/{PrivacyMaskSettings-CLxBzwVu.js → PrivacyMaskSettings-BWSWKsNC.js} +1 -1
- package/dist/assets/{ProviderIcon-dscfq54_.js → ProviderIcon-DQt9-Dk5.js} +1 -1
- package/dist/assets/Recordings-71t3rBru.js +1 -0
- package/dist/assets/{ScanNetworkModal-D8yxRM0Z.js → ScanNetworkModal-BLdQd6YQ.js} +1 -1
- package/dist/assets/{SceneMonitorEditor-Cv2vE8HC.js → SceneMonitorEditor-9Q6zewXr.js} +1 -1
- package/dist/assets/{Scenes-BQ4CPMKw.js → Scenes-BCLdbVqC.js} +1 -1
- package/dist/assets/{Settings-Dfcait6k.js → Settings-lXpzBmvv.js} +1 -1
- package/dist/assets/{Showroom-_zi_fQzx.js → Showroom-BI_t70F0.js} +1 -1
- package/dist/assets/{StorageLocationsPanel-DNV_ZgVx.js → StorageLocationsPanel-CBMw7BuL.js} +1 -1
- package/dist/assets/{Terminal-BC9ErnQ1.js → Terminal-BV2HSPfb.js} +3 -3
- package/dist/assets/{Viewer-6Aij0p3V.js → Viewer-gfKutuCq.js} +1 -1
- package/dist/assets/{_virtual_mf-localSharedImportMap___mfe_internal__admin_ui_host-_ywvVYKV.js → _virtual_mf-localSharedImportMap___mfe_internal__admin_ui_host-BfCHofVw.js} +1 -1
- package/dist/assets/{archive-DnwqLvnq.js → archive-DFnrUg_n.js} +1 -1
- package/dist/assets/{authed-media-BAASKB_9.js → authed-media-C5WNAnlt.js} +1 -1
- package/dist/assets/{boxes-kF6UH6-_.js → boxes-Yw-udPBi.js} +1 -1
- package/dist/assets/circle-slash-gMJOW6fS.js +1 -0
- package/dist/assets/{debounced-invalidate-2ngeH0FB.js → debounced-invalidate-uAN9O5j5.js} +1 -1
- package/dist/assets/{device-integration-icon-bqqGCRov.js → device-integration-icon-DCxI9Sye.js} +1 -1
- package/dist/assets/{dist-BXhzcrtM.js → dist-CIufP1FF.js} +3 -3
- package/dist/assets/{dist-iiQuRL6W.js → dist-CwW7owcd.js} +1 -1
- package/dist/assets/{face-bbox-zGQvxT6q.js → face-bbox-B8_gtyzR.js} +1 -1
- package/dist/assets/{hard-drive-download-CoG1t86A.js → hard-drive-download-DaSRdIcz.js} +1 -1
- package/dist/assets/{hostInit-ClFPaQoK.js → hostInit-Cv65UjC3.js} +1 -1
- package/dist/assets/index-DZYv56ZC.css +2 -0
- package/dist/assets/index-Dr0uEnyB.js +4 -0
- package/dist/assets/{layers-9n_eO6gY.js → layers-BUhaBMGm.js} +1 -1
- package/dist/assets/{location-owned-usage-XFA4zrIz.js → location-owned-usage-BTMrOf3i.js} +1 -1
- package/dist/assets/{mf-entry-bootstrap-0-aa4bc7ed.js → mf-entry-bootstrap-0-382bf3d5.js} +2 -2
- package/dist/assets/{player-overlays-BPnLENh-.js → player-overlays-cfiayLzw.js} +1 -1
- package/dist/assets/remoteEntry-CLgSZYMK.js +1 -0
- package/dist/assets/{send-EIywGEfF.js → send-DxfUIMIW.js} +1 -1
- package/dist/assets/{settings-2-C2jb3QFd.js → settings-2-zfrKsU7z.js} +1 -1
- package/dist/assets/{square-check-big-7kDS8B6S.js → square-check-big-BGFB97B2.js} +1 -1
- package/dist/assets/src-Bt84Llze.js +67 -0
- package/dist/assets/src-CYSHGOVz.js +349 -0
- package/dist/assets/{use-scenes-feed-Dl7dI39g.js → use-scenes-feed-BOYtFKGO.js} +1 -1
- package/dist/assets/{use-stationary-objects-BHIRg4zV.js → use-stationary-objects-Bc1PI3Ti.js} +1 -1
- package/dist/assets/{useDevice-BuSELuIc.js → useDevice-xNLZ-SSC.js} +1 -1
- package/dist/assets/useEventInvalidation-ItsC97xy.js +1 -0
- package/dist/assets/{useNodeUrlSelection-hGEaySeu.js → useNodeUrlSelection-Bzk0aEfw.js} +1 -1
- package/dist/assets/user-round-rTUAQ-iI.js +1 -0
- package/dist/assets/{virtual_mf-REMOTE_ENTRY_ID___mfe_internal__admin_ui_host__remoteEntry-_hash_-DHst_gbg.js → virtual_mf-REMOTE_ENTRY_ID___mfe_internal__admin_ui_host__remoteEntry-_hash_-CE08JxuC.js} +2 -2
- package/dist/index.html +6 -6
- package/dist/server/addon.js +90 -1
- package/package.json +1 -1
- package/dist/assets/Addons-9ZIvUT1K.js +0 -1
- package/dist/assets/AiProfiles-BhbohiJt.js +0 -3
- package/dist/assets/Cluster-4QQw-L5J.js +0 -11
- package/dist/assets/Data-jiTwAkwz.js +0 -1
- package/dist/assets/DetectionIntelligence-z8Wi34J2.js +0 -1
- package/dist/assets/DeviceDetail-XZGgHSZ7.js +0 -2
- package/dist/assets/Events-CwwN-Ai4.js +0 -1
- package/dist/assets/IntegrationDetail-BKdQfHsS.js +0 -1
- package/dist/assets/Integrations-B3j9mUgh.js +0 -1
- package/dist/assets/Locations-CyY2UiFp.js +0 -3
- package/dist/assets/Network-Ba7GJPhZ.js +0 -1
- package/dist/assets/Notifications-DOZJMvSa.js +0 -1
- package/dist/assets/Pipeline-CSVrOhDb.js +0 -1
- package/dist/assets/Plates-D3-W026o.js +0 -1
- package/dist/assets/Recordings-Ccu6iaCk.js +0 -1
- package/dist/assets/circle-slash-BbFEc4PR.js +0 -1
- package/dist/assets/index-BKfjeM9L.js +0 -4
- package/dist/assets/index-egLHRpbu.css +0 -2
- package/dist/assets/remoteEntry-Dc4is_2X.js +0 -1
- package/dist/assets/src-Ch2D4L9J.js +0 -67
- package/dist/assets/src-DXUFbK1_.js +0 -349
- package/dist/assets/useEventInvalidation-C-bG2gYe.js +0 -1
- package/dist/assets/user-round-DIcryj9b.js +0 -1
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./Devices-R_WwzkQv.js","./src-Bt84Llze.js","./player-overlays-cfiayLzw.js","./src-CYSHGOVz.js","./__vite-browser-external-Cc3gW-QT.js","./ProviderIcon-DQt9-Dk5.js","./AdminPage-CiKtOLQm.js","./device-integration-icon-DCxI9Sye.js","./useEventInvalidation-ItsC97xy.js","./Integrations-C6u4EgW8.js","./ScanNetworkModal-BLdQd6YQ.js","./BrokerForm-nGWEzsTU.js","./FormBuilder-B-ZLPfiu.js","./StatusBadge-CeptlsPG.js","./useBodyScrollLock-BDocajQE.js","./IntegrationDetail-CooCm_h9.js","./NodeAddonsSettingsPanel-CeuDHblr.js","./StableTabPanel-Dc954AQl.js","./SchemaTabBar-Bvm8GY8a.js","./Pipeline-Bc9l1Z9m.js","./NodeInferenceDevices-BUEqBPiK.js","./layers-BUhaBMGm.js","./square-check-big-BGFB97B2.js","./StorageLocationsPanel-CBMw7BuL.js","./location-owned-usage-BTMrOf3i.js","./archive-DFnrUg_n.js","./hard-drive-download-DaSRdIcz.js","./format-size-DIxKXxtj.js","./useDevice-xNLZ-SSC.js","./DeviceDetail-DliW3yCK.js","./boxes-Yw-udPBi.js","./circle-slash-gMJOW6fS.js","./CapabilityBadges-Dp803WzH.js","./CompositionEditor-Dwkfevta.js","./use-stationary-objects-Bc1PI3Ti.js","./DeviceAggregateSection-Civ8W7DB.js","./authed-media-C5WNAnlt.js","./Showroom-BI_t70F0.js","./EmbedPlayerPage-UuSLDm-L.js","./DetectionIntelligence-L5gfBmuW.js","./face-bbox-B8_gtyzR.js","./user-round-rTUAQ-iI.js","./debounced-invalidate-uAN9O5j5.js","./Plates-BTSmXK2N.js","./Events-ypLCpQyL.js","./AdminTabs-lpBkRiaY.js","./Scenes-BCLdbVqC.js","./use-scenes-feed-BOYtFKGO.js","./Recordings-71t3rBru.js","./settings-2-zfrKsU7z.js","./Viewer-gfKutuCq.js","./Build-BcU4hwAg.js","./CompositionEditorPage-CvD5LaIB.js","./Locations-Do-T_nWo.js","./Addons-BIIMXj2l.js","./useNodeUrlSelection-Bzk0aEfw.js","./AiProfiles-K_cBnHmI.js","./send-DxfUIMIW.js","./ModelLicenses-BH0t7XzG.js","./MyAccess-CdkTrtxL.js","./Logs-CuHaX2cL.js","./AddonCollectionPage-6OmoDonK.js","./addon-display-names-DvSEQty-.js","./Identity-CxK06qmH.js","./Network-4ks2Q-lc.js","./Integrations-Cs1kg3x0.js","./Data-DsLW3Agy.js","./Settings-lXpzBmvv.js","./Cluster-BD5ug_it.js","./Capabilities-kIunpjC-.js","./Terminal-BV2HSPfb.js","./Terminal-kHJ-D0s7.css","./Notifications-C8F1LO0t.js","./Calendars-BAEmavGo.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{i as e,t}from"./rolldown-runtime-Cyuzqnbw.js";import"./virtual_mf-exposes___mfe_internal__admin_ui_host__remoteEntry-_hash_-DnnXQRkG.js";import{a as n,o as r}from"./virtual_mf-REMOTE_ENTRY_ID___mfe_internal__admin_ui_host__remoteEntry-_hash_-CE08JxuC.js";import{t as i}from"./vite-preload-helper-kNaey6uv.js";import{A as a,B as o,D as s,E as c,I as l,J as u,K as d,L as f,M as p,N as m,O as h,P as g,Q as _,S as v,U as y,W as b,X as x,Y as S,Z as C,a as w,b as T,d as E,j as D,k as O,o as k,q as A,u as j,x as M,z as N}from"./_virtual_mf___mfe_internal__admin_ui_host__loadShare___mf_0_tanstack_mf_1_react_mf_2_query__loadShare__.js-DhP-Lgiq.js";import{X as P,Z as F,_t as ee,at as te,gt as ne,ht as re,mt as ie,nt as ae,rt as oe,st as se,vt as I,yt as L}from"./player-overlays-cfiayLzw.js";import{An as R,B as ce,Bl as le,Bt as ue,Cn as de,Cu as z,D as B,Ed as fe,En as pe,Fc as me,Fl as he,Fu as ge,Gl as _e,Hu as ve,J as ye,Kc as be,Kl as xe,Ln as Se,Mn as Ce,Mu as we,Oa as Te,Ol as Ee,Ou as De,Pi as Oe,Pl as ke,Qu as Ae,Sl as je,Sr as Me,Tn as Ne,Ul as Pe,Un as Fe,Vu as Ie,Wo as Le,_t as Re,ad as ze,al as Be,an as Ve,br as He,cd as Ue,cl as We,cu as Ge,dd as Ke,dl as qe,dn as Je,du as Ye,ed as Xe,er as Ze,et as Qe,fs as $e,gt as et,gu as tt,hs as nt,ht as rt,id as it,il as at,jl as ot,jt as st,ku as ct,ld as lt,mu as ut,n as dt,nd as ft,or as pt,os as mt,pu as ht,rd as gt,ru as _t,sl as vt,ts as yt,tu as bt,uu as xt,vr as St,vt as Ct,vu as wt,wn as Tt,xd as Et,xr as Dt,yr as Ot,yt as kt,zt as At}from"./src-Bt84Llze.js";import{r as jt,t as Mt}from"./_virtual_mf___mfe_internal__admin_ui_host__loadShare__react_mf_2_dom__loadShare__.js-BsvPG3BX.js";import{t as Nt}from"./_virtual_mf___mfe_internal__admin_ui_host__loadShare__react_mf_2_dom_mf_1_client__loadShare__.js-DtoGixA1.js";import{Qn as Pt,n as Ft,t as It}from"./src-CYSHGOVz.js";(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var Lt=L(`check-check`,[[`path`,{d:`M18 6 7 17l-5-5`,key:`116fxf`}],[`path`,{d:`m22 10-7.5 7.5L13 16`,key:`ke71qq`}]]),Rt=L(`compass`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m16.24 7.76-1.804 5.411a2 2 0 0 1-1.265 1.265L7.76 16.24l1.804-5.411a2 2 0 0 1 1.265-1.265z`,key:`9ktpf1`}]]),zt=L(`fingerprint-pattern`,[[`path`,{d:`M12 10a2 2 0 0 0-2 2c0 1.02-.1 2.51-.26 4`,key:`1nerag`}],[`path`,{d:`M14 13.12c0 2.38 0 6.38-1 8.88`,key:`o46ks0`}],[`path`,{d:`M17.29 21.02c.12-.6.43-2.3.5-3.02`,key:`ptglia`}],[`path`,{d:`M2 12a10 10 0 0 1 18-6`,key:`ydlgp0`}],[`path`,{d:`M2 16h.01`,key:`1gqxmh`}],[`path`,{d:`M21.8 16c.2-2 .131-5.354 0-6`,key:`drycrb`}],[`path`,{d:`M5 19.5C5.5 18 6 15 6 12a6 6 0 0 1 .34-2`,key:`1tidbn`}],[`path`,{d:`M8.65 22c.21-.66.45-1.32.57-2`,key:`13wd9y`}],[`path`,{d:`M9 6.8a6 6 0 0 1 9 5.2v2`,key:`1fr1j5`}]]),Bt=L(`git-branch`,[[`path`,{d:`M15 6a9 9 0 0 0-9 9V3`,key:`1cii5b`}],[`circle`,{cx:`18`,cy:`6`,r:`3`,key:`1h7g24`}],[`circle`,{cx:`6`,cy:`18`,r:`3`,key:`fqmcym`}]]),Vt=L(`globe`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20`,key:`13o1zl`}],[`path`,{d:`M2 12h20`,key:`9i4pu4`}]]),Ht=L(`log-out`,[[`path`,{d:`m16 17 5-5-5-5`,key:`1bji2h`}],[`path`,{d:`M21 12H9`,key:`dn1m92`}],[`path`,{d:`M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4`,key:`1uf3rs`}]]),Ut=L(`scale`,[[`path`,{d:`M12 3v18`,key:`108xh3`}],[`path`,{d:`m19 8 3 8a5 5 0 0 1-6 0zV7`,key:`zcdpyk`}],[`path`,{d:`M3 7h1a17 17 0 0 0 8-2 17 17 0 0 0 8 2h1`,key:`1yorad`}],[`path`,{d:`m5 8 3 8a5 5 0 0 1-6 0zV7`,key:`eua70x`}],[`path`,{d:`M7 21h10`,key:`1b0cd5`}]]),Wt=L(`scan-eye`,[[`path`,{d:`M3 7V5a2 2 0 0 1 2-2h2`,key:`aa7l1z`}],[`path`,{d:`M17 3h2a2 2 0 0 1 2 2v2`,key:`4qcy5o`}],[`path`,{d:`M21 17v2a2 2 0 0 1-2 2h-2`,key:`6vwrx8`}],[`path`,{d:`M7 21H5a2 2 0 0 1-2-2v-2`,key:`ioqczr`}],[`circle`,{cx:`12`,cy:`12`,r:`1`,key:`41hilf`}],[`path`,{d:`M18.944 12.33a1 1 0 0 0 0-.66 7.5 7.5 0 0 0-13.888 0 1 1 0 0 0 0 .66 7.5 7.5 0 0 0 13.888 0`,key:`11ak4c`}]]),Gt=L(`scan-face`,[[`path`,{d:`M3 7V5a2 2 0 0 1 2-2h2`,key:`aa7l1z`}],[`path`,{d:`M17 3h2a2 2 0 0 1 2 2v2`,key:`4qcy5o`}],[`path`,{d:`M21 17v2a2 2 0 0 1-2 2h-2`,key:`6vwrx8`}],[`path`,{d:`M7 21H5a2 2 0 0 1-2-2v-2`,key:`ioqczr`}],[`path`,{d:`M8 14s1.5 2 4 2 4-2 4-2`,key:`1y1vjs`}],[`path`,{d:`M9 9h.01`,key:`1q5me6`}],[`path`,{d:`M15 9h.01`,key:`x1ddxp`}]]),Kt=L(`shield-x`,[[`path`,{d:`M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z`,key:`oel41y`}],[`path`,{d:`m14.5 9.5-5 5`,key:`17q4r4`}],[`path`,{d:`m9.5 9.5 5 5`,key:`18nt4w`}]]),qt=L(`terminal`,[[`path`,{d:`M12 19h8`,key:`baeox8`}],[`path`,{d:`m4 17 6-6-6-6`,key:`1yngyt`}]]);_();var Jt=/^(?:[a-z][a-z0-9+.-]*:|[\\/]{2})/i,Yt=/^[\\/]{2}/;function Xt(e,t){return t+e.replace(/\\/g,`/`)}var Zt=`popstate`;function Qt(e){return typeof e==`object`&&!!e&&`pathname`in e&&`search`in e&&`hash`in e&&`state`in e&&`key`in e}function $t(e={}){function t(e,t){let n=t.state?.masked,{pathname:r,search:i,hash:a}=n||e.location;return nn(``,{pathname:r,search:i,hash:a},t.state&&t.state.usr||null,t.state&&t.state.key||`default`,n?{pathname:e.location.pathname,search:e.location.search,hash:e.location.hash}:void 0)}function n(e,t){return typeof t==`string`?t:rn(t)}return on(t,n,null,e)}function V(e,t){if(e===!1||e==null)throw Error(t)}function H(e,t){if(!e){typeof console<`u`&&console.warn(t);try{throw Error(t)}catch{}}}function en(){return Math.random().toString(36).substring(2,10)}function tn(e,t){return{usr:e.state,key:e.key,idx:t,masked:e.mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}function nn(e,t,n=null,r,i){return{pathname:typeof e==`string`?e:e.pathname,search:``,hash:``,...typeof t==`string`?an(t):t,state:n,key:t&&t.key||r||en(),mask:i}}function rn({pathname:e=`/`,search:t=``,hash:n=``}){return t&&t!==`?`&&(e+=t.charAt(0)===`?`?t:`?`+t),n&&n!==`#`&&(e+=n.charAt(0)===`#`?n:`#`+n),e}function an(e){let t={};if(e){let n=e.indexOf(`#`);n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let r=e.indexOf(`?`);r>=0&&(t.search=e.substring(r),e=e.substring(0,r)),e&&(t.pathname=e)}return t}function on(e,t,n,r={}){let{window:i=document.defaultView,v5Compat:a=!1}=r,o=i.history,s=`POP`,c=null,l=u();l??(l=0,o.replaceState({...o.state,idx:l},``));function u(){return(o.state||{idx:null}).idx}function d(){s=`POP`;let e=u(),t=e==null?null:e-l;l=e,c&&c({action:s,location:h.location,delta:t})}function f(e,t){s=`PUSH`;let r=Qt(e)?e:nn(h.location,e,t);n&&n(r,e),l=u()+1;let d=tn(r,l),f=h.createHref(r.mask||r);try{o.pushState(d,``,f)}catch(e){if(e instanceof DOMException&&e.name===`DataCloneError`)throw e;i.location.assign(f)}a&&c&&c({action:s,location:h.location,delta:1})}function p(e,t){s=`REPLACE`;let r=Qt(e)?e:nn(h.location,e,t);n&&n(r,e),l=u();let i=tn(r,l),d=h.createHref(r.mask||r);o.replaceState(i,``,d),a&&c&&c({action:s,location:h.location,delta:0})}function m(e){return sn(i,e)}let h={get action(){return s},get location(){return e(i,o)},listen(e){if(c)throw Error(`A history only accepts one active listener`);return i.addEventListener(Zt,d),c=e,()=>{i.removeEventListener(Zt,d),c=null}},createHref(e){return t(i,e)},createURL:m,encodeLocation(e){let t=m(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:f,replace:p,go(e){return o.go(e)}};return h}function sn(e,t,n=!1){let r=`http://localhost`;e&&(r=e.location.origin===`null`?e.location.href:e.location.origin),V(r,`No window.location.(origin|href) available to create URL`);let i=typeof t==`string`?t:rn(t);return i=i.replace(/ $/,`%20`),!n&&Yt.test(i)&&(i=r+i),new URL(i,r)}function cn(e,t,n=`/`){return ln(e,t,n,!1)}function ln(e,t,n,r,i){let a=U((typeof t==`string`?an(t):t).pathname||`/`,n);if(a==null)return null;let o=i??dn(e),s=null,c=On(a);for(let e=0;s==null&&e<o.length;++e)s=wn(o[e],c,r);return s}function un(e,t){let{route:n,pathname:r,params:i}=e;return{id:n.id,pathname:r,params:i,data:t[n.id],loaderData:t[n.id],handle:n.handle}}function dn(e){let t=fn(e);return mn(t),t}function fn(e,t=[],n=[],r=``,i=!1){let a=(e,a,o=i,s)=>{let c={relativePath:s===void 0?e.path||``:s,caseSensitive:e.caseSensitive===!0,childrenIndex:a,route:e};if(c.relativePath.startsWith(`/`)){if(!c.relativePath.startsWith(r)&&o)return;V(c.relativePath.startsWith(r),`Absolute route path "${c.relativePath}" nested under path "${r}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),c.relativePath=c.relativePath.slice(r.length)}let l=W([r,c.relativePath]),u=n.concat(c);e.children&&e.children.length>0&&(V(e.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${l}".`),fn(e.children,t,u,l,o)),!(e.path==null&&!e.index)&&t.push({path:l,score:Sn(l,e.index),routesMeta:u.map((e,t)=>{let[n,r]=Dn(e.relativePath,e.caseSensitive,t===u.length-1);return{...e,matcher:n,compiledParams:r}})})};return e.forEach((e,t)=>{if(e.path===``||!e.path?.includes(`?`))a(e,t);else for(let n of pn(e.path))a(e,t,!0,n)}),t}function pn(e){let t=e.split(`/`);if(t.length===0)return[];let[n,...r]=t,i=n.endsWith(`?`),a=n.replace(/\?$/,``);if(r.length===0)return i?[a,``]:[a];let o=pn(r.join(`/`)),s=[];return s.push(...o.map(e=>e===``?a:[a,e].join(`/`))),i&&s.push(...o),s.map(t=>e.startsWith(`/`)&&t===``?`/`:t)}function mn(e){e.sort((e,t)=>e.score===t.score?Cn(e.routesMeta.map(e=>e.childrenIndex),t.routesMeta.map(e=>e.childrenIndex)):t.score-e.score)}var hn=/^:[\w-]+$/,gn=3,_n=2,vn=1,yn=10,bn=-2,xn=e=>e===`*`;function Sn(e,t){let n=e.split(`/`),r=n.length;return n.some(xn)&&(r+=bn),t&&(r+=_n),n.filter(e=>!xn(e)).reduce((e,t)=>e+(hn.test(t)?gn:t===``?vn:yn),r)}function Cn(e,t){return e.length===t.length&&e.slice(0,-1).every((e,n)=>e===t[n])?e[e.length-1]-t[t.length-1]:0}function wn(e,t,n=!1){let{routesMeta:r}=e,i={},a=`/`,o=[];for(let e=0;e<r.length;++e){let s=r[e],c=e===r.length-1,l=a===`/`?t:t.slice(a.length)||`/`,u={path:s.relativePath,caseSensitive:s.caseSensitive,end:c},d=s.matcher&&s.compiledParams?En(u,l,s.matcher,s.compiledParams):Tn(u,l),f=s.route;if(!d&&c&&n&&!r[r.length-1].route.index&&(d=Tn({path:s.relativePath,caseSensitive:s.caseSensitive,end:!1},l)),!d)return null;Object.assign(i,d.params),o.push({params:i,pathname:W([a,d.pathname]),pathnameBase:Ln(W([a,d.pathnameBase])),route:f}),d.pathnameBase!==`/`&&(a=W([a,d.pathnameBase]))}return o}function Tn(e,t){typeof e==`string`&&(e={path:e,caseSensitive:!1,end:!0});let[n,r]=Dn(e.path,e.caseSensitive,e.end);return En(e,t,n,r)}function En(e,t,n,r){let i=t.match(n);if(!i)return null;let a=i[0],o=a.replace(/(.)\/+$/,`$1`),s=i.slice(1);return{params:r.reduce((e,{paramName:t,isOptional:n},r)=>{if(t===`*`){let e=s[r]||``;o=a.slice(0,a.length-e.length).replace(/(.)\/+$/,`$1`)}let i=s[r];return n&&!i?e[t]=void 0:e[t]=(i||``).replace(/%2F/g,`/`),e},{}),pathname:a,pathnameBase:o,pattern:e}}function Dn(e,t=!1,n=!0){H(e===`*`||!e.endsWith(`*`)||e.endsWith(`/*`),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,`/*`)}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,`/*`)}".`);let r=[],i=`^`+e.replace(/\/*\*?$/,``).replace(/^\/*/,`/`).replace(/[\\.*+^${}|()[\]]/g,`\\$&`).replace(/\/:([\w-]+)(\?)?/g,(e,t,n,i,a)=>{if(r.push({paramName:t,isOptional:n!=null}),n){let t=a.charAt(i+e.length);return t&&t!==`/`?`/([^\\/]*)`:`(?:/([^\\/]*))?`}return`/([^\\/]+)`}).replace(/\/([\w-]+)\?(\/|$)/g,`(/$1)?$2`);return e.endsWith(`*`)?(r.push({paramName:`*`}),i+=e===`*`||e===`/*`?`(.*)$`:`(?:\\/(.+)|\\/*)$`):n?i+=`\\/*$`:e!==``&&e!==`/`&&(i+=`(?:(?=\\/|$))`),[new RegExp(i,t?void 0:`i`),r]}function On(e){try{return e.split(`/`).map(e=>decodeURIComponent(e).replace(/\//g,`%2F`)).join(`/`)}catch(t){return H(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function U(e,t){if(t===`/`)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith(`/`)?t.length-1:t.length,r=e.charAt(n);return r&&r!==`/`?null:e.slice(n)||`/`}function kn(e,t=`/`){let{pathname:n,search:r=``,hash:i=``}=typeof e==`string`?an(e):e,a;return n?(n=Fn(n),a=n.startsWith(`/`)?An(n.substring(1),`/`):An(n,t)):a=t,{pathname:a,search:Rn(r),hash:zn(i)}}function An(e,t){let n=In(t).split(`/`);return e.split(`/`).forEach(e=>{e===`..`?n.length>1&&n.pop():e!==`.`&&n.push(e)}),n.length>1?n.join(`/`):`/`}function jn(e,t,n,r){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(r)}]. Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function Mn(e){return e.filter((e,t)=>t===0||e.route.path&&e.route.path.length>0)}function Nn(e){let t=Mn(e);return t.map((e,n)=>n===t.length-1?e.pathname:e.pathnameBase)}function Pn(e,t,n,r=!1){let i;typeof e==`string`?i=an(e):(i={...e},V(!i.pathname||!i.pathname.includes(`?`),jn(`?`,`pathname`,`search`,i)),V(!i.pathname||!i.pathname.includes(`#`),jn(`#`,`pathname`,`hash`,i)),V(!i.search||!i.search.includes(`#`),jn(`#`,`search`,`hash`,i)));let a=e===``||i.pathname===``,o=a?`/`:i.pathname,s;if(o==null)s=n;else{let e=t.length-1;if(!r&&o.startsWith(`..`)){let t=o.split(`/`);for(;t[0]===`..`;)t.shift(),--e;i.pathname=t.join(`/`)}s=e>=0?t[e]:`/`}let c=kn(i,s),l=o&&o!==`/`&&o.endsWith(`/`),u=(a||o===`.`)&&n.endsWith(`/`);return!c.pathname.endsWith(`/`)&&(l||u)&&(c.pathname+=`/`),c}var Fn=e=>e.replace(/[\\/]{2,}/g,`/`),W=e=>Fn(e.join(`/`)),In=e=>e.replace(/\/+$/,``),Ln=e=>In(e).replace(/^\/*/,`/`),Rn=e=>!e||e===`?`?``:e.startsWith(`?`)?e:`?`+e,zn=e=>!e||e===`#`?``:e.startsWith(`#`)?e:`#`+e,Bn=class{constructor(e,t,n,r=!1){this.status=e,this.statusText=t||``,this.internal=r,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}};function Vn(e){return e!=null&&typeof e.status==`number`&&typeof e.statusText==`string`&&typeof e.internal==`boolean`&&`data`in e}function Hn(e){return W(e.map(e=>e.route.path).filter(Boolean))||`/`}var Un=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;function Wn(e,t){let n=e;if(typeof n!=`string`||!Jt.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let r=n,i=!1;if(Un)try{let e=new URL(window.location.href),r=Yt.test(n)?new URL(Xt(n,e.protocol)):new URL(n),a=U(r.pathname,t);r.origin===e.origin&&a!=null?n=a+r.search+r.hash:i=!0}catch{H(!1,`<Link to="${n}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:r,isExternal:i,to:n}}Object.getOwnPropertyNames(Object.prototype).sort().join(`\0`);var Gn=[`POST`,`PUT`,`PATCH`,`DELETE`];new Set(Gn);var Kn=[`GET`,...Gn];new Set(Kn);var qn=[`about:`,`blob:`,`chrome:`,`chrome-untrusted:`,`content:`,`data:`,`devtools:`,`file:`,`filesystem:`,`javascript:`];function Jn(e){try{return qn.includes(new URL(e).protocol)}catch{return!1}}var Yn=s(null);Yn.displayName=`DataRouter`;var Xn=s(null);Xn.displayName=`DataRouterState`;var Zn=s(!1);function Qn(){return f(Zn)}var $n=s({isTransitioning:!1});$n.displayName=`ViewTransition`;var er=s(new Map);er.displayName=`Fetchers`;var tr=s(null);tr.displayName=`Await`;var G=s(null);G.displayName=`Navigation`;var nr=s(null);nr.displayName=`Location`;var K=s({outlet:null,matches:[],isDataRoute:!1});K.displayName=`Route`;var rr=s(null);rr.displayName=`RouteError`;var ir=`REACT_ROUTER_ERROR`,ar=`REDIRECT`,or=`ROUTE_ERROR_RESPONSE`;function sr(e){if(e.startsWith(`${ir}:${ar}:{`))try{let t=JSON.parse(e.slice(28));if(typeof t==`object`&&t&&typeof t.status==`number`&&typeof t.statusText==`string`&&typeof t.location==`string`&&typeof t.reloadDocument==`boolean`&&typeof t.replace==`boolean`)return t}catch{}}function cr(e){if(e.startsWith(`${ir}:${or}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t==`object`&&t&&typeof t.status==`number`&&typeof t.statusText==`string`)return new Bn(t.status,t.statusText,t.data)}catch{}}function lr(e,{relative:t}={}){V(ur(),`useHref() may be used only in the context of a <Router> component.`);let{basename:n,navigator:r}=f(G),{hash:i,pathname:a,search:o}=yr(e,{relative:t}),s=a;return n!==`/`&&(s=a===`/`?n:W([n,a])),r.createHref({pathname:s,search:o,hash:i})}function ur(){return f(nr)!=null}function q(){return V(ur(),`useLocation() may be used only in the context of a <Router> component.`),f(nr).location}function dr(){return f(nr).navigationType}var fr=`You should call navigate() in a React.useEffect(), not when your component is first rendered.`;function pr(e){f(G).static||y(e)}function mr(){let{isDataRoute:e}=f(K);return e?Rr():hr()}function hr(){V(ur(),`useNavigate() may be used only in the context of a <Router> component.`);let e=f(Yn),{basename:t,navigator:n}=f(G),{matches:r}=f(K),{pathname:i}=q(),a=JSON.stringify(Nn(r)),o=d(!1);return pr(()=>{o.current=!0}),l((r,s={})=>{if(H(o.current,fr),!o.current)return;if(typeof r==`number`){n.go(r);return}let c=Pn(r,JSON.parse(a),i,s.relative===`path`);e==null&&t!==`/`&&(c.pathname=c.pathname===`/`?t:W([t,c.pathname])),(s.replace?n.replace:n.push)(c,s.state,s)},[t,n,a,i,e])}var gr=s(null);function _r(e){let t=f(K).outlet;return b(()=>t&&h(gr.Provider,{value:e},t),[t,e])}function vr(){let{matches:e}=f(K);return e[e.length-1]?.params??{}}function yr(e,{relative:t}={}){let{matches:n}=f(K),{pathname:r}=q(),i=JSON.stringify(Nn(n));return b(()=>Pn(e,JSON.parse(i),r,t===`path`),[e,i,r,t])}function br(e,t){return xr(e,t)}function xr(e,t,n){V(ur(),`useRoutes() may be used only in the context of a <Router> component.`);let{navigator:r}=f(G),{matches:i}=f(K),a=i[i.length-1],o=a?a.params:{},s=a?a.pathname:`/`,c=a?a.pathnameBase:`/`,l=a&&a.route;{let e=l&&l.path||``;Br(s,!l||e.endsWith(`*`)||e.endsWith(`*?`),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${s}" (under <Route path="${e}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
|
|
3
|
+
|
|
4
|
+
Please change the parent <Route path="${e}"> to <Route path="${e===`/`?`*`:`${e}/*`}">.`)}let u=q(),d;if(t){let e=typeof t==`string`?an(t):t;V(c===`/`||e.pathname?.startsWith(c),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${c}" but pathname "${e.pathname}" was given in the \`location\` prop.`),d=e}else d=u;let p=d.pathname||`/`,m=p;if(c!==`/`){let e=c.replace(/^\//,``).split(`/`);m=`/`+p.replace(/^\//,``).split(`/`).slice(e.length).join(`/`)}let g=n&&n.state.matches.length?n.state.matches.map(e=>Object.assign(e,{route:n.manifest[e.route.id]||e.route})):cn(e,{pathname:m});H(l||g!=null,`No routes matched location "${d.pathname}${d.search}${d.hash}" `),H(g==null||g[g.length-1].route.element!==void 0||g[g.length-1].route.Component!==void 0||g[g.length-1].route.lazy!==void 0,`Matched leaf route at location "${d.pathname}${d.search}${d.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let _=Or(g&&g.map(e=>Object.assign({},e,{params:Object.assign({},o,e.params),pathname:W([c,r.encodeLocation?r.encodeLocation(e.pathname.replace(/%/g,`%25`).replace(/\?/g,`%3F`).replace(/#/g,`%23`)).pathname:e.pathname]),pathnameBase:e.pathnameBase===`/`?c:W([c,r.encodeLocation?r.encodeLocation(e.pathnameBase.replace(/%/g,`%25`).replace(/\?/g,`%3F`).replace(/#/g,`%23`)).pathname:e.pathnameBase])})),i,n);return t&&_?h(nr.Provider,{value:{location:{pathname:`/`,search:``,hash:``,state:null,key:`default`,mask:void 0,...d},navigationType:`POP`}},_):_}function Sr(){let e=Lr(),t=Vn(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,r=`rgba(200,200,200, 0.5)`,i={padding:`0.5rem`,backgroundColor:r},a={padding:`2px 4px`,backgroundColor:r},s=null;return console.error(`Error handled by React Router default ErrorBoundary:`,e),s=h(o,null,h(`p`,null,`💿 Hey developer 👋`),h(`p`,null,`You can provide a way better UX than this when your app throws errors by providing your own `,h(`code`,{style:a},`ErrorBoundary`),` or`,` `,h(`code`,{style:a},`errorElement`),` prop on your route.`)),h(o,null,h(`h2`,null,`Unexpected Application Error!`),h(`h3`,{style:{fontStyle:`italic`}},t),n?h(`pre`,{style:i},n):null,s)}var Cr=h(Sr,null),wr=class extends m{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!==`idle`&&e.revalidation===`idle`?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error===void 0?t.error:e.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error(`React Router caught the following error during render`,e)}render(){let e=this.state.error;if(this.context&&typeof e==`object`&&e&&`digest`in e&&typeof e.digest==`string`){let t=cr(e.digest);t&&(e=t)}let t=e===void 0?this.props.children:h(K.Provider,{value:this.props.routeContext},h(rr.Provider,{value:e,children:this.props.component}));return this.context?h(Er,{error:e},t):t}};wr.contextType=Zn;var Tr=new WeakMap;function Er({children:e,error:t}){let{basename:n}=f(G);if(typeof t==`object`&&t&&`digest`in t&&typeof t.digest==`string`){let e=sr(t.digest);if(e){let r=Tr.get(t);if(r)throw r;let i=Wn(e.location,n),a=i.absoluteURL||i.to;if(Jn(a))throw Error(`Invalid redirect location`);if(Un&&!Tr.get(t))if(i.isExternal||e.reloadDocument)window.location.href=a;else{let n=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(i.to,{replace:e.replace}));throw Tr.set(t,n),n}return h(`meta`,{httpEquiv:`refresh`,content:`0;url=${a}`})}}return e}function Dr({routeContext:e,match:t,children:n}){let r=f(Yn);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),h(K.Provider,{value:e},n)}function Or(e,t=[],n){let r=n?.state;if(e==null){if(!r)return null;if(r.errors)e=r.matches;else if(t.length===0&&!r.initialized&&r.matches.length>0)e=r.matches;else return null}let i=e,a=r?.errors;if(a!=null){let e=i.findIndex(e=>e.route.id&&a?.[e.route.id]!==void 0);V(e>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(a).join(`,`)}`),i=i.slice(0,Math.min(i.length,e+1))}let o=!1,s=-1;if(n&&r){o=r.renderFallback;for(let e=0;e<i.length;e++){let t=i[e];if((t.route.HydrateFallback||t.route.hydrateFallbackElement)&&(s=e),t.route.id){let{loaderData:e,errors:a}=r,c=t.route.loader&&!e.hasOwnProperty(t.route.id)&&(!a||a[t.route.id]===void 0);if(t.route.lazy||c){n.isStatic&&(o=!0),i=s>=0?i.slice(0,s+1):[i[0]];break}}}}let c=n?.onError,l=r&&c?(e,t)=>{c(e,{location:r.location,params:r.matches?.[0]?.params??{},pattern:Hn(r.matches),errorInfo:t})}:void 0;return i.reduceRight((e,n,c)=>{let u,d=!1,f=null,p=null;r&&(u=a&&n.route.id?a[n.route.id]:void 0,f=n.route.errorElement||Cr,o&&(s<0&&c===0?(Br(`route-fallback`,!1,"No `HydrateFallback` element provided to render during initial hydration"),d=!0,p=null):s===c&&(d=!0,p=n.route.hydrateFallbackElement||null)));let m=t.concat(i.slice(0,c+1)),g=()=>{let t;return t=u?f:d?p:n.route.Component?h(n.route.Component,null):n.route.element?n.route.element:e,h(Dr,{match:n,routeContext:{outlet:e,matches:m,isDataRoute:r!=null},children:t})};return r&&(n.route.ErrorBoundary||n.route.errorElement||c===0)?h(wr,{location:r.location,revalidation:r.revalidation,component:f,error:u,children:g(),routeContext:{outlet:null,matches:m,isDataRoute:!0},onError:l}):g()},null)}function kr(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Ar(e){let t=f(Yn);return V(t,kr(e)),t}function jr(e){let t=f(Xn);return V(t,kr(e)),t}function Mr(e){let t=f(K);return V(t,kr(e)),t}function Nr(e){let t=Mr(e),n=t.matches[t.matches.length-1];return V(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function Pr(){return Nr(`useRouteId`)}function Fr(){let e=jr(`useNavigation`);return b(()=>{let{matches:t,historyAction:n,...r}=e.navigation;return r},[e.navigation])}function Ir(){let{matches:e,loaderData:t}=jr(`useMatches`);return b(()=>e.map(e=>un(e,t)),[e,t])}function Lr(){let e=f(rr),t=jr(`useRouteError`),n=Nr(`useRouteError`);return e===void 0?t.errors?.[n]:e}function Rr(){let{router:e}=Ar(`useNavigate`),t=Nr(`useNavigate`),n=d(!1);return pr(()=>{n.current=!0}),l(async(r,i={})=>{H(n.current,fr),n.current&&(typeof r==`number`?await e.navigate(r):await e.navigate(r,{fromRouteId:t,...i}))},[e,t])}var zr={};function Br(e,t,n){!t&&!zr[e]&&(zr[e]=!0,H(!1,n))}p(Vr);function Vr({routes:e,manifest:t,future:n,state:r,isStatic:i,onError:a}){return xr(e,void 0,{manifest:t,state:r,isStatic:i,onError:a,future:n})}function J({to:e,replace:t,state:n,relative:r}){V(ur(),`<Navigate> may be used only in the context of a <Router> component.`);let{static:i}=f(G);H(!i,`<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.`);let{matches:a}=f(K),{pathname:o}=q(),s=mr(),c=Pn(e,Nn(a),o,r===`path`),l=JSON.stringify(c);return N(()=>{s(JSON.parse(l),{replace:t,state:n,relative:r})},[s,l,r,t,n]),null}function Y(e){V(!1,`A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.`)}function Hr({basename:e=`/`,children:t=null,location:n,navigationType:r=`POP`,navigator:i,static:a=!1,useTransitions:o}){V(!ur(),`You cannot render a <Router> inside another <Router>. You should never have more than one in your app.`);let s=e.replace(/^\/*/,`/`),c=b(()=>({basename:s,navigator:i,static:a,useTransitions:o,future:{}}),[s,i,a,o]);typeof n==`string`&&(n=an(n));let{pathname:l=`/`,search:u=``,hash:d=``,state:f=null,key:p=`default`,mask:m}=n,g=b(()=>{let e=U(l,s);return e==null?null:{location:{pathname:e,search:u,hash:d,state:f,key:p,mask:m},navigationType:r}},[s,l,u,d,f,p,r,m]);return H(g!=null,`<Router basename="${s}"> is not able to match the URL "${l}${u}${d}" because it does not start with the basename, so the <Router> won't render anything.`),g==null?null:h(G.Provider,{value:c},h(nr.Provider,{children:t,value:g}))}function Ur({children:e,location:t}){return br(Wr(e),t)}function Wr(e,t=[]){let n=[];return c.forEach(e,(e,r)=>{if(!a(e))return;let i=[...t,r];if(e.type===o){n.push.apply(n,Wr(e.props.children,i));return}V(e.type===Y,`[${typeof e.type==`string`?e.type:e.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),V(!e.props.index||!e.props.children,`An index route cannot have child routes.`);let s={id:e.props.id||i.join(`-`),caseSensitive:e.props.caseSensitive,element:e.props.element,Component:e.props.Component,index:e.props.index,path:e.props.path,middleware:e.props.middleware,loader:e.props.loader,action:e.props.action,hydrateFallbackElement:e.props.hydrateFallbackElement,HydrateFallback:e.props.HydrateFallback,errorElement:e.props.errorElement,ErrorBoundary:e.props.ErrorBoundary,hasErrorBoundary:e.props.hasErrorBoundary===!0||e.props.ErrorBoundary!=null||e.props.errorElement!=null,shouldRevalidate:e.props.shouldRevalidate,handle:e.props.handle,lazy:e.props.lazy};e.props.children&&(s.children=Wr(e.props.children,i)),n.push(s)}),n}var Gr=`get`,Kr=`application/x-www-form-urlencoded`;function qr(e){return typeof HTMLElement<`u`&&e instanceof HTMLElement}function Jr(e){return qr(e)&&e.tagName.toLowerCase()===`button`}function Yr(e){return qr(e)&&e.tagName.toLowerCase()===`form`}function Xr(e){return qr(e)&&e.tagName.toLowerCase()===`input`}function Zr(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function Qr(e,t){return e.button===0&&(!t||t===`_self`)&&!Zr(e)}function $r(e=``){return new URLSearchParams(typeof e==`string`||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map(e=>[n,e]):[[n,r]])},[]))}function ei(e,t){let n=$r(e);return t&&t.forEach((e,r)=>{n.has(r)||t.getAll(r).forEach(e=>{n.append(r,e)})}),n}var ti=null;function ni(){if(ti===null)try{new FormData(document.createElement(`form`),0),ti=!1}catch{ti=!0}return ti}var ri=new Set([`application/x-www-form-urlencoded`,`multipart/form-data`,`text/plain`]);function ii(e){return e!=null&&!ri.has(e)?(H(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Kr}"`),null):e}function ai(e,t){let n,r,i,a,o;if(Yr(e)){let o=e.getAttribute(`action`);r=o?U(o,t):null,n=e.getAttribute(`method`)||Gr,i=ii(e.getAttribute(`enctype`))||Kr,a=new FormData(e)}else if(Jr(e)||Xr(e)&&(e.type===`submit`||e.type===`image`)){let o=e.form;if(o==null)throw Error(`Cannot submit a <button> or <input type="submit"> without a <form>`);let s=e.getAttribute(`formaction`)||o.getAttribute(`action`);if(r=s?U(s,t):null,n=e.getAttribute(`formmethod`)||o.getAttribute(`method`)||Gr,i=ii(e.getAttribute(`formenctype`))||ii(o.getAttribute(`enctype`))||Kr,a=new FormData(o,e),!ni()){let{name:t,type:n,value:r}=e;if(n===`image`){let e=t?`${t}.`:``;a.append(`${e}x`,`0`),a.append(`${e}y`,`0`)}else t&&a.append(t,r)}}else if(qr(e))throw Error(`Cannot submit element that is not <form>, <button>, or <input type="submit|image">`);else n=Gr,r=null,i=Kr,o=e;return a&&i===`text/plain`&&(o=a,a=void 0),{action:r,method:n.toLowerCase(),encType:i,formData:a,body:o}}Object.getOwnPropertyNames(Object.prototype).sort().join(`\0`);var oi={"&":`\\u0026`,">":`\\u003e`,"<":`\\u003c`,"\u2028":`\\u2028`,"\u2029":`\\u2029`},si=/[&><\u2028\u2029]/g;function ci(e){return e.replace(si,e=>oi[e])}function li(e,t){if(e===!1||e==null)throw Error(t)}function ui(e,t,n,r){let i=typeof e==`string`?new URL(e,typeof window>`u`?`server://singlefetch/`:window.location.origin):e;return n?i.pathname.endsWith(`/`)?i.pathname=`${i.pathname}_.${r}`:i.pathname=`${i.pathname}.${r}`:i.pathname===`/`?i.pathname=`_root.${r}`:t&&U(i.pathname,t)===`/`?i.pathname=`${In(t)}/_root.${r}`:i.pathname=`${In(i.pathname)}.${r}`,i}async function di(e,t){if(e.id in t)return t[e.id];try{let n=await i(()=>import(e.module),[],import.meta.url);return t[e.id]=n,n}catch(t){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(t),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function fi(e){return e!=null&&typeof e.page==`string`}function pi(e){return e==null?!1:e.href==null?e.rel===`preload`&&typeof e.imageSrcSet==`string`&&typeof e.imageSizes==`string`:typeof e.rel==`string`&&typeof e.href==`string`}async function mi(e,t,n){return yi((await Promise.all(e.map(async e=>{let r=t.routes[e.route.id];if(r){let e=await di(r,n);return e.links?e.links():[]}return[]}))).flat(1).filter(pi).filter(e=>e.rel===`stylesheet`||e.rel===`preload`).map(e=>e.rel===`stylesheet`?{...e,rel:`prefetch`,as:`style`}:{...e,rel:`prefetch`}))}function hi(e,t,n,r,i,a){let o=(e,t)=>n[t]?e.route.id!==n[t].route.id:!0,s=(e,t)=>n[t].pathname!==e.pathname||n[t].route.path?.endsWith(`*`)&&n[t].params[`*`]!==e.params[`*`];return a===`assets`?t.filter((e,t)=>o(e,t)||s(e,t)):a===`data`?t.filter((t,a)=>{let c=r.routes[t.route.id];if(!c||!c.hasLoader)return!1;if(o(t,a)||s(t,a))return!0;if(t.route.shouldRevalidate){let r=t.route.shouldRevalidate({currentUrl:new URL(i.pathname+i.search+i.hash,window.origin),currentParams:n[0]?.params||{},nextUrl:new URL(e,window.origin),nextParams:t.params,defaultShouldRevalidate:!0});if(typeof r==`boolean`)return r}return!0}):[]}function gi(e,t,{includeHydrateFallback:n}={}){return _i(e.map(e=>{let r=t.routes[e.route.id];if(!r)return[];let i=[r.module];return r.clientActionModule&&(i=i.concat(r.clientActionModule)),r.clientLoaderModule&&(i=i.concat(r.clientLoaderModule)),n&&r.hydrateFallbackModule&&(i=i.concat(r.hydrateFallbackModule)),r.imports&&(i=i.concat(r.imports)),i}).flat(1))}function _i(e){return[...new Set(e)]}function vi(e){let t={},n=Object.keys(e).sort();for(let r of n)t[r]=e[r];return t}function yi(e,t){let n=new Set,r=new Set(t);return e.reduce((e,i)=>{if(t&&!fi(i)&&i.as===`script`&&i.href&&r.has(i.href))return e;let a=JSON.stringify(vi(i));return n.has(a)||(n.add(a),e.push({key:a,link:i})),e},[])}function bi(){let e=f(Yn);return li(e,`You must render this element inside a <DataRouterContext.Provider> element`),e}function xi(){let e=f(Xn);return li(e,`You must render this element inside a <DataRouterStateContext.Provider> element`),e}var Si=s(void 0);Si.displayName=`FrameworkContext`;function Ci(){let e=f(Si);return li(e,`You must render this element inside a <HydratedRouter> element`),e}function wi(e,t){let n=f(Si),[r,i]=A(!1),[a,o]=A(!1),{onFocus:s,onBlur:c,onMouseEnter:l,onMouseLeave:u,onTouchStart:p}=t,m=d(null);N(()=>{if(e===`render`&&o(!0),e===`viewport`){let e=new IntersectionObserver(e=>{e.forEach(e=>{o(e.isIntersecting)})},{threshold:.5});return m.current&&e.observe(m.current),()=>{e.disconnect()}}},[e]),N(()=>{if(r){let e=setTimeout(()=>{o(!0)},100);return()=>{clearTimeout(e)}}},[r]);let h=()=>{i(!0)},g=()=>{i(!1),o(!1)};return n?e===`intent`?[a,m,{onFocus:Ti(s,h),onBlur:Ti(c,g),onMouseEnter:Ti(l,h),onMouseLeave:Ti(u,g),onTouchStart:Ti(p,h)}]:[a,m,{}]:[!1,m,{}]}function Ti(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function Ei({page:e,...t}){let n=Qn(),{nonce:r}=Ci(),{router:i}=bi(),a=b(()=>cn(i.routes,e,i.basename),[i.routes,e,i.basename]);return a?(t.nonce==null&&r&&(t={...t,nonce:r}),h(n?Oi:ki,{page:e,matches:a,...t})):null}function Di(e){let{manifest:t,routeModules:n}=Ci(),[r,i]=A([]);return N(()=>{let r=!1;return mi(e,t,n).then(e=>{r||i(e)}),()=>{r=!0}},[e,t,n]),r}function Oi({page:e,matches:t,...n}){let r=q(),{future:i}=Ci(),{basename:a}=bi();return h(o,null,b(()=>{if(e===r.pathname+r.search+r.hash)return[];let n=ui(e,a,i.v8_trailingSlashAwareDataRequests,`rsc`),o=!1,s=[];for(let e of t)typeof e.route.shouldRevalidate==`function`?o=!0:s.push(e.route.id);return o&&s.length>0&&n.searchParams.set(`_routes`,s.join(`,`)),[n.pathname+n.search]},[a,i.v8_trailingSlashAwareDataRequests,e,r,t]).map(e=>h(`link`,{key:e,rel:`prefetch`,as:`fetch`,href:e,...n})))}function ki({page:e,matches:t,...n}){let r=q(),{future:i,manifest:a,routeModules:s}=Ci(),{basename:c}=bi(),{loaderData:l,matches:u}=xi(),d=b(()=>hi(e,t,u,a,r,`data`),[e,t,u,a,r]),f=b(()=>hi(e,t,u,a,r,`assets`),[e,t,u,a,r]),p=b(()=>{if(e===r.pathname+r.search+r.hash)return[];let n=new Set,o=!1;if(t.forEach(e=>{let t=a.routes[e.route.id];!t||!t.hasLoader||(!d.some(t=>t.route.id===e.route.id)&&e.route.id in l&&s[e.route.id]?.shouldRevalidate||t.hasClientLoader?o=!0:n.add(e.route.id))}),n.size===0)return[];let u=ui(e,c,i.v8_trailingSlashAwareDataRequests,`data`);return o&&n.size>0&&u.searchParams.set(`_routes`,t.filter(e=>n.has(e.route.id)).map(e=>e.route.id).join(`,`)),[u.pathname+u.search]},[c,i.v8_trailingSlashAwareDataRequests,l,r,a,d,t,e,s]),m=b(()=>gi(f,a),[f,a]),g=Di(f);return h(o,null,p.map(e=>h(`link`,{key:e,rel:`prefetch`,as:`fetch`,href:e,...n})),m.map(e=>h(`link`,{key:e,rel:`modulepreload`,href:e,...n})),g.map(({key:e,link:t})=>h(`link`,{key:e,nonce:n.nonce,...t,crossOrigin:t.crossOrigin??n.crossOrigin})))}function Ai(...e){return t=>{e.forEach(e=>{typeof e==`function`?e(t):e!=null&&(e.current=t)})}}var ji=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0;try{ji&&(window.__reactRouterVersion=`7.18.0`)}catch{}function Mi({basename:e,children:t,useTransitions:n,window:r}){let i=d();i.current??=$t({window:r,v5Compat:!0});let a=i.current,[o,s]=A({action:a.action,location:a.location}),c=l(e=>{n===!1?s(e):g(()=>s(e))},[n]);return y(()=>a.listen(c),[a,c]),h(Hr,{basename:e,children:t,location:o.location,navigationType:o.action,navigator:a,useTransitions:n})}function Ni({basename:e,children:t,history:n,useTransitions:r}){let[i,a]=A({action:n.action,location:n.location}),o=l(e=>{r===!1?a(e):g(()=>a(e))},[r]);return y(()=>n.listen(o),[n,o]),h(Hr,{basename:e,children:t,location:i.location,navigationType:i.action,navigator:n,useTransitions:r})}Ni.displayName=`unstable_HistoryRouter`;var Pi=O(function({onClick:e,discover:t=`render`,prefetch:n=`none`,relative:r,reloadDocument:i,replace:a,mask:s,state:c,target:l,to:u,preventScrollReset:d,viewTransition:p,defaultShouldRevalidate:m,...g},_){let{basename:v,navigator:y,useTransitions:b}=f(G),x=typeof u==`string`&&Jt.test(u),S=Wn(u,v);u=S.to;let C=lr(u,{relative:r}),w=q(),T=null;if(s){let e=Pn(s,[],w.mask?w.mask.pathname:`/`,!0);v!==`/`&&(e.pathname=e.pathname===`/`?v:W([v,e.pathname])),T=y.createHref(e)}let[E,D,O]=wi(n,g),k=Vi(u,{replace:a,mask:s,state:c,target:l,preventScrollReset:d,relative:r,viewTransition:p,defaultShouldRevalidate:m,useTransitions:b});function A(t){e&&e(t),t.defaultPrevented||k(t)}let j=!(S.isExternal||i),M=h(`a`,{...g,...O,href:(j?T:void 0)||S.absoluteURL||C,onClick:j?A:e,ref:Ai(_,D),target:l,"data-discover":!x&&t===`render`?`true`:void 0});return E&&!x?h(o,null,M,h(Ei,{page:C})):M});Pi.displayName=`Link`;var Fi=O(function({"aria-current":e=`page`,caseSensitive:t=!1,className:n=``,end:r=!1,style:i,to:a,viewTransition:o,children:s,...c},l){let u=yr(a,{relative:c.relative}),d=q(),p=f(Xn),{navigator:m,basename:g}=f(G),_=p!=null&&Qi(u)&&o===!0,v=m.encodeLocation?m.encodeLocation(u).pathname:u.pathname,y=d.pathname,b=p&&p.navigation&&p.navigation.location?p.navigation.location.pathname:null;t||(y=y.toLowerCase(),b=b?b.toLowerCase():null,v=v.toLowerCase()),b&&g&&(b=U(b,g)||b);let x=v!==`/`&&v.endsWith(`/`)?v.length-1:v.length,S=y===v||!r&&y.startsWith(v)&&y.charAt(x)===`/`,C=b!=null&&(b===v||!r&&b.startsWith(v)&&b.charAt(v.length)===`/`),w={isActive:S,isPending:C,isTransitioning:_},T=S?e:void 0,E;E=typeof n==`function`?n(w):[n,S?`active`:null,C?`pending`:null,_?`transitioning`:null].filter(Boolean).join(` `);let D=typeof i==`function`?i(w):i;return h(Pi,{...c,"aria-current":T,className:E,ref:l,style:D,to:a,viewTransition:o},typeof s==`function`?s(w):s)});Fi.displayName=`NavLink`;var Ii=O(({discover:e=`render`,fetcherKey:t,navigate:n,reloadDocument:r,replace:i,state:a,method:o=Gr,action:s,onSubmit:c,relative:l,preventScrollReset:u,viewTransition:d,defaultShouldRevalidate:p,...m},_)=>{let{useTransitions:v}=f(G),y=Gi(),b=Ki(s,{relative:l}),x=o.toLowerCase()===`get`?`get`:`post`,S=typeof s==`string`&&Jt.test(s);return h(`form`,{ref:_,method:x,action:b,onSubmit:r?c:e=>{if(c&&c(e),e.defaultPrevented)return;e.preventDefault();let r=e.nativeEvent.submitter,s=r?.getAttribute(`formmethod`)||o,f=()=>y(r||e.currentTarget,{fetcherKey:t,method:s,navigate:n,replace:i,state:a,relative:l,preventScrollReset:u,viewTransition:d,defaultShouldRevalidate:p});v&&n!==!1?g(()=>f()):f()},...m,"data-discover":!S&&e===`render`?`true`:void 0})});Ii.displayName=`Form`;function Li({getKey:e,storageKey:t,...n}){let r=f(Si),{basename:i}=f(G),a=q(),o=Ir();Xi({getKey:e,storageKey:t});let s=b(()=>{if(!r||!e)return null;let t=Yi(a,o,i,e);return t===a.key?null:t},[]);if(!r||r.isSpaMode)return null;let c=((e,t)=>{if(!window.history.state||!window.history.state.key){let e=Math.random().toString(32).slice(2);window.history.replaceState({key:e},``)}try{let n=JSON.parse(sessionStorage.getItem(e)||`{}`)[t||window.history.state.key];typeof n==`number`&&window.scrollTo(0,n)}catch(t){console.error(t),sessionStorage.removeItem(e)}}).toString();return n.nonce==null&&r?.nonce&&(n.nonce=r.nonce),h(`script`,{...n,suppressHydrationWarning:!0,dangerouslySetInnerHTML:{__html:`(${c})(${ci(JSON.stringify(t||qi))}, ${ci(JSON.stringify(s))})`}})}Li.displayName=`ScrollRestoration`;function Ri(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function zi(e){let t=f(Yn);return V(t,Ri(e)),t}function Bi(e){let t=f(Xn);return V(t,Ri(e)),t}function Vi(e,{target:t,replace:n,mask:r,state:i,preventScrollReset:a,relative:o,viewTransition:s,defaultShouldRevalidate:c,useTransitions:u}={}){let d=mr(),f=q(),p=yr(e,{relative:o});return l(l=>{if(Qr(l,t)){l.preventDefault();let t=n===void 0?rn(f)===rn(p):n,m=()=>d(e,{replace:t,mask:r,state:i,preventScrollReset:a,relative:o,viewTransition:s,defaultShouldRevalidate:c});u?g(()=>m()):m()}},[f,d,p,n,r,i,t,e,a,o,s,c,u])}function Hi(e){H(typeof URLSearchParams<`u`,"You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let t=d($r(e)),n=d(!1),r=q(),i=b(()=>ei(r.search,n.current?null:t.current),[r.search]),a=mr();return[i,l((e,t)=>{let r=$r(typeof e==`function`?e(new URLSearchParams(i)):e);n.current=!0,a(`?`+r,t)},[a,i])]}var Ui=0,Wi=()=>`__${String(++Ui)}__`;function Gi(){let{router:e}=zi(`useSubmit`),{basename:t}=f(G),n=Pr(),r=e.fetch,i=e.navigate;return l(async(e,a={})=>{let{action:o,method:s,encType:c,formData:l,body:u}=ai(e,t);a.navigate===!1?await r(a.fetcherKey||Wi(),n,a.action||o,{defaultShouldRevalidate:a.defaultShouldRevalidate,preventScrollReset:a.preventScrollReset,formData:l,body:u,formMethod:a.method||s,formEncType:a.encType||c,flushSync:a.flushSync}):await i(a.action||o,{defaultShouldRevalidate:a.defaultShouldRevalidate,preventScrollReset:a.preventScrollReset,formData:l,body:u,formMethod:a.method||s,formEncType:a.encType||c,replace:a.replace,state:a.state,fromRouteId:n,flushSync:a.flushSync,viewTransition:a.viewTransition})},[r,i,t,n])}function Ki(e,{relative:t}={}){let{basename:n}=f(G),r=f(K);V(r,`useFormAction must be used inside a RouteContext`);let[i]=r.matches.slice(-1),a={...yr(e||`.`,{relative:t})},o=q();if(e==null){a.search=o.search;let e=new URLSearchParams(a.search),t=e.getAll(`index`);if(t.some(e=>e===``)){e.delete(`index`),t.filter(e=>e).forEach(t=>e.append(`index`,t));let n=e.toString();a.search=n?`?${n}`:``}}return(!e||e===`.`)&&i.route.index&&(a.search=a.search?a.search.replace(/^\?/,`?index&`):`?index`),n!==`/`&&(a.pathname=a.pathname===`/`?n:W([n,a.pathname])),rn(a)}var qi=`react-router-scroll-positions`,Ji={};function Yi(e,t,n,r){let i=null;return r&&(i=r(n===`/`?e:{...e,pathname:U(e.pathname,n)||e.pathname},t)),i??=e.key,i}function Xi({getKey:e,storageKey:t}={}){let{router:n}=zi(`useScrollRestoration`),{restoreScrollPosition:r,preventScrollReset:i}=Bi(`useScrollRestoration`),{basename:a}=f(G),o=q(),s=Ir(),c=Fr();N(()=>(window.history.scrollRestoration=`manual`,()=>{window.history.scrollRestoration=`auto`}),[]),Zi(l(()=>{if(c.state===`idle`){let t=Yi(o,s,a,e);Ji[t]=window.scrollY}try{sessionStorage.setItem(t||qi,JSON.stringify(Ji))}catch(e){H(!1,`Failed to save scroll positions in sessionStorage, <ScrollRestoration /> will not work properly (${e}).`)}window.history.scrollRestoration=`auto`},[c.state,e,a,o,s,t])),typeof document<`u`&&(y(()=>{try{let e=sessionStorage.getItem(t||qi);e&&(Ji=JSON.parse(e))}catch{}},[t]),y(()=>{let t=n?.enableScrollRestoration(Ji,()=>window.scrollY,e?(t,n)=>Yi(t,n,a,e):void 0);return()=>t&&t()},[n,a,e]),y(()=>{if(r!==!1){if(typeof r==`number`){window.scrollTo(0,r);return}try{if(o.hash){let e=document.getElementById(decodeURIComponent(o.hash.slice(1)));if(e){e.scrollIntoView();return}}}catch{H(!1,`"${o.hash.slice(1)}" is not a decodable element ID. The view will not scroll to it.`)}i!==!0&&window.scrollTo(0,0)}},[o,r,i]))}function Zi(e,t){let{capture:n}=t||{};N(()=>{let t=n==null?void 0:{capture:n};return window.addEventListener(`pagehide`,e,t),()=>{window.removeEventListener(`pagehide`,e,t)}},[e,n])}function Qi(e,{relative:t}={}){let n=f($n);V(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:r}=zi(`useViewTransitionState`),i=yr(e,{relative:t});if(!n.isTransitioning)return!1;let a=U(n.currentLocation.pathname,r)||n.currentLocation.pathname,o=U(n.nextLocation.pathname,r)||n.nextLocation.pathname;return Tn(i.pathname,o)!=null||Tn(i.pathname,a)!=null}_();function $i({tabs:e,active:t,onChange:n}){return M(`div`,{className:`flex rounded-lg border border-border bg-surface p-0.5 gap-0.5`,children:e.map(e=>M(`button`,{type:`button`,onClick:()=>n(e.id),className:[`flex-1 rounded-md px-3 py-1.5 text-xs font-medium transition-colors`,t===e.id?`bg-primary/12 text-primary`:`text-foreground-subtle hover:text-foreground hover:bg-surface-hover`].join(` `),children:e.label},e.id))})}function ea(e){let t=e.formats;if(!t)return``;let n=Object.values(t).filter(e=>e!==void 0&&e.sizeMB>0).map(e=>e.sizeMB);if(n.length===0)return``;let r=Math.min(...n),i=Math.max(...n);return r===i?`${r} MB`:`${r}-${i} MB`}function ta(e){return`${e.inputSize.width}x${e.inputSize.height}`}function na(e){return e.formats?Object.keys(e.formats).filter(t=>e.formats[t]!==void 0):[]}function ra({entry:e,selected:t,onSelect:n,disabled:r}){let i=ea(e),a=ta(e),o=na(e);return v(`button`,{type:`button`,onClick:n,disabled:r,className:[`w-full text-left rounded-lg border p-3 transition-all`,t?`border-primary bg-primary/5 ring-1 ring-primary/30`:`border-border bg-background hover:border-foreground-subtle/40 hover:bg-surface-hover/50`,r?`opacity-50 cursor-not-allowed`:`cursor-pointer`].join(` `),children:[M(`div`,{className:`flex items-start justify-between gap-2`,children:v(`div`,{className:`flex-1 min-w-0`,children:[v(`div`,{className:`flex items-center gap-2`,children:[M(`span`,{className:`text-xs font-semibold text-foreground truncate`,children:e.name}),t&&M(gt,{className:`h-3.5 w-3.5 text-primary shrink-0`})]}),M(`p`,{className:`text-[10px] text-foreground-subtle mt-0.5 line-clamp-2`,children:e.description})]})}),v(`div`,{className:`flex items-center gap-3 mt-2 flex-wrap`,children:[v(`span`,{className:`inline-flex items-center gap-1 text-[10px] text-foreground-subtle`,children:[M(ve,{className:`h-3 w-3`}),a]}),i&&M(`span`,{className:`text-[10px] text-foreground-subtle`,children:i}),o.length>0&&M(`div`,{className:`flex gap-1`,children:o.map(e=>M(`span`,{className:`text-[9px] uppercase rounded bg-surface border border-border px-1 py-0.5 text-foreground-subtle font-mono`,children:e},e))}),e.labels.length>0&&v(`span`,{className:`text-[10px] text-foreground-subtle`,children:[e.labels.length,` label`,e.labels.length===1?``:`s`]})]})]})}function ia({field:e,value:t,onChange:n,disabled:r}){let i=e.catalog??[],a=i.length>0,o=Pt(i).length>0,s=e.allowCustomPath!==!1||e.allowCustom===!0,c=[...a?[{id:`catalog`,label:`Models (${i.length})`}]:[],...s?[{id:`custom`,label:`Custom Path`}]:[]],[l,u]=A(a?`catalog`:`custom`),d=t==null?``:String(t);return v(`div`,{className:`space-y-3`,children:[c.length>1&&M($i,{tabs:c,active:l,onChange:u}),l===`catalog`&&a&&o&&M(Ve,{catalog:i,value:d,onChange:e=>n(e),disabled:r||e.disabled}),l===`catalog`&&a&&!o&&M(`div`,{className:`space-y-1.5 max-h-[320px] overflow-y-auto pr-1`,children:i.filter(e=>e.legacy!==!0).map(t=>M(ra,{entry:t,selected:d===t.id,onSelect:()=>n(t.id),disabled:r||e.disabled},t.id))}),l===`catalog`&&!a&&v(`div`,{className:`rounded-md border border-info/30 bg-info/5 px-3 py-2 flex items-start gap-2`,children:[M(z,{className:`h-3.5 w-3.5 text-info shrink-0 mt-0.5`}),M(`p`,{className:`text-[11px] text-foreground-subtle leading-relaxed`,children:`No predefined models available. Use the Custom Path tab to specify a model file path or URL.`})]}),l===`custom`&&s&&v(`div`,{className:`space-y-2`,children:[M(`input`,{type:`text`,className:`w-full rounded-md border border-border bg-background px-3 py-2 text-sm text-foreground focus:border-primary focus:ring-1 focus:ring-primary/30 outline-none disabled:opacity-50`,placeholder:`Enter path like /data/models/custom.onnx or https://...`,value:d,disabled:r||e.disabled,onChange:e=>n(e.target.value)}),e.acceptFormats&&e.acceptFormats.length>0&&v(`p`,{className:`text-[10px] text-foreground-subtle`,children:[`Accepted formats: `,e.acceptFormats.join(`, `)]})]}),(e.compatibilityNote||e.conversionGuideUrl)&&v(`div`,{className:`flex items-start justify-between gap-3 pt-1`,children:[e.compatibilityNote&&v(`p`,{className:`flex items-start gap-1 text-[10px] text-foreground-subtle`,children:[M(z,{className:`h-3 w-3 mt-0.5 shrink-0`}),e.compatibilityNote]}),e.conversionGuideUrl&&v(`a`,{href:e.conversionGuideUrl,target:`_blank`,rel:`noopener noreferrer`,className:`flex items-center gap-1 text-[11px] text-primary hover:underline shrink-0`,children:[`How to convert your model`,M(re,{className:`h-3 w-3`})]})]})]})}function aa(e){let t=te();return w({queryKey:[`field-resolver`,e?.capName??`<none>`,e?.methodName??`<none>`,e?.input??{}],enabled:!!e,queryFn:async()=>{if(!e)throw Error(`useFieldResolver: resolver is null (enabled guard should have prevented this)`);let n=e=>e!==null&&(typeof e==`object`||typeof e==`function`),r=Reflect.get(t.trpcClient,e.capName);if(!n(r))throw Error(`useFieldResolver: no cap namespace '${e.capName}' on the tRPC client`);let i=Reflect.get(r,e.methodName);if(!n(i))throw Error(`useFieldResolver: no method '${e.methodName}' on cap '${e.capName}'`);let a=Reflect.get(i,`query`);if(typeof a!=`function`)throw Error(`useFieldResolver: '${e.capName}.${e.methodName}' has no .query() (resolvers must be query methods, not mutations)`);return await a(e.input??{})}})}_();function oa(e){return typeof e==`string`&&e.length>0&&e!==`undefined`&&e!==`null`}function sa(e={}){let t=k(),n=yt(void 0,{enabled:e.enabled??!0}),r=b(()=>(n.data??[]).filter(e=>oa(e.nodeId)),[n.data]),i=l(()=>{t.invalidateQueries({queryKey:[`pipelineOrchestrator`,`listAgentSettings`]})},[t]);return{agents:r,isLoading:n.isLoading,isError:n.isError,error:n.error,refetch:()=>{n.refetch()},invalidate:i}}_();function ca({field:e,disabled:t}){let n=k(),r=e.deviceId,i=aa(e.catalogResolver),a=Le({deviceId:r}),o=nt({onSuccess:()=>{n.invalidateQueries({queryKey:[[`pipelineOrchestrator`,`getCameraSettings`]]}),n.invalidateQueries({queryKey:[[`deviceManager`]]})}}),s=i.data,c=a.data??null,l=b(()=>s?pa(s,c):[],[s,c]),u=b(()=>{if(!s)return{};let e={};for(let t of s.slots)for(let n of t.addons)e[n.id]=n.enabledByDefault??!0;return e},[s]);return i.error?v(`div`,{className:`text-xs text-red-400`,children:[`Failed to load pipeline catalog for `,M(`code`,{children:e.nodeId}),`:`,` `,String(i.error.message??i.error)]}):i.isLoading||!s?v(`div`,{className:`text-xs text-foreground-subtle animate-pulse`,children:[`Loading pipeline for `,e.nodeId,`…`]}):v(`div`,{className:`col-span-full space-y-4`,children:[v(`div`,{className:`flex items-center gap-2 text-[11px] text-foreground-subtle`,children:[`Agent: `,M(`span`,{className:`text-foreground`,children:e.nodeId}),v(`span`,{className:`ml-2`,children:[`Engine:`,` `,M(`span`,{className:`text-foreground font-mono`,children:`${s.selectedEngine.runtime}/${s.selectedEngine.backend}`})]}),v(`span`,{className:`ml-auto text-[10px]`,children:[`Model + settings edited on Pipeline → `,e.nodeId,`.`]})]}),M(B,{schema:s,steps:l,onChange:()=>{},templates:[],selectedTemplateId:null,onSelectTemplate:()=>{},onSaveTemplate:()=>{},onUpdateTemplate:()=>{},onDeleteTemplate:()=>{},readOnly:t===!0,hideTemplates:!0,toggleMode:`threeState`,hideModelAndSettings:!0,overrides:c?.stepToggles??{},onOverrideChange:(e,t)=>o.mutate({deviceId:r,addonId:e,enabled:t}),inheritedEnabledByAddon:u}),M(fa,{deviceId:r,currentAgentNodeId:e.nodeId,catalog:s,pipelineByAgent:da(c?.pipelineByAgent,s),disabled:t===!0})]})}function la(e,t){for(let n of e.slots)for(let e of n.addons)if(e.id===t)return e.defaultModelId}function ua(e,t){return e?{modelId:e.modelId??la(t,`audio-classifier`)??``,enabled:e.enabled}:null}function da(e,t){let n={};for(let[r,i]of Object.entries(e??{}))n[r]={steps:i.steps,audio:ua(i.audio,t)};return n}function fa({deviceId:e,currentAgentNodeId:t,catalog:n,pipelineByAgent:r,disabled:i}){let a=k(),o=Ce(),[s,c]=A(!1),[l,u]=A(t),{agents:d}=sa({enabled:s}),f=mt({deviceId:e,agentNodeId:l},{enabled:s}),p=$e({onSuccess:()=>{a.invalidateQueries({queryKey:[[`pipelineOrchestrator`,`getCameraSettings`]]}),a.invalidateQueries({queryKey:[[`pipelineOrchestrator`,`resolvePipeline`]]})}}),m=r[l]??null,h=d,g=b(()=>m?ma(m.steps,n):[],[m,n]);return v(`section`,{className:`rounded-lg border border-border bg-surface overflow-hidden`,children:[v(`button`,{type:`button`,onClick:()=>c(e=>!e),className:`w-full px-4 py-2 flex items-center gap-2 hover:bg-surface-hover`,children:[M(s?ee:ne,{className:`h-3 w-3`}),M(`h3`,{className:`text-xs font-semibold text-foreground uppercase tracking-wide`,children:`Advanced — custom pipeline per agent`}),M(`span`,{className:`ml-auto text-[10px] text-foreground-subtle`,children:Object.keys(r).length>0?`${Object.keys(r).length} override(s) active`:`None configured`})]}),s&&v(`div`,{className:`border-t border-border px-4 py-3 space-y-3`,children:[v(`div`,{className:`flex items-center gap-2 text-xs`,children:[M(`span`,{className:`text-foreground-subtle`,children:`Agent:`}),v(`select`,{value:l,disabled:i,onChange:e=>u(e.target.value),className:`rounded border border-border bg-surface-hover px-2 py-1 text-xs text-foreground focus:outline-none focus:border-primary`,children:[typeof t==`string`&&t.length>0&&t!==`undefined`&&v(`option`,{value:t,children:[t,` (current)`]}),h.filter(e=>e.nodeId!==t).map(e=>M(`option`,{value:e.nodeId,children:e.nodeId},e.nodeId))]}),r[l]&&v(`button`,{type:`button`,onClick:()=>{(async()=>{await o({title:`Remove pipeline override`,message:`Discard the custom pipeline for ${l}? This camera reverts to the agent default plus its step toggles.`,confirmLabel:`Remove override`,variant:`danger`})&&p.mutate({deviceId:e,agentNodeId:l,pipeline:null})})()},disabled:i||p.isPending,className:`ml-auto inline-flex items-center gap-1 px-2 py-1 text-[11px] text-red-400 hover:bg-red-500/10 rounded disabled:opacity-50`,children:[M(se,{className:`h-3 w-3`}),`Remove override`]})]}),m?M(B,{schema:n,steps:g,onChange:t=>{let n=m?.audio??null;p.mutate({deviceId:e,agentNodeId:l,pipeline:{steps:ha(t),audio:n?{modelId:n.modelId,enabled:n.enabled}:null}})},templates:[],selectedTemplateId:null,onSelectTemplate:()=>{},onSaveTemplate:()=>{},onUpdateTemplate:()=>{},onDeleteTemplate:()=>{},readOnly:i,hideTemplates:!0,allowAutoModel:!0}):v(`div`,{className:`text-xs text-foreground-subtle space-y-2`,children:[v(`p`,{children:[`No custom pipeline for `,M(`code`,{children:l}),`. The camera uses the agent's default + step toggles.`]}),M(`button`,{type:`button`,onClick:()=>{let t=f.data;t&&p.mutate({deviceId:e,agentNodeId:l,pipeline:{steps:t.steps,audio:ua(t.audio,n)}})},disabled:i||p.isPending||!f.data,className:`inline-flex items-center gap-1 px-3 py-1.5 text-xs font-medium rounded bg-primary/15 text-primary hover:bg-primary/25 disabled:opacity-50`,children:`Create wholesale override from current default`})]})]})]})}function pa(e,t){let n=t=>{for(let n of e.slots)for(let e of n.addons)if(e.id===t)return e;return null},r=e=>{let n=e.enabledByDefault??!0,r=t?.stepToggles?.[e.id],i=r===void 0?n:r;return{addonId:e.id,addonName:e.name,slot:e.slot,inputClasses:[...e.inputClasses],outputClasses:[...e.outputClasses],enabled:i,modelId:e.defaultModelId,children:[]}},i=new Map;for(let t of e.slots)for(let e of t.addons)i.set(e.id,r(e));let a=[],o=new Set;for(let[e,t]of i){let r=n(e);r&&r.inputClasses.length===0&&(a.push(t),o.add(e))}let s=!0;for(;s;){s=!1;for(let[e,t]of i){if(o.has(e))continue;let r=n(e);if(r)for(let[a,c]of i){if(a===e)continue;let i=n(a);if(i&&o.has(a)&&i.outputClasses.some(e=>r.inputClasses.includes(e))){c.children.push(t),o.add(e),s=!0;break}}}}return a}function ma(e,t){let n=new Map;for(let e of t.slots)for(let t of e.addons)n.set(t.id,t);let r=e=>{let t=n.get(e.addonId);return{addonId:e.addonId,addonName:t?.name??e.addonId,slot:t?.slot??`detector`,inputClasses:t?.inputClasses?[...t.inputClasses]:[],outputClasses:t?.outputClasses?[...t.outputClasses]:[],enabled:e.enabled,modelId:e.modelId??``,children:(e.children??[]).map(r),...e.settings?{settings:{...e.settings}}:{}}};return[...e].map(r)}function ha(e){let t=e=>({addonId:e.addonId,...e.modelId?{modelId:e.modelId}:{},enabled:e.enabled,children:e.children.map(t),...e.settings?{settings:{...e.settings}}:{}});return e.map(t)}function ga({to:e}){let{search:t}=q();return M(J,{to:`${e}${t}`,replace:!0})}_();function _a(){let e=te(),t=k(),[n,r]=A(()=>e.isConnected()?`connected`:`disconnected`),i=d(!1),[a,o]=A(0),[s,c]=A([]);N(()=>e.subscribeConnectionEvents(e=>{r(t=>(t!==`connected`&&e===`connected`&&i.current&&o(e=>e+1),e!==`connected`&&(i.current=!0),e))}),[e]),N(()=>{a!==0&&t.invalidateQueries({queryKey:[[`addons`,`getLastRestart`]]})},[a,t]);let{data:l}=Ze(void 0,{enabled:n===`connected`&&a>0,staleTime:0,refetchOnMount:!1,refetchOnWindowFocus:!1}),u=d(null);return N(()=>{if(l==null||l.requestedAt===u.current)return;u.current=l.requestedAt;let e=ya(l);c(t=>[...t,e]);let t=window.setTimeout(()=>{c(t=>t.filter(t=>t.id!==e.id))},6e3);return()=>window.clearTimeout(t)},[l]),M(T,{children:s.length>0&&M(va,{toasts:s})})}function va({toasts:e}){return M(`div`,{className:`fixed top-[calc(env(safe-area-inset-top)+1rem)] right-[calc(env(safe-area-inset-right)+1rem)] z-50 flex flex-col gap-2 max-w-sm w-full pointer-events-none`,children:e.map(e=>v(`div`,{className:`pointer-events-auto flex items-start gap-2 px-3 py-2.5 rounded-md border border-green-500/30 bg-green-500/10 shadow-lg backdrop-blur-sm`,children:[M(Ae,{className:`w-4 h-4 shrink-0 mt-0.5 text-green-400`}),v(`div`,{children:[M(`div`,{className:`text-[11px] font-semibold text-foreground`,children:e.title}),M(`div`,{className:`text-[10px] text-foreground-subtle mt-0.5`,children:e.message})]})]},e.id))})}function ya(e){let t=`restart-${e.requestedAt}`;if(e.kind===`framework-update`&&e.packageName!==void 0&&e.toVersion!==void 0){let n=e.fromVersion===void 0?`v${e.toVersion}`:`v${e.fromVersion} → v${e.toVersion}`;return{id:t,title:`Framework updated`,message:`${e.packageName} is now ${n}.`}}return{id:t,title:`Server restarted`,message:e.requestedBy===void 0?`Manual restart completed.`:`Manual restart by ${e.requestedBy} completed.`}}_();var ba={info:{bg:`bg-blue-500/10`,border:`border-blue-500/30`,icon:z},warning:{bg:`bg-orange-500/10`,border:`border-orange-500/30`,icon:je},critical:{bg:`bg-red-500/10`,border:`border-red-500/30`,icon:Xe}};function xa({toast:e,onDismiss:t}){let n=ba[e.severity]??ba.info,r=n.icon;return N(()=>{let n=e.duration??5e3;if(n<=0)return;let r=setTimeout(()=>t(e.id),n);return()=>clearTimeout(r)},[e.id,e.duration,t]),v(`div`,{className:`flex items-start gap-3 px-4 py-3 rounded-lg border ${n.border} ${n.bg} shadow-lg backdrop-blur-sm animate-in slide-in-from-right-5 fade-in duration-200`,children:[M(r,{className:`h-4 w-4 shrink-0 mt-0.5 text-foreground-subtle`}),v(`div`,{className:`flex-1 min-w-0`,children:[M(`div`,{className:`text-xs font-semibold text-foreground`,children:e.title}),M(`div`,{className:`text-[11px] text-foreground-subtle mt-0.5`,children:e.message})]}),M(`button`,{type:`button`,onClick:()=>t(e.id),className:`shrink-0 p-0.5 rounded hover:bg-surface-hover transition-colors`,children:M(vt,{className:`h-3.5 w-3.5 text-foreground-subtle`})})]})}function Sa(){let[e,t]=A([]),n=l(e=>{t(t=>t.filter(t=>t.id!==e))},[]);return me(void 0,{onData:e=>{let n=e,r=`toast-${Date.now()}-${Math.random().toString(36).slice(2,8)}`;t(e=>[...e,{...n,id:r,timestamp:Date.now()}])}}),e.length===0?null:M(`div`,{className:`fixed bottom-[calc(env(safe-area-inset-bottom)+1rem)] right-[calc(env(safe-area-inset-right)+1rem)] z-50 flex flex-col gap-2 max-w-sm w-full pointer-events-none`,children:e.map(e=>M(`div`,{className:`pointer-events-auto`,children:M(xa,{toast:e,onDismiss:n})},e.id))})}function Ca(e){return e.hubReachable?e.authOk===!1?{kind:`auth-expired`}:{kind:`cluster-degraded`,offlineAgents:e.offlineAgents,offlineAgentIds:e.offlineAgentIds}:{kind:`hub-unreachable`}}function wa(e){switch(e.kind){case`connected`:return null;case`reconnecting`:return{severity:`warning`,message:`Reconnecting…`,i18nKey:`connection.reconnecting`,showSpinner:!0};case`cluster-degraded`:{let t=e.offlineAgentIds??[];return t.length>0?{severity:`warning`,message:`Cluster degraded — ${t.length===1?`node ${t[0]}`:`nodes ${t.join(`, `)}`} not responding. Hub is online, live link re-establishing…`,i18nKey:`connection.degradedNodes`,i18nParams:{nodes:t.join(`, `),count:t.length},showSpinner:!0}:e.offlineAgents!==null&&e.offlineAgents>0?{severity:`warning`,message:`Cluster degraded — ${e.offlineAgents} cluster node${e.offlineAgents===1?``:`s`} offline. Hub is online, live link re-establishing…`,i18nKey:`connection.degradedCount`,i18nParams:{count:e.offlineAgents},showSpinner:!0}:{severity:`warning`,message:`Live connection interrupted — hub is online (a cluster node may be unresponsive), re-establishing…`,i18nKey:`connection.degraded`,showSpinner:!0}}case`hub-unreachable`:return{severity:`danger`,message:`Server unreachable — reconnecting…`,i18nKey:`connection.disconnected`,showSpinner:!0};case`auth-expired`:return{severity:`danger`,message:`Session expired — please sign in again.`,i18nKey:`connection.sessionExpired`,showSpinner:!1,action:`sign-in`}}}var Ta=4e3,Ea=5e3;function Da(e){if(typeof e!=`object`||!e)return{offline:null,offlineIds:null,ok:null};let t={...e},n=typeof t.ok==`boolean`?t.ok:null,r=t.agents;if(typeof r!=`object`||!r)return{offline:null,offlineIds:null,ok:n};let i={...r},a=i.offline,o=typeof a==`number`?a:null,s=i.offlineIds;return{offline:o,offlineIds:Array.isArray(s)?s.filter(e=>typeof e==`string`):null,ok:n}}async function Oa(e,t,n,r){let i=new AbortController,a=setTimeout(()=>i.abort(),n);try{return await e(t,{method:`GET`,signal:i.signal,credentials:`omit`,...r===void 0?{}:{headers:r}})}finally{clearTimeout(a)}}async function ka(e){let t=e.fetchFn??fetch,n=e.timeoutMs??Ta,r=e.origin.replace(/\/+$/,``),i;try{i=await Oa(t,`${r}/health`,n)}catch{return{hubReachable:!1,authOk:`unknown`,offlineAgents:null,offlineAgentIds:null}}if(!i.ok)return{hubReachable:!1,authOk:`unknown`,offlineAgents:null,offlineAgentIds:null};let a=null,o=e.getToken();if(o!==null&&o!==``)try{let e=await Oa(t,`${r}/health/details`,n,{Authorization:`Bearer ${o}`});e.ok&&(a=await e.json())}catch{}let s;try{s=Da(a??await i.json())}catch{s={offline:null,offlineIds:null,ok:null}}if(s.ok===!1)return{hubReachable:!1,authOk:`unknown`,offlineAgents:null,offlineAgentIds:null};let c=e.getToken(),l=`unknown`;if(c!==null&&c!==``)try{let e=await Oa(t,`${r}/trpc/auth.me`,n,{Authorization:`Bearer ${c}`});e.status===401||e.status===403?l=!1:e.ok&&(l=!0)}catch{l=`unknown`}return{hubReachable:!0,authOk:l,offlineAgents:s.offline,offlineAgentIds:s.offlineIds}}var Aa={kind:`connected`},ja={kind:`reconnecting`};function Ma(e){let t=e.probeIntervalMs??Ea,n=new Set,r=Aa,i=0,a=!1,o=null;function s(e){if(r!==e){r=e;for(let e of n)e()}}function c(){a=!1,o!==null&&(clearTimeout(o),o=null)}function l(){let n=i;e.probe().then(e=>{n!==i||!a||(s(Ca(e)),o=setTimeout(l,t))},()=>{n!==i||!a||(s({kind:`hub-unreachable`}),o=setTimeout(l,t))})}function u(e){if(i+=1,e===`connected`){c(),s(Aa);return}if(e===`connecting`){c(),s(ja);return}(r.kind===`connected`||r.kind===`reconnecting`)&&s(ja),o!==null&&(clearTimeout(o),o=null),a=!0,l()}return{getSnapshot:()=>r,subscribe:e=>(n.add(e),()=>{n.delete(e)}),onSdkConnectionState:u,dispose:()=>{i+=1,c(),n.clear()}}}var Na=null;function Pa(){return Na===null&&(Na=Ma({probe:()=>ka({origin:P(),getToken:()=>localStorage.getItem(`camstack_admin_token`)})})),Na}function Fa(e){Pa().onSdkConnectionState(e)}var Ia=null,La=0;function Ra(){if(!Ia){let e=La;Ia=kt({serverUrl:P(),token:localStorage.getItem(`camstack_admin_token`)??void 0,onConnectionChange:t=>{e===La&&Fa(t)}})}return Ia}function za(){let e=Ia;Ia=null,La+=1,e?.close()}function Ba(e){try{let t=e.split(`.`);if(t.length<2||!t[1])return null;let n=JSON.parse(atob(t[1]));return{id:String(n.userId??``),username:String(n.username??`unknown`),isAdmin:!!n.isAdmin,exp:Number(n.exp??0),scopes:Va(n.scopes)}}catch{return null}}function Va(e){return Ft(e)}function Ha(e){let t=Ba(e);return t?t.exp*1e3<Date.now():!0}var Ua=[`camstack://auth-callback`,`camstack.dev://auth-callback`],Wa=512;function Ga(e){return e.replace(/^([a-z][a-z0-9.+-]*):\/\/\/(?!\/)/i,`$1://`).replace(/\/$/,``)}function Ka(e){if(!e||e.length>Wa)return null;let t=Ga(e);return Ua.includes(t)?{kind:`app-callback`,url:t}:!e.startsWith(`/`)||e.startsWith(`//`)||e.includes(`\\`)||e.includes(`://`)||e.includes(`..`)||e===`/login`||e.startsWith(`/login?`)||e.startsWith(`/login/`)?null:{kind:`path`,path:e}}function qa(e,t){return`${e}?code=${encodeURIComponent(t)}`}function Ja(e,t=Date.now()){return so(t)??Ka(e)}var Ya=2048;function Xa(e){return!e||e.length>Ya||!e.startsWith(`/`)||e.startsWith(`//`)||e.includes(`\\`)||e.includes(`://`)||e.includes(`..`)||e===`/login`||e.startsWith(`/login?`)||e.startsWith(`/login/`)?null:e}function Za(e,t=Date.now()){ro(to,e,Xa,t)}function Qa(e=Date.now()){return io(to,Xa,e)}function $a(e,t=Date.now()){return Qa(t)??Xa(e)}var eo=`camstack:login-redirect`,to=`camstack:login-next`,no=10*6e4;function ro(e,t,n,r){let i=ao();if(!i||!n(t))return;let a={raw:t??``,at:r};try{i.setItem(e,JSON.stringify(a))}catch{}}function io(e,t,n){let r=ao();if(!r)return null;let i=null;try{i=r.getItem(e),r.removeItem(e)}catch{return null}if(!i)return null;try{let e=JSON.parse(i);if(typeof e!=`object`||!e)return null;let r=Reflect.get(e,`at`),a=Reflect.get(e,`raw`);return typeof r!=`number`||typeof a!=`string`||n-r>no?null:t(a)}catch{return null}}function ao(){if(typeof window>`u`)return null;try{return window.sessionStorage}catch{return null}}function oo(e,t=Date.now()){ro(eo,e,Ka,t)}function so(e=Date.now()){return io(eo,Ka,e)}_();var co=`changeme`;async function lo(e){await fetch(F(`/api/auth/session`),{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({token:e})}).catch(()=>{})}async function uo(e,t){if(await lo(e),t.kind===`path`){window.location.replace(F(t.path));return}try{za();let{code:e}=await Ra().trpcClient.auth.createHandoffCode.mutate();window.location.replace(qa(t.url,e))}catch{window.location.replace(F(`/admin`))}}async function fo(e,t){await lo(e),window.location.replace(F(t))}var po=s(null);function mo({children:e}){let[t,n]=A(null),[r,i]=A(!0),[a,o]=A(!1);N(()=>{if(typeof window<`u`&&window.location.hash.startsWith(`#token=`)){let e=new URLSearchParams(window.location.hash.slice(1)).get(`token`);if(e){localStorage.setItem(`camstack_admin_token`,e);let t=so();if(t){uo(e,t);return}let n=Qa();if(n){fo(e,n);return}window.history.replaceState({},``,F(`/admin`))}}let e=localStorage.getItem(`camstack_admin_token`);if(!e){i(!1);return}if(Ha(e)){localStorage.removeItem(`camstack_admin_token`),i(!1);return}let t=Ba(e);if(!t){localStorage.removeItem(`camstack_admin_token`),i(!1);return}lo(e),Ra().trpcClient.system.info.query().then(()=>n(t)).catch(e=>{let r=e?.data?.code;r===`UNAUTHORIZED`||r===`FORBIDDEN`?(localStorage.removeItem(`camstack_admin_token`),za()):n(t)}).finally(()=>i(!1))},[]);let s=l(async(e,t)=>{let r=await Ra().login(e,t),i=r.secondFactors??(r.requiresTotp===!0?[`totp`]:[]);if(i.length>0)return{kind:`second-factor`,challengeToken:r.token,factors:i};let a=r.token;return localStorage.setItem(`camstack_admin_token`,a),await lo(a),za(),n(Ba(a)),o(t===co),{kind:`ok`}},[]),c=l(async(e,t)=>{let r=(await Ra().loginVerifyTotp(e,t)).token;localStorage.setItem(`camstack_admin_token`,r),await lo(r),za(),n(Ba(r)),o(!1)},[]),u=l(async e=>{localStorage.setItem(`camstack_admin_token`,e),await lo(e),za(),n(Ba(e)),o(!1)},[]),d=l(()=>{localStorage.removeItem(`camstack_admin_token`),fetch(F(`/api/auth/session`),{method:`DELETE`}).catch(()=>{}),za(),n(null),o(!1)},[]),f=l(()=>{o(!1)},[]);return M(po.Provider,{value:{user:t,loading:r,mustChangePassword:a,login:s,verifyTotp:c,finalizePasskeyLogin:u,logout:d,clearMustChangePassword:f},children:e})}function ho(){let e=f(po);if(!e)throw Error(`useAuth must be used within AuthProvider`);return e}_();function go(e){if(typeof e!=`object`||!e)return;let{data:t}=e;return t?.code}function _o(e,t){let n=go(e);return n===`UNAUTHORIZED`||n===`FORBIDDEN`?!0:/UNAUTHORIZED|FORBIDDEN/.test(t)}function vo(e,t,n){let[r,i]=A(!1),[a,o]=A(null);return N(()=>{if(i(!1),o(null),!t){i(!0);return}let r=!1;return e.init().catch(()=>void 0),e.awaitConnected().then(()=>{r||i(!0)},e=>{if(r)return;let t=e instanceof Error?e.message:String(e);if(_o(e,t)){n();return}o(t),i(!0)}),()=>{r=!0}},[e,t,n]),{bootReady:r,bootError:a}}_();var yo=3e4;function bo(e){let t=d(e);t.current=e,N(()=>{let e=null,n=()=>{if(document.visibilityState===`hidden`){e=Date.now();return}if(document.visibilityState===`visible`&&e!==null){let n=Date.now()-e;e=null,n>=yo&&t.current()}},r=()=>{t.current()},i=e=>{e.persisted&&t.current()};return document.addEventListener(`visibilitychange`,n),window.addEventListener(`online`,r),window.addEventListener(`pageshow`,i),()=>{document.removeEventListener(`visibilitychange`,n),window.removeEventListener(`online`,r),window.removeEventListener(`pageshow`,i)}},[])}_();function xo(e){let t=new Set,n=new Set,r=e=>e.page.remoteName.includes(e.addonId.replace(/[^a-zA-Z0-9]+/g,`_`)),i=[...e.filter(r),...e.filter(e=>!r(e))],a=[];for(let e of i){let r=`${e.addonId}::${e.page.id}`;t.has(r)||n.has(e.page.path)||(t.add(r),n.add(e.page.path),a.push({id:e.page.id,addonId:e.addonId,label:e.page.label,icon:e.page.icon,path:e.page.path,remoteName:e.page.remoteName,bundle:e.page.bundle,bundleUrl:e.bundleUrl,...e.page.section===void 0?{}:{section:e.page.section},...e.page.sectionLabel===void 0?{}:{sectionLabel:e.page.sectionLabel}}))}return a}var So=new Map,Co=new Map,wo=new Set;function To(e){return!e||typeof e!=`object`?!1:typeof e.default==`function`}async function Eo(e,t){let i=So.get(e);if(i)return i;let a=Co.get(e);if(a)return a;wo.has(e)||(pe(),r([{name:e,entry:F(t),type:`module`}],{force:!1}),wo.add(e));let o=n(`${e}/page`).then(n=>{if(!To(n))throw Error(`Addon page remote ${e} (${t}) does not expose a default React component on './page'`);return So.set(e,n.default),Co.delete(e),n.default}).catch(t=>{throw Co.delete(e),t});return Co.set(e,o),o}function Do(){let{pagePath:e}=vr(),t=te(),{data:n}=Fe(void 0),r=b(()=>n?xo(n):void 0,[n]),i=r?.find(t=>t.path===`/addon/${e}`),a=i?.remoteName,o=i?.bundleUrl,[s,c]=A(null),[l,u]=A(null);return N(()=>{if(!a||!o)return;u(null);let e=So.get(a);if(e){c(()=>e);return}c(null);let t=!1;return Eo(a,o).then(e=>{t||c(()=>e)}).catch(e=>{t||u(`Failed to load addon page: ${e instanceof Error?e.message:String(e)}`)}),()=>{t=!0}},[a,o]),r?i?l?M(`div`,{className:`flex items-center justify-center h-full text-red-400 text-sm`,children:l}):s?M(s,{trpc:t.trpcClient,theme:{isDark:document.documentElement.classList.contains(`dark`)},navigate:e=>{window.location.href=F(e)}}):M(`div`,{className:`flex items-center justify-center h-full`,children:M(`div`,{className:`animate-spin h-6 w-6 border-2 border-primary border-t-transparent rounded-full`})}):M(`div`,{className:`flex items-center justify-center h-full text-foreground-subtle`,children:`Addon page not found`}):M(`div`,{className:`flex items-center justify-center h-full`,children:M(`div`,{className:`animate-spin h-6 w-6 border-2 border-primary border-t-transparent rounded-full`})})}jt();var X=e=>typeof e==`string`,Oo=()=>{let e,t,n=new Promise((n,r)=>{e=n,t=r});return n.resolve=e,n.reject=t,n},ko=e=>e==null?``:String(e),Ao=(e,t,n)=>{e.forEach(e=>{t[e]&&(n[e]=t[e])})},jo=/###/g,Mo=e=>e&&e.includes(`###`)?e.replace(jo,`.`):e,No=e=>!e||X(e),Po=(e,t,n)=>{let r=X(t)?t.split(`.`):t,i=0;for(;i<r.length-1;){if(No(e))return{};let t=Mo(r[i]);!e[t]&&n&&(e[t]=new n),e=Object.prototype.hasOwnProperty.call(e,t)?e[t]:{},++i}return No(e)?{}:{obj:e,k:Mo(r[i])}},Fo=(e,t,n)=>{let{obj:r,k:i}=Po(e,t,Object);if(r!==void 0||t.length===1){r[i]=n;return}let a=t[t.length-1],o=t.slice(0,t.length-1),s=Po(e,o,Object);for(;s.obj===void 0&&o.length;)a=`${o[o.length-1]}.${a}`,o=o.slice(0,o.length-1),s=Po(e,o,Object),s?.obj&&s.obj[`${s.k}.${a}`]!==void 0&&(s.obj=void 0);s.obj[`${s.k}.${a}`]=n},Io=(e,t,n,r)=>{let{obj:i,k:a}=Po(e,t,Object);i[a]=i[a]||[],i[a].push(n)},Lo=(e,t)=>{let{obj:n,k:r}=Po(e,t);if(n&&Object.prototype.hasOwnProperty.call(n,r))return n[r]},Ro=(e,t,n)=>{let r=Lo(e,n);return r===void 0?Lo(t,n):r},zo=(e,t,n)=>{for(let r in t)r!==`__proto__`&&r!==`constructor`&&(r in e?X(e[r])||e[r]instanceof String||X(t[r])||t[r]instanceof String?n&&(e[r]=t[r]):zo(e[r],t[r],n):e[r]=t[r]);return e},Bo=e=>e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,`\\$&`),Vo={"&":`&`,"<":`<`,">":`>`,'"':`"`,"'":`'`,"/":`/`},Ho=e=>X(e)?e.replace(/[&<>"'\/]/g,e=>Vo[e]):e,Uo=class{constructor(e){this.capacity=e,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(e){let t=this.regExpMap.get(e);if(t!==void 0)return t;let n=new RegExp(e);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(e,n),this.regExpQueue.push(e),n}},Wo=[` `,`,`,`?`,`!`,`;`],Go=new Uo(20),Ko=(e,t,n)=>{t||=``,n||=``;let r=Wo.filter(e=>!t.includes(e)&&!n.includes(e));if(r.length===0)return!0;let i=Go.getRegExp(`(${r.map(e=>e===`?`?`\\?`:e).join(`|`)})`),a=!i.test(e);if(!a){let t=e.indexOf(n);t>0&&!i.test(e.substring(0,t))&&(a=!0)}return a},qo=(e,t,n=`.`)=>{if(!e)return;if(e[t])return Object.prototype.hasOwnProperty.call(e,t)?e[t]:void 0;let r=t.split(n),i=e;for(let e=0;e<r.length;){if(!i||typeof i!=`object`)return;let t,a=``;for(let o=e;o<r.length;++o)if(o!==e&&(a+=n),a+=r[o],t=i[a],t!==void 0){if([`string`,`number`,`boolean`].includes(typeof t)&&o<r.length-1)continue;e+=o-e+1;break}i=t}return i},Jo=e=>e?.replace(/_/g,`-`),Yo={type:`logger`,log(e){this.output(`log`,e)},warn(e){this.output(`warn`,e)},error(e){this.output(`error`,e)},output(e,t){console?.[e]?.apply?.(console,t)}},Z=new class e{constructor(e,t={}){this.init(e,t)}init(e,t={}){this.prefix=t.prefix||`i18next:`,this.logger=e||Yo,this.options=t,this.debug=t.debug}log(...e){return this.forward(e,`log`,``,!0)}warn(...e){return this.forward(e,`warn`,``,!0)}error(...e){return this.forward(e,`error`,``)}deprecate(...e){return this.forward(e,`warn`,`WARNING DEPRECATED: `,!0)}forward(e,t,n,r){return r&&!this.debug?null:(e=e.map(e=>X(e)?e.replace(/[\r\n\x00-\x1F\x7F]/g,` `):e),X(e[0])&&(e[0]=`${n}${this.prefix} ${e[0]}`),this.logger[t](e))}create(t){return new e(this.logger,{prefix:`${this.prefix}:${t}:`,...this.options})}clone(t){return t||=this.options,t.prefix=t.prefix||this.prefix,new e(this.logger,t)}},Xo=class{constructor(){this.observers={}}on(e,t){return e.split(` `).forEach(e=>{this.observers[e]||(this.observers[e]=new Map);let n=this.observers[e].get(t)||0;this.observers[e].set(t,n+1)}),this}off(e,t){if(this.observers[e]){if(!t){delete this.observers[e];return}this.observers[e].delete(t)}}once(e,t){let n=(...r)=>{t(...r),this.off(e,n)};return this.on(e,n),this}emit(e,...t){this.observers[e]&&Array.from(this.observers[e].entries()).forEach(([e,n])=>{for(let r=0;r<n;r++)e(...t)}),this.observers[`*`]&&Array.from(this.observers[`*`].entries()).forEach(([n,r])=>{for(let i=0;i<r;i++)n(e,...t)})}},Zo=class extends Xo{constructor(e,t={ns:[`translation`],defaultNS:`translation`}){super(),this.data=e||{},this.options=t,this.options.keySeparator===void 0&&(this.options.keySeparator=`.`),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(e){this.options.ns.includes(e)||this.options.ns.push(e)}removeNamespaces(e){let t=this.options.ns.indexOf(e);t>-1&&this.options.ns.splice(t,1)}getResource(e,t,n,r={}){let i=r.keySeparator===void 0?this.options.keySeparator:r.keySeparator,a=r.ignoreJSONStructure===void 0?this.options.ignoreJSONStructure:r.ignoreJSONStructure,o;e.includes(`.`)?o=e.split(`.`):(o=[e,t],n&&(Array.isArray(n)?o.push(...n):X(n)&&i?o.push(...n.split(i)):o.push(n)));let s=Lo(this.data,o);return!s&&!t&&!n&&e.includes(`.`)&&(e=o[0],t=o[1],n=o.slice(2).join(`.`)),s||!a||!X(n)?s:qo(this.data?.[e]?.[t],n,i)}addResource(e,t,n,r,i={silent:!1}){let a=i.keySeparator===void 0?this.options.keySeparator:i.keySeparator,o=[e,t];n&&(o=o.concat(a?n.split(a):n)),e.includes(`.`)&&(o=e.split(`.`),r=t,t=o[1]),this.addNamespaces(t),Fo(this.data,o,r),i.silent||this.emit(`added`,e,t,n,r)}addResources(e,t,n,r={silent:!1}){for(let r in n)(X(n[r])||Array.isArray(n[r]))&&this.addResource(e,t,r,n[r],{silent:!0});r.silent||this.emit(`added`,e,t,n)}addResourceBundle(e,t,n,r,i,a={silent:!1,skipCopy:!1}){let o=[e,t];e.includes(`.`)&&(o=e.split(`.`),r=n,n=t,t=o[1]),this.addNamespaces(t);let s=Lo(this.data,o)||{};a.skipCopy||(n=JSON.parse(JSON.stringify(n))),r?zo(s,n,i):s={...s,...n},Fo(this.data,o,s),a.silent||this.emit(`added`,e,t,n)}removeResourceBundle(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit(`removed`,e,t)}hasResourceBundle(e,t){return this.getResource(e,t)!==void 0}getResourceBundle(e,t){return t||=this.options.defaultNS,this.getResource(e,t)}getDataByLanguage(e){return this.data[e]}hasLanguageSomeTranslations(e){let t=this.getDataByLanguage(e);return!!(t&&Object.keys(t)||[]).find(e=>t[e]&&Object.keys(t[e]).length>0)}toJSON(){return this.data}},Qo={processors:{},addPostProcessor(e){this.processors[e.name]=e},handle(e,t,n,r,i){return e.forEach(e=>{t=this.processors[e]?.process(t,n,r,i)??t}),t}},$o=Symbol(`i18next/PATH_KEY`);function es(){let e=[],t=Object.create(null),n;return t.get=(r,i)=>(n?.revoke?.(),i===$o?e:(e.push(i),n=Proxy.revocable(r,t),n.proxy)),Proxy.revocable(Object.create(null),t).proxy}function ts(e,t){let{[$o]:n}=e(es()),r=t?.keySeparator??`.`,i=t?.nsSeparator??`:`,a=t?.enableSelector===`strict`;if(n.length>1&&i){let e=t?.ns,o=a?Array.isArray(e)?e:e?[e]:null:Array.isArray(e)?e:null;if(o&&(a?o:o.length>1?o.slice(1):[]).includes(n[0]))return`${n[0]}${i}${n.slice(1).join(r)}`}return n.join(r)}var ns=e=>!X(e)&&typeof e!=`boolean`&&typeof e!=`number`,rs=class e extends Xo{constructor(e,t={}){super(),Ao([`resourceStore`,`languageUtils`,`pluralResolver`,`interpolator`,`backendConnector`,`i18nFormat`,`utils`],e,this),this.options=t,this.options.keySeparator===void 0&&(this.options.keySeparator=`.`),this.logger=Z.create(`translator`),this.checkedLoadedFor={}}changeLanguage(e){e&&(this.language=e)}exists(e,t={interpolation:{}}){let n={...t};if(e==null)return!1;let r=this.resolve(e,n);if(r?.res===void 0)return!1;let i=ns(r.res);return!(n.returnObjects===!1&&i)}extractFromKey(e,t){let n=t.nsSeparator===void 0?this.options.nsSeparator:t.nsSeparator;n===void 0&&(n=`:`);let r=t.keySeparator===void 0?this.options.keySeparator:t.keySeparator,i=t.ns||this.options.defaultNS||[],a=n&&e.includes(n),o=!this.options.userDefinedKeySeparator&&!t.keySeparator&&!this.options.userDefinedNsSeparator&&!t.nsSeparator&&!Ko(e,n,r);if(a&&!o){let t=e.match(this.interpolator.nestingRegexp);if(t&&t.length>0)return{key:e,namespaces:X(i)?[i]:i};let a=e.split(n);(n!==r||n===r&&this.options.ns.includes(a[0]))&&(i=a.shift()),e=a.join(r)}return{key:e,namespaces:X(i)?[i]:i}}translate(t,n,r){let i=typeof n==`object`?{...n}:n;if(typeof i!=`object`&&this.options.overloadTranslationOptionHandler&&(i=this.options.overloadTranslationOptionHandler(arguments)),typeof i==`object`&&(i={...i}),i||={},t==null)return``;typeof t==`function`&&(t=ts(t,{...this.options,...i})),Array.isArray(t)||(t=[String(t)]),t=t.map(e=>typeof e==`function`?ts(e,{...this.options,...i}):String(e));let a=i.returnDetails===void 0?this.options.returnDetails:i.returnDetails,o=i.keySeparator===void 0?this.options.keySeparator:i.keySeparator,{key:s,namespaces:c}=this.extractFromKey(t[t.length-1],i),l=c[c.length-1],u=i.nsSeparator===void 0?this.options.nsSeparator:i.nsSeparator;u===void 0&&(u=`:`);let d=i.lng||this.language,f=i.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(d?.toLowerCase()===`cimode`)return f?a?{res:`${l}${u}${s}`,usedKey:s,exactUsedKey:s,usedLng:d,usedNS:l,usedParams:this.getUsedParamsDetails(i)}:`${l}${u}${s}`:a?{res:s,usedKey:s,exactUsedKey:s,usedLng:d,usedNS:l,usedParams:this.getUsedParamsDetails(i)}:s;let p=this.resolve(t,i),m=p?.res,h=p?.usedKey||s,g=p?.exactUsedKey||s,_=[`[object Number]`,`[object Function]`,`[object RegExp]`],v=i.joinArrays===void 0?this.options.joinArrays:i.joinArrays,y=!this.i18nFormat||this.i18nFormat.handleAsObject,b=i.count!==void 0&&!X(i.count),x=e.hasDefaultValue(i),S=b?this.pluralResolver.getSuffix(d,i.count,i):``,C=i.ordinal&&b?this.pluralResolver.getSuffix(d,i.count,{ordinal:!1}):``,w=b&&!i.ordinal&&i.count===0,T=w&&i[`defaultValue${this.options.pluralSeparator}zero`]||i[`defaultValue${S}`]||i[`defaultValue${C}`]||i.defaultValue,E=m;y&&!m&&x&&(E=T);let D=ns(E),O=Object.prototype.toString.apply(E);if(y&&E&&D&&!_.includes(O)&&!(X(v)&&Array.isArray(E))){if(!i.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn(`accessing an object - but returnObjects options is not enabled!`);let e=this.options.returnedObjectHandler?this.options.returnedObjectHandler(h,E,{...i,ns:c}):`key '${s} (${this.language})' returned an object instead of string.`;return a?(p.res=e,p.usedParams=this.getUsedParamsDetails(i),p):e}if(o){let e=Array.isArray(E),t=e?[]:{},n=e?g:h;for(let e in E)if(Object.prototype.hasOwnProperty.call(E,e)){let r=`${n}${o}${e}`;x&&!m?t[e]=this.translate(r,{...i,defaultValue:ns(T)?T[e]:void 0,joinArrays:!1,ns:c}):t[e]=this.translate(r,{...i,joinArrays:!1,ns:c}),t[e]===r&&(t[e]=E[e])}m=t}}else if(y&&X(v)&&Array.isArray(m))m=m.join(v),m&&=this.extendTranslation(m,t,i,r);else{let e=!1,n=!1;!this.isValidLookup(m)&&x&&(e=!0,m=T),this.isValidLookup(m)||(n=!0,m=s);let a=(i.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&n?void 0:m,c=x&&T!==m&&this.options.updateMissing;if(n||e||c){if(this.logger.log(c?`updateKey`:`missingKey`,d,l,b&&!c?`${s}${this.pluralResolver.getSuffix(d,i.count,i)}`:s,c?T:m),o){let e=this.resolve(s,{...i,keySeparator:!1});e&&e.res&&this.logger.warn(`Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.`)}let e=[],t=this.languageUtils.getFallbackCodes(this.options.fallbackLng,i.lng||this.language);if(this.options.saveMissingTo===`fallback`&&t&&t[0])for(let n=0;n<t.length;n++)e.push(t[n]);else this.options.saveMissingTo===`all`?e=this.languageUtils.toResolveHierarchy(i.lng||this.language):e.push(i.lng||this.language);let n=(e,t,n)=>{let r=x&&n!==m?n:a;this.options.missingKeyHandler?this.options.missingKeyHandler(e,l,t,r,c,i):this.backendConnector?.saveMissing&&this.backendConnector.saveMissing(e,l,t,r,c,i),this.emit(`missingKey`,e,l,t,m)};this.options.saveMissing&&(this.options.saveMissingPlurals&&b?e.forEach(e=>{let t=this.pluralResolver.getSuffixes(e,i);w&&i[`defaultValue${this.options.pluralSeparator}zero`]&&!t.includes(`${this.options.pluralSeparator}zero`)&&t.push(`${this.options.pluralSeparator}zero`),t.forEach(t=>{n([e],s+t,i[`defaultValue${t}`]||T)})}):n(e,s,T))}m=this.extendTranslation(m,t,i,p,r),n&&m===s&&this.options.appendNamespaceToMissingKey&&(m=`${l}${u}${s}`),(n||e)&&this.options.parseMissingKeyHandler&&(m=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${l}${u}${s}`:s,e?m:void 0,i))}return a?(p.res=m,p.usedParams=this.getUsedParamsDetails(i),p):m}extendTranslation(e,t,n,r,i){if(this.i18nFormat?.parse)e=this.i18nFormat.parse(e,{...this.options.interpolation.defaultVariables,...n},n.lng||this.language||r.usedLng,r.usedNS,r.usedKey,{resolved:r});else if(!n.skipInterpolation){n.interpolation&&this.interpolator.init({...n,interpolation:{...this.options.interpolation,...n.interpolation}});let a=X(e)&&(n?.interpolation?.skipOnVariables===void 0?this.options.interpolation.skipOnVariables:n.interpolation.skipOnVariables),o;if(a){let t=e.match(this.interpolator.nestingRegexp);o=t&&t.length}let s=n.replace&&!X(n.replace)?n.replace:n;if(this.options.interpolation.defaultVariables&&(s={...this.options.interpolation.defaultVariables,...s}),e=this.interpolator.interpolate(e,s,n.lng||this.language||r.usedLng,n),a){let t=e.match(this.interpolator.nestingRegexp),r=t&&t.length;o<r&&(n.nest=!1)}!n.lng&&r&&r.res&&(n.lng=this.language||r.usedLng),n.nest!==!1&&(e=this.interpolator.nest(e,(...e)=>i?.[0]===e[0]&&!n.context?(this.logger.warn(`It seems you are nesting recursively key: ${e[0]} in key: ${t[0]}`),null):this.translate(...e,t),n)),n.interpolation&&this.interpolator.reset()}let a=n.postProcess||this.options.postProcess,o=X(a)?[a]:a;return e!=null&&o?.length&&n.applyPostProcessor!==!1&&(e=Qo.handle(o,e,t,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...r,usedParams:this.getUsedParamsDetails(n)},...n}:n,this)),e}resolve(e,t={}){let n,r,i,a,o;return X(e)&&(e=[e]),Array.isArray(e)&&(e=e.map(e=>typeof e==`function`?ts(e,{...this.options,...t}):e)),e.forEach(e=>{if(this.isValidLookup(n))return;let s=this.extractFromKey(e,t),c=s.key;r=c;let l=s.namespaces;this.options.fallbackNS&&(l=l.concat(this.options.fallbackNS));let u=t.count!==void 0&&!X(t.count),d=u&&!t.ordinal&&t.count===0,f=t.context!==void 0&&(X(t.context)||typeof t.context==`number`)&&t.context!==``,p=t.lngs?t.lngs:this.languageUtils.toResolveHierarchy(t.lng||this.language,t.fallbackLng);l.forEach(e=>{this.isValidLookup(n)||(o=e,!this.checkedLoadedFor[`${p[0]}-${e}`]&&this.utils?.hasLoadedNamespace&&!this.utils?.hasLoadedNamespace(o)&&(this.checkedLoadedFor[`${p[0]}-${e}`]=!0,this.logger.warn(`key "${r}" for languages "${p.join(`, `)}" won't get resolved as namespace "${o}" was not yet loaded`,`This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!`)),p.forEach(r=>{if(this.isValidLookup(n))return;a=r;let o=[c];if(this.i18nFormat?.addLookupKeys)this.i18nFormat.addLookupKeys(o,c,r,e,t);else{let e;u&&(e=this.pluralResolver.getSuffix(r,t.count,t));let n=`${this.options.pluralSeparator}zero`,i=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(u&&(t.ordinal&&e.startsWith(i)&&o.push(c+e.replace(i,this.options.pluralSeparator)),o.push(c+e),d&&o.push(c+n)),f){let r=`${c}${this.options.contextSeparator||`_`}${t.context}`;o.push(r),u&&(t.ordinal&&e.startsWith(i)&&o.push(r+e.replace(i,this.options.pluralSeparator)),o.push(r+e),d&&o.push(r+n))}}let s;for(;s=o.pop();)this.isValidLookup(n)||(i=s,n=this.getResource(r,e,s,t))}))})}),{res:n,usedKey:r,exactUsedKey:i,usedLng:a,usedNS:o}}isValidLookup(e){return e!==void 0&&!(!this.options.returnNull&&e===null)&&!(!this.options.returnEmptyString&&e===``)}getResource(e,t,n,r={}){return this.i18nFormat?.getResource?this.i18nFormat.getResource(e,t,n,r):this.resourceStore.getResource(e,t,n,r)}getUsedParamsDetails(e={}){let t=[`defaultValue`,`ordinal`,`context`,`replace`,`lng`,`lngs`,`fallbackLng`,`ns`,`keySeparator`,`nsSeparator`,`returnObjects`,`returnDetails`,`joinArrays`,`postProcess`,`interpolation`],n=e.replace&&!X(e.replace),r=n?e.replace:e;if(n&&e.count!==void 0&&(r.count=e.count),this.options.interpolation.defaultVariables&&(r={...this.options.interpolation.defaultVariables,...r}),!n){r={...r};for(let e of t)delete r[e]}return r}static hasDefaultValue(e){for(let t in e)if(Object.prototype.hasOwnProperty.call(e,t)&&t.startsWith(`defaultValue`)&&e[t]!==void 0)return!0;return!1}},is=class{constructor(e){this.options=e,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Z.create(`languageUtils`)}getScriptPartFromCode(e){if(e=Jo(e),!e||!e.includes(`-`))return null;let t=e.split(`-`);return t.length===2||(t.pop(),t[t.length-1].toLowerCase()===`x`)?null:this.formatLanguageCode(t.join(`-`))}getLanguagePartFromCode(e){if(e=Jo(e),!e||!e.includes(`-`))return e;let t=e.split(`-`);return this.formatLanguageCode(t[0])}formatLanguageCode(e){if(X(e)&&e.includes(`-`)){let t;try{t=Intl.getCanonicalLocales(e)[0]}catch{}return t&&this.options.lowerCaseLng&&(t=t.toLowerCase()),t||(this.options.lowerCaseLng?e.toLowerCase():e)}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}isSupportedCode(e){return(this.options.load===`languageOnly`||this.options.nonExplicitSupportedLngs)&&(e=this.getLanguagePartFromCode(e)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.includes(e)}getBestMatchFromCodes(e){if(!e)return null;let t;return e.forEach(e=>{if(t)return;let n=this.formatLanguageCode(e);(!this.options.supportedLngs||this.isSupportedCode(n))&&(t=n)}),!t&&this.options.supportedLngs&&e.forEach(e=>{if(t)return;let n=this.getScriptPartFromCode(e);if(this.isSupportedCode(n))return t=n;let r=this.getLanguagePartFromCode(e);if(this.isSupportedCode(r))return t=r;t=this.options.supportedLngs.find(e=>e===r?!0:!e.includes(`-`)&&!r.includes(`-`)?!1:!!(e.includes(`-`)&&!r.includes(`-`)&&e.slice(0,e.indexOf(`-`))===r||e.startsWith(r)&&r.length>1))}),t||=this.getFallbackCodes(this.options.fallbackLng)[0],t}getFallbackCodes(e,t){if(!e)return[];if(typeof e==`function`&&(e=e(t)),X(e)&&(e=[e]),Array.isArray(e))return e;if(!t)return e.default||[];let n=e[t];return n||=e[this.getScriptPartFromCode(t)],n||=e[this.formatLanguageCode(t)],n||=e[this.getLanguagePartFromCode(t)],n||=e.default,n||[]}toResolveHierarchy(e,t){let n=this.getFallbackCodes((t===!1?[]:t)||this.options.fallbackLng||[],e),r=[],i=e=>{e&&(this.isSupportedCode(e)?r.push(e):this.logger.warn(`rejecting language code not found in supportedLngs: ${e}`))};return X(e)&&(e.includes(`-`)||e.includes(`_`))?(this.options.load!==`languageOnly`&&i(this.formatLanguageCode(e)),this.options.load!==`languageOnly`&&this.options.load!==`currentOnly`&&i(this.getScriptPartFromCode(e)),this.options.load!==`currentOnly`&&i(this.getLanguagePartFromCode(e))):X(e)&&i(this.formatLanguageCode(e)),n.forEach(e=>{r.includes(e)||i(this.formatLanguageCode(e))}),r}},as={zero:0,one:1,two:2,few:3,many:4,other:5},os={select:e=>e===1?`one`:`other`,resolvedOptions:()=>({pluralCategories:[`one`,`other`]})},ss=class{constructor(e,t={}){this.languageUtils=e,this.options=t,this.logger=Z.create(`pluralResolver`),this.pluralRulesCache={}}clearCache(){this.pluralRulesCache={}}getRule(e,t={}){let n=Jo(e===`dev`?`en`:e),r=t.ordinal?`ordinal`:`cardinal`,i=JSON.stringify({cleanedCode:n,type:r});if(i in this.pluralRulesCache)return this.pluralRulesCache[i];let a;try{a=new Intl.PluralRules(n,{type:r})}catch{if(typeof Intl>`u`)return this.logger.error(`No Intl support, please use an Intl polyfill!`),os;if(!e.match(/-|_/))return os;let n=this.languageUtils.getLanguagePartFromCode(e);a=this.getRule(n,t)}return this.pluralRulesCache[i]=a,a}needsPlural(e,t={}){let n=this.getRule(e,t);return n||=this.getRule(`dev`,t),n?.resolvedOptions().pluralCategories.length>1}getPluralFormsOfKey(e,t,n={}){return this.getSuffixes(e,n).map(e=>`${t}${e}`)}getSuffixes(e,t={}){let n=this.getRule(e,t);return n||=this.getRule(`dev`,t),n?n.resolvedOptions().pluralCategories.sort((e,t)=>as[e]-as[t]).map(e=>`${this.options.prepend}${t.ordinal?`ordinal${this.options.prepend}`:``}${e}`):[]}getSuffix(e,t,n={}){let r=this.getRule(e,n);return r?`${this.options.prepend}${n.ordinal?`ordinal${this.options.prepend}`:``}${r.select(t)}`:(this.logger.warn(`no plural rule found for: ${e}`),this.getSuffix(`dev`,t,n))}},cs=(e,t,n,r=`.`,i=!0)=>{let a=Ro(e,t,n);return!a&&i&&X(n)&&(a=qo(e,n,r),a===void 0&&(a=qo(t,n,r))),a},ls=e=>e.replace(/\$/g,`$$$$`),us=class{constructor(e={}){this.logger=Z.create(`interpolator`),this.options=e,this.format=e?.interpolation?.format||(e=>e),this.init(e)}init(e={}){e.interpolation||={escapeValue:!0};let{escape:t,escapeValue:n,useRawValueToEscape:r,prefix:i,prefixEscaped:a,suffix:o,suffixEscaped:s,formatSeparator:c,unescapeSuffix:l,unescapePrefix:u,nestingPrefix:d,nestingPrefixEscaped:f,nestingSuffix:p,nestingSuffixEscaped:m,nestingOptionsSeparator:h,maxReplaces:g,alwaysFormat:_}=e.interpolation;this.escape=t===void 0?Ho:t,this.escapeValue=n===void 0?!0:n,this.useRawValueToEscape=r===void 0?!1:r,this.prefix=i?Bo(i):a||`{{`,this.suffix=o?Bo(o):s||`}}`,this.formatSeparator=c||`,`,this.unescapePrefix=l?``:u?Bo(u):`-`,this.unescapeSuffix=this.unescapePrefix?``:l?Bo(l):``,this.nestingPrefix=d?Bo(d):f||Bo(`$t(`),this.nestingSuffix=p?Bo(p):m||Bo(`)`),this.nestingOptionsSeparator=h||`,`,this.maxReplaces=g||1e3,this.alwaysFormat=_===void 0?!1:_,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){let e=(e,t)=>e?.source===t?(e.lastIndex=0,e):new RegExp(t,`g`);this.regexp=e(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=e(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=e(this.nestingRegexp,`${this.nestingPrefix}((?:[^()"']+|"[^"]*"|'[^']*'|\\((?:[^()]|"[^"]*"|'[^']*')*\\))*?)${this.nestingSuffix}`)}interpolate(e,t,n,r){let i,a,o,s=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},c=e=>{if(!e.includes(this.formatSeparator)){let i=cs(t,s,e,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(i,void 0,n,{...r,...t,interpolationkey:e}):i}let i=e.split(this.formatSeparator),a=i.shift().trim(),o=i.join(this.formatSeparator).trim();return this.format(cs(t,s,a,this.options.keySeparator,this.options.ignoreJSONStructure),o,n,{...r,...t,interpolationkey:a})};this.resetRegExp(),!this.escapeValue&&typeof e==`string`&&/\$t\([^)]*\{[^}]*\{\{/.test(e)&&this.logger.warn(`nesting options string contains interpolated variables with escapeValue: false — if any of those values are attacker-controlled they can inject additional nesting options (e.g. redirect lng/ns). Sanitise untrusted input before passing it to t(), or keep escapeValue: true.`);let l=r?.missingInterpolationHandler||this.options.missingInterpolationHandler,u=r?.interpolation?.skipOnVariables===void 0?this.options.interpolation.skipOnVariables:r.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:e=>ls(e)},{regex:this.regexp,safeValue:e=>this.escapeValue?ls(this.escape(e)):ls(e)}].forEach(t=>{for(o=0;i=t.regex.exec(e);){let n=i[1].trim();if(a=c(n),a===void 0)if(typeof l==`function`){let t=l(e,i,r);a=X(t)?t:``}else if(r&&Object.prototype.hasOwnProperty.call(r,n))a=``;else if(u){a=i[0];continue}else this.logger.warn(`missed to pass in variable ${n} for interpolating ${e}`),a=``;else !X(a)&&!this.useRawValueToEscape&&(a=ko(a));let s=t.safeValue(a);if(e=e.replace(i[0],s),u?(t.regex.lastIndex+=a.length,t.regex.lastIndex-=i[0].length):t.regex.lastIndex=0,o++,o>=this.maxReplaces)break}}),e}nest(e,t,n={}){let r,i,a,o=(e,t)=>{let n=this.nestingOptionsSeparator;if(!e.includes(n))return e;let r=e.split(RegExp(`${Bo(n)}[ ]*{`)),i=`{${r[1]}`;e=r[0],i=this.interpolate(i,a);let o=i.match(/'/g),s=i.match(/"/g);((o?.length??0)%2==0&&!s||(s?.length??0)%2!=0)&&(i=i.replace(/'/g,`"`));try{a=JSON.parse(i),t&&(a={...t,...a})}catch(t){return this.logger.warn(`failed parsing options string in nesting for key ${e}`,t),`${e}${n}${i}`}return a.defaultValue&&a.defaultValue.includes(this.prefix)&&delete a.defaultValue,e};for(;r=this.nestingRegexp.exec(e);){let s=[];a={...n},a=a.replace&&!X(a.replace)?a.replace:a,a.applyPostProcessor=!1,delete a.defaultValue;let c=/{.*}/.test(r[1])?r[1].lastIndexOf(`}`)+1:r[1].indexOf(this.formatSeparator);if(c!==-1&&(s=r[1].slice(c).split(this.formatSeparator).map(e=>e.trim()).filter(Boolean),r[1]=r[1].slice(0,c)),i=t(o.call(this,r[1].trim(),a),a),i&&r[0]===e&&!X(i))return i;X(i)||(i=ko(i)),i||=(this.logger.warn(`missed to resolve ${r[1]} for nesting ${e}`),``),s.length&&(i=s.reduce((e,t)=>this.format(e,t,n.lng,{...n,interpolationkey:r[1].trim()}),i.trim())),e=e.replace(r[0],i),this.regexp.lastIndex=0}return e}},ds=e=>{let t=e.toLowerCase().trim(),n={};if(e.includes(`(`)){let r=e.split(`(`);t=r[0].toLowerCase().trim();let i=r[1].slice(0,-1);t===`currency`&&!i.includes(`:`)?n.currency||=i.trim():t===`relativetime`&&!i.includes(`:`)?n.range||=i.trim():i.split(`;`).forEach(e=>{if(e){let[t,...r]=e.split(`:`),i=r.join(`:`).trim().replace(/^'+|'+$/g,``),a=t.trim();n[a]||(n[a]=i),i===`false`&&(n[a]=!1),i===`true`&&(n[a]=!0),isNaN(i)||(n[a]=parseInt(i,10))}})}return{formatName:t,formatOptions:n}},fs=e=>{let t={};return(n,r,i)=>{let a=i;i&&i.interpolationkey&&i.formatParams&&i.formatParams[i.interpolationkey]&&i[i.interpolationkey]&&(a={...a,[i.interpolationkey]:void 0});let o=r+JSON.stringify(a),s=t[o];return s||(s=e(Jo(r),i),t[o]=s),s(n)}},ps=e=>(t,n,r)=>e(Jo(n),r)(t),ms=class{constructor(e={}){this.logger=Z.create(`formatter`),this.options=e,this.init(e)}init(e,t={interpolation:{}}){this.formatSeparator=t.interpolation.formatSeparator||`,`;let n=t.cacheInBuiltFormats?fs:ps;this.formats={number:n((e,t)=>{let n=new Intl.NumberFormat(e,{...t});return e=>n.format(e)}),currency:n((e,t)=>{let n=new Intl.NumberFormat(e,{...t,style:`currency`});return e=>n.format(e)}),datetime:n((e,t)=>{let n=new Intl.DateTimeFormat(e,{...t});return e=>n.format(e)}),relativetime:n((e,t)=>{let n=new Intl.RelativeTimeFormat(e,{...t});return e=>n.format(e,t.range||`day`)}),list:n((e,t)=>{let n=new Intl.ListFormat(e,{...t});return e=>n.format(e)})}}add(e,t){this.formats[e.toLowerCase().trim()]=t}addCached(e,t){this.formats[e.toLowerCase().trim()]=fs(t)}format(e,t,n,r={}){if(!t||e==null)return e;let i=t.split(this.formatSeparator);if(i.length>1&&i[0].indexOf(`(`)>1&&!i[0].includes(`)`)&&i.find(e=>e.includes(`)`))){let e=i.findIndex(e=>e.includes(`)`));i[0]=[i[0],...i.splice(1,e)].join(this.formatSeparator)}return i.reduce((e,t)=>{let{formatName:i,formatOptions:a}=ds(t);if(this.formats[i]){let t=e;try{let o=r?.formatParams?.[r.interpolationkey]||{},s=o.locale||o.lng||r.locale||r.lng||n;t=this.formats[i](e,s,{...a,...r,...o})}catch(e){this.logger.warn(e)}return t}else this.logger.warn(`there was no format function for ${i}`);return e},e)}},hs=(e,t)=>{e.pending[t]!==void 0&&(delete e.pending[t],e.pendingCount--)},gs=class extends Xo{constructor(e,t,n,r={}){super(),this.backend=e,this.store=t,this.services=n,this.languageUtils=n.languageUtils,this.options=r,this.logger=Z.create(`backendConnector`),this.waitingReads=[],this.maxParallelReads=r.maxParallelReads||10,this.readingCalls=0,this.maxRetries=r.maxRetries>=0?r.maxRetries:5,this.retryTimeout=r.retryTimeout>=1?r.retryTimeout:350,this.state={},this.queue=[],this.backend?.init?.(n,r.backend,r)}queueLoad(e,t,n,r){let i={},a={},o={},s={};return e.forEach(e=>{let r=!0;t.forEach(t=>{let o=`${e}|${t}`;!n.reload&&this.store.hasResourceBundle(e,t)?this.state[o]=2:this.state[o]<0||(this.state[o]===1?a[o]===void 0&&(a[o]=!0):(this.state[o]=1,r=!1,a[o]===void 0&&(a[o]=!0),i[o]===void 0&&(i[o]=!0),s[t]===void 0&&(s[t]=!0)))}),r||(o[e]=!0)}),(Object.keys(i).length||Object.keys(a).length)&&this.queue.push({pending:a,pendingCount:Object.keys(a).length,loaded:{},errors:[],callback:r}),{toLoad:Object.keys(i),pending:Object.keys(a),toLoadLanguages:Object.keys(o),toLoadNamespaces:Object.keys(s)}}loaded(e,t,n){let r=e.split(`|`),i=r[0],a=r[1];t&&this.emit(`failedLoading`,i,a,t),!t&&n&&this.store.addResourceBundle(i,a,n,void 0,void 0,{skipCopy:!0}),this.state[e]=t?-1:2,t&&n&&(this.state[e]=0);let o={};this.queue.forEach(n=>{Io(n.loaded,[i],a),hs(n,e),t&&n.errors.push(t),n.pendingCount===0&&!n.done&&(Object.keys(n.loaded).forEach(e=>{o[e]||(o[e]={});let t=n.loaded[e];t.length&&t.forEach(t=>{o[e][t]===void 0&&(o[e][t]=!0)})}),n.done=!0,n.errors.length?n.callback(n.errors):n.callback())}),this.emit(`loaded`,o),this.queue=this.queue.filter(e=>!e.done)}read(e,t,n,r=0,i=this.retryTimeout,a){if(!e.length)return a(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:e,ns:t,fcName:n,tried:r,wait:i,callback:a});return}this.readingCalls++;let o=(o,s)=>{if(this.readingCalls--,this.waitingReads.length>0){let e=this.waitingReads.shift();this.read(e.lng,e.ns,e.fcName,e.tried,e.wait,e.callback)}if(o&&s&&r<this.maxRetries){setTimeout(()=>{this.read(e,t,n,r+1,i*2,a)},i);return}a(o,s)},s=this.backend[n].bind(this.backend);if(s.length===2){try{let n=s(e,t);n&&typeof n.then==`function`?n.then(e=>o(null,e)).catch(o):o(null,n)}catch(e){o(e)}return}return s(e,t,o)}prepareLoading(e,t,n={},r){if(!this.backend)return this.logger.warn(`No backend was added via i18next.use. Will not load resources.`),r&&r();X(e)&&(e=this.languageUtils.toResolveHierarchy(e)),X(t)&&(t=[t]);let i=this.queueLoad(e,t,n,r);if(!i.toLoad.length)return i.pending.length||r(),null;i.toLoad.forEach(e=>{this.loadOne(e)})}load(e,t,n){this.prepareLoading(e,t,{},n)}reload(e,t,n){this.prepareLoading(e,t,{reload:!0},n)}loadOne(e,t=``){let n=e.split(`|`),r=n[0],i=n[1];this.read(r,i,`read`,void 0,void 0,(n,a)=>{n&&this.logger.warn(`${t}loading namespace ${i} for language ${r} failed`,n),!n&&a&&this.logger.log(`${t}loaded namespace ${i} for language ${r}`,a),this.loaded(e,n,a)})}saveMissing(e,t,n,r,i,a={},o=()=>{}){if(this.services?.utils?.hasLoadedNamespace&&!this.services?.utils?.hasLoadedNamespace(t)){this.logger.warn(`did not save key "${n}" as the namespace "${t}" was not yet loaded`,`This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!`);return}if(!(n==null||n===``)){if(this.backend?.create){let s={...a,isUpdate:i},c=this.backend.create.bind(this.backend);if(c.length<6)try{let i;i=c.length===5?c(e,t,n,r,s):c(e,t,n,r),i&&typeof i.then==`function`?i.then(e=>o(null,e)).catch(o):o(null,i)}catch(e){o(e)}else c(e,t,n,r,o,s)}!e||!e[0]||this.store.addResource(e[0],t,n,r)}}},_s=()=>({debug:!1,initAsync:!0,ns:[`translation`],defaultNS:[`translation`],fallbackLng:[`dev`],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:`all`,preload:!1,keySeparator:`.`,nsSeparator:`:`,pluralSeparator:`_`,contextSeparator:`_`,enableSelector:!1,partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:`fallback`,saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:e=>{let t={};if(typeof e[1]==`object`&&(t=e[1]),X(e[1])&&(t.defaultValue=e[1]),X(e[2])&&(t.tDescription=e[2]),typeof e[2]==`object`||typeof e[3]==`object`){let n=e[3]||e[2];Object.keys(n).forEach(e=>{t[e]=n[e]})}return t},interpolation:{escapeValue:!0,prefix:`{{`,suffix:`}}`,formatSeparator:`,`,unescapePrefix:`-`,nestingPrefix:`$t(`,nestingSuffix:`)`,nestingOptionsSeparator:`,`,maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),vs=e=>(X(e.ns)&&(e.ns=[e.ns]),X(e.fallbackLng)&&(e.fallbackLng=[e.fallbackLng]),X(e.fallbackNS)&&(e.fallbackNS=[e.fallbackNS]),e.supportedLngs&&!e.supportedLngs.includes(`cimode`)&&(e.supportedLngs=e.supportedLngs.concat([`cimode`])),e),ys=()=>{},bs=e=>{Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach(t=>{typeof e[t]==`function`&&(e[t]=e[t].bind(e))})},Q=class e extends Xo{constructor(e={},t){if(super(),this.options=vs(e),this.services={},this.logger=Z,this.modules={external:[]},bs(this),t&&!this.isInitialized&&!e.isClone){if(!this.options.initAsync)return this.init(e,t),this;setTimeout(()=>{this.init(e,t)},0)}}init(e={},t){this.isInitializing=!0,typeof e==`function`&&(t=e,e={}),e.defaultNS==null&&e.ns&&(X(e.ns)?e.defaultNS=e.ns:e.ns.includes(`translation`)||(e.defaultNS=e.ns[0]));let n=_s();this.options={...n,...this.options,...vs(e)},this.options.interpolation={...n.interpolation,...this.options.interpolation},e.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=e.keySeparator),e.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=e.nsSeparator),typeof this.options.overloadTranslationOptionHandler!=`function`&&(this.options.overloadTranslationOptionHandler=n.overloadTranslationOptionHandler);let r=e=>e?typeof e==`function`?new e:e:null;if(!this.options.isClone){this.modules.logger?Z.init(r(this.modules.logger),this.options):Z.init(null,this.options);let e;e=this.modules.formatter?this.modules.formatter:ms;let t=new is(this.options);this.store=new Zo(this.options.resources,this.options);let n=this.services;n.logger=Z,n.resourceStore=this.store,n.languageUtils=t,n.pluralResolver=new ss(t,{prepend:this.options.pluralSeparator}),e&&(n.formatter=r(e),n.formatter.init&&n.formatter.init(n,this.options),this.options.interpolation.format=n.formatter.format.bind(n.formatter)),n.interpolator=new us(this.options),n.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},n.backendConnector=new gs(r(this.modules.backend),n.resourceStore,n,this.options),n.backendConnector.on(`*`,(e,...t)=>{this.emit(e,...t)}),this.modules.languageDetector&&(n.languageDetector=r(this.modules.languageDetector),n.languageDetector.init&&n.languageDetector.init(n,this.options.detection,this.options)),this.modules.i18nFormat&&(n.i18nFormat=r(this.modules.i18nFormat),n.i18nFormat.init&&n.i18nFormat.init(this)),this.translator=new rs(this.services,this.options),this.translator.on(`*`,(e,...t)=>{this.emit(e,...t)}),this.modules.external.forEach(e=>{e.init&&e.init(this)})}if(this.format=this.options.interpolation.format,t||=ys,this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){let e=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);e.length>0&&e[0]!==`dev`&&(this.options.lng=e[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn(`init: no languageDetector is used and no lng is defined`),[`getResource`,`hasResourceBundle`,`getResourceBundle`,`getDataByLanguage`].forEach(e=>{this[e]=(...t)=>this.store[e](...t)}),[`addResource`,`addResources`,`addResourceBundle`,`removeResourceBundle`].forEach(e=>{this[e]=(...t)=>(this.store[e](...t),this)});let i=Oo(),a=()=>{let e=(e,n)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn(`init: i18next is already initialized. You should call init just once!`),this.isInitialized=!0,this.options.isClone||this.logger.log(`initialized`,this.options),this.emit(`initialized`,this.options),i.resolve(n),t(e,n)};if((this.languages||this.isLanguageChangingTo)&&!this.isInitialized)return e(null,this.t.bind(this));this.changeLanguage(this.options.lng,e)};return this.options.resources||!this.options.initAsync?a():setTimeout(a,0),i}loadResources(e,t=ys){let n=t,r=X(e)?e:this.language;if(typeof e==`function`&&(n=e),!this.options.resources||this.options.partialBundledLanguages){if(r?.toLowerCase()===`cimode`&&(!this.options.preload||this.options.preload.length===0))return n();let e=[],t=t=>{t&&t!==`cimode`&&this.services.languageUtils.toResolveHierarchy(t).forEach(t=>{t!==`cimode`&&(e.includes(t)||e.push(t))})};r?t(r):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(e=>t(e)),this.options.preload?.forEach?.(e=>t(e)),this.services.backendConnector.load(e,this.options.ns,e=>{!e&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),n(e)})}else n(null)}reloadResources(e,t,n){let r=Oo();return typeof e==`function`&&(n=e,e=void 0),typeof t==`function`&&(n=t,t=void 0),e||=this.languages,t||=this.options.ns,n||=ys,this.services.backendConnector.reload(e,t,e=>{r.resolve(),n(e)}),r}use(e){if(!e)throw Error(`You are passing an undefined module! Please check the object you are passing to i18next.use()`);if(!e.type)throw Error(`You are passing a wrong module! Please check the object you are passing to i18next.use()`);return e.type===`backend`&&(this.modules.backend=e),(e.type===`logger`||e.log&&e.warn&&e.error)&&(this.modules.logger=e),e.type===`languageDetector`&&(this.modules.languageDetector=e),e.type===`i18nFormat`&&(this.modules.i18nFormat=e),e.type===`postProcessor`&&Qo.addPostProcessor(e),e.type===`formatter`&&(this.modules.formatter=e),e.type===`3rdParty`&&this.modules.external.push(e),this}setResolvedLanguage(e){if(!(!e||!this.languages)&&![`cimode`,`dev`].includes(e)){for(let e=0;e<this.languages.length;e++){let t=this.languages[e];if(![`cimode`,`dev`].includes(t)&&this.store.hasLanguageSomeTranslations(t)){this.resolvedLanguage=t;break}}!this.resolvedLanguage&&!this.languages.includes(e)&&this.store.hasLanguageSomeTranslations(e)&&(this.resolvedLanguage=e,this.languages.unshift(e))}}changeLanguage(e,t){this.isLanguageChangingTo=e;let n=Oo();this.emit(`languageChanging`,e);let r=e=>{this.language=e,this.languages=this.services.languageUtils.toResolveHierarchy(e),this.resolvedLanguage=void 0,this.setResolvedLanguage(e)},i=(i,a)=>{a?this.isLanguageChangingTo===e&&(r(a),this.translator.changeLanguage(a),this.isLanguageChangingTo=void 0,this.emit(`languageChanged`,a),this.logger.log(`languageChanged`,a)):this.isLanguageChangingTo=void 0,n.resolve((...e)=>this.t(...e)),t&&t(i,(...e)=>this.t(...e))},a=t=>{!e&&!t&&this.services.languageDetector&&(t=[]);let n=X(t)?t:t&&t[0],a=this.store.hasLanguageSomeTranslations(n)?n:this.services.languageUtils.getBestMatchFromCodes(X(t)?[t]:t);a&&(this.language||r(a),this.translator.language||this.translator.changeLanguage(a),this.services.languageDetector?.cacheUserLanguage?.(a)),this.loadResources(a,e=>{i(e,a)})};return!e&&this.services.languageDetector&&!this.services.languageDetector.async?a(this.services.languageDetector.detect()):!e&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(a):this.services.languageDetector.detect(a):a(e),n}getFixedT(e,t,n,r){let i=r?.scopeNs,a=(e,t,...r)=>{let o;o=typeof t==`object`?{...t}:this.options.overloadTranslationOptionHandler([e,t].concat(r)),o.lng=o.lng||a.lng,o.lngs=o.lngs||a.lngs;let s=o.ns!==void 0&&o.ns!==null;o.ns=o.ns||a.ns,o.keyPrefix!==``&&(o.keyPrefix=o.keyPrefix||n||a.keyPrefix);let c={...this.options,...o};Array.isArray(i)&&!s&&(c.ns=i),typeof o.keyPrefix==`function`&&(o.keyPrefix=ts(o.keyPrefix,c));let l=this.options.keySeparator||`.`,u;return o.keyPrefix&&Array.isArray(e)?u=e.map(e=>(typeof e==`function`&&(e=ts(e,c)),`${o.keyPrefix}${l}${e}`)):(typeof e==`function`&&(e=ts(e,c)),u=o.keyPrefix?`${o.keyPrefix}${l}${e}`:e),this.t(u,o)};return X(e)?a.lng=e:a.lngs=e,a.ns=t,a.keyPrefix=n,a}t(...e){return this.translator?.translate(...e)}exists(...e){return this.translator?.exists(...e)}setDefaultNamespace(e){this.options.defaultNS=e}hasLoadedNamespace(e,t={}){if(!this.isInitialized)return this.logger.warn(`hasLoadedNamespace: i18next was not initialized`,this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn(`hasLoadedNamespace: i18n.languages were undefined or empty`,this.languages),!1;let n=t.lng||this.resolvedLanguage||this.languages[0],r=this.options?this.options.fallbackLng:!1,i=this.languages[this.languages.length-1];if(n.toLowerCase()===`cimode`)return!0;let a=(e,t)=>{let n=this.services.backendConnector.state[`${e}|${t}`];return n===-1||n===0||n===2};if(t.precheck){let e=t.precheck(this,a);if(e!==void 0)return e}return!!(this.hasResourceBundle(n,e)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||a(n,e)&&(!r||a(i,e)))}loadNamespaces(e,t){let n=Oo();return this.options.ns?(X(e)&&(e=[e]),e.forEach(e=>{this.options.ns.includes(e)||this.options.ns.push(e)}),this.loadResources(e=>{n.resolve(),t&&t(e)}),n):(t&&t(),Promise.resolve())}loadLanguages(e,t){let n=Oo();X(e)&&(e=[e]);let r=this.options.preload||[],i=e.filter(e=>!r.includes(e)&&this.services.languageUtils.isSupportedCode(e));return i.length?(this.options.preload=r.concat(i),this.loadResources(e=>{n.resolve(),t&&t(e)}),n):(t&&t(),Promise.resolve())}dir(e){if(e||=this.resolvedLanguage||(this.languages?.length>0?this.languages[0]:this.language),!e)return`rtl`;try{let t=new Intl.Locale(e);if(t&&t.getTextInfo){let e=t.getTextInfo();if(e&&e.direction)return e.direction}}catch{}let t=`ar.shu.sqr.ssh.xaa.yhd.yud.aao.abh.abv.acm.acq.acw.acx.acy.adf.ads.aeb.aec.afb.ajp.apc.apd.arb.arq.ars.ary.arz.auz.avl.ayh.ayl.ayn.ayp.bbz.pga.he.iw.ps.pbt.pbu.pst.prp.prd.ug.ur.ydd.yds.yih.ji.yi.hbo.men.xmn.fa.jpr.peo.pes.prs.dv.sam.ckb`.split(`.`),n=this.services?.languageUtils||new is(_s());return e.toLowerCase().indexOf(`-latn`)>1?`ltr`:t.includes(n.getLanguagePartFromCode(e))||e.toLowerCase().indexOf(`-arab`)>1?`rtl`:`ltr`}static createInstance(t={},n){let r=new e(t,n);return r.createInstance=e.createInstance,r}cloneInstance(t={},n=ys){let r=t.forkResourceStore;r&&delete t.forkResourceStore;let i={...this.options,...t,isClone:!0},a=new e(i);if((t.debug!==void 0||t.prefix!==void 0)&&(a.logger=a.logger.clone(t)),[`store`,`services`,`language`].forEach(e=>{a[e]=this[e]}),a.services={...this.services},a.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},r&&(a.store=new Zo(Object.keys(this.store.data).reduce((e,t)=>(e[t]={...this.store.data[t]},e[t]=Object.keys(e[t]).reduce((n,r)=>(n[r]={...e[t][r]},n),e[t]),e),{}),i),a.services.resourceStore=a.store),t.interpolation){let e={..._s().interpolation,...this.options.interpolation,...t.interpolation},n={...i,interpolation:e};a.services.interpolator=new us(n)}return a.translator=new rs(a.services,i),a.translator.on(`*`,(e,...t)=>{a.emit(e,...t)}),a.init(i,n),a.translator.options=i,a.translator.backendConnector.services.utils={hasLoadedNamespace:a.hasLoadedNamespace.bind(a)},a}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}.createInstance();Q.createInstance,Q.dir,Q.init,Q.loadResources,Q.reloadResources,Q.use,Q.changeLanguage,Q.getFixedT,Q.t,Q.exists,Q.setDefaultNamespace,Q.hasLoadedNamespace,Q.loadNamespaces,Q.loadLanguages;var xs=(e,t,n,r)=>{let i=[n,{code:t,...r||{}}];if(e?.services?.logger?.forward)return e.services.logger.forward(i,`warn`,`react-i18next::`,!0);Os(i[0])&&(i[0]=`react-i18next:: ${i[0]}`),e?.services?.logger?.warn?e.services.logger.warn(...i):console?.warn&&console.warn(...i)},Ss={},Cs=(e,t,n,r)=>{Os(n)&&Ss[n]||(Os(n)&&(Ss[n]=new Date),xs(e,t,n,r))},ws=(e,t)=>()=>{if(e.isInitialized)t();else{let n=()=>{setTimeout(()=>{e.off(`initialized`,n)},0),t()};e.on(`initialized`,n)}},Ts=(e,t,n)=>{e.loadNamespaces(t,ws(e,n))},Es=(e,t,n,r)=>{if(Os(n)&&(n=[n]),e.options.preload&&e.options.preload.indexOf(t)>-1)return Ts(e,n,r);n.forEach(t=>{e.options.ns.indexOf(t)<0&&e.options.ns.push(t)}),e.loadLanguages(t,ws(e,r))},Ds=(e,t,n={})=>!t.languages||!t.languages.length?(Cs(t,`NO_LANGUAGES`,`i18n.languages were undefined or empty`,{languages:t.languages}),!0):t.hasLoadedNamespace(e,{lng:n.lng,precheck:(t,r)=>{if(n.bindI18n&&n.bindI18n.indexOf(`languageChanging`)>-1&&t.services.backendConnector.backend&&t.isLanguageChangingTo&&!r(t.isLanguageChangingTo,e))return!1}}),Os=e=>typeof e==`string`,ks=e=>typeof e==`object`&&!!e,As=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,js={"&":`&`,"&":`&`,"<":`<`,"<":`<`,">":`>`,">":`>`,"'":`'`,"'":`'`,""":`"`,""":`"`," ":` `," ":` `,"©":`©`,"©":`©`,"®":`®`,"®":`®`,"…":`…`,"…":`…`,"/":`/`,"/":`/`},Ms=e=>js[e],Ns={bindI18n:`languageChanged`,bindI18nStore:``,transEmptyNodeValue:``,transSupportBasicHtmlNodes:!0,transWrapTextNodes:``,transKeepBasicHtmlNodesFor:[`br`,`strong`,`i`,`p`],useSuspense:!0,unescape:e=>e.replace(As,Ms),transDefaultProps:void 0},Ps=(e={})=>{Ns={...Ns,...e}},Fs=()=>Ns,Is,Ls=e=>{Is=e},Rs=()=>Is,zs={type:`3rdParty`,init(e){Ps(e.options.react),Ls(e)}};_();var Bs=s(),Vs=class{constructor(){this.usedNamespaces={}}addUsedNamespaces(e){e.forEach(e=>{this.usedNamespaces[e]||(this.usedNamespaces[e]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}},Hs=t((t=>{var n=(_(),e(C));function r(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var i=typeof Object.is==`function`?Object.is:r,a=n.useState,o=n.useEffect,s=n.useLayoutEffect,c=n.useDebugValue;function l(e,t){var n=t(),r=a({inst:{value:n,getSnapshot:t}}),i=r[0].inst,l=r[1];return s(function(){i.value=n,i.getSnapshot=t,u(i)&&l({inst:i})},[e,n,t]),o(function(){return u(i)&&l({inst:i}),e(function(){u(i)&&l({inst:i})})},[e]),c(n),n}function u(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!i(e,n)}catch{return!0}}function d(e,t){return t()}var f=typeof window>`u`||window.document===void 0||window.document.createElement===void 0?d:l;t.useSyncExternalStore=n.useSyncExternalStore===void 0?f:n.useSyncExternalStore})),Us=t(((e,t)=>{t.exports=Hs()}));_();var Ws=Us(),Gs={t:(e,t)=>{if(Os(t))return t;if(ks(t)&&Os(t.defaultValue))return t.defaultValue;if(typeof e==`function`)return``;if(Array.isArray(e)){let t=e[e.length-1];return typeof t==`function`?``:t}return e},ready:!1},Ks=()=>()=>{},qs=(e,t={})=>{let{i18n:n}=t,{i18n:r,defaultNS:i}=f(Bs)||{},a=n||r||Rs();a&&!a.reportNamespaces&&(a.reportNamespaces=new Vs),a||Cs(a,`NO_I18NEXT_INSTANCE`,`useTranslation: You will need to pass in an i18next instance by using initReactI18next`);let o=b(()=>({...Fs(),...a?.options?.react,...t}),[a,t]),{useSuspense:s,keyPrefix:c}=o,u=e||i||a?.options?.defaultNS,p=Os(u)?[u]:u||[`translation`],m=b(()=>p,p);a?.reportNamespaces?.addUsedNamespaces?.(m);let h=d(0),g=l(e=>{if(!a)return Ks;let{bindI18n:t,bindI18nStore:n}=o,r=()=>{h.current+=1,e()};return t&&a.on(t,r),n&&a.store.on(n,r),()=>{t&&t.split(` `).forEach(e=>a.off(e,r)),n&&n.split(` `).forEach(e=>a.store.off(e,r))}},[a,o]),_=d(),v=l(()=>{if(!a)return Gs;let e=!!(a.isInitialized||a.initializedStoreOnce)&&m.every(e=>Ds(e,a,o)),n=t.lng||a.language,r=h.current,i=_.current;if(i&&i.ready===e&&i.lng===n&&i.keyPrefix===c&&i.revision===r)return i;let s={t:a.getFixedT(n,o.nsMode===`fallback`?m:m[0],c,{scopeNs:m}),ready:e,lng:n,keyPrefix:c,revision:r};return _.current=s,s},[a,m,c,o,t.lng]),[y,x]=A(0),{t:S,ready:C}=(0,Ws.useSyncExternalStore)(g,v,v);N(()=>{if(a&&!C&&!s){let e=()=>x(e=>e+1);t.lng?Es(a,t.lng,m,e):Ts(a,m,e)}},[a,t.lng,m,C,s,y]);let w=a||{},T=d(null),E=d(),D=e=>{let t=Object.getOwnPropertyDescriptors(e);t.__original&&delete t.__original;let n=Object.create(Object.getPrototypeOf(e),t);if(!Object.prototype.hasOwnProperty.call(n,`__original`))try{Object.defineProperty(n,"__original",{value:e,writable:!1,enumerable:!1,configurable:!1})}catch{}return n},O=b(()=>{let e=w,t=e?.language,n=e;e&&(T.current&&T.current.__original===e&&E.current===t?n=T.current:(n=D(e),T.current=n,E.current=t));let r=!C&&!s?(...e)=>(Cs(a,`USE_T_BEFORE_READY`,`useTranslation: t was called before ready. When using useSuspense: false, make sure to check the ready flag before using t.`),S(...e)):S,i=[r,n,C];return i.t=r,i.i18n=n,i.ready=C,i},[S,w,C,w.resolvedLanguage,w.language,w.languages]);if(a&&s&&!C)throw new Promise(e=>{let n=()=>e();t.lng?Es(a,t.lng,m,n):Ts(a,m,n)});return O},Js=/\p{Mn}/gu;function Ys(e){return e.normalize(`NFD`).replace(Js,``).toLowerCase().trim()}var Xs=[`device`,`page`,`integration`],Zs=0,Qs=1,$s=2,ec=3,tc=4,nc=5,rc=6,ic=7;function ac(e,t,n,r){return n.includes(r)?Zs:e===r?Qs:e.startsWith(r)?$s:e.split(/\s+/).some(e=>e.startsWith(r))?ec:e.includes(r)?tc:t.some(e=>e.includes(r))?nc:null}function oc(e,t){let n=0;for(let r=0;r<e.length&&n<t.length;r++)e[r]===t[n]&&n++;return n===t.length}function sc(e){return e<4?0:e<=7?1:e<=12?2:3}function cc(e,t,n){if(e===t)return 0;if(n<=0||Math.abs(e.length-t.length)>n)return null;let r=t.length,i=Array(r+1).fill(0),a=Array.from({length:r+1},(e,t)=>t),o=Array(r+1).fill(0);for(let s=1;s<=e.length;s++){o[0]=s;let c=s,l=e[s-1];for(let n=1;n<=r;n++){let r=t[n-1],u=l===r?0:1,d=Math.min((a[n]??1/0)+1,o[n-1]+1,(a[n-1]??1/0)+u);s>1&&n>1&&l===t[n-2]&&e[s-2]===r&&(d=Math.min(d,(i[n-2]??1/0)+1)),o[n]=d,d<c&&(c=d)}if(c>n)return null;let u=i;i=a,a=o,o=u}let s=a[r]??1/0;return s<=n?s:null}function lc(e,t){if(oc(e,t))return rc;let n=sc(t.length);if(n>0){for(let r of e.split(/\s+/))if(cc(r,t,n)!==null)return ic}return null}function uc(e,t,n=200){let r=Ys(t);if(r.length===0)return{groups:[],totalMatched:0,truncated:!1};let i=new Map;for(let t of e){let e=Ys(t.label),n=ac(e,(t.keywords??[]).map(Ys),(t.identifiers??[]).map(Ys),r)??lc(e,r);if(n===null)continue;let a=i.get(t.domain)??[];a.push({item:t,rank:n}),i.set(t.domain,a)}let a=0;for(let e of i.values())a+=e.length;let o=n,s=[];for(let e of Xs){let t=i.get(e);if(!t||t.length===0||o<=0)continue;t.sort((e,t)=>e.rank-t.rank||e.item.label.localeCompare(t.item.label));let n=t.slice(0,o).map(e=>e.item);o-=n.length,s.push({domain:e,items:n})}return{groups:s,totalMatched:a,truncated:a>n}}function dc(e){return e.flatMap(e=>e.items)}function fc(e){let t=new Map;for(let n of e)t.set(n.id,n.name);let n=new Map;for(let r of e){let e=r.parentDeviceId;e!==null&&e!==r.id&&n.set(r.id,t.get(e)??`#${String(e)}`)}return n}function pc(e,t){return e.filter(e=>!e.adminOnly||t)}function mc({t:e,isAdmin:t}){let n=pc([{label:e(`nav.devices`,`Devices`),icon:I,path:`/devices`},{label:e(`nav.integrations`),icon:_t,path:`/integrations`},{label:e(`nav.build`,`Build-your-self`),icon:De,path:`/build`,adminOnly:!0},{label:e(`nav.locations`,`Locations`),icon:ut,path:`/locations`,adminOnly:!0},{label:e(`nav.viewer`,`Viewer`),icon:Ye,path:`/live`}],t),r=pc([{label:e(`nav.pipeline`,`Pipeline`),icon:Bt,path:`/pipeline`},{label:e(`nav.detectionIntelligence`,`People`),icon:Gt,path:`/detection-intelligence`,adminOnly:!0},{label:e(`nav.vehicles`,`Vehicles`),icon:it,path:`/plates`,adminOnly:!0},{label:e(`nav.events`,`Library`),icon:fe,path:`/events`,adminOnly:!0},{label:e(`nav.scenes`,`Scenes`),icon:Wt,path:`/scenes`,adminOnly:!0},{label:e(`nav.recordings`,`Recordings`),icon:we,path:`/recordings`,adminOnly:!0}],t),i=pc([{label:e(`system.cluster`,`Cluster`),icon:Ge,path:`/system/cluster`,adminOnly:!0},{label:e(`system.addons`),icon:bt,path:`/system/addons`,adminOnly:!0},{label:e(`system.ai`,`AI`),icon:ot,path:`/system/ai`,adminOnly:!0},{label:e(`system.modelLicenses`,`Models and licenses`),icon:Ut,path:`/system/licenses`,adminOnly:!0}],t),a=pc([{label:e(`system.identity`,`Identity & Access`),icon:tt,path:`/system/identity`,adminOnly:!0},{label:e(`system.network`,`Network`),icon:Vt,path:`/system/network`,adminOnly:!0},{label:e(`system.integrations`,`Connectivity`),icon:_t,path:`/system/integrations`,adminOnly:!0},{label:e(`system.data`,`Data`),icon:Ie,path:`/system/data`,adminOnly:!0},{label:e(`system.notifications`,`Notifications`),icon:Ke,path:`/system/notifications`,adminOnly:!0},{label:e(`system.calendars`,`Calendars`),icon:ze,path:`/system/calendars`,adminOnly:!0},{label:e(`system.capabilities`,`Capabilities`),icon:he,path:`/system/capabilities`,adminOnly:!0},{label:e(`system.systemNav`,`System`),icon:Pe,path:`/system/settings`,adminOnly:!0},{label:e(`system.logs`,`Logs`),icon:xe,path:`/system/logs`,adminOnly:!0},{label:e(`system.terminal`,`Terminal`),icon:qt,path:`/system/terminal`,adminOnly:!0}],t);return[{key:`top`,label:null,items:n},{key:`detection`,label:e(`nav.detectionSection`,`Detection`),items:r},{key:`cluster`,label:e(`nav.clusterSection`,`Cluster & Server`),items:i},{key:`administration`,label:e(`system.title`,`Administration`),items:a}]}var hc={gauge:ct,puzzle:bt,bot:lt,cpu:ve,terminal:qt,box:Ue,wrench:We,activity:fe,plug:_t};function gc(e){return hc[e]??bt}var _c=` · `;function vc(e,t,n,r){let i=[`#${t}`];return r!==void 0&&i.push(r),e.stableId.length>0&&e.stableId!==n&&i.push(e.stableId),i.push(e.type),e.disabled&&i.push(`disabled`),i.join(_c)}function yc(e,t=null){let n=fc(e),r=ce(t);return e.map(e=>{let t=String(e.id),i=e.name||e.stableId||`#${t}`,a=n.get(e.id),o=r(e),s=o.kind===`resolved`?o.integration.name:``;return{key:`device:${t}`,domain:`device`,label:i,subtitle:vc(e,t,i,a),identifiers:[t,`#${t}`],keywords:[e.stableId,e.addonId,e.location??``,a??``,s].filter(e=>e.length>0),path:`/devices/${t}`,icon:Qe(e.type).icon}})}function bc(e){return e.map(e=>({key:`integration:${e.id}`,domain:`integration`,label:e.name||e.addonId,subtitle:e.enabled?e.addonId:`${e.addonId} · disabled`,keywords:[e.addonId,e.processState],path:`/integrations/${e.id}`}))}function xc(e,t,n){let r=e.section?.trim();return r?t[r]??e.sectionLabel?.trim()??r:n}function Sc(e,t,n){let r=e.flatMap(e=>e.items.map(t=>({key:`page:${t.path}`,domain:`page`,label:t.label,subtitle:e.label??void 0,path:t.path,icon:t.icon}))),i={detection:n.detection,cluster:n.cluster,administration:n.administration},a=t.map(e=>({key:`page:addon:${e.addonId}:${e.id}`,domain:`page`,label:e.label,subtitle:xc(e,i,n.ungrouped),keywords:[e.addonId],path:e.path,icon:gc(e.icon)}));return[...r,...a]}_();var Cc={device:{label:`Devices`,icon:I},page:{label:`Pages`,icon:Rt},integration:{label:`Integrations`,icon:_t}};function wc({groups:e,activeKey:t,query:n,totalMatched:r,truncated:i,onSelect:a,onHover:o}){let{t:s}=qs(),c=d(null);if(N(()=>{t&&(c.current?.querySelector(`[data-key="${CSS.escape(t)}"]`))?.scrollIntoView({block:`nearest`})},[t]),n.trim().length===0)return null;if(e.length===0)return v(`div`,{className:`px-3 py-4 text-center text-[12px] text-foreground-subtle`,children:[`No results for “`,n,`”`]});let l=e.reduce((e,t)=>e+t.items.length,0);return v(T,{children:[M(`div`,{ref:c,role:`listbox`,className:`max-h-[60vh] overflow-y-auto py-1`,children:e.map(e=>{let n=Cc[e.domain],r=n.icon;return v(`div`,{className:`px-1 py-1`,children:[v(`div`,{className:`sticky top-0 z-10 flex items-center gap-1.5 bg-surface px-2 py-1 text-[10px] font-semibold uppercase tracking-widest text-foreground-subtle/60`,children:[M(r,{className:`h-3 w-3`}),n.label]}),e.items.map(e=>{let r=e.icon??n.icon,i=e.key===t;return v(`button`,{type:`button`,role:`option`,"aria-selected":i,"data-key":e.key,onMouseEnter:()=>o(e),onClick:()=>a(e),className:`flex w-full items-center gap-2.5 rounded-md px-2 py-1.5 text-left text-[12px] transition-colors ${i?`bg-primary/12 text-primary`:`text-foreground hover:bg-surface-hover`}`,children:[M(r,{className:`h-3.5 w-3.5 shrink-0 ${i?`text-primary`:`text-foreground-subtle`}`}),v(`span`,{className:`flex-1 min-w-0`,children:[M(`span`,{className:`block truncate font-medium`,children:e.label}),e.subtitle&&M(`span`,{className:`block truncate text-[10px] text-foreground-subtle`,children:e.subtitle})]})]},e.key)})]},e.domain)})}),i&&M(`div`,{className:`border-t border-border px-3 py-1.5 text-center text-[10px] text-foreground-subtle`,children:s(`search.truncatedResults`,`Showing first {{shown}} of {{total}} — refine your search.`,{shown:l,total:r})})]})}_();function Tc({navSections:e,addonPages:t,compact:n,onNavigated:r}){let{t:i}=qs(),a=mr(),o=d(null),s=d(null),c=d(null),[u,f]=A(null),[p,m]=A(``),[h,g]=A(0),[_,y]=A(!1),{data:x}=Oe({projection:`slim`}),{data:S}=Te(void 0),C=b(()=>{let n={detection:i(`nav.detectionSection`,`Detection`),cluster:i(`nav.clusterSection`,`Cluster & Server`),administration:i(`system.title`,`Administration`),ungrouped:i(`nav.addonPages`,`Addon Pages`)};return[...yc(x??[],S??null),...Sc(e,t,n),...bc(S??[])]},[x,S,e,t,i]),{groups:w,totalMatched:T,truncated:E}=b(()=>uc(C,p),[C,p]),D=b(()=>dc(w),[w]);N(()=>{g(0)},[p,C]),N(()=>{_&&o.current?.focus()},[_]);let O=l(()=>{y(!1),m(``),g(0)},[]),k=l(e=>{a(e.path),O(),o.current?.blur(),r?.()},[a,O,r]);N(()=>{function e(e){(e.metaKey||e.ctrlKey)&&e.key.toLowerCase()===`k`&&(e.preventDefault(),y(!0))}return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[]),N(()=>{if(!_)return;function e(e){if(!(e.target instanceof Node))return;let t=s.current?.contains(e.target)===!0,n=c.current?.contains(e.target)===!0;!t&&!n&&y(!1)}return document.addEventListener(`mousedown`,e),()=>document.removeEventListener(`mousedown`,e)},[_]);let j=_&&p.trim().length>0;N(()=>{if(!j){f(null);return}let e=()=>{let e=o.current?.getBoundingClientRect();e&&f({left:e.left,top:e.bottom+4,width:e.width})};return e(),window.addEventListener(`resize`,e),window.addEventListener(`scroll`,e,!0),()=>{window.removeEventListener(`resize`,e),window.removeEventListener(`scroll`,e,!0)}},[j]);let P=D[h]?.key??null,F=i(`search.placeholder`,`Search devices, pages, integrations…`),ee=v(`div`,{className:`relative`,children:[M(_e,{className:`pointer-events-none absolute left-2 top-1/2 h-3.5 w-3.5 -translate-y-1/2 text-foreground-subtle`}),M(`input`,{ref:o,type:`text`,value:p,placeholder:F,"aria-label":F,role:`combobox`,"aria-expanded":_&&p.trim().length>0,"aria-controls":`global-search-results`,onChange:e=>{m(e.target.value),y(!0)},onFocus:()=>y(!0),onKeyDown:e=>{if(e.key===`ArrowDown`)e.preventDefault(),D.length>0&&g(e=>(e+1)%D.length);else if(e.key===`ArrowUp`)e.preventDefault(),D.length>0&&g(e=>(e-1+D.length)%D.length);else if(e.key===`Enter`){e.preventDefault();let t=D[h];t&&k(t)}else e.key===`Escape`&&(e.preventDefault(),O(),o.current?.blur())},className:`w-full rounded-md border border-border bg-surface py-1.5 pl-7 pr-6 text-[12px] text-foreground placeholder:text-foreground-subtle/70 focus:outline-none focus:ring-1 focus:ring-primary/50`}),p.length>0&&M(`button`,{type:`button`,"aria-label":`Clear search`,onClick:()=>{m(``),o.current?.focus()},className:`absolute right-1.5 top-1/2 -translate-y-1/2 text-foreground-subtle hover:text-foreground`,children:M(vt,{className:`h-3 w-3`})}),j&&u!==null&&Mt(M(`div`,{ref:c,id:`global-search-results`,className:`fixed z-50 w-max max-w-[26rem] rounded-lg border border-border bg-surface shadow-xl`,style:{left:u.left,top:u.top,minWidth:u.width},children:M(wc,{groups:w,activeKey:P,query:p,totalMatched:T,truncated:E,onSelect:k,onHover:e=>{let t=D.findIndex(t=>t.key===e.key);t>=0&&g(t)}})}),document.body)]});return n?M(`div`,{ref:s,className:`px-1.5 pb-1.5`,children:_?M(`div`,{className:`fixed z-50 w-max min-w-72 max-w-[26rem]`,style:{left:`calc(env(safe-area-inset-left) + 3.5rem)`,top:`calc(env(safe-area-inset-top) + 3.5rem)`},children:ee}):M(`button`,{type:`button`,onClick:()=>y(!0),"aria-label":F,title:F,className:`flex w-full items-center justify-center rounded-md px-0 py-2 text-foreground-subtle hover:bg-surface-hover hover:text-foreground transition-colors`,children:M(_e,{className:`h-3.5 w-3.5 shrink-0`})})}):M(`div`,{ref:s,className:`px-2 pb-2`,children:ee})}var Ec=/^(\d{1,3}\.){3}\d{1,3}$/;function Dc(e){let t=e.startsWith(`[`)&&e.endsWith(`]`)?e.slice(1,-1):e;return!!(Ec.test(t)||t.includes(`:`))}function Oc(e,t){return!t||Dc(e)?!1:e===t||e.endsWith(`.${t}`)}_();var kc=`auth-webauthn/passkey-enrollment`,Ac=`camstack_passkey_prompt_dismissed:`,jc=720*60*60*1e3;function Mc(e){try{let t=localStorage.getItem(`${Ac}${e}`);if(!t)return!1;let n=Number(t);return Number.isFinite(n)?Date.now()-n<jc:!1}catch{return!1}}function Nc(e){try{localStorage.setItem(`${Ac}${e}`,String(Date.now()))}catch{}}function Pc(){let{user:e}=ho(),{t}=qs(),n=te(),r=Ne(kc),[i,a]=A(!1),[o,s]=A(!1),c=b(()=>e?Mc(e.id):!0,[e]),u=Be.auth.listLoginMethods.useQuery().data?.find(e=>e.kind===`passkey`),d=u!==void 0&&Oc(window.location.hostname,u.rpId),f=e!==null&&d&&r!=null&&!c,p=w({queryKey:[`auth`,`listOwnPasskeys`],queryFn:()=>n.listOwnPasskeys(),enabled:f,staleTime:6e4}),m=l(()=>{e&&Nc(e.id),a(!0),s(!1)},[e]),h=l(()=>{s(!1),p.refetch()},[p]);return!f||i||p.data===void 0||p.data.length>0?null:v(`div`,{className:`shrink-0 border-b border-primary/20 bg-primary/5`,children:[v(`div`,{className:`flex items-center gap-2.5 px-3 py-2 text-xs text-foreground`,children:[M(zt,{className:`h-4 w-4 text-primary shrink-0`}),M(`span`,{className:`flex-1 min-w-0`,children:t(`passkeyPrompt.message`,`Save a passkey for faster sign-in?`)}),M(`button`,{onClick:()=>s(e=>!e),className:`rounded bg-primary px-2.5 py-1 text-[11px] font-semibold text-primary-foreground hover:bg-primary/90`,children:t(`passkeyPrompt.enrollNow`,`Enroll now`)}),M(`button`,{onClick:m,className:`inline-flex items-center gap-1 rounded border border-border px-2 py-1 text-[11px] text-foreground-subtle hover:text-foreground hover:bg-surface-hover`,children:t(`passkeyPrompt.notNow`,`Not now`)}),M(`button`,{onClick:m,"aria-label":t(`passkeyPrompt.notNow`,`Not now`),className:`p-1 rounded text-foreground-subtle hover:text-foreground`,children:M(vt,{className:`h-3.5 w-3.5`})})]}),o&&M(`div`,{className:`px-3 pb-3`,children:v(`div`,{className:`max-w-xl`,children:[M(Je,{widgetId:kc,host:`dashboard`}),M(`div`,{className:`mt-2 flex justify-end`,children:M(`button`,{onClick:h,className:`rounded border border-border px-2.5 py-1 text-[11px] text-foreground-subtle hover:text-foreground hover:bg-surface-hover`,children:t(`common.close`,`Close`)})})]})})]})}_(),jt();var Fc={info:z,success:Ae,warning:je,error:Xe},Ic={info:`text-blue-400`,success:`text-green-400`,warning:`text-amber-400`,error:`text-red-400`},Lc={active:`border-l-blue-400`,"in-progress":`border-l-amber-400`,completed:`border-l-green-400`,failed:`border-l-red-400`,dismissed:`border-l-foreground-subtle/30`};function Rc(e){let t=Math.floor((Date.now()-e)/1e3);if(t<60)return`just now`;let n=Math.floor(t/60);if(n<60)return`${String(n)}m ago`;let r=Math.floor(n/60);if(r<24)return`${String(r)}h ago`;let i=Math.floor(r/24);return`${String(i)}d ago`}function zc({alert:e,onMarkRead:t,onDismiss:n}){let r=e.severity in Fc?e.severity:`info`,i=e.status in Lc?e.status:`active`,a=Fc[r],o=Ic[r],s=Lc[i];return v(`div`,{className:`flex items-start gap-2.5 px-3 py-2.5 border-l-2 ${s} ${e.read?`opacity-60`:``} hover:bg-surface-hover transition-colors`,children:[M(a,{className:`h-3.5 w-3.5 shrink-0 mt-0.5 ${o}`}),v(`div`,{className:`flex-1 min-w-0`,children:[v(`div`,{className:`flex items-center gap-1.5`,children:[M(`span`,{className:`text-[11px] font-semibold ${e.read?`text-foreground-subtle`:`text-foreground`}`,children:e.title}),!e.read&&M(`span`,{className:`h-1.5 w-1.5 rounded-full bg-primary shrink-0`})]}),M(`div`,{className:`text-[10px] text-foreground-subtle mt-0.5 line-clamp-2`,children:e.message}),e.status===`in-progress`&&e.progress!==void 0&&v(`div`,{className:`mt-1.5 flex items-center gap-2`,children:[M(`div`,{className:`flex-1 h-1 bg-surface-hover rounded-full overflow-hidden`,children:M(`div`,{className:`h-full bg-primary rounded-full transition-all duration-300`,style:{width:`${String(Math.min(100,Math.max(0,e.progress)))}%`}})}),v(`span`,{className:`text-[9px] text-foreground-subtle font-mono shrink-0`,children:[String(Math.round(e.progress)),`%`]})]}),M(`div`,{className:`text-[9px] text-foreground-subtle/60 mt-1`,children:Rc(e.updatedAt)})]}),v(`div`,{className:`flex items-center gap-0.5 shrink-0`,children:[!e.read&&M(`button`,{type:`button`,onClick:n=>{n.stopPropagation(),t(e.id)},className:`p-1 rounded hover:bg-surface-hover transition-colors`,title:`Mark as read`,children:M(gt,{className:`h-3 w-3 text-foreground-subtle`})}),e.status!==`in-progress`&&M(`button`,{type:`button`,onClick:t=>{t.stopPropagation(),n(e.id)},className:`p-1 rounded hover:bg-surface-hover transition-colors`,title:`Dismiss`,children:M(vt,{className:`h-3 w-3 text-foreground-subtle`})})]})]})}function Bc({variant:e=`icon`,compact:t=!1}={}){let[n,r]=A(!1),[i,a]=A(!1),o=d(null),s=d(null),c=k(),{data:u=0}=Ot(void 0,{refetchInterval:3e4}),{data:f=[],isLoading:p}=He({limit:50},{enabled:n}),m=i?f:f.filter(e=>!e.read),h=f.filter(e=>e.read).length,g=()=>{c.invalidateQueries({queryKey:[[`alerts`]]})},_=Me({onSuccess:g}),y=Dt({onSuccess:g}),b=St({onSuccess:g});at(`alert.created`,()=>{c.invalidateQueries({queryKey:[[`alerts`]]})}),at(`alert.updated`,()=>{c.invalidateQueries({queryKey:[[`alerts`]]})}),N(()=>{if(!n)return;let e=e=>{let t=e.target;o.current&&!o.current.contains(t)&&s.current&&!s.current.contains(t)&&r(!1)};return document.addEventListener(`mousedown`,e),document.addEventListener(`touchstart`,e),()=>{document.removeEventListener(`mousedown`,e),document.removeEventListener(`touchstart`,e)}},[n]);let x=l(e=>{_.mutate({alertId:e})},[_]),S=l(e=>{e&&b.mutate({alertId:e})},[b]),C=l(()=>{y.mutate(void 0),r(!1)},[y]),w=m.filter(e=>e.status===`in-progress`),T=m.filter(e=>e.status!==`in-progress`),[E,D]=A({}),O=l(()=>{let e=s.current;if(!e)return;let t=e.getBoundingClientRect(),n=window.innerWidth,r=window.innerHeight,i=Math.min(320,n-16),a=t.left;a+i>n-8&&(a=n-8-i),a<8&&(a=8);let o=r-t.bottom,c=t.top,l={position:`fixed`,left:a,width:i,zIndex:9999};o>=c?(l.top=t.bottom+4,l.maxHeight=Math.max(160,o-8-4)):(l.bottom=r-t.top+4,l.maxHeight=Math.max(160,c-8-4)),D(l)},[]);return N(()=>{if(!n)return;O();let e=()=>O();return window.addEventListener(`resize`,e),window.addEventListener(`scroll`,e,!0),()=>{window.removeEventListener(`resize`,e),window.removeEventListener(`scroll`,e,!0)}},[n,O]),v(`div`,{children:[e===`sidebar`?v(`button`,{ref:s,type:`button`,onClick:()=>r(!n),className:`flex w-full items-center gap-2.5 rounded-md ${t?`justify-center px-0 py-2`:`px-2.5 py-1.5`} text-[12px] text-foreground-subtle hover:bg-surface-hover hover:text-foreground transition-colors`,title:t?`Alerts${u>0?` (${u})`:``}`:void 0,children:[v(`span`,{className:`relative inline-flex shrink-0`,children:[M(xe,{className:`h-3.5 w-3.5`}),t&&u>0&&M(`span`,{className:`absolute -top-1 -right-1 h-2 w-2 rounded-full bg-primary`})]}),!t&&M(`span`,{className:`flex-1 text-left`,children:`Alerts`}),!t&&u>0&&M(`span`,{className:`flex items-center justify-center h-4 min-w-4 px-1 rounded-full bg-primary text-primary-foreground text-[9px] font-bold leading-none`,children:u>99?`99+`:String(u)})]}):v(`button`,{ref:s,type:`button`,onClick:()=>r(!n),className:`relative p-1.5 rounded-md hover:bg-surface-hover text-foreground-subtle hover:text-foreground transition-colors`,"aria-label":`Alerts`,children:[M(xe,{className:`h-4.5 w-4.5`}),u>0&&M(`span`,{className:`absolute -top-0.5 -right-0.5 flex items-center justify-center h-4 min-w-4 px-0.5 rounded-full bg-primary text-primary-foreground text-[9px] font-bold leading-none`,children:u>99?`99+`:String(u)})]}),n&&Mt(v(`div`,{ref:o,style:E,className:`bg-surface border border-border rounded-lg shadow-xl flex flex-col overflow-hidden`,children:[v(`div`,{className:`flex items-center justify-between px-3 py-2 border-b border-border shrink-0`,children:[M(`span`,{className:`text-[12px] font-semibold text-foreground`,children:`Alerts`}),v(`div`,{className:`flex items-center gap-2`,children:[h>0&&v(`label`,{className:`flex items-center gap-1 text-[10px] text-foreground-subtle cursor-pointer select-none`,children:[M(`input`,{type:`checkbox`,checked:i,onChange:e=>a(e.target.checked),className:`h-3 w-3 rounded border-border accent-primary cursor-pointer`}),`Show read`]}),u>0&&v(`button`,{type:`button`,onClick:C,className:`flex items-center gap-1 text-[10px] text-primary hover:text-primary/80 transition-colors`,children:[M(Lt,{className:`h-3 w-3`}),`Mark all read`]})]})]}),v(`div`,{className:`flex-1 overflow-y-auto`,children:[p&&M(`div`,{className:`flex items-center justify-center py-8`,children:M(wt,{className:`h-4 w-4 animate-spin text-foreground-subtle`})}),!p&&m.length===0&&v(`div`,{className:`flex flex-col items-center justify-center py-8 text-foreground-subtle`,children:[M(xe,{className:`h-6 w-6 mb-2 opacity-40`}),M(`span`,{className:`text-[11px]`,children:f.length>0?`No unread alerts`:`No alerts`}),f.length>0&&!i&&v(`button`,{type:`button`,onClick:()=>a(!0),className:`text-[10px] text-primary mt-1 hover:underline`,children:[`Show `,h,` read alert`,h===1?``:`s`]})]}),w.length>0&&v(`div`,{className:`border-b border-border`,children:[M(`div`,{className:`px-3 py-1.5 bg-surface-hover/50`,children:M(`span`,{className:`text-[9px] font-semibold uppercase tracking-widest text-foreground-subtle/60`,children:`In Progress`})}),w.map(e=>M(zc,{alert:e,onMarkRead:x,onDismiss:S},e.id))]}),T.map(e=>M(zc,{alert:e,onMarkRead:x,onDismiss:S},e.id))]})]}),document.body)]})}_();function Vc(){let e=Pa();return u(e.subscribe,e.getSnapshot,e.getSnapshot)}var Hc=[`detection`,`cluster`,`administration`];function Uc(e){return Hc.includes(e)}function Wc(e){let t=new Map,n=new Map,r=[];for(let i of e){let e=i.section?.trim();if(e===void 0||e.length===0){r.push(i);continue}if(Uc(e)){let n=t.get(e)??[];n.push(i),t.set(e,n);continue}let a=n.get(e);a?a.pages.push(i):n.set(e,{label:i.sectionLabel?.trim()||e,pages:[i]})}return{known:t,custom:[...n.entries()].map(([e,t])=>({id:e,label:t.label,pages:t.pages})),ungrouped:r}}var Gc=`camstack:last-path`,Kc=512,qc=[`/login`,`/change-password`,`/access-denied`,`/logout`];function Jc(e){return!e.startsWith(`/`)||e.startsWith(`//`)||e.length>Kc?!1:!qc.some(t=>e===t||e.startsWith(t+`/`))}function Yc(e){if(!(typeof window>`u`)&&Jc(e))try{window.localStorage.setItem(Gc,e)}catch{}}function Xc(){if(typeof window>`u`)return null;try{let e=window.localStorage.getItem(Gc);return e===null?null:Jc(e)?e:null}catch{return null}}_();var Zc=s(!0);function Qc(e){return e===`/addon`||e.startsWith(`/addon/`)}function $c(e,t,n){let r=[...e.filter(e=>e!==t),t];return r.length<=n?r:r.slice(r.length-n)}function el({maxCached:e=6}){let t=_r(),n=q(),r=dr(),i=f(K),a=n.pathname,o=Qc(a),s=d(new Map),c=d([]);if(o){s.current.set(a,{key:a,outlet:t,location:n,navigationType:r,routeContext:i});let o=$c(c.current,a,e),l=new Set(o);for(let e of s.current.keys())l.has(e)||s.current.delete(e);c.current=o}return v(T,{children:[c.current.map(e=>{let t=s.current.get(e);if(t?.outlet==null)return null;let n=o&&e===a;return M(`div`,{className:n?`h-full min-h-0`:void 0,style:n?void 0:{display:`none`},hidden:!n,"aria-hidden":!n,children:M(Zc.Provider,{value:n,children:M(nr.Provider,{value:{location:t.location,navigationType:t.navigationType},children:M(K.Provider,{value:t.routeContext,children:t.outlet})})})},e)}),!o&&t!=null?M(`div`,{className:`h-full min-h-0`,children:t},a):null]})}_();var tl={dark:xt,light:Ee,system:Ye};function nl(){return M(`div`,{className:`flex h-full min-h-[50vh] items-center justify-center`,children:M(`span`,{className:`h-4 w-4 animate-spin rounded-full border-2 border-primary/30 border-t-primary`})})}function rl(){let e=q(),t=mr(),{user:n,logout:r}=ho(),i=et(),{t:a}=qs(),o=ue(),s=At(),c=wa(Vc()),[l,u]=A(!1);N(()=>{Yc(e.pathname+e.search)},[e.pathname,e.search]);let[f,p]=A(()=>typeof window>`u`?!1:window.localStorage.getItem(`camstack:sidebar-collapsed`)===`1`);N(()=>{typeof window>`u`||window.localStorage.setItem(`camstack:sidebar-collapsed`,f?`1`:`0`)},[f]);let[m]=A(()=>{if(typeof window>`u`)return new Set;try{let e=window.localStorage.getItem(`camstack:sidebar-collapsed-groups`);if(!e)return new Set;let t=JSON.parse(e);return Array.isArray(t)?new Set(t.filter(e=>typeof e==`string`)):new Set}catch{return new Set}});N(()=>{typeof window>`u`||window.localStorage.setItem(`camstack:sidebar-collapsed-groups`,JSON.stringify([...m]))},[m]),N(()=>{s&&window.localStorage.getItem(`camstack:sidebar-collapsed`)===null&&p(!0)},[s]);let{data:h=[]}=pt({nodeId:`hub`},{refetchInterval:3e4}),g=h.length,_=k(),y=d(Date.now()),{data:S}=Fe(void 0,{staleTime:0,refetchOnMount:`always`,refetchInterval:e=>{let t=e.state.data;return t&&t.length>0||Date.now()-y.current>=3e4?!1:2e3}}),C=b(()=>S&&n?.isAdmin?xo(S):[],[S,n?.isAdmin]),w=b(()=>Wc(C),[C]),E=w.known.get(`detection`)??[],D=w.known.get(`cluster`)??[],O=w.known.get(`administration`)??[];at(`addon.page-ready`,()=>{_.invalidateQueries({queryKey:[[`addonPages`,`listPages`]]})});let j=()=>{r(),t(`/login`)},P=t=>!!(e.pathname===t||e.pathname.startsWith(t+`/`)),ee=[`/pipeline`,`/live`].some(t=>e.pathname===t||e.pathname.startsWith(t+`/`)),te=n?.isAdmin===!0,re=b(()=>mc({t:a,isAdmin:te}),[a,te]),ie=re[0]?.items??[],ae=re[1]?.items??[],oe=re[2]?.items??[],se=re[3]?.items??[],I=i?.mode??`system`,L={dark:a(`theme.dark`),light:a(`theme.light`),system:a(`theme.system`)},R=f&&!o,ce=(e,t=`md`)=>`flex w-full items-center gap-2.5 rounded-md ${R?`justify-center px-0 py-2`:`px-2.5 py-1.5`} ${t===`lg`?`text-[13px] font-medium`:`text-[12px]`} transition-all ${e?t===`lg`?`bg-primary/12 text-primary shadow-sm shadow-primary/5`:`bg-primary/12 text-primary`:`text-foreground-subtle hover:bg-surface-hover hover:text-foreground`}`,de=(e,t)=>e===0?null:R?M(`div`,{className:`pt-3 mb-1 mx-2 border-t border-border/60`},`sep-${t}`):M(`div`,{className:`pt-4 pb-1.5 px-2.5`,children:M(`span`,{className:`text-[10px] font-semibold uppercase tracking-widest text-foreground-subtle/60`,children:t})},`hdr-${t}`),z=e=>{let n=P(e.path),r=gc(e.icon);return v(`button`,{onClick:()=>{t(e.path),u(!1)},className:ce(n),title:R?e.label:void 0,children:[M(r,{className:`h-3.5 w-3.5 shrink-0 ${n?`text-primary`:``}`}),!R&&e.label]},`${e.addonId}::${e.id}`)},B=e=>{let n=e.icon,r=P(e.path),i=e.path===`/system/addons`;return v(`button`,{"data-testid":`nav-${e.path.replace(/^\//,``).replace(/\//g,`-`)}`,onClick:()=>{t(e.path),u(!1)},className:ce(r),title:R?e.label:void 0,children:[M(n,{className:`h-3.5 w-3.5 shrink-0 ${r?`text-primary`:``}`}),!R&&v(T,{children:[M(`span`,{className:`flex-1 text-left`,children:e.label}),i&&g>0&&M(`span`,{className:`ml-auto rounded-full bg-primary px-1.5 py-0.5 text-[9px] font-bold text-primary-foreground leading-none`,children:g})]}),R&&i&&g>0&&M(`span`,{className:`absolute mt-[-14px] ml-3 h-2 w-2 rounded-full bg-primary`})]},e.path)},pe=v(T,{children:[v(`div`,{className:`flex h-14 items-center border-b border-border ${R?`justify-center px-1`:`pl-3 pr-4 gap-2`}`,children:[!R&&M(`img`,{src:i?.resolvedMode===`light`?F(`/brand/logo-horizontal-light.svg`):F(`/brand/logo-horizontal-dark.svg`),alt:`CamStack Admin`,className:`h-9 flex-1 min-w-0`}),!o&&M(`button`,{onClick:()=>p(e=>!e),className:`p-1.5 rounded-md hover:bg-surface-hover text-foreground-subtle transition-colors flex-shrink-0 ${R?``:`mr-2`}`,"aria-label":f?`Expand sidebar`:`Collapse sidebar`,title:f?`Expand sidebar`:`Collapse sidebar`,children:M(f?ne:ft,{className:`h-4 w-4`})})]}),M(`div`,{className:`border-b border-border pt-2`,children:M(Tc,{navSections:re,addonPages:C,compact:R,onNavigated:()=>u(!1)})}),v(`nav`,{className:`flex-1 overflow-y-auto py-3 ${R?`px-1.5`:`px-2`} space-y-0.5`,children:[ie.map(e=>B(e)),de(ae.length+E.length,a(`nav.detectionSection`,`Detection`)),ae.map(e=>B(e)),E.map(e=>z(e)),de(oe.length+D.length,a(`nav.clusterSection`,`Cluster & Server`)),oe.map(e=>B(e)),D.map(e=>z(e)),de(se.length+O.length,a(`system.title`,`Administration`)),se.map(e=>B(e)),O.map(e=>z(e)),w.custom.map(e=>v(`div`,{className:`contents`,children:[de(e.pages.length,e.label),e.pages.map(e=>z(e))]},`custom-${e.id}`)),de(w.ungrouped.length,a(`nav.addonPages`,`Addon Pages`)),w.ungrouped.map(e=>z(e))]}),v(`div`,{className:`border-t border-border ${R?`p-1.5`:`p-2`} space-y-0.5`,children:[v(`button`,{onClick:()=>i?.toggleMode(),className:ce(!1),title:R?L[I]:void 0,children:[(()=>{let e=tl[I];return M(e,{className:`h-3.5 w-3.5 shrink-0`})})(),!R&&M(`span`,{children:L[I]})]}),M(Bc,{variant:`sidebar`,compact:R}),v(`button`,{type:`button`,onClick:()=>t(`/system/my-access`),className:ce(P(`/system/my-access`)),title:R?a(`system.myAccess`,`My access`):void 0,children:[M(le,{className:`h-3.5 w-3.5 shrink-0`}),!R&&M(`span`,{className:`truncate`,children:a(`system.myAccess`,`My access`)})]}),v(`button`,{onClick:j,className:ce(!1).replace(`hover:text-foreground`,`hover:text-danger`),title:R?n?.username??`Logout`:void 0,children:[M(Ht,{className:`h-3.5 w-3.5 shrink-0`}),!R&&M(`span`,{className:`truncate`,children:n?.username??`User`})]}),M(`div`,{className:`pt-1 text-[10px] text-foreground-disabled select-none ${R?`text-center`:`px-2`}`,title:`admin-ui v1.2.316`,children:R?`1.2.316`:`v1.2.316`})]})]});return v(`div`,{className:`flex h-dvh overflow-hidden bg-background text-foreground pt-[env(safe-area-inset-top)] pb-[env(safe-area-inset-bottom)]`,children:[!o&&M(`aside`,{className:`flex flex-col border-r border-border bg-surface/80 backdrop-blur-sm shrink-0 transition-[width] duration-150 ease-out ${R?`w-12`:`w-48`}`,children:pe}),o&&M(st,{open:l,onClose:()=>u(!1),width:`w-64`,children:pe}),v(`div`,{className:`flex flex-1 flex-col min-w-0`,children:[c!==null&&v(`div`,{className:`flex items-center justify-center gap-2 px-3 py-2 text-[12px] font-medium shrink-0 ${c.severity===`danger`?`bg-danger/90 text-white`:`bg-warning/15 text-warning border-b border-warning/30`}`,children:[c.severity===`danger`?M(qe,{className:`h-3.5 w-3.5`}):M(fe,{className:`h-3.5 w-3.5`}),M(`span`,{children:a(c.i18nKey,{defaultValue:c.message,...c.i18nParams})}),c.action===`sign-in`&&M(`button`,{onClick:()=>r(),className:`ml-2 rounded border border-white/40 px-2 py-0.5 text-[11px] font-semibold hover:bg-white/10`,children:a(`connection.signIn`,`Sign in`)}),c.showSpinner&&M(wt,{className:`h-3.5 w-3.5 animate-spin`})]}),M(Pc,{}),o&&v(`header`,{className:`flex items-center h-12 border-b border-border px-3 shrink-0 bg-surface/80 backdrop-blur-sm`,children:[M(`button`,{onClick:()=>u(!0),className:`p-1.5 -ml-1.5 rounded-md hover:bg-surface-hover text-foreground-muted transition-colors`,"aria-label":`Open menu`,children:M(ht,{className:`h-5 w-5`})}),M(`div`,{className:`flex-1 flex justify-center`,children:M(`img`,{src:i?.resolvedMode===`light`?F(`/brand/logo-horizontal-light.svg`):F(`/brand/logo-horizontal-dark.svg`),alt:`CamStack`,className:`h-7`})}),M(Bc,{})]}),M(`main`,{className:`relative flex-1 min-h-0 overscroll-contain bg-background ${ee?`overflow-hidden`:`overflow-auto`}`,children:M(x,{fallback:M(nl,{}),children:M(el,{})})})]})]})}function $({children:e,requireAdmin:t}){let{user:n,loading:r,mustChangePassword:i}=ho(),a=q();return r?M(`div`,{className:`flex h-screen items-center justify-center bg-background text-foreground-subtle`,children:`Loading...`}):n?i&&a.pathname!==`/change-password`?M(J,{to:`/change-password`,replace:!0}):t&&!n.isAdmin?M(J,{to:`/access-denied`,replace:!0}):M(T,{children:e}):M(J,{to:`/login`,replace:!0,state:{from:a.pathname+a.search}})}var il=`customize`,al=`main`,ol=`advanced`,sl=`/build/compositions/new`,cl=`/build/compositions/:blockId`;function ll(e){return`/devices/${e}?tab=${il}`}function ul(e){return`${ll(e)}&sub=${ol}`}function dl(e){return`/build/compositions/${encodeURIComponent(e)}`}function fl(){let e=mr();return v(`div`,{className:`flex flex-col items-center justify-center text-foreground py-16 px-4`,children:[M(`div`,{className:`flex h-16 w-16 items-center justify-center rounded-2xl bg-danger/10 mb-4`,children:M(Kt,{className:`h-8 w-8 text-danger`})}),M(`h1`,{className:`text-xl font-bold`,children:`Access Denied`}),M(`p`,{className:`mt-2 text-sm text-foreground-subtle`,children:`You don't have permission to access this page.`}),M(`button`,{onClick:()=>e(`/devices`),className:`mt-6 rounded-lg bg-primary px-5 py-2.5 text-sm font-medium text-primary-foreground shadow-md shadow-primary/20 hover:shadow-lg transition-all`,children:`Go to Devices`})]})}_();var pl=8;function ml(){let{user:e,mustChangePassword:t,clearMustChangePassword:n,logout:r}=ho(),i=et(),a=mr(),[o,s]=A(``),[c,l]=A(``),[u,d]=A(!1),[f,p]=A(``),m=be({onSuccess:()=>{n(),a(`/devices`,{replace:!0})},onError:e=>{p(e instanceof Error?e.message:`Could not change password`)}});return M(`div`,{className:`flex min-h-screen items-center justify-center bg-background p-4`,children:v(`div`,{className:`w-full max-w-sm`,children:[M(`div`,{className:`flex justify-center mb-8`,children:M(`img`,{src:i?.resolvedMode===`light`?F(`/brand/logo-horizontal-light.svg`):F(`/brand/logo-horizontal-dark.svg`),alt:`CamStack Admin`,className:`h-12`})}),v(`form`,{onSubmit:async t=>{if(t.preventDefault(),p(``),!e){p(`Not signed in`);return}if(o.length<pl){p(`Password must be at least ${pl} characters`);return}if(o!==c){p(`The two passwords do not match`);return}if(o===`changeme`){p(`Choose a password different from the seed default`);return}m.mutate({id:e.id,newPassword:o})},className:`space-y-4 rounded-xl border border-border bg-surface p-6 shadow-xl shadow-black/10`,children:[v(`div`,{className:`space-y-1`,children:[M(`h1`,{className:`text-sm font-semibold text-foreground`,children:`Set a new password`}),M(`p`,{className:`text-xs text-foreground-subtle`,children:t?`You must rotate the seed password before continuing.`:`Choose a new password for your account.`})]}),f&&M(`div`,{className:`rounded-md bg-danger/10 border border-danger/20 px-3 py-2 text-xs text-danger`,children:f}),v(`div`,{className:`space-y-1.5`,children:[M(`label`,{className:`text-xs font-medium text-foreground-subtle`,children:`New password`}),v(`div`,{className:`relative`,children:[M(`input`,{"data-testid":`change-password-new`,type:u?`text`:`password`,value:o,onChange:e=>s(e.target.value),className:`w-full rounded-lg border border-border bg-background px-3 py-2.5 pr-10 text-sm text-foreground placeholder:text-foreground-disabled focus:border-primary focus:ring-1 focus:ring-primary/30 outline-none transition-all`,autoFocus:!0}),M(`button`,{type:`button`,onClick:()=>d(!u),className:`absolute right-2.5 top-1/2 -translate-y-1/2 text-foreground-subtle hover:text-foreground transition-colors`,tabIndex:-1,children:M(u?ie:ge,{className:`h-4 w-4`})})]})]}),v(`div`,{className:`space-y-1.5`,children:[M(`label`,{className:`text-xs font-medium text-foreground-subtle`,children:`Confirm new password`}),M(`input`,{"data-testid":`change-password-confirm`,type:u?`text`:`password`,value:c,onChange:e=>l(e.target.value),className:`w-full rounded-lg border border-border bg-background px-3 py-2.5 text-sm text-foreground placeholder:text-foreground-disabled focus:border-primary focus:ring-1 focus:ring-primary/30 outline-none transition-all`})]}),M(`button`,{"data-testid":`change-password-submit`,type:`submit`,disabled:m.isPending||!o||!c,className:`w-full rounded-lg bg-primary px-4 py-2.5 text-sm font-semibold text-primary-foreground shadow-md shadow-primary/20 hover:shadow-lg hover:shadow-primary/30 disabled:opacity-50 disabled:shadow-none transition-all`,children:m.isPending?`Saving…`:`Save and continue`}),t&&M(`button`,{type:`button`,onClick:()=>{r(),a(`/login`,{replace:!0})},className:`w-full text-xs text-foreground-subtle hover:text-foreground transition-colors`,children:`Sign out instead`})]})]})})}function hl(e){let t=new Uint8Array(e),n=``;for(let e of t)n+=String.fromCharCode(e);return btoa(n).replace(/\+/g,`-`).replace(/\//g,`_`).replace(/=/g,``)}function gl(e){let t=e.replace(/-/g,`+`).replace(/_/g,`/`),n=(4-t.length%4)%4,r=t.padEnd(t.length+n,`=`),i=atob(r),a=new ArrayBuffer(i.length),o=new Uint8Array(a);for(let e=0;e<i.length;e++)o[e]=i.charCodeAt(e);return a}function _l(){return window?.PublicKeyCredential!==void 0&&typeof window.PublicKeyCredential==`function`}function vl(e){let{id:t}=e;return{...e,id:gl(t),transports:e.transports}}function yl(e){return e===`localhost`||/^([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}$/i.test(e)}var bl=class extends Error{constructor({message:e,code:t,cause:n,name:r}){super(e,{cause:n}),this.name=r??n.name,this.code=t}},xl=new class{createNewAbortSignal(){if(this.controller){let e=Error(`Cancelling existing WebAuthn API call for new one`);e.name=`AbortError`,this.controller.abort(e)}let e=new AbortController;return this.controller=e,e.signal}cancelCeremony(){if(this.controller){let e=Error(`Manually cancelling existing WebAuthn API call`);e.name=`AbortError`,this.controller.abort(e),this.controller=void 0}}},Sl=[`cross-platform`,`platform`];function Cl(e){if(e&&!(Sl.indexOf(e)<0))return e}function wl(){if(!_l())return new Promise(e=>e(!1));let e=window.PublicKeyCredential;return e.isConditionalMediationAvailable===void 0?new Promise(e=>e(!1)):e.isConditionalMediationAvailable()}function Tl({error:e,options:t}){let{publicKey:n}=t;if(!n)throw Error(`options was missing required publicKey property`);if(e.name===`AbortError`){if(t.signal instanceof AbortSignal)return new bl({message:`Authentication ceremony was sent an abort signal`,code:`ERROR_CEREMONY_ABORTED`,cause:e})}else if(e.name===`NotAllowedError`)return new bl({message:e.message,code:`ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY`,cause:e});else if(e.name===`SecurityError`){let t=window.location.hostname;if(!yl(t))return new bl({message:`${window.location.hostname} is an invalid domain`,code:`ERROR_INVALID_DOMAIN`,cause:e});if(n.rpId!==t)return new bl({message:`The RP ID "${n.rpId}" is invalid for this domain`,code:`ERROR_INVALID_RP_ID`,cause:e})}else if(e.name===`UnknownError`)return new bl({message:`The authenticator was unable to process the specified options, or could not create a new assertion signature`,code:`ERROR_AUTHENTICATOR_GENERAL_ERROR`,cause:e});return e}async function El(e){let{optionsJSON:t,useBrowserAutofill:n=!1,verifyBrowserAutofillInput:r=!0}=e;if(!_l())throw Error(`WebAuthn is not supported in this browser`);let i;t.allowCredentials?.length!==0&&(i=t.allowCredentials?.map(vl));let a={...t,challenge:gl(t.challenge),allowCredentials:i},o={};if(n){if(!await wl())throw Error(`Browser does not support WebAuthn autofill`);if(document.querySelectorAll(`input[autocomplete$='webauthn']`).length<1&&r)throw Error('No <input> with "webauthn" as the only or last value in its `autocomplete` attribute was detected');o.mediation=`conditional`,a.allowCredentials=[]}o.publicKey=a,o.signal=xl.createNewAbortSignal();let s;try{s=await navigator.credentials.get(o)}catch(e){throw Tl({error:e,options:o})}if(!s)throw Error(`Authentication was not completed`);let{id:c,rawId:l,response:u,type:d}=s,f;return u.userHandle&&(f=hl(u.userHandle)),{id:c,rawId:hl(l),response:{authenticatorData:hl(u.authenticatorData),clientDataJSON:hl(u.clientDataJSON),signature:hl(u.signature),userHandle:f},type:d,clientExtensionResults:s.getClientExtensionResults(),authenticatorAttachment:Cl(s.authenticatorAttachment)}}_();async function Dl(e){let t=await El({optionsJSON:e});return Object.fromEntries(Object.entries(t))}function Ol({method:e,challengeToken:t,onComplete:n,onSecondFactor:r,onError:i}){let[a,o]=A(!1),[s,c]=A(null),l=async()=>{c(null),o(!0);try{let e=Ra();if(t){let r=await Dl((await e.loginBeginPasskey(t)).optionsJSON);n((await e.loginVerifyPasskey(t,r)).token);return}let a=await Dl((await e.passkeyLoginBegin()).optionsJSON),o=await e.passkeyLoginFinish(a),s=o.secondFactors??(o.requiresTotp===!0?[`totp`]:[]);if(s.length>0){if(r)r({challengeToken:o.token,factors:s});else{let e=`Additional verification is required — sign in with your password to continue.`;c(e),i?.(e)}return}n(o.token)}catch(e){let n=t?`Passkey verification failed`:`Passkey sign-in failed`,r=e instanceof Error?e.message:n;c(r),i?.(r)}finally{o(!1)}};return v(`div`,{className:`space-y-2`,children:[v(`button`,{type:`button`,"data-testid":t?`login-passkey`:`login-passkey-direct`,onClick:()=>void l(),disabled:a,className:`w-full flex items-center justify-center gap-2 rounded-lg border border-border bg-surface px-4 py-2.5 text-sm font-medium text-foreground hover:bg-surface-hover disabled:opacity-50 transition-colors`,children:[a?M(wt,{className:`h-4 w-4 animate-spin text-primary`}):M(zt,{className:`h-4 w-4 text-primary`}),e.label]}),s&&M(`div`,{className:`rounded-md bg-danger/10 border border-danger/20 px-3 py-2 text-xs text-danger`,children:s})]})}var kl=()=>window.location.hostname;function Al(e,t=kl){return _l()&&Oc(t(),e.rpId)}function jl(e,t=kl){let n=e.filter(e=>e.kind===`passkey`&&e.stage===`second-factor`).filter(e=>Al(e,t));return{passkeyMethods:n,widgetMethods:n.length>0?[]:e.filter(e=>e.kind===`widget`&&e.stage===`second-factor`)}}function Ml(e,t){let n=e.includes(`passkey`),r=t.passkeyMethods.length>0||t.widgetMethods.length>0,i=e.includes(`totp`);return n&&!r&&!i}function Nl(e){let t=e.onComplete,n=e.onSecondFactor;return typeof t==`function`?{onComplete:t,onSecondFactor:typeof n==`function`?n:void 0}:null}function Pl({methods:e,widgetConfig:t}){let n=e.filter(e=>e.kind!==`passkey`||Al(e));return n.length===0?null:v(`div`,{className:`mt-6 space-y-3`,children:[v(`div`,{className:`flex items-center gap-3`,children:[M(`div`,{className:`h-px flex-1 bg-border`}),M(`span`,{className:`text-[10px] uppercase tracking-wider text-foreground-subtle`,children:`Or continue with`}),M(`div`,{className:`h-px flex-1 bg-border`})]}),M(`div`,{className:`space-y-2`,children:n.map(e=>{if(e.kind===`redirect`)return v(`a`,{href:e.startUrl,className:`flex items-center justify-center gap-2 w-full rounded-lg border border-border bg-surface px-4 py-2.5 text-sm font-medium text-foreground hover:bg-surface-hover transition-colors`,children:[M(le,{className:`h-4 w-4 text-primary`}),e.label]},e.id);if(e.kind===`passkey`){let n=Nl(t);return n?M(Ol,{method:e,onComplete:n.onComplete,onSecondFactor:n.onSecondFactor},e.id):null}return M(Fl,{method:e,config:t},e.id)})})]})}function Fl({method:e,config:t}){let n=Tt(e.remote,e.bundleUrl);return n===null?v(`div`,{className:`flex items-center justify-center gap-2 rounded-lg border border-border bg-background px-4 py-2.5 text-xs text-foreground-subtle`,children:[M(wt,{className:`h-3.5 w-3.5 animate-spin`}),`Loading…`]}):n===void 0?v(`div`,{"data-testid":`login-method-load-error`,className:`flex items-center justify-center gap-2 rounded-lg border border-danger/20 bg-danger/10 px-4 py-2.5 text-xs text-danger`,children:[M(Xe,{className:`h-3.5 w-3.5 shrink-0`}),`A sign-in method could not be loaded — reload the page to retry.`]}):M(n,{instanceId:e.id,host:`dashboard`,config:t})}_();function Il(){let{login:e,verifyTotp:t,finalizePasskeyLogin:n,user:r}=ho(),{i18n:i}=qs(),a=et(),o=mr(),s=q(),c=new URLSearchParams(window.location.search).get(`next`);N(()=>{Za(c)},[c]);let l=new URLSearchParams(window.location.search).get(`redirect`);N(()=>{oo(l)},[l]);let u=s.state?.from??Xc()??`/devices`,[f,p]=A(``),[m,h]=A(``),[g,_]=A(!1),[y,b]=A(``),[x,S]=A(!1),[C,w]=A(`credentials`),[E,D]=A(``),[O,k]=A([]),[j,P]=A(``),ee=Be.auth.listLoginMethods.useQuery().data??[],te=ee.filter(e=>e.stage===`primary`),ne=jl(ee),{passkeyMethods:re,widgetMethods:ae}=ne,oe=d(!1),se=async()=>{if(oe.current)return;oe.current=!0;let e=Ja(l);if(e?.kind===`app-callback`){await R(e.url);return}else if(e){window.location.assign(F(e.path));return}let t=$a(c);t?window.location.assign(F(t)):o(u,{replace:!0})},[I,L]=A(null),R=async e=>{L({callbackBase:e,mintedUrl:null,failed:!1});try{let{code:t}=await Ra().trpcClient.auth.createHandoffCode.mutate(),n=qa(e,t);L({callbackBase:e,mintedUrl:n,failed:!1}),window.location.assign(n)}catch{L({callbackBase:e,mintedUrl:null,failed:!0})}},ce=r!==null,[le,ue]=A(!1);N(()=>{!ce||!l&&!c||le||(ue(!0),se())},[ce,l,c,le]);let de=async t=>{t.preventDefault(),b(``),S(!0);try{let t=await e(f,m);if(t.kind===`second-factor`){D(t.challengeToken),k(t.factors),w(`second-factor`);return}m===`changeme`?o(`/change-password`,{replace:!0}):await se()}catch(e){b(e instanceof Error?e.message:`Login failed`)}finally{S(!1)}},z=async e=>{e.preventDefault(),b(``),S(!0);try{await t(E,j.trim()),await se()}catch(e){b(e instanceof Error?e.message:`TOTP verification failed`),P(``)}finally{S(!1)}},B=async e=>{try{await n(e),await se()}catch(e){b(e instanceof Error?e.message:`Passkey sign-in failed`)}};return I===null?M(`div`,{className:`flex min-h-screen items-center justify-center bg-background p-4`,children:v(`div`,{className:`w-full max-w-sm`,children:[M(`div`,{className:`flex justify-center mb-8`,children:M(`img`,{src:a?.resolvedMode===`light`?F(`/brand/logo-horizontal-light.svg`):F(`/brand/logo-horizontal-dark.svg`),alt:`CamStack Admin`,className:`h-12`})}),C===`credentials`?v(`form`,{onSubmit:de,className:`space-y-4 rounded-xl border border-border bg-surface p-6 shadow-xl shadow-black/10`,children:[y&&M(`div`,{className:`rounded-md bg-danger/10 border border-danger/20 px-3 py-2 text-xs text-danger`,children:y}),v(`div`,{className:`space-y-1.5`,children:[M(`label`,{className:`text-xs font-medium text-foreground-subtle`,children:`Username`}),M(`input`,{"data-testid":`login-username`,type:`text`,placeholder:`Username`,value:f,onChange:e=>p(e.target.value),className:`w-full rounded-lg border border-border bg-background px-3 py-2.5 text-sm text-foreground placeholder:text-foreground-disabled focus:border-primary focus:ring-1 focus:ring-primary/30 outline-none transition-all`,autoFocus:!0})]}),v(`div`,{className:`space-y-1.5`,children:[M(`label`,{className:`text-xs font-medium text-foreground-subtle`,children:`Password`}),v(`div`,{className:`relative`,children:[M(`input`,{"data-testid":`login-password`,type:g?`text`:`password`,placeholder:`Password`,value:m,onChange:e=>h(e.target.value),className:`w-full rounded-lg border border-border bg-background px-3 py-2.5 pr-10 text-sm text-foreground placeholder:text-foreground-disabled focus:border-primary focus:ring-1 focus:ring-primary/30 outline-none transition-all`}),M(`button`,{type:`button`,onClick:()=>_(!g),className:`absolute right-2.5 top-1/2 -translate-y-1/2 text-foreground-subtle hover:text-foreground transition-colors`,tabIndex:-1,children:M(g?ie:ge,{className:`h-4 w-4`})})]})]}),M(`button`,{"data-testid":`login-submit`,type:`submit`,disabled:x||!f||!m,className:`w-full rounded-lg bg-primary px-4 py-2.5 text-sm font-semibold text-primary-foreground shadow-md shadow-primary/20 hover:shadow-lg hover:shadow-primary/30 disabled:opacity-50 disabled:shadow-none transition-all`,children:x?v(`span`,{className:`flex items-center justify-center gap-2`,children:[M(`span`,{className:`h-4 w-4 animate-spin rounded-full border-2 border-primary-foreground/30 border-t-primary-foreground`}),`Logging in...`]}):`Log in`})]}):v(`div`,{className:`space-y-4 rounded-xl border border-border bg-surface p-6 shadow-xl shadow-black/10`,children:[v(`div`,{className:`flex items-center gap-2 pb-1 border-b border-border`,children:[M(ke,{className:`h-4 w-4 text-primary`}),M(`div`,{className:`text-sm font-medium text-foreground`,children:`Two-factor authentication`})]}),M(`p`,{className:`text-xs text-foreground-subtle`,children:f?v(T,{children:[`Finish signing in as `,M(`span`,{className:`font-mono text-foreground`,children:f}),`.`]}):`Finish signing in.`}),y&&M(`div`,{className:`rounded-md bg-danger/10 border border-danger/20 px-3 py-2 text-xs text-danger`,children:y}),O.includes(`passkey`)&&re.map(e=>M(Ol,{method:e,challengeToken:E,onComplete:B},e.id)),O.includes(`passkey`)&&ae.map(e=>M(Fl,{method:e,config:{challengeToken:E,onComplete:B}},e.id)),Ml(O,ne)&&M(`div`,{className:`rounded-md border border-border bg-background px-3 py-2 text-xs text-foreground-subtle`,children:`Passkey verification isn't available on this address. Open the hub via its domain URL to complete sign-in.`}),O.includes(`passkey`)&&O.includes(`totp`)&&v(`div`,{className:`flex items-center gap-3`,children:[M(`div`,{className:`h-px flex-1 bg-border`}),M(`span`,{className:`text-[10px] uppercase tracking-wider text-foreground-subtle`,children:`or`}),M(`div`,{className:`h-px flex-1 bg-border`})]}),O.includes(`totp`)&&v(`form`,{onSubmit:z,className:`space-y-4`,children:[v(`div`,{className:`space-y-1.5`,children:[M(`label`,{className:`text-xs font-medium text-foreground-subtle`,children:`Authentication code`}),M(`input`,{"data-testid":`login-totp`,type:`text`,inputMode:`numeric`,autoComplete:`one-time-code`,placeholder:`123456`,value:j,onChange:e=>P(e.target.value.replace(/\D/g,``).slice(0,6)),className:`w-full rounded-lg border border-border bg-background px-3 py-3 text-center text-2xl font-mono tracking-widest text-foreground placeholder:text-foreground-disabled focus:border-primary focus:ring-1 focus:ring-primary/30 outline-none transition-all`,autoFocus:!0})]}),M(`button`,{"data-testid":`login-totp-submit`,type:`submit`,disabled:x||j.length!==6,className:`w-full rounded-lg bg-primary px-4 py-2.5 text-sm font-semibold text-primary-foreground shadow-md shadow-primary/20 hover:shadow-lg hover:shadow-primary/30 disabled:opacity-50 disabled:shadow-none transition-all`,children:x?v(`span`,{className:`flex items-center justify-center gap-2`,children:[M(`span`,{className:`h-4 w-4 animate-spin rounded-full border-2 border-primary-foreground/30 border-t-primary-foreground`}),`Verifying...`]}):`Verify and sign in`})]}),v(`button`,{type:`button`,onClick:()=>{w(`credentials`),D(``),k([]),P(``),b(``)},className:`w-full flex items-center justify-center gap-1.5 text-xs text-foreground-subtle hover:text-foreground transition-colors`,children:[M(Et,{className:`h-3 w-3`}),`Back to username + password`]})]}),C===`credentials`&&M(Pl,{methods:te,widgetConfig:{onComplete:B,onSecondFactor:e=>{let t=e.factors.filter(e=>e===`totp`||e===`passkey`);D(e.challengeToken),k(t),P(``),b(``),w(`second-factor`)},locale:i.language}}),v(`p`,{className:`mt-6 text-center text-[10px] text-foreground-subtle/50`,children:[`CamStack v`,`1.2.316`]})]})}):M(`div`,{className:`flex min-h-screen items-center justify-center bg-background p-4`,children:v(`div`,{className:`w-full max-w-sm rounded-xl border border-border bg-surface p-6 text-center space-y-4`,children:[M(`h1`,{className:`text-sm font-semibold text-foreground`,children:`Returning to the app…`}),I.failed?v(T,{children:[M(`p`,{className:`text-xs text-danger`,children:`Could not prepare the sign-in handoff. You are logged in — retry below.`}),M(`button`,{onClick:()=>void R(I.callbackBase),className:`inline-flex rounded-lg bg-primary px-4 py-2 text-sm font-medium text-primary-foreground hover:bg-primary/90`,children:`Retry`})]}):I.mintedUrl===null?M(`p`,{className:`text-xs text-foreground-subtle`,children:`Preparing a one-time sign-in code…`}):v(T,{children:[M(`p`,{className:`text-xs text-foreground-subtle`,children:`If the app does not open automatically, tap below (the code expires in 60s).`}),M(`a`,{href:I.mintedUrl,className:`inline-flex rounded-lg bg-primary px-4 py-2 text-sm font-medium text-primary-foreground hover:bg-primary/90`,children:`Open CamStack`})]})]})})}_();function Ll(){return M(J,{to:Xc()??`/devices`,replace:!0})}var Rl=D(()=>i(()=>import(`./Devices-R_WwzkQv.js`).then(e=>({default:e.DevicesPage})),__vite__mapDeps([0,1,2,3,4,5,6,7,8]),import.meta.url)),zl=D(()=>i(()=>import(`./Integrations-C6u4EgW8.js`).then(e=>({default:e.IntegrationsPage})),__vite__mapDeps([9,1,2,3,4,5,6,10,11,12,13,7,14,8]),import.meta.url)),Bl=D(()=>i(()=>import(`./IntegrationDetail-CooCm_h9.js`).then(e=>({default:e.IntegrationDetailPage})),__vite__mapDeps([15,1,2,3,4,16,17,12,18,10,11,7,5]),import.meta.url)),Vl=D(()=>i(()=>import(`./Pipeline-Bc9l1Z9m.js`).then(e=>({default:e.PipelinePage})),__vite__mapDeps([19,1,2,3,4,20,21,22,16,17,12,18,23,24,25,26,27,28,8]),import.meta.url)),Hl=D(()=>i(()=>import(`./DeviceDetail-DliW3yCK.js`).then(e=>({default:e.DeviceDetailPage})),__vite__mapDeps([29,1,2,3,4,25,30,5,31,20,21,32,33,34,35,17,12,18,13,28,8,36]),import.meta.url)),Ul=D(()=>i(()=>import(`./Showroom-BI_t70F0.js`).then(e=>({default:e.ShowroomPage})),__vite__mapDeps([37,5,1,2,3,4,32,12,13]),import.meta.url)),Wl=D(()=>i(()=>import(`./EmbedPlayerPage-UuSLDm-L.js`).then(e=>({default:e.EmbedPlayerPage})),__vite__mapDeps([38,1,2,3,4]),import.meta.url)),Gl=D(()=>i(()=>import(`./DetectionIntelligence-L5gfBmuW.js`).then(e=>({default:e.DetectionIntelligencePage})),__vite__mapDeps([39,1,2,3,4,40,36,22,41,6,42]),import.meta.url)),Kl=D(()=>i(()=>import(`./Plates-BTSmXK2N.js`).then(e=>({default:e.PlatesPage})),__vite__mapDeps([43,1,2,3,4,40,36,22,6,42]),import.meta.url)),ql=D(()=>i(()=>import(`./Events-ypLCpQyL.js`).then(e=>({default:e.EventsPage})),__vite__mapDeps([44,1,2,3,4,22,6,45,17,42,34,36,27]),import.meta.url)),Jl=D(()=>i(()=>import(`./Scenes-BCLdbVqC.js`).then(e=>({default:e.ScenesPage})),__vite__mapDeps([46,1,2,3,4,6,47]),import.meta.url)),Yl=D(()=>i(()=>import(`./Recordings-71t3rBru.js`).then(e=>({default:e.RecordingsPage})),__vite__mapDeps([48,1,2,3,4,24,25,26,12,27,49,6,45,17,35,18,23,36]),import.meta.url)),Xl=D(()=>i(()=>import(`./Viewer-gfKutuCq.js`).then(e=>({default:e.ViewerPage})),__vite__mapDeps([50,2,3,4]),import.meta.url)),Zl=D(()=>i(()=>import(`./Build-BcU4hwAg.js`).then(e=>({default:e.BuildPage})),__vite__mapDeps([51,1,2,3,4,6,28]),import.meta.url)),Ql=D(()=>i(()=>import(`./CompositionEditorPage-CvD5LaIB.js`).then(e=>({default:e.CompositionEditorPage})),__vite__mapDeps([52,1,2,3,4,30,6,33]),import.meta.url)),$l=D(()=>i(()=>import(`./Locations-Do-T_nWo.js`).then(e=>({default:e.LocationsPage})),__vite__mapDeps([53,1,2,3,4,30,41,6]),import.meta.url)),eu=D(()=>i(()=>import(`./Addons-BIIMXj2l.js`).then(e=>({default:e.AddonsPage})),__vite__mapDeps([54,1,2,3,4,6,16,17,12,18,55]),import.meta.url)),tu=D(()=>i(()=>import(`./AiProfiles-K_cBnHmI.js`).then(e=>({default:e.AiProfilesPage})),__vite__mapDeps([56,1,2,3,4,30,57,6,45,17]),import.meta.url)),nu=D(()=>i(()=>import(`./ModelLicenses-BH0t7XzG.js`).then(e=>({default:e.ModelLicensesPage})),__vite__mapDeps([58,2,3,4,6]),import.meta.url)),ru=D(()=>i(()=>import(`./MyAccess-CdkTrtxL.js`).then(e=>({default:e.MyAccessPage})),__vite__mapDeps([59,1,2,3,4,6]),import.meta.url)),iu=D(()=>i(()=>import(`./Logs-CuHaX2cL.js`).then(e=>({default:e.LogsPage})),__vite__mapDeps([60,1,2,3,4,21,61,6,16,17,12,18,45,62]),import.meta.url)),au=D(()=>i(()=>import(`./Identity-CxK06qmH.js`).then(e=>({default:e.IdentityPage})),__vite__mapDeps([63,1,2,3,4,61,6,16,17,12,18,45,62]),import.meta.url)),ou=D(()=>i(()=>import(`./Network-4ks2Q-lc.js`).then(e=>({default:e.NetworkPage})),__vite__mapDeps([64,1,2,3,4,30,61,6,16,17,12,18,45,62]),import.meta.url)),su=D(()=>i(()=>import(`./Integrations-Cs1kg3x0.js`).then(e=>({default:e.IntegrationsPage})),__vite__mapDeps([65,1,2,3,4,61,6,16,17,12,18,45,11,14]),import.meta.url)),cu=D(()=>i(()=>import(`./Data-DsLW3Agy.js`).then(e=>({default:e.DataPage})),__vite__mapDeps([66,1,2,3,4,25,31,24,26,12,27,6,45,17,36]),import.meta.url)),lu=D(()=>i(()=>import(`./Settings-lXpzBmvv.js`).then(e=>({default:e.SettingsPage})),__vite__mapDeps([67,1,2,3,4,6,16,17,12,18]),import.meta.url)),uu=D(()=>i(()=>import(`./Cluster-BD5ug_it.js`).then(e=>({default:e.ClusterPage})),__vite__mapDeps([68,1,2,3,4,26,16,17,12,18,55,27]),import.meta.url)),du=D(()=>i(()=>import(`./Capabilities-kIunpjC-.js`).then(e=>({default:e.CapabilitiesPage})),__vite__mapDeps([69,1,2,3,4,6]),import.meta.url)),fu=D(()=>i(()=>import(`./Terminal-BV2HSPfb.js`).then(e=>({default:e.TerminalPage})),__vite__mapDeps([70,1,2,3,4,6,16,17,12,18,71]),import.meta.url)),pu=D(()=>i(()=>import(`./Notifications-C8F1LO0t.js`).then(e=>({default:e.NotificationsPage})),__vite__mapDeps([72,1,2,3,4,57,6,45,17,47]),import.meta.url)),mu=D(()=>i(()=>import(`./Calendars-BAEmavGo.js`).then(e=>({default:e.CalendarsPage})),__vite__mapDeps([73,1,2,3,4,6]),import.meta.url)),hu=new E({defaultOptions:{queries:{gcTime:0,staleTime:0,retry:!1,refetchOnWindowFocus:!1}}});rt(hu);function gu({field:e,value:t,onChange:n,disabled:r}){return M(ca,{field:e,value:t,onChange:n,disabled:r})}function _u({field:e,value:t,onChange:n,disabled:r}){return M(ia,{field:e,value:t,onChange:n,disabled:r})}var vu={"pipeline-editor":gu,"model-selector":_u};function yu({children:e}){let{user:t,logout:n}=ho(),[r,i]=A(0),a=d(t?.username??null);N(()=>{let e=t?.username??null;e!==a.current&&(a.current=e,za(),i(e=>e+1))},[t]);let o=b(()=>Ra(),[r]),{bootReady:s,bootError:c}=vo(o,t??null,n);return bo(l(()=>{za(),i(e=>e+1),hu.invalidateQueries()},[])),M(oe,{system:o,children:M(Be.Provider,{client:o.trpcClient,queryClient:hu,children:v(de,{children:[M(ye,{children:s?e:M(bu,{})}),s&&M(_a,{}),c!==null&&s&&v(`div`,{className:`fixed bottom-[calc(env(safe-area-inset-bottom)+1rem)] right-[calc(env(safe-area-inset-right)+1rem)] z-50 max-w-sm rounded-lg border border-warning/30 bg-warning/10 px-3 py-2 text-xs text-warning shadow-lg`,children:[`Boot probe failed: `,c,`. Retrying in background.`]})]})})})}function bu(){return M(`div`,{className:`flex min-h-screen items-center justify-center bg-background`,children:v(`div`,{className:`flex items-center gap-3 text-sm text-foreground-subtle`,children:[M(`span`,{className:`h-4 w-4 animate-spin rounded-full border-2 border-primary/30 border-t-primary`}),`Connecting…`]})})}function xu(){return M(`div`,{className:`flex min-h-screen items-center justify-center bg-background`,children:M(`span`,{className:`h-4 w-4 animate-spin rounded-full border-2 border-primary/30 border-t-primary`})})}function Su(){return M(Re,{defaultMode:`dark`,children:M(j,{client:hu,children:M(mo,{children:M(yu,{children:M(R,{children:v(Se,{renderers:vu,children:[M(Mi,{basename:ae(),children:M(x,{fallback:M(xu,{}),children:v(Ur,{children:[M(Y,{path:`/login`,element:M(Il,{})}),M(Y,{path:`/change-password`,element:M($,{children:M(ml,{})})}),M(Y,{path:`/showroom`,element:M(Ul,{})}),M(Y,{path:`/embed/player`,element:M(Wl,{})}),v(Y,{element:M($,{children:M(rl,{})}),children:[M(Y,{index:!0,element:M(Ll,{})}),M(Y,{path:`/access-denied`,element:M(fl,{})}),M(Y,{path:`/dashboard`,element:M(J,{to:`/devices`,replace:!0})}),M(Y,{path:`/devices`,element:M(Rl,{})}),M(Y,{path:`/cameras`,element:M(J,{to:`/devices`,replace:!0})}),M(Y,{path:`/integrations`,element:M(zl,{})}),M(Y,{path:`/integrations/:integrationId`,element:M(Bl,{})}),M(Y,{path:`/pipeline`,element:M(Vl,{})}),M(Y,{path:`/live`,element:M(Xl,{})}),M(Y,{path:`/devices/:deviceId`,element:M(Hl,{})}),M(Y,{path:`/system/logs`,element:M($,{requireAdmin:!0,children:M(iu,{})})}),M(Y,{path:`/system/addons`,element:M($,{requireAdmin:!0,children:M(eu,{})})}),M(Y,{path:`/system/ai`,element:M($,{requireAdmin:!0,children:M(tu,{})})}),M(Y,{path:`/system/licenses`,element:M($,{requireAdmin:!0,children:M(nu,{})})}),M(Y,{path:`/system/settings`,element:M($,{requireAdmin:!0,children:M(lu,{})})}),M(Y,{path:`/system/cluster`,element:M($,{requireAdmin:!0,children:M(uu,{})})}),M(Y,{path:`/system/capabilities`,element:M($,{requireAdmin:!0,children:M(du,{})})}),M(Y,{path:`/system/terminal`,element:M($,{requireAdmin:!0,children:M(fu,{})})}),M(Y,{path:`/system/server`,element:M(J,{to:`/system/cluster`,replace:!0})}),M(Y,{path:`/system/notifications`,element:M($,{requireAdmin:!0,children:M(pu,{})})}),M(Y,{path:`/system/calendars`,element:M($,{requireAdmin:!0,children:M(mu,{})})}),M(Y,{path:`/system/identity`,element:M($,{requireAdmin:!0,children:M(au,{})})}),M(Y,{path:`/system/my-access`,element:M(ru,{})}),M(Y,{path:`/system/network`,element:M($,{requireAdmin:!0,children:M(ou,{})})}),M(Y,{path:`/system/integrations`,element:M($,{requireAdmin:!0,children:M(su,{})})}),M(Y,{path:`/system/data`,element:M($,{requireAdmin:!0,children:M(cu,{})})}),M(Y,{path:`/system/users`,element:M(J,{to:`/system/identity?tab=users`,replace:!0})}),M(Y,{path:`/system/api-keys`,element:M(J,{to:`/system/identity?tab=api-keys`,replace:!0})}),M(Y,{path:`/system/authentication`,element:M(J,{to:`/system/identity?tab=authentication`,replace:!0})}),M(Y,{path:`/system/linked-sessions`,element:M(J,{to:`/system/identity?tab=linked-sessions`,replace:!0})}),M(Y,{path:`/system/remote-access`,element:M(J,{to:`/system/network?tab=remote-access`,replace:!0})}),M(Y,{path:`/system/turn`,element:M(J,{to:`/system/network?tab=turn`,replace:!0})}),M(Y,{path:`/system/storage`,element:M(J,{to:`/system/data?tab=storage`,replace:!0})}),M(Y,{path:`/system/backup`,element:M(J,{to:`/system/data?tab=backup`,replace:!0})}),M(Y,{path:`/detection-intelligence`,element:M($,{requireAdmin:!0,children:M(Gl,{})})}),M(Y,{path:`/plates`,element:M($,{requireAdmin:!0,children:M(Kl,{})})}),M(Y,{path:`/retrain`,element:M(J,{to:`/events?tab=retrain`,replace:!0})}),M(Y,{path:`/events`,element:M($,{requireAdmin:!0,children:M(ql,{})})}),M(Y,{path:`/scenes`,element:M($,{requireAdmin:!0,children:M(Jl,{})})}),M(Y,{path:`/recordings`,element:M($,{requireAdmin:!0,children:M(Yl,{})})}),M(Y,{path:`/build`,element:M($,{requireAdmin:!0,children:M(Zl,{})})}),M(Y,{path:sl,element:M($,{requireAdmin:!0,children:M(Ql,{})})}),M(Y,{path:cl,element:M($,{requireAdmin:!0,children:M(Ql,{})})}),M(Y,{path:`/locations`,element:M($,{requireAdmin:!0,children:M($l,{})})}),M(Y,{path:`/automation`,element:M(ga,{to:`/build`})}),M(Y,{path:`/addon/:pagePath`,element:M($,{requireAdmin:!0,children:M(Do,{})})})]})]})})}),M(Sa,{})]})})})})})})}var Cu={nav:{integrations:`Integrations`,metrics:`Metrics`,detectionSection:`Detection`,detectionIntelligence:`People`,vehicles:`Vehicles`,events:`Library`,clusterSection:`Cluster & Server`},system:{title:`Administration`,addons:`Addons`,agents:`Agents`,processes:`Processes`,logs:`Logs`,users:`Users`,settings:`Settings`,repl:`REPL`,models:`Models`,integrations:`Connectivity`,serverManagement:`Server`,systemNav:`System`,modelLicenses:`Models and licenses`},common:{save:`Save`,cancel:`Cancel`,delete:`Delete`,enable:`Enable`,disable:`Disable`,edit:`Edit`,add:`Add`,remove:`Remove`,confirm:`Confirm`,close:`Close`,back:`Back`,next:`Next`,search:`Search`,filter:`Filter`,reset:`Reset`,apply:`Apply`,submit:`Submit`,loading:`Loading…`,error:`Error`,success:`Success`,warning:`Warning`,info:`Info`,noData:`No data available`,noResults:`No results found`,retry:`Retry`,refresh:`Refresh`,copy:`Copy`,copied:`Copied!`,yes:`Yes`,no:`No`},connection:{disconnected:`Server unreachable — reconnecting…`,connected:`Connected`,reconnecting:`Reconnecting…`,degraded:`Live connection interrupted — hub is online (a cluster node may be unresponsive), re-establishing…`,degradedNodes_one:`Cluster degraded — node {{nodes}} not responding. Hub is online, live link re-establishing…`,degradedNodes_other:`Cluster degraded — nodes {{nodes}} not responding. Hub is online, live link re-establishing…`,degradedCount_one:`Cluster degraded — {{count}} cluster node offline. Hub is online, live link re-establishing…`,degradedCount_other:`Cluster degraded — {{count}} cluster nodes offline. Hub is online, live link re-establishing…`,sessionExpired:`Session expired — please sign in again.`,signIn:`Sign in`},passkeyPrompt:{message:`Save a passkey for faster sign-in?`,enrollNow:`Enroll now`,notNow:`Not now`},status:{online:`Online`,offline:`Offline`,connecting:`Connecting`,error:`Error`,disabled:`Disabled`,enabled:`Enabled`,active:`Active`,inactive:`Inactive`,running:`Running`,stopped:`Stopped`,pending:`Pending`,unknown:`Unknown`},auth:{login:`Login`,logout:`Logout`,username:`Username`,password:`Password`,signIn:`Sign In`,invalidCredentials:`Invalid username or password`},theme:{dark:`Dark`,light:`Light`,system:`System`},language:{select:`Language`,en:`English`,it:`Italian`},pages:{viewer:{frameTitle:`CamStack viewer`,underMountTitle:`The viewer cannot be shown through this relay`,underMountBody:`This admin UI is served under {{mount}}. The viewer app only runs at the hub’s own address — open it there, in a new tab.`},integrations:{title:`Integrations`,subtitle:`Manage camera sources and provider connections`},metrics:{title:`Metrics`,subtitle:`System performance and usage statistics`},agents:{title:`Agents`,subtitle:`Manage distributed processing agents`},addons:{title:`Addons`,subtitle:`Extend functionality with addon modules`},settings:{title:`Settings`,subtitle:`Configure system-wide preferences`},users:{title:`Users`,subtitle:`Manage user accounts and permissions`},logs:{title:`Logs`,subtitle:`View system and device logs`}},integrations:{preview:`Preview`,snapshotUnavailable:`Snapshot unavailable`,noSnapshot:`No snapshot`,lastSnapshot:`Last snapshot:`,offline:`Offline`,active:`Active`,available:`Available`,noDevices:`No devices.`,addFirstDevice:`Add your first device to get started.`,import:`+ Import`,noProviders:`No providers available. Install a provider addon.`,manage:`Manage`,integrationName:`Integration name`,integrationNamePlaceholder:`e.g. Garage Server`,connectionSuccess:`Connection successful!`,errorPrefix:`Error:`,back:`Back`,testing:`Testing...`,testConnection:`Test connection`,forward:`Next`,searchingDevices:`Searching for devices...`,foundDevices:`Found {{count}} devices. Select the ones to import.`,noDevicesFound:`No devices found.`,skip:`Skip`,importSelected:`Import selected`,newIntegration:`New Integration`,configureIntegration:`Configure Integration`,importDevices:`Import Devices`,addDevice:`Add device`,name:`Name`,namePlaceholder:`e.g. Entrance Camera`,snapshotUrlOptional:`Snapshot URL (optional)`,streamUrls:`Stream URLs`,addStream:`Add stream`,cancel:`Cancel`,saving:`Saving...`,save:`Save`,saveAndNew:`Save and new`,test:`Test`,stream:`Stream {{number}}:`,devices:`devices`,rediscover:`Rediscover`,config:`Config`,integrationNotFound:`Integration not found.`,configComingSoon:`Config coming soon.`,providerConfig:`Provider Config`,editConfig:`Edit configuration`,relinkBrokerHelp:`Choose the broker this integration connects through. Picking a different broker re-points it and restarts the addon.`,currentBroker:`Current broker`,relinkFailed:`Failed to update broker link.`,noBrokerKind:`This integration declares device-adoption but its addon manifest has no brokerKind.`,connectionInconclusive:`Could not be checked:`,connectionUntestable:`This integration cannot be tested before it is created.`},ai:{addProfile:`Add profile`,attachSnapshot:`Camera snapshot`,attachTrack:`Recent track`,chatEmpty:`Pick a profile, optionally attach a camera snapshot or a recent track, and send a message. Nothing here is saved.`,chatFailed:`The test call failed`,chooseKind:`Choose a profile type`,clearChat:`Clear`,colAvgMs:`Avg ms`,colCalls:`Calls`,colConsumer:`Consumer`,colDay:`Day`,colDisk:`On disk`,colError:`Error`,colKind:`Kind`,colModel:`Model`,colNode:`Node`,colOkErr:`OK / err`,colOn:`On`,colProfile:`Profile`,colState:`State`,colTokens:`In / out tok`,colVision:`Vision`,createProfile:`Create profile`,defaultDisabled:`This default profile is disabled — callers resolve to no profile.`,defaultMissing:`This default names a profile that no longer exists.`,defaultText:`Default text profile`,defaultVision:`Default vision profile`,editProfile:`Edit {{name}}`,lastDays:`Last {{days}} days`,loadFailed:`Failed to load profiles`,message:`Message`,messagePlaceholder:`Ask the model something…`,model:`Model`,name:`Name`,newProfile:`New {{kind}} profile`,noCameras:`No camera found.`,noEnabledProfiles:`No enabled profile. Add one on the Profiles tab.`,noKinds:`No AI provider is installed.`,noProfiles:`No AI profiles yet. Click "Add profile" to configure one.`,noRuntimes:`No node advertises the llm-runtime capability.`,noTracks:`No track in the last 6 hours.`,noUsage:`No AI calls in this window.`,none:`None`,notVision:`This profile is not vision-capable — an attached image will be refused before anything is read.`,pickModelFirst:`pick a model`,appleNode:`Mac that runs it`,appleAsking:`Asking the nodes…`,appleHint:`Text only for now — notification titles and summaries. Apple refuses prompts framed as surveillance; when it does, the next profile in the chain answers instead.`,pickAppleNodeFirst:`pick a Mac`,colApple:`Apple on-device`,appleAvailable:`available`,appleUnknown:`unknown`,appleNotMac:`not a Mac`,appleNotEligible:`not eligible`,appleIntelligenceOff:`Apple Intelligence off`,appleModelNotReady:`model downloading`,appleOsTooOld:`macOS too old`,appleHelperMissing:`helper missing`,appleHelperCrashed:`helper crashed`,profile:`Profile`,profilesSubtitle:`One row = one usable model endpoint. The defaults below decide who answers when a feature names no profile.`,profilesTitle:`AI profiles`,ready:`ready`,runtimeNode:`Runtime node`,runtimesFailed:`Failed to read runtime nodes`,runtimesSubtitle:`Nodes advertising the llm-runtime capability: what each has loaded, what it is downloading, and how much model data sits on its disk.`,runtimesTitle:`Managed runtimes`,saveChanges:`Save changes`,saveFailed:`Save failed`,secretHint:`A stored API key is never shown. Leave it as-is to keep it; type a new value to replace it.`,selectModel:`Select a model…`,selectProfile:`Select a profile…`,send:`Send`,snapshotOf:`Snapshot of {{name}}`,stop:`Stop`,streamNote:`The answer streams as the model produces it. A cold model can take a while to load — the status line says which phase it is in.`,systemPlaceholder:`Answer in one short sentence.`,systemPrompt:`System prompt (optional)`,tabProfiles:`Profiles`,tabRuntimes:`Runtimes`,tabTest:`Test`,tabUsage:`Usage`,test:`Test`,testSubtitle:`A throwaway conversation with one profile. Attach a live camera snapshot or a recent track to check the model can actually read a picture. Nothing is saved — only the usage row.`,testTitle:`Test chat`,trackOf:`{{class}} on {{name}}`,unreachable:`unreachable`,usageFailed:`Failed to read usage`,usageSubtitle:`Server-side rollup per day, consumer and profile — never raw call rows. Errors are counted, so a profile that always fails is visible here before a feature reports it.`,usageTitle:`Usage`,vision:`vision`,window:`Window`},logging:{levels:{title:`Levels`,subtitle:`Cluster → node, most specific wins. The floor gates what reaches the log destinations; the in-memory viewer keeps every line either way.`,scope:`Scope`,cluster:`Cluster`,effective:`In force here`,fromDefault:`nothing is set anywhere — this is the default`,fromLayer:`decided by the {{source}} layer`,notPersisted:`The settings store could not be read or written — what you see is live, but it would not survive a restart.`,inForce:`in force`,inherits:`inherits — nothing set at this layer`,setHere:`set here: {{level}}`,clear:`Clear`,componentNote:`A per-component layer is planned and not resolvable yet — nothing on this page inherits from one.`},diagnostics:{title:`Diagnostics`,subtitle:`Diagnostics are armed for a window, never switched on. Each carries a deadline and expires by itself — one left running is an incident of its own.`,expiresIn:`expires in {{left}}`,disarmed:`disarmed`,notPersisted:`not persisted — will not survive a restart`,disarm:`Disarm`}},clusterLoad:{sourceNote:"Drawn from the `metrics.node-processes-snapshot` event this node already emits on a fixed cadence — this page adds no sampling of its own. It is read back through `metricsProvider.getLoadSeries`, the ONE reader over both retention tiers: the node keeps its last 180 snapshots in memory, and the hub keeps the operator retention on disk.",durableYes:`The durable tier answered, so this window survives closing the page AND a node restart.`,durableNo:`The durable tier did NOT answer — this window is the in-memory ring alone (about an hour) and a node restart clears it.`,windowSince:`Showing from {{since}}.`,reduced:`{{samples}} raw snapshots, reduced to one point per {{bucket}}s. A point carries its bucket MAXIMUM, never a mean — a mean would smear away the spike this chart exists to find.`,unreduced:`{{samples}} raw snapshots, one point each.`,noThreadSplit:`No thread-level CPU split on this node — /proc/<pid>/task is Linux-only, and the first sample after a restart has no window to measure. CPU below falls back to the ps lifetime AVERAGE, which is not a rate.`,loadingRetained:`Reading the retained series from this node…`,waitingFirstSample:`No retained samples for this node — waiting for the next snapshot. The chart needs two to draw a rate.`,bucketRoot:`Node supervisor`,bucketUnattributed:`Unattributed processes`,processCount:`{{count}} process(es)`,cpuTitle:`CPU % of one core`,cpuTitleLifetime:`CPU % (ps lifetime average)`,seriesMain:`Main threads`,seriesGc:`GC / V8 helpers`,cpuUnavailable:`No thread split on this node. Lifetime average: {{avg}}%`,memoryTitle:`Memory RSS`,memoryUnavailable:`No memory samples yet.`},cameraAttribution:{title:`Per-camera load — what can be attributed`,intro:`This table is the gate for the charts above, not a footnote to them: a family is drawn per camera only when it is genuinely measured AND readable today. Detection runs on a pool shared by every camera and can only be counted, never measured — it is shown as one shared total and never divided. Streaming is per-camera by construction and still unreadable, because only an ffmpeg-backed source spawns a child. A chart of a number the system cannot attribute is worse than no chart.`,measured:`Measurable per camera`,accounted:`Countable only (shared pool)`,unattributable:`Not attributable`,colFamily:`Load`,colAttribution:`Attribution`,colUnit:`Unit of work`,colChartable:`Chartable today`,colMissing:`What is missing`,unitNotSortable:`No meaningful order — the cell describes a mechanism, not a value.`,missingNotSortable:`No meaningful order — the cell is an explanation, not a value.`,evidence:`Evidence ({{count}})`},cameraLoad:{title:`Per-camera load — measured, on this node`,intro:"Each addon reports its OWN cost through the `load-contribution` capability — the recorder does not have to be told which camera its ffmpeg serves, it spawned it. Nothing here joins a pid to a camera. Only families that are measured AND readable today are drawn ({{roles}}); the rest are named below rather than estimated.",windowNote:`CPU is a DELTA of the cumulative counters, over the same fixed cadence the node already emits its process snapshot on — this panel adds no sampling and reads nothing while it is closed. Contributions are not stored anywhere, so unlike the per-addon charts above this window starts when you open this panel.`,windowSince:`Differencing since {{since}} ({{count}} windows).`,readFailed:`Could not read the load contributions: {{error}}. This is a failed read, NOT an idle cluster.`,loading:`Reading what the addons report…`,waitingWindow:`No per-camera window yet. A rate needs two readings, and the second arrives with the next process snapshot. A node running no decode, transcode or recording child stays empty — which is the truth, not a failure.`,deviceLabel:`Camera {{deviceId}}`,unitCount:`{{count}} unit(s): {{roles}}`,cpuTitle:`CPU % of one core (delta)`,cpuUnavailable:`No measurable window yet — every window so far contained a unit that started, stopped or reported no counter.`,memoryTitle:`Memory RSS`,memoryUnavailable:`No memory reported for this camera.`,coverage:`Addons claim {{claimed}} of the {{observed}} camstack processes this node reports.`,coverageUnknown:`No process snapshot from this node yet, so nothing can be said about what is unclaimed. That is different from "everything is claimed".`,noUnclaimed:`Nothing is unclaimed on this node.`,unclaimed:`{{count}} process(es) nobody claims, holding {{rss}}. Either a leak or a cost family nobody has taught to report — they stay in their own bucket and are never folded into a camera. CPU is unknown for them: the observer measures RSS and reports no cumulative CPU seconds.`,sharedTitle:`Shared — declared as belonging to no camera`,sharedNote:`Reported so the shared cost is visible as shared instead of invisible. It is NOT divided across the cameras present: the inference pool is one process serving all of them, and an apportioned share is an estimate, not a measurement. These totals are cumulative since each unit started — not a rate.`,sharedRow:`{{roles}} — {{units}} unit(s), {{cpu}} CPU-seconds, {{rss}}`,refusedTitle:`Reported per camera, and still not charted`,refusedRow:`— {{count}} entr(ies) from {{addons}}. {{reason}}`},deviceMigrate:{title:`Migrate to…`,subtitle:`Replace this camera with other hardware you have already adopted. The new camera inherits number {{deviceId}}, so recordings, rules and integrations follow it.`,pickerLabel:`Replacement camera`,pickerPlaceholder:`Select a camera…`,pickerPending:`Reading the fleet…`,noTargets:`No other camera is adopted, so there is nothing to migrate to.`,action:`Migrate`,running:`Migrating…`,confirmTitle:`Replace “{{source}}” with “{{target}}”?`,confirmMessage:`“{{target}}” takes over number {{sourceId}}. That number is what every recording, event, rule, zone and home-automation export of “{{source}}” is filed under, so all of it follows the number to the new hardware and keeps working. “{{source}}” is switched off and handed number {{targetId}} in exchange. This swaps two device identities and cannot be undone from here.`,confirmAction:`Migrate`,failed:`Migration failed: {{error}}`,swapped:`The replacement now answers on number {{inheritedId}}; the old camera was handed number {{retiredId}}.`,quiet:`Every function on the replaced camera was switched off — the old hardware is quiet.`,stillLive:`The replaced camera could not be reached, so these functions are STILL RUNNING on the old hardware. Nothing here failed to migrate — but until you unplug it or reach it physically, it can still produce data.`,neverOffered:`The replaced camera never offered these, so there was nothing to switch off. They are not running.`},locations:{filter:{searchPlaceholder:`Search by name…`,typesLabel:`Filter by type`,clear:`Clear filters`,noMatch:`No device matches this filter.`},unassigned:{searchLabel:`Search devices not in a room`},room:{searchLabel:`Search devices in {{room}}`},columns:{device:`Device`,type:`Type`,status:`Status`,noSort:`Accessories follow their parent — this list keeps its order.`}},deviceDisplay:{title:`Display`,icon:`Icon`,label:`Label`,unit:`Unit`,precision:`Precision`,precisionInherit:`inherit`,hidden:`Hidden`,hideFromLists:`Hide from device lists`,unitSource:`Source{{unit}}`,inherited:`Default ({{name}})`,inheritedContainer:`Default (the primary child's icon)`,pickIcon:`Change the icon of {{name}}`,iconFor:`Icon for {{name}}`,iconSearchPlaceholder:`Search icons`,iconNoMatches:`No icon matches that`,iconGroupDevice:`Devices`,iconGroupLighting:`Lights and climate`,iconGroupSensing:`Sensors and weather`,iconGroupPlace:`Rooms and places`,iconGroupLife:`Vehicles, animals and people`,closePicker:`Close icon picker`,setRoleDefault:`Set as default for all {{role}} sensors`,setRoleDefaultTitle:`Apply this unit / precision / icon as the default for every {{role}} sensor`,inheritedRoleDefault:`Default ({{icon}} — the {{role}} role default)`},modelLicenses:{title:`Models and licenses`,subtitle:`Every model CamStack can download, and the terms it comes under. Also in the`,docs:`documentation`,attributions:`Required attributions`,search:`Search model, upstream or licence`,restrictedOnly:`Restricted only`,default:`default`,hidden:`hidden`,colModel:`Model`,colUpstream:`Upstream`,colWeights:`Weights licence`,colCode:`Code`,colData:`Training data`,colChanged:`CamStack changed`,colHosted:`Hosted by`,customModels:`Model Studio's Scrypted and Frigate catalogs are listed above. A model you upload, convert or pull from your own Frigate+ account keeps its author's licence; CamStack does not record it.`,step:{"object-detection":`Object detection`,"package-detection":`Package detection`,"face-detection":`Face detection`,"face-embedding":`Face recognition`,"plate-detection":`Licence plate detection`,"plate-ocr":`Licence plate reading`,"animal-classifier":`Animal classifier`,"bird-classifier":`Bird classifier`,"vehicle-classifier":`Vehicle classifier`,"clip-embedding":`Semantic search — image encoders`,"clip-text":`Semantic search — text encoders`,segmentation:`Segmentation`,"instance-segmentation":`Instance segmentation`,"audio-classifier":`Audio`,llm:`Language and vision-language models`,"model-studio":`Model Studio catalogs — imported on request`}},customize:{loadingDevice:`Loading the device…`,deviceUnreadable:`The device could not be read`,noSuchDevice:`No device {{deviceId}} exists.`,composerAbsent:`The composer is not running on this hub: customizations are stored, but nothing computes them.`,status:{pending:`Reading this device's customization…`,unknownTitle:`The customization could not be read`,notLoaded:`Customizations are not loaded yet: {{reason}}`,off:`Off`,composerUnreachable:`The composer did not answer: {{reason}}`},blockStatus:{stopped:`Stopped`,starting:`Starting`,running:`Customization active`,degraded:`Degraded`,failed:`Failed`},remove:{button:`Remove customization`,title:`Remove this customization?`,message:`Every added function is removed and every replaced field goes back to the integration's own value, exactly as before.`,confirm:`Remove`},composed:{body:`This device is composed: every field comes from its composition.`,edit:`Edit its composition`},identity:{title:`Identity`,role:`Role`,noRole:`— none —`,name:`Name`,room:`Room`,hidden:`Hidden`},picker:{search:`Search a device`,loadingDevices:`Loading devices…`,devicesFailed:`The devices could not be listed`,loadingFields:`Reading this device's fields…`,fieldsFailed:`This device's fields could not be read`,valuesFailed:`Live values could not be read: {{reason}}`,fields:`Fields`,hidden_one:`{{count}} field is not {{kind}} and cannot be used here`,hidden_other:`{{count}} fields are not {{kind}} and cannot be used here`,cancel:`Cancel`},kinds:{number:`a number`,string:`text`,boolean:`true/false`,enum:`one of a list`},doorbell:{title:`Doorbell`,add:`+ Add source`,active:`Active`,pickTitle:`Add doorbell source`,removeWhat:`The doorbell source {{name}}`,otherFormula:`Composed by another formula — edit it in Advanced`},motion:{title:`Motion`,add:`+ Add sensor`,pickTitle:`Add motion sensor`,camera:`Camera motion`,cameraState:{always:`always included`,"when-confirmed":`only when confirmed`,never:`replaced`,passes:`passes through`},mode:{"in-addition":`In addition`,confirm:`Confirm`,replace:`Replace`},modeFor:`Mode of {{name}}`,reading:`Reading the attached sensors…`,unreadable:`The attached sensors could not be read: {{reason}}`,notForwarded:{"onboard-not-listed":`Sensors are not forwarded: its detection does not list its onboard motion. The camera's own motion passes through.`,"no-active-detection":`Sensors are not forwarded: it has no active detection. The camera's own motion passes through.`},notEnforced:`This camera's provider does not support Confirm and Replace yet: the camera's own motion passes through until it is updated`,state:{offline:`offline`,missing:`not found`,unsupported:`cannot drive motion`,unreadable:`could not be read`},removeWhat:`The sensor {{name}}`,olderOrchestrator:`This camera's orchestrator is older than sensor modes: update it to change the attached sensors`,refetchFailed:`The attached sensors could not be re-read after the change: reload to edit them again`,cameraLevelUnknown:`Unknown: the orchestrator has not heard the camera itself since it started, or is older than this view`,cameraLevelOwn:`The camera's own motion, as it last said it ({{at}}) — not what the sensors make of it`,tooMany:`A camera takes at most {{max}} sensors`},assign:{search:`Search a device`,filtersLabel:`Filter by kind`,loadingDevices:`Loading devices…`,devicesFailed:`The devices could not be listed`,noCompatible:`No compatible device`,showMore_one:`Show {{count}} more`,showMore_other:`Show {{count}} more`,cancel:`Cancel`,addCount_one:`Add {{count}}`,addCount_other:`Add {{count}}`,add:`Add`,change:`change`,stepDevice:`1 · Device`,stepField:`2 · Field`,stepDetails:`3 · Name`,filters:{motion:`Motion & presence`,contact:`Contacts`,all:`All compatible`},value:{active:`active`,inactive:`inactive`,open:`open`,closed:`closed`},checking:`Checking…`,unknown:`Could not be checked: {{reason}}`,removeNamed:`Remove {{name}}`,none:`None`,missingKept:`Device not found — kept until you remove it`,devicesUnreadable:`The devices could not be listed: {{reason}}`,native:`Native`,replaces:`replaces`,adds:`added`,pickUnusable:`This field cannot be used here`,removeConfirm:{title:`Remove this?`,message:`{{what}} will be removed.`,last:`It is the last function of this customization: the whole customization is removed, and every field goes back to its integration's own value.`,confirm:`Remove`}},saveInFlight:`Another change is still being saved — try again in a moment`,battery:{title:`Battery`,native:`Native battery`,replace:`Replace with another field`,add:`+ Add battery`,otherFormula:`Composed by another formula — edit it in Advanced`,removeWhat:`The battery from {{name}}`,nativeReplaced:`Native · replaced`},numericTransforms:{title:`Numeric transforms`,blurb:`Publishes a converted or inverted value to every consumer (export, rules, history). Display unit and precision stay on Overview.`,publishUnit:`Publish as unit`,fromUnit:`Native unit: {{unit}}`,fromUnknown:`Native unit not known yet`,toUnit:`Target unit`,pickUnit:`Choose unit…`,applyConvert:`Publish converted value`,clearConvert:`Remove unit convert`,convertRefused:`Those units cannot be converted`,invert:`Invert`,invertBlurb:`Negate the device's own boolean so active and inactive swap.`,applyInvert:`Invert value`,clearInvert:`Remove invert`,invertRefused:`This device cannot be inverted`,script:`Script`,scriptBlurb:`Expression over v (the native value). Clears a plain unit convert when published (v1).`,applyScript:`Publish script`,clearScript:`Remove script`,preview:`{{source}} → {{result}}`,previewWaiting:`Waiting for the live value…`,previewError:`Preview: {{reason}}`,previewRuntimeOnly:`This expression only runs on the composer`},consumables:{title:`Consumables`,add:`+ Add consumable`,pickTitle:`Add consumable`,name:`Name`,unit:`Unit`,units:{percent:`%`,days:`days`,hours:`hours`,cycles:`cycles`},removeWhat:`The consumable {{name}}`,otherFormula:`Composed by another formula — edit it in Advanced`,takenBy:`An item with this name exists: {{name}}`,keyless:`The name needs at least one letter or digit`,outOfRange:`Not added: the field reads {{value}}, outside the unit's range (% is 0–100, a count is 0 or more) — pick another field or unit`},linked:{title:`Linked devices`,add:`+ Link`,pickTitle:`Link devices`,device:`Device`,type:`Type`,controls:`Controls with the camera`,controlsAlways:`Every linked device's controls show with the camera`,yes:`Yes`,tracked:`Tracked events`,trackFor:`Track events of {{name}}`,health:{missing:`not found`,foreign:`not readable by its owner`,unavailable:`not a valid link now`},removeWhat:`The link to {{name}}`,notLinked:`no longer linked — still tracked`},changes:{title:`What changes on the device`,reading:`Reading this device's fields…`,unknown:`What changes could not be listed: {{reason}}`,origin:{added:`added · from {{from}}`,replaced:`replaced · from {{from}}`},motion:{camera:`camera`,"in-addition":`{{name}}`,confirm:`confirm {{name}}`,replace:`replace {{name}}`},value:{stale:`stale: {{reason}}`,unavailable:`unavailable: {{reason}}`,unknown:`unknown: {{reason}}`},noRows:`Stored, but it changes no field yet.`,kind:{added:`added`,replaced:`replaced`},originUnread:{pending:`{{kind}} · reading the source names…`,unknown:`{{kind}} · the source names could not be read: {{reason}}`}},advancedLink:`Advanced — expression editor`},compositionEditor:{now:`the time of this evaluation (ms)`,builtins:{min:`smallest number`,max:`largest number`,abs:`absolute value`,floor:`round down`,ceil:`round up`,sqrt:`square root`,round:`round to digits`,pow:`x to the power y`,clamp:`keep x between lo and hi`,avg:`average, ignores nulls`,sum:`sum`,coalesce:`first value that is not null`,age:`ms since ts`,convert:`convert between units of one kind`,any:`true if one is true`,all:`true if all are true`,within:`true if ts is at most ms ago`,number:`a number from a number or numeric text, else null`,latest:`the most recent timestamp`,rose:`time of the last rise of a level (has memory)`,count:`how many times x advanced (has memory)`},pageTitle:`Composed device`,loading:`Loading the composition…`,loadFailed:`The composition could not be read`,notFound:`No composition {{blockId}}.`,notComposition:`This block is not a composition.`,customizationUnknownDevice:`This is the customization of a device the composer has not reported yet.`,openOnDevice:`Open it on the device page`,existingTarget:`Customization of {{name}}: add functions or replace single fields; the rest stays its integration's.`,name:`Name`,required:`required`,takeFrom:`Take from…`,formula:`Formula`,formulaFor:`Formula for {{path}}`,clear:`Clear`,addSource:`+ Add source`,copyFeature:`Copy the whole feature from…`,replaces:`replaces`,replaceIn:`Replace a field of {{cap}}`,removeFeature:`Remove {{cap}}`,suggestions:`Suggestions`,save:`Save`,cancel:`Cancel`,steps:{target:`1 · Target`,features:`2 · Features`,fieldsOf:`3 · Fields — {{cap}}`,verify:`4 · Verify and save`},verify:{checking:`Checking with the server…`,ok:`✓ No problems: types, sources, cycles and ownership all check out.`,unknown:`Could not check: {{reason}}`},preview:{label:`Live preview`,waiting:`waiting for {{sources}}`,runtimeOnly:`evaluated by the composer (this formula has memory)`,devicesFailed:`the device list could not be read: {{reason}}`,unknownDevice:`no device is registered for {{sources}}`},reading:`Reading this device's fields…`,checking:`Checking what this device can be given…`,unknown:`Some functions could not be checked: {{reason}}`,added:`+ added`,targetType:`Type`,templates:{label:`Start from`,room:`Room`,"converted-sensor":`Converted sensor`,"derived-binary":`Derived binary`},openComposedDevice:`Open composed device #{{id}}`},notificationRules:{groups:{system:`System events`,class:`Detections`,zones:`Zones`,label:`Faces, plates & labels`,quality:`Quality`,scope:`Only while`,device:`Device event`,package:`Package`,occupancy:`Occupancy`,audio:`Sound`,schedule:`Schedule`},labels:{classes:`Object classes`,zones:`Zones`,faces:`Known faces`,labels:`Labels`,crossing:`Zone crossing`,source:`Detection source`,add:`Add a label…`},crossing:{enter:`Entering`,exit:`Leaving`,any:`Entering or leaving`,hint:`Which way the subject crosses the zone.`},zones:{group:`Zones`,noCameras:`This rule covers no camera, so it has no zones.`},faces:{group:`Known faces`,anyKnown:`Any known face — nobody in particular`},scene:{hint:`Only fire while a scene is matched or diverged.`,noGate:`— no scene gate —`,none:`No scenes yet — create one on the Scenes page.`,onlyWhile:`Only while it is`,read:`Read`,readOwn:`The scene's own setting`,rightNow:`Right now:`,missing:`This scene no longer exists — pick another or remove the gate.`},snooze:{title:`Silence this rule for {{minutes}} minutes`,failed:`The snooze could not be changed.`,aria:`snooze {{name}}`},delete:{confirm:`Delete this rule?`,message:`This will permanently delete "{{name}}". This action cannot be undone.`,aria:`delete {{name}}`},columns:{snooze:`Snooze`},devices:{compatLoading:`Checking which devices this rule's kind can use…`,compatFailed:`Couldn't check which devices this rule's kind can use — every device is listed. The hub still refuses an incompatible one on save.`},media:{sensorOneSnapshot:`A sensor rule attaches one snapshot of the camera automatically — there is no detection to choose a crop, a GIF or a clip around.`},status:{grouped:{unknown:`Open windows unknown — {{reason}}`,none:`No window open`,windows_one:`{{count}} open window`,windows_other:`{{count}} open windows`,waiting:`{{count}} waiting`,windowLine:`{{camera}} · {{members}} in the window · {{pending}} waiting · closes within {{seconds}} s`}},grouping:{choice:`Immediate, grouped`,seconds:`Group for (seconds)`,hint:`Immediate, grouped — waits up to {{n}} s for subjects to be recognised, then sends one message with a mosaic, one picture per subject. Closes earlier when every subject is final.`,plainRecognitionHint:`Fires only if the name is already known when an event is written — choose Immediate, grouped to wait for it.`,scopedHint:`A subject not recognised within {{n}} s is not notified.`,minNote:`At least 5 s: subjects arriving together share one message.`}},ruleScope:{mode:{all:`All`,only:`Only these`,except:`All except these`},which:`Which {{items}}`,items:{devices:`devices`,classes:`classes`,zones:`zones`,faces:`faces`,labels:`labels`},every:{devices:`Every device — no restriction.`,classes:`Every class — no restriction.`,zones:`Every zone — no restriction.`,faces:`Every face — no restriction.`,labels:`Every label — no restriction.`},legacy:`This rule also excludes {{items}} — kept when you save.`,removeExclusions:`Remove exclusions`,cleared:`Saving in this mode clears {{items}} from the rule.`},inlineEdit:{editName:`Edit name`,editLocation:`Edit location`,save:`Save`,cancel:`Cancel`}},wu={nav:{integrations:`Integrazioni`,metrics:`Metriche`,detectionSection:`Detection`,detectionIntelligence:`Persone`,vehicles:`Veicoli`,events:`Libreria`,clusterSection:`Cluster & Server`},system:{title:`Amministrazione`,addons:`Addon`,agents:`Agenti`,processes:`Processi`,logs:`Log`,users:`Utenti`,settings:`Impostazioni`,repl:`REPL`,models:`Modelli`,integrations:`Connettività`,serverManagement:`Server`,systemNav:`Sistema`,modelLicenses:`Modelli e licenze`},common:{save:`Salva`,cancel:`Annulla`,delete:`Elimina`,enable:`Abilita`,disable:`Disabilita`,edit:`Modifica`,add:`Aggiungi`,remove:`Rimuovi`,confirm:`Conferma`,close:`Chiudi`,back:`Indietro`,next:`Avanti`,search:`Cerca`,filter:`Filtra`,reset:`Reimposta`,apply:`Applica`,submit:`Invia`,loading:`Caricamento…`,error:`Errore`,success:`Successo`,warning:`Avviso`,info:`Info`,noData:`Nessun dato disponibile`,noResults:`Nessun risultato trovato`,retry:`Riprova`,refresh:`Aggiorna`,copy:`Copia`,copied:`Copiato!`,yes:`Sì`,no:`No`},connection:{disconnected:`Server non raggiungibile — riconnessione in corso…`,connected:`Connesso`,reconnecting:`Riconnessione in corso…`,degraded:`Connessione live interrotta — l'hub è online (un nodo del cluster potrebbe non rispondere), ripristino in corso…`,degradedNodes_one:`Cluster degradato — il nodo {{nodes}} non risponde. L'hub è online, ripristino del collegamento live…`,degradedNodes_other:`Cluster degradato — i nodi {{nodes}} non rispondono. L'hub è online, ripristino del collegamento live…`,degradedCount_one:`Cluster degradato — {{count}} nodo del cluster offline. L'hub è online, ripristino del collegamento live…`,degradedCount_other:`Cluster degradato — {{count}} nodi del cluster offline. L'hub è online, ripristino del collegamento live…`,sessionExpired:`Sessione scaduta — effettua di nuovo l'accesso.`,signIn:`Accedi`},passkeyPrompt:{message:`Vuoi salvare una passkey per accedere più velocemente?`,enrollNow:`Registra ora`,notNow:`Non ora`},status:{online:`Online`,offline:`Offline`,connecting:`Connessione in corso`,error:`Errore`,disabled:`Disabilitato`,enabled:`Abilitato`,active:`Attivo`,inactive:`Inattivo`,running:`In esecuzione`,stopped:`Fermato`,pending:`In attesa`,unknown:`Sconosciuto`},auth:{login:`Accesso`,logout:`Esci`,username:`Nome utente`,password:`Password`,signIn:`Accedi`,invalidCredentials:`Nome utente o password non validi`},theme:{dark:`Scuro`,light:`Chiaro`,system:`Sistema`},language:{select:`Lingua`,en:`Inglese`,it:`Italiano`},pages:{viewer:{frameTitle:`Viewer CamStack`,underMountTitle:`Il viewer non può essere mostrato attraverso questo relay`,underMountBody:`Questa admin UI è servita sotto {{mount}}. L’app viewer funziona solo all’indirizzo proprio dell’hub — aprila lì, in una nuova scheda.`},integrations:{title:`Integrazioni`,subtitle:`Gestisci le sorgenti video e le connessioni ai provider`},metrics:{title:`Metriche`,subtitle:`Statistiche di prestazioni e utilizzo del sistema`},agents:{title:`Agenti`,subtitle:`Gestisci gli agenti di elaborazione distribuita`},addons:{title:`Addon`,subtitle:`Estendi le funzionalità con moduli addon`},settings:{title:`Impostazioni`,subtitle:`Configura le preferenze di sistema`},users:{title:`Utenti`,subtitle:`Gestisci gli account utente e i permessi`},logs:{title:`Log`,subtitle:`Visualizza i log di sistema e dei dispositivi`}},integrations:{preview:`Anteprima`,snapshotUnavailable:`Snapshot non disponibile`,noSnapshot:`Nessuno snapshot`,lastSnapshot:`Ultimo snapshot:`,offline:`Offline`,active:`Attivi`,available:`Disponibili`,noDevices:`Nessun dispositivo.`,addFirstDevice:`Aggiungi il primo dispositivo per iniziare.`,import:`+ Importa`,noProviders:`Nessun provider disponibile. Installa un addon provider.`,manage:`Gestisci`,integrationName:`Nome integrazione`,integrationNamePlaceholder:`es. Server Garage`,connectionSuccess:`Connessione riuscita!`,errorPrefix:`Errore:`,back:`Indietro`,testing:`Test...`,testConnection:`Test connessione`,forward:`Avanti`,searchingDevices:`Ricerca dispositivi in corso...`,foundDevices:`Trovati {{count}} dispositivi. Seleziona quelli da importare.`,noDevicesFound:`Nessun dispositivo trovato.`,skip:`Salta`,importSelected:`Importa selezionati`,newIntegration:`Nuova Integrazione`,configureIntegration:`Configura Integrazione`,importDevices:`Importa Dispositivi`,addDevice:`Aggiungi dispositivo`,name:`Nome`,namePlaceholder:`es. Camera Ingresso`,snapshotUrlOptional:`Snapshot URL (opzionale)`,streamUrls:`Stream URLs`,addStream:`Aggiungi stream`,cancel:`Annulla`,saving:`Salvataggio...`,save:`Salva`,saveAndNew:`Salva e nuova`,test:`Test`,stream:`Stream {{number}}:`,devices:`dispositivi`,rediscover:`Riscopri`,config:`Config`,integrationNotFound:`Integrazione non trovata.`,configComingSoon:`Config coming soon.`,providerConfig:`Provider Config`,editConfig:`Modifica configurazione`,relinkBrokerHelp:`Scegli il broker tramite cui questa integrazione si connette. Selezionando un broker diverso la si ricollega e riavvia l’addon.`,currentBroker:`Broker attuale`,relinkFailed:`Aggiornamento del collegamento al broker non riuscito.`,noBrokerKind:`Questa integrazione dichiara device-adoption ma il manifest dell’addon non ha un brokerKind.`,connectionInconclusive:`Non è stato possibile verificare:`,connectionUntestable:`Questa integrazione non può essere testata prima di essere creata.`},serverManagement:{title:`Gestione server`,subtitle:`Pacchetti radice aggiornabili a runtime per ogni nodo — gli aggiornamenti si installano nella data directory del nodo e si applicano al riavvio con rollback automatico.`,nodeHub:`hub`,nodeAgent:`agent`,nodeOffline:`offline`,lastReportedVersion:`Ultima versione riportata`,nodeRestarting:`Il nodo si sta riavviando per applicare la modifica…`,topologyError:`Impossibile caricare l'elenco dei nodi del cluster — viene mostrato solo il hub.`,checkForUpdate:`Controlla aggiornamenti`,updateTo:`Aggiorna a {{version}}`,rollback:`Ripristina {{version}}`,runningVersion:`Versione in esecuzione`,latestVersion:`Ultima sul registry`,previousVersion:`Precedente (destinazione rollback)`,seedVersion:`Versione seed immagine`,pendingVersion:`In attesa (si applica al riavvio)`,stateUpToDate:`aggiornato`,stateUpdateAvailable:`aggiornamento disponibile`,stateChecking:`controllo…`,stateStaging:`aggiornamento…`,statePending:`riavvio in sospeso`,stateAwaitingConfirmation:`in attesa di conferma`,stateRolledBack:`rollback eseguito (aggiornamento fallito)`,bootDataRoot:`aggiornabile a runtime`,bootWorkspace:`workspace di sviluppo`,bootBaked:`seed dell'immagine`,bakedSeed:`il seed dell'immagine`,lastChecked:`Ultimo controllo: {{when}}`,loadError:`Impossibile caricare lo stato del pacchetto radice del nodo.`,workspaceNote:`Workspace di sviluppo rilevato — gli aggiornamenti runtime sono disabilitati.`,rolledBackDetail:`Aggiornamento a {{from}} fallito, rollback a {{to}}: {{reason}}`,confirmUpdateTitle:`Aggiorna pacchetto radice del nodo`,confirmUpdateBody:`Installa {{pkg}}@{{version}} sul nodo "{{node}}" e riavvialo per applicarlo. La nuova versione parte in prova: se non raggiunge lo stato ready, il nodo torna automaticamente alla versione corrente. Richiede un supervisore che riavvii sempre il processo (restart policy Docker "unless-stopped" o "always"), altrimenti il nodo resta spento dopo essere uscito per applicare l'aggiornamento.`,confirmUpdateAction:`Aggiorna e riavvia`,confirmRollbackTitle:`Ripristina pacchetto radice del nodo`,confirmRollbackBody:`Riavviare il nodo "{{node}}" sulla versione precedente ({{version}})?`,confirmRollbackAction:`Ripristina e riavvia`,restart:`Riavvia`,nodeRuntimeVersion:`Runtime Node.js`,confirmRestartTitle:`Riavvia nodo`,confirmRestartBody:`Riavviare ora il nodo "{{node}}"? Il processo esce e il suo supervisore lo riavvia sulla stessa versione. Le richieste in corso verso questo nodo vengono interrotte.`,confirmRestartAction:`Riavvia`,updateAll:`Aggiorna tutti i nodi`,updateAllHint:`In sequenza: prima gli agent, l'hub per ultimo — i nodi già aggiornati vengono saltati.`,confirmUpdateAllTitle:`Aggiorna tutti i nodi`,confirmUpdateAllBody:`Aggiorna in sequenza ogni nodo online all'ultima versione pubblicata — prima gli agent, l'hub per ultimo. Ogni nodo installa il suo pacchetto radice (solo se più recente di quello in esecuzione) e riparte in prova con rollback automatico; i nodi già aggiornati vengono saltati. L'hub riparte per ultimo, quindi questa pagina si riconnetterà successivamente.`,confirmUpdateAllAction:`Aggiorna tutti e riavvia`,awaitingConfirmationWarning:`Questo nodo è ripartito su {{version}} e sta confermando lo stato di boot — evita di riavviarlo ora. Aggiornamento e rollback sono temporaneamente non disponibili finché il boot in prova non viene confermato; un riavvio manuale in questa finestra causerebbe il rollback automatico dell'aggiornamento.`,stateCorruptWarning:`Il file di stato server-root su questo nodo è corrotto — il nodo è partito dal seed dell'immagine e le versioni installate nella data directory vengono ignorate. Applicare un aggiornamento riscriverà il file di stato.`,phase2Note:`Fase 2: l'aggiornamento riguarda solo il processo principale di ciascun nodo (hub + agent docker) — i runner degli addon restano sull'overlay /data/framework e l'agent Electron resta legato al bundle fino alle fasi successive. Non assumere coerenza dell'intero stack da un singolo Update.`},ai:{addProfile:`Aggiungi profilo`,attachSnapshot:`Snapshot telecamera`,attachTrack:`Traccia recente`,chatEmpty:`Scegli un profilo, allega se vuoi uno snapshot di una telecamera o una traccia recente, e invia un messaggio. Niente di tutto questo viene salvato.`,chatFailed:`La chiamata di test è fallita`,chooseKind:`Scegli un tipo di profilo`,clearChat:`Pulisci`,colAvgMs:`ms medi`,colCalls:`Chiamate`,colConsumer:`Consumatore`,colDay:`Giorno`,colDisk:`Su disco`,colError:`Errore`,colKind:`Tipo`,colModel:`Modello`,colNode:`Nodo`,colOkErr:`OK / err`,colOn:`Attivo`,colProfile:`Profilo`,colState:`Stato`,colTokens:`Token in / out`,colVision:`Vision`,createProfile:`Crea profilo`,defaultDisabled:`Questo profilo predefinito è disabilitato — i chiamanti non risolvono alcun profilo.`,defaultMissing:`Questo predefinito indica un profilo che non esiste più.`,defaultText:`Profilo testo predefinito`,defaultVision:`Profilo vision predefinito`,editProfile:`Modifica {{name}}`,lastDays:`Ultimi {{days}} giorni`,loadFailed:`Impossibile caricare i profili`,message:`Messaggio`,messagePlaceholder:`Chiedi qualcosa al modello…`,model:`Modello`,name:`Nome`,newProfile:`Nuovo profilo {{kind}}`,noCameras:`Nessuna telecamera trovata.`,noEnabledProfiles:`Nessun profilo abilitato. Aggiungine uno nella scheda Profili.`,noKinds:`Nessun provider AI installato.`,noProfiles:`Nessun profilo AI. Premi "Aggiungi profilo" per configurarne uno.`,noRuntimes:`Nessun nodo espone la capability llm-runtime.`,noTracks:`Nessuna traccia nelle ultime 6 ore.`,noUsage:`Nessuna chiamata AI in questo intervallo.`,none:`Nessuno`,notVision:`Questo profilo non supporta la vision — un'immagine allegata verrà rifiutata prima di leggere qualsiasi cosa.`,pickModelFirst:`scegli un modello`,appleNode:`Mac su cui gira`,appleAsking:`Interrogo i nodi…`,appleHint:`Per ora solo testo: titoli e riassunti delle notifiche. Apple rifiuta le richieste formulate come sorveglianza; in quel caso risponde il profilo successivo della catena.`,pickAppleNodeFirst:`scegli un Mac`,colApple:`Apple on-device`,appleAvailable:`disponibile`,appleUnknown:`sconosciuto`,appleNotMac:`non è un Mac`,appleNotEligible:`non idoneo`,appleIntelligenceOff:`Apple Intelligence disattivata`,appleModelNotReady:`modello in download`,appleOsTooOld:`macOS troppo vecchio`,appleHelperMissing:`helper mancante`,appleHelperCrashed:`helper andato in crash`,profile:`Profilo`,profilesSubtitle:`Una riga = un endpoint di modello utilizzabile. I predefiniti qui sotto decidono chi risponde quando una funzione non nomina alcun profilo.`,profilesTitle:`Profili AI`,ready:`pronto`,runtimeNode:`Nodo di esecuzione`,runtimesFailed:`Impossibile leggere i nodi di esecuzione`,runtimesSubtitle:`Nodi che espongono la capability llm-runtime: cosa ha caricato ciascuno, cosa sta scaricando e quanti dati di modello occupa su disco.`,runtimesTitle:`Runtime gestiti`,saveChanges:`Salva modifiche`,saveFailed:`Salvataggio fallito`,secretHint:`Una chiave API salvata non viene mai mostrata. Lasciala com'è per conservarla; digita un nuovo valore per sostituirla.`,selectModel:`Scegli un modello…`,selectProfile:`Scegli un profilo…`,send:`Invia`,snapshotOf:`Snapshot di {{name}}`,stop:`Ferma`,streamNote:`La risposta arriva in streaming mentre il modello la produce. Un modello a freddo può metterci un po' a caricarsi — la riga di stato dice in quale fase si trova.`,systemPlaceholder:`Rispondi con una frase breve.`,systemPrompt:`System prompt (opzionale)`,tabProfiles:`Profili`,tabRuntimes:`Runtime`,tabTest:`Test`,tabUsage:`Utilizzo`,test:`Prova`,testSubtitle:`Una conversazione usa e getta con un solo profilo. Allega uno snapshot dal vivo o una traccia recente per verificare che il modello sappia davvero leggere un'immagine. Non viene salvato nulla — solo la riga di utilizzo.`,testTitle:`Chat di test`,trackOf:`{{class}} su {{name}}`,unreachable:`irraggiungibile`,usageFailed:`Impossibile leggere l'utilizzo`,usageSubtitle:`Aggregato lato server per giorno, consumatore e profilo — mai le singole chiamate. Gli errori sono contati, così un profilo che fallisce sempre è visibile qui prima che una funzione lo segnali.`,usageTitle:`Utilizzo`,vision:`vision`,window:`Intervallo`},logging:{levels:{title:`Livelli`,subtitle:`Cluster → nodo, vince il più specifico. La soglia filtra ciò che arriva alle destinazioni; il visualizzatore in memoria conserva comunque ogni riga.`,scope:`Ambito`,cluster:`Cluster`,effective:`In vigore qui`,fromDefault:`non è impostato nulla da nessuna parte — questo è il valore predefinito`,fromLayer:`deciso dal livello {{source}}`,notPersisted:`Impossibile leggere o scrivere le impostazioni — quanto vedi è attivo ora, ma non sopravvivrebbe a un riavvio.`,inForce:`in vigore`,inherits:`eredita — nulla impostato a questo livello`,setHere:`impostato qui: {{level}}`,clear:`Azzera`,componentNote:`Un livello per componente è previsto e non ancora risolvibile — nulla in questa pagina eredita da uno.`},diagnostics:{title:`Diagnostica`,subtitle:`Le diagnostiche si armano per una finestra, non si accendono. Ognuna porta una scadenza e scade da sola — una lasciata accesa è essa stessa un incidente.`,expiresIn:`scade tra {{left}}`,disarmed:`disarmata`,notPersisted:`non persistita — non sopravvive a un riavvio`,disarm:`Disarma`}},clusterLoad:{sourceNote:"Ricavato dall'evento `metrics.node-processes-snapshot` che questo nodo emette già a cadenza fissa — questa pagina non aggiunge campionamenti propri. Viene riletto attraverso `metricsProvider.getLoadSeries`, l'UNICO lettore su entrambi i livelli di ritenzione: il nodo conserva in memoria i suoi ultimi 180 snapshot, l'hub conserva su disco la ritenzione decisa dall'operatore.",durableYes:`Il livello durevole ha risposto: questa finestra sopravvive alla chiusura della pagina E al riavvio del nodo.`,durableNo:`Il livello durevole NON ha risposto — questa finestra è il solo anello in memoria (circa un'ora) e un riavvio del nodo la azzera.`,windowSince:`Mostrato da {{since}}.`,reduced:`{{samples}} campioni grezzi, ridotti a un punto ogni {{bucket}}s. Un punto porta il MASSIMO del suo intervallo, mai una media — una media spalmerebbe via il picco che questo grafico esiste per trovare.`,unreduced:`{{samples}} campioni grezzi, un punto ciascuno.`,noThreadSplit:`Nessuna ripartizione CPU per thread su questo nodo — /proc/<pid>/task esiste solo su Linux, e il primo campione dopo un riavvio non ha una finestra da misurare. La CPU qui sotto ripiega sulla MEDIA di vita di ps, che non è una velocità.`,loadingRetained:`Lettura della serie conservata da questo nodo…`,waitingFirstSample:`Nessun campione conservato per questo nodo — in attesa del prossimo snapshot. Al grafico ne servono due per disegnare una velocità.`,bucketRoot:`Supervisore del nodo`,bucketUnattributed:`Processi non attribuiti`,processCount:`{{count}} process(i)`,cpuTitle:`CPU % di un core`,cpuTitleLifetime:`CPU % (media di vita ps)`,seriesMain:`Thread principali`,seriesGc:`GC / helper V8`,cpuUnavailable:`Nessuna ripartizione per thread su questo nodo. Media di vita: {{avg}}%`,memoryTitle:`Memoria RSS`,memoryUnavailable:`Ancora nessun campione di memoria.`},cameraAttribution:{title:`Carico per telecamera — cosa è attribuibile`,intro:`Questa tabella è il cancello dei grafici qui sopra, non una nota a piè di pagina: una famiglia viene disegnata per telecamera solo quando è davvero misurata E leggibile oggi. La detection gira su un pool condiviso da tutte le telecamere e può solo essere contata, mai misurata — viene mostrata come un unico totale condiviso e mai divisa. Lo streaming è per telecamera per costruzione e resta illeggibile, perché solo una sorgente basata su ffmpeg genera un figlio. Un grafico di un numero che il sistema non sa attribuire è peggio di nessun grafico.`,measured:`Misurabile per telecamera`,accounted:`Solo contabilizzabile (pool condiviso)`,unattributable:`Non attribuibile`,colFamily:`Carico`,colAttribution:`Attribuzione`,colUnit:`Unità di lavoro`,colChartable:`Graficabile oggi`,colMissing:`Cosa manca`,unitNotSortable:`Nessun ordinamento sensato — la cella descrive un meccanismo, non un valore.`,missingNotSortable:`Nessun ordinamento sensato — la cella è una spiegazione, non un valore.`,evidence:`Prove ({{count}})`},cameraLoad:{title:`Carico per telecamera — misurato, su questo nodo`,intro:"Ogni addon dichiara il PROPRIO costo attraverso la capability `load-contribution` — al recorder non serve che qualcuno gli dica quale telecamera serve il suo ffmpeg: l'ha generato lui. Qui nessuno unisce un pid a una telecamera. Vengono disegnate solo le famiglie misurate E leggibili oggi ({{roles}}); le altre sono nominate qui sotto invece che stimate.",windowNote:`La CPU è un DELTA dei contatori cumulativi, sulla stessa cadenza fissa con cui il nodo emette già il suo snapshot dei processi — questo pannello non aggiunge campionamenti e non legge nulla mentre è chiuso. I contributi non vengono conservati da nessuna parte, quindi a differenza dei grafici per addon qui sopra questa finestra parte quando apri il pannello.`,windowSince:`Differenze da {{since}} ({{count}} finestre).`,readFailed:`Impossibile leggere i contributi di carico: {{error}}. È una lettura fallita, NON un cluster inattivo.`,loading:`Lettura di ciò che gli addon dichiarano…`,waitingWindow:`Ancora nessuna finestra per telecamera. Una velocità ha bisogno di due letture, e la seconda arriva col prossimo snapshot dei processi. Un nodo che non esegue alcun figlio di decode, transcode o registrazione resta vuoto — ed è la verità, non un guasto.`,deviceLabel:`Telecamera {{deviceId}}`,unitCount:`{{count}} unità: {{roles}}`,cpuTitle:`CPU % di un core (delta)`,cpuUnavailable:`Ancora nessuna finestra misurabile — finora ogni finestra conteneva un'unità che è partita, si è fermata o non ha riportato un contatore.`,memoryTitle:`Memoria RSS`,memoryUnavailable:`Nessuna memoria riportata per questa telecamera.`,coverage:`Gli addon rivendicano {{claimed}} dei {{observed}} processi camstack che questo nodo riporta.`,coverageUnknown:`Nessuno snapshot dei processi da questo nodo, quindi non si può dire nulla su ciò che non è rivendicato. È diverso da «tutto è rivendicato».`,noUnclaimed:`Nulla è non rivendicato su questo nodo.`,unclaimed:`{{count}} process(i) che nessuno rivendica, con {{rss}} occupati. O una perdita o una famiglia di costo che nessuno ha insegnato a dichiararsi — restano nel loro secchio e non vengono mai ripiegati su una telecamera. La loro CPU è sconosciuta: l'osservatore misura la RSS e non riporta secondi di CPU cumulativi.`,sharedTitle:`Condiviso — dichiarato come non appartenente ad alcuna telecamera`,sharedNote:`Riportato perché il costo condiviso sia visibile come condiviso invece che invisibile. NON viene diviso fra le telecamere presenti: il pool di inferenza è un processo solo che le serve tutte, e una quota ripartita è una stima, non una misura. Questi totali sono cumulativi dall'avvio di ciascuna unità — non una velocità.`,sharedRow:`{{roles}} — {{units}} unità, {{cpu}} secondi di CPU, {{rss}}`,refusedTitle:`Dichiarato per telecamera, e comunque non disegnato`,refusedRow:`— {{count}} voci da {{addons}}. {{reason}}`},deviceMigrate:{title:`Migra verso…`,subtitle:`Sostituisci questa telecamera con un altro dispositivo già adottato. La nuova telecamera eredita il numero {{deviceId}}, così registrazioni, regole e integrazioni la seguono.`,pickerLabel:`Telecamera sostitutiva`,pickerPlaceholder:`Scegli una telecamera…`,pickerPending:`Lettura del parco dispositivi…`,noTargets:`Nessun'altra telecamera è adottata, quindi non c'è nulla verso cui migrare.`,action:`Migra`,running:`Migrazione in corso…`,confirmTitle:`Sostituire “{{source}}” con “{{target}}”?`,confirmMessage:`“{{target}}” prende il numero {{sourceId}}. Sotto quel numero sono archiviati tutte le registrazioni, gli eventi, le regole, le zone e le esportazioni verso la domotica di “{{source}}”: tutto segue il numero sul nuovo hardware e continua a funzionare. “{{source}}” viene spenta e riceve in cambio il numero {{targetId}}. Questa operazione scambia due identità di dispositivo e da qui non è annullabile.`,confirmAction:`Migra`,failed:`Migrazione fallita: {{error}}`,swapped:`La sostituta risponde ora sul numero {{inheritedId}}; alla vecchia telecamera è stato assegnato il numero {{retiredId}}.`,quiet:`Tutte le funzioni della telecamera sostituita sono state spente: il vecchio hardware è silenzioso.`,stillLive:`La telecamera sostituita non è stata raggiunta, quindi queste funzioni sono ANCORA ATTIVE sul vecchio hardware. Nulla qui ha impedito la migrazione, ma finché non la scolleghi o non la raggiungi fisicamente può continuare a produrre dati.`,neverOffered:`La telecamera sostituita non ha mai offerto queste funzioni, quindi non c'era nulla da spegnere. Non sono attive.`},locations:{filter:{searchPlaceholder:`Cerca per nome…`,typesLabel:`Filtra per tipo`,clear:`Azzera filtri`,noMatch:`Nessun dispositivo corrisponde a questo filtro.`},unassigned:{searchLabel:`Cerca tra i dispositivi senza stanza`},room:{searchLabel:`Cerca tra i dispositivi in {{room}}`},columns:{device:`Dispositivo`,type:`Tipo`,status:`Stato`,noSort:`Gli accessori seguono il loro dispositivo: questa lista mantiene l'ordine.`}},deviceDisplay:{title:`Aspetto`,icon:`Icona`,label:`Etichetta`,unit:`Unità`,precision:`Precisione`,precisionInherit:`ereditata`,hidden:`Nascosto`,hideFromLists:`Nascondi dagli elenchi dei dispositivi`,unitSource:`Sorgente{{unit}}`,inherited:`Predefinita ({{name}})`,inheritedContainer:`Predefinita (l'icona del figlio principale)`,pickIcon:`Cambia l'icona di {{name}}`,iconFor:`Icona di {{name}}`,iconSearchPlaceholder:`Cerca icone`,iconNoMatches:`Nessuna icona corrisponde`,iconGroupDevice:`Dispositivi`,iconGroupLighting:`Luci e clima`,iconGroupSensing:`Sensori e meteo`,iconGroupPlace:`Stanze e luoghi`,iconGroupLife:`Veicoli, animali e persone`,closePicker:`Chiudi il selettore di icone`,setRoleDefault:`Imposta come predefinito per tutti i sensori {{role}}`,setRoleDefaultTitle:`Applica questa unità / precisione / icona come predefinita per ogni sensore {{role}}`,inheritedRoleDefault:`Predefinita ({{icon}} — il predefinito del ruolo {{role}})`},modelLicenses:{title:`Modelli e licenze`,subtitle:`Ogni modello che CamStack può scaricare, con i termini a cui è soggetto. Anche nella`,docs:`documentazione`,attributions:`Attribuzioni richieste`,search:`Cerca modello, origine o licenza`,restrictedOnly:`Solo con restrizioni`,default:`predefinito`,hidden:`nascosto`,colModel:`Modello`,colUpstream:`Origine`,colWeights:`Licenza dei pesi`,colCode:`Codice`,colData:`Dati di addestramento`,colChanged:`Modifiche di CamStack`,colHosted:`Ospitato da`,customModels:`I cataloghi Scrypted e Frigate di Model Studio sono elencati sopra. Un modello caricato, convertito o preso dal tuo account Frigate+ mantiene la licenza del suo autore; CamStack non la registra.`,step:{"object-detection":`Rilevamento oggetti`,"package-detection":`Rilevamento pacchi`,"face-detection":`Rilevamento volti`,"face-embedding":`Riconoscimento volti`,"plate-detection":`Rilevamento targhe`,"plate-ocr":`Lettura targhe`,"animal-classifier":`Classificatore animali`,"bird-classifier":`Classificatore uccelli`,"vehicle-classifier":`Classificatore veicoli`,"clip-embedding":`Ricerca semantica — encoder immagini`,"clip-text":`Ricerca semantica — encoder testo`,segmentation:`Segmentazione`,"instance-segmentation":`Segmentazione per istanza`,"audio-classifier":`Audio`,llm:`Modelli linguistici e visivo-linguistici`,"model-studio":`Cataloghi di Model Studio — importati su richiesta`}},customize:{loadingDevice:`Caricamento del dispositivo…`,deviceUnreadable:`Impossibile leggere il dispositivo`,noSuchDevice:`Il dispositivo {{deviceId}} non esiste.`,composerAbsent:`Il composer non è in esecuzione su questo hub: le personalizzazioni sono salvate, ma niente le calcola.`,status:{pending:`Lettura della personalizzazione di questo dispositivo…`,unknownTitle:`Impossibile leggere la personalizzazione`,notLoaded:`Le personalizzazioni non sono ancora caricate: {{reason}}`,off:`Spenta`,composerUnreachable:`Il composer non ha risposto: {{reason}}`},blockStatus:{stopped:`Ferma`,starting:`In avvio`,running:`Personalizzazione attiva`,degraded:`Degradata`,failed:`Errore`},remove:{button:`Rimuovi personalizzazione`,title:`Rimuovere questa personalizzazione?`,message:`Ogni funzione aggiunta viene tolta e ogni campo sostituito torna al valore dell'integrazione, esattamente come prima.`,confirm:`Rimuovi`},composed:{body:`Questo dispositivo è composto: ogni campo viene dalla sua composizione.`,edit:`Modifica la composizione`},identity:{title:`Identità`,role:`Ruolo`,noRole:`— nessuno —`,name:`Nome`,room:`Stanza`,hidden:`Nascosto`},picker:{search:`Cerca un dispositivo`,loadingDevices:`Caricamento dei dispositivi…`,devicesFailed:`Impossibile elencare i dispositivi`,loadingFields:`Lettura dei campi del dispositivo…`,fieldsFailed:`Impossibile leggere i campi del dispositivo`,valuesFailed:`Impossibile leggere i valori attuali: {{reason}}`,fields:`Campi`,hidden_one:`{{count}} campo non è {{kind}} e non si può usare qui`,hidden_other:`{{count}} campi non sono {{kind}} e non si possono usare qui`,cancel:`Annulla`},kinds:{number:`un numero`,string:`testo`,boolean:`vero/falso`,enum:`uno di un elenco`},doorbell:{title:`Campanello`,add:`+ Aggiungi sorgente`,active:`Attivo`,pickTitle:`Aggiungi sorgente del campanello`,removeWhat:`La sorgente del campanello {{name}}`,otherFormula:`Composto da un'altra formula — modificalo in Avanzate`},motion:{title:`Movimento`,add:`+ Aggiungi sensore`,pickTitle:`Aggiungi sensore di movimento`,camera:`Movimento della camera`,cameraState:{always:`sempre incluso`,"when-confirmed":`solo se confermato`,never:`sostituito`,passes:`passa invariato`},mode:{"in-addition":`In aggiunta`,confirm:`Conferma`,replace:`Sostituisci`},modeFor:`Modalità di {{name}}`,reading:`Lettura dei sensori collegati…`,unreadable:`Impossibile leggere i sensori collegati: {{reason}}`,notForwarded:{"onboard-not-listed":`I sensori non vengono inoltrati: la sua detection non elenca il movimento della camera. Il movimento della camera passa invariato.`,"no-active-detection":`I sensori non vengono inoltrati: non ha una detection attiva. Il movimento della camera passa invariato.`},notEnforced:`Il provider di questa camera non supporta ancora Conferma e Sostituisci: il movimento della camera passa invariato finché non viene aggiornato`,state:{offline:`offline`,missing:`non trovato`,unsupported:`non può generare movimento`,unreadable:`non leggibile`},removeWhat:`Il sensore {{name}}`,olderOrchestrator:`L'orchestratore di questa camera è più vecchio delle modalità dei sensori: aggiornalo per cambiare i sensori collegati`,refetchFailed:`Non è stato possibile rileggere i sensori collegati dopo la modifica: ricarica per modificarli di nuovo`,cameraLevelUnknown:`Sconosciuto: l'orchestratore non ha sentito la camera stessa da quando è partito, oppure è più vecchio di questa vista`,cameraLevelOwn:`Il movimento della camera stessa, come l'ha detto l'ultima volta ({{at}}) — non quello che ne fanno i sensori`,tooMany:`Una camera accetta al massimo {{max}} sensori`},assign:{search:`Cerca un dispositivo`,filtersLabel:`Filtra per tipo`,loadingDevices:`Caricamento dispositivi…`,devicesFailed:`Impossibile elencare i dispositivi`,noCompatible:`Nessun dispositivo compatibile`,showMore_one:`Mostra altri {{count}}`,showMore_other:`Mostra altri {{count}}`,cancel:`Annulla`,addCount_one:`Aggiungi {{count}}`,addCount_other:`Aggiungi {{count}}`,add:`Aggiungi`,change:`cambia`,stepDevice:`1 · Dispositivo`,stepField:`2 · Campo`,stepDetails:`3 · Come si chiama`,filters:{motion:`Movimento e presenza`,contact:`Contatti`,all:`Tutti i compatibili`},value:{active:`attivo`,inactive:`inattivo`,open:`aperto`,closed:`chiuso`},checking:`Verifica in corso…`,unknown:`Impossibile verificare: {{reason}}`,removeNamed:`Rimuovi {{name}}`,none:`Nessuno`,missingKept:`Dispositivo non trovato — resta finché non lo rimuovi`,devicesUnreadable:`Impossibile elencare i dispositivi: {{reason}}`,native:`Nativo`,replaces:`sostituisce`,adds:`aggiunto`,pickUnusable:`Questo campo non può essere usato qui`,removeConfirm:{title:`Rimuovere?`,message:`{{what}} verrà rimosso.`,last:`È l'ultima funzione di questa personalizzazione: viene rimossa l'intera personalizzazione, e ogni campo torna al valore della sua integrazione.`,confirm:`Rimuovi`}},saveInFlight:`Un'altra modifica è ancora in salvataggio — riprova tra un momento`,battery:{title:`Batteria`,native:`Batteria nativa`,replace:`Sostituisci con un altro campo`,add:`+ Aggiungi batteria`,otherFormula:`Composta da un'altra formula — modificala in Avanzate`,removeWhat:`La batteria da {{name}}`,nativeReplaced:`Nativa · sostituita`},numericTransforms:{title:`Trasformazioni numeriche`,blurb:`Pubblica un valore convertito o invertito per ogni consumatore (export, regole, cronologia). Unità e precisione di visualizzazione restano in Panoramica.`,publishUnit:`Pubblica come unità`,fromUnit:`Unità nativa: {{unit}}`,fromUnknown:`Unità nativa non ancora nota`,toUnit:`Unità di destinazione`,pickUnit:`Scegli unità…`,applyConvert:`Pubblica valore convertito`,clearConvert:`Rimuovi conversione unità`,convertRefused:`Queste unità non si possono convertire`,invert:`Inverti`,invertBlurb:`Nega il booleano del dispositivo così attivo e inattivo si scambiano.`,applyInvert:`Inverti valore`,clearInvert:`Rimuovi inversione`,invertRefused:`Questo dispositivo non si può invertire`,script:`Script`,scriptBlurb:`Espressione su v (il valore nativo). Pubblicarla cancella una conversione unità semplice (v1).`,applyScript:`Pubblica script`,clearScript:`Rimuovi script`,preview:`{{source}} → {{result}}`,previewWaiting:`In attesa del valore live…`,previewError:`Preview: {{reason}}`,previewRuntimeOnly:`Questa espressione gira solo sul composer`},consumables:{title:`Consumabili`,add:`+ Aggiungi consumabile`,pickTitle:`Aggiungi consumabile`,name:`Nome`,unit:`Unità`,units:{percent:`%`,days:`giorni`,hours:`ore`,cycles:`cicli`},removeWhat:`Il consumabile {{name}}`,otherFormula:`Composto da un'altra formula — modificalo in Avanzate`,takenBy:`Esiste già una voce con questo nome: {{name}}`,keyless:`Il nome deve contenere almeno una lettera o una cifra`,outOfRange:`Non aggiunto: il campo vale {{value}}, fuori dall'intervallo dell'unità (% va da 0 a 100, un conteggio da 0 in su) — scegli un altro campo o unità`},linked:{title:`Dispositivi collegati`,add:`+ Collega`,pickTitle:`Collega dispositivi`,device:`Dispositivo`,type:`Tipo`,controls:`Controlli con la camera`,controlsAlways:`I controlli di ogni dispositivo collegato compaiono con la camera`,yes:`Sì`,tracked:`Eventi tracciati`,trackFor:`Traccia eventi di {{name}}`,health:{missing:`non trovato`,foreign:`non leggibile dal suo proprietario`,unavailable:`non è un collegamento valido ora`},removeWhat:`Il collegamento a {{name}}`,notLinked:`non più collegato — ancora tracciato`},changes:{title:`Cosa cambia sul dispositivo`,reading:`Lettura dei campi del dispositivo…`,unknown:`Non si è potuto elencare cosa cambia: {{reason}}`,origin:{added:`aggiunto · da {{from}}`,replaced:`sostituito · da {{from}}`},motion:{camera:`camera`,"in-addition":`{{name}}`,confirm:`conferma {{name}}`,replace:`sostituisce {{name}}`},value:{stale:`non aggiornato: {{reason}}`,unavailable:`non disponibile: {{reason}}`,unknown:`sconosciuto: {{reason}}`},noRows:`Salvata, ma non cambia ancora nessun campo.`,kind:{added:`aggiunto`,replaced:`sostituito`},originUnread:{pending:`{{kind}} · lettura dei nomi delle sorgenti…`,unknown:`{{kind}} · i nomi delle sorgenti non si sono potuti leggere: {{reason}}`}},advancedLink:`Avanzate — editor delle espressioni`},compositionEditor:{now:`l'istante di questa valutazione (ms)`,builtins:{min:`il numero più piccolo`,max:`il numero più grande`,abs:`valore assoluto`,floor:`arrotonda per difetto`,ceil:`arrotonda per eccesso`,sqrt:`radice quadrata`,round:`arrotonda alle cifre`,pow:`x elevato a y`,clamp:`tiene x fra lo e hi`,avg:`media, ignora i null`,sum:`somma`,coalesce:`il primo valore non null`,age:`ms trascorsi da ts`,convert:`converte fra unità dello stesso tipo`,any:`vero se uno è vero`,all:`vero se tutti sono veri`,within:`vero se ts è di al più ms fa`,number:`un numero da un numero o da testo numerico, altrimenti null`,latest:`il timestamp più recente`,rose:`istante dell'ultima salita di un livello (ha memoria)`,count:`quante volte x è avanzato (ha memoria)`},pageTitle:`Dispositivo composto`,loading:`Caricamento della composizione…`,loadFailed:`Impossibile leggere la composizione`,notFound:`Nessuna composizione {{blockId}}.`,notComposition:`Questo blocco non è una composizione.`,customizationUnknownDevice:`È la personalizzazione di un dispositivo che il composer non ha ancora riportato.`,openOnDevice:`Aprila nella pagina del dispositivo`,existingTarget:`Personalizzazione di {{name}}: aggiungi funzioni o sostituisci singoli campi; il resto resta dell'integrazione.`,name:`Nome`,required:`obbligatorio`,takeFrom:`Prendi da…`,formula:`Formula`,formulaFor:`Formula per {{path}}`,clear:`Svuota`,addSource:`+ Aggiungi sorgente`,copyFeature:`Copia l'intera funzione da…`,replaces:`sostituisce`,replaceIn:`Sostituisci un campo di {{cap}}`,removeFeature:`Rimuovi {{cap}}`,suggestions:`Suggerimenti`,save:`Salva`,cancel:`Annulla`,steps:{target:`1 · Destinazione`,features:`2 · Funzioni`,fieldsOf:`3 · Campi — {{cap}}`,verify:`4 · Verifica e salva`},verify:{checking:`Verifica col server…`,ok:`✓ Nessun problema: tipi, sorgenti, cicli e proprietà dei campi sono a posto.`,unknown:`Impossibile verificare: {{reason}}`},preview:{label:`Anteprima dal vivo`,waiting:`in attesa di {{sources}}`,runtimeOnly:`calcolata dal composer (questa formula ha memoria)`,devicesFailed:`impossibile leggere l'elenco dei dispositivi: {{reason}}`,unknownDevice:`nessun dispositivo registrato per {{sources}}`},reading:`Lettura dei campi del dispositivo…`,checking:`Verifica di cosa si può dare a questo dispositivo…`,unknown:`Alcune funzioni non si sono potute verificare: {{reason}}`,added:`+ aggiunta`,targetType:`Tipo`,templates:{label:`Parti da`,room:`Stanza`,"converted-sensor":`Sensore convertito`,"derived-binary":`Binario derivato`},openComposedDevice:`Apri dispositivo composto #{{id}}`},notificationRules:{groups:{system:`Eventi di sistema`,class:`Rilevamenti`,zones:`Zone`,label:`Volti, targhe ed etichette`,quality:`Qualità`,scope:`Solo mentre`,device:`Evento dispositivo`,package:`Pacco`,occupancy:`Occupazione`,audio:`Suono`,schedule:`Orari`},labels:{classes:`Classi di oggetti`,zones:`Zone`,faces:`Volti noti`,labels:`Etichette`,crossing:`Attraversamento zona`,source:`Sorgente del rilevamento`,add:`Aggiungi un'etichetta…`},crossing:{enter:`In entrata`,exit:`In uscita`,any:`In entrata o in uscita`,hint:`In che direzione il soggetto attraversa la zona.`},zones:{group:`Zone`,noCameras:`Questa regola non copre nessuna telecamera, quindi non ha zone.`},faces:{group:`Volti noti`,anyKnown:`Qualsiasi volto noto — nessuno in particolare`},scene:{hint:`Notifica solo mentre una scena corrisponde o è diversa.`,noGate:`— nessun vincolo di scena —`,none:`Nessuna scena — creane una nella pagina Scene.`,onlyWhile:`Solo mentre è`,read:`Leggi`,readOwn:`L'impostazione della scena`,rightNow:`Adesso:`,missing:`Questa scena non esiste più — scegline un'altra o rimuovi il vincolo.`},snooze:{title:`Silenzia questa regola per {{minutes}} minuti`,failed:`Impossibile modificare la pausa.`,aria:`metti in pausa {{name}}`},delete:{confirm:`Eliminare questa regola?`,message:`Questa azione eliminerà definitivamente "{{name}}". Non si può annullare.`,aria:`elimina {{name}}`},columns:{snooze:`Pausa`},devices:{compatLoading:`Verifica dei dispositivi utilizzabili da questo tipo di regola…`,compatFailed:`Impossibile verificare quali dispositivi può usare questo tipo di regola — sono elencati tutti. L'hub rifiuta comunque al salvataggio un dispositivo incompatibile.`},media:{sensorOneSnapshot:`Una regola sensore allega automaticamente un'istantanea della telecamera — non c'è un rilevamento attorno a cui scegliere un ritaglio, una GIF o un clip.`},status:{grouped:{unknown:`Finestre aperte sconosciute — {{reason}}`,none:`Nessuna finestra aperta`,windows_one:`{{count}} finestra aperta`,windows_other:`{{count}} finestre aperte`,waiting:`{{count}} in attesa`,windowLine:`{{camera}} · {{members}} nella finestra · {{pending}} in attesa · si chiude entro {{seconds}} s`}},grouping:{choice:`Immediata raggruppata`,seconds:`Raggruppa per (secondi)`,hint:`Immediata raggruppata — attende fino a {{n}} s che i soggetti vengano riconosciuti e invia un solo messaggio con un mosaico, uno per soggetto. Si chiude prima se tutti sono già definitivi.`,plainRecognitionHint:`Scatta solo se il nome è già noto quando l'evento viene scritto — scegli Immediata raggruppata per attenderlo.`,scopedHint:`Un soggetto non riconosciuto entro {{n}} s non viene notificato.`,minNote:`Almeno 5 s: i soggetti che arrivano insieme condividono un messaggio.`}},ruleScope:{mode:{all:`Tutti`,only:`Solo i selezionati`,except:`Tutti tranne i selezionati`},which:`Quali {{items}}`,items:{devices:`dispositivi`,classes:`classi`,zones:`zone`,faces:`volti`,labels:`etichette`},every:{devices:`Tutti i dispositivi — nessuna restrizione.`,classes:`Tutte le classi — nessuna restrizione.`,zones:`Tutte le zone — nessuna restrizione.`,faces:`Tutti i volti — nessuna restrizione.`,labels:`Tutte le etichette — nessuna restrizione.`},legacy:`Questa regola esclude anche {{items}} — mantenuti al salvataggio.`,removeExclusions:`Rimuovi le esclusioni`,cleared:`Salvando in questa modalità si rimuovono {{items}} dalla regola.`},inlineEdit:{editName:`Modifica nome`,editLocation:`Modifica posizione`,save:`Salva`,cancel:`Annulla`}},Tu=`camstack_language`,Eu=localStorage.getItem(Tu)??`en`;Q.use(zs).init({resources:{en:{translation:Cu},it:{translation:wu}},lng:Eu,fallbackLng:`en`,interpolation:{escapeValue:!1}}),Q.on(`languageChanged`,e=>{localStorage.setItem(Tu,e)}),_(),window.__camstackUiLibrary=dt,window.__camstackSdk=Ct,window.__camstackTypes=It,Nt(document.getElementById(`root`)).render(M(S,{children:M(Su,{})}));export{Wt as _,dl as a,Vt as b,fc as c,Pi as d,mr as f,Gt as g,qt as h,sl as i,qs as l,Hi as m,al as n,ul as o,vr as p,il as r,ll as s,ol as t,ho as u,Ut as v,Ht as y};
|