@vtechcom/hexcore 2.0.0-beta.1 → 2.0.0-beta.2

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 (118) hide show
  1. package/CHANGELOG.md +22 -2
  2. package/README.md +6 -3
  3. package/dist/cli/hexcore.js +113 -0
  4. package/dist/cli/hexcore.js.map +1 -1
  5. package/dist/config.js +1 -1
  6. package/dist/hydra/argv.js +10 -0
  7. package/dist/hydra/argv.js.map +1 -1
  8. package/dist/hydra/capabilities.js +3 -0
  9. package/dist/hydra/capabilities.js.map +1 -1
  10. package/node_modules/@hexcore/shared/dist/cjs/hydra-versions.d.ts +12 -6
  11. package/node_modules/@hexcore/shared/dist/cjs/hydra-versions.d.ts.map +1 -1
  12. package/node_modules/@hexcore/shared/dist/cjs/hydra-versions.js +119 -38
  13. package/node_modules/@hexcore/shared/dist/cjs/hydra-versions.js.map +1 -1
  14. package/node_modules/@hexcore/shared/dist/esm/hydra-versions.js +119 -38
  15. package/node_modules/@hexcore/shared/dist/esm/hydra-versions.js.map +1 -1
  16. package/package.json +2 -2
  17. package/web/200.html +20 -18
  18. package/web/404.html +20 -18
  19. package/web/_nuxt/{DgDlQiDU.js → B-lS44p0.js} +1 -1
  20. package/web/_nuxt/{CqsSss-D.js → B1NtJEdQ.js} +1 -1
  21. package/web/_nuxt/B1ZAR7mP.js +1 -0
  22. package/web/_nuxt/BFc_bxHc.js +1 -0
  23. package/web/_nuxt/BGGQYvrr.js +1 -0
  24. package/web/_nuxt/BPQ3VLAy.js +1 -0
  25. package/web/_nuxt/BV_QiRi8.js +1 -0
  26. package/web/_nuxt/BW_3NqYy.js +1 -0
  27. package/web/_nuxt/B_DikKgJ.js +1 -0
  28. package/web/_nuxt/B_Vrwblg.js +1 -0
  29. package/web/_nuxt/Bbbbx_yO.js +1 -0
  30. package/web/_nuxt/BeS-yS0C.js +1 -0
  31. package/web/_nuxt/{Onf26W-r.js → BfFJ09wD.js} +1 -1
  32. package/web/_nuxt/{rhEiP908.js → Bj1gglGt.js} +1 -1
  33. package/web/_nuxt/BkRxDbrA.js +1 -0
  34. package/web/_nuxt/Bmqx7s9K.js +1 -0
  35. package/web/_nuxt/BnZUk6sk.js +1 -0
  36. package/web/_nuxt/BqoV-QnQ.js +3 -0
  37. package/web/_nuxt/Bv47q1hu.js +1 -0
  38. package/web/_nuxt/Bz1eTnxX.js +1 -0
  39. package/web/_nuxt/{CkCrahXt.js → CAfY3dDF.js} +1 -1
  40. package/web/_nuxt/CBchb2Up.js +1 -0
  41. package/web/_nuxt/CEGGvSzA.js +1 -0
  42. package/web/_nuxt/CG6Dc4jp.js +1 -0
  43. package/web/_nuxt/{LGfPBi70.js → CH5xbifj.js} +1 -1
  44. package/web/_nuxt/CZFMOWPc.js +1 -0
  45. package/web/_nuxt/C_n__rkq.js +1 -0
  46. package/web/_nuxt/CaWYVaRD.js +1 -0
  47. package/web/_nuxt/ChS5Np24.js +1 -0
  48. package/web/_nuxt/Cp-IABpG.js +1 -0
  49. package/web/_nuxt/Cuk6v7N8.js +1 -0
  50. package/web/_nuxt/CzTJPvyS.js +1 -0
  51. package/web/_nuxt/D-Stn6KG.js +1 -0
  52. package/web/_nuxt/D7oLnXFd.js +1 -0
  53. package/web/_nuxt/DAHap_t6.js +1 -0
  54. package/web/_nuxt/DBL-cQio.js +1 -0
  55. package/web/_nuxt/DIi866IK.js +7 -0
  56. package/web/_nuxt/DMl_I_aT.js +1 -0
  57. package/web/_nuxt/Dd34_EaM.js +1 -0
  58. package/web/_nuxt/DlAUqK2U.js +1 -0
  59. package/web/_nuxt/DlHvzKYz.js +1 -0
  60. package/web/_nuxt/DmF-LwQa.js +1 -0
  61. package/web/_nuxt/DmPn-vCY.js +1 -0
  62. package/web/_nuxt/DsttYulo.js +1 -0
  63. package/web/_nuxt/{DL9i0ayn.js → DybEwxe5.js} +1 -1
  64. package/web/_nuxt/JXuauuVw.js +41 -0
  65. package/web/_nuxt/Yzrsuije.js +1 -0
  66. package/web/_nuxt/builds/latest.json +1 -1
  67. package/web/_nuxt/builds/meta/5b0a342e-aa78-42e7-89fa-ee280f32f47a.json +1 -0
  68. package/web/_nuxt/dhmyGJu2.js +1 -0
  69. package/web/_nuxt/entry.Q53uGRvC.css +1 -0
  70. package/web/_nuxt/error-404.DL126m4x.css +1 -0
  71. package/web/_nuxt/error-500.BUVIYHmG.css +1 -0
  72. package/web/_nuxt/{YUGC0nt0.js → hza_YA5H.js} +1 -1
  73. package/web/_nuxt/index.D8biniUe.css +1 -0
  74. package/web/_nuxt/vzCX1O3u.js +1 -0
  75. package/web/_nuxt/{CZK6xUH-.js → yhvT770r.js} +1 -1
  76. package/web/heads/index.html +20 -18
  77. package/web/heads/new/index.html +20 -18
  78. package/web/index.html +20 -18
  79. package/web/login/index.html +20 -18
  80. package/web/settings/index.html +20 -18
  81. package/web/setup/index.html +20 -18
  82. package/web/_nuxt/2MxohCD-.js +0 -1
  83. package/web/_nuxt/4pFXjB_u.js +0 -1
  84. package/web/_nuxt/B-v0dEQX.js +0 -1
  85. package/web/_nuxt/B4yE3U25.js +0 -1
  86. package/web/_nuxt/BFh8Ai0L.js +0 -1
  87. package/web/_nuxt/BgPn4NJH.js +0 -1
  88. package/web/_nuxt/Bj1xviSh.js +0 -1
  89. package/web/_nuxt/BnotlrL7.js +0 -1
  90. package/web/_nuxt/C1YRg2ic.js +0 -1
  91. package/web/_nuxt/CGD7MYQH.js +0 -1
  92. package/web/_nuxt/CQcG7Bu4.js +0 -1
  93. package/web/_nuxt/CS3KqpH_.js +0 -1
  94. package/web/_nuxt/CT-yt694.js +0 -1
  95. package/web/_nuxt/CcdyYRYz.js +0 -1
  96. package/web/_nuxt/CePNTU1S.js +0 -1
  97. package/web/_nuxt/CgPLsCeU.js +0 -5
  98. package/web/_nuxt/CnOqDT9k.js +0 -3
  99. package/web/_nuxt/Cr8dL64Q.js +0 -1
  100. package/web/_nuxt/D3CwzwU0.js +0 -1
  101. package/web/_nuxt/DDANn6-H.js +0 -1
  102. package/web/_nuxt/DDl9uKIA.js +0 -1
  103. package/web/_nuxt/DLNoK9BC.js +0 -1
  104. package/web/_nuxt/DLztFeOQ.js +0 -1
  105. package/web/_nuxt/DPihKXdt.js +0 -1
  106. package/web/_nuxt/DXyr6Naa.js +0 -1
  107. package/web/_nuxt/DeDg5p0D.js +0 -1
  108. package/web/_nuxt/DyPI7qJE.js +0 -30
  109. package/web/_nuxt/QZNQe_OX.js +0 -1
  110. package/web/_nuxt/Y8IJM-iz.js +0 -1
  111. package/web/_nuxt/builds/meta/7e461629-93e2-4694-b237-6d5c6a85c97c.json +0 -1
  112. package/web/_nuxt/builds/meta/dev.json +0 -1
  113. package/web/_nuxt/entry.BxsAxZxf.css +0 -1
  114. package/web/_nuxt/error-404.XbtAw-qw.css +0 -1
  115. package/web/_nuxt/error-500.CNHVltWM.css +0 -1
  116. package/web/_nuxt/rS90pPZ_.js +0 -1
  117. package/web/_nuxt/vSj9Ec0g.js +0 -1
  118. package/web/_nuxt/woNjBJMN.js +0 -1
@@ -1,23 +1,25 @@
1
1
  <!DOCTYPE html><html><head><meta charset="utf-8">
2
2
  <meta name="viewport" content="width=device-width, initial-scale=1">
3
3
  <title>Hexcore</title>
4
- <link rel="stylesheet" href="/_nuxt/entry.BxsAxZxf.css" crossorigin>
5
- <link rel="modulepreload" as="script" crossorigin href="/_nuxt/CgPLsCeU.js">
6
- <script type="module" src="/_nuxt/CgPLsCeU.js" crossorigin></script>
7
- <link rel="prefetch" as="script" crossorigin href="/_nuxt/DeDg5p0D.js">
8
- <link rel="prefetch" as="script" crossorigin href="/_nuxt/QZNQe_OX.js">
9
- <link rel="prefetch" as="script" crossorigin href="/_nuxt/CS3KqpH_.js">
10
- <link rel="prefetch" as="script" crossorigin href="/_nuxt/DPihKXdt.js">
11
- <link rel="prefetch" as="script" crossorigin href="/_nuxt/CnOqDT9k.js">
12
- <link rel="prefetch" as="script" crossorigin href="/_nuxt/CZK6xUH-.js">
13
- <link rel="prefetch" as="script" crossorigin href="/_nuxt/BFh8Ai0L.js">
14
- <link rel="prefetch" as="script" crossorigin href="/_nuxt/BgPn4NJH.js">
15
- <link rel="prefetch" as="script" crossorigin href="/_nuxt/DgDlQiDU.js">
16
- <link rel="prefetch" as="script" crossorigin href="/_nuxt/DL9i0ayn.js">
17
- <link rel="prefetch" as="style" crossorigin href="/_nuxt/error-500.CNHVltWM.css">
18
- <link rel="prefetch" as="script" crossorigin href="/_nuxt/DDANn6-H.js">
19
- <link rel="prefetch" as="script" crossorigin href="/_nuxt/C1YRg2ic.js">
4
+ <link rel="stylesheet" href="/_nuxt/entry.Q53uGRvC.css" crossorigin>
5
+ <link rel="modulepreload" as="script" crossorigin href="/_nuxt/DIi866IK.js">
6
+ <script type="module" src="/_nuxt/DIi866IK.js" crossorigin></script>
7
+ <link rel="prefetch" as="script" crossorigin href="/_nuxt/BkRxDbrA.js">
8
+ <link rel="prefetch" as="script" crossorigin href="/_nuxt/B_Vrwblg.js">
9
+ <link rel="prefetch" as="script" crossorigin href="/_nuxt/BV_QiRi8.js">
10
+ <link rel="prefetch" as="script" crossorigin href="/_nuxt/BqoV-QnQ.js">
11
+ <link rel="prefetch" as="script" crossorigin href="/_nuxt/yhvT770r.js">
12
+ <link rel="prefetch" as="script" crossorigin href="/_nuxt/DlAUqK2U.js">
13
+ <link rel="prefetch" as="script" crossorigin href="/_nuxt/CaWYVaRD.js">
14
+ <link rel="prefetch" as="script" crossorigin href="/_nuxt/BGGQYvrr.js">
15
+ <link rel="prefetch" as="script" crossorigin href="/_nuxt/ChS5Np24.js">
16
+ <link rel="prefetch" as="script" crossorigin href="/_nuxt/vzCX1O3u.js">
17
+ <link rel="prefetch" as="script" crossorigin href="/_nuxt/BnZUk6sk.js">
18
+ <link rel="prefetch" as="script" crossorigin href="/_nuxt/B-lS44p0.js">
19
+ <link rel="prefetch" as="script" crossorigin href="/_nuxt/DybEwxe5.js">
20
+ <link rel="prefetch" as="style" crossorigin href="/_nuxt/error-500.BUVIYHmG.css">
21
+ <link rel="prefetch" as="script" crossorigin href="/_nuxt/BeS-yS0C.js">
20
22
  <meta name="description" content="Boot and operate Hydra Heads on Cardano">
21
23
  <link rel="icon" type="image/svg+xml" href="/favicon.svg">
22
- <script id="unhead:payload" type="application/json">{"title":"Hexcore"}</script></head><body><div id="__nuxt"></div><div id="teleports"></div><script>window.__NUXT__={};window.__NUXT__.config={public:{apiBase:""},app:{baseURL:"/",buildId:"7e461629-93e2-4694-b237-6d5c6a85c97c",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script>
23
- <script type="application/json" data-nuxt-data="nuxt-app" data-ssr="false" id="__NUXT_DATA__">[{"prerenderedAt":1,"serverRendered":2},1786187569795,false]</script></body></html>
24
+ <script id="unhead:payload" type="application/json">{"title":"Hexcore"}</script></head><body><div id="__nuxt"></div><div id="teleports"></div><script>window.__NUXT__={};window.__NUXT__.config={public:{apiBase:"",i18n:{baseUrl:"",defaultLocale:"en",rootRedirect:"",redirectStatusCode:302,skipSettingLocaleOnNavigate:false,locales:[{code:"en",language:"en-US",name:"English",domains:[],defaultForDomains:[]},{code:"vi",language:"vi-VN",name:"Tiếng Việt",domains:[],defaultForDomains:[]}],detectBrowserLanguage:{alwaysRedirect:false,cookieCrossOrigin:false,cookieDomain:"",cookieKey:"hexcore_locale",cookieSecure:false,fallbackLocale:"en",redirectOn:"root",useCookie:true},experimental:{localeDetector:"",typedPages:true,typedOptionsAndMessages:false,alternateLinkCanonicalQueries:true,devCache:false,cacheLifetime:"",stripMessagesPayload:false,preload:false,strictSeo:false,nitroContextDetection:true,httpCacheDuration:10,compactRoutes:false,prerenderMessages:false,optimizeMessageBundling:true},domainLocales:{en:{domain:""},vi:{domain:""}}}},app:{baseURL:"/",buildId:"5b0a342e-aa78-42e7-89fa-ee280f32f47a",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script>
25
+ <script type="application/json" data-nuxt-data="nuxt-app" data-ssr="false" id="__NUXT_DATA__">[{"prerenderedAt":1,"serverRendered":2},1794387407010,false]</script></body></html>
package/web/index.html CHANGED
@@ -1,23 +1,25 @@
1
1
  <!DOCTYPE html><html><head><meta charset="utf-8">
2
2
  <meta name="viewport" content="width=device-width, initial-scale=1">
3
3
  <title>Hexcore</title>
4
- <link rel="stylesheet" href="/_nuxt/entry.BxsAxZxf.css" crossorigin>
5
- <link rel="modulepreload" as="script" crossorigin href="/_nuxt/CgPLsCeU.js">
6
- <script type="module" src="/_nuxt/CgPLsCeU.js" crossorigin></script>
7
- <link rel="prefetch" as="script" crossorigin href="/_nuxt/DeDg5p0D.js">
8
- <link rel="prefetch" as="script" crossorigin href="/_nuxt/QZNQe_OX.js">
9
- <link rel="prefetch" as="script" crossorigin href="/_nuxt/CS3KqpH_.js">
10
- <link rel="prefetch" as="script" crossorigin href="/_nuxt/DPihKXdt.js">
11
- <link rel="prefetch" as="script" crossorigin href="/_nuxt/CnOqDT9k.js">
12
- <link rel="prefetch" as="script" crossorigin href="/_nuxt/CZK6xUH-.js">
13
- <link rel="prefetch" as="script" crossorigin href="/_nuxt/BFh8Ai0L.js">
14
- <link rel="prefetch" as="script" crossorigin href="/_nuxt/BgPn4NJH.js">
15
- <link rel="prefetch" as="script" crossorigin href="/_nuxt/DgDlQiDU.js">
16
- <link rel="prefetch" as="script" crossorigin href="/_nuxt/DL9i0ayn.js">
17
- <link rel="prefetch" as="style" crossorigin href="/_nuxt/error-500.CNHVltWM.css">
18
- <link rel="prefetch" as="script" crossorigin href="/_nuxt/DDANn6-H.js">
19
- <link rel="prefetch" as="script" crossorigin href="/_nuxt/C1YRg2ic.js">
4
+ <link rel="stylesheet" href="/_nuxt/entry.Q53uGRvC.css" crossorigin>
5
+ <link rel="modulepreload" as="script" crossorigin href="/_nuxt/DIi866IK.js">
6
+ <script type="module" src="/_nuxt/DIi866IK.js" crossorigin></script>
7
+ <link rel="prefetch" as="script" crossorigin href="/_nuxt/BkRxDbrA.js">
8
+ <link rel="prefetch" as="script" crossorigin href="/_nuxt/B_Vrwblg.js">
9
+ <link rel="prefetch" as="script" crossorigin href="/_nuxt/BV_QiRi8.js">
10
+ <link rel="prefetch" as="script" crossorigin href="/_nuxt/BqoV-QnQ.js">
11
+ <link rel="prefetch" as="script" crossorigin href="/_nuxt/yhvT770r.js">
12
+ <link rel="prefetch" as="script" crossorigin href="/_nuxt/DlAUqK2U.js">
13
+ <link rel="prefetch" as="script" crossorigin href="/_nuxt/CaWYVaRD.js">
14
+ <link rel="prefetch" as="script" crossorigin href="/_nuxt/BGGQYvrr.js">
15
+ <link rel="prefetch" as="script" crossorigin href="/_nuxt/ChS5Np24.js">
16
+ <link rel="prefetch" as="script" crossorigin href="/_nuxt/vzCX1O3u.js">
17
+ <link rel="prefetch" as="script" crossorigin href="/_nuxt/BnZUk6sk.js">
18
+ <link rel="prefetch" as="script" crossorigin href="/_nuxt/B-lS44p0.js">
19
+ <link rel="prefetch" as="script" crossorigin href="/_nuxt/DybEwxe5.js">
20
+ <link rel="prefetch" as="style" crossorigin href="/_nuxt/error-500.BUVIYHmG.css">
21
+ <link rel="prefetch" as="script" crossorigin href="/_nuxt/BeS-yS0C.js">
20
22
  <meta name="description" content="Boot and operate Hydra Heads on Cardano">
21
23
  <link rel="icon" type="image/svg+xml" href="/favicon.svg">
22
- <script id="unhead:payload" type="application/json">{"title":"Hexcore"}</script></head><body><div id="__nuxt"></div><div id="teleports"></div><script>window.__NUXT__={};window.__NUXT__.config={public:{apiBase:""},app:{baseURL:"/",buildId:"7e461629-93e2-4694-b237-6d5c6a85c97c",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script>
23
- <script type="application/json" data-nuxt-data="nuxt-app" data-ssr="false" id="__NUXT_DATA__">[{"prerenderedAt":1,"serverRendered":2},1786187569795,false]</script></body></html>
24
+ <script id="unhead:payload" type="application/json">{"title":"Hexcore"}</script></head><body><div id="__nuxt"></div><div id="teleports"></div><script>window.__NUXT__={};window.__NUXT__.config={public:{apiBase:"",i18n:{baseUrl:"",defaultLocale:"en",rootRedirect:"",redirectStatusCode:302,skipSettingLocaleOnNavigate:false,locales:[{code:"en",language:"en-US",name:"English",domains:[],defaultForDomains:[]},{code:"vi",language:"vi-VN",name:"Tiếng Việt",domains:[],defaultForDomains:[]}],detectBrowserLanguage:{alwaysRedirect:false,cookieCrossOrigin:false,cookieDomain:"",cookieKey:"hexcore_locale",cookieSecure:false,fallbackLocale:"en",redirectOn:"root",useCookie:true},experimental:{localeDetector:"",typedPages:true,typedOptionsAndMessages:false,alternateLinkCanonicalQueries:true,devCache:false,cacheLifetime:"",stripMessagesPayload:false,preload:false,strictSeo:false,nitroContextDetection:true,httpCacheDuration:10,compactRoutes:false,prerenderMessages:false,optimizeMessageBundling:true},domainLocales:{en:{domain:""},vi:{domain:""}}}},app:{baseURL:"/",buildId:"5b0a342e-aa78-42e7-89fa-ee280f32f47a",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script>
25
+ <script type="application/json" data-nuxt-data="nuxt-app" data-ssr="false" id="__NUXT_DATA__">[{"prerenderedAt":1,"serverRendered":2},1794387407010,false]</script></body></html>
@@ -1,23 +1,25 @@
1
1
  <!DOCTYPE html><html><head><meta charset="utf-8">
2
2
  <meta name="viewport" content="width=device-width, initial-scale=1">
3
3
  <title>Hexcore</title>
4
- <link rel="stylesheet" href="/_nuxt/entry.BxsAxZxf.css" crossorigin>
5
- <link rel="modulepreload" as="script" crossorigin href="/_nuxt/CgPLsCeU.js">
6
- <script type="module" src="/_nuxt/CgPLsCeU.js" crossorigin></script>
7
- <link rel="prefetch" as="script" crossorigin href="/_nuxt/DeDg5p0D.js">
8
- <link rel="prefetch" as="script" crossorigin href="/_nuxt/QZNQe_OX.js">
9
- <link rel="prefetch" as="script" crossorigin href="/_nuxt/CS3KqpH_.js">
10
- <link rel="prefetch" as="script" crossorigin href="/_nuxt/DPihKXdt.js">
11
- <link rel="prefetch" as="script" crossorigin href="/_nuxt/CnOqDT9k.js">
12
- <link rel="prefetch" as="script" crossorigin href="/_nuxt/CZK6xUH-.js">
13
- <link rel="prefetch" as="script" crossorigin href="/_nuxt/BFh8Ai0L.js">
14
- <link rel="prefetch" as="script" crossorigin href="/_nuxt/BgPn4NJH.js">
15
- <link rel="prefetch" as="script" crossorigin href="/_nuxt/DgDlQiDU.js">
16
- <link rel="prefetch" as="script" crossorigin href="/_nuxt/DL9i0ayn.js">
17
- <link rel="prefetch" as="style" crossorigin href="/_nuxt/error-500.CNHVltWM.css">
18
- <link rel="prefetch" as="script" crossorigin href="/_nuxt/DDANn6-H.js">
19
- <link rel="prefetch" as="script" crossorigin href="/_nuxt/C1YRg2ic.js">
4
+ <link rel="stylesheet" href="/_nuxt/entry.Q53uGRvC.css" crossorigin>
5
+ <link rel="modulepreload" as="script" crossorigin href="/_nuxt/DIi866IK.js">
6
+ <script type="module" src="/_nuxt/DIi866IK.js" crossorigin></script>
7
+ <link rel="prefetch" as="script" crossorigin href="/_nuxt/BkRxDbrA.js">
8
+ <link rel="prefetch" as="script" crossorigin href="/_nuxt/B_Vrwblg.js">
9
+ <link rel="prefetch" as="script" crossorigin href="/_nuxt/BV_QiRi8.js">
10
+ <link rel="prefetch" as="script" crossorigin href="/_nuxt/BqoV-QnQ.js">
11
+ <link rel="prefetch" as="script" crossorigin href="/_nuxt/yhvT770r.js">
12
+ <link rel="prefetch" as="script" crossorigin href="/_nuxt/DlAUqK2U.js">
13
+ <link rel="prefetch" as="script" crossorigin href="/_nuxt/CaWYVaRD.js">
14
+ <link rel="prefetch" as="script" crossorigin href="/_nuxt/BGGQYvrr.js">
15
+ <link rel="prefetch" as="script" crossorigin href="/_nuxt/ChS5Np24.js">
16
+ <link rel="prefetch" as="script" crossorigin href="/_nuxt/vzCX1O3u.js">
17
+ <link rel="prefetch" as="script" crossorigin href="/_nuxt/BnZUk6sk.js">
18
+ <link rel="prefetch" as="script" crossorigin href="/_nuxt/B-lS44p0.js">
19
+ <link rel="prefetch" as="script" crossorigin href="/_nuxt/DybEwxe5.js">
20
+ <link rel="prefetch" as="style" crossorigin href="/_nuxt/error-500.BUVIYHmG.css">
21
+ <link rel="prefetch" as="script" crossorigin href="/_nuxt/BeS-yS0C.js">
20
22
  <meta name="description" content="Boot and operate Hydra Heads on Cardano">
21
23
  <link rel="icon" type="image/svg+xml" href="/favicon.svg">
22
- <script id="unhead:payload" type="application/json">{"title":"Hexcore"}</script></head><body><div id="__nuxt"></div><div id="teleports"></div><script>window.__NUXT__={};window.__NUXT__.config={public:{apiBase:""},app:{baseURL:"/",buildId:"7e461629-93e2-4694-b237-6d5c6a85c97c",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script>
23
- <script type="application/json" data-nuxt-data="nuxt-app" data-ssr="false" id="__NUXT_DATA__">[{"prerenderedAt":1,"serverRendered":2},1786187569795,false]</script></body></html>
24
+ <script id="unhead:payload" type="application/json">{"title":"Hexcore"}</script></head><body><div id="__nuxt"></div><div id="teleports"></div><script>window.__NUXT__={};window.__NUXT__.config={public:{apiBase:"",i18n:{baseUrl:"",defaultLocale:"en",rootRedirect:"",redirectStatusCode:302,skipSettingLocaleOnNavigate:false,locales:[{code:"en",language:"en-US",name:"English",domains:[],defaultForDomains:[]},{code:"vi",language:"vi-VN",name:"Tiếng Việt",domains:[],defaultForDomains:[]}],detectBrowserLanguage:{alwaysRedirect:false,cookieCrossOrigin:false,cookieDomain:"",cookieKey:"hexcore_locale",cookieSecure:false,fallbackLocale:"en",redirectOn:"root",useCookie:true},experimental:{localeDetector:"",typedPages:true,typedOptionsAndMessages:false,alternateLinkCanonicalQueries:true,devCache:false,cacheLifetime:"",stripMessagesPayload:false,preload:false,strictSeo:false,nitroContextDetection:true,httpCacheDuration:10,compactRoutes:false,prerenderMessages:false,optimizeMessageBundling:true},domainLocales:{en:{domain:""},vi:{domain:""}}}},app:{baseURL:"/",buildId:"5b0a342e-aa78-42e7-89fa-ee280f32f47a",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script>
25
+ <script type="application/json" data-nuxt-data="nuxt-app" data-ssr="false" id="__NUXT_DATA__">[{"prerenderedAt":1,"serverRendered":2},1794387407010,false]</script></body></html>
@@ -1,23 +1,25 @@
1
1
  <!DOCTYPE html><html><head><meta charset="utf-8">
2
2
  <meta name="viewport" content="width=device-width, initial-scale=1">
3
3
  <title>Hexcore</title>
4
- <link rel="stylesheet" href="/_nuxt/entry.BxsAxZxf.css" crossorigin>
5
- <link rel="modulepreload" as="script" crossorigin href="/_nuxt/CgPLsCeU.js">
6
- <script type="module" src="/_nuxt/CgPLsCeU.js" crossorigin></script>
7
- <link rel="prefetch" as="script" crossorigin href="/_nuxt/DeDg5p0D.js">
8
- <link rel="prefetch" as="script" crossorigin href="/_nuxt/QZNQe_OX.js">
9
- <link rel="prefetch" as="script" crossorigin href="/_nuxt/CS3KqpH_.js">
10
- <link rel="prefetch" as="script" crossorigin href="/_nuxt/DPihKXdt.js">
11
- <link rel="prefetch" as="script" crossorigin href="/_nuxt/CnOqDT9k.js">
12
- <link rel="prefetch" as="script" crossorigin href="/_nuxt/CZK6xUH-.js">
13
- <link rel="prefetch" as="script" crossorigin href="/_nuxt/BFh8Ai0L.js">
14
- <link rel="prefetch" as="script" crossorigin href="/_nuxt/BgPn4NJH.js">
15
- <link rel="prefetch" as="script" crossorigin href="/_nuxt/DgDlQiDU.js">
16
- <link rel="prefetch" as="script" crossorigin href="/_nuxt/DL9i0ayn.js">
17
- <link rel="prefetch" as="style" crossorigin href="/_nuxt/error-500.CNHVltWM.css">
18
- <link rel="prefetch" as="script" crossorigin href="/_nuxt/DDANn6-H.js">
19
- <link rel="prefetch" as="script" crossorigin href="/_nuxt/C1YRg2ic.js">
4
+ <link rel="stylesheet" href="/_nuxt/entry.Q53uGRvC.css" crossorigin>
5
+ <link rel="modulepreload" as="script" crossorigin href="/_nuxt/DIi866IK.js">
6
+ <script type="module" src="/_nuxt/DIi866IK.js" crossorigin></script>
7
+ <link rel="prefetch" as="script" crossorigin href="/_nuxt/BkRxDbrA.js">
8
+ <link rel="prefetch" as="script" crossorigin href="/_nuxt/B_Vrwblg.js">
9
+ <link rel="prefetch" as="script" crossorigin href="/_nuxt/BV_QiRi8.js">
10
+ <link rel="prefetch" as="script" crossorigin href="/_nuxt/BqoV-QnQ.js">
11
+ <link rel="prefetch" as="script" crossorigin href="/_nuxt/yhvT770r.js">
12
+ <link rel="prefetch" as="script" crossorigin href="/_nuxt/DlAUqK2U.js">
13
+ <link rel="prefetch" as="script" crossorigin href="/_nuxt/CaWYVaRD.js">
14
+ <link rel="prefetch" as="script" crossorigin href="/_nuxt/BGGQYvrr.js">
15
+ <link rel="prefetch" as="script" crossorigin href="/_nuxt/ChS5Np24.js">
16
+ <link rel="prefetch" as="script" crossorigin href="/_nuxt/vzCX1O3u.js">
17
+ <link rel="prefetch" as="script" crossorigin href="/_nuxt/BnZUk6sk.js">
18
+ <link rel="prefetch" as="script" crossorigin href="/_nuxt/B-lS44p0.js">
19
+ <link rel="prefetch" as="script" crossorigin href="/_nuxt/DybEwxe5.js">
20
+ <link rel="prefetch" as="style" crossorigin href="/_nuxt/error-500.BUVIYHmG.css">
21
+ <link rel="prefetch" as="script" crossorigin href="/_nuxt/BeS-yS0C.js">
20
22
  <meta name="description" content="Boot and operate Hydra Heads on Cardano">
21
23
  <link rel="icon" type="image/svg+xml" href="/favicon.svg">
22
- <script id="unhead:payload" type="application/json">{"title":"Hexcore"}</script></head><body><div id="__nuxt"></div><div id="teleports"></div><script>window.__NUXT__={};window.__NUXT__.config={public:{apiBase:""},app:{baseURL:"/",buildId:"7e461629-93e2-4694-b237-6d5c6a85c97c",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script>
23
- <script type="application/json" data-nuxt-data="nuxt-app" data-ssr="false" id="__NUXT_DATA__">[{"prerenderedAt":1,"serverRendered":2},1786187569795,false]</script></body></html>
24
+ <script id="unhead:payload" type="application/json">{"title":"Hexcore"}</script></head><body><div id="__nuxt"></div><div id="teleports"></div><script>window.__NUXT__={};window.__NUXT__.config={public:{apiBase:"",i18n:{baseUrl:"",defaultLocale:"en",rootRedirect:"",redirectStatusCode:302,skipSettingLocaleOnNavigate:false,locales:[{code:"en",language:"en-US",name:"English",domains:[],defaultForDomains:[]},{code:"vi",language:"vi-VN",name:"Tiếng Việt",domains:[],defaultForDomains:[]}],detectBrowserLanguage:{alwaysRedirect:false,cookieCrossOrigin:false,cookieDomain:"",cookieKey:"hexcore_locale",cookieSecure:false,fallbackLocale:"en",redirectOn:"root",useCookie:true},experimental:{localeDetector:"",typedPages:true,typedOptionsAndMessages:false,alternateLinkCanonicalQueries:true,devCache:false,cacheLifetime:"",stripMessagesPayload:false,preload:false,strictSeo:false,nitroContextDetection:true,httpCacheDuration:10,compactRoutes:false,prerenderMessages:false,optimizeMessageBundling:true},domainLocales:{en:{domain:""},vi:{domain:""}}}},app:{baseURL:"/",buildId:"5b0a342e-aa78-42e7-89fa-ee280f32f47a",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script>
25
+ <script type="application/json" data-nuxt-data="nuxt-app" data-ssr="false" id="__NUXT_DATA__">[{"prerenderedAt":1,"serverRendered":2},1794387407010,false]</script></body></html>
@@ -1,23 +1,25 @@
1
1
  <!DOCTYPE html><html><head><meta charset="utf-8">
2
2
  <meta name="viewport" content="width=device-width, initial-scale=1">
3
3
  <title>Hexcore</title>
4
- <link rel="stylesheet" href="/_nuxt/entry.BxsAxZxf.css" crossorigin>
5
- <link rel="modulepreload" as="script" crossorigin href="/_nuxt/CgPLsCeU.js">
6
- <script type="module" src="/_nuxt/CgPLsCeU.js" crossorigin></script>
7
- <link rel="prefetch" as="script" crossorigin href="/_nuxt/DeDg5p0D.js">
8
- <link rel="prefetch" as="script" crossorigin href="/_nuxt/QZNQe_OX.js">
9
- <link rel="prefetch" as="script" crossorigin href="/_nuxt/CS3KqpH_.js">
10
- <link rel="prefetch" as="script" crossorigin href="/_nuxt/DPihKXdt.js">
11
- <link rel="prefetch" as="script" crossorigin href="/_nuxt/CnOqDT9k.js">
12
- <link rel="prefetch" as="script" crossorigin href="/_nuxt/CZK6xUH-.js">
13
- <link rel="prefetch" as="script" crossorigin href="/_nuxt/BFh8Ai0L.js">
14
- <link rel="prefetch" as="script" crossorigin href="/_nuxt/BgPn4NJH.js">
15
- <link rel="prefetch" as="script" crossorigin href="/_nuxt/DgDlQiDU.js">
16
- <link rel="prefetch" as="script" crossorigin href="/_nuxt/DL9i0ayn.js">
17
- <link rel="prefetch" as="style" crossorigin href="/_nuxt/error-500.CNHVltWM.css">
18
- <link rel="prefetch" as="script" crossorigin href="/_nuxt/DDANn6-H.js">
19
- <link rel="prefetch" as="script" crossorigin href="/_nuxt/C1YRg2ic.js">
4
+ <link rel="stylesheet" href="/_nuxt/entry.Q53uGRvC.css" crossorigin>
5
+ <link rel="modulepreload" as="script" crossorigin href="/_nuxt/DIi866IK.js">
6
+ <script type="module" src="/_nuxt/DIi866IK.js" crossorigin></script>
7
+ <link rel="prefetch" as="script" crossorigin href="/_nuxt/BkRxDbrA.js">
8
+ <link rel="prefetch" as="script" crossorigin href="/_nuxt/B_Vrwblg.js">
9
+ <link rel="prefetch" as="script" crossorigin href="/_nuxt/BV_QiRi8.js">
10
+ <link rel="prefetch" as="script" crossorigin href="/_nuxt/BqoV-QnQ.js">
11
+ <link rel="prefetch" as="script" crossorigin href="/_nuxt/yhvT770r.js">
12
+ <link rel="prefetch" as="script" crossorigin href="/_nuxt/DlAUqK2U.js">
13
+ <link rel="prefetch" as="script" crossorigin href="/_nuxt/CaWYVaRD.js">
14
+ <link rel="prefetch" as="script" crossorigin href="/_nuxt/BGGQYvrr.js">
15
+ <link rel="prefetch" as="script" crossorigin href="/_nuxt/ChS5Np24.js">
16
+ <link rel="prefetch" as="script" crossorigin href="/_nuxt/vzCX1O3u.js">
17
+ <link rel="prefetch" as="script" crossorigin href="/_nuxt/BnZUk6sk.js">
18
+ <link rel="prefetch" as="script" crossorigin href="/_nuxt/B-lS44p0.js">
19
+ <link rel="prefetch" as="script" crossorigin href="/_nuxt/DybEwxe5.js">
20
+ <link rel="prefetch" as="style" crossorigin href="/_nuxt/error-500.BUVIYHmG.css">
21
+ <link rel="prefetch" as="script" crossorigin href="/_nuxt/BeS-yS0C.js">
20
22
  <meta name="description" content="Boot and operate Hydra Heads on Cardano">
21
23
  <link rel="icon" type="image/svg+xml" href="/favicon.svg">
22
- <script id="unhead:payload" type="application/json">{"title":"Hexcore"}</script></head><body><div id="__nuxt"></div><div id="teleports"></div><script>window.__NUXT__={};window.__NUXT__.config={public:{apiBase:""},app:{baseURL:"/",buildId:"7e461629-93e2-4694-b237-6d5c6a85c97c",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script>
23
- <script type="application/json" data-nuxt-data="nuxt-app" data-ssr="false" id="__NUXT_DATA__">[{"prerenderedAt":1,"serverRendered":2},1786187569795,false]</script></body></html>
24
+ <script id="unhead:payload" type="application/json">{"title":"Hexcore"}</script></head><body><div id="__nuxt"></div><div id="teleports"></div><script>window.__NUXT__={};window.__NUXT__.config={public:{apiBase:"",i18n:{baseUrl:"",defaultLocale:"en",rootRedirect:"",redirectStatusCode:302,skipSettingLocaleOnNavigate:false,locales:[{code:"en",language:"en-US",name:"English",domains:[],defaultForDomains:[]},{code:"vi",language:"vi-VN",name:"Tiếng Việt",domains:[],defaultForDomains:[]}],detectBrowserLanguage:{alwaysRedirect:false,cookieCrossOrigin:false,cookieDomain:"",cookieKey:"hexcore_locale",cookieSecure:false,fallbackLocale:"en",redirectOn:"root",useCookie:true},experimental:{localeDetector:"",typedPages:true,typedOptionsAndMessages:false,alternateLinkCanonicalQueries:true,devCache:false,cacheLifetime:"",stripMessagesPayload:false,preload:false,strictSeo:false,nitroContextDetection:true,httpCacheDuration:10,compactRoutes:false,prerenderMessages:false,optimizeMessageBundling:true},domainLocales:{en:{domain:""},vi:{domain:""}}}},app:{baseURL:"/",buildId:"5b0a342e-aa78-42e7-89fa-ee280f32f47a",buildAssetsDir:"/_nuxt/",cdnURL:""}}</script>
25
+ <script type="application/json" data-nuxt-data="nuxt-app" data-ssr="false" id="__NUXT_DATA__">[{"prerenderedAt":1,"serverRendered":2},1794387407010,false]</script></body></html>
@@ -1 +0,0 @@
1
- import{_ as S,a as $,b as B,c as H,L as N}from"./rhEiP908.js";import{_ as D,a as q,b as I}from"./CS3KqpH_.js";import{e as L,u as R,f as z,c as E,a as t,b as s,w as a,d as r,o as p,g as M,i as g,h as o,j as x,t as O,k as v,r as m,n as P,A as T}from"./CgPLsCeU.js";import{_ as h}from"./BFh8Ai0L.js";import{u as j}from"./C1YRg2ic.js";const W={class:"w-full max-w-sm"},F={class:"space-y-2"},G={class:"space-y-2"},ee=L({__name:"login",setup(J){j({title:"Sign in · Hexcore"});const w=R(),y=z(),l=m("admin"),i=m(""),u=m(""),d=m(!1);async function b(){u.value="",d.value=!0;try{await w.login({username:l.value,password:i.value});const n=y.query.redirect;await P(typeof n=="string"?n:"/heads")}catch(n){u.value=n instanceof T?n.message:"Could not sign in. Is the control-plane running?"}finally{d.value=!1}}return(n,e)=>{const f=B,_=H,U=q,V=D,C=I,k=$,A=S;return p(),E("div",W,[e[5]||(e[5]=t("div",{class:"mb-6 flex flex-col items-center text-center"},[t("img",{src:h,alt:"",class:"mb-3 size-14"}),t("h1",{class:"text-xl font-semibold tracking-tight"},"Hexcore"),t("p",{class:"text-sm text-muted-foreground"},"Boot and operate Hydra Heads")],-1)),s(A,null,{default:a(()=>[s(k,null,{default:a(()=>[t("form",{class:"space-y-4",onSubmit:M(b,["prevent"])},[t("div",F,[s(f,{for:"username"},{default:a(()=>[...e[2]||(e[2]=[r("Username",-1)])]),_:1}),s(_,{id:"username",modelValue:o(l),"onUpdate:modelValue":e[0]||(e[0]=c=>g(l)?l.value=c:null),autocomplete:"username",required:""},null,8,["modelValue"])]),t("div",G,[s(f,{for:"password"},{default:a(()=>[...e[3]||(e[3]=[r("Password",-1)])]),_:1}),s(_,{id:"password",modelValue:o(i),"onUpdate:modelValue":e[1]||(e[1]=c=>g(i)?i.value=c:null),type:"password",autocomplete:"current-password",required:""},null,8,["modelValue"])]),o(u)?(p(),x(V,{key:0,variant:"destructive"},{default:a(()=>[s(U,null,{default:a(()=>[r(O(o(u)),1)]),_:1})]),_:1})):v("",!0),s(C,{type:"submit",class:"w-full",disabled:o(d)},{default:a(()=>[o(d)?(p(),x(o(N),{key:0,class:"size-4 animate-spin"})):v("",!0),e[4]||(e[4]=r(" Sign in ",-1))]),_:1},8,["disabled"])],32)]),_:1})]),_:1}),e[6]||(e[6]=t("p",{class:"mt-4 text-center text-xs text-muted-foreground"},[r(" On first boot the control-plane generates a password and prints it once in its log, unless "),t("code",{class:"bg-muted text-foreground rounded px-1 py-0.5 font-mono"},"ADMIN_PASSWORD"),r(" is set. ")],-1))])}}});export{ee as default};
@@ -1 +0,0 @@
1
- import{_ as le,a as de,b as ie,c as ue,L as ce}from"./rhEiP908.js";import{d as L,c as me,b as fe,_ as pe,a as ve}from"./CS3KqpH_.js";import{e as A,o as d,c as i,s as E,h as t,z as T,u as ke,l as ge,m as _e,a as s,d as a,b as o,w as n,j as B,k as p,r as V,p as ye,n as Q,A as Z,t as u,F as k,q as xe,y as S}from"./CgPLsCeU.js";import{a as be,b as he,c as we,d as Se,e as Ce,_ as Ue}from"./woNjBJMN.js";import{_ as $e}from"./DPihKXdt.js";import{_ as je}from"./vSj9Ec0g.js";import{_ as Ne}from"./CkCrahXt.js";import{_ as Be}from"./CQcG7Bu4.js";import{u as Ve}from"./C1YRg2ic.js";import{u as Ae}from"./BgPn4NJH.js";import{u as Ie}from"./CGD7MYQH.js";import{T as De}from"./LGfPBi70.js";import"./CnOqDT9k.js";import"./BnotlrL7.js";import"./CZK6xUH-.js";const Pe=A({__name:"CardDescription",props:{class:{type:[Boolean,null,String,Object,Array]}},setup(b){const c=b;return(g,_)=>(d(),i("p",{"data-slot":"card-description",class:E(t(L)("text-muted-foreground text-sm",c.class))},[T(g.$slots,"default")],2))}}),He=A({__name:"CardHeader",props:{class:{type:[Boolean,null,String,Object,Array]}},setup(b){const c=b;return(g,_)=>(d(),i("div",{"data-slot":"card-header",class:E(t(L)("@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-1.5 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6",c.class))},[T(g.$slots,"default")],2))}}),Re=A({__name:"CardTitle",props:{class:{type:[Boolean,null,String,Object,Array]}},setup(b){const c=b;return(g,_)=>(d(),i("h3",{"data-slot":"card-title",class:E(t(L)("leading-none font-semibold",c.class))},[T(g.$slots,"default")],2))}});const ze=me("LockIcon",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]]),Le={class:"max-w-2xl"},Ee={class:"grid gap-4 sm:grid-cols-2"},Te={class:"space-y-2"},Xe={class:"space-y-2"},qe={key:0,class:"space-y-2"},Oe={key:0,class:"text-xs text-destructive"},Me={key:1,class:"text-xs text-muted-foreground"},Fe={key:1,class:"space-y-2"},Ke={key:0,class:"text-xs text-destructive"},We={class:"space-y-2"},Ye={class:"space-y-2"},Ge={class:"flex items-center gap-2"},Je={class:"divide-y"},Qe={class:"flex items-center justify-between gap-4 px-5 py-3.5"},Ze={class:"text-sm text-muted-foreground"},et={class:"flex items-center justify-between gap-4 px-5 py-3.5"},tt={class:"font-mono text-sm text-muted-foreground"},st={class:"flex items-center justify-between gap-4 px-5 py-3.5"},ot={class:"text-right"},nt={key:0,class:"mt-1 block text-xs text-destructive"},at={class:"flex items-center justify-between gap-4 px-5 py-3.5"},rt={class:"text-sm text-muted-foreground"},lt={class:"flex items-center justify-between gap-4 px-5 py-3.5"},dt={class:"text-right"},it={class:"mt-1 block font-mono text-xs text-muted-foreground"},ut={key:0,class:"mt-1 block text-xs text-muted-foreground"},ct={class:"flex items-center justify-between gap-4 px-5 py-3.5"},mt=["title"],ft={class:"flex items-center justify-between gap-4 px-5 py-3.5"},pt={class:"font-mono text-sm text-muted-foreground tabular"},vt={key:2,class:"space-y-3 px-5 py-4"},kt={class:"overflow-x-auto"},gt={class:"w-full text-xs"},_t={class:"divide-y"},yt={class:"py-1.5 pr-3 font-mono whitespace-nowrap"},xt=["title"],bt={class:"py-1.5 text-right whitespace-nowrap text-muted-foreground"},ht={class:"flex items-start justify-between gap-4"},wt={class:"flex items-start justify-between gap-4"},Lt=A({__name:"settings",setup(b){Ve({title:"Settings · Hexcore"});const c=Ae(),g=ke(),_=ge(),C=Ie(),U=V(!1),y=V({}),f=V(null),I=V(!1),l=ye({network:"preprod",chainBackend:"offline",blockfrostProjectId:"",cardanoNodeSocket:"",hydraNodeImage:"",adminUsername:""});_e(async()=>{c.fetchHealth().catch(()=>{}),c.fetchSystemConfig().catch(()=>{});try{const m=await _.fetchSettings();Object.assign(l,m.settings,{blockfrostProjectId:""})}catch{}});const x=S(()=>c.health),v=S(()=>c.systemConfig),D=S(()=>_.settings?.provenance??[]),X=S(()=>_.settings?.confirmationPhrase??""),q=S(()=>D.value.filter(m=>m.source==="environment"||m.source==="env-file")),ee=S(()=>l.chainBackend==="blockfrost"&&!c.blockfrostKeyConfigured);async function te(){y.value={},U.value=!0;try{await _.saveSettings({network:l.network,chainBackend:l.chainBackend,blockfrostProjectId:l.blockfrostProjectId.trim()||void 0,cardanoNodeSocket:l.cardanoNodeSocket.trim()||void 0,hydraNodeImage:l.hydraNodeImage.trim()||void 0,adminUsername:l.adminUsername.trim()||void 0}),l.blockfrostProjectId="",await c.fetchSystemConfig().catch(()=>{}),await c.fetchHealth().catch(()=>{}),C.success("Settings saved","Applied to the running control-plane — no restart needed.")}catch(m){m instanceof Z?(y.value=m.fieldErrors,C.error("Could not save settings",m.message)):C.error("Could not save settings")}finally{U.value=!1}}async function se(m){if(f.value){I.value=!0;try{const e=await _.clean(f.value,m);if(f.value=null,e.setupRequired){await Q("/setup");return}C.success(`Removed ${e.headsRemoved} head(s) and ${e.containersRemoved} container(s)`),await Q("/heads")}catch(e){C.error("Nothing was deleted",e instanceof Z?e.message:void 0)}finally{I.value=!1}}}const oe={environment:"environment variable","env-file":".env file","settings-file":"saved here",default:"built-in default"};return(m,e)=>{const P=Re,H=Pe,R=He,h=ie,O=we,M=he,w=Ce,F=Se,K=be,$=ue,W=ve,Y=pe,j=fe,z=de,N=le,G=$e,J=je,ne=Ue,ae=Ne,re=Be;return d(),i("div",Le,[e[52]||(e[52]=s("h1",{class:"mb-1 text-xl font-semibold tracking-tight"},"Settings",-1)),e[53]||(e[53]=s("p",{class:"mb-5 text-sm text-muted-foreground"},[a(" Saved on the control-plane and applied without a restart. An environment variable or a "),s("code",{class:"bg-muted text-foreground rounded px-1 py-0.5 font-mono"},".env"),a(" still wins over anything set here — the table at the bottom says which. ")],-1)),o(N,null,{default:n(()=>[o(R,null,{default:n(()=>[o(P,{class:"text-base"},{default:n(()=>[...e[11]||(e[11]=[a("Chain",-1)])]),_:1}),o(H,null,{default:n(()=>[...e[12]||(e[12]=[a("Defaults for new heads. Existing heads keep what they were created with.",-1)])]),_:1})]),_:1}),o(z,{class:"space-y-4"},{default:n(()=>[s("div",Ee,[s("div",Te,[o(h,{for:"network"},{default:n(()=>[...e[13]||(e[13]=[a("Cardano network",-1)])]),_:1}),o(K,{id:"network",modelValue:t(l).network,"onUpdate:modelValue":e[0]||(e[0]=r=>t(l).network=r)},{default:n(()=>[o(M,{class:"w-full"},{default:n(()=>[o(O)]),_:1}),o(F,null,{default:n(()=>[o(w,{value:"preprod"},{default:n(()=>[...e[14]||(e[14]=[a("preprod",-1)])]),_:1}),o(w,{value:"preview"},{default:n(()=>[...e[15]||(e[15]=[a("preview",-1)])]),_:1}),o(w,{value:"mainnet"},{default:n(()=>[...e[16]||(e[16]=[a("mainnet",-1)])]),_:1})]),_:1})]),_:1},8,["modelValue"])]),s("div",Xe,[o(h,{for:"backend"},{default:n(()=>[...e[17]||(e[17]=[a("Chain backend",-1)])]),_:1}),o(K,{id:"backend",modelValue:t(l).chainBackend,"onUpdate:modelValue":e[1]||(e[1]=r=>t(l).chainBackend=r)},{default:n(()=>[o(M,{class:"w-full"},{default:n(()=>[o(O)]),_:1}),o(F,null,{default:n(()=>[o(w,{value:"offline"},{default:n(()=>[...e[18]||(e[18]=[a("offline — no credential",-1)])]),_:1}),o(w,{value:"blockfrost"},{default:n(()=>[...e[19]||(e[19]=[a("blockfrost",-1)])]),_:1}),o(w,{value:"cardano-node"},{default:n(()=>[...e[20]||(e[20]=[a("cardano-node",-1)])]),_:1})]),_:1})]),_:1},8,["modelValue"])])]),t(l).chainBackend==="blockfrost"?(d(),i("div",qe,[o(h,{for:"blockfrost"},{default:n(()=>[...e[21]||(e[21]=[a("Blockfrost project id",-1)])]),_:1}),o($,{id:"blockfrost",modelValue:t(l).blockfrostProjectId,"onUpdate:modelValue":e[2]||(e[2]=r=>t(l).blockfrostProjectId=r),placeholder:t(c).blockfrostKeyConfigured?"unchanged":`${t(l).network}XXXXXXXX`,autocomplete:"off",spellcheck:"false",class:"font-mono","aria-invalid":!!t(y).blockfrostProjectId},null,8,["modelValue","placeholder","aria-invalid"]),t(y).blockfrostProjectId?(d(),i("p",Oe,u(t(y).blockfrostProjectId),1)):(d(),i("p",Me,[t(c).blockfrostKeyConfigured?(d(),i(k,{key:0},[a(" A key is stored. Leave this blank to keep it — it is never sent back to the browser. ")],64)):(d(),i(k,{key:1},[e[22]||(e[22]=a("Must start with ",-1)),s("b",null,u(t(l).network),1),e[23]||(e[23]=a(".",-1))],64))]))])):p("",!0),t(l).chainBackend==="cardano-node"?(d(),i("div",Fe,[o(h,{for:"socket"},{default:n(()=>[...e[24]||(e[24]=[a("cardano-node socket",-1)])]),_:1}),o($,{id:"socket",modelValue:t(l).cardanoNodeSocket,"onUpdate:modelValue":e[3]||(e[3]=r=>t(l).cardanoNodeSocket=r),placeholder:"/run/cardano/node.socket",class:"font-mono","aria-invalid":!!t(y).cardanoNodeSocket},null,8,["modelValue","aria-invalid"]),t(y).cardanoNodeSocket?(d(),i("p",Ke,u(t(y).cardanoNodeSocket),1)):p("",!0)])):p("",!0),s("div",We,[o(h,{for:"image"},{default:n(()=>[...e[25]||(e[25]=[a("Default hydra-node image",-1)])]),_:1}),o($,{id:"image",modelValue:t(l).hydraNodeImage,"onUpdate:modelValue":e[4]||(e[4]=r=>t(l).hydraNodeImage=r),class:"font-mono",spellcheck:"false"},null,8,["modelValue"]),e[26]||(e[26]=s("p",{class:"text-xs text-muted-foreground"}," A head can still pin its own at creation, which is how two versions run side by side. ",-1))]),s("div",Ye,[o(h,{for:"admin"},{default:n(()=>[...e[27]||(e[27]=[a("Admin username",-1)])]),_:1}),o($,{id:"admin",modelValue:t(l).adminUsername,"onUpdate:modelValue":e[5]||(e[5]=r=>t(l).adminUsername=r),autocomplete:"username"},null,8,["modelValue"])]),t(ee)&&!t(l).blockfrostProjectId?(d(),B(Y,{key:2},{default:n(()=>[o(W,null,{default:n(()=>[...e[28]||(e[28]=[a(" The Blockfrost backend needs a project id before a head can be created against it. ",-1)])]),_:1})]),_:1})):p("",!0),s("div",Ge,[o(j,{disabled:t(U),onClick:te},{default:n(()=>[t(U)?(d(),B(t(ce),{key:0,class:"size-4 animate-spin"})):p("",!0),e[29]||(e[29]=a(" Save settings ",-1))]),_:1},8,["disabled"]),e[30]||(e[30]=s("span",{class:"text-xs text-muted-foreground"},"Applied immediately; no restart.",-1))])]),_:1})]),_:1}),o(N,{class:"mt-5 py-0"},{default:n(()=>[s("div",Je,[s("div",Qe,[e[31]||(e[31]=s("span",{class:"text-sm font-medium"},"Signed in as",-1)),s("span",Ze,u(t(g).username??"—"),1)]),t(x)?(d(),i(k,{key:0},[s("div",et,[e[32]||(e[32]=s("span",{class:"text-sm font-medium"},"Control-plane version",-1)),s("span",tt,u(t(x).version),1)]),s("div",st,[e[33]||(e[33]=s("span",{class:"text-sm font-medium"},"Docker",-1)),s("span",ot,[o(G,{label:t(x).docker.ok?"healthy":"unreachable",tone:t(x).docker.ok?"success":"danger"},null,8,["label","tone"]),t(x).docker.error?(d(),i("span",nt,u(t(x).docker.error),1)):p("",!0)])]),s("div",at,[e[34]||(e[34]=s("span",{class:"text-sm font-medium"},"Authentication",-1)),s("span",rt,u(t(x).authEnabled?"enabled":"disabled"),1)])],64)):p("",!0),t(v)?(d(),i(k,{key:1},[s("div",lt,[e[35]||(e[35]=s("span",{class:"text-sm font-medium"},"cardano-node socket",-1)),s("span",dt,[o(G,{label:t(v).cardanoNode.available?"available":"not available",tone:t(v).cardanoNode.available?"success":"warning"},null,8,["label","tone"]),s("span",it,u(t(v).cardanoNode.socketPath??"not set"),1),t(v).cardanoNode.available?p("",!0):(d(),i("span",ut,u(t(v).cardanoNode.reason),1))])]),s("div",ct,[e[36]||(e[36]=s("span",{class:"text-sm font-medium"},"State directory",-1)),s("span",{class:"max-w-72 truncate font-mono text-sm text-muted-foreground",title:t(v).stateDir},u(t(v).stateDir),9,mt)]),s("div",ft,[e[37]||(e[37]=s("span",{class:"text-sm font-medium"},"Max active nodes",-1)),s("span",pt,u(t(v).maxActiveNodes),1)])],64)):(d(),i("div",vt,[o(J,{class:"h-4 w-full"}),o(J,{class:"h-4 w-3/5"})]))])]),_:1}),t(D).length?(d(),B(N,{key:0,class:"mt-5"},{default:n(()=>[o(R,null,{default:n(()=>[o(P,{class:"text-base"},{default:n(()=>[...e[38]||(e[38]=[a("Where each value comes from",-1)])]),_:1}),o(H,null,{default:n(()=>[...e[39]||(e[39]=[a(" Highest layer wins: environment variable, then a ",-1),s("code",{class:"bg-muted text-foreground rounded px-1 py-0.5 font-mono"},".env",-1),a(" beside the server, then what is saved here, then the built-in default. ",-1)])]),_:1})]),_:1}),o(z,null,{default:n(()=>[t(q).length?(d(),B(Y,{key:0,class:"mb-4"},{default:n(()=>[o(ne,{class:"flex items-center gap-2"},{default:n(()=>[o(t(ze),{class:"size-4"}),e[40]||(e[40]=a(" Some settings are pinned",-1))]),_:1}),o(W,null,{default:n(()=>[a(u(t(q).map(r=>r.key).join(", "))+" came from a higher layer, so saving a different value here has no effect until it is unset on the server. ",1)]),_:1})]),_:1})):p("",!0),s("div",kt,[s("table",gt,[s("tbody",_t,[(d(!0),i(k,null,xe(t(D),r=>(d(),i("tr",{key:r.key},[s("td",yt,u(r.key),1),s("td",{class:"max-w-64 truncate py-1.5 pr-3 font-mono text-muted-foreground",title:r.value??""},[r.secret?(d(),i(k,{key:0},[a(u(r.value?"(set)":"(not set)"),1)],64)):(d(),i(k,{key:1},[a(u(r.value??"—"),1)],64))],8,xt),s("td",bt,u(oe[r.source]),1)]))),128))])])])]),_:1})]),_:1})):p("",!0),o(N,{class:"mt-5 border-destructive/40"},{default:n(()=>[o(R,null,{default:n(()=>[o(P,{class:"text-base text-destructive"},{default:n(()=>[...e[41]||(e[41]=[a("Start over",-1)])]),_:1}),o(H,null,{default:n(()=>[...e[42]||(e[42]=[a(" Both keep your Cardano signing keys, so any address already holding test ADA survives. Deleting those needs ",-1),s("code",{class:"bg-muted text-foreground rounded px-1 py-0.5 font-mono"},"hexcore clean --all",-1),a(" with the server stopped. ",-1)])]),_:1})]),_:1}),o(z,{class:"space-y-3"},{default:n(()=>[s("div",ht,[e[44]||(e[44]=s("div",{class:"min-w-0"},[s("p",{class:"text-sm font-medium"},"Reset configuration"),s("p",{class:"text-xs text-muted-foreground"}," Forgets network, backend and credentials, and returns to the setup wizard. Heads are untouched. ")],-1)),o(j,{variant:"outline",size:"sm",class:"shrink-0",onClick:e[6]||(e[6]=r=>f.value="config")},{default:n(()=>[...e[43]||(e[43]=[a("Reset",-1)])]),_:1})]),o(ae),s("div",wt,[e[46]||(e[46]=s("div",{class:"min-w-0"},[s("p",{class:"text-sm font-medium"},"Delete every head"),s("p",{class:"text-xs text-muted-foreground"}," Removes all containers and Hydra persistence. Configuration and your login stay as they are. ")],-1)),o(j,{variant:"outline",size:"sm",class:"shrink-0 text-destructive",onClick:e[7]||(e[7]=r=>f.value="heads")},{default:n(()=>[o(t(De),{class:"size-4"}),e[45]||(e[45]=a(" Delete all ",-1))]),_:1})])]),_:1})]),_:1}),o(j,{variant:"outline",class:"mt-5",onClick:e[8]||(e[8]=r=>t(g).logout())},{default:n(()=>[...e[47]||(e[47]=[a("Sign out",-1)])]),_:1}),o(re,{open:t(f)!==null,title:t(f)==="config"?"Reset the configuration?":"Delete every head?","require-text":t(X),"confirm-label":t(f)==="config"?"Reset configuration":"Delete every head",loading:t(I),"onUpdate:open":e[9]||(e[9]=r=>!r&&(f.value=null)),onConfirm:e[10]||(e[10]=r=>se(t(X)))},{default:n(()=>[t(f)==="config"?(d(),i(k,{key:0},[e[48]||(e[48]=s("p",null,"Network, backend and stored credentials are forgotten, and Hexcore returns to the setup wizard.",-1)),e[49]||(e[49]=s("p",null,"Your heads, their keys and their persistence are kept exactly as they are.",-1))],64)):(d(),i(k,{key:1},[e[50]||(e[50]=s("p",null,"Every head is stopped, its containers removed and its Hydra persistence deleted.",-1)),e[51]||(e[51]=s("p",null,"Signing keys are kept, so addresses you have already funded remain spendable.",-1))],64))]),_:1},8,["open","title","require-text","confirm-label","loading"])])}}});export{Lt as default};
@@ -1 +0,0 @@
1
- import{_ as G}from"./CT-yt694.js";import{b as Q,_ as W,a as J}from"./CS3KqpH_.js";import{_ as K}from"./vSj9Ec0g.js";import{_ as X,a as Y,b as Z,c as ee,L as te}from"./rhEiP908.js";import{e as se,f as oe,D as ae,m as ie,A as B,c,b as o,w as a,h as s,j as h,F as A,a as n,t as P,k as g,y as I,r as N,p as ne,n as q,o as r,d as l,v as de,C as le}from"./CgPLsCeU.js";import{_ as re}from"./woNjBJMN.js";import{_ as ue}from"./Cr8dL64Q.js";import{u as me,A as fe}from"./DLztFeOQ.js";import{e as pe}from"./Bj1xviSh.js";import{u as ce}from"./BgPn4NJH.js";import{u as ge}from"./CGD7MYQH.js";import{u as ye}from"./C1YRg2ic.js";import"./CnOqDT9k.js";import"./BnotlrL7.js";import"./CZK6xUH-.js";const xe={class:"text-xl font-semibold tracking-tight"},ve=["disabled"],_e={class:"space-y-2"},be={key:0,class:"text-xs text-destructive"},ke={class:"space-y-2"},he={key:0,class:"space-y-2"},Pe={key:0,class:"text-xs text-destructive"},Ve={class:"grid gap-4 sm:grid-cols-2"},Ie={class:"space-y-2"},Ne={class:"space-y-2"},Ae={class:"space-y-2"},Ue={class:"flex items-center gap-2 text-sm"},Me={class:"grid gap-4 sm:grid-cols-2"},Se={class:"space-y-2"},we={class:"space-y-2"},$e={class:"space-y-2"},ze={key:0,class:"text-xs text-destructive"},Re={class:"mt-4 flex justify-end gap-2"},je={class:"text-sm text-muted-foreground"},Ye=se({__name:"edit",setup(Ce){const E=oe(),U=ce(),H=ge(),S=ae(),_=I(()=>Number(E.params.id)),u=N(null),w=N(!0),V=N(!1),y=N(""),m=N({});ye({title:()=>`Edit ${u.value?.name??"head"} · Hexcore`});const t=ne({name:"",description:"",hydraNodeImage:"",contestationPeriod:120,depositPeriod:720,persistenceRotateAfter:15e3,quiet:!1,maxSizeMb:10,maxFiles:3,blockfrostProjectId:""}),$=I(()=>u.value?.chainBackend==="offline"),z=I(()=>u.value?.chainBackend==="blockfrost"),M=I(()=>u.value?pe(u.value.status):!1);ie(async()=>{try{const[i]=await Promise.all([S.get(`/api/heads/${_.value}`),U.fetchHydraVersions().catch(()=>{})]);u.value=i,t.name=i.name,t.description=i.description??"",t.hydraNodeImage=i.hydraNodeImage,t.contestationPeriod=i.contestationPeriod,t.depositPeriod=i.depositPeriod,t.persistenceRotateAfter=i.persistenceRotateAfter,t.quiet=i.logging.quiet,t.maxSizeMb=i.logging.maxSizeMb,t.maxFiles=i.logging.maxFiles}catch(i){y.value=i instanceof B?i.message:"Could not load this head."}finally{w.value=!1}});function R(){const i=u.value,e={};return t.name!==i.name&&(e.name=t.name),t.description!==(i.description??"")&&(e.description=t.description),t.hydraNodeImage!==i.hydraNodeImage&&(e.hydraNodeImage=t.hydraNodeImage),$.value||(t.contestationPeriod!==i.contestationPeriod&&(e.contestationPeriod=t.contestationPeriod),t.depositPeriod!==i.depositPeriod&&(e.depositPeriod=t.depositPeriod)),t.persistenceRotateAfter!==i.persistenceRotateAfter&&(e.persistenceRotateAfter=t.persistenceRotateAfter),(t.quiet!==i.logging.quiet||t.maxSizeMb!==i.logging.maxSizeMb||t.maxFiles!==i.logging.maxFiles)&&(e.logging={quiet:t.quiet,maxSizeMb:t.maxSizeMb,maxFiles:t.maxFiles}),z.value&&t.blockfrostProjectId.trim()&&(e.blockfrostProjectId=t.blockfrostProjectId.trim()),e}const T=I(()=>u.value?Object.keys(R()).length>0:!1);async function D(){if(!u.value)return;y.value="",m.value={};const i=R();if(Object.keys(i).length===0){await q(`/heads/${_.value}`);return}const e=me.safeParse(i);if(!e.success){for(const f of e.error.issues){const v=f.path.join(".");v&&!m.value[v]&&(m.value[v]=f.message)}y.value="Some values need fixing.";return}V.value=!0;try{await S.patch(`/api/heads/${_.value}`,e.data),await U.fetchHeads().catch(()=>{}),H.success(`${t.name} updated`,"Applied at the next start."),await q(`/heads/${_.value}`)}catch(f){f instanceof B?(m.value=f.fieldErrors,y.value=f.message):y.value="Update failed."}finally{V.value=!1}}return(i,e)=>{const f=G,v=Q,j=K,b=Y,k=X,L=re,C=J,F=W,p=Z,x=ee,O=ue;return r(),c("div",null,[o(v,{variant:"ghost",size:"sm",class:"mb-3 -ml-3","as-child":""},{default:a(()=>[o(f,{to:`/heads/${s(_)}`},{default:a(()=>[o(s(fe),{class:"size-4"}),e[11]||(e[11]=l(" Back to head",-1))]),_:1},8,["to"])]),_:1}),s(w)?(r(),h(k,{key:0},{default:a(()=>[o(b,{class:"space-y-3 py-6"},{default:a(()=>[o(j,{class:"h-6 w-56"}),o(j,{class:"h-4 w-full"})]),_:1})]),_:1})):s(u)?(r(),c(A,{key:1},[n("h1",xe,"Edit "+P(s(u).name),1),e[34]||(e[34]=n("p",{class:"mt-0.5 mb-4 text-sm text-muted-foreground"}," Applied at the next start. Node count, chain backend and generated keys are fixed at creation. ",-1)),s(M)?g("",!0):(r(),h(F,{key:0,variant:"destructive",class:"mb-4"},{default:a(()=>[o(L,null,{default:a(()=>[...e[12]||(e[12]=[l("This head can no longer be edited",-1)])]),_:1}),o(C,null,{default:a(()=>[s(u).status==="RUNNING"||s(u).status==="STARTING"?(r(),c(A,{key:0},[l(" Stop it first — its containers are running with these settings. ")],64)):(r(),c(A,{key:1},[l(" It has already run, so its persistence may not match new settings. Reset it to wipe persistence, then edit. ")],64))]),_:1})]),_:1})),n("fieldset",{disabled:!s(M)||s(V),class:"space-y-6"},[o(k,null,{default:a(()=>[o(b,{class:"space-y-4 pt-6"},{default:a(()=>[n("div",_e,[o(p,{for:"name"},{default:a(()=>[...e[13]||(e[13]=[l("Name",-1)])]),_:1}),o(x,{id:"name",modelValue:s(t).name,"onUpdate:modelValue":e[0]||(e[0]=d=>s(t).name=d)},null,8,["modelValue"]),s(m).name?(r(),c("p",be,P(s(m).name),1)):g("",!0)]),n("div",ke,[o(p,{for:"description"},{default:a(()=>[...e[14]||(e[14]=[l("Description",-1)])]),_:1}),o(x,{id:"description",modelValue:s(t).description,"onUpdate:modelValue":e[1]||(e[1]=d=>s(t).description=d),placeholder:"What this head is for"},null,8,["modelValue"])]),s(U).hydraVersions?(r(),c("div",he,[o(p,{for:"hydraNodeImage"},{default:a(()=>[...e[15]||(e[15]=[l("hydra-node image",-1)])]),_:1}),o(O,{modelValue:s(t).hydraNodeImage,"onUpdate:modelValue":e[2]||(e[2]=d=>s(t).hydraNodeImage=d)},null,8,["modelValue"]),e[16]||(e[16]=n("p",{class:"text-xs text-muted-foreground"}," Changing this is safe while the head has never run. Once it has, the persistence on disk was written by the old version and a different line cannot resume it. ",-1)),s(m).hydraNodeImage?(r(),c("p",Pe,P(s(m).hydraNodeImage),1)):g("",!0)])):g("",!0)]),_:1})]),_:1}),o(k,null,{default:a(()=>[o(b,{class:"space-y-4 pt-6"},{default:a(()=>[e[21]||(e[21]=n("h2",{class:"text-sm font-medium"},"Timing",-1)),n("div",Ve,[s($)?g("",!0):(r(),c(A,{key:0},[n("div",Ie,[o(p,{for:"contestationPeriod"},{default:a(()=>[...e[17]||(e[17]=[l("Contestation period (s)",-1)])]),_:1}),o(x,{id:"contestationPeriod",modelValue:s(t).contestationPeriod,"onUpdate:modelValue":e[3]||(e[3]=d=>s(t).contestationPeriod=d),modelModifiers:{number:!0},type:"number",min:"1"},null,8,["modelValue"]),e[18]||(e[18]=n("p",{class:"text-xs text-muted-foreground"},"Every participant must use the same value.",-1))]),n("div",Ne,[o(p,{for:"depositPeriod"},{default:a(()=>[...e[19]||(e[19]=[l("Deposit period (s)",-1)])]),_:1}),o(x,{id:"depositPeriod",modelValue:s(t).depositPeriod,"onUpdate:modelValue":e[4]||(e[4]=d=>s(t).depositPeriod=d),modelModifiers:{number:!0},type:"number",min:"1"},null,8,["modelValue"])])],64)),n("div",Ae,[o(p,{for:"persistenceRotateAfter"},{default:a(()=>[...e[20]||(e[20]=[l("Persistence rotate after (events)",-1)])]),_:1}),o(x,{id:"persistenceRotateAfter",modelValue:s(t).persistenceRotateAfter,"onUpdate:modelValue":e[5]||(e[5]=d=>s(t).persistenceRotateAfter=d),modelModifiers:{number:!0},type:"number",min:"100"},null,8,["modelValue"])])])]),_:1})]),_:1}),o(k,null,{default:a(()=>[o(b,{class:"space-y-4 pt-6"},{default:a(()=>[e[27]||(e[27]=n("h2",{class:"text-sm font-medium"},"Logging",-1)),n("label",Ue,[de(n("input",{"onUpdate:modelValue":e[6]||(e[6]=d=>s(t).quiet=d),type:"checkbox",class:"size-4 accent-primary"},null,512),[[le,s(t).quiet]]),e[22]||(e[22]=l(" Quiet hydra-node (",-1)),e[23]||(e[23]=n("code",null,"--quiet",-1)),e[24]||(e[24]=l(") ",-1))]),n("div",Me,[n("div",Se,[o(p,{for:"maxSizeMb"},{default:a(()=>[...e[25]||(e[25]=[l("Max log size per file (MB)",-1)])]),_:1}),o(x,{id:"maxSizeMb",modelValue:s(t).maxSizeMb,"onUpdate:modelValue":e[7]||(e[7]=d=>s(t).maxSizeMb=d),modelModifiers:{number:!0},type:"number",min:"1",max:"1024"},null,8,["modelValue"])]),n("div",we,[o(p,{for:"maxFiles"},{default:a(()=>[...e[26]||(e[26]=[l("Max log files",-1)])]),_:1}),o(x,{id:"maxFiles",modelValue:s(t).maxFiles,"onUpdate:modelValue":e[8]||(e[8]=d=>s(t).maxFiles=d),modelModifiers:{number:!0},type:"number",min:"1",max:"50"},null,8,["modelValue"])])]),e[28]||(e[28]=n("p",{class:"text-xs text-muted-foreground"}," Docker's default driver has no size limit, so an unconfigured head writes until the disk fills. ",-1))]),_:1})]),_:1}),s(z)?(r(),h(k,{key:0},{default:a(()=>[o(b,{class:"space-y-4 pt-6"},{default:a(()=>[e[31]||(e[31]=n("h2",{class:"text-sm font-medium"},"Blockfrost",-1)),n("div",$e,[o(p,{for:"blockfrostProjectId"},{default:a(()=>[...e[29]||(e[29]=[l("Replace the API key",-1)])]),_:1}),o(x,{id:"blockfrostProjectId",modelValue:s(t).blockfrostProjectId,"onUpdate:modelValue":e[9]||(e[9]=d=>s(t).blockfrostProjectId=d),placeholder:"Leave empty to keep the current key",spellcheck:"false"},null,8,["modelValue"]),e[30]||(e[30]=n("p",{class:"text-xs text-muted-foreground"}," The key is never sent back to this form, so there is nothing to show here — type a new one only if you mean to replace it. Per-node keys are unaffected. ",-1)),s(m).blockfrostProjectId?(r(),c("p",ze,P(s(m).blockfrostProjectId),1)):g("",!0)])]),_:1})]),_:1})):g("",!0)],8,ve),s(y)?(r(),h(F,{key:1,variant:"destructive",class:"mt-4"},{default:a(()=>[o(C,null,{default:a(()=>[l(P(s(y)),1)]),_:1})]),_:1})):g("",!0),n("div",Re,[o(v,{variant:"outline","as-child":""},{default:a(()=>[o(f,{to:`/heads/${s(_)}`},{default:a(()=>[...e[32]||(e[32]=[l("Cancel",-1)])]),_:1},8,["to"])]),_:1}),o(v,{disabled:!s(M)||s(V)||!s(T),onClick:e[10]||(e[10]=d=>D())},{default:a(()=>[s(V)?(r(),h(s(te),{key:0,class:"size-4 animate-spin"})):g("",!0),e[33]||(e[33]=l(" Save changes ",-1))]),_:1},8,["disabled"])])],64)):(r(),h(k,{key:2},{default:a(()=>[o(b,{class:"py-6"},{default:a(()=>[n("p",je,P(s(y)||"Head not found."),1)]),_:1})]),_:1}))])}}});export{Ye as default};
@@ -1 +0,0 @@
1
- import{_ as Ce}from"./CT-yt694.js";import{c as Ve,b as Ue,_ as Pe,a as we}from"./CS3KqpH_.js";import{_ as Ke,a as Ie,b as Se,c as Be,L as Z}from"./rhEiP908.js";import{_ as Ne}from"./CkCrahXt.js";import{a as je,b as Oe,c as Le,d as Ae,e as $e,_ as Me}from"./woNjBJMN.js";import{e as ze,m as Fe,B as W,c as l,b as a,w as m,a as s,p as se,o as n,h as t,d as r,g as Te,t as p,k as y,F as h,j as w,v as E,C as J,q as j,s as Ee,r as M,y as S,D as ne,A as Q,n as Je}from"./CgPLsCeU.js";import{_ as Re}from"./CqsSss-D.js";import{_ as He}from"./CePNTU1S.js";import{_ as De}from"./Cr8dL64Q.js";import{D as Ge,A as qe,c as Xe,M as Ze,k as We}from"./DLztFeOQ.js";import{u as Qe}from"./C1YRg2ic.js";import{u as Ye}from"./BgPn4NJH.js";import{u as et}from"./CGD7MYQH.js";import{C as tt}from"./D3CwzwU0.js";import{C as ot}from"./CcdyYRYz.js";import"./CnOqDT9k.js";import"./BnotlrL7.js";import"./CZK6xUH-.js";const st=Ve("RotateCcwIcon",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]),nt=11,at=[{path:"maxTxSize",label:"Max transaction size (bytes)",group:"limits",kind:"integer",hint:"Largest L2 transaction the head will accept. Raising it is the usual fix for a batch that will not fit."},{path:"maxValueSize",label:"Max value size (bytes)",group:"limits",kind:"integer",hint:"Serialised size limit of one output’s value — the ceiling on how many native assets a UTxO can carry."},{path:"maxBlockBodySize",label:"Max block body size (bytes)",group:"limits",kind:"integer",hint:"Bounds a snapshot’s worth of transactions."},{path:"maxCollateralInputs",label:"Max collateral inputs",group:"limits",kind:"integer",hint:"How many inputs a script transaction may pledge as collateral."},{path:"collateralPercentage",label:"Collateral percentage",group:"limits",kind:"integer",hint:"Collateral required as a percentage of the fee. Meaningless while fees are zero."},{path:"maxTxExecutionUnits.memory",label:"Max tx execution memory",group:"plutus",kind:"integer",hint:"Plutus memory budget for one transaction. The limit a heavy validator hits first."},{path:"maxTxExecutionUnits.steps",label:"Max tx execution steps",group:"plutus",kind:"integer",hint:"Plutus CPU budget for one transaction."},{path:"maxBlockExecutionUnits.memory",label:"Max block execution memory",group:"plutus",kind:"integer",hint:"Aggregate Plutus memory across a block."},{path:"maxBlockExecutionUnits.steps",label:"Max block execution steps",group:"plutus",kind:"integer",hint:"Aggregate Plutus CPU across a block."},{path:"executionUnitPrices.priceMemory",label:"Price per memory unit",group:"plutus",kind:"decimal",hint:"Converts Plutus memory into fee. Set this and the step price to 0 to make scripts free on L2."},{path:"executionUnitPrices.priceSteps",label:"Price per CPU step",group:"plutus",kind:"decimal",hint:"Converts Plutus CPU into fee. Kept at the chain’s value unless you zero it."},{path:"txFeeFixed",label:"Fixed fee (lovelace)",group:"fees",kind:"integer",hint:"Flat part of the fee. Zeroed on L2 — a head that charges fees needs somewhere for them to go.",l2Zeroed:!0},{path:"txFeePerByte",label:"Fee per byte (lovelace)",group:"fees",kind:"integer",hint:"Size-proportional part of the fee. Zeroed on L2.",l2Zeroed:!0},{path:"utxoCostPerByte",label:"UTxO cost per byte (lovelace)",group:"fees",kind:"integer",hint:"Min-ADA per byte of output. Zeroed on L2 so small outputs are not rejected inside the head.",l2Zeroed:!0},{path:"minFeeRefScriptCostPerByte",label:"Reference script cost per byte",group:"fees",kind:"integer",hint:"Surcharge for reference scripts, by size."},{path:"protocolVersion.major",label:"Protocol version (major)",group:"version",kind:"integer",hint:`Ledger era the head validates against. ${nt} is current; lowering it rejects transactions built for the live chain.`},{path:"protocolVersion.minor",label:"Protocol version (minor)",group:"version",kind:"integer",hint:"Minor version, almost always 0."}],rt={limits:"Ledger limits",plutus:"Plutus execution budgets",fees:"Fees and deposits",version:"Protocol version"};function z(K,v){let V=K;for(const o of v.split(".")){if(V===null||typeof V!="object")return;V=V[o]}return V}function R(K,v,V){const[o,...I]=v.split(".");if(o===void 0)return K;if(I.length===0)return{...K,[o]:V};const B=K[o],f=B!==null&&typeof B=="object"?B:{};return{...K,[o]:R(f,I.join("."),V)}}function it(K,v){const V={};for(const o of Object.keys(v))JSON.stringify(v[o])!==JSON.stringify(K[o])&&(V[o]=v[o]);return V}const lt={class:"mx-auto max-w-2xl"},dt={class:"space-y-2"},ut={key:0,class:"text-xs text-destructive"},ft={class:"space-y-2"},ct={class:"space-y-2"},mt={class:"text-xs text-muted-foreground"},pt={key:0,class:"text-xs text-destructive"},yt={class:"space-y-2"},gt={key:1,class:"text-xs text-destructive"},ht={class:"space-y-2"},vt={key:0,class:"font-normal text-muted-foreground"},xt={class:"text-xs text-muted-foreground"},kt={key:0,class:"text-xs text-destructive"},bt={class:"space-y-2"},_t={class:"flex items-center gap-2 text-sm"},Ct={key:0,class:"grid gap-2 pt-1"},Vt={class:"w-16 shrink-0 font-mono text-xs text-muted-foreground"},Ut={key:0,class:"text-xs text-destructive"},Pt={key:0,class:"text-xs text-destructive"},wt={class:"space-y-2"},Kt={key:0,class:"text-xs text-destructive"},It={class:"space-y-2"},St={class:"flex items-center gap-2 text-sm"},Bt={key:0,class:"text-xs text-destructive"},Nt={class:"text-xs text-muted-foreground"},jt={class:"space-y-2"},Ot={key:0,class:"text-xs text-destructive"},Lt={class:"space-y-2"},At={class:"flex items-center gap-2 text-sm"},$t={class:"text-xs text-muted-foreground"},Mt={key:0,class:"grid gap-3 pt-1"},zt={class:"mb-2 font-mono text-xs text-muted-foreground"},Ft={class:"mt-2 flex items-center gap-2"},Tt={key:0,class:"mt-2 rounded-md border border-success-soft-foreground/20 bg-success-soft/40 p-2.5 text-xs"},Et={class:"mb-1 font-semibold text-success-soft-foreground"},Jt={key:0,class:"mt-1.5"},Rt={class:"text-foreground"},Ht={key:0,class:"text-muted-foreground"},Dt={key:1,class:"mt-1.5 text-muted-foreground"},Gt={key:1,class:"mt-2 text-xs text-destructive"},qt={key:2,class:"mt-1.5 text-xs text-destructive"},Xt={key:0,class:"text-xs text-destructive"},Zt={key:2,class:"space-y-2"},Wt={class:"mt-1.5"},Qt={class:"text-foreground"},Yt=["href"],eo={key:0,class:"text-xs text-destructive"},to={class:"space-y-3"},oo={class:"grid gap-4 sm:grid-cols-2"},so={class:"space-y-2"},no={class:"space-y-2"},ao={class:"space-y-2 sm:col-span-2"},ro={key:0,class:"text-xs text-muted-foreground"},io={class:"space-y-3"},lo={class:"flex items-center gap-2 text-sm"},uo={class:"grid gap-4 sm:grid-cols-2"},fo={class:"space-y-2"},co={class:"space-y-2"},mo={key:0,class:"mt-4 space-y-4"},po={key:0,class:"flex items-center gap-2 text-xs text-muted-foreground"},yo={class:"text-xs text-muted-foreground"},go={class:"text-xs font-semibold tracking-wide text-muted-foreground uppercase"},ho={class:"grid gap-4 sm:grid-cols-2"},vo={class:"flex items-center justify-between gap-2"},xo={class:"text-xs text-muted-foreground"},ko={class:"space-y-2"},bo={key:0,class:"text-xs text-destructive"},_o={class:"flex items-center justify-between gap-2 rounded-md border p-3 text-xs"},Co={class:"text-foreground"},Vo={class:"font-mono"},Uo={class:"flex justify-end gap-2"},Ro=ze({__name:"new",setup(K){Qe({title:"New head · Hexcore"});const v=Ye(),V=et(),o=se({name:"",description:"",nodeCount:1,contestationPeriod:120,depositPeriod:720,persistenceRotateAfter:15e3,hydraNodeImage:"",chainBackend:"blockfrost",blockfrostProjectId:"",perNodeKeys:!1,nodeKeys:[],importCardanoKeys:!1,cardanoKeys:[],logging:{quiet:!1,maxSizeMb:10,maxFiles:3},offline:{headSeed:"",seedLovelace:Ge,customInitialUtxo:!1,initialUtxoJson:"",ledgerGenesisJson:""}}),I=M(!1),B=M(!1),f=M({}),O=M(""),U=S(()=>o.chainBackend==="offline");Fe(async()=>{try{await v.fetchHydraVersions(),o.hydraNodeImage=v.hydraVersions?.defaultImage??""}catch{}try{await v.fetchSystemConfig();const u=v.systemConfig;u?.defaultChainBackend==="offline"?o.chainBackend="offline":u?.defaultChainBackend==="cardano-node"&&u.cardanoNode.available?o.chainBackend="cardano-node":o.chainBackend="blockfrost"}catch{}});const H=S(()=>U.value?Ze:10);W(H,u=>{o.nodeCount>u&&(o.nodeCount=u)});const ae=S(()=>{const u=v.hydraVersions;if(!u)return!0;const e=u.profiles.find(g=>g.image===o.hydraNodeImage);return e?e.flags.offline:!0}),x=M({});async function re(u){const e=o.cardanoKeys[u];if(e?.signingKey.trim()){x.value={...x.value,[u]:{state:"busy"}};try{const g=await ne().post("/api/cardano/verify-key",{signingKey:e.signingKey.trim(),verificationKey:e.verificationKey.trim()||void 0,network:v.systemConfig?.network,blockfrostProjectId:(o.perNodeKeys?o.nodeKeys[u]:o.blockfrostProjectId)?.trim()||void 0});x.value={...x.value,[u]:{state:"ok",result:g}}}catch(g){const C=g instanceof Q?g.fieldErrors.signingKey??g.message:"Could not verify that key.";x.value={...x.value,[u]:{state:"error",message:C}}}}}function Y(u){if(!x.value[u])return;const e={...x.value};delete e[u],x.value=e}function D(u){return`${(Number(BigInt(u)/1000n)/1e3).toLocaleString(void 0,{maximumFractionDigits:3})} ₳`}const F=S(()=>v.systemConfig?.cardanoNode??null),ee=S(()=>F.value?.available??!1),T=S(()=>o.chainBackend==="blockfrost"&&v.systemConfig?.blockfrost.configured===!1);W(()=>[o.nodeCount,o.perNodeKeys,o.blockfrostProjectId],()=>{if(!o.perNodeKeys)return;const u=Array.from({length:o.nodeCount},(e,g)=>o.nodeKeys[g]||o.blockfrostProjectId);o.nodeKeys=u},{immediate:!0}),W(()=>[o.nodeCount,o.importCardanoKeys],()=>{o.importCardanoKeys&&(o.cardanoKeys=Array.from({length:o.nodeCount},(u,e)=>o.cardanoKeys[e]??{signingKey:"",verificationKey:""}))},{immediate:!0});const ie=S(()=>o.hydraNodeImage?We(o.hydraNodeImage,o.chainBackend,v.hydraVersions?.hostPlatform??"unknown"):[]),c=se({baseline:null,edited:null,source:"",note:"",loading:!1,error:"",extraJson:""});async function te(u=!1){if(!(c.loading||c.baseline&&!u)){c.loading=!0,c.error="";try{const e=await ne().post("/api/cardano/protocol-parameters",{network:v.systemConfig?.network,blockfrostProjectId:U.value?void 0:o.blockfrostProjectId.trim()||void 0});c.baseline=e.parameters,c.edited=JSON.parse(JSON.stringify(e.parameters)),c.source=e.source,c.note=e.note??""}catch(e){c.error=e instanceof Q?e.message:"Could not read the current protocol parameters."}finally{c.loading=!1}}}function le(){I.value=!I.value,I.value&&te()}const de=S(()=>{const u=new Map;for(const e of at)u.set(e.group,[...u.get(e.group)??[],e]);return[...u.entries()].map(([e,g])=>({group:e,label:rt[e],fields:g}))});function ue(u){const e=c.edited?z(c.edited,u):void 0;return e==null?"":String(e)}function fe(u,e,g){if(!c.edited)return;if(e.trim()===""){c.baseline&&(c.edited=R(c.edited,u,z(c.baseline,u)));return}const C=g==="integer"?Number.parseInt(e,10):Number.parseFloat(e);Number.isFinite(C)&&(c.edited=R(c.edited,u,C))}const L=S(()=>c.baseline&&c.edited?it(c.baseline,c.edited):{});function oe(u){return!c.baseline||!c.edited?!1:JSON.stringify(z(c.edited,u))!==JSON.stringify(z(c.baseline,u))}function ce(u){!c.baseline||!c.edited||(c.edited=R(c.edited,u,z(c.baseline,u)))}function me(){c.baseline&&(c.edited=JSON.parse(JSON.stringify(c.baseline)),c.extraJson="")}function G(u,e){if(!u.trim())return{};try{const g=JSON.parse(u);return g===null||typeof g!="object"||Array.isArray(g)?{error:`${e} must be a JSON object.`}:{value:g}}catch(g){return{error:`${e} is not valid JSON: ${g.message}`}}}async function pe(){f.value={},O.value="";const u=o.chainBackend==="blockfrost";if(T.value&&(o.perNodeKeys?o.nodeKeys.slice(0,o.nodeCount).some(N=>!N.trim()):!o.blockfrostProjectId.trim())){f.value[o.perNodeKeys?"nodeBlockfrostProjectIds":"blockfrostProjectId"]="This server has no default Blockfrost key, so every node needs one.";return}const e=G(c.extraJson,"Extra protocol parameters");if(e.error){f.value.protocolParameters=e.error;return}const g=G(o.offline.initialUtxoJson,"The initial UTxO"),C=G(o.offline.ledgerGenesisJson,"The ledger genesis");if(U.value){if(o.offline.customInitialUtxo&&g.error){f.value["offline.initialUtxo"]=g.error;return}if(C.error){f.value["offline.ledgerGenesis"]=C.error;return}}const k={...L.value,...e.value??{}},b=Xe.safeParse({...o,description:o.description||void 0,hydraNodeImage:o.hydraNodeImage||void 0,protocolParameters:Object.keys(k).length?k:void 0,logging:o.logging,offline:U.value?{headSeed:o.offline.headSeed.trim()||void 0,seedLovelace:o.offline.seedLovelace,initialUtxo:o.offline.customInitialUtxo?g.value:void 0,ledgerGenesis:C.value}:void 0,blockfrostProjectId:u&&o.blockfrostProjectId.trim()||void 0,nodeBlockfrostProjectIds:u&&o.perNodeKeys?o.nodeKeys.slice(0,o.nodeCount).map(_=>_.trim()):void 0,nodeCardanoKeys:o.importCardanoKeys?o.cardanoKeys.slice(0,o.nodeCount).map(_=>_.signingKey.trim()?{signingKey:_.signingKey.trim(),verificationKey:_.verificationKey.trim()||void 0}:null):void 0});if(!b.success){for(const _ of b.error.issues){const N=_.path.join(".");f.value[N]||(f.value[N]=_.message)}return}B.value=!0;try{const _=await v.create(b.data);V.success(`${_.name} created`,U.value?"It needs no funding — start it.":"Fund its addresses, then start it."),await Je("/heads")}catch(_){_ instanceof Q?(f.value=_.fieldErrors,Object.keys(f.value).length===0&&(O.value=_.message)):O.value="Could not create the head."}finally{B.value=!1}}return(u,e)=>{const g=Ce,C=Ue,k=Se,b=Be,_=Ne,N=Le,ye=Oe,q=$e,ge=Ae,he=je,A=we,$=Pe,X=Re,ve=He,xe=De,ke=Me,be=Ie,_e=Ke;return n(),l("div",lt,[a(C,{variant:"ghost",size:"sm",class:"mb-3 -ml-3","as-child":""},{default:m(()=>[a(g,{to:"/heads"},{default:m(()=>[a(t(qe),{class:"size-4"}),e[21]||(e[21]=r(" Back to heads",-1))]),_:1})]),_:1}),e[83]||(e[83]=s("h1",{class:"mb-1 text-xl font-semibold tracking-tight"},"Create a Hydra Head",-1)),e[84]||(e[84]=s("p",{class:"mb-5 text-sm text-muted-foreground"}," Hexcore generates every Hydra and Cardano key this head needs. You'll get one fundable address per node. ",-1)),a(_e,null,{default:m(()=>[a(be,null,{default:m(()=>[s("form",{class:"space-y-5",onSubmit:Te(pe,["prevent"])},[s("div",dt,[a(k,{for:"name"},{default:m(()=>[...e[22]||(e[22]=[r("Name",-1)])]),_:1}),a(b,{id:"name",modelValue:t(o).name,"onUpdate:modelValue":e[0]||(e[0]=i=>t(o).name=i),placeholder:"payments-mainline",required:"","aria-invalid":!!t(f).name},null,8,["modelValue","aria-invalid"]),t(f).name?(n(),l("p",ut,p(t(f).name),1)):y("",!0)]),s("div",ft,[a(k,{for:"description"},{default:m(()=>[...e[23]||(e[23]=[r(" Description ",-1),s("span",{class:"font-normal text-muted-foreground"},"optional",-1)])]),_:1}),a(b,{id:"description",modelValue:t(o).description,"onUpdate:modelValue":e[1]||(e[1]=i=>t(o).description=i),placeholder:"What this head is for"},null,8,["modelValue"])]),s("div",ct,[a(k,{for:"nodeCount"},{default:m(()=>[...e[24]||(e[24]=[r("Nodes",-1)])]),_:1}),a(b,{id:"nodeCount",modelValue:t(o).nodeCount,"onUpdate:modelValue":e[2]||(e[2]=i=>t(o).nodeCount=i),modelModifiers:{number:!0},type:"number",min:"1",max:t(H),"aria-invalid":!!t(f).nodeCount},null,8,["modelValue","max","aria-invalid"]),s("p",mt,[e[25]||(e[25]=r(" How many hydra-node containers form this head. 1 is useful for smoke tests; a real head needs one node per participant. ",-1)),t(U)?(n(),l(h,{key:0},[r(" They talk over the same peer network an online head uses — only the on-chain parts are gone — but at most "+p(t(H))+", since they all share this machine with no layer 1 to spread the load over. Each node's address is seeded in the starting UTxO rather than funded. ",1)],64)):(n(),l(h,{key:1},[r(" Each node gets its own address to fund. ")],64))]),t(f).nodeCount?(n(),l("p",pt,p(t(f).nodeCount),1)):y("",!0)]),a(_),s("div",yt,[a(k,{for:"chainBackend"},{default:m(()=>[...e[26]||(e[26]=[r("Chain backend",-1)])]),_:1}),a(he,{modelValue:t(o).chainBackend,"onUpdate:modelValue":e[3]||(e[3]=i=>t(o).chainBackend=i)},{default:m(()=>[a(ye,{id:"chainBackend",class:"w-full"},{default:m(()=>[a(N)]),_:1}),a(ge,null,{default:m(()=>[a(q,{value:"blockfrost"},{default:m(()=>[...e[27]||(e[27]=[r("Blockfrost — an API key, nothing to run",-1)])]),_:1}),a(q,{value:"cardano-node",disabled:!t(ee)},{default:m(()=>[r(" cardano-node"+p(t(ee)?" — local node socket":" — unavailable"),1)]),_:1},8,["disabled"]),a(q,{value:"offline"},{default:m(()=>[...e[28]||(e[28]=[r("Offline — no layer 1 at all",-1)])]),_:1})]),_:1})]),_:1},8,["modelValue"]),t(F)&&!t(F).available&&!t(U)?(n(),w($,{key:0},{default:m(()=>[a(A,null,{default:m(()=>[e[29]||(e[29]=s("b",{class:"text-foreground"},"No cardano-node socket.",-1)),r(" "+p(t(F).reason)+". Heads must use Blockfrost or offline mode until ",1),e[30]||(e[30]=s("code",null,"CARDANO_NODE_SOCKET",-1)),e[31]||(e[31]=r(" points at a readable socket. ",-1))]),_:1})]),_:1})):y("",!0),t(f).chainBackend?(n(),l("p",gt,p(t(f).chainBackend),1)):y("",!0)]),t(o).chainBackend==="blockfrost"?(n(),l(h,{key:0},[s("div",ht,[a(k,{for:"blockfrostProjectId"},{default:m(()=>[e[32]||(e[32]=r(" Blockfrost API key ",-1)),t(T)?y("",!0):(n(),l("span",vt,"optional"))]),_:1}),a(b,{id:"blockfrostProjectId",modelValue:t(o).blockfrostProjectId,"onUpdate:modelValue":e[4]||(e[4]=i=>t(o).blockfrostProjectId=i),placeholder:t(T)?"preprodXXXXXXXX":"leave empty to use the server’s key","aria-invalid":!!t(f).blockfrostProjectId,autocomplete:"off",spellcheck:"false"},null,8,["modelValue","placeholder","aria-invalid"]),s("p",xt,[t(T)?(n(),l(h,{key:0},[e[33]||(e[33]=r(" This server has no default key, so every node needs one. ",-1)),e[34]||(e[34]=s("a",{href:"https://blockfrost.io",target:"_blank",rel:"noreferrer",class:"underline underline-offset-2"},"Get a free key ↗",-1))],64)):(n(),l(h,{key:1},[r(" Used by every node of this head. Left empty, they use the server's key. ")],64))]),t(f).blockfrostProjectId?(n(),l("p",kt,p(t(f).blockfrostProjectId),1)):y("",!0)]),s("div",bt,[s("label",_t,[E(s("input",{"onUpdate:modelValue":e[5]||(e[5]=i=>t(o).perNodeKeys=i),type:"checkbox",class:"size-4 accent-primary"},null,512),[[J,t(o).perNodeKeys]]),e[35]||(e[35]=r(" Use a different key for each node ",-1))]),e[36]||(e[36]=s("p",{class:"text-xs text-muted-foreground"}," Blockfrost meters per key, so nodes sharing one share its rate limit. Fine for a smoke test; give real participants their own. ",-1)),t(o).perNodeKeys?(n(),l("div",Ct,[(n(!0),l(h,null,j(t(o).nodeCount,(i,d)=>(n(),l("div",{key:d,class:"flex items-center gap-2"},[s("span",Vt,"n"+p(d),1),a(b,{modelValue:t(o).nodeKeys[d],"onUpdate:modelValue":P=>t(o).nodeKeys[d]=P,placeholder:`Key for node ${d}`,autocomplete:"off",spellcheck:"false","aria-invalid":!!t(f)[`nodeBlockfrostProjectIds.${d}`]},null,8,["modelValue","onUpdate:modelValue","placeholder","aria-invalid"])]))),128)),t(f).nodeBlockfrostProjectIds?(n(),l("p",Ut,p(t(f).nodeBlockfrostProjectIds),1)):y("",!0),(n(!0),l(h,null,j(t(o).nodeCount,(i,d)=>(n(),l(h,{key:`err-${d}`},[t(f)[`nodeBlockfrostProjectIds.${d}`]?(n(),l("p",Pt," n"+p(d)+": "+p(t(f)[`nodeBlockfrostProjectIds.${d}`]),1)):y("",!0)],64))),128))])):y("",!0)])],64)):y("",!0),t(U)?(n(),l(h,{key:1},[t(ae)?y("",!0):(n(),w($,{key:0,variant:"destructive"},{default:m(()=>[a(A,null,{default:m(()=>[...e[37]||(e[37]=[r(" The selected hydra-node version has no offline mode. Pick a version that does, or another backend. ",-1)])]),_:1})]),_:1})),s("div",wt,[a(k,{for:"offlineSeed"},{default:m(()=>[...e[38]||(e[38]=[r(" Head seed ",-1),s("span",{class:"font-normal text-muted-foreground"},"optional",-1)])]),_:1}),a(b,{id:"offlineSeed",modelValue:t(o).offline.headSeed,"onUpdate:modelValue":e[6]||(e[6]=i=>t(o).offline.headSeed=i),placeholder:"derived from the head id — 64 hex characters",autocomplete:"off",spellcheck:"false",class:"font-mono text-xs","aria-invalid":!!t(f)["offline.headSeed"]},null,8,["modelValue","aria-invalid"]),e[39]||(e[39]=s("p",{class:"text-xs text-muted-foreground"}," hydra-node derives the offline head's id from this. It is fixed once the head exists — changing it later would point the node at a head its own persistence does not describe. ",-1)),t(f)["offline.headSeed"]?(n(),l("p",Kt,p(t(f)["offline.headSeed"]),1)):y("",!0)]),s("div",It,[s("label",St,[E(s("input",{"onUpdate:modelValue":e[7]||(e[7]=i=>t(o).offline.customInitialUtxo=i),type:"checkbox",class:"size-4 accent-primary"},null,512),[[J,t(o).offline.customInitialUtxo]]),e[40]||(e[40]=r(" Write the starting UTxO myself ",-1))]),e[42]||(e[42]=s("p",{class:"text-xs text-muted-foreground"}," An offline head cannot commit from a chain, so this file is everything it will ever hold. By default every node's own address is seeded, which means you already hold the keys to all of it. ",-1)),t(o).offline.customInitialUtxo?(n(),l(h,{key:0},[a(X,{modelValue:t(o).offline.initialUtxoJson,"onUpdate:modelValue":e[8]||(e[8]=i=>t(o).offline.initialUtxoJson=i),rows:"6",spellcheck:"false",class:"font-mono text-xs",placeholder:'{ "0000…0000#0": { "address": "addr_test1…", "value": { "lovelace": 20000000000 } } }',"aria-invalid":!!t(f)["offline.initialUtxo"]},null,8,["modelValue","aria-invalid"]),t(f)["offline.initialUtxo"]?(n(),l("p",Bt,p(t(f)["offline.initialUtxo"]),1)):y("",!0)],64)):(n(),l(h,{key:1},[a(k,{for:"seedLovelace",class:"pt-1"},{default:m(()=>[...e[41]||(e[41]=[r("Seed amount (lovelace)",-1)])]),_:1}),a(b,{id:"seedLovelace",modelValue:t(o).offline.seedLovelace,"onUpdate:modelValue":e[9]||(e[9]=i=>t(o).offline.seedLovelace=i),modelModifiers:{number:!0},type:"number",min:"0"},null,8,["modelValue"]),s("p",Nt,p(D(String(t(o).offline.seedLovelace||0)))+" at each node's own address — "+p(D(String((t(o).offline.seedLovelace||0)*t(o).nodeCount)))+" in the head. ",1)],64))]),s("div",jt,[a(k,{for:"ledgerGenesis"},{default:m(()=>[...e[43]||(e[43]=[r(" Shelley genesis ",-1),s("span",{class:"font-normal text-muted-foreground"},"optional",-1)])]),_:1}),a(X,{id:"ledgerGenesis",modelValue:t(o).offline.ledgerGenesisJson,"onUpdate:modelValue":e[10]||(e[10]=i=>t(o).offline.ledgerGenesisJson=i),rows:"4",spellcheck:"false",class:"font-mono text-xs",placeholder:"Paste a shelley-genesis.json to give the simulated L1 real slot timing","aria-invalid":!!t(f)["offline.ledgerGenesis"]},null,8,["modelValue","aria-invalid"]),e[44]||(e[44]=s("p",{class:"text-xs text-muted-foreground"}," Left empty the flag is omitted, which is hydra-node's own default. A partial genesis fails to decode and kills the node at startup, so paste a whole one or none. ",-1)),t(f)["offline.ledgerGenesis"]?(n(),l("p",Ot,p(t(f)["offline.ledgerGenesis"]),1)):y("",!0)])],64)):y("",!0),s("div",Lt,[s("label",At,[E(s("input",{"onUpdate:modelValue":e[11]||(e[11]=i=>t(o).importCardanoKeys=i),type:"checkbox",class:"size-4 accent-primary"},null,512),[[J,t(o).importCardanoKeys]]),e[45]||(e[45]=r(" Use existing Cardano payment keys ",-1))]),s("p",$t,[t(U)?(n(),l(h,{key:0},[r(" An offline node signs nothing on chain, but its address is what the starting UTxO is seeded to — import a key to make that address one you already use. Hydra keys are always generated; they are what the nodes sign snapshots to each other with. ")],64)):(n(),l(h,{key:1},[e[46]||(e[46]=r(" By default each node gets a fresh key and an empty address you have to fund. Paste a ",-1)),e[47]||(e[47]=s("code",{class:"bg-muted text-foreground rounded px-1 py-0.5 font-mono"},".skey",-1)),e[48]||(e[48]=r(" to reuse an address that already holds test ADA. Hydra keys are always generated. ",-1))],64))]),t(o).importCardanoKeys?(n(),l("div",Mt,[(n(!0),l(h,null,j(t(o).nodeCount,(i,d)=>(n(),l("div",{key:`ck-${d}`,class:"rounded-md border p-3"},[s("p",zt,[r(" n"+p(d)+" ",1),e[49]||(e[49]=s("span",{class:"font-sans"},"— leave empty to generate this node's key",-1))]),a(b,{modelValue:t(o).cardanoKeys[d].signingKey,"onUpdate:modelValue":[P=>t(o).cardanoKeys[d].signingKey=P,P=>Y(d)],placeholder:"Signing key: .skey contents, its cborHex, 64 hex chars, or ed25519_sk1…",autocomplete:"off",spellcheck:"false",type:"password",class:"font-mono text-xs","aria-invalid":!!t(f)[`nodeCardanoKeys.${d}.signingKey`]},null,8,["modelValue","onUpdate:modelValue","aria-invalid"]),a(b,{modelValue:t(o).cardanoKeys[d].verificationKey,"onUpdate:modelValue":[P=>t(o).cardanoKeys[d].verificationKey=P,P=>Y(d)],placeholder:"Verification key (optional — checked against the signing key)",autocomplete:"off",spellcheck:"false",class:"mt-2 font-mono text-xs"},null,8,["modelValue","onUpdate:modelValue"]),s("div",Ft,[a(C,{type:"button",variant:"outline",size:"sm",disabled:!t(o).cardanoKeys[d].signingKey.trim()||t(x)[d]?.state==="busy",onClick:P=>re(d)},{default:m(()=>[t(x)[d]?.state==="busy"?(n(),w(t(Z),{key:0,class:"size-4 animate-spin"})):y("",!0),e[50]||(e[50]=r(" Verify key ",-1))]),_:2},1032,["disabled","onClick"]),e[51]||(e[51]=s("span",{class:"text-xs text-muted-foreground"}," Shows the address this key produces, and its balance when the chain is reachable. ",-1))]),t(x)[d]?.state==="ok"?(n(),l("div",Tt,[s("p",Et," Valid key"+p(t(x)[d].result.verificationKeyMatches?" — and the pair matches":""),1),a(ve,{value:t(x)[d].result.address,truncate:24,label:"address"},null,8,["value"]),t(x)[d].result.balance?(n(),l("p",Jt,[e[52]||(e[52]=r(" Balance ",-1)),s("b",Rt,p(D(t(x)[d].result.balance.lovelace)),1),r(" across "+p(t(x)[d].result.balance.utxoCount)+" UTxO(s) ",1),t(x)[d].result.balance.lovelace==="0"?(n(),l("span",Ht," — this address holds nothing yet, so fund it before starting. ")):y("",!0)])):(n(),l("p",Dt,p(t(x)[d].result.balanceUnavailable),1))])):t(x)[d]?.state==="error"?(n(),l("p",Gt,p(t(x)[d].message),1)):y("",!0),t(f)[`nodeCardanoKeys.${d}.signingKey`]?(n(),l("p",qt,p(t(f)[`nodeCardanoKeys.${d}.signingKey`]),1)):y("",!0)]))),128)),t(f).nodeCardanoKeys?(n(),l("p",Xt,p(t(f).nodeCardanoKeys),1)):y("",!0)])):y("",!0)]),t(v).hydraVersions?(n(),l("div",Zt,[a(k,{for:"hydraNodeImage"},{default:m(()=>[...e[53]||(e[53]=[r("hydra-node version",-1)])]),_:1}),a(xe,{modelValue:t(o).hydraNodeImage,"onUpdate:modelValue":e[12]||(e[12]=i=>t(o).hydraNodeImage=i),"default-image":t(v).hydraVersions.defaultImage},null,8,["modelValue","default-image"]),e[56]||(e[56]=s("p",{class:"text-xs text-muted-foreground"}," Fixed for the life of this head — versions write incompatible persistence, so switching later means resetting it. ",-1)),(n(!0),l(h,null,j(t(ie),i=>(n(),w($,{key:i.id,variant:i.severity==="blocker"?"destructive":void 0},{default:m(()=>[a(ke,null,{default:m(()=>[r(" Known issue on this version"+p(i.severity==="blocker"?"":" — minor"),1)]),_:2},1024),a(A,null,{default:m(()=>[s("p",null,p(i.impact),1),s("p",Wt,[i.fixedIn?(n(),l(h,{key:0},[e[54]||(e[54]=r(" Fixed in hydra-node ",-1)),s("b",Qt,p(i.fixedIn),1),e[55]||(e[55]=r(" — pick that instead unless you need this one. ",-1))],64)):(n(),l(h,{key:1},[r("Still open upstream.")],64)),s("a",{href:i.url,target:"_blank",rel:"noreferrer",class:"ml-1 underline underline-offset-2"}," hydra#"+p(i.id)+" ↗ ",9,Yt)])]),_:2},1024)]),_:2},1032,["variant"]))),128)),t(f).hydraNodeImage?(n(),l("p",eo,p(t(f).hydraNodeImage),1)):y("",!0)])):y("",!0),a(_),s("div",to,[e[63]||(e[63]=s("h2",{class:"text-sm font-semibold"},"Timing",-1)),s("div",oo,[t(U)?y("",!0):(n(),l(h,{key:0},[s("div",so,[a(k,{for:"cp"},{default:m(()=>[...e[57]||(e[57]=[r("Contestation period (s)",-1)])]),_:1}),a(b,{id:"cp",modelValue:t(o).contestationPeriod,"onUpdate:modelValue":e[13]||(e[13]=i=>t(o).contestationPeriod=i),modelModifiers:{number:!0},type:"number",min:"1"},null,8,["modelValue"]),e[58]||(e[58]=s("p",{class:"text-xs text-muted-foreground"}," Window to dispute a close. Every participant must use the same value or the head never initialises. ",-1))]),s("div",no,[a(k,{for:"dp"},{default:m(()=>[...e[59]||(e[59]=[r("Deposit period (s)",-1)])]),_:1}),a(b,{id:"dp",modelValue:t(o).depositPeriod,"onUpdate:modelValue":e[14]||(e[14]=i=>t(o).depositPeriod=i),modelModifiers:{number:!0},type:"number",min:"1"},null,8,["modelValue"]),e[60]||(e[60]=s("p",{class:"text-xs text-muted-foreground"}," How early a deposit must land before its deadline; the deadline itself is twice this. ",-1))])],64)),s("div",ao,[a(k,{for:"pr"},{default:m(()=>[...e[61]||(e[61]=[r("Persistence rotate after (events)",-1)])]),_:1}),a(b,{id:"pr",modelValue:t(o).persistenceRotateAfter,"onUpdate:modelValue":e[15]||(e[15]=i=>t(o).persistenceRotateAfter=i),modelModifiers:{number:!0},type:"number",min:"100"},null,8,["modelValue"]),e[62]||(e[62]=s("p",{class:"text-xs text-muted-foreground"}," Events written before the state file is rotated. Lower means smaller files and slower recovery. ",-1))])]),t(U)?(n(),l("p",ro," Contestation and deposit periods are on-chain deadlines, so an offline head has neither. ")):y("",!0)]),s("div",io,[e[67]||(e[67]=s("h2",{class:"text-sm font-semibold"},"Logging",-1)),s("label",lo,[E(s("input",{"onUpdate:modelValue":e[16]||(e[16]=i=>t(o).logging.quiet=i),type:"checkbox",class:"size-4 accent-primary"},null,512),[[J,t(o).logging.quiet]]),e[64]||(e[64]=r(" Quiet — hydra-node writes no logs at all ",-1))]),e[68]||(e[68]=s("p",{class:"text-xs text-muted-foreground"}," The log viewer stays empty while this is on, and a failed start explains itself only through its exit. ",-1)),s("div",uo,[s("div",fo,[a(k,{for:"logSize"},{default:m(()=>[...e[65]||(e[65]=[r("Max log size (MB per file)",-1)])]),_:1}),a(b,{id:"logSize",modelValue:t(o).logging.maxSizeMb,"onUpdate:modelValue":e[17]||(e[17]=i=>t(o).logging.maxSizeMb=i),modelModifiers:{number:!0},type:"number",min:"1",max:"1024",disabled:t(o).logging.quiet},null,8,["modelValue","disabled"])]),s("div",co,[a(k,{for:"logFiles"},{default:m(()=>[...e[66]||(e[66]=[r("Rotated files kept",-1)])]),_:1}),a(b,{id:"logFiles",modelValue:t(o).logging.maxFiles,"onUpdate:modelValue":e[18]||(e[18]=i=>t(o).logging.maxFiles=i),modelModifiers:{number:!0},type:"number",min:"1",max:"50",disabled:t(o).logging.quiet},null,8,["modelValue","disabled"])])]),e[69]||(e[69]=s("p",{class:"text-xs text-muted-foreground"}," Docker's json-file driver is unbounded by default, so a head left running writes until the disk is full. ",-1))]),a(_),s("div",null,[a(C,{type:"button",variant:"ghost",size:"sm",class:"-ml-3","aria-expanded":t(I),onClick:le},{default:m(()=>[t(I)?(n(),w(t(tt),{key:0,class:"size-4"})):(n(),w(t(ot),{key:1,class:"size-4"})),e[70]||(e[70]=r(" Protocol parameters ",-1))]),_:1},8,["aria-expanded"]),e[80]||(e[80]=s("p",{class:"mt-1 text-xs text-muted-foreground"}," The ledger rules inside the head — transaction size, execution budgets, fees. Untouched, the head boots with whatever the chain reports. ",-1)),t(I)?(n(),l("div",mo,[t(c).loading?(n(),l("p",po,[a(t(Z),{class:"size-4 animate-spin"}),e[71]||(e[71]=r(" Reading the current parameters… ",-1))])):t(c).error?(n(),w($,{key:1,variant:"destructive"},{default:m(()=>[a(A,null,{default:m(()=>[r(p(t(c).error)+" ",1),a(C,{type:"button",variant:"outline",size:"sm",class:"mt-2",onClick:e[19]||(e[19]=i=>te(!0))},{default:m(()=>[...e[72]||(e[72]=[r(" Try again ",-1)])]),_:1})]),_:1})]),_:1})):t(c).edited?(n(),l(h,{key:2},[s("p",yo,[t(c).source==="blockfrost"?(n(),l(h,{key:0},[r(" Live values from Blockfrost, with the Hydra L2 defaults applied. ")],64)):(n(),l(h,{key:1},[r(p(t(c).note),1)],64))]),(n(!0),l(h,null,j(t(de),i=>(n(),l("div",{key:i.group,class:"space-y-3"},[s("h3",go,p(i.label),1),s("div",ho,[(n(!0),l(h,null,j(i.fields,d=>(n(),l("div",{key:d.path,class:"space-y-1.5"},[s("div",vo,[a(k,{for:`pp-${d.path}`,class:"text-xs"},{default:m(()=>[r(p(d.label),1)]),_:2},1032,["for"]),oe(d.path)?(n(),w(C,{key:0,type:"button",variant:"ghost",size:"sm",class:"h-6 px-1.5 text-xs",onClick:P=>ce(d.path)},{default:m(()=>[a(t(st),{class:"size-3"}),e[73]||(e[73]=r(" reset ",-1))]),_:1},8,["onClick"])):y("",!0)]),a(b,{id:`pp-${d.path}`,type:"number",step:d.kind==="decimal"?"any":"1","model-value":ue(d.path),class:Ee(oe(d.path)?"border-primary":""),"onUpdate:modelValue":P=>fe(d.path,String(P??""),d.kind)},null,8,["id","step","model-value","class","onUpdate:modelValue"]),s("p",xo,p(d.hint),1)]))),128))])]))),128)),s("div",ko,[a(k,{for:"ppExtra"},{default:m(()=>[...e[74]||(e[74]=[r(" Other parameters ",-1),s("span",{class:"font-normal text-muted-foreground"},"optional JSON",-1)])]),_:1}),a(X,{id:"ppExtra",modelValue:t(c).extraJson,"onUpdate:modelValue":e[20]||(e[20]=i=>t(c).extraJson=i),rows:"3",spellcheck:"false",class:"font-mono text-xs",placeholder:'{ "costModels": { "PlutusV3": [ … ] } }',"aria-invalid":!!t(f).protocolParameters},null,8,["modelValue","aria-invalid"]),e[75]||(e[75]=s("p",{class:"text-xs text-muted-foreground"}," Merged last, over the fields above. Whole top-level keys only — a partial nested object replaces its key and drops the rest of it. ",-1)),t(f).protocolParameters?(n(),l("p",bo,p(t(f).protocolParameters),1)):y("",!0)]),s("div",_o,[s("span",null,[Object.keys(t(L)).length?(n(),l(h,{key:0},[e[76]||(e[76]=r(" Pinning ",-1)),s("b",Co,p(Object.keys(t(L)).length),1),e[77]||(e[77]=r(" parameter(s): ",-1)),s("code",Vo,p(Object.keys(t(L)).join(", ")),1),e[78]||(e[78]=r(". A pinned value stays fixed even when the chain changes it. ",-1))],64)):(n(),l(h,{key:1},[r(" Nothing pinned — the head follows the chain's parameters. ")],64))]),Object.keys(t(L)).length||t(c).extraJson?(n(),w(C,{key:0,type:"button",variant:"outline",size:"sm",onClick:me},{default:m(()=>[...e[79]||(e[79]=[r(" Reset all ",-1)])]),_:1})):y("",!0)])],64)):y("",!0)])):y("",!0)]),t(O)?(n(),w($,{key:3,variant:"destructive"},{default:m(()=>[a(A,null,{default:m(()=>[r(p(t(O)),1)]),_:1})]),_:1})):y("",!0),s("div",Uo,[a(C,{variant:"outline",type:"button","as-child":""},{default:m(()=>[a(g,{to:"/heads"},{default:m(()=>[...e[81]||(e[81]=[r("Cancel",-1)])]),_:1})]),_:1}),a(C,{type:"submit",disabled:t(B)},{default:m(()=>[t(B)?(n(),w(t(Z),{key:0,class:"size-4 animate-spin"})):y("",!0),e[82]||(e[82]=r(" Create head ",-1))]),_:1},8,["disabled"])])],32)]),_:1})]),_:1})])}}});export{Ro as default};
@@ -1 +0,0 @@
1
- import{a9 as s}from"./CgPLsCeU.js";const t=s("/logo.svg");export{t as _};
@@ -1 +0,0 @@
1
- import{Y as n,D as e,aw as d}from"./CgPLsCeU.js";const l=n("heads",{state:()=>({heads:[],health:null,hydraVersions:null,systemConfig:null,loading:!1,busy:new Set,loaded:!1}),getters:{dockerOk:s=>s.health?.docker.ok??!0,cardanoNodeAvailable:s=>s.systemConfig?.cardanoNode.available??!0,blockfrostKeyConfigured:s=>s.systemConfig?.blockfrost.configured??!0,byId:s=>t=>s.heads.find(a=>a.id===t),isBusy:s=>t=>s.busy.has(t)},actions:{async fetchHealth(){const s=e();this.health=await s.get("/health",{auth:!1})},async fetchHydraVersions(){if(this.hydraVersions)return;const s=e();this.hydraVersions=await s.get("/api/hydra/versions")},async fetchSystemConfig(){const s=e();this.systemConfig=await s.get("/api/system/config")},async fetchHeads(){const s=e();this.heads=await s.get("/api/heads"),this.loaded=!0},async load(){this.loading=!this.loaded;try{await Promise.all([this.fetchHeads(),this.fetchHealth()])}finally{this.loading=!1}},async create(s){const a=await e().post("/api/heads",s);return this.heads.unshift(a),a},async runAction(s,t){const a=e();this.busy.add(s);const i=this.byId(s),o=i?.status;i&&t!=="stop"&&(i.status="STARTING");try{const h=await a.post(`/api/heads/${s}/${t}`,void 0,{timeoutMs:t==="stop"?6e4:d});this.replace(h)}catch(h){throw i&&o&&(i.status=o),h}finally{this.busy.delete(s),await this.fetchHeads().catch(()=>{})}},async reset(s,t){const a=e();this.busy.add(s);try{this.replace(await a.post(`/api/heads/${s}/reset`,{includeKeys:t}))}finally{this.busy.delete(s)}},async remove(s){const t=e();this.busy.add(s);try{await t.del(`/api/heads/${s}`),this.heads=this.heads.filter(a=>a.id!==s)}finally{this.busy.delete(s)}},async liveStatus(s){return e().get(`/api/heads/${s}/status`)},replace(s){const t=this.heads.findIndex(a=>a.id===s.id);t>=0?this.heads[t]=s:this.heads.unshift(s)}}});export{l as u};
@@ -1 +0,0 @@
1
- function g(e,t){if(e.chainBackend==="offline")return{known:!0,allFunded:!0,unfunded:[]};if(!t||t.length===0)return{known:!1,allFunded:!1,unfunded:[]};const s=e.nodes.filter(n=>{const i=t.find(a=>a.index===n.index);return i?i.lovelace!==null&&BigInt(i.lovelace)===0n:!1}).map(n=>n.name);return{known:!0,allFunded:s.length===0,unfunded:s}}function I(e,t){const n=t.known?t.allFunded:e.status==="RUNNING",i=e.status==="RUNNING",a=e.hydraState==="OPEN",o=[!0,n,i,a],r=["Created","Fund","Start","Open"],c=["created","fund","start","open"],f=o.findIndex(l=>!l);return c.map((l,u)=>{let d;return o[u]?d="done":u===f?d=e.status==="FAILED"?"failed":"active":d="pending",{key:l,label:r[u],state:d}})}function N(e){return e.nodes.filter(t=>t.status==="RUNNING").length}function b(e,t,s){if(e.status==="RUNNING"){const n=N(e);if(n<e.nodeCount)return{tone:"warning",title:`Degraded — ${n}/${e.nodeCount} node(s) running`,detail:n===0?"No node of this head is up. Restart it, or check the container logs.":"The head cannot reach consensus while a party is missing. Open it for details."}}return p(e,t,s)}function p(e,t,s){return e.status==="FAILED"?{tone:"error",title:"Boot failed — all containers rolled back",detail:e.lastError??"No further detail was recorded."}:e.status==="STARTING"?{tone:"neutral",title:`Booting ${e.nodeCount} node${e.nodeCount>1?"s":""}`,detail:"Waiting for every node to answer on its API port. This can take a few minutes."}:e.status==="CONFIGURED"||e.status==="STOPPED"?t.known&&!t.allFunded?{tone:"warning",title:"Fund these addresses to continue",detail:"Each node needs test ADA to commit. Keys were generated for you — nothing to install."}:t.known?{tone:"neutral",title:e.status==="STOPPED"?"Stopped":"Ready to start",detail:e.chainBackend==="offline"?"Offline head — it opens with the UTxO set written at start, with nothing to fund.":"Keys and persistence are intact."}:{tone:"warning",title:"Fund each node before starting",detail:"Balances cannot be verified from here yet, so check each address has test ADA before you start the head."}:{OPEN:{tone:"success",title:"Head is open",detail:s===void 0?`All ${e.nodeCount} node(s) connected.`:`All ${e.nodeCount} node(s) connected · ${s} UTxOs in the L2 snapshot.`},INITIALIZING:{tone:"warning",title:"Waiting for all parties to commit",detail:"The head is initialising. Every participant must commit before it opens."},IDLE:{tone:"neutral",title:"Nodes are up",detail:"The head has not been initialised yet."},CLOSED:{tone:"warning",title:"Head closed",detail:"The contestation period is running. Fanout becomes possible once it ends."},FANOUT_POSSIBLE:{tone:"warning",title:"Fanout available",detail:"The head is closed and funds can be distributed back to L1."},FINAL:{tone:"neutral",title:"Head finalised",detail:"Funds have been returned to L1."},UNKNOWN:{tone:"neutral",title:"Nodes are up",detail:"Hydra state could not be determined — nodes may disagree."}}[e.hydraState]}function h(e){return e==="CONFIGURED"||e==="FAILED"}function y(e,t,s=!0){const n=e.status==="STARTING",i=e.status==="RUNNING";let a;s?t.known&&!t.allFunded&&(a=`${t.unfunded[0]} has no funds yet.`):a="Docker is unreachable — the control-plane cannot create containers.";const o=h(e.status);let r;return o||(r=e.status==="RUNNING"||e.status==="STARTING"?"Stop the head before changing its settings.":"This head has already run. Reset it to wipe persistence, then edit."),{canStart:!n&&!i&&!a,canStop:!n&&i,canRestart:!n&&i&&s,canReset:!n&&!i,canEdit:o,editBlockedReason:r,canDelete:!0,startBlockedReason:a}}function w(e){return e==="STARTING"?2e3:1e4}function R(e,t){switch(e){case"delete":return{title:"Delete this head?",confirmLabel:"Delete head",requireText:t};case"resetKeys":return{title:"Reset and regenerate keys?",confirmLabel:"Reset everything",requireText:t};case"reset":return{title:"Reset persistence?",confirmLabel:"Reset"}}}export{b as a,y as b,g as c,I as d,h as e,R as f,w as p};
@@ -1 +0,0 @@
1
- import{i as G}from"./CnOqDT9k.js";import{t as J,l as Q,i as I,m as B,n as ee,h as q,o as te,u as ne,P as oe,S as P}from"./CS3KqpH_.js";import{y as k,r as b,B as T,Z as re,M as N,R as se,e as x,G as R,o as ae,j as ue,w as ie,z as ce,h as le,p as de,$ as z,a0 as fe,a1 as A,a2 as ve}from"./CgPLsCeU.js";function g(){let e=document.activeElement;if(e==null)return null;for(;e!=null&&e.shadowRoot!=null&&e.shadowRoot.activeElement!=null;)e=e.shadowRoot.activeElement;return e}const pe=Q(()=>{const e=b(new Map),t=b(),n=k(()=>{for(const m of e.value.values())if(m)return!0;return!1}),r=G({scrollBody:b(!0)});let u=null;const h=()=>{document.body.style.paddingRight="",document.body.style.marginRight="",document.body.style.pointerEvents="",document.documentElement.style.removeProperty("--scrollbar-width"),document.body.style.overflow=t.value??"",B&&u?.(),t.value=void 0};return T(n,(m,p)=>{if(!I)return;if(!m){p&&h();return}t.value===void 0&&(t.value=document.body.style.overflow);const f=window.innerWidth-document.documentElement.clientWidth,y={padding:f,margin:0},l=r.scrollBody?.value?typeof r.scrollBody.value=="object"?re({padding:r.scrollBody.value.padding===!0?f:r.scrollBody.value.padding,margin:r.scrollBody.value.margin===!0?f:r.scrollBody.value.margin},y):y:{padding:0,margin:0};f>0&&(document.body.style.paddingRight=typeof l.padding=="number"?`${l.padding}px`:String(l.padding),document.body.style.marginRight=typeof l.margin=="number"?`${l.margin}px`:String(l.margin),document.documentElement.style.setProperty("--scrollbar-width",`${f}px`),document.body.style.overflow="hidden"),B&&(u=ee(document,"touchmove",o=>me(o),{passive:!1})),N(()=>{n.value&&(document.body.style.pointerEvents="none",document.body.style.overflow="hidden")})},{immediate:!0,flush:"sync"}),e});function We(e){const t=Math.random().toString(36).substring(2,7),n=pe();n.value.set(t,e??!1);const r=k({get:()=>n.value.get(t)??!1,set:u=>n.value.set(t,u)});return J(()=>{n.value.delete(t)}),r}function V(e){const t=window.getComputedStyle(e);if(t.overflowX==="scroll"||t.overflowY==="scroll"||t.overflowX==="auto"&&e.clientWidth<e.scrollWidth||t.overflowY==="auto"&&e.clientHeight<e.scrollHeight)return!0;{const n=e.parentNode;return!(n instanceof Element)||n.tagName==="BODY"?!1:V(n)}}function me(e){const t=e||window.event,n=t.target;return n instanceof Element&&V(n)?!1:t.touches.length>1?!0:(t.preventDefault&&t.cancelable&&t.preventDefault(),!1)}var he=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},S=new WeakMap,F=new WeakMap,M={},O=0,Y=function(e){return e&&(e.host||Y(e.parentNode))},ye=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=Y(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},Ee=function(e,t,n,r){var u=ye(t,Array.isArray(e)?e:[e]);M[n]||(M[n]=new WeakMap);var h=M[n],m=[],p=new Set,f=new Set(u),y=function(o){!o||p.has(o)||(p.add(o),y(o.parentNode))};u.forEach(y);var l=function(o){!o||f.has(o)||Array.prototype.forEach.call(o.children,function(s){if(p.has(s))l(s);else try{var a=s.getAttribute(r),i=a!==null&&a!=="false",d=(S.get(s)||0)+1,c=(h.get(s)||0)+1;S.set(s,d),h.set(s,c),m.push(s),d===1&&i&&F.set(s,!0),c===1&&s.setAttribute(n,"true"),i||s.setAttribute(r,"true")}catch(v){console.error("aria-hidden: cannot operate on ",s,v)}})};return l(t),p.clear(),O++,function(){m.forEach(function(o){var s=S.get(o)-1,a=h.get(o)-1;S.set(o,s),h.set(o,a),s||(F.has(o)||o.removeAttribute(r),F.delete(o)),a||o.removeAttribute(n)}),O--,O||(S=new WeakMap,S=new WeakMap,F=new WeakMap,M={})}},ge=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),u=he(e);return u?(r.push.apply(r,Array.from(u.querySelectorAll("[aria-live], script"))),Ee(r,u,n,"aria-hidden")):function(){return null}};function Ue(e){let t;T(()=>q(e),n=>{let r=!1;try{r=!!n?.closest("[popover]:not(:popover-open)")}catch{}n&&!r?t=ge(n):t&&t()}),se(()=>{t&&t()})}function W(){const e=b(),t=k(()=>["#text","#comment"].includes(e.value?.$el.nodeName)?e.value?.$el.nextElementSibling:q(e));return{primitiveElement:e,currentElement:t}}const we=te(()=>b([]));function be(){const e=we();return{add(t){const n=e.value[0];t!==n&&n?.pause(),e.value=U(e.value,t),e.value.unshift(t)},remove(t){e.value=U(e.value,t),e.value[0]?.resume()}}}function U(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}const _="focusScope.autoFocusOnMount",L="focusScope.autoFocusOnUnmount",$={bubbles:!1,cancelable:!0};function Se(e,{select:t=!1}={}){const n=g();for(const r of e)if(w(r,{select:t}),g()!==n)return!0}function Ce(e){const t=X(e),n=D(t,e),r=D(t.reverse(),e);return[n,r]}function X(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const u=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||u?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function D(e,t){for(const n of e)if(!ke(n,{upTo:t}))return n}function ke(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function Ae(e){return e instanceof HTMLInputElement&&"select"in e}function w(e,{select:t=!1}={}){if(e&&e.focus){const n=g();e.focus({preventScroll:!0}),e!==n&&Ae(e)&&t&&e.select()}}var Fe=x({__name:"FocusScope",props:{loop:{type:Boolean,required:!1,default:!1},trapped:{type:Boolean,required:!1,default:!1},present:{type:Boolean,required:!1,default:!0},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:["mountAutoFocus","unmountAutoFocus"],setup(e,{emit:t}){const n=e,r=t,{currentRef:u,currentElement:h}=ne(),m=b(null),p=be(),f=de({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}});R(o=>{if(!I)return;const s=h.value;if(!n.trapped)return;function a(v){if(f.paused||!s)return;const E=v.target;s.contains(E)?m.value=E:w(m.value,{select:!0})}function i(v){if(f.paused||!s)return;const E=v.relatedTarget;E!==null&&(s.contains(E)||w(m.value,{select:!0}))}function d(v){const E=m.value;if(E===null||!v.some(Z=>Z.removedNodes.length>0))return;s.contains(E)||w(s)}document.addEventListener("focusin",a),document.addEventListener("focusout",i);const c=new MutationObserver(d);s&&c.observe(s,{childList:!0,subtree:!0}),o(()=>{document.removeEventListener("focusin",a),document.removeEventListener("focusout",i),c.disconnect()})});function y(o,s){const a=new CustomEvent(_,$),i=d=>r("mountAutoFocus",d);o.addEventListener(_,i),o.dispatchEvent(a),o.removeEventListener(_,i),a.defaultPrevented||(Se(X(o),{select:!0}),g()===s&&w(o))}R(async o=>{const s=h.value;if(await N(),!s)return;n.present!==!1&&p.add(f);const a=g();!s.contains(a)&&n.present!==!1&&y(s,a),o(()=>{const d=new CustomEvent(L,$),c=v=>{r("unmountAutoFocus",v)};s.addEventListener(L,c),s.dispatchEvent(d),s.setAttribute("data-focus-scope-unmounting",""),setTimeout(()=>{d.defaultPrevented||w(a??document.body,{select:!0}),s.removeEventListener(L,c),p.remove(f),s.removeAttribute("data-focus-scope-unmounting")},0)})}),T(()=>n.present,async(o,s)=>{if(!I)return;if(o===!1&&s===!0){p.remove(f);return}if(o!==!0||s!==!1)return;p.add(f),await N();const a=h.value;if(!a)return;const i=g();a.contains(i)||y(a,i)});function l(o){if(!n.loop&&!n.trapped||f.paused)return;const s=o.key==="Tab"&&!o.altKey&&!o.ctrlKey&&!o.metaKey,a=g();if(s&&a){const i=o.currentTarget,[d,c]=Ce(i);d&&c?!o.shiftKey&&a===c?(o.preventDefault(),n.loop&&w(d,{select:!0})):o.shiftKey&&a===d&&(o.preventDefault(),n.loop&&w(c,{select:!0})):a===i&&o.preventDefault()}}return(o,s)=>(ae(),ue(le(oe),{ref_key:"currentRef",ref:u,tabindex:"-1","as-child":o.asChild,as:o.as,onKeydown:l},{default:ie(()=>[ce(o.$slots,"default")]),_:3},8,["as-child","as"]))}}),$e=Fe;function De(e){return e?"open":"closed"}function Ke(e){const t=g();for(const n of e)if(n===t||(n.focus(),g()!==t))return}const K="data-reka-collection-item";function He(e={}){const{key:t="",isProvider:n=!1}=e,r=`${t}CollectionProvider`;let u;if(n){const l=b(new Map);u={collectionRef:b(),itemMap:l},ve(r,u)}else u=z(r);const h=(l=!1)=>{const o=u.collectionRef.value;if(!o)return[];const s=Array.from(o.querySelectorAll(`[${K}]`)),a=new Map(s.map((c,v)=>[c,v])),d=Array.from(u.itemMap.value.values()).sort((c,v)=>(a.get(c.ref)??-1)-(a.get(v.ref)??-1));return l?d:d.filter(c=>c.ref.dataset.disabled!=="")},m=x({name:"CollectionSlot",inheritAttrs:!1,setup(l,{slots:o,attrs:s}){const{primitiveElement:a,currentElement:i}=W();return T(i,()=>{u.collectionRef.value=i.value}),()=>A(P,{ref:a,...s},o)}}),p=x({name:"CollectionItem",inheritAttrs:!1,props:{value:{validator:()=>!0}},setup(l,{slots:o,attrs:s}){const{primitiveElement:a,currentElement:i}=W();return R(d=>{if(i.value){const c=fe(i.value);u.itemMap.value.set(c,{ref:i.value,value:l.value}),d(()=>u.itemMap.value.delete(c))}}),()=>A(P,{...s,[K]:"",ref:a},o)}}),f=k(()=>Array.from(u.itemMap.value.values())),y=k(()=>u.itemMap.value.size);return{getItems:h,reactiveItems:f,itemMapSize:y,CollectionSlot:m,CollectionItem:p}}const H=e=>e==="";const Me=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();const j=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();const Te=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase());const Oe=e=>{const t=Te(e);return t.charAt(0).toUpperCase()+t.slice(1)};var C={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":2,"stroke-linecap":"round","stroke-linejoin":"round"};const _e=Symbol("lucide-icons");function Le(){return z(_e,{})}const Ie=({name:e,iconNode:t,"icon-node":n,absoluteStrokeWidth:r,"absolute-stroke-width":u,strokeWidth:h,"stroke-width":m,size:p,color:f,...y},{slots:l})=>{const{size:o,color:s,strokeWidth:a=2,absoluteStrokeWidth:i=!1,class:d=""}=Le(),c=k(()=>{const v=H(r)||H(u)||r===!0||u===!0||i===!0,E=h||m||a||C["stroke-width"];return v?Number(E)*24/Number(p??o??C.width):E});return A("svg",{...C,...y,width:p??o??C.width,height:p??o??C.height,stroke:f??s??C.stroke,"stroke-width":c.value,class:Me("lucide",d,...e?[`lucide-${j(Oe(e))}-icon`,`lucide-${j(e)}`]:["lucide-icon"])},[...(t??n??[]).map(v=>A(...v)),...l.default?[l.default()]:[]])};const je=(e,t)=>(n,{slots:r,attrs:u})=>A(Ie,{...u,...n,iconNode:t,name:e},r.default?{default:r.default}:void 0);export{$e as F,De as a,Ue as b,je as c,We as d,Ke as f,g,He as u};
@@ -1 +0,0 @@
1
- import{a4 as a,a5 as s,a6 as r,$ as u,a7 as o}from"./CgPLsCeU.js";function i(e){const t=e||s();return t?.ssrContext?.head||t?.runWithContext(()=>{if(r())return u(o)})}function x(e,t={}){const n=i(t.nuxt);if(n)return a(e,{head:n,...t})}export{x as u};
@@ -1 +0,0 @@
1
- import{Y as b}from"./CgPLsCeU.js";var v=Object.defineProperty,y=(e,a,t)=>a in e?v(e,a,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[a]=t,s=(e,a,t)=>y(e,typeof a!="symbol"?a+"":a,t);function w(e){if(typeof document>"u")return;function a(){let t=document.head||document.getElementsByTagName("head")[0];if(!t)return;let r=document.createElement("style");r.type="text/css",t.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}document.readyState==="loading"?document.addEventListener("DOMContentLoaded",a):a()}w(":where([data-sonner-toaster][dir=ltr]),:where(html[dir=ltr]){--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}:where([data-sonner-toaster][dir=rtl]),:where(html[dir=rtl]){--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}:where([data-sonner-toaster]){position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}:where([data-sonner-toaster][data-lifted=true]){transform:translateY(-10px)}@media (hover:none) and (pointer:coarse){:where([data-sonner-toaster][data-lifted=true]){transform:none}}:where([data-sonner-toaster][data-x-position=right]){right:max(var(--offset),env(safe-area-inset-right))}:where([data-sonner-toaster][data-x-position=left]){left:max(var(--offset),env(safe-area-inset-left))}:where([data-sonner-toaster][data-x-position=center]){left:50%;transform:translateX(-50%)}:where([data-sonner-toaster][data-y-position=top]){top:max(var(--offset),env(safe-area-inset-top))}:where([data-sonner-toaster][data-y-position=bottom]){bottom:max(var(--offset),env(safe-area-inset-bottom))}:where([data-sonner-toast]){--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);filter:blur(0);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}:where([data-sonner-toast][data-styled=true]){padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}:where([data-sonner-toast]:focus-visible){box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}:where([data-sonner-toast][data-y-position=top]){top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}:where([data-sonner-toast][data-y-position=bottom]){bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}:where([data-sonner-toast]) :where([data-description]){font-weight:400;line-height:1.4;color:inherit}:where([data-sonner-toast]) :where([data-title]){font-weight:500;line-height:1.5;color:inherit}:where([data-sonner-toast]) :where([data-icon]){display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}:where([data-sonner-toast][data-promise=true]) :where([data-icon])>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}:where([data-sonner-toast]) :where([data-icon])>*{flex-shrink:0}:where([data-sonner-toast]) :where([data-icon]) svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}:where([data-sonner-toast]) :where([data-content]){display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}:where([data-sonner-toast]) :where([data-button]):focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}:where([data-sonner-toast]) :where([data-button]):first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}:where([data-sonner-toast]) :where([data-cancel]){color:var(--normal-text);background:rgba(0,0,0,.08)}:where([data-sonner-toast][data-theme=dark]) :where([data-cancel]){background:rgba(255,255,255,.3)}[data-sonner-toast] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast] [data-close-button]{background:var(--gray1)}:where([data-sonner-toast]) :where([data-close-button]):focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}:where([data-sonner-toast]) :where([data-disabled=true]){cursor:not-allowed}[data-sonner-toast]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}:where([data-sonner-toast][data-swiping=true])::before{content:'';position:absolute;left:0;right:0;height:100%;z-index:-1}:where([data-sonner-toast][data-y-position=top][data-swiping=true])::before{bottom:50%;transform:scaleY(3) translateY(50%)}:where([data-sonner-toast][data-y-position=bottom][data-swiping=true])::before{top:50%;transform:scaleY(3) translateY(-50%)}:where([data-sonner-toast][data-swiping=false][data-removed=true])::before{content:'';position:absolute;inset:0;transform:scaleY(2)}:where([data-sonner-toast])::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}:where([data-sonner-toast][data-mounted=true]){--y:translateY(0);opacity:1}:where([data-sonner-toast][data-expanded=false][data-front=false]){--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}:where([data-sonner-toast])>*{transition:opacity .4s}:where([data-sonner-toast][data-expanded=false][data-front=false][data-styled=true])>*{opacity:0}:where([data-sonner-toast][data-visible=false]){opacity:0;pointer-events:none}:where([data-sonner-toast][data-mounted=true][data-expanded=true]){--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}:where([data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]){--y:translateY(calc(var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]){--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}:where([data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]){--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}:where([data-sonner-toast][data-removed=true][data-front=false])::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation:swipe-out .2s ease-out forwards}@keyframes swipe-out{from{transform:translateY(calc(var(--lift) * var(--offset) + var(--swipe-amount)));opacity:1}to{transform:translateY(calc(var(--lift) * var(--offset) + var(--swipe-amount) + var(--lift) * -100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;--mobile-offset:16px;right:var(--mobile-offset);left:var(--mobile-offset);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset)}[data-sonner-toaster][data-y-position=bottom]{bottom:20px}[data-sonner-toaster][data-y-position=top]{top:20px}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset);right:var(--mobile-offset);transform:none}}[data-sonner-toaster][data-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 91%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 91%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 91%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-theme=dark]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 100%, 12%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 12%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");let m=0;class x{constructor(){s(this,"subscribers"),s(this,"toasts"),s(this,"subscribe",a=>(this.subscribers.push(a),()=>{const t=this.subscribers.indexOf(a);this.subscribers.splice(t,1)})),s(this,"publish",a=>{this.subscribers.forEach(t=>t(a))}),s(this,"addToast",a=>{this.publish(a),this.toasts=[...this.toasts,a]}),s(this,"create",a=>{var t;const{message:r,...g}=a,n=typeof a.id=="number"||a.id&&((t=a.id)==null?void 0:t.length)>0?a.id:m++,c=this.toasts.find(d=>d.id===n),f=a.dismissible===void 0?!0:a.dismissible;return c?this.toasts=this.toasts.map(d=>d.id===n?(this.publish({...d,...a,id:n,title:r}),{...d,...a,id:n,dismissible:f,title:r}):d):this.addToast({title:r,...g,dismissible:f,id:n}),n}),s(this,"dismiss",a=>(a||this.toasts.forEach(t=>{this.subscribers.forEach(r=>r({id:t.id,dismiss:!0}))}),this.subscribers.forEach(t=>t({id:a,dismiss:!0})),a)),s(this,"message",(a,t)=>this.create({...t,message:a,type:"default"})),s(this,"error",(a,t)=>this.create({...t,type:"error",message:a})),s(this,"success",(a,t)=>this.create({...t,type:"success",message:a})),s(this,"info",(a,t)=>this.create({...t,type:"info",message:a})),s(this,"warning",(a,t)=>this.create({...t,type:"warning",message:a})),s(this,"loading",(a,t)=>this.create({...t,type:"loading",message:a})),s(this,"promise",(a,t)=>{if(!t)return;let r;t.loading!==void 0&&(r=this.create({...t,promise:a,type:"loading",message:t.loading,description:typeof t.description!="function"?t.description:void 0}));const g=a instanceof Promise?a:a();let n=r!==void 0,c;const f=g.then(async o=>{if(c=["resolve",o],Y(o)&&!o.ok){n=!1;const l=typeof t.error=="function"?await t.error(`HTTP error! status: ${o.status}`):t.error,h=typeof t.description=="function"?await t.description(`HTTP error! status: ${o.status}`):t.description;this.create({id:r,type:"error",message:l,description:h})}else if(t.success!==void 0){n=!1;const l=typeof t.success=="function"?await t.success(o):t.success,h=typeof t.description=="function"?await t.description(o):t.description;this.create({id:r,type:"success",message:l,description:h})}}).catch(async o=>{if(c=["reject",o],t.error!==void 0){n=!1;const l=typeof t.error=="function"?await t.error(o):t.error,h=typeof t.description=="function"?await t.description(o):t.description;this.create({id:r,type:"error",message:l,description:h})}}).finally(()=>{var o;n&&(this.dismiss(r),r=void 0),(o=t.finally)==null||o.call(t)}),d=()=>new Promise((o,l)=>f.then(()=>c[0]==="reject"?l(c[1]):o(c[1])).catch(l));return typeof r!="string"&&typeof r!="number"?{unwrap:d}:Object.assign(r,{unwrap:d})}),s(this,"custom",(a,t)=>{const r=t?.id||m++;return this.publish({component:a,id:r,...t}),r}),this.subscribers=[],this.toasts=[]}}const i=new x;function k(e,a){const t=a?.id||m++;return i.create({message:e,id:t,type:"default",...a}),t}const Y=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",z=k,E=()=>i.toasts,p=Object.assign(z,{success:i.success,info:i.info,warning:i.warning,error:i.error,custom:i.custom,message:i.message,promise:i.promise,dismiss:i.dismiss,loading:i.loading},{getHistory:E}),u="hexcore.headsView",j=b("ui",{state:()=>({headsView:"cards",headsViewChosen:!1}),actions:{restore(){const e=localStorage.getItem(u);(e==="cards"||e==="table")&&(this.headsView=e,this.headsViewChosen=!0)},setHeadsView(e){this.headsView=e,this.headsViewChosen=!0,localStorage.setItem(u,e)},success(e,a){p.success(e,{description:a})},error(e,a){p.error(e,{description:a,duration:8e3})},info(e,a){p(e,{description:a})}}});export{j as u};