create-pmos 0.398.0 → 0.400.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (515) hide show
  1. package/package.json +30 -25
  2. package/payload/KIT-VERSION +1 -1
  3. package/payload/planning/evals/eval-calibration.md +1 -1
  4. package/payload/planning/okrs/health-budgets.md +1 -1
  5. package/payload/state/discoveries.md +1 -1
  6. package/workspace/briefing-premium-adddoc-test.js +19 -15
  7. package/workspace/briefing-premium-board-test.js +82 -50
  8. package/workspace/briefing-premium-calendar-2-test.js +36 -36
  9. package/workspace/briefing-premium-calendar-3-test.js +39 -39
  10. package/workspace/briefing-premium-calendar-test.js +23 -24
  11. package/workspace/briefing-premium-doc-edit-test.js +8 -10
  12. package/workspace/briefing-premium-initiative-test.js +38 -16
  13. package/workspace/briefing-premium-insights-test.js +114 -37
  14. package/workspace/briefing-premium-metrics-test.js +6 -4
  15. package/workspace/briefing-premium-products-test.js +10 -7
  16. package/workspace/briefing-premium-sources-test.js +25 -22
  17. package/workspace/briefing-premium-test.js +48 -43
  18. package/workspace/briefing-premium-work-test.js +16 -11
  19. package/workspace/c3-capture-test.js +0 -17
  20. package/workspace/changelog.json +29 -0
  21. package/workspace/ev-everywhere-test.js +210 -0
  22. package/workspace/fixtures/premium-viewer-fixtures.js +11 -6
  23. package/workspace/guide/briefing-premium.md +2 -2
  24. package/workspace/guide/home.md +58 -19
  25. package/workspace/guide/index.md +1 -1
  26. package/workspace/guide/layout.md +2 -2
  27. package/workspace/guide/notes.md +2 -2
  28. package/workspace/guide/phone-companion.md +1 -1
  29. package/workspace/lib/board-grill.js +63 -0
  30. package/workspace/lib/board-premium.js +36 -5
  31. package/workspace/lib/initiative-layout.js +77 -0
  32. package/workspace/lib/insights-premium.js +3 -2
  33. package/workspace/lib/insights-records.js +21 -7
  34. package/workspace/lib/meeting-points.js +52 -0
  35. package/workspace/lib/news-for-you.js +88 -0
  36. package/workspace/lib/notes-series.js +29 -6
  37. package/workspace/lib/report-confirm.js +48 -0
  38. package/workspace/lib/route-modules.js +9 -9
  39. package/workspace/lib/routes-board-docs.js +46 -0
  40. package/workspace/lib/routes-board-grill.js +90 -0
  41. package/workspace/lib/routes-home-review.js +108 -0
  42. package/workspace/lib/routes-initiative-layout.js +57 -0
  43. package/workspace/lib/routes-insights-premium.js +4 -1
  44. package/workspace/lib/routes-insights-records.js +8 -4
  45. package/workspace/lib/routes-meeting-points.js +37 -0
  46. package/workspace/lib/routes-news.js +57 -0
  47. package/workspace/lib/routes-notes.js +2 -1
  48. package/workspace/lib/routes-phone-day.js +18 -9
  49. package/workspace/lib/routes-report-confirm.js +31 -0
  50. package/workspace/lib/routes-search.js +38 -0
  51. package/workspace/lib/routes-slash.js +95 -0
  52. package/workspace/lib/search-index.js +176 -0
  53. package/workspace/package-lock.json +2 -2
  54. package/workspace/package.json +1 -2
  55. package/workspace/premium-board-actions-test.js +86 -50
  56. package/workspace/premium-briefing-depth-test.js +55 -54
  57. package/workspace/premium-chat-chart-tab-test.js +4 -2
  58. package/workspace/premium-chat-goal-view-test.js +1 -1
  59. package/workspace/premium-chat-report-tab-test.js +16 -2
  60. package/workspace/premium-chat-term-test.js +0 -10
  61. package/workspace/premium-core-doc-issue-test.js +15 -13
  62. package/workspace/premium-menu-rows-test.js +1 -1
  63. package/workspace/premium-phone-card-test.js +7 -5
  64. package/workspace/premium-report-read-test.js +55 -18
  65. package/workspace/premium-vw-backlog-test.js +2 -2
  66. package/workspace/premium-vw-cal-test.js +50 -35
  67. package/workspace/premium-vw-doc-test.js +10 -11
  68. package/workspace/premium-vw-item-test.js +1 -1
  69. package/workspace/premium-vw-jira-test.js +2 -2
  70. package/workspace/premium-vw-meet-test.js +37 -40
  71. package/workspace/premium-vw-notes-test.js +21 -19
  72. package/workspace/premium-vw-rec-test.js +11 -12
  73. package/workspace/premium-welcome-test.js +3 -3
  74. package/workspace/premium-work-depth-test.js +5 -6
  75. package/workspace/public/capture.html +23 -0
  76. package/workspace/public/pm/bd-acts.js +303 -225
  77. package/workspace/public/pm/bd-asks.js +261 -0
  78. package/workspace/public/pm/bd-pop.js +59 -0
  79. package/workspace/public/pm/bd-span.js +49 -13
  80. package/workspace/public/pm/bd-views.js +169 -0
  81. package/workspace/public/pm/c3-base.js +47 -0
  82. package/workspace/public/pm/c3-capture.js +1 -1
  83. package/workspace/public/pm/c3-ini-ui.js +1 -1
  84. package/workspace/public/pm/c3-sheet.js +1 -1
  85. package/workspace/public/pm/c3-toast.js +1 -1
  86. package/workspace/public/pm/console3.css +3 -0
  87. package/workspace/public/pm/cozy-board.css +301 -0
  88. package/workspace/public/pm/cozy-ev.css +228 -0
  89. package/workspace/public/pm/cozy-evmodel.js +106 -0
  90. package/workspace/public/pm/cozy-evui.js +47 -0
  91. package/workspace/public/pm/cozy-home.css +20 -5
  92. package/workspace/public/pm/cozy-insights.css +148 -10
  93. package/workspace/public/pm/cozy-nav.js +103 -39
  94. package/workspace/public/pm/cozy-news.js +140 -0
  95. package/workspace/public/pm/cozy-search.js +203 -0
  96. package/workspace/public/pm/cozy-settings.js +198 -0
  97. package/workspace/public/pm/cozy-sources.js +89 -0
  98. package/workspace/public/pm/cozy-today.css +220 -0
  99. package/workspace/public/pm/cozy-viewer.js +5 -2
  100. package/workspace/public/pm/cozy-vw-mtg.css +350 -0
  101. package/workspace/public/pm/cozy-vw-rp.css +152 -0
  102. package/workspace/public/pm/cozy.css +9 -0
  103. package/workspace/public/pm/goal-chat.js +5 -1
  104. package/workspace/public/pm/home-adddoc.js +5 -5
  105. package/workspace/public/pm/home-app.js +365 -70
  106. package/workspace/public/pm/home-around.js +24 -126
  107. package/workspace/public/pm/home-chat.js +77 -18
  108. package/workspace/public/pm/home-data.js +9 -7
  109. package/workspace/public/pm/home-dictate.js +57 -0
  110. package/workspace/public/pm/home-draft.js +6 -6
  111. package/workspace/public/pm/home-ini-model.js +190 -0
  112. package/workspace/public/pm/home-ini.css +171 -0
  113. package/workspace/public/pm/home-ini.js +466 -0
  114. package/workspace/public/pm/home-list.js +289 -0
  115. package/workspace/public/pm/home-more.js +18 -135
  116. package/workspace/public/pm/home-phone-card.js +13 -8
  117. package/workspace/public/pm/home-review.js +103 -0
  118. package/workspace/public/pm/home-task.js +67 -0
  119. package/workspace/public/pm/home-today.js +148 -0
  120. package/workspace/public/pm/home-work.js +63 -28
  121. package/workspace/public/pm/note-dock.js +1 -2
  122. package/workspace/public/pm/notes-links.js +1 -2
  123. package/workspace/public/pm/notes-task.js +3 -4
  124. package/workspace/public/pm/premium-board.js +164 -40
  125. package/workspace/public/pm/premium-chart-tab.js +4 -5
  126. package/workspace/public/pm/premium-first.js +5 -7
  127. package/workspace/public/pm/premium-initiative-head.js +3 -3
  128. package/workspace/public/pm/premium-insights.js +499 -202
  129. package/workspace/public/pm/premium-mtg-present.js +138 -0
  130. package/workspace/public/pm/premium-mtg-replay.js +142 -0
  131. package/workspace/public/pm/premium-report-read.js +216 -52
  132. package/workspace/public/pm/premium-report-tab.js +44 -19
  133. package/workspace/public/pm/premium-shell.js +7 -7
  134. package/workspace/public/pm/premium-vw-cal.js +150 -60
  135. package/workspace/public/pm/premium-vw-doc.css +20 -2
  136. package/workspace/public/pm/premium-vw-doc.js +22 -7
  137. package/workspace/public/pm/premium-vw-mtg.js +488 -261
  138. package/workspace/public/pm/premium-vw-notes.js +61 -0
  139. package/workspace/public/pm/rp-parts.js +269 -0
  140. package/workspace/public/pm/view-notes.js +2 -2
  141. package/workspace/public/premium-board.html +4 -3
  142. package/workspace/public/premium-insights.html +10 -10
  143. package/workspace/public/premium.html +3 -1
  144. package/workspace/r/m1.png +0 -0
  145. package/workspace/r/m2.png +0 -0
  146. package/workspace/r/m3.png +0 -0
  147. package/workspace/r/nl.png +0 -0
  148. package/workspace/replaced-tests.json +435 -0
  149. package/workspace/run-tests.js +323 -28
  150. package/workspace/server.js +15 -10
  151. package/workspace/test-files.json +3 -140
  152. package/workspace/test-lists/base.json +1 -2
  153. package/workspace/test-lists/c3-desktop-light-load.json +1 -2
  154. package/workspace/test-lists/c3-initiative-boards.json +1 -2
  155. package/workspace/test-lists/c3-meeting-focus.json +2 -12
  156. package/workspace/test-lists/c3-work-agent.json +1 -2
  157. package/workspace/test-lists/calendar-tidy-up.json +1 -2
  158. package/workspace/test-lists/console3-reports.json +1 -2
  159. package/workspace/test-lists/docs-three-way-sync.json +1 -2
  160. package/workspace/test-lists/extension-capture.json +5 -0
  161. package/workspace/test-lists/initiative-layout.json +9 -0
  162. package/workspace/test-lists/jira-wbs.json +1 -2
  163. package/workspace/test-lists/legacy-cleanup-a.json +9 -0
  164. package/workspace/test-lists/meeting-material.json +1 -2
  165. package/workspace/test-lists/meeting-notes.json +2 -36
  166. package/workspace/test-lists/meeting-replay.json +1 -2
  167. package/workspace/test-lists/mm-capture.json +2 -12
  168. package/workspace/test-lists/my-work.json +2 -10
  169. package/workspace/test-lists/onboarding-firstrun.json +2 -12
  170. package/workspace/test-lists/people-directory.json +1 -2
  171. package/workspace/test-lists/premium-uncovered-meetings.json +9 -0
  172. package/workspace/test-lists/premium-uncovered-reports.json +9 -0
  173. package/workspace/test-lists/run2-a.json +1 -2
  174. package/workspace/test-lists/run2-d.json +2 -19
  175. package/workspace/test-lists/run3-b.json +1 -2
  176. package/workspace/test-lists/run3-c.json +2 -12
  177. package/workspace/test-lists/run4-b.json +1 -2
  178. package/workspace/test-lists/run4-d.json +1 -5
  179. package/workspace/test-lists/run5-c.json +1 -11
  180. package/workspace/test-lists/run6.json +1 -5
  181. package/workspace/test-lists/uf-everywhere.json +15 -0
  182. package/workspace/test-lists/uf-home.json +9 -0
  183. package/workspace/test-lists/uncovered-board.json +9 -0
  184. package/workspace/test-lists/workspace-launch-flags.json +2 -12
  185. package/workspace/test-lists/workspace-profile-detection.json +2 -10
  186. package/workspace/test-timings.json +242 -123
  187. package/workspace/c3-briefing-test.js +0 -136
  188. package/workspace/c3-core-docs-test.js +0 -170
  189. package/workspace/c3-driver-fixture.js +0 -64
  190. package/workspace/c3-driver-test.js +0 -169
  191. package/workspace/c3-foundation-test.js +0 -163
  192. package/workspace/c3-ib-items-test.js +0 -114
  193. package/workspace/c3-ib-more-test.js +0 -146
  194. package/workspace/c3-ib-triage-backlog-test.js +0 -128
  195. package/workspace/c3-ini-harness.js +0 -66
  196. package/workspace/c3-ini-life-test.js +0 -167
  197. package/workspace/c3-initiatives-test.js +0 -186
  198. package/workspace/c3-light-load-test.js +0 -112
  199. package/workspace/c3-one-home-test.js +0 -149
  200. package/workspace/c3-phone-test.js +0 -289
  201. package/workspace/c3-quiet-test.js +0 -157
  202. package/workspace/c3-report-design-real-test.js +0 -264
  203. package/workspace/c3-report-design-test.js +0 -442
  204. package/workspace/c3-report-setup-test.js +0 -192
  205. package/workspace/c3-report-structure-real-test.js +0 -248
  206. package/workspace/c3-report-structure-test.js +0 -397
  207. package/workspace/c3-reports-test.js +0 -288
  208. package/workspace/c3-scan-test.js +0 -517
  209. package/workspace/c3-sessions-panel-test.js +0 -365
  210. package/workspace/c3-settings-test.js +0 -204
  211. package/workspace/c3-updates-test.js +0 -131
  212. package/workspace/c3-work-test.js +0 -260
  213. package/workspace/cut-stub.js +0 -40
  214. package/workspace/first-paint-audit.js +0 -160
  215. package/workspace/lib/c3-full-console.js +0 -15
  216. package/workspace/lib/engine/derived/trust.js +0 -3
  217. package/workspace/lib/engine/plan-forecast.js +0 -342
  218. package/workspace/lib/engine/report-families.js +0 -175
  219. package/workspace/lib/engine/truth-table.js +0 -57
  220. package/workspace/lib/routes-c3-init.js +0 -54
  221. package/workspace/lib/routes-c3-life.js +0 -120
  222. package/workspace/lib/routes-c3-timeline.js +0 -192
  223. package/workspace/lib/routes-forecast.js +0 -86
  224. package/workspace/lib/routes-releases.js +0 -130
  225. package/workspace/lib/routes-report-facts.js +0 -85
  226. package/workspace/lib/routes-report-families.js +0 -33
  227. package/workspace/lib/routes-signals.js +0 -51
  228. package/workspace/lib/routes-timeline.js +0 -197
  229. package/workspace/public/c3.html +0 -35
  230. package/workspace/public/index.html +0 -156
  231. package/workspace/public/pm/app.js +0 -831
  232. package/workspace/public/pm/bd-board.js +0 -159
  233. package/workspace/public/pm/bd-drag.js +0 -59
  234. package/workspace/public/pm/bd-model.js +0 -152
  235. package/workspace/public/pm/bd-timeline.js +0 -233
  236. package/workspace/public/pm/bd-tree.js +0 -244
  237. package/workspace/public/pm/board-copy.js +0 -59
  238. package/workspace/public/pm/board-read.js +0 -38
  239. package/workspace/public/pm/branches-sheet.js +0 -56
  240. package/workspace/public/pm/breakdown-api.js +0 -58
  241. package/workspace/public/pm/breakdown-copy.js +0 -138
  242. package/workspace/public/pm/briefing-deck.js +0 -441
  243. package/workspace/public/pm/briefing-model.js +0 -251
  244. package/workspace/public/pm/c3-ambient.js +0 -100
  245. package/workspace/public/pm/c3-audience-link.js +0 -21
  246. package/workspace/public/pm/c3-audience.js +0 -46
  247. package/workspace/public/pm/c3-boot.js +0 -13
  248. package/workspace/public/pm/c3-breakdown.js +0 -240
  249. package/workspace/public/pm/c3-brief-data.js +0 -11
  250. package/workspace/public/pm/c3-brief-mentions.js +0 -137
  251. package/workspace/public/pm/c3-brief-needs.js +0 -288
  252. package/workspace/public/pm/c3-brief-pulse.js +0 -112
  253. package/workspace/public/pm/c3-brief-summary.js +0 -139
  254. package/workspace/public/pm/c3-brief-today.js +0 -79
  255. package/workspace/public/pm/c3-brief.js +0 -279
  256. package/workspace/public/pm/c3-cal-strategy.js +0 -529
  257. package/workspace/public/pm/c3-calendar.js +0 -965
  258. package/workspace/public/pm/c3-calpop.js +0 -111
  259. package/workspace/public/pm/c3-case.js +0 -196
  260. package/workspace/public/pm/c3-core-docs.css +0 -18
  261. package/workspace/public/pm/c3-core-docs.js +0 -236
  262. package/workspace/public/pm/c3-daypart.js +0 -176
  263. package/workspace/public/pm/c3-demo-boards.js +0 -764
  264. package/workspace/public/pm/c3-demo-brief-ix.js +0 -350
  265. package/workspace/public/pm/c3-demo-brief-page.js +0 -70
  266. package/workspace/public/pm/c3-demo-cal-ix.js +0 -74
  267. package/workspace/public/pm/c3-demo-cal2.js +0 -66
  268. package/workspace/public/pm/c3-demo-cal3.js +0 -173
  269. package/workspace/public/pm/c3-demo-cal4.js +0 -169
  270. package/workspace/public/pm/c3-demo-cal5.js +0 -52
  271. package/workspace/public/pm/c3-demo-coredocs.js +0 -221
  272. package/workspace/public/pm/c3-demo-data.js +0 -552
  273. package/workspace/public/pm/c3-demo-focus.js +0 -181
  274. package/workspace/public/pm/c3-demo-init.js +0 -430
  275. package/workspace/public/pm/c3-demo-life.js +0 -77
  276. package/workspace/public/pm/c3-demo-material.js +0 -58
  277. package/workspace/public/pm/c3-demo-misc2.js +0 -34
  278. package/workspace/public/pm/c3-demo-phone.js +0 -48
  279. package/workspace/public/pm/c3-demo-plan2.js +0 -30
  280. package/workspace/public/pm/c3-demo-rd.js +0 -432
  281. package/workspace/public/pm/c3-demo-rep-ix.js +0 -126
  282. package/workspace/public/pm/c3-demo-rep2.js +0 -130
  283. package/workspace/public/pm/c3-demo-rep3.js +0 -138
  284. package/workspace/public/pm/c3-demo-rs.js +0 -287
  285. package/workspace/public/pm/c3-demo-term.js +0 -153
  286. package/workspace/public/pm/c3-demo-time.js +0 -49
  287. package/workspace/public/pm/c3-demo-work-ix.js +0 -32
  288. package/workspace/public/pm/c3-demo.js +0 -131
  289. package/workspace/public/pm/c3-design-studio.js +0 -369
  290. package/workspace/public/pm/c3-doc-formats.js +0 -153
  291. package/workspace/public/pm/c3-doc-sheet.js +0 -1230
  292. package/workspace/public/pm/c3-dock.js +0 -206
  293. package/workspace/public/pm/c3-docs.js +0 -291
  294. package/workspace/public/pm/c3-driver-work.js +0 -110
  295. package/workspace/public/pm/c3-driver.css +0 -18
  296. package/workspace/public/pm/c3-driver.js +0 -298
  297. package/workspace/public/pm/c3-focus.css +0 -304
  298. package/workspace/public/pm/c3-focus.js +0 -983
  299. package/workspace/public/pm/c3-ib-docs.js +0 -92
  300. package/workspace/public/pm/c3-ib-initiatives.js +0 -201
  301. package/workspace/public/pm/c3-ib-items.js +0 -210
  302. package/workspace/public/pm/c3-ib-releases.js +0 -48
  303. package/workspace/public/pm/c3-ib-sprints.js +0 -201
  304. package/workspace/public/pm/c3-ib-triage.js +0 -177
  305. package/workspace/public/pm/c3-ii-tabs.js +0 -252
  306. package/workspace/public/pm/c3-ini-life.css +0 -34
  307. package/workspace/public/pm/c3-ini-life.js +0 -379
  308. package/workspace/public/pm/c3-ini-records.js +0 -197
  309. package/workspace/public/pm/c3-ini-timeline.js +0 -278
  310. package/workspace/public/pm/c3-ini-work.js +0 -139
  311. package/workspace/public/pm/c3-init-extras.js +0 -170
  312. package/workspace/public/pm/c3-initiatives.js +0 -852
  313. package/workspace/public/pm/c3-lifecycle-panels.js +0 -479
  314. package/workspace/public/pm/c3-look.js +0 -27
  315. package/workspace/public/pm/c3-material.css +0 -22
  316. package/workspace/public/pm/c3-material.js +0 -321
  317. package/workspace/public/pm/c3-md.js +0 -3
  318. package/workspace/public/pm/c3-misc-panels.js +0 -89
  319. package/workspace/public/pm/c3-new-session.js +0 -110
  320. package/workspace/public/pm/c3-notes.js +0 -751
  321. package/workspace/public/pm/c3-phone-boot.js +0 -47
  322. package/workspace/public/pm/c3-phone-detail.js +0 -97
  323. package/workspace/public/pm/c3-phone-model.js +0 -3
  324. package/workspace/public/pm/c3-phone.css +0 -66
  325. package/workspace/public/pm/c3-phone.js +0 -444
  326. package/workspace/public/pm/c3-plan-panels.js +0 -163
  327. package/workspace/public/pm/c3-plan.js +0 -193
  328. package/workspace/public/pm/c3-quiet.css +0 -113
  329. package/workspace/public/pm/c3-quiet.js +0 -177
  330. package/workspace/public/pm/c3-replay.css +0 -133
  331. package/workspace/public/pm/c3-replay.js +0 -429
  332. package/workspace/public/pm/c3-report-deck.css +0 -163
  333. package/workspace/public/pm/c3-report-deck.js +0 -598
  334. package/workspace/public/pm/c3-report-frame.css +0 -20
  335. package/workspace/public/pm/c3-report-print.css +0 -20
  336. package/workspace/public/pm/c3-report-setup.css +0 -67
  337. package/workspace/public/pm/c3-report-setup.js +0 -298
  338. package/workspace/public/pm/c3-report-store.js +0 -244
  339. package/workspace/public/pm/c3-report-structure.css +0 -44
  340. package/workspace/public/pm/c3-report-structure.js +0 -473
  341. package/workspace/public/pm/c3-reports.css +0 -68
  342. package/workspace/public/pm/c3-reports.js +0 -377
  343. package/workspace/public/pm/c3-roadmap.js +0 -249
  344. package/workspace/public/pm/c3-scan-api.js +0 -167
  345. package/workspace/public/pm/c3-scan-next.js +0 -248
  346. package/workspace/public/pm/c3-scan-setup.js +0 -313
  347. package/workspace/public/pm/c3-scan-words.js +0 -41
  348. package/workspace/public/pm/c3-scan.css +0 -74
  349. package/workspace/public/pm/c3-scan.js +0 -93
  350. package/workspace/public/pm/c3-session-chat.js +0 -103
  351. package/workspace/public/pm/c3-session-conv.js +0 -165
  352. package/workspace/public/pm/c3-session-term.js +0 -216
  353. package/workspace/public/pm/c3-settings.css +0 -85
  354. package/workspace/public/pm/c3-settings.js +0 -1045
  355. package/workspace/public/pm/c3-shell.js +0 -628
  356. package/workspace/public/pm/c3-signals.js +0 -196
  357. package/workspace/public/pm/c3-strategy-panels.js +0 -45
  358. package/workspace/public/pm/c3-swipe.js +0 -230
  359. package/workspace/public/pm/c3-terminal-data.js +0 -48
  360. package/workspace/public/pm/c3-terminal-edge.js +0 -91
  361. package/workspace/public/pm/c3-terminal-icons.js +0 -40
  362. package/workspace/public/pm/c3-terminal-results.js +0 -141
  363. package/workspace/public/pm/c3-terminal.js +0 -52
  364. package/workspace/public/pm/c3-tickets.js +0 -163
  365. package/workspace/public/pm/c3-timeline.js +0 -201
  366. package/workspace/public/pm/calendar-views.js +0 -1049
  367. package/workspace/public/pm/console3-lift.md +0 -220
  368. package/workspace/public/pm/cozy-home.js +0 -172
  369. package/workspace/public/pm/cozy-initiative.css +0 -138
  370. package/workspace/public/pm/cycle-review.js +0 -125
  371. package/workspace/public/pm/data.js +0 -1577
  372. package/workspace/public/pm/dest-board.js +0 -444
  373. package/workspace/public/pm/dest-docs.js +0 -530
  374. package/workspace/public/pm/dest-initiatives.js +0 -162
  375. package/workspace/public/pm/dest-mywork.js +0 -307
  376. package/workspace/public/pm/dest-notes.js +0 -537
  377. package/workspace/public/pm/dest-people.js +0 -449
  378. package/workspace/public/pm/dest-reports.js +0 -383
  379. package/workspace/public/pm/dest-settings.js +0 -601
  380. package/workspace/public/pm/dest-today.js +0 -267
  381. package/workspace/public/pm/display-word.js +0 -56
  382. package/workspace/public/pm/doc-editor.js +0 -473
  383. package/workspace/public/pm/doc-graph.js +0 -272
  384. package/workspace/public/pm/doc-health-panel.js +0 -110
  385. package/workspace/public/pm/doc-rail.js +0 -167
  386. package/workspace/public/pm/doc-remote.js +0 -180
  387. package/workspace/public/pm/dock-sessions.js +0 -472
  388. package/workspace/public/pm/dock.js +0 -216
  389. package/workspace/public/pm/fixture.js +0 -821
  390. package/workspace/public/pm/flag-picker.js +0 -104
  391. package/workspace/public/pm/frame-copy.js +0 -278
  392. package/workspace/public/pm/freshness-line.js +0 -149
  393. package/workspace/public/pm/handoff-box.js +0 -82
  394. package/workspace/public/pm/initiative-list.js +0 -235
  395. package/workspace/public/pm/initiative-sheet.js +0 -331
  396. package/workspace/public/pm/initiatives-api.js +0 -95
  397. package/workspace/public/pm/initiatives-copy.js +0 -287
  398. package/workspace/public/pm/initiatives-timeline-copy.js +0 -59
  399. package/workspace/public/pm/initiatives-timeline.js +0 -410
  400. package/workspace/public/pm/initiatives-ui.js +0 -291
  401. package/workspace/public/pm/item-sheet.js +0 -268
  402. package/workspace/public/pm/keep-card.js +0 -204
  403. package/workspace/public/pm/lifecycle-lens-model.js +0 -246
  404. package/workspace/public/pm/lifecycle-lens.js +0 -276
  405. package/workspace/public/pm/lifecycle.js +0 -111
  406. package/workspace/public/pm/mobile.css +0 -366
  407. package/workspace/public/pm/mobile.js +0 -581
  408. package/workspace/public/pm/modes-live.js +0 -453
  409. package/workspace/public/pm/modes.js +0 -147
  410. package/workspace/public/pm/my-work-card.js +0 -51
  411. package/workspace/public/pm/my-work-data.js +0 -36
  412. package/workspace/public/pm/new-initiative-sheet.js +0 -169
  413. package/workspace/public/pm/next-step-ui.js +0 -190
  414. package/workspace/public/pm/outbox-panel.js +0 -125
  415. package/workspace/public/pm/palette-copy.js +0 -55
  416. package/workspace/public/pm/palette.js +0 -343
  417. package/workspace/public/pm/panel-breakdown.js +0 -702
  418. package/workspace/public/pm/panel-cockpit.js +0 -425
  419. package/workspace/public/pm/panel-detail.js +0 -1513
  420. package/workspace/public/pm/panel-initiatives.js +0 -929
  421. package/workspace/public/pm/panel-newsess.js +0 -709
  422. package/workspace/public/pm/panel-repos.js +0 -741
  423. package/workspace/public/pm/panel-tabs.js +0 -1506
  424. package/workspace/public/pm/panel-trees.js +0 -204
  425. package/workspace/public/pm/people-link.js +0 -106
  426. package/workspace/public/pm/phone-deck.js +0 -167
  427. package/workspace/public/pm/pm-work-view.js +0 -1533
  428. package/workspace/public/pm/portfolio-report.js +0 -61
  429. package/workspace/public/pm/premium-acts.js +0 -280
  430. package/workspace/public/pm/premium-brief.js +0 -111
  431. package/workspace/public/pm/premium-chat.js +0 -22
  432. package/workspace/public/pm/premium-doc-sheet.js +0 -312
  433. package/workspace/public/pm/premium-initiative.js +0 -324
  434. package/workspace/public/pm/premium-insights.css +0 -228
  435. package/workspace/public/pm/premium-metric-tiles.js +0 -68
  436. package/workspace/public/pm/premium-report-brief.js +0 -132
  437. package/workspace/public/pm/premium-vw-rec.js +0 -67
  438. package/workspace/public/pm/premium-wide.css +0 -30
  439. package/workspace/public/pm/print.css +0 -44
  440. package/workspace/public/pm/provider-cards.js +0 -136
  441. package/workspace/public/pm/registry.js +0 -203
  442. package/workspace/public/pm/release-card.js +0 -110
  443. package/workspace/public/pm/releases-view.js +0 -248
  444. package/workspace/public/pm/report-families-view.js +0 -505
  445. package/workspace/public/pm/report-slides.js +0 -438
  446. package/workspace/public/pm/report-tab.js +0 -33
  447. package/workspace/public/pm/report-view.js +0 -337
  448. package/workspace/public/pm/reports-copy.js +0 -134
  449. package/workspace/public/pm/roadmap.js +0 -294
  450. package/workspace/public/pm/run-card.js +0 -260
  451. package/workspace/public/pm/sessions-panel.js +0 -219
  452. package/workspace/public/pm/sheet-jira.js +0 -353
  453. package/workspace/public/pm/shell-bell.js +0 -163
  454. package/workspace/public/pm/shell-model.js +0 -83
  455. package/workspace/public/pm/shell-phone.js +0 -124
  456. package/workspace/public/pm/shell-readaloud.js +0 -53
  457. package/workspace/public/pm/shell-recording.js +0 -274
  458. package/workspace/public/pm/shell-ticker.js +0 -90
  459. package/workspace/public/pm/sig-watch.js +0 -41
  460. package/workspace/public/pm/slide-confirm.js +0 -163
  461. package/workspace/public/pm/slides-copy.js +0 -52
  462. package/workspace/public/pm/status-banner.js +0 -95
  463. package/workspace/public/pm/tab-doc.js +0 -859
  464. package/workspace/public/pm/tab-gone.js +0 -21
  465. package/workspace/public/pm/tab-term.js +0 -1210
  466. package/workspace/public/pm/tab-web.js +0 -90
  467. package/workspace/public/pm/timeline-copy.js +0 -48
  468. package/workspace/public/pm/timeline-forecast-view.js +0 -164
  469. package/workspace/public/pm/today-agenda.js +0 -331
  470. package/workspace/public/pm/today-cards.js +0 -244
  471. package/workspace/public/pm/today-copy.js +0 -506
  472. package/workspace/public/pm/today-day.js +0 -1371
  473. package/workspace/public/pm/today-goals.js +0 -297
  474. package/workspace/public/pm/today-jobs.js +0 -84
  475. package/workspace/public/pm/today-mentions.js +0 -50
  476. package/workspace/public/pm/topbar.js +0 -202
  477. package/workspace/public/pm/triage-card.js +0 -60
  478. package/workspace/public/pm/undo-hold.js +0 -103
  479. package/workspace/public/pm/view-addrepo.js +0 -208
  480. package/workspace/public/pm/view-files.js +0 -197
  481. package/workspace/public/pm/view-livenotes.js +0 -399
  482. package/workspace/public/pm/view-today.js +0 -13
  483. package/workspace/public/pm/view-validate.js +0 -171
  484. package/workspace/public/pm/welcome.js +0 -391
  485. package/workspace/public/pm/work-place.js +0 -68
  486. package/workspace/public/pm/xlsx-read.js +0 -117
  487. package/workspace/public/welcome.html +0 -22
  488. package/workspace/test-lists/browser-suites-green.json +0 -5
  489. package/workspace/test-lists/c3-core-docs.json +0 -9
  490. package/workspace/test-lists/c3-doc-sheet-rich.json +0 -6
  491. package/workspace/test-lists/c3-doc-sheet-size.json +0 -6
  492. package/workspace/test-lists/c3-doc-sheet-v2.json +0 -6
  493. package/workspace/test-lists/c3-ib-items.json +0 -9
  494. package/workspace/test-lists/c3-ib-more.json +0 -9
  495. package/workspace/test-lists/c3-ib-triage-backlog.json +0 -9
  496. package/workspace/test-lists/c3-ini-life.json +0 -9
  497. package/workspace/test-lists/c3-meeting-board.json +0 -5
  498. package/workspace/test-lists/c3-meeting-card.json +0 -5
  499. package/workspace/test-lists/c3-notes-place.json +0 -5
  500. package/workspace/test-lists/c3-notes-series.json +0 -5
  501. package/workspace/test-lists/calendar-time-page.json +0 -5
  502. package/workspace/test-lists/calpop.json +0 -4
  503. package/workspace/test-lists/console3-briefing.json +0 -9
  504. package/workspace/test-lists/console3-foundation.json +0 -9
  505. package/workspace/test-lists/console3-work-page.json +0 -9
  506. package/workspace/test-lists/premium-brief-parity.json +0 -9
  507. package/workspace/test-lists/report-design-studio-ui.json +0 -5
  508. package/workspace/test-lists/report-structure-ui.json +0 -11
  509. package/workspace/test-lists/report-workspace-ui.json +0 -5
  510. package/workspace/test-lists/run3-a.json +0 -5
  511. package/workspace/test-lists/run3-d.json +0 -6
  512. package/workspace/test-lists/run4-c.json +0 -13
  513. package/workspace/test-lists/today-goals-jobs-ui.json +0 -5
  514. package/workspace/test-lists/today-mentions-cards.json +0 -5
  515. package/workspace/test-lists/workspace-tabs-declutter.json +0 -13
@@ -1,598 +0,0 @@
1
- /* pm/c3-report-deck.js — a DESIGNED report cycle in the document sheet's Read tab: the deck or the interactive document, Present, speaker notes,
2
- * notes on the slide, Print / PDF and the "Differs from the design" notice (initiative report-design-studio; planning/prd/report-design-studio-prd.md
3
- * sections 3 and 4; mockup 42-reportdeck.js, hashes #deck, #deck-pin, #deck-speaker, #deck-present, #deck-audience, #deck-cycles).
4
- *
5
- * createDeck({ ws, path, setup, name, cycle, output, copy, onStudio, onBrief }) -> { node(api), tools(api), present(kind), state }
6
- * c3-report-setup.js makes one per open document and gives node/tools to openDocSheet's report option. node(api) is null until the cycle
7
- * is read, and stays null for a cycle with no design: the sheet then draws its ordinary format view.
8
- * RD the routes of the API contract (report-design-contract.md), through pmGet/pmPost
9
- * splitRender(html) a sanitized render as { style, slides, secs, body, format } (DOMParser; nothing of it runs)
10
- * frameDoc(style, inner) the srcdoc of one sandboxed frame: the slide tokens, the frame affordances, the render's own <style>
11
- * slideCard(R, slide, o) a 1280 x 720 slide in <iframe sandbox="allow-same-origin" srcdoc> (no allow-scripts), scaled to its width
12
- * wireFrame(doc, h) the data attributes of a render, wired from this page: data-src, data-value, data-more, data-initiative, data-from
13
- * printDeckHtml(R, o) the print page: the render's slides one per page, nothing else (no speaker note, no pin)
14
- * diffOutlines(a, b) what changed between two outlines, in words (pure; Node-testable)
15
- * The render is HTML the server sanitized. It shows only in frames with no script permission; every interaction is wired from here. Nothing is
16
- * sent: Present, Print and Download stay on this device. Writes (cycle decisions, notes, pins) go through pmPost, which the server takes only
17
- * from a press on the page. */
18
- import { el } from './dom.js';
19
- import { icon, pbtn, btn, chip, sect, put, lk } from './c3-ini-ui.js';
20
- import { pmGet, pmPost } from './http.js';
21
- import { toast } from './c3-toast.js';
22
- import { ensureC3Css } from './pm-work-view.js';
23
- import { openAudienceWindow } from './c3-audience-link.js';
24
-
25
- export const W = 1280;
26
- export const H = 720;
27
- const q = (o) => Object.entries(o).filter(([, v]) => v != null && v !== '').map(([k, v]) => k + '=' + encodeURIComponent(v)).join('&');
28
- const esc = (s) => String(s == null ? '' : s).replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;').replace(/"/g, '&quot;');
29
- const pad2 = (n) => String(n).padStart(2, '0');
30
- const WD = ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat']; const MON = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];
31
- /** 'Wed 7 Oct' for '2026-10-07', 'Sep 2026' for '2026-09', anything else as it is. */
32
- export function slotWord(slot) {
33
- const s = String(slot || '');
34
- let m = /^(\d{4})-(\d{2})-(\d{2})/.exec(s);
35
- if (m) { const d = new Date(Date.UTC(+m[1], +m[2] - 1, +m[3])); return WD[d.getUTCDay()] + ' ' + (+m[3]) + ' ' + MON[+m[2] - 1]; }
36
- m = /^(\d{4})-(\d{2})$/.exec(s); if (m) return MON[+m[2] - 1] + ' ' + m[1];
37
- return s;
38
- }
39
-
40
- /** Link c3-report-deck.css once (the deck, the studio and the brief share it). */
41
- export function ensureDeckCss() {
42
- if (typeof document === 'undefined' || document.querySelector('link[data-c3-report-deck]')) return;
43
- const l = document.createElement('link');
44
- l.rel = 'stylesheet'; l.href = new URL('./c3-report-deck.css', import.meta.url).href; l.setAttribute('data-c3-report-deck', '');
45
- document.head.appendChild(l);
46
- }
47
-
48
- /* ── the routes (report-design-contract.md) ── */
49
- async function textOf(url) {
50
- const r = await fetch(url);
51
- if (!r.ok) { let m = ''; try { m = (await r.json()).error; } catch { /* not JSON */ } throw new Error(m || 'the workspace did not answer'); }
52
- return r.text();
53
- }
54
- const post = (p, body) => Promise.resolve(pmPost('/api/' + p, body)).catch((e) => ({ ok: false, error: String((e && e.message) || e) }));
55
- export const RD = {
56
- design: (ws, id) => Promise.resolve(pmGet('/api/report-design?' + q({ ws, id }))).catch(() => null),
57
- version: (ws, id, n) => textOf('/api/report-design/version?' + q({ ws, id, n })),
58
- describe: (b) => post('report-design/describe', b),
59
- sample: (b) => post('report-design/sample', b),
60
- turn: (b) => post('report-design/turn', b),
61
- accept: (b) => post('report-design/accept', b),
62
- revert: (b) => post('report-design/revert', b),
63
- cycle: (ws, path) => Promise.resolve(pmGet('/api/report-design/cycle?' + q({ ws, path }))).catch(() => null),
64
- cycleHtml: (ws, path) => textOf('/api/report-design/cycle-html?' + q({ ws, path })),
65
- decide: (b) => post('report-design/cycle-decision', b),
66
- notes: (ws, path) => Promise.resolve(pmGet('/api/report-notes?' + q({ ws, path }))).catch(() => null),
67
- speaker: (b) => post('report-notes/speaker', b),
68
- pin: (b) => post('report-notes/pin', b),
69
- };
70
- export const failed = (r, what) => toast({ text: what + ': ' + ((r && (r.error || r.reason)) || 'the workspace did not answer') + '.', tone: 'error', timeout: 6000 });
71
-
72
- /* ── a render: parsed, never run ── */
73
- /** The render as parts. A second line of defence after the server's sanitizer: scripts, frames and on* attributes are dropped here too. */
74
- export function splitRender(html) {
75
- const d = new DOMParser().parseFromString(String(html || ''), 'text/html');
76
- d.querySelectorAll('script,iframe,object,embed,link,meta,base').forEach((n) => n.remove());
77
- d.querySelectorAll('*').forEach((n) => { for (const a of [...n.attributes]) if (/^on/i.test(a.name) || /^\s*javascript:/i.test(a.value)) n.removeAttribute(a.name); });
78
- const style = [...d.querySelectorAll('style')].map((s) => s.textContent).join('\n');
79
- d.querySelectorAll('style').forEach((s) => s.remove());
80
- const slides = [...d.querySelectorAll('section.pmos-slide')].map((s, i) => ({ id: s.getAttribute('data-slide-id') || 'slide-' + (i + 1), kind: s.getAttribute('data-kind') || '', title: s.getAttribute('data-title') || 'Slide ' + (i + 1), section: s.getAttribute('data-section') || '', html: s.outerHTML, n: i + 1 }));
81
- const secs = [...d.querySelectorAll('section.pmos-sec')].map((s, i) => ({ id: s.getAttribute('data-sec-id') || 'sec-' + (i + 1), kind: s.getAttribute('data-kind') || '', title: s.getAttribute('data-title') || 'Section ' + (i + 1), section: s.getAttribute('data-section') || s.getAttribute('data-title') || '', n: i + 1 }));
82
- return { style, slides, secs, body: d.body.innerHTML, format: slides.length ? 'deck' : 'doc' };
83
- }
84
- const TOKENS = () => new URL('./tokens.css', import.meta.url).href;
85
- const FRAME_CSS = () => new URL('./c3-report-frame.css', import.meta.url).href;
86
- /** The srcdoc of one frame. The render's own <style> comes last, so its rules win over the frame affordances. */
87
- export function frameDoc(style, inner, cls) {
88
- return '<!doctype html><html lang="en"><head><meta charset="utf-8"><link rel="stylesheet" href="' + esc(TOKENS()) + '"><link rel="stylesheet" href="' + esc(FRAME_CSS()) + '">'
89
- + '<style>' + String(style || '').replace(/<\/style/gi, '<\\/style') + '</style></head><body class="pmos-frame' + (cls ? ' ' + cls : '') + '">' + String(inner || '') + '</body></html>';
90
- }
91
- /** A frame: sandboxed, no scripts. onLoad(doc) runs each time it loads (moving it in the page loads it again). */
92
- export function frame(style, inner, { title, cls, onLoad, focusable } = {}) {
93
- const f = el('iframe', { class: 'rd-if', sandbox: 'allow-same-origin', srcdoc: frameDoc(style, inner, cls), title: title || 'Slide', 'data-rd-frame': '', ...(focusable ? {} : { tabindex: '-1' }) });
94
- if (onLoad) f.addEventListener('load', () => { try { if (f.contentDocument) onLoad(f.contentDocument, f); } catch { /* the frame went away */ } });
95
- return f;
96
- }
97
- const RO = typeof ResizeObserver === 'function' ? new ResizeObserver((es) => { for (const e of es) { const w = e.contentRect.width; if (w) e.target.style.setProperty('--rp-scale', String(Math.round((w / W) * 10000) / 10000)); } }) : null;
98
- /** Scale a card's 1280 x 720 frame to the card's width (as slideCards does in report-slides.js). */
99
- export function fitCard(card) {
100
- if (RO) RO.observe(card);
101
- requestAnimationFrame(() => { const w = card.getBoundingClientRect().width; if (w) card.style.setProperty('--rp-scale', String(Math.round((w / W) * 10000) / 10000)); });
102
- return card;
103
- }
104
- /** One slide as a card. o = { cls, attrs, wire(doc), over: [nodes on top], focusable }. */
105
- export function slideCard(R, slide, o = {}) {
106
- const f = frame(R.style, slide.html, { title: 'Slide ' + slide.n + ': ' + slide.title, cls: 'pmos-one', onLoad: o.wire, focusable: o.focusable });
107
- return fitCard(el('div', { class: 'rd-card' + (o.cls ? ' ' + o.cls : ''), 'data-rd-card': slide.id, ...(o.attrs || {}) }, f, ...(o.over || [])));
108
- }
109
-
110
- /* ── the data attributes, wired from the page ── */
111
- const toggleMore = (m) => { if (m.tagName === 'DETAILS') m.open = !m.open; else if (m.hasAttribute('data-open')) m.removeAttribute('data-open'); else m.setAttribute('data-open', ''); };
112
- /** data-from: a "was <value>" note after each changed value while `on`. */
113
- export function showChanges(doc, on) {
114
- doc.querySelectorAll('[data-from]').forEach((n) => {
115
- n.classList.toggle('pmos-chg', !!on);
116
- const nx = n.nextElementSibling; const has = nx && nx.classList.contains('pmos-was');
117
- if (on && !has) { const w = doc.createElement('small'); w.className = 'pmos-was'; w.textContent = 'was ' + n.getAttribute('data-from'); n.after(w); }
118
- if (!on && has) nx.remove();
119
- });
120
- }
121
- /**
122
- * h = { place(e, doc) -> true when the click placed a marker, src(ref, node), initiative(id), value(text, node) / leave(), key(e), chg }.
123
- * Every interactive part gets a role and the keyboard; links never navigate.
124
- */
125
- export function wireFrame(doc, h) {
126
- const win = doc.defaultView; if (!win) return;
127
- doc.querySelectorAll('[data-src],[data-initiative],[data-more]').forEach((n) => { if (n.tagName !== 'DETAILS' && n.tagName !== 'SUMMARY') { if (!n.hasAttribute('tabindex')) n.setAttribute('tabindex', '0'); if (!n.hasAttribute('role')) n.setAttribute('role', 'button'); } });
128
- doc.querySelectorAll('[data-value]').forEach((n) => { if (!n.hasAttribute('tabindex')) n.setAttribute('tabindex', '0'); });
129
- const act = (e) => {
130
- const t = e.target && e.target.nodeType === 1 ? e.target : e.target && e.target.parentElement; if (!t) return;
131
- if (h.place && h.place(e, doc)) { e.preventDefault(); return; }
132
- if (t.closest('a')) e.preventDefault();
133
- const s = t.closest('[data-src]'); if (s) { e.preventDefault(); if (h.src) h.src(s.getAttribute('data-src'), s); return; }
134
- const i = t.closest('[data-initiative]'); if (i) { e.preventDefault(); if (h.initiative) h.initiative(i.getAttribute('data-initiative'), i); return; }
135
- const m = t.closest('[data-more]'); if (m && !t.closest('summary')) { e.preventDefault(); toggleMore(m); if (h.more) h.more(m); }
136
- else if (m && m.tagName === 'DETAILS' && h.more) setTimeout(() => h.more(m), 0);
137
- };
138
- doc.defaultView.addEventListener('click', act);
139
- win.addEventListener('keydown', (e) => {
140
- const t = e.target && e.target.closest ? e.target : null;
141
- if (t && (e.key === 'Enter' || e.key === ' ') && t.closest('[data-src],[data-initiative],[data-more]') && t.tagName !== 'SUMMARY') { act({ target: t, preventDefault: () => e.preventDefault(), clientX: 0, clientY: 0 }); e.preventDefault(); return; }
142
- if (h.key) h.key(e);
143
- });
144
- const hov = (e) => { const v = e.target && e.target.closest && e.target.closest('[data-value]'); if (v) { if (h.value) h.value(v.getAttribute('data-value'), v); } else if (h.leave) h.leave(); };
145
- win.addEventListener('mouseover', hov); win.addEventListener('focusin', hov);
146
- doc.documentElement.addEventListener('mouseleave', () => { if (h.leave) h.leave(); });
147
- if (h.touch) { win.addEventListener('touchstart', h.touch.start, { passive: true }); win.addEventListener('touchend', h.touch.end, { passive: true }); }
148
- showChanges(doc, !!h.chg);
149
- }
150
-
151
- /* ── pure ── */
152
- /** What changed from outline a to outline b: [text]. Outlines are [{ id, kind, title }]. */
153
- export function diffOutlines(a, b) {
154
- const A = a || []; const B = b || []; const out = [];
155
- const ia = new Map(A.map((s, i) => [s.id, i]));
156
- for (const [i, s] of B.entries()) {
157
- if (!ia.has(s.id)) { out.push('Added: ' + s.title + ' (slide ' + (i + 1) + ')'); continue; }
158
- const p = A[ia.get(s.id)];
159
- if (p.kind !== s.kind) out.push(s.title + ': ' + (p.kind || 'plain') + ' became ' + (s.kind || 'plain'));
160
- if (p.title !== s.title) out.push('Renamed: ' + p.title + ' is now ' + s.title);
161
- }
162
- for (const s of A) if (!B.some((x) => x.id === s.id)) out.push('Removed: ' + s.title);
163
- const common = B.filter((s) => ia.has(s.id)).map((s) => s.id); const was = A.filter((s) => common.includes(s.id)).map((s) => s.id);
164
- common.forEach((id, k) => { if (was[k] !== id) { const s = B.find((x) => x.id === id); const from = A.findIndex((x) => x.id === id) + 1; const to = B.findIndex((x) => x.id === id) + 1; if (from !== to && !out.some((t) => t.startsWith('Moved: ' + s.title))) out.push('Moved: ' + s.title + ' to slide ' + to + ', was slide ' + from); } });
165
- return out;
166
- }
167
- /** The print page: every slide of the render on its own 1280 x 720 page, in order. Nothing else: no speaker note, no pin, no page chrome. */
168
- export function printDeckHtml(R, o = {}) {
169
- const title = esc(o.title || 'Report');
170
- if (R.format !== 'deck') return frameDoc(R.style, R.body, 'pmos-print pmos-print-doc').replace('<head>', '<head><title>' + title + '</title>');
171
- return frameDoc(R.style, R.slides.map((s) => s.html).join(''), 'pmos-print pmos-print-deck').replace('<head>', '<head><title>' + title + '</title>');
172
- }
173
- /** Open the print page in a window and print it. False when the browser blocked the window. */
174
- export function printDeck(R, o) {
175
- const w = typeof window !== 'undefined' && window.open ? window.open('', '_blank') : null;
176
- if (!w) return false;
177
- w.document.open(); w.document.write(printDeckHtml(R, o)); w.document.close();
178
- w.focus(); setTimeout(() => { try { w.print(); } catch { /* the PM prints from the window */ } }, 300);
179
- return true;
180
- }
181
-
182
- /* open an initiative: the Initiatives page, on the initiative (c3-initiatives.js reads pmos:ini-go) */
183
- export function openInitiative(id) {
184
- try { window.dispatchEvent(new CustomEvent('pmos:go-tab', { detail: { tab: 'init' } })); window.dispatchEvent(new CustomEvent('pmos:ini-go', { detail: { id } })); } catch { /* no events */ }
185
- }
186
- const SRC_WORD = { jira: 'Jira', initiative: 'PMOS initiative', ini: 'PMOS initiative', commit: 'Commit', doc: 'Document', metric: 'Metric', release: 'Release', dashboard: 'Dashboard', confluence: 'Confluence', section: 'Section of the document' };
187
- export function srcParts(ref) { const s = String(ref || ''); const k = s.indexOf(':'); const kind = k > 0 ? s.slice(0, k) : 'source'; return { kind, id: k > 0 ? s.slice(k + 1) : s, word: SRC_WORD[kind.toLowerCase()] || kind.charAt(0).toUpperCase() + kind.slice(1) }; }
188
-
189
- /* ── the deck in the Read tab ── */
190
- const CAPS = [['eye', 'Hover a value for its detail'], ['org', 'Click a number or status for its source'], ['plus', 'Expand the details'], ['init', 'Live link to each initiative'], ['notes', 'Notes on the slide'], ['mic', 'Presenter view with your notes']];
191
- const KIND_WORD = (k) => (k ? String(k).replace(/[-_]/g, ' ').replace(/^./, (c) => c.toUpperCase()) : 'Slide');
192
- const hintOf = (k) => (/headline|metric|kpi/.test(k) ? 'Hover a value for its detail. Click a number to see its source.' : /list|table/.test(k) ? 'Click a status to see where it comes from, or an initiative to open it.'
193
- : /init/.test(k) ? 'Click the status for its source, or the live link for the initiative today. A long column folds into "more".' : /roadmap/.test(k) ? 'Hover a bar for its stage and dates.'
194
- : /release|ship/.test(k) ? 'Click a release type to see its commit or ticket.' : /risk|need/.test(k) ? 'Hover a risk for its impact.' : 'The words come from the document. Change them in the Edit tab; the deck redraws.');
195
-
196
- export function createDeck(o) {
197
- ensureDeckCss();
198
- const { ws, path } = o;
199
- const S = { loaded: false, cyc: null, R: null, prev: null, prevR: null, notes: { speaker: {}, suggestions: {}, pins: [] }, cur: 0, mode: 'deck', pins: true, open: null, src: null, placing: false, draft: null, chg: false, err: '', timer: null, api: null, spkT: {} };
200
- const root = el('div', { class: 'rd-dk', 'data-rd-deck': path });
201
- const redraw = () => { if (S.api && S.api.redraw) S.api.redraw(); };
202
-
203
- /* A read that changed nothing draws nothing: while the cycle is redrawn the deck is read every 2 seconds, and a redraw loads every frame
204
- * again, so the slides flickered. */
205
- async function load() {
206
- const c = await RD.cycle(ws, path);
207
- if (!c || c.ok === false) { S.loaded = true; S.cyc = null; S.err = (c && c.error) || ''; S.seen = null; redraw(); return; }
208
- S.cyc = c; const seen = [c];
209
- if (c.designed) {
210
- try { const h = await RD.cycleHtml(ws, path); seen.push(h); S.R = splitRender(h); } catch (e) { S.err = (e && e.message) || 'the render could not be read'; S.R = null; }
211
- const n = await RD.notes(ws, path); seen.push(n); if (n && n.ok !== false) S.notes = { speaker: n.speaker || {}, suggestions: n.suggestions || {}, pins: n.pins || [] };
212
- if (c.previous && c.previous.path) {
213
- const pc = await RD.cycle(ws, c.previous.path); seen.push(pc);
214
- if (pc && pc.ok !== false && pc.designed) { S.prev = { ...pc, ...c.previous }; try { const h = await RD.cycleHtml(ws, c.previous.path); seen.push(h); S.prevR = splitRender(h); } catch { S.prevR = null; } }
215
- }
216
- }
217
- S.loaded = true; S.cur = Math.min(S.cur, Math.max(0, count() - 1));
218
- if (c.rendering) poll();
219
- const sig = JSON.stringify(seen) + S.err;
220
- if (sig === S.seen) return;
221
- S.seen = sig; redraw();
222
- }
223
- function poll() { clearTimeout(S.timer); S.timer = setTimeout(async () => { if (!root.isConnected && !OV) return; await load(); }, 2000); }
224
- const count = () => (S.R ? (S.R.format === 'deck' ? S.R.slides.length : S.R.secs.length) : 0);
225
- const slides = () => (S.R ? S.R.slides : []);
226
- const isDeck = () => !!S.R && S.R.format === 'deck';
227
- const prevWord = () => (S.cyc && S.cyc.previous ? slotWord(S.cyc.previous.slot) : 'the last cycle');
228
- const live = () => S.notes.pins.filter((p) => p.state !== 'dismissed');
229
- const pinsOf = (id) => live().filter((p) => p.slide === id);
230
- const numOf = (p) => live().indexOf(p) + 1;
231
- const curSlide = () => slides()[S.cur] || null;
232
-
233
- /* ── interactions inside a frame ── */
234
- const hands = (card, slide, extra) => ({
235
- chg: S.chg,
236
- src: (ref, n) => { S.src = { ref, label: (n.textContent || '').trim().slice(0, 60), detail: n.getAttribute('data-value') || '' }; S.open = null; paint(); const c = root.querySelector('[data-rd-src]'); if (c) c.scrollIntoView({ block: 'nearest' }); },
237
- initiative: (id) => { S.src = { ref: 'initiative:' + id, label: id, detail: '', ini: id }; S.open = null; paint(); },
238
- value: (text, n) => tipAt(card, n, text),
239
- leave: () => tipOff(card),
240
- place: (e, doc) => {
241
- if (!S.placing || !slide) return false;
242
- const box = slide.box ? slide.box(e, doc) : { x: e.clientX / W * 100, y: e.clientY / H * 100, id: slide.id };
243
- if (!box) return false;
244
- S.draft = { slide: box.id, x: Math.round(box.x), y: Math.round(box.y) }; S.placing = false; paint();
245
- const i = root.querySelector('[data-rd-pindraft]'); if (i) i.focus();
246
- return true;
247
- },
248
- ...(extra || {}),
249
- });
250
- function tipAt(card, n, text) {
251
- const t = card && card.querySelector('.rd-tip'); if (!t) return;
252
- const k = Number(getComputedStyle(card).getPropertyValue('--rp-scale')) || 1; const r = n.getBoundingClientRect();
253
- t.textContent = text; t.hidden = false;
254
- t.style.setProperty('--rp-x', Math.round((r.left + r.width / 2) * k) + 'px'); t.style.setProperty('--rp-y', Math.round(r.top * k) + 'px');
255
- }
256
- const tipOff = (card) => { const t = card && card.querySelector('.rd-tip'); if (t) t.hidden = true; };
257
-
258
- /* ── parts ── */
259
- function bar() {
260
- const c = S.cyc; const v = c.design_version;
261
- return el('div', { class: 'rd-dk-bar' },
262
- el('div', { class: 'chips2 rd-wrap' }, lk({ 'data-rd-act': 'brief', title: 'The design of this report', onclick: () => o.onBrief && o.onBrief() }, icon('spark', 'sm'), 'Design D' + v),
263
- chip(icon('doc', 'sm'), count() + (isDeck() ? (count() === 1 ? ' slide' : ' slides') : (count() === 1 ? ' section' : ' sections'))),
264
- matchChip(),
265
- isDeck() && S.prevR ? el('div', { class: 'seg', role: 'group', 'aria-label': 'Deck view' },
266
- btn({ 'data-rd-act': 'mode', 'data-v': 'deck', 'aria-pressed': String(S.mode === 'deck'), onclick: () => { S.mode = 'deck'; paint(); } }, 'Deck'),
267
- btn({ 'data-rd-act': 'mode', 'data-v': 'cmp', 'aria-pressed': String(S.mode === 'cmp'), onclick: () => { S.mode = 'cmp'; paint(); } }, 'Side by side with ' + prevWord())) : null),
268
- el('div', { class: 'chips2 rd-wrap' },
269
- isDeck() ? pbtn('primary', 'Present', 'play', { 'data-rd-act': 'present', onclick: () => present('pres') }) : null,
270
- isDeck() ? pbtn('outline', 'Audience view', 'eye', { 'data-rd-act': 'audience', onclick: () => audienceView() }) : null,
271
- pbtn('outline', 'Refine the design', 'spark', { 'data-rd-act': 'studio', onclick: () => o.onStudio && o.onStudio() }),
272
- pbtn('ghost', 'Print / PDF', 'pdf', { 'data-rd-act': 'print', onclick: () => doPrint() }),
273
- isDeck() ? pbtn('ghost', 'Download .pptx', 'drop', { 'data-rd-act': 'pptx', onclick: () => S.api && S.api.download && S.api.download('pptx') }) : null));
274
- }
275
- function matchChip() {
276
- const c = S.cyc;
277
- if (c.rendering) return el('span', { class: 'chip2', 'data-rd-match': 'rendering' }, icon('clock', 'sm'), 'Drawing to match the design');
278
- if (c.matches) return el('span', { class: 'chip2 ds-good', 'data-rd-match': 'yes' }, icon('check', 'sm'), 'Matches the design');
279
- const open = openDiffs();
280
- return open.length ? el('span', { class: 'chip2 ds-warn', 'data-rd-match': 'no' }, icon('alert', 'sm'), open.length + (open.length === 1 ? ' difference' : ' differences') + ' from the design')
281
- : el('span', { class: 'chip2 ds-good', 'data-rd-match': 'kept' }, icon('check', 'sm'), 'Kept for this cycle');
282
- }
283
- const openDiffs = () => (S.cyc.differences || []).filter((d) => !(S.cyc.decisions || []).some((x) => x.diff === d.id));
284
- function caps() {
285
- return el('div', { class: 'rd-dk-caps', 'aria-label': 'What this ' + (isDeck() ? 'deck' : 'document') + ' can do', 'data-rd-caps': '' }, el('span', { class: 'dim mono' }, isDeck() ? 'MORE THAN SLIDES' : 'MORE THAN A PAGE'),
286
- CAPS.filter(([ic]) => isDeck() || ic !== 'mic').map(([ic, t]) => chip(icon(ic, 'sm'), isDeck() ? t : t.replace('the slide', 'the document'))),
287
- S.cyc.previous ? lk({ 'data-rd-act': 'chg', 'aria-pressed': String(S.chg), class: S.chg ? 'rd-on' : '', onclick: () => { S.chg = !S.chg; paint(); } }, icon('undo', 'sm'), (S.chg ? 'Hide' : 'Show') + ' what changed since ' + prevWord()) : null);
288
- }
289
- function rbar() {
290
- const tg = (id, label, on, set) => el('label', { class: 'ds-tg' }, el('input', { type: 'checkbox', checked: on, 'data-rd-ck': id, onChange: (e) => set(e.target.checked) }), label);
291
- return el('div', { class: 'ds-rbar' }, el('span', { class: 'ds-acts' }, tg('pins', 'Show notes on the ' + (isDeck() ? 'slide' : 'document'), S.pins, (v) => { S.pins = v; paint(); }), tg('src', 'Markdown source', false, (v) => { if (v && S.api && S.api.setSrc) S.api.setSrc(true); })),
292
- el('span', { class: 'dim mono rd-small' }, 'Present, print and download stay on this device. Nothing is sent.'));
293
- }
294
- function copyNotice() {
295
- if (o.output !== 'google-slides') return null;
296
- return el('div', { class: 'fold', 'data-rd-copynote': '' }, icon('info', 'sm'), ' The deck now lives in PMOS. The Google Slides copy of this report is optional. ', lk({ onclick: () => S.api && S.api.toggleCopies && S.api.toggleCopies() }, 'Copies in other tools'));
297
- }
298
- function diffBox() {
299
- const c = S.cyc; if (c.rendering) return el('div', { class: 'fold a', role: 'status', 'data-rd-rendering': '' }, icon('clock', 'sm'), ' PMOS is drawing this cycle again to match the design. You can leave this page.');
300
- const D = c.differences || []; if (!D.length) return null;
301
- const open = openDiffs();
302
- const kept = D.filter((d) => (c.decisions || []).some((x) => x.diff === d.id && x.choice === 'keep'));
303
- if (!open.length) return kept.length ? el('div', { class: 'fold', 'data-rd-kept': '' }, icon('check', 'sm'), ' Kept for this cycle: ' + kept.map((d) => d.what).join(' ') + ' The design stays as it is.') : null;
304
- const frozen = o.state && o.state() === 'issued';
305
- return el('section', { class: 'ds-stale rd-dk-diff', 'aria-label': 'Differs from the design', 'data-rd-diff': '' }, el('div', { class: 't' }, icon('alert', 'sm'), 'Differs from the design'),
306
- open.map((d) => el('div', { class: 'rd-stack', 'data-rd-diffrow': d.id }, el('p', null, d.what),
307
- frozen ? el('p', { class: 'dim' }, 'This cycle is issued, so it stays as it was drawn.') : el('div', { class: 'ds-acts' },
308
- btn({ class: 'ds-btn', 'data-rd-decide': 'keep', onclick: () => decide(d, 'keep') }, 'Keep for this cycle'),
309
- btn({ class: 'ds-btn ag', 'data-rd-decide': 'adopt', onclick: () => decide(d, 'adopt') }, icon('spark', 'sm'), 'Make it part of the design'),
310
- btn({ class: 'ds-btn', 'data-rd-decide': 'match', onclick: () => decide(d, 'match') }, 'Match the design'),
311
- d.slide && slides().some((s) => s.id === d.slide) ? lk({ 'data-rd-act': 'showslide', onclick: () => { S.mode = 'deck'; go(slides().findIndex((s) => s.id === d.slide)); } }, 'Show the slide') : null))));
312
- }
313
- async function decide(d, choice) {
314
- const r = await RD.decide({ ws, path, diff: d.id, choice });
315
- if (!r || !r.ok) { failed(r, 'It was not recorded'); return; }
316
- toast(choice === 'keep' ? 'Kept for this cycle. The design stays as it is. It is in the Edit log.' : choice === 'adopt' ? 'Added to the design as a new version. Every next cycle follows it.' : 'PMOS draws this cycle again to match the design. It is in the Edit log.');
317
- await load();
318
- }
319
- function thumbs(cur, horiz, onPick) {
320
- return el('nav', { class: 'rd-dk-strip' + (horiz ? ' h' : ''), 'aria-label': 'Slides', 'data-rd-strip': '' }, slides().map((s, i) => {
321
- const np = pinsOf(s.id).length;
322
- return btn({ class: 'rd-dk-th', 'aria-current': String(cur === i), 'aria-label': 'Slide ' + s.n + ': ' + s.title, 'data-rd-go': String(i), onclick: () => onPick(i) },
323
- el('div', { inert: '' }, slideCard(S.R, s, { cls: 'rd-thumb' })), el('span', { class: 'rd-dk-thn' }, String(s.n)),
324
- np && !onPick.studio ? el('span', { class: 'rd-dk-thp', title: np + ' notes on the slide' }, icon('notes', 'sm'), String(np)) : null);
325
- }));
326
- }
327
- function go(i) { if (i < 0 || i >= count()) return; S.cur = i; S.src = null; S.open = null; S.draft = null; S.placing = false; paint(); }
328
- function pinLayer(id) {
329
- if (!S.pins) return [];
330
- const L = pinsOf(id).map((p) => { const b = btn({ class: 'rd-pindot ' + (p.by === 'pmos' ? 'a' : 'h') + (p.state === 'open' && p.by === 'pmos' ? ' prop' : '') + (S.open === p.id ? ' on' : ''), 'data-rd-pin': p.id, 'aria-label': 'Note ' + numOf(p) + ': ' + p.text, onclick: () => { S.open = S.open === p.id ? null : p.id; S.src = null; paint(); } }, String(numOf(p)));
331
- b.style.setProperty('--rp-x', p.x + '%'); b.style.setProperty('--rp-y', p.y + '%'); return b; });
332
- if (S.draft && S.draft.slide === id) { const d = el('span', { class: 'rd-pindot h on', 'aria-hidden': 'true' }, String(live().length + 1)); d.style.setProperty('--rp-x', S.draft.x + '%'); d.style.setProperty('--rp-y', S.draft.y + '%'); L.push(d); }
333
- return L;
334
- }
335
- function cap(s) {
336
- const frozen = o.state && o.state() === 'issued';
337
- return [el('div', { class: 'rd-dk-cap' }, el('span', { class: 'chips2 rd-wrap' }, el('b', { 'data-rd-cap': '' }, 'Slide ' + s.n + ' of ' + count()), chip(icon('img', 'sm'), KIND_WORD(s.kind)), chip(icon('doc', 'sm'), s.title)),
338
- el('span', { class: 'chips2' }, s.section && !frozen ? pbtn('ghost', 'Edit the words', 'edit', { 'data-rd-act': 'editwords', onclick: () => S.api && S.api.editAt && S.api.editAt(s.section) }) : null,
339
- btn({ class: 'ib sm', 'aria-label': 'Previous slide', 'data-rd-act': 'prev', disabled: S.cur === 0, onclick: () => go(S.cur - 1) }, icon('prev', 'sm')),
340
- btn({ class: 'ib sm', 'aria-label': 'Next slide', 'data-rd-act': 'next', disabled: S.cur >= count() - 1, onclick: () => go(S.cur + 1) }, icon('next', 'sm')))),
341
- el('div', { class: 'dim rd-small' }, hintOf(s.kind))];
342
- }
343
- function speaker(s) {
344
- const n = S.notes.speaker[s.id]; const sug = !n && S.notes.suggestions[s.id] ? S.notes.suggestions[s.id] : null;
345
- const from = sug ? slotWord(sug.from_slot) : '';
346
- const ta = el('textarea', { class: 'rd-spk', 'data-rd-spk': s.id, 'aria-label': 'Speaker notes for slide ' + s.n, placeholder: sug ? 'Keep the note from ' + from + ', or write a new one.' : 'What you want to say on this slide. Only you see it, in the presenter view.',
347
- onInput: (e) => { clearTimeout(S.spkT[s.id]); const v = e.target.value; S.spkT[s.id] = setTimeout(() => saveSpk(s.id, v), 700); }, onBlur: (e) => { clearTimeout(S.spkT[s.id]); if ((S.notes.speaker[s.id] || { text: '' }).text !== e.target.value) saveSpk(s.id, e.target.value); } });
348
- ta.value = n ? n.text : '';
349
- return sect({ ic: 'mic', title: 'Speaker notes', right: el('span', { class: 'tag' }, 'Private'), attrs: { 'data-rd-spksec': s.id } },
350
- sug ? el('div', { class: 'rd-carry', 'data-rd-carry': s.id }, el('span', { class: 'dim mono rd-small' }, 'FROM ' + from.toUpperCase() + ', SAME SLIDE'), el('p', null, sug.text),
351
- el('span', { class: 'ds-acts' }, btn({ class: 'ds-btn', 'data-rd-act': 'keep', onclick: () => keepSpk(s.id) }, icon('check', 'sm'), 'Keep'), btn({ class: 'ds-btn', 'data-rd-act': 'clear', onclick: () => clearSpk(s.id) }, icon('x', 'sm'), 'Clear'))) : null,
352
- ta, el('div', { class: 'dim rd-small' }, icon('lock', 'sm'), ' Only you see speaker notes. They are not on the slide, the PDF or the .pptx.'));
353
- }
354
- async function saveSpk(id, text) {
355
- const r = await RD.speaker({ ws, path, slide: id, text });
356
- if (!r || !r.ok) { failed(r, 'The speaker note was not saved'); return; }
357
- S.notes.speaker[id] = { text, at: new Date().toISOString() };
358
- const sv = root.querySelector('[data-rd-spksaved]'); if (sv) sv.textContent = 'Saved';
359
- }
360
- async function keepSpk(id) {
361
- const r = await RD.speaker({ ws, path, slide: id, keep: true }); if (!r || !r.ok) { failed(r, 'The note was not kept'); return; }
362
- S.notes.speaker[id] = { text: S.notes.suggestions[id].text, at: new Date().toISOString() }; paint(); toast('Kept the speaker note. Change it if you like.');
363
- }
364
- async function clearSpk(id) {
365
- const r = await RD.speaker({ ws, path, slide: id, text: '' }); if (!r || !r.ok) { failed(r, 'The note was not cleared'); return; }
366
- S.notes.speaker[id] = { text: '', at: new Date().toISOString() }; paint();
367
- }
368
- function srcCard() {
369
- if (!S.src) return null;
370
- const p = srcParts(S.src.ref); const ini = S.src.ini || (/^(ini|initiative)$/i.test(p.kind) ? p.id : null);
371
- return el('section', { class: 'ds-sync', 'aria-label': 'Source', 'data-rd-src': S.src.ref }, el('div', { class: 'hd' }, el('b', null, icon(ini ? 'init' : 'org', 'sm'), ' Where "' + (S.src.label || p.id) + '" comes from'),
372
- btn({ class: 'ib sm', 'aria-label': 'Close', onclick: () => { S.src = null; paint(); } }, icon('x', 'sm'))),
373
- el('ul', null, el('li', null, el('div', { class: 'l1' }, icon(ini ? 'init' : 'org', 'sm'), el('b', null, p.word + ': ' + p.id)),
374
- el('p', null, S.src.detail || (ini ? 'The slide shows the figures of this cycle. The initiative in PMOS shows them as they are today.' : 'The render names this source. PMOS read it when it drafted this cycle.')),
375
- ini ? el('div', { class: 'ds-acts' }, btn({ class: 'ds-btn', 'data-rd-act': 'openini', onclick: () => openInitiative(ini) }, icon('out', 'sm'), 'Open the initiative')) : null)));
376
- }
377
- function notesSect(s) {
378
- const id = s.id; const ps = pinsOf(id); const frozen = o.state && o.state() === 'issued';
379
- const row = (p) => el('li', { class: 'rd-note' + (S.open === p.id ? ' on' : ''), 'data-rd-pinrow': p.id },
380
- btn({ class: 'rd-pindot ' + (p.by === 'pmos' ? 'a' : 'h') + (p.state === 'open' && p.by === 'pmos' ? ' prop' : ''), 'aria-label': 'Note ' + numOf(p), onclick: () => { S.open = S.open === p.id ? null : p.id; paint(); } }, String(numOf(p))),
381
- el('div', { class: 'ds-le' }, el('div', { class: 'l1' }, el('b', null, p.by === 'pmos' ? 'PMOS' : 'You'), el('span', { class: 'when' }, dayAt(p.at))),
382
- p.by === 'pmos' && p.state === 'open' ? el('div', { class: 'who' }, el('span', { class: 'ds-ag' }, 'Proposed by PMOS')) : null,
383
- S.open === p.id ? [S.editPin === p.id ? el('div', { class: 'ds-whyadd' }, el('input', { type: 'text', 'data-rd-pinedit': p.id, value: p.text, 'aria-label': 'Edit the note' }),
384
- btn({ class: 'ds-btn pri', onclick: () => { const i = root.querySelector('[data-rd-pinedit]'); pinOp('edit', p, i && i.value.trim()); } }, 'Save'), btn({ class: 'ds-btn', onclick: () => { S.editPin = null; paint(); } }, 'Cancel'))
385
- : el('p', { class: 'why' }, p.text),
386
- el('div', { class: 'ds-acts' }, p.by === 'pmos' && p.state === 'open' ? [btn({ class: 'ds-btn pri', 'data-rd-pinact': 'keep', onclick: () => pinOp('keep', p) }, icon('check', 'sm'), 'Keep the note'), btn({ class: 'ds-btn', 'data-rd-pinact': 'dismiss', onclick: () => pinOp('dismiss', p) }, icon('x', 'sm'), 'Dismiss')]
387
- : [btn({ class: 'ds-btn', 'data-rd-pinact': 'edit', onclick: () => { S.editPin = p.id; paint(); } }, icon('edit', 'sm'), 'Change the note'), btn({ class: 'ds-btn', 'data-rd-pinact': 'remove', onclick: () => pinOp('remove', p) }, icon('trash', 'sm'), 'Remove')],
388
- (p.section || s.section) && !frozen ? btn({ class: 'ds-btn ag', 'data-rd-pinact': 'editthis', onclick: () => S.api && S.api.editAt && S.api.editAt(p.section || s.section) }, icon('edit', 'sm'), 'Edit this') : null)] : el('p', { class: 'why rd-clip' }, p.text)));
389
- const draft = S.draft && S.draft.slide === id ? el('div', { class: 'ds-whyadd' }, el('input', { type: 'text', 'data-rd-pindraft': '', placeholder: 'Your note. Readers of the report see it.', 'aria-label': 'Note on the slide', onKeyDown: (e) => { if (e.key === 'Enter') savePin(); } }),
390
- btn({ class: 'ds-btn pri', 'data-rd-act': 'pinsave', onclick: () => savePin() }, 'Pin it'), btn({ class: 'ds-btn', 'data-rd-act': 'pincancel', onclick: () => { S.draft = null; paint(); } }, 'Cancel')) : null;
391
- const add = S.placing ? el('div', { class: 'fold a', role: 'status', 'data-rd-placing': '' }, icon('notes', 'sm'), ' Click the spot on the ' + (isDeck() ? 'slide' : 'document') + ' where the note goes. ', lk({ onclick: () => { S.placing = false; paint(); } }, 'Cancel'))
392
- : el('div', { class: 'ds-acts' }, btn({ class: 'ds-btn', 'data-rd-act': 'place', onclick: () => { S.placing = true; S.draft = null; S.pins = true; paint(); } }, icon('plus', 'sm'), 'Add a note on the ' + (isDeck() ? 'slide' : 'document')));
393
- return sect({ ic: 'notes', title: 'Notes on the ' + (isDeck() ? 'slide' : 'document'), count: ps.length, right: el('span', { class: 'tag acc' }, 'Readers see them'), attrs: { 'data-rd-notes': id } },
394
- ps.length ? el('ul', { class: 'ds-log rd-notes' }, ps.map(row)) : el('div', { class: 'fold' }, icon('info', 'sm'), 'No notes here.'), draft || add,
395
- el('div', { class: 'dim rd-small' }, 'Readers see these notes. They do not change the words: to change the words, use Edit this. Each note is in the Edit log.'));
396
- }
397
- async function savePin() {
398
- const i = root.querySelector('[data-rd-pindraft]'); const text = i && i.value.trim(); if (!text) { if (i) i.focus(); return; }
399
- const d = S.draft; const r = await RD.pin({ ws, path, op: 'add', slide: d.slide, x: d.x, y: d.y, text });
400
- if (!r || !r.ok) { failed(r, 'The note was not pinned'); return; }
401
- S.draft = null; await reloadNotes(); const p = (r.pin && r.pin.id) || (live().slice(-1)[0] || {}).id; S.open = p || null; paint();
402
- toast('Pinned. Readers see it. It is in the Edit log.');
403
- }
404
- async function pinOp(op, p, text) {
405
- if (op === 'edit' && !text) return;
406
- const r = await RD.pin({ ws, path, op, id: p.id, slide: p.slide, x: p.x, y: p.y, text: op === 'edit' ? text : p.text });
407
- if (!r || !r.ok) { failed(r, 'The note was not changed'); return; }
408
- S.editPin = null; if (op === 'remove' || op === 'dismiss') S.open = null;
409
- await reloadNotes(); paint();
410
- toast(op === 'keep' ? 'Kept. Readers see the note.' : op === 'dismiss' ? 'Dismissed. It stays in the Edit log.' : op === 'remove' ? 'Removed. It stays in the Edit log.' : 'Changed. It is in the Edit log.');
411
- }
412
- async function reloadNotes() { const n = await RD.notes(ws, path); if (n && n.ok !== false) S.notes = { speaker: n.speaker || {}, suggestions: n.suggestions || {}, pins: n.pins || [] }; if (S.api && S.api.logChanged) S.api.logChanged(); }
413
-
414
- /* ── the views ── */
415
- function deckMain() {
416
- const s = curSlide(); if (!s) return el('div', { class: 'fold w' }, icon('alert', 'sm'), 'The render has no slide.');
417
- const big = slideCard(S.R, s, { cls: 'rd-big' + (S.placing ? ' placing' : ''), attrs: { 'data-rd-big': s.id }, focusable: true, over: [...pinLayer(s.id), el('span', { class: 'rd-tip', hidden: true, role: 'tooltip' })],
418
- wire: (doc) => wireFrame(doc, hands(big, s, { key: stageKey })) });
419
- return el('div', { class: 'rd-dk-main' }, thumbs(S.cur, false, go), el('div', { class: 'rd-dk-stage' }, ...cap(s), big,
420
- el('div', { class: 'rd-dk-under' }, speaker(s), el('div', { class: 'rd-dk-ncol' }, srcCard(), notesSect(s)))));
421
- }
422
- function stageKey(e) { if (e.key === 'ArrowRight' || e.key === 'PageDown') { e.preventDefault(); go(S.cur + 1); } else if (e.key === 'ArrowLeft' || e.key === 'PageUp') { e.preventDefault(); go(S.cur - 1); } }
423
- function cmpMain() {
424
- const s = curSlide(); if (!s) return null;
425
- const ps = S.prevR ? S.prevR.slides.find((x) => x.id === s.id) : null;
426
- const was = []; const tmp = new DOMParser().parseFromString(s.html, 'text/html');
427
- tmp.querySelectorAll('[data-from]').forEach((n) => was.push((n.textContent || '').trim() + ', was ' + n.getAttribute('data-from')));
428
- const diff = ps ? (was.length ? was : ['The same words and numbers as ' + prevWord() + '.']) : ['This slide is new this cycle. ' + (openDiffs().length ? 'It is what differs from the design.' : '')];
429
- /* each column says how its cycle stands against the design (#deck-cycles) */
430
- const prevChip = () => { const pc = S.prev || {}; const n = (pc.differences || []).filter((d) => !(pc.decisions || []).some((x) => x.diff === d.id)).length;
431
- return pc.matches || !n ? el('span', { class: 'chip2 ds-good' }, icon('check', 'sm'), pc.matches ? 'Matches the design' : 'Kept for that cycle') : el('span', { class: 'chip2 ds-warn' }, icon('alert', 'sm'), n + (n === 1 ? ' difference' : ' differences') + ' from the design'); };
432
- const col = (label, state, R, sl, chip) => el('div', { class: 'rd-cmpc' }, el('div', { class: 'chips2 rd-cmph' }, el('b', null, label), el('span', { class: 'tag ' + (state === 'issued' ? 'ok' : 'acc') }, state === 'issued' ? 'Issued' : 'Draft'), chip),
433
- sl ? slideCard(R, sl, { wire: (doc) => showChanges(doc, R === S.R && S.chg) }) : el('div', { class: 'fold rd-none' }, icon('info', 'sm'), ' ' + label + ' has no slide "' + s.title + '".'));
434
- return [el('div', { class: 'rd-dk-cap' }, el('span', { class: 'chips2 rd-wrap' }, el('b', null, 'Slide ' + s.n + ' of ' + count() + ': ' + s.title), el('span', { class: 'tag ok' }, 'Same design, D' + S.cyc.design_version)),
435
- el('span', { class: 'chips2' }, btn({ class: 'ib sm', 'aria-label': 'Previous slide', disabled: S.cur === 0, onclick: () => go(S.cur - 1) }, icon('prev', 'sm')), btn({ class: 'ib sm', 'aria-label': 'Next slide', disabled: S.cur >= count() - 1, onclick: () => go(S.cur + 1) }, icon('next', 'sm')))),
436
- el('div', { class: 'rd-cmpg', 'data-rd-cmp': '' }, col(prevWord(), S.prev && S.prev.state ? S.prev.state : 'issued', S.prevR, ps, prevChip()), col(slotWord(o.slot) || 'This cycle', o.state ? o.state() : 'draft', S.R, s, matchChip())),
437
- sect({ ic: 'cols', title: 'What differs on this slide', count: diff.length }, el('ul', { class: 'chgl' }, diff.map((t) => el('li', null, icon('edit', 'sm'), el('span', null, t), el('span')))),
438
- el('div', { class: 'dim rd-small' }, 'Both cycles were drafted to match the saved design. Only the numbers and the words change, unless PMOS tells you something differs.')),
439
- thumbs(S.cur, true, go)];
440
- }
441
- function docMain() {
442
- const R = S.R; const card = el('div', { class: 'rd-docf' + (S.placing ? ' placing' : ''), 'data-rd-big': 'doc' });
443
- const layer = el('div', { class: 'rd-doclayer' }); const tip = el('span', { class: 'rd-tip', hidden: true, role: 'tooltip' });
444
- const box = (e, doc) => { const sec = e.target.closest && e.target.closest('section.pmos-sec'); if (!sec) return null; const r = sec.getBoundingClientRect(); return { id: sec.getAttribute('data-sec-id'), x: (e.clientX - r.left) / r.width * 100, y: (e.clientY - r.top) / r.height * 100 }; };
445
- const f = frame(R.style, R.body, { title: 'The document', cls: 'pmos-doc', focusable: true, onLoad: (doc, fr) => {
446
- const fit = () => { fr.style.setProperty('--rp-h', Math.max(200, doc.documentElement.scrollHeight) + 'px'); placeDocPins(doc, layer); };
447
- fit(); setTimeout(fit, 120);
448
- wireFrame(doc, { ...hands(card, { id: 'doc', box }), value: (t, n) => { tip.textContent = t; tip.hidden = false; const r = n.getBoundingClientRect(); tip.style.setProperty('--rp-x', Math.round(r.left + r.width / 2) + 'px'); tip.style.setProperty('--rp-y', Math.round(r.top) + 'px'); }, leave: () => { tip.hidden = true; }, more: () => fit() });
449
- } });
450
- card.append(f, layer, tip);
451
- const all = live(); const secOf = (id) => R.secs.find((x) => x.id === id) || { id, title: id, section: '' };
452
- const sec = S.open ? secOf((all.find((p) => p.id === S.open) || {}).slide) : (S.draft ? secOf(S.draft.slide) : { id: '__all', title: 'the document', section: '' });
453
- return el('div', { class: 'rd-dk-stage' }, card, el('div', { class: 'rd-dk-under' }, el('div', { class: 'rd-dk-ncol' }, srcCard()), el('div', { class: 'rd-dk-ncol' }, notesSect({ ...sec, id: sec.id }))));
454
- }
455
- function placeDocPins(doc, layer) {
456
- const L = [];
457
- if (S.pins) {
458
- for (const p of live()) {
459
- const sec = doc.querySelector('section.pmos-sec[data-sec-id="' + String(p.slide).replace(/"/g, '') + '"]'); if (!sec) continue;
460
- const r = sec.getBoundingClientRect(); const b = btn({ class: 'rd-pindot ' + (p.by === 'pmos' ? 'a' : 'h') + (p.state === 'open' && p.by === 'pmos' ? ' prop' : '') + (S.open === p.id ? ' on' : ''), 'data-rd-pin': p.id, 'aria-label': 'Note ' + numOf(p) + ': ' + p.text, onclick: () => { S.open = S.open === p.id ? null : p.id; paint(); } }, String(numOf(p)));
461
- b.style.setProperty('--rp-x', Math.round(r.left + r.width * p.x / 100) + 'px'); b.style.setProperty('--rp-y', Math.round(r.top + r.height * p.y / 100) + 'px'); L.push(b);
462
- }
463
- if (S.draft) { const sec = doc.querySelector('section.pmos-sec[data-sec-id="' + String(S.draft.slide).replace(/"/g, '') + '"]'); if (sec) { const r = sec.getBoundingClientRect(); const d = el('span', { class: 'rd-pindot h on', 'aria-hidden': 'true' }, String(live().length + 1)); d.style.setProperty('--rp-x', Math.round(r.left + r.width * S.draft.x / 100) + 'px'); d.style.setProperty('--rp-y', Math.round(r.top + r.height * S.draft.y / 100) + 'px'); L.push(d); } }
464
- }
465
- put(layer, ...L);
466
- }
467
- /* pins in a document are keyed by section: a pin's section box is the box its x and y are read in */
468
- function paint() {
469
- if (!S.loaded || !S.cyc || !S.cyc.designed) { put(root); return; }
470
- if (!S.R) { put(root, el('div', { class: 'fold w', role: 'alert' }, icon('alert', 'sm'), ' The render of this cycle could not be read: ' + (S.err || 'no answer') + '.')); return; }
471
- const y = scroller() ? scroller().scrollTop : 0;
472
- put(root, bar(), caps(), rbar(), copyNotice(), diffBox(), isDeck() ? (S.mode === 'cmp' && S.prevR ? cmpMain() : deckMain()) : docMain());
473
- const sc = scroller(); if (sc) sc.scrollTop = y;
474
- root.querySelectorAll('.rd-dk-th[aria-current="true"]').forEach((th) => { const st = th.parentNode; if (st.scrollHeight > st.clientHeight + 4) st.scrollTop = Math.max(0, th.offsetTop - st.offsetTop - 8); if (st.scrollWidth > st.clientWidth + 4) st.scrollLeft = Math.max(0, th.offsetLeft - st.offsetLeft - 8); });
475
- }
476
- const scroller = () => root.closest('.sb');
477
- const dayAt = (iso) => { const m = /^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2})/.exec(String(iso || '')); return m ? slotWord(m[1] + '-' + m[2] + '-' + m[3]) + ', ' + m[4] + ':' + m[5] : String(iso || ''); };
478
-
479
- function doPrint() {
480
- if (!S.R) return;
481
- const ok = printDeck(S.R, { title: (o.name || 'Report') + (o.cycle ? ' ' + o.cycle : '') });
482
- toast(ok ? 'The print view is open: one ' + (isDeck() ? 'slide' : 'document') + ' per page, without your speaker notes or the notes on the slide. Choose Save as PDF. Nothing is uploaded.' : 'The browser blocked the print window. Allow pop-ups for this page, then press Print again.');
483
- }
484
-
485
- /* ── Present: the presenter view and the audience view, on the .rp-deck stage ── */
486
- let OV = null;
487
- /* The audience window (initiative meeting-material-replay-gaps): a page of its own that shows the slides only and follows this view's slide. */
488
- let AUD = null;
489
- function closeAud() {
490
- if (!AUD) return;
491
- try { if (AUD.ch) { AUD.ch.postMessage({ t: 'close' }); AUD.ch.close(); } } catch { /* gone */ }
492
- try { if (AUD.win && !AUD.win.closed) AUD.win.close(); } catch { /* gone */ }
493
- AUD = null;
494
- }
495
- /** Open the audience window. → true, or false when the browser blocked it (the caller falls back to the full-screen view in this window). */
496
- function openAudience() {
497
- if (!isDeck()) return false;
498
- if (AUD && AUD.win && !AUD.win.closed) { try { AUD.win.focus(); } catch { /* blocked */ } return true; }
499
- const w = openAudienceWindow({ ws, path, name: (o.name || 'Report') + (o.cycle ? ' · ' + o.cycle : ''), start: OV ? OV.i : S.cur });
500
- if (!w) return false;
501
- AUD = w;
502
- if (AUD.ch) AUD.ch.onmessage = (e) => {
503
- const m = e && e.data; if (!m || typeof m !== 'object') return;
504
- if (m.t === 'hello') AUD.ch.postMessage({ t: 'slide', i: OV ? OV.i : S.cur });
505
- else if (m.t === 'slide' && Number.isInteger(m.i)) { if (OV) ovGo(m.i, { quiet: true }); else { S.cur = Math.max(0, Math.min(count() - 1, m.i)); } }
506
- };
507
- return true;
508
- }
509
- /** The Audience view press: the window, else (blocked) the full-screen view in this window with a notice that says why. */
510
- function audienceView() {
511
- if (openAudience()) return;
512
- toast({ text: 'The audience window was blocked. Allow pop-ups for this page, or use the full-screen view here.', actionLabel: 'Full-screen view here', timeout: 10000, onAction: () => present('aud') });
513
- }
514
- function closeOV() {
515
- if (!OV) return; clearInterval(OV.timer); window.removeEventListener('keydown', OV.key, true); window.removeEventListener('resize', OV.fit);
516
- OV.host.remove(); const i = OV.i; OV = null; S.cur = i; closeAud(); if (o.standalone) { try { window.close(); } catch { /* not ours to close */ } return; } paint(); const b = root.querySelector('[data-rd-act="present"]'); if (b) b.focus();
517
- }
518
- function present(kind, start) {
519
- if (!isDeck()) return;
520
- if (OV) { OV.kind = kind; paintOV(); return; }
521
- ensureC3Css();
522
- const el0 = el('div', { class: 'rp-deck rd-ov ' + (kind === 'pres' ? 'rd-pres' : 'rd-aud'), open: '', role: 'dialog', 'aria-modal': 'true', 'aria-roledescription': 'carousel', tabindex: '-1', 'data-rd-ov': '' });
523
- const host = el('div', { class: 'c3 c3e c3pop rd-ovhost', 'data-shell': 'present' }, el0);
524
- OV = { kind, i: Math.max(0, Math.min(count() - 1, start == null ? S.cur : start)), el: el0, host, t0: Date.now(), timer: null, x0: null, y0: null };
525
- OV.key = (e) => ovKey(e);
526
- OV.fit = () => fitOV();
527
- document.body.appendChild(host);
528
- window.addEventListener('keydown', OV.key, true); window.addEventListener('resize', OV.fit);
529
- el0.addEventListener('touchstart', touchStart, { passive: true }); el0.addEventListener('touchend', touchEnd, { passive: true });
530
- OV.timer = setInterval(() => { const t = OV && OV.el.querySelector('[data-rd-timer]'); if (t) t.textContent = clock(); }, 1000);
531
- paintOV(); el0.focus();
532
- }
533
- const touchStart = (e) => { const t = e.changedTouches[0]; if (OV) { OV.x0 = t.clientX; OV.y0 = t.clientY; } };
534
- const touchEnd = (e) => { if (!OV || OV.x0 == null) return; const t = e.changedTouches[0]; const dx = t.clientX - OV.x0; const dy = t.clientY - OV.y0; OV.x0 = null; if (Math.abs(dx) > 40 && Math.abs(dx) > 1.5 * Math.abs(dy)) ovGo(OV.i + (dx < 0 ? 1 : -1)); };
535
- function ovKey(e) {
536
- if (!OV) return; const k = e.key;
537
- if (k === 'Escape') { e.preventDefault(); e.stopImmediatePropagation(); closeOV(); return; }
538
- const onBtn = e.target && e.target.closest && e.target.closest('button');
539
- if (k === 'ArrowRight' || k === 'PageDown' || (k === ' ' && !onBtn)) { e.preventDefault(); e.stopImmediatePropagation(); ovGo(OV.i + 1); }
540
- else if (k === 'ArrowLeft' || k === 'PageUp') { e.preventDefault(); e.stopImmediatePropagation(); ovGo(OV.i - 1); }
541
- else if (k === 'Home') { e.preventDefault(); e.stopImmediatePropagation(); ovGo(0); }
542
- else if (k === 'End') { e.preventDefault(); e.stopImmediatePropagation(); ovGo(count() - 1); }
543
- }
544
- function ovGo(j, opt) {
545
- if (!OV) return; const n = Math.max(0, Math.min(count() - 1, j)); if (n === OV.i) return; OV.i = n; paintOV();
546
- if (!(opt && opt.quiet)) {
547
- if (AUD && AUD.ch) { try { AUD.ch.postMessage({ t: 'slide', i: n }); } catch { /* closed */ } }
548
- if (typeof o.onSlide === 'function') o.onSlide(n);
549
- }
550
- }
551
- const clock = () => { const s = Math.floor((Date.now() - OV.t0) / 1000); return pad2(Math.floor(s / 60)) + ':' + pad2(s % 60); };
552
- function fitOV() {
553
- if (!OV) return;
554
- if (OV.kind === 'aud') { const st = OV.el.querySelector('.rp-deck__stage'); if (!st) return; const r = st.getBoundingClientRect(); OV.el.style.setProperty('--rp-scale', String(Math.max(0.05, Math.min(r.width / W, r.height / H)).toFixed(4))); }
555
- }
556
- function ovBar(label) {
557
- const N = count();
558
- return el('div', { class: 'rp-deck__bar', role: 'toolbar', 'aria-label': label }, el('p', { class: 'rp-deck__label' }, label),
559
- btn({ class: 'ib', 'aria-label': 'Previous slide', 'data-rd-ovact': 'prev', disabled: OV.i === 0, onclick: () => ovGo(OV.i - 1) }, icon('prev')),
560
- el('p', { class: 'rp-deck__count', 'data-rd-count': '' }, (OV.i + 1) + ' / ' + N),
561
- btn({ class: 'ib', 'aria-label': 'Next slide', 'data-rd-ovact': 'next', disabled: OV.i === N - 1, onclick: () => ovGo(OV.i + 1) }, icon('next')),
562
- OV.kind === 'pres' ? pbtn('ghost', 'Audience view', 'eye', { 'data-rd-ovact': 'aud', onclick: () => audienceView() }) : pbtn('ghost', 'Presenter view', 'mic', { 'data-rd-ovact': 'pres', onclick: () => { OV.kind = 'pres'; paintOV(); } }),
563
- btn({ class: 'ib', 'aria-label': 'Close the slides (Escape)', 'data-rd-ovact': 'close', onclick: () => closeOV() }, icon('x')));
564
- }
565
- function paintOV() {
566
- const s = slides()[OV.i]; const name = (o.name || 'Report') + (o.cycle ? ' · ' + o.cycle : '');
567
- const fwd = (doc) => wireFrame(doc, { key: ovKey, touch: { start: touchStart, end: touchEnd }, src: (ref, n) => { const p = srcParts(ref); toast((n.textContent || '').trim() + ': ' + p.word + ' ' + p.id); }, initiative: (id) => toast('Initiative ' + id + '. Open it from the deck after the session.') });
568
- OV.el.className = 'rp-deck rd-ov ' + (OV.kind === 'pres' ? 'rd-pres' : 'rd-aud');
569
- OV.el.setAttribute('aria-label', OV.kind === 'pres' ? 'Presenter view' : 'Slides, full screen');
570
- if (OV.kind === 'aud') {
571
- const fr = frame(S.R.style, s.html, { title: 'Slide ' + s.n + ': ' + s.title, cls: 'pmos-one', onLoad: fwd });
572
- put(OV.el, el('div', { class: 'rp-deck__stage' }, el('div', { class: 'rp-deck__frame rd-ovframe', 'aria-live': 'polite', 'data-rd-ovslide': s.id }, fr)), ovBar(name + '. Arrows, Space or a swipe move; Escape closes.'));
573
- } else {
574
- const nx = slides()[OV.i + 1]; const n = S.notes.speaker[s.id]; const sug = !n && S.notes.suggestions[s.id];
575
- put(OV.el, el('div', { class: 'rd-pg' },
576
- el('div', { class: 'rd-pmain' }, el('div', { class: 'rd-pp rd-plab' }, el('span', { class: 'chips2' }, el('span', { class: 'tag acc' }, 'Now'), el('b', null, 'Slide ' + s.n + ' of ' + count() + ': ' + s.title)), el('span', { class: 'dim mono rd-small' }, 'The audience sees only this slide')),
577
- slideCard(S.R, s, { attrs: { 'data-rd-ovslide': s.id }, wire: fwd }),
578
- el('div', { class: 'rd-pp', 'data-rd-ovnote': '' }, el('div', { class: 'rd-ph' }, icon('mic', 'sm'), 'Speaker notes ', el('span', { class: 'tag' }, 'Private')),
579
- n && n.text ? el('p', { class: 'rd-pnote' }, n.text) : sug ? el('p', { class: 'rd-pnote dim' }, 'From ' + slotWord(sug.from_slot) + ', not kept yet: ' + sug.text) : el('p', { class: 'dim rd-m0' }, 'No speaker note for this slide.'))),
580
- el('div', { class: 'rd-pside' }, el('div', { class: 'rd-pp rd-ptime' }, el('div', null, el('div', { class: 'rd-ph' }, icon('clock', 'sm'), 'Time'), el('b', { class: 'rd-timer', 'data-rd-timer': '' }, clock())), el('div', null, el('div', { class: 'rd-ph' }, 'Slide'), el('b', { class: 'rd-timer', 'data-rd-pn': '' }, s.n + ' / ' + count()))),
581
- el('div', { class: 'rd-pp' }, el('div', { class: 'rd-ph' }, icon('next', 'sm'), 'Next'), nx ? [slideCard(S.R, nx, { attrs: { 'data-rd-ovnext': nx.id } }), el('div', { class: 'dim rd-small' }, nx.n + '. ' + nx.title)] : el('p', { class: 'dim rd-m0' }, 'This is the last slide.')),
582
- el('div', { class: 'rd-pp' }, el('div', { class: 'rd-ph' }, icon('menu', 'sm'), 'Jump to'), el('ol', { class: 'rd-jump' }, slides().map((x, j) => el('li', null, btn({ 'data-rd-jump': String(j), 'aria-current': String(j === OV.i), onclick: () => ovGo(j) }, el('span', { class: 'mono' }, pad2(x.n)), x.title, S.notes.speaker[x.id] && S.notes.speaker[x.id].text ? icon('mic', 'sm') : null))))))),
583
- ovBar('Presenter view · ' + name + '. Only you see this screen. Nothing is sent.'));
584
- }
585
- requestAnimationFrame(fitOV);
586
- if (!OV.el.contains(document.activeElement)) OV.el.focus();
587
- }
588
-
589
- load();
590
- return {
591
- state: S,
592
- node(api) { S.api = api; if (!S.loaded || !S.cyc || !S.cyc.designed) return null; paint(); return root; },
593
- tools() { return S.loaded && S.cyc && S.cyc.designed && isDeck() ? [btn({ class: 'ib sm', 'aria-label': 'Present', title: 'Present', 'data-rd-act': 'present-top', onclick: () => present('pres') }, icon('play', 'sm'))] : []; },
594
- present, reload: load, close: closeOV, audience: audienceView, openAudience,
595
- /** Move to slide j (the audience window follows the presenter this way). opt.quiet: do not tell the other window. */
596
- goTo(j, opt) { if (OV) ovGo(j, opt); else S.cur = Math.max(0, Math.min(count() - 1, j)); },
597
- };
598
- }