@camstack/addon-admin-ui 1.2.119 → 1.2.121
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/AddLocationWizard--mkj3ETu.js +1 -0
- package/dist/assets/{AddonCollectionPage-B03rWwOK.js → AddonCollectionPage-CqgSQxQ5.js} +1 -1
- package/dist/assets/Addons-Bf2kB7FO.js +1 -0
- package/dist/assets/{AdminTabs-BhVFfu-V.js → AdminTabs-Bnpekf9L.js} +1 -1
- package/dist/assets/{AiProfiles-CmIRcCjv.js → AiProfiles-Dx9QzfkB.js} +1 -1
- package/dist/assets/{BrokerForm-CGbxdxp0.js → BrokerForm-Cp-QCiwW.js} +1 -1
- package/dist/assets/{Build-Bneqa83Z.js → Build-DK4nAd1G.js} +3 -3
- package/dist/assets/{Capabilities-Bd7XskC7.js → Capabilities-DjmiW556.js} +1 -1
- package/dist/assets/{CapabilityBadges-KMhMCn1k.js → CapabilityBadges-CjczBoDi.js} +1 -1
- package/dist/assets/Cluster-CWDTyv3x.js +11 -0
- package/dist/assets/{Data-Dr3p27zg.js → Data-CC__xt_7.js} +1 -1
- package/dist/assets/{DetectionIntelligence-BziKZgjR.js → DetectionIntelligence-DOLcWM0z.js} +1 -1
- package/dist/assets/{DeviceAggregateSection-CheBdbsr.js → DeviceAggregateSection-CtNus-Z9.js} +1 -1
- package/dist/assets/DeviceDetail-BBK_biJu.js +2 -0
- package/dist/assets/{Devices-BV1t7-g5.js → Devices-C9AhNeGU.js} +1 -1
- package/dist/assets/{EmbedPlayerPage-n4oktMWk.js → EmbedPlayerPage-gbryRNIt.js} +1 -1
- package/dist/assets/Events-zTFK1o8o.js +1 -0
- package/dist/assets/{FormBuilder-D7eVmgZJ.js → FormBuilder-C_1-Y69Y.js} +1 -1
- package/dist/assets/Identity-CVqxKTJo.js +1 -0
- package/dist/assets/{IntegrationDetail-B4uov2Kt.js → IntegrationDetail-CnTI0i1_.js} +1 -1
- package/dist/assets/{Integrations-_7bjpG_5.js → Integrations-1V80f5GH.js} +1 -1
- package/dist/assets/{Integrations-SNPkOFhA.js → Integrations-CWQzB2G-.js} +1 -1
- package/dist/assets/{Logs-pNO26-_g.js → Logs-DAI2eKrC.js} +1 -1
- package/dist/assets/{MotionZonesSettings-DikN9JEQ.js → MotionZonesSettings-Cx8Fgga9.js} +1 -1
- package/dist/assets/{MyAccess-BnULhZgR.js → MyAccess-lmd0GUa4.js} +1 -1
- package/dist/assets/Network-DL7vgvPz.js +1 -0
- package/dist/assets/{NodeAddonsSettingsPanel-DvTRBvQl.js → NodeAddonsSettingsPanel-CF38Xfjd.js} +1 -1
- package/dist/assets/{NodeInferenceDevices-BaRmgURr.js → NodeInferenceDevices-DEeOhTqE.js} +1 -1
- package/dist/assets/{Notifications-DXzfB7Iv.js → Notifications-DyHxI0OV.js} +1 -1
- package/dist/assets/Pipeline-D2AK3bq-.js +1 -0
- package/dist/assets/Plates-FJGFRHwS.js +1 -0
- package/dist/assets/{PrivacyMaskSettings-CZLQzQgv.js → PrivacyMaskSettings--DN9Cj1J.js} +1 -1
- package/dist/assets/{ProviderIcon-aFjOxP4_.js → ProviderIcon-B7xnPSGY.js} +1 -1
- package/dist/assets/Recordings-DuMD9mO7.js +1 -0
- package/dist/assets/{ScanNetworkModal-DFZ9sM0F.js → ScanNetworkModal-BkuLL5Hb.js} +1 -1
- package/dist/assets/{SceneMonitorEditor-BN655weg.js → SceneMonitorEditor-CKZcEP_n.js} +1 -1
- package/dist/assets/{Scenes-C0y2uk0j.js → Scenes-UJ6HwN5-.js} +1 -1
- package/dist/assets/{Settings-DpIKYRlm.js → Settings-Bsfr9POB.js} +1 -1
- package/dist/assets/{Showroom-CWbwspFj.js → Showroom-D134TM7C.js} +1 -1
- package/dist/assets/{Terminal-ykBOga6k.js → Terminal-DaXvlDS6.js} +5 -5
- package/dist/assets/{_virtual_mf-localSharedImportMap___mfe_internal__admin_ui_host-BYhH6kE0.js → _virtual_mf-localSharedImportMap___mfe_internal__admin_ui_host-7GR589xa.js} +1 -1
- package/dist/assets/{bell-ring-CXoCKJnn.js → bell-ring-6mWtb-XF.js} +1 -1
- package/dist/assets/{boxes-Bw4b1Wc1.js → boxes-C5NTL0ET.js} +1 -1
- package/dist/assets/circle-check-big-DADKFm5x.js +1 -0
- package/dist/assets/{circle-x-DDabN2KD.js → circle-x-CFWnmyvU.js} +1 -1
- package/dist/assets/clock-Cl7hHyqW.js +1 -0
- package/dist/assets/{copy-C-EqjmDP.js → copy-tqbIiAtY.js} +1 -1
- package/dist/assets/{debounced-invalidate-Bfd2Qzzn.js → debounced-invalidate-BvbZ9j3z.js} +1 -1
- package/dist/assets/{dist-D_lTK4xz.js → dist-D-XW9v3T.js} +1 -1
- package/dist/assets/dist-DYkLn2xO.js +349 -0
- package/dist/assets/{download-Cuj1maBm.js → download-CBTHh5Td.js} +1 -1
- package/dist/assets/{face-bbox-y-km4dI8.js → face-bbox-DK3crsBr.js} +1 -1
- package/dist/assets/{hostInit-Cym8Rr5d.js → hostInit-uOc4KuW6.js} +1 -1
- package/dist/assets/{index-BTGQKEEA.js → index-D-9Wyuju.js} +3 -3
- package/dist/assets/{key-round-DvhPSBSH.js → key-round-Cp0w9XS6.js} +1 -1
- package/dist/assets/{layers-B7No2bw_.js → layers-R56RBx5J.js} +1 -1
- package/dist/assets/{mf-entry-bootstrap-0-ae9b3119.js → mf-entry-bootstrap-0-3f5d688b.js} +2 -2
- package/dist/assets/{pencil-BJxboIbx.js → pencil-Dppq_R1x.js} +1 -1
- package/dist/assets/play-CRkSis2D.js +1 -0
- package/dist/assets/{player-overlays-RwoCa548.js → player-overlays-MJd9eRlM.js} +1 -1
- package/dist/assets/plus-BgigjkU9.js +1 -0
- package/dist/assets/power-BCS2t-Wx.js +1 -0
- package/dist/assets/{radio-klp_ubdd.js → radio-Den8nSQU.js} +1 -1
- package/dist/assets/{refresh-cw-OR1QZ198.js → refresh-cw-Budztdr-.js} +1 -1
- package/dist/assets/remoteEntry-DdFdvgxU.js +1 -0
- package/dist/assets/rotate-ccw-C_FPsgtu.js +1 -0
- package/dist/assets/rotate-cw-Ci2EV6Gc.js +1 -0
- package/dist/assets/{send-vc4Psyt4.js → send-BZ9zOH2R.js} +1 -1
- package/dist/assets/{server-BXgYajYr.js → server-DhDeuLAj.js} +1 -1
- package/dist/assets/{shield-Y4WSkvsK.js → shield-CDajPz7k.js} +1 -1
- package/dist/assets/square-BVwnxCbL.js +1 -0
- package/dist/assets/{square-check-big-hQzwD37R.js → square-check-big-B9gVi10Z.js} +1 -1
- package/dist/assets/src-0iNMzZ2l.js +349 -0
- package/dist/assets/src-DwTflGqD.js +67 -0
- package/dist/assets/{star-BM5cPk35.js → star-B4ylQ-n9.js} +1 -1
- package/dist/assets/{undo-2-C4NHExfy.js → undo-2-3EmEvFIS.js} +1 -1
- package/dist/assets/use-scenes-feed-julJoDvZ.js +1 -0
- package/dist/assets/useEventInvalidation-DSpypyuO.js +1 -0
- package/dist/assets/{useNodeUrlSelection-DbuPo174.js → useNodeUrlSelection-Dsk2NydD.js} +1 -1
- package/dist/assets/{video-DIbJOXgM.js → video-BlZPfhfO.js} +1 -1
- package/dist/assets/{virtual_mf-REMOTE_ENTRY_ID___mfe_internal__admin_ui_host__remoteEntry-_hash_-DbvhoXKV.js → virtual_mf-REMOTE_ENTRY_ID___mfe_internal__admin_ui_host__remoteEntry-_hash_-CokdarDJ.js} +2 -2
- package/dist/assets/{wifi-CMg5tM5x.js → wifi-obpV41fJ.js} +1 -1
- package/dist/assets/{zap-Dnw48_IY.js → zap-B8NXR1Yj.js} +1 -1
- package/dist/index.html +5 -5
- package/dist/server/addon.js +291 -5
- package/package.json +1 -1
- package/dist/assets/AddLocationWizard-BcscyeiT.js +0 -1
- package/dist/assets/Addons-BDWcu7bj.js +0 -1
- package/dist/assets/Cluster-CS-NJ6OS.js +0 -11
- package/dist/assets/DeviceDetail-Br1qPJ6r.js +0 -2
- package/dist/assets/Events-CkGijCDG.js +0 -1
- package/dist/assets/Identity-Cb2GAD5w.js +0 -1
- package/dist/assets/Network-Bv3jrJ1-.js +0 -1
- package/dist/assets/Pipeline-DCSX_1o6.js +0 -1
- package/dist/assets/Plates-BEU4sAqP.js +0 -1
- package/dist/assets/Recordings-b6zC1cWE.js +0 -1
- package/dist/assets/circle-check-big-D_Kt6W2W.js +0 -1
- package/dist/assets/clock-BeIF3nWG.js +0 -1
- package/dist/assets/dist-D-Tiwsk7.js +0 -349
- package/dist/assets/play-CeohfaKf.js +0 -1
- package/dist/assets/plus-Brv4i72u.js +0 -1
- package/dist/assets/power-DmJawhTF.js +0 -1
- package/dist/assets/remoteEntry-CRo49mol.js +0 -1
- package/dist/assets/rotate-ccw-Dzp5z5a_.js +0 -1
- package/dist/assets/rotate-cw-6dMVo8-E.js +0 -1
- package/dist/assets/square-Dd2LMGtj.js +0 -1
- package/dist/assets/src-CDVm70oc.js +0 -67
- package/dist/assets/src-ijaeX4aR.js +0 -349
- package/dist/assets/use-scenes-feed-BsYnn_Rq.js +0 -1
- package/dist/assets/useEventInvalidation-D4KUD_Rr.js +0 -1
package/dist/server/addon.js
CHANGED
|
@@ -8021,6 +8021,20 @@ var RelocateJobSchema = object({
|
|
|
8021
8021
|
* in its row, not in its name, so `MediaRelocateEngine` never reconciles one.
|
|
8022
8022
|
*/
|
|
8023
8023
|
rowsReconciled: number().int().nonnegative().optional(),
|
|
8024
|
+
/**
|
|
8025
|
+
* Rows this run FORGOT because the file they name is not on disk.
|
|
8026
|
+
*
|
|
8027
|
+
* The mover derived the path from the row's own fields and `stat`ed it; an
|
|
8028
|
+
* ENOENT there is a per-path confirmation that the segment is gone (D296),
|
|
8029
|
+
* and the durable row is dropped through the same channel eviction uses. It
|
|
8030
|
+
* is reported for the same reason `rowsReconciled` is: this is a durable
|
|
8031
|
+
* mutation nobody asked for, and a migration that quietly erases hour rows is
|
|
8032
|
+
* the same failure as one that quietly skips them (D295).
|
|
8033
|
+
*
|
|
8034
|
+
* The production drain of 2026-08-30 would have reported 11 074 here — the
|
|
8035
|
+
* ledger claimed 5.65 GB of footage that no longer existed.
|
|
8036
|
+
*/
|
|
8037
|
+
rowsForgotten: number().int().nonnegative().optional(),
|
|
8024
8038
|
startedAt: number(),
|
|
8025
8039
|
finishedAt: number().nullable(),
|
|
8026
8040
|
error: string().nullable()
|
|
@@ -8384,6 +8398,91 @@ var RelocateResidueSchema = object({
|
|
|
8384
8398
|
segments: number().int().nonnegative(),
|
|
8385
8399
|
bytes: number().int().nonnegative()
|
|
8386
8400
|
}).nullable();
|
|
8401
|
+
/**
|
|
8402
|
+
* Ask one location whether its durable hour rows describe the disk — the walk
|
|
8403
|
+
* (D319).
|
|
8404
|
+
*
|
|
8405
|
+
* `apply` DEFAULTS TO FALSE and that default is the product: the operator's
|
|
8406
|
+
* missing tool is the question, and the dry run is how they sanity-check the
|
|
8407
|
+
* destructive run before authorising it.
|
|
8408
|
+
*/
|
|
8409
|
+
var LedgerWalkInputSchema = object({
|
|
8410
|
+
locationId: string().min(1),
|
|
8411
|
+
/** Forget the confirmed-absent rows, rather than only counting them. */
|
|
8412
|
+
apply: boolean().optional(),
|
|
8413
|
+
/** Narrow to one camera. */
|
|
8414
|
+
deviceId: number().int().positive().optional(),
|
|
8415
|
+
/** Narrow to these recording profiles; empty/absent = every profile. */
|
|
8416
|
+
profiles: array(string().min(1)).optional()
|
|
8417
|
+
});
|
|
8418
|
+
/** Why a whole walk did nothing. Every one leaves the ledger untouched. */
|
|
8419
|
+
var LedgerWalkRefusalSchema = _enum([
|
|
8420
|
+
"location-unknown",
|
|
8421
|
+
"source-writable",
|
|
8422
|
+
"no-ledger",
|
|
8423
|
+
"archive-unreadable",
|
|
8424
|
+
"anchor-absent",
|
|
8425
|
+
"anchor-unreadable",
|
|
8426
|
+
"anchor-moved"
|
|
8427
|
+
]);
|
|
8428
|
+
_enum([
|
|
8429
|
+
"live-tail",
|
|
8430
|
+
"listing-error",
|
|
8431
|
+
"path-mismatch",
|
|
8432
|
+
"durable-refused"
|
|
8433
|
+
]);
|
|
8434
|
+
/** Every skip reason, always present, always a number — so a reason that never
|
|
8435
|
+
* fired reports as zero rather than absent and the report shape is constant
|
|
8436
|
+
* between passes. Spelled out rather than `z.record` for exactly that. */
|
|
8437
|
+
var LedgerWalkSkipCountsSchema = object({
|
|
8438
|
+
"live-tail": number().int().nonnegative(),
|
|
8439
|
+
"listing-error": number().int().nonnegative(),
|
|
8440
|
+
"path-mismatch": number().int().nonnegative(),
|
|
8441
|
+
"durable-refused": number().int().nonnegative()
|
|
8442
|
+
});
|
|
8443
|
+
/** One camera's share of a walk, so a report names cameras and not rows. */
|
|
8444
|
+
var LedgerWalkDeviceReportSchema = object({
|
|
8445
|
+
deviceId: number().int(),
|
|
8446
|
+
hoursWalked: number().int().nonnegative(),
|
|
8447
|
+
hoursMissing: number().int().nonnegative(),
|
|
8448
|
+
ghostSegments: number().int().nonnegative(),
|
|
8449
|
+
ghostBytes: number().int().nonnegative(),
|
|
8450
|
+
forgottenSegments: number().int().nonnegative(),
|
|
8451
|
+
orphanFiles: number().int().nonnegative()
|
|
8452
|
+
});
|
|
8453
|
+
/**
|
|
8454
|
+
* What one walk claimed, listed, found and (only when armed) forgot.
|
|
8455
|
+
*
|
|
8456
|
+
* `archiveSegments` is the **M** and `segmentsClaimed` the **N** (D295), so a
|
|
8457
|
+
* walk that saw a fraction of the location is visible in its own report rather
|
|
8458
|
+
* than in the absence of one.
|
|
8459
|
+
*/
|
|
8460
|
+
var LedgerWalkReportSchema = object({
|
|
8461
|
+
locationId: string(),
|
|
8462
|
+
applied: boolean(),
|
|
8463
|
+
refused: LedgerWalkRefusalSchema.nullable(),
|
|
8464
|
+
archiveSegments: number().int().nonnegative().nullable(),
|
|
8465
|
+
archiveBytes: number().int().nonnegative().nullable(),
|
|
8466
|
+
hoursClaimed: number().int().nonnegative(),
|
|
8467
|
+
hoursWalked: number().int().nonnegative(),
|
|
8468
|
+
hoursMissing: number().int().nonnegative(),
|
|
8469
|
+
/** `readdir` calls issued — the cost, stated in the unit that is paid. */
|
|
8470
|
+
listings: number().int().nonnegative(),
|
|
8471
|
+
segmentsClaimed: number().int().nonnegative(),
|
|
8472
|
+
ghostSegments: number().int().nonnegative(),
|
|
8473
|
+
ghostBytes: number().int().nonnegative(),
|
|
8474
|
+
ghostHoursWhole: number().int().nonnegative(),
|
|
8475
|
+
forgottenSegments: number().int().nonnegative(),
|
|
8476
|
+
forgottenBytes: number().int().nonnegative(),
|
|
8477
|
+
/** Files under a claimed hour that no durable row names. Never deleted. */
|
|
8478
|
+
orphanFiles: number().int().nonnegative(),
|
|
8479
|
+
orphanSample: array(string()).readonly(),
|
|
8480
|
+
hoursSkipped: number().int().nonnegative(),
|
|
8481
|
+
skippedByReason: LedgerWalkSkipCountsSchema,
|
|
8482
|
+
/** The walk stopped at its per-pass hour bound with claims unwalked. */
|
|
8483
|
+
bounded: boolean(),
|
|
8484
|
+
byDevice: array(LedgerWalkDeviceReportSchema).readonly()
|
|
8485
|
+
});
|
|
8387
8486
|
/** How many rows a media pass would still act on against a given target — the
|
|
8388
8487
|
* media lane's denominator AND its residue, from ONE derivation so the two can
|
|
8389
8488
|
* never disagree. `null` = the count could not be taken. */
|
|
@@ -18657,13 +18756,15 @@ var ListGroupsPageSchema = object({
|
|
|
18657
18756
|
groups: array(AnalyticsGroupRecordSchema).readonly(),
|
|
18658
18757
|
nextCursor: string().nullable()
|
|
18659
18758
|
});
|
|
18759
|
+
var KEY_EVENTS_DEFAULT_LIMIT = 50;
|
|
18760
|
+
var KEY_EVENTS_MAX_LIMIT = 200;
|
|
18660
18761
|
var KeyEventQueryInput = object({
|
|
18661
18762
|
deviceId: number(),
|
|
18662
18763
|
/** Window lower bound (track firstSeen ≥ since). */
|
|
18663
18764
|
since: number(),
|
|
18664
18765
|
/** Window upper bound (track firstSeen ≤ until). */
|
|
18665
18766
|
until: number(),
|
|
18666
|
-
limit: number().int().min(1).max(
|
|
18767
|
+
limit: number().int().min(1).max(KEY_EVENTS_MAX_LIMIT).default(KEY_EVENTS_DEFAULT_LIMIT),
|
|
18667
18768
|
/** Drop tracks scoring below this importance. */
|
|
18668
18769
|
minImportance: number().min(0).max(1).optional(),
|
|
18669
18770
|
/** Restrict to a single class (e.g. 'person'). */
|
|
@@ -18685,6 +18786,32 @@ var KeyEventSchema = object({
|
|
|
18685
18786
|
...TrackFlagFields,
|
|
18686
18787
|
...TrackRetrainFields
|
|
18687
18788
|
});
|
|
18789
|
+
/** `getKeyEvents`' window and filters, asked of a SET of cameras at once. */
|
|
18790
|
+
var KeyEventBatchQueryInput = object({
|
|
18791
|
+
deviceIds: array(number()).min(1).max(200),
|
|
18792
|
+
since: number(),
|
|
18793
|
+
until: number(),
|
|
18794
|
+
/** Applied PER CAMERA, exactly as `getKeyEvents.limit` is — never a total
|
|
18795
|
+
* across the set, which would let a busy camera starve a quiet one of its
|
|
18796
|
+
* rows and change what the merged feed contains. */
|
|
18797
|
+
limit: number().int().min(1).max(KEY_EVENTS_MAX_LIMIT).default(KEY_EVENTS_DEFAULT_LIMIT),
|
|
18798
|
+
minImportance: number().min(0).max(1).optional(),
|
|
18799
|
+
classFilter: string().optional()
|
|
18800
|
+
});
|
|
18801
|
+
/**
|
|
18802
|
+
* One camera's key events in a batch answer.
|
|
18803
|
+
*
|
|
18804
|
+
* The row exists for every requested id. `getKeyEvents` degrades to `[]` on
|
|
18805
|
+
* error rather than throwing, so a camera whose store read failed and one with
|
|
18806
|
+
* no events in the window were ALREADY indistinguishable per camera — the
|
|
18807
|
+
* batch does not make that worse, and the row keeps the deviceId the single
|
|
18808
|
+
* method's output never carried (the caller used to stamp it from the fan-out
|
|
18809
|
+
* key, which only worked because there was one query per camera).
|
|
18810
|
+
*/
|
|
18811
|
+
var KeyEventsForDeviceSchema = object({
|
|
18812
|
+
deviceId: number(),
|
|
18813
|
+
events: array(KeyEventSchema).readonly()
|
|
18814
|
+
});
|
|
18688
18815
|
object({
|
|
18689
18816
|
trackId: string(),
|
|
18690
18817
|
className: string(),
|
|
@@ -18756,6 +18883,50 @@ var EventStoreFootprintSchema = object({
|
|
|
18756
18883
|
totalBytes: number().int(),
|
|
18757
18884
|
devices: array(EventStoreDeviceFootprintSchema).readonly()
|
|
18758
18885
|
});
|
|
18886
|
+
/** Event-media footprint for one {@link MediaFileKind}. */
|
|
18887
|
+
var EventMediaKindFootprintSchema = object({
|
|
18888
|
+
kind: MediaFileKindEnum,
|
|
18889
|
+
/** Media rows of this kind. */
|
|
18890
|
+
rows: number().int(),
|
|
18891
|
+
/** Bytes on disk held by those rows. */
|
|
18892
|
+
bytes: number().int()
|
|
18893
|
+
});
|
|
18894
|
+
/**
|
|
18895
|
+
* The media footprint broken down by KIND — the axis a deletion decision
|
|
18896
|
+
* actually turns on.
|
|
18897
|
+
*
|
|
18898
|
+
* A byte total says how much there is; it cannot say what is safe to remove.
|
|
18899
|
+
* The deletable set (the periodic `snapshot` filmstrip, the surplus per-edge
|
|
18900
|
+
* motion stills) and the keep set (`firstFrame`, rolling `lastFrame`,
|
|
18901
|
+
* `thumbnail`/`thumbnailSmall`, `keyFrame`/`keyFrameSmall`, the face/plate
|
|
18902
|
+
* buffers, gallery media, the CLIP `crop`) are distinguished by `kind` and by
|
|
18903
|
+
* nothing else, so sizing a deletion means summing per kind.
|
|
18904
|
+
*
|
|
18905
|
+
* ## Why `unaccounted*` exists
|
|
18906
|
+
*
|
|
18907
|
+
* `kinds` is enumerated from {@link MediaFileKindEnum} — the closed set the
|
|
18908
|
+
* writers use — and summed one kind at a time. `totalRows` / `totalBytes` come
|
|
18909
|
+
* from a SEPARATE unfiltered aggregate over the same rows, never from adding
|
|
18910
|
+
* `kinds` up. A row whose stored `kind` is not in the enum (written by a
|
|
18911
|
+
* retired code path, or by a version that knew a kind this one does not) would
|
|
18912
|
+
* otherwise vanish from the total silently, and an operator would delete
|
|
18913
|
+
* against a denominator smaller than the disk.
|
|
18914
|
+
*
|
|
18915
|
+
* `unaccountedRows` / `unaccountedBytes` are the difference. They are normally
|
|
18916
|
+
* zero; a non-zero value is a real finding and must be shown, not rounded away.
|
|
18917
|
+
*/
|
|
18918
|
+
var EventMediaKindBreakdownSchema = object({
|
|
18919
|
+
/** Every media row in scope, from one unfiltered aggregate. */
|
|
18920
|
+
totalRows: number().int(),
|
|
18921
|
+
/** Every media byte in scope, from that same aggregate. */
|
|
18922
|
+
totalBytes: number().int(),
|
|
18923
|
+
/** Per-kind footprint, ordered by bytes descending. */
|
|
18924
|
+
kinds: array(EventMediaKindFootprintSchema).readonly(),
|
|
18925
|
+
/** `totalRows` minus the summed `kinds` rows — see the schema note. */
|
|
18926
|
+
unaccountedRows: number().int(),
|
|
18927
|
+
/** `totalBytes` minus the summed `kinds` bytes — see the schema note. */
|
|
18928
|
+
unaccountedBytes: number().int()
|
|
18929
|
+
});
|
|
18759
18930
|
/** Per-kind counts returned by the event-prune / device-delete mutations. */
|
|
18760
18931
|
var EventPruneCountsSchema = object({
|
|
18761
18932
|
motion: number().int(),
|
|
@@ -18910,7 +19081,7 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
|
|
|
18910
19081
|
until: number().optional(),
|
|
18911
19082
|
kinds: array(string()).optional(),
|
|
18912
19083
|
limit: number().int().min(1).max(MAX_EVENT_QUERY_LIMIT).default(DEFAULT_EVENT_QUERY_LIMIT)
|
|
18913
|
-
}), array(SensorEventSchema).readonly()), method(KeyEventQueryInput, array(KeyEventSchema).readonly()), method(object({
|
|
19084
|
+
}), array(SensorEventSchema).readonly()), method(KeyEventQueryInput, array(KeyEventSchema).readonly()), method(KeyEventBatchQueryInput, array(KeyEventsForDeviceSchema).readonly()), method(object({
|
|
18914
19085
|
deviceId: number(),
|
|
18915
19086
|
since: number(),
|
|
18916
19087
|
until: number(),
|
|
@@ -18959,6 +19130,9 @@ DeviceType.Camera, method(object({ deviceId: number() }), array(TrackSchema).rea
|
|
|
18959
19130
|
}), TrackFlagsSchema, { kind: "mutation" }), method(object({}), EventStoreFootprintSchema, {
|
|
18960
19131
|
kind: "query",
|
|
18961
19132
|
auth: "admin"
|
|
19133
|
+
}), method(object({ deviceId: number().int().optional() }), EventMediaKindBreakdownSchema, {
|
|
19134
|
+
kind: "query",
|
|
19135
|
+
auth: "admin"
|
|
18962
19136
|
}), method(object({
|
|
18963
19137
|
olderThanMs: number(),
|
|
18964
19138
|
reason: OpsLogReasonSchema.optional()
|
|
@@ -20910,6 +21084,20 @@ method(object({
|
|
|
20910
21084
|
error: string().optional()
|
|
20911
21085
|
}), { auth: "admin" }), method(_void(), array(ProviderListEntrySchema).readonly()), method(object({
|
|
20912
21086
|
providerId: string(),
|
|
21087
|
+
/**
|
|
21088
|
+
* The location this config is an UNSAVED edit of, when there is one.
|
|
21089
|
+
*
|
|
21090
|
+
* `listLocations` replaces every declared secret with the redaction
|
|
21091
|
+
* sentinel, so the edit modal's form state holds the sentinel for any
|
|
21092
|
+
* credential the operator did not retype — and posting that here
|
|
21093
|
+
* without a way to resolve it makes the provider try to authenticate
|
|
21094
|
+
* as `__camstack_redacted__` and report the operator's own working
|
|
21095
|
+
* password as wrong. Given this id, the orchestrator restores each
|
|
21096
|
+
* sentinel from the stored config (same rule as `upsertLocation`)
|
|
21097
|
+
* before dispatching. Omitted by the "Add location" wizard, where
|
|
21098
|
+
* every value was typed just now and nothing is stored yet.
|
|
21099
|
+
*/
|
|
21100
|
+
locationId: string().optional(),
|
|
20913
21101
|
config: record(string(), unknown())
|
|
20914
21102
|
}), object({
|
|
20915
21103
|
ok: boolean(),
|
|
@@ -26545,6 +26733,9 @@ method(object({
|
|
|
26545
26733
|
}), method(RelocateResidueInputSchema, RelocateResidueSchema, {
|
|
26546
26734
|
kind: "query",
|
|
26547
26735
|
auth: "admin"
|
|
26736
|
+
}), method(LedgerWalkInputSchema, LedgerWalkReportSchema, {
|
|
26737
|
+
kind: "mutation",
|
|
26738
|
+
auth: "admin"
|
|
26548
26739
|
}), method(object({ jobId: string() }), object({ cancelled: boolean() }), {
|
|
26549
26740
|
kind: "mutation",
|
|
26550
26741
|
auth: "admin"
|
|
@@ -26936,7 +27127,26 @@ var SceneMonitorStatusSchema = object({
|
|
|
26936
27127
|
monitors: array(SceneMonitorSchema),
|
|
26937
27128
|
lastFetchedAt: number()
|
|
26938
27129
|
});
|
|
26939
|
-
|
|
27130
|
+
/**
|
|
27131
|
+
* One camera's row in a `listScenesBatch` answer.
|
|
27132
|
+
*
|
|
27133
|
+
* `status` is NULLABLE and the nullability is the whole point. `scene-monitor`
|
|
27134
|
+
* is a `defaultActive` wrapper, so every camera is asked; a camera whose
|
|
27135
|
+
* provider is absent (pipeline-analytics not deployed, the post-processing node
|
|
27136
|
+
* down) cannot answer, and that is not the same fact as a camera with no scenes
|
|
27137
|
+
* configured. Fanned out per camera the difference was visible — one query
|
|
27138
|
+
* errored while the others resolved — and a batch that returned only the rows
|
|
27139
|
+
* it managed would have destroyed it, silently, by making an unreachable camera
|
|
27140
|
+
* indistinguishable from one that answered `monitors: []`.
|
|
27141
|
+
*
|
|
27142
|
+
* So: EVERY requested deviceId gets a row. `status: null` means "this camera
|
|
27143
|
+
* could not be read"; `status.monitors: []` means "read, and it has none".
|
|
27144
|
+
*/
|
|
27145
|
+
var SceneMonitorStatusForDeviceSchema = object({
|
|
27146
|
+
deviceId: number(),
|
|
27147
|
+
status: SceneMonitorStatusSchema.nullable()
|
|
27148
|
+
});
|
|
27149
|
+
DeviceType.Camera, method(object({ deviceId: number() }), SceneMonitorStatusSchema), method(object({ deviceIds: array(number()).min(1).max(200) }), array(SceneMonitorStatusForDeviceSchema).readonly()), method(object({
|
|
26940
27150
|
deviceId: number(),
|
|
26941
27151
|
label: string(),
|
|
26942
27152
|
roi: MaskRectShapeSchema,
|
|
@@ -28260,6 +28470,27 @@ var CameraOccupancySnapshotSchema = object({
|
|
|
28260
28470
|
stationaryObjects: array(StationaryObjectSchema).readonly().optional()
|
|
28261
28471
|
});
|
|
28262
28472
|
/**
|
|
28473
|
+
* One camera's row in a `getCurrentSnapshotBatch` answer.
|
|
28474
|
+
*
|
|
28475
|
+
* THREE outcomes, and the single-camera method could only express two of them
|
|
28476
|
+
* because `snapshot: null` was already spoken for:
|
|
28477
|
+
*
|
|
28478
|
+
* - `read: 'read'`, `snapshot` present — the live occupancy reading.
|
|
28479
|
+
* - `read: 'read'`, `snapshot: null` — read, and this camera has no reading
|
|
28480
|
+
* yet: no frame since boot, and no parked-object registry to hydrate from.
|
|
28481
|
+
* - `read: 'unreadable'` — the owner could not answer for this
|
|
28482
|
+
* camera. `snapshot` is null, and it does NOT mean "nothing parked here".
|
|
28483
|
+
*
|
|
28484
|
+
* Collapsing the last two is the failure this field exists to prevent: a
|
|
28485
|
+
* hydration that threw would otherwise render as an empty Stationary section,
|
|
28486
|
+
* which is a definite claim about a camera nobody could read.
|
|
28487
|
+
*/
|
|
28488
|
+
var CameraOccupancySnapshotForDeviceSchema = object({
|
|
28489
|
+
deviceId: number(),
|
|
28490
|
+
read: _enum(["read", "unreadable"]),
|
|
28491
|
+
snapshot: CameraOccupancySnapshotSchema.nullable()
|
|
28492
|
+
});
|
|
28493
|
+
/**
|
|
28263
28494
|
* Time-series resolution. The history methods return one bucket per
|
|
28264
28495
|
* step over the requested range. Smaller resolutions cost more
|
|
28265
28496
|
* memory + bandwidth; bound to discrete steps so caller cannot ask
|
|
@@ -28283,7 +28514,7 @@ var HistoryPointSchema = object({
|
|
|
28283
28514
|
/** Object count averaged over the bucket (rounded to nearest integer). */
|
|
28284
28515
|
count: number().int().nonnegative()
|
|
28285
28516
|
});
|
|
28286
|
-
DeviceType.Camera, method(object({ deviceId: number() }), CameraOccupancySnapshotSchema.nullable()), method(object({
|
|
28517
|
+
DeviceType.Camera, method(object({ deviceId: number() }), CameraOccupancySnapshotSchema.nullable()), method(object({ deviceIds: array(number()).min(1).max(200) }), array(CameraOccupancySnapshotForDeviceSchema).readonly()), method(object({
|
|
28287
28518
|
deviceId: number(),
|
|
28288
28519
|
zoneId: string(),
|
|
28289
28520
|
className: string().optional()
|
|
@@ -31564,6 +31795,12 @@ Object.freeze({
|
|
|
31564
31795
|
addonId: null,
|
|
31565
31796
|
access: "view"
|
|
31566
31797
|
},
|
|
31798
|
+
"pipelineAnalytics.getEventMediaFootprintByKind": {
|
|
31799
|
+
capName: "pipeline-analytics",
|
|
31800
|
+
capScope: "device",
|
|
31801
|
+
addonId: null,
|
|
31802
|
+
access: "view"
|
|
31803
|
+
},
|
|
31567
31804
|
"pipelineAnalytics.getEventStoreFootprint": {
|
|
31568
31805
|
capName: "pipeline-analytics",
|
|
31569
31806
|
capScope: "device",
|
|
@@ -31582,6 +31819,12 @@ Object.freeze({
|
|
|
31582
31819
|
addonId: null,
|
|
31583
31820
|
access: "view"
|
|
31584
31821
|
},
|
|
31822
|
+
"pipelineAnalytics.getKeyEventsBatch": {
|
|
31823
|
+
capName: "pipeline-analytics",
|
|
31824
|
+
capScope: "device",
|
|
31825
|
+
addonId: null,
|
|
31826
|
+
access: "view"
|
|
31827
|
+
},
|
|
31585
31828
|
"pipelineAnalytics.getMotionEvents": {
|
|
31586
31829
|
capName: "pipeline-analytics",
|
|
31587
31830
|
capScope: "device",
|
|
@@ -32758,6 +33001,12 @@ Object.freeze({
|
|
|
32758
33001
|
addonId: null,
|
|
32759
33002
|
access: "view"
|
|
32760
33003
|
},
|
|
33004
|
+
"recording.reconcileLedgerAgainstDisk": {
|
|
33005
|
+
capName: "recording",
|
|
33006
|
+
capScope: "system",
|
|
33007
|
+
addonId: null,
|
|
33008
|
+
access: "create"
|
|
33009
|
+
},
|
|
32761
33010
|
"recording.refreshStorageLocationsForMigration": {
|
|
32762
33011
|
capName: "recording",
|
|
32763
33012
|
capScope: "system",
|
|
@@ -32884,6 +33133,12 @@ Object.freeze({
|
|
|
32884
33133
|
addonId: null,
|
|
32885
33134
|
access: "view"
|
|
32886
33135
|
},
|
|
33136
|
+
"sceneMonitor.listScenesBatch": {
|
|
33137
|
+
capName: "scene-monitor",
|
|
33138
|
+
capScope: "device",
|
|
33139
|
+
addonId: null,
|
|
33140
|
+
access: "view"
|
|
33141
|
+
},
|
|
32887
33142
|
"sceneMonitor.recheckNow": {
|
|
32888
33143
|
capName: "scene-monitor",
|
|
32889
33144
|
capScope: "device",
|
|
@@ -34240,6 +34495,12 @@ Object.freeze({
|
|
|
34240
34495
|
addonId: null,
|
|
34241
34496
|
access: "view"
|
|
34242
34497
|
},
|
|
34498
|
+
"zoneAnalytics.getCurrentSnapshotBatch": {
|
|
34499
|
+
capName: "zone-analytics",
|
|
34500
|
+
capScope: "device",
|
|
34501
|
+
addonId: null,
|
|
34502
|
+
access: "view"
|
|
34503
|
+
},
|
|
34243
34504
|
"zoneAnalytics.getUnzonedHistory": {
|
|
34244
34505
|
capName: "zone-analytics",
|
|
34245
34506
|
capScope: "device",
|
|
@@ -35229,6 +35490,11 @@ Object.freeze({
|
|
|
35229
35490
|
form: "single",
|
|
35230
35491
|
optional: false
|
|
35231
35492
|
}],
|
|
35493
|
+
"pipelineAnalytics.getEventMediaFootprintByKind": [{
|
|
35494
|
+
name: "deviceId",
|
|
35495
|
+
form: "single",
|
|
35496
|
+
optional: true
|
|
35497
|
+
}],
|
|
35232
35498
|
"pipelineAnalytics.getGroup": [{
|
|
35233
35499
|
name: "deviceId",
|
|
35234
35500
|
form: "single",
|
|
@@ -35239,6 +35505,11 @@ Object.freeze({
|
|
|
35239
35505
|
form: "single",
|
|
35240
35506
|
optional: false
|
|
35241
35507
|
}],
|
|
35508
|
+
"pipelineAnalytics.getKeyEventsBatch": [{
|
|
35509
|
+
name: "deviceIds",
|
|
35510
|
+
form: "array",
|
|
35511
|
+
optional: false
|
|
35512
|
+
}],
|
|
35242
35513
|
"pipelineAnalytics.getMotionEvents": [{
|
|
35243
35514
|
name: "deviceId",
|
|
35244
35515
|
form: "single",
|
|
@@ -35679,6 +35950,11 @@ Object.freeze({
|
|
|
35679
35950
|
form: "single",
|
|
35680
35951
|
optional: false
|
|
35681
35952
|
}],
|
|
35953
|
+
"recording.reconcileLedgerAgainstDisk": [{
|
|
35954
|
+
name: "deviceId",
|
|
35955
|
+
form: "single",
|
|
35956
|
+
optional: true
|
|
35957
|
+
}],
|
|
35682
35958
|
"recording.relocateFootage": [{
|
|
35683
35959
|
name: "deviceId",
|
|
35684
35960
|
form: "single",
|
|
@@ -35744,6 +36020,11 @@ Object.freeze({
|
|
|
35744
36020
|
form: "single",
|
|
35745
36021
|
optional: false
|
|
35746
36022
|
}],
|
|
36023
|
+
"sceneMonitor.listScenesBatch": [{
|
|
36024
|
+
name: "deviceIds",
|
|
36025
|
+
form: "array",
|
|
36026
|
+
optional: false
|
|
36027
|
+
}],
|
|
35747
36028
|
"sceneMonitor.recheckNow": [{
|
|
35748
36029
|
name: "deviceId",
|
|
35749
36030
|
form: "single",
|
|
@@ -36005,6 +36286,11 @@ Object.freeze({
|
|
|
36005
36286
|
form: "single",
|
|
36006
36287
|
optional: false
|
|
36007
36288
|
}],
|
|
36289
|
+
"zoneAnalytics.getCurrentSnapshotBatch": [{
|
|
36290
|
+
name: "deviceIds",
|
|
36291
|
+
form: "array",
|
|
36292
|
+
optional: false
|
|
36293
|
+
}],
|
|
36008
36294
|
"zoneAnalytics.getUnzonedHistory": [{
|
|
36009
36295
|
name: "deviceId",
|
|
36010
36296
|
form: "single",
|
|
@@ -36556,7 +36842,7 @@ var AdminUIAddon = class extends BaseAddon {
|
|
|
36556
36842
|
capability: adminUiCapability,
|
|
36557
36843
|
provider: {
|
|
36558
36844
|
getStaticDir: async () => ({ staticDir: resolveAdminUiDistDir() }),
|
|
36559
|
-
getVersion: async () => ({ version: "1.2.
|
|
36845
|
+
getVersion: async () => ({ version: "1.2.121" })
|
|
36560
36846
|
}
|
|
36561
36847
|
}];
|
|
36562
36848
|
}
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{I as e,Q as t,S as n,W as r,a as i,o as a,q as o,x as s,z as c}from"./_virtual_mf___mfe_internal__admin_ui_host__loadShare___mf_0_tanstack_mf_1_react_mf_2_query__loadShare__.js-DhP-Lgiq.js";import{Q as l}from"./player-overlays-RwoCa548.js";import{Uo as u,Zo as d,g as f}from"./src-CDVm70oc.js";import{t as p}from"./FormBuilder-D7eVmgZJ.js";import{t as m}from"./pencil-BJxboIbx.js";import{t as h}from"./plus-Brv4i72u.js";import{t as g}from"./power-DmJawhTF.js";import{t as _}from"./star-BM5cPk35.js";import{C as v,I as y,K as b,o as x,r as S}from"./index-BTGQKEEA.js";var C=b(`hard-drive`,[[`line`,{x1:`22`,x2:`2`,y1:`12`,y2:`12`,key:`1y58io`}],[`path`,{d:`M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z`,key:`oot6mr`}],[`line`,{x1:`6`,x2:`6.01`,y1:`16`,y2:`16`,key:`sgf278`}],[`line`,{x1:`10`,x2:`10.01`,y1:`16`,y2:`16`,key:`1l4acy`}]]);t();function w(e){return e.enabled!==!1}function T(e){return e.isDefault}function E(e,t){let n={id:e.id,type:e.type,displayName:t.displayName??e.displayName,providerId:e.providerId,config:e.config,isDefault:t.isDefault??e.isDefault,isSystem:e.isSystem},r=e.nodeId===void 0?n:{...n,nodeId:e.nodeId},i=t.enabled??e.enabled;return i===void 0?r:{...r,enabled:i}}function D(e){return`${(e/1024**3).toFixed(e>=100*1024**3?0:1)} GB`}function O({location:e}){let t=e.capacity;return t==null?null:n(`span`,{className:`text-[10px] text-foreground-subtle tabular-nums`,children:[D(t.availableBytes),` free of `,D(t.totalBytes)]})}function k(e){let t=e.basePath;if(typeof t==`string`&&t.length>0)return t;let n=Object.keys(e);return n.length===0?``:n.join(`, `)}function A({location:e,cardinality:t,onEdit:r,onDelete:i,onSetDefault:a,onToggleEnabled:o}){let c=k(e.config),l=w(e),u=T(e);return n(`div`,{className:`flex flex-wrap items-center gap-x-3 gap-y-2 px-3 py-2 border-t border-border first:border-t-0 hover:bg-primary/5`,children:[n(`div`,{className:`flex flex-wrap items-center gap-2 min-w-0 flex-1 basis-64`,children:[s(`div`,{className:`w-[88px] shrink-0`,children:e.isDefault?n(`span`,{className:`inline-flex items-center gap-0.5 rounded bg-primary/10 border border-primary/20 px-1.5 py-0.5 text-[10px] font-semibold text-primary uppercase tracking-wide`,title:`Default location for this type`,children:[s(_,{className:`h-2.5 w-2.5 fill-primary`}),`Default`]}):n(`button`,{onClick:()=>a(e),className:`inline-flex items-center gap-0.5 rounded border border-border px-1.5 py-0.5 text-[10px] font-medium text-foreground-subtle hover:text-foreground hover:bg-primary/10 hover:border-primary/30 uppercase tracking-wide`,title:`Promote to default for this type`,children:[s(_,{className:`h-2.5 w-2.5`}),`Set default`]})}),s(`span`,{className:`text-[10px] uppercase tracking-wide text-foreground-subtle bg-background border border-border rounded px-1.5 py-0.5 font-mono`,children:e.providerId}),!l&&s(`span`,{className:`text-[10px] uppercase tracking-wide text-warning bg-warning/10 border border-warning/30 rounded px-1.5 py-0.5`,title:`Disabled — nothing new is written here. Existing data stays readable and is still pruned by age.`,children:`disabled`}),e.isSystem&&s(`span`,{className:`text-[10px] uppercase tracking-wide text-foreground-subtle bg-background border border-border rounded px-1.5 py-0.5`,title:`System-managed location — cannot be deleted; edit config to relocate`,children:`system`}),e.config.readOnly===!0&&s(`span`,{className:`text-[10px] uppercase tracking-wide text-warning bg-warning/10 border border-warning/30 rounded px-1.5 py-0.5`,title:`Drain mode — reads and age retention continue; nothing new is written here and disk-pressure eviction skips it`,children:`read-only`}),n(`div`,{className:`min-w-0`,children:[s(`div`,{className:`text-xs font-medium text-foreground truncate`,children:e.displayName}),n(`div`,{className:`flex flex-wrap items-center gap-x-2`,children:[c&&s(`span`,{className:`text-[10px] text-foreground-subtle truncate font-mono`,children:c}),s(O,{location:e})]})]})]}),n(`div`,{className:`flex flex-wrap items-center gap-1 shrink-0`,children:[n(`button`,{type:`button`,role:`switch`,"aria-label":`Writes enabled`,"aria-checked":l,disabled:u,onClick:()=>o(e,!l),title:u?`The default location of a type is always enabled — it is the fallback every balancing consumer falls back to. Promote another location to default first.`:l?`Enabled — balancing consumers may write new data here. Click to stop new writes.`:`Disabled — no new data is written here. Existing data stays readable. Click to enable.`,className:`inline-flex items-center gap-1 rounded px-2 py-1 text-[10px] font-medium border disabled:cursor-not-allowed ${l?`border-success/30 text-success hover:bg-success/10`:`border-warning/40 text-warning hover:bg-warning/10`}`,children:[s(g,{className:`h-3 w-3`}),l?`Enabled`:`Disabled`]}),!e.isDefault&&n(`button`,{onClick:()=>a(e),className:`inline-flex items-center gap-1 rounded px-2 py-1 text-[10px] font-medium text-foreground-subtle border border-border hover:text-foreground hover:bg-primary/10`,title:`Set as default for this type`,children:[s(_,{className:`h-3 w-3`}),`Set default`]}),n(`button`,{onClick:()=>r(e),className:`inline-flex items-center gap-1 rounded px-2 py-1 text-[10px] font-medium text-foreground-subtle border border-border hover:text-foreground hover:bg-primary/10`,children:[s(m,{className:`h-3 w-3`}),`Edit`]}),!e.isSystem&&t!==`single`&&s(`button`,{onClick:()=>i(e),className:`inline-flex items-center gap-1 rounded px-2 py-1 text-[10px] font-medium text-danger hover:bg-danger/10`,title:`Delete location`,children:s(x,{className:`h-3 w-3`})})]})]})}function j({type:e,displayName:t,description:i,cardinality:a,locations:o,onAdd:c,onEdit:l,onDelete:u,onSetDefault:d,onToggleEnabled:f}){let p=r(()=>{let e=[...o];return e.sort((e,t)=>e.isDefault===t.isDefault?e.displayName.localeCompare(t.displayName):e.isDefault?-1:1),e},[o]);return n(`div`,{className:`rounded-lg border border-border bg-surface`,children:[n(`div`,{className:`flex items-start justify-between border-b border-border px-3 py-2`,children:[n(`div`,{className:`space-y-0.5`,children:[n(`div`,{className:`flex items-center gap-2`,children:[s(`span`,{className:`text-sm font-semibold text-foreground capitalize`,children:t}),s(`span`,{className:`text-[10px] uppercase tracking-wide text-foreground-subtle bg-background border border-border rounded px-1.5 py-0.5 font-mono`,children:e})]}),i&&s(`p`,{className:`text-[11px] text-foreground-subtle`,children:i}),a===`single`&&s(`p`,{className:`text-[10px] text-foreground-subtle italic`,children:`Single — one location per type. Edit the existing entry; it can't be split.`})]}),a===`multi`&&n(`button`,{onClick:()=>c(e),className:`inline-flex items-center gap-1 rounded bg-primary px-2 py-1 text-[11px] font-medium text-primary-foreground hover:bg-primary/90`,children:[s(h,{className:`h-3 w-3`}),`Add`]})]}),p.length===0?s(`div`,{className:`px-3 py-4 text-center text-[11px] text-foreground-subtle italic`,children:a===`multi`?`No location registered. Click "Add" to register one.`:`No location registered yet — should be auto-seeded at next boot.`}):s(`div`,{children:p.map(e=>s(A,{location:e,cardinality:a,onEdit:l,onDelete:u,onSetDefault:d,onToggleEnabled:f},e.id))})]})}var M=new Set([`proc`,`sys`,`dev`,`run`,`boot`,`lost+found`,`snap`,`bin`,`sbin`,`lib`,`lib32`,`lib64`,`libx32`,`usr`,`etc`,`var`,`opt`,`tmp`,`srv`,`root`,`System`,`Library`,`Applications`,`cores`,`private`]),N=[`recordings`,`data`,`mnt`,`media`,`Volumes`];function P(e){let t=N.findIndex(t=>t===`recordings`?e.startsWith(t):e===t);return t===-1?N.length:t}function F(e){return e.filter(e=>!e.name.startsWith(`.`)&&!M.has(e.name)).toSorted((e,t)=>{let n=P(e.name)-P(t.name);return n===0?e.name.localeCompare(t.name):n}).map(e=>e.path)}t();function I({nodeId:t,value:r,onChange:i}){let a=l().trpcClient,[u,d]=o([]),[f,p]=o(r),[m,h]=o(null),[g,_]=o(null),[v,y]=o(``),b=e(async(e,n)=>{_(null);try{let r=await a.filesystemBrowse.browse.query({nodeId:t,path:e});h(r),p(r.path),n&&i(r.path)}catch(e){_(e instanceof Error?e.message:`browse failed`)}},[a,t,i]);c(()=>{p(r),(async()=>{let e=await a.filesystemBrowse.browse.query({nodeId:t,path:`/`}).then(e=>e).catch(()=>null);if(e){d(F(e.entries)),await b(r.startsWith(`/`)?r:`/`,!1);return}try{let e=await a.filesystemBrowse.listAllowedRoots.query({nodeId:t});d(e),await b(r&&e.some(e=>r.startsWith(e))?r:e[0]??``,!1)}catch(e){d([]),h(null),_(e instanceof Error&&/not available on node/i.test(e.message)?`This node can't be browsed remotely. Enter the path manually.`:e instanceof Error?e.message:`browse unavailable`)}})()},[t]);let x=async()=>{if(!(!v.trim()||!m)){_(null);try{let e=`${m.path.replace(/\/+$/,``)}/${v.trim()}`;await a.filesystemBrowse.createDir.mutate({nodeId:t,path:e}),y(``),await b(m.path,!0)}catch(e){_(e instanceof Error?e.message:`create failed`)}}},S=e=>`${(e/1e9).toFixed(1)} GB`;return n(`div`,{className:`space-y-2 rounded border border-border p-2`,children:[s(`div`,{className:`flex flex-wrap gap-1`,children:u.map(e=>s(`button`,{onClick:()=>void b(e,!0),className:`rounded border border-border px-2 py-0.5 text-[10px] font-mono hover:border-primary/40`,children:e},e))}),s(`input`,{value:f,onChange:e=>{p(e.target.value),i(e.target.value)},placeholder:`/absolute/path`,className:`w-full rounded border border-border bg-background px-2 py-1 text-[11px] font-mono`}),m&&n(`div`,{className:`text-[10px] text-foreground-subtle`,children:[S(m.freeBytes),` free / `,S(m.totalBytes)]}),s(`div`,{className:`max-h-40 space-y-0.5 overflow-y-auto`,children:m?.entries.map(e=>n(`button`,{onClick:()=>void b(e.path,!0),className:`block w-full truncate rounded px-2 py-1 text-left text-xs hover:bg-primary/5`,children:[`📁 `,e.name]},e.path))}),n(`div`,{className:`flex gap-1`,children:[s(`input`,{value:v,onChange:e=>y(e.target.value),placeholder:`new folder`,className:`flex-1 rounded border border-border bg-background px-2 py-1 text-xs`}),s(`button`,{onClick:()=>void x(),className:`rounded border border-border px-2 py-1 text-xs hover:border-primary/40`,children:`Create`})]}),g&&s(`div`,{className:`text-[10px] text-red-400`,children:g})]})}t();function L({location:e,onClose:t,onSaved:c}){let m=a(),h=l().trpcClient,[g,_]=o({...e.config}),[y,b]=o(e.displayName),[x,C]=o(null),[w,T]=o(!1),E=u(),D=r(()=>{let t=E.data;return Array.isArray(t)?t.find(t=>t.providerId===e.providerId)??null:null},[E.data,e.providerId]),O=d({onSuccess:()=>{m.invalidateQueries({queryKey:[[`storage`,`listLocations`]]}),c()}}),k=D?.shouldSaveDiskSpace===!0,A=D?.nodeLocal===!0,[j,M]=o(typeof e.nodeId==`string`?e.nodeId:`hub`),N=typeof g.basePath==`string`?g.basePath:``,P=e=>_(t=>({...t,basePath:e})),F=g.readOnly===!0,L=i({queryKey:[`storage`,`listLocations`,`ro-guard`],queryFn:()=>h.storage.listLocations.query({})}),R=(L.data??[]).filter(t=>t.type===e.type&&t.id!==e.id&&t.config.readOnly!==!0).length,z=!F&&L.data!==void 0&&R===0,B=e=>_(t=>{let n={...t};return delete n.readOnly,e?{...n,readOnly:!0}:n}),V=typeof g.maxUsedGb==`number`?g.maxUsedGb:``,H=e=>{let t=e.trim(),n=t===``?void 0:Number(t);_(e=>{let t={...e};return n===void 0||!Number.isFinite(n)||n<=0?delete t.maxUsedGb:t.maxUsedGb=n,t})},U=typeof g.minFreePercent==`number`?g.minFreePercent:``,W=e=>{let t=e.trim(),n=t===``?void 0:Number(t);_(e=>{let t={...e};return n===void 0||!Number.isFinite(n)?delete t.minFreePercent:t.minFreePercent=Math.min(100,Math.max(0,n)),t})},G=async()=>{T(!0),C(null);try{C(await(e=>h.storage.testConfig.query(e))({providerId:e.providerId,config:g}))}catch(e){C({ok:!1,error:e instanceof Error?e.message:String(e)})}finally{T(!1)}};return s(`div`,{className:`fixed inset-0 z-50 flex items-center justify-center bg-background/80 backdrop-blur-sm`,onClick:t,children:n(`div`,{className:`w-full max-w-md rounded-xl border border-border bg-surface shadow-2xl`,onClick:e=>e.stopPropagation(),children:[n(`div`,{className:`flex items-start justify-between border-b border-border px-4 py-3`,children:[n(`div`,{className:`space-y-0.5`,children:[n(`h2`,{className:`text-sm font-semibold text-foreground`,children:[`Edit `,e.displayName]}),n(`p`,{className:`text-xs text-foreground-subtle`,children:[s(`span`,{className:`font-mono`,children:e.id}),` ·`,` `,D?.displayName??e.providerId]})]}),s(`button`,{onClick:t,className:`text-foreground-subtle hover:text-foreground`,children:s(S,{className:`h-4 w-4`})})]}),n(`div`,{className:`p-4 space-y-3 max-h-[60vh] overflow-y-auto`,children:[n(`div`,{className:`space-y-1`,children:[s(`label`,{className:`text-[10px] uppercase tracking-wide text-foreground-subtle`,children:`Display name`}),s(`input`,{type:`text`,value:y,onChange:e=>b(e.target.value),className:`w-full rounded border border-border bg-background px-2 py-1.5 text-xs text-foreground focus:outline-none focus:ring-1 focus:ring-primary`})]}),D&&s(p,{schema:D.configSchema,values:g,onChange:_}),n(`div`,{className:`space-y-1`,children:[n(`label`,{className:`flex items-center gap-2 text-xs ${z?`text-foreground-subtle cursor-not-allowed`:`text-foreground cursor-pointer`}`,children:[s(`input`,{type:`checkbox`,checked:F,disabled:z,onChange:e=>B(e.target.checked),className:`accent-primary`}),`Read-only (drain mode)`]}),s(`p`,{className:`text-[10px] text-foreground-subtle`,children:z?`Blocked: this is the last writable location of its type — new footage would have nowhere to go.`:`Reads and age-based retention continue; nothing new is written here and disk-pressure eviction skips it. Use it to slowly decommission a disk.`})]}),A&&n(`div`,{className:`space-y-2`,children:[s(`label`,{className:`text-[10px] uppercase tracking-wide text-foreground-subtle`,children:`Node`}),s(f,{selectedNodeId:j,onSelect:M,alwaysShow:!0}),s(`label`,{className:`text-[10px] uppercase tracking-wide text-foreground-subtle`,children:`Path`}),s(I,{nodeId:j,value:N,onChange:P})]}),k&&n(`div`,{className:`space-y-1`,children:[s(`label`,{className:`text-[10px] uppercase tracking-wide text-foreground-subtle`,children:`Min free disk %`}),s(`input`,{type:`number`,min:0,max:100,value:U,placeholder:D?.minFreePercent==null?``:String(D.minFreePercent),onChange:e=>W(e.target.value),className:`w-full rounded border border-border bg-background px-2 py-1.5 text-xs text-foreground focus:outline-none focus:ring-1 focus:ring-primary`}),n(`p`,{className:`text-[10px] text-foreground-subtle`,children:[`When free space on this volume drops below this %, the oldest data stored here is evicted to reclaim space.`,D?.minFreePercent==null?` Empty = use the default.`:` Empty = use the default (${D.minFreePercent}%).`]}),s(`label`,{className:`text-[10px] uppercase tracking-wide text-foreground-subtle`,children:`Max used (GB)`}),s(`input`,{type:`number`,min:1,value:V,placeholder:`unlimited`,onChange:e=>H(e.target.value),className:`w-full rounded border border-border bg-background px-2 py-1.5 text-xs text-foreground focus:outline-none focus:ring-1 focus:ring-primary`}),s(`p`,{className:`text-[10px] text-foreground-subtle`,children:`Hard cap on the TOTAL bytes evictable data (recordings) may occupy on this location, independent of disk free space — oldest footage is evicted past it. Empty = unlimited.`})]}),!D&&!E.isLoading&&n(`div`,{className:`rounded border border-amber-500/30 bg-amber-500/10 px-3 py-2 text-[11px] text-amber-700 dark:text-amber-300`,children:[`Provider `,s(`code`,{className:`font-mono`,children:e.providerId}),` is no longer registered. Field schema unavailable; raw config is preserved on save.`]}),x&&s(`div`,{className:`rounded border px-3 py-2 text-[11px] ${x.ok?`border-success/30 bg-success/5 text-success`:`border-danger/30 bg-danger/5 text-danger`}`,children:x.ok?`Connection OK.`:`Test failed: ${x.error??`unknown error`}`}),O.isError&&s(`div`,{className:`rounded border border-danger/30 bg-danger/5 text-danger px-3 py-2 text-[11px]`,children:O.error instanceof Error?O.error.message:String(O.error)})]}),n(`div`,{className:`flex items-center justify-between gap-2 border-t border-border px-4 py-3`,children:[s(`button`,{onClick:t,className:`rounded px-3 py-1.5 text-xs text-foreground-subtle border border-border hover:text-foreground`,children:`Cancel`}),n(`div`,{className:`flex items-center gap-2`,children:[s(`button`,{onClick:()=>{G()},disabled:w||!D,className:`rounded border border-border px-3 py-1.5 text-xs text-foreground hover:bg-primary/10 disabled:opacity-50`,children:w?`Testing…`:`Test connection`}),n(`button`,{onClick:()=>{O.mutate({id:e.id,type:e.type,providerId:e.providerId,isDefault:e.isDefault,displayName:y.trim(),config:g,nodeId:A?j:void 0})},disabled:O.isPending||y.trim().length===0,className:`inline-flex items-center gap-1.5 rounded bg-primary px-3 py-1.5 text-xs font-medium text-primary-foreground hover:bg-primary/90 disabled:opacity-50`,children:[O.isPending?s(v,{className:`h-3.5 w-3.5 animate-spin`}):null,O.isPending?`Saving…`:`Save`]})]})]})]})})}function R(e){let t=e.trim().toLowerCase();return t.length===0?``:t.replace(/[^a-z0-9]+/g,`-`).replace(/^-+|-+$/g,``)}function z(e,t){let n=R(t);return`${e}:${n.length>0?n:`default`}`}t();function B({initialType:e,onClose:t,onCreated:i}){let c=a(),m=l().trpcClient,[h,g]=o(`picker`),[_,b]=o(e),[x,C]=o(null),[w,T]=o({}),[E,D]=o(``),[O,k]=o(null),[A,j]=o(!1),[M,N]=o(!1),[P,F]=o(`hub`),[L,R]=o(null),[B,V]=o(!1),H=e=>T(t=>({...t,basePath:e})),U=typeof w.basePath==`string`?w.basePath:``,W=u(),G=r(()=>{let e=W.data;return Array.isArray(e)?e:[]},[W.data]),K=W.isLoading,q=d({onSuccess:()=>{c.invalidateQueries({queryKey:[[`storage`,`listLocations`]]}),i()}}),J=r(()=>O!==null&&O.length>0?O:z(_,E),[_,E,O]),Y=async()=>{if(x){V(!0),R(null);try{R(await(e=>m.storage.testConfig.query(e))({providerId:x.providerId,config:w}))}catch(e){R({ok:!1,error:e instanceof Error?e.message:String(e)})}finally{V(!1)}}};return s(`div`,{className:`fixed inset-0 z-50 flex items-center justify-center bg-background/80 backdrop-blur-sm`,onClick:t,children:n(`div`,{className:`w-full max-w-md rounded-xl border border-border bg-surface shadow-2xl`,onClick:e=>e.stopPropagation(),children:[n(`div`,{className:`flex items-start justify-between border-b border-border px-4 py-3`,children:[n(`div`,{className:`space-y-0.5`,children:[s(`h2`,{className:`text-sm font-semibold text-foreground`,children:{picker:`Add Location — Pick provider`,config:`Add Location — ${x?.displayName??``}`,naming:`Add Location — Name & defaults`}[h]}),n(`p`,{className:`text-xs text-foreground-subtle`,children:[`Type: `,s(`span`,{className:`font-mono`,children:_})]})]}),s(`button`,{onClick:t,className:`text-foreground-subtle hover:text-foreground`,children:s(S,{className:`h-4 w-4`})})]}),h===`picker`&&n(`div`,{className:`p-4 space-y-2`,children:[K&&s(`div`,{className:`text-xs text-foreground-subtle animate-pulse`,children:`Loading providers…`}),!K&&G.length===0&&n(`div`,{className:`rounded border border-border bg-background px-3 py-4 text-center text-xs text-foreground-subtle`,children:[`No storage-provider supports type "`,_,`". Install a compatible addon (e.g.`,` `,s(`code`,{className:`font-mono`,children:`remote-storage`}),`) to enable it.`]}),G.map(e=>n(`button`,{onClick:()=>{C(e),g(`config`)},className:`flex w-full items-center gap-3 rounded-lg border border-border bg-background p-3 text-left hover:border-primary/40 hover:bg-primary/5 transition-colors`,children:[n(`div`,{className:`flex-1 min-w-0`,children:[s(`p`,{className:`text-xs font-semibold text-foreground`,children:e.displayName}),s(`p`,{className:`text-[10px] text-foreground-subtle font-mono mt-0.5 truncate`,children:e.providerId})]}),s(y,{className:`h-4 w-4 text-foreground-subtle flex-shrink-0`})]},e.providerId))]}),h===`config`&&x&&n(`div`,{className:`p-4 space-y-3 max-h-[60vh] overflow-y-auto`,children:[s(p,{schema:x.configSchema,values:w,onChange:T}),x.nodeLocal&&n(`div`,{className:`space-y-2`,children:[s(`label`,{className:`text-[10px] uppercase tracking-wide text-foreground-subtle`,children:`Node`}),s(f,{selectedNodeId:P,onSelect:F,alwaysShow:!0}),s(`label`,{className:`text-[10px] uppercase tracking-wide text-foreground-subtle`,children:`Path`}),s(I,{nodeId:P,value:U,onChange:H})]}),L&&s(`div`,{className:`rounded border px-3 py-2 text-[11px] ${L.ok?`border-success/30 bg-success/5 text-success`:`border-danger/30 bg-danger/5 text-danger`}`,children:L.ok?`Connection OK.`:`Test failed: ${L.error??`unknown error`}`}),n(`div`,{className:`flex items-center justify-between pt-1`,children:[s(`button`,{onClick:()=>g(`picker`),className:`rounded px-3 py-1.5 text-xs text-foreground-subtle border border-border hover:text-foreground`,children:`Back`}),n(`div`,{className:`flex items-center gap-2`,children:[s(`button`,{onClick:()=>{Y()},disabled:B,className:`rounded border border-border px-3 py-1.5 text-xs text-foreground hover:bg-primary/10 disabled:opacity-50`,children:B?`Testing…`:`Test connection`}),s(`button`,{onClick:()=>g(`naming`),className:`rounded bg-primary px-3 py-1.5 text-xs font-medium text-primary-foreground hover:bg-primary/90`,children:`Next`})]})]})]}),h===`naming`&&x&&n(`div`,{className:`p-4 space-y-3`,children:[n(`div`,{className:`space-y-1`,children:[s(`label`,{className:`text-[10px] uppercase tracking-wide text-foreground-subtle`,children:`Display name`}),s(`input`,{type:`text`,value:E,onChange:e=>D(e.target.value),placeholder:`${_} on ${x.displayName}`,className:`w-full rounded border border-border bg-background px-2 py-1.5 text-xs text-foreground focus:outline-none focus:ring-1 focus:ring-primary`})]}),n(`div`,{className:`space-y-1`,children:[n(`label`,{className:`text-[10px] uppercase tracking-wide text-foreground-subtle`,children:[`Id`,` `,s(`span`,{className:`lowercase tracking-normal text-foreground-subtle`,children:`— auto-derived; override if needed`})]}),s(`input`,{type:`text`,value:J,onChange:e=>k(e.target.value),placeholder:z(_,E),className:`w-full rounded border border-border bg-background px-2 py-1.5 text-xs text-foreground font-mono focus:outline-none focus:ring-1 focus:ring-primary`}),n(`p`,{className:`text-[10px] text-foreground-subtle`,children:[`Format: `,s(`code`,{className:`font-mono`,children:`<type>:<slug>`}),`. Lowercase letters, digits, and hyphens only.`]})]}),n(`label`,{className:`flex items-start gap-2 rounded border border-border bg-background px-3 py-2 cursor-pointer hover:bg-primary/5`,children:[s(`input`,{type:`checkbox`,checked:A,onChange:e=>j(e.target.checked),className:`accent-primary mt-0.5`}),n(`div`,{className:`space-y-0.5`,children:[n(`div`,{className:`text-xs font-medium text-foreground`,children:[`Mark as default for type "`,_,`"`]}),n(`div`,{className:`text-[10px] text-foreground-subtle`,children:[`Setting this as default will demote the current default for this type. References like `,n(`code`,{className:`font-mono`,children:[`"`,_,`"`]}),` resolve to whichever location is the default.`]})]})]}),n(`label`,{className:`flex items-start gap-2 rounded border border-border bg-background px-3 py-2 cursor-pointer hover:bg-primary/5`,children:[s(`input`,{type:`checkbox`,checked:M,onChange:e=>N(e.target.checked),className:`accent-primary mt-0.5`}),n(`div`,{className:`space-y-0.5`,children:[s(`div`,{className:`text-xs font-medium text-foreground`,children:`Enable immediately`}),s(`div`,{className:`text-[10px] text-foreground-subtle`,children:`A disabled location receives no writes until enabled — reads and age-based retention still work, nothing new lands here. Leave this off to register the disk now and start using it later.`})]})]}),q.isError&&s(`div`,{className:`rounded border border-danger/30 bg-danger/5 text-danger px-3 py-2 text-[11px]`,children:q.error instanceof Error?q.error.message:String(q.error)}),n(`div`,{className:`flex items-center justify-between pt-1`,children:[s(`button`,{onClick:()=>g(`config`),className:`rounded px-3 py-1.5 text-xs text-foreground-subtle border border-border hover:text-foreground`,children:`Back`}),n(`div`,{className:`flex items-center gap-2`,children:[s(`button`,{onClick:()=>{b(e),C(null),T({}),D(``),k(null),j(!1),N(!1),R(null),g(`picker`)},className:`rounded px-3 py-1.5 text-xs text-foreground-subtle border border-border hover:text-foreground`,children:`Reset`}),n(`button`,{onClick:()=>{x&&q.mutate({id:J,type:_,displayName:E.trim(),providerId:x.providerId,config:w,isDefault:A,enabled:M,nodeId:x.nodeLocal?P:void 0})},disabled:q.isPending||E.trim().length===0,className:`inline-flex items-center gap-1.5 rounded bg-primary px-3 py-1.5 text-xs font-medium text-primary-foreground hover:bg-primary/90 disabled:opacity-50`,children:[q.isPending?s(v,{className:`h-3.5 w-3.5 animate-spin`}):null,q.isPending?`Saving…`:`Save`]})]})]})]})]})})}export{C as a,E as i,L as n,j as r,B as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{I as e,K as t,Q as n,R as r,S as i,W as a,b as o,o as s,q as c,x as l,z as u}from"./_virtual_mf___mfe_internal__admin_ui_host__loadShare___mf_0_tanstack_mf_1_react_mf_2_query__loadShare__.js-DhP-Lgiq.js";import{Q as d}from"./player-overlays-RwoCa548.js";import{$i as f,An as p,Bn as ee,Bs as m,C as h,Cn as g,Dn as _,En as v,Fn as y,Hn as te,In as b,J as x,Ln as S,Mn as C,Nn as ne,On as w,Rn as re,Rs as T,Sn as E,Tn as ie,Vn as ae,g as D,jn as oe,q as se,un as ce,wn as le,xn as ue}from"./src-CDVm70oc.js";import{Vt as O}from"./src-ijaeX4aR.js";import{t as k}from"./clock-BeIF3nWG.js";import{t as A}from"./download-Cuj1maBm.js";import{t as de}from"./plus-Brv4i72u.js";import{t as j}from"./refresh-cw-OR1QZ198.js";import{C as M,J as N,K as P,P as fe,R as F,X as pe,_ as I,f as me,m as he,o as L,p as R,r as ge,z}from"./index-BTGQKEEA.js";import{t as B}from"./AdminPage-CCD07UMs.js";import{t as V}from"./NodeAddonsSettingsPanel-DvTRBvQl.js";import{r as H,t as U}from"./useNodeUrlSelection-DbuPo174.js";var _e=P(`chevron-up`,[[`path`,{d:`m18 15-6-6-6 6`,key:`153udz`}]]),ve=P(`octagon-alert`,[[`path`,{d:`M12 16h.01`,key:`1drbdi`}],[`path`,{d:`M12 8v4`,key:`1got3b`}],[`path`,{d:`M15.312 2a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586l-4.688-4.688A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2z`,key:`1fd625`}]]),ye=P(`package`,[[`path`,{d:`M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z`,key:`1a0edw`}],[`path`,{d:`M12 22V12`,key:`d0xqtd`}],[`polyline`,{points:`3.29 7 12 12 20.71 7`,key:`ousv84`}],[`path`,{d:`m7.5 4.27 9 5.15`,key:`1c824w`}]]),W=P(`skip-forward`,[[`polygon`,{points:`5 4 15 12 5 20 5 4`,key:`16p6eg`}],[`line`,{x1:`19`,x2:`19`,y1:`5`,y2:`19`,key:`futhcm`}]]),G=P(`upload`,[[`path`,{d:`M12 3v12`,key:`1x0j5s`}],[`path`,{d:`m17 8-5-5-5 5`,key:`7q97r8`}],[`path`,{d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`,key:`ih7n3h`}]]);n();var K=new Set([`completed`,`failed`,`partially-failed`,`cancelled`]),q=new Set([`done`,`failed`,`skipped`]);function J(e){return!q.has(e.phase)&&!K.has(e.jobState)}function be(e,t){let n=new Map,r=[...e].sort((e,t)=>e.createdAtMs-t.createdAtMs);for(let e of r){let r=K.has(e.state);for(let i of e.tasks)r&&i.finishedAtMs!==null&&t-i.finishedAtMs>6e4||n.set(i.packageName,{jobId:e.jobId,packageName:i.packageName,phase:i.phase,fromVersion:i.fromVersion,toVersion:i.toVersion,error:i.error,jobState:e.state,finishedAtMs:i.finishedAtMs})}return n}function xe(){let{data:e}=p({activeOnly:!0},{refetchOnWindowFocus:!1,refetchInterval:e=>(e.state.data?.length??0)>0?3e3:!1}),{map:t}=m(O.AddonsJobProgress,e=>e.job.jobId);return a(()=>{let n=new Map;for(let t of e??[])n.set(t.jobId,t);for(let[e,r]of t)n.set(e,r.job);return be([...n.values()],Date.now())},[e,t])}var Y={queued:{icon:k,cls:`bg-muted text-foreground-subtle`,label:`queued`},fetching:{icon:M,cls:`bg-primary/10 text-primary`,label:`fetching`,spin:!0},staged:{icon:M,cls:`bg-primary/10 text-primary`,label:`staged`,spin:!0},validating:{icon:M,cls:`bg-primary/10 text-primary`,label:`validating`,spin:!0},applying:{icon:M,cls:`bg-primary/10 text-primary`,label:`applying`,spin:!0},restarting:{icon:M,cls:`bg-amber-500/10 text-amber-600 dark:text-amber-400`,label:`restarting`,spin:!0},applied:{icon:M,cls:`bg-primary/10 text-primary`,label:`finalizing`,spin:!0},done:{icon:z,cls:`bg-success/10 text-success`,label:`updated`},failed:{icon:ve,cls:`bg-danger/10 text-danger`,label:`failed`},skipped:{icon:W,cls:`bg-muted text-foreground-subtle`,label:`skipped`}};function Se({progress:e}){let t=Y[e.phase],n=t.icon,r=e.error??`${e.packageName}: ${e.fromVersion??`?`} → ${e.toVersion}`;return i(`span`,{"data-testid":`addon-job-progress`,className:`inline-flex items-center gap-1 px-1.5 py-0.5 text-[10px] rounded shrink-0 ${t.cls}`,title:r,children:[l(n,{className:`w-2.5 h-2.5 ${t.spin?`animate-spin`:``}`}),t.label,i(`span`,{className:`font-mono`,children:[`→ `,e.toVersion]})]})}function Ce({packageName:e,currentVersion:t,installSource:n,onInstall:r,onClose:a,onSelect:s,selectedVersion:c}){let u=n===`upload`||n===`local`,{data:d,isLoading:f}=v({name:e});return i(`div`,{className:`fixed z-50 w-72 rounded-lg border border-border bg-surface shadow-xl overflow-hidden`,style:{top:`auto`,bottom:`auto`},ref:e=>{if(!e)return;let t=e.parentElement?.getBoundingClientRect();if(!t)return;let n=window.innerHeight-t.bottom,r=t.top;n<280&&r>n?(e.style.bottom=`${window.innerHeight-t.top+4}px`,e.style.top=`auto`):(e.style.top=`${t.bottom+4}px`,e.style.bottom=`auto`),e.style.right=`${window.innerWidth-t.right}px`},onClick:e=>e.stopPropagation(),children:[i(`div`,{className:`flex items-center justify-between px-3 py-2 border-b border-border`,children:[l(`span`,{className:`text-[10px] uppercase tracking-wide text-foreground-subtle font-medium`,children:`Versions`}),l(`button`,{type:`button`,onClick:a,className:`text-foreground-subtle hover:text-foreground`,children:l(ge,{className:`h-3 w-3`})})]}),u&&i(`div`,{className:`flex items-start gap-2 px-3 py-2 border-b border-border bg-cyan-500/10 text-[10px]`,children:[l(G,{className:`h-3 w-3 mt-0.5 text-cyan-500 shrink-0`}),i(`div`,{className:`text-cyan-700 dark:text-cyan-200`,children:[i(`span`,{className:`font-semibold`,children:[n===`upload`?`Uploaded copy`:`Local copy`,` in place.`]}),` `,`Re-install `,l(`span`,{className:`font-mono`,children:t}),` from npm to track upstream releases again.`]})]}),f&&i(`div`,{className:`flex items-center justify-center gap-2 py-6 text-[10px] text-foreground-subtle`,children:[l(M,{className:`h-3.5 w-3.5 animate-spin`}),`Loading versions...`]}),d&&l(`div`,{className:`max-h-64 overflow-auto divide-y divide-border`,children:d.map(e=>{let n=e.version===t,a=s!==void 0&&e.version===c,d=/-(alpha|beta|rc|dev|canary|next)/i.test(e.version),f=i(o,{children:[l(`span`,{className:`font-mono flex-1 text-left ${n?`text-primary font-semibold`:d?`text-amber-400`:`text-foreground`}`,children:e.version}),n&&l(`span`,{className:`text-[9px] rounded-full px-1.5 py-0.5 font-medium bg-primary/10 text-primary`,children:`current`}),e.distTags.map(e=>l(`span`,{className:`text-[9px] rounded-full px-1.5 py-0.5 font-medium ${e===`latest`?`bg-emerald-500/15 text-emerald-400`:e===`beta`?`bg-amber-500/15 text-amber-400`:`bg-gray-500/15 text-gray-400`}`,children:e},e)),e.deprecated&&l(`span`,{className:`text-[9px] text-red-400 line-through`,children:`deprecated`}),l(`span`,{className:`text-[9px] text-foreground-subtle shrink-0`,children:new Date(e.publishedAt).toLocaleDateString()})]});return s?i(`button`,{type:`button`,"aria-label":`Select ${e.version}`,onClick:()=>s(e.version),className:`w-full flex items-center gap-2 px-3 py-2 text-[11px] ${a?`bg-primary/5`:`hover:bg-surface-hover`} transition-colors`,children:[f,a?l(z,{className:`h-3 w-3 text-primary shrink-0`}):l(`span`,{className:`w-3 shrink-0`})]},e.version):i(`div`,{className:`flex items-center gap-2 px-3 py-2 text-[11px] ${n?`bg-primary/5`:`hover:bg-surface-hover`} transition-colors`,children:[f,n&&!u?l(z,{className:`h-3 w-3 text-primary shrink-0`}):l(`button`,{type:`button`,onClick:()=>r(e.version),className:`shrink-0 rounded p-0.5 hover:bg-primary/20 text-foreground-subtle hover:text-primary transition-colors`,title:n?`Re-install ${e.version} from npm`:`Install ${e.version}`,children:l(A,{className:`h-3 w-3`})})]},e.version)})}),d&&d.length===0&&l(`div`,{className:`py-4 text-center text-[10px] text-foreground-subtle`,children:`No versions found`})]})}var X={queued:{icon:k,bg:`bg-muted text-foreground-subtle`,label:`queued`},updating:{icon:M,bg:`bg-primary/10 text-primary`,label:`updating`,spin:!0},"done-pending-restart":{icon:j,bg:`bg-amber-500/10 text-amber-700`,label:`pending restart`},done:{icon:z,bg:`bg-success/10 text-success`,label:`done`},failed:{icon:ve,bg:`bg-danger/10 text-danger`,label:`failed`}};function Z({item:e}){let t=X[e.status],n=t.icon;return i(`span`,{className:`inline-flex items-center gap-1 px-1.5 py-0.5 text-[10px] rounded ${t.bg}`,title:e.error,children:[l(n,{className:`w-2.5 h-2.5 ${t.spin?`animate-spin`:``}`}),t.label]})}n();var Q=`device-export`;function we(e){return e.capabilities.some(e=>(typeof e==`string`?e:e.name)===Q)}function Te({isBundle:e,installSource:t,addonId:n,iconPath:r,color:a}){let[o,s]=c(!1),u=a?{backgroundColor:`${a.startsWith(`#`)?a:`#${a}`}26`}:void 0,d=e?`bg-indigo-500/20 text-indigo-700 dark:text-indigo-300`:`bg-purple-500/20 text-purple-700 dark:text-purple-300`,f=n&&r?`/api/addon-assets/${n}/${r}`:null,p=!!f&&!o;return i(`div`,{className:`relative flex-shrink-0`,children:[l(`div`,{className:`h-9 w-9 rounded-lg flex items-center justify-center ${u?``:d}`,style:u,children:p?l(`img`,{src:f,alt:n,className:`h-5 w-5`,onError:()=>s(!0)}):l(e?ye:I,{className:`h-4 w-4`})}),t===`local`&&l(`span`,{className:`absolute -top-1.5 -left-1.5 text-[7px] font-bold leading-none bg-orange-500 text-white px-1 py-0.5 rounded -rotate-12 shadow-sm`,children:`DEV`}),t===`npm`&&l(`span`,{className:`absolute -top-1 -left-1 w-4 h-4 rounded bg-[#cb3837] flex items-center justify-center -rotate-12 shadow-sm`,children:l(`svg`,{viewBox:`0 0 780 250`,className:`w-[11px] h-[11px]`,children:l(`path`,{fill:`#fff`,d:`M240 250h100V50h100v200h340V0H0v250z`})})}),t===`upload`&&l(`span`,{className:`absolute -top-1.5 -left-1.5 flex items-center justify-center h-4 w-4 rounded bg-cyan-500 -rotate-12 shadow-sm`,children:l(G,{className:`h-2.5 w-2.5 text-white`})})]})}function Ee({version:e,availableUpdate:t,selectedVersion:n,isUpdating:r,installSource:a,disabled:o,onUpdate:s,onOpenPicker:c,children:u}){if(r)return i(`span`,{className:`inline-flex items-center gap-1 rounded-md px-2 py-1 text-[10px] font-medium border border-blue-500/30 bg-blue-500/10 text-blue-400 shrink-0`,children:[l(M,{className:`h-3 w-3 animate-spin`}),`Updating…`]});if(t){let r=n??t;return i(`div`,{className:`relative inline-flex items-center gap-1 shrink-0`,children:[s&&i(`button`,{type:`button`,onClick:e=>{e.stopPropagation(),s()},disabled:o,className:`inline-flex items-center gap-1 rounded-md px-2 py-1 text-[10px] font-semibold border border-blue-500/30 bg-blue-500/10 text-blue-400 hover:bg-blue-500/20 disabled:opacity-50 disabled:cursor-not-allowed transition-colors`,title:`Update to ${r}`,children:[l(A,{className:`h-3 w-3`}),`Update`]}),i(`button`,{type:`button`,onClick:e=>{e.stopPropagation(),c()},disabled:o,"aria-label":`Select version to install`,title:`Installed ${e} — update available. Selected ${r}; tap to choose another version.`,className:`inline-flex items-center gap-1 rounded-md px-2 py-1 text-[10px] font-bold font-mono border border-amber-500/40 bg-amber-500/15 text-amber-500 hover:bg-amber-500/25 animate-pulse disabled:opacity-50 disabled:cursor-not-allowed transition-colors`,children:[l(`span`,{className:`font-normal opacity-70`,children:e}),l(`span`,{className:`font-normal opacity-70`,children:`→`}),r,l(F,{className:`h-3 w-3`})]}),u]})}return i(`div`,{className:`relative inline-flex items-center gap-1 shrink-0`,children:[i(`button`,{type:`button`,onClick:e=>{e.stopPropagation(),c()},disabled:o,className:[`inline-flex items-center gap-1 rounded-md px-2 py-1 text-[10px] font-bold font-mono border transition-colors disabled:opacity-50 disabled:cursor-not-allowed`,a===`local`?`border-orange-500/30 bg-orange-500/10 text-orange-400 hover:bg-orange-500/20`:`border-emerald-500/30 bg-emerald-500/10 text-emerald-400 hover:bg-emerald-500/20`].join(` `),title:`Version ${e} — tap to view all versions`,children:[e,l(F,{className:`h-3 w-3 opacity-50`})]}),u]})}function De({addonId:e}){let t=s(),{data:n=`inherit`}=g({addonId:e}),r=S({onSuccess:()=>{t.invalidateQueries({queryKey:[[`addons`,`getAddonAutoUpdate`]]})}});return l(`div`,{className:`flex rounded-lg border border-border overflow-hidden text-[10px] font-medium`,children:[`inherit`,`off`,`latest`,`beta`].map(t=>l(`button`,{type:`button`,onClick:n=>{n.stopPropagation(),r.mutate({addonId:e,channel:t})},disabled:r.isPending,className:`px-2.5 py-1 transition-colors capitalize ${n===t?t===`inherit`?`bg-gray-700/50 text-gray-700 dark:text-gray-300`:t===`off`?`bg-gray-700 text-gray-700 dark:text-gray-300`:t===`latest`?`bg-blue-500/20 text-blue-400`:`bg-amber-500/20 text-amber-400`:`bg-transparent text-foreground-subtle hover:bg-surface-hover`} ${t===`inherit`?``:`border-l border-border`}`,children:t},t))})}function Oe({addon:e,agents:t=[],clusterStatus:n,hideVersion:r,availableUpdate:a,onUpdate:f,isUpdating:p,jobProgress:ee,bundle:m,bulkItem:g,disabledByBulk:v,isSystem:te}){let[b,S]=c(!1),[C,w]=c(!1),[re,T]=c(!1),[E,ie]=c(null);u(()=>{ie(null)},[a]);let D=E??a,[oe,le]=c(!1),[ue,O]=c(!1),[k,A]=c(`logs`),M=s(),P=d(),fe=N(),pe=ce(),{manifest:I}=e,R=e.installedOn??[],z=!m&&!I.protected&&I.removable!==!1,B=!!m,H=m?.displayName??I.name,U=m?.packageName??I.packageName,W=m?.version??I.packageVersion??I.version,G=m?.installSource??e.installSource,K=m?m.bundle?.description??m.addons[0]?.manifest.description:I.description,q=ae({onSuccess:()=>{M.invalidateQueries({queryKey:[[`addons`]]}),M.invalidateQueries({queryKey:[[`addonPages`]]}),M.invalidateQueries({queryKey:[[`capabilities`]]})}}),J=ne({onSuccess:()=>{M.invalidateQueries({queryKey:[[`addons`]]})}}),be=_({onSuccess:()=>{M.invalidateQueries({queryKey:[[`addons`]]}),M.invalidateQueries({queryKey:[[`addonPages`]]}),M.invalidateQueries({queryKey:[[`capabilities`]]}),M.invalidateQueries({queryKey:[[`integrations`]]})}}),xe=y({onSuccess:()=>{M.invalidateQueries({queryKey:[[`addons`]]}),M.invalidateQueries({queryKey:[[`alerts`]]})}}),Y=e.health,X=Y?.phase===`failed`&&!Y.inGracePeriod,Q=X&&Y?.nextRetryAt&&!Y.retrying;return i(`div`,{className:`rounded-lg border bg-surface overflow-hidden ${X?`border-red-500/50`:`border-border`}`,children:[X&&Y&&i(`div`,{className:`bg-danger/10 border-b border-danger/30 px-4 py-2.5 flex items-start gap-2.5`,children:[l(ve,{className:`h-4 w-4 text-danger shrink-0 mt-0.5`}),i(`div`,{className:`flex-1 min-w-0`,children:[i(`div`,{className:`text-xs font-semibold text-danger`,children:[`Failed to load (attempt #`,Y.retryCount,`)`]}),l(`div`,{className:`text-[11px] text-foreground mt-0.5 break-words font-mono`,children:Y.lastError?.message??`Unknown error`}),Q&&Y.nextRetryAt&&i(`div`,{className:`text-[10px] text-foreground-subtle mt-1`,children:[`Auto-retry at `,new Date(Y.nextRetryAt).toLocaleTimeString()]})]}),i(`button`,{type:`button`,disabled:xe.isPending||Y.retrying,onClick:e=>{e.stopPropagation(),xe.mutate({packageName:U})},className:`inline-flex items-center gap-1.5 rounded-md px-2.5 py-1 text-[11px] font-semibold border border-red-400/40 bg-red-400/10 text-red-700 dark:text-red-300 hover:bg-red-400/20 disabled:opacity-50 disabled:cursor-not-allowed transition-colors shrink-0`,title:`Reset retry counter and force immediate reload`,children:[l(j,{className:`h-3 w-3 ${xe.isPending||Y.retrying?`animate-spin`:``}`}),`Retry now`]})]}),i(`div`,{className:`flex items-start gap-3 px-4 py-3`,children:[l(Te,{isBundle:B||!!I.components&&I.components.length>1,installSource:G,addonId:B?m.addons[0]?.manifest.id:I.id,iconPath:B?m.bundle?.icon??m.addons[0]?.manifest.icon:I.icon,color:B?m.addons[0]?.manifest.color:I.color}),i(`div`,{className:`flex-1 min-w-0`,children:[i(`div`,{className:`flex items-start justify-between gap-2`,children:[l(`span`,{className:`text-sm font-semibold text-foreground truncate min-w-0`,children:H}),!r&&l(Ee,{version:W,availableUpdate:a,...D===void 0?{}:{selectedVersion:D},isUpdating:p,installSource:G,disabled:v,...f&&D!==void 0?{onUpdate:()=>f(D)}:{},onOpenPicker:()=>T(e=>!e),children:re&&l(Ce,{packageName:U,currentVersion:W,...G?{installSource:G}:{},...a!==void 0&&D!==void 0?{selectedVersion:D,onSelect:e=>{ie(e),T(!1)}}:{},onInstall:e=>{T(!1),be.mutate({packageName:U,version:e})},onClose:()=>T(!1)})})]}),i(`div`,{className:`flex flex-wrap items-center gap-x-1.5 gap-y-1 mt-0.5`,children:[U!==H&&l(`span`,{className:`text-[10px] text-foreground-subtle font-mono truncate max-w-full`,children:U}),B&&i(`span`,{className:`text-[10px] rounded-full bg-primary/10 text-primary px-2 py-0.5 font-medium shrink-0 inline-flex items-center gap-1`,children:[l(ye,{className:`h-3 w-3`}),m.addons.length]}),te&&i(`span`,{className:`text-[10px] rounded-full bg-amber-500/15 text-amber-700 dark:text-amber-300 px-2 py-0.5 font-medium shrink-0 inline-flex items-center gap-1`,title:`System package — updating restarts the hub`,children:[l(j,{className:`h-3 w-3`}),`System`]}),g!=null&&l(Z,{item:g}),ee!=null&&l(Se,{progress:ee})]}),K&&l(`p`,{className:`text-[10px] text-foreground-subtle mt-1 line-clamp-1`,children:K}),!B&&e.process&&i(`div`,{className:`flex flex-wrap items-center gap-1.5 mt-1`,children:[l(`span`,{className:`text-[9px] rounded-full px-1.5 py-0.5 font-medium ${e.process.mode===`forked`?`bg-blue-500/15 text-blue-400`:`bg-gray-500/15 text-gray-400`}`,children:e.process.mode===`forked`?`forked`:`in-process`}),e.process.pid!=null&&i(`span`,{className:`text-[9px] font-mono text-foreground-subtle`,children:[`PID `,e.process.pid]}),l(`span`,{className:`text-[9px] rounded-full px-1.5 py-0.5 font-medium ${e.process.state===`running`?`bg-emerald-500/15 text-emerald-400`:e.process.state===`crashed`||e.process.state===`failed`?`bg-red-500/15 text-red-400`:`bg-gray-500/15 text-gray-400`}`,children:e.process.state})]})]})]}),!B&&i(`div`,{className:`flex items-center gap-1 px-4 py-1.5 border-t border-border/50 bg-surface-hover/20`,children:[i(`button`,{type:`button`,onClick:e=>{e.stopPropagation(),J.mutate({addonId:I.id})},disabled:J.isPending||v,className:`inline-flex items-center gap-1 rounded-md px-2 py-1 text-[10px] font-medium border border-border text-foreground-subtle hover:text-blue-400 hover:border-blue-500/30 hover:bg-blue-500/10 disabled:opacity-50 transition-colors`,children:[l(j,{className:`h-3 w-3 ${J.isPending?`animate-spin`:``}`}),`Restart`]}),i(`button`,{type:`button`,onClick:e=>{e.stopPropagation(),le(e=>!e)},className:`inline-flex items-center gap-1 rounded-md px-2 py-1 text-[10px] font-medium border transition-colors ${oe?`border-primary/30 bg-primary/10 text-primary`:`border-border text-foreground-subtle hover:text-foreground hover:border-primary/30 hover:bg-primary/10`}`,children:[l(he,{className:`h-3 w-3`}),`Logs`]}),!B&&i(`button`,{type:`button`,onClick:e=>{e.stopPropagation(),O(!0)},className:`inline-flex items-center gap-1 rounded-md px-2 py-1 text-[10px] font-medium border transition-colors ${ue?`border-primary/30 bg-primary/10 text-primary`:`border-border text-foreground-subtle hover:text-foreground hover:border-primary/30 hover:bg-primary/10`}`,children:[l(me,{className:`h-3 w-3`}),`Settings`]}),l(`div`,{className:`flex-1`}),z&&i(`button`,{type:`button`,onClick:async e=>{e.stopPropagation(),await pe({title:`Uninstall ${I.name}?`,message:`This will remove the addon package and all its data. This action cannot be undone.`,confirmLabel:`Uninstall`,variant:`danger`})&&q.mutate({packageName:I.packageName})},disabled:q.isPending||v,className:`inline-flex items-center gap-1 rounded-md px-2 py-1 text-[10px] font-medium border border-border text-foreground-subtle hover:text-red-400 hover:border-red-500/30 hover:bg-red-500/10 disabled:opacity-50 transition-colors`,children:[l(L,{className:`h-3 w-3`}),q.isPending?`Removing...`:`Uninstall`]})]}),n&&n.nodes.length>1&&!B&&i(`div`,{className:`border-t border-border px-4 py-2 bg-muted/10`,children:[l(`div`,{className:`text-[10px] font-medium text-foreground-subtle mb-1.5`,children:`Cluster Deployment`}),l(`div`,{className:`space-y-1`,children:n.nodes.map(e=>i(`div`,{className:`flex items-center gap-2 text-[10px]`,children:[l(`div`,{className:`h-1.5 w-1.5 rounded-full shrink-0 ${e.status===`offline`?`bg-muted-foreground/30`:e.synced?`bg-success`:`bg-amber-500`}`}),l(`span`,{className:`font-medium text-foreground min-w-[60px]`,children:e.name}),l(`span`,{className:`font-mono text-foreground-subtle`,children:e.version}),!e.synced&&e.status!==`offline`&&l(`span`,{className:`text-[9px] px-1 py-0.5 rounded bg-amber-500/10 text-amber-400 border border-amber-500/20`,children:`outdated`}),e.status===`offline`&&l(`span`,{className:`text-[9px] px-1 py-0.5 rounded bg-muted text-muted-foreground`,children:`offline`}),e.synced&&e.status!==`offline`&&l(`span`,{className:`text-[9px] text-success`,children:`synced`})]},e.nodeId))})]}),oe&&!B&&i(`div`,{className:`border-t border-border`,children:[i(`div`,{className:`flex items-center px-4 py-1 bg-surface-hover/20 border-b border-border/50`,children:[i(`div`,{className:`flex rounded border border-border overflow-hidden text-[9px]`,children:[l(`button`,{type:`button`,onClick:()=>A(`logs`),className:`px-2 py-0.5 transition-colors ${k===`logs`?`bg-primary/10 text-primary`:`text-foreground-subtle hover:bg-surface-hover`}`,children:`Logs`}),l(`button`,{type:`button`,onClick:()=>A(`events`),className:`px-2 py-0.5 border-l border-border transition-colors ${k===`events`?`bg-primary/10 text-primary`:`text-foreground-subtle hover:bg-surface-hover`}`,children:`Events`})]}),l(`div`,{className:`flex-1`}),l(`button`,{type:`button`,onClick:e=>{e.stopPropagation(),le(!1)},className:`text-foreground-subtle hover:text-foreground`,children:l(ge,{className:`h-3.5 w-3.5`})})]}),k===`logs`&&l(x,{addonId:I.id,maxHeight:`max-h-64`,showFilters:!1}),k===`events`&&l(se,{addonId:I.id,category:`addon.*`,maxHeight:`max-h-64`})]}),B&&i(o,{children:[l(`button`,{type:`button`,onClick:()=>S(e=>!e),className:`w-full flex items-center justify-center border-t border-border py-1 hover:bg-surface-hover/50 transition-colors`,children:l(b?_e:F,{className:`h-3.5 w-3.5 text-foreground-subtle`})}),b&&l(`div`,{className:`border-t border-border px-3 py-2 space-y-2`,children:m.addons.map(e=>l(Oe,{addon:e,agents:t,hideVersion:!0},e.manifest.id))})]}),ue&&!B&&l(`div`,{className:`fixed inset-0 z-50 flex items-center justify-center bg-black/60 backdrop-blur-sm p-4`,onClick:()=>O(!1),children:i(`div`,{className:`w-full max-w-lg max-h-[80vh] rounded-xl border border-border bg-surface shadow-2xl flex flex-col overflow-hidden`,onClick:e=>e.stopPropagation(),children:[i(`div`,{className:`flex items-center justify-between px-5 py-3 border-b border-border flex-shrink-0`,children:[i(`div`,{className:`flex items-center gap-2`,children:[l(me,{className:`h-4 w-4 text-primary`}),i(`h2`,{className:`text-sm font-semibold text-foreground`,children:[H,` Settings`]})]}),l(`button`,{onClick:()=>O(!1),className:`text-foreground-subtle hover:text-foreground transition-colors p-1 rounded`,children:l(ge,{className:`h-4 w-4`})})]}),i(`div`,{className:`flex-1 overflow-y-auto px-5 py-4 space-y-4`,children:[l(`div`,{className:`text-[10px] text-foreground-subtle mb-2`,children:`Cluster-wide settings — one value for every node. Per-node settings live under Cluster → the node → Settings.`}),l(V,{nodeId:null,addonIds:[I.id],level:`global`,fieldScope:`cluster`,emptyMessage:`This addon exposes no cluster-wide settings. Anything it can configure is per-node — open it from Cluster → the node → Settings.`}),we(I)&&i(`div`,{children:[l(`div`,{className:`text-[10px] font-medium text-foreground-subtle uppercase tracking-wide mb-2`,children:`Device export`}),l(h,{addonId:I.id,trpc:P.trpcClient,onOpenDevice:e=>fe(`/devices/${e}`)})]}),G===`npm`&&i(`div`,{children:[l(`div`,{className:`text-[10px] font-medium text-foreground-subtle uppercase tracking-wide mb-2`,children:`Auto-Update`}),l(De,{addonId:I.id})]}),I.components&&I.components.length>0&&i(`div`,{children:[i(`div`,{className:`text-[10px] font-medium text-foreground-subtle uppercase tracking-wide mb-2`,children:[`Components (`,I.components.length,`)`]}),l(`div`,{className:`flex flex-wrap gap-1`,children:I.components.map(e=>l(`span`,{className:`text-[10px] rounded bg-background border border-border px-1.5 py-0.5 text-foreground-subtle font-mono`,children:e},e))})]}),t.length>=2&&i(`div`,{children:[l(`div`,{className:`text-[10px] font-medium text-foreground-subtle uppercase tracking-wide mb-2`,children:`Installed on`}),i(`div`,{className:`flex items-center gap-1.5 flex-wrap`,children:[R.length===0&&l(`span`,{className:`text-[10px] text-foreground-subtle`,children:`Hub (local)`}),R.map(e=>l(`span`,{className:`rounded-full bg-surface-hover border border-border px-2 py-0.5 text-[10px] text-foreground-subtle`,children:e},e)),i(`div`,{className:`relative`,children:[i(`button`,{type:`button`,onClick:e=>{e.stopPropagation(),w(e=>!e)},className:`inline-flex items-center gap-1 rounded-full border border-dashed border-border px-2 py-0.5 text-[10px] text-foreground-subtle hover:text-foreground hover:border-primary transition-colors`,title:`Install on more agents`,children:[l(de,{className:`h-3 w-3`}),`Add agent`]}),C&&i(`div`,{className:`absolute left-0 top-full mt-1 z-10 min-w-[160px] rounded-md border border-border bg-surface shadow-lg overflow-hidden`,children:[t.filter(e=>!e.isHub&&!R.includes(e.name)).map(e=>l(`button`,{type:`button`,onClick:e=>{e.stopPropagation(),w(!1)},className:`w-full text-left px-3 py-1.5 text-[10px] text-foreground hover:bg-surface-hover transition-colors`,children:e.name},e.id)),t.filter(e=>!e.isHub&&!R.includes(e.name)).length===0&&l(`div`,{className:`px-3 py-1.5 text-[10px] text-foreground-subtle`,children:`No available agents`})]})]})]})]})]}),l(`div`,{className:`flex items-center justify-end px-5 py-3 border-t border-border flex-shrink-0`,children:l(`button`,{type:`button`,onClick:()=>O(!1),className:`rounded-lg border border-border px-3 py-1.5 text-xs font-medium text-foreground-subtle hover:text-foreground hover:bg-surface-hover transition-colors`,children:`Close`})})]})})]})}n();var ke=`.tgz,.tar.gz,.zip`;function Ae({onUploadSuccess:n}){let[r,a]=c(!1),s=t(null),u=e(async e=>{a(!0);let t=new FormData;t.append(`file`,e);let r=localStorage.getItem(`camstack_admin_token`)??``;try{(await(await fetch(`/api/addons/upload`,{method:`POST`,headers:{Authorization:`Bearer ${r}`},body:t})).json()).success&&n()}finally{a(!1)}},[n]);return i(o,{children:[l(`input`,{ref:s,type:`file`,accept:ke,onChange:e(e=>{let t=e.target.files?.[0];t&&u(t),e.target.value=``},[u]),className:`hidden`}),i(`button`,{type:`button`,onClick:()=>s.current?.click(),disabled:r,className:`flex items-center gap-1.5 px-3 py-1.5 text-xs rounded-md bg-surface hover:bg-surface-hover border border-border disabled:opacity-50 transition-colors`,children:[r?l(M,{className:`w-3.5 h-3.5 animate-spin`}):l(G,{className:`w-3.5 h-3.5`}),r?`Uploading...`:`Upload`]})]})}n();var je=[{seconds:900,label:`15m`},{seconds:3600,label:`1h`},{seconds:21600,label:`6h`},{seconds:43200,label:`12h`},{seconds:86400,label:`24h`}],Me=new Set([`@camstack/system`,`@camstack/types`,`@camstack/sdk`,`@camstack/shm-ring`,`@camstack/ui-library`]);function Ne(e){return e!==void 0&&Me.has(e)}var Pe={id:`hub`,name:`Hub`,isHub:!0,isOnline:!0};function Fe(e,t){let n=e??`hub-only`;return n===`any-node`?!0:n===`hub-only`?t:!t}function Ie(e){let t=e;if(!t?.manifest)return null;let n={...t.manifest,name:t.manifest.name??t.manifest.id,version:t.manifest.version??`0.0.0`,capabilities:t.manifest.capabilities??[]},r=t.process,i=r?{pid:r.pid,mode:r.mode===`forked`?`forked`:`in-process`,state:r.state??`unknown`}:void 0,a=t.health,o=t.declaration?.execution,s=t.manifest.execution,c=o?.placement??s?.placement;return{manifest:n,enabled:!0,source:t.source,installSource:t.installSource,installedOn:[],...i?{process:i}:{},hasBackup:t.hasBackup,...a?{health:a}:{},...c?{placement:c}:{}}}function Le(e){let t=new Map,n=[];for(let r of e){let e=r.manifest.packageName;if(!e){n.push(r);continue}let i=t.get(e);if(i)i.addons.push(r);else{let n=r.manifest.bundle,i={packageName:e,displayName:n?.displayName??r.manifest.packageDisplayName??r.manifest.name,version:r.manifest.packageVersion,addons:[r],...r.installSource===void 0?{}:{installSource:r.installSource},...n===void 0?{}:{bundle:n}};t.set(e,i)}}let r=[];for(let e of t.values())e.bundle!==void 0||e.addons.length>=2?r.push({bundle:e,representative:e.addons[0]}):r.push(e.addons[0]);return r.push(...n),r}function $(e){return`bundle`in e}function Re({addons:n,clusterStatus:o,selectedNode:d,onRefresh:f,isRefreshing:p}){let m=s(),[h,g]=c(``),v=r(h),[y,x]=c(!1),S=t(null);u(()=>{if(!y)return;let e=e=>{S.current&&!S.current.contains(e.target)&&x(!1)};return document.addEventListener(`mousedown`,e),()=>document.removeEventListener(`mousedown`,e)},[y]);let{data:C}=oe({nodeId:d.id}),ne=a(()=>{let e=new Map;for(let t of C??[])e.set(t.name,t.latestVersion);return e},[C]),w=a(()=>(C??[]).filter(e=>!e.isSystem).length,[C]),[T,E]=c(()=>new Set),[ae,D]=c(()=>new Map),se=e(e=>{E(t=>new Set(t).add(e))},[]),O=e(e=>{E(t=>{if(!t.has(e))return t;let n=new Set(t);return n.delete(e),n})},[]),k=e((e,t)=>{D(n=>new Map(n).set(e,t))},[]),de=e(e=>{D(t=>{if(!t.has(e))return t;let n=new Map(t);return n.delete(e),n})},[]),N=te({onMutate:e=>{se(e.name),de(e.name)},onSuccess:(e,t)=>{O(t.name);let n=e;if(n&&n.success===!1){k(t.name,n.error??`Update failed (no error message returned by server)`);return}m.invalidateQueries({queryKey:[[`addons`]]}),m.invalidateQueries({queryKey:[[`addons`,`listUpdates`]]})},onError:(e,t)=>{O(t.name),k(t.name,e instanceof Error?e.message:String(e))}}),P=xe(),F=t(new Set);u(()=>{let e=new Set;for(let[t,n]of P)J(n)&&e.add(t);let t=[...F.current].some(t=>!e.has(t));F.current=e,t&&(m.invalidateQueries({queryKey:[[`addons`]]}),m.invalidateQueries({queryKey:[[`addons`,`listUpdates`]]}))},[P,m]);let{data:I}=le(void 0),me=ue({onSuccess:()=>{m.invalidateQueries({queryKey:[[`addons`,`getAutoUpdateSettings`]]})}}),he=re({onSuccess:()=>{m.invalidateQueries({queryKey:[[`addons`,`getAutoUpdateSettings`]]})}}),{data:L,isFetching:ge}=b({query:v||void 0},{enabled:y}),B=ee(),{data:V}=ie(void 0),H=V?.requestedAt,[U,_e]=c(null),[ve,ye]=c(!1);u(()=>{if(V?.kind===`framework-bulk-update`&&V.requestedAt!==U){_e(V.requestedAt),ye(!0);let e=window.setTimeout(()=>ye(!1),6e3);return()=>window.clearTimeout(e)}},[H,U,V]),ce();let W=e(async()=>{let e=(C??[]).filter(e=>!e.isSystem);if(e.length!==0){if(!d.isHub){for(let t of e)await N.mutateAsync({name:t.name,version:t.latestVersion,nodeId:d.id});return}await B.mutateAsync({kind:`update`,targets:e.map(e=>({name:e.name,version:e.latestVersion})),nodeIds:[d.id]})}},[C,d.id,d.isHub,B,N]),G=_({onSuccess:()=>{m.invalidateQueries({queryKey:[[`addons`]]}),m.invalidateQueries({queryKey:[[`addonPages`]]}),m.invalidateQueries({queryKey:[[`capabilities`]]}),m.invalidateQueries({queryKey:[[`integrations`]]})}}),[K,q]=c(`type`),[be,Y]=c(()=>typeof window>`u`?`grouped`:window.localStorage.getItem(`camstack.addons.viewMode`)===`flat`?`flat`:`grouped`),Se=e=>{Y(e),typeof window<`u`&&window.localStorage.setItem(`camstack.addons.viewMode`,e)},[Ce,X]=pe(),Z=Ce.get(`capability`),Q=a(()=>{let e=n.filter(e=>!Ne(e.manifest.packageName));return d.isHub||(e=e.filter(e=>Fe(e.placement,d.isHub))),Z&&(e=e.filter(e=>(e.manifest.capabilities??[]).some(e=>(typeof e==`string`?e:e.name)===Z))),e},[n,d.isHub,Z]),we=()=>{let e=new URLSearchParams(Ce);e.delete(`capability`),X(e,{replace:!0})},Te=be===`flat`?Q:Le(Q),Ee=a(()=>{let e=[...Te];switch(K){case`type`:e.sort((e,t)=>{let n=+!$(e),r=+!$(t);if(n!==r)return n-r;let i=$(e)?e.bundle.displayName:e.manifest.name,a=$(t)?t.bundle.displayName:t.manifest.name;return i.localeCompare(a)});break;case`name`:e.sort((e,t)=>{let n=$(e)?e.bundle.displayName:e.manifest.name,r=$(t)?t.bundle.displayName:t.manifest.name;return n.localeCompare(r)});break;case`source`:e.sort((e,t)=>{let n=$(e)?e.bundle.installSource??``:e.installSource??``,r=$(t)?t.bundle.installSource??``:t.installSource??``;return n.localeCompare(r)});break}return e},[Te,K]);return i(`div`,{className:`space-y-4`,children:[[...ae.entries()].map(([e,t])=>l(`div`,{className:`rounded-md border border-danger/30 bg-danger/5 px-3 py-2 text-[11px]`,children:i(`div`,{className:`flex items-start justify-between gap-3`,children:[i(`div`,{className:`space-y-0.5`,children:[i(`div`,{className:`font-medium text-danger`,children:[`Failed to update `,e]}),l(`div`,{className:`text-foreground-subtle font-mono`,children:t})]}),l(`button`,{type:`button`,onClick:()=>de(e),className:`text-foreground-subtle hover:text-foreground text-[10px]`,children:`dismiss`})]})},e)),i(`div`,{className:`flex items-center gap-2 flex-wrap`,children:[i(`div`,{className:`flex items-center gap-1.5`,children:[l(`span`,{className:`text-[10px] text-foreground-subtle`,children:`Sort:`}),i(`select`,{value:K,onChange:e=>q(e.target.value),className:`rounded-md border border-border bg-surface px-2 py-1.5 text-[11px] text-foreground focus:outline-none focus:border-primary/50`,children:[l(`option`,{value:`type`,children:`Bundles first`}),l(`option`,{value:`name`,children:`Name`}),l(`option`,{value:`source`,children:`Install source`})]})]}),i(`div`,{className:`flex items-center gap-1.5`,children:[l(`span`,{className:`text-[10px] text-foreground-subtle`,children:`View:`}),l(`div`,{className:`flex rounded-md border border-border overflow-hidden text-[10px] font-medium`,children:[`grouped`,`flat`].map(e=>l(`button`,{type:`button`,onClick:()=>Se(e),className:`px-2.5 py-1.5 transition-colors capitalize ${be===e?`bg-primary/10 text-primary`:`bg-transparent text-foreground-subtle hover:bg-surface-hover`}`,title:e===`grouped`?`Group multi-addon packages into a bundle card`:`Show every addon as its own card`,children:e},e))})]}),d.isHub&&i(`div`,{className:`flex items-center gap-1.5`,children:[l(j,{className:`h-3 w-3 text-foreground-subtle`}),l(`span`,{className:`text-[10px] text-foreground-subtle`,children:`Auto-Update:`}),l(`div`,{className:`flex rounded-md border border-border overflow-hidden text-[10px] font-medium`,children:[`off`,`latest`,`beta`].map(e=>l(`button`,{type:`button`,onClick:()=>me.mutate({channel:e}),disabled:me.isPending,className:`px-2.5 py-1.5 transition-colors capitalize ${I?.channel===e?e===`off`?`bg-gray-700 text-gray-200`:e===`latest`?`bg-blue-500/20 text-blue-400`:`bg-amber-500/20 text-amber-400`:`bg-transparent text-foreground-subtle hover:bg-surface-hover`} ${e===`off`?``:`border-l border-border`}`,children:e},e))})]}),d.isHub&&i(`div`,{className:`flex items-center gap-1.5`,children:[l(`span`,{className:`text-[10px] text-foreground-subtle`,children:`Check every:`}),l(`select`,{className:`rounded-md border border-border bg-transparent px-1.5 py-1 text-[10px] font-medium text-foreground-subtle`,value:I?.updateCheckIntervalSeconds??21600,disabled:he.isPending||I===void 0,onChange:e=>{I!==void 0&&he.mutate({channel:I.channel,updateCheckIntervalSeconds:Number(e.target.value)})},children:je.map(e=>l(`option`,{value:e.seconds,children:e.label},e.seconds))})]}),w>0&&i(`button`,{type:`button`,onClick:()=>void W(),disabled:B.isPending,className:`flex items-center gap-1.5 px-2.5 py-1.5 text-[11px] rounded-md bg-blue-500/10 text-blue-400 hover:bg-blue-500/20 border border-blue-500/30 disabled:opacity-50 transition-colors font-medium`,children:[B.isPending?l(M,{className:`w-3 h-3 animate-spin`}):l(A,{className:`w-3 h-3`}),B.isPending?`Updating…`:`Update All (${w})`]}),i(`button`,{type:`button`,onClick:f,disabled:p||B.isPending,className:`flex items-center gap-1.5 px-2.5 py-1.5 text-[11px] rounded-md bg-surface hover:bg-surface-hover border border-border disabled:opacity-50 transition-colors`,children:[l(j,{className:`w-3 h-3 ${p?`animate-spin`:``}`}),`Refresh`]})]}),i(`div`,{className:`flex flex-col gap-2 sm:flex-row sm:items-center sm:gap-3`,children:[i(`div`,{className:`relative flex-1 min-w-0 sm:min-w-[200px]`,ref:S,children:[l(R,{className:`absolute left-2.5 top-1/2 -translate-y-1/2 h-3.5 w-3.5 text-foreground-subtle`}),l(`input`,{type:`text`,value:h,onChange:e=>{g(e.target.value),x(!0)},onFocus:()=>x(!0),placeholder:`Search addons on npm...`,disabled:B.isPending,className:`w-full rounded-lg border border-border bg-background pl-9 pr-3 py-2 text-xs text-foreground placeholder:text-foreground-subtle focus:outline-none focus:ring-1 focus:ring-primary disabled:opacity-50 disabled:cursor-not-allowed`}),ge&&l(M,{className:`absolute right-2.5 top-1/2 -translate-y-1/2 h-3 w-3 text-foreground-subtle animate-spin`}),y&&L&&L.length>0&&i(`div`,{className:`absolute left-0 right-0 top-full mt-1 z-40 rounded-lg border border-border bg-surface shadow-xl overflow-hidden`,children:[L.length>0&&i(`div`,{className:`px-3 py-1.5 text-[10px] uppercase tracking-wide text-foreground-subtle border-b border-border`,children:[`npm results (`,L.length,`)`]}),L&&L.length>0&&l(`div`,{className:`max-h-72 overflow-auto divide-y divide-border`,children:L.map(e=>i(`div`,{className:`flex items-center gap-3 px-3 py-2 hover:bg-surface-hover transition-colors`,children:[l(`div`,{className:`w-6 h-6 rounded-md bg-primary/10 flex items-center justify-center text-primary text-[9px] font-bold shrink-0`,children:e.name.replace(`@camstack/addon-`,``).charAt(0).toUpperCase()}),i(`div`,{className:`flex-1 min-w-0`,children:[i(`div`,{className:`flex items-baseline gap-2 min-w-0`,children:[l(`span`,{className:`text-[11px] font-semibold break-words`,children:e.name.replace(/^@camstack\/(addon-)?/,``)}),i(`span`,{className:`text-[10px] text-foreground-subtle shrink-0`,children:[`v`,e.version]})]}),l(`div`,{className:`font-mono text-[9px] text-foreground-subtle/80 truncate`,children:e.name}),e.description&&l(`div`,{className:`text-[10px] text-foreground-subtle truncate`,children:e.description})]}),e.installed?i(`span`,{className:`inline-flex items-center gap-1 px-2 py-1 text-[10px] font-medium rounded-md border border-emerald-500/30 bg-emerald-500/10 text-emerald-400 shrink-0`,children:[l(z,{className:`h-3 w-3`}),e.installedVersion??`Installed`]}):i(`button`,{type:`button`,onClick:()=>G.mutate({packageName:e.name}),disabled:G.isPending,className:`inline-flex items-center gap-1 px-2 py-1 text-[10px] font-medium rounded-md bg-primary text-primary-foreground hover:bg-primary/90 disabled:opacity-50 transition-colors shrink-0`,children:[G.isPending?l(M,{className:`h-3 w-3 animate-spin`}):l(A,{className:`h-3 w-3`}),`Install`]})]},e.name))})]})]}),l(Ae,{onUploadSuccess:()=>{m.invalidateQueries({queryKey:[[`addons`]]}),f()}})]}),Z&&i(`div`,{className:`flex items-center gap-2 px-3 py-2 rounded-lg bg-primary/10 border border-primary/30 text-sm`,children:[l(`span`,{className:`text-foreground-subtle`,children:`Filtering by capability:`}),l(`span`,{className:`font-mono text-primary font-semibold`,children:Z}),l(`button`,{type:`button`,onClick:we,className:`ml-auto text-xs text-foreground-subtle hover:text-foreground underline`,children:`Clear`})]}),ve&&i(`div`,{className:`fixed top-[calc(env(safe-area-inset-top)+1rem)] right-[calc(env(safe-area-inset-right)+1rem)] z-50 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 max-w-sm pointer-events-auto`,children:[l(fe,{className:`w-4 h-4 shrink-0 mt-0.5 text-green-400`}),i(`div`,{children:[l(`div`,{className:`text-[11px] font-semibold text-foreground`,children:`Bulk update completed`}),l(`div`,{className:`text-[10px] text-foreground-subtle mt-0.5`,children:`System packages updated — hub restarted successfully.`})]})]}),Q.length===0&&l(`div`,{className:`text-xs text-foreground-subtle`,children:n.length===0?`No addons installed`:Z?`No installed addons declare the "${Z}" capability. Browse the npm catalog above to find a compatible addon.`:`No addons compatible with ${d.name} (placement filter active)`}),l(`div`,{className:`space-y-2`,children:Ee.map(e=>{let t=$(e)?e.bundle.packageName:e.manifest.packageName,n=ne.get(t),r=$(e)?e.representative:e,i=n?e=>N.mutate({name:t,version:e,nodeId:d.id}):void 0,a=P.get(t)??null,s=a!==null&&J(a);return l(Oe,{addon:r,clusterStatus:o?.[r.manifest.id],bundle:$(e)?e.bundle:void 0,availableUpdate:n,isUpdating:T.has(t)||s,jobProgress:a,onUpdate:i,disabledByBulk:B.isPending},$(e)?t:e.manifest.id)})})]})}function ze(){let e=s(),{data:n,isLoading:r,isError:a}=w(),{data:o}=f(void 0),{nodes:c}=T(),{selection:d,selectNode:p,requestedNodeId:ee}=U(c.length>0?c:[Pe]),m=d.node??Pe,h=m.id,g=c.length>0?d.staleNodeId:null,_=E(),v=C(),y=_.isPending||v.isPending,te=async()=>{await _.mutateAsync({nodeId:h}),await v.mutateAsync(),e.invalidateQueries({queryKey:[[`addons`]]})},b=t(_);b.current=_;let x=t(ee??`hub`);u(()=>{b.current.mutate({nodeId:x.current})},[]);let S=(n??[]).map(Ie).filter(e=>e!==null);return i(B,{children:[i(`div`,{className:`flex items-center justify-between gap-3 flex-wrap`,children:[l(D,{selectedNodeId:h,onSelect:p}),i(`div`,{className:`flex items-center gap-3 flex-wrap`,children:[!r&&!a&&i(`span`,{className:`text-[10px] rounded-full bg-primary/10 text-primary px-2 py-0.5 font-medium`,children:[S.length,` installed`]}),i(`button`,{type:`button`,onClick:()=>void te(),disabled:y,className:`inline-flex items-center gap-1.5 px-2.5 py-1.5 text-[11px] rounded-md bg-surface hover:bg-surface-hover border border-border disabled:opacity-50 transition-colors`,title:`Re-fetch addons + check npm for new versions`,children:[l(j,{className:`w-3 h-3 ${y?`animate-spin`:``}`}),`Check for updates`]})]})]}),l(H,{staleNodeId:g,shownNodeName:m.name}),!m.isHub&&i(`div`,{className:`rounded-md border border-warning/30 bg-warning/5 px-3 py-2 text-[11px] text-foreground-subtle`,children:[`Showing only addons compatible with`,` `,l(`span`,{className:`font-medium text-foreground`,children:m.name}),` — agents only run`,` `,l(`code`,{className:`font-mono`,children:`agent-only`}),` and`,` `,l(`code`,{className:`font-mono`,children:`any-node`}),` addons. Install / uninstall is hub-driven; agents auto-sync from the hub.`]}),r&&l(`div`,{className:`text-xs text-foreground-subtle animate-pulse`,children:`Loading…`}),a&&l(`div`,{className:`text-xs text-danger`,children:`Failed to load addons`}),!r&&!a&&l(Re,{addons:S,clusterStatus:o,selectedNode:m,onRefresh:()=>void te(),isRefreshing:y})]})}export{ze as AddonsPage};
|