d1s 0.2.13 → 0.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (406) hide show
  1. package/README.md +18 -1
  2. package/dist/.next/.next/BUILD_ID +1 -1
  3. package/dist/.next/.next/app-build-manifest.json +119 -77
  4. package/dist/.next/.next/app-path-routes-manifest.json +1 -1
  5. package/dist/.next/.next/build-manifest.json +7 -7
  6. package/dist/.next/.next/cache/.rscinfo +1 -1
  7. package/dist/.next/.next/cache/.tsbuildinfo +1 -1
  8. package/dist/.next/.next/cache/webpack/client-development/0.pack.gz +0 -0
  9. package/dist/.next/.next/cache/webpack/client-development/1.pack.gz +0 -0
  10. package/dist/.next/.next/cache/webpack/client-development/index.pack.gz +0 -0
  11. package/dist/.next/.next/cache/webpack/client-development/index.pack.gz.old +0 -0
  12. package/dist/.next/.next/cache/webpack/client-production/0.pack +0 -0
  13. package/dist/.next/.next/cache/webpack/client-production/1.pack +0 -0
  14. package/dist/.next/.next/cache/webpack/client-production/10.pack +0 -0
  15. package/dist/.next/.next/cache/webpack/client-production/11.pack +0 -0
  16. package/dist/.next/.next/cache/webpack/client-production/12.pack +0 -0
  17. package/dist/.next/.next/cache/webpack/client-production/2.pack +0 -0
  18. package/dist/.next/.next/cache/webpack/client-production/3.pack +0 -0
  19. package/dist/.next/.next/cache/webpack/client-production/4.pack +0 -0
  20. package/dist/.next/.next/cache/webpack/client-production/5.pack +0 -0
  21. package/dist/.next/.next/cache/webpack/client-production/6.pack +0 -0
  22. package/dist/.next/.next/cache/webpack/client-production/7.pack +0 -0
  23. package/dist/.next/.next/cache/webpack/client-production/8.pack +0 -0
  24. package/dist/.next/.next/cache/webpack/client-production/9.pack +0 -0
  25. package/dist/.next/.next/cache/webpack/client-production/index.pack +0 -0
  26. package/dist/.next/.next/cache/webpack/client-production/index.pack.old +0 -0
  27. package/dist/.next/.next/cache/webpack/edge-server-production/index.pack +0 -0
  28. package/dist/.next/.next/cache/webpack/server-development/0.pack.gz +0 -0
  29. package/dist/.next/.next/cache/webpack/server-development/1.pack.gz +0 -0
  30. package/dist/.next/.next/cache/webpack/server-development/index.pack.gz +0 -0
  31. package/dist/.next/.next/cache/webpack/server-production/0.pack +0 -0
  32. package/dist/.next/.next/cache/webpack/server-production/1.pack +0 -0
  33. package/dist/.next/.next/cache/webpack/server-production/2.pack +0 -0
  34. package/dist/.next/.next/cache/webpack/server-production/3.pack +0 -0
  35. package/dist/.next/.next/cache/webpack/server-production/index.pack +0 -0
  36. package/dist/.next/.next/cache/webpack/server-production/index.pack.old +0 -0
  37. package/dist/.next/.next/next-minimal-server.js.nft.json +1 -1
  38. package/dist/.next/.next/next-server.js.nft.json +1 -1
  39. package/dist/.next/.next/prerender-manifest.json +1 -1
  40. package/dist/.next/.next/react-loadable-manifest.json +11 -1
  41. package/dist/.next/.next/required-server-files.json +1 -1
  42. package/dist/.next/.next/routes-manifest.json +1 -1
  43. package/dist/.next/.next/server/app/_not-found/page.js +1 -1
  44. package/dist/.next/.next/server/app/_not-found/page.js.nft.json +1 -1
  45. package/dist/.next/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  46. package/dist/.next/.next/server/app/_not-found.html +1 -1
  47. package/dist/.next/.next/server/app/_not-found.rsc +5 -5
  48. package/dist/.next/.next/server/app/api/cloudflare/route.js +1 -1
  49. package/dist/.next/.next/server/app/api/cloudflare/route.js.nft.json +1 -1
  50. package/dist/.next/.next/server/app/api/cloudflare/route_client-reference-manifest.js +1 -1
  51. package/dist/.next/.next/server/app/api/databases/route.js +1 -1
  52. package/dist/.next/.next/server/app/api/databases/route.js.nft.json +1 -1
  53. package/dist/.next/.next/server/app/api/databases/route_client-reference-manifest.js +1 -1
  54. package/dist/.next/.next/server/app/api/migrations/list/route.js +26 -0
  55. package/dist/.next/.next/server/app/api/migrations/list/route.js.nft.json +1 -0
  56. package/dist/.next/.next/server/app/api/migrations/list/route_client-reference-manifest.js +1 -0
  57. package/dist/.next/.next/server/app/api/migrations/sync/route.js +5 -5
  58. package/dist/.next/.next/server/app/api/migrations/sync/route.js.nft.json +1 -1
  59. package/dist/.next/.next/server/app/api/migrations/sync/route_client-reference-manifest.js +1 -1
  60. package/dist/.next/.next/server/app/api/migrations/sync-files/route.js +4 -4
  61. package/dist/.next/.next/server/app/api/migrations/sync-files/route.js.nft.json +1 -1
  62. package/dist/.next/.next/server/app/api/migrations/sync-files/route_client-reference-manifest.js +1 -1
  63. package/dist/.next/.next/server/app/api/pro/route.js +1 -0
  64. package/dist/.next/.next/server/app/api/pro/route.js.nft.json +1 -0
  65. package/dist/.next/.next/server/app/api/pro/route_client-reference-manifest.js +1 -0
  66. package/dist/.next/.next/server/app/api/pull-data/confirm/route.js +1 -1
  67. package/dist/.next/.next/server/app/api/pull-data/confirm/route.js.nft.json +1 -1
  68. package/dist/.next/.next/server/app/api/pull-data/confirm/route_client-reference-manifest.js +1 -1
  69. package/dist/.next/.next/server/app/api/pull-remote/confirm/route.js +4 -4
  70. package/dist/.next/.next/server/app/api/pull-remote/confirm/route.js.nft.json +1 -1
  71. package/dist/.next/.next/server/app/api/pull-remote/confirm/route_client-reference-manifest.js +1 -1
  72. package/dist/.next/.next/server/app/api/pull-remote/preview/route.js +4 -4
  73. package/dist/.next/.next/server/app/api/pull-remote/preview/route.js.nft.json +1 -1
  74. package/dist/.next/.next/server/app/api/pull-remote/preview/route_client-reference-manifest.js +1 -1
  75. package/dist/.next/.next/server/app/api/push-remote/confirm/route.js +6 -6
  76. package/dist/.next/.next/server/app/api/push-remote/confirm/route.js.nft.json +1 -1
  77. package/dist/.next/.next/server/app/api/push-remote/confirm/route_client-reference-manifest.js +1 -1
  78. package/dist/.next/.next/server/app/api/push-remote/preview/route.js +6 -6
  79. package/dist/.next/.next/server/app/api/push-remote/preview/route.js.nft.json +1 -1
  80. package/dist/.next/.next/server/app/api/push-remote/preview/route_client-reference-manifest.js +1 -1
  81. package/dist/.next/.next/server/app/api/query/route.js +9 -9
  82. package/dist/.next/.next/server/app/api/query/route.js.nft.json +1 -1
  83. package/dist/.next/.next/server/app/api/query/route_client-reference-manifest.js +1 -1
  84. package/dist/.next/.next/server/app/api/schema/route.js +1 -0
  85. package/dist/.next/.next/server/app/api/schema/route.js.nft.json +1 -0
  86. package/dist/.next/.next/server/app/api/schema/route_client-reference-manifest.js +1 -0
  87. package/dist/.next/.next/server/app/api/tables/[name]/import/route.js +1 -0
  88. package/dist/.next/.next/server/app/api/tables/[name]/import/route.js.nft.json +1 -0
  89. package/dist/.next/.next/server/app/api/tables/[name]/import/route_client-reference-manifest.js +1 -0
  90. package/dist/.next/.next/server/app/api/tables/[name]/route.js +5 -5
  91. package/dist/.next/.next/server/app/api/tables/[name]/route.js.nft.json +1 -1
  92. package/dist/.next/.next/server/app/api/tables/[name]/route_client-reference-manifest.js +1 -1
  93. package/dist/.next/.next/server/app/api/tables/route.js +2 -2
  94. package/dist/.next/.next/server/app/api/tables/route.js.nft.json +1 -1
  95. package/dist/.next/.next/server/app/api/tables/route_client-reference-manifest.js +1 -1
  96. package/dist/.next/.next/server/app/api/time-travel/preview/route.js +1 -0
  97. package/dist/.next/.next/server/app/api/time-travel/preview/route.js.nft.json +1 -0
  98. package/dist/.next/.next/server/app/api/time-travel/preview/route_client-reference-manifest.js +1 -0
  99. package/dist/.next/.next/server/app/api/time-travel/restore/route.js +1 -0
  100. package/dist/.next/.next/server/app/api/time-travel/restore/route.js.nft.json +1 -0
  101. package/dist/.next/.next/server/app/api/time-travel/restore/route_client-reference-manifest.js +1 -0
  102. package/dist/.next/.next/server/app/api/update/route.js +1 -1
  103. package/dist/.next/.next/server/app/api/update/route.js.nft.json +1 -1
  104. package/dist/.next/.next/server/app/api/update/route_client-reference-manifest.js +1 -1
  105. package/dist/.next/.next/server/app/index.html +5 -3
  106. package/dist/.next/.next/server/app/index.rsc +6 -6
  107. package/dist/.next/.next/server/app/page.js +15 -15
  108. package/dist/.next/.next/server/app/page.js.nft.json +1 -1
  109. package/dist/.next/.next/server/app/page_client-reference-manifest.js +1 -1
  110. package/dist/.next/.next/server/app-paths-manifest.json +8 -2
  111. package/dist/.next/.next/server/chunks/226.js +12 -12
  112. package/dist/.next/.next/server/chunks/452.js +1 -1
  113. package/dist/.next/.next/server/chunks/487.js +1 -0
  114. package/dist/.next/.next/server/chunks/572.js +1 -1
  115. package/dist/.next/.next/server/chunks/992.js +2 -2
  116. package/dist/.next/.next/server/chunks/{638.js → 994.js} +3 -3
  117. package/dist/.next/.next/server/middleware-build-manifest.js +1 -1
  118. package/dist/.next/.next/server/middleware-react-loadable-manifest.js +1 -1
  119. package/dist/.next/.next/server/next-font-manifest.js +1 -1
  120. package/dist/.next/.next/server/next-font-manifest.json +1 -1
  121. package/dist/.next/.next/server/pages/404.html +1 -1
  122. package/dist/.next/.next/server/pages/500.html +1 -1
  123. package/dist/.next/.next/server/server-reference-manifest.json +1 -1
  124. package/dist/.next/.next/static/-OO4tE7EKr8o62Bne-ODo/_buildManifest.js +1 -0
  125. package/dist/.next/.next/static/3kAeIJC56X7aw1Fk5_OXO/_buildManifest.js +1 -0
  126. package/dist/.next/.next/static/J8r9W6xxmYYvuKehItNuW/_buildManifest.js +1 -0
  127. package/dist/.next/.next/static/ZmKZbpam0G_d3SphfZPJ7/_buildManifest.js +1 -0
  128. package/dist/.next/.next/static/arc9h7hbaQzL1Dl0iuVrT/_buildManifest.js +1 -0
  129. package/dist/.next/.next/static/chunks/1a258343.3b3e7ba5ba0bd0d2.js +1 -0
  130. package/dist/.next/.next/static/chunks/345.8fc37569d5708622.js +1 -0
  131. package/dist/.next/.next/static/chunks/480-85b6c8ae3f51b156.js +1 -0
  132. package/dist/.next/.next/static/chunks/52.2cdc9bdb75e1fc2e.js +1 -0
  133. package/dist/.next/.next/static/chunks/803-a2fcfbd00e6b3b38.js +1 -0
  134. package/dist/.next/.next/static/chunks/{92-5f7522943fcb72a8.js → 92-a84bdac2be7c8d7a.js} +1 -1
  135. package/dist/.next/.next/static/chunks/app/api/cloudflare/route-d0c1dc2a9e7dce36.js +1 -0
  136. package/dist/.next/.next/static/chunks/app/api/databases/route-cd322321212797cf.js +1 -0
  137. package/dist/.next/.next/static/chunks/app/api/migrations/list/route-cd710ff75b6bcd02.js +1 -0
  138. package/dist/.next/.next/static/chunks/app/api/migrations/sync/route-ee522f232b9f0a9c.js +1 -0
  139. package/dist/.next/.next/static/chunks/app/api/migrations/sync-files/route-79ee2c26f87d3bc7.js +1 -0
  140. package/dist/.next/.next/static/chunks/app/api/pro/route-c90c1f901fc00d38.js +1 -0
  141. package/dist/.next/.next/static/chunks/app/api/pull-data/confirm/route-118764086af798f8.js +1 -0
  142. package/dist/.next/.next/static/chunks/app/api/pull-remote/confirm/route-2b0ade4ebfcea0bc.js +1 -0
  143. package/dist/.next/.next/static/chunks/app/api/pull-remote/preview/route-342db7ea13e6f447.js +1 -0
  144. package/dist/.next/.next/static/chunks/app/api/push-remote/confirm/route-b778c053bd515abd.js +1 -0
  145. package/dist/.next/.next/static/chunks/app/api/push-remote/preview/route-ab090482f299f57f.js +1 -0
  146. package/dist/.next/.next/static/chunks/app/api/query/route-4d21a8b1d34491f1.js +1 -0
  147. package/dist/.next/.next/static/chunks/app/api/schema/route-cb17a387d6b557ad.js +1 -0
  148. package/dist/.next/.next/static/chunks/app/api/tables/[name]/import/route-510472de7a5c29bd.js +1 -0
  149. package/dist/.next/.next/static/chunks/app/api/tables/[name]/route-6a1fa95c303ce0de.js +1 -0
  150. package/dist/.next/.next/static/chunks/app/api/tables/route-daa975df4ea8e8f8.js +1 -0
  151. package/dist/.next/.next/static/chunks/app/api/time-travel/preview/route-5787d7e8f17bd539.js +1 -0
  152. package/dist/.next/.next/static/chunks/app/api/time-travel/restore/route-84b64a27e831e21c.js +1 -0
  153. package/dist/.next/.next/static/chunks/app/api/update/route-54ee900537982652.js +1 -0
  154. package/dist/.next/.next/static/chunks/app/{layout-40ec07d04681ba81.js → layout-f0ec4d636ee0f763.js} +1 -1
  155. package/dist/.next/.next/static/chunks/app/page-358bf2112802ff85.js +1 -0
  156. package/dist/.next/.next/static/chunks/app/page-3ec9d72ecb052d39.js +1 -0
  157. package/dist/.next/.next/static/chunks/webpack-024900a94af4f0a7.js +1 -0
  158. package/dist/.next/.next/static/css/2c165a0ede9b2442.css +3 -0
  159. package/dist/.next/.next/static/css/32df9a4d493f8b0f.css +31 -0
  160. package/dist/.next/.next/static/f_PVCmmSeM5SwW3M1tw7Q/_buildManifest.js +1 -0
  161. package/dist/.next/.next/static/fiesjBWbrmSSyLf4biwrX/_buildManifest.js +1 -0
  162. package/dist/.next/.next/static/ft39e6W6vSgUL7peRo7pE/_buildManifest.js +1 -0
  163. package/dist/.next/.next/static/media/4cf2300e9c8272f7-s.p.woff2 +0 -0
  164. package/dist/.next/.next/static/u7ssdTycF4iQ-w-pQZhxg/_buildManifest.js +1 -0
  165. package/dist/.next/.next/static/v-i2YsOGT890zutOSiqqK/_buildManifest.js +1 -0
  166. package/dist/.next/.next/trace +3 -3
  167. package/dist/.next/.next/types/app/api/migrations/list/route.ts +347 -0
  168. package/dist/.next/.next/types/app/api/pro/route.ts +347 -0
  169. package/dist/.next/.next/types/app/api/schema/route.ts +347 -0
  170. package/dist/.next/.next/types/app/api/tables/[name]/import/route.ts +347 -0
  171. package/dist/.next/.next/types/app/api/time-travel/preview/route.ts +347 -0
  172. package/dist/.next/.next/types/app/api/time-travel/restore/route.ts +347 -0
  173. package/dist/.next/BUILD_ID +1 -1
  174. package/dist/.next/app-build-manifest.json +122 -80
  175. package/dist/.next/app-path-routes-manifest.json +1 -1
  176. package/dist/.next/build-manifest.json +7 -7
  177. package/dist/.next/cache/.rscinfo +1 -1
  178. package/dist/.next/cache/.tsbuildinfo +1 -1
  179. package/dist/.next/cache/webpack/client-production/0.pack +0 -0
  180. package/dist/.next/cache/webpack/client-production/index.pack +0 -0
  181. package/dist/.next/cache/webpack/edge-server-production/index.pack +0 -0
  182. package/dist/.next/cache/webpack/server-production/0.pack +0 -0
  183. package/dist/.next/cache/webpack/server-production/index.pack +0 -0
  184. package/dist/.next/next-minimal-server.js.nft.json +1 -1
  185. package/dist/.next/next-server.js.nft.json +1 -1
  186. package/dist/.next/prerender-manifest.json +1 -1
  187. package/dist/.next/react-loadable-manifest.json +11 -1
  188. package/dist/.next/required-server-files.json +1 -1
  189. package/dist/.next/routes-manifest.json +1 -1
  190. package/dist/.next/server/app/_not-found/page.js +1 -1
  191. package/dist/.next/server/app/_not-found/page.js.nft.json +1 -1
  192. package/dist/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  193. package/dist/.next/server/app/_not-found.html +1 -1
  194. package/dist/.next/server/app/_not-found.rsc +5 -5
  195. package/dist/.next/server/app/api/cloudflare/route.js +1 -1
  196. package/dist/.next/server/app/api/cloudflare/route.js.nft.json +1 -1
  197. package/dist/.next/server/app/api/cloudflare/route_client-reference-manifest.js +1 -1
  198. package/dist/.next/server/app/api/databases/route.js +1 -1
  199. package/dist/.next/server/app/api/databases/route.js.nft.json +1 -1
  200. package/dist/.next/server/app/api/databases/route_client-reference-manifest.js +1 -1
  201. package/dist/.next/server/app/api/migrations/list/route.js +26 -0
  202. package/dist/.next/server/app/api/migrations/list/route.js.nft.json +1 -0
  203. package/dist/.next/server/app/api/migrations/list/route_client-reference-manifest.js +1 -0
  204. package/dist/.next/server/app/api/migrations/sync/route.js +5 -5
  205. package/dist/.next/server/app/api/migrations/sync/route.js.nft.json +1 -1
  206. package/dist/.next/server/app/api/migrations/sync/route_client-reference-manifest.js +1 -1
  207. package/dist/.next/server/app/api/migrations/sync-files/route.js +4 -4
  208. package/dist/.next/server/app/api/migrations/sync-files/route.js.nft.json +1 -1
  209. package/dist/.next/server/app/api/migrations/sync-files/route_client-reference-manifest.js +1 -1
  210. package/dist/.next/server/app/api/pro/route.js +1 -0
  211. package/dist/.next/server/app/api/pro/route.js.nft.json +1 -0
  212. package/dist/.next/server/app/api/pro/route_client-reference-manifest.js +1 -0
  213. package/dist/.next/server/app/api/pull-data/confirm/route.js +1 -1
  214. package/dist/.next/server/app/api/pull-data/confirm/route.js.nft.json +1 -1
  215. package/dist/.next/server/app/api/pull-data/confirm/route_client-reference-manifest.js +1 -1
  216. package/dist/.next/server/app/api/pull-remote/confirm/route.js +4 -4
  217. package/dist/.next/server/app/api/pull-remote/confirm/route.js.nft.json +1 -1
  218. package/dist/.next/server/app/api/pull-remote/confirm/route_client-reference-manifest.js +1 -1
  219. package/dist/.next/server/app/api/pull-remote/preview/route.js +4 -4
  220. package/dist/.next/server/app/api/pull-remote/preview/route.js.nft.json +1 -1
  221. package/dist/.next/server/app/api/pull-remote/preview/route_client-reference-manifest.js +1 -1
  222. package/dist/.next/server/app/api/push-remote/confirm/route.js +6 -6
  223. package/dist/.next/server/app/api/push-remote/confirm/route.js.nft.json +1 -1
  224. package/dist/.next/server/app/api/push-remote/confirm/route_client-reference-manifest.js +1 -1
  225. package/dist/.next/server/app/api/push-remote/preview/route.js +6 -6
  226. package/dist/.next/server/app/api/push-remote/preview/route.js.nft.json +1 -1
  227. package/dist/.next/server/app/api/push-remote/preview/route_client-reference-manifest.js +1 -1
  228. package/dist/.next/server/app/api/query/route.js +9 -9
  229. package/dist/.next/server/app/api/query/route.js.nft.json +1 -1
  230. package/dist/.next/server/app/api/query/route_client-reference-manifest.js +1 -1
  231. package/dist/.next/server/app/api/schema/route.js +1 -0
  232. package/dist/.next/server/app/api/schema/route.js.nft.json +1 -0
  233. package/dist/.next/server/app/api/schema/route_client-reference-manifest.js +1 -0
  234. package/dist/.next/server/app/api/tables/[name]/import/route.js +1 -0
  235. package/dist/.next/server/app/api/tables/[name]/import/route.js.nft.json +1 -0
  236. package/dist/.next/server/app/api/tables/[name]/import/route_client-reference-manifest.js +1 -0
  237. package/dist/.next/server/app/api/tables/[name]/route.js +5 -5
  238. package/dist/.next/server/app/api/tables/[name]/route.js.nft.json +1 -1
  239. package/dist/.next/server/app/api/tables/[name]/route_client-reference-manifest.js +1 -1
  240. package/dist/.next/server/app/api/tables/route.js +2 -2
  241. package/dist/.next/server/app/api/tables/route.js.nft.json +1 -1
  242. package/dist/.next/server/app/api/tables/route_client-reference-manifest.js +1 -1
  243. package/dist/.next/server/app/api/time-travel/preview/route.js +1 -0
  244. package/dist/.next/server/app/api/time-travel/preview/route.js.nft.json +1 -0
  245. package/dist/.next/server/app/api/time-travel/preview/route_client-reference-manifest.js +1 -0
  246. package/dist/.next/server/app/api/time-travel/restore/route.js +1 -0
  247. package/dist/.next/server/app/api/time-travel/restore/route.js.nft.json +1 -0
  248. package/dist/.next/server/app/api/time-travel/restore/route_client-reference-manifest.js +1 -0
  249. package/dist/.next/server/app/api/update/route.js +1 -1
  250. package/dist/.next/server/app/api/update/route.js.nft.json +1 -1
  251. package/dist/.next/server/app/api/update/route_client-reference-manifest.js +1 -1
  252. package/dist/.next/server/app/index.html +5 -3
  253. package/dist/.next/server/app/index.rsc +6 -6
  254. package/dist/.next/server/app/page.js +15 -15
  255. package/dist/.next/server/app/page.js.nft.json +1 -1
  256. package/dist/.next/server/app/page_client-reference-manifest.js +1 -1
  257. package/dist/.next/server/app-paths-manifest.json +11 -5
  258. package/dist/.next/server/chunks/226.js +12 -12
  259. package/dist/.next/server/chunks/391.js +1 -1
  260. package/dist/.next/server/chunks/452.js +1 -1
  261. package/dist/.next/server/chunks/487.js +1 -0
  262. package/dist/.next/server/chunks/572.js +1 -1
  263. package/dist/.next/server/chunks/992.js +3 -3
  264. package/dist/.next/server/chunks/{638.js → 994.js} +3 -3
  265. package/dist/.next/server/middleware-build-manifest.js +1 -1
  266. package/dist/.next/server/middleware-react-loadable-manifest.js +1 -1
  267. package/dist/.next/server/next-font-manifest.js +1 -1
  268. package/dist/.next/server/next-font-manifest.json +1 -1
  269. package/dist/.next/server/pages/404.html +1 -1
  270. package/dist/.next/server/pages/500.html +1 -1
  271. package/dist/.next/server/pages-manifest.json +1 -1
  272. package/dist/.next/server/server-reference-manifest.json +1 -1
  273. package/dist/.next/static/chunks/1a258343.3b3e7ba5ba0bd0d2.js +1 -0
  274. package/dist/.next/static/chunks/345.8fc37569d5708622.js +1 -0
  275. package/dist/.next/static/chunks/480-85b6c8ae3f51b156.js +1 -0
  276. package/dist/.next/static/chunks/52.2cdc9bdb75e1fc2e.js +1 -0
  277. package/dist/.next/static/chunks/803-a2fcfbd00e6b3b38.js +1 -0
  278. package/dist/.next/static/chunks/{92-5f7522943fcb72a8.js → 92-a84bdac2be7c8d7a.js} +1 -1
  279. package/dist/.next/static/chunks/app/api/cloudflare/route-d0c1dc2a9e7dce36.js +1 -0
  280. package/dist/.next/static/chunks/app/api/databases/route-cd322321212797cf.js +1 -0
  281. package/dist/.next/static/chunks/app/api/migrations/list/route-cd710ff75b6bcd02.js +1 -0
  282. package/dist/.next/static/chunks/app/api/migrations/sync/route-ee522f232b9f0a9c.js +1 -0
  283. package/dist/.next/static/chunks/app/api/migrations/sync-files/route-79ee2c26f87d3bc7.js +1 -0
  284. package/dist/.next/static/chunks/app/api/pro/route-c90c1f901fc00d38.js +1 -0
  285. package/dist/.next/static/chunks/app/api/pull-data/confirm/route-118764086af798f8.js +1 -0
  286. package/dist/.next/static/chunks/app/api/pull-remote/confirm/route-2b0ade4ebfcea0bc.js +1 -0
  287. package/dist/.next/static/chunks/app/api/pull-remote/preview/route-342db7ea13e6f447.js +1 -0
  288. package/dist/.next/static/chunks/app/api/push-remote/confirm/route-b778c053bd515abd.js +1 -0
  289. package/dist/.next/static/chunks/app/api/push-remote/preview/route-ab090482f299f57f.js +1 -0
  290. package/dist/.next/static/chunks/app/api/query/route-4d21a8b1d34491f1.js +1 -0
  291. package/dist/.next/static/chunks/app/api/schema/route-cb17a387d6b557ad.js +1 -0
  292. package/dist/.next/static/chunks/app/api/tables/[name]/import/route-510472de7a5c29bd.js +1 -0
  293. package/dist/.next/static/chunks/app/api/tables/[name]/route-6a1fa95c303ce0de.js +1 -0
  294. package/dist/.next/static/chunks/app/api/tables/route-daa975df4ea8e8f8.js +1 -0
  295. package/dist/.next/static/chunks/app/api/time-travel/preview/route-5787d7e8f17bd539.js +1 -0
  296. package/dist/.next/static/chunks/app/api/time-travel/restore/route-84b64a27e831e21c.js +1 -0
  297. package/dist/.next/static/chunks/app/api/update/route-54ee900537982652.js +1 -0
  298. package/dist/.next/static/chunks/app/{layout-40ec07d04681ba81.js → layout-f0ec4d636ee0f763.js} +1 -1
  299. package/dist/.next/static/chunks/app/page-358bf2112802ff85.js +1 -0
  300. package/dist/.next/static/chunks/webpack-024900a94af4f0a7.js +1 -0
  301. package/dist/.next/static/css/2c165a0ede9b2442.css +3 -0
  302. package/dist/.next/static/css/32df9a4d493f8b0f.css +31 -0
  303. package/dist/.next/static/media/4cf2300e9c8272f7-s.p.woff2 +0 -0
  304. package/dist/.next/static/zh4Fz2tbm8GRka4woRrGp/_buildManifest.js +1 -0
  305. package/dist/.next/static/zh4Fz2tbm8GRka4woRrGp/_ssgManifest.js +1 -0
  306. package/dist/.next/trace +18 -3
  307. package/dist/.next/types/app/api/migrations/list/route.ts +347 -0
  308. package/dist/.next/types/app/api/pro/route.ts +347 -0
  309. package/dist/.next/types/app/api/schema/route.ts +347 -0
  310. package/dist/.next/types/app/api/tables/[name]/import/route.ts +347 -0
  311. package/dist/.next/types/app/api/time-travel/preview/route.ts +347 -0
  312. package/dist/.next/types/app/api/time-travel/restore/route.ts +347 -0
  313. package/dist/app/api/databases/route.js +2 -1
  314. package/dist/app/api/migrations/list/route.js +137 -0
  315. package/dist/app/api/migrations/sync-files/route.js +2 -1
  316. package/dist/app/api/pro/route.js +7 -0
  317. package/dist/app/api/pull-remote/confirm/route.js +138 -146
  318. package/dist/app/api/pull-remote/preview/route.js +49 -84
  319. package/dist/app/api/push-remote/confirm/route.js +31 -12
  320. package/dist/app/api/push-remote/preview/route.js +27 -12
  321. package/dist/app/api/query/route.js +24 -13
  322. package/dist/app/api/schema/route.js +63 -0
  323. package/dist/app/api/tables/[name]/import/route.js +112 -0
  324. package/dist/app/api/tables/[name]/route.js +38 -29
  325. package/dist/app/api/tables/route.js +29 -16
  326. package/dist/app/api/time-travel/preview/route.js +122 -0
  327. package/dist/app/api/time-travel/restore/route.js +106 -0
  328. package/dist/app/page.jsx +26 -8
  329. package/dist/d1-studio.js +129 -23
  330. package/dist/lib/license.js +99 -71
  331. package/dist/lib/local-db.js +223 -0
  332. package/dist/lib/migrations.js +40 -2
  333. package/dist/lib/parse-sql-error.js +99 -160
  334. package/dist/lib/sql-operations.js +28 -10
  335. package/dist/lib/telemetry.js +39 -0
  336. package/package.json +6 -2
  337. package/dist/.next/.next/static/FEsQ9jwPUQv5A3fwg6Opl/_buildManifest.js +0 -1
  338. package/dist/.next/.next/static/Y9mYu4WBghepP5oT_3OdR/_buildManifest.js +0 -1
  339. package/dist/.next/.next/static/ae3gNmoSGm-R5LJC4UagI/_buildManifest.js +0 -1
  340. package/dist/.next/.next/static/bKfUJeuvAQlBmR3TjrfkH/_buildManifest.js +0 -1
  341. package/dist/.next/.next/static/chunks/576-18a2209e1ed26aad.js +0 -1
  342. package/dist/.next/.next/static/chunks/735-b885dfec6353171d.js +0 -1
  343. package/dist/.next/.next/static/chunks/app/api/cloudflare/route-b77846f372b01f38.js +0 -1
  344. package/dist/.next/.next/static/chunks/app/api/databases/route-407794f8145d9a0b.js +0 -1
  345. package/dist/.next/.next/static/chunks/app/api/migrations/sync/route-9f480f5590369a8f.js +0 -1
  346. package/dist/.next/.next/static/chunks/app/api/migrations/sync-files/route-92010db279b4dd8e.js +0 -1
  347. package/dist/.next/.next/static/chunks/app/api/pull-data/confirm/route-a02fe6d3cdd0a535.js +0 -1
  348. package/dist/.next/.next/static/chunks/app/api/pull-remote/confirm/route-f401a03507d1da50.js +0 -1
  349. package/dist/.next/.next/static/chunks/app/api/pull-remote/preview/route-3c53814b5cb8b6b0.js +0 -1
  350. package/dist/.next/.next/static/chunks/app/api/push-remote/confirm/route-8f359249e907c63b.js +0 -1
  351. package/dist/.next/.next/static/chunks/app/api/push-remote/preview/route-b51bf94f39c17a9d.js +0 -1
  352. package/dist/.next/.next/static/chunks/app/api/query/route-87bae2d4aebaf859.js +0 -1
  353. package/dist/.next/.next/static/chunks/app/api/tables/[name]/route-d20ca163b9c03e7c.js +0 -1
  354. package/dist/.next/.next/static/chunks/app/api/tables/route-0f46f911562abcdf.js +0 -1
  355. package/dist/.next/.next/static/chunks/app/api/update/route-14edc1917760bce0.js +0 -1
  356. package/dist/.next/.next/static/chunks/app/page-f05cd0fc436bf9bc.js +0 -1
  357. package/dist/.next/.next/static/chunks/app/page-f2bc307c0d8acdaa.js +0 -1
  358. package/dist/.next/.next/static/chunks/webpack-c76ac1e586b2802a.js +0 -1
  359. package/dist/.next/.next/static/css/7c16f57d325d0d7d.css +0 -3
  360. package/dist/.next/.next/static/ejYPqJ2kVicVp5EFWOZIC/_buildManifest.js +0 -1
  361. package/dist/.next/.next/static/gABGrAoO8IPArDo_Ns_7g/_buildManifest.js +0 -1
  362. package/dist/.next/.next/static/gh-QfIUVo4FTTduYCVKT6/_buildManifest.js +0 -1
  363. package/dist/.next/.next/static/media/569ce4b8f30dc480-s.p.woff2 +0 -0
  364. package/dist/.next/.next/static/thaCy2qVeNqYYhdayr13C/_buildManifest.js +0 -1
  365. package/dist/.next/.next/static/ybCx6L6gHqtODbKmlhU-d/_buildManifest.js +0 -1
  366. package/dist/.next/cache/webpack/client-production/1.pack +0 -0
  367. package/dist/.next/cache/webpack/client-production/2.pack +0 -0
  368. package/dist/.next/cache/webpack/client-production/index.pack.old +0 -0
  369. package/dist/.next/static/IX-QLbm7scYnyqWeeimal/_buildManifest.js +0 -1
  370. package/dist/.next/static/chunks/576-18a2209e1ed26aad.js +0 -1
  371. package/dist/.next/static/chunks/735-b885dfec6353171d.js +0 -1
  372. package/dist/.next/static/chunks/app/api/cloudflare/route-b77846f372b01f38.js +0 -1
  373. package/dist/.next/static/chunks/app/api/databases/route-407794f8145d9a0b.js +0 -1
  374. package/dist/.next/static/chunks/app/api/migrations/sync/route-9f480f5590369a8f.js +0 -1
  375. package/dist/.next/static/chunks/app/api/migrations/sync-files/route-92010db279b4dd8e.js +0 -1
  376. package/dist/.next/static/chunks/app/api/pull-data/confirm/route-a02fe6d3cdd0a535.js +0 -1
  377. package/dist/.next/static/chunks/app/api/pull-remote/confirm/route-f401a03507d1da50.js +0 -1
  378. package/dist/.next/static/chunks/app/api/pull-remote/preview/route-3c53814b5cb8b6b0.js +0 -1
  379. package/dist/.next/static/chunks/app/api/push-remote/confirm/route-8f359249e907c63b.js +0 -1
  380. package/dist/.next/static/chunks/app/api/push-remote/preview/route-b51bf94f39c17a9d.js +0 -1
  381. package/dist/.next/static/chunks/app/api/query/route-87bae2d4aebaf859.js +0 -1
  382. package/dist/.next/static/chunks/app/api/tables/[name]/route-d20ca163b9c03e7c.js +0 -1
  383. package/dist/.next/static/chunks/app/api/tables/route-0f46f911562abcdf.js +0 -1
  384. package/dist/.next/static/chunks/app/api/update/route-14edc1917760bce0.js +0 -1
  385. package/dist/.next/static/chunks/app/page-f05cd0fc436bf9bc.js +0 -1
  386. package/dist/.next/static/chunks/webpack-c76ac1e586b2802a.js +0 -1
  387. package/dist/.next/static/css/7c16f57d325d0d7d.css +0 -3
  388. package/dist/.next/static/media/569ce4b8f30dc480-s.p.woff2 +0 -0
  389. /package/dist/.next/.next/static/{FEsQ9jwPUQv5A3fwg6Opl → -OO4tE7EKr8o62Bne-ODo}/_ssgManifest.js +0 -0
  390. /package/dist/.next/.next/static/{Y9mYu4WBghepP5oT_3OdR → 3kAeIJC56X7aw1Fk5_OXO}/_ssgManifest.js +0 -0
  391. /package/dist/.next/.next/static/{ae3gNmoSGm-R5LJC4UagI → J8r9W6xxmYYvuKehItNuW}/_ssgManifest.js +0 -0
  392. /package/dist/.next/.next/static/{bKfUJeuvAQlBmR3TjrfkH → ZmKZbpam0G_d3SphfZPJ7}/_ssgManifest.js +0 -0
  393. /package/dist/.next/.next/static/{ejYPqJ2kVicVp5EFWOZIC → arc9h7hbaQzL1Dl0iuVrT}/_ssgManifest.js +0 -0
  394. /package/dist/.next/.next/static/chunks/{4bd1b696-8c908eb707f85a27.js → 4bd1b696-124ea104c06f6cea.js} +0 -0
  395. /package/dist/.next/.next/static/chunks/{517-3b698a5d3da06ff7.js → 517-c876ce2f00030cd0.js} +0 -0
  396. /package/dist/.next/.next/static/chunks/{692-ede418e1d28a1394.js → 692-9e59d546afd11ec3.js} +0 -0
  397. /package/dist/.next/.next/static/chunks/app/_not-found/{page-b786c3dd79ad15a5.js → page-3e24b81707d98126.js} +0 -0
  398. /package/dist/.next/.next/static/{gABGrAoO8IPArDo_Ns_7g → f_PVCmmSeM5SwW3M1tw7Q}/_ssgManifest.js +0 -0
  399. /package/dist/.next/.next/static/{gh-QfIUVo4FTTduYCVKT6 → fiesjBWbrmSSyLf4biwrX}/_ssgManifest.js +0 -0
  400. /package/dist/.next/.next/static/{thaCy2qVeNqYYhdayr13C → ft39e6W6vSgUL7peRo7pE}/_ssgManifest.js +0 -0
  401. /package/dist/.next/.next/static/{ybCx6L6gHqtODbKmlhU-d → u7ssdTycF4iQ-w-pQZhxg}/_ssgManifest.js +0 -0
  402. /package/dist/.next/{static/IX-QLbm7scYnyqWeeimal → .next/static/v-i2YsOGT890zutOSiqqK}/_ssgManifest.js +0 -0
  403. /package/dist/.next/static/chunks/{4bd1b696-8c908eb707f85a27.js → 4bd1b696-124ea104c06f6cea.js} +0 -0
  404. /package/dist/.next/static/chunks/{517-3b698a5d3da06ff7.js → 517-c876ce2f00030cd0.js} +0 -0
  405. /package/dist/.next/static/chunks/{692-ede418e1d28a1394.js → 692-9e59d546afd11ec3.js} +0 -0
  406. /package/dist/.next/static/chunks/app/_not-found/{page-b786c3dd79ad15a5.js → page-3e24b81707d98126.js} +0 -0
@@ -1 +1 @@
1
- {"version":1,"files":["../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js","../../../node_modules/next/dist/server/app-render/action-async-storage-instance.js","../../../node_modules/next/dist/server/app-render/action-async-storage.external.js","../../../node_modules/next/dist/server/app-render/after-task-async-storage-instance.js","../../../node_modules/next/dist/server/app-render/after-task-async-storage.external.js","../../../node_modules/next/dist/server/app-render/async-local-storage.js","../../../node_modules/next/dist/server/app-render/clean-async-snapshot-instance.js","../../../node_modules/next/dist/server/app-render/clean-async-snapshot.external.js","../../../node_modules/next/dist/server/app-render/work-async-storage-instance.js","../../../node_modules/next/dist/server/app-render/work-async-storage.external.js","../../../node_modules/next/dist/server/app-render/work-unit-async-storage-instance.js","../../../node_modules/next/dist/server/app-render/work-unit-async-storage.external.js","../../../node_modules/next/dist/server/lib/trace/constants.js","../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../node_modules/next/package.json","../../package.json","../chunks/572.js","../chunks/638.js","../chunks/992.js","../webpack-runtime.js","page_client-reference-manifest.js"]}
1
+ {"version":1,"files":["../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js","../../../node_modules/next/dist/server/app-render/action-async-storage-instance.js","../../../node_modules/next/dist/server/app-render/action-async-storage.external.js","../../../node_modules/next/dist/server/app-render/after-task-async-storage-instance.js","../../../node_modules/next/dist/server/app-render/after-task-async-storage.external.js","../../../node_modules/next/dist/server/app-render/async-local-storage.js","../../../node_modules/next/dist/server/app-render/clean-async-snapshot-instance.js","../../../node_modules/next/dist/server/app-render/clean-async-snapshot.external.js","../../../node_modules/next/dist/server/app-render/work-async-storage-instance.js","../../../node_modules/next/dist/server/app-render/work-async-storage.external.js","../../../node_modules/next/dist/server/app-render/work-unit-async-storage-instance.js","../../../node_modules/next/dist/server/app-render/work-unit-async-storage.external.js","../../../node_modules/next/dist/server/lib/trace/constants.js","../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../node_modules/next/package.json","../../package.json","../chunks/572.js","../chunks/992.js","../chunks/994.js","../webpack-runtime.js","page_client-reference-manifest.js"]}
@@ -1 +1 @@
1
- globalThis.__RSC_MANIFEST=(globalThis.__RSC_MANIFEST||{});globalThis.__RSC_MANIFEST["/page"]={"moduleLoading":{"prefix":"/_next/","crossOrigin":null},"ssrModuleMapping":{"33":{"*":{"id":"2899","name":"*","chunks":[],"async":false}},"2328":{"*":{"id":"7174","name":"*","chunks":[],"async":false}},"2624":{"*":{"id":"4535","name":"*","chunks":[],"async":false}},"3866":{"*":{"id":"7190","name":"*","chunks":[],"async":false}},"4547":{"*":{"id":"3875","name":"*","chunks":[],"async":false}},"4835":{"*":{"id":"8903","name":"*","chunks":[],"async":false}},"5244":{"*":{"id":"4178","name":"*","chunks":[],"async":false}},"6124":{"*":{"id":"2652","name":"*","chunks":[],"async":false}},"6213":{"*":{"id":"1365","name":"*","chunks":[],"async":false}},"7033":{"*":{"id":"6959","name":"*","chunks":[],"async":false}}},"edgeSSRModuleMapping":{},"clientModules":{"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/client/components/client-page.js":{"id":7033,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/esm/client/components/client-page.js":{"id":7033,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/client/components/client-segment.js":{"id":4547,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/esm/client/components/client-segment.js":{"id":4547,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/client/components/error-boundary.js":{"id":4835,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/esm/client/components/error-boundary.js":{"id":4835,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/client/components/http-access-fallback/error-boundary.js":{"id":2328,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/esm/client/components/http-access-fallback/error-boundary.js":{"id":2328,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/client/components/layout-router.js":{"id":5244,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/esm/client/components/layout-router.js":{"id":5244,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/client/components/render-from-template-context.js":{"id":3866,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/esm/client/components/render-from-template-context.js":{"id":3866,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/lib/metadata/metadata-boundary.js":{"id":6213,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/esm/lib/metadata/metadata-boundary.js":{"id":6213,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/font/google/target.css?{\"path\":\"src/app/layout.jsx\",\"import\":\"Geist\",\"arguments\":[{\"variable\":\"--font-geist-sans\",\"subsets\":[\"latin\"]}],\"variableName\":\"geistSans\"}":{"id":5613,"name":"*","chunks":["692","static/chunks/692-ede418e1d28a1394.js","92","static/chunks/92-5f7522943fcb72a8.js","735","static/chunks/735-b885dfec6353171d.js","177","static/chunks/app/layout-40ec07d04681ba81.js"],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/font/google/target.css?{\"path\":\"src/app/layout.jsx\",\"import\":\"Geist_Mono\",\"arguments\":[{\"variable\":\"--font-geist-mono\",\"subsets\":[\"latin\"]}],\"variableName\":\"geistMono\"}":{"id":7207,"name":"*","chunks":["692","static/chunks/692-ede418e1d28a1394.js","92","static/chunks/92-5f7522943fcb72a8.js","735","static/chunks/735-b885dfec6353171d.js","177","static/chunks/app/layout-40ec07d04681ba81.js"],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/src/app/globals.css":{"id":347,"name":"*","chunks":["692","static/chunks/692-ede418e1d28a1394.js","92","static/chunks/92-5f7522943fcb72a8.js","735","static/chunks/735-b885dfec6353171d.js","177","static/chunks/app/layout-40ec07d04681ba81.js"],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/src/components/ui/toaster.jsx":{"id":6124,"name":"*","chunks":["692","static/chunks/692-ede418e1d28a1394.js","92","static/chunks/92-5f7522943fcb72a8.js","735","static/chunks/735-b885dfec6353171d.js","177","static/chunks/app/layout-40ec07d04681ba81.js"],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/src/context/database-context.js":{"id":33,"name":"*","chunks":["692","static/chunks/692-ede418e1d28a1394.js","92","static/chunks/92-5f7522943fcb72a8.js","735","static/chunks/735-b885dfec6353171d.js","177","static/chunks/app/layout-40ec07d04681ba81.js"],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/src/app/page.jsx":{"id":2624,"name":"*","chunks":["692","static/chunks/692-ede418e1d28a1394.js","576","static/chunks/576-18a2209e1ed26aad.js","735","static/chunks/735-b885dfec6353171d.js","974","static/chunks/app/page-f2bc307c0d8acdaa.js"],"async":false}},"entryCSSFiles":{"/Volumes/ProjectSpace/_wip/d1studio/src/":[],"/Volumes/ProjectSpace/_wip/d1studio/src/app/layout":[{"inlined":false,"path":"static/css/7c16f57d325d0d7d.css"}],"/Volumes/ProjectSpace/_wip/d1studio/src/app/page":[]},"rscModuleMapping":{"33":{"*":{"id":"1831","name":"*","chunks":[],"async":false}},"347":{"*":{"id":"1135","name":"*","chunks":[],"async":false}},"2328":{"*":{"id":"802","name":"*","chunks":[],"async":false}},"2624":{"*":{"id":"8868","name":"*","chunks":[],"async":false}},"3866":{"*":{"id":"8530","name":"*","chunks":[],"async":false}},"4547":{"*":{"id":"4863","name":"*","chunks":[],"async":false}},"4835":{"*":{"id":"5155","name":"*","chunks":[],"async":false}},"5244":{"*":{"id":"9350","name":"*","chunks":[],"async":false}},"6124":{"*":{"id":"3164","name":"*","chunks":[],"async":false}},"6213":{"*":{"id":"8921","name":"*","chunks":[],"async":false}},"7033":{"*":{"id":"3219","name":"*","chunks":[],"async":false}}},"edgeRscModuleMapping":{}}
1
+ globalThis.__RSC_MANIFEST=(globalThis.__RSC_MANIFEST||{});globalThis.__RSC_MANIFEST["/page"]={"moduleLoading":{"prefix":"/_next/","crossOrigin":null},"ssrModuleMapping":{"33":{"*":{"id":"2899","name":"*","chunks":[],"async":false}},"2328":{"*":{"id":"7174","name":"*","chunks":[],"async":false}},"3866":{"*":{"id":"7190","name":"*","chunks":[],"async":false}},"4547":{"*":{"id":"3875","name":"*","chunks":[],"async":false}},"4835":{"*":{"id":"8903","name":"*","chunks":[],"async":false}},"5244":{"*":{"id":"4178","name":"*","chunks":[],"async":false}},"6124":{"*":{"id":"2652","name":"*","chunks":[],"async":false}},"6213":{"*":{"id":"1365","name":"*","chunks":[],"async":false}},"6311":{"*":{"id":"7098","name":"*","chunks":[],"async":false}},"7033":{"*":{"id":"6959","name":"*","chunks":[],"async":false}}},"edgeSSRModuleMapping":{},"clientModules":{"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/client/components/client-page.js":{"id":7033,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/esm/client/components/client-page.js":{"id":7033,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/client/components/client-segment.js":{"id":4547,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/esm/client/components/client-segment.js":{"id":4547,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/client/components/error-boundary.js":{"id":4835,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/esm/client/components/error-boundary.js":{"id":4835,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/client/components/http-access-fallback/error-boundary.js":{"id":2328,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/esm/client/components/http-access-fallback/error-boundary.js":{"id":2328,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/client/components/layout-router.js":{"id":5244,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/esm/client/components/layout-router.js":{"id":5244,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/client/components/render-from-template-context.js":{"id":3866,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/esm/client/components/render-from-template-context.js":{"id":3866,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/lib/metadata/metadata-boundary.js":{"id":6213,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/dist/esm/lib/metadata/metadata-boundary.js":{"id":6213,"name":"*","chunks":[],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/font/google/target.css?{\"path\":\"src/app/layout.jsx\",\"import\":\"Geist\",\"arguments\":[{\"variable\":\"--font-geist-sans\",\"subsets\":[\"latin\"]}],\"variableName\":\"geistSans\"}":{"id":5613,"name":"*","chunks":["692","static/chunks/692-9e59d546afd11ec3.js","92","static/chunks/92-a84bdac2be7c8d7a.js","480","static/chunks/480-85b6c8ae3f51b156.js","177","static/chunks/app/layout-f0ec4d636ee0f763.js"],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/node_modules/next/font/google/target.css?{\"path\":\"src/app/layout.jsx\",\"import\":\"Geist_Mono\",\"arguments\":[{\"variable\":\"--font-geist-mono\",\"subsets\":[\"latin\"]}],\"variableName\":\"geistMono\"}":{"id":7207,"name":"*","chunks":["692","static/chunks/692-9e59d546afd11ec3.js","92","static/chunks/92-a84bdac2be7c8d7a.js","480","static/chunks/480-85b6c8ae3f51b156.js","177","static/chunks/app/layout-f0ec4d636ee0f763.js"],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/src/app/globals.css":{"id":347,"name":"*","chunks":["692","static/chunks/692-9e59d546afd11ec3.js","92","static/chunks/92-a84bdac2be7c8d7a.js","480","static/chunks/480-85b6c8ae3f51b156.js","177","static/chunks/app/layout-f0ec4d636ee0f763.js"],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/src/components/ui/toaster.jsx":{"id":6124,"name":"*","chunks":["692","static/chunks/692-9e59d546afd11ec3.js","92","static/chunks/92-a84bdac2be7c8d7a.js","480","static/chunks/480-85b6c8ae3f51b156.js","177","static/chunks/app/layout-f0ec4d636ee0f763.js"],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/src/context/database-context.js":{"id":33,"name":"*","chunks":["692","static/chunks/692-9e59d546afd11ec3.js","92","static/chunks/92-a84bdac2be7c8d7a.js","480","static/chunks/480-85b6c8ae3f51b156.js","177","static/chunks/app/layout-f0ec4d636ee0f763.js"],"async":false},"/Volumes/ProjectSpace/_wip/d1studio/src/app/page.jsx":{"id":6311,"name":"*","chunks":["692","static/chunks/692-9e59d546afd11ec3.js","803","static/chunks/803-a2fcfbd00e6b3b38.js","480","static/chunks/480-85b6c8ae3f51b156.js","974","static/chunks/app/page-3ec9d72ecb052d39.js"],"async":false}},"entryCSSFiles":{"/Volumes/ProjectSpace/_wip/d1studio/src/":[],"/Volumes/ProjectSpace/_wip/d1studio/src/app/layout":[{"inlined":false,"path":"static/css/2c165a0ede9b2442.css"}],"/Volumes/ProjectSpace/_wip/d1studio/src/app/page":[]},"rscModuleMapping":{"33":{"*":{"id":"1831","name":"*","chunks":[],"async":false}},"347":{"*":{"id":"1135","name":"*","chunks":[],"async":false}},"2328":{"*":{"id":"802","name":"*","chunks":[],"async":false}},"3866":{"*":{"id":"8530","name":"*","chunks":[],"async":false}},"4547":{"*":{"id":"4863","name":"*","chunks":[],"async":false}},"4835":{"*":{"id":"5155","name":"*","chunks":[],"async":false}},"5244":{"*":{"id":"9350","name":"*","chunks":[],"async":false}},"6124":{"*":{"id":"3164","name":"*","chunks":[],"async":false}},"6213":{"*":{"id":"8921","name":"*","chunks":[],"async":false}},"6311":{"*":{"id":"8868","name":"*","chunks":[],"async":false}},"7033":{"*":{"id":"3219","name":"*","chunks":[],"async":false}}},"edgeRscModuleMapping":{}}
@@ -2,16 +2,22 @@
2
2
  "/_not-found/page": "app/_not-found/page.js",
3
3
  "/api/cloudflare/route": "app/api/cloudflare/route.js",
4
4
  "/api/databases/route": "app/api/databases/route.js",
5
+ "/api/migrations/list/route": "app/api/migrations/list/route.js",
5
6
  "/api/migrations/sync-files/route": "app/api/migrations/sync-files/route.js",
6
7
  "/api/migrations/sync/route": "app/api/migrations/sync/route.js",
8
+ "/api/pro/route": "app/api/pro/route.js",
7
9
  "/api/pull-data/confirm/route": "app/api/pull-data/confirm/route.js",
8
- "/api/pull-remote/confirm/route": "app/api/pull-remote/confirm/route.js",
9
- "/api/pull-remote/preview/route": "app/api/pull-remote/preview/route.js",
10
10
  "/api/push-remote/confirm/route": "app/api/push-remote/confirm/route.js",
11
11
  "/api/push-remote/preview/route": "app/api/push-remote/preview/route.js",
12
+ "/api/pull-remote/preview/route": "app/api/pull-remote/preview/route.js",
12
13
  "/api/query/route": "app/api/query/route.js",
14
+ "/api/schema/route": "app/api/schema/route.js",
15
+ "/api/tables/[name]/import/route": "app/api/tables/[name]/import/route.js",
13
16
  "/api/tables/route": "app/api/tables/route.js",
17
+ "/api/time-travel/preview/route": "app/api/time-travel/preview/route.js",
18
+ "/api/time-travel/restore/route": "app/api/time-travel/restore/route.js",
14
19
  "/api/update/route": "app/api/update/route.js",
20
+ "/api/pull-remote/confirm/route": "app/api/pull-remote/confirm/route.js",
15
21
  "/api/tables/[name]/route": "app/api/tables/[name]/route.js",
16
22
  "/page": "app/page.js"
17
23
  }
@@ -1,30 +1,30 @@
1
- exports.id=226,exports.ids=[226],exports.modules={6487:()=>{},8335:()=>{},5949:(t,e,r)=>{"use strict";r.d(e,{S:()=>c});var s=r(9748),n=r(3149),a=r(2537),i=r(6789),E=r(1804);let l=null,o=null;async function c(t){try{let e;if(!t||"string"!=typeof t)throw Error("Project path is required and must be a string");if(l&&o===t)return l;let r=null,c=null;for(let e of["wrangler.toml","wrangler.json","wrangler.jsonc"])if(r=await (0,n.dJ)(e,{cwd:t})){c=e;break}if(!r)return E.A.warn(`No Wrangler configuration file found in: ${t}`),null;E.A.info(`Found ${c} at: ${r}`);let u=await (0,s.readFile)(r,"utf-8");return c.endsWith(".toml")?e=(0,a.parse)(u):(c.endsWith(".jsonc")&&(u=(0,i.A)(u)),e=JSON.parse(u)),l={config:e,projectPath:t},o=t,l}catch(t){throw E.A.error(`Error reading Wrangler configuration: ${t.message}`),t}}},1804:(t,e,r)=>{"use strict";r.d(e,{A:()=>u});var s=r(6399);let{combine:n,timestamp:a,printf:i,colorize:E}=s.format,l="true"===process.env.DEBUG,o=i(({level:t,message:e,timestamp:r,...s})=>{let n=`${r} ${t}: ${e}`;return Object.keys(s).length>0&&(n+=` ${JSON.stringify(s)}`),n}),c=s.createLogger({level:l?"debug":"warn",format:n(a({format:"YYYY-MM-DD HH:mm:ss"}),E(),o),transports:[new s.transports.Console({level:l?"debug":"warn",silent:!1})]});c.logRequest=(t,e,r={})=>{c.debug(`Request: ${t} ${e}`,r)},c.logError=(t,e="unknown")=>{c.error(`Error in ${e}: ${t.message}`,{error:t.stack||t.message,source:e})},c.shouldLog=t=>{let e=c.level,r={error:0,warn:1,info:2,debug:3};return r[t]<=r[e]};let u=c},4218:(t,e,r)=>{"use strict";r.d(e,{IC:()=>i,ZX:()=>a});var s=r(9421),n=r(1804);async function a(t,e,r={},i=!1){let E=`
1
+ exports.id=226,exports.ids=[226],exports.modules={6487:()=>{},8335:()=>{},5949:(t,e,r)=>{"use strict";r.d(e,{S:()=>u});var s=r(9748),n=r(3149),i=r(2537),a=r(6789),E=r(1804);let l=null,o=null;async function u(t){try{let e;if(!t||"string"!=typeof t)throw Error("Project path is required and must be a string");if(l&&o===t)return l;let r=null,u=null;for(let e of["wrangler.toml","wrangler.json","wrangler.jsonc"])if(r=await (0,n.dJ)(e,{cwd:t})){u=e;break}if(!r)return E.A.warn(`No Wrangler configuration file found in: ${t}`),null;E.A.info(`Found ${u} at: ${r}`);let c=await (0,s.readFile)(r,"utf-8");return u.endsWith(".toml")?e=(0,i.parse)(c):(u.endsWith(".jsonc")&&(c=(0,a.A)(c)),e=JSON.parse(c)),l={config:e,projectPath:t},o=t,l}catch(t){throw E.A.error(`Error reading Wrangler configuration: ${t.message}`),t}}},1804:(t,e,r)=>{"use strict";r.d(e,{A:()=>c});var s=r(6399);let{combine:n,timestamp:i,printf:a,colorize:E}=s.format,l="true"===process.env.DEBUG,o=a(({level:t,message:e,timestamp:r,...s})=>{let n=`${r} ${t}: ${e}`;return Object.keys(s).length>0&&(n+=` ${JSON.stringify(s)}`),n}),u=s.createLogger({level:l?"debug":"warn",format:n(i({format:"YYYY-MM-DD HH:mm:ss"}),E(),o),transports:[new s.transports.Console({level:l?"debug":"warn",silent:!1})]});u.logRequest=(t,e,r={})=>{u.debug(`Request: ${t} ${e}`,r)},u.logError=(t,e="unknown")=>{u.error(`Error in ${e}: ${t.message}`,{error:t.stack||t.message,source:e})},u.shouldLog=t=>{let e=u.level,r={error:0,warn:1,info:2,debug:3};return r[t]<=r[e]};let c=u},4218:(t,e,r)=>{"use strict";r.d(e,{IC:()=>a,ZX:()=>i});var s=r(9421),n=r(1804);async function i(t,e,r={},a=!1){let E=`
2
2
  SELECT name, type, sql
3
3
  FROM sqlite_master
4
4
  WHERE type IN ('table', 'index', 'trigger')
5
5
  AND name NOT LIKE 'sqlite_%'
6
6
  AND name != 'd1_migrations';
7
- `;try{let n=await (0,s.KK)(t,e,E,r,i),a=JSON.parse(n);return a[0]?.results||[]}catch(t){throw n.A.error("Failed to get current schema:",t),{type:s.wU.EXECUTION_ERROR,message:"Failed to get current schema",details:{error:t.message,suggestions:["Check database permissions"]}}}}function i(t){let e=new Map;return t.filter(t=>"DATA_MODIFICATION"!==t.type).forEach(t=>{let r=(t.name||t.tableName).toLowerCase();if(e.has(r)||e.set(r,new Set),"CREATE_TABLE"===t.type){let s=t.sql.match(/FOREIGN\s+KEY\s*\([^)]+\)\s+REFERENCES\s+(\w+)/gi);s&&s.forEach(t=>{let s=t.match(/REFERENCES\s+(\w+)/i)[1].toLowerCase();e.get(r).add(s)})}}),function(t){let e=[],r=new Set,s=new Set;for(let n of t.keys())r.has(n)||function n(a){if(s.has(a))throw Error(`Circular dependency detected for table: ${a}`);if(!r.has(a)){for(let e of(s.add(a),t.get(a)||new Set)){if(!t.has(e))throw Error(`Missing table dependency: ${e}`);n(e)}s.delete(a),r.add(a),e.push(a)}}(n);return e}(e)}},9421:(t,e,r)=>{"use strict";r.d(e,{By:()=>u,F9:()=>f,Gq:()=>m,KK:()=>I,Pg:()=>l,QQ:()=>c,bp:()=>d,h3:()=>O,mA:()=>N,sP:()=>L,tn:()=>g,wU:()=>o,xk:()=>p,z6:()=>h});var s=r(8354),n=r(9646),a=r(3648),i=r(1804);let E=(0,s.promisify)(n.exec),l={CREATE_TABLE:"CREATE_TABLE",ALTER_TABLE:"ALTER_TABLE",DROP_TABLE:"DROP_TABLE",CREATE_INDEX:"CREATE_INDEX",DROP_INDEX:"DROP_INDEX",DATA_MODIFICATION:"DATA_MODIFICATION"},o={VALIDATION_ERROR:"VALIDATION_ERROR",SYNTAX_ERROR:"SYNTAX_ERROR",EXECUTION_ERROR:"EXECUTION_ERROR",DEPENDENCY_ERROR:"DEPENDENCY_ERROR"};function c(t){return t.type!==l.DATA_MODIFICATION}function u(t){let e=t.trim().replace(/\s+/g," "),r=e.toUpperCase();if(r.startsWith("CREATE TABLE"))return{type:l.CREATE_TABLE,tableName:T(e,"CREATE TABLE"),sql:e,description:"create-table"};if(r.startsWith("ALTER TABLE")){let t=T(e,"ALTER TABLE"),s="";if(r.includes("RENAME")){let t=e.match(/RENAME\s+(?:COLUMN\s+)?([\w$]+)\s+TO\s+([\w$]+)/i);t&&(s=`rename-${t[1]}-to-${t[2]}`)}else if(r.includes("ADD COLUMN")){let t=e.match(/ADD\s+COLUMN\s+([\w$]+)(\s+[\w()]+)?/i);if(t){let e=t[1],r=t[2]?t[2].trim().replace(/\s+/g,"-"):"";s=r?`add-${e}-${r}`:`add-${e}`}}else if(r.includes("DROP COLUMN")){let t=e.match(/DROP\s+COLUMN\s+([\w$]+)/i);t&&(s=`drop-${t[1]}`)}else if(r.includes("MODIFY COLUMN")||r.includes("CHANGE COLUMN")){let t=e.match(/(?:MODIFY|CHANGE)\s+COLUMN\s+([\w$]+)(\s+[\w()]+)?/i);if(t){let e=t[1],r=t[2]?t[2].trim().replace(/\s+/g,"-"):"";s=r?`modify-${e}-to-${r}`:`modify-${e}`}}return{type:l.ALTER_TABLE,tableName:t,sql:e,description:s}}if(r.startsWith("DROP TABLE"))return{type:l.DROP_TABLE,tableName:T(e,"DROP TABLE"),sql:e,description:"drop-table"};if(r.startsWith("CREATE INDEX")||r.startsWith("CREATE UNIQUE INDEX")){let t=R(e),r=e.match(/INDEX\s+(?:IF\s+NOT\s+EXISTS\s+)?([\w$]+)/i),s=r?r[1]:"";return{type:l.CREATE_INDEX,tableName:t,sql:e,description:s}}if(r.startsWith("DROP INDEX")){let t=R(e),r=e.match(/DROP\s+INDEX\s+(?:IF\s+EXISTS\s+)?([\w$]+)/i),s=r?r[1]:"";return{type:l.DROP_INDEX,tableName:t,sql:e,description:s?`drop-index-${s}`:"drop-index"}}return{type:l.DATA_MODIFICATION,sql:e,description:"data-modification"}}function m(t){if(t.type!==l.DATA_MODIFICATION&&!t.tableName)throw{type:o.VALIDATION_ERROR,message:`Invalid SQL statement: unable to determine table name for "${t.type}".`,details:{sql:t.sql}};return t}function T(t,e){let r=t.match(RegExp(`${e}\\s+(?:IF\\s+(?:NOT\\s+)?EXISTS\\s+)?([\\w_]+)`,"i"));return r?r[1]:null}function R(t){let e=t.match(/ON\s+([\w_]+)/i);return e?e[1]:null}async function A(t){let e=t.match(/^\d+_create[-_]table[_-](.+)\.sql$/i);return e||(e=t.match(/^\d+_create[-](.+)-table\.sql$/i))||(e=t.match(/^\d+_alter[-_]table[_-](.+?)(?:[_-].+)?\.sql$/i))||(e=t.match(/^\d+_alter[-](.+?)-table(?:[_-].+)?\.sql$/i))||(e=t.match(/^\d+_create[-_]index[-_](.+)\.sql$/i))?e[1]:null}function d(t){return t.split("\n").filter(t=>!t.trim().startsWith("--")).join("\n").trim()}async function f(t,e,r,s,n=!1){try{(0,a.nZ)(s)}catch(t){return i.A.error("Invalid table name:",s,t.message),!1}let E=`SELECT name FROM sqlite_master WHERE type='table' AND name = '${s.replace(/'/g,"''")}' COLLATE NOCASE;`,l=await I(t,e,E,r,n);try{let t=l.indexOf("[");if(-1!==t){let e=l.substring(t),r=JSON.parse(e);return(r[0]?.results||[]).length>0}return!1}catch(t){return console.error("Error parsing tableExists result:",t),!1}}function N(t){return t.replace(/--.*$/gm,"").replace(/\/\*[\s\S]*?\*\//g,"").trim().split(";").map(t=>t.trim()).filter(t=>t.length>0).map(t=>u(t+";"))}async function I(t,e,r,s={},n=!1){try{let a=r.trim().replace(/\s+/g," "),l=a.toUpperCase();if((l.startsWith("CREATE INDEX")||l.startsWith("CREATE UNIQUE INDEX"))&&!l.includes("IF NOT EXISTS")&&(a=l.startsWith("CREATE UNIQUE INDEX")?a.replace(/CREATE\s+UNIQUE\s+INDEX/i,"CREATE UNIQUE INDEX IF NOT EXISTS"):a.replace(/CREATE\s+INDEX/i,"CREATE INDEX IF NOT EXISTS")),!e||"string"!=typeof e||!/^[a-zA-Z0-9_-]+$/.test(e))throw Error("Invalid database name for security reasons");let o="win32"===process.platform,c=a.replace(/"/g,'\\"').replace(/\$/g,"\\$"),u=`${o?"npx.cmd":"npx"} wrangler d1 execute ${e} ${n?"--remote":"--local"} --command="${c}"`;i.A.shouldLog("debug")&&i.A.debug("Executing command:",u);let m={cwd:t,env:{...process.env,...s},maxBuffer:0xa00000,shell:!0},{stdout:T,stderr:R}=await E(u,m);if(R&&!R.includes("\uD83C\uDF00"))throw Error(R);try{let t=T.indexOf("[");if(-1!==t)return T.substring(t)}catch(t){console.warn("JSON parse warning:",t)}return T}catch(t){throw console.error("SQL Execution error:",t),{type:o.EXECUTION_ERROR,message:"Failed to execute SQL command",details:{command:t.cmd,stderr:t.stderr,stdout:t.stdout,originalError:t.message,suggestions:["Ensure Node.js and Wrangler are installed","Check npx in PATH","Verify the D1 database exists and is configured","Check wrangler.toml configuration"]}}}}async function O(t,e,r,s,n,E="id"){let l=(0,a.nZ)(r),o=(0,a.r0)(E),c=Math.max(1,Math.min(parseInt(n)||50,1e3)),u=`SELECT * FROM ${l} ORDER BY ${o} DESC LIMIT ${c};`;try{let r=await I(t,e,u,s,!0),n=r.indexOf("[");if(-1===n)throw Error(`Unexpected result format: ${r}`);let a=r.substring(n),i=JSON.parse(a);return i[0]?.results||[]}catch(t){throw i.A.error(`Error fetching remote data for table ${r}:`,t),t}}function p(t,e){if(!e||0===e.length)return"";let r=(0,a.nZ)(t),s=Object.keys(e[0]),n=s.map(t=>(0,a.r0)(t)).join(", "),i=e.map(t=>{let e=s.map(e=>{let r=t[e];return null==r?"NULL":`'${String(r).replace(/'/g,"''")}'`}).join(", ");return`(${e})`}).join(", ");return`INSERT INTO ${r} (${n}) VALUES ${i};`}function h(t){let e=t.trim(),r=e.toUpperCase();return r.startsWith("CREATE TABLE")?function(t){let e=t.match(/CREATE\s+TABLE\s+(?:IF\s+NOT\s+EXISTS\s+)?(\w+)\s*\(([\s\S]*)\)/i);if(!e)return t;let[,r,s]=e,n=$(s).map(t=>t.trim()).filter(Boolean);return`CREATE TABLE ${r} (
7
+ `;try{let n=await (0,s.KK)(t,e,E,r,a),i=JSON.parse(n);return i[0]?.results||[]}catch(t){throw n.A.error("Failed to get current schema:",t),{type:s.wU.EXECUTION_ERROR,message:"Failed to get current schema",details:{error:t.message,suggestions:["Check database permissions"]}}}}function a(t){let e=new Map;return t.filter(t=>"DATA_MODIFICATION"!==t.type).forEach(t=>{let r=(t.name||t.tableName).toLowerCase();if(e.has(r)||e.set(r,new Set),"CREATE_TABLE"===t.type){let s=t.sql.match(/FOREIGN\s+KEY\s*\([^)]+\)\s+REFERENCES\s+(\w+)/gi);s&&s.forEach(t=>{let s=t.match(/REFERENCES\s+(\w+)/i)[1].toLowerCase();e.get(r).add(s)})}}),function(t){let e=[],r=new Set,s=new Set;for(let n of t.keys())r.has(n)||function n(i){if(s.has(i))throw Error(`Circular dependency detected for table: ${i}`);if(!r.has(i)){for(let e of(s.add(i),t.get(i)||new Set)){if(!t.has(e))throw Error(`Missing table dependency: ${e}`);n(e)}s.delete(i),r.add(i),e.push(i)}}(n);return e}(e)}},9421:(t,e,r)=>{"use strict";r.d(e,{By:()=>c,F9:()=>d,Gq:()=>T,KK:()=>I,Pg:()=>l,QQ:()=>u,bp:()=>m,h3:()=>N,mA:()=>f,tn:()=>h,wU:()=>o,xk:()=>p});var s=r(8354),n=r(9646),i=r(3648),a=r(1804);let E=(0,s.promisify)(n.exec),l={CREATE_TABLE:"CREATE_TABLE",ALTER_TABLE:"ALTER_TABLE",DROP_TABLE:"DROP_TABLE",CREATE_INDEX:"CREATE_INDEX",DROP_INDEX:"DROP_INDEX",DATA_MODIFICATION:"DATA_MODIFICATION"},o={VALIDATION_ERROR:"VALIDATION_ERROR",SYNTAX_ERROR:"SYNTAX_ERROR",EXECUTION_ERROR:"EXECUTION_ERROR",DEPENDENCY_ERROR:"DEPENDENCY_ERROR"};function u(t){return t.type!==l.DATA_MODIFICATION}function c(t){let e=t.trim().replace(/\s+/g," "),r=e.toUpperCase();if(r.startsWith("CREATE TABLE"))return{type:l.CREATE_TABLE,tableName:A(e,"CREATE TABLE"),sql:e,description:"create-table"};if(r.startsWith("ALTER TABLE")){let t=A(e,"ALTER TABLE"),s="";if(r.includes("RENAME")){let t=e.match(/RENAME\s+(?:COLUMN\s+)?([\w$]+)\s+TO\s+([\w$]+)/i);t&&(s=`rename-${t[1]}-to-${t[2]}`)}else if(r.includes("ADD COLUMN")){let t=e.match(/ADD\s+COLUMN\s+([\w$]+)(\s+[\w()]+)?/i);if(t){let e=t[1],r=t[2]?t[2].trim().replace(/\s+/g,"-"):"";s=r?`add-${e}-${r}`:`add-${e}`}}else if(r.includes("DROP COLUMN")){let t=e.match(/DROP\s+COLUMN\s+([\w$]+)/i);t&&(s=`drop-${t[1]}`)}else if(r.includes("MODIFY COLUMN")||r.includes("CHANGE COLUMN")){let t=e.match(/(?:MODIFY|CHANGE)\s+COLUMN\s+([\w$]+)(\s+[\w()]+)?/i);if(t){let e=t[1],r=t[2]?t[2].trim().replace(/\s+/g,"-"):"";s=r?`modify-${e}-to-${r}`:`modify-${e}`}}return{type:l.ALTER_TABLE,tableName:t,sql:e,description:s}}if(r.startsWith("DROP TABLE"))return{type:l.DROP_TABLE,tableName:A(e,"DROP TABLE"),sql:e,description:"drop-table"};if(r.startsWith("CREATE INDEX")||r.startsWith("CREATE UNIQUE INDEX")){let t=R(e),r=e.match(/INDEX\s+(?:IF\s+NOT\s+EXISTS\s+)?([\w$]+)/i),s=r?r[1]:"";return{type:l.CREATE_INDEX,tableName:t,sql:e,description:s}}if(r.startsWith("DROP INDEX")){let t=R(e),r=e.match(/DROP\s+INDEX\s+(?:IF\s+EXISTS\s+)?([\w$]+)/i),s=r?r[1]:"";return{type:l.DROP_INDEX,tableName:t,sql:e,description:s?`drop-index-${s}`:"drop-index"}}return{type:l.DATA_MODIFICATION,sql:e,description:"data-modification"}}function T(t){if(t.type!==l.DATA_MODIFICATION&&!t.tableName)throw{type:o.VALIDATION_ERROR,message:`Invalid SQL statement: unable to determine table name for "${t.type}".`,details:{sql:t.sql}};return t}function A(t,e){let r=t.match(RegExp(`${e}\\s+(?:IF\\s+(?:NOT\\s+)?EXISTS\\s+)?([\\w_]+)`,"i"));return r?r[1]:null}function R(t){let e=t.match(/ON\s+([\w_]+)/i);return e?e[1]:null}function m(t){return t.replace(/--[^\r\n]*/g,"").replace(/\/\*[\s\S]*?\*\//g,"").trim()}async function d(t,e,r,s,n=!1){try{(0,i.nZ)(s)}catch(t){return a.A.error("Invalid table name:",s,t.message),!1}let E=`SELECT name FROM sqlite_master WHERE type='table' AND name = '${s.replace(/'/g,"''")}' COLLATE NOCASE;`,l=await I(t,e,E,r,n);try{let t=l.indexOf("[");if(-1!==t){let e=l.substring(t),r=JSON.parse(e);return(r[0]?.results||[]).length>0}return!1}catch(t){return console.error("Error parsing tableExists result:",t),!1}}function f(t){return t.replace(/--.*$/gm,"").replace(/\/\*[\s\S]*?\*\//g,"").trim().split(";").map(t=>t.trim()).filter(t=>t.length>0).map(t=>c(t+";"))}async function I(t,e,s,n={},i=!1,l=null){try{let o=s.replace(/--[^\r\n]*/g,"").replace(/\/\*[\s\S]*?\*\//g,"").trim().replace(/\s+/g," "),u=o.toUpperCase();if((u.startsWith("CREATE INDEX")||u.startsWith("CREATE UNIQUE INDEX"))&&!u.includes("IF NOT EXISTS")&&(o=u.startsWith("CREATE UNIQUE INDEX")?o.replace(/CREATE\s+UNIQUE\s+INDEX/i,"CREATE UNIQUE INDEX IF NOT EXISTS"):o.replace(/CREATE\s+INDEX/i,"CREATE INDEX IF NOT EXISTS")),!e||"string"!=typeof e||!/^[a-zA-Z0-9_-]+$/.test(e))throw Error("Invalid database name for security reasons");if(!i&&l){let{executeLocalSQL:e}=await r.e(487).then(r.bind(r,3868)),s=e(t,l,o);if(null!==s)return s}let c="win32"===process.platform,T=o.replace(/"/g,'\\"').replace(/\$/g,"\\$"),A=`${c?"npx.cmd":"npx"} wrangler d1 execute ${e} ${i?"--remote":"--local"} --command="${T}" --json`;i?console.log(`[executeSQL --remote] ${A}`):a.A.shouldLog("debug")&&a.A.debug("Executing command:",A);let R={cwd:t,env:{...process.env,...n},maxBuffer:0xa00000,shell:!0},{stdout:m,stderr:d}=await E(A,R);if(i&&d&&console.log(`[executeSQL --remote stderr]: ${d.substring(0,800)}`),d&&!d.includes("\uD83C\uDF00"))throw Error(d);try{let t=m.indexOf("[");if(-1!==t)return m.substring(t)}catch(t){console.warn("JSON parse warning:",t)}return m}catch(t){throw a.A.shouldLog("debug")&&a.A.debug("SQL execution error:",t.message||t),{type:o.EXECUTION_ERROR,message:"Failed to execute SQL command",details:{command:t.cmd,stderr:t.stderr,stdout:t.stdout,originalError:t.message,suggestions:["Ensure Node.js and Wrangler are installed","Check npx in PATH","Verify the D1 database exists and is configured","Check wrangler.toml configuration"]}}}}async function N(t,e,r,s,n,E="id"){let l=(0,i.nZ)(r),o=(0,i.r0)(E),u=Math.max(1,Math.min(parseInt(n)||50,1e3)),c=`SELECT * FROM ${l} ORDER BY ${o} DESC LIMIT ${u};`;try{let r=await I(t,e,c,s,!0),n=r.indexOf("[");if(-1===n)throw Error(`Unexpected result format: ${r}`);let i=r.substring(n),a=JSON.parse(i);return a[0]?.results||[]}catch(t){throw a.A.error(`Error fetching remote data for table ${r}:`,t),t}}function p(t,e){if(!e||0===e.length)return"";let r=(0,i.nZ)(t),s=Object.keys(e[0]),n=s.map(t=>(0,i.r0)(t)).join(", "),a=e.map(t=>{let e=s.map(e=>{let r=t[e];return null==r?"NULL":`'${String(r).replace(/'/g,"''")}'`}).join(", ");return`(${e})`}).join(", ");return`INSERT INTO ${r} (${n}) VALUES ${a};`}function O(t){let e=[],r="",s=0,n=!1,i="";for(let a of t)'"'===a&&"\\"!==i&&(n=!n),!n&&("("===a&&s++,")"===a&&s--),","!==a||0!==s||n?r+=a:(e.push(r.trim()),r=""),i=a;return r.trim()&&e.push(r.trim()),e}function h(t){return t.split(";").map(t=>t.trim()).filter(t=>t.length>0).map(t=>(function(t){let e=t.trim(),r=e.toUpperCase();return r.startsWith("CREATE TABLE")?function(t){let e=t.match(/CREATE\s+TABLE\s+(?:IF\s+NOT\s+EXISTS\s+)?(\w+)\s*\(([\s\S]*)\)/i);if(!e)return t;let[,r,s]=e,n=O(s).map(t=>t.trim()).filter(Boolean);return`CREATE TABLE ${r} (
8
8
  ${n.join(",\n ")}
9
- );`}(e):r.startsWith("CREATE INDEX")||r.startsWith("CREATE UNIQUE INDEX")?function(t){let e=t.match(/CREATE\s+(UNIQUE\s+)?INDEX\s+(?:IF\s+NOT\s+EXISTS\s+)?(\w+)\s+ON\s+(\w+)\s*\((.*)\)/i);if(!e)return t;let[,r,s,n,a]=e,i=a.split(",").map(t=>t.trim()).join(", ");return`CREATE ${r||""}INDEX ${s} ON ${n} (${i});`}(e):r.startsWith("ALTER TABLE")?function(t){let e=t.match(/ALTER\s+TABLE\s+(\w+)\s+(.*)/i);if(!e)return t;let[,r,s]=e,n=$(s);return 1===n.length?`ALTER TABLE ${r} ${n[0]};`:`ALTER TABLE ${r}
10
- ${n.map((t,e)=>` ${t}${e<n.length-1?",":";"}`).join("\n")}`}(e):r.startsWith("DROP TABLE")||r.startsWith("DROP INDEX")?function(t){let e=t.match(/DROP\s+(TABLE|INDEX)\s+(?:IF\s+EXISTS\s+)?(\w+)/i);if(!e)return t;let[,r,s]=e;return`DROP ${r} IF EXISTS ${s};`}(e):r.startsWith("INSERT INTO")?function(t){let e=t.match(/INSERT\s+INTO\s+(\w+)\s*(\([^)]+\))?\s*VALUES\s*(.+)/i);if(!e)return t;let[,r,s,n]=e,a=$(n);return`INSERT INTO ${r}${s?` ${s}`:""}
9
+ );`}(e):r.startsWith("CREATE INDEX")||r.startsWith("CREATE UNIQUE INDEX")?function(t){let e=t.match(/CREATE\s+(UNIQUE\s+)?INDEX\s+(?:IF\s+NOT\s+EXISTS\s+)?(\w+)\s+ON\s+(\w+)\s*\((.*)\)/i);if(!e)return t;let[,r,s,n,i]=e,a=i.split(",").map(t=>t.trim()).join(", ");return`CREATE ${r||""}INDEX ${s} ON ${n} (${a});`}(e):r.startsWith("ALTER TABLE")?function(t){let e=t.match(/ALTER\s+TABLE\s+(\w+)\s+(.*)/i);if(!e)return t;let[,r,s]=e,n=O(s);return 1===n.length?`ALTER TABLE ${r} ${n[0]};`:`ALTER TABLE ${r}
10
+ ${n.map((t,e)=>` ${t}${e<n.length-1?",":";"}`).join("\n")}`}(e):r.startsWith("DROP TABLE")||r.startsWith("DROP INDEX")?function(t){let e=t.match(/DROP\s+(TABLE|INDEX)\s+(?:IF\s+EXISTS\s+)?(\w+)/i);if(!e)return t;let[,r,s]=e;return`DROP ${r} IF EXISTS ${s};`}(e):r.startsWith("INSERT INTO")?function(t){let e=t.match(/INSERT\s+INTO\s+(\w+)\s*(\([^)]+\))?\s*VALUES\s*(.+)/i);if(!e)return t;let[,r,s,n]=e,i=O(n);return`INSERT INTO ${r}${s?` ${s}`:""}
11
11
  VALUES
12
- `+a.map((t,e)=>` ${t}${e<a.length-1?",":";"}`).join("\n")}(e):r.startsWith("UPDATE")?function(t){let e=t.match(/UPDATE\s+(\w+)\s+SET\s+(.+?)(?:\s+WHERE\s+(.+))?$/i);if(!e)return t;let[,r,s,n]=e,a=$(s),i=`UPDATE ${r}
12
+ `+i.map((t,e)=>` ${t}${e<i.length-1?",":";"}`).join("\n")}(e):r.startsWith("UPDATE")?function(t){let e=t.match(/UPDATE\s+(\w+)\s+SET\s+(.+?)(?:\s+WHERE\s+(.+))?$/i);if(!e)return t;let[,r,s,n]=e,i=O(s),a=`UPDATE ${r}
13
13
  SET
14
- ${a.map(t=>` ${t.trim()}`).join(",\n")}`;return n&&(i+=`
14
+ ${i.map(t=>` ${t.trim()}`).join(",\n")}`;return n&&(a+=`
15
15
  WHERE
16
- ${n.trim()}`),i+";"}(e):r.startsWith("DELETE FROM")?function(t){let e=t.match(/DELETE\s+FROM\s+(\w+)(?:\s+WHERE\s+(.+))?$/i);if(!e)return t;let[,r,s]=e,n=`DELETE FROM ${r}`;return s&&(n+=`
16
+ ${n.trim()}`),a+";"}(e):r.startsWith("DELETE FROM")?function(t){let e=t.match(/DELETE\s+FROM\s+(\w+)(?:\s+WHERE\s+(.+))?$/i);if(!e)return t;let[,r,s]=e,n=`DELETE FROM ${r}`;return s&&(n+=`
17
17
  WHERE
18
- ${s.trim()}`),n+";"}(e):r.startsWith("SELECT")?function(t){let e=t.match(/SELECT\s+(.+?)\s+FROM\s+(.+?)(?:\s+WHERE\s+(.+?))?(?:\s+GROUP\s+BY\s+(.+?))?(?:\s+HAVING\s+(.+?))?(?:\s+ORDER\s+BY\s+(.+?))?(?:\s+LIMIT\s+(.+?))?$/i);if(!e)return t;let[,r,s,n,a,i,E,l]=e,o=`SELECT
18
+ ${s.trim()}`),n+";"}(e):r.startsWith("SELECT")?function(t){let e=t.match(/SELECT\s+(.+?)\s+FROM\s+(.+?)(?:\s+WHERE\s+(.+?))?(?:\s+GROUP\s+BY\s+(.+?))?(?:\s+HAVING\s+(.+?))?(?:\s+ORDER\s+BY\s+(.+?))?(?:\s+LIMIT\s+(.+?))?$/i);if(!e)return t;let[,r,s,n,i,a,E,l]=e,o=`SELECT
19
19
  ${r.split(",").map(t=>t.trim()).join(",\n ")}
20
20
  FROM
21
21
  ${s.trim()}`;return n&&(o+=`
22
22
  WHERE
23
- ${n.trim()}`),a&&(o+=`
23
+ ${n.trim()}`),i&&(o+=`
24
24
  GROUP BY
25
- ${a.trim()}`),i&&(o+=`
25
+ ${i.trim()}`),a&&(o+=`
26
26
  HAVING
27
- ${i.trim()}`),E&&(o+=`
27
+ ${a.trim()}`),E&&(o+=`
28
28
  ORDER BY
29
29
  ${E.trim()}`),l&&(o+=`
30
- LIMIT ${l.trim()}`),o+";"}(e):e+";"}function $(t){let e=[],r="",s=0,n=!1,a="";for(let i of t)'"'===i&&"\\"!==a&&(n=!n),!n&&("("===i&&s++,")"===i&&s--),","!==i||0!==s||n?r+=i:(e.push(r.trim()),r=""),a=i;return r.trim()&&e.push(r.trim()),e}function g(t){return t.split(";").map(t=>t.trim()).filter(t=>t.length>0).map(t=>h(t)).join("\n\n")+"\n"}async function L(t,e,r,s){try{let n;let a=await A(r);if(a&&!r.includes("create-index")){let r=await I(t,e,`SELECT sql FROM sqlite_master WHERE type='table' AND name='${a}';`,s,!0);try{let t=JSON.parse(r);n=t[0]?.results?.[0]?.sql}catch(t){console.error("Error parsing sqlite_master result:",t)}}if(!n&&r.includes("create-index")){let a=r.match(/create-index[_-](.+)\.sql$/i);if(a){let r=a[1],i=await I(t,e,`SELECT sql FROM sqlite_master WHERE type='index' AND name='${r}' COLLATE NOCASE;`,s,!0),E=JSON.parse(i);if(!(n=E[0]?.results?.[0]?.sql)){let a=r.split("-")[0];i=await I(t,e,`SELECT sql FROM sqlite_master WHERE type='index' AND name='${a}' COLLATE NOCASE;`,s,!0),E=JSON.parse(i),n=E[0]?.results?.[0]?.sql}}}if(!n&&a&&!r.includes("create-index")){let r=await I(t,e,`SELECT sql FROM sqlite_master WHERE name LIKE '%${a}%' LIMIT 1;`,s,!0);try{let t=JSON.parse(r);n=t[0]?.results?.[0]?.sql}catch(t){console.error("Error parsing fallback result:",t)}}if(!n)throw Error(`Could not retrieve SQL content for migration: ${r}`);return n+";"}catch(t){throw{type:o.EXECUTION_ERROR,message:`Failed to get migration file content: ${t.message}`,details:{file:r,error:t.message,suggestions:["Check if the table exists in the remote database","Verify the migration filename follows the expected pattern","Ensure you have permissions to access the remote database"]}}}}},3648:(t,e,r)=>{"use strict";function s(t){if(!t||"string"!=typeof t)throw Error("Table name must be a non-empty string");if(!/^[a-zA-Z_][a-zA-Z0-9_]*$/.test(t))throw Error(`Invalid table name: ${t}. Must start with letter or underscore and contain only letters, digits, and underscores.`);if(["SELECT","FROM","WHERE","INSERT","UPDATE","DELETE","CREATE","DROP","ALTER","TABLE","INDEX","VIEW","TRIGGER","PRAGMA","VACUUM","REINDEX","EXPLAIN","QUERY","PLAN","TRANSACTION","BEGIN","COMMIT","ROLLBACK"].includes(t.toUpperCase()))throw Error(`Table name cannot be a reserved word: ${t}`);return`"${t}"`}function n(t){if(!t||"string"!=typeof t)throw Error("Column name must be a non-empty string");if(!/^[a-zA-Z_][a-zA-Z0-9_]*$/.test(t))throw Error(`Invalid column name: ${t}. Must start with letter or underscore and contain only letters, digits, and underscores.`);return`"${t}"`}r.d(e,{nZ:()=>s,r0:()=>n})}};
30
+ LIMIT ${l.trim()}`),o+";"}(e):e+";"})(t)).join("\n\n")+"\n"}},3648:(t,e,r)=>{"use strict";function s(t){if(!t||"string"!=typeof t)throw Error("Table name must be a non-empty string");if(!/^[a-zA-Z_][a-zA-Z0-9_]*$/.test(t))throw Error(`Invalid table name: ${t}. Must start with letter or underscore and contain only letters, digits, and underscores.`);if(["SELECT","FROM","WHERE","INSERT","UPDATE","DELETE","CREATE","DROP","ALTER","TABLE","INDEX","VIEW","TRIGGER","PRAGMA","VACUUM","REINDEX","EXPLAIN","QUERY","PLAN","TRANSACTION","BEGIN","COMMIT","ROLLBACK"].includes(t.toUpperCase()))throw Error(`Table name cannot be a reserved word: ${t}`);return`"${t}"`}function n(t){if(!t||"string"!=typeof t)throw Error("Column name must be a non-empty string");if(!/^[a-zA-Z_][a-zA-Z0-9_]*$/.test(t))throw Error(`Invalid column name: ${t}. Must start with letter or underscore and contain only letters, digits, and underscores.`);return`"${t}"`}r.d(e,{nZ:()=>s,r0:()=>n})}};
@@ -1 +1 @@
1
- exports.id=452,exports.ids=[452],exports.modules={9187:(e,i,t)=>{"use strict";var o=t(1520);t.o(o,"NextResponse")&&t.d(i,{NextResponse:function(){return o.NextResponse}})},4446:(e,i,t)=>{var o;(()=>{var r={226:function(r,n){!function(a,s){"use strict";var u="function",c="undefined",d="object",l="string",b="major",w="model",p="name",f="type",m="vendor",h="version",g="architecture",v="console",x="mobile",y="tablet",k="smarttv",_="wearable",R="embedded",S="Amazon",q="Apple",j="ASUS",P="BlackBerry",T="Browser",O="Chrome",A="Firefox",N="Google",E="Huawei",U="Microsoft",z="Motorola",C="Opera",M="Samsung",B="Sharp",I="Sony",L="Xiaomi",D="Zebra",G="Facebook",H="Chromium OS",V="Mac OS",F=function(e,i){var t={};for(var o in e)i[o]&&i[o].length%2==0?t[o]=i[o].concat(e[o]):t[o]=e[o];return t},W=function(e){for(var i={},t=0;t<e.length;t++)i[e[t].toUpperCase()]=e[t];return i},$=function(e,i){return typeof e===l&&-1!==Z(i).indexOf(Z(e))},Z=function(e){return e.toLowerCase()},X=function(e,i){if(typeof e===l)return e=e.replace(/^\s\s*/,""),typeof i===c?e:e.substring(0,350)},K=function(e,i){for(var t,o,r,n,a,c,l=0;l<i.length&&!a;){var b=i[l],w=i[l+1];for(t=o=0;t<b.length&&!a&&b[t];)if(a=b[t++].exec(e))for(r=0;r<w.length;r++)c=a[++o],typeof(n=w[r])===d&&n.length>0?2===n.length?typeof n[1]==u?this[n[0]]=n[1].call(this,c):this[n[0]]=n[1]:3===n.length?typeof n[1]!==u||n[1].exec&&n[1].test?this[n[0]]=c?c.replace(n[1],n[2]):void 0:this[n[0]]=c?n[1].call(this,c,n[2]):void 0:4===n.length&&(this[n[0]]=c?n[3].call(this,c.replace(n[1],n[2])):void 0):this[n]=c||s;l+=2}},Q=function(e,i){for(var t in i)if(typeof i[t]===d&&i[t].length>0){for(var o=0;o<i[t].length;o++)if($(i[t][o],e))return"?"===t?s:t}else if($(i[t],e))return"?"===t?s:t;return e},Y={ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2",8.1:"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"},J={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[h,[p,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[h,[p,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[p,h],[/opios[\/ ]+([\w\.]+)/i],[h,[p,C+" Mini"]],[/\bopr\/([\w\.]+)/i],[h,[p,C]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer)[\/ ]?([\w\.]*)/i,/(avant |iemobile|slim)(?:browser)?[\/ ]?([\w\.]*)/i,/(ba?idubrowser)[\/ ]?([\w\.]+)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|bolt|iron|vivaldi|iridium|phantomjs|bowser|quark|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|qq|duckduckgo)\/([-\w\.]+)/i,/(heytap|ovi)browser\/([\d\.]+)/i,/(weibo)__([\d\.]+)/i],[p,h],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[h,[p,"UC"+T]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i],[h,[p,"WeChat(Win) Desktop"]],[/micromessenger\/([\w\.]+)/i],[h,[p,"WeChat"]],[/konqueror\/([\w\.]+)/i],[h,[p,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[h,[p,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[h,[p,"Yandex"]],[/(avast|avg)\/([\w\.]+)/i],[[p,/(.+)/,"$1 Secure "+T],h],[/\bfocus\/([\w\.]+)/i],[h,[p,A+" Focus"]],[/\bopt\/([\w\.]+)/i],[h,[p,C+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[h,[p,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[h,[p,"Dolphin"]],[/coast\/([\w\.]+)/i],[h,[p,C+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[h,[p,"MIUI "+T]],[/fxios\/([-\w\.]+)/i],[h,[p,A]],[/\bqihu|(qi?ho?o?|360)browser/i],[[p,"360 "+T]],[/(oculus|samsung|sailfish|huawei)browser\/([\w\.]+)/i],[[p,/(.+)/,"$1 "+T],h],[/(comodo_dragon)\/([\w\.]+)/i],[[p,/_/g," "],h],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|baiduboxapp|2345Explorer)[\/ ]?([\w\.]+)/i],[p,h],[/(metasr)[\/ ]?([\w\.]+)/i,/(lbbrowser)/i,/\[(linkedin)app\]/i],[p],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[p,G],h],[/(kakao(?:talk|story))[\/ ]([\w\.]+)/i,/(naver)\(.*?(\d+\.[\w\.]+).*\)/i,/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(chromium|instagram)[\/ ]([-\w\.]+)/i],[p,h],[/\bgsa\/([\w\.]+) .*safari\//i],[h,[p,"GSA"]],[/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i],[h,[p,"TikTok"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[h,[p,O+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[p,O+" WebView"],h],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[h,[p,"Android "+T]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[p,h],[/version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i],[h,[p,"Mobile Safari"]],[/version\/([\w(\.|\,)]+) .*(mobile ?safari|safari)/i],[h,p],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[p,[h,Q,{"1.0":"/8",1.2:"/1",1.3:"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"}]],[/(webkit|khtml)\/([\w\.]+)/i],[p,h],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[p,"Netscape"],h],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[h,[p,A+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror|klar)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|sleipnir|obigo|mosaic|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/(links) \(([\w\.]+)/i,/panasonic;(viera)/i],[p,h],[/(cobalt)\/([\w\.]+)/i],[p,[h,/master.|lts./,""]]],cpu:[[/(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\)]/i],[[g,"amd64"]],[/(ia32(?=;))/i],[[g,Z]],[/((?:i[346]|x)86)[;\)]/i],[[g,"ia32"]],[/\b(aarch64|arm(v?8e?l?|_?64))\b/i],[[g,"arm64"]],[/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i],[[g,"armhf"]],[/windows (ce|mobile); ppc;/i],[[g,"arm"]],[/((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i],[[g,/ower/,"",Z]],[/(sun4\w)[;\)]/i],[[g,"sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i],[[g,Z]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[w,[m,M],[f,y]],[/\b((?:s[cgp]h|gt|sm)-\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]([-\w]+)/i,/sec-(sgh\w+)/i],[w,[m,M],[f,x]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],[w,[m,q],[f,x]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[w,[m,q],[f,y]],[/(macintosh);/i],[w,[m,q]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[w,[m,B],[f,x]],[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],[w,[m,E],[f,y]],[/(?:huawei|honor)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[w,[m,E],[f,x]],[/\b(poco[\w ]+)(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite)?)(?: bui|\))/i],[[w,/_/g," "],[m,L],[f,x]],[/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i],[[w,/_/g," "],[m,L],[f,y]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[w,[m,"OPPO"],[f,x]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[w,[m,"Vivo"],[f,x]],[/\b(rmx[12]\d{3})(?: bui|;|\))/i],[w,[m,"Realme"],[f,x]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ](\w*)/i,/((?:moto[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i],[w,[m,z],[f,x]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[w,[m,z],[f,y]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[w,[m,"LG"],[f,y]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,/\blg-?([\d\w]+) bui/i],[w,[m,"LG"],[f,x]],[/(ideatab[-\w ]+)/i,/lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i],[w,[m,"Lenovo"],[f,y]],[/(?:maemo|nokia).*(n900|lumia \d+)/i,/nokia[-_ ]?([-\w\.]*)/i],[[w,/_/g," "],[m,"Nokia"],[f,x]],[/(pixel c)\b/i],[w,[m,N],[f,y]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[w,[m,N],[f,x]],[/droid.+ (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[w,[m,I],[f,x]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[w,"Xperia Tablet"],[m,I],[f,y]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[w,[m,"OnePlus"],[f,x]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo[c-r]{2})( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[w,[m,S],[f,y]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[w,/(.+)/g,"Fire Phone $1"],[m,S],[f,x]],[/(playbook);[-\w\),; ]+(rim)/i],[w,m,[f,y]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[w,[m,P],[f,x]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[w,[m,j],[f,y]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[w,[m,j],[f,x]],[/(nexus 9)/i],[w,[m,"HTC"],[f,y]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[m,[w,/_/g," "],[f,x]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[w,[m,"Acer"],[f,y]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[w,[m,"Meizu"],[f,x]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron)[-_ ]?([-\w]*)/i,/(hp) ([\w ]+\w)/i,/(asus)-?(\w+)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w]+)/i,/(jolla)/i,/(oppo) ?([\w ]+) bui/i],[m,w,[f,x]],[/(kobo)\s(ereader|touch)/i,/(archos) (gamepad2?)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i,/(nook)[\w ]+build\/(\w+)/i,/(dell) (strea[kpr\d ]*[\dko])/i,/(le[- ]+pan)[- ]+(\w{1,9}) bui/i,/(trinity)[- ]*(t\d{3}) bui/i,/(gigaset)[- ]+(q\w{1,9}) bui/i,/(vodafone) ([\w ]+)(?:\)| bui)/i],[m,w,[f,y]],[/(surface duo)/i],[w,[m,U],[f,y]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[w,[m,"Fairphone"],[f,x]],[/(u304aa)/i],[w,[m,"AT&T"],[f,x]],[/\bsie-(\w*)/i],[w,[m,"Siemens"],[f,x]],[/\b(rct\w+) b/i],[w,[m,"RCA"],[f,y]],[/\b(venue[\d ]{2,7}) b/i],[w,[m,"Dell"],[f,y]],[/\b(q(?:mv|ta)\w+) b/i],[w,[m,"Verizon"],[f,y]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[w,[m,"Barnes & Noble"],[f,y]],[/\b(tm\d{3}\w+) b/i],[w,[m,"NuVision"],[f,y]],[/\b(k88) b/i],[w,[m,"ZTE"],[f,y]],[/\b(nx\d{3}j) b/i],[w,[m,"ZTE"],[f,x]],[/\b(gen\d{3}) b.+49h/i],[w,[m,"Swiss"],[f,x]],[/\b(zur\d{3}) b/i],[w,[m,"Swiss"],[f,y]],[/\b((zeki)?tb.*\b) b/i],[w,[m,"Zeki"],[f,y]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[m,"Dragon Touch"],w,[f,y]],[/\b(ns-?\w{0,9}) b/i],[w,[m,"Insignia"],[f,y]],[/\b((nxa|next)-?\w{0,9}) b/i],[w,[m,"NextBook"],[f,y]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[m,"Voice"],w,[f,x]],[/\b(lvtel\-)?(v1[12]) b/i],[[m,"LvTel"],w,[f,x]],[/\b(ph-1) /i],[w,[m,"Essential"],[f,x]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[w,[m,"Envizen"],[f,y]],[/\b(trio[-\w\. ]+) b/i],[w,[m,"MachSpeed"],[f,y]],[/\btu_(1491) b/i],[w,[m,"Rotor"],[f,y]],[/(shield[\w ]+) b/i],[w,[m,"Nvidia"],[f,y]],[/(sprint) (\w+)/i],[m,w,[f,x]],[/(kin\.[onetw]{3})/i],[[w,/\./g," "],[m,U],[f,x]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[w,[m,D],[f,y]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[w,[m,D],[f,x]],[/smart-tv.+(samsung)/i],[m,[f,k]],[/hbbtv.+maple;(\d+)/i],[[w,/^/,"SmartTV"],[m,M],[f,k]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[m,"LG"],[f,k]],[/(apple) ?tv/i],[m,[w,q+" TV"],[f,k]],[/crkey/i],[[w,O+"cast"],[m,N],[f,k]],[/droid.+aft(\w)( bui|\))/i],[w,[m,S],[f,k]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[w,[m,B],[f,k]],[/(bravia[\w ]+)( bui|\))/i],[w,[m,I],[f,k]],[/(mitv-\w{5}) bui/i],[w,[m,L],[f,k]],[/Hbbtv.*(technisat) (.*);/i],[m,w,[f,k]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[m,X],[w,X],[f,k]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[f,k]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[m,w,[f,v]],[/droid.+; (shield) bui/i],[w,[m,"Nvidia"],[f,v]],[/(playstation [345portablevi]+)/i],[w,[m,I],[f,v]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[w,[m,U],[f,v]],[/((pebble))app/i],[m,w,[f,_]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[w,[m,q],[f,_]],[/droid.+; (glass) \d/i],[w,[m,N],[f,_]],[/droid.+; (wt63?0{2,3})\)/i],[w,[m,D],[f,_]],[/(quest( 2| pro)?)/i],[w,[m,G],[f,_]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[m,[f,R]],[/(aeobc)\b/i],[w,[m,S],[f,R]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+? mobile safari/i],[w,[f,x]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[w,[f,y]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[f,y]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[f,x]],[/(android[-\w\. ]{0,9});.+buil/i],[w,[m,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[h,[p,"EdgeHTML"]],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[h,[p,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i,/\b(libweb)/i],[p,h],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[h,p]],os:[[/microsoft (windows) (vista|xp)/i],[p,h],[/(windows) nt 6\.2; (arm)/i,/(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i,/(windows)[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i],[p,[h,Q,Y]],[/(win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[p,"Windows"],[h,Q,Y]],[/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,/ios;fbsv\/([\d\.]+)/i,/cfnetwork\/.+darwin/i],[[h,/_/g,"."],[p,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[p,V],[h,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],[h,p],[/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish)[-\/ ]?([\w\.]*)/i,/(blackberry)\w*\/([\w\.]*)/i,/(tizen|kaios)[\/ ]([\w\.]+)/i,/\((series40);/i],[p,h],[/\(bb(10);/i],[h,[p,P]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i],[h,[p,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[h,[p,A+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[h,[p,"webOS"]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[h,[p,"watchOS"]],[/crkey\/([\d\.]+)/i],[h,[p,O+"cast"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[p,H],h],[/panasonic;(viera)/i,/(netrange)mmh/i,/(nettv)\/(\d+\.[\w\.]+)/i,/(nintendo|playstation) ([wids345portablevuch]+)/i,/(xbox); +xbox ([^\);]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/(mint)[\/\(\) ]?(\w*)/i,/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/(hurd|linux) ?([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) (\w+)/i],[p,h],[/(sunos) ?([\w\.\d]*)/i],[[p,"Solaris"],h],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[p,h]]},ee=function(e,i){if(typeof e===d&&(i=e,e=s),!(this instanceof ee))return new ee(e,i).getResult();var t=typeof a!==c&&a.navigator?a.navigator:s,o=e||(t&&t.userAgent?t.userAgent:""),r=t&&t.userAgentData?t.userAgentData:s,n=i?F(J,i):J,v=t&&t.userAgent==o;return this.getBrowser=function(){var e,i={};return i[p]=s,i[h]=s,K.call(i,o,n.browser),i[b]=typeof(e=i[h])===l?e.replace(/[^\d\.]/g,"").split(".")[0]:s,v&&t&&t.brave&&typeof t.brave.isBrave==u&&(i[p]="Brave"),i},this.getCPU=function(){var e={};return e[g]=s,K.call(e,o,n.cpu),e},this.getDevice=function(){var e={};return e[m]=s,e[w]=s,e[f]=s,K.call(e,o,n.device),v&&!e[f]&&r&&r.mobile&&(e[f]=x),v&&"Macintosh"==e[w]&&t&&typeof t.standalone!==c&&t.maxTouchPoints&&t.maxTouchPoints>2&&(e[w]="iPad",e[f]=y),e},this.getEngine=function(){var e={};return e[p]=s,e[h]=s,K.call(e,o,n.engine),e},this.getOS=function(){var e={};return e[p]=s,e[h]=s,K.call(e,o,n.os),v&&!e[p]&&r&&"Unknown"!=r.platform&&(e[p]=r.platform.replace(/chrome os/i,H).replace(/macos/i,V)),e},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return o},this.setUA=function(e){return o=typeof e===l&&e.length>350?X(e,350):e,this},this.setUA(o),this};ee.VERSION="1.0.35",ee.BROWSER=W([p,h,b]),ee.CPU=W([g]),ee.DEVICE=W([w,m,f,v,x,k,y,_,R]),ee.ENGINE=ee.OS=W([p,h]),typeof n!==c?(r.exports&&(n=r.exports=ee),n.UAParser=ee):t.amdO?void 0!==(o=(function(){return ee}).call(i,t,i,e))&&(e.exports=o):typeof a!==c&&(a.UAParser=ee);var ei=typeof a!==c&&(a.jQuery||a.Zepto);if(ei&&!ei.ua){var et=new ee;ei.ua=et.getResult(),ei.ua.get=function(){return et.getUA()},ei.ua.set=function(e){et.setUA(e);var i=et.getResult();for(var t in i)ei.ua[t]=i[t]}}}("object"==typeof window?window:this)}},n={};function a(e){var i=n[e];if(void 0!==i)return i.exports;var t=n[e]={exports:{}},o=!0;try{r[e].call(t.exports,t,t.exports,a),o=!1}finally{o&&delete n[e]}return t.exports}a.ab=__dirname+"/";var s=a(226);e.exports=s})()},6050:(e,i,t)=>{"use strict";Object.defineProperty(i,"__esModule",{value:!0}),Object.defineProperty(i,"after",{enumerable:!0,get:function(){return r}});let o=t(9294);function r(e){let i=o.workAsyncStorage.getStore();if(!i)throw Error("`after` was called outside a request scope. Read more: https://nextjs.org/docs/messages/next-dynamic-api-wrong-context");let{afterContext:t}=i;return t.after(e)}},5036:(e,i,t)=>{"use strict";Object.defineProperty(i,"__esModule",{value:!0}),function(e,i){Object.keys(e).forEach(function(t){"default"===t||Object.prototype.hasOwnProperty.call(i,t)||Object.defineProperty(i,t,{enumerable:!0,get:function(){return e[t]}})})}(t(6050),i)},6807:(e,i,t)=>{"use strict";Object.defineProperty(i,"__esModule",{value:!0}),Object.defineProperty(i,"connection",{enumerable:!0,get:function(){return c}});let o=t(9294),r=t(3033),n=t(436),a=t(2312),s=t(457),u=t(4982);function c(){let e=o.workAsyncStorage.getStore(),i=r.workUnitAsyncStorage.getStore();if(e){if(i&&"after"===i.phase&&!(0,u.isRequestAPICallableInsideAfter)())throw Error(`Route ${e.route} used "connection" inside "after(...)". The \`connection()\` function is used to indicate the subsequent code must only run when there is an actual Request, but "after(...)" executes after the request, so this function is not allowed in this scope. See more info here: https://nextjs.org/docs/canary/app/api-reference/functions/after`);if(e.forceStatic)return Promise.resolve(void 0);if(i){if("cache"===i.type)throw Error(`Route ${e.route} used "connection" inside "use cache". The \`connection()\` function is used to indicate the subsequent code must only run when there is an actual Request, but caches must be able to be produced before a Request so this function is not allowed in this scope. See more info here: https://nextjs.org/docs/messages/next-request-in-use-cache`);if("unstable-cache"===i.type)throw Error(`Route ${e.route} used "connection" inside a function cached with "unstable_cache(...)". The \`connection()\` function is used to indicate the subsequent code must only run when there is an actual Request, but caches must be able to be produced before a Request so this function is not allowed in this scope. See more info here: https://nextjs.org/docs/app/api-reference/functions/unstable_cache`)}if(e.dynamicShouldError)throw new a.StaticGenBailoutError(`Route ${e.route} with \`dynamic = "error"\` couldn't be rendered statically because it used \`connection\`. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering`);if(i){if("prerender"===i.type)return(0,s.makeHangingPromise)(i.renderSignal,"`connection()`");"prerender-ppr"===i.type?(0,n.postponeWithTracking)(e.route,"connection",i.dynamicTracking):"prerender-legacy"===i.type&&(0,n.throwToInterruptStaticGeneration)("connection",e,i)}(0,n.trackDynamicDataInDynamicRender)(e,i)}return Promise.resolve(void 0)}},2706:(e,i,t)=>{"use strict";e.exports=t(4870)},1520:(e,i,t)=>{"use strict";Object.defineProperty(i,"__esModule",{value:!0}),function(e,i){for(var t in i)Object.defineProperty(e,t,{enumerable:!0,get:i[t]})}(i,{ImageResponse:function(){return o.ImageResponse},NextRequest:function(){return r.NextRequest},NextResponse:function(){return n.NextResponse},URLPattern:function(){return s.URLPattern},after:function(){return u.after},connection:function(){return c.connection},userAgent:function(){return a.userAgent},userAgentFromString:function(){return a.userAgentFromString}});let o=t(4159),r=t(1639),n=t(4899),a=t(2215),s=t(1512),u=t(5036),c=t(6807)},4159:(e,i)=>{"use strict";function t(){throw Error('ImageResponse moved from "next/server" to "next/og" since Next.js 14, please import from "next/og" instead')}Object.defineProperty(i,"__esModule",{value:!0}),Object.defineProperty(i,"ImageResponse",{enumerable:!0,get:function(){return t}})},4899:(e,i,t)=>{"use strict";Object.defineProperty(i,"__esModule",{value:!0}),Object.defineProperty(i,"NextResponse",{enumerable:!0,get:function(){return l}});let o=t(9181),r=t(9619),n=t(5225),a=t(614),s=t(9181),u=Symbol("internal response"),c=new Set([301,302,303,307,308]);function d(e,i){var t;if(null==e?void 0:null==(t=e.request)?void 0:t.headers){if(!(e.request.headers instanceof Headers))throw Error("request.headers must be an instance of Headers");let t=[];for(let[o,r]of e.request.headers)i.set("x-middleware-request-"+o,r),t.push(o);i.set("x-middleware-override-headers",t.join(","))}}class l extends Response{constructor(e,i={}){super(e,i);let t=this.headers,c=new Proxy(new s.ResponseCookies(t),{get(e,r,n){switch(r){case"delete":case"set":return(...n)=>{let a=Reflect.apply(e[r],e,n),u=new Headers(t);return a instanceof s.ResponseCookies&&t.set("x-middleware-set-cookie",a.getAll().map(e=>(0,o.stringifyCookie)(e)).join(",")),d(i,u),a};default:return a.ReflectAdapter.get(e,r,n)}}});this[u]={cookies:c,url:i.url?new r.NextURL(i.url,{headers:(0,n.toNodeOutgoingHttpHeaders)(t),nextConfig:i.nextConfig}):void 0}}[Symbol.for("edge-runtime.inspect.custom")](){return{cookies:this.cookies,url:this.url,body:this.body,bodyUsed:this.bodyUsed,headers:Object.fromEntries(this.headers),ok:this.ok,redirected:this.redirected,status:this.status,statusText:this.statusText,type:this.type}}get cookies(){return this[u].cookies}static json(e,i){let t=Response.json(e,i);return new l(t.body,t)}static redirect(e,i){let t="number"==typeof i?i:(null==i?void 0:i.status)??307;if(!c.has(t))throw RangeError('Failed to execute "redirect" on "response": Invalid status code');let o="object"==typeof i?i:{},r=new Headers(null==o?void 0:o.headers);return r.set("Location",(0,n.validateURL)(e)),new l(null,{...o,headers:r,status:t})}static rewrite(e,i){let t=new Headers(null==i?void 0:i.headers);return t.set("x-middleware-rewrite",(0,n.validateURL)(e)),d(i,t),new l(null,{...i,headers:t})}static next(e){let i=new Headers(null==e?void 0:e.headers);return i.set("x-middleware-next","1"),d(e,i),new l(null,{...e,headers:i})}}},1512:(e,i)=>{"use strict";Object.defineProperty(i,"__esModule",{value:!0}),Object.defineProperty(i,"URLPattern",{enumerable:!0,get:function(){return t}});let t="undefined"==typeof URLPattern?void 0:URLPattern},2215:(e,i,t)=>{"use strict";Object.defineProperty(i,"__esModule",{value:!0}),function(e,i){for(var t in i)Object.defineProperty(e,t,{enumerable:!0,get:i[t]})}(i,{isBot:function(){return r},userAgent:function(){return a},userAgentFromString:function(){return n}});let o=function(e){return e&&e.__esModule?e:{default:e}}(t(4446));function r(e){return/Googlebot|Mediapartners-Google|AdsBot-Google|googleweblight|Storebot-Google|Google-PageRenderer|Google-InspectionTool|Bingbot|BingPreview|Slurp|DuckDuckBot|baiduspider|yandex|sogou|LinkedInBot|bitlybot|tumblr|vkShare|quora link preview|facebookexternalhit|facebookcatalog|Twitterbot|applebot|redditbot|Slackbot|Discordbot|WhatsApp|SkypeUriPreview|ia_archiver/i.test(e)}function n(e){return{...(0,o.default)(e),isBot:void 0!==e&&r(e)}}function a({headers:e}){return n(e.get("user-agent")||void 0)}}};
1
+ exports.id=452,exports.ids=[452],exports.modules={9187:(e,i,t)=>{"use strict";var r=t(1520);t.o(r,"NextResponse")&&t.d(i,{NextResponse:function(){return r.NextResponse}})},4446:(e,i,t)=>{var r;(()=>{var o={226:function(o,n){!function(a,s){"use strict";var u="function",c="undefined",d="object",l="string",b="major",w="model",p="name",f="type",m="vendor",h="version",g="architecture",v="console",y="mobile",x="tablet",k="smarttv",S="wearable",_="embedded",R="Amazon",P="Apple",j="ASUS",O="BlackBerry",q="Browser",A="Chrome",T="Firefox",N="Google",E="Huawei",U="Microsoft",z="Motorola",C="Opera",M="Samsung",$="Sharp",B="Sony",I="Xiaomi",G="Zebra",L="Facebook",D="Chromium OS",H="Mac OS",W=function(e,i){var t={};for(var r in e)i[r]&&i[r].length%2==0?t[r]=i[r].concat(e[r]):t[r]=e[r];return t},V=function(e){for(var i={},t=0;t<e.length;t++)i[e[t].toUpperCase()]=e[t];return i},F=function(e,i){return typeof e===l&&-1!==Z(i).indexOf(Z(e))},Z=function(e){return e.toLowerCase()},J=function(e,i){if(typeof e===l)return e=e.replace(/^\s\s*/,""),typeof i===c?e:e.substring(0,350)},X=function(e,i){for(var t,r,o,n,a,c,l=0;l<i.length&&!a;){var b=i[l],w=i[l+1];for(t=r=0;t<b.length&&!a&&b[t];)if(a=b[t++].exec(e))for(o=0;o<w.length;o++)c=a[++r],typeof(n=w[o])===d&&n.length>0?2===n.length?typeof n[1]==u?this[n[0]]=n[1].call(this,c):this[n[0]]=n[1]:3===n.length?typeof n[1]!==u||n[1].exec&&n[1].test?this[n[0]]=c?c.replace(n[1],n[2]):void 0:this[n[0]]=c?n[1].call(this,c,n[2]):void 0:4===n.length&&(this[n[0]]=c?n[3].call(this,c.replace(n[1],n[2])):void 0):this[n]=c||s;l+=2}},K=function(e,i){for(var t in i)if(typeof i[t]===d&&i[t].length>0){for(var r=0;r<i[t].length;r++)if(F(i[t][r],e))return"?"===t?s:t}else if(F(i[t],e))return"?"===t?s:t;return e},Q={ME:"4.90","NT 3.11":"NT3.51","NT 4.0":"NT4.0",2e3:"NT 5.0",XP:["NT 5.1","NT 5.2"],Vista:"NT 6.0",7:"NT 6.1",8:"NT 6.2",8.1:"NT 6.3",10:["NT 6.4","NT 10.0"],RT:"ARM"},Y={browser:[[/\b(?:crmo|crios)\/([\w\.]+)/i],[h,[p,"Chrome"]],[/edg(?:e|ios|a)?\/([\w\.]+)/i],[h,[p,"Edge"]],[/(opera mini)\/([-\w\.]+)/i,/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i],[p,h],[/opios[\/ ]+([\w\.]+)/i],[h,[p,C+" Mini"]],[/\bopr\/([\w\.]+)/i],[h,[p,C]],[/(kindle)\/([\w\.]+)/i,/(lunascape|maxthon|netfront|jasmine|blazer)[\/ ]?([\w\.]*)/i,/(avant |iemobile|slim)(?:browser)?[\/ ]?([\w\.]*)/i,/(ba?idubrowser)[\/ ]?([\w\.]+)/i,/(?:ms|\()(ie) ([\w\.]+)/i,/(flock|rockmelt|midori|epiphany|silk|skyfire|bolt|iron|vivaldi|iridium|phantomjs|bowser|quark|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|qq|duckduckgo)\/([-\w\.]+)/i,/(heytap|ovi)browser\/([\d\.]+)/i,/(weibo)__([\d\.]+)/i],[p,h],[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],[h,[p,"UC"+q]],[/microm.+\bqbcore\/([\w\.]+)/i,/\bqbcore\/([\w\.]+).+microm/i],[h,[p,"WeChat(Win) Desktop"]],[/micromessenger\/([\w\.]+)/i],[h,[p,"WeChat"]],[/konqueror\/([\w\.]+)/i],[h,[p,"Konqueror"]],[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],[h,[p,"IE"]],[/ya(?:search)?browser\/([\w\.]+)/i],[h,[p,"Yandex"]],[/(avast|avg)\/([\w\.]+)/i],[[p,/(.+)/,"$1 Secure "+q],h],[/\bfocus\/([\w\.]+)/i],[h,[p,T+" Focus"]],[/\bopt\/([\w\.]+)/i],[h,[p,C+" Touch"]],[/coc_coc\w+\/([\w\.]+)/i],[h,[p,"Coc Coc"]],[/dolfin\/([\w\.]+)/i],[h,[p,"Dolphin"]],[/coast\/([\w\.]+)/i],[h,[p,C+" Coast"]],[/miuibrowser\/([\w\.]+)/i],[h,[p,"MIUI "+q]],[/fxios\/([-\w\.]+)/i],[h,[p,T]],[/\bqihu|(qi?ho?o?|360)browser/i],[[p,"360 "+q]],[/(oculus|samsung|sailfish|huawei)browser\/([\w\.]+)/i],[[p,/(.+)/,"$1 "+q],h],[/(comodo_dragon)\/([\w\.]+)/i],[[p,/_/g," "],h],[/(electron)\/([\w\.]+) safari/i,/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,/m?(qqbrowser|baiduboxapp|2345Explorer)[\/ ]?([\w\.]+)/i],[p,h],[/(metasr)[\/ ]?([\w\.]+)/i,/(lbbrowser)/i,/\[(linkedin)app\]/i],[p],[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],[[p,L],h],[/(kakao(?:talk|story))[\/ ]([\w\.]+)/i,/(naver)\(.*?(\d+\.[\w\.]+).*\)/i,/safari (line)\/([\w\.]+)/i,/\b(line)\/([\w\.]+)\/iab/i,/(chromium|instagram)[\/ ]([-\w\.]+)/i],[p,h],[/\bgsa\/([\w\.]+) .*safari\//i],[h,[p,"GSA"]],[/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i],[h,[p,"TikTok"]],[/headlesschrome(?:\/([\w\.]+)| )/i],[h,[p,A+" Headless"]],[/ wv\).+(chrome)\/([\w\.]+)/i],[[p,A+" WebView"],h],[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],[h,[p,"Android "+q]],[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],[p,h],[/version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i],[h,[p,"Mobile Safari"]],[/version\/([\w(\.|\,)]+) .*(mobile ?safari|safari)/i],[h,p],[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],[p,[h,K,{"1.0":"/8",1.2:"/1",1.3:"/3","2.0":"/412","2.0.2":"/416","2.0.3":"/417","2.0.4":"/419","?":"/"}]],[/(webkit|khtml)\/([\w\.]+)/i],[p,h],[/(navigator|netscape\d?)\/([-\w\.]+)/i],[[p,"Netscape"],h],[/mobile vr; rv:([\w\.]+)\).+firefox/i],[h,[p,T+" Reality"]],[/ekiohf.+(flow)\/([\w\.]+)/i,/(swiftfox)/i,/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror|klar)[\/ ]?([\w\.\+]+)/i,/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,/(firefox)\/([\w\.]+)/i,/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|sleipnir|obigo|mosaic|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,/(links) \(([\w\.]+)/i,/panasonic;(viera)/i],[p,h],[/(cobalt)\/([\w\.]+)/i],[p,[h,/master.|lts./,""]]],cpu:[[/(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\)]/i],[[g,"amd64"]],[/(ia32(?=;))/i],[[g,Z]],[/((?:i[346]|x)86)[;\)]/i],[[g,"ia32"]],[/\b(aarch64|arm(v?8e?l?|_?64))\b/i],[[g,"arm64"]],[/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i],[[g,"armhf"]],[/windows (ce|mobile); ppc;/i],[[g,"arm"]],[/((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i],[[g,/ower/,"",Z]],[/(sun4\w)[;\)]/i],[[g,"sparc"]],[/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i],[[g,Z]]],device:[[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],[w,[m,M],[f,x]],[/\b((?:s[cgp]h|gt|sm)-\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,/samsung[- ]([-\w]+)/i,/sec-(sgh\w+)/i],[w,[m,M],[f,y]],[/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],[w,[m,P],[f,y]],[/\((ipad);[-\w\),; ]+apple/i,/applecoremedia\/[\w\.]+ \((ipad)/i,/\b(ipad)\d\d?,\d\d?[;\]].+ios/i],[w,[m,P],[f,x]],[/(macintosh);/i],[w,[m,P]],[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],[w,[m,$],[f,y]],[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],[w,[m,E],[f,x]],[/(?:huawei|honor)([-\w ]+)[;\)]/i,/\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],[w,[m,E],[f,y]],[/\b(poco[\w ]+)(?: bui|\))/i,/\b; (\w+) build\/hm\1/i,/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite)?)(?: bui|\))/i],[[w,/_/g," "],[m,I],[f,y]],[/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i],[[w,/_/g," "],[m,I],[f,x]],[/; (\w+) bui.+ oppo/i,/\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],[w,[m,"OPPO"],[f,y]],[/vivo (\w+)(?: bui|\))/i,/\b(v[12]\d{3}\w?[at])(?: bui|;)/i],[w,[m,"Vivo"],[f,y]],[/\b(rmx[12]\d{3})(?: bui|;|\))/i],[w,[m,"Realme"],[f,y]],[/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,/\bmot(?:orola)?[- ](\w*)/i,/((?:moto[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i],[w,[m,z],[f,y]],[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],[w,[m,z],[f,x]],[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],[w,[m,"LG"],[f,x]],[/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,/\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,/\blg-?([\d\w]+) bui/i],[w,[m,"LG"],[f,y]],[/(ideatab[-\w ]+)/i,/lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i],[w,[m,"Lenovo"],[f,x]],[/(?:maemo|nokia).*(n900|lumia \d+)/i,/nokia[-_ ]?([-\w\.]*)/i],[[w,/_/g," "],[m,"Nokia"],[f,y]],[/(pixel c)\b/i],[w,[m,N],[f,x]],[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],[w,[m,N],[f,y]],[/droid.+ (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],[w,[m,B],[f,y]],[/sony tablet [ps]/i,/\b(?:sony)?sgp\w+(?: bui|\))/i],[[w,"Xperia Tablet"],[m,B],[f,x]],[/ (kb2005|in20[12]5|be20[12][59])\b/i,/(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],[w,[m,"OnePlus"],[f,y]],[/(alexa)webm/i,/(kf[a-z]{2}wi|aeo[c-r]{2})( bui|\))/i,/(kf[a-z]+)( bui|\)).+silk\//i],[w,[m,R],[f,x]],[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],[[w,/(.+)/g,"Fire Phone $1"],[m,R],[f,y]],[/(playbook);[-\w\),; ]+(rim)/i],[w,m,[f,x]],[/\b((?:bb[a-f]|st[hv])100-\d)/i,/\(bb10; (\w+)/i],[w,[m,O],[f,y]],[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],[w,[m,j],[f,x]],[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],[w,[m,j],[f,y]],[/(nexus 9)/i],[w,[m,"HTC"],[f,x]],[/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i],[m,[w,/_/g," "],[f,y]],[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],[w,[m,"Acer"],[f,x]],[/droid.+; (m[1-5] note) bui/i,/\bmz-([-\w]{2,})/i],[w,[m,"Meizu"],[f,y]],[/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron)[-_ ]?([-\w]*)/i,/(hp) ([\w ]+\w)/i,/(asus)-?(\w+)/i,/(microsoft); (lumia[\w ]+)/i,/(lenovo)[-_ ]?([-\w]+)/i,/(jolla)/i,/(oppo) ?([\w ]+) bui/i],[m,w,[f,y]],[/(kobo)\s(ereader|touch)/i,/(archos) (gamepad2?)/i,/(hp).+(touchpad(?!.+tablet)|tablet)/i,/(kindle)\/([\w\.]+)/i,/(nook)[\w ]+build\/(\w+)/i,/(dell) (strea[kpr\d ]*[\dko])/i,/(le[- ]+pan)[- ]+(\w{1,9}) bui/i,/(trinity)[- ]*(t\d{3}) bui/i,/(gigaset)[- ]+(q\w{1,9}) bui/i,/(vodafone) ([\w ]+)(?:\)| bui)/i],[m,w,[f,x]],[/(surface duo)/i],[w,[m,U],[f,x]],[/droid [\d\.]+; (fp\du?)(?: b|\))/i],[w,[m,"Fairphone"],[f,y]],[/(u304aa)/i],[w,[m,"AT&T"],[f,y]],[/\bsie-(\w*)/i],[w,[m,"Siemens"],[f,y]],[/\b(rct\w+) b/i],[w,[m,"RCA"],[f,x]],[/\b(venue[\d ]{2,7}) b/i],[w,[m,"Dell"],[f,x]],[/\b(q(?:mv|ta)\w+) b/i],[w,[m,"Verizon"],[f,x]],[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],[w,[m,"Barnes & Noble"],[f,x]],[/\b(tm\d{3}\w+) b/i],[w,[m,"NuVision"],[f,x]],[/\b(k88) b/i],[w,[m,"ZTE"],[f,x]],[/\b(nx\d{3}j) b/i],[w,[m,"ZTE"],[f,y]],[/\b(gen\d{3}) b.+49h/i],[w,[m,"Swiss"],[f,y]],[/\b(zur\d{3}) b/i],[w,[m,"Swiss"],[f,x]],[/\b((zeki)?tb.*\b) b/i],[w,[m,"Zeki"],[f,x]],[/\b([yr]\d{2}) b/i,/\b(dragon[- ]+touch |dt)(\w{5}) b/i],[[m,"Dragon Touch"],w,[f,x]],[/\b(ns-?\w{0,9}) b/i],[w,[m,"Insignia"],[f,x]],[/\b((nxa|next)-?\w{0,9}) b/i],[w,[m,"NextBook"],[f,x]],[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],[[m,"Voice"],w,[f,y]],[/\b(lvtel\-)?(v1[12]) b/i],[[m,"LvTel"],w,[f,y]],[/\b(ph-1) /i],[w,[m,"Essential"],[f,y]],[/\b(v(100md|700na|7011|917g).*\b) b/i],[w,[m,"Envizen"],[f,x]],[/\b(trio[-\w\. ]+) b/i],[w,[m,"MachSpeed"],[f,x]],[/\btu_(1491) b/i],[w,[m,"Rotor"],[f,x]],[/(shield[\w ]+) b/i],[w,[m,"Nvidia"],[f,x]],[/(sprint) (\w+)/i],[m,w,[f,y]],[/(kin\.[onetw]{3})/i],[[w,/\./g," "],[m,U],[f,y]],[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],[w,[m,G],[f,x]],[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],[w,[m,G],[f,y]],[/smart-tv.+(samsung)/i],[m,[f,k]],[/hbbtv.+maple;(\d+)/i],[[w,/^/,"SmartTV"],[m,M],[f,k]],[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],[[m,"LG"],[f,k]],[/(apple) ?tv/i],[m,[w,P+" TV"],[f,k]],[/crkey/i],[[w,A+"cast"],[m,N],[f,k]],[/droid.+aft(\w)( bui|\))/i],[w,[m,R],[f,k]],[/\(dtv[\);].+(aquos)/i,/(aquos-tv[\w ]+)\)/i],[w,[m,$],[f,k]],[/(bravia[\w ]+)( bui|\))/i],[w,[m,B],[f,k]],[/(mitv-\w{5}) bui/i],[w,[m,I],[f,k]],[/Hbbtv.*(technisat) (.*);/i],[m,w,[f,k]],[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i,/hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],[[m,J],[w,J],[f,k]],[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],[[f,k]],[/(ouya)/i,/(nintendo) ([wids3utch]+)/i],[m,w,[f,v]],[/droid.+; (shield) bui/i],[w,[m,"Nvidia"],[f,v]],[/(playstation [345portablevi]+)/i],[w,[m,B],[f,v]],[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],[w,[m,U],[f,v]],[/((pebble))app/i],[m,w,[f,S]],[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],[w,[m,P],[f,S]],[/droid.+; (glass) \d/i],[w,[m,N],[f,S]],[/droid.+; (wt63?0{2,3})\)/i],[w,[m,G],[f,S]],[/(quest( 2| pro)?)/i],[w,[m,L],[f,S]],[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],[m,[f,_]],[/(aeobc)\b/i],[w,[m,R],[f,_]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+? mobile safari/i],[w,[f,y]],[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],[w,[f,x]],[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],[[f,x]],[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],[[f,y]],[/(android[-\w\. ]{0,9});.+buil/i],[w,[m,"Generic"]]],engine:[[/windows.+ edge\/([\w\.]+)/i],[h,[p,"EdgeHTML"]],[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],[h,[p,"Blink"]],[/(presto)\/([\w\.]+)/i,/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna)\/([\w\.]+)/i,/ekioh(flow)\/([\w\.]+)/i,/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,/(icab)[\/ ]([23]\.[\d\.]+)/i,/\b(libweb)/i],[p,h],[/rv\:([\w\.]{1,9})\b.+(gecko)/i],[h,p]],os:[[/microsoft (windows) (vista|xp)/i],[p,h],[/(windows) nt 6\.2; (arm)/i,/(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i,/(windows)[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i],[p,[h,K,Q]],[/(win(?=3|9|n)|win 9x )([nt\d\.]+)/i],[[p,"Windows"],[h,K,Q]],[/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,/ios;fbsv\/([\d\.]+)/i,/cfnetwork\/.+darwin/i],[[h,/_/g,"."],[p,"iOS"]],[/(mac os x) ?([\w\. ]*)/i,/(macintosh|mac_powerpc\b)(?!.+haiku)/i],[[p,H],[h,/_/g,"."]],[/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],[h,p],[/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish)[-\/ ]?([\w\.]*)/i,/(blackberry)\w*\/([\w\.]*)/i,/(tizen|kaios)[\/ ]([\w\.]+)/i,/\((series40);/i],[p,h],[/\(bb(10);/i],[h,[p,O]],[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i],[h,[p,"Symbian"]],[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],[h,[p,T+" OS"]],[/web0s;.+rt(tv)/i,/\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],[h,[p,"webOS"]],[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],[h,[p,"watchOS"]],[/crkey\/([\d\.]+)/i],[h,[p,A+"cast"]],[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],[[p,D],h],[/panasonic;(viera)/i,/(netrange)mmh/i,/(nettv)\/(\d+\.[\w\.]+)/i,/(nintendo|playstation) ([wids345portablevuch]+)/i,/(xbox); +xbox ([^\);]+)/i,/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,/(mint)[\/\(\) ]?(\w*)/i,/(mageia|vectorlinux)[; ]/i,/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,/(hurd|linux) ?([\w\.]*)/i,/(gnu) ?([\w\.]*)/i,/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,/(haiku) (\w+)/i],[p,h],[/(sunos) ?([\w\.\d]*)/i],[[p,"Solaris"],h],[/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i,/(unix) ?([\w\.]*)/i],[p,h]]},ee=function(e,i){if(typeof e===d&&(i=e,e=s),!(this instanceof ee))return new ee(e,i).getResult();var t=typeof a!==c&&a.navigator?a.navigator:s,r=e||(t&&t.userAgent?t.userAgent:""),o=t&&t.userAgentData?t.userAgentData:s,n=i?W(Y,i):Y,v=t&&t.userAgent==r;return this.getBrowser=function(){var e,i={};return i[p]=s,i[h]=s,X.call(i,r,n.browser),i[b]=typeof(e=i[h])===l?e.replace(/[^\d\.]/g,"").split(".")[0]:s,v&&t&&t.brave&&typeof t.brave.isBrave==u&&(i[p]="Brave"),i},this.getCPU=function(){var e={};return e[g]=s,X.call(e,r,n.cpu),e},this.getDevice=function(){var e={};return e[m]=s,e[w]=s,e[f]=s,X.call(e,r,n.device),v&&!e[f]&&o&&o.mobile&&(e[f]=y),v&&"Macintosh"==e[w]&&t&&typeof t.standalone!==c&&t.maxTouchPoints&&t.maxTouchPoints>2&&(e[w]="iPad",e[f]=x),e},this.getEngine=function(){var e={};return e[p]=s,e[h]=s,X.call(e,r,n.engine),e},this.getOS=function(){var e={};return e[p]=s,e[h]=s,X.call(e,r,n.os),v&&!e[p]&&o&&"Unknown"!=o.platform&&(e[p]=o.platform.replace(/chrome os/i,D).replace(/macos/i,H)),e},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return r},this.setUA=function(e){return r=typeof e===l&&e.length>350?J(e,350):e,this},this.setUA(r),this};ee.VERSION="1.0.35",ee.BROWSER=V([p,h,b]),ee.CPU=V([g]),ee.DEVICE=V([w,m,f,v,y,k,x,S,_]),ee.ENGINE=ee.OS=V([p,h]),typeof n!==c?(o.exports&&(n=o.exports=ee),n.UAParser=ee):t.amdO?void 0!==(r=(function(){return ee}).call(i,t,i,e))&&(e.exports=r):typeof a!==c&&(a.UAParser=ee);var ei=typeof a!==c&&(a.jQuery||a.Zepto);if(ei&&!ei.ua){var et=new ee;ei.ua=et.getResult(),ei.ua.get=function(){return et.getUA()},ei.ua.set=function(e){et.setUA(e);var i=et.getResult();for(var t in i)ei.ua[t]=i[t]}}}("object"==typeof window?window:this)}},n={};function a(e){var i=n[e];if(void 0!==i)return i.exports;var t=n[e]={exports:{}},r=!0;try{o[e].call(t.exports,t,t.exports,a),r=!1}finally{r&&delete n[e]}return t.exports}a.ab=__dirname+"/";var s=a(226);e.exports=s})()},6050:(e,i,t)=>{"use strict";Object.defineProperty(i,"__esModule",{value:!0}),Object.defineProperty(i,"after",{enumerable:!0,get:function(){return o}});let r=t(9294);function o(e){let i=r.workAsyncStorage.getStore();if(!i)throw Error("`after` was called outside a request scope. Read more: https://nextjs.org/docs/messages/next-dynamic-api-wrong-context");let{afterContext:t}=i;return t.after(e)}},5036:(e,i,t)=>{"use strict";Object.defineProperty(i,"__esModule",{value:!0}),function(e,i){Object.keys(e).forEach(function(t){"default"===t||Object.prototype.hasOwnProperty.call(i,t)||Object.defineProperty(i,t,{enumerable:!0,get:function(){return e[t]}})})}(t(6050),i)},6807:(e,i,t)=>{"use strict";Object.defineProperty(i,"__esModule",{value:!0}),Object.defineProperty(i,"connection",{enumerable:!0,get:function(){return c}});let r=t(9294),o=t(3033),n=t(436),a=t(2312),s=t(457),u=t(4982);function c(){let e=r.workAsyncStorage.getStore(),i=o.workUnitAsyncStorage.getStore();if(e){if(i&&"after"===i.phase&&!(0,u.isRequestAPICallableInsideAfter)())throw Error(`Route ${e.route} used "connection" inside "after(...)". The \`connection()\` function is used to indicate the subsequent code must only run when there is an actual Request, but "after(...)" executes after the request, so this function is not allowed in this scope. See more info here: https://nextjs.org/docs/canary/app/api-reference/functions/after`);if(e.forceStatic)return Promise.resolve(void 0);if(i){if("cache"===i.type)throw Error(`Route ${e.route} used "connection" inside "use cache". The \`connection()\` function is used to indicate the subsequent code must only run when there is an actual Request, but caches must be able to be produced before a Request so this function is not allowed in this scope. See more info here: https://nextjs.org/docs/messages/next-request-in-use-cache`);if("unstable-cache"===i.type)throw Error(`Route ${e.route} used "connection" inside a function cached with "unstable_cache(...)". The \`connection()\` function is used to indicate the subsequent code must only run when there is an actual Request, but caches must be able to be produced before a Request so this function is not allowed in this scope. See more info here: https://nextjs.org/docs/app/api-reference/functions/unstable_cache`)}if(e.dynamicShouldError)throw new a.StaticGenBailoutError(`Route ${e.route} with \`dynamic = "error"\` couldn't be rendered statically because it used \`connection\`. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering`);if(i){if("prerender"===i.type)return(0,s.makeHangingPromise)(i.renderSignal,"`connection()`");"prerender-ppr"===i.type?(0,n.postponeWithTracking)(e.route,"connection",i.dynamicTracking):"prerender-legacy"===i.type&&(0,n.throwToInterruptStaticGeneration)("connection",e,i)}(0,n.trackDynamicDataInDynamicRender)(e,i)}return Promise.resolve(void 0)}},4982:(e,i,t)=>{"use strict";Object.defineProperty(i,"__esModule",{value:!0}),function(e,i){for(var t in i)Object.defineProperty(e,t,{enumerable:!0,get:i[t]})}(i,{describeHasCheckingStringProperty:function(){return s},describeStringPropertyAccess:function(){return a},isRequestAPICallableInsideAfter:function(){return d},throwWithStaticGenerationBailoutError:function(){return u},throwWithStaticGenerationBailoutErrorWithDynamicError:function(){return c},wellKnownProperties:function(){return l}});let r=t(2312),o=t(3295),n=/^[A-Za-z_$][A-Za-z0-9_$]*$/;function a(e,i){return n.test(i)?`\`${e}.${i}\``:`\`${e}[${JSON.stringify(i)}]\``}function s(e,i){let t=JSON.stringify(i);return`\`Reflect.has(${e}, ${t})\`, \`${t} in ${e}\`, or similar`}function u(e,i){throw new r.StaticGenBailoutError(`Route ${e} couldn't be rendered statically because it used ${i}. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering`)}function c(e,i){throw new r.StaticGenBailoutError(`Route ${e} with \`dynamic = "error"\` couldn't be rendered statically because it used ${i}. See more info here: https://nextjs.org/docs/app/building-your-application/rendering/static-and-dynamic#dynamic-rendering`)}function d(){let e=o.afterTaskAsyncStorage.getStore();return(null==e?void 0:e.rootTaskSpawnPhase)==="action"}let l=new Set(["hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toString","valueOf","toLocaleString","then","catch","finally","status","displayName","toJSON","$$typeof","__esModule"])},2706:(e,i,t)=>{"use strict";e.exports=t(4870)},1520:(e,i,t)=>{"use strict";Object.defineProperty(i,"__esModule",{value:!0}),function(e,i){for(var t in i)Object.defineProperty(e,t,{enumerable:!0,get:i[t]})}(i,{ImageResponse:function(){return r.ImageResponse},NextRequest:function(){return o.NextRequest},NextResponse:function(){return n.NextResponse},URLPattern:function(){return s.URLPattern},after:function(){return u.after},connection:function(){return c.connection},userAgent:function(){return a.userAgent},userAgentFromString:function(){return a.userAgentFromString}});let r=t(4159),o=t(1639),n=t(4899),a=t(2215),s=t(1512),u=t(5036),c=t(6807)},614:(e,i)=>{"use strict";Object.defineProperty(i,"__esModule",{value:!0}),Object.defineProperty(i,"ReflectAdapter",{enumerable:!0,get:function(){return t}});class t{static get(e,i,t){let r=Reflect.get(e,i,t);return"function"==typeof r?r.bind(e):r}static set(e,i,t,r){return Reflect.set(e,i,t,r)}static has(e,i){return Reflect.has(e,i)}static deleteProperty(e,i){return Reflect.deleteProperty(e,i)}}},4159:(e,i)=>{"use strict";function t(){throw Error('ImageResponse moved from "next/server" to "next/og" since Next.js 14, please import from "next/og" instead')}Object.defineProperty(i,"__esModule",{value:!0}),Object.defineProperty(i,"ImageResponse",{enumerable:!0,get:function(){return t}})},4899:(e,i,t)=>{"use strict";Object.defineProperty(i,"__esModule",{value:!0}),Object.defineProperty(i,"NextResponse",{enumerable:!0,get:function(){return l}});let r=t(9181),o=t(9619),n=t(5225),a=t(614),s=t(9181),u=Symbol("internal response"),c=new Set([301,302,303,307,308]);function d(e,i){var t;if(null==e?void 0:null==(t=e.request)?void 0:t.headers){if(!(e.request.headers instanceof Headers))throw Error("request.headers must be an instance of Headers");let t=[];for(let[r,o]of e.request.headers)i.set("x-middleware-request-"+r,o),t.push(r);i.set("x-middleware-override-headers",t.join(","))}}class l extends Response{constructor(e,i={}){super(e,i);let t=this.headers,c=new Proxy(new s.ResponseCookies(t),{get(e,o,n){switch(o){case"delete":case"set":return(...n)=>{let a=Reflect.apply(e[o],e,n),u=new Headers(t);return a instanceof s.ResponseCookies&&t.set("x-middleware-set-cookie",a.getAll().map(e=>(0,r.stringifyCookie)(e)).join(",")),d(i,u),a};default:return a.ReflectAdapter.get(e,o,n)}}});this[u]={cookies:c,url:i.url?new o.NextURL(i.url,{headers:(0,n.toNodeOutgoingHttpHeaders)(t),nextConfig:i.nextConfig}):void 0}}[Symbol.for("edge-runtime.inspect.custom")](){return{cookies:this.cookies,url:this.url,body:this.body,bodyUsed:this.bodyUsed,headers:Object.fromEntries(this.headers),ok:this.ok,redirected:this.redirected,status:this.status,statusText:this.statusText,type:this.type}}get cookies(){return this[u].cookies}static json(e,i){let t=Response.json(e,i);return new l(t.body,t)}static redirect(e,i){let t="number"==typeof i?i:(null==i?void 0:i.status)??307;if(!c.has(t))throw RangeError('Failed to execute "redirect" on "response": Invalid status code');let r="object"==typeof i?i:{},o=new Headers(null==r?void 0:r.headers);return o.set("Location",(0,n.validateURL)(e)),new l(null,{...r,headers:o,status:t})}static rewrite(e,i){let t=new Headers(null==i?void 0:i.headers);return t.set("x-middleware-rewrite",(0,n.validateURL)(e)),d(i,t),new l(null,{...i,headers:t})}static next(e){let i=new Headers(null==e?void 0:e.headers);return i.set("x-middleware-next","1"),d(e,i),new l(null,{...e,headers:i})}}},1512:(e,i)=>{"use strict";Object.defineProperty(i,"__esModule",{value:!0}),Object.defineProperty(i,"URLPattern",{enumerable:!0,get:function(){return t}});let t="undefined"==typeof URLPattern?void 0:URLPattern},2215:(e,i,t)=>{"use strict";Object.defineProperty(i,"__esModule",{value:!0}),function(e,i){for(var t in i)Object.defineProperty(e,t,{enumerable:!0,get:i[t]})}(i,{isBot:function(){return o},userAgent:function(){return a},userAgentFromString:function(){return n}});let r=function(e){return e&&e.__esModule?e:{default:e}}(t(4446));function o(e){return/Googlebot|Mediapartners-Google|AdsBot-Google|googleweblight|Storebot-Google|Google-PageRenderer|Google-InspectionTool|Bingbot|BingPreview|Slurp|DuckDuckBot|baiduspider|yandex|sogou|LinkedInBot|bitlybot|tumblr|vkShare|quora link preview|facebookexternalhit|facebookcatalog|Twitterbot|applebot|redditbot|Slackbot|Discordbot|WhatsApp|SkypeUriPreview|ia_archiver/i.test(e)}function n(e){return{...(0,r.default)(e),isBot:void 0!==e&&o(e)}}function a({headers:e}){return n(e.get("user-agent")||void 0)}}};
@@ -0,0 +1 @@
1
+ "use strict";exports.id=487,exports.ids=[487],exports.modules={3868:(e,t,r)=>{r.d(t,{executeLocalSQL:()=>h,k5:()=>u,n3:()=>g,w1:()=>f});var a=r(5511),s=r(3873),l=r(9021),i=r(7550),n=r(1804);let c=s.join(".wrangler","state","v3","d1","miniflare-D1DatabaseObject"),o=new Map;function d(e,t){let r=s.join(e,c);if(!l.existsSync(r))return null;let{database_id:i,database_name:o,binding:d}=t,u=[i,o,d].filter(Boolean),f=["","miniflare-D1DatabaseObject:","D1DatabaseObject:","d1:"],h=u.flatMap(e=>f.map(t=>{var r;return r=`${t}${e}`,a.createHash("sha256").update(r).digest("hex")})).map(e=>s.join(r,`${e}.sqlite`)).find(e=>l.existsSync(e));if(h)return h;let g=l.readdirSync(r).filter(e=>e.endsWith(".sqlite")).map(e=>({name:e,fullPath:s.join(r,e),mtime:l.statSync(s.join(r,e)).mtimeMs})).sort((e,t)=>t.mtime-e.mtime);return 1===g.length?g[0].fullPath:(g.length>1&&n.A.debug(`[local-db] Multiple SQLite files, no hash matched — falling back to wrangler CLI. dir=${r}, tried ids=${JSON.stringify(u)}`),n.A.debug(`[local-db] No SQLite files found. dir=${r}, tried ids=${JSON.stringify(u)}`),null)}function u(e,t){return null!==d(e,t)}function f(e,t){let r=`${e}:${t.database_name}`,a=d(e,t);if(o.has(r)){let e=o.get(r);if(e.path!==a){try{e.db.close()}catch{}o.delete(r)}else try{return e.db.prepare("SELECT 1").get(),e.db}catch{o.delete(r)}}if(!a)return null;try{let e=new i(a,{fileMustExist:!1});return e.pragma("journal_mode = WAL"),e.pragma("foreign_keys = ON"),o.set(r,{db:e,path:a}),e}catch{return null}}function h(e,t,r){let a=f(e,t);if(!a)return null;let s=r.trim(),l=s.toUpperCase().replace(/\s+/g," "),i=s.split(";").map(e=>e.trim()).filter(Boolean);if(i.length>1){let e=[],t=0,r=0;return a.transaction(()=>{for(let s of i){let l=s.toUpperCase().replace(/\s+/g," ");if(l.startsWith("SELECT")||l.startsWith("PRAGMA")||l.startsWith("EXPLAIN")){let t=a.prepare(s).all();e=e.concat(t)}else{let e=a.prepare(s).run();t+=e.changes,r=e.lastInsertRowid}}})(),JSON.stringify([{results:e,success:!0,meta:{changes:t,last_row_id:r,rows_read:e.length,rows_written:t}}])}if(l.startsWith("SELECT")||l.startsWith("PRAGMA")||l.startsWith("EXPLAIN")){let e=a.prepare(s).all();return JSON.stringify([{results:e,success:!0,meta:{rows_read:e.length,rows_written:0,changed_db:!1}}])}let n=a.prepare(s).run();return JSON.stringify([{results:[],success:!0,meta:{changes:n.changes,last_row_id:n.lastInsertRowid,rows_read:0,rows_written:n.changes,changed_db:n.changes>0}}])}function g(e,t){let r=`${e}:${t}`,a=o.get(r);if(a){try{a.db.close()}catch{}o.delete(r)}}}};
@@ -1 +1 @@
1
- exports.id=572,exports.ids=[572],exports.modules={4807:(e,t,r)=>{Promise.resolve().then(r.t.bind(r,3219,23)),Promise.resolve().then(r.t.bind(r,4863,23)),Promise.resolve().then(r.t.bind(r,5155,23)),Promise.resolve().then(r.t.bind(r,802,23)),Promise.resolve().then(r.t.bind(r,9350,23)),Promise.resolve().then(r.t.bind(r,8530,23)),Promise.resolve().then(r.t.bind(r,8921,23))},6655:(e,t,r)=>{Promise.resolve().then(r.t.bind(r,6959,23)),Promise.resolve().then(r.t.bind(r,3875,23)),Promise.resolve().then(r.t.bind(r,8903,23)),Promise.resolve().then(r.t.bind(r,7174,23)),Promise.resolve().then(r.t.bind(r,4178,23)),Promise.resolve().then(r.t.bind(r,7190,23)),Promise.resolve().then(r.t.bind(r,1365,23))},5988:(e,t,r)=>{Promise.resolve().then(r.bind(r,3164)),Promise.resolve().then(r.bind(r,1831))},2020:(e,t,r)=>{Promise.resolve().then(r.bind(r,2652)),Promise.resolve().then(r.bind(r,2899))},2652:(e,t,r)=>{"use strict";r.d(t,{Toaster:()=>v});var a=r(5512),s=r(6888),o=r(8009),i=r(8952),n=r(1643),c=r(1255),l=r(3603);let d=i.Kq,u=o.forwardRef(({className:e,...t},r)=>(0,a.jsx)(i.LM,{ref:r,className:(0,l.cn)("fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",e),...t}));u.displayName=i.LM.displayName;let h=(0,n.F)("group pointer-events-auto relative flex w-full items-center justify-between space-x-2 overflow-hidden rounded-md border p-4 pr-6 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full",{variants:{variant:{default:"border bg-background text-foreground",destructive:"destructive group border-destructive bg-destructive text-destructive-foreground"}},defaultVariants:{variant:"default"}}),p=o.forwardRef(({className:e,variant:t,...r},s)=>(0,a.jsx)(i.bL,{ref:s,className:(0,l.cn)(h({variant:t}),e),...r}));p.displayName=i.bL.displayName,o.forwardRef(({className:e,...t},r)=>(0,a.jsx)(i.rc,{ref:r,className:(0,l.cn)("inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium transition-colors hover:bg-secondary focus:outline-none focus:ring-1 focus:ring-ring disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-muted/40 group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground group-[.destructive]:focus:ring-destructive",e),...t})).displayName=i.rc.displayName;let m=o.forwardRef(({className:e,...t},r)=>(0,a.jsx)(i.bm,{ref:r,className:(0,l.cn)("absolute right-1 top-1 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-1 group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",e),"toast-close":"",...t,children:(0,a.jsx)(c.A,{className:"h-4 w-4"})}));m.displayName=i.bm.displayName;let f=o.forwardRef(({className:e,...t},r)=>(0,a.jsx)(i.hE,{ref:r,className:(0,l.cn)("text-sm font-semibold [&+div]:text-xs",e),...t}));f.displayName=i.hE.displayName;let b=o.forwardRef(({className:e,...t},r)=>(0,a.jsx)(i.VY,{ref:r,className:(0,l.cn)("text-sm opacity-90",e),...t}));function v(){let{toasts:e}=(0,s.dj)();return(0,a.jsxs)(d,{children:[e.map(function({id:e,title:t,description:r,action:s,...o}){return(0,a.jsxs)(p,{...o,children:[(0,a.jsxs)("div",{className:"grid gap-1",children:[t&&(0,a.jsx)(f,{children:t}),r&&(0,a.jsx)(b,{children:r})]}),s,(0,a.jsx)(m,{})]},e)}),(0,a.jsx)(u,{})]})}b.displayName=i.VY.displayName},8180:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>u,metadata:()=>d});var a=r(2740),s=r(7944),o=r.n(s),i=r(5510),n=r.n(i);r(1135);var c=r(1831),l=r(3164);let d={title:"d1-studio",description:"Native D1 database studio."};function u({children:e}){return(0,a.jsx)("html",{lang:"en",children:(0,a.jsx)("body",{className:`${o().variable} ${n().variable} antialiased`,children:(0,a.jsxs)(c.DatabaseProvider,{children:[e,(0,a.jsx)(l.Toaster,{})," "]})})})}},3164:(e,t,r)=>{"use strict";r.d(t,{Toaster:()=>a});let a=(0,r(6760).registerClientReference)(function(){throw Error("Attempted to call Toaster() from the server but Toaster 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.")},"/Volumes/ProjectSpace/_wip/d1studio/src/components/ui/toaster.jsx","Toaster")},1135:()=>{},2899:(e,t,r)=>{"use strict";r.d(t,{DatabaseProvider:()=>u,t:()=>h});var a=r(5512),s=r(8009),o=r(6888);let i=new Map;function n(e,t,r=2e3){let a=i.get(e);if(a&&Date.now()-a.timestamp<r)return a.promise;let s=t();return i.set(e,{promise:s,timestamp:Date.now()}),s.finally(()=>{setTimeout(()=>{i.delete(e)},r)}),s}let c=(0,s.createContext)(void 0);class l{constructor(){this.cache=new Map}get(e){return this.cache.get(e)||null}set(e,t,r,a){this.cache.set(e,{data:t,schema:r,meta:a,timestamp:Date.now()})}update(e,t,r,a){let s=this.cache.get(e);s&&this.cache.set(e,{data:t||s.data,schema:r||s.schema,meta:a||s.meta,timestamp:Date.now()})}invalidate(e){this.cache.delete(e)}clear(){this.cache.clear()}}class d{constructor(){this.queue=[],this.processing=!1}async add(e){return new Promise((t,r)=>{this.queue.push({operation:e,resolve:t,reject:r}),this.process()})}async process(){if(this.processing||0===this.queue.length)return;this.processing=!0;let{operation:e,resolve:t,reject:r}=this.queue.shift();try{let r=await e();t(r)}catch(e){r(e)}finally{this.processing=!1,this.process()}}}function u({children:e}){let{toast:t}=(0,o.dj)(),[r,i]=(0,s.useState)([]),[u,h]=(0,s.useState)(!0),[p,m]=(0,s.useState)(null),[f,b]=(0,s.useState)(null);(0,s.useRef)(new d);let[v,w]=(0,s.useState)(null),y=(0,s.useRef)(new l).current,g=(0,s.useCallback)((e,t=1,r=50)=>{let a=`table-${e}-${t}-${r}`;return y.get(a)},[]),x=(0,s.useCallback)(e=>{y.cache.forEach((t,r)=>{r.startsWith(`table-${e}-`)&&y.invalidate(r)})},[]),S=(0,s.useCallback)((e,t,r,a,s=1,o=50)=>{let i=`table-${e}-${s}-${o}`;y.update(i,t,r,a)},[]),T=(0,s.useCallback)(async e=>n(`query-${e}`,async()=>{try{let t=await fetch("/api/query",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({query:e})});if(!t.ok){let e="Failed to execute query";try{let r=await t.json();e=r?.error?.message||e}catch(e){}throw Error(e)}let r=await t.json();if(!r.success)throw Error(r.error||"Query execution failed");return r}catch(e){throw e||Error("An unknown error occurred")}},1e3),[]),j=(0,s.useCallback)(async e=>{try{let t=await fetch(`/api/tables/${e}`),r=await t.json();if(!t.ok||!r.success)throw Error(r.error||"Failed to fetch table schema");return r.schema||[]}catch(e){throw console.error("Schema fetch error:",e),t({variant:"destructive",title:"Schema Fetch Failed",description:e.message}),e}},[t]),P=(0,s.useCallback)(async(e,r={})=>{let{forceFetch:a=!1,page:s=1,limit:o=50}=r,i=`table-${e}-${s}-${o}`;if(!a){let e=y.get(i);if(e)return e}return n(`table-${e}-${s}-${o}`,async()=>{try{let t=await fetch(`/api/tables/${e}?page=${s}&limit=${o}`,{headers:{"Cache-Control":"no-cache",Pragma:"no-cache"}});if(!t.ok)throw Error("Failed to fetch table data");let r=await t.json();if(!r.success)throw Error(r.error||"Failed to fetch table data");return y.set(i,r.data,r.schema,r.meta),r}catch(e){throw console.error("Error fetching table data:",e),t({variant:"destructive",title:"Data Fetch Failed",description:e.message}),e}},1e3)},[t]),E=(0,s.useCallback)(async e=>{try{return y.invalidate(e),await P(e,{forceFetch:!0})}catch(e){throw console.error("Error updating table data:",e),t({variant:"destructive",title:"Update Failed",description:e.message}),e}},[P,t]),C=(0,s.useCallback)(async(e,t={})=>(w(e),await P(e,t)),[P]),k=(0,s.useCallback)(async()=>n("refresh-tables",async()=>{h(!0),m(null);try{let e=await fetch("/api/tables");if(!e.ok)throw Error("Failed to fetch tables");let t=await e.json();if(t.error)throw Error(t.error);return i(t.tables||[]),t.tables||[]}catch(e){throw m(e.message),t({variant:"destructive",title:"Refresh Failed",description:e.message}),e}finally{h(!1)}},2e3),[t]),N=(0,s.useCallback)(async e=>{try{await T(e),y.clear(),await k(),t({title:"Success",description:"Table created successfully"})}catch(e){throw t({variant:"destructive",title:"Create Table Failed",description:e.message}),Error(`Failed to create table: ${e.message}`)}},[T,k,t]),D=(0,s.useCallback)(async e=>{try{await T(`DROP TABLE ${e};`),y.invalidate(e),await k(),t({title:"Success",description:"Table dropped successfully"})}catch(e){throw t({variant:"destructive",title:"Drop Table Failed",description:e.message}),Error(`Failed to drop table: ${e.message}`)}},[T,k,t]),$=(0,s.useCallback)(async e=>{try{let r=await fetch("/api/migrations/sync",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});if(!r.ok){let e=await r.json();throw Error(e.error?.message||"Failed to sync migrations")}let a=await r.json();return t({title:"Success",description:"Migrations synced successfully"}),a}catch(e){throw console.error("Error syncing migrations:",e),t({variant:"destructive",title:"Sync Failed",description:e.message}),e}},[t]),F=(0,s.useCallback)(async()=>{try{let e=localStorage.getItem("cf_credentials");if(!e)throw Error("No Cloudflare credentials found. Please connect to Cloudflare first.");let t=JSON.parse(e);if(!t.accountId||!t.apiToken)throw Error("Invalid credentials stored. Please reconnect to Cloudflare.");let r=await fetch("/api/pull-remote/confirm",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({accountId:t.accountId,apiToken:t.apiToken})}),a=await r.json();if(!r.ok||!a.success)throw Error(a.error?.message||"Failed to pull from remote");return y.clear(),await k(),a}catch(e){throw console.error("Error pulling from remote:",e),t({variant:"destructive",title:"Pull Failed",description:e.message}),e}},[k,t]),O=(0,s.useCallback)(async e=>{try{let t=await fetch("/api/push-remote",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),r=await t.json();if(!t.ok)throw Error(r.error?.message||"Failed to push to remote");return r}catch(e){throw console.error("Error pushing to remote:",e),e}},[t]),A=(0,s.useMemo)(()=>({tables:r,currentDatabase:f,isLoading:u,error:p,activeTable:v,refreshTables:k,executeQuery:T,fetchTableSchema:j,fetchTableData:P,updateTableData:E,createTable:N,dropTable:D,syncMigrations:$,pullFromRemote:F,pushToRemote:O,getCachedTable:g,updateTableCache:S,invalidateTable:x,switchTable:C}),[r,f,u,p,v,k,T,j,P,E,N,D,$,F,O,g,S,x,C]);return(0,a.jsx)(c.Provider,{value:A,children:e})}function h(){let e=(0,s.useContext)(c);if(!e)throw Error("useDatabase must be used within a DatabaseProvider");return e}},6888:(e,t,r)=>{"use strict";r.d(t,{dj:()=>h});var a=r(8009);let s=0,o=new Map,i=e=>{if(o.has(e))return;let t=setTimeout(()=>{o.delete(e),d({type:"REMOVE_TOAST",toastId:e})},1e6);o.set(e,t)},n=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,1)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(e=>e.id===t.toast.id?{...e,...t.toast}:e)};case"DISMISS_TOAST":{let{toastId:r}=t;return r?i(r):e.toasts.forEach(e=>{i(e.id)}),{...e,toasts:e.toasts.map(e=>e.id===r||void 0===r?{...e,open:!1}:e)}}case"REMOVE_TOAST":if(void 0===t.toastId)return{...e,toasts:[]};return{...e,toasts:e.toasts.filter(e=>e.id!==t.toastId)}}},c=[],l={toasts:[]};function d(e){l=n(l,e),c.forEach(e=>{e(l)})}function u({...e}){let t=(s=(s+1)%Number.MAX_SAFE_INTEGER).toString(),r=()=>d({type:"DISMISS_TOAST",toastId:t});return d({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:e=>{e||r()}}}),{id:t,dismiss:r,update:e=>d({type:"UPDATE_TOAST",toast:{...e,id:t}})}}function h(){let[e,t]=a.useState(l);return a.useEffect(()=>(c.push(t),()=>{let e=c.indexOf(t);e>-1&&c.splice(e,1)}),[e]),{...e,toast:u,dismiss:e=>d({type:"DISMISS_TOAST",toastId:e})}}},3603:(e,t,r)=>{"use strict";r.d(t,{cn:()=>o});var a=r(2281),s=r(4805);function o(...e){return(0,s.QP)((0,a.$)(e))}},1831:(e,t,r)=>{"use strict";r.d(t,{DatabaseProvider:()=>s});var a=r(6760);let s=(0,a.registerClientReference)(function(){throw Error("Attempted to call DatabaseProvider() from the server but DatabaseProvider 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.")},"/Volumes/ProjectSpace/_wip/d1studio/src/context/database-context.js","DatabaseProvider");(0,a.registerClientReference)(function(){throw Error("Attempted to call useDatabase() from the server but useDatabase 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.")},"/Volumes/ProjectSpace/_wip/d1studio/src/context/database-context.js","useDatabase")}};
1
+ exports.id=572,exports.ids=[572],exports.modules={4807:(e,t,r)=>{Promise.resolve().then(r.t.bind(r,3219,23)),Promise.resolve().then(r.t.bind(r,4863,23)),Promise.resolve().then(r.t.bind(r,5155,23)),Promise.resolve().then(r.t.bind(r,802,23)),Promise.resolve().then(r.t.bind(r,9350,23)),Promise.resolve().then(r.t.bind(r,8530,23)),Promise.resolve().then(r.t.bind(r,8921,23))},6655:(e,t,r)=>{Promise.resolve().then(r.t.bind(r,6959,23)),Promise.resolve().then(r.t.bind(r,3875,23)),Promise.resolve().then(r.t.bind(r,8903,23)),Promise.resolve().then(r.t.bind(r,7174,23)),Promise.resolve().then(r.t.bind(r,4178,23)),Promise.resolve().then(r.t.bind(r,7190,23)),Promise.resolve().then(r.t.bind(r,1365,23))},5988:(e,t,r)=>{Promise.resolve().then(r.bind(r,3164)),Promise.resolve().then(r.bind(r,1831))},2020:(e,t,r)=>{Promise.resolve().then(r.bind(r,2652)),Promise.resolve().then(r.bind(r,2899))},2652:(e,t,r)=>{"use strict";r.d(t,{Toaster:()=>g});var a=r(5512),s=r(6888),o=r(8009),n=r(8952),i=r(1643),l=r(1255),c=r(3603);let d=n.Kq,u=o.forwardRef(({className:e,...t},r)=>(0,a.jsx)(n.LM,{ref:r,className:(0,c.cn)("fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",e),...t}));u.displayName=n.LM.displayName;let h=(0,i.F)("group pointer-events-auto relative flex w-full items-center justify-between space-x-2 overflow-hidden rounded-md border p-4 pr-6 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full",{variants:{variant:{default:"border bg-background text-foreground",destructive:"destructive group border-destructive bg-destructive text-destructive-foreground"}},defaultVariants:{variant:"default"}}),m=o.forwardRef(({className:e,variant:t,...r},s)=>(0,a.jsx)(n.bL,{ref:s,className:(0,c.cn)(h({variant:t}),e),...r}));m.displayName=n.bL.displayName,o.forwardRef(({className:e,...t},r)=>(0,a.jsx)(n.rc,{ref:r,className:(0,c.cn)("inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium transition-colors hover:bg-secondary focus:outline-none focus:ring-1 focus:ring-ring disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-muted/40 group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground group-[.destructive]:focus:ring-destructive",e),...t})).displayName=n.rc.displayName;let p=o.forwardRef(({className:e,...t},r)=>(0,a.jsx)(n.bm,{ref:r,className:(0,c.cn)("absolute right-1 top-1 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-1 group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",e),"toast-close":"",...t,children:(0,a.jsx)(l.A,{className:"h-4 w-4"})}));p.displayName=n.bm.displayName;let f=o.forwardRef(({className:e,...t},r)=>(0,a.jsx)(n.hE,{ref:r,className:(0,c.cn)("text-sm font-semibold [&+div]:text-xs",e),...t}));f.displayName=n.hE.displayName;let b=o.forwardRef(({className:e,...t},r)=>(0,a.jsx)(n.VY,{ref:r,className:(0,c.cn)("text-sm opacity-90",e),...t}));function g(){let{toasts:e}=(0,s.dj)();return(0,a.jsxs)(d,{children:[e.map(function({id:e,title:t,description:r,action:s,...o}){return(0,a.jsxs)(m,{...o,children:[(0,a.jsxs)("div",{className:"grid gap-1",children:[t&&(0,a.jsx)(f,{children:t}),r&&(0,a.jsx)(b,{children:r})]}),s,(0,a.jsx)(p,{})]},e)}),(0,a.jsx)(u,{})]})}b.displayName=n.VY.displayName},8180:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>u,metadata:()=>d});var a=r(2740),s=r(7944),o=r.n(s),n=r(5510),i=r.n(n);r(1135);var l=r(1831),c=r(3164);let d={title:"d1-studio",description:"Native D1 database studio."};function u({children:e}){return(0,a.jsx)("html",{lang:"en",children:(0,a.jsx)("body",{className:`${o().variable} ${i().variable} antialiased`,children:(0,a.jsxs)(l.DatabaseProvider,{children:[e,(0,a.jsx)(c.Toaster,{})," "]})})})}},3164:(e,t,r)=>{"use strict";r.d(t,{Toaster:()=>a});let a=(0,r(6760).registerClientReference)(function(){throw Error("Attempted to call Toaster() from the server but Toaster 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.")},"/Volumes/ProjectSpace/_wip/d1studio/src/components/ui/toaster.jsx","Toaster")},1135:()=>{},2899:(e,t,r)=>{"use strict";r.d(t,{DatabaseProvider:()=>d,t:()=>u});var a=r(5512),s=r(8009);let o=new Map;function n(e,t,r=2e3){let a=o.get(e);if(a&&Date.now()-a.timestamp<r)return a.promise;let s=t();return o.set(e,{promise:s,timestamp:Date.now()}),s.finally(()=>{setTimeout(()=>{o.delete(e)},r)}),s}let i=(0,s.createContext)(void 0);class l{constructor(){this.cache=new Map}get(e){return this.cache.get(e)||null}set(e,t,r,a){this.cache.set(e,{data:t,schema:r,meta:a,timestamp:Date.now()})}update(e,t,r,a){let s=this.cache.get(e);s&&this.cache.set(e,{data:t||s.data,schema:r||s.schema,meta:a||s.meta,timestamp:Date.now()})}invalidate(e){this.cache.delete(e)}clear(){this.cache.clear()}}class c{constructor(){this.queue=[],this.processing=!1}async add(e){return new Promise((t,r)=>{this.queue.push({operation:e,resolve:t,reject:r}),this.process()})}async process(){if(this.processing||0===this.queue.length)return;this.processing=!0;let{operation:e,resolve:t,reject:r}=this.queue.shift();try{let r=await e();t(r)}catch(e){r(e)}finally{this.processing=!1,this.process()}}}function d({children:e}){let[t,r]=(0,s.useState)([]),[o,d]=(0,s.useState)(!0),[u,h]=(0,s.useState)(null),[m,p]=(0,s.useState)([]),[f,b]=(0,s.useState)(null);(0,s.useRef)(new c);let[g,v]=(0,s.useState)(null),w=(0,s.useRef)(new l).current,y=(0,s.useRef)(null),[x,S]=(0,s.useState)(null),P=(0,s.useCallback)((e,t,r=null)=>{S({type:e,message:t,detail:r,ts:new Date})},[]),[C,$]=(0,s.useState)(()=>null),E=(0,s.useCallback)(e=>{let t=e instanceof Date?e.toISOString():new Date().toISOString();localStorage.setItem("d1_last_sync",t),$(t)},[]),T=(0,s.useCallback)((e,t=1,r=50)=>{let a=`table-${e}-${t}-${r}`;return w.get(a)},[]),j=(0,s.useCallback)(e=>{w.cache.forEach((t,r)=>{r.startsWith(`table-${e}-`)&&w.invalidate(r)})},[]),k=(0,s.useCallback)((e,t,r,a,s=1,o=50)=>{let n=`table-${e}-${s}-${o}`;w.update(n,t,r,a)},[]),D=(0,s.useCallback)(async e=>{let t=/^\s*(SELECT|PRAGMA|EXPLAIN)/i.test(e),r=`query-${e}`,a=async()=>{P("loading","Executing query…");try{let t=y.current?.database_name,r=await fetch("/api/query",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({query:e,...t&&{db:t}})});if(!r.ok){let e="Failed to execute query";try{let t=await r.json();e=t?.error?.message||e}catch(e){}throw Error(e)}let a=await r.json();if(!a.success)throw Error(a.error||"Query execution failed");return P("success","Query executed"),a}catch(e){throw P("error",e.message||"Query failed"),e||Error("An unknown error occurred")}};return t?n(r,a,1e3):a()},[P]),N=(0,s.useCallback)(async e=>{try{let t=await fetch(`/api/tables/${e}`),r=await t.json();if(!t.ok||!r.success)throw Error(r.error||"Failed to fetch table schema");return r.schema||[]}catch(e){throw console.error("Schema fetch error:",e),e}},[]),I=(0,s.useCallback)(async(e,t={})=>{let{forceFetch:r=!1,page:a=1,limit:s=50}=t,o=`table-${e}-${a}-${s}`;if(!r){let e=w.get(o);if(e)return e}return n(`table-${e}-${a}-${s}`,async()=>{P("loading",`Loading ${e}…`);try{let t=y.current?.database_name,r=t?`&db=${encodeURIComponent(t)}`:"",n=await fetch(`/api/tables/${e}?page=${a}&limit=${s}${r}`,{headers:{"Cache-Control":"no-cache",Pragma:"no-cache"}});if(!n.ok)throw Error("Failed to fetch table data");let i=await n.json();if(!i.success)throw Error(i.error||"Failed to fetch table data");w.set(o,i.data,i.schema,i.meta);let l=i.data?.length||0;return P("success",`Loaded ${l} row${1!==l?"s":""} \xb7 ${e}`),i}catch(t){throw console.error("Error fetching table data:",t),P("error",t.message,`Failed loading ${e}`),t}},1e3)},[P]),O=(0,s.useCallback)(async e=>{P("loading",`Refreshing ${e}…`);try{return w.cache.forEach((t,r)=>{r.startsWith(`table-${e}-`)&&w.invalidate(r)}),await I(e,{forceFetch:!0})}catch(t){throw console.error("Error updating table data:",t),P("error",t.message,`Failed refreshing ${e}`),t}},[I,P]),A=(0,s.useCallback)(async(e,t={})=>(v(e),await I(e,t)),[I]),_=(0,s.useCallback)(async()=>{let e=y.current?.database_name||"default";return n(`refresh-tables-${e}`,async()=>{P("loading","Loading tables…"),d(!0),h(null);try{let e=y.current?.database_name,t=e?`?db=${encodeURIComponent(e)}`:"",a=await fetch(`/api/tables${t}`);if(!a.ok)throw Error("Failed to fetch tables");let s=await a.json();if(s.error)throw Error(s.error);let o=s.tables||[];return r(o),P("success",`${o.length} table${1!==o.length?"s":""} loaded`),o}catch(e){throw h(e.message),P("error",e.message,"Failed loading tables"),e}finally{d(!1)}},2e3)},[P]),R=(0,s.useCallback)(async e=>{P("loading","Creating table…");try{await D(e),w.clear(),await _(),P("success","Table created")}catch(e){throw P("error",e.message,"Create table failed"),Error(`Failed to create table: ${e.message}`)}},[D,_,P]),F=(0,s.useCallback)(async e=>{P("loading",`Dropping "${e}"…`);try{await D(`DROP TABLE ${e};`),w.invalidate(e),await _(),P("success",`Table "${e}" dropped`)}catch(t){throw P("error",t.message,`Drop "${e}" failed`),Error(`Failed to drop table: ${t.message}`)}},[D,_,P]),M=(0,s.useCallback)(async e=>{P("loading","Syncing migrations…");try{let t=await fetch("/api/migrations/sync",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});if(!t.ok){let e=await t.json();throw Error(e.error?.message||"Failed to sync migrations")}let r=await t.json();return P("success","Migrations synced"),r}catch(e){throw console.error("Error syncing migrations:",e),P("error",e.message,"Migration sync failed"),e}},[P]),L=(0,s.useCallback)(async()=>{P("loading","Pulling from remote…");try{let e=localStorage.getItem("cf_credentials");if(!e)throw Error("No Cloudflare credentials found. Please connect to Cloudflare first.");let t=JSON.parse(e);if(!t.accountId||!t.apiToken)throw Error("Invalid credentials stored. Please reconnect to Cloudflare.");let r=await fetch("/api/pull-remote/confirm",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({accountId:t.accountId,apiToken:t.apiToken})}),a=await r.json();if(!r.ok||!a.success)throw Error(a.error?.message||"Failed to pull from remote");w.clear(),await _();let s=a.details?.appliedMigrations?.length??0;return P("success",`Pull complete — ${s} migration${1!==s?"s":""} applied`),a}catch(e){throw console.error("Error pulling from remote:",e),P("error",e.message,"Pull from remote failed"),e}},[_,P]),q=(0,s.useCallback)(async e=>{P("loading","Pushing to remote…");try{let t=await fetch("/api/push-remote/confirm",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)}),r=await t.json();if(!t.ok)throw Error(r.error?.message||"Failed to push to remote");let a=r.applied??0;return P("success",`Push complete — ${a} migration${1!==a?"s":""} applied`),r}catch(e){throw console.error("Error pushing to remote:",e),P("error",e.message,"Push to remote failed"),e}},[P]),V=(0,s.useCallback)(async e=>{let t=m.find(t=>t.database_name===e);t&&(y.current=t,b(t),w.clear(),r([]),v(null),await _())},[m,_]),J=(0,s.useMemo)(()=>({tables:t,databases:m,currentDatabase:f,switchDatabase:V,isLoading:o,error:u,activeTable:g,lastStatus:x,setOperationStatus:P,lastSyncTime:C,setLastSyncTime:E,refreshTables:_,executeQuery:D,fetchTableSchema:N,fetchTableData:I,updateTableData:O,createTable:R,dropTable:F,syncMigrations:M,pullFromRemote:L,pushToRemote:q,getCachedTable:T,updateTableCache:k,invalidateTable:j,switchTable:A}),[t,m,f,V,o,u,g,x,P,C,E,_,D,N,I,O,R,F,M,L,q,T,k,j,A]);return(0,a.jsx)(i.Provider,{value:J,children:e})}function u(){let e=(0,s.useContext)(i);if(!e)throw Error("useDatabase must be used within a DatabaseProvider");return e}},6888:(e,t,r)=>{"use strict";r.d(t,{dj:()=>h});var a=r(8009);let s=0,o=new Map,n=e=>{if(o.has(e))return;let t=setTimeout(()=>{o.delete(e),d({type:"REMOVE_TOAST",toastId:e})},1e6);o.set(e,t)},i=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,1)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(e=>e.id===t.toast.id?{...e,...t.toast}:e)};case"DISMISS_TOAST":{let{toastId:r}=t;return r?n(r):e.toasts.forEach(e=>{n(e.id)}),{...e,toasts:e.toasts.map(e=>e.id===r||void 0===r?{...e,open:!1}:e)}}case"REMOVE_TOAST":if(void 0===t.toastId)return{...e,toasts:[]};return{...e,toasts:e.toasts.filter(e=>e.id!==t.toastId)}}},l=[],c={toasts:[]};function d(e){c=i(c,e),l.forEach(e=>{e(c)})}function u({...e}){let t=(s=(s+1)%Number.MAX_SAFE_INTEGER).toString(),r=()=>d({type:"DISMISS_TOAST",toastId:t});return d({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:e=>{e||r()}}}),{id:t,dismiss:r,update:e=>d({type:"UPDATE_TOAST",toast:{...e,id:t}})}}function h(){let[e,t]=a.useState(c);return a.useEffect(()=>(l.push(t),()=>{let e=l.indexOf(t);e>-1&&l.splice(e,1)}),[e]),{...e,toast:u,dismiss:e=>d({type:"DISMISS_TOAST",toastId:e})}}},3603:(e,t,r)=>{"use strict";r.d(t,{cn:()=>o});var a=r(2281),s=r(4805);function o(...e){return(0,s.QP)((0,a.$)(e))}},1831:(e,t,r)=>{"use strict";r.d(t,{DatabaseProvider:()=>s});var a=r(6760);let s=(0,a.registerClientReference)(function(){throw Error("Attempted to call DatabaseProvider() from the server but DatabaseProvider 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.")},"/Volumes/ProjectSpace/_wip/d1studio/src/context/database-context.js","DatabaseProvider");(0,a.registerClientReference)(function(){throw Error("Attempted to call useDatabase() from the server but useDatabase 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.")},"/Volumes/ProjectSpace/_wip/d1studio/src/context/database-context.js","useDatabase")}};