sanoma 0.11.21 → 0.11.22

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 (417) hide show
  1. package/README.md +2 -0
  2. package/app/README.md +2 -2
  3. package/app/dist/api.d.ts +16 -2
  4. package/app/dist/api.js +1 -1
  5. package/app/dist/client/assets/ArrowDown.es-BOfBLlTP.js +1 -0
  6. package/app/dist/client/assets/CaretDown.es-D12mWb2j.js +1 -0
  7. package/app/dist/client/assets/CatchBoundary-Cb__yx-s.js +1 -0
  8. package/app/dist/client/assets/Copy.es-CvUujKw7.js +1 -0
  9. package/app/dist/client/assets/DialogTitle-Dz3loDe5.js +1 -0
  10. package/app/dist/client/assets/FloppyDisk.es-CDyDob8p.js +1 -0
  11. package/app/dist/client/assets/Globe.es-C1pgZCGM.js +1 -0
  12. package/app/dist/client/assets/MagnifyingGlass.es-CZ3i6pz0.js +1 -0
  13. package/app/dist/client/assets/Play.es-DGJ1CGhp.js +1 -0
  14. package/app/dist/client/assets/Plug.es-BPhGL8MK.js +1 -0
  15. package/app/dist/client/assets/Plus.es-i3Vaa2WW.js +1 -0
  16. package/app/dist/client/assets/Separator-Cu9cQDBN.js +1 -0
  17. package/app/dist/client/assets/X.es-B7rq0E_-.js +1 -0
  18. package/app/dist/client/assets/_id-C4bMZ73g.js +1 -0
  19. package/app/dist/client/assets/_id-CUaJYD_3.js +1 -0
  20. package/app/dist/client/assets/_id-DRetx-BJ.js +1 -0
  21. package/app/dist/client/assets/_id-mm7bTIIl.js +2 -0
  22. package/app/dist/client/assets/_id-tN6nFEpD.js +1 -0
  23. package/app/dist/client/assets/_name-BOi2qVWk.js +1 -0
  24. package/app/dist/client/assets/_name-CBI1waPs.js +4 -0
  25. package/app/dist/client/assets/_name-CrsiaFT6.js +1 -0
  26. package/app/dist/client/assets/_name-TzQfjXo8.js +1 -0
  27. package/app/dist/client/assets/_vendor-C3TGvx4w.js +1 -0
  28. package/app/dist/client/assets/_vendor-sHwAlFSF.js +1 -0
  29. package/app/dist/client/assets/app-chrome-_ahvxx73.js +5 -0
  30. package/app/dist/client/assets/app-scope-Bht7PIkQ.js +1 -0
  31. package/app/dist/client/assets/approval-BFFM_yEl.js +1 -0
  32. package/app/dist/client/assets/apps-CpdXjc1j.js +1 -0
  33. package/app/dist/client/assets/button-D5kdANef.js +1 -0
  34. package/app/dist/client/assets/change-glance-CdkbSGxZ.js +1 -0
  35. package/app/dist/client/assets/changes-C_K2tazO.js +1 -0
  36. package/app/dist/client/assets/changes-DFcdyDL_.js +1 -0
  37. package/app/dist/client/assets/chat-Djbdaxw8.js +14 -0
  38. package/app/dist/client/assets/chat-button-DNusaP5n.js +1 -0
  39. package/app/dist/client/assets/chat-prompt-z0XJPDtH.js +1 -0
  40. package/app/dist/client/assets/{code-BVYaiQEr.js → code-CT4-YDKq.js} +2 -2
  41. package/app/dist/client/assets/common-DHOhx6Zn.js +3 -0
  42. package/app/dist/client/assets/composite-9cNA7N0P.js +1 -0
  43. package/app/dist/client/assets/connect-DHUdrwwW.js +1 -0
  44. package/app/dist/client/assets/connections-fGNKJl3J.js +5 -0
  45. package/app/dist/client/assets/connectors-CuS1paNm.js +1 -0
  46. package/app/dist/client/assets/credentials-Cb7Lnfxk.js +1 -0
  47. package/app/dist/client/assets/css-BGIxQoYs.js +1 -0
  48. package/app/dist/client/assets/css-DgaLhXQH.js +1 -0
  49. package/app/dist/client/assets/data-DZ-ufRXn.js +1 -0
  50. package/app/dist/client/assets/decidable-OFQBEcco.js +1 -0
  51. package/app/dist/client/assets/declaration-form-D2ZMEVC6.js +1 -0
  52. package/app/dist/client/assets/dialog-B5pmfCdJ.js +1 -0
  53. package/app/dist/client/assets/diff-woXpYk--.js +1 -0
  54. package/app/dist/client/assets/engine-CBuzy-Ik.js +1 -0
  55. package/app/dist/client/assets/existing-BaPrTDs8.js +1 -0
  56. package/app/dist/client/assets/fence-CMhOJv7H.js +157 -0
  57. package/app/dist/client/assets/github-dark-C-LZuMrd.js +1 -0
  58. package/app/dist/client/assets/github-light-EUqPIrTm.js +1 -0
  59. package/app/dist/client/assets/graph-B5TYhcqD.js +7 -0
  60. package/app/dist/client/assets/grid-diff-wo26YSgM.js +1 -0
  61. package/app/dist/client/assets/held-card-HrJ6QpRY.js +1 -0
  62. package/app/dist/client/assets/highlighted-body-JLMTFACH-CjeaSnZq.js +1 -0
  63. package/app/dist/client/assets/hosting-Beoi95m6.js +1 -0
  64. package/app/dist/client/assets/html-BHZv6uqE.js +1 -0
  65. package/app/dist/client/assets/import-8WDFPfe6.js +1 -0
  66. package/app/dist/client/assets/inbox-B9hsZPsC.js +1 -0
  67. package/app/dist/client/assets/inbox-DM2npRZI.js +1 -0
  68. package/app/dist/client/assets/index-CHKfukjt.js +10 -0
  69. package/app/dist/client/assets/item-B4QRpXse.js +1 -0
  70. package/app/dist/client/assets/javascript-BzbQS41l.js +1 -0
  71. package/app/dist/client/assets/javascript-CpIGwZ_Y.js +1 -0
  72. package/app/dist/client/assets/json-qhed-kSA.js +1 -0
  73. package/app/dist/client/assets/jsx-Bz0zcwM4.js +1 -0
  74. package/app/dist/client/assets/kit-n8CE0xEs.js +1 -0
  75. package/app/dist/client/assets/lazyRouteComponent-DezoGNoN.js +1 -0
  76. package/app/dist/client/assets/markdown-BYOwaDjH.js +1 -0
  77. package/app/dist/client/assets/markdown-DS_nKu0s.js +164 -0
  78. package/app/dist/client/assets/mermaid-WFAXDIZX-DQBKIf0O.js +1 -0
  79. package/app/dist/client/assets/motion-D6e1hqz4.js +1 -0
  80. package/app/dist/client/assets/people-BiiQfYJ8.js +1 -0
  81. package/app/dist/client/assets/permissions-BmKxEfBi.js +2 -0
  82. package/app/dist/client/assets/permissions-grid-B755bq5J.js +1 -0
  83. package/app/dist/client/assets/preload-helper-BLdHbfdN.js +1 -0
  84. package/app/dist/client/assets/python-gzcpVVnB.js +1 -0
  85. package/app/dist/client/assets/queries-DGlVu9wp.js +57 -0
  86. package/app/dist/client/assets/react-dom-D6fTz1bt.js +1 -0
  87. package/app/dist/client/assets/route-BSe5L2p4.js +1 -0
  88. package/app/dist/client/assets/route-Ds87ixtB.js +1 -0
  89. package/app/dist/client/assets/runs-table-DMiD4HeY.js +1 -0
  90. package/app/dist/client/assets/scenario-DrgmfuFx.js +1 -0
  91. package/app/dist/client/assets/scenario-graph-Blv2e1PV.js +1 -0
  92. package/app/dist/client/assets/separator-Bdtc7rou.js +1 -0
  93. package/app/dist/client/assets/{sheet-BYL9XU5s.js → sheet-BKUFUA1l.js} +1 -1
  94. package/app/dist/client/assets/shellscript-CLZ0U2zV.js +1 -0
  95. package/app/dist/client/assets/site-icon-1Mcc1UIb.js +1 -0
  96. package/app/dist/client/assets/sites.index-K4mrFsLr.js +1 -0
  97. package/app/dist/client/assets/spinner-XaRXIj9W.js +1 -0
  98. package/app/dist/client/assets/sql-CEbI0hMM.js +1 -0
  99. package/app/dist/client/assets/start-form-CJ6VmNPY.js +1 -0
  100. package/app/dist/client/assets/store-BT988jIX.js +1 -0
  101. package/app/dist/client/assets/style-CTcG_5y0.css +2 -0
  102. package/app/dist/client/assets/table-B81tv0LG.js +1 -0
  103. package/app/dist/client/assets/textarea-CRpYU-qx.js +1 -0
  104. package/app/dist/client/assets/tsx-udAQXfEw.js +1 -0
  105. package/app/dist/client/assets/typescript-bsJCZSQ-.js +1 -0
  106. package/app/dist/client/assets/{useLoaderData-BQd5yMlA.js → useLoaderData-BsksXf-p.js} +1 -1
  107. package/app/dist/client/assets/useOpenInteractionType-UhakpAXY.js +1 -0
  108. package/app/dist/client/assets/useRegisterFieldControl-DIkKUJkh.js +1 -0
  109. package/app/dist/client/assets/useValueChanged-DBqn456b.js +1 -0
  110. package/app/dist/client/assets/utils-BRvE9-Fo.js +1 -0
  111. package/app/dist/client/assets/who-are-you-DUoVqvfP.js +1 -0
  112. package/app/dist/client/assets/workflow-lQtyyxKx.js +1 -0
  113. package/app/dist/client/assets/workflow-view-hk_RU9WF.js +1 -0
  114. package/app/dist/client/assets/workflows-DFB7lzzN.js +1 -0
  115. package/app/dist/client/assets/yaml-rwi0_p6S.js +1 -0
  116. package/app/dist/index.d.ts +4 -4
  117. package/app/dist/lib/chat.d.ts +64 -19
  118. package/app/dist/lib/chat.js +54 -18
  119. package/app/dist/lib/chat.js.map +1 -1
  120. package/app/dist/server/assets/{_id-wuJIq2ZZ.js → _id--MWJXj9R.js} +2 -2
  121. package/app/dist/server/assets/{_id-ce1EGp7Y.js → _id-BEGe86NW.js} +2 -2
  122. package/app/dist/server/assets/{_id-BViXAagq.js → _id-CbO7Ok0w.js} +12 -10
  123. package/app/dist/server/assets/{_id-Dt9tTylX.js → _id-DwdpIYKk.js} +2 -2
  124. package/app/dist/server/assets/{_id-wB8khGTz.js → _id-fK_nPFHK.js} +6 -6
  125. package/app/dist/server/assets/{_name-D_-MhjNf.js → _name-BzD9TxVC.js} +17 -17
  126. package/app/dist/server/assets/{_name-BqFwnyf7.js → _name-ClgMsl5m.js} +2 -2
  127. package/app/dist/server/assets/{_name-BGagGBjX.js → _name-DdFVsjcj.js} +7 -7
  128. package/app/dist/server/assets/{_name-DntbHE-b.js → _name-Dyh4G9Oy.js} +10 -11
  129. package/app/dist/server/assets/{_tanstack-start-manifest_v-BljuBM-G.js → _tanstack-start-manifest_v-DUtnBg7y.js} +101 -91
  130. package/app/dist/server/assets/{_vendor-CNB03LWX.js → _vendor-DyeUY8kH.js} +8 -8
  131. package/app/dist/server/assets/{_vendor-CcEviOki.js → _vendor-W3KKSusM.js} +2 -2
  132. package/app/dist/server/assets/{actor-D6iA0pDg.js → actor-BlaOwG6A.js} +1 -1
  133. package/app/dist/server/assets/app-chrome-BJlxsc9y.js +2116 -0
  134. package/app/dist/server/assets/{app-scope-CXIgOFmi.js → app-scope-ASuhE3xI.js} +2 -2
  135. package/app/dist/server/assets/{apply-plan-ybBda6vQ.js → apply-plan-Djw1tNPD.js} +8 -7
  136. package/app/dist/server/assets/{approval-Su315ikC.js → approval-BjTnfr1U.js} +15 -13
  137. package/app/dist/server/assets/{apps-xwQAehch.js → apps-C28F9Y5C.js} +7 -7
  138. package/app/dist/server/assets/button-Xwx3rpQ0.js +43 -0
  139. package/app/dist/server/assets/change-glance-Bc4htVPy.js +54 -0
  140. package/app/dist/server/assets/{change-glance-CpArIbGS.js → changes-B5P8BJSf.js} +2 -54
  141. package/app/dist/server/assets/{changes-Bc_OiDBD.js → changes-tbeMKxjY.js} +8 -7
  142. package/app/dist/server/assets/{chat-DMN_hoKm.js → chat-BNMeLc9V.js} +108 -30
  143. package/app/dist/server/assets/{chat-button-LtA80MoR.js → chat-button-SluTWK8R.js} +2 -2
  144. package/app/dist/server/assets/{code-COyt8L-n.js → code-hVpCkmAZ.js} +1 -1
  145. package/app/dist/server/assets/{common-CWHLj7KV.js → common-DpZcJvCy.js} +26 -24
  146. package/app/dist/server/assets/{connect-BpPiu5s6.js → connect-Cljunav2.js} +11 -10
  147. package/app/dist/server/assets/{connections-DBgb1bvX.js → connections-Cfz5LMy5.js} +12 -11
  148. package/app/dist/server/assets/{connectors-5a5_SlHO.js → connectors-tt9BF9L1.js} +8 -8
  149. package/app/dist/server/assets/{credentials-ud_Y68hx.js → credentials-CYUFAVU8.js} +10 -9
  150. package/app/dist/server/assets/{data-aEdhwcqy.js → data-D91ZZ5St.js} +7 -7
  151. package/app/dist/server/assets/{declaration-form-Dfg1yNuY.js → declaration-form-BzISD6gw.js} +7 -6
  152. package/app/dist/server/assets/{dialog-BGjiw3Dx.js → dialog-T0bzlKzs.js} +2 -2
  153. package/app/dist/server/assets/{dropdown-menu-DAC3LWas.js → dropdown-menu-RGvPORm4.js} +1 -1
  154. package/app/dist/server/assets/{existing-B4d4NrC8.js → existing-BZym0xE2.js} +8 -7
  155. package/app/dist/server/assets/fence-Br7MPP41.js +130 -0
  156. package/app/dist/server/assets/{field-C0Xx_90s.js → field-DFpkT1id.js} +1 -1
  157. package/app/dist/server/assets/{functions-BvFYzabD.js → functions-sf07C1qn.js} +2 -2
  158. package/app/dist/server/assets/{graph-qYOdoz2s.js → graph-C1Cl7owl.js} +5 -5
  159. package/app/dist/server/assets/{grid-diff-jTvp-8wS.js → grid-diff-D5bQDKl2.js} +1 -1
  160. package/app/dist/server/assets/held-card-CDewk4rs.js +75 -0
  161. package/app/dist/server/assets/{hosting-bbn9UvDc.js → hosting-O-l2L0ec.js} +16 -14
  162. package/app/dist/server/assets/{import-DIwvzHb6.js → import-qvpEIYFx.js} +8 -8
  163. package/app/dist/server/assets/{inbox-D6R6sWBB.js → inbox-BcJxCIPm.js} +8 -8
  164. package/app/dist/server/assets/{inbox-Dj-5FleF.js → inbox-BvpSeC3M.js} +2 -2
  165. package/app/dist/server/assets/{input-D63gF3G2.js → input-CF-vX8Xp.js} +1 -1
  166. package/app/dist/server/assets/{item-BDSXoEr_.js → item-LBDNja5f.js} +1 -1
  167. package/app/dist/server/assets/{kit-D6EulwBe.js → kit-DlT_THim.js} +2 -2
  168. package/app/dist/server/assets/markdown-BExKjghi.js +116 -0
  169. package/app/dist/server/assets/{middleware-B8JRLyxx.js → middleware-B6RPW0fH.js} +1 -1
  170. package/app/dist/server/assets/{people-CkU_AxrV.js → people-C8VXQrKg.js} +13 -12
  171. package/app/dist/server/assets/{permissions-BfMcQqQb.js → permissions-COAiOoCB.js} +9 -8
  172. package/app/dist/server/assets/{permissions-grid-DWP9FAAS.js → permissions-grid-CcYUiqhD.js} +4 -4
  173. package/app/dist/server/assets/{button-f9Lc8qLl.js → queries-DJcZ4mzA.js} +3 -45
  174. package/app/dist/server/assets/{route-BTT7nMJq.js → route-DOqitvxL.js} +2 -2
  175. package/app/dist/server/assets/{route-CF_8jQYY.js → route-aa9MThMA.js} +2 -2
  176. package/app/dist/server/assets/{router-BvYtxrVN.js → router-Co6gRNI1.js} +80 -46
  177. package/app/dist/server/assets/{runs-table-BBudn12Y.js → runs-table-BtGm2KOO.js} +6 -6
  178. package/app/dist/server/assets/{scenario-BXGTSTiP.js → scenario-DidUafqw.js} +5 -5
  179. package/app/dist/server/assets/{separator-8MZ7vR3f.js → separator-Cf98V8ie.js} +1 -1
  180. package/app/dist/server/assets/{sheet-5Cyp-4UW.js → sheet-DTOG7OHQ.js} +2 -2
  181. package/app/dist/server/assets/{sites.index-1l0BtgVf.js → sites.index-4TK8c0QC.js} +4 -4
  182. package/app/dist/server/assets/{spinner-C1ZW08lp.js → spinner-016IPVi-.js} +1 -1
  183. package/app/dist/server/assets/{start-CSU4irVK.js → start-VfVsXenI.js} +2 -2
  184. package/app/dist/server/assets/{start-form-DI60UOrc.js → start-form-CUeEdeP7.js} +10 -9
  185. package/app/dist/server/assets/{table-DtPk_h_5.js → table-y-dGlLx6.js} +1 -1
  186. package/app/dist/server/assets/{textarea-f0Ip5ed1.js → textarea-B02joDnr.js} +1 -1
  187. package/app/dist/server/assets/utils-CHesvfjo.js +138 -0
  188. package/app/dist/server/assets/{who-are-you-ZGyMnpVi.js → who-are-you-DW5qmIzp.js} +8 -7
  189. package/app/dist/server/assets/{workflow-Z99QWO42.js → workflow-BRu7ljgU.js} +5 -5
  190. package/app/dist/server/assets/{workflow-view-C8X8U11S.js → workflow-view-yF48p1lu.js} +14 -13
  191. package/app/dist/server/assets/{workflows-C0kJoGf1.js → workflows-DL-TJFLt.js} +13 -14
  192. package/app/dist/server/chat.d.ts +6 -1
  193. package/app/dist/server/chat.js +39 -20
  194. package/app/dist/server/chat.js.map +1 -1
  195. package/app/dist/server/server.js +48 -48
  196. package/app/dist/steps/agent/acp.d.ts +3 -97
  197. package/app/dist/steps/agent/acp.js +19 -49
  198. package/app/dist/steps/agent/acp.js.map +1 -1
  199. package/app/dist/steps/agent/checkout.d.ts +18 -1
  200. package/app/dist/steps/agent/checkout.js +17 -0
  201. package/app/dist/steps/agent/checkout.js.map +1 -1
  202. package/app/dist/steps/agent/harness.d.ts +2 -4
  203. package/app/dist/steps/agent/harness.js +45 -61
  204. package/app/dist/steps/agent/harness.js.map +1 -1
  205. package/app/dist/steps/agent/prompt.d.ts +1 -1
  206. package/app/dist/steps/agent/prompt.js +35 -14
  207. package/app/dist/steps/agent/prompt.js.map +1 -1
  208. package/app/dist/steps/agent/transcript.d.ts +10 -1
  209. package/app/dist/steps/agent/transcript.js +75 -2
  210. package/app/dist/steps/agent/transcript.js.map +1 -1
  211. package/app/dist/steps/agent/turn.d.ts +4 -6
  212. package/app/dist/steps/agent/turn.js +14 -16
  213. package/app/dist/steps/agent/turn.js.map +1 -1
  214. package/app/dist/stylesheet.json +1 -1
  215. package/app/src/api.ts +1 -1
  216. package/app/src/components/app-chrome.tsx +28 -13
  217. package/app/src/components/common.tsx +1 -24
  218. package/app/src/components/logo.tsx +25 -0
  219. package/app/src/components/shell/chat-parts.tsx +185 -126
  220. package/app/src/components/shell/chat-prompt.ts +6 -2
  221. package/app/src/components/shell/chat.tsx +154 -220
  222. package/app/src/components/shell/composer.tsx +140 -0
  223. package/app/src/components/shell/connect-agent.tsx +157 -0
  224. package/app/src/components/shell/engine-mark.tsx +9 -0
  225. package/app/src/components/shell/fence.tsx +25 -0
  226. package/app/src/components/shell/held-card.tsx +58 -0
  227. package/app/src/components/shell/markdown.tsx +152 -0
  228. package/app/src/components/shell/nav-user.tsx +11 -1
  229. package/app/src/components/shell/prefs.ts +9 -1
  230. package/app/src/components/shell/thread.tsx +174 -0
  231. package/app/src/components/ui/bubble.tsx +117 -0
  232. package/app/src/components/ui/code-block.tsx +235 -0
  233. package/app/src/components/ui/input-group.tsx +136 -0
  234. package/app/src/components/ui/marker.tsx +67 -0
  235. package/app/src/components/ui/message-scroller.tsx +117 -0
  236. package/app/src/components/ui/message.tsx +74 -0
  237. package/app/src/components/ui/trace.tsx +133 -0
  238. package/app/src/hooks/use-highlighted-code.ts +72 -0
  239. package/app/src/index.ts +4 -4
  240. package/app/src/lib/chat.ts +110 -22
  241. package/app/src/lib/cn-tables.ts +23 -23
  242. package/app/src/lib/highlighter.tsx +114 -0
  243. package/app/src/routes/__root.tsx +7 -4
  244. package/app/src/routes/connectors/index.tsx +1 -1
  245. package/app/src/routes/hosting/index.tsx +6 -9
  246. package/app/src/server/chat.ts +41 -19
  247. package/app/src/steps/agent/acp.ts +10 -80
  248. package/app/src/steps/agent/checkout.ts +30 -0
  249. package/app/src/steps/agent/harness.ts +53 -78
  250. package/app/src/steps/agent/prompt.ts +42 -14
  251. package/app/src/steps/agent/transcript.ts +90 -3
  252. package/app/src/steps/agent/turn.ts +18 -16
  253. package/app/src/worker/app.ts +6 -5
  254. package/dist/cli.js +18 -6
  255. package/dist/cli.js.map +1 -1
  256. package/dist/serve.js +1 -1
  257. package/dist/serve.js.map +1 -1
  258. package/dist/worker-port.d.ts +16 -2
  259. package/dist/worker-port.js +44 -5
  260. package/dist/worker-port.js.map +1 -1
  261. package/package.json +7 -3
  262. package/testing/README.md +3 -3
  263. package/testing/dist/build.d.ts +3 -3
  264. package/testing/dist/build.js +4 -4
  265. package/testing/dist/build.js.map +1 -1
  266. package/testing/dist/host.d.ts +34 -21
  267. package/testing/dist/host.js +135 -75
  268. package/testing/dist/host.js.map +1 -1
  269. package/workflows/CLOUD-IDENTITY.md +15 -20
  270. package/workflows/README.md +9 -7
  271. package/workflows/dist/client.d.ts +5 -3
  272. package/workflows/dist/client.js +4 -3
  273. package/workflows/dist/client.js.map +1 -1
  274. package/workflows/dist/cloud-identity.d.ts +5 -2
  275. package/workflows/dist/cloud-identity.js +7 -4
  276. package/workflows/dist/cloud-identity.js.map +1 -1
  277. package/workflows/dist/config.d.ts +7 -1
  278. package/workflows/dist/config.js +24 -1
  279. package/workflows/dist/config.js.map +1 -1
  280. package/workflows/dist/db/company.d.ts +1 -1
  281. package/workflows/dist/db/company.js +1 -1
  282. package/workflows/dist/db/identity.d.ts +2 -2
  283. package/workflows/dist/db/identity.js +2 -2
  284. package/workflows/dist/db/identity.js.map +1 -1
  285. package/workflows/dist/deadlines.d.ts +7 -2
  286. package/workflows/dist/deadlines.js +14 -5
  287. package/workflows/dist/deadlines.js.map +1 -1
  288. package/workflows/dist/describe.js +15 -3
  289. package/workflows/dist/describe.js.map +1 -1
  290. package/workflows/dist/description.d.ts +37 -2
  291. package/workflows/dist/description.js +22 -1
  292. package/workflows/dist/description.js.map +1 -1
  293. package/workflows/dist/host.d.ts +7 -6
  294. package/workflows/dist/host.js +1 -1
  295. package/workflows/dist/host.js.map +1 -1
  296. package/workflows/dist/identity-provisioning.d.ts +2 -5
  297. package/workflows/dist/identity-provisioning.js +16 -20
  298. package/workflows/dist/identity-provisioning.js.map +1 -1
  299. package/workflows/dist/index.d.ts +3 -3
  300. package/workflows/dist/index.js +1 -1
  301. package/workflows/dist/index.js.map +1 -1
  302. package/workflows/dist/op.d.ts +92 -1
  303. package/workflows/dist/op.js +19 -6
  304. package/workflows/dist/op.js.map +1 -1
  305. package/workflows/dist/renewal.d.ts +1 -1
  306. package/workflows/dist/renewal.js +1 -1
  307. package/workflows/dist/runtime-ops.d.ts +3 -4
  308. package/workflows/dist/runtime-ops.js +4 -4
  309. package/workflows/dist/runtime-ops.js.map +1 -1
  310. package/workflows/dist/schedules.d.ts +1 -1
  311. package/workflows/dist/schedules.js +1 -1
  312. package/workflows/dist/supervisor.d.ts +21 -18
  313. package/workflows/dist/supervisor.js +20 -22
  314. package/workflows/dist/supervisor.js.map +1 -1
  315. package/workflows/dist/vendor-info.d.ts +12 -3
  316. package/workflows/dist/vendor-info.js +20 -4
  317. package/workflows/dist/vendor-info.js.map +1 -1
  318. package/workflows/dist/worker.d.ts +11 -1
  319. package/workflows/dist/worker.js +9 -3
  320. package/workflows/dist/worker.js.map +1 -1
  321. package/workflows/src/client.ts +9 -6
  322. package/workflows/src/cloud-identity.ts +7 -4
  323. package/workflows/src/config.ts +36 -1
  324. package/workflows/src/db/company.ts +1 -1
  325. package/workflows/src/db/identity.ts +2 -2
  326. package/workflows/src/deadlines.ts +18 -8
  327. package/workflows/src/describe.ts +16 -3
  328. package/workflows/src/description.ts +25 -1
  329. package/workflows/src/host.ts +7 -6
  330. package/workflows/src/identity-provisioning.ts +19 -30
  331. package/workflows/src/index.ts +7 -1
  332. package/workflows/src/op.ts +104 -10
  333. package/workflows/src/renewal.ts +1 -1
  334. package/workflows/src/runtime-ops.ts +5 -5
  335. package/workflows/src/schedules.ts +1 -1
  336. package/workflows/src/supervisor.ts +40 -38
  337. package/workflows/src/vendor-info.ts +20 -5
  338. package/workflows/src/worker.ts +22 -5
  339. package/app/dist/client/assets/ArrowUp.es-DOgvoS0P.js +0 -1
  340. package/app/dist/client/assets/Copy.es-B0D5SwiQ.js +0 -1
  341. package/app/dist/client/assets/DialogTitle-BgjYK22C.js +0 -1
  342. package/app/dist/client/assets/FloppyDisk.es-DnuNe_a8.js +0 -1
  343. package/app/dist/client/assets/Globe.es-B6x2e4-a.js +0 -1
  344. package/app/dist/client/assets/MagnifyingGlass.es-DoNoHEhT.js +0 -1
  345. package/app/dist/client/assets/Play.es-BwXalGBh.js +0 -1
  346. package/app/dist/client/assets/Plug.es-CaZsN5P-.js +0 -1
  347. package/app/dist/client/assets/Plus.es-w9VPpTJB.js +0 -1
  348. package/app/dist/client/assets/Separator-BAhKFgSd.js +0 -1
  349. package/app/dist/client/assets/X.es-DKMYClf-.js +0 -1
  350. package/app/dist/client/assets/_id-BSRAaWtO.js +0 -1
  351. package/app/dist/client/assets/_id-BjDP-cPH.js +0 -1
  352. package/app/dist/client/assets/_id-BudM76zX.js +0 -1
  353. package/app/dist/client/assets/_id-C37U5bBa.js +0 -1
  354. package/app/dist/client/assets/_id-lmg24JVh.js +0 -2
  355. package/app/dist/client/assets/_name-CylqFo_t.js +0 -1
  356. package/app/dist/client/assets/_name-D8Gl8iwy.js +0 -4
  357. package/app/dist/client/assets/_name-DdPCU8pt.js +0 -1
  358. package/app/dist/client/assets/_name-TteWQXe0.js +0 -1
  359. package/app/dist/client/assets/_vendor-BLxW83yk.js +0 -1
  360. package/app/dist/client/assets/_vendor-Bq3uZU4-.js +0 -1
  361. package/app/dist/client/assets/app-chrome-H8uZ4dHI.js +0 -16
  362. package/app/dist/client/assets/app-scope-BeUW_8Qh.js +0 -1
  363. package/app/dist/client/assets/approval-DpgmTc63.js +0 -1
  364. package/app/dist/client/assets/apps-CoWzNm8M.js +0 -1
  365. package/app/dist/client/assets/change-glance-DbYcBT7H.js +0 -1
  366. package/app/dist/client/assets/changes-DIJvP7wQ.js +0 -1
  367. package/app/dist/client/assets/chat-button-BgpOfYh1.js +0 -1
  368. package/app/dist/client/assets/chat-prompt-hiawXcK0.js +0 -1
  369. package/app/dist/client/assets/common-Dw2i6XKZ.js +0 -3
  370. package/app/dist/client/assets/composite-D9GNDzFj.js +0 -1
  371. package/app/dist/client/assets/connect-CIq2KJTz.js +0 -1
  372. package/app/dist/client/assets/connections-iqd2XbWQ.js +0 -5
  373. package/app/dist/client/assets/connectors-rI8_D1n1.js +0 -1
  374. package/app/dist/client/assets/credentials-26vu6Fv5.js +0 -1
  375. package/app/dist/client/assets/data-sDMlKaLV.js +0 -1
  376. package/app/dist/client/assets/decidable-zcYI7bY8.js +0 -1
  377. package/app/dist/client/assets/declaration-form-BtSVvxhq.js +0 -1
  378. package/app/dist/client/assets/dialog-DskpUgkl.js +0 -1
  379. package/app/dist/client/assets/existing-BD3VgJ_8.js +0 -1
  380. package/app/dist/client/assets/graph-Prxl3c55.js +0 -7
  381. package/app/dist/client/assets/grid-diff-SMsvea6t.js +0 -1
  382. package/app/dist/client/assets/hosting-BBHUppH-.js +0 -1
  383. package/app/dist/client/assets/import-B92fd4Tl.js +0 -1
  384. package/app/dist/client/assets/inbox-57oGZtxE.js +0 -1
  385. package/app/dist/client/assets/inbox-B2AMNtk5.js +0 -1
  386. package/app/dist/client/assets/index-Bn3XeKy8.js +0 -10
  387. package/app/dist/client/assets/kit-BsK6VZTQ.js +0 -1
  388. package/app/dist/client/assets/lazyRouteComponent-Uri98HNq.js +0 -1
  389. package/app/dist/client/assets/motion-C8lNeYvK.js +0 -1
  390. package/app/dist/client/assets/people-ISOMYCTu.js +0 -1
  391. package/app/dist/client/assets/permissions-Cenat84K.js +0 -2
  392. package/app/dist/client/assets/permissions-grid-B2GtGwzv.js +0 -1
  393. package/app/dist/client/assets/route-BP1XwaTB.js +0 -1
  394. package/app/dist/client/assets/route-KVU6QgwJ.js +0 -1
  395. package/app/dist/client/assets/runs-table-35lNzKLn.js +0 -1
  396. package/app/dist/client/assets/scenario-DSwsavxS.js +0 -1
  397. package/app/dist/client/assets/scenario-graph-CAzWOtqV.js +0 -1
  398. package/app/dist/client/assets/separator-BlwkzEY0.js +0 -1
  399. package/app/dist/client/assets/site-icon-DZvOfBvU.js +0 -1
  400. package/app/dist/client/assets/sites.index-CcNo6N8u.js +0 -1
  401. package/app/dist/client/assets/spinner-BGy6LWIW.js +0 -1
  402. package/app/dist/client/assets/start-form-Bgo9I63s.js +0 -1
  403. package/app/dist/client/assets/store-BGu0d2Ld.js +0 -57
  404. package/app/dist/client/assets/style-CCDLLPgG.css +0 -2
  405. package/app/dist/client/assets/table-DjbI5VTn.js +0 -1
  406. package/app/dist/client/assets/textarea-DXO0eUdp.js +0 -1
  407. package/app/dist/client/assets/useOpenInteractionType-Bin8RjM5.js +0 -1
  408. package/app/dist/client/assets/useRegisterFieldControl-CQPTOU7Z.js +0 -1
  409. package/app/dist/client/assets/useValueChanged-DMkuvFZG.js +0 -1
  410. package/app/dist/client/assets/utils-CMsCvwYQ.js +0 -1
  411. package/app/dist/client/assets/who-are-you-Bt1WI3Cz.js +0 -1
  412. package/app/dist/client/assets/workflow-BJpO61A-.js +0 -1
  413. package/app/dist/client/assets/workflow-view-DP-UlRiH.js +0 -1
  414. package/app/dist/client/assets/workflows-BLCBgxbx.js +0 -1
  415. package/app/dist/server/assets/app-chrome-BYS81Vnx.js +0 -1410
  416. package/app/dist/server/assets/native-select-DLa-He0n.js +0 -37
  417. package/app/dist/server/assets/utils-wksS9pYh.js +0 -138
@@ -1,3 +0,0 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/graph-Prxl3c55.js","assets/utils-CMsCvwYQ.js","assets/store-BGu0d2Ld.js","assets/kit-BsK6VZTQ.js","assets/separator-BlwkzEY0.js","assets/Separator-BAhKFgSd.js","assets/composite-D9GNDzFj.js","assets/useRegisterFieldControl-CQPTOU7Z.js","assets/useValueChanged-DMkuvFZG.js","assets/Plus.es-w9VPpTJB.js","assets/motion-C8lNeYvK.js","assets/graph-BBLU_iSl.css","assets/code-BVYaiQEr.js","assets/lines-DuFrbGkQ.js"])))=>i.map(i=>d[i]);
2
- import{a as e,c as t,i as n,n as r,t as i}from"./utils-CMsCvwYQ.js";import{$i as a,Ao as o,Bn as s,Bs as c,Ci as l,Cs as u,Di as d,Ds as f,Er as p,Es as m,Fo as h,Fr as g,Fs as _,Gn as v,Ir as y,Ji as b,Kr as x,Kt as S,Ls as C,Mr as w,Ms as T,Ns as E,Oi as D,Or as O,Os as k,Pr as A,Ps as j,Qi as M,Qr as ee,Ri as N,Rs as P,Si as F,Ti as I,Tr as te,Ts as ne,Us as L,Vn as re,Vr as ie,Vs as ae,Wn as oe,Y as se,Yi as ce,Zr as le,_r as ue,_s as de,ai as fe,ao as pe,bi as me,br as he,bs as ge,ci as _e,ds as ve,gi as ye,gs as be,hi as xe,hs as Se,is as Ce,ja as we,jn as Te,jr as Ee,js as De,ki as Oe,kr as ke,ks as Ae,ls as R,mi as je,ms as Me,mt as Ne,na as Pe,oi as Fe,os as z,pi as Ie,rt as Le,ui as Re,vs as ze,wi as Be,ws as Ve,xo as He,xs as Ue,yi as We,yr as Ge,ys as Ke,zn as qe,zs as Je}from"./store-BGu0d2Ld.js";import{B as Ye,J as Xe,M as Ze,P as Qe,Q as $e,R as et,V as tt,X as nt,Z as rt,c as it,et as at,f as ot,h as st,it as ct,l as lt,m as ut,q as dt,rt as ft,s as pt,t as mt,tt as ht,z as gt}from"./kit-BsK6VZTQ.js";import{_ as _t,a as vt,d as yt,f as bt,g as xt,h as St,i as Ct,m as wt,n as Tt,p as Et,r as Dt,s as Ot,t as kt,u as At,y as jt}from"./composite-D9GNDzFj.js";function Mt(e){return e.replaceAll(`\0`,`/`).replaceAll(`�`,`/`).replace(/~([~0r])/g,(e,t)=>t===`0`?`\0`:t===`r`?`�`:t)}function Nt(e){let t=new Map,n,r;return{get(e){let n=t.get(e);if(n)return n.visited=!0,n.value},set(i,a){let o=t.get(i);if(o){o.value=a;return}if(t.size>=e){let e=n?.next().value;for(;!e||e.visited;)e?e.visited=!1:n=t.values(),e=n.next().value;e===r&&(n=void 0),t.delete(e.key)}let s={key:i,value:a,visited:!1};r=s,t.set(i,s)},clear(){t.clear(),n=void 0,r=void 0}}}var B=4,Pt=5;function Ft(e){let t=e.names;if(t)return t;let n=[];for(let t of e)typeof t!=`string`&&n.push(t[1]);return e.names=n}function It(e,t,n){let r=e.substring(t,n);if(r.charCodeAt(0)===36)return r.length===1?[2,`_splat`,``,void 0]:[1,r.substring(1),``,``];let i=r.indexOf(`{`);if(i>=0){let a=r.indexOf(`}`,i),o=r.charCodeAt(i+1)===45,s=i+(o?3:2);if(a>=0&&r.charCodeAt(s-1)===36&&(!o||s<a)){let c=r.substring(s,a);return[o?3:c?1:2,c||`_splat`,r.substring(0,i),e.substring(t+a+1,c?n:e.length)]}}return r}function Lt(e,t,n,r,i,a){let o=n,s=t.fullPath??t.from,c=t.options,l=s.length,u=s.endsWith(`/`)?l-1:l,d=c?.caseSensitive??e,f=c?.params?.parse??c?.parseParams,p,m=a?n-1:0;if(!r||s.includes(`$`)){p=a?.slice()??[];let e=C(p);e&&typeof e!=`string`&&e[0]===2&&(p[p.length-1]=[e[0],e[1],e[2],e[3]===void 0?void 0:e[3]+s.substring(n-(s[n-2]===`/`?2:1),u)],m=l)}for(;o<l;){let e=o,t=s.indexOf(`/`,e),n=t===-1?l:t,a=It(s,e,n);o=n+1;let c;if(typeof a==`string`){if(!r)continue;let e=a,t;d?t=r.static??=new Map:(e=a.toLowerCase(),t=r.staticInsensitive??=new Map);let n=t.get(e);if(n)c=n;else{let n=V(r);c=n,t.set(e,n)}}else{let t=a[0],h=a[2],g=a[3]??``;if(t===2&&(n=l,o=n+1),p&&m<n&&(m<e-1&&p.push(s.substring(m,e-1)),a[2]=`/`+h,t===2&&a[3]!==void 0&&u<l&&(a[3]=g.slice(0,-1)),p.push(a),m=n),!r)continue;let _=d&&!!(h||g);d||(h=h.toLowerCase(),g=g.toLowerCase());let v=t===1?r.dynamic??=[]:t===3?r.optional??=[]:r.wildcard??=[],y=t!==2&&!f&&v.find(e=>!e.parse&&e.caseSensitive===_&&e.prefix===h&&e.suffix===g);if(y)c=y;else{let e=V(r,t,_,h,g);c=e,v.push(e),v.length===2&&i?.push(v)}}r=c}p&&m<u&&p.push(s.substring(m,u));let h=p?.slice();if(!r)return h;if(f&&t.children&&!t.isRoot&&t.id&&t.id.charCodeAt(t.id.lastIndexOf(`/`)+1)===95){let e=V(r,Pt);(r.pathless??=[]).push(e),r=e}let g=(t.path||!t.children)&&!t.isRoot;if(g&&u<l){let e=V(r,B);r.index=e,r=e}return r.parse=f??null,r.priority=c?.params?.priority??0,r.route||(r.data=h,g&&(r.route=t)),[r,o,h]}function Rt(e,t){if(e.parse&&!t.parse)return-1;if(!e.parse&&t.parse)return 1;if(e.parse&&t.parse&&(e.priority||t.priority))return t.priority-e.priority;if(e.prefix&&t.prefix&&e.prefix!==t.prefix){if(e.prefix.startsWith(t.prefix))return-1;if(t.prefix.startsWith(e.prefix))return 1}if(e.suffix&&t.suffix&&e.suffix!==t.suffix){if(e.suffix.endsWith(t.suffix))return-1;if(t.suffix.endsWith(e.suffix))return 1}return e.prefix&&!t.prefix?-1:!e.prefix&&t.prefix?1:e.suffix&&!t.suffix?-1:!e.suffix&&t.suffix?1:e.caseSensitive&&!t.caseSensitive?-1:!e.caseSensitive&&t.caseSensitive?1:0}function V(e,t=0,n,r,i){return{kind:t,depth:e?e.depth+1:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,data:void 0,parent:e,parse:null,priority:0,caseSensitive:n,prefix:r,suffix:i}}function zt(e,t){let n=V(),r=[];function i(e,t,n,a){let[o,s,c]=Lt(!1,e,t,n,r,a);if(e.children)for(let t of e.children)i(t,s,o,c)}for(let t of e)i(t,1,n);for(let e of r)e.sort(Rt);t.masksTree=n,t.flatCache=Nt(1e3)}function Bt(e,t){e||=`/`;let n=t.flatCache.get(e);if(n!==void 0)return n;let r=Wt(e,t.masksTree);return t.flatCache.set(e,r),r}function Vt(e,t,n,r,i){e||=`/`,r||=`/`;let a=t?`case\0${e}`:e,o=i.singleCache.get(a);return o||(o=V(),Lt(t,{from:e},1,o),i.singleCache.set(a,o)),Wt(r,o,n)}function Ht(e,t,n=!1){let r=n?e:`nofuzz\0${e}`,i=t.matchCache.get(r);if(i!==void 0)return i;e||=`/`;let a;try{a=Wt(e,t.segmentTree,n)}catch(e){if(e instanceof URIError)a=null;else throw e}return a&&(a.branch=Kt(a.route)),t.matchCache.set(r,a),a}function Ut(e,t=!1){let n=V(),r=[],i={},a={},o=0;function s(e,n,c,l){if(e.init(o),e.id in i&&be(),i[e.id]=e,o!==0&&e.path){let t=u(e.fullPath);(!a[t]||e.fullPath.endsWith(`/`))&&(a[t]=e)}o++;let[d,f,p]=Lt(t,e,n,c,r,l);if(e._interpolation=p,e.children)for(let t of e.children)s(t,f,d,p)}s(e,1,n);for(let e of r)e.sort(Rt);return{processedTree:{segmentTree:n,singleCache:Nt(1e3),matchCache:Nt(1e3),flatCache:null,masksTree:null},routesById:i,routesByPath:a}}function Wt(e,t,n=!1){let r=e.split(`/`),i=Jt(e,r,t,n);if(!i)return null;let[a]=Gt(e,r,i);return{route:i.node.route,rawParams:a}}function Gt(e,t,n){let r=qt(n.node),i=n.node.data&&Ft(n.node.data),a=Object.create(null),o=n.extract?.part??0,s=n.extract?.node??0,c=n.extract?.path??0,l=n.extract?.param??0;for(;s<r.length;o++,s++,c++){let u=r[s];if(u.kind===B)break;if(u.kind===Pt){o--,c--;continue}let d=t[o],f=c;if(d&&(c+=d.length),u.kind===1||u.kind===3){let e=i[l++];if(u.kind===3&&n.skipped&1<<s){o--,c=f-1;continue}let t=u.suffix||u.prefix?d.substring(u.prefix.length,d.length-u.suffix.length):d;(t||u.kind===1)&&(a[e]=decodeURIComponent(t))}else if(u.kind===2){let t=u,n=e.substring(f+t.prefix.length,e.length-t.suffix.length),r=decodeURIComponent(n);a[`*`]=r,a._splat=r;break}}return n.rawParams&&Object.assign(a,n.rawParams),[a,{part:o,node:s,path:c,param:l}]}function Kt(e){let t=[e];for(;e.parentRoute;)e=e.parentRoute,t.push(e);return t.reverse(),t}function qt(e){let t=Array(e.depth+1);do t[e.depth]=e,e=e.parent;while(e);return t}function Jt(e,t,n,r){if(e===`/`&&n.index)return{node:n.index,skipped:0};let i=!C(t),a=i&&e!==`/`,o=t.length-+!!i,s=[{node:n,index:1,skipped:0,statics:0,dynamics:0,optionals:0}],c=null,l=null;for(;s.length;){let n=s.pop(),{node:i,index:u,skipped:d,statics:f,dynamics:p,optionals:m}=n,{extract:h,rawParams:g}=n;if(i.kind===2&&i.route&&!Qt(l,n))continue;if(i.parse){if(!Zt(e,t,n))continue;g=n.rawParams,h=n.extract}r&&i.route&&i.kind!==B&&Qt(c,n)&&(c=n);let _=u===o;if(_&&(i.route&&(!a||i.kind===B||i.kind===2)&&Qt(l,n)&&(l=n),!i.optional&&!i.wildcard&&!i.index&&!i.pathless))continue;let v=_?void 0:t[u],y;if(_&&i.index){let n={node:i.index,index:u,skipped:d,statics:f,dynamics:p,optionals:m,extract:h,rawParams:g},r=!0;if(i.index.parse&&(Zt(e,t,n)||(r=!1)),r){if(!p&&!m&&!d&&Xt(f,o))return n;Qt(l,n)&&(l=n)}}if(i.wildcard)for(let e=i.wildcard.length-1;e>=0;e--){let n=i.wildcard[e],{prefix:r,suffix:a}=n;if(!r||!_&&(n.caseSensitive?v:y??=v.toLowerCase()).startsWith(r)){if(a){if(_)continue;let e=t.slice(u).join(`/`),i=e.slice(-a.length);if((n.caseSensitive?i:i.toLowerCase())!==a||e.length-a.length<r.length)continue}s.push({node:n,index:o,skipped:d,statics:f,dynamics:p,optionals:m,extract:h,rawParams:g})}}if(i.optional){let e=d|1<<i.depth+1;for(let t=i.optional.length-1;t>=0;t--){let n=i.optional[t];s.push({node:n,index:u,skipped:e,statics:f,dynamics:p,optionals:m,extract:h,rawParams:g})}if(!_)for(let e=i.optional.length-1;e>=0;e--){let t=i.optional[e],{prefix:n,suffix:r}=t;if(n||r){let e=t.caseSensitive?v:y??=v.toLowerCase();if(n&&!e.startsWith(n)||r&&e.indexOf(r,e.length-r.length)<n.length)continue}s.push({node:t,index:u+1,skipped:d,statics:f,dynamics:p,optionals:m+Yt(o,u),extract:h,rawParams:g})}}if(!_&&i.dynamic&&v)for(let e=i.dynamic.length-1;e>=0;e--){let t=i.dynamic[e],{prefix:n,suffix:r}=t;if(n||r){let e=t.caseSensitive?v:y??=v.toLowerCase();if(n&&!e.startsWith(n)||r&&e.indexOf(r,e.length-r.length)<n.length)continue}s.push({node:t,index:u+1,skipped:d,statics:f,dynamics:p+Yt(o,u),optionals:m,extract:h,rawParams:g})}if(!_&&i.staticInsensitive){let e=i.staticInsensitive.get(y??=v.toLowerCase());e&&s.push({node:e,index:u+1,skipped:d,statics:f+Yt(o,u),dynamics:p,optionals:m,extract:h,rawParams:g})}if(!_&&i.static){let e=i.static.get(v);e&&s.push({node:e,index:u+1,skipped:d,statics:f+Yt(o,u),dynamics:p,optionals:m,extract:h,rawParams:g})}if(i.pathless)for(let e=i.pathless.length-1;e>=0;e--){let t=i.pathless[e];s.push({node:t,index:u,skipped:d,statics:f,dynamics:p,optionals:m,extract:h,rawParams:g})}}if(l)return l;if(r&&c){let n=c.index;for(let e=0;e<c.index;e++)n+=t[e].length;let r=n===e.length?`/`:e.slice(n);return c.rawParams??=Object.create(null),c.rawParams[`**`]=decodeURIComponent(r),c}return null}function Yt(e,t){return 2**(e-t-1)}function Xt(e,t){return e===2**(t-1)-1}function Zt(e,t,n){let r,i;try{[r,i]=Gt(e,t,n)}catch{return null}if(n.rawParams=r,n.extract=i,!n.node.parse)return!0;try{if(n.node.parse(r)===!1)return null}catch{}return!0}function Qt(e,t){return!e||t.statics>e.statics||t.statics===e.statics&&(t.dynamics>e.dynamics||t.dynamics===e.dynamics&&(t.optionals>e.optionals||t.optionals===e.optionals&&((t.node.kind===B)>(e.node.kind===B)||t.node.kind===B==(e.node.kind===B)&&t.node.depth>e.node.depth)))}function $t(){try{return sessionStorage}catch{return}}var en=`tsr-scroll-restoration-v1_3`,tn=$t();function nn(){try{return JSON.parse(tn?.getItem(`tsr-scroll-restoration-v1_3`)||`{}`)}catch{return{}}}var rn=nn(),an=`data-scroll-restoration-id`,on=e=>e.state.__TSR_key||e.href;function sn(e){let t=e.getAttribute(an);if(t)return`[${an}="${t}"]`;let n=``,r=e,i;for(;i=r.parentNode;){let e=1,t=r;for(;t=t.previousElementSibling;)e++;let a=`${r.localName}:nth-child(${e})`;n=n?`${a} > ${n}`:a,r=i}return n}var cn=!1,ln=`window`;function un(e){try{return typeof e==`function`?e():document.querySelector(e)}catch{}}function dn(e){let t=new Set;for(let n of e){if(n===ln)continue;let e=un(n);e&&t.add(e)}return t}function fn(e,t){let n=t??e.options.scrollRestoration,r=e._scroll;n&&(r.e=!0);let i=e.options.getScrollRestorationKey||on,a=new Set,o=e=>{let t=rn[e]||={};for(let e of a)e===document?t[ln]={scrollX,scrollY}:e.isConnected&&(t[sn(e)]={scrollX:e.scrollLeft,scrollY:e.scrollTop})};n&&!r.s&&(r.s=!0,cn=!1,history.scrollRestoration=`manual`,document.addEventListener(`scroll`,e=>{cn||a.add(e.target)},!0),e.subscribe(`onBeforeLoad`,e=>{e.fromLocation&&o(i(e.fromLocation)),a.clear()}),addEventListener(`pagehide`,()=>{history.scrollRestoration=`auto`,o(i(e.stores.resolvedLocation.get()??e.stores.location.get()));try{tn?.setItem(en,JSON.stringify(rn))}catch{}}),addEventListener(`pageshow`,e=>{e.persisted&&(history.scrollRestoration=`manual`)})),!r.r&&(r.r=!0,e.subscribe(`onRendered`,t=>{let n=e.options.scrollRestorationBehavior,o=e.options.scrollToTopSelectors,s=r.n,c=r.h,l;if(a.clear(),r.n=!0,r.h=!1,typeof e.options.scrollRestoration==`function`&&!e.options.scrollRestoration({location:e.latestLocation}))return;let u=i(t.toLocation),d=t.fromLocation&&i(t.fromLocation);if(r.e&&d&&d!==u){let e=rn[d];if(e){let t=rn[u];for(let n in e){if(n===ln){if(s)continue}else{let e=un(n);if(!e||s&&o&&(l??=dn(o),l.has(e)))continue}t||=rn[u]={},t[n]??=e[n]}}}cn=!0;try{let e=t.toLocation.hash,i=t.toLocation.state.__hashScrollIntoViewOptions??!0,a=!1;if(s){!e&&o&&(l??=dn(o));let t=e&&i&&c,s=r.e?rn[u]:void 0;if(s)for(let e in s){let{scrollX:r,scrollY:i}=s[e];if(e===ln){if(t)continue;scrollTo({top:i,left:r,behavior:n}),a=!0}else{let t=un(e);t&&(t.scrollLeft=r,t.scrollTop=i,l?.delete(t))}}if(!e){let e={top:0,left:0,behavior:n};if(a||scrollTo(e),l)for(let t of l)t.scrollTo(e)}}!a&&e&&i&&document.getElementById(e)?.scrollIntoView(i)}finally{cn=!1}}))}var pn=/^(?:\s|["[{\d-]|fa|nu|tr)/,mn=gn(JSON.parse),hn=_n(JSON.stringify,JSON.parse);function gn(e){let t=e===JSON.parse;return n=>{n[0]===`?`&&(n=n.substring(1));let r=Me(n);for(let n in r){let i=r[n];if(typeof i==`string`){if(t&&!pn.test(i))continue;try{r[n]=e(i)}catch{}}}return r}}function _n(e,t){let n=t===JSON.parse;function r(r){if(r&&typeof r==`object`)try{return e(r)}catch{}else if(t&&typeof r==`string`){if(n&&!pn.test(r))return r;try{return t(r),e(r)}catch{}}return r}return e=>{let t=Se(e,r);return t?`?${t}`:``}}function vn(e,t,n){let r=Ue(e),i=`/${r}`,a=t?i:i.toLowerCase(),o=`${a}/`,s={input:({url:e})=>{let n=t?e.pathname:e.pathname.toLowerCase();return n===a?e.pathname=`/`:n.startsWith(o)&&(e.pathname=e.pathname.slice(i.length)),e},output:({url:e})=>(e.pathname=de(`/${r}${e.pathname}`),e)};return n?{input:({url:e})=>yn(n,s.input({url:e})),output:({url:e})=>s.output({url:bn(n,e)})}:s}function yn(e,t){let n=e?.input?.({url:t});if(n){if(typeof n==`string`)return new URL(n);if(n instanceof URL)return n}return t}function bn(e,t){let n=e?.output?.({url:t});if(n){if(typeof n==`string`)return new URL(n);if(n instanceof URL)return n}return t}function xn(e){let t=e;return{get(){return t},set(e){t=De(e,t)}}}function Sn(e){return{get(){return e()}}}function Cn(e,t){let{createMutableStore:n,createReadonlyStore:r,batch:i}=t,a=new Map,o=n(`idle`),s=n(e),c=n(void 0),l=n([]),u=r(()=>l.get().map(e=>a.get(e).get())),d=r(()=>({status:o.get(),isLoading:o.get()===`pending`,matches:u.get(),location:s.get(),resolvedLocation:c.get()}));function f(e){let t=a.get(e);return t||(t=n(void 0),a.set(e,t)),t}let p={status:o,location:s,resolvedLocation:c,ids:l,matches:u,byRoute:a,__store:d,getMatchStore:f,setMatches:m};function m(e){let t=l.get(),n=e.map(e=>e.routeId);i(()=>{ne(t,n)||l.set(n);for(let e of t)n.includes(e)||a.get(e).set(()=>void 0);for(let t of e){let e=f(t.routeId);e.get()!==t&&e.set(t)}})}return p}var H=`__TSR_index`,wn=`popstate`,Tn=`beforeunload`,En=/^[\x00-\x20]*(?:[\\/][\t\n\r]*){2,}/;function Dn(e){let t=En.exec(e);return t?`/`+e.slice(t[0].length):e}function On(e){return/[\x00-\x1f\x7f]/.test(e)&&(e=e.replace(/[\x00-\x1f\x7f]/g,e=>`
3
- \r`.includes(e)?``:encodeURIComponent(e))),Dn(e)}function kn(e){let t=e.getLocation(),n=new Set,r=r=>{t=e.getLocation(),n.forEach(e=>e({location:t,action:r}))},i=n=>{e.notifyOnIndexChange??!0?r(n):t=e.getLocation()},a=async({task:n,navigateOpts:r,...i})=>{if(r?.ignoreBlocker??!1){n();return}let a=e.getBlockers?.()??[],o=i.type===`PUSH`||i.type===`REPLACE`;if(typeof document<`u`&&a.length&&o)for(let n of a){let r=Mn(i.path,i.state);if(await n.blockerFn({currentLocation:t,nextLocation:r,action:i.type})){e.onBlocked?.();return}}n()};return{get location(){return t},get length(){return e.getLength()},subscribers:n,subscribe:e=>(n.add(e),()=>{n.delete(e)}),push:(n,i,o)=>{let s=t.state[H];i=An(s+1,i),a({task:()=>{e.pushState(n,i),r({type:`PUSH`})},navigateOpts:o,type:`PUSH`,path:n,state:i})},replace:(n,i,o)=>{let s=t.state[H];i=An(s,i),a({task:()=>{e.replaceState(n,i),r({type:`REPLACE`})},navigateOpts:o,type:`REPLACE`,path:n,state:i})},go:(t,n)=>{a({task:()=>{e.go(t,n?.ignoreBlocker??!1),i({type:`GO`,index:t})},navigateOpts:n,type:`GO`})},back:t=>{a({task:()=>{e.back(t?.ignoreBlocker??!1),i({type:`BACK`})},navigateOpts:t,type:`BACK`})},forward:t=>{a({task:()=>{e.forward(t?.ignoreBlocker??!1),i({type:`FORWARD`})},navigateOpts:t,type:`FORWARD`})},canGoBack:()=>t.state[H]!==0,createHref:t=>e.createHref(t),block:t=>{if(!e.setBlockers)return()=>{};let n=e.getBlockers?.()??[];return e.setBlockers([...n,t]),()=>{let n=e.getBlockers?.()??[];e.setBlockers?.(n.filter(e=>e!==t))}},flush:()=>e.flush?.(),destroy:()=>e.destroy?.(),notify:r,_getBlockers:()=>e.getBlockers?.()??[]}}function An(e,t){let n=Nn();return{...t,key:n,__TSR_key:n,[H]:e}}function jn(e){let t=e?.window??(typeof document<`u`?window:void 0),n=t.history.pushState,r=t.history.replaceState,i=[],a=()=>i,o=e=>i=e,s=t=>On(e?.createHref?e.createHref(t):t),c=e?.parseLocation??(()=>Mn(`${t.location.pathname}${t.location.search}${t.location.hash}`,t.history.state));if(!t.history.state?.__TSR_key&&!t.history.state?.key){let e=Nn();t.history.replaceState({[H]:0,key:e,__TSR_key:e},``)}let l=c(),u,d=!1,f=!1,p=!1,m=!1,h=()=>l,g,_=()=>{g&&(S._ignoreSubscribers=!0,(g[2]?t.history.pushState:t.history.replaceState)(g[1],``,g[0]),S._ignoreSubscribers=!1,g=void 0,u=void 0)},v=(t,n,r)=>{let i=e?.createHref?s(n):void 0,a=!!g;a||(u=l),l=Mn(n,r),g=[i??l.href,r,g?.[2]||t],a||queueMicrotask(()=>_())},y=e=>{l=c(),S.notify({type:e})},b=async()=>{if(m=!1,f){f=!1;return}let e=c(),n=e.state[H]-l.state[H],r=n===1,i=n===-1,o=!r&&!i||d;d=!1;let s=o?`GO`:i?`BACK`:`FORWARD`,u=o?{type:`GO`,index:n}:{type:i?`BACK`:`FORWARD`};if(p)p=!1;else{let r=a();if(typeof document<`u`&&r.length){for(let i of r)if(await i.blockerFn({currentLocation:l,nextLocation:e,action:s})){f=!0,t.history.go(-n),S.notify(u);return}}}l=c(),S.notify(u)},x=e=>{if(m){m=!1;return}let t=!1,n=a();if(typeof document<`u`&&n.length)for(let e of n){let n=e.enableBeforeUnload??!0;if(n===!0||typeof n==`function`&&n()===!0){t=!0;break}}if(t)return e.preventDefault(),e.returnValue=``},S=kn({getLocation:h,getLength:()=>t.history.length,pushState:(e,t)=>v(!0,e,t),replaceState:(e,t)=>v(!1,e,t),back:e=>(e&&(p=!0,m=!0),t.history.back()),forward:e=>{e&&(p=!0,m=!0),t.history.forward()},go:(e,n)=>{d=!0,n&&(p=!0,m=!0),t.history.go(e)},createHref:e=>s(e),flush:_,destroy:()=>{t.history.pushState=n,t.history.replaceState=r,t.removeEventListener(Tn,x,{capture:!0}),t.removeEventListener(wn,b)},onBlocked:()=>{u&&l!==u&&(l=u)},getBlockers:a,setBlockers:o,notifyOnIndexChange:!1});return S._ignoreNextBeforeUnload=e=>{m=!1;try{e=new URL(e,t.document.baseURI).href,m=/^https?:/.test(e)&&(!e.includes(`#`)||e.split(`#`)[0]!==t.location.href.split(`#`)[0])}catch{}},t.addEventListener(Tn,x,{capture:!0}),t.addEventListener(wn,b),t.history.pushState=function(...e){let r=n.apply(t.history,e);return S._ignoreSubscribers||y(`PUSH`),r},t.history.replaceState=function(...e){let n=r.apply(t.history,e);return S._ignoreSubscribers||y(`REPLACE`),n},S}function Mn(e,t){let n=On(e),r=n.indexOf(`#`),i=n.indexOf(`?`);if(!t){let e=Nn();t={[H]:0,key:e,__TSR_key:e}}return{href:n,pathname:n.substring(0,r>0?i>0?Math.min(r,i):r:i>0?i:n.length),hash:r>-1?n.substring(r):``,search:i>-1?n.slice(i,r===-1?void 0:r):``,state:t}}function Nn(){return(Math.random()+1).toString(36).substring(7)}function Pn(e,t){return e.protocol!==`http:`&&e.protocol!==`https:`||e.origin!==t||!!e.username||!!e.password}function Fn(e){return e.pathname+e.search+e.hash}function In(e){return e.options.loader||e.options.beforeLoad||e.lazyFn||e.options.component?.preload||e.options.pendingComponent?.preload}function Ln(e){return e instanceof Error?{name:e.name,message:e.message}:{data:e}}function Rn(e,t){return{fromLocation:t,toLocation:e,pathChanged:t?.pathname!==e.pathname,hrefChanged:t?.href!==e.href,hashChanged:t?.hash!==e.hash}}function zn({key:e,__TSR_key:t,__TSR_index:n,__hashScrollIntoViewOptions:r,...i}){return i}function Bn(e){return e.findIndex(e=>e.status===`error`||e.status===`notFound`||e._notFound)+1}function Vn(e,t,n,r,i,a){r&&(t=t.slice(0,r)),i&&(n=n.slice(0,i));for(let r of t){if(a&&e._tx!==a)return;n.some(e=>e.routeId===r.routeId)||e.routesById[r.routeId].options.onLeave?.(r)}for(let r of n){if(a&&e._tx!==a)return;e.routesById[r.routeId].options[t.some(e=>e.routeId===r.routeId)?`onStay`:`onEnter`]?.(r)}}var Hn=class{constructor(e,t){this.tempLocationKey=`${Math.round(Math.random()*1e7)}`,this._scroll={n:!0},this.subscribers=new Set,this._cache=new Map,this._committed=[],this.startTransition=async e=>(e(),!1),this.update=e=>{let t=this.options;this.options={...t,...e},this.isServer=this.options.isServer??!1??typeof document>`u`,this.staticLocations=new WeakMap,this.protocolAllowlist=new Set(this.options.protocolAllowlist),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.history=this.options.history?this.options.history:jn()),this.origin=this.options.origin,this.origin||=window?.origin&&window.origin!==`null`?window.origin:`http://localhost`;let n=this.options.basepath??`/`,r=this.options.rewrite,i=this.basepath!==n||t?.rewrite!==r||t?.caseSensitive!==this.options.caseSensitive;if(i&&(this.basepath=n,this.rewrite=n!==`/`&&Ue(n)?vn(n,this.options.caseSensitive,r):r),this.history&&this.updateLatestLocation(),this.options.routeTree!==this.routeTree){this.routeTree=this.options.routeTree;let e;e=this.buildRouteTree(),this.setRoutes(e)}if(this.stores)i&&this.stores.location.set(this.latestLocation);else if(this.latestLocation){let e=this.getStoreConfig(this);this.batch=e.batch,this.stores=Cn(this.latestLocation,e),fn(this)}},this.updateLatestLocation=()=>{this.latestLocation=this.parseLocation(this.history.location,this.latestLocation)},this.buildRouteTree=()=>{let e=Ut(this.routeTree,this.options.caseSensitive);return this.options.routeMasks&&zt(this.options.routeMasks,e.processedTree),{...e,resolvePathCache:Nt(1e3)}},this.subscribe=(e,t)=>{let n={eventType:e,fn:t};return this.subscribers.add(n),()=>{this.subscribers.delete(n)}},this.emit=e=>{for(let t of this.subscribers)if(t.eventType===e.type)try{t.fn(e)}catch(e){console.error(e)}},this.parseLocation=(e,t)=>{let n=({pathname:e,search:n,hash:r,href:i},a)=>{if(!this.rewrite&&!/[ \x00-\x1f\x7f\u0080-\uffff]/.test(e)){let i=this.options.parseSearch(n),o=this.options.stringifySearch(i);return{href:e+o+r,publicHref:e+o+r,pathname:f(e),external:!1,searchStr:o,search:P(t?.search,i),hash:f(r.slice(1)),state:c(t?.state,a)}}let o=yn(this.rewrite,new URL(i,this.origin)),s=this.options.parseSearch(o.search),l=this.options.stringifySearch(s);return o.search=l,{href:o.href.replace(o.origin,``),publicHref:i,pathname:f(Dn(o.pathname)),external:!!this.rewrite&&Pn(o,this.origin),searchStr:l,search:P(t?.search,s),hash:f(o.hash.slice(1)),state:c(t?.state,a)}},r=n(e,e.state),{__tempLocation:i,__tempKey:a}=r.state;if(i&&(!a||a===this.tempLocationKey)){let e=n(i,{...i.state,__tempLocation:void 0,key:r.state.key,__TSR_key:r.state.__TSR_key});return e.maskedLocation=r,e}return r},this.matchRoutes=(e,t,n)=>typeof e==`string`?this.matchRoutesInternal({pathname:e,search:t},n):this.matchRoutesInternal(e,t),this.getMatchedRoutes=e=>{let t=Object.create(null),n=Ht(u(e),this.processedTree,!0);return n&&Object.assign(t,n.rawParams),[n?.branch||[this.routesById.__root__],t,n?.route]},this.buildLocation=e=>{{let t=this.staticLocations.get(e);if(t)return t}let t=!1,n=(n={})=>{if(n.href){let e=Mn(n.href,{});n={...n,to:yn(this.rewrite,new URL(e.pathname,this.origin)).pathname,search:this.options.parseSearch(e.search),hash:e.hash.slice(1)}}let r=n._fromLocation||this._pendingLocation||this.latestLocation,i,a=()=>(t=!0,r),o=()=>(t=!0,i??=this.matchRoutesLightweight(r)),s=n.to?`${n.to}`:`.`,c=ge(s[0]===`/`?``:n.unsafeRelative===`path`?a().pathname:n.from??o()[1],s,this.options.trailingSlash,this.resolvePathCache),l=this.routesByPath[u(c)],d=c.includes(`$`),p;if(l)p=l._branch??=Kt(l);else if(d)p=[];else{let[e,t,n]=this.getMatchedRoutes(c);p=e,this.options.notFoundRoute&&(!n||n.path!==`/`&&t[`**`])&&(p=[...p,this.options.notFoundRoute])}let h=d?l?._interpolation??Lt(!1,{fullPath:c},0):void 0,g;for(let e of p){let t=e.options.params?.stringify??e.options.stringifyParams;if(t){let e=o()[3];if(g??=qn(n.params,e),!E(g))break;g===e&&(g=Object.assign(m(),g));try{Object.assign(g,t(g))}catch{}}}g??=qn(n.params,Jn(n.params,h)?o()[3]:Yn);let _=e.leaveParams?c:Dn(f(h?Ke(c,h,g,this.pathParamsDecoder):c)),v=Xn(p,e._includeValidateSearch),y=()=>{let t=o()[2];if(e._includeValidateSearch&&this.options.search?.strict){let e={};p.forEach(n=>{if(n.options.validateSearch)try{Object.assign(e,Kn(n.options.validateSearch,{...e,...t}))}catch{}}),t=e}return t},b=v.length?Zn(v,y(),n):n.search===!0?y():typeof n.search==`function`?n.search(y()):n.search||Yn,x=this.options.stringifySearch(b),S=n.hash===!0?a().hash:typeof n.hash==`function`?n.hash(a().hash):n.hash||void 0,C=S?`#${S}`:``,w=n.state?n.state===!0?a().state:typeof n.state==`function`?n.state(a().state):n.state:Yn,T=`${_}${x}${C}`,D,O,k=!1;if(this.rewrite){let e=new URL(T,this.origin),t=e.origin,n=bn(this.rewrite,e);D=Fn(e),Pn(n,t)?(O=n.href,k=!0):O=Dn(Fn(n))}else D=Ae(T),O=D;return{publicHref:O,href:D,pathname:_,search:b,searchStr:x,state:w,hash:S??``,external:k,unmaskOnReload:n.unmaskOnReload}},r=n(e);if(e.mask)r.maskedLocation=n({from:e.from,...e.mask});else if(this.options.routeMasks){let t=Bt(r.pathname,this.processedTree);if(t){let i=Object.assign(m(),t.rawParams),{from:a,params:o,...s}=t.route,c=qn(o,i);r.maskedLocation=n({from:e.from,...s,params:c})}}return!t&&e._fromLocation&&!r.maskedLocation&&this.staticLocations.set(e,r),r},this.commitLocation=async({viewTransition:e,ignoreBlocker:t,...n})=>{let r=n.maskedLocation??n;if(r.external)return Un(this,r.publicHref,{replace:n.replace,ignoreBlocker:t});let i,a=u(this.latestLocation.href)===u(n.href)&&k(zn(n.state),zn(this.latestLocation.state)),o=this._commitPromise,s,c=new Promise(e=>{s=e});if(c.resolve=()=>{s(),o?.resolve()},this._commitPromise=c,a)this.load();else{let{maskedLocation:r,hashScrollIntoView:a,...o}=n;r&&(o={...r,state:{...r.state,__tempKey:void 0,__tempLocation:{...o,search:o.searchStr,state:{...o.state,__tempKey:void 0,__tempLocation:void 0,__TSR_key:void 0,key:void 0}}}},(o.unmaskOnReload??this.options.unmaskOnReload??!1)&&(o.state.__tempKey=this.tempLocationKey)),o.state={...o.state,__hashScrollIntoViewOptions:a??this.options.defaultHashScrollIntoView??!0},this.shouldViewTransition=e,i=n.replace?`REPLACE`:`PUSH`,this.history[i===`REPLACE`?`replace`:`push`](o.publicHref,o.state,{ignoreBlocker:t}),this.history.subscribers.size||this.load({action:{type:i}})}return this._scroll.n=n.resetScroll??!0,this._commitPromise},this.buildAndCommitLocation=({replace:e,resetScroll:t,hashScrollIntoView:n,viewTransition:r,ignoreBlocker:i,...a}={})=>{let o=this.buildLocation({...a,_includeValidateSearch:!0});this._pendingLocation=o;let s=this.commitLocation({...o,viewTransition:r,replace:e,resetScroll:t,hashScrollIntoView:n,ignoreBlocker:i});return queueMicrotask(()=>{this._pendingLocation===o&&(this._pendingLocation=void 0)}),s},this.navigate=async({to:e,reloadDocument:t,href:n,publicHref:r,...i})=>{let a=n?T(n):void 0;if(a||t){if(e!==void 0||!n){let t=this.buildLocation({to:e,...i}),a=t.maskedLocation??t;n??=a.publicHref,r??=a.publicHref}let t=!a&&r?r:n;return Un(this,t,i)}return this.buildAndCommitLocation({...i,href:n,to:e,_isNavigate:!0})},this.load=async e=>{this.updateLatestLocation(),e?.action&&(this._scroll.h=e.action.type===`PUSH`||e.action.type===`REPLACE`),await Fr(this,e)},this.startViewTransition=e=>{let t=this.shouldViewTransition??this.options.defaultViewTransition;if(this.shouldViewTransition=void 0,t&&typeof document.startViewTransition==`function`){let n;if(typeof t==`object`&&window.CSS?.supports?.(`selector(:active-view-transition-type(a))`)){let r=this.latestLocation,i=this.stores.resolvedLocation.get(),a=typeof t.types==`function`?t.types(Rn(r,i)):t.types;if(a===!1)return e();n={update:e,types:a}}else n=e;return document.startViewTransition(n).updateCallbackDone}return e()},this.invalidate=e=>{let t=this._committed,n=e?.filter,r=this._preloads,i=new Set,a=e=>{(!n||n(e))&&i.add(e.id)};t.forEach(a),this._cache.forEach(a),r?.forEach(e=>e.forEach(a)),this._tx?.[3].forEach(a);let o=[];for(let[e,t]of r??[])t.some(e=>i.has(e.id))&&(r.delete(e),o.push(e));let s=t=>{if(i.has(t.id)){let n=this.routesById[t.routeId],r={...t,invalid:!0,...(e?.forcePending||t.status===`error`||t.status===`notFound`)&&In(n)?{status:`pending`,error:void 0}:void 0};return t._flight=void 0,r}return t};this._committed=t.map(s);for(let[t,n]of this._cache)i.has(t)&&(n.invalid=!0,e?.forcePending&&(n.status=`pending`));for(let e of i){let t=this._flights?.get(e);this._flights?.delete(e),t&&!t[2]&&o.push(t[1])}for(let e of o)e.abort();return this.shouldViewTransition=!1,this.load({sync:e?.sync})},this.resolveRedirect=e=>{let t=e.options,n=e.headers.get(`Location`)||t.href;if(!n){let e=this.buildLocation(t);n=(e.maskedLocation??e).publicHref||`/`}let r;if(Je.test(n)||(r=T(n))&&!this.protocolAllowlist.has(r))throw Error(`Redirect blocked: unsafe protocol`);if(r===`http:`||r===`https:`){let e=new URL(n);e.pathname.startsWith(`//`)?n=e.href:Pn(e,this.origin)||(n=Fn(e),r=void 0)}return r&&(t.reloadDocument=!0),t.href=n,e.headers.set(`Location`,n),e},this.clearCache=e=>{let t=this._cache,n=this._preloads,r=e?.filter,i=[],a=[];for(let[e,n]of t)(!r||r(n))&&(a.push(e),i.push(n));let o=[];for(let[e,t]of n??[])(!r||t.some(r))&&(o.push(e),i.push(...t));for(let e of a)t.delete(e);for(let e of o)n.delete(e);for(let e of i){let t=e._flight;e._flight=void 0,t&&!--t[2]&&(this._flights?.get(e.id)===t&&this._flights.delete(e.id),o.push(t[1]))}for(let e of o)e.abort()},this.loadRouteChunk=U,this.preloadRoute=e=>Ir(this,e),this.matchRoute=(e,t)=>{let n={...e,to:e.to?ge(e.from||``,e.to,this.options.trailingSlash,this.resolvePathCache):void 0,params:e.params||{},leaveParams:!0},r=this.buildLocation(n),i=this.stores.status.get()===`pending`;if(t?.pending&&!i)return!1;let a=t?.pending??!i?this.latestLocation:this.stores.resolvedLocation.get()||this.stores.location.get(),o=Vt(r.pathname,t?.caseSensitive??!1,t?.fuzzy??!1,a.pathname,this.processedTree);return!o||e.params&&!k(o.rawParams,e.params,!0)?!1:t?.includeSearch??!0?k(a.search,r.search,!0)?o.rawParams:!1:o.rawParams},this.getStoreConfig=t,e.pathParamsAllowedCharacters?.length&&(this.pathParamsDecoder=ze(e.pathParamsAllowedCharacters)),this.update({defaultPreloadDelay:50,defaultPendingMs:1e3,defaultPendingMinMs:500,context:void 0,...e,caseSensitive:e.caseSensitive??!1,notFoundMode:e.notFoundMode??`fuzzy`,stringifySearch:e.stringifySearch??hn,parseSearch:e.parseSearch??mn,protocolAllowlist:e.protocolAllowlist??Ve}),self.__TSR_ROUTER__=this}isShell(){return!!this.options.isShell}get state(){return this.stores.__store.get()}setRoutes(e){Object.assign(this,e),this.lightweightCache=new WeakMap,this.staticLocations=new WeakMap;let t=this.options.notFoundRoute;t&&(t.init(99999999999),this.routesById[t.id]!==t&&(t._interpolation=Lt(!1,t,0)),this.routesById[t.id]=t)}matchRoutesInternal(e,t){let[n,r,i]=this.getMatchedRoutes(e.pathname),a=n,o=!1;(i?i.path!==`/`&&r[`**`]:u(e.pathname))&&(this.options.notFoundRoute?a=[...a,this.options.notFoundRoute]:o=!0);let s=o?Qn(this.options.notFoundMode,a):void 0,l=Array(a.length),d=this._committed,f=(e,t)=>{let n=d[t];return n?.routeId===e.id?n:e===this.options.notFoundRoute?d.find(t=>t.routeId===e.id):void 0},p;for(let n=0;n<a.length;n++){let i=a[n],o=l[n-1],u,d,h;{let n=o?.search??e.search,r=o?._strictSearch??void 0;try{let e=Kn(i.options.validateSearch,{...n})??void 0;u={...n,...e},d={...r,...e}}catch(e){let r=e;if(e instanceof Wn||(r=new Wn(e.message,{cause:e})),t?.throwOnError)throw r;u=n,d={},h=r}}let g=``,_=``;try{g=i.options.loaderDeps?.({search:u})??``,_=g&&JSON.stringify(g)||``}catch(e){if(t?.throwOnError)throw e;h??=e}let v=m(),y=i._interpolation?Ke(i.fullPath,i._interpolation,r,this.pathParamsDecoder,v):i.fullPath,b=i.id+y+_,x=f(i,n),S=this._cache.get(b)??(x?.id===b?x:void 0);p=S?._strictParams??Object.assign(v,p);let C;if(!S)try{$n(i,p)}catch(e){if(C=L(e)||ae(e)?e:new Gn(e.message,{cause:e}),t?.throwOnError)throw C}let w=x?`stay`:`enter`,T;if(S)T={...S,cause:w,search:P(x?x.search:S.search,u),_strictSearch:d,searchError:h};else{let e=In(i)?`pending`:`success`;T={id:b,ssr:i.options.ssr,index:n,routeId:i.id,params:x?.params??p,_strictParams:p,pathname:y,updatedAt:Date.now(),search:x?P(x.search,u):u,_strictSearch:d,searchError:h,status:e,isFetching:!1,error:void 0,paramsError:C,context:{},abortController:t?._controller??new AbortController,cause:w,loaderDeps:x?c(x.loaderDeps,g):g,invalid:!1,preload:!1,staticData:i.options.staticData||{},fullPath:i.fullPath}}let E=s===i.id;T._notFound&&!E&&(T.error=void 0),T._notFound=E,l[n]=T}for(let e=0;e<l.length;e++){let n=l[e];n.params=n.cause===`stay`?P(n.params,p):p,t?._controller&&(n.context={})}return l}matchRoutesLightweight(e){let t=C(this.stores.ids.get()),n=t?this.stores.byRoute.get(t).get():void 0,r=n?.id,i=this.lightweightCache.get(e);if(i&&i[0]===r)return i[1];let[a,o]=this.getMatchedRoutes(e.pathname),s=C(a),c={...e.search};for(let e of a)try{Object.assign(c,Kn(e.options.validateSearch,c))}catch{}let l=n&&n.routeId===s.id&&n.pathname===e.pathname,u;if(l)u=n.params;else{let e=o;for(let t of a)try{$n(t,e)}catch{}u=e}let d=[a,s.fullPath,c,u];return this.lightweightCache.set(e,[r,d]),d}};async function Un(e,t,{replace:n,ignoreBlocker:r}){if(!_(t,e.protocolAllowlist)){if(!r){let t=e.history._getBlockers();for(let r of t)if(r?.blockerFn&&await r.blockerFn({currentLocation:e.history.location,nextLocation:e.history.location,action:n?`REPLACE`:`PUSH`}))return}e.history._ignoreNextBeforeUnload?.(t),n?window.location.replace(t):window.location.href=t}}var Wn=class extends Error{},Gn=class extends Error{};function Kn(e,t){if(e==null)return{};if(`~standard`in e){let n=e[`~standard`].validate(t);if(n instanceof Promise)throw new Wn(`Async validation not supported`);if(n.issues)throw new Wn(JSON.stringify(n.issues,void 0,2),{cause:n});return n.value}return`parse`in e?e.parse(t):typeof e==`function`?e(t):{}}function qn(e,t){if(e===void 0||e===!0)return t;let n=Object.create(null);return e===!1||e===null?n:typeof e==`function`?(Object.assign(n,t),Object.assign(n,e(n))):Object.assign(n,t,e)}function Jn(e,t){return typeof e==`function`?!0:!t||e===!1||e===null?!1:e===void 0||e===!0||t.some(t=>typeof t!=`string`&&!j.call(e,t[1]))}var Yn=Object.freeze({});function Xn(e,t){let n=[];for(let r=0;r<e.length;r++){let i=e[r].options;`search`in i?i.search?.middlewares&&n.push(...i.search.middlewares):(i.preSearchFilters||i.postSearchFilters)&&n.push(({search:e,next:t})=>{let n=t(i.preSearchFilters?i.preSearchFilters.reduce((e,t)=>t(e),e):e);return i.postSearchFilters?i.postSearchFilters.reduce((e,t)=>t(e),n):n});let a=i.validateSearch;t&&a&&n.push(({search:e,next:t,meta:n})=>{let r=t(e);try{let e=Kn(a,r);if(n&&e)for(let t in e)t in r||(n.defaulted||=new Map).set(t,e[t]);return{...r,...e}}catch{}return r})}return n}function Zn(e,t,n){let r=(t,i,a)=>{if(t>=e.length){if(!n.search)return{};if(n.search===!0)return i;let e=De(n.search,i);return a&&(a.explicit=e),e}return e[t]({search:i,next:(e,n)=>{if(n){let n=a||{};return{search:r(t+1,e,n),meta:n}}return r(t+1,e,a)},meta:a})};return r(0,t)}function Qn(e,t){if(e!==`root`){let e;for(let n=t.length-1;n>=0;n--){let r=t[n];if(r.options.notFoundComponent)return r.id;e||=r.children&&r.id}if(e)return e}return ct}function $n(e,t){let n=e.options.params?.parse??e.options.parseParams;n&&Object.assign(t,n(t))}function er(e,t){return e.options[t]?.preload?.()}function tr(e,t){let n=er(e,`component`),r=er(e,`pendingComponent`);return t&&(r?r=r.then(t):t()),n&&r?Promise.all([n,r]).then(()=>{}):n??r}function U(e,t,n){let r=()=>t===!1?void 0:t?er(e,t):tr(e,n),i=e._lazy;if(i)return i===!0?r():i.then(r);if(!e.lazyFn)return r();let a=e.lazyFn().then(t=>{{let{id:n,...r}=t.options;Object.assign(e.options,r),e._lazy=!0}},t=>{throw e._lazy=void 0,t});return e._lazy=a,a.then(r)}function nr(e){let t=e.findIndex(e=>e.status!==`success`||e._notFound)+1;return t&&t<e.length?e.slice(0,t):e}function rr(e){let t=e.length;for(let n=0;n<t;n++){let r=e[n];if(r._assetEnd!==void 0)t=Math.min(t,Math.max(n+1,r._assetEnd));else if(r.status!==`success`||r._notFound){t=n+1;break}}return t<e.length?e.slice(0,t):e}var W=0,G=1,ir=2,K=3,q=[4];function ar(e){return typeof e[0]==`number`}function J(e,t){return t.aborted?Promise.race([Promise.reject(t),e]):new Promise((n,r)=>{let i=()=>r(t);t.addEventListener(`abort`,i,{once:!0}),Promise.resolve(e).then(n,r).then(()=>t.removeEventListener(`abort`,i))})}function Y(e,t){return e.routesById[t.routeId]}function or(e,t,n){return ae(e)?[K,e]:L(e)?(e.routeId||=n,[ir,e]):t?(typeof e?.then==`function`&&(e=Error(`A Promise was thrown`,{cause:e})),[G,e]):[W,e]}function sr(e,t){let n=or(t,!0,e.id);if(n[0]!==G)return n;try{e.options.onError?.(n[1])}catch(t){n=or(t,!0,e.id)}return n}function cr(e,t,n,r,i){return i[0].signal.aborted?q:Sr(e,t,n,sr(n,r),i)}async function lr(e,t,n,r,i,a){let[o,s]=t,c=n[0].signal,l=!!n[3];for(let i=n[6]??0;i<r;i++){let r=s[i],u=Y(e,r);r.abortController=n[0];let d=s[i-1]?.context??e.options.context??{},f={params:r.params,location:o,navigate:t=>e.navigate({...t,_fromLocation:o}),buildLocation:e.buildLocation,cause:l?`preload`:r.cause,abortController:n[0],preload:l,matches:s,routeId:u.id};try{let e=r._ctx||=u.options.context?u.options.context({...f,deps:r.loaderDeps,context:d})||{}:void 0;r.context={...d,...e}}catch(a){return X(e,r),[i,cr(e,t,u,a,n)]}if(c.aborted)return[i,q];let p=r.paramsError??r.searchError;if(p!==void 0)return X(e,r),[i,cr(e,t,u,p,n)];let m=u.options.beforeLoad;if(!m)continue;let h=r.status;i>=a&&(r.status=`pending`,n[7]?.());try{fr(e,r,`beforeLoad`,n[0]);let a=m({...f,search:r.search,context:r.context,...e.options.additionalContext}),o=await(typeof a?.then==`function`?J(a,c):a);if(c.aborted)return[i,q];let s=Sr(e,t,u,or(o,!1,u.id),n);if(s[0]!==W)return X(e,r),[i,s];r.context={...r.context,...o}}catch(a){return X(e,r),[i,cr(e,t,u,a,n)]}finally{r.status=h,fr(e,r,!1,n[0])}}i()}function ur(e,t,n){if(!(!n||--n[2])){if(e._flights?.get(t.id)===n){let n=e._tx;if(n&&!n[0].signal.aborted&&!n[3].includes(t)&&n[3].some(e=>e.id===t.id)&&n[3].some(e=>e.isFetching===`beforeLoad`))return;e._flights.delete(t.id)}return n[1]}}function X(e,t){let n=t._flight;t._flight=void 0,ur(e,t,n)?.abort()}function Z(e,t,n,r){let i=[];for(let a of t)if(!n?.includes(a)){let t=a._flight;if(a._flight=void 0,r&&t?.[2]===1&&e._flights?.get(a.id)===t&&n?.some(e=>e.id===a.id))t[2]=0;else{let n=ur(e,a,t);n&&i.push(n)}}for(let e of i)e.abort()}function dr(e){for(let t of e){let e=t._flight;e&&e[2]++}}function fr(e,t,n,r){if(t.isFetching=n,r&&e._tx?.[0]!==r)return;let i=e.stores.byRoute.get(t.routeId),a=i?.get();a?.id===t.id&&i.set({...a,isFetching:n})}function pr(e,t,n,r,i,a,o){let s=t[0];return{params:n.params,location:s,navigate:t=>e.navigate({...t,_fromLocation:s}),cause:o?`preload`:n.cause,abortController:i,preload:o,deps:n.loaderDeps,parentMatchPromise:a,context:n.context,route:r,...e.options.additionalContext}}async function mr(e,t,n,r,i,a,o){let s=o[0],c=s.signal;if(c.aborted)return q;if(!i)return[W,void 0];let l=n._flight;fr(e,n,`loader`,s);try{if(!l){let s=new AbortController;l=[Promise.resolve().then(()=>i(pr(e,t,n,r,s,a,!!o[3]))).then(e=>or(e,!1,r.id),e=>or(e,!0,r.id)).then(t=>(t[0]!==W&&e._flights?.get(n.id)===l&&(e._flights.delete(n.id),l[2]||s.abort()),t[0]===G&&l[2]?sr(r,t[1]):t)),s,1],(e._flights??=new Map).set(n.id,l)}return n._flight=l,n.abortController=l[1],Sr(e,t,r,await J(l[0],c),o)}catch(t){if(t!==c||!c.aborted)throw t;return X(e,n),q}finally{fr(e,n,!1,s)}}function hr(e,t,n){t[0]!==K&&(e.status=`success`,e.error=void 0,t[0]===W?(e.loaderData=t[1],e.invalid=!1,e.updatedAt=Date.now(),e.preload=n):e.invalid=!0)}function gr(e,t,n){let r=e._cache.get(t.id);if(r!==n||e._committed.some(e=>e.id===t.id&&e._flight===t._flight))return;let i={...t,_notFound:void 0,context:{}};i._flight&&i._flight[2]++,e._cache.set(t.id,i),r&&X(e,r)}function _r(e,t){return t[0]===G||t[0]===ir?{...e,status:t[0]===G?`error`:`notFound`,error:t[1],_flight:void 0}:e}function vr(e,t,n,r,i,a,o){let s=t[1][n],c=Y(e,s),l=!!a[3],u=e._cache.get(s.id),d,f=!1,p;try{if(s.status===`success`&&(d=c.options.shouldReload,typeof d==`function`&&(d=d(pr(e,t,s,c,a[0],i,l))),a[0].signal.aborted&&(p=q)),!p){if(s.status!==`success`)f=!0;else{let t=l||s.preload?c.options.preloadStaleTime??e.options.defaultPreloadStaleTime??3e4:c.options.staleTime??e.options.defaultStaleTime??0;f=!!(s.invalid||d||d===void 0&&Date.now()-s.updatedAt>=t&&(a[5]||s.cause===`enter`||a[2].some(e=>e.routeId===s.routeId&&e.id!==s.id)))}}}catch(n){s.invalid=!0,X(e,s),p=cr(e,t,c,n,a)}let m=c.options.loader,h=typeof m==`function`,g=h?m:m?.handler,_=!l||c.options.preload!==!1,v=_&&m?e._flights?.get(s.id):void 0;v===s._flight||p?v=void 0:v&&!f&&!l&&d===void 0?f=!0:f||(v=void 0);let y=!(!m||!f||s.status!==`success`||l||a[4]||((h?void 0:m.staleReloadMode)??e.options.defaultStaleReloadMode)===`blocking`),b=f&&_,x=b&&!y&&(s.status!==`success`||!!m),S=n>=o?a[7]:void 0,C=c.lazyFn&&c._lazy!==!0?S:void 0;if(b&&!m&&(s.invalid=!1,s.updatedAt=Date.now()),v&&v[2]++,x){let t=s._flight;s._flight=v,ur(e,s,t)?.abort(),n>=o&&(s.status=`pending`),S?.()}b||(s.isFetching=!1);let w=!p&&x?mr(e,t,s,c,g,i,a).then(t=>(hr(s,t,l),t[0]===W&&(m&&!a[0].signal.aborted&&gr(e,s,u),n>=o&&(s.status=`pending`)),t)):Promise.resolve(p??[W,s.loaderData]),T=(async()=>{try{let e=U(c,void 0,C);e&&await J(e,a[0].signal)}catch(r){if(!t[1].some((e,t)=>t<=n&&(e.status===`error`||e.status===`notFound`||e._notFound)))return[n,cr(e,t,c,r,a)]}let r=await w;x&&r[0]===W&&s.status===`pending`&&!a[0].signal.aborted&&(s.status=`success`,S?.())})();if(r.push([n,w,T]),!y)return w.then(e=>_r(s,e));let E={...s,status:`pending`,preload:!1,_flight:v};s.invalid=!1,s.isFetching=`loader`;let D=mr(e,t,E,c,g,i,a).then(e=>(s.isFetching=!1,hr(E,e,!1),e));return(t[2]??=[]).push([n,D,T,E]),D.then(e=>_r(E,e))}async function yr(e,t,n,r,i=0){let a=n?.[1][1],o=a?.routeId?t.findIndex(e=>e.routeId===a.routeId):n?.[0]??t.length-1;o<0&&(o=0);for(let n=o;n>=0;n--){let i=Y(e,t[n]);try{let e=U(i,!1);e&&await J(e,r)}catch(e){if(e===r&&r.aborted)throw e}if(i.options.notFoundComponent)return n}return a?.routeId?o:i}function br(e,t){t[2]&&=(Z(e,t[2].map(e=>e[3])),void 0)}async function xr(e,t,n,r){let i;try{await Promise.all(e.map(e=>e[1].then(async t=>{let a=e[0];if(!(r&&a>=await r)){if(t[0]>=K)throw[a,t];!i&&t[0]!==W&&(i=[a,t],await Promise.all((n??[]).map(e=>{if(!(e[0]<=a))return e[1].then(t=>{if(t[0]===K)throw[e[0],t]})})))}})))}catch(e){return e}return t??i}function Sr(e,t,n,r,i,a){for(;r[0]===K;){let o=r[1],s=o.options;try{if((s.href||o.headers.has(`Location`))&&(e.resolveRedirect(o),s.reloadDocument)||(s.reloadDocument?i[3]:i[1]>=20))return r;let n=e.buildLocation({...s,_fromLocation:t[0],_includeValidateSearch:!0}),a=n.maskedLocation??n;if(a.external){let t=o.clone();return t.options={...s},t.headers.set(`Location`,a.publicHref),e.resolveRedirect(t),i[3]?[K,t]:[K,t,a]}return[K,o,n]}catch(e){r=a?[G,e]:sr(n,e),a=!0}}return r}async function Cr(e,t,n,r,i,a){let o=t[1],s=await i,c=!1,l=o.findIndex(e=>e._notFound),u=t=>t[1][0]===ir?yr(e,o,t,r.signal):t[0],d=l<0?o.length:l;if((s?.[1][0]??0)>=K)d=0;else if(s){d=s[2]??=await u(s);for(let e of n){if(e[0]>=d)break;let t=await e[1];if(t[0]!==W&&t[0]<K&&!(`loaderData`in o[e[0]])){s=[e[0],t],d=s[2]=await u(s);break}}}for(let e of n){if(e[0]>=d)break;let t=await e[2];if(t){s=t;break}}if((s?.[1][0]??0)>=K){let n=s[1];if(n[0]!==K||n[1].options.reloadDocument||n[2])return br(e,t),n;c=!0,s=[0,[G,Error(`Too many redirects`)]]}let f=s?s[2]??await u(s):l;if(f>=0){let i=s?.[1],l=i?.[0],u=o[f],d=i?.[1],p=()=>{i&&(u._notFound=void 0,l===G?u.status=`error`:(d.routeId=u.routeId,u.routeId===e.routeTree.id?(u.status=`success`,u._notFound=!0):u.status=`notFound`),u.error=d,u.isFetching=!1)};p(),i||a?.();let m=Y(e,u);try{await J(i?Promise.resolve().then(()=>U(m,l===G?`errorComponent`:`notFoundComponent`)):Promise.all([U(m),U(m,`notFoundComponent`)]),r.signal)}catch(n){if(n===r.signal&&r.signal.aborted)return br(e,t),q}i?c&&(r.abort(),await Promise.all([...n.map(e=>e[1]),...n.map(e=>e[2]),...(t[2]??[]).map(e=>e[1])]),br(e,t),Z(e,o),p()):u.status=`success`}return t}async function wr(e,t,n,r=0,i=t[1].length){let a=t[1];for(let t=r;t<i;t++){let r=a[t],i=Y(e,r).options;if(i.head||i.scripts)try{let t={ssr:e.options.ssr,matches:a,match:r,params:r.params,loaderData:r.loaderData},[o,s]=await J(Promise.all([i.head?.(t),i.scripts?.(t)]),n);r.meta=o?.meta,r.links=o?.links,r.headScripts=o?.scripts,r.styles=o?.styles,r.scripts=s}catch(e){if(e===n&&n.aborted)break;console.error(e)}if(r.status!==`success`||r._notFound)break}return t}async function Tr(e,t,n,r){let i=[t,n],a=r[0].signal,o;try{let t=e.stores.matches.get(),s=n.findIndex(e=>e._notFound);if(e.options.notFoundMode!==`root`&&s>=0){let t=await yr(e,n,void 0,a,s);n[s]._notFound=void 0,n[t]._notFound=!0,s=t}let c=s<0?n.length:s+1,l=0;for(;l<c&&l!==s;){let e=n[l],i=r[2][l],a=t[l];if(i?.id!==e.id||i.status!==`success`||e.preload||a?.id!==e.id||a.status!==`success`||(l++,i._notFound||a._notFound))break}let u=[],d=r[6]??0,f=d?Promise.resolve(n[d-1]):void 0,p=()=>{for(let t=d;t<c&&!a.aborted;t++)f=vr(e,i,t,u,f,r,l)},m=await lr(e,i,r,c,p,l);if(m){if(r[4]=!0,c=m[0],m[1][0]===ir){let t=await yr(e,n,m,a);m[2]=t,c=Math.min(c,t+1)}else m[1][0]>=K&&(c=0);p()}if(!a.aborted&&!r[3]){let t=[];for(let[n,r]of e._flights??[])r[2]||(e._flights.delete(n),t.push(r[1]));for(let e of t)e.abort()}let h=Cr(e,i,u,r[0],xr(u,m,i[2]),r[7]);i[2]?.length&&(i[3]=xr(i[2],void 0,void 0,h.then(e=>ar(e)?0:nr(n).length,()=>0))),o=await h}catch(t){if(br(e,i),t===a&&a.aborted)return q;throw t}return ar(o)?o:wr(e,o,a,r[6]===n.length?r[6]:0)}function Er(e,t){if(e._tx!==t)return;let n=t[3],r=e.stores.matches.get(),i=e._pending;for(let a=0;a<n.length;a++){let o=n[a],s=o.status===`success`&&!o._notFound,c=r[a]?.id===o.id&&r[a]?.status===`pending`;if(s&&!c)continue;let l=Y(e,o),u=s||o.invalid?0:l.options.pendingMs??e.options.defaultPendingMs,d=l.options.pendingComponent??e.options.defaultPendingComponent;if(!d||typeof u!=`number`||u===1/0){i&&(i[0]=t,i[2]=0,i[4]=!0);return}let f=l.options.pendingMinMs??e.options.defaultPendingMinMs??0,p=!1;if(i?.[1]===o.id?(p=i[0]!==t,i[0]=t):(clearTimeout(i?.[3]),e._pending=i=void 0),i||(e._pending=i=[t,o.id,c?Date.now()+f:t[4]+u,void 0,c||void 0,d]),i[4]&&!p&&i[5]===d)return;if(i[5]=d,!i[4]){clearTimeout(i[3]);let n=i[2]-Date.now();if(n>0){i[3]=setTimeout(()=>Er(e,t),n);return}i[2]=0}let m=n.map(e=>({...e,_flight:void 0}));m[a].status=`pending`;let h=i[4]=e.startTransition(()=>e.stores.setMatches(m),m).then(t=>(t&&e._pending===i&&i[4]===h&&!i[2]&&(i[2]=Date.now()+f),t));return}}function Dr(e,t){let n=e._pending;e._tx!==t&&e._tx?.[3].some(e=>e.id===n?.[1])||(clearTimeout(n?.[3]),e._pending=void 0)}async function Or(e,t){let n=e._pending;if(!n)return;clearTimeout(n[3]);let r=n[2]-Date.now();if(!n[4]||r<=0||!nr(t[3]).some(e=>e.id===n[1]))return;let i;try{await J(new Promise(e=>{i=setTimeout(e,r)}),t[0].signal)}catch{}clearTimeout(i)}function kr(e,t){e._committed=t,e.stores.setMatches(t)}function Ar(e,t,n,r){let i=e._committed,a=e._lifecycleEnd,o=e._cache;for(let e of n)e.preload=!1,r&&(e._assetEnd=void 0);let s=nr(n).length,c=new Map;{let t=Date.now(),r=new Set;for(let e=0;e<n.length;e++){let t=n[e];(e<s||t.status===`success`)&&r.add(t.id)}for(let n of[...i,...o.values()]){if(n.status!==`success`||r.has(n.id))continue;let i=Y(e,n);!i.options.loader||t-n.updatedAt>=(n.preload?i.options.preloadGcTime??e.options.defaultPreloadGcTime??3e5:i.options.gcTime??e.options.defaultGcTime??3e5)||c.set(n.id,o.get(n.id)===n?n:{...n,_flight:void 0,isFetching:!1,context:{}})}}t[3]=[],e._cache=c;let l=e._lifecycleEnd=Bn(n);kr(e,n),Z(e,[...o.values(),...i].filter(e=>e._flight&&c.get(e.id)!==e),n),Vn(e,i,n,a,l,t)}async function jr(e,t){let n=e._tx;for(;n&&n!==t;)t=n,await n[5],n=e._tx}function Mr(e,t,n){let r=n[1].options,i=n[2];if(!i)return e.navigate({...r,replace:!0,ignoreBlocker:!0});if(r.reloadDocument)return e.navigate({href:(i.maskedLocation??i).publicHref,reloadDocument:!0,replace:!0,ignoreBlocker:!0});i._redirects=t[1]+1,e._pendingLocation=i;let a=e.commitLocation({...i,viewTransition:r.viewTransition,replace:!0,resetScroll:r.resetScroll,hashScrollIntoView:r.hashScrollIntoView,ignoreBlocker:!0});return queueMicrotask(()=>{e._pendingLocation===i&&(e._pendingLocation=void 0)}),a}async function Nr(e,t,n,r,i){let a=n.map(e=>({...e}));dr(a);for(let t of r)X(e,a[t[0]]),a[t[0]]=t[3];let o=[t[2],a],s;try{s=await Cr(e,o,r,t[0],i)}catch(t){throw Z(e,a),t}if(ar(s))Z(e,a),s[0]===K&&e._tx===t&&e._committed===n&&await Mr(e,t,s);else if(await wr(e,s,t[0].signal),e._tx!==t||e._committed!==n)Z(e,a);else{for(let t of a){let n=e._cache.get(t.id);n?._flight&&n._flight===t._flight&&(e._cache.delete(t.id),X(e,n))}kr(e,a),Z(e,n,a)}}async function Pr(e,t,n,r,i,a){let o=await Tr(e,t[2],t[3],[t[0],t[1],e._committed,void 0,i,n,a,r]);if(ar(o)){let n=o[0]===K&&e._tx===t;if((!n||o[1].options.reloadDocument)&&Dr(e,t),Z(e,t[3]),t[3]=[],!n)return;if(e._tx!==t){Dr(e,t);return}await Mr(e,t,o);return}let s=o[1];if(e._tx===t&&await Or(e,t),e._tx!==t){Dr(e,t),Z(e,s),br(e,o);return}let c=t[2],l=Rn(c,e.stores.resolvedLocation.get()),u=o[2];await e.startViewTransition(async()=>{if(e._tx===t&&await Or(e,t),e._tx!==t){Dr(e,t),Z(e,s),br(e,o);return}let n=await e.startTransition(()=>{Dr(e,t),Ar(e,t,s,a),e._tx===t&&(e.emit({type:`onLoad`,...l}),e._tx===t&&e.emit({type:`onBeforeRouteMount`,...l}))},s);e._tx===t?(u?.length&&Nr(e,t,s,u,o[3]).catch(console.error),e.batch(()=>{e.stores.resolvedLocation.set(c),e.stores.status.set(`idle`),e._tx===t&&e.emit({type:`onResolved`,...l}),n&&e._tx===t&&e.emit({type:`onRendered`,...l})}),e._tx===t&&(e._commitPromise?.resolve(),e._commitPromise=void 0)):br(e,o)})}async function Fr(e,t){let n=e._tx,r=e.stores.resolvedLocation.get(),i=r??e.stores.location.get(),a=e.latestLocation,o=e._pendingLocation,s=o?.href===a.href?o._redirects??0:0,c=e._handoff,l=c?.[0](),u=new AbortController,d=e._preflight;if(e._preflight=u,l||c?.[1](),d?.abort(),!u.signal.aborted){let t=Rn(a,r);e.emit({type:`onBeforeNavigate`,...t}),u.signal.aborted||e.emit({type:`onBeforeLoad`,...t})}if(u.signal.aborted){await jr(e,n);return}let f=i.href===a.href,p=u,m=e.matchRoutes(a,{_controller:u});dr(m);let h=l?c[1](m):void 0;if(h?p=l:l?.abort(),u.signal.aborted){Z(e,m),await jr(e,n);return}e._preflight=void 0;let g,_=()=>Pr(e,y,f,()=>Er(e,y),t?.sync,h),v=t?.sync?new Promise(e=>g=e):Promise.resolve().then(_),y=[p,s,a,m,Date.now(),v.then(()=>jr(e,y))];if(e._tx=y,n){for(let t of e.stores.matches.get()){if(e._tx!==y)break;t.isFetching&&fr(e,t,!1)}n[0].abort(),Z(e,n[3],y[3],!0)}e._tx===y?(e.batch(()=>{e.stores.status.set(`pending`),e.stores.location.set(a)}),(h||!e._committed.length&&m[0]?.status!==`success`&&!m.some(e=>e._notFound))&&Er(e,y),g?.(_()),await y[5]):(Z(e,y[3]),y[3]=[],g?.(),await jr(e,y))}async function Ir(e,t){let n=e.buildLocation(t);for(let t=0;;t++){let r=e._committed,i=new AbortController,a,o,s;try{try{a=e.matchRoutes(n,{_controller:i}),dr(a),o=(e._preloads??=new Map).set(i,a),s=await Tr(e,n,a,[i,t,r,!0])}finally{o&&(o=o.delete(i),Z(e,a)),i.abort()}if(!ar(s))return s[1];if(!o||s.length<3)return;n=s[2]}catch(e){L(e)||console.error(e);return}}}async function Lr(e){let t=window.$_TSR,n=e.options.serializationAdapters;n?.length&&(t.t=new Map(n.map(e=>[e.key,e.fromSerializable])),t.buffer.forEach(e=>e())),t.initialized=!0;let r=t.router;e.ssr={manifest:r.manifest},e.options.ssr={nonce:document.querySelector(`meta[property="csp-nonce"]`)?.content};let i=r.matches,a=new AbortController,o=e._preflight;e._preflight=a,o?.abort();let s=()=>e._preflight===a,c,l,u,d;try{if(await J(e.options.hydrate?.(r.dehydratedData),a.signal),!s())return;let t=e.history.location;u=t.href,d=t.state,e.updateLatestLocation(),c=e.latestLocation,e.stores.location.set(c),l=e.matchRoutes(c,{_controller:a})}catch(t){if(s()&&(e._preflight=void 0),a.abort(t),t!==a.signal)throw t}if(!s())return;let f=[],p,m=0,h=t=>{m=Math.min(m,t+1);let n=f.splice(t);for(let t of n)Y(e,t).options.loader&&(t.status===`success`||!t.invalid&&`loaderData`in t)&&gr(e,{...t,status:`success`,error:void 0,preload:!0},e._cache.get(t.id));Z(e,n)},g=i.length>l.length?l.findIndex(e=>e._notFound)+1:i.length,_=!1;for(let t=0;t<g;t++){let n=l[t],r=i[t];if(typeof r.i!=`string`||Mt(r.i)!==n.id){p??=t;break}m=t+1;let a=Y(e,n);if((`l`in r||r.s===`success`&&r.e===void 0&&a.options.loader)&&(n.loaderData=r.l),n.status=r.s,n.ssr=r.ssr,a.options.ssr=n.ssr,n.updatedAt=r.u,n.error=r.e,n._notFound||=r.g,n.status===`error`||n.status===`notFound`||n._notFound){_=!0,f.push(n),(n.ssr===!1||n.ssr===`data-only`)&&(p??=t);break}if(n.status===`pending`){p??=t;break}f.push(n),n.ssr===`data-only`&&(p??=t)}!_&&f.length===g&&g<l.length&&(p=g);let v=f.map(async t=>{try{let n=Y(e,t);return await(t._notFound?Promise.all([U(n),U(n,`notFoundComponent`)]):U(n,t.status===`error`?`errorComponent`:t.status===`notFound`?`notFoundComponent`:void 0)),!0}catch{return!1}}),y=0;try{for(;y<v.length&&await J(v[y],a.signal);)y++}catch{return}if(!s())return;y<f.length&&h(y);let b=Math.max(p===f.length?f.length+1:f.length,y<v.length?y:m);for(let t=0;t<b;t++){let n=l[t],r=Y(e,n),o=l[t-1]?.context??e.options.context??{},u;if(r.options.context){try{u=n._ctx=r.options.context({deps:n.loaderDeps,params:n.params,context:o,location:c,navigate:t=>e.navigate({...t,_fromLocation:c}),buildLocation:e.buildLocation,cause:n.cause,abortController:a,preload:!1,matches:l,routeId:r.id})||{}}catch{if(!s())return;if(n.status!==`error`&&n.status!==`notFound`&&!n._notFound){p=Math.min(p??t,t),h(t);break}}if(!s())return}n.context={...o,...u,...f[t]&&i[t].b}}if(await wr(e,[c,l],a.signal,0,m),!s())return;let x=p!==void 0||f.length<g,S=_&&f.length===g?l:f,C=x?l:S,w;if(x&&p!==void 0){let e=C[p];w=e.ssr===`data-only`&&m>p+1?m:void 0,C=C.slice(),C[p]={...e,status:`pending`,ssr:e.ssr===`data-only`&&`data-only`,_assetEnd:w}}let T=()=>{let t=e.history.location;return x&&!e._tx&&t.href===u&&t.state===d&&e._committed===S&&S.length&&!a.signal.aborted?a:void 0},E=[T,t=>{if(e._handoff!==E)return;e._handoff=void 0;let n=S.length;if(!t||!T()||S.some((e,n)=>e.id!==t[n]?.id)){a.abort();return}let r=w;if(r!==void 0){for(let e=n;e<r;e++)if(l[e]?.id!==t[e]?.id){r=e>p+1?e:void 0;break}}let i=S.map(e=>({...e}));r!==void 0&&(i[p]._assetEnd=r),Z(e,t.splice(0,n,...i));for(let e=n;e<t.length;e++){let n=t[e],r=l[e];r?.id===n.id&&r._ctx&&(n._ctx=r._ctx),n.abortController=a}return n}];e._committed=S,e._lifecycleEnd=Bn(S),e._handoff=E,e._preflight=void 0,e.batch(()=>{e.stores.setMatches(C),e.stores.status.set(`idle`),x||e.stores.resolvedLocation.set(e.stores.location.get())})}var Q=t(e(),1),$=n(),Rr=class extends Q.Component{constructor(...e){super(...e),this.state={error:0},this.reset=()=>{this.setState({error:0})}}static getDerivedStateFromProps(e,t){let n=e.getResetKey();return t.error&&t.resetKey!==n?{resetKey:n,error:0}:{resetKey:n}}static getDerivedStateFromError(e){return{error:[e]}}componentDidCatch(e,t){this.props.onCatch?.(e,t)}render(){let e=this.state.error;return e?Q.createElement(this.props.errorComponent??zr,{error:e[0],reset:this.reset}):this.props.children}};function zr({error:e}){let[t,n]=Q.useState(!1);return(0,$.jsxs)(`div`,{style:{padding:`.5rem`,maxWidth:`100%`},children:[(0,$.jsxs)(`div`,{style:{display:`flex`,alignItems:`center`,gap:`.5rem`},children:[(0,$.jsx)(`strong`,{style:{fontSize:`1rem`},children:`Something went wrong!`}),(0,$.jsx)(`button`,{style:{appearance:`none`,fontSize:`.6em`,border:`1px solid currentColor`,padding:`.1rem .2rem`,fontWeight:`bold`,borderRadius:`.25rem`},onClick:()=>n(e=>!e),children:t?`Hide Error`:`Show Error`})]}),(0,$.jsx)(`div`,{style:{height:`.25rem`}}),t?(0,$.jsx)(`div`,{children:(0,$.jsx)(`pre`,{style:{fontSize:`.7em`,border:`1px solid red`,borderRadius:`.25rem`,padding:`.3rem`,color:`red`,overflow:`auto`},children:e?.message?(0,$.jsx)(`code`,{children:e.message}):null})}):null]})}function Br(e){let t=R(),n=`not-found-${z(t.stores.location,e=>e.pathname)}-${z(t.stores.status)}`;return(0,$.jsx)(Rr,{getResetKey:()=>n,onCatch:(t,n)=>{if(L(t))e.onCatch?.(t,n);else throw t},errorComponent:({error:t})=>{if(L(t))return e.fallback?.(t);throw t},children:e.children})}function Vr(){return(0,$.jsx)(`p`,{children:`Not Found`})}function Hr(e,t,n){return t.options.notFoundComponent?(0,$.jsx)(t.options.notFoundComponent,{...n}):e.options.defaultNotFoundComponent?(0,$.jsx)(e.options.defaultNotFoundComponent,{...n}):(0,$.jsx)(Vr,{})}function Ur(e,t){let n=t?.options.pendingComponent??e.options.defaultPendingComponent;return n?(0,$.jsx)(n,{}):null}var Wr=(e,t)=>e[0]===t[0]&&e[1]===t[1],Gr=(e,t,n)=>!t.isRoot||t.options.shellComponent||t.options.wrapInSuspense||n===!1||n===`data-only`||!e.ssr,Kr=Q.memo(function({routeId:e}){let t=R();return(0,$.jsx)(qr,{router:t,match:z(t.stores.getMatchStore(e))})});function qr({router:e,match:t}){let n=e.routesById[t.routeId],r=Ur(e,n),i=n.options.errorComponent??e.options.defaultErrorComponent,a=n.options.onCatch??e.options.defaultOnCatch,o=n.isRoot?n.options.notFoundComponent??e.options.notFoundRoute?.options.component:n.options.notFoundComponent,s=t.ssr===!1||t.ssr===`data-only`,c=Gr(e,n,t.ssr)&&(n.options.wrapInSuspense??r??(n.options.errorComponent?.preload||s)),l=(0,$.jsx)(Jr,{match:t});s&&(l=(0,$.jsx)(ve,{fallback:r,children:l})),o&&(l=(0,$.jsx)(Br,{fallback:e=>{if(e.routeId??=t.routeId,e.routeId!==t.routeId)throw e;return Q.createElement(o,e)},children:l})),i&&(l=(0,$.jsx)(Rr,{getResetKey:()=>t,errorComponent:i,onCatch:(e,n)=>{if(L(e))throw e.routeId??=t.routeId,e;a?.(e,n)},children:l})),c&&(l=(0,$.jsx)(Q.Suspense,{fallback:r,children:l}));let u=n.isRoot?n.options.shellComponent:void 0;return(0,$.jsx)(ht.Provider,{value:t.routeId,children:u?(0,$.jsxs)(u,{children:[l,null]}):(0,$.jsxs)($.Fragment,{children:[l,null]})})}var Jr=Q.memo(function({match:e}){let t=R(),n=e.routeId,r=t.routesById[n],i=Q.useMemo(()=>{let i=(r.options.remountDeps??t.options.defaultRemountDeps)?.({routeId:n,loaderDeps:e.loaderDeps,params:e._strictParams,search:e._strictSearch});return i?JSON.stringify(i):void 0},[n,e.loaderDeps,e._strictParams,e._strictSearch,r.options.remountDeps,t.options.defaultRemountDeps]),a=Q.useMemo(()=>{let e=r.options.component??t.options.defaultComponent;return e?(0,$.jsx)(e,{},i):(0,$.jsx)(Yr,{})},[i,r.options.component,t.options.defaultComponent]);if(e.status===`pending`){if(t.ssr&&!Gr(t,r,e.ssr))return a;if(t._tx)throw t._tx[5];return Ur(t,r)}if(e.status===`notFound`)return Hr(t,r,e.error);if(e.status===`error`)throw e.error;return a}),Yr=Q.memo(function(){let e=R(),t=Q.useContext(ht),n,r,i;{let a=e.stores.getMatchStore(t);[n,r]=z(a,e=>[!!e._notFound,e.error],{compare:Wr}),i=z(e.stores.ids,e=>e[e.indexOf(t)+1])}if(n)return Hr(e,e.routesById[t],r);if(!i)return null;let a=(0,$.jsx)(Kr,{routeId:i});return t===`__root__`?(0,$.jsx)(Q.Suspense,{fallback:Ur(e),children:a}):a});function Xr(e,t){let n=e[1];e.length=0,n?.(t)}function Zr({t:e}){let t=R(),n=t._rendered??=[];return t.startTransition=(r,i)=>new Promise(a=>{Xr(n,!1),n.push(i,a),e(t),Q.startTransition(r)}),ft(()=>{let e=t.history.subscribe(t.load);t.updateLatestLocation();let r=t.latestLocation,i=t.buildLocation({to:r.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});if(u(r.publicHref)!==u(i.publicHref))return t.commitLocation({...i,replace:!0,ignoreBlocker:!0}),e;let a=t.stores.resolvedLocation.get();return a?.href===r.href&&a.state.__TSR_key===r.state.__TSR_key?n.push(t.stores.matches.get(),e=>{e&&t.emit({type:`onRendered`,...Rn(a,a)})}):t._tx||t.load({sync:!0}).catch(console.error),e},[t,t.history]),null}function Qr(){let e=R(),t=e.routesById[ct],n=Ur(e,t),r=(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(Zr,{t:Q.useState()[1]}),e.ssr?(0,$.jsx)($r,{}):(0,$.jsx)(Q.Suspense,{fallback:n,children:(0,$.jsx)($r,{})})]});return e.options.InnerWrap?(0,$.jsx)(e.options.InnerWrap,{children:r}):r}function $r(){let e=R(),t=e._rendered,n=z(e.stores.matches,e=>t[0]??e),r=n[0],i=r?.routeId;ft(()=>{t[0]===n&&Xr(t,!0)},[t,n]);let a=i?(0,$.jsx)(Kr,{routeId:i}):null;return e.options.disableGlobalCatchBoundary?a:(0,$.jsx)(Rr,{getResetKey:()=>r,onCatch:void 0,children:a})}function ei(e){let t=R();return z(t.stores.matches,at(e,t))}function ti(e){let t=R({warn:e?.router===void 0}),n=e?.router||t;return z(n.stores.__store,at(e,n))}function ni(e,t){return a(e,Pe,t)}function ri({className:e,...t}){return(0,$.jsx)(`div`,{"data-slot":`skeleton`,className:i(`animate-pulse rounded-md bg-muted`,e),...t})}var ii=new Map([[`bold`,Q.createElement(Q.Fragment,null,Q.createElement(`path`,{d:`M228,104a12,12,0,0,1-24,0V69l-59.51,59.51a12,12,0,0,1-17-17L187,52H152a12,12,0,0,1,0-24h64a12,12,0,0,1,12,12Zm-44,24a12,12,0,0,0-12,12v64H52V84h64a12,12,0,0,0,0-24H48A20,20,0,0,0,28,80V208a20,20,0,0,0,20,20H176a20,20,0,0,0,20-20V140A12,12,0,0,0,184,128Z`}))],[`duotone`,Q.createElement(Q.Fragment,null,Q.createElement(`path`,{d:`M184,80V208a8,8,0,0,1-8,8H48a8,8,0,0,1-8-8V80a8,8,0,0,1,8-8H176A8,8,0,0,1,184,80Z`,opacity:`0.2`}),Q.createElement(`path`,{d:`M224,104a8,8,0,0,1-16,0V59.32l-66.33,66.34a8,8,0,0,1-11.32-11.32L196.68,48H152a8,8,0,0,1,0-16h64a8,8,0,0,1,8,8Zm-40,24a8,8,0,0,0-8,8v72H48V80h72a8,8,0,0,0,0-16H48A16,16,0,0,0,32,80V208a16,16,0,0,0,16,16H176a16,16,0,0,0,16-16V136A8,8,0,0,0,184,128Z`}))],[`fill`,Q.createElement(Q.Fragment,null,Q.createElement(`path`,{d:`M192,136v72a16,16,0,0,1-16,16H48a16,16,0,0,1-16-16V80A16,16,0,0,1,48,64h72a8,8,0,0,1,0,16H48V208H176V136a8,8,0,0,1,16,0Zm32-96a8,8,0,0,0-8-8H152a8,8,0,0,0-5.66,13.66L172.69,72l-42.35,42.34a8,8,0,0,0,11.32,11.32L184,83.31l26.34,26.35A8,8,0,0,0,224,104Z`}))],[`light`,Q.createElement(Q.Fragment,null,Q.createElement(`path`,{d:`M222,104a6,6,0,0,1-12,0V54.49l-69.75,69.75a6,6,0,0,1-8.48-8.48L201.51,46H152a6,6,0,0,1,0-12h64a6,6,0,0,1,6,6Zm-38,26a6,6,0,0,0-6,6v72a2,2,0,0,1-2,2H48a2,2,0,0,1-2-2V80a2,2,0,0,1,2-2h72a6,6,0,0,0,0-12H48A14,14,0,0,0,34,80V208a14,14,0,0,0,14,14H176a14,14,0,0,0,14-14V136A6,6,0,0,0,184,130Z`}))],[`regular`,Q.createElement(Q.Fragment,null,Q.createElement(`path`,{d:`M224,104a8,8,0,0,1-16,0V59.32l-66.33,66.34a8,8,0,0,1-11.32-11.32L196.68,48H152a8,8,0,0,1,0-16h64a8,8,0,0,1,8,8Zm-40,24a8,8,0,0,0-8,8v72H48V80h72a8,8,0,0,0,0-16H48A16,16,0,0,0,32,80V208a16,16,0,0,0,16,16H176a16,16,0,0,0,16-16V136A8,8,0,0,0,184,128Z`}))],[`thin`,Q.createElement(Q.Fragment,null,Q.createElement(`path`,{d:`M220,104a4,4,0,0,1-8,0V49.66l-73.16,73.17a4,4,0,0,1-5.66-5.66L206.34,44H152a4,4,0,0,1,0-8h64a4,4,0,0,1,4,4Zm-36,28a4,4,0,0,0-4,4v72a4,4,0,0,1-4,4H48a4,4,0,0,1-4-4V80a4,4,0,0,1,4-4h72a4,4,0,0,0,0-8H48A12,12,0,0,0,36,80V208a12,12,0,0,0,12,12H176a12,12,0,0,0,12-12V136A4,4,0,0,0,184,132Z`}))]]),ai=Q.forwardRef((e,t)=>Q.createElement(ce,{ref:t,...e,weights:ii}));ai.displayName=`ArrowSquareOutIcon`;var oi=new Map([[`bold`,Q.createElement(Q.Fragment,null,Q.createElement(`path`,{d:`M184.49,136.49l-80,80a12,12,0,0,1-17-17L159,128,87.51,56.49a12,12,0,1,1,17-17l80,80A12,12,0,0,1,184.49,136.49Z`}))],[`duotone`,Q.createElement(Q.Fragment,null,Q.createElement(`path`,{d:`M176,128,96,208V48Z`,opacity:`0.2`}),Q.createElement(`path`,{d:`M181.66,122.34l-80-80A8,8,0,0,0,88,48V208a8,8,0,0,0,13.66,5.66l80-80A8,8,0,0,0,181.66,122.34ZM104,188.69V67.31L164.69,128Z`}))],[`fill`,Q.createElement(Q.Fragment,null,Q.createElement(`path`,{d:`M181.66,133.66l-80,80A8,8,0,0,1,88,208V48a8,8,0,0,1,13.66-5.66l80,80A8,8,0,0,1,181.66,133.66Z`}))],[`light`,Q.createElement(Q.Fragment,null,Q.createElement(`path`,{d:`M180.24,132.24l-80,80a6,6,0,0,1-8.48-8.48L167.51,128,91.76,52.24a6,6,0,0,1,8.48-8.48l80,80A6,6,0,0,1,180.24,132.24Z`}))],[`regular`,Q.createElement(Q.Fragment,null,Q.createElement(`path`,{d:`M181.66,133.66l-80,80a8,8,0,0,1-11.32-11.32L164.69,128,90.34,53.66a8,8,0,0,1,11.32-11.32l80,80A8,8,0,0,1,181.66,133.66Z`}))],[`thin`,Q.createElement(Q.Fragment,null,Q.createElement(`path`,{d:`M178.83,130.83l-80,80a4,4,0,0,1-5.66-5.66L170.34,128,93.17,50.83a4,4,0,0,1,5.66-5.66l80,80A4,4,0,0,1,178.83,130.83Z`}))]]),si=Q.forwardRef((e,t)=>Q.createElement(ce,{ref:t,...e,weights:oi}));si.displayName=`CaretRightIcon`;var ci=new Map([[`bold`,Q.createElement(Q.Fragment,null,Q.createElement(`path`,{d:`M128,20A108,108,0,1,0,236,128,108.12,108.12,0,0,0,128,20Zm0,192a84,84,0,1,1,84-84A84.09,84.09,0,0,1,128,212Zm68-84a12,12,0,0,1-12,12H128a12,12,0,0,1-12-12V72a12,12,0,0,1,24,0v44h44A12,12,0,0,1,196,128Z`}))],[`duotone`,Q.createElement(Q.Fragment,null,Q.createElement(`path`,{d:`M224,128a96,96,0,1,1-96-96A96,96,0,0,1,224,128Z`,opacity:`0.2`}),Q.createElement(`path`,{d:`M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Zm64-88a8,8,0,0,1-8,8H128a8,8,0,0,1-8-8V72a8,8,0,0,1,16,0v48h48A8,8,0,0,1,192,128Z`}))],[`fill`,Q.createElement(Q.Fragment,null,Q.createElement(`path`,{d:`M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm56,112H128a8,8,0,0,1-8-8V72a8,8,0,0,1,16,0v48h48a8,8,0,0,1,0,16Z`}))],[`light`,Q.createElement(Q.Fragment,null,Q.createElement(`path`,{d:`M128,26A102,102,0,1,0,230,128,102.12,102.12,0,0,0,128,26Zm0,192a90,90,0,1,1,90-90A90.1,90.1,0,0,1,128,218Zm62-90a6,6,0,0,1-6,6H128a6,6,0,0,1-6-6V72a6,6,0,0,1,12,0v50h50A6,6,0,0,1,190,128Z`}))],[`regular`,Q.createElement(Q.Fragment,null,Q.createElement(`path`,{d:`M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Zm64-88a8,8,0,0,1-8,8H128a8,8,0,0,1-8-8V72a8,8,0,0,1,16,0v48h48A8,8,0,0,1,192,128Z`}))],[`thin`,Q.createElement(Q.Fragment,null,Q.createElement(`path`,{d:`M128,28A100,100,0,1,0,228,128,100.11,100.11,0,0,0,128,28Zm0,192a92,92,0,1,1,92-92A92.1,92.1,0,0,1,128,220Zm60-92a4,4,0,0,1-4,4H128a4,4,0,0,1-4-4V72a4,4,0,0,1,8,0v52h52A4,4,0,0,1,188,128Z`}))]]),li=Q.forwardRef((e,t)=>Q.createElement(ce,{ref:t,...e,weights:ci}));li.displayName=`ClockIcon`;var ui=new Map([[`bold`,Q.createElement(Q.Fragment,null,Q.createElement(`path`,{d:`M228,64a36,36,0,1,0-48,33.94V112a4,4,0,0,1-4,4H80a4,4,0,0,1-4-4V97.94a36,36,0,1,0-24,0V112a28,28,0,0,0,28,28h36v18.06a36,36,0,1,0,24,0V140h36a28,28,0,0,0,28-28V97.94A36.07,36.07,0,0,0,228,64ZM64,52A12,12,0,1,1,52,64,12,12,0,0,1,64,52Zm64,152a12,12,0,1,1,12-12A12,12,0,0,1,128,204ZM192,76a12,12,0,1,1,12-12A12,12,0,0,1,192,76Z`}))],[`duotone`,Q.createElement(Q.Fragment,null,Q.createElement(`path`,{d:`M88,64A24,24,0,1,1,64,40,24,24,0,0,1,88,64ZM192,40a24,24,0,1,0,24,24A24,24,0,0,0,192,40Z`,opacity:`0.2`}),Q.createElement(`path`,{d:`M224,64a32,32,0,1,0-40,31v17a8,8,0,0,1-8,8H80a8,8,0,0,1-8-8V95a32,32,0,1,0-16,0v17a24,24,0,0,0,24,24h40v25a32,32,0,1,0,16,0V136h40a24,24,0,0,0,24-24V95A32.06,32.06,0,0,0,224,64ZM48,64A16,16,0,1,1,64,80,16,16,0,0,1,48,64Zm96,128a16,16,0,1,1-16-16A16,16,0,0,1,144,192ZM192,80a16,16,0,1,1,16-16A16,16,0,0,1,192,80Z`}))],[`fill`,Q.createElement(Q.Fragment,null,Q.createElement(`path`,{d:`M224,64a32,32,0,1,0-40,31v17a8,8,0,0,1-8,8H80a8,8,0,0,1-8-8V95a32,32,0,1,0-16,0v17a24,24,0,0,0,24,24h40v25a32,32,0,1,0,16,0V136h40a24,24,0,0,0,24-24V95A32.06,32.06,0,0,0,224,64ZM144,192a16,16,0,1,1-16-16A16,16,0,0,1,144,192Z`}))],[`light`,Q.createElement(Q.Fragment,null,Q.createElement(`path`,{d:`M222,64a30,30,0,1,0-36,29.4V112a10,10,0,0,1-10,10H80a10,10,0,0,1-10-10V93.4a30,30,0,1,0-12,0V112a22,22,0,0,0,22,22h42v28.6a30,30,0,1,0,12,0V134h42a22,22,0,0,0,22-22V93.4A30.05,30.05,0,0,0,222,64ZM46,64A18,18,0,1,1,64,82,18,18,0,0,1,46,64ZM146,192a18,18,0,1,1-18-18A18,18,0,0,1,146,192ZM192,82a18,18,0,1,1,18-18A18,18,0,0,1,192,82Z`}))],[`regular`,Q.createElement(Q.Fragment,null,Q.createElement(`path`,{d:`M224,64a32,32,0,1,0-40,31v17a8,8,0,0,1-8,8H80a8,8,0,0,1-8-8V95a32,32,0,1,0-16,0v17a24,24,0,0,0,24,24h40v25a32,32,0,1,0,16,0V136h40a24,24,0,0,0,24-24V95A32.06,32.06,0,0,0,224,64ZM48,64A16,16,0,1,1,64,80,16,16,0,0,1,48,64Zm96,128a16,16,0,1,1-16-16A16,16,0,0,1,144,192ZM192,80a16,16,0,1,1,16-16A16,16,0,0,1,192,80Z`}))],[`thin`,Q.createElement(Q.Fragment,null,Q.createElement(`path`,{d:`M220,64a28,28,0,1,0-32,27.71V112a12,12,0,0,1-12,12H80a12,12,0,0,1-12-12V91.71a28,28,0,1,0-8,0V112a20,20,0,0,0,20,20h44v32.29a28,28,0,1,0,8,0V132h44a20,20,0,0,0,20-20V91.71A28,28,0,0,0,220,64ZM44,64A20,20,0,1,1,64,84,20,20,0,0,1,44,64ZM148,192a20,20,0,1,1-20-20A20,20,0,0,1,148,192ZM192,84a20,20,0,1,1,20-20A20,20,0,0,1,192,84Z`}))]]),di=Q.forwardRef((e,t)=>Q.createElement(ce,{ref:t,...e,weights:ui}));di.displayName=`GitForkIcon`;var fi=new Map([[`bold`,Q.createElement(Q.Fragment,null,Q.createElement(`path`,{d:`M152.5,156.54a72,72,0,1,0-89,0,124,124,0,0,0-48.69,35.74,12,12,0,0,0,18.38,15.44C46.88,191.42,71,172,108,172s61.12,19.42,74.81,35.72a12,12,0,1,0,18.38-15.44A123.89,123.89,0,0,0,152.5,156.54ZM60,100a48,48,0,1,1,48,48A48.05,48.05,0,0,1,60,100Zm192.49,36.49-32,32a12,12,0,0,1-17,0l-16-16a12,12,0,0,1,17-17L212,143l23.51-23.52a12,12,0,1,1,17,17Z`}))],[`duotone`,Q.createElement(Q.Fragment,null,Q.createElement(`path`,{d:`M168,100a60,60,0,1,1-60-60A60,60,0,0,1,168,100Z`,opacity:`0.2`}),Q.createElement(`path`,{d:`M144,157.68a68,68,0,1,0-71.9,0c-20.65,6.76-39.23,19.39-54.17,37.17a8,8,0,0,0,12.25,10.3C50.25,181.19,77.91,168,108,168s57.75,13.19,77.87,37.15a8,8,0,0,0,12.25-10.3C183.18,177.07,164.6,164.44,144,157.68ZM56,100a52,52,0,1,1,52,52A52.06,52.06,0,0,1,56,100Zm197.66,33.66-32,32a8,8,0,0,1-11.32,0l-16-16a8,8,0,0,1,11.32-11.32L216,148.69l26.34-26.35a8,8,0,0,1,11.32,11.32Z`}))],[`fill`,Q.createElement(Q.Fragment,null,Q.createElement(`path`,{d:`M253.66,133.66l-32,32a8,8,0,0,1-11.32,0l-16-16a8,8,0,0,1,11.32-11.32L216,148.69l26.34-26.35a8,8,0,0,1,11.32,11.32ZM144,157.68a68,68,0,1,0-71.9,0c-20.65,6.76-39.23,19.39-54.17,37.17A8,8,0,0,0,24,208H192a8,8,0,0,0,6.13-13.15C183.18,177.07,164.6,164.44,144,157.68Z`}))],[`light`,Q.createElement(Q.Fragment,null,Q.createElement(`path`,{d:`M139,158.25a66,66,0,1,0-62,0c-22,6.23-41.88,19.16-57.61,37.89a6,6,0,0,0,9.18,7.72C49.11,179.44,77.31,166,108,166s58.9,13.44,79.41,37.86a6,6,0,1,0,9.18-7.72C180.86,177.41,161,164.48,139,158.25ZM54,100a54,54,0,1,1,54,54A54.06,54.06,0,0,1,54,100Zm198.24,32.24-32,32a6,6,0,0,1-8.48,0l-16-16a6,6,0,0,1,8.48-8.48L216,151.51l27.76-27.75a6,6,0,1,1,8.48,8.48Z`}))],[`regular`,Q.createElement(Q.Fragment,null,Q.createElement(`path`,{d:`M144,157.68a68,68,0,1,0-71.9,0c-20.65,6.76-39.23,19.39-54.17,37.17a8,8,0,0,0,12.25,10.3C50.25,181.19,77.91,168,108,168s57.75,13.19,77.87,37.15a8,8,0,0,0,12.25-10.3C183.18,177.07,164.6,164.44,144,157.68ZM56,100a52,52,0,1,1,52,52A52.06,52.06,0,0,1,56,100Zm197.66,33.66-32,32a8,8,0,0,1-11.32,0l-16-16a8,8,0,0,1,11.32-11.32L216,148.69l26.34-26.35a8,8,0,0,1,11.32,11.32Z`}))],[`thin`,Q.createElement(Q.Fragment,null,Q.createElement(`path`,{d:`M133.17,158.84a64,64,0,1,0-50.34,0c-23.76,5.46-45.18,18.69-61.89,38.59a4,4,0,1,0,6.12,5.14C48,177.7,76.71,164,108,164s60,13.7,80.94,38.57a4,4,0,0,0,6.12-5.14C178.35,177.53,156.93,164.3,133.17,158.84ZM52,100a56,56,0,1,1,56,56A56.06,56.06,0,0,1,52,100Zm198.83,30.83-32,32a4,4,0,0,1-5.66,0l-16-16a4,4,0,0,1,5.66-5.66L216,154.34l29.17-29.17a4,4,0,1,1,5.66,5.66Z`}))]]),pi=Q.forwardRef((e,t)=>Q.createElement(ce,{ref:t,...e,weights:fi}));pi.displayName=`UserCheckIcon`;var mi=b(`flex w-fit items-stretch *:focus-visible:relative *:focus-visible:z-10 has-[>[data-slot=button-group]]:gap-2 has-[select[aria-hidden=true]:last-child]:[&>[data-slot=select-trigger]:last-of-type]:rounded-r-lg [&>[data-slot=select-trigger]:not([class*='w-'])]:w-fit [&>input]:flex-1`,{variants:{orientation:{horizontal:`*:data-slot:rounded-r-none [&>[data-slot]:not(:has(~[data-slot]))]:rounded-r-lg! [&>[data-slot]~[data-slot]]:rounded-l-none [&>[data-slot]~[data-slot]]:border-l-0`,vertical:`flex-col *:data-slot:rounded-b-none [&>[data-slot]:not(:has(~[data-slot]))]:rounded-b-lg! [&>[data-slot]~[data-slot]]:rounded-t-none [&>[data-slot]~[data-slot]]:border-t-0`}},defaultVariants:{orientation:`horizontal`}});function hi({className:e,orientation:t,...n}){return(0,$.jsx)(`div`,{role:`group`,"data-slot":`button-group`,"data-orientation":t,className:i(mi({orientation:t}),e),...n})}function gi({controlled:e,default:t,name:n,state:r=`value`}){let{current:i}=Q.useRef(e!==void 0),[a,o]=Q.useState(()=>t);return[i&&e!==void 0?e:a,Q.useCallback(e=>{i||o(e)},[])]}function _i(e){let{open:t,defaultOpen:n=!1,onOpenChange:r,disabled:i}=e,[a,o]=gi({controlled:t,default:n,name:`Collapsible`,state:`open`}),{mounted:s,setMounted:c,transitionStatus:l}=g(a,!0,!0),u=_e(),[d,f]=Q.useState(),p=d===null?void 0:d??u,m=D(e=>{let t=!a,n=Fe(fe,e.nativeEvent);r(t,n),!n.isCanceled&&o(t)});return Q.useMemo(()=>({defaultPanelId:u,disabled:i,handleTrigger:m,mounted:s,open:a,panelId:p,setMounted:c,setOpen:o,setPanelIdState:f,transitionStatus:l}),[u,i,m,s,a,p,c,o,f,l])}var vi=Q.createContext(void 0);function yi(){let e=Q.useContext(vi);if(e===void 0)throw Error(I(15));return e}var bi=`data-open`,xi=`data-closed`,Si=A,Ci=`data-panel-open`,wi={[bi]:``},Ti={[xi]:``},Ei={open(e){return e?{[Ci]:``}:null}},Di={open(e){return e?wi:Ti},...w},Oi=Q.forwardRef(function(e,t){let{render:n,className:r,defaultOpen:i=!1,disabled:a=!1,onOpenChange:o,open:s,style:c,...l}=e,u=D(o),d=_i({open:s,defaultOpen:i,onOpenChange:u,disabled:a}),f=Q.useMemo(()=>({open:d.open,disabled:d.disabled,transitionStatus:d.transitionStatus}),[d.open,d.disabled,d.transitionStatus]),p=Q.useMemo(()=>({...d,onOpenChange:u,state:f}),[d,u,f]),m=Ie(`div`,e,{state:f,ref:t,props:l,stateAttributesMapping:Di});return(0,$.jsx)(vi.Provider,{value:p,children:m})}),ki={...Ei,...w},Ai=Q.forwardRef(function(e,t){let{panelId:n,open:r,handleTrigger:i,state:a,disabled:o}=yi(),{className:s,disabled:c=o,render:l,nativeButton:u=!0,style:d,...f}=e,{getButtonProps:p,buttonRef:m}=me({disabled:c,native:u});return Ie(`button`,e,{state:a,ref:[t,m],props:[{"aria-controls":r?n:void 0,"aria-expanded":r,onClick:i},f,p],stateAttributesMapping:ki})}),ji={height:void 0,width:void 0};function Mi(e){let{externalRef:t,hiddenUntilFound:n,id:r,keepMounted:i,mounted:a,onOpenChange:o,open:s,setMounted:c,setOpen:l,transitionStatus:u}=e,f=Q.useRef(null),m=Q.useRef(null),[h,g]=Q.useState(ji),_=Q.useRef(ji),v=Q.useRef(!1),b=Q.useRef(s),x=Q.useRef(!1),[S,C]=Q.useState(!1),w=Q.useRef(null),T=We(t,f),E=O(s),k=p(f),A=!s&&!a,j=S?`idle`:u,M=s&&(b.current||x.current),N=!s&&a&&m.current===`css-animation`&&h.height===void 0&&h.width===void 0?_.current:h,P=n&&A&&m.current!==`css-animation`,F=D((e,t=!0)=>{t&&(_.current=e),g(e)}),I=D(()=>{w.current?.(),w.current=null}),ne=D(e=>{I(),w.current=()=>{w.current=null,e()}}),L=D(()=>{s&&a&&m.current===`css-animation`&&(x.current=!0)});d(()=>{S&&u!==`starting`&&C(!1)},[S,u]),Q.useEffect(()=>()=>{L(),I()},[L,I]),d(()=>{s||(b.current=!1,x.current=!1);let e=f.current;if(!e)return;!s&&w.current&&I();let t=Pi(e,M);if(m.current=t,s&&u===`idle`&&b.current&&t===`css-animation`){_.current=Ni(e);return}if(s&&u===`starting`){let n=v.current;if(v.current=!1,t===`none`){F(Ni(e)),C(!0);return}if(t===`css-transition`){let t=Li(e);if(F(Ni(e)),!n)return t;let r=Ii(e,`transition-duration`,`0s`);return ne(r),C(!0),t}F(Ni(e));let r=Ii(e,`animation-name`,`none`);if(!n){r();return}let i=Ii(e,`animation-duration`,`0s`);r(),ne(i),C(!0);return}if(!s&&a&&(u===`idle`||u===`starting`)){if(t===`none`){F(ji,!1),c(!1);return}F(Ni(e));return}if(u!==`ending`)return;if(t===`none`){c(!1);return}let n=Ni(e);n.height>0||n.width>0?(F(n),t===`css-animation`&&Ii(e,`animation-name`,`none`)()):c(!1)},[a,s,I,F,c,ne,M,u]),te({enabled:s&&a&&j===`idle`,open:!0,ref:f,onComplete(){s&&F(ji,!1)}}),Q.useEffect(()=>{if(s||!a||j!==`ending`)return;if(!f.current){c(!1),F(ji,!1);return}let e=new AbortController,t=-1;function n(){E.current||(c(!1),F(ji,!1))}return t=y.request(()=>{k(n,e.signal)}),()=>{y.cancel(t),e.abort()}},[E,a,s,j,k,F,c]),d(()=>{let e=f.current;e&&n&&A&&e.setAttribute(`hidden`,`until-found`)},[A,n]),Q.useEffect(function(){let e=f.current;if(!e)return;let t=ke.create(),n=-1,r=(r,i)=>{t.start(0,()=>{E.current||(n=y.request(()=>{E.current||(r&&(v.current=!1),i&&e.setAttribute(Si,``),e.setAttribute(`hidden`,`until-found`))}))})},i=Ee(e,`beforematch`,t=>{let n=Fe(ee,t);if(o(!0,n),n.isCanceled){r(!1,!1);return}v.current=!0;let i=e.hasAttribute(Si);e.removeAttribute(Si),l(!0),r(!0,i)});return()=>{t.clear(),y.cancel(n),i()}},[E,o,l]);let re=i||n||a||s;return{height:N.height,props:{...P?{[Si]:``}:void 0,hidden:A,id:r},ref:T,shouldPreventOpenAnimation:M,shouldRender:re,transitionStatus:j,width:N.width}}function Ni(e){return{height:e.scrollHeight,width:e.scrollWidth}}function Pi(e,t){let n=N(e).getComputedStyle(e),r=(n.animationName.split(`,`).map(e=>e.trim()).some(e=>e!==``&&e!==`none`)||t)&&Fi(n.animationDuration),i=Fi(n.transitionDuration);return r&&i||i?`css-transition`:r?`css-animation`:`none`}function Fi(e){return e.split(`,`).map(e=>e.trim()).some(e=>e!==``&&Number.parseFloat(e)>0)}function Ii(e,t,n){let r=e.style.getPropertyValue(t),i=e.style.getPropertyPriority(t);return e.style.setProperty(t,n),()=>{r===``?e.style.removeProperty(t):e.style.setProperty(t,r,i)}}function Li(e){let t={"justify-content":e.style.justifyContent,"align-items":e.style.alignItems,"align-content":e.style.alignContent,"justify-items":e.style.justifyItems};Object.keys(t).forEach(t=>{e.style.setProperty(t,`initial`,`important`)});function n(){Object.entries(t).forEach(([t,n])=>{n===``?e.style.removeProperty(t):e.style.setProperty(t,n)})}let r=y.request(n);return()=>{y.cancel(r),n()}}var Ri=`--collapsible-panel-height`,zi=`--collapsible-panel-width`,Bi=Q.forwardRef(function(e,t){let{className:n,hiddenUntilFound:r,keepMounted:i,render:a,id:o,style:s,...c}=e,{defaultPanelId:l,mounted:u,onOpenChange:f,open:p,setMounted:m,setPanelIdState:h,setOpen:g,state:_,transitionStatus:v}=yi(),y=r??!1,b=i??!1,x=o||void 0,S=x??l;d(()=>(h(e=>x??(e===null?void 0:e)),()=>{h(e=>e===x?null:e)}),[x,h]);let{height:C,props:w,ref:T,shouldPreventOpenAnimation:E,shouldRender:D,transitionStatus:O,width:k}=Mi({externalRef:t,hiddenUntilFound:y,id:S,keepMounted:b,mounted:u,onOpenChange:f,open:p,setMounted:m,setOpen:g,transitionStatus:v}),A={..._,transitionStatus:O},j=je(s,A),M=Ie(`div`,{...e,style:void 0},{state:A,ref:T,props:[w,{style:{[Ri]:C===void 0?`auto`:`${C}px`,[zi]:k===void 0?`auto`:`${k}px`}},c,j?{style:j}:void 0,E?{style:{animationName:`none`}}:void 0],stateAttributesMapping:Di});return D?M:null});function Vi({...e}){return(0,$.jsx)(Oi,{"data-slot":`collapsible`,...e})}function Hi({...e}){return(0,$.jsx)(Ai,{"data-slot":`collapsible-trigger`,...e})}function Ui({...e}){return(0,$.jsx)(Bi,{"data-slot":`collapsible-content`,...e})}var Wi=Q.createContext({register:()=>{},unregister:()=>{},subscribeMapChange:()=>()=>{},nextIndexRef:{current:0}});function Gi(){return Q.useContext(Wi)}function Ki(e){let{children:t,elementsRef:n,labelsRef:r,onMapChange:i}=e,a=D(i),[,o]=Q.useState(0),s=Oe(Ji).current,c=Oe(qi).current,l=Q.useRef(0),u=Q.useRef(!0),f=Q.useRef(null),p=Q.useRef(null),m=D(()=>{u.current||(u.current=!0,o(e=>e+1))}),h=D((e,t)=>{c.set(e,t),m()}),g=D(e=>{c.delete(e),m()}),_=D(e=>{let t=new Map;return n.current.length=0,r&&(r.current.length=0),e.forEach(e=>{t.set(e.element,{...e.registration.metadata??{},index:e.index}),n.current[e.index]=e.element,r&&(r.current[e.index]=e.registration.label===void 0?e.registration.textRef?.current?.textContent??e.element.textContent:e.registration.label)}),l.current=n.current.length,t});function v(e){if(p.current?.disconnect(),p.current=null,typeof MutationObserver!=`function`||e.length<2)return;let t=new MutationObserver(n=>{if(!Zi(n))return;let r=null;for(let n of e)if(n.isConnected){if(r&&Qi(r,n)>0){t.disconnect(),m();return}r=n}});p.current=t;let n=new Set;for(let t=1;t<e.length;t+=1){let r=Xi(e[t-1],e[t]);r&&n.add(r)}n.forEach(e=>t.observe(e,{childList:!0}))}let y=D(()=>{let[e,t]=Yi(c),n=_(e),r=f.current,i=!r||r.length!==e.length||e.some((e,t)=>{let n=r[t];return e.index!==n.index||e.element!==n.element||e.registration.index!==n.registration.index||e.registration.metadata!==n.registration.metadata});v(t),f.current=e,u.current=!1,i&&(s.forEach(e=>e(n)),a(n))});d(()=>(!u.current&&f.current&&_(f.current),()=>{n.current=[],r&&(r.current=[])}),[n,r,_]),d(()=>{u.current&&y()}),d(()=>()=>{p.current?.disconnect(),u.current=!0},[]);let b=D(e=>(s.add(e),()=>{s.delete(e)})),x=Q.useMemo(()=>({register:h,unregister:g,subscribeMapChange:b,nextIndexRef:l}),[h,g,b,l]);return(0,$.jsx)(Wi.Provider,{value:x,children:t})}function qi(){return new Map}function Ji(){return new Set}function Yi(e){let t=new Set,n=[],r=[];e.forEach((e,i)=>{if(!i.isConnected)return;let a=e.index,o={index:a??-1,element:i,registration:e};a===null?r.push(o):a>=0&&(t.add(a),n.push(o))});let i=0;return r.sort((e,t)=>Qi(e.element,t.element)),r.forEach(e=>{for(;t.has(i);)i+=1;e.index=i,n.push(e),i+=1}),t.size>0&&n.sort((e,t)=>e.index-t.index),[n,r.map(e=>e.element)]}function Xi(e,t){let n=e.parentElement;for(;n&&!n.contains(t);)n=n.parentElement;return n}function Zi(e){for(let t of e)for(let e=0;e<t.removedNodes.length;e+=1)if(t.removedNodes[e].isConnected)return!0;return!1}function Qi(e,t){return e.nextElementSibling===t?-1:t.nextElementSibling===e?1:e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_FOLLOWING?-1:1}var $i=Q.createContext(void 0);function ea(){let e=Q.useContext($i);if(e===void 0)throw Error(I(64));return e}var ta=`data-activation-direction`,na={tabActivationDirection:e=>({[ta]:e})},ra=Q.forwardRef(function(e,t){let{className:n,defaultValue:r=0,onValueChange:i,orientation:a=`horizontal`,render:o,value:s,style:c,...l}=e,u=e.defaultValue!==void 0,f=Q.useRef([]),[p,m]=Q.useState(()=>new Map),[h,g]=gi({controlled:s,default:r,name:`Tabs`,state:`value`}),_=s!==void 0,[v,y]=Q.useState(()=>new Map),b=Q.useRef(void 0),S=Q.useCallback(e=>ia(v,e),[v]),[C,w]=Q.useState(()=>({previousValue:h,tabActivationDirection:`none`})),{previousValue:T,tabActivationDirection:E}=C,O=E,k=!1;T!==h&&(O=aa(T,h,a,v),k=T!=null&&h!=null&&S(h)==null);let A=k?T:h,j=T!==A||E!==O;d(()=>{j&&w({previousValue:A,tabActivationDirection:O})},[A,j,O]);let M=D((e,t)=>{t.activationDirection=aa(h,e,a,v),i?.(e,t),!t.isCanceled&&g(()=>e)}),ee=D((e,t)=>{i?.(e,Fe(t,void 0,void 0,{activationDirection:`none`}))}),N=D((e,t)=>(m(n=>{let r=new Map(n);return r.set(e,t),r}),()=>{m(n=>{if(n.get(e)!==t)return n;let r=new Map(n);return r.delete(e),r})})),P=Q.useCallback(e=>p.get(e),[p]),F=Q.useCallback(e=>{for(let t of v.values())if(e===t.value)return t.id},[v]),I=Q.useMemo(()=>({getTabElementBySelectedValue:S,getTabIdByPanelValue:F,getTabPanelIdByValue:P,onValueChange:M,orientation:a,registerMountedTabPanel:N,setTabMap:y,tabActivationDirection:O,value:h}),[S,F,P,M,a,N,y,O,h]),te=Q.useMemo(()=>{for(let e of v.values())if(e.value===h)return e},[v,h]),ne=Q.useMemo(()=>{for(let e of v.values())if(!e.disabled)return e.value},[v]),L=Q.useRef(!u),re=Q.useRef(r),ae=Q.useRef(u),oe=Q.useRef(!1);d(()=>{if(_)return;function e(e,t){g(()=>e),w({previousValue:e,tabActivationDirection:`none`}),ee(e,t),L.current=!1}if(v.size===0){oe.current&&h!==null&&!b.current?.isConnected&&e(null,le);return}oe.current=!0,b.current=v.keys().next().value;let t=te?.disabled,n=te==null&&h!==null;if(!t&&h===re.current&&(ae.current=!1),ae.current&&t&&h===re.current)return;let r=L.current;if(t||n){let n=ne??null;if(h===n){L.current=!1;return}let i=le;r?i=x:t&&(i=ie),e(n,i)}else r&&te!=null&&(ee(h,x),L.current=!1)},[ne,_,ee,te,g,v,h]);let se=Ie(`div`,e,{state:{orientation:a,tabActivationDirection:O},ref:t,props:l,stateAttributesMapping:na});return(0,$.jsx)($i.Provider,{value:I,children:(0,$.jsx)(Ki,{elementsRef:f,children:se})})});function ia(e,t){for(let[n,r]of e.entries())if(t===r.value)return n;return null}function aa(e,t,n,r){if(e==null||t==null)return`none`;let[i,a,o]=n===`horizontal`?[`left`,`left`,`right`]:[`top`,`up`,`down`],s=ia(r,e),c=ia(r,t);if(s==null||c==null)return s!==c&&(typeof e==`number`||typeof e==`string`)&&typeof e==typeof t?t>e?o:a:`none`;let l=s.getBoundingClientRect()[i],u=c.getBoundingClientRect()[i];return u<l?a:u>l?o:`none`}var oa=`data-composite-item-active`;function sa(e={}){let{guess:t,label:n,metadata:r,textRef:i,index:a}=e,{register:o,unregister:s,subscribeMapChange:c,nextIndexRef:l}=Gi(),u=Q.useRef(-1),[f,p]=Q.useState(a==null&&t?()=>{if(u.current===-1){let e=l.current;l.current+=1,u.current=e}return u.current}:-1),m=a??f,h=Q.useRef(null),g=Q.useCallback(e=>{let t=h.current;t&&s(t),h.current=e,e&&o(e,{metadata:r??null,index:a??null,label:n,textRef:i})},[a,o,s,r,n,i]);return d(()=>{if(a==null)return c(e=>{let t=h.current?e.get(h.current)?.index:null;t!=null&&p(t)})},[a,c]),{ref:g,index:m}}function ca(e={}){let{highlightItemOnHover:t,highlightedIndex:n,onHighlightedIndexChange:r}=Be(),{ref:i,index:a}=sa(e),o=n===a,s=Q.useRef(null),c=We(i,s);return{compositeProps:{tabIndex:o?0:-1,onFocus(){r(a)},onMouseMove(){let e=s.current;if(!t||!e)return;let n=e.hasAttribute(`disabled`)||e.ariaDisabled===`true`;!o&&!n&&e.focus()}},compositeRef:c,index:a}}var la=Q.createContext(void 0);function ua(){let e=Q.useContext(la);if(e===void 0)throw Error(I(65));return e}var da=Q.forwardRef(function(e,t){let{className:n,disabled:r=!1,render:i,value:a,id:o,nativeButton:s=!0,style:c,...l}=e,{value:u,getTabPanelIdByValue:f,onValueChange:p,orientation:m,tabActivationDirection:h}=ea(),{activateOnFocus:g,registerTabResizeObserverElement:_,tabsListElement:v}=ua(),{highlightedIndex:y,onHighlightedIndexChange:b}=Be(),x=_e(o),{compositeProps:S,compositeRef:C,index:w}=ca({metadata:Q.useMemo(()=>({disabled:r,id:x,value:a}),[r,x,a])}),T=a===u,E=Q.useRef(!1),O=Q.useRef(null),k=D(e=>{O.current?.(),O.current=e?_(e):null});d(()=>{if(E.current){E.current=!1;return}if(!(T&&w>-1&&y!==w))return;let e=v;if(e!=null){let t=ue(F(e));if(t&&Ge(e,t))return}r||b(w)},[T,w,y,b,r,v]);let{getButtonProps:A,buttonRef:j}=me({disabled:r,native:s,focusableWhenDisabled:!0}),M=f(a),N=Q.useRef(!1),P=Q.useRef(!1);function I(e){p(a,Fe(ee,e.nativeEvent,void 0,{activationDirection:`none`}))}function te(e){T||r||I(e)}function ne(e){T||r||g&&(!N.current||P.current)&&I(e)}function L(e){if(T||r)return;N.current=!0,P.current=e.button===0;let t=F(e.currentTarget);function n(){N.current=!1,P.current=!1,t.removeEventListener(`pointerup`,n),t.removeEventListener(`pointercancel`,n)}t.addEventListener(`pointerup`,n),t.addEventListener(`pointercancel`,n)}return Ie(`button`,e,{state:{disabled:r,active:T,orientation:m,tabActivationDirection:h},ref:[t,j,C,k],props:[S,{role:`tab`,"aria-controls":M,"aria-selected":T,id:x,onClick:te,onFocus:ne,onPointerDown:L,[oa]:T?``:void 0,onKeyDownCapture(){E.current=!0}},l,A],stateAttributesMapping:na})}),fa=`data-index`,pa={...na,...w},ma=Q.forwardRef(function(e,t){let{className:n,value:r,render:i,keepMounted:a=!1,style:o,...s}=e,{value:c,getTabIdByPanelValue:l,orientation:u,tabActivationDirection:f,registerMountedTabPanel:p}=ea(),m=_e(),{ref:h,index:_}=sa(),v=r===c,{mounted:y,transitionStatus:b,setMounted:x}=g(v),S=!y,C=l(r),w={hidden:S,orientation:u,tabActivationDirection:f,transitionStatus:b},T=Q.useRef(null),E=Ie(`div`,e,{state:w,ref:[t,h,T],props:[{"aria-labelledby":C,hidden:S,id:m,role:`tabpanel`,tabIndex:v?0:-1,inert:bt(!v),[fa]:_},s],stateAttributesMapping:pa});return te({open:v,ref:T,onComplete(){v||x(!1)}}),d(()=>{if(!(m==null||S&&!a))return p(r,m)},[S,a,r,m,p]),a||y?E:null});function ha(e){return e==null||e.hasAttribute(`disabled`)||e.getAttribute(`aria-disabled`)===`true`}function ga(e){let{loopFocus:t=!0,orientation:n=`both`,grid:r,onLoop:i,direction:a,highlightedIndex:o,onHighlightedIndexChange:c,rootRef:l,enableHomeAndEndKeys:u=!1,stopEventPropagation:f,disabledIndices:p,modifierKeys:m=xe}=e,[h,g]=Q.useState(0),_=r!=null,y=Q.useRef(null),b=We(y,l),x=Q.useRef([]),S=Q.useRef(!1),C=Q.useRef(null),w=o??h,T=D((e,t=!1)=>{if(C.current=x.current[e]??null,(c??g)(e),t){let t=x.current[e];yt(y.current,t,a,n)}}),E=D(e=>{if(e.size===0)return;if(S.current){let e=x.current,t=e.indexOf(C.current);if(t===-1){let t=e[w];!t||v(e,w,p)?T(_a(e,p)):C.current=t}else t!==w&&T(t);return}S.current=!0;let t=Array.from(e.keys()),r=t.find(e=>e?.hasAttribute(`data-composite-item-active`))??null,i=r?e.get(r)?.index??-1:-1;if(i!==-1)T(i);else if(v(t,w,p)){let e=qe(t,{disabledIndices:p});oe(t,e)||T(e)}yt(y.current,r,a,n)});d(()=>{if(p==null||o!=null||!S.current)return;let e=x.current;if(v(e,w,p)){let t=qe(e,{disabledIndices:p});oe(e,t)||T(t)}},[p,o,w,x,T]);let O=D((e,t,n)=>i?i(e,t,n,x):n),k=D(e=>{let o=e.key===`Home`||e.key===`End`;if(!vt.has(e.key)||!u&&o||va(e,m)||!y.current)return;let c=a===`rtl`,l=c?Tt:Dt,d=c?Dt:Tt,h=n===`vertical`?kt:l,g=n===`vertical`?Ct:d,v=he(e.nativeEvent);if(v!=null&&At(v)&&!ha(v)){let t=v.selectionStart,n=v.selectionEnd,r=v.value;if(t==null||e.shiftKey||t!==n||e.key!==g&&t<r.length||e.key!==h&&t>0)return}let b=w,S=re(x,p),C=s(x,p);r!=null&&(b=r({disabledIndices:p,elementsRef:x,event:e,highlightedIndex:w,loopFocus:t,maxIndex:C,minIndex:S,onLoop:O,orientation:n,rtl:c}));let E=n!==`vertical`&&e.key===l||n!==`horizontal`&&e.key===`ArrowDown`,D=n!==`vertical`&&e.key===d||n!==`horizontal`&&e.key===`ArrowUp`;u&&(e.key===`Home`?b=S:e.key===`End`&&(b=C)),b===w&&(E||D)&&(t&&b===C&&E?(b=S,i&&(b=i(e,w,b,x))):t&&b===S&&D?(b=C,i&&(b=i(e,w,b,x))):b=qe(x.current,{startingIndex:b,decrement:D,disabledIndices:p})),b!==w&&!oe(x.current,b)&&(f&&e.stopPropagation(),(_||o||E||D)&&e.preventDefault(),T(b,!0),queueMicrotask(()=>{x.current[b]?.focus()}))});return{props:{ref:b,onFocus(e){let t=y.current,n=he(e.nativeEvent);t&&n!=null&&At(n)&&n.setSelectionRange(0,n.value.length)},onKeyDown:k},highlightedIndex:w,onHighlightedIndexChange:T,elementsRef:x,onMapChange:E,relayKeyboardEvent:k}}function _a(e,t){let n=-1;for(let r=0;r<e.length;r+=1){let i=e[r];if(i&&!v(e,r,t)){if(i.hasAttribute(`data-composite-item-active`))return r;n===-1&&(n=r)}}return Math.max(n,0)}function va(e,t){for(let n of Ot)if(!t.includes(n)&&e.getModifierState(n))return!0;return!1}function ya(e){let{render:t,className:n,style:r,refs:i=xe,props:a=xe,state:o=ye,stateAttributesMapping:s,highlightedIndex:c,onHighlightedIndexChange:u,orientation:d,grid:f,loopFocus:p,onLoop:m,enableHomeAndEndKeys:h,onMapChange:g,stopEventPropagation:_=!0,rootRef:v,disabledIndices:y,modifierKeys:b,highlightItemOnHover:x=!1,tag:S=`div`,...C}=e,{props:w,highlightedIndex:T,onHighlightedIndexChange:E,elementsRef:D,onMapChange:O,relayKeyboardEvent:k}=ga({grid:f,loopFocus:p,onLoop:m,orientation:d,highlightedIndex:c,onHighlightedIndexChange:u,rootRef:v,stopEventPropagation:_,enableHomeAndEndKeys:h,direction:Ye(),disabledIndices:y,modifierKeys:b}),A=Ie(S,e,{state:o,ref:i,props:[w,...a,C],stateAttributesMapping:s}),j=Q.useMemo(()=>({highlightedIndex:T,onHighlightedIndexChange:E,highlightItemOnHover:x,relayKeyboardEvent:k}),[T,E,x,k]);return(0,$.jsx)(l.Provider,{value:j,children:(0,$.jsx)(Ki,{elementsRef:D,onMapChange:e=>{g?.(e),O(e)},children:A})})}var ba=Q.forwardRef(function(e,t){let{activateOnFocus:n=!1,className:r,loopFocus:i=!0,render:a,style:o,...s}=e,{orientation:c,setTabMap:l,tabActivationDirection:u}=ea(),[f,p]=Q.useState(0),[m,h]=Q.useState(null),g=Q.useRef(new Set),_=Q.useRef(new Set),v=Q.useRef(null);d(()=>{if(typeof ResizeObserver>`u`)return;let e=new ResizeObserver(()=>{g.current.forEach(e=>{e()})});return v.current=e,m&&e.observe(m),_.current.forEach(t=>{e.observe(t)}),()=>{e.disconnect(),v.current=null}},[m]);let y=D(e=>(g.current.add(e),()=>{g.current.delete(e)})),b=D(e=>(_.current.add(e),v.current?.observe(e),()=>{_.current.delete(e),v.current?.unobserve(e)})),x={orientation:c,tabActivationDirection:u},S={"aria-orientation":c===`vertical`?`vertical`:void 0,role:`tablist`},C=Q.useMemo(()=>({activateOnFocus:n,registerIndicatorUpdateListener:y,registerTabResizeObserverElement:b,tabsListElement:m}),[n,y,b,m]);return(0,$.jsx)(la.Provider,{value:C,children:(0,$.jsx)(ya,{render:a,className:r,style:o,state:x,refs:[t,h],props:[S,s],stateAttributesMapping:na,highlightedIndex:f,enableHomeAndEndKeys:!0,loopFocus:i,orientation:c,onHighlightedIndexChange:p,onMapChange:l,disabledIndices:xe})})});function xa({className:e,orientation:t=`horizontal`,...n}){return(0,$.jsx)(ra,{"data-slot":`tabs`,"data-orientation":t,className:i(`group/tabs flex gap-2 data-horizontal:flex-col`,e),...n})}var Sa=b(`group/tabs-list inline-flex w-fit items-center justify-center rounded-lg p-[3px] text-muted-foreground group-data-horizontal/tabs:h-7 group-data-vertical/tabs:h-fit group-data-vertical/tabs:flex-col data-[variant=line]:rounded-none`,{variants:{variant:{default:`bg-muted`,line:`gap-1 bg-transparent`}},defaultVariants:{variant:`default`}});function Ca({className:e,variant:t=`default`,...n}){return(0,$.jsx)(ba,{"data-slot":`tabs-list`,"data-variant":t,className:i(Sa({variant:t}),e),...n})}function wa({className:e,...t}){return(0,$.jsx)(da,{"data-slot":`tabs-trigger`,className:i(`relative inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-1.5 py-0.5 text-xs font-medium whitespace-nowrap text-foreground/60 transition-all group-data-vertical/tabs:w-full group-data-vertical/tabs:justify-start hover:text-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1 focus-visible:outline-ring disabled:pointer-events-none disabled:opacity-50 has-data-[icon=inline-end]:pr-1 has-data-[icon=inline-start]:pl-1 aria-disabled:pointer-events-none aria-disabled:opacity-50 dark:text-muted-foreground dark:hover:text-foreground group-data-[variant=default]/tabs-list:data-active:shadow-sm group-data-[variant=line]/tabs-list:data-active:shadow-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,`group-data-[variant=line]/tabs-list:bg-transparent group-data-[variant=line]/tabs-list:data-active:bg-transparent dark:group-data-[variant=line]/tabs-list:data-active:border-transparent dark:group-data-[variant=line]/tabs-list:data-active:bg-transparent`,`data-active:bg-card data-active:text-foreground dark:data-active:border-input dark:data-active:text-foreground`,`after:absolute after:bg-foreground after:opacity-0 after:transition-opacity group-data-horizontal/tabs:after:inset-x-0 group-data-horizontal/tabs:after:bottom-[-5px] group-data-horizontal/tabs:after:h-0.5 group-data-vertical/tabs:after:inset-y-0 group-data-vertical/tabs:after:-right-1 group-data-vertical/tabs:after:w-0.5 group-data-[variant=line]/tabs-list:data-active:after:opacity-100`,e),...t})}function Ta({className:e,...t}){return(0,$.jsx)(ma,{"data-slot":`tabs-content`,className:i(`flex-1 text-sm outline-none`,e),...t})}function Ea(e){let t=e;if(typeof t==`string`)try{t=JSON.parse(t)}catch{return}return typeof t==`object`&&t?t:void 0}function Da(e){let t=Ea(e);if(!t)return;let{problems:n,rebinds:r,steps:i}=t;return Array.isArray(n)&&Array.isArray(r)&&Array.isArray(i)?t:void 0}var Oa=e=>e.length>10?`${e.slice(0,8)}…`:e,ka=e=>e.slice(e.lastIndexOf(`#`)+1);function Aa({key:e,kind:t,from:n=``,to:r=``},i){let a=ka(e);switch(t){case`rebind`:return`points ${a} at a different ${i}: ${Oa(n)} → ${Oa(r)}`;case`bind`:return`points ${a} at an existing ${i}: ${Oa(r)}`;case`unbind`:return`forgets which ${i} ${a} is: it was ${Oa(n)}`}}var ja=[[`create`,`Create`],[`update`,`Update`],[`replace`,`Replace: delete, then create`],[`bind`,`Bind to an existing object`],[`gone`,`Gone at the vendor`],[`orphan`,`No longer declared`],[`none`,`Unchanged`]];function Ma({planned:e,unknown:t}){let n=new Set(t);return[...Object.entries(e).filter(([e])=>!n.has(e)).map(([e,t])=>({path:e,value:t,known:!0})),...t.map(e=>({path:e,known:!1}))]}var Na={},Pa={},Fa=[];function Ia(e,t){let n=new Map;for(let r of e)(r.locale===void 0?!n.has(r.slug):r.locale===t)&&n.set(r.slug,r);return[...n.values()]}var La=async()=>(await gt(async()=>{let{default:e}=await import(`./content-DOwCrGXH.js`);return{default:e}},[])).default,Ra=async e=>{let t=await La();return Object.hasOwn(t,e)?t[e]:[]},za=new Proxy({},{get:(e,t)=>typeof t==`string`?{list:async e=>Ia(await Ra(t),e?.locale).map(({slug:e,locale:t,data:n})=>t===void 0?{slug:e,data:n}:{slug:e,locale:t,data:n}),get:async(e,n)=>Ia(await Ra(t),n?.locale).find(t=>t.slug===e)}:void 0}),Ba=e=>e.split(`/`).toReversed().join(`.`);function Va(e,t){let n=`/sites/${e}`;return t===n||t.startsWith(`${n}/`)?t.slice(n.length)||`/`:t}var Ha=e=>e.replace(/\/\{-\$[^}]*\}/g,``),Ua=e=>!Ha(e).includes(`$`),Wa=`/{-$locale}`,Ga=(e,t)=>t.startsWith(`/sites/${e}${Wa}`);function Ka(e,t){return e.length<2?[]:[...e,...e[0].locale===t?[{locale:`x-default`,href:e[0].href}]:[]]}var qa=e=>e!==void 0&&Object.hasOwn(Na,e)?Na[e]:void 0,Ja=e=>qa(e)?.[0],Ya=Fa.toSorted((e,t)=>t.length-e.length),Xa=e=>e===void 0?void 0:Ya.find(t=>e===`/sites/${t}`||e.startsWith(`/sites/${t}/`));async function Za(e,t){let n=Xa(e?.fullPath);if(!e||!n)return{locales:[]};let r=qa(n);if(!Ga(n,e.fullPath))return{locale:r?.[0],locales:[]};let i=e.params.locale;if(i!==void 0&&(!r||i===r[0]||!r.includes(i)))return`notFound`;if(!r)return{locales:[]};let a=await Qa(e,r);return{locale:i??r[0],locales:r.flatMap((n,r)=>a[r]?[{locale:n,href:t(e.fullPath,{...e.params,locale:r===0?void 0:n})}]:[])}}async function Qa(e,t){let n=u(e.fullPath),r=Object.hasOwn(Pa,n)?Pa[n]:void 0,i=/\$([^/]+)/.exec(Ha(n))?.[1],a=i===void 0?void 0:e.params[i];if(r===void 0||typeof a!=`string`)return t.map(()=>!0);let o=za[r];return Promise.all(t.map(async(e,t)=>await o.get(a,{locale:t===0?void 0:e})!==void 0))}var $a=()=>ti({select:({matches:e})=>{let{locale:t,locales:n=[]}=e[0]?.context??{};return{locale:t,locales:n}},structuralSharing:!0}),eo=Object.fromEntries(Object.entries(Object.assign({})).map(([e,t])=>{let[,n,r,,i]=e.split(`/`);return[n===`apps`?`${r}/${i}`:r,t.default]}));function to(){let{routesByPath:e}=R();return(0,Q.useMemo)(()=>{let t=new Map,n=Object.entries(e).map(([e,t])=>[Ha(e),e,t]);for(let[e,r,i]of n.toSorted(([e],[t])=>e<t?-1:+(e>t))){let n=Xa(r);if(n===void 0)continue;let a=n.includes(`/`)?n.slice(0,n.indexOf(`/`)):void 0,o=t.get(n)??{name:n,...a!==void 0&&{app:a},title:eo[n]?.title??n.slice(n.indexOf(`/`)+1),icon:eo[n]?.icon,pages:[]};if(t.set(n,o),!Ua(r))continue;let s=Va(n,e);o.pages.push({to:r,label:i.options.staticData?.crumb??(s===`/`?`Home`:s)})}return[...t.values()]},[e])}function no(e,t){if(e.domain)return`https://${e.domain}/`;if(t&&o(t.hostname))return`${t.protocol}//${Ba(e.name)}.localhost${t.port?`:${t.port}`:``}/`}var ro=()=>()=>{},io=e=>(0,Q.useSyncExternalStore)(ro,()=>no(e,location),()=>no(e)),ao=(e,{seconds:t=!1}={})=>`${new Date(e).toISOString().slice(0,t?19:16).replace(`T`,` `)} UTC`,oo=()=>{let e=to();return ei({select:t=>{let n=t.flatMap(({id:e,pathname:t,staticData:n,loaderData:r})=>{let i=r,a=(typeof i==`object`&&i&&`crumb`in i?i.crumb:void 0)??n.crumb;return a?[{id:e,pathname:t,label:a}]:[]}),r=t.at(-1),i=e.find(({name:e})=>e===Xa(r?.fullPath));if(!r||!i)return n;let a=i.pages[0]?.to??r.pathname;return[{id:`site:${i.name}`,pathname:a,label:i.title},...n]},structuralSharing:!0})},so=e=>({meta:[{title:e?`${e} · Sanoma`:`Sanoma`}]});function co(e){switch(e.type){case`op.called`:return e.error?`bad`:`off`;case`approval.requested`:return`waiting`;case`approval.decided`:return e.decision===`approve`?`ok`:`bad`;case`run.finished`:return`ok`;case`run.failed`:return`bad`;default:return`off`}}function lo({name:e}){return(0,$.jsxs)(ut,{tone:`idle`,children:[`sandbox · `,e]})}var uo={official:`Official`,"vendor-verified":`Vendor verified`,community:`Community`};function fo({tier:e}){return(0,$.jsx)(dt,{variant:e===`community`?`outline`:`secondary`,children:uo[e]})}function po({src:e,dark:t,alt:n,className:r}){return(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(`img`,{src:e,alt:n,className:i(`size-4 shrink-0`,t&&`dark:hidden`,r)}),t&&(0,$.jsx)(`img`,{src:t,alt:n,className:i(`hidden size-4 shrink-0 dark:block`,r)})]})}function mo({vendor:e,alt:t,className:n,fallback:r=null}){let{data:i}=M({...Ne(),select:t=>t.vendors[e]});return i?.logo?(0,$.jsx)(po,{...i.logo,alt:t??i.title,className:n}):r}function ho({id:e,op:t,effect:n=t?.effect}){return(0,$.jsxs)($.Fragment,{children:[t&&(0,$.jsx)(mo,{vendor:t.vendor}),(0,$.jsx)(`code`,{children:e}),n&&(0,$.jsx)(dt,{className:st({effect:n}),children:n})]})}function go({children:e}){return(0,$.jsx)(jt,{className:`line-clamp-none flex flex-wrap`,children:e})}function _o({id:e,op:t,children:n}){return(0,$.jsx)(Et,{role:`listitem`,variant:`outline`,size:`xs`,children:(0,$.jsxs)(St,{children:[(0,$.jsxs)(go,{children:[(0,$.jsx)(ho,{id:e,op:t}),t?.idempotent&&(0,$.jsx)(ot,{tip:`If a call fails, it is tried again; the vendor ignores repeats.`,children:(0,$.jsx)(dt,{variant:`outline`,tabIndex:0,children:`safe to retry`})})]}),t?.description&&(0,$.jsx)(xt,{children:t.description}),n]})})}var vo=`focus-visible:ring-inset [&_[data-slot=item-content]]:min-w-0 [&_[data-slot=item-title]]:max-w-full`;function yo({children:e,className:t,...n}){return(0,$.jsx)(`div`,{role:`listitem`,children:(0,$.jsx)(Et,{render:e,className:i(bo,vo,t),...n})})}var bo=`aria-[current=page]:bg-muted`,xo={approval:pi,sleep:li,all:di};function So({status:e}){return(0,$.jsx)(ut,{tone:Ze[e],children:e})}function Co({decision:e}){let t=Qe[e.kind],n=e.kind===`approve`?`approve · ${He(e.approver)}`:e.kind,r=[e.kind===`deny`?e.reason:e.kind===`approve`?e.title:void 0,e.reasons?.length?`${e.kind===`allow`?`Allowed by`:`By`} ${e.reasons.join(`, `)}`:void 0].filter(Boolean).join(`. `),i=(0,$.jsx)(ut,{tone:t,tabIndex:r?0:void 0,children:n});return r?(0,$.jsx)(ot,{tip:r,children:i}):i}function wo(e,t){let n=Math.round((t-e)/1e3);if(n<5)return`just now`;if(n<60)return`${n}s ago`;let r=Math.round(n/60);if(r<60)return`${r}m ago`;let i=Math.round(r/60);return i<48?`${i}h ago`:new Date(e).toLocaleDateString()}var To,Eo=new Set,Do;function Oo(e){return Eo.add(e),Do||=(To=Date.now(),setInterval(()=>{To=Date.now();for(let e of Eo)e()},15e3)),()=>{Eo.delete(e),Eo.size||(clearInterval(Do),Do=void 0)}}var ko=()=>To??=Date.now(),Ao=()=>void 0;function jo({sha:e}){return(0,$.jsx)(`code`,{title:e,children:e.slice(0,8)})}function Mo({at:e}){let t=(0,Q.useSyncExternalStore)(Oo,ko,Ao),n=ao(e,{seconds:!0});return(0,$.jsx)(`time`,{dateTime:new Date(e).toISOString(),title:n,children:t===void 0?n:wo(e,t)})}function No({run:e,none:t=`-`}){return e?(0,$.jsxs)(`span`,{className:`flex items-center gap-2`,children:[(0,$.jsx)(ut,{tone:et[e.status],dot:!0,children:e.status}),(0,$.jsx)(`span`,{className:`text-muted-foreground`,children:(0,$.jsx)(Mo,{at:e.createdAt})})]}):(0,$.jsx)(`span`,{className:`text-muted-foreground`,children:t})}function Po({at:e}){let t=typeof e==`string`?Date.parse(e):e;return(0,$.jsx)(`time`,{dateTime:new Date(t).toISOString(),children:ao(t)})}function Fo({at:e}){return(0,$.jsx)(St,{className:`self-start`,children:(0,$.jsx)(xt,{className:`text-xs`,children:(0,$.jsx)(Mo,{at:e})})})}var Io=``;function Lo(e){return typeof e!=`object`||!e||Array.isArray(e)?e:Object.fromEntries(Object.entries(e).map(([e,t])=>[e,t===`<${e}>`?Io:t]))}function Ro({value:e,redacted:t=!1}){let n=(0,Q.useMemo)(()=>{let n=JSON.stringify(t?Lo(e):e,null,2)??`undefined`;return t?n.split(`"${Io}"`):[n]},[e,t]);return(0,$.jsx)(`pre`,{className:`mt-1 overflow-x-auto rounded-md bg-muted p-3 font-mono text-xs break-all whitespace-pre-wrap`,children:n.map((e,t)=>(0,$.jsxs)(Q.Fragment,{children:[t>0&&(0,$.jsx)(`span`,{className:`text-muted-foreground italic`,children:`redacted`}),e]},t))})}function zo({label:e,open:t=!1,children:n}){return(0,$.jsxs)(Vi,{className:`group/disclosure`,defaultOpen:t,children:[(0,$.jsxs)(Hi,{render:(0,$.jsx)(Re,{variant:`ghost`,size:`xs`,className:`-ml-2 text-muted-foreground`}),children:[(0,$.jsx)(si,{"aria-hidden":`true`,"data-icon":`inline-start`,className:`transition-transform group-data-open/disclosure:rotate-90`}),e]}),(0,$.jsx)(Ui,{children:n})]})}function Bo({label:e,value:t,children:n}){return(0,$.jsx)(xa,{value:t,className:`min-w-0`,children:(0,$.jsx)(Ca,{"aria-label":e,className:`max-w-full justify-start overflow-x-auto`,children:n})})}function Vo({value:e,link:t,count:n,children:r}){return(0,$.jsxs)(wa,{value:e,nativeButton:!1,render:t,className:`flex-none px-2.5`,children:[r,n!==void 0&&(0,$.jsx)(`span`,{className:`text-muted-foreground tabular-nums`,children:n})]})}var Ho=`@container/float relative`,Uo=`m-3 @3xl/float:absolute @3xl/float:top-3 @3xl/float:right-3 @3xl/float:m-0 @3xl/float:max-h-[calc(100%-1.5rem)] @3xl/float:w-(--float-width)`,Wo=`@3xl/float:pr-[calc(var(--float-width)+1.5rem)]`;function Go(){return(0,$.jsxs)(pt,{variant:`destructive`,children:[(0,$.jsx)(`code`,{children:`policies/*.cedar`}),` do not hold, so every operation call and run start is refused (`,(0,$.jsx)(`code`,{children:`sanoma check`}),` says why).`]})}function Ko({float:e,children:t}){return(0,$.jsxs)(tt,{className:i(Ho,`min-h-(--pane-tall) gap-0 py-0`),children:[(0,$.jsx)(`div`,{className:i(`flex flex-1 flex-col`,e&&`@3xl/float:pr-[calc(var(--float-width)+1.5rem)]`),children:t}),e]})}var qo=`${bo} aria-[current=page]:font-semibold aria-disabled:pointer-events-none aria-disabled:opacity-50`;function Jo({label:e,children:t}){return(0,$.jsx)(hi,{"aria-label":e,children:t})}function Yo({children:e}){return(0,$.jsx)(mt,{variant:`outline`,size:`sm`,className:qo,children:e})}function Xo({href:e,children:t}){return(0,$.jsx)(mt,{variant:`link`,size:`sm`,children:(0,$.jsxs)(`a`,{href:e,target:`_blank`,rel:`noreferrer`,children:[t,(0,$.jsx)(ai,{"aria-hidden":`true`,"data-icon":`inline-end`})]})})}function Zo({label:e,value:t,open:n,redacted:r}){return(0,$.jsx)(zo,{label:e,open:n,children:(0,$.jsx)(Ro,{value:t,redacted:r})})}var Qo=()=>gt(()=>import(`./graph-Prxl3c55.js`),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11])),$o=(0,Q.lazy)(Qo);function es(e){let[t,n]=(0,Q.useState)(!1);return(0,Q.useEffect)(()=>{let r=e.current;if(t||!r)return;let i=new IntersectionObserver(e=>{e.some(e=>e.isIntersecting)&&n(!0)},{rootMargin:`100% 0px`});return i.observe(r),()=>i.disconnect()},[e,t]),t}function ts({fallback:e,children:t}){let n=(0,Q.useRef)(null),r=es(n);return(0,$.jsx)(`div`,{ref:n,className:`size-full`,children:r?(0,$.jsx)(Q.Suspense,{fallback:e,children:t}):e})}function ns({children:e}){return(0,$.jsx)(tt,{className:`h-(--pane-short) gap-0 py-0`,children:e})}var rs=e=>(0,$.jsx)(ts,{fallback:(0,$.jsx)(ri,{role:`status`,"aria-label":`Loading the graph`,className:`size-full rounded-none`}),children:(0,$.jsx)($o,{...e})}),is=()=>gt(()=>import(`./code-BVYaiQEr.js`),__vite__mapDeps([12,1,13])),as=(0,Q.lazy)(is),os=e=>(0,$.jsx)(ts,{fallback:(0,$.jsx)(`pre`,{className:`size-full overflow-auto p-3 font-mono text-xs`,children:e.source}),children:(0,$.jsx)(as,{...e})});function ss(e){let t=oo();return(0,$.jsx)(it,{...e,title:t.at(-1)?.label,crumbs:t.slice(0,-1).map(({id:e,pathname:t,label:n})=>(0,$.jsx)(cs,{to:t,children:n},e))})}function cs({to:e,children:t}){return(0,$.jsx)(Ce,{to:e,activeOptions:{exact:!0},className:`text-muted-foreground hover:text-foreground`,children:t})}function ls({children:e}){return(0,$.jsx)(`h3`,{className:`text-sm font-medium`,children:e})}function us({title:e,children:t}){return(0,$.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,$.jsx)(ls,{children:e}),t]})}function ds(e){return(0,$.jsx)(lt,{title:`Used by`,children:(0,$.jsx)(fs,{...e})})}function fs({workflows:e=[],sites:t=[]}){let{routesByPath:n}=R();return!e.length&&!t.length?(0,$.jsx)(gs,{}):(0,$.jsxs)(_t,{children:[e.map(e=>(0,$.jsx)(yo,{variant:`outline`,size:`xs`,children:(0,$.jsxs)(Ce,{to:`/workflows/$name`,params:{name:e.name},children:[(0,$.jsx)(St,{children:(0,$.jsx)(jt,{children:e.title??e.name})}),hs]})},e.name)),t.map(({site:e,file:t,page:r,via:i})=>{let a=(0,$.jsxs)(St,{children:[(0,$.jsxs)(jt,{children:[e,(0,$.jsx)(`code`,{className:`font-normal text-muted-foreground`,children:r??t})]}),(0,$.jsxs)(xt,{children:[`through `,i.join(` and `)]})]});return r&&Ua(r)&&r in n?(0,$.jsx)(yo,{variant:`outline`,size:`xs`,children:(0,$.jsxs)(Ce,{to:r,children:[a,hs]})},t):(0,$.jsx)(Et,{role:`listitem`,variant:`outline`,size:`xs`,children:a},t)})]})}function ps({site:e,onClick:t}){let{routesByPath:n}=R(),r=e.pages.find(({path:e})=>Ua(e)&&e in n),i=e.title??e.name;return r?(0,$.jsx)(Ce,{to:r.path,onClick:t,children:i}):(0,$.jsx)($.Fragment,{children:i})}function ms({folder:e}){let{data:t}=ni(Le(e));return t===void 0?(0,$.jsx)(ri,{className:`h-5 w-24`}):`error`in t?(0,$.jsx)(`span`,{className:`max-w-72 truncate text-sm text-muted-foreground`,title:t.error,children:t.error}):t.behind===0?(0,$.jsx)(`span`,{className:`text-sm text-muted-foreground`,children:`Up to date`}):(0,$.jsxs)(ut,{tone:`waiting`,dot:!0,children:[r(t.behind,`commit`),` behind`]})}var hs=(0,$.jsx)(wt,{children:(0,$.jsx)(si,{"aria-hidden":`true`,className:`size-4`})});function gs({children:e=`None.`}){return(0,$.jsx)(`p`,{className:`text-muted-foreground`,children:e})}function _s({requestedBy:e,op:t,reasons:n}){return e===`policy`?(0,$.jsxs)($.Fragment,{children:[`the policy`,n?.length?(0,$.jsxs)($.Fragment,{children:[` `,`(`,(0,$.jsx)(`code`,{children:n.join(`, `)}),`)`]}):null,`, holding `,(0,$.jsx)(`code`,{children:t})]}):`the workflow`}var vs=` (nobody else could)`;function ys({note:e}){return(0,$.jsx)(`q`,{className:`block text-muted-foreground italic`,children:e})}function bs(e,t){let n=we(e);return n?.code!==`approval_pending`||!n.runId?!1:(t.invalidateQueries({queryKey:se}),Te.info(`Held for approval`,{description:(0,$.jsx)(Ce,{...S({workflow:pe,runId:n.runId}),className:`underline underline-offset-4`,children:`Open the run`})}),!0)}function xs({problems:e}){return(0,$.jsxs)(Xe,{variant:`destructive`,children:[(0,$.jsx)($e,{"aria-hidden":`true`}),(0,$.jsxs)(rt,{children:[r(e.length,`problem`),` in the data files: their resources are left out`]}),(0,$.jsx)(nt,{children:(0,$.jsx)(`ul`,{className:`flex flex-col gap-1`,children:e.map((e,t)=>(0,$.jsxs)(`li`,{children:[e.file&&(0,$.jsx)(`code`,{children:h(e)}),` `,e.message]},t))})})]})}var Ss=({id:e,className:t})=>(0,$.jsx)(`code`,{className:t,title:e,children:Oa(e)});export{io as $,Go as A,ei as At,fo as B,Vo as C,gi as Ct,_o as D,ni as Dt,gs as E,ri as Et,Yo as F,Hn as Ft,Mo as G,fs as H,Jo as I,Ln as It,Qo as J,co as K,Ss as L,xn as Lt,_s as M,Rr as Mt,lo as N,rr as Nt,ho as O,ti as Ot,us as P,Lr as Pt,ao as Q,ps as R,Sn as Rt,yo as S,Hi as St,po as T,ai as Tt,Po as U,ds as V,mo as W,bs as X,so as Y,oo as Z,rs as _,ca as _t,os as a,Ka as at,Ro as b,Vi as bt,Co as c,Da as ct,Zo as d,Ma as dt,to as et,Xo as f,Aa as ft,Ko as g,wa as gt,Wo as h,Ca as ht,xo as i,$a as it,xs as j,Yr as jt,ns as k,Qr as kt,ys as l,Ea as lt,Ho as m,Ta as mt,ms as n,Za as nt,jo as o,Va as ot,Uo as p,xa as pt,is as q,So as r,Xa as rt,ss as s,ja as st,vs as t,Ja as tt,zo as u,ka as ut,go as v,sa as vt,Bo as w,si as wt,No as x,Ui as xt,Fo as y,Ki as yt,ls as z};
@@ -1 +0,0 @@
1
- import{a as e,i as t,t as n}from"./utils-CMsCvwYQ.js";import{Ei as r,Ji as i,Vi as a,li as o,vi as s}from"./store-BGu0d2Ld.js";e();var c=t();function l({className:e,...t}){return(0,c.jsx)(`div`,{role:`list`,"data-slot":`item-group`,className:n(`group/item-group flex w-full flex-col gap-4 has-data-[size=sm]:gap-2.5 has-data-[size=xs]:gap-2`,e),...t})}var u=i(`group/item flex w-full flex-wrap items-center rounded-lg border text-sm transition-colors duration-100 outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 [a]:transition-colors [a]:hover:bg-muted`,{variants:{variant:{default:`border-transparent`,outline:`border-border`,muted:`border-transparent bg-muted/50`},size:{default:`gap-2.5 px-3 py-2.5`,sm:`gap-2.5 px-3 py-2.5`,xs:`gap-2 px-2.5 py-2 in-data-[slot=dropdown-menu-content]:p-0`}},defaultVariants:{variant:`default`,size:`default`}});function d({className:e,variant:t=`default`,size:i=`default`,render:a,...s}){return o({defaultTagName:`div`,props:r({className:n(u({variant:t,size:i,className:e}))},s),render:a,state:{slot:`item`,variant:t,size:i}})}var f=i(`flex shrink-0 items-center justify-center gap-2 group-has-data-[slot=item-description]/item:translate-y-0.5 group-has-data-[slot=item-description]/item:self-start [&_svg]:pointer-events-none`,{variants:{variant:{default:`bg-transparent`,icon:`[&_svg:not([class*='size-'])]:size-4`,image:`size-10 overflow-hidden rounded-sm group-data-[size=sm]/item:size-8 group-data-[size=xs]/item:size-6 [&_img]:size-full [&_img]:object-cover`}},defaultVariants:{variant:`default`}});function p({className:e,variant:t=`default`,...r}){return(0,c.jsx)(`div`,{"data-slot":`item-media`,"data-variant":t,className:n(f({variant:t,className:e})),...r})}function m({className:e,...t}){return(0,c.jsx)(`div`,{"data-slot":`item-content`,className:n(`flex flex-1 flex-col gap-1 group-data-[size=xs]/item:gap-0 [&+[data-slot=item-content]]:flex-none`,e),...t})}function h({className:e,...t}){return(0,c.jsx)(`div`,{"data-slot":`item-title`,className:n(`line-clamp-1 flex w-fit items-center gap-2 text-sm leading-snug font-medium underline-offset-4`,e),...t})}function g({className:e,...t}){return(0,c.jsx)(`p`,{"data-slot":`item-description`,className:n(`line-clamp-2 text-left text-sm leading-normal font-normal text-muted-foreground group-data-[size=xs]/item:text-xs [&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary`,e),...t})}function _({className:e,...t}){return(0,c.jsx)(`div`,{"data-slot":`item-actions`,className:n(`flex items-center gap-2`,e),...t})}function v(e){return s(19)?e:e?`true`:void 0}var y=`ArrowUp`,b=`ArrowDown`,x=`ArrowLeft`,S=`ArrowRight`,C=`Home`,w=`PageUp`,T=`PageDown`,E=new Set([y,b,x,S,C,`End`]),D=[`Shift`,`Control`,`Alt`,`Meta`];function O(e){return a(e)&&e.tagName===`INPUT`}function k(e){return!!(O(e)&&e.selectionStart!=null||a(e)&&e.tagName===`TEXTAREA`)}function A(e,t,n,r){if(!e||!t||!t.scrollTo)return;let i=e.scrollLeft,a=e.scrollTop,o=e.clientWidth<e.scrollWidth,s=e.clientHeight<e.scrollHeight;if(o&&r!==`vertical`){let r=j(e,t,`left`),a=M(e),o=M(t);n===`ltr`&&(r+t.offsetWidth+o.scrollMarginRight>e.scrollLeft+e.clientWidth-a.scrollPaddingRight?i=r+t.offsetWidth+o.scrollMarginRight-e.clientWidth+a.scrollPaddingRight:r-o.scrollMarginLeft<e.scrollLeft+a.scrollPaddingLeft&&(i=r-o.scrollMarginLeft-a.scrollPaddingLeft)),n===`rtl`&&(r-o.scrollMarginLeft<e.scrollLeft+a.scrollPaddingLeft?i=r-o.scrollMarginLeft-a.scrollPaddingLeft:r+t.offsetWidth+o.scrollMarginRight>e.scrollLeft+e.clientWidth-a.scrollPaddingRight&&(i=r+t.offsetWidth+o.scrollMarginRight-e.clientWidth+a.scrollPaddingRight))}if(s&&r!==`horizontal`){let n=j(e,t,`top`),r=M(e),i=M(t);n-i.scrollMarginTop<e.scrollTop+r.scrollPaddingTop?a=n-i.scrollMarginTop-r.scrollPaddingTop:n+t.offsetHeight+i.scrollMarginBottom>e.scrollTop+e.clientHeight-r.scrollPaddingBottom&&(a=n+t.offsetHeight+i.scrollMarginBottom-e.clientHeight+r.scrollPaddingBottom)}e.scrollTo({left:i,top:a,behavior:`auto`})}function j(e,t,n){let r=n===`left`?`offsetLeft`:`offsetTop`,i=0;for(;t.offsetParent&&(i+=t[r],t.offsetParent!==e);)t=t.offsetParent;return i}function M(e){let t=getComputedStyle(e);return{scrollMarginTop:parseFloat(t.scrollMarginTop)||0,scrollMarginRight:parseFloat(t.scrollMarginRight)||0,scrollMarginBottom:parseFloat(t.scrollMarginBottom)||0,scrollMarginLeft:parseFloat(t.scrollMarginLeft)||0,scrollPaddingTop:parseFloat(t.scrollPaddingTop)||0,scrollPaddingRight:parseFloat(t.scrollPaddingRight)||0,scrollPaddingBottom:parseFloat(t.scrollPaddingBottom)||0,scrollPaddingLeft:parseFloat(t.scrollPaddingLeft)||0}}export{l as _,E as a,T as c,A as d,v as f,g,m as h,y as i,w as l,_ as m,x as n,C as o,d as p,S as r,D as s,b as t,k as u,p as v,h as y};
@@ -1 +0,0 @@
1
- import{i as e}from"./utils-CMsCvwYQ.js";import{Aa as t,Dn as n,Qi as r,en as i,is as a,ui as o}from"./store-BGu0d2Ld.js";import{G as s,Tt as c,s as l,v as u}from"./common-Dw2i6XKZ.js";import{l as d,m as f,s as p,t as m}from"./kit-BsK6VZTQ.js";import{_ as h,g,h as _,m as v,p as y}from"./composite-D9GNDzFj.js";import{D as b,S as x,d as S,w as C,x as w}from"./index-Bn3XeKy8.js";import{t as T}from"./credentials-26vu6Fv5.js";import{n as E,t as D}from"./connections-iqd2XbWQ.js";var O=e(),k={connected:`The GitHub App is created and its keys are stored. Install it on the account that will hold the repository; sign-in uses it once the app restarts on a host beyond this machine.`,expired:`That link from GitHub has expired or did not start here: create the App again.`,failed:`The App's keys were not stored (the app's log says why): delete the App on GitHub if it was created, then create it again.`,"bad-org":`That is not an organization's login.`,nobody:`Say who you are first: the App's keys are stored as you.`},A={set:n};function j(){let{github:e}=S.useSearch(),{data:n}=r(i()),o=e=>n.tokens.find(t=>t.name===e),s=o(`GITHUB_TOKEN`),c=n.enrollmentWriter&&o(n.enrollmentWriter),u=t.map(e=>({...e,rows:e.tokens.map(o).filter(e=>e!==void 0)})).filter(e=>e.rows.length>0);return(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(l,{}),(0,O.jsx)(E,{}),(0,O.jsx)(D,{}),e&&(0,O.jsx)(p,{variant:e===`connected`?`default`:`destructive`,children:k[e]}),(0,O.jsx)(d,{title:`GitHub`,children:(0,O.jsxs)(h,{children:[(0,O.jsx)(M,{app:n.githubApp}),s&&(0,O.jsx)(T,{credential:s,store:A})]})}),u.map(e=>(0,O.jsxs)(d,{title:e.title,children:[(0,O.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:e.about}),(0,O.jsx)(h,{children:e.rows.map(e=>(0,O.jsx)(T,{credential:e,store:A},e.name))})]},e.title)),c&&(0,O.jsxs)(d,{title:`Identity enrollment`,children:[(0,O.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`The control plane's enrollment writer. Its Google Cloud provisioning account is a connection above.`}),(0,O.jsx)(h,{children:(0,O.jsx)(T,{credential:c,store:A})})]}),(0,O.jsxs)(`p`,{className:`text-sm text-muted-foreground`,children:[`Have a repository or a database already?`,` `,(0,O.jsx)(a,{to:`/hosting/existing`,className:`underline underline-offset-4`,children:`Connect an existing one`})]})]})}function M({app:e}){return(0,O.jsxs)(y,{role:`listitem`,variant:`outline`,size:`xs`,children:[(0,O.jsxs)(_,{children:[(0,O.jsxs)(u,{children:[`GitHub App`,e?(0,O.jsx)(`code`,{children:e.slug}):null,(0,O.jsx)(f,{tone:e?`ok`:`off`,children:e?`connected`:`not created`})]}),(0,O.jsx)(g,{className:`line-clamp-none`,children:`The company's own App: its OAuth client signs people in, and its installation creates and pushes the repository.`}),e?.setBy&&e.setAt&&(0,O.jsxs)(g,{children:[`created by `,e.setBy,` · `,(0,O.jsx)(s,{at:Date.parse(e.setAt)})]}),e&&e.missing&&e.missing.length>0&&(0,O.jsxs)(g,{className:`line-clamp-none`,children:[`The App lacks `,(0,O.jsx)(`code`,{children:e.missing.join(`, `)}),`: in its settings on GitHub, under Permissions & events, set them (email addresses are an account permission, the rest repository ones), then accept the update on its installation.`]}),!e&&(0,O.jsxs)(`form`,{method:`get`,action:`/setup/github/manifest`,className:`flex flex-wrap items-end gap-2 pt-2`,children:[(0,O.jsxs)(x,{className:`max-w-64`,children:[(0,O.jsx)(b,{htmlFor:`github-org`,children:`Organization`}),(0,O.jsx)(w,{id:`github-org`,name:`org`,placeholder:`your account`,autoComplete:`off`}),(0,O.jsx)(C,{children:`Leave empty to create it in your personal account.`})]}),(0,O.jsx)(o,{type:`submit`,children:`Create GitHub App`})]})]}),e&&(0,O.jsx)(v,{children:(0,O.jsx)(m,{variant:`outline`,size:`sm`,children:(0,O.jsxs)(`a`,{href:`https://github.com/apps/${e.slug}/installations/new`,target:`_blank`,rel:`noreferrer`,children:[`Install`,(0,O.jsx)(c,{"aria-hidden":`true`,"data-icon":`inline-end`})]})})})]})}export{j as component};
@@ -1,5 +0,0 @@
1
- import{a as e,c as t,i as n}from"./utils-CMsCvwYQ.js";import{$a as r,Kt as i,Qi as a,Ta as o,Xi as s,_o as c,an as l,ao as u,gn as d,ht as f,is as p,ja as m,kn as h,mo as g,mt as _,rn as v,rs as y,tt as b,ui as x,vn as S,vo as C,wn as w,wo as T,xn as ee,ya as E,yn as D}from"./store-BGu0d2Ld.js";import{Dt as O,G as k,U as A,v as te}from"./common-Dw2i6XKZ.js";import{i as j,l as M,m as ne,r as N,s as P}from"./kit-BsK6VZTQ.js";import{_ as re,g as F,h as ie,m as ae,p as oe}from"./composite-D9GNDzFj.js";import{a as se,i as I,n as ce,o as le,r as L,t as ue}from"./table-DjbI5VTn.js";import{D as R,S as z,_ as de,et as fe,w as B,x as V,y as pe}from"./index-Bn3XeKy8.js";import{a as H,i as me,o as he,r as ge,s as _e,t as ve}from"./dialog-DskpUgkl.js";var U=t(e(),1);function ye(e){let t=e.properties;if(e.type!==`object`||!t||typeof t!=`object`||Array.isArray(t))return[{key:`$value`,label:`Credentials`,required:!0,json:e.type!==`string`,root:!0}];let n=new Set(Array.isArray(e.required)?e.required:[]);return Object.entries(t).map(([e,t])=>{let r=t&&typeof t==`object`?t:{};return{key:e,label:typeof r.title==`string`?r.title:e,required:n.has(e),...typeof r.description==`string`&&{description:r.description},json:r.type!==`string`}})}function be(e,t){let n=e.filter(e=>e.required||t[e.key]).map(e=>{let n=t[e.key]??``,r=n;if(e.json)try{r=JSON.parse(n)}catch{throw Error(`Enter valid JSON for ${e.label}`)}return[e.key,r]});return e.length===1&&e[0].root?n[0]?.[1]:Object.fromEntries(n)}var W=n(),xe={prepared:{label:`Destination checked`,tone:`active`},transferring:{label:`Copying`,tone:`active`},verified:{label:`Copies verified · waiting for the switch`,tone:`waiting`},cut_over:{label:`Switched · rollback window`,tone:`waiting`},retired:{label:`Done · old copies retired`,tone:`ok`},cancelled:{label:`Cancelled`,tone:`off`}},Se={copy:`Copy`,kept:`Keep the destination's`,external:`Managed externally · not moved`,bound:`Not in the store · not moved`,missing:`No value · nothing to copy`},G=new Set(r),Ce=b.sanoma.storeMigration;function we({actor:e,stores:t}){let[n,r]=(0,U.useState)(),a=O(v(e,n)),o=a.data?.[0],s=n&&a.data&&!a.data.some(e=>e.id===n.runId);return(0,W.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[s&&(0,W.jsxs)(P,{children:[`Starting the move.`,` `,(0,W.jsx)(p,{...i({workflow:`migrate-store`,runId:n.runId}),className:`underline`,children:`Open the run`}),` `,`if it does not show here.`]}),o&&(0,W.jsx)(De,{move:o,stores:t}),a.data&&(!o||!G.has(o.phase))&&(0,W.jsx)(Te,{stores:t,onStarted:e=>r({runId:e,at:Date.now()})}),a.error&&(0,W.jsx)(P,{variant:`destructive`,children:K(a.error)})]})}function Te({stores:e,onStarted:t}){let n=Object.keys(e),[r,i]=(0,U.useState)(n[0]),[a,o]=(0,U.useState)(168),[c,u]=(0,U.useState)(),d=s({mutationFn:()=>Ce.plan({to:r}),onSuccess:u}),f=l({navigate:!1}),p=E(),m=()=>f.mutate({workflow:g,input:{to:r,retainHours:a}},{onSuccess:({runId:e})=>{u(void 0),t(e),p.invalidateQueries({queryKey:[`store-moves`]})}}),h=d.error??f.error;return(0,W.jsxs)(`form`,{className:`flex flex-col gap-3`,"aria-label":`Move secrets`,onSubmit:e=>{e.preventDefault(),c?m():d.mutate()},children:[(0,W.jsxs)(`div`,{className:`flex flex-wrap items-end gap-3`,children:[(0,W.jsxs)(z,{className:`w-fit`,children:[(0,W.jsx)(R,{htmlFor:`move-to`,children:`Move secrets to`}),(0,W.jsx)(de,{id:`move-to`,value:r,onChange:e=>{i(e.target.value),u(void 0)},children:n.map(t=>(0,W.jsxs)(pe,{value:t,children:[t,` · `,e[t].store,` · `,e[t].namespace]},t))})]}),(0,W.jsxs)(z,{className:`w-40`,children:[(0,W.jsx)(R,{htmlFor:`move-retain`,children:`Rollback window (hours)`}),(0,W.jsx)(V,{id:`move-retain`,type:`number`,min:0,max:8784,value:a,onChange:e=>o(Math.max(0,Math.trunc(Number(e.target.value)||0)))})]}),(0,W.jsx)(x,{type:`submit`,disabled:d.isPending||f.isPending||!!c&&c.problems.length>0,children:c?`Start move`:`Review plan`})]}),(0,W.jsx)(B,{children:`Sanoma copies each value it manages, reads every copy back, and switches only once your code selects the destination. The old copies stay for the rollback window, then are deleted.`}),c&&(0,W.jsx)(Ee,{plan:c}),h&&(0,W.jsx)(P,{variant:`destructive`,children:K(h)})]})}function Ee({plan:e}){let t=e.items.filter(e=>e.action===`copy`).length;return(0,W.jsxs)(`div`,{className:`flex flex-col gap-2`,"aria-label":`Plan`,children:[(0,W.jsxs)(`p`,{className:`text-sm`,children:[t,` `,t===1?`secret`:`secrets`,` to copy from `,(0,W.jsx)(`strong`,{children:e.source.store}),` ·`,` `,(0,W.jsx)(`code`,{children:e.source.namespace}),` to `,(0,W.jsx)(`strong`,{children:e.destination.store}),` ·`,` `,(0,W.jsx)(`code`,{children:e.destination.namespace}),`. Writes to the current store pause while values move.`]}),e.problems.length>0&&(0,W.jsxs)(P,{variant:`destructive`,children:[`The destination cannot take these secrets yet: `,e.problems.join(`; `)]}),(0,W.jsx)(Oe,{items:e.items.map(e=>({name:e.name,kind:e.kind,note:Se[e.action],size:e.bytes,reauthorize:e.reauthorize,connections:e.connections}))})]})}function De({move:e,stores:t}){let n=E(),r=s({mutationFn:()=>Ce.cancel({move:e.id}),onSuccess:()=>n.invalidateQueries({queryKey:[`store-moves`]})}),a=xe[e.phase],o=e.items.filter(e=>e.action===`copy`),c=o.filter(e=>e.state!==`pending`&&e.state!==`stale`&&e.state!==`copied`).length,l=Object.entries(t).find(([,t])=>t.store===e.source.store&&t.namespace===e.source.namespace)?.[0];return(0,W.jsxs)(`div`,{className:`flex flex-col gap-3`,"aria-label":`Store move`,children:[(0,W.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,W.jsx)(ne,{tone:a.tone,dot:!0,children:a.label}),(0,W.jsxs)(`span`,{className:`text-sm`,children:[e.source.store,` · `,(0,W.jsx)(`code`,{children:e.source.namespace}),` → `,(0,W.jsx)(`strong`,{children:e.destinationName}),` (`,e.destination.store,` · `,(0,W.jsx)(`code`,{children:e.destination.namespace}),`)`]}),(0,W.jsx)(p,{...i({workflow:g,runId:e.id}),className:`text-sm underline`,children:`Open the run`})]}),(0,W.jsxs)(j,{children:[(0,W.jsxs)(N,{label:`Started`,children:[(0,W.jsx)(A,{at:e.createdAt}),` by `,e.startedBy]}),(0,W.jsxs)(N,{label:`Verified`,children:[c,` of `,o.length]}),e.cutoverAt&&(0,W.jsx)(N,{label:`Switched`,children:(0,W.jsx)(A,{at:e.cutoverAt})}),e.retainUntil&&e.phase===`cut_over`&&(0,W.jsxs)(N,{label:`Retires old copies`,children:[`after `,(0,W.jsx)(A,{at:e.retainUntil})]}),e.retiredAt&&(0,W.jsx)(N,{label:`Retired`,children:(0,W.jsx)(A,{at:e.retiredAt})})]}),e.fenced&&G.has(e.phase)&&(0,W.jsx)(P,{children:`Writes to the current store are paused while values move. Reads keep working.`}),e.phase===`verified`&&(0,W.jsxs)(P,{children:[`Every copy reads back equal. To switch, change `,(0,W.jsx)(`code`,{children:`secrets`}),` in `,(0,W.jsx)(`code`,{children:`sanoma.config.ts`}),` so it selects `,(0,W.jsx)(`code`,{children:e.destinationName}),`'s store and lists the current one under `,(0,W.jsx)(`code`,{children:`stores`}),l?(0,W.jsxs)(W.Fragment,{children:[` `,`(as `,(0,W.jsx)(`code`,{children:l}),`)`]}):null,`, then publish the change. The move cuts over once the deployed code selects it.`,(0,W.jsx)(`pre`,{className:`mt-2 text-xs`,children:`secrets: {
2
- store: /* ${e.destinationName}'s store */,
3
- namespace: "${e.destination.namespace}",
4
- stores: { ${l??`previous`}: { /* the current store */ namespace: "${e.source.namespace}" } },
5
- }`})]}),e.items.some(e=>e.reauthorize)&&(0,W.jsx)(P,{children:`Some connections were authorized with an OAuth application the destination does not share. Reconnect them after the switch.`}),(0,W.jsx)(Oe,{items:e.items.map(e=>({name:e.name,kind:e.kind,note:e.action===`copy`||e.action===`kept`?e.state:Se[e.action],size:e.bytes,reauthorize:e.reauthorize}))}),G.has(e.phase)&&(0,W.jsx)(`div`,{children:(0,W.jsx)(x,{variant:`outline`,disabled:r.isPending,onClick:()=>r.mutate(),children:`Cancel move`})}),r.error&&(0,W.jsx)(P,{variant:`destructive`,children:K(r.error)})]})}function Oe({items:e}){return(0,W.jsxs)(ue,{children:[(0,W.jsx)(se,{children:(0,W.jsxs)(le,{children:[(0,W.jsx)(I,{children:`Secret`}),(0,W.jsx)(I,{children:`Kind`}),(0,W.jsx)(I,{children:`What happens`}),(0,W.jsx)(I,{className:`text-right`,children:`Size`})]})}),(0,W.jsx)(ce,{children:e.map(e=>(0,W.jsxs)(le,{children:[(0,W.jsx)(L,{className:`font-mono`,children:e.name}),(0,W.jsxs)(L,{children:[e.kind,e.connections?.length?` · ${e.connections.join(`, `)}`:``]}),(0,W.jsxs)(L,{children:[e.note,e.reauthorize&&` · reconnect after the switch`]}),(0,W.jsx)(L,{className:`text-right`,children:e.size===void 0?``:`${e.size} B`})]},e.name))})]})}var K=e=>m(e)?.error??T(e);function ke({vendor:e,callback:t}){let{actor:n}=fe();return n?(0,W.jsx)(je,{vendor:e,actor:n,callback:t},n):(0,W.jsx)(P,{children:`Sign in to manage connections.`})}var Ae={"api-key":`API key`,fields:`credentials`,signed:`signing key`,oauth2:`OAuth consent`};function je({vendor:e,actor:t,callback:n}){let r=O({...f(),queryKey:[`connections`,t]}),[i,a]=(0,U.useState)(),[s,c]=(0,U.useState)(),[l,u]=(0,U.useState)(!1);if(r.error)return(0,W.jsx)($,{error:r.error});if(!r.data)return(0,W.jsx)(P,{children:`Loading connections…`});let d=r.data,p=d.cards.filter(t=>!e||t.vendor===e),m=d.rules.filter(t=>!e||t.vendor===e);if(!p.length&&!m.length)return null;let h=e?Object.entries(d.methods[e]??{}):[],g=n?.attempt&&!l&&!p.some(e=>e.id===n.connection)?n.attempt:void 0;return(0,W.jsxs)(M,{title:`Connections`,children:[(0,W.jsx)(`p`,{className:`text-muted-foreground`,children:`Accounts and requirements are declared in code. Actions follow your company’s policies.`}),h.length>0&&(0,W.jsxs)(`p`,{className:`text-sm text-muted-foreground`,children:[`Ways to connect:`,` `,h.map(([e,t],n)=>(0,W.jsxs)(`span`,{children:[n>0&&`, `,(0,W.jsx)(`code`,{children:e}),` (`,Ae[t.kind]??t.kind,`)`]},e))]}),n?.error&&(0,W.jsx)(P,{variant:`destructive`,children:o[n.error]}),g&&(0,W.jsx)(X,{attempt:g,vendor:e??n?.connection?.split(`/`)[0]??`the provider`,onDismiss:()=>u(!0)}),(0,W.jsx)(re,{children:p.map(e=>(0,W.jsx)(Pe,{card:e,data:d,attempt:n?.connection===e.id?n.attempt:void 0},e.id))}),m.map(e=>(0,W.jsxs)(`div`,{children:[(0,W.jsxs)(x,{variant:`outline`,disabled:!J(d.store),onClick:()=>a(e.id),children:[`Connect account · `,e.name]}),!J(d.store)&&(0,W.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`This store cannot safely create account credentials. Declare a named connection with an external binding to review an existing account.`}),i===e.id&&(d.methods[e.vendor]?.[e.method]?.kind===`oauth2`?(0,W.jsx)(Fe,{name:e.name,vendor:e.vendor,target:{rule:e.id},onStarted:t=>c({rule:e.id,attempt:t}),onClose:()=>a(void 0)}):(0,W.jsx)(Y,{name:e.name,target:{rule:e.id},method:d.methods[e.vendor]?.[e.method],store:d.store,onClose:()=>a(void 0)})),s?.rule===e.id&&(0,W.jsx)(X,{attempt:s.attempt,vendor:e.vendor,onDismiss:()=>c(void 0)})]},e.id)),(0,W.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Workflows using this connector may select these accounts. Each call checks the selected account and its permissions.`})]})}function Me(){let{actor:e}=fe(),{data:t}=a(_()),n=O({...f(),queryKey:[`connections`,e??``],enabled:!!e}),r=t.secrets;if(!r)return null;let i=r.stores??{};return(0,W.jsxs)(M,{title:`Secret storage`,children:[(0,W.jsxs)(`p`,{children:[(0,W.jsx)(`strong`,{children:r.store}),` · namespace `,(0,W.jsx)(`code`,{children:r.namespace})]}),(0,W.jsxs)(`p`,{className:`text-sm text-muted-foreground`,children:[`The store, namespace and bindings come from your company’s code. Change them there to select another provider.`,Object.keys(i).length>0?` To take the values along, move them to one of the other stores it names first.`:` To take the values along, name the new store under secrets.stores and move them.`]}),n.data&&(0,W.jsxs)(`p`,{children:[n.data.store.ready?`Store access checked`:`Store needs attention: ${n.data.store.problem}`,` ·`,` `,n.data.store.capabilities.writable?`Sanoma can manage values`:`Read-only store; values are managed externally`]}),n.error&&(0,W.jsx)($,{error:n.error}),n.data&&(0,W.jsx)(`ul`,{className:`text-sm text-muted-foreground`,children:n.data.bootstrap.map(e=>(0,W.jsxs)(`li`,{children:[(0,W.jsx)(`code`,{children:e.name}),`:`,` `,e.ready?`ready · ${e.delivery}`:`needs configuration · supply either ${e.name} or ${e.name}_FILE`]},e.name))}),!e&&(0,W.jsx)(P,{children:`Sign in to check store access.`}),e&&Object.keys(i).length>0&&(0,W.jsx)(we,{actor:e,stores:i}),r.store===`postgres`&&(0,W.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`The built-in store encrypts credentials in your database. Local setup creates its protection key automatically; hosted deployments supply it separately as SANOMA_SECRETS_KEY or SANOMA_SECRETS_KEY_FILE.`}),Object.entries(r.bindings).length>0&&(0,W.jsx)(`dl`,{className:`grid gap-2 text-sm`,children:Object.entries(r.bindings).map(([e,t])=>(0,W.jsxs)(`div`,{children:[(0,W.jsx)(`dt`,{className:`font-mono`,children:e}),(0,W.jsxs)(`dd`,{children:[t.store,` · `,t.path,` ·`,` `,t.management===`external`?`Managed externally`:`Managed by Sanoma`]})]},e))})]})}var Ne=new Set([`expired`,`revoked`,`rejected`,`uncertain`,`missing`]),q={revoked:`the provider no longer accepts the refresh token`,rejected:`the provider refused the renewal`,expired:`the grant has no refresh token`,unavailable:`the provider could not be reached; it is tried again`,uncertain:`the provider may have renewed the grant and it was not stored`},J=e=>e.capabilities.writable&&e.capabilities.conditionalWrites!==`none`;function Pe({card:e,data:t,attempt:n}){let[r,i]=(0,U.useState)(!1),[a,o]=(0,U.useState)(n),[s,l]=(0,U.useState)(!1),[u,d]=(0,U.useState)(),[f,m]=(0,U.useState)(),g=E(),_=y(h),v=y(ee),b=t.methods[e.vendor]?.[e.method],S=e.location?.management===`external`||!t.store.capabilities.writable,w=b?.kind===`oauth2`,T=!S&&!J(t.store),D=e.status===`connected`?e.health?.state??`connected`:e.status,O=e.renewal?.outcome===`refreshed`?void 0:e.renewal?.outcome,A=w&&e.status!==`disconnected`&&(Ne.has(D)||Ne.has(O??``)),j=w&&!!e.revision&&e.status!==`disconnected`;async function M(t){l(!0),d(void 0);let n=f?.action===t?f.id:crypto.randomUUID();m({action:t,id:n});let r={vendor:e.vendor,$connection:e.id};try{t===`test`?await _({data:{connection:r,requestId:n}}):await v({data:{connection:r,expectedRevision:e.revision,requestId:n,revoke:t===`revoke`}}),m(void 0),await g.invalidateQueries({queryKey:[`connections`]})}catch(e){d(e)}finally{l(!1)}}return(0,W.jsxs)(oe,{variant:`outline`,role:`listitem`,children:[(0,W.jsxs)(ie,{children:[(0,W.jsxs)(te,{children:[(0,W.jsx)(`code`,{children:e.name}),(0,W.jsx)(ne,{tone:D===`connected`&&!A?`ok`:`off`,children:A?`needs reconnect`:D.replaceAll(`_`,` `)})]}),(0,W.jsxs)(F,{className:`line-clamp-none`,children:[e.account?`Account: ${e.account}`:`No verified account`,` · `,e.method,` ·`,` `,e.owner?`Owned by ${e.owner}`:`Company connection`]}),(0,W.jsxs)(F,{children:[`Granted scopes: `,e.scopes.join(`, `)||`none reported`,`. Required:`,` `,e.requiredScopes.join(`, `)||`none`,`.`]}),e.location&&(0,W.jsxs)(F,{className:`line-clamp-none`,children:[e.location.store,` · `,e.location.namespace,` · `,e.location.path,` ·`,` `,S?`Managed externally`:`Managed by Sanoma`]}),e.boundLocation&&Q(e.boundLocation,e.location)&&(0,W.jsxs)(F,{className:`line-clamp-none`,children:[`Previously bound to `,Z(e.boundLocation),`. Review the new destination before reconnecting.`]}),S&&(0,W.jsx)(F,{className:`line-clamp-none`,children:`Replace or renew credentials at the management location above, then Test. Disconnect does not delete the external value.`}),w&&S&&(0,W.jsx)(F,{className:`line-clamp-none`,children:`OAuth needs a store Sanoma can write, with conditional writes, to keep each grant. This connection’s store is read-only: select a writable store in code to connect it.`}),e.health&&(0,W.jsxs)(F,{children:[`Last checked `,(0,W.jsx)(k,{at:Date.parse(e.health.checkedAt)}),e.health.externallyRenewed&&` · Externally renewed`,e.health.expiresAt&&(0,W.jsxs)(W.Fragment,{children:[` `,`· Valid until`,` `,(0,W.jsx)(`time`,{dateTime:e.health.expiresAt,children:new Date(e.health.expiresAt).toLocaleString()})]})]}),e.renewal?.refreshedAt&&(0,W.jsxs)(F,{children:[`Renewed `,(0,W.jsx)(k,{at:Date.parse(e.renewal.refreshedAt)}),e.renewal.dueAt&&(0,W.jsxs)(W.Fragment,{children:[` `,`· Next renewal`,` `,(0,W.jsx)(`time`,{dateTime:e.renewal.dueAt,children:new Date(e.renewal.dueAt).toLocaleString()})]})]}),O&&e.status===`connected`&&!A&&(0,W.jsxs)(F,{className:`line-clamp-none`,children:[`The last renewal failed: `,q[O]??O.replaceAll(`_`,` `),`.`]}),e.storageProblem&&(0,W.jsxs)(F,{className:`line-clamp-none`,children:[`This method `,C[e.storageProblem],`. Before connecting, change your company’s code:`,` `,c[e.storageProblem],`.`]}),w&&e.status===`uncertain`&&(0,W.jsx)(F,{className:`line-clamp-none`,children:`The provider may have issued or renewed a grant that was not stored, so Sanoma stopped using this account. Reconnect to authorize a new one.`}),A&&e.status!==`uncertain`&&(0,W.jsxs)(F,{className:`line-clamp-none`,children:[O&&q[O]?`The last renewal failed: ${q[O]}.`:`The provider no longer accepts this grant.`,` `,`Reconnect to authorize a new one.`]}),j&&(0,W.jsxs)(F,{className:`line-clamp-none`,children:[`Disconnect deletes the grant Sanoma keeps and leaves the OAuth application for other accounts.`,b?.revocable?` Revoke also asks the provider to end the authorization.`:` The provider’s own authorization stays: revoke it in the provider’s settings.`,` `,`Calls already sent are not undone.`]}),a&&(0,W.jsx)(X,{attempt:a,vendor:e.vendor,onDismiss:()=>o(void 0)}),T&&!e.storageProblem&&(0,W.jsx)(F,{className:`line-clamp-none`,children:`This store lacks conditional writes. Use an external binding or select a store that supports safe credential replacement.`}),e.updatedBy&&e.updatedAt&&(0,W.jsxs)(F,{children:[`Changed by `,e.updatedBy,` · `,(0,W.jsx)(k,{at:Date.parse(e.updatedAt)})]}),(0,W.jsx)(`div`,{className:`text-sm text-muted-foreground`,children:e.workflows.length?(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(`span`,{children:`Workflows: `}),e.workflows.map((e,t)=>(0,W.jsxs)(`span`,{children:[t>0&&`, `,(0,W.jsx)(p,{to:`/workflows/$name`,params:{name:e.name},className:`underline`,children:e.title}),e.selection===`possible`&&` (account chosen at runtime)`]},e.name))]}):`No workflow dependencies found in code.`}),u!==void 0&&(0,W.jsx)($,{error:u})]}),(0,W.jsxs)(ae,{children:[(0,W.jsx)(x,{variant:`outline`,disabled:s||!b?.verifiable||!t.store.ready||w&&S||T||!!e.storageProblem,onClick:()=>i(!0),children:S?`Review connection`:w?e.account?`Reconnect`:`Connect account`:e.account?`Replace credentials`:`Connect`}),b?.verifiable&&(0,W.jsx)(x,{variant:`outline`,disabled:s,onClick:()=>void M(`test`),children:`Test`}),e.revision&&e.status!==`disconnected`&&(0,W.jsx)(x,{variant:`ghost`,disabled:s,onClick:()=>void M(`disconnect`),children:`Disconnect`}),j&&b?.revocable&&(0,W.jsx)(x,{variant:`ghost`,disabled:s,onClick:()=>void M(`revoke`),children:`Revoke`})]}),r&&(w?(0,W.jsx)(Fe,{name:e.name,vendor:e.vendor,target:{connection:{vendor:e.vendor,$connection:e.id}},onStarted:o,onClose:()=>i(!1)}):(0,W.jsx)(Y,{name:e.name,target:{connection:{vendor:e.vendor,$connection:e.id}},method:b,card:e,store:t.store,onClose:()=>i(!1)}))]})}function Y({name:e,target:t,method:n,card:r,store:i,onClose:a}){let[o]=(0,U.useState)(()=>crypto.randomUUID()),[s,c]=(0,U.useState)({}),[l,u]=(0,U.useState)(),[d,f]=(0,U.useState)(!1),[p,m]=(0,U.useState)(),h=y(w),g=y(S),_=E(),v=r?.location?.management===`external`||!i.capabilities.writable,b=!v,C=ye(n?.schema??{});async function T(){f(!0),m(void 0);try{let e=b?be(C,s):void 0;l?(await g({data:{review:l,credentials:e}}),c({}),a(),await _.invalidateQueries({queryKey:[`connections`]})):u(await h({data:{target:t,credentials:e,requestId:o}}))}catch(e){m(e)}finally{f(!1)}}return(0,W.jsx)(ve,{open:!0,onOpenChange:e=>{!e&&!d&&(c({}),a())},children:(0,W.jsx)(ge,{children:(0,W.jsxs)(`form`,{className:`flex flex-col gap-4`,onSubmit:e=>{e.preventDefault(),T()},children:[(0,W.jsxs)(he,{children:[(0,W.jsxs)(_e,{children:[l?`Review connection`:`Connect`,` · `,e]}),(0,W.jsx)(me,{children:v?`Read the existing credentials from the declared management location and verify the account.`:`Enter credentials securely. They are never included in an approval or workflow history.`})]}),!n?.verifiable&&(0,W.jsx)(P,{children:`This authentication method does not supply account verification.`}),b&&C.map(e=>(0,W.jsxs)(z,{children:[(0,W.jsxs)(R,{htmlFor:`connection-${e.key}`,children:[e.label,e.required?` *`:``]}),(0,W.jsx)(V,{id:`connection-${e.key}`,type:`password`,autoComplete:`new-password`,"data-1p-ignore":!0,"data-lpignore":`true`,spellCheck:!1,required:e.required,disabled:d||!!l,value:s[e.key]??``,onChange:t=>c({...s,[e.key]:t.target.value})}),e.description&&(0,W.jsx)(B,{children:e.description}),e.json&&(0,W.jsx)(B,{children:`Enter this field as JSON.`})]},e.key)),l&&(0,W.jsxs)(`div`,{className:`flex flex-col gap-2 text-sm`,children:[(0,W.jsxs)(`p`,{children:[(0,W.jsx)(`strong`,{children:`Verified account:`}),` `,l.account]}),l.previousAccount&&l.previousAccount!==l.account&&(0,W.jsxs)(P,{children:[`Changes account from `,l.previousAccount,` to `,l.account,`. Workflows selecting this connection will use the new account.`]}),(0,W.jsxs)(`p`,{children:[(0,W.jsx)(`strong`,{children:`Granted scopes:`}),` `,l.scopes.join(`, `)||`none reported`]}),(0,W.jsxs)(`p`,{children:[(0,W.jsx)(`strong`,{children:`Destination:`}),` `,l.location?`${l.location.store} · ${l.location.namespace} · ${l.location.path}`:`No secret store is configured`]}),l.previousLocation&&Q(l.previousLocation,l.location)&&(0,W.jsxs)(P,{children:[`Changes storage from `,Z(l.previousLocation),` to `,Z(l.location),`. The previous stored value is retained; this action does not transfer or delete it.`]}),(0,W.jsx)(`p`,{children:v?`Uses the existing value; Sanoma will not replace or delete it.`:`Saving pauses this connection until the stored credentials are verified and activation is authorized.`})]}),p!==void 0&&(0,W.jsx)($,{error:p}),(0,W.jsxs)(H,{children:[(0,W.jsx)(x,{type:`button`,variant:`outline`,disabled:d,onClick:()=>{c({}),a()},children:`Cancel`}),(0,W.jsx)(x,{type:`submit`,disabled:d||!n?.verifiable||!i.ready,children:d?`Checking…`:l?`Save connection`:`Verify and review`})]})]})})})}function Fe({name:e,vendor:t,target:n,onStarted:r,onClose:i}){let[a,o]=(0,U.useState)(),[s,c]=(0,U.useState)(``),[l,u]=(0,U.useState)(``),[f,p]=(0,U.useState)(!1),[m,h]=(0,U.useState)(),g=y(d),_=()=>{u(``),i()};async function v(){p(!0),h(void 0);let e=window.open(``,`_blank`);try{let t=!!(s||l),i=a?.replaces===t?a.id:crypto.randomUUID();o({id:i,replaces:t});let{url:c,attempt:u}=await g({data:{target:n,requestId:i,...t?{client:{clientId:s,clientSecret:l}}:{}}});e?(e.opener=null,e.location.href=c):window.location.assign(c),r(u),_()}catch(t){e?.close(),h(t)}finally{p(!1)}}return(0,W.jsx)(ve,{open:!0,onOpenChange:e=>!e&&!f&&_(),children:(0,W.jsx)(ge,{children:(0,W.jsxs)(`form`,{className:`flex flex-col gap-4`,onSubmit:e=>{e.preventDefault(),v()},children:[(0,W.jsxs)(he,{children:[(0,W.jsxs)(_e,{children:[`Connect · `,e]}),(0,W.jsxs)(me,{children:[`You approve access at `,t,` in a new tab, then come back here. The grant goes to the secret store, never into an approval or workflow history.`]})]}),(0,W.jsxs)(z,{children:[(0,W.jsx)(R,{htmlFor:`oauth-client-id`,children:`Client ID`}),(0,W.jsx)(V,{id:`oauth-client-id`,autoComplete:`off`,"data-1p-ignore":!0,"data-lpignore":`true`,spellCheck:!1,required:!!l,disabled:f,value:s,onChange:e=>c(e.target.value)})]}),(0,W.jsxs)(z,{children:[(0,W.jsx)(R,{htmlFor:`oauth-client-secret`,children:`Client secret`}),(0,W.jsx)(V,{id:`oauth-client-secret`,type:`password`,autoComplete:`new-password`,"data-1p-ignore":!0,"data-lpignore":`true`,spellCheck:!1,required:!!s,disabled:f,value:l,onChange:e=>u(e.target.value)}),(0,W.jsxs)(B,{children:[`Your company’s OAuth application at `,t,`. Leave both empty to use the one already stored.`]})]}),m!==void 0&&(0,W.jsx)($,{error:m}),(0,W.jsxs)(H,{children:[(0,W.jsx)(x,{type:`button`,variant:`outline`,disabled:f,onClick:_,children:`Cancel`}),(0,W.jsx)(x,{type:`submit`,disabled:f,children:f?`Starting…`:`Continue to ${t}`})]})]})})})}var Ie={approval_pending:`Waiting for approval to store the grant.`,declined:`Consent was declined at the provider. Nothing changed.`,rejected:`The provider refused the code or the OAuth application’s credentials. Check the application, then connect again.`,wrong_account:`The provider authorized an account this connection does not allow. Connect again with the right one.`,scope_changed:`The grant lacks a scope this connection requires. Grant it, then connect again.`,uncertain:`The provider may have issued a grant that was not stored. Reconnect to authorize a new one.`,expired:`The attempt expired before it finished. Connect again.`,missing:`The OAuth application’s client ID and secret are not stored. Connect again and enter them.`,revoked:`The provider revoked the grant. Connect again.`,unavailable:`The connection could not be completed. Connect again.`,unsupported:`This connection cannot connect by OAuth.`},Le=e=>e?.state===`connected`||e?.state===`failed`;function X({attempt:e,vendor:t,onDismiss:n}){let r=y(D),a=E(),o=O({queryKey:[`connection-attempt`,e],queryFn:()=>r({data:{attempt:e}}),refetchInterval:e=>!Le(e.state.data)&&1500}),s=o.data,c=Le(s);if((0,U.useEffect)(()=>{c&&a.invalidateQueries({queryKey:[`connections`]})},[c,a]),o.error)return(0,W.jsx)($,{error:o.error});if(!s)return(0,W.jsx)(F,{children:`Checking the connection attempt…`});let l=s.problem&&Ie[s.problem];return(0,W.jsxs)(`div`,{role:`status`,className:`flex flex-col gap-1 text-sm`,children:[s.state===`waiting`&&(0,W.jsxs)(`p`,{children:[`Waiting for you to approve access at `,t,` in the other tab…`]}),s.state===`exchanging`&&(0,W.jsxs)(`p`,{children:[l??`Storing the grant and verifying the account…`,s.runId&&s.problem===`approval_pending`&&(0,W.jsxs)(W.Fragment,{children:[` `,(0,W.jsx)(p,{...i({workflow:`connect`,runId:s.runId}),target:`_blank`,rel:`noreferrer`,className:`underline`,children:`Review the request`})]})]}),s.state===`connected`&&(0,W.jsx)(`p`,{children:`Connected. The account is verified.`}),s.state===`failed`&&(0,W.jsx)(P,{variant:`destructive`,children:l??Ie.unavailable}),(s.state===`connected`||s.state===`failed`)&&(0,W.jsx)(x,{variant:`ghost`,size:`sm`,className:`self-start`,onClick:n,children:`Dismiss`})]})}var Z=e=>e?`${e.store} · ${e.namespace} · ${e.path} · ${e.management===`external`?`managed externally`:`managed by Sanoma`}`:`no secret store configured`,Q=(e,t)=>!t||[`store`,`namespace`,`path`,`management`].some(n=>e[n]!==t[n]);function $({error:e}){let t=m(e);return(0,W.jsx)(P,{variant:`destructive`,children:t?.code===`approval_pending`&&t.runId?(0,W.jsxs)(W.Fragment,{children:[`Waiting for approval.`,` `,(0,W.jsx)(p,{...i({workflow:u,runId:t.runId}),target:`_blank`,rel:`noreferrer`,className:`underline`,children:`Review the request`}),`, then retry this action. Credentials stay in this form only while it is open.`]}):t?.error??(e instanceof Error?e.message:`Could not complete this connection action`)})}export{Me as n,ke as t};
@@ -1 +0,0 @@
1
- import{a as e,c as t,i as n,n as r}from"./utils-CMsCvwYQ.js";import{Co as i,Qi as a,_t as o,as as s,bt as c,is as l,mt as u,ot as d}from"./store-BGu0d2Ld.js";import{B as f,Et as p,S as m,T as h,W as g,f as _,s as v,wt as y}from"./common-Dw2i6XKZ.js";import{l as b,o as x,s as S}from"./kit-BsK6VZTQ.js";import{_ as C,g as w,h as T,m as E,v as D,y as O}from"./composite-D9GNDzFj.js";import{z as k}from"./index-Bn3XeKy8.js";import{t as A}from"./Plug.es-CaZsN5P-.js";import{a as j,i as M,n as N,r as P,t as F}from"./sheet-BYL9XU5s.js";import{n as I}from"./connections-iqd2XbWQ.js";var L={connectors:{},apps:{},solutions:{}},R=(e,t=L)=>t.connectors[e]?.tier??(e===`sanoma`||e.startsWith(`@sanoma-ai/`)?`official`:`community`),z=t(e()),B=n();function V(){return(0,B.jsxs)(B.Fragment,{children:[(0,B.jsx)(v,{}),(0,B.jsx)(I,{}),(0,B.jsx)(b,{title:`Installed`,children:(0,B.jsx)(H,{})}),(0,B.jsx)(b,{title:`Available`,children:(0,B.jsx)(z.Suspense,{fallback:(0,B.jsx)(p,{className:`h-16 w-full`}),children:(0,B.jsx)(U,{})})})]})}function H(){let{data:e}=a({...u(),select:o}),{data:t}=a(c());return e.length===0?(0,B.jsx)(x,{title:`This config has no connectors`}):(0,B.jsx)(C,{children:e.map(({id:e,vendor:n,ops:i,workflows:a})=>(0,B.jsx)(m,{variant:`outline`,children:(0,B.jsxs)(l,{to:`/connectors/$vendor`,params:{vendor:e},children:[(0,B.jsx)(D,{children:(0,B.jsx)(g,{vendor:e,alt:``,className:`size-6`})}),(0,B.jsxs)(T,{children:[(0,B.jsxs)(O,{children:[n.title,(0,B.jsx)(`code`,{className:`font-normal text-muted-foreground`,children:e}),n.package&&(0,B.jsx)(f,{tier:R(n.package)})]}),(0,B.jsxs)(w,{children:[r(i.length,`operation`),` · used by `,r(a.length,`workflow`),t[e]&&` · ${q(t[e])}`]})]}),(0,B.jsx)(E,{children:(0,B.jsx)(y,{"aria-hidden":`true`,className:`size-4`})})]})},e))})}function U(){let{data:e}=a({...u(),select:G}),{data:t}=a(d()),n=t.connectors.filter(t=>!e.has(t.package)),{add:r}=k.useSearch(),i=s({from:k.fullPath}),o=n.find(e=>e.package===r);return(0,B.jsxs)(B.Fragment,{children:[t.error&&(0,B.jsxs)(S,{children:[`npm could not be reached, so only the installed connectors show. `,t.error]}),!t.error&&n.length===0&&(0,B.jsx)(x,{title:`No other connectors found on npm`}),n.length>0&&(0,B.jsx)(C,{children:n.map(e=>(0,B.jsx)(m,{variant:`outline`,children:(0,B.jsxs)(l,{to:`.`,search:{add:e.package},"aria-current":e.package===r?`page`:void 0,children:[(0,B.jsx)(D,{children:(0,B.jsx)(K,{connector:e})}),(0,B.jsxs)(T,{children:[(0,B.jsxs)(O,{children:[e.title,(0,B.jsx)(`code`,{className:`font-normal text-muted-foreground`,children:e.package}),(0,B.jsx)(f,{tier:R(e.package)})]}),(0,B.jsxs)(w,{children:[e.description?`${e.description} · `:``,`v`,e.version]})]})]})},e.package))}),(0,B.jsx)(F,{open:o!==void 0,onOpenChange:e=>!e&&void i({search:{}}),children:(0,B.jsx)(N,{children:o&&(0,B.jsx)(W,{connector:o})})})]})}function W({connector:e}){let t=`https://www.npmjs.com/package/${e.package}`;return(0,B.jsxs)(B.Fragment,{children:[(0,B.jsxs)(M,{children:[(0,B.jsxs)(j,{className:`flex items-center gap-2`,children:[(0,B.jsx)(K,{connector:e}),e.title,(0,B.jsx)(f,{tier:R(e.package)})]}),(0,B.jsxs)(P,{children:[(0,B.jsx)(`code`,{children:e.package}),` v`,e.version,e.description&&(0,B.jsxs)(B.Fragment,{children:[` · `,e.description]})]})]}),(0,B.jsxs)(`div`,{className:`flex flex-col gap-4 px-4`,children:[(0,B.jsxs)(`div`,{className:`flex flex-wrap gap-1`,children:[(0,B.jsx)(_,{href:t,children:`README`}),e.homepage&&(0,B.jsx)(_,{href:e.homepage,children:`Source`})]}),(0,B.jsxs)(`ol`,{className:`flex list-decimal flex-col gap-3 pl-5`,children:[(0,B.jsxs)(`li`,{children:[`Install the package in the company's repository:`,(0,B.jsx)(`pre`,{className:`mt-1 overflow-x-auto rounded-md bg-muted px-3 py-2 text-xs`,children:(0,B.jsxs)(`code`,{children:[`pnpm add `,e.package]})})]}),(0,B.jsxs)(`li`,{children:[`Import it in `,(0,B.jsx)(`code`,{children:`sanoma.config.ts`}),` and add it to `,(0,B.jsx)(`code`,{children:`connectors: [...]`}),`. Its README shows the import.`]}),(0,B.jsxs)(`li`,{children:[`Restart `,(0,B.jsx)(`code`,{children:`sanoma`}),`, then set its credentials on its page under Installed.`]})]})]})]})}var G=e=>new Set(Object.values(e.vendors).flatMap(e=>e.package?[e.package]:[]));function K({connector:{logo:e}}){return e?(0,B.jsx)(h,{...e,alt:``,className:`size-6`}):(0,B.jsx)(A,{"aria-hidden":`true`,className:`size-6 text-muted-foreground`})}function q(e){let t=e.filter(e=>!i(e)).length;return t?`needs ${r(t,`variable`)}`:`configured`}export{V as component};
@@ -1 +0,0 @@
1
- import{a as e,c as t,i as n}from"./utils-CMsCvwYQ.js";import{Co as r,En as i,Qi as a,Xi as o,_n as s,bt as c,ja as l,jn as u,rs as d,ui as f,wo as p,ya as m,yt as h}from"./store-BGu0d2Ld.js";import{G as g,v as _}from"./common-Dw2i6XKZ.js";import{l as v,m as y,q as b}from"./kit-BsK6VZTQ.js";import{_ as x,g as S,h as C,m as w,p as T}from"./composite-D9GNDzFj.js";import{t as E}from"./spinner-BGy6LWIW.js";import{D,S as O,T as k,w as A,x as j}from"./index-Bn3XeKy8.js";import{a as M,i as N,n as P,o as F,r as I,s as L,t as R}from"./dialog-DskpUgkl.js";var z=t(e(),1),B=n();function V({vendor:e}){let{data:t}=a({...c(),select:h(e)});return t?(0,B.jsx)(v,{title:`Credentials`,children:(0,B.jsx)(x,{children:t.map(e=>(0,B.jsx)(U,{credential:e},e.name))})}):null}var H={set:i,clear:s};function U({credential:e,store:t=H}){let[n,i]=(0,z.useState)(!1),a=m(),l=d(t.clear??s),h=o({mutationFn:()=>l({data:{name:e.name}}),onSuccess:async()=>{u.success(`${e.name} cleared`),await a.invalidateQueries({queryKey:c().queryKey})},onError:t=>u.error(p(t).trim()||`Could not clear ${e.name}, and no reason was given`)});return(0,B.jsxs)(T,{role:`listitem`,variant:`outline`,size:`xs`,children:[(0,B.jsxs)(C,{children:[(0,B.jsxs)(_,{children:[(0,B.jsx)(`code`,{children:e.name}),(0,B.jsx)(y,{tone:r(e)?e.status===`set`?`ok`:`off`:`bad`,children:e.status===`invalid`?`invalid: ${e.problem}`:e.status}),e.optional&&(0,B.jsx)(b,{variant:`outline`,children:`optional`})]}),e.description&&(0,B.jsx)(S,{className:`line-clamp-none`,children:e.description}),e.source===`environment`&&(0,B.jsx)(S,{children:`set in the environment`}),e.source===`stored`&&e.setBy&&e.setAt&&(0,B.jsxs)(S,{children:[`set by `,e.setBy,` · `,(0,B.jsx)(g,{at:Date.parse(e.setAt)})]})]}),e.source!==`environment`&&(0,B.jsxs)(w,{children:[(0,B.jsx)(f,{type:`button`,size:`sm`,variant:`outline`,onClick:()=>i(!0),children:e.status===`set`?`Replace`:`Set`}),e.source===`stored`&&t.clear&&(0,B.jsxs)(f,{type:`button`,size:`sm`,variant:`ghost`,disabled:h.isPending,onClick:()=>h.mutate(),children:[h.isPending&&(0,B.jsx)(E,{"data-icon":`inline-start`}),`Clear`]}),(0,B.jsx)(W,{credential:e,store:t,open:n,onClose:()=>i(!1)})]})]})}function W({credential:e,store:t,open:n,onClose:r}){let{name:i}=e,[a,s]=(0,z.useState)(``),p=m(),h=d(t.set),g=o({mutationFn:()=>h({data:{name:i,value:a}}),gcTime:0,onSuccess:async()=>{u.success(`${i} set`),s(``),g.reset(),r(),await p.invalidateQueries({queryKey:c().queryKey})}}),_=l(g.error),v=g.error?_?.issues?.[0]?.message??_?.error??g.error.message:void 0,y=`credential-${i}`;return(0,B.jsx)(R,{open:n,onOpenChange:e=>{!e&&!g.isPending&&(g.reset(),s(``),r())},children:(0,B.jsx)(I,{children:(0,B.jsxs)(`form`,{className:`flex flex-col gap-4`,onSubmit:e=>{e.preventDefault(),g.mutate()},children:[(0,B.jsxs)(F,{children:[(0,B.jsxs)(L,{children:[e.status===`set`?`Replace`:`Set`,` `,i]}),(0,B.jsx)(N,{children:e.description??`An environment variable its driver reads.`})]}),(0,B.jsxs)(O,{"data-invalid":v?!0:void 0,children:[(0,B.jsx)(D,{htmlFor:y,children:`Value`}),(0,B.jsx)(j,{id:y,type:`password`,autoComplete:`new-password`,"data-1p-ignore":!0,"data-lpignore":`true`,value:a,onChange:e=>s(e.target.value),disabled:g.isPending,"aria-invalid":v?!0:void 0}),(0,B.jsx)(A,{children:`Stored in the runtime's database; running workers pick it up without a restart. It is never shown again.`}),v&&(0,B.jsx)(k,{children:v})]}),(0,B.jsxs)(M,{children:[(0,B.jsx)(P,{render:(0,B.jsx)(f,{type:`button`,variant:`outline`,disabled:g.isPending}),children:`Cancel`}),(0,B.jsxs)(f,{type:`submit`,disabled:g.isPending,children:[g.isPending&&(0,B.jsx)(E,{"data-icon":`inline-start`}),`Save`]})]})]})})})}export{V as n,U as t};
@@ -1 +0,0 @@
1
- import{a as e,c as t,i as n}from"./utils-CMsCvwYQ.js";import{Qi as r,is as i,mt as a}from"./store-BGu0d2Ld.js";import{R as o,et as s,s as c}from"./common-Dw2i6XKZ.js";import{V as l,o as u,t as d}from"./kit-BsK6VZTQ.js";import{a as f,i as p,n as m,o as h,r as g,t as _}from"./table-DjbI5VTn.js";import{L as v}from"./index-Bn3XeKy8.js";import{t as y}from"./runs-table-35lNzKLn.js";import{a as b,i as x,r as S,t as C}from"./app-scope-BeUW_8Qh.js";var w=t(e()),T=n();function E(e){return x(e.apps,e.collections.map(t=>{let n=`data.${t.name}.save`;return{collection:t,writtenBy:e.workflows.filter(e=>!e.builtin&&e.ops.includes(n)),shownOn:e.sites.filter(e=>e.calls.some(e=>e.kind===`collection`&&e.target===t.name))}}),e=>e.collection.app)}var D=e=>e.stopPropagation();function O(){let{app:e}=v.useSearch(),{data:t}=r({...a(),select:E}),n=s().length>0,o=t.reduce((e,t)=>e+t.items.length,0),{tab:g,shown:y,headed:x}=b(t,e);return(0,T.jsxs)(T.Fragment,{children:[(0,T.jsx)(c,{count:o,action:n&&(0,T.jsx)(d,{variant:`outline`,size:`sm`,children:(0,T.jsx)(i,{to:`/sites`,children:`Sites`})})}),(0,T.jsx)(S,{groups:t,tab:g,link:e=>(0,T.jsx)(i,{to:`/data`,search:e===void 0?{}:{app:e}})}),(0,T.jsx)(l,{className:`gap-0 py-0`,children:o===0?(0,T.jsxs)(u,{className:`border-0`,title:`This config has no collections`,children:[`Declare them in `,(0,T.jsx)(`code`,{children:`resources/data.ts`}),`, each with `,(0,T.jsx)(`code`,{children:`collection()`}),` from`,` `,(0,T.jsx)(`code`,{children:`sanoma/data`}),`.`]}):(0,T.jsxs)(T.Fragment,{children:[(0,T.jsxs)(`p`,{className:`border-b p-3 text-sm text-muted-foreground`,children:[`A collection is declared in its folder's `,(0,T.jsx)(`code`,{children:`resources/`}),`; an app's folder names it. Its records live in the company's database: open one for its grid.`]}),(0,T.jsxs)(_,{children:[(0,T.jsx)(f,{children:(0,T.jsxs)(h,{children:[(0,T.jsx)(p,{children:`Collection`}),(0,T.jsx)(p,{children:`Key`}),(0,T.jsx)(p,{children:`Fields`}),(0,T.jsx)(p,{children:`Written by`}),(0,T.jsx)(p,{children:`Shown on`}),(0,T.jsx)(p,{children:`Declared in`})]})}),(0,T.jsx)(m,{children:y.map(e=>(0,T.jsxs)(w.Fragment,{children:[x&&(0,T.jsx)(C,{group:e,columns:6}),e.items.map(e=>(0,T.jsx)(k,{row:e},e.collection.name))]},e.key))})]})]})})]})}function k({row:{collection:e,writtenBy:t,shownOn:n}}){let{name:r,title:a,key:s,fields:c,declared:l}=e;return(0,T.jsxs)(y,{link:{to:`/data/$name`,params:{name:r}},children:[(0,T.jsx)(g,{className:`font-medium`,children:(0,T.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,T.jsx)(i,{to:`/data/$name`,params:{name:r},onClick:D,children:a??r}),(0,T.jsxs)(`code`,{className:`text-xs font-normal text-muted-foreground`,children:[`data.`,r]})]})}),(0,T.jsx)(g,{children:(0,T.jsx)(`code`,{children:s})}),(0,T.jsx)(g,{className:`whitespace-normal text-muted-foreground`,children:Object.keys(c).join(`, `)}),(0,T.jsx)(g,{className:`whitespace-normal`,children:(0,T.jsx)(A,{items:t.map(e=>(0,T.jsx)(i,{to:`/workflows/$name`,params:{name:e.name},onClick:D,children:e.title??e.name},e.name))})}),(0,T.jsx)(g,{className:`whitespace-normal`,children:(0,T.jsx)(A,{items:n.map(e=>(0,T.jsx)(o,{site:e,onClick:D},e.name))})}),(0,T.jsx)(g,{className:`text-muted-foreground`,children:l?(0,T.jsx)(i,{to:`/hosting`,search:{resource:l.id},onClick:D,className:`font-mono text-xs underline-offset-4 hover:underline`,children:l.at.file}):`-`})]})}function A({items:e}){return e.length===0?(0,T.jsx)(`span`,{className:`text-muted-foreground`,children:`-`}):(0,T.jsx)(`span`,{children:e.map((e,t)=>(0,T.jsxs)(w.Fragment,{children:[t>0&&`, `,e]},e.key))})}export{O as component};
@@ -1 +0,0 @@
1
- import{jo as e}from"./store-BGu0d2Ld.js";var t=(t,n,r)=>i=>t?i.filter(({run:i,approval:a})=>a.status===`pending`&&e(a,{id:t,groups:[...n]},{actor:i.startedBy},r)):[];export{t};
@@ -1 +0,0 @@
1
- import{a as e,c as t,i as n}from"./utils-CMsCvwYQ.js";import{At as r,Wt as i,is as a,ja as o,nt as s,ui as c,ya as l}from"./store-BGu0d2Ld.js";import{s as u}from"./kit-BsK6VZTQ.js";import{a as d,i as f,n as p,t as m}from"./start-form-Bgo9I63s.js";import{t as h}from"./spinner-BGy6LWIW.js";import{E as g}from"./index-Bn3XeKy8.js";import{a as _,n as v,t as y}from"./schema-BpqanhX0.js";import{t as b}from"./FloppyDisk.es-DnuNe_a8.js";var x=t(e(),1),S=n();function C(e){let t=e&&v(e.schema);if(!t)return;let n=new Set([...e.fields.vendorOwned,...e.fields.writeOnly]);return t.filter(e=>!n.has(e.key))}var w=(e,t)=>e.find(e=>e.key===t||t.startsWith(`${e.key}.`))?.key,T=`Names another declared resource: change it in the file.`,E=`Who it is to the policy and to the groups: change it in the file.`;function D({resource:e,type:t}){let n=(0,x.useMemo)(()=>C(t),[t]);if(!n?.length)return(0,S.jsx)(u,{children:`Its type has no fields this form can show: change it in its file.`});let i=r(e)?t?.identity?.split(`:`)[0]:void 0;return(0,S.jsx)(O,{resource:e,fields:n,identity:i})}function O({resource:{at:e,file:t,desired:n,refs:r},fields:a,identity:u}){let v=l(),C=(0,x.useMemo)(()=>_(a,n),[a,n]),[D,O]=(0,x.useState)(()=>y(a,C).input),[A,j]=(0,x.useState)({}),[M,N]=(0,x.useState)(),P=(0,x.useMemo)(()=>{let e=u?{[u]:E}:{};for(let t of Object.keys(r)){let n=w(a,t);n&&(e[n]??=T)}return{...e,...A}},[u,r,a,A]),F=d(C,async n=>{N(void 0);let r=y(a,n);if(Object.keys(r.errors).length)return{fields:r.errors};let c={},l={};for(let{key:e}of a){if(e in P)continue;let t=r.input[e];JSON.stringify(t)!==JSON.stringify(D[e])&&(t===void 0?l[e]=`Save sets fields and removes none: remove it in the file.`:c[e]=t)}if(Object.keys(l).length)return{fields:l};if(!Object.keys(c).length)return{form:`Nothing has changed.`,fields:{}};try{let n=await s.patch({at:e,fields:c});O(e=>({...e,...c})),N(n),`file`in n&&await i(v,t);return}catch(e){let t=o(e),n=t?.field===void 0?void 0:w(a,t.field);return t&&n?(j(e=>({...e,[n]:t.error})),F.setFieldValue(n,C[n]),{form:`Not saved: ${t.error}.`,fields:{}}):f(e,a,{mismatch:`The fields do not match the resource's type`,failed:`Could not save the declaration`})}}),I=a.every(e=>e.key in P);return(0,S.jsx)(`form`,{noValidate:!0,"aria-label":`Declaration of ${e.export}`,onSubmit:e=>{e.preventDefault(),F.handleSubmit()},children:(0,S.jsxs)(g,{children:[(0,S.jsx)(`fieldset`,{disabled:I,className:`group/ro contents`,children:a.map(e=>e.key in P?(0,S.jsx)(`fieldset`,{disabled:!0,className:`group/ro contents`,children:(0,S.jsx)(m,{form:F,field:{...e,description:P[e.key]},path:[e.key]})},e.key):(0,S.jsx)(m,{form:F,field:e,path:[e.key]},e.key))}),M&&(0,S.jsx)(k,{saved:M}),(0,S.jsx)(p,{form:F,children:e=>(0,S.jsxs)(c,{type:`submit`,disabled:e||I,children:[e?(0,S.jsx)(h,{"data-icon":`inline-start`}):(0,S.jsx)(b,{"aria-hidden":`true`,"data-icon":`inline-start`}),e?`Saving…`:`Save`]})})]})})}function k({saved:e}){return`change`in e?(0,S.jsxs)(u,{children:[`Saved as a change.`,` `,(0,S.jsx)(a,{to:`/changes/$id`,params:{id:e.change},className:`underline underline-offset-4`,children:`Open its review`})]}):(0,S.jsxs)(u,{children:[`Saved to `,(0,S.jsx)(`code`,{children:e.file}),e.revision?(0,S.jsxs)(S.Fragment,{children:[`, committed as `,(0,S.jsx)(`code`,{title:e.revision,children:e.revision.slice(0,7)})]}):`, not committed: the app has no repository`,`.`]})}export{D as t};
@@ -1 +0,0 @@
1
- import{a as e,i as t,t as n}from"./utils-CMsCvwYQ.js";import{ui as r}from"./store-BGu0d2Ld.js";import{c as i,i as a,l as o,n as s,o as c,s as l,t as u}from"./DialogTitle-BgjYK22C.js";import{t as d}from"./X.es-DKMYClf-.js";e();var f=t();function p({...e}){return(0,f.jsx)(s,{"data-slot":`dialog`,...e})}function m({...e}){return(0,f.jsx)(a,{"data-slot":`dialog-portal`,...e})}function h({...e}){return(0,f.jsx)(i,{"data-slot":`dialog-close`,...e})}function g({className:e,...t}){return(0,f.jsx)(o,{"data-slot":`dialog-overlay`,className:n(`fixed inset-0 isolate z-50 bg-overlay duration-100 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0`,e),...t})}function _({className:e,children:t,showCloseButton:a=!0,...o}){return(0,f.jsxs)(m,{children:[(0,f.jsx)(g,{}),(0,f.jsxs)(c,{"data-slot":`dialog-content`,className:n(`fixed top-1/2 left-1/2 z-50 grid w-full max-w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 gap-4 rounded-xl bg-popover p-4 text-sm text-popover-foreground ring-1 ring-foreground/10 duration-100 outline-none sm:max-w-sm data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95`,e),...o,children:[t,a&&(0,f.jsxs)(i,{"data-slot":`dialog-close`,render:(0,f.jsx)(r,{variant:`ghost`,className:`absolute top-2 right-2`,size:`icon-sm`}),children:[(0,f.jsx)(d,{"aria-hidden":`true`}),(0,f.jsx)(`span`,{className:`sr-only`,children:`Close`})]})]})]})}function v({className:e,...t}){return(0,f.jsx)(`div`,{"data-slot":`dialog-header`,className:n(`flex flex-col gap-2`,e),...t})}function y({className:e,showCloseButton:t=!1,children:a,...o}){return(0,f.jsxs)(`div`,{"data-slot":`dialog-footer`,className:n(`-mx-4 -mb-4 flex flex-col-reverse gap-2 rounded-b-xl border-t bg-muted/50 p-4 sm:flex-row sm:justify-end`,e),...o,children:[a,t&&(0,f.jsx)(i,{render:(0,f.jsx)(r,{variant:`outline`}),children:`Close`})]})}function b({className:e,...t}){return(0,f.jsx)(u,{"data-slot":`dialog-title`,className:n(`font-heading text-base leading-none font-medium`,e),...t})}function x({className:e,...t}){return(0,f.jsx)(l,{"data-slot":`dialog-description`,className:n(`text-sm text-muted-foreground *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground`,e),...t})}export{y as a,x as i,h as n,v as o,_ as r,b as s,p as t};
@@ -1 +0,0 @@
1
- import{a as e,c as t,i as n}from"./utils-CMsCvwYQ.js";import{Oa as r,Xi as i,is as a,ja as o,nt as s,ui as c}from"./store-BGu0d2Ld.js";import{s as l}from"./common-Dw2i6XKZ.js";import{l as u,s as d}from"./kit-BsK6VZTQ.js";import{t as f}from"./spinner-BGy6LWIW.js";import{D as p,E as m,S as h,T as g,w as _,x as v}from"./index-Bn3XeKy8.js";var y=t(e()),b=n();function x(){let[e,t]=(0,y.useState)(``),[n,x]=(0,y.useState)(``),S=i({mutationFn:e=>s.connectExisting(e)}),C=o(S.error),w=e=>C?.issues?.find(t=>t.path[0]===e)?.message,T=S.error&&!C?.issues?.some(e=>e.path.length)?C?.error??S.error.message:void 0,E=S.data;return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(l,{}),(0,b.jsxs)(`p`,{className:`max-w-prose text-sm text-muted-foreground`,children:[`Sanoma reads each one, declares it in `,(0,b.jsx)(`code`,{children:`resources/sanoma/infra.ts`}),` as it is now, and binds it in the lockfile through an apply that creates and changes nothing. In a repository with a remote, the file waits on a branch for you to merge.`]}),(0,b.jsxs)(`form`,{className:`flex max-w-md flex-col gap-4`,onSubmit:t=>{t.preventDefault(),S.mutate({repository:e.trim()||void 0,project:n.trim()||void 0})},children:[(0,b.jsxs)(m,{children:[(0,b.jsxs)(h,{"data-invalid":w(`repository`)?!0:void 0,children:[(0,b.jsx)(p,{htmlFor:`existing-repository`,children:`GitHub repository`}),(0,b.jsx)(v,{id:`existing-repository`,placeholder:`owner/name`,autoComplete:`off`,value:e,onChange:e=>t(e.target.value),disabled:S.isPending}),w(`repository`)&&(0,b.jsx)(g,{children:w(`repository`)})]}),(0,b.jsxs)(h,{"data-invalid":w(`project`)?!0:void 0,children:[(0,b.jsx)(p,{htmlFor:`existing-project`,children:`Supabase project`}),(0,b.jsx)(v,{id:`existing-project`,placeholder:`project ref`,autoComplete:`off`,value:n,onChange:e=>x(e.target.value),disabled:S.isPending}),(0,b.jsx)(_,{children:`The ref in the project's dashboard address, after /project/.`}),w(`project`)&&(0,b.jsx)(g,{children:w(`project`)})]})]}),T&&(0,b.jsx)(d,{variant:`destructive`,children:T}),(0,b.jsx)(`div`,{children:(0,b.jsxs)(c,{type:`submit`,disabled:S.isPending||E!==void 0,children:[S.isPending&&(0,b.jsx)(f,{"data-icon":`inline-start`}),`Connect`]})})]}),E&&(0,b.jsxs)(u,{title:`Connected`,children:[(0,b.jsxs)(d,{children:[E.branch?(0,b.jsxs)(b.Fragment,{children:[`Committed `,(0,b.jsx)(`code`,{children:E.file}),` on the branch `,(0,b.jsx)(`code`,{children:E.branch}),`, now checked out: merge it to approve the change. Apply commits the lockfile's bindings there too.`]}):(0,b.jsxs)(b.Fragment,{children:[`Wrote `,(0,b.jsx)(`code`,{children:E.file}),E.revision&&(0,b.jsxs)(b.Fragment,{children:[`, committed as `,(0,b.jsx)(`code`,{children:E.revision.slice(0,7)})]}),`. Apply commits the lockfile's bindings next.`]}),` `,(0,b.jsx)(a,{to:`/runs/$id`,params:{id:E.runId},className:`underline underline-offset-4`,children:`See the apply run`})]}),S.variables?.project&&(0,b.jsx)(d,{children:r.join(` `)}),(0,b.jsx)(`pre`,{className:`overflow-x-auto rounded-md border bg-muted p-3 font-mono text-xs`,children:E.diff??E.text})]})]})}export{x as component};