@epic-web/workshop-app 5.23.0 → 5.24.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 (147) hide show
  1. package/bin/epicshop.js +203 -37
  2. package/build/client/assets/{_basePickBy-B3Ji82Lk.js → _basePickBy-lB0X5x6U.js} +2 -2
  3. package/build/client/assets/{_basePickBy-B3Ji82Lk.js.map → _basePickBy-lB0X5x6U.js.map} +1 -1
  4. package/build/client/assets/{_baseUniq-BoGoqSUm.js → _baseUniq-BOjGYEEK.js} +2 -2
  5. package/build/client/assets/{_baseUniq-BoGoqSUm.js.map → _baseUniq-BOjGYEEK.js.map} +1 -1
  6. package/build/client/assets/{_exerciseNumber-DtILU6SM.js → _exerciseNumber-Dqi7TgL9.js} +2 -2
  7. package/build/client/assets/{_exerciseNumber-DtILU6SM.js.map → _exerciseNumber-Dqi7TgL9.js.map} +1 -1
  8. package/build/client/assets/{_exerciseNumber_.finished-CEK9anWX.js → _exerciseNumber_.finished-C5m6M0gM.js} +2 -2
  9. package/build/client/assets/{_exerciseNumber_.finished-CEK9anWX.js.map → _exerciseNumber_.finished-C5m6M0gM.js.map} +1 -1
  10. package/build/client/assets/{_layout-D1r_62oj.js → _layout-B_NrRv0S.js} +2 -2
  11. package/build/client/assets/{_layout-D1r_62oj.js.map → _layout-B_NrRv0S.js.map} +1 -1
  12. package/build/client/assets/{_layout-DzlTTMQ0.js → _layout-QRe2q83m.js} +2 -2
  13. package/build/client/assets/{_layout-DzlTTMQ0.js.map → _layout-QRe2q83m.js.map} +1 -1
  14. package/build/client/assets/{app-CQvK51s0.js → app-BYSDu0vh.js} +2 -2
  15. package/build/client/assets/{app-CQvK51s0.js.map → app-BYSDu0vh.js.map} +1 -1
  16. package/build/client/assets/{arc-rF8TbXNV.js → arc-DmQZ2TPB.js} +2 -2
  17. package/build/client/assets/{arc-rF8TbXNV.js.map → arc-DmQZ2TPB.js.map} +1 -1
  18. package/build/client/assets/{architectureDiagram-IEHRJDOE-D7gCCmY9.js → architectureDiagram-IEHRJDOE-BqPvrjLh.js} +2 -2
  19. package/build/client/assets/{architectureDiagram-IEHRJDOE-D7gCCmY9.js.map → architectureDiagram-IEHRJDOE-BqPvrjLh.js.map} +1 -1
  20. package/build/client/assets/{blockDiagram-JOT3LUYC-yGQOzhkw.js → blockDiagram-JOT3LUYC-D8OFd78i.js} +2 -2
  21. package/build/client/assets/{blockDiagram-JOT3LUYC-yGQOzhkw.js.map → blockDiagram-JOT3LUYC-D8OFd78i.js.map} +1 -1
  22. package/build/client/assets/{c4Diagram-VJAJSXHY-CTFjYF37.js → c4Diagram-VJAJSXHY-DjROjsr_.js} +2 -2
  23. package/build/client/assets/{c4Diagram-VJAJSXHY-CTFjYF37.js.map → c4Diagram-VJAJSXHY-DjROjsr_.js.map} +1 -1
  24. package/build/client/assets/channel-DnqeaSfB.js +2 -0
  25. package/build/client/assets/{channel-5s71-OE9.js.map → channel-DnqeaSfB.js.map} +1 -1
  26. package/build/client/assets/{chunk-4BMEZGHF-BIe0IUDz.js → chunk-4BMEZGHF-CNL-bCj2.js} +2 -2
  27. package/build/client/assets/{chunk-4BMEZGHF-BIe0IUDz.js.map → chunk-4BMEZGHF-CNL-bCj2.js.map} +1 -1
  28. package/build/client/assets/{chunk-A2AXSNBT-B-nCbUBj.js → chunk-A2AXSNBT-PeSyIKDm.js} +2 -2
  29. package/build/client/assets/{chunk-A2AXSNBT-B-nCbUBj.js.map → chunk-A2AXSNBT-PeSyIKDm.js.map} +1 -1
  30. package/build/client/assets/{chunk-AEK57VVT-B-cCHPs2.js → chunk-AEK57VVT-B1JqGB_s.js} +2 -2
  31. package/build/client/assets/{chunk-AEK57VVT-B-cCHPs2.js.map → chunk-AEK57VVT-B1JqGB_s.js.map} +1 -1
  32. package/build/client/assets/{chunk-D6G4REZN-EQ3R8OZx.js → chunk-D6G4REZN-C1e0nCkL.js} +2 -2
  33. package/build/client/assets/{chunk-D6G4REZN-EQ3R8OZx.js.map → chunk-D6G4REZN-C1e0nCkL.js.map} +1 -1
  34. package/build/client/assets/{chunk-RZ5BOZE2-h6svq8Xk.js → chunk-RZ5BOZE2-D5pIwNeA.js} +2 -2
  35. package/build/client/assets/{chunk-RZ5BOZE2-h6svq8Xk.js.map → chunk-RZ5BOZE2-D5pIwNeA.js.map} +1 -1
  36. package/build/client/assets/{chunk-XZIHB7SX-74-HFRcU.js → chunk-XZIHB7SX-FbrNggxP.js} +2 -2
  37. package/build/client/assets/{chunk-XZIHB7SX-74-HFRcU.js.map → chunk-XZIHB7SX-FbrNggxP.js.map} +1 -1
  38. package/build/client/assets/classDiagram-GIVACNV2-cXWx-aYi.js +2 -0
  39. package/build/client/assets/{classDiagram-GIVACNV2-CWogZCzR.js.map → classDiagram-GIVACNV2-cXWx-aYi.js.map} +1 -1
  40. package/build/client/assets/classDiagram-v2-COTLJTTW-cXWx-aYi.js +2 -0
  41. package/build/client/assets/{classDiagram-v2-COTLJTTW-CWogZCzR.js.map → classDiagram-v2-COTLJTTW-cXWx-aYi.js.map} +1 -1
  42. package/build/client/assets/clone-Bj8ANPCv.js +2 -0
  43. package/build/client/assets/{clone-nHZ14b_E.js.map → clone-Bj8ANPCv.js.map} +1 -1
  44. package/build/client/assets/{dagre-OKDRZEBW-Bq-HgVN8.js → dagre-OKDRZEBW-DT9ZQRxf.js} +2 -2
  45. package/build/client/assets/{dagre-OKDRZEBW-Bq-HgVN8.js.map → dagre-OKDRZEBW-DT9ZQRxf.js.map} +1 -1
  46. package/build/client/assets/{diagram-SSKATNLV-Cls675Lh.js → diagram-SSKATNLV-CcKCni9R.js} +2 -2
  47. package/build/client/assets/{diagram-SSKATNLV-Cls675Lh.js.map → diagram-SSKATNLV-CcKCni9R.js.map} +1 -1
  48. package/build/client/assets/{diagram-VNBRO52H-CJDqBhLa.js → diagram-VNBRO52H-DWoRAiqO.js} +2 -2
  49. package/build/client/assets/{diagram-VNBRO52H-CJDqBhLa.js.map → diagram-VNBRO52H-DWoRAiqO.js.map} +1 -1
  50. package/build/client/assets/{diff-8N5KyD7o.js → diff-BKR4usVv.js} +2 -2
  51. package/build/client/assets/{diff-8N5KyD7o.js.map → diff-BKR4usVv.js.map} +1 -1
  52. package/build/client/assets/{diff-Bu4t2NGL.js → diff-D5_VwPLF.js} +2 -2
  53. package/build/client/assets/{diff-Bu4t2NGL.js.map → diff-D5_VwPLF.js.map} +1 -1
  54. package/build/client/assets/{epic-video-DN9DRRHf.js → epic-video-CmlkW6Rw.js} +2 -2
  55. package/build/client/assets/{epic-video-DN9DRRHf.js.map → epic-video-CmlkW6Rw.js.map} +1 -1
  56. package/build/client/assets/{erDiagram-Q7BY3M3F-DdKn4jVQ.js → erDiagram-Q7BY3M3F-DXkEmvKk.js} +2 -2
  57. package/build/client/assets/{erDiagram-Q7BY3M3F-DdKn4jVQ.js.map → erDiagram-Q7BY3M3F-DXkEmvKk.js.map} +1 -1
  58. package/build/client/assets/{finished-B3G1RUDO.js → finished-MrsevkkK.js} +2 -2
  59. package/build/client/assets/{finished-B3G1RUDO.js.map → finished-MrsevkkK.js.map} +1 -1
  60. package/build/client/assets/{flowDiagram-4HSFHLVR-5Mg796nh.js → flowDiagram-4HSFHLVR-DCodZaNW.js} +2 -2
  61. package/build/client/assets/{flowDiagram-4HSFHLVR-5Mg796nh.js.map → flowDiagram-4HSFHLVR-DCodZaNW.js.map} +1 -1
  62. package/build/client/assets/{ganttDiagram-APWFNJXF-YO2fxWzG.js → ganttDiagram-APWFNJXF-TfB6wYvN.js} +2 -2
  63. package/build/client/assets/{ganttDiagram-APWFNJXF-YO2fxWzG.js.map → ganttDiagram-APWFNJXF-TfB6wYvN.js.map} +1 -1
  64. package/build/client/assets/{gitGraphDiagram-7IBYFJ6S-DQCZvhP_.js → gitGraphDiagram-7IBYFJ6S-D2NQnQv2.js} +2 -2
  65. package/build/client/assets/{gitGraphDiagram-7IBYFJ6S-DQCZvhP_.js.map → gitGraphDiagram-7IBYFJ6S-D2NQnQv2.js.map} +1 -1
  66. package/build/client/assets/{graph-BFAO9Sgp.js → graph-eJUngNSH.js} +2 -2
  67. package/build/client/assets/{graph-BFAO9Sgp.js.map → graph-eJUngNSH.js.map} +1 -1
  68. package/build/client/assets/{index-BfCSiT_X.js → index-9euhNa27.js} +2 -2
  69. package/build/client/assets/{index-BfCSiT_X.js.map → index-9euhNa27.js.map} +1 -1
  70. package/build/client/assets/index-DLC5u33j.js +36 -0
  71. package/build/client/assets/index-DLC5u33j.js.map +1 -0
  72. package/build/client/assets/{index-Dkt2MSig.js → index-DPHVg8Eh.js} +2 -2
  73. package/build/client/assets/{index-Dkt2MSig.js.map → index-DPHVg8Eh.js.map} +1 -1
  74. package/build/client/assets/infoDiagram-PH2N3AL5-D-nEozcT.js +3 -0
  75. package/build/client/assets/{infoDiagram-PH2N3AL5-x87RxSs8.js.map → infoDiagram-PH2N3AL5-D-nEozcT.js.map} +1 -1
  76. package/build/client/assets/{journeyDiagram-U35MCT3I-D5yGbOLJ.js → journeyDiagram-U35MCT3I-Dc8g8jIX.js} +2 -2
  77. package/build/client/assets/{journeyDiagram-U35MCT3I-D5yGbOLJ.js.map → journeyDiagram-U35MCT3I-Dc8g8jIX.js.map} +1 -1
  78. package/build/client/assets/{kanban-definition-NDS4AKOZ-BM6KyRww.js → kanban-definition-NDS4AKOZ-BwwcaZU2.js} +2 -2
  79. package/build/client/assets/{kanban-definition-NDS4AKOZ-BM6KyRww.js.map → kanban-definition-NDS4AKOZ-BwwcaZU2.js.map} +1 -1
  80. package/build/client/assets/{layout-qCiM2Jgn.js → layout-BAeq0-Is.js} +2 -2
  81. package/build/client/assets/{layout-qCiM2Jgn.js.map → layout-BAeq0-Is.js.map} +1 -1
  82. package/build/client/assets/{linear-B3zp51yW.js → linear-LWRPSVMz.js} +2 -2
  83. package/build/client/assets/{linear-B3zp51yW.js.map → linear-LWRPSVMz.js.map} +1 -1
  84. package/build/client/assets/{loading-BPTYJOXN.js → loading-b1FV2pQh.js} +2 -2
  85. package/build/client/assets/{loading-BPTYJOXN.js.map → loading-b1FV2pQh.js.map} +1 -1
  86. package/build/client/assets/{login-CfyUfm-m.js → login-Ci7cdiuj.js} +2 -2
  87. package/build/client/assets/{login-CfyUfm-m.js.map → login-Ci7cdiuj.js.map} +1 -1
  88. package/build/client/assets/{manifest-fe4b7228.js → manifest-c68964f2.js} +1 -1
  89. package/build/client/assets/{mdx-Dfsh6Vjk.js → mdx-C7imFHZE.js} +3 -3
  90. package/build/client/assets/{mdx-Dfsh6Vjk.js.map → mdx-C7imFHZE.js.map} +1 -1
  91. package/build/client/assets/{mermaid.core-ZaxoMXOj.js → mermaid.core-q9C-HfFu.js} +5 -5
  92. package/build/client/assets/{mermaid.core-ZaxoMXOj.js.map → mermaid.core-q9C-HfFu.js.map} +1 -1
  93. package/build/client/assets/{mindmap-definition-ALO5MXBD-CF3siXp6.js → mindmap-definition-ALO5MXBD-BhzLy0Zl.js} +2 -2
  94. package/build/client/assets/{mindmap-definition-ALO5MXBD-CF3siXp6.js.map → mindmap-definition-ALO5MXBD-BhzLy0Zl.js.map} +1 -1
  95. package/build/client/assets/{onboarding-5LC4kIVW.js → onboarding-c9ZuxLsm.js} +2 -2
  96. package/build/client/assets/{onboarding-5LC4kIVW.js.map → onboarding-c9ZuxLsm.js.map} +1 -1
  97. package/build/client/assets/{online-IWqRB9zP.js → online-DZKJk3C2.js} +2 -2
  98. package/build/client/assets/{online-IWqRB9zP.js.map → online-DZKJk3C2.js.map} +1 -1
  99. package/build/client/assets/{pieDiagram-IB7DONF6-B-gWQIHI.js → pieDiagram-IB7DONF6-CaTGj8RH.js} +2 -2
  100. package/build/client/assets/{pieDiagram-IB7DONF6-B-gWQIHI.js.map → pieDiagram-IB7DONF6-CaTGj8RH.js.map} +1 -1
  101. package/build/client/assets/{presence-BAL3jDku.js → presence-C9bUSihT.js} +2 -2
  102. package/build/client/assets/{presence-BAL3jDku.js.map → presence-C9bUSihT.js.map} +1 -1
  103. package/build/client/assets/{preview-D4amucCL.js → preview-CqZGJtsE.js} +2 -2
  104. package/build/client/assets/{preview-D4amucCL.js.map → preview-CqZGJtsE.js.map} +1 -1
  105. package/build/client/assets/{product-Cyum2biy.js → product-DJOWNuL-.js} +2 -2
  106. package/build/client/assets/{product-Cyum2biy.js.map → product-DJOWNuL-.js.map} +1 -1
  107. package/build/client/assets/{quadrantDiagram-7GDLP6J5-BQzo7p61.js → quadrantDiagram-7GDLP6J5-B4Od6z6p.js} +2 -2
  108. package/build/client/assets/{quadrantDiagram-7GDLP6J5-BQzo7p61.js.map → quadrantDiagram-7GDLP6J5-B4Od6z6p.js.map} +1 -1
  109. package/build/client/assets/{radar-MK3ICKWK-CM-Iz9PA.js → radar-MK3ICKWK-CENXhI0E.js} +2 -2
  110. package/build/client/assets/{radar-MK3ICKWK-CM-Iz9PA.js.map → radar-MK3ICKWK-CENXhI0E.js.map} +1 -1
  111. package/build/client/assets/{requirementDiagram-KVF5MWMF-DzaHc66R.js → requirementDiagram-KVF5MWMF-_w0WuUxy.js} +2 -2
  112. package/build/client/assets/{requirementDiagram-KVF5MWMF-DzaHc66R.js.map → requirementDiagram-KVF5MWMF-_w0WuUxy.js.map} +1 -1
  113. package/build/client/assets/{revalidation-ws-ho-umDqd.js → revalidation-ws-B0skixgr.js} +2 -2
  114. package/build/client/assets/{revalidation-ws-ho-umDqd.js.map → revalidation-ws-B0skixgr.js.map} +1 -1
  115. package/build/client/assets/root-JfOw9N7j.js +11 -0
  116. package/build/client/assets/root-JfOw9N7j.js.map +1 -0
  117. package/build/client/assets/{sankeyDiagram-QLVOVGJD-DfAVeZCk.js → sankeyDiagram-QLVOVGJD-Bt8556P1.js} +2 -2
  118. package/build/client/assets/{sankeyDiagram-QLVOVGJD-DfAVeZCk.js.map → sankeyDiagram-QLVOVGJD-Bt8556P1.js.map} +1 -1
  119. package/build/client/assets/{sequenceDiagram-X6HHIX6F-CljZRLoS.js → sequenceDiagram-X6HHIX6F-y2-oW3Ob.js} +2 -2
  120. package/build/client/assets/{sequenceDiagram-X6HHIX6F-CljZRLoS.js.map → sequenceDiagram-X6HHIX6F-y2-oW3Ob.js.map} +1 -1
  121. package/build/client/assets/{stateDiagram-DGXRK772-BzVfGv3W.js → stateDiagram-DGXRK772-B3BuD15b.js} +2 -2
  122. package/build/client/assets/{stateDiagram-DGXRK772-BzVfGv3W.js.map → stateDiagram-DGXRK772-B3BuD15b.js.map} +1 -1
  123. package/build/client/assets/{stateDiagram-v2-YXO3MK2T-8oX001yq.js → stateDiagram-v2-YXO3MK2T-BzFxWpqR.js} +2 -2
  124. package/build/client/assets/{stateDiagram-v2-YXO3MK2T-8oX001yq.js.map → stateDiagram-v2-YXO3MK2T-BzFxWpqR.js.map} +1 -1
  125. package/build/client/assets/{test-C14D-N72.js → test-DdUNKtkF.js} +2 -2
  126. package/build/client/assets/{test-C14D-N72.js.map → test-DdUNKtkF.js.map} +1 -1
  127. package/build/client/assets/{tests-6__AtHpI.js → tests-B1ak2CDI.js} +2 -2
  128. package/build/client/assets/{tests-6__AtHpI.js.map → tests-B1ak2CDI.js.map} +1 -1
  129. package/build/client/assets/{timeline-definition-BDJGKUSR-2TO9MtLY.js → timeline-definition-BDJGKUSR-DUa2yfAV.js} +2 -2
  130. package/build/client/assets/{timeline-definition-BDJGKUSR-2TO9MtLY.js.map → timeline-definition-BDJGKUSR-DUa2yfAV.js.map} +1 -1
  131. package/build/client/assets/{xychartDiagram-VJFVF3MP-Dh4nsbBT.js → xychartDiagram-VJFVF3MP-JztjcODi.js} +2 -2
  132. package/build/client/assets/{xychartDiagram-VJFVF3MP-Dh4nsbBT.js.map → xychartDiagram-VJFVF3MP-JztjcODi.js.map} +1 -1
  133. package/build/server/index.js +138 -163
  134. package/build/server/index.js.map +1 -1
  135. package/dist/server/index.js +82 -80
  136. package/package.json +3 -3
  137. package/build/client/assets/channel-5s71-OE9.js +0 -2
  138. package/build/client/assets/classDiagram-GIVACNV2-CWogZCzR.js +0 -2
  139. package/build/client/assets/classDiagram-v2-COTLJTTW-CWogZCzR.js +0 -2
  140. package/build/client/assets/clone-nHZ14b_E.js +0 -2
  141. package/build/client/assets/index-CEP3Xxa0.js +0 -36
  142. package/build/client/assets/index-CEP3Xxa0.js.map +0 -1
  143. package/build/client/assets/infoDiagram-PH2N3AL5-x87RxSs8.js +0 -3
  144. package/build/client/assets/root-tJmOmO9T.js +0 -11
  145. package/build/client/assets/root-tJmOmO9T.js.map +0 -1
  146. package/build/client/assets/update-repo-l0sNRNKZ.js +0 -2
  147. package/build/client/assets/update-repo-l0sNRNKZ.js.map +0 -1
@@ -1,2 +1,2 @@
1
- import{r as c,j as t,e as pe}from"./index-Dsusf_Av.js";import{d as K,e as B,P as E,f as j,h as he,u as V,m as ve,g as ge,S as je}from"./tooltip-Bzd6O8vq.js";import{f as be,u as H}from"./index-BmMpCvYx.js";import{u as $,I as P,c as we}from"./misc-2sBiisF5.js";import{D as Ne}from"./diff-Bu4t2NGL.js";import{G as ye}from"./error-boundary-B07cWiEy.js";import{L as Te}from"./loading-BPTYJOXN.js";import{D as Ce,u as Ie}from"./discord-BU7RzE6-.js";import{u as Ee}from"./online-IWqRB9zP.js";import{u as z,A as Pe,L as Y,e as De}from"./components-5arJTWsS.js";import{u as Re}from"./index-DvQyydjU.js";import{S as Se}from"./set-playground-DW2Ys-rV.js";import{P as Fe,a as _e}from"./tests-6__AtHpI.js";import{P as A}from"./preview-D4amucCL.js";import"./index-Do-KWT0a.js";import"./accordion-CpiLc1m2.js";import"./mdx-Dfsh6Vjk.js";import"./epic-video-DN9DRRHf.js";import"./index-CEP3Xxa0.js";import"./pe-BShc2dvc.js";import"./user-DNSnhqGn.js";import"./workshop-config-DchzGYJM.js";import"./progress-bar-DgnkQxQw.js";import"./revalidation-ws-ho-umDqd.js";import"./use-event-source-Dar8h_B8.js";import"./button-Dt4EcDfR.js";var _="rovingFocusGroup.onEntryFocus",Ae={bubbles:!1,cancelable:!0},D="RovingFocusGroup",[k,W,ke]=be(D),[Le,q]=K(D,[ke]),[Ue,Me]=Le(D),J=c.forwardRef((e,s)=>t.jsx(k.Provider,{scope:e.__scopeRovingFocusGroup,children:t.jsx(k.Slot,{scope:e.__scopeRovingFocusGroup,children:t.jsx(Oe,{...e,ref:s})})}));J.displayName=D;var Oe=c.forwardRef((e,s)=>{const{__scopeRovingFocusGroup:r,orientation:n,loop:i=!1,dir:d,currentTabStopId:l,defaultCurrentTabStopId:f,onCurrentTabStopIdChange:g,onEntryFocus:m,preventScrollOnEntryFocus:a=!1,...u}=e,x=c.useRef(null),w=he(s,x),N=H(d),[y,o]=V({prop:l,defaultProp:f??null,onChange:g,caller:D}),[p,C]=c.useState(!1),h=ve(m),b=W(r),S=c.useRef(!1),[ue,M]=c.useState(0);return c.useEffect(()=>{const v=x.current;if(v)return v.addEventListener(_,h),()=>v.removeEventListener(_,h)},[h]),t.jsx(Ue,{scope:r,orientation:n,dir:N,loop:i,currentTabStopId:y,onItemFocus:c.useCallback(v=>o(v),[o]),onItemShiftTab:c.useCallback(()=>C(!0),[]),onFocusableItemAdd:c.useCallback(()=>M(v=>v+1),[]),onFocusableItemRemove:c.useCallback(()=>M(v=>v-1),[]),children:t.jsx(E.div,{tabIndex:p||ue===0?-1:0,"data-orientation":n,...u,ref:w,style:{outline:"none",...e.style},onMouseDown:j(e.onMouseDown,()=>{S.current=!0}),onFocus:j(e.onFocus,v=>{const de=!S.current;if(v.target===v.currentTarget&&de&&!p){const O=new CustomEvent(_,Ae);if(v.currentTarget.dispatchEvent(O),!O.defaultPrevented){const F=b().filter(T=>T.focusable),fe=F.find(T=>T.active),me=F.find(T=>T.id===y),xe=[fe,me,...F].filter(Boolean).map(T=>T.ref.current);Z(xe,a)}}S.current=!1}),onBlur:j(e.onBlur,()=>C(!1))})})}),Q="RovingFocusGroupItem",X=c.forwardRef((e,s)=>{const{__scopeRovingFocusGroup:r,focusable:n=!0,active:i=!1,tabStopId:d,children:l,...f}=e,g=B(),m=d||g,a=Me(Q,r),u=a.currentTabStopId===m,x=W(r),{onFocusableItemAdd:w,onFocusableItemRemove:N,currentTabStopId:y}=a;return c.useEffect(()=>{if(n)return w(),()=>N()},[n,w,N]),t.jsx(k.ItemSlot,{scope:r,id:m,focusable:n,active:i,children:t.jsx(E.span,{tabIndex:u?0:-1,"data-orientation":a.orientation,...f,ref:s,onMouseDown:j(e.onMouseDown,o=>{n?a.onItemFocus(m):o.preventDefault()}),onFocus:j(e.onFocus,()=>a.onItemFocus(m)),onKeyDown:j(e.onKeyDown,o=>{if(o.key==="Tab"&&o.shiftKey){a.onItemShiftTab();return}if(o.target!==o.currentTarget)return;const p=Be(o,a.orientation,a.dir);if(p!==void 0){if(o.metaKey||o.ctrlKey||o.altKey||o.shiftKey)return;o.preventDefault();let h=x().filter(b=>b.focusable).map(b=>b.ref.current);if(p==="last")h.reverse();else if(p==="prev"||p==="next"){p==="prev"&&h.reverse();const b=h.indexOf(o.currentTarget);h=a.loop?Ve(h,b+1):h.slice(b+1)}setTimeout(()=>Z(h))}}),children:typeof l=="function"?l({isCurrentTabStop:u,hasTabStop:y!=null}):l})})});X.displayName=Q;var Ge={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Ke(e,s){return s!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function Be(e,s,r){const n=Ke(e.key,r);if(!(s==="vertical"&&["ArrowLeft","ArrowRight"].includes(n))&&!(s==="horizontal"&&["ArrowUp","ArrowDown"].includes(n)))return Ge[n]}function Z(e,s=!1){const r=document.activeElement;for(const n of e)if(n===r||(n.focus({preventScroll:s}),document.activeElement!==r))return}function Ve(e,s){return e.map((r,n)=>e[(s+n)%e.length])}var He=J,$e=X,R="Tabs",[ze,Rt]=K(R,[q]),ee=q(),[Ye,U]=ze(R),te=c.forwardRef((e,s)=>{const{__scopeTabs:r,value:n,onValueChange:i,defaultValue:d,orientation:l="horizontal",dir:f,activationMode:g="automatic",...m}=e,a=H(f),[u,x]=V({prop:n,onChange:i,defaultProp:d??"",caller:R});return t.jsx(Ye,{scope:r,baseId:B(),value:u,onValueChange:x,orientation:l,dir:a,activationMode:g,children:t.jsx(E.div,{dir:a,"data-orientation":l,...m,ref:s})})});te.displayName=R;var re="TabsList",se=c.forwardRef((e,s)=>{const{__scopeTabs:r,loop:n=!0,...i}=e,d=U(re,r),l=ee(r);return t.jsx(He,{asChild:!0,...l,orientation:d.orientation,dir:d.dir,loop:n,children:t.jsx(E.div,{role:"tablist","aria-orientation":d.orientation,...i,ref:s})})});se.displayName=re;var ne="TabsTrigger",oe=c.forwardRef((e,s)=>{const{__scopeTabs:r,value:n,disabled:i=!1,...d}=e,l=U(ne,r),f=ee(r),g=le(l.baseId,n),m=ce(l.baseId,n),a=n===l.value;return t.jsx($e,{asChild:!0,...f,focusable:!i,active:a,children:t.jsx(E.button,{type:"button",role:"tab","aria-selected":a,"aria-controls":m,"data-state":a?"active":"inactive","data-disabled":i?"":void 0,disabled:i,id:g,...d,ref:s,onMouseDown:j(e.onMouseDown,u=>{!i&&u.button===0&&u.ctrlKey===!1?l.onValueChange(n):u.preventDefault()}),onKeyDown:j(e.onKeyDown,u=>{[" ","Enter"].includes(u.key)&&l.onValueChange(n)}),onFocus:j(e.onFocus,()=>{const u=l.activationMode!=="manual";!a&&!i&&u&&l.onValueChange(n)})})})});oe.displayName=ne;var ae="TabsContent",ie=c.forwardRef((e,s)=>{const{__scopeTabs:r,value:n,forceMount:i,children:d,...l}=e,f=U(ae,r),g=le(f.baseId,n),m=ce(f.baseId,n),a=n===f.value,u=c.useRef(a);return c.useEffect(()=>{const x=requestAnimationFrame(()=>u.current=!1);return()=>cancelAnimationFrame(x)},[]),t.jsx(ge,{present:i||a,children:({present:x})=>t.jsx(E.div,{"data-state":a?"active":"inactive","data-orientation":f.orientation,role:"tabpanel","aria-labelledby":g,hidden:!x,id:m,tabIndex:0,...l,ref:s,style:{...e.style,animationDuration:u.current?"0s":void 0},children:x&&d})})});ie.displayName=ae;function le(e,s){return`${e}-trigger-${s}`}function ce(e,s){return`${e}-content-${s}`}var We=te,qe=se,Je=oe,I=ie;function Qe(){return t.jsxs("div",{className:"flex h-full w-full flex-col gap-4 pt-4",children:[t.jsx("div",{className:"text-center",children:t.jsx(Ce,{})}),t.jsx("div",{className:"flex-1 overflow-y-scroll bg-accent pb-4 scrollbar-thin scrollbar-thumb-scrollbar",children:t.jsx(Xe,{})})]})}function Xe(){const e=z(),s=Ie(),r=$();return Ee()?t.jsxs("div",{className:"flex h-full flex-col items-center justify-between",children:[t.jsx(c.Suspense,{fallback:t.jsx("div",{className:"flex h-full w-full flex-col items-center justify-center",children:t.jsx(Te,{children:"Loading Discord Posts"})}),children:t.jsx(Pe,{resolve:e.discordPostsPromise,errorElement:t.jsx("div",{className:"text-red-500",children:"There was a problem loading the discord posts"}),children:i=>t.jsx("ul",{className:"flex w-full flex-col gap-4 p-3 xl:p-12",children:i.map(d=>t.jsx("li",{className:"rounded-xl border bg-background transition-all duration-200 focus-within:-translate-y-1 focus-within:shadow-lg hover:-translate-y-1 hover:shadow-lg",children:t.jsx(Ze,{thread:d})},d.id))})})}),t.jsx("div",{children:t.jsxs(Y,{to:r&&!s.includes("oauth")?s.replace(/^https/,"discord"):s,target:s.includes("oauth")?void 0:"_blank",rel:"noreferrer noopener",onClick:r?i=>{i.preventDefault(),window.open(i.currentTarget.href,"_blank","noreferrer noopener")}:void 0,className:"flex items-center gap-2 p-2 text-xl hover:underline",children:["Create Post ",t.jsx(P,{name:"ExternalLink"})]})})]}):t.jsx("div",{className:"flex h-full flex-col items-center justify-between",children:t.jsx("div",{className:"text-foreground-destructive flex h-full w-full flex-col items-center justify-center",children:t.jsx(P,{name:"WifiNoConnection",size:"xl",children:"Unable to load discord messages when offline"})})})}function Ze({thread:e}){const s=e.reactions.filter(r=>r.count);return t.jsx("div",{children:t.jsxs("div",{className:"flex flex-col gap-2 p-4",children:[t.jsxs("div",{className:"flex gap-4",children:[t.jsxs("div",{className:"flex flex-col gap-1",children:[e.tags.length?t.jsx("div",{className:"flex gap-2",children:e.tags.map(r=>t.jsxs("div",{className:"flex items-center justify-center gap-1 rounded-full bg-accent px-2 py-1 text-sm",children:[t.jsx("span",{className:"h-3 w-3 leading-3",children:t.jsx(G,{name:r.emojiName,url:r.emojiUrl})}),t.jsx("span",{children:r.name})]},r.name))}):null,t.jsx("strong",{className:"text-xl font-bold",children:e.name}),t.jsxs("div",{className:"flex items-start gap-1",children:[t.jsxs("div",{className:"flex items-center gap-1",children:[e.authorAvatarUrl?t.jsx("img",{src:e.authorAvatarUrl,alt:"",className:"h-6 w-6 rounded-full"}):null,t.jsxs("span",{children:[t.jsx("span",{className:"font-bold",style:e.authorHexAccentColor?{color:e.authorHexAccentColor}:{},children:e.authorDisplayName}),":"," "]})]}),t.jsx("span",{className:"flex-1 overflow-ellipsis text-muted-foreground",children:e.messagePreview})]})]}),e.previewImageUrl?t.jsx("img",{src:e.previewImageUrl,alt:"",className:"h-28 w-28 rounded-lg object-cover"}):null]}),t.jsxs("div",{className:"flex justify-between",children:[t.jsxs("div",{className:"flex items-center gap-3",children:[t.jsx("span",{children:s.length?t.jsx("ul",{className:"flex items-center gap-2",children:s.map((r,n)=>t.jsxs("li",{className:"flex items-center gap-1 rounded-md border border-blue-600 bg-blue-500/20 px-[5px] py-[0.5px] text-sm",children:[t.jsx("span",{className:"h-3 w-3 leading-3",children:t.jsx(G,{name:r.emojiName,url:r.emojiUrl})}),t.jsx("span",{children:r.count})]},n))}):null}),t.jsxs("span",{className:"flex items-center gap-1",children:[t.jsxs("span",{className:"inline-flex items-center gap-1",children:[t.jsx(P,{name:"Chat"})," ",e.messageCount]}),` · ${e.lastUpdatedDisplay}`]})]}),t.jsxs("span",{className:"flex items-center gap-4",children:[t.jsx("a",{href:e.link.replace(/^https/,"discord"),children:t.jsx(P,{name:"Discord"})}),t.jsx("a",{href:e.link,target:"_blank",rel:"noreferrer noopener",children:t.jsx(P,{name:"ExternalLink"})})]})]})]})})}function G({name:e,url:s}){return s?t.jsx("img",{src:s,alt:e,className:"h-full w-full"}):e||null}function et({appInfo:e,inBrowserBrowserRef:s,problemAppName:r,allApps:n,isUpToDate:i}){return t.jsx(Fe,{playgroundAppName:e==null?void 0:e.appName,problemAppName:r,allApps:n,isUpToDate:i,children:(e==null?void 0:e.dev.type)==="none"?t.jsxs("div",{children:[t.jsx("div",{className:"text-foreground-secondary flex h-full items-center justify-center text-2xl",children:"Non-UI playground"}),t.jsx("div",{children:t.jsxs("div",{className:"text-foreground-secondary flex flex-wrap gap-1 text-center",children:["Navigate to"," ",t.jsx(je,{content:e.fullPath,children:t.jsx("span",{className:"underline",onClick:()=>{navigator.clipboard.writeText(e.fullPath),Re.success("Copied playground path to clipboard")},children:"the playground directory"})})," ","in your editor and terminal to work on this exercise!"]})})]}):e?t.jsx(A,{id:e.appName,appInfo:e,inBrowserBrowserRef:s}):t.jsxs("div",{className:"flex flex-col justify-center gap-2",children:[t.jsx("p",{children:"Please set the playground first"}),r?t.jsx(Se,{appName:r}):null]})})}const L=["playground","problem","solution","tests","diff","chat"],tt=e=>!!(e&&L.includes(e));function rt(e,s,r){const n=new URLSearchParams(e);return r===null?n.delete(s):n.set(s,r),n}function St(){var a,u,x,w,N,y;const e=z(),[s]=De(),r=s.get("preview"),n=c.useRef(null),i=$(),d=pe();function l(o){var p,C,h;if(o==="tests")return ENV.EPICSHOP_DEPLOYED||!e.playground||e.playground.test.type==="none";if(o==="problem"||o==="solution"){if(((p=e[o])==null?void 0:p.dev.type)==="none")return!0;if(ENV.EPICSHOP_DEPLOYED)return((C=e[o])==null?void 0:C.dev.type)!=="browser"&&!((h=e[o])!=null&&h.stackBlitzUrl)}return!!(o==="playground"&&ENV.EPICSHOP_DEPLOYED)}const f=tt(r)?r:L.find(o=>!l(o)),g=`/diff?${new URLSearchParams({app1:((a=e.problem)==null?void 0:a.name)??"",app2:((u=e.solution)==null?void 0:u.name)??""})}`;function m(o){o.altKey&&!o.ctrlKey&&!o.shiftKey&&!o.metaKey&&(o.preventDefault(),d(g))}return t.jsxs(We,{className:"relative flex flex-col overflow-y-auto sm:col-span-1 sm:row-span-1",value:f,children:[t.jsx(qe,{className:"h-14 min-h-14 overflow-x-hidden border-b scrollbar-thin scrollbar-thumb-scrollbar",children:L.map(o=>{const p=l(o);return t.jsx(Je,{value:o,hidden:p,asChild:!0,children:t.jsx(Y,{id:`${o}-tab`,className:we("clip-path-button relative h-full px-6 py-4 font-mono text-sm uppercase outline-none 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",p?"hidden":"inline-block"),preventScrollReset:!0,prefetch:"intent",onClick:m,to:o==="diff"&&i?g:`?${rt(s,"preview",o==="playground"?null:o)}`,children:o})},o)})}),t.jsxs("div",{className:"relative z-10 flex min-h-96 flex-grow flex-col overflow-y-auto",children:[t.jsx(I,{value:"playground",className:"flex w-full flex-grow items-center justify-center self-start radix-state-inactive:hidden",forceMount:!0,children:t.jsx(et,{appInfo:e.playground,problemAppName:(x=e.problem)==null?void 0:x.name,inBrowserBrowserRef:n,allApps:e.allApps,isUpToDate:((w=e.playground)==null?void 0:w.isUpToDate)??!1})}),t.jsx(I,{value:"problem",className:"flex w-full flex-grow items-center justify-center self-start radix-state-inactive:hidden",forceMount:!0,children:t.jsx(A,{appInfo:e.problem,inBrowserBrowserRef:n})}),t.jsx(I,{value:"solution",className:"flex w-full flex-grow items-center justify-center self-start radix-state-inactive:hidden",forceMount:!0,children:t.jsx(A,{appInfo:e.solution,inBrowserBrowserRef:n})}),t.jsx(I,{value:"tests",className:"flex w-full flex-grow items-start justify-center self-start overflow-hidden radix-state-inactive:hidden",children:t.jsx(_e,{appInfo:e.playground,problemAppName:(N=e.problem)==null?void 0:N.name,allApps:e.allApps,isUpToDate:((y=e.playground)==null?void 0:y.isUpToDate)??!1})}),t.jsx(I,{value:"diff",className:"flex h-full w-full flex-grow items-start justify-center self-start radix-state-inactive:hidden",children:t.jsx(Ne,{diff:e.diff,allApps:e.allApps})}),t.jsx(I,{value:"chat",className:"flex h-full w-full flex-grow items-start justify-center self-start radix-state-inactive:hidden",children:t.jsx(Qe,{})})]})]})}function Ft(){return t.jsx(ye,{statusHandlers:{404:()=>t.jsx("p",{children:"Sorry, we couldn't find an app here."})}})}export{Ft as ErrorBoundary,St as default};
2
- //# sourceMappingURL=index-Dkt2MSig.js.map
1
+ import{r as c,j as t,e as pe}from"./index-Dsusf_Av.js";import{d as K,e as B,P as E,f as j,h as he,u as V,m as ve,g as ge,S as je}from"./tooltip-Bzd6O8vq.js";import{f as be,u as H}from"./index-BmMpCvYx.js";import{u as $,I as P,c as we}from"./misc-2sBiisF5.js";import{D as Ne}from"./diff-D5_VwPLF.js";import{G as ye}from"./error-boundary-B07cWiEy.js";import{L as Te}from"./loading-b1FV2pQh.js";import{D as Ce,u as Ie}from"./discord-BU7RzE6-.js";import{u as Ee}from"./online-DZKJk3C2.js";import{u as z,A as Pe,L as Y,e as De}from"./components-5arJTWsS.js";import{u as Re}from"./index-DvQyydjU.js";import{S as Se}from"./set-playground-DW2Ys-rV.js";import{P as Fe,a as _e}from"./tests-B1ak2CDI.js";import{P as A}from"./preview-CqZGJtsE.js";import"./index-Do-KWT0a.js";import"./accordion-CpiLc1m2.js";import"./mdx-C7imFHZE.js";import"./epic-video-CmlkW6Rw.js";import"./index-DLC5u33j.js";import"./pe-BShc2dvc.js";import"./user-DNSnhqGn.js";import"./workshop-config-DchzGYJM.js";import"./progress-bar-DgnkQxQw.js";import"./revalidation-ws-B0skixgr.js";import"./use-event-source-Dar8h_B8.js";import"./button-Dt4EcDfR.js";var _="rovingFocusGroup.onEntryFocus",Ae={bubbles:!1,cancelable:!0},D="RovingFocusGroup",[k,W,ke]=be(D),[Le,q]=K(D,[ke]),[Ue,Me]=Le(D),J=c.forwardRef((e,s)=>t.jsx(k.Provider,{scope:e.__scopeRovingFocusGroup,children:t.jsx(k.Slot,{scope:e.__scopeRovingFocusGroup,children:t.jsx(Oe,{...e,ref:s})})}));J.displayName=D;var Oe=c.forwardRef((e,s)=>{const{__scopeRovingFocusGroup:r,orientation:n,loop:i=!1,dir:d,currentTabStopId:l,defaultCurrentTabStopId:f,onCurrentTabStopIdChange:g,onEntryFocus:m,preventScrollOnEntryFocus:a=!1,...u}=e,x=c.useRef(null),w=he(s,x),N=H(d),[y,o]=V({prop:l,defaultProp:f??null,onChange:g,caller:D}),[p,C]=c.useState(!1),h=ve(m),b=W(r),S=c.useRef(!1),[ue,M]=c.useState(0);return c.useEffect(()=>{const v=x.current;if(v)return v.addEventListener(_,h),()=>v.removeEventListener(_,h)},[h]),t.jsx(Ue,{scope:r,orientation:n,dir:N,loop:i,currentTabStopId:y,onItemFocus:c.useCallback(v=>o(v),[o]),onItemShiftTab:c.useCallback(()=>C(!0),[]),onFocusableItemAdd:c.useCallback(()=>M(v=>v+1),[]),onFocusableItemRemove:c.useCallback(()=>M(v=>v-1),[]),children:t.jsx(E.div,{tabIndex:p||ue===0?-1:0,"data-orientation":n,...u,ref:w,style:{outline:"none",...e.style},onMouseDown:j(e.onMouseDown,()=>{S.current=!0}),onFocus:j(e.onFocus,v=>{const de=!S.current;if(v.target===v.currentTarget&&de&&!p){const O=new CustomEvent(_,Ae);if(v.currentTarget.dispatchEvent(O),!O.defaultPrevented){const F=b().filter(T=>T.focusable),fe=F.find(T=>T.active),me=F.find(T=>T.id===y),xe=[fe,me,...F].filter(Boolean).map(T=>T.ref.current);Z(xe,a)}}S.current=!1}),onBlur:j(e.onBlur,()=>C(!1))})})}),Q="RovingFocusGroupItem",X=c.forwardRef((e,s)=>{const{__scopeRovingFocusGroup:r,focusable:n=!0,active:i=!1,tabStopId:d,children:l,...f}=e,g=B(),m=d||g,a=Me(Q,r),u=a.currentTabStopId===m,x=W(r),{onFocusableItemAdd:w,onFocusableItemRemove:N,currentTabStopId:y}=a;return c.useEffect(()=>{if(n)return w(),()=>N()},[n,w,N]),t.jsx(k.ItemSlot,{scope:r,id:m,focusable:n,active:i,children:t.jsx(E.span,{tabIndex:u?0:-1,"data-orientation":a.orientation,...f,ref:s,onMouseDown:j(e.onMouseDown,o=>{n?a.onItemFocus(m):o.preventDefault()}),onFocus:j(e.onFocus,()=>a.onItemFocus(m)),onKeyDown:j(e.onKeyDown,o=>{if(o.key==="Tab"&&o.shiftKey){a.onItemShiftTab();return}if(o.target!==o.currentTarget)return;const p=Be(o,a.orientation,a.dir);if(p!==void 0){if(o.metaKey||o.ctrlKey||o.altKey||o.shiftKey)return;o.preventDefault();let h=x().filter(b=>b.focusable).map(b=>b.ref.current);if(p==="last")h.reverse();else if(p==="prev"||p==="next"){p==="prev"&&h.reverse();const b=h.indexOf(o.currentTarget);h=a.loop?Ve(h,b+1):h.slice(b+1)}setTimeout(()=>Z(h))}}),children:typeof l=="function"?l({isCurrentTabStop:u,hasTabStop:y!=null}):l})})});X.displayName=Q;var Ge={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function Ke(e,s){return s!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function Be(e,s,r){const n=Ke(e.key,r);if(!(s==="vertical"&&["ArrowLeft","ArrowRight"].includes(n))&&!(s==="horizontal"&&["ArrowUp","ArrowDown"].includes(n)))return Ge[n]}function Z(e,s=!1){const r=document.activeElement;for(const n of e)if(n===r||(n.focus({preventScroll:s}),document.activeElement!==r))return}function Ve(e,s){return e.map((r,n)=>e[(s+n)%e.length])}var He=J,$e=X,R="Tabs",[ze,Rt]=K(R,[q]),ee=q(),[Ye,U]=ze(R),te=c.forwardRef((e,s)=>{const{__scopeTabs:r,value:n,onValueChange:i,defaultValue:d,orientation:l="horizontal",dir:f,activationMode:g="automatic",...m}=e,a=H(f),[u,x]=V({prop:n,onChange:i,defaultProp:d??"",caller:R});return t.jsx(Ye,{scope:r,baseId:B(),value:u,onValueChange:x,orientation:l,dir:a,activationMode:g,children:t.jsx(E.div,{dir:a,"data-orientation":l,...m,ref:s})})});te.displayName=R;var re="TabsList",se=c.forwardRef((e,s)=>{const{__scopeTabs:r,loop:n=!0,...i}=e,d=U(re,r),l=ee(r);return t.jsx(He,{asChild:!0,...l,orientation:d.orientation,dir:d.dir,loop:n,children:t.jsx(E.div,{role:"tablist","aria-orientation":d.orientation,...i,ref:s})})});se.displayName=re;var ne="TabsTrigger",oe=c.forwardRef((e,s)=>{const{__scopeTabs:r,value:n,disabled:i=!1,...d}=e,l=U(ne,r),f=ee(r),g=le(l.baseId,n),m=ce(l.baseId,n),a=n===l.value;return t.jsx($e,{asChild:!0,...f,focusable:!i,active:a,children:t.jsx(E.button,{type:"button",role:"tab","aria-selected":a,"aria-controls":m,"data-state":a?"active":"inactive","data-disabled":i?"":void 0,disabled:i,id:g,...d,ref:s,onMouseDown:j(e.onMouseDown,u=>{!i&&u.button===0&&u.ctrlKey===!1?l.onValueChange(n):u.preventDefault()}),onKeyDown:j(e.onKeyDown,u=>{[" ","Enter"].includes(u.key)&&l.onValueChange(n)}),onFocus:j(e.onFocus,()=>{const u=l.activationMode!=="manual";!a&&!i&&u&&l.onValueChange(n)})})})});oe.displayName=ne;var ae="TabsContent",ie=c.forwardRef((e,s)=>{const{__scopeTabs:r,value:n,forceMount:i,children:d,...l}=e,f=U(ae,r),g=le(f.baseId,n),m=ce(f.baseId,n),a=n===f.value,u=c.useRef(a);return c.useEffect(()=>{const x=requestAnimationFrame(()=>u.current=!1);return()=>cancelAnimationFrame(x)},[]),t.jsx(ge,{present:i||a,children:({present:x})=>t.jsx(E.div,{"data-state":a?"active":"inactive","data-orientation":f.orientation,role:"tabpanel","aria-labelledby":g,hidden:!x,id:m,tabIndex:0,...l,ref:s,style:{...e.style,animationDuration:u.current?"0s":void 0},children:x&&d})})});ie.displayName=ae;function le(e,s){return`${e}-trigger-${s}`}function ce(e,s){return`${e}-content-${s}`}var We=te,qe=se,Je=oe,I=ie;function Qe(){return t.jsxs("div",{className:"flex h-full w-full flex-col gap-4 pt-4",children:[t.jsx("div",{className:"text-center",children:t.jsx(Ce,{})}),t.jsx("div",{className:"flex-1 overflow-y-scroll bg-accent pb-4 scrollbar-thin scrollbar-thumb-scrollbar",children:t.jsx(Xe,{})})]})}function Xe(){const e=z(),s=Ie(),r=$();return Ee()?t.jsxs("div",{className:"flex h-full flex-col items-center justify-between",children:[t.jsx(c.Suspense,{fallback:t.jsx("div",{className:"flex h-full w-full flex-col items-center justify-center",children:t.jsx(Te,{children:"Loading Discord Posts"})}),children:t.jsx(Pe,{resolve:e.discordPostsPromise,errorElement:t.jsx("div",{className:"text-red-500",children:"There was a problem loading the discord posts"}),children:i=>t.jsx("ul",{className:"flex w-full flex-col gap-4 p-3 xl:p-12",children:i.map(d=>t.jsx("li",{className:"rounded-xl border bg-background transition-all duration-200 focus-within:-translate-y-1 focus-within:shadow-lg hover:-translate-y-1 hover:shadow-lg",children:t.jsx(Ze,{thread:d})},d.id))})})}),t.jsx("div",{children:t.jsxs(Y,{to:r&&!s.includes("oauth")?s.replace(/^https/,"discord"):s,target:s.includes("oauth")?void 0:"_blank",rel:"noreferrer noopener",onClick:r?i=>{i.preventDefault(),window.open(i.currentTarget.href,"_blank","noreferrer noopener")}:void 0,className:"flex items-center gap-2 p-2 text-xl hover:underline",children:["Create Post ",t.jsx(P,{name:"ExternalLink"})]})})]}):t.jsx("div",{className:"flex h-full flex-col items-center justify-between",children:t.jsx("div",{className:"text-foreground-destructive flex h-full w-full flex-col items-center justify-center",children:t.jsx(P,{name:"WifiNoConnection",size:"xl",children:"Unable to load discord messages when offline"})})})}function Ze({thread:e}){const s=e.reactions.filter(r=>r.count);return t.jsx("div",{children:t.jsxs("div",{className:"flex flex-col gap-2 p-4",children:[t.jsxs("div",{className:"flex gap-4",children:[t.jsxs("div",{className:"flex flex-col gap-1",children:[e.tags.length?t.jsx("div",{className:"flex gap-2",children:e.tags.map(r=>t.jsxs("div",{className:"flex items-center justify-center gap-1 rounded-full bg-accent px-2 py-1 text-sm",children:[t.jsx("span",{className:"h-3 w-3 leading-3",children:t.jsx(G,{name:r.emojiName,url:r.emojiUrl})}),t.jsx("span",{children:r.name})]},r.name))}):null,t.jsx("strong",{className:"text-xl font-bold",children:e.name}),t.jsxs("div",{className:"flex items-start gap-1",children:[t.jsxs("div",{className:"flex items-center gap-1",children:[e.authorAvatarUrl?t.jsx("img",{src:e.authorAvatarUrl,alt:"",className:"h-6 w-6 rounded-full"}):null,t.jsxs("span",{children:[t.jsx("span",{className:"font-bold",style:e.authorHexAccentColor?{color:e.authorHexAccentColor}:{},children:e.authorDisplayName}),":"," "]})]}),t.jsx("span",{className:"flex-1 overflow-ellipsis text-muted-foreground",children:e.messagePreview})]})]}),e.previewImageUrl?t.jsx("img",{src:e.previewImageUrl,alt:"",className:"h-28 w-28 rounded-lg object-cover"}):null]}),t.jsxs("div",{className:"flex justify-between",children:[t.jsxs("div",{className:"flex items-center gap-3",children:[t.jsx("span",{children:s.length?t.jsx("ul",{className:"flex items-center gap-2",children:s.map((r,n)=>t.jsxs("li",{className:"flex items-center gap-1 rounded-md border border-blue-600 bg-blue-500/20 px-[5px] py-[0.5px] text-sm",children:[t.jsx("span",{className:"h-3 w-3 leading-3",children:t.jsx(G,{name:r.emojiName,url:r.emojiUrl})}),t.jsx("span",{children:r.count})]},n))}):null}),t.jsxs("span",{className:"flex items-center gap-1",children:[t.jsxs("span",{className:"inline-flex items-center gap-1",children:[t.jsx(P,{name:"Chat"})," ",e.messageCount]}),` · ${e.lastUpdatedDisplay}`]})]}),t.jsxs("span",{className:"flex items-center gap-4",children:[t.jsx("a",{href:e.link.replace(/^https/,"discord"),children:t.jsx(P,{name:"Discord"})}),t.jsx("a",{href:e.link,target:"_blank",rel:"noreferrer noopener",children:t.jsx(P,{name:"ExternalLink"})})]})]})]})})}function G({name:e,url:s}){return s?t.jsx("img",{src:s,alt:e,className:"h-full w-full"}):e||null}function et({appInfo:e,inBrowserBrowserRef:s,problemAppName:r,allApps:n,isUpToDate:i}){return t.jsx(Fe,{playgroundAppName:e==null?void 0:e.appName,problemAppName:r,allApps:n,isUpToDate:i,children:(e==null?void 0:e.dev.type)==="none"?t.jsxs("div",{children:[t.jsx("div",{className:"text-foreground-secondary flex h-full items-center justify-center text-2xl",children:"Non-UI playground"}),t.jsx("div",{children:t.jsxs("div",{className:"text-foreground-secondary flex flex-wrap gap-1 text-center",children:["Navigate to"," ",t.jsx(je,{content:e.fullPath,children:t.jsx("span",{className:"underline",onClick:()=>{navigator.clipboard.writeText(e.fullPath),Re.success("Copied playground path to clipboard")},children:"the playground directory"})})," ","in your editor and terminal to work on this exercise!"]})})]}):e?t.jsx(A,{id:e.appName,appInfo:e,inBrowserBrowserRef:s}):t.jsxs("div",{className:"flex flex-col justify-center gap-2",children:[t.jsx("p",{children:"Please set the playground first"}),r?t.jsx(Se,{appName:r}):null]})})}const L=["playground","problem","solution","tests","diff","chat"],tt=e=>!!(e&&L.includes(e));function rt(e,s,r){const n=new URLSearchParams(e);return r===null?n.delete(s):n.set(s,r),n}function St(){var a,u,x,w,N,y;const e=z(),[s]=De(),r=s.get("preview"),n=c.useRef(null),i=$(),d=pe();function l(o){var p,C,h;if(o==="tests")return ENV.EPICSHOP_DEPLOYED||!e.playground||e.playground.test.type==="none";if(o==="problem"||o==="solution"){if(((p=e[o])==null?void 0:p.dev.type)==="none")return!0;if(ENV.EPICSHOP_DEPLOYED)return((C=e[o])==null?void 0:C.dev.type)!=="browser"&&!((h=e[o])!=null&&h.stackBlitzUrl)}return!!(o==="playground"&&ENV.EPICSHOP_DEPLOYED)}const f=tt(r)?r:L.find(o=>!l(o)),g=`/diff?${new URLSearchParams({app1:((a=e.problem)==null?void 0:a.name)??"",app2:((u=e.solution)==null?void 0:u.name)??""})}`;function m(o){o.altKey&&!o.ctrlKey&&!o.shiftKey&&!o.metaKey&&(o.preventDefault(),d(g))}return t.jsxs(We,{className:"relative flex flex-col overflow-y-auto sm:col-span-1 sm:row-span-1",value:f,children:[t.jsx(qe,{className:"h-14 min-h-14 overflow-x-hidden border-b scrollbar-thin scrollbar-thumb-scrollbar",children:L.map(o=>{const p=l(o);return t.jsx(Je,{value:o,hidden:p,asChild:!0,children:t.jsx(Y,{id:`${o}-tab`,className:we("clip-path-button relative h-full px-6 py-4 font-mono text-sm uppercase outline-none 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",p?"hidden":"inline-block"),preventScrollReset:!0,prefetch:"intent",onClick:m,to:o==="diff"&&i?g:`?${rt(s,"preview",o==="playground"?null:o)}`,children:o})},o)})}),t.jsxs("div",{className:"relative z-10 flex min-h-96 flex-grow flex-col overflow-y-auto",children:[t.jsx(I,{value:"playground",className:"flex w-full flex-grow items-center justify-center self-start radix-state-inactive:hidden",forceMount:!0,children:t.jsx(et,{appInfo:e.playground,problemAppName:(x=e.problem)==null?void 0:x.name,inBrowserBrowserRef:n,allApps:e.allApps,isUpToDate:((w=e.playground)==null?void 0:w.isUpToDate)??!1})}),t.jsx(I,{value:"problem",className:"flex w-full flex-grow items-center justify-center self-start radix-state-inactive:hidden",forceMount:!0,children:t.jsx(A,{appInfo:e.problem,inBrowserBrowserRef:n})}),t.jsx(I,{value:"solution",className:"flex w-full flex-grow items-center justify-center self-start radix-state-inactive:hidden",forceMount:!0,children:t.jsx(A,{appInfo:e.solution,inBrowserBrowserRef:n})}),t.jsx(I,{value:"tests",className:"flex w-full flex-grow items-start justify-center self-start overflow-hidden radix-state-inactive:hidden",children:t.jsx(_e,{appInfo:e.playground,problemAppName:(N=e.problem)==null?void 0:N.name,allApps:e.allApps,isUpToDate:((y=e.playground)==null?void 0:y.isUpToDate)??!1})}),t.jsx(I,{value:"diff",className:"flex h-full w-full flex-grow items-start justify-center self-start radix-state-inactive:hidden",children:t.jsx(Ne,{diff:e.diff,allApps:e.allApps})}),t.jsx(I,{value:"chat",className:"flex h-full w-full flex-grow items-start justify-center self-start radix-state-inactive:hidden",children:t.jsx(Qe,{})})]})]})}function Ft(){return t.jsx(ye,{statusHandlers:{404:()=>t.jsx("p",{children:"Sorry, we couldn't find an app here."})}})}export{Ft as ErrorBoundary,St as default};
2
+ //# sourceMappingURL=index-DPHVg8Eh.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index-Dkt2MSig.js","sources":["../../../../../node_modules/@radix-ui/react-roving-focus/dist/index.mjs","../../../../../node_modules/@radix-ui/react-tabs/dist/index.mjs","../../../app/routes/_app+/exercise+/$exerciseNumber_.$stepNumber.$type+/__shared/discord.tsx","../../../app/routes/_app+/exercise+/$exerciseNumber_.$stepNumber.$type+/__shared/playground.tsx","../../../app/routes/_app+/exercise+/$exerciseNumber_.$stepNumber.$type+/index.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 { type SerializeFrom } from '@remix-run/node'\nimport { Await, Link, useLoaderData } from '@remix-run/react'\nimport * as React from 'react'\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'\nimport { type loader } from '../index.tsx'\n\nexport function DiscordChat() {\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=\"flex-1 overflow-y-scroll bg-accent pb-4 scrollbar-thin scrollbar-thumb-scrollbar\">\n\t\t\t\t<DiscordPosts />\n\t\t\t</div>\n\t\t</div>\n\t)\n}\n\nfunction DiscordPosts() {\n\tconst data = useLoaderData<typeof loader>()\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={data.discordPostsPromise}\n\t\t\t\t\terrorElement={\n\t\t\t\t\t\t<div className=\"text-red-500\">\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=\"rounded-xl border bg-background 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? (e) => {\n\t\t\t\t\t\t\t\t\te.preventDefault()\n\t\t\t\t\t\t\t\t\twindow.open(\n\t\t\t\t\t\t\t\t\t\te.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({\n\tthread,\n}: {\n\tthread: Awaited<SerializeFrom<typeof loader>['discordPostsPromise']>[number]\n}) {\n\tconst reactionsWithCounts = thread.reactions.filter((r) => r.count)\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 gap-4\">\n\t\t\t\t\t<div className=\"flex 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((t) => (\n\t\t\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\t\t\tkey={t.name}\n\t\t\t\t\t\t\t\t\t\tclassName=\"flex items-center justify-center gap-1 rounded-full bg-accent 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={t.emojiName} url={t.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>{t.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 items-start 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=\"flex-1 overflow-ellipsis text-muted-foreground\">\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((r, i) => (\n\t\t\t\t\t\t\t\t\t\t<li\n\t\t\t\t\t\t\t\t\t\t\tkey={i}\n\t\t\t\t\t\t\t\t\t\t\tclassName=\"flex items-center gap-1 rounded-md border border-blue-600 bg-blue-500/20 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 name={r.emojiName} url={r.emojiUrl} />\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>{r.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 { toast as showToast } from 'sonner'\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>\n\t\t\t\t\t<div className=\"text-foreground-secondary flex h-full items-center justify-center text-2xl\">\n\t\t\t\t\t\tNon-UI playground\n\t\t\t\t\t</div>\n\t\t\t\t\t<div>\n\t\t\t\t\t\t<div className=\"text-foreground-secondary flex flex-wrap gap-1 text-center\">\n\t\t\t\t\t\t\tNavigate to{' '}\n\t\t\t\t\t\t\t<SimpleTooltip content={playgroundAppInfo.fullPath}>\n\t\t\t\t\t\t\t\t<span\n\t\t\t\t\t\t\t\t\tclassName=\"underline\"\n\t\t\t\t\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\t\t\t\t\tvoid navigator.clipboard.writeText(\n\t\t\t\t\t\t\t\t\t\t\tplaygroundAppInfo.fullPath,\n\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\tshowToast.success('Copied playground path to clipboard')\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\t\tthe playground directory\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t</SimpleTooltip>{' '}\n\t\t\t\t\t\t\tin your editor and terminal to work on this exercise!\n\t\t\t\t\t\t</div>\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","import {\n\tgetAppByName,\n\tgetAppDisplayName,\n\tgetApps,\n\tgetExerciseApp,\n\tisExerciseStepApp,\n\tisPlaygroundApp,\n\trequireExerciseApp,\n\ttype App,\n\ttype ExerciseStepApp,\n} from '@epic-web/workshop-utils/apps.server'\nimport { compileMarkdownString } from '@epic-web/workshop-utils/compile-mdx.server'\nimport { getDiffCode } from '@epic-web/workshop-utils/diff.server'\nimport { userHasAccessToWorkshop } from '@epic-web/workshop-utils/epic-api.server'\nimport {\n\tcombineServerTimings,\n\tgetServerTimeHeader,\n\tmakeTimings,\n} from '@epic-web/workshop-utils/timing.server'\nimport * as Tabs from '@radix-ui/react-tabs'\nimport {\n\tunstable_data as data,\n\tredirect,\n\ttype HeadersFunction,\n\ttype LoaderFunctionArgs,\n} from '@remix-run/node'\nimport {\n\tLink,\n\tuseLoaderData,\n\tuseNavigate,\n\tuseSearchParams,\n} from '@remix-run/react'\nimport { clsx } from 'clsx'\nimport * as React from 'react'\nimport { useRef } from 'react'\nimport { Diff } from '#app/components/diff.tsx'\nimport { GeneralErrorBoundary } from '#app/components/error-boundary.tsx'\nimport { type InBrowserBrowserRef } from '#app/components/in-browser-browser.tsx'\nimport { useAltDown } from '#app/utils/misc.tsx'\nimport { fetchDiscordPosts } from './__shared/discord.server.ts'\nimport { DiscordChat } from './__shared/discord.tsx'\nimport { Playground } from './__shared/playground.tsx'\nimport { Preview } from './__shared/preview.tsx'\nimport { Tests } from './__shared/tests.tsx'\nimport { getAppRunningState } from './__shared/utils.tsx'\n\nexport async function loader({ request, params }: LoaderFunctionArgs) {\n\tconst timings = makeTimings('exerciseStepTypeIndexLoader')\n\tconst userHasAccess = await userHasAccessToWorkshop({\n\t\trequest,\n\t\ttimings,\n\t})\n\tconst searchParams = new URL(request.url).searchParams\n\tconst cacheOptions = { request, timings }\n\tconst exerciseStepApp = await requireExerciseApp(params, cacheOptions)\n\tconst reqUrl = new URL(request.url)\n\n\tconst pathnameParam = reqUrl.searchParams.get('pathname')\n\tif (pathnameParam === '' || pathnameParam === '/') {\n\t\treqUrl.searchParams.delete('pathname')\n\t\tthrow redirect(reqUrl.toString())\n\t}\n\n\tconst problemApp = await getExerciseApp(\n\t\t{ ...params, type: 'problem' },\n\t\tcacheOptions,\n\t)\n\tconst solutionApp = await getExerciseApp(\n\t\t{ ...params, type: 'solution' },\n\t\tcacheOptions,\n\t)\n\n\tif (!problemApp && !solutionApp) {\n\t\tthrow new Response('Not found', { status: 404 })\n\t}\n\n\tconst allAppsFull = await getApps(cacheOptions)\n\tconst playgroundApp = allAppsFull.find(isPlaygroundApp)\n\n\tconst app1Name = reqUrl.searchParams.get('app1')\n\tconst app2Name = reqUrl.searchParams.get('app2')\n\tconst app1 = app1Name\n\t\t? await getAppByName(app1Name)\n\t\t: playgroundApp || problemApp\n\tconst app2 = app2Name ? await getAppByName(app2Name) : solutionApp\n\n\tfunction getStepId(a: ExerciseStepApp) {\n\t\treturn (\n\t\t\ta.exerciseNumber * 1000 +\n\t\t\ta.stepNumber * 10 +\n\t\t\t(a.type === 'problem' ? 0 : 1)\n\t\t)\n\t}\n\n\tfunction getStepNameAndId(a: App) {\n\t\tif (isExerciseStepApp(a)) {\n\t\t\tconst exerciseNumberStr = String(a.exerciseNumber).padStart(2, '0')\n\t\t\tconst stepNumberStr = String(a.stepNumber).padStart(2, '0')\n\n\t\t\treturn {\n\t\t\t\tstepName: `${exerciseNumberStr}/${stepNumberStr}.${a.type}`,\n\t\t\t\tstepId: getStepId(a),\n\t\t\t}\n\t\t}\n\t\treturn { stepName: '', stepId: -1 }\n\t}\n\n\tconst allApps = allAppsFull\n\t\t.filter((a, i, ar) => ar.findIndex((b) => a.name === b.name) === i)\n\t\t.map((a) => ({\n\t\t\tdisplayName: getAppDisplayName(a, allAppsFull),\n\t\t\tname: a.name,\n\t\t\ttitle: a.title,\n\t\t\ttype: a.type,\n\t\t\t...getStepNameAndId(a),\n\t\t}))\n\n\tallApps.sort((a, b) => {\n\t\t// order them by their stepId\n\t\tif (a.stepId > 0 && b.stepId > 0) return a.stepId - b.stepId\n\n\t\t// non-step apps should come after step apps\n\t\tif (a.stepId > 0) return -1\n\t\tif (b.stepId > 0) return 1\n\n\t\treturn 0\n\t})\n\n\tasync function getDiffProp() {\n\t\tif (!app1 || !app2) {\n\t\t\treturn {\n\t\t\t\tapp1: app1?.name,\n\t\t\t\tapp2: app2?.name,\n\t\t\t\tdiffCode: null,\n\t\t\t}\n\t\t}\n\t\tif (!userHasAccess) {\n\t\t\treturn {\n\t\t\t\tapp1: app1?.name,\n\t\t\t\tapp2: app2?.name,\n\t\t\t\tdiffCode: await compileMarkdownString(\n\t\t\t\t\t`<h1>Access Denied</h1><p>You must login or register for the workshop to view the diff</p>`,\n\t\t\t\t),\n\t\t\t}\n\t\t}\n\t\tconst diffCode = await getDiffCode(app1, app2, {\n\t\t\t...cacheOptions,\n\t\t\tforceFresh: searchParams.get('forceFresh') === 'diff',\n\t\t}).catch((e) => {\n\t\t\tconsole.error(e)\n\t\t\treturn null\n\t\t})\n\t\treturn {\n\t\t\tapp1: app1.name,\n\t\t\tapp2: app2.name,\n\t\t\tdiffCode,\n\t\t}\n\t}\n\n\treturn data(\n\t\t{\n\t\t\ttype: params.type as 'problem' | 'solution',\n\t\t\texerciseStepApp,\n\t\t\tallApps,\n\t\t\t// defer this promise so that we don't block the response from being sent\n\t\t\tdiscordPostsPromise: fetchDiscordPosts({ request }),\n\t\t\tplayground: playgroundApp\n\t\t\t\t? ({\n\t\t\t\t\t\ttype: 'playground',\n\t\t\t\t\t\tfullPath: playgroundApp.fullPath,\n\t\t\t\t\t\tdev: playgroundApp.dev,\n\t\t\t\t\t\ttest: playgroundApp.test,\n\t\t\t\t\t\ttitle: playgroundApp.title,\n\t\t\t\t\t\tname: playgroundApp.name,\n\t\t\t\t\t\tappName: playgroundApp.appName,\n\t\t\t\t\t\tisUpToDate: playgroundApp.isUpToDate,\n\t\t\t\t\t\tstackBlitzUrl: playgroundApp.stackBlitzUrl,\n\t\t\t\t\t\t...(await getAppRunningState(playgroundApp)),\n\t\t\t\t\t} as const)\n\t\t\t\t: null,\n\t\t\tproblem: problemApp\n\t\t\t\t? ({\n\t\t\t\t\t\ttype: 'problem',\n\t\t\t\t\t\tfullPath: problemApp.fullPath,\n\t\t\t\t\t\tdev: problemApp.dev,\n\t\t\t\t\t\ttest: problemApp.test,\n\t\t\t\t\t\ttitle: problemApp.title,\n\t\t\t\t\t\tname: problemApp.name,\n\t\t\t\t\t\tstackBlitzUrl: problemApp.stackBlitzUrl,\n\t\t\t\t\t\t...(await getAppRunningState(problemApp)),\n\t\t\t\t\t} as const)\n\t\t\t\t: null,\n\t\t\tsolution: solutionApp\n\t\t\t\t? ({\n\t\t\t\t\t\ttype: 'solution',\n\t\t\t\t\t\tfullPath: solutionApp.fullPath,\n\t\t\t\t\t\tdev: solutionApp.dev,\n\t\t\t\t\t\ttest: solutionApp.test,\n\t\t\t\t\t\ttitle: solutionApp.title,\n\t\t\t\t\t\tname: solutionApp.name,\n\t\t\t\t\t\tstackBlitzUrl: solutionApp.stackBlitzUrl,\n\t\t\t\t\t\t...(await getAppRunningState(solutionApp)),\n\t\t\t\t\t} as const)\n\t\t\t\t: null,\n\t\t\tdiff: getDiffProp(),\n\t\t} as const,\n\t\t{\n\t\t\theaders: {\n\t\t\t\t'Server-Timing': getServerTimeHeader(timings),\n\t\t\t},\n\t\t},\n\t)\n}\n\nexport const headers: HeadersFunction = ({ loaderHeaders, parentHeaders }) => {\n\tconst headers = {\n\t\t'Server-Timing': combineServerTimings(loaderHeaders, parentHeaders),\n\t}\n\treturn headers\n}\n\nconst tabs = [\n\t'playground',\n\t'problem',\n\t'solution',\n\t'tests',\n\t'diff',\n\t'chat',\n] as const\nconst isValidPreview = (s: string | null): s is (typeof tabs)[number] =>\n\tBoolean(s && tabs.includes(s as (typeof tabs)[number]))\n\nfunction withParam(\n\tsearchParams: URLSearchParams,\n\tkey: string,\n\tvalue: string | null,\n) {\n\tconst newSearchParams = new URLSearchParams(searchParams)\n\tif (value === null) {\n\t\tnewSearchParams.delete(key)\n\t} else {\n\t\tnewSearchParams.set(key, value)\n\t}\n\treturn newSearchParams\n}\n\nexport default function ExercisePartRoute() {\n\tconst data = useLoaderData<typeof loader>()\n\tconst [searchParams] = useSearchParams()\n\n\tconst preview = searchParams.get('preview')\n\tconst inBrowserBrowserRef = useRef<InBrowserBrowserRef>(null)\n\n\tconst altDown = useAltDown()\n\tconst navigate = useNavigate()\n\n\tfunction shouldHideTab(tab: (typeof tabs)[number]) {\n\t\tif (tab === 'tests') {\n\t\t\treturn (\n\t\t\t\tENV.EPICSHOP_DEPLOYED ||\n\t\t\t\t!data.playground ||\n\t\t\t\tdata.playground.test.type === 'none'\n\t\t\t)\n\t\t}\n\t\tif (tab === 'problem' || tab === 'solution') {\n\t\t\tif (data[tab]?.dev.type === 'none') return true\n\t\t\tif (ENV.EPICSHOP_DEPLOYED) {\n\t\t\t\treturn data[tab]?.dev.type !== 'browser' && !data[tab]?.stackBlitzUrl\n\t\t\t}\n\t\t}\n\t\tif (tab === 'playground' && ENV.EPICSHOP_DEPLOYED) return true\n\t\treturn false\n\t}\n\n\tconst activeTab = isValidPreview(preview)\n\t\t? preview\n\t\t: tabs.find((t) => !shouldHideTab(t))\n\n\t// when alt is held down, the diff tab should open to the full-page diff view\n\t// between the problem and solution (this is more for the instructor than the student)\n\tconst altDiffUrl = `/diff?${new URLSearchParams({\n\t\tapp1: data.problem?.name ?? '',\n\t\tapp2: data.solution?.name ?? '',\n\t})}`\n\n\tfunction handleDiffTabClick(event: React.MouseEvent<HTMLAnchorElement>) {\n\t\tif (event.altKey && !event.ctrlKey && !event.shiftKey && !event.metaKey) {\n\t\t\tevent.preventDefault()\n\t\t\tnavigate(altDiffUrl)\n\t\t}\n\t}\n\n\treturn (\n\t\t<Tabs.Root\n\t\t\tclassName=\"relative flex flex-col overflow-y-auto sm:col-span-1 sm:row-span-1\"\n\t\t\tvalue={activeTab}\n\t\t\t// intentionally no onValueChange here because the Link will trigger the\n\t\t\t// change.\n\t\t>\n\t\t\t<Tabs.List className=\"h-14 min-h-14 overflow-x-hidden border-b scrollbar-thin scrollbar-thumb-scrollbar\">\n\t\t\t\t{tabs.map((tab) => {\n\t\t\t\t\tconst hidden = shouldHideTab(tab)\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<Tabs.Trigger key={tab} value={tab} hidden={hidden} asChild>\n\t\t\t\t\t\t\t<Link\n\t\t\t\t\t\t\t\tid={`${tab}-tab`}\n\t\t\t\t\t\t\t\tclassName={clsx(\n\t\t\t\t\t\t\t\t\t'clip-path-button relative h-full px-6 py-4 font-mono text-sm uppercase outline-none 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',\n\t\t\t\t\t\t\t\t\thidden ? 'hidden' : 'inline-block',\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\tpreventScrollReset\n\t\t\t\t\t\t\t\tprefetch=\"intent\"\n\t\t\t\t\t\t\t\tonClick={handleDiffTabClick}\n\t\t\t\t\t\t\t\tto={\n\t\t\t\t\t\t\t\t\ttab === 'diff' && altDown\n\t\t\t\t\t\t\t\t\t\t? altDiffUrl\n\t\t\t\t\t\t\t\t\t\t: `?${withParam(\n\t\t\t\t\t\t\t\t\t\t\t\tsearchParams,\n\t\t\t\t\t\t\t\t\t\t\t\t'preview',\n\t\t\t\t\t\t\t\t\t\t\t\ttab === 'playground' ? null : tab,\n\t\t\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>\n\t\t\t\t\t\t\t\t{tab}\n\t\t\t\t\t\t\t</Link>\n\t\t\t\t\t\t</Tabs.Trigger>\n\t\t\t\t\t)\n\t\t\t\t})}\n\t\t\t</Tabs.List>\n\t\t\t<div className=\"relative z-10 flex min-h-96 flex-grow flex-col overflow-y-auto\">\n\t\t\t\t<Tabs.Content\n\t\t\t\t\tvalue=\"playground\"\n\t\t\t\t\tclassName=\"flex w-full flex-grow items-center justify-center self-start radix-state-inactive:hidden\"\n\t\t\t\t\tforceMount\n\t\t\t\t>\n\t\t\t\t\t<Playground\n\t\t\t\t\t\tappInfo={data.playground}\n\t\t\t\t\t\tproblemAppName={data.problem?.name}\n\t\t\t\t\t\tinBrowserBrowserRef={inBrowserBrowserRef}\n\t\t\t\t\t\tallApps={data.allApps}\n\t\t\t\t\t\tisUpToDate={data.playground?.isUpToDate ?? false}\n\t\t\t\t\t/>\n\t\t\t\t</Tabs.Content>\n\t\t\t\t<Tabs.Content\n\t\t\t\t\tvalue=\"problem\"\n\t\t\t\t\tclassName=\"flex w-full flex-grow items-center justify-center self-start radix-state-inactive:hidden\"\n\t\t\t\t\tforceMount\n\t\t\t\t>\n\t\t\t\t\t<Preview\n\t\t\t\t\t\tappInfo={data.problem}\n\t\t\t\t\t\tinBrowserBrowserRef={inBrowserBrowserRef}\n\t\t\t\t\t/>\n\t\t\t\t</Tabs.Content>\n\t\t\t\t<Tabs.Content\n\t\t\t\t\tvalue=\"solution\"\n\t\t\t\t\tclassName=\"flex w-full flex-grow items-center justify-center self-start radix-state-inactive:hidden\"\n\t\t\t\t\tforceMount\n\t\t\t\t>\n\t\t\t\t\t<Preview\n\t\t\t\t\t\tappInfo={data.solution}\n\t\t\t\t\t\tinBrowserBrowserRef={inBrowserBrowserRef}\n\t\t\t\t\t/>\n\t\t\t\t</Tabs.Content>\n\t\t\t\t<Tabs.Content\n\t\t\t\t\tvalue=\"tests\"\n\t\t\t\t\tclassName=\"flex w-full flex-grow items-start justify-center self-start overflow-hidden radix-state-inactive:hidden\"\n\t\t\t\t>\n\t\t\t\t\t<Tests\n\t\t\t\t\t\tappInfo={data.playground}\n\t\t\t\t\t\tproblemAppName={data.problem?.name}\n\t\t\t\t\t\tallApps={data.allApps}\n\t\t\t\t\t\tisUpToDate={data.playground?.isUpToDate ?? false}\n\t\t\t\t\t/>\n\t\t\t\t</Tabs.Content>\n\t\t\t\t<Tabs.Content\n\t\t\t\t\tvalue=\"diff\"\n\t\t\t\t\tclassName=\"flex h-full w-full flex-grow items-start justify-center self-start radix-state-inactive:hidden\"\n\t\t\t\t>\n\t\t\t\t\t<Diff diff={data.diff} allApps={data.allApps} />\n\t\t\t\t</Tabs.Content>\n\t\t\t\t<Tabs.Content\n\t\t\t\t\tvalue=\"chat\"\n\t\t\t\t\tclassName=\"flex h-full w-full flex-grow items-start justify-center self-start radix-state-inactive:hidden\"\n\t\t\t\t>\n\t\t\t\t\t<DiscordChat />\n\t\t\t\t</Tabs.Content>\n\t\t\t</div>\n\t\t</Tabs.Root>\n\t)\n}\n\nexport function ErrorBoundary() {\n\treturn (\n\t\t<GeneralErrorBoundary\n\t\t\tstatusHandlers={{\n\t\t\t\t404: () => <p>Sorry, we couldn't find an app here.</p>,\n\t\t\t}}\n\t\t/>\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","createTabsScope","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","jsxs","DiscordCTA","DiscordPosts","data","useLoaderData","ctaLink","useDiscordCTALink","altDown","useAltDown","useIsOnline","React.Suspense","Loading","Await","posts","post","DiscordPost","Link","e","Icon","thread","reactionsWithCounts","t","Emoji","i","name","url","Playground","playgroundAppInfo","inBrowserBrowserRef","problemAppName","allApps","isUpToDate","PlaygroundWindow","SimpleTooltip","showToast","Preview","SetAppToPlayground","tabs","isValidPreview","s","Boolean","includes","withParam","searchParams","newSearchParams","URLSearchParams","delete","set","ExercisePartRoute","useSearchParams","preview","get","useRef","navigate","useNavigate","shouldHideTab","tab","ENV","EPICSHOP_DEPLOYED","playground","test","type","dev","stackBlitzUrl","activeTab","find","altDiffUrl","app1","problem","app2","solution","handleDiffTabClick","altKey","ctrlKey","shiftKey","metaKey","preventDefault","className","map","hidden","asChild","clsx","preventScrollReset","prefetch","onClick","to","appInfo","Tests","Diff","diff","ErrorBoundary","GeneralErrorBoundary","statusHandlers"],"mappings":"ylCAcA,IAAIA,EAAc,gCACdC,GAAgB,CAAE,QAAS,GAAO,WAAY,EAAM,EACpDC,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,EAAgB,WACrC,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,EAAgB,WAAC,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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AAAA,EAAKiE,UAALjE,YAAAA,EAAcqB,KAC9BM,QAAS3B,EAAK2B,QACdC,aAAY5B,EAAAA,EAAKwD,aAALxD,YAAAA,EAAiB4B,aAAc,EAC5C,CAAA,EACD,EACAxJ,EAAA,IAACkF,EAAA,CACAO,MAAM,OACN6G,UAAU,iGAEVpJ,eAAC+J,GAAK,CAAAC,KAAMtF,EAAKsF,KAAM3D,QAAS3B,EAAK2B,OAAS,CAAA,EAC/C,EACAvJ,EAAA,IAACkF,EAAA,CACAO,MAAM,OACN6G,UAAU,iGAEVpJ,eAACsE,GAAY,CAAA,CAAA,CAAA,CACd,CAAA,CACD,CAAA,CAAA,CAAA,CACD,CAEF,CAEO,SAAS2F,IAAgB,CAE9B,OAAAnN,EAAAA,IAACoN,GAAA,CACAC,eAAgB,CACf,IAAK,IAAOrN,EAAA,IAAA,IAAA,CAAEkD,SAAoC,sCAAA,CAAA,CACnD,CAAA,CACD,CAEF","x_google_ignoreList":[0,1]}
1
+ {"version":3,"file":"index-DPHVg8Eh.js","sources":["../../../../../node_modules/@radix-ui/react-roving-focus/dist/index.mjs","../../../../../node_modules/@radix-ui/react-tabs/dist/index.mjs","../../../app/routes/_app+/exercise+/$exerciseNumber_.$stepNumber.$type+/__shared/discord.tsx","../../../app/routes/_app+/exercise+/$exerciseNumber_.$stepNumber.$type+/__shared/playground.tsx","../../../app/routes/_app+/exercise+/$exerciseNumber_.$stepNumber.$type+/index.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 { type SerializeFrom } from '@remix-run/node'\nimport { Await, Link, useLoaderData } from '@remix-run/react'\nimport * as React from 'react'\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'\nimport { type loader } from '../index.tsx'\n\nexport function DiscordChat() {\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=\"flex-1 overflow-y-scroll bg-accent pb-4 scrollbar-thin scrollbar-thumb-scrollbar\">\n\t\t\t\t<DiscordPosts />\n\t\t\t</div>\n\t\t</div>\n\t)\n}\n\nfunction DiscordPosts() {\n\tconst data = useLoaderData<typeof loader>()\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={data.discordPostsPromise}\n\t\t\t\t\terrorElement={\n\t\t\t\t\t\t<div className=\"text-red-500\">\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=\"rounded-xl border bg-background 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? (e) => {\n\t\t\t\t\t\t\t\t\te.preventDefault()\n\t\t\t\t\t\t\t\t\twindow.open(\n\t\t\t\t\t\t\t\t\t\te.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({\n\tthread,\n}: {\n\tthread: Awaited<SerializeFrom<typeof loader>['discordPostsPromise']>[number]\n}) {\n\tconst reactionsWithCounts = thread.reactions.filter((r) => r.count)\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 gap-4\">\n\t\t\t\t\t<div className=\"flex 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((t) => (\n\t\t\t\t\t\t\t\t\t<div\n\t\t\t\t\t\t\t\t\t\tkey={t.name}\n\t\t\t\t\t\t\t\t\t\tclassName=\"flex items-center justify-center gap-1 rounded-full bg-accent 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={t.emojiName} url={t.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>{t.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 items-start 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=\"flex-1 overflow-ellipsis text-muted-foreground\">\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((r, i) => (\n\t\t\t\t\t\t\t\t\t\t<li\n\t\t\t\t\t\t\t\t\t\t\tkey={i}\n\t\t\t\t\t\t\t\t\t\t\tclassName=\"flex items-center gap-1 rounded-md border border-blue-600 bg-blue-500/20 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 name={r.emojiName} url={r.emojiUrl} />\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>{r.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 { toast as showToast } from 'sonner'\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>\n\t\t\t\t\t<div className=\"text-foreground-secondary flex h-full items-center justify-center text-2xl\">\n\t\t\t\t\t\tNon-UI playground\n\t\t\t\t\t</div>\n\t\t\t\t\t<div>\n\t\t\t\t\t\t<div className=\"text-foreground-secondary flex flex-wrap gap-1 text-center\">\n\t\t\t\t\t\t\tNavigate to{' '}\n\t\t\t\t\t\t\t<SimpleTooltip content={playgroundAppInfo.fullPath}>\n\t\t\t\t\t\t\t\t<span\n\t\t\t\t\t\t\t\t\tclassName=\"underline\"\n\t\t\t\t\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\t\t\t\t\tvoid navigator.clipboard.writeText(\n\t\t\t\t\t\t\t\t\t\t\tplaygroundAppInfo.fullPath,\n\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\tshowToast.success('Copied playground path to clipboard')\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\t\tthe playground directory\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t</SimpleTooltip>{' '}\n\t\t\t\t\t\t\tin your editor and terminal to work on this exercise!\n\t\t\t\t\t\t</div>\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","import {\n\tgetAppByName,\n\tgetAppDisplayName,\n\tgetApps,\n\tgetExerciseApp,\n\tisExerciseStepApp,\n\tisPlaygroundApp,\n\trequireExerciseApp,\n\ttype App,\n\ttype ExerciseStepApp,\n} from '@epic-web/workshop-utils/apps.server'\nimport { compileMarkdownString } from '@epic-web/workshop-utils/compile-mdx.server'\nimport { getDiffCode } from '@epic-web/workshop-utils/diff.server'\nimport { userHasAccessToWorkshop } from '@epic-web/workshop-utils/epic-api.server'\nimport {\n\tcombineServerTimings,\n\tgetServerTimeHeader,\n\tmakeTimings,\n} from '@epic-web/workshop-utils/timing.server'\nimport * as Tabs from '@radix-ui/react-tabs'\nimport {\n\tunstable_data as data,\n\tredirect,\n\ttype HeadersFunction,\n\ttype LoaderFunctionArgs,\n} from '@remix-run/node'\nimport {\n\tLink,\n\tuseLoaderData,\n\tuseNavigate,\n\tuseSearchParams,\n} from '@remix-run/react'\nimport { clsx } from 'clsx'\nimport * as React from 'react'\nimport { useRef } from 'react'\nimport { Diff } from '#app/components/diff.tsx'\nimport { GeneralErrorBoundary } from '#app/components/error-boundary.tsx'\nimport { type InBrowserBrowserRef } from '#app/components/in-browser-browser.tsx'\nimport { useAltDown } from '#app/utils/misc.tsx'\nimport { fetchDiscordPosts } from './__shared/discord.server.ts'\nimport { DiscordChat } from './__shared/discord.tsx'\nimport { Playground } from './__shared/playground.tsx'\nimport { Preview } from './__shared/preview.tsx'\nimport { Tests } from './__shared/tests.tsx'\nimport { getAppRunningState } from './__shared/utils.tsx'\n\nexport async function loader({ request, params }: LoaderFunctionArgs) {\n\tconst timings = makeTimings('exerciseStepTypeIndexLoader')\n\tconst userHasAccess = await userHasAccessToWorkshop({\n\t\trequest,\n\t\ttimings,\n\t})\n\tconst searchParams = new URL(request.url).searchParams\n\tconst cacheOptions = { request, timings }\n\tconst exerciseStepApp = await requireExerciseApp(params, cacheOptions)\n\tconst reqUrl = new URL(request.url)\n\n\tconst pathnameParam = reqUrl.searchParams.get('pathname')\n\tif (pathnameParam === '' || pathnameParam === '/') {\n\t\treqUrl.searchParams.delete('pathname')\n\t\tthrow redirect(reqUrl.toString())\n\t}\n\n\tconst problemApp = await getExerciseApp(\n\t\t{ ...params, type: 'problem' },\n\t\tcacheOptions,\n\t)\n\tconst solutionApp = await getExerciseApp(\n\t\t{ ...params, type: 'solution' },\n\t\tcacheOptions,\n\t)\n\n\tif (!problemApp && !solutionApp) {\n\t\tthrow new Response('Not found', { status: 404 })\n\t}\n\n\tconst allAppsFull = await getApps(cacheOptions)\n\tconst playgroundApp = allAppsFull.find(isPlaygroundApp)\n\n\tconst app1Name = reqUrl.searchParams.get('app1')\n\tconst app2Name = reqUrl.searchParams.get('app2')\n\tconst app1 = app1Name\n\t\t? await getAppByName(app1Name)\n\t\t: playgroundApp || problemApp\n\tconst app2 = app2Name ? await getAppByName(app2Name) : solutionApp\n\n\tfunction getStepId(a: ExerciseStepApp) {\n\t\treturn (\n\t\t\ta.exerciseNumber * 1000 +\n\t\t\ta.stepNumber * 10 +\n\t\t\t(a.type === 'problem' ? 0 : 1)\n\t\t)\n\t}\n\n\tfunction getStepNameAndId(a: App) {\n\t\tif (isExerciseStepApp(a)) {\n\t\t\tconst exerciseNumberStr = String(a.exerciseNumber).padStart(2, '0')\n\t\t\tconst stepNumberStr = String(a.stepNumber).padStart(2, '0')\n\n\t\t\treturn {\n\t\t\t\tstepName: `${exerciseNumberStr}/${stepNumberStr}.${a.type}`,\n\t\t\t\tstepId: getStepId(a),\n\t\t\t}\n\t\t}\n\t\treturn { stepName: '', stepId: -1 }\n\t}\n\n\tconst allApps = allAppsFull\n\t\t.filter((a, i, ar) => ar.findIndex((b) => a.name === b.name) === i)\n\t\t.map((a) => ({\n\t\t\tdisplayName: getAppDisplayName(a, allAppsFull),\n\t\t\tname: a.name,\n\t\t\ttitle: a.title,\n\t\t\ttype: a.type,\n\t\t\t...getStepNameAndId(a),\n\t\t}))\n\n\tallApps.sort((a, b) => {\n\t\t// order them by their stepId\n\t\tif (a.stepId > 0 && b.stepId > 0) return a.stepId - b.stepId\n\n\t\t// non-step apps should come after step apps\n\t\tif (a.stepId > 0) return -1\n\t\tif (b.stepId > 0) return 1\n\n\t\treturn 0\n\t})\n\n\tasync function getDiffProp() {\n\t\tif (!app1 || !app2) {\n\t\t\treturn {\n\t\t\t\tapp1: app1?.name,\n\t\t\t\tapp2: app2?.name,\n\t\t\t\tdiffCode: null,\n\t\t\t}\n\t\t}\n\t\tif (!userHasAccess) {\n\t\t\treturn {\n\t\t\t\tapp1: app1?.name,\n\t\t\t\tapp2: app2?.name,\n\t\t\t\tdiffCode: await compileMarkdownString(\n\t\t\t\t\t`<h1>Access Denied</h1><p>You must login or register for the workshop to view the diff</p>`,\n\t\t\t\t),\n\t\t\t}\n\t\t}\n\t\tconst diffCode = await getDiffCode(app1, app2, {\n\t\t\t...cacheOptions,\n\t\t\tforceFresh: searchParams.get('forceFresh') === 'diff',\n\t\t}).catch((e) => {\n\t\t\tconsole.error(e)\n\t\t\treturn null\n\t\t})\n\t\treturn {\n\t\t\tapp1: app1.name,\n\t\t\tapp2: app2.name,\n\t\t\tdiffCode,\n\t\t}\n\t}\n\n\treturn data(\n\t\t{\n\t\t\ttype: params.type as 'problem' | 'solution',\n\t\t\texerciseStepApp,\n\t\t\tallApps,\n\t\t\t// defer this promise so that we don't block the response from being sent\n\t\t\tdiscordPostsPromise: fetchDiscordPosts({ request }),\n\t\t\tplayground: playgroundApp\n\t\t\t\t? ({\n\t\t\t\t\t\ttype: 'playground',\n\t\t\t\t\t\tfullPath: playgroundApp.fullPath,\n\t\t\t\t\t\tdev: playgroundApp.dev,\n\t\t\t\t\t\ttest: playgroundApp.test,\n\t\t\t\t\t\ttitle: playgroundApp.title,\n\t\t\t\t\t\tname: playgroundApp.name,\n\t\t\t\t\t\tappName: playgroundApp.appName,\n\t\t\t\t\t\tisUpToDate: playgroundApp.isUpToDate,\n\t\t\t\t\t\tstackBlitzUrl: playgroundApp.stackBlitzUrl,\n\t\t\t\t\t\t...(await getAppRunningState(playgroundApp)),\n\t\t\t\t\t} as const)\n\t\t\t\t: null,\n\t\t\tproblem: problemApp\n\t\t\t\t? ({\n\t\t\t\t\t\ttype: 'problem',\n\t\t\t\t\t\tfullPath: problemApp.fullPath,\n\t\t\t\t\t\tdev: problemApp.dev,\n\t\t\t\t\t\ttest: problemApp.test,\n\t\t\t\t\t\ttitle: problemApp.title,\n\t\t\t\t\t\tname: problemApp.name,\n\t\t\t\t\t\tstackBlitzUrl: problemApp.stackBlitzUrl,\n\t\t\t\t\t\t...(await getAppRunningState(problemApp)),\n\t\t\t\t\t} as const)\n\t\t\t\t: null,\n\t\t\tsolution: solutionApp\n\t\t\t\t? ({\n\t\t\t\t\t\ttype: 'solution',\n\t\t\t\t\t\tfullPath: solutionApp.fullPath,\n\t\t\t\t\t\tdev: solutionApp.dev,\n\t\t\t\t\t\ttest: solutionApp.test,\n\t\t\t\t\t\ttitle: solutionApp.title,\n\t\t\t\t\t\tname: solutionApp.name,\n\t\t\t\t\t\tstackBlitzUrl: solutionApp.stackBlitzUrl,\n\t\t\t\t\t\t...(await getAppRunningState(solutionApp)),\n\t\t\t\t\t} as const)\n\t\t\t\t: null,\n\t\t\tdiff: getDiffProp(),\n\t\t} as const,\n\t\t{\n\t\t\theaders: {\n\t\t\t\t'Server-Timing': getServerTimeHeader(timings),\n\t\t\t},\n\t\t},\n\t)\n}\n\nexport const headers: HeadersFunction = ({ loaderHeaders, parentHeaders }) => {\n\tconst headers = {\n\t\t'Server-Timing': combineServerTimings(loaderHeaders, parentHeaders),\n\t}\n\treturn headers\n}\n\nconst tabs = [\n\t'playground',\n\t'problem',\n\t'solution',\n\t'tests',\n\t'diff',\n\t'chat',\n] as const\nconst isValidPreview = (s: string | null): s is (typeof tabs)[number] =>\n\tBoolean(s && tabs.includes(s as (typeof tabs)[number]))\n\nfunction withParam(\n\tsearchParams: URLSearchParams,\n\tkey: string,\n\tvalue: string | null,\n) {\n\tconst newSearchParams = new URLSearchParams(searchParams)\n\tif (value === null) {\n\t\tnewSearchParams.delete(key)\n\t} else {\n\t\tnewSearchParams.set(key, value)\n\t}\n\treturn newSearchParams\n}\n\nexport default function ExercisePartRoute() {\n\tconst data = useLoaderData<typeof loader>()\n\tconst [searchParams] = useSearchParams()\n\n\tconst preview = searchParams.get('preview')\n\tconst inBrowserBrowserRef = useRef<InBrowserBrowserRef>(null)\n\n\tconst altDown = useAltDown()\n\tconst navigate = useNavigate()\n\n\tfunction shouldHideTab(tab: (typeof tabs)[number]) {\n\t\tif (tab === 'tests') {\n\t\t\treturn (\n\t\t\t\tENV.EPICSHOP_DEPLOYED ||\n\t\t\t\t!data.playground ||\n\t\t\t\tdata.playground.test.type === 'none'\n\t\t\t)\n\t\t}\n\t\tif (tab === 'problem' || tab === 'solution') {\n\t\t\tif (data[tab]?.dev.type === 'none') return true\n\t\t\tif (ENV.EPICSHOP_DEPLOYED) {\n\t\t\t\treturn data[tab]?.dev.type !== 'browser' && !data[tab]?.stackBlitzUrl\n\t\t\t}\n\t\t}\n\t\tif (tab === 'playground' && ENV.EPICSHOP_DEPLOYED) return true\n\t\treturn false\n\t}\n\n\tconst activeTab = isValidPreview(preview)\n\t\t? preview\n\t\t: tabs.find((t) => !shouldHideTab(t))\n\n\t// when alt is held down, the diff tab should open to the full-page diff view\n\t// between the problem and solution (this is more for the instructor than the student)\n\tconst altDiffUrl = `/diff?${new URLSearchParams({\n\t\tapp1: data.problem?.name ?? '',\n\t\tapp2: data.solution?.name ?? '',\n\t})}`\n\n\tfunction handleDiffTabClick(event: React.MouseEvent<HTMLAnchorElement>) {\n\t\tif (event.altKey && !event.ctrlKey && !event.shiftKey && !event.metaKey) {\n\t\t\tevent.preventDefault()\n\t\t\tnavigate(altDiffUrl)\n\t\t}\n\t}\n\n\treturn (\n\t\t<Tabs.Root\n\t\t\tclassName=\"relative flex flex-col overflow-y-auto sm:col-span-1 sm:row-span-1\"\n\t\t\tvalue={activeTab}\n\t\t\t// intentionally no onValueChange here because the Link will trigger the\n\t\t\t// change.\n\t\t>\n\t\t\t<Tabs.List className=\"h-14 min-h-14 overflow-x-hidden border-b scrollbar-thin scrollbar-thumb-scrollbar\">\n\t\t\t\t{tabs.map((tab) => {\n\t\t\t\t\tconst hidden = shouldHideTab(tab)\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<Tabs.Trigger key={tab} value={tab} hidden={hidden} asChild>\n\t\t\t\t\t\t\t<Link\n\t\t\t\t\t\t\t\tid={`${tab}-tab`}\n\t\t\t\t\t\t\t\tclassName={clsx(\n\t\t\t\t\t\t\t\t\t'clip-path-button relative h-full px-6 py-4 font-mono text-sm uppercase outline-none 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',\n\t\t\t\t\t\t\t\t\thidden ? 'hidden' : 'inline-block',\n\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\tpreventScrollReset\n\t\t\t\t\t\t\t\tprefetch=\"intent\"\n\t\t\t\t\t\t\t\tonClick={handleDiffTabClick}\n\t\t\t\t\t\t\t\tto={\n\t\t\t\t\t\t\t\t\ttab === 'diff' && altDown\n\t\t\t\t\t\t\t\t\t\t? altDiffUrl\n\t\t\t\t\t\t\t\t\t\t: `?${withParam(\n\t\t\t\t\t\t\t\t\t\t\t\tsearchParams,\n\t\t\t\t\t\t\t\t\t\t\t\t'preview',\n\t\t\t\t\t\t\t\t\t\t\t\ttab === 'playground' ? null : tab,\n\t\t\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>\n\t\t\t\t\t\t\t\t{tab}\n\t\t\t\t\t\t\t</Link>\n\t\t\t\t\t\t</Tabs.Trigger>\n\t\t\t\t\t)\n\t\t\t\t})}\n\t\t\t</Tabs.List>\n\t\t\t<div className=\"relative z-10 flex min-h-96 flex-grow flex-col overflow-y-auto\">\n\t\t\t\t<Tabs.Content\n\t\t\t\t\tvalue=\"playground\"\n\t\t\t\t\tclassName=\"flex w-full flex-grow items-center justify-center self-start radix-state-inactive:hidden\"\n\t\t\t\t\tforceMount\n\t\t\t\t>\n\t\t\t\t\t<Playground\n\t\t\t\t\t\tappInfo={data.playground}\n\t\t\t\t\t\tproblemAppName={data.problem?.name}\n\t\t\t\t\t\tinBrowserBrowserRef={inBrowserBrowserRef}\n\t\t\t\t\t\tallApps={data.allApps}\n\t\t\t\t\t\tisUpToDate={data.playground?.isUpToDate ?? false}\n\t\t\t\t\t/>\n\t\t\t\t</Tabs.Content>\n\t\t\t\t<Tabs.Content\n\t\t\t\t\tvalue=\"problem\"\n\t\t\t\t\tclassName=\"flex w-full flex-grow items-center justify-center self-start radix-state-inactive:hidden\"\n\t\t\t\t\tforceMount\n\t\t\t\t>\n\t\t\t\t\t<Preview\n\t\t\t\t\t\tappInfo={data.problem}\n\t\t\t\t\t\tinBrowserBrowserRef={inBrowserBrowserRef}\n\t\t\t\t\t/>\n\t\t\t\t</Tabs.Content>\n\t\t\t\t<Tabs.Content\n\t\t\t\t\tvalue=\"solution\"\n\t\t\t\t\tclassName=\"flex w-full flex-grow items-center justify-center self-start radix-state-inactive:hidden\"\n\t\t\t\t\tforceMount\n\t\t\t\t>\n\t\t\t\t\t<Preview\n\t\t\t\t\t\tappInfo={data.solution}\n\t\t\t\t\t\tinBrowserBrowserRef={inBrowserBrowserRef}\n\t\t\t\t\t/>\n\t\t\t\t</Tabs.Content>\n\t\t\t\t<Tabs.Content\n\t\t\t\t\tvalue=\"tests\"\n\t\t\t\t\tclassName=\"flex w-full flex-grow items-start justify-center self-start overflow-hidden radix-state-inactive:hidden\"\n\t\t\t\t>\n\t\t\t\t\t<Tests\n\t\t\t\t\t\tappInfo={data.playground}\n\t\t\t\t\t\tproblemAppName={data.problem?.name}\n\t\t\t\t\t\tallApps={data.allApps}\n\t\t\t\t\t\tisUpToDate={data.playground?.isUpToDate ?? false}\n\t\t\t\t\t/>\n\t\t\t\t</Tabs.Content>\n\t\t\t\t<Tabs.Content\n\t\t\t\t\tvalue=\"diff\"\n\t\t\t\t\tclassName=\"flex h-full w-full flex-grow items-start justify-center self-start radix-state-inactive:hidden\"\n\t\t\t\t>\n\t\t\t\t\t<Diff diff={data.diff} allApps={data.allApps} />\n\t\t\t\t</Tabs.Content>\n\t\t\t\t<Tabs.Content\n\t\t\t\t\tvalue=\"chat\"\n\t\t\t\t\tclassName=\"flex h-full w-full flex-grow items-start justify-center self-start radix-state-inactive:hidden\"\n\t\t\t\t>\n\t\t\t\t\t<DiscordChat />\n\t\t\t\t</Tabs.Content>\n\t\t\t</div>\n\t\t</Tabs.Root>\n\t)\n}\n\nexport function ErrorBoundary() {\n\treturn (\n\t\t<GeneralErrorBoundary\n\t\t\tstatusHandlers={{\n\t\t\t\t404: () => <p>Sorry, we couldn't find an app here.</p>,\n\t\t\t}}\n\t\t/>\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","createTabsScope","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","jsxs","DiscordCTA","DiscordPosts","data","useLoaderData","ctaLink","useDiscordCTALink","altDown","useAltDown","useIsOnline","React.Suspense","Loading","Await","posts","post","DiscordPost","Link","e","Icon","thread","reactionsWithCounts","t","Emoji","i","name","url","Playground","playgroundAppInfo","inBrowserBrowserRef","problemAppName","allApps","isUpToDate","PlaygroundWindow","SimpleTooltip","showToast","Preview","SetAppToPlayground","tabs","isValidPreview","s","Boolean","includes","withParam","searchParams","newSearchParams","URLSearchParams","delete","set","ExercisePartRoute","useSearchParams","preview","get","useRef","navigate","useNavigate","shouldHideTab","tab","ENV","EPICSHOP_DEPLOYED","playground","test","type","dev","stackBlitzUrl","activeTab","find","altDiffUrl","app1","problem","app2","solution","handleDiffTabClick","altKey","ctrlKey","shiftKey","metaKey","preventDefault","className","map","hidden","asChild","clsx","preventScrollReset","prefetch","onClick","to","appInfo","Tests","Diff","diff","ErrorBoundary","GeneralErrorBoundary","statusHandlers"],"mappings":"ylCAcA,IAAIA,EAAc,gCACdC,GAAgB,CAAE,QAAS,GAAO,WAAY,EAAM,EACpDC,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,EAAgB,WACrC,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,CA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,EAAA,IAACkF,EAAA,CACAO,MAAM,WACN6G,UAAU,2FACVzF,WAAU,GAEV3D,SAAAlD,EAAA,IAAC4J,EAAA,CACAmD,QAASnF,EAAKmE,SACd1C,oBAAAA,CACD,CAAA,EACD,EACArJ,EAAA,IAACkF,EAAA,CACAO,MAAM,QACN6G,UAAU,0GAEVpJ,SAAAlD,EAAA,IAACgN,GAAA,CACAD,QAASnF,EAAKwD,WACd9B,gBAAgB1B,EAAAA,EAAKiE,UAALjE,YAAAA,EAAcqB,KAC9BM,QAAS3B,EAAK2B,QACdC,aAAY5B,EAAAA,EAAKwD,aAALxD,YAAAA,EAAiB4B,aAAc,EAC5C,CAAA,EACD,EACAxJ,EAAA,IAACkF,EAAA,CACAO,MAAM,OACN6G,UAAU,iGAEVpJ,eAAC+J,GAAK,CAAAC,KAAMtF,EAAKsF,KAAM3D,QAAS3B,EAAK2B,OAAS,CAAA,EAC/C,EACAvJ,EAAA,IAACkF,EAAA,CACAO,MAAM,OACN6G,UAAU,iGAEVpJ,eAACsE,GAAY,CAAA,CAAA,CAAA,CACd,CAAA,CACD,CAAA,CAAA,CAAA,CACD,CAEF,CAEO,SAAS2F,IAAgB,CAE9B,OAAAnN,EAAAA,IAACoN,GAAA,CACAC,eAAgB,CACf,IAAK,IAAOrN,EAAA,IAAA,IAAA,CAAEkD,SAAoC,sCAAA,CAAA,CACnD,CAAA,CACD,CAEF","x_google_ignoreList":[0,1]}
@@ -0,0 +1,3 @@
1
+ import{_ as a,l as o,K as p,e as s,L as m}from"./mermaid.core-q9C-HfFu.js";import{p as n}from"./radar-MK3ICKWK-CENXhI0E.js";import"./mdx-C7imFHZE.js";import"./index-Dsusf_Av.js";import"./misc-2sBiisF5.js";import"./components-5arJTWsS.js";import"./epic-video-CmlkW6Rw.js";import"./index-DLC5u33j.js";import"./tooltip-Bzd6O8vq.js";import"./pe-BShc2dvc.js";import"./online-DZKJk3C2.js";import"./loading-b1FV2pQh.js";import"./user-DNSnhqGn.js";import"./workshop-config-DchzGYJM.js";import"./progress-bar-DgnkQxQw.js";import"./_baseUniq-BOjGYEEK.js";import"./_basePickBy-lB0X5x6U.js";import"./clone-Bj8ANPCv.js";var g={parse:a(async r=>{const t=await n("info",r);o.debug(t)},"parse")},v={version:m.version},d=a(()=>v.version,"getVersion"),c={getVersion:d},l=a((r,t,i)=>{o.debug(`rendering info diagram
2
+ `+r);const e=p(t);s(e,100,400,!0),e.append("g").append("text").attr("x",100).attr("y",40).attr("class","version").attr("font-size",32).style("text-anchor","middle").text(`v${i}`)},"draw"),f={draw:l},N={parser:g,db:c,renderer:f};export{N as diagram};
3
+ //# sourceMappingURL=infoDiagram-PH2N3AL5-D-nEozcT.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"infoDiagram-PH2N3AL5-x87RxSs8.js","sources":["../../../../../node_modules/mermaid/dist/chunks/mermaid.core/infoDiagram-PH2N3AL5.mjs"],"sourcesContent":["import {\n package_default\n} from \"./chunk-5NNNAHNI.mjs\";\nimport {\n selectSvgElement\n} from \"./chunk-7B677QYD.mjs\";\nimport {\n __name,\n configureSvgSize,\n log\n} from \"./chunk-YTJNT7DU.mjs\";\n\n// src/diagrams/info/infoParser.ts\nimport { parse } from \"@mermaid-js/parser\";\nvar parser = {\n parse: /* @__PURE__ */ __name(async (input) => {\n const ast = await parse(\"info\", input);\n log.debug(ast);\n }, \"parse\")\n};\n\n// src/diagrams/info/infoDb.ts\nvar DEFAULT_INFO_DB = { version: package_default.version };\nvar getVersion = /* @__PURE__ */ __name(() => DEFAULT_INFO_DB.version, \"getVersion\");\nvar db = {\n getVersion\n};\n\n// src/diagrams/info/infoRenderer.ts\nvar draw = /* @__PURE__ */ __name((text, id, version) => {\n log.debug(\"rendering info diagram\\n\" + text);\n const svg = selectSvgElement(id);\n configureSvgSize(svg, 100, 400, true);\n const group = svg.append(\"g\");\n group.append(\"text\").attr(\"x\", 100).attr(\"y\", 40).attr(\"class\", \"version\").attr(\"font-size\", 32).style(\"text-anchor\", \"middle\").text(`v${version}`);\n}, \"draw\");\nvar renderer = { draw };\n\n// src/diagrams/info/infoDiagram.ts\nvar diagram = {\n parser,\n db,\n renderer\n};\nexport {\n diagram\n};\n"],"names":["parser","__name","input","ast","parse","log","DEFAULT_INFO_DB","package_default","getVersion","db","draw","text","id","version","svg","selectSvgElement","configureSvgSize","renderer","diagram"],"mappings":"+lBAcA,IAAIA,EAAS,CACX,MAAuBC,EAAO,MAAOC,GAAU,CAC7C,MAAMC,EAAM,MAAMC,EAAM,OAAQF,CAAK,EACrCG,EAAI,MAAMF,CAAG,CACjB,EAAK,OAAO,CACZ,EAGIG,EAAkB,CAAE,QAASC,EAAgB,OAAS,EACtDC,EAA6BP,EAAO,IAAMK,EAAgB,QAAS,YAAY,EAC/EG,EAAK,CACP,WAAAD,CACF,EAGIE,EAAuBT,EAAO,CAACU,EAAMC,EAAIC,IAAY,CACvDR,EAAI,MAAM;AAAA,EAA6BM,CAAI,EAC3C,MAAMG,EAAMC,EAAiBH,CAAE,EAC/BI,EAAiBF,EAAK,IAAK,IAAK,EAAI,EACtBA,EAAI,OAAO,GAAG,EACtB,OAAO,MAAM,EAAE,KAAK,IAAK,GAAG,EAAE,KAAK,IAAK,EAAE,EAAE,KAAK,QAAS,SAAS,EAAE,KAAK,YAAa,EAAE,EAAE,MAAM,cAAe,QAAQ,EAAE,KAAK,IAAID,CAAO,EAAE,CACpJ,EAAG,MAAM,EACLI,EAAW,CAAE,KAAAP,CAAM,EAGnBQ,EAAU,CACZ,OAAAlB,EACA,GAAAS,EACA,SAAAQ,CACF","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"infoDiagram-PH2N3AL5-D-nEozcT.js","sources":["../../../../../node_modules/mermaid/dist/chunks/mermaid.core/infoDiagram-PH2N3AL5.mjs"],"sourcesContent":["import {\n package_default\n} from \"./chunk-5NNNAHNI.mjs\";\nimport {\n selectSvgElement\n} from \"./chunk-7B677QYD.mjs\";\nimport {\n __name,\n configureSvgSize,\n log\n} from \"./chunk-YTJNT7DU.mjs\";\n\n// src/diagrams/info/infoParser.ts\nimport { parse } from \"@mermaid-js/parser\";\nvar parser = {\n parse: /* @__PURE__ */ __name(async (input) => {\n const ast = await parse(\"info\", input);\n log.debug(ast);\n }, \"parse\")\n};\n\n// src/diagrams/info/infoDb.ts\nvar DEFAULT_INFO_DB = { version: package_default.version };\nvar getVersion = /* @__PURE__ */ __name(() => DEFAULT_INFO_DB.version, \"getVersion\");\nvar db = {\n getVersion\n};\n\n// src/diagrams/info/infoRenderer.ts\nvar draw = /* @__PURE__ */ __name((text, id, version) => {\n log.debug(\"rendering info diagram\\n\" + text);\n const svg = selectSvgElement(id);\n configureSvgSize(svg, 100, 400, true);\n const group = svg.append(\"g\");\n group.append(\"text\").attr(\"x\", 100).attr(\"y\", 40).attr(\"class\", \"version\").attr(\"font-size\", 32).style(\"text-anchor\", \"middle\").text(`v${version}`);\n}, \"draw\");\nvar renderer = { draw };\n\n// src/diagrams/info/infoDiagram.ts\nvar diagram = {\n parser,\n db,\n renderer\n};\nexport {\n diagram\n};\n"],"names":["parser","__name","input","ast","parse","log","DEFAULT_INFO_DB","package_default","getVersion","db","draw","text","id","version","svg","selectSvgElement","configureSvgSize","renderer","diagram"],"mappings":"+lBAcA,IAAIA,EAAS,CACX,MAAuBC,EAAO,MAAOC,GAAU,CAC7C,MAAMC,EAAM,MAAMC,EAAM,OAAQF,CAAK,EACrCG,EAAI,MAAMF,CAAG,CACjB,EAAK,OAAO,CACZ,EAGIG,EAAkB,CAAE,QAASC,EAAgB,OAAS,EACtDC,EAA6BP,EAAO,IAAMK,EAAgB,QAAS,YAAY,EAC/EG,EAAK,CACP,WAAAD,CACF,EAGIE,EAAuBT,EAAO,CAACU,EAAMC,EAAIC,IAAY,CACvDR,EAAI,MAAM;AAAA,EAA6BM,CAAI,EAC3C,MAAMG,EAAMC,EAAiBH,CAAE,EAC/BI,EAAiBF,EAAK,IAAK,IAAK,EAAI,EACtBA,EAAI,OAAO,GAAG,EACtB,OAAO,MAAM,EAAE,KAAK,IAAK,GAAG,EAAE,KAAK,IAAK,EAAE,EAAE,KAAK,QAAS,SAAS,EAAE,KAAK,YAAa,EAAE,EAAE,MAAM,cAAe,QAAQ,EAAE,KAAK,IAAID,CAAO,EAAE,CACpJ,EAAG,MAAM,EACLI,EAAW,CAAE,KAAAP,CAAM,EAGnBQ,EAAU,CACZ,OAAAlB,EACA,GAAAS,EACA,SAAAQ,CACF","x_google_ignoreList":[0]}
@@ -1,4 +1,4 @@
1
- import{a as ft,g as at,f as gt,d as mt}from"./chunk-D6G4REZN-EQ3R8OZx.js";import{_ as s,g as xt,s as kt,a as _t,b as vt,t as bt,q as wt,c as A,d as W,e as Tt,z as St}from"./mermaid.core-ZaxoMXOj.js";import{d as tt}from"./arc-rF8TbXNV.js";import"./mdx-Dfsh6Vjk.js";import"./index-Dsusf_Av.js";import"./misc-2sBiisF5.js";import"./components-5arJTWsS.js";import"./epic-video-DN9DRRHf.js";import"./index-CEP3Xxa0.js";import"./tooltip-Bzd6O8vq.js";import"./pe-BShc2dvc.js";import"./online-IWqRB9zP.js";import"./loading-BPTYJOXN.js";import"./user-DNSnhqGn.js";import"./workshop-config-DchzGYJM.js";import"./progress-bar-DgnkQxQw.js";var H=function(){var t=s(function(g,r,a,l){for(a=a||{},l=g.length;l--;a[g[l]]=r);return a},"o"),e=[6,8,10,11,12,14,16,17,18],n=[1,9],c=[1,10],i=[1,11],u=[1,12],h=[1,13],p=[1,14],d={trace:s(function(){},"trace"),yy:{},symbols_:{error:2,start:3,journey:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,title:11,acc_title:12,acc_title_value:13,acc_descr:14,acc_descr_value:15,acc_descr_multiline_value:16,section:17,taskName:18,taskData:19,$accept:0,$end:1},terminals_:{2:"error",4:"journey",6:"EOF",8:"SPACE",10:"NEWLINE",11:"title",12:"acc_title",13:"acc_title_value",14:"acc_descr",15:"acc_descr_value",16:"acc_descr_multiline_value",17:"section",18:"taskName",19:"taskData"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,2]],performAction:s(function(r,a,l,y,f,o,S){var _=o.length-1;switch(f){case 1:return o[_-1];case 2:this.$=[];break;case 3:o[_-1].push(o[_]),this.$=o[_-1];break;case 4:case 5:this.$=o[_];break;case 6:case 7:this.$=[];break;case 8:y.setDiagramTitle(o[_].substr(6)),this.$=o[_].substr(6);break;case 9:this.$=o[_].trim(),y.setAccTitle(this.$);break;case 10:case 11:this.$=o[_].trim(),y.setAccDescription(this.$);break;case 12:y.addSection(o[_].substr(8)),this.$=o[_].substr(8);break;case 13:y.addTask(o[_-1],o[_]),this.$="task";break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},t(e,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:n,12:c,14:i,16:u,17:h,18:p},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:15,11:n,12:c,14:i,16:u,17:h,18:p},t(e,[2,5]),t(e,[2,6]),t(e,[2,8]),{13:[1,16]},{15:[1,17]},t(e,[2,11]),t(e,[2,12]),{19:[1,18]},t(e,[2,4]),t(e,[2,9]),t(e,[2,10]),t(e,[2,13])],defaultActions:{},parseError:s(function(r,a){if(a.recoverable)this.trace(r);else{var l=new Error(r);throw l.hash=a,l}},"parseError"),parse:s(function(r){var a=this,l=[0],y=[],f=[null],o=[],S=this.table,_="",B=0,J=0,ut=2,K=1,yt=o.slice.call(arguments,1),k=Object.create(this.lexer),E={yy:{}};for(var O in this.yy)Object.prototype.hasOwnProperty.call(this.yy,O)&&(E.yy[O]=this.yy[O]);k.setInput(r,E.yy),E.yy.lexer=k,E.yy.parser=this,typeof k.yylloc>"u"&&(k.yylloc={});var Y=k.yylloc;o.push(Y);var dt=k.options&&k.options.ranges;typeof E.yy.parseError=="function"?this.parseError=E.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function pt(b){l.length=l.length-2*b,f.length=f.length-b,o.length=o.length-b}s(pt,"popStack");function Q(){var b;return b=y.pop()||k.lex()||K,typeof b!="number"&&(b instanceof Array&&(y=b,b=y.pop()),b=a.symbols_[b]||b),b}s(Q,"lex");for(var v,P,w,q,C={},N,$,D,j;;){if(P=l[l.length-1],this.defaultActions[P]?w=this.defaultActions[P]:((v===null||typeof v>"u")&&(v=Q()),w=S[P]&&S[P][v]),typeof w>"u"||!w.length||!w[0]){var G="";j=[];for(N in S[P])this.terminals_[N]&&N>ut&&j.push("'"+this.terminals_[N]+"'");k.showPosition?G="Parse error on line "+(B+1)+`:
1
+ import{a as ft,g as at,f as gt,d as mt}from"./chunk-D6G4REZN-C1e0nCkL.js";import{_ as s,g as xt,s as kt,a as _t,b as vt,t as bt,q as wt,c as A,d as W,e as Tt,z as St}from"./mermaid.core-q9C-HfFu.js";import{d as tt}from"./arc-DmQZ2TPB.js";import"./mdx-C7imFHZE.js";import"./index-Dsusf_Av.js";import"./misc-2sBiisF5.js";import"./components-5arJTWsS.js";import"./epic-video-CmlkW6Rw.js";import"./index-DLC5u33j.js";import"./tooltip-Bzd6O8vq.js";import"./pe-BShc2dvc.js";import"./online-DZKJk3C2.js";import"./loading-b1FV2pQh.js";import"./user-DNSnhqGn.js";import"./workshop-config-DchzGYJM.js";import"./progress-bar-DgnkQxQw.js";var H=function(){var t=s(function(g,r,a,l){for(a=a||{},l=g.length;l--;a[g[l]]=r);return a},"o"),e=[6,8,10,11,12,14,16,17,18],n=[1,9],c=[1,10],i=[1,11],u=[1,12],h=[1,13],p=[1,14],d={trace:s(function(){},"trace"),yy:{},symbols_:{error:2,start:3,journey:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,title:11,acc_title:12,acc_title_value:13,acc_descr:14,acc_descr_value:15,acc_descr_multiline_value:16,section:17,taskName:18,taskData:19,$accept:0,$end:1},terminals_:{2:"error",4:"journey",6:"EOF",8:"SPACE",10:"NEWLINE",11:"title",12:"acc_title",13:"acc_title_value",14:"acc_descr",15:"acc_descr_value",16:"acc_descr_multiline_value",17:"section",18:"taskName",19:"taskData"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,2]],performAction:s(function(r,a,l,y,f,o,S){var _=o.length-1;switch(f){case 1:return o[_-1];case 2:this.$=[];break;case 3:o[_-1].push(o[_]),this.$=o[_-1];break;case 4:case 5:this.$=o[_];break;case 6:case 7:this.$=[];break;case 8:y.setDiagramTitle(o[_].substr(6)),this.$=o[_].substr(6);break;case 9:this.$=o[_].trim(),y.setAccTitle(this.$);break;case 10:case 11:this.$=o[_].trim(),y.setAccDescription(this.$);break;case 12:y.addSection(o[_].substr(8)),this.$=o[_].substr(8);break;case 13:y.addTask(o[_-1],o[_]),this.$="task";break}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},t(e,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:n,12:c,14:i,16:u,17:h,18:p},t(e,[2,7],{1:[2,1]}),t(e,[2,3]),{9:15,11:n,12:c,14:i,16:u,17:h,18:p},t(e,[2,5]),t(e,[2,6]),t(e,[2,8]),{13:[1,16]},{15:[1,17]},t(e,[2,11]),t(e,[2,12]),{19:[1,18]},t(e,[2,4]),t(e,[2,9]),t(e,[2,10]),t(e,[2,13])],defaultActions:{},parseError:s(function(r,a){if(a.recoverable)this.trace(r);else{var l=new Error(r);throw l.hash=a,l}},"parseError"),parse:s(function(r){var a=this,l=[0],y=[],f=[null],o=[],S=this.table,_="",B=0,J=0,ut=2,K=1,yt=o.slice.call(arguments,1),k=Object.create(this.lexer),E={yy:{}};for(var O in this.yy)Object.prototype.hasOwnProperty.call(this.yy,O)&&(E.yy[O]=this.yy[O]);k.setInput(r,E.yy),E.yy.lexer=k,E.yy.parser=this,typeof k.yylloc>"u"&&(k.yylloc={});var Y=k.yylloc;o.push(Y);var dt=k.options&&k.options.ranges;typeof E.yy.parseError=="function"?this.parseError=E.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function pt(b){l.length=l.length-2*b,f.length=f.length-b,o.length=o.length-b}s(pt,"popStack");function Q(){var b;return b=y.pop()||k.lex()||K,typeof b!="number"&&(b instanceof Array&&(y=b,b=y.pop()),b=a.symbols_[b]||b),b}s(Q,"lex");for(var v,P,w,q,C={},N,$,D,j;;){if(P=l[l.length-1],this.defaultActions[P]?w=this.defaultActions[P]:((v===null||typeof v>"u")&&(v=Q()),w=S[P]&&S[P][v]),typeof w>"u"||!w.length||!w[0]){var G="";j=[];for(N in S[P])this.terminals_[N]&&N>ut&&j.push("'"+this.terminals_[N]+"'");k.showPosition?G="Parse error on line "+(B+1)+`:
2
2
  `+k.showPosition()+`
3
3
  Expecting `+j.join(", ")+", got '"+(this.terminals_[v]||v)+"'":G="Parse error on line "+(B+1)+": Unexpected "+(v==K?"end of input":"'"+(this.terminals_[v]||v)+"'"),this.parseError(G,{text:k.match,token:this.terminals_[v]||v,line:k.yylineno,loc:Y,expected:j})}if(w[0]instanceof Array&&w.length>1)throw new Error("Parse Error: multiple actions possible at state: "+P+", token: "+v);switch(w[0]){case 1:l.push(v),f.push(k.yytext),o.push(k.yylloc),l.push(w[1]),v=null,J=k.yyleng,_=k.yytext,B=k.yylineno,Y=k.yylloc;break;case 2:if($=this.productions_[w[1]][1],C.$=f[f.length-$],C._$={first_line:o[o.length-($||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-($||1)].first_column,last_column:o[o.length-1].last_column},dt&&(C._$.range=[o[o.length-($||1)].range[0],o[o.length-1].range[1]]),q=this.performAction.apply(C,[_,J,B,E.yy,w[1],f,o].concat(yt)),typeof q<"u")return q;$&&(l=l.slice(0,-1*$*2),f=f.slice(0,-1*$),o=o.slice(0,-1*$)),l.push(this.productions_[w[1]][0]),f.push(C.$),o.push(C._$),D=S[l[l.length-2]][l[l.length-1]],l.push(D);break;case 3:return!0}}return!0},"parse")},x=function(){var g={EOF:1,parseError:s(function(a,l){if(this.yy.parser)this.yy.parser.parseError(a,l);else throw new Error(a)},"parseError"),setInput:s(function(r,a){return this.yy=a||this.yy||{},this._input=r,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:s(function(){var r=this._input[0];this.yytext+=r,this.yyleng++,this.offset++,this.match+=r,this.matched+=r;var a=r.match(/(?:\r\n?|\n).*/g);return a?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),r},"input"),unput:s(function(r){var a=r.length,l=r.split(/(?:\r\n?|\n)/g);this._input=r+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-a),this.offset-=a;var y=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),l.length-1&&(this.yylineno-=l.length-1);var f=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:l?(l.length===y.length?this.yylloc.first_column:0)+y[y.length-l.length].length-l[0].length:this.yylloc.first_column-a},this.options.ranges&&(this.yylloc.range=[f[0],f[0]+this.yyleng-a]),this.yyleng=this.yytext.length,this},"unput"),more:s(function(){return this._more=!0,this},"more"),reject:s(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
4
4
  `+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},"reject"),less:s(function(r){this.unput(this.match.slice(r))},"less"),pastInput:s(function(){var r=this.matched.substr(0,this.matched.length-this.match.length);return(r.length>20?"...":"")+r.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:s(function(){var r=this.match;return r.length<20&&(r+=this._input.substr(0,20-r.length)),(r.substr(0,20)+(r.length>20?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:s(function(){var r=this.pastInput(),a=new Array(r.length+1).join("-");return r+this.upcomingInput()+`
@@ -136,4 +136,4 @@ Expecting `+j.join(", ")+", got '"+(this.terminals_[v]||v)+"'":G="Parse error on
136
136
  ${t.actor5?`fill: ${t.actor5}`:""};
137
137
  }
138
138
  `,"getStyles"),Lt=Rt,Z=s(function(t,e){return mt(t,e)},"drawRect"),Bt=s(function(t,e){const c=t.append("circle").attr("cx",e.cx).attr("cy",e.cy).attr("class","face").attr("r",15).attr("stroke-width",2).attr("overflow","visible"),i=t.append("g");i.append("circle").attr("cx",e.cx-15/3).attr("cy",e.cy-15/3).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),i.append("circle").attr("cx",e.cx+15/3).attr("cy",e.cy-15/3).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666");function u(d){const x=tt().startAngle(Math.PI/2).endAngle(3*(Math.PI/2)).innerRadius(7.5).outerRadius(6.8181818181818175);d.append("path").attr("class","mouth").attr("d",x).attr("transform","translate("+e.cx+","+(e.cy+2)+")")}s(u,"smile");function h(d){const x=tt().startAngle(3*Math.PI/2).endAngle(5*(Math.PI/2)).innerRadius(7.5).outerRadius(6.8181818181818175);d.append("path").attr("class","mouth").attr("d",x).attr("transform","translate("+e.cx+","+(e.cy+7)+")")}s(h,"sad");function p(d){d.append("line").attr("class","mouth").attr("stroke",2).attr("x1",e.cx-5).attr("y1",e.cy+7).attr("x2",e.cx+5).attr("y2",e.cy+7).attr("class","mouth").attr("stroke-width","1px").attr("stroke","#666")}return s(p,"ambivalent"),e.score>3?u(i):e.score<3?h(i):p(i),c},"drawFace"),lt=s(function(t,e){const n=t.append("circle");return n.attr("cx",e.cx),n.attr("cy",e.cy),n.attr("class","actor-"+e.pos),n.attr("fill",e.fill),n.attr("stroke",e.stroke),n.attr("r",e.r),n.class!==void 0&&n.attr("class",n.class),e.title!==void 0&&n.append("title").text(e.title),n},"drawCircle"),ot=s(function(t,e){return gt(t,e)},"drawText"),Nt=s(function(t,e){function n(i,u,h,p,d){return i+","+u+" "+(i+h)+","+u+" "+(i+h)+","+(u+p-d)+" "+(i+h-d*1.2)+","+(u+p)+" "+i+","+(u+p)}s(n,"genPoints");const c=t.append("polygon");c.attr("points",n(e.x,e.y,50,20,7)),c.attr("class","labelBox"),e.y=e.y+e.labelMargin,e.x=e.x+.5*e.labelMargin,ot(t,e)},"drawLabel"),jt=s(function(t,e,n){const c=t.append("g"),i=at();i.x=e.x,i.y=e.y,i.fill=e.fill,i.width=n.width*e.taskCount+n.diagramMarginX*(e.taskCount-1),i.height=n.height,i.class="journey-section section-type-"+e.num,i.rx=3,i.ry=3,Z(c,i),ct(n)(e.text,c,i.x,i.y,i.width,i.height,{class:"journey-section section-type-"+e.num},n,e.colour)},"drawSection"),it=-1,zt=s(function(t,e,n){const c=e.x+n.width/2,i=t.append("g");it++;const u=300+5*30;i.append("line").attr("id","task"+it).attr("x1",c).attr("y1",e.y).attr("x2",c).attr("y2",u).attr("class","task-line").attr("stroke-width","1px").attr("stroke-dasharray","4 2").attr("stroke","#666"),Bt(i,{cx:c,cy:300+(5-e.score)*30,score:e.score});const h=at();h.x=e.x,h.y=e.y,h.fill=e.fill,h.width=n.width,h.height=n.height,h.class="task task-type-"+e.num,h.rx=3,h.ry=3,Z(i,h);let p=e.x+14;e.people.forEach(d=>{const x=e.actors[d].color,m={cx:p,cy:e.y,r:7,fill:x,stroke:"#000",title:d,pos:e.actors[d].position};lt(i,m),p+=10}),ct(n)(e.task,i,h.x,h.y,h.width,h.height,{class:"task"},n,e.colour)},"drawTask"),Ot=s(function(t,e){ft(t,e)},"drawBackgroundRect"),ct=function(){function t(i,u,h,p,d,x,m,g){const r=u.append("text").attr("x",h+d/2).attr("y",p+x/2+5).style("font-color",g).style("text-anchor","middle").text(i);c(r,m)}s(t,"byText");function e(i,u,h,p,d,x,m,g,r){const{taskFontSize:a,taskFontFamily:l}=g,y=i.split(/<br\s*\/?>/gi);for(let f=0;f<y.length;f++){const o=f*a-a*(y.length-1)/2,S=u.append("text").attr("x",h+d/2).attr("y",p).attr("fill",r).style("text-anchor","middle").style("font-size",a).style("font-family",l);S.append("tspan").attr("x",h+d/2).attr("dy",o).text(y[f]),S.attr("y",p+x/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),c(S,m)}}s(e,"byTspan");function n(i,u,h,p,d,x,m,g){const r=u.append("switch"),l=r.append("foreignObject").attr("x",h).attr("y",p).attr("width",d).attr("height",x).attr("position","fixed").append("xhtml:div").style("display","table").style("height","100%").style("width","100%");l.append("div").attr("class","label").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(i),e(i,r,h,p,d,x,m,g),c(l,m)}s(n,"byFo");function c(i,u){for(const h in u)h in u&&i.attr(h,u[h])}return s(c,"_setTextAttrs"),function(i){return i.textPlacement==="fo"?n:i.textPlacement==="old"?t:e}}(),Yt=s(function(t){t.append("defs").append("marker").attr("id","arrowhead").attr("refX",5).attr("refY",2).attr("markerWidth",6).attr("markerHeight",4).attr("orient","auto").append("path").attr("d","M 0,0 V 4 L6,2 Z")},"initGraphics"),L={drawRect:Z,drawCircle:lt,drawSection:jt,drawText:ot,drawLabel:Nt,drawTask:zt,drawBackgroundRect:Ot,initGraphics:Yt},qt=s(function(t){Object.keys(t).forEach(function(n){z[n]=t[n]})},"setConf"),M={};function ht(t){const e=A().journey;let n=60;Object.keys(M).forEach(c=>{const i=M[c].color,u={cx:20,cy:n,r:7,fill:i,stroke:"#000",pos:M[c].position};L.drawCircle(t,u);const h={x:40,y:n+7,fill:"#666",text:c,textMargin:e.boxTextMargin|5};L.drawText(t,h),n+=20})}s(ht,"drawActorLegend");var z=A().journey,I=z.leftMargin,Gt=s(function(t,e,n,c){const i=A().journey,u=A().securityLevel;let h;u==="sandbox"&&(h=W("#i"+e));const p=u==="sandbox"?W(h.nodes()[0].contentDocument.body):W("body");T.init();const d=p.select("#"+e);L.initGraphics(d);const x=c.db.getTasks(),m=c.db.getDiagramTitle(),g=c.db.getActors();for(const o in M)delete M[o];let r=0;g.forEach(o=>{M[o]={color:i.actorColours[r%i.actorColours.length],position:r},r++}),ht(d),T.insert(0,0,I,Object.keys(M).length*50),Wt(d,x,0);const a=T.getBounds();m&&d.append("text").text(m).attr("x",I).attr("font-size","4ex").attr("font-weight","bold").attr("y",25);const l=a.stopy-a.starty+2*i.diagramMarginY,y=I+a.stopx+2*i.diagramMarginX;Tt(d,l,y,i.useMaxWidth),d.append("line").attr("x1",I).attr("y1",i.height*4).attr("x2",y-I-4).attr("y2",i.height*4).attr("stroke-width",4).attr("stroke","black").attr("marker-end","url(#arrowhead)");const f=m?70:0;d.attr("viewBox",`${a.startx} -25 ${y} ${l+f}`),d.attr("preserveAspectRatio","xMinYMin meet"),d.attr("height",l+f+25)},"draw"),T={data:{startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},verticalPos:0,sequenceItems:[],init:s(function(){this.sequenceItems=[],this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},this.verticalPos=0},"init"),updateVal:s(function(t,e,n,c){t[e]===void 0?t[e]=n:t[e]=c(n,t[e])},"updateVal"),updateBounds:s(function(t,e,n,c){const i=A().journey,u=this;let h=0;function p(d){return s(function(m){h++;const g=u.sequenceItems.length-h+1;u.updateVal(m,"starty",e-g*i.boxMargin,Math.min),u.updateVal(m,"stopy",c+g*i.boxMargin,Math.max),u.updateVal(T.data,"startx",t-g*i.boxMargin,Math.min),u.updateVal(T.data,"stopx",n+g*i.boxMargin,Math.max),d!=="activation"&&(u.updateVal(m,"startx",t-g*i.boxMargin,Math.min),u.updateVal(m,"stopx",n+g*i.boxMargin,Math.max),u.updateVal(T.data,"starty",e-g*i.boxMargin,Math.min),u.updateVal(T.data,"stopy",c+g*i.boxMargin,Math.max))},"updateItemBounds")}s(p,"updateFn"),this.sequenceItems.forEach(p())},"updateBounds"),insert:s(function(t,e,n,c){const i=Math.min(t,n),u=Math.max(t,n),h=Math.min(e,c),p=Math.max(e,c);this.updateVal(T.data,"startx",i,Math.min),this.updateVal(T.data,"starty",h,Math.min),this.updateVal(T.data,"stopx",u,Math.max),this.updateVal(T.data,"stopy",p,Math.max),this.updateBounds(i,h,u,p)},"insert"),bumpVerticalPos:s(function(t){this.verticalPos=this.verticalPos+t,this.data.stopy=this.verticalPos},"bumpVerticalPos"),getVerticalPos:s(function(){return this.verticalPos},"getVerticalPos"),getBounds:s(function(){return this.data},"getBounds")},X=z.sectionFills,st=z.sectionColours,Wt=s(function(t,e,n){const c=A().journey;let i="";const u=c.height*2+c.diagramMarginY,h=n+u;let p=0,d="#CCC",x="black",m=0;for(const[g,r]of e.entries()){if(i!==r.section){d=X[p%X.length],m=p%X.length,x=st[p%st.length];let l=0;const y=r.section;for(let o=g;o<e.length&&e[o].section==y;o++)l=l+1;const f={x:g*c.taskMargin+g*c.width+I,y:50,text:r.section,fill:d,num:m,colour:x,taskCount:l};L.drawSection(t,f,c),i=r.section,p++}const a=r.people.reduce((l,y)=>(M[y]&&(l[y]=M[y]),l),{});r.x=g*c.taskMargin+g*c.width+I,r.y=h,r.width=c.diagramMarginX,r.height=c.diagramMarginY,r.colour=x,r.fill=d,r.num=m,r.actors=a,L.drawTask(t,r,c),T.insert(r.x,r.y,r.x+r.width+c.taskMargin,300+5*30)}},"drawTasks"),nt={setConf:qt,draw:Gt},oe={parser:$t,db:rt,renderer:nt,styles:Lt,init:s(t=>{nt.setConf(t.journey),rt.clear()},"init")};export{oe as diagram};
139
- //# sourceMappingURL=journeyDiagram-U35MCT3I-D5yGbOLJ.js.map
139
+ //# sourceMappingURL=journeyDiagram-U35MCT3I-Dc8g8jIX.js.map