@philippwassibauer/agentlens 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (122) hide show
  1. package/.next/BUILD_ID +1 -0
  2. package/.next/app-build-manifest.json +44 -0
  3. package/.next/app-path-routes-manifest.json +1 -0
  4. package/.next/build-manifest.json +32 -0
  5. package/.next/export-marker.json +1 -0
  6. package/.next/images-manifest.json +1 -0
  7. package/.next/next-minimal-server.js.nft.json +1 -0
  8. package/.next/next-server.js.nft.json +1 -0
  9. package/.next/package.json +1 -0
  10. package/.next/prerender-manifest.json +1 -0
  11. package/.next/react-loadable-manifest.json +1 -0
  12. package/.next/required-server-files.json +1 -0
  13. package/.next/routes-manifest.json +1 -0
  14. package/.next/server/app/_not-found/page.js +1 -0
  15. package/.next/server/app/_not-found/page.js.nft.json +1 -0
  16. package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -0
  17. package/.next/server/app/_not-found.html +1 -0
  18. package/.next/server/app/_not-found.meta +6 -0
  19. package/.next/server/app/_not-found.rsc +9 -0
  20. package/.next/server/app/api/check-prs/route.js +86 -0
  21. package/.next/server/app/api/check-prs/route.js.nft.json +1 -0
  22. package/.next/server/app/api/events/route.js +86 -0
  23. package/.next/server/app/api/events/route.js.nft.json +1 -0
  24. package/.next/server/app/api/sessions/[id]/route.js +86 -0
  25. package/.next/server/app/api/sessions/[id]/route.js.nft.json +1 -0
  26. package/.next/server/app/api/sessions/route.js +86 -0
  27. package/.next/server/app/api/sessions/route.js.nft.json +1 -0
  28. package/.next/server/app/api/stats/route.js +86 -0
  29. package/.next/server/app/api/stats/route.js.nft.json +1 -0
  30. package/.next/server/app/page.js +1 -0
  31. package/.next/server/app/page.js.nft.json +1 -0
  32. package/.next/server/app/page_client-reference-manifest.js +1 -0
  33. package/.next/server/app/sessions/[id]/page.js +1 -0
  34. package/.next/server/app/sessions/[id]/page.js.nft.json +1 -0
  35. package/.next/server/app/sessions/[id]/page_client-reference-manifest.js +1 -0
  36. package/.next/server/app/sessions/page.js +1 -0
  37. package/.next/server/app/sessions/page.js.nft.json +1 -0
  38. package/.next/server/app/sessions/page_client-reference-manifest.js +1 -0
  39. package/.next/server/app-paths-manifest.json +11 -0
  40. package/.next/server/chunks/111.js +1 -0
  41. package/.next/server/chunks/19.js +1 -0
  42. package/.next/server/chunks/218.js +1 -0
  43. package/.next/server/chunks/267.js +13 -0
  44. package/.next/server/chunks/449.js +12 -0
  45. package/.next/server/chunks/522.js +2 -0
  46. package/.next/server/chunks/590.js +6 -0
  47. package/.next/server/chunks/619.js +2 -0
  48. package/.next/server/chunks/780.js +1 -0
  49. package/.next/server/chunks/787.js +1 -0
  50. package/.next/server/chunks/938.js +1 -0
  51. package/.next/server/chunks/95.js +1 -0
  52. package/.next/server/chunks/98.js +86 -0
  53. package/.next/server/chunks/font-manifest.json +1 -0
  54. package/.next/server/font-manifest.json +1 -0
  55. package/.next/server/functions-config-manifest.json +1 -0
  56. package/.next/server/interception-route-rewrite-manifest.js +1 -0
  57. package/.next/server/middleware-build-manifest.js +1 -0
  58. package/.next/server/middleware-manifest.json +6 -0
  59. package/.next/server/middleware-react-loadable-manifest.js +1 -0
  60. package/.next/server/next-font-manifest.js +1 -0
  61. package/.next/server/next-font-manifest.json +1 -0
  62. package/.next/server/pages/404.html +1 -0
  63. package/.next/server/pages/500.html +1 -0
  64. package/.next/server/pages/_app.js +1 -0
  65. package/.next/server/pages/_app.js.nft.json +1 -0
  66. package/.next/server/pages/_document.js +1 -0
  67. package/.next/server/pages/_document.js.nft.json +1 -0
  68. package/.next/server/pages/_error.js +1 -0
  69. package/.next/server/pages/_error.js.nft.json +1 -0
  70. package/.next/server/pages-manifest.json +1 -0
  71. package/.next/server/server-reference-manifest.js +1 -0
  72. package/.next/server/server-reference-manifest.json +1 -0
  73. package/.next/server/webpack-runtime.js +1 -0
  74. package/.next/static/VcvMciURiwijLrVt2jf_P/_buildManifest.js +1 -0
  75. package/.next/static/VcvMciURiwijLrVt2jf_P/_ssgManifest.js +1 -0
  76. package/.next/static/chunks/2200cc46-96120a9be9a790d7.js +1 -0
  77. package/.next/static/chunks/838-ee1ac53cffa08ff2.js +1 -0
  78. package/.next/static/chunks/919-13111e16ca5aad12.js +1 -0
  79. package/.next/static/chunks/945-08d88d38313883d1.js +2 -0
  80. package/.next/static/chunks/app/_not-found/page-52828565ce3bf1a5.js +1 -0
  81. package/.next/static/chunks/app/layout-d3c17bc5a9ba9afe.js +1 -0
  82. package/.next/static/chunks/app/page-f02e37b80f020816.js +1 -0
  83. package/.next/static/chunks/app/sessions/[id]/page-9cd58c2b3cbdb58c.js +1 -0
  84. package/.next/static/chunks/app/sessions/page-381d2eb994edfbe5.js +1 -0
  85. package/.next/static/chunks/framework-6e06c675866dc992.js +1 -0
  86. package/.next/static/chunks/main-921b2ae56ade90f2.js +1 -0
  87. package/.next/static/chunks/main-app-f7575201e7f66c72.js +1 -0
  88. package/.next/static/chunks/pages/_app-0c3037849002a4aa.js +1 -0
  89. package/.next/static/chunks/pages/_error-a647cd2c75dc4dc7.js +1 -0
  90. package/.next/static/chunks/polyfills-42372ed130431b0a.js +1 -0
  91. package/.next/static/chunks/webpack-5a21843c4f0469c6.js +1 -0
  92. package/.next/static/css/e0ed3c3bd07a0247.css +3 -0
  93. package/.next/static/media/011e180705008d6f-s.woff2 +0 -0
  94. package/.next/static/media/0aa834ed78bf6d07-s.woff2 +0 -0
  95. package/.next/static/media/20535187d867b7b9-s.woff2 +0 -0
  96. package/.next/static/media/37786be940ec402b-s.p.woff2 +0 -0
  97. package/.next/static/media/46e154b2fcbd6033-s.woff2 +0 -0
  98. package/.next/static/media/5356a6a4f2c8c8d8-s.woff2 +0 -0
  99. package/.next/static/media/58f386aa6b1a2a92-s.woff2 +0 -0
  100. package/.next/static/media/656feb427634a431-s.woff2 +0 -0
  101. package/.next/static/media/67957d42bae0796d-s.woff2 +0 -0
  102. package/.next/static/media/704b853f32d191d5-s.woff2 +0 -0
  103. package/.next/static/media/73cb51aac9c97f90-s.woff2 +0 -0
  104. package/.next/static/media/7ba5fb2a8c88521c-s.woff2 +0 -0
  105. package/.next/static/media/886030b0b59bc5a7-s.woff2 +0 -0
  106. package/.next/static/media/92eeb95d069020cc-s.woff2 +0 -0
  107. package/.next/static/media/939c4f875ee75fbb-s.woff2 +0 -0
  108. package/.next/static/media/98e207f02528a563-s.p.woff2 +0 -0
  109. package/.next/static/media/991629005c80bdf1-s.woff2 +0 -0
  110. package/.next/static/media/99dcf268bda04fe5-s.woff2 +0 -0
  111. package/.next/static/media/bb3ef058b751a6ad-s.p.woff2 +0 -0
  112. package/.next/static/media/d26bbd13d6b70f89-s.woff2 +0 -0
  113. package/.next/static/media/d29838c109ef09b4-s.woff2 +0 -0
  114. package/.next/static/media/d3ebbfd689654d3a-s.p.woff2 +0 -0
  115. package/.next/static/media/db96af6b531dc71f-s.p.woff2 +0 -0
  116. package/.next/static/media/e40af3453d7c920a-s.woff2 +0 -0
  117. package/.next/static/media/ef4d5661765d0e49-s.woff2 +0 -0
  118. package/.next/static/media/f911b923c6adde36-s.woff2 +0 -0
  119. package/README.md +152 -0
  120. package/dist/bin/agentlens.mjs +1104 -0
  121. package/next.config.mjs +10 -0
  122. package/package.json +88 -0
@@ -0,0 +1 @@
1
+ {"version":1,"files":["../../../node_modules/.pnpm/better-sqlite3@11.10.0/node_modules/better-sqlite3/build/Release/better_sqlite3.node","../../../node_modules/.pnpm/better-sqlite3@11.10.0/node_modules/better-sqlite3/lib/database.js","../../../node_modules/.pnpm/better-sqlite3@11.10.0/node_modules/better-sqlite3/lib/index.js","../../../node_modules/.pnpm/better-sqlite3@11.10.0/node_modules/better-sqlite3/lib/methods/aggregate.js","../../../node_modules/.pnpm/better-sqlite3@11.10.0/node_modules/better-sqlite3/lib/methods/backup.js","../../../node_modules/.pnpm/better-sqlite3@11.10.0/node_modules/better-sqlite3/lib/methods/function.js","../../../node_modules/.pnpm/better-sqlite3@11.10.0/node_modules/better-sqlite3/lib/methods/inspect.js","../../../node_modules/.pnpm/better-sqlite3@11.10.0/node_modules/better-sqlite3/lib/methods/pragma.js","../../../node_modules/.pnpm/better-sqlite3@11.10.0/node_modules/better-sqlite3/lib/methods/serialize.js","../../../node_modules/.pnpm/better-sqlite3@11.10.0/node_modules/better-sqlite3/lib/methods/table.js","../../../node_modules/.pnpm/better-sqlite3@11.10.0/node_modules/better-sqlite3/lib/methods/transaction.js","../../../node_modules/.pnpm/better-sqlite3@11.10.0/node_modules/better-sqlite3/lib/methods/wrappers.js","../../../node_modules/.pnpm/better-sqlite3@11.10.0/node_modules/better-sqlite3/lib/sqlite-error.js","../../../node_modules/.pnpm/better-sqlite3@11.10.0/node_modules/better-sqlite3/lib/util.js","../../../node_modules/.pnpm/better-sqlite3@11.10.0/node_modules/better-sqlite3/package.json","../../../node_modules/.pnpm/better-sqlite3@11.10.0/node_modules/bindings","../../../node_modules/.pnpm/bindings@1.5.0/node_modules/bindings/bindings.js","../../../node_modules/.pnpm/bindings@1.5.0/node_modules/bindings/package.json","../../../node_modules/.pnpm/bindings@1.5.0/node_modules/file-uri-to-path","../../../node_modules/.pnpm/file-uri-to-path@1.0.0/node_modules/file-uri-to-path/index.js","../../../node_modules/.pnpm/file-uri-to-path@1.0.0/node_modules/file-uri-to-path/package.json","../../../node_modules/.pnpm/next@14.2.35_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/next/dist/client/components/action-async-storage-instance.js","../../../node_modules/.pnpm/next@14.2.35_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/next/dist/client/components/action-async-storage.external.js","../../../node_modules/.pnpm/next@14.2.35_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/next/dist/client/components/async-local-storage.js","../../../node_modules/.pnpm/next@14.2.35_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/next/dist/client/components/request-async-storage-instance.js","../../../node_modules/.pnpm/next@14.2.35_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/next/dist/client/components/request-async-storage.external.js","../../../node_modules/.pnpm/next@14.2.35_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/next/dist/client/components/static-generation-async-storage-instance.js","../../../node_modules/.pnpm/next@14.2.35_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/next/dist/client/components/static-generation-async-storage.external.js","../../../node_modules/.pnpm/next@14.2.35_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../node_modules/.pnpm/next@14.2.35_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../node_modules/.pnpm/next@14.2.35_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js","../../../node_modules/.pnpm/next@14.2.35_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/next/dist/server/lib/trace/constants.js","../../../node_modules/.pnpm/next@14.2.35_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/next/dist/server/lib/trace/tracer.js","../../../node_modules/.pnpm/next@14.2.35_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/next/package.json","../../../node_modules/better-sqlite3","../../../node_modules/next","../../../package.json","../../package.json","../chunks/111.js","../chunks/19.js","../chunks/218.js","../chunks/267.js","../chunks/522.js","../chunks/619.js","../chunks/787.js","../chunks/938.js","../chunks/95.js","../chunks/98.js","../webpack-runtime.js","page_client-reference-manifest.js"]}
@@ -0,0 +1 @@
1
+ globalThis.__RSC_MANIFEST=(globalThis.__RSC_MANIFEST||{});globalThis.__RSC_MANIFEST["/page"]={"moduleLoading":{"prefix":"/_next/","crossOrigin":null},"ssrModuleMapping":{"176":{"*":{"id":"6676","name":"*","chunks":[],"async":false}},"2433":{"*":{"id":"6544","name":"*","chunks":[],"async":false}},"2651":{"*":{"id":"9645","name":"*","chunks":[],"async":false}},"3238":{"*":{"id":"48","name":"*","chunks":[],"async":false}},"6552":{"*":{"id":"4407","name":"*","chunks":[],"async":false}},"7523":{"*":{"id":"3477","name":"*","chunks":[],"async":false}},"8528":{"*":{"id":"5116","name":"*","chunks":[],"async":false}},"8608":{"*":{"id":"7088","name":"*","chunks":[],"async":false}},"9414":{"*":{"id":"8850","name":"*","chunks":[],"async":false}},"9498":{"*":{"id":"4942","name":"*","chunks":[],"async":false}}},"edgeSSRModuleMapping":{},"clientModules":{"/Users/philippwassibauer/agentlens/node_modules/.pnpm/next@14.2.35_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/next/dist/client/components/app-router.js":{"id":2433,"name":"*","chunks":[],"async":false},"/Users/philippwassibauer/agentlens/node_modules/.pnpm/next@14.2.35_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/next/dist/esm/client/components/app-router.js":{"id":2433,"name":"*","chunks":[],"async":false},"/Users/philippwassibauer/agentlens/node_modules/.pnpm/next@14.2.35_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/next/dist/client/components/client-page.js":{"id":7523,"name":"*","chunks":[],"async":false},"/Users/philippwassibauer/agentlens/node_modules/.pnpm/next@14.2.35_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/next/dist/esm/client/components/client-page.js":{"id":7523,"name":"*","chunks":[],"async":false},"/Users/philippwassibauer/agentlens/node_modules/.pnpm/next@14.2.35_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/next/dist/client/components/error-boundary.js":{"id":8528,"name":"*","chunks":[],"async":false},"/Users/philippwassibauer/agentlens/node_modules/.pnpm/next@14.2.35_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/next/dist/esm/client/components/error-boundary.js":{"id":8528,"name":"*","chunks":[],"async":false},"/Users/philippwassibauer/agentlens/node_modules/.pnpm/next@14.2.35_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/next/dist/client/components/layout-router.js":{"id":176,"name":"*","chunks":[],"async":false},"/Users/philippwassibauer/agentlens/node_modules/.pnpm/next@14.2.35_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/next/dist/esm/client/components/layout-router.js":{"id":176,"name":"*","chunks":[],"async":false},"/Users/philippwassibauer/agentlens/node_modules/.pnpm/next@14.2.35_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/next/dist/client/components/not-found-boundary.js":{"id":2651,"name":"*","chunks":[],"async":false},"/Users/philippwassibauer/agentlens/node_modules/.pnpm/next@14.2.35_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/next/dist/esm/client/components/not-found-boundary.js":{"id":2651,"name":"*","chunks":[],"async":false},"/Users/philippwassibauer/agentlens/node_modules/.pnpm/next@14.2.35_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/next/dist/client/components/render-from-template-context.js":{"id":9414,"name":"*","chunks":[],"async":false},"/Users/philippwassibauer/agentlens/node_modules/.pnpm/next@14.2.35_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/next/dist/esm/client/components/render-from-template-context.js":{"id":9414,"name":"*","chunks":[],"async":false},"/Users/philippwassibauer/agentlens/node_modules/.pnpm/next@14.2.35_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/next/font/google/target.css?{\"path\":\"app/layout.tsx\",\"import\":\"JetBrains_Mono\",\"arguments\":[{\"subsets\":[\"latin\"],\"variable\":\"--font-jetbrains\"}],\"variableName\":\"jetbrainsMono\"}":{"id":1247,"name":"*","chunks":["185","static/chunks/app/layout-d3c17bc5a9ba9afe.js"],"async":false},"/Users/philippwassibauer/agentlens/node_modules/.pnpm/next@14.2.35_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/next/font/google/target.css?{\"path\":\"app/layout.tsx\",\"import\":\"IBM_Plex_Mono\",\"arguments\":[{\"subsets\":[\"latin\"],\"weight\":[\"400\",\"500\",\"600\",\"700\"],\"variable\":\"--font-ibm-plex\"}],\"variableName\":\"ibmPlexMono\"}":{"id":5348,"name":"*","chunks":["185","static/chunks/app/layout-d3c17bc5a9ba9afe.js"],"async":false},"/Users/philippwassibauer/agentlens/app/globals.css":{"id":4443,"name":"*","chunks":["185","static/chunks/app/layout-d3c17bc5a9ba9afe.js"],"async":false},"/Users/philippwassibauer/agentlens/app/components/session-detail.tsx":{"id":8608,"name":"*","chunks":[],"async":false},"/Users/philippwassibauer/agentlens/app/components/sidebar.tsx":{"id":6552,"name":"*","chunks":["919","static/chunks/919-13111e16ca5aad12.js","838","static/chunks/838-ee1ac53cffa08ff2.js","931","static/chunks/app/page-f02e37b80f020816.js"],"async":false},"/Users/philippwassibauer/agentlens/app/components/dashboard-client.tsx":{"id":3238,"name":"*","chunks":["919","static/chunks/919-13111e16ca5aad12.js","838","static/chunks/838-ee1ac53cffa08ff2.js","931","static/chunks/app/page-f02e37b80f020816.js"],"async":false},"/Users/philippwassibauer/agentlens/node_modules/.pnpm/next@14.2.35_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/next/dist/client/link.js":{"id":9498,"name":"*","chunks":[],"async":false},"/Users/philippwassibauer/agentlens/node_modules/.pnpm/next@14.2.35_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/next/dist/esm/client/link.js":{"id":9498,"name":"*","chunks":[],"async":false}},"entryCSSFiles":{"/Users/philippwassibauer/agentlens/":[],"/Users/philippwassibauer/agentlens/app/layout":["static/css/e0ed3c3bd07a0247.css"],"/Users/philippwassibauer/agentlens/app/page":[]}}
@@ -0,0 +1 @@
1
+ (()=>{var e={};e.id=899,e.ids=[899],e.modules={5890:e=>{"use strict";e.exports=require("better-sqlite3")},2934:e=>{"use strict";e.exports=require("next/dist/client/components/action-async-storage.external.js")},4580:e=>{"use strict";e.exports=require("next/dist/client/components/request-async-storage.external.js")},5869:e=>{"use strict";e.exports=require("next/dist/client/components/static-generation-async-storage.external.js")},399:e=>{"use strict";e.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},2048:e=>{"use strict";e.exports=require("fs")},9801:e=>{"use strict";e.exports=require("os")},5315:e=>{"use strict";e.exports=require("path")},7718:e=>{"use strict";e.exports=require("node:child_process")},306:(e,t,r)=>{"use strict";r.r(t),r.d(t,{GlobalError:()=>o.a,__next_app__:()=>u,originalPathname:()=>p,pages:()=>d,routeModule:()=>x,tree:()=>c}),r(1614),r(3494),r(311);var s=r(9296),n=r(1650),a=r(7045),o=r.n(a),i=r(8184),l={};for(let e in i)0>["default","tree","pages","GlobalError","originalPathname","__next_app__","routeModule"].indexOf(e)&&(l[e]=()=>i[e]);r.d(t,l);let c=["",{children:["sessions",{children:["[id]",{children:["__PAGE__",{},{page:[()=>Promise.resolve().then(r.bind(r,1614)),"/Users/philippwassibauer/agentlens/app/sessions/[id]/page.tsx"]}]},{}]},{}]},{layout:[()=>Promise.resolve().then(r.bind(r,3494)),"/Users/philippwassibauer/agentlens/app/layout.tsx"],"not-found":[()=>Promise.resolve().then(r.t.bind(r,311,23)),"next/dist/client/components/not-found-error"]}],d=["/Users/philippwassibauer/agentlens/app/sessions/[id]/page.tsx"],p="/sessions/[id]/page",u={require:r,loadChunk:()=>Promise.resolve()},x=new s.AppPageRouteModule({definition:{kind:n.x.APP_PAGE,page:"/sessions/[id]/page",pathname:"/sessions/[id]",bundlePath:"",filename:"",appPaths:[]},userland:{loaderTree:c}})},8954:(e,t,r)=>{Promise.resolve().then(r.bind(r,7088)),Promise.resolve().then(r.bind(r,4407))},9489:(e,t,r)=>{Promise.resolve().then(r.t.bind(r,6544,23)),Promise.resolve().then(r.t.bind(r,3477,23)),Promise.resolve().then(r.t.bind(r,5116,23)),Promise.resolve().then(r.t.bind(r,6676,23)),Promise.resolve().then(r.t.bind(r,9645,23)),Promise.resolve().then(r.t.bind(r,8850,23))},198:()=>{},525:(e,t,r)=>{"use strict";r.d(t,{i:()=>n});var s=r(8924);function n({label:e,value:t,change:r,valueColor:n}){let a=r?r.startsWith("++")||r.startsWith("+")?"var(--green-accent)":r.startsWith("-")?"var(--red-accent)":"var(--text-secondary)":void 0;return(0,s.jsxs)("div",{className:"border border-border-strong bg-background p-6 flex flex-col gap-3 flex-1",children:[(0,s.jsxs)("span",{className:"text-[12px] font-primary text-text-secondary font-medium",children:["// ",e]}),s.jsx("span",{className:"text-[28px] font-primary font-bold",style:{color:n},children:t}),r&&s.jsx("span",{className:"text-[12px] font-primary",style:{color:a},children:r})]})}},7088:(e,t,r)=>{"use strict";r.d(t,{SessionDetail:()=>b});var s=r(8924),n=r(3911),a=r(2828);function o({score:e}){let t,r;return e>.7?(t="var(--green-accent)",r="var(--green-accent-bg)"):e>=.4?(t="var(--amber-accent)",r="rgba(245, 158, 11, 0.1)"):(t="var(--red-accent)",r="rgba(239, 68, 68, 0.1)"),s.jsx("span",{className:"inline-flex items-center px-2 py-0.5 rounded text-[13px] font-primary font-semibold",style:{color:t,backgroundColor:r},children:e.toFixed(2)})}var i=r(525);function l({rawJson:e}){let[t,r]=(0,n.useState)(!1),[a,o]=(0,n.useState)(!1);function i(){navigator.clipboard.writeText(e),o(!0),setTimeout(()=>o(!1),2e3)}function l(){let t=new Blob([e],{type:"application/json"}),r=URL.createObjectURL(t),s=document.createElement("a");s.href=r,s.download="session.json",s.click(),URL.revokeObjectURL(r)}return(0,s.jsxs)("div",{className:"flex gap-2 items-start",children:[s.jsx("button",{onClick:()=>r(!t),className:`px-3 py-1.5 border rounded text-[12px] font-primary transition-colors ${t?"border-green-accent text-green-accent":"border-border-strong text-foreground hover:bg-surface-elevated"}`,children:t?"✕ close":"<> raw json"}),t&&(0,s.jsxs)(s.Fragment,{children:[s.jsx("button",{onClick:i,className:"px-3 py-1.5 border border-border-strong rounded text-[12px] font-primary text-text-secondary hover:text-foreground",children:a?"✓ copied":"copy"}),s.jsx("button",{onClick:l,className:"px-3 py-1.5 border border-border-strong rounded text-[12px] font-primary text-text-secondary hover:text-foreground",children:"download"})]}),t&&s.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/60",onClick:()=>r(!1),children:(0,s.jsxs)("div",{className:"bg-background border border-border-strong rounded-md w-[80vw] max-h-[80vh] flex flex-col",onClick:e=>e.stopPropagation(),children:[(0,s.jsxs)("div",{className:"flex items-center justify-between px-4 py-3 border-b border-border-strong",children:[s.jsx("span",{className:"text-[13px] font-primary text-foreground",children:"// raw_session_data"}),(0,s.jsxs)("div",{className:"flex gap-2",children:[s.jsx("button",{onClick:i,className:"px-3 py-1 border border-border-strong rounded text-[12px] font-primary text-text-secondary hover:text-foreground",children:a?"✓ copied":"copy"}),s.jsx("button",{onClick:l,className:"px-3 py-1 border border-border-strong rounded text-[12px] font-primary text-text-secondary hover:text-foreground",children:"download"}),s.jsx("button",{onClick:()=>r(!1),className:"px-3 py-1 border border-border-strong rounded text-[12px] font-primary text-text-secondary hover:text-foreground",children:"✕"})]})]}),s.jsx("pre",{className:"flex-1 overflow-auto p-4 text-[11px] font-primary text-muted-foreground leading-5",children:e})]})})]})}function c({timestamp:e,dotColor:t,title:r,subtitle:n,duration:a,children:o}){return(0,s.jsxs)("div",{className:"flex gap-4 py-3",children:[s.jsx("div",{className:"w-[70px] shrink-0 text-[12px] font-primary text-text-secondary pt-0.5",children:e}),s.jsx("div",{className:"flex flex-col items-center pt-1.5",children:s.jsx("div",{className:"w-2 h-2 rounded-full shrink-0",style:{backgroundColor:t}})}),(0,s.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,s.jsxs)("div",{className:"flex items-baseline justify-between gap-2",children:[s.jsx("span",{className:"text-[13px] font-primary font-semibold",style:{color:t},children:r}),a&&s.jsx("span",{className:"text-[12px] font-primary text-text-secondary shrink-0",children:a})]}),n&&s.jsx("div",{className:"text-[12px] font-secondary text-muted-foreground mt-0.5",children:n}),o]})]})}function d(e){return new Date(e).toISOString().slice(11,19)}function p(e){return e<1e3?`${e}ms`:`${(e/1e3).toFixed(1)}s`}function u(e,t){if("user_prompt"===e||"session_end"===e||"session_start"===e)return"#10B981";if("error"===e)return"#ef4444";if("tool_call"===e){let e=t?.tool||"";if("edit"===e||"write"===e)return"#06B6D4";if("bash"===e){let e=t?.args_summary||"";return/\b(jest|vitest|pytest|npm\s+test|npm\s+run\s+test|cargo\s+test|go\s+test)\b/i.test(e)?"#F59E0B":"#6B7280"}return"read"===e?"#8B5CF6":"#6B7280"}return"file_change"===e?"#06B6D4":"git_commit"===e?"#10B981":"git_push"===e?"#F59E0B":"pr_created"===e||"pr_opened"===e||"pr_merged"===e?"#EC4899":"pr_closed"===e?"#ef4444":"pr_review"===e?"#A78BFA":"heartbeat"===e?"#4B5563":"#6B7280"}function x(e,t){return"session_start"===e?"session_start":"session_end"===e?"session_end":"user_prompt"===e?"user_prompt":"error"===e?"error":"heartbeat"===e?"heartbeat":"file_change"===e?"file_change":"git_commit"===e?"git_commit":"git_push"===e?"git_push":"pr_created"===e?"pr_created":"pr_opened"===e?"pr_opened":"pr_merged"===e?"pr_merged ✓":"pr_closed"===e?"pr_closed ✗":"pr_review"===e?`review: ${t?.state||"comment"}`:"tool_call"===e?`tool: ${t?.tool||"unknown"}`:e}function m(e){let t=e.payload||{};if("user_prompt"===e.event_type)return t.prompt_text?`"${t.prompt_text}"`:void 0;if("tool_call"===e.event_type)return t.args_summary||void 0;if("session_start"===e.event_type){let e=[];return t.git_repo&&e.push(t.git_repo),t.git_branch&&e.push(`branch: ${t.git_branch}`),t.project&&e.push(`project: ${t.project}`),e.join(" \xb7 ")||void 0}if("session_end"===e.event_type){let e=[`git: ${t.git_status||"unknown"}`];return t.tests_detected&&e.push(`tests: ${t.tests_passed?"passed ✓":"failed ✗"}`),e.join(" \xb7 ")}if("error"===e.event_type)return t.message||"unknown error";if("file_change"===e.event_type)return`${t.action||"change"}: ${t.path||"unknown"}`;if("git_commit"===e.event_type)return t.command||t.result_summary||"committed changes";if("git_push"===e.event_type)return t.result_summary||t.command||"pushed to remote";if("pr_created"===e.event_type)return t.result_summary||t.command||"pull request created";if("pr_opened"===e.event_type)return`#${t.pr_number} ${t.pr_title||""}`;if("pr_merged"===e.event_type){let e=t.time_to_merge_hours,r=e?` \xb7 ${e<1?`${Math.round(60*e)}min`:`${e.toFixed(1)}h`} to merge`:"";return`#${t.pr_number} ${t.pr_title||""}${r}`}if("pr_closed"===e.event_type)return`#${t.pr_number} ${t.pr_title||""} — closed without merge`;if("pr_review"===e.event_type){let e=t.reviewer||"unknown",r=t.body?`: "${t.body.slice(0,100)}"`:"";return`@${e} ${t.state}${r}`}}function f({events:e,defaultOpen:t}){let[r,a]=(0,n.useState)(t),o=function(e){let t=new Map,r=0,s=0;for(let n of e){if("tool_call"===n.event_type){let e=n.payload?.tool||"unknown";t.set(e,(t.get(e)||0)+1),s+=n.payload?.duration_ms||0}("error"===n.event_type||n.payload?.is_error)&&r++}return{tools:t,errors:r,totalDuration:s}}(e),i=Array.from(o.tools.entries()).sort((e,t)=>t[1]-e[1]).map(([e,t])=>`${e}\xd7${t}`).join(" "),l=d(e[0].timestamp),f=d(e[e.length-1].timestamp),h=l===f?l:`${l} → ${f}`;return(0,s.jsxs)("div",{className:"border-l-2 border-border-strong ml-[99px]",children:[(0,s.jsxs)("button",{onClick:()=>a(!r),className:"w-full flex items-center gap-3 px-4 py-2.5 hover:bg-surface-elevated/50 transition-colors text-left group",children:[s.jsx("span",{className:"text-[11px] font-primary transition-transform duration-150",style:{color:"var(--text-secondary)",transform:r?"rotate(90deg)":"rotate(0deg)",display:"inline-block"},children:"▶"}),(0,s.jsxs)("span",{className:"text-[12px] font-primary text-muted-foreground",children:[e.length," operations"]}),s.jsx("span",{className:"text-[11px] font-primary text-text-tertiary",children:i}),o.errors>0&&(0,s.jsxs)("span",{className:"text-[11px] font-primary text-red-accent",children:[o.errors," error",o.errors>1?"s":""]}),s.jsx("span",{className:"ml-auto text-[11px] font-primary text-text-tertiary",children:h})]}),r&&s.jsx("div",{className:"pl-2 border-t border-border-strong/50",children:e.map(e=>{let t=e.payload||{},r=u(e.event_type,t),n=x(e.event_type,t),a=m(e),o="tool_call"===e.event_type&&t.duration_ms?p(t.duration_ms):void 0;return s.jsx(c,{timestamp:d(e.timestamp),dotColor:r,title:n,subtitle:a,duration:o},e.id)})})]})}function h({events:e}){let t=function(e){let t=[],r=[];function s(){r.length>0&&(t.push({type:"tool_group",events:[...r]}),r=[])}for(let n of e){let e=n.event_type;"user_prompt"===e||"session_start"===e||"session_end"===e||"git_commit"===e||"git_push"===e||"pr_created"===e||"pr_opened"===e||"pr_merged"===e||"pr_closed"===e||"pr_review"===e?(s(),t.push({type:"single",events:[n]})):r.push(n)}return s(),t}(e),r=(0,n.useRef)(null);return(0,n.useRef)(e.length),(0,s.jsxs)("div",{className:"flex flex-col",children:[t.map((e,r)=>{let n=r===t.length-1;if("single"===e.type){let t=e.events[0],r=t.payload||{},n=u(t.event_type,r),a=x(t.event_type,r),o=m(t),i="tool_call"===t.event_type&&r.duration_ms?p(r.duration_ms):void 0;return s.jsx(c,{timestamp:d(t.timestamp),dotColor:n,title:a,subtitle:o,duration:i},t.id)}let a=n||e.events.length<=3;return s.jsx(f,{events:e.events,defaultOpen:a},`group-${r}-${e.events[0].id}`)}),s.jsx("div",{ref:r})]})}function g(e){return null===e?"-":`${Math.floor(e/60)}m ${String(e%60).padStart(2,"0")}s`}function _(e){return e&&0!==e?e>=1e6?`${(e/1e6).toFixed(1)}M`:e>=1e3?`${(e/1e3).toFixed(1)}k`:String(e):"0"}function v(e){return e&&0!==e?e<.01?`$${e.toFixed(4)}`:e<1?`$${e.toFixed(3)}`:`$${e.toFixed(2)}`:"$0"}function y(e){return"completed"===e?"var(--green-accent)":"active"===e?"var(--cyan-accent)":"crashed"===e?"var(--red-accent)":"var(--muted-foreground)"}function b({initialData:e,sessionId:t}){var r,c,d,p;let[u,x]=(0,n.useState)(e),[m,f]=(0,n.useState)((r=e.session.started_at,(c=e.session.ended_at)?Math.round((new Date(c).getTime()-new Date(r).getTime())/1e3):Math.round((Date.now()-new Date(r).getTime())/1e3))),b="active"===u.session.status;(0,n.useRef)(u.events.length);let{session:j,events:N}=u,w=j.stats?.score,k=N.filter(e=>"heartbeat"!==e.event_type),$=new Map;for(let e of N)if("tool_call"===e.event_type){let t=e.payload?.tool||"unknown";$.set(t,($.get(t)||0)+1)}let C=Array.from($.entries()).sort((e,t)=>t[1]-e[1]).map(([e,t])=>`${e}(${t})`).join(" \xb7 "),P=JSON.stringify({session:{id:j.id,user_id:j.user_id,project:j.project,git_repo:j.git_repo,git_branch:j.git_branch,status:j.status,started_at:j.started_at,ended_at:j.ended_at,stats:j.stats},events:N},null,2);return(0,s.jsxs)("main",{className:"flex-1 p-8 flex flex-col gap-6",children:[(0,s.jsxs)("div",{className:"flex items-center justify-between",children:[(0,s.jsxs)("div",{className:"text-[13px] font-primary text-text-secondary",children:[s.jsx(a.default,{href:"/sessions",className:"hover:text-foreground",children:"sessions"}),s.jsx("span",{className:"mx-2",children:"/"}),(0,s.jsxs)("span",{className:"text-green-accent",children:["session_",j.id.slice(-6)]})]}),(0,s.jsxs)("div",{className:"flex items-center gap-3",children:[b&&(0,s.jsxs)("span",{className:"flex items-center gap-2 text-[12px] font-primary text-cyan-accent",children:[s.jsx("span",{className:"w-2 h-2 rounded-full bg-cyan-accent animate-pulse"}),"live"]}),s.jsx(l,{rawJson:P})]})]}),(0,s.jsxs)("div",{className:"flex items-center gap-4",children:[(0,s.jsxs)("h1",{className:"text-[22px] font-primary font-bold text-foreground",children:["$ ",j.project," ",j.git_branch||"session"]}),w&&s.jsx(o,{score:w.composite}),s.jsx("span",{className:"text-[12px] font-primary font-semibold px-2 py-0.5 rounded",style:{color:y(j.status),backgroundColor:`${y(j.status)}15`},children:"completed"===(d=j.status)?"completed":"active"===d?"in_progress":"crashed"===d?"crashed":d})]}),(0,s.jsxs)("div",{className:"flex items-center gap-3 text-[13px] font-primary text-muted-foreground flex-wrap",children:[(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[s.jsx("div",{className:"w-6 h-6 rounded-full bg-border-strong flex items-center justify-center text-[10px] font-semibold text-foreground",children:j.user_id.split("@")[0].replace(/[._]/g," ").split(" ").map(e=>e[0]).join("").toUpperCase().slice(0,2)}),s.jsx("span",{className:"text-foreground",children:j.user_id.split("@")[0].replace(/[.]/g,"_")})]}),s.jsx("span",{children:"\xb7"}),s.jsx("span",{children:j.project}),j.git_branch&&(0,s.jsxs)(s.Fragment,{children:[s.jsx("span",{children:"\xb7"}),s.jsx("span",{className:"text-cyan-accent",children:j.git_branch})]}),s.jsx("span",{children:"\xb7"}),(0,s.jsxs)("span",{className:b?"text-cyan-accent":"",children:[g(m),b&&" ↑"]}),s.jsx("span",{children:"\xb7"}),(0,s.jsxs)("span",{className:"text-green-accent",children:[j.stats.prompt_count," prompts"]}),(j.stats.model||j.model)&&(0,s.jsxs)(s.Fragment,{children:[s.jsx("span",{children:"\xb7"}),s.jsx("span",{className:"text-cyan-accent",title:j.stats.model||j.model,children:(p=j.stats.model||j.model)?p.includes("claude-sonnet-4")?"sonnet-4":p.includes("claude-opus-4")?"opus-4":p.includes("claude-haiku-3")?"haiku-3.5":p.includes("claude-sonnet-3")?"sonnet-3.5":p.includes("gpt-4o")?"gpt-4o":p.includes("o3")?"o3":p.includes("gemini")?"gemini":p.length>20?p.slice(0,20)+"…":p:"unknown"})]}),j.stats.total_cost_usd>0&&(0,s.jsxs)(s.Fragment,{children:[s.jsx("span",{children:"\xb7"}),s.jsx("span",{children:v(j.stats.total_cost_usd)})]}),s.jsx("span",{children:"\xb7"}),s.jsx("span",{children:j.started_at?.slice(0,10)})]}),j.insights&&(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{className:"flex items-center gap-2 flex-wrap",children:[s.jsx("span",{className:"text-[11px] font-primary text-text-secondary",children:"insights:"}),s.jsx("span",{className:"text-[11px] font-primary font-semibold px-2 py-0.5 rounded",style:{backgroundColor:"rgba(6, 182, 212, 0.1)",color:"var(--cyan-accent)"},children:j.insights.task_category}),s.jsx("span",{className:"text-[11px] font-primary font-semibold px-2 py-0.5 rounded",style:{backgroundColor:"var(--secondary)",color:"var(--muted-foreground)"},children:j.insights.task_size}),j.insights.workflow_tags?.map(e=>s.jsx("span",{className:"text-[11px] font-primary px-2 py-0.5 rounded",style:{backgroundColor:"var(--green-accent-bg)",color:"var(--green-accent)"},children:e},e)),j.insights.prompting_tags?.map(e=>s.jsx("span",{className:"text-[11px] font-primary px-2 py-0.5 rounded",style:{backgroundColor:"rgba(168, 85, 247, 0.1)",color:"#A855F7"},children:e},e)),j.insights.failure_modes?.map(e=>s.jsxs("span",{className:"text-[11px] font-primary px-2 py-0.5 rounded",style:{backgroundColor:"rgba(239, 68, 68, 0.1)",color:"var(--red-accent)"},children:["⚠ ",e]},e)),j.insights.complexity_factors?.map(e=>s.jsx("span",{className:"text-[11px] font-primary px-2 py-0.5 rounded",style:{backgroundColor:"rgba(245, 158, 11, 0.1)",color:"var(--amber-accent)"},children:e},e))]}),j.insights.key_learning&&(0,s.jsxs)("div",{className:"text-[12px] font-secondary text-muted-foreground italic pl-1",children:["\uD83D\uDCA1 ",j.insights.key_learning]})]}),s.jsx("div",{className:"border-t border-border"}),(0,s.jsxs)("div",{className:"flex gap-4",children:[s.jsx(i.i,{label:"outcome",value:w?w.outcome>=.7?"success":w.outcome>.3?"partial":"failed":"active"===j.status?"in_progress":"-",valueColor:w&&w.outcome>=.7?"var(--green-accent)":w&&w.outcome>.3?"var(--amber-accent)":w?"var(--red-accent)":"active"===j.status?"var(--cyan-accent)":void 0}),s.jsx(i.i,{label:"efficiency",value:w?`${w.efficiency.toFixed(2)}`:"-",valueColor:w?w.efficiency>=.9?"var(--green-accent)":w.efficiency>=.75?"var(--amber-accent)":"var(--red-accent)":void 0}),s.jsx(i.i,{label:"tool_calls",value:`${j.stats.tool_call_count}`}),s.jsx(i.i,{label:"errors",value:`${j.stats.error_count}`,valueColor:j.stats.error_count>0?"var(--red-accent)":void 0}),s.jsx(i.i,{label:"tokens",value:_(j.stats.total_tokens)}),s.jsx(i.i,{label:"cost",value:v(j.stats.total_cost_usd)})]}),j.stats.llm_call_count>0&&(0,s.jsxs)("div",{className:"flex gap-4",children:[null!==j.stats.context_utilization_pct&&(0,s.jsxs)("div",{className:"border border-border-strong p-4 rounded flex-1",children:[s.jsx("h3",{className:"text-[12px] font-primary text-text-secondary font-medium mb-2",children:"// context_utilization"}),(0,s.jsxs)("div",{className:"flex items-center gap-4",children:[(0,s.jsxs)("div",{className:"relative w-16 h-16",children:[(0,s.jsxs)("svg",{viewBox:"0 0 36 36",className:"w-full h-full -rotate-90",children:[s.jsx("path",{d:"M18 2.0845 a 15.9155 15.9155 0 0 1 0 31.831 a 15.9155 15.9155 0 0 1 0 -31.831",fill:"none",stroke:"var(--border-strong)",strokeWidth:"3"}),s.jsx("path",{d:"M18 2.0845 a 15.9155 15.9155 0 0 1 0 31.831 a 15.9155 15.9155 0 0 1 0 -31.831",fill:"none",stroke:j.stats.context_utilization_pct>80?"var(--red-accent)":j.stats.context_utilization_pct>50?"var(--amber-accent)":"var(--green-accent)",strokeWidth:"3",strokeDasharray:`${j.stats.context_utilization_pct}, 100`,strokeLinecap:"round"})]}),s.jsx("div",{className:"absolute inset-0 flex items-center justify-center",children:(0,s.jsxs)("span",{className:"text-[11px] font-primary font-bold",style:{color:j.stats.context_utilization_pct>80?"var(--red-accent)":j.stats.context_utilization_pct>50?"var(--amber-accent)":"var(--green-accent)"},children:[Math.round(j.stats.context_utilization_pct),"%"]})})]}),(0,s.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,s.jsxs)("span",{className:"text-[13px] font-primary text-foreground",children:["peak: ",_(j.stats.peak_input_tokens)]}),j.stats.context_window&&(0,s.jsxs)("span",{className:"text-[11px] font-primary text-text-tertiary",children:["of ",_(j.stats.context_window)," window"]}),j.stats.context_utilization_pct>80&&s.jsx("span",{className:"text-[11px] font-primary text-red-accent font-semibold",children:"⚠ near limit"})]})]})]}),(0,s.jsxs)("div",{className:"border border-border-strong p-4 rounded flex-1",children:[s.jsx("h3",{className:"text-[12px] font-primary text-text-secondary font-medium mb-2",children:"// token_breakdown"}),(()=>{let e=j.stats.total_input_tokens||0,t=j.stats.total_output_tokens||0,r=j.stats.total_cache_read_tokens||0,n=j.stats.total_cache_write_tokens||0,a=e+t;if(0===a)return null;let o=[{label:"input",value:e-r-n,color:"var(--cyan-accent)"},{label:"cache_read",value:r,color:"var(--green-accent)"},{label:"cache_write",value:n,color:"var(--amber-accent)"},{label:"output",value:t,color:"#EC4899"}].filter(e=>e.value>0);return(0,s.jsxs)("div",{className:"flex flex-col gap-2",children:[s.jsx("div",{className:"flex h-3 rounded-full overflow-hidden bg-border-strong",children:o.map(e=>s.jsx("div",{style:{width:`${e.value/a*100}%`,backgroundColor:e.color},title:`${e.label}: ${_(e.value)}`},e.label))}),s.jsx("div",{className:"flex gap-4 flex-wrap",children:o.map(e=>(0,s.jsxs)("div",{className:"flex items-center gap-1.5",children:[s.jsx("div",{className:"w-2 h-2 rounded-full",style:{backgroundColor:e.color}}),(0,s.jsxs)("span",{className:"text-[11px] font-primary text-muted-foreground",children:[e.label,": ",_(e.value)]})]},e.label))})]})})()]}),(0,s.jsxs)("div",{className:"border border-border-strong p-4 rounded flex-1",children:[s.jsx("h3",{className:"text-[12px] font-primary text-text-secondary font-medium mb-2",children:"// efficiency"}),(0,s.jsxs)("div",{className:"flex flex-col gap-2",children:[j.stats.total_input_tokens>0&&j.stats.total_cache_read_tokens>0&&(0,s.jsxs)("div",{className:"flex items-center justify-between",children:[s.jsx("span",{className:"text-[12px] font-primary text-muted-foreground",children:"cache hit rate"}),(0,s.jsxs)("span",{className:"text-[13px] font-primary font-semibold",style:{color:j.stats.total_cache_read_tokens/j.stats.total_input_tokens>.5?"var(--green-accent)":"var(--amber-accent)"},children:[Math.round(j.stats.total_cache_read_tokens/j.stats.total_input_tokens*100),"%"]})]}),(0,s.jsxs)("div",{className:"flex items-center justify-between",children:[s.jsx("span",{className:"text-[12px] font-primary text-muted-foreground",children:"LLM calls"}),s.jsx("span",{className:"text-[13px] font-primary text-foreground font-semibold",children:j.stats.llm_call_count})]}),j.stats.llm_call_count>0&&j.stats.total_cost_usd>0&&(0,s.jsxs)("div",{className:"flex items-center justify-between",children:[s.jsx("span",{className:"text-[12px] font-primary text-muted-foreground",children:"avg cost/call"}),s.jsx("span",{className:"text-[13px] font-primary text-foreground font-semibold",children:v(j.stats.total_cost_usd/j.stats.llm_call_count)})]}),j.stats.llm_call_count>0&&(0,s.jsxs)("div",{className:"flex items-center justify-between",children:[s.jsx("span",{className:"text-[12px] font-primary text-muted-foreground",children:"avg tokens/call"}),s.jsx("span",{className:"text-[13px] font-primary text-foreground font-semibold",children:_(Math.round(j.stats.total_tokens/j.stats.llm_call_count))})]})]})]})]}),(()=>{let e=N.filter(e=>"llm_response"===e.event_type);if(e.length<2)return null;let t=e[0]?.payload?.context_window||null,r=Math.max(...e.map(e=>e.payload?.input_tokens||0));e.map(e=>e.payload?.output_tokens||0);let n=t||1.2*r;return(0,s.jsxs)("div",{className:"border border-border-strong p-4 rounded",children:[(0,s.jsxs)("h3",{className:"text-[12px] font-primary text-text-secondary font-medium mb-3",children:["// tokens_per_turn",t&&(0,s.jsxs)("span",{className:"ml-2 text-text-tertiary",children:["(window: ",_(t),")"]})]}),s.jsx("div",{className:"flex items-end gap-[2px] h-[80px]",children:e.map((e,r)=>{let a=e.payload?.input_tokens||0,o=e.payload?.output_tokens||0,i=n>0?a/n*100:0,l=n>0?o/n*100:0,c=t&&a/t>.8,d=t&&a/t>.5;return(0,s.jsxs)("div",{className:"flex-1 flex flex-col justify-end min-w-[4px] gap-[1px]",children:[s.jsx("div",{className:"rounded-t",style:{height:`${Math.max(l,1)}%`,backgroundColor:"#EC4899",opacity:.7},title:`${_(o)} output tokens`}),s.jsx("div",{className:"rounded-t",style:{height:`${Math.max(i,2)}%`,backgroundColor:c?"var(--red-accent)":d?"var(--amber-accent)":"var(--green-accent)",opacity:.8},title:`${_(a)} input tokens (${t?`${Math.round(a/t*100)}% of context`:`call ${r+1}`})`})]},r)})}),(0,s.jsxs)("div",{className:"flex justify-between mt-1",children:[s.jsx("span",{className:"text-[10px] font-primary text-text-tertiary",children:"call 1"}),(0,s.jsxs)("div",{className:"flex items-center gap-3",children:[(0,s.jsxs)("div",{className:"flex items-center gap-1",children:[s.jsx("div",{className:"w-2 h-2 rounded-full",style:{backgroundColor:"var(--green-accent)"}}),s.jsx("span",{className:"text-[10px] font-primary text-text-tertiary",children:"input"})]}),(0,s.jsxs)("div",{className:"flex items-center gap-1",children:[s.jsx("div",{className:"w-2 h-2 rounded-full",style:{backgroundColor:"#EC4899"}}),s.jsx("span",{className:"text-[10px] font-primary text-text-tertiary",children:"output"})]})]}),(0,s.jsxs)("span",{className:"text-[10px] font-primary text-text-tertiary",children:["call ",e.length]})]})]})})(),C&&(0,s.jsxs)("div",{className:"text-[12px] font-primary text-muted-foreground",children:[s.jsx("span",{className:"text-text-secondary",children:"// tools: "}),C]}),j.stats.prs&&j.stats.prs.length>0&&(0,s.jsxs)("div",{className:"border border-border-strong p-4 rounded",children:[s.jsx("h3",{className:"text-[12px] font-primary text-text-secondary font-medium mb-3",children:"// pull_requests"}),j.stats.prs.map(e=>(0,s.jsxs)("div",{className:"flex flex-col gap-1 py-2",children:[(0,s.jsxs)("div",{className:"flex items-center gap-3",children:[s.jsx("span",{className:"text-[11px] font-primary font-semibold px-2 py-0.5 rounded",style:{color:"merged"===e.status?"#EC4899":"open"===e.status?"var(--green-accent)":"var(--muted-foreground)",backgroundColor:"merged"===e.status?"rgba(236, 72, 153, 0.1)":"open"===e.status?"var(--green-accent-bg)":"var(--secondary)"},children:e.status}),(0,s.jsxs)("a",{href:e.url,target:"_blank",rel:"noopener noreferrer",className:"text-[13px] font-primary text-foreground hover:text-green-accent transition-colors",children:["#",e.number," ",e.title]}),e.merged_at&&(0,s.jsxs)("span",{className:"text-[11px] font-primary text-text-tertiary ml-auto",children:["merged ",new Date(e.merged_at).toLocaleDateString()]})]}),(e.reviews_approved>0||e.reviews_changes_requested>0||e.review_comments>0)&&(0,s.jsxs)("div",{className:"flex items-center gap-4 ml-[52px] text-[11px] font-primary text-muted-foreground",children:[e.reviews_approved>0&&(0,s.jsxs)("span",{className:"text-green-accent",children:["✓ ",e.reviews_approved," approved"]}),e.reviews_changes_requested>0&&(0,s.jsxs)("span",{className:"text-amber-accent",children:["↻ ",e.reviews_changes_requested," changes requested"]}),e.review_comments>0&&(0,s.jsxs)("span",{children:[e.review_comments," comments"]}),e.commits_after_review>0&&(0,s.jsxs)("span",{children:[e.commits_after_review," revision commits"]}),e.time_to_merge_hours&&s.jsx("span",{children:e.time_to_merge_hours<1?`${Math.round(60*e.time_to_merge_hours)}min to merge`:`${Number(e.time_to_merge_hours).toFixed(1)}h to merge`})]})]},e.number))]}),(0,s.jsxs)("div",{children:[(0,s.jsxs)("div",{className:"flex items-center justify-between mb-4",children:[s.jsx("h2",{className:"text-[14px] font-primary font-semibold text-foreground",children:"// session_timeline"}),(0,s.jsxs)("span",{className:"text-[12px] font-primary text-text-secondary",children:[k.length," events \xb7 ",g(m)]})]}),s.jsx(h,{events:k})]}),w&&"completed"===j.status&&(0,s.jsxs)("div",{className:"rounded p-5 mt-2",style:{backgroundColor:w.composite>=.7?"var(--green-accent-bg)":w.composite>=.4?"rgba(245, 158, 11, 0.06)":"rgba(239, 68, 68, 0.06)",border:`1px solid ${w.composite>=.7?"var(--green-accent-border)":w.composite>=.4?"rgba(245, 158, 11, 0.2)":"rgba(239, 68, 68, 0.2)"}`},children:[s.jsx("h3",{className:"text-[13px] font-primary font-semibold mb-2",style:{color:w.composite>=.7?"var(--green-accent)":w.composite>=.4?"var(--amber-accent)":"var(--red-accent)"},children:"// session_summary"}),(0,s.jsxs)("div",{className:"text-[13px] font-secondary text-muted-foreground space-y-1",children:[(0,s.jsxs)("p",{children:["composite score: ",w.composite.toFixed(2)," \xb7 outcome: ",w.outcome.toFixed(2)," \xb7 efficiency: ",w.efficiency.toFixed(2)]}),(0,s.jsxs)("p",{children:[j.stats.prompt_count," prompts \xb7 ",j.stats.tool_call_count," tool calls \xb7"," ",j.stats.error_count," errors \xb7 ",j.stats.file_change_count," files changed",j.stats.total_tokens>0&&(0,s.jsxs)(s.Fragment,{children:[" \xb7 ",_(j.stats.total_tokens)," tokens"]}),j.stats.total_cost_usd>0&&(0,s.jsxs)(s.Fragment,{children:[" \xb7 ",v(j.stats.total_cost_usd)]})]}),m&&(0,s.jsxs)("p",{className:"text-text-tertiary",children:["session duration: ",g(m)," \xb7 ~",(j.stats.tool_call_count/Math.max(j.stats.prompt_count,1)).toFixed(1)," ","tool calls per prompt"]})]})]})]})}},4407:(e,t,r)=>{"use strict";r.d(t,{Sidebar:()=>i});var s=r(8924),n=r(2828),a=r(8975);let o=[{href:"/",label:"dashboard"},{href:"/sessions",label:"sessions"}];function i(){let e=(0,a.usePathname)();return(0,s.jsxs)("aside",{className:"w-[240px] min-h-screen border-r border-sidebar-border bg-sidebar flex flex-col",children:[(0,s.jsxs)("div",{className:"flex items-center gap-3 px-4 py-5",children:[s.jsx("div",{className:"w-8 h-8 rounded bg-green-accent flex items-center justify-center text-black font-bold text-sm",children:">"}),s.jsx("span",{className:"font-primary text-[15px] font-semibold text-sidebar-foreground",children:"> agentlens"})]}),(0,s.jsxs)("nav",{className:"flex flex-col px-3 gap-1",children:[s.jsx("span",{className:"px-3 py-2 text-[12px] font-medium text-muted-foreground font-primary",children:"// navigation"}),o.map(t=>{var r;return s.jsx(n.default,{href:t.href,className:`px-3 py-2 text-[13px] font-primary rounded-md transition-colors ${("/"===(r=t.href)?"/"===e:e.startsWith(r))?"bg-[#1F1F1F] text-sidebar-foreground":"text-sidebar-foreground/70 hover:text-sidebar-foreground hover:bg-[#1F1F1F]/50"}`,children:t.label},t.href)})]})]})}},450:(e,t,r)=>{"use strict";r.d(t,{Y:()=>s});let s=(0,r(6691).createProxy)(String.raw`/Users/philippwassibauer/agentlens/app/components/sidebar.tsx#Sidebar`)},3494:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>c,metadata:()=>l});var s=r(5886),n=r(5331),a=r.n(n),o=r(2994),i=r.n(o);r(9944);let l={title:"agentlens",description:"observability for agentic coding teams"};function c({children:e}){return s.jsx("html",{lang:"en",className:`${a().variable} ${i().variable}`,children:s.jsx("body",{children:e})})}},1614:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>c,dynamic:()=>l});var s=r(5886),n=r(450);let a=(0,r(6691).createProxy)(String.raw`/Users/philippwassibauer/agentlens/app/components/session-detail.tsx#SessionDetail`);var o=r(5955);async function i(e){let{getDb:t}=await Promise.all([r.e(787),r.e(218),r.e(267),r.e(98)]).then(r.bind(r,9098)),{handleGetSessionById:s}=await Promise.all([r.e(787),r.e(218),r.e(95),r.e(780)]).then(r.bind(r,8095)),n=t(),a=await s(n,e);return 404===a.status?null:a.body}let l="force-dynamic";async function c({params:e}){let t=await i(e.id);return t||(0,o.notFound)(),(0,s.jsxs)("div",{className:"flex min-h-screen",children:[s.jsx(n.Y,{}),s.jsx(a,{initialData:t,sessionId:e.id})]})}},5955:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{ReadonlyURLSearchParams:function(){return o},RedirectType:function(){return s.RedirectType},notFound:function(){return n.notFound},permanentRedirect:function(){return s.permanentRedirect},redirect:function(){return s.redirect}});let s=r(6975),n=r(1202);class a extends Error{constructor(){super("Method unavailable on `ReadonlyURLSearchParams`. Read more: https://nextjs.org/docs/app/api-reference/functions/use-search-params#updating-searchparams")}}class o extends URLSearchParams{append(){throw new a}delete(){throw new a}set(){throw new a}sort(){throw new a}}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},1202:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{isNotFoundError:function(){return n},notFound:function(){return s}});let r="NEXT_NOT_FOUND";function s(){let e=Error(r);throw e.digest=r,e}function n(e){return"object"==typeof e&&null!==e&&"digest"in e&&e.digest===r}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},5692:(e,t)=>{"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"RedirectStatusCode",{enumerable:!0,get:function(){return r}}),function(e){e[e.SeeOther=303]="SeeOther",e[e.TemporaryRedirect=307]="TemporaryRedirect",e[e.PermanentRedirect=308]="PermanentRedirect"}(r||(r={})),("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},6975:(e,t,r)=>{"use strict";var s;Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{RedirectType:function(){return s},getRedirectError:function(){return l},getRedirectStatusCodeFromError:function(){return m},getRedirectTypeFromError:function(){return x},getURLFromRedirectError:function(){return u},isRedirectError:function(){return p},permanentRedirect:function(){return d},redirect:function(){return c}});let n=r(4580),a=r(2934),o=r(5692),i="NEXT_REDIRECT";function l(e,t,r){void 0===r&&(r=o.RedirectStatusCode.TemporaryRedirect);let s=Error(i);s.digest=i+";"+t+";"+e+";"+r+";";let a=n.requestAsyncStorage.getStore();return a&&(s.mutableCookies=a.mutableCookies),s}function c(e,t){void 0===t&&(t="replace");let r=a.actionAsyncStorage.getStore();throw l(e,t,(null==r?void 0:r.isAction)?o.RedirectStatusCode.SeeOther:o.RedirectStatusCode.TemporaryRedirect)}function d(e,t){void 0===t&&(t="replace");let r=a.actionAsyncStorage.getStore();throw l(e,t,(null==r?void 0:r.isAction)?o.RedirectStatusCode.SeeOther:o.RedirectStatusCode.PermanentRedirect)}function p(e){if("object"!=typeof e||null===e||!("digest"in e)||"string"!=typeof e.digest)return!1;let[t,r,s,n]=e.digest.split(";",4),a=Number(n);return t===i&&("replace"===r||"push"===r)&&"string"==typeof s&&!isNaN(a)&&a in o.RedirectStatusCode}function u(e){return p(e)?e.digest.split(";",3)[2]:null}function x(e){if(!p(e))throw Error("Not a redirect error");return e.digest.split(";",2)[1]}function m(e){if(!p(e))throw Error("Not a redirect error");return Number(e.digest.split(";",4)[3])}(function(e){e.push="push",e.replace="replace"})(s||(s={})),("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},9944:()=>{}};var t=require("../../../webpack-runtime.js");t.C(e);var r=e=>t(t.s=e),s=t.X(0,[522,619,19],()=>r(306));module.exports=s})();
@@ -0,0 +1 @@
1
+ {"version":1,"files":["../../../../../node_modules/.pnpm/better-sqlite3@11.10.0/node_modules/better-sqlite3/build/Release/better_sqlite3.node","../../../../../node_modules/.pnpm/better-sqlite3@11.10.0/node_modules/better-sqlite3/lib/database.js","../../../../../node_modules/.pnpm/better-sqlite3@11.10.0/node_modules/better-sqlite3/lib/index.js","../../../../../node_modules/.pnpm/better-sqlite3@11.10.0/node_modules/better-sqlite3/lib/methods/aggregate.js","../../../../../node_modules/.pnpm/better-sqlite3@11.10.0/node_modules/better-sqlite3/lib/methods/backup.js","../../../../../node_modules/.pnpm/better-sqlite3@11.10.0/node_modules/better-sqlite3/lib/methods/function.js","../../../../../node_modules/.pnpm/better-sqlite3@11.10.0/node_modules/better-sqlite3/lib/methods/inspect.js","../../../../../node_modules/.pnpm/better-sqlite3@11.10.0/node_modules/better-sqlite3/lib/methods/pragma.js","../../../../../node_modules/.pnpm/better-sqlite3@11.10.0/node_modules/better-sqlite3/lib/methods/serialize.js","../../../../../node_modules/.pnpm/better-sqlite3@11.10.0/node_modules/better-sqlite3/lib/methods/table.js","../../../../../node_modules/.pnpm/better-sqlite3@11.10.0/node_modules/better-sqlite3/lib/methods/transaction.js","../../../../../node_modules/.pnpm/better-sqlite3@11.10.0/node_modules/better-sqlite3/lib/methods/wrappers.js","../../../../../node_modules/.pnpm/better-sqlite3@11.10.0/node_modules/better-sqlite3/lib/sqlite-error.js","../../../../../node_modules/.pnpm/better-sqlite3@11.10.0/node_modules/better-sqlite3/lib/util.js","../../../../../node_modules/.pnpm/better-sqlite3@11.10.0/node_modules/better-sqlite3/package.json","../../../../../node_modules/.pnpm/better-sqlite3@11.10.0/node_modules/bindings","../../../../../node_modules/.pnpm/bindings@1.5.0/node_modules/bindings/bindings.js","../../../../../node_modules/.pnpm/bindings@1.5.0/node_modules/bindings/package.json","../../../../../node_modules/.pnpm/bindings@1.5.0/node_modules/file-uri-to-path","../../../../../node_modules/.pnpm/file-uri-to-path@1.0.0/node_modules/file-uri-to-path/index.js","../../../../../node_modules/.pnpm/file-uri-to-path@1.0.0/node_modules/file-uri-to-path/package.json","../../../../../node_modules/.pnpm/next@14.2.35_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/next/dist/client/components/action-async-storage-instance.js","../../../../../node_modules/.pnpm/next@14.2.35_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/next/dist/client/components/action-async-storage.external.js","../../../../../node_modules/.pnpm/next@14.2.35_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/next/dist/client/components/async-local-storage.js","../../../../../node_modules/.pnpm/next@14.2.35_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/next/dist/client/components/request-async-storage-instance.js","../../../../../node_modules/.pnpm/next@14.2.35_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/next/dist/client/components/request-async-storage.external.js","../../../../../node_modules/.pnpm/next@14.2.35_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/next/dist/client/components/static-generation-async-storage-instance.js","../../../../../node_modules/.pnpm/next@14.2.35_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/next/dist/client/components/static-generation-async-storage.external.js","../../../../../node_modules/.pnpm/next@14.2.35_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../../node_modules/.pnpm/next@14.2.35_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../../node_modules/.pnpm/next@14.2.35_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js","../../../../../node_modules/.pnpm/next@14.2.35_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/next/dist/server/lib/trace/constants.js","../../../../../node_modules/.pnpm/next@14.2.35_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/next/dist/server/lib/trace/tracer.js","../../../../../node_modules/.pnpm/next@14.2.35_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/next/package.json","../../../../../node_modules/better-sqlite3","../../../../../node_modules/next","../../../../../package.json","../../../../package.json","../../../chunks/19.js","../../../chunks/218.js","../../../chunks/267.js","../../../chunks/522.js","../../../chunks/619.js","../../../chunks/780.js","../../../chunks/787.js","../../../chunks/95.js","../../../chunks/98.js","../../../webpack-runtime.js","page_client-reference-manifest.js"]}
@@ -0,0 +1 @@
1
+ globalThis.__RSC_MANIFEST=(globalThis.__RSC_MANIFEST||{});globalThis.__RSC_MANIFEST["/sessions/[id]/page"]={"moduleLoading":{"prefix":"/_next/","crossOrigin":null},"ssrModuleMapping":{"176":{"*":{"id":"6676","name":"*","chunks":[],"async":false}},"2433":{"*":{"id":"6544","name":"*","chunks":[],"async":false}},"2651":{"*":{"id":"9645","name":"*","chunks":[],"async":false}},"3238":{"*":{"id":"48","name":"*","chunks":[],"async":false}},"6552":{"*":{"id":"4407","name":"*","chunks":[],"async":false}},"7523":{"*":{"id":"3477","name":"*","chunks":[],"async":false}},"8528":{"*":{"id":"5116","name":"*","chunks":[],"async":false}},"8608":{"*":{"id":"7088","name":"*","chunks":[],"async":false}},"9414":{"*":{"id":"8850","name":"*","chunks":[],"async":false}},"9498":{"*":{"id":"4942","name":"*","chunks":[],"async":false}}},"edgeSSRModuleMapping":{},"clientModules":{"/Users/philippwassibauer/agentlens/node_modules/.pnpm/next@14.2.35_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/next/dist/client/components/app-router.js":{"id":2433,"name":"*","chunks":[],"async":false},"/Users/philippwassibauer/agentlens/node_modules/.pnpm/next@14.2.35_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/next/dist/esm/client/components/app-router.js":{"id":2433,"name":"*","chunks":[],"async":false},"/Users/philippwassibauer/agentlens/node_modules/.pnpm/next@14.2.35_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/next/dist/client/components/client-page.js":{"id":7523,"name":"*","chunks":[],"async":false},"/Users/philippwassibauer/agentlens/node_modules/.pnpm/next@14.2.35_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/next/dist/esm/client/components/client-page.js":{"id":7523,"name":"*","chunks":[],"async":false},"/Users/philippwassibauer/agentlens/node_modules/.pnpm/next@14.2.35_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/next/dist/client/components/error-boundary.js":{"id":8528,"name":"*","chunks":[],"async":false},"/Users/philippwassibauer/agentlens/node_modules/.pnpm/next@14.2.35_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/next/dist/esm/client/components/error-boundary.js":{"id":8528,"name":"*","chunks":[],"async":false},"/Users/philippwassibauer/agentlens/node_modules/.pnpm/next@14.2.35_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/next/dist/client/components/layout-router.js":{"id":176,"name":"*","chunks":[],"async":false},"/Users/philippwassibauer/agentlens/node_modules/.pnpm/next@14.2.35_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/next/dist/esm/client/components/layout-router.js":{"id":176,"name":"*","chunks":[],"async":false},"/Users/philippwassibauer/agentlens/node_modules/.pnpm/next@14.2.35_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/next/dist/client/components/not-found-boundary.js":{"id":2651,"name":"*","chunks":[],"async":false},"/Users/philippwassibauer/agentlens/node_modules/.pnpm/next@14.2.35_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/next/dist/esm/client/components/not-found-boundary.js":{"id":2651,"name":"*","chunks":[],"async":false},"/Users/philippwassibauer/agentlens/node_modules/.pnpm/next@14.2.35_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/next/dist/client/components/render-from-template-context.js":{"id":9414,"name":"*","chunks":[],"async":false},"/Users/philippwassibauer/agentlens/node_modules/.pnpm/next@14.2.35_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/next/dist/esm/client/components/render-from-template-context.js":{"id":9414,"name":"*","chunks":[],"async":false},"/Users/philippwassibauer/agentlens/node_modules/.pnpm/next@14.2.35_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/next/font/google/target.css?{\"path\":\"app/layout.tsx\",\"import\":\"JetBrains_Mono\",\"arguments\":[{\"subsets\":[\"latin\"],\"variable\":\"--font-jetbrains\"}],\"variableName\":\"jetbrainsMono\"}":{"id":1247,"name":"*","chunks":["185","static/chunks/app/layout-d3c17bc5a9ba9afe.js"],"async":false},"/Users/philippwassibauer/agentlens/node_modules/.pnpm/next@14.2.35_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/next/font/google/target.css?{\"path\":\"app/layout.tsx\",\"import\":\"IBM_Plex_Mono\",\"arguments\":[{\"subsets\":[\"latin\"],\"weight\":[\"400\",\"500\",\"600\",\"700\"],\"variable\":\"--font-ibm-plex\"}],\"variableName\":\"ibmPlexMono\"}":{"id":5348,"name":"*","chunks":["185","static/chunks/app/layout-d3c17bc5a9ba9afe.js"],"async":false},"/Users/philippwassibauer/agentlens/app/globals.css":{"id":4443,"name":"*","chunks":["185","static/chunks/app/layout-d3c17bc5a9ba9afe.js"],"async":false},"/Users/philippwassibauer/agentlens/app/components/session-detail.tsx":{"id":8608,"name":"*","chunks":["919","static/chunks/919-13111e16ca5aad12.js","899","static/chunks/app/sessions/%5Bid%5D/page-9cd58c2b3cbdb58c.js"],"async":false},"/Users/philippwassibauer/agentlens/app/components/sidebar.tsx":{"id":6552,"name":"*","chunks":["919","static/chunks/919-13111e16ca5aad12.js","899","static/chunks/app/sessions/%5Bid%5D/page-9cd58c2b3cbdb58c.js"],"async":false},"/Users/philippwassibauer/agentlens/app/components/dashboard-client.tsx":{"id":3238,"name":"*","chunks":["919","static/chunks/919-13111e16ca5aad12.js","838","static/chunks/838-ee1ac53cffa08ff2.js","931","static/chunks/app/page-f02e37b80f020816.js"],"async":false},"/Users/philippwassibauer/agentlens/node_modules/.pnpm/next@14.2.35_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/next/dist/client/link.js":{"id":9498,"name":"*","chunks":["919","static/chunks/919-13111e16ca5aad12.js","496","static/chunks/app/sessions/page-381d2eb994edfbe5.js"],"async":false},"/Users/philippwassibauer/agentlens/node_modules/.pnpm/next@14.2.35_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/next/dist/esm/client/link.js":{"id":9498,"name":"*","chunks":["919","static/chunks/919-13111e16ca5aad12.js","496","static/chunks/app/sessions/page-381d2eb994edfbe5.js"],"async":false}},"entryCSSFiles":{"/Users/philippwassibauer/agentlens/":[],"/Users/philippwassibauer/agentlens/app/layout":["static/css/e0ed3c3bd07a0247.css"],"/Users/philippwassibauer/agentlens/app/page":[],"/Users/philippwassibauer/agentlens/app/sessions/page":[],"/Users/philippwassibauer/agentlens/app/sessions/[id]/page":[]}}
@@ -0,0 +1 @@
1
+ (()=>{var e={};e.id=496,e.ids=[496],e.modules={5890:e=>{"use strict";e.exports=require("better-sqlite3")},2934:e=>{"use strict";e.exports=require("next/dist/client/components/action-async-storage.external.js")},4580:e=>{"use strict";e.exports=require("next/dist/client/components/request-async-storage.external.js")},5869:e=>{"use strict";e.exports=require("next/dist/client/components/static-generation-async-storage.external.js")},399:e=>{"use strict";e.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},2048:e=>{"use strict";e.exports=require("fs")},9801:e=>{"use strict";e.exports=require("os")},5315:e=>{"use strict";e.exports=require("path")},7718:e=>{"use strict";e.exports=require("node:child_process")},9880:(e,t,r)=>{"use strict";r.r(t),r.d(t,{GlobalError:()=>o.a,__next_app__:()=>p,originalPathname:()=>x,pages:()=>c,routeModule:()=>m,tree:()=>d}),r(4565),r(3494),r(311);var s=r(9296),a=r(1650),n=r(7045),o=r.n(n),i=r(8184),l={};for(let e in i)0>["default","tree","pages","GlobalError","originalPathname","__next_app__","routeModule"].indexOf(e)&&(l[e]=()=>i[e]);r.d(t,l);let d=["",{children:["sessions",{children:["__PAGE__",{},{page:[()=>Promise.resolve().then(r.bind(r,4565)),"/Users/philippwassibauer/agentlens/app/sessions/page.tsx"]}]},{}]},{layout:[()=>Promise.resolve().then(r.bind(r,3494)),"/Users/philippwassibauer/agentlens/app/layout.tsx"],"not-found":[()=>Promise.resolve().then(r.t.bind(r,311,23)),"next/dist/client/components/not-found-error"]}],c=["/Users/philippwassibauer/agentlens/app/sessions/page.tsx"],x="/sessions/page",p={require:r,loadChunk:()=>Promise.resolve()},m=new s.AppPageRouteModule({definition:{kind:a.x.APP_PAGE,page:"/sessions/page",pathname:"/sessions",bundlePath:"",filename:"",appPaths:[]},userland:{loaderTree:d}})},970:(e,t,r)=>{Promise.resolve().then(r.bind(r,4407)),Promise.resolve().then(r.t.bind(r,4942,23))},9489:(e,t,r)=>{Promise.resolve().then(r.t.bind(r,6544,23)),Promise.resolve().then(r.t.bind(r,3477,23)),Promise.resolve().then(r.t.bind(r,5116,23)),Promise.resolve().then(r.t.bind(r,6676,23)),Promise.resolve().then(r.t.bind(r,9645,23)),Promise.resolve().then(r.t.bind(r,8850,23))},198:()=>{},4407:(e,t,r)=>{"use strict";r.d(t,{Sidebar:()=>i});var s=r(8924),a=r(2828),n=r(8975);let o=[{href:"/",label:"dashboard"},{href:"/sessions",label:"sessions"}];function i(){let e=(0,n.usePathname)();return(0,s.jsxs)("aside",{className:"w-[240px] min-h-screen border-r border-sidebar-border bg-sidebar flex flex-col",children:[(0,s.jsxs)("div",{className:"flex items-center gap-3 px-4 py-5",children:[s.jsx("div",{className:"w-8 h-8 rounded bg-green-accent flex items-center justify-center text-black font-bold text-sm",children:">"}),s.jsx("span",{className:"font-primary text-[15px] font-semibold text-sidebar-foreground",children:"> agentlens"})]}),(0,s.jsxs)("nav",{className:"flex flex-col px-3 gap-1",children:[s.jsx("span",{className:"px-3 py-2 text-[12px] font-medium text-muted-foreground font-primary",children:"// navigation"}),o.map(t=>{var r;return s.jsx(a.default,{href:t.href,className:`px-3 py-2 text-[13px] font-primary rounded-md transition-colors ${("/"===(r=t.href)?"/"===e:e.startsWith(r))?"bg-[#1F1F1F] text-sidebar-foreground":"text-sidebar-foreground/70 hover:text-sidebar-foreground hover:bg-[#1F1F1F]/50"}`,children:t.label},t.href)})]})]})}},450:(e,t,r)=>{"use strict";r.d(t,{Y:()=>s});let s=(0,r(6691).createProxy)(String.raw`/Users/philippwassibauer/agentlens/app/components/sidebar.tsx#Sidebar`)},3494:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>d,metadata:()=>l});var s=r(5886),a=r(5331),n=r.n(a),o=r(2994),i=r.n(o);r(9944);let l={title:"agentlens",description:"observability for agentic coding teams"};function d({children:e}){return s.jsx("html",{lang:"en",className:`${n().variable} ${i().variable}`,children:s.jsx("body",{children:e})})}},4565:(e,t,r)=>{"use strict";r.r(t),r.d(t,{default:()=>c,dynamic:()=>d});var s=r(5886),a=r(450),n=r(6860),o=r.n(n);async function i(e){let{getDb:t}=await Promise.all([r.e(787),r.e(218),r.e(267),r.e(98)]).then(r.bind(r,9098)),{handleGetSessions:s}=await Promise.all([r.e(787),r.e(218),r.e(95),r.e(780)]).then(r.bind(r,8095)),a=t(),n=Math.max(1,parseInt(e.page||"1",10)),o=await s(a,{team_id:"default",status:e.status||void 0,project:e.project||void 0,limit:String(20),offset:String((n-1)*20)}),i=o.body.sessions;if(e.q){let t=e.q.toLowerCase();i=i.filter(e=>e.user_id.toLowerCase().includes(t)||e.project.toLowerCase().includes(t)||(e.git_branch||"").toLowerCase().includes(t))}return{sessions:i,total:o.body.total,page:n}}async function l(){let{getDb:e}=await Promise.all([r.e(787),r.e(218),r.e(267),r.e(98)]).then(r.bind(r,9098)),{handleGetStats:t}=await Promise.all([r.e(787),r.e(218),r.e(95),r.e(111)]).then(r.bind(r,1043)),s=e();return{projects:((await t(s,{team_id:"default"})).body.by_project||[]).map(e=>e.project)}}let d="force-dynamic";async function c({searchParams:e}){let[t,r]=await Promise.all([i(e),l()]),n=Math.ceil(t.total/20),d=e.status||"",c=e.project||"",p=e.q||"";function m(e){let t=new URLSearchParams;for(let[r,s]of(p&&t.set("q",p),d&&t.set("status",d),c&&t.set("project",c),Object.entries(e)))s?t.set(r,s):t.delete(r);let r=t.toString();return`/sessions${r?`?${r}`:""}`}return(0,s.jsxs)("div",{className:"flex min-h-screen",children:[s.jsx(a.Y,{}),(0,s.jsxs)("main",{className:"flex-1 p-10 flex flex-col gap-6",children:[(0,s.jsxs)("div",{children:[s.jsx("h1",{className:"text-[28px] font-primary font-bold text-foreground",children:"> sessions"}),s.jsx("p",{className:"text-[14px] font-secondary text-text-secondary mt-1",children:"browse and analyze agent coding sessions"})]}),(0,s.jsxs)("form",{className:"flex gap-4",action:"/sessions",method:"GET",children:[d&&s.jsx("input",{type:"hidden",name:"status",value:d}),c&&s.jsx("input",{type:"hidden",name:"project",value:c}),s.jsx("input",{type:"text",name:"q",defaultValue:p,placeholder:"$ search sessions...",className:"w-[300px] px-4 py-2 bg-background border border-border-strong rounded-md text-[13px] font-primary text-foreground placeholder:text-text-secondary focus:outline-none focus:border-green-accent/50"}),s.jsx(x,{projects:r.projects,current:c,searchParams:e})]}),s.jsx("div",{className:"flex gap-6 border-b border-border-strong",children:[{label:"all sessions",value:""},{label:"completed",value:"completed"},{label:"active",value:"active"},{label:"crashed",value:"crashed"}].map(e=>{let t=d===e.value||!d&&""===e.value;return s.jsx(o(),{href:m({status:e.value,page:""}),className:`pb-2 text-[13px] font-primary transition-colors ${t?"text-foreground border-b-2 border-green-accent":"text-text-secondary hover:text-foreground"}`,children:e.label},e.value)})}),(0,s.jsxs)("div",{className:"border border-border-strong",children:[(0,s.jsxs)("div",{className:"grid grid-cols-[70px_180px_90px_80px_120px_1fr_100px_90px_80px_70px_80px_90px] bg-surface-elevated px-4 py-3",children:[s.jsx("span",{className:"text-[12px] font-primary font-medium text-text-secondary",children:"score"}),s.jsx("span",{className:"text-[12px] font-primary font-medium text-text-secondary",children:"user"}),s.jsx("span",{className:"text-[12px] font-primary font-medium text-text-secondary",children:"status"}),s.jsx("span",{className:"text-[12px] font-primary font-medium text-text-secondary",children:"pr"}),s.jsx("span",{className:"text-[12px] font-primary font-medium text-text-secondary",children:"task"}),s.jsx("span",{className:"text-[12px] font-primary font-medium text-text-secondary",children:"project"}),s.jsx("span",{className:"text-[12px] font-primary font-medium text-text-secondary",children:"model"}),s.jsx("span",{className:"text-[12px] font-primary font-medium text-text-secondary",children:"cost"}),s.jsx("span",{className:"text-[12px] font-primary font-medium text-text-secondary",children:"ctx %"}),s.jsx("span",{className:"text-[12px] font-primary font-medium text-text-secondary",children:"calls"}),s.jsx("span",{className:"text-[12px] font-primary font-medium text-text-secondary",children:"prompts"}),s.jsx("span",{className:"text-[12px] font-primary font-medium text-text-secondary",children:"date"})]}),t.sessions.length>0?t.sessions.map(e=>{var t,r,a;let n=e.stats.score?.composite??null;return(0,s.jsxs)(o(),{href:`/sessions/${e.id}`,className:"grid grid-cols-[70px_180px_90px_80px_120px_1fr_100px_90px_80px_70px_80px_90px] items-center px-4 h-[44px] border-t border-border-strong hover:bg-surface-elevated/50 transition-colors",children:[s.jsx("span",{className:"text-[13px] font-primary font-semibold",style:{color:null!==n?n>.7?"var(--green-accent)":n>=.4?"var(--amber-accent)":"var(--red-accent)":"var(--text-secondary)"},children:null!==n?n.toFixed(2):"-"}),(0,s.jsxs)("div",{className:"flex items-center gap-2",children:[s.jsx("div",{className:"w-6 h-6 rounded-full bg-border-strong flex items-center justify-center text-[10px] font-primary font-semibold text-foreground",children:e.user_id.split("@")[0].replace(/[._]/g," ").split(" ").map(e=>e[0]).join("").toUpperCase().slice(0,2)}),s.jsx("span",{className:"text-[13px] font-primary text-foreground truncate",children:e.user_id.split("@")[0].replace(/[.]/g,"_")})]}),function(e){let t={completed:{bg:"var(--green-accent-bg)",text:"var(--green-accent)"},active:{bg:"rgba(6, 182, 212, 0.1)",text:"var(--cyan-accent)"},crashed:{bg:"rgba(239, 68, 68, 0.1)",text:"var(--red-accent)"}}[e]||{bg:"var(--secondary)",text:"var(--muted-foreground)"};return s.jsx("span",{className:"text-[11px] font-primary font-semibold px-2 py-0.5 rounded",style:{backgroundColor:t.bg,color:t.text},children:e})}(e.status),function(e){if(!e||0===e.length)return s.jsx("span",{className:"text-[13px] font-primary text-text-secondary",children:"-"});let t=e.find(e=>"merged"===e.status),r=e.find(e=>"open"===e.status),a=e.find(e=>"closed"===e.status),n=t||r||a||e[0],o={merged:{bg:"var(--green-accent-bg)",text:"var(--green-accent)"},open:{bg:"rgba(245, 158, 11, 0.1)",text:"var(--amber-accent)"},closed:{bg:"rgba(239, 68, 68, 0.1)",text:"var(--red-accent)"}}[n.status]||{bg:"var(--secondary)",text:"var(--muted-foreground)"};return(0,s.jsxs)("span",{className:"text-[11px] font-primary font-semibold px-2 py-0.5 rounded",style:{backgroundColor:o.bg,color:o.text},title:n.title?`#${n.number}: ${n.title}`:`PR #${n.number}`,children:[n.status,e.length>1&&(0,s.jsxs)("span",{className:"ml-1 opacity-60",children:["+",e.length-1]})]})}(e.stats.prs),s.jsx("div",{className:"flex items-center gap-1",children:e.insights?(0,s.jsxs)(s.Fragment,{children:[s.jsx("span",{className:"text-[10px] font-primary font-semibold px-1.5 py-0.5 rounded",style:{backgroundColor:"rgba(6, 182, 212, 0.1)",color:"var(--cyan-accent)"},children:e.insights.task_category}),s.jsx("span",{className:"text-[10px] font-primary px-1.5 py-0.5 rounded",style:{backgroundColor:"var(--secondary)",color:"var(--muted-foreground)"},children:e.insights.task_size})]}):s.jsx("span",{className:"text-[13px] font-primary text-text-secondary",children:"-"})}),s.jsx("span",{className:"text-[13px] font-primary text-muted-foreground truncate",children:e.project}),s.jsx("span",{className:"text-[13px] font-primary text-muted-foreground truncate",title:e.stats.model||e.model||void 0,children:(t=e.stats.model||e.model)?t.includes("claude-sonnet-4")?"sonnet-4":t.includes("claude-opus-4")?"opus-4":t.includes("claude-haiku-3")?"haiku-3.5":t.includes("claude-sonnet-3")?"sonnet-3.5":t.includes("gpt-4o")?"gpt-4o":t.includes("gpt-4-turbo")?"gpt-4t":t.includes("o3")?"o3":t.includes("o4-mini")?"o4-mini":t.includes("gemini")?"gemini":t.length>12?t.slice(0,12)+"…":t:"-"}),s.jsx("span",{className:"text-[13px] font-primary",style:{color:e.stats.total_cost_usd>0?"var(--foreground)":"var(--text-secondary)"},title:e.stats.total_tokens?`${(r=e.stats.total_tokens)&&0!==r?r>=1e6?`${(r/1e6).toFixed(1)}M`:r>=1e3?`${(r/1e3).toFixed(0)}k`:String(r):"-"} tokens`:void 0,children:(a=e.stats.total_cost_usd)&&0!==a?a<.01?`$${a.toFixed(4)}`:a<1?`$${a.toFixed(3)}`:`$${a.toFixed(2)}`:"-"}),s.jsx("span",{className:"text-[13px] font-primary font-semibold",style:{color:null===e.stats.context_utilization_pct?"var(--text-secondary)":e.stats.context_utilization_pct>80?"var(--red-accent)":e.stats.context_utilization_pct>50?"var(--amber-accent)":"var(--green-accent)"},title:null!==e.stats.context_utilization_pct?`${e.stats.context_utilization_pct}% of context window used`:void 0,children:null!==e.stats.context_utilization_pct?`${Math.round(e.stats.context_utilization_pct)}%`:"-"}),s.jsx("span",{className:"text-[13px] font-primary text-muted-foreground",children:e.stats.llm_call_count||"-"}),s.jsx("span",{className:"text-[13px] font-primary",style:{color:e.stats.prompt_count>6?"var(--amber-accent)":"var(--foreground)"},children:e.stats.prompt_count}),s.jsx("span",{className:"text-[13px] font-primary text-muted-foreground",children:function(e){let t=new Date(e);return`${["jan","feb","mar","apr","may","jun","jul","aug","sep","oct","nov","dec"][t.getUTCMonth()]} ${t.getUTCDate()}`}(e.started_at)})]},e.id)}):s.jsx("div",{className:"px-4 py-8 text-center text-[13px] font-primary text-text-secondary",children:"no sessions found"})]}),n>1&&(0,s.jsxs)("div",{className:"flex items-center justify-between text-[12px] font-primary text-text-secondary",children:[(0,s.jsxs)("span",{children:["showing ",Math.min((t.page-1)*20+1,t.total),"–",Math.min(20*t.page,t.total)," of ",t.total," sessions"]}),(0,s.jsxs)("div",{className:"flex gap-1",children:[t.page>1?s.jsx(o(),{href:m({page:String(t.page-1)}),className:"px-2 py-1 border border-border-strong rounded hover:text-foreground",children:"<< prev"}):s.jsx("span",{className:"px-2 py-1 border border-border-strong rounded text-text-tertiary",children:"<< prev"}),Array.from({length:Math.min(n,5)},(e,r)=>{let a;let i=(a=n<=5?r+1:t.page<=3?r+1:t.page>=n-2?n-4+r:t.page-2+r)===t.page;return(0,s.jsxs)(o(),{href:m({page:String(a)}),className:`px-2 py-1 border rounded ${i?"border-green-accent text-green-accent":"border-border-strong hover:text-foreground"}`,children:["[",a,"]"]},a)}),t.page<n?s.jsx(o(),{href:m({page:String(t.page+1)}),className:"px-2 py-1 border border-border-strong rounded hover:text-foreground",children:"next >>"}):s.jsx("span",{className:"px-2 py-1 border border-border-strong rounded text-text-tertiary",children:"next >>"})]})]})]})]})}function x({projects:e,current:t,searchParams:r}){function a(e){let t=new URLSearchParams;r.q&&t.set("q",r.q),r.status&&t.set("status",r.status),e&&t.set("project",e);let s=t.toString();return`/sessions${s?`?${s}`:""}`}return(0,s.jsxs)("div",{className:"relative group",children:[s.jsx("div",{className:"px-4 py-2 bg-background border border-border-strong rounded-md text-[13px] font-primary text-text-secondary cursor-pointer hover:border-green-accent/50 min-w-[160px]",children:t||"[all projects]"}),(0,s.jsxs)("div",{className:"absolute top-full left-0 mt-1 bg-background border border-border-strong rounded-md z-10 min-w-[160px] hidden group-hover:block",children:[s.jsx(o(),{href:a(""),className:`block px-4 py-2 text-[13px] font-primary hover:bg-surface-elevated ${t?"text-text-secondary":"text-green-accent"}`,children:"[all projects]"}),e.map(e=>s.jsx(o(),{href:a(e),className:`block px-4 py-2 text-[13px] font-primary hover:bg-surface-elevated ${t===e?"text-green-accent":"text-text-secondary"}`,children:e},e))]})]})}},6860:(e,t,r)=>{"use strict";let{createProxy:s}=r(6691);e.exports=s("/Users/philippwassibauer/agentlens/node_modules/.pnpm/next@14.2.35_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/next/dist/client/link.js")},9944:()=>{}};var t=require("../../webpack-runtime.js");t.C(e);var r=e=>t(t.s=e),s=t.X(0,[522,619,19],()=>r(9880));module.exports=s})();
@@ -0,0 +1 @@
1
+ {"version":1,"files":["../../../../node_modules/.pnpm/better-sqlite3@11.10.0/node_modules/better-sqlite3/build/Release/better_sqlite3.node","../../../../node_modules/.pnpm/better-sqlite3@11.10.0/node_modules/better-sqlite3/lib/database.js","../../../../node_modules/.pnpm/better-sqlite3@11.10.0/node_modules/better-sqlite3/lib/index.js","../../../../node_modules/.pnpm/better-sqlite3@11.10.0/node_modules/better-sqlite3/lib/methods/aggregate.js","../../../../node_modules/.pnpm/better-sqlite3@11.10.0/node_modules/better-sqlite3/lib/methods/backup.js","../../../../node_modules/.pnpm/better-sqlite3@11.10.0/node_modules/better-sqlite3/lib/methods/function.js","../../../../node_modules/.pnpm/better-sqlite3@11.10.0/node_modules/better-sqlite3/lib/methods/inspect.js","../../../../node_modules/.pnpm/better-sqlite3@11.10.0/node_modules/better-sqlite3/lib/methods/pragma.js","../../../../node_modules/.pnpm/better-sqlite3@11.10.0/node_modules/better-sqlite3/lib/methods/serialize.js","../../../../node_modules/.pnpm/better-sqlite3@11.10.0/node_modules/better-sqlite3/lib/methods/table.js","../../../../node_modules/.pnpm/better-sqlite3@11.10.0/node_modules/better-sqlite3/lib/methods/transaction.js","../../../../node_modules/.pnpm/better-sqlite3@11.10.0/node_modules/better-sqlite3/lib/methods/wrappers.js","../../../../node_modules/.pnpm/better-sqlite3@11.10.0/node_modules/better-sqlite3/lib/sqlite-error.js","../../../../node_modules/.pnpm/better-sqlite3@11.10.0/node_modules/better-sqlite3/lib/util.js","../../../../node_modules/.pnpm/better-sqlite3@11.10.0/node_modules/better-sqlite3/package.json","../../../../node_modules/.pnpm/better-sqlite3@11.10.0/node_modules/bindings","../../../../node_modules/.pnpm/bindings@1.5.0/node_modules/bindings/bindings.js","../../../../node_modules/.pnpm/bindings@1.5.0/node_modules/bindings/package.json","../../../../node_modules/.pnpm/bindings@1.5.0/node_modules/file-uri-to-path","../../../../node_modules/.pnpm/file-uri-to-path@1.0.0/node_modules/file-uri-to-path/index.js","../../../../node_modules/.pnpm/file-uri-to-path@1.0.0/node_modules/file-uri-to-path/package.json","../../../../node_modules/.pnpm/next@14.2.35_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/next/dist/client/components/action-async-storage-instance.js","../../../../node_modules/.pnpm/next@14.2.35_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/next/dist/client/components/action-async-storage.external.js","../../../../node_modules/.pnpm/next@14.2.35_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/next/dist/client/components/async-local-storage.js","../../../../node_modules/.pnpm/next@14.2.35_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/next/dist/client/components/request-async-storage-instance.js","../../../../node_modules/.pnpm/next@14.2.35_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/next/dist/client/components/request-async-storage.external.js","../../../../node_modules/.pnpm/next@14.2.35_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/next/dist/client/components/static-generation-async-storage-instance.js","../../../../node_modules/.pnpm/next@14.2.35_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/next/dist/client/components/static-generation-async-storage.external.js","../../../../node_modules/.pnpm/next@14.2.35_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../node_modules/.pnpm/next@14.2.35_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../node_modules/.pnpm/next@14.2.35_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js","../../../../node_modules/.pnpm/next@14.2.35_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/next/dist/server/lib/trace/constants.js","../../../../node_modules/.pnpm/next@14.2.35_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/next/dist/server/lib/trace/tracer.js","../../../../node_modules/.pnpm/next@14.2.35_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/next/package.json","../../../../node_modules/better-sqlite3","../../../../node_modules/next","../../../../package.json","../../../package.json","../../chunks/111.js","../../chunks/19.js","../../chunks/218.js","../../chunks/267.js","../../chunks/522.js","../../chunks/619.js","../../chunks/780.js","../../chunks/787.js","../../chunks/95.js","../../chunks/98.js","../../webpack-runtime.js","page_client-reference-manifest.js"]}
@@ -0,0 +1 @@
1
+ globalThis.__RSC_MANIFEST=(globalThis.__RSC_MANIFEST||{});globalThis.__RSC_MANIFEST["/sessions/page"]={"moduleLoading":{"prefix":"/_next/","crossOrigin":null},"ssrModuleMapping":{"176":{"*":{"id":"6676","name":"*","chunks":[],"async":false}},"2433":{"*":{"id":"6544","name":"*","chunks":[],"async":false}},"2651":{"*":{"id":"9645","name":"*","chunks":[],"async":false}},"3238":{"*":{"id":"48","name":"*","chunks":[],"async":false}},"6552":{"*":{"id":"4407","name":"*","chunks":[],"async":false}},"7523":{"*":{"id":"3477","name":"*","chunks":[],"async":false}},"8528":{"*":{"id":"5116","name":"*","chunks":[],"async":false}},"8608":{"*":{"id":"7088","name":"*","chunks":[],"async":false}},"9414":{"*":{"id":"8850","name":"*","chunks":[],"async":false}},"9498":{"*":{"id":"4942","name":"*","chunks":[],"async":false}}},"edgeSSRModuleMapping":{},"clientModules":{"/Users/philippwassibauer/agentlens/node_modules/.pnpm/next@14.2.35_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/next/dist/client/components/app-router.js":{"id":2433,"name":"*","chunks":[],"async":false},"/Users/philippwassibauer/agentlens/node_modules/.pnpm/next@14.2.35_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/next/dist/esm/client/components/app-router.js":{"id":2433,"name":"*","chunks":[],"async":false},"/Users/philippwassibauer/agentlens/node_modules/.pnpm/next@14.2.35_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/next/dist/client/components/client-page.js":{"id":7523,"name":"*","chunks":[],"async":false},"/Users/philippwassibauer/agentlens/node_modules/.pnpm/next@14.2.35_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/next/dist/esm/client/components/client-page.js":{"id":7523,"name":"*","chunks":[],"async":false},"/Users/philippwassibauer/agentlens/node_modules/.pnpm/next@14.2.35_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/next/dist/client/components/error-boundary.js":{"id":8528,"name":"*","chunks":[],"async":false},"/Users/philippwassibauer/agentlens/node_modules/.pnpm/next@14.2.35_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/next/dist/esm/client/components/error-boundary.js":{"id":8528,"name":"*","chunks":[],"async":false},"/Users/philippwassibauer/agentlens/node_modules/.pnpm/next@14.2.35_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/next/dist/client/components/layout-router.js":{"id":176,"name":"*","chunks":[],"async":false},"/Users/philippwassibauer/agentlens/node_modules/.pnpm/next@14.2.35_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/next/dist/esm/client/components/layout-router.js":{"id":176,"name":"*","chunks":[],"async":false},"/Users/philippwassibauer/agentlens/node_modules/.pnpm/next@14.2.35_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/next/dist/client/components/not-found-boundary.js":{"id":2651,"name":"*","chunks":[],"async":false},"/Users/philippwassibauer/agentlens/node_modules/.pnpm/next@14.2.35_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/next/dist/esm/client/components/not-found-boundary.js":{"id":2651,"name":"*","chunks":[],"async":false},"/Users/philippwassibauer/agentlens/node_modules/.pnpm/next@14.2.35_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/next/dist/client/components/render-from-template-context.js":{"id":9414,"name":"*","chunks":[],"async":false},"/Users/philippwassibauer/agentlens/node_modules/.pnpm/next@14.2.35_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/next/dist/esm/client/components/render-from-template-context.js":{"id":9414,"name":"*","chunks":[],"async":false},"/Users/philippwassibauer/agentlens/node_modules/.pnpm/next@14.2.35_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/next/font/google/target.css?{\"path\":\"app/layout.tsx\",\"import\":\"JetBrains_Mono\",\"arguments\":[{\"subsets\":[\"latin\"],\"variable\":\"--font-jetbrains\"}],\"variableName\":\"jetbrainsMono\"}":{"id":1247,"name":"*","chunks":["185","static/chunks/app/layout-d3c17bc5a9ba9afe.js"],"async":false},"/Users/philippwassibauer/agentlens/node_modules/.pnpm/next@14.2.35_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/next/font/google/target.css?{\"path\":\"app/layout.tsx\",\"import\":\"IBM_Plex_Mono\",\"arguments\":[{\"subsets\":[\"latin\"],\"weight\":[\"400\",\"500\",\"600\",\"700\"],\"variable\":\"--font-ibm-plex\"}],\"variableName\":\"ibmPlexMono\"}":{"id":5348,"name":"*","chunks":["185","static/chunks/app/layout-d3c17bc5a9ba9afe.js"],"async":false},"/Users/philippwassibauer/agentlens/app/globals.css":{"id":4443,"name":"*","chunks":["185","static/chunks/app/layout-d3c17bc5a9ba9afe.js"],"async":false},"/Users/philippwassibauer/agentlens/app/components/session-detail.tsx":{"id":8608,"name":"*","chunks":[],"async":false},"/Users/philippwassibauer/agentlens/app/components/sidebar.tsx":{"id":6552,"name":"*","chunks":["919","static/chunks/919-13111e16ca5aad12.js","496","static/chunks/app/sessions/page-381d2eb994edfbe5.js"],"async":false},"/Users/philippwassibauer/agentlens/app/components/dashboard-client.tsx":{"id":3238,"name":"*","chunks":["919","static/chunks/919-13111e16ca5aad12.js","838","static/chunks/838-ee1ac53cffa08ff2.js","931","static/chunks/app/page-f02e37b80f020816.js"],"async":false},"/Users/philippwassibauer/agentlens/node_modules/.pnpm/next@14.2.35_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/next/dist/client/link.js":{"id":9498,"name":"*","chunks":["919","static/chunks/919-13111e16ca5aad12.js","496","static/chunks/app/sessions/page-381d2eb994edfbe5.js"],"async":false},"/Users/philippwassibauer/agentlens/node_modules/.pnpm/next@14.2.35_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/next/dist/esm/client/link.js":{"id":9498,"name":"*","chunks":["919","static/chunks/919-13111e16ca5aad12.js","496","static/chunks/app/sessions/page-381d2eb994edfbe5.js"],"async":false}},"entryCSSFiles":{"/Users/philippwassibauer/agentlens/":[],"/Users/philippwassibauer/agentlens/app/layout":["static/css/e0ed3c3bd07a0247.css"],"/Users/philippwassibauer/agentlens/app/page":[],"/Users/philippwassibauer/agentlens/app/sessions/page":[]}}
@@ -0,0 +1,11 @@
1
+ {
2
+ "/_not-found/page": "app/_not-found/page.js",
3
+ "/api/events/route": "app/api/events/route.js",
4
+ "/api/stats/route": "app/api/stats/route.js",
5
+ "/api/sessions/[id]/route": "app/api/sessions/[id]/route.js",
6
+ "/api/check-prs/route": "app/api/check-prs/route.js",
7
+ "/api/sessions/route": "app/api/sessions/route.js",
8
+ "/sessions/[id]/page": "app/sessions/[id]/page.js",
9
+ "/page": "app/page.js",
10
+ "/sessions/page": "app/sessions/page.js"
11
+ }
@@ -0,0 +1 @@
1
+ "use strict";exports.id=111,exports.ids=[111,780],exports.modules={1043:(t,s,o)=>{o.d(s,{handleGetStats:()=>l});var e=o(4210),n=o(2960),r=o(8095);function a(t,s){let o=new Date(t);return o.setDate(o.getDate()-s),o.toISOString()}async function l(t,s){let o=s.team_id||"default",l=new Date().toISOString(),c=s.from||a(l,30),u=s.to||l,_=a(c,30),i=s.harness,d=s.project,p=(await (0,r.handleGetSessions)(t,{team_id:o,from:c,to:u,harness:i,project:d,limit:"10000"})).body.sessions,m=(await (0,r.handleGetSessions)(t,{team_id:o,from:_,to:c,harness:i,project:d,limit:"10000"})).body.sessions,h=p.length,g=p.filter(t=>"completed"===t.status).length,f=p.filter(t=>"crashed"===t.status).length,w=p.filter(t=>null!==t.stats.score),k=w.length>0?w.reduce((t,s)=>t+s.stats.score.composite,0)/w.length:null,M=p.reduce((t,s)=>t+s.stats.prompt_count,0),y=h>0?Math.round(M/h*10)/10:0,v=p.reduce((t,s)=>t+(s.stats.total_cost_usd||0),0),S=p.reduce((t,s)=>t+(s.stats.total_tokens||0),0),b=p.reduce((t,s)=>t+(s.stats.total_input_tokens||0),0),x=p.reduce((t,s)=>t+(s.stats.total_output_tokens||0),0),D=p.reduce((t,s)=>t+(s.stats.total_cache_read_tokens||0),0),A=p.reduce((t,s)=>t+(s.stats.total_cache_write_tokens||0),0),U=p.filter(t=>null!==t.stats.context_utilization_pct),I=U.length>0?Math.round(U.reduce((t,s)=>t+s.stats.context_utilization_pct,0)/U.length*100)/100:null,z=U.filter(t=>t.stats.context_utilization_pct>80).length,G=new Map;for(let t of p){let s=t.stats.model||t.model||"unknown";G.has(s)||G.set(s,{session_count:0,total_cost:0,total_tokens:0});let o=G.get(s);o.session_count++,o.total_cost+=t.stats.total_cost_usd||0,o.total_tokens+=t.stats.total_tokens||0}let O=Array.from(G.entries()).filter(([t])=>"unknown"!==t).map(([t,s])=>({model:t,session_count:s.session_count,total_cost_usd:Math.round(1e4*s.total_cost)/1e4,total_tokens:s.total_tokens})).sort((t,s)=>s.session_count-t.session_count),N=m.length,j=m.filter(t=>null!==t.stats.score),J=j.length>0?j.reduce((t,s)=>t+s.stats.score.composite,0)/j.length:null,$=m.reduce((t,s)=>t+s.stats.prompt_count,0),q=N>0?Math.round($/N*10)/10:0,T=new Map;for(let t of p){let s=t.started_at.slice(0,10);T.has(s)||T.set(s,{count:0,scores:[]});let o=T.get(s);o.count++,null!==t.stats.score&&o.scores.push(t.stats.score.composite)}let C=Array.from(T.entries()).map(([t,s])=>({date:t,count:s.count,avg_score:s.scores.length>0?s.scores.reduce((t,s)=>t+s,0)/s.scores.length:null})).sort((t,s)=>t.date.localeCompare(s.date)),Q=new Map;for(let t of p){let s=t.user_id;Q.has(s)||Q.set(s,{session_count:0,scores:[]});let o=Q.get(s);o.session_count++,null!==t.stats.score&&o.scores.push(t.stats.score.composite)}let W=Array.from(Q.entries()).map(([t,s])=>({user_id:t,session_count:s.session_count,avg_score:s.scores.length>0?s.scores.reduce((t,s)=>t+s,0)/s.scores.length:null})),X=new Map;for(let t of p){let s=t.project;X.has(s)||X.set(s,{session_count:0,scores:[],total_cost:0});let o=X.get(s);o.session_count++,o.total_cost+=t.stats.total_cost_usd||0,null!==t.stats.score&&o.scores.push(t.stats.score.composite)}let B=Array.from(X.entries()).map(([t,s])=>({project:t,session_count:s.session_count,total_cost_usd:Math.round(1e4*s.total_cost)/1e4,avg_score:s.scores.length>0?s.scores.reduce((t,s)=>t+s,0)/s.scores.length:null})).sort((t,s)=>s.session_count-t.session_count),E=new Map;for(let t of p){let s=t.harness||"pi",o=t.stats.model||t.model||"unknown",e=`${s}::${o}`;E.has(e)||E.set(e,{harness:s,model:o,session_count:0,scores:[],total_cost:0,total_prompts:0});let n=E.get(e);n.session_count++,n.total_cost+=t.stats.total_cost_usd||0,n.total_prompts+=t.stats.prompt_count||0,null!==t.stats.score&&n.scores.push(t.stats.score.composite)}let F=Array.from(E.values()).filter(t=>"unknown"!==t.model).map(t=>({harness:t.harness,model:t.model,session_count:t.session_count,avg_score:t.scores.length>0?Math.round(t.scores.reduce((t,s)=>t+s,0)/t.scores.length*100)/100:null,avg_cost_per_session:t.session_count>0?Math.round(t.total_cost/t.session_count*1e4)/1e4:0,avg_prompts_per_session:t.session_count>0?Math.round(t.total_prompts/t.session_count*10)/10:0,total_cost_usd:Math.round(1e4*t.total_cost)/1e4})).sort((t,s)=>s.session_count-t.session_count),H=new Map;for(let t of p);for(let s of t.select().from(n.U3).where((0,e.xD)((0,e.eq)(n.U3.eventType,"tool_call"),(0,e.eg)(n.U3.timestamp,c),(0,e.G)(n.U3.timestamp,u))).all()){let t=JSON.parse(s.payload||"{}"),o=t.tool||"unknown";H.has(o)||H.set(o,{count:0,errors:0,totalDuration:0});let e=H.get(o);e.count++,t.is_error&&e.errors++,e.totalDuration+=t.duration_ms||0}let K=Array.from(H.entries()).map(([t,s])=>({tool:t,count:s.count,errors:s.errors,success_rate:s.count>0?Math.round((s.count-s.errors)/s.count*100):100,avg_duration_ms:s.count>0?Math.round(s.totalDuration/s.count):0})).sort((t,s)=>s.count-t.count),L=t.select().from(n.U3).where((0,e.xD)((0,e.eq)(n.U3.eventType,"error"),(0,e.eg)(n.U3.timestamp,c),(0,e.G)(n.U3.timestamp,u))).all(),P=new Map;for(let t of L){let s=JSON.parse(t.payload||"{}"),o=(s.message||"unknown error").slice(0,80),e=s.tool||"unknown",n=o.split("\n")[0].trim();P.has(n)||P.set(n,{count:0,tool:e}),P.get(n).count++}let R=Array.from(P.entries()).map(([t,s])=>({message:t,count:s.count,tool:s.tool})).sort((t,s)=>s.count-t.count).slice(0,10),V=new Map;for(let t of L){let s=JSON.parse(t.payload||"{}"),o=(s.message||"unknown error").slice(0,80).split("\n")[0].trim(),e=s.tool||"unknown";V.has(o)||V.set(o,{count:0,tool:e,sessionIds:new Set});let n=V.get(o);n.count++,n.sessionIds.add(t.sessionId)}return{status:200,body:{total_sessions:h,completed_sessions:g,crashed_sessions:f,avg_score:k,avg_prompts_per_session:y,sessions_per_day:C,by_user:W,by_project:B,changes:{sessions:N>0?Math.round((h-N)/N*100):null,score:null!==k&&null!==J?Math.round((k-J)*100):null,prompts:q>0?Math.round((y-q)*10)/10:null},tool_breakdown:K,top_errors:R,total_cost_usd:Math.round(1e4*v)/1e4,total_tokens:S,total_input_tokens:b,total_output_tokens:x,avg_cost_per_session:h>0?Math.round(v/h*1e4)/1e4:0,avg_context_utilization_pct:I,sessions_near_limit:z,total_cache_read_tokens:D,total_cache_write_tokens:A,cache_hit_rate:b>0?Math.round(D/b*1e4)/100:null,by_model:O,by_harness_model:F,trouble_spots:Array.from(V.entries()).map(([t,s])=>({message:t,count:s.count,session_count:s.sessionIds.size,tool:s.tool})).sort((t,s)=>s.count-t.count).slice(0,10)}}}},7780:(t,s,o)=>{o.d(s,{QX:()=>n});var e=o(3787);function n(t){return(0,e.i6)`count(${t||e.i6.raw("*")})`.mapWith(Number)}}};
@@ -0,0 +1 @@
1
+ "use strict";exports.id=19,exports.ids=[19],exports.modules={2828:(e,t,r)=>{r.d(t,{default:()=>o.a});var n=r(4942),o=r.n(n)},8975:(e,t,r)=>{var n=r(3728);r.o(n,"usePathname")&&r.d(t,{usePathname:function(){return n.usePathname}})},1737:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"addLocale",{enumerable:!0,get:function(){return n}}),r(1858);let n=function(e){for(var t=arguments.length,r=Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];return e};("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},3950:(e,t,r)=>{function n(e,t,r,n){return!1}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"getDomainLocale",{enumerable:!0,get:function(){return n}}),r(1858),("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},4942:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return E}});let n=r(1607),o=r(8924),a=n._(r(3911)),i=r(7119),u=r(5133),s=r(4359),l=r(5607),c=r(1737),f=r(7897),d=r(6115),p=r(5546),h=r(3950),_=r(5801),g=r(5343);function m(e){return"string"==typeof e?e:(0,s.formatUrl)(e)}let E=a.default.forwardRef(function(e,t){let r,n;let{href:s,as:E,children:R,prefetch:y=null,passHref:P,replace:S,shallow:b,scroll:A,locale:O,onClick:v,onMouseEnter:T,onTouchStart:N,legacyBehavior:I=!1,...x}=e;r=R,I&&("string"==typeof r||"number"==typeof r)&&(r=(0,o.jsx)("a",{children:r}));let C=a.default.useContext(f.RouterContext),j=a.default.useContext(d.AppRouterContext),M=null!=C?C:j,w=!C,L=!1!==y,D=null===y?g.PrefetchKind.AUTO:g.PrefetchKind.FULL,{href:U,as:F}=a.default.useMemo(()=>{if(!C){let e=m(s);return{href:e,as:E?m(E):e}}let[e,t]=(0,i.resolveHref)(C,s,!0);return{href:e,as:E?(0,i.resolveHref)(C,E):t||e}},[C,s,E]),X=a.default.useRef(U),k=a.default.useRef(F);I&&(n=a.default.Children.only(r));let W=I?n&&"object"==typeof n&&n.ref:t,[G,H,Y]=(0,p.useIntersection)({rootMargin:"200px"}),B=a.default.useCallback(e=>{(k.current!==F||X.current!==U)&&(Y(),k.current=F,X.current=U),G(e),W&&("function"==typeof W?W(e):"object"==typeof W&&(W.current=e))},[F,W,U,Y,G]);a.default.useEffect(()=>{},[F,U,H,O,L,null==C?void 0:C.locale,M,w,D]);let K={ref:B,onClick(e){I||"function"!=typeof v||v(e),I&&n.props&&"function"==typeof n.props.onClick&&n.props.onClick(e),M&&!e.defaultPrevented&&function(e,t,r,n,o,i,s,l,c){let{nodeName:f}=e.currentTarget;if("A"===f.toUpperCase()&&(function(e){let t=e.currentTarget.getAttribute("target");return t&&"_self"!==t||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey||e.nativeEvent&&2===e.nativeEvent.which}(e)||!c&&!(0,u.isLocalURL)(r)))return;e.preventDefault();let d=()=>{let e=null==s||s;"beforePopState"in t?t[o?"replace":"push"](r,n,{shallow:i,locale:l,scroll:e}):t[o?"replace":"push"](n||r,{scroll:e})};c?a.default.startTransition(d):d()}(e,M,U,F,S,b,A,O,w)},onMouseEnter(e){I||"function"!=typeof T||T(e),I&&n.props&&"function"==typeof n.props.onMouseEnter&&n.props.onMouseEnter(e)},onTouchStart:function(e){I||"function"!=typeof N||N(e),I&&n.props&&"function"==typeof n.props.onTouchStart&&n.props.onTouchStart(e)}};if((0,l.isAbsoluteUrl)(F))K.href=F;else if(!I||P||"a"===n.type&&!("href"in n.props)){let e=void 0!==O?O:null==C?void 0:C.locale,t=(null==C?void 0:C.isLocaleDomain)&&(0,h.getDomainLocale)(F,e,null==C?void 0:C.locales,null==C?void 0:C.domainLocales);K.href=t||(0,_.addBasePath)((0,c.addLocale)(F,e,null==C?void 0:C.defaultLocale))}return I?a.default.cloneElement(n,K):(0,o.jsx)("a",{...x,...K,children:r})});("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},8605:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{cancelIdleCallback:function(){return n},requestIdleCallback:function(){return r}});let r="undefined"!=typeof self&&self.requestIdleCallback&&self.requestIdleCallback.bind(window)||function(e){let t=Date.now();return self.setTimeout(function(){e({didTimeout:!1,timeRemaining:function(){return Math.max(0,50-(Date.now()-t))}})},1)},n="undefined"!=typeof self&&self.cancelIdleCallback&&self.cancelIdleCallback.bind(window)||function(e){return clearTimeout(e)};("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},7119:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"resolveHref",{enumerable:!0,get:function(){return f}});let n=r(9059),o=r(4359),a=r(7829),i=r(5607),u=r(1858),s=r(5133),l=r(4182),c=r(3559);function f(e,t,r){let f;let d="string"==typeof t?t:(0,o.formatWithValidation)(t),p=d.match(/^[a-zA-Z]{1,}:\/\//),h=p?d.slice(p[0].length):d;if((h.split("?",1)[0]||"").match(/(\/\/|\\)/)){console.error("Invalid href '"+d+"' passed to next/router in page: '"+e.pathname+"'. Repeated forward-slashes (//) or backslashes \\ are not valid in the href.");let t=(0,i.normalizeRepeatedSlashes)(h);d=(p?p[0]:"")+t}if(!(0,s.isLocalURL)(d))return r?[d]:d;try{f=new URL(d.startsWith("#")?e.asPath:e.pathname,"http://n")}catch(e){f=new URL("/","http://n")}try{let e=new URL(d,f);e.pathname=(0,u.normalizePathTrailingSlash)(e.pathname);let t="";if((0,l.isDynamicRoute)(e.pathname)&&e.searchParams&&r){let r=(0,n.searchParamsToUrlQuery)(e.searchParams),{result:i,params:u}=(0,c.interpolateAs)(e.pathname,e.pathname,r);i&&(t=(0,o.formatWithValidation)({pathname:i,hash:e.hash,query:(0,a.omit)(r,u)}))}let i=e.origin===f.origin?e.href.slice(e.origin.length):e.href;return r?[i,t||i]:i}catch(e){return r?[d]:d}}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},5546:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"useIntersection",{enumerable:!0,get:function(){return s}});let n=r(3911),o=r(8605),a="function"==typeof IntersectionObserver,i=new Map,u=[];function s(e){let{rootRef:t,rootMargin:r,disabled:s}=e,l=s||!a,[c,f]=(0,n.useState)(!1),d=(0,n.useRef)(null),p=(0,n.useCallback)(e=>{d.current=e},[]);return(0,n.useEffect)(()=>{if(a){if(l||c)return;let e=d.current;if(e&&e.tagName)return function(e,t,r){let{id:n,observer:o,elements:a}=function(e){let t;let r={root:e.root||null,margin:e.rootMargin||""},n=u.find(e=>e.root===r.root&&e.margin===r.margin);if(n&&(t=i.get(n)))return t;let o=new Map;return t={id:r,observer:new IntersectionObserver(e=>{e.forEach(e=>{let t=o.get(e.target),r=e.isIntersecting||e.intersectionRatio>0;t&&r&&t(r)})},e),elements:o},u.push(r),i.set(r,t),t}(r);return a.set(e,t),o.observe(e),function(){if(a.delete(e),o.unobserve(e),0===a.size){o.disconnect(),i.delete(n);let e=u.findIndex(e=>e.root===n.root&&e.margin===n.margin);e>-1&&u.splice(e,1)}}}(e,e=>e&&f(e),{root:null==t?void 0:t.current,rootMargin:r})}else if(!c){let e=(0,o.requestIdleCallback)(()=>f(!0));return()=>(0,o.cancelIdleCallback)(e)}},[l,r,t,c,d.current]),[p,c,(0,n.useCallback)(()=>{f(!1)},[])]}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},4217:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{ACTION_SUFFIX:function(){return s},APP_DIR_ALIAS:function(){return T},CACHE_ONE_YEAR:function(){return y},DOT_NEXT_ALIAS:function(){return O},ESLINT_DEFAULT_DIRS:function(){return B},GSP_NO_RETURNED_VALUE:function(){return X},GSSP_COMPONENT_MEMBER_ERROR:function(){return G},GSSP_NO_RETURNED_VALUE:function(){return k},INSTRUMENTATION_HOOK_FILENAME:function(){return b},MIDDLEWARE_FILENAME:function(){return P},MIDDLEWARE_LOCATION_REGEXP:function(){return S},NEXT_BODY_SUFFIX:function(){return f},NEXT_CACHE_IMPLICIT_TAG_ID:function(){return R},NEXT_CACHE_REVALIDATED_TAGS_HEADER:function(){return h},NEXT_CACHE_REVALIDATE_TAG_TOKEN_HEADER:function(){return _},NEXT_CACHE_SOFT_TAGS_HEADER:function(){return p},NEXT_CACHE_SOFT_TAG_MAX_LENGTH:function(){return E},NEXT_CACHE_TAGS_HEADER:function(){return d},NEXT_CACHE_TAG_MAX_ITEMS:function(){return g},NEXT_CACHE_TAG_MAX_LENGTH:function(){return m},NEXT_DATA_SUFFIX:function(){return l},NEXT_INTERCEPTION_MARKER_PREFIX:function(){return n},NEXT_META_SUFFIX:function(){return c},NEXT_QUERY_PARAM_PREFIX:function(){return r},NON_STANDARD_NODE_ENV:function(){return H},PAGES_DIR_ALIAS:function(){return A},PRERENDER_REVALIDATE_HEADER:function(){return o},PRERENDER_REVALIDATE_ONLY_GENERATED_HEADER:function(){return a},PUBLIC_DIR_MIDDLEWARE_CONFLICT:function(){return M},ROOT_DIR_ALIAS:function(){return v},RSC_ACTION_CLIENT_WRAPPER_ALIAS:function(){return j},RSC_ACTION_ENCRYPTION_ALIAS:function(){return C},RSC_ACTION_PROXY_ALIAS:function(){return x},RSC_ACTION_VALIDATE_ALIAS:function(){return I},RSC_MOD_REF_PROXY_ALIAS:function(){return N},RSC_PREFETCH_SUFFIX:function(){return i},RSC_SUFFIX:function(){return u},SERVER_PROPS_EXPORT_ERROR:function(){return F},SERVER_PROPS_GET_INIT_PROPS_CONFLICT:function(){return L},SERVER_PROPS_SSG_CONFLICT:function(){return D},SERVER_RUNTIME:function(){return K},SSG_FALLBACK_EXPORT_ERROR:function(){return Y},SSG_GET_INITIAL_PROPS_CONFLICT:function(){return w},STATIC_STATUS_PAGE_GET_INITIAL_PROPS_ERROR:function(){return U},UNSTABLE_REVALIDATE_RENAME_ERROR:function(){return W},WEBPACK_LAYERS:function(){return z},WEBPACK_RESOURCE_QUERIES:function(){return q}});let r="nxtP",n="nxtI",o="x-prerender-revalidate",a="x-prerender-revalidate-if-generated",i=".prefetch.rsc",u=".rsc",s=".action",l=".json",c=".meta",f=".body",d="x-next-cache-tags",p="x-next-cache-soft-tags",h="x-next-revalidated-tags",_="x-next-revalidate-tag-token",g=128,m=256,E=1024,R="_N_T_",y=31536e3,P="middleware",S=`(?:src/)?${P}`,b="instrumentation",A="private-next-pages",O="private-dot-next",v="private-next-root-dir",T="private-next-app-dir",N="private-next-rsc-mod-ref-proxy",I="private-next-rsc-action-validate",x="private-next-rsc-server-reference",C="private-next-rsc-action-encryption",j="private-next-rsc-action-client-wrapper",M="You can not have a '_next' folder inside of your public folder. This conflicts with the internal '/_next' route. https://nextjs.org/docs/messages/public-next-folder-conflict",w="You can not use getInitialProps with getStaticProps. To use SSG, please remove your getInitialProps",L="You can not use getInitialProps with getServerSideProps. Please remove getInitialProps.",D="You can not use getStaticProps or getStaticPaths with getServerSideProps. To use SSG, please remove getServerSideProps",U="can not have getInitialProps/getServerSideProps, https://nextjs.org/docs/messages/404-get-initial-props",F="pages with `getServerSideProps` can not be exported. See more info here: https://nextjs.org/docs/messages/gssp-export",X="Your `getStaticProps` function did not return an object. Did you forget to add a `return`?",k="Your `getServerSideProps` function did not return an object. Did you forget to add a `return`?",W="The `unstable_revalidate` property is available for general use.\nPlease use `revalidate` instead.",G="can not be attached to a page's component and must be exported from the page. See more info here: https://nextjs.org/docs/messages/gssp-component-member",H='You are using a non-standard "NODE_ENV" value in your environment. This creates inconsistencies in the project and is strongly advised against. Read more: https://nextjs.org/docs/messages/non-standard-node-env',Y="Pages with `fallback` enabled in `getStaticPaths` can not be exported. See more info here: https://nextjs.org/docs/messages/ssg-fallback-true-export",B=["app","pages","components","lib","src"],K={edge:"edge",experimentalEdge:"experimental-edge",nodejs:"nodejs"},V={shared:"shared",reactServerComponents:"rsc",serverSideRendering:"ssr",actionBrowser:"action-browser",api:"api",middleware:"middleware",instrument:"instrument",edgeAsset:"edge-asset",appPagesBrowser:"app-pages-browser",appMetadataRoute:"app-metadata-route",appRouteHandler:"app-route-handler"},z={...V,GROUP:{serverOnly:[V.reactServerComponents,V.actionBrowser,V.appMetadataRoute,V.appRouteHandler,V.instrument],clientOnly:[V.serverSideRendering,V.appPagesBrowser],nonClientServerTarget:[V.middleware,V.api],app:[V.reactServerComponents,V.actionBrowser,V.appMetadataRoute,V.appRouteHandler,V.serverSideRendering,V.appPagesBrowser,V.shared,V.instrument]}},q={edgeSSREntry:"__next_edge_ssr_entry__",metadata:"__next_metadata__",metadataRoute:"__next_metadata_route__",metadataImageMeta:"__next_metadata_image_meta__"}},7897:(e,t,r)=>{e.exports=r(6765).vendored.contexts.RouterContext},5737:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"escapeStringRegexp",{enumerable:!0,get:function(){return o}});let r=/[|\\{}()[\]^$+*?.-]/,n=/[|\\{}()[\]^$+*?.-]/g;function o(e){return r.test(e)?e.replace(n,"\\$&"):e}},4359:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{formatUrl:function(){return a},formatWithValidation:function(){return u},urlObjectKeys:function(){return i}});let n=r(5453)._(r(9059)),o=/https?|ftp|gopher|file/;function a(e){let{auth:t,hostname:r}=e,a=e.protocol||"",i=e.pathname||"",u=e.hash||"",s=e.query||"",l=!1;t=t?encodeURIComponent(t).replace(/%3A/i,":")+"@":"",e.host?l=t+e.host:r&&(l=t+(~r.indexOf(":")?"["+r+"]":r),e.port&&(l+=":"+e.port)),s&&"object"==typeof s&&(s=String(n.urlQueryToSearchParams(s)));let c=e.search||s&&"?"+s||"";return a&&!a.endsWith(":")&&(a+=":"),e.slashes||(!a||o.test(a))&&!1!==l?(l="//"+(l||""),i&&"/"!==i[0]&&(i="/"+i)):l||(l=""),u&&"#"!==u[0]&&(u="#"+u),c&&"?"!==c[0]&&(c="?"+c),""+a+l+(i=i.replace(/[?#]/g,encodeURIComponent))+(c=c.replace("#","%23"))+u}let i=["auth","hash","host","hostname","href","path","pathname","port","protocol","query","search","slashes"];function u(e){return a(e)}},4182:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{getSortedRoutes:function(){return n.getSortedRoutes},isDynamicRoute:function(){return o.isDynamicRoute}});let n=r(3319),o=r(6952)},3559:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"interpolateAs",{enumerable:!0,get:function(){return a}});let n=r(9620),o=r(6820);function a(e,t,r){let a="",i=(0,o.getRouteRegex)(e),u=i.groups,s=(t!==e?(0,n.getRouteMatcher)(i)(t):"")||r;a=e;let l=Object.keys(u);return l.every(e=>{let t=s[e]||"",{repeat:r,optional:n}=u[e],o="["+(r?"...":"")+e+"]";return n&&(o=(t?"":"/")+"["+o+"]"),r&&!Array.isArray(t)&&(t=[t]),(n||e in s)&&(a=a.replace(o,r?t.map(e=>encodeURIComponent(e)).join("/"):encodeURIComponent(t))||"/")})||(a=""),{params:l,result:a}}},6952:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"isDynamicRoute",{enumerable:!0,get:function(){return a}});let n=r(8561),o=/\/\[[^/]+?\](?=\/|$)/;function a(e){return(0,n.isInterceptionRouteAppPath)(e)&&(e=(0,n.extractInterceptionRouteInformation)(e).interceptedRoute),o.test(e)}},5133:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"isLocalURL",{enumerable:!0,get:function(){return a}});let n=r(5607),o=r(9628);function a(e){if(!(0,n.isAbsoluteUrl)(e))return!0;try{let t=(0,n.getLocationOrigin)(),r=new URL(e,t);return r.origin===t&&(0,o.hasBasePath)(r.pathname)}catch(e){return!1}}},7829:(e,t)=>{function r(e,t){let r={};return Object.keys(e).forEach(n=>{t.includes(n)||(r[n]=e[n])}),r}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"omit",{enumerable:!0,get:function(){return r}})},9059:(e,t)=>{function r(e){let t={};return e.forEach((e,r)=>{void 0===t[r]?t[r]=e:Array.isArray(t[r])?t[r].push(e):t[r]=[t[r],e]}),t}function n(e){return"string"!=typeof e&&("number"!=typeof e||isNaN(e))&&"boolean"!=typeof e?"":String(e)}function o(e){let t=new URLSearchParams;return Object.entries(e).forEach(e=>{let[r,o]=e;Array.isArray(o)?o.forEach(e=>t.append(r,n(e))):t.set(r,n(o))}),t}function a(e){for(var t=arguments.length,r=Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];return r.forEach(t=>{Array.from(t.keys()).forEach(t=>e.delete(t)),t.forEach((t,r)=>e.append(r,t))}),e}Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{assign:function(){return a},searchParamsToUrlQuery:function(){return r},urlQueryToSearchParams:function(){return o}})},9620:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"getRouteMatcher",{enumerable:!0,get:function(){return o}});let n=r(5607);function o(e){let{re:t,groups:r}=e;return e=>{let o=t.exec(e);if(!o)return!1;let a=e=>{try{return decodeURIComponent(e)}catch(e){throw new n.DecodeError("failed to decode param")}},i={};return Object.keys(r).forEach(e=>{let t=r[e],n=o[t.pos];void 0!==n&&(i[e]=~n.indexOf("/")?n.split("/").map(e=>a(e)):t.repeat?[a(n)]:a(n))}),i}}},6820:(e,t,r)=>{Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{getNamedMiddlewareRegex:function(){return p},getNamedRouteRegex:function(){return d},getRouteRegex:function(){return l},parseParameter:function(){return u}});let n=r(4217),o=r(8561),a=r(5737),i=r(2188);function u(e){let t=e.startsWith("[")&&e.endsWith("]");t&&(e=e.slice(1,-1));let r=e.startsWith("...");return r&&(e=e.slice(3)),{key:e,repeat:r,optional:t}}function s(e){let t=(0,i.removeTrailingSlash)(e).slice(1).split("/"),r={},n=1;return{parameterizedRoute:t.map(e=>{let t=o.INTERCEPTION_ROUTE_MARKERS.find(t=>e.startsWith(t)),i=e.match(/\[((?:\[.*\])|.+)\]/);if(t&&i){let{key:e,optional:o,repeat:s}=u(i[1]);return r[e]={pos:n++,repeat:s,optional:o},"/"+(0,a.escapeStringRegexp)(t)+"([^/]+?)"}if(!i)return"/"+(0,a.escapeStringRegexp)(e);{let{key:e,repeat:t,optional:o}=u(i[1]);return r[e]={pos:n++,repeat:t,optional:o},t?o?"(?:/(.+?))?":"/(.+?)":"/([^/]+?)"}}).join(""),groups:r}}function l(e){let{parameterizedRoute:t,groups:r}=s(e);return{re:RegExp("^"+t+"(?:/)?$"),groups:r}}function c(e){let{interceptionMarker:t,getSafeRouteKey:r,segment:n,routeKeys:o,keyPrefix:i}=e,{key:s,optional:l,repeat:c}=u(n),f=s.replace(/\W/g,"");i&&(f=""+i+f);let d=!1;(0===f.length||f.length>30)&&(d=!0),isNaN(parseInt(f.slice(0,1)))||(d=!0),d&&(f=r()),i?o[f]=""+i+s:o[f]=s;let p=t?(0,a.escapeStringRegexp)(t):"";return c?l?"(?:/"+p+"(?<"+f+">.+?))?":"/"+p+"(?<"+f+">.+?)":"/"+p+"(?<"+f+">[^/]+?)"}function f(e,t){let r;let u=(0,i.removeTrailingSlash)(e).slice(1).split("/"),s=(r=0,()=>{let e="",t=++r;for(;t>0;)e+=String.fromCharCode(97+(t-1)%26),t=Math.floor((t-1)/26);return e}),l={};return{namedParameterizedRoute:u.map(e=>{let r=o.INTERCEPTION_ROUTE_MARKERS.some(t=>e.startsWith(t)),i=e.match(/\[((?:\[.*\])|.+)\]/);if(r&&i){let[r]=e.split(i[0]);return c({getSafeRouteKey:s,interceptionMarker:r,segment:i[1],routeKeys:l,keyPrefix:t?n.NEXT_INTERCEPTION_MARKER_PREFIX:void 0})}return i?c({getSafeRouteKey:s,segment:i[1],routeKeys:l,keyPrefix:t?n.NEXT_QUERY_PARAM_PREFIX:void 0}):"/"+(0,a.escapeStringRegexp)(e)}).join(""),routeKeys:l}}function d(e,t){let r=f(e,t);return{...l(e),namedRegex:"^"+r.namedParameterizedRoute+"(?:/)?$",routeKeys:r.routeKeys}}function p(e,t){let{parameterizedRoute:r}=s(e),{catchAll:n=!0}=t;if("/"===r)return{namedRegex:"^/"+(n?".*":"")+"$"};let{namedParameterizedRoute:o}=f(e,!1);return{namedRegex:"^"+o+(n?"(?:(/.*)?)":"")+"$"}}},3319:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"getSortedRoutes",{enumerable:!0,get:function(){return n}});class r{insert(e){this._insert(e.split("/").filter(Boolean),[],!1)}smoosh(){return this._smoosh()}_smoosh(e){void 0===e&&(e="/");let t=[...this.children.keys()].sort();null!==this.slugName&&t.splice(t.indexOf("[]"),1),null!==this.restSlugName&&t.splice(t.indexOf("[...]"),1),null!==this.optionalRestSlugName&&t.splice(t.indexOf("[[...]]"),1);let r=t.map(t=>this.children.get(t)._smoosh(""+e+t+"/")).reduce((e,t)=>[...e,...t],[]);if(null!==this.slugName&&r.push(...this.children.get("[]")._smoosh(e+"["+this.slugName+"]/")),!this.placeholder){let t="/"===e?"/":e.slice(0,-1);if(null!=this.optionalRestSlugName)throw Error('You cannot define a route with the same specificity as a optional catch-all route ("'+t+'" and "'+t+"[[..."+this.optionalRestSlugName+']]").');r.unshift(t)}return null!==this.restSlugName&&r.push(...this.children.get("[...]")._smoosh(e+"[..."+this.restSlugName+"]/")),null!==this.optionalRestSlugName&&r.push(...this.children.get("[[...]]")._smoosh(e+"[[..."+this.optionalRestSlugName+"]]/")),r}_insert(e,t,n){if(0===e.length){this.placeholder=!1;return}if(n)throw Error("Catch-all must be the last part of the URL.");let o=e[0];if(o.startsWith("[")&&o.endsWith("]")){let r=o.slice(1,-1),i=!1;if(r.startsWith("[")&&r.endsWith("]")&&(r=r.slice(1,-1),i=!0),r.startsWith("...")&&(r=r.substring(3),n=!0),r.startsWith("[")||r.endsWith("]"))throw Error("Segment names may not start or end with extra brackets ('"+r+"').");if(r.startsWith("."))throw Error("Segment names may not start with erroneous periods ('"+r+"').");function a(e,r){if(null!==e&&e!==r)throw Error("You cannot use different slug names for the same dynamic path ('"+e+"' !== '"+r+"').");t.forEach(e=>{if(e===r)throw Error('You cannot have the same slug name "'+r+'" repeat within a single dynamic path');if(e.replace(/\W/g,"")===o.replace(/\W/g,""))throw Error('You cannot have the slug names "'+e+'" and "'+r+'" differ only by non-word symbols within a single dynamic path')}),t.push(r)}if(n){if(i){if(null!=this.restSlugName)throw Error('You cannot use both an required and optional catch-all route at the same level ("[...'+this.restSlugName+']" and "'+e[0]+'" ).');a(this.optionalRestSlugName,r),this.optionalRestSlugName=r,o="[[...]]"}else{if(null!=this.optionalRestSlugName)throw Error('You cannot use both an optional and required catch-all route at the same level ("[[...'+this.optionalRestSlugName+']]" and "'+e[0]+'").');a(this.restSlugName,r),this.restSlugName=r,o="[...]"}}else{if(i)throw Error('Optional route parameters are not yet supported ("'+e[0]+'").');a(this.slugName,r),this.slugName=r,o="[]"}}this.children.has(o)||this.children.set(o,new r),this.children.get(o)._insert(e.slice(1),t,n)}constructor(){this.placeholder=!0,this.children=new Map,this.slugName=null,this.restSlugName=null,this.optionalRestSlugName=null}}function n(e){let t=new r;return e.forEach(e=>t.insert(e)),t.smoosh()}},5607:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{DecodeError:function(){return h},MiddlewareNotFoundError:function(){return E},MissingStaticPage:function(){return m},NormalizeError:function(){return _},PageNotFoundError:function(){return g},SP:function(){return d},ST:function(){return p},WEB_VITALS:function(){return r},execOnce:function(){return n},getDisplayName:function(){return s},getLocationOrigin:function(){return i},getURL:function(){return u},isAbsoluteUrl:function(){return a},isResSent:function(){return l},loadGetInitialProps:function(){return f},normalizeRepeatedSlashes:function(){return c},stringifyError:function(){return R}});let r=["CLS","FCP","FID","INP","LCP","TTFB"];function n(e){let t,r=!1;return function(){for(var n=arguments.length,o=Array(n),a=0;a<n;a++)o[a]=arguments[a];return r||(r=!0,t=e(...o)),t}}let o=/^[a-zA-Z][a-zA-Z\d+\-.]*?:/,a=e=>o.test(e);function i(){let{protocol:e,hostname:t,port:r}=window.location;return e+"//"+t+(r?":"+r:"")}function u(){let{href:e}=window.location,t=i();return e.substring(t.length)}function s(e){return"string"==typeof e?e:e.displayName||e.name||"Unknown"}function l(e){return e.finished||e.headersSent}function c(e){let t=e.split("?");return t[0].replace(/\\/g,"/").replace(/\/\/+/g,"/")+(t[1]?"?"+t.slice(1).join("?"):"")}async function f(e,t){let r=t.res||t.ctx&&t.ctx.res;if(!e.getInitialProps)return t.ctx&&t.Component?{pageProps:await f(t.Component,t.ctx)}:{};let n=await e.getInitialProps(t);if(r&&l(r))return n;if(!n)throw Error('"'+s(e)+'.getInitialProps()" should resolve to an object. But found "'+n+'" instead.');return n}let d="undefined"!=typeof performance,p=d&&["mark","measure","getEntriesByName"].every(e=>"function"==typeof performance[e]);class h extends Error{}class _ extends Error{}class g extends Error{constructor(e){super(),this.code="ENOENT",this.name="PageNotFoundError",this.message="Cannot find module for page: "+e}}class m extends Error{constructor(e,t){super(),this.message="Failed to load static file for page: "+e+" "+t}}class E extends Error{constructor(){super(),this.code="ENOENT",this.message="Cannot find the middleware module"}}function R(e){return JSON.stringify({message:e.message,stack:e.stack})}}};
@@ -0,0 +1 @@
1
+ "use strict";exports.id=218,exports.ids=[218],exports.modules={4210:(e,t,n)=>{n.d(t,{Ft:()=>S,G:()=>h,Gg:()=>L,K0:()=>y,Nl:()=>Q,OL:()=>x,Qg:()=>T,UN:()=>$,d3:()=>b,eg:()=>g,eq:()=>l,ff:()=>m,gt:()=>d,lt:()=>p,mM:()=>j,ne:()=>c,o$:()=>v,or:()=>f,vL:()=>B,vX:()=>w,xD:()=>a});var i=n(6701),r=n(7880),s=n(6470),o=n(3787);function u(e,t){return!(0,o._B)(t)||(0,o.zl)(e)||(0,r.is)(e,o.dO)||(0,r.is)(e,o.Vm)||(0,r.is)(e,i.s)||(0,r.is)(e,s.iA)||(0,r.is)(e,o.G7)?e:new o.dO(e,t)}let l=(e,t)=>(0,o.i6)`${e} = ${u(t,e)}`,c=(e,t)=>(0,o.i6)`${e} <> ${u(t,e)}`;function a(...e){let t=e.filter(e=>void 0!==e);return 0===t.length?void 0:new o.$s(1===t.length?t:[new o.Zm("("),o.i6.join(t,new o.Zm(" and ")),new o.Zm(")")])}function f(...e){let t=e.filter(e=>void 0!==e);return 0===t.length?void 0:new o.$s(1===t.length?t:[new o.Zm("("),o.i6.join(t,new o.Zm(" or ")),new o.Zm(")")])}function m(e){return(0,o.i6)`not ${e}`}let d=(e,t)=>(0,o.i6)`${e} > ${u(t,e)}`,g=(e,t)=>(0,o.i6)`${e} >= ${u(t,e)}`,p=(e,t)=>(0,o.i6)`${e} < ${u(t,e)}`,h=(e,t)=>(0,o.i6)`${e} <= ${u(t,e)}`;function b(e,t){return Array.isArray(t)?0===t.length?(0,o.i6)`false`:(0,o.i6)`${e} in ${t.map(t=>u(t,e))}`:(0,o.i6)`${e} in ${u(t,e)}`}function Q(e,t){return Array.isArray(t)?0===t.length?(0,o.i6)`true`:(0,o.i6)`${e} not in ${t.map(t=>u(t,e))}`:(0,o.i6)`${e} not in ${u(t,e)}`}function S(e){return(0,o.i6)`${e} is null`}function y(e){return(0,o.i6)`${e} is not null`}function L(e){return(0,o.i6)`exists ${e}`}function $(e){return(0,o.i6)`not exists ${e}`}function w(e,t,n){return(0,o.i6)`${e} between ${u(t,e)} and ${u(n,e)}`}function x(e,t,n){return(0,o.i6)`${e} not between ${u(t,e)} and ${u(n,e)}`}function B(e,t){return(0,o.i6)`${e} like ${t}`}function T(e,t){return(0,o.i6)`${e} not like ${t}`}function v(e,t){return(0,o.i6)`${e} ilike ${t}`}function j(e,t){return(0,o.i6)`${e} not ilike ${t}`}},652:(e,t,n)=>{n.d(t,{C:()=>s,d:()=>r});var i=n(3787);function r(e){return(0,i.i6)`${e} asc`}function s(e){return(0,i.i6)`${e} desc`}},8203:(e,t,n)=>{n.d(t,{l:()=>g,d:()=>d});var i=n(2709),r=n(6701),s=n(7880),o=n(1865);class u{static [s.Q]="SQLiteForeignKeyBuilder";reference;_onUpdate;_onDelete;constructor(e,t){this.reference=()=>{let{name:t,columns:n,foreignColumns:i}=e();return{name:t,columns:n,foreignTable:i[0].table,foreignColumns:i}},t&&(this._onUpdate=t.onUpdate,this._onDelete=t.onDelete)}onUpdate(e){return this._onUpdate=e,this}onDelete(e){return this._onDelete=e,this}build(e){return new l(e,this)}}class l{constructor(e,t){this.table=e,this.reference=t.reference,this.onUpdate=t._onUpdate,this.onDelete=t._onDelete}static [s.Q]="SQLiteForeignKey";reference;onUpdate;onDelete;getName(){let{name:e,columns:t,foreignColumns:n}=this.reference(),i=t.map(e=>e.name),r=n.map(e=>e.name),s=[this.table[o.m],...i,n[0].table[o.m],...r];return e??`${s.join("_")}_fk`}}function c(e,t){return`${e[o.m]}_${t.join("_")}_unique`}class a{constructor(e,t){this.name=t,this.columns=e}static [s.Q]=null;columns;build(e){return new m(e,this.columns,this.name)}}class f{static [s.Q]=null;name;constructor(e){this.name=e}on(...e){return new a(e,this.name)}}class m{constructor(e,t,n){this.table=e,this.columns=t,this.name=n??c(this.table,this.columns.map(e=>e.name))}static [s.Q]=null;columns;name;getName(){return this.name}}class d extends i.L{static [s.Q]="SQLiteColumnBuilder";foreignKeyConfigs=[];references(e,t={}){return this.foreignKeyConfigs.push({ref:e,actions:t}),this}unique(e){return this.config.isUnique=!0,this.config.uniqueName=e,this}generatedAlwaysAs(e,t){return this.config.generated={as:e,type:"always",mode:t?.mode??"virtual"},this}buildForeignKeys(e,t){return this.foreignKeyConfigs.map(({ref:n,actions:i})=>((n,i)=>{let r=new u(()=>({columns:[e],foreignColumns:[n()]}));return i.onUpdate&&r.onUpdate(i.onUpdate),i.onDelete&&r.onDelete(i.onDelete),r.build(t)})(n,i))}}class g extends r.s{constructor(e,t){t.uniqueName||(t.uniqueName=c(e,[t.name])),super(e,t),this.table=e}static [s.Q]="SQLiteColumn"}},9765:(e,t,n)=>{n.d(t,{_L:()=>p});var i=n(7880),r=n(3787),s=n(3089),o=n(8203);class u extends o.d{static [i.Q]="SQLiteBaseIntegerBuilder";constructor(e,t,n){super(e,t,n),this.config.autoIncrement=!1}primaryKey(e){return e?.autoIncrement&&(this.config.autoIncrement=!0),this.config.hasDefault=!0,super.primaryKey()}}class l extends o.l{static [i.Q]="SQLiteBaseInteger";autoIncrement=this.config.autoIncrement;getSQLType(){return"integer"}}class c extends u{static [i.Q]="SQLiteIntegerBuilder";constructor(e){super(e,"number","SQLiteInteger")}build(e){return new a(e,this.config)}}class a extends l{static [i.Q]="SQLiteInteger"}class f extends u{static [i.Q]="SQLiteTimestampBuilder";constructor(e,t){super(e,"date","SQLiteTimestamp"),this.config.mode=t}defaultNow(){return this.default((0,r.i6)`(cast((julianday('now') - 2440587.5)*86400000 as integer))`)}build(e){return new m(e,this.config)}}class m extends l{static [i.Q]="SQLiteTimestamp";mode=this.config.mode;mapFromDriverValue(e){return new Date("timestamp"===this.config.mode?1e3*e:e)}mapToDriverValue(e){let t=e.getTime();return"timestamp"===this.config.mode?Math.floor(t/1e3):t}}class d extends u{static [i.Q]="SQLiteBooleanBuilder";constructor(e,t){super(e,"boolean","SQLiteBoolean"),this.config.mode=t}build(e){return new g(e,this.config)}}class g extends l{static [i.Q]="SQLiteBoolean";mode=this.config.mode;mapFromDriverValue(e){return 1===Number(e)}mapToDriverValue(e){return e?1:0}}function p(e,t){let{name:n,config:i}=(0,s.An)(e,t);return i?.mode==="timestamp"||i?.mode==="timestamp_ms"?new f(n,i.mode):i?.mode==="boolean"?new d(n,i.mode):new c(n)}},7062:(e,t,n)=>{n.d(t,{fL:()=>a});var i=n(7880),r=n(3089),s=n(8203);class o extends s.d{static [i.Q]="SQLiteTextBuilder";constructor(e,t){super(e,"string","SQLiteText"),this.config.enumValues=t.enum,this.config.length=t.length}build(e){return new u(e,this.config)}}class u extends s.l{static [i.Q]="SQLiteText";enumValues=this.config.enumValues;length=this.config.length;constructor(e,t){super(e,t)}getSQLType(){return`text${this.config.length?`(${this.config.length})`:""}`}}class l extends s.d{static [i.Q]="SQLiteTextJsonBuilder";constructor(e){super(e,"json","SQLiteTextJson")}build(e){return new c(e,this.config)}}class c extends s.l{static [i.Q]="SQLiteTextJson";getSQLType(){return"text"}mapFromDriverValue(e){return JSON.parse(e)}mapToDriverValue(e){return JSON.stringify(e)}}function a(e,t={}){let{name:n,config:i}=(0,r.An)(e,t);return"json"===i.mode?new l(n):new o(n,i)}},9563:(e,t,n)=>{n.d(t,{xA:()=>T,Px:()=>v});var i=n(7880),r=n(6470),s=n(3089),o=n(8203);class u extends o.d{static [i.Q]="SQLiteBigIntBuilder";constructor(e){super(e,"bigint","SQLiteBigInt")}build(e){return new l(e,this.config)}}class l extends o.l{static [i.Q]="SQLiteBigInt";getSQLType(){return"blob"}mapFromDriverValue(e){return Buffer.isBuffer(e)?BigInt(e.toString()):e instanceof ArrayBuffer?BigInt(new TextDecoder().decode(e)):BigInt(String.fromCodePoint(...e))}mapToDriverValue(e){return Buffer.from(e.toString())}}class c extends o.d{static [i.Q]="SQLiteBlobJsonBuilder";constructor(e){super(e,"json","SQLiteBlobJson")}build(e){return new a(e,this.config)}}class a extends o.l{static [i.Q]="SQLiteBlobJson";getSQLType(){return"blob"}mapFromDriverValue(e){return Buffer.isBuffer(e)?JSON.parse(e.toString()):e instanceof ArrayBuffer?JSON.parse(new TextDecoder().decode(e)):JSON.parse(String.fromCodePoint(...e))}mapToDriverValue(e){return Buffer.from(JSON.stringify(e))}}class f extends o.d{static [i.Q]="SQLiteBlobBufferBuilder";constructor(e){super(e,"buffer","SQLiteBlobBuffer")}build(e){return new m(e,this.config)}}class m extends o.l{static [i.Q]="SQLiteBlobBuffer";getSQLType(){return"blob"}}function d(e,t){let{name:n,config:i}=(0,s.An)(e,t);return i?.mode==="json"?new c(n):i?.mode==="bigint"?new u(n):new f(n)}class g extends o.d{static [i.Q]="SQLiteCustomColumnBuilder";constructor(e,t,n){super(e,"custom","SQLiteCustomColumn"),this.config.fieldConfig=t,this.config.customTypeParams=n}build(e){return new p(e,this.config)}}class p extends o.l{static [i.Q]="SQLiteCustomColumn";sqlName;mapTo;mapFrom;constructor(e,t){super(e,t),this.sqlName=t.customTypeParams.dataType(t.fieldConfig),this.mapTo=t.customTypeParams.toDriver,this.mapFrom=t.customTypeParams.fromDriver}getSQLType(){return this.sqlName}mapFromDriverValue(e){return"function"==typeof this.mapFrom?this.mapFrom(e):e}mapToDriverValue(e){return"function"==typeof this.mapTo?this.mapTo(e):e}}function h(e){return(t,n)=>{let{name:i,config:r}=(0,s.An)(t,n);return new g(i,r,e)}}var b=n(9765);class Q extends o.d{static [i.Q]="SQLiteNumericBuilder";constructor(e){super(e,"string","SQLiteNumeric")}build(e){return new S(e,this.config)}}class S extends o.l{static [i.Q]="SQLiteNumeric";getSQLType(){return"numeric"}}function y(e){return new Q(e??"")}class L extends o.d{static [i.Q]="SQLiteRealBuilder";constructor(e){super(e,"number","SQLiteReal")}build(e){return new $(e,this.config)}}class $ extends o.l{static [i.Q]="SQLiteReal";getSQLType(){return"real"}}function w(e){return new L(e??"")}var x=n(7062);let B=Symbol.for("drizzle:SQLiteInlineForeignKeys");class T extends r.iA{static [i.Q]="SQLiteTable";static Symbol=Object.assign({},r.iA.Symbol,{InlineForeignKeys:B});[r.iA.Symbol.Columns];[B]=[];[r.iA.Symbol.ExtraConfigBuilder]=void 0}let v=(e,t,n)=>(function(e,t,n,i,s=e){let o=new T(e,void 0,s),u=Object.fromEntries(Object.entries("function"==typeof t?t({blob:d,customType:h,integer:b._L,numeric:y,real:w,text:x.fL}):t).map(([e,t])=>{t.setName(e);let n=t.build(o);return o[B].push(...t.buildForeignKeys(n,o)),[e,n]})),l=Object.assign(o,u);return l[r.iA.Symbol.Columns]=u,l[r.iA.Symbol.ExtraConfigColumns]=u,n&&(l[T.Symbol.ExtraConfigBuilder]=n),l})(e,t,n)},3089:(e,t,n)=>{n.d(t,{An:()=>p,M4:()=>c,M6:()=>f,SS:()=>d,ZS:()=>function e(t,n){return Object.entries(t).reduce((t,[o,l])=>{if("string"!=typeof o)return t;let c=n?[...n,o]:[o];return(0,r.is)(l,i.s)||(0,r.is)(l,s.$s)||(0,r.is)(l,s.$s.Aliased)?t.push({path:c,field:l}):(0,r.is)(l,u.iA)?t.push(...e(l[u.iA.Symbol.Columns],c)):t.push(...e(l,c)),t},[])},dP:()=>g,ef:()=>m,ux:()=>a,wM:()=>h});var i=n(6701),r=n(7880),s=n(3787),o=n(883),u=n(6470),l=n(3439);function c(e,t,n){let o={},l=e.reduce((e,{path:l,field:c},a)=>{let f;f=(0,r.is)(c,i.s)?c:(0,r.is)(c,s.$s)?c.decoder:c.sql.decoder;let m=e;for(let[e,s]of l.entries())if(e<l.length-1)s in m||(m[s]={}),m=m[s];else{let e=t[a],d=m[s]=null===e?null:f.mapFromDriverValue(e);if(n&&(0,r.is)(c,i.s)&&2===l.length){let e=l[0];e in o?"string"==typeof o[e]&&o[e]!==(0,u.SP)(c.table)&&(o[e]=!1):o[e]=null===d&&(0,u.SP)(c.table)}}return e},{});if(n&&Object.keys(o).length>0)for(let[e,t]of Object.entries(o))"string"!=typeof t||n[t]||(l[e]=null);return l}function a(e,t){let n=Object.keys(e),i=Object.keys(t);if(n.length!==i.length)return!1;for(let[e,t]of n.entries())if(t!==i[e])return!1;return!0}function f(e,t){let n=Object.entries(t).filter(([,e])=>void 0!==e).map(([t,n])=>(0,r.is)(n,s.$s)||(0,r.is)(n,i.s)?[t,n]:[t,new s.dO(n,e[u.iA.Symbol.Columns][t])]);if(0===n.length)throw Error("No values to set");return Object.fromEntries(n)}function m(e,t){for(let n of t)for(let t of Object.getOwnPropertyNames(n.prototype))"constructor"!==t&&Object.defineProperty(e.prototype,t,Object.getOwnPropertyDescriptor(n.prototype,t)||Object.create(null))}function d(e){return e[u.iA.Symbol.Columns]}function g(e){return(0,r.is)(e,o.k)?e._.alias:(0,r.is)(e,s.G7)?e[l.d].name:(0,r.is)(e,s.$s)?void 0:e[u.iA.Symbol.IsAlias]?e[u.iA.Symbol.Name]:e[u.iA.Symbol.BaseName]}function p(e,t){return{name:"string"==typeof e&&e.length>0?e:"",config:"object"==typeof e?e:t}}function h(e){if("object"!=typeof e||null===e||"Object"!==e.constructor.name)return!1;if("logger"in e){let t=typeof e.logger;return"boolean"===t||"object"===t&&"function"==typeof e.logger.logQuery||"undefined"===t}if("schema"in e){let t=typeof e.logger;return"object"===t||"undefined"===t}if("casing"in e){let t=typeof e.logger;return"string"===t||"undefined"===t}if("mode"in e)return"default"===e.mode&&"planetscale"===e.mode&&void 0===e.mode;if("connection"in e){let t=typeof e.connection;return"string"===t||"object"===t||"undefined"===t}if("client"in e){let t=typeof e.client;return"object"===t||"function"===t||"undefined"===t}return 0===Object.keys(e).length}}};
@@ -0,0 +1,13 @@
1
+ "use strict";exports.id=267,exports.ids=[267],exports.modules={6267:(e,t,i)=>{i.d(t,{t:()=>eA});var s=i(5890),r=i(7880);class l{static [r.Q]="ConsoleLogWriter";write(e){console.log(e)}}class n{static [r.Q]="DefaultLogger";writer;constructor(e){this.writer=e?.writer??new l}logQuery(e,t){let i=t.map(e=>{try{return JSON.stringify(e)}catch{return String(e)}}),s=i.length?` -- params: [${i.join(", ")}]`:"";this.writer.write(`Query: ${e}${s}`)}}class a{static [r.Q]="NoopLogger";logQuery(){}}var o=i(6470),h=i(6701);let c=Symbol.for("drizzle:PgInlineForeignKeys"),u=Symbol.for("drizzle:EnableRLS");class d extends o.iA{static [r.Q]="PgTable";static Symbol=Object.assign({},o.iA.Symbol,{InlineForeignKeys:c,EnableRLS:u});[c]=[];[u]=!1;[o.iA.Symbol.ExtraConfigBuilder]=void 0}class f{static [r.Q]="PgPrimaryKeyBuilder";columns;name;constructor(e,t){this.columns=e,this.name=t}build(e){return new m(e,this.columns,this.name)}}class m{constructor(e,t,i){this.table=e,this.columns=t,this.name=i}static [r.Q]="PgPrimaryKey";columns;name;getName(){return this.name??`${this.table[d.Symbol.Name]}_${this.columns.map(e=>e.name).join("_")}_pk`}}var g=i(4210),p=i(652),y=i(3787);class b{constructor(e,t,i){this.sourceTable=e,this.referencedTable=t,this.relationName=i,this.referencedTableName=t[o.iA.Symbol.Name]}static [r.Q]="Relation";referencedTableName;fieldName}class w{constructor(e,t){this.table=e,this.config=t}static [r.Q]="Relations"}class S extends b{constructor(e,t,i,s){super(e,t,i?.relationName),this.config=i,this.isNullable=s}static [r.Q]="One";withFieldName(e){let t=new S(this.sourceTable,this.referencedTable,this.config,this.isNullable);return t.fieldName=e,t}}class $ extends b{constructor(e,t,i){super(e,t,i?.relationName),this.config=i}static [r.Q]="Many";withFieldName(e){let t=new $(this.sourceTable,this.referencedTable,this.config);return t.fieldName=e,t}}function Q(e){return{one:function(t,i){return new S(e,t,i,i?.fields.reduce((e,t)=>e&&t.notNull,!0)??!1)},many:function(t,i){return new $(e,t,i)}}}var v=i(3439);class A{constructor(e){this.table=e}static [r.Q]="ColumnAliasProxyHandler";get(e,t){return"table"===t?this.table:e[t]}}class N{constructor(e,t){this.alias=e,this.replaceOriginalName=t}static [r.Q]="TableAliasProxyHandler";get(e,t){if(t===o.iA.Symbol.IsAlias)return!0;if(t===o.iA.Symbol.Name||this.replaceOriginalName&&t===o.iA.Symbol.OriginalName)return this.alias;if(t===v.d)return{...e[v.d],name:this.alias,isAlias:!0};if(t===o.iA.Symbol.Columns){let t=e[o.iA.Symbol.Columns];if(!t)return t;let i={};return Object.keys(t).map(s=>{i[s]=new Proxy(t[s],new A(new Proxy(e,this)))}),i}let i=e[t];return(0,r.is)(i,h.s)?new Proxy(i,new A(new Proxy(e,this))):i}}class q{constructor(e){this.alias=e}static [r.Q]=null;get(e,t){return"sourceTable"===t?x(e.sourceTable,this.alias):e[t]}}function x(e,t){return new Proxy(e,new N(t,!1))}function T(e,t){return new Proxy(e,new A(new Proxy(e.table,new N(t,!1))))}function C(e,t){return new y.$s.Aliased(L(e.sql,t),e.fieldAlias)}function L(e,t){return y.i6.join(e.queryChunks.map(e=>(0,r.is)(e,h.s)?T(e,t):(0,r.is)(e,y.$s)?L(e,t):(0,r.is)(e,y.$s.Aliased)?C(e,t):e))}var O=i(883);class _{static [r.Q]="SelectionProxyHandler";config;constructor(e){this.config={...e}}get(e,t){if("_"===t)return{...e._,selectedFields:new Proxy(e._.selectedFields,this)};if(t===v.d)return{...e[v.d],selectedFields:new Proxy(e[v.d].selectedFields,this)};if("symbol"==typeof t)return e[t];let i=((0,r.is)(e,O.k)?e._.selectedFields:(0,r.is)(e,y.G7)?e[v.d].selectedFields:e)[t];if((0,r.is)(i,y.$s.Aliased)){if("sql"===this.config.sqlAliasedBehavior&&!i.isSelectionField)return i.sql;let e=i.clone();return e.isSelectionField=!0,e}if((0,r.is)(i,y.$s)){if("sql"===this.config.sqlBehavior)return i;throw Error(`You tried to reference "${t}" field from a subquery, which is a raw SQL field, but it doesn't have an alias declared. Please add an alias to the field using ".as('alias')" method.`)}return(0,r.is)(i,h.s)?this.config.alias?new Proxy(i,new A(new Proxy(i.table,new N(this.config.alias,this.config.replaceOriginalName??!1)))):i:"object"!=typeof i||null===i?i:new Proxy(i,new _(this.config))}}function B(e){return(e.replace(/['\u2019]/g,"").match(/[\da-z]+|[A-Z]+(?![a-z])|[A-Z][\da-z]+/g)??[]).map(e=>e.toLowerCase()).join("_")}function j(e){return(e.replace(/['\u2019]/g,"").match(/[\da-z]+|[A-Z]+(?![a-z])|[A-Z][\da-z]+/g)??[]).reduce((e,t,i)=>e+(0===i?t.toLowerCase():`${t[0].toUpperCase()}${t.slice(1)}`),"")}function R(e){return e}class E{static [r.Q]="CasingCache";cache={};cachedTables={};convert;constructor(e){this.convert="snake_case"===e?B:"camelCase"===e?j:R}getColumnCasing(e){if(!e.keyAsName)return e.name;let t=e.table[o.iA.Symbol.Schema]??"public",i=e.table[o.iA.Symbol.OriginalName],s=`${t}.${i}.${e.name}`;return this.cache[s]||this.cacheTable(e.table),this.cache[s]}cacheTable(e){let t=e[o.iA.Symbol.Schema]??"public",i=e[o.iA.Symbol.OriginalName],s=`${t}.${i}`;if(!this.cachedTables[s]){for(let t of Object.values(e[o.iA.Symbol.Columns])){let e=`${s}.${t.name}`;this.cache[e]=this.convert(t.name)}this.cachedTables[s]=!0}}clearCache(){this.cache={},this.cachedTables={}}}class M extends Error{static [r.Q]="DrizzleError";constructor({message:e,cause:t}){super(e),this.name="DrizzleError",this.cause=t}}class P extends M{static [r.Q]="TransactionRollbackError";constructor(){super({message:"Rollback"})}}var F=i(8203),k=i(9563),I=i(3089);class K extends y.G7{static [r.Q]="SQLiteViewBase"}class D{static [r.Q]="SQLiteDialect";casing;constructor(e){this.casing=new E(e?.casing)}escapeName(e){return`"${e}"`}escapeParam(e){return"?"}escapeString(e){return`'${e.replace(/'/g,"''")}'`}buildWithCTE(e){if(!e?.length)return;let t=[(0,y.i6)`with `];for(let[i,s]of e.entries())t.push((0,y.i6)`${y.i6.identifier(s._.alias)} as (${s._.sql})`),i<e.length-1&&t.push((0,y.i6)`, `);return t.push((0,y.i6)` `),y.i6.join(t)}buildDeleteQuery({table:e,where:t,returning:i,withList:s,limit:r,orderBy:l}){let n=this.buildWithCTE(s),a=i?(0,y.i6)` returning ${this.buildSelection(i,{isSingleTable:!0})}`:void 0,o=t?(0,y.i6)` where ${t}`:void 0,h=this.buildOrderBy(l),c=this.buildLimit(r);return(0,y.i6)`${n}delete from ${e}${o}${a}${h}${c}`}buildUpdateSet(e,t){let i=e[o.iA.Symbol.Columns],s=Object.keys(i).filter(e=>void 0!==t[e]||i[e]?.onUpdateFn!==void 0),r=s.length;return y.i6.join(s.flatMap((e,s)=>{let l=i[e],n=t[e]??y.i6.param(l.onUpdateFn(),l),a=(0,y.i6)`${y.i6.identifier(this.casing.getColumnCasing(l))} = ${n}`;return s<r-1?[a,y.i6.raw(", ")]:[a]}))}buildUpdateQuery({table:e,set:t,where:i,returning:s,withList:r,joins:l,from:n,limit:a,orderBy:o}){let h=this.buildWithCTE(r),c=this.buildUpdateSet(e,t),u=n&&y.i6.join([y.i6.raw(" from "),this.buildFromTable(n)]),d=this.buildJoins(l),f=s?(0,y.i6)` returning ${this.buildSelection(s,{isSingleTable:!0})}`:void 0,m=i?(0,y.i6)` where ${i}`:void 0,g=this.buildOrderBy(o),p=this.buildLimit(a);return(0,y.i6)`${h}update ${e} set ${c}${u}${d}${m}${f}${g}${p}`}buildSelection(e,{isSingleTable:t=!1}={}){let i=e.length,s=e.flatMap(({field:e},s)=>{let l=[];if((0,r.is)(e,y.$s.Aliased)&&e.isSelectionField)l.push(y.i6.identifier(e.fieldAlias));else if((0,r.is)(e,y.$s.Aliased)||(0,r.is)(e,y.$s)){let i=(0,r.is)(e,y.$s.Aliased)?e.sql:e;t?l.push(new y.$s(i.queryChunks.map(e=>(0,r.is)(e,h.s)?y.i6.identifier(this.casing.getColumnCasing(e)):e))):l.push(i),(0,r.is)(e,y.$s.Aliased)&&l.push((0,y.i6)` as ${y.i6.identifier(e.fieldAlias)}`)}else if((0,r.is)(e,h.s)){let i=e.table[o.iA.Symbol.Name];t?l.push(y.i6.identifier(this.casing.getColumnCasing(e))):l.push((0,y.i6)`${y.i6.identifier(i)}.${y.i6.identifier(this.casing.getColumnCasing(e))}`)}return s<i-1&&l.push((0,y.i6)`, `),l});return y.i6.join(s)}buildJoins(e){if(!e||0===e.length)return;let t=[];if(e)for(let[i,s]of e.entries()){0===i&&t.push((0,y.i6)` `);let l=s.table;if((0,r.is)(l,k.xA)){let e=l[k.xA.Symbol.Name],i=l[k.xA.Symbol.Schema],r=l[k.xA.Symbol.OriginalName],n=e===r?void 0:s.alias;t.push((0,y.i6)`${y.i6.raw(s.joinType)} join ${i?(0,y.i6)`${y.i6.identifier(i)}.`:void 0}${y.i6.identifier(r)}${n&&(0,y.i6)` ${y.i6.identifier(n)}`} on ${s.on}`)}else t.push((0,y.i6)`${y.i6.raw(s.joinType)} join ${l} on ${s.on}`);i<e.length-1&&t.push((0,y.i6)` `)}return y.i6.join(t)}buildLimit(e){return"object"==typeof e||"number"==typeof e&&e>=0?(0,y.i6)` limit ${e}`:void 0}buildOrderBy(e){let t=[];if(e)for(let[i,s]of e.entries())t.push(s),i<e.length-1&&t.push((0,y.i6)`, `);return t.length>0?(0,y.i6)` order by ${y.i6.join(t)}`:void 0}buildFromTable(e){return(0,r.is)(e,o.iA)&&e[o.iA.Symbol.OriginalName]!==e[o.iA.Symbol.Name]?(0,y.i6)`${y.i6.identifier(e[o.iA.Symbol.OriginalName])} ${y.i6.identifier(e[o.iA.Symbol.Name])}`:e}buildSelectQuery({withList:e,fields:t,fieldsFlat:i,where:s,having:l,table:n,joins:a,orderBy:c,groupBy:u,limit:d,offset:f,distinct:m,setOperators:g}){let p=i??(0,I.ZS)(t);for(let e of p){let t;if((0,r.is)(e.field,h.s)&&(0,o.SP)(e.field.table)!==((0,r.is)(n,O.k)?n._.alias:(0,r.is)(n,K)?n[v.d].name:(0,r.is)(n,y.$s)?void 0:(0,o.SP)(n))&&(t=e.field.table,!a?.some(({alias:e})=>e===(t[o.iA.Symbol.IsAlias]?o.SP(t):t[o.iA.Symbol.BaseName])))){let t=(0,o.SP)(e.field.table);throw Error(`Your "${e.path.join("->")}" field references a column "${t}"."${e.field.name}", but the table "${t}" is not part of the query! Did you forget to join it?`)}}let b=!a||0===a.length,w=this.buildWithCTE(e),S=m?(0,y.i6)` distinct`:void 0,$=this.buildSelection(p,{isSingleTable:b}),Q=this.buildFromTable(n),A=this.buildJoins(a),N=s?(0,y.i6)` where ${s}`:void 0,q=l?(0,y.i6)` having ${l}`:void 0,x=[];if(u)for(let[e,t]of u.entries())x.push(t),e<u.length-1&&x.push((0,y.i6)`, `);let T=x.length>0?(0,y.i6)` group by ${y.i6.join(x)}`:void 0,C=this.buildOrderBy(c),L=this.buildLimit(d),_=f?(0,y.i6)` offset ${f}`:void 0,B=(0,y.i6)`${w}select${S} ${$} from ${Q}${A}${N}${T}${q}${C}${L}${_}`;return g.length>0?this.buildSetOperations(B,g):B}buildSetOperations(e,t){let[i,...s]=t;if(!i)throw Error("Cannot pass undefined values to any set operator");return 0===s.length?this.buildSetOperationQuery({leftSelect:e,setOperator:i}):this.buildSetOperations(this.buildSetOperationQuery({leftSelect:e,setOperator:i}),s)}buildSetOperationQuery({leftSelect:e,setOperator:{type:t,isAll:i,rightSelect:s,limit:l,orderBy:n,offset:a}}){let o;let h=(0,y.i6)`${e.getSQL()} `,c=(0,y.i6)`${s.getSQL()}`;if(n&&n.length>0){let e=[];for(let t of n)if((0,r.is)(t,F.l))e.push(y.i6.identifier(t.name));else if((0,r.is)(t,y.$s)){for(let e=0;e<t.queryChunks.length;e++){let i=t.queryChunks[e];(0,r.is)(i,F.l)&&(t.queryChunks[e]=y.i6.identifier(this.casing.getColumnCasing(i)))}e.push((0,y.i6)`${t}`)}else e.push((0,y.i6)`${t}`);o=(0,y.i6)` order by ${y.i6.join(e,(0,y.i6)`, `)}`}let u="object"==typeof l||"number"==typeof l&&l>=0?(0,y.i6)` limit ${l}`:void 0,d=y.i6.raw(`${t} ${i?"all ":""}`),f=a?(0,y.i6)` offset ${a}`:void 0;return(0,y.i6)`${h}${d}${c}${o}${u}${f}`}buildInsertQuery({table:e,values:t,onConflict:i,returning:s,withList:l,select:n}){let a=[],h=Object.entries(e[o.iA.Symbol.Columns]).filter(([e,t])=>!t.shouldDisableInsert()),c=h.map(([,e])=>y.i6.identifier(this.casing.getColumnCasing(e)));if(n)(0,r.is)(t,y.$s)?a.push(t):a.push(t.getSQL());else for(let[e,i]of(a.push(y.i6.raw("values ")),t.entries())){let s=[];for(let[e,t]of h){let l=i[e];if(void 0===l||(0,r.is)(l,y.dO)&&void 0===l.value){let e;if(null!==t.default&&void 0!==t.default)e=(0,r.is)(t.default,y.$s)?t.default:y.i6.param(t.default,t);else if(void 0!==t.defaultFn){let i=t.defaultFn();e=(0,r.is)(i,y.$s)?i:y.i6.param(i,t)}else if(t.default||void 0===t.onUpdateFn)e=(0,y.i6)`null`;else{let i=t.onUpdateFn();e=(0,r.is)(i,y.$s)?i:y.i6.param(i,t)}s.push(e)}else s.push(l)}a.push(s),e<t.length-1&&a.push((0,y.i6)`, `)}let u=this.buildWithCTE(l),d=y.i6.join(a),f=s?(0,y.i6)` returning ${this.buildSelection(s,{isSingleTable:!0})}`:void 0,m=i?(0,y.i6)` on conflict ${i}`:void 0;return(0,y.i6)`${u}insert into ${e} ${c} ${d}${m}${f}`}sqlToQuery(e,t){return e.toQuery({casing:this.casing,escapeName:this.escapeName,escapeParam:this.escapeParam,escapeString:this.escapeString,invokeSource:t})}buildRelationalQuery({fullSchema:e,schema:t,tableNamesMap:i,table:s,tableConfig:l,queryConfig:n,tableAlias:a,nestedQueryRelation:c,joinOn:u}){let d,f=[],m,b,w=[],Q,v=[];if(!0===n)f=Object.entries(l.columns).map(([e,t])=>({dbKey:t.name,tsKey:e,field:T(t,a),relationTableTsKey:void 0,isJson:!1,selection:[]}));else{let s=Object.fromEntries(Object.entries(l.columns).map(([e,t])=>[e,T(t,a)]));if(n.where){let e="function"==typeof n.where?n.where(s,{and:g.xD,between:g.vX,eq:g.eq,exists:g.Gg,gt:g.gt,gte:g.eg,ilike:g.o$,inArray:g.d3,isNull:g.Ft,isNotNull:g.K0,like:g.vL,lt:g.lt,lte:g.G,ne:g.ne,not:g.ff,notBetween:g.OL,notExists:g.UN,notLike:g.Qg,notIlike:g.mM,notInArray:g.Nl,or:g.or,sql:y.i6}):n.where;Q=e&&L(e,a)}let c=[],u=[];if(n.columns){let e=!1;for(let[t,i]of Object.entries(n.columns))void 0!==i&&t in l.columns&&(e||!0!==i||(e=!0),u.push(t));u.length>0&&(u=e?u.filter(e=>n.columns?.[e]===!0):Object.keys(l.columns).filter(e=>!u.includes(e)))}else u=Object.keys(l.columns);for(let e of u){let t=l.columns[e];c.push({tsKey:e,value:t})}let d=[];if(n.with&&(d=Object.entries(n.with).filter(e=>!!e[1]).map(([e,t])=>({tsKey:e,queryConfig:t,relation:l.relations[e]}))),n.extras)for(let[e,t]of Object.entries("function"==typeof n.extras?n.extras(s,{sql:y.i6}):n.extras))c.push({tsKey:e,value:C(t,a)});for(let{tsKey:e,value:t}of c)f.push({dbKey:(0,r.is)(t,y.$s.Aliased)?t.fieldAlias:l.columns[e].name,tsKey:e,field:(0,r.is)(t,h.s)?T(t,a):t,relationTableTsKey:void 0,isJson:!1,selection:[]});let $="function"==typeof n.orderBy?n.orderBy(s,{sql:y.i6,asc:p.d,desc:p.C}):n.orderBy??[];for(let{tsKey:s,queryConfig:l,relation:c}of(Array.isArray($)||($=[$]),w=$.map(e=>(0,r.is)(e,h.s)?T(e,a):L(e,a)),m=n.limit,b=n.offset,d)){let n=function(e,t,i){if((0,r.is)(i,S)&&i.config)return{fields:i.config.fields,references:i.config.references};let s=t[(0,o.Q0)(i.referencedTable)];if(!s)throw Error(`Table "${i.referencedTable[o.iA.Symbol.Name]}" not found in schema`);let l=e[s];if(!l)throw Error(`Table "${s}" not found in schema`);let n=i.sourceTable,a=t[(0,o.Q0)(n)];if(!a)throw Error(`Table "${n[o.iA.Symbol.Name]}" not found in schema`);let h=[];for(let e of Object.values(l.relations))(i.relationName&&i!==e&&e.relationName===i.relationName||!i.relationName&&e.referencedTable===i.sourceTable)&&h.push(e);if(h.length>1)throw i.relationName?Error(`There are multiple relations with name "${i.relationName}" in table "${s}"`):Error(`There are multiple relations between "${s}" and "${i.sourceTable[o.iA.Symbol.Name]}". Please specify relation name`);if(h[0]&&(0,r.is)(h[0],S)&&h[0].config)return{fields:h[0].config.references,references:h[0].config.fields};throw Error(`There is not enough information to infer relation "${a}.${i.fieldName}"`)}(t,i,c),h=i[(0,o.Q0)(c.referencedTable)],u=`${a}_${s}`,d=(0,g.xD)(...n.fields.map((e,t)=>(0,g.eq)(T(n.references[t],u),T(e,a)))),m=this.buildRelationalQuery({fullSchema:e,schema:t,tableNamesMap:i,table:e[h],tableConfig:t[h],queryConfig:(0,r.is)(c,S)?!0===l?{limit:1}:{...l,limit:1}:l,tableAlias:u,joinOn:d,nestedQueryRelation:c}),p=(0,y.i6)`(${m.sql})`.as(s);f.push({dbKey:s,tsKey:s,field:p,relationTableTsKey:h,isJson:!0,selection:m.selection})}}if(0===f.length)throw new M({message:`No fields selected for table "${l.tsName}" ("${a}"). You need to have at least one item in "columns", "with" or "extras". If you need to select all columns, omit the "columns" key or set it to undefined.`});if(Q=(0,g.xD)(u,Q),c){let e=(0,y.i6)`json_array(${y.i6.join(f.map(({field:e})=>(0,r.is)(e,F.l)?y.i6.identifier(this.casing.getColumnCasing(e)):(0,r.is)(e,y.$s.Aliased)?e.sql:e),(0,y.i6)`, `)})`;(0,r.is)(c,$)&&(e=(0,y.i6)`coalesce(json_group_array(${e}), json_array())`);let t=[{dbKey:"data",tsKey:"data",field:e.as("data"),isJson:!0,relationTableTsKey:l.tsName,selection:f}];void 0!==m||void 0!==b||w.length>0?(d=this.buildSelectQuery({table:x(s,a),fields:{},fieldsFlat:[{path:[],field:y.i6.raw("*")}],where:Q,limit:m,offset:b,orderBy:w,setOperators:[]}),Q=void 0,m=void 0,b=void 0,w=void 0):d=x(s,a),d=this.buildSelectQuery({table:(0,r.is)(d,k.xA)?d:new O.k(d,{},a),fields:{},fieldsFlat:t.map(({field:e})=>({path:[],field:(0,r.is)(e,h.s)?T(e,a):e})),joins:v,where:Q,limit:m,offset:b,orderBy:w,setOperators:[]})}else d=this.buildSelectQuery({table:x(s,a),fields:{},fieldsFlat:f.map(({field:e})=>({path:[],field:(0,r.is)(e,h.s)?T(e,a):e})),joins:v,where:Q,limit:m,offset:b,orderBy:w,setOperators:[]});return{tableTsKey:l.tsName,sql:d,selection:f}}}class J extends D{static [r.Q]="SQLiteSyncDialect";migrate(e,t,i){let s=void 0===i?"__drizzle_migrations":"string"==typeof i?"__drizzle_migrations":i.migrationsTable??"__drizzle_migrations",r=(0,y.i6)`
2
+ CREATE TABLE IF NOT EXISTS ${y.i6.identifier(s)} (
3
+ id SERIAL PRIMARY KEY,
4
+ hash text NOT NULL,
5
+ created_at numeric
6
+ )
7
+ `;t.run(r);let l=t.values((0,y.i6)`SELECT id, hash, created_at FROM ${y.i6.identifier(s)} ORDER BY created_at DESC LIMIT 1`)[0]??void 0;t.run((0,y.i6)`BEGIN`);try{for(let i of e)if(!l||Number(l[2])<i.folderMillis){for(let e of i.sql)t.run(y.i6.raw(e));t.run((0,y.i6)`INSERT INTO ${y.i6.identifier(s)} ("hash", "created_at") VALUES(${i.hash}, ${i.folderMillis})`)}t.run((0,y.i6)`COMMIT`)}catch(e){throw t.run((0,y.i6)`ROLLBACK`),e}}}class z extends null{static [r.Q]=null;async migrate(e,t,i){let s=void 0===i?"__drizzle_migrations":"string"==typeof i?"__drizzle_migrations":i.migrationsTable??"__drizzle_migrations",r=sql`
8
+ CREATE TABLE IF NOT EXISTS ${sql.identifier(s)} (
9
+ id SERIAL PRIMARY KEY,
10
+ hash text NOT NULL,
11
+ created_at numeric
12
+ )
13
+ `;await t.run(r);let l=(await t.values(sql`SELECT id, hash, created_at FROM ${sql.identifier(s)} ORDER BY created_at DESC LIMIT 1`))[0]??void 0;await t.transaction(async t=>{for(let i of e)if(!l||Number(l[2])<i.folderMillis){for(let e of i.sql)await t.run(sql.raw(e));await t.run(sql`INSERT INTO ${sql.identifier(s)} ("hash", "created_at") VALUES(${i.hash}, ${i.folderMillis})`)}})}}class U{static [r.Q]="TypedQueryBuilder";getSelectedFields(){return this._.selectedFields}}class W{static [r.Q]="QueryPromise";[Symbol.toStringTag]="QueryPromise";catch(e){return this.then(void 0,e)}finally(e){return this.then(t=>(e?.(),t),t=>{throw e?.(),t})}then(e,t){return this.execute().then(e,t)}}class V{static [r.Q]="SQLiteSelectBuilder";fields;session;dialect;withList;distinct;constructor(e){this.fields=e.fields,this.session=e.session,this.dialect=e.dialect,this.withList=e.withList,this.distinct=e.distinct}from(e){let t;let i=!!this.fields;return t=this.fields?this.fields:(0,r.is)(e,O.k)?Object.fromEntries(Object.keys(e._.selectedFields).map(t=>[t,e[t]])):(0,r.is)(e,K)?e[v.d].selectedFields:(0,r.is)(e,y.$s)?{}:(0,I.SS)(e),new Y({table:e,fields:t,isPartialSelect:i,session:this.session,dialect:this.dialect,withList:this.withList,distinct:this.distinct})}}class G extends U{static [r.Q]="SQLiteSelectQueryBuilder";_;config;joinsNotNullableMap;tableName;isPartialSelect;session;dialect;constructor({table:e,fields:t,isPartialSelect:i,session:s,dialect:r,withList:l,distinct:n}){super(),this.config={withList:l,table:e,fields:{...t},distinct:n,setOperators:[]},this.isPartialSelect=i,this.session=s,this.dialect=r,this._={selectedFields:t},this.tableName=(0,I.dP)(e),this.joinsNotNullableMap="string"==typeof this.tableName?{[this.tableName]:!0}:{}}createJoin(e){return(t,i)=>{let s=this.tableName,l=(0,I.dP)(t);if("string"==typeof l&&this.config.joins?.some(e=>e.alias===l))throw Error(`Alias "${l}" is already used in this query`);if(!this.isPartialSelect&&(1===Object.keys(this.joinsNotNullableMap).length&&"string"==typeof s&&(this.config.fields={[s]:this.config.fields}),"string"==typeof l&&!(0,r.is)(t,y.$s))){let e=(0,r.is)(t,O.k)?t._.selectedFields:(0,r.is)(t,y.G7)?t[v.d].selectedFields:t[o.iA.Symbol.Columns];this.config.fields[l]=e}if("function"==typeof i&&(i=i(new Proxy(this.config.fields,new _({sqlAliasedBehavior:"sql",sqlBehavior:"sql"})))),this.config.joins||(this.config.joins=[]),this.config.joins.push({on:i,table:t,joinType:e,alias:l}),"string"==typeof l)switch(e){case"left":this.joinsNotNullableMap[l]=!1;break;case"right":this.joinsNotNullableMap=Object.fromEntries(Object.entries(this.joinsNotNullableMap).map(([e])=>[e,!1])),this.joinsNotNullableMap[l]=!0;break;case"inner":this.joinsNotNullableMap[l]=!0;break;case"full":this.joinsNotNullableMap=Object.fromEntries(Object.entries(this.joinsNotNullableMap).map(([e])=>[e,!1])),this.joinsNotNullableMap[l]=!1}return this}}leftJoin=this.createJoin("left");rightJoin=this.createJoin("right");innerJoin=this.createJoin("inner");fullJoin=this.createJoin("full");createSetOperator(e,t){return i=>{let s="function"==typeof i?i(H()):i;if(!(0,I.ux)(this.getSelectedFields(),s.getSelectedFields()))throw Error("Set operator error (union / intersect / except): selected fields are not the same or are in a different order");return this.config.setOperators.push({type:e,isAll:t,rightSelect:s}),this}}union=this.createSetOperator("union",!1);unionAll=this.createSetOperator("union",!0);intersect=this.createSetOperator("intersect",!1);except=this.createSetOperator("except",!1);addSetOperators(e){return this.config.setOperators.push(...e),this}where(e){return"function"==typeof e&&(e=e(new Proxy(this.config.fields,new _({sqlAliasedBehavior:"sql",sqlBehavior:"sql"})))),this.config.where=e,this}having(e){return"function"==typeof e&&(e=e(new Proxy(this.config.fields,new _({sqlAliasedBehavior:"sql",sqlBehavior:"sql"})))),this.config.having=e,this}groupBy(...e){if("function"==typeof e[0]){let t=e[0](new Proxy(this.config.fields,new _({sqlAliasedBehavior:"alias",sqlBehavior:"sql"})));this.config.groupBy=Array.isArray(t)?t:[t]}else this.config.groupBy=e;return this}orderBy(...e){if("function"==typeof e[0]){let t=e[0](new Proxy(this.config.fields,new _({sqlAliasedBehavior:"alias",sqlBehavior:"sql"}))),i=Array.isArray(t)?t:[t];this.config.setOperators.length>0?this.config.setOperators.at(-1).orderBy=i:this.config.orderBy=i}else this.config.setOperators.length>0?this.config.setOperators.at(-1).orderBy=e:this.config.orderBy=e;return this}limit(e){return this.config.setOperators.length>0?this.config.setOperators.at(-1).limit=e:this.config.limit=e,this}offset(e){return this.config.setOperators.length>0?this.config.setOperators.at(-1).offset=e:this.config.offset=e,this}getSQL(){return this.dialect.buildSelectQuery(this.config)}toSQL(){let{typings:e,...t}=this.dialect.sqlToQuery(this.getSQL());return t}as(e){return new Proxy(new O.k(this.getSQL(),this.config.fields,e),new _({alias:e,sqlAliasedBehavior:"alias",sqlBehavior:"error"}))}getSelectedFields(){return new Proxy(this.config.fields,new _({alias:this.tableName,sqlAliasedBehavior:"alias",sqlBehavior:"error"}))}$dynamic(){return this}}class Y extends G{static [r.Q]="SQLiteSelect";_prepare(e=!0){if(!this.session)throw Error("Cannot execute a query on a query builder. Please use a database instance instead.");let t=(0,I.ZS)(this.config.fields),i=this.session[e?"prepareOneTimeQuery":"prepareQuery"](this.dialect.sqlToQuery(this.getSQL()),t,"all",!0);return i.joinsNotNullableMap=this.joinsNotNullableMap,i}prepare(){return this._prepare(!1)}run=e=>this._prepare().run(e);all=e=>this._prepare().all(e);get=e=>this._prepare().get(e);values=e=>this._prepare().values(e);async execute(){return this.all()}}function Z(e,t){return(i,s,...r)=>{let l=[s,...r].map(i=>({type:e,isAll:t,rightSelect:i}));for(let e of l)if(!(0,I.ux)(i.getSelectedFields(),e.rightSelect.getSelectedFields()))throw Error("Set operator error (union / intersect / except): selected fields are not the same or are in a different order");return i.addSetOperators(l)}}(0,I.ef)(Y,[W]);let H=()=>({union:X,unionAll:ee,intersect:et,except:ei}),X=Z("union",!1),ee=Z("union",!0),et=Z("intersect",!1),ei=Z("except",!1);class es{static [r.Q]="SQLiteQueryBuilder";dialect;dialectConfig;constructor(e){this.dialect=(0,r.is)(e,D)?e:void 0,this.dialectConfig=(0,r.is)(e,D)?void 0:e}$with(e){let t=this;return{as:i=>("function"==typeof i&&(i=i(t)),new Proxy(new O.S(i.getSQL(),i.getSelectedFields(),e,!0),new _({alias:e,sqlAliasedBehavior:"alias",sqlBehavior:"error"})))}}with(...e){let t=this;return{select:function(i){return new V({fields:i??void 0,session:void 0,dialect:t.getDialect(),withList:e})},selectDistinct:function(i){return new V({fields:i??void 0,session:void 0,dialect:t.getDialect(),withList:e,distinct:!0})}}}select(e){return new V({fields:e??void 0,session:void 0,dialect:this.getDialect()})}selectDistinct(e){return new V({fields:e??void 0,session:void 0,dialect:this.getDialect(),distinct:!0})}getDialect(){return this.dialect||(this.dialect=new J(this.dialectConfig)),this.dialect}}class er{constructor(e,t,i,s){this.table=e,this.session=t,this.dialect=i,this.withList=s}static [r.Q]="SQLiteUpdateBuilder";set(e){return new el(this.table,(0,I.M6)(this.table,e),this.session,this.dialect,this.withList)}}class el extends W{constructor(e,t,i,s,r){super(),this.session=i,this.dialect=s,this.config={set:t,table:e,withList:r,joins:[]}}static [r.Q]="SQLiteUpdate";config;from(e){return this.config.from=e,this}createJoin(e){return(t,i)=>{let s=(0,I.dP)(t);if("string"==typeof s&&this.config.joins.some(e=>e.alias===s))throw Error(`Alias "${s}" is already used in this query`);if("function"==typeof i){let e=this.config.from?(0,r.is)(t,k.xA)?t[o.iA.Symbol.Columns]:(0,r.is)(t,O.k)?t._.selectedFields:(0,r.is)(t,K)?t[v.d].selectedFields:void 0:void 0;i=i(new Proxy(this.config.table[o.iA.Symbol.Columns],new _({sqlAliasedBehavior:"sql",sqlBehavior:"sql"})),e&&new Proxy(e,new _({sqlAliasedBehavior:"sql",sqlBehavior:"sql"})))}return this.config.joins.push({on:i,table:t,joinType:e,alias:s}),this}}leftJoin=this.createJoin("left");rightJoin=this.createJoin("right");innerJoin=this.createJoin("inner");fullJoin=this.createJoin("full");where(e){return this.config.where=e,this}orderBy(...e){if("function"==typeof e[0]){let t=e[0](new Proxy(this.config.table[o.iA.Symbol.Columns],new _({sqlAliasedBehavior:"alias",sqlBehavior:"sql"}))),i=Array.isArray(t)?t:[t];this.config.orderBy=i}else this.config.orderBy=e;return this}limit(e){return this.config.limit=e,this}returning(e=this.config.table[k.xA.Symbol.Columns]){return this.config.returning=(0,I.ZS)(e),this}getSQL(){return this.dialect.buildUpdateQuery(this.config)}toSQL(){let{typings:e,...t}=this.dialect.sqlToQuery(this.getSQL());return t}_prepare(e=!0){return this.session[e?"prepareOneTimeQuery":"prepareQuery"](this.dialect.sqlToQuery(this.getSQL()),this.config.returning,this.config.returning?"all":"run",!0)}prepare(){return this._prepare(!1)}run=e=>this._prepare().run(e);all=e=>this._prepare().all(e);get=e=>this._prepare().get(e);values=e=>this._prepare().values(e);async execute(){return this.config.returning?this.all():this.run()}$dynamic(){return this}}class en{constructor(e,t,i,s){this.table=e,this.session=t,this.dialect=i,this.withList=s}static [r.Q]="SQLiteInsertBuilder";values(e){if(0===(e=Array.isArray(e)?e:[e]).length)throw Error("values() must be called with at least one value");let t=e.map(e=>{let t={},i=this.table[o.iA.Symbol.Columns];for(let s of Object.keys(e)){let l=e[s];t[s]=(0,r.is)(l,y.$s)?l:new y.dO(l,i[s])}return t});return new ea(this.table,t,this.session,this.dialect,this.withList)}select(e){let t="function"==typeof e?e(new es):e;if(!(0,r.is)(t,y.$s)&&!(0,I.ux)(this.table[o.oe],t._.selectedFields))throw Error("Insert select error: selected fields are not the same or are in a different order compared to the table definition");return new ea(this.table,t,this.session,this.dialect,this.withList,!0)}}class ea extends W{constructor(e,t,i,s,r,l){super(),this.session=i,this.dialect=s,this.config={table:e,values:t,withList:r,select:l}}static [r.Q]="SQLiteInsert";config;returning(e=this.config.table[k.xA.Symbol.Columns]){return this.config.returning=(0,I.ZS)(e),this}onConflictDoNothing(e={}){if(void 0===e.target)this.config.onConflict=(0,y.i6)`do nothing`;else{let t=Array.isArray(e.target)?(0,y.i6)`${e.target}`:(0,y.i6)`${[e.target]}`,i=e.where?(0,y.i6)` where ${e.where}`:(0,y.i6)``;this.config.onConflict=(0,y.i6)`${t} do nothing${i}`}return this}onConflictDoUpdate(e){if(e.where&&(e.targetWhere||e.setWhere))throw Error('You cannot use both "where" and "targetWhere"/"setWhere" at the same time - "where" is deprecated, use "targetWhere" or "setWhere" instead.');let t=e.where?(0,y.i6)` where ${e.where}`:void 0,i=e.targetWhere?(0,y.i6)` where ${e.targetWhere}`:void 0,s=e.setWhere?(0,y.i6)` where ${e.setWhere}`:void 0,r=Array.isArray(e.target)?(0,y.i6)`${e.target}`:(0,y.i6)`${[e.target]}`,l=this.dialect.buildUpdateSet(this.config.table,(0,I.M6)(this.config.table,e.set));return this.config.onConflict=(0,y.i6)`${r}${i} do update set ${l}${t}${s}`,this}getSQL(){return this.dialect.buildInsertQuery(this.config)}toSQL(){let{typings:e,...t}=this.dialect.sqlToQuery(this.getSQL());return t}_prepare(e=!0){return this.session[e?"prepareOneTimeQuery":"prepareQuery"](this.dialect.sqlToQuery(this.getSQL()),this.config.returning,this.config.returning?"all":"run",!0)}prepare(){return this._prepare(!1)}run=e=>this._prepare().run(e);all=e=>this._prepare().all(e);get=e=>this._prepare().get(e);values=e=>this._prepare().values(e);async execute(){return this.config.returning?this.all():this.run()}$dynamic(){return this}}class eo extends W{constructor(e,t,i,s){super(),this.table=e,this.session=t,this.dialect=i,this.config={table:e,withList:s}}static [r.Q]="SQLiteDelete";config;where(e){return this.config.where=e,this}orderBy(...e){if("function"==typeof e[0]){let t=e[0](new Proxy(this.config.table[o.iA.Symbol.Columns],new _({sqlAliasedBehavior:"alias",sqlBehavior:"sql"}))),i=Array.isArray(t)?t:[t];this.config.orderBy=i}else this.config.orderBy=e;return this}limit(e){return this.config.limit=e,this}returning(e=this.table[k.xA.Symbol.Columns]){return this.config.returning=(0,I.ZS)(e),this}getSQL(){return this.dialect.buildDeleteQuery(this.config)}toSQL(){let{typings:e,...t}=this.dialect.sqlToQuery(this.getSQL());return t}_prepare(e=!0){return this.session[e?"prepareOneTimeQuery":"prepareQuery"](this.dialect.sqlToQuery(this.getSQL()),this.config.returning,this.config.returning?"all":"run",!0)}prepare(){return this._prepare(!1)}run=e=>this._prepare().run(e);all=e=>this._prepare().all(e);get=e=>this._prepare().get(e);values=e=>this._prepare().values(e);async execute(e){return this._prepare().execute(e)}$dynamic(){return this}}class eh extends y.$s{constructor(e){super(eh.buildEmbeddedCount(e.source,e.filters).queryChunks),this.params=e,this.session=e.session,this.sql=eh.buildCount(e.source,e.filters)}sql;static [r.Q]="SQLiteCountBuilderAsync";[Symbol.toStringTag]="SQLiteCountBuilderAsync";session;static buildEmbeddedCount(e,t){return(0,y.i6)`(select count(*) from ${e}${y.i6.raw(" where ").if(t)}${t})`}static buildCount(e,t){return(0,y.i6)`select count(*) from ${e}${y.i6.raw(" where ").if(t)}${t}`}then(e,t){return Promise.resolve(this.session.count(this.sql)).then(e,t)}catch(e){return this.then(void 0,e)}finally(e){return this.then(t=>(e?.(),t),t=>{throw e?.(),t})}}class ec{constructor(e,t,i,s,r,l,n,a){this.mode=e,this.fullSchema=t,this.schema=i,this.tableNamesMap=s,this.table=r,this.tableConfig=l,this.dialect=n,this.session=a}static [r.Q]="SQLiteAsyncRelationalQueryBuilder";findMany(e){return"sync"===this.mode?new ed(this.fullSchema,this.schema,this.tableNamesMap,this.table,this.tableConfig,this.dialect,this.session,e||{},"many"):new eu(this.fullSchema,this.schema,this.tableNamesMap,this.table,this.tableConfig,this.dialect,this.session,e||{},"many")}findFirst(e){return"sync"===this.mode?new ed(this.fullSchema,this.schema,this.tableNamesMap,this.table,this.tableConfig,this.dialect,this.session,e?{...e,limit:1}:{limit:1},"first"):new eu(this.fullSchema,this.schema,this.tableNamesMap,this.table,this.tableConfig,this.dialect,this.session,e?{...e,limit:1}:{limit:1},"first")}}class eu extends W{constructor(e,t,i,s,r,l,n,a,o){super(),this.fullSchema=e,this.schema=t,this.tableNamesMap=i,this.table=s,this.tableConfig=r,this.dialect=l,this.session=n,this.config=a,this.mode=o}static [r.Q]="SQLiteAsyncRelationalQuery";mode;getSQL(){return this.dialect.buildRelationalQuery({fullSchema:this.fullSchema,schema:this.schema,tableNamesMap:this.tableNamesMap,table:this.table,tableConfig:this.tableConfig,queryConfig:this.config,tableAlias:this.tableConfig.tsName}).sql}_prepare(e=!1){let{query:t,builtQuery:i}=this._toSQL();return this.session[e?"prepareOneTimeQuery":"prepareQuery"](i,void 0,"first"===this.mode?"get":"all",!0,(e,i)=>{let s=e.map(e=>(function e(t,i,s,l,n=e=>e){let a={};for(let[o,c]of l.entries())if(c.isJson){let l=i.relations[c.tsKey],h=s[o],u="string"==typeof h?JSON.parse(h):h;a[c.tsKey]=(0,r.is)(l,S)?u&&e(t,t[c.relationTableTsKey],u,c.selection,n):u.map(i=>e(t,t[c.relationTableTsKey],i,c.selection,n))}else{let e;let t=n(s[o]),i=c.field;e=(0,r.is)(i,h.s)?i:(0,r.is)(i,y.$s)?i.decoder:i.sql.decoder,a[c.tsKey]=null===t?null:e.mapFromDriverValue(t)}return a})(this.schema,this.tableConfig,e,t.selection,i));return"first"===this.mode?s[0]:s})}prepare(){return this._prepare(!1)}_toSQL(){let e=this.dialect.buildRelationalQuery({fullSchema:this.fullSchema,schema:this.schema,tableNamesMap:this.tableNamesMap,table:this.table,tableConfig:this.tableConfig,queryConfig:this.config,tableAlias:this.tableConfig.tsName}),t=this.dialect.sqlToQuery(e.sql);return{query:e,builtQuery:t}}toSQL(){return this._toSQL().builtQuery}executeRaw(){return"first"===this.mode?this._prepare(!1).get():this._prepare(!1).all()}async execute(){return this.executeRaw()}}class ed extends eu{static [r.Q]="SQLiteSyncRelationalQuery";sync(){return this.executeRaw()}}class ef extends W{constructor(e,t,i,s,r){super(),this.execute=e,this.getSQL=t,this.dialect=s,this.mapBatchResult=r,this.config={action:i}}static [r.Q]="SQLiteRaw";config;getQuery(){return{...this.dialect.sqlToQuery(this.getSQL()),method:this.config.action}}mapResult(e,t){return t?this.mapBatchResult(e):e}_prepare(){return this}isResponseInArrayMode(){return!1}}class em{constructor(e,t,i,s){this.resultKind=e,this.dialect=t,this.session=i,this._=s?{schema:s.schema,fullSchema:s.fullSchema,tableNamesMap:s.tableNamesMap}:{schema:void 0,fullSchema:{},tableNamesMap:{}},this.query={};let r=this.query;if(this._.schema)for(let[l,n]of Object.entries(this._.schema))r[l]=new ec(e,s.fullSchema,this._.schema,this._.tableNamesMap,s.fullSchema[l],n,t,i)}static [r.Q]="BaseSQLiteDatabase";query;$with(e){let t=this;return{as:i=>("function"==typeof i&&(i=i(new es(t.dialect))),new Proxy(new O.S(i.getSQL(),i.getSelectedFields(),e,!0),new _({alias:e,sqlAliasedBehavior:"alias",sqlBehavior:"error"})))}}$count(e,t){return new eh({source:e,filters:t,session:this.session})}with(...e){let t=this;return{select:function(i){return new V({fields:i??void 0,session:t.session,dialect:t.dialect,withList:e})},selectDistinct:function(i){return new V({fields:i??void 0,session:t.session,dialect:t.dialect,withList:e,distinct:!0})},update:function(i){return new er(i,t.session,t.dialect,e)},insert:function(i){return new en(i,t.session,t.dialect,e)},delete:function(i){return new eo(i,t.session,t.dialect,e)}}}select(e){return new V({fields:e??void 0,session:this.session,dialect:this.dialect})}selectDistinct(e){return new V({fields:e??void 0,session:this.session,dialect:this.dialect,distinct:!0})}update(e){return new er(e,this.session,this.dialect)}insert(e){return new en(e,this.session,this.dialect)}delete(e){return new eo(e,this.session,this.dialect)}run(e){let t="string"==typeof e?y.i6.raw(e):e.getSQL();return"async"===this.resultKind?new ef(async()=>this.session.run(t),()=>t,"run",this.dialect,this.session.extractRawRunValueFromBatchResult.bind(this.session)):this.session.run(t)}all(e){let t="string"==typeof e?y.i6.raw(e):e.getSQL();return"async"===this.resultKind?new ef(async()=>this.session.all(t),()=>t,"all",this.dialect,this.session.extractRawAllValueFromBatchResult.bind(this.session)):this.session.all(t)}get(e){let t="string"==typeof e?y.i6.raw(e):e.getSQL();return"async"===this.resultKind?new ef(async()=>this.session.get(t),()=>t,"get",this.dialect,this.session.extractRawGetValueFromBatchResult.bind(this.session)):this.session.get(t)}values(e){let t="string"==typeof e?y.i6.raw(e):e.getSQL();return"async"===this.resultKind?new ef(async()=>this.session.values(t),()=>t,"values",this.dialect,this.session.extractRawValuesValueFromBatchResult.bind(this.session)):this.session.values(t)}transaction(e,t){return this.session.transaction(e,t)}}class eg extends W{constructor(e){super(),this.resultCb=e}static [r.Q]="ExecuteResultSync";async execute(){return this.resultCb()}sync(){return this.resultCb()}}class ep{constructor(e,t,i){this.mode=e,this.executeMethod=t,this.query=i}static [r.Q]="PreparedQuery";joinsNotNullableMap;getQuery(){return this.query}mapRunResult(e,t){return e}mapAllResult(e,t){throw Error("Not implemented")}mapGetResult(e,t){throw Error("Not implemented")}execute(e){return"async"===this.mode?this[this.executeMethod](e):new eg(()=>this[this.executeMethod](e))}mapResult(e,t){switch(this.executeMethod){case"run":return this.mapRunResult(e,t);case"all":return this.mapAllResult(e,t);case"get":return this.mapGetResult(e,t)}}}class ey{constructor(e){this.dialect=e}static [r.Q]="SQLiteSession";prepareOneTimeQuery(e,t,i,s){return this.prepareQuery(e,t,i,s)}run(e){let t=this.dialect.sqlToQuery(e);try{return this.prepareOneTimeQuery(t,void 0,"run",!1).run()}catch(e){throw new M({cause:e,message:`Failed to run the query '${t.sql}'`})}}extractRawRunValueFromBatchResult(e){return e}all(e){return this.prepareOneTimeQuery(this.dialect.sqlToQuery(e),void 0,"run",!1).all()}extractRawAllValueFromBatchResult(e){throw Error("Not implemented")}get(e){return this.prepareOneTimeQuery(this.dialect.sqlToQuery(e),void 0,"run",!1).get()}extractRawGetValueFromBatchResult(e){throw Error("Not implemented")}values(e){return this.prepareOneTimeQuery(this.dialect.sqlToQuery(e),void 0,"run",!1).values()}async count(e){return(await this.values(e))[0][0]}extractRawValuesValueFromBatchResult(e){throw Error("Not implemented")}}class eb extends em{constructor(e,t,i,s,r=0){super(e,t,i,s),this.schema=s,this.nestedIndex=r}static [r.Q]="SQLiteTransaction";rollback(){throw new P}}class ew extends ey{constructor(e,t,i,s={}){super(t),this.client=e,this.schema=i,this.logger=s.logger??new a}static [r.Q]="BetterSQLiteSession";logger;prepareQuery(e,t,i,s,r){return new e$(this.client.prepare(e.sql),e,this.logger,t,i,s,r)}transaction(e,t={}){let i=new eS("sync",this.dialect,this,this.schema);return this.client.transaction(e)[t.behavior??"deferred"](i)}}class eS extends eb{static [r.Q]="BetterSQLiteTransaction";transaction(e){let t=`sp${this.nestedIndex}`,i=new eS("sync",this.dialect,this.session,this.schema,this.nestedIndex+1);this.session.run(y.i6.raw(`savepoint ${t}`));try{let s=e(i);return this.session.run(y.i6.raw(`release savepoint ${t}`)),s}catch(e){throw this.session.run(y.i6.raw(`rollback to savepoint ${t}`)),e}}}class e$ extends ep{constructor(e,t,i,s,r,l,n){super("sync",r,t),this.stmt=e,this.logger=i,this.fields=s,this._isResponseInArrayMode=l,this.customResultMapper=n}static [r.Q]="BetterSQLitePreparedQuery";run(e){let t=(0,y.Pr)(this.query.params,e??{});return this.logger.logQuery(this.query.sql,t),this.stmt.run(...t)}all(e){let{fields:t,joinsNotNullableMap:i,query:s,logger:r,stmt:l,customResultMapper:n}=this;if(!t&&!n){let t=(0,y.Pr)(s.params,e??{});return r.logQuery(s.sql,t),l.all(...t)}let a=this.values(e);return n?n(a):a.map(e=>(0,I.M4)(t,e,i))}get(e){let t=(0,y.Pr)(this.query.params,e??{});this.logger.logQuery(this.query.sql,t);let{fields:i,stmt:s,joinsNotNullableMap:r,customResultMapper:l}=this;if(!i&&!l)return s.get(...t);let n=s.raw().get(...t);return n?l?l([n]):(0,I.M4)(i,n,r):void 0}values(e){let t=(0,y.Pr)(this.query.params,e??{});return this.logger.logQuery(this.query.sql,t),this.stmt.raw().all(...t)}isResponseInArrayMode(){return this._isResponseInArrayMode}}class eQ extends em{static [r.Q]="BetterSQLite3Database"}function ev(e,t={}){let i,s;let l=new J({casing:t.casing});if(!0===t.logger?i=new n:!1!==t.logger&&(i=t.logger),t.schema){let e=function(e,t){1===Object.keys(e).length&&"default"in e&&!(0,r.is)(e.default,o.iA)&&(e=e.default);let i={},s={},l={};for(let[n,a]of Object.entries(e))if((0,r.is)(a,o.iA)){let e=(0,o.Q0)(a),t=s[e];for(let s of(i[e]=n,l[n]={tsName:n,dbName:a[o.iA.Symbol.Name],schema:a[o.iA.Symbol.Schema],columns:a[o.iA.Symbol.Columns],relations:t?.relations??{},primaryKey:t?.primaryKey??[]},Object.values(a[o.iA.Symbol.Columns])))s.primary&&l[n].primaryKey.push(s);let h=a[o.iA.Symbol.ExtraConfigBuilder]?.(a[o.iA.Symbol.ExtraConfigColumns]);if(h)for(let e of Object.values(h))(0,r.is)(e,f)&&l[n].primaryKey.push(...e.columns)}else if((0,r.is)(a,w)){let e;let r=(0,o.Q0)(a.table),n=i[r];for(let[i,o]of Object.entries(a.config(t(a.table))))if(n){let t=l[n];t.relations[i]=o,e&&t.primaryKey.push(...e)}else r in s||(s[r]={relations:{},primaryKey:e}),s[r].relations[i]=o}return{tables:l,tableNamesMap:i}}(t.schema,Q);s={fullSchema:t.schema,schema:e.tables,tableNamesMap:e.tableNamesMap}}let a=new ew(e,l,s,{logger:i}),h=new eQ("sync",l,a,s);return h.$client=e,h}function eA(...e){if(void 0===e[0]||"string"==typeof e[0])return ev(void 0===e[0]?new s:new s(e[0]),e[1]);if((0,I.wM)(e[0])){let{connection:t,client:i,...r}=e[0];if(i)return ev(i,r);if("object"==typeof t){let{source:e,...i}=t;return ev(new s(e,i),r)}return ev(new s(t),r)}return ev(e[0],e[1])}(eA||(eA={})).mock=function(e){return ev({},e)}}};