@camstack/addon-model-studio 1.1.287 → 1.1.288
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/_stub.js +618 -614
- package/dist/{_virtual_mf-localSharedImportMap___mfe_internal__addon_model_studio_page-BzQpOYl5.mjs → _virtual_mf-localSharedImportMap___mfe_internal__addon_model_studio_page-Bw7NedzE.mjs} +4 -4
- package/dist/{hostInit-DRhSO1r5.mjs → hostInit-B4Fk4H74.mjs} +3 -3
- package/dist/model-studio.addon.js +62 -3
- package/dist/model-studio.addon.mjs +62 -3
- package/dist/remoteEntry.js +1 -1
- package/dist/{virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_model_studio_page__remoteEntry_js-CPVxvHfW.mjs → virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_model_studio_page__remoteEntry_js-Da_taAOa.mjs} +1 -1
- package/package.json +1 -1
package/dist/_stub.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import "./virtualExposes-CWSi4E_g.mjs";
|
|
2
|
-
import "./virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_model_studio_page__remoteEntry_js-
|
|
2
|
+
import "./virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_model_studio_page__remoteEntry_js-Da_taAOa.mjs";
|
|
3
3
|
import { S as e, _ as t, a as n, b as r, d as i, f as a, g as o, h as s, i as c, l, m as u, n as d, p as f, r as p, t as m, u as h, v as g, y as _ } from "./_virtual_mf___mfe_internal__addon_model_studio_page__loadShare__react__loadShare__.js-DMBKVIH7.mjs";
|
|
4
4
|
import { n as v, r as y, t as b } from "./_virtual_mf___mfe_internal__addon_model_studio_page__loadShare__react_mf_1_jsx_mf_2_runtime__loadShare__.js-ds_Ehzaa.mjs";
|
|
5
5
|
import { n as x, r as S, t as C } from "./ui-text-BqZa5BNK.mjs";
|
|
@@ -4853,7 +4853,7 @@ B.deviceManager.getChildren.useQuery, B.deviceManager.getChildrenBatch.useQuery,
|
|
|
4853
4853
|
var Ha = B.pipelineOrchestrator.listAgentSettings.useQuery;
|
|
4854
4854
|
//#endregion
|
|
4855
4855
|
//#region ../ui-library/src/primitives/badge.tsx
|
|
4856
|
-
B.pipelineOrchestrator.removeAgentSettings.useMutation, B.pipelineOrchestrator.setAgentMaxCameras.useMutation, B.pipelineOrchestrator.setAgentCapabilities.useMutation, B.pipelineOrchestrator.setAgentDecodeLimits.useMutation, B.pipelineOrchestrator.setAgentReachableHost.useMutation, B.pipelineOrchestrator.setAgentInferenceDevices.useMutation, B.pipelineOrchestrator.getNodeInferenceDevices.useQuery, B.pipelineOrchestrator.resetNodePipelineDefaults.useMutation, B.pipelineOrchestrator.planAutoTune.useQuery, B.pipelineOrchestrator.applyAutoTune.useMutation, B.pipelineOrchestrator.setLoadBalancingShares.useMutation, B.pipelineOrchestrator.getPlacementStats.useQuery, B.pipelineOrchestrator.suggestShares.useQuery, B.pipelineOrchestrator.getEffectiveShares.useQuery, B.pipelineOrchestrator.setShareSource.useMutation, B.pipelineOrchestrator.getNodeBenchmarkPreflight.useQuery, B.pipelineOrchestrator.startNodeBenchmark.useMutation, B.pipelineOrchestrator.getNodeBenchmarkStatus.useQuery, B.pipelineOrchestrator.abortNodeBenchmark.useMutation, B.pipelineOrchestrator.getNodeBenchmarkCandidates.useQuery, B.pipelineOrchestrator.listNodeBenchmarkResults.useQuery, B.pipelineOrchestrator.deleteNodeBenchmarkResult.useMutation, B.pipelineOrchestrator.getCameraSettings.useQuery, B.pipelineOrchestrator.setCameraStepToggle.useMutation, B.pipelineOrchestrator.getCameraDetectionSource.useQuery, B.pipelineOrchestrator.setCameraDetectionSource.useMutation, B.pipelineOrchestrator.getCameraStepOverrides.useQuery, B.pipelineOrchestrator.setCameraStepOverride.useMutation, B.pipelineOrchestrator.setCameraStepSettings.useMutation, B.pipelineOrchestrator.setCameraPipelineForAgent.useMutation, B.pipelineOrchestrator.resolvePipeline.useQuery, B.pipelineOrchestrator.getCameraSwitches.useQuery, B.pipelineOrchestrator.setCameraSwitch.useMutation, B.pipelineOrchestrator.getCameraStatus.useQuery, B.pipelineOrchestrator.getCameraStatuses.useQuery, B.pipelineOrchestrator.setCameraSensors.useMutation, B.pipelineOrchestrator.reconcileFromDisk.useMutation, B.pipelineOrchestrator.getReconcileFromDiskStatus.useQuery, B.pipelineOrchestrator.getDeviceSettingsContribution.useQuery, B.pipelineOrchestrator.getDeviceLiveContribution.useQuery, B.pipelineOrchestrator.applyDeviceSettingsPatch.useMutation, B.pipelineRunner.attachCamera.useMutation, B.pipelineRunner.detachCamera.useMutation, B.pipelineRunner.reportMotion.useMutation, B.pipelineRunner.getLocalLoad.useQuery, B.pipelineRunner.getLocalMetrics.useQuery, B.pipelineRunner.getCameraMetrics.useQuery, B.pipelineRunner.getAllCameraMetrics.useQuery, B.pipelineRunner.getLocalCameras.useQuery, B.pipelineRunner.requestOccupancyBurst.useMutation, B.pipelineRunner.getNativeCrop.useQuery, B.pipelineRunner.runDetailSubtree.useMutation, B.pipelineRunner.runStatelessStep.useMutation, B.pipelineRunner.parkTrackFrame.useMutation, B.pipelineRunner.getParkedTrackFrame.useQuery, B.pipelineRunner.releaseParkedTrackFrames.useMutation, B.pipelineRunner.startNodeBench.useMutation, B.pipelineRunner.getNodeBenchStatus.useQuery, B.pipelineRunner.abortNodeBench.useMutation, B.plateGallery.listPlates.useQuery, B.plateGallery.getPlateByTrack.useQuery, B.plateGallery.getPlateMedia.useQuery, B.plateGallery.searchPlates.useQuery, B.plateGallery.suggestPlateClusters.useQuery, B.plateGallery.correctPlateText.useMutation, B.plateGallery.deletePlate.useMutation, B.plateGallery.listVehicles.useQuery, B.plateGallery.createVehicle.useMutation, B.plateGallery.renameVehicle.useMutation, B.plateGallery.deleteVehicle.useMutation, B.plateGallery.listVehicleSamples.useQuery, B.plateGallery.removeVehicleSample.useMutation, B.plateGallery.assignPlate.useMutation, B.plateGallery.unassignPlate.useMutation, B.plateGallery.assignPlates.useMutation, B.plateGallery.unassignPlates.useMutation, B.powerMeter.getStatus.useQuery, B.presence.getStatus.useQuery, B.pressureSensor.getStatus.useQuery, B.privacyMask.getOptions.useQuery, B.privacyMask.setMask.useMutation, B.privacyMask.setAudioEnabled.useMutation, B.privacyMask.getStatus.useQuery, B.ptz.move.useMutation, B.ptz.continuousMove.useMutation, B.ptz.stop.useMutation, B.ptz.getPresets.useQuery, B.ptz.goToPreset.useMutation, B.ptz.savePreset.useMutation, B.ptz.deletePreset.useMutation, B.ptz.getOptions.useQuery, B.ptz.goHome.useMutation, B.ptz.getHomePreset.useQuery, B.ptz.setHomePreset.useMutation, B.ptz.captureHomeHere.useMutation, B.ptz.getHomeReturn.useQuery, B.ptz.setHomeReturn.useMutation, B.ptz.getPosition.useQuery, B.ptz.setAutofocus.useMutation, B.ptz.getStatus.useQuery, B.ptzAutotrack.getStatus.useQuery, B.ptzAutotrack.setEnabled.useMutation, B.ptzAutotrack.getSettings.useQuery, B.ptzAutotrack.setSettings.useMutation, B.reboot.reboot.useMutation, B.recordEntries.listEntryKinds.useQuery, B.recordEntries.listEntries.useQuery, B.recordEntries.putEntry.useMutation, B.recordEntries.deleteEntry.useMutation, B.recording.listSources.useQuery, B.recording.getAvailability.useQuery, B.recording.getDaysWithRecordings.useQuery, B.recording.getPlayback.useQuery, B.recording.getPlaybackOptions.useQuery, B.recordingArchive.getAvailabilityBatch.useQuery, B.recordingArchive.getDaysWithRecordingsBatch.useQuery, B.recordingArchive.getStorageUsage.useQuery, B.recordingArchive.getDeviceConfig.useQuery, B.recordingArchive.locateSegment.useQuery, B.recordingArchive.readSegmentBytes.useQuery, B.recordingArchive.readGopBytes.useQuery, B.recordingArchive.readWindowBytes.useQuery, B.recordingArchive.setDeviceConfig.useMutation, B.recordingArchive.rescanStorage.useMutation, B.recordingArchive.pruneFootage.useMutation, B.recordingArchive.deleteFootprint.useMutation, B.recordingArchive.listOpsLog.useQuery, B.recordingArchive.renderGif.useMutation, B.recordingArchive.renderClip.useMutation, B.recordingArchive.pauseForStorageMigration.useMutation, B.recordingArchive.resumeForStorageMigration.useMutation, B.recordingArchive.refreshStorageLocationsForMigration.useMutation, B.recordingArchive.startStorageMigrationMove.useMutation, B.recordingArchive.getStorageMigrationMoveStatus.useQuery, B.recordingArchive.cancelStorageMigrationMove.useMutation, B.recordingArchive.relocateFootage.useMutation, B.recordingArchive.listRelocateJobs.useQuery, B.recordingArchive.getRelocateResidue.useQuery, B.recordingArchive.reconcileLedgerAgainstDisk.useMutation, B.recordingArchive.cancelRelocateJob.useMutation, B.recordingArchive.planStorageRebalance.useQuery, B.recordingArchive.startStorageRebalance.useMutation, B.recordingArchive.getPlacement.useQuery, B.recordingArchive.setDevicePlacement.useMutation, B.recordingArchive.getStatus.useQuery, B.recordingArchive.getDeviceSettingsContribution.useQuery, B.recordingArchive.getDeviceLiveContribution.useQuery, B.recordingArchive.applyDeviceSettingsPatch.useMutation, B.recordingExport.createExport.useMutation, B.recordingExport.listExports.useQuery, B.recordingExport.getExport.useQuery, B.recordingExport.cancelExport.useMutation, B.recordingExport.deleteExport.useMutation, B.recordingExport.getDownloadUrl.useQuery, B.recordingExport.readExportBytes.useQuery, B.recordingOnboard.getOptions.useQuery, B.recordingOnboard.setSettings.useMutation, B.recordingOnboard.getStatus.useQuery, B.recordingSignal.getStatus.useQuery, B.sceneMonitor.listScenes.useQuery, B.sceneMonitor.listScenesBatch.useQuery, B.sceneMonitor.createScene.useMutation, B.sceneMonitor.updateScene.useMutation, B.sceneMonitor.deleteScene.useMutation, B.sceneMonitor.captureReference.useMutation, B.sceneMonitor.deleteReference.useMutation, B.sceneMonitor.recheckNow.useMutation, B.sceneMonitor.resetScene.useMutation, B.sceneMonitor.getStatus.useQuery, B.scriptRunner.run.useMutation, B.scriptRunner.stop.useMutation, B.scriptRunner.getStatus.useQuery, B.serverManagement.getServerPackageStatus.useQuery, B.serverManagement.checkServerUpdate.useMutation, B.serverManagement.applyServerUpdate.useMutation, B.serverManagement.rollbackServerUpdate.useMutation, B.serverManagement.restartServer.useMutation, B.settingsStore.get.useQuery, B.settingsStore.set.useMutation, B.settingsStore.query.useQuery, B.settingsStore.upsert.useMutation, B.settingsStore.upsertMany.useMutation, B.settingsStore.insert.useMutation, B.settingsStore.insertMany.useMutation, B.settingsStore.transact.useMutation, B.settingsStore.update.useMutation, B.settingsStore.delete.useMutation, B.settingsStore.deleteWhere.useMutation, B.settingsStore.updateWhere.useMutation, B.settingsStore.count.useQuery, B.settingsStore.aggregate.useQuery, B.settingsStore.histogram.useQuery, B.settingsStore.isEmpty.useQuery, B.settingsStore.declareCollection.useMutation, B.smoke.getStatus.useQuery, B.snapshot.getSnapshot.useQuery, B.snapshot.invalidateCache.useMutation, B.snapshot.getSnapshotOverview.useQuery, B.snapshot.getDebugState.useQuery, B.snapshot.getSnapshotLinks.useQuery, B.snapshot.getStatus.useQuery, B.snapshot.getDeviceSettingsContribution.useQuery, B.snapshot.getDeviceLiveContribution.useQuery, B.snapshot.applyDeviceSettingsPatch.useMutation, B.storage.resolve.useQuery, B.storage.write.useMutation, B.storage.read.useQuery, B.storage.exists.useQuery, B.storage.list.useQuery, B.storage.delete.useMutation, B.storage.getAvailableSpace.useQuery, B.storage.beginUpload.useMutation, B.storage.writeChunk.useMutation, B.storage.finalizeUpload.useMutation, B.storage.abortUpload.useMutation, B.storage.beginDownload.useMutation, B.storage.readChunk.useQuery, B.storage.endDownload.useMutation, B.storage.listLocations.useQuery, B.storage.listLocationDeclarations.useQuery, B.storage.upsertLocation.useMutation, B.storage.deleteLocation.useMutation, B.storage.listDrainProgress.useQuery, B.storage.testLocation.useQuery, B.storage.listProviders.useQuery, B.storage.testConfig.useQuery, B.storageMigration.plan.useQuery, B.storageMigration.start.useMutation, B.storageMigration.status.useQuery, B.storageMigration.cancel.useMutation, B.storageMigration.movers.useQuery, B.storageMigration.moverClearance.useQuery, B.storageMigration.residue.useQuery, B.storageMigration.drain.useMutation, B.storageMigration.cleanupStart.useMutation, B.storageMigration.cleanupStatus.useQuery, B.storageMigration.cleanupCancel.useMutation, B.storageMigration.history.useQuery, B.streamBroker.reportStreamSignal.useMutation, B.streamBroker.publishCameraStream.useMutation, B.streamBroker.retractCameraStream.useMutation, B.streamBroker.assignProfile.useMutation, B.streamBroker.unassignProfile.useMutation, B.streamBroker.forgetDeviceHardware.useMutation, B.streamBroker.renderPreBufferClip.useMutation, B.streamBroker.produceEventMedia.useMutation, B.streamBroker.fetchEventMedia.useMutation, B.streamBroker.listAllCameraStreams.useQuery, B.streamBroker.listAllProfileSlots.useQuery, B.streamBroker.getBrokerStats.useQuery, B.streamBroker.probeStream.useMutation, B.streamBroker.listClients.useQuery, B.streamBroker.getLiveViewerCounts.useQuery, B.streamBroker.killClient.useMutation, B.streamBroker.restartProfile.useMutation, B.streamBroker.getStreamUrl.useQuery, B.streamBroker.getStreamWithCodec.useMutation, B.streamBroker.releaseStreamWithCodec.useMutation, B.streamBroker.acquireEgressTranscode.useMutation, B.streamBroker.releaseEgressTranscode.useMutation, B.streamBroker.subscribeAudioChunks.useMutation, B.streamBroker.pullAudioChunks.useQuery, B.streamBroker.unsubscribeAudioChunks.useMutation, B.streamBroker.setPreBufferDuration.useMutation, B.streamBroker.getPreBufferInfo.useQuery, B.streamBroker.getRtspPort.useQuery, B.streamBroker.getAllRtspEntries.useQuery, B.streamBroker.getRtspEntry.useQuery, B.streamBroker.regenerateRtspToken.useMutation, B.streamBroker.setRtspEnabled.useMutation, B.streamBroker.isRtspEnabled.useQuery, B.streamBroker.getDeviceAudioMute.useQuery, B.streamBroker.setDeviceAudioMute.useMutation, B.streamBroker.getDeviceSettingsContribution.useQuery, B.streamBroker.getDeviceLiveContribution.useQuery, B.streamBroker.applyDeviceSettingsPatch.useMutation, B.streamCatalog.getCatalog.useQuery, B.streamParams.getOptions.useQuery, B.streamParams.setProfile.useMutation, B.streamParams.getConfigSchema.useQuery, B.streamParams.getStatus.useQuery, B.streamSignals.listSignals.useQuery, B.switch.setState.useMutation, B.switch.getStatus.useQuery, B.system.info.useQuery, B.system.health.useQuery, B.system.featureFlags.useQuery, B.system.networkAddresses.useQuery, B.system.getRetentionConfig.useQuery, B.system.setRetentionConfig.useMutation, B.system.forceRetentionCleanup.useMutation, B.system.getSiteLocation.useQuery, B.system.setSiteLocation.useMutation, B.system.detectSiteLocation.useMutation, B.system.getRequestCensus.useQuery, B.system.getLoadContributions.useQuery, B.system.getFailureContributions.useQuery, B.system.getLoggingSettings.useQuery, B.system.setLoggingSettings.useMutation, B.tamper.getStatus.useQuery, B.temperatureSensor.getStatus.useQuery, B.terminalSession.listProfiles.useQuery, B.terminalSession.listInstances.useQuery, B.terminalSession.createInstance.useMutation, B.terminalSession.updateInstance.useMutation, B.terminalSession.deleteInstance.useMutation, B.terminalSession.setInstanceEnabled.useMutation, B.terminalSession.listLegacyCameras.useQuery, B.terminalSession.adoptLegacyMonitor.useMutation, B.terminalSession.listSessions.useQuery, B.terminalSession.openSession.useMutation, B.terminalSession.resize.useMutation, B.terminalSession.pullOutput.useMutation, B.terminalSession.writeInput.useMutation, B.terminalSession.close.useMutation, B.toast.onToast.useSubscription, B.training.listBaseModels.useQuery, B.training.planJob.useQuery, B.training.startJob.useMutation, B.training.startJobBatch.useMutation, B.training.listJobs.useQuery, B.training.getJob.useQuery, B.training.cancelJob.useMutation, B.training.getJobResult.useQuery, B.training.registerResult.useMutation, B.training.canaryResult.useMutation, B.training.rollbackCanary.useMutation, B.training.discardResult.useMutation, B.turnProvider.getTurnServers.useQuery, B.update.installUpdate.useMutation, B.update.getStatus.useQuery, B.userManagement.listUsers.useQuery, B.userManagement.createUser.useMutation, B.userManagement.updateUser.useMutation, B.userManagement.deleteUser.useMutation, B.userManagement.resetPassword.useMutation, B.userManagement.setUserScopes.useMutation, B.userManagement.validateCredentials.useMutation, B.userManagement.setupTotp.useMutation, B.userManagement.confirmTotp.useMutation, B.userManagement.disableTotp.useMutation, B.userManagement.getTotpStatus.useQuery, B.userManagement.migrateRawSecrets.useMutation, B.userManagement.verifyTotp.useMutation, B.userManagement.oauthIssueCode.useMutation, B.userManagement.oauthExchangeCode.useMutation, B.userManagement.oauthRefresh.useMutation, B.userManagement.oauthVerifyAccessToken.useQuery, B.userManagement.listExternalIdentities.useQuery, B.userManagement.findUserByExternalIdentity.useQuery, B.userManagement.unlinkExternalIdentity.useMutation, B.userManagement.listOauthSessions.useQuery, B.userManagement.revokeOauthSession.useMutation, B.vacuumControl.start.useMutation, B.vacuumControl.pause.useMutation, B.vacuumControl.stop.useMutation, B.vacuumControl.returnToBase.useMutation, B.vacuumControl.locate.useMutation, B.vacuumControl.setFanSpeed.useMutation, B.vacuumControl.getStatus.useQuery, B.valve.open.useMutation, B.valve.close.useMutation, B.valve.stop.useMutation, B.valve.setPosition.useMutation, B.valve.getStatus.useQuery, B.vibration.getStatus.useQuery, B.videoclips.listClips.useQuery, B.videoclips.listSources.useQuery, B.videoclips.getClipPlayback.useQuery, B.videoclips.readClipBytes.useQuery, B.videoclips.offerClipBytes.useQuery, B.videoclips.dialClipStream.useQuery, B.videoclips.getPlaybackOptions.useQuery, B.waterHeater.setTargetTemp.useMutation, B.waterHeater.setOperationMode.useMutation, B.waterHeater.setAway.useMutation, B.waterHeater.getStatus.useQuery, B.weather.getStatus.useQuery, B.webrtcSession.listStreams.useQuery, B.webrtcSession.createSession.useMutation, B.webrtcSession.handleOffer.useMutation, B.webrtcSession.handleAnswer.useMutation, B.webrtcSession.addIceCandidate.useMutation, B.webrtcSession.getIceCandidates.useQuery, B.webrtcSession.closeSession.useMutation, B.webrtcSession.hasAdaptiveBitrate.useQuery, B.webrtcSession.getSessionState.useQuery, B.webrtcSession.applyDownlinkProbe.useMutation, B.webrtcSession.getSessionDebug.useQuery, B.zoneAnalytics.getCurrentSnapshot.useQuery, B.zoneAnalytics.getCurrentSnapshotBatch.useQuery, B.zoneAnalytics.getZoneHistory.useQuery, B.zoneAnalytics.getCameraHistory.useQuery, B.zoneAnalytics.getUnzonedHistory.useQuery, B.zoneRules.listRules.useQuery, B.zoneRules.setRules.useMutation, B.zones.listZones.useQuery, B.zones.addZone.useMutation, B.zones.removeZone.useMutation, B.zones.updateZone.useMutation, e(), d(null), e(), e();
|
|
4856
|
+
B.pipelineOrchestrator.removeAgentSettings.useMutation, B.pipelineOrchestrator.setAgentMaxCameras.useMutation, B.pipelineOrchestrator.setAgentCapabilities.useMutation, B.pipelineOrchestrator.setAgentDecodeLimits.useMutation, B.pipelineOrchestrator.setAgentReachableHost.useMutation, B.pipelineOrchestrator.setAgentInferenceDevices.useMutation, B.pipelineOrchestrator.getNodeInferenceDevices.useQuery, B.pipelineOrchestrator.forgetInferenceDevice.useMutation, B.pipelineOrchestrator.resetNodePipelineDefaults.useMutation, B.pipelineOrchestrator.planAutoTune.useQuery, B.pipelineOrchestrator.applyAutoTune.useMutation, B.pipelineOrchestrator.setLoadBalancingShares.useMutation, B.pipelineOrchestrator.getPlacementStats.useQuery, B.pipelineOrchestrator.suggestShares.useQuery, B.pipelineOrchestrator.getEffectiveShares.useQuery, B.pipelineOrchestrator.setShareSource.useMutation, B.pipelineOrchestrator.getNodeBenchmarkPreflight.useQuery, B.pipelineOrchestrator.startNodeBenchmark.useMutation, B.pipelineOrchestrator.getNodeBenchmarkStatus.useQuery, B.pipelineOrchestrator.abortNodeBenchmark.useMutation, B.pipelineOrchestrator.getNodeBenchmarkCandidates.useQuery, B.pipelineOrchestrator.listNodeBenchmarkResults.useQuery, B.pipelineOrchestrator.deleteNodeBenchmarkResult.useMutation, B.pipelineOrchestrator.getCameraSettings.useQuery, B.pipelineOrchestrator.setCameraStepToggle.useMutation, B.pipelineOrchestrator.getCameraDetectionSource.useQuery, B.pipelineOrchestrator.setCameraDetectionSource.useMutation, B.pipelineOrchestrator.getCameraStepOverrides.useQuery, B.pipelineOrchestrator.setCameraStepOverride.useMutation, B.pipelineOrchestrator.setCameraStepSettings.useMutation, B.pipelineOrchestrator.setCameraPipelineForAgent.useMutation, B.pipelineOrchestrator.resolvePipeline.useQuery, B.pipelineOrchestrator.getCameraSwitches.useQuery, B.pipelineOrchestrator.setCameraSwitch.useMutation, B.pipelineOrchestrator.getCameraStatus.useQuery, B.pipelineOrchestrator.getCameraStatuses.useQuery, B.pipelineOrchestrator.setCameraSensors.useMutation, B.pipelineOrchestrator.reconcileFromDisk.useMutation, B.pipelineOrchestrator.getReconcileFromDiskStatus.useQuery, B.pipelineOrchestrator.getDeviceSettingsContribution.useQuery, B.pipelineOrchestrator.getDeviceLiveContribution.useQuery, B.pipelineOrchestrator.applyDeviceSettingsPatch.useMutation, B.pipelineRunner.attachCamera.useMutation, B.pipelineRunner.detachCamera.useMutation, B.pipelineRunner.reportMotion.useMutation, B.pipelineRunner.getLocalLoad.useQuery, B.pipelineRunner.getLocalMetrics.useQuery, B.pipelineRunner.getCameraMetrics.useQuery, B.pipelineRunner.getAllCameraMetrics.useQuery, B.pipelineRunner.getLocalCameras.useQuery, B.pipelineRunner.requestOccupancyBurst.useMutation, B.pipelineRunner.getNativeCrop.useQuery, B.pipelineRunner.runDetailSubtree.useMutation, B.pipelineRunner.runStatelessStep.useMutation, B.pipelineRunner.parkTrackFrame.useMutation, B.pipelineRunner.getParkedTrackFrame.useQuery, B.pipelineRunner.releaseParkedTrackFrames.useMutation, B.pipelineRunner.startNodeBench.useMutation, B.pipelineRunner.getNodeBenchStatus.useQuery, B.pipelineRunner.abortNodeBench.useMutation, B.plateGallery.listPlates.useQuery, B.plateGallery.getPlateByTrack.useQuery, B.plateGallery.getPlateMedia.useQuery, B.plateGallery.searchPlates.useQuery, B.plateGallery.suggestPlateClusters.useQuery, B.plateGallery.correctPlateText.useMutation, B.plateGallery.deletePlate.useMutation, B.plateGallery.listVehicles.useQuery, B.plateGallery.createVehicle.useMutation, B.plateGallery.renameVehicle.useMutation, B.plateGallery.deleteVehicle.useMutation, B.plateGallery.listVehicleSamples.useQuery, B.plateGallery.removeVehicleSample.useMutation, B.plateGallery.assignPlate.useMutation, B.plateGallery.unassignPlate.useMutation, B.plateGallery.assignPlates.useMutation, B.plateGallery.unassignPlates.useMutation, B.powerMeter.getStatus.useQuery, B.presence.getStatus.useQuery, B.pressureSensor.getStatus.useQuery, B.privacyMask.getOptions.useQuery, B.privacyMask.setMask.useMutation, B.privacyMask.setAudioEnabled.useMutation, B.privacyMask.getStatus.useQuery, B.ptz.move.useMutation, B.ptz.continuousMove.useMutation, B.ptz.stop.useMutation, B.ptz.getPresets.useQuery, B.ptz.goToPreset.useMutation, B.ptz.savePreset.useMutation, B.ptz.deletePreset.useMutation, B.ptz.getOptions.useQuery, B.ptz.goHome.useMutation, B.ptz.getHomePreset.useQuery, B.ptz.setHomePreset.useMutation, B.ptz.captureHomeHere.useMutation, B.ptz.getHomeReturn.useQuery, B.ptz.setHomeReturn.useMutation, B.ptz.getPosition.useQuery, B.ptz.setAutofocus.useMutation, B.ptz.getStatus.useQuery, B.ptzAutotrack.getStatus.useQuery, B.ptzAutotrack.setEnabled.useMutation, B.ptzAutotrack.getSettings.useQuery, B.ptzAutotrack.setSettings.useMutation, B.reboot.reboot.useMutation, B.recordEntries.listEntryKinds.useQuery, B.recordEntries.listEntries.useQuery, B.recordEntries.putEntry.useMutation, B.recordEntries.deleteEntry.useMutation, B.recording.listSources.useQuery, B.recording.getAvailability.useQuery, B.recording.getDaysWithRecordings.useQuery, B.recording.getPlayback.useQuery, B.recording.getPlaybackOptions.useQuery, B.recordingArchive.getAvailabilityBatch.useQuery, B.recordingArchive.getDaysWithRecordingsBatch.useQuery, B.recordingArchive.getStorageUsage.useQuery, B.recordingArchive.getDeviceConfig.useQuery, B.recordingArchive.locateSegment.useQuery, B.recordingArchive.readSegmentBytes.useQuery, B.recordingArchive.readGopBytes.useQuery, B.recordingArchive.readWindowBytes.useQuery, B.recordingArchive.setDeviceConfig.useMutation, B.recordingArchive.rescanStorage.useMutation, B.recordingArchive.pruneFootage.useMutation, B.recordingArchive.deleteFootprint.useMutation, B.recordingArchive.listOpsLog.useQuery, B.recordingArchive.renderGif.useMutation, B.recordingArchive.renderClip.useMutation, B.recordingArchive.pauseForStorageMigration.useMutation, B.recordingArchive.resumeForStorageMigration.useMutation, B.recordingArchive.refreshStorageLocationsForMigration.useMutation, B.recordingArchive.startStorageMigrationMove.useMutation, B.recordingArchive.getStorageMigrationMoveStatus.useQuery, B.recordingArchive.cancelStorageMigrationMove.useMutation, B.recordingArchive.relocateFootage.useMutation, B.recordingArchive.listRelocateJobs.useQuery, B.recordingArchive.getRelocateResidue.useQuery, B.recordingArchive.reconcileLedgerAgainstDisk.useMutation, B.recordingArchive.cancelRelocateJob.useMutation, B.recordingArchive.planStorageRebalance.useQuery, B.recordingArchive.startStorageRebalance.useMutation, B.recordingArchive.getPlacement.useQuery, B.recordingArchive.setDevicePlacement.useMutation, B.recordingArchive.getStatus.useQuery, B.recordingArchive.getDeviceSettingsContribution.useQuery, B.recordingArchive.getDeviceLiveContribution.useQuery, B.recordingArchive.applyDeviceSettingsPatch.useMutation, B.recordingExport.createExport.useMutation, B.recordingExport.listExports.useQuery, B.recordingExport.getExport.useQuery, B.recordingExport.cancelExport.useMutation, B.recordingExport.deleteExport.useMutation, B.recordingExport.getDownloadUrl.useQuery, B.recordingExport.readExportBytes.useQuery, B.recordingOnboard.getOptions.useQuery, B.recordingOnboard.setSettings.useMutation, B.recordingOnboard.getStatus.useQuery, B.recordingSignal.getStatus.useQuery, B.sceneMonitor.listScenes.useQuery, B.sceneMonitor.listScenesBatch.useQuery, B.sceneMonitor.createScene.useMutation, B.sceneMonitor.updateScene.useMutation, B.sceneMonitor.deleteScene.useMutation, B.sceneMonitor.captureReference.useMutation, B.sceneMonitor.deleteReference.useMutation, B.sceneMonitor.recheckNow.useMutation, B.sceneMonitor.resetScene.useMutation, B.sceneMonitor.getStatus.useQuery, B.scriptRunner.run.useMutation, B.scriptRunner.stop.useMutation, B.scriptRunner.getStatus.useQuery, B.serverManagement.getServerPackageStatus.useQuery, B.serverManagement.checkServerUpdate.useMutation, B.serverManagement.applyServerUpdate.useMutation, B.serverManagement.rollbackServerUpdate.useMutation, B.serverManagement.restartServer.useMutation, B.settingsStore.get.useQuery, B.settingsStore.set.useMutation, B.settingsStore.query.useQuery, B.settingsStore.upsert.useMutation, B.settingsStore.upsertMany.useMutation, B.settingsStore.insert.useMutation, B.settingsStore.insertMany.useMutation, B.settingsStore.transact.useMutation, B.settingsStore.update.useMutation, B.settingsStore.delete.useMutation, B.settingsStore.deleteWhere.useMutation, B.settingsStore.updateWhere.useMutation, B.settingsStore.count.useQuery, B.settingsStore.aggregate.useQuery, B.settingsStore.histogram.useQuery, B.settingsStore.isEmpty.useQuery, B.settingsStore.declareCollection.useMutation, B.smoke.getStatus.useQuery, B.snapshot.getSnapshot.useQuery, B.snapshot.invalidateCache.useMutation, B.snapshot.getSnapshotOverview.useQuery, B.snapshot.getDebugState.useQuery, B.snapshot.getSnapshotLinks.useQuery, B.snapshot.getStatus.useQuery, B.snapshot.getDeviceSettingsContribution.useQuery, B.snapshot.getDeviceLiveContribution.useQuery, B.snapshot.applyDeviceSettingsPatch.useMutation, B.storage.resolve.useQuery, B.storage.write.useMutation, B.storage.read.useQuery, B.storage.exists.useQuery, B.storage.list.useQuery, B.storage.delete.useMutation, B.storage.getAvailableSpace.useQuery, B.storage.beginUpload.useMutation, B.storage.writeChunk.useMutation, B.storage.finalizeUpload.useMutation, B.storage.abortUpload.useMutation, B.storage.beginDownload.useMutation, B.storage.readChunk.useQuery, B.storage.endDownload.useMutation, B.storage.listLocations.useQuery, B.storage.listLocationDeclarations.useQuery, B.storage.upsertLocation.useMutation, B.storage.deleteLocation.useMutation, B.storage.listDrainProgress.useQuery, B.storage.testLocation.useQuery, B.storage.listProviders.useQuery, B.storage.testConfig.useQuery, B.storageMigration.plan.useQuery, B.storageMigration.start.useMutation, B.storageMigration.status.useQuery, B.storageMigration.cancel.useMutation, B.storageMigration.movers.useQuery, B.storageMigration.moverClearance.useQuery, B.storageMigration.residue.useQuery, B.storageMigration.drain.useMutation, B.storageMigration.cleanupStart.useMutation, B.storageMigration.cleanupStatus.useQuery, B.storageMigration.cleanupCancel.useMutation, B.storageMigration.history.useQuery, B.streamBroker.reportStreamSignal.useMutation, B.streamBroker.publishCameraStream.useMutation, B.streamBroker.retractCameraStream.useMutation, B.streamBroker.assignProfile.useMutation, B.streamBroker.unassignProfile.useMutation, B.streamBroker.forgetDeviceHardware.useMutation, B.streamBroker.renderPreBufferClip.useMutation, B.streamBroker.produceEventMedia.useMutation, B.streamBroker.fetchEventMedia.useMutation, B.streamBroker.listAllCameraStreams.useQuery, B.streamBroker.listAllProfileSlots.useQuery, B.streamBroker.getBrokerStats.useQuery, B.streamBroker.probeStream.useMutation, B.streamBroker.listClients.useQuery, B.streamBroker.getLiveViewerCounts.useQuery, B.streamBroker.killClient.useMutation, B.streamBroker.restartProfile.useMutation, B.streamBroker.getStreamUrl.useQuery, B.streamBroker.getStreamWithCodec.useMutation, B.streamBroker.releaseStreamWithCodec.useMutation, B.streamBroker.acquireEgressTranscode.useMutation, B.streamBroker.releaseEgressTranscode.useMutation, B.streamBroker.subscribeAudioChunks.useMutation, B.streamBroker.pullAudioChunks.useQuery, B.streamBroker.unsubscribeAudioChunks.useMutation, B.streamBroker.setPreBufferDuration.useMutation, B.streamBroker.getPreBufferInfo.useQuery, B.streamBroker.getRtspPort.useQuery, B.streamBroker.getAllRtspEntries.useQuery, B.streamBroker.getRtspEntry.useQuery, B.streamBroker.regenerateRtspToken.useMutation, B.streamBroker.setRtspEnabled.useMutation, B.streamBroker.isRtspEnabled.useQuery, B.streamBroker.getDeviceAudioMute.useQuery, B.streamBroker.setDeviceAudioMute.useMutation, B.streamBroker.getDeviceSettingsContribution.useQuery, B.streamBroker.getDeviceLiveContribution.useQuery, B.streamBroker.applyDeviceSettingsPatch.useMutation, B.streamCatalog.getCatalog.useQuery, B.streamParams.getOptions.useQuery, B.streamParams.setProfile.useMutation, B.streamParams.getConfigSchema.useQuery, B.streamParams.getStatus.useQuery, B.streamSignals.listSignals.useQuery, B.switch.setState.useMutation, B.switch.getStatus.useQuery, B.system.info.useQuery, B.system.health.useQuery, B.system.featureFlags.useQuery, B.system.networkAddresses.useQuery, B.system.getRetentionConfig.useQuery, B.system.setRetentionConfig.useMutation, B.system.forceRetentionCleanup.useMutation, B.system.getSiteLocation.useQuery, B.system.setSiteLocation.useMutation, B.system.detectSiteLocation.useMutation, B.system.getRequestCensus.useQuery, B.system.getLoadContributions.useQuery, B.system.getFailureContributions.useQuery, B.system.getLoggingSettings.useQuery, B.system.setLoggingSettings.useMutation, B.tamper.getStatus.useQuery, B.temperatureSensor.getStatus.useQuery, B.terminalSession.listProfiles.useQuery, B.terminalSession.listInstances.useQuery, B.terminalSession.createInstance.useMutation, B.terminalSession.updateInstance.useMutation, B.terminalSession.deleteInstance.useMutation, B.terminalSession.setInstanceEnabled.useMutation, B.terminalSession.listLegacyCameras.useQuery, B.terminalSession.adoptLegacyMonitor.useMutation, B.terminalSession.listSessions.useQuery, B.terminalSession.openSession.useMutation, B.terminalSession.resize.useMutation, B.terminalSession.pullOutput.useMutation, B.terminalSession.writeInput.useMutation, B.terminalSession.close.useMutation, B.toast.onToast.useSubscription, B.training.listBaseModels.useQuery, B.training.planJob.useQuery, B.training.startJob.useMutation, B.training.startJobBatch.useMutation, B.training.listJobs.useQuery, B.training.getJob.useQuery, B.training.cancelJob.useMutation, B.training.getJobResult.useQuery, B.training.registerResult.useMutation, B.training.canaryResult.useMutation, B.training.rollbackCanary.useMutation, B.training.discardResult.useMutation, B.turnProvider.getTurnServers.useQuery, B.update.installUpdate.useMutation, B.update.getStatus.useQuery, B.userManagement.listUsers.useQuery, B.userManagement.createUser.useMutation, B.userManagement.updateUser.useMutation, B.userManagement.deleteUser.useMutation, B.userManagement.resetPassword.useMutation, B.userManagement.setUserScopes.useMutation, B.userManagement.validateCredentials.useMutation, B.userManagement.setupTotp.useMutation, B.userManagement.confirmTotp.useMutation, B.userManagement.disableTotp.useMutation, B.userManagement.getTotpStatus.useQuery, B.userManagement.migrateRawSecrets.useMutation, B.userManagement.verifyTotp.useMutation, B.userManagement.oauthIssueCode.useMutation, B.userManagement.oauthExchangeCode.useMutation, B.userManagement.oauthRefresh.useMutation, B.userManagement.oauthVerifyAccessToken.useQuery, B.userManagement.listExternalIdentities.useQuery, B.userManagement.findUserByExternalIdentity.useQuery, B.userManagement.unlinkExternalIdentity.useMutation, B.userManagement.listOauthSessions.useQuery, B.userManagement.revokeOauthSession.useMutation, B.vacuumControl.start.useMutation, B.vacuumControl.pause.useMutation, B.vacuumControl.stop.useMutation, B.vacuumControl.returnToBase.useMutation, B.vacuumControl.locate.useMutation, B.vacuumControl.setFanSpeed.useMutation, B.vacuumControl.getStatus.useQuery, B.valve.open.useMutation, B.valve.close.useMutation, B.valve.stop.useMutation, B.valve.setPosition.useMutation, B.valve.getStatus.useQuery, B.vibration.getStatus.useQuery, B.videoclips.listClips.useQuery, B.videoclips.listSources.useQuery, B.videoclips.getClipPlayback.useQuery, B.videoclips.readClipBytes.useQuery, B.videoclips.offerClipBytes.useQuery, B.videoclips.dialClipStream.useQuery, B.videoclips.getPlaybackOptions.useQuery, B.waterHeater.setTargetTemp.useMutation, B.waterHeater.setOperationMode.useMutation, B.waterHeater.setAway.useMutation, B.waterHeater.getStatus.useQuery, B.weather.getStatus.useQuery, B.webrtcSession.listStreams.useQuery, B.webrtcSession.createSession.useMutation, B.webrtcSession.handleOffer.useMutation, B.webrtcSession.handleAnswer.useMutation, B.webrtcSession.addIceCandidate.useMutation, B.webrtcSession.getIceCandidates.useQuery, B.webrtcSession.closeSession.useMutation, B.webrtcSession.hasAdaptiveBitrate.useQuery, B.webrtcSession.getSessionState.useQuery, B.webrtcSession.applyDownlinkProbe.useMutation, B.webrtcSession.getSessionDebug.useQuery, B.zoneAnalytics.getCurrentSnapshot.useQuery, B.zoneAnalytics.getCurrentSnapshotBatch.useQuery, B.zoneAnalytics.getZoneHistory.useQuery, B.zoneAnalytics.getCameraHistory.useQuery, B.zoneAnalytics.getUnzonedHistory.useQuery, B.zoneRules.listRules.useQuery, B.zoneRules.setRules.useMutation, B.zones.listZones.useQuery, B.zones.addZone.useMutation, B.zones.removeZone.useMutation, B.zones.updateZone.useMutation, e(), d(null), e(), e();
|
|
4857
4857
|
var Ua = Da("inline-flex items-center rounded-full font-medium [&>svg]:shrink-0 [&>svg]:size-3", {
|
|
4858
4858
|
variants: {
|
|
4859
4859
|
variant: {
|
|
@@ -20851,30 +20851,34 @@ function nw(e) {
|
|
|
20851
20851
|
//#region src/ui/api.ts
|
|
20852
20852
|
var rw = "model-studio";
|
|
20853
20853
|
function iw(e) {
|
|
20854
|
-
|
|
20855
|
-
|
|
20856
|
-
|
|
20857
|
-
let n =
|
|
20858
|
-
|
|
20854
|
+
return typeof e == "object" && !!e || typeof e == "function";
|
|
20855
|
+
}
|
|
20856
|
+
function aw(e, t) {
|
|
20857
|
+
let n = e;
|
|
20858
|
+
for (let e of t.split(".")) {
|
|
20859
|
+
if (!iw(n)) return !1;
|
|
20860
|
+
n = Reflect.get(n, e);
|
|
20861
|
+
}
|
|
20862
|
+
return typeof n == "function";
|
|
20859
20863
|
}
|
|
20860
|
-
function
|
|
20861
|
-
if (!
|
|
20864
|
+
function ow(e, t) {
|
|
20865
|
+
if (!aw(e, t)) throw Error(`model-studio page: the tRPC client from the host has no callable ${t} (AddonPageProps.trpc must be a TRPCClient<AppRouter>)`);
|
|
20862
20866
|
return e;
|
|
20863
20867
|
}
|
|
20864
|
-
function
|
|
20865
|
-
return
|
|
20868
|
+
function sw(e) {
|
|
20869
|
+
return ow(e, "addons.custom.mutate").addons.custom;
|
|
20866
20870
|
}
|
|
20867
|
-
async function
|
|
20868
|
-
return
|
|
20871
|
+
async function cw(e, t, n) {
|
|
20872
|
+
return sw(e).mutate({
|
|
20869
20873
|
addonId: rw,
|
|
20870
20874
|
action: t,
|
|
20871
20875
|
input: n
|
|
20872
20876
|
});
|
|
20873
20877
|
}
|
|
20874
|
-
function
|
|
20878
|
+
function lw(e) {
|
|
20875
20879
|
return typeof e == "object" && !!e && !Array.isArray(e);
|
|
20876
20880
|
}
|
|
20877
|
-
function
|
|
20881
|
+
function uw(e, t, n) {
|
|
20878
20882
|
let r = [];
|
|
20879
20883
|
for (let [i, a] of t.entries()) {
|
|
20880
20884
|
let t = e.safeParse(a);
|
|
@@ -20882,7 +20886,7 @@ function lw(e, t, n) {
|
|
|
20882
20886
|
}
|
|
20883
20887
|
return r;
|
|
20884
20888
|
}
|
|
20885
|
-
function
|
|
20889
|
+
function dw(e, t, n) {
|
|
20886
20890
|
let r = e.safeParse(t);
|
|
20887
20891
|
if (!r.success) {
|
|
20888
20892
|
let e = r.error.issues.map((e) => `${e.path.join(".") || "<root>"}: ${e.message}`).join("; ");
|
|
@@ -20890,14 +20894,14 @@ function uw(e, t, n) {
|
|
|
20890
20894
|
}
|
|
20891
20895
|
return r.data;
|
|
20892
20896
|
}
|
|
20893
|
-
function dw(e) {
|
|
20894
|
-
return Array.isArray(e) ? lw(k, e, "listCustomModels") : [];
|
|
20895
|
-
}
|
|
20896
20897
|
function fw(e) {
|
|
20897
|
-
|
|
20898
|
+
return Array.isArray(e) ? uw(k, e, "listCustomModels") : [];
|
|
20899
|
+
}
|
|
20900
|
+
function pw(e) {
|
|
20901
|
+
if (!lw(e)) return {};
|
|
20898
20902
|
let t = {};
|
|
20899
20903
|
for (let [n, r] of Object.entries(e)) {
|
|
20900
|
-
if (!
|
|
20904
|
+
if (!lw(r)) {
|
|
20901
20905
|
console.warn(`[model-studio] listAvailability: dropping "${n}" — not an object`, r);
|
|
20902
20906
|
continue;
|
|
20903
20907
|
}
|
|
@@ -20910,14 +20914,14 @@ function fw(e) {
|
|
|
20910
20914
|
}
|
|
20911
20915
|
return t;
|
|
20912
20916
|
}
|
|
20913
|
-
async function pw(e) {
|
|
20914
|
-
return dw(await sw(e, "listCustomModels", void 0));
|
|
20915
|
-
}
|
|
20916
20917
|
async function mw(e) {
|
|
20917
|
-
return fw(await
|
|
20918
|
+
return fw(await cw(e, "listCustomModels", void 0));
|
|
20919
|
+
}
|
|
20920
|
+
async function hw(e) {
|
|
20921
|
+
return pw(await cw(e, "listAvailability", void 0));
|
|
20918
20922
|
}
|
|
20919
|
-
function
|
|
20920
|
-
return Array.isArray(e) ? e.filter(
|
|
20923
|
+
function gw(e) {
|
|
20924
|
+
return Array.isArray(e) ? e.filter(lw).flatMap((e) => {
|
|
20921
20925
|
let t = e.format === "openvino" || e.format === "coreml" ? e.format : null;
|
|
20922
20926
|
return t === null ? [] : [{
|
|
20923
20927
|
format: t,
|
|
@@ -20927,104 +20931,104 @@ function hw(e) {
|
|
|
20927
20931
|
}];
|
|
20928
20932
|
}) : [];
|
|
20929
20933
|
}
|
|
20930
|
-
async function gw(e, t) {
|
|
20931
|
-
let n = await sw(e, "registerCustomModel", t);
|
|
20932
|
-
return cw(n) ? { conversions: hw(n.conversions) } : { conversions: [] };
|
|
20933
|
-
}
|
|
20934
20934
|
async function _w(e, t) {
|
|
20935
|
-
let n = await
|
|
20936
|
-
|
|
20935
|
+
let n = await cw(e, "registerCustomModel", t);
|
|
20936
|
+
return lw(n) ? { conversions: gw(n.conversions) } : { conversions: [] };
|
|
20937
|
+
}
|
|
20938
|
+
async function vw(e, t) {
|
|
20939
|
+
let n = await cw(e, "renameCustomModel", t);
|
|
20940
|
+
if (!lw(n)) throw Error("renameCustomModel: unexpected response shape");
|
|
20937
20941
|
return {
|
|
20938
|
-
modelId:
|
|
20939
|
-
name:
|
|
20942
|
+
modelId: Aw(n, "modelId"),
|
|
20943
|
+
name: Aw(n, "name")
|
|
20940
20944
|
};
|
|
20941
20945
|
}
|
|
20942
|
-
async function
|
|
20943
|
-
await
|
|
20946
|
+
async function yw(e, t) {
|
|
20947
|
+
await cw(e, "removeModelFromNode", t);
|
|
20944
20948
|
}
|
|
20945
|
-
async function
|
|
20946
|
-
let r = await
|
|
20949
|
+
async function bw(e, t, n) {
|
|
20950
|
+
let r = await cw(e, "ensureModelFormats", {
|
|
20947
20951
|
modelId: t,
|
|
20948
20952
|
formats: n
|
|
20949
20953
|
});
|
|
20950
|
-
return
|
|
20951
|
-
}
|
|
20952
|
-
function bw(e) {
|
|
20953
|
-
return aw(e).pipelineExecutor.getSchema;
|
|
20954
|
+
return lw(r) ? { conversions: gw(r.conversions) } : { conversions: [] };
|
|
20954
20955
|
}
|
|
20955
20956
|
function xw(e) {
|
|
20956
|
-
return
|
|
20957
|
+
return ow(e, "pipelineExecutor.getSchema.query").pipelineExecutor.getSchema;
|
|
20957
20958
|
}
|
|
20958
|
-
|
|
20959
|
-
|
|
20960
|
-
if (!xw(t)) throw Error("pipeline schema unavailable — cannot enumerate step ids");
|
|
20961
|
-
return UC(t);
|
|
20959
|
+
function Sw(e) {
|
|
20960
|
+
return lw(e) && Array.isArray(e.slots);
|
|
20962
20961
|
}
|
|
20963
|
-
function Cw(e) {
|
|
20964
|
-
|
|
20962
|
+
async function Cw(e) {
|
|
20963
|
+
let t = await xw(e).query();
|
|
20964
|
+
if (!Sw(t)) throw Error("pipeline schema unavailable — cannot enumerate step ids");
|
|
20965
|
+
return UC(t);
|
|
20965
20966
|
}
|
|
20966
|
-
|
|
20967
|
-
return (
|
|
20967
|
+
function ww(e) {
|
|
20968
|
+
return lw(e) && Array.isArray(e.slots);
|
|
20968
20969
|
}
|
|
20969
20970
|
async function Tw(e, t) {
|
|
20970
|
-
|
|
20971
|
-
|
|
20971
|
+
return (await Ew(e, t)).seeds;
|
|
20972
|
+
}
|
|
20973
|
+
async function Ew(e, t) {
|
|
20974
|
+
let n = await xw(e).query(t === void 0 ? void 0 : { nodeId: t });
|
|
20975
|
+
if (!ww(n)) throw Error("pipeline schema unavailable — cannot list CamStack seeds");
|
|
20972
20976
|
return {
|
|
20973
20977
|
seeds: qC(n),
|
|
20974
20978
|
stepCatalogs: WC(n)
|
|
20975
20979
|
};
|
|
20976
20980
|
}
|
|
20977
|
-
async function Ew(e, t) {
|
|
20978
|
-
await aw(e).pipelineExecutor.downloadModel.mutate(t);
|
|
20979
|
-
}
|
|
20980
20981
|
async function Dw(e, t) {
|
|
20981
|
-
|
|
20982
|
-
|
|
20982
|
+
await ow(e, "pipelineExecutor.downloadModel.mutate").pipelineExecutor.downloadModel.mutate(t);
|
|
20983
|
+
}
|
|
20984
|
+
async function Ow(e, t) {
|
|
20985
|
+
let n = await cw(e, "deleteSeedFromNode", t);
|
|
20986
|
+
if (!lw(n) || n.success !== !0) throw Error("deleteSeedFromNode: unexpected response");
|
|
20983
20987
|
}
|
|
20984
|
-
var
|
|
20985
|
-
function
|
|
20988
|
+
var kw = 512 * 1024;
|
|
20989
|
+
function Aw(e, t) {
|
|
20986
20990
|
let n = e[t];
|
|
20987
20991
|
if (typeof n != "string") throw Error(`upload: missing "${t}" in response`);
|
|
20988
20992
|
return n;
|
|
20989
20993
|
}
|
|
20990
|
-
async function
|
|
20991
|
-
let r = await
|
|
20994
|
+
async function jw(e, t, n) {
|
|
20995
|
+
let r = await cw(e, "beginModelUpload", {
|
|
20992
20996
|
filename: t.name,
|
|
20993
20997
|
totalBytes: t.size
|
|
20994
20998
|
});
|
|
20995
|
-
if (!
|
|
20996
|
-
let i =
|
|
20999
|
+
if (!lw(r)) throw Error("beginModelUpload: unexpected response shape");
|
|
21000
|
+
let i = Aw(r, "uploadId");
|
|
20997
21001
|
try {
|
|
20998
21002
|
let r = new Uint8Array(await t.arrayBuffer());
|
|
20999
|
-
for (let t = 0; t < r.length; t +=
|
|
21003
|
+
for (let t = 0; t < r.length; t += kw) await cw(e, "appendModelUpload", {
|
|
21000
21004
|
uploadId: i,
|
|
21001
|
-
chunkBase64:
|
|
21002
|
-
}), n?.(Math.min(t +
|
|
21003
|
-
let a = await
|
|
21004
|
-
if (!
|
|
21005
|
+
chunkBase64: Mw(r.subarray(t, t + kw))
|
|
21006
|
+
}), n?.(Math.min(t + kw, r.length), r.length);
|
|
21007
|
+
let a = await cw(e, "commitModelUpload", { uploadId: i });
|
|
21008
|
+
if (!lw(a)) throw Error("commitModelUpload: unexpected response shape");
|
|
21005
21009
|
return {
|
|
21006
|
-
filename:
|
|
21010
|
+
filename: Aw(a, "filename"),
|
|
21007
21011
|
bytes: typeof a.bytes == "number" ? a.bytes : t.size,
|
|
21008
|
-
sha256:
|
|
21012
|
+
sha256: Aw(a, "sha256")
|
|
21009
21013
|
};
|
|
21010
21014
|
} catch (t) {
|
|
21011
|
-
throw await
|
|
21015
|
+
throw await cw(e, "abortModelUpload", { uploadId: i }).catch(() => void 0), t;
|
|
21012
21016
|
}
|
|
21013
21017
|
}
|
|
21014
|
-
function
|
|
21018
|
+
function Mw(e) {
|
|
21015
21019
|
let t = "", n = 32768;
|
|
21016
21020
|
for (let r = 0; r < e.length; r += n) t += String.fromCharCode(...e.subarray(r, r + n));
|
|
21017
21021
|
return btoa(t);
|
|
21018
21022
|
}
|
|
21019
|
-
function
|
|
21020
|
-
return
|
|
21023
|
+
function Nw(e) {
|
|
21024
|
+
return ow(e, "live.onEvent.subscribe").live.onEvent;
|
|
21021
21025
|
}
|
|
21022
|
-
function
|
|
21023
|
-
let r =
|
|
21026
|
+
function Pw(e, t, n) {
|
|
21027
|
+
let r = Nw(e);
|
|
21024
21028
|
try {
|
|
21025
21029
|
return r.subscribe({ category: "model-convert.progress" }, {
|
|
21026
21030
|
onData: (e) => {
|
|
21027
|
-
let n =
|
|
21031
|
+
let n = lw(e.data) ? e.data : void 0;
|
|
21028
21032
|
n !== void 0 && t({
|
|
21029
21033
|
phase: typeof n.phase == "string" ? n.phase : "working",
|
|
21030
21034
|
pct: typeof n.pct == "number" ? n.pct : void 0,
|
|
@@ -21039,17 +21043,17 @@ function Nw(e, t, n) {
|
|
|
21039
21043
|
return n?.(e), null;
|
|
21040
21044
|
}
|
|
21041
21045
|
}
|
|
21042
|
-
async function
|
|
21043
|
-
let n = await
|
|
21044
|
-
if (!
|
|
21046
|
+
async function Fw(e, t) {
|
|
21047
|
+
let n = await cw(e, "importFrigateCatalogModel", t);
|
|
21048
|
+
if (!lw(n)) throw Error("importFrigateCatalogModel: unexpected response shape");
|
|
21045
21049
|
return {
|
|
21046
|
-
modelId:
|
|
21050
|
+
modelId: Aw(n, "modelId"),
|
|
21047
21051
|
bytes: typeof n.bytes == "number" ? n.bytes : 0
|
|
21048
21052
|
};
|
|
21049
21053
|
}
|
|
21050
|
-
async function
|
|
21051
|
-
let t = await
|
|
21052
|
-
return
|
|
21054
|
+
async function Iw(e) {
|
|
21055
|
+
let t = await cw(e, "frigatePlusStatus", void 0);
|
|
21056
|
+
return lw(t) ? {
|
|
21053
21057
|
configured: t.configured === !0,
|
|
21054
21058
|
keyFormatValid: t.keyFormatValid === !0
|
|
21055
21059
|
} : {
|
|
@@ -21057,9 +21061,9 @@ async function Fw(e) {
|
|
|
21057
21061
|
keyFormatValid: !1
|
|
21058
21062
|
};
|
|
21059
21063
|
}
|
|
21060
|
-
async function
|
|
21061
|
-
let t = await
|
|
21062
|
-
return
|
|
21064
|
+
async function Lw(e) {
|
|
21065
|
+
let t = await cw(e, "frigatePlusTest", void 0);
|
|
21066
|
+
return lw(t) ? {
|
|
21063
21067
|
ok: t.ok === !0,
|
|
21064
21068
|
...typeof t.error == "string" ? { error: t.error } : {}
|
|
21065
21069
|
} : {
|
|
@@ -21067,69 +21071,69 @@ async function Iw(e) {
|
|
|
21067
21071
|
error: "unexpected response"
|
|
21068
21072
|
};
|
|
21069
21073
|
}
|
|
21070
|
-
async function
|
|
21071
|
-
let t = await
|
|
21072
|
-
return Array.isArray(t) ?
|
|
21074
|
+
async function Rw(e) {
|
|
21075
|
+
let t = await cw(e, "frigatePlusListModels", void 0);
|
|
21076
|
+
return Array.isArray(t) ? uw(PC, t, "frigatePlusListModels") : [];
|
|
21073
21077
|
}
|
|
21074
|
-
async function
|
|
21075
|
-
let n = await
|
|
21076
|
-
if (!
|
|
21078
|
+
async function zw(e, t) {
|
|
21079
|
+
let n = await cw(e, "importFrigatePlusModel", t);
|
|
21080
|
+
if (!lw(n)) throw Error("importFrigatePlusModel: unexpected response shape");
|
|
21077
21081
|
return {
|
|
21078
|
-
modelId:
|
|
21082
|
+
modelId: Aw(n, "modelId"),
|
|
21079
21083
|
bytes: typeof n.bytes == "number" ? n.bytes : 0,
|
|
21080
|
-
conversions:
|
|
21084
|
+
conversions: gw(n.conversions)
|
|
21081
21085
|
};
|
|
21082
21086
|
}
|
|
21083
|
-
async function
|
|
21084
|
-
await
|
|
21087
|
+
async function Bw(e, t) {
|
|
21088
|
+
await ow(e, "addonSettings.updateGlobalSettings.mutate").addonSettings.updateGlobalSettings.mutate({
|
|
21085
21089
|
addonId: rw,
|
|
21086
21090
|
patch: { frigatePlusApiKey: t }
|
|
21087
21091
|
});
|
|
21088
21092
|
}
|
|
21089
|
-
function
|
|
21090
|
-
return
|
|
21091
|
-
}
|
|
21092
|
-
async function Vw(e, t) {
|
|
21093
|
-
let n = await aw(e).pipelineOrchestrator.getNodeInferenceDevices.query({ nodeId: t });
|
|
21094
|
-
return Bw(n) ? n.devices : [];
|
|
21093
|
+
function Vw(e) {
|
|
21094
|
+
return lw(e) && Array.isArray(e.devices);
|
|
21095
21095
|
}
|
|
21096
21096
|
async function Hw(e, t) {
|
|
21097
|
-
let n = await
|
|
21098
|
-
return
|
|
21097
|
+
let n = await ow(e, "pipelineOrchestrator.getNodeInferenceDevices.query").pipelineOrchestrator.getNodeInferenceDevices.query({ nodeId: t });
|
|
21098
|
+
return Vw(n) ? n.devices : [];
|
|
21099
21099
|
}
|
|
21100
21100
|
async function Uw(e, t) {
|
|
21101
|
-
await
|
|
21101
|
+
let n = await ow(e, "pipelineExecutor.listLoadedEngines.query").pipelineExecutor.listLoadedEngines.query({ nodeId: t });
|
|
21102
|
+
return dw(be.methods.listLoadedEngines.output, n, "listLoadedEngines");
|
|
21103
|
+
}
|
|
21104
|
+
async function Ww(e, t) {
|
|
21105
|
+
await ow(e, "pipelineOrchestrator.setAgentInferenceDevices.mutate").pipelineOrchestrator.setAgentInferenceDevices.mutate(t);
|
|
21102
21106
|
}
|
|
21103
|
-
async function
|
|
21104
|
-
return T(await
|
|
21107
|
+
async function Gw(e) {
|
|
21108
|
+
return T(await ow(e, "addonSettings.getGlobalSettings.query").addonSettings.getGlobalSettings.query({ addonId: "pipeline-orchestrator" }));
|
|
21105
21109
|
}
|
|
21106
|
-
async function
|
|
21107
|
-
await
|
|
21110
|
+
async function Kw(e, t) {
|
|
21111
|
+
await ow(e, "addonSettings.updateGlobalSettings.mutate").addonSettings.updateGlobalSettings.mutate({
|
|
21108
21112
|
addonId: "pipeline-orchestrator",
|
|
21109
21113
|
patch: t
|
|
21110
21114
|
});
|
|
21111
21115
|
}
|
|
21112
|
-
function
|
|
21113
|
-
return
|
|
21116
|
+
function qw(e) {
|
|
21117
|
+
return lw(e) && Array.isArray(e.slots);
|
|
21114
21118
|
}
|
|
21115
|
-
async function
|
|
21116
|
-
let r = await
|
|
21117
|
-
if (!
|
|
21119
|
+
async function Jw(e, t, n) {
|
|
21120
|
+
let r = await xw(e).query(n === void 0 ? void 0 : { nodeId: n });
|
|
21121
|
+
if (!qw(r)) return null;
|
|
21118
21122
|
for (let e of r.slots) for (let n of e.addons) if (n.id === t) return n;
|
|
21119
21123
|
return null;
|
|
21120
21124
|
}
|
|
21121
|
-
async function Jw(e) {
|
|
21122
|
-
let t = await sw(e, "tfliteSupport", {});
|
|
21123
|
-
return !cw(t) || !Array.isArray(t.nodes) ? [] : t.nodes.filter((e) => typeof e == "string");
|
|
21124
|
-
}
|
|
21125
21125
|
async function Yw(e) {
|
|
21126
|
-
let t = await
|
|
21127
|
-
return !
|
|
21126
|
+
let t = await cw(e, "tfliteSupport", {});
|
|
21127
|
+
return !lw(t) || !Array.isArray(t.nodes) ? [] : t.nodes.filter((e) => typeof e == "string");
|
|
21128
|
+
}
|
|
21129
|
+
async function Xw(e) {
|
|
21130
|
+
let t = await cw(e, "listScryptedCatalog", void 0);
|
|
21131
|
+
return !lw(t) || !Array.isArray(t.entries) || !Array.isArray(t.drift) ? {
|
|
21128
21132
|
entries: [],
|
|
21129
21133
|
drift: []
|
|
21130
21134
|
} : {
|
|
21131
|
-
entries:
|
|
21132
|
-
drift: t.drift.filter(
|
|
21135
|
+
entries: uw(jC, t.entries, "listScryptedCatalog.entries"),
|
|
21136
|
+
drift: t.drift.filter(lw).map((e) => {
|
|
21133
21137
|
let t = TC({
|
|
21134
21138
|
manifestId: typeof e.manifestId == "string" ? e.manifestId : "",
|
|
21135
21139
|
status: typeof e.status == "string" ? e.status : "",
|
|
@@ -21143,8 +21147,8 @@ async function Yw(e) {
|
|
|
21143
21147
|
})
|
|
21144
21148
|
};
|
|
21145
21149
|
}
|
|
21146
|
-
async function
|
|
21147
|
-
return
|
|
21150
|
+
async function Zw(e, t) {
|
|
21151
|
+
return dw(k, await cw(e, "importScryptedCatalogModel", {
|
|
21148
21152
|
manifestId: t.manifestId,
|
|
21149
21153
|
...t.name === void 0 ? {} : { name: t.name },
|
|
21150
21154
|
...t.targetNodeId === void 0 ? {} : { targetNodeId: t.targetNodeId }
|
|
@@ -21152,7 +21156,7 @@ async function Xw(e, t) {
|
|
|
21152
21156
|
}
|
|
21153
21157
|
//#endregion
|
|
21154
21158
|
//#region src/components/NodeSelector.tsx
|
|
21155
|
-
function
|
|
21159
|
+
function Qw({ selectedNodeId: e, onSelect: t }) {
|
|
21156
21160
|
return /* @__PURE__ */ v(SS, {
|
|
21157
21161
|
selectedNodeId: e,
|
|
21158
21162
|
onSelect: t,
|
|
@@ -21162,7 +21166,7 @@ function Zw({ selectedNodeId: e, onSelect: t }) {
|
|
|
21162
21166
|
}
|
|
21163
21167
|
//#endregion
|
|
21164
21168
|
//#region src/components/Form.tsx
|
|
21165
|
-
function
|
|
21169
|
+
function $w({ label: e, children: t }) {
|
|
21166
21170
|
return /* @__PURE__ */ y("label", {
|
|
21167
21171
|
className: "space-y-1 block",
|
|
21168
21172
|
children: [/* @__PURE__ */ v("span", {
|
|
@@ -21171,8 +21175,8 @@ function Qw({ label: e, children: t }) {
|
|
|
21171
21175
|
}), t]
|
|
21172
21176
|
});
|
|
21173
21177
|
}
|
|
21174
|
-
function
|
|
21175
|
-
return /* @__PURE__ */ v(
|
|
21178
|
+
function eT({ label: e, value: t, onChange: n, placeholder: r }) {
|
|
21179
|
+
return /* @__PURE__ */ v($w, {
|
|
21176
21180
|
label: e,
|
|
21177
21181
|
children: /* @__PURE__ */ v("input", {
|
|
21178
21182
|
type: "text",
|
|
@@ -21183,8 +21187,8 @@ function $w({ label: e, value: t, onChange: n, placeholder: r }) {
|
|
|
21183
21187
|
})
|
|
21184
21188
|
});
|
|
21185
21189
|
}
|
|
21186
|
-
function
|
|
21187
|
-
return /* @__PURE__ */ v(
|
|
21190
|
+
function tT({ label: e, value: t, onChange: n, min: r, max: i, step: a }) {
|
|
21191
|
+
return /* @__PURE__ */ v($w, {
|
|
21188
21192
|
label: e,
|
|
21189
21193
|
children: /* @__PURE__ */ v("input", {
|
|
21190
21194
|
type: "number",
|
|
@@ -21202,7 +21206,7 @@ function eT({ label: e, value: t, onChange: n, min: r, max: i, step: a }) {
|
|
|
21202
21206
|
}
|
|
21203
21207
|
//#endregion
|
|
21204
21208
|
//#region src/i18n/index.ts
|
|
21205
|
-
var { useT: $, Trans:
|
|
21209
|
+
var { useT: $, Trans: nT, translate: rT } = iC("model-studio", {
|
|
21206
21210
|
en: {
|
|
21207
21211
|
common: {
|
|
21208
21212
|
cancel: "Cancel",
|
|
@@ -22059,14 +22063,14 @@ var { useT: $, Trans: tT, translate: nT } = iC("model-studio", {
|
|
|
22059
22063
|
unknown: "Importazione bloccata: lo scostamento del catalogo è sconosciuto e non può essere verificato."
|
|
22060
22064
|
}
|
|
22061
22065
|
}
|
|
22062
|
-
}),
|
|
22066
|
+
}), iT = {
|
|
22063
22067
|
pending: "bg-surface-hover",
|
|
22064
22068
|
active: "bg-warning animate-pulse",
|
|
22065
22069
|
done: "bg-success",
|
|
22066
22070
|
error: "bg-danger",
|
|
22067
22071
|
skipped: "bg-surface-hover"
|
|
22068
22072
|
};
|
|
22069
|
-
function
|
|
22073
|
+
function aT({ title: e, steps: t, progress: n, logs: r, status: i, errorMessage: a, onClose: o }) {
|
|
22070
22074
|
let { t: s } = $();
|
|
22071
22075
|
return /* @__PURE__ */ v("div", {
|
|
22072
22076
|
className: "fixed inset-0 z-50 flex items-center justify-center bg-black/60 p-4",
|
|
@@ -22097,7 +22101,7 @@ function iT({ title: e, steps: t, progress: n, logs: r, status: i, errorMessage:
|
|
|
22097
22101
|
className: "space-y-1.5",
|
|
22098
22102
|
children: t.map((e) => /* @__PURE__ */ y("li", {
|
|
22099
22103
|
className: "flex items-center gap-2 text-xs",
|
|
22100
|
-
children: [/* @__PURE__ */ v("span", { className: `w-1.5 h-1.5 rounded-full shrink-0 ${
|
|
22104
|
+
children: [/* @__PURE__ */ v("span", { className: `w-1.5 h-1.5 rounded-full shrink-0 ${iT[e.status]}` }), /* @__PURE__ */ y("span", {
|
|
22101
22105
|
className: e.status === "active" ? "text-foreground font-medium" : e.status === "pending" || e.status === "skipped" ? "text-foreground-subtle" : "text-foreground",
|
|
22102
22106
|
children: [e.label, e.status === "skipped" ? s("importProgress.skipped") : ""]
|
|
22103
22107
|
})]
|
|
@@ -22142,7 +22146,7 @@ function iT({ title: e, steps: t, progress: n, logs: r, status: i, errorMessage:
|
|
|
22142
22146
|
})
|
|
22143
22147
|
});
|
|
22144
22148
|
}
|
|
22145
|
-
function
|
|
22149
|
+
function oT(e, t, n = 400) {
|
|
22146
22150
|
let r = t.log !== void 0 && t.log.length > 0 ? t.log : t.phase === "log" ? t.detail ?? "" : `[${t.phase}]${t.detail === void 0 ? "" : ` ${t.detail}`}${t.pct === void 0 ? "" : ` ${t.pct.toFixed(0)}%`}`;
|
|
22147
22151
|
if (r.trim().length === 0) return e;
|
|
22148
22152
|
let i = [...e, r];
|
|
@@ -22150,13 +22154,13 @@ function aT(e, t, n = 400) {
|
|
|
22150
22154
|
}
|
|
22151
22155
|
//#endregion
|
|
22152
22156
|
//#region src/ui/operation-sessions.ts
|
|
22153
|
-
var
|
|
22154
|
-
function
|
|
22155
|
-
for (let e of
|
|
22157
|
+
var sT = 80, cT = [], lT = /* @__PURE__ */ new Set();
|
|
22158
|
+
function uT() {
|
|
22159
|
+
for (let e of lT) e();
|
|
22156
22160
|
}
|
|
22157
|
-
function
|
|
22161
|
+
function dT(e) {
|
|
22158
22162
|
let t = `op-${Date.now()}-${Math.random().toString(36).slice(2, 8)}`;
|
|
22159
|
-
return
|
|
22163
|
+
return cT = [{
|
|
22160
22164
|
id: t,
|
|
22161
22165
|
kind: e.kind,
|
|
22162
22166
|
title: e.title,
|
|
@@ -22166,40 +22170,40 @@ function uT(e) {
|
|
|
22166
22170
|
status: "running",
|
|
22167
22171
|
logs: e.logs ?? [],
|
|
22168
22172
|
startedAt: Date.now()
|
|
22169
|
-
}, ...
|
|
22173
|
+
}, ...cT].slice(0, sT), uT(), t;
|
|
22170
22174
|
}
|
|
22171
|
-
function
|
|
22172
|
-
|
|
22175
|
+
function fT(e, t) {
|
|
22176
|
+
cT = cT.map((n) => n.id === e ? {
|
|
22173
22177
|
...n,
|
|
22174
22178
|
logs: [...n.logs, t]
|
|
22175
|
-
} : n),
|
|
22179
|
+
} : n), uT();
|
|
22176
22180
|
}
|
|
22177
|
-
function
|
|
22178
|
-
|
|
22181
|
+
function pT(e, t) {
|
|
22182
|
+
cT = cT.map((n) => n.id === e ? {
|
|
22179
22183
|
...n,
|
|
22180
22184
|
status: t.status,
|
|
22181
22185
|
...t.errorMessage === void 0 ? {} : { errorMessage: t.errorMessage },
|
|
22182
22186
|
finishedAt: Date.now()
|
|
22183
|
-
} : n),
|
|
22187
|
+
} : n), uT();
|
|
22184
22188
|
}
|
|
22185
|
-
function
|
|
22186
|
-
|
|
22189
|
+
function mT(e, t) {
|
|
22190
|
+
cT = cT.map((n) => n.id === e ? {
|
|
22187
22191
|
...n,
|
|
22188
22192
|
logs: t
|
|
22189
|
-
} : n),
|
|
22193
|
+
} : n), uT();
|
|
22190
22194
|
}
|
|
22191
22195
|
//#endregion
|
|
22192
22196
|
//#region src/components/OperationModalProvider.tsx
|
|
22193
22197
|
e();
|
|
22194
|
-
var
|
|
22195
|
-
function
|
|
22196
|
-
let e = h(
|
|
22198
|
+
var hT = d(null);
|
|
22199
|
+
function gT() {
|
|
22200
|
+
let e = h(hT);
|
|
22197
22201
|
if (e === null) throw Error("useOperationModal: missing OperationModalProvider");
|
|
22198
22202
|
return e;
|
|
22199
22203
|
}
|
|
22200
|
-
function
|
|
22204
|
+
function _T({ children: e }) {
|
|
22201
22205
|
let { t } = $(), [n, r] = g(null), i = l((e) => {
|
|
22202
|
-
let t = e.initialLog === void 0 ? [] : [e.initialLog], n =
|
|
22206
|
+
let t = e.initialLog === void 0 ? [] : [e.initialLog], n = dT({
|
|
22203
22207
|
kind: e.kind,
|
|
22204
22208
|
title: e.title,
|
|
22205
22209
|
...e.modelId === void 0 ? {} : { modelId: e.modelId },
|
|
@@ -22221,27 +22225,27 @@ function gT({ children: e }) {
|
|
|
22221
22225
|
steps: t([...n.steps])
|
|
22222
22226
|
});
|
|
22223
22227
|
}, []), s = l((e, t) => {
|
|
22224
|
-
|
|
22228
|
+
fT(e, t), r((n) => n === null || n.sessionId !== e ? n : {
|
|
22225
22229
|
...n,
|
|
22226
22230
|
logs: [...n.logs, t]
|
|
22227
22231
|
});
|
|
22228
22232
|
}, []), c = l((e, t) => {
|
|
22229
22233
|
r((n) => {
|
|
22230
22234
|
if (n === null || n.sessionId !== e) return n;
|
|
22231
|
-
let r =
|
|
22232
|
-
return
|
|
22235
|
+
let r = oT(n.logs, t);
|
|
22236
|
+
return mT(e, r), {
|
|
22233
22237
|
...n,
|
|
22234
22238
|
progress: t.phase === "log" ? n.progress : t,
|
|
22235
22239
|
logs: r
|
|
22236
22240
|
};
|
|
22237
22241
|
});
|
|
22238
22242
|
}, []), u = l((e) => {
|
|
22239
|
-
|
|
22243
|
+
pT(e, { status: "success" }), r((t) => t !== null && t.sessionId === e ? {
|
|
22240
22244
|
...t,
|
|
22241
22245
|
status: "success"
|
|
22242
22246
|
} : t);
|
|
22243
22247
|
}, []), d = l((e, t) => {
|
|
22244
|
-
|
|
22248
|
+
pT(e, {
|
|
22245
22249
|
status: "error",
|
|
22246
22250
|
errorMessage: t
|
|
22247
22251
|
}), r((n) => n !== null && n.sessionId === e ? {
|
|
@@ -22287,9 +22291,9 @@ function gT({ children: e }) {
|
|
|
22287
22291
|
d,
|
|
22288
22292
|
f
|
|
22289
22293
|
]);
|
|
22290
|
-
return /* @__PURE__ */ y(
|
|
22294
|
+
return /* @__PURE__ */ y(hT.Provider, {
|
|
22291
22295
|
value: p,
|
|
22292
|
-
children: [e, n !== null && /* @__PURE__ */ v(
|
|
22296
|
+
children: [e, n !== null && /* @__PURE__ */ v(aT, {
|
|
22293
22297
|
title: n.title,
|
|
22294
22298
|
steps: n.steps,
|
|
22295
22299
|
progress: n.progress,
|
|
@@ -22302,22 +22306,22 @@ function gT({ children: e }) {
|
|
|
22302
22306
|
}
|
|
22303
22307
|
//#endregion
|
|
22304
22308
|
//#region src/scrypted/scrypted-catalog-selectors.ts
|
|
22305
|
-
function
|
|
22309
|
+
function vT(e) {
|
|
22306
22310
|
return typeof e == "string" ? e.includes("x") || e.includes("×") ? e.replace("×", "x") : e : `${e.width}x${e.height}`;
|
|
22307
22311
|
}
|
|
22308
|
-
function
|
|
22312
|
+
function yT(e, t) {
|
|
22309
22313
|
return e.find((e) => e.manifestId === t)?.status;
|
|
22310
22314
|
}
|
|
22311
|
-
function
|
|
22312
|
-
if (e.imported) return
|
|
22313
|
-
if (e.registryKnown, e.availabilityKnown, e.driftStatus !== "ok") return e.driftStatus === "missing" ?
|
|
22315
|
+
function bT(e) {
|
|
22316
|
+
if (e.imported) return rT("blocked.imported");
|
|
22317
|
+
if (e.registryKnown, e.availabilityKnown, e.driftStatus !== "ok") return e.driftStatus === "missing" ? rT("blocked.missing") : e.driftStatus === "size-changed" ? rT("blocked.sizeChanged") : e.driftStatus === "unavailable" ? rT("blocked.unavailable") : rT("blocked.unknown");
|
|
22314
22318
|
}
|
|
22315
|
-
function
|
|
22319
|
+
function xT(e, t) {
|
|
22316
22320
|
return "has" in e ? e.has(t) : e.includes(t);
|
|
22317
22321
|
}
|
|
22318
22322
|
//#endregion
|
|
22319
22323
|
//#region src/scrypted/scrypted-canonical.ts
|
|
22320
|
-
var
|
|
22324
|
+
var ST = [
|
|
22321
22325
|
"edgetpu",
|
|
22322
22326
|
"int8",
|
|
22323
22327
|
"full_integer_quant",
|
|
@@ -22325,99 +22329,99 @@ var xT = [
|
|
|
22325
22329
|
"float16",
|
|
22326
22330
|
"float32"
|
|
22327
22331
|
];
|
|
22328
|
-
function
|
|
22332
|
+
function CT(e) {
|
|
22329
22333
|
return /^yolov9([tsmc])$/i.exec(e)?.[1]?.toLowerCase() ?? e;
|
|
22330
22334
|
}
|
|
22331
|
-
function
|
|
22335
|
+
function wT(e) {
|
|
22332
22336
|
let t = e.toLowerCase();
|
|
22333
22337
|
return t === "int8" || t === "uint8" || t === "integer_quant" || t === "full_integer_quant" || t === "edgetpu";
|
|
22334
22338
|
}
|
|
22335
|
-
function wT(e) {
|
|
22336
|
-
let t = ST(e.family), n = e.inputSize.width === e.inputSize.height ? e.inputSize.width : Math.max(e.inputSize.width, e.inputSize.height), r = `scrypted-yolov9${t}-${e.variant}`;
|
|
22337
|
-
return CT(e.precision) && (r += "-int8"), r += `-${n}`, r;
|
|
22338
|
-
}
|
|
22339
22339
|
function TT(e) {
|
|
22340
|
-
let t =
|
|
22340
|
+
let t = CT(e.family), n = e.inputSize.width === e.inputSize.height ? e.inputSize.width : Math.max(e.inputSize.width, e.inputSize.height), r = `scrypted-yolov9${t}-${e.variant}`;
|
|
22341
|
+
return wT(e.precision) && (r += "-int8"), r += `-${n}`, r;
|
|
22342
|
+
}
|
|
22343
|
+
function ET(e) {
|
|
22344
|
+
let t = CC.filter((t) => t.format === "tflite" && TT(t) === e);
|
|
22341
22345
|
if (t.length !== 0) return t.toSorted((e, t) => {
|
|
22342
|
-
let n =
|
|
22346
|
+
let n = ST.indexOf(e.precision.toLowerCase()), r = ST.indexOf(t.precision.toLowerCase());
|
|
22343
22347
|
return (n === -1 ? 99 : n) - (r === -1 ? 99 : r);
|
|
22344
22348
|
})[0];
|
|
22345
22349
|
}
|
|
22346
|
-
function
|
|
22347
|
-
if (t === "tflite") return
|
|
22348
|
-
let n = CC.filter((n) => n.format === t &&
|
|
22350
|
+
function DT(e, t) {
|
|
22351
|
+
if (t === "tflite") return ET(e)?.id;
|
|
22352
|
+
let n = CC.filter((n) => n.format === t && TT(n) === e);
|
|
22349
22353
|
if (n.length !== 0) return n.toSorted((e, t) => e.files.reduce((e, t) => e + t.size, 0) - t.files.reduce((e, t) => e + t.size, 0))[0]?.id;
|
|
22350
22354
|
}
|
|
22351
22355
|
//#endregion
|
|
22352
22356
|
//#region src/scrypted/scrypted-as-variant-sources.ts
|
|
22353
|
-
var
|
|
22357
|
+
var OT = new Set([
|
|
22354
22358
|
"onnx",
|
|
22355
22359
|
"openvino",
|
|
22356
22360
|
"coreml",
|
|
22357
22361
|
"tflite",
|
|
22358
22362
|
"pt"
|
|
22359
|
-
]),
|
|
22363
|
+
]), kT = {
|
|
22360
22364
|
t: "Tiny",
|
|
22361
22365
|
s: "Small",
|
|
22362
22366
|
m: "Medium",
|
|
22363
22367
|
c: "Compact"
|
|
22364
22368
|
};
|
|
22365
|
-
function kT(e) {
|
|
22366
|
-
return DT.has(e);
|
|
22367
|
-
}
|
|
22368
22369
|
function AT(e) {
|
|
22369
|
-
return
|
|
22370
|
+
return OT.has(e);
|
|
22370
22371
|
}
|
|
22371
22372
|
function jT(e) {
|
|
22373
|
+
return /^yolov9([tsmc])$/i.exec(e)?.[1]?.toLowerCase() ?? e;
|
|
22374
|
+
}
|
|
22375
|
+
function MT(e) {
|
|
22372
22376
|
let t = e.toLowerCase();
|
|
22373
22377
|
return t === "int8" || t === "uint8" || t === "integer_quant" || t === "full_integer_quant" || t === "edgetpu" ? "int8" : "fp32";
|
|
22374
22378
|
}
|
|
22375
|
-
function
|
|
22376
|
-
let t =
|
|
22379
|
+
function NT(e) {
|
|
22380
|
+
let t = vT(e.inputSize), n = /^(\d+)x(\d+)$/i.exec(t);
|
|
22377
22381
|
if (!n) return;
|
|
22378
22382
|
let r = Number(n[1]), i = Number(n[2]);
|
|
22379
22383
|
if (!(!Number.isFinite(r) || !Number.isFinite(i))) return r === i ? r : Math.max(r, i);
|
|
22380
22384
|
}
|
|
22381
|
-
function
|
|
22385
|
+
function PT(e) {
|
|
22382
22386
|
let t = e.model.formats[e.format]?.sizeMB;
|
|
22383
22387
|
return typeof t == "number" && t > 0 ? t : e.files.reduce((e, t) => e + t.size, 0) / 1e6;
|
|
22384
22388
|
}
|
|
22385
|
-
function
|
|
22386
|
-
let n =
|
|
22389
|
+
function FT(e, t) {
|
|
22390
|
+
let n = kT[e] ?? e.toUpperCase();
|
|
22387
22391
|
return t === "int8" ? `YOLOv9 ${n} · Int8` : `YOLOv9 ${n}`;
|
|
22388
22392
|
}
|
|
22389
|
-
function
|
|
22393
|
+
function IT(e) {
|
|
22390
22394
|
return [
|
|
22391
22395
|
"yolov9",
|
|
22392
|
-
|
|
22396
|
+
jT(e.family),
|
|
22393
22397
|
e.variant,
|
|
22394
|
-
|
|
22395
|
-
String(
|
|
22398
|
+
MT(e.precision),
|
|
22399
|
+
String(NT(e) ?? "")
|
|
22396
22400
|
].join("|");
|
|
22397
22401
|
}
|
|
22398
|
-
function IT(e) {
|
|
22399
|
-
return wT(e);
|
|
22400
|
-
}
|
|
22401
22402
|
function LT(e) {
|
|
22403
|
+
return TT(e);
|
|
22404
|
+
}
|
|
22405
|
+
function RT(e) {
|
|
22402
22406
|
let t = /* @__PURE__ */ new Map();
|
|
22403
22407
|
for (let n of e) {
|
|
22404
|
-
if (!
|
|
22405
|
-
let e =
|
|
22408
|
+
if (!AT(n.format)) continue;
|
|
22409
|
+
let e = jT(n.family), r = MT(n.precision), i = IT(n), a = PT(n), o = t.get(i);
|
|
22406
22410
|
if (o) {
|
|
22407
22411
|
let e = o.formats[n.format];
|
|
22408
22412
|
(e === void 0 || a < e.sizeMB) && (o.formats[n.format] = { sizeMB: a });
|
|
22409
22413
|
continue;
|
|
22410
22414
|
}
|
|
22411
22415
|
t.set(i, {
|
|
22412
|
-
sourceId:
|
|
22413
|
-
name:
|
|
22416
|
+
sourceId: LT(n),
|
|
22417
|
+
name: FT(e, r),
|
|
22414
22418
|
formats: { [n.format]: { sizeMB: a } },
|
|
22415
22419
|
group: {
|
|
22416
22420
|
family: "yolov9",
|
|
22417
22421
|
tier: e,
|
|
22418
22422
|
precision: r,
|
|
22419
22423
|
...n.variant === "relu_test" ? { optimization: "test" } : {},
|
|
22420
|
-
...
|
|
22424
|
+
...NT(n) === void 0 ? {} : { resolution: NT(n) }
|
|
22421
22425
|
}
|
|
22422
22426
|
});
|
|
22423
22427
|
}
|
|
@@ -22430,18 +22434,18 @@ function LT(e) {
|
|
|
22430
22434
|
}
|
|
22431
22435
|
//#endregion
|
|
22432
22436
|
//#region src/components/register-shared.tsx
|
|
22433
|
-
var
|
|
22434
|
-
function
|
|
22437
|
+
var zT = "w-full px-3 py-1.5 text-xs rounded-md border border-border bg-surface text-foreground focus:outline-none focus:border-primary/50 focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-primary motion-reduce:transition-none disabled:opacity-50";
|
|
22438
|
+
function BT(e) {
|
|
22435
22439
|
return e.count === void 0 ? e.label : `${e.label} (${e.count})`;
|
|
22436
22440
|
}
|
|
22437
|
-
function
|
|
22438
|
-
return n.length === 0 ? null : o && n.length === 1 ? c ? /* @__PURE__ */ v(b, { children: c }) : null : /* @__PURE__ */ y(
|
|
22441
|
+
function VT({ label: e, value: t, options: n, onChange: r, disabled: i = !1, placeholder: a = "Select…", compactWhenSingle: o = !1, formatOption: s = BT, hint: c }) {
|
|
22442
|
+
return n.length === 0 ? null : o && n.length === 1 ? c ? /* @__PURE__ */ v(b, { children: c }) : null : /* @__PURE__ */ y($w, {
|
|
22439
22443
|
label: e,
|
|
22440
22444
|
children: [/* @__PURE__ */ y("select", {
|
|
22441
22445
|
value: t,
|
|
22442
22446
|
onChange: (e) => r(e.target.value),
|
|
22443
22447
|
disabled: i || n.length === 0,
|
|
22444
|
-
className:
|
|
22448
|
+
className: zT,
|
|
22445
22449
|
children: [t === "" && /* @__PURE__ */ v("option", {
|
|
22446
22450
|
value: "",
|
|
22447
22451
|
disabled: !0,
|
|
@@ -22456,7 +22460,7 @@ function BT({ label: e, value: t, options: n, onChange: r, disabled: i = !1, pla
|
|
|
22456
22460
|
//#endregion
|
|
22457
22461
|
//#region src/components/SourceModelBrowser.tsx
|
|
22458
22462
|
e();
|
|
22459
|
-
function
|
|
22463
|
+
function HT({ preSelectors: e = [], catalog: t, value: n, onChange: r, title: i, subtitle: a, actionRow: o, renderActionRow: s, footer: c, emptyMessage: l, testId: u = "source-model-browser" }) {
|
|
22460
22464
|
let { t: d } = $(), f = me(t), [p, m] = g({});
|
|
22461
22465
|
return /* @__PURE__ */ y("div", {
|
|
22462
22466
|
className: "space-y-3",
|
|
@@ -22465,7 +22469,7 @@ function VT({ preSelectors: e = [], catalog: t, value: n, onChange: r, title: i,
|
|
|
22465
22469
|
e.length > 0 && /* @__PURE__ */ v("div", {
|
|
22466
22470
|
className: "space-y-3",
|
|
22467
22471
|
"data-testid": "source-pre-selectors",
|
|
22468
|
-
children: e.map((e) => /* @__PURE__ */ v(
|
|
22472
|
+
children: e.map((e) => /* @__PURE__ */ v(VT, {
|
|
22469
22473
|
label: e.label,
|
|
22470
22474
|
value: e.value,
|
|
22471
22475
|
options: e.options,
|
|
@@ -22516,22 +22520,22 @@ function VT({ preSelectors: e = [], catalog: t, value: n, onChange: r, title: i,
|
|
|
22516
22520
|
}
|
|
22517
22521
|
//#endregion
|
|
22518
22522
|
//#region src/components/FormatImportRow.tsx
|
|
22519
|
-
var
|
|
22523
|
+
var UT = {
|
|
22520
22524
|
onnx: "ONNX",
|
|
22521
22525
|
openvino: "OpenVINO",
|
|
22522
22526
|
coreml: "CoreML",
|
|
22523
22527
|
tflite: "TFLite",
|
|
22524
22528
|
pt: "PyTorch"
|
|
22525
22529
|
};
|
|
22526
|
-
function
|
|
22527
|
-
let { t: c } = $(), l = (e) => n === void 0 ? t === null ? !1 :
|
|
22530
|
+
function WT({ entries: e, registeredIds: t, isImported: n, presence: r = [], busyId: i, onImport: a, onDistributeAll: o, distributeBusy: s = !1 }) {
|
|
22531
|
+
let { t: c } = $(), l = (e) => n === void 0 ? t === null ? !1 : xT(t, e.id) : n(e), u = t !== null && e.some((e) => l(e));
|
|
22528
22532
|
return /* @__PURE__ */ y("div", {
|
|
22529
22533
|
className: "space-y-2 pt-1",
|
|
22530
22534
|
children: [
|
|
22531
22535
|
/* @__PURE__ */ v("div", {
|
|
22532
22536
|
className: "flex flex-wrap gap-2",
|
|
22533
22537
|
children: e.map((e) => {
|
|
22534
|
-
let n = l(e), r =
|
|
22538
|
+
let n = l(e), r = bT({
|
|
22535
22539
|
driftStatus: e.driftStatus ?? "ok",
|
|
22536
22540
|
imported: n,
|
|
22537
22541
|
registryKnown: t !== null
|
|
@@ -22541,7 +22545,7 @@ function UT({ entries: e, registeredIds: t, isImported: n, presence: r = [], bus
|
|
|
22541
22545
|
children: [
|
|
22542
22546
|
/* @__PURE__ */ v("span", {
|
|
22543
22547
|
className: "font-mono text-foreground",
|
|
22544
|
-
children:
|
|
22548
|
+
children: UT[e.format] ?? e.format
|
|
22545
22549
|
}),
|
|
22546
22550
|
typeof e.sizeMB == "number" && /* @__PURE__ */ v("span", {
|
|
22547
22551
|
className: "text-foreground-subtle",
|
|
@@ -22595,11 +22599,11 @@ function UT({ entries: e, registeredIds: t, isImported: n, presence: r = [], bus
|
|
|
22595
22599
|
}
|
|
22596
22600
|
//#endregion
|
|
22597
22601
|
//#region src/components/DisplayNameField.tsx
|
|
22598
|
-
function
|
|
22602
|
+
function GT({ value: e, onChange: t, defaultName: n }) {
|
|
22599
22603
|
let { t: r } = $(), i = IC(e);
|
|
22600
22604
|
return /* @__PURE__ */ y("div", {
|
|
22601
22605
|
className: "space-y-1",
|
|
22602
|
-
children: [/* @__PURE__ */ v(
|
|
22606
|
+
children: [/* @__PURE__ */ v($w, {
|
|
22603
22607
|
label: r("displayName.label"),
|
|
22604
22608
|
children: /* @__PURE__ */ v("input", {
|
|
22605
22609
|
type: "text",
|
|
@@ -22618,40 +22622,40 @@ function WT({ value: e, onChange: t, defaultName: n }) {
|
|
|
22618
22622
|
})]
|
|
22619
22623
|
});
|
|
22620
22624
|
}
|
|
22621
|
-
function
|
|
22625
|
+
function KT(e) {
|
|
22622
22626
|
let t = IC(e);
|
|
22623
22627
|
return t.kind === "set" ? t.name : void 0;
|
|
22624
22628
|
}
|
|
22625
|
-
function
|
|
22629
|
+
function qT(e) {
|
|
22626
22630
|
return IC(e).kind === "invalid";
|
|
22627
22631
|
}
|
|
22628
22632
|
//#endregion
|
|
22629
22633
|
//#region src/tabs/ScryptedTab.tsx
|
|
22630
22634
|
e();
|
|
22631
|
-
var
|
|
22635
|
+
var JT = [
|
|
22632
22636
|
"onnx",
|
|
22633
22637
|
"openvino",
|
|
22634
22638
|
"coreml",
|
|
22635
22639
|
"tflite"
|
|
22636
|
-
],
|
|
22640
|
+
], YT = [{
|
|
22637
22641
|
value: "relu",
|
|
22638
22642
|
key: "standard"
|
|
22639
22643
|
}, {
|
|
22640
22644
|
value: "relu_test",
|
|
22641
22645
|
key: "test"
|
|
22642
22646
|
}];
|
|
22643
|
-
function
|
|
22644
|
-
let { t: a } = $(), s =
|
|
22647
|
+
function XT({ trpc: e, landNodeId: n, onImported: r }) {
|
|
22648
|
+
let { t: a } = $(), s = gT(), [c, u] = g(null), [d, f] = g([]), [p, m] = g(null), [h, _] = g({}), [b, x] = g({}), [S, C] = g(null), [w, T] = g(null), [E, ee] = g(null), [te, D] = g("relu"), [O, k] = g(""), [A, ne] = g(""), [j, re] = g(null), [M, ie] = g(""), ae = t(0), N = t(!1), oe = n !== void 0 && n.length > 0 ? n : M.length > 0 ? M : void 0, P = l(async () => {
|
|
22645
22649
|
let t = ++ae.current;
|
|
22646
22650
|
C(null);
|
|
22647
22651
|
try {
|
|
22648
|
-
let n =
|
|
22652
|
+
let n = Xw(e), r = mw(e).then((e) => ({
|
|
22649
22653
|
ok: !0,
|
|
22650
22654
|
value: e
|
|
22651
|
-
}), () => ({ ok: !1 })), i =
|
|
22655
|
+
}), () => ({ ok: !1 })), i = hw(e).then((e) => ({
|
|
22652
22656
|
ok: !0,
|
|
22653
22657
|
value: e
|
|
22654
|
-
}), () => ({ ok: !1 })), a =
|
|
22658
|
+
}), () => ({ ok: !1 })), a = Yw(e).then((e) => e, () => []), [o, s, c, l] = await Promise.all([
|
|
22655
22659
|
n,
|
|
22656
22660
|
r,
|
|
22657
22661
|
i,
|
|
@@ -22677,9 +22681,9 @@ function YT({ trpc: e, landNodeId: n, onImported: r }) {
|
|
|
22677
22681
|
i(() => {
|
|
22678
22682
|
P();
|
|
22679
22683
|
}, [P]);
|
|
22680
|
-
let F = o(() => (c ?? []).filter((e) => e.variant === te), [c, te]), se = o(() =>
|
|
22681
|
-
if (N.current ||
|
|
22682
|
-
let i =
|
|
22684
|
+
let F = o(() => (c ?? []).filter((e) => e.variant === te), [c, te]), se = o(() => RT(F), [F]), ce = o(() => new Map(se.map((e) => [e.id, e])), [se]), le = O.length > 0 && ce.has(O) ? O : se[0]?.id ?? "", ue = l(async (t) => {
|
|
22685
|
+
if (N.current || qT(A)) return;
|
|
22686
|
+
let i = KT(A);
|
|
22683
22687
|
N.current = !0, T(t.id), ee(null);
|
|
22684
22688
|
let o = t.format === "tflite" ? oe : n !== void 0 && n.length > 0 ? n : void 0;
|
|
22685
22689
|
try {
|
|
@@ -22706,18 +22710,18 @@ function YT({ trpc: e, landNodeId: n, onImported: r }) {
|
|
|
22706
22710
|
modelId: t.canonicalId
|
|
22707
22711
|
})
|
|
22708
22712
|
}, async ({ appendLog: n, patchSteps: r }) => {
|
|
22709
|
-
if (t.mode === "native") await
|
|
22713
|
+
if (t.mode === "native") await Zw(e, {
|
|
22710
22714
|
manifestId: t.manifestId,
|
|
22711
22715
|
...i === void 0 ? {} : { name: i },
|
|
22712
22716
|
...o === void 0 ? {} : { targetNodeId: o }
|
|
22713
22717
|
}), n(o === void 0 ? a("importOp.intoRegistry", { format: t.format }) : a("importOp.landed", { nodeId: o }));
|
|
22714
22718
|
else {
|
|
22715
22719
|
let r = p?.has(t.canonicalId) === !0, s = (h[t.canonicalId] ?? []).includes("onnx");
|
|
22716
|
-
(!r || !s) && (n(a("scrypted.onnxFirst")), await
|
|
22720
|
+
(!r || !s) && (n(a("scrypted.onnxFirst")), await Zw(e, {
|
|
22717
22721
|
manifestId: t.onnxManifestId,
|
|
22718
22722
|
...i === void 0 ? {} : { name: i },
|
|
22719
22723
|
...o === void 0 ? {} : { targetNodeId: o }
|
|
22720
|
-
})), n(a("scrypted.converting", { format: t.format })), await
|
|
22724
|
+
})), n(a("scrypted.converting", { format: t.format })), await bw(e, t.canonicalId, [t.format]), n(a("scrypted.converted", { format: t.format }));
|
|
22721
22725
|
}
|
|
22722
22726
|
r((e) => e.map((e) => e.status === "active" || e.status === "pending" ? {
|
|
22723
22727
|
...e,
|
|
@@ -22759,7 +22763,7 @@ function YT({ trpc: e, landNodeId: n, onImported: r }) {
|
|
|
22759
22763
|
children: a("common.retry")
|
|
22760
22764
|
})]
|
|
22761
22765
|
});
|
|
22762
|
-
let de = ce.get(le), I = de && c ?
|
|
22766
|
+
let de = ce.get(le), I = de && c ? $T({
|
|
22763
22767
|
filtered: F,
|
|
22764
22768
|
drift: d,
|
|
22765
22769
|
sourceId: de.id
|
|
@@ -22802,20 +22806,20 @@ function YT({ trpc: e, landNodeId: n, onImported: r }) {
|
|
|
22802
22806
|
}),
|
|
22803
22807
|
n !== void 0 && /* @__PURE__ */ v("p", {
|
|
22804
22808
|
className: "text-[10px] text-foreground-subtle",
|
|
22805
|
-
children: /* @__PURE__ */ v(
|
|
22809
|
+
children: /* @__PURE__ */ v(nT, {
|
|
22806
22810
|
i18nKey: "scrypted.landOn",
|
|
22807
22811
|
values: { nodeId: n },
|
|
22808
22812
|
components: { mono: /* @__PURE__ */ v("span", { className: "font-mono" }) }
|
|
22809
22813
|
})
|
|
22810
22814
|
}),
|
|
22811
|
-
/* @__PURE__ */ v(
|
|
22815
|
+
/* @__PURE__ */ v(HT, {
|
|
22812
22816
|
testId: "scrypted-browser",
|
|
22813
22817
|
title: "YOLOv9",
|
|
22814
22818
|
preSelectors: [{
|
|
22815
22819
|
id: "variant",
|
|
22816
22820
|
label: a("scrypted.variant"),
|
|
22817
22821
|
value: te,
|
|
22818
|
-
options:
|
|
22822
|
+
options: YT.map((e) => ({
|
|
22819
22823
|
value: e.value,
|
|
22820
22824
|
label: a(`scrypted.variants.${e.key}`),
|
|
22821
22825
|
count: (c ?? []).filter((t) => t.variant === e.value).length
|
|
@@ -22831,11 +22835,11 @@ function YT({ trpc: e, landNodeId: n, onImported: r }) {
|
|
|
22831
22835
|
emptyMessage: a("scrypted.emptyVariant"),
|
|
22832
22836
|
actionRow: de && L.length > 0 ? /* @__PURE__ */ y("div", {
|
|
22833
22837
|
className: "space-y-2",
|
|
22834
|
-
children: [/* @__PURE__ */ v(
|
|
22838
|
+
children: [/* @__PURE__ */ v(GT, {
|
|
22835
22839
|
value: A,
|
|
22836
22840
|
onChange: ne,
|
|
22837
22841
|
defaultName: de.name
|
|
22838
|
-
}), /* @__PURE__ */ v(
|
|
22842
|
+
}), /* @__PURE__ */ v(WT, {
|
|
22839
22843
|
entries: L,
|
|
22840
22844
|
registeredIds: p,
|
|
22841
22845
|
isImported: (e) => {
|
|
@@ -22854,7 +22858,7 @@ function YT({ trpc: e, landNodeId: n, onImported: r }) {
|
|
|
22854
22858
|
]
|
|
22855
22859
|
});
|
|
22856
22860
|
}
|
|
22857
|
-
var
|
|
22861
|
+
var ZT = [
|
|
22858
22862
|
"edgetpu",
|
|
22859
22863
|
"int8",
|
|
22860
22864
|
"full_integer_quant",
|
|
@@ -22862,25 +22866,25 @@ var XT = [
|
|
|
22862
22866
|
"float16",
|
|
22863
22867
|
"float32"
|
|
22864
22868
|
];
|
|
22865
|
-
function
|
|
22869
|
+
function QT(e, t, n) {
|
|
22866
22870
|
let r = e.filter((e) => e.format === t);
|
|
22867
22871
|
if (r.length !== 0) {
|
|
22868
22872
|
if (t === "tflite") {
|
|
22869
|
-
let e =
|
|
22873
|
+
let e = DT(n, "tflite");
|
|
22870
22874
|
return (e === void 0 ? void 0 : r.find((t) => t.id === e)) || r.toSorted((e, t) => {
|
|
22871
|
-
let n =
|
|
22875
|
+
let n = ZT.indexOf(e.precision.toLowerCase()), r = ZT.indexOf(t.precision.toLowerCase());
|
|
22872
22876
|
return (n === -1 ? 99 : n) - (r === -1 ? 99 : r);
|
|
22873
22877
|
})[0];
|
|
22874
22878
|
}
|
|
22875
22879
|
return r.toSorted((e, t) => e.files.reduce((e, t) => e + t.size, 0) - t.files.reduce((e, t) => e + t.size, 0))[0];
|
|
22876
22880
|
}
|
|
22877
22881
|
}
|
|
22878
|
-
function
|
|
22879
|
-
let t = e.sourceId, n = e.filtered.filter((e) =>
|
|
22882
|
+
function $T(e) {
|
|
22883
|
+
let t = e.sourceId, n = e.filtered.filter((e) => LT(e) === t);
|
|
22880
22884
|
if (n.length === 0) return [];
|
|
22881
|
-
let r =
|
|
22882
|
-
for (let a of
|
|
22883
|
-
let o =
|
|
22885
|
+
let r = QT(n, "onnx", t)?.id ?? DT(t, "onnx"), i = [];
|
|
22886
|
+
for (let a of JT) {
|
|
22887
|
+
let o = QT(n, a, t);
|
|
22884
22888
|
if (o) {
|
|
22885
22889
|
i.push({
|
|
22886
22890
|
id: `${t}::${a}`,
|
|
@@ -22890,7 +22894,7 @@ function QT(e) {
|
|
|
22890
22894
|
canonicalId: t,
|
|
22891
22895
|
onnxManifestId: r ?? o.id,
|
|
22892
22896
|
sizeMB: o.model.formats[a]?.sizeMB,
|
|
22893
|
-
driftStatus:
|
|
22897
|
+
driftStatus: yT(e.drift, o.id)
|
|
22894
22898
|
});
|
|
22895
22899
|
continue;
|
|
22896
22900
|
}
|
|
@@ -22908,14 +22912,14 @@ function QT(e) {
|
|
|
22908
22912
|
}
|
|
22909
22913
|
//#endregion
|
|
22910
22914
|
//#region src/frigate/frigate-import.ts
|
|
22911
|
-
function
|
|
22915
|
+
function eE(e, t) {
|
|
22912
22916
|
return {
|
|
22913
22917
|
family: e === "mobiledet" ? "ssdlite-mobiledet" : e,
|
|
22914
22918
|
tier: "default",
|
|
22915
22919
|
resolution: t
|
|
22916
22920
|
};
|
|
22917
22921
|
}
|
|
22918
|
-
var
|
|
22922
|
+
var tE = {
|
|
22919
22923
|
yolov9: {
|
|
22920
22924
|
type: "yolov9",
|
|
22921
22925
|
label: "YOLOv9 (ONNX)",
|
|
@@ -22944,7 +22948,7 @@ var eE = {
|
|
|
22944
22948
|
notes: "SSDLite MobileDet, EdgeTPU-compiled full-integer TFLite (the Frigate default-model architecture). TFLite_Detection_PostProcess 4-tensor output, decoded by the ssd postprocessor. Requires a Coral (tflite format node)."
|
|
22945
22949
|
}
|
|
22946
22950
|
};
|
|
22947
|
-
function
|
|
22951
|
+
function nE(e) {
|
|
22948
22952
|
let t = e.includes("\n") || !e.includes(",") ? e.split("\n") : e.split(","), n = [];
|
|
22949
22953
|
for (let e of t) {
|
|
22950
22954
|
let t = e.trim();
|
|
@@ -22954,7 +22958,7 @@ function tE(e) {
|
|
|
22954
22958
|
}
|
|
22955
22959
|
return n;
|
|
22956
22960
|
}
|
|
22957
|
-
var
|
|
22961
|
+
var rE = [{
|
|
22958
22962
|
id: "frigate-mobiledet-edgetpu",
|
|
22959
22963
|
label: "Frigate default — SSDLite MobileDet (EdgeTPU)",
|
|
22960
22964
|
format: "tflite",
|
|
@@ -22965,11 +22969,11 @@ var nE = [{
|
|
|
22965
22969
|
labels: /* @__PURE__ */ "person.bicycle.car.motorcycle.airplane.bus.train.car.boat.traffic light.fire hydrant.street sign.stop sign.parking meter.bench.bird.cat.dog.horse.sheep.cow.elephant.bear.zebra.giraffe.hat.backpack.umbrella.shoe.eye glasses.handbag.tie.suitcase.frisbee.skis.snowboard.sports ball.kite.baseball bat.baseball glove.skateboard.surfboard.tennis racket.bottle.plate.wine glass.cup.fork.knife.spoon.bowl.banana.apple.sandwich.orange.broccoli.carrot.hot dog.pizza.donut.cake.chair.couch.potted plant.bed.mirror.dining table.window.desk.toilet.door.tv.laptop.mouse.remote.keyboard.cell phone.microwave.oven.toaster.sink.refrigerator.blender.book.clock.vase.scissors.teddy bear.hair drier.toothbrush.hair brush".split("."),
|
|
22966
22970
|
license: sC,
|
|
22967
22971
|
notes: "Frigate's default detection model (the one a stock Frigate + Coral install runs). EdgeTPU-compiled full-integer TFLite, 320×320, TFLite_Detection_PostProcess output → ssd decode. Requires a Coral (tflite format) node."
|
|
22968
|
-
}],
|
|
22969
|
-
function
|
|
22970
|
-
return
|
|
22972
|
+
}], iE = /^[a-z0-9]{8}-[a-z0-9]{4}-[a-z0-9]{4}-[a-z0-9]{4}-[a-z0-9]{12}:[a-z0-9]{40}$/;
|
|
22973
|
+
function aE(e) {
|
|
22974
|
+
return iE.test(e);
|
|
22971
22975
|
}
|
|
22972
|
-
var
|
|
22976
|
+
var oE = {
|
|
22973
22977
|
n: "Nano",
|
|
22974
22978
|
t: "Tiny",
|
|
22975
22979
|
s: "Small",
|
|
@@ -22978,14 +22982,14 @@ var aE = {
|
|
|
22978
22982
|
l: "Large",
|
|
22979
22983
|
x: "Extra large"
|
|
22980
22984
|
};
|
|
22981
|
-
function
|
|
22985
|
+
function sE(e) {
|
|
22982
22986
|
let t = /^(yolov\d+)([a-z])$/.exec(e);
|
|
22983
22987
|
if (t !== null) {
|
|
22984
22988
|
let e = t[2];
|
|
22985
22989
|
return {
|
|
22986
22990
|
architecture: t[1],
|
|
22987
22991
|
weight: e,
|
|
22988
|
-
weightLabel:
|
|
22992
|
+
weightLabel: oE[e] ?? e.toUpperCase()
|
|
22989
22993
|
};
|
|
22990
22994
|
}
|
|
22991
22995
|
return {
|
|
@@ -22994,20 +22998,20 @@ function oE(e) {
|
|
|
22994
22998
|
weightLabel: ""
|
|
22995
22999
|
};
|
|
22996
23000
|
}
|
|
22997
|
-
function
|
|
23001
|
+
function cE(e) {
|
|
22998
23002
|
let t = e.supportedDetectors;
|
|
22999
|
-
return t.includes("onnx") || t.includes("openvino") ? "neural" : t.includes("edgetpu") ? "coral" : t.length === 0 ?
|
|
23003
|
+
return t.includes("onnx") || t.includes("openvino") ? "neural" : t.includes("edgetpu") ? "coral" : t.length === 0 ? hE(e.type).format === "tflite" ? "coral" : "neural" : null;
|
|
23000
23004
|
}
|
|
23001
|
-
function
|
|
23005
|
+
function lE(e) {
|
|
23002
23006
|
return e.width !== void 0 && e.height !== void 0 ? `${e.width}x${e.height}` : "";
|
|
23003
23007
|
}
|
|
23004
|
-
var
|
|
23005
|
-
function
|
|
23008
|
+
var uE = (e, t) => t.trainDate.localeCompare(e.trainDate);
|
|
23009
|
+
function dE(e, t) {
|
|
23006
23010
|
let n = /* @__PURE__ */ new Map();
|
|
23007
23011
|
for (let r of e) for (let e of t(r)) e !== "" && n.set(e, (n.get(e) ?? 0) + 1);
|
|
23008
23012
|
return n;
|
|
23009
23013
|
}
|
|
23010
|
-
function
|
|
23014
|
+
function fE(e, t, n) {
|
|
23011
23015
|
let r = [
|
|
23012
23016
|
"kind",
|
|
23013
23017
|
"release",
|
|
@@ -23015,46 +23019,46 @@ function dE(e, t, n) {
|
|
|
23015
23019
|
"architecture",
|
|
23016
23020
|
"weight",
|
|
23017
23021
|
"dimensions"
|
|
23018
|
-
], i = r.indexOf(n), a =
|
|
23022
|
+
], i = r.indexOf(n), a = sE(e.name);
|
|
23019
23023
|
for (let n = 0; n <= i; n++) {
|
|
23020
23024
|
let i = r[n];
|
|
23021
|
-
if (i === "kind" && t.kind !== void 0 && t.kind === "base" !== e.isBaseModel || i === "release" && t.release !== void 0 && e.baseModel !== t.release || i === "detector" && t.detector !== void 0 && !e.supportedDetectors.includes(t.detector) || i === "architecture" && t.architecture !== void 0 && a.architecture !== t.architecture || i === "weight" && t.weight !== void 0 && a.weight !== t.weight || i === "dimensions" && t.dimensions !== void 0 &&
|
|
23025
|
+
if (i === "kind" && t.kind !== void 0 && t.kind === "base" !== e.isBaseModel || i === "release" && t.release !== void 0 && e.baseModel !== t.release || i === "detector" && t.detector !== void 0 && !e.supportedDetectors.includes(t.detector) || i === "architecture" && t.architecture !== void 0 && a.architecture !== t.architecture || i === "weight" && t.weight !== void 0 && a.weight !== t.weight || i === "dimensions" && t.dimensions !== void 0 && lE(e) !== t.dimensions) return !1;
|
|
23022
23026
|
}
|
|
23023
23027
|
return !0;
|
|
23024
23028
|
}
|
|
23025
|
-
function
|
|
23026
|
-
let n =
|
|
23029
|
+
function pE(e, t) {
|
|
23030
|
+
let n = dE(e, (e) => [e.isBaseModel ? "base" : "custom"]);
|
|
23027
23031
|
return {
|
|
23028
23032
|
kind: ["custom", "base"].filter((e) => (n.get(e) ?? 0) > 0).map((e) => ({
|
|
23029
23033
|
value: e,
|
|
23030
23034
|
label: e === "custom" ? "My trainings" : "Official base",
|
|
23031
23035
|
count: n.get(e)
|
|
23032
23036
|
})),
|
|
23033
|
-
release: [...
|
|
23037
|
+
release: [...dE(e.filter((e) => fE(e, t, "kind")), (e) => [e.baseModel]).entries()].toSorted((e, t) => t[0].localeCompare(e[0], void 0, { numeric: !0 })).map(([e, t]) => ({
|
|
23034
23038
|
value: e,
|
|
23035
23039
|
label: e,
|
|
23036
23040
|
count: t
|
|
23037
23041
|
})),
|
|
23038
23042
|
detector: [],
|
|
23039
|
-
architecture: [...
|
|
23043
|
+
architecture: [...dE(e.filter((e) => fE(e, t, "detector")), (e) => [sE(e.name).architecture]).entries()].toSorted((e, t) => e[0].localeCompare(t[0])).map(([e, t]) => ({
|
|
23040
23044
|
value: e,
|
|
23041
23045
|
label: e,
|
|
23042
23046
|
count: t
|
|
23043
23047
|
})),
|
|
23044
|
-
weight: [...
|
|
23048
|
+
weight: [...dE(e.filter((e) => fE(e, t, "architecture")), (e) => [sE(e.name).weight]).entries()].toSorted((e, t) => e[0].localeCompare(t[0])).map(([e, t]) => ({
|
|
23045
23049
|
value: e,
|
|
23046
|
-
label:
|
|
23050
|
+
label: oE[e] ?? e.toUpperCase(),
|
|
23047
23051
|
count: t
|
|
23048
23052
|
})),
|
|
23049
|
-
dimensions: [...
|
|
23053
|
+
dimensions: [...dE(e.filter((e) => fE(e, t, "weight")), (e) => [lE(e)]).entries()].toSorted((e, t) => e[0].localeCompare(t[0], void 0, { numeric: !0 })).map(([e, t]) => ({
|
|
23050
23054
|
value: e,
|
|
23051
23055
|
label: e.replace("x", "×"),
|
|
23052
23056
|
count: t
|
|
23053
23057
|
})),
|
|
23054
|
-
entries: e.filter((e) =>
|
|
23058
|
+
entries: e.filter((e) => fE(e, t, "dimensions")).toSorted(uE)
|
|
23055
23059
|
};
|
|
23056
23060
|
}
|
|
23057
|
-
var
|
|
23061
|
+
var mE = {
|
|
23058
23062
|
mobiledet: {
|
|
23059
23063
|
format: "tflite",
|
|
23060
23064
|
postprocessor: "ssd",
|
|
@@ -23079,8 +23083,8 @@ var pE = {
|
|
|
23079
23083
|
extension: ".onnx"
|
|
23080
23084
|
}
|
|
23081
23085
|
};
|
|
23082
|
-
function
|
|
23083
|
-
return
|
|
23086
|
+
function hE(e) {
|
|
23087
|
+
return mE[e] ?? {
|
|
23084
23088
|
format: "onnx",
|
|
23085
23089
|
extension: ".onnx"
|
|
23086
23090
|
};
|
|
@@ -23088,12 +23092,12 @@ function mE(e) {
|
|
|
23088
23092
|
//#endregion
|
|
23089
23093
|
//#region src/components/TfliteGate.tsx
|
|
23090
23094
|
e();
|
|
23091
|
-
function
|
|
23095
|
+
function gE(e, t) {
|
|
23092
23096
|
let [n, r] = g(null);
|
|
23093
23097
|
return i(() => {
|
|
23094
23098
|
if (!t) return;
|
|
23095
23099
|
let n = !1;
|
|
23096
|
-
return
|
|
23100
|
+
return Yw(e).then((e) => {
|
|
23097
23101
|
n || r(e);
|
|
23098
23102
|
}).catch(() => {
|
|
23099
23103
|
n || r([]);
|
|
@@ -23102,7 +23106,7 @@ function hE(e, t) {
|
|
|
23102
23106
|
};
|
|
23103
23107
|
}, [e, t]), t ? n : [];
|
|
23104
23108
|
}
|
|
23105
|
-
function
|
|
23109
|
+
function _E({ nodes: e }) {
|
|
23106
23110
|
let { t } = $();
|
|
23107
23111
|
return e === null ? /* @__PURE__ */ v("div", {
|
|
23108
23112
|
className: "text-[10px] text-foreground-subtle",
|
|
@@ -23117,7 +23121,7 @@ function gE({ nodes: e }) {
|
|
|
23117
23121
|
}
|
|
23118
23122
|
//#endregion
|
|
23119
23123
|
//#region src/frigate/frigate-as-variant-sources.ts
|
|
23120
|
-
var
|
|
23124
|
+
var vE = {
|
|
23121
23125
|
n: "Nano",
|
|
23122
23126
|
t: "Tiny",
|
|
23123
23127
|
s: "Small",
|
|
@@ -23125,30 +23129,30 @@ var _E = {
|
|
|
23125
23129
|
c: "Compact",
|
|
23126
23130
|
l: "Large",
|
|
23127
23131
|
x: "Extra large"
|
|
23128
|
-
},
|
|
23132
|
+
}, yE = [
|
|
23129
23133
|
"onnx",
|
|
23130
23134
|
"openvino",
|
|
23131
23135
|
"coreml",
|
|
23132
23136
|
"tflite"
|
|
23133
23137
|
];
|
|
23134
|
-
function yE(e) {
|
|
23135
|
-
return e.filter((e) => sE(e) !== null);
|
|
23136
|
-
}
|
|
23137
23138
|
function bE(e) {
|
|
23139
|
+
return e.filter((e) => cE(e) !== null);
|
|
23140
|
+
}
|
|
23141
|
+
function xE(e) {
|
|
23138
23142
|
if (e.width !== void 0 && e.height !== void 0) return e.width === e.height ? e.width : Math.max(e.width, e.height);
|
|
23139
|
-
let t = /^(\d+)x(\d+)$/.exec(
|
|
23143
|
+
let t = /^(\d+)x(\d+)$/.exec(lE(e));
|
|
23140
23144
|
if (!t) return;
|
|
23141
23145
|
let n = Number(t[1]), r = Number(t[2]);
|
|
23142
23146
|
if (!(!Number.isFinite(n) || !Number.isFinite(r))) return n === r ? n : Math.max(n, r);
|
|
23143
23147
|
}
|
|
23144
|
-
function
|
|
23148
|
+
function SE(e, t) {
|
|
23145
23149
|
if (t.length === 0) return e === "mobiledet" ? "SSDLite MobileDet" : e === "yolonas" ? "YOLO-NAS" : e.toUpperCase();
|
|
23146
|
-
let n =
|
|
23150
|
+
let n = vE[t] ?? t.toUpperCase();
|
|
23147
23151
|
return e.startsWith("yolo") ? `${e.replace(/^yolo/i, "YOLO")} ${n}` : `${e} ${n}`;
|
|
23148
23152
|
}
|
|
23149
|
-
var
|
|
23150
|
-
function
|
|
23151
|
-
let t = [...e].toSorted(
|
|
23153
|
+
var CE = (e, t) => t.trainDate.localeCompare(e.trainDate);
|
|
23154
|
+
function wE(e) {
|
|
23155
|
+
let t = [...e].toSorted(CE), n = t.find((e) => cE(e) === "neural"), r = t.find((e) => cE(e) === "coral"), i = [];
|
|
23152
23156
|
return n !== void 0 && (i.push({
|
|
23153
23157
|
format: "onnx",
|
|
23154
23158
|
plusModelId: n.id,
|
|
@@ -23169,33 +23173,33 @@ function CE(e) {
|
|
|
23169
23173
|
plusModelId: r.id,
|
|
23170
23174
|
via: "download",
|
|
23171
23175
|
needsCoral: !0
|
|
23172
|
-
}), i.toSorted((e, t) =>
|
|
23176
|
+
}), i.toSorted((e, t) => yE.indexOf(e.format) - yE.indexOf(t.format));
|
|
23173
23177
|
}
|
|
23174
|
-
function
|
|
23178
|
+
function TE(e) {
|
|
23175
23179
|
let t = /* @__PURE__ */ new Map();
|
|
23176
23180
|
for (let n of e) {
|
|
23177
23181
|
let e = n.trainDate.slice(0, 10);
|
|
23178
23182
|
t.set(e, [...t.get(e) ?? [], n]);
|
|
23179
23183
|
}
|
|
23180
23184
|
return [...t.entries()].map(([e, t]) => {
|
|
23181
|
-
let n = t.toSorted(
|
|
23185
|
+
let n = t.toSorted(CE);
|
|
23182
23186
|
return {
|
|
23183
23187
|
key: e,
|
|
23184
23188
|
trainDate: n[0]?.trainDate ?? "",
|
|
23185
23189
|
verifiedImages: Math.max(0, ...n.map((e) => e.verifiedImages)),
|
|
23186
23190
|
builds: n,
|
|
23187
|
-
offers:
|
|
23191
|
+
offers: wE(n)
|
|
23188
23192
|
};
|
|
23189
23193
|
}).filter((e) => e.offers.length > 0).toSorted((e, t) => t.trainDate.localeCompare(e.trainDate));
|
|
23190
23194
|
}
|
|
23191
|
-
function
|
|
23195
|
+
function EE(e) {
|
|
23192
23196
|
let t = /* @__PURE__ */ new Map();
|
|
23193
|
-
for (let n of
|
|
23194
|
-
let e =
|
|
23197
|
+
for (let n of bE(e)) {
|
|
23198
|
+
let e = sE(n.name), r = e.weight.length > 0 ? e.weight : "default", i = xE(n), a = `${n.name}${i === void 0 ? "" : `-${i}`}`, o = t.get(a) ?? {
|
|
23195
23199
|
family: e.architecture,
|
|
23196
23200
|
tier: r,
|
|
23197
23201
|
...i === void 0 ? {} : { resolution: i },
|
|
23198
|
-
name:
|
|
23202
|
+
name: SE(e.architecture, e.weight),
|
|
23199
23203
|
builds: []
|
|
23200
23204
|
};
|
|
23201
23205
|
t.set(a, {
|
|
@@ -23205,7 +23209,7 @@ function TE(e) {
|
|
|
23205
23209
|
}
|
|
23206
23210
|
let n = /* @__PURE__ */ new Map(), r = [];
|
|
23207
23211
|
for (let [e, i] of t) {
|
|
23208
|
-
let t =
|
|
23212
|
+
let t = TE(i.builds), a = t[0];
|
|
23209
23213
|
a !== void 0 && (n.set(e, {
|
|
23210
23214
|
sourceId: e,
|
|
23211
23215
|
family: i.family,
|
|
@@ -23232,13 +23236,13 @@ function TE(e) {
|
|
|
23232
23236
|
//#endregion
|
|
23233
23237
|
//#region src/tabs/use-plus-import.ts
|
|
23234
23238
|
e();
|
|
23235
|
-
function
|
|
23236
|
-
return e.length === 0 ? "" :
|
|
23239
|
+
function DE(e) {
|
|
23240
|
+
return e.length === 0 ? "" : rT("plusImport.conversions", { parts: e.map((e) => e.ok ? `${e.format} ✓${e.nodeId ? ` (${e.nodeId})` : ""}` : `${e.format} ✗ — ${e.error ?? rT("plusImport.conversionFailedWord")}`).join("; ") });
|
|
23237
23241
|
}
|
|
23238
|
-
function
|
|
23242
|
+
function OE({ trpc: e, onRegistered: t, onError: n, landNodeId: r }) {
|
|
23239
23243
|
let { t: a } = $(), [o, s] = g(null), [c, u] = g({}), [d, f] = g({}), [p, m] = g(null), [h, _] = g(null), v = l(async () => {
|
|
23240
23244
|
try {
|
|
23241
|
-
let [t, n] = await Promise.all([
|
|
23245
|
+
let [t, n] = await Promise.all([mw(e), hw(e)]);
|
|
23242
23246
|
s(new Set(t.map((e) => e.entry.id)));
|
|
23243
23247
|
let r = {}, i = {};
|
|
23244
23248
|
for (let e of t) r[e.entry.id] = VC(e.entry), i[e.entry.id] = HC(n, e.entry.id);
|
|
@@ -23286,7 +23290,7 @@ function DE({ trpc: e, onRegistered: t, onError: n, landNodeId: r }) {
|
|
|
23286
23290
|
plusModelId: i
|
|
23287
23291
|
})],
|
|
23288
23292
|
status: "running",
|
|
23289
|
-
sessionId:
|
|
23293
|
+
sessionId: dT({
|
|
23290
23294
|
kind: f ? "convert" : "import",
|
|
23291
23295
|
title: a("plusImport.title", {
|
|
23292
23296
|
name: l,
|
|
@@ -23307,9 +23311,9 @@ function DE({ trpc: e, onRegistered: t, onError: n, landNodeId: r }) {
|
|
|
23307
23311
|
steps: e([...t.steps])
|
|
23308
23312
|
});
|
|
23309
23313
|
}, g = (e) => {
|
|
23310
|
-
_((t) => t === null ? t : (
|
|
23314
|
+
_((t) => t === null ? t : (fT(t.sessionId, e), {
|
|
23311
23315
|
...t,
|
|
23312
|
-
logs:
|
|
23316
|
+
logs: oT(t.logs, {
|
|
23313
23317
|
phase: "log",
|
|
23314
23318
|
log: e
|
|
23315
23319
|
})
|
|
@@ -23319,11 +23323,11 @@ function DE({ trpc: e, onRegistered: t, onError: n, landNodeId: r }) {
|
|
|
23319
23323
|
...n,
|
|
23320
23324
|
status: t
|
|
23321
23325
|
} : n));
|
|
23322
|
-
}, b =
|
|
23326
|
+
}, b = Pw(e, (e) => {
|
|
23323
23327
|
_((t) => {
|
|
23324
23328
|
if (t === null) return t;
|
|
23325
|
-
let n =
|
|
23326
|
-
return
|
|
23329
|
+
let n = oT(t.logs, e);
|
|
23330
|
+
return mT(t.sessionId, n), {
|
|
23327
23331
|
...t,
|
|
23328
23332
|
progress: e.phase === "log" ? t.progress : e,
|
|
23329
23333
|
logs: n
|
|
@@ -23335,7 +23339,7 @@ function DE({ trpc: e, onRegistered: t, onError: n, landNodeId: r }) {
|
|
|
23335
23339
|
if (s === "onnx" || s === "tflite") if (r) g(a("plusImport.alreadyInLibrary", { format: s })), y("download", "done"), y("register", "done");
|
|
23336
23340
|
else {
|
|
23337
23341
|
g(a("plusImport.downloadingNative", { format: s }));
|
|
23338
|
-
let n = await
|
|
23342
|
+
let n = await zw(e, {
|
|
23339
23343
|
plusModelId: i,
|
|
23340
23344
|
...u === void 0 ? {} : { name: u },
|
|
23341
23345
|
ensureFormats: [],
|
|
@@ -23353,14 +23357,14 @@ function DE({ trpc: e, onRegistered: t, onError: n, landNodeId: r }) {
|
|
|
23353
23357
|
}
|
|
23354
23358
|
else if (f) if (!n) {
|
|
23355
23359
|
g(a("plusImport.onnxMissing"));
|
|
23356
|
-
let n = await
|
|
23360
|
+
let n = await zw(e, {
|
|
23357
23361
|
plusModelId: i,
|
|
23358
23362
|
...u === void 0 ? {} : { name: u },
|
|
23359
23363
|
ensureFormats: [s],
|
|
23360
23364
|
format: "onnx"
|
|
23361
23365
|
});
|
|
23362
23366
|
y("download", "done"), y("register", "done"), y("convert", n.conversions.some((e) => e.format === s && e.ok) ? "done" : "error");
|
|
23363
|
-
let r =
|
|
23367
|
+
let r = DE(n.conversions);
|
|
23364
23368
|
g(a("plusImport.registeredConv", {
|
|
23365
23369
|
modelId: n.modelId,
|
|
23366
23370
|
summary: r
|
|
@@ -23375,15 +23379,15 @@ function DE({ trpc: e, onRegistered: t, onError: n, landNodeId: r }) {
|
|
|
23375
23379
|
}));
|
|
23376
23380
|
else {
|
|
23377
23381
|
y("download", "done"), y("register", "done"), y("convert", "active"), g(a("plusImport.converting", { format: s }));
|
|
23378
|
-
let n = await
|
|
23379
|
-
if (y("convert", r ? "done" : "error"), g(a("plusImport.conversionLog", { summary:
|
|
23382
|
+
let n = await bw(e, d, [s]), r = n.conversions.some((e) => e.format === s && e.ok);
|
|
23383
|
+
if (y("convert", r ? "done" : "error"), g(a("plusImport.conversionLog", { summary: DE(n.conversions) })), !r) throw Error(n.conversions.find((e) => e.format === s)?.error ?? a("plusImport.conversionFailed", { format: s }));
|
|
23380
23384
|
t(a("plusImport.converted", {
|
|
23381
23385
|
registryId: d,
|
|
23382
23386
|
format: s,
|
|
23383
|
-
summary:
|
|
23387
|
+
summary: DE(n.conversions)
|
|
23384
23388
|
}));
|
|
23385
23389
|
}
|
|
23386
|
-
await v(), _((e) => e === null ? e : (
|
|
23390
|
+
await v(), _((e) => e === null ? e : (pT(e.sessionId, { status: "success" }), {
|
|
23387
23391
|
...e,
|
|
23388
23392
|
status: "success",
|
|
23389
23393
|
steps: e.steps.map((e) => e.status === "active" || e.status === "pending" ? {
|
|
@@ -23394,7 +23398,7 @@ function DE({ trpc: e, onRegistered: t, onError: n, landNodeId: r }) {
|
|
|
23394
23398
|
}));
|
|
23395
23399
|
} catch (e) {
|
|
23396
23400
|
let t = e instanceof Error ? e.message : a("importOp.failed");
|
|
23397
|
-
_((e) => e === null ? e : (
|
|
23401
|
+
_((e) => e === null ? e : (pT(e.sessionId, {
|
|
23398
23402
|
status: "error",
|
|
23399
23403
|
errorMessage: t
|
|
23400
23404
|
}), {
|
|
@@ -23432,11 +23436,11 @@ function DE({ trpc: e, onRegistered: t, onError: n, landNodeId: r }) {
|
|
|
23432
23436
|
//#endregion
|
|
23433
23437
|
//#region src/tabs/FrigatePlusCatalog.tsx
|
|
23434
23438
|
e();
|
|
23435
|
-
var
|
|
23436
|
-
function
|
|
23439
|
+
var kE = ["kind", "release"];
|
|
23440
|
+
function AE(e, t) {
|
|
23437
23441
|
let n = { ...t };
|
|
23438
|
-
for (let t of
|
|
23439
|
-
let r =
|
|
23442
|
+
for (let t of kE) {
|
|
23443
|
+
let r = pE(e, n)[t], i = n[t], a = r[0];
|
|
23440
23444
|
a !== void 0 && (i === void 0 || !r.some((e) => e.value === i)) && (n = t === "kind" ? {
|
|
23441
23445
|
...n,
|
|
23442
23446
|
kind: a.value === "base" ? "base" : "custom"
|
|
@@ -23447,23 +23451,23 @@ function kE(e, t) {
|
|
|
23447
23451
|
}
|
|
23448
23452
|
return n;
|
|
23449
23453
|
}
|
|
23450
|
-
function
|
|
23454
|
+
function jE(e, t) {
|
|
23451
23455
|
return e === null ? t("plus.checkingCoral") : e.length === 0 ? t("plus.needsCoral") : void 0;
|
|
23452
23456
|
}
|
|
23453
|
-
function
|
|
23454
|
-
let { t: a } = $(), [s, c] = g({}), [l, u] = g(""), d =
|
|
23457
|
+
function ME({ trpc: e, models: t, onRegistered: n, onError: r, landNodeId: i }) {
|
|
23458
|
+
let { t: a } = $(), [s, c] = g({}), [l, u] = g(""), d = OE({
|
|
23455
23459
|
trpc: e,
|
|
23456
23460
|
onRegistered: n,
|
|
23457
23461
|
onError: r,
|
|
23458
23462
|
...i === void 0 ? {} : { landNodeId: i }
|
|
23459
|
-
}), f = o(() =>
|
|
23463
|
+
}), f = o(() => bE(t), [t]), p = AE(f, s), m = pE(f, {
|
|
23460
23464
|
kind: p.kind,
|
|
23461
23465
|
release: p.release
|
|
23462
|
-
}), h = o(() =>
|
|
23466
|
+
}), h = o(() => EE(m.entries), [
|
|
23463
23467
|
f,
|
|
23464
23468
|
p.kind,
|
|
23465
23469
|
p.release
|
|
23466
|
-
]), _ =
|
|
23470
|
+
]), _ = gE(e, o(() => [...h.combos.values()].some((e) => e.trainings.some((e) => e.offers.some((e) => e.format === "tflite"))), [h])), x = (e, t) => {
|
|
23467
23471
|
c(e === "kind" ? { kind: t === "base" ? "base" : "custom" } : {
|
|
23468
23472
|
...p.kind === void 0 ? {} : { kind: p.kind },
|
|
23469
23473
|
release: t
|
|
@@ -23474,7 +23478,7 @@ function jE({ trpc: e, models: t, onRegistered: n, onError: r, landNodeId: i })
|
|
|
23474
23478
|
children: a("plus.empty")
|
|
23475
23479
|
});
|
|
23476
23480
|
let S = h.combos.has(l) ? l : "";
|
|
23477
|
-
return /* @__PURE__ */ y(b, { children: [d.modal !== null && /* @__PURE__ */ v(
|
|
23481
|
+
return /* @__PURE__ */ y(b, { children: [d.modal !== null && /* @__PURE__ */ v(aT, {
|
|
23478
23482
|
title: d.modal.title,
|
|
23479
23483
|
steps: d.modal.steps,
|
|
23480
23484
|
progress: d.modal.progress,
|
|
@@ -23482,7 +23486,7 @@ function jE({ trpc: e, models: t, onRegistered: n, onError: r, landNodeId: i })
|
|
|
23482
23486
|
status: d.modal.status,
|
|
23483
23487
|
...d.modal.errorMessage === void 0 ? {} : { errorMessage: d.modal.errorMessage },
|
|
23484
23488
|
onClose: d.closeModal
|
|
23485
|
-
}), /* @__PURE__ */ v(
|
|
23489
|
+
}), /* @__PURE__ */ v(HT, {
|
|
23486
23490
|
testId: "frigate-browser",
|
|
23487
23491
|
preSelectors: [{
|
|
23488
23492
|
id: "kind",
|
|
@@ -23508,7 +23512,7 @@ function jE({ trpc: e, models: t, onRegistered: n, onError: r, landNodeId: i })
|
|
|
23508
23512
|
emptyMessage: a("plus.emptyRelease"),
|
|
23509
23513
|
renderActionRow: (e) => {
|
|
23510
23514
|
let t = h.combos.get(e);
|
|
23511
|
-
return t === void 0 ? null : /* @__PURE__ */ v(
|
|
23515
|
+
return t === void 0 ? null : /* @__PURE__ */ v(PE, {
|
|
23512
23516
|
combo: t,
|
|
23513
23517
|
tfliteNodes: _,
|
|
23514
23518
|
registeredIds: d.registeredIds,
|
|
@@ -23520,16 +23524,16 @@ function jE({ trpc: e, models: t, onRegistered: n, onError: r, landNodeId: i })
|
|
|
23520
23524
|
}
|
|
23521
23525
|
})] });
|
|
23522
23526
|
}
|
|
23523
|
-
var
|
|
23524
|
-
function
|
|
23527
|
+
var NE = (e) => `${kC(e.plusModelId)}::${e.format}`;
|
|
23528
|
+
function PE({ combo: e, tfliteNodes: t, registeredIds: n, registryFormats: r, presenceByModel: a, busyId: o, onImport: s }) {
|
|
23525
23529
|
let { t: c } = $(), [l, u] = g(e.trainings[0]?.key ?? ""), [d, f] = g("");
|
|
23526
23530
|
i(() => {
|
|
23527
23531
|
u(e.trainings[0]?.key ?? "");
|
|
23528
23532
|
}, [e]);
|
|
23529
23533
|
let p = e.trainings.find((e) => e.key === l) ?? e.trainings[0], m = p?.builds[0];
|
|
23530
23534
|
if (p === void 0 || m === void 0) return null;
|
|
23531
|
-
let h = p.offers.some((e) => e.format === "onnx"), _ = p.offers.some((e) => e.format === "tflite"), b =
|
|
23532
|
-
id:
|
|
23535
|
+
let h = p.offers.some((e) => e.format === "onnx"), _ = p.offers.some((e) => e.format === "tflite"), b = jE(t, c), x = p.offers.map((e) => ({
|
|
23536
|
+
id: NE(e),
|
|
23533
23537
|
format: e.format,
|
|
23534
23538
|
driftStatus: e.needsCoral ? b ?? "ok" : "ok"
|
|
23535
23539
|
})), S = [...new Set(p.offers.map((e) => kC(e.plusModelId)))].flatMap((e) => a[e] ?? []), C = `${e.name}${e.resolution === void 0 ? "" : ` ${e.resolution}`}`;
|
|
@@ -23538,7 +23542,7 @@ function NE({ combo: e, tfliteNodes: t, registeredIds: n, registryFormats: r, pr
|
|
|
23538
23542
|
"data-testid": "plus-combo-panel",
|
|
23539
23543
|
"data-combo": e.sourceId,
|
|
23540
23544
|
children: [
|
|
23541
|
-
e.trainings.length > 1 && /* @__PURE__ */ v(
|
|
23545
|
+
e.trainings.length > 1 && /* @__PURE__ */ v(VT, {
|
|
23542
23546
|
label: c("plus.training"),
|
|
23543
23547
|
value: p.key,
|
|
23544
23548
|
options: e.trainings.map((e) => ({
|
|
@@ -23550,13 +23554,13 @@ function NE({ combo: e, tfliteNodes: t, registeredIds: n, registryFormats: r, pr
|
|
|
23550
23554
|
/* @__PURE__ */ y("div", {
|
|
23551
23555
|
className: "rounded-md border border-border bg-surface px-3 py-2 text-[11px] text-foreground-subtle break-words",
|
|
23552
23556
|
children: [
|
|
23553
|
-
/* @__PURE__ */ v(
|
|
23557
|
+
/* @__PURE__ */ v(nT, {
|
|
23554
23558
|
i18nKey: "plus.summary",
|
|
23555
23559
|
values: {
|
|
23556
23560
|
name: m.name,
|
|
23557
23561
|
release: m.baseModel,
|
|
23558
23562
|
decode: m.type,
|
|
23559
|
-
input:
|
|
23563
|
+
input: lE(m).replace("x", "×")
|
|
23560
23564
|
},
|
|
23561
23565
|
components: {
|
|
23562
23566
|
name: /* @__PURE__ */ v("span", { className: "text-foreground" }),
|
|
@@ -23574,21 +23578,21 @@ function NE({ combo: e, tfliteNodes: t, registeredIds: n, registryFormats: r, pr
|
|
|
23574
23578
|
})
|
|
23575
23579
|
]
|
|
23576
23580
|
}),
|
|
23577
|
-
_ && /* @__PURE__ */ v(
|
|
23578
|
-
/* @__PURE__ */ v(
|
|
23581
|
+
_ && /* @__PURE__ */ v(_E, { nodes: t }),
|
|
23582
|
+
/* @__PURE__ */ v(GT, {
|
|
23579
23583
|
value: d,
|
|
23580
23584
|
onChange: f,
|
|
23581
23585
|
defaultName: m.name
|
|
23582
23586
|
}),
|
|
23583
|
-
/* @__PURE__ */ v(
|
|
23587
|
+
/* @__PURE__ */ v(WT, {
|
|
23584
23588
|
entries: x,
|
|
23585
23589
|
registeredIds: n,
|
|
23586
23590
|
isImported: (e) => (r[e.id.split("::")[0] ?? ""] ?? []).includes(e.format),
|
|
23587
23591
|
presence: S,
|
|
23588
23592
|
busyId: o,
|
|
23589
23593
|
onImport: (e) => {
|
|
23590
|
-
let t = p.offers.find((t) =>
|
|
23591
|
-
t === void 0 ||
|
|
23594
|
+
let t = p.offers.find((t) => NE(t) === e);
|
|
23595
|
+
t === void 0 || qT(d) || s(t, C, KT(d));
|
|
23592
23596
|
}
|
|
23593
23597
|
})
|
|
23594
23598
|
]
|
|
@@ -23597,12 +23601,12 @@ function NE({ combo: e, tfliteNodes: t, registeredIds: n, registryFormats: r, pr
|
|
|
23597
23601
|
//#endregion
|
|
23598
23602
|
//#region src/tabs/FrigateSourceSections.tsx
|
|
23599
23603
|
e();
|
|
23600
|
-
var
|
|
23601
|
-
function
|
|
23604
|
+
var FE = "https://docs.frigate.video/integrations/plus/";
|
|
23605
|
+
function IE({ trpc: e, status: t, onStatusChange: n }) {
|
|
23602
23606
|
let [r, i] = g(""), [a, o] = g(null), [s, c] = g(!1), [u, d] = g(null), [f, p] = g(!1), [m, h] = g(!1), { t: _ } = $(), b = l(async () => {
|
|
23603
23607
|
p(!0), d(null);
|
|
23604
23608
|
try {
|
|
23605
|
-
let t = await
|
|
23609
|
+
let t = await Lw(e);
|
|
23606
23610
|
d(t.ok ? _("frigate.connectionOk") : t.error ?? _("frigate.connectionFailed"));
|
|
23607
23611
|
} catch (e) {
|
|
23608
23612
|
d(e instanceof Error ? e.message : _("frigate.connectionFailed"));
|
|
@@ -23611,13 +23615,13 @@ function FE({ trpc: e, status: t, onStatusChange: n }) {
|
|
|
23611
23615
|
}
|
|
23612
23616
|
}, [e, _]), x = l(async () => {
|
|
23613
23617
|
let t = r.trim();
|
|
23614
|
-
if (o(null), !
|
|
23618
|
+
if (o(null), !aE(t)) {
|
|
23615
23619
|
o(_("frigate.keyFormatInvalid"));
|
|
23616
23620
|
return;
|
|
23617
23621
|
}
|
|
23618
23622
|
c(!0);
|
|
23619
23623
|
try {
|
|
23620
|
-
await
|
|
23624
|
+
await Bw(e, t), i(""), h(!1), n(await Iw(e)), await b();
|
|
23621
23625
|
} catch (e) {
|
|
23622
23626
|
o(e instanceof Error ? e.message : _("frigate.keySaveFailed"));
|
|
23623
23627
|
} finally {
|
|
@@ -23637,10 +23641,10 @@ function FE({ trpc: e, status: t, onStatusChange: n }) {
|
|
|
23637
23641
|
className: "font-medium text-foreground",
|
|
23638
23642
|
children: _("frigate.plus")
|
|
23639
23643
|
}),
|
|
23640
|
-
/* @__PURE__ */ v("div", { children: /* @__PURE__ */ v(
|
|
23644
|
+
/* @__PURE__ */ v("div", { children: /* @__PURE__ */ v(nT, {
|
|
23641
23645
|
i18nKey: "frigate.keyIntro",
|
|
23642
23646
|
components: { docs: /* @__PURE__ */ v("a", {
|
|
23643
|
-
href:
|
|
23647
|
+
href: FE,
|
|
23644
23648
|
target: "_blank",
|
|
23645
23649
|
rel: "noreferrer",
|
|
23646
23650
|
className: "text-primary hover:underline"
|
|
@@ -23679,7 +23683,7 @@ function FE({ trpc: e, status: t, onStatusChange: n }) {
|
|
|
23679
23683
|
S && /* @__PURE__ */ y("div", {
|
|
23680
23684
|
className: "space-y-1",
|
|
23681
23685
|
children: [
|
|
23682
|
-
/* @__PURE__ */ v(
|
|
23686
|
+
/* @__PURE__ */ v($w, {
|
|
23683
23687
|
label: _("frigate.keyLabel"),
|
|
23684
23688
|
children: /* @__PURE__ */ v("input", {
|
|
23685
23689
|
type: "password",
|
|
@@ -23720,11 +23724,11 @@ function FE({ trpc: e, status: t, onStatusChange: n }) {
|
|
|
23720
23724
|
]
|
|
23721
23725
|
});
|
|
23722
23726
|
}
|
|
23723
|
-
function
|
|
23727
|
+
function LE({ trpc: e, onRegistered: t, onError: n, onPrefillUpload: r, landNodeId: a }) {
|
|
23724
23728
|
let { t: o } = $(), [s, c] = g(null), [u, d] = g(null), [f, p] = g(!1), m = l(async () => {
|
|
23725
23729
|
p(!0);
|
|
23726
23730
|
try {
|
|
23727
|
-
d(await
|
|
23731
|
+
d(await Rw(e));
|
|
23728
23732
|
} catch (e) {
|
|
23729
23733
|
n(e instanceof Error ? e.message : o("frigate.listFailed"));
|
|
23730
23734
|
} finally {
|
|
@@ -23739,7 +23743,7 @@ function IE({ trpc: e, onRegistered: t, onError: n, onPrefillUpload: r, landNode
|
|
|
23739
23743
|
}, [m]);
|
|
23740
23744
|
return i(() => {
|
|
23741
23745
|
let t = !1;
|
|
23742
|
-
return
|
|
23746
|
+
return Iw(e).then((e) => {
|
|
23743
23747
|
t || (c(e), e.configured && m());
|
|
23744
23748
|
}).catch(() => {
|
|
23745
23749
|
t || c({
|
|
@@ -23755,7 +23759,7 @@ function IE({ trpc: e, onRegistered: t, onError: n, onPrefillUpload: r, landNode
|
|
|
23755
23759
|
}) : s.configured ? /* @__PURE__ */ y("div", {
|
|
23756
23760
|
className: "space-y-3",
|
|
23757
23761
|
children: [
|
|
23758
|
-
/* @__PURE__ */ v(
|
|
23762
|
+
/* @__PURE__ */ v(IE, {
|
|
23759
23763
|
trpc: e,
|
|
23760
23764
|
status: s,
|
|
23761
23765
|
onStatusChange: h
|
|
@@ -23774,7 +23778,7 @@ function IE({ trpc: e, onRegistered: t, onError: n, onPrefillUpload: r, landNode
|
|
|
23774
23778
|
className: "text-xs text-foreground-subtle",
|
|
23775
23779
|
children: o("frigate.loadingModels")
|
|
23776
23780
|
}),
|
|
23777
|
-
u !== null && /* @__PURE__ */ v(
|
|
23781
|
+
u !== null && /* @__PURE__ */ v(ME, {
|
|
23778
23782
|
models: u,
|
|
23779
23783
|
trpc: e,
|
|
23780
23784
|
onRegistered: t,
|
|
@@ -23784,7 +23788,7 @@ function IE({ trpc: e, onRegistered: t, onError: n, onPrefillUpload: r, landNode
|
|
|
23784
23788
|
]
|
|
23785
23789
|
}) : /* @__PURE__ */ y("div", {
|
|
23786
23790
|
className: "space-y-4",
|
|
23787
|
-
children: [/* @__PURE__ */ v(
|
|
23791
|
+
children: [/* @__PURE__ */ v(IE, {
|
|
23788
23792
|
trpc: e,
|
|
23789
23793
|
status: s,
|
|
23790
23794
|
onStatusChange: h
|
|
@@ -23793,7 +23797,7 @@ function IE({ trpc: e, onRegistered: t, onError: n, onPrefillUpload: r, landNode
|
|
|
23793
23797
|
children: [/* @__PURE__ */ v("div", {
|
|
23794
23798
|
className: "text-[11px] text-foreground-subtle",
|
|
23795
23799
|
children: o("frigate.publicDefault")
|
|
23796
|
-
}),
|
|
23800
|
+
}), rE.map((i) => /* @__PURE__ */ v(RE, {
|
|
23797
23801
|
trpc: e,
|
|
23798
23802
|
catalogId: i.id,
|
|
23799
23803
|
onRegistered: t,
|
|
@@ -23804,8 +23808,8 @@ function IE({ trpc: e, onRegistered: t, onError: n, onPrefillUpload: r, landNode
|
|
|
23804
23808
|
})]
|
|
23805
23809
|
});
|
|
23806
23810
|
}
|
|
23807
|
-
function
|
|
23808
|
-
let { t: s } = $(), c =
|
|
23811
|
+
function RE({ trpc: e, catalogId: t, onRegistered: n, onError: r, onPrefillUpload: a, landNodeId: o }) {
|
|
23812
|
+
let { t: s } = $(), c = rE.find((e) => e.id === t), [l, u] = g(!1), [d, f] = g(""), [p, m] = g(null), h = gE(e, c?.format === "tflite"), [_, b] = g("");
|
|
23809
23813
|
if (i(() => {
|
|
23810
23814
|
if (o !== void 0 && o.length > 0) {
|
|
23811
23815
|
b(o);
|
|
@@ -23821,7 +23825,7 @@ function LE({ trpc: e, catalogId: t, onRegistered: n, onError: r, onPrefillUploa
|
|
|
23821
23825
|
return /* @__PURE__ */ y("div", {
|
|
23822
23826
|
className: "rounded-md border border-border bg-surface px-3 py-2 space-y-2",
|
|
23823
23827
|
children: [
|
|
23824
|
-
p !== null && /* @__PURE__ */ v(
|
|
23828
|
+
p !== null && /* @__PURE__ */ v(aT, {
|
|
23825
23829
|
title: p.title,
|
|
23826
23830
|
steps: p.steps,
|
|
23827
23831
|
progress: p.progress,
|
|
@@ -23852,7 +23856,7 @@ function LE({ trpc: e, catalogId: t, onRegistered: n, onError: r, onPrefillUploa
|
|
|
23852
23856
|
})
|
|
23853
23857
|
]
|
|
23854
23858
|
}),
|
|
23855
|
-
c.format === "tflite" && /* @__PURE__ */ v(
|
|
23859
|
+
c.format === "tflite" && /* @__PURE__ */ v(_E, { nodes: h }),
|
|
23856
23860
|
o === void 0 && c.format === "tflite" && h !== null && h.length > 0 && /* @__PURE__ */ y("label", {
|
|
23857
23861
|
className: "flex items-center gap-2 text-[11px] text-foreground",
|
|
23858
23862
|
children: [/* @__PURE__ */ v("span", {
|
|
@@ -23870,13 +23874,13 @@ function LE({ trpc: e, catalogId: t, onRegistered: n, onError: r, onPrefillUploa
|
|
|
23870
23874
|
}),
|
|
23871
23875
|
o !== void 0 && /* @__PURE__ */ v("p", {
|
|
23872
23876
|
className: "text-[10px] text-foreground-subtle",
|
|
23873
|
-
children: /* @__PURE__ */ v(
|
|
23877
|
+
children: /* @__PURE__ */ v(nT, {
|
|
23874
23878
|
i18nKey: "frigate.landOnNode",
|
|
23875
23879
|
values: { nodeId: o },
|
|
23876
23880
|
components: { mono: /* @__PURE__ */ v("span", { className: "font-mono" }) }
|
|
23877
23881
|
})
|
|
23878
23882
|
}),
|
|
23879
|
-
/* @__PURE__ */ v(
|
|
23883
|
+
/* @__PURE__ */ v(GT, {
|
|
23880
23884
|
value: d,
|
|
23881
23885
|
onChange: f,
|
|
23882
23886
|
defaultName: c.label
|
|
@@ -23886,7 +23890,7 @@ function LE({ trpc: e, catalogId: t, onRegistered: n, onError: r, onPrefillUploa
|
|
|
23886
23890
|
children: [/* @__PURE__ */ v("button", {
|
|
23887
23891
|
onClick: () => {
|
|
23888
23892
|
u(!0);
|
|
23889
|
-
let t = C ? S : void 0, i = s("frigate.opTitle", { label: c.label }), a =
|
|
23893
|
+
let t = C ? S : void 0, i = s("frigate.opTitle", { label: c.label }), a = dT({
|
|
23890
23894
|
kind: "import",
|
|
23891
23895
|
title: i,
|
|
23892
23896
|
modelId: c.id,
|
|
@@ -23910,8 +23914,8 @@ function LE({ trpc: e, catalogId: t, onRegistered: n, onError: r, onPrefillUploa
|
|
|
23910
23914
|
status: "running",
|
|
23911
23915
|
sessionId: a
|
|
23912
23916
|
});
|
|
23913
|
-
let o =
|
|
23914
|
-
|
|
23917
|
+
let o = KT(d);
|
|
23918
|
+
Fw(e, {
|
|
23915
23919
|
catalogId: c.id,
|
|
23916
23920
|
...o === void 0 ? {} : { name: o },
|
|
23917
23921
|
...t === void 0 ? {} : { targetNodeId: t }
|
|
@@ -23924,7 +23928,7 @@ function LE({ trpc: e, catalogId: t, onRegistered: n, onError: r, onPrefillUploa
|
|
|
23924
23928
|
nodeId: t,
|
|
23925
23929
|
size: (e.bytes / 1e6).toFixed(1)
|
|
23926
23930
|
});
|
|
23927
|
-
|
|
23931
|
+
fT(a, r), pT(a, { status: "success" }), m((e) => e === null ? e : {
|
|
23928
23932
|
...e,
|
|
23929
23933
|
status: "success",
|
|
23930
23934
|
logs: [...e.logs, r],
|
|
@@ -23935,7 +23939,7 @@ function LE({ trpc: e, catalogId: t, onRegistered: n, onError: r, onPrefillUploa
|
|
|
23935
23939
|
}), n(r);
|
|
23936
23940
|
}).catch((e) => {
|
|
23937
23941
|
let t = e instanceof Error ? e.message : s("frigate.catalogImportFailed");
|
|
23938
|
-
|
|
23942
|
+
pT(a, {
|
|
23939
23943
|
status: "error",
|
|
23940
23944
|
errorMessage: t
|
|
23941
23945
|
}), m((e) => e === null ? e : {
|
|
@@ -23949,7 +23953,7 @@ function LE({ trpc: e, catalogId: t, onRegistered: n, onError: r, onPrefillUploa
|
|
|
23949
23953
|
}), r(t);
|
|
23950
23954
|
}).finally(() => u(!1));
|
|
23951
23955
|
},
|
|
23952
|
-
disabled: l || x ||
|
|
23956
|
+
disabled: l || x || qT(d),
|
|
23953
23957
|
className: "px-4 py-1.5 text-xs font-medium rounded-md bg-primary text-primary-foreground hover:bg-primary/90 disabled:opacity-50 transition-colors",
|
|
23954
23958
|
children: l ? s("common.importing") : C ? s("frigate.importLand", { nodeId: S }) : s("common.register")
|
|
23955
23959
|
}), /* @__PURE__ */ v("button", {
|
|
@@ -23970,10 +23974,10 @@ function LE({ trpc: e, catalogId: t, onRegistered: n, onError: r, onPrefillUploa
|
|
|
23970
23974
|
//#endregion
|
|
23971
23975
|
//#region src/tabs/CatalogTab.tsx
|
|
23972
23976
|
e();
|
|
23973
|
-
function
|
|
23977
|
+
function zE(e) {
|
|
23974
23978
|
return e === "scrypted" || e === "frigate" || e === "camstack" ? e : "camstack";
|
|
23975
23979
|
}
|
|
23976
|
-
var
|
|
23980
|
+
var BE = [
|
|
23977
23981
|
{
|
|
23978
23982
|
value: "camstack",
|
|
23979
23983
|
label: "CamStack"
|
|
@@ -23986,11 +23990,11 @@ var zE = [
|
|
|
23986
23990
|
value: "frigate",
|
|
23987
23991
|
label: "Frigate"
|
|
23988
23992
|
}
|
|
23989
|
-
],
|
|
23990
|
-
function
|
|
23991
|
-
return
|
|
23993
|
+
], VE = new Set(ge);
|
|
23994
|
+
function HE(e) {
|
|
23995
|
+
return VE.has(e);
|
|
23992
23996
|
}
|
|
23993
|
-
function
|
|
23997
|
+
function UE({ seed: e, nodeId: t, busyKey: n, onDownload: r }) {
|
|
23994
23998
|
let { t: i } = $();
|
|
23995
23999
|
return /* @__PURE__ */ v("div", {
|
|
23996
24000
|
className: "flex flex-wrap gap-2 pt-1",
|
|
@@ -24022,7 +24026,7 @@ function HE({ seed: e, nodeId: t, busyKey: n, onDownload: r }) {
|
|
|
24022
24026
|
})
|
|
24023
24027
|
});
|
|
24024
24028
|
}
|
|
24025
|
-
function
|
|
24029
|
+
function WE({ seeds: e, nodeId: t, busyKey: n, selectedByFamily: r, onSelectFamily: i, onDownload: a }) {
|
|
24026
24030
|
let o = $C(e), s = ew(e), c = o.map(tw), l = me(c), u = new Map(e.map((e) => [e.modelId, e]));
|
|
24027
24031
|
return l.length === 0 && s.length === 0 ? null : /* @__PURE__ */ y("div", {
|
|
24028
24032
|
className: "space-y-3",
|
|
@@ -24050,7 +24054,7 @@ function UE({ seeds: e, nodeId: t, busyKey: n, selectedByFamily: r, onSelectFami
|
|
|
24050
24054
|
value: s,
|
|
24051
24055
|
onChange: (t) => i(e.family, t)
|
|
24052
24056
|
}),
|
|
24053
|
-
l && /* @__PURE__ */ v(
|
|
24057
|
+
l && /* @__PURE__ */ v(UE, {
|
|
24054
24058
|
seed: l,
|
|
24055
24059
|
nodeId: t,
|
|
24056
24060
|
busyKey: n,
|
|
@@ -24070,7 +24074,7 @@ function UE({ seeds: e, nodeId: t, busyKey: n, selectedByFamily: r, onSelectFami
|
|
|
24070
24074
|
className: "text-[10px] font-mono text-foreground-subtle",
|
|
24071
24075
|
children: e.modelId
|
|
24072
24076
|
})]
|
|
24073
|
-
}), /* @__PURE__ */ v(
|
|
24077
|
+
}), /* @__PURE__ */ v(UE, {
|
|
24074
24078
|
seed: e,
|
|
24075
24079
|
nodeId: t,
|
|
24076
24080
|
busyKey: n,
|
|
@@ -24079,11 +24083,11 @@ function UE({ seeds: e, nodeId: t, busyKey: n, selectedByFamily: r, onSelectFami
|
|
|
24079
24083
|
}, `${e.stepId}:${e.modelId}`))]
|
|
24080
24084
|
});
|
|
24081
24085
|
}
|
|
24082
|
-
function
|
|
24086
|
+
function GE({ trpc: e, refreshKey: t, nodeId: n }) {
|
|
24083
24087
|
let { t: r } = $(), [a, s] = g([]), [c, u] = g(""), [d, f] = g(!0), [p, m] = g(null), [h, _] = g(null), [b, x] = g(null), [S, C] = g({}), w = l(async () => {
|
|
24084
24088
|
m(null);
|
|
24085
24089
|
try {
|
|
24086
|
-
let t = await
|
|
24090
|
+
let t = await Tw(e, n);
|
|
24087
24091
|
s(t), u((e) => e && t.some((t) => t.stepId === e) ? e : t[0]?.stepId ?? "");
|
|
24088
24092
|
} catch (e) {
|
|
24089
24093
|
m(e instanceof Error ? e.message : r("catalog.loadFailed"));
|
|
@@ -24113,8 +24117,8 @@ function WE({ trpc: e, refreshKey: t, nodeId: n }) {
|
|
|
24113
24117
|
return !n && Object.keys(e).length === Object.keys(t).length ? e : t;
|
|
24114
24118
|
});
|
|
24115
24119
|
}, [ee, te]);
|
|
24116
|
-
let D =
|
|
24117
|
-
if (
|
|
24120
|
+
let D = gT(), O = l(async (t, i) => {
|
|
24121
|
+
if (HE(i)) {
|
|
24118
24122
|
_(`${t.stepId}/${t.modelId}/${i}`), x(null);
|
|
24119
24123
|
try {
|
|
24120
24124
|
await D.run({
|
|
@@ -24140,7 +24144,7 @@ function WE({ trpc: e, refreshKey: t, nodeId: n }) {
|
|
|
24140
24144
|
nodeId: n
|
|
24141
24145
|
})
|
|
24142
24146
|
}, async ({ appendLog: a, patchSteps: o }) => {
|
|
24143
|
-
await
|
|
24147
|
+
await Dw(e, {
|
|
24144
24148
|
addonId: t.stepId,
|
|
24145
24149
|
modelId: t.modelId,
|
|
24146
24150
|
format: i,
|
|
@@ -24180,7 +24184,7 @@ function WE({ trpc: e, refreshKey: t, nodeId: n }) {
|
|
|
24180
24184
|
className: "rounded-md border border-danger/30 bg-danger/10 px-3 py-2 text-xs text-danger",
|
|
24181
24185
|
children: b
|
|
24182
24186
|
}),
|
|
24183
|
-
/* @__PURE__ */ v(
|
|
24187
|
+
/* @__PURE__ */ v($w, {
|
|
24184
24188
|
label: r("common.step"),
|
|
24185
24189
|
children: /* @__PURE__ */ v(za, {
|
|
24186
24190
|
"aria-label": r("common.step"),
|
|
@@ -24199,7 +24203,7 @@ function WE({ trpc: e, refreshKey: t, nodeId: n }) {
|
|
|
24199
24203
|
E.length === 0 ? /* @__PURE__ */ v("div", {
|
|
24200
24204
|
className: "rounded-xl border border-border bg-surface text-center text-xs text-foreground-subtle italic py-10",
|
|
24201
24205
|
children: r("catalog.noCamstackModels")
|
|
24202
|
-
}) : /* @__PURE__ */ v(
|
|
24206
|
+
}) : /* @__PURE__ */ v(WE, {
|
|
24203
24207
|
seeds: E,
|
|
24204
24208
|
nodeId: n,
|
|
24205
24209
|
busyKey: h,
|
|
@@ -24213,7 +24217,7 @@ function WE({ trpc: e, refreshKey: t, nodeId: n }) {
|
|
|
24213
24217
|
]
|
|
24214
24218
|
});
|
|
24215
24219
|
}
|
|
24216
|
-
function
|
|
24220
|
+
function KE({ trpc: e, refreshKey: t, source: n, onSourceChange: r, onRegistered: i, onPrefillUpload: a }) {
|
|
24217
24221
|
let { t: o } = $(), [s, c] = g("hub");
|
|
24218
24222
|
return /* @__PURE__ */ y("div", {
|
|
24219
24223
|
className: Ve,
|
|
@@ -24228,7 +24232,7 @@ function GE({ trpc: e, refreshKey: t, source: n, onSourceChange: r, onRegistered
|
|
|
24228
24232
|
"data-source": n,
|
|
24229
24233
|
role: "group",
|
|
24230
24234
|
"aria-label": o("catalog.sourceAria"),
|
|
24231
|
-
children:
|
|
24235
|
+
children: BE.map((e) => /* @__PURE__ */ v("button", {
|
|
24232
24236
|
type: "button",
|
|
24233
24237
|
"aria-pressed": n === e.value,
|
|
24234
24238
|
onClick: () => r(e.value),
|
|
@@ -24236,22 +24240,22 @@ function GE({ trpc: e, refreshKey: t, source: n, onSourceChange: r, onRegistered
|
|
|
24236
24240
|
children: e.label
|
|
24237
24241
|
}, e.value))
|
|
24238
24242
|
}),
|
|
24239
|
-
end: /* @__PURE__ */ v(
|
|
24243
|
+
end: /* @__PURE__ */ v(Qw, {
|
|
24240
24244
|
selectedNodeId: s,
|
|
24241
24245
|
onSelect: c
|
|
24242
24246
|
})
|
|
24243
24247
|
}),
|
|
24244
|
-
n === "camstack" && /* @__PURE__ */ v(
|
|
24248
|
+
n === "camstack" && /* @__PURE__ */ v(GE, {
|
|
24245
24249
|
trpc: e,
|
|
24246
24250
|
refreshKey: t,
|
|
24247
24251
|
nodeId: s
|
|
24248
24252
|
}),
|
|
24249
|
-
n === "scrypted" && /* @__PURE__ */ v(
|
|
24253
|
+
n === "scrypted" && /* @__PURE__ */ v(XT, {
|
|
24250
24254
|
trpc: e,
|
|
24251
24255
|
landNodeId: s,
|
|
24252
24256
|
onImported: () => i?.()
|
|
24253
24257
|
}),
|
|
24254
|
-
n === "frigate" && /* @__PURE__ */ v(
|
|
24258
|
+
n === "frigate" && /* @__PURE__ */ v(LE, {
|
|
24255
24259
|
trpc: e,
|
|
24256
24260
|
landNodeId: s,
|
|
24257
24261
|
onRegistered: (e) => {
|
|
@@ -24265,12 +24269,12 @@ function GE({ trpc: e, refreshKey: t, source: n, onSourceChange: r, onRegistered
|
|
|
24265
24269
|
}
|
|
24266
24270
|
//#endregion
|
|
24267
24271
|
//#region src/ensure-formats.ts
|
|
24268
|
-
function
|
|
24272
|
+
function qE(e) {
|
|
24269
24273
|
return e.length === 0 ? "" : ` Engine conversions: ${e.map((e) => e.ok ? `${e.format} ✓${e.nodeId ? ` (${e.nodeId})` : ""}` : `${e.format} ✗ — ${e.error ?? "failed"}`).join("; ")}.`;
|
|
24270
24274
|
}
|
|
24271
24275
|
//#endregion
|
|
24272
24276
|
//#region src/frigate/registration.ts
|
|
24273
|
-
var
|
|
24277
|
+
var JE = [
|
|
24274
24278
|
"yolo",
|
|
24275
24279
|
"yolonas",
|
|
24276
24280
|
"ssd",
|
|
@@ -24285,13 +24289,13 @@ var qE = [
|
|
|
24285
24289
|
"saliency",
|
|
24286
24290
|
"yolo-split-dfl"
|
|
24287
24291
|
];
|
|
24288
|
-
function
|
|
24289
|
-
return
|
|
24292
|
+
function YE(e) {
|
|
24293
|
+
return JE.find((t) => t === e);
|
|
24290
24294
|
}
|
|
24291
|
-
var
|
|
24292
|
-
function
|
|
24293
|
-
let t = e.type === "custom" ? null :
|
|
24294
|
-
if (!
|
|
24295
|
+
var XE = /^[a-zA-Z0-9._-]+$/;
|
|
24296
|
+
function ZE(e) {
|
|
24297
|
+
let t = e.type === "custom" ? null : tE[e.type];
|
|
24298
|
+
if (!XE.test(e.modelId)) throw Error(`Model id "${e.modelId}" is invalid — letters, digits, dot, underscore, hyphen only`);
|
|
24295
24299
|
if (!e.name.trim()) throw Error("Display name is required");
|
|
24296
24300
|
if (!e.stepId.trim()) throw Error("Step is required");
|
|
24297
24301
|
if (!(e.inputWidth > 0) || !(e.inputHeight > 0)) throw Error("Input size must be positive");
|
|
@@ -24323,7 +24327,7 @@ function XE(e) {
|
|
|
24323
24327
|
...e.defaultClassFloors === void 0 ? {} : { defaultClassFloors: { ...e.defaultClassFloors } }
|
|
24324
24328
|
} : {
|
|
24325
24329
|
provider: "frigate",
|
|
24326
|
-
group:
|
|
24330
|
+
group: eE(e.type, e.inputWidth),
|
|
24327
24331
|
...ee(e.labels),
|
|
24328
24332
|
defaultClassFloors: F("stock", e.defaultClassFloors)
|
|
24329
24333
|
}
|
|
@@ -24336,11 +24340,11 @@ function XE(e) {
|
|
|
24336
24340
|
//#endregion
|
|
24337
24341
|
//#region src/components/StepSelect.tsx
|
|
24338
24342
|
e();
|
|
24339
|
-
function
|
|
24343
|
+
function QE({ trpc: e, label: t, value: n, onChange: r, slots: a }) {
|
|
24340
24344
|
let { t: o } = $(), [s, c] = g(null), [l, u] = g(null);
|
|
24341
24345
|
return i(() => {
|
|
24342
24346
|
let t = !1;
|
|
24343
|
-
return
|
|
24347
|
+
return Cw(e).then((e) => {
|
|
24344
24348
|
if (t) return;
|
|
24345
24349
|
let i = a ? e.filter((e) => a.includes(e.slot)) : e;
|
|
24346
24350
|
c(i), u(null), i.length > 0 && !i.some((e) => e.id === n) && r(i[0].id);
|
|
@@ -24349,7 +24353,7 @@ function ZE({ trpc: e, label: t, value: n, onChange: r, slots: a }) {
|
|
|
24349
24353
|
}), () => {
|
|
24350
24354
|
t = !0;
|
|
24351
24355
|
};
|
|
24352
|
-
}, [e]), /* @__PURE__ */ y(
|
|
24356
|
+
}, [e]), /* @__PURE__ */ y($w, {
|
|
24353
24357
|
label: t ?? o("common.step"),
|
|
24354
24358
|
children: [/* @__PURE__ */ y("select", {
|
|
24355
24359
|
value: n,
|
|
@@ -24382,7 +24386,7 @@ function ZE({ trpc: e, label: t, value: n, onChange: r, slots: a }) {
|
|
|
24382
24386
|
}
|
|
24383
24387
|
//#endregion
|
|
24384
24388
|
//#region src/ui/probe-custom-model.ts
|
|
24385
|
-
var
|
|
24389
|
+
var $E = {
|
|
24386
24390
|
".onnx": "onnx",
|
|
24387
24391
|
".tflite": "tflite",
|
|
24388
24392
|
".pt": "pt",
|
|
@@ -24391,33 +24395,33 @@ var QE = {
|
|
|
24391
24395
|
".mlmodel": "coreml",
|
|
24392
24396
|
".xml": "openvino"
|
|
24393
24397
|
};
|
|
24394
|
-
function
|
|
24398
|
+
function eD(e) {
|
|
24395
24399
|
let t = (e.split(/[/?#]/).pop() ?? e).toLowerCase();
|
|
24396
24400
|
if (t.endsWith(".mlpackage")) return ".mlpackage";
|
|
24397
24401
|
let n = t.lastIndexOf(".");
|
|
24398
24402
|
return n >= 0 ? t.slice(n) : "";
|
|
24399
24403
|
}
|
|
24400
|
-
function
|
|
24404
|
+
function tD(e) {
|
|
24401
24405
|
return (e.split(/[/?#]/).pop() ?? e).replace(/\.(onnx|tflite|pt|pth|xml|mlmodel|mlpackage)$/i, "");
|
|
24402
24406
|
}
|
|
24403
|
-
function
|
|
24407
|
+
function nD(e) {
|
|
24404
24408
|
let t = e.trim().toLowerCase().replace(/[^a-z0-9._-]+/g, "-").replace(/^-+|-+$/g, "");
|
|
24405
24409
|
return t.length > 0 ? t : "custom-model";
|
|
24406
24410
|
}
|
|
24407
|
-
function
|
|
24411
|
+
function rD(e) {
|
|
24408
24412
|
return /\b640\b/.test(e) || /[_-]640([_-]|$)/.test(e) ? 640 : (/\b320\b/.test(e) || /[_-]320([_-]|$)/.test(e), 320);
|
|
24409
24413
|
}
|
|
24410
|
-
function
|
|
24414
|
+
function iD(e) {
|
|
24411
24415
|
let t = e.replace(/[_-]+/g, " ").trim();
|
|
24412
24416
|
return t.length === 0 ? "Custom model" : t.replace(/\b\w/g, (e) => e.toUpperCase());
|
|
24413
24417
|
}
|
|
24414
|
-
function
|
|
24415
|
-
let t = [], n = e.kind === "file" ? e.filename : e.url, r =
|
|
24416
|
-
r === null && n.trim().length > 0 && t.push(
|
|
24417
|
-
let i =
|
|
24418
|
-
s === 640 ? t.push(
|
|
24418
|
+
function aD(e) {
|
|
24419
|
+
let t = [], n = e.kind === "file" ? e.filename : e.url, r = $E[eD(n)] ?? null;
|
|
24420
|
+
r === null && n.trim().length > 0 && t.push(rT("probe.noFormat"));
|
|
24421
|
+
let i = tD(n), a = nD(i), o = iD(i), s = rD(i);
|
|
24422
|
+
s === 640 ? t.push(rT("probe.size640")) : t.push(rT("probe.size320"));
|
|
24419
24423
|
let c = null;
|
|
24420
|
-
return e.kind === "file" && typeof e.bytes == "number" && e.bytes > 0 && (c = Number((e.bytes / 1e6).toFixed(1))), t.push(
|
|
24424
|
+
return e.kind === "file" && typeof e.bytes == "number" && e.bytes > 0 && (c = Number((e.bytes / 1e6).toFixed(1))), t.push(rT("probe.decode")), {
|
|
24421
24425
|
format: r,
|
|
24422
24426
|
modelId: a,
|
|
24423
24427
|
name: o,
|
|
@@ -24429,24 +24433,24 @@ function iD(e) {
|
|
|
24429
24433
|
//#endregion
|
|
24430
24434
|
//#region src/tabs/RegisterTab.tsx
|
|
24431
24435
|
e();
|
|
24432
|
-
var
|
|
24436
|
+
var oD = [
|
|
24433
24437
|
"onnx",
|
|
24434
24438
|
"openvino",
|
|
24435
24439
|
"coreml",
|
|
24436
24440
|
"tflite",
|
|
24437
24441
|
"pt"
|
|
24438
|
-
],
|
|
24442
|
+
], sD = [
|
|
24439
24443
|
".onnx",
|
|
24440
24444
|
".tflite",
|
|
24441
24445
|
".pt"
|
|
24442
|
-
],
|
|
24443
|
-
function
|
|
24444
|
-
let { t: s } = $(), c =
|
|
24446
|
+
], cD = [{ value: "upload" }, { value: "url" }];
|
|
24447
|
+
function lD({ trpc: e, onRegistered: n, initialPrefill: r = null, onPrefillConsumed: a }) {
|
|
24448
|
+
let { t: s } = $(), c = gT(), [u, d] = g("upload"), [f, p] = g(""), [m, h] = g(""), [_, b] = g("object-detection"), [x, S] = g("onnx"), [C, w] = g(""), [T, E] = g(""), [ee, te] = g(0), [D, O] = g(320), [k, A] = g(320), [ne, j] = g(""), [re, M] = g(null), [ie, ae] = g([]), [N, oe] = g({ state: "idle" }), [P, F] = g(!1), [se, ce] = g(null), [le, ue] = g(null), de = t(null), I = o(() => nE(ne), [ne]);
|
|
24445
24449
|
i(() => {
|
|
24446
24450
|
r != null && (d("upload"), S(r.format), w(r.postprocessor ?? ""), O(r.inputSize), A(r.inputSize), j(r.labels.join("\n")), M(r.sourceLabel), ce(null), ue(null), a?.());
|
|
24447
24451
|
}, [r, a]);
|
|
24448
24452
|
let L = l((e, t) => {
|
|
24449
|
-
let n =
|
|
24453
|
+
let n = aD(e);
|
|
24450
24454
|
ae(n.hints), n.format !== null && S(n.format), O(n.inputSize), A(n.inputSize), (t?.forceId || !f) && p(n.modelId), m || h(n.name), n.sizeMB !== null && e.kind === "url" && te(n.sizeMB);
|
|
24451
24455
|
}, [f, m]), R = l(async (t) => {
|
|
24452
24456
|
ce(null), L({
|
|
@@ -24460,7 +24464,7 @@ function cD({ trpc: e, onRegistered: n, initialPrefill: r = null, onPrefillConsu
|
|
|
24460
24464
|
try {
|
|
24461
24465
|
oe({
|
|
24462
24466
|
state: "done",
|
|
24463
|
-
file: await
|
|
24467
|
+
file: await jw(e, t, (e, t) => {
|
|
24464
24468
|
oe({
|
|
24465
24469
|
state: "uploading",
|
|
24466
24470
|
pct: Math.round(e / t * 100)
|
|
@@ -24504,13 +24508,13 @@ function cD({ trpc: e, onRegistered: n, initialPrefill: r = null, onPrefillConsu
|
|
|
24504
24508
|
sizeMB: ee
|
|
24505
24509
|
} : null;
|
|
24506
24510
|
if (t === null) return ce(s(u === "upload" ? "register.uploadFirst" : "register.urlRequired"));
|
|
24507
|
-
if (
|
|
24511
|
+
if (qT(m)) return ce(s("register.nameInvalid"));
|
|
24508
24512
|
F(!0);
|
|
24509
24513
|
try {
|
|
24510
|
-
let r =
|
|
24514
|
+
let r = YE(C), i = ZE({
|
|
24511
24515
|
type: "custom",
|
|
24512
24516
|
modelId: f.trim(),
|
|
24513
|
-
name:
|
|
24517
|
+
name: KT(m) ?? f.trim(),
|
|
24514
24518
|
stepId: _,
|
|
24515
24519
|
source: t,
|
|
24516
24520
|
format: x,
|
|
@@ -24538,13 +24542,13 @@ function cD({ trpc: e, onRegistered: n, initialPrefill: r = null, onPrefillConsu
|
|
|
24538
24542
|
}],
|
|
24539
24543
|
initialLog: s("register.opInitialLog", { name: i.entry.name })
|
|
24540
24544
|
}, async ({ appendLog: t, patchSteps: n }) => {
|
|
24541
|
-
let r = await
|
|
24545
|
+
let r = await _w(e, i);
|
|
24542
24546
|
n((e) => e.map((e) => e.status === "active" || e.status === "pending" ? {
|
|
24543
24547
|
...e,
|
|
24544
24548
|
status: "done"
|
|
24545
24549
|
} : e)), t(s("register.opDone", {
|
|
24546
24550
|
stepId: _,
|
|
24547
|
-
summary:
|
|
24551
|
+
summary: qE(r.conversions)
|
|
24548
24552
|
}));
|
|
24549
24553
|
});
|
|
24550
24554
|
let a = s("register.registered", { name: i.entry.name });
|
|
@@ -24591,7 +24595,7 @@ function cD({ trpc: e, onRegistered: n, initialPrefill: r = null, onPrefillConsu
|
|
|
24591
24595
|
children: s("common.source")
|
|
24592
24596
|
}), /* @__PURE__ */ v("div", {
|
|
24593
24597
|
className: "inline-flex rounded-md border border-border overflow-hidden",
|
|
24594
|
-
children:
|
|
24598
|
+
children: cD.map((e) => /* @__PURE__ */ v("button", {
|
|
24595
24599
|
type: "button",
|
|
24596
24600
|
onClick: () => {
|
|
24597
24601
|
ce(null), ue(null), d(e.value);
|
|
@@ -24603,14 +24607,14 @@ function cD({ trpc: e, onRegistered: n, initialPrefill: r = null, onPrefillConsu
|
|
|
24603
24607
|
}),
|
|
24604
24608
|
re !== null && u === "upload" && /* @__PURE__ */ v("div", {
|
|
24605
24609
|
className: "rounded-md border border-primary/30 bg-primary/10 px-3 py-2 text-[11px] text-foreground-subtle",
|
|
24606
|
-
children: /* @__PURE__ */ v(
|
|
24610
|
+
children: /* @__PURE__ */ v(nT, {
|
|
24607
24611
|
i18nKey: "register.prefilled",
|
|
24608
24612
|
values: { source: re },
|
|
24609
24613
|
components: { b: /* @__PURE__ */ v("span", { className: "text-foreground" }) }
|
|
24610
24614
|
})
|
|
24611
24615
|
}),
|
|
24612
|
-
u === "upload" ? /* @__PURE__ */ y(
|
|
24613
|
-
label: s("register.modelFile", { extensions:
|
|
24616
|
+
u === "upload" ? /* @__PURE__ */ y($w, {
|
|
24617
|
+
label: s("register.modelFile", { extensions: sD.join(" / ") }),
|
|
24614
24618
|
children: [
|
|
24615
24619
|
/* @__PURE__ */ y("div", {
|
|
24616
24620
|
className: "flex items-center gap-3 flex-wrap",
|
|
@@ -24642,7 +24646,7 @@ function cD({ trpc: e, onRegistered: n, initialPrefill: r = null, onPrefillConsu
|
|
|
24642
24646
|
/* @__PURE__ */ v("input", {
|
|
24643
24647
|
ref: de,
|
|
24644
24648
|
type: "file",
|
|
24645
|
-
accept:
|
|
24649
|
+
accept: sD.join(","),
|
|
24646
24650
|
className: "hidden",
|
|
24647
24651
|
onChange: (e) => {
|
|
24648
24652
|
let t = e.target.files?.[0];
|
|
@@ -24663,13 +24667,13 @@ function cD({ trpc: e, onRegistered: n, initialPrefill: r = null, onPrefillConsu
|
|
|
24663
24667
|
className: "grid grid-cols-1 sm:grid-cols-3 gap-3",
|
|
24664
24668
|
children: [/* @__PURE__ */ v("div", {
|
|
24665
24669
|
className: "sm:col-span-2",
|
|
24666
|
-
children: /* @__PURE__ */ v(
|
|
24670
|
+
children: /* @__PURE__ */ v(eT, {
|
|
24667
24671
|
label: s("register.urlLabel"),
|
|
24668
24672
|
value: T,
|
|
24669
24673
|
onChange: E,
|
|
24670
24674
|
placeholder: s("register.urlPlaceholder")
|
|
24671
24675
|
})
|
|
24672
|
-
}), /* @__PURE__ */ v(
|
|
24676
|
+
}), /* @__PURE__ */ v(tT, {
|
|
24673
24677
|
label: s("register.sizeMb"),
|
|
24674
24678
|
value: ee,
|
|
24675
24679
|
onChange: te,
|
|
@@ -24688,12 +24692,12 @@ function cD({ trpc: e, onRegistered: n, initialPrefill: r = null, onPrefillConsu
|
|
|
24688
24692
|
}),
|
|
24689
24693
|
/* @__PURE__ */ y("div", {
|
|
24690
24694
|
className: "grid grid-cols-1 sm:grid-cols-2 gap-3",
|
|
24691
|
-
children: [/* @__PURE__ */ v(
|
|
24695
|
+
children: [/* @__PURE__ */ v(eT, {
|
|
24692
24696
|
label: s("common.modelId"),
|
|
24693
24697
|
value: f,
|
|
24694
24698
|
onChange: p,
|
|
24695
24699
|
placeholder: "my-detector"
|
|
24696
|
-
}), /* @__PURE__ */ v(
|
|
24700
|
+
}), /* @__PURE__ */ v(GT, {
|
|
24697
24701
|
value: m,
|
|
24698
24702
|
onChange: h,
|
|
24699
24703
|
defaultName: f.trim() || s("register.defaultName")
|
|
@@ -24702,18 +24706,18 @@ function cD({ trpc: e, onRegistered: n, initialPrefill: r = null, onPrefillConsu
|
|
|
24702
24706
|
/* @__PURE__ */ y("div", {
|
|
24703
24707
|
className: "grid grid-cols-1 sm:grid-cols-3 gap-3",
|
|
24704
24708
|
children: [
|
|
24705
|
-
/* @__PURE__ */ v(
|
|
24709
|
+
/* @__PURE__ */ v(QE, {
|
|
24706
24710
|
trpc: e,
|
|
24707
24711
|
value: _,
|
|
24708
24712
|
onChange: b
|
|
24709
24713
|
}),
|
|
24710
|
-
/* @__PURE__ */ v(
|
|
24714
|
+
/* @__PURE__ */ v(tT, {
|
|
24711
24715
|
label: s("register.inputWidth"),
|
|
24712
24716
|
value: D,
|
|
24713
24717
|
onChange: O,
|
|
24714
24718
|
min: 1
|
|
24715
24719
|
}),
|
|
24716
|
-
/* @__PURE__ */ v(
|
|
24720
|
+
/* @__PURE__ */ v(tT, {
|
|
24717
24721
|
label: s("register.inputHeight"),
|
|
24718
24722
|
value: k,
|
|
24719
24723
|
onChange: A,
|
|
@@ -24723,21 +24727,21 @@ function cD({ trpc: e, onRegistered: n, initialPrefill: r = null, onPrefillConsu
|
|
|
24723
24727
|
}),
|
|
24724
24728
|
/* @__PURE__ */ y("div", {
|
|
24725
24729
|
className: "grid grid-cols-1 sm:grid-cols-2 gap-3",
|
|
24726
|
-
children: [/* @__PURE__ */ v(
|
|
24730
|
+
children: [/* @__PURE__ */ v($w, {
|
|
24727
24731
|
label: s("common.format"),
|
|
24728
24732
|
children: /* @__PURE__ */ v("select", {
|
|
24729
24733
|
value: x,
|
|
24730
24734
|
onChange: (e) => {
|
|
24731
|
-
let t =
|
|
24735
|
+
let t = oD.find((t) => t === e.target.value);
|
|
24732
24736
|
t !== void 0 && S(t);
|
|
24733
24737
|
},
|
|
24734
24738
|
className: "w-full px-3 py-1.5 text-xs rounded-md border border-border bg-surface text-foreground focus:outline-none focus:border-primary/50",
|
|
24735
|
-
children:
|
|
24739
|
+
children: oD.map((e) => /* @__PURE__ */ v("option", {
|
|
24736
24740
|
value: e,
|
|
24737
24741
|
children: e
|
|
24738
24742
|
}, e))
|
|
24739
24743
|
})
|
|
24740
|
-
}), /* @__PURE__ */ y(
|
|
24744
|
+
}), /* @__PURE__ */ y($w, {
|
|
24741
24745
|
label: s("register.decode"),
|
|
24742
24746
|
children: [/* @__PURE__ */ y("select", {
|
|
24743
24747
|
value: C,
|
|
@@ -24746,7 +24750,7 @@ function cD({ trpc: e, onRegistered: n, initialPrefill: r = null, onPrefillConsu
|
|
|
24746
24750
|
children: [/* @__PURE__ */ v("option", {
|
|
24747
24751
|
value: "",
|
|
24748
24752
|
children: s("register.stepDefault")
|
|
24749
|
-
}),
|
|
24753
|
+
}), JE.map((e) => /* @__PURE__ */ v("option", {
|
|
24750
24754
|
value: e,
|
|
24751
24755
|
children: e
|
|
24752
24756
|
}, e))]
|
|
@@ -24756,7 +24760,7 @@ function cD({ trpc: e, onRegistered: n, initialPrefill: r = null, onPrefillConsu
|
|
|
24756
24760
|
})]
|
|
24757
24761
|
})]
|
|
24758
24762
|
}),
|
|
24759
|
-
/* @__PURE__ */ v(
|
|
24763
|
+
/* @__PURE__ */ v($w, {
|
|
24760
24764
|
label: s("register.labelmap", { count: I.length }),
|
|
24761
24765
|
children: /* @__PURE__ */ v("textarea", {
|
|
24762
24766
|
value: ne,
|
|
@@ -24781,7 +24785,7 @@ function cD({ trpc: e, onRegistered: n, initialPrefill: r = null, onPrefillConsu
|
|
|
24781
24785
|
//#endregion
|
|
24782
24786
|
//#region src/tabs/ImportTab.tsx
|
|
24783
24787
|
e();
|
|
24784
|
-
function
|
|
24788
|
+
function uD({ trpc: e, onRegistered: t, initialPrefill: n = null, onPrefillConsumed: r }) {
|
|
24785
24789
|
let { t: a } = $(), [o, s] = g(null), [c, l] = g(null), [u, d] = g(n);
|
|
24786
24790
|
return i(() => {
|
|
24787
24791
|
n !== null && d(n);
|
|
@@ -24797,7 +24801,7 @@ function lD({ trpc: e, onRegistered: t, initialPrefill: n = null, onPrefillConsu
|
|
|
24797
24801
|
className: "rounded-md border border-success/30 bg-success/10 px-3 py-2 text-xs text-success",
|
|
24798
24802
|
children: c
|
|
24799
24803
|
}),
|
|
24800
|
-
/* @__PURE__ */ v(
|
|
24804
|
+
/* @__PURE__ */ v(lD, {
|
|
24801
24805
|
trpc: e,
|
|
24802
24806
|
onRegistered: (e) => {
|
|
24803
24807
|
l(e ?? a("importTab.registered")), s(null), t();
|
|
@@ -24812,7 +24816,7 @@ function lD({ trpc: e, onRegistered: t, initialPrefill: n = null, onPrefillConsu
|
|
|
24812
24816
|
}
|
|
24813
24817
|
//#endregion
|
|
24814
24818
|
//#region src/ui/installed-activation.ts
|
|
24815
|
-
function
|
|
24819
|
+
function dD(e, t, n, r, i) {
|
|
24816
24820
|
if (r == null || D(t)) return [];
|
|
24817
24821
|
let a = [];
|
|
24818
24822
|
for (let o of e) o.enabled && i.has(o.format) && Qo(r.models, o.format) && $o({
|
|
@@ -24826,10 +24830,10 @@ function uD(e, t, n, r, i) {
|
|
|
24826
24830
|
});
|
|
24827
24831
|
return a;
|
|
24828
24832
|
}
|
|
24829
|
-
function
|
|
24833
|
+
function fD(e, t) {
|
|
24830
24834
|
return { [De(e)]: t };
|
|
24831
24835
|
}
|
|
24832
|
-
function
|
|
24836
|
+
function pD(e, t, n) {
|
|
24833
24837
|
let r = Object.keys(t).length > 0;
|
|
24834
24838
|
return {
|
|
24835
24839
|
enabled: n ? !0 : e.enabled,
|
|
@@ -24838,18 +24842,18 @@ function fD(e, t, n) {
|
|
|
24838
24842
|
...r ? { steps: t } : {}
|
|
24839
24843
|
};
|
|
24840
24844
|
}
|
|
24841
|
-
function
|
|
24845
|
+
function mD(e, t, n, r) {
|
|
24842
24846
|
let i = new Set(r), a = {};
|
|
24843
24847
|
for (let r of e) {
|
|
24844
24848
|
let e = { ...r.steps };
|
|
24845
24849
|
i.has(r.key) && (e[t] = {
|
|
24846
24850
|
...e[t],
|
|
24847
24851
|
modelId: n
|
|
24848
|
-
}), a[r.key] =
|
|
24852
|
+
}), a[r.key] = pD(r, e, i.has(r.key));
|
|
24849
24853
|
}
|
|
24850
24854
|
return a;
|
|
24851
24855
|
}
|
|
24852
|
-
function
|
|
24856
|
+
function hD(e, t, n, r, i) {
|
|
24853
24857
|
let a = {};
|
|
24854
24858
|
for (let o of e) {
|
|
24855
24859
|
let e = { ...o.steps };
|
|
@@ -24865,52 +24869,52 @@ function mD(e, t, n, r, i) {
|
|
|
24865
24869
|
Object.keys(i).length > 0 ? e[t] = i : delete e[t];
|
|
24866
24870
|
}
|
|
24867
24871
|
}
|
|
24868
|
-
a[o.key] =
|
|
24872
|
+
a[o.key] = pD(o, e, o.key === i);
|
|
24869
24873
|
}
|
|
24870
24874
|
return a;
|
|
24871
24875
|
}
|
|
24872
24876
|
//#endregion
|
|
24873
24877
|
//#region src/ui/installed-inventory.ts
|
|
24874
|
-
function
|
|
24878
|
+
function gD(e) {
|
|
24875
24879
|
return Uo(e);
|
|
24876
24880
|
}
|
|
24877
|
-
function
|
|
24881
|
+
function _D(e) {
|
|
24878
24882
|
return e.map((e) => ({
|
|
24879
24883
|
value: e.key,
|
|
24880
|
-
label:
|
|
24884
|
+
label: gD(e),
|
|
24881
24885
|
enabled: e.enabled
|
|
24882
24886
|
}));
|
|
24883
24887
|
}
|
|
24884
|
-
var
|
|
24885
|
-
function
|
|
24886
|
-
let n =
|
|
24888
|
+
var vD = /\[([^\]]+)\]\s*$/;
|
|
24889
|
+
function yD(e, t) {
|
|
24890
|
+
let n = vD.exec(e.engineKey)?.[1];
|
|
24887
24891
|
return n === void 0 ? e.engine.format === t.format ? e.engine.backend === t.backend ? e.engine.device === t.device : t.key === "cpu" && e.engine.device === "cpu" : !1 : n === t.key;
|
|
24888
24892
|
}
|
|
24889
|
-
function
|
|
24893
|
+
function bD(e, t, n, r) {
|
|
24890
24894
|
if (e === null) return null;
|
|
24891
24895
|
let i = `${n}/${r}`;
|
|
24892
|
-
return e.some((e) =>
|
|
24896
|
+
return e.some((e) => yD(e, t) && e.modelsLoaded.includes(i));
|
|
24893
24897
|
}
|
|
24894
|
-
var
|
|
24895
|
-
function
|
|
24898
|
+
var xD = new Set(["audio-classifier"]);
|
|
24899
|
+
function SD(e, t, n) {
|
|
24896
24900
|
return t?.[e] ?? n?.defaultModelId;
|
|
24897
24901
|
}
|
|
24898
|
-
function
|
|
24902
|
+
function CD(e, t) {
|
|
24899
24903
|
if (e.onDisk !== "current") return /* @__PURE__ */ new Set();
|
|
24900
24904
|
let n = t.stepCatalogs[e.stepId], r = new Set([e.format]);
|
|
24901
|
-
return D(e.stepId) ?
|
|
24905
|
+
return D(e.stepId) ? SD(e.stepId, t.clusterModels, n) === e.modelId ? new Set(t.devices.filter((t) => t.enabled && t.format === e.format).map((e) => e.key)) : /* @__PURE__ */ new Set() : new Set(dD(t.devices, e.stepId, e.modelId, n, r).map((e) => e.deviceKey));
|
|
24902
24906
|
}
|
|
24903
|
-
function
|
|
24907
|
+
function wD(e, t, n) {
|
|
24904
24908
|
return t ? "outside-pools" : e.some((e) => e.loaded === !0) ? "in-use" : e.some((e) => e.configured) ? "configured" : e.some((e) => e.enabled) ? n ? "idle" : "unknown" : "unused";
|
|
24905
24909
|
}
|
|
24906
|
-
function
|
|
24907
|
-
let n =
|
|
24910
|
+
function TD(e, t) {
|
|
24911
|
+
let n = CD(e, t), r = t.devices.filter((t) => t.format === e.format).map((r) => ({
|
|
24908
24912
|
deviceKey: r.key,
|
|
24909
|
-
label:
|
|
24913
|
+
label: gD(r),
|
|
24910
24914
|
enabled: r.enabled,
|
|
24911
|
-
loaded:
|
|
24915
|
+
loaded: bD(t.engines, r, e.stepId, e.modelId),
|
|
24912
24916
|
configured: n.has(r.key)
|
|
24913
|
-
})).toSorted((e, t) => e.label.localeCompare(t.label)), i = t.stepCatalogs[e.stepId]?.slot, a =
|
|
24917
|
+
})).toSorted((e, t) => e.label.localeCompare(t.label)), i = t.stepCatalogs[e.stepId]?.slot, a = wD(r, i !== void 0 && xD.has(i), t.engines !== null);
|
|
24914
24918
|
return {
|
|
24915
24919
|
...e,
|
|
24916
24920
|
key: `${e.stepId}::${e.modelId}::${e.format}`,
|
|
@@ -24921,7 +24925,7 @@ function wD(e, t) {
|
|
|
24921
24925
|
removable: a === "idle" || a === "unused"
|
|
24922
24926
|
};
|
|
24923
24927
|
}
|
|
24924
|
-
function
|
|
24928
|
+
function ED(e, t, n) {
|
|
24925
24929
|
return t.onDisk === "missing" ? null : {
|
|
24926
24930
|
stepId: e.stepId,
|
|
24927
24931
|
modelId: e.modelId,
|
|
@@ -24936,7 +24940,7 @@ function TD(e, t, n) {
|
|
|
24936
24940
|
...JC(e.supplies)
|
|
24937
24941
|
};
|
|
24938
24942
|
}
|
|
24939
|
-
function
|
|
24943
|
+
function DD(e, t) {
|
|
24940
24944
|
let n = [];
|
|
24941
24945
|
for (let r of e.registry) {
|
|
24942
24946
|
let i = r.entry.id, a = e.availability[i]?.[e.nodeId];
|
|
@@ -24959,28 +24963,28 @@ function ED(e, t) {
|
|
|
24959
24963
|
}
|
|
24960
24964
|
return n;
|
|
24961
24965
|
}
|
|
24962
|
-
function
|
|
24966
|
+
function OD(e) {
|
|
24963
24967
|
let t = new Set(e.registry.map((e) => e.entry.id)), n = e.seeds.flatMap((e) => e.formats.flatMap((n) => {
|
|
24964
|
-
let r =
|
|
24968
|
+
let r = ED(e, n, t);
|
|
24965
24969
|
return r === null ? [] : [r];
|
|
24966
24970
|
})), r = new Set(n.map((e) => `${e.stepId}::${e.modelId}::${e.format}`)), i = new Map(e.registry.map((e) => [e.entry.id, e.entry.description]));
|
|
24967
|
-
return [...n, ...
|
|
24971
|
+
return [...n, ...DD(e, r)].map((e) => ({
|
|
24968
24972
|
...e,
|
|
24969
24973
|
description: i.get(e.modelId) ?? e.description
|
|
24970
|
-
})).map((t) =>
|
|
24974
|
+
})).map((t) => TD(t, e)).toSorted((e, t) => e.name.localeCompare(t.name) || e.format.localeCompare(t.format));
|
|
24971
24975
|
}
|
|
24972
|
-
function
|
|
24976
|
+
function kD(e, t, n) {
|
|
24973
24977
|
let r = n.device === "all" ? void 0 : t.find((e) => e.key === n.device)?.format;
|
|
24974
24978
|
return e.filter((e) => !(n.provider !== "all" && e.provider !== n.provider || n.step !== "all" && e.stepId !== n.step || n.device !== "all" && e.format !== r));
|
|
24975
24979
|
}
|
|
24976
|
-
function
|
|
24980
|
+
function AD(e) {
|
|
24977
24981
|
return e.filter((e) => e.removable).reduce((e, t) => e + t.sizeMB, 0);
|
|
24978
24982
|
}
|
|
24979
|
-
function
|
|
24983
|
+
function jD(e, t, n, r) {
|
|
24980
24984
|
let i = e.devices.filter((e) => e.enabled && e.format === r).map((r) => ({
|
|
24981
24985
|
deviceKey: r.key,
|
|
24982
|
-
label:
|
|
24983
|
-
loaded:
|
|
24986
|
+
label: gD(r),
|
|
24987
|
+
loaded: bD(e.engines, r, t, n)
|
|
24984
24988
|
})).toSorted((e, t) => e.label.localeCompare(t.label)), a = e.stepCatalogs[t]?.models.find((e) => e.id === n), o = e.seeds.find((e) => e.stepId === t && e.modelId === n)?.formats.find((e) => e.format === r)?.onDisk ?? "missing";
|
|
24985
24989
|
return {
|
|
24986
24990
|
format: r,
|
|
@@ -24989,7 +24993,7 @@ function AD(e, t, n, r) {
|
|
|
24989
24993
|
onDisk: o
|
|
24990
24994
|
};
|
|
24991
24995
|
}
|
|
24992
|
-
function
|
|
24996
|
+
function MD(e, t, n) {
|
|
24993
24997
|
return {
|
|
24994
24998
|
stepId: e,
|
|
24995
24999
|
modelId: t,
|
|
@@ -25002,7 +25006,7 @@ function jD(e, t, n) {
|
|
|
25002
25006
|
let r = [...new Set(n.devices.filter((e) => e.enabled).map((e) => e.format))];
|
|
25003
25007
|
return {
|
|
25004
25008
|
nodeId: n.nodeId,
|
|
25005
|
-
entries: r.map((r) =>
|
|
25009
|
+
entries: r.map((r) => jD(n, e, t, r))
|
|
25006
25010
|
};
|
|
25007
25011
|
})
|
|
25008
25012
|
};
|
|
@@ -25010,7 +25014,7 @@ function jD(e, t, n) {
|
|
|
25010
25014
|
//#endregion
|
|
25011
25015
|
//#region src/components/InstalledSettingsModal.tsx
|
|
25012
25016
|
e();
|
|
25013
|
-
function
|
|
25017
|
+
function ND({ trpc: e, nodeId: t, stepId: n, modelId: r, modelName: a, devices: o, deviceKey: s, onClose: c, onDone: u }) {
|
|
25014
25018
|
let { t: d } = $(), [f, p] = g(!1), [m, h] = g(null), [_, b] = g(null), [x, S] = g({
|
|
25015
25019
|
enabled: !0,
|
|
25016
25020
|
modelId: r,
|
|
@@ -25018,7 +25022,7 @@ function MD({ trpc: e, nodeId: t, stepId: n, modelId: r, modelName: a, devices:
|
|
|
25018
25022
|
}), C = o.find((e) => e.key === s);
|
|
25019
25023
|
i(() => {
|
|
25020
25024
|
let i = !1;
|
|
25021
|
-
return
|
|
25025
|
+
return Jw(e, n, t).then((e) => {
|
|
25022
25026
|
if (i) return;
|
|
25023
25027
|
b(e);
|
|
25024
25028
|
let t = C?.steps?.[n];
|
|
@@ -25040,9 +25044,9 @@ function MD({ trpc: e, nodeId: t, stepId: n, modelId: r, modelName: a, devices:
|
|
|
25040
25044
|
let w = l(async () => {
|
|
25041
25045
|
p(!0), h(null);
|
|
25042
25046
|
try {
|
|
25043
|
-
await
|
|
25047
|
+
await Ww(e, {
|
|
25044
25048
|
agentNodeId: t,
|
|
25045
|
-
inferenceDevices:
|
|
25049
|
+
inferenceDevices: hD(o, n, x.modelId ?? r, x.settings ?? {}, s)
|
|
25046
25050
|
}), u(), c();
|
|
25047
25051
|
} catch (e) {
|
|
25048
25052
|
h(e instanceof Error ? e.message : d("settingsModal.saveFailed"));
|
|
@@ -25133,12 +25137,12 @@ function MD({ trpc: e, nodeId: t, stepId: n, modelId: r, modelName: a, devices:
|
|
|
25133
25137
|
//#endregion
|
|
25134
25138
|
//#region src/components/installed/use-cluster-placement.ts
|
|
25135
25139
|
e();
|
|
25136
|
-
async function
|
|
25140
|
+
async function PD(e, t) {
|
|
25137
25141
|
try {
|
|
25138
25142
|
let [n, r, i] = await Promise.all([
|
|
25139
|
-
|
|
25140
|
-
|
|
25141
|
-
|
|
25143
|
+
Ew(e, t),
|
|
25144
|
+
Hw(e, t),
|
|
25145
|
+
Uw(e, t).catch(() => null)
|
|
25142
25146
|
]);
|
|
25143
25147
|
return {
|
|
25144
25148
|
nodeId: t,
|
|
@@ -25154,11 +25158,11 @@ async function ND(e, t) {
|
|
|
25154
25158
|
};
|
|
25155
25159
|
}
|
|
25156
25160
|
}
|
|
25157
|
-
function
|
|
25161
|
+
function FD(e, t, n) {
|
|
25158
25162
|
let [r, a] = g(null), o = t.join("\n");
|
|
25159
25163
|
return i(() => {
|
|
25160
25164
|
let t = !1, n = o.length === 0 ? [] : o.split("\n");
|
|
25161
|
-
return Promise.all(n.map((t) =>
|
|
25165
|
+
return Promise.all(n.map((t) => PD(e, t))).then((e) => {
|
|
25162
25166
|
t || a(e);
|
|
25163
25167
|
}), () => {
|
|
25164
25168
|
t = !0;
|
|
@@ -25172,14 +25176,14 @@ function PD(e, t, n) {
|
|
|
25172
25176
|
//#endregion
|
|
25173
25177
|
//#region src/components/installed/use-online-node-ids.ts
|
|
25174
25178
|
e();
|
|
25175
|
-
function
|
|
25179
|
+
function ID() {
|
|
25176
25180
|
let { nodes: e } = Ur();
|
|
25177
25181
|
return o(() => e.filter((e) => e.isOnline).map((e) => e.id), [e]);
|
|
25178
25182
|
}
|
|
25179
25183
|
//#endregion
|
|
25180
25184
|
//#region src/components/installed/ClusterModelsSection.tsx
|
|
25181
25185
|
e();
|
|
25182
|
-
function
|
|
25186
|
+
function LD({ row: e }) {
|
|
25183
25187
|
let { t } = $();
|
|
25184
25188
|
if (e.entry === null) return /* @__PURE__ */ v(Wa, {
|
|
25185
25189
|
variant: "danger",
|
|
@@ -25206,7 +25210,7 @@ function ID({ row: e }) {
|
|
|
25206
25210
|
})]
|
|
25207
25211
|
});
|
|
25208
25212
|
}
|
|
25209
|
-
var
|
|
25213
|
+
var RD = (e) => [
|
|
25210
25214
|
{
|
|
25211
25215
|
key: "node",
|
|
25212
25216
|
header: e("cluster.cols.node"),
|
|
@@ -25235,11 +25239,11 @@ var LD = (e) => [
|
|
|
25235
25239
|
{
|
|
25236
25240
|
key: "state",
|
|
25237
25241
|
header: e("cluster.cols.state"),
|
|
25238
|
-
render: (e) => /* @__PURE__ */ v(
|
|
25242
|
+
render: (e) => /* @__PURE__ */ v(LD, { row: e })
|
|
25239
25243
|
}
|
|
25240
25244
|
];
|
|
25241
|
-
function
|
|
25242
|
-
return
|
|
25245
|
+
function zD(e, t, n) {
|
|
25246
|
+
return MD(e.stepId, t, n).nodes.flatMap((e) => e.entries.length === 0 ? [{
|
|
25243
25247
|
key: e.nodeId,
|
|
25244
25248
|
nodeId: e.nodeId,
|
|
25245
25249
|
entry: null,
|
|
@@ -25250,7 +25254,7 @@ function RD(e, t, n) {
|
|
|
25250
25254
|
entry: t
|
|
25251
25255
|
})));
|
|
25252
25256
|
}
|
|
25253
|
-
function
|
|
25257
|
+
function BD(e, t) {
|
|
25254
25258
|
let n = new Map(e.options.map((e) => [e.id, e.label]));
|
|
25255
25259
|
for (let r of t ?? []) if (r.error === void 0) for (let t of r.seeds) t.stepId === e.stepId && !n.has(t.modelId) && n.set(t.modelId, t.name);
|
|
25256
25260
|
return [...n].map(([e, t]) => ({
|
|
@@ -25258,14 +25262,14 @@ function zD(e, t) {
|
|
|
25258
25262
|
label: t
|
|
25259
25263
|
}));
|
|
25260
25264
|
}
|
|
25261
|
-
function
|
|
25262
|
-
let { t: a } = $(), s = o(() =>
|
|
25265
|
+
function VD({ step: e, current: t, inputs: n, onChange: r }) {
|
|
25266
|
+
let { t: a } = $(), s = o(() => RD(a), [a]), [c, l] = g(t);
|
|
25263
25267
|
i(() => l(t), [t]);
|
|
25264
|
-
let u = o(() => n === null ? [] :
|
|
25268
|
+
let u = o(() => n === null ? [] : zD(e, t, n), [
|
|
25265
25269
|
e,
|
|
25266
25270
|
t,
|
|
25267
25271
|
n
|
|
25268
|
-
]), d = o(() =>
|
|
25272
|
+
]), d = o(() => BD(e, n), [e, n]), f = (e) => d.find((t) => t.id === e)?.label ?? e;
|
|
25269
25273
|
return /* @__PURE__ */ y("section", {
|
|
25270
25274
|
"aria-labelledby": `cluster-${e.stepId}`,
|
|
25271
25275
|
className: qe,
|
|
@@ -25325,8 +25329,8 @@ function BD({ step: e, current: t, inputs: n, onChange: r }) {
|
|
|
25325
25329
|
]
|
|
25326
25330
|
});
|
|
25327
25331
|
}
|
|
25328
|
-
function
|
|
25329
|
-
let { t: a } = $(), o = Xa(), s =
|
|
25332
|
+
function HD({ trpc: e, refreshKey: t, clusterModels: n, onChanged: r, onError: i }) {
|
|
25333
|
+
let { t: a } = $(), o = Xa(), s = FD(e, ID(), t), c = async (t, n, s) => {
|
|
25330
25334
|
if (await o({
|
|
25331
25335
|
title: a("cluster.confirmTitle"),
|
|
25332
25336
|
message: a("cluster.confirmMessage", {
|
|
@@ -25337,7 +25341,7 @@ function VD({ trpc: e, refreshKey: t, clusterModels: n, onChanged: r, onError: i
|
|
|
25337
25341
|
cancelLabel: a("common.cancel"),
|
|
25338
25342
|
variant: "default"
|
|
25339
25343
|
})) try {
|
|
25340
|
-
await
|
|
25344
|
+
await Kw(e, fD(t, n)), r();
|
|
25341
25345
|
} catch (e) {
|
|
25342
25346
|
i(e instanceof Error ? e.message : a("cluster.activateFailed"));
|
|
25343
25347
|
}
|
|
@@ -25349,7 +25353,7 @@ function VD({ trpc: e, refreshKey: t, clusterModels: n, onChanged: r, onError: i
|
|
|
25349
25353
|
id: "installed-cluster-models",
|
|
25350
25354
|
className: Qe,
|
|
25351
25355
|
children: a("cluster.title")
|
|
25352
|
-
}), je.map((e) => /* @__PURE__ */ v(
|
|
25356
|
+
}), je.map((e) => /* @__PURE__ */ v(VD, {
|
|
25353
25357
|
step: e,
|
|
25354
25358
|
current: n?.[e.stepId] ?? e.defaultModelId,
|
|
25355
25359
|
inputs: s,
|
|
@@ -25359,7 +25363,7 @@ function VD({ trpc: e, refreshKey: t, clusterModels: n, onChanged: r, onError: i
|
|
|
25359
25363
|
}
|
|
25360
25364
|
//#endregion
|
|
25361
25365
|
//#region src/components/FillBadges.tsx
|
|
25362
|
-
function
|
|
25366
|
+
function UD(e, t) {
|
|
25363
25367
|
if (e.kind === "mask") return t("fillBadges.mask");
|
|
25364
25368
|
if (e.kind === "crop") return e.stepId === "face-detection" ? t("fillBadges.cropFace") : t("fillBadges.cropPlate");
|
|
25365
25369
|
let n = ye[e.stepId], r = {
|
|
@@ -25368,14 +25372,14 @@ function HD(e, t) {
|
|
|
25368
25372
|
};
|
|
25369
25373
|
return e.uncovered.length > 0 ? t(n ? "fillBadges.labelsDefaultUncovered" : "fillBadges.labelsOptionalUncovered", r) : t(n ? "fillBadges.labelsDefaultAll" : "fillBadges.labelsOptionalAll", r);
|
|
25370
25374
|
}
|
|
25371
|
-
function
|
|
25375
|
+
function WD({ supplies: e }) {
|
|
25372
25376
|
let { t } = $();
|
|
25373
25377
|
return e === void 0 || e.length === 0 ? null : /* @__PURE__ */ v("span", {
|
|
25374
25378
|
className: "flex flex-wrap gap-1",
|
|
25375
25379
|
"data-testid": "fill-badges",
|
|
25376
25380
|
children: e.map((e) => /* @__PURE__ */ v("span", {
|
|
25377
25381
|
className: "inline-flex items-center px-1.5 py-0.5 rounded text-[10px] font-medium border bg-primary/10 text-primary border-primary/30",
|
|
25378
|
-
title:
|
|
25382
|
+
title: UD(e, t),
|
|
25379
25383
|
children: pe(e)
|
|
25380
25384
|
}, e.stepId))
|
|
25381
25385
|
});
|
|
@@ -25383,7 +25387,7 @@ function UD({ supplies: e }) {
|
|
|
25383
25387
|
//#endregion
|
|
25384
25388
|
//#region src/components/InlineRename.tsx
|
|
25385
25389
|
e();
|
|
25386
|
-
function
|
|
25390
|
+
function GD({ name: e, modelId: t, onRename: n, onError: r }) {
|
|
25387
25391
|
let { t: i } = $(), [a, o] = g(null), [s, c] = g(!1);
|
|
25388
25392
|
if (a === null) return /* @__PURE__ */ y("span", {
|
|
25389
25393
|
className: "flex items-center gap-1 min-w-0",
|
|
@@ -25470,7 +25474,7 @@ function WD({ name: e, modelId: t, onRename: n, onError: r }) {
|
|
|
25470
25474
|
length: l.length,
|
|
25471
25475
|
max: 80
|
|
25472
25476
|
})
|
|
25473
|
-
}) : l.kind === "reset" ? i("inlineRename.reset") : /* @__PURE__ */ v(
|
|
25477
|
+
}) : l.kind === "reset" ? i("inlineRename.reset") : /* @__PURE__ */ v(nT, {
|
|
25474
25478
|
i18nKey: "inlineRename.idSame",
|
|
25475
25479
|
values: { modelId: t },
|
|
25476
25480
|
components: { mono: /* @__PURE__ */ v("span", { className: "font-mono" }) }
|
|
@@ -25480,7 +25484,7 @@ function WD({ name: e, modelId: t, onRename: n, onError: r }) {
|
|
|
25480
25484
|
}
|
|
25481
25485
|
//#endregion
|
|
25482
25486
|
//#region src/components/installed/DeviceChips.tsx
|
|
25483
|
-
var
|
|
25487
|
+
var KD = {
|
|
25484
25488
|
off: "off",
|
|
25485
25489
|
loadedConfigured: "loaded, configured",
|
|
25486
25490
|
loaded: "loaded",
|
|
@@ -25488,19 +25492,19 @@ var GD = {
|
|
|
25488
25492
|
unknown: "load state unknown",
|
|
25489
25493
|
notUsed: "not used"
|
|
25490
25494
|
};
|
|
25491
|
-
function
|
|
25495
|
+
function qD(e) {
|
|
25492
25496
|
return e.enabled ? e.loaded === !0 ? e.configured ? "loadedConfigured" : "loaded" : e.configured ? "configuredNotLoaded" : e.loaded === null ? "unknown" : "notUsed" : "off";
|
|
25493
25497
|
}
|
|
25494
|
-
function
|
|
25498
|
+
function JD(e) {
|
|
25495
25499
|
return e.enabled ? e.loaded === !0 ? "border-success/40 bg-success/10 text-success" : e.configured ? "border-primary/50 bg-primary/10 text-primary" : "border-border bg-surface text-foreground-subtle" : "border-border bg-foreground-subtle/35";
|
|
25496
25500
|
}
|
|
25497
|
-
function
|
|
25501
|
+
function YD({ chip: e }) {
|
|
25498
25502
|
return /* @__PURE__ */ v("span", {
|
|
25499
25503
|
"aria-hidden": !0,
|
|
25500
25504
|
className: W("h-1.5 w-1.5 rounded-full", e.loaded === !0 ? "bg-success" : e.configured ? "border border-primary" : "border border-foreground-subtle/60")
|
|
25501
25505
|
});
|
|
25502
25506
|
}
|
|
25503
|
-
function
|
|
25507
|
+
function XD({ chips: e, onChip: t, disabled: n = !1 }) {
|
|
25504
25508
|
let { t: r } = $();
|
|
25505
25509
|
return e.length === 0 ? /* @__PURE__ */ v("span", {
|
|
25506
25510
|
className: "text-[10px] text-foreground-subtle",
|
|
@@ -25509,7 +25513,7 @@ function YD({ chips: e, onChip: t, disabled: n = !1 }) {
|
|
|
25509
25513
|
className: "flex flex-wrap gap-1",
|
|
25510
25514
|
"data-testid": "installed-device-chips",
|
|
25511
25515
|
children: e.map((e) => {
|
|
25512
|
-
let i =
|
|
25516
|
+
let i = qD(e), a = r(`deviceChips.state.${i}`), o = r("deviceChips.chipLabel", {
|
|
25513
25517
|
label: e.label,
|
|
25514
25518
|
deviceKey: e.deviceKey,
|
|
25515
25519
|
state: a
|
|
@@ -25518,19 +25522,19 @@ function YD({ chips: e, onChip: t, disabled: n = !1 }) {
|
|
|
25518
25522
|
state: a
|
|
25519
25523
|
});
|
|
25520
25524
|
if (!e.enabled) return /* @__PURE__ */ v("span", {
|
|
25521
|
-
className: W(We,
|
|
25525
|
+
className: W(We, JD(e), "min-w-[1.75rem] justify-center px-1.5"),
|
|
25522
25526
|
"data-device-key": e.deviceKey,
|
|
25523
|
-
"data-state":
|
|
25527
|
+
"data-state": KD[i],
|
|
25524
25528
|
"aria-label": o,
|
|
25525
25529
|
title: s
|
|
25526
25530
|
}, e.deviceKey);
|
|
25527
|
-
let c = t !== void 0 && !n, l = W(We,
|
|
25531
|
+
let c = t !== void 0 && !n, l = W(We, JD(e), c && "hover:border-primary/60"), u = /* @__PURE__ */ y(b, { children: [/* @__PURE__ */ v(YD, { chip: e }), e.label] });
|
|
25528
25532
|
return c ? /* @__PURE__ */ v("button", {
|
|
25529
25533
|
type: "button",
|
|
25530
25534
|
className: l,
|
|
25531
25535
|
onClick: () => t(e),
|
|
25532
25536
|
"data-device-key": e.deviceKey,
|
|
25533
|
-
"data-state":
|
|
25537
|
+
"data-state": KD[i],
|
|
25534
25538
|
"aria-label": o,
|
|
25535
25539
|
title: e.configured ? r("deviceChips.titleOpenSettings", {
|
|
25536
25540
|
deviceKey: e.deviceKey,
|
|
@@ -25543,7 +25547,7 @@ function YD({ chips: e, onChip: t, disabled: n = !1 }) {
|
|
|
25543
25547
|
}, e.deviceKey) : /* @__PURE__ */ v("span", {
|
|
25544
25548
|
className: l,
|
|
25545
25549
|
"data-device-key": e.deviceKey,
|
|
25546
|
-
"data-state":
|
|
25550
|
+
"data-state": KD[i],
|
|
25547
25551
|
"aria-label": o,
|
|
25548
25552
|
title: s,
|
|
25549
25553
|
children: u
|
|
@@ -25553,7 +25557,7 @@ function YD({ chips: e, onChip: t, disabled: n = !1 }) {
|
|
|
25553
25557
|
}
|
|
25554
25558
|
//#endregion
|
|
25555
25559
|
//#region src/components/installed/UsageBadge.tsx
|
|
25556
|
-
var
|
|
25560
|
+
var ZD = {
|
|
25557
25561
|
"in-use": {
|
|
25558
25562
|
key: "inUse",
|
|
25559
25563
|
variant: "success"
|
|
@@ -25578,50 +25582,50 @@ var XD = {
|
|
|
25578
25582
|
key: "unknown",
|
|
25579
25583
|
variant: "default"
|
|
25580
25584
|
}
|
|
25581
|
-
},
|
|
25582
|
-
function
|
|
25583
|
-
let { t } = $(), n =
|
|
25585
|
+
}, QD = "text-[10px] px-1.5 py-0";
|
|
25586
|
+
function $D({ usage: e }) {
|
|
25587
|
+
let { t } = $(), n = ZD[e];
|
|
25584
25588
|
return /* @__PURE__ */ v(Wa, {
|
|
25585
25589
|
variant: n.variant,
|
|
25586
|
-
className:
|
|
25590
|
+
className: QD,
|
|
25587
25591
|
title: t(`usage.${n.key}.title`),
|
|
25588
25592
|
"data-usage": e,
|
|
25589
25593
|
children: t(`usage.${n.key}.label`)
|
|
25590
25594
|
});
|
|
25591
25595
|
}
|
|
25592
|
-
function
|
|
25596
|
+
function eO() {
|
|
25593
25597
|
let { t: e } = $();
|
|
25594
25598
|
return /* @__PURE__ */ v(Wa, {
|
|
25595
25599
|
variant: "warning",
|
|
25596
25600
|
style: "outline",
|
|
25597
|
-
className: `${
|
|
25601
|
+
className: `${QD} border-warning/40`,
|
|
25598
25602
|
title: e("usage.stale.title"),
|
|
25599
25603
|
children: e("usage.stale.label")
|
|
25600
25604
|
});
|
|
25601
25605
|
}
|
|
25602
|
-
function
|
|
25606
|
+
function tO({ precision: e }) {
|
|
25603
25607
|
let { t } = $();
|
|
25604
25608
|
return /* @__PURE__ */ v(Wa, {
|
|
25605
25609
|
style: "outline",
|
|
25606
|
-
className: `${
|
|
25610
|
+
className: `${QD} border-border text-foreground-subtle uppercase`,
|
|
25607
25611
|
title: t("usage.precisionTitle"),
|
|
25608
25612
|
children: e
|
|
25609
25613
|
});
|
|
25610
25614
|
}
|
|
25611
25615
|
//#endregion
|
|
25612
25616
|
//#region src/components/installed/provider-label.ts
|
|
25613
|
-
var
|
|
25617
|
+
var nO = {
|
|
25614
25618
|
camstack: "CamStack",
|
|
25615
25619
|
scrypted: "Scrypted",
|
|
25616
25620
|
frigate: "Frigate"
|
|
25617
25621
|
};
|
|
25618
|
-
function
|
|
25619
|
-
return e === "custom" ? t("providers.custom") :
|
|
25622
|
+
function rO(e, t) {
|
|
25623
|
+
return e === "custom" ? t("providers.custom") : nO[e] ?? e;
|
|
25620
25624
|
}
|
|
25621
25625
|
//#endregion
|
|
25622
25626
|
//#region src/components/installed/InstalledFilesTable.tsx
|
|
25623
25627
|
e();
|
|
25624
|
-
function
|
|
25628
|
+
function iO({ row: e, onRename: t, onError: n }) {
|
|
25625
25629
|
let { t: r } = $();
|
|
25626
25630
|
return /* @__PURE__ */ y("div", {
|
|
25627
25631
|
className: "flex min-w-0 flex-col gap-0.5 whitespace-normal",
|
|
@@ -25630,7 +25634,7 @@ function rO({ row: e, onRename: t, onError: n }) {
|
|
|
25630
25634
|
"data-usage": e.usage,
|
|
25631
25635
|
"data-removable": e.removable ? "true" : "false",
|
|
25632
25636
|
children: [
|
|
25633
|
-
e.renameable ? /* @__PURE__ */ v(
|
|
25637
|
+
e.renameable ? /* @__PURE__ */ v(GD, {
|
|
25634
25638
|
name: e.name,
|
|
25635
25639
|
modelId: e.modelId,
|
|
25636
25640
|
onRename: t,
|
|
@@ -25651,16 +25655,16 @@ function rO({ row: e, onRename: t, onError: n }) {
|
|
|
25651
25655
|
children: [
|
|
25652
25656
|
e.stepId,
|
|
25653
25657
|
" · ",
|
|
25654
|
-
|
|
25658
|
+
rO(e.provider, r),
|
|
25655
25659
|
e.clusterScoped ? r("filesTable.clusterModel") : "",
|
|
25656
25660
|
e.description ? ` · ${e.description}` : ""
|
|
25657
25661
|
]
|
|
25658
25662
|
}),
|
|
25659
|
-
/* @__PURE__ */ v(
|
|
25663
|
+
/* @__PURE__ */ v(WD, { supplies: e.supplies })
|
|
25660
25664
|
]
|
|
25661
25665
|
});
|
|
25662
25666
|
}
|
|
25663
|
-
function
|
|
25667
|
+
function aO({ row: e }) {
|
|
25664
25668
|
return /* @__PURE__ */ y("span", {
|
|
25665
25669
|
className: "inline-flex flex-wrap items-center gap-1",
|
|
25666
25670
|
children: [
|
|
@@ -25668,12 +25672,12 @@ function iO({ row: e }) {
|
|
|
25668
25672
|
className: "font-mono text-[11px] text-foreground",
|
|
25669
25673
|
children: e.format
|
|
25670
25674
|
}),
|
|
25671
|
-
e.precision !== void 0 && /* @__PURE__ */ v(
|
|
25672
|
-
e.onDisk === "stale" && /* @__PURE__ */ v(
|
|
25675
|
+
e.precision !== void 0 && /* @__PURE__ */ v(tO, { precision: e.precision }),
|
|
25676
|
+
e.onDisk === "stale" && /* @__PURE__ */ v(eO, {})
|
|
25673
25677
|
]
|
|
25674
25678
|
});
|
|
25675
25679
|
}
|
|
25676
|
-
function
|
|
25680
|
+
function oO({ row: e, busy: t, onRemove: n }) {
|
|
25677
25681
|
let { t: r } = $();
|
|
25678
25682
|
return e.removable ? /* @__PURE__ */ y("button", {
|
|
25679
25683
|
type: "button",
|
|
@@ -25694,7 +25698,7 @@ function aO({ row: e, busy: t, onRemove: n }) {
|
|
|
25694
25698
|
}), r("filesTable.remove")]
|
|
25695
25699
|
}) : null;
|
|
25696
25700
|
}
|
|
25697
|
-
function
|
|
25701
|
+
function sO() {
|
|
25698
25702
|
let [e, t] = g(/* @__PURE__ */ new Set());
|
|
25699
25703
|
return {
|
|
25700
25704
|
busy: e,
|
|
@@ -25708,8 +25712,8 @@ function oO() {
|
|
|
25708
25712
|
}
|
|
25709
25713
|
};
|
|
25710
25714
|
}
|
|
25711
|
-
function
|
|
25712
|
-
let { t: o } = $(), { busy: s, run: c } =
|
|
25715
|
+
function cO({ rows: e, emptyMessage: t, onRemove: n, onRename: r, onChip: i, onError: a }) {
|
|
25716
|
+
let { t: o } = $(), { busy: s, run: c } = sO(), l = (e, t) => {
|
|
25713
25717
|
c(e.key, async () => {
|
|
25714
25718
|
try {
|
|
25715
25719
|
await t();
|
|
@@ -25725,7 +25729,7 @@ function sO({ rows: e, emptyMessage: t, onRemove: n, onRename: r, onChip: i, onE
|
|
|
25725
25729
|
header: o("filesTable.cols.model"),
|
|
25726
25730
|
nowrap: !1,
|
|
25727
25731
|
sortValue: (e) => e.name,
|
|
25728
|
-
render: (e) => /* @__PURE__ */ v(
|
|
25732
|
+
render: (e) => /* @__PURE__ */ v(iO, {
|
|
25729
25733
|
row: e,
|
|
25730
25734
|
onRename: (t) => r(e, t),
|
|
25731
25735
|
onError: a
|
|
@@ -25735,7 +25739,7 @@ function sO({ rows: e, emptyMessage: t, onRemove: n, onRename: r, onChip: i, onE
|
|
|
25735
25739
|
key: "format",
|
|
25736
25740
|
header: o("filesTable.cols.format"),
|
|
25737
25741
|
sortValue: (e) => e.format,
|
|
25738
|
-
render: (e) => /* @__PURE__ */ v(
|
|
25742
|
+
render: (e) => /* @__PURE__ */ v(aO, { row: e })
|
|
25739
25743
|
},
|
|
25740
25744
|
{
|
|
25741
25745
|
key: "size",
|
|
@@ -25752,7 +25756,7 @@ function sO({ rows: e, emptyMessage: t, onRemove: n, onRename: r, onChip: i, onE
|
|
|
25752
25756
|
header: o("filesTable.cols.devices"),
|
|
25753
25757
|
nowrap: !1,
|
|
25754
25758
|
notSortableReason: o("filesTable.devicesNotSortable"),
|
|
25755
|
-
render: (e) => /* @__PURE__ */ v(
|
|
25759
|
+
render: (e) => /* @__PURE__ */ v(XD, {
|
|
25756
25760
|
chips: e.chips,
|
|
25757
25761
|
disabled: s.has(e.key),
|
|
25758
25762
|
onChip: e.clusterScoped || e.origin !== "pipeline" || e.usage === "outside-pools" ? void 0 : (t) => l(e, () => i(e, t))
|
|
@@ -25762,12 +25766,12 @@ function sO({ rows: e, emptyMessage: t, onRemove: n, onRename: r, onChip: i, onE
|
|
|
25762
25766
|
key: "status",
|
|
25763
25767
|
header: o("filesTable.cols.status"),
|
|
25764
25768
|
sortValue: (e) => e.usage,
|
|
25765
|
-
render: (e) => /* @__PURE__ */ v(
|
|
25769
|
+
render: (e) => /* @__PURE__ */ v($D, { usage: e.usage })
|
|
25766
25770
|
},
|
|
25767
25771
|
{
|
|
25768
25772
|
key: "actions",
|
|
25769
25773
|
align: "right",
|
|
25770
|
-
render: (e) => /* @__PURE__ */ v(
|
|
25774
|
+
render: (e) => /* @__PURE__ */ v(oO, {
|
|
25771
25775
|
row: e,
|
|
25772
25776
|
busy: s.has(e.key),
|
|
25773
25777
|
onRemove: () => l(e, () => n(e))
|
|
@@ -25787,19 +25791,19 @@ function sO({ rows: e, emptyMessage: t, onRemove: n, onRename: r, onChip: i, onE
|
|
|
25787
25791
|
}
|
|
25788
25792
|
//#endregion
|
|
25789
25793
|
//#region src/components/installed/InstalledFilters.tsx
|
|
25790
|
-
var
|
|
25794
|
+
var lO = [
|
|
25791
25795
|
"camstack",
|
|
25792
25796
|
"scrypted",
|
|
25793
25797
|
"frigate",
|
|
25794
25798
|
"custom"
|
|
25795
25799
|
];
|
|
25796
|
-
function
|
|
25800
|
+
function uO(e) {
|
|
25797
25801
|
let { t } = $(), n = [{
|
|
25798
25802
|
value: "all",
|
|
25799
25803
|
label: t("installedFilters.all")
|
|
25800
|
-
}, ...
|
|
25804
|
+
}, ...lO.map((e) => ({
|
|
25801
25805
|
value: e,
|
|
25802
|
-
label:
|
|
25806
|
+
label: rO(e, t)
|
|
25803
25807
|
}))], r = [{
|
|
25804
25808
|
value: "all",
|
|
25805
25809
|
label: t("installedFilters.allDevices")
|
|
@@ -25856,7 +25860,7 @@ function lO(e) {
|
|
|
25856
25860
|
] }),
|
|
25857
25861
|
end: /* @__PURE__ */ v("div", {
|
|
25858
25862
|
className: "min-w-0 max-w-full overflow-x-auto",
|
|
25859
|
-
children: /* @__PURE__ */ v(
|
|
25863
|
+
children: /* @__PURE__ */ v(Qw, {
|
|
25860
25864
|
selectedNodeId: e.nodeId,
|
|
25861
25865
|
onSelect: e.onNode
|
|
25862
25866
|
})
|
|
@@ -25866,27 +25870,27 @@ function lO(e) {
|
|
|
25866
25870
|
//#endregion
|
|
25867
25871
|
//#region src/tabs/InstalledTab.tsx
|
|
25868
25872
|
e();
|
|
25869
|
-
function
|
|
25873
|
+
function dO(e) {
|
|
25870
25874
|
return e === "camstack" || e === "scrypted" || e === "frigate" || e === "custom" ? e : "all";
|
|
25871
25875
|
}
|
|
25872
|
-
function
|
|
25876
|
+
function fO(e) {
|
|
25873
25877
|
return e === null || e.length === 0 || e === "all" ? "all" : e;
|
|
25874
25878
|
}
|
|
25875
|
-
var
|
|
25876
|
-
function
|
|
25879
|
+
var pO = fO, mO = fO;
|
|
25880
|
+
function hO(e) {
|
|
25877
25881
|
return e === null || e.length === 0 ? "hub" : e;
|
|
25878
25882
|
}
|
|
25879
|
-
function
|
|
25883
|
+
function gO(e) {
|
|
25880
25884
|
return ge.some((t) => t === e);
|
|
25881
25885
|
}
|
|
25882
|
-
async function
|
|
25886
|
+
async function _O(e, t) {
|
|
25883
25887
|
let [n, r, i, a, o, s] = await Promise.all([
|
|
25884
|
-
pw(e),
|
|
25885
25888
|
mw(e),
|
|
25886
|
-
|
|
25887
|
-
|
|
25888
|
-
Hw(e, t).catch(() =>
|
|
25889
|
-
|
|
25889
|
+
hw(e),
|
|
25890
|
+
Ew(e, t),
|
|
25891
|
+
Hw(e, t).catch(() => []),
|
|
25892
|
+
Uw(e, t).catch(() => null),
|
|
25893
|
+
Gw(e).catch(() => null)
|
|
25890
25894
|
]);
|
|
25891
25895
|
return {
|
|
25892
25896
|
models: n,
|
|
@@ -25898,15 +25902,15 @@ async function gO(e, t) {
|
|
|
25898
25902
|
clusterModels: s
|
|
25899
25903
|
};
|
|
25900
25904
|
}
|
|
25901
|
-
function
|
|
25905
|
+
function vO(e, t, n) {
|
|
25902
25906
|
let [r, i] = jS(e), a = l((e) => i(e === n ? null : e), [i, n]);
|
|
25903
25907
|
return [t(r), a];
|
|
25904
25908
|
}
|
|
25905
|
-
function
|
|
25906
|
-
let { t: n } = $(), [r, a] = jS("provider"), s =
|
|
25909
|
+
function yO({ trpc: e, refreshKey: t }) {
|
|
25910
|
+
let { t: n } = $(), [r, a] = jS("provider"), s = dO(r), c = l((e) => a(e === "all" ? null : e), [a]), [u, d] = vO("type", pO, "all"), [f, p] = vO("device", mO, "all"), [m, h] = vO("node", hO, "hub"), _ = Xa(), [x, S] = g(null), [C, w] = g(null), [T, E] = g(0), [ee, te] = g(null), D = l(async () => {
|
|
25907
25911
|
w(null);
|
|
25908
25912
|
try {
|
|
25909
|
-
S(await
|
|
25913
|
+
S(await _O(e, m));
|
|
25910
25914
|
} catch (e) {
|
|
25911
25915
|
w(e instanceof Error ? e.message : n("installed.loadFailed"));
|
|
25912
25916
|
}
|
|
@@ -25920,7 +25924,7 @@ function vO({ trpc: e, refreshKey: t }) {
|
|
|
25920
25924
|
}, [D, t]);
|
|
25921
25925
|
let O = l(async () => {
|
|
25922
25926
|
await D(), E((e) => e + 1);
|
|
25923
|
-
}, [D]), k = o(() => x === null ? [] :
|
|
25927
|
+
}, [D]), k = o(() => x === null ? [] : OD({
|
|
25924
25928
|
nodeId: m,
|
|
25925
25929
|
seeds: x.seeds,
|
|
25926
25930
|
stepCatalogs: x.stepCatalogs,
|
|
@@ -25929,7 +25933,7 @@ function vO({ trpc: e, refreshKey: t }) {
|
|
|
25929
25933
|
clusterModels: x.clusterModels,
|
|
25930
25934
|
registry: x.models,
|
|
25931
25935
|
availability: x.availability
|
|
25932
|
-
}), [x, m]), A = x?.devices ?? [], ne = o(() =>
|
|
25936
|
+
}), [x, m]), A = x?.devices ?? [], ne = o(() => kD(k, A, {
|
|
25933
25937
|
provider: s,
|
|
25934
25938
|
step: u,
|
|
25935
25939
|
device: f
|
|
@@ -25943,18 +25947,18 @@ function vO({ trpc: e, refreshKey: t }) {
|
|
|
25943
25947
|
let e = new Set(k.map((e) => e.stepId));
|
|
25944
25948
|
return u !== "all" && e.add(u), [...e].toSorted((e, t) => e.localeCompare(t));
|
|
25945
25949
|
}, [k, u]), re = l(async (t) => {
|
|
25946
|
-
if (!t.removable || !
|
|
25950
|
+
if (!t.removable || !gO(t.format)) return;
|
|
25947
25951
|
let n = {
|
|
25948
25952
|
modelId: t.modelId,
|
|
25949
25953
|
format: t.format,
|
|
25950
25954
|
nodeId: m
|
|
25951
25955
|
};
|
|
25952
|
-
t.origin === "registry" ? await
|
|
25956
|
+
t.origin === "registry" ? await yw(e, n) : await Ow(e, {
|
|
25953
25957
|
...n,
|
|
25954
25958
|
addonId: t.stepId
|
|
25955
25959
|
});
|
|
25956
25960
|
}, [m, e]), M = l(async (e) => {
|
|
25957
|
-
!e.removable || !
|
|
25961
|
+
!e.removable || !gO(e.format) || await _({
|
|
25958
25962
|
title: n("installed.deleteFile.title"),
|
|
25959
25963
|
message: n("installed.deleteFile.message", {
|
|
25960
25964
|
format: e.format,
|
|
@@ -25998,7 +26002,7 @@ function vO({ trpc: e, refreshKey: t }) {
|
|
|
25998
26002
|
ie,
|
|
25999
26003
|
n
|
|
26000
26004
|
]), N = l(async (t, n) => {
|
|
26001
|
-
await
|
|
26005
|
+
await vw(e, {
|
|
26002
26006
|
modelId: t.modelId,
|
|
26003
26007
|
name: n
|
|
26004
26008
|
}), await O();
|
|
@@ -26021,9 +26025,9 @@ function vO({ trpc: e, refreshKey: t }) {
|
|
|
26021
26025
|
confirmLabel: n("common.activate"),
|
|
26022
26026
|
cancelLabel: n("common.cancel"),
|
|
26023
26027
|
variant: "default"
|
|
26024
|
-
}) && (await
|
|
26028
|
+
}) && (await Ww(e, {
|
|
26025
26029
|
agentNodeId: m,
|
|
26026
|
-
inferenceDevices:
|
|
26030
|
+
inferenceDevices: mD(A, t.stepId, t.modelId, [r.deviceKey])
|
|
26027
26031
|
}), await O());
|
|
26028
26032
|
}, [
|
|
26029
26033
|
_,
|
|
@@ -26041,14 +26045,14 @@ function vO({ trpc: e, refreshKey: t }) {
|
|
|
26041
26045
|
className: "rounded-md border border-danger/30 bg-danger/10 px-3 py-2 text-xs text-danger",
|
|
26042
26046
|
children: C
|
|
26043
26047
|
}),
|
|
26044
|
-
/* @__PURE__ */ v(
|
|
26048
|
+
/* @__PURE__ */ v(uO, {
|
|
26045
26049
|
provider: s,
|
|
26046
26050
|
onProvider: c,
|
|
26047
26051
|
step: u,
|
|
26048
26052
|
stepOptions: j,
|
|
26049
26053
|
onStep: d,
|
|
26050
26054
|
device: f,
|
|
26051
|
-
deviceOptions:
|
|
26055
|
+
deviceOptions: _D(A),
|
|
26052
26056
|
onDevice: p,
|
|
26053
26057
|
nodeId: m,
|
|
26054
26058
|
onNode: h
|
|
@@ -26073,7 +26077,7 @@ function vO({ trpc: e, refreshKey: t }) {
|
|
|
26073
26077
|
n("installed.summary.onDisk", { size: nw(P) }),
|
|
26074
26078
|
" ·",
|
|
26075
26079
|
" ",
|
|
26076
|
-
n("installed.summary.reclaimable", { size: nw(
|
|
26080
|
+
n("installed.summary.reclaimable", { size: nw(AD(k)) }),
|
|
26077
26081
|
x?.engines === null ? ` · ${n("installed.summary.loadedUnavailable")}` : ""
|
|
26078
26082
|
]
|
|
26079
26083
|
}), ie.length > 0 && /* @__PURE__ */ v("button", {
|
|
@@ -26084,7 +26088,7 @@ function vO({ trpc: e, refreshKey: t }) {
|
|
|
26084
26088
|
children: n("installed.removeUnused", { count: ie.length })
|
|
26085
26089
|
})]
|
|
26086
26090
|
}),
|
|
26087
|
-
/* @__PURE__ */ v(
|
|
26091
|
+
/* @__PURE__ */ v(cO, {
|
|
26088
26092
|
rows: ne,
|
|
26089
26093
|
emptyMessage: k.length === 0 ? n("installed.emptyNode", { nodeId: m }) : n("installed.emptyFiltered"),
|
|
26090
26094
|
onRemove: M,
|
|
@@ -26092,7 +26096,7 @@ function vO({ trpc: e, refreshKey: t }) {
|
|
|
26092
26096
|
onChip: oe,
|
|
26093
26097
|
onError: w
|
|
26094
26098
|
}),
|
|
26095
|
-
/* @__PURE__ */ v(
|
|
26099
|
+
/* @__PURE__ */ v(HD, {
|
|
26096
26100
|
trpc: e,
|
|
26097
26101
|
refreshKey: t + T,
|
|
26098
26102
|
clusterModels: x?.clusterModels ?? null,
|
|
@@ -26100,7 +26104,7 @@ function vO({ trpc: e, refreshKey: t }) {
|
|
|
26100
26104
|
onError: w
|
|
26101
26105
|
})
|
|
26102
26106
|
] }),
|
|
26103
|
-
ee && /* @__PURE__ */ v(
|
|
26107
|
+
ee && /* @__PURE__ */ v(ND, {
|
|
26104
26108
|
trpc: e,
|
|
26105
26109
|
nodeId: m,
|
|
26106
26110
|
stepId: ee.row.stepId,
|
|
@@ -26116,13 +26120,13 @@ function vO({ trpc: e, refreshKey: t }) {
|
|
|
26116
26120
|
}
|
|
26117
26121
|
//#endregion
|
|
26118
26122
|
//#region src/tabs/LogsTab.tsx
|
|
26119
|
-
var
|
|
26120
|
-
function
|
|
26123
|
+
var bO = "model-studio";
|
|
26124
|
+
function xO() {
|
|
26121
26125
|
return /* @__PURE__ */ v("div", {
|
|
26122
26126
|
className: "space-y-3",
|
|
26123
26127
|
"data-testid": "logs-tab",
|
|
26124
26128
|
children: /* @__PURE__ */ v(Vl, {
|
|
26125
|
-
addonId:
|
|
26129
|
+
addonId: bO,
|
|
26126
26130
|
limit: 200,
|
|
26127
26131
|
maxHeight: "max-h-[70vh]",
|
|
26128
26132
|
showFilters: !0,
|
|
@@ -26133,23 +26137,23 @@ function bO() {
|
|
|
26133
26137
|
//#endregion
|
|
26134
26138
|
//#region src/page.tsx
|
|
26135
26139
|
e();
|
|
26136
|
-
var
|
|
26140
|
+
var SO = [
|
|
26137
26141
|
{ id: "catalog" },
|
|
26138
26142
|
{ id: "installed" },
|
|
26139
26143
|
{ id: "import" },
|
|
26140
26144
|
{ id: "logs" }
|
|
26141
26145
|
];
|
|
26142
|
-
function
|
|
26146
|
+
function CO(e) {
|
|
26143
26147
|
return e === "library" ? "installed" : e === "convert" || e === "settings" ? "catalog" : e === "import" || e === "catalog" || e === "installed" || e === "logs" ? e : "catalog";
|
|
26144
26148
|
}
|
|
26145
|
-
function
|
|
26149
|
+
function wO(e) {
|
|
26146
26150
|
return `model-studio-tab-${e}`;
|
|
26147
26151
|
}
|
|
26148
|
-
function
|
|
26152
|
+
function TO(e) {
|
|
26149
26153
|
return `model-studio-panel-${e}`;
|
|
26150
26154
|
}
|
|
26151
|
-
function
|
|
26152
|
-
let { t: n } = $(), [r, a] = jS("tab"), [o, s] = jS("source"), c =
|
|
26155
|
+
function EO({ trpc: e }) {
|
|
26156
|
+
let { t: n } = $(), [r, a] = jS("tab"), [o, s] = jS("source"), c = CO(r), u = zE(o), [d, f] = g(0), [p, m] = g(null), h = t(!1), _ = l(() => f((e) => e + 1), []), b = l((e, t = !1) => {
|
|
26153
26157
|
a(e === "catalog" ? null : e), e !== "catalog" && o !== null && (e === "import" || e === "logs" || e === "installed") && s(null), t && (h.current = !0);
|
|
26154
26158
|
}, [
|
|
26155
26159
|
a,
|
|
@@ -26159,7 +26163,7 @@ function TO({ trpc: e }) {
|
|
|
26159
26163
|
s(e === "camstack" ? null : e);
|
|
26160
26164
|
}, [s]);
|
|
26161
26165
|
i(() => {
|
|
26162
|
-
h.current && (h.current = !1, document.getElementById(
|
|
26166
|
+
h.current && (h.current = !1, document.getElementById(wO(c))?.focus());
|
|
26163
26167
|
}, [c]), i(() => {
|
|
26164
26168
|
r === "convert" && a(null), r === "library" && a("installed"), r === "settings" && (a(null), s("frigate")), c !== "catalog" && o !== null && s(null), c === "catalog" && o === "custom" && (a("import"), s(null));
|
|
26165
26169
|
}, [
|
|
@@ -26170,12 +26174,12 @@ function TO({ trpc: e }) {
|
|
|
26170
26174
|
s
|
|
26171
26175
|
]);
|
|
26172
26176
|
let S = l((e) => {
|
|
26173
|
-
let t =
|
|
26177
|
+
let t = SO.map((e) => e.id), n = t.indexOf(c);
|
|
26174
26178
|
if (n < 0) return;
|
|
26175
26179
|
let r;
|
|
26176
26180
|
e.key === "ArrowRight" ? r = t[(n + 1) % t.length] : e.key === "ArrowLeft" ? r = t[(n - 1 + t.length) % t.length] : e.key === "Home" ? r = t[0] : e.key === "End" && (r = t[t.length - 1]), r !== void 0 && (e.preventDefault(), b(r, !0));
|
|
26177
26181
|
}, [c, b]);
|
|
26178
|
-
return /* @__PURE__ */ v(
|
|
26182
|
+
return /* @__PURE__ */ v(_T, { children: /* @__PURE__ */ y(CS, {
|
|
26179
26183
|
icon: wt,
|
|
26180
26184
|
title: n("page.title"),
|
|
26181
26185
|
children: [/* @__PURE__ */ v(Rs, {
|
|
@@ -26186,20 +26190,20 @@ function TO({ trpc: e }) {
|
|
|
26186
26190
|
children: /* @__PURE__ */ v(zs, {
|
|
26187
26191
|
"aria-label": n("page.sections"),
|
|
26188
26192
|
onKeyDown: S,
|
|
26189
|
-
children:
|
|
26190
|
-
id:
|
|
26193
|
+
children: SO.map((e) => /* @__PURE__ */ v(Bs, {
|
|
26194
|
+
id: wO(e.id),
|
|
26191
26195
|
value: e.id,
|
|
26192
|
-
"aria-controls":
|
|
26196
|
+
"aria-controls": TO(e.id),
|
|
26193
26197
|
children: n(`page.tabs.${e.id}`)
|
|
26194
26198
|
}, e.id))
|
|
26195
26199
|
})
|
|
26196
26200
|
}), /* @__PURE__ */ y("div", {
|
|
26197
26201
|
className: "min-h-[400px]",
|
|
26198
26202
|
role: "tabpanel",
|
|
26199
|
-
id:
|
|
26200
|
-
"aria-labelledby":
|
|
26203
|
+
id: TO(c),
|
|
26204
|
+
"aria-labelledby": wO(c),
|
|
26201
26205
|
children: [
|
|
26202
|
-
c === "catalog" && /* @__PURE__ */ v(
|
|
26206
|
+
c === "catalog" && /* @__PURE__ */ v(KE, {
|
|
26203
26207
|
trpc: e,
|
|
26204
26208
|
refreshKey: d,
|
|
26205
26209
|
source: u,
|
|
@@ -26209,20 +26213,20 @@ function TO({ trpc: e }) {
|
|
|
26209
26213
|
m(e), b("import");
|
|
26210
26214
|
}
|
|
26211
26215
|
}),
|
|
26212
|
-
c === "installed" && /* @__PURE__ */ v(
|
|
26216
|
+
c === "installed" && /* @__PURE__ */ v(yO, {
|
|
26213
26217
|
trpc: e,
|
|
26214
26218
|
refreshKey: d
|
|
26215
26219
|
}),
|
|
26216
|
-
c === "import" && /* @__PURE__ */ v(
|
|
26220
|
+
c === "import" && /* @__PURE__ */ v(uD, {
|
|
26217
26221
|
trpc: e,
|
|
26218
26222
|
onRegistered: _,
|
|
26219
26223
|
initialPrefill: p,
|
|
26220
26224
|
onPrefillConsumed: () => m(null)
|
|
26221
26225
|
}),
|
|
26222
|
-
c === "logs" && /* @__PURE__ */ v(
|
|
26226
|
+
c === "logs" && /* @__PURE__ */ v(xO, {})
|
|
26223
26227
|
]
|
|
26224
26228
|
})]
|
|
26225
26229
|
}) });
|
|
26226
26230
|
}
|
|
26227
26231
|
//#endregion
|
|
26228
|
-
export {
|
|
26232
|
+
export { EO as default };
|