screenreader-speech-capture 0.9.0 → 0.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (240) hide show
  1. package/README.md +17 -0
  2. package/dist/cli.mjs +1 -1
  3. package/dist/ui/adapter-node.js +1 -1
  4. package/dist/ui/client/ui/_app/immutable/assets/{0.CnPCLsGJ.css → 0.DH3e8XLu.css} +1 -1
  5. package/dist/ui/client/ui/_app/immutable/assets/0.DH3e8XLu.css.br +0 -0
  6. package/dist/ui/client/ui/_app/immutable/assets/0.DH3e8XLu.css.gz +0 -0
  7. package/dist/ui/client/ui/_app/immutable/assets/2.DSVNnDlO.css +1 -0
  8. package/dist/ui/client/ui/_app/immutable/assets/2.DSVNnDlO.css.br +3 -0
  9. package/dist/ui/client/ui/_app/immutable/assets/2.DSVNnDlO.css.gz +0 -0
  10. package/dist/ui/client/ui/_app/immutable/assets/4.DIE1qdmp.css +1 -0
  11. package/dist/ui/client/ui/_app/immutable/assets/4.DIE1qdmp.css.br +0 -0
  12. package/dist/ui/client/ui/_app/immutable/assets/4.DIE1qdmp.css.gz +0 -0
  13. package/dist/ui/client/ui/_app/immutable/assets/5.DCMlxwLh.css +1 -0
  14. package/dist/ui/client/ui/_app/immutable/assets/5.DCMlxwLh.css.br +0 -0
  15. package/dist/ui/client/ui/_app/immutable/assets/5.DCMlxwLh.css.gz +0 -0
  16. package/dist/ui/client/ui/_app/immutable/assets/6.C0Nhvs_m.css +1 -0
  17. package/dist/ui/client/ui/_app/immutable/assets/6.C0Nhvs_m.css.br +0 -0
  18. package/dist/ui/client/ui/_app/immutable/assets/6.C0Nhvs_m.css.gz +0 -0
  19. package/dist/ui/client/ui/_app/immutable/assets/ExternalLink.CYXazpKA.css +1 -0
  20. package/dist/ui/client/ui/_app/immutable/assets/ExternalLink.CYXazpKA.css.br +0 -0
  21. package/dist/ui/client/ui/_app/immutable/assets/ExternalLink.CYXazpKA.css.gz +0 -0
  22. package/dist/ui/client/ui/_app/immutable/assets/Pane.Co7gxzxw.css +1 -0
  23. package/dist/ui/client/ui/_app/immutable/assets/Pane.Co7gxzxw.css.br +0 -0
  24. package/dist/ui/client/ui/_app/immutable/assets/Pane.Co7gxzxw.css.gz +0 -0
  25. package/dist/ui/client/ui/_app/immutable/chunks/{Cba3ZwaX.js → 4R6qUa-I.js} +12 -13
  26. package/dist/ui/client/ui/_app/immutable/chunks/4R6qUa-I.js.br +0 -0
  27. package/dist/ui/client/ui/_app/immutable/chunks/4R6qUa-I.js.gz +0 -0
  28. package/dist/ui/client/ui/_app/immutable/chunks/BC9D66S_.js +2 -0
  29. package/dist/ui/client/ui/_app/immutable/chunks/BC9D66S_.js.br +0 -0
  30. package/dist/ui/client/ui/_app/immutable/chunks/BC9D66S_.js.gz +0 -0
  31. package/dist/ui/client/ui/_app/immutable/chunks/BCiTXg3M.js +138 -0
  32. package/dist/ui/client/ui/_app/immutable/chunks/BCiTXg3M.js.br +0 -0
  33. package/dist/ui/client/ui/_app/immutable/chunks/BCiTXg3M.js.gz +0 -0
  34. package/dist/ui/client/ui/_app/immutable/chunks/BGgW64O2.js +1 -0
  35. package/dist/ui/client/ui/_app/immutable/chunks/BGgW64O2.js.br +2 -0
  36. package/dist/ui/client/ui/_app/immutable/chunks/BGgW64O2.js.gz +0 -0
  37. package/dist/ui/client/ui/_app/immutable/chunks/Bvlvl8SZ.js +1 -0
  38. package/dist/ui/client/ui/_app/immutable/chunks/Bvlvl8SZ.js.br +0 -0
  39. package/dist/ui/client/ui/_app/immutable/chunks/Bvlvl8SZ.js.gz +0 -0
  40. package/dist/ui/client/ui/_app/immutable/chunks/ByQTEKOy.js +3 -0
  41. package/dist/ui/client/ui/_app/immutable/chunks/ByQTEKOy.js.br +0 -0
  42. package/dist/ui/client/ui/_app/immutable/chunks/ByQTEKOy.js.gz +0 -0
  43. package/dist/ui/client/ui/_app/immutable/chunks/C-UVUBR9.js +3 -0
  44. package/dist/ui/client/ui/_app/immutable/chunks/C-UVUBR9.js.br +0 -0
  45. package/dist/ui/client/ui/_app/immutable/chunks/C-UVUBR9.js.gz +0 -0
  46. package/dist/ui/client/ui/_app/immutable/chunks/C1Z3Vlq6.js +3 -0
  47. package/dist/ui/client/ui/_app/immutable/chunks/C1Z3Vlq6.js.br +11 -0
  48. package/dist/ui/client/ui/_app/immutable/chunks/C1Z3Vlq6.js.gz +0 -0
  49. package/dist/ui/client/ui/_app/immutable/chunks/CSj31z2g.js +1 -0
  50. package/dist/ui/client/ui/_app/immutable/chunks/CSj31z2g.js.br +2 -0
  51. package/dist/ui/client/ui/_app/immutable/chunks/CSj31z2g.js.gz +0 -0
  52. package/dist/ui/client/ui/_app/immutable/chunks/D7Lf2nU5.js +48 -0
  53. package/dist/ui/client/ui/_app/immutable/chunks/D7Lf2nU5.js.br +0 -0
  54. package/dist/ui/client/ui/_app/immutable/chunks/D7Lf2nU5.js.gz +0 -0
  55. package/dist/ui/client/ui/_app/immutable/chunks/D8AQra8V.js +3 -0
  56. package/dist/ui/client/ui/_app/immutable/chunks/D8AQra8V.js.br +0 -0
  57. package/dist/ui/client/ui/_app/immutable/chunks/D8AQra8V.js.gz +0 -0
  58. package/dist/ui/client/ui/_app/immutable/chunks/DLBNPxq0.js +1 -0
  59. package/dist/ui/client/ui/_app/immutable/chunks/DLBNPxq0.js.br +3 -0
  60. package/dist/ui/client/ui/_app/immutable/chunks/DLBNPxq0.js.gz +0 -0
  61. package/dist/ui/client/ui/_app/immutable/chunks/DMXmTTni.js +1 -0
  62. package/dist/ui/client/ui/_app/immutable/chunks/DMXmTTni.js.br +0 -0
  63. package/dist/ui/client/ui/_app/immutable/chunks/DMXmTTni.js.gz +0 -0
  64. package/dist/ui/client/ui/_app/immutable/chunks/DVjfBgOA.js +1 -0
  65. package/dist/ui/client/ui/_app/immutable/chunks/DVjfBgOA.js.br +0 -0
  66. package/dist/ui/client/ui/_app/immutable/chunks/DVjfBgOA.js.gz +0 -0
  67. package/dist/ui/client/ui/_app/immutable/chunks/EBfbaSFC.js +40 -0
  68. package/dist/ui/client/ui/_app/immutable/chunks/EBfbaSFC.js.br +0 -0
  69. package/dist/ui/client/ui/_app/immutable/chunks/EBfbaSFC.js.gz +0 -0
  70. package/dist/ui/client/ui/_app/immutable/chunks/HjKxdHgL.js +4 -0
  71. package/dist/ui/client/ui/_app/immutable/chunks/HjKxdHgL.js.br +0 -0
  72. package/dist/ui/client/ui/_app/immutable/chunks/HjKxdHgL.js.gz +0 -0
  73. package/dist/ui/client/ui/_app/immutable/chunks/y62iQtQV.js +1 -0
  74. package/dist/ui/client/ui/_app/immutable/chunks/y62iQtQV.js.br +1 -0
  75. package/dist/ui/client/ui/_app/immutable/chunks/y62iQtQV.js.gz +0 -0
  76. package/dist/ui/client/ui/_app/immutable/entry/app.BRCyy_aP.js +2 -0
  77. package/dist/ui/client/ui/_app/immutable/entry/app.BRCyy_aP.js.br +0 -0
  78. package/dist/ui/client/ui/_app/immutable/entry/app.BRCyy_aP.js.gz +0 -0
  79. package/dist/ui/client/ui/_app/immutable/entry/start.ujo8oI9U.js +2 -0
  80. package/dist/ui/client/ui/_app/immutable/entry/start.ujo8oI9U.js.br +5 -0
  81. package/dist/ui/client/ui/_app/immutable/entry/start.ujo8oI9U.js.gz +0 -0
  82. package/dist/ui/client/ui/_app/immutable/nodes/0.CYE8I_uA.js +1 -0
  83. package/dist/ui/client/ui/_app/immutable/nodes/0.CYE8I_uA.js.br +0 -0
  84. package/dist/ui/client/ui/_app/immutable/nodes/0.CYE8I_uA.js.gz +0 -0
  85. package/dist/ui/client/ui/_app/immutable/nodes/1.DTsysZRk.js +1 -0
  86. package/dist/ui/client/ui/_app/immutable/nodes/1.DTsysZRk.js.br +0 -0
  87. package/dist/ui/client/ui/_app/immutable/nodes/1.DTsysZRk.js.gz +0 -0
  88. package/dist/ui/client/ui/_app/immutable/nodes/2.hev1nfuM.js +1 -0
  89. package/dist/ui/client/ui/_app/immutable/nodes/2.hev1nfuM.js.br +0 -0
  90. package/dist/ui/client/ui/_app/immutable/nodes/2.hev1nfuM.js.gz +0 -0
  91. package/dist/ui/client/ui/_app/immutable/nodes/3.CApflji6.js +5 -0
  92. package/dist/ui/client/ui/_app/immutable/nodes/3.CApflji6.js.br +0 -0
  93. package/dist/ui/client/ui/_app/immutable/nodes/3.CApflji6.js.gz +0 -0
  94. package/dist/ui/client/ui/_app/immutable/nodes/4.BkefkGQL.js +160 -0
  95. package/dist/ui/client/ui/_app/immutable/nodes/4.BkefkGQL.js.br +0 -0
  96. package/dist/ui/client/ui/_app/immutable/nodes/4.BkefkGQL.js.gz +0 -0
  97. package/dist/ui/client/ui/_app/immutable/nodes/5.CDYh05RH.js +6 -0
  98. package/dist/ui/client/ui/_app/immutable/nodes/5.CDYh05RH.js.br +0 -0
  99. package/dist/ui/client/ui/_app/immutable/nodes/5.CDYh05RH.js.gz +0 -0
  100. package/dist/ui/client/ui/_app/immutable/nodes/6.DwISzDQO.js +6 -0
  101. package/dist/ui/client/ui/_app/immutable/nodes/6.DwISzDQO.js.br +0 -0
  102. package/dist/ui/client/ui/_app/immutable/nodes/6.DwISzDQO.js.gz +0 -0
  103. package/dist/ui/client/ui/_app/version.json +1 -1
  104. package/dist/ui/client/ui/_app/version.json.br +0 -0
  105. package/dist/ui/client/ui/_app/version.json.gz +0 -0
  106. package/dist/ui/server/.vite/manifest.json +193 -10
  107. package/dist/ui/server/_app/immutable/assets/ExternalLink.CYXazpKA.css +1 -0
  108. package/dist/ui/server/_app/immutable/assets/Pane.Co7gxzxw.css +1 -0
  109. package/dist/ui/server/_app/immutable/assets/{_layout.CnPCLsGJ.css → _layout.DH3e8XLu.css} +1 -1
  110. package/dist/ui/server/_app/immutable/assets/_layout.DSVNnDlO.css +1 -0
  111. package/dist/ui/server/_app/immutable/assets/_page.C0Nhvs_m.css +1 -0
  112. package/dist/ui/server/_app/immutable/assets/_page.DCMlxwLh.css +1 -0
  113. package/dist/ui/server/_app/immutable/assets/_page.DIE1qdmp.css +1 -0
  114. package/dist/ui/server/chunks/ExternalLink.js +12 -0
  115. package/dist/ui/server/chunks/ExternalLink.js.map +1 -0
  116. package/dist/ui/server/chunks/Pane.js +13 -0
  117. package/dist/ui/server/chunks/Pane.js.map +1 -0
  118. package/dist/ui/server/chunks/composition.js +462 -120
  119. package/dist/ui/server/chunks/composition.js.map +1 -1
  120. package/dist/ui/server/chunks/config-state.js +21 -0
  121. package/dist/ui/server/chunks/config-state.js.map +1 -0
  122. package/dist/ui/server/chunks/dialog.js +592 -0
  123. package/dist/ui/server/chunks/dialog.js.map +1 -0
  124. package/dist/ui/server/chunks/filled-button.js +116 -0
  125. package/dist/ui/server/chunks/filled-button.js.map +1 -0
  126. package/dist/ui/server/chunks/icon-button.js +2 -46
  127. package/dist/ui/server/chunks/icon-button.js.map +1 -1
  128. package/dist/ui/server/chunks/icon.js +49 -0
  129. package/dist/ui/server/chunks/icon.js.map +1 -0
  130. package/dist/ui/server/chunks/index-server.js +5 -1
  131. package/dist/ui/server/chunks/index-server.js.map +1 -0
  132. package/dist/ui/server/chunks/instance.js +5 -5
  133. package/dist/ui/server/chunks/internal.js +1 -1
  134. package/dist/ui/server/chunks/navigation.js +9 -13
  135. package/dist/ui/server/chunks/navigation.js.map +1 -1
  136. package/dist/ui/server/chunks/navigation2.js +15 -0
  137. package/dist/ui/server/chunks/navigation2.js.map +1 -0
  138. package/dist/ui/server/chunks/outlined-text-field.js +11 -398
  139. package/dist/ui/server/chunks/outlined-text-field.js.map +1 -1
  140. package/dist/ui/server/chunks/paths.js +2 -0
  141. package/dist/ui/server/chunks/redispatch-event.js +91 -0
  142. package/dist/ui/server/chunks/redispatch-event.js.map +1 -0
  143. package/dist/ui/server/chunks/server2.js +11 -1
  144. package/dist/ui/server/chunks/server2.js.map +1 -1
  145. package/dist/ui/server/chunks/src.js +112 -3
  146. package/dist/ui/server/chunks/src.js.map +1 -1
  147. package/dist/ui/server/chunks/state.js +1 -1
  148. package/dist/ui/server/chunks/static-html.js +38 -0
  149. package/dist/ui/server/chunks/static-html.js.map +1 -0
  150. package/dist/ui/server/chunks/text-button.js +307 -0
  151. package/dist/ui/server/chunks/text-button.js.map +1 -0
  152. package/dist/ui/server/entries/endpoints/api/config/_server.ts.js +4 -17
  153. package/dist/ui/server/entries/endpoints/api/config/_server.ts.js.map +1 -1
  154. package/dist/ui/server/entries/endpoints/api/input/keys/_server.ts.js +14 -0
  155. package/dist/ui/server/entries/endpoints/api/input/keys/_server.ts.js.map +1 -0
  156. package/dist/ui/server/entries/endpoints/api/markers/_server.ts.js +1 -1
  157. package/dist/ui/server/entries/endpoints/api/speech/_server.ts.js +1 -1
  158. package/dist/ui/server/entries/fallbacks/error.svelte.js +1 -1
  159. package/dist/ui/server/entries/hooks.server.js +4 -1
  160. package/dist/ui/server/entries/hooks.server.js.map +1 -1
  161. package/dist/ui/server/entries/pages/_layout.svelte.js +5 -10
  162. package/dist/ui/server/entries/pages/_layout.svelte.js.map +1 -1
  163. package/dist/ui/server/entries/pages/_page.svelte.js +15 -597
  164. package/dist/ui/server/entries/pages/_page.svelte.js.map +1 -1
  165. package/dist/ui/server/entries/pages/settings/_page.server.ts.js +12 -0
  166. package/dist/ui/server/entries/pages/settings/_page.server.ts.js.map +1 -0
  167. package/dist/ui/server/entries/pages/settings/_page.svelte.js +3470 -70
  168. package/dist/ui/server/entries/pages/settings/_page.svelte.js.map +1 -1
  169. package/dist/ui/server/entries/pages/setup/_layout.svelte.js +51 -0
  170. package/dist/ui/server/entries/pages/setup/_layout.svelte.js.map +1 -0
  171. package/dist/ui/server/entries/pages/setup/_page.svelte.js +225 -3
  172. package/dist/ui/server/entries/pages/setup/_page.svelte.js.map +1 -1
  173. package/dist/ui/server/entries/pages/setup/instructions/_page.server.ts.js +12 -0
  174. package/dist/ui/server/entries/pages/setup/instructions/_page.server.ts.js.map +1 -0
  175. package/dist/ui/server/entries/pages/setup/instructions/_page.svelte.js +271 -0
  176. package/dist/ui/server/entries/pages/setup/instructions/_page.svelte.js.map +1 -0
  177. package/dist/ui/server/manifest-full.js +21 -5
  178. package/dist/ui/server/manifest.js +21 -5
  179. package/dist/ui/server/nodes/0.js +2 -2
  180. package/dist/ui/server/nodes/1.js +1 -1
  181. package/dist/ui/server/nodes/2.js +4 -6
  182. package/dist/ui/server/nodes/3.js +6 -4
  183. package/dist/ui/server/nodes/4.js +6 -4
  184. package/dist/ui/server/nodes/5.js +8 -0
  185. package/dist/ui/server/nodes/6.js +10 -0
  186. package/dist/ui/server/server.js +21 -5
  187. package/package.json +1 -1
  188. package/dist/ui/client/ui/_app/immutable/assets/0.CnPCLsGJ.css.br +0 -0
  189. package/dist/ui/client/ui/_app/immutable/assets/0.CnPCLsGJ.css.gz +0 -0
  190. package/dist/ui/client/ui/_app/immutable/assets/3.CK2Biket.css +0 -1
  191. package/dist/ui/client/ui/_app/immutable/assets/3.CK2Biket.css.br +0 -0
  192. package/dist/ui/client/ui/_app/immutable/assets/3.CK2Biket.css.gz +0 -0
  193. package/dist/ui/client/ui/_app/immutable/chunks/0YgL1EU2.js +0 -179
  194. package/dist/ui/client/ui/_app/immutable/chunks/0YgL1EU2.js.br +0 -0
  195. package/dist/ui/client/ui/_app/immutable/chunks/0YgL1EU2.js.gz +0 -0
  196. package/dist/ui/client/ui/_app/immutable/chunks/BYvlzyV8.js +0 -1
  197. package/dist/ui/client/ui/_app/immutable/chunks/BYvlzyV8.js.br +0 -2
  198. package/dist/ui/client/ui/_app/immutable/chunks/BYvlzyV8.js.gz +0 -0
  199. package/dist/ui/client/ui/_app/immutable/chunks/BfvDkxmG.js +0 -3
  200. package/dist/ui/client/ui/_app/immutable/chunks/BfvDkxmG.js.br +0 -0
  201. package/dist/ui/client/ui/_app/immutable/chunks/BfvDkxmG.js.gz +0 -0
  202. package/dist/ui/client/ui/_app/immutable/chunks/Cba3ZwaX.js.br +0 -0
  203. package/dist/ui/client/ui/_app/immutable/chunks/Cba3ZwaX.js.gz +0 -0
  204. package/dist/ui/client/ui/_app/immutable/chunks/DErxe_FC.js +0 -3
  205. package/dist/ui/client/ui/_app/immutable/chunks/DErxe_FC.js.br +0 -0
  206. package/dist/ui/client/ui/_app/immutable/chunks/DErxe_FC.js.gz +0 -0
  207. package/dist/ui/client/ui/_app/immutable/chunks/Dqufijaz.js +0 -1
  208. package/dist/ui/client/ui/_app/immutable/chunks/Dqufijaz.js.br +0 -0
  209. package/dist/ui/client/ui/_app/immutable/chunks/Dqufijaz.js.gz +0 -0
  210. package/dist/ui/client/ui/_app/immutable/chunks/WpCriteK.js +0 -1
  211. package/dist/ui/client/ui/_app/immutable/chunks/WpCriteK.js.br +0 -1
  212. package/dist/ui/client/ui/_app/immutable/chunks/WpCriteK.js.gz +0 -0
  213. package/dist/ui/client/ui/_app/immutable/chunks/wbLSPbHY.js +0 -4
  214. package/dist/ui/client/ui/_app/immutable/chunks/wbLSPbHY.js.br +0 -0
  215. package/dist/ui/client/ui/_app/immutable/chunks/wbLSPbHY.js.gz +0 -0
  216. package/dist/ui/client/ui/_app/immutable/entry/app.B6hhDf4F.js +0 -2
  217. package/dist/ui/client/ui/_app/immutable/entry/app.B6hhDf4F.js.br +0 -0
  218. package/dist/ui/client/ui/_app/immutable/entry/app.B6hhDf4F.js.gz +0 -0
  219. package/dist/ui/client/ui/_app/immutable/entry/start.Dluk7nQO.js +0 -2
  220. package/dist/ui/client/ui/_app/immutable/entry/start.Dluk7nQO.js.br +0 -0
  221. package/dist/ui/client/ui/_app/immutable/entry/start.Dluk7nQO.js.gz +0 -0
  222. package/dist/ui/client/ui/_app/immutable/nodes/0.D-lhv0Us.js +0 -1
  223. package/dist/ui/client/ui/_app/immutable/nodes/0.D-lhv0Us.js.br +0 -0
  224. package/dist/ui/client/ui/_app/immutable/nodes/0.D-lhv0Us.js.gz +0 -0
  225. package/dist/ui/client/ui/_app/immutable/nodes/1.Cs4GAsCO.js +0 -1
  226. package/dist/ui/client/ui/_app/immutable/nodes/1.Cs4GAsCO.js.br +0 -2
  227. package/dist/ui/client/ui/_app/immutable/nodes/1.Cs4GAsCO.js.gz +0 -0
  228. package/dist/ui/client/ui/_app/immutable/nodes/2.CmuzlN_T.js +0 -52
  229. package/dist/ui/client/ui/_app/immutable/nodes/2.CmuzlN_T.js.br +0 -0
  230. package/dist/ui/client/ui/_app/immutable/nodes/2.CmuzlN_T.js.gz +0 -0
  231. package/dist/ui/client/ui/_app/immutable/nodes/3.DMXXeBbC.js +0 -5
  232. package/dist/ui/client/ui/_app/immutable/nodes/3.DMXXeBbC.js.br +0 -0
  233. package/dist/ui/client/ui/_app/immutable/nodes/3.DMXXeBbC.js.gz +0 -0
  234. package/dist/ui/client/ui/_app/immutable/nodes/4.CMHCNMDn.js +0 -1
  235. package/dist/ui/client/ui/_app/immutable/nodes/4.CMHCNMDn.js.br +0 -0
  236. package/dist/ui/client/ui/_app/immutable/nodes/4.CMHCNMDn.js.gz +0 -0
  237. package/dist/ui/server/_app/immutable/assets/_page.CK2Biket.css +0 -1
  238. /package/dist/ui/client/ui/_app/immutable/assets/{2.ChCvyBVk.css → 3.ChCvyBVk.css} +0 -0
  239. /package/dist/ui/client/ui/_app/immutable/assets/{2.ChCvyBVk.css.br → 3.ChCvyBVk.css.br} +0 -0
  240. /package/dist/ui/client/ui/_app/immutable/assets/{2.ChCvyBVk.css.gz → 3.ChCvyBVk.css.gz} +0 -0
@@ -1,5 +1,5 @@
1
1
  import "./index-server.js";
2
- import { c as getContext } from "./server2.js";
2
+ import { l as getContext } from "./server2.js";
3
3
  import "./server-errors.js";
4
4
  // ../../node_modules/.pnpm/@sveltejs+kit@3.2.0_@sveltejs+vite-plugin-svelte@7.3.1_svelte@5.57.3_@typescript-eslint_ccfe35d88efff66f949c986fae0769d3/node_modules/@sveltejs/kit/src/runtime/app/state/server.js
5
5
  function context() {
@@ -0,0 +1,38 @@
1
+ import { I as T } from "./composition.js";
2
+ // ../../node_modules/.pnpm/lit-html@3.3.3/node_modules/lit-html/node/static.js
3
+ /**
4
+ * @license
5
+ * Copyright 2020 Google LLC
6
+ * SPDX-License-Identifier: BSD-3-Clause
7
+ */
8
+ var a = Symbol.for("");
9
+ var o = (t) => {
10
+ if (t?.r === a) return t?._$litStatic$;
11
+ };
12
+ var i = (t, ...r) => ({
13
+ _$litStatic$: r.reduce((r, e, a) => r + ((t) => {
14
+ if (void 0 !== t._$litStatic$) return t._$litStatic$;
15
+ throw Error(`Value passed to 'literal' function must be a 'literal' result: ${t}. Use 'unsafeStatic' to pass non-literal values, but\n take care to ensure page security.`);
16
+ })(e) + t[a + 1], t[0]),
17
+ r: a
18
+ });
19
+ var l = /* @__PURE__ */ new Map();
20
+ var n = (t) => (r, ...e) => {
21
+ const a = e.length;
22
+ let s, i;
23
+ const n = [], u = [];
24
+ let c, $ = 0, f = !1;
25
+ for (; $ < a;) {
26
+ for (c = r[$]; $ < a && void 0 !== (i = e[$], s = o(i));) c += s + r[++$], f = !0;
27
+ $ !== a && u.push(i), n.push(c), $++;
28
+ }
29
+ if ($ === a && n.push(r[a]), f) {
30
+ const t = n.join("$$lit$$");
31
+ void 0 === (r = l.get(t)) && (n.raw = n, l.set(t, r = n)), e = u;
32
+ }
33
+ return t(r, ...e);
34
+ };
35
+ var u = n(T);
36
+ export { u as n, i as t };
37
+
38
+ //# sourceMappingURL=static-html.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"static-html.js","names":["t","r","e"],"sources":["../../../../../node_modules/.pnpm/lit-html@3.3.3/node_modules/lit-html/node/static.js"],"sourcesContent":["import{html as t,svg as r,mathml as e}from\"./lit-html.js\";\n/**\n * @license\n * Copyright 2020 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nconst a=Symbol.for(\"\"),o=t=>{if(t?.r===a)return t?._$litStatic$},s=t=>({_$litStatic$:t,r:a}),i=(t,...r)=>({_$litStatic$:r.reduce((r,e,a)=>r+(t=>{if(void 0!==t._$litStatic$)return t._$litStatic$;throw Error(`Value passed to 'literal' function must be a 'literal' result: ${t}. Use 'unsafeStatic' to pass non-literal values, but\\n take care to ensure page security.`)})(e)+t[a+1],t[0]),r:a}),l=new Map,n=t=>(r,...e)=>{const a=e.length;let s,i;const n=[],u=[];let c,$=0,f=!1;for(;$<a;){for(c=r[$];$<a&&void 0!==(i=e[$],s=o(i));)c+=s+r[++$],f=!0;$!==a&&u.push(i),n.push(c),$++}if($===a&&n.push(r[a]),f){const t=n.join(\"$$lit$$\");void 0===(r=l.get(t))&&(n.raw=n,l.set(t,r=n)),e=u}return t(r,...e)},u=n(t),c=n(r),$=n(e);export{u as html,i as literal,$ as mathml,c as svg,s as unsafeStatic,n as withStatic};\n//# sourceMappingURL=static.js.map\n"],"ignoreList":[0],"mappings":";;;;;;;AAMA,IAAM,IAAE,OAAO,IAAI,EAAE;AAAE,IAAA,KAAE,MAAG;CAAC,IAAG,GAAG,MAAI,GAAE,OAAO,GAAG;AAAY;AAA8B,IAAA,KAAG,GAAE,GAAG,OAAK;CAAC,cAAa,EAAE,QAAQ,GAAE,GAAE,MAAI,MAAG,MAAG;EAAC,IAAG,KAAK,MAAI,EAAE,cAAa,OAAO,EAAE;EAAa,MAAM,MAAM,kEAAkE,EAAE,qGAAqG;CAAC,EAAA,CAAG,CAAC,IAAE,EAAE,IAAE,IAAG,EAAE,EAAE;CAAE,GAAE;AAAC;AAAG,IAAA,oBAAE,IAAI,IAAE;AAAE,IAAA,KAAE,OAAI,GAAE,GAAG,MAAI;CAAC,MAAM,IAAE,EAAE;CAAO,IAAI,GAAE;CAAE,MAAM,IAAE,CAAC,GAAE,IAAE,CAAC;CAAE,IAAI,GAAE,IAAE,GAAE,IAAE,CAAC;CAAE,OAAK,IAAE,IAAG;EAAC,KAAI,IAAE,EAAE,IAAG,IAAE,KAAG,KAAK,OAAK,IAAE,EAAE,IAAG,IAAE,EAAE,CAAC,KAAI,KAAG,IAAE,EAAE,EAAE,IAAG,IAAE,CAAC;EAAE,MAAI,KAAG,EAAE,KAAK,CAAC,GAAE,EAAE,KAAK,CAAC,GAAE;CAAG;CAAC,IAAG,MAAI,KAAG,EAAE,KAAK,EAAE,EAAE,GAAE,GAAE;EAAC,MAAM,IAAE,EAAE,KAAK,SAAS;EAAE,KAAK,OAAK,IAAE,EAAE,IAAI,CAAC,OAAK,EAAE,MAAI,GAAE,EAAE,IAAI,GAAE,IAAE,CAAC,IAAG,IAAE;CAAC;CAAC,OAAO,EAAE,GAAE,GAAG,CAAC;AAAC;AAAE,IAAA,IAAE,EAAEA,CAAC"}
@@ -0,0 +1,307 @@
1
+ import { B as e$1, G as t, I as T, K as __decorate, M as i, N as A, S as mixinElementInternals, T as mixinDelegatesAria, U as n, V as e, W as i$1, b as mixinFormAssociated, v as mixinFormSubmitter } from "./composition.js";
2
+ // ../../node_modules/.pnpm/@lit+reactive-element@2.1.2/node_modules/@lit/reactive-element/node/decorators/query-assigned-elements.js
3
+ /**
4
+ * @license
5
+ * Copyright 2021 Google LLC
6
+ * SPDX-License-Identifier: BSD-3-Clause
7
+ */ function o(o) {
8
+ return (e$2, n) => {
9
+ const { slot: r, selector: s } = o ?? {}, c = "slot" + (r ? `[name=${r}]` : ":not([name])");
10
+ return e(e$2, n, { get() {
11
+ const e = (this.renderRoot?.querySelector(c))?.assignedElements(o) ?? [];
12
+ return void 0 === s ? e : e.filter((t) => t.matches(s));
13
+ } });
14
+ };
15
+ }
16
+ // ../../node_modules/.pnpm/@material+web@2.5.0/node_modules/@material/web/internal/events/form-label-activation.js
17
+ /**
18
+ * @license
19
+ * Copyright 2021 Google LLC
20
+ * SPDX-License-Identifier: Apache-2.0
21
+ */
22
+ /**
23
+ * Dispatches a click event to the given element that triggers a native action,
24
+ * but is not composed and therefore is not seen outside the element.
25
+ *
26
+ * This is useful for responding to an external click event on the host element
27
+ * that should trigger an internal action like a button click.
28
+ *
29
+ * Note, a helper is provided because setting this up correctly is a bit tricky.
30
+ * In particular, calling `click` on an element creates a composed event, which
31
+ * is not desirable, and a manually dispatched event must specifically be a
32
+ * `MouseEvent` to trigger a native action.
33
+ *
34
+ * @example
35
+ * hostClickListener = (event: MouseEvent) {
36
+ * if (isActivationClick(event)) {
37
+ * this.dispatchActivationClick(this.buttonElement);
38
+ * }
39
+ * }
40
+ *
41
+ */
42
+ function dispatchActivationClick(element) {
43
+ const event = new MouseEvent("click", { bubbles: true });
44
+ element.dispatchEvent(event);
45
+ return event;
46
+ }
47
+ /**
48
+ * Returns true if the click event should trigger an activation behavior. The
49
+ * behavior is defined by the element and is whatever it should do when
50
+ * clicked.
51
+ *
52
+ * Typically when an element needs to handle a click, the click is generated
53
+ * from within the element and an event listener within the element implements
54
+ * the needed behavior; however, it's possible to fire a click directly
55
+ * at the element that the element should handle. This method helps
56
+ * distinguish these "external" clicks.
57
+ *
58
+ * An "external" click can be triggered in a number of ways: via a click
59
+ * on an associated label for a form associated element, calling
60
+ * `element.click()`, or calling
61
+ * `element.dispatchEvent(new MouseEvent('click', ...))`.
62
+ *
63
+ * Also works around Firefox issue
64
+ * https://bugzilla.mozilla.org/show_bug.cgi?id=1804576 by squelching
65
+ * events for a microtask after called.
66
+ *
67
+ * @example
68
+ * hostClickListener = (event: MouseEvent) {
69
+ * if (isActivationClick(event)) {
70
+ * this.dispatchActivationClick(this.buttonElement);
71
+ * }
72
+ * }
73
+ *
74
+ */
75
+ function isActivationClick(event) {
76
+ if (event.currentTarget !== event.target) return false;
77
+ if (event.composedPath()[0] !== event.target) return false;
78
+ if (event.target.disabled) return false;
79
+ return !squelchEvent(event);
80
+ }
81
+ function squelchEvent(event) {
82
+ const squelched = isSquelchingEvents;
83
+ if (squelched) {
84
+ event.preventDefault();
85
+ event.stopImmediatePropagation();
86
+ }
87
+ squelchEventsForMicrotask();
88
+ return squelched;
89
+ }
90
+ var isSquelchingEvents = false;
91
+ async function squelchEventsForMicrotask() {
92
+ isSquelchingEvents = true;
93
+ await null;
94
+ isSquelchingEvents = false;
95
+ }
96
+ // ../../node_modules/.pnpm/@material+web@2.5.0/node_modules/@material/web/button/internal/button.js
97
+ /**
98
+ * @license
99
+ * Copyright 2019 Google LLC
100
+ * SPDX-License-Identifier: Apache-2.0
101
+ */
102
+ var buttonBaseClass = mixinDelegatesAria(mixinFormSubmitter(mixinFormAssociated(mixinElementInternals(i))));
103
+ /**
104
+ * A button component.
105
+ */
106
+ var Button = class extends buttonBaseClass {
107
+ constructor() {
108
+ super();
109
+ /**
110
+ * Whether or not the button is "soft-disabled" (disabled but still
111
+ * focusable).
112
+ *
113
+ * Use this when a button needs increased visibility when disabled. See
114
+ * https://www.w3.org/WAI/ARIA/apg/practices/keyboard-interface/#kbd_disabled_controls
115
+ * for more guidance on when this is needed.
116
+ */
117
+ this.softDisabled = false;
118
+ /**
119
+ * The URL that the link button points to.
120
+ */
121
+ this.href = "";
122
+ /**
123
+ * The filename to use when downloading the linked resource.
124
+ * If not specified, the browser will determine a filename.
125
+ * This is only applicable when the button is used as a link (`href` is set).
126
+ */
127
+ this.download = "";
128
+ /**
129
+ * Where to display the linked `href` URL for a link button. Common options
130
+ * include `_blank` to open in a new tab.
131
+ */
132
+ this.target = "";
133
+ /**
134
+ * Whether to render the icon at the inline end of the label rather than the
135
+ * inline start.
136
+ *
137
+ * _Note:_ Link buttons cannot have trailing icons.
138
+ */
139
+ this.trailingIcon = false;
140
+ /**
141
+ * Whether to display the icon or not.
142
+ */
143
+ this.hasIcon = false;
144
+ }
145
+ focus() {
146
+ this.buttonElement?.focus();
147
+ }
148
+ blur() {
149
+ this.buttonElement?.blur();
150
+ }
151
+ render() {
152
+ const isRippleDisabled = this.disabled || this.softDisabled;
153
+ const buttonOrLink = this.href ? this.renderLink() : this.renderButton();
154
+ const buttonId = this.href ? "link" : "button";
155
+ return T`
156
+ ${this.renderElevationOrOutline?.()}
157
+ <div class="background"></div>
158
+ <md-focus-ring part="focus-ring" for=${buttonId}></md-focus-ring>
159
+ <md-ripple
160
+ part="ripple"
161
+ for=${buttonId}
162
+ ?disabled="${isRippleDisabled}"></md-ripple>
163
+ ${buttonOrLink}
164
+ `;
165
+ }
166
+ renderButton() {
167
+ const { ariaLabel, ariaHasPopup, ariaExpanded } = this;
168
+ return T`<button
169
+ id="button"
170
+ class="button"
171
+ ?disabled=${this.disabled}
172
+ aria-disabled=${this.softDisabled || A}
173
+ aria-label="${ariaLabel || A}"
174
+ aria-haspopup="${ariaHasPopup || A}"
175
+ aria-expanded="${ariaExpanded || A}">
176
+ ${this.renderContent()}
177
+ </button>`;
178
+ }
179
+ renderLink() {
180
+ const { ariaLabel, ariaHasPopup, ariaExpanded } = this;
181
+ return T`<a
182
+ id="link"
183
+ class="button"
184
+ aria-label="${ariaLabel || A}"
185
+ aria-haspopup="${ariaHasPopup || A}"
186
+ aria-expanded="${ariaExpanded || A}"
187
+ aria-disabled=${this.disabled || this.softDisabled || A}
188
+ tabindex="${this.disabled && !this.softDisabled ? -1 : A}"
189
+ href=${this.href}
190
+ download=${this.download || A}
191
+ target=${this.target || A}
192
+ >${this.renderContent()}
193
+ </a>`;
194
+ }
195
+ renderContent() {
196
+ const icon = T`<slot
197
+ name="icon"
198
+ @slotchange="${this.handleSlotChange}"></slot>`;
199
+ return T`
200
+ <span class="touch"></span>
201
+ ${this.trailingIcon ? A : icon}
202
+ <span class="label"><slot></slot></span>
203
+ ${this.trailingIcon ? icon : A}
204
+ `;
205
+ }
206
+ handleClick(event) {
207
+ if (this.softDisabled || this.disabled && this.href) {
208
+ event.stopImmediatePropagation();
209
+ event.preventDefault();
210
+ return;
211
+ }
212
+ if (!isActivationClick(event) || !this.buttonElement) return;
213
+ this.focus();
214
+ dispatchActivationClick(this.buttonElement);
215
+ }
216
+ handleSlotChange() {
217
+ this.hasIcon = this.assignedIcons.length > 0;
218
+ }
219
+ };
220
+ /** @nocollapse */
221
+ Button.shadowRootOptions = {
222
+ mode: "open",
223
+ delegatesFocus: true
224
+ };
225
+ __decorate([n({
226
+ type: Boolean,
227
+ attribute: "soft-disabled",
228
+ reflect: true
229
+ })], Button.prototype, "softDisabled", void 0);
230
+ __decorate([n()], Button.prototype, "href", void 0);
231
+ __decorate([n()], Button.prototype, "download", void 0);
232
+ __decorate([n()], Button.prototype, "target", void 0);
233
+ __decorate([n({
234
+ type: Boolean,
235
+ attribute: "trailing-icon",
236
+ reflect: true
237
+ })], Button.prototype, "trailingIcon", void 0);
238
+ __decorate([n({
239
+ type: Boolean,
240
+ attribute: "has-icon",
241
+ reflect: true
242
+ })], Button.prototype, "hasIcon", void 0);
243
+ __decorate([e$1(".button")], Button.prototype, "buttonElement", void 0);
244
+ __decorate([o({
245
+ slot: "icon",
246
+ flatten: true
247
+ })], Button.prototype, "assignedIcons", void 0);
248
+ // ../../node_modules/.pnpm/@material+web@2.5.0/node_modules/@material/web/button/internal/shared-styles.cssresult.js
249
+ /**
250
+ * @license
251
+ * Copyright 2026 Google LLC
252
+ * SPDX-License-Identifier: Apache-2.0
253
+ */
254
+ var styles$1 = i$1`:host{border-start-start-radius:var(--_container-shape-start-start);border-start-end-radius:var(--_container-shape-start-end);border-end-start-radius:var(--_container-shape-end-start);border-end-end-radius:var(--_container-shape-end-end);box-sizing:border-box;cursor:pointer;display:inline-flex;gap:8px;min-height:var(--_container-height);outline:none;padding-block:calc((var(--_container-height) - max(var(--_label-text-line-height),var(--_icon-size)))/2);padding-inline-start:var(--_leading-space);padding-inline-end:var(--_trailing-space);place-content:center;place-items:center;position:relative;font-family:var(--_label-text-font);font-size:var(--_label-text-size);line-height:var(--_label-text-line-height);font-weight:var(--_label-text-weight);text-overflow:ellipsis;text-wrap:nowrap;user-select:none;-webkit-tap-highlight-color:rgba(0,0,0,0);vertical-align:top;--md-ripple-hover-color: var(--_hover-state-layer-color);--md-ripple-pressed-color: var(--_pressed-state-layer-color);--md-ripple-hover-opacity: var(--_hover-state-layer-opacity);--md-ripple-pressed-opacity: var(--_pressed-state-layer-opacity)}md-focus-ring{--md-focus-ring-shape-start-start: var(--_container-shape-start-start);--md-focus-ring-shape-start-end: var(--_container-shape-start-end);--md-focus-ring-shape-end-end: var(--_container-shape-end-end);--md-focus-ring-shape-end-start: var(--_container-shape-end-start)}:host(:is([disabled],[soft-disabled])){cursor:default;pointer-events:none}.button{border-radius:inherit;cursor:inherit;display:inline-flex;align-items:center;justify-content:center;border:none;outline:none;-webkit-appearance:none;vertical-align:middle;background:rgba(0,0,0,0);text-decoration:none;min-width:calc(64px - var(--_leading-space) - var(--_trailing-space));width:100%;z-index:0;height:100%;font:inherit;color:var(--_label-text-color);padding:0;gap:inherit;text-transform:inherit}.button::-moz-focus-inner{padding:0;border:0}:host(:hover) .button{color:var(--_hover-label-text-color)}:host(:focus-within) .button{color:var(--_focus-label-text-color)}:host(:active) .button{color:var(--_pressed-label-text-color)}.background{background:var(--_container-color);border-radius:inherit;inset:0;position:absolute}.label{overflow:hidden}:is(.button,.label,.label slot),.label ::slotted(*){text-overflow:inherit}:host(:is([disabled],[soft-disabled])) .label{color:var(--_disabled-label-text-color);opacity:var(--_disabled-label-text-opacity)}:host(:is([disabled],[soft-disabled])) .background{background:var(--_disabled-container-color);opacity:var(--_disabled-container-opacity)}@media(forced-colors: active){.background{border:1px solid CanvasText}:host(:is([disabled],[soft-disabled])){--_disabled-icon-color: GrayText;--_disabled-icon-opacity: 1;--_disabled-container-opacity: 1;--_disabled-label-text-color: GrayText;--_disabled-label-text-opacity: 1}}:host([has-icon]:not([trailing-icon])){padding-inline-start:var(--_with-leading-icon-leading-space);padding-inline-end:var(--_with-leading-icon-trailing-space)}:host([has-icon][trailing-icon]){padding-inline-start:var(--_with-trailing-icon-leading-space);padding-inline-end:var(--_with-trailing-icon-trailing-space)}::slotted([slot=icon]){display:inline-flex;position:relative;writing-mode:horizontal-tb;fill:currentColor;flex-shrink:0;color:var(--_icon-color);font-size:var(--_icon-size);inline-size:var(--_icon-size);block-size:var(--_icon-size)}:host(:hover) ::slotted([slot=icon]){color:var(--_hover-icon-color)}:host(:focus-within) ::slotted([slot=icon]){color:var(--_focus-icon-color)}:host(:active) ::slotted([slot=icon]){color:var(--_pressed-icon-color)}:host(:is([disabled],[soft-disabled])) ::slotted([slot=icon]){color:var(--_disabled-icon-color);opacity:var(--_disabled-icon-opacity)}.touch{position:absolute;top:50%;height:max(48px,100%);left:0;right:0;transform:translateY(-50%)}:host([touch-target=wrapper]){margin:max(0px,(48px - var(--_container-height))/2) 0}:host([touch-target=none]) .touch{display:none}
255
+ `;
256
+ styles$1.styleSheet;
257
+ // ../../node_modules/.pnpm/@material+web@2.5.0/node_modules/@material/web/button/internal/text-button.js
258
+ /**
259
+ * @license
260
+ * Copyright 2021 Google LLC
261
+ * SPDX-License-Identifier: Apache-2.0
262
+ */
263
+ /**
264
+ * A text button component.
265
+ */
266
+ var TextButton = class extends Button {};
267
+ // ../../node_modules/.pnpm/@material+web@2.5.0/node_modules/@material/web/button/internal/text-styles.cssresult.js
268
+ /**
269
+ * @license
270
+ * Copyright 2026 Google LLC
271
+ * SPDX-License-Identifier: Apache-2.0
272
+ */
273
+ var styles = i$1`:host{--_container-height: var(--md-text-button-container-height, 40px);--_disabled-label-text-color: var(--md-text-button-disabled-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-label-text-opacity: var(--md-text-button-disabled-label-text-opacity, 0.38);--_focus-label-text-color: var(--md-text-button-focus-label-text-color, var(--md-sys-color-primary, #6750a4));--_hover-label-text-color: var(--md-text-button-hover-label-text-color, var(--md-sys-color-primary, #6750a4));--_hover-state-layer-color: var(--md-text-button-hover-state-layer-color, var(--md-sys-color-primary, #6750a4));--_hover-state-layer-opacity: var(--md-text-button-hover-state-layer-opacity, 0.08);--_label-text-color: var(--md-text-button-label-text-color, var(--md-sys-color-primary, #6750a4));--_label-text-font: var(--md-text-button-label-text-font, var(--md-sys-typescale-label-large-font, var(--md-ref-typeface-plain, Roboto)));--_label-text-line-height: var(--md-text-button-label-text-line-height, var(--md-sys-typescale-label-large-line-height, 1.25rem));--_label-text-size: var(--md-text-button-label-text-size, var(--md-sys-typescale-label-large-size, 0.875rem));--_label-text-weight: var(--md-text-button-label-text-weight, var(--md-sys-typescale-label-large-weight, var(--md-ref-typeface-weight-medium, 500)));--_pressed-label-text-color: var(--md-text-button-pressed-label-text-color, var(--md-sys-color-primary, #6750a4));--_pressed-state-layer-color: var(--md-text-button-pressed-state-layer-color, var(--md-sys-color-primary, #6750a4));--_pressed-state-layer-opacity: var(--md-text-button-pressed-state-layer-opacity, 0.12);--_disabled-icon-color: var(--md-text-button-disabled-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-icon-opacity: var(--md-text-button-disabled-icon-opacity, 0.38);--_focus-icon-color: var(--md-text-button-focus-icon-color, var(--md-sys-color-primary, #6750a4));--_hover-icon-color: var(--md-text-button-hover-icon-color, var(--md-sys-color-primary, #6750a4));--_icon-color: var(--md-text-button-icon-color, var(--md-sys-color-primary, #6750a4));--_icon-size: var(--md-text-button-icon-size, 18px);--_pressed-icon-color: var(--md-text-button-pressed-icon-color, var(--md-sys-color-primary, #6750a4));--_container-shape-start-start: var(--md-text-button-container-shape-start-start, var(--md-text-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_container-shape-start-end: var(--md-text-button-container-shape-start-end, var(--md-text-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_container-shape-end-end: var(--md-text-button-container-shape-end-end, var(--md-text-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_container-shape-end-start: var(--md-text-button-container-shape-end-start, var(--md-text-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_leading-space: var(--md-text-button-leading-space, 12px);--_trailing-space: var(--md-text-button-trailing-space, 12px);--_with-leading-icon-leading-space: var(--md-text-button-with-leading-icon-leading-space, 12px);--_with-leading-icon-trailing-space: var(--md-text-button-with-leading-icon-trailing-space, 16px);--_with-trailing-icon-leading-space: var(--md-text-button-with-trailing-icon-leading-space, 16px);--_with-trailing-icon-trailing-space: var(--md-text-button-with-trailing-icon-trailing-space, 12px);--_container-color: none;--_disabled-container-color: none;--_disabled-container-opacity: 0}
274
+ `;
275
+ styles.styleSheet;
276
+ // ../../node_modules/.pnpm/@material+web@2.5.0/node_modules/@material/web/button/text-button.js
277
+ /**
278
+ * @license
279
+ * Copyright 2021 Google LLC
280
+ * SPDX-License-Identifier: Apache-2.0
281
+ */
282
+ /**
283
+ * @summary Buttons help people take action, such as sending an email, sharing a
284
+ * document, or liking a comment.
285
+ *
286
+ * @description
287
+ * __Emphasis:__ Low emphasis – For optional or supplementary actions with the
288
+ * least amount of prominence
289
+ *
290
+ * __Rationale:__ Text buttons have less visual prominence, so should be used
291
+ * for low emphasis actions, such as an alternative option.
292
+ *
293
+ * __Example usages:__
294
+ * - Learn more
295
+ * - View all
296
+ * - Change account
297
+ * - Turn on
298
+ *
299
+ * @final
300
+ * @suppress {visibility}
301
+ */
302
+ var MdTextButton = class MdTextButton extends TextButton {};
303
+ MdTextButton.styles = [styles$1, styles];
304
+ MdTextButton = __decorate([t("md-text-button")], MdTextButton);
305
+ export { Button as n, o as r, styles$1 as t };
306
+
307
+ //# sourceMappingURL=text-button.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"text-button.js","names":["t","e","LitElement","nothing","property","query","queryAssignedElements","styles","sharedStyles","textStyles","customElement"],"sources":["../../../../../node_modules/.pnpm/@lit+reactive-element@2.1.2/node_modules/@lit/reactive-element/node/decorators/query-assigned-elements.js","../../../../../node_modules/.pnpm/@material+web@2.5.0/node_modules/@material/web/internal/events/form-label-activation.js","../../../../../node_modules/.pnpm/@material+web@2.5.0/node_modules/@material/web/button/internal/button.js","../../../../../node_modules/.pnpm/@material+web@2.5.0/node_modules/@material/web/button/internal/shared-styles.cssresult.js","../../../../../node_modules/.pnpm/@material+web@2.5.0/node_modules/@material/web/button/internal/text-button.js","../../../../../node_modules/.pnpm/@material+web@2.5.0/node_modules/@material/web/button/internal/text-styles.cssresult.js","../../../../../node_modules/.pnpm/@material+web@2.5.0/node_modules/@material/web/button/text-button.js"],"sourcesContent":["import{desc as t}from\"./base.js\";\n/**\n * @license\n * Copyright 2021 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */function o(o){return(e,n)=>{const{slot:r,selector:s}=o??{},c=\"slot\"+(r?`[name=${r}]`:\":not([name])\");return t(e,n,{get(){const t=this.renderRoot?.querySelector(c),e=t?.assignedElements(o)??[];return void 0===s?e:e.filter(t=>t.matches(s))}})}}export{o as queryAssignedElements};\n//# sourceMappingURL=query-assigned-elements.js.map\n","/**\n * @license\n * Copyright 2021 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n/**\n * Dispatches a click event to the given element that triggers a native action,\n * but is not composed and therefore is not seen outside the element.\n *\n * This is useful for responding to an external click event on the host element\n * that should trigger an internal action like a button click.\n *\n * Note, a helper is provided because setting this up correctly is a bit tricky.\n * In particular, calling `click` on an element creates a composed event, which\n * is not desirable, and a manually dispatched event must specifically be a\n * `MouseEvent` to trigger a native action.\n *\n * @example\n * hostClickListener = (event: MouseEvent) {\n * if (isActivationClick(event)) {\n * this.dispatchActivationClick(this.buttonElement);\n * }\n * }\n *\n */\nexport function dispatchActivationClick(element) {\n const event = new MouseEvent('click', { bubbles: true });\n element.dispatchEvent(event);\n return event;\n}\n/**\n * Returns true if the click event should trigger an activation behavior. The\n * behavior is defined by the element and is whatever it should do when\n * clicked.\n *\n * Typically when an element needs to handle a click, the click is generated\n * from within the element and an event listener within the element implements\n * the needed behavior; however, it's possible to fire a click directly\n * at the element that the element should handle. This method helps\n * distinguish these \"external\" clicks.\n *\n * An \"external\" click can be triggered in a number of ways: via a click\n * on an associated label for a form associated element, calling\n * `element.click()`, or calling\n * `element.dispatchEvent(new MouseEvent('click', ...))`.\n *\n * Also works around Firefox issue\n * https://bugzilla.mozilla.org/show_bug.cgi?id=1804576 by squelching\n * events for a microtask after called.\n *\n * @example\n * hostClickListener = (event: MouseEvent) {\n * if (isActivationClick(event)) {\n * this.dispatchActivationClick(this.buttonElement);\n * }\n * }\n *\n */\nexport function isActivationClick(event) {\n // Event must start at the event target.\n if (event.currentTarget !== event.target) {\n return false;\n }\n // Event must not be retargeted from shadowRoot.\n if (event.composedPath()[0] !== event.target) {\n return false;\n }\n // Target must not be disabled; this should only occur for a synthetically\n // dispatched click.\n if (event.target.disabled) {\n return false;\n }\n // This is an activation if the event should not be squelched.\n return !squelchEvent(event);\n}\n// TODO(https://bugzilla.mozilla.org/show_bug.cgi?id=1804576)\n// Remove when Firefox bug is addressed.\nfunction squelchEvent(event) {\n const squelched = isSquelchingEvents;\n if (squelched) {\n event.preventDefault();\n event.stopImmediatePropagation();\n }\n squelchEventsForMicrotask();\n return squelched;\n}\n// Ignore events for one microtask only.\nlet isSquelchingEvents = false;\nasync function squelchEventsForMicrotask() {\n isSquelchingEvents = true;\n // Need to pause for just one microtask.\n // tslint:disable-next-line\n await null;\n isSquelchingEvents = false;\n}\n//# sourceMappingURL=form-label-activation.js.map","/**\n * @license\n * Copyright 2019 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\nimport { __decorate } from \"tslib\";\nimport '../../focus/md-focus-ring.js';\nimport '../../ripple/ripple.js';\nimport { html, isServer, LitElement, nothing } from 'lit';\nimport { property, query, queryAssignedElements } from 'lit/decorators.js';\nimport { mixinDelegatesAria } from '../../internal/aria/delegate.js';\nimport { dispatchActivationClick, isActivationClick, } from '../../internal/events/form-label-activation.js';\nimport { mixinElementInternals } from '../../labs/behaviors/element-internals.js';\nimport { mixinFormAssociated } from '../../labs/behaviors/form-associated.js';\nimport { mixinFormSubmitter } from '../../labs/behaviors/form-submitter.js';\n// Separate variable needed for closure.\nconst buttonBaseClass = mixinDelegatesAria(mixinFormSubmitter(mixinFormAssociated(mixinElementInternals(LitElement))));\n/**\n * A button component.\n */\nexport class Button extends buttonBaseClass {\n constructor() {\n super();\n /**\n * Whether or not the button is \"soft-disabled\" (disabled but still\n * focusable).\n *\n * Use this when a button needs increased visibility when disabled. See\n * https://www.w3.org/WAI/ARIA/apg/practices/keyboard-interface/#kbd_disabled_controls\n * for more guidance on when this is needed.\n */\n this.softDisabled = false;\n /**\n * The URL that the link button points to.\n */\n this.href = '';\n /**\n * The filename to use when downloading the linked resource.\n * If not specified, the browser will determine a filename.\n * This is only applicable when the button is used as a link (`href` is set).\n */\n this.download = '';\n /**\n * Where to display the linked `href` URL for a link button. Common options\n * include `_blank` to open in a new tab.\n */\n this.target = '';\n /**\n * Whether to render the icon at the inline end of the label rather than the\n * inline start.\n *\n * _Note:_ Link buttons cannot have trailing icons.\n */\n this.trailingIcon = false;\n /**\n * Whether to display the icon or not.\n */\n this.hasIcon = false;\n if (!isServer) {\n this.addEventListener('click', this.handleClick.bind(this));\n }\n }\n focus() {\n this.buttonElement?.focus();\n }\n blur() {\n this.buttonElement?.blur();\n }\n render() {\n const isRippleDisabled = this.disabled || this.softDisabled;\n const buttonOrLink = this.href ? this.renderLink() : this.renderButton();\n // TODO(b/310046938): due to a limitation in focus ring/ripple, we can't use\n // the same ID for different elements, so we change the ID instead.\n const buttonId = this.href ? 'link' : 'button';\n return html `\n ${this.renderElevationOrOutline?.()}\n <div class=\"background\"></div>\n <md-focus-ring part=\"focus-ring\" for=${buttonId}></md-focus-ring>\n <md-ripple\n part=\"ripple\"\n for=${buttonId}\n ?disabled=\"${isRippleDisabled}\"></md-ripple>\n ${buttonOrLink}\n `;\n }\n renderButton() {\n // Needed for closure conformance\n const { ariaLabel, ariaHasPopup, ariaExpanded } = this;\n return html `<button\n id=\"button\"\n class=\"button\"\n ?disabled=${this.disabled}\n aria-disabled=${this.softDisabled || nothing}\n aria-label=\"${ariaLabel || nothing}\"\n aria-haspopup=\"${ariaHasPopup || nothing}\"\n aria-expanded=\"${ariaExpanded || nothing}\">\n ${this.renderContent()}\n </button>`;\n }\n renderLink() {\n // Needed for closure conformance\n const { ariaLabel, ariaHasPopup, ariaExpanded } = this;\n return html `<a\n id=\"link\"\n class=\"button\"\n aria-label=\"${ariaLabel || nothing}\"\n aria-haspopup=\"${ariaHasPopup || nothing}\"\n aria-expanded=\"${ariaExpanded || nothing}\"\n aria-disabled=${this.disabled || this.softDisabled || nothing}\n tabindex=\"${this.disabled && !this.softDisabled ? -1 : nothing}\"\n href=${this.href}\n download=${this.download || nothing}\n target=${this.target || nothing}\n >${this.renderContent()}\n </a>`;\n }\n renderContent() {\n const icon = html `<slot\n name=\"icon\"\n @slotchange=\"${this.handleSlotChange}\"></slot>`;\n return html `\n <span class=\"touch\"></span>\n ${this.trailingIcon ? nothing : icon}\n <span class=\"label\"><slot></slot></span>\n ${this.trailingIcon ? icon : nothing}\n `;\n }\n handleClick(event) {\n // If the button is soft-disabled or a disabled link, we need to explicitly\n // prevent the click from propagating to other event listeners as well as\n // prevent the default action.\n if (this.softDisabled || (this.disabled && this.href)) {\n event.stopImmediatePropagation();\n event.preventDefault();\n return;\n }\n if (!isActivationClick(event) || !this.buttonElement) {\n return;\n }\n this.focus();\n dispatchActivationClick(this.buttonElement);\n }\n handleSlotChange() {\n this.hasIcon = this.assignedIcons.length > 0;\n }\n}\n/** @nocollapse */\nButton.shadowRootOptions = {\n mode: 'open',\n delegatesFocus: true,\n};\n__decorate([\n property({ type: Boolean, attribute: 'soft-disabled', reflect: true })\n], Button.prototype, \"softDisabled\", void 0);\n__decorate([\n property()\n], Button.prototype, \"href\", void 0);\n__decorate([\n property()\n], Button.prototype, \"download\", void 0);\n__decorate([\n property()\n], Button.prototype, \"target\", void 0);\n__decorate([\n property({ type: Boolean, attribute: 'trailing-icon', reflect: true })\n], Button.prototype, \"trailingIcon\", void 0);\n__decorate([\n property({ type: Boolean, attribute: 'has-icon', reflect: true })\n], Button.prototype, \"hasIcon\", void 0);\n__decorate([\n query('.button')\n], Button.prototype, \"buttonElement\", void 0);\n__decorate([\n queryAssignedElements({ slot: 'icon', flatten: true })\n], Button.prototype, \"assignedIcons\", void 0);\n//# sourceMappingURL=button.js.map","/**\n * @license\n * Copyright 2026 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n// Generated stylesheet for ./button/internal/shared-styles.css.\nimport { css } from 'lit';\nexport const styles = css `:host{border-start-start-radius:var(--_container-shape-start-start);border-start-end-radius:var(--_container-shape-start-end);border-end-start-radius:var(--_container-shape-end-start);border-end-end-radius:var(--_container-shape-end-end);box-sizing:border-box;cursor:pointer;display:inline-flex;gap:8px;min-height:var(--_container-height);outline:none;padding-block:calc((var(--_container-height) - max(var(--_label-text-line-height),var(--_icon-size)))/2);padding-inline-start:var(--_leading-space);padding-inline-end:var(--_trailing-space);place-content:center;place-items:center;position:relative;font-family:var(--_label-text-font);font-size:var(--_label-text-size);line-height:var(--_label-text-line-height);font-weight:var(--_label-text-weight);text-overflow:ellipsis;text-wrap:nowrap;user-select:none;-webkit-tap-highlight-color:rgba(0,0,0,0);vertical-align:top;--md-ripple-hover-color: var(--_hover-state-layer-color);--md-ripple-pressed-color: var(--_pressed-state-layer-color);--md-ripple-hover-opacity: var(--_hover-state-layer-opacity);--md-ripple-pressed-opacity: var(--_pressed-state-layer-opacity)}md-focus-ring{--md-focus-ring-shape-start-start: var(--_container-shape-start-start);--md-focus-ring-shape-start-end: var(--_container-shape-start-end);--md-focus-ring-shape-end-end: var(--_container-shape-end-end);--md-focus-ring-shape-end-start: var(--_container-shape-end-start)}:host(:is([disabled],[soft-disabled])){cursor:default;pointer-events:none}.button{border-radius:inherit;cursor:inherit;display:inline-flex;align-items:center;justify-content:center;border:none;outline:none;-webkit-appearance:none;vertical-align:middle;background:rgba(0,0,0,0);text-decoration:none;min-width:calc(64px - var(--_leading-space) - var(--_trailing-space));width:100%;z-index:0;height:100%;font:inherit;color:var(--_label-text-color);padding:0;gap:inherit;text-transform:inherit}.button::-moz-focus-inner{padding:0;border:0}:host(:hover) .button{color:var(--_hover-label-text-color)}:host(:focus-within) .button{color:var(--_focus-label-text-color)}:host(:active) .button{color:var(--_pressed-label-text-color)}.background{background:var(--_container-color);border-radius:inherit;inset:0;position:absolute}.label{overflow:hidden}:is(.button,.label,.label slot),.label ::slotted(*){text-overflow:inherit}:host(:is([disabled],[soft-disabled])) .label{color:var(--_disabled-label-text-color);opacity:var(--_disabled-label-text-opacity)}:host(:is([disabled],[soft-disabled])) .background{background:var(--_disabled-container-color);opacity:var(--_disabled-container-opacity)}@media(forced-colors: active){.background{border:1px solid CanvasText}:host(:is([disabled],[soft-disabled])){--_disabled-icon-color: GrayText;--_disabled-icon-opacity: 1;--_disabled-container-opacity: 1;--_disabled-label-text-color: GrayText;--_disabled-label-text-opacity: 1}}:host([has-icon]:not([trailing-icon])){padding-inline-start:var(--_with-leading-icon-leading-space);padding-inline-end:var(--_with-leading-icon-trailing-space)}:host([has-icon][trailing-icon]){padding-inline-start:var(--_with-trailing-icon-leading-space);padding-inline-end:var(--_with-trailing-icon-trailing-space)}::slotted([slot=icon]){display:inline-flex;position:relative;writing-mode:horizontal-tb;fill:currentColor;flex-shrink:0;color:var(--_icon-color);font-size:var(--_icon-size);inline-size:var(--_icon-size);block-size:var(--_icon-size)}:host(:hover) ::slotted([slot=icon]){color:var(--_hover-icon-color)}:host(:focus-within) ::slotted([slot=icon]){color:var(--_focus-icon-color)}:host(:active) ::slotted([slot=icon]){color:var(--_pressed-icon-color)}:host(:is([disabled],[soft-disabled])) ::slotted([slot=icon]){color:var(--_disabled-icon-color);opacity:var(--_disabled-icon-opacity)}.touch{position:absolute;top:50%;height:max(48px,100%);left:0;right:0;transform:translateY(-50%)}:host([touch-target=wrapper]){margin:max(0px,(48px - var(--_container-height))/2) 0}:host([touch-target=none]) .touch{display:none}\n`;\nexport default styles.styleSheet;\n//# sourceMappingURL=shared-styles.cssresult.js.map","/**\n * @license\n * Copyright 2021 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\nimport { Button } from './button.js';\n/**\n * A text button component.\n */\nexport class TextButton extends Button {\n}\n//# sourceMappingURL=text-button.js.map","/**\n * @license\n * Copyright 2026 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\n// Generated stylesheet for ./button/internal/text-styles.css.\nimport { css } from 'lit';\nexport const styles = css `:host{--_container-height: var(--md-text-button-container-height, 40px);--_disabled-label-text-color: var(--md-text-button-disabled-label-text-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-label-text-opacity: var(--md-text-button-disabled-label-text-opacity, 0.38);--_focus-label-text-color: var(--md-text-button-focus-label-text-color, var(--md-sys-color-primary, #6750a4));--_hover-label-text-color: var(--md-text-button-hover-label-text-color, var(--md-sys-color-primary, #6750a4));--_hover-state-layer-color: var(--md-text-button-hover-state-layer-color, var(--md-sys-color-primary, #6750a4));--_hover-state-layer-opacity: var(--md-text-button-hover-state-layer-opacity, 0.08);--_label-text-color: var(--md-text-button-label-text-color, var(--md-sys-color-primary, #6750a4));--_label-text-font: var(--md-text-button-label-text-font, var(--md-sys-typescale-label-large-font, var(--md-ref-typeface-plain, Roboto)));--_label-text-line-height: var(--md-text-button-label-text-line-height, var(--md-sys-typescale-label-large-line-height, 1.25rem));--_label-text-size: var(--md-text-button-label-text-size, var(--md-sys-typescale-label-large-size, 0.875rem));--_label-text-weight: var(--md-text-button-label-text-weight, var(--md-sys-typescale-label-large-weight, var(--md-ref-typeface-weight-medium, 500)));--_pressed-label-text-color: var(--md-text-button-pressed-label-text-color, var(--md-sys-color-primary, #6750a4));--_pressed-state-layer-color: var(--md-text-button-pressed-state-layer-color, var(--md-sys-color-primary, #6750a4));--_pressed-state-layer-opacity: var(--md-text-button-pressed-state-layer-opacity, 0.12);--_disabled-icon-color: var(--md-text-button-disabled-icon-color, var(--md-sys-color-on-surface, #1d1b20));--_disabled-icon-opacity: var(--md-text-button-disabled-icon-opacity, 0.38);--_focus-icon-color: var(--md-text-button-focus-icon-color, var(--md-sys-color-primary, #6750a4));--_hover-icon-color: var(--md-text-button-hover-icon-color, var(--md-sys-color-primary, #6750a4));--_icon-color: var(--md-text-button-icon-color, var(--md-sys-color-primary, #6750a4));--_icon-size: var(--md-text-button-icon-size, 18px);--_pressed-icon-color: var(--md-text-button-pressed-icon-color, var(--md-sys-color-primary, #6750a4));--_container-shape-start-start: var(--md-text-button-container-shape-start-start, var(--md-text-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_container-shape-start-end: var(--md-text-button-container-shape-start-end, var(--md-text-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_container-shape-end-end: var(--md-text-button-container-shape-end-end, var(--md-text-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_container-shape-end-start: var(--md-text-button-container-shape-end-start, var(--md-text-button-container-shape, var(--md-sys-shape-corner-full, 9999px)));--_leading-space: var(--md-text-button-leading-space, 12px);--_trailing-space: var(--md-text-button-trailing-space, 12px);--_with-leading-icon-leading-space: var(--md-text-button-with-leading-icon-leading-space, 12px);--_with-leading-icon-trailing-space: var(--md-text-button-with-leading-icon-trailing-space, 16px);--_with-trailing-icon-leading-space: var(--md-text-button-with-trailing-icon-leading-space, 16px);--_with-trailing-icon-trailing-space: var(--md-text-button-with-trailing-icon-trailing-space, 12px);--_container-color: none;--_disabled-container-color: none;--_disabled-container-opacity: 0}\n`;\nexport default styles.styleSheet;\n//# sourceMappingURL=text-styles.cssresult.js.map","/**\n * @license\n * Copyright 2021 Google LLC\n * SPDX-License-Identifier: Apache-2.0\n */\nimport { __decorate } from \"tslib\";\nimport { customElement } from 'lit/decorators.js';\nimport { styles as sharedStyles } from './internal/shared-styles.cssresult.js';\nimport { TextButton } from './internal/text-button.js';\nimport { styles as textStyles } from './internal/text-styles.cssresult.js';\n/**\n * @summary Buttons help people take action, such as sending an email, sharing a\n * document, or liking a comment.\n *\n * @description\n * __Emphasis:__ Low emphasis – For optional or supplementary actions with the\n * least amount of prominence\n *\n * __Rationale:__ Text buttons have less visual prominence, so should be used\n * for low emphasis actions, such as an alternative option.\n *\n * __Example usages:__\n * - Learn more\n * - View all\n * - Change account\n * - Turn on\n *\n * @final\n * @suppress {visibility}\n */\nlet MdTextButton = class MdTextButton extends TextButton {\n};\nMdTextButton.styles = [sharedStyles, textStyles];\nMdTextButton = __decorate([\n customElement('md-text-button')\n], MdTextButton);\nexport { MdTextButton };\n//# sourceMappingURL=text-button.js.map"],"ignoreList":[0,1,2,3,4,5,6],"mappings":";;;;;;GAKG,SAAS,EAAE,GAAE;CAAC,QAAO,KAAE,MAAI;EAAC,MAAK,E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Y"}
@@ -1,22 +1,9 @@
1
1
  import { r as json, t as error } from "../../../../chunks/exports.js";
2
- import { f as ConfigPatchSchema, n as checkDto } from "../../../../chunks/src.js";
2
+ import { n as checkDto, p as ConfigPatchSchema } from "../../../../chunks/src.js";
3
+ import { t as readConfigState } from "../../../../chunks/config-state.js";
3
4
  // src/routes/api/config/+server.ts
4
- /**
5
- * The settings page's read in one answer: what runs (`active`), what the next start will use
6
- * (`saved`) and the settings a flag or variable sets (`overrides`, by dotted path).
7
- */
8
- var GET = async ({ locals: { bridge } }) => {
9
- const [active, saved, overrides] = await Promise.all([
10
- bridge.config("active"),
11
- bridge.config("saved"),
12
- bridge.configOverrides()
13
- ]);
14
- return json({
15
- active,
16
- saved,
17
- overrides: overrides.overrides
18
- });
19
- };
5
+ /** The settings page's re-read in the browser (`readConfigState`). */
6
+ var GET = async ({ locals: { bridge } }) => json(await readConfigState(bridge));
20
7
  /** Saves a partial config for the next start and answers with the saved config. */
21
8
  var PUT = async ({ request, locals }) => {
22
9
  const body = await request.json().catch(() => void 0);
@@ -1 +1 @@
1
- {"version":3,"file":"_server.ts.js","names":[],"sources":["../../../../../../src/routes/api/config/+server.ts"],"sourcesContent":["import { error, json } from '@sveltejs/kit';\nimport { checkDto, ConfigPatchSchema } from '@screenreader-speech-capture/shared';\nimport type { RequestHandler } from './$types';\n\n/**\n * The settings page's read in one answer: what runs (`active`), what the next start will use\n * (`saved`) and the settings a flag or variable sets (`overrides`, by dotted path).\n */\nexport const GET: RequestHandler = async ({ locals: { bridge } }) => {\n const [active, saved, overrides] = await Promise.all([\n bridge.config('active'),\n bridge.config('saved'),\n bridge.configOverrides(),\n ]);\n return json({ active, saved, overrides: overrides.overrides });\n};\n\n/** Saves a partial config for the next start and answers with the saved config. */\nexport const PUT: RequestHandler = async ({ request, locals }) => {\n const body: unknown = await request.json().catch(() => undefined);\n const checked = checkDto(ConfigPatchSchema, body);\n if (!checked.ok) {\n error(400, {\n message: `Invalid setting at ${checked.field}: ${checked.message}`,\n field: checked.field,\n });\n }\n return json(await locals.bridge.updateConfig(checked.value));\n};\n"],"mappings":";;;;;;;AAQA,IAAa,MAAsB,OAAO,EAAE,QAAQ,EAAE,eAAe;CACnE,MAAM,CAAC,QAAQ,OAAO,aAAa,MAAM,QAAQ,IAAI;EACnD,OAAO,OAAO,QAAQ;EACtB,OAAO,OAAO,OAAO;EACrB,OAAO,gBAAgB;CACzB,CAAC;CACD,OAAO,KAAK;EAAE;EAAQ;EAAO,WAAW,UAAU;CAAU,CAAC;AAC/D;;AAGA,IAAa,MAAsB,OAAO,EAAE,SAAS,aAAa;CAChE,MAAM,OAAgB,MAAM,QAAQ,KAAK,CAAC,CAAC,YAAY,KAAA,CAAS;CAChE,MAAM,UAAU,SAAS,mBAAmB,IAAI;CAChD,IAAI,CAAC,QAAQ,IACX,MAAM,KAAK;EACT,SAAS,sBAAsB,QAAQ,MAAM,IAAI,QAAQ;EACzD,OAAO,QAAQ;CACjB,CAAC;CAEH,OAAO,KAAK,MAAM,OAAO,OAAO,aAAa,QAAQ,KAAK,CAAC;AAC7D"}
1
+ {"version":3,"file":"_server.ts.js","names":[],"sources":["../../../../../../src/routes/api/config/+server.ts"],"sourcesContent":["import { error, json } from '@sveltejs/kit';\nimport { checkDto, ConfigPatchSchema } from '@screenreader-speech-capture/shared';\nimport { readConfigState } from '#lib/server/config-state.js';\nimport type { RequestHandler } from './$types';\n\n/** The settings page's re-read in the browser (`readConfigState`). */\nexport const GET: RequestHandler = async ({ locals: { bridge } }) =>\n json(await readConfigState(bridge));\n\n/** Saves a partial config for the next start and answers with the saved config. */\nexport const PUT: RequestHandler = async ({ request, locals }) => {\n const body: unknown = await request.json().catch(() => undefined);\n const checked = checkDto(ConfigPatchSchema, body);\n if (!checked.ok) {\n error(400, {\n message: `Invalid setting at ${checked.field}: ${checked.message}`,\n field: checked.field,\n });\n }\n return json(await locals.bridge.updateConfig(checked.value));\n};\n"],"mappings":";;;;;AAMA,IAAa,MAAsB,OAAO,EAAE,QAAQ,EAAE,eACpD,KAAK,MAAM,gBAAgB,MAAM,CAAC;;AAGpC,IAAa,MAAsB,OAAO,EAAE,SAAS,aAAa;CAChE,MAAM,OAAgB,MAAM,QAAQ,KAAK,CAAC,CAAC,YAAY,KAAA,CAAS;CAChE,MAAM,UAAU,SAAS,mBAAmB,IAAI;CAChD,IAAI,CAAC,QAAQ,IACX,MAAM,KAAK;EACT,SAAS,sBAAsB,QAAQ,MAAM,IAAI,QAAQ;EACzD,OAAO,QAAQ;CACjB,CAAC;CAEH,OAAO,KAAK,MAAM,OAAO,OAAO,aAAa,QAAQ,KAAK,CAAC;AAC7D"}
@@ -0,0 +1,14 @@
1
+ import { t as error } from "../../../../../chunks/exports.js";
2
+ import { c as KeysRequestSchema, n as checkDto } from "../../../../../chunks/src.js";
3
+ // src/routes/api/input/keys/+server.ts
4
+ /** Presses keys (`{ keys }`) on the bridge's machine. Only `keys` goes on: no `capture`. */
5
+ var POST = async ({ request, locals }) => {
6
+ const body = await request.json().catch(() => void 0);
7
+ const checked = checkDto(KeysRequestSchema, body);
8
+ if (!checked.ok) error(400, `Invalid keys at ${checked.field}: ${checked.message}`);
9
+ await locals.bridge.pressKeys(checked.value.keys);
10
+ return new Response(null, { status: 204 });
11
+ };
12
+ export { POST };
13
+
14
+ //# sourceMappingURL=_server.ts.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"_server.ts.js","names":[],"sources":["../../../../../../../src/routes/api/input/keys/+server.ts"],"sourcesContent":["import { error } from '@sveltejs/kit';\nimport { checkDto, KeysRequestSchema } from '@screenreader-speech-capture/shared';\nimport type { RequestHandler } from './$types';\n\n/** Presses keys (`{ keys }`) on the bridge's machine. Only `keys` goes on: no `capture`. */\nexport const POST: RequestHandler = async ({ request, locals }) => {\n const body: unknown = await request.json().catch(() => undefined);\n const checked = checkDto(KeysRequestSchema, body);\n if (!checked.ok) error(400, `Invalid keys at ${checked.field}: ${checked.message}`);\n await locals.bridge.pressKeys(checked.value.keys);\n return new Response(null, { status: 204 });\n};\n"],"mappings":";;;;AAKA,IAAa,OAAuB,OAAO,EAAE,SAAS,aAAa;CACjE,MAAM,OAAgB,MAAM,QAAQ,KAAK,CAAC,CAAC,YAAY,KAAA,CAAS;CAChE,MAAM,UAAU,SAAS,mBAAmB,IAAI;CAChD,IAAI,CAAC,QAAQ,IAAI,MAAM,KAAK,mBAAmB,QAAQ,MAAM,IAAI,QAAQ,SAAS;CAClF,MAAM,OAAO,OAAO,UAAU,QAAQ,MAAM,IAAI;CAChD,OAAO,IAAI,SAAS,MAAM,EAAE,QAAQ,IAAI,CAAC;AAC3C"}
@@ -1,5 +1,5 @@
1
1
  import { r as json, t as error } from "../../../../chunks/exports.js";
2
- import { c as MarkerRequestSchema, n as checkDto } from "../../../../chunks/src.js";
2
+ import { l as MarkerRequestSchema, n as checkDto } from "../../../../chunks/src.js";
3
3
  // src/routes/api/markers/+server.ts
4
4
  /** Inserts a marker (`{ label }`) into the timeline. */
5
5
  var POST = async ({ request, locals }) => {
@@ -1,5 +1,5 @@
1
1
  import { r as json, t as error } from "../../../../chunks/exports.js";
2
- import { m as API_LIMITS } from "../../../../chunks/src.js";
2
+ import { g as API_LIMITS } from "../../../../chunks/src.js";
3
3
  import { t as scopeParam } from "../../../../chunks/scope.js";
4
4
  // src/routes/api/speech/+server.ts
5
5
  function intParam(value, fallback, max) {
@@ -1,4 +1,4 @@
1
- import { m as escape_html } from "../../chunks/server2.js";
1
+ import { h as escape_html } from "../../chunks/server2.js";
2
2
  import { t as page } from "../../chunks/state.js";
3
3
  // ../../node_modules/.pnpm/@sveltejs+kit@3.2.0_@sveltejs+vite-plugin-svelte@7.3.1_svelte@5.57.3_@typescript-eslint_ccfe35d88efff66f949c986fae0769d3/node_modules/@sveltejs/kit/src/runtime/components/error.svelte
4
4
  function Error($$renderer, $$props) {
@@ -1,6 +1,6 @@
1
1
  import { t as dynamic_private_env } from "../chunks/config.js";
2
2
  import { t as error } from "../chunks/exports.js";
3
- import { a as SessionListSchema, d as ConfigOverridesSchema, i as CLIENT_HEADER, l as SpeechEntrySchema, n as checkDto, p as ConfigSchema, r as StatusSchema, s as StartSessionResponseSchema, t as AnyErrorBodySchema, u as SpeechListSchema } from "../chunks/src.js";
3
+ import { a as SessionListSchema, d as SpeechListSchema, f as ConfigOverridesSchema, i as CLIENT_HEADER, m as ConfigSchema, n as checkDto, r as StatusSchema, s as StartSessionResponseSchema, t as AnyErrorBodySchema, u as SpeechEntrySchema } from "../chunks/src.js";
4
4
  // ../shared/src/api-version.ts
5
5
  /** Path prefix of every API route. */
6
6
  var API_PREFIX = "/api/v1";
@@ -67,6 +67,9 @@ function createBridgeApi(baseUrl, fetchFn) {
67
67
  config: (view) => read("GET", `/config?view=${view}`, ConfigSchema),
68
68
  configOverrides: () => read("GET", "/config/overrides", ConfigOverridesSchema),
69
69
  updateConfig: (patch) => read("PUT", "/config", ConfigSchema, patch),
70
+ pressKeys: async (keys) => {
71
+ await call("POST", "/input/keys", { keys });
72
+ },
70
73
  addMarker: (label) => read("POST", "/markers", SpeechEntrySchema, { label }),
71
74
  speech: (session, since, limit) => {
72
75
  const query = new URLSearchParams({
@@ -1 +1 @@
1
- {"version":3,"file":"hooks.server.js","names":["env"],"sources":["../../../../shared/src/api-version.ts","../../../.svelte-kit/generated/build/env/private/server.js","../../../src/lib/server/bridge-api.ts","../../../src/lib/server/bridge-from-env.ts","../../../src/lib/server/log.ts","../../../src/hooks.server.ts"],"sourcesContent":["/**\n * `<major>.<minor>` of the HTTP API. Minor versions only add things\n * (docs/usage/http-api.md#versioning).\n */\nexport const API_VERSION = '1.24';\n\n/** Path prefix of every API route. */\nexport const API_PREFIX = '/api/v1';\n\n/**\n * Response header with {@link API_VERSION} on every answer under {@link API_PREFIX} (since 1.22),\n * so a client checks the version on each answer instead of asking `GET /status` first.\n */\nexport const API_VERSION_HEADER = 'X-SR-Speech-Api-Version';\n","import { dynamic_private_env as env } from '../config.js';\n\nexport const SR_BRIDGE_API_URL = env.SR_BRIDGE_API_URL;\n","import { error } from '@sveltejs/kit';\nimport {\n AnyErrorBodySchema,\n API_PREFIX,\n CLIENT_HEADER,\n checkDto,\n ConfigOverridesSchema,\n ConfigSchema,\n SessionListSchema,\n SpeechEntrySchema,\n SpeechListSchema,\n StartSessionResponseSchema,\n StatusSchema,\n type ConfigDto,\n type ConfigOverridesDto,\n type ConfigPatchDto,\n type DtoOf,\n type DtoSchema,\n type SessionListDto,\n type SpeechEntryDto,\n type SpeechListDto,\n type StartSessionRequestDto,\n type StartSessionResponseDto,\n type StatusDto,\n} from '@screenreader-speech-capture/shared';\nimport type { SessionScope } from '#lib/core/sessions.js';\n\ntype Fetch = typeof fetch;\n\n/** The bridge's HTTP API as the BFF uses it: the only place the UI server talks to the bridge. */\nexport interface BridgeApi {\n status(): Promise<StatusDto>;\n sessions(): Promise<SessionListDto>;\n startSession(request: StartSessionRequestDto): Promise<StartSessionResponseDto>;\n /** Ends the current session; does nothing if none is current. */\n endSession(): Promise<void>;\n /** Deletes an ended session and its speech (the bridge refuses the current one). */\n deleteSession(id: number): Promise<void>;\n /** Clears the speech of the current session or of `none` (`session`: an id or `none`); it keeps running. */\n clearSpeech(session: SessionScope): Promise<void>;\n /** The configuration in use (`active`) or the one the next start will use (`saved`). */\n config(view: 'active' | 'saved'): Promise<ConfigDto>;\n /** The settings a flag or environment variable sets: the config file can't change them. */\n configOverrides(): Promise<ConfigOverridesDto>;\n /**\n * Saves a partial config for the next start and answers with the saved config. Rejects with the\n * bridge's status and message, plus `field` (`tcp.port`) when the bridge names one.\n */\n updateConfig(patch: ConfigPatchDto): Promise<ConfigDto>;\n /** Inserts a marker; the bridge files it under the current session (or outside any). */\n addMarker(label: string): Promise<SpeechEntryDto>;\n /** One page of a scope's entries with `seq > since`, oldest first (`session`: an id or `none`). */\n speech(session: SessionScope | null, since: number, limit: number): Promise<SpeechListDto>;\n /**\n * Opens the bridge's SSE stream (`session`: an id or `none`). The body is passed on as it is,\n * so `Last-Event-ID` replays and every event name reach the browser untouched.\n */\n openSpeechStream(\n session: SessionScope | null,\n lastEventId: string | null,\n signal: AbortSignal,\n ): Promise<Response>;\n}\n\n/** Named in the bridge's logs when this UI ends or replaces another client's session. */\nconst UI_CLIENT = 'web-ui';\n\n/**\n * `baseUrl` is the bridge's origin (no path). `fetchFn` is SvelteKit's `event.fetch` in\n * routes and a fake in tests.\n */\nexport function createBridgeApi(baseUrl: string, fetchFn: Fetch): BridgeApi {\n const root = baseUrl.replace(/\\/+$/, '') + API_PREFIX;\n // SvelteKit's `event.fetch` adds `Origin: <the UI's own origin>` to every call to another origin\n // (`pnpm dev:ui`: http://localhost:5173). The bridge refuses a POST from any origin but its own\n // (docs/usage/security.md#host-and-origin), so name the bridge itself: this is a server-side\n // call, not a page of another site.\n const origin = new URL(root).origin;\n\n async function call(\n method: 'GET' | 'POST' | 'PUT' | 'DELETE',\n path: string,\n body?: unknown,\n ): Promise<unknown> {\n let response: Response;\n try {\n response = await fetchFn(`${root}${path}`, {\n method,\n headers: {\n accept: 'application/json',\n origin,\n [CLIENT_HEADER]: UI_CLIENT,\n ...(body === undefined ? {} : { 'content-type': 'application/json' }),\n },\n body: body === undefined ? undefined : JSON.stringify(body),\n });\n } catch (cause) {\n error(502, `The bridge is not reachable: ${describe(cause)}`);\n }\n const answer: unknown = await response.json().catch(() => undefined);\n if (!response.ok) {\n const apiError = checkDto(AnyErrorBodySchema, answer);\n if (!apiError.ok) error(response.status, `The bridge answered ${response.status}`);\n const { message, details } = apiError.value.error;\n const field = details?.field;\n if (typeof field === 'string') error(response.status, { message, field });\n error(response.status, message);\n }\n return answer;\n }\n\n async function read<S extends DtoSchema>(\n method: 'GET' | 'POST' | 'PUT',\n path: string,\n schema: S,\n body?: unknown,\n ): Promise<DtoOf<S>> {\n const checked = checkDto(schema, await call(method, path, body));\n if (!checked.ok) {\n error(502, `Unexpected answer from the bridge at ${checked.field}: ${checked.message}`);\n }\n return checked.value;\n }\n\n return {\n status: () => read('GET', '/status', StatusSchema),\n sessions: () => read('GET', '/sessions', SessionListSchema),\n startSession: (request) => read('POST', '/sessions', StartSessionResponseSchema, request),\n endSession: async () => {\n await call('POST', '/sessions/end');\n },\n deleteSession: async (id) => {\n await call('DELETE', `/sessions?session=${id}`);\n },\n clearSpeech: async (session) => {\n await call('DELETE', `/speech?session=${session}`);\n },\n config: (view) => read('GET', `/config?view=${view}`, ConfigSchema),\n configOverrides: () => read('GET', '/config/overrides', ConfigOverridesSchema),\n updateConfig: (patch) => read('PUT', '/config', ConfigSchema, patch),\n addMarker: (label) => read('POST', '/markers', SpeechEntrySchema, { label }),\n speech: (session, since, limit) => {\n const query = new URLSearchParams({ since: String(since), limit: String(limit) });\n if (session !== null) query.set('session', String(session));\n return read('GET', `/speech?${query}`, SpeechListSchema);\n },\n openSpeechStream: async (session, lastEventId, signal) => {\n const query = session === null ? '' : `?session=${session}`;\n let response: Response;\n try {\n response = await fetchFn(`${root}/speech/stream${query}`, {\n headers: {\n accept: 'text/event-stream',\n origin,\n [CLIENT_HEADER]: UI_CLIENT,\n ...(lastEventId === null ? {} : { 'last-event-id': lastEventId }),\n },\n signal,\n });\n } catch (cause) {\n error(502, `The bridge is not reachable: ${describe(cause)}`);\n }\n if (!response.ok || response.body === null) {\n // Unread, the body would hold the bridge connection until it is garbage collected, and\n // `EventSource` retries every few seconds while the bridge refuses.\n await response.body?.cancel().catch(() => undefined);\n error(\n response.status === 200 ? 502 : response.status,\n 'The speech stream is not available',\n );\n }\n return response;\n },\n };\n}\n\nfunction describe(cause: unknown): string {\n return cause instanceof Error ? cause.message : String(cause);\n}\n","import { SR_BRIDGE_API_URL } from '$app/env/private';\nimport { createBridgeApi, type BridgeApi } from './bridge-api.js';\n\n/** The bridge API of this deployment, at `SR_BRIDGE_API_URL` (`src/env.ts`). */\nexport function bridgeApiFromEnv(fetchFn: typeof fetch): BridgeApi {\n return createBridgeApi(SR_BRIDGE_API_URL, fetchFn);\n}\n","/** What the BFF logs through: the bridge's `Logger` port, as far as the UI uses it. */\nexport interface ServerLog {\n error(message: string): void;\n warn(message: string): void;\n}\n\n/**\n * Where the bridge puts its `[web-ui]` logger before it loads the UI (`UI_LOGGER_KEY` in\n * `packages/bridge/src/composition/ui.ts`; the bridge and the UI don't import each other).\n */\nconst BRIDGE_LOGGER_KEY = Symbol.for('screenreader-speech-capture.ui-logger');\n\nfunction isServerLog(value: unknown): value is ServerLog {\n return (\n typeof value === 'object' &&\n value !== null &&\n typeof (value as ServerLog).error === 'function' &&\n typeof (value as ServerLog).warn === 'function'\n );\n}\n\n/** `pnpm dev:ui` has no bridge in its process: the Vite dev server's console stands in. */\nconst consoleLog: ServerLog = {\n error: (message) => console.error(`[web-ui] ${message}`),\n warn: (message) => console.warn(`[web-ui] ${message}`),\n};\n\n/**\n * The bridge log inside the bridge, the console otherwise. Read per call, so it doesn't matter\n * whether this module loads before or after the bridge sets it.\n */\nexport function serverLog(): ServerLog {\n const bridge = (globalThis as Record<symbol, unknown>)[BRIDGE_LOGGER_KEY];\n return isServerLog(bridge) ? bridge : consoleLog;\n}\n","import type { Handle, HandleServerError } from '@sveltejs/kit/hooks';\nimport { bridgeApiFromEnv } from '#lib/server/bridge-from-env.js';\nimport { serverLog } from '#lib/server/log.js';\n\n/**\n * Set by the bridge (`LOCAL_HEADER` in `packages/bridge/src/composition/ui.ts`) on a request that\n * comes from the bridge's own machine, and removed from every other one. The UI can't import it:\n * the bridge and the UI don't depend on each other.\n */\nconst LOCAL_HEADER = 'x-sr-bridge-local';\n\nexport const handle: Handle = ({ event, resolve }) => {\n event.locals.local = event.request.headers.get(LOCAL_HEADER) === '1';\n // Built once per request and with its `fetch`, so routes and loads share one way to the bridge.\n event.locals.bridge = bridgeApiFromEnv(event.fetch);\n return resolve(event);\n};\n\n/**\n * An unexpected error (`kind: 'unknown'`: not one thrown with `error()`, not SvelteKit's own such\n * as a 404) is one line in the bridge log; the browser keeps SvelteKit's generic answer. The line\n * names the path but never the query, which can hold speech text that must stay off the console\n * (docs/usage/operations.md#speech-text-stays-off-the-console).\n */\nexport const handleError: HandleServerError = ({ kind, error, event }) => {\n if (kind !== 'unknown') return;\n const reason = error instanceof Error ? `${error.name}: ${error.message}` : String(error);\n serverLog().error(`${event.request.method} ${event.url.pathname}: ${reason}`);\n};\n"],"mappings":";;;;;AAOA,IAAa,aAAa;;ACL1B,IAAa,oBAAoBA,oBAAI;;;AC+DrC,IAAM,YAAY;;;;;AAMlB,SAAgB,gBAAgB,SAAiB,SAA2B;CAC1E,MAAM,OAAO,QAAQ,QAAQ,QAAQ,EAAE,IAAI;CAK3C,MAAM,SAAS,IAAI,IAAI,IAAI,CAAC,CAAC;CAE7B,eAAe,KACb,QACA,MACA,MACkB;EAClB,IAAI;EACJ,IAAI;GACF,WAAW,MAAM,QAAQ,GAAG,OAAO,QAAQ;IACzC;IACA,SAAS;KACP,QAAQ;KACR;MACC,gBAAgB;KACjB,GAAI,SAAS,KAAA,IAAY,CAAC,IAAI,EAAE,gBAAgB,mBAAmB;IACrE;IACA,MAAM,SAAS,KAAA,IAAY,KAAA,IAAY,KAAK,UAAU,IAAI;GAC5D,CAAC;EACH,SAAS,OAAO;GACd,MAAM,KAAK,gCAAgC,SAAS,KAAK,GAAG;EAC9D;EACA,MAAM,SAAkB,MAAM,SAAS,KAAK,CAAC,CAAC,YAAY,KAAA,CAAS;EACnE,IAAI,CAAC,SAAS,IAAI;GAChB,MAAM,WAAW,SAAS,oBAAoB,MAAM;GACpD,IAAI,CAAC,SAAS,IAAI,MAAM,SAAS,QAAQ,uBAAuB,SAAS,QAAQ;GACjF,MAAM,EAAE,SAAS,YAAY,SAAS,MAAM;GAC5C,MAAM,QAAQ,SAAS;GACvB,IAAI,OAAO,UAAU,UAAU,MAAM,SAAS,QAAQ;IAAE;IAAS;GAAM,CAAC;GACxE,MAAM,SAAS,QAAQ,OAAO;EAChC;EACA,OAAO;CACT;CAEA,eAAe,KACb,QACA,MACA,QACA,MACmB;EACnB,MAAM,UAAU,SAAS,QAAQ,MAAM,K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":"hooks.server.js","names":["env"],"sources":["../../../../shared/src/api-version.ts","../../../.svelte-kit/generated/build/env/private/server.js","../../../src/lib/server/bridge-api.ts","../../../src/lib/server/bridge-from-env.ts","../../../src/lib/server/log.ts","../../../src/hooks.server.ts"],"sourcesContent":["/**\n * `<major>.<minor>` of the HTTP API. Minor versions only add things\n * (docs/usage/http-api.md#versioning).\n */\nexport const API_VERSION = '1.24';\n\n/** Path prefix of every API route. */\nexport const API_PREFIX = '/api/v1';\n\n/**\n * Response header with {@link API_VERSION} on every answer under {@link API_PREFIX} (since 1.22),\n * so a client checks the version on each answer instead of asking `GET /status` first.\n */\nexport const API_VERSION_HEADER = 'X-SR-Speech-Api-Version';\n","import { dynamic_private_env as env } from '../config.js';\n\nexport const SR_BRIDGE_API_URL = env.SR_BRIDGE_API_URL;\n","import { error } from '@sveltejs/kit';\nimport {\n AnyErrorBodySchema,\n API_PREFIX,\n CLIENT_HEADER,\n checkDto,\n ConfigOverridesSchema,\n ConfigSchema,\n SessionListSchema,\n SpeechEntrySchema,\n SpeechListSchema,\n StartSessionResponseSchema,\n StatusSchema,\n type ConfigDto,\n type ConfigOverridesDto,\n type ConfigPatchDto,\n type DtoOf,\n type DtoSchema,\n type KeysRequestDto,\n type SessionListDto,\n type SpeechEntryDto,\n type SpeechListDto,\n type StartSessionRequestDto,\n type StartSessionResponseDto,\n type StatusDto,\n} from '@screenreader-speech-capture/shared';\nimport type { SessionScope } from '#lib/core/sessions.js';\n\ntype Fetch = typeof fetch;\n\n/** The bridge's HTTP API as the BFF uses it: the only place the UI server talks to the bridge. */\nexport interface BridgeApi {\n status(): Promise<StatusDto>;\n sessions(): Promise<SessionListDto>;\n startSession(request: StartSessionRequestDto): Promise<StartSessionResponseDto>;\n /** Ends the current session; does nothing if none is current. */\n endSession(): Promise<void>;\n /** Deletes an ended session and its speech (the bridge refuses the current one). */\n deleteSession(id: number): Promise<void>;\n /** Clears the speech of the current session or of `none` (`session`: an id or `none`); it keeps running. */\n clearSpeech(session: SessionScope): Promise<void>;\n /** The configuration in use (`active`) or the one the next start will use (`saved`). */\n config(view: 'active' | 'saved'): Promise<ConfigDto>;\n /** The settings a flag or environment variable sets: the config file can't change them. */\n configOverrides(): Promise<ConfigOverridesDto>;\n /**\n * Saves a partial config for the next start and answers with the saved config. Rejects with the\n * bridge's status and message, plus `field` (`tcp.port`) when the bridge names one.\n */\n updateConfig(patch: ConfigPatchDto): Promise<ConfigDto>;\n /** Presses keys in the foreground window of the bridge's machine. */\n pressKeys(keys: KeysRequestDto['keys']): Promise<void>;\n /** Inserts a marker; the bridge files it under the current session (or outside any). */\n addMarker(label: string): Promise<SpeechEntryDto>;\n /** One page of a scope's entries with `seq > since`, oldest first (`session`: an id or `none`). */\n speech(session: SessionScope | null, since: number, limit: number): Promise<SpeechListDto>;\n /**\n * Opens the bridge's SSE stream (`session`: an id or `none`). The body is passed on as it is,\n * so `Last-Event-ID` replays and every event name reach the browser untouched.\n */\n openSpeechStream(\n session: SessionScope | null,\n lastEventId: string | null,\n signal: AbortSignal,\n ): Promise<Response>;\n}\n\n/** Named in the bridge's logs when this UI ends or replaces another client's session. */\nconst UI_CLIENT = 'web-ui';\n\n/**\n * `baseUrl` is the bridge's origin (no path). `fetchFn` is SvelteKit's `event.fetch` in\n * routes and a fake in tests.\n */\nexport function createBridgeApi(baseUrl: string, fetchFn: Fetch): BridgeApi {\n const root = baseUrl.replace(/\\/+$/, '') + API_PREFIX;\n // SvelteKit's `event.fetch` adds `Origin: <the UI's own origin>` to every call to another origin\n // (`pnpm dev:ui`: http://localhost:5173). The bridge refuses a POST from any origin but its own\n // (docs/usage/security.md#host-and-origin), so name the bridge itself: this is a server-side\n // call, not a page of another site.\n const origin = new URL(root).origin;\n\n async function call(\n method: 'GET' | 'POST' | 'PUT' | 'DELETE',\n path: string,\n body?: unknown,\n ): Promise<unknown> {\n let response: Response;\n try {\n response = await fetchFn(`${root}${path}`, {\n method,\n headers: {\n accept: 'application/json',\n origin,\n [CLIENT_HEADER]: UI_CLIENT,\n ...(body === undefined ? {} : { 'content-type': 'application/json' }),\n },\n body: body === undefined ? undefined : JSON.stringify(body),\n });\n } catch (cause) {\n error(502, `The bridge is not reachable: ${describe(cause)}`);\n }\n const answer: unknown = await response.json().catch(() => undefined);\n if (!response.ok) {\n const apiError = checkDto(AnyErrorBodySchema, answer);\n if (!apiError.ok) error(response.status, `The bridge answered ${response.status}`);\n const { message, details } = apiError.value.error;\n const field = details?.field;\n if (typeof field === 'string') error(response.status, { message, field });\n error(response.status, message);\n }\n return answer;\n }\n\n async function read<S extends DtoSchema>(\n method: 'GET' | 'POST' | 'PUT',\n path: string,\n schema: S,\n body?: unknown,\n ): Promise<DtoOf<S>> {\n const checked = checkDto(schema, await call(method, path, body));\n if (!checked.ok) {\n error(502, `Unexpected answer from the bridge at ${checked.field}: ${checked.message}`);\n }\n return checked.value;\n }\n\n return {\n status: () => read('GET', '/status', StatusSchema),\n sessions: () => read('GET', '/sessions', SessionListSchema),\n startSession: (request) => read('POST', '/sessions', StartSessionResponseSchema, request),\n endSession: async () => {\n await call('POST', '/sessions/end');\n },\n deleteSession: async (id) => {\n await call('DELETE', `/sessions?session=${id}`);\n },\n clearSpeech: async (session) => {\n await call('DELETE', `/speech?session=${session}`);\n },\n config: (view) => read('GET', `/config?view=${view}`, ConfigSchema),\n configOverrides: () => read('GET', '/config/overrides', ConfigOverridesSchema),\n updateConfig: (patch) => read('PUT', '/config', ConfigSchema, patch),\n pressKeys: async (keys) => {\n await call('POST', '/input/keys', { keys });\n },\n addMarker: (label) => read('POST', '/markers', SpeechEntrySchema, { label }),\n speech: (session, since, limit) => {\n const query = new URLSearchParams({ since: String(since), limit: String(limit) });\n if (session !== null) query.set('session', String(session));\n return read('GET', `/speech?${query}`, SpeechListSchema);\n },\n openSpeechStream: async (session, lastEventId, signal) => {\n const query = session === null ? '' : `?session=${session}`;\n let response: Response;\n try {\n response = await fetchFn(`${root}/speech/stream${query}`, {\n headers: {\n accept: 'text/event-stream',\n origin,\n [CLIENT_HEADER]: UI_CLIENT,\n ...(lastEventId === null ? {} : { 'last-event-id': lastEventId }),\n },\n signal,\n });\n } catch (cause) {\n error(502, `The bridge is not reachable: ${describe(cause)}`);\n }\n if (!response.ok || response.body === null) {\n // Unread, the body would hold the bridge connection until it is garbage collected, and\n // `EventSource` retries every few seconds while the bridge refuses.\n await response.body?.cancel().catch(() => undefined);\n error(\n response.status === 200 ? 502 : response.status,\n 'The speech stream is not available',\n );\n }\n return response;\n },\n };\n}\n\nfunction describe(cause: unknown): string {\n return cause instanceof Error ? cause.message : String(cause);\n}\n","import { SR_BRIDGE_API_URL } from '$app/env/private';\nimport { createBridgeApi, type BridgeApi } from './bridge-api.js';\n\n/** The bridge API of this deployment, at `SR_BRIDGE_API_URL` (`src/env.ts`). */\nexport function bridgeApiFromEnv(fetchFn: typeof fetch): BridgeApi {\n return createBridgeApi(SR_BRIDGE_API_URL, fetchFn);\n}\n","/** What the BFF logs through: the bridge's `Logger` port, as far as the UI uses it. */\nexport interface ServerLog {\n error(message: string): void;\n warn(message: string): void;\n}\n\n/**\n * Where the bridge puts its `[web-ui]` logger before it loads the UI (`UI_LOGGER_KEY` in\n * `packages/bridge/src/composition/ui.ts`; the bridge and the UI don't import each other).\n */\nconst BRIDGE_LOGGER_KEY = Symbol.for('screenreader-speech-capture.ui-logger');\n\nfunction isServerLog(value: unknown): value is ServerLog {\n return (\n typeof value === 'object' &&\n value !== null &&\n typeof (value as ServerLog).error === 'function' &&\n typeof (value as ServerLog).warn === 'function'\n );\n}\n\n/** `pnpm dev:ui` has no bridge in its process: the Vite dev server's console stands in. */\nconst consoleLog: ServerLog = {\n error: (message) => console.error(`[web-ui] ${message}`),\n warn: (message) => console.warn(`[web-ui] ${message}`),\n};\n\n/**\n * The bridge log inside the bridge, the console otherwise. Read per call, so it doesn't matter\n * whether this module loads before or after the bridge sets it.\n */\nexport function serverLog(): ServerLog {\n const bridge = (globalThis as Record<symbol, unknown>)[BRIDGE_LOGGER_KEY];\n return isServerLog(bridge) ? bridge : consoleLog;\n}\n","import type { Handle, HandleServerError } from '@sveltejs/kit/hooks';\nimport { bridgeApiFromEnv } from '#lib/server/bridge-from-env.js';\nimport { serverLog } from '#lib/server/log.js';\n\n/**\n * Set by the bridge (`LOCAL_HEADER` in `packages/bridge/src/composition/ui.ts`) on a request that\n * comes from the bridge's own machine, and removed from every other one. The UI can't import it:\n * the bridge and the UI don't depend on each other.\n */\nconst LOCAL_HEADER = 'x-sr-bridge-local';\n\nexport const handle: Handle = ({ event, resolve }) => {\n event.locals.local = event.request.headers.get(LOCAL_HEADER) === '1';\n // Built once per request and with its `fetch`, so routes and loads share one way to the bridge.\n event.locals.bridge = bridgeApiFromEnv(event.fetch);\n return resolve(event);\n};\n\n/**\n * An unexpected error (`kind: 'unknown'`: not one thrown with `error()`, not SvelteKit's own such\n * as a 404) is one line in the bridge log; the browser keeps SvelteKit's generic answer. The line\n * names the path but never the query, which can hold speech text that must stay off the console\n * (docs/usage/operations.md#speech-text-stays-off-the-console).\n */\nexport const handleError: HandleServerError = ({ kind, error, event }) => {\n if (kind !== 'unknown') return;\n const reason = error instanceof Error ? `${error.name}: ${error.message}` : String(error);\n serverLog().error(`${event.request.method} ${event.url.pathname}: ${reason}`);\n};\n"],"mappings":";;;;;AAOA,IAAa,aAAa;;ACL1B,IAAa,oBAAoBA,oBAAI;;;ACkErC,IAAM,YAAY;;;;;AAMlB,SAAgB,gBAAgB,SAAiB,SAA2B;CAC1E,MAAM,OAAO,QAAQ,QAAQ,QAAQ,EAAE,IAAI;CAK3C,MAAM,SAAS,IAAI,IAAI,IAAI,CAAC,CAAC;CAE7B,eAAe,KACb,QACA,MACA,MACkB;EAClB,IAAI;EACJ,IAAI;GACF,WAAW,MAAM,QAAQ,GAAG,OAAO,QAAQ;IACzC;IACA,SAAS;KACP,QAAQ;KACR;MACC,gBAAgB;KACjB,GAAI,SAAS,KAAA,IAAY,CAAC,IAAI,EAAE,gBAAgB,mBAAmB;IACrE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