lightning-pose-app 1.8.1a4__py3-none-any.whl → 1.8.1a6__py3-none-any.whl

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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: lightning-pose-app
3
- Version: 1.8.1a4
3
+ Version: 1.8.1a6
4
4
  Summary:
5
5
  Requires-Python: >=3.10
6
6
  Classifier: Programming Language :: Python :: 3
@@ -9,11 +9,14 @@ Classifier: Programming Language :: Python :: 3.11
9
9
  Classifier: Programming Language :: Python :: 3.12
10
10
  Classifier: Programming Language :: Python :: 3.13
11
11
  Provides-Extra: dev
12
+ Requires-Dist: apscheduler (>=3.11.0,<3.12.0)
12
13
  Requires-Dist: fastapi (>=0.115.0,<0.116.0)
13
14
  Requires-Dist: honcho (>=2.0,<3.0)
14
15
  Requires-Dist: httpx (>=0.28.0,<0.29.0) ; extra == "dev"
15
16
  Requires-Dist: pytest (>=8.4.0,<8.5.0) ; extra == "dev"
17
+ Requires-Dist: pytest-asyncio (>=1.0.0,<1.1.0) ; extra == "dev"
16
18
  Requires-Dist: pytest-mock (>=3.14.0,<3.15.0) ; extra == "dev"
19
+ Requires-Dist: reactivex (>=4.0.0,<4.1.0)
17
20
  Requires-Dist: tomli (>=2.2.0,<2.3.0)
18
21
  Requires-Dist: tomli_w (>=1.2.0,<1.3.0)
19
22
  Requires-Dist: uvicorn[standard] (>=0.34.0,<0.35.0)
@@ -1,29 +1,29 @@
1
1
  litpose_app/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
2
  litpose_app/config.py,sha256=6ZqU71kILT6q1IdYgvYKthYQa2cY9nMwgHeRih24F6s,861
3
3
  litpose_app/deps.py,sha256=P0o762ufSW-9nqlpYPRtlrxpKBJMzPZ1LLfTDfTl-4U,2552
4
- litpose_app/main.py,sha256=ftSNNRnToLN_DpRb_EfgarrxWhDmMsMX2fku4qNrzAU,5397
4
+ litpose_app/main.py,sha256=5JTig2OUTwz4ulj87osY2dv6jyLK7QWdda8qQFWMbhY,5526
5
5
  litpose_app/ngdist/ng_app/3rdpartylicenses.txt,sha256=8IgJBztx-L-9cLvY7pJB5PSXQJiBowGNUNV7knEAeq0,25355
6
6
  litpose_app/ngdist/ng_app/app.component-UAQUAGNZ.css.map,sha256=e6lXWzmK3xppKK3tXHUccK1yGZqd1kzyTpDH0F1nC2g,344
7
7
  litpose_app/ngdist/ng_app/error-dialog.component-HYLQSJEP.css.map,sha256=zJuF-LfB994Y1IrnIz38mariDFb8yucffbWPXgHGbvw,355
8
8
  litpose_app/ngdist/ng_app/favicon.ico,sha256=QtbXVfx3HI-WqWh_kkBIQyYzJsDmLw_3Y4_UN7pBepE,15406
9
- litpose_app/ngdist/ng_app/index.html,sha256=y1By3uv-f39NnrfG7hmIPhzC0f0FEDY0U70oqmU6NlQ,23004
10
- litpose_app/ngdist/ng_app/main-VCJFCLFP.js,sha256=qKG_Ev1-OoVeTeqIVv9DKN8YmfIp2zn6-gBUNFVW__4,2725077
11
- litpose_app/ngdist/ng_app/main-VCJFCLFP.js.map,sha256=f68Eh0pGhxR0Ol3rkdj4ifPljiw-rnv4JgFBWXsdDmA,5561146
9
+ litpose_app/ngdist/ng_app/index.html,sha256=uAxK4hbyle-UKhyTAsrw1cu58fjjxLeqsncM2B7K5BY,23004
10
+ litpose_app/ngdist/ng_app/main-6XYUWDGZ.js,sha256=YEVSJsmLG2dY2eCysK94fpyH0i_hQeu4HhiMcvNNAUU,2728575
11
+ litpose_app/ngdist/ng_app/main-6XYUWDGZ.js.map,sha256=c9fz2QQcpITVuTOLWnH7Dpwlu7Rs7uu_4mwOaIppXV0,5566423
12
12
  litpose_app/ngdist/ng_app/prerendered-routes.json,sha256=p53cyKEVGQ6cGUee02kUdBp9HbdPChFTUp78gHJVBf4,18
13
13
  litpose_app/ngdist/ng_app/project-settings.component-HKHIVUJR.css.map,sha256=v5tyba9p8ec3ZbHYyyUGTEFdEAsqT0l7JqtGRGjki6w,371
14
- litpose_app/ngdist/ng_app/styles-ZM27COY6.css,sha256=3bpOGHzSsXAbzY4LgMt2d5xCLL0uY2HjdURJj1Rr3r0,69517
15
- litpose_app/ngdist/ng_app/styles-ZM27COY6.css.map,sha256=w1T6js2TzjwM4XKfCmyGpfWeqkqzolJbll3wXCRl8Go,75027
14
+ litpose_app/ngdist/ng_app/styles-GMK322VW.css,sha256=hsx8mqn1GJz1K4hFkWtvdJGepSfwRbKqHBccACeeKWM,71456
15
+ litpose_app/ngdist/ng_app/styles-GMK322VW.css.map,sha256=nMiO7KAXlT-FbMAW50S3-EGO29g-AU2tS4eZPN5GEVk,75475
16
16
  litpose_app/ngdist/ng_app/video-player-controls.component-C4JZHYJ2.css.map,sha256=vX-dgeDCUCPLiea4Qy9O_EBm6IzzwB7R_uSBa0qU5Go,771
17
17
  litpose_app/ngdist/ng_app/video-tile.component-RDL4BSJ4.css.map,sha256=_pZ7FxqOAu535JfrRv1TSKgRpDyQvn9Q0U39KHyJ980,332
18
18
  litpose_app/ngdist/ng_app/viewer-page.component-KDHT6XH5.css.map,sha256=Uf1FgoCiF_qJpD4Ggk34Dq7kM73Q7i7NT6h3m30tbaY,211
19
19
  litpose_app/routes/ffprobe.py,sha256=UVKDu4ghXkYNuzI-91KPMNpQukHV9Goeps7ex_lG_SU,5526
20
20
  litpose_app/routes/files.py,sha256=HHyug226s_M4jMi8q7oI2dTWHTKu_J_c7vIbG0rdk9s,3102
21
21
  litpose_app/routes/project.py,sha256=pQW7zFdGHMy_eE0Z1bIXs9QLkV1-_MwFHsZR51-H6uQ,1957
22
- litpose_app/routes/transcode.py,sha256=9C4mMNgh0W7BHI2gdEnnoxMHVAoXag3eCXYhqOvUte4,2071
22
+ litpose_app/routes/transcode.py,sha256=0p2GmQntbSDlBxhXiH9AeDXs44uRxfa1eiVNqt0LjUk,4848
23
23
  litpose_app/tasks/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
24
- litpose_app/tasks/management.py,sha256=9wKT8i3CE8ueRCP3DpNd21UMy2_3Kn_LMLBp0dGStFc,120
24
+ litpose_app/tasks/management.py,sha256=Z_XYJsy4Mlz_0tQwITsnkPk-ugkMFa4ek6NcFrhTH74,831
25
25
  litpose_app/tasks/transcode_fine.py,sha256=bX8OblwMO_xaXXqZXJmmQPprCYIpPGHiboyEJli6FHs,209
26
- litpose_app/transcode_fine.py,sha256=zJKj1ozTSnmAEOddiqdy3ekRKdEAiNm2oMe9bcx520c,6142
27
- lightning_pose_app-1.8.1a4.dist-info/METADATA,sha256=sIyFToit6PIpDi4jTpjALkGwPXPp-u0l6znOtkpfsIQ,793
28
- lightning_pose_app-1.8.1a4.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
29
- lightning_pose_app-1.8.1a4.dist-info/RECORD,,
26
+ litpose_app/transcode_fine.py,sha256=YVrKg6IxrLEi0mWVWQqt89NHD6IAwYS512mw-4zkp54,6188
27
+ lightning_pose_app-1.8.1a6.dist-info/METADATA,sha256=BNsYWKmm_MrPjv7TS4NIfkM1DpAkhSHvwgIh9G4fejo,945
28
+ lightning_pose_app-1.8.1a6.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
29
+ lightning_pose_app-1.8.1a6.dist-info/RECORD,,
litpose_app/main.py CHANGED
@@ -12,6 +12,7 @@ from starlette.responses import Response
12
12
  from starlette.staticfiles import StaticFiles
13
13
 
14
14
  from . import deps
15
+ from .tasks.management import setup_active_task_registry
15
16
 
16
17
  ## Setup logging
17
18
  logging.basicConfig(
@@ -26,7 +27,9 @@ async def lifespan(app: FastAPI):
26
27
  # Start apscheduler, which is responsible for executing background tasks
27
28
  logger.info("Application startup: Initializing scheduler...")
28
29
  scheduler = deps.scheduler()
30
+ app.state.scheduler = scheduler
29
31
  scheduler.start()
32
+ setup_active_task_registry(app)
30
33
 
31
34
  yield # Application is now ready to receive requests
32
35
 
@@ -445,8 +445,8 @@
445
445
  }
446
446
  }
447
447
  }
448
- </style><link rel="stylesheet" href="/static/styles-ZM27COY6.css" media="print" onload="this.media='all'"><noscript><link rel="stylesheet" href="/static/styles-ZM27COY6.css"></noscript></head>
448
+ </style><link rel="stylesheet" href="/static/styles-GMK322VW.css" media="print" onload="this.media='all'"><noscript><link rel="stylesheet" href="/static/styles-GMK322VW.css"></noscript></head>
449
449
  <body>
450
450
  <app-root></app-root>
451
- <script src="/static/main-VCJFCLFP.js" type="module"></script></body>
451
+ <script src="/static/main-6XYUWDGZ.js" type="module"></script></body>
452
452
  </html>
@@ -40223,10 +40223,19 @@ var SessionService = class _SessionService {
40223
40223
  predictionFiles = [];
40224
40224
  projectInfoService = inject(ProjectInfoService);
40225
40225
  csvParser = inject(CsvParserService);
40226
+ sessionsLoading = signal(false);
40226
40227
  _allSessions = new BehaviorSubject([]);
40227
40228
  allSessions$ = this._allSessions.asObservable();
40228
40229
  allSessions = toSignal(this.allSessions$, { requireSync: true });
40229
40230
  async loadSessions() {
40231
+ try {
40232
+ this.sessionsLoading.set(true);
40233
+ await this._loadSessions();
40234
+ } finally {
40235
+ this.sessionsLoading.set(false);
40236
+ }
40237
+ }
40238
+ async _loadSessions() {
40230
40239
  const projectInfo = this.projectInfoService.projectInfo;
40231
40240
  const response = await this.rpc.call("rglob", {
40232
40241
  baseDir: projectInfo.data_dir,
@@ -54348,12 +54357,72 @@ var ScrollingModule = class _ScrollingModule {
54348
54357
  }], null, null);
54349
54358
  })();
54350
54359
 
54360
+ // src/app/utils/sserx.ts
54361
+ function getEventStream(endpoint) {
54362
+ return new Observable((observer) => {
54363
+ if (typeof EventSource === "undefined") {
54364
+ observer.error("EventSource is not supported by this browser.");
54365
+ return;
54366
+ }
54367
+ const eventSource = new EventSource(`${endpoint}`);
54368
+ eventSource.onmessage = (event) => {
54369
+ console.log("Received SSE message:", event.data);
54370
+ observer.next(JSON.parse(event.data));
54371
+ };
54372
+ eventSource.onerror = (error) => {
54373
+ console.error("SSE Error:", error);
54374
+ if (eventSource.readyState === EventSource.CLOSED) {
54375
+ observer.error("SSE connection closed by server.");
54376
+ } else {
54377
+ observer.error(error);
54378
+ }
54379
+ };
54380
+ return () => {
54381
+ console.log("Closing SSE connection.");
54382
+ eventSource.close();
54383
+ };
54384
+ });
54385
+ }
54386
+
54387
+ // src/app/utils/fine-video.service.ts
54388
+ var FineVideoService = class _FineVideoService {
54389
+ projectInfoService = inject(ProjectInfoService);
54390
+ fineVideoStatus$ = getEventStream("/app/v0/rpc/getFineVideoStatus");
54391
+ numPendingTranscodeTasks = toSignal(this.fineVideoStatus$, {
54392
+ initialValue: { pending: 0 }
54393
+ });
54394
+ fineVideoPath(videoPath) {
54395
+ if (!this.projectInfoService.fineVideoDir) {
54396
+ throw new Error("ProjectInfoService.fineVideoDir called but not yet initialized");
54397
+ }
54398
+ const filename = videoPath.split("/").pop();
54399
+ return "/app/v0/files/" + this.projectInfoService.fineVideoDir + "/" + filename;
54400
+ }
54401
+ static \u0275fac = function FineVideoService_Factory(__ngFactoryType__) {
54402
+ return new (__ngFactoryType__ || _FineVideoService)();
54403
+ };
54404
+ static \u0275prov = /* @__PURE__ */ \u0275\u0275defineInjectable({ token: _FineVideoService, factory: _FineVideoService.\u0275fac, providedIn: "root" });
54405
+ };
54406
+ (() => {
54407
+ (typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(FineVideoService, [{
54408
+ type: Injectable,
54409
+ args: [{
54410
+ providedIn: "root"
54411
+ }]
54412
+ }], null, null);
54413
+ })();
54414
+
54351
54415
  // src/app/viewer/viewer-left-panel/viewer-sessions-panel.component.ts
54352
54416
  var _c03 = (a0) => ["/viewer", a0];
54353
54417
  var _forTrack0 = ($index, $item) => $item.key;
54354
- function ViewerSessionsPanelComponent_For_16_Template(rf, ctx) {
54418
+ function ViewerSessionsPanelComponent_Conditional_5_Template(rf, ctx) {
54419
+ if (rf & 1) {
54420
+ \u0275\u0275element(0, "progress", 3);
54421
+ }
54422
+ }
54423
+ function ViewerSessionsPanelComponent_Conditional_6_For_3_Template(rf, ctx) {
54355
54424
  if (rf & 1) {
54356
- \u0275\u0275elementStart(0, "li", 9)(1, "a", 10);
54425
+ \u0275\u0275elementStart(0, "li", 7)(1, "a", 8);
54357
54426
  \u0275\u0275text(2);
54358
54427
  \u0275\u0275elementEnd()();
54359
54428
  }
@@ -54365,29 +54434,51 @@ function ViewerSessionsPanelComponent_For_16_Template(rf, ctx) {
54365
54434
  \u0275\u0275textInterpolate1(" ", session_r1.key, " ");
54366
54435
  }
54367
54436
  }
54437
+ function ViewerSessionsPanelComponent_Conditional_6_Template(rf, ctx) {
54438
+ if (rf & 1) {
54439
+ \u0275\u0275elementStart(0, "div", 4)(1, "ul", 6);
54440
+ \u0275\u0275repeaterCreate(2, ViewerSessionsPanelComponent_Conditional_6_For_3_Template, 3, 4, "li", 7, _forTrack0);
54441
+ \u0275\u0275elementEnd()();
54442
+ }
54443
+ if (rf & 2) {
54444
+ const ctx_r1 = \u0275\u0275nextContext();
54445
+ \u0275\u0275advance(2);
54446
+ \u0275\u0275repeater(ctx_r1.sessionService.allSessions());
54447
+ }
54448
+ }
54449
+ function ViewerSessionsPanelComponent_Conditional_7_Template(rf, ctx) {
54450
+ if (rf & 1) {
54451
+ \u0275\u0275elementStart(0, "div", 5)(1, "span", 9);
54452
+ \u0275\u0275text(2, "info_i");
54453
+ \u0275\u0275elementEnd();
54454
+ \u0275\u0275elementStart(3, "span");
54455
+ \u0275\u0275text(4, "Videos will populate once they are transcoded.");
54456
+ \u0275\u0275elementEnd()();
54457
+ }
54458
+ }
54368
54459
  var ViewerSessionsPanelComponent = class _ViewerSessionsPanelComponent {
54369
54460
  sessionService = inject(SessionService);
54461
+ fineVideoService = inject(FineVideoService);
54370
54462
  static \u0275fac = function ViewerSessionsPanelComponent_Factory(__ngFactoryType__) {
54371
54463
  return new (__ngFactoryType__ || _ViewerSessionsPanelComponent)();
54372
54464
  };
54373
- static \u0275cmp = /* @__PURE__ */ \u0275\u0275defineComponent({ type: _ViewerSessionsPanelComponent, selectors: [["app-sessions-panel"]], decls: 17, vars: 0, consts: [[1, "flex", "justify-between"], [1, "px-2"], [1, "dropdown", "dropdown-end"], [1, "btn", "btn-xs", "btn-ghost"], [1, "material-icons", "text-base!"], ["tabindex", "0", 1, "dropdown-content", "menu", "menu-sm", "bg-base-100", "z-40", "w-52", "p-2", "shadow-sm"], [1, "panel-content", "inset-shadow-xs", "inset-shadow-black/30"], [1, "overflow-x-auto"], ["tabindex", "0", "role", "listbox", 1, "w-fit", "relative"], ["routerLinkActive", "bg-sky-700", 1, "text-nowrap"], ["role", "option", 1, "p-1", "block", "hover:bg-base-content/10", "rounded-sm", 3, "routerLink"]], template: function ViewerSessionsPanelComponent_Template(rf, ctx) {
54465
+ static \u0275cmp = /* @__PURE__ */ \u0275\u0275defineComponent({ type: _ViewerSessionsPanelComponent, selectors: [["app-sessions-panel"]], decls: 8, vars: 2, consts: [[1, "flex", "justify-between"], [1, "px-2"], [1, "panel-content", "inset-shadow-xs", "inset-shadow-black/30", "overflow-y-auto", "h-120"], [1, "progress", "w-full"], [1, "overflow-x-auto"], [1, "text-sm", "flex"], ["tabindex", "0", "role", "listbox", 1, "w-fit", "relative"], ["routerLinkActive", "bg-sky-700", 1, "text-nowrap"], ["role", "option", 1, "p-1", "block", "hover:bg-base-content/10", "rounded-sm", 3, "routerLink"], [1, "material-icons", "!text-sm", "max-w-4"]], template: function ViewerSessionsPanelComponent_Template(rf, ctx) {
54374
54466
  if (rf & 1) {
54375
54467
  \u0275\u0275elementStart(0, "div", 0)(1, "h1", 1);
54376
54468
  \u0275\u0275text(2, "Sessions");
54377
54469
  \u0275\u0275elementEnd();
54378
- \u0275\u0275elementStart(3, "div")(4, "div", 2)(5, "button", 3)(6, "span", 4);
54379
- \u0275\u0275text(7, "more_vert");
54380
- \u0275\u0275elementEnd()();
54381
- \u0275\u0275elementStart(8, "ul", 5)(9, "li")(10, "a");
54382
- \u0275\u0275text(11, "Change grouping rule");
54383
- \u0275\u0275elementEnd()()()()()();
54384
- \u0275\u0275elementStart(12, "div", 6)(13, "div", 7)(14, "ul", 8);
54385
- \u0275\u0275repeaterCreate(15, ViewerSessionsPanelComponent_For_16_Template, 3, 4, "li", 9, _forTrack0);
54386
- \u0275\u0275elementEnd()()();
54470
+ \u0275\u0275element(3, "div");
54471
+ \u0275\u0275elementEnd();
54472
+ \u0275\u0275elementStart(4, "div", 2);
54473
+ \u0275\u0275template(5, ViewerSessionsPanelComponent_Conditional_5_Template, 1, 0, "progress", 3)(6, ViewerSessionsPanelComponent_Conditional_6_Template, 4, 0, "div", 4);
54474
+ \u0275\u0275elementEnd();
54475
+ \u0275\u0275template(7, ViewerSessionsPanelComponent_Conditional_7_Template, 5, 0, "div", 5);
54387
54476
  }
54388
54477
  if (rf & 2) {
54389
- \u0275\u0275advance(15);
54390
- \u0275\u0275repeater(ctx.sessionService.allSessions());
54478
+ \u0275\u0275advance(5);
54479
+ \u0275\u0275conditional(ctx.sessionService.sessionsLoading() ? 5 : 6);
54480
+ \u0275\u0275advance(2);
54481
+ \u0275\u0275conditional(ctx.fineVideoService.numPendingTranscodeTasks().pending > 0 ? 7 : -1);
54391
54482
  }
54392
54483
  }, dependencies: [RouterLink, RouterLinkActive, MatListModule, ScrollingModule], encapsulation: 2, changeDetection: 0 });
54393
54484
  };
@@ -54399,7 +54490,9 @@ var ViewerSessionsPanelComponent = class _ViewerSessionsPanelComponent {
54399
54490
  <!--header row-->
54400
54491
  <h1 class="px-2">Sessions</h1>
54401
54492
  <div>
54402
- <!-- right side of section -->
54493
+ <!-- right side of sessions header -->
54494
+ <!-- Add three dots dropdown with "change grouping rule". Stashed. -->
54495
+ <!--
54403
54496
  <div class="dropdown dropdown-end">
54404
54497
  <button class="btn btn-xs btn-ghost">
54405
54498
  <span class="material-icons text-base!">more_vert</span>
@@ -54411,31 +54504,44 @@ var ViewerSessionsPanelComponent = class _ViewerSessionsPanelComponent {
54411
54504
  <li><a>Change grouping rule</a></li>
54412
54505
  </ul>
54413
54506
  </div>
54507
+ -->
54414
54508
  </div>
54415
54509
  </div>
54416
- <div class="panel-content inset-shadow-xs inset-shadow-black/30">
54417
- <!--panel content-->
54418
- <div class="overflow-x-auto">
54419
- <ul class="w-fit relative" tabindex="0" role="listbox">
54420
- @for (session of sessionService.allSessions(); track session.key) {
54421
- <li class="text-nowrap" routerLinkActive="bg-sky-700">
54422
- <a
54423
- role="option"
54424
- class="p-1 block hover:bg-base-content/10 rounded-sm"
54425
- [routerLink]="['/viewer', session.key]"
54426
- >
54427
- {{ session.key }}
54428
- </a>
54429
- </li>
54430
- }
54431
- </ul>
54432
- </div>
54510
+ <div
54511
+ class="panel-content inset-shadow-xs inset-shadow-black/30 overflow-y-auto h-120"
54512
+ >
54513
+ @if (sessionService.sessionsLoading()) {
54514
+ <progress class="progress w-full"></progress>
54515
+ } @else {
54516
+ <!--panel content-->
54517
+ <div class="overflow-x-auto">
54518
+ <ul class="w-fit relative" tabindex="0" role="listbox">
54519
+ @for (session of sessionService.allSessions(); track session.key) {
54520
+ <li class="text-nowrap" routerLinkActive="bg-sky-700">
54521
+ <a
54522
+ role="option"
54523
+ class="p-1 block hover:bg-base-content/10 rounded-sm"
54524
+ [routerLink]="['/viewer', session.key]"
54525
+ >
54526
+ {{ session.key }}
54527
+ </a>
54528
+ </li>
54529
+ }
54530
+ </ul>
54531
+ </div>
54532
+ }
54433
54533
  </div>
54534
+ @if (fineVideoService.numPendingTranscodeTasks().pending > 0) {
54535
+ <div class="text-sm flex">
54536
+ <span class="material-icons !text-sm max-w-4">info_i</span>
54537
+ <span>Videos will populate once they are transcoded.</span>
54538
+ </div>
54539
+ }
54434
54540
  ` }]
54435
54541
  }], null, null);
54436
54542
  })();
54437
54543
  (() => {
54438
- (typeof ngDevMode === "undefined" || ngDevMode) && \u0275setClassDebugInfo(ViewerSessionsPanelComponent, { className: "ViewerSessionsPanelComponent", filePath: "src/app/viewer/viewer-left-panel/viewer-sessions-panel.component.ts", lineNumber: 24 });
54544
+ (typeof ngDevMode === "undefined" || ngDevMode) && \u0275setClassDebugInfo(ViewerSessionsPanelComponent, { className: "ViewerSessionsPanelComponent", filePath: "src/app/viewer/viewer-left-panel/viewer-sessions-panel.component.ts", lineNumber: 25 });
54439
54545
  })();
54440
54546
 
54441
54547
  // src/app/view-settings.model.ts
@@ -59050,30 +59156,6 @@ var Pair = class _Pair {
59050
59156
  }
59051
59157
  };
59052
59158
 
59053
- // src/app/utils/fine-video.service.ts
59054
- var FineVideoService = class _FineVideoService {
59055
- projectInfoService = inject(ProjectInfoService);
59056
- fineVideoPath(videoPath) {
59057
- if (!this.projectInfoService.fineVideoDir) {
59058
- throw new Error("ProjectInfoService.fineVideoDir called but not yet initialized");
59059
- }
59060
- const filename = videoPath.split("/").pop();
59061
- return "/app/v0/files/" + this.projectInfoService.fineVideoDir + "/" + filename;
59062
- }
59063
- static \u0275fac = function FineVideoService_Factory(__ngFactoryType__) {
59064
- return new (__ngFactoryType__ || _FineVideoService)();
59065
- };
59066
- static \u0275prov = /* @__PURE__ */ \u0275\u0275defineInjectable({ token: _FineVideoService, factory: _FineVideoService.\u0275fac, providedIn: "root" });
59067
- };
59068
- (() => {
59069
- (typeof ngDevMode === "undefined" || ngDevMode) && setClassMetadata(FineVideoService, [{
59070
- type: Injectable,
59071
- args: [{
59072
- providedIn: "root"
59073
- }]
59074
- }], null, null);
59075
- })();
59076
-
59077
59159
  // src/app/viewer/viewer-center-panel/viewer-center-panel.component.ts
59078
59160
  var _forTrack03 = ($index, $item) => $item.videoSrc;
59079
59161
  function ViewerCenterPanelComponent_For_3_Template(rf, ctx) {
@@ -66343,31 +66425,38 @@ view2
66343
66425
 
66344
66426
  // src/app/app.component.ts
66345
66427
  var _c08 = ["settingsDialog"];
66346
- function AppComponent_Conditional_18_Template(rf, ctx) {
66428
+ function AppComponent_Conditional_14_Template(rf, ctx) {
66347
66429
  if (rf & 1) {
66348
- \u0275\u0275element(0, "router-outlet");
66430
+ \u0275\u0275elementStart(0, "div", 9);
66431
+ \u0275\u0275element(1, "span", 15);
66432
+ \u0275\u0275elementEnd();
66349
66433
  }
66350
66434
  }
66351
66435
  function AppComponent_Conditional_19_Template(rf, ctx) {
66352
66436
  if (rf & 1) {
66353
- \u0275\u0275element(0, "app-project-settings", 12);
66437
+ \u0275\u0275element(0, "router-outlet");
66438
+ }
66439
+ }
66440
+ function AppComponent_Conditional_20_Template(rf, ctx) {
66441
+ if (rf & 1) {
66442
+ \u0275\u0275element(0, "app-project-settings", 13);
66354
66443
  }
66355
66444
  if (rf & 2) {
66356
66445
  \u0275\u0275property("setupMode", true);
66357
66446
  }
66358
66447
  }
66359
- function AppComponent_Conditional_22_Template(rf, ctx) {
66448
+ function AppComponent_Conditional_23_Template(rf, ctx) {
66360
66449
  if (rf & 1) {
66361
66450
  const _r2 = \u0275\u0275getCurrentView();
66362
- \u0275\u0275elementStart(0, "app-project-settings", 14);
66363
- \u0275\u0275listener("done", function AppComponent_Conditional_22_Template_app_project_settings_done_0_listener() {
66451
+ \u0275\u0275elementStart(0, "app-project-settings", 16);
66452
+ \u0275\u0275listener("done", function AppComponent_Conditional_23_Template_app_project_settings_done_0_listener() {
66364
66453
  \u0275\u0275restoreView(_r2);
66365
66454
  const ctx_r2 = \u0275\u0275nextContext();
66366
66455
  return \u0275\u0275resetView(ctx_r2.settingsDialogOpen.set(false));
66367
66456
  });
66368
66457
  \u0275\u0275elementEnd();
66369
- \u0275\u0275elementStart(1, "div", 15)(2, "button", 16);
66370
- \u0275\u0275listener("click", function AppComponent_Conditional_22_Template_button_click_2_listener() {
66458
+ \u0275\u0275elementStart(1, "div", 17)(2, "button", 18);
66459
+ \u0275\u0275listener("click", function AppComponent_Conditional_23_Template_button_click_2_listener() {
66371
66460
  \u0275\u0275restoreView(_r2);
66372
66461
  const ctx_r2 = \u0275\u0275nextContext();
66373
66462
  return \u0275\u0275resetView(ctx_r2.settingsDialogOpen.set(false));
@@ -66378,6 +66467,7 @@ function AppComponent_Conditional_22_Template(rf, ctx) {
66378
66467
  }
66379
66468
  var AppComponent = class _AppComponent {
66380
66469
  projectInfoService = inject(ProjectInfoService);
66470
+ fineVideoService = inject(FineVideoService);
66381
66471
  // Whether the required initial setup has been done.
66382
66472
  // (Setting data directory, model directory, views).
66383
66473
  projectInfoRequestCompleted = signal(false);
@@ -66416,7 +66506,7 @@ var AppComponent = class _AppComponent {
66416
66506
  if (rf & 2) {
66417
66507
  \u0275\u0275queryAdvance();
66418
66508
  }
66419
- }, decls: 23, vars: 4, consts: [["settingsDialog", ""], [1, "navbar", "bg-base-200", "shadow-lg"], [1, "navbar-start"], [1, "text-lg", "font-semibold"], [1, "navbar-center"], [1, "menu", "menu-horizontal", "p-0"], ["routerLink", "/viewer", "routerLinkActive", "menu-active", "ariaCurrentWhenActive", "page"], ["routerLink", "/labeler", "routerLinkActive", "menu-active", "ariaCurrentWhenActive", "page"], [1, "navbar-end"], ["tabindex", "0", 1, "btn", "btn-ghost", 3, "click", "keydown.enter"], [1, "material-icons"], [1, "flex-grow", "flex", "min-h-0"], [1, "w-lg", "mt-8", 3, "setupMode"], [1, "modal"], [1, "modal-box", 3, "done"], [1, "modal-backdrop"], [3, "click"]], template: function AppComponent_Template(rf, ctx) {
66509
+ }, decls: 24, vars: 5, consts: [["settingsDialog", ""], [1, "navbar", "bg-base-200", "shadow-lg"], [1, "navbar-start"], [1, "text-lg", "font-semibold"], [1, "navbar-center"], [1, "menu", "menu-horizontal", "p-0"], ["routerLink", "/viewer", "routerLinkActive", "menu-active", "ariaCurrentWhenActive", "page"], ["routerLink", "/labeler", "routerLinkActive", "menu-active", "ariaCurrentWhenActive", "page"], [1, "navbar-end"], ["data-tip", "Transcoding videos...", 1, "tooltip", "tooltip-left"], ["tabindex", "0", 1, "btn", "btn-ghost", 3, "click", "keydown.enter"], [1, "material-icons"], [1, "flex-grow", "flex", "min-h-0"], [1, "w-lg", "mt-8", 3, "setupMode"], [1, "modal"], [1, "loading", "loading-bars", "loading-xs"], [1, "modal-box", 3, "done"], [1, "modal-backdrop"], [3, "click"]], template: function AppComponent_Template(rf, ctx) {
66420
66510
  if (rf & 1) {
66421
66511
  const _r1 = \u0275\u0275getCurrentView();
66422
66512
  \u0275\u0275elementStart(0, "header")(1, "nav", 1)(2, "div", 2)(3, "span", 3);
@@ -66428,31 +66518,35 @@ var AppComponent = class _AppComponent {
66428
66518
  \u0275\u0275elementStart(10, "li")(11, "a", 7);
66429
66519
  \u0275\u0275text(12, "Labeler");
66430
66520
  \u0275\u0275elementEnd()()()();
66431
- \u0275\u0275elementStart(13, "div", 8)(14, "button", 9);
66432
- \u0275\u0275listener("click", function AppComponent_Template_button_click_14_listener() {
66521
+ \u0275\u0275elementStart(13, "div", 8);
66522
+ \u0275\u0275template(14, AppComponent_Conditional_14_Template, 2, 0, "div", 9);
66523
+ \u0275\u0275elementStart(15, "button", 10);
66524
+ \u0275\u0275listener("click", function AppComponent_Template_button_click_15_listener() {
66433
66525
  \u0275\u0275restoreView(_r1);
66434
66526
  return \u0275\u0275resetView(ctx.settingsDialogOpen.set(true));
66435
- })("keydown.enter", function AppComponent_Template_button_keydown_enter_14_listener() {
66527
+ })("keydown.enter", function AppComponent_Template_button_keydown_enter_15_listener() {
66436
66528
  \u0275\u0275restoreView(_r1);
66437
66529
  return \u0275\u0275resetView(ctx.settingsDialogOpen.set(true));
66438
66530
  });
66439
- \u0275\u0275elementStart(15, "span", 10);
66440
- \u0275\u0275text(16, "settings");
66531
+ \u0275\u0275elementStart(16, "span", 11);
66532
+ \u0275\u0275text(17, "settings");
66441
66533
  \u0275\u0275elementEnd()()()()();
66442
- \u0275\u0275elementStart(17, "main", 11);
66443
- \u0275\u0275template(18, AppComponent_Conditional_18_Template, 1, 0, "router-outlet")(19, AppComponent_Conditional_19_Template, 1, 1, "app-project-settings", 12);
66534
+ \u0275\u0275elementStart(18, "main", 12);
66535
+ \u0275\u0275template(19, AppComponent_Conditional_19_Template, 1, 0, "router-outlet")(20, AppComponent_Conditional_20_Template, 1, 1, "app-project-settings", 13);
66444
66536
  \u0275\u0275elementEnd();
66445
- \u0275\u0275elementStart(20, "dialog", 13, 0);
66446
- \u0275\u0275template(22, AppComponent_Conditional_22_Template, 4, 0);
66537
+ \u0275\u0275elementStart(21, "dialog", 14, 0);
66538
+ \u0275\u0275template(23, AppComponent_Conditional_23_Template, 4, 0);
66447
66539
  \u0275\u0275elementEnd();
66448
66540
  }
66449
66541
  if (rf & 2) {
66450
- \u0275\u0275advance(17);
66542
+ \u0275\u0275advance(14);
66543
+ \u0275\u0275conditional(ctx.fineVideoService.numPendingTranscodeTasks().pending > 0 ? 14 : -1);
66544
+ \u0275\u0275advance(4);
66451
66545
  \u0275\u0275classProp("justify-center", !ctx.hasBeenSetup());
66452
66546
  \u0275\u0275advance();
66453
- \u0275\u0275conditional(ctx.hasBeenSetup() ? 18 : 19);
66547
+ \u0275\u0275conditional(ctx.hasBeenSetup() ? 19 : 20);
66454
66548
  \u0275\u0275advance(4);
66455
- \u0275\u0275conditional(ctx.settingsDialogOpen() ? 22 : -1);
66549
+ \u0275\u0275conditional(ctx.settingsDialogOpen() ? 23 : -1);
66456
66550
  }
66457
66551
  }, dependencies: [
66458
66552
  RouterOutlet,
@@ -66469,13 +66563,13 @@ var AppComponent = class _AppComponent {
66469
66563
  RouterLink,
66470
66564
  RouterLinkActive,
66471
66565
  ProjectSettingsComponent
66472
- ], changeDetection: ChangeDetectionStrategy.OnPush, template: '<style>\n :host {\n display: flex;\n flex-direction: column;\n height: 100vh;\n }\n .navbar {\n min-height: 3rem; /* reduce from default of 4rem */\n }\n</style>\n<header>\n <nav class="navbar bg-base-200 shadow-lg">\n <div class="navbar-start">\n <span class="text-lg font-semibold">Lightning Pose</span>\n </div>\n\n <div class="navbar-center">\n <ul class="menu menu-horizontal p-0">\n <li>\n <a\n routerLink="/viewer"\n routerLinkActive="menu-active"\n ariaCurrentWhenActive="page"\n >Viewer</a\n >\n </li>\n <li>\n <a\n routerLink="/labeler"\n routerLinkActive="menu-active"\n ariaCurrentWhenActive="page"\n >Labeler</a\n >\n </li>\n </ul>\n </div>\n\n <div class="navbar-end">\n <button\n class="btn btn-ghost"\n tabindex="0"\n (click)="settingsDialogOpen.set(true)"\n (keydown.enter)="settingsDialogOpen.set(true)"\n >\n <span class="material-icons">settings</span>\n </button>\n </div>\n </nav>\n</header>\n\n<!-- Set min-height: 0 to allow it to shrink if its content is too large.\n Default min-height for flex items is auto. -->\n<main class="flex-grow flex min-h-0" [class.justify-center]="!hasBeenSetup()">\n @if (hasBeenSetup()) {\n <router-outlet />\n } @else {\n <app-project-settings\n [setupMode]="true"\n class="w-lg mt-8"\n ></app-project-settings>\n }\n</main>\n\n<!-- Settings dialog -->\n<dialog #settingsDialog class="modal">\n @if (settingsDialogOpen()) {\n <app-project-settings\n class="modal-box"\n (done)="settingsDialogOpen.set(false)"\n ></app-project-settings>\n\n <!-- Makes the dialog close when clicked from outside. -->\n <div class="modal-backdrop">\n <button (click)="settingsDialogOpen.set(false)">close</button>\n </div>\n }\n</dialog>\n', styles: ["/* angular:styles/component:css;22d8514f1dd5b50f33b3fb93fdb69668f78eeb349bd672e238e3ac9acfbbda19;/home/ksikka/work/lightning-pose-app/web_ui/src/app/app.component.html */\n:host {\n display: flex;\n flex-direction: column;\n height: 100vh;\n}\n.navbar {\n min-height: 3rem;\n}\n/*# sourceMappingURL=/static/app.component-UAQUAGNZ.css.map */\n"] }]
66566
+ ], changeDetection: ChangeDetectionStrategy.OnPush, template: '<style>\n :host {\n display: flex;\n flex-direction: column;\n height: 100vh;\n }\n .navbar {\n min-height: 3rem; /* reduce from default of 4rem */\n }\n</style>\n<header>\n <nav class="navbar bg-base-200 shadow-lg">\n <div class="navbar-start">\n <span class="text-lg font-semibold">Lightning Pose</span>\n </div>\n\n <div class="navbar-center">\n <ul class="menu menu-horizontal p-0">\n <li>\n <a\n routerLink="/viewer"\n routerLinkActive="menu-active"\n ariaCurrentWhenActive="page"\n >Viewer</a\n >\n </li>\n <li>\n <a\n routerLink="/labeler"\n routerLinkActive="menu-active"\n ariaCurrentWhenActive="page"\n >Labeler</a\n >\n </li>\n </ul>\n </div>\n\n <div class="navbar-end">\n @if (fineVideoService.numPendingTranscodeTasks().pending > 0) {\n <div class="tooltip tooltip-left" data-tip="Transcoding videos...">\n <span class="loading loading-bars loading-xs"></span>\n </div>\n }\n\n <button\n class="btn btn-ghost"\n tabindex="0"\n (click)="settingsDialogOpen.set(true)"\n (keydown.enter)="settingsDialogOpen.set(true)"\n >\n <span class="material-icons">settings</span>\n </button>\n </div>\n </nav>\n</header>\n\n<!-- Set min-height: 0 to allow it to shrink if its content is too large.\n Default min-height for flex items is auto. -->\n<main class="flex-grow flex min-h-0" [class.justify-center]="!hasBeenSetup()">\n @if (hasBeenSetup()) {\n <router-outlet />\n } @else {\n <app-project-settings\n [setupMode]="true"\n class="w-lg mt-8"\n ></app-project-settings>\n }\n</main>\n\n<!-- Settings dialog -->\n<dialog #settingsDialog class="modal">\n @if (settingsDialogOpen()) {\n <app-project-settings\n class="modal-box"\n (done)="settingsDialogOpen.set(false)"\n ></app-project-settings>\n\n <!-- Makes the dialog close when clicked from outside. -->\n <div class="modal-backdrop">\n <button (click)="settingsDialogOpen.set(false)">close</button>\n </div>\n }\n</dialog>\n', styles: ["/* angular:styles/component:css;22d8514f1dd5b50f33b3fb93fdb69668f78eeb349bd672e238e3ac9acfbbda19;/home/ksikka/work/lightning-pose-app/web_ui/src/app/app.component.html */\n:host {\n display: flex;\n flex-direction: column;\n height: 100vh;\n}\n.navbar {\n min-height: 3rem;\n}\n/*# sourceMappingURL=/static/app.component-UAQUAGNZ.css.map */\n"] }]
66473
66567
  }], () => [], null);
66474
66568
  })();
66475
66569
  (() => {
66476
- (typeof ngDevMode === "undefined" || ngDevMode) && \u0275setClassDebugInfo(AppComponent, { className: "AppComponent", filePath: "src/app/app.component.ts", lineNumber: 27 });
66570
+ (typeof ngDevMode === "undefined" || ngDevMode) && \u0275setClassDebugInfo(AppComponent, { className: "AppComponent", filePath: "src/app/app.component.ts", lineNumber: 28 });
66477
66571
  })();
66478
66572
 
66479
66573
  // src/main.ts
66480
66574
  bootstrapApplication(AppComponent, appConfig).catch((err) => console.error(err));
66481
- //# sourceMappingURL=main-VCJFCLFP.js.map
66575
+ //# sourceMappingURL=main-6XYUWDGZ.js.map