@epic-web/workshop-app 6.69.1 → 6.71.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 (225) hide show
  1. package/build/client/assets/{_-BnmXymJG.js → _-dWSrc4Ox.js} +2 -2
  2. package/build/client/assets/{_-BnmXymJG.js.map → _-dWSrc4Ox.js.map} +1 -1
  3. package/build/client/assets/{_basePickBy-D6pFkWVF.js → _basePickBy-D77BeQbR.js} +2 -2
  4. package/build/client/assets/{_basePickBy-D6pFkWVF.js.map → _basePickBy-D77BeQbR.js.map} +1 -1
  5. package/build/client/assets/{_baseUniq-BbljtzXr.js → _baseUniq-DTO-tFvD.js} +2 -2
  6. package/build/client/assets/{_baseUniq-BbljtzXr.js.map → _baseUniq-DTO-tFvD.js.map} +1 -1
  7. package/build/client/assets/{_exerciseNumber-77g7-L-x.js → _exerciseNumber-DgMb13KP.js} +2 -2
  8. package/build/client/assets/{_exerciseNumber-77g7-L-x.js.map → _exerciseNumber-DgMb13KP.js.map} +1 -1
  9. package/build/client/assets/{_exerciseNumber_._stepNumber.index-DYb7kg06.js → _exerciseNumber_._stepNumber.index-WLW-sVZ0.js} +2 -2
  10. package/build/client/assets/{_exerciseNumber_._stepNumber.index-DYb7kg06.js.map → _exerciseNumber_._stepNumber.index-WLW-sVZ0.js.map} +1 -1
  11. package/build/client/assets/{_exerciseNumber_.finished-CGoPhVVF.js → _exerciseNumber_.finished-DkAs61X_.js} +2 -2
  12. package/build/client/assets/_exerciseNumber_.finished-DkAs61X_.js.map +1 -0
  13. package/build/client/assets/_extra-fwsy2qkP.js +2 -0
  14. package/build/client/assets/_extra-fwsy2qkP.js.map +1 -0
  15. package/build/client/assets/_layout-BQ8VYaze.js +2 -0
  16. package/build/client/assets/_layout-BQ8VYaze.js.map +1 -0
  17. package/build/client/assets/_layout-DR0LQ06M.js +2 -0
  18. package/build/client/assets/_layout-DR0LQ06M.js.map +1 -0
  19. package/build/client/assets/{accordion-CzXT3k43.js → accordion-CQ7oujC6.js} +2 -2
  20. package/build/client/assets/{accordion-CzXT3k43.js.map → accordion-CQ7oujC6.js.map} +1 -1
  21. package/build/client/assets/{account-Cs3Te0is.js → account-C96cpeZR.js} +2 -2
  22. package/build/client/assets/{account-Cs3Te0is.js.map → account-C96cpeZR.js.map} +1 -1
  23. package/build/client/assets/app-CJniokic.js +2 -0
  24. package/build/client/assets/{app-TcFAQB2o.js.map → app-CJniokic.js.map} +1 -1
  25. package/build/client/assets/{arc-BHxP6xxO.js → arc-ChVm3d4e.js} +2 -2
  26. package/build/client/assets/{arc-BHxP6xxO.js.map → arc-ChVm3d4e.js.map} +1 -1
  27. package/build/client/assets/{architectureDiagram-VXUJARFQ-oEJHJt7x.js → architectureDiagram-VXUJARFQ-DkqyKZ50.js} +2 -2
  28. package/build/client/assets/{architectureDiagram-VXUJARFQ-oEJHJt7x.js.map → architectureDiagram-VXUJARFQ-DkqyKZ50.js.map} +1 -1
  29. package/build/client/assets/{blockDiagram-VD42YOAC-7xzSJqoM.js → blockDiagram-VD42YOAC-Cqa8Z0qT.js} +2 -2
  30. package/build/client/assets/{blockDiagram-VD42YOAC-7xzSJqoM.js.map → blockDiagram-VD42YOAC-Cqa8Z0qT.js.map} +1 -1
  31. package/build/client/assets/{button-CIlVtsau.js → button-Cd-ekki5.js} +2 -2
  32. package/build/client/assets/{button-CIlVtsau.js.map → button-Cd-ekki5.js.map} +1 -1
  33. package/build/client/assets/{c4Diagram-YG6GDRKO-BUdT9rCJ.js → c4Diagram-YG6GDRKO-BHQRSJ1P.js} +2 -2
  34. package/build/client/assets/{c4Diagram-YG6GDRKO-BUdT9rCJ.js.map → c4Diagram-YG6GDRKO-BHQRSJ1P.js.map} +1 -1
  35. package/build/client/assets/{cache-MJu_dqFS.js → cache-CAr50MIB.js} +2 -2
  36. package/build/client/assets/{cache-MJu_dqFS.js.map → cache-CAr50MIB.js.map} +1 -1
  37. package/build/client/assets/channel-B7uExpgv.js +2 -0
  38. package/build/client/assets/{channel-BLJkdd1O.js.map → channel-B7uExpgv.js.map} +1 -1
  39. package/build/client/assets/{chunk-4BX2VUAB-qrzenNNi.js → chunk-4BX2VUAB-BOJM4J9w.js} +2 -2
  40. package/build/client/assets/{chunk-4BX2VUAB-qrzenNNi.js.map → chunk-4BX2VUAB-BOJM4J9w.js.map} +1 -1
  41. package/build/client/assets/{chunk-55IACEB6-BOr0rES3.js → chunk-55IACEB6-CO_GT_87.js} +2 -2
  42. package/build/client/assets/{chunk-55IACEB6-BOr0rES3.js.map → chunk-55IACEB6-CO_GT_87.js.map} +1 -1
  43. package/build/client/assets/{chunk-B4BG7PRW-C2qQTBXm.js → chunk-B4BG7PRW-CqfZTumF.js} +2 -2
  44. package/build/client/assets/{chunk-B4BG7PRW-C2qQTBXm.js.map → chunk-B4BG7PRW-CqfZTumF.js.map} +1 -1
  45. package/build/client/assets/{chunk-DI55MBZ5-CSfEUcAq.js → chunk-DI55MBZ5-CxSXOmoK.js} +2 -2
  46. package/build/client/assets/{chunk-DI55MBZ5-CSfEUcAq.js.map → chunk-DI55MBZ5-CxSXOmoK.js.map} +1 -1
  47. package/build/client/assets/{chunk-FMBD7UC4-CyJoWksV.js → chunk-FMBD7UC4-ChHVMdVq.js} +2 -2
  48. package/build/client/assets/{chunk-FMBD7UC4-CyJoWksV.js.map → chunk-FMBD7UC4-ChHVMdVq.js.map} +1 -1
  49. package/build/client/assets/{chunk-QN33PNHL-BpbvTQdp.js → chunk-QN33PNHL-DKEBwj3f.js} +2 -2
  50. package/build/client/assets/{chunk-QN33PNHL-BpbvTQdp.js.map → chunk-QN33PNHL-DKEBwj3f.js.map} +1 -1
  51. package/build/client/assets/{chunk-QZHKN3VN-C2RN0CtQ.js → chunk-QZHKN3VN-Cu5tuE5n.js} +2 -2
  52. package/build/client/assets/{chunk-QZHKN3VN-C2RN0CtQ.js.map → chunk-QZHKN3VN-Cu5tuE5n.js.map} +1 -1
  53. package/build/client/assets/{chunk-TZMSLE5B-0z8lxtDn.js → chunk-TZMSLE5B-BpvH1fVS.js} +2 -2
  54. package/build/client/assets/{chunk-TZMSLE5B-0z8lxtDn.js.map → chunk-TZMSLE5B-BpvH1fVS.js.map} +1 -1
  55. package/build/client/assets/classDiagram-2ON5EDUG-BjjlpwdW.js +2 -0
  56. package/build/client/assets/{classDiagram-2ON5EDUG-_kfNpv_f.js.map → classDiagram-2ON5EDUG-BjjlpwdW.js.map} +1 -1
  57. package/build/client/assets/classDiagram-v2-WZHVMYZB-BjjlpwdW.js +2 -0
  58. package/build/client/assets/{classDiagram-v2-WZHVMYZB-_kfNpv_f.js.map → classDiagram-v2-WZHVMYZB-BjjlpwdW.js.map} +1 -1
  59. package/build/client/assets/clone-DRkw5ylZ.js +2 -0
  60. package/build/client/assets/{clone-CztDUJhf.js.map → clone-DRkw5ylZ.js.map} +1 -1
  61. package/build/client/assets/{cose-bilkent-S5V4N54A-DQM-J4RL.js → cose-bilkent-S5V4N54A-9tAqXXXx.js} +2 -2
  62. package/build/client/assets/{cose-bilkent-S5V4N54A-DQM-J4RL.js.map → cose-bilkent-S5V4N54A-9tAqXXXx.js.map} +1 -1
  63. package/build/client/assets/{dagre-6UL2VRFP-BdfvKPZ9.js → dagre-6UL2VRFP-DdQahM76.js} +2 -2
  64. package/build/client/assets/{dagre-6UL2VRFP-BdfvKPZ9.js.map → dagre-6UL2VRFP-DdQahM76.js.map} +1 -1
  65. package/build/client/assets/{db-x6v-Uxrh.js → db-DAnX-T3_.js} +2 -2
  66. package/build/client/assets/{db-x6v-Uxrh.js.map → db-DAnX-T3_.js.map} +1 -1
  67. package/build/client/assets/{diagram-PSM6KHXK-CgwBEb3G.js → diagram-PSM6KHXK-D2ghOCFR.js} +2 -2
  68. package/build/client/assets/{diagram-PSM6KHXK-CgwBEb3G.js.map → diagram-PSM6KHXK-D2ghOCFR.js.map} +1 -1
  69. package/build/client/assets/{diagram-QEK2KX5R-DEaXdLXz.js → diagram-QEK2KX5R-CVdPnwKa.js} +2 -2
  70. package/build/client/assets/{diagram-QEK2KX5R-DEaXdLXz.js.map → diagram-QEK2KX5R-CVdPnwKa.js.map} +1 -1
  71. package/build/client/assets/{diagram-S2PKOQOG-Dq5QQWqq.js → diagram-S2PKOQOG-ByHcRNai.js} +2 -2
  72. package/build/client/assets/{diagram-S2PKOQOG-Dq5QQWqq.js.map → diagram-S2PKOQOG-ByHcRNai.js.map} +1 -1
  73. package/build/client/assets/{dialog-DnpUg3VT.js → dialog-CzO65Z5w.js} +3 -3
  74. package/build/client/assets/{dialog-DnpUg3VT.js.map → dialog-CzO65Z5w.js.map} +1 -1
  75. package/build/client/assets/{diff-CxEbhF8Q.js → diff-BhWzqoVN.js} +2 -2
  76. package/build/client/assets/{diff-CxEbhF8Q.js.map → diff-BhWzqoVN.js.map} +1 -1
  77. package/build/client/assets/{diff-eAvgXb3f.js → diff-DC-wn6-x.js} +2 -2
  78. package/build/client/assets/{diff-eAvgXb3f.js.map → diff-DC-wn6-x.js.map} +1 -1
  79. package/build/client/assets/{discord-DlU9y5Iz.js → discord-BJkw0IrB.js} +2 -2
  80. package/build/client/assets/{discord-DlU9y5Iz.js.map → discord-BJkw0IrB.js.map} +1 -1
  81. package/build/client/assets/{discord-CuxZiU8E.js → discord-r3m19sUM.js} +2 -2
  82. package/build/client/assets/discord-r3m19sUM.js.map +1 -0
  83. package/build/client/assets/{epic-video-Bx8Ctiez.js → epic-video-8Hv_HMMr.js} +2 -2
  84. package/build/client/assets/{epic-video-Bx8Ctiez.js.map → epic-video-8Hv_HMMr.js.map} +1 -1
  85. package/build/client/assets/{epic-video-BVcJzJzi.js → epic-video-D0drHmgC.js} +2 -2
  86. package/build/client/assets/{epic-video-BVcJzJzi.js.map → epic-video-D0drHmgC.js.map} +1 -1
  87. package/build/client/assets/{erDiagram-Q2GNP2WA-CW73Zw0q.js → erDiagram-Q2GNP2WA-CBRWzQzK.js} +2 -2
  88. package/build/client/assets/{erDiagram-Q2GNP2WA-CW73Zw0q.js.map → erDiagram-Q2GNP2WA-CBRWzQzK.js.map} +1 -1
  89. package/build/client/assets/{error-boundary-DFBd6s0g.js → error-boundary-DVp6wKiz.js} +2 -2
  90. package/build/client/assets/{error-boundary-DFBd6s0g.js.map → error-boundary-DVp6wKiz.js.map} +1 -1
  91. package/build/client/assets/{finished-CmV4aFjA.js → finished-CiVHAeSV.js} +2 -2
  92. package/build/client/assets/{finished-CmV4aFjA.js.map → finished-CiVHAeSV.js.map} +1 -1
  93. package/build/client/assets/{flowDiagram-NV44I4VS-BbxV9VQf.js → flowDiagram-NV44I4VS-L32__tfK.js} +2 -2
  94. package/build/client/assets/{flowDiagram-NV44I4VS-BbxV9VQf.js.map → flowDiagram-NV44I4VS-L32__tfK.js.map} +1 -1
  95. package/build/client/assets/{ganttDiagram-JELNMOA3-CRBJBlE5.js → ganttDiagram-JELNMOA3-Dpp5PKJc.js} +2 -2
  96. package/build/client/assets/{ganttDiagram-JELNMOA3-CRBJBlE5.js.map → ganttDiagram-JELNMOA3-Dpp5PKJc.js.map} +1 -1
  97. package/build/client/assets/{gitGraphDiagram-NY62KEGX-CU0X3hfs.js → gitGraphDiagram-NY62KEGX-zn4IXANG.js} +2 -2
  98. package/build/client/assets/{gitGraphDiagram-NY62KEGX-CU0X3hfs.js.map → gitGraphDiagram-NY62KEGX-zn4IXANG.js.map} +1 -1
  99. package/build/client/assets/{graph-CEUh1UxC.js → graph-Da5nhwRG.js} +2 -2
  100. package/build/client/assets/{graph-CEUh1UxC.js.map → graph-Da5nhwRG.js.map} +1 -1
  101. package/build/client/assets/guide-Cinib8Ji.js +9 -0
  102. package/build/client/assets/guide-Cinib8Ji.js.map +1 -0
  103. package/build/client/assets/{index-D3zOGeBE.js → index-BKAVQvm5.js} +2 -2
  104. package/build/client/assets/{index-D3zOGeBE.js.map → index-BKAVQvm5.js.map} +1 -1
  105. package/build/client/assets/{index-BOhw3wcM.js → index-CJDOQ1bl.js} +2 -2
  106. package/build/client/assets/{index-BOhw3wcM.js.map → index-CJDOQ1bl.js.map} +1 -1
  107. package/build/client/assets/{index-B-9GR1C2.js → index-C_wcF1aP.js} +2 -2
  108. package/build/client/assets/{index-B-9GR1C2.js.map → index-C_wcF1aP.js.map} +1 -1
  109. package/build/client/assets/{index-BW8stNyh.js → index-CdzVFL-Z.js} +3 -3
  110. package/build/client/assets/{index-BW8stNyh.js.map → index-CdzVFL-Z.js.map} +1 -1
  111. package/build/client/assets/index-CmflCPTU.js +2 -0
  112. package/build/client/assets/index-CmflCPTU.js.map +1 -0
  113. package/build/client/assets/index-DuFMeXSm.js +2 -0
  114. package/build/client/assets/index-DuFMeXSm.js.map +1 -0
  115. package/build/client/assets/index-hhQHCvb9.js +2 -0
  116. package/build/client/assets/{index-EdNV8gTk.js.map → index-hhQHCvb9.js.map} +1 -1
  117. package/build/client/assets/{index-C_KjwKVt.js → index-ynYvVAOK.js} +2 -2
  118. package/build/client/assets/{index-C_KjwKVt.js.map → index-ynYvVAOK.js.map} +1 -1
  119. package/build/client/assets/{infoDiagram-WHAUD3N6-BplcSre1.js → infoDiagram-WHAUD3N6-CToPP1ur.js} +2 -2
  120. package/build/client/assets/{infoDiagram-WHAUD3N6-BplcSre1.js.map → infoDiagram-WHAUD3N6-CToPP1ur.js.map} +1 -1
  121. package/build/client/assets/{journeyDiagram-XKPGCS4Q-yxvCkf49.js → journeyDiagram-XKPGCS4Q-BBRpqEuF.js} +2 -2
  122. package/build/client/assets/{journeyDiagram-XKPGCS4Q-yxvCkf49.js.map → journeyDiagram-XKPGCS4Q-BBRpqEuF.js.map} +1 -1
  123. package/build/client/assets/{kanban-definition-3W4ZIXB7-DFEBMrRH.js → kanban-definition-3W4ZIXB7-CyGlZ-MK.js} +2 -2
  124. package/build/client/assets/{kanban-definition-3W4ZIXB7-DFEBMrRH.js.map → kanban-definition-3W4ZIXB7-CyGlZ-MK.js.map} +1 -1
  125. package/build/client/assets/{launch-editor-B2dmpkaO.js → launch-editor-D2exGfVu.js} +2 -2
  126. package/build/client/assets/{launch-editor-B2dmpkaO.js.map → launch-editor-D2exGfVu.js.map} +1 -1
  127. package/build/client/assets/{layout-CiHrgFnf.js → layout-CUEelucj.js} +2 -2
  128. package/build/client/assets/{layout-CiHrgFnf.js.map → layout-CUEelucj.js.map} +1 -1
  129. package/build/client/assets/{linear-C-81cvJP.js → linear-DzZ9bjHs.js} +2 -2
  130. package/build/client/assets/{linear-C-81cvJP.js.map → linear-DzZ9bjHs.js.map} +1 -1
  131. package/build/client/assets/{loading-CUydCGD3.js → loading-CDNzW5oO.js} +2 -2
  132. package/build/client/assets/{loading-CUydCGD3.js.map → loading-CDNzW5oO.js.map} +1 -1
  133. package/build/client/assets/{login-DvBmP_ce.js → login-mWjVXGbJ.js} +2 -2
  134. package/build/client/assets/{login-DvBmP_ce.js.map → login-mWjVXGbJ.js.map} +1 -1
  135. package/build/client/assets/manifest-970c9ad1.js +1 -0
  136. package/build/client/assets/{mdx-vrch0szL.js → mdx-BzyhMqFg.js} +3 -3
  137. package/build/client/assets/{mdx-vrch0szL.js.map → mdx-BzyhMqFg.js.map} +1 -1
  138. package/build/client/assets/{mermaid.core-D3y7PO8B.js → mermaid.core-BdxLLjl2.js} +5 -5
  139. package/build/client/assets/{mermaid.core-D3y7PO8B.js.map → mermaid.core-BdxLLjl2.js.map} +1 -1
  140. package/build/client/assets/{mindmap-definition-VGOIOE7T-VMZ6ZZlW.js → mindmap-definition-VGOIOE7T-DeKD8ncg.js} +2 -2
  141. package/build/client/assets/{mindmap-definition-VGOIOE7T-VMZ6ZZlW.js.map → mindmap-definition-VGOIOE7T-DeKD8ncg.js.map} +1 -1
  142. package/build/client/assets/{misc-DVYuZMjW.js → misc-W4055b-0.js} +2 -2
  143. package/build/client/assets/{misc-DVYuZMjW.js.map → misc-W4055b-0.js.map} +1 -1
  144. package/build/client/assets/{nav-chevrons-DlNUibJV.js → nav-chevrons-Dk4GtZwQ.js} +2 -2
  145. package/build/client/assets/{nav-chevrons-DlNUibJV.js.map → nav-chevrons-Dk4GtZwQ.js.map} +1 -1
  146. package/build/client/assets/{offline-videos-Do9PBh87.js → offline-videos-BP7_xJkO.js} +2 -2
  147. package/build/client/assets/{offline-videos-Do9PBh87.js.map → offline-videos-BP7_xJkO.js.map} +1 -1
  148. package/build/client/assets/{onboarding-indicator-CVwXz3Cn.js → onboarding-indicator-B-XR90_G.js} +2 -2
  149. package/build/client/assets/{onboarding-indicator-CVwXz3Cn.js.map → onboarding-indicator-B-XR90_G.js.map} +1 -1
  150. package/build/client/assets/{pieDiagram-ADFJNKIX-CKbrBdQs.js → pieDiagram-ADFJNKIX-BQ4sFDrB.js} +2 -2
  151. package/build/client/assets/{pieDiagram-ADFJNKIX-CKbrBdQs.js.map → pieDiagram-ADFJNKIX-BQ4sFDrB.js.map} +1 -1
  152. package/build/client/assets/playground-DmEAkxG1.js +2 -0
  153. package/build/client/assets/playground-DmEAkxG1.js.map +1 -0
  154. package/build/client/assets/{playground-window-D9a7P7rH.js → playground-window-x2mQ5o1O.js} +2 -2
  155. package/build/client/assets/{playground-window-D9a7P7rH.js.map → playground-window-x2mQ5o1O.js.map} +1 -1
  156. package/build/client/assets/{preferences-BCvK10k2.js → preferences-D6HQ5bK1.js} +2 -2
  157. package/build/client/assets/{preferences-BCvK10k2.js.map → preferences-D6HQ5bK1.js.map} +1 -1
  158. package/build/client/assets/{preview-CiDtuQCc.js → preview-fhmjENlm.js} +2 -2
  159. package/build/client/assets/{preview-CiDtuQCc.js.map → preview-fhmjENlm.js.map} +1 -1
  160. package/build/client/assets/{product-GLsnY1u3.js → product-CvyMpYD_.js} +2 -2
  161. package/build/client/assets/{product-GLsnY1u3.js.map → product-CvyMpYD_.js.map} +1 -1
  162. package/build/client/assets/{progress-fKsNxmmt.js → progress-ILaVQtOO.js} +2 -2
  163. package/build/client/assets/{progress-fKsNxmmt.js.map → progress-ILaVQtOO.js.map} +1 -1
  164. package/build/client/assets/{progress-bar-B27isaGl.js → progress-bar-DpWhcyhC.js} +2 -2
  165. package/build/client/assets/{progress-bar-B27isaGl.js.map → progress-bar-DpWhcyhC.js.map} +1 -1
  166. package/build/client/assets/{quadrantDiagram-AYHSOK5B-Bb5EtkPw.js → quadrantDiagram-AYHSOK5B-QnjodHfi.js} +2 -2
  167. package/build/client/assets/{quadrantDiagram-AYHSOK5B-Bb5EtkPw.js.map → quadrantDiagram-AYHSOK5B-QnjodHfi.js.map} +1 -1
  168. package/build/client/assets/{requirementDiagram-UZGBJVZJ-BNsXiFG2.js → requirementDiagram-UZGBJVZJ-mL9Oeda0.js} +2 -2
  169. package/build/client/assets/{requirementDiagram-UZGBJVZJ-BNsXiFG2.js.map → requirementDiagram-UZGBJVZJ-mL9Oeda0.js.map} +1 -1
  170. package/build/client/assets/{root-Ch373D3a.js → root-Bktp3RtN.js} +2 -2
  171. package/build/client/assets/{root-Ch373D3a.js.map → root-Bktp3RtN.js.map} +1 -1
  172. package/build/client/assets/{sankeyDiagram-TZEHDZUN-qlPqhk7P.js → sankeyDiagram-TZEHDZUN-B8_zpQVR.js} +2 -2
  173. package/build/client/assets/{sankeyDiagram-TZEHDZUN-qlPqhk7P.js.map → sankeyDiagram-TZEHDZUN-B8_zpQVR.js.map} +1 -1
  174. package/build/client/assets/{sequenceDiagram-WL72ISMW-C3d31B7K.js → sequenceDiagram-WL72ISMW-BDd5tjuk.js} +2 -2
  175. package/build/client/assets/{sequenceDiagram-WL72ISMW-C3d31B7K.js.map → sequenceDiagram-WL72ISMW-BDd5tjuk.js.map} +1 -1
  176. package/build/client/assets/{set-playground-DeMY9i7p.js → set-playground-BSGwH9dH.js} +2 -2
  177. package/build/client/assets/{set-playground-DeMY9i7p.js.map → set-playground-BSGwH9dH.js.map} +1 -1
  178. package/build/client/assets/{stateDiagram-FKZM4ZOC-C1eIQm_7.js → stateDiagram-FKZM4ZOC-DGPNpRbW.js} +2 -2
  179. package/build/client/assets/{stateDiagram-FKZM4ZOC-C1eIQm_7.js.map → stateDiagram-FKZM4ZOC-DGPNpRbW.js.map} +1 -1
  180. package/build/client/assets/stateDiagram-v2-4FDKWEC3-DxaFuKxL.js +2 -0
  181. package/build/client/assets/{stateDiagram-v2-4FDKWEC3-CAmcrDIS.js.map → stateDiagram-v2-4FDKWEC3-DxaFuKxL.js.map} +1 -1
  182. package/build/client/assets/status-indicator-C6DiLYL5.js +2 -0
  183. package/build/client/assets/status-indicator-C6DiLYL5.js.map +1 -0
  184. package/build/client/assets/tailwind-B97VvnKU.css +1 -0
  185. package/build/client/assets/test-DtQCjBBX.js +2 -0
  186. package/build/client/assets/{test-CdEKoDoS.js.map → test-DtQCjBBX.js.map} +1 -1
  187. package/build/client/assets/{tests-xD9PppmM.js → tests-fDISNsE-.js} +2 -2
  188. package/build/client/assets/{tests-xD9PppmM.js.map → tests-fDISNsE-.js.map} +1 -1
  189. package/build/client/assets/{timeline-definition-IT6M3QCI-Di_ZGPjO.js → timeline-definition-IT6M3QCI-BnMOh0dz.js} +2 -2
  190. package/build/client/assets/{timeline-definition-IT6M3QCI-Di_ZGPjO.js.map → timeline-definition-IT6M3QCI-BnMOh0dz.js.map} +1 -1
  191. package/build/client/assets/{tooltip-Chzzs4KB.js → tooltip-Tlsyx2YO.js} +2 -2
  192. package/build/client/assets/{tooltip-Chzzs4KB.js.map → tooltip-Tlsyx2YO.js.map} +1 -1
  193. package/build/client/assets/{treemap-KMMF4GRG-DZrMUxqR.js → treemap-KMMF4GRG-Ds3XkDP-.js} +2 -2
  194. package/build/client/assets/{treemap-KMMF4GRG-DZrMUxqR.js.map → treemap-KMMF4GRG-Ds3XkDP-.js.map} +1 -1
  195. package/build/client/assets/{workspace-structure-i_5Tiikk.js → workspace-structure-B6Rpl-B2.js} +2 -2
  196. package/build/client/assets/{workspace-structure-i_5Tiikk.js.map → workspace-structure-B6Rpl-B2.js.map} +1 -1
  197. package/build/client/assets/{xychartDiagram-PRI3JC2R-BxuKJVc7.js → xychartDiagram-PRI3JC2R-DH_JPNZp.js} +2 -2
  198. package/build/client/assets/{xychartDiagram-PRI3JC2R-BxuKJVc7.js.map → xychartDiagram-PRI3JC2R-DH_JPNZp.js.map} +1 -1
  199. package/build/server/index.js +690 -114
  200. package/build/server/index.js.map +1 -1
  201. package/package.json +3 -3
  202. package/build/client/assets/_exerciseNumber_.finished-CGoPhVVF.js.map +0 -1
  203. package/build/client/assets/_extra-BZPB_nWQ.js +0 -2
  204. package/build/client/assets/_extra-BZPB_nWQ.js.map +0 -1
  205. package/build/client/assets/_layout-BxQPZuW6.js +0 -2
  206. package/build/client/assets/_layout-BxQPZuW6.js.map +0 -1
  207. package/build/client/assets/_layout-yxOoJ6Yg.js +0 -2
  208. package/build/client/assets/_layout-yxOoJ6Yg.js.map +0 -1
  209. package/build/client/assets/app-TcFAQB2o.js +0 -2
  210. package/build/client/assets/channel-BLJkdd1O.js +0 -2
  211. package/build/client/assets/classDiagram-2ON5EDUG-_kfNpv_f.js +0 -2
  212. package/build/client/assets/classDiagram-v2-WZHVMYZB-_kfNpv_f.js +0 -2
  213. package/build/client/assets/clone-CztDUJhf.js +0 -2
  214. package/build/client/assets/discord-CuxZiU8E.js.map +0 -1
  215. package/build/client/assets/guide-B4wAqzq_.js +0 -9
  216. package/build/client/assets/guide-B4wAqzq_.js.map +0 -1
  217. package/build/client/assets/index-C6vQqVxz.js +0 -2
  218. package/build/client/assets/index-C6vQqVxz.js.map +0 -1
  219. package/build/client/assets/index-EdNV8gTk.js +0 -2
  220. package/build/client/assets/manifest-34df6718.js +0 -1
  221. package/build/client/assets/playground-C_aP_pE8.js +0 -2
  222. package/build/client/assets/playground-C_aP_pE8.js.map +0 -1
  223. package/build/client/assets/stateDiagram-v2-4FDKWEC3-CAmcrDIS.js +0 -2
  224. package/build/client/assets/tailwind-D_K12wB7.css +0 -1
  225. package/build/client/assets/test-CdEKoDoS.js +0 -2
@@ -1,2 +1,2 @@
1
- import{j as e}from"./jsx-runtime-C5WNSv3b.js";import{L as o}from"./chunk-EPOLDU6W-BCLmut3y.js";import{I as t}from"./misc-DVYuZMjW.js";function l({prev:a,next:r}){return e.jsxs("div",{className:"relative flex h-full overflow-hidden",children:[a?e.jsx(o,{prefetch:"intent",...a,"data-keyboard-action":"g+p",className:"group flex h-full items-center justify-center border-l px-7",children:e.jsxs(e.Fragment,{children:[e.jsx(t,{name:"ChevronLeft",className:"absolute opacity-100 transition duration-300 ease-in-out group-hover:translate-y-10 group-hover:opacity-0"}),e.jsx(t,{name:"ChevronLeft",className:"absolute -translate-y-10 opacity-0 transition duration-300 ease-in-out group-hover:translate-y-0 group-hover:opacity-100"})]})}):null,r?e.jsx(o,{prefetch:"intent",...r,"data-keyboard-action":"g+n",className:"group flex h-full items-center justify-center border-l px-7",children:e.jsxs(e.Fragment,{children:[e.jsx(t,{name:"ChevronRight",className:"absolute opacity-100 transition duration-300 ease-in-out group-hover:translate-y-10 group-hover:opacity-0"}),e.jsx(t,{name:"ChevronRight",className:"absolute -translate-y-10 opacity-0 transition duration-300 ease-in-out group-hover:translate-y-0 group-hover:opacity-100"})]})}):null]})}export{l as N};
2
- //# sourceMappingURL=nav-chevrons-DlNUibJV.js.map
1
+ import{j as e}from"./jsx-runtime-C5WNSv3b.js";import{L as o}from"./chunk-EPOLDU6W-BCLmut3y.js";import{I as t}from"./misc-W4055b-0.js";function l({prev:a,next:r}){return e.jsxs("div",{className:"relative flex h-full overflow-hidden",children:[a?e.jsx(o,{prefetch:"intent",...a,"data-keyboard-action":"g+p",className:"group flex h-full items-center justify-center border-l px-7",children:e.jsxs(e.Fragment,{children:[e.jsx(t,{name:"ChevronLeft",className:"absolute opacity-100 transition duration-300 ease-in-out group-hover:translate-y-10 group-hover:opacity-0"}),e.jsx(t,{name:"ChevronLeft",className:"absolute -translate-y-10 opacity-0 transition duration-300 ease-in-out group-hover:translate-y-0 group-hover:opacity-100"})]})}):null,r?e.jsx(o,{prefetch:"intent",...r,"data-keyboard-action":"g+n",className:"group flex h-full items-center justify-center border-l px-7",children:e.jsxs(e.Fragment,{children:[e.jsx(t,{name:"ChevronRight",className:"absolute opacity-100 transition duration-300 ease-in-out group-hover:translate-y-10 group-hover:opacity-0"}),e.jsx(t,{name:"ChevronRight",className:"absolute -translate-y-10 opacity-0 transition duration-300 ease-in-out group-hover:translate-y-0 group-hover:opacity-100"})]})}):null]})}export{l as N};
2
+ //# sourceMappingURL=nav-chevrons-Dk4GtZwQ.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"nav-chevrons-DlNUibJV.js","sources":["../../../app/components/nav-chevrons.tsx"],"sourcesContent":["import { Link, type LinkProps } from 'react-router'\nimport { Icon } from './icons.tsx'\n\nexport function NavChevrons({\n\tprev,\n\tnext,\n}: {\n\tprev?: LinkProps | null\n\tnext?: LinkProps | null\n}) {\n\treturn (\n\t\t<div className=\"relative flex h-full overflow-hidden\">\n\t\t\t{prev ? (\n\t\t\t\t<Link\n\t\t\t\t\tprefetch=\"intent\"\n\t\t\t\t\t{...prev}\n\t\t\t\t\tdata-keyboard-action=\"g+p\"\n\t\t\t\t\tclassName=\"group flex h-full items-center justify-center border-l px-7\"\n\t\t\t\t\tchildren={\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t<Icon\n\t\t\t\t\t\t\t\tname=\"ChevronLeft\"\n\t\t\t\t\t\t\t\tclassName=\"absolute opacity-100 transition duration-300 ease-in-out group-hover:translate-y-10 group-hover:opacity-0\"\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t<Icon\n\t\t\t\t\t\t\t\tname=\"ChevronLeft\"\n\t\t\t\t\t\t\t\tclassName=\"absolute -translate-y-10 opacity-0 transition duration-300 ease-in-out group-hover:translate-y-0 group-hover:opacity-100\"\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</>\n\t\t\t\t\t}\n\t\t\t\t/>\n\t\t\t) : null}\n\t\t\t{next ? (\n\t\t\t\t<Link\n\t\t\t\t\tprefetch=\"intent\"\n\t\t\t\t\t{...next}\n\t\t\t\t\tdata-keyboard-action=\"g+n\"\n\t\t\t\t\tclassName=\"group flex h-full items-center justify-center border-l px-7\"\n\t\t\t\t\tchildren={\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t<Icon\n\t\t\t\t\t\t\t\tname=\"ChevronRight\"\n\t\t\t\t\t\t\t\tclassName=\"absolute opacity-100 transition duration-300 ease-in-out group-hover:translate-y-10 group-hover:opacity-0\"\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t<Icon\n\t\t\t\t\t\t\t\tname=\"ChevronRight\"\n\t\t\t\t\t\t\t\tclassName=\"absolute -translate-y-10 opacity-0 transition duration-300 ease-in-out group-hover:translate-y-0 group-hover:opacity-100\"\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</>\n\t\t\t\t\t}\n\t\t\t\t/>\n\t\t\t) : null}\n\t\t</div>\n\t)\n}\n"],"names":["NavChevrons","prev","next","jsxs","jsx","Link","Fragment","Icon"],"mappings":"sIAGO,SAASA,EAAY,CAC3B,KAAAC,EACA,KAAAC,CACD,EAGG,CACF,OACCC,EAAAA,KAAC,MAAA,CAAI,UAAU,uCACb,SAAA,CAAAF,EACAG,EAAAA,IAACC,EAAA,CACA,SAAS,SACR,GAAGJ,EACJ,uBAAqB,MACrB,UAAU,8DACV,SACCE,EAAAA,KAAAG,WAAA,CACC,SAAA,CAAAF,EAAAA,IAACG,EAAA,CACA,KAAK,cACL,UAAU,2GAAA,CAAA,EAEXH,EAAAA,IAACG,EAAA,CACA,KAAK,cACL,UAAU,0HAAA,CAAA,CACX,CAAA,CACD,CAAA,CAAA,EAGC,KACHL,EACAE,EAAAA,IAACC,EAAA,CACA,SAAS,SACR,GAAGH,EACJ,uBAAqB,MACrB,UAAU,8DACV,SACCC,EAAAA,KAAAG,WAAA,CACC,SAAA,CAAAF,EAAAA,IAACG,EAAA,CACA,KAAK,eACL,UAAU,2GAAA,CAAA,EAEXH,EAAAA,IAACG,EAAA,CACA,KAAK,eACL,UAAU,0HAAA,CAAA,CACX,CAAA,CACD,CAAA,CAAA,EAGC,IAAA,EACL,CAEF"}
1
+ {"version":3,"file":"nav-chevrons-Dk4GtZwQ.js","sources":["../../../app/components/nav-chevrons.tsx"],"sourcesContent":["import { Link, type LinkProps } from 'react-router'\nimport { Icon } from './icons.tsx'\n\nexport function NavChevrons({\n\tprev,\n\tnext,\n}: {\n\tprev?: LinkProps | null\n\tnext?: LinkProps | null\n}) {\n\treturn (\n\t\t<div className=\"relative flex h-full overflow-hidden\">\n\t\t\t{prev ? (\n\t\t\t\t<Link\n\t\t\t\t\tprefetch=\"intent\"\n\t\t\t\t\t{...prev}\n\t\t\t\t\tdata-keyboard-action=\"g+p\"\n\t\t\t\t\tclassName=\"group flex h-full items-center justify-center border-l px-7\"\n\t\t\t\t\tchildren={\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t<Icon\n\t\t\t\t\t\t\t\tname=\"ChevronLeft\"\n\t\t\t\t\t\t\t\tclassName=\"absolute opacity-100 transition duration-300 ease-in-out group-hover:translate-y-10 group-hover:opacity-0\"\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t<Icon\n\t\t\t\t\t\t\t\tname=\"ChevronLeft\"\n\t\t\t\t\t\t\t\tclassName=\"absolute -translate-y-10 opacity-0 transition duration-300 ease-in-out group-hover:translate-y-0 group-hover:opacity-100\"\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</>\n\t\t\t\t\t}\n\t\t\t\t/>\n\t\t\t) : null}\n\t\t\t{next ? (\n\t\t\t\t<Link\n\t\t\t\t\tprefetch=\"intent\"\n\t\t\t\t\t{...next}\n\t\t\t\t\tdata-keyboard-action=\"g+n\"\n\t\t\t\t\tclassName=\"group flex h-full items-center justify-center border-l px-7\"\n\t\t\t\t\tchildren={\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t<Icon\n\t\t\t\t\t\t\t\tname=\"ChevronRight\"\n\t\t\t\t\t\t\t\tclassName=\"absolute opacity-100 transition duration-300 ease-in-out group-hover:translate-y-10 group-hover:opacity-0\"\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t<Icon\n\t\t\t\t\t\t\t\tname=\"ChevronRight\"\n\t\t\t\t\t\t\t\tclassName=\"absolute -translate-y-10 opacity-0 transition duration-300 ease-in-out group-hover:translate-y-0 group-hover:opacity-100\"\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</>\n\t\t\t\t\t}\n\t\t\t\t/>\n\t\t\t) : null}\n\t\t</div>\n\t)\n}\n"],"names":["NavChevrons","prev","next","jsxs","jsx","Link","Fragment","Icon"],"mappings":"sIAGO,SAASA,EAAY,CAC3B,KAAAC,EACA,KAAAC,CACD,EAGG,CACF,OACCC,EAAAA,KAAC,MAAA,CAAI,UAAU,uCACb,SAAA,CAAAF,EACAG,EAAAA,IAACC,EAAA,CACA,SAAS,SACR,GAAGJ,EACJ,uBAAqB,MACrB,UAAU,8DACV,SACCE,EAAAA,KAAAG,WAAA,CACC,SAAA,CAAAF,EAAAA,IAACG,EAAA,CACA,KAAK,cACL,UAAU,2GAAA,CAAA,EAEXH,EAAAA,IAACG,EAAA,CACA,KAAK,cACL,UAAU,0HAAA,CAAA,CACX,CAAA,CACD,CAAA,CAAA,EAGC,KACHL,EACAE,EAAAA,IAACC,EAAA,CACA,SAAS,SACR,GAAGH,EACJ,uBAAqB,MACrB,UAAU,8DACV,SACCC,EAAAA,KAAAG,WAAA,CACC,SAAA,CAAAF,EAAAA,IAACG,EAAA,CACA,KAAK,eACL,UAAU,2GAAA,CAAA,EAEXH,EAAAA,IAACG,EAAA,CACA,KAAK,eACL,UAAU,0HAAA,CAAA,CACX,CAAA,CACD,CAAA,CAAA,EAGC,IAAA,EACL,CAEF"}
@@ -1,2 +1,2 @@
1
- import{w as c,F as n}from"./chunk-EPOLDU6W-BCLmut3y.js";import{j as e}from"./jsx-runtime-C5WNSv3b.js";import{e as x,c as m}from"./misc-DVYuZMjW.js";import"./index-CqIc3cxq.js";function a(o){if(o<1024)return`${o} B`;const s=o/1024;if(s<1024)return`${s.toFixed(1)} KB`;const d=s/1024;return d<1024?`${d.toFixed(1)} MB`:`${(d/1024).toFixed(1)} GB`}function l({children:o,confirmLabel:s="Confirm",className:d,...t}){const{doubleCheck:r,getButtonProps:i}=x();return e.jsx("button",{...i(t),className:m("border-border bg-background text-foreground focus:ring-ring inline-flex min-w-[120px] items-center justify-center gap-2 rounded-md border px-3 py-1 text-sm font-medium transition-colors focus:ring-2 focus:ring-offset-2 focus:outline-none disabled:pointer-events-none disabled:opacity-50",r?"border-destructive bg-destructive text-destructive-foreground hover:bg-destructive/90 hover:text-destructive-foreground":"hover:bg-muted hover:text-foreground",d),children:e.jsxs("span",{className:"grid items-center justify-center",children:[e.jsx("span",{"aria-hidden":!0,className:"col-start-1 row-start-1 opacity-0",children:o}),e.jsx("span",{"aria-hidden":!0,className:"col-start-1 row-start-1 opacity-0",children:s}),e.jsx("span",{className:"col-start-1 row-start-1",children:r?s:o})]})})}const f=c(function({loaderData:s}){const{summary:d}=s;return d.workshops.length===0?e.jsx("p",{className:"text-muted-foreground text-sm",children:"No offline videos are downloaded yet."}):e.jsxs("div",{className:"flex flex-col gap-6",children:[e.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[e.jsx("h2",{className:"text-lg font-semibold",children:"Downloads"}),e.jsx(n,{method:"post",children:e.jsx(l,{type:"submit",name:"intent",value:"delete-all",children:"Delete all downloads"})})]}),d.workshops.map(t=>e.jsxs("section",{className:"border-border rounded border p-4",children:[e.jsxs("div",{className:"flex flex-wrap items-baseline justify-between gap-2",children:[e.jsx("h2",{className:"text-lg font-semibold",children:t.title}),e.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[e.jsxs("span",{className:"text-muted-foreground text-sm",children:[t.videos.length," video",t.videos.length===1?"":"s"," ·"," ",a(t.totalBytes)]}),e.jsxs(n,{method:"post",children:[e.jsx("input",{type:"hidden",name:"workshopId",value:t.id}),e.jsx(l,{type:"submit",name:"intent",value:"delete-workshop",children:"Delete workshop downloads"})]})]})]}),e.jsx("div",{className:"mt-3 overflow-x-auto",children:e.jsxs("table",{className:"border-border w-full border text-sm",children:[e.jsx("thead",{className:"bg-muted text-foreground",children:e.jsxs("tr",{children:[e.jsx("th",{className:"border-border border px-3 py-2 text-left",children:"Title"}),e.jsx("th",{className:"border-border border px-3 py-2 text-left",children:"Status"}),e.jsx("th",{className:"border-border border px-3 py-2 text-left",children:"Size"}),e.jsx("th",{className:"border-border border px-3 py-2 text-left",children:"Updated"}),e.jsx("th",{className:"border-border w-[140px] border px-3 py-2 text-left",children:"Actions"})]})}),e.jsx("tbody",{children:t.videos.map(r=>e.jsxs("tr",{children:[e.jsx("td",{className:"border-border max-w-[360px] border px-3 py-2",children:e.jsx("a",{href:r.url,target:"_blank",rel:"noreferrer",className:"block truncate underline-offset-4 hover:underline",children:r.title})}),e.jsx("td",{className:"border-border border px-3 py-2",children:r.status}),e.jsx("td",{className:"border-border border px-3 py-2",children:r.size?a(r.size):"—"}),e.jsx("td",{className:"border-border border px-3 py-2",children:new Date(r.updatedAt).toLocaleString()}),e.jsx("td",{className:"border-border w-[140px] border px-3 py-2",children:e.jsxs(n,{method:"post",children:[e.jsx("input",{type:"hidden",name:"playbackId",value:r.playbackId}),e.jsx(l,{type:"submit",name:"intent",value:"delete-video",className:"w-full",children:"Delete"})]})})]},`${t.id}-${r.playbackId}`))})]})})]},t.id))]})});export{f as default};
2
- //# sourceMappingURL=offline-videos-Do9PBh87.js.map
1
+ import{w as c,F as n}from"./chunk-EPOLDU6W-BCLmut3y.js";import{j as e}from"./jsx-runtime-C5WNSv3b.js";import{e as x,c as m}from"./misc-W4055b-0.js";import"./index-CqIc3cxq.js";function a(o){if(o<1024)return`${o} B`;const s=o/1024;if(s<1024)return`${s.toFixed(1)} KB`;const d=s/1024;return d<1024?`${d.toFixed(1)} MB`:`${(d/1024).toFixed(1)} GB`}function l({children:o,confirmLabel:s="Confirm",className:d,...t}){const{doubleCheck:r,getButtonProps:i}=x();return e.jsx("button",{...i(t),className:m("border-border bg-background text-foreground focus:ring-ring inline-flex min-w-[120px] items-center justify-center gap-2 rounded-md border px-3 py-1 text-sm font-medium transition-colors focus:ring-2 focus:ring-offset-2 focus:outline-none disabled:pointer-events-none disabled:opacity-50",r?"border-destructive bg-destructive text-destructive-foreground hover:bg-destructive/90 hover:text-destructive-foreground":"hover:bg-muted hover:text-foreground",d),children:e.jsxs("span",{className:"grid items-center justify-center",children:[e.jsx("span",{"aria-hidden":!0,className:"col-start-1 row-start-1 opacity-0",children:o}),e.jsx("span",{"aria-hidden":!0,className:"col-start-1 row-start-1 opacity-0",children:s}),e.jsx("span",{className:"col-start-1 row-start-1",children:r?s:o})]})})}const f=c(function({loaderData:s}){const{summary:d}=s;return d.workshops.length===0?e.jsx("p",{className:"text-muted-foreground text-sm",children:"No offline videos are downloaded yet."}):e.jsxs("div",{className:"flex flex-col gap-6",children:[e.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[e.jsx("h2",{className:"text-lg font-semibold",children:"Downloads"}),e.jsx(n,{method:"post",children:e.jsx(l,{type:"submit",name:"intent",value:"delete-all",children:"Delete all downloads"})})]}),d.workshops.map(t=>e.jsxs("section",{className:"border-border rounded border p-4",children:[e.jsxs("div",{className:"flex flex-wrap items-baseline justify-between gap-2",children:[e.jsx("h2",{className:"text-lg font-semibold",children:t.title}),e.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[e.jsxs("span",{className:"text-muted-foreground text-sm",children:[t.videos.length," video",t.videos.length===1?"":"s"," ·"," ",a(t.totalBytes)]}),e.jsxs(n,{method:"post",children:[e.jsx("input",{type:"hidden",name:"workshopId",value:t.id}),e.jsx(l,{type:"submit",name:"intent",value:"delete-workshop",children:"Delete workshop downloads"})]})]})]}),e.jsx("div",{className:"mt-3 overflow-x-auto",children:e.jsxs("table",{className:"border-border w-full border text-sm",children:[e.jsx("thead",{className:"bg-muted text-foreground",children:e.jsxs("tr",{children:[e.jsx("th",{className:"border-border border px-3 py-2 text-left",children:"Title"}),e.jsx("th",{className:"border-border border px-3 py-2 text-left",children:"Status"}),e.jsx("th",{className:"border-border border px-3 py-2 text-left",children:"Size"}),e.jsx("th",{className:"border-border border px-3 py-2 text-left",children:"Updated"}),e.jsx("th",{className:"border-border w-[140px] border px-3 py-2 text-left",children:"Actions"})]})}),e.jsx("tbody",{children:t.videos.map(r=>e.jsxs("tr",{children:[e.jsx("td",{className:"border-border max-w-[360px] border px-3 py-2",children:e.jsx("a",{href:r.url,target:"_blank",rel:"noreferrer",className:"block truncate underline-offset-4 hover:underline",children:r.title})}),e.jsx("td",{className:"border-border border px-3 py-2",children:r.status}),e.jsx("td",{className:"border-border border px-3 py-2",children:r.size?a(r.size):"—"}),e.jsx("td",{className:"border-border border px-3 py-2",children:new Date(r.updatedAt).toLocaleString()}),e.jsx("td",{className:"border-border w-[140px] border px-3 py-2",children:e.jsxs(n,{method:"post",children:[e.jsx("input",{type:"hidden",name:"playbackId",value:r.playbackId}),e.jsx(l,{type:"submit",name:"intent",value:"delete-video",className:"w-full",children:"Delete"})]})})]},`${t.id}-${r.playbackId}`))})]})})]},t.id))]})});export{f as default};
2
+ //# sourceMappingURL=offline-videos-BP7_xJkO.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"offline-videos-Do9PBh87.js","sources":["../../../app/routes/admin+/offline-videos.tsx"],"sourcesContent":["import {\n\tdeleteAllOfflineVideos,\n\tdeleteOfflineVideo,\n\tdeleteOfflineVideosForWorkshopId,\n\tgetOfflineVideoAdminSummary,\n} from '@epic-web/workshop-utils/offline-videos.server'\nimport { Form, data, redirect } from 'react-router'\nimport { cn, ensureUndeployed, useDoubleCheck } from '#app/utils/misc.tsx'\nimport { type Route } from './+types/offline-videos.tsx'\n\nexport async function loader({ request: _request }: Route.LoaderArgs) {\n\tensureUndeployed()\n\tconst summary = await getOfflineVideoAdminSummary()\n\treturn data({ summary })\n}\n\nexport async function action({ request }: Route.ActionArgs) {\n\tensureUndeployed()\n\tconst formData = await request.formData()\n\tconst intent = formData.get('intent')\n\n\tif (intent === 'delete-video') {\n\t\tconst playbackId = formData.get('playbackId')\n\t\tif (typeof playbackId !== 'string' || playbackId.length === 0) {\n\t\t\treturn data(\n\t\t\t\t{ status: 'error', message: 'Missing playbackId' },\n\t\t\t\t{ status: 400 },\n\t\t\t)\n\t\t}\n\t\tawait deleteOfflineVideo(playbackId)\n\t\treturn redirect('/admin/offline-videos')\n\t}\n\n\tif (intent === 'delete-workshop') {\n\t\tconst workshopId = formData.get('workshopId')\n\t\tif (typeof workshopId !== 'string' || workshopId.length === 0) {\n\t\t\treturn data(\n\t\t\t\t{ status: 'error', message: 'Missing workshopId' },\n\t\t\t\t{ status: 400 },\n\t\t\t)\n\t\t}\n\t\tawait deleteOfflineVideosForWorkshopId(workshopId)\n\t\treturn redirect('/admin/offline-videos')\n\t}\n\n\tif (intent === 'delete-all') {\n\t\tawait deleteAllOfflineVideos()\n\t\treturn redirect('/admin/offline-videos')\n\t}\n\n\treturn data({ status: 'error', message: 'Unknown intent' }, { status: 400 })\n}\n\nfunction formatBytes(bytes: number) {\n\tif (bytes < 1024) return `${bytes} B`\n\tconst kb = bytes / 1024\n\tif (kb < 1024) return `${kb.toFixed(1)} KB`\n\tconst mb = kb / 1024\n\tif (mb < 1024) return `${mb.toFixed(1)} MB`\n\treturn `${(mb / 1024).toFixed(1)} GB`\n}\n\nfunction DoubleCheckButton({\n\tchildren,\n\tconfirmLabel = 'Confirm',\n\tclassName,\n\t...props\n}: React.ComponentPropsWithoutRef<'button'> & {\n\tconfirmLabel?: string\n}) {\n\tconst { doubleCheck, getButtonProps } = useDoubleCheck()\n\n\treturn (\n\t\t<button\n\t\t\t{...getButtonProps(props)}\n\t\t\tclassName={cn(\n\t\t\t\t'border-border bg-background text-foreground focus:ring-ring inline-flex min-w-[120px] items-center justify-center gap-2 rounded-md border px-3 py-1 text-sm font-medium transition-colors focus:ring-2 focus:ring-offset-2 focus:outline-none disabled:pointer-events-none disabled:opacity-50',\n\t\t\t\tdoubleCheck\n\t\t\t\t\t? 'border-destructive bg-destructive text-destructive-foreground hover:bg-destructive/90 hover:text-destructive-foreground'\n\t\t\t\t\t: 'hover:bg-muted hover:text-foreground',\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t>\n\t\t\t<span className=\"grid items-center justify-center\">\n\t\t\t\t<span aria-hidden className=\"col-start-1 row-start-1 opacity-0\">\n\t\t\t\t\t{children}\n\t\t\t\t</span>\n\t\t\t\t<span aria-hidden className=\"col-start-1 row-start-1 opacity-0\">\n\t\t\t\t\t{confirmLabel}\n\t\t\t\t</span>\n\t\t\t\t<span className=\"col-start-1 row-start-1\">\n\t\t\t\t\t{doubleCheck ? confirmLabel : children}\n\t\t\t\t</span>\n\t\t\t</span>\n\t\t</button>\n\t)\n}\n\nexport default function OfflineVideosAdmin({\n\tloaderData,\n}: Route.ComponentProps) {\n\tconst { summary } = loaderData\n\n\tif (summary.workshops.length === 0) {\n\t\treturn (\n\t\t\t<p className=\"text-muted-foreground text-sm\">\n\t\t\t\tNo offline videos are downloaded yet.\n\t\t\t</p>\n\t\t)\n\t}\n\n\treturn (\n\t\t<div className=\"flex flex-col gap-6\">\n\t\t\t<div className=\"flex flex-wrap items-center justify-between gap-3\">\n\t\t\t\t<h2 className=\"text-lg font-semibold\">Downloads</h2>\n\t\t\t\t<Form method=\"post\">\n\t\t\t\t\t<DoubleCheckButton type=\"submit\" name=\"intent\" value=\"delete-all\">\n\t\t\t\t\t\tDelete all downloads\n\t\t\t\t\t</DoubleCheckButton>\n\t\t\t\t</Form>\n\t\t\t</div>\n\t\t\t{summary.workshops.map((workshop) => (\n\t\t\t\t<section key={workshop.id} className=\"border-border rounded border p-4\">\n\t\t\t\t\t<div className=\"flex flex-wrap items-baseline justify-between gap-2\">\n\t\t\t\t\t\t<h2 className=\"text-lg font-semibold\">{workshop.title}</h2>\n\t\t\t\t\t\t<div className=\"flex flex-wrap items-center gap-3\">\n\t\t\t\t\t\t\t<span className=\"text-muted-foreground text-sm\">\n\t\t\t\t\t\t\t\t{workshop.videos.length} video\n\t\t\t\t\t\t\t\t{workshop.videos.length === 1 ? '' : 's'} ·{' '}\n\t\t\t\t\t\t\t\t{formatBytes(workshop.totalBytes)}\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t<Form method=\"post\">\n\t\t\t\t\t\t\t\t<input type=\"hidden\" name=\"workshopId\" value={workshop.id} />\n\t\t\t\t\t\t\t\t<DoubleCheckButton\n\t\t\t\t\t\t\t\t\ttype=\"submit\"\n\t\t\t\t\t\t\t\t\tname=\"intent\"\n\t\t\t\t\t\t\t\t\tvalue=\"delete-workshop\"\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\tDelete workshop downloads\n\t\t\t\t\t\t\t\t</DoubleCheckButton>\n\t\t\t\t\t\t\t</Form>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div className=\"mt-3 overflow-x-auto\">\n\t\t\t\t\t\t<table className=\"border-border w-full border text-sm\">\n\t\t\t\t\t\t\t<thead className=\"bg-muted text-foreground\">\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t<th className=\"border-border border px-3 py-2 text-left\">\n\t\t\t\t\t\t\t\t\t\tTitle\n\t\t\t\t\t\t\t\t\t</th>\n\t\t\t\t\t\t\t\t\t<th className=\"border-border border px-3 py-2 text-left\">\n\t\t\t\t\t\t\t\t\t\tStatus\n\t\t\t\t\t\t\t\t\t</th>\n\t\t\t\t\t\t\t\t\t<th className=\"border-border border px-3 py-2 text-left\">\n\t\t\t\t\t\t\t\t\t\tSize\n\t\t\t\t\t\t\t\t\t</th>\n\t\t\t\t\t\t\t\t\t<th className=\"border-border border px-3 py-2 text-left\">\n\t\t\t\t\t\t\t\t\t\tUpdated\n\t\t\t\t\t\t\t\t\t</th>\n\t\t\t\t\t\t\t\t\t<th className=\"border-border w-[140px] border px-3 py-2 text-left\">\n\t\t\t\t\t\t\t\t\t\tActions\n\t\t\t\t\t\t\t\t\t</th>\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t</thead>\n\t\t\t\t\t\t\t<tbody>\n\t\t\t\t\t\t\t\t{workshop.videos.map((video) => (\n\t\t\t\t\t\t\t\t\t<tr key={`${workshop.id}-${video.playbackId}`}>\n\t\t\t\t\t\t\t\t\t\t<td className=\"border-border max-w-[360px] border px-3 py-2\">\n\t\t\t\t\t\t\t\t\t\t\t<a\n\t\t\t\t\t\t\t\t\t\t\t\thref={video.url}\n\t\t\t\t\t\t\t\t\t\t\t\ttarget=\"_blank\"\n\t\t\t\t\t\t\t\t\t\t\t\trel=\"noreferrer\"\n\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"block truncate underline-offset-4 hover:underline\"\n\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t{video.title}\n\t\t\t\t\t\t\t\t\t\t\t</a>\n\t\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t\t\t<td className=\"border-border border px-3 py-2\">\n\t\t\t\t\t\t\t\t\t\t\t{video.status}\n\t\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t\t\t<td className=\"border-border border px-3 py-2\">\n\t\t\t\t\t\t\t\t\t\t\t{video.size ? formatBytes(video.size) : '—'}\n\t\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t\t\t<td className=\"border-border border px-3 py-2\">\n\t\t\t\t\t\t\t\t\t\t\t{new Date(video.updatedAt).toLocaleString()}\n\t\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t\t\t<td className=\"border-border w-[140px] border px-3 py-2\">\n\t\t\t\t\t\t\t\t\t\t\t<Form method=\"post\">\n\t\t\t\t\t\t\t\t\t\t\t\t<input\n\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"hidden\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tname=\"playbackId\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tvalue={video.playbackId}\n\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t<DoubleCheckButton\n\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"submit\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tname=\"intent\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tvalue=\"delete-video\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"w-full\"\n\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\tDelete\n\t\t\t\t\t\t\t\t\t\t\t\t</DoubleCheckButton>\n\t\t\t\t\t\t\t\t\t\t\t</Form>\n\t\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t</tbody>\n\t\t\t\t\t\t</table>\n\t\t\t\t\t</div>\n\t\t\t\t</section>\n\t\t\t))}\n\t\t</div>\n\t)\n}\n"],"names":["formatBytes","bytes","kb","toFixed","mb","DoubleCheckButton","children","confirmLabel","className","props","doubleCheck","getButtonProps","useDoubleCheck","jsx","cn","jsxs","offlineVideos","_UNSAFE_withComponentProps","loaderData","summary","workshops","length","Form","method","type","name","value","map","workshop","title","videos","totalBytes","id","video","href","url","target","rel","status","size","Date","updatedAt","toLocaleString","playbackId"],"mappings":"gLAqDA,SAASA,EAAYC,EAAe,CACnC,GAAIA,EAAQ,KAAM,MAAO,GAAGA,CAAK,KACjC,MAAMC,EAAKD,EAAQ,KACnB,GAAIC,EAAK,KAAM,MAAO,GAAGA,EAAGC,QAAQ,CAAC,CAAC,MACtC,MAAMC,EAAKF,EAAK,KAChB,OAAIE,EAAK,KAAa,GAAGA,EAAGD,QAAQ,CAAC,CAAC,MAC/B,IAAIC,EAAK,MAAMD,QAAQ,CAAC,CAAC,KACjC,CAEA,SAASE,EAAkB,CAC1BC,SAAAA,EACAC,aAAAA,EAAe,UACfC,UAAAA,EACA,GAAGC,CACJ,EAEG,CACF,KAAM,CAAEC,YAAAA,EAAaC,eAAAA,GAAmBC,EAAA,EAExC,O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,UAAU,iCACZF,WAAMgC,MAAA,CACR,EACAzB,EAAAA,IAAC,KAAA,CAAGL,UAAU,iCACZF,SAAA2B,EAAMM,KAAOvC,EAAYiC,EAAMM,IAAI,EAAI,GAAA,CACzC,EACA1B,EAAAA,IAAC,KAAA,CAAGL,UAAU,iCACZF,SAAA,IAAIkC,KAAKP,EAAMQ,SAAS,EAAEC,eAAA,CAAe,CAC3C,QACC,KAAA,CAAGlC,UAAU,2CACbF,SAAAS,EAAAA,KAACO,EAAA,CAAKC,OAAO,OACZjB,SAAA,CAAAO,EAAAA,IAAC,QAAA,CACAW,KAAK,SACLC,KAAK,aACLC,MAAOO,EAAMU,UAAA,CACd,EACA9B,EAAAA,IAACR,EAAA,CACAmB,KAAK,SACLC,KAAK,SACLC,MAAM,eACNlB,UAAU,SACVF,SAAA,QAAA,CAED,CAAA,EACD,CAAA,CACD,CAAA,GApCQ,GAAGsB,EAASI,EAAE,IAAIC,EAAMU,UAAU,EAqC3C,CACA,CAAA,CACF,CAAA,EACD,CAAA,CACD,CAAA,CAAA,EArFaf,EAASI,EAsFvB,CACA,CAAA,CAAA,CACF,CAEF,CAAA"}
1
+ {"version":3,"file":"offline-videos-BP7_xJkO.js","sources":["../../../app/routes/admin+/offline-videos.tsx"],"sourcesContent":["import {\n\tdeleteAllOfflineVideos,\n\tdeleteOfflineVideo,\n\tdeleteOfflineVideosForWorkshopId,\n\tgetOfflineVideoAdminSummary,\n} from '@epic-web/workshop-utils/offline-videos.server'\nimport { Form, data, redirect } from 'react-router'\nimport { cn, ensureUndeployed, useDoubleCheck } from '#app/utils/misc.tsx'\nimport { type Route } from './+types/offline-videos.tsx'\n\nexport async function loader({ request: _request }: Route.LoaderArgs) {\n\tensureUndeployed()\n\tconst summary = await getOfflineVideoAdminSummary()\n\treturn data({ summary })\n}\n\nexport async function action({ request }: Route.ActionArgs) {\n\tensureUndeployed()\n\tconst formData = await request.formData()\n\tconst intent = formData.get('intent')\n\n\tif (intent === 'delete-video') {\n\t\tconst playbackId = formData.get('playbackId')\n\t\tif (typeof playbackId !== 'string' || playbackId.length === 0) {\n\t\t\treturn data(\n\t\t\t\t{ status: 'error', message: 'Missing playbackId' },\n\t\t\t\t{ status: 400 },\n\t\t\t)\n\t\t}\n\t\tawait deleteOfflineVideo(playbackId)\n\t\treturn redirect('/admin/offline-videos')\n\t}\n\n\tif (intent === 'delete-workshop') {\n\t\tconst workshopId = formData.get('workshopId')\n\t\tif (typeof workshopId !== 'string' || workshopId.length === 0) {\n\t\t\treturn data(\n\t\t\t\t{ status: 'error', message: 'Missing workshopId' },\n\t\t\t\t{ status: 400 },\n\t\t\t)\n\t\t}\n\t\tawait deleteOfflineVideosForWorkshopId(workshopId)\n\t\treturn redirect('/admin/offline-videos')\n\t}\n\n\tif (intent === 'delete-all') {\n\t\tawait deleteAllOfflineVideos()\n\t\treturn redirect('/admin/offline-videos')\n\t}\n\n\treturn data({ status: 'error', message: 'Unknown intent' }, { status: 400 })\n}\n\nfunction formatBytes(bytes: number) {\n\tif (bytes < 1024) return `${bytes} B`\n\tconst kb = bytes / 1024\n\tif (kb < 1024) return `${kb.toFixed(1)} KB`\n\tconst mb = kb / 1024\n\tif (mb < 1024) return `${mb.toFixed(1)} MB`\n\treturn `${(mb / 1024).toFixed(1)} GB`\n}\n\nfunction DoubleCheckButton({\n\tchildren,\n\tconfirmLabel = 'Confirm',\n\tclassName,\n\t...props\n}: React.ComponentPropsWithoutRef<'button'> & {\n\tconfirmLabel?: string\n}) {\n\tconst { doubleCheck, getButtonProps } = useDoubleCheck()\n\n\treturn (\n\t\t<button\n\t\t\t{...getButtonProps(props)}\n\t\t\tclassName={cn(\n\t\t\t\t'border-border bg-background text-foreground focus:ring-ring inline-flex min-w-[120px] items-center justify-center gap-2 rounded-md border px-3 py-1 text-sm font-medium transition-colors focus:ring-2 focus:ring-offset-2 focus:outline-none disabled:pointer-events-none disabled:opacity-50',\n\t\t\t\tdoubleCheck\n\t\t\t\t\t? 'border-destructive bg-destructive text-destructive-foreground hover:bg-destructive/90 hover:text-destructive-foreground'\n\t\t\t\t\t: 'hover:bg-muted hover:text-foreground',\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t>\n\t\t\t<span className=\"grid items-center justify-center\">\n\t\t\t\t<span aria-hidden className=\"col-start-1 row-start-1 opacity-0\">\n\t\t\t\t\t{children}\n\t\t\t\t</span>\n\t\t\t\t<span aria-hidden className=\"col-start-1 row-start-1 opacity-0\">\n\t\t\t\t\t{confirmLabel}\n\t\t\t\t</span>\n\t\t\t\t<span className=\"col-start-1 row-start-1\">\n\t\t\t\t\t{doubleCheck ? confirmLabel : children}\n\t\t\t\t</span>\n\t\t\t</span>\n\t\t</button>\n\t)\n}\n\nexport default function OfflineVideosAdmin({\n\tloaderData,\n}: Route.ComponentProps) {\n\tconst { summary } = loaderData\n\n\tif (summary.workshops.length === 0) {\n\t\treturn (\n\t\t\t<p className=\"text-muted-foreground text-sm\">\n\t\t\t\tNo offline videos are downloaded yet.\n\t\t\t</p>\n\t\t)\n\t}\n\n\treturn (\n\t\t<div className=\"flex flex-col gap-6\">\n\t\t\t<div className=\"flex flex-wrap items-center justify-between gap-3\">\n\t\t\t\t<h2 className=\"text-lg font-semibold\">Downloads</h2>\n\t\t\t\t<Form method=\"post\">\n\t\t\t\t\t<DoubleCheckButton type=\"submit\" name=\"intent\" value=\"delete-all\">\n\t\t\t\t\t\tDelete all downloads\n\t\t\t\t\t</DoubleCheckButton>\n\t\t\t\t</Form>\n\t\t\t</div>\n\t\t\t{summary.workshops.map((workshop) => (\n\t\t\t\t<section key={workshop.id} className=\"border-border rounded border p-4\">\n\t\t\t\t\t<div className=\"flex flex-wrap items-baseline justify-between gap-2\">\n\t\t\t\t\t\t<h2 className=\"text-lg font-semibold\">{workshop.title}</h2>\n\t\t\t\t\t\t<div className=\"flex flex-wrap items-center gap-3\">\n\t\t\t\t\t\t\t<span className=\"text-muted-foreground text-sm\">\n\t\t\t\t\t\t\t\t{workshop.videos.length} video\n\t\t\t\t\t\t\t\t{workshop.videos.length === 1 ? '' : 's'} ·{' '}\n\t\t\t\t\t\t\t\t{formatBytes(workshop.totalBytes)}\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t<Form method=\"post\">\n\t\t\t\t\t\t\t\t<input type=\"hidden\" name=\"workshopId\" value={workshop.id} />\n\t\t\t\t\t\t\t\t<DoubleCheckButton\n\t\t\t\t\t\t\t\t\ttype=\"submit\"\n\t\t\t\t\t\t\t\t\tname=\"intent\"\n\t\t\t\t\t\t\t\t\tvalue=\"delete-workshop\"\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\tDelete workshop downloads\n\t\t\t\t\t\t\t\t</DoubleCheckButton>\n\t\t\t\t\t\t\t</Form>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div className=\"mt-3 overflow-x-auto\">\n\t\t\t\t\t\t<table className=\"border-border w-full border text-sm\">\n\t\t\t\t\t\t\t<thead className=\"bg-muted text-foreground\">\n\t\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t\t<th className=\"border-border border px-3 py-2 text-left\">\n\t\t\t\t\t\t\t\t\t\tTitle\n\t\t\t\t\t\t\t\t\t</th>\n\t\t\t\t\t\t\t\t\t<th className=\"border-border border px-3 py-2 text-left\">\n\t\t\t\t\t\t\t\t\t\tStatus\n\t\t\t\t\t\t\t\t\t</th>\n\t\t\t\t\t\t\t\t\t<th className=\"border-border border px-3 py-2 text-left\">\n\t\t\t\t\t\t\t\t\t\tSize\n\t\t\t\t\t\t\t\t\t</th>\n\t\t\t\t\t\t\t\t\t<th className=\"border-border border px-3 py-2 text-left\">\n\t\t\t\t\t\t\t\t\t\tUpdated\n\t\t\t\t\t\t\t\t\t</th>\n\t\t\t\t\t\t\t\t\t<th className=\"border-border w-[140px] border px-3 py-2 text-left\">\n\t\t\t\t\t\t\t\t\t\tActions\n\t\t\t\t\t\t\t\t\t</th>\n\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t</thead>\n\t\t\t\t\t\t\t<tbody>\n\t\t\t\t\t\t\t\t{workshop.videos.map((video) => (\n\t\t\t\t\t\t\t\t\t<tr key={`${workshop.id}-${video.playbackId}`}>\n\t\t\t\t\t\t\t\t\t\t<td className=\"border-border max-w-[360px] border px-3 py-2\">\n\t\t\t\t\t\t\t\t\t\t\t<a\n\t\t\t\t\t\t\t\t\t\t\t\thref={video.url}\n\t\t\t\t\t\t\t\t\t\t\t\ttarget=\"_blank\"\n\t\t\t\t\t\t\t\t\t\t\t\trel=\"noreferrer\"\n\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"block truncate underline-offset-4 hover:underline\"\n\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t{video.title}\n\t\t\t\t\t\t\t\t\t\t\t</a>\n\t\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t\t\t<td className=\"border-border border px-3 py-2\">\n\t\t\t\t\t\t\t\t\t\t\t{video.status}\n\t\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t\t\t<td className=\"border-border border px-3 py-2\">\n\t\t\t\t\t\t\t\t\t\t\t{video.size ? formatBytes(video.size) : '—'}\n\t\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t\t\t<td className=\"border-border border px-3 py-2\">\n\t\t\t\t\t\t\t\t\t\t\t{new Date(video.updatedAt).toLocaleString()}\n\t\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t\t\t<td className=\"border-border w-[140px] border px-3 py-2\">\n\t\t\t\t\t\t\t\t\t\t\t<Form method=\"post\">\n\t\t\t\t\t\t\t\t\t\t\t\t<input\n\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"hidden\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tname=\"playbackId\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tvalue={video.playbackId}\n\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t\t<DoubleCheckButton\n\t\t\t\t\t\t\t\t\t\t\t\t\ttype=\"submit\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tname=\"intent\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tvalue=\"delete-video\"\n\t\t\t\t\t\t\t\t\t\t\t\t\tclassName=\"w-full\"\n\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\tDelete\n\t\t\t\t\t\t\t\t\t\t\t\t</DoubleCheckButton>\n\t\t\t\t\t\t\t\t\t\t\t</Form>\n\t\t\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t</tbody>\n\t\t\t\t\t\t</table>\n\t\t\t\t\t</div>\n\t\t\t\t</section>\n\t\t\t))}\n\t\t</div>\n\t)\n}\n"],"names":["formatBytes","bytes","kb","toFixed","mb","DoubleCheckButton","children","confirmLabel","className","props","doubleCheck","getButtonProps","useDoubleCheck","jsx","cn","jsxs","offlineVideos","_UNSAFE_withComponentProps","loaderData","summary","workshops","length","Form","method","type","name","value","map","workshop","title","videos","totalBytes","id","video","href","url","target","rel","status","size","Date","updatedAt","toLocaleString","playbackId"],"mappings":"gLAqDA,SAASA,EAAYC,EAAe,CACnC,GAAIA,EAAQ,KAAM,MAAO,GAAGA,CAAK,KACjC,MAAMC,EAAKD,EAAQ,KACnB,GAAIC,EAAK,KAAM,MAAO,GAAGA,EAAGC,QAAQ,CAAC,CAAC,MACtC,MAAMC,EAAKF,EAAK,KAChB,OAAIE,EAAK,KAAa,GAAGA,EAAGD,QAAQ,CAAC,CAAC,MAC/B,IAAIC,EAAK,MAAMD,QAAQ,CAAC,CAAC,KACjC,CAEA,SAASE,EAAkB,CAC1BC,SAAAA,EACAC,aAAAA,EAAe,UACfC,UAAAA,EACA,GAAGC,CACJ,EAEG,CACF,KAAM,CAAEC,YAAAA,EAAaC,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hB,EAAAA,IAAC,KAAA,CAAGL,UAAU,iCACZF,WAAMgC,MAAA,CACR,EACAzB,EAAAA,IAAC,KAAA,CAAGL,UAAU,iCACZF,SAAA2B,EAAMM,KAAOvC,EAAYiC,EAAMM,IAAI,EAAI,GAAA,CACzC,EACA1B,EAAAA,IAAC,KAAA,CAAGL,UAAU,iCACZF,SAAA,IAAIkC,KAAKP,EAAMQ,SAAS,EAAEC,eAAA,CAAe,CAC3C,QACC,KAAA,CAAGlC,UAAU,2CACbF,SAAAS,EAAAA,KAACO,EAAA,CAAKC,OAAO,OACZjB,SAAA,CAAAO,EAAAA,IAAC,QAAA,CACAW,KAAK,SACLC,KAAK,aACLC,MAAOO,EAAMU,UAAA,CACd,EACA9B,EAAAA,IAACR,EAAA,CACAmB,KAAK,SACLC,KAAK,SACLC,MAAM,eACNlB,UAAU,SACVF,SAAA,QAAA,CAED,CAAA,EACD,CAAA,CACD,CAAA,GApCQ,GAAGsB,EAASI,EAAE,IAAIC,EAAMU,UAAU,EAqC3C,CACA,CAAA,CACF,CAAA,EACD,CAAA,CACD,CAAA,CAAA,EArFaf,EAASI,EAsFvB,CACA,CAAA,CAAA,CACF,CAEF,CAAA"}
@@ -1,2 +1,2 @@
1
- import{j as t}from"./jsx-runtime-C5WNSv3b.js";import{r as u}from"./index-CqIc3cxq.js";import{g as p,f}from"./chunk-EPOLDU6W-BCLmut3y.js";import{T as b,a as g,b as x}from"./tooltip-Chzzs4KB.js";import{u as h}from"./root-loader-BOzEMapJ.js";const l="/mark-onboarding-complete";function D(o){const s=h(),e=p(),r=f(),i=e.some(c=>{const d=c.formData?.get("featureId");return c.formAction===l&&d===o}),n=s.preferences?.onboardingComplete?.includes(o)??!1,a=!ENV.EPICSHOP_DEPLOYED&&!n&&!i,m=u.useCallback(()=>{a&&r.submit({featureId:o},{method:"POST",action:l})},[a,o,r]);return[a,m]}function w({children:o="!",tooltip:s,className:e="",size:r="md"}){const n=`flex ${r==="sm"?"h-4 w-4 text-xs":"h-6 w-6 text-sm"} animate-badge-bounce items-center justify-center rounded-full bg-yellow-500 font-bold text-black shadow-lg`;return s?t.jsxs(b,{children:[t.jsx(g,{asChild:!0,children:t.jsx("span",{className:`absolute -top-1 -right-1 z-10 cursor-pointer ${n} ${e}`,tabIndex:0,children:o})}),t.jsx(x,{side:"bottom",sideOffset:8,collisionPadding:16,avoidCollisions:!0,children:s})]}):t.jsx("span",{className:`absolute -top-1 -right-1 z-10 ${n} ${e}`,children:o})}export{w as O,D as u};
2
- //# sourceMappingURL=onboarding-indicator-CVwXz3Cn.js.map
1
+ import{j as t}from"./jsx-runtime-C5WNSv3b.js";import{r as u}from"./index-CqIc3cxq.js";import{g as p,f}from"./chunk-EPOLDU6W-BCLmut3y.js";import{T as b,j as g,k as x}from"./tooltip-Tlsyx2YO.js";import{u as h}from"./root-loader-BOzEMapJ.js";const l="/mark-onboarding-complete";function D(o){const s=h(),e=p(),r=f(),i=e.some(c=>{const d=c.formData?.get("featureId");return c.formAction===l&&d===o}),n=s.preferences?.onboardingComplete?.includes(o)??!1,a=!ENV.EPICSHOP_DEPLOYED&&!n&&!i,m=u.useCallback(()=>{a&&r.submit({featureId:o},{method:"POST",action:l})},[a,o,r]);return[a,m]}function k({children:o="!",tooltip:s,className:e="",size:r="md"}){const n=`flex ${r==="sm"?"h-4 w-4 text-xs":"h-6 w-6 text-sm"} animate-badge-bounce items-center justify-center rounded-full bg-yellow-500 font-bold text-black shadow-lg`;return s?t.jsxs(b,{children:[t.jsx(g,{asChild:!0,children:t.jsx("span",{className:`absolute -top-1 -right-1 z-10 cursor-pointer ${n} ${e}`,tabIndex:0,children:o})}),t.jsx(x,{side:"bottom",sideOffset:8,collisionPadding:16,avoidCollisions:!0,children:s})]}):t.jsx("span",{className:`absolute -top-1 -right-1 z-10 ${n} ${e}`,children:o})}export{k as O,D as u};
2
+ //# sourceMappingURL=onboarding-indicator-B-XR90_G.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"onboarding-indicator-CVwXz3Cn.js","sources":["../../../app/components/onboarding-indicator.tsx"],"sourcesContent":["import * as React from 'react'\nimport { useFetcher, useFetchers, useLocation } from 'react-router'\nimport { ServerOnly } from 'remix-utils/server-only'\nimport {\n\tTooltip,\n\tTooltipContent,\n\tTooltipTrigger,\n} from '#app/components/ui/tooltip.tsx'\nimport { useRootLoaderData } from '#app/utils/root-loader.ts'\n\nconst ONBOARDING_ROUTE = '/mark-onboarding-complete'\nconst PE_REDIRECT_INPUT_NAME = '__PE_redirectTo'\n\n/**\n * Hook to check if user has completed an onboarding feature and provide a function to mark it complete.\n * Uses optimistic updates for instant UI feedback with progressive enhancement support.\n * Returns false for showIndicator in deployed environments.\n *\n * @param featureId - Unique identifier for the feature (e.g., 'files-popover')\n * @returns Tuple of [showIndicator, markComplete] - boolean and function to mark complete\n *\n * @example\n * ```tsx\n * function MyComponent() {\n * const [showBadge, dismissBadge] = useOnboardingIndicator('my-feature')\n *\n * return (\n * <button\n * className=\"relative\"\n * onClick={() => { dismissBadge(); doSomething(); }}\n * >\n * Click me\n * {showBadge ? <OnboardingBadge tooltip=\"Try this!\" /> : null}\n * </button>\n * )\n * }\n * ```\n */\nexport function useOnboardingIndicator(featureId: string) {\n\tconst rootData = useRootLoaderData()\n\tconst fetchers = useFetchers()\n\tconst fetcher = useFetcher()\n\n\t// Check for optimistic update from any in-flight fetcher\n\tconst optimisticComplete = fetchers.some((f) => {\n\t\tconst formFeatureId = f.formData?.get('featureId')\n\t\treturn f.formAction === ONBOARDING_ROUTE && formFeatureId === featureId\n\t})\n\n\tconst isComplete =\n\t\trootData.preferences?.onboardingComplete?.includes(featureId) ?? false\n\n\t// Show indicator if not complete (from DB), no optimistic update in progress,\n\t// and not in deployed environment\n\tconst showIndicator =\n\t\t!ENV.EPICSHOP_DEPLOYED && !isComplete && !optimisticComplete\n\n\tconst markComplete = React.useCallback(() => {\n\t\tif (!showIndicator) return\n\n\t\t// Note: We don't include PE_REDIRECT_INPUT_NAME here because this hook\n\t\t// can only be used when JavaScript is enabled. The OnboardingForm component\n\t\t// uses ServerOnly to include that field for progressive enhancement.\n\t\tvoid fetcher.submit(\n\t\t\t{ featureId },\n\t\t\t{\n\t\t\t\tmethod: 'POST',\n\t\t\t\taction: ONBOARDING_ROUTE,\n\t\t\t},\n\t\t)\n\t}, [showIndicator, featureId, fetcher])\n\n\treturn [showIndicator, markComplete] as const\n}\n\n/**\n * Form component for marking onboarding features as complete with progressive enhancement.\n * Works without JavaScript by submitting a form and redirecting back.\n *\n * @example\n * ```tsx\n * <OnboardingForm featureId=\"my-feature\">\n * <button type=\"submit\">Mark as seen</button>\n * </OnboardingForm>\n * ```\n */\nexport function OnboardingForm({\n\tfeatureId,\n\tchildren,\n\tonSubmit,\n\tclassName,\n}: {\n\tfeatureId: string\n\tchildren: React.ReactNode\n\tonSubmit?: () => void\n\tclassName?: string\n}) {\n\tconst fetcher = useFetcher()\n\tconst location = useLocation()\n\n\treturn (\n\t\t<fetcher.Form\n\t\t\tmethod=\"POST\"\n\t\t\taction={ONBOARDING_ROUTE}\n\t\t\tclassName={className}\n\t\t\tonSubmit={onSubmit}\n\t\t>\n\t\t\t<input type=\"hidden\" name=\"featureId\" value={featureId} />\n\t\t\t<ServerOnly>\n\t\t\t\t{() => (\n\t\t\t\t\t<input\n\t\t\t\t\t\ttype=\"hidden\"\n\t\t\t\t\t\tname={PE_REDIRECT_INPUT_NAME}\n\t\t\t\t\t\tvalue={location.pathname}\n\t\t\t\t\t/>\n\t\t\t\t)}\n\t\t\t</ServerOnly>\n\t\t\t{children}\n\t\t</fetcher.Form>\n\t)\n}\n\n/**\n * A pulsing badge indicator that draws attention to a feature.\n * Typically positioned at the corner of a button or element.\n * Uses a bright yellow/amber color for high visibility in both light and dark modes.\n * Optionally shows a tooltip on hover.\n *\n * @example\n * ```tsx\n * <button className=\"relative\">\n * Click me\n * {showBadge ? <OnboardingBadge tooltip=\"Try this feature!\" /> : null}\n * </button>\n * ```\n */\nexport function OnboardingBadge({\n\tchildren = '!',\n\ttooltip,\n\tclassName = '',\n\tsize = 'md',\n}: {\n\tchildren?: React.ReactNode\n\ttooltip?: string\n\tclassName?: string\n\tsize?: 'sm' | 'md'\n}) {\n\tconst sizeClasses = size === 'sm' ? 'h-4 w-4 text-xs' : 'h-6 w-6 text-sm'\n\tconst badgeClasses = `flex ${sizeClasses} animate-badge-bounce items-center justify-center rounded-full bg-yellow-500 font-bold text-black shadow-lg`\n\n\tif (tooltip) {\n\t\treturn (\n\t\t\t<Tooltip>\n\t\t\t\t<TooltipTrigger asChild>\n\t\t\t\t\t<span\n\t\t\t\t\t\tclassName={`absolute -top-1 -right-1 z-10 cursor-pointer ${badgeClasses} ${className}`}\n\t\t\t\t\t\ttabIndex={0}\n\t\t\t\t\t>\n\t\t\t\t\t\t{children}\n\t\t\t\t\t</span>\n\t\t\t\t</TooltipTrigger>\n\t\t\t\t<TooltipContent\n\t\t\t\t\tside=\"bottom\"\n\t\t\t\t\tsideOffset={8}\n\t\t\t\t\tcollisionPadding={16}\n\t\t\t\t\tavoidCollisions\n\t\t\t\t>\n\t\t\t\t\t{tooltip}\n\t\t\t\t</TooltipContent>\n\t\t\t</Tooltip>\n\t\t)\n\t}\n\n\treturn (\n\t\t<span\n\t\t\tclassName={`absolute -top-1 -right-1 z-10 ${badgeClasses} ${className}`}\n\t\t>\n\t\t\t{children}\n\t\t</span>\n\t)\n}\n\n/**\n * A callout message that appears near an element to explain a feature.\n * Typically positioned below the element it's describing.\n * Uses a bright yellow/amber color for high visibility in both light and dark modes.\n *\n * @example\n * ```tsx\n * <div className=\"relative\">\n * <button>Click me</button>\n * {showBadge ? (\n * <OnboardingCallout>\n * 👋 Click here to discover this feature!\n * </OnboardingCallout>\n * ) : null}\n * </div>\n * ```\n */\nexport function OnboardingCallout({\n\tchildren,\n\tclassName = '',\n}: {\n\tchildren: React.ReactNode\n\tclassName?: string\n}) {\n\treturn (\n\t\t<div\n\t\t\tclassName={`absolute top-full left-0 z-20 mt-1 max-w-64 rounded-md bg-yellow-500 px-3 py-2 text-sm text-black shadow-lg ${className}`}\n\t\t>\n\t\t\t<p className=\"font-medium\">{children}</p>\n\t\t</div>\n\t)\n}\n"],"names":["ONBOARDING_ROUTE","useOnboardingIndicator","featureId","rootData","useRootLoaderData","fetchers","useFetchers","fetcher","useFetcher","optimisticComplete","f","formFeatureId","isComplete","showIndicator","markComplete","React.useCallback","OnboardingBadge","children","tooltip","className","size","badgeClasses","Tooltip","jsx","TooltipTrigger","TooltipContent"],"mappings":"+OAUA,MAAMA,EAAmB,4BA4BlB,SAASC,EAAuBC,EAAmB,CACzD,MAAMC,EAAWC,EAAA,EACXC,EAAWC,EAAA,EACXC,EAAUC,EAAA,EAGVC,EAAqBJ,EAAS,KAAMK,GAAM,CAC/C,MAAMC,EAAgBD,EAAE,UAAU,IAAI,WAAW,EACjD,OAAOA,EAAE,aAAeV,GAAoBW,IAAkBT,CAC/D,CAAC,EAEKU,EACLT,EAAS,aAAa,oBAAoB,SAASD,CAAS,GAAK,GAI5DW,EACL,CAAC,IAAI,mBAAqB,CAACD,GAAc,CAACH,EAErCK,EAAeC,EAAAA,YAAkB,IAAM,CACvCF,GAKAN,EAAQ,OACZ,CAAE,UAAAL,CAAA,EACF,CACC,OAAQ,OACR,OAAQF,CAAA,CACT,CAEF,EAAG,CAACa,EAAeX,EAAWK,CAAO,CAAC,EAEtC,MAAO,CAACM,EAAeC,CAAY,CACpC,CA+DO,SAASE,EAAgB,CAC/B,SAAAC,EAAW,IACX,QAAAC,EACA,UAAAC,EAAY,GACZ,KAAAC,EAAO,IACR,EAKG,CAEF,MAAMC,EAAe,QADDD,IAAS,KAAO,kBAAoB,iBAChB,8GAExC,OAAIF,SAEDI,EAAA,CACA,SAAA,CAAAC,EAAAA,IAACC,EAAA,CAAe,QAAO,GACtB,SAAAD,EAAAA,IAAC,OAAA,CACA,UAAW,gDAAgDF,CAAY,IAAIF,CAAS,GACpF,SAAU,EAET,SAAAF,CAAA,CAAA,EAEH,EACAM,EAAAA,IAACE,EAAA,CACA,KAAK,SACL,WAAY,EACZ,iBAAkB,GAClB,gBAAe,GAEd,SAAAP,CAAA,CAAA,CACF,EACD,EAKDK,EAAAA,IAAC,OAAA,CACA,UAAW,iCAAiCF,CAAY,IAAIF,CAAS,GAEpE,SAAAF,CAAA,CAAA,CAGJ"}
1
+ {"version":3,"file":"onboarding-indicator-B-XR90_G.js","sources":["../../../app/components/onboarding-indicator.tsx"],"sourcesContent":["import * as React from 'react'\nimport { useFetcher, useFetchers, useLocation } from 'react-router'\nimport { ServerOnly } from 'remix-utils/server-only'\nimport {\n\tTooltip,\n\tTooltipContent,\n\tTooltipTrigger,\n} from '#app/components/ui/tooltip.tsx'\nimport { useRootLoaderData } from '#app/utils/root-loader.ts'\n\nconst ONBOARDING_ROUTE = '/mark-onboarding-complete'\nconst PE_REDIRECT_INPUT_NAME = '__PE_redirectTo'\n\n/**\n * Hook to check if user has completed an onboarding feature and provide a function to mark it complete.\n * Uses optimistic updates for instant UI feedback with progressive enhancement support.\n * Returns false for showIndicator in deployed environments.\n *\n * @param featureId - Unique identifier for the feature (e.g., 'files-popover')\n * @returns Tuple of [showIndicator, markComplete] - boolean and function to mark complete\n *\n * @example\n * ```tsx\n * function MyComponent() {\n * const [showBadge, dismissBadge] = useOnboardingIndicator('my-feature')\n *\n * return (\n * <button\n * className=\"relative\"\n * onClick={() => { dismissBadge(); doSomething(); }}\n * >\n * Click me\n * {showBadge ? <OnboardingBadge tooltip=\"Try this!\" /> : null}\n * </button>\n * )\n * }\n * ```\n */\nexport function useOnboardingIndicator(featureId: string) {\n\tconst rootData = useRootLoaderData()\n\tconst fetchers = useFetchers()\n\tconst fetcher = useFetcher()\n\n\t// Check for optimistic update from any in-flight fetcher\n\tconst optimisticComplete = fetchers.some((f) => {\n\t\tconst formFeatureId = f.formData?.get('featureId')\n\t\treturn f.formAction === ONBOARDING_ROUTE && formFeatureId === featureId\n\t})\n\n\tconst isComplete =\n\t\trootData.preferences?.onboardingComplete?.includes(featureId) ?? false\n\n\t// Show indicator if not complete (from DB), no optimistic update in progress,\n\t// and not in deployed environment\n\tconst showIndicator =\n\t\t!ENV.EPICSHOP_DEPLOYED && !isComplete && !optimisticComplete\n\n\tconst markComplete = React.useCallback(() => {\n\t\tif (!showIndicator) return\n\n\t\t// Note: We don't include PE_REDIRECT_INPUT_NAME here because this hook\n\t\t// can only be used when JavaScript is enabled. The OnboardingForm component\n\t\t// uses ServerOnly to include that field for progressive enhancement.\n\t\tvoid fetcher.submit(\n\t\t\t{ featureId },\n\t\t\t{\n\t\t\t\tmethod: 'POST',\n\t\t\t\taction: ONBOARDING_ROUTE,\n\t\t\t},\n\t\t)\n\t}, [showIndicator, featureId, fetcher])\n\n\treturn [showIndicator, markComplete] as const\n}\n\n/**\n * Form component for marking onboarding features as complete with progressive enhancement.\n * Works without JavaScript by submitting a form and redirecting back.\n *\n * @example\n * ```tsx\n * <OnboardingForm featureId=\"my-feature\">\n * <button type=\"submit\">Mark as seen</button>\n * </OnboardingForm>\n * ```\n */\nexport function OnboardingForm({\n\tfeatureId,\n\tchildren,\n\tonSubmit,\n\tclassName,\n}: {\n\tfeatureId: string\n\tchildren: React.ReactNode\n\tonSubmit?: () => void\n\tclassName?: string\n}) {\n\tconst fetcher = useFetcher()\n\tconst location = useLocation()\n\n\treturn (\n\t\t<fetcher.Form\n\t\t\tmethod=\"POST\"\n\t\t\taction={ONBOARDING_ROUTE}\n\t\t\tclassName={className}\n\t\t\tonSubmit={onSubmit}\n\t\t>\n\t\t\t<input type=\"hidden\" name=\"featureId\" value={featureId} />\n\t\t\t<ServerOnly>\n\t\t\t\t{() => (\n\t\t\t\t\t<input\n\t\t\t\t\t\ttype=\"hidden\"\n\t\t\t\t\t\tname={PE_REDIRECT_INPUT_NAME}\n\t\t\t\t\t\tvalue={location.pathname}\n\t\t\t\t\t/>\n\t\t\t\t)}\n\t\t\t</ServerOnly>\n\t\t\t{children}\n\t\t</fetcher.Form>\n\t)\n}\n\n/**\n * A pulsing badge indicator that draws attention to a feature.\n * Typically positioned at the corner of a button or element.\n * Uses a bright yellow/amber color for high visibility in both light and dark modes.\n * Optionally shows a tooltip on hover.\n *\n * @example\n * ```tsx\n * <button className=\"relative\">\n * Click me\n * {showBadge ? <OnboardingBadge tooltip=\"Try this feature!\" /> : null}\n * </button>\n * ```\n */\nexport function OnboardingBadge({\n\tchildren = '!',\n\ttooltip,\n\tclassName = '',\n\tsize = 'md',\n}: {\n\tchildren?: React.ReactNode\n\ttooltip?: string\n\tclassName?: string\n\tsize?: 'sm' | 'md'\n}) {\n\tconst sizeClasses = size === 'sm' ? 'h-4 w-4 text-xs' : 'h-6 w-6 text-sm'\n\tconst badgeClasses = `flex ${sizeClasses} animate-badge-bounce items-center justify-center rounded-full bg-yellow-500 font-bold text-black shadow-lg`\n\n\tif (tooltip) {\n\t\treturn (\n\t\t\t<Tooltip>\n\t\t\t\t<TooltipTrigger asChild>\n\t\t\t\t\t<span\n\t\t\t\t\t\tclassName={`absolute -top-1 -right-1 z-10 cursor-pointer ${badgeClasses} ${className}`}\n\t\t\t\t\t\ttabIndex={0}\n\t\t\t\t\t>\n\t\t\t\t\t\t{children}\n\t\t\t\t\t</span>\n\t\t\t\t</TooltipTrigger>\n\t\t\t\t<TooltipContent\n\t\t\t\t\tside=\"bottom\"\n\t\t\t\t\tsideOffset={8}\n\t\t\t\t\tcollisionPadding={16}\n\t\t\t\t\tavoidCollisions\n\t\t\t\t>\n\t\t\t\t\t{tooltip}\n\t\t\t\t</TooltipContent>\n\t\t\t</Tooltip>\n\t\t)\n\t}\n\n\treturn (\n\t\t<span\n\t\t\tclassName={`absolute -top-1 -right-1 z-10 ${badgeClasses} ${className}`}\n\t\t>\n\t\t\t{children}\n\t\t</span>\n\t)\n}\n\n/**\n * A callout message that appears near an element to explain a feature.\n * Typically positioned below the element it's describing.\n * Uses a bright yellow/amber color for high visibility in both light and dark modes.\n *\n * @example\n * ```tsx\n * <div className=\"relative\">\n * <button>Click me</button>\n * {showBadge ? (\n * <OnboardingCallout>\n * 👋 Click here to discover this feature!\n * </OnboardingCallout>\n * ) : null}\n * </div>\n * ```\n */\nexport function OnboardingCallout({\n\tchildren,\n\tclassName = '',\n}: {\n\tchildren: React.ReactNode\n\tclassName?: string\n}) {\n\treturn (\n\t\t<div\n\t\t\tclassName={`absolute top-full left-0 z-20 mt-1 max-w-64 rounded-md bg-yellow-500 px-3 py-2 text-sm text-black shadow-lg ${className}`}\n\t\t>\n\t\t\t<p className=\"font-medium\">{children}</p>\n\t\t</div>\n\t)\n}\n"],"names":["ONBOARDING_ROUTE","useOnboardingIndicator","featureId","rootData","useRootLoaderData","fetchers","useFetchers","fetcher","useFetcher","optimisticComplete","f","formFeatureId","isComplete","showIndicator","markComplete","React.useCallback","OnboardingBadge","children","tooltip","className","size","badgeClasses","Tooltip","jsx","TooltipTrigger","TooltipContent"],"mappings":"+OAUA,MAAMA,EAAmB,4BA4BlB,SAASC,EAAuBC,EAAmB,CACzD,MAAMC,EAAWC,EAAA,EACXC,EAAWC,EAAA,EACXC,EAAUC,EAAA,EAGVC,EAAqBJ,EAAS,KAAMK,GAAM,CAC/C,MAAMC,EAAgBD,EAAE,UAAU,IAAI,WAAW,EACjD,OAAOA,EAAE,aAAeV,GAAoBW,IAAkBT,CAC/D,CAAC,EAEKU,EACLT,EAAS,aAAa,oBAAoB,SAASD,CAAS,GAAK,GAI5DW,EACL,CAAC,IAAI,mBAAqB,CAACD,GAAc,CAACH,EAErCK,EAAeC,EAAAA,YAAkB,IAAM,CACvCF,GAKAN,EAAQ,OACZ,CAAE,UAAAL,CAAA,EACF,CACC,OAAQ,OACR,OAAQF,CAAA,CACT,CAEF,EAAG,CAACa,EAAeX,EAAWK,CAAO,CAAC,EAEtC,MAAO,CAACM,EAAeC,CAAY,CACpC,CA+DO,SAASE,EAAgB,CAC/B,SAAAC,EAAW,IACX,QAAAC,EACA,UAAAC,EAAY,GACZ,KAAAC,EAAO,IACR,EAKG,CAEF,MAAMC,EAAe,QADDD,IAAS,KAAO,kBAAoB,iBAChB,8GAExC,OAAIF,SAEDI,EAAA,CACA,SAAA,CAAAC,EAAAA,IAACC,EAAA,CAAe,QAAO,GACtB,SAAAD,EAAAA,IAAC,OAAA,CACA,UAAW,gDAAgDF,CAAY,IAAIF,CAAS,GACpF,SAAU,EAET,SAAAF,CAAA,CAAA,EAEH,EACAM,EAAAA,IAACE,EAAA,CACA,KAAK,SACL,WAAY,EACZ,iBAAkB,GAClB,gBAAe,GAEd,SAAAP,CAAA,CAAA,CACF,EACD,EAKDK,EAAAA,IAAC,OAAA,CACA,UAAW,iCAAiCF,CAAY,IAAIF,CAAS,GAEpE,SAAAF,CAAA,CAAA,CAGJ"}
@@ -1,4 +1,4 @@
1
- import{Q as S,T as z,aG as j,_ as u,g as q,s as H,a as K,b as Q,t as Z,q as J,l as F,c as X,F as Y,K as ee,a4 as te,e as ae,z as re,H as ne}from"./mermaid.core-D3y7PO8B.js";import{p as ie}from"./chunk-4BX2VUAB-qrzenNNi.js";import{p as se}from"./treemap-KMMF4GRG-DZrMUxqR.js";import{d as I}from"./arc-BHxP6xxO.js";import{o as oe}from"./ordinal-Cboi1Yqb.js";import"./preload-helper-BXl3LOEh.js";import"./misc-DVYuZMjW.js";import"./jsx-runtime-C5WNSv3b.js";import"./index-CqIc3cxq.js";import"./chunk-EPOLDU6W-BCLmut3y.js";import"./_baseUniq-BbljtzXr.js";import"./_basePickBy-D6pFkWVF.js";import"./clone-CztDUJhf.js";import"./init-Gi6I4Gst.js";function le(e,a){return a<e?-1:a>e?1:a>=e?0:NaN}function ce(e){return e}function pe(){var e=ce,a=le,f=null,x=S(0),s=S(z),l=S(0);function o(t){var n,c=(t=j(t)).length,d,y,h=0,p=new Array(c),i=new Array(c),v=+x.apply(this,arguments),w=Math.min(z,Math.max(-z,s.apply(this,arguments)-v)),m,C=Math.min(Math.abs(w)/c,l.apply(this,arguments)),$=C*(w<0?-1:1),g;for(n=0;n<c;++n)(g=i[p[n]=n]=+e(t[n],n,t))>0&&(h+=g);for(a!=null?p.sort(function(A,D){return a(i[A],i[D])}):f!=null&&p.sort(function(A,D){return f(t[A],t[D])}),n=0,y=h?(w-c*$)/h:0;n<c;++n,v=m)d=p[n],g=i[d],m=v+(g>0?g*y:0)+$,i[d]={data:t[d],index:n,value:g,startAngle:v,endAngle:m,padAngle:C};return i}return o.value=function(t){return arguments.length?(e=typeof t=="function"?t:S(+t),o):e},o.sortValues=function(t){return arguments.length?(a=t,f=null,o):a},o.sort=function(t){return arguments.length?(f=t,a=null,o):f},o.startAngle=function(t){return arguments.length?(x=typeof t=="function"?t:S(+t),o):x},o.endAngle=function(t){return arguments.length?(s=typeof t=="function"?t:S(+t),o):s},o.padAngle=function(t){return arguments.length?(l=typeof t=="function"?t:S(+t),o):l},o}var ue=ne.pie,G={sections:new Map,showData:!1},T=G.sections,N=G.showData,de=structuredClone(ue),ge=u(()=>structuredClone(de),"getConfig"),fe=u(()=>{T=new Map,N=G.showData,re()},"clear"),me=u(({label:e,value:a})=>{if(a<0)throw new Error(`"${e}" has invalid value: ${a}. Negative values are not allowed in pie charts. All slice values must be >= 0.`);T.has(e)||(T.set(e,a),F.debug(`added new section: ${e}, with value: ${a}`))},"addSection"),he=u(()=>T,"getSections"),ve=u(e=>{N=e},"setShowData"),Se=u(()=>N,"getShowData"),L={getConfig:ge,clear:fe,setDiagramTitle:J,getDiagramTitle:Z,setAccTitle:Q,getAccTitle:K,setAccDescription:H,getAccDescription:q,addSection:me,getSections:he,setShowData:ve,getShowData:Se},xe=u((e,a)=>{ie(e,a),a.setShowData(e.showData),e.sections.map(a.addSection)},"populateDb"),ye={parse:u(async e=>{const a=await se("pie",e);F.debug(a),xe(a,L)},"parse")},we=u(e=>`
1
+ import{Q as S,T as z,aG as j,_ as u,g as q,s as H,a as K,b as Q,t as Z,q as J,l as F,c as X,F as Y,K as ee,a4 as te,e as ae,z as re,H as ne}from"./mermaid.core-BdxLLjl2.js";import{p as ie}from"./chunk-4BX2VUAB-BOJM4J9w.js";import{p as se}from"./treemap-KMMF4GRG-Ds3XkDP-.js";import{d as I}from"./arc-ChVm3d4e.js";import{o as oe}from"./ordinal-Cboi1Yqb.js";import"./preload-helper-BXl3LOEh.js";import"./misc-W4055b-0.js";import"./jsx-runtime-C5WNSv3b.js";import"./index-CqIc3cxq.js";import"./chunk-EPOLDU6W-BCLmut3y.js";import"./_baseUniq-DTO-tFvD.js";import"./_basePickBy-D77BeQbR.js";import"./clone-DRkw5ylZ.js";import"./init-Gi6I4Gst.js";function le(e,a){return a<e?-1:a>e?1:a>=e?0:NaN}function ce(e){return e}function pe(){var e=ce,a=le,f=null,x=S(0),s=S(z),l=S(0);function o(t){var n,c=(t=j(t)).length,d,y,h=0,p=new Array(c),i=new Array(c),v=+x.apply(this,arguments),w=Math.min(z,Math.max(-z,s.apply(this,arguments)-v)),m,C=Math.min(Math.abs(w)/c,l.apply(this,arguments)),$=C*(w<0?-1:1),g;for(n=0;n<c;++n)(g=i[p[n]=n]=+e(t[n],n,t))>0&&(h+=g);for(a!=null?p.sort(function(A,D){return a(i[A],i[D])}):f!=null&&p.sort(function(A,D){return f(t[A],t[D])}),n=0,y=h?(w-c*$)/h:0;n<c;++n,v=m)d=p[n],g=i[d],m=v+(g>0?g*y:0)+$,i[d]={data:t[d],index:n,value:g,startAngle:v,endAngle:m,padAngle:C};return i}return o.value=function(t){return arguments.length?(e=typeof t=="function"?t:S(+t),o):e},o.sortValues=function(t){return arguments.length?(a=t,f=null,o):a},o.sort=function(t){return arguments.length?(f=t,a=null,o):f},o.startAngle=function(t){return arguments.length?(x=typeof t=="function"?t:S(+t),o):x},o.endAngle=function(t){return arguments.length?(s=typeof t=="function"?t:S(+t),o):s},o.padAngle=function(t){return arguments.length?(l=typeof t=="function"?t:S(+t),o):l},o}var ue=ne.pie,G={sections:new Map,showData:!1},T=G.sections,N=G.showData,de=structuredClone(ue),ge=u(()=>structuredClone(de),"getConfig"),fe=u(()=>{T=new Map,N=G.showData,re()},"clear"),me=u(({label:e,value:a})=>{if(a<0)throw new Error(`"${e}" has invalid value: ${a}. Negative values are not allowed in pie charts. All slice values must be >= 0.`);T.has(e)||(T.set(e,a),F.debug(`added new section: ${e}, with value: ${a}`))},"addSection"),he=u(()=>T,"getSections"),ve=u(e=>{N=e},"setShowData"),Se=u(()=>N,"getShowData"),L={getConfig:ge,clear:fe,setDiagramTitle:J,getDiagramTitle:Z,setAccTitle:Q,getAccTitle:K,setAccDescription:H,getAccDescription:q,addSection:me,getSections:he,setShowData:ve,getShowData:Se},xe=u((e,a)=>{ie(e,a),a.setShowData(e.showData),e.sections.map(a.addSection)},"populateDb"),ye={parse:u(async e=>{const a=await se("pie",e);F.debug(a),xe(a,L)},"parse")},we=u(e=>`
2
2
  .pieCircle{
3
3
  stroke: ${e.pieStrokeColor};
4
4
  stroke-width : ${e.pieStrokeWidth};
@@ -28,4 +28,4 @@ import{Q as S,T as z,aG as j,_ as u,g as q,s as H,a as K,b as Q,t as Z,q as J,l
28
28
  }
29
29
  `,"getStyles"),Ae=we,De=u(e=>{const a=[...e.values()].reduce((s,l)=>s+l,0),f=[...e.entries()].map(([s,l])=>({label:s,value:l})).filter(s=>s.value/a*100>=1).sort((s,l)=>l.value-s.value);return pe().value(s=>s.value)(f)},"createPieArcs"),Ce=u((e,a,f,x)=>{F.debug(`rendering pie chart
30
30
  `+e);const s=x.db,l=X(),o=Y(s.getConfig(),l.pie),t=40,n=18,c=4,d=450,y=d,h=ee(a),p=h.append("g");p.attr("transform","translate("+y/2+","+d/2+")");const{themeVariables:i}=l;let[v]=te(i.pieOuterStrokeWidth);v??=2;const w=o.textPosition,m=Math.min(y,d)/2-t,C=I().innerRadius(0).outerRadius(m),$=I().innerRadius(m*w).outerRadius(m*w);p.append("circle").attr("cx",0).attr("cy",0).attr("r",m+v/2).attr("class","pieOuterCircle");const g=s.getSections(),A=De(g),D=[i.pie1,i.pie2,i.pie3,i.pie4,i.pie5,i.pie6,i.pie7,i.pie8,i.pie9,i.pie10,i.pie11,i.pie12];let b=0;g.forEach(r=>{b+=r});const W=A.filter(r=>(r.data.value/b*100).toFixed(0)!=="0"),E=oe(D);p.selectAll("mySlices").data(W).enter().append("path").attr("d",C).attr("fill",r=>E(r.data.label)).attr("class","pieCircle"),p.selectAll("mySlices").data(W).enter().append("text").text(r=>(r.data.value/b*100).toFixed(0)+"%").attr("transform",r=>"translate("+$.centroid(r)+")").style("text-anchor","middle").attr("class","slice"),p.append("text").text(s.getDiagramTitle()).attr("x",0).attr("y",-400/2).attr("class","pieTitleText");const O=[...g.entries()].map(([r,M])=>({label:r,value:M})),k=p.selectAll(".legend").data(O).enter().append("g").attr("class","legend").attr("transform",(r,M)=>{const R=n+c,B=R*O.length/2,V=12*n,U=M*R-B;return"translate("+V+","+U+")"});k.append("rect").attr("width",n).attr("height",n).style("fill",r=>E(r.label)).style("stroke",r=>E(r.label)),k.append("text").attr("x",n+c).attr("y",n-c).text(r=>s.getShowData()?`${r.label} [${r.value}]`:r.label);const _=Math.max(...k.selectAll("text").nodes().map(r=>r?.getBoundingClientRect().width??0)),P=y+t+n+c+_;h.attr("viewBox",`0 0 ${P} ${d}`),ae(h,d,P,o.useMaxWidth)},"draw"),$e={draw:Ce},Le={parser:ye,db:L,renderer:$e,styles:Ae};export{Le as diagram};
31
- //# sourceMappingURL=pieDiagram-ADFJNKIX-CKbrBdQs.js.map
31
+ //# sourceMappingURL=pieDiagram-ADFJNKIX-BQ4sFDrB.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"pieDiagram-ADFJNKIX-CKbrBdQs.js","sources":["../../../../../node_modules/d3-shape/src/descending.js","../../../../../node_modules/d3-shape/src/identity.js","../../../../../node_modules/d3-shape/src/pie.js","../../../../../node_modules/mermaid/dist/chunks/mermaid.core/pieDiagram-ADFJNKIX.mjs"],"sourcesContent":["export default function(a, b) {\n return b < a ? -1 : b > a ? 1 : b >= a ? 0 : NaN;\n}\n","export default function(d) {\n return d;\n}\n","import array from \"./array.js\";\nimport constant from \"./constant.js\";\nimport descending from \"./descending.js\";\nimport identity from \"./identity.js\";\nimport {tau} from \"./math.js\";\n\nexport default function() {\n var value = identity,\n sortValues = descending,\n sort = null,\n startAngle = constant(0),\n endAngle = constant(tau),\n padAngle = constant(0);\n\n function pie(data) {\n var i,\n n = (data = array(data)).length,\n j,\n k,\n sum = 0,\n index = new Array(n),\n arcs = new Array(n),\n a0 = +startAngle.apply(this, arguments),\n da = Math.min(tau, Math.max(-tau, endAngle.apply(this, arguments) - a0)),\n a1,\n p = Math.min(Math.abs(da) / n, padAngle.apply(this, arguments)),\n pa = p * (da < 0 ? -1 : 1),\n v;\n\n for (i = 0; i < n; ++i) {\n if ((v = arcs[index[i] = i] = +value(data[i], i, data)) > 0) {\n sum += v;\n }\n }\n\n // Optionally sort the arcs by previously-computed values or by data.\n if (sortValues != null) index.sort(function(i, j) { return sortValues(arcs[i], arcs[j]); });\n else if (sort != null) index.sort(function(i, j) { return sort(data[i], data[j]); });\n\n // Compute the arcs! They are stored in the original data's order.\n for (i = 0, k = sum ? (da - n * pa) / sum : 0; i < n; ++i, a0 = a1) {\n j = index[i], v = arcs[j], a1 = a0 + (v > 0 ? v * k : 0) + pa, arcs[j] = {\n data: data[j],\n index: i,\n value: v,\n startAngle: a0,\n endAngle: a1,\n padAngle: p\n };\n }\n\n return arcs;\n }\n\n pie.value = function(_) {\n return arguments.length ? (value = typeof _ === \"function\" ? _ : constant(+_), pie) : value;\n };\n\n pie.sortValues = function(_) {\n return arguments.length ? (sortValues = _, sort = null, pie) : sortValues;\n };\n\n pie.sort = function(_) {\n return arguments.length ? (sort = _, sortValues = null, pie) : sort;\n };\n\n pie.startAngle = function(_) {\n return arguments.length ? (startAngle = typeof _ === \"function\" ? _ : constant(+_), pie) : startAngle;\n };\n\n pie.endAngle = function(_) {\n return arguments.length ? (endAngle = typeof _ === \"function\" ? _ : constant(+_), pie) : endAngle;\n };\n\n pie.padAngle = function(_) {\n return arguments.length ? (padAngle = typeof _ === \"function\" ? _ : constant(+_), pie) : padAngle;\n };\n\n return pie;\n}\n","import {\n selectSvgElement\n} from \"./chunk-EXTU4WIE.mjs\";\nimport {\n populateCommonDb\n} from \"./chunk-4BX2VUAB.mjs\";\nimport {\n cleanAndMerge,\n parseFontSize\n} from \"./chunk-S3R3BYOJ.mjs\";\nimport {\n clear,\n configureSvgSize,\n defaultConfig_default,\n getAccDescription,\n getAccTitle,\n getConfig2 as getConfig,\n getDiagramTitle,\n setAccDescription,\n setAccTitle,\n setDiagramTitle\n} from \"./chunk-ABZYJK2D.mjs\";\nimport {\n __name,\n log\n} from \"./chunk-AGHRB4JF.mjs\";\n\n// src/diagrams/pie/pieParser.ts\nimport { parse } from \"@mermaid-js/parser\";\n\n// src/diagrams/pie/pieDb.ts\nvar DEFAULT_PIE_CONFIG = defaultConfig_default.pie;\nvar DEFAULT_PIE_DB = {\n sections: /* @__PURE__ */ new Map(),\n showData: false,\n config: DEFAULT_PIE_CONFIG\n};\nvar sections = DEFAULT_PIE_DB.sections;\nvar showData = DEFAULT_PIE_DB.showData;\nvar config = structuredClone(DEFAULT_PIE_CONFIG);\nvar getConfig2 = /* @__PURE__ */ __name(() => structuredClone(config), \"getConfig\");\nvar clear2 = /* @__PURE__ */ __name(() => {\n sections = /* @__PURE__ */ new Map();\n showData = DEFAULT_PIE_DB.showData;\n clear();\n}, \"clear\");\nvar addSection = /* @__PURE__ */ __name(({ label, value }) => {\n if (value < 0) {\n throw new Error(\n `\"${label}\" has invalid value: ${value}. Negative values are not allowed in pie charts. All slice values must be >= 0.`\n );\n }\n if (!sections.has(label)) {\n sections.set(label, value);\n log.debug(`added new section: ${label}, with value: ${value}`);\n }\n}, \"addSection\");\nvar getSections = /* @__PURE__ */ __name(() => sections, \"getSections\");\nvar setShowData = /* @__PURE__ */ __name((toggle) => {\n showData = toggle;\n}, \"setShowData\");\nvar getShowData = /* @__PURE__ */ __name(() => showData, \"getShowData\");\nvar db = {\n getConfig: getConfig2,\n clear: clear2,\n setDiagramTitle,\n getDiagramTitle,\n setAccTitle,\n getAccTitle,\n setAccDescription,\n getAccDescription,\n addSection,\n getSections,\n setShowData,\n getShowData\n};\n\n// src/diagrams/pie/pieParser.ts\nvar populateDb = /* @__PURE__ */ __name((ast, db2) => {\n populateCommonDb(ast, db2);\n db2.setShowData(ast.showData);\n ast.sections.map(db2.addSection);\n}, \"populateDb\");\nvar parser = {\n parse: /* @__PURE__ */ __name(async (input) => {\n const ast = await parse(\"pie\", input);\n log.debug(ast);\n populateDb(ast, db);\n }, \"parse\")\n};\n\n// src/diagrams/pie/pieStyles.ts\nvar getStyles = /* @__PURE__ */ __name((options) => `\n .pieCircle{\n stroke: ${options.pieStrokeColor};\n stroke-width : ${options.pieStrokeWidth};\n opacity : ${options.pieOpacity};\n }\n .pieOuterCircle{\n stroke: ${options.pieOuterStrokeColor};\n stroke-width: ${options.pieOuterStrokeWidth};\n fill: none;\n }\n .pieTitleText {\n text-anchor: middle;\n font-size: ${options.pieTitleTextSize};\n fill: ${options.pieTitleTextColor};\n font-family: ${options.fontFamily};\n }\n .slice {\n font-family: ${options.fontFamily};\n fill: ${options.pieSectionTextColor};\n font-size:${options.pieSectionTextSize};\n // fill: white;\n }\n .legend text {\n fill: ${options.pieLegendTextColor};\n font-family: ${options.fontFamily};\n font-size: ${options.pieLegendTextSize};\n }\n`, \"getStyles\");\nvar pieStyles_default = getStyles;\n\n// src/diagrams/pie/pieRenderer.ts\nimport { arc, pie as d3pie, scaleOrdinal } from \"d3\";\nvar createPieArcs = /* @__PURE__ */ __name((sections2) => {\n const sum = [...sections2.values()].reduce((acc, val) => acc + val, 0);\n const pieData = [...sections2.entries()].map(([label, value]) => ({ label, value })).filter((d) => d.value / sum * 100 >= 1).sort((a, b) => b.value - a.value);\n const pie = d3pie().value((d) => d.value);\n return pie(pieData);\n}, \"createPieArcs\");\nvar draw = /* @__PURE__ */ __name((text, id, _version, diagObj) => {\n log.debug(\"rendering pie chart\\n\" + text);\n const db2 = diagObj.db;\n const globalConfig = getConfig();\n const pieConfig = cleanAndMerge(db2.getConfig(), globalConfig.pie);\n const MARGIN = 40;\n const LEGEND_RECT_SIZE = 18;\n const LEGEND_SPACING = 4;\n const height = 450;\n const pieWidth = height;\n const svg = selectSvgElement(id);\n const group = svg.append(\"g\");\n group.attr(\"transform\", \"translate(\" + pieWidth / 2 + \",\" + height / 2 + \")\");\n const { themeVariables } = globalConfig;\n let [outerStrokeWidth] = parseFontSize(themeVariables.pieOuterStrokeWidth);\n outerStrokeWidth ??= 2;\n const textPosition = pieConfig.textPosition;\n const radius = Math.min(pieWidth, height) / 2 - MARGIN;\n const arcGenerator = arc().innerRadius(0).outerRadius(radius);\n const labelArcGenerator = arc().innerRadius(radius * textPosition).outerRadius(radius * textPosition);\n group.append(\"circle\").attr(\"cx\", 0).attr(\"cy\", 0).attr(\"r\", radius + outerStrokeWidth / 2).attr(\"class\", \"pieOuterCircle\");\n const sections2 = db2.getSections();\n const arcs = createPieArcs(sections2);\n const myGeneratedColors = [\n themeVariables.pie1,\n themeVariables.pie2,\n themeVariables.pie3,\n themeVariables.pie4,\n themeVariables.pie5,\n themeVariables.pie6,\n themeVariables.pie7,\n themeVariables.pie8,\n themeVariables.pie9,\n themeVariables.pie10,\n themeVariables.pie11,\n themeVariables.pie12\n ];\n let sum = 0;\n sections2.forEach((section) => {\n sum += section;\n });\n const filteredArcs = arcs.filter((datum) => (datum.data.value / sum * 100).toFixed(0) !== \"0\");\n const color = scaleOrdinal(myGeneratedColors);\n group.selectAll(\"mySlices\").data(filteredArcs).enter().append(\"path\").attr(\"d\", arcGenerator).attr(\"fill\", (datum) => {\n return color(datum.data.label);\n }).attr(\"class\", \"pieCircle\");\n group.selectAll(\"mySlices\").data(filteredArcs).enter().append(\"text\").text((datum) => {\n return (datum.data.value / sum * 100).toFixed(0) + \"%\";\n }).attr(\"transform\", (datum) => {\n return \"translate(\" + labelArcGenerator.centroid(datum) + \")\";\n }).style(\"text-anchor\", \"middle\").attr(\"class\", \"slice\");\n group.append(\"text\").text(db2.getDiagramTitle()).attr(\"x\", 0).attr(\"y\", -(height - 50) / 2).attr(\"class\", \"pieTitleText\");\n const allSectionData = [...sections2.entries()].map(([label, value]) => ({\n label,\n value\n }));\n const legend = group.selectAll(\".legend\").data(allSectionData).enter().append(\"g\").attr(\"class\", \"legend\").attr(\"transform\", (_datum, index) => {\n const height2 = LEGEND_RECT_SIZE + LEGEND_SPACING;\n const offset = height2 * allSectionData.length / 2;\n const horizontal = 12 * LEGEND_RECT_SIZE;\n const vertical = index * height2 - offset;\n return \"translate(\" + horizontal + \",\" + vertical + \")\";\n });\n legend.append(\"rect\").attr(\"width\", LEGEND_RECT_SIZE).attr(\"height\", LEGEND_RECT_SIZE).style(\"fill\", (d) => color(d.label)).style(\"stroke\", (d) => color(d.label));\n legend.append(\"text\").attr(\"x\", LEGEND_RECT_SIZE + LEGEND_SPACING).attr(\"y\", LEGEND_RECT_SIZE - LEGEND_SPACING).text((d) => {\n if (db2.getShowData()) {\n return `${d.label} [${d.value}]`;\n }\n return d.label;\n });\n const longestTextWidth = Math.max(\n ...legend.selectAll(\"text\").nodes().map((node) => node?.getBoundingClientRect().width ?? 0)\n );\n const totalWidth = pieWidth + MARGIN + LEGEND_RECT_SIZE + LEGEND_SPACING + longestTextWidth;\n svg.attr(\"viewBox\", `0 0 ${totalWidth} ${height}`);\n configureSvgSize(svg, height, totalWidth, pieConfig.useMaxWidth);\n}, \"draw\");\nvar renderer = { draw };\n\n// src/diagrams/pie/pieDiagram.ts\nvar diagram = {\n parser,\n db,\n renderer,\n styles: pieStyles_default\n};\nexport {\n diagram\n};\n"],"names":["descending","a","b","identity","d","d3pie","value","sortValues","sort","startAngle","constant","endAngle","tau","padAngle","pie","data","i","n","array","j","k","sum","index","arcs","a0","da","a1","p","pa","v","_","DEFAULT_PIE_CONFIG","defaultConfig_default","DEFAULT_PIE_DB","sections","showData","config","getConfig2","__name","clear2","clear","addSection","label","log","getSections","setShowData","toggle","getShowData","db","setDiagramTitle","getDiagramTitle","setAccTitle","getAccTitle","setAccDescription","getAccDescription","populateDb","ast","db2","populateCommonDb","parser","input","parse","getStyles","options","pieStyles_default","createPieArcs","sections2","acc","val","pieData","draw","text","id","_version","diagObj","globalConfig","getConfig","pieConfig","cleanAndMerge","MARGIN","LEGEND_RECT_SIZE","LEGEND_SPACING","height","pieWidth","svg","selectSvgElement","group","themeVariables","outerStrokeWidth","parseFontSize","textPosition","radius","arcGenerator","arc","labelArcGenerator","myGeneratedColors","section","filteredArcs","datum","color","scaleOrdinal","allSectionData","legend","_datum","height2","offset","horizontal","vertical","longestTextWidth","node","totalWidth","configureSvgSize","renderer","diagram"],"mappings":"goBAAe,SAAAA,GAASC,EAAGC,EAAG,CAC5B,OAAOA,EAAID,EAAI,GAAKC,EAAID,EAAI,EAAIC,GAAKD,EAAI,EAAI,GAC/C,CCFe,SAAAE,GAASC,EAAG,CACzB,OAAOA,CACT,CCIe,SAAAC,IAAW,CACxB,IAAIC,EAAQH,GACRI,EAAaP,GACbQ,EAAO,KACPC,EAAaC,EAAS,CAAC,EACvBC,EAAWD,EAASE,CAAG,EACvBC,EAAWH,EAAS,CAAC,EAEzB,SAASI,EAAIC,EAAM,CACjB,IAAIC,EACAC,GAAKF,EAAOG,EAAMH,CAAI,GAAG,OACzBI,EACAC,EACAC,EAAM,EACNC,EAAQ,IAAI,MAAML,CAAC,EACnBM,EAAO,IAAI,MAAMN,CAAC,EAClBO,EAAK,CAACf,EAAW,MAAM,KAAM,SAAS,EACtCgB,EAAK,KAAK,IAAIb,EAAK,KAAK,IAAI,CAACA,EAAKD,EAAS,MAAM,KAAM,SAAS,EAAIa,CAAE,CAAC,EACvEE,EACAC,EAAI,KAAK,IAAI,KAAK,IAAIF,CAAE,EAAIR,EAAGJ,EAAS,MAAM,KAAM,SAAS,CAAC,EAC9De,EAAKD,GAAKF,EAAK,EAAI,GAAK,GACxBI,EAEJ,IAAKb,EAAI,EAAGA,EAAIC,EAAG,EAAED,GACda,EAAIN,EAAKD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,EAAE,KAAK,SAAUA,CAAgB,EAAE,MAAM,OAAS5E,GAAM+F,EAAM/F,EAAE,KAAK,CAAC,EAAE,MAAM,SAAWA,GAAM+F,EAAM/F,EAAE,KAAK,CAAC,EACjKkG,EAAO,OAAO,MAAM,EAAE,KAAK,IAAKtB,EAAmBC,CAAc,EAAE,KAAK,IAAKD,EAAmBC,CAAc,EAAE,KAAM7E,GAChHqD,EAAI,cACC,GAAGrD,EAAE,KAAK,KAAKA,EAAE,KAAK,IAExBA,EAAE,KACV,EACD,MAAMwG,EAAmB,KAAK,IAC5B,GAAGN,EAAO,UAAU,MAAM,EAAE,MAAK,EAAG,IAAKO,GAASA,GAAM,sBAAqB,EAAG,OAAS,CAAC,CAC9F,EACQC,EAAa3B,EAAWJ,EAASC,EAAmBC,EAAiB2B,EAC3ExB,EAAI,KAAK,UAAW,OAAO0B,CAAU,IAAI5B,CAAM,EAAE,EACjD6B,GAAiB3B,EAAKF,EAAQ4B,EAAYjC,EAAU,WAAW,CACjE,EAAG,MAAM,EACLmC,GAAW,CAAE,KAAA1C,EAAI,EAGjB2C,GAAU,CACZ,OAAAtD,GACA,GAAAX,EACA,SAAAgE,GACA,OAAQhD,EACV","x_google_ignoreList":[0,1,2,3]}
1
+ {"version":3,"file":"pieDiagram-ADFJNKIX-BQ4sFDrB.js","sources":["../../../../../node_modules/d3-shape/src/descending.js","../../../../../node_modules/d3-shape/src/identity.js","../../../../../node_modules/d3-shape/src/pie.js","../../../../../node_modules/mermaid/dist/chunks/mermaid.core/pieDiagram-ADFJNKIX.mjs"],"sourcesContent":["export default function(a, b) {\n return b < a ? -1 : b > a ? 1 : b >= a ? 0 : NaN;\n}\n","export default function(d) {\n return d;\n}\n","import array from \"./array.js\";\nimport constant from \"./constant.js\";\nimport descending from \"./descending.js\";\nimport identity from \"./identity.js\";\nimport {tau} from \"./math.js\";\n\nexport default function() {\n var value = identity,\n sortValues = descending,\n sort = null,\n startAngle = constant(0),\n endAngle = constant(tau),\n padAngle = constant(0);\n\n function pie(data) {\n var i,\n n = (data = array(data)).length,\n j,\n k,\n sum = 0,\n index = new Array(n),\n arcs = new Array(n),\n a0 = +startAngle.apply(this, arguments),\n da = Math.min(tau, Math.max(-tau, endAngle.apply(this, arguments) - a0)),\n a1,\n p = Math.min(Math.abs(da) / n, padAngle.apply(this, arguments)),\n pa = p * (da < 0 ? -1 : 1),\n v;\n\n for (i = 0; i < n; ++i) {\n if ((v = arcs[index[i] = i] = +value(data[i], i, data)) > 0) {\n sum += v;\n }\n }\n\n // Optionally sort the arcs by previously-computed values or by data.\n if (sortValues != null) index.sort(function(i, j) { return sortValues(arcs[i], arcs[j]); });\n else if (sort != null) index.sort(function(i, j) { return sort(data[i], data[j]); });\n\n // Compute the arcs! They are stored in the original data's order.\n for (i = 0, k = sum ? (da - n * pa) / sum : 0; i < n; ++i, a0 = a1) {\n j = index[i], v = arcs[j], a1 = a0 + (v > 0 ? v * k : 0) + pa, arcs[j] = {\n data: data[j],\n index: i,\n value: v,\n startAngle: a0,\n endAngle: a1,\n padAngle: p\n };\n }\n\n return arcs;\n }\n\n pie.value = function(_) {\n return arguments.length ? (value = typeof _ === \"function\" ? _ : constant(+_), pie) : value;\n };\n\n pie.sortValues = function(_) {\n return arguments.length ? (sortValues = _, sort = null, pie) : sortValues;\n };\n\n pie.sort = function(_) {\n return arguments.length ? (sort = _, sortValues = null, pie) : sort;\n };\n\n pie.startAngle = function(_) {\n return arguments.length ? (startAngle = typeof _ === \"function\" ? _ : constant(+_), pie) : startAngle;\n };\n\n pie.endAngle = function(_) {\n return arguments.length ? (endAngle = typeof _ === \"function\" ? _ : constant(+_), pie) : endAngle;\n };\n\n pie.padAngle = function(_) {\n return arguments.length ? (padAngle = typeof _ === \"function\" ? _ : constant(+_), pie) : padAngle;\n };\n\n return pie;\n}\n","import {\n selectSvgElement\n} from \"./chunk-EXTU4WIE.mjs\";\nimport {\n populateCommonDb\n} from \"./chunk-4BX2VUAB.mjs\";\nimport {\n cleanAndMerge,\n parseFontSize\n} from \"./chunk-S3R3BYOJ.mjs\";\nimport {\n clear,\n configureSvgSize,\n defaultConfig_default,\n getAccDescription,\n getAccTitle,\n getConfig2 as getConfig,\n getDiagramTitle,\n setAccDescription,\n setAccTitle,\n setDiagramTitle\n} from \"./chunk-ABZYJK2D.mjs\";\nimport {\n __name,\n log\n} from \"./chunk-AGHRB4JF.mjs\";\n\n// src/diagrams/pie/pieParser.ts\nimport { parse } from \"@mermaid-js/parser\";\n\n// src/diagrams/pie/pieDb.ts\nvar DEFAULT_PIE_CONFIG = defaultConfig_default.pie;\nvar DEFAULT_PIE_DB = {\n sections: /* @__PURE__ */ new Map(),\n showData: false,\n config: DEFAULT_PIE_CONFIG\n};\nvar sections = DEFAULT_PIE_DB.sections;\nvar showData = DEFAULT_PIE_DB.showData;\nvar config = structuredClone(DEFAULT_PIE_CONFIG);\nvar getConfig2 = /* @__PURE__ */ __name(() => structuredClone(config), \"getConfig\");\nvar clear2 = /* @__PURE__ */ __name(() => {\n sections = /* @__PURE__ */ new Map();\n showData = DEFAULT_PIE_DB.showData;\n clear();\n}, \"clear\");\nvar addSection = /* @__PURE__ */ __name(({ label, value }) => {\n if (value < 0) {\n throw new Error(\n `\"${label}\" has invalid value: ${value}. Negative values are not allowed in pie charts. All slice values must be >= 0.`\n );\n }\n if (!sections.has(label)) {\n sections.set(label, value);\n log.debug(`added new section: ${label}, with value: ${value}`);\n }\n}, \"addSection\");\nvar getSections = /* @__PURE__ */ __name(() => sections, \"getSections\");\nvar setShowData = /* @__PURE__ */ __name((toggle) => {\n showData = toggle;\n}, \"setShowData\");\nvar getShowData = /* @__PURE__ */ __name(() => showData, \"getShowData\");\nvar db = {\n getConfig: getConfig2,\n clear: clear2,\n setDiagramTitle,\n getDiagramTitle,\n setAccTitle,\n getAccTitle,\n setAccDescription,\n getAccDescription,\n addSection,\n getSections,\n setShowData,\n getShowData\n};\n\n// src/diagrams/pie/pieParser.ts\nvar populateDb = /* @__PURE__ */ __name((ast, db2) => {\n populateCommonDb(ast, db2);\n db2.setShowData(ast.showData);\n ast.sections.map(db2.addSection);\n}, \"populateDb\");\nvar parser = {\n parse: /* @__PURE__ */ __name(async (input) => {\n const ast = await parse(\"pie\", input);\n log.debug(ast);\n populateDb(ast, db);\n }, \"parse\")\n};\n\n// src/diagrams/pie/pieStyles.ts\nvar getStyles = /* @__PURE__ */ __name((options) => `\n .pieCircle{\n stroke: ${options.pieStrokeColor};\n stroke-width : ${options.pieStrokeWidth};\n opacity : ${options.pieOpacity};\n }\n .pieOuterCircle{\n stroke: ${options.pieOuterStrokeColor};\n stroke-width: ${options.pieOuterStrokeWidth};\n fill: none;\n }\n .pieTitleText {\n text-anchor: middle;\n font-size: ${options.pieTitleTextSize};\n fill: ${options.pieTitleTextColor};\n font-family: ${options.fontFamily};\n }\n .slice {\n font-family: ${options.fontFamily};\n fill: ${options.pieSectionTextColor};\n font-size:${options.pieSectionTextSize};\n // fill: white;\n }\n .legend text {\n fill: ${options.pieLegendTextColor};\n font-family: ${options.fontFamily};\n font-size: ${options.pieLegendTextSize};\n }\n`, \"getStyles\");\nvar pieStyles_default = getStyles;\n\n// src/diagrams/pie/pieRenderer.ts\nimport { arc, pie as d3pie, scaleOrdinal } from \"d3\";\nvar createPieArcs = /* @__PURE__ */ __name((sections2) => {\n const sum = [...sections2.values()].reduce((acc, val) => acc + val, 0);\n const pieData = [...sections2.entries()].map(([label, value]) => ({ label, value })).filter((d) => d.value / sum * 100 >= 1).sort((a, b) => b.value - a.value);\n const pie = d3pie().value((d) => d.value);\n return pie(pieData);\n}, \"createPieArcs\");\nvar draw = /* @__PURE__ */ __name((text, id, _version, diagObj) => {\n log.debug(\"rendering pie chart\\n\" + text);\n const db2 = diagObj.db;\n const globalConfig = getConfig();\n const pieConfig = cleanAndMerge(db2.getConfig(), globalConfig.pie);\n const MARGIN = 40;\n const LEGEND_RECT_SIZE = 18;\n const LEGEND_SPACING = 4;\n const height = 450;\n const pieWidth = height;\n const svg = selectSvgElement(id);\n const group = svg.append(\"g\");\n group.attr(\"transform\", \"translate(\" + pieWidth / 2 + \",\" + height / 2 + \")\");\n const { themeVariables } = globalConfig;\n let [outerStrokeWidth] = parseFontSize(themeVariables.pieOuterStrokeWidth);\n outerStrokeWidth ??= 2;\n const textPosition = pieConfig.textPosition;\n const radius = Math.min(pieWidth, height) / 2 - MARGIN;\n const arcGenerator = arc().innerRadius(0).outerRadius(radius);\n const labelArcGenerator = arc().innerRadius(radius * textPosition).outerRadius(radius * textPosition);\n group.append(\"circle\").attr(\"cx\", 0).attr(\"cy\", 0).attr(\"r\", radius + outerStrokeWidth / 2).attr(\"class\", \"pieOuterCircle\");\n const sections2 = db2.getSections();\n const arcs = createPieArcs(sections2);\n const myGeneratedColors = [\n themeVariables.pie1,\n themeVariables.pie2,\n themeVariables.pie3,\n themeVariables.pie4,\n themeVariables.pie5,\n themeVariables.pie6,\n themeVariables.pie7,\n themeVariables.pie8,\n themeVariables.pie9,\n themeVariables.pie10,\n themeVariables.pie11,\n themeVariables.pie12\n ];\n let sum = 0;\n sections2.forEach((section) => {\n sum += section;\n });\n const filteredArcs = arcs.filter((datum) => (datum.data.value / sum * 100).toFixed(0) !== \"0\");\n const color = scaleOrdinal(myGeneratedColors);\n group.selectAll(\"mySlices\").data(filteredArcs).enter().append(\"path\").attr(\"d\", arcGenerator).attr(\"fill\", (datum) => {\n return color(datum.data.label);\n }).attr(\"class\", \"pieCircle\");\n group.selectAll(\"mySlices\").data(filteredArcs).enter().append(\"text\").text((datum) => {\n return (datum.data.value / sum * 100).toFixed(0) + \"%\";\n }).attr(\"transform\", (datum) => {\n return \"translate(\" + labelArcGenerator.centroid(datum) + \")\";\n }).style(\"text-anchor\", \"middle\").attr(\"class\", \"slice\");\n group.append(\"text\").text(db2.getDiagramTitle()).attr(\"x\", 0).attr(\"y\", -(height - 50) / 2).attr(\"class\", \"pieTitleText\");\n const allSectionData = [...sections2.entries()].map(([label, value]) => ({\n label,\n value\n }));\n const legend = group.selectAll(\".legend\").data(allSectionData).enter().append(\"g\").attr(\"class\", \"legend\").attr(\"transform\", (_datum, index) => {\n const height2 = LEGEND_RECT_SIZE + LEGEND_SPACING;\n const offset = height2 * allSectionData.length / 2;\n const horizontal = 12 * LEGEND_RECT_SIZE;\n const vertical = index * height2 - offset;\n return \"translate(\" + horizontal + \",\" + vertical + \")\";\n });\n legend.append(\"rect\").attr(\"width\", LEGEND_RECT_SIZE).attr(\"height\", LEGEND_RECT_SIZE).style(\"fill\", (d) => color(d.label)).style(\"stroke\", (d) => color(d.label));\n legend.append(\"text\").attr(\"x\", LEGEND_RECT_SIZE + LEGEND_SPACING).attr(\"y\", LEGEND_RECT_SIZE - LEGEND_SPACING).text((d) => {\n if (db2.getShowData()) {\n return `${d.label} [${d.value}]`;\n }\n return d.label;\n });\n const longestTextWidth = Math.max(\n ...legend.selectAll(\"text\").nodes().map((node) => node?.getBoundingClientRect().width ?? 0)\n );\n const totalWidth = pieWidth + MARGIN + LEGEND_RECT_SIZE + LEGEND_SPACING + longestTextWidth;\n svg.attr(\"viewBox\", `0 0 ${totalWidth} ${height}`);\n configureSvgSize(svg, height, totalWidth, pieConfig.useMaxWidth);\n}, \"draw\");\nvar renderer = { draw };\n\n// src/diagrams/pie/pieDiagram.ts\nvar diagram = {\n parser,\n db,\n renderer,\n styles: pieStyles_default\n};\nexport {\n diagram\n};\n"],"names":["descending","a","b","identity","d","d3pie","value","sortValues","sort","startAngle","constant","endAngle","tau","padAngle","pie","data","i","n","array","j","k","sum","index","arcs","a0","da","a1","p","pa","v","_","DEFAULT_PIE_CONFIG","defaultConfig_default","DEFAULT_PIE_DB","sections","showData","config","getConfig2","__name","clear2","clear","addSection","label","log","getSections","setShowData","toggle","getShowData","db","setDiagramTitle","getDiagramTitle","setAccTitle","getAccTitle","setAccDescription","getAccDescription","populateDb","ast","db2","populateCommonDb","parser","input","parse","getStyles","options","pieStyles_default","createPieArcs","sections2","acc","val","pieData","draw","text","id","_version","diagObj","globalConfig","getConfig","pieConfig","cleanAndMerge","MARGIN","LEGEND_RECT_SIZE","LEGEND_SPACING","height","pieWidth","svg","selectSvgElement","group","themeVariables","outerStrokeWidth","parseFontSize","textPosition","radius","arcGenerator","arc","labelArcGenerator","myGeneratedColors","section","filteredArcs","datum","color","scaleOrdinal","allSectionData","legend","_datum","height2","offset","horizontal","vertical","longestTextWidth","node","totalWidth","configureSvgSize","renderer","diagram"],"mappings":"goBAAe,SAAAA,GAASC,EAAGC,EAAG,CAC5B,OAAOA,EAAID,EAAI,GAAKC,EAAID,EAAI,EAAIC,GAAKD,EAAI,EAAI,GAC/C,CCFe,SAAAE,GAASC,EAAG,CACzB,OAAOA,CACT,CCIe,SAAAC,IAAW,CACxB,IAAIC,EAAQH,GACRI,EAAaP,GACbQ,EAAO,KACPC,EAAaC,EAAS,CAAC,EACvBC,EAAWD,EAASE,CAAG,EACvBC,EAAWH,EAAS,CAAC,EAEzB,SAASI,EAAIC,EAAM,CACjB,IAAIC,EACAC,GAAKF,EAAOG,EAAMH,CAAI,GAAG,OACzBI,EACAC,EACAC,EAAM,EACNC,EAAQ,IAAI,MAAML,CAAC,EACnBM,EAAO,IAAI,MAAMN,CAAC,EAClBO,EAAK,CAACf,EAAW,MAAM,KAAM,SAAS,EACtCgB,EAAK,KAAK,IAAIb,EAAK,KAAK,IAAI,CAACA,EAAKD,EAAS,MAAM,KAAM,SAAS,EAAIa,CAAE,CAAC,EACvEE,EACAC,EAAI,KAAK,IAAI,KAAK,IAAIF,CAAE,EAAIR,EAAGJ,EAAS,MAAM,KAAM,SAAS,CAAC,EAC9De,EAAKD,GAAKF,EAAK,EAAI,GAAK,GACxBI,EAEJ,IAAKb,EAAI,EAAGA,EAAIC,EAAG,EAAED,GACda,EAAIN,EAAKD,EAAMN,CAAC,EAAIA,CAAC,EAAI,CAACV,EAAMS,EAAKC,CAAC,EAAGA,EAAGD,CAAI,GAAK,IACxDM,GAAOQ,GASX,IAJItB,GAAc,KAAMe,EAAM,KAAK,SAASN,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EAAO,OAAO,MAAM,EAAE,KAAK,IAAKtB,EAAmBC,CAAc,EAAE,KAAK,IAAKD,EAAmBC,CAAc,EAAE,KAAM7E,GAChHqD,EAAI,cACC,GAAGrD,EAAE,KAAK,KAAKA,EAAE,KAAK,IAExBA,EAAE,KACV,EACD,MAAMwG,EAAmB,KAAK,IAC5B,GAAGN,EAAO,UAAU,MAAM,EAAE,MAAK,EAAG,IAAKO,GAASA,GAAM,sBAAqB,EAAG,OAAS,CAAC,CAC9F,EACQC,EAAa3B,EAAWJ,EAASC,EAAmBC,EAAiB2B,EAC3ExB,EAAI,KAAK,UAAW,OAAO0B,CAAU,IAAI5B,CAAM,EAAE,EACjD6B,GAAiB3B,EAAKF,EAAQ4B,EAAYjC,EAAU,WAAW,CACjE,EAAG,MAAM,EACLmC,GAAW,CAAE,KAAA1C,EAAI,EAGjB2C,GAAU,CACZ,OAAAtD,GACA,GAAAX,EACA,SAAAgE,GACA,OAAQhD,EACV","x_google_ignoreList":[0,1,2,3]}
@@ -0,0 +1,2 @@
1
+ import{j as e}from"./jsx-runtime-C5WNSv3b.js";import{r as c}from"./index-CqIc3cxq.js";import{A as ue,L as M}from"./chunk-EPOLDU6W-BCLmut3y.js";import{u as de,I as N,c as fe}from"./misc-W4055b-0.js";import{L as me}from"./loading-CDNzW5oO.js";import{D as xe,u as pe}from"./discord-BJkw0IrB.js";import{u as he}from"./online-DiNLkgTC.js";import{a as G,b as O,P as T,e as g,d as ve,u as K,o as ge,f as be,S as je}from"./tooltip-Tlsyx2YO.js";import{g as we,u as $}from"./index-CJDOQ1bl.js";import{S as Ne}from"./status-indicator-C6DiLYL5.js";import{t as Te}from"./index-DzdDahau.js";import{S as Ie}from"./set-playground-BSGwH9dH.js";import{P as Ce}from"./playground-window-x2mQ5o1O.js";import{P as ye}from"./preview-fhmjENlm.js";var _="rovingFocusGroup.onEntryFocus",Fe={bubbles:!1,cancelable:!0},I="RovingFocusGroup",[A,V,Re]=we(I),[Se,B]=G(I,[Re]),[Pe,Ee]=Se(I),z=c.forwardRef((t,s)=>e.jsx(A.Provider,{scope:t.__scopeRovingFocusGroup,children:e.jsx(A.Slot,{scope:t.__scopeRovingFocusGroup,children:e.jsx(_e,{...t,ref:s})})}));z.displayName=I;var _e=c.forwardRef((t,s)=>{const{__scopeRovingFocusGroup:r,orientation:n,loop:a=!1,dir:u,currentTabStopId:i,defaultCurrentTabStopId:m,onCurrentTabStopIdChange:v,onEntryFocus:x,preventScrollOnEntryFocus:o=!1,...l}=t,p=c.useRef(null),C=ve(s,p),y=$(u),[F,d]=K({prop:i,defaultProp:m??null,onChange:v,caller:I}),[b,S]=c.useState(!1),h=ge(x),j=V(r),P=c.useRef(!1),[oe,k]=c.useState(0);return c.useEffect(()=>{const f=p.current;if(f)return f.addEventListener(_,h),()=>f.removeEventListener(_,h)},[h]),e.jsx(Pe,{scope:r,orientation:n,dir:y,loop:a,currentTabStopId:F,onItemFocus:c.useCallback(f=>d(f),[d]),onItemShiftTab:c.useCallback(()=>S(!0),[]),onFocusableItemAdd:c.useCallback(()=>k(f=>f+1),[]),onFocusableItemRemove:c.useCallback(()=>k(f=>f-1),[]),children:e.jsx(T.div,{tabIndex:b||oe===0?-1:0,"data-orientation":n,...l,ref:C,style:{outline:"none",...t.style},onMouseDown:g(t.onMouseDown,()=>{P.current=!0}),onFocus:g(t.onFocus,f=>{const ae=!P.current;if(f.target===f.currentTarget&&ae&&!b){const L=new CustomEvent(_,Fe);if(f.currentTarget.dispatchEvent(L),!L.defaultPrevented){const E=j().filter(w=>w.focusable),ie=E.find(w=>w.active),ce=E.find(w=>w.id===F),le=[ie,ce,...E].filter(Boolean).map(w=>w.ref.current);Y(le,o)}}P.current=!1}),onBlur:g(t.onBlur,()=>S(!1))})})}),H="RovingFocusGroupItem",W=c.forwardRef((t,s)=>{const{__scopeRovingFocusGroup:r,focusable:n=!0,active:a=!1,tabStopId:u,children:i,...m}=t,v=O(),x=u||v,o=Ee(H,r),l=o.currentTabStopId===x,p=V(r),{onFocusableItemAdd:C,onFocusableItemRemove:y,currentTabStopId:F}=o;return c.useEffect(()=>{if(n)return C(),()=>y()},[n,C,y]),e.jsx(A.ItemSlot,{scope:r,id:x,focusable:n,active:a,children:e.jsx(T.span,{tabIndex:l?0:-1,"data-orientation":o.orientation,...m,ref:s,onMouseDown:g(t.onMouseDown,d=>{n?o.onItemFocus(x):d.preventDefault()}),onFocus:g(t.onFocus,()=>o.onItemFocus(x)),onKeyDown:g(t.onKeyDown,d=>{if(d.key==="Tab"&&d.shiftKey){o.onItemShiftTab();return}if(d.target!==d.currentTarget)return;const b=ke(d,o.orientation,o.dir);if(b!==void 0){if(d.metaKey||d.ctrlKey||d.altKey||d.shiftKey)return;d.preventDefault();let h=p().filter(j=>j.focusable).map(j=>j.ref.current);if(b==="last")h.reverse();else if(b==="prev"||b==="next"){b==="prev"&&h.reverse();const j=h.indexOf(d.currentTarget);h=o.loop?Le(h,j+1):h.slice(j+1)}setTimeout(()=>Y(h))}}),children:typeof i=="function"?i({isCurrentTabStop:l,hasTabStop:F!=null}):i})})});W.displayName=H;var Ae={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function De(t,s){return s!=="rtl"?t:t==="ArrowLeft"?"ArrowRight":t==="ArrowRight"?"ArrowLeft":t}function ke(t,s,r){const n=De(t.key,r);if(!(s==="vertical"&&["ArrowLeft","ArrowRight"].includes(n))&&!(s==="horizontal"&&["ArrowUp","ArrowDown"].includes(n)))return Ae[n]}function Y(t,s=!1){const r=document.activeElement;for(const n of t)if(n===r||(n.focus({preventScroll:s}),document.activeElement!==r))return}function Le(t,s){return t.map((r,n)=>t[(s+n)%t.length])}var Ue=z,Me=W,R="Tabs",[Ge]=G(R,[B]),q=B(),[Oe,D]=Ge(R),J=c.forwardRef((t,s)=>{const{__scopeTabs:r,value:n,onValueChange:a,defaultValue:u,orientation:i="horizontal",dir:m,activationMode:v="automatic",...x}=t,o=$(m),[l,p]=K({prop:n,onChange:a,defaultProp:u??"",caller:R});return e.jsx(Oe,{scope:r,baseId:O(),value:l,onValueChange:p,orientation:i,dir:o,activationMode:v,children:e.jsx(T.div,{dir:o,"data-orientation":i,...x,ref:s})})});J.displayName=R;var Q="TabsList",X=c.forwardRef((t,s)=>{const{__scopeTabs:r,loop:n=!0,...a}=t,u=D(Q,r),i=q(r);return e.jsx(Ue,{asChild:!0,...i,orientation:u.orientation,dir:u.dir,loop:n,children:e.jsx(T.div,{role:"tablist","aria-orientation":u.orientation,...a,ref:s})})});X.displayName=Q;var Z="TabsTrigger",ee=c.forwardRef((t,s)=>{const{__scopeTabs:r,value:n,disabled:a=!1,...u}=t,i=D(Z,r),m=q(r),v=re(i.baseId,n),x=ne(i.baseId,n),o=n===i.value;return e.jsx(Me,{asChild:!0,...m,focusable:!a,active:o,children:e.jsx(T.button,{type:"button",role:"tab","aria-selected":o,"aria-controls":x,"data-state":o?"active":"inactive","data-disabled":a?"":void 0,disabled:a,id:v,...u,ref:s,onMouseDown:g(t.onMouseDown,l=>{!a&&l.button===0&&l.ctrlKey===!1?i.onValueChange(n):l.preventDefault()}),onKeyDown:g(t.onKeyDown,l=>{[" ","Enter"].includes(l.key)&&i.onValueChange(n)}),onFocus:g(t.onFocus,()=>{const l=i.activationMode!=="manual";!o&&!a&&l&&i.onValueChange(n)})})})});ee.displayName=Z;var te="TabsContent",se=c.forwardRef((t,s)=>{const{__scopeTabs:r,value:n,forceMount:a,children:u,...i}=t,m=D(te,r),v=re(m.baseId,n),x=ne(m.baseId,n),o=n===m.value,l=c.useRef(o);return c.useEffect(()=>{const p=requestAnimationFrame(()=>l.current=!1);return()=>cancelAnimationFrame(p)},[]),e.jsx(be,{present:a||o,children:({present:p})=>e.jsx(T.div,{"data-state":o?"active":"inactive","data-orientation":m.orientation,role:"tabpanel","aria-labelledby":v,hidden:!p,id:x,tabIndex:0,...i,ref:s,style:{...t.style,animationDuration:l.current?"0s":void 0},children:p&&u})})});se.displayName=te;function re(t,s){return`${t}-trigger-${s}`}function ne(t,s){return`${t}-content-${s}`}var at=J,Ke=X,$e=ee,it=se;function ct({discordPostsPromise:t}){return e.jsxs("div",{className:"flex h-full w-full flex-col gap-4 pt-4",children:[e.jsx("div",{className:"text-center",children:e.jsx(xe,{})}),e.jsx("div",{className:"bg-accent scrollbar-thin scrollbar-thumb-scrollbar flex-1 overflow-y-scroll pb-4",children:e.jsx(Ve,{discordPostsPromise:t})})]})}function Ve({discordPostsPromise:t}){const s=pe(),r=de();return he()?e.jsxs("div",{className:"flex h-full flex-col items-center justify-between",children:[e.jsx(c.Suspense,{fallback:e.jsx("div",{className:"flex h-full w-full flex-col items-center justify-center",children:e.jsx(me,{children:"Loading Discord Posts"})}),children:e.jsx(ue,{resolve:t,errorElement:e.jsx("div",{className:"text-foreground-destructive",children:"There was a problem loading the discord posts"}),children:a=>e.jsx("ul",{className:"flex w-full flex-col gap-4 p-3 xl:p-12",children:a.map(u=>e.jsx("li",{className:"bg-background rounded-xl border transition-all duration-200 focus-within:-translate-y-1 focus-within:shadow-lg hover:-translate-y-1 hover:shadow-lg",children:e.jsx(Be,{thread:u})},u.id))})})}),e.jsx("div",{children:e.jsxs(M,{to:r&&!s.includes("oauth")?s.replace(/^https/,"discord"):s,target:s.includes("oauth")?void 0:"_blank",rel:"noreferrer noopener",onClick:r?a=>{a.preventDefault(),window.open(a.currentTarget.href,"_blank","noreferrer noopener")}:void 0,className:"flex items-center gap-2 p-2 text-xl hover:underline",children:["Create Post ",e.jsx(N,{name:"ExternalLink"})]})})]}):e.jsx("div",{className:"flex h-full flex-col items-center justify-between",children:e.jsx("div",{className:"text-foreground-destructive flex h-full w-full flex-col items-center justify-center",children:e.jsx(N,{name:"WifiNoConnection",size:"xl",children:"Unable to load discord messages when offline"})})})}function Be({thread:t}){const s=t.reactions.filter(r=>r.count);return e.jsx("div",{children:e.jsxs("div",{className:"flex flex-col gap-2 p-4",children:[e.jsxs("div",{className:"flex min-w-0 gap-4",children:[e.jsxs("div",{className:"flex min-w-0 flex-col gap-1",children:[t.tags.length?e.jsx("div",{className:"flex gap-2",children:t.tags.map(r=>e.jsxs("div",{className:"bg-accent flex items-center justify-center gap-1 rounded-full px-2 py-1 text-sm",children:[e.jsx("span",{className:"h-3 w-3 leading-3",children:e.jsx(U,{name:r.emojiName,url:r.emojiUrl})}),e.jsx("span",{children:r.name})]},`${r.name}-${r.emojiName??r.emojiUrl??"tag"}`))}):null,e.jsx("strong",{className:"text-xl font-bold",children:t.name}),e.jsxs("div",{className:"flex min-w-0 flex-col gap-1",children:[e.jsxs("div",{className:"flex items-center gap-1",children:[t.authorAvatarUrl?e.jsx("img",{src:t.authorAvatarUrl,alt:"",className:"h-6 w-6 rounded-full"}):null,e.jsxs("span",{children:[e.jsx("span",{className:"font-bold",style:t.authorHexAccentColor?{color:t.authorHexAccentColor}:{},children:t.authorDisplayName}),":"," "]})]}),e.jsx("span",{className:"text-muted-foreground line-clamp-4 min-w-0",children:t.messagePreview})]})]}),t.previewImageUrl?e.jsx("img",{src:t.previewImageUrl,alt:"",className:"h-28 w-28 rounded-lg object-cover"}):null]}),e.jsxs("div",{className:"flex justify-between",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("span",{children:s.length?e.jsx("ul",{className:"flex items-center gap-2",children:s.map((r,n)=>e.jsxs("li",{className:"border-info/60 bg-info/10 text-info flex items-center gap-1 rounded-md border px-[5px] py-[0.5px] text-sm",children:[e.jsx("span",{className:"h-3 w-3 leading-3",children:e.jsx(U,{name:r.emojiName,url:r.emojiUrl})}),e.jsx("span",{children:r.count})]},`${r.emojiName??r.emojiUrl??"reaction"}-${n}`))}):null}),e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsxs("span",{className:"inline-flex items-center gap-1",children:[e.jsx(N,{name:"Chat"})," ",t.messageCount]}),` · ${t.lastUpdatedDisplay}`]})]}),e.jsxs("span",{className:"flex items-center gap-4",children:[e.jsx("a",{href:t.link.replace(/^https/,"discord"),children:e.jsx(N,{name:"Discord"})}),e.jsx("a",{href:t.link,target:"_blank",rel:"noreferrer noopener",children:e.jsx(N,{name:"ExternalLink"})})]})]})]})})}function U({name:t,url:s}){return s?e.jsx("img",{src:s,alt:t,className:"h-full w-full"}):t||null}function lt(t,s,r){const n=new URLSearchParams(t);return s===r?n.delete("preview"):n.set("preview",s),n}function ut({tabs:t}){return e.jsx(Ke,{className:"scrollbar-thin scrollbar-thumb-scrollbar h-14 min-h-14 overflow-x-auto border-b whitespace-nowrap",children:t.map(s=>e.jsx($e,{value:s.id,hidden:s.hidden,asChild:!0,children:e.jsx(M,{id:`${s.id}-tab`,className:fe("clip-path-button radix-state-active:z-10 radix-state-active:bg-foreground radix-state-active:text-background radix-state-active:hover:bg-foreground/80 radix-state-active:hover:text-background/80 radix-state-inactive:hover:bg-foreground/20 radix-state-inactive:hover:text-foreground/80 focus:bg-foreground/80 focus:text-background/80 relative h-full px-6 py-4 font-mono text-sm uppercase outline-none",s.hidden?"hidden":"inline-block"),preventScrollReset:!0,prefetch:"intent",onClick:s.onClick,to:s.to,children:e.jsxs("span",{className:"flex items-center gap-2",children:[s.status?e.jsx(Ne,{status:s.status}):null,e.jsx("span",{children:s.label})]})})},s.id))})}function dt({appInfo:t,inBrowserBrowserRef:s,problemAppName:r,allApps:n,isUpToDate:a}){return e.jsx(Ce,{playgroundAppName:t?.appName,problemAppName:r,allApps:n,isUpToDate:a,children:t?.dev?.type==="none"?e.jsxs("div",{className:"flex h-full flex-col items-center justify-center gap-4",children:[e.jsx("div",{className:"text-secondary-foreground text-2xl",children:"Non-UI exercise"}),e.jsxs("div",{className:"text-secondary-foreground max-w-md text-center text-balance",children:["This exercise has no application or other UI associated with it."," ",e.jsx("br",{}),"Navigate to"," ",e.jsx(je,{content:t.fullPath,children:e.jsxs("span",{className:"inline-flex cursor-pointer items-center gap-1.5 underline",onClick:()=>{navigator.clipboard.writeText(t.fullPath),Te.success("Copied playground path to clipboard")},children:["the playground directory",e.jsx(N,{name:"Copy",size:"sm"})]})})," ","in your editor and follow the exercise instructions to complete it."]})]}):t?e.jsx(ye,{id:t.appName,appInfo:t,inBrowserBrowserRef:s}):e.jsxs("div",{className:"flex flex-col justify-center gap-2",children:[e.jsx("p",{children:"Please set the playground first"}),r?e.jsx(Ie,{appName:r}):null]})})}export{it as C,ct as D,ut as P,at as R,dt as a,lt as g};
2
+ //# sourceMappingURL=playground-DmEAkxG1.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"playground-DmEAkxG1.js","sources":["../../../../../node_modules/@radix-ui/react-roving-focus/dist/index.mjs","../../../../../node_modules/@radix-ui/react-tabs/dist/index.mjs","../../../app/components/discord-chat.tsx","../../../app/components/preview-tabs.tsx","../../../app/routes/_app+/exercise+/$exerciseNumber_.$stepNumber.$type+/__shared/playground.tsx"],"sourcesContent":["\"use client\";\n\n// src/roving-focus-group.tsx\nimport * as React from \"react\";\nimport { composeEventHandlers } from \"@radix-ui/primitive\";\nimport { createCollection } from \"@radix-ui/react-collection\";\nimport { useComposedRefs } from \"@radix-ui/react-compose-refs\";\nimport { createContextScope } from \"@radix-ui/react-context\";\nimport { useId } from \"@radix-ui/react-id\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { useCallbackRef } from \"@radix-ui/react-use-callback-ref\";\nimport { useControllableState } from \"@radix-ui/react-use-controllable-state\";\nimport { useDirection } from \"@radix-ui/react-direction\";\nimport { jsx } from \"react/jsx-runtime\";\nvar ENTRY_FOCUS = \"rovingFocusGroup.onEntryFocus\";\nvar EVENT_OPTIONS = { bubbles: false, cancelable: true };\nvar GROUP_NAME = \"RovingFocusGroup\";\nvar [Collection, useCollection, createCollectionScope] = createCollection(GROUP_NAME);\nvar [createRovingFocusGroupContext, createRovingFocusGroupScope] = createContextScope(\n GROUP_NAME,\n [createCollectionScope]\n);\nvar [RovingFocusProvider, useRovingFocusContext] = createRovingFocusGroupContext(GROUP_NAME);\nvar RovingFocusGroup = React.forwardRef(\n (props, forwardedRef) => {\n return /* @__PURE__ */ jsx(Collection.Provider, { scope: props.__scopeRovingFocusGroup, children: /* @__PURE__ */ jsx(Collection.Slot, { scope: props.__scopeRovingFocusGroup, children: /* @__PURE__ */ jsx(RovingFocusGroupImpl, { ...props, ref: forwardedRef }) }) });\n }\n);\nRovingFocusGroup.displayName = GROUP_NAME;\nvar RovingFocusGroupImpl = React.forwardRef((props, forwardedRef) => {\n const {\n __scopeRovingFocusGroup,\n orientation,\n loop = false,\n dir,\n currentTabStopId: currentTabStopIdProp,\n defaultCurrentTabStopId,\n onCurrentTabStopIdChange,\n onEntryFocus,\n preventScrollOnEntryFocus = false,\n ...groupProps\n } = props;\n const ref = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, ref);\n const direction = useDirection(dir);\n const [currentTabStopId, setCurrentTabStopId] = useControllableState({\n prop: currentTabStopIdProp,\n defaultProp: defaultCurrentTabStopId ?? null,\n onChange: onCurrentTabStopIdChange,\n caller: GROUP_NAME\n });\n const [isTabbingBackOut, setIsTabbingBackOut] = React.useState(false);\n const handleEntryFocus = useCallbackRef(onEntryFocus);\n const getItems = useCollection(__scopeRovingFocusGroup);\n const isClickFocusRef = React.useRef(false);\n const [focusableItemsCount, setFocusableItemsCount] = React.useState(0);\n React.useEffect(() => {\n const node = ref.current;\n if (node) {\n node.addEventListener(ENTRY_FOCUS, handleEntryFocus);\n return () => node.removeEventListener(ENTRY_FOCUS, handleEntryFocus);\n }\n }, [handleEntryFocus]);\n return /* @__PURE__ */ jsx(\n RovingFocusProvider,\n {\n scope: __scopeRovingFocusGroup,\n orientation,\n dir: direction,\n loop,\n currentTabStopId,\n onItemFocus: React.useCallback(\n (tabStopId) => setCurrentTabStopId(tabStopId),\n [setCurrentTabStopId]\n ),\n onItemShiftTab: React.useCallback(() => setIsTabbingBackOut(true), []),\n onFocusableItemAdd: React.useCallback(\n () => setFocusableItemsCount((prevCount) => prevCount + 1),\n []\n ),\n onFocusableItemRemove: React.useCallback(\n () => setFocusableItemsCount((prevCount) => prevCount - 1),\n []\n ),\n children: /* @__PURE__ */ jsx(\n Primitive.div,\n {\n tabIndex: isTabbingBackOut || focusableItemsCount === 0 ? -1 : 0,\n \"data-orientation\": orientation,\n ...groupProps,\n ref: composedRefs,\n style: { outline: \"none\", ...props.style },\n onMouseDown: composeEventHandlers(props.onMouseDown, () => {\n isClickFocusRef.current = true;\n }),\n onFocus: composeEventHandlers(props.onFocus, (event) => {\n const isKeyboardFocus = !isClickFocusRef.current;\n if (event.target === event.currentTarget && isKeyboardFocus && !isTabbingBackOut) {\n const entryFocusEvent = new CustomEvent(ENTRY_FOCUS, EVENT_OPTIONS);\n event.currentTarget.dispatchEvent(entryFocusEvent);\n if (!entryFocusEvent.defaultPrevented) {\n const items = getItems().filter((item) => item.focusable);\n const activeItem = items.find((item) => item.active);\n const currentItem = items.find((item) => item.id === currentTabStopId);\n const candidateItems = [activeItem, currentItem, ...items].filter(\n Boolean\n );\n const candidateNodes = candidateItems.map((item) => item.ref.current);\n focusFirst(candidateNodes, preventScrollOnEntryFocus);\n }\n }\n isClickFocusRef.current = false;\n }),\n onBlur: composeEventHandlers(props.onBlur, () => setIsTabbingBackOut(false))\n }\n )\n }\n );\n});\nvar ITEM_NAME = \"RovingFocusGroupItem\";\nvar RovingFocusGroupItem = React.forwardRef(\n (props, forwardedRef) => {\n const {\n __scopeRovingFocusGroup,\n focusable = true,\n active = false,\n tabStopId,\n children,\n ...itemProps\n } = props;\n const autoId = useId();\n const id = tabStopId || autoId;\n const context = useRovingFocusContext(ITEM_NAME, __scopeRovingFocusGroup);\n const isCurrentTabStop = context.currentTabStopId === id;\n const getItems = useCollection(__scopeRovingFocusGroup);\n const { onFocusableItemAdd, onFocusableItemRemove, currentTabStopId } = context;\n React.useEffect(() => {\n if (focusable) {\n onFocusableItemAdd();\n return () => onFocusableItemRemove();\n }\n }, [focusable, onFocusableItemAdd, onFocusableItemRemove]);\n return /* @__PURE__ */ jsx(\n Collection.ItemSlot,\n {\n scope: __scopeRovingFocusGroup,\n id,\n focusable,\n active,\n children: /* @__PURE__ */ jsx(\n Primitive.span,\n {\n tabIndex: isCurrentTabStop ? 0 : -1,\n \"data-orientation\": context.orientation,\n ...itemProps,\n ref: forwardedRef,\n onMouseDown: composeEventHandlers(props.onMouseDown, (event) => {\n if (!focusable) event.preventDefault();\n else context.onItemFocus(id);\n }),\n onFocus: composeEventHandlers(props.onFocus, () => context.onItemFocus(id)),\n onKeyDown: composeEventHandlers(props.onKeyDown, (event) => {\n if (event.key === \"Tab\" && event.shiftKey) {\n context.onItemShiftTab();\n return;\n }\n if (event.target !== event.currentTarget) return;\n const focusIntent = getFocusIntent(event, context.orientation, context.dir);\n if (focusIntent !== void 0) {\n if (event.metaKey || event.ctrlKey || event.altKey || event.shiftKey) return;\n event.preventDefault();\n const items = getItems().filter((item) => item.focusable);\n let candidateNodes = items.map((item) => item.ref.current);\n if (focusIntent === \"last\") candidateNodes.reverse();\n else if (focusIntent === \"prev\" || focusIntent === \"next\") {\n if (focusIntent === \"prev\") candidateNodes.reverse();\n const currentIndex = candidateNodes.indexOf(event.currentTarget);\n candidateNodes = context.loop ? wrapArray(candidateNodes, currentIndex + 1) : candidateNodes.slice(currentIndex + 1);\n }\n setTimeout(() => focusFirst(candidateNodes));\n }\n }),\n children: typeof children === \"function\" ? children({ isCurrentTabStop, hasTabStop: currentTabStopId != null }) : children\n }\n )\n }\n );\n }\n);\nRovingFocusGroupItem.displayName = ITEM_NAME;\nvar MAP_KEY_TO_FOCUS_INTENT = {\n ArrowLeft: \"prev\",\n ArrowUp: \"prev\",\n ArrowRight: \"next\",\n ArrowDown: \"next\",\n PageUp: \"first\",\n Home: \"first\",\n PageDown: \"last\",\n End: \"last\"\n};\nfunction getDirectionAwareKey(key, dir) {\n if (dir !== \"rtl\") return key;\n return key === \"ArrowLeft\" ? \"ArrowRight\" : key === \"ArrowRight\" ? \"ArrowLeft\" : key;\n}\nfunction getFocusIntent(event, orientation, dir) {\n const key = getDirectionAwareKey(event.key, dir);\n if (orientation === \"vertical\" && [\"ArrowLeft\", \"ArrowRight\"].includes(key)) return void 0;\n if (orientation === \"horizontal\" && [\"ArrowUp\", \"ArrowDown\"].includes(key)) return void 0;\n return MAP_KEY_TO_FOCUS_INTENT[key];\n}\nfunction focusFirst(candidates, preventScroll = false) {\n const PREVIOUSLY_FOCUSED_ELEMENT = document.activeElement;\n for (const candidate of candidates) {\n if (candidate === PREVIOUSLY_FOCUSED_ELEMENT) return;\n candidate.focus({ preventScroll });\n if (document.activeElement !== PREVIOUSLY_FOCUSED_ELEMENT) return;\n }\n}\nfunction wrapArray(array, startIndex) {\n return array.map((_, index) => array[(startIndex + index) % array.length]);\n}\nvar Root = RovingFocusGroup;\nvar Item = RovingFocusGroupItem;\nexport {\n Item,\n Root,\n RovingFocusGroup,\n RovingFocusGroupItem,\n createRovingFocusGroupScope\n};\n//# sourceMappingURL=index.mjs.map\n","\"use client\";\n\n// src/tabs.tsx\nimport * as React from \"react\";\nimport { composeEventHandlers } from \"@radix-ui/primitive\";\nimport { createContextScope } from \"@radix-ui/react-context\";\nimport { createRovingFocusGroupScope } from \"@radix-ui/react-roving-focus\";\nimport { Presence } from \"@radix-ui/react-presence\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport * as RovingFocusGroup from \"@radix-ui/react-roving-focus\";\nimport { useDirection } from \"@radix-ui/react-direction\";\nimport { useControllableState } from \"@radix-ui/react-use-controllable-state\";\nimport { useId } from \"@radix-ui/react-id\";\nimport { jsx } from \"react/jsx-runtime\";\nvar TABS_NAME = \"Tabs\";\nvar [createTabsContext, createTabsScope] = createContextScope(TABS_NAME, [\n createRovingFocusGroupScope\n]);\nvar useRovingFocusGroupScope = createRovingFocusGroupScope();\nvar [TabsProvider, useTabsContext] = createTabsContext(TABS_NAME);\nvar Tabs = React.forwardRef(\n (props, forwardedRef) => {\n const {\n __scopeTabs,\n value: valueProp,\n onValueChange,\n defaultValue,\n orientation = \"horizontal\",\n dir,\n activationMode = \"automatic\",\n ...tabsProps\n } = props;\n const direction = useDirection(dir);\n const [value, setValue] = useControllableState({\n prop: valueProp,\n onChange: onValueChange,\n defaultProp: defaultValue ?? \"\",\n caller: TABS_NAME\n });\n return /* @__PURE__ */ jsx(\n TabsProvider,\n {\n scope: __scopeTabs,\n baseId: useId(),\n value,\n onValueChange: setValue,\n orientation,\n dir: direction,\n activationMode,\n children: /* @__PURE__ */ jsx(\n Primitive.div,\n {\n dir: direction,\n \"data-orientation\": orientation,\n ...tabsProps,\n ref: forwardedRef\n }\n )\n }\n );\n }\n);\nTabs.displayName = TABS_NAME;\nvar TAB_LIST_NAME = \"TabsList\";\nvar TabsList = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeTabs, loop = true, ...listProps } = props;\n const context = useTabsContext(TAB_LIST_NAME, __scopeTabs);\n const rovingFocusGroupScope = useRovingFocusGroupScope(__scopeTabs);\n return /* @__PURE__ */ jsx(\n RovingFocusGroup.Root,\n {\n asChild: true,\n ...rovingFocusGroupScope,\n orientation: context.orientation,\n dir: context.dir,\n loop,\n children: /* @__PURE__ */ jsx(\n Primitive.div,\n {\n role: \"tablist\",\n \"aria-orientation\": context.orientation,\n ...listProps,\n ref: forwardedRef\n }\n )\n }\n );\n }\n);\nTabsList.displayName = TAB_LIST_NAME;\nvar TRIGGER_NAME = \"TabsTrigger\";\nvar TabsTrigger = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeTabs, value, disabled = false, ...triggerProps } = props;\n const context = useTabsContext(TRIGGER_NAME, __scopeTabs);\n const rovingFocusGroupScope = useRovingFocusGroupScope(__scopeTabs);\n const triggerId = makeTriggerId(context.baseId, value);\n const contentId = makeContentId(context.baseId, value);\n const isSelected = value === context.value;\n return /* @__PURE__ */ jsx(\n RovingFocusGroup.Item,\n {\n asChild: true,\n ...rovingFocusGroupScope,\n focusable: !disabled,\n active: isSelected,\n children: /* @__PURE__ */ jsx(\n Primitive.button,\n {\n type: \"button\",\n role: \"tab\",\n \"aria-selected\": isSelected,\n \"aria-controls\": contentId,\n \"data-state\": isSelected ? \"active\" : \"inactive\",\n \"data-disabled\": disabled ? \"\" : void 0,\n disabled,\n id: triggerId,\n ...triggerProps,\n ref: forwardedRef,\n onMouseDown: composeEventHandlers(props.onMouseDown, (event) => {\n if (!disabled && event.button === 0 && event.ctrlKey === false) {\n context.onValueChange(value);\n } else {\n event.preventDefault();\n }\n }),\n onKeyDown: composeEventHandlers(props.onKeyDown, (event) => {\n if ([\" \", \"Enter\"].includes(event.key)) context.onValueChange(value);\n }),\n onFocus: composeEventHandlers(props.onFocus, () => {\n const isAutomaticActivation = context.activationMode !== \"manual\";\n if (!isSelected && !disabled && isAutomaticActivation) {\n context.onValueChange(value);\n }\n })\n }\n )\n }\n );\n }\n);\nTabsTrigger.displayName = TRIGGER_NAME;\nvar CONTENT_NAME = \"TabsContent\";\nvar TabsContent = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopeTabs, value, forceMount, children, ...contentProps } = props;\n const context = useTabsContext(CONTENT_NAME, __scopeTabs);\n const triggerId = makeTriggerId(context.baseId, value);\n const contentId = makeContentId(context.baseId, value);\n const isSelected = value === context.value;\n const isMountAnimationPreventedRef = React.useRef(isSelected);\n React.useEffect(() => {\n const rAF = requestAnimationFrame(() => isMountAnimationPreventedRef.current = false);\n return () => cancelAnimationFrame(rAF);\n }, []);\n return /* @__PURE__ */ jsx(Presence, { present: forceMount || isSelected, children: ({ present }) => /* @__PURE__ */ jsx(\n Primitive.div,\n {\n \"data-state\": isSelected ? \"active\" : \"inactive\",\n \"data-orientation\": context.orientation,\n role: \"tabpanel\",\n \"aria-labelledby\": triggerId,\n hidden: !present,\n id: contentId,\n tabIndex: 0,\n ...contentProps,\n ref: forwardedRef,\n style: {\n ...props.style,\n animationDuration: isMountAnimationPreventedRef.current ? \"0s\" : void 0\n },\n children: present && children\n }\n ) });\n }\n);\nTabsContent.displayName = CONTENT_NAME;\nfunction makeTriggerId(baseId, value) {\n return `${baseId}-trigger-${value}`;\n}\nfunction makeContentId(baseId, value) {\n return `${baseId}-content-${value}`;\n}\nvar Root2 = Tabs;\nvar List = TabsList;\nvar Trigger = TabsTrigger;\nvar Content = TabsContent;\nexport {\n Content,\n List,\n Root2 as Root,\n Tabs,\n TabsContent,\n TabsList,\n TabsTrigger,\n Trigger,\n createTabsScope\n};\n//# sourceMappingURL=index.mjs.map\n","import * as React from 'react'\nimport { Await, Link } from 'react-router'\nimport { Icon } from '#app/components/icons.tsx'\nimport { Loading } from '#app/components/loading.tsx'\nimport { DiscordCTA, useDiscordCTALink } from '#app/routes/_app+/discord.tsx'\nimport { useAltDown } from '#app/utils/misc.tsx'\nimport { useIsOnline } from '#app/utils/online.ts'\n\ntype EmojiData = {\n\temojiName?: string\n\temojiUrl?: string\n}\n\ntype DiscordTag = { name: string } & EmojiData\ntype DiscordReaction = { count: number } & EmojiData\n\nexport type DiscordThread = {\n\tid: string\n\ttags: DiscordTag[]\n\tname: string\n\tlink: string\n\tauthorDisplayName: string\n\tauthorHexAccentColor?: string | null\n\tauthorAvatarUrl: string | null\n\tmessagePreview: string\n\tmessageCount: number\n\tlastUpdated: string\n\tlastUpdatedDisplay: string\n\tpreviewImageUrl: string | null\n\treactions: DiscordReaction[]\n}\n\nexport function DiscordChat({\n\tdiscordPostsPromise,\n}: {\n\tdiscordPostsPromise: Promise<DiscordThread[]>\n}) {\n\treturn (\n\t\t<div className=\"flex h-full w-full flex-col gap-4 pt-4\">\n\t\t\t<div className=\"text-center\">\n\t\t\t\t<DiscordCTA />\n\t\t\t</div>\n\t\t\t<div className=\"bg-accent scrollbar-thin scrollbar-thumb-scrollbar flex-1 overflow-y-scroll pb-4\">\n\t\t\t\t<DiscordPosts discordPostsPromise={discordPostsPromise} />\n\t\t\t</div>\n\t\t</div>\n\t)\n}\n\nfunction DiscordPosts({\n\tdiscordPostsPromise,\n}: {\n\tdiscordPostsPromise: Promise<DiscordThread[]>\n}) {\n\tconst ctaLink = useDiscordCTALink()\n\tconst altDown = useAltDown()\n\tconst isOnline = useIsOnline()\n\tif (!isOnline) {\n\t\treturn (\n\t\t\t<div className=\"flex h-full flex-col items-center justify-between\">\n\t\t\t\t<div className=\"text-foreground-destructive flex h-full w-full flex-col items-center justify-center\">\n\t\t\t\t\t<Icon name=\"WifiNoConnection\" size=\"xl\">\n\t\t\t\t\t\tUnable to load discord messages when offline\n\t\t\t\t\t</Icon>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t)\n\t}\n\treturn (\n\t\t<div className=\"flex h-full flex-col items-center justify-between\">\n\t\t\t<React.Suspense\n\t\t\t\tfallback={\n\t\t\t\t\t<div className=\"flex h-full w-full flex-col items-center justify-center\">\n\t\t\t\t\t\t<Loading>Loading Discord Posts</Loading>\n\t\t\t\t\t</div>\n\t\t\t\t}\n\t\t\t>\n\t\t\t\t<Await\n\t\t\t\t\tresolve={discordPostsPromise}\n\t\t\t\t\terrorElement={\n\t\t\t\t\t\t<div className=\"text-foreground-destructive\">\n\t\t\t\t\t\t\tThere was a problem loading the discord posts\n\t\t\t\t\t\t</div>\n\t\t\t\t\t}\n\t\t\t\t>\n\t\t\t\t\t{(posts) => (\n\t\t\t\t\t\t<ul className=\"flex w-full flex-col gap-4 p-3 xl:p-12\">\n\t\t\t\t\t\t\t{posts.map((post) => (\n\t\t\t\t\t\t\t\t<li\n\t\t\t\t\t\t\t\t\tkey={post.id}\n\t\t\t\t\t\t\t\t\tclassName=\"bg-background rounded-xl border transition-all duration-200 focus-within:-translate-y-1 focus-within:shadow-lg hover:-translate-y-1 hover:shadow-lg\"\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<DiscordPost thread={post} />\n\t\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t</ul>\n\t\t\t\t\t)}\n\t\t\t\t</Await>\n\t\t\t</React.Suspense>\n\t\t\t<div>\n\t\t\t\t<Link\n\t\t\t\t\tto={\n\t\t\t\t\t\taltDown && !ctaLink.includes('oauth')\n\t\t\t\t\t\t\t? ctaLink.replace(/^https/, 'discord')\n\t\t\t\t\t\t\t: ctaLink\n\t\t\t\t\t}\n\t\t\t\t\ttarget={ctaLink.includes('oauth') ? undefined : '_blank'}\n\t\t\t\t\trel=\"noreferrer noopener\"\n\t\t\t\t\tonClick={\n\t\t\t\t\t\taltDown\n\t\t\t\t\t\t\t? (event) => {\n\t\t\t\t\t\t\t\t\tevent.preventDefault()\n\t\t\t\t\t\t\t\t\twindow.open(\n\t\t\t\t\t\t\t\t\t\tevent.currentTarget.href,\n\t\t\t\t\t\t\t\t\t\t'_blank',\n\t\t\t\t\t\t\t\t\t\t'noreferrer noopener',\n\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t: undefined\n\t\t\t\t\t}\n\t\t\t\t\tclassName=\"flex items-center gap-2 p-2 text-xl hover:underline\"\n\t\t\t\t>\n\t\t\t\t\tCreate Post <Icon name=\"ExternalLink\" />\n\t\t\t\t</Link>\n\t\t\t</div>\n\t\t</div>\n\t)\n}\n\nfunction DiscordPost({ thread }: { thread: DiscordThread }) {\n\tconst reactionsWithCounts = thread.reactions.filter(\n\t\t(reaction) => reaction.count,\n\t)\n\n\treturn (\n\t\t<div>\n\t\t\t<div className=\"flex flex-col gap-2 p-4\">\n\t\t\t\t<div className=\"flex min-w-0 gap-4\">\n\t\t\t\t\t<div className=\"flex min-w-0 flex-col gap-1\">\n\t\t\t\t\t\t{thread.tags.length ? (\n\t\t\t\t\t\t\t<div className=\"flex gap-2\">\n\t\t\t\t\t\t\t\t{thread.tags.map((tag) => (\n\t\t\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\t\t\tkey={`${tag.name}-${tag.emojiName ?? tag.emojiUrl ?? 'tag'}`}\n\t\t\t\t\t\t\t\t\t\tclassName=\"bg-accent flex items-center justify-center gap-1 rounded-full px-2 py-1 text-sm\"\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t<span className=\"h-3 w-3 leading-3\">\n\t\t\t\t\t\t\t\t\t\t\t<Emoji name={tag.emojiName} url={tag.emojiUrl} />\n\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t<span>{tag.name}</span>\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t) : null}\n\t\t\t\t\t\t<strong className=\"text-xl font-bold\">{thread.name}</strong>\n\t\t\t\t\t\t<div className=\"flex min-w-0 flex-col gap-1\">\n\t\t\t\t\t\t\t<div className=\"flex items-center gap-1\">\n\t\t\t\t\t\t\t\t{thread.authorAvatarUrl ? (\n\t\t\t\t\t\t\t\t\t<img\n\t\t\t\t\t\t\t\t\t\tsrc={thread.authorAvatarUrl}\n\t\t\t\t\t\t\t\t\t\talt=\"\"\n\t\t\t\t\t\t\t\t\t\tclassName=\"h-6 w-6 rounded-full\"\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t) : null}\n\t\t\t\t\t\t\t\t<span>\n\t\t\t\t\t\t\t\t\t<span\n\t\t\t\t\t\t\t\t\t\tclassName=\"font-bold\"\n\t\t\t\t\t\t\t\t\t\tstyle={\n\t\t\t\t\t\t\t\t\t\t\tthread.authorHexAccentColor\n\t\t\t\t\t\t\t\t\t\t\t\t? { color: thread.authorHexAccentColor }\n\t\t\t\t\t\t\t\t\t\t\t\t: {}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t{thread.authorDisplayName}\n\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t:{' '}\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<span className=\"text-muted-foreground line-clamp-4 min-w-0\">\n\t\t\t\t\t\t\t\t{thread.messagePreview}\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t\t{thread.previewImageUrl ? (\n\t\t\t\t\t\t<img\n\t\t\t\t\t\t\tsrc={thread.previewImageUrl}\n\t\t\t\t\t\t\talt=\"\"\n\t\t\t\t\t\t\tclassName=\"h-28 w-28 rounded-lg object-cover\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t) : null}\n\t\t\t\t</div>\n\n\t\t\t\t<div className=\"flex justify-between\">\n\t\t\t\t\t<div className=\"flex items-center gap-3\">\n\t\t\t\t\t\t<span>\n\t\t\t\t\t\t\t{reactionsWithCounts.length ? (\n\t\t\t\t\t\t\t\t<ul className=\"flex items-center gap-2\">\n\t\t\t\t\t\t\t\t\t{reactionsWithCounts.map((reaction, index) => (\n\t\t\t\t\t\t\t\t\t\t<li\n\t\t\t\t\t\t\t\t\t\t\tkey={`${reaction.emojiName ?? reaction.emojiUrl ?? 'reaction'}-${index}`}\n\t\t\t\t\t\t\t\t\t\t\tclassName=\"border-info/60 bg-info/10 text-info flex items-center gap-1 rounded-md border px-[5px] py-[0.5px] text-sm\"\n\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t<span className=\"h-3 w-3 leading-3\">\n\t\t\t\t\t\t\t\t\t\t\t\t<Emoji\n\t\t\t\t\t\t\t\t\t\t\t\t\tname={reaction.emojiName}\n\t\t\t\t\t\t\t\t\t\t\t\t\turl={reaction.emojiUrl}\n\t\t\t\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t\t\t<span>{reaction.count}</span>\n\t\t\t\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t\t</ul>\n\t\t\t\t\t\t\t) : null}\n\t\t\t\t\t\t</span>\n\t\t\t\t\t\t<span className=\"flex items-center gap-1\">\n\t\t\t\t\t\t\t<span className=\"inline-flex items-center gap-1\">\n\t\t\t\t\t\t\t\t<Icon name=\"Chat\" /> {thread.messageCount}\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t{` · ${thread.lastUpdatedDisplay}`}\n\t\t\t\t\t\t</span>\n\t\t\t\t\t</div>\n\t\t\t\t\t<span className=\"flex items-center gap-4\">\n\t\t\t\t\t\t<a href={thread.link.replace(/^https/, 'discord')}>\n\t\t\t\t\t\t\t<Icon name=\"Discord\" />\n\t\t\t\t\t\t</a>\n\t\t\t\t\t\t<a href={thread.link} target=\"_blank\" rel=\"noreferrer noopener\">\n\t\t\t\t\t\t\t<Icon name=\"ExternalLink\" />\n\t\t\t\t\t\t</a>\n\t\t\t\t\t</span>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t)\n}\n\nfunction Emoji({ name, url }: { name?: string; url?: string }) {\n\treturn url ? (\n\t\t<img src={url} alt={name} className=\"h-full w-full\" />\n\t) : name ? (\n\t\tname\n\t) : null\n}\n","import * as Tabs from '@radix-ui/react-tabs'\nimport * as React from 'react'\nimport { Link } from 'react-router'\nimport { StatusIndicator } from '#app/components/status-indicator.tsx'\nimport { cn } from '#app/utils/misc.tsx'\n\nexport type PreviewTab = {\n\tid: string\n\tlabel: string\n\tto: string\n\thidden?: boolean\n\tstatus?: 'running' | 'passed' | 'failed' | null\n\tonClick?: React.MouseEventHandler<HTMLAnchorElement>\n}\n\nexport function getPreviewSearchParams(\n\tsearchParams: URLSearchParams,\n\tpreviewValue: string,\n\tdefaultValue: string,\n) {\n\tconst next = new URLSearchParams(searchParams)\n\t// Keep URLs clean by omitting the preview param for the default tab.\n\tif (previewValue === defaultValue) {\n\t\tnext.delete('preview')\n\t} else {\n\t\tnext.set('preview', previewValue)\n\t}\n\treturn next\n}\n\nexport function PreviewTabsList({ tabs }: { tabs: PreviewTab[] }) {\n\treturn (\n\t\t<Tabs.List className=\"scrollbar-thin scrollbar-thumb-scrollbar h-14 min-h-14 overflow-x-auto border-b whitespace-nowrap\">\n\t\t\t{tabs.map((tab) => (\n\t\t\t\t<Tabs.Trigger key={tab.id} value={tab.id} hidden={tab.hidden} asChild>\n\t\t\t\t\t<Link\n\t\t\t\t\t\tid={`${tab.id}-tab`}\n\t\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t\t'clip-path-button radix-state-active:z-10 radix-state-active:bg-foreground radix-state-active:text-background radix-state-active:hover:bg-foreground/80 radix-state-active:hover:text-background/80 radix-state-inactive:hover:bg-foreground/20 radix-state-inactive:hover:text-foreground/80 focus:bg-foreground/80 focus:text-background/80 relative h-full px-6 py-4 font-mono text-sm uppercase outline-none',\n\t\t\t\t\t\t\ttab.hidden ? 'hidden' : 'inline-block',\n\t\t\t\t\t\t)}\n\t\t\t\t\t\tpreventScrollReset\n\t\t\t\t\t\tprefetch=\"intent\"\n\t\t\t\t\t\tonClick={tab.onClick}\n\t\t\t\t\t\tto={tab.to}\n\t\t\t\t\t>\n\t\t\t\t\t\t<span className=\"flex items-center gap-2\">\n\t\t\t\t\t\t\t{tab.status ? <StatusIndicator status={tab.status} /> : null}\n\t\t\t\t\t\t\t<span>{tab.label}</span>\n\t\t\t\t\t\t</span>\n\t\t\t\t\t</Link>\n\t\t\t\t</Tabs.Trigger>\n\t\t\t))}\n\t\t</Tabs.List>\n\t)\n}\n","import { toast as showToast } from 'sonner'\nimport { Icon } from '#app/components/icons.tsx'\nimport { type InBrowserBrowserRef } from '#app/components/in-browser-browser'\nimport { SimpleTooltip } from '#app/components/ui/tooltip'\nimport { SetAppToPlayground } from '#app/routes/set-playground'\nimport { PlaygroundWindow } from './playground-window'\nimport { Preview } from './preview'\n\nexport function Playground({\n\tappInfo: playgroundAppInfo,\n\tinBrowserBrowserRef,\n\tproblemAppName,\n\tallApps,\n\tisUpToDate,\n}: {\n\tappInfo: Parameters<typeof Preview>['0']['appInfo'] | null\n\tinBrowserBrowserRef: React.RefObject<InBrowserBrowserRef | null>\n\tproblemAppName?: string\n\tallApps: Array<{ name: string; displayName: string }>\n\tisUpToDate: boolean\n}) {\n\treturn (\n\t\t<PlaygroundWindow\n\t\t\tplaygroundAppName={playgroundAppInfo?.appName}\n\t\t\tproblemAppName={problemAppName}\n\t\t\tallApps={allApps}\n\t\t\tisUpToDate={isUpToDate}\n\t\t>\n\t\t\t{playgroundAppInfo?.dev?.type === 'none' ? (\n\t\t\t\t<div className=\"flex h-full flex-col items-center justify-center gap-4\">\n\t\t\t\t\t<div className=\"text-secondary-foreground text-2xl\">\n\t\t\t\t\t\tNon-UI exercise\n\t\t\t\t\t</div>\n\t\t\t\t\t<div className=\"text-secondary-foreground max-w-md text-center text-balance\">\n\t\t\t\t\t\tThis exercise has no application or other UI associated with it.{' '}\n\t\t\t\t\t\t<br />\n\t\t\t\t\t\tNavigate to{' '}\n\t\t\t\t\t\t<SimpleTooltip content={playgroundAppInfo.fullPath}>\n\t\t\t\t\t\t\t<span\n\t\t\t\t\t\t\t\tclassName=\"inline-flex cursor-pointer items-center gap-1.5 underline\"\n\t\t\t\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\t\t\t\tvoid navigator.clipboard.writeText(playgroundAppInfo.fullPath)\n\t\t\t\t\t\t\t\t\tshowToast.success('Copied playground path to clipboard')\n\t\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\tthe playground directory\n\t\t\t\t\t\t\t\t<Icon name=\"Copy\" size=\"sm\" />\n\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t</SimpleTooltip>{' '}\n\t\t\t\t\t\tin your editor and follow the exercise instructions to complete it.\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t) : playgroundAppInfo ? (\n\t\t\t\t<Preview\n\t\t\t\t\tid={playgroundAppInfo.appName}\n\t\t\t\t\tappInfo={playgroundAppInfo}\n\t\t\t\t\tinBrowserBrowserRef={inBrowserBrowserRef}\n\t\t\t\t/>\n\t\t\t) : (\n\t\t\t\t<div className=\"flex flex-col justify-center gap-2\">\n\t\t\t\t\t<p>Please set the playground first</p>\n\t\t\t\t\t{problemAppName ? (\n\t\t\t\t\t\t<SetAppToPlayground appName={problemAppName} />\n\t\t\t\t\t) : null}\n\t\t\t\t</div>\n\t\t\t)}\n\t\t</PlaygroundWindow>\n\t)\n}\n"],"names":["ENTRY_FOCUS","EVENT_OPTIONS","GROUP_NAME","Collection","useCollection","createCollectionScope","createCollection","createRovingFocusGroupContext","createRovingFocusGroupScope","createContextScope","RovingFocusProvider","useRovingFocusContext","RovingFocusGroup","React.forwardRef","props","forwardedRef","jsx","RovingFocusGroupImpl","__scopeRovingFocusGroup","orientation","loop","dir","currentTabStopIdProp","defaultCurrentTabStopId","onCurrentTabStopIdChange","onEntryFocus","preventScrollOnEntryFocus","groupProps","ref","React.useRef","composedRefs","useComposedRefs","direction","useDirection","currentTabStopId","setCurrentTabStopId","useControllableState","isTabbingBackOut","setIsTabbingBackOut","React.useState","handleEntryFocus","useCallbackRef","getItems","isClickFocusRef","focusableItemsCount","setFocusableItemsCount","React.useEffect","node","React.useCallback","tabStopId","prevCount","Primitive","composeEventHandlers","event","isKeyboardFocus","entryFocusEvent","items","item","activeItem","currentItem","candidateNodes","focusFirst","ITEM_NAME","RovingFocusGroupItem","focusable","active","children","itemProps","autoId","useId","id","context","isCurrentTabStop","onFocusableItemAdd","onFocusableItemRemove","focusIntent","getFocusIntent","currentIndex","wrapArray","MAP_KEY_TO_FOCUS_INTENT","getDirectionAwareKey","key","candidates","preventScroll","PREVIOUSLY_FOCUSED_ELEMENT","candidate","array","startIndex","_","index","Root","Item","TABS_NAME","createTabsContext","useRovingFocusGroupScope","TabsProvider","useTabsContext","Tabs","__scopeTabs","valueProp","onValueChange","defaultValue","activationMode","tabsProps","value","setValue","TAB_LIST_NAME","TabsList","listProps","rovingFocusGroupScope","RovingFocusGroup.Root","TRIGGER_NAME","TabsTrigger","disabled","triggerProps","triggerId","makeTriggerId","contentId","makeContentId","isSelected","RovingFocusGroup.Item","isAutomaticActivation","CONTENT_NAME","TabsContent","forceMount","contentProps","isMountAnimationPreventedRef","rAF","Presence","present","baseId","Root2","List","Trigger","Content","DiscordChat","discordPostsPromise","jsxs","DiscordCTA","DiscordPosts","ctaLink","useDiscordCTALink","altDown","useAltDown","useIsOnline","React.Suspense","Loading","Await","posts","post","DiscordPost","Link","Icon","thread","reactionsWithCounts","reaction","tag","Emoji","name","url","getPreviewSearchParams","searchParams","previewValue","next","PreviewTabsList","tabs","Tabs.List","tab","Tabs.Trigger","cn","StatusIndicator","Playground","playgroundAppInfo","inBrowserBrowserRef","problemAppName","allApps","isUpToDate","PlaygroundWindow","SimpleTooltip","showToast","Preview","SetAppToPlayground"],"mappings":"mtBAcA,IAAIA,EAAc,gCACdC,GAAgB,CAAE,QAAS,GAAO,WAAY,EAAI,EAClDC,EAAa,mBACb,CAACC,EAAYC,EAAeC,EAAqB,EAAIC,GAAiBJ,CAAU,EAChF,CAACK,GAA+BC,CAA2B,EAAIC,EACjEP,EACA,CAACG,EAAqB,CACxB,EACI,CAACK,GAAqBC,EAAqB,EAAIJ,GAA8BL,CAAU,EACvFU,EAAmBC,EAAAA,WACrB,CAACC,EAAOC,IACiBC,MAAIb,EAAW,SAAU,CAAE,MAAOW,EAAM,wBAAyB,SAA0BE,MAAIb,EAAW,KAAM,CAAE,MAAOW,EAAM,wBAAyB,SAA0BE,EAAAA,IAAIC,GAAsB,CAAE,GAAGH,EAAO,IAAKC,EAAc,CAAC,CAAE,CAAC,CAAE,CAE5Q,EACAH,EAAiB,YAAcV,EAC/B,IAAIe,GAAuBJ,EAAAA,WAAiB,CAACC,EAAOC,IAAiB,CACnE,KAAM,CACJ,wBAAAG,EACA,YAAAC,EACA,KAAAC,EAAO,GACP,IAAAC,EACA,iBAAkBC,EAClB,wBAAAC,EACA,yBAAAC,EACA,aAAAC,EACA,0BAAAC,EAA4B,GAC5B,GAAGC,CACP,EAAMb,EACEc,EAAMC,EAAAA,OAAa,IAAI,EACvBC,EAAeC,GAAgBhB,EAAca,CAAG,EAChDI,EAAYC,EAAaZ,CAAG,EAC5B,CAACa,EAAkBC,CAAmB,EAAIC,EAAqB,CACnE,KAAMd,EAC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S,IAAM,CACT,UAAU,UAAU,UAAUmC,EAAkB,QAAQ,EAC7DO,GAAU,QAAQ,qCAAqC,CACxD,EACA,SAAA,CAAA,2BAEAnK,EAAAA,IAACwI,EAAA,CAAK,KAAK,OAAO,KAAK,IAAA,CAAK,CAAA,CAAA,CAAA,EAE9B,EAAiB,IAAI,qEAAA,CAAA,CAEtB,CAAA,CAAA,CACD,EACGoB,EACH5J,EAAAA,IAACoK,GAAA,CACA,GAAIR,EAAkB,QACtB,QAASA,EACT,oBAAAC,CAAA,CAAA,EAGDpC,EAAAA,KAAC,MAAA,CAAI,UAAU,qCACd,SAAA,CAAAzH,EAAAA,IAAC,KAAE,SAAA,iCAAA,CAA+B,EACjC8J,EACA9J,EAAAA,IAACqK,GAAA,CAAmB,QAASP,EAAgB,EAC1C,IAAA,CAAA,CACL,CAAA,CAAA,CAIJ","x_google_ignoreList":[0,1]}
@@ -1,2 +1,2 @@
1
- import{j as e}from"./jsx-runtime-C5WNSv3b.js";import{I as t}from"./misc-DVYuZMjW.js";import{S as x}from"./tooltip-Chzzs4KB.js";import{a as n,P as f}from"./set-playground-DeMY9i7p.js";function p({playgroundAppName:s,problemAppName:i,isUpToDate:r,allApps:a,children:d}){const o=s===i,c=o&&r?e.jsx(t,{size:"xl",name:"Linked"}):e.jsx(t,{size:"xl",name:"Unlinked",className:"text-foreground-destructive animate-pulse"});let l="Click to reset Playground.";return r||(l="Playground is out of date. Click to reset Playground."),o||(l="Playground is not set to the right app. Click to set Playground."),e.jsxs("div",{className:"flex h-full w-full flex-col justify-between",children:[e.jsxs("div",{className:"flex h-14 shrink-0 items-center justify-start gap-2 border-b px-3",children:[e.jsx("div",{className:"display-alt-up",children:i?e.jsx(n,{appName:i,tooltipText:l,children:c}):e.jsx(x,{content:"No problem app available for this step",children:e.jsx("div",{children:e.jsx(t,{name:"Question"})})})}),e.jsx("div",{className:"display-alt-down",children:s?e.jsx(n,{appName:s,reset:!0,tooltipText:"Reset Playground",children:e.jsx("div",{className:"flex h-7 w-7 items-center justify-center",children:e.jsx(t,{name:"Refresh"})})}):e.jsx("div",{className:"h-7 w-7"})}),e.jsx(f,{allApps:a,playgroundAppName:s})]}),e.jsx("div",{className:"flex min-h-0 flex-1 grow items-stretch justify-center overflow-hidden",children:d})]})}export{p as P};
2
- //# sourceMappingURL=playground-window-D9a7P7rH.js.map
1
+ import{j as e}from"./jsx-runtime-C5WNSv3b.js";import{I as t}from"./misc-W4055b-0.js";import{S as x}from"./tooltip-Tlsyx2YO.js";import{a as n,P as f}from"./set-playground-BSGwH9dH.js";function p({playgroundAppName:s,problemAppName:i,isUpToDate:r,allApps:a,children:d}){const o=s===i,c=o&&r?e.jsx(t,{size:"xl",name:"Linked"}):e.jsx(t,{size:"xl",name:"Unlinked",className:"text-foreground-destructive animate-pulse"});let l="Click to reset Playground.";return r||(l="Playground is out of date. Click to reset Playground."),o||(l="Playground is not set to the right app. Click to set Playground."),e.jsxs("div",{className:"flex h-full w-full flex-col justify-between",children:[e.jsxs("div",{className:"flex h-14 shrink-0 items-center justify-start gap-2 border-b px-3",children:[e.jsx("div",{className:"display-alt-up",children:i?e.jsx(n,{appName:i,tooltipText:l,children:c}):e.jsx(x,{content:"No problem app available for this step",children:e.jsx("div",{children:e.jsx(t,{name:"Question"})})})}),e.jsx("div",{className:"display-alt-down",children:s?e.jsx(n,{appName:s,reset:!0,tooltipText:"Reset Playground",children:e.jsx("div",{className:"flex h-7 w-7 items-center justify-center",children:e.jsx(t,{name:"Refresh"})})}):e.jsx("div",{className:"h-7 w-7"})}),e.jsx(f,{allApps:a,playgroundAppName:s})]}),e.jsx("div",{className:"flex min-h-0 flex-1 grow items-stretch justify-center overflow-hidden",children:d})]})}export{p as P};
2
+ //# sourceMappingURL=playground-window-x2mQ5o1O.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"playground-window-D9a7P7rH.js","sources":["../../../app/routes/_app+/exercise+/$exerciseNumber_.$stepNumber.$type+/__shared/playground-window.tsx"],"sourcesContent":["import { Icon } from '#app/components/icons'\nimport { SimpleTooltip } from '#app/components/ui/tooltip.tsx'\nimport { PlaygroundChooser, SetPlayground } from '#app/routes/set-playground'\n\nexport function PlaygroundWindow({\n\tplaygroundAppName,\n\tproblemAppName,\n\tisUpToDate,\n\tallApps,\n\tchildren,\n}: {\n\tplaygroundAppName?: string\n\tproblemAppName?: string\n\tisUpToDate: boolean\n\tallApps: Array<{ name: string; displayName: string }>\n\tchildren: React.ReactNode\n}) {\n\tconst isCorrectApp = playgroundAppName === problemAppName\n\tconst playgroundLinkedUI =\n\t\tisCorrectApp && isUpToDate ? (\n\t\t\t<Icon size=\"xl\" name=\"Linked\" />\n\t\t) : (\n\t\t\t<Icon\n\t\t\t\tsize=\"xl\"\n\t\t\t\tname=\"Unlinked\"\n\t\t\t\tclassName=\"text-foreground-destructive animate-pulse\"\n\t\t\t/>\n\t\t)\n\tlet setPlaygroundTooltipText = 'Click to reset Playground.'\n\tif (!isUpToDate) {\n\t\tsetPlaygroundTooltipText =\n\t\t\t'Playground is out of date. Click to reset Playground.'\n\t}\n\tif (!isCorrectApp) {\n\t\tsetPlaygroundTooltipText =\n\t\t\t'Playground is not set to the right app. Click to set Playground.'\n\t}\n\treturn (\n\t\t<div className=\"flex h-full w-full flex-col justify-between\">\n\t\t\t<div className=\"flex h-14 shrink-0 items-center justify-start gap-2 border-b px-3\">\n\t\t\t\t<div className=\"display-alt-up\">\n\t\t\t\t\t{problemAppName ? (\n\t\t\t\t\t\t<SetPlayground\n\t\t\t\t\t\t\tappName={problemAppName}\n\t\t\t\t\t\t\ttooltipText={setPlaygroundTooltipText}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{playgroundLinkedUI}\n\t\t\t\t\t\t</SetPlayground>\n\t\t\t\t\t) : (\n\t\t\t\t\t\t<SimpleTooltip content=\"No problem app available for this step\">\n\t\t\t\t\t\t\t<div>\n\t\t\t\t\t\t\t\t<Icon name=\"Question\" />\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</SimpleTooltip>\n\t\t\t\t\t)}\n\t\t\t\t</div>\n\t\t\t\t<div className=\"display-alt-down\">\n\t\t\t\t\t{playgroundAppName ? (\n\t\t\t\t\t\t<SetPlayground\n\t\t\t\t\t\t\tappName={playgroundAppName}\n\t\t\t\t\t\t\treset\n\t\t\t\t\t\t\ttooltipText=\"Reset Playground\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<div className=\"flex h-7 w-7 items-center justify-center\">\n\t\t\t\t\t\t\t\t<Icon name=\"Refresh\" />\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</SetPlayground>\n\t\t\t\t\t) : (\n\t\t\t\t\t\t<div className=\"h-7 w-7\" />\n\t\t\t\t\t)}\n\t\t\t\t</div>\n\t\t\t\t<PlaygroundChooser\n\t\t\t\t\tallApps={allApps}\n\t\t\t\t\tplaygroundAppName={playgroundAppName}\n\t\t\t\t/>\n\t\t\t</div>\n\t\t\t<div className=\"flex min-h-0 flex-1 grow items-stretch justify-center overflow-hidden\">\n\t\t\t\t{children}\n\t\t\t</div>\n\t\t</div>\n\t)\n}\n"],"names":["PlaygroundWindow","playgroundAppName","problemAppName","isUpToDate","allApps","children","isCorrectApp","playgroundLinkedUI","jsx","Icon","setPlaygroundTooltipText","jsxs","SetPlayground","SimpleTooltip","PlaygroundChooser"],"mappings":"uLAIO,SAASA,EAAiB,CAChC,kBAAAC,EACA,eAAAC,EACA,WAAAC,EACA,QAAAC,EACA,SAAAC,CACD,EAMG,CACF,MAAMC,EAAeL,IAAsBC,EACrCK,EACLD,GAAgBH,EACfK,EAAAA,IAACC,GAAK,KAAK,KAAK,KAAK,QAAA,CAAS,EAE9BD,EAAAA,IAACC,EAAA,CACA,KAAK,KACL,KAAK,WACL,UAAU,2CAAA,CAAA,EAGb,IAAIC,EAA2B,6BAC/B,OAAKP,IACJO,EACC,yDAEGJ,IACJI,EACC,oEAGDC,EAAAA,KAAC,MAAA,CAAI,UAAU,8CACd,SAAA,CAAAA,EAAAA,KAAC,MAAA,CAAI,UAAU,oEACd,SAAA,CAAAH,EAAAA,IAAC,MAAA,CAAI,UAAU,iBACb,SAAAN,EACAM,EAAAA,IAACI,EAAA,CACA,QAASV,EACT,YAAaQ,EAEZ,SAAAH,CAAA,CAAA,EAGFC,EAAAA,IAACK,EAAA,CAAc,QAAQ,yCACtB,SAAAL,EAAAA,IAAC,MAAA,CACA,SAAAA,EAAAA,IAACC,EAAA,CAAK,KAAK,UAAA,CAAW,CAAA,CACvB,EACD,EAEF,EACAD,EAAAA,IAAC,MAAA,CAAI,UAAU,mBACb,SAAAP,EACAO,EAAAA,IAACI,EAAA,CACA,QAASX,EACT,MAAK,GACL,YAAY,mBAEZ,SAAAO,EAAAA,IAAC,OAAI,UAAU,2CACd,eAACC,EAAA,CAAK,KAAK,UAAU,CAAA,CACtB,CAAA,CAAA,EAGDD,EAAAA,IAAC,MAAA,CAAI,UAAU,UAAU,CAAA,CAE3B,EACAA,EAAAA,IAACM,EAAA,CACA,QAAAV,EACA,kBAAAH,CAAA,CAAA,CACD,EACD,EACAO,EAAAA,IAAC,MAAA,CAAI,UAAU,wEACb,SAAAH,CAAA,CACF,CAAA,EACD,CAEF"}
1
+ {"version":3,"file":"playground-window-x2mQ5o1O.js","sources":["../../../app/routes/_app+/exercise+/$exerciseNumber_.$stepNumber.$type+/__shared/playground-window.tsx"],"sourcesContent":["import { Icon } from '#app/components/icons'\nimport { SimpleTooltip } from '#app/components/ui/tooltip.tsx'\nimport { PlaygroundChooser, SetPlayground } from '#app/routes/set-playground'\n\nexport function PlaygroundWindow({\n\tplaygroundAppName,\n\tproblemAppName,\n\tisUpToDate,\n\tallApps,\n\tchildren,\n}: {\n\tplaygroundAppName?: string\n\tproblemAppName?: string\n\tisUpToDate: boolean\n\tallApps: Array<{ name: string; displayName: string }>\n\tchildren: React.ReactNode\n}) {\n\tconst isCorrectApp = playgroundAppName === problemAppName\n\tconst playgroundLinkedUI =\n\t\tisCorrectApp && isUpToDate ? (\n\t\t\t<Icon size=\"xl\" name=\"Linked\" />\n\t\t) : (\n\t\t\t<Icon\n\t\t\t\tsize=\"xl\"\n\t\t\t\tname=\"Unlinked\"\n\t\t\t\tclassName=\"text-foreground-destructive animate-pulse\"\n\t\t\t/>\n\t\t)\n\tlet setPlaygroundTooltipText = 'Click to reset Playground.'\n\tif (!isUpToDate) {\n\t\tsetPlaygroundTooltipText =\n\t\t\t'Playground is out of date. Click to reset Playground.'\n\t}\n\tif (!isCorrectApp) {\n\t\tsetPlaygroundTooltipText =\n\t\t\t'Playground is not set to the right app. Click to set Playground.'\n\t}\n\treturn (\n\t\t<div className=\"flex h-full w-full flex-col justify-between\">\n\t\t\t<div className=\"flex h-14 shrink-0 items-center justify-start gap-2 border-b px-3\">\n\t\t\t\t<div className=\"display-alt-up\">\n\t\t\t\t\t{problemAppName ? (\n\t\t\t\t\t\t<SetPlayground\n\t\t\t\t\t\t\tappName={problemAppName}\n\t\t\t\t\t\t\ttooltipText={setPlaygroundTooltipText}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{playgroundLinkedUI}\n\t\t\t\t\t\t</SetPlayground>\n\t\t\t\t\t) : (\n\t\t\t\t\t\t<SimpleTooltip content=\"No problem app available for this step\">\n\t\t\t\t\t\t\t<div>\n\t\t\t\t\t\t\t\t<Icon name=\"Question\" />\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</SimpleTooltip>\n\t\t\t\t\t)}\n\t\t\t\t</div>\n\t\t\t\t<div className=\"display-alt-down\">\n\t\t\t\t\t{playgroundAppName ? (\n\t\t\t\t\t\t<SetPlayground\n\t\t\t\t\t\t\tappName={playgroundAppName}\n\t\t\t\t\t\t\treset\n\t\t\t\t\t\t\ttooltipText=\"Reset Playground\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<div className=\"flex h-7 w-7 items-center justify-center\">\n\t\t\t\t\t\t\t\t<Icon name=\"Refresh\" />\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</SetPlayground>\n\t\t\t\t\t) : (\n\t\t\t\t\t\t<div className=\"h-7 w-7\" />\n\t\t\t\t\t)}\n\t\t\t\t</div>\n\t\t\t\t<PlaygroundChooser\n\t\t\t\t\tallApps={allApps}\n\t\t\t\t\tplaygroundAppName={playgroundAppName}\n\t\t\t\t/>\n\t\t\t</div>\n\t\t\t<div className=\"flex min-h-0 flex-1 grow items-stretch justify-center overflow-hidden\">\n\t\t\t\t{children}\n\t\t\t</div>\n\t\t</div>\n\t)\n}\n"],"names":["PlaygroundWindow","playgroundAppName","problemAppName","isUpToDate","allApps","children","isCorrectApp","playgroundLinkedUI","jsx","Icon","setPlaygroundTooltipText","jsxs","SetPlayground","SimpleTooltip","PlaygroundChooser"],"mappings":"uLAIO,SAASA,EAAiB,CAChC,kBAAAC,EACA,eAAAC,EACA,WAAAC,EACA,QAAAC,EACA,SAAAC,CACD,EAMG,CACF,MAAMC,EAAeL,IAAsBC,EACrCK,EACLD,GAAgBH,EACfK,EAAAA,IAACC,GAAK,KAAK,KAAK,KAAK,QAAA,CAAS,EAE9BD,EAAAA,IAACC,EAAA,CACA,KAAK,KACL,KAAK,WACL,UAAU,2CAAA,CAAA,EAGb,IAAIC,EAA2B,6BAC/B,OAAKP,IACJO,EACC,yDAEGJ,IACJI,EACC,oEAGDC,EAAAA,KAAC,MAAA,CAAI,UAAU,8CACd,SAAA,CAAAA,EAAAA,KAAC,MAAA,CAAI,UAAU,oEACd,SAAA,CAAAH,EAAAA,IAAC,MAAA,CAAI,UAAU,iBACb,SAAAN,EACAM,EAAAA,IAACI,EAAA,CACA,QAASV,EACT,YAAaQ,EAEZ,SAAAH,CAAA,CAAA,EAGFC,EAAAA,IAACK,EAAA,CAAc,QAAQ,yCACtB,SAAAL,EAAAA,IAAC,MAAA,CACA,SAAAA,EAAAA,IAACC,EAAA,CAAK,KAAK,UAAA,CAAW,CAAA,CACvB,EACD,EAEF,EACAD,EAAAA,IAAC,MAAA,CAAI,UAAU,mBACb,SAAAP,EACAO,EAAAA,IAACI,EAAA,CACA,QAASX,EACT,MAAK,GACL,YAAY,mBAEZ,SAAAO,EAAAA,IAAC,OAAI,UAAU,2CACd,eAACC,EAAA,CAAK,KAAK,UAAU,CAAA,CACtB,CAAA,CAAA,EAGDD,EAAAA,IAAC,MAAA,CAAI,UAAU,UAAU,CAAA,CAE3B,EACAA,EAAAA,IAACM,EAAA,CACA,QAAAV,EACA,kBAAAH,CAAA,CAAA,CACD,EACD,EACAO,EAAAA,IAAC,MAAA,CAAI,UAAU,wEACb,SAAAH,CAAA,CACF,CAAA,EACD,CAEF"}
@@ -1,2 +1,2 @@
1
- import{w as g,b as v,k as y,f as w,F as d,L as N}from"./chunk-EPOLDU6W-BCLmut3y.js";import{j as e}from"./jsx-runtime-C5WNSv3b.js";import{B as x}from"./button-CIlVtsau.js";import{b as P,I as l}from"./misc-DVYuZMjW.js";import{S as o}from"./tooltip-Chzzs4KB.js";import{u as R}from"./root-loader-BOzEMapJ.js";import"./index-CqIc3cxq.js";import"./index-vDCSPjrM.js";const V=[{value:"best",label:"Best available"},{value:"high",label:"High"},{value:"medium",label:"Medium"},{value:"low",label:"Low"}],C=g(function(){const m=v(),n=R(),c=n.preferences?.player,u=n.preferences?.offlineVideo,h=n.preferences?.fontSize,p=n.preferences?.presence,f=n.preferences?.playground,b=n.preferences?.exerciseWarning,j=y(),i=w(),s=i.data?.offlineVideos??m.offlineVideos,t=s.downloadState.status==="running",a=j.state==="submitting";return P(()=>{i.state==="idle"&&i.load("/resources/offline-videos")},t?2e3:null),e.jsx("div",{className:"h-full w-full overflow-y-auto",children:e.jsxs("main",{className:"container mt-12 flex w-full max-w-3xl grow flex-col gap-4 pb-24",children:[e.jsx("h1",{className:"text-h1 mb-4",children:"Preferences"}),e.jsxs(d,{method:"post",className:"flex w-full max-w-sm flex-col gap-4",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"text-body-xl mb-2",children:"Video Player Preferences"}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("label",{htmlFor:"minResolution",children:"Minimum Resolution:"}),e.jsxs("select",{id:"minResolution",name:"minResolution",defaultValue:c?.minResolution,className:"border-border bg-background text-foreground rounded-md border px-2 py-1",children:[e.jsx("option",{value:"",children:"Auto"}),e.jsx("option",{value:"480",children:"480p"}),e.jsx("option",{value:"720",children:"720p"}),e.jsx("option",{value:"1080",children:"1080p"}),e.jsx("option",{value:"1440",children:"1440p"}),e.jsx("option",{value:"2160",children:"2160p (4K)"})]})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("label",{htmlFor:"maxResolution",children:"Maximum Resolution:"}),e.jsxs("select",{id:"maxResolution",name:"maxResolution",defaultValue:c?.maxResolution,className:"border-border bg-background text-foreground rounded-md border px-2 py-1",children:[e.jsx("option",{value:"",children:"Auto"}),e.jsx("option",{value:"720",children:"720p"}),e.jsx("option",{value:"1080",children:"1080p"}),e.jsx("option",{value:"1440",children:"1440p"}),e.jsx("option",{value:"2160",children:"2160p (4K)"})]})]})]}),e.jsxs("div",{children:[e.jsx("h2",{className:"text-body-xl mb-2",children:"Offline Video Downloads"}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("label",{htmlFor:"downloadResolution",children:"Download Resolution:"}),e.jsx("select",{id:"downloadResolution",name:"downloadResolution",defaultValue:u?.downloadResolution??"best",className:"border-border bg-background text-foreground rounded-md border px-2 py-1",children:V.map(r=>e.jsx("option",{value:r.value,children:r.label},r.value))})]}),e.jsx("p",{className:"text-muted-foreground text-sm",children:"Defaults to the best available resolution."})]}),e.jsxs("div",{children:[e.jsxs("div",{className:"mb-2 flex items-center gap-2",children:[e.jsx("h2",{className:"text-body-xl",children:"Font Size Preference"}),e.jsx(o,{content:"Defaults to 16px",children:e.jsx(l,{name:"Question",tabIndex:0})})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("label",{htmlFor:"fontSize",children:"Font Size"}),e.jsx("input",{type:"number",id:"fontSize",name:"fontSize",defaultValue:h??16,step:"1",min:"12",max:"26",className:"border-border bg-background text-foreground rounded-md border px-2 py-1"})]})]}),e.jsxs("div",{children:[e.jsxs("div",{className:"mb-2 flex items-center gap-2",children:[e.jsx("h2",{className:"text-body-xl",children:"Presence Preference"}),e.jsx(o,{content:"This controls whether your name and avatar are displayed in the pile of faces in navigation",children:e.jsx(l,{name:"Question",tabIndex:0})})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("input",{type:"checkbox",id:"optOutPresence",name:"optOutPresence",defaultChecked:p?.optOut}),e.jsx("label",{htmlFor:"optOutPresence",children:"Opt out of presence features"})]})]}),e.jsxs("div",{children:[e.jsxs("div",{className:"mb-2 flex items-center gap-2",children:[e.jsx("h2",{className:"text-body-xl",children:"Persist Playground"}),e.jsx(o,{content:'When enabled, clicking "Set to Playground" will save the current playground in the "saved-playgrounds" directory.',children:e.jsx(l,{name:"Question",tabIndex:0})})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("input",{type:"checkbox",id:"persistPlayground",name:"persistPlayground",defaultChecked:f?.persist}),e.jsx("label",{htmlFor:"persistPlayground",children:"Enable saving playground"})]})]}),e.jsxs("div",{children:[e.jsxs("div",{className:"mb-2 flex items-center gap-2",children:[e.jsx("h2",{className:"text-body-xl",children:"Exercise Directory Warning"}),e.jsx(o,{content:"When enabled, you'll see a warning banner when you have changes in the exercises directory. This helps remind you to work in the playground directory instead.",children:e.jsx(l,{name:"Question",tabIndex:0})})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("input",{type:"checkbox",id:"dismissExerciseWarning",name:"dismissExerciseWarning",defaultChecked:b?.dismissed}),e.jsx("label",{htmlFor:"dismissExerciseWarning",children:"Dismiss exercise directory warnings"})]})]}),e.jsx("div",{className:"h-4"}),e.jsx(x,{varient:"primary",type:"submit",name:"intent",value:"update-preferences",disabled:a,children:a?"Updating...":"Update Preferences"})]}),e.jsxs("section",{className:"border-border mt-6 flex w-full max-w-xl flex-col gap-3 border-t pt-6",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("h2",{className:"text-body-xl",children:"Offline videos"}),e.jsx(o,{content:"Keep videos ready to watch when you're offline.",children:e.jsx(l,{name:"Question",tabIndex:0})})]}),e.jsx("p",{className:"text-muted-foreground text-sm",children:"Download all workshop videos so you can watch them when offline."}),e.jsxs("p",{className:"text-muted-foreground text-sm",children:["Admins can manage all downloaded videos on the"," ",e.jsx(N,{className:"text-foreground underline",to:"/admin/offline-videos",children:"Offline videos admin page"}),"."]}),e.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[e.jsx(d,{method:"post",children:e.jsx(x,{varient:"primary",type:"submit",name:"intent",value:"download-offline-videos",disabled:t||a||s.totalVideos===0,children:t?"Downloading...":"Download all videos"})}),e.jsx(d,{method:"post",children:e.jsx("button",{type:"submit",name:"intent",value:"delete-offline-videos",disabled:a||s.downloadedVideos===0,className:"border-border text-foreground hover:bg-muted inline-flex items-center gap-2 rounded border px-3 py-2 text-sm disabled:cursor-not-allowed disabled:opacity-50",children:"Delete offline videos"})}),e.jsxs("span",{className:"text-muted-foreground text-sm",children:[s.downloadedVideos," of ",s.totalVideos," ","downloaded",s.unavailableVideos>0?` (${s.unavailableVideos} unavailable)`:null]})]}),t?e.jsxs("div",{className:"text-muted-foreground text-sm",children:[e.jsxs("p",{children:["Downloading ",s.downloadState.completed," of"," ",s.downloadState.total," videos"]}),s.downloadState.current?e.jsxs("p",{className:"truncate",children:["Current: ",s.downloadState.current.title]}):null]}):null]})]})})});export{C as default};
2
- //# sourceMappingURL=preferences-BCvK10k2.js.map
1
+ import{w as g,b as v,k as y,f as w,F as d,L as N}from"./chunk-EPOLDU6W-BCLmut3y.js";import{j as e}from"./jsx-runtime-C5WNSv3b.js";import{B as x}from"./button-Cd-ekki5.js";import{b as P,I as l}from"./misc-W4055b-0.js";import{S as o}from"./tooltip-Tlsyx2YO.js";import{u as R}from"./root-loader-BOzEMapJ.js";import"./index-CqIc3cxq.js";import"./index-vDCSPjrM.js";const V=[{value:"best",label:"Best available"},{value:"high",label:"High"},{value:"medium",label:"Medium"},{value:"low",label:"Low"}],C=g(function(){const m=v(),n=R(),c=n.preferences?.player,u=n.preferences?.offlineVideo,h=n.preferences?.fontSize,p=n.preferences?.presence,f=n.preferences?.playground,b=n.preferences?.exerciseWarning,j=y(),i=w(),s=i.data?.offlineVideos??m.offlineVideos,t=s.downloadState.status==="running",a=j.state==="submitting";return P(()=>{i.state==="idle"&&i.load("/resources/offline-videos")},t?2e3:null),e.jsx("div",{className:"h-full w-full overflow-y-auto",children:e.jsxs("main",{className:"container mt-12 flex w-full max-w-3xl grow flex-col gap-4 pb-24",children:[e.jsx("h1",{className:"text-h1 mb-4",children:"Preferences"}),e.jsxs(d,{method:"post",className:"flex w-full max-w-sm flex-col gap-4",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"text-body-xl mb-2",children:"Video Player Preferences"}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("label",{htmlFor:"minResolution",children:"Minimum Resolution:"}),e.jsxs("select",{id:"minResolution",name:"minResolution",defaultValue:c?.minResolution,className:"border-border bg-background text-foreground rounded-md border px-2 py-1",children:[e.jsx("option",{value:"",children:"Auto"}),e.jsx("option",{value:"480",children:"480p"}),e.jsx("option",{value:"720",children:"720p"}),e.jsx("option",{value:"1080",children:"1080p"}),e.jsx("option",{value:"1440",children:"1440p"}),e.jsx("option",{value:"2160",children:"2160p (4K)"})]})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("label",{htmlFor:"maxResolution",children:"Maximum Resolution:"}),e.jsxs("select",{id:"maxResolution",name:"maxResolution",defaultValue:c?.maxResolution,className:"border-border bg-background text-foreground rounded-md border px-2 py-1",children:[e.jsx("option",{value:"",children:"Auto"}),e.jsx("option",{value:"720",children:"720p"}),e.jsx("option",{value:"1080",children:"1080p"}),e.jsx("option",{value:"1440",children:"1440p"}),e.jsx("option",{value:"2160",children:"2160p (4K)"})]})]})]}),e.jsxs("div",{children:[e.jsx("h2",{className:"text-body-xl mb-2",children:"Offline Video Downloads"}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("label",{htmlFor:"downloadResolution",children:"Download Resolution:"}),e.jsx("select",{id:"downloadResolution",name:"downloadResolution",defaultValue:u?.downloadResolution??"best",className:"border-border bg-background text-foreground rounded-md border px-2 py-1",children:V.map(r=>e.jsx("option",{value:r.value,children:r.label},r.value))})]}),e.jsx("p",{className:"text-muted-foreground text-sm",children:"Defaults to the best available resolution."})]}),e.jsxs("div",{children:[e.jsxs("div",{className:"mb-2 flex items-center gap-2",children:[e.jsx("h2",{className:"text-body-xl",children:"Font Size Preference"}),e.jsx(o,{content:"Defaults to 16px",children:e.jsx(l,{name:"Question",tabIndex:0})})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("label",{htmlFor:"fontSize",children:"Font Size"}),e.jsx("input",{type:"number",id:"fontSize",name:"fontSize",defaultValue:h??16,step:"1",min:"12",max:"26",className:"border-border bg-background text-foreground rounded-md border px-2 py-1"})]})]}),e.jsxs("div",{children:[e.jsxs("div",{className:"mb-2 flex items-center gap-2",children:[e.jsx("h2",{className:"text-body-xl",children:"Presence Preference"}),e.jsx(o,{content:"This controls whether your name and avatar are displayed in the pile of faces in navigation",children:e.jsx(l,{name:"Question",tabIndex:0})})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("input",{type:"checkbox",id:"optOutPresence",name:"optOutPresence",defaultChecked:p?.optOut}),e.jsx("label",{htmlFor:"optOutPresence",children:"Opt out of presence features"})]})]}),e.jsxs("div",{children:[e.jsxs("div",{className:"mb-2 flex items-center gap-2",children:[e.jsx("h2",{className:"text-body-xl",children:"Persist Playground"}),e.jsx(o,{content:'When enabled, clicking "Set to Playground" will save the current playground in the "saved-playgrounds" directory.',children:e.jsx(l,{name:"Question",tabIndex:0})})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("input",{type:"checkbox",id:"persistPlayground",name:"persistPlayground",defaultChecked:f?.persist}),e.jsx("label",{htmlFor:"persistPlayground",children:"Enable saving playground"})]})]}),e.jsxs("div",{children:[e.jsxs("div",{className:"mb-2 flex items-center gap-2",children:[e.jsx("h2",{className:"text-body-xl",children:"Exercise Directory Warning"}),e.jsx(o,{content:"When enabled, you'll see a warning banner when you have changes in the exercises directory. This helps remind you to work in the playground directory instead.",children:e.jsx(l,{name:"Question",tabIndex:0})})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("input",{type:"checkbox",id:"dismissExerciseWarning",name:"dismissExerciseWarning",defaultChecked:b?.dismissed}),e.jsx("label",{htmlFor:"dismissExerciseWarning",children:"Dismiss exercise directory warnings"})]})]}),e.jsx("div",{className:"h-4"}),e.jsx(x,{varient:"primary",type:"submit",name:"intent",value:"update-preferences",disabled:a,children:a?"Updating...":"Update Preferences"})]}),e.jsxs("section",{className:"border-border mt-6 flex w-full max-w-xl flex-col gap-3 border-t pt-6",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("h2",{className:"text-body-xl",children:"Offline videos"}),e.jsx(o,{content:"Keep videos ready to watch when you're offline.",children:e.jsx(l,{name:"Question",tabIndex:0})})]}),e.jsx("p",{className:"text-muted-foreground text-sm",children:"Download all workshop videos so you can watch them when offline."}),e.jsxs("p",{className:"text-muted-foreground text-sm",children:["Admins can manage all downloaded videos on the"," ",e.jsx(N,{className:"text-foreground underline",to:"/admin/offline-videos",children:"Offline videos admin page"}),"."]}),e.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[e.jsx(d,{method:"post",children:e.jsx(x,{varient:"primary",type:"submit",name:"intent",value:"download-offline-videos",disabled:t||a||s.totalVideos===0,children:t?"Downloading...":"Download all videos"})}),e.jsx(d,{method:"post",children:e.jsx("button",{type:"submit",name:"intent",value:"delete-offline-videos",disabled:a||s.downloadedVideos===0,className:"border-border text-foreground hover:bg-muted inline-flex items-center gap-2 rounded border px-3 py-2 text-sm disabled:cursor-not-allowed disabled:opacity-50",children:"Delete offline videos"})}),e.jsxs("span",{className:"text-muted-foreground text-sm",children:[s.downloadedVideos," of ",s.totalVideos," ","downloaded",s.unavailableVideos>0?` (${s.unavailableVideos} unavailable)`:null]})]}),t?e.jsxs("div",{className:"text-muted-foreground text-sm",children:[e.jsxs("p",{children:["Downloading ",s.downloadState.completed," of"," ",s.downloadState.total," videos"]}),s.downloadState.current?e.jsxs("p",{className:"truncate",children:["Current: ",s.downloadState.current.title]}):null]}):null]})]})})});export{C as default};
2
+ //# sourceMappingURL=preferences-D6HQ5bK1.js.map