@epic-web/workshop-app 4.6.6 → 4.7.1

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 (809) hide show
  1. package/build/client/assets/{_-COWH0sBh.js → _-Bd2gNcck.js} +2 -2
  2. package/build/client/assets/{_-COWH0sBh.js.map → _-Bd2gNcck.js.map} +1 -1
  3. package/build/client/assets/{_exerciseNumber-wyz3vbhs.js → _exerciseNumber-CFOo2dQj.js} +2 -2
  4. package/build/client/assets/{_exerciseNumber-wyz3vbhs.js.map → _exerciseNumber-CFOo2dQj.js.map} +1 -1
  5. package/build/client/assets/{_exerciseNumber_._stepNumber-C37pli7_.js → _exerciseNumber_._stepNumber-DCbWNWpZ.js} +2 -2
  6. package/build/client/assets/{_exerciseNumber_._stepNumber-C37pli7_.js.map → _exerciseNumber_._stepNumber-DCbWNWpZ.js.map} +1 -1
  7. package/build/client/assets/_exerciseNumber_.finished-P7xMAtl1.js +2 -0
  8. package/build/client/assets/_exerciseNumber_.finished-P7xMAtl1.js.map +1 -0
  9. package/build/client/assets/_layout-Bdd3mpVx.js +2 -0
  10. package/build/client/assets/_layout-Bdd3mpVx.js.map +1 -0
  11. package/build/client/assets/_layout-DHBLG7Ti.js +6 -0
  12. package/build/client/assets/_layout-DHBLG7Ti.js.map +1 -0
  13. package/build/client/assets/_layout-DaZNLfOL.js +2 -0
  14. package/build/client/assets/{_layout-BR-Qyofe.js.map → _layout-DaZNLfOL.js.map} +1 -1
  15. package/build/client/assets/{_layout-D0zbQZjf.js → _layout-rEQoj43V.js} +2 -2
  16. package/build/client/assets/{_layout-D0zbQZjf.js.map → _layout-rEQoj43V.js.map} +1 -1
  17. package/build/client/assets/{account-DesvwOeg.js → account-CnLkZd_O.js} +2 -2
  18. package/build/client/assets/{account-DesvwOeg.js.map → account-CnLkZd_O.js.map} +1 -1
  19. package/build/client/assets/{button-BfWwrI9B.js → button-CyZl24U2.js} +2 -2
  20. package/build/client/assets/{button-BfWwrI9B.js.map → button-CyZl24U2.js.map} +1 -1
  21. package/build/client/assets/{client-hints-BKxdo5Js.js → client-hints-BE5mB4r0.js} +2 -2
  22. package/build/client/assets/{client-hints-BKxdo5Js.js.map → client-hints-BE5mB4r0.js.map} +1 -1
  23. package/build/client/assets/components-BMzmvxYw.js +166 -0
  24. package/build/client/assets/components-BMzmvxYw.js.map +1 -0
  25. package/build/client/assets/diff-P5f7-8E4.js +2 -0
  26. package/build/client/assets/diff-P5f7-8E4.js.map +1 -0
  27. package/build/client/assets/diff-PfwTHr6-.js +2 -0
  28. package/build/client/assets/{diff-KDzcgGYL.js.map → diff-PfwTHr6-.js.map} +1 -1
  29. package/build/client/assets/{discord-0kv66Q6F.js → discord-COPE8EOZ.js} +2 -2
  30. package/build/client/assets/{discord-0kv66Q6F.js.map → discord-COPE8EOZ.js.map} +1 -1
  31. package/build/client/assets/discord-DIog7bBO.js +2 -0
  32. package/build/client/assets/discord-DIog7bBO.js.map +1 -0
  33. package/build/client/assets/entry.client-B0vV2fsa.js +43 -0
  34. package/build/client/assets/entry.client-B0vV2fsa.js.map +1 -0
  35. package/build/client/assets/{epic-video-BwtXsHGU.js → epic-video-CYnG2ziQ.js} +128 -128
  36. package/build/client/assets/epic-video-CYnG2ziQ.js.map +1 -0
  37. package/build/client/assets/{error-boundary-Bcric_4t.js → error-boundary-DxfVshQ5.js} +2 -2
  38. package/build/client/assets/{error-boundary-Bcric_4t.js.map → error-boundary-DxfVshQ5.js.map} +1 -1
  39. package/build/client/assets/finished-DP5ynR5u.js +2 -0
  40. package/build/client/assets/finished-DP5ynR5u.js.map +1 -0
  41. package/build/client/assets/index-4E9_Sx3m.js +42 -0
  42. package/build/client/assets/index-4E9_Sx3m.js.map +1 -0
  43. package/build/client/assets/{index-Bg9MMnnf.js → index-90bzTYUX.js} +2 -2
  44. package/build/client/assets/index-90bzTYUX.js.map +1 -0
  45. package/build/client/assets/{index-BQRtqn3g.js → index-BXefr1BB.js} +2 -2
  46. package/build/client/assets/{index-BQRtqn3g.js.map → index-BXefr1BB.js.map} +1 -1
  47. package/build/client/assets/index-Czg1ruVn.js +37 -0
  48. package/build/client/assets/index-Czg1ruVn.js.map +1 -0
  49. package/build/client/assets/{index-9nNr0Zqr.js → index-D6ukHE4T.js} +2 -2
  50. package/build/client/assets/{index-9nNr0Zqr.js.map → index-D6ukHE4T.js.map} +1 -1
  51. package/build/client/assets/index-Doi37489.js +3 -0
  52. package/build/client/assets/index-Doi37489.js.map +1 -0
  53. package/build/client/assets/{loading-C9f_vBoM.js → loading-CNWJVymJ.js} +2 -2
  54. package/build/client/assets/{loading-C9f_vBoM.js.map → loading-CNWJVymJ.js.map} +1 -1
  55. package/build/client/assets/{login-D8zyjBAb.js → login-DxG854vQ.js} +2 -2
  56. package/build/client/assets/{login-D8zyjBAb.js.map → login-DxG854vQ.js.map} +1 -1
  57. package/build/client/assets/manifest-805aa13a.js +1 -0
  58. package/build/client/assets/mdx-CR7Me1v_.js +2 -0
  59. package/build/client/assets/{mdx-BYvGbvEr.js.map → mdx-CR7Me1v_.js.map} +1 -1
  60. package/build/client/assets/misc-CypjEQkt.js +2 -0
  61. package/build/client/assets/misc-CypjEQkt.js.map +1 -0
  62. package/build/client/assets/{nav-chevrons-DOYtx9XE.js → nav-chevrons-BYKwyIgG.js} +2 -2
  63. package/build/client/assets/{nav-chevrons-DOYtx9XE.js.map → nav-chevrons-BYKwyIgG.js.map} +1 -1
  64. package/build/client/assets/{onboarding-euWyXpCL.js → onboarding-b9lcdh4n.js} +2 -2
  65. package/build/client/assets/{onboarding-euWyXpCL.js.map → onboarding-b9lcdh4n.js.map} +1 -1
  66. package/build/client/assets/{presence-BJPzwbUy.js → presence-DXXVJbaH.js} +2 -2
  67. package/build/client/assets/{presence-BJPzwbUy.js.map → presence-DXXVJbaH.js.map} +1 -1
  68. package/build/client/assets/progress-B_mReZVE.js +2 -0
  69. package/build/client/assets/progress-B_mReZVE.js.map +1 -0
  70. package/build/client/assets/{progress-bar-7LK87ZMh.js → progress-bar-DCrt7X4t.js} +2 -2
  71. package/build/client/assets/{progress-bar-7LK87ZMh.js.map → progress-bar-DCrt7X4t.js.map} +1 -1
  72. package/build/client/assets/{request-info-Dyls4H67.js → request-info-CUT0ULYN.js} +2 -2
  73. package/build/client/assets/{request-info-Dyls4H67.js.map → request-info-CUT0ULYN.js.map} +1 -1
  74. package/build/client/assets/{root-BQ7V6fP4.js → root-bgHbi7rA.js} +4 -4
  75. package/build/client/assets/root-bgHbi7rA.js.map +1 -0
  76. package/build/client/assets/{support-DUAHYT3r.js → support-DrY-qRGh.js} +2 -2
  77. package/build/client/assets/{support-DUAHYT3r.js.map → support-DrY-qRGh.js.map} +1 -1
  78. package/build/client/assets/tailwind-D2vjZZFL.css +1 -0
  79. package/build/client/assets/tooltip-CfmIzAYi.js +2 -0
  80. package/build/client/assets/tooltip-CfmIzAYi.js.map +1 -0
  81. package/build/client/assets/{use-event-source-aW6X9lN1.js → use-event-source-ySol3hbz.js} +2 -2
  82. package/build/client/assets/{use-event-source-aW6X9lN1.js.map → use-event-source-ySol3hbz.js.map} +1 -1
  83. package/build/client/assets/{user-73ocDYRe.js → user-C4QTtQw5.js} +2 -2
  84. package/build/client/assets/{user-73ocDYRe.js.map → user-C4QTtQw5.js.map} +1 -1
  85. package/build/server/index.js +840 -607
  86. package/build/server/index.js.map +1 -1
  87. package/node_modules/@babel/runtime/helpers/esm/wrapAsyncGenerator.js +65 -3
  88. package/node_modules/@babel/runtime/helpers/wrapAsyncGenerator.js +65 -3
  89. package/node_modules/@babel/runtime/package.json +1 -28
  90. package/node_modules/@conform-to/dom/dom.d.ts +17 -5
  91. package/node_modules/@conform-to/dom/form.d.ts +221 -122
  92. package/node_modules/@conform-to/dom/index.d.ts +24 -2
  93. package/node_modules/@conform-to/dom/intent.d.ts +92 -60
  94. package/node_modules/@conform-to/dom/package.json +1 -1
  95. package/node_modules/@conform-to/dom/parse.d.ts +47 -27
  96. package/node_modules/@conform-to/dom/types.d.ts +17 -14
  97. package/node_modules/@conform-to/dom/util.d.ts +4 -1
  98. package/node_modules/@conform-to/react/context.d.ts +187 -59
  99. package/node_modules/@conform-to/react/context.js +3 -5
  100. package/node_modules/@conform-to/react/context.mjs +4 -6
  101. package/node_modules/@conform-to/react/experimental.d.ts +0 -0
  102. package/node_modules/@conform-to/react/hooks.d.ts +53 -24
  103. package/node_modules/@conform-to/react/index.d.ts +28 -4
  104. package/node_modules/@conform-to/react/integrations.js +14 -1
  105. package/node_modules/@conform-to/react/integrations.mjs +14 -1
  106. package/node_modules/@conform-to/react/package.json +2 -2
  107. package/node_modules/@conform-to/zod/coercion.d.ts +14 -4
  108. package/node_modules/@conform-to/zod/constraint.d.ts +3 -1
  109. package/node_modules/@conform-to/zod/package.json +2 -2
  110. package/node_modules/@conform-to/zod/parse.d.ts +43 -25
  111. package/node_modules/@floating-ui/core/dist/floating-ui.core.browser.min.mjs +1 -1
  112. package/node_modules/@floating-ui/core/dist/floating-ui.core.browser.mjs +14 -3
  113. package/node_modules/@floating-ui/core/dist/floating-ui.core.d.mts +51 -51
  114. package/node_modules/@floating-ui/core/dist/floating-ui.core.d.ts +51 -51
  115. package/node_modules/@floating-ui/core/dist/floating-ui.core.esm.js +14 -3
  116. package/node_modules/@floating-ui/core/dist/floating-ui.core.mjs +14 -3
  117. package/node_modules/@floating-ui/core/dist/floating-ui.core.umd.js +14 -3
  118. package/node_modules/@floating-ui/core/dist/floating-ui.core.umd.min.js +1 -1
  119. package/node_modules/@floating-ui/core/package.json +2 -2
  120. package/node_modules/@floating-ui/dom/dist/floating-ui.dom.browser.min.mjs +1 -1
  121. package/node_modules/@floating-ui/dom/dist/floating-ui.dom.browser.mjs +12 -11
  122. package/node_modules/@floating-ui/dom/dist/floating-ui.dom.d.mts +11 -8
  123. package/node_modules/@floating-ui/dom/dist/floating-ui.dom.d.ts +11 -8
  124. package/node_modules/@floating-ui/dom/dist/floating-ui.dom.esm.js +1 -12
  125. package/node_modules/@floating-ui/dom/dist/floating-ui.dom.mjs +1 -12
  126. package/node_modules/@floating-ui/dom/dist/floating-ui.dom.umd.js +12 -11
  127. package/node_modules/@floating-ui/dom/dist/floating-ui.dom.umd.min.js +1 -1
  128. package/node_modules/@floating-ui/dom/package.json +2 -2
  129. package/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.d.mts +12 -4
  130. package/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.d.ts +12 -4
  131. package/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.esm.js +1 -0
  132. package/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.mjs +1 -0
  133. package/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.umd.js +1 -0
  134. package/node_modules/@floating-ui/react-dom/package.json +1 -1
  135. package/node_modules/@floating-ui/utils/dist/floating-ui.utils.d.mts +11 -6
  136. package/node_modules/@floating-ui/utils/dist/floating-ui.utils.d.ts +11 -6
  137. package/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.d.mts +2 -0
  138. package/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.d.ts +2 -0
  139. package/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.esm.js +13 -1
  140. package/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.mjs +13 -1
  141. package/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.umd.js +13 -0
  142. package/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.umd.min.js +1 -1
  143. package/node_modules/@floating-ui/utils/dom/floating-ui.utils.dom.d.ts +2 -0
  144. package/node_modules/@floating-ui/utils/dom/floating-ui.utils.dom.esm.js +13 -1
  145. package/node_modules/@floating-ui/utils/dom/floating-ui.utils.dom.umd.js +13 -0
  146. package/node_modules/@floating-ui/utils/package.json +1 -1
  147. package/node_modules/@radix-ui/number/dist/index.d.mts +2 -2
  148. package/node_modules/@radix-ui/number/dist/index.d.ts +2 -2
  149. package/node_modules/@radix-ui/number/dist/index.js +28 -10
  150. package/node_modules/@radix-ui/number/dist/index.js.map +7 -1
  151. package/node_modules/@radix-ui/number/dist/index.mjs +6 -7
  152. package/node_modules/@radix-ui/number/dist/index.mjs.map +7 -1
  153. package/node_modules/@radix-ui/number/package.json +1 -4
  154. package/node_modules/@radix-ui/primitive/dist/index.d.mts +2 -2
  155. package/node_modules/@radix-ui/primitive/dist/index.d.ts +2 -2
  156. package/node_modules/@radix-ui/primitive/dist/index.js +33 -13
  157. package/node_modules/@radix-ui/primitive/dist/index.js.map +7 -1
  158. package/node_modules/@radix-ui/primitive/dist/index.mjs +11 -10
  159. package/node_modules/@radix-ui/primitive/dist/index.mjs.map +7 -1
  160. package/node_modules/@radix-ui/primitive/package.json +1 -4
  161. package/node_modules/@radix-ui/react-accordion/dist/index.d.mts +40 -28
  162. package/node_modules/@radix-ui/react-accordion/dist/index.d.ts +40 -28
  163. package/node_modules/@radix-ui/react-accordion/dist/index.js +324 -316
  164. package/node_modules/@radix-ui/react-accordion/dist/index.js.map +7 -1
  165. package/node_modules/@radix-ui/react-accordion/dist/index.mjs +293 -300
  166. package/node_modules/@radix-ui/react-accordion/dist/index.mjs.map +7 -1
  167. package/node_modules/@radix-ui/react-accordion/package.json +12 -13
  168. package/node_modules/@radix-ui/react-arrow/dist/index.d.mts +8 -8
  169. package/node_modules/@radix-ui/react-arrow/dist/index.d.ts +8 -8
  170. package/node_modules/@radix-ui/react-arrow/dist/index.js +57 -37
  171. package/node_modules/@radix-ui/react-arrow/dist/index.js.map +7 -1
  172. package/node_modules/@radix-ui/react-arrow/dist/index.mjs +25 -30
  173. package/node_modules/@radix-ui/react-arrow/dist/index.mjs.map +7 -1
  174. package/node_modules/@radix-ui/react-arrow/package.json +4 -5
  175. package/node_modules/@radix-ui/react-collapsible/dist/index.d.mts +27 -16
  176. package/node_modules/@radix-ui/react-collapsible/dist/index.d.ts +27 -16
  177. package/node_modules/@radix-ui/react-collapsible/dist/index.js +176 -167
  178. package/node_modules/@radix-ui/react-collapsible/dist/index.js.map +7 -1
  179. package/node_modules/@radix-ui/react-collapsible/dist/index.mjs +143 -153
  180. package/node_modules/@radix-ui/react-collapsible/dist/index.mjs.map +7 -1
  181. package/node_modules/@radix-ui/react-collapsible/package.json +11 -12
  182. package/node_modules/@radix-ui/react-collection/dist/index.d.mts +27 -15
  183. package/node_modules/@radix-ui/react-collection/dist/index.d.ts +27 -15
  184. package/node_modules/@radix-ui/react-collection/dist/index.js +99 -112
  185. package/node_modules/@radix-ui/react-collection/dist/index.js.map +7 -1
  186. package/node_modules/@radix-ui/react-collection/dist/index.mjs +68 -106
  187. package/node_modules/@radix-ui/react-collection/dist/index.mjs.map +7 -1
  188. package/node_modules/@radix-ui/react-collection/package.json +7 -8
  189. package/node_modules/@radix-ui/react-compose-refs/dist/index.d.mts +5 -4
  190. package/node_modules/@radix-ui/react-compose-refs/dist/index.d.ts +5 -4
  191. package/node_modules/@radix-ui/react-compose-refs/dist/index.js +47 -30
  192. package/node_modules/@radix-ui/react-compose-refs/dist/index.js.map +7 -1
  193. package/node_modules/@radix-ui/react-compose-refs/dist/index.mjs +16 -27
  194. package/node_modules/@radix-ui/react-compose-refs/dist/index.mjs.map +7 -1
  195. package/node_modules/@radix-ui/react-compose-refs/package.json +2 -5
  196. package/node_modules/@radix-ui/react-context/dist/index.d.mts +10 -8
  197. package/node_modules/@radix-ui/react-context/dist/index.d.ts +10 -8
  198. package/node_modules/@radix-ui/react-context/dist/index.js +104 -123
  199. package/node_modules/@radix-ui/react-context/dist/index.js.map +7 -1
  200. package/node_modules/@radix-ui/react-context/dist/index.mjs +73 -120
  201. package/node_modules/@radix-ui/react-context/dist/index.mjs.map +7 -1
  202. package/node_modules/@radix-ui/react-context/package.json +2 -5
  203. package/node_modules/@radix-ui/react-direction/dist/index.d.mts +6 -5
  204. package/node_modules/@radix-ui/react-direction/dist/index.d.ts +6 -5
  205. package/node_modules/@radix-ui/react-direction/dist/index.js +47 -24
  206. package/node_modules/@radix-ui/react-direction/dist/index.js.map +7 -1
  207. package/node_modules/@radix-ui/react-direction/dist/index.mjs +16 -20
  208. package/node_modules/@radix-ui/react-direction/dist/index.mjs.map +7 -1
  209. package/node_modules/@radix-ui/react-direction/package.json +2 -5
  210. package/node_modules/@radix-ui/react-dismissable-layer/dist/index.d.mts +10 -10
  211. package/node_modules/@radix-ui/react-dismissable-layer/dist/index.d.ts +10 -10
  212. package/node_modules/@radix-ui/react-dismissable-layer/dist/index.js +230 -270
  213. package/node_modules/@radix-ui/react-dismissable-layer/dist/index.js.map +7 -1
  214. package/node_modules/@radix-ui/react-dismissable-layer/dist/index.mjs +199 -261
  215. package/node_modules/@radix-ui/react-dismissable-layer/dist/index.mjs.map +7 -1
  216. package/node_modules/@radix-ui/react-dismissable-layer/package.json +9 -10
  217. package/node_modules/@radix-ui/react-focus-guards/dist/index.d.mts +4 -4
  218. package/node_modules/@radix-ui/react-focus-guards/dist/index.d.ts +4 -4
  219. package/node_modules/@radix-ui/react-focus-guards/dist/index.js +63 -39
  220. package/node_modules/@radix-ui/react-focus-guards/dist/index.js.map +7 -1
  221. package/node_modules/@radix-ui/react-focus-guards/dist/index.mjs +32 -34
  222. package/node_modules/@radix-ui/react-focus-guards/dist/index.mjs.map +7 -1
  223. package/node_modules/@radix-ui/react-focus-guards/package.json +2 -5
  224. package/node_modules/@radix-ui/react-focus-scope/dist/index.d.mts +8 -8
  225. package/node_modules/@radix-ui/react-focus-scope/dist/index.d.ts +8 -8
  226. package/node_modules/@radix-ui/react-focus-scope/dist/index.js +228 -282
  227. package/node_modules/@radix-ui/react-focus-scope/dist/index.js.map +7 -1
  228. package/node_modules/@radix-ui/react-focus-scope/dist/index.mjs +197 -275
  229. package/node_modules/@radix-ui/react-focus-scope/dist/index.mjs.map +7 -1
  230. package/node_modules/@radix-ui/react-focus-scope/package.json +6 -7
  231. package/node_modules/@radix-ui/react-id/dist/index.d.mts +2 -2
  232. package/node_modules/@radix-ui/react-id/dist/index.d.ts +2 -2
  233. package/node_modules/@radix-ui/react-id/dist/index.js +47 -26
  234. package/node_modules/@radix-ui/react-id/dist/index.js.map +7 -1
  235. package/node_modules/@radix-ui/react-id/dist/index.mjs +14 -22
  236. package/node_modules/@radix-ui/react-id/dist/index.mjs.map +7 -1
  237. package/node_modules/@radix-ui/react-id/package.json +3 -4
  238. package/node_modules/@radix-ui/react-popover/dist/index.d.mts +48 -37
  239. package/node_modules/@radix-ui/react-popover/dist/index.d.ts +48 -37
  240. package/node_modules/@radix-ui/react-popover/dist/index.js +319 -311
  241. package/node_modules/@radix-ui/react-popover/dist/index.js.map +7 -1
  242. package/node_modules/@radix-ui/react-popover/dist/index.mjs +288 -291
  243. package/node_modules/@radix-ui/react-popover/dist/index.mjs.map +7 -1
  244. package/node_modules/@radix-ui/react-popover/package.json +17 -18
  245. package/node_modules/@radix-ui/react-popper/dist/index.d.mts +36 -25
  246. package/node_modules/@radix-ui/react-popper/dist/index.d.ts +36 -25
  247. package/node_modules/@radix-ui/react-popper/dist/index.js +305 -321
  248. package/node_modules/@radix-ui/react-popper/dist/index.js.map +7 -1
  249. package/node_modules/@radix-ui/react-popper/dist/index.mjs +284 -305
  250. package/node_modules/@radix-ui/react-popper/dist/index.mjs.map +7 -1
  251. package/node_modules/@radix-ui/react-popper/package.json +12 -13
  252. package/node_modules/@radix-ui/react-portal/dist/index.d.mts +9 -9
  253. package/node_modules/@radix-ui/react-portal/dist/index.d.ts +9 -9
  254. package/node_modules/@radix-ui/react-portal/dist/index.js +52 -34
  255. package/node_modules/@radix-ui/react-portal/dist/index.js.map +7 -1
  256. package/node_modules/@radix-ui/react-portal/dist/index.mjs +21 -27
  257. package/node_modules/@radix-ui/react-portal/dist/index.mjs.map +7 -1
  258. package/node_modules/@radix-ui/react-portal/package.json +5 -5
  259. package/node_modules/@radix-ui/react-presence/dist/index.d.mts +5 -4
  260. package/node_modules/@radix-ui/react-presence/dist/index.d.ts +5 -4
  261. package/node_modules/@radix-ui/react-presence/dist/index.js +147 -132
  262. package/node_modules/@radix-ui/react-presence/dist/index.js.map +7 -1
  263. package/node_modules/@radix-ui/react-presence/dist/index.mjs +116 -129
  264. package/node_modules/@radix-ui/react-presence/dist/index.mjs.map +7 -1
  265. package/node_modules/@radix-ui/react-presence/package.json +5 -6
  266. package/node_modules/@radix-ui/react-primitive/dist/index.d.mts +8 -9
  267. package/node_modules/@radix-ui/react-primitive/dist/index.d.ts +8 -9
  268. package/node_modules/@radix-ui/react-primitive/dist/index.js +73 -100
  269. package/node_modules/@radix-ui/react-primitive/dist/index.js.map +7 -1
  270. package/node_modules/@radix-ui/react-primitive/dist/index.mjs +42 -93
  271. package/node_modules/@radix-ui/react-primitive/dist/index.mjs.map +7 -1
  272. package/node_modules/@radix-ui/react-primitive/package.json +4 -5
  273. package/node_modules/@radix-ui/react-roving-focus/dist/index.d.mts +25 -13
  274. package/node_modules/@radix-ui/react-roving-focus/dist/index.d.ts +25 -13
  275. package/node_modules/@radix-ui/react-roving-focus/dist/index.js +239 -247
  276. package/node_modules/@radix-ui/react-roving-focus/dist/index.js.map +7 -1
  277. package/node_modules/@radix-ui/react-roving-focus/dist/index.mjs +209 -238
  278. package/node_modules/@radix-ui/react-roving-focus/dist/index.mjs.map +7 -1
  279. package/node_modules/@radix-ui/react-roving-focus/package.json +12 -13
  280. package/node_modules/@radix-ui/react-select/dist/index.d.mts +77 -65
  281. package/node_modules/@radix-ui/react-select/dist/index.d.ts +77 -65
  282. package/node_modules/@radix-ui/react-select/dist/index.js +1107 -1235
  283. package/node_modules/@radix-ui/react-select/dist/index.js.map +7 -1
  284. package/node_modules/@radix-ui/react-select/dist/index.mjs +1076 -1197
  285. package/node_modules/@radix-ui/react-select/dist/index.mjs.map +7 -1
  286. package/node_modules/@radix-ui/react-select/package.json +23 -24
  287. package/node_modules/@radix-ui/react-slot/dist/index.d.mts +9 -7
  288. package/node_modules/@radix-ui/react-slot/dist/index.d.ts +9 -7
  289. package/node_modules/@radix-ui/react-slot/dist/index.js +107 -87
  290. package/node_modules/@radix-ui/react-slot/dist/index.js.map +7 -1
  291. package/node_modules/@radix-ui/react-slot/dist/index.mjs +76 -80
  292. package/node_modules/@radix-ui/react-slot/dist/index.mjs.map +7 -1
  293. package/node_modules/@radix-ui/react-slot/package.json +3 -4
  294. package/node_modules/@radix-ui/react-tabs/dist/index.d.mts +32 -21
  295. package/node_modules/@radix-ui/react-tabs/dist/index.d.ts +32 -21
  296. package/node_modules/@radix-ui/react-tabs/dist/index.js +217 -184
  297. package/node_modules/@radix-ui/react-tabs/dist/index.js.map +7 -1
  298. package/node_modules/@radix-ui/react-tabs/dist/index.mjs +185 -169
  299. package/node_modules/@radix-ui/react-tabs/dist/index.mjs.map +7 -1
  300. package/node_modules/@radix-ui/react-tabs/package.json +11 -12
  301. package/node_modules/@radix-ui/react-toast/dist/index.d.mts +43 -32
  302. package/node_modules/@radix-ui/react-toast/dist/index.d.ts +43 -32
  303. package/node_modules/@radix-ui/react-toast/dist/index.js +645 -715
  304. package/node_modules/@radix-ui/react-toast/dist/index.js.map +7 -1
  305. package/node_modules/@radix-ui/react-toast/dist/index.mjs +614 -695
  306. package/node_modules/@radix-ui/react-toast/dist/index.mjs.map +7 -1
  307. package/node_modules/@radix-ui/react-toast/package.json +15 -16
  308. package/node_modules/@radix-ui/react-use-callback-ref/dist/index.d.mts +2 -2
  309. package/node_modules/@radix-ui/react-use-callback-ref/dist/index.d.ts +2 -2
  310. package/node_modules/@radix-ui/react-use-callback-ref/dist/index.js +42 -23
  311. package/node_modules/@radix-ui/react-use-callback-ref/dist/index.js.map +7 -1
  312. package/node_modules/@radix-ui/react-use-callback-ref/dist/index.mjs +11 -21
  313. package/node_modules/@radix-ui/react-use-callback-ref/dist/index.mjs.map +7 -1
  314. package/node_modules/@radix-ui/react-use-callback-ref/package.json +2 -5
  315. package/node_modules/@radix-ui/react-use-controllable-state/dist/index.d.mts +4 -3
  316. package/node_modules/@radix-ui/react-use-controllable-state/dist/index.d.ts +4 -3
  317. package/node_modules/@radix-ui/react-use-controllable-state/dist/index.js +75 -52
  318. package/node_modules/@radix-ui/react-use-controllable-state/dist/index.js.map +7 -1
  319. package/node_modules/@radix-ui/react-use-controllable-state/dist/index.mjs +44 -50
  320. package/node_modules/@radix-ui/react-use-controllable-state/dist/index.mjs.map +7 -1
  321. package/node_modules/@radix-ui/react-use-controllable-state/package.json +3 -4
  322. package/node_modules/@radix-ui/react-use-escape-keydown/dist/index.d.mts +2 -2
  323. package/node_modules/@radix-ui/react-use-escape-keydown/dist/index.d.ts +2 -2
  324. package/node_modules/@radix-ui/react-use-escape-keydown/dist/index.js +50 -29
  325. package/node_modules/@radix-ui/react-use-escape-keydown/dist/index.js.map +7 -1
  326. package/node_modules/@radix-ui/react-use-escape-keydown/dist/index.mjs +17 -25
  327. package/node_modules/@radix-ui/react-use-escape-keydown/dist/index.mjs.map +7 -1
  328. package/node_modules/@radix-ui/react-use-escape-keydown/package.json +3 -4
  329. package/node_modules/@radix-ui/react-use-layout-effect/dist/index.d.mts +4 -3
  330. package/node_modules/@radix-ui/react-use-layout-effect/dist/index.d.ts +4 -3
  331. package/node_modules/@radix-ui/react-use-layout-effect/dist/index.js +38 -17
  332. package/node_modules/@radix-ui/react-use-layout-effect/dist/index.js.map +7 -1
  333. package/node_modules/@radix-ui/react-use-layout-effect/dist/index.mjs +7 -15
  334. package/node_modules/@radix-ui/react-use-layout-effect/dist/index.mjs.map +7 -1
  335. package/node_modules/@radix-ui/react-use-layout-effect/package.json +2 -5
  336. package/node_modules/@radix-ui/react-use-previous/dist/index.d.mts +2 -2
  337. package/node_modules/@radix-ui/react-use-previous/dist/index.d.ts +2 -2
  338. package/node_modules/@radix-ui/react-use-previous/dist/index.js +45 -26
  339. package/node_modules/@radix-ui/react-use-previous/dist/index.js.map +7 -1
  340. package/node_modules/@radix-ui/react-use-previous/dist/index.mjs +14 -24
  341. package/node_modules/@radix-ui/react-use-previous/dist/index.mjs.map +7 -1
  342. package/node_modules/@radix-ui/react-use-previous/package.json +2 -5
  343. package/node_modules/@radix-ui/react-use-rect/dist/index.d.mts +4 -3
  344. package/node_modules/@radix-ui/react-use-rect/dist/index.d.ts +4 -3
  345. package/node_modules/@radix-ui/react-use-rect/dist/index.js +52 -32
  346. package/node_modules/@radix-ui/react-use-rect/dist/index.js.map +7 -1
  347. package/node_modules/@radix-ui/react-use-rect/dist/index.mjs +19 -28
  348. package/node_modules/@radix-ui/react-use-rect/dist/index.mjs.map +7 -1
  349. package/node_modules/@radix-ui/react-use-rect/package.json +3 -4
  350. package/node_modules/@radix-ui/react-use-size/dist/index.d.mts +2 -2
  351. package/node_modules/@radix-ui/react-use-size/dist/index.d.ts +2 -2
  352. package/node_modules/@radix-ui/react-use-size/dist/index.js +70 -57
  353. package/node_modules/@radix-ui/react-use-size/dist/index.js.map +7 -1
  354. package/node_modules/@radix-ui/react-use-size/dist/index.mjs +39 -55
  355. package/node_modules/@radix-ui/react-use-size/dist/index.mjs.map +7 -1
  356. package/node_modules/@radix-ui/react-use-size/package.json +3 -4
  357. package/node_modules/@radix-ui/react-visually-hidden/dist/index.d.mts +8 -8
  358. package/node_modules/@radix-ui/react-visually-hidden/dist/index.d.ts +8 -8
  359. package/node_modules/@radix-ui/react-visually-hidden/dist/index.js +64 -41
  360. package/node_modules/@radix-ui/react-visually-hidden/dist/index.js.map +7 -1
  361. package/node_modules/@radix-ui/react-visually-hidden/dist/index.mjs +33 -35
  362. package/node_modules/@radix-ui/react-visually-hidden/dist/index.mjs.map +7 -1
  363. package/node_modules/@radix-ui/react-visually-hidden/package.json +4 -5
  364. package/node_modules/@radix-ui/rect/dist/index.d.mts +3 -3
  365. package/node_modules/@radix-ui/rect/dist/index.d.ts +3 -3
  366. package/node_modules/@radix-ui/rect/dist/index.js +69 -66
  367. package/node_modules/@radix-ui/rect/dist/index.js.map +7 -1
  368. package/node_modules/@radix-ui/rect/dist/index.mjs +47 -63
  369. package/node_modules/@radix-ui/rect/dist/index.mjs.map +7 -1
  370. package/node_modules/@radix-ui/rect/package.json +1 -4
  371. package/node_modules/@remix-run/react/CHANGELOG.md +18 -0
  372. package/node_modules/@remix-run/react/dist/_virtual/_rollupPluginBabelHelpers.js +1 -1
  373. package/node_modules/@remix-run/react/dist/browser.js +14 -3
  374. package/node_modules/@remix-run/react/dist/components.d.ts +9 -0
  375. package/node_modules/@remix-run/react/dist/components.js +23 -19
  376. package/node_modules/@remix-run/react/dist/data.js +1 -1
  377. package/node_modules/@remix-run/react/dist/entry.d.ts +1 -0
  378. package/node_modules/@remix-run/react/dist/errorBoundaries.d.ts +5 -2
  379. package/node_modules/@remix-run/react/dist/errorBoundaries.js +26 -5
  380. package/node_modules/@remix-run/react/dist/errors.js +1 -1
  381. package/node_modules/@remix-run/react/dist/esm/_virtual/_rollupPluginBabelHelpers.js +1 -1
  382. package/node_modules/@remix-run/react/dist/esm/browser.js +14 -3
  383. package/node_modules/@remix-run/react/dist/esm/components.js +24 -20
  384. package/node_modules/@remix-run/react/dist/esm/data.js +1 -1
  385. package/node_modules/@remix-run/react/dist/esm/errorBoundaries.js +26 -5
  386. package/node_modules/@remix-run/react/dist/esm/errors.js +1 -1
  387. package/node_modules/@remix-run/react/dist/esm/fallback.js +1 -1
  388. package/node_modules/@remix-run/react/dist/esm/fog-of-war.js +226 -0
  389. package/node_modules/@remix-run/react/dist/esm/index.js +1 -1
  390. package/node_modules/@remix-run/react/dist/esm/invariant.js +1 -1
  391. package/node_modules/@remix-run/react/dist/esm/links.js +2 -2
  392. package/node_modules/@remix-run/react/dist/esm/markup.js +1 -1
  393. package/node_modules/@remix-run/react/dist/esm/routeModules.js +1 -1
  394. package/node_modules/@remix-run/react/dist/esm/routes.js +1 -1
  395. package/node_modules/@remix-run/react/dist/esm/scroll-restoration.js +1 -1
  396. package/node_modules/@remix-run/react/dist/esm/server.js +1 -1
  397. package/node_modules/@remix-run/react/dist/esm/single-fetch.js +1 -1
  398. package/node_modules/@remix-run/react/dist/fallback.js +1 -1
  399. package/node_modules/@remix-run/react/dist/fog-of-war.d.ts +37 -0
  400. package/node_modules/@remix-run/react/dist/fog-of-war.js +254 -0
  401. package/node_modules/@remix-run/react/dist/index.js +1 -1
  402. package/node_modules/@remix-run/react/dist/invariant.js +1 -1
  403. package/node_modules/@remix-run/react/dist/links.js +2 -2
  404. package/node_modules/@remix-run/react/dist/markup.js +1 -1
  405. package/node_modules/@remix-run/react/dist/routeModules.js +1 -1
  406. package/node_modules/@remix-run/react/dist/routes.d.ts +1 -1
  407. package/node_modules/@remix-run/react/dist/routes.js +1 -1
  408. package/node_modules/@remix-run/react/dist/scroll-restoration.js +1 -1
  409. package/node_modules/@remix-run/react/dist/server.js +1 -1
  410. package/node_modules/@remix-run/react/dist/single-fetch.js +1 -1
  411. package/node_modules/@remix-run/react/package.json +8 -8
  412. package/node_modules/@remix-run/router/CHANGELOG.md +9 -0
  413. package/node_modules/@remix-run/router/dist/index.d.ts +1 -1
  414. package/node_modules/@remix-run/router/dist/router.cjs.js +467 -80
  415. package/node_modules/@remix-run/router/dist/router.cjs.js.map +1 -1
  416. package/node_modules/@remix-run/router/dist/router.d.ts +11 -1
  417. package/node_modules/@remix-run/router/dist/router.js +457 -76
  418. package/node_modules/@remix-run/router/dist/router.js.map +1 -1
  419. package/node_modules/@remix-run/router/dist/router.umd.js +467 -80
  420. package/node_modules/@remix-run/router/dist/router.umd.js.map +1 -1
  421. package/node_modules/@remix-run/router/dist/router.umd.min.js +2 -2
  422. package/node_modules/@remix-run/router/dist/router.umd.min.js.map +1 -1
  423. package/node_modules/@remix-run/router/dist/utils.d.ts +9 -1
  424. package/node_modules/@remix-run/router/index.ts +1 -0
  425. package/node_modules/@remix-run/router/package.json +1 -1
  426. package/node_modules/@remix-run/router/router.ts +586 -73
  427. package/node_modules/@remix-run/router/utils.ts +51 -8
  428. package/node_modules/@remix-run/server-runtime/CHANGELOG.md +17 -0
  429. package/node_modules/@remix-run/server-runtime/dist/cookies.js +1 -1
  430. package/node_modules/@remix-run/server-runtime/dist/data.js +1 -1
  431. package/node_modules/@remix-run/server-runtime/dist/deprecations.js +1 -1
  432. package/node_modules/@remix-run/server-runtime/dist/dev.js +1 -1
  433. package/node_modules/@remix-run/server-runtime/dist/entry.d.ts +1 -0
  434. package/node_modules/@remix-run/server-runtime/dist/entry.js +1 -1
  435. package/node_modules/@remix-run/server-runtime/dist/errors.js +1 -1
  436. package/node_modules/@remix-run/server-runtime/dist/esm/cookies.js +1 -1
  437. package/node_modules/@remix-run/server-runtime/dist/esm/data.js +1 -1
  438. package/node_modules/@remix-run/server-runtime/dist/esm/deprecations.js +1 -1
  439. package/node_modules/@remix-run/server-runtime/dist/esm/dev.js +1 -1
  440. package/node_modules/@remix-run/server-runtime/dist/esm/entry.js +1 -1
  441. package/node_modules/@remix-run/server-runtime/dist/esm/errors.js +1 -1
  442. package/node_modules/@remix-run/server-runtime/dist/esm/formData.js +1 -1
  443. package/node_modules/@remix-run/server-runtime/dist/esm/headers.js +1 -1
  444. package/node_modules/@remix-run/server-runtime/dist/esm/index.js +1 -1
  445. package/node_modules/@remix-run/server-runtime/dist/esm/invariant.js +1 -1
  446. package/node_modules/@remix-run/server-runtime/dist/esm/markup.js +1 -1
  447. package/node_modules/@remix-run/server-runtime/dist/esm/mode.js +1 -1
  448. package/node_modules/@remix-run/server-runtime/dist/esm/responses.js +1 -1
  449. package/node_modules/@remix-run/server-runtime/dist/esm/routeMatching.js +1 -1
  450. package/node_modules/@remix-run/server-runtime/dist/esm/routes.js +1 -1
  451. package/node_modules/@remix-run/server-runtime/dist/esm/server.js +76 -11
  452. package/node_modules/@remix-run/server-runtime/dist/esm/serverHandoff.js +1 -1
  453. package/node_modules/@remix-run/server-runtime/dist/esm/sessions/cookieStorage.js +1 -1
  454. package/node_modules/@remix-run/server-runtime/dist/esm/sessions/memoryStorage.js +1 -1
  455. package/node_modules/@remix-run/server-runtime/dist/esm/sessions.js +1 -1
  456. package/node_modules/@remix-run/server-runtime/dist/esm/single-fetch.js +17 -8
  457. package/node_modules/@remix-run/server-runtime/dist/esm/upload/errors.js +1 -1
  458. package/node_modules/@remix-run/server-runtime/dist/esm/upload/memoryUploadHandler.js +1 -1
  459. package/node_modules/@remix-run/server-runtime/dist/esm/warnings.js +1 -1
  460. package/node_modules/@remix-run/server-runtime/dist/formData.js +1 -1
  461. package/node_modules/@remix-run/server-runtime/dist/headers.js +1 -1
  462. package/node_modules/@remix-run/server-runtime/dist/index.js +1 -1
  463. package/node_modules/@remix-run/server-runtime/dist/invariant.js +1 -1
  464. package/node_modules/@remix-run/server-runtime/dist/markup.js +1 -1
  465. package/node_modules/@remix-run/server-runtime/dist/mode.js +1 -1
  466. package/node_modules/@remix-run/server-runtime/dist/responses.js +1 -1
  467. package/node_modules/@remix-run/server-runtime/dist/routeMatching.js +1 -1
  468. package/node_modules/@remix-run/server-runtime/dist/routes.js +1 -1
  469. package/node_modules/@remix-run/server-runtime/dist/server.js +70 -5
  470. package/node_modules/@remix-run/server-runtime/dist/serverHandoff.js +1 -1
  471. package/node_modules/@remix-run/server-runtime/dist/sessions/cookieStorage.js +1 -1
  472. package/node_modules/@remix-run/server-runtime/dist/sessions/memoryStorage.js +1 -1
  473. package/node_modules/@remix-run/server-runtime/dist/sessions.js +1 -1
  474. package/node_modules/@remix-run/server-runtime/dist/single-fetch.d.ts +3 -0
  475. package/node_modules/@remix-run/server-runtime/dist/single-fetch.js +18 -7
  476. package/node_modules/@remix-run/server-runtime/dist/upload/errors.js +1 -1
  477. package/node_modules/@remix-run/server-runtime/dist/upload/memoryUploadHandler.js +1 -1
  478. package/node_modules/@remix-run/server-runtime/dist/warnings.js +1 -1
  479. package/node_modules/@remix-run/server-runtime/package.json +3 -3
  480. package/node_modules/deep-eql/index.js +10 -5
  481. package/node_modules/deep-eql/package.json +1 -1
  482. package/node_modules/framer-motion/dist/cjs/{dom-entry-DSxBucW4.js → dom-entry-GDJJhIpT.js} +59 -106
  483. package/node_modules/framer-motion/dist/cjs/dom-entry.js +1 -1
  484. package/node_modules/framer-motion/dist/cjs/index.js +123 -36
  485. package/node_modules/framer-motion/dist/dom.js +1 -1
  486. package/node_modules/framer-motion/dist/es/gestures/drag/VisualElementDragControls.mjs +3 -3
  487. package/node_modules/framer-motion/dist/es/motion/features/animation/index.mjs +6 -3
  488. package/node_modules/framer-motion/dist/es/motion/index.mjs +33 -13
  489. package/node_modules/framer-motion/dist/es/motion/utils/use-motion-ref.mjs +6 -3
  490. package/node_modules/framer-motion/dist/es/motion/utils/use-visual-element.mjs +54 -3
  491. package/node_modules/framer-motion/dist/es/projection/node/create-projection-node.mjs +5 -2
  492. package/node_modules/framer-motion/dist/es/projection-entry.mjs +11 -0
  493. package/node_modules/framer-motion/dist/es/render/VisualElement.mjs +30 -78
  494. package/node_modules/framer-motion/dist/es/render/utils/animation-state.mjs +5 -1
  495. package/node_modules/framer-motion/dist/es/render/utils/motion-values.mjs +1 -1
  496. package/node_modules/framer-motion/dist/es/utils/mix/color.mjs +8 -2
  497. package/node_modules/framer-motion/dist/es/utils/mix/complex.mjs +1 -3
  498. package/node_modules/framer-motion/dist/es/utils/mix/immediate.mjs +5 -0
  499. package/node_modules/framer-motion/dist/es/value/index.mjs +1 -1
  500. package/node_modules/framer-motion/dist/es/value/types/color/rgba.mjs +1 -1
  501. package/node_modules/framer-motion/dist/framer-motion.dev.js +175 -134
  502. package/node_modules/framer-motion/dist/framer-motion.js +1 -1
  503. package/node_modules/framer-motion/dist/index.d.ts +78 -78
  504. package/node_modules/framer-motion/dist/three-entry.d.ts +59 -72
  505. package/node_modules/framer-motion/package.json +14 -28
  506. package/node_modules/react-remove-scroll/dist/es2015/SideEffect.js +15 -4
  507. package/node_modules/react-remove-scroll/dist/es2015/UI.js +2 -2
  508. package/node_modules/react-remove-scroll/dist/es2015/handleScroll.js +12 -4
  509. package/node_modules/react-remove-scroll/dist/es2015/types.d.ts +10 -2
  510. package/node_modules/react-remove-scroll/dist/es2019/SideEffect.js +15 -4
  511. package/node_modules/react-remove-scroll/dist/es2019/UI.js +2 -2
  512. package/node_modules/react-remove-scroll/dist/es2019/handleScroll.js +12 -4
  513. package/node_modules/react-remove-scroll/dist/es2019/types.d.ts +10 -2
  514. package/node_modules/react-remove-scroll/dist/es5/SideEffect.js +15 -4
  515. package/node_modules/react-remove-scroll/dist/es5/UI.js +2 -2
  516. package/node_modules/react-remove-scroll/dist/es5/handleScroll.js +12 -4
  517. package/node_modules/react-remove-scroll/dist/es5/types.d.ts +10 -2
  518. package/node_modules/react-remove-scroll/dist/index.js +93 -0
  519. package/node_modules/react-remove-scroll/package.json +4 -3
  520. package/node_modules/react-router/CHANGELOG.md +14 -0
  521. package/node_modules/react-router/dist/index.d.ts +4 -1
  522. package/node_modules/react-router/dist/index.js +3 -2
  523. package/node_modules/react-router/dist/index.js.map +1 -1
  524. package/node_modules/react-router/dist/main.js +1 -1
  525. package/node_modules/react-router/dist/react-router.development.js +3 -2
  526. package/node_modules/react-router/dist/react-router.development.js.map +1 -1
  527. package/node_modules/react-router/dist/react-router.production.min.js +2 -2
  528. package/node_modules/react-router/dist/react-router.production.min.js.map +1 -1
  529. package/node_modules/react-router/dist/umd/react-router.development.js +3 -2
  530. package/node_modules/react-router/dist/umd/react-router.development.js.map +1 -1
  531. package/node_modules/react-router/dist/umd/react-router.production.min.js +2 -2
  532. package/node_modules/react-router/dist/umd/react-router.production.min.js.map +1 -1
  533. package/node_modules/react-router/package.json +3 -3
  534. package/node_modules/react-router-dom/CHANGELOG.md +17 -0
  535. package/node_modules/react-router-dom/dist/dom.d.ts +29 -16
  536. package/node_modules/react-router-dom/dist/index.d.ts +18 -6
  537. package/node_modules/react-router-dom/dist/index.js +3 -1
  538. package/node_modules/react-router-dom/dist/index.js.map +1 -1
  539. package/node_modules/react-router-dom/dist/main.js +1 -1
  540. package/node_modules/react-router-dom/dist/react-router-dom.development.js +29 -1
  541. package/node_modules/react-router-dom/dist/react-router-dom.development.js.map +1 -1
  542. package/node_modules/react-router-dom/dist/react-router-dom.production.min.js +2 -2
  543. package/node_modules/react-router-dom/dist/react-router-dom.production.min.js.map +1 -1
  544. package/node_modules/react-router-dom/dist/server.js +4 -1
  545. package/node_modules/react-router-dom/dist/server.mjs +4 -1
  546. package/node_modules/react-router-dom/dist/umd/react-router-dom.development.js +29 -1
  547. package/node_modules/react-router-dom/dist/umd/react-router-dom.development.js.map +1 -1
  548. package/node_modules/react-router-dom/dist/umd/react-router-dom.production.min.js +2 -2
  549. package/node_modules/react-router-dom/dist/umd/react-router-dom.production.min.js.map +1 -1
  550. package/node_modules/react-router-dom/package.json +3 -3
  551. package/node_modules/react-router-dom/server.js +4 -1
  552. package/node_modules/react-router-dom/server.mjs +4 -1
  553. package/node_modules/{@remix-run/server-runtime/node_modules/source-map → source-map}/README.md +32 -112
  554. package/node_modules/source-map/dist/source-map.debug.js +3234 -0
  555. package/node_modules/source-map/dist/source-map.js +3233 -0
  556. package/node_modules/source-map/dist/source-map.min.js +2 -0
  557. package/node_modules/source-map/dist/source-map.min.js.map +1 -0
  558. package/node_modules/source-map/lib/array-set.js +121 -0
  559. package/node_modules/{@remix-run/server-runtime/node_modules/source-map → source-map}/lib/base64-vlq.js +40 -11
  560. package/node_modules/source-map/lib/base64.js +67 -0
  561. package/node_modules/{@remix-run/server-runtime/node_modules/source-map → source-map}/lib/binary-search.js +19 -15
  562. package/node_modules/source-map/lib/mapping-list.js +79 -0
  563. package/node_modules/source-map/lib/quick-sort.js +114 -0
  564. package/node_modules/source-map/lib/source-map-consumer.js +1145 -0
  565. package/node_modules/{@remix-run/server-runtime/node_modules/source-map → source-map}/lib/source-map-generator.js +169 -157
  566. package/node_modules/source-map/lib/source-node.js +413 -0
  567. package/node_modules/{@remix-run/server-runtime/node_modules/source-map → source-map}/lib/util.js +51 -109
  568. package/node_modules/{@remix-run/server-runtime/node_modules/source-map → source-map}/package.json +9 -27
  569. package/node_modules/source-map/source-map.d.ts +98 -0
  570. package/node_modules/source-map/source-map.js +8 -0
  571. package/node_modules/turbo-stream/dist/flatten.d.ts +1 -1
  572. package/node_modules/turbo-stream/dist/flatten.js +44 -9
  573. package/node_modules/turbo-stream/dist/turbo-stream.js +11 -2
  574. package/node_modules/turbo-stream/dist/turbo-stream.mjs +58 -7
  575. package/node_modules/turbo-stream/dist/unflatten.js +2 -0
  576. package/node_modules/turbo-stream/dist/utils.d.ts +1 -0
  577. package/node_modules/turbo-stream/dist/utils.js +2 -1
  578. package/node_modules/turbo-stream/package.json +1 -1
  579. package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/index.d.ts +1 -0
  580. package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/package.json +2 -1
  581. package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/readme.md +1 -0
  582. package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/is-literal.d.ts +6 -4
  583. package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/merge-deep.d.ts +8 -9
  584. package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/omit-deep.d.ts +3 -3
  585. package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/paths.d.ts +14 -8
  586. package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/schema.d.ts +12 -12
  587. package/node_modules/type-fest/source/simplify-deep.d.ts +115 -0
  588. package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/simplify.d.ts +1 -1
  589. package/package.json +4 -4
  590. package/build/client/assets/_exerciseNumber_.finished-DNtyBHjg.js +0 -2
  591. package/build/client/assets/_exerciseNumber_.finished-DNtyBHjg.js.map +0 -1
  592. package/build/client/assets/_layout-BR-Qyofe.js +0 -2
  593. package/build/client/assets/_layout-CNgYirUN.js +0 -2
  594. package/build/client/assets/_layout-CNgYirUN.js.map +0 -1
  595. package/build/client/assets/_layout-xu6a9He_.js +0 -2
  596. package/build/client/assets/_layout-xu6a9He_.js.map +0 -1
  597. package/build/client/assets/components-C5xBZAiL.js +0 -119
  598. package/build/client/assets/components-C5xBZAiL.js.map +0 -1
  599. package/build/client/assets/diff-BKsbFB6w.js +0 -42
  600. package/build/client/assets/diff-BKsbFB6w.js.map +0 -1
  601. package/build/client/assets/diff-KDzcgGYL.js +0 -2
  602. package/build/client/assets/discord-Xp0X4-Fl.js +0 -2
  603. package/build/client/assets/discord-Xp0X4-Fl.js.map +0 -1
  604. package/build/client/assets/entry.client-0j1eoieD.js +0 -80
  605. package/build/client/assets/entry.client-0j1eoieD.js.map +0 -1
  606. package/build/client/assets/epic-video-BwtXsHGU.js.map +0 -1
  607. package/build/client/assets/finished-Cu9PZd5Q.js +0 -2
  608. package/build/client/assets/finished-Cu9PZd5Q.js.map +0 -1
  609. package/build/client/assets/index-Bg9MMnnf.js.map +0 -1
  610. package/build/client/assets/index-D6ygCrVn.js +0 -37
  611. package/build/client/assets/index-D6ygCrVn.js.map +0 -1
  612. package/build/client/assets/index-r90CY6Wk.js +0 -8
  613. package/build/client/assets/index-r90CY6Wk.js.map +0 -1
  614. package/build/client/assets/manifest-b31ba37c.js +0 -1
  615. package/build/client/assets/mdx-BYvGbvEr.js +0 -2
  616. package/build/client/assets/misc-DNgC2Frq.js +0 -2
  617. package/build/client/assets/misc-DNgC2Frq.js.map +0 -1
  618. package/build/client/assets/progress-CF9Xwfxf.js +0 -2
  619. package/build/client/assets/progress-CF9Xwfxf.js.map +0 -1
  620. package/build/client/assets/root-BQ7V6fP4.js.map +0 -1
  621. package/build/client/assets/tailwind-Ck4g-nq0.css +0 -1
  622. package/build/client/assets/tooltip-Kw0lYWBI.js +0 -2
  623. package/build/client/assets/tooltip-Kw0lYWBI.js.map +0 -1
  624. package/node_modules/@babel/runtime/helpers/AsyncGenerator.js +0 -64
  625. package/node_modules/@babel/runtime/helpers/esm/AsyncGenerator.js +0 -64
  626. package/node_modules/@babel/runtime/helpers/esm/iterableToArrayLimitLoose.js +0 -10
  627. package/node_modules/@babel/runtime/helpers/esm/slicedToArrayLoose.js +0 -8
  628. package/node_modules/@babel/runtime/helpers/iterableToArrayLimitLoose.js +0 -10
  629. package/node_modules/@babel/runtime/helpers/slicedToArrayLoose.js +0 -8
  630. package/node_modules/@conform-to/dom/rollup.config.js +0 -100
  631. package/node_modules/@conform-to/react/rollup.config.js +0 -102
  632. package/node_modules/@conform-to/zod/rollup.config.js +0 -100
  633. package/node_modules/@radix-ui/number/dist/index.d.ts.map +0 -1
  634. package/node_modules/@radix-ui/primitive/dist/index.d.ts.map +0 -1
  635. package/node_modules/@radix-ui/react-accordion/dist/index.d.ts.map +0 -1
  636. package/node_modules/@radix-ui/react-arrow/dist/index.d.ts.map +0 -1
  637. package/node_modules/@radix-ui/react-collapsible/dist/index.d.ts.map +0 -1
  638. package/node_modules/@radix-ui/react-collection/dist/index.d.ts.map +0 -1
  639. package/node_modules/@radix-ui/react-compose-refs/dist/index.d.ts.map +0 -1
  640. package/node_modules/@radix-ui/react-context/dist/index.d.ts.map +0 -1
  641. package/node_modules/@radix-ui/react-direction/dist/index.d.ts.map +0 -1
  642. package/node_modules/@radix-ui/react-dismissable-layer/dist/index.d.ts.map +0 -1
  643. package/node_modules/@radix-ui/react-focus-guards/dist/index.d.ts.map +0 -1
  644. package/node_modules/@radix-ui/react-focus-scope/dist/index.d.ts.map +0 -1
  645. package/node_modules/@radix-ui/react-id/dist/index.d.ts.map +0 -1
  646. package/node_modules/@radix-ui/react-popover/dist/index.d.ts.map +0 -1
  647. package/node_modules/@radix-ui/react-popper/dist/index.d.ts.map +0 -1
  648. package/node_modules/@radix-ui/react-portal/dist/index.d.ts.map +0 -1
  649. package/node_modules/@radix-ui/react-presence/dist/index.d.ts.map +0 -1
  650. package/node_modules/@radix-ui/react-primitive/dist/index.d.ts.map +0 -1
  651. package/node_modules/@radix-ui/react-roving-focus/dist/index.d.ts.map +0 -1
  652. package/node_modules/@radix-ui/react-select/dist/index.d.ts.map +0 -1
  653. package/node_modules/@radix-ui/react-slot/dist/index.d.ts.map +0 -1
  654. package/node_modules/@radix-ui/react-tabs/dist/index.d.ts.map +0 -1
  655. package/node_modules/@radix-ui/react-toast/dist/index.d.ts.map +0 -1
  656. package/node_modules/@radix-ui/react-use-callback-ref/dist/index.d.ts.map +0 -1
  657. package/node_modules/@radix-ui/react-use-controllable-state/dist/index.d.ts.map +0 -1
  658. package/node_modules/@radix-ui/react-use-escape-keydown/dist/index.d.ts.map +0 -1
  659. package/node_modules/@radix-ui/react-use-layout-effect/dist/index.d.ts.map +0 -1
  660. package/node_modules/@radix-ui/react-use-previous/dist/index.d.ts.map +0 -1
  661. package/node_modules/@radix-ui/react-use-rect/dist/index.d.ts.map +0 -1
  662. package/node_modules/@radix-ui/react-use-size/dist/index.d.ts.map +0 -1
  663. package/node_modules/@radix-ui/react-visually-hidden/dist/index.d.ts.map +0 -1
  664. package/node_modules/@radix-ui/rect/dist/index.d.ts.map +0 -1
  665. package/node_modules/@remix-run/server-runtime/node_modules/source-map/dist/source-map.js +0 -1
  666. package/node_modules/@remix-run/server-runtime/node_modules/source-map/lib/array-set.js +0 -100
  667. package/node_modules/@remix-run/server-runtime/node_modules/source-map/lib/base64.js +0 -18
  668. package/node_modules/@remix-run/server-runtime/node_modules/source-map/lib/mapping-list.js +0 -80
  669. package/node_modules/@remix-run/server-runtime/node_modules/source-map/lib/source-map-consumer.js +0 -1237
  670. package/node_modules/@remix-run/server-runtime/node_modules/source-map/lib/source-node.js +0 -404
  671. package/node_modules/@remix-run/server-runtime/node_modules/source-map/source-map.d.ts +0 -369
  672. package/node_modules/@remix-run/server-runtime/node_modules/source-map/source-map.js +0 -8
  673. package/node_modules/framer-motion/dist/projection.dev.js +0 -6659
  674. /package/node_modules/{@remix-run/server-runtime/node_modules/source-map → source-map}/LICENSE +0 -0
  675. /package/node_modules/{@remix-run/server-runtime/node_modules/source-map → source-map}/lib/mappings.wasm +0 -0
  676. /package/node_modules/{@remix-run/server-runtime/node_modules/source-map → source-map}/lib/read-wasm.js +0 -0
  677. /package/node_modules/{@remix-run/server-runtime/node_modules/source-map → source-map}/lib/wasm.js +0 -0
  678. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/and.d.ts +0 -0
  679. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/array-indices.d.ts +0 -0
  680. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/array-slice.d.ts +0 -0
  681. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/array-splice.d.ts +0 -0
  682. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/array-values.d.ts +0 -0
  683. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/async-return-type.d.ts +0 -0
  684. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/asyncify.d.ts +0 -0
  685. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/basic.d.ts +0 -0
  686. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/camel-case.d.ts +0 -0
  687. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/camel-cased-properties-deep.d.ts +0 -0
  688. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/camel-cased-properties.d.ts +0 -0
  689. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/conditional-except.d.ts +0 -0
  690. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/conditional-keys.d.ts +0 -0
  691. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/conditional-pick-deep.d.ts +0 -0
  692. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/conditional-pick.d.ts +0 -0
  693. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/conditional-simplify.d.ts +0 -0
  694. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/delimiter-case.d.ts +0 -0
  695. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/delimiter-cased-properties-deep.d.ts +0 -0
  696. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/delimiter-cased-properties.d.ts +0 -0
  697. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/distributed-omit.d.ts +0 -0
  698. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/distributed-pick.d.ts +0 -0
  699. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/empty-object.d.ts +0 -0
  700. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/enforce-optional.d.ts +0 -0
  701. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/entries.d.ts +0 -0
  702. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/entry.d.ts +0 -0
  703. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/exact.d.ts +0 -0
  704. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/except.d.ts +0 -0
  705. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/fixed-length-array.d.ts +0 -0
  706. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/get.d.ts +0 -0
  707. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/global-this.d.ts +0 -0
  708. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/greater-than-or-equal.d.ts +0 -0
  709. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/greater-than.d.ts +0 -0
  710. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/has-optional-keys.d.ts +0 -0
  711. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/has-readonly-keys.d.ts +0 -0
  712. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/has-required-keys.d.ts +0 -0
  713. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/has-writable-keys.d.ts +0 -0
  714. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/if-any.d.ts +0 -0
  715. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/if-empty-object.d.ts +0 -0
  716. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/if-never.d.ts +0 -0
  717. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/if-null.d.ts +0 -0
  718. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/if-unknown.d.ts +0 -0
  719. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/includes.d.ts +0 -0
  720. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/int-range.d.ts +0 -0
  721. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/internal.d.ts +0 -0
  722. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/invariant-of.d.ts +0 -0
  723. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/is-any.d.ts +0 -0
  724. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/is-equal.d.ts +0 -0
  725. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/is-float.d.ts +0 -0
  726. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/is-integer.d.ts +0 -0
  727. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/is-never.d.ts +0 -0
  728. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/is-null.d.ts +0 -0
  729. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/is-unknown.d.ts +0 -0
  730. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/iterable-element.d.ts +0 -0
  731. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/join.d.ts +0 -0
  732. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/jsonifiable.d.ts +0 -0
  733. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/jsonify.d.ts +0 -0
  734. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/kebab-case.d.ts +0 -0
  735. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/kebab-cased-properties-deep.d.ts +0 -0
  736. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/kebab-cased-properties.d.ts +0 -0
  737. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/keys-of-union.d.ts +0 -0
  738. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/last-array-element.d.ts +0 -0
  739. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/less-than-or-equal.d.ts +0 -0
  740. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/less-than.d.ts +0 -0
  741. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/literal-to-primitive-deep.d.ts +0 -0
  742. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/literal-to-primitive.d.ts +0 -0
  743. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/literal-union.d.ts +0 -0
  744. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/merge-exclusive.d.ts +0 -0
  745. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/merge.d.ts +0 -0
  746. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/multidimensional-array.d.ts +0 -0
  747. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/multidimensional-readonly-array.d.ts +0 -0
  748. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/non-empty-object.d.ts +0 -0
  749. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/numeric.d.ts +0 -0
  750. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/observable-like.d.ts +0 -0
  751. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/omit-index-signature.d.ts +0 -0
  752. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/opaque.d.ts +0 -0
  753. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/optional-keys-of.d.ts +0 -0
  754. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/or.d.ts +0 -0
  755. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/override-properties.d.ts +0 -0
  756. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/package-json.d.ts +0 -0
  757. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/partial-deep.d.ts +0 -0
  758. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/partial-on-undefined-deep.d.ts +0 -0
  759. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/pascal-case.d.ts +0 -0
  760. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/pascal-cased-properties-deep.d.ts +0 -0
  761. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/pascal-cased-properties.d.ts +0 -0
  762. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/pick-deep.d.ts +0 -0
  763. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/pick-index-signature.d.ts +0 -0
  764. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/primitive.d.ts +0 -0
  765. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/promisable.d.ts +0 -0
  766. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/readonly-deep.d.ts +0 -0
  767. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/readonly-keys-of.d.ts +0 -0
  768. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/readonly-tuple.d.ts +0 -0
  769. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/replace.d.ts +0 -0
  770. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/require-all-or-none.d.ts +0 -0
  771. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/require-at-least-one.d.ts +0 -0
  772. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/require-exactly-one.d.ts +0 -0
  773. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/require-one-or-none.d.ts +0 -0
  774. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/required-deep.d.ts +0 -0
  775. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/required-keys-of.d.ts +0 -0
  776. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/screaming-snake-case.d.ts +0 -0
  777. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/set-field-type.d.ts +0 -0
  778. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/set-non-nullable.d.ts +0 -0
  779. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/set-optional.d.ts +0 -0
  780. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/set-parameter-type.d.ts +0 -0
  781. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/set-readonly.d.ts +0 -0
  782. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/set-required.d.ts +0 -0
  783. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/set-return-type.d.ts +0 -0
  784. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/shared-union-fields-deep.d.ts +0 -0
  785. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/single-key-object.d.ts +0 -0
  786. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/snake-case.d.ts +0 -0
  787. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/snake-cased-properties-deep.d.ts +0 -0
  788. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/snake-cased-properties.d.ts +0 -0
  789. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/split-words.d.ts +0 -0
  790. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/split.d.ts +0 -0
  791. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/spread.d.ts +0 -0
  792. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/string-key-of.d.ts +0 -0
  793. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/string-slice.d.ts +0 -0
  794. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/stringified.d.ts +0 -0
  795. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/subtract.d.ts +0 -0
  796. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/sum.d.ts +0 -0
  797. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/tagged-union.d.ts +0 -0
  798. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/trim.d.ts +0 -0
  799. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/tsconfig-json.d.ts +0 -0
  800. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/tuple-to-union.d.ts +0 -0
  801. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/typed-array.d.ts +0 -0
  802. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/undefined-on-partial-deep.d.ts +0 -0
  803. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/union-to-intersection.d.ts +0 -0
  804. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/unknown-array.d.ts +0 -0
  805. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/unknown-record.d.ts +0 -0
  806. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/value-of.d.ts +0 -0
  807. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/writable-deep.d.ts +0 -0
  808. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/writable-keys-of.d.ts +0 -0
  809. /package/node_modules/{remix-utils/node_modules/type-fest → type-fest}/source/writable.d.ts +0 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"_layout-Bdd3mpVx.js","sources":["../../../../../node_modules/@radix-ui/react-roving-focus/dist/index.mjs","../../../../../node_modules/@radix-ui/react-tabs/dist/index.mjs","../../../app/routes/set-playground.tsx","../../../../../node_modules/dayjs/dayjs.min.js","../../../../../node_modules/dayjs/plugin/relativeTime.js","../../../../../node_modules/dayjs/plugin/timezone.js","../../../../../node_modules/dayjs/plugin/utc.js","../../../app/utils/dayjs.ts","../../../app/routes/_app+/_exercises+/$exerciseNumber_.$stepNumber.$type+/__shared/discord.tsx","../../../app/routes/_app+/_exercises+/$exerciseNumber_.$stepNumber.$type+/__shared/playground-window.tsx","../../../app/routes/start.tsx","../../../app/components/in-browser-browser.tsx","../../../app/routes/_app+/_exercises+/$exerciseNumber_.$stepNumber.$type+/__shared/preview.tsx","../../../app/routes/_app+/_exercises+/$exerciseNumber_.$stepNumber.$type+/__shared/playground.tsx","../../../app/routes/update-mdx-cache.tsx","../../../app/routes/_app+/_exercises+/$exerciseNumber_.$stepNumber.$type+/__shared/step-mdx.tsx","../../../app/components/in-browser-test-runner.tsx","../../../app/routes/test.tsx","../../../app/routes/_app+/_exercises+/$exerciseNumber_.$stepNumber.$type+/__shared/tests.tsx","../../../../../node_modules/@radix-ui/react-popover/dist/index.mjs","../../../app/routes/_app+/_exercises+/$exerciseNumber_.$stepNumber.$type+/__shared/touched-files.tsx","../../../app/routes/_app+/_exercises+/$exerciseNumber_.$stepNumber.$type+/_layout.tsx"],"sourcesContent":["\"use client\";\n\n// packages/react/roving-focus/src/RovingFocusGroup.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 = null, setCurrentTabStopId] = useControllableState({\n prop: currentTabStopIdProp,\n defaultProp: defaultCurrentTabStopId,\n onChange: onCurrentTabStopIdChange\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 ...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 } = 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 }\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// packages/react/tabs/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 });\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 {\n\tgetAppByName,\n\tgetApps,\n\tisPlaygroundApp,\n\tisProblemApp,\n\tisSolutionApp,\n\tsetPlayground,\n} from '@epic-web/workshop-utils/apps.server'\nimport * as Select from '@radix-ui/react-select'\nimport { json, type ActionFunctionArgs } from '@remix-run/node'\nimport { useFetcher } from '@remix-run/react'\nimport { clsx } from 'clsx'\nimport { z } from 'zod'\nimport { Icon } from '#app/components/icons.tsx'\nimport { showProgressBarField } from '#app/components/progress-bar.tsx'\nimport { SimpleTooltip } from '#app/components/ui/tooltip.tsx'\nimport { getDiffCode } from '#app/utils/diff.server.ts'\nimport { ensureUndeployed, getErrorMessage } from '#app/utils/misc.tsx'\nimport { createToastHeaders } from '#app/utils/toast.server.ts'\n\nconst SetPlaygroundSchema = z.object({\n\tappName: z.string(),\n\treset: z\n\t\t.string()\n\t\t.nullable()\n\t\t.optional()\n\t\t.transform((v) => v === 'true'),\n})\n\nexport async function action({ request }: ActionFunctionArgs) {\n\tensureUndeployed()\n\tconst formData = await request.formData()\n\tconst rawData = {\n\t\tappName: formData.get('appName'),\n\t}\n\tconst result = SetPlaygroundSchema.safeParse(rawData)\n\tif (!result.success) {\n\t\treturn json({ status: 'error', error: result.error.message } as const, {\n\t\t\tstatus: 400,\n\t\t})\n\t}\n\tconst form = result.data\n\tconst app = await getAppByName(form.appName)\n\tif (!app) {\n\t\treturn json(\n\t\t\t{ status: 'error', error: `App ${form.appName} not found` } as const,\n\t\t\t{ status: 404 },\n\t\t)\n\t}\n\tconst converseApp =\n\t\tisProblemApp(app) && app.solutionName\n\t\t\t? await getAppByName(app.solutionName)\n\t\t\t: isSolutionApp(app) && app.problemName\n\t\t\t\t? await getAppByName(app.problemName)\n\t\t\t\t: undefined\n\ttry {\n\t\tawait setPlayground(app.fullPath, { reset: form.reset })\n\t} catch (error: unknown) {\n\t\tconst message = getErrorMessage(error)\n\t\tconsole.error('Error setting playground', message)\n\t\treturn json({ status: 'error', error: message } as const, {\n\t\t\tstatus: 500,\n\t\t\theaders: await createToastHeaders({\n\t\t\t\ttype: 'error',\n\t\t\t\ttitle: 'Error',\n\t\t\t\tdescription:\n\t\t\t\t\t'There was an error setting the playground. Check the terminal for details.',\n\t\t\t}),\n\t\t})\n\t}\n\tconst apps = await getApps({ forceFresh: true })\n\tconst playground = apps.find(isPlaygroundApp)\n\tif (playground && converseApp) {\n\t\tawait getDiffCode(playground, converseApp, { forceFresh: true })\n\t}\n\treturn json({ status: 'success' } as const)\n}\n\nexport function SetPlayground({\n\tappName,\n\treset = false,\n\ttooltipText,\n\t...buttonProps\n}: {\n\tappName: string\n\ttooltipText?: string\n\treset?: boolean\n} & React.ComponentProps<'button'>) {\n\tconst fetcher = useFetcher<typeof action>()\n\n\tconst submitButton = (\n\t\t<button\n\t\t\ttype=\"submit\"\n\t\t\t{...buttonProps}\n\t\t\tclassName={clsx(\n\t\t\t\tbuttonProps.className,\n\t\t\t\tfetcher.state !== 'idle' ? 'cursor-progress' : null,\n\t\t\t\tfetcher.data?.status === 'error' ? 'cursor-not-allowed' : null,\n\t\t\t)}\n\t\t/>\n\t)\n\treturn (\n\t\t<fetcher.Form\n\t\t\taction=\"/set-playground\"\n\t\t\tmethod=\"POST\"\n\t\t\tclassName=\"inline-flex items-center justify-center\"\n\t\t>\n\t\t\t<input type=\"hidden\" name=\"appName\" value={appName} />\n\t\t\t{reset ? <input type=\"hidden\" name=\"reset\" value=\"true\" /> : null}\n\t\t\t{showProgressBarField}\n\t\t\t{tooltipText ? (\n\t\t\t\t<SimpleTooltip content={tooltipText}>{submitButton}</SimpleTooltip>\n\t\t\t) : (\n\t\t\t\tsubmitButton\n\t\t\t)}\n\t\t</fetcher.Form>\n\t)\n}\n\nexport function PlaygroundChooser({\n\tplaygroundAppName,\n\tallApps,\n}: {\n\tplaygroundAppName?: string\n\tallApps: Array<{ name: string; displayName: string }>\n}) {\n\tconst fetcher = useFetcher<typeof action>()\n\treturn (\n\t\t<Select.Root\n\t\t\tname=\"appName\"\n\t\t\tvalue={playgroundAppName}\n\t\t\tonValueChange={(appName) => {\n\t\t\t\tfetcher.submit(\n\t\t\t\t\t{ appName },\n\t\t\t\t\t{ method: 'POST', action: '/set-playground' },\n\t\t\t\t)\n\t\t\t}}\n\t\t>\n\t\t\t<Select.Trigger\n\t\t\t\taria-label=\"Select app for playground\"\n\t\t\t\tclassName={clsx(\n\t\t\t\t\t'flex h-full w-full items-center justify-between text-left radix-placeholder:text-gray-500 focus-visible:outline-none',\n\t\t\t\t\tfetcher.state !== 'idle' ? 'cursor-progress' : null,\n\t\t\t\t\tfetcher.data?.status === 'error' ? 'cursor-not-allowed' : null,\n\t\t\t\t)}\n\t\t\t>\n\t\t\t\t<span className=\"w-80 flex-1 overflow-hidden text-ellipsis whitespace-nowrap scrollbar-thin scrollbar-thumb-scrollbar\">\n\t\t\t\t\t<Select.Value\n\t\t\t\t\t\tplaceholder=\"Select current app\"\n\t\t\t\t\t\tclassName=\"inline-block w-40 text-ellipsis\"\n\t\t\t\t\t/>\n\t\t\t\t</span>\n\t\t\t\t<Select.Icon>\n\t\t\t\t\t<Icon name=\"TriangleDownSmall\" />\n\t\t\t\t</Select.Icon>\n\t\t\t</Select.Trigger>\n\t\t\t<Select.Portal>\n\t\t\t\t<Select.Content\n\t\t\t\t\tposition=\"popper\"\n\t\t\t\t\talign=\"start\"\n\t\t\t\t\tclassName=\"z-20 max-h-[50vh] bg-black text-white lg:max-h-[70vh]\"\n\t\t\t\t>\n\t\t\t\t\t<Select.ScrollUpButton className=\"flex h-5 cursor-default items-center justify-center \">\n\t\t\t\t\t\t<Icon name=\"ChevronUp\" />\n\t\t\t\t\t</Select.ScrollUpButton>\n\t\t\t\t\t<Select.Viewport className=\"p-3\">\n\t\t\t\t\t\t<Select.Group>\n\t\t\t\t\t\t\t<Select.Label className=\"px-5 pb-3 font-mono uppercase\">\n\t\t\t\t\t\t\t\tApp\n\t\t\t\t\t\t\t</Select.Label>\n\t\t\t\t\t\t\t{allApps\n\t\t\t\t\t\t\t\t.filter((app) => app.name !== 'playground')\n\t\t\t\t\t\t\t\t.map((app) => {\n\t\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t\t<SelectItem key={app.name} value={app.name}>\n\t\t\t\t\t\t\t\t\t\t\t{app.displayName}\n\t\t\t\t\t\t\t\t\t\t</SelectItem>\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</Select.Group>\n\t\t\t\t\t</Select.Viewport>\n\t\t\t\t\t<Select.ScrollDownButton className=\"flex h-5 cursor-default items-center justify-center \">\n\t\t\t\t\t\t<Icon name=\"ChevronDown\" />\n\t\t\t\t\t</Select.ScrollDownButton>\n\t\t\t\t</Select.Content>\n\t\t\t</Select.Portal>\n\t\t</Select.Root>\n\t)\n}\n\nfunction SelectItem({\n\tvalue,\n\tchildren,\n}: {\n\tvalue: string\n\tchildren: React.ReactNode\n}) {\n\treturn (\n\t\t<Select.Item\n\t\t\tvalue={value}\n\t\t\tclassName=\"relative flex cursor-pointer select-none items-center rounded px-10 py-2 leading-none opacity-80 radix-disabled:text-red-500 radix-highlighted:opacity-100 radix-highlighted:outline-none radix-state-checked:opacity-100\"\n\t\t>\n\t\t\t<Select.ItemText>{children}</Select.ItemText>\n\t\t\t<Select.ItemIndicator className=\"absolute left-0 inline-flex w-[25px] items-center justify-center\">\n\t\t\t\t<Icon name=\"CheckSmall\" />\n\t\t\t</Select.ItemIndicator>\n\t\t</Select.Item>\n\t)\n}\n\nexport function SetAppToPlayground({ appName }: { appName: string }) {\n\tif (ENV.EPICSHOP_DEPLOYED) return null\n\treturn (\n\t\t<SetPlayground\n\t\t\tappName={appName}\n\t\t\ttooltipText=\"Playground is not set to the right app. Click to set Playground.\"\n\t\t>\n\t\t\t<span className=\"flex items-center justify-center gap-1 text-foreground-danger hover:underline\">\n\t\t\t\t<Icon name=\"Unlinked\" className=\"animate-ping\" />{' '}\n\t\t\t\t<span className=\"uppercase\">Set to Playground</span>\n\t\t\t</span>\n\t\t</SetPlayground>\n\t)\n}\n","!function(t,e){\"object\"==typeof exports&&\"undefined\"!=typeof module?module.exports=e():\"function\"==typeof define&&define.amd?define(e):(t=\"undefined\"!=typeof globalThis?globalThis:t||self).dayjs=e()}(this,(function(){\"use strict\";var t=1e3,e=6e4,n=36e5,r=\"millisecond\",i=\"second\",s=\"minute\",u=\"hour\",a=\"day\",o=\"week\",c=\"month\",f=\"quarter\",h=\"year\",d=\"date\",l=\"Invalid Date\",$=/^(\\d{4})[-/]?(\\d{1,2})?[-/]?(\\d{0,2})[Tt\\s]*(\\d{1,2})?:?(\\d{1,2})?:?(\\d{1,2})?[.:]?(\\d+)?$/,y=/\\[([^\\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,M={name:\"en\",weekdays:\"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday\".split(\"_\"),months:\"January_February_March_April_May_June_July_August_September_October_November_December\".split(\"_\"),ordinal:function(t){var e=[\"th\",\"st\",\"nd\",\"rd\"],n=t%100;return\"[\"+t+(e[(n-20)%10]||e[n]||e[0])+\"]\"}},m=function(t,e,n){var r=String(t);return!r||r.length>=e?t:\"\"+Array(e+1-r.length).join(n)+t},v={s:m,z:function(t){var e=-t.utcOffset(),n=Math.abs(e),r=Math.floor(n/60),i=n%60;return(e<=0?\"+\":\"-\")+m(r,2,\"0\")+\":\"+m(i,2,\"0\")},m:function t(e,n){if(e.date()<n.date())return-t(n,e);var r=12*(n.year()-e.year())+(n.month()-e.month()),i=e.clone().add(r,c),s=n-i<0,u=e.clone().add(r+(s?-1:1),c);return+(-(r+(n-i)/(s?i-u:u-i))||0)},a:function(t){return t<0?Math.ceil(t)||0:Math.floor(t)},p:function(t){return{M:c,y:h,w:o,d:a,D:d,h:u,m:s,s:i,ms:r,Q:f}[t]||String(t||\"\").toLowerCase().replace(/s$/,\"\")},u:function(t){return void 0===t}},g=\"en\",D={};D[g]=M;var p=\"$isDayjsObject\",S=function(t){return t instanceof _||!(!t||!t[p])},w=function t(e,n,r){var i;if(!e)return g;if(\"string\"==typeof e){var s=e.toLowerCase();D[s]&&(i=s),n&&(D[s]=n,i=s);var u=e.split(\"-\");if(!i&&u.length>1)return t(u[0])}else{var a=e.name;D[a]=e,i=a}return!r&&i&&(g=i),i||!r&&g},O=function(t,e){if(S(t))return t.clone();var n=\"object\"==typeof e?e:{};return n.date=t,n.args=arguments,new _(n)},b=v;b.l=w,b.i=S,b.w=function(t,e){return O(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var _=function(){function M(t){this.$L=w(t.locale,null,!0),this.parse(t),this.$x=this.$x||t.x||{},this[p]=!0}var m=M.prototype;return m.parse=function(t){this.$d=function(t){var e=t.date,n=t.utc;if(null===e)return new Date(NaN);if(b.u(e))return new Date;if(e instanceof Date)return new Date(e);if(\"string\"==typeof e&&!/Z$/i.test(e)){var r=e.match($);if(r){var i=r[2]-1||0,s=(r[7]||\"0\").substring(0,3);return n?new Date(Date.UTC(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)):new Date(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)}}return new Date(e)}(t),this.init()},m.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds()},m.$utils=function(){return b},m.isValid=function(){return!(this.$d.toString()===l)},m.isSame=function(t,e){var n=O(t);return this.startOf(e)<=n&&n<=this.endOf(e)},m.isAfter=function(t,e){return O(t)<this.startOf(e)},m.isBefore=function(t,e){return this.endOf(e)<O(t)},m.$g=function(t,e,n){return b.u(t)?this[e]:this.set(n,t)},m.unix=function(){return Math.floor(this.valueOf()/1e3)},m.valueOf=function(){return this.$d.getTime()},m.startOf=function(t,e){var n=this,r=!!b.u(e)||e,f=b.p(t),l=function(t,e){var i=b.w(n.$u?Date.UTC(n.$y,e,t):new Date(n.$y,e,t),n);return r?i:i.endOf(a)},$=function(t,e){return b.w(n.toDate()[t].apply(n.toDate(\"s\"),(r?[0,0,0,0]:[23,59,59,999]).slice(e)),n)},y=this.$W,M=this.$M,m=this.$D,v=\"set\"+(this.$u?\"UTC\":\"\");switch(f){case h:return r?l(1,0):l(31,11);case c:return r?l(1,M):l(0,M+1);case o:var g=this.$locale().weekStart||0,D=(y<g?y+7:y)-g;return l(r?m-D:m+(6-D),M);case a:case d:return $(v+\"Hours\",0);case u:return $(v+\"Minutes\",1);case s:return $(v+\"Seconds\",2);case i:return $(v+\"Milliseconds\",3);default:return this.clone()}},m.endOf=function(t){return this.startOf(t,!1)},m.$set=function(t,e){var n,o=b.p(t),f=\"set\"+(this.$u?\"UTC\":\"\"),l=(n={},n[a]=f+\"Date\",n[d]=f+\"Date\",n[c]=f+\"Month\",n[h]=f+\"FullYear\",n[u]=f+\"Hours\",n[s]=f+\"Minutes\",n[i]=f+\"Seconds\",n[r]=f+\"Milliseconds\",n)[o],$=o===a?this.$D+(e-this.$W):e;if(o===c||o===h){var y=this.clone().set(d,1);y.$d[l]($),y.init(),this.$d=y.set(d,Math.min(this.$D,y.daysInMonth())).$d}else l&&this.$d[l]($);return this.init(),this},m.set=function(t,e){return this.clone().$set(t,e)},m.get=function(t){return this[b.p(t)]()},m.add=function(r,f){var d,l=this;r=Number(r);var $=b.p(f),y=function(t){var e=O(l);return b.w(e.date(e.date()+Math.round(t*r)),l)};if($===c)return this.set(c,this.$M+r);if($===h)return this.set(h,this.$y+r);if($===a)return y(1);if($===o)return y(7);var M=(d={},d[s]=e,d[u]=n,d[i]=t,d)[$]||1,m=this.$d.getTime()+r*M;return b.w(m,this)},m.subtract=function(t,e){return this.add(-1*t,e)},m.format=function(t){var e=this,n=this.$locale();if(!this.isValid())return n.invalidDate||l;var r=t||\"YYYY-MM-DDTHH:mm:ssZ\",i=b.z(this),s=this.$H,u=this.$m,a=this.$M,o=n.weekdays,c=n.months,f=n.meridiem,h=function(t,n,i,s){return t&&(t[n]||t(e,r))||i[n].slice(0,s)},d=function(t){return b.s(s%12||12,t,\"0\")},$=f||function(t,e,n){var r=t<12?\"AM\":\"PM\";return n?r.toLowerCase():r};return r.replace(y,(function(t,r){return r||function(t){switch(t){case\"YY\":return String(e.$y).slice(-2);case\"YYYY\":return b.s(e.$y,4,\"0\");case\"M\":return a+1;case\"MM\":return b.s(a+1,2,\"0\");case\"MMM\":return h(n.monthsShort,a,c,3);case\"MMMM\":return h(c,a);case\"D\":return e.$D;case\"DD\":return b.s(e.$D,2,\"0\");case\"d\":return String(e.$W);case\"dd\":return h(n.weekdaysMin,e.$W,o,2);case\"ddd\":return h(n.weekdaysShort,e.$W,o,3);case\"dddd\":return o[e.$W];case\"H\":return String(s);case\"HH\":return b.s(s,2,\"0\");case\"h\":return d(1);case\"hh\":return d(2);case\"a\":return $(s,u,!0);case\"A\":return $(s,u,!1);case\"m\":return String(u);case\"mm\":return b.s(u,2,\"0\");case\"s\":return String(e.$s);case\"ss\":return b.s(e.$s,2,\"0\");case\"SSS\":return b.s(e.$ms,3,\"0\");case\"Z\":return i}return null}(t)||i.replace(\":\",\"\")}))},m.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},m.diff=function(r,d,l){var $,y=this,M=b.p(d),m=O(r),v=(m.utcOffset()-this.utcOffset())*e,g=this-m,D=function(){return b.m(y,m)};switch(M){case h:$=D()/12;break;case c:$=D();break;case f:$=D()/3;break;case o:$=(g-v)/6048e5;break;case a:$=(g-v)/864e5;break;case u:$=g/n;break;case s:$=g/e;break;case i:$=g/t;break;default:$=g}return l?$:b.a($)},m.daysInMonth=function(){return this.endOf(c).$D},m.$locale=function(){return D[this.$L]},m.locale=function(t,e){if(!t)return this.$L;var n=this.clone(),r=w(t,e,!0);return r&&(n.$L=r),n},m.clone=function(){return b.w(this.$d,this)},m.toDate=function(){return new Date(this.valueOf())},m.toJSON=function(){return this.isValid()?this.toISOString():null},m.toISOString=function(){return this.$d.toISOString()},m.toString=function(){return this.$d.toUTCString()},M}(),k=_.prototype;return O.prototype=k,[[\"$ms\",r],[\"$s\",i],[\"$m\",s],[\"$H\",u],[\"$W\",a],[\"$M\",c],[\"$y\",h],[\"$D\",d]].forEach((function(t){k[t[1]]=function(e){return this.$g(e,t[0],t[1])}})),O.extend=function(t,e){return t.$i||(t(e,_,O),t.$i=!0),O},O.locale=w,O.isDayjs=S,O.unix=function(t){return O(1e3*t)},O.en=D[g],O.Ls=D,O.p={},O}));","!function(r,e){\"object\"==typeof exports&&\"undefined\"!=typeof module?module.exports=e():\"function\"==typeof define&&define.amd?define(e):(r=\"undefined\"!=typeof globalThis?globalThis:r||self).dayjs_plugin_relativeTime=e()}(this,(function(){\"use strict\";return function(r,e,t){r=r||{};var n=e.prototype,o={future:\"in %s\",past:\"%s ago\",s:\"a few seconds\",m:\"a minute\",mm:\"%d minutes\",h:\"an hour\",hh:\"%d hours\",d:\"a day\",dd:\"%d days\",M:\"a month\",MM:\"%d months\",y:\"a year\",yy:\"%d years\"};function i(r,e,t,o){return n.fromToBase(r,e,t,o)}t.en.relativeTime=o,n.fromToBase=function(e,n,i,d,u){for(var f,a,s,l=i.$locale().relativeTime||o,h=r.thresholds||[{l:\"s\",r:44,d:\"second\"},{l:\"m\",r:89},{l:\"mm\",r:44,d:\"minute\"},{l:\"h\",r:89},{l:\"hh\",r:21,d:\"hour\"},{l:\"d\",r:35},{l:\"dd\",r:25,d:\"day\"},{l:\"M\",r:45},{l:\"MM\",r:10,d:\"month\"},{l:\"y\",r:17},{l:\"yy\",d:\"year\"}],m=h.length,c=0;c<m;c+=1){var y=h[c];y.d&&(f=d?t(e).diff(i,y.d,!0):i.diff(e,y.d,!0));var p=(r.rounding||Math.round)(Math.abs(f));if(s=f>0,p<=y.r||!y.r){p<=1&&c>0&&(y=h[c-1]);var v=l[y.l];u&&(p=u(\"\"+p)),a=\"string\"==typeof v?v.replace(\"%d\",p):v(p,n,y.l,s);break}}if(n)return a;var M=s?l.future:l.past;return\"function\"==typeof M?M(a):M.replace(\"%s\",a)},n.to=function(r,e){return i(r,e,this,!0)},n.from=function(r,e){return i(r,e,this)};var d=function(r){return r.$u?t.utc():t()};n.toNow=function(r){return this.to(d(this),r)},n.fromNow=function(r){return this.from(d(this),r)}}}));","!function(t,e){\"object\"==typeof exports&&\"undefined\"!=typeof module?module.exports=e():\"function\"==typeof define&&define.amd?define(e):(t=\"undefined\"!=typeof globalThis?globalThis:t||self).dayjs_plugin_timezone=e()}(this,(function(){\"use strict\";var t={year:0,month:1,day:2,hour:3,minute:4,second:5},e={};return function(n,i,o){var r,a=function(t,n,i){void 0===i&&(i={});var o=new Date(t),r=function(t,n){void 0===n&&(n={});var i=n.timeZoneName||\"short\",o=t+\"|\"+i,r=e[o];return r||(r=new Intl.DateTimeFormat(\"en-US\",{hour12:!1,timeZone:t,year:\"numeric\",month:\"2-digit\",day:\"2-digit\",hour:\"2-digit\",minute:\"2-digit\",second:\"2-digit\",timeZoneName:i}),e[o]=r),r}(n,i);return r.formatToParts(o)},u=function(e,n){for(var i=a(e,n),r=[],u=0;u<i.length;u+=1){var f=i[u],s=f.type,m=f.value,c=t[s];c>=0&&(r[c]=parseInt(m,10))}var d=r[3],l=24===d?0:d,h=r[0]+\"-\"+r[1]+\"-\"+r[2]+\" \"+l+\":\"+r[4]+\":\"+r[5]+\":000\",v=+e;return(o.utc(h).valueOf()-(v-=v%1e3))/6e4},f=i.prototype;f.tz=function(t,e){void 0===t&&(t=r);var n=this.utcOffset(),i=this.toDate(),a=i.toLocaleString(\"en-US\",{timeZone:t}),u=Math.round((i-new Date(a))/1e3/60),f=o(a,{locale:this.$L}).$set(\"millisecond\",this.$ms).utcOffset(15*-Math.round(i.getTimezoneOffset()/15)-u,!0);if(e){var s=f.utcOffset();f=f.add(n-s,\"minute\")}return f.$x.$timezone=t,f},f.offsetName=function(t){var e=this.$x.$timezone||o.tz.guess(),n=a(this.valueOf(),e,{timeZoneName:t}).find((function(t){return\"timezonename\"===t.type.toLowerCase()}));return n&&n.value};var s=f.startOf;f.startOf=function(t,e){if(!this.$x||!this.$x.$timezone)return s.call(this,t,e);var n=o(this.format(\"YYYY-MM-DD HH:mm:ss:SSS\"),{locale:this.$L});return s.call(n,t,e).tz(this.$x.$timezone,!0)},o.tz=function(t,e,n){var i=n&&e,a=n||e||r,f=u(+o(),a);if(\"string\"!=typeof t)return o(t).tz(a);var s=function(t,e,n){var i=t-60*e*1e3,o=u(i,n);if(e===o)return[i,e];var r=u(i-=60*(o-e)*1e3,n);return o===r?[i,o]:[t-60*Math.min(o,r)*1e3,Math.max(o,r)]}(o.utc(t,i).valueOf(),f,a),m=s[0],c=s[1],d=o(m).utcOffset(c);return d.$x.$timezone=a,d},o.tz.guess=function(){return Intl.DateTimeFormat().resolvedOptions().timeZone},o.tz.setDefault=function(t){r=t}}}));","!function(t,i){\"object\"==typeof exports&&\"undefined\"!=typeof module?module.exports=i():\"function\"==typeof define&&define.amd?define(i):(t=\"undefined\"!=typeof globalThis?globalThis:t||self).dayjs_plugin_utc=i()}(this,(function(){\"use strict\";var t=\"minute\",i=/[+-]\\d\\d(?::?\\d\\d)?/g,e=/([+-]|\\d\\d)/g;return function(s,f,n){var u=f.prototype;n.utc=function(t){var i={date:t,utc:!0,args:arguments};return new f(i)},u.utc=function(i){var e=n(this.toDate(),{locale:this.$L,utc:!0});return i?e.add(this.utcOffset(),t):e},u.local=function(){return n(this.toDate(),{locale:this.$L,utc:!1})};var o=u.parse;u.parse=function(t){t.utc&&(this.$u=!0),this.$utils().u(t.$offset)||(this.$offset=t.$offset),o.call(this,t)};var r=u.init;u.init=function(){if(this.$u){var t=this.$d;this.$y=t.getUTCFullYear(),this.$M=t.getUTCMonth(),this.$D=t.getUTCDate(),this.$W=t.getUTCDay(),this.$H=t.getUTCHours(),this.$m=t.getUTCMinutes(),this.$s=t.getUTCSeconds(),this.$ms=t.getUTCMilliseconds()}else r.call(this)};var a=u.utcOffset;u.utcOffset=function(s,f){var n=this.$utils().u;if(n(s))return this.$u?0:n(this.$offset)?a.call(this):this.$offset;if(\"string\"==typeof s&&(s=function(t){void 0===t&&(t=\"\");var s=t.match(i);if(!s)return null;var f=(\"\"+s[0]).match(e)||[\"-\",0,0],n=f[0],u=60*+f[1]+ +f[2];return 0===u?0:\"+\"===n?u:-u}(s),null===s))return this;var u=Math.abs(s)<=16?60*s:s,o=this;if(f)return o.$offset=u,o.$u=0===s,o;if(0!==s){var r=this.$u?this.toDate().getTimezoneOffset():-1*this.utcOffset();(o=this.local().add(u+r,t)).$offset=u,o.$x.$localOffset=r}else o=this.utc();return o};var h=u.format;u.format=function(t){var i=t||(this.$u?\"YYYY-MM-DDTHH:mm:ss[Z]\":\"\");return h.call(this,i)},u.valueOf=function(){var t=this.$utils().u(this.$offset)?0:this.$offset+(this.$x.$localOffset||this.$d.getTimezoneOffset());return this.$d.valueOf()-6e4*t},u.isUTC=function(){return!!this.$u},u.toISOString=function(){return this.toDate().toISOString()},u.toString=function(){return this.toDate().toUTCString()};var l=u.toDate;u.toDate=function(t){return\"s\"===t&&this.$offset?n(this.format(\"YYYY-MM-DD HH:mm:ss:SSS\")).toDate():l.call(this)};var c=u.diff;u.diff=function(t,i,e){if(t&&this.$u===t.$u)return c.call(this,t,i,e);var s=this.local(),f=n(t).local();return c.call(s,f,i,e)}}}));","import dayjs from 'dayjs'\nimport relativeTimePlugin from 'dayjs/plugin/relativeTime.js'\nimport timeZonePlugin from 'dayjs/plugin/timezone.js'\nimport utcPlugin from 'dayjs/plugin/utc.js'\n\ndayjs.extend(utcPlugin)\ndayjs.extend(timeZonePlugin)\ndayjs.extend(relativeTimePlugin)\n\nexport { dayjs }\n","import { Await, Link, useLoaderData } from '@remix-run/react'\nimport * as React from 'react'\nimport { type z } from 'zod'\nimport { Icon } from '#app/components/icons.tsx'\nimport { Loading } from '#app/components/loading.tsx'\nimport { useHints } from '#app/utils/client-hints.tsx'\nimport { dayjs } from '#app/utils/dayjs.ts'\nimport { useAltDown } from '#app/utils/misc.tsx'\nimport { DiscordCTA, useDiscordCTALink } from '../../../discord.tsx'\nimport { type loader } from '../_layout.tsx'\nimport { type ThreadItemSchema } from './discord.server.ts'\n\nexport function DiscordChat() {\n\tconst data = useLoaderData<typeof loader>()\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 discordAuthUrl={data.discordAuthUrl} />\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({ discordAuthUrl: data.discordAuthUrl })\n\tconst altDown = useAltDown()\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({ thread }: { thread: z.infer<typeof ThreadItemSchema> }) {\n\tconst reactionsWithCounts = thread.reactions.filter((r) => r.count)\n\tconst hints = useHints()\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{` · ${dayjs(thread.lastUpdated).tz(hints.timeZone).fromNow()}`}\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 { Icon } from '#app/components/icons'\nimport { SimpleTooltip } from '#app/components/ui/tooltip.js'\nimport { PlaygroundChooser, SetPlayground } from '#app/routes/set-playground'\n\nexport function PlaygroundWindow({\n\tplaygroundAppName,\n\tproblemAppName,\n\tisUpToDate,\n\tallApps,\n\tchildren,\n}: {\n\tplaygroundAppName?: string\n\tproblemAppName?: string\n\tisUpToDate: boolean\n\tallApps: Array<{ name: string; displayName: string }>\n\tchildren: React.ReactNode\n}) {\n\tconst isCorrectApp = playgroundAppName === problemAppName\n\tconst playgroundLinkedUI =\n\t\tisCorrectApp && isUpToDate ? (\n\t\t\t<Icon size=\"xl\" name=\"Linked\" />\n\t\t) : (\n\t\t\t<Icon\n\t\t\t\tsize=\"xl\"\n\t\t\t\tname=\"Unlinked\"\n\t\t\t\tclassName=\"animate-pulse text-foreground-danger\"\n\t\t\t/>\n\t\t)\n\tlet setPlaygroundTooltipText = 'Click to reset Playground.'\n\tif (!isUpToDate) {\n\t\tsetPlaygroundTooltipText =\n\t\t\t'Playground is out of date. Click to reset Playground.'\n\t}\n\tif (!isCorrectApp) {\n\t\tsetPlaygroundTooltipText =\n\t\t\t'Playground is not set to the right app. Click to set Playground.'\n\t}\n\treturn (\n\t\t<div className=\"flex h-full w-full flex-col justify-between\">\n\t\t\t<div className=\"flex h-14 flex-shrink-0 items-center justify-start gap-2 border-b px-3\">\n\t\t\t\t<div className=\"display-alt-up\">\n\t\t\t\t\t{problemAppName ? (\n\t\t\t\t\t\t<SetPlayground\n\t\t\t\t\t\t\tappName={problemAppName}\n\t\t\t\t\t\t\ttooltipText={setPlaygroundTooltipText}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{playgroundLinkedUI}\n\t\t\t\t\t\t</SetPlayground>\n\t\t\t\t\t) : (\n\t\t\t\t\t\t<SimpleTooltip content=\"No problem app available for this step\">\n\t\t\t\t\t\t\t<div>\n\t\t\t\t\t\t\t\t<Icon name=\"Question\" />\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</SimpleTooltip>\n\t\t\t\t\t)}\n\t\t\t\t</div>\n\t\t\t\t<div className=\"display-alt-down\">\n\t\t\t\t\t{playgroundAppName ? (\n\t\t\t\t\t\t<SetPlayground\n\t\t\t\t\t\t\tappName={playgroundAppName}\n\t\t\t\t\t\t\treset\n\t\t\t\t\t\t\ttooltipText=\"Reset Playground\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<div className=\"flex h-7 w-7 items-center justify-center\">\n\t\t\t\t\t\t\t\t<Icon name=\"Refresh\" />\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</SetPlayground>\n\t\t\t\t\t) : (\n\t\t\t\t\t\t<div className=\"h-7 w-7\" />\n\t\t\t\t\t)}\n\t\t\t\t</div>\n\t\t\t\t<PlaygroundChooser\n\t\t\t\t\tallApps={allApps}\n\t\t\t\t\tplaygroundAppName={playgroundAppName}\n\t\t\t\t/>\n\t\t\t</div>\n\t\t\t<div className=\"flex h-full flex-1 flex-grow items-center justify-center\">\n\t\t\t\t{children}\n\t\t\t</div>\n\t\t</div>\n\t)\n}\n","import { invariant, invariantResponse } from '@epic-web/invariant'\nimport { getAppByName } from '@epic-web/workshop-utils/apps.server'\nimport {\n\tcloseProcess,\n\trunAppDev,\n\tstopPort,\n\twaitOnApp,\n} from '@epic-web/workshop-utils/process-manager.server'\nimport { json, type ActionFunctionArgs } from '@remix-run/node'\nimport { useFetcher } from '@remix-run/react'\nimport { Button } from '#app/components/button.tsx'\nimport { Loading } from '#app/components/loading.tsx'\nimport { showProgressBarField } from '#app/components/progress-bar.tsx'\nimport { ensureUndeployed, useAltDown } from '#app/utils/misc.tsx'\nimport { createToastHeaders } from '#app/utils/toast.server'\n\nexport async function action({ request }: ActionFunctionArgs) {\n\tensureUndeployed()\n\tconst formData = await request.formData()\n\tconst intent = formData.get('intent')\n\tinvariantResponse(typeof intent === 'string', 'intent is required')\n\n\tif (intent === 'start' || intent === 'stop' || intent === 'restart') {\n\t\tconst name = formData.get('name')\n\t\tinvariantResponse(typeof name === 'string', 'name is required')\n\t\tconst app = await getAppByName(name)\n\t\tif (!app) {\n\t\t\tthrow new Response('Not found', { status: 404 })\n\t\t}\n\t\tif (app.dev.type !== 'script') {\n\t\t\tthrow new Response(`App \"${name}\" does not have a server`, {\n\t\t\t\tstatus: 400,\n\t\t\t})\n\t\t}\n\n\t\tasync function startApp() {\n\t\t\tinvariant(app, 'app must be defined')\n\t\t\tconst result = await runAppDev(app)\n\t\t\tif (result.running) {\n\t\t\t\tconst appRunningResult = await waitOnApp(app)\n\t\t\t\tif (appRunningResult?.status === 'success') {\n\t\t\t\t\t// wait another 200ms just in case the build output for assets isn't finished\n\t\t\t\t\tawait new Promise((resolve) => setTimeout(resolve, 200))\n\t\t\t\t\treturn json({ status: 'app-started' } as const)\n\t\t\t\t} else if (app.dev.type === 'script') {\n\t\t\t\t\tconst errorMessage = appRunningResult\n\t\t\t\t\t\t? appRunningResult.error\n\t\t\t\t\t\t: 'Unknown error'\n\t\t\t\t\treturn json(\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tstatus: 'app-not-started',\n\t\t\t\t\t\t\terror: errorMessage,\n\t\t\t\t\t\t\tport: app.dev.portNumber,\n\t\t\t\t\t\t} as const,\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tstatus: 500,\n\t\t\t\t\t\t\tstatusText: 'App did not start',\n\t\t\t\t\t\t\theaders: await createToastHeaders({\n\t\t\t\t\t\t\t\tdescription: errorMessage,\n\t\t\t\t\t\t\t\ttitle: 'App did not start',\n\t\t\t\t\t\t\t\ttype: 'error',\n\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t},\n\t\t\t\t\t)\n\t\t\t\t}\n\t\t\t} else if (result.portNumber) {\n\t\t\t\treturn json({\n\t\t\t\t\tstatus: 'app-not-started',\n\t\t\t\t\terror: result.status,\n\t\t\t\t\tport: result.portNumber,\n\t\t\t\t} as const)\n\t\t\t} else {\n\t\t\t\tthrow new Response(\n\t\t\t\t\t'Tried starting a server for an app that does not have one',\n\t\t\t\t\t{ status: 400 },\n\t\t\t\t)\n\t\t\t}\n\t\t}\n\n\t\tasync function stopApp() {\n\t\t\tinvariant(app, 'app must be defined')\n\t\t\tawait closeProcess(app.name)\n\t\t\treturn json({ status: 'app-stopped' } as const)\n\t\t}\n\n\t\tswitch (intent) {\n\t\t\tcase 'start': {\n\t\t\t\treturn startApp()\n\t\t\t}\n\t\t\tcase 'stop': {\n\t\t\t\treturn stopApp()\n\t\t\t}\n\t\t\tcase 'restart': {\n\t\t\t\tawait stopApp()\n\t\t\t\treturn startApp()\n\t\t\t}\n\t\t}\n\t}\n\n\tif (intent === 'stop-port') {\n\t\tconst port = formData.get('port')\n\t\tinvariantResponse(typeof port === 'string', 'port is required')\n\t\tawait stopPort(port)\n\t\treturn json({ status: 'port-stopped' } as const)\n\t}\n\tthrow new Error(`Unknown intent: ${intent}`)\n}\n\nexport function AppStopper({ name }: { name: string }) {\n\tconst fetcher = useFetcher<typeof action>()\n\tconst inFlightIntent = fetcher.formData?.get('intent')\n\tconst inFlightState =\n\t\tinFlightIntent === 'stop'\n\t\t\t? 'Stopping App'\n\t\t\t: inFlightIntent === 'restart'\n\t\t\t\t? 'Restarting App'\n\t\t\t\t: null\n\tconst altDown = useAltDown()\n\treturn (\n\t\t<fetcher.Form method=\"POST\" action=\"/start\">\n\t\t\t{showProgressBarField}\n\t\t\t<input type=\"hidden\" name=\"name\" value={name} />\n\t\t\t<button\n\t\t\t\ttype=\"submit\"\n\t\t\t\tname=\"intent\"\n\t\t\t\tvalue={altDown ? 'restart' : 'stop'}\n\t\t\t\tclassName=\"h-full border-r px-3 py-4 font-mono text-xs uppercase leading-none\"\n\t\t\t>\n\t\t\t\t{inFlightState ? inFlightState : altDown ? 'Restart App' : 'Stop App'}\n\t\t\t</button>\n\t\t</fetcher.Form>\n\t)\n}\n\nexport function PortStopper({ port }: { port: number | string }) {\n\tconst fetcher = useFetcher<typeof action>()\n\n\treturn (\n\t\t<fetcher.Form method=\"POST\" action=\"/start\">\n\t\t\t<input type=\"hidden\" name=\"port\" value={port} />\n\t\t\t<Button varient=\"mono\" type=\"submit\" name=\"intent\" value=\"stop-port\">\n\t\t\t\t{fetcher.state === 'idle' ? 'Stop Port' : 'Stopping Port'}\n\t\t\t</Button>\n\t\t</fetcher.Form>\n\t)\n}\n\nexport function AppStarter({ name }: { name: string }) {\n\tconst fetcher = useFetcher<typeof action>()\n\tif (fetcher.data?.status === 'app-not-started') {\n\t\tif (fetcher.data.error === 'port-unavailable') {\n\t\t\treturn (\n\t\t\t\t<div>\n\t\t\t\t\tThe port is unavailable. Would you like to stop whatever is running on\n\t\t\t\t\tthat port and try again?\n\t\t\t\t\t<PortStopper port={fetcher.data.port} />\n\t\t\t\t</div>\n\t\t\t)\n\t\t} else {\n\t\t\treturn <div>An unknown error has happened.</div>\n\t\t}\n\t}\n\treturn (\n\t\t<fetcher.Form method=\"POST\" action=\"/start\">\n\t\t\t<input type=\"hidden\" name=\"name\" value={name} />\n\t\t\t{fetcher.state === 'idle' ? (\n\t\t\t\t<Button type=\"submit\" name=\"intent\" value=\"start\" varient=\"mono\">\n\t\t\t\t\tStart App\n\t\t\t\t</Button>\n\t\t\t) : (\n\t\t\t\t<div>\n\t\t\t\t\t<Loading>Starting App</Loading>\n\t\t\t\t</div>\n\t\t\t)}\n\t\t</fetcher.Form>\n\t)\n}\n","import { Form, useSearchParams, type NavigateFunction } from '@remix-run/react'\nimport { clsx } from 'clsx'\nimport {\n\tforwardRef,\n\tuseEffect,\n\tuseImperativeHandle,\n\tuseRef,\n\tuseState,\n\ttype ForwardedRef,\n} from 'react'\nimport { z } from 'zod'\nimport { Icon } from '#app/components/icons.tsx'\nimport { AppStarter, AppStopper, PortStopper } from '#app/routes/start.tsx'\nimport { getBaseUrl } from '#app/utils/misc.tsx'\nimport { useRequestInfo } from '#app/utils/request-info.ts'\nimport {\n\tTooltip,\n\tTooltipContent,\n\tTooltipProvider,\n\tTooltipTrigger,\n} from './ui/tooltip.tsx'\n\nconst historyCallDataSchema = z.intersection(\n\tz.object({\n\t\ttype: z.literal('epicshop:history-call'),\n\t}),\n\tz.union([\n\t\tz.object({\n\t\t\tmethod: z.literal('pushState'),\n\t\t\targs: z.union([\n\t\t\t\tz.tuple([z.object({}).passthrough(), z.unknown()]),\n\t\t\t\tz.tuple([z.object({}).passthrough(), z.unknown(), z.string()]),\n\t\t\t]),\n\t\t}),\n\t\tz.object({\n\t\t\tmethod: z.literal('replaceState'),\n\t\t\targs: z.union([\n\t\t\t\tz.tuple([z.object({}).passthrough(), z.unknown()]),\n\t\t\t\tz.tuple([z.object({}).passthrough(), z.unknown(), z.string()]),\n\t\t\t]),\n\t\t}),\n\t\tz.object({\n\t\t\tmethod: z.literal('go'),\n\t\t\targs: z.tuple([z.number().optional()]),\n\t\t}),\n\t\tz.object({ method: z.literal('forward'), args: z.tuple([]) }),\n\t\tz.object({ method: z.literal('back'), args: z.tuple([]) }),\n\t\tz.object({\n\t\t\tmethod: z.literal('popstate'),\n\t\t\tpathname: z.string(),\n\t\t\tdelta: z.number(),\n\t\t}),\n\t]),\n)\n\nconst loadedSchema = z.object({\n\ttype: z.literal('epicshop:loaded'),\n\turl: z.string(),\n})\n\nconst messageSchema = z.union([historyCallDataSchema, loadedSchema])\n\nfunction getNewIndex(prevIndex: number, delta: number, max: number) {\n\t// keep the index bound between 0 and the history length\n\treturn Math.min(Math.max(prevIndex + delta, 0), max)\n}\n\ntype Props = {\n\tid: string\n\tname: string\n\tport: number\n\tportIsAvailable: boolean | null\n\tisRunning: boolean\n\tbaseUrl: string\n\tinitialRoute: string\n}\n\nexport type InBrowserBrowserRef = {\n\thandleExtrnalNavigation: (pathname?: string) => void\n}\n\nexport const InBrowserBrowser = forwardRef<InBrowserBrowserRef, Props>(\n\tInBrowserBrowserImpl,\n)\n\nfunction InBrowserBrowserImpl(\n\t{ name, port, portIsAvailable, isRunning, baseUrl, id, initialRoute }: Props,\n\tref: ForwardedRef<InBrowserBrowserRef>,\n) {\n\tconst requestInfo = useRequestInfo()\n\treturn isRunning ? (\n\t\t<InBrowserBrowserForRealz\n\t\t\tbaseUrl={baseUrl}\n\t\t\tid={id}\n\t\t\tname={name}\n\t\t\tref={ref}\n\t\t\tinitialRoute={initialRoute}\n\t\t/>\n\t) : portIsAvailable === false ? (\n\t\t<div className=\"flex flex-col items-center justify-center\">\n\t\t\t<p className=\"max-w-xs pb-5 text-center\" role=\"status\">\n\t\t\t\t{`The port for this app is unavailable. It could be that you're running it `}\n\t\t\t\t<a\n\t\t\t\t\thref={getBaseUrl({ domain: requestInfo.domain, port })}\n\t\t\t\t\tclassName=\"underline\"\n\t\t\t\t>\n\t\t\t\t\telsewhere\n\t\t\t\t</a>\n\t\t\t\t?\n\t\t\t</p>\n\t\t\t<PortStopper port={port} />\n\t\t</div>\n\t) : (\n\t\t<AppStarter name={name} />\n\t)\n}\ntype RealBrowserProps = {\n\tbaseUrl: string\n\tid: string\n\tname: string\n\tinitialRoute: string\n}\n\nconst InBrowserBrowserForRealz = forwardRef<\n\tInBrowserBrowserRef,\n\tRealBrowserProps\n>(InBrowserBrowserForRealzImpl)\n\n// we're doing this to ensure all of this complex stuff doesn't happen unless\n// the iframe is actually rendered.\nfunction InBrowserBrowserForRealzImpl(\n\t{ baseUrl, id, name, initialRoute }: RealBrowserProps,\n\tref: ForwardedRef<InBrowserBrowserRef>,\n) {\n\tconst [searchParams, setSearchParams] = useSearchParams()\n\tconst searchParamsPathname = searchParams.get('pathname') ?? initialRoute\n\tconst [iframeKeyNumber, setIframeKeyNumber] = useState(0)\n\tconst iframeKey = id + iframeKeyNumber\n\tconst lastDirectionRef = useRef<'forward' | 'back' | 'new'>('new')\n\tconst lastDirectionTimeout = useRef<ReturnType<typeof setTimeout> | null>(\n\t\tnull,\n\t)\n\tconst [iframeContext, setIFrameContext] = useState({\n\t\thistory: [searchParamsPathname],\n\t\tindex: 0,\n\t})\n\tconst [pathnameInputValue, setPathnameInputValue] =\n\t\tuseState(searchParamsPathname)\n\tconst iframeRef = useRef<HTMLIFrameElement>(null)\n\n\tconst appUrl = new URL(searchParamsPathname, baseUrl)\n\tconst currentAppUrl = useRef(appUrl)\n\tuseEffect(() => {\n\t\tcurrentAppUrl.current = appUrl\n\t})\n\n\t/** changing the iframeSrcUrl will trigger a reload of the iframe */\n\tconst [iframeSrcUrl, setIframeSrcUrl] = useState(appUrl)\n\n\tconst currentId = useRef(id)\n\t// if the id changes, then we're going to reload the iframe, but we want to\n\t// make sure to preserve the pathname so we set the src to the current pathname\n\t// this is one of the few side-effects in render that are \"ok\"\n\tif (currentId.current !== id) {\n\t\tcurrentId.current = id\n\t\tsetIframeSrcUrl(currentAppUrl.current)\n\t}\n\tuseEffect(() => {\n\t\tcurrentId.current = id\n\t})\n\n\tuseEffect(() => {\n\t\tfunction handleMessage(messageEvent: MessageEvent) {\n\t\t\tif (messageEvent.source !== iframeRef.current?.contentWindow) return\n\n\t\t\tconst result = messageSchema.safeParse(messageEvent.data, {\n\t\t\t\tpath: ['messageEvent', 'data'],\n\t\t\t})\n\t\t\tif (!result.success) return\n\t\t\tconst { data } = result\n\n\t\t\tif (data.type === 'epicshop:loaded') {\n\t\t\t\tsetIFrameContext((prevContext) => {\n\t\t\t\t\tconst newIndex = (i: number) =>\n\t\t\t\t\t\tgetNewIndex(prevContext.index, i, prevContext.history.length - 1)\n\t\t\t\t\tif (lastDirectionRef.current === 'back') {\n\t\t\t\t\t\treturn { ...prevContext, index: newIndex(-1) }\n\t\t\t\t\t} else if (lastDirectionRef.current === 'forward') {\n\t\t\t\t\t\treturn { ...prevContext, index: newIndex(1) }\n\t\t\t\t\t} else if (lastDirectionRef.current === 'new') {\n\t\t\t\t\t\tconst currentPathname = prevContext.history[prevContext.index]\n\t\t\t\t\t\tconst newPathname = new URL(data.url).pathname\n\t\t\t\t\t\tif (currentPathname === newPathname) return prevContext\n\n\t\t\t\t\t\tconst newHistory = [\n\t\t\t\t\t\t\t...prevContext.history.slice(0, prevContext.index + 1),\n\t\t\t\t\t\t\tnewPathname,\n\t\t\t\t\t\t]\n\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\thistory: newHistory,\n\t\t\t\t\t\t\tindex: newHistory.length - 1,\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthrow new Error('Unexpected lastDirectionRef value')\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t\treturn\n\t\t\t}\n\n\t\t\tconst { method } = data\n\t\t\tsetIFrameContext((prevContext) => {\n\t\t\t\tconst newIndex = (i: number) =>\n\t\t\t\t\tgetNewIndex(prevContext.index, i, prevContext.history.length - 1)\n\t\t\t\tconst currentPathname = prevContext.history[prevContext.index]\n\t\t\t\tswitch (method) {\n\t\t\t\t\tcase 'popstate': {\n\t\t\t\t\t\treturn { ...prevContext, index: newIndex(data.delta) }\n\t\t\t\t\t}\n\t\t\t\t\tcase 'forward': {\n\t\t\t\t\t\treturn { ...prevContext, index: newIndex(1) }\n\t\t\t\t\t}\n\t\t\t\t\tcase 'back': {\n\t\t\t\t\t\treturn { ...prevContext, index: newIndex(-1) }\n\t\t\t\t\t}\n\t\t\t\t\tcase 'pushState': {\n\t\t\t\t\t\tconst pathname = data.args[2] ?? currentPathname\n\t\t\t\t\t\tconst newHistory = [\n\t\t\t\t\t\t\t...prevContext.history.slice(0, prevContext.index + 1),\n\t\t\t\t\t\t\tpathname,\n\t\t\t\t\t\t].filter(Boolean)\n\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\t...prevContext,\n\t\t\t\t\t\t\thistory: newHistory,\n\t\t\t\t\t\t\tindex: newHistory.length - 1,\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tcase 'replaceState': {\n\t\t\t\t\t\tconst pathname = data.args[2] ?? currentPathname\n\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\t...prevContext,\n\t\t\t\t\t\t\thistory: [\n\t\t\t\t\t\t\t\t...prevContext.history.slice(0, prevContext.index),\n\t\t\t\t\t\t\t\tpathname,\n\t\t\t\t\t\t\t\t...prevContext.history.slice(prevContext.index + 1),\n\t\t\t\t\t\t\t].filter(Boolean),\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tcase 'go': {\n\t\t\t\t\t\tconst [delta = 0] = data.args\n\t\t\t\t\t\treturn { ...prevContext, index: newIndex(delta) }\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t})\n\t\t}\n\t\twindow.addEventListener('message', handleMessage)\n\t\treturn () => {\n\t\t\twindow.removeEventListener('message', handleMessage)\n\t\t}\n\t}, [])\n\n\t// setSearchParams is unstable\n\t// https://github.com/remix-run/react-router/issues/9991\n\tconst setSearchParamsLatestRef = useRef(setSearchParams)\n\tuseEffect(() => {\n\t\tsetSearchParamsLatestRef.current = setSearchParams\n\t}, [setSearchParams])\n\n\tconst iframePathname = iframeContext.history[iframeContext.index]\n\tuseEffect(() => {\n\t\tif (!iframePathname) return\n\n\t\tsetPathnameInputValue(iframePathname)\n\n\t\tconst newSearchParams = new URLSearchParams(window.location.search)\n\t\tif (iframePathname === '/') {\n\t\t\tnewSearchParams.delete('pathname')\n\t\t} else {\n\t\t\tnewSearchParams.set('pathname', iframePathname)\n\t\t}\n\t\tconst newSearch = newSearchParams.toString()\n\t\tif (`?${newSearch}` !== window.location.search) {\n\t\t\tsetSearchParamsLatestRef.current(newSearchParams, { replace: true })\n\t\t}\n\t}, [iframePathname])\n\n\tconst navigateChild: NavigateFunction = (...params) => {\n\t\tconst to = params[0]\n\t\tif (typeof to === 'number') {\n\t\t\t// this part feels very brittle to me...\n\t\t\tlastDirectionRef.current = to > 0 ? 'forward' : 'back'\n\t\t} else {\n\t\t\tlastDirectionRef.current = 'new'\n\t\t}\n\t\tif (lastDirectionTimeout.current) {\n\t\t\tclearTimeout(lastDirectionTimeout.current)\n\t\t}\n\t\tlastDirectionTimeout.current = setTimeout(() => {\n\t\t\tlastDirectionRef.current = 'new'\n\t\t}, 100)\n\t\tiframeRef.current?.contentWindow?.postMessage(\n\t\t\t{ type: 'epicshop:navigate-call', params },\n\t\t\t'*',\n\t\t)\n\t}\n\n\tfunction handleExtrnalNavigation(\n\t\tnewPathnameInputValue: string = pathnameInputValue,\n\t) {\n\t\tsetPathnameInputValue(newPathnameInputValue)\n\n\t\tconst currentPathname = iframeContext.history[iframeContext.index]\n\t\tnavigateChild(newPathnameInputValue, {\n\t\t\treplace: currentPathname === newPathnameInputValue,\n\t\t})\n\t}\n\n\tuseImperativeHandle(ref, () => ({ handleExtrnalNavigation }))\n\n\tconst atEndOfHistory =\n\t\tiframeContext.index === iframeContext.history.length - 1\n\tconst atStartOfHistory = iframeContext.index <= 0\n\tconst existingSearchParamHiddenInputs: Array<React.ReactElement> = []\n\tfor (const [key, value] of searchParams.entries()) {\n\t\tif (key === 'pathname') continue\n\n\t\texistingSearchParamHiddenInputs.push(\n\t\t\t<input key={key} type=\"hidden\" name={key} value={value} />,\n\t\t)\n\t}\n\n\treturn (\n\t\t<TooltipProvider>\n\t\t\t<div className=\"flex h-full flex-grow flex-col\">\n\t\t\t\t<div className=\"flex items-center justify-between border-b pl-1.5\">\n\t\t\t\t\t<div className=\"mr-2 flex items-center justify-center gap-2 px-1\">\n\t\t\t\t\t\t<Tooltip>\n\t\t\t\t\t\t\t<TooltipTrigger asChild>\n\t\t\t\t\t\t\t\t<button\n\t\t\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\t\t\tclassName=\"hidden aspect-square h-full w-full items-center justify-center p-1 transition disabled:opacity-40 sm:flex\"\n\t\t\t\t\t\t\t\t\tdisabled={atStartOfHistory}\n\t\t\t\t\t\t\t\t\tonClick={() => navigateChild(-1)}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<Icon name=\"ArrowLeft\" aria-hidden=\"true\" />\n\t\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t\t</TooltipTrigger>\n\t\t\t\t\t\t\t<TooltipContent>Go back</TooltipContent>\n\t\t\t\t\t\t</Tooltip>\n\t\t\t\t\t\t<Tooltip>\n\t\t\t\t\t\t\t<TooltipTrigger asChild>\n\t\t\t\t\t\t\t\t<button\n\t\t\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\t\t\tclassName=\"hidden aspect-square h-full w-full items-center justify-center p-1 transition disabled:opacity-40 sm:flex\"\n\t\t\t\t\t\t\t\t\tdisabled={atEndOfHistory}\n\t\t\t\t\t\t\t\t\tonClick={() => navigateChild(1)}\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t<Icon name=\"ArrowRight\" aria-hidden=\"true\" />\n\t\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t\t</TooltipTrigger>\n\t\t\t\t\t\t\t<TooltipContent>Go forward</TooltipContent>\n\t\t\t\t\t\t</Tooltip>\n\t\t\t\t\t\t<Tooltip>\n\t\t\t\t\t\t\t<TooltipTrigger asChild>\n\t\t\t\t\t\t\t\t<button\n\t\t\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\t\t\tclassName=\"flex aspect-square h-full w-full items-center justify-center p-1 transition disabled:opacity-40\"\n\t\t\t\t\t\t\t\t\tonClick={() => {\n\t\t\t\t\t\t\t\t\t\tsetIframeSrcUrl(appUrl)\n\t\t\t\t\t\t\t\t\t\tsetIframeKeyNumber(iframeKeyNumber + 1)\n\t\t\t\t\t\t\t\t\t\t// TODO: figure out how we can avoid having to do this...\n\t\t\t\t\t\t\t\t\t\t// I stayed up for hours one night trying and couldn't work out\n\t\t\t\t\t\t\t\t\t\t// why react router wouldn't update the UI when using back/forward\n\t\t\t\t\t\t\t\t\t\t// after a refresh.\n\t\t\t\t\t\t\t\t\t\tsetIFrameContext({\n\t\t\t\t\t\t\t\t\t\t\thistory: [appUrl.pathname],\n\t\t\t\t\t\t\t\t\t\t\tindex: 0,\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>\n\t\t\t\t\t\t\t\t\t<Icon name=\"Refresh\" aria-hidden=\"true\" />\n\t\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t\t</TooltipTrigger>\n\t\t\t\t\t\t\t<TooltipContent>Refresh</TooltipContent>\n\t\t\t\t\t\t</Tooltip>\n\t\t\t\t\t</div>\n\t\t\t\t\t<Form\n\t\t\t\t\t\tmethod=\"get\"\n\t\t\t\t\t\treplace\n\t\t\t\t\t\tclassName=\"flex flex-1 gap-2\"\n\t\t\t\t\t\tonSubmit={() => handleExtrnalNavigation()}\n\t\t\t\t\t>\n\t\t\t\t\t\t{existingSearchParamHiddenInputs}\n\t\t\t\t\t\t<div className=\"flex flex-1 items-center border-x bg-background p-3 leading-none text-foreground\">\n\t\t\t\t\t\t\t<a href={appUrl.toString()} target=\"_blank\" rel=\"noreferrer\">\n\t\t\t\t\t\t\t\t{iframeSrcUrl.host}\n\t\t\t\t\t\t\t</a>\n\t\t\t\t\t\t\t<input\n\t\t\t\t\t\t\t\taria-label=\"pathname\"\n\t\t\t\t\t\t\t\tclassName=\"w-full flex-1 bg-background focus-visible:outline-none\"\n\t\t\t\t\t\t\t\tvalue={pathnameInputValue}\n\t\t\t\t\t\t\t\tname=\"pathname\"\n\t\t\t\t\t\t\t\tonChange={(e) => setPathnameInputValue(e.currentTarget.value)}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t{/* TODO: Reconsider if this is needed as browsers don't usually have a submit button in address bar */}\n\t\t\t\t\t\t{/* <button type=\"submit\">Go</button> */}\n\t\t\t\t\t</Form>\n\t\t\t\t\t<AppStopper name={name} />\n\t\t\t\t\t<Tooltip>\n\t\t\t\t\t\t<TooltipTrigger asChild>\n\t\t\t\t\t\t\t<a\n\t\t\t\t\t\t\t\thref={appUrl.toString()}\n\t\t\t\t\t\t\t\ttarget=\"_blank\"\n\t\t\t\t\t\t\t\trel=\"noreferrer\"\n\t\t\t\t\t\t\t\tclassName={clsx(\n\t\t\t\t\t\t\t\t\t'flex aspect-square items-center justify-center px-3.5',\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<Icon name=\"ExternalLink\" />\n\t\t\t\t\t\t\t</a>\n\t\t\t\t\t\t</TooltipTrigger>\n\t\t\t\t\t\t<TooltipContent>Open in new tab</TooltipContent>\n\t\t\t\t\t</Tooltip>\n\t\t\t\t</div>\n\t\t\t\t<div className=\"flex h-full w-full flex-grow dark:bg-white\">\n\t\t\t\t\t<iframe\n\t\t\t\t\t\ttitle={name}\n\t\t\t\t\t\tkey={iframeKey}\n\t\t\t\t\t\tref={iframeRef}\n\t\t\t\t\t\tsrc={iframeSrcUrl.toString()}\n\t\t\t\t\t\tclassName=\"h-full w-full flex-grow bg-white\"\n\t\t\t\t\t/>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</TooltipProvider>\n\t)\n}\n","import { type BaseExerciseStepApp } from '@epic-web/workshop-utils/apps.server'\nimport { Icon } from '#app/components/icons'\nimport {\n\tInBrowserBrowser,\n\ttype InBrowserBrowserRef,\n} from '#app/components/in-browser-browser'\nimport { cn, getBaseUrl } from '#app/utils/misc'\nimport { useRequestInfo } from '#app/utils/request-info'\n\nexport function Preview({\n\tid,\n\tappInfo,\n\tinBrowserBrowserRef,\n}: {\n\tid?: string\n\tappInfo: {\n\t\tisRunning: boolean\n\t\tappName?: string\n\t\tname: string\n\t\ttitle: string\n\t\tportIsAvailable: boolean | null\n\t\ttype: string\n\t\tfullPath: string\n\t\tdev: BaseExerciseStepApp['dev']\n\t\ttest: BaseExerciseStepApp['test']\n\t} | null\n\tinBrowserBrowserRef: React.RefObject<InBrowserBrowserRef | null>\n}) {\n\tconst requestInfo = useRequestInfo()\n\tif (!appInfo) return <p>No app here. Sorry.</p>\n\tconst { isRunning, dev, name, portIsAvailable, title } = appInfo\n\n\tif (dev.type === 'script') {\n\t\tconst baseUrl = getBaseUrl({\n\t\t\tdomain: requestInfo.domain,\n\t\t\tport: dev.portNumber,\n\t\t})\n\t\treturn (\n\t\t\t<InBrowserBrowser\n\t\t\t\tref={inBrowserBrowserRef}\n\t\t\t\tisRunning={isRunning}\n\t\t\t\tid={id ?? name}\n\t\t\t\tname={name}\n\t\t\t\tportIsAvailable={portIsAvailable}\n\t\t\t\tport={dev.portNumber}\n\t\t\t\tbaseUrl={baseUrl}\n\t\t\t\tinitialRoute={dev.initialRoute}\n\t\t\t/>\n\t\t)\n\t} else if (dev.type === 'browser') {\n\t\treturn (\n\t\t\t<div className=\"relative h-full flex-grow overflow-y-auto scrollbar-thin scrollbar-thumb-scrollbar\">\n\t\t\t\t<a\n\t\t\t\t\thref={dev.pathname}\n\t\t\t\t\ttarget=\"_blank\"\n\t\t\t\t\trel=\"noreferrer\"\n\t\t\t\t\tclassName={cn(\n\t\t\t\t\t\t'absolute bottom-5 right-5 flex items-center justify-center rounded-full bg-gray-100 p-2.5 transition hover:bg-gray-200 dark:bg-gray-800 hover:dark:bg-gray-600',\n\t\t\t\t\t)}\n\t\t\t\t>\n\t\t\t\t\t<Icon name=\"ExternalLink\" aria-hidden=\"true\" />\n\t\t\t\t\t<span className=\"sr-only\">Open in New Window</span>\n\t\t\t\t</a>\n\t\t\t\t<iframe\n\t\t\t\t\ttitle={title}\n\t\t\t\t\tsrc={dev.pathname}\n\t\t\t\t\tclassName=\"h-full w-full flex-grow bg-white\"\n\t\t\t\t/>\n\t\t\t</div>\n\t\t)\n\t} else {\n\t\treturn (\n\t\t\t<p>\n\t\t\t\tPreview for dev type of <code>{dev.type}</code> not supported.\n\t\t\t</p>\n\t\t)\n\t}\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 fs from 'node:fs'\nimport { setModifiedTimesForDir } from '@epic-web/workshop-utils/apps.server'\nimport { type EmbeddedFile } from '@epic-web/workshop-utils/codefile-mdx.server'\nimport { json, type ActionFunctionArgs } from '@remix-run/node'\nimport { useFetcher } from '@remix-run/react'\nimport { clsx } from 'clsx'\nimport { z } from 'zod'\nimport { showProgressBarField } from '#app/components/progress-bar.tsx'\nimport { ensureUndeployed } from '#app/utils/misc.tsx'\n\nconst cacheSchema = z.object({\n\tcacheLocation: z.string(),\n\tembeddedKey: z.string(),\n\tappFullPath: z.string(),\n})\n\nfunction checkFileExists(file: string) {\n\treturn fs.promises.access(file, fs.constants.F_OK).then(\n\t\t() => true,\n\t\t() => false,\n\t)\n}\n\nexport async function action({ request }: ActionFunctionArgs) {\n\tensureUndeployed()\n\tconst formData = await request.formData()\n\tconst rawData = {\n\t\tcacheLocation: formData.get('cacheLocation'),\n\t\tembeddedKey: formData.get('embeddedKey'),\n\t\tappFullPath: formData.get('appFullPath'),\n\t}\n\n\tconst { cacheLocation, embeddedKey, appFullPath } = cacheSchema.parse(rawData)\n\n\tif (!(await checkFileExists(cacheLocation))) {\n\t\tconsole.log(`file ${cacheLocation} not found`)\n\t\treturn json({ success: true })\n\t}\n\n\tconst cached = JSON.parse(\n\t\tawait fs.promises.readFile(cacheLocation, 'utf-8'),\n\t) as any\n\n\tconst cachedEmbeddedFiles = new Map<string, EmbeddedFile>(\n\t\tObject.entries(cached?.value?.embeddedFiles ?? {}),\n\t)\n\n\tif (cachedEmbeddedFiles.has(embeddedKey)) {\n\t\tdelete cachedEmbeddedFiles.get(embeddedKey)?.warning\n\n\t\tcached.value.embeddedFiles = Object.fromEntries(cachedEmbeddedFiles)\n\t}\n\n\ttry {\n\t\tcached.value.warningCancled = true\n\t\tawait fs.promises.writeFile(cacheLocation, JSON.stringify(cached))\n\t} catch (error) {\n\t\tconsole.log(\n\t\t\t`Error when trying to write cache file at ${cacheLocation}`,\n\t\t\terror,\n\t\t)\n\t}\n\tsetModifiedTimesForDir(appFullPath)\n\n\treturn json({ success: true })\n}\n\nexport function UpdateMdxCache({\n\thandleClick,\n\tcacheLocation,\n\tembeddedKey,\n\tappFullPath,\n}: {\n\thandleClick: () => void\n\tcacheLocation: string\n\tembeddedKey: string\n\tappFullPath: string\n}) {\n\tconst fetcher = useFetcher<typeof action>()\n\n\treturn (\n\t\t<fetcher.Form action=\"/update-mdx-cache\" method=\"POST\">\n\t\t\t{showProgressBarField}\n\t\t\t<input type=\"hidden\" name=\"cacheLocation\" value={cacheLocation} />\n\t\t\t<input type=\"hidden\" name=\"embeddedKey\" value={embeddedKey} />\n\t\t\t<input type=\"hidden\" name=\"appFullPath\" value={appFullPath} />\n\t\t\t<button\n\t\t\t\ttype=\"submit\"\n\t\t\t\tonClick={handleClick}\n\t\t\t\tclassName={clsx(\n\t\t\t\t\t'launch_button',\n\t\t\t\t\tfetcher.state === 'idle' ? null : 'cursor-progress',\n\t\t\t\t)}\n\t\t\t>\n\t\t\t\tCancel Warning\n\t\t\t</button>\n\t\t</fetcher.Form>\n\t)\n}\n","import {\n\tLink,\n\tuseLoaderData,\n\tuseSearchParams,\n\ttype LinkProps,\n} from '@remix-run/react'\nimport { clsx } from 'clsx'\nimport * as React from 'react'\nimport { useState, type PropsWithChildren } from 'react'\nimport { EpicVideoInfoProvider } from '#app/components/epic-video.tsx'\nimport { Icon } from '#app/components/icons.tsx'\nimport { type InBrowserBrowserRef } from '#app/components/in-browser-browser.tsx'\nimport { SimpleTooltip } from '#app/components/ui/tooltip.tsx'\nimport { LaunchEditor } from '#app/routes/launch-editor.tsx'\nimport { UpdateMdxCache } from '#app/routes/update-mdx-cache.tsx'\nimport { Mdx } from '#app/utils/mdx.tsx'\nimport { cn, getBaseUrl } from '#app/utils/misc.tsx'\nimport { useRequestInfo } from '#app/utils/request-info.ts'\nimport { type loader } from '../_layout.tsx'\n\ntype StepContextType = {\n\tinBrowserBrowserRef: React.RefObject<InBrowserBrowserRef | null>\n}\nconst StepContext = React.createContext<StepContextType | null>(null)\n\nfunction useStepContext() {\n\tconst context = React.useContext(StepContext)\n\tif (!context) {\n\t\tthrow new Error('useStepContext must be used within a StepContext.Provider')\n\t}\n\treturn context\n}\n\nfunction StepContextProvider({\n\tchildren,\n\tinBrowserBrowserRef,\n}: {\n\tchildren: React.ReactNode\n\tinBrowserBrowserRef: React.RefObject<InBrowserBrowserRef | null>\n}) {\n\treturn (\n\t\t<StepContext.Provider value={{ inBrowserBrowserRef }}>\n\t\t\t{children}\n\t\t</StepContext.Provider>\n\t)\n}\n\nconst stepMdxComponents = {\n\tCodeFile,\n\tCodeFileNotification,\n\tDiffLink,\n\tPrevDiffLink,\n\tNextDiffLink,\n\tInlineFile,\n\tLinkToApp,\n}\n\nexport function StepMdx({\n\tinBrowserBrowserRef,\n}: {\n\tinBrowserBrowserRef: React.RefObject<InBrowserBrowserRef | null>\n}) {\n\tconst data = useLoaderData<typeof loader>()\n\tif (!data.exerciseStepApp.instructionsCode) return null\n\treturn (\n\t\t<StepContextProvider inBrowserBrowserRef={inBrowserBrowserRef}>\n\t\t\t<EpicVideoInfoProvider epicVideoInfosPromise={data.epicVideoInfosPromise}>\n\t\t\t\t<div className=\"prose dark:prose-invert sm:prose-lg\">\n\t\t\t\t\t<Mdx\n\t\t\t\t\t\tcode={data.exerciseStepApp.instructionsCode}\n\t\t\t\t\t\tcomponents={stepMdxComponents}\n\t\t\t\t\t/>\n\t\t\t\t</div>\n\t\t\t</EpicVideoInfoProvider>\n\t\t</StepContextProvider>\n\t)\n}\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\nfunction NextDiffLink({\n\tapp = 0,\n\tfullPage = false,\n\tchildren,\n}: {\n\tapp: number\n\tfullPage?: boolean\n\tchildren?: React.ReactNode\n}) {\n\treturn (\n\t\t<DiffLink app1={app} app2={app + 1} fullPage={fullPage}>\n\t\t\t{children}\n\t\t</DiffLink>\n\t)\n}\n\nfunction PrevDiffLink({\n\tapp = -1,\n\tfullPage = false,\n\tchildren,\n}: {\n\tapp: number\n\tfullPage?: boolean\n\tchildren?: React.ReactNode\n}) {\n\treturn (\n\t\t<DiffLink app1={app} app2={app + 1} fullPage={fullPage}>\n\t\t\t{children}\n\t\t</DiffLink>\n\t)\n}\n\nfunction DiffLink({\n\tapp1 = 0,\n\tapp2 = 1,\n\tchildren,\n\tfullPage = false,\n\tto,\n}: {\n\tapp1?: string | number | null\n\tapp2?: string | number | null\n\tto?: string\n\tfullPage?: boolean\n\tchildren?: React.ReactNode\n}) {\n\tconst data = useLoaderData<typeof loader>()\n\tif (!to && !app1 && !app2) {\n\t\treturn (\n\t\t\t// @ts-expect-error 🤷‍♂️\n\t\t\t<callout-danger className=\"notification\">\n\t\t\t\t<div className=\"title\">DiffLink Error: invalid input</div>\n\t\t\t\t{/* @ts-expect-error 🤷‍♂️ */}\n\t\t\t</callout-danger>\n\t\t)\n\t}\n\n\tfunction getAppName(input: typeof app1) {\n\t\tif (typeof input === 'number') {\n\t\t\tconst stepIndex = data.exerciseIndex + input\n\t\t\treturn data.allApps[stepIndex]?.name\n\t\t}\n\t\tif (!input) return null\n\t\tfor (const { name, stepName } of data.allApps) {\n\t\t\tif (input === name || input === stepName) {\n\t\t\t\treturn name\n\t\t\t}\n\t\t}\n\t\treturn null\n\t}\n\n\tif (to) {\n\t\tconst params = new URLSearchParams(to)\n\t\tapp1 = params.get('app1')\n\t\tapp2 = params.get('app2')\n\t}\n\tconst app1Name = getAppName(app1)\n\tconst app2Name = getAppName(app2)\n\tif (!app1Name || !app2Name) {\n\t\treturn (\n\t\t\t// @ts-expect-error 🤷‍♂️\n\t\t\t<callout-danger className=\"notification\">\n\t\t\t\t<div className=\"title\">DiffLink Error: invalid input</div>\n\t\t\t\t{!app1Name && <div>app1: \"{app1}\" is not a valid app name</div>}\n\t\t\t\t{!app2Name && <div>app2: \"{app2}\" is not a valid app name</div>}\n\t\t\t\t{/* @ts-expect-error 🤷‍♂️ */}\n\t\t\t</callout-danger>\n\t\t)\n\t}\n\n\tif (!to) {\n\t\tto = `app1=${app1Name}&app2=${app2Name}`\n\t}\n\tconst pathToDiff = fullPage\n\t\t? `/diff?${to}`\n\t\t: `?${decodeURIComponent(\n\t\t\t\twithParam(new URLSearchParams(), 'preview', `diff&${to}`).toString(),\n\t\t\t)}`\n\n\tif (!children) {\n\t\tchildren = (\n\t\t\t<span>\n\t\t\t\tGo to Diff {fullPage ? '' : 'Preview'} from: <code>{app1Name}</code> to:{' '}\n\t\t\t\t<code>{app2Name}</code>\n\t\t\t</span>\n\t\t)\n\t}\n\n\treturn <Link to={pathToDiff}>{children}</Link>\n}\n\nfunction CodeFile({ file }: { file: string }) {\n\treturn (\n\t\t<div className=\"border-4 border-[#ff4545] bg-[#ff454519] p-4 text-lg\">\n\t\t\tSomething went wrong compiling <b>CodeFile</b> for file: <u>{file}</u> to\n\t\t\tmarkdown\n\t\t</div>\n\t)\n}\n\nfunction CodeFileNotification({\n\tfile,\n\ttype = 'problem',\n\tchildren,\n\tvariant,\n\tcacheLocation,\n\tembeddedKey,\n\t...props\n}: {\n\tfile: string\n\ttype?: 'solution' | 'problem'\n\tchildren: React.ReactNode\n} & (\n\t| {\n\t\t\tvariant: 'error'\n\t\t\tcacheLocation?: never\n\t\t\tembeddedKey?: never\n\t }\n\t| {\n\t\t\tvariant: 'warning'\n\t\t\tcacheLocation: string\n\t\t\tembeddedKey: string\n\t }\n)) {\n\tconst [visibility, setVisibility] = useState('visible')\n\tconst data = useLoaderData<typeof loader>()\n\tconst app = data[type]\n\n\tconst handleClick = () => {\n\t\tif (visibility !== 'visible') return\n\t\tsetVisibility('collapse')\n\t\tsetTimeout(() => {\n\t\t\tsetVisibility('none')\n\t\t}, 400)\n\t}\n\n\tconst className = clsx(\n\t\t'rounded px-4 py-1 font-mono text-sm font-semibold outline-none transition duration-300 ease-in-out',\n\t\t{\n\t\t\t'bg-amber-300/70 hover:bg-amber-300/40 active:bg-amber-300/50':\n\t\t\t\tvariant === 'warning',\n\t\t\t'bg-red-300/70 hover:bg-red-300/40 active:bg-red-300/50':\n\t\t\t\tvariant === 'error',\n\t\t},\n\t)\n\n\treturn (\n\t\t<div\n\t\t\tclassName={clsx('notification important h-15 relative', {\n\t\t\t\t'duration-400 !my-0 !h-0 !py-0 !opacity-0 transition-all ease-out':\n\t\t\t\t\tvisibility !== 'visible',\n\t\t\t\thidden: visibility === 'none',\n\t\t\t})}\n\t\t>\n\t\t\t<div className=\"absolute right-3 top-3 z-50 flex gap-4\">\n\t\t\t\t{app ? (\n\t\t\t\t\t<div className={className} title={`Edit ${file}`}>\n\t\t\t\t\t\t<LaunchEditor appFile={file} appName={app.name} {...props}>\n\t\t\t\t\t\t\tEdit this File\n\t\t\t\t\t\t</LaunchEditor>\n\t\t\t\t\t</div>\n\t\t\t\t) : null}\n\t\t\t\t{app && variant === 'warning' ? (\n\t\t\t\t\t<div\n\t\t\t\t\t\tclassName={className}\n\t\t\t\t\t\ttitle={`Remove the warning from here and from ${file} cache file`}\n\t\t\t\t\t>\n\t\t\t\t\t\t<UpdateMdxCache\n\t\t\t\t\t\t\thandleClick={handleClick}\n\t\t\t\t\t\t\tcacheLocation={cacheLocation}\n\t\t\t\t\t\t\tembeddedKey={embeddedKey}\n\t\t\t\t\t\t\tappFullPath={app.fullPath}\n\t\t\t\t\t\t/>\n\t\t\t\t\t</div>\n\t\t\t\t) : null}\n\t\t\t</div>\n\t\t\t{children}\n\t\t</div>\n\t)\n}\n\nfunction InlineFile({\n\tfile,\n\ttype = 'playground',\n\tchildren = <code>{file}</code>,\n\t...props\n}: Omit<PropsWithChildren<typeof LaunchEditor>, 'appName'> & {\n\tfile: string\n\ttype?: 'playground' | 'solution' | 'problem'\n}) {\n\tconst data = useLoaderData<typeof loader>()\n\tconst app = data[type] || data[data.type]\n\n\tconst info = (\n\t\t<div className=\"launch-editor-button-wrapper flex underline underline-offset-4\">\n\t\t\t{children}{' '}\n\t\t\t<svg height={24} width={24}>\n\t\t\t\t<use href={`/icons.svg#keyboard`} />\n\t\t\t</svg>\n\t\t</div>\n\t)\n\n\treturn ENV.EPICSHOP_DEPLOYED && app ? (\n\t\t<div className=\"inline-block grow\">\n\t\t\t<LaunchEditor appFile={file} appName={app.name} {...props}>\n\t\t\t\t{info}\n\t\t\t</LaunchEditor>\n\t\t</div>\n\t) : app ? (\n\t\t<div className=\"inline-block grow\">\n\t\t\t<LaunchEditor appFile={file} appName={app.name} {...props}>\n\t\t\t\t{info}\n\t\t\t</LaunchEditor>\n\t\t</div>\n\t) : type === 'playground' ? (\n\t\t// playground does not exist yet\n\t\t<SimpleTooltip content=\"You must 'Set to Playground' before opening a file\">\n\t\t\t<div className=\"inline-block grow cursor-not-allowed\">{info}</div>\n\t\t</SimpleTooltip>\n\t) : (\n\t\t<>children</>\n\t)\n}\n\nfunction getPreviewType(\n\tpreview: string | null,\n): 'playground' | 'problem' | 'solution' {\n\tif (preview === 'problem') return 'problem'\n\tif (preview === 'solution') return 'solution'\n\treturn 'playground'\n}\n\nfunction LinkToApp({\n\tto: appTo,\n\tchildren = <code>{appTo.toString()}</code>,\n\t...props\n}: LinkProps) {\n\tconst [searchParams] = useSearchParams()\n\tconst to = `?${withParam(\n\t\tsearchParams,\n\t\t'pathname',\n\t\tappTo.toString(),\n\t).toString()}`\n\tconst data = useLoaderData<typeof loader>()\n\tconst type = getPreviewType(searchParams.get('preview'))\n\tconst requestInfo = useRequestInfo()\n\tconst app = data[type]\n\tconst previewAppUrl =\n\t\tapp?.dev.type === 'script'\n\t\t\t? getBaseUrl({\n\t\t\t\t\tdomain: requestInfo.domain,\n\t\t\t\t\tport: app.dev.portNumber,\n\t\t\t\t})\n\t\t\t: data.playground?.dev.type === 'browser'\n\t\t\t\t? data.playground.dev.pathname\n\t\t\t\t: null\n\tconst { inBrowserBrowserRef } = useStepContext()\n\tconst href = previewAppUrl\n\t\t? previewAppUrl.slice(0, -1) + appTo.toString()\n\t\t: null\n\treturn (\n\t\t<div className=\"inline-flex items-center justify-between gap-1\">\n\t\t\t<Link\n\t\t\t\tto={to}\n\t\t\t\t{...props}\n\t\t\t\tclassName={cn(props.className, {\n\t\t\t\t\t'cursor-not-allowed': ENV.EPICSHOP_DEPLOYED,\n\t\t\t\t})}\n\t\t\t\ttitle={\n\t\t\t\t\tENV.EPICSHOP_DEPLOYED\n\t\t\t\t\t\t? 'Cannot link to app in deployed version'\n\t\t\t\t\t\t: undefined\n\t\t\t\t}\n\t\t\t\tonClick={(event) => {\n\t\t\t\t\tif (ENV.EPICSHOP_DEPLOYED) event.preventDefault()\n\n\t\t\t\t\tprops.onClick?.(event)\n\t\t\t\t\tinBrowserBrowserRef.current?.handleExtrnalNavigation(appTo.toString())\n\t\t\t\t}}\n\t\t\t>\n\t\t\t\t{children}\n\t\t\t</Link>\n\t\t\t{href ? (\n\t\t\t\t<SimpleTooltip content=\"Open in new tab\">\n\t\t\t\t\t<a\n\t\t\t\t\t\thref={href}\n\t\t\t\t\t\ttarget=\"_blank\"\n\t\t\t\t\t\trel=\"noreferrer\"\n\t\t\t\t\t\tclassName={cn('flex aspect-square items-center justify-center', {\n\t\t\t\t\t\t\t'cursor-not-allowed': ENV.EPICSHOP_DEPLOYED,\n\t\t\t\t\t\t})}\n\t\t\t\t\t\ttitle={\n\t\t\t\t\t\t\tENV.EPICSHOP_DEPLOYED\n\t\t\t\t\t\t\t\t? 'Cannot link to app in deployed version'\n\t\t\t\t\t\t\t\t: 'Open in new tab'\n\t\t\t\t\t\t}\n\t\t\t\t\t\tonClick={(event) => {\n\t\t\t\t\t\t\tif (ENV.EPICSHOP_DEPLOYED) event.preventDefault()\n\t\t\t\t\t\t}}\n\t\t\t\t\t>\n\t\t\t\t\t\t<Icon name=\"ExternalLink\" />\n\t\t\t\t\t</a>\n\t\t\t\t</SimpleTooltip>\n\t\t\t) : null}\n\t\t</div>\n\t)\n}\n","import * as Accordion from '@radix-ui/react-accordion'\nimport { useEffect, useRef, useState } from 'react'\nimport { z } from 'zod'\nimport AccordionComponent from '#app/components/accordion.tsx'\nimport { AnimatedBars, Icon } from './icons.tsx'\n\nconst testRunnerStatusDataSchema = z.intersection(\n\tz.object({\n\t\ttype: z.literal('epicshop:test-status-update'),\n\t\ttimestamp: z.number(),\n\t}),\n\tz.union([\n\t\tz.object({ status: z.literal('pending') }),\n\t\tz.object({ status: z.literal('pass') }),\n\t\tz.object({ status: z.literal('fail'), error: z.string() }),\n\t]),\n)\n\nconst testRunnerTestStepDataSchema = z.object({\n\ttype: z.literal('epicshop:test-step-update'),\n\tstatus: z.literal('pass'),\n\ttitle: z.string(),\n\ttimestamp: z.number(),\n})\n\nconst testRunnerDataSchema = z.union([\n\ttestRunnerTestStepDataSchema,\n\ttestRunnerStatusDataSchema,\n])\n\ntype TestRunnerStatusData = z.infer<typeof testRunnerStatusDataSchema>\ntype TestRunnerTestStepData = z.infer<typeof testRunnerTestStepDataSchema>\n\nexport function InBrowserTestRunner({\n\tpathname,\n\ttestFile,\n}: {\n\tpathname: string\n\ttestFile: string\n}) {\n\tconst iframeRef = useRef<HTMLIFrameElement>(null)\n\tconst [message, setMessage] = useState<TestRunnerStatusData | null>(null)\n\tconst [testSteps, setTestSteps] = useState<Array<TestRunnerTestStepData>>([])\n\n\tuseEffect(() => {\n\t\tfunction handleMessage(messageEvent: MessageEvent) {\n\t\t\tif (messageEvent.source !== iframeRef.current?.contentWindow) return\n\t\t\tif ('request' in messageEvent.data) return\n\n\t\t\tconst result = testRunnerDataSchema.safeParse(messageEvent.data, {\n\t\t\t\tpath: ['messageEvent', 'data'],\n\t\t\t})\n\t\t\tif (!result.success) {\n\t\t\t\tconsole.error(\n\t\t\t\t\t`Invalid message from test iframe`,\n\t\t\t\t\tmessageEvent.data,\n\t\t\t\t\tresult.error,\n\t\t\t\t)\n\t\t\t\treturn\n\t\t\t}\n\t\t\tconst { data } = result\n\t\t\tif (data.type === 'epicshop:test-status-update') {\n\t\t\t\tif (data.status === 'pending') {\n\t\t\t\t\tsetTestSteps([])\n\t\t\t\t}\n\t\t\t\tsetMessage(data)\n\t\t\t}\n\t\t\tif (data.type === 'epicshop:test-step-update') {\n\t\t\t\tsetTestSteps((steps) => [...steps, data])\n\t\t\t}\n\t\t}\n\t\twindow.addEventListener('message', handleMessage)\n\t\treturn () => {\n\t\t\twindow.removeEventListener('message', handleMessage)\n\t\t}\n\t}, [])\n\n\tconst statusEmoji = {\n\t\tpending: <AnimatedBars aria-label=\"Pending\" />,\n\t\tpass: (\n\t\t\t<Icon\n\t\t\t\tname=\"CheckSmall\"\n\t\t\t\taria-label=\"Passed\"\n\t\t\t\tclassName=\"text-emerald-700\"\n\t\t\t/>\n\t\t),\n\t\tfail: (\n\t\t\t<Icon\n\t\t\t\tname=\"Remove\"\n\t\t\t\taria-label=\"Failed\"\n\t\t\t\tclassName=\"text-foreground-danger\"\n\t\t\t/>\n\t\t),\n\t\tunknown: (\n\t\t\t<Icon name=\"Question\" aria-label=\"Unknown\" className=\"animate-pulse\" />\n\t\t),\n\t}[message?.status ?? 'unknown']\n\n\tconst sortedTestSteps = testSteps.sort((a, b) => a.timestamp - b.timestamp)\n\tconst testStepStatusEmojis = {\n\t\tpass: <Icon name=\"CheckSmall\" aria-label=\"Passed\" />,\n\t\tfail: <Icon name=\"Remove\" aria-label=\"Failed\" />,\n\t\tunknown: (\n\t\t\t<Icon name=\"Question\" aria-label=\"Unknown\" className=\"animate-pulse\" />\n\t\t),\n\t}\n\n\treturn (\n\t\t<>\n\t\t\t<Accordion.Root className=\"w-full\" type=\"multiple\">\n\t\t\t\t<AccordionComponent\n\t\t\t\t\ticon={statusEmoji}\n\t\t\t\t\ttitle={testFile}\n\t\t\t\t\tforceMount={true}\n\t\t\t\t>\n\t\t\t\t\t<div className=\"not-prose\">\n\t\t\t\t\t\t<div className=\"p-5 pt-3\">\n\t\t\t\t\t\t\t<ul className=\"\">\n\t\t\t\t\t\t\t\t{sortedTestSteps.map((testStep) => (\n\t\t\t\t\t\t\t\t\t// sometimes the steps come in so fast that the timestamp is the same\n\t\t\t\t\t\t\t\t\t<li key={testStep.timestamp + testStep.title}>\n\t\t\t\t\t\t\t\t\t\t<div className=\"flex items-baseline gap-2 text-emerald-700\">\n\t\t\t\t\t\t\t\t\t\t\t<span>{testStepStatusEmojis[testStep.status]}</span>\n\t\t\t\t\t\t\t\t\t\t\t<pre className=\"whitespace-pre-wrap\">\n\t\t\t\t\t\t\t\t\t\t\t\t{testStep.title}\n\t\t\t\t\t\t\t\t\t\t\t</pre>\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t</ul>\n\t\t\t\t\t\t\t{message?.status === 'fail' ? (\n\t\t\t\t\t\t\t\t<div className=\"flex items-baseline gap-2 text-foreground-danger\">\n\t\t\t\t\t\t\t\t\t<span>{testStepStatusEmojis.fail}</span>\n\t\t\t\t\t\t\t\t\t<pre className=\"max-h-48 overflow-y-auto text-foreground-danger scrollbar-thin scrollbar-thumb-scrollbar\">\n\t\t\t\t\t\t\t\t\t\t{message.error}\n\t\t\t\t\t\t\t\t\t</pre>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t) : null}\n\t\t\t\t\t\t\t<iframe\n\t\t\t\t\t\t\t\tref={iframeRef}\n\t\t\t\t\t\t\t\ttitle={testFile}\n\t\t\t\t\t\t\t\tsrc={pathname + testFile}\n\t\t\t\t\t\t\t\tclassName=\"mt-5 min-h-[420px] w-full border bg-white\"\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div className=\"flex border-y\">\n\t\t\t\t\t\t\t<button\n\t\t\t\t\t\t\t\tonClick={() =>\n\t\t\t\t\t\t\t\t\tiframeRef.current?.contentWindow?.location.reload()\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tclassName=\"border-r p-3\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<Icon name=\"Refresh\" aria-label=\"Rerun Tests\" />\n\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t\t<a\n\t\t\t\t\t\t\t\thref={pathname + testFile}\n\t\t\t\t\t\t\t\ttarget=\"_blank\"\n\t\t\t\t\t\t\t\trel=\"noreferrer\"\n\t\t\t\t\t\t\t\tclassName=\"border-r p-3\"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<Icon name=\"ExternalLink\" aria-label=\"Open in New Window\" />\n\t\t\t\t\t\t\t</a>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t</AccordionComponent>\n\t\t\t</Accordion.Root>\n\t\t</>\n\t)\n}\n","import { getAppByName } from '@epic-web/workshop-utils/apps.server'\nimport {\n\tclearTestProcessEntry,\n\tgetTestProcessEntry,\n\tisTestRunning,\n\trunAppTests,\n} from '@epic-web/workshop-utils/process-manager.server'\nimport {\n\tjson,\n\ttype ActionFunctionArgs,\n\ttype LoaderFunctionArgs,\n} from '@remix-run/node'\nimport { useFetcher } from '@remix-run/react'\nimport AnsiToHTML from 'ansi-to-html'\nimport escapeHtml from 'lodash.escape'\nimport { useEffect, useReducer, useRef } from 'react'\nimport { useEventSource } from 'remix-utils/sse/react'\nimport { eventStream } from 'remix-utils/sse/server'\nimport { z } from 'zod'\nimport { AnimatedBars, Icon } from '#app/components/icons.tsx'\nimport { SimpleTooltip } from '#app/components/ui/tooltip.tsx'\nimport { ensureUndeployed } from '#app/utils/misc.tsx'\n\nconst testActionSchema = z.union([\n\tz.object({\n\t\tintent: z.literal('run'),\n\t\tname: z.string(),\n\t}),\n\tz.object({\n\t\tintent: z.literal('stop'),\n\t\tname: z.string(),\n\t}),\n\tz.object({\n\t\tintent: z.literal('clear'),\n\t\tname: z.string(),\n\t}),\n])\n\nconst testEventSchema = z.union([\n\tz.object({\n\t\ttype: z.literal('init'),\n\t\texitCode: z.number().nullable().optional(),\n\t\tisRunning: z.boolean(),\n\t\toutput: z.array(\n\t\t\tz.object({\n\t\t\t\ttype: z.union([z.literal('stdout'), z.literal('stderr')]),\n\t\t\t\thtml: z.string(),\n\t\t\t\ttimestamp: z.number(),\n\t\t\t}),\n\t\t),\n\t}),\n\tz.object({\n\t\ttype: z.union([z.literal('stdout'), z.literal('stderr')]),\n\t\tdata: z.string(),\n\t\ttimestamp: z.number(),\n\t}),\n\tz.object({\n\t\ttype: z.literal('exit'),\n\t\tisRunning: z.literal(false),\n\t\tcode: z.number().nullable(),\n\t}),\n])\nconst testEventQueueSchema = z.array(testEventSchema)\n\ntype TestEvent = z.infer<typeof testEventSchema>\ntype TestEventQueue = z.infer<typeof testEventQueueSchema>\n\nexport async function loader({ request }: LoaderFunctionArgs) {\n\tensureUndeployed()\n\tconst url = new URL(request.url)\n\tconst name = url.searchParams.get('name')\n\tif (!name) {\n\t\treturn json({ error: 'Missing name' }, { status: 400 })\n\t}\n\tconst app = await getAppByName(name)\n\tif (!app) {\n\t\treturn json({ error: 'App not found' }, { status: 404 })\n\t}\n\tconst processEntry = getTestProcessEntry(app)\n\tif (!processEntry) {\n\t\treturn json({ error: 'App is not running tests' }, { status: 404 })\n\t}\n\treturn eventStream(request.signal, function setup(send) {\n\t\tconst ansi = new AnsiToHTML()\n\t\t// have to batch because the client may miss events if we send too many\n\t\t// too rapidly\n\t\tlet queue: TestEventQueue = []\n\t\tfunction sendEvent(event: TestEvent) {\n\t\t\tqueue.push(event)\n\t\t}\n\t\tconst interval = setInterval(() => {\n\t\t\tif (queue.length) {\n\t\t\t\tsend({ data: JSON.stringify(queue) })\n\t\t\t\tqueue = []\n\t\t\t}\n\t\t}, 10)\n\n\t\tconst isRunning = isTestRunning(app)\n\n\t\tsendEvent({\n\t\t\ttype: 'init',\n\t\t\texitCode: processEntry.exitCode,\n\t\t\tisRunning,\n\t\t\toutput: processEntry.output.map((line) => ({\n\t\t\t\ttype: line.type,\n\t\t\t\thtml: ansi.toHtml(escapeHtml(line.content)),\n\t\t\t\ttimestamp: line.timestamp,\n\t\t\t})),\n\t\t})\n\n\t\tconst testProcess = processEntry.process\n\t\tif (!testProcess) {\n\t\t\treturn () => {}\n\t\t}\n\n\t\tfunction handleStdOutData(data: Buffer) {\n\t\t\tsendEvent({\n\t\t\t\ttype: 'stdout',\n\t\t\t\tdata: ansi.toHtml(escapeHtml(data.toString('utf-8'))),\n\t\t\t\ttimestamp: Date.now(),\n\t\t\t})\n\t\t}\n\t\tfunction handleStdErrData(data: Buffer) {\n\t\t\tsendEvent({\n\t\t\t\ttype: 'stderr',\n\t\t\t\tdata: ansi.toHtml(escapeHtml(data.toString('utf-8'))),\n\t\t\t\ttimestamp: Date.now(),\n\t\t\t})\n\t\t}\n\t\tfunction handleExit(code: number) {\n\t\t\ttestProcess?.stdout?.off('data', handleStdOutData)\n\t\t\ttestProcess?.stderr?.off('data', handleStdErrData)\n\t\t\ttestProcess?.off('exit', handleExit)\n\t\t\tsendEvent({ type: 'exit', isRunning: false, code })\n\t\t}\n\t\ttestProcess.stdout?.on('data', handleStdOutData)\n\t\ttestProcess.stderr?.on('data', handleStdErrData)\n\t\ttestProcess.on('exit', handleExit)\n\t\treturn function cleanup() {\n\t\t\ttestProcess.stdout?.off('data', handleStdOutData)\n\t\t\ttestProcess.stderr?.off('data', handleStdErrData)\n\t\t\ttestProcess.off('exit', handleExit)\n\t\t\tclearInterval(interval)\n\t\t}\n\t})\n}\n\nexport async function action({ request }: ActionFunctionArgs) {\n\tensureUndeployed()\n\tconst formData = await request.formData()\n\tconst result = testActionSchema.safeParse({\n\t\tintent: formData.get('intent'),\n\t\tname: formData.get('name'),\n\t})\n\tif (!result.success) {\n\t\treturn json(\n\t\t\t{ success: false, error: result.error.flatten() },\n\t\t\t{ status: 400 },\n\t\t)\n\t}\n\tconst app = await getAppByName(result.data.name)\n\tif (!app) {\n\t\treturn json({ success: false, error: 'App not found' }, { status: 404 })\n\t}\n\tswitch (result.data.intent) {\n\t\tcase 'run': {\n\t\t\tvoid runAppTests(app)\n\t\t\treturn json({ success: true })\n\t\t}\n\t\tcase 'stop': {\n\t\t\tconst processEntry = getTestProcessEntry(app)\n\t\t\tif (processEntry) {\n\t\t\t\tprocessEntry.process?.kill()\n\t\t\t}\n\t\t\treturn json({ success: true })\n\t\t}\n\t\tcase 'clear': {\n\t\t\tclearTestProcessEntry(app)\n\t\t\treturn json({ success: true })\n\t\t}\n\t}\n}\n\nfunction simpleReducer<State>(prev: State, getNext: (prev: State) => State) {\n\treturn getNext(prev)\n}\n\nexport function TestOutput({ name }: { name: string }) {\n\ttype State = {\n\t\t/** version is used to trigger an unsubscribe and resubscribe to the event source */\n\t\tversion: number\n\t\tisRunning: boolean\n\t\texitCode: number | null | undefined\n\t\tlines: Array<{ type: 'stdout' | 'stderr'; html: string; timestamp: number }>\n\t}\n\tconst [state, dispatch] = useReducer(simpleReducer<State>, {\n\t\tversion: 0,\n\t\tisRunning: false,\n\t\texitCode: undefined,\n\t\tlines: [],\n\t})\n\tconst { version, isRunning, exitCode, lines } = state\n\tconst lastMessage = useEventSource(\n\t\t`/test?${new URLSearchParams({ name })}&v=${version}`,\n\t)\n\tuseEffect(() => {\n\t\tif (!lastMessage) return\n\n\t\tconst parsed = JSON.parse(lastMessage)\n\t\tconst result = testEventQueueSchema.safeParse(parsed)\n\t\tif (!result.success) {\n\t\t\tconsole.error(result.error.flatten())\n\t\t\treturn\n\t\t}\n\t\tfor (const event of result.data) {\n\t\t\tswitch (event.type) {\n\t\t\t\tcase 'exit': {\n\t\t\t\t\tconst { isRunning, code: exitCode } = event\n\t\t\t\t\tdispatch((prev) => ({ ...prev, isRunning, exitCode }))\n\t\t\t\t\tbreak\n\t\t\t\t}\n\t\t\t\tcase 'init': {\n\t\t\t\t\tconst { output, exitCode, isRunning } = event\n\t\t\t\t\tdispatch((prev) => ({ ...prev, lines: output, exitCode, isRunning }))\n\t\t\t\t\tbreak\n\t\t\t\t}\n\t\t\t\tcase 'stderr':\n\t\t\t\tcase 'stdout': {\n\t\t\t\t\tconst { type, data: html, timestamp } = event\n\t\t\t\t\tdispatch((prev) => ({\n\t\t\t\t\t\t...prev,\n\t\t\t\t\t\tlines: [...prev.lines, { type, html, timestamp }].sort(\n\t\t\t\t\t\t\t(a, b) => a.timestamp - b.timestamp,\n\t\t\t\t\t\t),\n\t\t\t\t\t\tisRunning: true,\n\t\t\t\t\t}))\n\t\t\t\t\tbreak\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}, [lastMessage])\n\n\treturn (\n\t\t<div className=\"relative flex h-full w-full flex-col\">\n\t\t\t<div className=\"flex h-12 w-full flex-shrink-0 items-center justify-between border-b\">\n\t\t\t\t<div className=\"flex h-full items-center\">\n\t\t\t\t\t{!isRunning && (\n\t\t\t\t\t\t<TestRunner\n\t\t\t\t\t\t\tname={name}\n\t\t\t\t\t\t\tonRun={() => {\n\t\t\t\t\t\t\t\tdispatch((prev) => ({\n\t\t\t\t\t\t\t\t\t...prev,\n\t\t\t\t\t\t\t\t\texitCode: undefined,\n\t\t\t\t\t\t\t\t\tlines: [],\n\t\t\t\t\t\t\t\t\tversion: prev.version + 1,\n\t\t\t\t\t\t\t\t}))\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t/>\n\t\t\t\t\t)}\n\t\t\t\t\t{isRunning ? (\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t<div className=\"flex h-full flex-grow items-center justify-center border-r px-3.5\">\n\t\t\t\t\t\t\t\t<AnimatedBars role=\"status\" aria-label=\"Running Tests\" />\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<StopTest name={name} />\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{!isRunning && exitCode !== undefined && (\n\t\t\t\t\t<p className=\"pr-3.5 leading-none\">\n\t\t\t\t\t\t{exitCode === 0\n\t\t\t\t\t\t\t? `Tests passed`\n\t\t\t\t\t\t\t: `Test failed (exit code ${String(exitCode)})`}\n\t\t\t\t\t</p>\n\t\t\t\t)}\n\t\t\t\t{!isRunning && exitCode !== undefined && (\n\t\t\t\t\t<ClearTest\n\t\t\t\t\t\tname={name}\n\t\t\t\t\t\tonClear={() => {\n\t\t\t\t\t\t\tdispatch((prev) => ({\n\t\t\t\t\t\t\t\t...prev,\n\t\t\t\t\t\t\t\texitCode: undefined,\n\t\t\t\t\t\t\t\tlines: [],\n\t\t\t\t\t\t\t}))\n\t\t\t\t\t\t}}\n\t\t\t\t\t/>\n\t\t\t\t)}\n\t\t\t</div>\n\t\t\t<div className=\"flex h-full flex-col gap-5 p-5\">\n\t\t\t\t<p className=\"font-mono text-sm font-medium uppercase\">Test Output</p>\n\t\t\t\t<pre className=\"shadow-on-scrollbox flex-1 overflow-y-scroll scrollbar-thin scrollbar-thumb-scrollbar\">\n\t\t\t\t\t{lines.map((line) => (\n\t\t\t\t\t\t<code\n\t\t\t\t\t\t\tkey={line.timestamp}\n\t\t\t\t\t\t\tdata-type={line.type}\n\t\t\t\t\t\t\tdangerouslySetInnerHTML={{\n\t\t\t\t\t\t\t\t__html: line.html,\n\t\t\t\t\t\t\t}}\n\t\t\t\t\t\t/>\n\t\t\t\t\t))}\n\t\t\t\t</pre>\n\t\t\t</div>\n\t\t</div>\n\t)\n}\n\nexport function TestRunner({\n\tname,\n\tonRun,\n}: {\n\tname: string\n\tonRun?: () => void\n}) {\n\tconst fetcher = useFetcher<typeof action>()\n\tconst latestOnRun = useRef(onRun)\n\tuseEffect(() => {\n\t\tlatestOnRun.current = onRun\n\t}, [onRun])\n\tuseEffect(() => {\n\t\tif (fetcher.data?.success) {\n\t\t\tlatestOnRun.current?.()\n\t\t}\n\t}, [fetcher.data])\n\treturn (\n\t\t<fetcher.Form method=\"POST\" action=\"/test\" className=\"h-full\">\n\t\t\t<input type=\"hidden\" name=\"name\" value={name} />\n\t\t\t<SimpleTooltip\n\t\t\t\tcontent={fetcher.state === 'idle' ? 'Run Tests' : 'Running Tests...'}\n\t\t\t>\n\t\t\t\t<button\n\t\t\t\t\ttype=\"submit\"\n\t\t\t\t\tname=\"intent\"\n\t\t\t\t\tvalue=\"run\"\n\t\t\t\t\tclassName=\"flex h-full flex-grow items-center justify-center border-r px-3.5\"\n\t\t\t\t>\n\t\t\t\t\t{fetcher.state === 'idle' ? (\n\t\t\t\t\t\t<Icon name=\"TriangleSmall\" />\n\t\t\t\t\t) : (\n\t\t\t\t\t\t<AnimatedBars role=\"status\" />\n\t\t\t\t\t)}\n\t\t\t\t</button>\n\t\t\t</SimpleTooltip>\n\t\t</fetcher.Form>\n\t)\n}\n\nexport function ClearTest({\n\tname,\n\tonClear,\n}: {\n\tname: string\n\tonClear?: () => void\n}) {\n\tconst fetcher = useFetcher<typeof action>()\n\tconst latestOnClear = useRef(onClear)\n\tuseEffect(() => {\n\t\tlatestOnClear.current = onClear\n\t}, [onClear])\n\tuseEffect(() => {\n\t\tif (fetcher.data?.success) {\n\t\t\tlatestOnClear.current?.()\n\t\t}\n\t}, [fetcher.data])\n\treturn (\n\t\t<fetcher.Form method=\"POST\" action=\"/test\" className=\"h-full\">\n\t\t\t<input type=\"hidden\" name=\"name\" value={name} />\n\t\t\t<SimpleTooltip\n\t\t\t\tcontent={fetcher.state === 'idle' ? 'Clear Tests' : 'Clearing Tests...'}\n\t\t\t>\n\t\t\t\t<button\n\t\t\t\t\ttype=\"submit\"\n\t\t\t\t\tname=\"intent\"\n\t\t\t\t\tvalue=\"clear\"\n\t\t\t\t\tclassName=\"flex h-full flex-grow items-center justify-center border-l px-3.5\"\n\t\t\t\t>\n\t\t\t\t\t{fetcher.state === 'idle' ? (\n\t\t\t\t\t\t<Icon name=\"Clear\" />\n\t\t\t\t\t) : (\n\t\t\t\t\t\t<Icon name=\"Clear\" className=\"animate-pulse\" role=\"status\" />\n\t\t\t\t\t)}\n\t\t\t\t</button>\n\t\t\t</SimpleTooltip>\n\t\t</fetcher.Form>\n\t)\n}\n\nexport function StopTest({\n\tname,\n\tonStop,\n}: {\n\tname: string\n\tonStop?: () => void\n}) {\n\tconst fetcher = useFetcher<typeof action>()\n\tconst latestOnStop = useRef(onStop)\n\tuseEffect(() => {\n\t\tlatestOnStop.current = onStop\n\t}, [onStop])\n\tuseEffect(() => {\n\t\tif (fetcher.data?.success) {\n\t\t\tlatestOnStop.current?.()\n\t\t}\n\t}, [fetcher.data])\n\treturn (\n\t\t<fetcher.Form method=\"POST\" action=\"/test\" className=\"h-full\">\n\t\t\t<input type=\"hidden\" name=\"name\" value={name} />\n\t\t\t<SimpleTooltip\n\t\t\t\tcontent={fetcher.state === 'idle' ? 'Stop Tests' : 'Stopping Tests...'}\n\t\t\t>\n\t\t\t\t<button\n\t\t\t\t\ttype=\"submit\"\n\t\t\t\t\tname=\"intent\"\n\t\t\t\t\tvalue=\"stop\"\n\t\t\t\t\tclassName=\"flex h-full flex-grow items-center justify-center border-r px-3.5\"\n\t\t\t\t>\n\t\t\t\t\t{fetcher.state === 'idle' ? (\n\t\t\t\t\t\t<Icon name=\"Stop\" />\n\t\t\t\t\t) : (\n\t\t\t\t\t\t<Icon name=\"Stop\" className=\"animate-pulse\" role=\"status\" />\n\t\t\t\t\t)}\n\t\t\t\t</button>\n\t\t\t</SimpleTooltip>\n\t\t</fetcher.Form>\n\t)\n}\n","import { type PlaygroundApp } from '@epic-web/workshop-utils/apps.server'\nimport { useState } from 'react'\nimport { Icon } from '#app/components/icons'\nimport { InBrowserTestRunner } from '#app/components/in-browser-test-runner'\nimport { TestOutput } from '#app/routes/test'\nimport { PlaygroundWindow } from './playground-window'\n\nexport function Tests({\n\tappInfo: playgroundAppInfo,\n\tproblemAppName,\n\tallApps,\n\tisUpToDate,\n}: {\n\tappInfo: Pick<PlaygroundApp, 'appName' | 'name' | 'type' | 'test'> | null\n\tproblemAppName?: string\n\tallApps: Array<{ name: string; displayName: string }>\n\tisUpToDate: boolean\n}) {\n\tconst [inBrowserTestKey, setInBrowserTestKey] = useState(0)\n\tlet testUI = <p>No tests here. Sorry.</p>\n\tif (playgroundAppInfo?.test.type === 'script') {\n\t\ttestUI = <TestOutput name={playgroundAppInfo.name} />\n\t}\n\tif (playgroundAppInfo?.test.type === 'browser') {\n\t\tconst { pathname } = playgroundAppInfo.test\n\t\ttestUI = (\n\t\t\t<div\n\t\t\t\tclassName=\"flex h-full w-full flex-grow flex-col\"\n\t\t\t\tkey={inBrowserTestKey}\n\t\t\t>\n\t\t\t\t{playgroundAppInfo.test.testFiles.map((testFile) => {\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<div key={testFile}>\n\t\t\t\t\t\t\t<InBrowserTestRunner pathname={pathname} testFile={testFile} />\n\t\t\t\t\t\t</div>\n\t\t\t\t\t)\n\t\t\t\t})}\n\t\t\t\t<div className=\"px-3 py-[21px]\">\n\t\t\t\t\t<button\n\t\t\t\t\t\tonClick={() => setInBrowserTestKey((c) => c + 1)}\n\t\t\t\t\t\tclassName=\"flex items-center gap-2 font-mono text-sm uppercase leading-none\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<Icon name=\"Refresh\" aria-hidden /> Rerun All Tests\n\t\t\t\t\t</button>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t)\n\t}\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{testUI}\n\t\t</PlaygroundWindow>\n\t)\n}\n","\"use client\";\n\n// packages/react/popover/src/Popover.tsx\nimport * as React from \"react\";\nimport { composeEventHandlers } from \"@radix-ui/primitive\";\nimport { useComposedRefs } from \"@radix-ui/react-compose-refs\";\nimport { createContextScope } from \"@radix-ui/react-context\";\nimport { DismissableLayer } from \"@radix-ui/react-dismissable-layer\";\nimport { useFocusGuards } from \"@radix-ui/react-focus-guards\";\nimport { FocusScope } from \"@radix-ui/react-focus-scope\";\nimport { useId } from \"@radix-ui/react-id\";\nimport * as PopperPrimitive from \"@radix-ui/react-popper\";\nimport { createPopperScope } from \"@radix-ui/react-popper\";\nimport { Portal as PortalPrimitive } from \"@radix-ui/react-portal\";\nimport { Presence } from \"@radix-ui/react-presence\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { Slot } from \"@radix-ui/react-slot\";\nimport { useControllableState } from \"@radix-ui/react-use-controllable-state\";\nimport { hideOthers } from \"aria-hidden\";\nimport { RemoveScroll } from \"react-remove-scroll\";\nimport { jsx } from \"react/jsx-runtime\";\nvar POPOVER_NAME = \"Popover\";\nvar [createPopoverContext, createPopoverScope] = createContextScope(POPOVER_NAME, [\n createPopperScope\n]);\nvar usePopperScope = createPopperScope();\nvar [PopoverProvider, usePopoverContext] = createPopoverContext(POPOVER_NAME);\nvar Popover = (props) => {\n const {\n __scopePopover,\n children,\n open: openProp,\n defaultOpen,\n onOpenChange,\n modal = false\n } = props;\n const popperScope = usePopperScope(__scopePopover);\n const triggerRef = React.useRef(null);\n const [hasCustomAnchor, setHasCustomAnchor] = React.useState(false);\n const [open = false, setOpen] = useControllableState({\n prop: openProp,\n defaultProp: defaultOpen,\n onChange: onOpenChange\n });\n return /* @__PURE__ */ jsx(PopperPrimitive.Root, { ...popperScope, children: /* @__PURE__ */ jsx(\n PopoverProvider,\n {\n scope: __scopePopover,\n contentId: useId(),\n triggerRef,\n open,\n onOpenChange: setOpen,\n onOpenToggle: React.useCallback(() => setOpen((prevOpen) => !prevOpen), [setOpen]),\n hasCustomAnchor,\n onCustomAnchorAdd: React.useCallback(() => setHasCustomAnchor(true), []),\n onCustomAnchorRemove: React.useCallback(() => setHasCustomAnchor(false), []),\n modal,\n children\n }\n ) });\n};\nPopover.displayName = POPOVER_NAME;\nvar ANCHOR_NAME = \"PopoverAnchor\";\nvar PopoverAnchor = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopePopover, ...anchorProps } = props;\n const context = usePopoverContext(ANCHOR_NAME, __scopePopover);\n const popperScope = usePopperScope(__scopePopover);\n const { onCustomAnchorAdd, onCustomAnchorRemove } = context;\n React.useEffect(() => {\n onCustomAnchorAdd();\n return () => onCustomAnchorRemove();\n }, [onCustomAnchorAdd, onCustomAnchorRemove]);\n return /* @__PURE__ */ jsx(PopperPrimitive.Anchor, { ...popperScope, ...anchorProps, ref: forwardedRef });\n }\n);\nPopoverAnchor.displayName = ANCHOR_NAME;\nvar TRIGGER_NAME = \"PopoverTrigger\";\nvar PopoverTrigger = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopePopover, ...triggerProps } = props;\n const context = usePopoverContext(TRIGGER_NAME, __scopePopover);\n const popperScope = usePopperScope(__scopePopover);\n const composedTriggerRef = useComposedRefs(forwardedRef, context.triggerRef);\n const trigger = /* @__PURE__ */ jsx(\n Primitive.button,\n {\n type: \"button\",\n \"aria-haspopup\": \"dialog\",\n \"aria-expanded\": context.open,\n \"aria-controls\": context.contentId,\n \"data-state\": getState(context.open),\n ...triggerProps,\n ref: composedTriggerRef,\n onClick: composeEventHandlers(props.onClick, context.onOpenToggle)\n }\n );\n return context.hasCustomAnchor ? trigger : /* @__PURE__ */ jsx(PopperPrimitive.Anchor, { asChild: true, ...popperScope, children: trigger });\n }\n);\nPopoverTrigger.displayName = TRIGGER_NAME;\nvar PORTAL_NAME = \"PopoverPortal\";\nvar [PortalProvider, usePortalContext] = createPopoverContext(PORTAL_NAME, {\n forceMount: void 0\n});\nvar PopoverPortal = (props) => {\n const { __scopePopover, forceMount, children, container } = props;\n const context = usePopoverContext(PORTAL_NAME, __scopePopover);\n return /* @__PURE__ */ jsx(PortalProvider, { scope: __scopePopover, forceMount, children: /* @__PURE__ */ jsx(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ jsx(PortalPrimitive, { asChild: true, container, children }) }) });\n};\nPopoverPortal.displayName = PORTAL_NAME;\nvar CONTENT_NAME = \"PopoverContent\";\nvar PopoverContent = React.forwardRef(\n (props, forwardedRef) => {\n const portalContext = usePortalContext(CONTENT_NAME, props.__scopePopover);\n const { forceMount = portalContext.forceMount, ...contentProps } = props;\n const context = usePopoverContext(CONTENT_NAME, props.__scopePopover);\n return /* @__PURE__ */ jsx(Presence, { present: forceMount || context.open, children: context.modal ? /* @__PURE__ */ jsx(PopoverContentModal, { ...contentProps, ref: forwardedRef }) : /* @__PURE__ */ jsx(PopoverContentNonModal, { ...contentProps, ref: forwardedRef }) });\n }\n);\nPopoverContent.displayName = CONTENT_NAME;\nvar PopoverContentModal = React.forwardRef(\n (props, forwardedRef) => {\n const context = usePopoverContext(CONTENT_NAME, props.__scopePopover);\n const contentRef = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, contentRef);\n const isRightClickOutsideRef = React.useRef(false);\n React.useEffect(() => {\n const content = contentRef.current;\n if (content) return hideOthers(content);\n }, []);\n return /* @__PURE__ */ jsx(RemoveScroll, { as: Slot, allowPinchZoom: true, children: /* @__PURE__ */ jsx(\n PopoverContentImpl,\n {\n ...props,\n ref: composedRefs,\n trapFocus: context.open,\n disableOutsidePointerEvents: true,\n onCloseAutoFocus: composeEventHandlers(props.onCloseAutoFocus, (event) => {\n event.preventDefault();\n if (!isRightClickOutsideRef.current) context.triggerRef.current?.focus();\n }),\n onPointerDownOutside: composeEventHandlers(\n props.onPointerDownOutside,\n (event) => {\n const originalEvent = event.detail.originalEvent;\n const ctrlLeftClick = originalEvent.button === 0 && originalEvent.ctrlKey === true;\n const isRightClick = originalEvent.button === 2 || ctrlLeftClick;\n isRightClickOutsideRef.current = isRightClick;\n },\n { checkForDefaultPrevented: false }\n ),\n onFocusOutside: composeEventHandlers(\n props.onFocusOutside,\n (event) => event.preventDefault(),\n { checkForDefaultPrevented: false }\n )\n }\n ) });\n }\n);\nvar PopoverContentNonModal = React.forwardRef(\n (props, forwardedRef) => {\n const context = usePopoverContext(CONTENT_NAME, props.__scopePopover);\n const hasInteractedOutsideRef = React.useRef(false);\n const hasPointerDownOutsideRef = React.useRef(false);\n return /* @__PURE__ */ jsx(\n PopoverContentImpl,\n {\n ...props,\n ref: forwardedRef,\n trapFocus: false,\n disableOutsidePointerEvents: false,\n onCloseAutoFocus: (event) => {\n props.onCloseAutoFocus?.(event);\n if (!event.defaultPrevented) {\n if (!hasInteractedOutsideRef.current) context.triggerRef.current?.focus();\n event.preventDefault();\n }\n hasInteractedOutsideRef.current = false;\n hasPointerDownOutsideRef.current = false;\n },\n onInteractOutside: (event) => {\n props.onInteractOutside?.(event);\n if (!event.defaultPrevented) {\n hasInteractedOutsideRef.current = true;\n if (event.detail.originalEvent.type === \"pointerdown\") {\n hasPointerDownOutsideRef.current = true;\n }\n }\n const target = event.target;\n const targetIsTrigger = context.triggerRef.current?.contains(target);\n if (targetIsTrigger) event.preventDefault();\n if (event.detail.originalEvent.type === \"focusin\" && hasPointerDownOutsideRef.current) {\n event.preventDefault();\n }\n }\n }\n );\n }\n);\nvar PopoverContentImpl = React.forwardRef(\n (props, forwardedRef) => {\n const {\n __scopePopover,\n trapFocus,\n onOpenAutoFocus,\n onCloseAutoFocus,\n disableOutsidePointerEvents,\n onEscapeKeyDown,\n onPointerDownOutside,\n onFocusOutside,\n onInteractOutside,\n ...contentProps\n } = props;\n const context = usePopoverContext(CONTENT_NAME, __scopePopover);\n const popperScope = usePopperScope(__scopePopover);\n useFocusGuards();\n return /* @__PURE__ */ jsx(\n FocusScope,\n {\n asChild: true,\n loop: true,\n trapped: trapFocus,\n onMountAutoFocus: onOpenAutoFocus,\n onUnmountAutoFocus: onCloseAutoFocus,\n children: /* @__PURE__ */ jsx(\n DismissableLayer,\n {\n asChild: true,\n disableOutsidePointerEvents,\n onInteractOutside,\n onEscapeKeyDown,\n onPointerDownOutside,\n onFocusOutside,\n onDismiss: () => context.onOpenChange(false),\n children: /* @__PURE__ */ jsx(\n PopperPrimitive.Content,\n {\n \"data-state\": getState(context.open),\n role: \"dialog\",\n id: context.contentId,\n ...popperScope,\n ...contentProps,\n ref: forwardedRef,\n style: {\n ...contentProps.style,\n // re-namespace exposed content custom properties\n ...{\n \"--radix-popover-content-transform-origin\": \"var(--radix-popper-transform-origin)\",\n \"--radix-popover-content-available-width\": \"var(--radix-popper-available-width)\",\n \"--radix-popover-content-available-height\": \"var(--radix-popper-available-height)\",\n \"--radix-popover-trigger-width\": \"var(--radix-popper-anchor-width)\",\n \"--radix-popover-trigger-height\": \"var(--radix-popper-anchor-height)\"\n }\n }\n }\n )\n }\n )\n }\n );\n }\n);\nvar CLOSE_NAME = \"PopoverClose\";\nvar PopoverClose = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopePopover, ...closeProps } = props;\n const context = usePopoverContext(CLOSE_NAME, __scopePopover);\n return /* @__PURE__ */ jsx(\n Primitive.button,\n {\n type: \"button\",\n ...closeProps,\n ref: forwardedRef,\n onClick: composeEventHandlers(props.onClick, () => context.onOpenChange(false))\n }\n );\n }\n);\nPopoverClose.displayName = CLOSE_NAME;\nvar ARROW_NAME = \"PopoverArrow\";\nvar PopoverArrow = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopePopover, ...arrowProps } = props;\n const popperScope = usePopperScope(__scopePopover);\n return /* @__PURE__ */ jsx(PopperPrimitive.Arrow, { ...popperScope, ...arrowProps, ref: forwardedRef });\n }\n);\nPopoverArrow.displayName = ARROW_NAME;\nfunction getState(open) {\n return open ? \"open\" : \"closed\";\n}\nvar Root2 = Popover;\nvar Anchor2 = PopoverAnchor;\nvar Trigger = PopoverTrigger;\nvar Portal = PopoverPortal;\nvar Content2 = PopoverContent;\nvar Close = PopoverClose;\nvar Arrow2 = PopoverArrow;\nexport {\n Anchor2 as Anchor,\n Arrow2 as Arrow,\n Close,\n Content2 as Content,\n Popover,\n PopoverAnchor,\n PopoverArrow,\n PopoverClose,\n PopoverContent,\n PopoverPortal,\n PopoverTrigger,\n Portal,\n Root2 as Root,\n Trigger,\n createPopoverScope\n};\n//# sourceMappingURL=index.mjs.map\n","import * as Popover from '@radix-ui/react-popover'\nimport { Await, useLoaderData } from '@remix-run/react'\nimport * as React from 'react'\nimport { Icon } from '#app/components/icons.tsx'\nimport { SimpleTooltip } from '#app/components/ui/tooltip.tsx'\nimport { LaunchEditor } from '#app/routes/launch-editor.tsx'\nimport { SetAppToPlayground } from '#app/routes/set-playground.tsx'\nimport { type loader } from '../_layout.tsx'\n\nfunction TouchedFiles() {\n\tconst data = useLoaderData<typeof loader>()\n\n\tconst [open, setOpen] = React.useState(false)\n\tconst contentRef = React.useRef<HTMLDivElement>(null)\n\n\tfunction handleLaunchUpdate() {\n\t\tsetOpen(false)\n\t}\n\n\tconst appName = data.playground?.appName\n\n\treturn (\n\t\t<>\n\t\t\t<Popover.Root open={open} onOpenChange={setOpen}>\n\t\t\t\t<Popover.Trigger asChild>\n\t\t\t\t\t<button\n\t\t\t\t\t\tclassName=\"flex h-full items-center gap-1 border-r px-6 py-3 font-mono text-sm uppercase\"\n\t\t\t\t\t\taria-label=\"Relevant Files\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<Icon name=\"Files\" />\n\t\t\t\t\t\tFiles\n\t\t\t\t\t</button>\n\t\t\t\t</Popover.Trigger>\n\t\t\t\t<Popover.Portal>\n\t\t\t\t\t<Popover.Content\n\t\t\t\t\t\tref={contentRef}\n\t\t\t\t\t\tclassName=\"slideRightContent lg:slideUpContent invert-theme z-10 select-none rounded bg-background px-9 py-8 text-foreground\"\n\t\t\t\t\t\talign=\"start\"\n\t\t\t\t\t\tsideOffset={5}\n\t\t\t\t\t>\n\t\t\t\t\t\t<div className=\"launch-editor-wrapper\">\n\t\t\t\t\t\t\t<strong className=\"inline-block px-2 pb-4 font-semibold uppercase\">\n\t\t\t\t\t\t\t\tRelevant Files\n\t\t\t\t\t\t\t</strong>\n\t\t\t\t\t\t\t{data.problem &&\n\t\t\t\t\t\t\tdata.playground?.appName !== data.problem.name ? (\n\t\t\t\t\t\t\t\t<div className=\"mb-2 rounded p-1 font-mono font-medium\">\n\t\t\t\t\t\t\t\t\t<SetAppToPlayground appName={data.problem.name} />\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t) : null}\n\t\t\t\t\t\t\t<div id=\"files\">\n\t\t\t\t\t\t\t\t<React.Suspense\n\t\t\t\t\t\t\t\t\tfallback={\n\t\t\t\t\t\t\t\t\t\t<SimpleTooltip content=\"Loading diff\">\n\t\t\t\t\t\t\t\t\t\t\t<div className=\"flex justify-center\">\n\t\t\t\t\t\t\t\t\t\t\t\t<Icon name=\"Refresh\" className=\"h-8 w-8 animate-spin\" />\n\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t</SimpleTooltip>\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\t<Await\n\t\t\t\t\t\t\t\t\t\tresolve={data.diff}\n\t\t\t\t\t\t\t\t\t\terrorElement={\n\t\t\t\t\t\t\t\t\t\t\t<div className=\"text-foreground-danger\">\n\t\t\t\t\t\t\t\t\t\t\t\tSomething went wrong.\n\t\t\t\t\t\t\t\t\t\t\t</div>\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{({ diffFiles }) => {\n\t\t\t\t\t\t\t\t\t\t\tif (!diffFiles) {\n\t\t\t\t\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t\t\t\t\t<p className=\"text-foreground-danger\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tUnable to determine diff\n\t\t\t\t\t\t\t\t\t\t\t\t\t</p>\n\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tif (typeof diffFiles === 'string') {\n\t\t\t\t\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t\t\t\t\t<p className=\"text-foreground-danger\">{diffFiles}</p>\n\t\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tif (!diffFiles.length) {\n\t\t\t\t\t\t\t\t\t\t\t\treturn <p>No files changed</p>\n\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t\tconst props =\n\t\t\t\t\t\t\t\t\t\t\t\tappName || ENV.EPICSHOP_GITHUB_ROOT\n\t\t\t\t\t\t\t\t\t\t\t\t\t? {}\n\t\t\t\t\t\t\t\t\t\t\t\t\t: {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttitle:\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"You must 'Set to Playground' before opening a file\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tclassName: 'not-allowed',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t\t\t\t<ul {...props}>\n\t\t\t\t\t\t\t\t\t\t\t\t\t{diffFiles.length > 1 && !ENV.EPICSHOP_DEPLOYED ? (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<div className=\"mb-2 border-b border-b-gray-50 border-opacity-50 pb-2 font-sans\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<LaunchEditor\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tappFile={diffFiles.map(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t(file) => `${file.path},${file.line},1`,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tappName=\"playground\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tonUpdate={handleLaunchUpdate}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<p>Open All Files</p>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</LaunchEditor>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t\t\t\t\t) : null}\n\t\t\t\t\t\t\t\t\t\t\t\t\t{diffFiles.map((file) => (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t<li key={file.path} data-state={file.status}>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<LaunchEditor\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tappFile={`${file.path},${file.line},1`}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tappName={\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tENV.EPICSHOP_DEPLOYED\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t? data.problem?.name ?? 'playground'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t: 'playground'\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tonUpdate={handleLaunchUpdate}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<code>{file.path}</code>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t</LaunchEditor>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t\t\t\t\t\t\t\t))}\n\t\t\t\t\t\t\t\t\t\t\t\t</ul>\n\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</Await>\n\t\t\t\t\t\t\t\t</React.Suspense>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</Popover.Content>\n\t\t\t\t</Popover.Portal>\n\t\t\t</Popover.Root>\n\t\t</>\n\t)\n}\n\nexport default TouchedFiles\n","import { ElementScrollRestoration } from '@epic-web/restore-scroll'\nimport {\n\tgetAppByName,\n\tgetAppDisplayName,\n\tgetAppPageRoute,\n\tgetApps,\n\tgetExerciseApp,\n\tgetNextExerciseApp,\n\tgetPrevExerciseApp,\n\tgetWorkshopTitle,\n\tisExerciseStepApp,\n\tisPlaygroundApp,\n\trequireExercise,\n\trequireExerciseApp,\n\ttype App,\n\ttype ExerciseStepApp,\n} from '@epic-web/workshop-utils/apps.server'\nimport {\n\tisAppRunning,\n\tisPortAvailable,\n} from '@epic-web/workshop-utils/process-manager.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\tdefer,\n\tredirect,\n\ttype HeadersFunction,\n\ttype LoaderFunctionArgs,\n\ttype MetaFunction,\n\ttype SerializeFrom,\n} from '@remix-run/node'\nimport {\n\tLink,\n\tuseLoaderData,\n\tuseNavigate,\n\tuseSearchParams,\n} from '@remix-run/react'\nimport slugify from '@sindresorhus/slugify'\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 { NavChevrons } from '#app/components/nav-chevrons.tsx'\nimport { type loader as rootLoader } from '#app/root.tsx'\nimport { getDiscordAuthURL } from '#app/routes/discord.callback.ts'\nimport { EditFileOnGitHub } from '#app/routes/launch-editor.tsx'\nimport { ProgressToggle } from '#app/routes/progress.tsx'\nimport { SetAppToPlayground } from '#app/routes/set-playground.tsx'\nimport { getDiffCode, getDiffFiles } from '#app/utils/diff.server.ts'\nimport { getEpicVideoInfos } from '#app/utils/epic-api.ts'\nimport { useAltDown } from '#app/utils/misc.tsx'\nimport { getSeoMetaTags } from '#app/utils/seo.js'\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 { StepMdx } from './__shared/step-mdx.tsx'\nimport { Tests } from './__shared/tests.tsx'\nimport TouchedFiles from './__shared/touched-files.tsx'\n\nfunction pageTitle(\n\tdata: SerializeFrom<typeof loader> | undefined,\n\tworkshopTitle?: string,\n) {\n\tconst exerciseNumber =\n\t\tdata?.exerciseStepApp.exerciseNumber.toString().padStart(2, '0') ?? '00'\n\tconst stepNumber =\n\t\tdata?.exerciseStepApp.stepNumber.toString().padStart(2, '0') ?? '00'\n\tconst emoji = (\n\t\t{\n\t\t\tproblem: '💪',\n\t\t\tsolution: '🏁',\n\t\t} as const\n\t)[data?.type ?? 'problem']\n\tconst title = data?.[data.type]?.title ?? 'N/A'\n\treturn {\n\t\temoji,\n\t\tstepNumber,\n\t\ttitle,\n\t\texerciseNumber,\n\t\texerciseTitle: data?.exerciseTitle ?? 'Unknown exercise',\n\t\tworkshopTitle,\n\t\ttype: data?.type ?? 'problem',\n\t}\n}\n\nexport const meta: MetaFunction<typeof loader, { root: typeof rootLoader }> = ({\n\tdata,\n\tmatches,\n\tparams,\n}) => {\n\tconst rootData = matches.find((m) => m.id === 'root')?.data\n\tif (!data || !rootData) return [{ title: '🦉 | Error' }]\n\tconst { emoji, stepNumber, title, exerciseNumber, exerciseTitle } =\n\t\tpageTitle(data)\n\n\treturn getSeoMetaTags({\n\t\ttitle: `${emoji} | ${stepNumber}. ${title} | ${exerciseNumber}. ${exerciseTitle} | ${rootData.workshopTitle}`,\n\t\tdescription: `${params.type} step for exercise ${exerciseNumber}. ${exerciseTitle}`,\n\t\togTitle: title,\n\t\togDescription: `${exerciseTitle} step ${Number(stepNumber)} ${params.type}`,\n\t\tinstructor: rootData.instructor,\n\t\trequestInfo: rootData.requestInfo,\n\t})\n}\n\nexport async function loader({ request, params }: LoaderFunctionArgs) {\n\tconst timings = makeTimings('exerciseStepTypeLoader')\n\tconst workshopTitle = await getWorkshopTitle()\n\tconst searchParams = new URL(request.url).searchParams\n\tconst cacheOptions = { request, timings }\n\tconst exerciseStepApp = await requireExerciseApp(params, cacheOptions)\n\tconst exercise = await requireExercise(\n\t\texerciseStepApp.exerciseNumber,\n\t\tcacheOptions,\n\t)\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\tasync function getAppRunningState(a: App) {\n\t\tif (a.dev.type !== 'script') {\n\t\t\treturn { isRunning: false, portIsAvailable: null }\n\t\t}\n\t\tconst isRunning = isAppRunning(a)\n\t\tconst portIsAvailable = isRunning\n\t\t\t? null\n\t\t\t: await isPortAvailable(a.dev.portNumber)\n\t\treturn { isRunning, portIsAvailable }\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\tconst exerciseId = getStepId(exerciseStepApp)\n\tconst exerciseIndex = allApps.findIndex((step) => step.stepId === exerciseId)\n\n\tconst exerciseApps = allAppsFull\n\t\t.filter(isExerciseStepApp)\n\t\t.filter((app) => app.exerciseNumber === exerciseStepApp.exerciseNumber)\n\tconst isLastStep =\n\t\texerciseApps[exerciseApps.length - 1]?.name === exerciseStepApp.name\n\tconst isFirstStep = exerciseApps[0]?.name === exerciseStepApp.name\n\n\tconst nextApp = await getNextExerciseApp(exerciseStepApp, cacheOptions)\n\tconst prevApp = await getPrevExerciseApp(exerciseStepApp, cacheOptions)\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\tdiffFiles: null,\n\t\t\t}\n\t\t}\n\t\tconst [diffCode, diffFiles] = await Promise.all([\n\t\t\tgetDiffCode(app1, app2, {\n\t\t\t\t...cacheOptions,\n\t\t\t\tforceFresh: searchParams.get('forceFresh') === 'diff',\n\t\t\t}).catch((e) => {\n\t\t\t\tconsole.error(e)\n\t\t\t\treturn null\n\t\t\t}),\n\t\t\tproblemApp && solutionApp\n\t\t\t\t? getDiffFiles(problemApp, solutionApp, {\n\t\t\t\t\t\t...cacheOptions,\n\t\t\t\t\t\tforceFresh: searchParams.get('forceFresh') === 'diff',\n\t\t\t\t\t}).catch((e) => {\n\t\t\t\t\t\tconsole.error(e)\n\t\t\t\t\t\treturn 'There was a problem generating the diff'\n\t\t\t\t\t})\n\t\t\t\t: 'No diff available',\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\tdiffFiles,\n\t\t}\n\t}\n\n\tconst articleId = `workshop-${slugify(workshopTitle)}-${\n\t\texercise.exerciseNumber\n\t}-${exerciseStepApp.stepNumber}-${exerciseStepApp.type}`\n\treturn defer(\n\t\t{\n\t\t\tarticleId,\n\t\t\ttype: params.type as 'problem' | 'solution',\n\t\t\texerciseStepApp,\n\t\t\texerciseTitle: exercise.title,\n\t\t\tepicVideoInfosPromise: getEpicVideoInfos(exerciseStepApp.epicVideoEmbeds),\n\t\t\texerciseIndex,\n\t\t\tallApps,\n\t\t\tdiscordAuthUrl: getDiscordAuthURL(),\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\tprevStepLink: isFirstStep\n\t\t\t\t? {\n\t\t\t\t\t\tto: `/${exerciseStepApp.exerciseNumber\n\t\t\t\t\t\t\t.toString()\n\t\t\t\t\t\t\t.padStart(2, '0')}`,\n\t\t\t\t\t}\n\t\t\t\t: prevApp\n\t\t\t\t\t? { to: getAppPageRoute(prevApp) }\n\t\t\t\t\t: null,\n\t\t\tnextStepLink: isLastStep\n\t\t\t\t? {\n\t\t\t\t\t\tto: `/${exerciseStepApp.exerciseNumber\n\t\t\t\t\t\t\t.toString()\n\t\t\t\t\t\t\t.padStart(2, '0')}/finished`,\n\t\t\t\t\t}\n\t\t\t\t: nextApp\n\t\t\t\t\t? { to: getAppPageRoute(nextApp) }\n\t\t\t\t\t: null,\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\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\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\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 titleBits = pageTitle(data)\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'\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<div className=\"flex max-w-full flex-grow flex-col\">\n\t\t\t<main className=\"flex flex-grow flex-col sm:grid sm:h-full sm:min-h-[800px] sm:grid-cols-1 sm:grid-rows-2 md:min-h-[unset] lg:grid-cols-2 lg:grid-rows-1\">\n\t\t\t\t<div className=\"relative flex flex-col sm:col-span-1 sm:row-span-1 sm:h-full lg:border-r\">\n\t\t\t\t\t<h1 className=\"h-14 border-b pl-10 pr-5 text-sm font-medium leading-tight\">\n\t\t\t\t\t\t<div className=\"flex h-14 flex-wrap items-center justify-between gap-x-2 py-2\">\n\t\t\t\t\t\t\t<div className=\"flex items-center justify-start gap-x-2 uppercase\">\n\t\t\t\t\t\t\t\t<Link\n\t\t\t\t\t\t\t\t\tto={`/${titleBits.exerciseNumber}`}\n\t\t\t\t\t\t\t\t\tclassName=\"hover:underline\"\n\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t{titleBits.exerciseNumber}. {titleBits.exerciseTitle}\n\t\t\t\t\t\t\t\t</Link>\n\t\t\t\t\t\t\t\t{'/'}\n\t\t\t\t\t\t\t\t<Link to=\".\" className=\"hover:underline\">\n\t\t\t\t\t\t\t\t\t{titleBits.stepNumber}. {titleBits.title}\n\t\t\t\t\t\t\t\t\t{' ('}\n\t\t\t\t\t\t\t\t\t{titleBits.emoji} {titleBits.type}\n\t\t\t\t\t\t\t\t\t{')'}\n\t\t\t\t\t\t\t\t</Link>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t{data.problem &&\n\t\t\t\t\t\t\tdata.playground?.appName !== data.problem.name ? (\n\t\t\t\t\t\t\t\t<div className=\"hidden md:block\">\n\t\t\t\t\t\t\t\t\t<SetAppToPlayground appName={data.problem.name} />\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t) : null}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</h1>\n\t\t\t\t\t<article\n\t\t\t\t\t\tid={data.articleId}\n\t\t\t\t\t\tkey={data.articleId}\n\t\t\t\t\t\tclassName=\"shadow-on-scrollbox h-full w-full max-w-none flex-1 scroll-pt-6 space-y-6 overflow-y-auto p-2 scrollbar-thin scrollbar-thumb-scrollbar sm:p-10 sm:pt-8\"\n\t\t\t\t\t>\n\t\t\t\t\t\t{data.exerciseStepApp.instructionsCode ? (\n\t\t\t\t\t\t\t<StepMdx inBrowserBrowserRef={inBrowserBrowserRef} />\n\t\t\t\t\t\t) : (\n\t\t\t\t\t\t\t<p>No instructions yet...</p>\n\t\t\t\t\t\t)}\n\t\t\t\t\t</article>\n\t\t\t\t\t<ElementScrollRestoration\n\t\t\t\t\t\telementQuery={`#${data.articleId}`}\n\t\t\t\t\t\tkey={`scroll-${data.articleId}`}\n\t\t\t\t\t/>\n\t\t\t\t\t{data.type === 'solution' ? (\n\t\t\t\t\t\t<ProgressToggle\n\t\t\t\t\t\t\ttype=\"step\"\n\t\t\t\t\t\t\texerciseNumber={data.exerciseStepApp.exerciseNumber}\n\t\t\t\t\t\t\tstepNumber={data.exerciseStepApp.stepNumber}\n\t\t\t\t\t\t\tclassName=\"h-14 border-t px-6\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t) : null}\n\t\t\t\t\t<div className=\"flex h-16 justify-between border-b-4 border-t lg:border-b-0\">\n\t\t\t\t\t\t<div>\n\t\t\t\t\t\t\t<div className=\"h-full\">\n\t\t\t\t\t\t\t\t<TouchedFiles />\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<EditFileOnGitHub\n\t\t\t\t\t\t\tappName={data.exerciseStepApp.name}\n\t\t\t\t\t\t\trelativePath={data.exerciseStepApp.relativePath}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t<NavChevrons\n\t\t\t\t\t\t\tprev={\n\t\t\t\t\t\t\t\tdata.prevStepLink\n\t\t\t\t\t\t\t\t\t? {\n\t\t\t\t\t\t\t\t\t\t\tto: data.prevStepLink.to,\n\t\t\t\t\t\t\t\t\t\t\t'aria-label': 'Previous Step',\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t: null\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tnext={\n\t\t\t\t\t\t\t\tdata.nextStepLink\n\t\t\t\t\t\t\t\t\t? {\n\t\t\t\t\t\t\t\t\t\t\tto: data.nextStepLink.to,\n\t\t\t\t\t\t\t\t\t\t\t'aria-label': 'Next Step',\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t: null\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t/>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t<Tabs.Root\n\t\t\t\t\tclassName=\"relative flex flex-col overflow-y-auto sm:col-span-1 sm:row-span-1\"\n\t\t\t\t\tvalue={activeTab}\n\t\t\t\t\t// intentionally no onValueChange here because the Link will trigger the\n\t\t\t\t\t// change.\n\t\t\t\t>\n\t\t\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\t\t{tabs.map((tab) => {\n\t\t\t\t\t\t\tconst hidden = shouldHideTab(tab)\n\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t<Tabs.Trigger key={tab} value={tab} hidden={hidden} asChild>\n\t\t\t\t\t\t\t\t\t<Link\n\t\t\t\t\t\t\t\t\t\tid={`${tab}-tab`}\n\t\t\t\t\t\t\t\t\t\tclassName={clsx(\n\t\t\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\t\t\thidden ? 'hidden' : 'inline-block',\n\t\t\t\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\t\t\t\tpreventScrollReset\n\t\t\t\t\t\t\t\t\t\tprefetch=\"intent\"\n\t\t\t\t\t\t\t\t\t\tonClick={handleDiffTabClick}\n\t\t\t\t\t\t\t\t\t\tto={\n\t\t\t\t\t\t\t\t\t\t\ttab === 'diff' && altDown\n\t\t\t\t\t\t\t\t\t\t\t\t? altDiffUrl\n\t\t\t\t\t\t\t\t\t\t\t\t: `?${withParam(\n\t\t\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\t\t'preview',\n\t\t\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\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{tab}\n\t\t\t\t\t\t\t\t\t</Link>\n\t\t\t\t\t\t\t\t</Tabs.Trigger>\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t})}\n\t\t\t\t\t</Tabs.List>\n\t\t\t\t\t<div className=\"relative z-10 flex min-h-96 flex-grow flex-col overflow-y-auto\">\n\t\t\t\t\t\t<Tabs.Content\n\t\t\t\t\t\t\tvalue=\"playground\"\n\t\t\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\t\t>\n\t\t\t\t\t\t\t<Playground\n\t\t\t\t\t\t\t\tappInfo={data.playground}\n\t\t\t\t\t\t\t\tproblemAppName={data.problem?.name}\n\t\t\t\t\t\t\t\tinBrowserBrowserRef={inBrowserBrowserRef}\n\t\t\t\t\t\t\t\tallApps={data.allApps}\n\t\t\t\t\t\t\t\tisUpToDate={data.playground?.isUpToDate ?? false}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</Tabs.Content>\n\t\t\t\t\t\t<Tabs.Content\n\t\t\t\t\t\t\tvalue=\"problem\"\n\t\t\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\t\t>\n\t\t\t\t\t\t\t<Preview\n\t\t\t\t\t\t\t\tappInfo={data.problem}\n\t\t\t\t\t\t\t\tinBrowserBrowserRef={inBrowserBrowserRef}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</Tabs.Content>\n\t\t\t\t\t\t<Tabs.Content\n\t\t\t\t\t\t\tvalue=\"solution\"\n\t\t\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\t\t>\n\t\t\t\t\t\t\t<Preview\n\t\t\t\t\t\t\t\tappInfo={data.solution}\n\t\t\t\t\t\t\t\tinBrowserBrowserRef={inBrowserBrowserRef}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</Tabs.Content>\n\t\t\t\t\t\t<Tabs.Content\n\t\t\t\t\t\t\tvalue=\"tests\"\n\t\t\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\t\t>\n\t\t\t\t\t\t\t<Tests\n\t\t\t\t\t\t\t\tappInfo={data.playground}\n\t\t\t\t\t\t\t\tproblemAppName={data.problem?.name}\n\t\t\t\t\t\t\t\tallApps={data.allApps}\n\t\t\t\t\t\t\t\tisUpToDate={data.playground?.isUpToDate ?? false}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</Tabs.Content>\n\t\t\t\t\t\t<Tabs.Content\n\t\t\t\t\t\t\tvalue=\"diff\"\n\t\t\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\t\t>\n\t\t\t\t\t\t\t<Diff diff={data.diff} allApps={data.allApps} />\n\t\t\t\t\t\t</Tabs.Content>\n\t\t\t\t\t\t<Tabs.Content\n\t\t\t\t\t\t\tvalue=\"chat\"\n\t\t\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\t\t>\n\t\t\t\t\t\t\t<DiscordChat />\n\t\t\t\t\t\t</Tabs.Content>\n\t\t\t\t\t</div>\n\t\t\t\t</Tabs.Root>\n\t\t\t</main>\n\t\t</div>\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","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","children","contentProps","isMountAnimationPreventedRef","rAF","Presence","present","baseId","Root2","List","Trigger","Content","SetPlayground","appName","reset","tooltipText","buttonProps","fetcher","useFetcher","submitButton","type","className","clsx","state","data","status","jsxs","Form","action","method","name","showProgressBarField","SimpleTooltip","content","PlaygroundChooser","playgroundAppName","allApps","Select","submit","placeholder","Icon","position","align","filter","app","map","SelectItem","displayName","SetAppToPlayground","ENV","EPICSHOP_DEPLOYED","t","e","module","this","n","r","s","u","a","o","c","f","h","d","l","y","M","m","v","i","g","D","p","S","w","O","b","$","k","dayjs","utcPlugin","timeZonePlugin","relativeTimePlugin","DiscordChat","useLoaderData","DiscordCTA","DiscordPosts","ctaLink","useDiscordCTALink","altDown","useAltDown","React.Suspense","Loading","Await","posts","post","DiscordPost","Link","thread","reactionsWithCounts","hints","useHints","Emoji","url","PlaygroundWindow","problemAppName","isUpToDate","isCorrectApp","playgroundLinkedUI","setPlaygroundTooltipText","AppStopper","inFlightIntent","formData","get","inFlightState","PortStopper","port","Button","varient","AppStarter","error","historyCallDataSchema","z","loadedSchema","messageSchema","getNewIndex","prevIndex","delta","max","InBrowserBrowser","forwardRef","InBrowserBrowserImpl","portIsAvailable","isRunning","baseUrl","initialRoute","requestInfo","useRequestInfo","InBrowserBrowserForRealz","getBaseUrl","InBrowserBrowserForRealzImpl","searchParams","setSearchParams","useSearchParams","searchParamsPathname","iframeKeyNumber","setIframeKeyNumber","useState","iframeKey","lastDirectionRef","useRef","lastDirectionTimeout","iframeContext","setIFrameContext","pathnameInputValue","setPathnameInputValue","iframeRef","appUrl","currentAppUrl","useEffect","iframeSrcUrl","setIframeSrcUrl","currentId","handleMessage","messageEvent","_a","result","prevContext","newIndex","currentPathname","newPathname","newHistory","pathname","setSearchParamsLatestRef","iframePathname","newSearchParams","navigateChild","params","to","_b","handleExtrnalNavigation","newPathnameInputValue","useImperativeHandle","atEndOfHistory","atStartOfHistory","existingSearchParamHiddenInputs","TooltipProvider","Tooltip","TooltipTrigger","TooltipContent","Preview","appInfo","inBrowserBrowserRef","dev","title","cn","Playground","playgroundAppInfo","showToast","UpdateMdxCache","handleClick","cacheLocation","embeddedKey","appFullPath","onClick","StepContext","React.createContext","useStepContext","React.useContext","StepContextProvider","stepMdxComponents","CodeFile","CodeFileNotification","DiffLink","PrevDiffLink","NextDiffLink","InlineFile","LinkToApp","StepMdx","EpicVideoInfoProvider","Mdx","withParam","fullPage","app1","app2","getAppName","input","stepIndex","stepName","app1Name","app2Name","pathToDiff","file","variant","visibility","setVisibility","LaunchEditor","info","getPreviewType","preview","appTo","previewAppUrl","href","testRunnerStatusDataSchema","testRunnerTestStepDataSchema","testRunnerDataSchema","InBrowserTestRunner","testFile","message","setMessage","testSteps","setTestSteps","steps","statusEmoji","AnimatedBars","sortedTestSteps","testStepStatusEmojis","Fragment","Accordion.Root","AccordionComponent","testStep","testEventSchema","union","object","literal","exitCode","number","nullable","optional","boolean","output","html","string","timestamp","code","testEventQueueSchema","simpleReducer","prev","getNext","TestOutput","dispatch","useReducer","version","lines","lastMessage","useEventSource","URLSearchParams","parsed","JSON","parse","safeParse","success","console","flatten","sort","TestRunner","onRun","role","StopTest","String","ClearTest","onClear","line","dangerouslySetInnerHTML","__html","latestOnRun","current","latestOnClear","onStop","latestOnStop","Tests","inBrowserTestKey","setInBrowserTestKey","testUI","POPOVER_NAME","createPopoverContext","createPopoverScope","createPopperScope","usePopperScope","PopoverProvider","usePopoverContext","Popover","__scopePopover","openProp","defaultOpen","onOpenChange","modal","popperScope","triggerRef","hasCustomAnchor","setHasCustomAnchor","open","setOpen","PopperPrimitive.Root","prevOpen","ANCHOR_NAME","PopoverAnchor","anchorProps","onCustomAnchorAdd","onCustomAnchorRemove","PopperPrimitive.Anchor","PopoverTrigger","composedTriggerRef","trigger","getState","PORTAL_NAME","PortalProvider","usePortalContext","PopoverPortal","container","PortalPrimitive","PopoverContent","portalContext","PopoverContentModal","PopoverContentNonModal","contentRef","isRightClickOutsideRef","hideOthers","RemoveScroll","Slot","PopoverContentImpl","originalEvent","ctrlLeftClick","isRightClick","hasInteractedOutsideRef","hasPointerDownOutsideRef","target","trapFocus","onOpenAutoFocus","onCloseAutoFocus","disableOutsidePointerEvents","onEscapeKeyDown","onPointerDownOutside","onFocusOutside","onInteractOutside","useFocusGuards","FocusScope","DismissableLayer","PopperPrimitive.Content","CLOSE_NAME","PopoverClose","closeProps","ARROW_NAME","PopoverArrow","arrowProps","PopperPrimitive.Arrow","Portal","Content2","TouchedFiles","handleLaunchUpdate","Popover.Root","Popover.Trigger","Popover.Portal","Popover.Content","diffFiles","pageTitle","workshopTitle","exerciseNumber","exerciseStepApp","toString","padStart","stepNumber","emoji","problem","solution","exerciseTitle","meta","matches","rootData","find","getSeoMetaTags","description","ogTitle","ogDescription","Number","instructor","tabs","isValidPreview","Boolean","includes","delete","set","ExercisePartRoute","titleBits","navigate","useNavigate","shouldHideTab","tab","playground","test","activeTab","altDiffUrl","handleDiffTabClick","altKey","ctrlKey","shiftKey","metaKey","preventDefault","articleId","instructionsCode","ElementScrollRestoration","elementQuery","ProgressToggle","EditFileOnGitHub","relativePath","NavChevrons","prevStepLink","next","nextStepLink","hidden","asChild","preventScrollReset","prefetch","Diff","diff","ErrorBoundary","GeneralErrorBoundary","statusHandlers"],"mappings":"i8CAcA,IAAIA,GAAc,gCACdC,GAAgB,CAAE,QAAS,GAAO,WAAY,EAAI,EAClDC,GAAa,mBACb,CAACC,GAAYC,GAAeC,EAAqB,EAAIC,GAAiBJ,EAAU,EAChF,CAACK,GAA+BC,EAA2B,EAAIC,GACjEP,GACA,CAACG,EAAqB,CACxB,EACI,CAACK,GAAqBC,EAAqB,EAAIJ,GAA8BL,EAAU,EACvFU,GAAmBC,EAAgB,WACrC,CAACC,EAAOC,IACiBC,MAAIb,GAAW,SAAU,CAAE,MAAOW,EAAM,wBAAyB,SAA0BE,EAAAA,IAAIb,GAAW,KAAM,CAAE,MAAOW,EAAM,wBAAyB,SAA0B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