watchbell 1.2.2 → 1.2.3

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 (921) hide show
  1. package/bin/watchbell.mjs +5 -2
  2. package/package.json +1 -1
  3. package/server/.next/BUILD_ID +1 -1
  4. package/server/.next/build-manifest.json +105 -105
  5. package/server/.next/prerender-manifest.json +4 -4
  6. package/server/.next/server/app/(console)/(private)/ai/agents/page/build-manifest.json +3 -3
  7. package/server/.next/server/app/(console)/(private)/ai/agents/page/server-reference-manifest.json +32 -22
  8. package/server/.next/server/app/(console)/(private)/ai/agents/page.js +73 -72
  9. package/server/.next/server/app/(console)/(private)/ai/agents/page.js.nft.json +1 -1
  10. package/server/.next/server/app/(console)/(private)/ai/agents/page_client-reference-manifest.js +1 -1
  11. package/server/.next/server/app/(console)/(private)/ai/ask/page/build-manifest.json +3 -3
  12. package/server/.next/server/app/(console)/(private)/ai/ask/page/server-reference-manifest.json +30 -20
  13. package/server/.next/server/app/(console)/(private)/ai/ask/page.js +72 -71
  14. package/server/.next/server/app/(console)/(private)/ai/ask/page.js.nft.json +1 -1
  15. package/server/.next/server/app/(console)/(private)/ai/ask/page_client-reference-manifest.js +1 -1
  16. package/server/.next/server/app/(console)/(private)/ai/connect/page/build-manifest.json +3 -3
  17. package/server/.next/server/app/(console)/(private)/ai/connect/page/server-reference-manifest.json +28 -18
  18. package/server/.next/server/app/(console)/(private)/ai/connect/page.js +72 -71
  19. package/server/.next/server/app/(console)/(private)/ai/connect/page.js.nft.json +1 -1
  20. package/server/.next/server/app/(console)/(private)/ai/connect/page_client-reference-manifest.js +1 -1
  21. package/server/.next/server/app/(console)/(private)/ai/keys/page/build-manifest.json +3 -3
  22. package/server/.next/server/app/(console)/(private)/ai/keys/page/server-reference-manifest.json +34 -24
  23. package/server/.next/server/app/(console)/(private)/ai/keys/page.js +72 -71
  24. package/server/.next/server/app/(console)/(private)/ai/keys/page.js.nft.json +1 -1
  25. package/server/.next/server/app/(console)/(private)/ai/keys/page_client-reference-manifest.js +1 -1
  26. package/server/.next/server/app/(console)/(private)/ai/logs/page/build-manifest.json +3 -3
  27. package/server/.next/server/app/(console)/(private)/ai/logs/page/server-reference-manifest.json +30 -20
  28. package/server/.next/server/app/(console)/(private)/ai/logs/page.js +72 -71
  29. package/server/.next/server/app/(console)/(private)/ai/logs/page.js.nft.json +1 -1
  30. package/server/.next/server/app/(console)/(private)/ai/logs/page_client-reference-manifest.js +1 -1
  31. package/server/.next/server/app/(console)/(private)/ai/models/page/build-manifest.json +3 -3
  32. package/server/.next/server/app/(console)/(private)/ai/models/page/server-reference-manifest.json +48 -38
  33. package/server/.next/server/app/(console)/(private)/ai/models/page.js +72 -71
  34. package/server/.next/server/app/(console)/(private)/ai/models/page.js.nft.json +1 -1
  35. package/server/.next/server/app/(console)/(private)/ai/models/page_client-reference-manifest.js +1 -1
  36. package/server/.next/server/app/(console)/(private)/ai/page/build-manifest.json +3 -3
  37. package/server/.next/server/app/(console)/(private)/ai/page/server-reference-manifest.json +28 -18
  38. package/server/.next/server/app/(console)/(private)/ai/page.js +72 -71
  39. package/server/.next/server/app/(console)/(private)/ai/page.js.nft.json +1 -1
  40. package/server/.next/server/app/(console)/(private)/ai/page_client-reference-manifest.js +1 -1
  41. package/server/.next/server/app/(console)/(private)/ai/playground/page/build-manifest.json +3 -3
  42. package/server/.next/server/app/(console)/(private)/ai/playground/page/server-reference-manifest.json +34 -24
  43. package/server/.next/server/app/(console)/(private)/ai/playground/page.js +72 -71
  44. package/server/.next/server/app/(console)/(private)/ai/playground/page.js.nft.json +1 -1
  45. package/server/.next/server/app/(console)/(private)/ai/playground/page_client-reference-manifest.js +1 -1
  46. package/server/.next/server/app/(console)/(private)/ai/providers/page/build-manifest.json +3 -3
  47. package/server/.next/server/app/(console)/(private)/ai/providers/page/server-reference-manifest.json +40 -30
  48. package/server/.next/server/app/(console)/(private)/ai/providers/page.js +73 -72
  49. package/server/.next/server/app/(console)/(private)/ai/providers/page.js.nft.json +1 -1
  50. package/server/.next/server/app/(console)/(private)/ai/providers/page_client-reference-manifest.js +1 -1
  51. package/server/.next/server/app/(console)/(private)/ai/quota/page/build-manifest.json +3 -3
  52. package/server/.next/server/app/(console)/(private)/ai/quota/page/server-reference-manifest.json +30 -20
  53. package/server/.next/server/app/(console)/(private)/ai/quota/page.js +74 -73
  54. package/server/.next/server/app/(console)/(private)/ai/quota/page.js.nft.json +1 -1
  55. package/server/.next/server/app/(console)/(private)/ai/quota/page_client-reference-manifest.js +1 -1
  56. package/server/.next/server/app/(console)/(private)/ai/usage/page/build-manifest.json +3 -3
  57. package/server/.next/server/app/(console)/(private)/ai/usage/page/server-reference-manifest.json +30 -20
  58. package/server/.next/server/app/(console)/(private)/ai/usage/page.js +76 -74
  59. package/server/.next/server/app/(console)/(private)/ai/usage/page.js.nft.json +1 -1
  60. package/server/.next/server/app/(console)/(private)/ai/usage/page_client-reference-manifest.js +1 -1
  61. package/server/.next/server/app/(console)/(private)/api-docs/[[...op]]/page/build-manifest.json +3 -3
  62. package/server/.next/server/app/(console)/(private)/api-docs/[[...op]]/page/server-reference-manifest.json +28 -18
  63. package/server/.next/server/app/(console)/(private)/api-docs/[[...op]]/page.js +72 -71
  64. package/server/.next/server/app/(console)/(private)/api-docs/[[...op]]/page.js.nft.json +1 -1
  65. package/server/.next/server/app/(console)/(private)/api-docs/[[...op]]/page_client-reference-manifest.js +1 -1
  66. package/server/.next/server/app/(console)/(private)/auto-actions/page/build-manifest.json +3 -3
  67. package/server/.next/server/app/(console)/(private)/auto-actions/page/server-reference-manifest.json +30 -20
  68. package/server/.next/server/app/(console)/(private)/auto-actions/page.js +72 -71
  69. package/server/.next/server/app/(console)/(private)/auto-actions/page.js.nft.json +1 -1
  70. package/server/.next/server/app/(console)/(private)/auto-actions/page_client-reference-manifest.js +1 -1
  71. package/server/.next/server/app/(console)/alerts/page/build-manifest.json +3 -3
  72. package/server/.next/server/app/(console)/alerts/page/server-reference-manifest.json +74 -44
  73. package/server/.next/server/app/(console)/alerts/page.js +75 -73
  74. package/server/.next/server/app/(console)/alerts/page.js.nft.json +1 -1
  75. package/server/.next/server/app/(console)/alerts/page_client-reference-manifest.js +1 -1
  76. package/server/.next/server/app/(console)/apps/[id]/page/build-manifest.json +3 -3
  77. package/server/.next/server/app/(console)/apps/[id]/page/server-reference-manifest.json +62 -52
  78. package/server/.next/server/app/(console)/apps/[id]/page.js +78 -77
  79. package/server/.next/server/app/(console)/apps/[id]/page.js.nft.json +1 -1
  80. package/server/.next/server/app/(console)/apps/[id]/page_client-reference-manifest.js +1 -1
  81. package/server/.next/server/app/(console)/apps/page/build-manifest.json +3 -3
  82. package/server/.next/server/app/(console)/apps/page/server-reference-manifest.json +34 -24
  83. package/server/.next/server/app/(console)/apps/page.js +74 -73
  84. package/server/.next/server/app/(console)/apps/page.js.nft.json +1 -1
  85. package/server/.next/server/app/(console)/apps/page_client-reference-manifest.js +1 -1
  86. package/server/.next/server/app/(console)/backups/page/build-manifest.json +3 -3
  87. package/server/.next/server/app/(console)/backups/page/server-reference-manifest.json +34 -24
  88. package/server/.next/server/app/(console)/backups/page.js +75 -74
  89. package/server/.next/server/app/(console)/backups/page.js.nft.json +1 -1
  90. package/server/.next/server/app/(console)/backups/page_client-reference-manifest.js +1 -1
  91. package/server/.next/server/app/(console)/catalog/page/build-manifest.json +3 -3
  92. package/server/.next/server/app/(console)/catalog/page/server-reference-manifest.json +28 -18
  93. package/server/.next/server/app/(console)/catalog/page.js +73 -72
  94. package/server/.next/server/app/(console)/catalog/page.js.nft.json +1 -1
  95. package/server/.next/server/app/(console)/catalog/page_client-reference-manifest.js +1 -1
  96. package/server/.next/server/app/(console)/connections/page/build-manifest.json +3 -3
  97. package/server/.next/server/app/(console)/connections/page/server-reference-manifest.json +50 -40
  98. package/server/.next/server/app/(console)/connections/page.js +76 -75
  99. package/server/.next/server/app/(console)/connections/page.js.nft.json +1 -1
  100. package/server/.next/server/app/(console)/connections/page_client-reference-manifest.js +1 -1
  101. package/server/.next/server/app/(console)/d1/page/build-manifest.json +3 -3
  102. package/server/.next/server/app/(console)/d1/page/server-reference-manifest.json +28 -18
  103. package/server/.next/server/app/(console)/d1/page.js +74 -73
  104. package/server/.next/server/app/(console)/d1/page.js.nft.json +1 -1
  105. package/server/.next/server/app/(console)/d1/page_client-reference-manifest.js +1 -1
  106. package/server/.next/server/app/(console)/deployments/page/build-manifest.json +3 -3
  107. package/server/.next/server/app/(console)/deployments/page/server-reference-manifest.json +40 -30
  108. package/server/.next/server/app/(console)/deployments/page.js +74 -73
  109. package/server/.next/server/app/(console)/deployments/page.js.nft.json +1 -1
  110. package/server/.next/server/app/(console)/deployments/page_client-reference-manifest.js +1 -1
  111. package/server/.next/server/app/(console)/dns/page/build-manifest.json +3 -3
  112. package/server/.next/server/app/(console)/dns/page/server-reference-manifest.json +42 -32
  113. package/server/.next/server/app/(console)/dns/page.js +77 -76
  114. package/server/.next/server/app/(console)/dns/page.js.nft.json +1 -1
  115. package/server/.next/server/app/(console)/dns/page_client-reference-manifest.js +1 -1
  116. package/server/.next/server/app/(console)/domains/page/build-manifest.json +3 -3
  117. package/server/.next/server/app/(console)/domains/page/server-reference-manifest.json +32 -22
  118. package/server/.next/server/app/(console)/domains/page.js +76 -75
  119. package/server/.next/server/app/(console)/domains/page.js.nft.json +1 -1
  120. package/server/.next/server/app/(console)/domains/page_client-reference-manifest.js +1 -1
  121. package/server/.next/server/app/(console)/events/page/build-manifest.json +3 -3
  122. package/server/.next/server/app/(console)/events/page/server-reference-manifest.json +28 -18
  123. package/server/.next/server/app/(console)/events/page.js +73 -72
  124. package/server/.next/server/app/(console)/events/page.js.nft.json +1 -1
  125. package/server/.next/server/app/(console)/events/page_client-reference-manifest.js +1 -1
  126. package/server/.next/server/app/(console)/firebase/page/build-manifest.json +3 -3
  127. package/server/.next/server/app/(console)/firebase/page/server-reference-manifest.json +42 -32
  128. package/server/.next/server/app/(console)/firebase/page.js +75 -74
  129. package/server/.next/server/app/(console)/firebase/page.js.nft.json +1 -1
  130. package/server/.next/server/app/(console)/firebase/page_client-reference-manifest.js +1 -1
  131. package/server/.next/server/app/(console)/logs/page/build-manifest.json +3 -3
  132. package/server/.next/server/app/(console)/logs/page/server-reference-manifest.json +30 -20
  133. package/server/.next/server/app/(console)/logs/page.js +72 -71
  134. package/server/.next/server/app/(console)/logs/page.js.nft.json +1 -1
  135. package/server/.next/server/app/(console)/logs/page_client-reference-manifest.js +1 -1
  136. package/server/.next/server/app/(console)/manage/sections/page/build-manifest.json +3 -3
  137. package/server/.next/server/app/(console)/manage/sections/page/server-reference-manifest.json +30 -20
  138. package/server/.next/server/app/(console)/manage/sections/page.js +72 -71
  139. package/server/.next/server/app/(console)/manage/sections/page.js.nft.json +1 -1
  140. package/server/.next/server/app/(console)/manage/sections/page_client-reference-manifest.js +1 -1
  141. package/server/.next/server/app/(console)/neon/page/build-manifest.json +3 -3
  142. package/server/.next/server/app/(console)/neon/page/server-reference-manifest.json +50 -40
  143. package/server/.next/server/app/(console)/neon/page.js +77 -76
  144. package/server/.next/server/app/(console)/neon/page.js.nft.json +1 -1
  145. package/server/.next/server/app/(console)/neon/page_client-reference-manifest.js +1 -1
  146. package/server/.next/server/app/(console)/overview/page/build-manifest.json +3 -3
  147. package/server/.next/server/app/(console)/overview/page/server-reference-manifest.json +44 -34
  148. package/server/.next/server/app/(console)/overview/page.js +81 -80
  149. package/server/.next/server/app/(console)/overview/page.js.nft.json +1 -1
  150. package/server/.next/server/app/(console)/overview/page_client-reference-manifest.js +1 -1
  151. package/server/.next/server/app/(console)/repos/[id]/page/build-manifest.json +3 -3
  152. package/server/.next/server/app/(console)/repos/[id]/page/server-reference-manifest.json +30 -20
  153. package/server/.next/server/app/(console)/repos/[id]/page.js +75 -74
  154. package/server/.next/server/app/(console)/repos/[id]/page.js.nft.json +1 -1
  155. package/server/.next/server/app/(console)/repos/[id]/page_client-reference-manifest.js +1 -1
  156. package/server/.next/server/app/(console)/repos/page/build-manifest.json +3 -3
  157. package/server/.next/server/app/(console)/repos/page/server-reference-manifest.json +28 -18
  158. package/server/.next/server/app/(console)/repos/page.js +72 -71
  159. package/server/.next/server/app/(console)/repos/page.js.nft.json +1 -1
  160. package/server/.next/server/app/(console)/repos/page_client-reference-manifest.js +1 -1
  161. package/server/.next/server/app/(console)/settings/page/build-manifest.json +3 -3
  162. package/server/.next/server/app/(console)/settings/page/server-reference-manifest.json +48 -38
  163. package/server/.next/server/app/(console)/settings/page.js +73 -72
  164. package/server/.next/server/app/(console)/settings/page.js.nft.json +1 -1
  165. package/server/.next/server/app/(console)/settings/page_client-reference-manifest.js +1 -1
  166. package/server/.next/server/app/(console)/sql/page/build-manifest.json +3 -3
  167. package/server/.next/server/app/(console)/sql/page/server-reference-manifest.json +42 -32
  168. package/server/.next/server/app/(console)/sql/page.js +72 -71
  169. package/server/.next/server/app/(console)/sql/page.js.nft.json +1 -1
  170. package/server/.next/server/app/(console)/sql/page_client-reference-manifest.js +1 -1
  171. package/server/.next/server/app/(console)/status/page/build-manifest.json +3 -3
  172. package/server/.next/server/app/(console)/status/page/server-reference-manifest.json +28 -18
  173. package/server/.next/server/app/(console)/status/page.js +75 -73
  174. package/server/.next/server/app/(console)/status/page.js.nft.json +1 -1
  175. package/server/.next/server/app/(console)/status/page_client-reference-manifest.js +1 -1
  176. package/server/.next/server/app/(console)/supabase/page/build-manifest.json +3 -3
  177. package/server/.next/server/app/(console)/supabase/page/server-reference-manifest.json +66 -56
  178. package/server/.next/server/app/(console)/supabase/page.js +82 -82
  179. package/server/.next/server/app/(console)/supabase/page.js.nft.json +1 -1
  180. package/server/.next/server/app/(console)/supabase/page_client-reference-manifest.js +1 -1
  181. package/server/.next/server/app/(console)/topology/page/build-manifest.json +3 -3
  182. package/server/.next/server/app/(console)/topology/page/server-reference-manifest.json +28 -18
  183. package/server/.next/server/app/(console)/topology/page.js +74 -73
  184. package/server/.next/server/app/(console)/topology/page.js.nft.json +1 -1
  185. package/server/.next/server/app/(console)/topology/page_client-reference-manifest.js +1 -1
  186. package/server/.next/server/app/(console)/turso/page/build-manifest.json +3 -3
  187. package/server/.next/server/app/(console)/turso/page/server-reference-manifest.json +28 -18
  188. package/server/.next/server/app/(console)/turso/page.js +73 -72
  189. package/server/.next/server/app/(console)/turso/page.js.nft.json +1 -1
  190. package/server/.next/server/app/(console)/turso/page_client-reference-manifest.js +1 -1
  191. package/server/.next/server/app/(console)/upstash/page/build-manifest.json +3 -3
  192. package/server/.next/server/app/(console)/upstash/page/server-reference-manifest.json +28 -18
  193. package/server/.next/server/app/(console)/upstash/page.js +73 -72
  194. package/server/.next/server/app/(console)/upstash/page.js.nft.json +1 -1
  195. package/server/.next/server/app/(console)/upstash/page_client-reference-manifest.js +1 -1
  196. package/server/.next/server/app/(console)/uptime/page/build-manifest.json +3 -3
  197. package/server/.next/server/app/(console)/uptime/page/server-reference-manifest.json +56 -46
  198. package/server/.next/server/app/(console)/uptime/page.js +75 -74
  199. package/server/.next/server/app/(console)/uptime/page.js.nft.json +1 -1
  200. package/server/.next/server/app/(console)/uptime/page_client-reference-manifest.js +1 -1
  201. package/server/.next/server/app/(console)/welcome/page/build-manifest.json +3 -3
  202. package/server/.next/server/app/(console)/welcome/page/server-reference-manifest.json +38 -28
  203. package/server/.next/server/app/(console)/welcome/page.js +72 -71
  204. package/server/.next/server/app/(console)/welcome/page.js.nft.json +1 -1
  205. package/server/.next/server/app/(console)/welcome/page_client-reference-manifest.js +1 -1
  206. package/server/.next/server/app/_global-error/page/build-manifest.json +3 -3
  207. package/server/.next/server/app/_global-error/page/server-reference-manifest.json +1 -1
  208. package/server/.next/server/app/_global-error/page.js.nft.json +1 -1
  209. package/server/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
  210. package/server/.next/server/app/_global-error.html +1 -1
  211. package/server/.next/server/app/_global-error.rsc +3 -3
  212. package/server/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +2 -2
  213. package/server/.next/server/app/_global-error.segments/_full.segment.rsc +3 -3
  214. package/server/.next/server/app/_global-error.segments/_tree.segment.rsc +2 -2
  215. package/server/.next/server/app/_not-found/page/build-manifest.json +3 -3
  216. package/server/.next/server/app/_not-found/page/server-reference-manifest.json +1 -1
  217. package/server/.next/server/app/_not-found/page.js +14 -11
  218. package/server/.next/server/app/_not-found/page.js.nft.json +1 -1
  219. package/server/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  220. package/server/.next/server/app/_not-found.html +1 -1
  221. package/server/.next/server/app/_not-found.rsc +28 -23
  222. package/server/.next/server/app/_not-found.segments/_full.segment.rsc +28 -23
  223. package/server/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +26 -23
  224. package/server/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
  225. package/server/.next/server/app/account/password/page/build-manifest.json +3 -3
  226. package/server/.next/server/app/account/password/page/server-reference-manifest.json +2 -2
  227. package/server/.next/server/app/account/password/page.js +17 -18
  228. package/server/.next/server/app/account/password/page.js.nft.json +1 -1
  229. package/server/.next/server/app/account/password/page_client-reference-manifest.js +1 -1
  230. package/server/.next/server/app/api/collect/route/server-reference-manifest.json +7 -7
  231. package/server/.next/server/app/api/collect/route.js +1 -1
  232. package/server/.next/server/app/api/collect/route.js.nft.json +1 -1
  233. package/server/.next/server/app/api/daily/route/server-reference-manifest.json +7 -7
  234. package/server/.next/server/app/api/daily/route.js +1 -1
  235. package/server/.next/server/app/api/daily/route.js.nft.json +1 -1
  236. package/server/.next/server/app/api/ping/[...parts]/route.js.nft.json +1 -1
  237. package/server/.next/server/app/api/status/route.js.nft.json +1 -1
  238. package/server/.next/server/app/api/telegram/webhook/route/server-reference-manifest.json +7 -7
  239. package/server/.next/server/app/api/telegram/webhook/route.js +1 -1
  240. package/server/.next/server/app/api/telegram/webhook/route.js.nft.json +1 -1
  241. package/server/.next/server/app/api/v1/advice/route.js.nft.json +1 -1
  242. package/server/.next/server/app/api/v1/ai/chat/completions/route.js.nft.json +1 -1
  243. package/server/.next/server/app/api/v1/ai/models/route.js.nft.json +1 -1
  244. package/server/.next/server/app/api/v1/ai/questions/[id]/route.js.nft.json +1 -1
  245. package/server/.next/server/app/api/v1/ai/questions/route.js.nft.json +1 -1
  246. package/server/.next/server/app/api/v1/mcp/route.js.nft.json +1 -1
  247. package/server/.next/server/app/api/v1/me/route.js.nft.json +1 -1
  248. package/server/.next/server/app/api/v1/openapi.json/route.js.nft.json +1 -1
  249. package/server/.next/server/app/api/v1/status/apps/[app]/route.js.nft.json +1 -1
  250. package/server/.next/server/app/api/v1/status/route.js.nft.json +1 -1
  251. package/server/.next/server/app/api/watchdog/route.js +13 -13
  252. package/server/.next/server/app/api/watchdog/route.js.nft.json +1 -1
  253. package/server/.next/server/app/auth/confirm/route.js.nft.json +1 -1
  254. package/server/.next/server/app/auth/google/callback/route.js.nft.json +1 -1
  255. package/server/.next/server/app/auth/google/create/callback/route.js.nft.json +1 -1
  256. package/server/.next/server/app/auth/not-member/route.js.nft.json +1 -1
  257. package/server/.next/server/app/auth/session-ended/route.js.nft.json +1 -1
  258. package/server/.next/server/app/invite/page/build-manifest.json +3 -3
  259. package/server/.next/server/app/invite/page/server-reference-manifest.json +2 -2
  260. package/server/.next/server/app/invite/page.js +22 -22
  261. package/server/.next/server/app/invite/page.js.nft.json +1 -1
  262. package/server/.next/server/app/invite/page_client-reference-manifest.js +1 -1
  263. package/server/.next/server/app/mfa/page/build-manifest.json +3 -3
  264. package/server/.next/server/app/mfa/page/server-reference-manifest.json +2 -2
  265. package/server/.next/server/app/mfa/page.js +31 -32
  266. package/server/.next/server/app/mfa/page.js.nft.json +1 -1
  267. package/server/.next/server/app/mfa/page_client-reference-manifest.js +1 -1
  268. package/server/.next/server/app/mfa/setup/page/build-manifest.json +3 -3
  269. package/server/.next/server/app/mfa/setup/page/server-reference-manifest.json +3 -3
  270. package/server/.next/server/app/mfa/setup/page.js +31 -32
  271. package/server/.next/server/app/mfa/setup/page.js.nft.json +1 -1
  272. package/server/.next/server/app/mfa/setup/page_client-reference-manifest.js +1 -1
  273. package/server/.next/server/app/page/build-manifest.json +3 -3
  274. package/server/.next/server/app/page/server-reference-manifest.json +1 -1
  275. package/server/.next/server/app/page.js +14 -11
  276. package/server/.next/server/app/page.js.nft.json +1 -1
  277. package/server/.next/server/app/page_client-reference-manifest.js +1 -1
  278. package/server/.next/server/app/s/[slug]/badge/[file]/route.js.nft.json +1 -1
  279. package/server/.next/server/app/s/[slug]/page/build-manifest.json +3 -3
  280. package/server/.next/server/app/s/[slug]/page/server-reference-manifest.json +1 -1
  281. package/server/.next/server/app/s/[slug]/page.js +21 -20
  282. package/server/.next/server/app/s/[slug]/page.js.nft.json +1 -1
  283. package/server/.next/server/app/s/[slug]/page_client-reference-manifest.js +1 -1
  284. package/server/.next/server/app/setup/page/build-manifest.json +3 -3
  285. package/server/.next/server/app/setup/page/server-reference-manifest.json +2 -2
  286. package/server/.next/server/app/setup/page.js +20 -18
  287. package/server/.next/server/app/setup/page.js.nft.json +1 -1
  288. package/server/.next/server/app/setup/page_client-reference-manifest.js +1 -1
  289. package/server/.next/server/app/signin/page/build-manifest.json +3 -3
  290. package/server/.next/server/app/signin/page/server-reference-manifest.json +3 -3
  291. package/server/.next/server/app/signin/page.js +28 -28
  292. package/server/.next/server/app/signin/page.js.nft.json +1 -1
  293. package/server/.next/server/app/signin/page_client-reference-manifest.js +1 -1
  294. package/server/.next/server/chunks/{[root-of-the-server]__1xxmlb3soqzom._.js → [root-of-the-server]__02n6y6aa6qp1b._.js} +2 -2
  295. package/server/.next/server/chunks/{[root-of-the-server]__1w7dv8zm-k_oa._.js → [root-of-the-server]__09odxyho_9vk_._.js} +2 -2
  296. package/server/.next/server/chunks/{[root-of-the-server]__0_nljmqhjcept._.js → [root-of-the-server]__0bmyll20mg_gf._.js} +1 -1
  297. package/server/.next/server/chunks/{[root-of-the-server]__14ou3bydfm0ms._.js → [root-of-the-server]__0btybbrsr4abf._.js} +1 -1
  298. package/server/.next/server/chunks/{[root-of-the-server]__0awtaloe4_8am._.js → [root-of-the-server]__0c-33noc8yn1-._.js} +1 -1
  299. package/server/.next/server/chunks/{[root-of-the-server]__15dhjj384tuw_._.js → [root-of-the-server]__0d99wclm2suox._.js} +2 -2
  300. package/server/.next/server/chunks/{[root-of-the-server]__10wbld2tja51-._.js → [root-of-the-server]__0gox66sv0bx47._.js} +2 -2
  301. package/server/.next/server/chunks/{[root-of-the-server]__0u3un538__ca5._.js → [root-of-the-server]__0ku7nva3gxa9p._.js} +2 -2
  302. package/server/.next/server/chunks/{[root-of-the-server]__1mim39ea6-dm1._.js → [root-of-the-server]__0nqbue6i0l3qs._.js} +2 -2
  303. package/server/.next/server/chunks/[root-of-the-server]__0s5b-tdq7rndj._.js +3 -0
  304. package/server/.next/server/chunks/{[root-of-the-server]__0zmvf4j8e2gno._.js → [root-of-the-server]__0wp6j3irilu76._.js} +1 -1
  305. package/server/.next/server/chunks/{[root-of-the-server]__1dh4di29mjq9y._.js → [root-of-the-server]__16lfk1wg0ejaa._.js} +2 -2
  306. package/server/.next/server/chunks/{[root-of-the-server]__0q-x05ekhpohj._.js → [root-of-the-server]__1c653f_8qzrpd._.js} +1 -1
  307. package/server/.next/server/chunks/{[root-of-the-server]__1v4i7ytwadml8._.js → [root-of-the-server]__1hv3hk5182t-o._.js} +1 -1
  308. package/server/.next/server/chunks/{[root-of-the-server]__1p0zd1rtbkj9r._.js → [root-of-the-server]__1j6xniw630fg0._.js} +1 -1
  309. package/server/.next/server/chunks/{[root-of-the-server]__1zg653esm3__p._.js → [root-of-the-server]__1nu5isiy7d832._.js} +2 -2
  310. package/server/.next/server/chunks/{[root-of-the-server]__0lu91s5izfu0p._.js → [root-of-the-server]__1s4bwjevs4hd-._.js} +2 -2
  311. package/server/.next/server/chunks/{[root-of-the-server]__0s8vjz6urzn76._.js → [root-of-the-server]__1uox9a0td-o0-._.js} +1 -1
  312. package/server/.next/server/chunks/{[root-of-the-server]__1dbz126yujh44._.js → [root-of-the-server]__1wpdlr4uh1un4._.js} +2 -2
  313. package/server/.next/server/chunks/{[root-of-the-server]__1brl5otpkvgd3._.js → [root-of-the-server]__1y2qf8ltxhk0o._.js} +2 -2
  314. package/server/.next/server/chunks/{[root-of-the-server]__0ihedjvt-l2-u._.js → [root-of-the-server]__1z_0gt-w6bx9v._.js} +2 -2
  315. package/server/.next/server/chunks/_0-fp57b-utmuw._.js +1 -1
  316. package/server/.next/server/chunks/_004j-wbs3yn84._.js +1 -1
  317. package/server/.next/server/chunks/_03qlijpos6a21._.js +1 -1
  318. package/server/.next/server/chunks/_06lf75x-xhl7v._.js +1 -1
  319. package/server/.next/server/chunks/_0brb2454uen18._.js +1 -1
  320. package/server/.next/server/chunks/_0dkhprw6wsizx._.js +1 -1
  321. package/server/.next/server/chunks/_0duxuj4kmjibl._.js +13 -8
  322. package/server/.next/server/chunks/{_0if5sw58tii_3._.js → _0q9a3ettj_h2s._.js} +2 -2
  323. package/server/.next/server/chunks/_0qmi54vmnlwdv._.js +1 -1
  324. package/server/.next/server/chunks/_0ry4553j-m5fp._.js +2 -2
  325. package/server/.next/server/chunks/_0s2odl9xacsg0._.js +1 -1
  326. package/server/.next/server/chunks/_0sy878k2ywjbq._.js +1 -1
  327. package/server/.next/server/chunks/_0xf7mtsrkgc9e._.js +2 -2
  328. package/server/.next/server/chunks/_0zj10_al6r59j._.js +1 -1
  329. package/server/.next/server/chunks/_1-pw7jw52sbti._.js +1 -1
  330. package/server/.next/server/chunks/_113ebzq_9i756._.js +13 -8
  331. package/server/.next/server/chunks/_16urxazbgm48y._.js +2 -2
  332. package/server/.next/server/chunks/_17aiz6zt-yv52._.js +2 -2
  333. package/server/.next/server/chunks/_18p-vw2zmdx9f._.js +1 -1
  334. package/server/.next/server/chunks/_1_son1yzo5xvl._.js +1 -1
  335. package/server/.next/server/chunks/_1_xsrlijknnh3._.js +1 -1
  336. package/server/.next/server/chunks/_1e_rbkrukj0x9._.js +1 -1
  337. package/server/.next/server/chunks/_1g8r-7wcf8sy3._.js +2 -2
  338. package/server/.next/server/chunks/_1g_prqb_u33e3._.js +1 -1
  339. package/server/.next/server/chunks/_1h73gul79s8pi._.js +1 -1
  340. package/server/.next/server/chunks/_1ihndlef8r00f._.js +13 -8
  341. package/server/.next/server/chunks/_1mwb214-ablfo._.js +13 -8
  342. package/server/.next/server/chunks/node_modules_drizzle-orm_entity_1-0q2stnw2ab8.js +1 -1
  343. package/server/.next/server/chunks/{src_09cgjvch02173._.js → src_00ixvrjrk_2h4._.js} +2 -2
  344. package/server/.next/server/chunks/src_088gmyaew7ds0._.js +1 -1
  345. package/server/.next/server/chunks/{src_0c7qu5adpm3gv._.js → src_0tdn7mun5rvc6._.js} +2 -2
  346. package/server/.next/server/chunks/src_0y_4gogmeu-2k._.js +1 -1
  347. package/server/.next/server/chunks/src_1-xw4hea2lvb3._.js +1 -1
  348. package/server/.next/server/chunks/src_1bqzr81r3wkvi._.js +1 -1
  349. package/server/.next/server/chunks/src_1tux0n9_5b1kr._.js +1 -1
  350. package/server/.next/server/chunks/src_1wduh0eckiwl1._.js +1 -1
  351. package/server/.next/server/chunks/src_1wzm081p6qyre._.js +1 -1
  352. package/server/.next/server/chunks/src_lib_0ayxuk4ftzf2f._.js +1 -1
  353. package/server/.next/server/chunks/src_lib_0glcfed-uogyd._.js +1 -1
  354. package/server/.next/server/chunks/src_lib_0krdzz8eu9xh3._.js +1 -1
  355. package/server/.next/server/chunks/src_lib_0ta8sd9jeuw50._.js +16 -11
  356. package/server/.next/server/chunks/src_lib_1-u7dbsavbtb0._.js +1 -1
  357. package/server/.next/server/chunks/src_lib_103kimc1xvc_0._.js +3 -3
  358. package/server/.next/server/chunks/src_lib_1en6omqx66g9d._.js +16 -11
  359. package/server/.next/server/chunks/src_lib_1qo6t00wwitz6._.js +16 -11
  360. package/server/.next/server/chunks/src_lib_1sdusf16f07x-._.js +3 -3
  361. package/server/.next/server/chunks/src_lib_206j7lyff31-g._.js +1 -1
  362. package/server/.next/server/chunks/src_lib_alerts_catalog_ts_1ndg28acul64q._.js +1 -1
  363. package/server/.next/server/chunks/src_lib_auth_ts_11yt3pae6wy-o._.js +1 -1
  364. package/server/.next/server/chunks/src_lib_collector_runners_ts_12z4gtgikss74._.js +4 -4
  365. package/server/.next/server/chunks/src_lib_data_provider-status-db_ts_09oo6p4m7x7te._.js +1 -1
  366. package/server/.next/server/chunks/src_lib_demo_pool_ts_17xz9bk-d5uic._.js +6 -6
  367. package/server/.next/server/chunks/src_lib_local-auth_setup_ts_10d8-k_e6pvft._.js +2 -2
  368. package/server/.next/server/chunks/src_lib_view_databases_ts_1ovdbo8spjhf9._.js +1 -1
  369. package/server/.next/server/chunks/src_lib_view_labels_ts_1uxs84z7vclz5._.js +1 -1
  370. package/server/.next/server/chunks/src_private_assist_questions-db_ts_1l-wvmlexd7tr._.js +1 -1
  371. package/server/.next/server/chunks/src_private_assist_questions-db_ts_1pc4g504t-qmu._.js +1 -1
  372. package/server/.next/server/chunks/src_private_notes_notes-actions_ts_1g63g8u965fhc._.js +1 -1
  373. package/server/.next/server/chunks/ssr/1oeh_server_app_(console)_(private)_ai_agents_page_actions_21atz5tidps07.js +3 -0
  374. package/server/.next/server/chunks/ssr/1oeh_server_app_(console)_(private)_ai_models_page_actions_0rvlzfa8rjyz_.js +3 -0
  375. package/server/.next/server/chunks/ssr/1oeh_server_app_(console)_(private)_ai_playground_page_actions_01ejc1xilpuh4.js +4 -0
  376. package/server/.next/server/chunks/ssr/1oeh_server_app_(console)_(private)_ai_quota_page_actions_0iki29gyi8cwa.js +3 -0
  377. package/server/.next/server/chunks/ssr/1oeh_server_app_(console)_(private)_ai_usage_page_actions_1c99h-kwdnep7.js +3 -0
  378. package/server/.next/server/chunks/ssr/1oeh_server_app_(console)_(private)_auto-actions_page_actions_1kw4ce6-efkr1.js +3 -0
  379. package/server/.next/server/chunks/ssr/{[externals]__0et8619os7o06._.js → [externals]__00tbi838eotwu._.js} +1 -1
  380. package/server/.next/server/chunks/ssr/{[externals]__0jv_q8g96gubg._.js → [externals]__01kgu896o9-9t._.js} +1 -1
  381. package/server/.next/server/chunks/ssr/{[externals]__1neu6qld_ilyx._.js → [externals]__078uqm46tk5mo._.js} +1 -1
  382. package/server/.next/server/chunks/ssr/{[externals]__1d_fn156y1kzg._.js → [externals]__0i0hmh-a743jn._.js} +1 -1
  383. package/server/.next/server/chunks/ssr/{[externals]__0yzs5m5hot2o2._.js → [externals]__0qc7l-41h018j._.js} +1 -1
  384. package/server/.next/server/chunks/ssr/[externals]__194b54tqm6qaq._.js +3 -0
  385. package/server/.next/server/chunks/ssr/[externals]__1_ttbfsdm3x1-._.js +3 -0
  386. package/server/.next/server/chunks/ssr/{[externals]__0x50_fipcza3k._.js → [externals]__1devsqn7ez77y._.js} +1 -1
  387. package/server/.next/server/chunks/ssr/[externals]__1prfp5pzeoflz._.js +3 -0
  388. package/server/.next/server/chunks/ssr/[externals]__1zxtjc2qr2epg._.js +3 -0
  389. package/server/.next/server/chunks/ssr/{[root-of-the-server]__0p7d9dfmuhnvv._.js → [root-of-the-server]__004q78ed0nf0_._.js} +2 -2
  390. package/server/.next/server/chunks/ssr/[root-of-the-server]__01zthkv8nrlct._.js +3 -0
  391. package/server/.next/server/chunks/ssr/{[root-of-the-server]__00wwav5k7xmy0._.js → [root-of-the-server]__04_prmhm_cts4._.js} +2 -2
  392. package/server/.next/server/chunks/ssr/{[root-of-the-server]__0-jx3t8dg8n5t._.js → [root-of-the-server]__04nc91kiy757l._.js} +2 -2
  393. package/server/.next/server/chunks/ssr/{[root-of-the-server]__1xwqrik2sugmi._.js → [root-of-the-server]__09blzlbsxqvy9._.js} +2 -2
  394. package/server/.next/server/chunks/ssr/{[root-of-the-server]__0-o5i-5pqjk5v._.js → [root-of-the-server]__0_6on4a5w76va._.js} +1 -1
  395. package/server/.next/server/chunks/ssr/{[root-of-the-server]__1tco2ec6ha1k6._.js → [root-of-the-server]__0a3n6wzq8xui9._.js} +2 -2
  396. package/server/.next/server/chunks/ssr/{[root-of-the-server]__0ptdec0sozaqm._.js → [root-of-the-server]__0an0wsglj2bhh._.js} +2 -2
  397. package/server/.next/server/chunks/ssr/{[root-of-the-server]__18xb7pbdmiyiz._.js → [root-of-the-server]__0ban7lwqlko9y._.js} +2 -2
  398. package/server/.next/server/chunks/ssr/{[root-of-the-server]__0khp_gsot3jh_._.js → [root-of-the-server]__0c_q6tvcmsmt9._.js} +2 -2
  399. package/server/.next/server/chunks/ssr/{[root-of-the-server]__050d99bknjdvq._.js → [root-of-the-server]__0ct4apye0sfmc._.js} +2 -2
  400. package/server/.next/server/chunks/ssr/{[root-of-the-server]__15keslh0ov5mv._.js → [root-of-the-server]__0d2ry7-u1cv8c._.js} +2 -2
  401. package/server/.next/server/chunks/ssr/[root-of-the-server]__0e8ya6wyy2plv._.js +3 -0
  402. package/server/.next/server/chunks/ssr/[root-of-the-server]__0h0txd7z3sxq7._.js +3 -0
  403. package/server/.next/server/chunks/ssr/{[root-of-the-server]__08w3ad-xux1g4._.js → [root-of-the-server]__0h1vffivfh242._.js} +1 -1
  404. package/server/.next/server/chunks/ssr/{[root-of-the-server]__05hw89gap74cw._.js → [root-of-the-server]__0i0_6dnnf0hov._.js} +2 -2
  405. package/server/.next/server/chunks/ssr/{[root-of-the-server]__0khvq0xdah931._.js → [root-of-the-server]__0jgapr1cnvhi6._.js} +2 -2
  406. package/server/.next/server/chunks/ssr/{[root-of-the-server]__0_1130gx52k-9._.js → [root-of-the-server]__0jn0o2e32mwcp._.js} +2 -2
  407. package/server/.next/server/chunks/ssr/{[root-of-the-server]__11ham42w_feik._.js → [root-of-the-server]__0k29b_kblv6sv._.js} +1 -1
  408. package/server/.next/server/chunks/ssr/{[root-of-the-server]__0bn_thc_vtf_i._.js → [root-of-the-server]__0keo0-hwsnkw9._.js} +2 -2
  409. package/server/.next/server/chunks/ssr/[root-of-the-server]__0klc2dyzyjeba._.js +3 -0
  410. package/server/.next/server/chunks/ssr/{[root-of-the-server]__16jkttbe1yoai._.js → [root-of-the-server]__0l50vsk8enxzj._.js} +2 -2
  411. package/server/.next/server/chunks/ssr/[root-of-the-server]__0nlfip3wc3l2z._.js +2 -2
  412. package/server/.next/server/chunks/ssr/{[root-of-the-server]__0y84mqfn13ss4._.js → [root-of-the-server]__0o0cpvobd-u0n._.js} +1 -1
  413. package/server/.next/server/chunks/ssr/{[root-of-the-server]__10rhqv5xq9jaj._.js → [root-of-the-server]__0paolyy3xkow9._.js} +2 -2
  414. package/server/.next/server/chunks/ssr/[root-of-the-server]__0qnly-gjvfntd._.js +3 -0
  415. package/server/.next/server/chunks/ssr/[root-of-the-server]__0qqcz9ynsgmgl._.js +3 -0
  416. package/server/.next/server/chunks/ssr/{[root-of-the-server]__1k_hi9mbd4_by._.js → [root-of-the-server]__0qwds8dkahd2_._.js} +1 -1
  417. package/server/.next/server/chunks/ssr/{[root-of-the-server]__0ejxk0jlgi4eb._.js → [root-of-the-server]__0rdf04ziqasfz._.js} +2 -2
  418. package/server/.next/server/chunks/ssr/{[root-of-the-server]__0_677ii9bahoy._.js → [root-of-the-server]__0ronqmm1xpldk._.js} +2 -2
  419. package/server/.next/server/chunks/ssr/[root-of-the-server]__0rrdzb9wowemv._.js +3 -0
  420. package/server/.next/server/chunks/ssr/[root-of-the-server]__0uxychcp_pldy._.js +3 -0
  421. package/server/.next/server/chunks/ssr/[root-of-the-server]__0vnfx03nb5vku._.js +3 -0
  422. package/server/.next/server/chunks/ssr/[root-of-the-server]__0x7w-5h8or6qr._.js +3 -0
  423. package/server/.next/server/chunks/ssr/{[root-of-the-server]__15wwi1pda8ims._.js → [root-of-the-server]__0xpkzaqer75i-._.js} +2 -2
  424. package/server/.next/server/chunks/ssr/[root-of-the-server]__0y6psx1_d7fkt._.js +3 -0
  425. package/server/.next/server/chunks/ssr/{[root-of-the-server]__04klr3-4qi7-t._.js → [root-of-the-server]__107gjehjdhw8p._.js} +2 -2
  426. package/server/.next/server/chunks/ssr/[root-of-the-server]__10kuehp7saz8h._.js +3 -0
  427. package/server/.next/server/chunks/ssr/[root-of-the-server]__113zn8es2wp67._.js +3 -0
  428. package/server/.next/server/chunks/ssr/{[root-of-the-server]__0p5znbfo0wgsu._.js → [root-of-the-server]__13fabu66slkfb._.js} +2 -2
  429. package/server/.next/server/chunks/ssr/[root-of-the-server]__14ept-_l8j32m._.js +1 -1
  430. package/server/.next/server/chunks/ssr/[root-of-the-server]__15s9onrf73-k8._.js +3 -0
  431. package/server/.next/server/chunks/ssr/{[root-of-the-server]__0kr_tvfgqtb-o._.js → [root-of-the-server]__191t_hhtr-k27._.js} +2 -2
  432. package/server/.next/server/chunks/ssr/[root-of-the-server]__19l_r5vy3kxo1._.js +3 -0
  433. package/server/.next/server/chunks/ssr/{[root-of-the-server]__1kieqcc6kdywx._.js → [root-of-the-server]__1_b_k8wgqyxy7._.js} +2 -2
  434. package/server/.next/server/chunks/ssr/[root-of-the-server]__1_f7nip9age3d._.js +1 -1
  435. package/server/.next/server/chunks/ssr/{[root-of-the-server]__0exp042uqhyqs._.js → [root-of-the-server]__1a7x--bos5pv8._.js} +2 -2
  436. package/server/.next/server/chunks/ssr/[root-of-the-server]__1adcmllk9wt5l._.js +3 -0
  437. package/server/.next/server/chunks/ssr/[root-of-the-server]__1d5tbv79yjhqm._.js +3 -0
  438. package/server/.next/server/chunks/ssr/[root-of-the-server]__1fj33_xkainxk._.js +2 -2
  439. package/server/.next/server/chunks/ssr/[root-of-the-server]__1itgt83qo1e77._.js +3 -0
  440. package/server/.next/server/chunks/ssr/{[root-of-the-server]__0ua-p_wz8epv9._.js → [root-of-the-server]__1mumjk3h0om80._.js} +2 -2
  441. package/server/.next/server/chunks/ssr/[root-of-the-server]__1nat8lbog5imr._.js +1 -1
  442. package/server/.next/server/chunks/ssr/[root-of-the-server]__1p2oghl9lfgmk._.js +3 -0
  443. package/server/.next/server/chunks/ssr/{[root-of-the-server]__1tcu4-eowz9vt._.js → [root-of-the-server]__1pwd99rch8xyl._.js} +2 -2
  444. package/server/.next/server/chunks/ssr/{[root-of-the-server]__0llh-w4ta1qbp._.js → [root-of-the-server]__1sw2q1p1t59y8._.js} +2 -2
  445. package/server/.next/server/chunks/ssr/{[root-of-the-server]__06uaa_2zbg57p._.js → [root-of-the-server]__1tj-iwvrxfd1a._.js} +2 -2
  446. package/server/.next/server/chunks/ssr/{[root-of-the-server]__12-a3tcnfdcyq._.js → [root-of-the-server]__1u_13nhw3kuz3._.js} +2 -2
  447. package/server/.next/server/chunks/ssr/{[root-of-the-server]__0tjab3yn0asf7._.js → [root-of-the-server]__1uojs0x42k86p._.js} +1 -1
  448. package/server/.next/server/chunks/ssr/{[root-of-the-server]__1096-q3_trmm9._.js → [root-of-the-server]__1yx8ayym979jd._.js} +2 -2
  449. package/server/.next/server/chunks/ssr/[root-of-the-server]__1zmavjo5fhryp._.js +3 -0
  450. package/server/.next/server/chunks/ssr/[root-of-the-server]__20of6xa16fwqa._.js +1 -1
  451. package/server/.next/server/chunks/ssr/_0-wc6f6p0c8lv._.js +3 -0
  452. package/server/.next/server/chunks/ssr/{_04ltmruop4rt3._.js → _02eudwc8ieb2r._.js} +3 -3
  453. package/server/.next/server/chunks/ssr/_034fv8o7kws2k._.js +3 -0
  454. package/server/.next/server/chunks/ssr/_03od6e8ibcxtf._.js +3 -0
  455. package/server/.next/server/chunks/ssr/_042ow6smd_1gj._.js +3 -0
  456. package/server/.next/server/chunks/ssr/{_090fib2x989oc._.js → _08xqk3eibu5aw._.js} +2 -2
  457. package/server/.next/server/chunks/ssr/{_01irlde8uxva8._.js → _0_8v3-nq-b4ug._.js} +2 -2
  458. package/server/.next/server/chunks/ssr/_0_oc9q0vqkynd._.js +1 -1
  459. package/server/.next/server/chunks/ssr/_0a22b7zsckifp._.js +1 -1
  460. package/server/.next/server/chunks/ssr/_0azq3ml4gbn1d._.js +1 -1
  461. package/server/.next/server/chunks/ssr/_0bd4cxnpnnq2u._.js +1 -1
  462. package/server/.next/server/chunks/ssr/{_1ag8axv14phju._.js → _0cbbks0ms7i_u._.js} +3 -3
  463. package/server/.next/server/chunks/ssr/_0cukja7zcxh7e._.js +1 -1
  464. package/server/.next/server/chunks/ssr/_0cw4kz3d6kmb1._.js +1 -1
  465. package/server/.next/server/chunks/ssr/_0d2d527wcx-lf._.js +4 -0
  466. package/server/.next/server/chunks/ssr/_0d702k82llasi._.js +1 -1
  467. package/server/.next/server/chunks/ssr/{_1gk334l49puy-._.js → _0fq8thje0tuch._.js} +2 -2
  468. package/server/.next/server/chunks/ssr/_0gl-ewvbhb677._.js +4 -0
  469. package/server/.next/server/chunks/ssr/_0i04zoixa2iup._.js +4 -0
  470. package/server/.next/server/chunks/ssr/_0idbg-ok0so2h._.js +4 -0
  471. package/server/.next/server/chunks/ssr/{_0tqc0bsnybvva._.js → _0ipnb60-_660b._.js} +2 -2
  472. package/server/.next/server/chunks/ssr/_0kdn56_ow-x_s._.js +3 -0
  473. package/server/.next/server/chunks/ssr/{_1_gydx19bikgo._.js → _0kxkg0dbp42ai._.js} +2 -2
  474. package/server/.next/server/chunks/ssr/_0mp5aext18ijx._.js +3 -0
  475. package/server/.next/server/chunks/ssr/_0oovfx_t_-u0k._.js +1 -1
  476. package/server/.next/server/chunks/ssr/{_18lgd6o04ugow._.js → _0oub-njkja8gu._.js} +3 -3
  477. package/server/.next/server/chunks/ssr/_0pqkexxo7rts_._.js +4 -0
  478. package/server/.next/server/chunks/ssr/_0qhvl_fw4qetx._.js +1 -1
  479. package/server/.next/server/chunks/ssr/_0qo8tc43kjsf_._.js +1 -1
  480. package/server/.next/server/chunks/ssr/_0tnd528j0i1i4._.js +4 -0
  481. package/server/.next/server/chunks/ssr/_0uwkwcgucqgcf._.js +4 -0
  482. package/server/.next/server/chunks/ssr/_0v6v5w16qxwke._.js +1 -1
  483. package/server/.next/server/chunks/ssr/_0wb79bnj96x0g._.js +3 -0
  484. package/server/.next/server/chunks/ssr/_0wo-lpqf7hr1y._.js +2 -2
  485. package/server/.next/server/chunks/ssr/_0zixhhc1lheoi._.js +4 -0
  486. package/server/.next/server/chunks/ssr/_1-6d1tm3r_qwg._.js +1 -1
  487. package/server/.next/server/chunks/ssr/_10bven6gb1vj0._.js +1 -1
  488. package/server/.next/server/chunks/ssr/_118h21qua_4o3._.js +1 -1
  489. package/server/.next/server/chunks/ssr/_11llsmv578p2i._.js +3 -0
  490. package/server/.next/server/chunks/ssr/_12makqwatfke-._.js +4 -0
  491. package/server/.next/server/chunks/ssr/_19-3vzkc6rk97._.js +1 -1
  492. package/server/.next/server/chunks/ssr/_1_-o2s48aj4i7._.js +1 -1
  493. package/server/.next/server/chunks/ssr/_1_xsrlijknnh3._.js +1 -1
  494. package/server/.next/server/chunks/ssr/_1c7jkkvkvzj_u._.js +4 -0
  495. package/server/.next/server/chunks/ssr/_1cl55h_h3q-b_._.js +1 -1
  496. package/server/.next/server/chunks/ssr/_1de6e6l7599fp._.js +1 -1
  497. package/server/.next/server/chunks/ssr/_1dlo17ba9g-f9._.js +4 -0
  498. package/server/.next/server/chunks/ssr/_1e47r3tlad52r._.js +3 -0
  499. package/server/.next/server/chunks/ssr/_1fc8k_0p8l00c._.js +4 -0
  500. package/server/.next/server/chunks/ssr/{_1w_rq6clcs0ft._.js → _1fuywfexex2s8._.js} +3 -3
  501. package/server/.next/server/chunks/ssr/_1g2zbl_-4z_hg._.js +1 -1
  502. package/server/.next/server/chunks/ssr/_1gl78598hz_ku._.js +1 -1
  503. package/server/.next/server/chunks/ssr/_1h93joqd_-1og._.js +1 -1
  504. package/server/.next/server/chunks/ssr/_1he21-bt45k8z._.js +4 -0
  505. package/server/.next/server/chunks/ssr/_1j9cka-44jd65._.js +1 -1
  506. package/server/.next/server/chunks/ssr/_1jh_o2i8hj2g5._.js +1 -1
  507. package/server/.next/server/chunks/ssr/_1ln6o3a9quwxo._.js +4 -0
  508. package/server/.next/server/chunks/ssr/{_0hmxyfx7su4uk._.js → _1m4km_w39x5e9._.js} +2 -2
  509. package/server/.next/server/chunks/ssr/_1pp1o361lgpwu._.js +4 -0
  510. package/server/.next/server/chunks/ssr/_1qdox4yn1u4pc._.js +1 -1
  511. package/server/.next/server/chunks/ssr/_1qdqc9j_skd1q._.js +1 -1
  512. package/server/.next/server/chunks/ssr/_1r7o1vx4875hu._.js +1 -1
  513. package/server/.next/server/chunks/ssr/_1yh3k88t_kh4h._.js +4 -0
  514. package/server/.next/server/chunks/ssr/_1z6dy1k48mskn._.js +1 -1
  515. package/server/.next/server/chunks/ssr/_20wy2moxkzhf0._.js +3 -0
  516. package/server/.next/server/chunks/ssr/{_026w_ig6vy9bt._.js → _218164gkxgum_._.js} +2 -2
  517. package/server/.next/server/chunks/ssr/_next-internal_server_app_(console)_(private)_ai_keys_page_actions_181-3r4e_0yb5.js +3 -0
  518. package/server/.next/server/chunks/ssr/_next-internal_server_app_(console)_(private)_ai_logs_page_actions_1ryb93n6khky3.js +3 -0
  519. package/server/.next/server/chunks/ssr/_next-internal_server_app_(console)_alerts_page_actions_06_3gmyq3jtvi.js +3 -0
  520. package/server/.next/server/chunks/ssr/_next-internal_server_app_(console)_apps_[id]_page_actions_0y5m8cul6d7kk.js +3 -0
  521. package/server/.next/server/chunks/ssr/_next-internal_server_app_(console)_apps_page_actions_0ksau5eicvycc.js +3 -0
  522. package/server/.next/server/chunks/ssr/_next-internal_server_app_(console)_connections_page_actions_1fgolmmpxrouc.js +3 -0
  523. package/server/.next/server/chunks/ssr/_next-internal_server_app_(console)_dns_page_actions_17d_lvhl-u_4w.js +3 -0
  524. package/server/.next/server/chunks/ssr/_next-internal_server_app_(console)_domains_page_actions_1yv3fj_fh-n-5.js +3 -0
  525. package/server/.next/server/chunks/ssr/_next-internal_server_app_(console)_firebase_page_actions_00wuues_v_j3r.js +3 -0
  526. package/server/.next/server/chunks/ssr/_next-internal_server_app_(console)_logs_page_actions_0oqh51t2rx6q0.js +3 -0
  527. package/server/.next/server/chunks/ssr/_next-internal_server_app_(console)_manage_sections_page_actions_1sb2ldu57uj32.js +3 -0
  528. package/server/.next/server/chunks/ssr/_next-internal_server_app_(console)_settings_page_actions_12wgjpd0lbh12.js +3 -0
  529. package/server/.next/server/chunks/ssr/_next-internal_server_app_(console)_supabase_page_actions_1f3a_tpkwjo8z.js +3 -0
  530. package/server/.next/server/chunks/ssr/_next-internal_server_app_(console)_uptime_page_actions_1ylbdz0-ykfh6.js +3 -0
  531. package/server/.next/server/chunks/ssr/_next-internal_server_app_account_password_page_actions_1v4e71_oifbx9.js +1 -1
  532. package/server/.next/server/chunks/ssr/_next-internal_server_app_signin_page_actions_11wzk446p6_zi.js +1 -1
  533. package/server/.next/server/chunks/ssr/node_modules_0bqq4kab3lt4c._.js +3 -0
  534. package/server/.next/server/chunks/ssr/{node_modules_05z64qbskywkh._.js → node_modules_1-uce_v-roeci._.js} +1 -1
  535. package/server/.next/server/chunks/ssr/node_modules_@base-ui_react_dialog_index_parts_mjs_0wvx70_xziwkw._.js +3 -0
  536. package/server/.next/server/chunks/ssr/node_modules_next_dist_client_components_0p8s4lhdi0ir6._.js +3 -0
  537. package/server/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_0-kkewzcx4540.js +3 -0
  538. package/server/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_00t5_cu_8xco2.js +3 -0
  539. package/server/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_028rm32yw9745.js +3 -0
  540. package/server/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_02tytjla8gfpw.js +3 -0
  541. package/server/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_05tff2l0grv3d.js +3 -0
  542. package/server/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_08qavwdx-gipt.js +3 -0
  543. package/server/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_09jdr97vksmwk.js +3 -0
  544. package/server/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_0c3z69fbbz6-a.js +3 -0
  545. package/server/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_0d4hxwzkts-8z.js +3 -0
  546. package/server/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_0dq-zslzf2s94.js +3 -0
  547. package/server/.next/server/chunks/ssr/{node_modules_next_dist_esm_build_templates_app-page_1q_82vyl-q7u6.js → node_modules_next_dist_esm_build_templates_app-page_0e-rjmezj0qkk.js} +2 -2
  548. package/server/.next/server/chunks/ssr/{node_modules_next_dist_esm_build_templates_app-page_0ivgh76j_tu2x.js → node_modules_next_dist_esm_build_templates_app-page_0e50mslm8ys4t.js} +2 -2
  549. package/server/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_0esqulnipbhj7.js +3 -0
  550. package/server/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_0icasmc2qvtfa.js +3 -0
  551. package/server/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_0idohkgskbja5.js +3 -0
  552. package/server/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_0ii2a6tud83pj.js +3 -0
  553. package/server/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_0ivr2dcq7hh5t.js +3 -0
  554. package/server/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_0mcwghl-di24f.js +3 -0
  555. package/server/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_0n05qgf2t9o6n.js +3 -0
  556. package/server/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_0ntej2bo95ns3.js +3 -0
  557. package/server/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_0o1l93c0tj-p8.js +3 -0
  558. package/server/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_0ollx_iq739y6.js +3 -0
  559. package/server/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_0v16m5nv0x43b.js +3 -0
  560. package/server/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_0wa_9ywaoqxrf.js +3 -0
  561. package/server/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_0y94b-zvw0vrq.js +3 -0
  562. package/server/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_0ydzswpddtx9q.js +3 -0
  563. package/server/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_0zwpkpyuh6z99.js +3 -0
  564. package/server/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_14t5-0abqp0sm.js +3 -0
  565. package/server/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_18h3ke4tl-fzl.js +3 -0
  566. package/server/.next/server/chunks/ssr/{node_modules_next_dist_esm_build_templates_app-page_14-4y3i6c1vxc.js → node_modules_next_dist_esm_build_templates_app-page_19kqs-fc2i0zv.js} +2 -2
  567. package/server/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_1_s_25znkg8mz.js +3 -0
  568. package/server/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_1_ysa6fs0tt59.js +3 -0
  569. package/server/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_1b4hixza89i52.js +3 -0
  570. package/server/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_1brrqdx4msjzf.js +3 -0
  571. package/server/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_1e74o7dar2z12.js +3 -0
  572. package/server/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_1eqpqmdz9jgs0.js +3 -0
  573. package/server/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_1f3932777ye1o.js +3 -0
  574. package/server/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_1kx1n5-wqjvko.js +3 -0
  575. package/server/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_1l6umnmh89nvy.js +3 -0
  576. package/server/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_1mdyuengydtxm.js +3 -0
  577. package/server/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_1qmm1wm-dfm_v.js +3 -0
  578. package/server/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_1t-fn8blx1hp8.js +3 -0
  579. package/server/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_1tf9xiz17b3cq.js +3 -0
  580. package/server/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_1tffdbiasnszd.js +3 -0
  581. package/server/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_1uisz6sszlhwp.js +3 -0
  582. package/server/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_1umag21mbk-rs.js +3 -0
  583. package/server/.next/server/chunks/ssr/{node_modules_next_dist_esm_build_templates_app-page_0i3p3qfjihm3f.js → node_modules_next_dist_esm_build_templates_app-page_1vakvu0qtsn07.js} +2 -2
  584. package/server/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_1wmviw4zw6t_r.js +3 -0
  585. package/server/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_1xq449tjypb4s.js +3 -0
  586. package/server/.next/server/chunks/ssr/src_02ynbzyh8nn02._.js +3 -0
  587. package/server/.next/server/chunks/ssr/src_0330uf9pdfco9._.js +3 -0
  588. package/server/.next/server/chunks/ssr/{src_1nse4o3frj33x._.js → src_05kvmrkq5nfyh._.js} +2 -2
  589. package/server/.next/server/chunks/ssr/src_06tjy8wljego8._.js +1 -1
  590. package/server/.next/server/chunks/ssr/src_084tdkx3c_yqi._.js +1 -1
  591. package/server/.next/server/chunks/ssr/{src_0905fjqu0qv57._.js → src_097wa6oc_utgr._.js} +2 -2
  592. package/server/.next/server/chunks/ssr/src_0_5_wl0sww-x7._.js +1 -1
  593. package/server/.next/server/chunks/ssr/src_0abts6wp5ucc0._.js +1 -1
  594. package/server/.next/server/chunks/ssr/src_0etvjdinp5urq._.js +3 -0
  595. package/server/.next/server/chunks/ssr/src_0ph020gy78gi9._.js +1 -1
  596. package/server/.next/server/chunks/ssr/src_0xh3xicmff6ws._.js +1 -1
  597. package/server/.next/server/chunks/ssr/src_1-xw4hea2lvb3._.js +1 -1
  598. package/server/.next/server/chunks/ssr/src_10zavgy86u3us._.js +1 -1
  599. package/server/.next/server/chunks/ssr/{src_071xsnvnzlvj8._.js → src_1751lvujjc-tz._.js} +2 -2
  600. package/server/.next/server/chunks/ssr/src_1f1x6508qetmp._.js +3 -0
  601. package/server/.next/server/chunks/ssr/{src_0oagnv9_4qww7._.js → src_1fomo1_as1-ea._.js} +2 -2
  602. package/server/.next/server/chunks/ssr/src_1koc8y1nfdlw3._.js +1 -1
  603. package/server/.next/server/chunks/ssr/src_1pd5lqhm1x4yf._.js +1 -1
  604. package/server/.next/server/chunks/ssr/src_1q-jgpnd3lbcu._.js +1 -1
  605. package/server/.next/server/chunks/ssr/src_1sv5tf2pk5-pn._.js +3 -0
  606. package/server/.next/server/chunks/ssr/{src_0widudneyf0oq._.js → src_1wnx8vxv7nd04._.js} +2 -2
  607. package/server/.next/server/chunks/ssr/src_app_(console)_(private)_ai_agents_1fyhh1ldgm23z._.js +1 -1
  608. package/server/.next/server/chunks/ssr/src_app_(console)_(private)_ai_ask_ask-form_tsx_18ttm9nna_9y6._.js +1 -1
  609. package/server/.next/server/chunks/ssr/src_app_(console)_(private)_ai_logs_export-button_tsx_1k-crb88n1za_._.js +1 -1
  610. package/server/.next/server/chunks/ssr/src_app_(console)_(private)_ai_models_0ayzqn062pnv5._.js +1 -1
  611. package/server/.next/server/chunks/ssr/src_app_(console)_(private)_ai_playground_playground-view_tsx_18ua5zn_a0mar._.js +2 -2
  612. package/server/.next/server/chunks/ssr/src_app_(console)_(private)_ai_providers_1ru-30x6-uwu4._.js +1 -1
  613. package/server/.next/server/chunks/ssr/src_app_(console)_(private)_ai_quota_limits-form_tsx_1vouaaf560z_x._.js +1 -1
  614. package/server/.next/server/chunks/ssr/src_app_(console)_(private)_ai_usage_limits-form_tsx_0sfk3ver58rqw._.js +1 -1
  615. package/server/.next/server/chunks/ssr/src_app_(console)_0p2-zm5eewkqo._.js +3 -0
  616. package/server/.next/server/chunks/ssr/src_app_(console)_1za4o0--zhso5._.js +3 -0
  617. package/server/.next/server/chunks/ssr/src_app_(console)_alerts_0j5xlt68kwg8x._.js +1 -1
  618. package/server/.next/server/chunks/ssr/src_app_(console)_alerts_1t61z2wktki-v._.js +1 -1
  619. package/server/.next/server/chunks/ssr/src_app_(console)_apps_[id]_1jme7fm7ej_lr._.js +3 -0
  620. package/server/.next/server/chunks/ssr/src_app_(console)_apps_[id]_1sfvku9ui1le-._.js +1 -1
  621. package/server/.next/server/chunks/ssr/src_app_(console)_backups_actions_ts_1vpytsdh0wc1f._.js +1 -1
  622. package/server/.next/server/chunks/ssr/src_app_(console)_backups_drive-buttons_tsx_00cku5r_z3jkg._.js +1 -1
  623. package/server/.next/server/chunks/ssr/src_app_(console)_connections_02upf_c41dauw._.js +1 -1
  624. package/server/.next/server/chunks/ssr/src_app_(console)_connections_1fahc65-97qla._.js +1 -1
  625. package/server/.next/server/chunks/ssr/src_app_(console)_connections_1fmp_anbkapur._.js +1 -1
  626. package/server/.next/server/chunks/ssr/src_app_(console)_connections_actions_ts_103blv4gzq76z._.js +1 -1
  627. package/server/.next/server/chunks/ssr/src_app_(console)_create_actions_ts_05-86qr6kfjey._.js +1 -1
  628. package/server/.next/server/chunks/ssr/src_app_(console)_d1_page_tsx_167hwnq_9uh81._.js +1 -1
  629. package/server/.next/server/chunks/ssr/src_app_(console)_dns_0d1uyir4fe7pc._.js +1 -1
  630. package/server/.next/server/chunks/ssr/src_app_(console)_dns_actions_ts_1jzn58xzwbukz._.js +1 -1
  631. package/server/.next/server/chunks/ssr/src_app_(console)_dns_record-actions_tsx_0cqmz51zcuebv._.js +1 -1
  632. package/server/.next/server/chunks/ssr/src_app_(console)_domains_1ut499n11u8_r._.js +1 -1
  633. package/server/.next/server/chunks/ssr/src_app_(console)_firebase_row-menu_tsx_0hssoq3pqjl-n._.js +1 -1
  634. package/server/.next/server/chunks/ssr/src_app_(console)_logs_log-viewer_tsx_0v3e4cflfk14w._.js +1 -1
  635. package/server/.next/server/chunks/ssr/src_app_(console)_manage_sections_17htk-vea5fna._.js +1 -1
  636. package/server/.next/server/chunks/ssr/src_app_(console)_manage_sections_section-switch_tsx_1mfs-o_357i22._.js +1 -1
  637. package/server/.next/server/chunks/ssr/src_app_(console)_monitor-actions_ts_10w3h7myk2ppi._.js +1 -1
  638. package/server/.next/server/chunks/ssr/src_app_(console)_overview_page_tsx_0se3f3ln9q-42._.js +1 -1
  639. package/server/.next/server/chunks/ssr/src_app_(console)_palette-action_ts_0zyw9a9imev6p._.js +1 -1
  640. package/server/.next/server/chunks/ssr/src_app_(console)_repos_[id]_page_tsx_1nkxthc4ethrj._.js +2 -2
  641. package/server/.next/server/chunks/ssr/src_app_(console)_sql_1icfsti04djqe._.js +2 -2
  642. package/server/.next/server/chunks/ssr/src_app_(console)_sql_actions_ts_1oqco02hw-3vp._.js +1 -1
  643. package/server/.next/server/chunks/ssr/src_app_(console)_status_page_tsx_1zvj799nv4kah._.js +1 -1
  644. package/server/.next/server/chunks/ssr/src_app_(console)_supabase_0ib3m2ch9gu-4._.js +1 -1
  645. package/server/.next/server/chunks/ssr/src_app_(console)_supabase_1ofufib3-zzt-._.js +1 -1
  646. package/server/.next/server/chunks/ssr/src_app_(console)_supabase_pool-actions_ts_0nzd4vwy_9zzx._.js +1 -1
  647. package/server/.next/server/chunks/ssr/src_app_(console)_uptime_1mnnkfi-2zv-k._.js +1 -1
  648. package/server/.next/server/chunks/ssr/src_app_(console)_vercel-actions_ts_0wpk1yo9v632d._.js +1 -1
  649. package/server/.next/server/chunks/ssr/src_app_mfa_setup_setup-flow_tsx_1fpwygr2vdgnh._.js +1 -1
  650. package/server/.next/server/chunks/ssr/src_app_s_[slug]_page_tsx_0jjqe6py82mpb._.js +1 -1
  651. package/server/.next/server/chunks/ssr/src_app_setup_setup-form_tsx_0izoagdur96e1._.js +1 -1
  652. package/server/.next/server/chunks/ssr/{src_app_signin_0hb58isfg-2yx._.js → src_app_signin_11vigmz4xm91m._.js} +2 -2
  653. package/server/.next/server/chunks/ssr/src_components_0-x11r8_844pu._.js +1 -1
  654. package/server/.next/server/chunks/ssr/src_components_08d78uqnnmrrh._.js +1 -1
  655. package/server/.next/server/chunks/ssr/src_components_0_xymno8nakru._.js +3 -0
  656. package/server/.next/server/chunks/ssr/src_components_0ozvphxxwb7d-._.js +3 -0
  657. package/server/.next/server/chunks/ssr/src_components_0tmtbf2etsx03._.js +1 -1
  658. package/server/.next/server/chunks/ssr/src_components_charts_tsx_0u0c5sxi3-7ug._.js +1 -1
  659. package/server/.next/server/chunks/ssr/src_components_create_create-dialog_tsx_1s_9clly_m1ru._.js +1 -1
  660. package/server/.next/server/chunks/ssr/src_components_live_tsx_1p2s3b807w0jt._.js +1 -1
  661. package/server/.next/server/chunks/ssr/src_components_ui_dialog_tsx_1tn-i_6d3rhzt._.js +1 -1
  662. package/server/.next/server/chunks/ssr/src_lib_005l0kcpyu43o._.js +7 -2
  663. package/server/.next/server/chunks/ssr/src_lib_1zgor_vrwl5kt._.js +5 -0
  664. package/server/.next/server/chunks/ssr/src_lib_alerts_catalog_ts_1ndg28acul64q._.js +1 -1
  665. package/server/.next/server/chunks/ssr/src_lib_auth_ts_11yt3pae6wy-o._.js +1 -1
  666. package/server/.next/server/chunks/ssr/src_lib_collector_run_ts_0-q8is8s0y9cq._.js +1 -1
  667. package/server/.next/server/chunks/ssr/src_lib_collector_self-update_ts_18m5vmptpjhtg._.js +3 -0
  668. package/server/.next/server/chunks/ssr/src_lib_data_github-db_ts_02xuh84m-__8z._.js +1 -1
  669. package/server/.next/server/chunks/ssr/src_lib_data_provider-status-db_ts_09oo6p4m7x7te._.js +1 -1
  670. package/server/.next/server/chunks/ssr/{src_lib_demo_1wu-a6lubzph6._.js → src_lib_demo_07uq47fhms-3d._.js} +2 -2
  671. package/server/.next/server/chunks/ssr/src_lib_local-auth_setup_ts_05zj7z33ne4f5._.js +1 -1
  672. package/server/.next/server/chunks/ssr/src_lib_security_node-runtime_ts_1jei00s21d6v0._.js +3 -0
  673. package/server/.next/server/chunks/ssr/src_lib_view_databases_ts_1ovdbo8spjhf9._.js +1 -1
  674. package/server/.next/server/chunks/ssr/src_lib_view_labels_ts_1uxs84z7vclz5._.js +1 -1
  675. package/server/.next/server/chunks/ssr/src_lib_view_network_ts_0toa7t-gw9cup._.js +1 -1
  676. package/server/.next/server/chunks/ssr/src_private_0iy_wyg2p1jkn._.js +1 -1
  677. package/server/.next/server/chunks/ssr/src_private_actions_decide-form_tsx_1hngtxpyle3v8._.js +1 -1
  678. package/server/.next/server/chunks/ssr/src_private_ai_providers_actions_ts_0wxa36ai6s5nn._.js +1 -1
  679. package/server/.next/server/chunks/ssr/src_private_assist_questions-db_ts_1l-wvmlexd7tr._.js +1 -1
  680. package/server/.next/server/chunks/ssr/src_private_notes_notes-actions_ts_1g63g8u965fhc._.js +1 -1
  681. package/server/.next/server/middleware-build-manifest.js +105 -105
  682. package/server/.next/server/pages/404.html +1 -1
  683. package/server/.next/server/pages/500.html +1 -1
  684. package/server/.next/server/preview-props.json +3 -3
  685. package/server/.next/server/server-reference-manifest.js +1 -1
  686. package/server/.next/server/server-reference-manifest.json +858 -672
  687. package/server/.next/static/chunks/04ospu_w--6p9.js +1 -0
  688. package/server/.next/static/chunks/06a83nde7riq-.js +1 -0
  689. package/server/.next/static/chunks/088c6cw88jmlb.js +7 -0
  690. package/server/.next/static/chunks/08f1euchlacye.js +1 -0
  691. package/server/.next/static/chunks/09e-vdlax9bp6.js +1 -0
  692. package/server/.next/static/chunks/{0rgn3-cks0udn.js → 0a-rekt06v0sv.js} +1 -1
  693. package/server/.next/static/chunks/{3u3h2mlon2qu7.js → 0a4b85ckxbprh.js} +1 -1
  694. package/server/.next/static/chunks/0buwzrf7dpagn.js +1 -0
  695. package/server/.next/static/chunks/0dmql-jz-o69o.js +1 -0
  696. package/server/.next/static/chunks/{3xo5igjfumqip.js → 0jf5lpzwq4vh1.js} +1 -1
  697. package/server/.next/static/chunks/0p6hja9octhrd.js +1 -0
  698. package/server/.next/static/chunks/{3orhi-m-n-ra4.js → 0qoql97izcn4l.js} +1 -1
  699. package/server/.next/static/chunks/0qsk0bb1x81nc.js +1 -0
  700. package/server/.next/static/chunks/0wkv5e-c430ea.js +33 -0
  701. package/server/.next/static/chunks/0x41o1ud_ksl1.js +1 -0
  702. package/server/.next/static/chunks/0x_wb_w6fgkyt.js +1 -0
  703. package/server/.next/static/chunks/{319s97ka6eaex.js → 12bbufru1ui37.js} +1 -1
  704. package/server/.next/static/chunks/{1pre7l9hmk-b6.js → 12zasgv1xisb5.js} +1 -1
  705. package/server/.next/static/chunks/{2yjh4ytp-sedv.js → 149lk0boxihnl.js} +1 -1
  706. package/server/.next/static/chunks/17lwu-2id6c_-.js +1 -0
  707. package/server/.next/static/chunks/{36js6cf9c-53b.js → 1_93oj1b-nrla.js} +1 -1
  708. package/server/.next/static/chunks/1bt81ubbahkh6.js +1 -0
  709. package/server/.next/static/chunks/1c0s-ejiwfy2u.js +1 -0
  710. package/server/.next/static/chunks/1g_kip3m3h9q6.js +1 -0
  711. package/server/.next/static/chunks/1i8i1ieoh738i.js +1 -0
  712. package/server/.next/static/chunks/1s0s32oqy-54t.js +1 -0
  713. package/server/.next/static/chunks/1ss-6-h8nloc9.js +1 -0
  714. package/server/.next/static/chunks/1t8fe3w70uapo.js +1 -0
  715. package/server/.next/static/chunks/1t9f2pdc3crnr.js +1 -0
  716. package/server/.next/static/chunks/1urtw14pwufsv.js +1 -0
  717. package/server/.next/static/chunks/1wh-ps6a57yj1.js +1 -0
  718. package/server/.next/static/chunks/20ujg0hz_need.js +1 -0
  719. package/server/.next/static/chunks/{05p62k_8g05pm.js → 23b9tctw1mn5a.js} +11 -11
  720. package/server/.next/static/chunks/292uz-rsh422k.js +1 -0
  721. package/server/.next/static/chunks/{12fo0pcbpv7lw.js → 29xg947lkf4-x.js} +1 -1
  722. package/server/.next/static/chunks/2ac9gyn8mzqp4.js +1 -0
  723. package/server/.next/static/chunks/2fze_cnwk8j76.js +1 -0
  724. package/server/.next/static/chunks/2g9dossbqnlr7.js +1 -0
  725. package/server/.next/static/chunks/{0i8-ofb4wfcch.js → 2l4upq4bwgvvu.js} +1 -1
  726. package/server/.next/static/chunks/{0a5vchcarwyam.js → 2pi0r5spn0slc.js} +1 -1
  727. package/server/.next/static/chunks/2rpa_j81h_45y.js +1 -0
  728. package/server/.next/static/chunks/2szc6dvuj3gxy.js +1 -0
  729. package/server/.next/static/chunks/2u3iceaxpiiws.js +1 -0
  730. package/server/.next/static/chunks/2z21xxtcmsmhe.js +1 -0
  731. package/server/.next/static/chunks/315s21b2dd7lg.js +1 -0
  732. package/server/.next/static/chunks/35to2q1uretcv.js +1 -0
  733. package/server/.next/static/chunks/{2q88116332v43.js → 37zqf9hef7g0k.js} +1 -1
  734. package/server/.next/static/chunks/38-ay595f3xie.js +1 -0
  735. package/server/.next/static/chunks/38ao1jq4zw-nd.js +1 -0
  736. package/server/.next/static/chunks/38conxv_f-pgo.js +1 -0
  737. package/server/.next/static/chunks/3cyesi3hi6l1g.js +5 -0
  738. package/server/.next/static/chunks/{1qxc6cck2xkbs.js → 3efi_dyz4y0lj.js} +1 -1
  739. package/server/.next/static/chunks/3qjirj3rjf5mu.js +1 -0
  740. package/server/.next/static/chunks/3vpy-ra0rib9m.js +1 -0
  741. package/server/.next/static/chunks/{1o1lidcbrrh92.js → 3xxcpv79l5tnh.js} +1 -1
  742. package/server/.next/static/chunks/3ybb15n1q3f-o.css +3 -0
  743. package/server/drizzle-selfhost/0007_webhook_channel.sql +5 -0
  744. package/server/drizzle-selfhost/meta/_journal.json +7 -0
  745. package/tools/reset-login.mjs +1 -1
  746. package/server/.next/server/chunks/[root-of-the-server]__0hedtycoyydoc._.js +0 -3
  747. package/server/.next/server/chunks/ssr/1oeh_server_app_(console)_(private)_ai_agents_page_actions_1q6nc5chwn5k4.js +0 -3
  748. package/server/.next/server/chunks/ssr/1oeh_server_app_(console)_(private)_ai_models_page_actions_0n_anax2l1jpu.js +0 -3
  749. package/server/.next/server/chunks/ssr/1oeh_server_app_(console)_(private)_ai_playground_page_actions_1kyng_xuojdtb.js +0 -4
  750. package/server/.next/server/chunks/ssr/1oeh_server_app_(console)_(private)_ai_quota_page_actions_04r4ro6x7-p7p.js +0 -3
  751. package/server/.next/server/chunks/ssr/1oeh_server_app_(console)_(private)_ai_usage_page_actions_1fq9uugdpqa_l.js +0 -3
  752. package/server/.next/server/chunks/ssr/1oeh_server_app_(console)_(private)_auto-actions_page_actions_0mhtiq_5szpe0.js +0 -3
  753. package/server/.next/server/chunks/ssr/[externals]__1hqh7fi0-rtlc._.js +0 -3
  754. package/server/.next/server/chunks/ssr/[externals]__1mmmc4yhx5fm6._.js +0 -3
  755. package/server/.next/server/chunks/ssr/[externals]__1nv-uycpa6_lh._.js +0 -3
  756. package/server/.next/server/chunks/ssr/[externals]__1p5zuqwmfkoo1._.js +0 -3
  757. package/server/.next/server/chunks/ssr/[root-of-the-server]__01mgajn73iwc7._.js +0 -5
  758. package/server/.next/server/chunks/ssr/[root-of-the-server]__05q-laapy00sk._.js +0 -3
  759. package/server/.next/server/chunks/ssr/[root-of-the-server]__0dd9rci1isdjf._.js +0 -3
  760. package/server/.next/server/chunks/ssr/[root-of-the-server]__0lehuiyzxp78t._.js +0 -3
  761. package/server/.next/server/chunks/ssr/[root-of-the-server]__0tp9vtckbkk9o._.js +0 -3
  762. package/server/.next/server/chunks/ssr/[root-of-the-server]__0wcnxr_g-bd3r._.js +0 -3
  763. package/server/.next/server/chunks/ssr/[root-of-the-server]__10y2ig7dg3f-k._.js +0 -3
  764. package/server/.next/server/chunks/ssr/[root-of-the-server]__194546bqpq02e._.js +0 -3
  765. package/server/.next/server/chunks/ssr/[root-of-the-server]__1bvp2ia3h9qbs._.js +0 -3
  766. package/server/.next/server/chunks/ssr/[root-of-the-server]__1dyjzbqwy6o12._.js +0 -3
  767. package/server/.next/server/chunks/ssr/[root-of-the-server]__1l695djsioelp._.js +0 -3
  768. package/server/.next/server/chunks/ssr/[root-of-the-server]__1pfk0fqey3ipf._.js +0 -3
  769. package/server/.next/server/chunks/ssr/[root-of-the-server]__1pgpryg9lkmoz._.js +0 -3
  770. package/server/.next/server/chunks/ssr/[root-of-the-server]__1rvdnoxnu0ddf._.js +0 -3
  771. package/server/.next/server/chunks/ssr/[root-of-the-server]__1t4thrxlv4zre._.js +0 -3
  772. package/server/.next/server/chunks/ssr/[root-of-the-server]__1tuftf7fags7x._.js +0 -5
  773. package/server/.next/server/chunks/ssr/[root-of-the-server]__1vyste6xyyu37._.js +0 -3
  774. package/server/.next/server/chunks/ssr/[root-of-the-server]__1yf4_oyl-3xp7._.js +0 -3
  775. package/server/.next/server/chunks/ssr/_0-uwh2rwm_dic._.js +0 -4
  776. package/server/.next/server/chunks/ssr/_06kn13xh_13da._.js +0 -3
  777. package/server/.next/server/chunks/ssr/_06kwu83_fmex9._.js +0 -4
  778. package/server/.next/server/chunks/ssr/_0i-e824vtomvg._.js +0 -4
  779. package/server/.next/server/chunks/ssr/_0jjoot3rhbde3._.js +0 -4
  780. package/server/.next/server/chunks/ssr/_0kn710rrv_o2t._.js +0 -4
  781. package/server/.next/server/chunks/ssr/_0mgclon6_oh87._.js +0 -4
  782. package/server/.next/server/chunks/ssr/_0qcvpnwa1u3vr._.js +0 -3
  783. package/server/.next/server/chunks/ssr/_0sotiqakj-6ci._.js +0 -3
  784. package/server/.next/server/chunks/ssr/_0uogspz6zrvwk._.js +0 -4
  785. package/server/.next/server/chunks/ssr/_0wzg8e30al7bu._.js +0 -3
  786. package/server/.next/server/chunks/ssr/_0ymtfa6vo-yz5._.js +0 -3
  787. package/server/.next/server/chunks/ssr/_0yn1xeumiigj0._.js +0 -3
  788. package/server/.next/server/chunks/ssr/_10pz3ggun9s5i._.js +0 -4
  789. package/server/.next/server/chunks/ssr/_12ddramfkd6o1._.js +0 -4
  790. package/server/.next/server/chunks/ssr/_15ft896zgt02e._.js +0 -4
  791. package/server/.next/server/chunks/ssr/_1b1ano88ar-gi._.js +0 -4
  792. package/server/.next/server/chunks/ssr/_1boia2p3_0nsz._.js +0 -4
  793. package/server/.next/server/chunks/ssr/_1e24cpw3g7njr._.js +0 -4
  794. package/server/.next/server/chunks/ssr/_1e5zfwgdf0mm5._.js +0 -3
  795. package/server/.next/server/chunks/ssr/_1gvbcfoah__sl._.js +0 -3
  796. package/server/.next/server/chunks/ssr/_1h5tfqxzqd2tz._.js +0 -3
  797. package/server/.next/server/chunks/ssr/_1i77n2n-wb98v._.js +0 -4
  798. package/server/.next/server/chunks/ssr/_1k8rjvzlscs56._.js +0 -3
  799. package/server/.next/server/chunks/ssr/_1l-vlfiltmzu3._.js +0 -3
  800. package/server/.next/server/chunks/ssr/_1rf_mwfkk_9oa._.js +0 -3
  801. package/server/.next/server/chunks/ssr/_1ybhu25y38395._.js +0 -4
  802. package/server/.next/server/chunks/ssr/_210edglbxmcb3._.js +0 -4
  803. package/server/.next/server/chunks/ssr/_next-internal_server_app_(console)_(private)_ai_keys_page_actions_1910ocjt__nlh.js +0 -3
  804. package/server/.next/server/chunks/ssr/_next-internal_server_app_(console)_(private)_ai_logs_page_actions_136-s4sxl6nra.js +0 -3
  805. package/server/.next/server/chunks/ssr/_next-internal_server_app_(console)_alerts_page_actions_0f7cxitw-svnl.js +0 -3
  806. package/server/.next/server/chunks/ssr/_next-internal_server_app_(console)_apps_[id]_page_actions_14l8--w36mywn.js +0 -3
  807. package/server/.next/server/chunks/ssr/_next-internal_server_app_(console)_apps_page_actions_1zw_mdh2ep6vs.js +0 -3
  808. package/server/.next/server/chunks/ssr/_next-internal_server_app_(console)_connections_page_actions_06a1fnrawxlh1.js +0 -3
  809. package/server/.next/server/chunks/ssr/_next-internal_server_app_(console)_dns_page_actions_1p2deebbgom7b.js +0 -3
  810. package/server/.next/server/chunks/ssr/_next-internal_server_app_(console)_domains_page_actions_0-wg58qcvu_rv.js +0 -3
  811. package/server/.next/server/chunks/ssr/_next-internal_server_app_(console)_firebase_page_actions_217-u-dmlzx6a.js +0 -3
  812. package/server/.next/server/chunks/ssr/_next-internal_server_app_(console)_logs_page_actions_11-8xinblaop_.js +0 -3
  813. package/server/.next/server/chunks/ssr/_next-internal_server_app_(console)_manage_sections_page_actions_0ven9q46d3d7s.js +0 -3
  814. package/server/.next/server/chunks/ssr/_next-internal_server_app_(console)_settings_page_actions_1z3l1p4keed3m.js +0 -3
  815. package/server/.next/server/chunks/ssr/_next-internal_server_app_(console)_supabase_page_actions_1evatil08dntl.js +0 -3
  816. package/server/.next/server/chunks/ssr/_next-internal_server_app_(console)_uptime_page_actions_0k1237d-q3oc4.js +0 -3
  817. package/server/.next/server/chunks/ssr/node_modules_1_u5afwqp6brs._.js +0 -3
  818. package/server/.next/server/chunks/ssr/node_modules_next_dist_client_components_0wpq8j32_ibz4._.js +0 -3
  819. package/server/.next/server/chunks/ssr/node_modules_next_dist_client_components_builtin_forbidden_0symwr9mbf-fh.js +0 -3
  820. package/server/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_0-kg_ige9ehqj.js +0 -3
  821. package/server/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_00k37tbaia8dh.js +0 -3
  822. package/server/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_00z_p6szkga15.js +0 -3
  823. package/server/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_01-utr59mtfg1.js +0 -3
  824. package/server/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_055hw7kwif935.js +0 -3
  825. package/server/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_06fg_efdkc3kx.js +0 -3
  826. package/server/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_08f3d08smwt6_.js +0 -3
  827. package/server/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_08lcfro9qovjn.js +0 -3
  828. package/server/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_0c8wd69fns_0d.js +0 -3
  829. package/server/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_0cha-3kg99u4h.js +0 -3
  830. package/server/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_0d_0he72lzkh9.js +0 -3
  831. package/server/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_0f6chw8z5cuyg.js +0 -3
  832. package/server/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_0j9-_xhs21abp.js +0 -3
  833. package/server/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_0kwpdjujljna-.js +0 -3
  834. package/server/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_0rer2akuum5r-.js +0 -3
  835. package/server/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_0umt_achusjjb.js +0 -3
  836. package/server/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_0un7wq602mt3n.js +0 -3
  837. package/server/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_0vrdl9n7guitd.js +0 -3
  838. package/server/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_0vse2cboy4cms.js +0 -3
  839. package/server/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_0x7ey4_8b48_o.js +0 -3
  840. package/server/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_0z8l8t55t65t_.js +0 -3
  841. package/server/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_0zap6p0vuv-fp.js +0 -3
  842. package/server/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_1-m49cfu6a7gl.js +0 -3
  843. package/server/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_1-w3hswsbrppl.js +0 -3
  844. package/server/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_1167zbjp4ys_a.js +0 -3
  845. package/server/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_129serqqq3xyq.js +0 -3
  846. package/server/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_12en3pdvxu0dy.js +0 -3
  847. package/server/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_1596hk9t3r1a5.js +0 -3
  848. package/server/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_17us24ry0om-z.js +0 -3
  849. package/server/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_1_8xi22-aoxu1.js +0 -3
  850. package/server/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_1_l32aoya75_m.js +0 -3
  851. package/server/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_1ar0v26274uhj.js +0 -3
  852. package/server/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_1dkgfjoaf_1g3.js +0 -3
  853. package/server/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_1eg14m09zdg__.js +0 -3
  854. package/server/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_1h_y671y1la_8.js +0 -3
  855. package/server/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_1mkokmyyp47hd.js +0 -3
  856. package/server/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_1msjiuu45famw.js +0 -3
  857. package/server/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_1mw7isdchouml.js +0 -3
  858. package/server/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_1n4cotiug2a_r.js +0 -3
  859. package/server/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_1njl24pr6dwrt.js +0 -3
  860. package/server/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_1o1_3bydb-3j5.js +0 -3
  861. package/server/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_1pjor42_s9imf.js +0 -3
  862. package/server/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_1qta4yeufzpz7.js +0 -3
  863. package/server/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_1qxbl6k6dji0s.js +0 -3
  864. package/server/.next/server/chunks/ssr/node_modules_next_dist_esm_build_templates_app-page_21a3kf8buivxw.js +0 -3
  865. package/server/.next/server/chunks/ssr/src_0f_ip1ke7i9r7._.js +0 -3
  866. package/server/.next/server/chunks/ssr/src_0jdurlhzhcg5x._.js +0 -3
  867. package/server/.next/server/chunks/ssr/src_0ley8c3htc2q9._.js +0 -3
  868. package/server/.next/server/chunks/ssr/src_0p0fk07bj9gpq._.js +0 -3
  869. package/server/.next/server/chunks/ssr/src_0ubtruqmercw2._.js +0 -3
  870. package/server/.next/server/chunks/ssr/src_12sdm7skn8fr1._.js +0 -3
  871. package/server/.next/server/chunks/ssr/src_16lx0qdi44evh._.js +0 -3
  872. package/server/.next/server/chunks/ssr/src_17yq6_bqlwgvy._.js +0 -3
  873. package/server/.next/server/chunks/ssr/src_1n-6pz04odixj._.js +0 -3
  874. package/server/.next/server/chunks/ssr/src_app_(console)_08pmfte22v8vg._.js +0 -3
  875. package/server/.next/server/chunks/ssr/src_app_(console)_1rx84pcbevbbk._.js +0 -3
  876. package/server/.next/server/chunks/ssr/src_components_11x625pqq9ovs._.js +0 -3
  877. package/server/.next/server/chunks/ssr/src_components_1yp2m9j9dnsv-._.js +0 -3
  878. package/server/.next/server/chunks/ssr/src_components_ui_dropdown-menu_tsx_1xyz_k6bpdu_5._.js +0 -3
  879. package/server/.next/server/chunks/ssr/src_lib_collector_node-runtime_ts_0778fef3fi3zj._.js +0 -3
  880. package/server/.next/static/chunks/0-_zjfssid86w.js +0 -33
  881. package/server/.next/static/chunks/02-edmd1oolf2.css +0 -3
  882. package/server/.next/static/chunks/02e07gc948zdh.js +0 -1
  883. package/server/.next/static/chunks/073u0a0mfexc8.js +0 -1
  884. package/server/.next/static/chunks/09fx7h5vm68up.js +0 -1
  885. package/server/.next/static/chunks/0ao7_ov9mlvqp.js +0 -1
  886. package/server/.next/static/chunks/0cvmbpyjages7.js +0 -5
  887. package/server/.next/static/chunks/0hnhf3barhk90.js +0 -1
  888. package/server/.next/static/chunks/0id261ol_gl6f.js +0 -1
  889. package/server/.next/static/chunks/0q2ogu5cn9q9p.js +0 -1
  890. package/server/.next/static/chunks/0z_fqwq62_95p.js +0 -1
  891. package/server/.next/static/chunks/12l7tr29-a97t.js +0 -1
  892. package/server/.next/static/chunks/16d1ws92me6_q.js +0 -1
  893. package/server/.next/static/chunks/1__8cm_-lydee.js +0 -1
  894. package/server/.next/static/chunks/1hmur12m0hx3z.js +0 -1
  895. package/server/.next/static/chunks/205s3z3_jvp5m.js +0 -1
  896. package/server/.next/static/chunks/20cpkauaj8e6x.js +0 -7
  897. package/server/.next/static/chunks/23scyaimkowfl.js +0 -1
  898. package/server/.next/static/chunks/25meucm7i1e7b.js +0 -1
  899. package/server/.next/static/chunks/2oy7awlquezq_.js +0 -1
  900. package/server/.next/static/chunks/2pj8subq20y-_.js +0 -1
  901. package/server/.next/static/chunks/2qcurt9u9shwc.js +0 -1
  902. package/server/.next/static/chunks/2scf40c-_g_q1.js +0 -1
  903. package/server/.next/static/chunks/2tnx5isef9ryw.js +0 -1
  904. package/server/.next/static/chunks/2v_f39dz8sa3-.js +0 -1
  905. package/server/.next/static/chunks/2whojv56qi3ke.js +0 -1
  906. package/server/.next/static/chunks/2wlen-jacsbqv.js +0 -1
  907. package/server/.next/static/chunks/36bqhxadlfbfn.js +0 -1
  908. package/server/.next/static/chunks/372gugw4ldy47.js +0 -1
  909. package/server/.next/static/chunks/39n_1gky-xh0a.js +0 -1
  910. package/server/.next/static/chunks/3fv862m8cvcoe.js +0 -1
  911. package/server/.next/static/chunks/3g73nar6-7bqk.js +0 -1
  912. package/server/.next/static/chunks/3sg_npfod25zq.js +0 -1
  913. package/server/.next/static/chunks/3vacue9vhoqag.js +0 -1
  914. package/server/.next/static/chunks/3x8-w_p0n-gsd.js +0 -1
  915. package/server/.next/static/chunks/3yljsdgzvrkdf.js +0 -1
  916. package/server/.next/static/chunks/415ijq-anmr2o.js +0 -1
  917. package/server/.next/static/chunks/43wm4_0-0-eej.js +0 -1
  918. package/server/.next/static/chunks/44bizq7fli9cp.js +0 -1
  919. /package/server/.next/static/{90CuiGzddaxNn9lvRkGlH → rBXBlxKpaOHcc5KZDIhAL}/_buildManifest.js +0 -0
  920. /package/server/.next/static/{90CuiGzddaxNn9lvRkGlH → rBXBlxKpaOHcc5KZDIhAL}/_clientMiddlewareManifest.js +0 -0
  921. /package/server/.next/static/{90CuiGzddaxNn9lvRkGlH → rBXBlxKpaOHcc5KZDIhAL}/_ssgManifest.js +0 -0
@@ -1,3 +1,3 @@
1
- module.exports=[459296,a=>{"use strict";var b=a.i(137936),c=a.i(905246),d=a.i(118558),e=a.i(600079),f=a.i(109307),g=a.i(544854),h=a.i(21096),i=a.i(77608),j=a.i(966425),k=a.i(447681);class l extends Error{kind;constructor(a,b){super(b),this.kind=a}}async function m(a){let{month:b,partial:c,now:d}=a,e=(0,i.p)();if(!e)return{ok:!1,month:b,kind:"env",error:i.S};let f=await j.N();if(!f)return{ok:!1,month:b,kind:"not-connected",error:"Google Drive isn't connected."};if(!f.refreshToken){let a="The stored Google Drive token can't be read (the encryption key changed). Reconnect Google Drive.";return await j.s(f.id,{status:"error",lastError:a}),{ok:!1,month:b,kind:"failed",error:a}}let h=await j.z(b),m={sheetFileId:h?.sheetFileId??null,csvFileId:h?.csvFileId??null,driveFolderId:h?.driveFolderId??null},o=h?.status??"error";await j.W(b,{status:o,attempts:(h?.attempts??0)+1,startedAt:d});let p=a=>(m={...m,...a},j.W(b,{status:o,...a})),q={fetch:a.fetch},r=()=>{if(Date.now()>a.deadline)throw new l("time","Stopped at the daily job's time budget; the next daily run continues where this one stopped.")},s=a=>{if(!a.ok)throw new l("failed",a.error);return a.data};try{let h=await (0,i.B)(e,f.refreshToken,q);if(!h.ok){if("revoked"===h.kind)throw await j.s(f.id,{status:"error",lastError:i.L}),new l("revoked",i.L);throw new l("failed",h.error)}"error"===f.status&&await j.s(f.id,{status:"ok",lastError:null});let o=h.accessToken;r();let t=await j.M(),u=t?.id??null;if(t){let a=s(await k.f(o,t.id,q));a.usable?a.name&&a.name!==t.name&&await j.t(t.id,a.name):u=null}if(!u){r();let a=s(await k.T(o,g.R,q)),b=a?null:s(await k.T(o,g.C,q));u=a??b??s(await k.B(o,g.R,q)),await j.t(u,b?g.C:g.R)}let v=await j.f(b,c,d);r(),m.sheetFileId||await p({sheetFileId:s(await k.i(o,(0,g.F)(b),u,q)),driveFolderId:u}),r();let w=await k.A(o,m.sheetFileId,g.O,q);w.ok||"missing"!==w.kind||(await p({sheetFileId:s(await k.i(o,(0,g.F)(b),u,q)),driveFolderId:u}),r(),w=await k.A(o,m.sheetFileId,g.O,q)),s(w),r(),s(await k.c(o,m.sheetFileId,(0,g.m)(v),q)),r();let x=(0,g.b)((0,g.E)(v)),y=s(await k.G(o,{name:(0,g.V)(b),mimeType:"application/gzip",folderId:u,content:x,fileId:m.csvFileId},q));await p({csvFileId:y.id}),await j.W(b,{status:c?"partial":"ok",sizeBytes:y.size,error:null,finishedAt:new Date});let z=c?null:await n(o,d,a.deadline,q);return{ok:!0,month:b,retention:z,message:`${(0,g.n)(b)}${c?" so far":""} saved to Google Drive.`}}catch(e){let a=e instanceof l?e:new l("failed","The backup failed. The next daily run tries again.");e instanceof l||console.error("backup failed:",e instanceof Error?e.name:"unknown");let d=c&&"partial"===o?"partial":"error";return await j.W(b,{status:d,error:a.message.slice(0,500),finishedAt:new Date}).catch(()=>void 0),{ok:!1,month:b,kind:a.kind,error:a.message}}}async function n(a,b,c,d){let e=(0,g.c)(await j.e(),b),f=[];for(let h of e){if(Date.now()>c)break;let e=!0;for(let b of[h.sheetFileId,h.csvFileId])b&&((await k.$(a,b,d)).ok||(e=!1));e&&(await j.W(h.month,{status:h.status,trashedAt:b}),f.push((0,g.n)(h.month)))}return f.length?`Moved to Drive trash: ${f.join(", ")}.`:null}var o=a.i(221084),p=a.i(492665),q=a.i(312573),r=a.i(323878),s=a.i(713095);let t={requireActionMember:f.g};async function u(){return(0,e.F)("owner",async a=>{let b=(0,i.p)();if(!b)return{ok:!1,error:i.S};let{SITE_URL:d,OPS_ENCRYPTION_KEY:e}=(0,p.f)(),f=(0,i.C)(),{verifier:g,challenge:j}=(0,i.U)();return(await (0,c.cookies)()).set(h.a,(0,h.G)({state:f,verifier:g,memberId:a.id,exp:Date.now()+1e3*h.N},e),{httpOnly:!0,secure:d.startsWith("https://"),sameSite:"lax",path:h.Y,maxAge:h.N}),{ok:!0,data:{url:(0,i.a)(b,{state:f,challenge:j,redirectUri:(0,i.I)(d)})}}},t)}async function v(){return(0,e.F)("owner",async a=>{let b=await (0,j.g)();return((0,d.revalidatePath)("/backups"),(0,d.revalidatePath)("/connections"),b)?(await (0,o.f)({kind:"ok",message:"Google Drive disconnected",resourceId:null,actorUserId:a.userId}).catch(()=>void 0),{ok:!0,message:"Google Drive disconnected. The backups already in your Drive stay; remove Watchbell's access in your Google Account if you want."}):{ok:!1,error:"Google Drive isn't connected."}},t)}async function w(){return(0,e.F)("owner",async a=>{let b=await (0,r.C)(q.t.backupNow,a.id);if(!b.allowed)return{ok:!1,error:`Too many backups. Try again in ${(0,q.H)(b.retryAfter)}.`};let c=new Date,e=(0,g.L)(c),f=await m({month:e,partial:!0,now:c,deadline:Date.now()+45e3});return f.ok||"env"!==f.kind&&"not-connected"!==f.kind?(await (0,o.f)({kind:f.ok?"ok":"err",message:`Back up now \xb7 ${(0,g.n)(e)}`,resourceId:null,actorUserId:a.userId,...f.ok?{}:{detail:f.error.slice(0,200)}}).catch(()=>void 0),(0,d.revalidatePath)("/backups"),f.ok?{ok:!0,message:f.message}:{ok:!1,error:f.error}):{ok:!1,error:f.error}},t)}(0,s.ensureServerEntryExports)([u,v,w]),(0,b.registerServerReference)(u,"006f653a62baceeded3eac8f8e1321703246926a47",null),(0,b.registerServerReference)(v,"00ae8990262e164c609c12e5f4225a35be21b04731",null),(0,b.registerServerReference)(w,"00f642d4ccff699bacc54f27e6346c67f67622aa98",null),a.s(["p",0,w,"C",0,v,"A",0,u],459296)}];
1
+ module.exports=[459296,a=>{"use strict";var b=a.i(137936),c=a.i(905246),d=a.i(118558),e=a.i(600079),f=a.i(109307),g=a.i(544854),h=a.i(21096),i=a.i(77608),j=a.i(966425),k=a.i(447681);class l extends Error{kind;constructor(a,b){super(b),this.kind=a}}async function m(a){let{month:b,partial:c,now:d}=a,e=(0,i.p)();if(!e)return{ok:!1,month:b,kind:"env",error:i.S};let f=await j.N();if(!f)return{ok:!1,month:b,kind:"not-connected",error:"Google Drive isn't connected."};if(!f.refreshToken){let a="The stored Google Drive token can't be read (the encryption key changed). Reconnect Google Drive.";return await j.s(f.id,{status:"error",lastError:a}),{ok:!1,month:b,kind:"failed",error:a}}let h=await j.z(b),m={sheetFileId:h?.sheetFileId??null,csvFileId:h?.csvFileId??null,driveFolderId:h?.driveFolderId??null},o=h?.status??"error";await j.W(b,{status:o,attempts:(h?.attempts??0)+1,startedAt:d});let p=a=>(m={...m,...a},j.W(b,{status:o,...a})),q={fetch:a.fetch},r=()=>{if(Date.now()>a.deadline)throw new l("time","Stopped at the daily job's time budget; the next daily run continues where this one stopped.")},s=a=>{if(!a.ok)throw new l("failed",a.error);return a.data};try{let h=await (0,i.B)(e,f.refreshToken,q);if(!h.ok){if("revoked"===h.kind)throw await j.s(f.id,{status:"error",lastError:i.L}),new l("revoked",i.L);throw new l("failed",h.error)}"error"===f.status&&await j.s(f.id,{status:"ok",lastError:null});let o=h.accessToken;r();let t=await j.M(),u=t?.id??null;if(t){let a=s(await k.f(o,t.id,q));a.usable?a.name&&a.name!==t.name&&await j.t(t.id,a.name):u=null}if(!u){r();let a=s(await k.T(o,g.R,q)),b=a?null:s(await k.T(o,g.C,q));u=a??b??s(await k.B(o,g.R,q)),await j.t(u,b?g.C:g.R)}let v=await j.f(b,c,d);r(),m.sheetFileId||await p({sheetFileId:s(await k.i(o,(0,g.F)(b),u,q)),driveFolderId:u}),r();let w=await k.A(o,m.sheetFileId,g.O,q);w.ok||"missing"!==w.kind||(await p({sheetFileId:s(await k.i(o,(0,g.F)(b),u,q)),driveFolderId:u}),r(),w=await k.A(o,m.sheetFileId,g.O,q)),s(w),r(),s(await k.c(o,m.sheetFileId,(0,g.m)(v),q)),r();let x=(0,g.b)((0,g.E)(v)),y=s(await k.G(o,{name:(0,g.V)(b),mimeType:"application/gzip",folderId:u,content:x,fileId:m.csvFileId},q));await p({csvFileId:y.id}),await j.W(b,{status:c?"partial":"ok",sizeBytes:y.size,error:null,finishedAt:new Date});let z=c?null:await n(o,d,a.deadline,q);return{ok:!0,month:b,retention:z,message:`${(0,g.n)(b)}${c?" so far":""} saved to Google Drive.`}}catch(e){let a=e instanceof l?e:new l("failed","The backup failed. The next daily run tries again.");e instanceof l||console.error("backup failed:",e instanceof Error?e.name:"unknown");let d=c&&"partial"===o?"partial":"error";return await j.W(b,{status:d,error:a.message.slice(0,500),finishedAt:new Date}).catch(()=>void 0),{ok:!1,month:b,kind:a.kind,error:a.message}}}async function n(a,b,c,d){let e=(0,g.c)(await j.e(),b),f=[];for(let h of e){if(Date.now()>c)break;let e=!0;for(let b of[h.sheetFileId,h.csvFileId])b&&((await k.$(a,b,d)).ok||(e=!1));e&&(await j.W(h.month,{status:h.status,trashedAt:b}),f.push((0,g.n)(h.month)))}return f.length?`Moved to Drive trash: ${f.join(", ")}.`:null}var o=a.i(221084),p=a.i(492665),q=a.i(312573),r=a.i(323878),s=a.i(713095);let t={requireActionMember:f.g};async function u(){return(0,e.F)("owner",async a=>{let b=(0,i.p)();if(!b)return{ok:!1,error:i.S};let{SITE_URL:d,OPS_ENCRYPTION_KEY:e}=(0,p.f)(),f=(0,i.C)(),{verifier:g,challenge:j}=(0,i.U)();return(await (0,c.cookies)()).set(h.a,(0,h.G)({state:f,verifier:g,memberId:a.id,exp:Date.now()+1e3*h.N},e),{httpOnly:!0,secure:d.startsWith("https://"),sameSite:"lax",path:h.Y,maxAge:h.N}),{ok:!0,data:{url:(0,i.a)(b,{state:f,challenge:j,redirectUri:(0,i.I)(d)})}}},t)}async function v(){return(0,e.F)("owner",async a=>{let b=await (0,j.g)();return((0,d.revalidatePath)("/backups"),(0,d.revalidatePath)("/connections"),b)?(await (0,o.f)({kind:"ok",message:"Google Drive disconnected",resourceId:null,actorUserId:a.userId}).catch(()=>void 0),{ok:!0,message:"Google Drive disconnected. The backups already in your Drive stay; remove Watchbell's access in your Google Account if you want."}):{ok:!1,error:"Google Drive isn't connected."}},t)}async function w(){return(0,e.F)("owner",async a=>{let b=await (0,r.C)(q.t.backupNow,a.id);if(!b.allowed)return{ok:!1,error:`Too many backups. Try again in ${(0,q.H)(b.retryAfter)}.`};let c=new Date,e=(0,g.L)(c),f=await m({month:e,partial:!0,now:c,deadline:Date.now()+45e3});return f.ok||"env"!==f.kind&&"not-connected"!==f.kind?(await (0,o.f)({kind:f.ok?"ok":"err",message:`Back up now \xb7 ${(0,g.n)(e)}`,resourceId:null,actorUserId:a.userId,...f.ok?{}:{detail:f.error.slice(0,200)}}).catch(()=>void 0),(0,d.revalidatePath)("/backups"),f.ok?{ok:!0,message:f.message}:{ok:!1,error:f.error}):{ok:!1,error:f.error}},t)}(0,s.ensureServerEntryExports)([u,v,w]),(0,b.registerServerReference)(u,"004c55e25639cd5133154fdf7806d4ae3f0e599f87",null),(0,b.registerServerReference)(v,"00eac06b4de02d269b8a5db97d9a5099db912cce77",null),(0,b.registerServerReference)(w,"00a0bc313fe19d1c6924d9180b963735854cd08908",null),a.s(["p",0,w,"C",0,v,"A",0,u],459296)}];
2
2
 
3
3
  //# sourceMappingURL=src_app_%28console%29_backups_actions_ts_1vpytsdh0wc1f._.js.map
@@ -1,3 +1,3 @@
1
- module.exports=[43963,a=>{"use strict";var b=a.i(187924),c=a.i(572131),d=a.i(823292),e=a.i(611619),f=a.i(619089),g=a.i(405050);let h=(0,g.createServerReference)("00f642d4ccff699bacc54f27e6346c67f67622aa98",g.callServer,void 0,g.findSourceMapURL,"backUpNow"),i=(0,g.createServerReference)("00ae8990262e164c609c12e5f4225a35be21b04731",g.callServer,void 0,g.findSourceMapURL,"disconnectDrive"),j=(0,g.createServerReference)("006f653a62baceeded3eac8f8e1321703246926a47",g.callServer,void 0,g.findSourceMapURL,"startDriveConnect");a.s(["BackUpNowButton",0,function({monthLabel:a,disabled:e}){let[g,i]=(0,c.useTransition)(),j=(0,c.useRef)(!1);return(0,b.jsx)(f.K,{onClick:()=>{if(j.current)return;j.current=!0;let b=d.c.loading(`Backing up ${a} so far. It will appear here in a few seconds.`);i(async()=>{try{let a=await h();a.ok?d.c.success(a.message??"Saved to Google Drive.",{id:b}):d.c.error(a.error,{id:b})}catch{d.c.error("Something went wrong. Try again.",{id:b})}finally{j.current=!1}})},disabled:g||e,children:g?"Backing up…":"Back up now"})},"DisconnectDriveButton",0,function(){return(0,b.jsx)(e.f,{trigger:(0,b.jsx)(f.K,{size:"sm",children:"Disconnect"}),title:"Disconnect Google Drive?",body:"The console forgets its access and stops the monthly backups. The backups already in your Drive stay where they are.",cta:"Disconnect",danger:!0,onConfirm:async()=>{let a=await i();return{ok:a.ok,message:(a.ok?a.message:a.error)??""}}})},"DriveConnectButton",0,function({reconnect:a=!1,quiet:c=!1,size:d="md"}){return(0,b.jsx)(e.f,{trigger:(0,b.jsx)(f.K,{size:d,variant:c?"secondary":"primary",children:c?"Reconnect":a?"Reconnect Google Drive":"Connect Google Drive"}),title:a?"Reconnect Google Drive":"Connect Google Drive",body:(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("p",{className:"mb-2",children:"Google will ask you to approve one permission:"}),(0,b.jsx)("p",{className:"mb-2 rounded-md border border-line bg-sunken px-3 py-2 text-ink-soft",children:"See, edit, create, and delete only the specific Google Drive files you use with this app."}),(0,b.jsxs)("ul",{className:"list-disc space-y-0.5 pl-5 text-ink-soft",children:[(0,b.jsx)("li",{children:"The console can't see any of your other files."}),(0,b.jsx)("li",{children:"It uses one folder: the backups folder it made before, or a new one named Watchbell backups."}),(0,b.jsx)("li",{children:"You can remove access any time in your Google Account settings."})]})]}),cta:"Continue to Google",onConfirm:async()=>{let a=await j();return a.ok&&a.data?(window.location.assign(a.data.url),{ok:!0,message:"Opening Google…"}):{ok:!1,message:a.ok?"Something went wrong. Try again.":a.error}}})}],43963)}];
1
+ module.exports=[43963,a=>{"use strict";var b=a.i(187924),c=a.i(572131),d=a.i(823292),e=a.i(611619),f=a.i(619089),g=a.i(405050);let h=(0,g.createServerReference)("00a0bc313fe19d1c6924d9180b963735854cd08908",g.callServer,void 0,g.findSourceMapURL,"backUpNow"),i=(0,g.createServerReference)("00eac06b4de02d269b8a5db97d9a5099db912cce77",g.callServer,void 0,g.findSourceMapURL,"disconnectDrive"),j=(0,g.createServerReference)("004c55e25639cd5133154fdf7806d4ae3f0e599f87",g.callServer,void 0,g.findSourceMapURL,"startDriveConnect");a.s(["BackUpNowButton",0,function({monthLabel:a,disabled:e}){let[g,i]=(0,c.useTransition)(),j=(0,c.useRef)(!1);return(0,b.jsx)(f.K,{onClick:()=>{if(j.current)return;j.current=!0;let b=d.c.loading(`Backing up ${a} so far. It will appear here in a few seconds.`);i(async()=>{try{let a=await h();a.ok?d.c.success(a.message??"Saved to Google Drive.",{id:b}):d.c.error(a.error,{id:b})}catch{d.c.error("Watchbell didn't answer. Check that it's still running, then try again.",{id:b})}finally{j.current=!1}})},disabled:g||e,children:g?"Backing up…":"Back up now"})},"DisconnectDriveButton",0,function(){return(0,b.jsx)(e.f,{trigger:(0,b.jsx)(f.K,{size:"sm",children:"Disconnect"}),title:"Disconnect Google Drive?",body:"The console forgets its access and stops the monthly backups. The backups already in your Drive stay where they are.",cta:"Disconnect",danger:!0,onConfirm:async()=>{let a=await i();return{ok:a.ok,message:(a.ok?a.message:a.error)??""}}})},"DriveConnectButton",0,function({reconnect:a=!1,quiet:c=!1,size:d="md"}){return(0,b.jsx)(e.f,{trigger:(0,b.jsx)(f.K,{size:d,variant:c?"secondary":"primary",children:c?"Reconnect":a?"Reconnect Google Drive":"Connect Google Drive"}),title:a?"Reconnect Google Drive":"Connect Google Drive",body:(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("p",{className:"mb-2",children:"Google will ask you to approve one permission:"}),(0,b.jsx)("p",{className:"mb-2 rounded-md border border-line bg-sunken px-3 py-2 text-ink-soft",children:"See, edit, create, and delete only the specific Google Drive files you use with this app."}),(0,b.jsxs)("ul",{className:"list-disc space-y-0.5 pl-5 text-ink-soft",children:[(0,b.jsx)("li",{children:"The console can't see any of your other files."}),(0,b.jsx)("li",{children:"It uses one folder: the backups folder it made before, or a new one named Watchbell backups."}),(0,b.jsx)("li",{children:"You can remove access any time in your Google Account settings."})]})]}),cta:"Continue to Google",onConfirm:async()=>{let a=await j();return a.ok&&a.data?(window.location.assign(a.data.url),{ok:!0,message:"Opening Google…"}):{ok:!1,message:a.ok?"Watchbell didn't answer. Check that it's still running, then try again.":a.error}}})}],43963)}];
2
2
 
3
3
  //# sourceMappingURL=src_app_%28console%29_backups_drive-buttons_tsx_00cku5r_z3jkg._.js.map
@@ -1,3 +1,3 @@
1
- module.exports=[[863333,a=>{var b=a.i(211857);let c=(0,b.registerClientReference)(function(){throw Error("Attempted to call RemoveAccountButton() from the server but RemoveAccountButton is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/src/app/(console)/connections/account-actions.tsx","RemoveAccountButton"),d=(0,b.registerClientReference)(function(){throw Error("Attempted to call RetestButton() from the server but RetestButton is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/src/app/(console)/connections/account-actions.tsx","RetestButton");a.s(["RemoveAccountButton",0,c,"RetestButton",0,d])},207179,a=>{var b=a.i(863333);a.n(b)},273981,a=>{let b=(0,a.i(211857).registerClientReference)(function(){throw Error("Attempted to call GithubSyncButton() from the server but GithubSyncButton is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/src/app/(console)/connections/github-sync-button.tsx","GithubSyncButton");a.s(["GithubSyncButton",0,b])},412159,a=>{var b=a.i(273981);a.n(b)},157372,a=>{var b=a.i(907997),c=a.i(530385),d=a.i(93321),e=a.i(395936),f=a.i(803681),g=a.i(75148),h=a.i(548734),i=a.i(837137),j=a.i(109068),k=a.i(109307),l=a.i(544854),m=a.i(77608),n=a.i(462820),o=a.i(358179),p=a.i(966425),q=a.i(944571),r=a.i(322145),s=a.i(492665),t=a.i(371289),u=a.i(686921),v=a.i(45468),w=a.i(245710),x=a.i(646322),y=a.i(564371),z=a.i(160147);let A=["hosting","database","devops"].map(a=>({id:a,title:z.Z[a].label}));var B=a.i(556987),C=a.i(993835),D=a.i(362990),E=a.i(154756),F=a.i(686251),G=a.i(207179),H=a.i(801168),I=a.i(412159),J=a.i(532380);let K={ok:"ok",off:"warn",faint:"off"};function L({hint:a}){return(0,b.jsxs)("div",{className:`mt-0.5 flex items-start gap-1.5 text-[12px] ${"faint"===a.tone?"text-ink-faint":""}`,children:[(0,b.jsx)("span",{className:"mt-px",children:(0,b.jsx)(F.Z,{state:K[a.tone],size:14})}),(0,b.jsx)("span",{children:a.text})]})}function M({m:a}){return a?"repos"in a?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("span",{className:"font-mono",children:a.repos}),(0,b.jsxs)("span",{className:"text-ink-faint",children:[" repos · ",a.linked," linked"]})]}):0===a.total?(0,b.jsx)("span",{className:"text-ink-faint",children:"—"}):(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("span",{className:"font-mono",children:a.on}),(0,b.jsxs)("span",{className:"text-ink-faint",children:[" of ",a.total]}),a.fresh>0&&(0,b.jsxs)("span",{className:"ml-1.5 rounded bg-brand-soft px-1.5 py-px font-mono text-[10.5px] text-brand",children:[a.fresh," new"]})]}):(0,b.jsx)("span",{className:"text-ink-faint",children:"—"})}function N({term:a,children:c}){return(0,b.jsxs)("div",{className:"min-w-0",children:[(0,b.jsx)("dt",{className:"text-[12px] text-ink-faint",children:a}),(0,b.jsx)("dd",{className:"text-[13px]",children:c})]})}let O="px-[18px] pb-1 pt-4 text-[13px] font-medium text-ink-soft";function P({provider:a,accounts:c,demo:d}){let e=u.m[a],f=e.multiAccount||0===c.length;return(0,b.jsxs)(b.Fragment,{children:[c.length>0&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("h3",{className:O,children:1===c.length?"Account":`Accounts (${c.length})`}),(0,b.jsx)("ul",{className:"border-b border-line",children:c.map(c=>{let f=`${e.name} \xb7 ${(0,B.G)(c.label)}`;return(0,b.jsxs)("li",{className:"border-t border-line px-[18px] py-3 first:border-t-0",children:[(0,b.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,b.jsx)(E.c,{name:c.label}),(0,b.jsx)("span",{className:"ml-auto",children:c.problem?(0,b.jsx)(F.F,{state:"err",children:(0,B.G)(c.problem)}):(0,b.jsx)(F.F,{state:"ok",children:d?"Demo account":"Connected"})})]}),(0,b.jsxs)("dl",{className:"mt-2 grid grid-cols-2 gap-x-4 gap-y-2 max-[520px]:grid-cols-1",children:[(0,b.jsx)(N,{term:"Credential",children:c.credentialKind}),(0,b.jsx)(N,{term:"Expires",children:(0,b.jsx)("span",{className:"text-ink-soft",children:c.expires})}),(0,b.jsxs)(N,{term:"Access",children:[(0,b.jsx)("span",{className:"text-ink-soft",children:c.scopeNote}),c.hint&&(0,b.jsx)(L,{hint:c.hint})]}),(0,b.jsx)(N,{term:"Monitored",children:(0,b.jsx)(M,{m:c.monitored})}),(0,b.jsx)(N,{term:"Last sync",children:(0,b.jsx)("span",{className:"text-ink-soft",children:c.lastSync})})]}),(0,b.jsxs)("div",{className:"mt-2.5 flex flex-wrap gap-1.5",children:[!c.problem&&"github_write"!==a&&("github"===a?(0,b.jsx)(I.GithubSyncButton,{accountId:c.id}):(0,b.jsx)(J.SyncButton,{accountId:c.id,title:f,watchNew:c.watchNew,kind:v.f[a]})),!c.unreadable&&(0,b.jsx)(G.RetestButton,{accountId:c.id}),(0,b.jsx)(H.AccountDialog,{provider:a,replace:{id:c.id,label:c.label},primary:null!==c.problem}),(0,b.jsx)(G.RemoveAccountButton,{accountId:c.id,title:f})]})]},c.id)})})]}),f?(0,b.jsxs)("section",{"aria-label":0===c.length?`Connect ${e.name}`:"Add another account",children:[(0,b.jsx)("h3",{className:O,children:0===c.length?`Connect ${e.name}`:"Add another account"}),(0,b.jsx)("p",{className:"px-[18px] pb-2 text-[12.5px] text-ink-soft",children:"The credential is encrypted before it's saved and never shown again."}),(0,b.jsx)(H.AccountForm,{provider:a})]}):(0,b.jsxs)("p",{className:"px-[18px] py-4 text-[12.5px] text-ink-soft",children:["One ",e.name," account per Watchbell. Replace its credential above, or remove it to connect a different one."]})]})}var Q=a.i(103493);let R={env:{state:"off",text:"Not set up"},none:{state:"off",text:"Not connected"},ok:{state:"ok",text:"Connected"},reconnect:{state:"err",text:"Reconnect needed"},problem:{state:"warn",text:"Connected · last run failed"}};async function S({searchParams:a}={}){var E,F;let G,H=await (0,k.B)("owner");if(!H.ok)return(0,b.jsx)(g.f,{role:H.member.role});let I="drive"===(G=Array.isArray(E=(await a)?.provider)?E[0]:E)?"drive":G&&u.L.includes(G)?G:null,J=(0,s.f)().OPS_ENCRYPTION_KEY,[K,L]=await Promise.all([(0,h.f)().select().from(i.accounts).orderBy((0,c.M)(i.accounts.createdAt)),(0,h.f)().select({accountId:i.resources.accountId,kind:i.resources.kind,monitored:i.resources.monitored,firstSeenAt:i.resources.firstSeenAt,goneAt:i.resources.goneAt}).from(i.resources).where((0,d.y)(i.resources.kind,Object.values(v.f)))]),[M,N,O]=await Promise.all([(0,r.f)(K.map(a=>a.id)),(0,q.w)(),(0,p.M)()]),T=(0,t.W)(),U=K.map(a=>{let b="drive"===a.provider||T?null:(0,j.A)((0,o.V)({ciphertext:a.credentialCiphertext,iv:a.credentialIv},J));return{...a,unreadable:null!==b,problem:b??("error"===a.status?a.lastError:null)}}),V=new Date,W=U.filter(a=>a.problem),X=(0,y.O)(null!==(0,m.p)(),U.find(a=>"drive"===a.provider)??null),Y=(F=U.filter(a=>"drive"!==a.provider),A.map(({id:a,title:b})=>({section:a,title:b,tiles:u.L.filter(b=>z.D[b]===a).map(a=>{let b=F.filter(b=>b.provider===a);return{provider:a,accounts:b.length,attention:b.filter(a=>a.problem).length}})})).filter(a=>a.tiles.length>0)),Z="grid grid-cols-[repeat(auto-fill,minmax(230px,1fr))] gap-2.5",$="mb-2 text-[13px] font-medium text-ink-soft";return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(f.L,{crumbs:[{label:"Manage"},{label:"Connections"}],title:"Connections",sub:`Credentials are encrypted (AES-256-GCM) before they're stored. The key lives in ${n.n.keyHome}, and credentials never reach the browser. Sync lists everything in an account, and you choose what the console watches.`}),W.length>0&&(0,b.jsxs)(f.M,{tone:"danger",title:`${W.length} connection${W.length>1?"s need":" needs"} attention`,children:[W.map(a=>`${a.provider} \xb7 ${(0,B.G)(a.label)}`).join(", "),". Data from ",W.length>1?"these accounts is":"this account is"," not being updated."]}),Y.map(a=>(0,b.jsxs)("section",{"aria-labelledby":`sec-${a.section}`,"data-section":a.section,children:[(0,b.jsx)("h2",{id:`sec-${a.section}`,className:$,children:a.title}),(0,b.jsx)("div",{className:Z,children:a.tiles.map(a=>{let c,d=u.m[a.provider];return(0,b.jsx)(D.ProviderDrawer,{name:d.name,note:d.note,icon:d.icon,line:0===a.accounts?{state:"off",text:"Not connected"}:a.attention>0?{state:"err",text:1===a.attention&&1===a.accounts?"Needs attention":`${a.attention} of ${a.accounts} ${1===a.attention?"needs":"need"} attention`}:{state:"ok",text:1===a.accounts?"Connected":`${a.accounts} accounts connected`},defaultOpen:I===a.provider,children:(0,b.jsx)(P,{provider:a.provider,accounts:(c=a.provider,U.filter(a=>a.provider===c).map(a=>{let b=(0,v.K)(c);return{id:a.id,label:a.label,credentialKind:a.credentialKind,scopeNote:a.scopeNote,hint:(0,x.f)(a.provider,M.get(a.id),a.scopeNote),expires:(0,w.A)(a.expiresAt,V),lastSync:(0,w.K)(a.lastSyncAt,V),problem:a.problem,unreadable:a.unreadable,watchNew:a.watchNew,monitored:"github"===c?N.get(a.id)??null:b?(0,v.D)(L.filter(b=>b.accountId===a.id),V,b):null}})),demo:T})},a.provider)})})]},a.section)),(0,b.jsxs)("section",{"aria-labelledby":"sec-manage","data-section":"manage",children:[(0,b.jsx)("h2",{id:"sec-manage",className:$,children:"Manage"}),(0,b.jsx)("div",{className:Z,children:(0,b.jsx)(D.ProviderDrawer,{name:"Google Drive",note:"Monthly backups. The app can only see the files it creates (drive.file).",icon:"drive",line:R[X.kind],defaultOpen:"drive"===I,children:(0,b.jsxs)("div",{className:"px-[18px] py-4",children:[(0,b.jsx)(C.f,{state:X,folderName:(0,l.A)(O),showDisconnect:!0}),(0,b.jsxs)("p",{className:"mt-3 text-[12.5px] text-ink-soft",children:["Schedule, history and restore are on ",(0,b.jsx)(e.default,{href:"/backups",children:"Backups"}),"."]})]})})})]}),(0,b.jsx)(Q.f,{})]})}a.s(["default",0,S],157372)},19251,a=>{let b=(0,a.i(211857).registerClientReference)(function(){throw Error("Attempted to call ProviderDrawer() from the server but ProviderDrawer is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/src/app/(console)/connections/provider-drawer.tsx","ProviderDrawer");a.s(["ProviderDrawer",0,b])},362990,a=>{var b=a.i(19251);a.n(b)}],476227,function(a){a.n(a.i(157372))}];
1
+ module.exports=[[863333,a=>{var b=a.i(211857);let c=(0,b.registerClientReference)(function(){throw Error("Attempted to call RemoveAccountButton() from the server but RemoveAccountButton is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/src/app/(console)/connections/account-actions.tsx","RemoveAccountButton"),d=(0,b.registerClientReference)(function(){throw Error("Attempted to call RetestButton() from the server but RetestButton is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/src/app/(console)/connections/account-actions.tsx","RetestButton");a.s(["RemoveAccountButton",0,c,"RetestButton",0,d])},207179,a=>{var b=a.i(863333);a.n(b)},273981,a=>{let b=(0,a.i(211857).registerClientReference)(function(){throw Error("Attempted to call GithubSyncButton() from the server but GithubSyncButton is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/src/app/(console)/connections/github-sync-button.tsx","GithubSyncButton");a.s(["GithubSyncButton",0,b])},412159,a=>{var b=a.i(273981);a.n(b)},157372,a=>{var b=a.i(907997),c=a.i(530385),d=a.i(93321),e=a.i(395936),f=a.i(803681),g=a.i(75148),h=a.i(548734),i=a.i(837137),j=a.i(109068),k=a.i(109307),l=a.i(544854),m=a.i(77608),n=a.i(462820),o=a.i(358179),p=a.i(966425),q=a.i(944571),r=a.i(322145),s=a.i(492665),t=a.i(371289),u=a.i(686921),v=a.i(45468),w=a.i(245710),x=a.i(646322),y=a.i(564371),z=a.i(160147);let A=["hosting","database","devops"].map(a=>({id:a,title:z.Z[a].label}));var B=a.i(556987),C=a.i(993835),D=a.i(362990),E=a.i(154756),F=a.i(686251),G=a.i(207179),H=a.i(801168),I=a.i(412159),J=a.i(532380);let K={ok:"ok",off:"warn",faint:"off"};function L({hint:a}){return(0,b.jsxs)("div",{className:`mt-0.5 flex items-start gap-1.5 text-[12px] ${"faint"===a.tone?"text-ink-faint":""}`,children:[(0,b.jsx)("span",{className:"mt-px",children:(0,b.jsx)(F.Z,{state:K[a.tone],size:14})}),(0,b.jsx)("span",{children:a.text})]})}function M({m:a}){return a?"repos"in a?(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("span",{className:"font-mono",children:a.repos}),(0,b.jsxs)("span",{className:"text-ink-faint",children:[" repos · ",a.linked," linked"]})]}):0===a.total?(0,b.jsx)("span",{className:"text-ink-faint",children:"—"}):(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("span",{className:"font-mono",children:a.on}),(0,b.jsxs)("span",{className:"text-ink-faint",children:[" of ",a.total]}),a.fresh>0&&(0,b.jsxs)("span",{className:"ml-1.5 rounded bg-brand-soft px-1.5 py-px font-mono text-[10.5px] text-brand",children:[a.fresh," new"]})]}):(0,b.jsx)("span",{className:"text-ink-faint",children:"—"})}function N({term:a,children:c}){return(0,b.jsxs)("div",{className:"min-w-0",children:[(0,b.jsx)("dt",{className:"text-[12px] text-ink-faint",children:a}),(0,b.jsx)("dd",{className:"text-[13px]",children:c})]})}let O="px-[18px] pb-1 pt-4 text-[13px] font-medium text-ink-soft";function P({provider:a,accounts:c,demo:d}){let e=u.m[a],f=e.multiAccount||0===c.length;return(0,b.jsxs)(b.Fragment,{children:[c.length>0&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("h3",{className:O,children:1===c.length?"Account":`Accounts (${c.length})`}),(0,b.jsx)("ul",{className:"border-b border-line",children:c.map(c=>{let f=`${e.name} \xb7 ${(0,B.G)(c.label)}`,g=c.monitored&&"repos"in c.monitored?c.monitored.gaps:null;return(0,b.jsxs)("li",{className:"border-t border-line px-[18px] py-3 first:border-t-0",children:[(0,b.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,b.jsx)(E.c,{name:c.label}),(0,b.jsx)("span",{className:"ml-auto",children:c.problem?(0,b.jsx)(F.F,{state:"err",children:(0,B.G)(c.problem)}):g?(0,b.jsx)(F.F,{state:"warn",children:"Connected, some reads refused"}):(0,b.jsx)(F.F,{state:"ok",children:d?"Demo account":"Connected"})})]}),!c.problem&&g&&(0,b.jsxs)("p",{className:"mt-1.5 flex items-start gap-1.5 text-[12.5px] text-ink-soft",children:[(0,b.jsx)("span",{className:"mt-px",children:(0,b.jsx)(F.Z,{state:"warn",size:14})}),(0,b.jsx)("span",{children:g})]}),(0,b.jsxs)("dl",{className:"mt-2 grid grid-cols-2 gap-x-4 gap-y-2 max-[520px]:grid-cols-1",children:[(0,b.jsx)(N,{term:"Credential",children:c.credentialKind}),(0,b.jsx)(N,{term:"Expires",children:(0,b.jsx)("span",{className:"text-ink-soft",children:c.expires})}),(0,b.jsxs)(N,{term:"Access",children:[(0,b.jsx)("span",{className:"text-ink-soft",children:c.scopeNote}),c.hint&&(0,b.jsx)(L,{hint:c.hint})]}),(0,b.jsx)(N,{term:"Monitored",children:(0,b.jsx)(M,{m:c.monitored})}),(0,b.jsx)(N,{term:"Last sync",children:(0,b.jsx)("span",{className:"text-ink-soft",children:c.lastSync})})]}),(0,b.jsxs)("div",{className:"mt-2.5 flex flex-wrap gap-1.5",children:[!c.problem&&"github_write"!==a&&("github"===a?(0,b.jsx)(I.GithubSyncButton,{accountId:c.id}):(0,b.jsx)(J.SyncButton,{accountId:c.id,title:f,watchNew:c.watchNew,kind:v.f[a]})),!c.unreadable&&(0,b.jsx)(G.RetestButton,{accountId:c.id}),(0,b.jsx)(H.AccountDialog,{provider:a,replace:{id:c.id,label:c.label},primary:null!==c.problem}),(0,b.jsx)(G.RemoveAccountButton,{accountId:c.id,title:f})]})]},c.id)})})]}),f?(0,b.jsxs)("section",{"aria-label":0===c.length?`Connect ${e.name}`:"Add another account",children:[(0,b.jsx)("h3",{className:O,children:0===c.length?`Connect ${e.name}`:"Add another account"}),(0,b.jsx)("p",{className:"px-[18px] pb-2 text-[12.5px] text-ink-soft",children:"The credential is encrypted before it's saved and never shown again."}),(0,b.jsx)(H.AccountForm,{provider:a})]}):(0,b.jsxs)("p",{className:"px-[18px] py-4 text-[12.5px] text-ink-soft",children:["One ",e.name," account per Watchbell. Replace its credential above, or remove it to connect a different one."]})]})}var Q=a.i(103493);let R={env:{state:"off",text:"Not set up"},none:{state:"off",text:"Not connected"},ok:{state:"ok",text:"Connected"},reconnect:{state:"err",text:"Reconnect needed"},problem:{state:"warn",text:"Connected · last run failed"}};async function S({searchParams:a}={}){var E,F;let G,H=await (0,k.B)("owner");if(!H.ok)return(0,b.jsx)(g.f,{role:H.member.role});let I="drive"===(G=Array.isArray(E=(await a)?.provider)?E[0]:E)?"drive":G&&u.L.includes(G)?G:null,J=(0,s.f)().OPS_ENCRYPTION_KEY,[K,L]=await Promise.all([(0,h.f)().select().from(i.accounts).orderBy((0,c.M)(i.accounts.createdAt)),(0,h.f)().select({accountId:i.resources.accountId,kind:i.resources.kind,monitored:i.resources.monitored,firstSeenAt:i.resources.firstSeenAt,goneAt:i.resources.goneAt}).from(i.resources).where((0,d.y)(i.resources.kind,Object.values(v.f)))]),[M,N,O]=await Promise.all([(0,r.f)(K.map(a=>a.id)),(0,q.w)(),(0,p.M)()]),T=(0,t.W)(),U=K.map(a=>{let b="drive"===a.provider||T?null:(0,j.A)((0,o.V)({ciphertext:a.credentialCiphertext,iv:a.credentialIv},J));return{...a,unreadable:null!==b,problem:b??("error"===a.status?a.lastError:null)}}),V=new Date,W=U.filter(a=>a.problem),X=(0,y.O)(null!==(0,m.p)(),U.find(a=>"drive"===a.provider)??null),Y=(F=U.filter(a=>"drive"!==a.provider),A.map(({id:a,title:b})=>({section:a,title:b,tiles:u.L.filter(b=>z.D[b]===a).map(a=>{let b=F.filter(b=>b.provider===a);return{provider:a,accounts:b.length,attention:b.filter(a=>a.problem).length}})})).filter(a=>a.tiles.length>0)),Z="grid grid-cols-[repeat(auto-fill,minmax(230px,1fr))] gap-2.5",$="mb-2 text-[13px] font-medium text-ink-soft";return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(f.L,{crumbs:[{label:"Manage"},{label:"Connections"}],title:"Connections",sub:`Credentials are encrypted (AES-256-GCM) before they're stored. The key lives in ${n.n.keyHome}, and credentials never reach the browser. Sync lists everything in an account, and you choose what the console watches.`}),W.length>0&&(0,b.jsxs)(f.M,{tone:"danger",title:`${W.length} connection${W.length>1?"s need":" needs"} attention`,children:[W.map(a=>`${a.provider} \xb7 ${(0,B.G)(a.label)}`).join(", "),". Data from ",W.length>1?"these accounts is":"this account is"," not being updated."]}),Y.map(a=>(0,b.jsxs)("section",{"aria-labelledby":`sec-${a.section}`,"data-section":a.section,children:[(0,b.jsx)("h2",{id:`sec-${a.section}`,className:$,children:a.title}),(0,b.jsx)("div",{className:Z,children:a.tiles.map(a=>{let c,d=u.m[a.provider];return(0,b.jsx)(D.ProviderDrawer,{name:d.name,note:d.note,icon:d.icon,line:0===a.accounts?{state:"off",text:"Not connected"}:a.attention>0?{state:"err",text:1===a.attention&&1===a.accounts?"Needs attention":`${a.attention} of ${a.accounts} ${1===a.attention?"needs":"need"} attention`}:{state:"ok",text:1===a.accounts?"Connected":`${a.accounts} accounts connected`},defaultOpen:I===a.provider,children:(0,b.jsx)(P,{provider:a.provider,accounts:(c=a.provider,U.filter(a=>a.provider===c).map(a=>{let b=(0,v.K)(c);return{id:a.id,label:a.label,credentialKind:a.credentialKind,scopeNote:a.scopeNote,hint:(0,x.f)(a.provider,M.get(a.id),a.scopeNote),expires:(0,w.A)(a.expiresAt,V),lastSync:(0,w.K)(a.lastSyncAt,V),problem:a.problem,unreadable:a.unreadable,watchNew:a.watchNew,monitored:"github"===c?N.get(a.id)??null:b?(0,v.D)(L.filter(b=>b.accountId===a.id),V,b):null}})),demo:T})},a.provider)})})]},a.section)),(0,b.jsxs)("section",{"aria-labelledby":"sec-manage","data-section":"manage",children:[(0,b.jsx)("h2",{id:"sec-manage",className:$,children:"Manage"}),(0,b.jsx)("div",{className:Z,children:(0,b.jsx)(D.ProviderDrawer,{name:"Google Drive",note:"Monthly backups. The app can only see the files it creates (drive.file).",icon:"drive",line:R[X.kind],defaultOpen:"drive"===I,children:(0,b.jsxs)("div",{className:"px-[18px] py-4",children:[(0,b.jsx)(C.f,{state:X,folderName:(0,l.A)(O),showDisconnect:!0}),(0,b.jsxs)("p",{className:"mt-3 text-[12.5px] text-ink-soft",children:["Schedule, history and restore are on ",(0,b.jsx)(e.default,{href:"/backups",children:"Backups"}),"."]})]})})})]}),(0,b.jsx)(Q.f,{})]})}a.s(["default",0,S],157372)},19251,a=>{let b=(0,a.i(211857).registerClientReference)(function(){throw Error("Attempted to call ProviderDrawer() from the server but ProviderDrawer is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/src/app/(console)/connections/provider-drawer.tsx","ProviderDrawer");a.s(["ProviderDrawer",0,b])},362990,a=>{var b=a.i(19251);a.n(b)}],476227,function(a){a.n(a.i(157372))}];
2
2
 
3
3
  //# sourceMappingURL=src_app_%28console%29_connections_02upf_c41dauw._.js.map
@@ -1,3 +1,3 @@
1
- (()=>{"use strict";module.exports=[78774,a=>{var b=a.i(187924),c=a.i(133004),d=a.i(36600),e=a.i(786581),f=a.i(713352),g=a.i(834295),h=a.i(471941),i=a.i(817748);let j=(0,a.i(449862).f)("outline","triangle","Triangle",[["path",{d:"M10.363 3.591l-8.106 13.534a1.914 1.914 0 0 0 1.636 2.871h16.214a1.914 1.914 0 0 0 1.636 -2.87l-8.106 -13.536a1.914 1.914 0 0 0 -3.274 0",key:"svg-0"}]]);var k=a.i(572131),l=a.i(823292),m=a.i(771378),n=a.i(619089),o=a.i(286597),p=a.i(814574);let q={vercel:{createUrl:"https://vercel.com/account/settings/tokens",needs:["Scope: your account","An expiry date. The console warns you 14 days before it ends."],checked:"2026-10-21",name:"Vercel",icon:"triangle",credentialKind:"Access token",accessNote:"Full account (no read-only option)",multiAccount:!1,note:"One account. Tokens can't be read-only, so actions always ask for confirmation."},supabase:{createUrl:"https://supabase.com/dashboard/account/tokens",needs:["Projects read: status, region, Postgres version","Project admin read: service health","Analytics usage read: last API traffic and auto-pause risk","Organization admin read: free plan, for the free-slot count","Database read: database size, once a day (checked at the first daily read, because testing it would query your database)","Project admin write, only if you want pause and restore (stage 6)"],checked:"2026-10-21",name:"Supabase",icon:"bolt",credentialKind:"Scoped access token",accessNote:"Projects, health, analytics, organization and database read",multiAccount:!0,note:"Each account gets 2 free active projects. Use scoped tokens: read-only, plus project admin if you want pause and restore."},neon:{createUrl:"https://console.neon.tech/app/settings/api-keys",needs:["A personal or project API key. Neon has no read-only keys."],checked:"2026-10-21",name:"Neon",icon:"database",credentialKind:"API key",accessNote:"All projects (no read-only option)",multiAccount:!0,note:"No read-only keys exist, so keys stay on the server."},firebase:{createUrl:"https://console.cloud.google.com/iam-admin/serviceaccounts",needs:["Roles on each project: firebase.viewer, datastore.viewer, monitoring.viewer, firebaseauth.viewer","Turn on the Cloud Monitoring API in the project for reads, writes, and deletes today"],checked:"2026-10-21",name:"Firebase",icon:"flame",credentialKind:"Service account JSON",accessNote:"firebase.viewer, datastore.viewer, monitoring.viewer, firebaseauth.viewer",multiAccount:!0,json:!0,note:"One service account per Google account, with viewer roles only."},turso:{createUrl:"https://app.turso.tech/account/api-tokens",needs:["A platform API token limited to one organization (turso auth api-tokens mint watchbell --org <your-org>)","Turso has no read-only platform tokens; the console only lists databases and reads usage","Not a database token: database and group tokens can't list anything"],checked:"2026-10-21",name:"Turso",icon:"database",credentialKind:"Platform API token",accessNote:"One organization: databases and usage (no read-only option)",multiAccount:!0,note:"Lists databases and reads this month's rows read and written and storage against the free plan. Keys stay on the server."},upstash:{createUrl:"https://console.upstash.com/account/api",needs:["A Developer API key created as Read Only (Account → Management API)","Paste it as your-email:API_KEY (Upstash signs API calls with the account email and the key)","Native Upstash accounts only: a database made through the Vercel integration can't be read this way"],checked:"2026-10-21",name:"Upstash",icon:"bolt",credentialKind:"Developer API key",accessNote:"Read-only Developer API key: Redis databases and stats",multiAccount:!0,note:"Redis databases with their region, commands this month and data size against the free plan. QStash is budgeted in Settings."},cloudflare:{createUrl:"https://dash.cloudflare.com/profile/api-tokens",needs:["Zone: Read, DNS: Read, SSL and Certificates: Read","Zone Settings: Read, to show each zone's SSL/TLS mode (optional)","Zone → DNS → Edit, only if the owner wants to edit records from the DNS records page (never create or delete)","Account → D1 → Read, to watch Cloudflare D1 databases (size and tables); add Account → Account Analytics → Read for their rows read and written (optional)","Not needed: Registrar (domain expiry comes from RDAP)"],checked:"2026-10-21",name:"Cloudflare",icon:"cloud",credentialKind:"API token",accessNote:"Zone, DNS, SSL and Certificates read",multiAccount:!0,note:"A read-only API token is enough to watch. Add DNS Edit only to change records from the console. Domain expiry comes from RDAP, so Registrar access isn't needed."},github:{createUrl:"https://github.com/settings/personal-access-tokens/new",needs:["A fine-grained token (it starts with github_pat_); classic tokens can't be limited to read-only","Repository access: all repositories, or only the ones your apps deploy from","Repository permissions, each Read-only: Metadata, Contents, Actions. Nothing else","An expiry date. The console warns you 14 days before it ends."],checked:"2026-10-21",name:"GitHub",icon:"github",credentialKind:"Fine-grained token",accessNote:"Metadata, Contents and Actions read",multiAccount:!1,note:"A read-only fine-grained token. Sync lists your repositories; apps are linked to theirs, and their GitHub Actions status shows on the app page."},github_write:{createUrl:"https://github.com/settings/personal-access-tokens/new",needs:["A separate fine-grained token (it starts with github_pat_), not the read-only one above","Repository access: Only select repositories, the ones you want update PRs for","Repository permissions: Contents: Read and write, Pull requests: Read and write, Commit statuses: Read (for automatic merges). Nothing else (Metadata read is added by GitHub)","An expiry date. The console warns you 14 days before it ends."],checked:"2026-10-21",name:"GitHub (PR write)",icon:"github",credentialKind:"Fine-grained token",accessNote:"Contents and Pull requests read and write, Commit statuses read, chosen repositories",multiAccount:!1,note:"Optional. Opens pull requests that update vulnerable packages (when you approve one, or by itself with Automatic security fixes) and, with automatic fixes and auto-rollback on, squash-merges Watchbell's own PRs once CI, the Vercel preview and its smoke test pass. It never pushes to the default branch directly."}};var r=a.i(405050);let s=(0,r.createServerReference)("705038dfb40f7b686a137f0d1f24a29eaa314beb31",r.callServer,void 0,r.findSourceMapURL,"addAccount"),t=(0,r.createServerReference)("60967e0d0291e6d8142545f340bd45880ea031babc",r.callServer,void 0,r.findSourceMapURL,"checkCredential"),u=(0,r.createServerReference)("60f788c6f27e52e489eba677bacfb9459f175091d6",r.callServer,void 0,r.findSourceMapURL,"replaceCredential"),v={triangle:j,bolt:c.f,database:f.f,flame:h.f,cloud:e.f,github:d.f};function w({provider:a,replace:c,onDone:d,onCancel:e}){let f=q[a],[h,i]=(0,k.useTransition)(),[j,m]=(0,k.useState)(""),[p,r]=(0,k.useState)(""),[v,x]=(0,k.useState)({}),[y,z]=(0,k.useState)(null),A=`${a}-${c?.id??"new"}`,B=f.credentialKind.toLowerCase();return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)("div",{className:"px-[18px] pt-1.5",children:[!c&&(0,b.jsx)(n.O,{id:`${A}-name`,label:"Account name",help:"Shown next to everything that comes from this account.",error:v.label,children:(0,b.jsx)("input",{id:`${A}-name`,value:j,onChange:a=>m(a.target.value),placeholder:"vercel"===a?"acme":"utama",className:n.S})}),(0,b.jsx)(n.O,{id:`${A}-cred`,label:f.credentialKind,error:v.credential,help:(0,b.jsxs)("a",{href:f.createUrl,target:"_blank",rel:"noopener noreferrer",children:[f.guide?"How to create one":"Create one"," ",(0,b.jsx)(g.f,{size:12,className:"inline"})]}),children:f.json?(0,b.jsx)("textarea",{id:`${A}-cred`,spellCheck:!1,autoComplete:"off",autoCorrect:"off",autoCapitalize:"off","data-gramm":"false",value:p,onChange:a=>r(a.target.value),className:`${n.S} min-h-24 font-mono text-[12.5px]`,placeholder:'{ "type": "service_account", "client_email": "…", "private_key": "…" }'}):(0,b.jsx)("input",{id:`${A}-cred`,type:"password",spellCheck:!1,autoComplete:"off",autoCorrect:"off",autoCapitalize:"off","data-gramm":"false",value:p,onChange:a=>r(a.target.value),className:n.S,placeholder:`Paste the ${B}`})}),(0,b.jsxs)("div",{className:"mb-3.5 rounded-lg border border-line bg-surface-2 px-3 py-2.5 text-[13px]",children:[(0,b.jsx)("b",{className:"font-medium",children:"It needs"}),(0,b.jsx)("ul",{className:"mt-1 list-disc pl-[18px] text-ink-soft",children:f.needs.map(a=>(0,b.jsx)("li",{children:a},a))})]}),y&&(0,b.jsxs)("div",{className:`mb-3.5 rounded-lg px-3 py-2.5 text-[13px] ${y.ok?"bg-ok-soft":"bg-err-soft"}`,role:"status",children:[(0,b.jsx)(o.F,{state:y.ok?"ok":"err",children:y.ok?"Connected":"Couldn't connect"}),(0,b.jsx)("ul",{className:"mt-1 list-disc pl-[18px]",children:y.ok?[y.summary,...y.details].map(a=>(0,b.jsx)("li",{children:a},a)):(0,b.jsx)("li",{children:y.error})})]})]}),(0,b.jsxs)("div",{className:"flex flex-wrap items-center justify-end gap-2 border-t border-line px-[18px] py-3",children:[(0,b.jsx)("span",{className:"mr-auto text-[12.5px] text-ink-faint",children:"Save tests the credential first."}),(0,b.jsx)(n.K,{onClick:function(){i(async()=>{let b=await t(a,p);x(b.ok?{}:b.fieldErrors??{}),z(b.ok?b.data??null:b.fieldErrors?null:{ok:!1,kind:"transient",error:b.error})})},disabled:h,children:"Test connection"}),e&&(0,b.jsx)(n.K,{onClick:e,disabled:h,children:"Cancel"}),(0,b.jsx)(n.K,{variant:"primary",onClick:function(){i(async()=>{let b=c?await u(c.id,p):await s(a,j,p);x(b.ok?{}:b.fieldErrors??{}),b.data&&z(b.data),b.ok?(l.c.success(b.message),m(""),r(""),z(null),d?.()):b.fieldErrors||b.data||l.c.error(b.error)})},disabled:h,children:h?"Working…":"Save"})]})]})}a.s(["AccountDialog",0,function({provider:a,replace:c,triggerLabel:d,primary:e}){let f=q[a],g=v[f.icon],[h,j]=(0,k.useState)(!1),[l,o]=(0,k.useState)(0),r=(0,m.useMask)();function s(a){j(a),a||o(a=>a+1)}return(0,b.jsxs)(p.N,{open:h,onOpenChange:s,children:[(0,b.jsxs)(p.a,{className:(0,n.R)({size:"sm",variant:e?"primary":"secondary"}),children:[!c&&!d&&(0,b.jsx)(i.f,{size:16}),d??(c?"Replace credential":"Add account")]}),(0,b.jsxs)(p.d,{className:"max-w-[640px] gap-0 p-0 sm:max-w-[640px]",children:[(0,b.jsxs)("div",{className:"flex items-start gap-3 px-[18px] pb-2 pt-4",children:[(0,b.jsx)("span",{className:"grid size-9 shrink-0 place-items-center rounded-lg bg-sunken text-ink-soft",children:(0,b.jsx)(g,{size:19})}),(0,b.jsxs)("div",{children:[(0,b.jsx)(p.F,{className:"text-base",children:c?`Replace credential \xb7 ${f.name} \xb7 ${r("account",c.label)}`:`Connect ${f.name}`}),(0,b.jsx)(p.C,{className:"mt-0.5 text-[13px] text-ink-soft",children:c?"The old credential is deleted as soon as the new one works.":"The credential is encrypted before it's saved and never shown again."})]})]}),(0,b.jsx)(w,{provider:a,replace:c,onDone:()=>s(!1),onCancel:()=>s(!1)},l)]})]})},"AccountForm",0,w,"PROVIDER_ICONS",0,v],78774)},447888,a=>{var b=a.i(187924),c=a.i(147909),d=a.i(572131),e=a.i(823292),f=a.i(771378),g=a.i(619089),h=a.i(683874),i=a.i(814574),j=a.i(405050);let k=(0,j.createServerReference)("7075de08fb6d670f4d6e104e5e68a98e7c95503f02",j.callServer,void 0,j.findSourceMapURL,"saveSyncSelection"),l=(0,j.createServerReference)("4002b6d0c33a29dc4db384dc865b4f4a63c7bd6659",j.callServer,void 0,j.findSourceMapURL,"syncNow"),m={app:{what:"projects",looking:"Looking for projects in every team this token can read…",none:"This Vercel account has no projects yet."},zone:{what:"zones",looking:"Looking for zones in this Cloudflare account…",none:"This Cloudflare account has no zones yet."},supabase_project:{what:"projects",looking:"Looking for projects this credential can read…",none:"This account has no projects yet."},neon_project:{what:"projects",looking:"Looking for projects this credential can read…",none:"This account has no projects yet."},firestore:{what:"projects",looking:"Looking for projects this credential can read…",none:"This account has no projects yet."},turso_database:{what:"databases",looking:"Looking for databases in the organizations this token can read…",none:"This Turso account has no databases yet."},upstash_redis:{what:"databases",looking:"Looking for Redis databases this key can read…",none:"This Upstash account has no Redis databases yet."}};a.s(["SyncButton",0,function({accountId:a,title:j,label:n="Sync",primary:o,watchNew:p,kind:q="app"}){let r=m[q],s=(0,f.useMask)(),[t,u]=(0,d.useState)(!1),[v,w]=(0,d.useState)(null),[x,y]=(0,d.useState)(null),[z,A]=(0,d.useState)(new Set),[B,C]=(0,d.useState)(p),[D,E]=(0,d.useTransition)(),[F,G]=(0,d.useTransition)(),H=(0,d.useMemo)(()=>v?.rows??[],[v]);return(0,b.jsxs)(i.N,{open:t,onOpenChange:function(b){u(b),b&&(w(null),y(null),A(new Set),C(p),E(async()=>{let b=await l(a);b.ok&&b.data?(w(b.data),A(new Set(b.data.rows.filter(a=>a.monitored).map(a=>a.id)))):y(b.ok?"Sync returned nothing.":b.error)}))},children:[(0,b.jsxs)(i.a,{className:(0,g.R)({size:"sm",variant:o?"primary":"secondary"}),children:[(0,b.jsx)(c.f,{size:15,"aria-hidden":!0})," ",n]}),(0,b.jsxs)(i.d,{className:"max-w-[640px] gap-0 p-0 sm:max-w-[640px]","aria-label":"Sync resources",children:[(0,b.jsxs)("div",{className:"flex items-start gap-3 px-[18px] pb-2 pt-4",children:[(0,b.jsx)("span",{className:"grid size-9 shrink-0 place-items-center rounded-lg bg-sunken text-ink-soft",children:(0,b.jsx)(c.f,{size:19})}),(0,b.jsxs)("div",{children:[(0,b.jsxs)(i.F,{className:"text-base",children:["Sync ",s("text",j)]}),(0,b.jsx)(i.C,{className:"mt-0.5 text-[13px] text-ink-soft",children:v?`Found ${H.length} resources just now. Pick the ones the console should watch. Unticked ones are ignored and cost nothing.`:x?`The list of ${r.what} could not be loaded.`:r.looking})]})]}),(0,b.jsxs)("div",{className:"px-[18px] pb-2",children:[x&&(0,b.jsx)("div",{className:"mb-2",children:(0,b.jsx)(g.M,{tone:"danger",title:"Sync didn't finish",children:x})}),v&&v.skippedTeams.length>0&&(0,b.jsx)("div",{className:"mb-2",children:(0,b.jsxs)(g.M,{tone:"info",title:"Some teams were skipped",children:["This token can't read ",v.skippedTeams.join(", "),". Create a token with access to them to include their projects."]})}),v?.overLimit&&(0,b.jsx)("div",{className:"mb-2",children:(0,b.jsx)(g.M,{tone:"warning",title:"Monitor limit reached",children:v.overLimit})}),D&&(0,b.jsx)("p",{className:"py-6 text-center text-[13px] text-ink-soft",children:"Syncing…"}),v&&0===H.length&&(0,b.jsx)(g.k,{title:"Nothing found",children:r.none}),v&&H.length>0&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)("div",{className:"mb-1.5 flex gap-1.5",children:[(0,b.jsx)(g.K,{size:"sm",onClick:()=>A(new Set(H.map(a=>a.id))),children:"Select all"}),(0,b.jsx)(g.K,{size:"sm",onClick:()=>A(new Set),children:"Select none"})]}),(0,b.jsx)("div",{className:"max-h-[360px] overflow-y-auto rounded-md border border-line",children:H.map(a=>(0,b.jsxs)("label",{className:"flex cursor-pointer items-center gap-3 border-b border-line px-3 py-[9px] last:border-b-0 hover:bg-hover",children:[(0,b.jsx)("input",{type:"checkbox",className:"size-4 accent-brand",checked:z.has(a.id),onChange:()=>{var b;return b=a.id,void A(a=>{let c=new Set(a);return c.has(b)?c.delete(b):c.add(b),c})}}),(0,b.jsx)(h.f,{kind:a.badge}),(0,b.jsxs)("span",{className:"min-w-0 flex-1",children:[(0,b.jsx)("span",{className:"block truncate",children:"db"===a.badge||"fs"===a.badge?(0,b.jsx)(f.DbName,{id:a.id,name:a.name,alias:a.alias}):(0,b.jsx)(f.Masked,{kind:"app"===a.badge?"app":"text",real:a.name})}),(0,b.jsx)("span",{className:"block truncate text-[12px] text-ink-faint",children:(0,b.jsx)(f.Masked,{kind:"text",real:a.sub})})]}),a.fresh&&(0,b.jsx)("span",{className:"rounded bg-brand-soft px-1.5 py-px font-mono text-[10.5px] text-brand",children:"New"})]},a.id))})]})]}),(0,b.jsxs)("div",{className:"flex flex-wrap items-center gap-3 border-t border-line px-[18px] py-3",children:[(0,b.jsxs)("span",{className:"text-[12.5px] text-ink-soft",children:[z.size," of ",H.length," selected"]}),(0,b.jsxs)("label",{className:"flex items-center gap-1.5 text-[12.5px]",children:[(0,b.jsx)("input",{type:"checkbox",className:"size-4 accent-brand",checked:B,onChange:a=>C(a.target.checked)}),"Watch new ones automatically"]}),(0,b.jsxs)("div",{className:"ml-auto flex gap-2",children:[(0,b.jsx)(g.K,{onClick:()=>u(!1),children:"Cancel"}),(0,b.jsx)(g.K,{variant:"primary",disabled:!v||F,onClick:function(){G(async()=>{let b=await k(a,[...z],B);if(!b.ok)return void e.c.error(b.error);let c=`Watching ${z.size} of ${v?.rows.length??0} resources in ${s("text",j)}. Checks start on the next collector run.`,d=b.data?.overLimit;d?e.c.warning("Selection saved",{description:`${c} ${d}`}):e.c.success("Selection saved",{description:c}),u(!1)})},children:F?"Saving…":"Save selection"})]})]})]})]})}],447888)}]})();
1
+ (()=>{"use strict";module.exports=[78774,a=>{var b=a.i(187924),c=a.i(133004),d=a.i(36600),e=a.i(786581),f=a.i(713352),g=a.i(834295),h=a.i(471941),i=a.i(817748);let j=(0,a.i(449862).f)("outline","triangle","Triangle",[["path",{d:"M10.363 3.591l-8.106 13.534a1.914 1.914 0 0 0 1.636 2.871h16.214a1.914 1.914 0 0 0 1.636 -2.87l-8.106 -13.536a1.914 1.914 0 0 0 -3.274 0",key:"svg-0"}]]);var k=a.i(572131),l=a.i(823292),m=a.i(771378),n=a.i(619089),o=a.i(286597),p=a.i(814574);let q={vercel:{createUrl:"https://vercel.com/account/settings/tokens",needs:["Scope: your account","An expiry date. The console warns you 14 days before it ends."],checked:"2026-10-21",name:"Vercel",icon:"triangle",credentialKind:"Access token",accessNote:"Full account (no read-only option)",multiAccount:!1,note:"One account. Tokens can't be read-only, so actions always ask for confirmation."},supabase:{createUrl:"https://supabase.com/dashboard/account/tokens",needs:["Projects read: status, region, Postgres version","Project admin read: service health","Analytics usage read: last API traffic and auto-pause risk","Organization admin read: free plan, for the free-slot count","Database read: database size, once a day (checked at the first daily read, because testing it would query your database)","Project admin write, only if you want pause and restore (stage 6)"],checked:"2026-10-21",name:"Supabase",icon:"bolt",credentialKind:"Scoped access token",accessNote:"Projects, health, analytics, organization and database read",multiAccount:!0,note:"Each account gets 2 free active projects. Use scoped tokens: read-only, plus project admin if you want pause and restore."},neon:{createUrl:"https://console.neon.tech/app/settings/api-keys",needs:["A personal or project API key. Neon has no read-only keys."],checked:"2026-10-21",name:"Neon",icon:"database",credentialKind:"API key",accessNote:"All projects (no read-only option)",multiAccount:!0,note:"No read-only keys exist, so keys stay on the server."},firebase:{createUrl:"https://console.cloud.google.com/iam-admin/serviceaccounts",needs:["Roles on each project: firebase.viewer, datastore.viewer, monitoring.viewer, firebaseauth.viewer","Turn on the Cloud Monitoring API in the project for reads, writes, and deletes today"],checked:"2026-10-21",name:"Firebase",icon:"flame",credentialKind:"Service account JSON",accessNote:"firebase.viewer, datastore.viewer, monitoring.viewer, firebaseauth.viewer",multiAccount:!0,json:!0,note:"One service account per Google account, with viewer roles only."},turso:{createUrl:"https://app.turso.tech/account/api-tokens",needs:["A platform API token limited to one organization (turso auth api-tokens mint watchbell --org <your-org>)","Turso has no read-only platform tokens; the console only lists databases and reads usage","Not a database token: database and group tokens can't list anything"],checked:"2026-10-21",name:"Turso",icon:"database",credentialKind:"Platform API token",accessNote:"One organization: databases and usage (no read-only option)",multiAccount:!0,note:"Lists databases and reads this month's rows read and written and storage against the free plan. Keys stay on the server."},upstash:{createUrl:"https://console.upstash.com/account/api",needs:["A Developer API key created as Read Only (Account → Management API)","Paste it as your-email:API_KEY (Upstash signs API calls with the account email and the key)","Native Upstash accounts only: a database made through the Vercel integration can't be read this way"],checked:"2026-10-21",name:"Upstash",icon:"bolt",credentialKind:"Developer API key",accessNote:"Read-only Developer API key: Redis databases and stats",multiAccount:!0,note:"Redis databases with their region, commands this month and data size against the free plan. QStash is budgeted in Settings."},cloudflare:{createUrl:"https://dash.cloudflare.com/profile/api-tokens",needs:["Zone: Read, DNS: Read, SSL and Certificates: Read","Zone Settings: Read, to show each zone's SSL/TLS mode (optional)","Zone → DNS → Edit, only if the owner wants to edit records from the DNS records page (never create or delete)","Account → D1 → Read, to watch Cloudflare D1 databases (size and tables); add Account → Account Analytics → Read for their rows read and written (optional)","Not needed: Registrar (domain expiry comes from RDAP)"],checked:"2026-10-21",name:"Cloudflare",icon:"cloud",credentialKind:"API token",accessNote:"Zone, DNS, SSL and Certificates read",multiAccount:!0,note:"A read-only API token is enough to watch. Add DNS Edit only to change records from the console. Domain expiry comes from RDAP, so Registrar access isn't needed."},github:{createUrl:"https://github.com/settings/personal-access-tokens/new",needs:["A fine-grained token (it starts with github_pat_); classic tokens can't be limited to read-only","Repository access: all repositories, or only the ones your apps deploy from","Repository permissions, each Read-only: Metadata, Contents, Actions. Nothing else","An expiry date. The console warns you 14 days before it ends."],checked:"2026-10-21",name:"GitHub",icon:"github",credentialKind:"Fine-grained token",accessNote:"Metadata, Contents and Actions read",multiAccount:!1,note:"A read-only fine-grained token. Sync lists your repositories; apps are linked to theirs, and their GitHub Actions status shows on the app page."},github_write:{createUrl:"https://github.com/settings/personal-access-tokens/new",needs:["A separate fine-grained token (it starts with github_pat_), not the read-only one above","Repository access: Only select repositories, the ones you want update PRs for","Repository permissions: Contents: Read and write, Pull requests: Read and write, Commit statuses: Read (for automatic merges). Nothing else (Metadata read is added by GitHub)","An expiry date. The console warns you 14 days before it ends."],checked:"2026-10-21",name:"GitHub (PR write)",icon:"github",credentialKind:"Fine-grained token",accessNote:"Contents and Pull requests read and write, Commit statuses read, chosen repositories",multiAccount:!1,note:"Optional. Opens pull requests that update vulnerable packages (when you approve one, or by itself with Automatic security fixes) and, with automatic fixes and auto-rollback on, squash-merges Watchbell's own PRs once CI, the Vercel preview and its smoke test pass. It never pushes to the default branch directly."}};var r=a.i(405050);let s=(0,r.createServerReference)("706c67e5ee74298fef15e453b23488d435eca03f79",r.callServer,void 0,r.findSourceMapURL,"addAccount"),t=(0,r.createServerReference)("60ad34730cbac06616ddd3a5479fd85a93aacd43b9",r.callServer,void 0,r.findSourceMapURL,"checkCredential"),u=(0,r.createServerReference)("60592f7246f91859bc1f751ad68cff0b23fe4c94dd",r.callServer,void 0,r.findSourceMapURL,"replaceCredential"),v={triangle:j,bolt:c.f,database:f.f,flame:h.f,cloud:e.f,github:d.f};function w({provider:a,replace:c,onDone:d,onCancel:e}){let f=q[a],[h,i]=(0,k.useTransition)(),[j,m]=(0,k.useState)(""),[p,r]=(0,k.useState)(""),[v,x]=(0,k.useState)({}),[y,z]=(0,k.useState)(null),A=`${a}-${c?.id??"new"}`,B=f.credentialKind.toLowerCase();return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)("div",{className:"px-[18px] pt-1.5",children:[!c&&(0,b.jsx)(n.O,{id:`${A}-name`,label:"Account name",help:"Shown next to everything that comes from this account.",error:v.label,children:(0,b.jsx)("input",{id:`${A}-name`,value:j,onChange:a=>m(a.target.value),placeholder:"vercel"===a?"acme":"utama",className:n.S})}),(0,b.jsx)(n.O,{id:`${A}-cred`,label:f.credentialKind,error:v.credential,help:(0,b.jsxs)("a",{href:f.createUrl,target:"_blank",rel:"noopener noreferrer",children:[f.guide?"How to create one":"Create one"," ",(0,b.jsx)(g.f,{size:12,className:"inline"})]}),children:f.json?(0,b.jsx)("textarea",{id:`${A}-cred`,spellCheck:!1,autoComplete:"off",autoCorrect:"off",autoCapitalize:"off","data-gramm":"false",value:p,onChange:a=>r(a.target.value),className:`${n.S} min-h-24 font-mono text-[12.5px]`,placeholder:'{ "type": "service_account", "client_email": "…", "private_key": "…" }'}):(0,b.jsx)("input",{id:`${A}-cred`,type:"password",spellCheck:!1,autoComplete:"off",autoCorrect:"off",autoCapitalize:"off","data-gramm":"false",value:p,onChange:a=>r(a.target.value),className:n.S,placeholder:`Paste the ${B}`})}),(0,b.jsxs)("div",{className:"mb-3.5 rounded-lg border border-line bg-surface-2 px-3 py-2.5 text-[13px]",children:[(0,b.jsx)("b",{className:"font-medium",children:"It needs"}),(0,b.jsx)("ul",{className:"mt-1 list-disc pl-[18px] text-ink-soft",children:f.needs.map(a=>(0,b.jsx)("li",{children:a},a))})]}),y&&(0,b.jsxs)("div",{className:`mb-3.5 rounded-lg px-3 py-2.5 text-[13px] ${y.ok?"bg-ok-soft":"bg-err-soft"}`,role:"status",children:[(0,b.jsx)(o.F,{state:y.ok?"ok":"err",children:y.ok?"Connected":"Couldn't connect"}),(0,b.jsx)("ul",{className:"mt-1 list-disc pl-[18px]",children:y.ok?[y.summary,...y.details].map(a=>(0,b.jsx)("li",{children:a},a)):(0,b.jsx)("li",{children:y.error})})]})]}),(0,b.jsxs)("div",{className:"flex flex-wrap items-center justify-end gap-2 border-t border-line px-[18px] py-3",children:[(0,b.jsx)("span",{className:"mr-auto text-[12.5px] text-ink-faint",children:"Save tests the credential first."}),(0,b.jsx)(n.K,{onClick:function(){i(async()=>{let b=await t(a,p);x(b.ok?{}:b.fieldErrors??{}),z(b.ok?b.data??null:b.fieldErrors?null:{ok:!1,kind:"transient",error:b.error})})},disabled:h,children:"Test connection"}),e&&(0,b.jsx)(n.K,{onClick:e,disabled:h,children:"Cancel"}),(0,b.jsx)(n.K,{variant:"primary",onClick:function(){i(async()=>{let b=c?await u(c.id,p):await s(a,j,p);x(b.ok?{}:b.fieldErrors??{}),b.data&&z(b.data),b.ok?(l.c.success(b.message),m(""),r(""),z(null),d?.()):b.fieldErrors||b.data||l.c.error(b.error)})},disabled:h,children:h?"Working…":"Save"})]})]})}a.s(["AccountDialog",0,function({provider:a,replace:c,triggerLabel:d,primary:e}){let f=q[a],g=v[f.icon],[h,j]=(0,k.useState)(!1),[l,o]=(0,k.useState)(0),r=(0,m.useMask)();function s(a){j(a),a||o(a=>a+1)}return(0,b.jsxs)(p.N,{open:h,onOpenChange:s,children:[(0,b.jsxs)(p.a,{className:(0,n.R)({size:"sm",variant:e?"primary":"secondary"}),children:[!c&&!d&&(0,b.jsx)(i.f,{size:16}),d??(c?"Replace credential":"Add account")]}),(0,b.jsxs)(p.d,{className:"max-w-[640px] gap-0 p-0 sm:max-w-[640px]",children:[(0,b.jsxs)("div",{className:"flex items-start gap-3 px-[18px] pb-2 pt-4",children:[(0,b.jsx)("span",{className:"grid size-9 shrink-0 place-items-center rounded-lg bg-sunken text-ink-soft",children:(0,b.jsx)(g,{size:19})}),(0,b.jsxs)("div",{children:[(0,b.jsx)(p.F,{className:"text-base",children:c?`Replace credential \xb7 ${f.name} \xb7 ${r("account",c.label)}`:`Connect ${f.name}`}),(0,b.jsx)(p.C,{className:"mt-0.5 text-[13px] text-ink-soft",children:c?"The old credential is deleted as soon as the new one works.":"The credential is encrypted before it's saved and never shown again."})]})]}),(0,b.jsx)(w,{provider:a,replace:c,onDone:()=>s(!1),onCancel:()=>s(!1)},l)]})]})},"AccountForm",0,w,"PROVIDER_ICONS",0,v],78774)},447888,a=>{var b=a.i(187924),c=a.i(147909),d=a.i(572131),e=a.i(823292),f=a.i(771378),g=a.i(619089),h=a.i(683874),i=a.i(814574),j=a.i(405050);let k=(0,j.createServerReference)("70770d57f1168563e806be3556a541666d43b5623e",j.callServer,void 0,j.findSourceMapURL,"saveSyncSelection"),l=(0,j.createServerReference)("407499dff7d244a964962e6243873c1b8e1609dc4c",j.callServer,void 0,j.findSourceMapURL,"syncNow"),m={app:{what:"projects",looking:"Looking for projects in every team this token can read…",none:"This Vercel account has no projects yet."},zone:{what:"zones",looking:"Looking for zones in this Cloudflare account…",none:"This Cloudflare account has no zones yet."},supabase_project:{what:"projects",looking:"Looking for projects this credential can read…",none:"This account has no projects yet."},neon_project:{what:"projects",looking:"Looking for projects this credential can read…",none:"This account has no projects yet."},firestore:{what:"projects",looking:"Looking for projects this credential can read…",none:"This account has no projects yet."},turso_database:{what:"databases",looking:"Looking for databases in the organizations this token can read…",none:"This Turso account has no databases yet."},upstash_redis:{what:"databases",looking:"Looking for Redis databases this key can read…",none:"This Upstash account has no Redis databases yet."}};a.s(["SyncButton",0,function({accountId:a,title:j,label:n="Sync",primary:o,watchNew:p,kind:q="app"}){let r=m[q],s=(0,f.useMask)(),[t,u]=(0,d.useState)(!1),[v,w]=(0,d.useState)(null),[x,y]=(0,d.useState)(null),[z,A]=(0,d.useState)(new Set),[B,C]=(0,d.useState)(p),[D,E]=(0,d.useTransition)(),[F,G]=(0,d.useTransition)(),H=(0,d.useMemo)(()=>v?.rows??[],[v]);return(0,b.jsxs)(i.N,{open:t,onOpenChange:function(b){u(b),b&&(w(null),y(null),A(new Set),C(p),E(async()=>{let b=await l(a);b.ok&&b.data?(w(b.data),A(new Set(b.data.rows.filter(a=>a.monitored).map(a=>a.id)))):y(b.ok?"Sync returned nothing.":b.error)}))},children:[(0,b.jsxs)(i.a,{className:(0,g.R)({size:"sm",variant:o?"primary":"secondary"}),children:[(0,b.jsx)(c.f,{size:15,"aria-hidden":!0})," ",n]}),(0,b.jsxs)(i.d,{className:"max-w-[640px] gap-0 p-0 sm:max-w-[640px]","aria-label":"Sync resources",children:[(0,b.jsxs)("div",{className:"flex items-start gap-3 px-[18px] pb-2 pt-4",children:[(0,b.jsx)("span",{className:"grid size-9 shrink-0 place-items-center rounded-lg bg-sunken text-ink-soft",children:(0,b.jsx)(c.f,{size:19})}),(0,b.jsxs)("div",{children:[(0,b.jsxs)(i.F,{className:"text-base",children:["Sync ",s("text",j)]}),(0,b.jsx)(i.C,{className:"mt-0.5 text-[13px] text-ink-soft",children:v?`Found ${H.length} resources just now. Pick the ones the console should watch. Unticked ones are ignored and cost nothing.`:x?`The list of ${r.what} could not be loaded.`:r.looking})]})]}),(0,b.jsxs)("div",{className:"px-[18px] pb-2",children:[x&&(0,b.jsx)("div",{className:"mb-2",children:(0,b.jsx)(g.M,{tone:"danger",title:"Sync didn't finish",children:x})}),v&&v.skippedTeams.length>0&&(0,b.jsx)("div",{className:"mb-2",children:(0,b.jsxs)(g.M,{tone:"info",title:"Some teams were skipped",children:["This token can't read ",v.skippedTeams.join(", "),". Create a token with access to them to include their projects."]})}),v?.overLimit&&(0,b.jsx)("div",{className:"mb-2",children:(0,b.jsx)(g.M,{tone:"warning",title:"Monitor limit reached",children:v.overLimit})}),D&&(0,b.jsx)("p",{className:"py-6 text-center text-[13px] text-ink-soft",children:"Syncing…"}),v&&0===H.length&&(0,b.jsx)(g.k,{title:"Nothing found",children:r.none}),v&&H.length>0&&(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)("div",{className:"mb-1.5 flex gap-1.5",children:[(0,b.jsx)(g.K,{size:"sm",onClick:()=>A(new Set(H.map(a=>a.id))),children:"Select all"}),(0,b.jsx)(g.K,{size:"sm",onClick:()=>A(new Set),children:"Select none"})]}),(0,b.jsx)("div",{className:"max-h-[360px] overflow-y-auto rounded-md border border-line",children:H.map(a=>(0,b.jsxs)("label",{className:"flex cursor-pointer items-center gap-3 border-b border-line px-3 py-[9px] last:border-b-0 hover:bg-hover",children:[(0,b.jsx)("input",{type:"checkbox",className:"size-4 accent-brand",checked:z.has(a.id),onChange:()=>{var b;return b=a.id,void A(a=>{let c=new Set(a);return c.has(b)?c.delete(b):c.add(b),c})}}),(0,b.jsx)(h.f,{kind:a.badge}),(0,b.jsxs)("span",{className:"min-w-0 flex-1",children:[(0,b.jsx)("span",{className:"block truncate",children:"db"===a.badge||"fs"===a.badge?(0,b.jsx)(f.DbName,{id:a.id,name:a.name,alias:a.alias}):(0,b.jsx)(f.Masked,{kind:"app"===a.badge?"app":"text",real:a.name})}),(0,b.jsx)("span",{className:"block truncate text-[12px] text-ink-faint",children:(0,b.jsx)(f.Masked,{kind:"text",real:a.sub})})]}),a.fresh&&(0,b.jsx)("span",{className:"rounded bg-brand-soft px-1.5 py-px font-mono text-[10.5px] text-brand",children:"New"})]},a.id))})]})]}),(0,b.jsxs)("div",{className:"flex flex-wrap items-center gap-3 border-t border-line px-[18px] py-3",children:[(0,b.jsxs)("span",{className:"text-[12.5px] text-ink-soft",children:[z.size," of ",H.length," selected"]}),(0,b.jsxs)("label",{className:"flex items-center gap-1.5 text-[12.5px]",children:[(0,b.jsx)("input",{type:"checkbox",className:"size-4 accent-brand",checked:B,onChange:a=>C(a.target.checked)}),"Watch new ones automatically"]}),(0,b.jsxs)("div",{className:"ml-auto flex gap-2",children:[(0,b.jsx)(g.K,{onClick:()=>u(!1),children:"Cancel"}),(0,b.jsx)(g.K,{variant:"primary",disabled:!v||F,onClick:function(){G(async()=>{let b=await k(a,[...z],B);if(!b.ok)return void e.c.error(b.error);let c=`Watching ${z.size} of ${v?.rows.length??0} resources in ${s("text",j)}. Checks start on the next collector run.`,d=b.data?.overLimit;d?e.c.warning("Selection saved",{description:`${c} ${d}`}):e.c.success("Selection saved",{description:c}),u(!1)})},children:F?"Saving…":"Save selection"})]})]})]})]})}],447888)}]})();
2
2
 
3
3
  //# sourceMappingURL=src_app_%28console%29_connections_1fahc65-97qla._.js.map
@@ -1,3 +1,3 @@
1
- (()=>{"use strict";module.exports=[300103,a=>{var b=a.i(187924),c=a.i(572131),d=a.i(823292),e=a.i(771378),f=a.i(611619),g=a.i(619089),h=a.i(405050);let i=(0,h.createServerReference)("403d8d78c67115710490293736dcc0096400c7a0c3",h.callServer,void 0,h.findSourceMapURL,"removeAccount"),j=(0,h.createServerReference)("400b800629a57865cc3f38ee9c9a9e3cdb4d4a5142",h.callServer,void 0,h.findSourceMapURL,"retestAccount");a.s(["RemoveAccountButton",0,function({accountId:a,title:c}){let d=(0,e.useMask)();return(0,b.jsx)(f.f,{trigger:(0,b.jsx)(g.K,{size:"sm",children:"Remove"}),title:`Remove ${d("text",c)}?`,body:"The console deletes its credential and stops watching its resources. Nothing changes at the provider.",cta:"Remove",danger:!0,onConfirm:async()=>{let b=await i(a);return{ok:b.ok,message:(b.ok?b.message:b.error)??""}}})},"RetestButton",0,function({accountId:a}){let[e,f]=(0,c.useTransition)();return(0,b.jsx)(g.K,{size:"sm",disabled:e,onClick:()=>f(async()=>{let b=await j(a);b.ok?d.c.success(b.message):d.c.error(b.error)}),children:e?"Testing…":"Test connection"})}],300103)},648433,a=>{var b=a.i(187924),c=a.i(147909),d=a.i(572131),e=a.i(823292),f=a.i(619089),g=a.i(405050);let h=(0,g.createServerReference)("40b0728bcef0ffade3a87326d3defe66ef4eec0046",g.callServer,void 0,g.findSourceMapURL,"syncGithubNow");a.s(["GithubSyncButton",0,function({accountId:a}){let[g,i]=(0,d.useTransition)();return(0,b.jsxs)(f.K,{size:"sm",disabled:g,onClick:()=>i(async()=>{let b=e.c.loading("Syncing GitHub…");try{let c=await h(a);c.ok?e.c.success(c.message??"Synced.",{id:b}):e.c.error(c.error,{id:b})}catch{e.c.error("Something went wrong. Try again.",{id:b})}}),children:[(0,b.jsx)(c.f,{size:14,"aria-hidden":!0}),g?"Syncing…":"Sync"]})}],648433)},827124,a=>{var b=a.i(187924),c=a.i(740197),d=a.i(772925),e=a.i(521341),f=a.i(768758),g=a.i(505358),h=a.i(749867),i=a.i(8842),j=a.i(532489);let k=(0,a.i(449862).f)("outline","brand-google-drive","BrandGoogleDrive",[["path",{d:"M12 10l-6 10l-3 -5l6 -10l3 5",key:"svg-0"}],["path",{d:"M9 15h12l-3 5h-12",key:"svg-1"}],["path",{d:"M15 15l-6 -10h6l6 10l-6 0",key:"svg-2"}]]);var l=a.i(851519),m=a.i(50944),n=a.i(572131),o=a.i(507504),p=a.i(286597);let q={...a.i(78774).PROVIDER_ICONS,drive:k};a.s(["ProviderDrawer",0,function({name:a,note:k,icon:r,line:s,defaultOpen:t=!1,children:u}){let[v,w]=(0,n.useState)(t),[x,y]=(0,n.useState)(t);x!==t&&(y(t),t&&w(!0));let z=(0,m.useRouter)(),A=(0,m.usePathname)();(0,o.useHoldRefresh)(v);let B=q[r];return(0,b.jsxs)(c.f.Root,{open:v,onOpenChange:function(a){w(a),!a&&new URLSearchParams(window.location.search).has("provider")&&z.replace(A,{scroll:!1})},children:[(0,b.jsxs)(d.f.Trigger,{className:"flex min-w-0 items-center gap-3 rounded-lg border border-line bg-surface px-3.5 py-3 text-left hover:border-line-strong hover:bg-hover focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand/40","aria-label":`${a}: ${s.text}`,children:[(0,b.jsx)("span",{className:"grid size-9 shrink-0 place-items-center rounded-lg bg-sunken text-ink-soft",children:(0,b.jsx)(B,{size:19})}),(0,b.jsxs)("span",{className:"min-w-0",children:[(0,b.jsx)("span",{className:"block truncate text-[14px] font-medium text-ink",children:a}),(0,b.jsx)("span",{className:"block text-[12.5px]",children:(0,b.jsx)(p.F,{state:s.state,children:s.text})})]})]}),(0,b.jsxs)(e.f.Portal,{children:[(0,b.jsx)(f.f.Backdrop,{className:"fixed inset-0 z-50 bg-black/10"}),(0,b.jsxs)(g.f.Popup,{className:"fixed inset-y-0 right-0 z-50 flex w-[620px] max-w-full flex-col border-l border-line bg-surface text-ink shadow-lg outline-none",children:[(0,b.jsxs)("div",{className:"flex shrink-0 items-start gap-3 border-b border-line px-[18px] py-3.5",children:[(0,b.jsx)("span",{className:"grid size-9 shrink-0 place-items-center rounded-lg bg-sunken text-ink-soft",children:(0,b.jsx)(B,{size:19})}),(0,b.jsxs)("div",{className:"min-w-0",children:[(0,b.jsx)(h.f.Title,{className:"text-[15px] font-semibold",children:a}),(0,b.jsx)(i.f.Description,{className:"mt-px text-[12.5px] text-ink-soft",children:k})]}),(0,b.jsx)(j.f.Close,{"aria-label":"Close",title:"Close",className:"ml-auto inline-grid size-[34px] shrink-0 place-items-center rounded-md text-ink-soft hover:bg-hover hover:text-ink focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand/40",children:(0,b.jsx)(l.f,{size:18})})]}),(0,b.jsx)("div",{className:"min-h-0 flex-1 overflow-y-auto",children:u})]})]})]})}],827124)}]})();
1
+ (()=>{"use strict";module.exports=[300103,a=>{var b=a.i(187924),c=a.i(572131),d=a.i(823292),e=a.i(771378),f=a.i(611619),g=a.i(619089),h=a.i(405050);let i=(0,h.createServerReference)("40bb5065d561e0dd4105850e887689468c206580bd",h.callServer,void 0,h.findSourceMapURL,"removeAccount"),j=(0,h.createServerReference)("4072f8102843c5eb0bb75d44a343c0aa4783890dc2",h.callServer,void 0,h.findSourceMapURL,"retestAccount");a.s(["RemoveAccountButton",0,function({accountId:a,title:c}){let d=(0,e.useMask)();return(0,b.jsx)(f.f,{trigger:(0,b.jsx)(g.K,{size:"sm",children:"Remove"}),title:`Remove ${d("text",c)}?`,body:"The console deletes its credential and stops watching its resources. Nothing changes at the provider.",cta:"Remove",danger:!0,onConfirm:async()=>{let b=await i(a);return{ok:b.ok,message:(b.ok?b.message:b.error)??""}}})},"RetestButton",0,function({accountId:a}){let[e,f]=(0,c.useTransition)();return(0,b.jsx)(g.K,{size:"sm",disabled:e,onClick:()=>f(async()=>{let b=await j(a);b.ok?d.c.success(b.message):d.c.error(b.error)}),children:e?"Testing…":"Test connection"})}],300103)},648433,a=>{var b=a.i(187924),c=a.i(147909),d=a.i(572131),e=a.i(823292),f=a.i(619089),g=a.i(405050);let h=(0,g.createServerReference)("407606e8fdee8e1ec470409bd7b81f8372588662a9",g.callServer,void 0,g.findSourceMapURL,"syncGithubNow");a.s(["GithubSyncButton",0,function({accountId:a}){let[g,i]=(0,d.useTransition)();return(0,b.jsxs)(f.K,{size:"sm",disabled:g,onClick:()=>i(async()=>{let b=e.c.loading("Syncing GitHub…");try{let c=await h(a);c.ok?e.c.success(c.message??"Synced.",{id:b}):e.c.error(c.error,{id:b})}catch{e.c.error("Watchbell didn't answer. Check that it's still running, then try again.",{id:b})}}),children:[(0,b.jsx)(c.f,{size:14,"aria-hidden":!0}),g?"Syncing…":"Sync"]})}],648433)},827124,a=>{var b=a.i(187924),c=a.i(740197),d=a.i(772925),e=a.i(521341),f=a.i(768758),g=a.i(505358),h=a.i(749867),i=a.i(8842),j=a.i(532489);let k=(0,a.i(449862).f)("outline","brand-google-drive","BrandGoogleDrive",[["path",{d:"M12 10l-6 10l-3 -5l6 -10l3 5",key:"svg-0"}],["path",{d:"M9 15h12l-3 5h-12",key:"svg-1"}],["path",{d:"M15 15l-6 -10h6l6 10l-6 0",key:"svg-2"}]]);var l=a.i(851519),m=a.i(50944),n=a.i(572131),o=a.i(507504),p=a.i(286597);let q={...a.i(78774).PROVIDER_ICONS,drive:k};a.s(["ProviderDrawer",0,function({name:a,note:k,icon:r,line:s,defaultOpen:t=!1,children:u}){let[v,w]=(0,n.useState)(t),[x,y]=(0,n.useState)(t);x!==t&&(y(t),t&&w(!0));let z=(0,m.useRouter)(),A=(0,m.usePathname)();(0,o.useHoldRefresh)(v);let B=q[r];return(0,b.jsxs)(c.f.Root,{open:v,onOpenChange:function(a){w(a),!a&&new URLSearchParams(window.location.search).has("provider")&&z.replace(A,{scroll:!1})},children:[(0,b.jsxs)(d.f.Trigger,{className:"flex min-w-0 items-center gap-3 rounded-lg border border-line bg-surface px-3.5 py-3 text-left hover:border-line-strong hover:bg-hover focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand/40","aria-label":`${a}: ${s.text}`,children:[(0,b.jsx)("span",{className:"grid size-9 shrink-0 place-items-center rounded-lg bg-sunken text-ink-soft",children:(0,b.jsx)(B,{size:19})}),(0,b.jsxs)("span",{className:"min-w-0",children:[(0,b.jsx)("span",{className:"block truncate text-[14px] font-medium text-ink",children:a}),(0,b.jsx)("span",{className:"block text-[12.5px]",children:(0,b.jsx)(p.F,{state:s.state,children:s.text})})]})]}),(0,b.jsxs)(e.f.Portal,{children:[(0,b.jsx)(f.f.Backdrop,{className:"fixed inset-0 z-50 bg-black/10"}),(0,b.jsxs)(g.f.Popup,{className:"fixed inset-y-0 right-0 z-50 flex w-[620px] max-w-full flex-col border-l border-line bg-surface text-ink shadow-lg outline-none",children:[(0,b.jsxs)("div",{className:"flex shrink-0 items-start gap-3 border-b border-line px-[18px] py-3.5",children:[(0,b.jsx)("span",{className:"grid size-9 shrink-0 place-items-center rounded-lg bg-sunken text-ink-soft",children:(0,b.jsx)(B,{size:19})}),(0,b.jsxs)("div",{className:"min-w-0",children:[(0,b.jsx)(h.f.Title,{className:"text-[15px] font-semibold",children:a}),(0,b.jsx)(i.f.Description,{className:"mt-px text-[12.5px] text-ink-soft",children:k})]}),(0,b.jsx)(j.f.Close,{"aria-label":"Close",title:"Close",className:"ml-auto inline-grid size-[34px] shrink-0 place-items-center rounded-md text-ink-soft hover:bg-hover hover:text-ink focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand/40",children:(0,b.jsx)(l.f,{size:18})})]}),(0,b.jsx)("div",{className:"min-h-0 flex-1 overflow-y-auto",children:u})]})]})]})}],827124)}]})();
2
2
 
3
3
  //# sourceMappingURL=src_app_%28console%29_connections_1fmp_anbkapur._.js.map
@@ -1,3 +1,3 @@
1
- module.exports=[446601,908122,a=>{"use strict";var b=a.i(137936),c=a.i(93321),d=a.i(118558),e=a.i(548734),f=a.i(837137),g=a.i(109068),h=a.i(600079),i=a.i(109307),j=a.i(678831),k=a.i(45617),l=a.i(358179),m=a.i(492665),n=a.i(312573),o=a.i(323878),p=a.i(44925),q=a.i(760417),r=a.i(686921),s=a.i(15827),t=a.i(584897);let u="Paste the whole JSON file. It needs client_email and private_key.";var v=a.i(26972),w=a.i(689963),x=a.i(427221),y=a.i(899370),z=a.i(462820),A=a.i(449734),B=a.i(514670),C=a.i(944808),D=a.i(112735),E=a.i(354448);let F=["Every permission it needs is there"],G=(a,b)=>`${a} ${b}${1===a?"":"s"}`;async function H(a,b,c,d){let e,f=r.m[a].name;try{e=await (d.fetch??fetch)(b,{headers:{Authorization:`Bearer ${c}`,Accept:"application/json"},signal:AbortSignal.timeout(d.timeoutMs??5e3),cache:"no-store"})}catch(a){return{ok:!1,kind:"transient",error:a instanceof DOMException&&("TimeoutError"===a.name||"AbortError"===a.name)?`${f} didn't answer within 5 seconds. Try again.`:`Couldn't reach ${f}. Check your connection and try again.`}}let g=await e.json().catch(()=>null);if(403===e.status&&"supabase"===a){let a=v.z.object({missing_permissions:w.z.array(x.z.string())}).safeParse(g);if(a.success&&a.data.missing_permissions.length){let b=a.data.missing_permissions;return{ok:!1,kind:"auth",error:`Missing permission${b.length>1?"s":""}: ${b.join(", ")}. Create a new token that includes ${b.length>1?"them":"it"}.`}}}return 401===e.status||403===e.status?{ok:!1,kind:"auth",error:`${f} rejected this credential (${e.status}). Check that you copied all of it.`}:429===e.status?{ok:!1,kind:"transient",error:`${f} says there were too many requests. Try again in a minute.`}:e.ok?{ok:!0,body:g}:{ok:!1,kind:"transient",error:`${f} returned an error (${e.status}). Try again in a minute.`}}let I=a=>({ok:!1,kind:"format",error:`${r.m[a].name} answered in a format the console doesn't recognise.`});function J(a,b){let c=r.m[a].name;return"github"===a||"github_write"===a?{ok:!1,kind:"auth"===b.kind||"scope"===b.kind?"auth":"format"===b.kind?"format":"transient",error:b.error}:"scope"===b.kind&&b.missing?.length?{ok:!1,kind:"auth",error:`Missing permission${b.missing.length>1?"s":""}: ${b.missing.join(", ")}. Create a new token that includes ${b.missing.length>1?"them":"it"}.`}:"auth"===b.kind||"scope"===b.kind?{ok:!1,kind:"auth",error:"firebase"===a?b.error:`${c} rejected this credential (${b.status??401}). Check that you copied all of it.`}:"format"===b.kind?{ok:!1,kind:"format",error:`${c} answered in a format the console doesn't recognise.`}:{ok:!1,kind:"transient",error:`${b.error} Try again in a minute.`}}let K={project_admin_read:"service health",analytics_usage_read:"API traffic",organization_admin_read:"organization plan"};async function L(a,b,c={}){switch(a){case"vercel":{let d=await H(a,"https://api.vercel.com/v10/projects?limit=100",b,c);if(!d.ok)return d;let e=v.z.object({projects:w.z.array(v.z.object({name:x.z.string()}))}).safeParse(d.body);return e.success?{ok:!0,summary:`Found ${G(e.data.projects.length,"project")}`,details:F}:I(a)}case"supabase":{let d=await H(a,"https://api.supabase.com/v1/projects",b,c);if(!d.ok)return d;let e=w.z.array(v.z.object({ref:x.z.string(),name:x.z.string(),status:x.z.string(),organization_slug:x.z.string().optional(),region:x.z.string().optional(),created_at:x.z.string().optional()})).safeParse(d.body);if(!e.success)return I(a);let f=e.data.filter(a=>a.status.startsWith("ACTIVE")).length,g=e.data.filter(a=>"INACTIVE"===a.status).length,h=e.data.map(a=>({ref:a.ref,name:a.name,orgSlug:a.organization_slug??"",region:a.region??"",createdAt:a.created_at??"",status:a.status,pgVersion:null})),i=await (0,D.T)(b,h,c),j=["projects",...i.used.filter(a=>"projects_read"!==a).map(a=>K[a]??a)];return{ok:!0,summary:`Found ${G(e.data.length,"project")} (${f} active, ${g} paused)`,details:[...i.missing.length?i.missing.map(a=>`Missing ${a}: ${D.W[a]??"some columns stay empty"}`):F,...i.notes],scopeNote:`Reads ${j.join(", ")}${i.missing.length?` \xb7 missing ${i.missing.join(", ")}`:""} \xb7 database size checked daily`}}case"neon":{let d=await (0,C.m)(b,c);return d.ok?{ok:!0,summary:`Found ${G(d.data.length,"project")}`,details:F}:J(a,d)}case"cloudflare":{let d=await H(a,"https://api.cloudflare.com/client/v4/zones?per_page=50",b,c);if(!d.ok)return d;let e=v.z.object({success:y.z.literal(!0),result:w.z.array(v.z.object({name:x.z.string(),account:v.z.object({id:x.z.string()}).nullish()}))}).safeParse(d.body);if(!e.success)return I(a);let f=e.data.result.find(a=>a.account?.id)?.account?.id,g=f?await (0,B.L)(b,f,c):null,h=g?g.ok?`D1 read ✓ (${G(g.data.length,"database")})`:"scope"===g.kind||"auth"===g.kind?"No D1 read: add Account → D1 → Read to watch D1 databases (optional)":"D1 couldn't be checked right now":"D1 not checked (no zone to find the account)";return{ok:!0,summary:`Found ${G(e.data.result.length,"zone")}`,details:[...F,h],scopeNote:`Zone, DNS, SSL and Certificates read${g?.ok?" · D1 read":""}`}}case"firebase":{let d=(0,s.p)(b);if(!d)return{ok:!1,kind:"format",error:u};let e=await (0,s.X)(d,c);if(!e.ok)return J(a,e);let f=await (0,A.E)(e.data,c),g=(0,A.b)(d,f);if(!g.ok)return J(a,g);let h=new Date,[i,j,k]=await Promise.all([(0,A.G)(e.data,d.project_id,c),(0,A.q)(e.data,d.project_id,c),(0,A.W)(e.data,d.project_id,new Date(h.getTime()-36e5),h,c)]),l=a=>a?"✓":"✗ (role missing)",m=[f.ok?"firebase.viewer":null,i.ok?"datastore.viewer":null,j.ok?"firebaseauth.viewer":null,k.ok?"monitoring.viewer":null].filter(Boolean);return{ok:!0,summary:`Found ${G(g.data.length,"Firebase project")}`,details:[`Firestore health read ${l(i.ok)} \xb7 Auth user count ${l(j.ok)}`,k.ok?"Cloud Monitoring: reads, writes, and deletes today can be read ✓":`Cloud Monitoring can't be read (${k.reason??k.kind}): reads, writes and deletes today stay empty`],scopeNote:`${m.join(", ")}${k.ok?"":" · no Cloud Monitoring"}`}}case"turso":{let d=await (0,E.t)(b,c);if(!d.ok)return J(a,d);let e=d.data[0]?.org,f=e?await (0,E.d)(b,e,c):null;return{ok:!0,summary:`Found ${G(d.data.length,"database")}`,details:[null===f?"No database yet: usage is read once there is one":f.ok?"Usage read ✓ (rows read and written, storage)":`Usage can't be read (${f.kind}): the usage columns stay empty`],scopeNote:`Databases${f?.ok?" and usage":""} \xb7 no read-only option`}}case"upstash":{let d=(0,t.L)(b);if(!d)return{ok:!1,kind:"format",error:"Paste your Upstash email and the API key as email:API_KEY."};let e=await (0,t.M)(d,c);if(!e.ok)return J(a,e);let f=e.data[0]?await (0,t.Z)(d,e.data[0].id,c):null;return{ok:!0,summary:`Found ${G(e.data.length,"Redis database")}`,details:[null===f?"No database yet: stats are read once there is one":f.ok?"Stats read ✓ (commands, data size, bandwidth)":`Stats can't be read (${f.kind})`],scopeNote:"Redis databases and stats"}}case"github":{let d=await (0,q.k)(b,c);if(!d.ok)return J(a,d);let e=await (0,q.o)(b,c);if(!e.ok)return J(a,e);let f=e.data.repos.length;return{ok:!0,summary:`Found ${e.data.truncated?`${f}+`:f} repositor${1===f?"y":"ies"}`,details:[f?"Metadata read ✓":"No repositories are shared with this token yet: give it access to your apps' repositories","Contents and Actions read are checked per repository on the first Sync"],scopeNote:"Metadata, Contents and Actions read"}}case"github_write":{let d=await (0,q.k)(b,c);if(!d.ok)return J(a,d);let e=await (0,q.o)(b,c);if(!e.ok)return J(a,e);let f=e.data.repos.length;return{ok:!0,summary:`Sees ${e.data.truncated?`${f}+`:f} repositor${1===f?"y":"ies"}`,details:[f?"Metadata read ✓":"No repositories are shared with this token yet: choose the repositories you want update PRs for",z.K.githubWriteDetail],scopeNote:"Contents and Pull requests read and write"}}}}var M=a.i(572134),N=a.i(713095);let O={requireActionMember:i.g};async function P(a,b){if("vercel"===a){let a=await (0,M.o)(b);return a.ok?{expiresAt:a.data}:{}}if("cloudflare"===a){let a=await (0,p.d)(b);return a.ok?{expiresAt:a.data.expiresAt}:{}}if("github"===a||"github_write"===a){let a=await (0,q.k)(b);return a.ok?{expiresAt:a.data.expiresAt}:{}}return{}}async function Q(a,b){let c=function(a,b){let c=r.m[a],d=b.trim();if(c.json){try{if(s.m.safeParse(JSON.parse(d)).success)return{ok:!0,value:d}}catch{}return{ok:!1,error:u}}let e=d.replace(/^bearer\s+/i,"").replace(/^["']|["']$/g,"").trim(),f=c.credentialKind.replace(/^Scoped /,"").replace(/^([A-Z][a-z])/,a=>a.toLowerCase()),g=/^[aeiou]/i.test(f)?"an":"a";return e?e.length<20?{ok:!1,error:`That's too short for ${g} ${f}.`}:"upstash"===a?(0,t.L)(e)?{ok:!0,value:e}:{ok:!1,error:"Paste your Upstash email and the API key as email:API_KEY."}:"github"!==a&&"github_write"!==a||/^github_pat_[A-Za-z0-9_]{20,}$/.test(e)?{ok:!0,value:e}:{ok:!1,error:"Use a fine-grained token (it starts with github_pat_). Classic tokens can't be limited to read-only."}:{ok:!1,error:`Paste the ${f}.`}}(a,b);return c.ok?{value:c.value,test:await L(a,c.value)}:{error:c.error}}async function R(a,b){return(0,h.F)("owner",async c=>{let d=await (0,o.C)(n.t.credential,c.id);if(!d.allowed)return{ok:!1,error:`Too many connection tests. Try again in ${(0,n.H)(d.retryAfter)}.`};if(!r.L.includes(a))return{ok:!1,error:"Unknown provider."};let e=await Q(a,b);return"error"in e?{ok:!1,error:e.error,fieldErrors:{credential:e.error}}:{ok:!0,data:e.test}},O)}async function S(a,b,i){return(0,h.F)("owner",async h=>{let j=await (0,o.C)(n.t.credential,h.id);if(!j.allowed)return{ok:!1,error:`Too many connection tests. Try again in ${(0,n.H)(j.retryAfter)}.`};if(!r.L.includes(a))return{ok:!1,error:"Unknown provider."};let k=await (0,e.f)().select({label:f.accounts.label}).from(f.accounts).where((0,c.u)(f.accounts.provider,a)),p=(0,g.z)(a,b,{labels:k.map(a=>a.label),count:k.length});if(!p.ok)return{ok:!1,error:p.error,fieldErrors:{label:p.error}};let q=await Q(a,i);if("error"in q)return{ok:!1,error:q.error,fieldErrors:{credential:q.error}};if(!q.test.ok)return{ok:!1,error:q.test.error,data:q.test};let s=(0,l.l)(q.value,(0,m.f)().OPS_ENCRYPTION_KEY);return await (0,e.f)().insert(f.accounts).values({provider:a,label:p.label,credentialCiphertext:s.ciphertext,credentialIv:s.iv,keyVersion:s.keyVersion,credentialKind:r.m[a].credentialKind,scopeNote:q.test.ok&&q.test.scopeNote||r.m[a].accessNote,status:"ok",lastTestAt:new Date,...await P(a,q.value)}),(0,d.revalidatePath)("/connections"),(0,d.revalidatePath)("/welcome"),{ok:!0,message:`${r.m[a].name} \xb7 ${p.label} connected.`,data:q.test}},O)}async function T(a,b){return(0,h.F)("owner",async g=>{let h,i=await (0,o.C)(n.t.credential,g.id);if(!i.allowed)return{ok:!1,error:`Too many connection tests. Try again in ${(0,n.H)(i.retryAfter)}.`};let[j]=await (0,e.f)().select().from(f.accounts).where((0,c.u)(f.accounts.id,a)).limit(1);if(!j||(h=j.provider,!r.L.includes(h)))return{ok:!1,error:"That account no longer exists."};let k=await Q(j.provider,b);if("error"in k)return{ok:!1,error:k.error,fieldErrors:{credential:k.error}};if(!k.test.ok)return{ok:!1,error:k.test.error,data:k.test};let p=(0,l.l)(k.value,(0,m.f)().OPS_ENCRYPTION_KEY);return await (0,e.f)().update(f.accounts).set({credentialCiphertext:p.ciphertext,credentialIv:p.iv,keyVersion:p.keyVersion,status:"ok",lastError:null,lastTestAt:new Date,updatedAt:new Date,...k.test.ok&&k.test.scopeNote?{scopeNote:k.test.scopeNote}:{},...await P(j.provider,k.value)}).where((0,c.u)(f.accounts.id,a)),(0,d.revalidatePath)("/connections"),{ok:!0,message:`${r.m[j.provider].name} \xb7 ${j.label} is connected again.`,data:k.test}},O)}async function U(a){return(0,h.F)("owner",async b=>{let h,i=await (0,o.C)(n.t.credential,b.id);if(!i.allowed)return{ok:!1,error:`Too many connection tests. Try again in ${(0,n.H)(i.retryAfter)}.`};let[j]=await (0,e.f)().select().from(f.accounts).where((0,c.u)(f.accounts.id,a)).limit(1);if(!j||(h=j.provider,!r.L.includes(h)))return{ok:!1,error:"That account no longer exists."};let k=(0,l.V)({ciphertext:j.credentialCiphertext,iv:j.credentialIv},(0,m.f)().OPS_ENCRYPTION_KEY),p=(0,g.A)(k),q=p?{ok:!1,kind:"auth",error:p}:await L(j.provider,k),s=(0,g.E)(q);return s&&await (0,e.f)().update(f.accounts).set({...s,lastTestAt:new Date,updatedAt:new Date,...q.ok&&q.scopeNote?{scopeNote:q.scopeNote}:{},...q.ok?await P(j.provider,k):{}}).where((0,c.u)(f.accounts.id,a)),(0,d.revalidatePath)("/connections"),q.ok?{ok:!0,message:`${r.m[j.provider].name} \xb7 ${j.label}: ${q.summary}.`}:{ok:!1,error:q.error}},O)}async function V(a){return(0,h.F)("owner",async()=>{let b,g=await (0,e.f)().delete(f.accounts).where((0,c.u)(f.accounts.id,a)).returning({provider:f.accounts.provider,label:f.accounts.label});(0,d.revalidatePath)("/connections"),g.length&&(0,j.J)(k.t);let h=g[0];if(!h)return{ok:!1,error:"That account no longer exists."};let i=(b=h.provider,r.L.includes(b))?r.m[h.provider].name:"drive"===h.provider?"Google Drive":h.provider;return{ok:!0,message:`${i} \xb7 ${h.label} removed. Its credential is deleted.`}},O)}(0,N.ensureServerEntryExports)([R,S,T,U,V]),(0,b.registerServerReference)(R,"60967e0d0291e6d8142545f340bd45880ea031babc",null),(0,b.registerServerReference)(S,"705038dfb40f7b686a137f0d1f24a29eaa314beb31",null),(0,b.registerServerReference)(T,"60f788c6f27e52e489eba677bacfb9459f175091d6",null),(0,b.registerServerReference)(U,"400b800629a57865cc3f38ee9c9a9e3cdb4d4a5142",null),(0,b.registerServerReference)(V,"403d8d78c67115710490293736dcc0096400c7a0c3",null),a.s(["s",0,S,"$",0,R,"f",0,V,"K",0,T,"H",0,U],446601);var W=a.i(247730),X=a.i(743303),Y=a.i(556987);let Z={requireActionMember:i.g},$=/^[0-9a-f-]{36}$/i,_="Something in that request wasn't valid.";async function aa(a){return(0,h.F)("owner",async b=>{if("string"!=typeof a||!$.test(a))return{ok:!1,error:_};let c=await (0,o.C)(n.t.sync,b.id);if(!c.allowed)return{ok:!1,error:`Too many syncs. Try again in ${(0,n.H)(c.retryAfter)}.`};let e=await (0,X.k)(a);if((0,d.revalidatePath)("/connections"),(0,j.J)(k.t),!e.ok)return{ok:!1,error:e.error};let f=a=>"db"===a.badge||"fs"===a.badge,g=e.rows.some(f)?await (0,W.f)():null;return{ok:!0,data:{rows:g?e.rows.map(a=>f(a)?{...a,alias:(0,Y.X)(g,a.id)}:a):e.rows,skippedTeams:e.skippedTeams,overLimit:e.overLimit}}},Z)}async function ab(a,b,c){return(0,h.F)("owner",async()=>{if("string"!=typeof a||!$.test(a)||!Array.isArray(b))return{ok:!1,error:_};let e=b.filter(a=>"string"==typeof a&&$.test(a)).slice(0,500),f=await (0,X.v)(a,e,!0===c);return f.ok?((0,d.revalidatePath)("/connections"),(0,d.revalidatePath)("/welcome"),(0,j.J)(k.t),{ok:!0,message:`Watching ${f.on} of ${f.total} resources. Checks start on the next collector run.`,data:{overLimit:f.overLimit}}):{ok:!1,error:f.error}},Z)}(0,N.ensureServerEntryExports)([aa,ab]),(0,b.registerServerReference)(aa,"4002b6d0c33a29dc4db384dc865b4f4a63c7bd6659",null),(0,b.registerServerReference)(ab,"7075de08fb6d670f4d6e104e5e68a98e7c95503f02",null),a.s(["h",0,ab,"E",0,aa],908122)}];
1
+ module.exports=[446601,908122,a=>{"use strict";var b=a.i(137936),c=a.i(93321),d=a.i(118558),e=a.i(548734),f=a.i(837137),g=a.i(109068),h=a.i(600079),i=a.i(109307),j=a.i(678831),k=a.i(45617),l=a.i(358179),m=a.i(492665),n=a.i(312573),o=a.i(323878),p=a.i(44925),q=a.i(760417),r=a.i(686921),s=a.i(15827),t=a.i(584897);let u="Paste the whole JSON file. It needs client_email and private_key.";var v=a.i(26972),w=a.i(689963),x=a.i(427221),y=a.i(899370),z=a.i(462820),A=a.i(449734),B=a.i(514670),C=a.i(944808),D=a.i(112735),E=a.i(354448);let F=["Every permission it needs is there"],G=(a,b)=>`${a} ${b}${1===a?"":"s"}`;async function H(a,b,c,d){let e,f=r.m[a].name;try{e=await (d.fetch??fetch)(b,{headers:{Authorization:`Bearer ${c}`,Accept:"application/json"},signal:AbortSignal.timeout(d.timeoutMs??5e3),cache:"no-store"})}catch(a){return{ok:!1,kind:"transient",error:a instanceof DOMException&&("TimeoutError"===a.name||"AbortError"===a.name)?`${f} didn't answer within 5 seconds. Try again.`:`Couldn't reach ${f}. Check your connection and try again.`}}let g=await e.json().catch(()=>null);if(403===e.status&&"supabase"===a){let a=v.z.object({missing_permissions:w.z.array(x.z.string())}).safeParse(g);if(a.success&&a.data.missing_permissions.length){let b=a.data.missing_permissions;return{ok:!1,kind:"auth",error:`Missing permission${b.length>1?"s":""}: ${b.join(", ")}. Create a new token that includes ${b.length>1?"them":"it"}.`}}}return 401===e.status||403===e.status?{ok:!1,kind:"auth",error:`${f} rejected this credential (${e.status}). Check that you copied all of it.`}:429===e.status?{ok:!1,kind:"transient",error:`${f} says there were too many requests. Try again in a minute.`}:e.ok?{ok:!0,body:g}:{ok:!1,kind:"transient",error:`${f} returned an error (${e.status}). Try again in a minute.`}}let I=a=>({ok:!1,kind:"format",error:`${r.m[a].name} answered in a format the console doesn't recognise.`});function J(a,b){let c=r.m[a].name;return"github"===a||"github_write"===a?{ok:!1,kind:"auth"===b.kind||"scope"===b.kind?"auth":"format"===b.kind?"format":"transient",error:b.error}:"scope"===b.kind&&b.missing?.length?{ok:!1,kind:"auth",error:`Missing permission${b.missing.length>1?"s":""}: ${b.missing.join(", ")}. Create a new token that includes ${b.missing.length>1?"them":"it"}.`}:"auth"===b.kind||"scope"===b.kind?{ok:!1,kind:"auth",error:"firebase"===a?b.error:`${c} rejected this credential (${b.status??401}). Check that you copied all of it.`}:"format"===b.kind?{ok:!1,kind:"format",error:`${c} answered in a format the console doesn't recognise.`}:{ok:!1,kind:"transient",error:`${b.error} Try again in a minute.`}}let K={project_admin_read:"service health",analytics_usage_read:"API traffic",organization_admin_read:"organization plan"};async function L(a,b,c={}){switch(a){case"vercel":{let d=await H(a,"https://api.vercel.com/v10/projects?limit=100",b,c);if(!d.ok)return d;let e=v.z.object({projects:w.z.array(v.z.object({name:x.z.string()}))}).safeParse(d.body);return e.success?{ok:!0,summary:`Found ${G(e.data.projects.length,"project")}`,details:F}:I(a)}case"supabase":{let d=await H(a,"https://api.supabase.com/v1/projects",b,c);if(!d.ok)return d;let e=w.z.array(v.z.object({ref:x.z.string(),name:x.z.string(),status:x.z.string(),organization_slug:x.z.string().optional(),region:x.z.string().optional(),created_at:x.z.string().optional()})).safeParse(d.body);if(!e.success)return I(a);let f=e.data.filter(a=>a.status.startsWith("ACTIVE")).length,g=e.data.filter(a=>"INACTIVE"===a.status).length,h=e.data.map(a=>({ref:a.ref,name:a.name,orgSlug:a.organization_slug??"",region:a.region??"",createdAt:a.created_at??"",status:a.status,pgVersion:null})),i=await (0,D.T)(b,h,c),j=["projects",...i.used.filter(a=>"projects_read"!==a).map(a=>K[a]??a)];return{ok:!0,summary:`Found ${G(e.data.length,"project")} (${f} active, ${g} paused)`,details:[...i.missing.length?i.missing.map(a=>`Missing ${a}: ${D.W[a]??"some columns stay empty"}`):F,...i.notes],scopeNote:`Reads ${j.join(", ")}${i.missing.length?` \xb7 missing ${i.missing.join(", ")}`:""} \xb7 database size checked daily`}}case"neon":{let d=await (0,C.m)(b,c);return d.ok?{ok:!0,summary:`Found ${G(d.data.length,"project")}`,details:F}:J(a,d)}case"cloudflare":{let d=await H(a,"https://api.cloudflare.com/client/v4/zones?per_page=50",b,c);if(!d.ok)return d;let e=v.z.object({success:y.z.literal(!0),result:w.z.array(v.z.object({name:x.z.string(),account:v.z.object({id:x.z.string()}).nullish()}))}).safeParse(d.body);if(!e.success)return I(a);let f=e.data.result.find(a=>a.account?.id)?.account?.id,g=f?await (0,B.L)(b,f,c):null,h=g?g.ok?`D1 read ✓ (${G(g.data.length,"database")})`:"scope"===g.kind||"auth"===g.kind?"No D1 read: add Account → D1 → Read to watch D1 databases (optional)":"D1 couldn't be checked right now":"D1 not checked (no zone to find the account)";return{ok:!0,summary:`Found ${G(e.data.result.length,"zone")}`,details:[...F,h],scopeNote:`Zone, DNS, SSL and Certificates read${g?.ok?" · D1 read":""}`}}case"firebase":{let d=(0,s.p)(b);if(!d)return{ok:!1,kind:"format",error:u};let e=await (0,s.X)(d,c);if(!e.ok)return J(a,e);let f=await (0,A.E)(e.data,c),g=(0,A.b)(d,f);if(!g.ok)return J(a,g);let h=new Date,[i,j,k]=await Promise.all([(0,A.G)(e.data,d.project_id,c),(0,A.q)(e.data,d.project_id,c),(0,A.W)(e.data,d.project_id,new Date(h.getTime()-36e5),h,c)]),l=a=>a?"✓":"✗ (role missing)",m=[f.ok?"firebase.viewer":null,i.ok?"datastore.viewer":null,j.ok?"firebaseauth.viewer":null,k.ok?"monitoring.viewer":null].filter(Boolean);return{ok:!0,summary:`Found ${G(g.data.length,"Firebase project")}`,details:[`Firestore health read ${l(i.ok)} \xb7 Auth user count ${l(j.ok)}`,k.ok?"Cloud Monitoring: reads, writes, and deletes today can be read ✓":`Cloud Monitoring can't be read (${k.reason??k.kind}): reads, writes and deletes today stay empty`],scopeNote:`${m.join(", ")}${k.ok?"":" · no Cloud Monitoring"}`}}case"turso":{let d=await (0,E.t)(b,c);if(!d.ok)return J(a,d);let e=d.data[0]?.org,f=e?await (0,E.d)(b,e,c):null;return{ok:!0,summary:`Found ${G(d.data.length,"database")}`,details:[null===f?"No database yet: usage is read once there is one":f.ok?"Usage read ✓ (rows read and written, storage)":`Usage can't be read (${f.kind}): the usage columns stay empty`],scopeNote:`Databases${f?.ok?" and usage":""} \xb7 no read-only option`}}case"upstash":{let d=(0,t.L)(b);if(!d)return{ok:!1,kind:"format",error:"Paste your Upstash email and the API key as email:API_KEY."};let e=await (0,t.M)(d,c);if(!e.ok)return J(a,e);let f=e.data[0]?await (0,t.Z)(d,e.data[0].id,c):null;return{ok:!0,summary:`Found ${G(e.data.length,"Redis database")}`,details:[null===f?"No database yet: stats are read once there is one":f.ok?"Stats read ✓ (commands, data size, bandwidth)":`Stats can't be read (${f.kind})`],scopeNote:"Redis databases and stats"}}case"github":{let d=await (0,q.k)(b,c);if(!d.ok)return J(a,d);let e=await (0,q.o)(b,c);if(!e.ok)return J(a,e);let f=e.data.repos.length;return{ok:!0,summary:`Found ${e.data.truncated?`${f}+`:f} repositor${1===f?"y":"ies"}`,details:[f?"Metadata read ✓":"No repositories are shared with this token yet: give it access to your apps' repositories","Contents and Actions read are checked per repository on the first Sync"],scopeNote:"Metadata, Contents and Actions read"}}case"github_write":{let d=await (0,q.k)(b,c);if(!d.ok)return J(a,d);let e=await (0,q.o)(b,c);if(!e.ok)return J(a,e);let f=e.data.repos.length;return{ok:!0,summary:`Sees ${e.data.truncated?`${f}+`:f} repositor${1===f?"y":"ies"}`,details:[f?"Metadata read ✓":"No repositories are shared with this token yet: choose the repositories you want update PRs for",z.K.githubWriteDetail],scopeNote:"Contents and Pull requests read and write"}}}}var M=a.i(572134),N=a.i(713095);let O={requireActionMember:i.g};async function P(a,b){if("vercel"===a){let a=await (0,M.o)(b);return a.ok?{expiresAt:a.data}:{}}if("cloudflare"===a){let a=await (0,p.d)(b);return a.ok?{expiresAt:a.data.expiresAt}:{}}if("github"===a||"github_write"===a){let a=await (0,q.k)(b);return a.ok?{expiresAt:a.data.expiresAt}:{}}return{}}async function Q(a,b){let c=function(a,b){let c=r.m[a],d=b.trim();if(c.json){try{if(s.m.safeParse(JSON.parse(d)).success)return{ok:!0,value:d}}catch{}return{ok:!1,error:u}}let e=d.replace(/^bearer\s+/i,"").replace(/^["']|["']$/g,"").trim(),f=c.credentialKind.replace(/^Scoped /,"").replace(/^([A-Z][a-z])/,a=>a.toLowerCase()),g=/^[aeiou]/i.test(f)?"an":"a";return e?e.length<20?{ok:!1,error:`That's too short for ${g} ${f}.`}:"upstash"===a?(0,t.L)(e)?{ok:!0,value:e}:{ok:!1,error:"Paste your Upstash email and the API key as email:API_KEY."}:"github"!==a&&"github_write"!==a||/^github_pat_[A-Za-z0-9_]{20,}$/.test(e)?{ok:!0,value:e}:{ok:!1,error:"Use a fine-grained token (it starts with github_pat_). Classic tokens can't be limited to read-only."}:{ok:!1,error:`Paste the ${f}.`}}(a,b);return c.ok?{value:c.value,test:await L(a,c.value)}:{error:c.error}}async function R(a,b){return(0,h.F)("owner",async c=>{let d=await (0,o.C)(n.t.credential,c.id);if(!d.allowed)return{ok:!1,error:`Too many connection tests. Try again in ${(0,n.H)(d.retryAfter)}.`};if(!r.L.includes(a))return{ok:!1,error:"Unknown provider."};let e=await Q(a,b);return"error"in e?{ok:!1,error:e.error,fieldErrors:{credential:e.error}}:{ok:!0,data:e.test}},O)}async function S(a,b,i){return(0,h.F)("owner",async h=>{let j=await (0,o.C)(n.t.credential,h.id);if(!j.allowed)return{ok:!1,error:`Too many connection tests. Try again in ${(0,n.H)(j.retryAfter)}.`};if(!r.L.includes(a))return{ok:!1,error:"Unknown provider."};let k=await (0,e.f)().select({label:f.accounts.label}).from(f.accounts).where((0,c.u)(f.accounts.provider,a)),p=(0,g.z)(a,b,{labels:k.map(a=>a.label),count:k.length});if(!p.ok)return{ok:!1,error:p.error,fieldErrors:{label:p.error}};let q=await Q(a,i);if("error"in q)return{ok:!1,error:q.error,fieldErrors:{credential:q.error}};if(!q.test.ok)return{ok:!1,error:q.test.error,data:q.test};let s=(0,l.l)(q.value,(0,m.f)().OPS_ENCRYPTION_KEY);return await (0,e.f)().insert(f.accounts).values({provider:a,label:p.label,credentialCiphertext:s.ciphertext,credentialIv:s.iv,keyVersion:s.keyVersion,credentialKind:r.m[a].credentialKind,scopeNote:q.test.ok&&q.test.scopeNote||r.m[a].accessNote,status:"ok",lastTestAt:new Date,...await P(a,q.value)}),(0,d.revalidatePath)("/connections"),(0,d.revalidatePath)("/welcome"),{ok:!0,message:`${r.m[a].name} \xb7 ${p.label} connected.`,data:q.test}},O)}async function T(a,b){return(0,h.F)("owner",async g=>{let h,i=await (0,o.C)(n.t.credential,g.id);if(!i.allowed)return{ok:!1,error:`Too many connection tests. Try again in ${(0,n.H)(i.retryAfter)}.`};let[j]=await (0,e.f)().select().from(f.accounts).where((0,c.u)(f.accounts.id,a)).limit(1);if(!j||(h=j.provider,!r.L.includes(h)))return{ok:!1,error:"That account no longer exists."};let k=await Q(j.provider,b);if("error"in k)return{ok:!1,error:k.error,fieldErrors:{credential:k.error}};if(!k.test.ok)return{ok:!1,error:k.test.error,data:k.test};let p=(0,l.l)(k.value,(0,m.f)().OPS_ENCRYPTION_KEY);return await (0,e.f)().update(f.accounts).set({credentialCiphertext:p.ciphertext,credentialIv:p.iv,keyVersion:p.keyVersion,status:"ok",lastError:null,lastTestAt:new Date,updatedAt:new Date,...k.test.ok&&k.test.scopeNote?{scopeNote:k.test.scopeNote}:{},...await P(j.provider,k.value)}).where((0,c.u)(f.accounts.id,a)),(0,d.revalidatePath)("/connections"),{ok:!0,message:`${r.m[j.provider].name} \xb7 ${j.label} is connected again.`,data:k.test}},O)}async function U(a){return(0,h.F)("owner",async b=>{let h,i=await (0,o.C)(n.t.credential,b.id);if(!i.allowed)return{ok:!1,error:`Too many connection tests. Try again in ${(0,n.H)(i.retryAfter)}.`};let[j]=await (0,e.f)().select().from(f.accounts).where((0,c.u)(f.accounts.id,a)).limit(1);if(!j||(h=j.provider,!r.L.includes(h)))return{ok:!1,error:"That account no longer exists."};let k=(0,l.V)({ciphertext:j.credentialCiphertext,iv:j.credentialIv},(0,m.f)().OPS_ENCRYPTION_KEY),p=(0,g.A)(k),q=p?{ok:!1,kind:"auth",error:p}:await L(j.provider,k),s=(0,g.E)(q);return s&&await (0,e.f)().update(f.accounts).set({...s,lastTestAt:new Date,updatedAt:new Date,...q.ok&&q.scopeNote?{scopeNote:q.scopeNote}:{},...q.ok?await P(j.provider,k):{}}).where((0,c.u)(f.accounts.id,a)),(0,d.revalidatePath)("/connections"),q.ok?{ok:!0,message:`${r.m[j.provider].name} \xb7 ${j.label}: ${q.summary}.`}:{ok:!1,error:q.error}},O)}async function V(a){return(0,h.F)("owner",async()=>{let b,g=await (0,e.f)().delete(f.accounts).where((0,c.u)(f.accounts.id,a)).returning({provider:f.accounts.provider,label:f.accounts.label});(0,d.revalidatePath)("/connections"),g.length&&(0,j.J)(k.t);let h=g[0];if(!h)return{ok:!1,error:"That account no longer exists."};let i=(b=h.provider,r.L.includes(b))?r.m[h.provider].name:"drive"===h.provider?"Google Drive":h.provider;return{ok:!0,message:`${i} \xb7 ${h.label} removed. Its credential is deleted.`}},O)}(0,N.ensureServerEntryExports)([R,S,T,U,V]),(0,b.registerServerReference)(R,"60ad34730cbac06616ddd3a5479fd85a93aacd43b9",null),(0,b.registerServerReference)(S,"706c67e5ee74298fef15e453b23488d435eca03f79",null),(0,b.registerServerReference)(T,"60592f7246f91859bc1f751ad68cff0b23fe4c94dd",null),(0,b.registerServerReference)(U,"4072f8102843c5eb0bb75d44a343c0aa4783890dc2",null),(0,b.registerServerReference)(V,"40bb5065d561e0dd4105850e887689468c206580bd",null),a.s(["s",0,S,"$",0,R,"f",0,V,"K",0,T,"H",0,U],446601);var W=a.i(247730),X=a.i(743303),Y=a.i(556987);let Z={requireActionMember:i.g},$=/^[0-9a-f-]{36}$/i,_="Something in that request wasn't valid.";async function aa(a){return(0,h.F)("owner",async b=>{if("string"!=typeof a||!$.test(a))return{ok:!1,error:_};let c=await (0,o.C)(n.t.sync,b.id);if(!c.allowed)return{ok:!1,error:`Too many syncs. Try again in ${(0,n.H)(c.retryAfter)}.`};let e=await (0,X.k)(a);if((0,d.revalidatePath)("/connections"),(0,j.J)(k.t),!e.ok)return{ok:!1,error:e.error};let f=a=>"db"===a.badge||"fs"===a.badge,g=e.rows.some(f)?await (0,W.f)():null;return{ok:!0,data:{rows:g?e.rows.map(a=>f(a)?{...a,alias:(0,Y.X)(g,a.id)}:a):e.rows,skippedTeams:e.skippedTeams,overLimit:e.overLimit}}},Z)}async function ab(a,b,c){return(0,h.F)("owner",async()=>{if("string"!=typeof a||!$.test(a)||!Array.isArray(b))return{ok:!1,error:_};let e=b.filter(a=>"string"==typeof a&&$.test(a)).slice(0,500),f=await (0,X.v)(a,e,!0===c);return f.ok?((0,d.revalidatePath)("/connections"),(0,d.revalidatePath)("/welcome"),(0,j.J)(k.t),{ok:!0,message:`Watching ${f.on} of ${f.total} resources. Checks start on the next collector run.`,data:{overLimit:f.overLimit}}):{ok:!1,error:f.error}},Z)}(0,N.ensureServerEntryExports)([aa,ab]),(0,b.registerServerReference)(aa,"407499dff7d244a964962e6243873c1b8e1609dc4c",null),(0,b.registerServerReference)(ab,"70770d57f1168563e806be3556a541666d43b5623e",null),a.s(["h",0,ab,"E",0,aa],908122)}];
2
2
 
3
3
  //# sourceMappingURL=src_app_%28console%29_connections_actions_ts_103blv4gzq76z._.js.map
@@ -1,3 +1,3 @@
1
- module.exports=[198398,a=>{"use strict";var b=a.i(137936),c=a.i(905246),d=a.i(118558),e=a.i(600079),f=a.i(109307),g=a.i(21096),h=a.i(77608),i=a.i(384084);let j="This request expired (requests last 24 hours) or was already decided. Ask again if it's still needed.",k="Type the new resource's name exactly to approve it.",l=async a=>{try{await a}catch{console.warn("create: audit or notice failed")}};async function m(a,b,c,d,e){if(!("string"==typeof b&&i.t.includes(b))||"string"!=typeof c||c.length>100)return{ok:!1,error:"Something in that request wasn't valid."};let f=await e.quota(a.id,`create:${b}`);if(f)return{ok:!1,error:f};let g=await e.executor(b).prepare(c,d);if(!g.ok)return{ok:!1,error:g.error,...g.field?{fieldErrors:{[g.field]:g.error}}:{}};if(!await e.limitRequest(a.id))return{ok:!1,error:"You've asked for 3 creates today, the daily limit. Try again tomorrow."};let h=e.now(),j=await e.insert({type:b,provider:{dns_record:"cloudflare",neon_branch:"neon",supabase_project:"supabase",firebase_project:"firebase"}[b],accountId:g.p.accountId,targetResourceId:g.p.targetResourceId,targetLabel:g.p.targetLabel.slice(0,120),inputs:g.p.inputs,requestedBy:a.id,expiresAt:new Date(h.getTime()+i.e)}),k=(0,i.p)(b,j.inputs);return await l(e.audit({kind:"ok",message:`Create requested \xb7 ${i.S[b]} ${k.confirmName}`,detail:k.summary,resourceId:j.targetResourceId,actorUserId:a.userId})),await l(e.notify(j)),{ok:!0,message:`Asked. ${g.p.cost} It waits for the Owner's approval for 24 hours.`,data:{id:j.id,cost:g.p.cost}}}async function n(a,b,c){if("string"!=typeof b)return{ok:!1,error:j};let d=await c.decide(b,"reject",a.id,c.now());if(!d)return{ok:!1,error:j};let e=(0,i.p)(d.type,d.inputs);return await l(c.audit({kind:"ok",message:`Create rejected \xb7 ${i.S[d.type]} ${e.confirmName}`,resourceId:d.targetResourceId,actorUserId:a.userId})),{ok:!0,message:"Rejected. Nothing was created."}}async function o(a,b,c,d){let e;if("string"!=typeof b)return{ok:!1,error:j};let f=await d.get(b);if(!f||"requested"!==f.status||f.expiresAt.getTime()<=d.now().getTime())return{ok:!1,error:j};let g=(0,i.p)(f.type,f.inputs);if("string"!=typeof c||c.trim()!==g.confirmName)return{ok:!1,error:k,fieldErrors:{confirm:k}};let h=await d.quota(a.id,`create:${f.id}`);if(h)return{ok:!1,error:h};if(!await d.decide(b,"approve",a.id,d.now()))return{ok:!1,error:j};let m=await d.claim(b,d.now());if(!m)return{ok:!1,error:"This request is already running."};try{e=await d.executor(m.type).run(m)}catch(a){console.warn("create run failed:",a instanceof Error?a.name:"error"),e={ok:!1,error:"Something went wrong before the create finished. Check the provider's dashboard before asking again.",checked:!1,maybe:!0}}let n=`${i.S[m.type]} ${g.confirmName}`,o=m.requestedBy===a.id?"asked and approved by the Owner":`asked by member ${m.requestedBy.slice(0,8)}, approved by the Owner`;return e.ok?(await d.finish(m.id,{ok:!0,result:e.result},d.now()),await l(d.audit({kind:"ok",message:`Created \xb7 ${n}`,detail:`${g.summary} \xb7 ${o}`,resourceId:m.targetResourceId,actorUserId:a.userId})),{ok:!0,message:e.message,data:{result:e.result,...e.secret?{secret:e.secret}:{}}}):(await d.finish(m.id,{ok:!1,error:e.error},d.now()),await l(d.audit({kind:"err",message:e.checked?`Create refused at re-check \xb7 ${n}`:`Create failed \xb7 ${n}`,detail:`${e.error} \xb7 ${o}`,resourceId:m.targetResourceId,actorUserId:a.userId})),{ok:!1,error:e.error})}var p=a.i(70550),q=a.i(221084),r=a.i(610247),s=a.i(462820),t=a.i(666680),u=a.i(688275),v=a.i(672319),w=a.i(364525);let x=(a,b=300)=>"string"==typeof a&&a.length<=b?a:"",y=(a,b)=>({ok:!1,field:a,error:b}),z=/^(?:\*|[a-z0-9_](?:[a-z0-9_-]{0,61}[a-z0-9_])?)$/,A=/^[a-z0-9][a-z0-9-]{0,62}$/,B=/^br-[a-z0-9-]{3,60}$/;function C(a,b){return a.some(a=>a.id===b.parentId)?a.some(a=>a.name===b.name)?{ok:!1,error:`A branch named ${b.name} already exists in this project.`}:a.length>=u.a.branches?{ok:!1,error:`This project already has ${a.length} branches, Neon's free limit is ${u.a.branches}.`}:{ok:!0,cost:`Free. Uses ${a.length+1} of ${u.a.branches} branches in this project. No compute is created, so it uses no CU-hours until someone wakes it; its data counts toward the project's 0.5 GB storage.`}:{ok:!1,error:"The branch to copy from isn't in this project any more. Reload and pick another."}}let D=[["ap-southeast-1","Southeast Asia (Singapore)"],["ap-northeast-1","Northeast Asia (Tokyo)"],["ap-northeast-2","Northeast Asia (Seoul)"],["ap-southeast-2","Oceania (Sydney)"],["ap-south-1","South Asia (Mumbai)"],["ap-east-1","East Asia (Hong Kong)"],["us-east-1","East US (North Virginia)"],["us-east-2","East US (Ohio)"],["us-west-1","West US (North California)"],["us-west-2","West US (Oregon)"],["ca-central-1","Canada (Central)"],["sa-east-1","South America (São Paulo)"],["eu-west-1","West EU (Ireland)"],["eu-west-2","West EU (London)"],["eu-west-3","West EU (Paris)"],["eu-north-1","North EU (Stockholm)"],["eu-central-1","Central EU (Frankfurt)"],["eu-central-2","Central EU (Zurich)"]].map(([a])=>a),E=/^[A-Za-z0-9][A-Za-z0-9 ._-]{0,62}$/,F=/^[\w-]{1,64}$/,G=/^[a-z][a-z0-9-]{4,28}[a-z0-9]$/,H=/^[A-Za-z0-9 '"!-]{4,30}$/;var I=a.i(322145),J=a.i(45617),K=a.i(678831),L=a.i(418864),M=a.i(669943),N=a.i(44925);async function O(a,b,c,d={}){try{let e=await (0,N.p)(b,c,d);if(!e.ok)return console.warn(`dns refresh: couldn't read the zone's records (${e.kind})`),!1;let f=new Date;return await (0,M.r)(a,{records:e.data.records,recordsTruncated:e.data.truncated},f),await (0,L.x)(f),(0,K.J)([J.m.zones,J.m.domains]),!0}catch(a){return console.warn("dns refresh failed:",a instanceof Error?a.name:"error"),!1}}var P=a.i(26972),Q=a.i(83931),R=a.i(191179),S=a.i(427221),T=a.i(811365),U=a.i(689963);let V=P.z.object({success:Q.z.boolean(),result:R.z.unknown()}),W=P.z.object({id:S.z.string(),type:S.z.string(),name:S.z.string(),content:S.z.string().default(""),proxied:Q.z.boolean().default(!1),ttl:T.z.number().default(1),comment:S.z.string().nullish()}),X=P.z.object({errors:U.z.array(P.z.object({code:T.z.number().int()})).min(1)});async function Y(a,b,c,d={}){let e,f={type:c.type,name:c.name,content:c.content,ttl:c.ttl,..."TXT"===c.type?{}:{proxied:!0===c.proxied},comment:"Added from Watchbell"};try{e=await (d.fetch??fetch)(`https://api.cloudflare.com/client/v4/zones/${encodeURIComponent(b)}/dns_records`,{method:"POST",headers:{Authorization:`Bearer ${a}`,Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(f),signal:AbortSignal.timeout(d.timeoutMs??8e3),cache:"no-store"})}catch(a){return a instanceof DOMException&&("TimeoutError"===a.name||"AbortError"===a.name)?{ok:!1,kind:"transient",maybe:!0,error:"Cloudflare didn't answer in time; the record may still have been added. Check the zone before asking again."}:{ok:!1,kind:"transient",error:"Couldn't reach Cloudflare."}}let g=()=>e.body?.cancel().catch(()=>void 0);if(401===e.status)return await g(),{ok:!1,kind:"auth",status:401,error:"Cloudflare rejected this credential (401)."};if(403===e.status)return await g(),{ok:!1,kind:"scope",status:403,error:'This Cloudflare token can\'t add DNS records. Add "Zone → DNS → Edit" to it, or replace it with a token that has it.'};if(404===e.status)return await g(),{ok:!1,kind:"missing",status:404,error:"Cloudflare can't find this zone any more."};let h=await e.json().catch(()=>null);if(!e.ok){let a=X.safeParse(h);return{ok:!1,kind:429===e.status||e.status>=500?"transient":"refused",status:e.status,error:`Cloudflare refused this record (${e.status}${a.success?`, code ${a.data.errors[0].code}`:""}).`}}let i=V.safeParse(h),j=i.success&&i.data.success?W.safeParse(i.data.result):null;if(!j?.success)return{ok:!1,kind:"format",error:"Cloudflare added the record but answered in a format the console doesn't recognise. Check the zone."};let k=j.data;return{ok:!0,data:{id:k.id,type:k.type,name:k.name,content:k.content,proxied:k.proxied,ttl:k.ttl,comment:k.comment??null}}}var Z=a.i(288666);let $="https://cloudresourcemanager.googleapis.com/v3",_="https://firebase.googleapis.com/v1beta1",aa=/^operations\/(?!.*\.\.)[A-Za-z0-9._:/-]{1,200}$/,ab=P.z.object({projectId:S.z.string(),displayName:S.z.string().optional(),state:S.z.string().default("ACTIVE")});async function ac(a,b={}){let c=[],d="";for(let e=0;e<5;e++){let e=new URLSearchParams({pageSize:"100",...d?{pageToken:d}:{}}),f=await (0,Z.R)("Google Cloud",`${$}/projects:search?${e}`,{token:a},b);if(!f.ok)return f;let g=P.z.object({projects:U.z.array(ab).optional(),nextPageToken:S.z.string().optional()}).safeParse(f.data);if(!g.success)return(0,Z.t)("Google Cloud","the project list");if(c.push(...(g.data.projects??[]).map(a=>({projectId:a.projectId,displayName:a.displayName??a.projectId,state:a.state}))),!g.data.nextPageToken)break;d=g.data.nextPageToken}return{ok:!0,data:c}}let ad=P.z.object({name:S.z.string(),done:Q.z.boolean().optional(),error:P.z.object({code:T.z.number().optional(),message:S.z.string().optional()}).optional()}),ae=(a,b)=>{let c=ad.safeParse(a);return c.success&&aa.test(c.data.name)?{ok:!0,data:{name:c.data.name,done:!0===c.data.done,error:c.data.error?`error ${c.data.error.code??"?"}`:null}}:(0,Z.t)(b,"the operation")};async function af(a,b,c={}){let d=await (0,Z.R)("Google Cloud",`${$}/projects`,{method:"POST",token:a,body:{projectId:b.projectId,displayName:b.displayName}},{timeoutMs:15e3,...c});return d.ok?ae(d.data,"Google Cloud"):d}async function ag(a,b,c={}){let d=await (0,Z.R)("Firebase",`${_}/projects/${encodeURIComponent(b)}:addFirebase`,{method:"POST",token:a,body:{}},{timeoutMs:15e3,...c});return d.ok?ae(d.data,"Firebase"):d}async function ah(a,b,c,d={}){if(!aa.test(c))return(0,Z.t)("crm"===b?"Google Cloud":"Firebase","the operation name");let e="crm"===b?"Google Cloud":"Firebase",f=await (0,Z.R)(e,`${"crm"===b?$:_}/${c}`,{token:a},d);return f.ok?ae(f.data,e):f}var ai=a.i(944808);let aj="Neon";async function ak(a,b,c,d={}){let e={branch:{name:c.name,parent_id:c.parentId},endpoints:[]},f=await (0,Z.R)(aj,`https://console.neon.tech/api/v2/projects/${encodeURIComponent(b)}/branches`,{method:"POST",token:a,body:e},{timeoutMs:1e4,...d});if(!f.ok)return 423===f.status?{ok:!1,kind:"busy",status:423,error:"Neon is busy with another operation on this project. Ask again in a minute."}:403===f.status?{...f,kind:"scope",error:"This Neon API key can't manage this project; use a personal or organization key, or a key for this project."}:422===f.status||400===f.status||409===f.status?{ok:!1,kind:"format",status:f.status,error:`Neon refused this branch (${f.status}); the project may be at its branch limit.`}:f;let g=P.z.object({branch:P.z.object({id:S.z.string(),name:S.z.string()})}).safeParse(f.data);return g.success?{ok:!0,data:{id:g.data.branch.id,name:g.data.branch.name}}:(0,Z.t)(aj,"the new branch")}var al=a.i(112735);let am="https://api.supabase.com",an="Supabase",ao="organization_projects_create";async function ap(a,b={}){let c=await (0,Z.R)(an,`${am}/v1/organizations`,{token:a},b);if(!c.ok)return c;let d=U.z.array(P.z.object({slug:S.z.string().optional(),id:S.z.string().optional(),name:S.z.string()})).safeParse(c.data);return d.success?{ok:!0,data:d.data.map(a=>({slug:a.slug??a.id??"",name:a.name})).filter(a=>a.slug)}:(0,Z.t)(an,"the organization list")}async function aq(a,b,c={}){let d={name:b.name,organization_slug:b.orgSlug,region_selection:{type:"specific",code:b.region},db_pass:b.dbPass},e=await (0,Z.R)(an,`${am}/v1/projects`,{method:"POST",token:a,body:d},{timeoutMs:2e4,...c});if(!e.ok){if(403===e.status)return{ok:!1,kind:"scope",status:403,missing:e.missing??[ao],error:`This Supabase token can't create projects. Add the "${ao}" permission (Organization → Projects → Create).`};let{message:a,...b}=e;return b}let f=P.z.object({ref:S.z.string().optional(),id:S.z.string().optional(),name:S.z.string(),status:S.z.string().default("COMING_UP"),region:S.z.string().default(b.region)}).safeParse(e.data);return f.success&&(f.data.ref??f.data.id)?{ok:!0,data:{ref:f.data.ref??f.data.id,name:f.data.name,status:f.data.status,region:f.data.region}}:(0,Z.t)(an,"the new project")}let ar="This isn't watched any more, or its credential can't be read. Reload the page.",as=a=>({ok:!1,error:a,checked:!0}),at=(a,b)=>"transient"===a.kind&&void 0===a.status?{ok:!1,checked:!1,maybe:!0,error:`${a.error} The ${b} may still have been created; check the provider's dashboard before asking again.`}:{ok:!1,checked:!1,error:a.error};async function au(a,b,c,d){let e=await (0,N.p)(a,b,{fetch:d.fetch});return e.ok?function(a,b,c=!1){if(c)return{ok:!1,error:"This zone has more than 2,000 records, so the console can't be sure the name is free. Add it in Cloudflare."};let d=a.filter(a=>a.name.toLowerCase().replace(/\.$/,"")===b.name);return d.some(a=>"CNAME"===a.type)?{ok:!1,error:`${b.name} already has a CNAME record, and a CNAME can't share its name with any other record.`}:"CNAME"===b.type&&d.length?{ok:!1,error:`${b.name} already has ${d.length} record${1===d.length?"":"s"}; a CNAME can't share its name with other records.`}:d.length?{ok:!1,error:`${b.name} already exists in this zone. The console only adds new names; edit the existing record instead.`}:{ok:!0,cost:"Free. Cloudflare's free plan allows thousands of records per zone."}}(e.data.records,c,e.data.truncated):{ok:!1,error:"scope"===e.kind?'This Cloudflare token can\'t read DNS records; add "Zone → DNS → Read" and "Zone → DNS → Edit".':`Couldn't read the zone's records just now: ${e.error}`}}async function av(a,b,c){let d=await ap(a,{fetch:c.fetch});if(!d.ok)return{ok:!1,error:"scope"===d.kind?'This Supabase token can\'t list organizations; add the "organizations_read" permission.':`Couldn't read the organizations just now: ${d.error}`};let e=d.data.find(a=>a.slug===b.orgSlug);if(!e)return{ok:!1,error:"This token can't see that organization any more."};let f=await (0,al.X)(a,{fetch:c.fetch});if(!f.ok)return{ok:!1,error:`Couldn't count this account's projects just now: ${f.error}`};let g=[...new Set([b.orgSlug,...f.data.map(a=>a.orgSlug)].filter(Boolean))],h=await Promise.all(g.map(async b=>[b,await (0,al.K)(a,b,{fetch:c.fetch})])),i=new Map(h.map(([a,b])=>[a,b.ok?b.data:null])),j=new Set(h.filter(([,a])=>a.ok&&null!==a.data&&"free"!==a.data).map(([a])=>a)),k=h.find(([a])=>a===b.orgSlug)?.[1];if(k&&!k.ok&&"scope"===k.kind)return{ok:!1,error:'This Supabase token can\'t read organization plans; add "organization_admin_read" so the console can confirm the free plan.'};let l=function(a,b){if(null===a.plan)return{ok:!1,error:"The console couldn't read this organization's plan, so it won't create anything there. Only an organization on the free plan is allowed."};if("free"!==a.plan)return{ok:!1,error:`This organization is on the ${a.plan} plan. The console only creates projects in an organization on the free plan, because a project in a paid organization is billed from the first hour.`};if(a.projects.some(a=>a.orgSlug===b.orgSlug&&a.name.toLowerCase()===b.name.toLowerCase()&&"REMOVED"!==a.status))return{ok:!1,error:`This organization already has a project named ${b.name}.`};let c=a.projects.filter(b=>!a.paidOrgs.has(b.orgSlug)&&(0,v.Z)(b.status)).length;return c>=v.V?{ok:!1,error:`${c} free projects are already active, Supabase's free limit is ${v.V}. Pause one first; paused projects don't count.`}:{ok:!0,cost:`Free. Uses ${c+1} of ${v.V} active free projects. Free projects pause after a week without activity.`}}({plan:i.get(b.orgSlug)??null,projects:f.data,paidOrgs:j},b);return l.ok?{...l,orgName:e.name}:l}async function aw(a){let b=(0,h.p)();if(!b)return{ok:!1,kind:"auth",error:s.n.notSet("GOOGLE_CLIENT_ID and GOOGLE_CLIENT_SECRET",!0)};let c=await (0,r.d)();if(!c)return{ok:!1,kind:"auth",error:"Connect Google (create projects) on the Firebase page first."};let d=await (0,h.B)(b,c.refreshToken,{fetch:a.fetch});return d.ok?{ok:!0,data:d.accessToken}:{ok:!1,kind:"auth",error:"revoked"===d.kind?"Google ended the create-projects grant (Testing mode lasts 7 days, or it was removed). Connect Google again on the Firebase page.":d.error}}async function ax(a,b,c){let d=await ac(a,{fetch:c.fetch});if(!d.ok)return{ok:!1,error:"scope"===d.kind?"Google refused the project list: enable the Cloud Resource Manager API on the OAuth client's Google Cloud project.":`Couldn't read your Google Cloud projects just now: ${d.error}`};var e=d.data;if(e.some(a=>a.projectId===b.projectId))return{ok:!1,error:`You already have a Google Cloud project with the id ${b.projectId}.`};let f=e.filter(a=>"ACTIVE"===a.state).length;return f>=10?{ok:!1,error:`This Google account already has ${f} active projects. Google's project quota without a billing account is about 10; remove one in the Google Cloud console first (deleted projects count for 30 days).`}:{ok:!0,cost:`Free (Spark): no billing account is attached. ${f} active Google Cloud project${1===f?"":"s"} now; Google's quota without billing is about 10, and Google may refuse earlier.`}}async function ay(a,b,c,d){let e=c,f=d.pollTries??6;for(let c=0;!e.done&&c<f;c++){await (d.sleep??(a=>new Promise(b=>setTimeout(b,a))))(d.pollMs??2e3);let c=await ah(a,b,e.name,{fetch:d.fetch});if(!c.ok)return c;e=c.data}return{ok:!0,data:e}}let az={dns_record:(a={})=>({async prepare(b,c){let d=await (0,I.p)(b,"zone");if(!d||!d.resource.externalId)return{ok:!1,error:ar};let e=function(a,b){let c=a??{},d=x(c.type,10);if(!w.j.includes(d))return y("type","Only A, AAAA, CNAME and TXT records can be added here.");let e=function(a,b){let c=b.trim().toLowerCase().replace(/\.$/,""),d=a.trim().toLowerCase().replace(/\.$/,"");if(!d||!c||("@"===d?d=c:d===c||d.endsWith(`.${c}`)||(d=`${d}.${c}`),d.length>253))return null;let e=d===c?"":d.slice(0,-(c.length+1));return e&&!e.split(".").every((a,b)=>z.test(a)&&("*"!==a||0===b))?null:d}(x(c.name,260),b);if(!e)return y("name",`The name must be a host in ${b}, like shop or shop.${b}.`);let f="number"==typeof c.ttl?c.ttl:w.k,g=(0,w.V)({type:d,name:e},{content:x(c.content,4096),ttl:f,proxied:!0===c.proxied});return g.ok?{ok:!0,inputs:{zoneName:b.toLowerCase(),type:d,name:e,content:g.values.content,ttl:g.values.ttl,proxied:g.values.proxied}}:y(g.field,g.error)}(c,d.resource.name);if(!e.ok)return e;let f=await au(d.token,d.resource.externalId,e.inputs,a);return f.ok?{ok:!0,p:{inputs:e.inputs,accountId:d.account.id,targetResourceId:d.resource.id,targetLabel:d.resource.name,cost:f.cost}}:{ok:!1,error:f.error,field:"name"}},async run(b){let c=b.inputs,d=b.targetResourceId?await (0,I.p)(b.targetResourceId,"zone"):null;if(!d||!d.resource.externalId)return as(ar);let e=await au(d.token,d.resource.externalId,c,a);if(!e.ok)return as(e.error);let f=await Y(d.token,d.resource.externalId,{type:c.type,name:c.name,content:c.content,ttl:c.ttl,proxied:c.proxied},{fetch:a.fetch});if(!f.ok)return{ok:!1,checked:!1,error:f.error,...f.maybe?{maybe:!0}:{}};let g=!1;try{g=!!await (a.refreshZone??O)(d.resource.id,d.token,d.resource.externalId,{fetch:a.fetch})}catch{g=!1}return{ok:!0,result:{id:f.data.id,name:f.data.name},message:`Added ${c.type} ${f.data.name}. ${g?"It shows on the DNS page now.":"It shows on the DNS page after the next hourly read."}`}}}),neon_branch:(a={})=>({async prepare(b,c){let d=await (0,I.p)(b,"neon_project");if(!d)return{ok:!1,error:ar};let e=function(a,b){let c=a??{},d=x(c.name,80).trim();if(!A.test(d))return y("name","Use 1 to 63 lower-case letters, digits and hyphens, starting with a letter or digit.");let e=x(c.parentId,80);return B.test(e)?{ok:!0,inputs:{projectName:b,parentId:e,name:d}}:y("parentId","Pick the branch to copy from.")}(c,d.resource.name);if(!e.ok)return e;let f=await (0,ai.e)(d.token,d.resource.externalId,{fetch:a.fetch});if(!f.ok)return{ok:!1,error:`Couldn't read this project's branches just now: ${f.error}`};let g=C(f.data,e.inputs);if(!g.ok)return{ok:!1,error:g.error,field:"name"};let h=f.data.find(a=>a.id===e.inputs.parentId)?.name??e.inputs.parentId;return{ok:!0,p:{inputs:{...e.inputs,parentName:h},accountId:d.account.id,targetResourceId:d.resource.id,targetLabel:d.resource.name,cost:g.cost}}},async run(b){let c=b.inputs,d=b.targetResourceId?await (0,I.p)(b.targetResourceId,"neon_project"):null;if(!d)return as(ar);let e=await (0,ai.e)(d.token,d.resource.externalId,{fetch:a.fetch});if(!e.ok)return as(`Couldn't read this project's branches just now: ${e.error}`);let f=C(e.data,c);if(!f.ok)return as(f.error);let g=await ak(d.token,d.resource.externalId,{name:c.name,parentId:c.parentId},{fetch:a.fetch});return g.ok?{ok:!0,result:{id:g.data.id,name:g.data.name},message:`Branch ${g.data.name} created without a compute. It shows on the Neon page within 5 minutes; Wake it there when you need it (that uses CU-hours).`}:"busy"===g.kind?{ok:!1,checked:!1,error:g.error}:at(g,"branch")}}),supabase_project:(a={})=>({async prepare(b,c){let d=await (0,r.Z)(b,"supabase");if(!d)return{ok:!1,error:ar};let e=function(a){let b=a??{},c=x(b.orgSlug,80);if(!F.test(c))return y("orgSlug","Pick an organization.");let d=x(b.name,80).trim();if(!E.test(d))return y("name","Use 1 to 63 letters, digits, spaces, dots, hyphens or underscores.");let e=x(b.region,30);return D.includes(e)?{ok:!0,inputs:{orgSlug:c,name:d,region:e}}:y("region","Pick a region from the list.")}(c);if(!e.ok)return e;let f=await av(d.token,e.inputs,a);return f.ok?{ok:!0,p:{inputs:{...e.inputs,orgName:f.orgName??e.inputs.orgSlug},accountId:d.id,targetResourceId:null,targetLabel:d.label,cost:f.cost}}:{ok:!1,error:f.error,field:"orgSlug"}},async run(b){let c=b.inputs,d=b.accountId?await (0,r.Z)(b.accountId,"supabase"):null;if(!d)return as(ar);let e=await av(d.token,c,a);if(!e.ok)return as(e.error);let f=function a(){let b=(0,t.randomBytes)(64),c="";for(let a of b)if(!(a>=248)&&32===(c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"[a%62]).length)break;return 32===c.length?c:a()}(),g=await aq(d.token,{orgSlug:c.orgSlug,name:c.name,region:c.region,dbPass:f},{fetch:a.fetch});return g.ok?{ok:!0,secret:f,result:{id:g.data.ref,name:g.data.name},message:`Project ${g.data.name} is being set up (about 2 minutes). Copy its database password now: the console doesn't keep it and can't show it again.`}:at(g,"project")}}),firebase_project:(a={})=>({async prepare(b,c){let d=function(a){let b=a??{},c=x(b.projectId,40).trim();if(!G.test(c)||/google|ssl|undefined|null/.test(c))return y("projectId",'6 to 30 lower-case letters, digits and hyphens, starting with a letter (Google refuses ids with "google").');let d=x(b.displayName,40).trim()||c.slice(0,30);return H.test(d)?{ok:!0,inputs:{projectId:c,displayName:d}}:y("displayName","4 to 30 letters, digits, spaces, hyphens, quotes or exclamation marks.")}(c);if(!d.ok)return d;let e=await aw(a);if(!e.ok)return{ok:!1,error:e.error};let f=await ax(e.data,d.inputs,a);return f.ok?{ok:!0,p:{inputs:d.inputs,accountId:null,targetResourceId:null,targetLabel:"Google account",cost:f.cost}}:{ok:!1,error:f.error,field:"projectId"}},async run(b){let c=b.inputs,d=await aw(a);if(!d.ok)return as(d.error);let e=await ax(d.data,c,a);if(!e.ok)return as(e.error);let f=await af(d.data,c,{fetch:a.fetch});if(!f.ok){let a=at(f,"project");return"scope"===f.kind?{...a,error:"Google refused to create the project (permission or quota). Check the project quota in the Google Cloud console."}:a}let g=a=>({ok:!0,result:{id:c.projectId,name:c.displayName,note:"firebase-pending"},message:`Google Cloud project ${c.projectId} was created without billing, but Firebase isn't on it yet (${a}). Open the Firebase console → Add project → choose ${c.projectId} to finish; nothing else is needed.`}),h=await ay(d.data,"crm",f.data,a);if(!h.ok||!h.data.done)return g("Google was still creating the project");if(h.data.error)return{ok:!1,checked:!1,error:`Google couldn't create the project (${h.data.error}). Check the Google Cloud console; nothing was charged.`};let i=await ag(d.data,c.projectId,{fetch:a.fetch});if(!i.ok)return g("scope"===i.kind?"enable the Firebase Management API on the OAuth client's project, and accept the Firebase terms once in the Firebase console":i.error);let j=await ay(d.data,"firebase",i.data,a);return j.ok&&j.data.done?j.data.error?g(`Firebase answered ${j.data.error}`):{ok:!0,result:{id:c.projectId,name:c.displayName},message:`Created Firebase project ${c.projectId} on the free Spark plan (no billing account). Watch it by adding a viewer service account for it in Connections.`}:{ok:!0,result:{id:c.projectId,name:c.displayName},message:`Created ${c.projectId}; Firebase is still being added (a minute or two). It stays on the free Spark plan: no billing account is attached.`}}})};var aA=a.i(192738),aB=a.i(49146),aC=a.i(492665),aD=a.i(552543),aE=a.i(446914);let aF={target:aB.Q,siteUrl:()=>(0,aC.f)().SITE_URL,lang:()=>(0,aD.I)("telegram"),send:(a,b,c)=>(0,aE.I)(a,b,c),record:(a,b)=>(0,aB.P)("telegram",a,b)};async function aG(a,b=aF){try{let c=await b.target();if(!c)return;let d=await b.send(c.token,c.chatId,function(a,b,c,d="en"){let e=`${c.replace(/\/+$/,"")}${i.K[a]}?create=${encodeURIComponent(b)}`;return["id"===d?`🙋 Permintaan baru: bikin ${(0,aA.H)(i.S[a])} di ${(0,aA.H)(i.E[a])}.`:`🙋 New request: create ${(0,aA.H)(i.S[a])} on ${(0,aA.H)(i.E[a])}.`,"id"===d?"Butuh persetujuan Owner (pakai kode authenticator) di console, berlaku 24 jam:":"Needs Owner approval (with the authenticator code) in the console, valid for 24 hours:",(0,aA.H)(e)].join("\n")}(a.type,a.id,b.siteUrl(),await b.lang().catch(()=>"en")));await b.record(d,new Date).catch(()=>void 0)}catch{console.warn("create notice failed")}}let aH=`Creating needs the token's "${ao}" permission (Organization → Projects → Create), plus "organizations_read" and "organization_admin_read" so the console can confirm the free plan. A token from Account → Access Tokens has them; a fine-grained token needs them added.`;async function aI(a,b){switch(a){case"dns_record":return{ok:!0,data:{type:a}};case"neon_branch":{let c=await (0,I.p)(b,"neon_project");if(!c)return{ok:!1,error:"This project isn't watched any more. Reload the page."};let d=await (0,ai.e)(c.token,c.resource.externalId);if(!d.ok)return{ok:!1,error:`Couldn't read the branches just now: ${d.error}`};return{ok:!0,data:{type:a,branches:d.data.map(a=>({id:a.id,name:a.name,isDefault:a.isDefault})),limit:u.a.branches}}}case"supabase_project":{let c=await (0,r.N)("supabase"),d=c.some(a=>a.id===b)?b:c[0]?.id??null,e={type:a,accounts:c,accountId:d,orgs:[],active:0,limit:v.V,scopeNote:aH};if(!d)return{ok:!0,data:{...e,orgs:[]}};let f=await (0,r.Z)(d,"supabase");if(!f)return{ok:!0,data:{...e,orgs:[],error:"This account's credential can't be read."}};let[g,h]=await Promise.all([ap(f.token),(0,al.X)(f.token)]);if(!g.ok)return{ok:!0,data:{...e,orgs:[],error:"scope"===g.kind?"This token can't list organizations.":g.error}};let i=await Promise.all(g.data.map(async a=>{let b=await (0,al.K)(f.token,a.slug);return{slug:a.slug,name:a.name,plan:b.ok?b.data:null}})),j=new Set(i.filter(a=>a.plan&&"free"!==a.plan).map(a=>a.slug)),k=h.ok?h.data.filter(a=>!j.has(a.orgSlug)&&(0,v.Z)(a.status)).length:0;return{ok:!0,data:{...e,orgs:i.map(a=>({...a,allowed:"free"===a.plan})),active:k}}}case"firebase_project":{let b=!!(0,h.p)(),c=await (0,r.a)(),d={type:a,envReady:b,connected:null!==c,connectedAt:c,projects:null,quotaHint:10};if(!b||null===c)return{ok:!0,data:{...d}};let e=await (0,r.d)(),f=(0,h.p)(),g=e&&f?await (0,h.B)(f,e.refreshToken):null;if(!g?.ok)return{ok:!0,data:{...d,error:"Google ended the grant (Testing mode lasts 7 days, or it was removed). Connect again."}};let i=await ac(g.accessToken);if(!i.ok)return{ok:!0,data:{...d,error:`Couldn't read your Google Cloud projects: ${i.error}`}};return{ok:!0,data:{...d,projects:i.data.filter(a=>"ACTIVE"===a.state).length}}}}}var aJ=a.i(323878),aK=a.i(312573),aL=a.i(75105),aM=a.i(713095);let aN="owner";async function aO(){let a=await (0,f.g)("owner"),b=await (0,f.x)();if(b?.aal!=="aal2")throw new e.W("mfa");return a}let aP={now:()=>new Date,quota:async a=>{let b=await (0,aJ.C)(aK.t.providerAction,a);return b.allowed?null:(0,aL.z)("member",b.retryAfter)},limitRequest:async a=>(await (0,aJ.C)(aK.t.createRequest,a)).allowed,executor:a=>az[a](),insert:a=>(0,r.z)(a),get:r.j,decide:r.Q,claim:r.b,finish:r.c,audit:q.f,notify:a=>aG(a)},aQ=()=>{try{(0,d.refresh)()}catch{}};async function aR(a,b,c){return(0,e.F)(aN,async d=>{let e=await m({id:d.id,userId:d.userId},a,b,c,aP);return e.ok&&aQ(),e},{requireActionMember:f.g})}async function aS(a,b){return(0,e.F)("owner",async c=>{let d=await o({id:c.id,userId:c.userId},a,b,aP);return aQ(),d},{requireActionMember:aO})}async function aT(a){return(0,e.F)("owner",async b=>{let c=await n({id:b.id,userId:b.userId},a,aP);return aQ(),c},{requireActionMember:aO})}async function aU(a,b){return(0,e.F)(aN,async c=>{let d=await aP.quota(c.id,`options:${a}`);return d?{ok:!1,error:d}:aI(a,b)},{requireActionMember:f.g})}async function aV(){return(0,e.F)("owner",async a=>{let b=(0,h.p)();if(!b)return{ok:!1,error:h.S};let{SITE_URL:d,OPS_ENCRYPTION_KEY:e}=(0,aC.f)(),f=(0,h.C)(),{verifier:i,challenge:j}=(0,h.U)();return(await (0,c.cookies)()).set(p.o,(0,g.G)({state:f,verifier:i,memberId:a.id,exp:Date.now()+1e3*g.N},e),{httpOnly:!0,secure:d.startsWith("https://"),sameSite:"lax",path:p.B,maxAge:g.N}),{ok:!0,data:{url:(0,p.O)(b,{state:f,challenge:j,redirectUri:(0,p.E)(d)})}}},{requireActionMember:aO})}async function aW(){return(0,e.F)("owner",async a=>(await (0,r.k)(),await (0,q.f)({kind:"ok",message:"Google (create projects) disconnected",resourceId:null,actorUserId:a.userId}).catch(()=>void 0),aQ(),{ok:!0,message:"Disconnected here. Remove Watchbell's access in your Google Account → Security → Third-party access as well."}),{requireActionMember:f.g})}(0,aM.ensureServerEntryExports)([aR,aS,aT,aU,aV,aW]),(0,b.registerServerReference)(aR,"70d3d8d5bd938202db83bdeffabbb4a6aebbae6f60",null),(0,b.registerServerReference)(aS,"60abd66c5c8fa57562afa813b59b9defec4f7079c7",null),(0,b.registerServerReference)(aT,"40400bf30546542d8c8e3392689675448d404f92f6",null),(0,b.registerServerReference)(aU,"60b97414bad04738f0d2ce032c60c97c8ec7672184",null),(0,b.registerServerReference)(aV,"008eafcf75b87e16768e769ed916effa8b39d0b84a",null),(0,b.registerServerReference)(aW,"00753d8a46a3e0afd82b0a811afa33a6730970fb9c",null),a.s(["g",0,aS,"p",0,aU,"F",0,aW,"d",0,aT,"q",0,aR,"Y",0,aV],198398)}];
1
+ module.exports=[198398,a=>{"use strict";var b=a.i(137936),c=a.i(905246),d=a.i(118558),e=a.i(600079),f=a.i(109307),g=a.i(21096),h=a.i(77608),i=a.i(384084);let j="This request expired (requests last 24 hours) or was already decided. Ask again if it's still needed.",k="Type the new resource's name exactly to approve it.",l=async a=>{try{await a}catch{console.warn("create: audit or notice failed")}};async function m(a,b,c,d,e){if(!("string"==typeof b&&i.t.includes(b))||"string"!=typeof c||c.length>100)return{ok:!1,error:"Something in that request wasn't valid."};let f=await e.quota(a.id,`create:${b}`);if(f)return{ok:!1,error:f};let g=await e.executor(b).prepare(c,d);if(!g.ok)return{ok:!1,error:g.error,...g.field?{fieldErrors:{[g.field]:g.error}}:{}};if(!await e.limitRequest(a.id))return{ok:!1,error:"You've asked for 3 creates today, the daily limit. Try again tomorrow."};let h=e.now(),j=await e.insert({type:b,provider:{dns_record:"cloudflare",neon_branch:"neon",supabase_project:"supabase",firebase_project:"firebase"}[b],accountId:g.p.accountId,targetResourceId:g.p.targetResourceId,targetLabel:g.p.targetLabel.slice(0,120),inputs:g.p.inputs,requestedBy:a.id,expiresAt:new Date(h.getTime()+i.e)}),k=(0,i.p)(b,j.inputs);return await l(e.audit({kind:"ok",message:`Create requested \xb7 ${i.S[b]} ${k.confirmName}`,detail:k.summary,resourceId:j.targetResourceId,actorUserId:a.userId})),await l(e.notify(j)),{ok:!0,message:`Asked. ${g.p.cost} It waits for the Owner's approval for 24 hours.`,data:{id:j.id,cost:g.p.cost}}}async function n(a,b,c){if("string"!=typeof b)return{ok:!1,error:j};let d=await c.decide(b,"reject",a.id,c.now());if(!d)return{ok:!1,error:j};let e=(0,i.p)(d.type,d.inputs);return await l(c.audit({kind:"ok",message:`Create rejected \xb7 ${i.S[d.type]} ${e.confirmName}`,resourceId:d.targetResourceId,actorUserId:a.userId})),{ok:!0,message:"Rejected. Nothing was created."}}async function o(a,b,c,d){let e;if("string"!=typeof b)return{ok:!1,error:j};let f=await d.get(b);if(!f||"requested"!==f.status||f.expiresAt.getTime()<=d.now().getTime())return{ok:!1,error:j};let g=(0,i.p)(f.type,f.inputs);if("string"!=typeof c||c.trim()!==g.confirmName)return{ok:!1,error:k,fieldErrors:{confirm:k}};let h=await d.quota(a.id,`create:${f.id}`);if(h)return{ok:!1,error:h};if(!await d.decide(b,"approve",a.id,d.now()))return{ok:!1,error:j};let m=await d.claim(b,d.now());if(!m)return{ok:!1,error:"This request is already running."};try{e=await d.executor(m.type).run(m)}catch(a){console.warn("create run failed:",a instanceof Error?a.name:"error"),e={ok:!1,error:"Something went wrong before the create finished. Check the provider's dashboard before asking again.",checked:!1,maybe:!0}}let n=`${i.S[m.type]} ${g.confirmName}`,o=m.requestedBy===a.id?"asked and approved by the Owner":`asked by member ${m.requestedBy.slice(0,8)}, approved by the Owner`;return e.ok?(await d.finish(m.id,{ok:!0,result:e.result},d.now()),await l(d.audit({kind:"ok",message:`Created \xb7 ${n}`,detail:`${g.summary} \xb7 ${o}`,resourceId:m.targetResourceId,actorUserId:a.userId})),{ok:!0,message:e.message,data:{result:e.result,...e.secret?{secret:e.secret}:{}}}):(await d.finish(m.id,{ok:!1,error:e.error},d.now()),await l(d.audit({kind:"err",message:e.checked?`Create refused at re-check \xb7 ${n}`:`Create failed \xb7 ${n}`,detail:`${e.error} \xb7 ${o}`,resourceId:m.targetResourceId,actorUserId:a.userId})),{ok:!1,error:e.error})}var p=a.i(70550),q=a.i(221084),r=a.i(610247),s=a.i(462820),t=a.i(666680),u=a.i(688275),v=a.i(672319),w=a.i(364525);let x=(a,b=300)=>"string"==typeof a&&a.length<=b?a:"",y=(a,b)=>({ok:!1,field:a,error:b}),z=/^(?:\*|[a-z0-9_](?:[a-z0-9_-]{0,61}[a-z0-9_])?)$/,A=/^[a-z0-9][a-z0-9-]{0,62}$/,B=/^br-[a-z0-9-]{3,60}$/;function C(a,b){return a.some(a=>a.id===b.parentId)?a.some(a=>a.name===b.name)?{ok:!1,error:`A branch named ${b.name} already exists in this project.`}:a.length>=u.a.branches?{ok:!1,error:`This project already has ${a.length} branches, Neon's free limit is ${u.a.branches}.`}:{ok:!0,cost:`Free. Uses ${a.length+1} of ${u.a.branches} branches in this project. No compute is created, so it uses no CU-hours until someone wakes it; its data counts toward the project's 0.5 GB storage.`}:{ok:!1,error:"The branch to copy from isn't in this project any more. Reload and pick another."}}let D=[["ap-southeast-1","Southeast Asia (Singapore)"],["ap-northeast-1","Northeast Asia (Tokyo)"],["ap-northeast-2","Northeast Asia (Seoul)"],["ap-southeast-2","Oceania (Sydney)"],["ap-south-1","South Asia (Mumbai)"],["ap-east-1","East Asia (Hong Kong)"],["us-east-1","East US (North Virginia)"],["us-east-2","East US (Ohio)"],["us-west-1","West US (North California)"],["us-west-2","West US (Oregon)"],["ca-central-1","Canada (Central)"],["sa-east-1","South America (São Paulo)"],["eu-west-1","West EU (Ireland)"],["eu-west-2","West EU (London)"],["eu-west-3","West EU (Paris)"],["eu-north-1","North EU (Stockholm)"],["eu-central-1","Central EU (Frankfurt)"],["eu-central-2","Central EU (Zurich)"]].map(([a])=>a),E=/^[A-Za-z0-9][A-Za-z0-9 ._-]{0,62}$/,F=/^[\w-]{1,64}$/,G=/^[a-z][a-z0-9-]{4,28}[a-z0-9]$/,H=/^[A-Za-z0-9 '"!-]{4,30}$/;var I=a.i(322145),J=a.i(45617),K=a.i(678831),L=a.i(418864),M=a.i(669943),N=a.i(44925);async function O(a,b,c,d={}){try{let e=await (0,N.p)(b,c,d);if(!e.ok)return console.warn(`dns refresh: couldn't read the zone's records (${e.kind})`),!1;let f=new Date;return await (0,M.r)(a,{records:e.data.records,recordsTruncated:e.data.truncated},f),await (0,L.x)(f),(0,K.J)([J.m.zones,J.m.domains]),!0}catch(a){return console.warn("dns refresh failed:",a instanceof Error?a.name:"error"),!1}}var P=a.i(26972),Q=a.i(83931),R=a.i(191179),S=a.i(427221),T=a.i(811365),U=a.i(689963);let V=P.z.object({success:Q.z.boolean(),result:R.z.unknown()}),W=P.z.object({id:S.z.string(),type:S.z.string(),name:S.z.string(),content:S.z.string().default(""),proxied:Q.z.boolean().default(!1),ttl:T.z.number().default(1),comment:S.z.string().nullish()}),X=P.z.object({errors:U.z.array(P.z.object({code:T.z.number().int()})).min(1)});async function Y(a,b,c,d={}){let e,f={type:c.type,name:c.name,content:c.content,ttl:c.ttl,..."TXT"===c.type?{}:{proxied:!0===c.proxied},comment:"Added from Watchbell"};try{e=await (d.fetch??fetch)(`https://api.cloudflare.com/client/v4/zones/${encodeURIComponent(b)}/dns_records`,{method:"POST",headers:{Authorization:`Bearer ${a}`,Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify(f),signal:AbortSignal.timeout(d.timeoutMs??8e3),cache:"no-store"})}catch(a){return a instanceof DOMException&&("TimeoutError"===a.name||"AbortError"===a.name)?{ok:!1,kind:"transient",maybe:!0,error:"Cloudflare didn't answer in time; the record may still have been added. Check the zone before asking again."}:{ok:!1,kind:"transient",error:"Couldn't reach Cloudflare."}}let g=()=>e.body?.cancel().catch(()=>void 0);if(401===e.status)return await g(),{ok:!1,kind:"auth",status:401,error:"Cloudflare rejected this credential (401)."};if(403===e.status)return await g(),{ok:!1,kind:"scope",status:403,error:'This Cloudflare token can\'t add DNS records. Add "Zone → DNS → Edit" to it, or replace it with a token that has it.'};if(404===e.status)return await g(),{ok:!1,kind:"missing",status:404,error:"Cloudflare can't find this zone any more."};let h=await e.json().catch(()=>null);if(!e.ok){let a=X.safeParse(h);return{ok:!1,kind:429===e.status||e.status>=500?"transient":"refused",status:e.status,error:`Cloudflare refused this record (${e.status}${a.success?`, code ${a.data.errors[0].code}`:""}).`}}let i=V.safeParse(h),j=i.success&&i.data.success?W.safeParse(i.data.result):null;if(!j?.success)return{ok:!1,kind:"format",error:"Cloudflare added the record but answered in a format the console doesn't recognise. Check the zone."};let k=j.data;return{ok:!0,data:{id:k.id,type:k.type,name:k.name,content:k.content,proxied:k.proxied,ttl:k.ttl,comment:k.comment??null}}}var Z=a.i(288666);let $="https://cloudresourcemanager.googleapis.com/v3",_="https://firebase.googleapis.com/v1beta1",aa=/^operations\/(?!.*\.\.)[A-Za-z0-9._:/-]{1,200}$/,ab=P.z.object({projectId:S.z.string(),displayName:S.z.string().optional(),state:S.z.string().default("ACTIVE")});async function ac(a,b={}){let c=[],d="";for(let e=0;e<5;e++){let e=new URLSearchParams({pageSize:"100",...d?{pageToken:d}:{}}),f=await (0,Z.R)("Google Cloud",`${$}/projects:search?${e}`,{token:a},b);if(!f.ok)return f;let g=P.z.object({projects:U.z.array(ab).optional(),nextPageToken:S.z.string().optional()}).safeParse(f.data);if(!g.success)return(0,Z.t)("Google Cloud","the project list");if(c.push(...(g.data.projects??[]).map(a=>({projectId:a.projectId,displayName:a.displayName??a.projectId,state:a.state}))),!g.data.nextPageToken)break;d=g.data.nextPageToken}return{ok:!0,data:c}}let ad=P.z.object({name:S.z.string(),done:Q.z.boolean().optional(),error:P.z.object({code:T.z.number().optional(),message:S.z.string().optional()}).optional()}),ae=(a,b)=>{let c=ad.safeParse(a);return c.success&&aa.test(c.data.name)?{ok:!0,data:{name:c.data.name,done:!0===c.data.done,error:c.data.error?`error ${c.data.error.code??"?"}`:null}}:(0,Z.t)(b,"the operation")};async function af(a,b,c={}){let d=await (0,Z.R)("Google Cloud",`${$}/projects`,{method:"POST",token:a,body:{projectId:b.projectId,displayName:b.displayName}},{timeoutMs:15e3,...c});return d.ok?ae(d.data,"Google Cloud"):d}async function ag(a,b,c={}){let d=await (0,Z.R)("Firebase",`${_}/projects/${encodeURIComponent(b)}:addFirebase`,{method:"POST",token:a,body:{}},{timeoutMs:15e3,...c});return d.ok?ae(d.data,"Firebase"):d}async function ah(a,b,c,d={}){if(!aa.test(c))return(0,Z.t)("crm"===b?"Google Cloud":"Firebase","the operation name");let e="crm"===b?"Google Cloud":"Firebase",f=await (0,Z.R)(e,`${"crm"===b?$:_}/${c}`,{token:a},d);return f.ok?ae(f.data,e):f}var ai=a.i(944808);let aj="Neon";async function ak(a,b,c,d={}){let e={branch:{name:c.name,parent_id:c.parentId},endpoints:[]},f=await (0,Z.R)(aj,`https://console.neon.tech/api/v2/projects/${encodeURIComponent(b)}/branches`,{method:"POST",token:a,body:e},{timeoutMs:1e4,...d});if(!f.ok)return 423===f.status?{ok:!1,kind:"busy",status:423,error:"Neon is busy with another operation on this project. Ask again in a minute."}:403===f.status?{...f,kind:"scope",error:"This Neon API key can't manage this project; use a personal or organization key, or a key for this project."}:422===f.status||400===f.status||409===f.status?{ok:!1,kind:"format",status:f.status,error:`Neon refused this branch (${f.status}); the project may be at its branch limit.`}:f;let g=P.z.object({branch:P.z.object({id:S.z.string(),name:S.z.string()})}).safeParse(f.data);return g.success?{ok:!0,data:{id:g.data.branch.id,name:g.data.branch.name}}:(0,Z.t)(aj,"the new branch")}var al=a.i(112735);let am="https://api.supabase.com",an="Supabase",ao="organization_projects_create";async function ap(a,b={}){let c=await (0,Z.R)(an,`${am}/v1/organizations`,{token:a},b);if(!c.ok)return c;let d=U.z.array(P.z.object({slug:S.z.string().optional(),id:S.z.string().optional(),name:S.z.string()})).safeParse(c.data);return d.success?{ok:!0,data:d.data.map(a=>({slug:a.slug??a.id??"",name:a.name})).filter(a=>a.slug)}:(0,Z.t)(an,"the organization list")}async function aq(a,b,c={}){let d={name:b.name,organization_slug:b.orgSlug,region_selection:{type:"specific",code:b.region},db_pass:b.dbPass},e=await (0,Z.R)(an,`${am}/v1/projects`,{method:"POST",token:a,body:d},{timeoutMs:2e4,...c});if(!e.ok){if(403===e.status)return{ok:!1,kind:"scope",status:403,missing:e.missing??[ao],error:`This Supabase token can't create projects. Add the "${ao}" permission (Organization → Projects → Create).`};let{message:a,...b}=e;return b}let f=P.z.object({ref:S.z.string().optional(),id:S.z.string().optional(),name:S.z.string(),status:S.z.string().default("COMING_UP"),region:S.z.string().default(b.region)}).safeParse(e.data);return f.success&&(f.data.ref??f.data.id)?{ok:!0,data:{ref:f.data.ref??f.data.id,name:f.data.name,status:f.data.status,region:f.data.region}}:(0,Z.t)(an,"the new project")}let ar="This isn't watched any more, or its credential can't be read. Reload the page.",as=a=>({ok:!1,error:a,checked:!0}),at=(a,b)=>"transient"===a.kind&&void 0===a.status?{ok:!1,checked:!1,maybe:!0,error:`${a.error} The ${b} may still have been created; check the provider's dashboard before asking again.`}:{ok:!1,checked:!1,error:a.error};async function au(a,b,c,d){let e=await (0,N.p)(a,b,{fetch:d.fetch});return e.ok?function(a,b,c=!1){if(c)return{ok:!1,error:"This zone has more than 2,000 records, so the console can't be sure the name is free. Add it in Cloudflare."};let d=a.filter(a=>a.name.toLowerCase().replace(/\.$/,"")===b.name);return d.some(a=>"CNAME"===a.type)?{ok:!1,error:`${b.name} already has a CNAME record, and a CNAME can't share its name with any other record.`}:"CNAME"===b.type&&d.length?{ok:!1,error:`${b.name} already has ${d.length} record${1===d.length?"":"s"}; a CNAME can't share its name with other records.`}:d.length?{ok:!1,error:`${b.name} already exists in this zone. The console only adds new names; edit the existing record instead.`}:{ok:!0,cost:"Free. Cloudflare's free plan allows thousands of records per zone."}}(e.data.records,c,e.data.truncated):{ok:!1,error:"scope"===e.kind?'This Cloudflare token can\'t read DNS records; add "Zone → DNS → Read" and "Zone → DNS → Edit".':`Couldn't read the zone's records just now: ${e.error}`}}async function av(a,b,c){let d=await ap(a,{fetch:c.fetch});if(!d.ok)return{ok:!1,error:"scope"===d.kind?'This Supabase token can\'t list organizations; add the "organizations_read" permission.':`Couldn't read the organizations just now: ${d.error}`};let e=d.data.find(a=>a.slug===b.orgSlug);if(!e)return{ok:!1,error:"This token can't see that organization any more."};let f=await (0,al.X)(a,{fetch:c.fetch});if(!f.ok)return{ok:!1,error:`Couldn't count this account's projects just now: ${f.error}`};let g=[...new Set([b.orgSlug,...f.data.map(a=>a.orgSlug)].filter(Boolean))],h=await Promise.all(g.map(async b=>[b,await (0,al.K)(a,b,{fetch:c.fetch})])),i=new Map(h.map(([a,b])=>[a,b.ok?b.data:null])),j=new Set(h.filter(([,a])=>a.ok&&null!==a.data&&"free"!==a.data).map(([a])=>a)),k=h.find(([a])=>a===b.orgSlug)?.[1];if(k&&!k.ok&&"scope"===k.kind)return{ok:!1,error:'This Supabase token can\'t read organization plans; add "organization_admin_read" so the console can confirm the free plan.'};let l=function(a,b){if(null===a.plan)return{ok:!1,error:"The console couldn't read this organization's plan, so it won't create anything there. Only an organization on the free plan is allowed."};if("free"!==a.plan)return{ok:!1,error:`This organization is on the ${a.plan} plan. The console only creates projects in an organization on the free plan, because a project in a paid organization is billed from the first hour.`};if(a.projects.some(a=>a.orgSlug===b.orgSlug&&a.name.toLowerCase()===b.name.toLowerCase()&&"REMOVED"!==a.status))return{ok:!1,error:`This organization already has a project named ${b.name}.`};let c=a.projects.filter(b=>!a.paidOrgs.has(b.orgSlug)&&(0,v.Z)(b.status)).length;return c>=v.V?{ok:!1,error:`${c} free projects are already active, Supabase's free limit is ${v.V}. Pause one first; paused projects don't count.`}:{ok:!0,cost:`Free. Uses ${c+1} of ${v.V} active free projects. Free projects pause after a week without activity.`}}({plan:i.get(b.orgSlug)??null,projects:f.data,paidOrgs:j},b);return l.ok?{...l,orgName:e.name}:l}async function aw(a){let b=(0,h.p)();if(!b)return{ok:!1,kind:"auth",error:s.n.notSet("GOOGLE_CLIENT_ID and GOOGLE_CLIENT_SECRET",!0)};let c=await (0,r.d)();if(!c)return{ok:!1,kind:"auth",error:"Connect Google (create projects) on the Firebase page first."};let d=await (0,h.B)(b,c.refreshToken,{fetch:a.fetch});return d.ok?{ok:!0,data:d.accessToken}:{ok:!1,kind:"auth",error:"revoked"===d.kind?"Google ended the create-projects grant (Testing mode lasts 7 days, or it was removed). Connect Google again on the Firebase page.":d.error}}async function ax(a,b,c){let d=await ac(a,{fetch:c.fetch});if(!d.ok)return{ok:!1,error:"scope"===d.kind?"Google refused the project list: enable the Cloud Resource Manager API on the OAuth client's Google Cloud project.":`Couldn't read your Google Cloud projects just now: ${d.error}`};var e=d.data;if(e.some(a=>a.projectId===b.projectId))return{ok:!1,error:`You already have a Google Cloud project with the id ${b.projectId}.`};let f=e.filter(a=>"ACTIVE"===a.state).length;return f>=10?{ok:!1,error:`This Google account already has ${f} active projects. Google's project quota without a billing account is about 10; remove one in the Google Cloud console first (deleted projects count for 30 days).`}:{ok:!0,cost:`Free (Spark): no billing account is attached. ${f} active Google Cloud project${1===f?"":"s"} now; Google's quota without billing is about 10, and Google may refuse earlier.`}}async function ay(a,b,c,d){let e=c,f=d.pollTries??6;for(let c=0;!e.done&&c<f;c++){await (d.sleep??(a=>new Promise(b=>setTimeout(b,a))))(d.pollMs??2e3);let c=await ah(a,b,e.name,{fetch:d.fetch});if(!c.ok)return c;e=c.data}return{ok:!0,data:e}}let az={dns_record:(a={})=>({async prepare(b,c){let d=await (0,I.p)(b,"zone");if(!d||!d.resource.externalId)return{ok:!1,error:ar};let e=function(a,b){let c=a??{},d=x(c.type,10);if(!w.j.includes(d))return y("type","Only A, AAAA, CNAME and TXT records can be added here.");let e=function(a,b){let c=b.trim().toLowerCase().replace(/\.$/,""),d=a.trim().toLowerCase().replace(/\.$/,"");if(!d||!c||("@"===d?d=c:d===c||d.endsWith(`.${c}`)||(d=`${d}.${c}`),d.length>253))return null;let e=d===c?"":d.slice(0,-(c.length+1));return e&&!e.split(".").every((a,b)=>z.test(a)&&("*"!==a||0===b))?null:d}(x(c.name,260),b);if(!e)return y("name",`The name must be a host in ${b}, like shop or shop.${b}.`);let f="number"==typeof c.ttl?c.ttl:w.k,g=(0,w.V)({type:d,name:e},{content:x(c.content,4096),ttl:f,proxied:!0===c.proxied});return g.ok?{ok:!0,inputs:{zoneName:b.toLowerCase(),type:d,name:e,content:g.values.content,ttl:g.values.ttl,proxied:g.values.proxied}}:y(g.field,g.error)}(c,d.resource.name);if(!e.ok)return e;let f=await au(d.token,d.resource.externalId,e.inputs,a);return f.ok?{ok:!0,p:{inputs:e.inputs,accountId:d.account.id,targetResourceId:d.resource.id,targetLabel:d.resource.name,cost:f.cost}}:{ok:!1,error:f.error,field:"name"}},async run(b){let c=b.inputs,d=b.targetResourceId?await (0,I.p)(b.targetResourceId,"zone"):null;if(!d||!d.resource.externalId)return as(ar);let e=await au(d.token,d.resource.externalId,c,a);if(!e.ok)return as(e.error);let f=await Y(d.token,d.resource.externalId,{type:c.type,name:c.name,content:c.content,ttl:c.ttl,proxied:c.proxied},{fetch:a.fetch});if(!f.ok)return{ok:!1,checked:!1,error:f.error,...f.maybe?{maybe:!0}:{}};let g=!1;try{g=!!await (a.refreshZone??O)(d.resource.id,d.token,d.resource.externalId,{fetch:a.fetch})}catch{g=!1}return{ok:!0,result:{id:f.data.id,name:f.data.name},message:`Added ${c.type} ${f.data.name}. ${g?"It shows on the DNS page now.":"It shows on the DNS page after the next hourly read."}`}}}),neon_branch:(a={})=>({async prepare(b,c){let d=await (0,I.p)(b,"neon_project");if(!d)return{ok:!1,error:ar};let e=function(a,b){let c=a??{},d=x(c.name,80).trim();if(!A.test(d))return y("name","Use 1 to 63 lower-case letters, digits and hyphens, starting with a letter or digit.");let e=x(c.parentId,80);return B.test(e)?{ok:!0,inputs:{projectName:b,parentId:e,name:d}}:y("parentId","Pick the branch to copy from.")}(c,d.resource.name);if(!e.ok)return e;let f=await (0,ai.e)(d.token,d.resource.externalId,{fetch:a.fetch});if(!f.ok)return{ok:!1,error:`Couldn't read this project's branches just now: ${f.error}`};let g=C(f.data,e.inputs);if(!g.ok)return{ok:!1,error:g.error,field:"name"};let h=f.data.find(a=>a.id===e.inputs.parentId)?.name??e.inputs.parentId;return{ok:!0,p:{inputs:{...e.inputs,parentName:h},accountId:d.account.id,targetResourceId:d.resource.id,targetLabel:d.resource.name,cost:g.cost}}},async run(b){let c=b.inputs,d=b.targetResourceId?await (0,I.p)(b.targetResourceId,"neon_project"):null;if(!d)return as(ar);let e=await (0,ai.e)(d.token,d.resource.externalId,{fetch:a.fetch});if(!e.ok)return as(`Couldn't read this project's branches just now: ${e.error}`);let f=C(e.data,c);if(!f.ok)return as(f.error);let g=await ak(d.token,d.resource.externalId,{name:c.name,parentId:c.parentId},{fetch:a.fetch});return g.ok?{ok:!0,result:{id:g.data.id,name:g.data.name},message:`Branch ${g.data.name} created without a compute. It shows on the Neon page within 5 minutes; Wake it there when you need it (that uses CU-hours).`}:"busy"===g.kind?{ok:!1,checked:!1,error:g.error}:at(g,"branch")}}),supabase_project:(a={})=>({async prepare(b,c){let d=await (0,r.Z)(b,"supabase");if(!d)return{ok:!1,error:ar};let e=function(a){let b=a??{},c=x(b.orgSlug,80);if(!F.test(c))return y("orgSlug","Pick an organization.");let d=x(b.name,80).trim();if(!E.test(d))return y("name","Use 1 to 63 letters, digits, spaces, dots, hyphens or underscores.");let e=x(b.region,30);return D.includes(e)?{ok:!0,inputs:{orgSlug:c,name:d,region:e}}:y("region","Pick a region from the list.")}(c);if(!e.ok)return e;let f=await av(d.token,e.inputs,a);return f.ok?{ok:!0,p:{inputs:{...e.inputs,orgName:f.orgName??e.inputs.orgSlug},accountId:d.id,targetResourceId:null,targetLabel:d.label,cost:f.cost}}:{ok:!1,error:f.error,field:"orgSlug"}},async run(b){let c=b.inputs,d=b.accountId?await (0,r.Z)(b.accountId,"supabase"):null;if(!d)return as(ar);let e=await av(d.token,c,a);if(!e.ok)return as(e.error);let f=function a(){let b=(0,t.randomBytes)(64),c="";for(let a of b)if(!(a>=248)&&32===(c+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"[a%62]).length)break;return 32===c.length?c:a()}(),g=await aq(d.token,{orgSlug:c.orgSlug,name:c.name,region:c.region,dbPass:f},{fetch:a.fetch});return g.ok?{ok:!0,secret:f,result:{id:g.data.ref,name:g.data.name},message:`Project ${g.data.name} is being set up (about 2 minutes). Copy its database password now: the console doesn't keep it and can't show it again.`}:at(g,"project")}}),firebase_project:(a={})=>({async prepare(b,c){let d=function(a){let b=a??{},c=x(b.projectId,40).trim();if(!G.test(c)||/google|ssl|undefined|null/.test(c))return y("projectId",'6 to 30 lower-case letters, digits and hyphens, starting with a letter (Google refuses ids with "google").');let d=x(b.displayName,40).trim()||c.slice(0,30);return H.test(d)?{ok:!0,inputs:{projectId:c,displayName:d}}:y("displayName","4 to 30 letters, digits, spaces, hyphens, quotes or exclamation marks.")}(c);if(!d.ok)return d;let e=await aw(a);if(!e.ok)return{ok:!1,error:e.error};let f=await ax(e.data,d.inputs,a);return f.ok?{ok:!0,p:{inputs:d.inputs,accountId:null,targetResourceId:null,targetLabel:"Google account",cost:f.cost}}:{ok:!1,error:f.error,field:"projectId"}},async run(b){let c=b.inputs,d=await aw(a);if(!d.ok)return as(d.error);let e=await ax(d.data,c,a);if(!e.ok)return as(e.error);let f=await af(d.data,c,{fetch:a.fetch});if(!f.ok){let a=at(f,"project");return"scope"===f.kind?{...a,error:"Google refused to create the project (permission or quota). Check the project quota in the Google Cloud console."}:a}let g=a=>({ok:!0,result:{id:c.projectId,name:c.displayName,note:"firebase-pending"},message:`Google Cloud project ${c.projectId} was created without billing, but Firebase isn't on it yet (${a}). Open the Firebase console → Add project → choose ${c.projectId} to finish; nothing else is needed.`}),h=await ay(d.data,"crm",f.data,a);if(!h.ok||!h.data.done)return g("Google was still creating the project");if(h.data.error)return{ok:!1,checked:!1,error:`Google couldn't create the project (${h.data.error}). Check the Google Cloud console; nothing was charged.`};let i=await ag(d.data,c.projectId,{fetch:a.fetch});if(!i.ok)return g("scope"===i.kind?"enable the Firebase Management API on the OAuth client's project, and accept the Firebase terms once in the Firebase console":i.error);let j=await ay(d.data,"firebase",i.data,a);return j.ok&&j.data.done?j.data.error?g(`Firebase answered ${j.data.error}`):{ok:!0,result:{id:c.projectId,name:c.displayName},message:`Created Firebase project ${c.projectId} on the free Spark plan (no billing account). Watch it by adding a viewer service account for it in Connections.`}:{ok:!0,result:{id:c.projectId,name:c.displayName},message:`Created ${c.projectId}; Firebase is still being added (a minute or two). It stays on the free Spark plan: no billing account is attached.`}}})};var aA=a.i(192738),aB=a.i(49146),aC=a.i(492665),aD=a.i(552543),aE=a.i(446914);let aF={target:aB.Q,siteUrl:()=>(0,aC.f)().SITE_URL,lang:()=>(0,aD.I)("telegram"),send:(a,b,c)=>(0,aE.I)(a,b,c),record:(a,b)=>(0,aB.P)("telegram",a,b)};async function aG(a,b=aF){try{let c=await b.target();if(!c)return;let d=await b.send(c.token,c.chatId,function(a,b,c,d="en"){let e=`${c.replace(/\/+$/,"")}${i.K[a]}?create=${encodeURIComponent(b)}`;return["id"===d?`🙋 Permintaan baru: bikin ${(0,aA.H)(i.S[a])} di ${(0,aA.H)(i.E[a])}.`:`🙋 New request: create ${(0,aA.H)(i.S[a])} on ${(0,aA.H)(i.E[a])}.`,"id"===d?"Butuh persetujuan Owner (pakai kode authenticator) di console, berlaku 24 jam:":"Needs Owner approval (with the authenticator code) in the console, valid for 24 hours:",(0,aA.H)(e)].join("\n")}(a.type,a.id,b.siteUrl(),await b.lang().catch(()=>"en")));await b.record(d,new Date).catch(()=>void 0)}catch{console.warn("create notice failed")}}let aH=`Creating needs the token's "${ao}" permission (Organization → Projects → Create), plus "organizations_read" and "organization_admin_read" so the console can confirm the free plan. A token from Account → Access Tokens has them; a fine-grained token needs them added.`;async function aI(a,b){switch(a){case"dns_record":return{ok:!0,data:{type:a}};case"neon_branch":{let c=await (0,I.p)(b,"neon_project");if(!c)return{ok:!1,error:"This project isn't watched any more. Reload the page."};let d=await (0,ai.e)(c.token,c.resource.externalId);if(!d.ok)return{ok:!1,error:`Couldn't read the branches just now: ${d.error}`};return{ok:!0,data:{type:a,branches:d.data.map(a=>({id:a.id,name:a.name,isDefault:a.isDefault})),limit:u.a.branches}}}case"supabase_project":{let c=await (0,r.N)("supabase"),d=c.some(a=>a.id===b)?b:c[0]?.id??null,e={type:a,accounts:c,accountId:d,orgs:[],active:0,limit:v.V,scopeNote:aH};if(!d)return{ok:!0,data:{...e,orgs:[]}};let f=await (0,r.Z)(d,"supabase");if(!f)return{ok:!0,data:{...e,orgs:[],error:"This account's credential can't be read."}};let[g,h]=await Promise.all([ap(f.token),(0,al.X)(f.token)]);if(!g.ok)return{ok:!0,data:{...e,orgs:[],error:"scope"===g.kind?"This token can't list organizations.":g.error}};let i=await Promise.all(g.data.map(async a=>{let b=await (0,al.K)(f.token,a.slug);return{slug:a.slug,name:a.name,plan:b.ok?b.data:null}})),j=new Set(i.filter(a=>a.plan&&"free"!==a.plan).map(a=>a.slug)),k=h.ok?h.data.filter(a=>!j.has(a.orgSlug)&&(0,v.Z)(a.status)).length:0;return{ok:!0,data:{...e,orgs:i.map(a=>({...a,allowed:"free"===a.plan})),active:k}}}case"firebase_project":{let b=!!(0,h.p)(),c=await (0,r.a)(),d={type:a,envReady:b,connected:null!==c,connectedAt:c,projects:null,quotaHint:10};if(!b||null===c)return{ok:!0,data:{...d}};let e=await (0,r.d)(),f=(0,h.p)(),g=e&&f?await (0,h.B)(f,e.refreshToken):null;if(!g?.ok)return{ok:!0,data:{...d,error:"Google ended the grant (Testing mode lasts 7 days, or it was removed). Connect again."}};let i=await ac(g.accessToken);if(!i.ok)return{ok:!0,data:{...d,error:`Couldn't read your Google Cloud projects: ${i.error}`}};return{ok:!0,data:{...d,projects:i.data.filter(a=>"ACTIVE"===a.state).length}}}}}var aJ=a.i(323878),aK=a.i(312573),aL=a.i(75105),aM=a.i(713095);let aN="owner";async function aO(){let a=await (0,f.g)("owner"),b=await (0,f.x)();if(b?.aal!=="aal2")throw new e.W("mfa");return a}let aP={now:()=>new Date,quota:async a=>{let b=await (0,aJ.C)(aK.t.providerAction,a);return b.allowed?null:(0,aL.z)("member",b.retryAfter)},limitRequest:async a=>(await (0,aJ.C)(aK.t.createRequest,a)).allowed,executor:a=>az[a](),insert:a=>(0,r.z)(a),get:r.j,decide:r.Q,claim:r.b,finish:r.c,audit:q.f,notify:a=>aG(a)},aQ=()=>{try{(0,d.refresh)()}catch{}};async function aR(a,b,c){return(0,e.F)(aN,async d=>{let e=await m({id:d.id,userId:d.userId},a,b,c,aP);return e.ok&&aQ(),e},{requireActionMember:f.g})}async function aS(a,b){return(0,e.F)("owner",async c=>{let d=await o({id:c.id,userId:c.userId},a,b,aP);return aQ(),d},{requireActionMember:aO})}async function aT(a){return(0,e.F)("owner",async b=>{let c=await n({id:b.id,userId:b.userId},a,aP);return aQ(),c},{requireActionMember:aO})}async function aU(a,b){return(0,e.F)(aN,async c=>{let d=await aP.quota(c.id,`options:${a}`);return d?{ok:!1,error:d}:aI(a,b)},{requireActionMember:f.g})}async function aV(){return(0,e.F)("owner",async a=>{let b=(0,h.p)();if(!b)return{ok:!1,error:h.S};let{SITE_URL:d,OPS_ENCRYPTION_KEY:e}=(0,aC.f)(),f=(0,h.C)(),{verifier:i,challenge:j}=(0,h.U)();return(await (0,c.cookies)()).set(p.o,(0,g.G)({state:f,verifier:i,memberId:a.id,exp:Date.now()+1e3*g.N},e),{httpOnly:!0,secure:d.startsWith("https://"),sameSite:"lax",path:p.B,maxAge:g.N}),{ok:!0,data:{url:(0,p.O)(b,{state:f,challenge:j,redirectUri:(0,p.E)(d)})}}},{requireActionMember:aO})}async function aW(){return(0,e.F)("owner",async a=>(await (0,r.k)(),await (0,q.f)({kind:"ok",message:"Google (create projects) disconnected",resourceId:null,actorUserId:a.userId}).catch(()=>void 0),aQ(),{ok:!0,message:"Disconnected here. Remove Watchbell's access in your Google Account → Security → Third-party access as well."}),{requireActionMember:f.g})}(0,aM.ensureServerEntryExports)([aR,aS,aT,aU,aV,aW]),(0,b.registerServerReference)(aR,"702eb3e98c473e986a28f848f70fe84966179665a2",null),(0,b.registerServerReference)(aS,"60c04f091fbfce86e5a1c87b235513d18ac94e6b2d",null),(0,b.registerServerReference)(aT,"402b4798d2559a41e061dd4b02a9d6749773008251",null),(0,b.registerServerReference)(aU,"60c74e359c64af5a81f9968c432b903ac9ee92740c",null),(0,b.registerServerReference)(aV,"007247140dcdaaf151794f29e8264328528f391541",null),(0,b.registerServerReference)(aW,"005442060b2bdbd48be0a46cef6f0a58abe388408a",null),a.s(["g",0,aS,"p",0,aU,"F",0,aW,"d",0,aT,"q",0,aR,"Y",0,aV],198398)}];
2
2
 
3
3
  //# sourceMappingURL=src_app_%28console%29_create_actions_ts_05-86qr6kfjey._.js.map
@@ -1,3 +1,3 @@
1
- module.exports=[163798,a=>{"use strict";var b=a.i(907997),c=a.i(56052),d=a.i(530385),e=a.i(93321),f=a.i(395936),g=a.i(803681),h=a.i(256829),i=a.i(685865),j=a.i(154756),k=a.i(791444),l=a.i(548734),m=a.i(837137),n=a.i(109307),o=a.i(532620),p=a.i(639271),q=a.i(139138),r=a.i(697365);async function s(){let a=await (0,n.I)(),s=new Date,[t,u,v,w]=await Promise.all([(0,o.R)("d1_database"),(0,o.e)(),(0,l.f)().select({id:m.accounts.id,label:m.accounts.label}).from(m.accounts).where((0,e.u)(m.accounts.provider,"cloudflare")).orderBy((0,d.M)(m.accounts.createdAt)).limit(20),(0,l.f)().select({value:m.settings.value}).from(m.settings).where((0,e.u)(m.settings.key,r.F)).limit(1)]),x=(0,r.A)(w[0]?.value),y=(0,r.q)(t,s,u),z=v.flatMap(a=>{let b=(0,r.R)(x[a.id]);return b?[{...a,note:b}]:[]});return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(i.AutoRefresh,{at:s.getTime()}),(0,b.jsx)(g.L,{crumbs:[{label:"Database"},{label:"Cloudflare D1"}],title:"Cloudflare D1",sub:"Size from the D1 API and rows read and written today (UTC) from Cloudflare's GraphQL analytics, read hourly with the Cloudflare token on Connections. The console never runs a query on a database.",actions:"owner"===a.role?(0,b.jsx)(f.default,{href:"/connections",className:(0,g.R)(),children:"Manage accounts"}):void 0}),"owner"===a.role&&z.map(a=>(0,b.jsx)(g.M,{tone:"warn"===a.note.tone?"warning":"info",title:(0,b.jsxs)("span",{className:"inline-flex items-center gap-2",children:["D1 access ",(0,b.jsx)(j.c,{name:a.label})]}),children:a.note.text},a.id)),0===y.length?(0,b.jsx)(g.N,{children:(0,b.jsx)(g.k,{icon:c.f,title:v.length?"No D1 databases found yet":"No Cloudflare account connected",action:"owner"===a.role?(0,b.jsx)(f.default,{href:"/connections",className:(0,g.R)({size:"sm"}),children:"Open connections"}):void 0,children:v.length?"D1 databases appear here after the hourly read, once the Cloudflare token has Account → D1 → Read.":"Connect Cloudflare with a token that includes Account → D1 → Read (and Account → Account Analytics → Read for row counts)."})}):(0,b.jsx)(h.f,{title:"D1 databases",meta:`Free plan: ${p.M.databases} databases, 500 MB each, 5 GB per account, 5M rows read and 100k written a day`,rows:y,source:"D1 API / GraphQL",extraHead:["Size","Tables"],extraCells:a=>(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("td",{className:(0,q.f)(k.z,"font-mono"),children:a.size}),(0,b.jsx)("td",{className:(0,q.f)(k.z,"font-mono"),title:"Cloudflare marks this count as no longer accurate",children:a.tables})]})})]})}a.s(["default",0,s])},530070,function(a){a.n(a.i(163798))}];
1
+ module.exports=[163798,a=>{"use strict";var b=a.i(907997),c=a.i(56052),d=a.i(530385),e=a.i(93321),f=a.i(395936),g=a.i(803681),h=a.i(256829),i=a.i(685865),j=a.i(154756),k=a.i(791444),l=a.i(548734),m=a.i(837137),n=a.i(109307),o=a.i(532620),p=a.i(639271),q=a.i(139138),r=a.i(697365);async function s(){let a=await (0,n.I)(),s=new Date,[t,u,v,w]=await Promise.all([(0,o.R)("d1_database"),(0,o.e)(),(0,l.f)().select({id:m.accounts.id,label:m.accounts.label}).from(m.accounts).where((0,e.u)(m.accounts.provider,"cloudflare")).orderBy((0,d.M)(m.accounts.createdAt)).limit(20),(0,l.f)().select({value:m.settings.value}).from(m.settings).where((0,e.u)(m.settings.key,r.F)).limit(1)]),x=(0,r.A)(w[0]?.value),y=(0,r.q)(t,s,u),z=v.flatMap(a=>{let b=(0,r.R)(x[a.id]);return b?[{...a,note:b}]:[]});return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(i.AutoRefresh,{at:s.getTime()}),(0,b.jsx)(g.L,{crumbs:[{label:"Database"},{label:"Cloudflare D1"}],title:"Cloudflare D1",sub:"Size from the D1 API and rows read and written today (UTC) from Cloudflare's GraphQL analytics, read hourly with the Cloudflare token on Connections. Watchbell never runs a query on a database.",actions:"owner"===a.role?(0,b.jsx)(f.default,{href:"/connections",className:(0,g.R)(),children:"Manage accounts"}):void 0}),"owner"===a.role&&z.map(a=>(0,b.jsx)(g.M,{tone:"warn"===a.note.tone?"warning":"info",title:(0,b.jsxs)("span",{className:"inline-flex items-center gap-2",children:["D1 access ",(0,b.jsx)(j.c,{name:a.label})]}),children:a.note.text},a.id)),0===y.length?(0,b.jsx)(g.N,{children:(0,b.jsx)(g.k,{icon:c.f,title:v.length?"No D1 databases found yet":"No Cloudflare account connected",action:"owner"===a.role?(0,b.jsx)(f.default,{href:"/connections",className:(0,g.R)({size:"sm"}),children:"Open connections"}):void 0,children:v.length?"D1 databases appear here after the hourly read, once the Cloudflare token has Account → D1 → Read.":"Connect Cloudflare with a token that includes Account → D1 → Read (and Account → Account Analytics → Read for row counts)."})}):(0,b.jsx)(h.f,{title:"D1 databases",meta:`Free plan: ${p.M.databases} databases, 500 MB each, 5 GB per account, 5M rows read and 100k written a day`,rows:y,source:"D1 API / GraphQL",extraHead:["Size","Tables"],extraCells:a=>(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)("td",{className:(0,q.f)(k.z,"font-mono"),children:a.size}),(0,b.jsx)("td",{className:(0,q.f)(k.z,"font-mono"),title:"Cloudflare marks this count as no longer accurate",children:a.tables})]})})]})}a.s(["default",0,s])},530070,function(a){a.n(a.i(163798))}];
2
2
 
3
3
  //# sourceMappingURL=src_app_%28console%29_d1_page_tsx_167hwnq_9uh81._.js.map
@@ -1,3 +1,3 @@
1
- module.exports=[[804350,a=>{var b=a.i(907997);let c=(0,a.i(377269).f)("outline","sitemap","Sitemap",[["path",{d:"M3 17a2 2 0 0 1 2 -2h2a2 2 0 0 1 2 2v2a2 2 0 0 1 -2 2h-2a2 2 0 0 1 -2 -2l0 -2",key:"svg-0"}],["path",{d:"M15 17a2 2 0 0 1 2 -2h2a2 2 0 0 1 2 2v2a2 2 0 0 1 -2 2h-2a2 2 0 0 1 -2 -2l0 -2",key:"svg-1"}],["path",{d:"M9 5a2 2 0 0 1 2 -2h2a2 2 0 0 1 2 2v2a2 2 0 0 1 -2 2h-2a2 2 0 0 1 -2 -2l0 -2",key:"svg-2"}],["path",{d:"M6 15v-1a2 2 0 0 1 2 -2h8a2 2 0 0 1 2 2v1",key:"svg-3"}],["path",{d:"M12 9l0 3",key:"svg-4"}]]);var d=a.i(395936),e=a.i(803681),f=a.i(959581),g=a.i(685865),h=a.i(154756),i=a.i(954296),j=a.i(686251),k=a.i(791444),l=a.i(109307),m=a.i(532620),n=a.i(322145),o=a.i(233711),p=a.i(245710),q=a.i(139138),r=a.i(469762),s=a.i(646322),t=a.i(505237),u=a.i(904589),v=a.i(98988),w=a.i(936071),x=a.i(845224),y=a.i(228796),z=a.i(722061);let A="text-ink-faint";async function B({searchParams:a}){let C=await (0,l.I)(),{zone:D,create:E}=await a,F=new Date,G=await (0,m.c)(),H=await (0,m.j)(D&&G.some(a=>a.id===D)?D:null),I=(0,t.z)(C.role);if(!H)return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(e.L,{crumbs:[{label:"Hosting"},{label:"DNS records"}],title:"DNS records"}),(0,b.jsx)(e.N,{children:(0,b.jsx)(e.k,{icon:c,title:"No Cloudflare zone watched yet",action:"owner"===C.role?(0,b.jsx)(d.default,{className:(0,e.R)({size:"sm"}),href:"/connections",children:"Open connections"}):void 0,children:"Connect Cloudflare and tick its zones in Sync. Zones are read every hour."})})]});let J=H.facts,K=(0,u.k)(J.zone?.status??null,J.zone?.paused??!1),L=(0,o.r)(J.certs),M=(0,o.Z)(L.expiresOn),N=(0,o.Z)(J.rdap?.expiresAt),O=(0,o.g)(N,F),P=(0,o.Z)(J.rdap?.checkedAt),Q=(0,o.y)(J.ssl?.mode??null),R="owner"===C.role,S=R&&H.accountId?(0,s.f)("cloudflare",(await (0,n.f)([H.accountId])).get(H.accountId),null):null;return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(g.AutoRefresh,{at:F.getTime()}),(0,b.jsx)(e.L,{crumbs:[{label:"Hosting"},{label:"DNS records"}],badge:(0,b.jsx)(h.g,{kind:"dns"}),title:H.name,sub:"Cloudflare zone, read every hour. The owner can switch a record between proxied and DNS only, or edit an A, AAAA, CNAME or TXT record, after a review that shows the old and new value. New records are added only through a request the owner approves (Add record); the console never deletes records.",actions:(0,b.jsxs)(b.Fragment,{children:[G.length>1&&(0,b.jsx)(x.ZonePicker,{zones:G,current:H.id}),(0,b.jsx)(h.c,{name:H.accountLabel}),R&&(0,b.jsx)(y.CreateButton,{type:"dns_record",target:H.id,targetName:H.name,label:"Add record"})]})}),(0,b.jsx)(z.f,{member:C,types:["dns_record"],focus:E??null}),(0,b.jsxs)(e.N,{title:"Zone",meta:(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(i.Src,{kind:"api"}),(0,b.jsx)(i.Src,{kind:"api",children:"RDAP"})]}),children:[(0,b.jsxs)("dl",{className:"grid grid-cols-[170px_minmax(0,1fr)] gap-x-4 gap-y-2.5 max-[720px]:grid-cols-1 max-[720px]:gap-y-1 [&_dd]:min-w-0 [&_dd]:[overflow-wrap:anywhere] [&_dt]:text-ink-soft",children:[(0,b.jsx)("dt",{children:"Status"}),(0,b.jsx)("dd",{children:(0,b.jsx)(j.F,{state:K.state,children:K.label})}),(0,b.jsx)("dt",{children:"Nameservers"}),(0,b.jsx)("dd",{className:"font-mono text-[12.5px]",children:J.zone?.nameServers.join(", ")||"—"}),(0,b.jsx)("dt",{children:"SSL/TLS mode"}),(0,b.jsx)("dd",{children:Q??(0,b.jsxs)("span",{className:A,children:["Unknown",J.ssl?.error?.includes("Zone Settings Read")?" · the token needs Zone Settings read":""]})}),(0,b.jsx)("dt",{children:"Edge certificate"}),(0,b.jsx)("dd",{children:"unknown"===L.state?(0,b.jsx)("span",{className:A,children:L.label}):(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(j.F,{state:L.state,children:L.label}),M&&(0,b.jsxs)("span",{className:A,children:[" · expires ",(0,r.H)(M),", Cloudflare renews it"]})]})}),(0,b.jsx)("dt",{children:"Domain expiry"}),(0,b.jsx)("dd",{children:N?(0,b.jsxs)(b.Fragment,{children:[(0,r.H)(N)," ",(0,b.jsxs)("span",{className:A,children:["· ",null!==O&&O<0?`expired ${-O} day${-1===O?"":"s"} ago`:`in ${O} day${1===O?"":"s"}`,J.rdap?.registrar?` \xb7 ${J.rdap.registrar}`:"",P?` \xb7 checked ${(0,p.$)(P,F)}`:""]})]}):(0,b.jsxs)("span",{className:A,children:["Unknown",J.rdap?.error?` \xb7 ${J.rdap.error}`:" · not read yet"]})})]}),J.cfErrors.filter(a=>a!==J.ssl?.error).map(a=>(0,b.jsx)("p",{className:"mt-3 text-[12.5px] text-ink-soft",children:a},a)),J.recordsTruncated&&(0,b.jsx)("p",{className:"mt-3 text-[12.5px] text-ink-soft",children:"This zone has more than 2,000 records. Only the first 2,000 are shown."}),S?.tone==="off"&&(0,b.jsxs)("p",{className:"mt-3 text-[12.5px] text-warn",children:['Editing is off: the last edit was refused. Add "Zone → DNS → Edit" to this Cloudflare token on ',(0,b.jsx)(d.default,{href:"/connections?provider=cloudflare",className:"underline",children:"Connections"}),", then try again."]})]}),(0,b.jsx)(e.N,{flush:!0,children:(0,b.jsx)(f.ListFilter,{placeholder:"Filter records",states:[["ok","Fine"],["warn","Proxied in front of Vercel"]],head:["Type","Name","Content","Proxy","TTL",""],rows:J.records.map(a=>{let c=(0,o.l)(a),d=a.proxied&&c;return{key:a.id,state:d?"warn":"ok",text:`${a.type} ${a.name} ${a.content}`,row:(0,b.jsxs)("tr",{className:k.C,children:[(0,b.jsx)("td",{className:k.z,children:(0,b.jsx)(e.E,{children:a.type})}),(0,b.jsx)("td",{className:(0,q.f)(k.z,"font-mono text-[12.5px]"),children:a.name===H.name?"@":a.name.replace(`.${H.name}`,"")}),(0,b.jsx)("td",{className:(0,q.f)(k.z,"font-mono text-[12.5px]"),children:(0,b.jsxs)("div",{className:"flex min-w-0 items-center gap-1.5",children:[(0,b.jsx)(w.RecordContent,{value:a.content}),c&&(0,b.jsx)(e.E,{children:"Vercel"})]})}),(0,b.jsx)("td",{className:k.z,children:a.proxied?(0,b.jsx)(j.F,{state:d?"warn":"info",children:"Proxied"}):(0,b.jsx)(j.F,{state:"off",children:"DNS only"})}),(0,b.jsx)("td",{className:(0,q.f)(k.z,"text-ink-soft"),children:(0,u.j)(a.ttl)}),(0,b.jsx)("td",{className:k.z,children:I&&(0,b.jsx)(v.DnsRecordActions,{zoneId:H.id,r:a,owner:R,vercel:c})})]})}})})})]})}a.s(["default",0,B],804350)},926229,a=>{let b=(0,a.i(211857).registerClientReference)(function(){throw Error("Attempted to call RecordContent() from the server but RecordContent is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/src/app/(console)/dns/record-content.tsx","RecordContent");a.s(["RecordContent",0,b])},936071,a=>{var b=a.i(926229);a.n(b)},755404,a=>{let b=(0,a.i(211857).registerClientReference)(function(){throw Error("Attempted to call ZonePicker() from the server but ZonePicker is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/src/app/(console)/dns/zone-picker.tsx","ZonePicker");a.s(["ZonePicker",0,b])},845224,a=>{var b=a.i(755404);a.n(b)}],401694,function(a){a.n(a.i(804350))}];
1
+ module.exports=[[804350,a=>{var b=a.i(907997);let c=(0,a.i(377269).f)("outline","sitemap","Sitemap",[["path",{d:"M3 17a2 2 0 0 1 2 -2h2a2 2 0 0 1 2 2v2a2 2 0 0 1 -2 2h-2a2 2 0 0 1 -2 -2l0 -2",key:"svg-0"}],["path",{d:"M15 17a2 2 0 0 1 2 -2h2a2 2 0 0 1 2 2v2a2 2 0 0 1 -2 2h-2a2 2 0 0 1 -2 -2l0 -2",key:"svg-1"}],["path",{d:"M9 5a2 2 0 0 1 2 -2h2a2 2 0 0 1 2 2v2a2 2 0 0 1 -2 2h-2a2 2 0 0 1 -2 -2l0 -2",key:"svg-2"}],["path",{d:"M6 15v-1a2 2 0 0 1 2 -2h8a2 2 0 0 1 2 2v1",key:"svg-3"}],["path",{d:"M12 9l0 3",key:"svg-4"}]]);var d=a.i(395936),e=a.i(803681),f=a.i(959581),g=a.i(685865),h=a.i(154756),i=a.i(954296),j=a.i(686251),k=a.i(791444),l=a.i(109307),m=a.i(532620),n=a.i(322145),o=a.i(233711),p=a.i(245710),q=a.i(139138),r=a.i(469762),s=a.i(646322),t=a.i(505237),u=a.i(904589),v=a.i(98988),w=a.i(936071),x=a.i(845224),y=a.i(228796),z=a.i(722061);let A="text-ink-faint";async function B({searchParams:a}){let C=await (0,l.I)(),{zone:D,create:E}=await a,F=new Date,G=await (0,m.c)(),H=await (0,m.j)(D&&G.some(a=>a.id===D)?D:null),I=(0,t.z)(C.role);if(!H)return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(e.L,{crumbs:[{label:"Hosting"},{label:"DNS records"}],title:"DNS records"}),(0,b.jsx)(e.N,{children:(0,b.jsx)(e.k,{icon:c,title:"No Cloudflare zone watched yet",action:"owner"===C.role?(0,b.jsx)(d.default,{className:(0,e.R)({size:"sm"}),href:"/connections",children:"Open connections"}):void 0,children:"Connect Cloudflare and tick its zones in Sync. Zones are read every hour."})})]});let J=H.facts,K=(0,u.k)(J.zone?.status??null,J.zone?.paused??!1),L=(0,o.r)(J.certs),M=(0,o.Z)(L.expiresOn),N=(0,o.Z)(J.rdap?.expiresAt),O=(0,o.g)(N,F),P=(0,o.Z)(J.rdap?.checkedAt),Q=(0,o.y)(J.ssl?.mode??null),R="owner"===C.role,S=R&&H.accountId?(0,s.f)("cloudflare",(await (0,n.f)([H.accountId])).get(H.accountId),null):null;return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(g.AutoRefresh,{at:F.getTime()}),(0,b.jsx)(e.L,{crumbs:[{label:"Hosting"},{label:"DNS records"}],badge:(0,b.jsx)(h.g,{kind:"dns"}),title:H.name,sub:"Your Cloudflare zones, read every hour. Watchbell never deletes a record.",more:"Owners can switch a record between proxied and DNS only, or edit an A, AAAA, CNAME or TXT record, after a review that shows the old and new value. New records are added only through a request an owner approves (Add record).",actions:(0,b.jsxs)(b.Fragment,{children:[G.length>1&&(0,b.jsx)(x.ZonePicker,{zones:G,current:H.id}),(0,b.jsx)(h.c,{name:H.accountLabel}),R&&(0,b.jsx)(y.CreateButton,{type:"dns_record",target:H.id,targetName:H.name,label:"Add record"})]})}),(0,b.jsx)(z.f,{member:C,types:["dns_record"],focus:E??null}),(0,b.jsxs)(e.N,{title:"Zone",meta:(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(i.Src,{kind:"api"}),(0,b.jsx)(i.Src,{kind:"api",children:"RDAP"})]}),children:[(0,b.jsxs)("dl",{className:"grid grid-cols-[170px_minmax(0,1fr)] gap-x-4 gap-y-2.5 max-[720px]:grid-cols-1 max-[720px]:gap-y-1 [&_dd]:min-w-0 [&_dd]:[overflow-wrap:anywhere] [&_dt]:text-ink-soft",children:[(0,b.jsx)("dt",{children:"Status"}),(0,b.jsx)("dd",{children:(0,b.jsx)(j.F,{state:K.state,children:K.label})}),(0,b.jsx)("dt",{children:"Nameservers"}),(0,b.jsx)("dd",{className:"font-mono text-[12.5px]",children:J.zone?.nameServers.join(", ")||"—"}),(0,b.jsx)("dt",{children:"SSL/TLS mode"}),(0,b.jsx)("dd",{children:Q??(0,b.jsxs)("span",{className:A,children:["Unknown",J.ssl?.error?.includes("Zone Settings Read")?" · the token needs Zone Settings read":""]})}),(0,b.jsx)("dt",{children:"Edge certificate"}),(0,b.jsx)("dd",{children:"unknown"===L.state?(0,b.jsx)("span",{className:A,children:L.label}):(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(j.F,{state:L.state,children:L.label}),M&&(0,b.jsxs)("span",{className:A,children:[" · expires ",(0,r.H)(M),", Cloudflare renews it"]})]})}),(0,b.jsx)("dt",{children:"Domain expiry"}),(0,b.jsx)("dd",{children:N?(0,b.jsxs)(b.Fragment,{children:[(0,r.H)(N)," ",(0,b.jsxs)("span",{className:A,children:["· ",null!==O&&O<0?`expired ${-O} day${-1===O?"":"s"} ago`:`in ${O} day${1===O?"":"s"}`,J.rdap?.registrar?` \xb7 ${J.rdap.registrar}`:"",P?` \xb7 checked ${(0,p.$)(P,F)}`:""]})]}):(0,b.jsxs)("span",{className:A,children:["Unknown",J.rdap?.error?` \xb7 ${J.rdap.error}`:" · not read yet"]})})]}),J.cfErrors.filter(a=>a!==J.ssl?.error).map(a=>(0,b.jsx)("p",{className:"mt-3 text-[12.5px] text-ink-soft",children:a},a)),J.recordsTruncated&&(0,b.jsx)("p",{className:"mt-3 text-[12.5px] text-ink-soft",children:"This zone has more than 2,000 records. Only the first 2,000 are shown."}),S?.tone==="off"&&(0,b.jsxs)("p",{className:"mt-3 text-[12.5px] text-warn",children:['Editing is off: the last edit was refused. Add "Zone → DNS → Edit" to this Cloudflare token on ',(0,b.jsx)(d.default,{href:"/connections?provider=cloudflare",className:"underline",children:"Connections"}),", then try again."]})]}),(0,b.jsx)(e.N,{flush:!0,children:(0,b.jsx)(f.ListFilter,{placeholder:"Filter records",states:[["ok","Fine"],["warn","Proxied in front of Vercel"]],head:["Type","Name","Content","Proxy","TTL",""],rows:J.records.map(a=>{let c=(0,o.l)(a),d=a.proxied&&c;return{key:a.id,state:d?"warn":"ok",text:`${a.type} ${a.name} ${a.content}`,row:(0,b.jsxs)("tr",{className:k.C,children:[(0,b.jsx)("td",{className:k.z,children:(0,b.jsx)(e.E,{children:a.type})}),(0,b.jsx)("td",{className:(0,q.f)(k.z,"font-mono text-[12.5px]"),children:a.name===H.name?"@":a.name.replace(`.${H.name}`,"")}),(0,b.jsx)("td",{className:(0,q.f)(k.z,"font-mono text-[12.5px]"),children:(0,b.jsxs)("div",{className:"flex min-w-0 items-center gap-1.5",children:[(0,b.jsx)(w.RecordContent,{value:a.content}),c&&(0,b.jsx)(e.E,{children:"Vercel"})]})}),(0,b.jsx)("td",{className:k.z,children:a.proxied?(0,b.jsx)(j.F,{state:d?"warn":"info",children:"Proxied"}):(0,b.jsx)(j.F,{state:"off",children:"DNS only"})}),(0,b.jsx)("td",{className:(0,q.f)(k.z,"text-ink-soft"),children:(0,u.j)(a.ttl)}),(0,b.jsx)("td",{className:k.z,children:I&&(0,b.jsx)(v.DnsRecordActions,{zoneId:H.id,r:a,owner:R,vercel:c})})]})}})})})]})}a.s(["default",0,B],804350)},926229,a=>{let b=(0,a.i(211857).registerClientReference)(function(){throw Error("Attempted to call RecordContent() from the server but RecordContent is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/src/app/(console)/dns/record-content.tsx","RecordContent");a.s(["RecordContent",0,b])},936071,a=>{var b=a.i(926229);a.n(b)},755404,a=>{let b=(0,a.i(211857).registerClientReference)(function(){throw Error("Attempted to call ZonePicker() from the server but ZonePicker is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/src/app/(console)/dns/zone-picker.tsx","ZonePicker");a.s(["ZonePicker",0,b])},845224,a=>{var b=a.i(755404);a.n(b)}],401694,function(a){a.n(a.i(804350))}];
2
2
 
3
3
  //# sourceMappingURL=src_app_%28console%29_dns_0d1uyir4fe7pc._.js.map
@@ -1,3 +1,3 @@
1
- module.exports=[686779,a=>{"use strict";var b=a.i(137936),c=a.i(600079),d=a.i(109307),e=a.i(93321),f=a.i(351674),g=a.i(548734),h=a.i(837137),i=a.i(45617),j=a.i(678831),k=a.i(418864),l=a.i(364525),m=a.i(188546);async function n(a,b){let[c]=await (0,g.f)().select({data:h.snapshots.data}).from(h.snapshots).where((0,e.u)(h.snapshots.resourceId,a)).limit(1),d=(0,m.q)(c?.data).records;if(!d.some(a=>a.id===b.id))return;let n={records:(0,l.l)(d,b)};await (0,g.f)().update(h.snapshots).set({data:f.B`${h.snapshots.data} || ${JSON.stringify(n)}::jsonb`}).where((0,e.u)(h.snapshots.resourceId,a)),await (0,k.x)(new Date),(0,j.J)([i.m.zones,i.m.domains])}var o=a.i(322145),p=a.i(683439),q=a.i(75105),r=a.i(44925),s=a.i(713095);let t={requireActionMember:d.g},u=/^[0-9a-f]{32}$/,v="Cloudflare can't find this record any more. It leaves this page after the next hourly read.",w=a=>({done:!1,message:a});function x(a){return a&&"object"==typeof a?"string"!=typeof a.content||a.content.length>4096||"number"!=typeof a.ttl||!Number.isFinite(a.ttl)||"boolean"!=typeof a.proxied?null:{content:a.content,ttl:a.ttl,proxied:a.proxied}:null}async function y(a,b){try{await n(a,b)}catch{console.warn("dns snapshot update failed")}}async function z(a,b,d,e){return(0,c.F)("owner",async c=>{var f;let g=x(d),h=x(e);if(!(0,p.f)(a)||"string"!=typeof b||!u.test(b)||!g||!h)return{ok:!1,error:q.w};let i=await (0,o.q)(c.id,"dns",b);if(i)return{ok:!1,error:i};let j=await (0,o.p)(a,"zone");if(!j||!j.resource.externalId)return{ok:!1,error:"This zone isn't watched any more, or its Cloudflare credential can't be read. Reload the page."};let k=j.resource.externalId,m=a=>(0,o.W)(a,c,j.account.id),n=await (0,r.B)(j.token,k,b);if(!n.ok)return m(w("scope"===n.kind?(0,q.b)("cloudflare",{}):"missing"===n.kind?v:n.error));let s=n.data;if(!(0,l.O)(s.type))return m(w("Only A, AAAA, CNAME and TXT records can be edited here."));if(!(0,l.J)(s,g))return await y(a,s),m(w(q.G));let t=(0,l.t)(s,h);if(!t.ok)return m(w(t.error));let z={type:s.type,name:s.name,content:t.values.content,ttl:t.values.ttl,...(0,l.z)(s.type)?{proxied:t.values.proxied}:{}},A=await (0,r.q)(j.token,k,b,z),B=(0,l.P)(s,t.changes);return A.ok?(await y(a,A.data),m({done:!0,message:1===(f=t.changes).length&&"proxied"===f[0].field?"DNS only"===f[0].after?`${s.name} is DNS only now. Cloudflare applies it within a minute.`:`${s.name} is proxied through Cloudflare now.`:`Saved ${s.type} ${s.name}. Cloudflare applies it within a minute; resolvers may keep the old value until its TTL runs out.`,audit:{message:B.message,resourceId:a,detail:B.detail}})):m({done:!1,failed:"scope"===A.kind?{ok:!1,kind:"scope",status:A.status,error:(0,q.b)("cloudflare",{})}:"missing"===A.kind?{ok:!1,kind:"missing",status:404,error:v}:{ok:!1,kind:A.kind,error:A.error,...A.status?{status:A.status}:{}},audit:{message:`DNS edit failed \xb7 ${s.type} ${s.name}`,resourceId:a}})},t)}(0,s.ensureServerEntryExports)([z]),(0,b.registerServerReference)(z,"780a0c020100f906e41ceb1bfcae3017dc608085a4",null),a.s(["f",0,z],686779)}];
1
+ module.exports=[686779,a=>{"use strict";var b=a.i(137936),c=a.i(600079),d=a.i(109307),e=a.i(93321),f=a.i(351674),g=a.i(548734),h=a.i(837137),i=a.i(45617),j=a.i(678831),k=a.i(418864),l=a.i(364525),m=a.i(188546);async function n(a,b){let[c]=await (0,g.f)().select({data:h.snapshots.data}).from(h.snapshots).where((0,e.u)(h.snapshots.resourceId,a)).limit(1),d=(0,m.q)(c?.data).records;if(!d.some(a=>a.id===b.id))return;let n={records:(0,l.l)(d,b)};await (0,g.f)().update(h.snapshots).set({data:f.B`${h.snapshots.data} || ${JSON.stringify(n)}::jsonb`}).where((0,e.u)(h.snapshots.resourceId,a)),await (0,k.x)(new Date),(0,j.J)([i.m.zones,i.m.domains])}var o=a.i(322145),p=a.i(683439),q=a.i(75105),r=a.i(44925),s=a.i(713095);let t={requireActionMember:d.g},u=/^[0-9a-f]{32}$/,v="Cloudflare can't find this record any more. It leaves this page after the next hourly read.",w=a=>({done:!1,message:a});function x(a){return a&&"object"==typeof a?"string"!=typeof a.content||a.content.length>4096||"number"!=typeof a.ttl||!Number.isFinite(a.ttl)||"boolean"!=typeof a.proxied?null:{content:a.content,ttl:a.ttl,proxied:a.proxied}:null}async function y(a,b){try{await n(a,b)}catch{console.warn("dns snapshot update failed")}}async function z(a,b,d,e){return(0,c.F)("owner",async c=>{var f;let g=x(d),h=x(e);if(!(0,p.f)(a)||"string"!=typeof b||!u.test(b)||!g||!h)return{ok:!1,error:q.w};let i=await (0,o.q)(c.id,"dns",b);if(i)return{ok:!1,error:i};let j=await (0,o.p)(a,"zone");if(!j||!j.resource.externalId)return{ok:!1,error:"This zone isn't watched any more, or its Cloudflare credential can't be read. Reload the page."};let k=j.resource.externalId,m=a=>(0,o.W)(a,c,j.account.id),n=await (0,r.B)(j.token,k,b);if(!n.ok)return m(w("scope"===n.kind?(0,q.b)("cloudflare",{}):"missing"===n.kind?v:n.error));let s=n.data;if(!(0,l.O)(s.type))return m(w("Only A, AAAA, CNAME and TXT records can be edited here."));if(!(0,l.J)(s,g))return await y(a,s),m(w(q.G));let t=(0,l.t)(s,h);if(!t.ok)return m(w(t.error));let z={type:s.type,name:s.name,content:t.values.content,ttl:t.values.ttl,...(0,l.z)(s.type)?{proxied:t.values.proxied}:{}},A=await (0,r.q)(j.token,k,b,z),B=(0,l.P)(s,t.changes);return A.ok?(await y(a,A.data),m({done:!0,message:1===(f=t.changes).length&&"proxied"===f[0].field?"DNS only"===f[0].after?`${s.name} is DNS only now. Cloudflare applies it within a minute.`:`${s.name} is proxied through Cloudflare now.`:`Saved ${s.type} ${s.name}. Cloudflare applies it within a minute; resolvers may keep the old value until its TTL runs out.`,audit:{message:B.message,resourceId:a,detail:B.detail}})):m({done:!1,failed:"scope"===A.kind?{ok:!1,kind:"scope",status:A.status,error:(0,q.b)("cloudflare",{})}:"missing"===A.kind?{ok:!1,kind:"missing",status:404,error:v}:{ok:!1,kind:A.kind,error:A.error,...A.status?{status:A.status}:{}},audit:{message:`DNS edit failed \xb7 ${s.type} ${s.name}`,resourceId:a}})},t)}(0,s.ensureServerEntryExports)([z]),(0,b.registerServerReference)(z,"780b4822411a77c516305aad8aae1834d4cda852f5",null),a.s(["f",0,z],686779)}];
2
2
 
3
3
  //# sourceMappingURL=src_app_%28console%29_dns_actions_ts_1jzn58xzwbukz._.js.map